From 2c9017f6dffe5d40c13f4327a505f24952364463 Mon Sep 17 00:00:00 2001 From: Aliaksandr Valialkin Date: Thu, 17 Nov 2022 01:38:29 +0200 Subject: [PATCH 01/46] vendor: `make vendor-update` --- go.mod | 16 +- go.sum | 32 +- .../go/internal/.repo-metadata-full.json | 18 + .../aws/aws-sdk-go-v2/config/CHANGELOG.md | 14 + .../config/go_module_metadata.go | 2 +- .../config/resolve_bearer_token.go | 15 +- .../config/resolve_credentials.go | 26 +- .../aws/aws-sdk-go-v2/config/shared_config.go | 124 +- .../aws-sdk-go-v2/credentials/CHANGELOG.md | 13 + .../credentials/go_module_metadata.go | 2 +- .../ssocreds/sso_credentials_provider.go | 42 +- .../feature/s3/manager/CHANGELOG.md | 12 + .../feature/s3/manager/go_module_metadata.go | 2 +- .../aws/aws-sdk-go-v2/service/s3/CHANGELOG.md | 8 + .../service/s3/go_module_metadata.go | 2 +- .../s3/internal/endpoints/endpoints.go | 18 + .../aws-sdk-go-v2/service/sts/CHANGELOG.md | 8 + .../service/sts/go_module_metadata.go | 2 +- .../sts/internal/endpoints/endpoints.go | 6 + vendor/github.com/rivo/uniseg/README.md | 7 + vendor/github.com/rivo/uniseg/doc.go | 6 +- vendor/github.com/rivo/uniseg/grapheme.go | 19 + .../googleapis/api/annotations/client.pb.go | 1558 ++++++++++++++++- .../googleapis/api/launch_stage.pb.go | 203 +++ vendor/modules.txt | 17 +- 25 files changed, 2001 insertions(+), 171 deletions(-) create mode 100644 vendor/google.golang.org/genproto/googleapis/api/launch_stage.pb.go diff --git a/go.mod b/go.mod index 0fc56d60e..0c8db875c 100644 --- a/go.mod +++ b/go.mod @@ -14,9 +14,9 @@ require ( github.com/VictoriaMetrics/metrics v1.23.0 github.com/VictoriaMetrics/metricsql v0.47.0 github.com/aws/aws-sdk-go-v2 v1.17.1 - github.com/aws/aws-sdk-go-v2/config v1.17.10 - github.com/aws/aws-sdk-go-v2/feature/s3/manager v1.11.37 - github.com/aws/aws-sdk-go-v2/service/s3 v1.29.1 + github.com/aws/aws-sdk-go-v2/config v1.18.1 + github.com/aws/aws-sdk-go-v2/feature/s3/manager v1.11.40 + github.com/aws/aws-sdk-go-v2/service/s3 v1.29.3 github.com/cespare/xxhash/v2 v2.1.2 github.com/cheggaaa/pb/v3 v3.1.0 github.com/golang/snappy v0.0.4 @@ -38,14 +38,14 @@ require ( ) require ( - cloud.google.com/go v0.106.0 // indirect + cloud.google.com/go v0.107.0 // indirect cloud.google.com/go/compute v1.12.1 // indirect cloud.google.com/go/compute/metadata v0.2.1 // indirect cloud.google.com/go/iam v0.7.0 // indirect github.com/Azure/azure-sdk-for-go/sdk/internal v1.1.1 // indirect github.com/VividCortex/ewma v1.2.0 // indirect github.com/aws/aws-sdk-go-v2/aws/protocol/eventstream v1.4.9 // indirect - github.com/aws/aws-sdk-go-v2/credentials v1.12.23 // indirect + github.com/aws/aws-sdk-go-v2/credentials v1.13.1 // indirect github.com/aws/aws-sdk-go-v2/feature/ec2/imds v1.12.19 // indirect github.com/aws/aws-sdk-go-v2/internal/configsources v1.1.25 // indirect github.com/aws/aws-sdk-go-v2/internal/endpoints/v2 v2.4.19 // indirect @@ -57,7 +57,7 @@ require ( github.com/aws/aws-sdk-go-v2/service/internal/s3shared v1.13.19 // indirect github.com/aws/aws-sdk-go-v2/service/sso v1.11.25 // indirect github.com/aws/aws-sdk-go-v2/service/ssooidc v1.13.8 // indirect - github.com/aws/aws-sdk-go-v2/service/sts v1.17.1 // indirect + github.com/aws/aws-sdk-go-v2/service/sts v1.17.3 // indirect github.com/aws/smithy-go v1.13.4 // indirect github.com/beorn7/perks v1.0.1 // indirect github.com/cpuguy83/go-md2man/v2 v2.0.2 // indirect @@ -81,7 +81,7 @@ require ( github.com/prometheus/client_model v0.3.0 // indirect github.com/prometheus/common v0.37.0 // indirect github.com/prometheus/procfs v0.8.0 // indirect - github.com/rivo/uniseg v0.4.2 // indirect + github.com/rivo/uniseg v0.4.3 // indirect github.com/russross/blackfriday/v2 v2.1.0 // indirect github.com/valyala/bytebufferpool v1.0.0 // indirect github.com/valyala/histogram v1.2.0 // indirect @@ -93,7 +93,7 @@ require ( golang.org/x/text v0.4.0 // indirect golang.org/x/xerrors v0.0.0-20220907171357-04be3eba64a2 // indirect google.golang.org/appengine v1.6.7 // indirect - google.golang.org/genproto v0.0.0-20221109142239-94d6d90a7d66 // indirect + google.golang.org/genproto v0.0.0-20221116193143-41c2ba794472 // indirect google.golang.org/grpc v1.50.1 // indirect google.golang.org/protobuf v1.28.1 // indirect ) diff --git a/go.sum b/go.sum index 8ce522ff3..62b35fb06 100644 --- a/go.sum +++ b/go.sum @@ -15,8 +15,8 @@ cloud.google.com/go v0.56.0/go.mod h1:jr7tqZxxKOVYizybht9+26Z/gUq7tiRzu+ACVAMbKV cloud.google.com/go v0.57.0/go.mod h1:oXiQ6Rzq3RAkkY7N6t3TcE6jE+CIBBbA36lwQ1JyzZs= cloud.google.com/go v0.62.0/go.mod h1:jmCYTdRCQuc1PHIIJ/maLInMho30T/Y0M4hTdTShOYc= cloud.google.com/go v0.65.0/go.mod h1:O5N8zS7uWy9vkA9vayVHs65eM1ubvY4h553ofrNHObY= -cloud.google.com/go v0.106.0 h1:AWaMWuZb2oFeiV91OfNHZbmwUhMVuXEaLPm9sqDAOl8= -cloud.google.com/go v0.106.0/go.mod h1:5NEGxGuIeMQiPaWLwLYZ7kfNWiP6w1+QJK+xqyIT+dw= +cloud.google.com/go v0.107.0 h1:qkj22L7bgkl6vIeZDlOY2po43Mx/TIa2Wsa7VR+PEww= +cloud.google.com/go v0.107.0/go.mod h1:wpc2eNrD7hXUTy8EKS10jkxpZBjASrORK7goS+3YX2I= cloud.google.com/go/bigquery v1.0.1/go.mod h1:i/xbL2UlR5RvWAURpBYZTtm/cXjCha9lbfbpx4poX+o= cloud.google.com/go/bigquery v1.3.0/go.mod h1:PjpwJnslEMmckchkHFfq+HTD2DmtT67aNFKH1/VBDHE= cloud.google.com/go/bigquery v1.4.0/go.mod h1:S8dzgnTigyfTmLBfrtrhyYhwRxG72rYxvftPBK2Dvzc= @@ -143,14 +143,14 @@ github.com/aws/aws-sdk-go-v2 v1.17.1 h1:02c72fDJr87N8RAC2s3Qu0YuvMRZKNZJ9F+lAehC github.com/aws/aws-sdk-go-v2 v1.17.1/go.mod h1:JLnGeGONAyi2lWXI1p0PCIOIy333JMVK1U7Hf0aRFLw= github.com/aws/aws-sdk-go-v2/aws/protocol/eventstream v1.4.9 h1:RKci2D7tMwpvGpDNZnGQw9wk6v7o/xSwFcUAuNPoB8k= github.com/aws/aws-sdk-go-v2/aws/protocol/eventstream v1.4.9/go.mod h1:vCmV1q1VK8eoQJ5+aYE7PkK1K6v41qJ5pJdK3ggCDvg= -github.com/aws/aws-sdk-go-v2/config v1.17.10 h1:zBy5QQ/mkvHElM1rygHPAzuH+sl8nsdSaxSWj0+rpdE= -github.com/aws/aws-sdk-go-v2/config v1.17.10/go.mod h1:/4np+UiJJKpWHN7Q+LZvqXYgyjgeXm5+lLfDI6TPZao= -github.com/aws/aws-sdk-go-v2/credentials v1.12.23 h1:LctvcJMIb8pxvk5hQhChpCu0WlU6oKQmcYb1HA4IZSA= -github.com/aws/aws-sdk-go-v2/credentials v1.12.23/go.mod h1:0awX9iRr/+UO7OwRQFpV1hNtXxOVuehpjVEzrIAYNcA= +github.com/aws/aws-sdk-go-v2/config v1.18.1 h1:wMzU9tBq/tEdTUcmB9WsYe5stdP0/EAf84vfeqS5S6A= +github.com/aws/aws-sdk-go-v2/config v1.18.1/go.mod h1:jQIgBmQJa5oPzTUtWMjFryPDCBlVqIgoFmdfFKLx4WE= +github.com/aws/aws-sdk-go-v2/credentials v1.13.1 h1:HusGjp9C8zwu1SSEh3s501Llqr2xhn+FYKV5XMnOt6M= +github.com/aws/aws-sdk-go-v2/credentials v1.13.1/go.mod h1:C8xoJdzfQq/kl6gGIuJeHpcAaZnraJfTV9FoBgW1QYg= github.com/aws/aws-sdk-go-v2/feature/ec2/imds v1.12.19 h1:E3PXZSI3F2bzyj6XxUXdTIfvp425HHhwKsFvmzBwHgs= github.com/aws/aws-sdk-go-v2/feature/ec2/imds v1.12.19/go.mod h1:VihW95zQpeKQWVPGkwT+2+WJNQV8UXFfMTWdU6VErL8= -github.com/aws/aws-sdk-go-v2/feature/s3/manager v1.11.37 h1:e1VtTBo+cLNjres0wTlMkmwCGGRjDEkkrz3frxxcaCs= -github.com/aws/aws-sdk-go-v2/feature/s3/manager v1.11.37/go.mod h1:kdAV1UMnCkyG6tZJUC4mHbPoRjPA3dIK0L8mnsHERiM= +github.com/aws/aws-sdk-go-v2/feature/s3/manager v1.11.40 h1:Q8Pshd76l1y24DSWJrQPyYY6xVNmpcsZHEfE9xZ4rpU= +github.com/aws/aws-sdk-go-v2/feature/s3/manager v1.11.40/go.mod h1:rxGAF7fGMCse4bUVO+55P1mWCMCnUZPmh3LAnl0PZms= github.com/aws/aws-sdk-go-v2/internal/configsources v1.1.25 h1:nBO/RFxeq/IS5G9Of+ZrgucRciie2qpLy++3UGZ+q2E= github.com/aws/aws-sdk-go-v2/internal/configsources v1.1.25/go.mod h1:Zb29PYkf42vVYQY6pvSyJCJcFHlPIiY+YKdPtwnvMkY= github.com/aws/aws-sdk-go-v2/internal/endpoints/v2 v2.4.19 h1:oRHDrwCTVT8ZXi4sr9Ld+EXk7N/KGssOr2ygNeojEhw= @@ -167,14 +167,14 @@ github.com/aws/aws-sdk-go-v2/service/internal/presigned-url v1.9.19 h1:GE25AWCdN github.com/aws/aws-sdk-go-v2/service/internal/presigned-url v1.9.19/go.mod h1:02CP6iuYP+IVnBX5HULVdSAku/85eHB2Y9EsFhrkEwU= github.com/aws/aws-sdk-go-v2/service/internal/s3shared v1.13.19 h1:piDBAaWkaxkkVV3xJJbTehXCZRXYs49kvpi/LG6LR2o= github.com/aws/aws-sdk-go-v2/service/internal/s3shared v1.13.19/go.mod h1:BmQWRVkLTmyNzYPFAZgon53qKLWBNSvonugD1MrSWUs= -github.com/aws/aws-sdk-go-v2/service/s3 v1.29.1 h1:/EMdFPW/Ppieh0WUtQf1+qCGNLdsq5UWUyevBQ6vMVc= -github.com/aws/aws-sdk-go-v2/service/s3 v1.29.1/go.mod h1:/NHbqPRiwxSPVOB2Xr+StDEH+GWV/64WwnUjv4KYzV0= +github.com/aws/aws-sdk-go-v2/service/s3 v1.29.3 h1:F6wgg8aHGNyhaAy2ONnWBThiPdLa386qNA0j33FIuSM= +github.com/aws/aws-sdk-go-v2/service/s3 v1.29.3/go.mod h1:/NHbqPRiwxSPVOB2Xr+StDEH+GWV/64WwnUjv4KYzV0= github.com/aws/aws-sdk-go-v2/service/sso v1.11.25 h1:GFZitO48N/7EsFDt8fMa5iYdmWqkUDDB3Eje6z3kbG0= github.com/aws/aws-sdk-go-v2/service/sso v1.11.25/go.mod h1:IARHuzTXmj1C0KS35vboR0FeJ89OkEy1M9mWbK2ifCI= github.com/aws/aws-sdk-go-v2/service/ssooidc v1.13.8 h1:jcw6kKZrtNfBPJkaHrscDOZoe5gvi9wjudnxvozYFJo= github.com/aws/aws-sdk-go-v2/service/ssooidc v1.13.8/go.mod h1:er2JHN+kBY6FcMfcBBKNGCT3CarImmdFzishsqBmSRI= -github.com/aws/aws-sdk-go-v2/service/sts v1.17.1 h1:KRAix/KHvjGODaHAMXnxRk9t0D+4IJVUuS/uwXxngXk= -github.com/aws/aws-sdk-go-v2/service/sts v1.17.1/go.mod h1:bXcN3koeVYiJcdDU89n3kCYILob7Y34AeLopUbZgLT4= +github.com/aws/aws-sdk-go-v2/service/sts v1.17.3 h1:WMAsVk4yQTHOZ2m7dFnF5Azr/aDecBbpWRwc+M6iFIM= +github.com/aws/aws-sdk-go-v2/service/sts v1.17.3/go.mod h1:bXcN3koeVYiJcdDU89n3kCYILob7Y34AeLopUbZgLT4= github.com/aws/smithy-go v1.13.4 h1:/RN2z1txIJWeXeOkzX+Hk/4Uuvv7dWtCjbmVJcrskyk= github.com/aws/smithy-go v1.13.4/go.mod h1:Tg+OJXh4MB2R/uN61Ko2f6hTZwB/ZYGOtib8J3gBHzA= github.com/beorn7/perks v0.0.0-20180321164747-3a771d992973/go.mod h1:Dwedo/Wpr24TaqPxmxbtue+5NUziq4I4S80YR8gNf3Q= @@ -766,8 +766,8 @@ github.com/rcrowley/go-metrics v0.0.0-20181016184325-3113b8401b8a/go.mod h1:bCqn github.com/retailnext/hllpp v1.0.1-0.20180308014038-101a6d2f8b52/go.mod h1:RDpi1RftBQPUCDRw6SmxeaREsAaRKnOclghuzp/WRzc= github.com/rivo/uniseg v0.1.0/go.mod h1:J6wj4VEh+S6ZtnVlnTBMWIodfgj8LQOQFoIToxlJtxc= github.com/rivo/uniseg v0.2.0/go.mod h1:J6wj4VEh+S6ZtnVlnTBMWIodfgj8LQOQFoIToxlJtxc= -github.com/rivo/uniseg v0.4.2 h1:YwD0ulJSJytLpiaWua0sBDusfsCZohxjxzVTYjwxfV8= -github.com/rivo/uniseg v0.4.2/go.mod h1:FN3SvrM+Zdj16jyLfmOkMNblXMcoc8DfTHruCPUcx88= +github.com/rivo/uniseg v0.4.3 h1:utMvzDsuh3suAEnhH0RdHmoPbU648o6CvXxTx4SBMOw= +github.com/rivo/uniseg v0.4.3/go.mod h1:FN3SvrM+Zdj16jyLfmOkMNblXMcoc8DfTHruCPUcx88= github.com/rogpeppe/fastuuid v0.0.0-20150106093220-6724a57986af/go.mod h1:XWv6SoW27p1b0cqNHllgS5HIMJraePCO15w5zCzIWYg= github.com/rogpeppe/fastuuid v1.2.0/go.mod h1:jVj6XXZzXRy/MSR5jhDC/2q6DgLz+nrA6LYCDYWNEvQ= github.com/rogpeppe/go-internal v1.1.0/go.mod h1:M8bDsm7K2OlrFYOpmOWEs/qY81heoFRclV5y23lUDJ4= @@ -1256,8 +1256,8 @@ google.golang.org/genproto v0.0.0-20200729003335-053ba62fc06f/go.mod h1:FWY/as6D google.golang.org/genproto v0.0.0-20200804131852-c06518451d9c/go.mod h1:FWY/as6DDZQgahTzZj3fqbO1CbirC29ZNUFHwi0/+no= google.golang.org/genproto v0.0.0-20200825200019-8632dd797987/go.mod h1:FWY/as6DDZQgahTzZj3fqbO1CbirC29ZNUFHwi0/+no= google.golang.org/genproto v0.0.0-20200904004341-0bd0a958aa1d/go.mod h1:FWY/as6DDZQgahTzZj3fqbO1CbirC29ZNUFHwi0/+no= -google.golang.org/genproto v0.0.0-20221109142239-94d6d90a7d66 h1:wx7sJ5GRBQLRcslTNcrTklsHhHevQvxgztW18txbbZM= -google.golang.org/genproto v0.0.0-20221109142239-94d6d90a7d66/go.mod h1:rZS5c/ZVYMaOGBfO68GWtjOw/eLaZM1X6iVtgjZ+EWg= +google.golang.org/genproto v0.0.0-20221116193143-41c2ba794472 h1:kIfItBRE5gkUKpH4H5lNGciZbka1JrmRli3ArqrKFkA= +google.golang.org/genproto v0.0.0-20221116193143-41c2ba794472/go.mod h1:rZS5c/ZVYMaOGBfO68GWtjOw/eLaZM1X6iVtgjZ+EWg= google.golang.org/grpc v1.17.0/go.mod h1:6QZJwpn2B+Zp71q/5VxRsJ6NXXVCE5NRUHRo+f3cWCs= google.golang.org/grpc v1.19.0/go.mod h1:mqu4LbDTu4XGKhr4mRzUsmM4RtVoemTSY81AxZiDr8c= google.golang.org/grpc v1.20.0/go.mod h1:chYK+tFQF0nDUGJgXMSgLCQk3phJEuONr2DCgLDdAQM= diff --git a/vendor/cloud.google.com/go/internal/.repo-metadata-full.json b/vendor/cloud.google.com/go/internal/.repo-metadata-full.json index 0da15ce1d..ac3f773f8 100644 --- a/vendor/cloud.google.com/go/internal/.repo-metadata-full.json +++ b/vendor/cloud.google.com/go/internal/.repo-metadata-full.json @@ -1052,6 +1052,24 @@ "release_level": "ga", "library_type": "GAPIC_AUTO" }, + "cloud.google.com/go/maps/addressvalidation/apiv1": { + "distribution_name": "cloud.google.com/go/maps/addressvalidation/apiv1", + "description": "Address Validation API", + "language": "Go", + "client_library_type": "generated", + "docs_url": "https://cloud.google.com/go/docs/reference/cloud.google.com/go/maps/latest/addressvalidation/apiv1", + "release_level": "beta", + "library_type": "GAPIC_AUTO" + }, + "cloud.google.com/go/maps/routing/apiv2": { + "distribution_name": "cloud.google.com/go/maps/routing/apiv2", + "description": "Routes API", + "language": "Go", + "client_library_type": "generated", + "docs_url": "https://cloud.google.com/go/docs/reference/cloud.google.com/go/maps/latest/routing/apiv2", + "release_level": "beta", + "library_type": "GAPIC_AUTO" + }, "cloud.google.com/go/mediatranslation/apiv1beta1": { "distribution_name": "cloud.google.com/go/mediatranslation/apiv1beta1", "description": "Media Translation API", diff --git a/vendor/github.com/aws/aws-sdk-go-v2/config/CHANGELOG.md b/vendor/github.com/aws/aws-sdk-go-v2/config/CHANGELOG.md index 74deb0d93..4544603af 100644 --- a/vendor/github.com/aws/aws-sdk-go-v2/config/CHANGELOG.md +++ b/vendor/github.com/aws/aws-sdk-go-v2/config/CHANGELOG.md @@ -1,3 +1,17 @@ +# v1.18.1 (2022-11-16) + +* **Dependency Update**: Updated to the latest SDK module versions + +# v1.18.0 (2022-11-11) + +* **Announcement**: When using the SSOTokenProvider, a previous implementation incorrectly compensated for invalid SSOTokenProvider configurations in the shared profile. This has been fixed via PR #1903 and tracked in issue #1846 +* **Feature**: Adds token refresh support (via SSOTokenProvider) when using the SSOCredentialProvider +* **Dependency Update**: Updated to the latest SDK module versions + +# v1.17.11 (2022-11-10) + +* **Dependency Update**: Updated to the latest SDK module versions + # v1.17.10 (2022-10-24) * **Dependency Update**: Updated to the latest SDK module versions diff --git a/vendor/github.com/aws/aws-sdk-go-v2/config/go_module_metadata.go b/vendor/github.com/aws/aws-sdk-go-v2/config/go_module_metadata.go index ec9c03d27..65864ef61 100644 --- a/vendor/github.com/aws/aws-sdk-go-v2/config/go_module_metadata.go +++ b/vendor/github.com/aws/aws-sdk-go-v2/config/go_module_metadata.go @@ -3,4 +3,4 @@ package config // goModuleVersion is the tagged release for this module -const goModuleVersion = "1.17.10" +const goModuleVersion = "1.18.1" diff --git a/vendor/github.com/aws/aws-sdk-go-v2/config/resolve_bearer_token.go b/vendor/github.com/aws/aws-sdk-go-v2/config/resolve_bearer_token.go index ae5fb27bd..a8ebb3c0a 100644 --- a/vendor/github.com/aws/aws-sdk-go-v2/config/resolve_bearer_token.go +++ b/vendor/github.com/aws/aws-sdk-go-v2/config/resolve_bearer_token.go @@ -54,20 +54,9 @@ func resolveBearerAuthTokenProviderChain(ctx context.Context, cfg *aws.Config, c var provider smithybearer.TokenProvider - if sharedConfig.SSOSession != nil || (sharedConfig.SSORegion != "" && sharedConfig.SSOStartURL != "") { - ssoSession := sharedConfig.SSOSession - if ssoSession == nil { - // Fallback to legacy SSO session config parameters, if the - // sso-session section wasn't used. - ssoSession = &SSOSession{ - Name: sharedConfig.SSOStartURL, - SSORegion: sharedConfig.SSORegion, - SSOStartURL: sharedConfig.SSOStartURL, - } - } - + if sharedConfig.SSOSession != nil { provider, err = resolveBearerAuthSSOTokenProvider( - ctx, cfg, ssoSession, configs) + ctx, cfg, sharedConfig.SSOSession, configs) } if err == nil && provider != nil { diff --git a/vendor/github.com/aws/aws-sdk-go-v2/config/resolve_credentials.go b/vendor/github.com/aws/aws-sdk-go-v2/config/resolve_credentials.go index 28705f47f..1bb6addf3 100644 --- a/vendor/github.com/aws/aws-sdk-go-v2/config/resolve_credentials.go +++ b/vendor/github.com/aws/aws-sdk-go-v2/config/resolve_credentials.go @@ -15,6 +15,7 @@ import ( "github.com/aws/aws-sdk-go-v2/credentials/stscreds" "github.com/aws/aws-sdk-go-v2/feature/ec2/imds" "github.com/aws/aws-sdk-go-v2/service/sso" + "github.com/aws/aws-sdk-go-v2/service/ssooidc" "github.com/aws/aws-sdk-go-v2/service/sts" ) @@ -171,7 +172,30 @@ func resolveSSOCredentials(ctx context.Context, cfg *aws.Config, sharedConfig *S } cfgCopy := cfg.Copy() - cfgCopy.Region = sharedConfig.SSORegion + + if sharedConfig.SSOSession != nil { + ssoTokenProviderOptionsFn, found, err := getSSOTokenProviderOptions(ctx, configs) + if err != nil { + return fmt.Errorf("failed to get SSOTokenProviderOptions from config sources, %w", err) + } + var optFns []func(*ssocreds.SSOTokenProviderOptions) + if found { + optFns = append(optFns, ssoTokenProviderOptionsFn) + } + cfgCopy.Region = sharedConfig.SSOSession.SSORegion + cachedPath, err := ssocreds.StandardCachedTokenFilepath(sharedConfig.SSOSession.Name) + if err != nil { + return err + } + oidcClient := ssooidc.NewFromConfig(cfgCopy) + tokenProvider := ssocreds.NewSSOTokenProvider(oidcClient, cachedPath, optFns...) + options = append(options, func(o *ssocreds.Options) { + o.SSOTokenProvider = tokenProvider + o.CachedTokenFilepath = cachedPath + }) + } else { + cfgCopy.Region = sharedConfig.SSORegion + } cfg.Credentials = ssocreds.New(sso.NewFromConfig(cfgCopy), sharedConfig.SSOAccountID, sharedConfig.SSORoleName, sharedConfig.SSOStartURL, options...) diff --git a/vendor/github.com/aws/aws-sdk-go-v2/config/shared_config.go b/vendor/github.com/aws/aws-sdk-go-v2/config/shared_config.go index 48aa7a8cf..c23ca9a26 100644 --- a/vendor/github.com/aws/aws-sdk-go-v2/config/shared_config.go +++ b/vendor/github.com/aws/aws-sdk-go-v2/config/shared_config.go @@ -142,18 +142,10 @@ type SSOSession struct { SSOStartURL string } -func (s *SSOSession) setFromIniSection(section ini.Section) error { +func (s *SSOSession) setFromIniSection(section ini.Section) { + updateString(&s.Name, section, ssoSessionNameKey) updateString(&s.SSORegion, section, ssoRegionKey) updateString(&s.SSOStartURL, section, ssoStartURLKey) - - if s.SSORegion == "" || s.SSOStartURL == "" { - return fmt.Errorf( - "%v and %v are required parameters in sso-session section", - ssoRegionKey, ssoStartURLKey, - ) - } - - return nil } // SharedConfig represents the configuration fields of the SDK config files. @@ -846,9 +838,8 @@ func (c *SharedConfig) setFromIniSections(profiles map[string]struct{}, profile // profile only have credential provider options. c.clearAssumeRoleOptions() } else { - // First time a profile has been seen, It must either be a assume role - // credentials, or SSO. Assert if the credential type requires a role ARN, - // the ARN is also set, or validate that the SSO configuration is complete. + // First time a profile has been seen. Assert if the credential type + // requires a role ARN, the ARN is also set if err := c.validateCredentialsConfig(profile); err != nil { return err } @@ -900,31 +891,20 @@ func (c *SharedConfig) setFromIniSections(profiles map[string]struct{}, profile // as a section in the config file. Load the SSO session using the name // provided. If the session section is not found or incomplete an error // will be returned. - if c.SSOSessionName != "" { - c.SSOSession, err = getSSOSession(c.SSOSessionName, sections, logger) - if err != nil { - return err + if c.hasSSOTokenProviderConfiguration() { + section, ok := sections.GetSection(ssoSectionPrefix + strings.TrimSpace(c.SSOSessionName)) + if !ok { + return fmt.Errorf("failed to find SSO session section, %v", c.SSOSessionName) } + var ssoSession SSOSession + ssoSession.setFromIniSection(section) + ssoSession.Name = c.SSOSessionName + c.SSOSession = &ssoSession } return nil } -func getSSOSession(name string, sections ini.Sections, logger logging.Logger) (*SSOSession, error) { - section, ok := sections.GetSection(ssoSectionPrefix + strings.TrimSpace(name)) - if !ok { - return nil, fmt.Errorf("failed to find SSO session section, %v", name) - } - - var ssoSession SSOSession - if err := ssoSession.setFromIniSection(section); err != nil { - return nil, fmt.Errorf("failed to load SSO session %v, %w", name, err) - } - ssoSession.Name = name - - return &ssoSession, nil -} - // setFromIniSection loads the configuration from the profile section defined in // the provided INI file. A SharedConfig pointer type value is used so that // multiple config file loadings can be chained. @@ -1088,17 +1068,66 @@ func (c *SharedConfig) validateCredentialType() error { len(c.CredentialProcess) != 0, len(c.WebIdentityTokenFile) != 0, ) { - return fmt.Errorf("only one credential type may be specified per profile: source profile, credential source, credential process, web identity token, or sso") + return fmt.Errorf("only one credential type may be specified per profile: source profile, credential source, credential process, web identity token") } return nil } func (c *SharedConfig) validateSSOConfiguration() error { - if !c.hasSSOConfiguration() { + if c.hasSSOTokenProviderConfiguration() { + err := c.validateSSOTokenProviderConfiguration() + if err != nil { + return err + } return nil } + if c.hasLegacySSOConfiguration() { + err := c.validateLegacySSOConfiguration() + if err != nil { + return err + } + } + return nil +} + +func (c *SharedConfig) validateSSOTokenProviderConfiguration() error { + var missing []string + + if len(c.SSOSessionName) == 0 { + missing = append(missing, ssoSessionNameKey) + } + + if c.SSOSession == nil { + missing = append(missing, ssoSectionPrefix) + } else { + if len(c.SSOSession.SSORegion) == 0 { + missing = append(missing, ssoRegionKey) + } + + if len(c.SSOSession.SSOStartURL) == 0 { + missing = append(missing, ssoStartURLKey) + } + } + + if len(missing) > 0 { + return fmt.Errorf("profile %q is configured to use SSO but is missing required configuration: %s", + c.Profile, strings.Join(missing, ", ")) + } + + if len(c.SSORegion) > 0 && c.SSORegion != c.SSOSession.SSORegion { + return fmt.Errorf("%s in profile %q must match %s in %s", ssoRegionKey, c.Profile, ssoRegionKey, ssoSectionPrefix) + } + + if len(c.SSOStartURL) > 0 && c.SSOStartURL != c.SSOSession.SSOStartURL { + return fmt.Errorf("%s in profile %q must match %s in %s", ssoStartURLKey, c.Profile, ssoStartURLKey, ssoSectionPrefix) + } + + return nil +} + +func (c *SharedConfig) validateLegacySSOConfiguration() error { var missing []string if len(c.SSORegion) == 0 { @@ -1109,11 +1138,18 @@ func (c *SharedConfig) validateSSOConfiguration() error { missing = append(missing, ssoStartURLKey) } + if len(c.SSOAccountID) == 0 { + missing = append(missing, ssoAccountIDKey) + } + + if len(c.SSORoleName) == 0 { + missing = append(missing, ssoRoleNameKey) + } + if len(missing) > 0 { return fmt.Errorf("profile %q is configured to use SSO but is missing required configuration: %s", c.Profile, strings.Join(missing, ", ")) } - return nil } @@ -1133,15 +1169,15 @@ func (c *SharedConfig) hasCredentials() bool { } func (c *SharedConfig) hasSSOConfiguration() bool { - switch { - case len(c.SSOAccountID) != 0: - case len(c.SSORegion) != 0: - case len(c.SSORoleName) != 0: - case len(c.SSOStartURL) != 0: - default: - return false - } - return true + return c.hasSSOTokenProviderConfiguration() || c.hasLegacySSOConfiguration() +} + +func (c *SharedConfig) hasSSOTokenProviderConfiguration() bool { + return len(c.SSOSessionName) > 0 +} + +func (c *SharedConfig) hasLegacySSOConfiguration() bool { + return len(c.SSORegion) > 0 || len(c.SSOAccountID) > 0 || len(c.SSOStartURL) > 0 || len(c.SSORoleName) > 0 } func (c *SharedConfig) clearAssumeRoleOptions() { diff --git a/vendor/github.com/aws/aws-sdk-go-v2/credentials/CHANGELOG.md b/vendor/github.com/aws/aws-sdk-go-v2/credentials/CHANGELOG.md index 917f5ef47..0e3450eec 100644 --- a/vendor/github.com/aws/aws-sdk-go-v2/credentials/CHANGELOG.md +++ b/vendor/github.com/aws/aws-sdk-go-v2/credentials/CHANGELOG.md @@ -1,3 +1,16 @@ +# v1.13.1 (2022-11-16) + +* **Dependency Update**: Updated to the latest SDK module versions + +# v1.13.0 (2022-11-11) + +* **Announcement**: When using the SSOTokenProvider, a previous implementation incorrectly compensated for invalid SSOTokenProvider configurations in the shared profile. This has been fixed via PR #1903 and tracked in issue #1846 +* **Feature**: Adds token refresh support (via SSOTokenProvider) when using the SSOCredentialProvider + +# v1.12.24 (2022-11-10) + +* **Dependency Update**: Updated to the latest SDK module versions + # v1.12.23 (2022-10-24) * **Dependency Update**: Updated to the latest SDK module versions diff --git a/vendor/github.com/aws/aws-sdk-go-v2/credentials/go_module_metadata.go b/vendor/github.com/aws/aws-sdk-go-v2/credentials/go_module_metadata.go index e756a2db6..19296d1e3 100644 --- a/vendor/github.com/aws/aws-sdk-go-v2/credentials/go_module_metadata.go +++ b/vendor/github.com/aws/aws-sdk-go-v2/credentials/go_module_metadata.go @@ -3,4 +3,4 @@ package credentials // goModuleVersion is the tagged release for this module -const goModuleVersion = "1.12.23" +const goModuleVersion = "1.13.1" diff --git a/vendor/github.com/aws/aws-sdk-go-v2/credentials/ssocreds/sso_credentials_provider.go b/vendor/github.com/aws/aws-sdk-go-v2/credentials/ssocreds/sso_credentials_provider.go index bd7603bbc..b3cf7853e 100644 --- a/vendor/github.com/aws/aws-sdk-go-v2/credentials/ssocreds/sso_credentials_provider.go +++ b/vendor/github.com/aws/aws-sdk-go-v2/credentials/ssocreds/sso_credentials_provider.go @@ -45,6 +45,10 @@ type Options struct { // If custom cached token filepath is used, the Provider's startUrl // parameter will be ignored. CachedTokenFilepath string + + // Used by the SSOCredentialProvider if a token configuration + // profile is used in the shared config + SSOTokenProvider *SSOTokenProvider } // Provider is an AWS credential provider that retrieves temporary AWS @@ -78,27 +82,39 @@ func New(client GetRoleCredentialsAPIClient, accountID, roleName, startURL strin // Retrieve retrieves temporary AWS credentials from the configured Amazon // Single Sign-On (AWS SSO) user portal by exchanging the accessToken present -// in ~/.aws/sso/cache. +// in ~/.aws/sso/cache. However, if a token provider configuration exists +// in the shared config, then we ought to use the token provider rather then +// direct access on the cached token. func (p *Provider) Retrieve(ctx context.Context) (aws.Credentials, error) { - if p.cachedTokenFilepath == "" { - cachedTokenFilepath, err := StandardCachedTokenFilepath(p.options.StartURL) + var accessToken *string + if p.options.SSOTokenProvider != nil { + token, err := p.options.SSOTokenProvider.RetrieveBearerToken(ctx) + if err != nil { + return aws.Credentials{}, err + } + accessToken = &token.Value + } else { + if p.cachedTokenFilepath == "" { + cachedTokenFilepath, err := StandardCachedTokenFilepath(p.options.StartURL) + if err != nil { + return aws.Credentials{}, &InvalidTokenError{Err: err} + } + p.cachedTokenFilepath = cachedTokenFilepath + } + + tokenFile, err := loadCachedToken(p.cachedTokenFilepath) if err != nil { return aws.Credentials{}, &InvalidTokenError{Err: err} } - p.cachedTokenFilepath = cachedTokenFilepath - } - tokenFile, err := loadCachedToken(p.cachedTokenFilepath) - if err != nil { - return aws.Credentials{}, &InvalidTokenError{Err: err} - } - - if tokenFile.ExpiresAt == nil || sdk.NowTime().After(time.Time(*tokenFile.ExpiresAt)) { - return aws.Credentials{}, &InvalidTokenError{} + if tokenFile.ExpiresAt == nil || sdk.NowTime().After(time.Time(*tokenFile.ExpiresAt)) { + return aws.Credentials{}, &InvalidTokenError{} + } + accessToken = &tokenFile.AccessToken } output, err := p.options.Client.GetRoleCredentials(ctx, &sso.GetRoleCredentialsInput{ - AccessToken: &tokenFile.AccessToken, + AccessToken: accessToken, AccountId: &p.options.AccountID, RoleName: &p.options.RoleName, }) diff --git a/vendor/github.com/aws/aws-sdk-go-v2/feature/s3/manager/CHANGELOG.md b/vendor/github.com/aws/aws-sdk-go-v2/feature/s3/manager/CHANGELOG.md index 32f92ffdd..4dfb5d672 100644 --- a/vendor/github.com/aws/aws-sdk-go-v2/feature/s3/manager/CHANGELOG.md +++ b/vendor/github.com/aws/aws-sdk-go-v2/feature/s3/manager/CHANGELOG.md @@ -1,3 +1,15 @@ +# v1.11.40 (2022-11-16) + +* **Dependency Update**: Updated to the latest SDK module versions + +# v1.11.39 (2022-11-11) + +* **Dependency Update**: Updated to the latest SDK module versions + +# v1.11.38 (2022-11-10) + +* **Dependency Update**: Updated to the latest SDK module versions + # v1.11.37 (2022-10-24) * **Dependency Update**: Updated to the latest SDK module versions diff --git a/vendor/github.com/aws/aws-sdk-go-v2/feature/s3/manager/go_module_metadata.go b/vendor/github.com/aws/aws-sdk-go-v2/feature/s3/manager/go_module_metadata.go index 830a7ce83..e5d6e1b6a 100644 --- a/vendor/github.com/aws/aws-sdk-go-v2/feature/s3/manager/go_module_metadata.go +++ b/vendor/github.com/aws/aws-sdk-go-v2/feature/s3/manager/go_module_metadata.go @@ -3,4 +3,4 @@ package manager // goModuleVersion is the tagged release for this module -const goModuleVersion = "1.11.37" +const goModuleVersion = "1.11.40" diff --git a/vendor/github.com/aws/aws-sdk-go-v2/service/s3/CHANGELOG.md b/vendor/github.com/aws/aws-sdk-go-v2/service/s3/CHANGELOG.md index f7703de70..210eb5140 100644 --- a/vendor/github.com/aws/aws-sdk-go-v2/service/s3/CHANGELOG.md +++ b/vendor/github.com/aws/aws-sdk-go-v2/service/s3/CHANGELOG.md @@ -1,3 +1,11 @@ +# v1.29.3 (2022-11-16) + +* No change notes available for this release. + +# v1.29.2 (2022-11-10) + +* No change notes available for this release. + # v1.29.1 (2022-10-24) * **Dependency Update**: Updated to the latest SDK module versions diff --git a/vendor/github.com/aws/aws-sdk-go-v2/service/s3/go_module_metadata.go b/vendor/github.com/aws/aws-sdk-go-v2/service/s3/go_module_metadata.go index 36709385a..0f03f0892 100644 --- a/vendor/github.com/aws/aws-sdk-go-v2/service/s3/go_module_metadata.go +++ b/vendor/github.com/aws/aws-sdk-go-v2/service/s3/go_module_metadata.go @@ -3,4 +3,4 @@ package s3 // goModuleVersion is the tagged release for this module -const goModuleVersion = "1.29.1" +const goModuleVersion = "1.29.3" diff --git a/vendor/github.com/aws/aws-sdk-go-v2/service/s3/internal/endpoints/endpoints.go b/vendor/github.com/aws/aws-sdk-go-v2/service/s3/internal/endpoints/endpoints.go index 4b8457ebf..c9e18369a 100644 --- a/vendor/github.com/aws/aws-sdk-go-v2/service/s3/internal/endpoints/endpoints.go +++ b/vendor/github.com/aws/aws-sdk-go-v2/service/s3/internal/endpoints/endpoints.go @@ -269,6 +269,15 @@ var defaultPartitions = endpoints.Partitions{ }: { Hostname: "s3.dualstack.eu-central-1.amazonaws.com", }, + endpoints.EndpointKey{ + Region: "eu-central-2", + }: endpoints.Endpoint{}, + endpoints.EndpointKey{ + Region: "eu-central-2", + Variant: endpoints.DualStackVariant, + }: { + Hostname: "s3.dualstack.eu-central-2.amazonaws.com", + }, endpoints.EndpointKey{ Region: "eu-north-1", }: endpoints.Endpoint{}, @@ -287,6 +296,15 @@ var defaultPartitions = endpoints.Partitions{ }: { Hostname: "s3.dualstack.eu-south-1.amazonaws.com", }, + endpoints.EndpointKey{ + Region: "eu-south-2", + }: endpoints.Endpoint{}, + endpoints.EndpointKey{ + Region: "eu-south-2", + Variant: endpoints.DualStackVariant, + }: { + Hostname: "s3.dualstack.eu-south-2.amazonaws.com", + }, endpoints.EndpointKey{ Region: "eu-west-1", }: endpoints.Endpoint{ diff --git a/vendor/github.com/aws/aws-sdk-go-v2/service/sts/CHANGELOG.md b/vendor/github.com/aws/aws-sdk-go-v2/service/sts/CHANGELOG.md index 86596c9f1..a2b23672e 100644 --- a/vendor/github.com/aws/aws-sdk-go-v2/service/sts/CHANGELOG.md +++ b/vendor/github.com/aws/aws-sdk-go-v2/service/sts/CHANGELOG.md @@ -1,3 +1,11 @@ +# v1.17.3 (2022-11-16) + +* No change notes available for this release. + +# v1.17.2 (2022-11-10) + +* No change notes available for this release. + # v1.17.1 (2022-10-24) * **Dependency Update**: Updated to the latest SDK module versions diff --git a/vendor/github.com/aws/aws-sdk-go-v2/service/sts/go_module_metadata.go b/vendor/github.com/aws/aws-sdk-go-v2/service/sts/go_module_metadata.go index 3bf8cc340..55d44802d 100644 --- a/vendor/github.com/aws/aws-sdk-go-v2/service/sts/go_module_metadata.go +++ b/vendor/github.com/aws/aws-sdk-go-v2/service/sts/go_module_metadata.go @@ -3,4 +3,4 @@ package sts // goModuleVersion is the tagged release for this module -const goModuleVersion = "1.17.1" +const goModuleVersion = "1.17.3" diff --git a/vendor/github.com/aws/aws-sdk-go-v2/service/sts/internal/endpoints/endpoints.go b/vendor/github.com/aws/aws-sdk-go-v2/service/sts/internal/endpoints/endpoints.go index d061a4e99..c3ec70ed2 100644 --- a/vendor/github.com/aws/aws-sdk-go-v2/service/sts/internal/endpoints/endpoints.go +++ b/vendor/github.com/aws/aws-sdk-go-v2/service/sts/internal/endpoints/endpoints.go @@ -176,12 +176,18 @@ var defaultPartitions = endpoints.Partitions{ endpoints.EndpointKey{ Region: "eu-central-1", }: endpoints.Endpoint{}, + endpoints.EndpointKey{ + Region: "eu-central-2", + }: endpoints.Endpoint{}, endpoints.EndpointKey{ Region: "eu-north-1", }: endpoints.Endpoint{}, endpoints.EndpointKey{ Region: "eu-south-1", }: endpoints.Endpoint{}, + endpoints.EndpointKey{ + Region: "eu-south-2", + }: endpoints.Endpoint{}, endpoints.EndpointKey{ Region: "eu-west-1", }: endpoints.Endpoint{}, diff --git a/vendor/github.com/rivo/uniseg/README.md b/vendor/github.com/rivo/uniseg/README.md index 7e3d12e79..25e934687 100644 --- a/vendor/github.com/rivo/uniseg/README.md +++ b/vendor/github.com/rivo/uniseg/README.md @@ -133,6 +133,13 @@ Similarly, use - [`FirstSentence`](https://pkg.go.dev/github.com/rivo/uniseg#FirstSentence) or [`FirstSentenceInString`](https://pkg.go.dev/github.com/rivo/uniseg#FirstSentenceInString) for sentence segmentation only, and - [`FirstLineSegment`](https://pkg.go.dev/github.com/rivo/uniseg#FirstLineSegment) or [`FirstLineSegmentInString`](https://pkg.go.dev/github.com/rivo/uniseg#FirstLineSegmentInString) for line breaking / word wrapping (although using [`Step`](https://pkg.go.dev/github.com/rivo/uniseg#Step) or [`StepString`](https://pkg.go.dev/github.com/rivo/uniseg#StepString) is preferred as it will observe grapheme cluster boundaries). +Finally, if you need to reverse a string while preserving grapheme clusters, use [`ReverseString`](https://pkg.go.dev/github.com/rivo/uniseg#ReverseString): + +```go +fmt.Println(uniseg.ReverseString("🇩🇪🏳️‍🌈")) +// 🏳️‍🌈🇩🇪 +``` + ## Documentation Refer to https://pkg.go.dev/github.com/rivo/uniseg for the package's documentation. diff --git a/vendor/github.com/rivo/uniseg/doc.go b/vendor/github.com/rivo/uniseg/doc.go index 0fc2d8b43..11224ae22 100644 --- a/vendor/github.com/rivo/uniseg/doc.go +++ b/vendor/github.com/rivo/uniseg/doc.go @@ -70,10 +70,10 @@ broken. Monospace width, as referred to in this package, is the width of a string in a monospace font. This is commonly used in terminal user interfaces or text displays or editors that don't support proportional fonts. A width of 1 -corresponds to a single character cell. The C function [wcwidth()] and its +corresponds to a single character cell. The C function [wcswidth()] and its implementation in other programming languages is in widespread use for the same purpose. However, there is no standard for the calculation of such widths, and -this package differs from wcwidth() in a number of ways, presumably to generate +this package differs from wcswidth() in a number of ways, presumably to generate more visually pleasing results. To start, we assume that every code point has a width of 1, with the following @@ -103,6 +103,6 @@ Note that whether these widths appear correct depends on your application's render engine, to which extent it conforms to the Unicode Standard, and its choice of font. -[wcwidth()]: https://man7.org/linux/man-pages/man3/wcwidth.3.html +[wcswidth()]: https://man7.org/linux/man-pages/man3/wcswidth.3.html */ package uniseg diff --git a/vendor/github.com/rivo/uniseg/grapheme.go b/vendor/github.com/rivo/uniseg/grapheme.go index 997abbefd..d5d4c09e5 100644 --- a/vendor/github.com/rivo/uniseg/grapheme.go +++ b/vendor/github.com/rivo/uniseg/grapheme.go @@ -163,6 +163,25 @@ func GraphemeClusterCount(s string) (n int) { return } +// ReverseString reverses the given string while observing grapheme cluster +// boundaries. +func ReverseString(s string) string { + str := []byte(s) + reversed := make([]byte, len(str)) + state := -1 + index := len(str) + for len(str) > 0 { + var cluster []byte + cluster, str, _, state = FirstGraphemeCluster(str, state) + index -= len(cluster) + copy(reversed[index:], cluster) + if index <= len(str)/2 { + break + } + } + return string(reversed) +} + // The number of bits the grapheme property must be shifted to make place for // grapheme states. const shiftGraphemePropState = 4 diff --git a/vendor/google.golang.org/genproto/googleapis/api/annotations/client.pb.go b/vendor/google.golang.org/genproto/googleapis/api/annotations/client.pb.go index 66fdb650f..ec7c602ec 100644 --- a/vendor/google.golang.org/genproto/googleapis/api/annotations/client.pb.go +++ b/vendor/google.golang.org/genproto/googleapis/api/annotations/client.pb.go @@ -15,17 +15,20 @@ // Code generated by protoc-gen-go. DO NOT EDIT. // versions: // protoc-gen-go v1.26.0 -// protoc v3.12.2 +// protoc v3.18.1 // source: google/api/client.proto package annotations import ( reflect "reflect" + sync "sync" + api "google.golang.org/genproto/googleapis/api" protoreflect "google.golang.org/protobuf/reflect/protoreflect" protoimpl "google.golang.org/protobuf/runtime/protoimpl" descriptorpb "google.golang.org/protobuf/types/descriptorpb" + durationpb "google.golang.org/protobuf/types/known/durationpb" ) const ( @@ -35,6 +38,1047 @@ const ( _ = protoimpl.EnforceVersion(protoimpl.MaxVersion - 20) ) +// The organization for which the client libraries are being published. +// Affects the url where generated docs are published, etc. +type ClientLibraryOrganization int32 + +const ( + // Not useful. + ClientLibraryOrganization_CLIENT_LIBRARY_ORGANIZATION_UNSPECIFIED ClientLibraryOrganization = 0 + // Google Cloud Platform Org. + ClientLibraryOrganization_CLOUD ClientLibraryOrganization = 1 + // Ads (Advertising) Org. + ClientLibraryOrganization_ADS ClientLibraryOrganization = 2 + // Photos Org. + ClientLibraryOrganization_PHOTOS ClientLibraryOrganization = 3 + // Street View Org. + ClientLibraryOrganization_STREET_VIEW ClientLibraryOrganization = 4 +) + +// Enum value maps for ClientLibraryOrganization. +var ( + ClientLibraryOrganization_name = map[int32]string{ + 0: "CLIENT_LIBRARY_ORGANIZATION_UNSPECIFIED", + 1: "CLOUD", + 2: "ADS", + 3: "PHOTOS", + 4: "STREET_VIEW", + } + ClientLibraryOrganization_value = map[string]int32{ + "CLIENT_LIBRARY_ORGANIZATION_UNSPECIFIED": 0, + "CLOUD": 1, + "ADS": 2, + "PHOTOS": 3, + "STREET_VIEW": 4, + } +) + +func (x ClientLibraryOrganization) Enum() *ClientLibraryOrganization { + p := new(ClientLibraryOrganization) + *p = x + return p +} + +func (x ClientLibraryOrganization) String() string { + return protoimpl.X.EnumStringOf(x.Descriptor(), protoreflect.EnumNumber(x)) +} + +func (ClientLibraryOrganization) Descriptor() protoreflect.EnumDescriptor { + return file_google_api_client_proto_enumTypes[0].Descriptor() +} + +func (ClientLibraryOrganization) Type() protoreflect.EnumType { + return &file_google_api_client_proto_enumTypes[0] +} + +func (x ClientLibraryOrganization) Number() protoreflect.EnumNumber { + return protoreflect.EnumNumber(x) +} + +// Deprecated: Use ClientLibraryOrganization.Descriptor instead. +func (ClientLibraryOrganization) EnumDescriptor() ([]byte, []int) { + return file_google_api_client_proto_rawDescGZIP(), []int{0} +} + +// To where should client libraries be published? +type ClientLibraryDestination int32 + +const ( + // Client libraries will neither be generated nor published to package + // managers. + ClientLibraryDestination_CLIENT_LIBRARY_DESTINATION_UNSPECIFIED ClientLibraryDestination = 0 + // Generate the client library in a repo under github.com/googleapis, + // but don't publish it to package managers. + ClientLibraryDestination_GITHUB ClientLibraryDestination = 10 + // Publish the library to package managers like nuget.org and npmjs.com. + ClientLibraryDestination_PACKAGE_MANAGER ClientLibraryDestination = 20 +) + +// Enum value maps for ClientLibraryDestination. +var ( + ClientLibraryDestination_name = map[int32]string{ + 0: "CLIENT_LIBRARY_DESTINATION_UNSPECIFIED", + 10: "GITHUB", + 20: "PACKAGE_MANAGER", + } + ClientLibraryDestination_value = map[string]int32{ + "CLIENT_LIBRARY_DESTINATION_UNSPECIFIED": 0, + "GITHUB": 10, + "PACKAGE_MANAGER": 20, + } +) + +func (x ClientLibraryDestination) Enum() *ClientLibraryDestination { + p := new(ClientLibraryDestination) + *p = x + return p +} + +func (x ClientLibraryDestination) String() string { + return protoimpl.X.EnumStringOf(x.Descriptor(), protoreflect.EnumNumber(x)) +} + +func (ClientLibraryDestination) Descriptor() protoreflect.EnumDescriptor { + return file_google_api_client_proto_enumTypes[1].Descriptor() +} + +func (ClientLibraryDestination) Type() protoreflect.EnumType { + return &file_google_api_client_proto_enumTypes[1] +} + +func (x ClientLibraryDestination) Number() protoreflect.EnumNumber { + return protoreflect.EnumNumber(x) +} + +// Deprecated: Use ClientLibraryDestination.Descriptor instead. +func (ClientLibraryDestination) EnumDescriptor() ([]byte, []int) { + return file_google_api_client_proto_rawDescGZIP(), []int{1} +} + +// Required information for every language. +type CommonLanguageSettings struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + // Link to automatically generated reference documentation. Example: + // https://cloud.google.com/nodejs/docs/reference/asset/latest + ReferenceDocsUri string `protobuf:"bytes,1,opt,name=reference_docs_uri,json=referenceDocsUri,proto3" json:"reference_docs_uri,omitempty"` + // The destination where API teams want this client library to be published. + Destinations []ClientLibraryDestination `protobuf:"varint,2,rep,packed,name=destinations,proto3,enum=google.api.ClientLibraryDestination" json:"destinations,omitempty"` +} + +func (x *CommonLanguageSettings) Reset() { + *x = CommonLanguageSettings{} + if protoimpl.UnsafeEnabled { + mi := &file_google_api_client_proto_msgTypes[0] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *CommonLanguageSettings) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*CommonLanguageSettings) ProtoMessage() {} + +func (x *CommonLanguageSettings) ProtoReflect() protoreflect.Message { + mi := &file_google_api_client_proto_msgTypes[0] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use CommonLanguageSettings.ProtoReflect.Descriptor instead. +func (*CommonLanguageSettings) Descriptor() ([]byte, []int) { + return file_google_api_client_proto_rawDescGZIP(), []int{0} +} + +func (x *CommonLanguageSettings) GetReferenceDocsUri() string { + if x != nil { + return x.ReferenceDocsUri + } + return "" +} + +func (x *CommonLanguageSettings) GetDestinations() []ClientLibraryDestination { + if x != nil { + return x.Destinations + } + return nil +} + +// Details about how and where to publish client libraries. +type ClientLibrarySettings struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + // Version of the API to apply these settings to. + Version string `protobuf:"bytes,1,opt,name=version,proto3" json:"version,omitempty"` + // Launch stage of this version of the API. + LaunchStage api.LaunchStage `protobuf:"varint,2,opt,name=launch_stage,json=launchStage,proto3,enum=google.api.LaunchStage" json:"launch_stage,omitempty"` + // When using transport=rest, the client request will encode enums as + // numbers rather than strings. + RestNumericEnums bool `protobuf:"varint,3,opt,name=rest_numeric_enums,json=restNumericEnums,proto3" json:"rest_numeric_enums,omitempty"` + // Settings for legacy Java features, supported in the Service YAML. + JavaSettings *JavaSettings `protobuf:"bytes,21,opt,name=java_settings,json=javaSettings,proto3" json:"java_settings,omitempty"` + // Settings for C++ client libraries. + CppSettings *CppSettings `protobuf:"bytes,22,opt,name=cpp_settings,json=cppSettings,proto3" json:"cpp_settings,omitempty"` + // Settings for PHP client libraries. + PhpSettings *PhpSettings `protobuf:"bytes,23,opt,name=php_settings,json=phpSettings,proto3" json:"php_settings,omitempty"` + // Settings for Python client libraries. + PythonSettings *PythonSettings `protobuf:"bytes,24,opt,name=python_settings,json=pythonSettings,proto3" json:"python_settings,omitempty"` + // Settings for Node client libraries. + NodeSettings *NodeSettings `protobuf:"bytes,25,opt,name=node_settings,json=nodeSettings,proto3" json:"node_settings,omitempty"` + // Settings for .NET client libraries. + DotnetSettings *DotnetSettings `protobuf:"bytes,26,opt,name=dotnet_settings,json=dotnetSettings,proto3" json:"dotnet_settings,omitempty"` + // Settings for Ruby client libraries. + RubySettings *RubySettings `protobuf:"bytes,27,opt,name=ruby_settings,json=rubySettings,proto3" json:"ruby_settings,omitempty"` + // Settings for Go client libraries. + GoSettings *GoSettings `protobuf:"bytes,28,opt,name=go_settings,json=goSettings,proto3" json:"go_settings,omitempty"` +} + +func (x *ClientLibrarySettings) Reset() { + *x = ClientLibrarySettings{} + if protoimpl.UnsafeEnabled { + mi := &file_google_api_client_proto_msgTypes[1] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *ClientLibrarySettings) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*ClientLibrarySettings) ProtoMessage() {} + +func (x *ClientLibrarySettings) ProtoReflect() protoreflect.Message { + mi := &file_google_api_client_proto_msgTypes[1] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use ClientLibrarySettings.ProtoReflect.Descriptor instead. +func (*ClientLibrarySettings) Descriptor() ([]byte, []int) { + return file_google_api_client_proto_rawDescGZIP(), []int{1} +} + +func (x *ClientLibrarySettings) GetVersion() string { + if x != nil { + return x.Version + } + return "" +} + +func (x *ClientLibrarySettings) GetLaunchStage() api.LaunchStage { + if x != nil { + return x.LaunchStage + } + return api.LaunchStage_LAUNCH_STAGE_UNSPECIFIED +} + +func (x *ClientLibrarySettings) GetRestNumericEnums() bool { + if x != nil { + return x.RestNumericEnums + } + return false +} + +func (x *ClientLibrarySettings) GetJavaSettings() *JavaSettings { + if x != nil { + return x.JavaSettings + } + return nil +} + +func (x *ClientLibrarySettings) GetCppSettings() *CppSettings { + if x != nil { + return x.CppSettings + } + return nil +} + +func (x *ClientLibrarySettings) GetPhpSettings() *PhpSettings { + if x != nil { + return x.PhpSettings + } + return nil +} + +func (x *ClientLibrarySettings) GetPythonSettings() *PythonSettings { + if x != nil { + return x.PythonSettings + } + return nil +} + +func (x *ClientLibrarySettings) GetNodeSettings() *NodeSettings { + if x != nil { + return x.NodeSettings + } + return nil +} + +func (x *ClientLibrarySettings) GetDotnetSettings() *DotnetSettings { + if x != nil { + return x.DotnetSettings + } + return nil +} + +func (x *ClientLibrarySettings) GetRubySettings() *RubySettings { + if x != nil { + return x.RubySettings + } + return nil +} + +func (x *ClientLibrarySettings) GetGoSettings() *GoSettings { + if x != nil { + return x.GoSettings + } + return nil +} + +// This message configures the settings for publishing [Google Cloud Client +// libraries](https://cloud.google.com/apis/docs/cloud-client-libraries) +// generated from the service config. +type Publishing struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + // A list of API method settings, e.g. the behavior for methods that use the + // long-running operation pattern. + MethodSettings []*MethodSettings `protobuf:"bytes,2,rep,name=method_settings,json=methodSettings,proto3" json:"method_settings,omitempty"` + // Link to a place that API users can report issues. Example: + // https://issuetracker.google.com/issues/new?component=190865&template=1161103 + NewIssueUri string `protobuf:"bytes,101,opt,name=new_issue_uri,json=newIssueUri,proto3" json:"new_issue_uri,omitempty"` + // Link to product home page. Example: + // https://cloud.google.com/asset-inventory/docs/overview + DocumentationUri string `protobuf:"bytes,102,opt,name=documentation_uri,json=documentationUri,proto3" json:"documentation_uri,omitempty"` + // Used as a tracking tag when collecting data about the APIs developer + // relations artifacts like docs, packages delivered to package managers, + // etc. Example: "speech". + ApiShortName string `protobuf:"bytes,103,opt,name=api_short_name,json=apiShortName,proto3" json:"api_short_name,omitempty"` + // GitHub label to apply to issues and pull requests opened for this API. + GithubLabel string `protobuf:"bytes,104,opt,name=github_label,json=githubLabel,proto3" json:"github_label,omitempty"` + // GitHub teams to be added to CODEOWNERS in the directory in GitHub + // containing source code for the client libraries for this API. + CodeownerGithubTeams []string `protobuf:"bytes,105,rep,name=codeowner_github_teams,json=codeownerGithubTeams,proto3" json:"codeowner_github_teams,omitempty"` + // A prefix used in sample code when demarking regions to be included in + // documentation. + DocTagPrefix string `protobuf:"bytes,106,opt,name=doc_tag_prefix,json=docTagPrefix,proto3" json:"doc_tag_prefix,omitempty"` + // For whom the client library is being published. + Organization ClientLibraryOrganization `protobuf:"varint,107,opt,name=organization,proto3,enum=google.api.ClientLibraryOrganization" json:"organization,omitempty"` + // Client library settings. If the same version string appears multiple + // times in this list, then the last one wins. Settings from earlier + // settings with the same version string are discarded. + LibrarySettings []*ClientLibrarySettings `protobuf:"bytes,109,rep,name=library_settings,json=librarySettings,proto3" json:"library_settings,omitempty"` +} + +func (x *Publishing) Reset() { + *x = Publishing{} + if protoimpl.UnsafeEnabled { + mi := &file_google_api_client_proto_msgTypes[2] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *Publishing) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*Publishing) ProtoMessage() {} + +func (x *Publishing) ProtoReflect() protoreflect.Message { + mi := &file_google_api_client_proto_msgTypes[2] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use Publishing.ProtoReflect.Descriptor instead. +func (*Publishing) Descriptor() ([]byte, []int) { + return file_google_api_client_proto_rawDescGZIP(), []int{2} +} + +func (x *Publishing) GetMethodSettings() []*MethodSettings { + if x != nil { + return x.MethodSettings + } + return nil +} + +func (x *Publishing) GetNewIssueUri() string { + if x != nil { + return x.NewIssueUri + } + return "" +} + +func (x *Publishing) GetDocumentationUri() string { + if x != nil { + return x.DocumentationUri + } + return "" +} + +func (x *Publishing) GetApiShortName() string { + if x != nil { + return x.ApiShortName + } + return "" +} + +func (x *Publishing) GetGithubLabel() string { + if x != nil { + return x.GithubLabel + } + return "" +} + +func (x *Publishing) GetCodeownerGithubTeams() []string { + if x != nil { + return x.CodeownerGithubTeams + } + return nil +} + +func (x *Publishing) GetDocTagPrefix() string { + if x != nil { + return x.DocTagPrefix + } + return "" +} + +func (x *Publishing) GetOrganization() ClientLibraryOrganization { + if x != nil { + return x.Organization + } + return ClientLibraryOrganization_CLIENT_LIBRARY_ORGANIZATION_UNSPECIFIED +} + +func (x *Publishing) GetLibrarySettings() []*ClientLibrarySettings { + if x != nil { + return x.LibrarySettings + } + return nil +} + +// Settings for Java client libraries. +type JavaSettings struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + // The package name to use in Java. Clobbers the java_package option + // set in the protobuf. This should be used **only** by APIs + // who have already set the language_settings.java.package_name" field + // in gapic.yaml. API teams should use the protobuf java_package option + // where possible. + // + // Example of a YAML configuration:: + // + // publishing: + // java_settings: + // library_package: com.google.cloud.pubsub.v1 + LibraryPackage string `protobuf:"bytes,1,opt,name=library_package,json=libraryPackage,proto3" json:"library_package,omitempty"` + // Configure the Java class name to use instead of the service's for its + // corresponding generated GAPIC client. Keys are fully-qualified + // service names as they appear in the protobuf (including the full + // the language_settings.java.interface_names" field in gapic.yaml. API + // teams should otherwise use the service name as it appears in the + // protobuf. + // + // Example of a YAML configuration:: + // + // publishing: + // java_settings: + // service_class_names: + // - google.pubsub.v1.Publisher: TopicAdmin + // - google.pubsub.v1.Subscriber: SubscriptionAdmin + ServiceClassNames map[string]string `protobuf:"bytes,2,rep,name=service_class_names,json=serviceClassNames,proto3" json:"service_class_names,omitempty" protobuf_key:"bytes,1,opt,name=key,proto3" protobuf_val:"bytes,2,opt,name=value,proto3"` + // Some settings. + Common *CommonLanguageSettings `protobuf:"bytes,3,opt,name=common,proto3" json:"common,omitempty"` +} + +func (x *JavaSettings) Reset() { + *x = JavaSettings{} + if protoimpl.UnsafeEnabled { + mi := &file_google_api_client_proto_msgTypes[3] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *JavaSettings) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*JavaSettings) ProtoMessage() {} + +func (x *JavaSettings) ProtoReflect() protoreflect.Message { + mi := &file_google_api_client_proto_msgTypes[3] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use JavaSettings.ProtoReflect.Descriptor instead. +func (*JavaSettings) Descriptor() ([]byte, []int) { + return file_google_api_client_proto_rawDescGZIP(), []int{3} +} + +func (x *JavaSettings) GetLibraryPackage() string { + if x != nil { + return x.LibraryPackage + } + return "" +} + +func (x *JavaSettings) GetServiceClassNames() map[string]string { + if x != nil { + return x.ServiceClassNames + } + return nil +} + +func (x *JavaSettings) GetCommon() *CommonLanguageSettings { + if x != nil { + return x.Common + } + return nil +} + +// Settings for C++ client libraries. +type CppSettings struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + // Some settings. + Common *CommonLanguageSettings `protobuf:"bytes,1,opt,name=common,proto3" json:"common,omitempty"` +} + +func (x *CppSettings) Reset() { + *x = CppSettings{} + if protoimpl.UnsafeEnabled { + mi := &file_google_api_client_proto_msgTypes[4] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *CppSettings) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*CppSettings) ProtoMessage() {} + +func (x *CppSettings) ProtoReflect() protoreflect.Message { + mi := &file_google_api_client_proto_msgTypes[4] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use CppSettings.ProtoReflect.Descriptor instead. +func (*CppSettings) Descriptor() ([]byte, []int) { + return file_google_api_client_proto_rawDescGZIP(), []int{4} +} + +func (x *CppSettings) GetCommon() *CommonLanguageSettings { + if x != nil { + return x.Common + } + return nil +} + +// Settings for Php client libraries. +type PhpSettings struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + // Some settings. + Common *CommonLanguageSettings `protobuf:"bytes,1,opt,name=common,proto3" json:"common,omitempty"` +} + +func (x *PhpSettings) Reset() { + *x = PhpSettings{} + if protoimpl.UnsafeEnabled { + mi := &file_google_api_client_proto_msgTypes[5] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *PhpSettings) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*PhpSettings) ProtoMessage() {} + +func (x *PhpSettings) ProtoReflect() protoreflect.Message { + mi := &file_google_api_client_proto_msgTypes[5] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use PhpSettings.ProtoReflect.Descriptor instead. +func (*PhpSettings) Descriptor() ([]byte, []int) { + return file_google_api_client_proto_rawDescGZIP(), []int{5} +} + +func (x *PhpSettings) GetCommon() *CommonLanguageSettings { + if x != nil { + return x.Common + } + return nil +} + +// Settings for Python client libraries. +type PythonSettings struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + // Some settings. + Common *CommonLanguageSettings `protobuf:"bytes,1,opt,name=common,proto3" json:"common,omitempty"` +} + +func (x *PythonSettings) Reset() { + *x = PythonSettings{} + if protoimpl.UnsafeEnabled { + mi := &file_google_api_client_proto_msgTypes[6] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *PythonSettings) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*PythonSettings) ProtoMessage() {} + +func (x *PythonSettings) ProtoReflect() protoreflect.Message { + mi := &file_google_api_client_proto_msgTypes[6] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use PythonSettings.ProtoReflect.Descriptor instead. +func (*PythonSettings) Descriptor() ([]byte, []int) { + return file_google_api_client_proto_rawDescGZIP(), []int{6} +} + +func (x *PythonSettings) GetCommon() *CommonLanguageSettings { + if x != nil { + return x.Common + } + return nil +} + +// Settings for Node client libraries. +type NodeSettings struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + // Some settings. + Common *CommonLanguageSettings `protobuf:"bytes,1,opt,name=common,proto3" json:"common,omitempty"` +} + +func (x *NodeSettings) Reset() { + *x = NodeSettings{} + if protoimpl.UnsafeEnabled { + mi := &file_google_api_client_proto_msgTypes[7] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *NodeSettings) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*NodeSettings) ProtoMessage() {} + +func (x *NodeSettings) ProtoReflect() protoreflect.Message { + mi := &file_google_api_client_proto_msgTypes[7] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use NodeSettings.ProtoReflect.Descriptor instead. +func (*NodeSettings) Descriptor() ([]byte, []int) { + return file_google_api_client_proto_rawDescGZIP(), []int{7} +} + +func (x *NodeSettings) GetCommon() *CommonLanguageSettings { + if x != nil { + return x.Common + } + return nil +} + +// Settings for Dotnet client libraries. +type DotnetSettings struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + // Some settings. + Common *CommonLanguageSettings `protobuf:"bytes,1,opt,name=common,proto3" json:"common,omitempty"` +} + +func (x *DotnetSettings) Reset() { + *x = DotnetSettings{} + if protoimpl.UnsafeEnabled { + mi := &file_google_api_client_proto_msgTypes[8] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *DotnetSettings) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*DotnetSettings) ProtoMessage() {} + +func (x *DotnetSettings) ProtoReflect() protoreflect.Message { + mi := &file_google_api_client_proto_msgTypes[8] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use DotnetSettings.ProtoReflect.Descriptor instead. +func (*DotnetSettings) Descriptor() ([]byte, []int) { + return file_google_api_client_proto_rawDescGZIP(), []int{8} +} + +func (x *DotnetSettings) GetCommon() *CommonLanguageSettings { + if x != nil { + return x.Common + } + return nil +} + +// Settings for Ruby client libraries. +type RubySettings struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + // Some settings. + Common *CommonLanguageSettings `protobuf:"bytes,1,opt,name=common,proto3" json:"common,omitempty"` +} + +func (x *RubySettings) Reset() { + *x = RubySettings{} + if protoimpl.UnsafeEnabled { + mi := &file_google_api_client_proto_msgTypes[9] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *RubySettings) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*RubySettings) ProtoMessage() {} + +func (x *RubySettings) ProtoReflect() protoreflect.Message { + mi := &file_google_api_client_proto_msgTypes[9] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use RubySettings.ProtoReflect.Descriptor instead. +func (*RubySettings) Descriptor() ([]byte, []int) { + return file_google_api_client_proto_rawDescGZIP(), []int{9} +} + +func (x *RubySettings) GetCommon() *CommonLanguageSettings { + if x != nil { + return x.Common + } + return nil +} + +// Settings for Go client libraries. +type GoSettings struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + // Some settings. + Common *CommonLanguageSettings `protobuf:"bytes,1,opt,name=common,proto3" json:"common,omitempty"` +} + +func (x *GoSettings) Reset() { + *x = GoSettings{} + if protoimpl.UnsafeEnabled { + mi := &file_google_api_client_proto_msgTypes[10] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *GoSettings) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*GoSettings) ProtoMessage() {} + +func (x *GoSettings) ProtoReflect() protoreflect.Message { + mi := &file_google_api_client_proto_msgTypes[10] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use GoSettings.ProtoReflect.Descriptor instead. +func (*GoSettings) Descriptor() ([]byte, []int) { + return file_google_api_client_proto_rawDescGZIP(), []int{10} +} + +func (x *GoSettings) GetCommon() *CommonLanguageSettings { + if x != nil { + return x.Common + } + return nil +} + +// Describes the generator configuration for a method. +type MethodSettings struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + // The fully qualified name of the method, for which the options below apply. + // This is used to find the method to apply the options. + Selector string `protobuf:"bytes,1,opt,name=selector,proto3" json:"selector,omitempty"` + // Describes settings to use for long-running operations when generating + // API methods for RPCs. Complements RPCs that use the annotations in + // google/longrunning/operations.proto. + // + // Example of a YAML configuration:: + // + // publishing: + // method_behavior: + // - selector: CreateAdDomain + // long_running: + // initial_poll_delay: + // seconds: 60 # 1 minute + // poll_delay_multiplier: 1.5 + // max_poll_delay: + // seconds: 360 # 6 minutes + // total_poll_timeout: + // seconds: 54000 # 90 minutes + LongRunning *MethodSettings_LongRunning `protobuf:"bytes,2,opt,name=long_running,json=longRunning,proto3" json:"long_running,omitempty"` +} + +func (x *MethodSettings) Reset() { + *x = MethodSettings{} + if protoimpl.UnsafeEnabled { + mi := &file_google_api_client_proto_msgTypes[11] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *MethodSettings) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*MethodSettings) ProtoMessage() {} + +func (x *MethodSettings) ProtoReflect() protoreflect.Message { + mi := &file_google_api_client_proto_msgTypes[11] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use MethodSettings.ProtoReflect.Descriptor instead. +func (*MethodSettings) Descriptor() ([]byte, []int) { + return file_google_api_client_proto_rawDescGZIP(), []int{11} +} + +func (x *MethodSettings) GetSelector() string { + if x != nil { + return x.Selector + } + return "" +} + +func (x *MethodSettings) GetLongRunning() *MethodSettings_LongRunning { + if x != nil { + return x.LongRunning + } + return nil +} + +// Describes settings to use when generating API methods that use the +// long-running operation pattern. +// All default values below are from those used in the client library +// generators (e.g. +// [Java](https://github.com/googleapis/gapic-generator-java/blob/04c2faa191a9b5a10b92392fe8482279c4404803/src/main/java/com/google/api/generator/gapic/composer/common/RetrySettingsComposer.java)). +type MethodSettings_LongRunning struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + // Initial delay after which the first poll request will be made. + // Default value: 5 seconds. + InitialPollDelay *durationpb.Duration `protobuf:"bytes,1,opt,name=initial_poll_delay,json=initialPollDelay,proto3" json:"initial_poll_delay,omitempty"` + // Multiplier to gradually increase delay between subsequent polls until it + // reaches max_poll_delay. + // Default value: 1.5. + PollDelayMultiplier float32 `protobuf:"fixed32,2,opt,name=poll_delay_multiplier,json=pollDelayMultiplier,proto3" json:"poll_delay_multiplier,omitempty"` + // Maximum time between two subsequent poll requests. + // Default value: 45 seconds. + MaxPollDelay *durationpb.Duration `protobuf:"bytes,3,opt,name=max_poll_delay,json=maxPollDelay,proto3" json:"max_poll_delay,omitempty"` + // Total polling timeout. + // Default value: 5 minutes. + TotalPollTimeout *durationpb.Duration `protobuf:"bytes,4,opt,name=total_poll_timeout,json=totalPollTimeout,proto3" json:"total_poll_timeout,omitempty"` +} + +func (x *MethodSettings_LongRunning) Reset() { + *x = MethodSettings_LongRunning{} + if protoimpl.UnsafeEnabled { + mi := &file_google_api_client_proto_msgTypes[13] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *MethodSettings_LongRunning) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*MethodSettings_LongRunning) ProtoMessage() {} + +func (x *MethodSettings_LongRunning) ProtoReflect() protoreflect.Message { + mi := &file_google_api_client_proto_msgTypes[13] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use MethodSettings_LongRunning.ProtoReflect.Descriptor instead. +func (*MethodSettings_LongRunning) Descriptor() ([]byte, []int) { + return file_google_api_client_proto_rawDescGZIP(), []int{11, 0} +} + +func (x *MethodSettings_LongRunning) GetInitialPollDelay() *durationpb.Duration { + if x != nil { + return x.InitialPollDelay + } + return nil +} + +func (x *MethodSettings_LongRunning) GetPollDelayMultiplier() float32 { + if x != nil { + return x.PollDelayMultiplier + } + return 0 +} + +func (x *MethodSettings_LongRunning) GetMaxPollDelay() *durationpb.Duration { + if x != nil { + return x.MaxPollDelay + } + return nil +} + +func (x *MethodSettings_LongRunning) GetTotalPollTimeout() *durationpb.Duration { + if x != nil { + return x.TotalPollTimeout + } + return nil +} + var file_google_api_client_proto_extTypes = []protoimpl.ExtensionInfo{ { ExtendedType: (*descriptorpb.MethodOptions)(nil), @@ -78,26 +1122,26 @@ var ( // // For example, the proto RPC and annotation: // - // rpc CreateSubscription(CreateSubscriptionRequest) - // returns (Subscription) { - // option (google.api.method_signature) = "name,topic"; - // } + // rpc CreateSubscription(CreateSubscriptionRequest) + // returns (Subscription) { + // option (google.api.method_signature) = "name,topic"; + // } // // Would add the following Java overload (in addition to the method accepting // the request object): // - // public final Subscription createSubscription(String name, String topic) + // public final Subscription createSubscription(String name, String topic) // // The following backwards-compatibility guidelines apply: // - // * Adding this annotation to an unannotated method is backwards + // - Adding this annotation to an unannotated method is backwards // compatible. - // * Adding this annotation to a method which already has existing + // - Adding this annotation to a method which already has existing // method signature annotations is backwards compatible if and only if // the new method signature annotation is last in the sequence. - // * Modifying or removing an existing method signature annotation is + // - Modifying or removing an existing method signature annotation is // a breaking change. - // * Re-ordering existing method signature annotations is a breaking + // - Re-ordering existing method signature annotations is a breaking // change. // // repeated string method_signature = 1051; @@ -111,10 +1155,10 @@ var ( // // Example: // - // service Foo { - // option (google.api.default_host) = "foo.googleapi.com"; - // ... - // } + // service Foo { + // option (google.api.default_host) = "foo.googleapi.com"; + // ... + // } // // optional string default_host = 1049; E_DefaultHost = &file_google_api_client_proto_extTypes[1] @@ -122,22 +1166,22 @@ var ( // // Example: // - // service Foo { - // option (google.api.oauth_scopes) = \ - // "https://www.googleapis.com/auth/cloud-platform"; - // ... - // } + // service Foo { + // option (google.api.oauth_scopes) = \ + // "https://www.googleapis.com/auth/cloud-platform"; + // ... + // } // // If there is more than one scope, use a comma-separated string: // // Example: // - // service Foo { - // option (google.api.oauth_scopes) = \ - // "https://www.googleapis.com/auth/cloud-platform," - // "https://www.googleapis.com/auth/monitoring"; - // ... - // } + // service Foo { + // option (google.api.oauth_scopes) = \ + // "https://www.googleapis.com/auth/cloud-platform," + // "https://www.googleapis.com/auth/monitoring"; + // ... + // } // // optional string oauth_scopes = 1050; E_OauthScopes = &file_google_api_client_proto_extTypes[2] @@ -148,44 +1192,278 @@ var File_google_api_client_proto protoreflect.FileDescriptor var file_google_api_client_proto_rawDesc = []byte{ 0x0a, 0x17, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2f, 0x61, 0x70, 0x69, 0x2f, 0x63, 0x6c, 0x69, 0x65, 0x6e, 0x74, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x12, 0x0a, 0x67, 0x6f, 0x6f, 0x67, 0x6c, - 0x65, 0x2e, 0x61, 0x70, 0x69, 0x1a, 0x20, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2f, 0x70, 0x72, - 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2f, 0x64, 0x65, 0x73, 0x63, 0x72, 0x69, 0x70, 0x74, 0x6f, - 0x72, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x3a, 0x4a, 0x0a, 0x10, 0x6d, 0x65, 0x74, 0x68, 0x6f, - 0x64, 0x5f, 0x73, 0x69, 0x67, 0x6e, 0x61, 0x74, 0x75, 0x72, 0x65, 0x12, 0x1e, 0x2e, 0x67, 0x6f, - 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x4d, 0x65, - 0x74, 0x68, 0x6f, 0x64, 0x4f, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x18, 0x9b, 0x08, 0x20, 0x03, - 0x28, 0x09, 0x52, 0x0f, 0x6d, 0x65, 0x74, 0x68, 0x6f, 0x64, 0x53, 0x69, 0x67, 0x6e, 0x61, 0x74, - 0x75, 0x72, 0x65, 0x3a, 0x43, 0x0a, 0x0c, 0x64, 0x65, 0x66, 0x61, 0x75, 0x6c, 0x74, 0x5f, 0x68, - 0x6f, 0x73, 0x74, 0x12, 0x1f, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, - 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x53, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x4f, 0x70, 0x74, - 0x69, 0x6f, 0x6e, 0x73, 0x18, 0x99, 0x08, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0b, 0x64, 0x65, 0x66, - 0x61, 0x75, 0x6c, 0x74, 0x48, 0x6f, 0x73, 0x74, 0x3a, 0x43, 0x0a, 0x0c, 0x6f, 0x61, 0x75, 0x74, - 0x68, 0x5f, 0x73, 0x63, 0x6f, 0x70, 0x65, 0x73, 0x12, 0x1f, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, - 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x53, 0x65, 0x72, 0x76, 0x69, - 0x63, 0x65, 0x4f, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x18, 0x9a, 0x08, 0x20, 0x01, 0x28, 0x09, - 0x52, 0x0b, 0x6f, 0x61, 0x75, 0x74, 0x68, 0x53, 0x63, 0x6f, 0x70, 0x65, 0x73, 0x42, 0x69, 0x0a, - 0x0e, 0x63, 0x6f, 0x6d, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x61, 0x70, 0x69, 0x42, - 0x0b, 0x43, 0x6c, 0x69, 0x65, 0x6e, 0x74, 0x50, 0x72, 0x6f, 0x74, 0x6f, 0x50, 0x01, 0x5a, 0x41, - 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x67, 0x6f, 0x6c, 0x61, 0x6e, 0x67, 0x2e, 0x6f, 0x72, - 0x67, 0x2f, 0x67, 0x65, 0x6e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x2f, 0x67, 0x6f, 0x6f, 0x67, 0x6c, - 0x65, 0x61, 0x70, 0x69, 0x73, 0x2f, 0x61, 0x70, 0x69, 0x2f, 0x61, 0x6e, 0x6e, 0x6f, 0x74, 0x61, - 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x3b, 0x61, 0x6e, 0x6e, 0x6f, 0x74, 0x61, 0x74, 0x69, 0x6f, 0x6e, - 0x73, 0xa2, 0x02, 0x04, 0x47, 0x41, 0x50, 0x49, 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33, + 0x65, 0x2e, 0x61, 0x70, 0x69, 0x1a, 0x1d, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2f, 0x61, 0x70, + 0x69, 0x2f, 0x6c, 0x61, 0x75, 0x6e, 0x63, 0x68, 0x5f, 0x73, 0x74, 0x61, 0x67, 0x65, 0x2e, 0x70, + 0x72, 0x6f, 0x74, 0x6f, 0x1a, 0x20, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2f, 0x70, 0x72, 0x6f, + 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2f, 0x64, 0x65, 0x73, 0x63, 0x72, 0x69, 0x70, 0x74, 0x6f, 0x72, + 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x1a, 0x1e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2f, 0x70, + 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2f, 0x64, 0x75, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, + 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x22, 0x90, 0x01, 0x0a, 0x16, 0x43, 0x6f, 0x6d, 0x6d, 0x6f, + 0x6e, 0x4c, 0x61, 0x6e, 0x67, 0x75, 0x61, 0x67, 0x65, 0x53, 0x65, 0x74, 0x74, 0x69, 0x6e, 0x67, + 0x73, 0x12, 0x2c, 0x0a, 0x12, 0x72, 0x65, 0x66, 0x65, 0x72, 0x65, 0x6e, 0x63, 0x65, 0x5f, 0x64, + 0x6f, 0x63, 0x73, 0x5f, 0x75, 0x72, 0x69, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x10, 0x72, + 0x65, 0x66, 0x65, 0x72, 0x65, 0x6e, 0x63, 0x65, 0x44, 0x6f, 0x63, 0x73, 0x55, 0x72, 0x69, 0x12, + 0x48, 0x0a, 0x0c, 0x64, 0x65, 0x73, 0x74, 0x69, 0x6e, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x18, + 0x02, 0x20, 0x03, 0x28, 0x0e, 0x32, 0x24, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x61, + 0x70, 0x69, 0x2e, 0x43, 0x6c, 0x69, 0x65, 0x6e, 0x74, 0x4c, 0x69, 0x62, 0x72, 0x61, 0x72, 0x79, + 0x44, 0x65, 0x73, 0x74, 0x69, 0x6e, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x52, 0x0c, 0x64, 0x65, 0x73, + 0x74, 0x69, 0x6e, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x22, 0x93, 0x05, 0x0a, 0x15, 0x43, 0x6c, + 0x69, 0x65, 0x6e, 0x74, 0x4c, 0x69, 0x62, 0x72, 0x61, 0x72, 0x79, 0x53, 0x65, 0x74, 0x74, 0x69, + 0x6e, 0x67, 0x73, 0x12, 0x18, 0x0a, 0x07, 0x76, 0x65, 0x72, 0x73, 0x69, 0x6f, 0x6e, 0x18, 0x01, + 0x20, 0x01, 0x28, 0x09, 0x52, 0x07, 0x76, 0x65, 0x72, 0x73, 0x69, 0x6f, 0x6e, 0x12, 0x3a, 0x0a, + 0x0c, 0x6c, 0x61, 0x75, 0x6e, 0x63, 0x68, 0x5f, 0x73, 0x74, 0x61, 0x67, 0x65, 0x18, 0x02, 0x20, + 0x01, 0x28, 0x0e, 0x32, 0x17, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x61, 0x70, 0x69, + 0x2e, 0x4c, 0x61, 0x75, 0x6e, 0x63, 0x68, 0x53, 0x74, 0x61, 0x67, 0x65, 0x52, 0x0b, 0x6c, 0x61, + 0x75, 0x6e, 0x63, 0x68, 0x53, 0x74, 0x61, 0x67, 0x65, 0x12, 0x2c, 0x0a, 0x12, 0x72, 0x65, 0x73, + 0x74, 0x5f, 0x6e, 0x75, 0x6d, 0x65, 0x72, 0x69, 0x63, 0x5f, 0x65, 0x6e, 0x75, 0x6d, 0x73, 0x18, + 0x03, 0x20, 0x01, 0x28, 0x08, 0x52, 0x10, 0x72, 0x65, 0x73, 0x74, 0x4e, 0x75, 0x6d, 0x65, 0x72, + 0x69, 0x63, 0x45, 0x6e, 0x75, 0x6d, 0x73, 0x12, 0x3d, 0x0a, 0x0d, 0x6a, 0x61, 0x76, 0x61, 0x5f, + 0x73, 0x65, 0x74, 0x74, 0x69, 0x6e, 0x67, 0x73, 0x18, 0x15, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x18, + 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x61, 0x70, 0x69, 0x2e, 0x4a, 0x61, 0x76, 0x61, + 0x53, 0x65, 0x74, 0x74, 0x69, 0x6e, 0x67, 0x73, 0x52, 0x0c, 0x6a, 0x61, 0x76, 0x61, 0x53, 0x65, + 0x74, 0x74, 0x69, 0x6e, 0x67, 0x73, 0x12, 0x3a, 0x0a, 0x0c, 0x63, 0x70, 0x70, 0x5f, 0x73, 0x65, + 0x74, 0x74, 0x69, 0x6e, 0x67, 0x73, 0x18, 0x16, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x17, 0x2e, 0x67, + 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x61, 0x70, 0x69, 0x2e, 0x43, 0x70, 0x70, 0x53, 0x65, 0x74, + 0x74, 0x69, 0x6e, 0x67, 0x73, 0x52, 0x0b, 0x63, 0x70, 0x70, 0x53, 0x65, 0x74, 0x74, 0x69, 0x6e, + 0x67, 0x73, 0x12, 0x3a, 0x0a, 0x0c, 0x70, 0x68, 0x70, 0x5f, 0x73, 0x65, 0x74, 0x74, 0x69, 0x6e, + 0x67, 0x73, 0x18, 0x17, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x17, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, + 0x65, 0x2e, 0x61, 0x70, 0x69, 0x2e, 0x50, 0x68, 0x70, 0x53, 0x65, 0x74, 0x74, 0x69, 0x6e, 0x67, + 0x73, 0x52, 0x0b, 0x70, 0x68, 0x70, 0x53, 0x65, 0x74, 0x74, 0x69, 0x6e, 0x67, 0x73, 0x12, 0x43, + 0x0a, 0x0f, 0x70, 0x79, 0x74, 0x68, 0x6f, 0x6e, 0x5f, 0x73, 0x65, 0x74, 0x74, 0x69, 0x6e, 0x67, + 0x73, 0x18, 0x18, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1a, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, + 0x2e, 0x61, 0x70, 0x69, 0x2e, 0x50, 0x79, 0x74, 0x68, 0x6f, 0x6e, 0x53, 0x65, 0x74, 0x74, 0x69, + 0x6e, 0x67, 0x73, 0x52, 0x0e, 0x70, 0x79, 0x74, 0x68, 0x6f, 0x6e, 0x53, 0x65, 0x74, 0x74, 0x69, + 0x6e, 0x67, 0x73, 0x12, 0x3d, 0x0a, 0x0d, 0x6e, 0x6f, 0x64, 0x65, 0x5f, 0x73, 0x65, 0x74, 0x74, + 0x69, 0x6e, 0x67, 0x73, 0x18, 0x19, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x18, 0x2e, 0x67, 0x6f, 0x6f, + 0x67, 0x6c, 0x65, 0x2e, 0x61, 0x70, 0x69, 0x2e, 0x4e, 0x6f, 0x64, 0x65, 0x53, 0x65, 0x74, 0x74, + 0x69, 0x6e, 0x67, 0x73, 0x52, 0x0c, 0x6e, 0x6f, 0x64, 0x65, 0x53, 0x65, 0x74, 0x74, 0x69, 0x6e, + 0x67, 0x73, 0x12, 0x43, 0x0a, 0x0f, 0x64, 0x6f, 0x74, 0x6e, 0x65, 0x74, 0x5f, 0x73, 0x65, 0x74, + 0x74, 0x69, 0x6e, 0x67, 0x73, 0x18, 0x1a, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1a, 0x2e, 0x67, 0x6f, + 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x61, 0x70, 0x69, 0x2e, 0x44, 0x6f, 0x74, 0x6e, 0x65, 0x74, 0x53, + 0x65, 0x74, 0x74, 0x69, 0x6e, 0x67, 0x73, 0x52, 0x0e, 0x64, 0x6f, 0x74, 0x6e, 0x65, 0x74, 0x53, + 0x65, 0x74, 0x74, 0x69, 0x6e, 0x67, 0x73, 0x12, 0x3d, 0x0a, 0x0d, 0x72, 0x75, 0x62, 0x79, 0x5f, + 0x73, 0x65, 0x74, 0x74, 0x69, 0x6e, 0x67, 0x73, 0x18, 0x1b, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x18, + 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x61, 0x70, 0x69, 0x2e, 0x52, 0x75, 0x62, 0x79, + 0x53, 0x65, 0x74, 0x74, 0x69, 0x6e, 0x67, 0x73, 0x52, 0x0c, 0x72, 0x75, 0x62, 0x79, 0x53, 0x65, + 0x74, 0x74, 0x69, 0x6e, 0x67, 0x73, 0x12, 0x37, 0x0a, 0x0b, 0x67, 0x6f, 0x5f, 0x73, 0x65, 0x74, + 0x74, 0x69, 0x6e, 0x67, 0x73, 0x18, 0x1c, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x16, 0x2e, 0x67, 0x6f, + 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x61, 0x70, 0x69, 0x2e, 0x47, 0x6f, 0x53, 0x65, 0x74, 0x74, 0x69, + 0x6e, 0x67, 0x73, 0x52, 0x0a, 0x67, 0x6f, 0x53, 0x65, 0x74, 0x74, 0x69, 0x6e, 0x67, 0x73, 0x22, + 0xe0, 0x03, 0x0a, 0x0a, 0x50, 0x75, 0x62, 0x6c, 0x69, 0x73, 0x68, 0x69, 0x6e, 0x67, 0x12, 0x43, + 0x0a, 0x0f, 0x6d, 0x65, 0x74, 0x68, 0x6f, 0x64, 0x5f, 0x73, 0x65, 0x74, 0x74, 0x69, 0x6e, 0x67, + 0x73, 0x18, 0x02, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x1a, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, + 0x2e, 0x61, 0x70, 0x69, 0x2e, 0x4d, 0x65, 0x74, 0x68, 0x6f, 0x64, 0x53, 0x65, 0x74, 0x74, 0x69, + 0x6e, 0x67, 0x73, 0x52, 0x0e, 0x6d, 0x65, 0x74, 0x68, 0x6f, 0x64, 0x53, 0x65, 0x74, 0x74, 0x69, + 0x6e, 0x67, 0x73, 0x12, 0x22, 0x0a, 0x0d, 0x6e, 0x65, 0x77, 0x5f, 0x69, 0x73, 0x73, 0x75, 0x65, + 0x5f, 0x75, 0x72, 0x69, 0x18, 0x65, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0b, 0x6e, 0x65, 0x77, 0x49, + 0x73, 0x73, 0x75, 0x65, 0x55, 0x72, 0x69, 0x12, 0x2b, 0x0a, 0x11, 0x64, 0x6f, 0x63, 0x75, 0x6d, + 0x65, 0x6e, 0x74, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x5f, 0x75, 0x72, 0x69, 0x18, 0x66, 0x20, 0x01, + 0x28, 0x09, 0x52, 0x10, 0x64, 0x6f, 0x63, 0x75, 0x6d, 0x65, 0x6e, 0x74, 0x61, 0x74, 0x69, 0x6f, + 0x6e, 0x55, 0x72, 0x69, 0x12, 0x24, 0x0a, 0x0e, 0x61, 0x70, 0x69, 0x5f, 0x73, 0x68, 0x6f, 0x72, + 0x74, 0x5f, 0x6e, 0x61, 0x6d, 0x65, 0x18, 0x67, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0c, 0x61, 0x70, + 0x69, 0x53, 0x68, 0x6f, 0x72, 0x74, 0x4e, 0x61, 0x6d, 0x65, 0x12, 0x21, 0x0a, 0x0c, 0x67, 0x69, + 0x74, 0x68, 0x75, 0x62, 0x5f, 0x6c, 0x61, 0x62, 0x65, 0x6c, 0x18, 0x68, 0x20, 0x01, 0x28, 0x09, + 0x52, 0x0b, 0x67, 0x69, 0x74, 0x68, 0x75, 0x62, 0x4c, 0x61, 0x62, 0x65, 0x6c, 0x12, 0x34, 0x0a, + 0x16, 0x63, 0x6f, 0x64, 0x65, 0x6f, 0x77, 0x6e, 0x65, 0x72, 0x5f, 0x67, 0x69, 0x74, 0x68, 0x75, + 0x62, 0x5f, 0x74, 0x65, 0x61, 0x6d, 0x73, 0x18, 0x69, 0x20, 0x03, 0x28, 0x09, 0x52, 0x14, 0x63, + 0x6f, 0x64, 0x65, 0x6f, 0x77, 0x6e, 0x65, 0x72, 0x47, 0x69, 0x74, 0x68, 0x75, 0x62, 0x54, 0x65, + 0x61, 0x6d, 0x73, 0x12, 0x24, 0x0a, 0x0e, 0x64, 0x6f, 0x63, 0x5f, 0x74, 0x61, 0x67, 0x5f, 0x70, + 0x72, 0x65, 0x66, 0x69, 0x78, 0x18, 0x6a, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0c, 0x64, 0x6f, 0x63, + 0x54, 0x61, 0x67, 0x50, 0x72, 0x65, 0x66, 0x69, 0x78, 0x12, 0x49, 0x0a, 0x0c, 0x6f, 0x72, 0x67, + 0x61, 0x6e, 0x69, 0x7a, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x18, 0x6b, 0x20, 0x01, 0x28, 0x0e, 0x32, + 0x25, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x61, 0x70, 0x69, 0x2e, 0x43, 0x6c, 0x69, + 0x65, 0x6e, 0x74, 0x4c, 0x69, 0x62, 0x72, 0x61, 0x72, 0x79, 0x4f, 0x72, 0x67, 0x61, 0x6e, 0x69, + 0x7a, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x52, 0x0c, 0x6f, 0x72, 0x67, 0x61, 0x6e, 0x69, 0x7a, 0x61, + 0x74, 0x69, 0x6f, 0x6e, 0x12, 0x4c, 0x0a, 0x10, 0x6c, 0x69, 0x62, 0x72, 0x61, 0x72, 0x79, 0x5f, + 0x73, 0x65, 0x74, 0x74, 0x69, 0x6e, 0x67, 0x73, 0x18, 0x6d, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x21, + 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x61, 0x70, 0x69, 0x2e, 0x43, 0x6c, 0x69, 0x65, + 0x6e, 0x74, 0x4c, 0x69, 0x62, 0x72, 0x61, 0x72, 0x79, 0x53, 0x65, 0x74, 0x74, 0x69, 0x6e, 0x67, + 0x73, 0x52, 0x0f, 0x6c, 0x69, 0x62, 0x72, 0x61, 0x72, 0x79, 0x53, 0x65, 0x74, 0x74, 0x69, 0x6e, + 0x67, 0x73, 0x22, 0x9a, 0x02, 0x0a, 0x0c, 0x4a, 0x61, 0x76, 0x61, 0x53, 0x65, 0x74, 0x74, 0x69, + 0x6e, 0x67, 0x73, 0x12, 0x27, 0x0a, 0x0f, 0x6c, 0x69, 0x62, 0x72, 0x61, 0x72, 0x79, 0x5f, 0x70, + 0x61, 0x63, 0x6b, 0x61, 0x67, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0e, 0x6c, 0x69, + 0x62, 0x72, 0x61, 0x72, 0x79, 0x50, 0x61, 0x63, 0x6b, 0x61, 0x67, 0x65, 0x12, 0x5f, 0x0a, 0x13, + 0x73, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x5f, 0x63, 0x6c, 0x61, 0x73, 0x73, 0x5f, 0x6e, 0x61, + 0x6d, 0x65, 0x73, 0x18, 0x02, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x2f, 0x2e, 0x67, 0x6f, 0x6f, 0x67, + 0x6c, 0x65, 0x2e, 0x61, 0x70, 0x69, 0x2e, 0x4a, 0x61, 0x76, 0x61, 0x53, 0x65, 0x74, 0x74, 0x69, + 0x6e, 0x67, 0x73, 0x2e, 0x53, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x43, 0x6c, 0x61, 0x73, 0x73, + 0x4e, 0x61, 0x6d, 0x65, 0x73, 0x45, 0x6e, 0x74, 0x72, 0x79, 0x52, 0x11, 0x73, 0x65, 0x72, 0x76, + 0x69, 0x63, 0x65, 0x43, 0x6c, 0x61, 0x73, 0x73, 0x4e, 0x61, 0x6d, 0x65, 0x73, 0x12, 0x3a, 0x0a, + 0x06, 0x63, 0x6f, 0x6d, 0x6d, 0x6f, 0x6e, 0x18, 0x03, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x22, 0x2e, + 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x61, 0x70, 0x69, 0x2e, 0x43, 0x6f, 0x6d, 0x6d, 0x6f, + 0x6e, 0x4c, 0x61, 0x6e, 0x67, 0x75, 0x61, 0x67, 0x65, 0x53, 0x65, 0x74, 0x74, 0x69, 0x6e, 0x67, + 0x73, 0x52, 0x06, 0x63, 0x6f, 0x6d, 0x6d, 0x6f, 0x6e, 0x1a, 0x44, 0x0a, 0x16, 0x53, 0x65, 0x72, + 0x76, 0x69, 0x63, 0x65, 0x43, 0x6c, 0x61, 0x73, 0x73, 0x4e, 0x61, 0x6d, 0x65, 0x73, 0x45, 0x6e, + 0x74, 0x72, 0x79, 0x12, 0x10, 0x0a, 0x03, 0x6b, 0x65, 0x79, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, + 0x52, 0x03, 0x6b, 0x65, 0x79, 0x12, 0x14, 0x0a, 0x05, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x18, 0x02, + 0x20, 0x01, 0x28, 0x09, 0x52, 0x05, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x3a, 0x02, 0x38, 0x01, 0x22, + 0x49, 0x0a, 0x0b, 0x43, 0x70, 0x70, 0x53, 0x65, 0x74, 0x74, 0x69, 0x6e, 0x67, 0x73, 0x12, 0x3a, + 0x0a, 0x06, 0x63, 0x6f, 0x6d, 0x6d, 0x6f, 0x6e, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x22, + 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x61, 0x70, 0x69, 0x2e, 0x43, 0x6f, 0x6d, 0x6d, + 0x6f, 0x6e, 0x4c, 0x61, 0x6e, 0x67, 0x75, 0x61, 0x67, 0x65, 0x53, 0x65, 0x74, 0x74, 0x69, 0x6e, + 0x67, 0x73, 0x52, 0x06, 0x63, 0x6f, 0x6d, 0x6d, 0x6f, 0x6e, 0x22, 0x49, 0x0a, 0x0b, 0x50, 0x68, + 0x70, 0x53, 0x65, 0x74, 0x74, 0x69, 0x6e, 0x67, 0x73, 0x12, 0x3a, 0x0a, 0x06, 0x63, 0x6f, 0x6d, + 0x6d, 0x6f, 0x6e, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x22, 0x2e, 0x67, 0x6f, 0x6f, 0x67, + 0x6c, 0x65, 0x2e, 0x61, 0x70, 0x69, 0x2e, 0x43, 0x6f, 0x6d, 0x6d, 0x6f, 0x6e, 0x4c, 0x61, 0x6e, + 0x67, 0x75, 0x61, 0x67, 0x65, 0x53, 0x65, 0x74, 0x74, 0x69, 0x6e, 0x67, 0x73, 0x52, 0x06, 0x63, + 0x6f, 0x6d, 0x6d, 0x6f, 0x6e, 0x22, 0x4c, 0x0a, 0x0e, 0x50, 0x79, 0x74, 0x68, 0x6f, 0x6e, 0x53, + 0x65, 0x74, 0x74, 0x69, 0x6e, 0x67, 0x73, 0x12, 0x3a, 0x0a, 0x06, 0x63, 0x6f, 0x6d, 0x6d, 0x6f, + 0x6e, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x22, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, + 0x2e, 0x61, 0x70, 0x69, 0x2e, 0x43, 0x6f, 0x6d, 0x6d, 0x6f, 0x6e, 0x4c, 0x61, 0x6e, 0x67, 0x75, + 0x61, 0x67, 0x65, 0x53, 0x65, 0x74, 0x74, 0x69, 0x6e, 0x67, 0x73, 0x52, 0x06, 0x63, 0x6f, 0x6d, + 0x6d, 0x6f, 0x6e, 0x22, 0x4a, 0x0a, 0x0c, 0x4e, 0x6f, 0x64, 0x65, 0x53, 0x65, 0x74, 0x74, 0x69, + 0x6e, 0x67, 0x73, 0x12, 0x3a, 0x0a, 0x06, 0x63, 0x6f, 0x6d, 0x6d, 0x6f, 0x6e, 0x18, 0x01, 0x20, + 0x01, 0x28, 0x0b, 0x32, 0x22, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x61, 0x70, 0x69, + 0x2e, 0x43, 0x6f, 0x6d, 0x6d, 0x6f, 0x6e, 0x4c, 0x61, 0x6e, 0x67, 0x75, 0x61, 0x67, 0x65, 0x53, + 0x65, 0x74, 0x74, 0x69, 0x6e, 0x67, 0x73, 0x52, 0x06, 0x63, 0x6f, 0x6d, 0x6d, 0x6f, 0x6e, 0x22, + 0x4c, 0x0a, 0x0e, 0x44, 0x6f, 0x74, 0x6e, 0x65, 0x74, 0x53, 0x65, 0x74, 0x74, 0x69, 0x6e, 0x67, + 0x73, 0x12, 0x3a, 0x0a, 0x06, 0x63, 0x6f, 0x6d, 0x6d, 0x6f, 0x6e, 0x18, 0x01, 0x20, 0x01, 0x28, + 0x0b, 0x32, 0x22, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x61, 0x70, 0x69, 0x2e, 0x43, + 0x6f, 0x6d, 0x6d, 0x6f, 0x6e, 0x4c, 0x61, 0x6e, 0x67, 0x75, 0x61, 0x67, 0x65, 0x53, 0x65, 0x74, + 0x74, 0x69, 0x6e, 0x67, 0x73, 0x52, 0x06, 0x63, 0x6f, 0x6d, 0x6d, 0x6f, 0x6e, 0x22, 0x4a, 0x0a, + 0x0c, 0x52, 0x75, 0x62, 0x79, 0x53, 0x65, 0x74, 0x74, 0x69, 0x6e, 0x67, 0x73, 0x12, 0x3a, 0x0a, + 0x06, 0x63, 0x6f, 0x6d, 0x6d, 0x6f, 0x6e, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x22, 0x2e, + 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x61, 0x70, 0x69, 0x2e, 0x43, 0x6f, 0x6d, 0x6d, 0x6f, + 0x6e, 0x4c, 0x61, 0x6e, 0x67, 0x75, 0x61, 0x67, 0x65, 0x53, 0x65, 0x74, 0x74, 0x69, 0x6e, 0x67, + 0x73, 0x52, 0x06, 0x63, 0x6f, 0x6d, 0x6d, 0x6f, 0x6e, 0x22, 0x48, 0x0a, 0x0a, 0x47, 0x6f, 0x53, + 0x65, 0x74, 0x74, 0x69, 0x6e, 0x67, 0x73, 0x12, 0x3a, 0x0a, 0x06, 0x63, 0x6f, 0x6d, 0x6d, 0x6f, + 0x6e, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x22, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, + 0x2e, 0x61, 0x70, 0x69, 0x2e, 0x43, 0x6f, 0x6d, 0x6d, 0x6f, 0x6e, 0x4c, 0x61, 0x6e, 0x67, 0x75, + 0x61, 0x67, 0x65, 0x53, 0x65, 0x74, 0x74, 0x69, 0x6e, 0x67, 0x73, 0x52, 0x06, 0x63, 0x6f, 0x6d, + 0x6d, 0x6f, 0x6e, 0x22, 0x8e, 0x03, 0x0a, 0x0e, 0x4d, 0x65, 0x74, 0x68, 0x6f, 0x64, 0x53, 0x65, + 0x74, 0x74, 0x69, 0x6e, 0x67, 0x73, 0x12, 0x1a, 0x0a, 0x08, 0x73, 0x65, 0x6c, 0x65, 0x63, 0x74, + 0x6f, 0x72, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x08, 0x73, 0x65, 0x6c, 0x65, 0x63, 0x74, + 0x6f, 0x72, 0x12, 0x49, 0x0a, 0x0c, 0x6c, 0x6f, 0x6e, 0x67, 0x5f, 0x72, 0x75, 0x6e, 0x6e, 0x69, + 0x6e, 0x67, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x26, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, + 0x65, 0x2e, 0x61, 0x70, 0x69, 0x2e, 0x4d, 0x65, 0x74, 0x68, 0x6f, 0x64, 0x53, 0x65, 0x74, 0x74, + 0x69, 0x6e, 0x67, 0x73, 0x2e, 0x4c, 0x6f, 0x6e, 0x67, 0x52, 0x75, 0x6e, 0x6e, 0x69, 0x6e, 0x67, + 0x52, 0x0b, 0x6c, 0x6f, 0x6e, 0x67, 0x52, 0x75, 0x6e, 0x6e, 0x69, 0x6e, 0x67, 0x1a, 0x94, 0x02, + 0x0a, 0x0b, 0x4c, 0x6f, 0x6e, 0x67, 0x52, 0x75, 0x6e, 0x6e, 0x69, 0x6e, 0x67, 0x12, 0x47, 0x0a, + 0x12, 0x69, 0x6e, 0x69, 0x74, 0x69, 0x61, 0x6c, 0x5f, 0x70, 0x6f, 0x6c, 0x6c, 0x5f, 0x64, 0x65, + 0x6c, 0x61, 0x79, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x19, 0x2e, 0x67, 0x6f, 0x6f, 0x67, + 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x44, 0x75, 0x72, 0x61, + 0x74, 0x69, 0x6f, 0x6e, 0x52, 0x10, 0x69, 0x6e, 0x69, 0x74, 0x69, 0x61, 0x6c, 0x50, 0x6f, 0x6c, + 0x6c, 0x44, 0x65, 0x6c, 0x61, 0x79, 0x12, 0x32, 0x0a, 0x15, 0x70, 0x6f, 0x6c, 0x6c, 0x5f, 0x64, + 0x65, 0x6c, 0x61, 0x79, 0x5f, 0x6d, 0x75, 0x6c, 0x74, 0x69, 0x70, 0x6c, 0x69, 0x65, 0x72, 0x18, + 0x02, 0x20, 0x01, 0x28, 0x02, 0x52, 0x13, 0x70, 0x6f, 0x6c, 0x6c, 0x44, 0x65, 0x6c, 0x61, 0x79, + 0x4d, 0x75, 0x6c, 0x74, 0x69, 0x70, 0x6c, 0x69, 0x65, 0x72, 0x12, 0x3f, 0x0a, 0x0e, 0x6d, 0x61, + 0x78, 0x5f, 0x70, 0x6f, 0x6c, 0x6c, 0x5f, 0x64, 0x65, 0x6c, 0x61, 0x79, 0x18, 0x03, 0x20, 0x01, + 0x28, 0x0b, 0x32, 0x19, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, + 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x44, 0x75, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x52, 0x0c, 0x6d, + 0x61, 0x78, 0x50, 0x6f, 0x6c, 0x6c, 0x44, 0x65, 0x6c, 0x61, 0x79, 0x12, 0x47, 0x0a, 0x12, 0x74, + 0x6f, 0x74, 0x61, 0x6c, 0x5f, 0x70, 0x6f, 0x6c, 0x6c, 0x5f, 0x74, 0x69, 0x6d, 0x65, 0x6f, 0x75, + 0x74, 0x18, 0x04, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x19, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, + 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x44, 0x75, 0x72, 0x61, 0x74, 0x69, + 0x6f, 0x6e, 0x52, 0x10, 0x74, 0x6f, 0x74, 0x61, 0x6c, 0x50, 0x6f, 0x6c, 0x6c, 0x54, 0x69, 0x6d, + 0x65, 0x6f, 0x75, 0x74, 0x2a, 0x79, 0x0a, 0x19, 0x43, 0x6c, 0x69, 0x65, 0x6e, 0x74, 0x4c, 0x69, + 0x62, 0x72, 0x61, 0x72, 0x79, 0x4f, 0x72, 0x67, 0x61, 0x6e, 0x69, 0x7a, 0x61, 0x74, 0x69, 0x6f, + 0x6e, 0x12, 0x2b, 0x0a, 0x27, 0x43, 0x4c, 0x49, 0x45, 0x4e, 0x54, 0x5f, 0x4c, 0x49, 0x42, 0x52, + 0x41, 0x52, 0x59, 0x5f, 0x4f, 0x52, 0x47, 0x41, 0x4e, 0x49, 0x5a, 0x41, 0x54, 0x49, 0x4f, 0x4e, + 0x5f, 0x55, 0x4e, 0x53, 0x50, 0x45, 0x43, 0x49, 0x46, 0x49, 0x45, 0x44, 0x10, 0x00, 0x12, 0x09, + 0x0a, 0x05, 0x43, 0x4c, 0x4f, 0x55, 0x44, 0x10, 0x01, 0x12, 0x07, 0x0a, 0x03, 0x41, 0x44, 0x53, + 0x10, 0x02, 0x12, 0x0a, 0x0a, 0x06, 0x50, 0x48, 0x4f, 0x54, 0x4f, 0x53, 0x10, 0x03, 0x12, 0x0f, + 0x0a, 0x0b, 0x53, 0x54, 0x52, 0x45, 0x45, 0x54, 0x5f, 0x56, 0x49, 0x45, 0x57, 0x10, 0x04, 0x2a, + 0x67, 0x0a, 0x18, 0x43, 0x6c, 0x69, 0x65, 0x6e, 0x74, 0x4c, 0x69, 0x62, 0x72, 0x61, 0x72, 0x79, + 0x44, 0x65, 0x73, 0x74, 0x69, 0x6e, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x12, 0x2a, 0x0a, 0x26, 0x43, + 0x4c, 0x49, 0x45, 0x4e, 0x54, 0x5f, 0x4c, 0x49, 0x42, 0x52, 0x41, 0x52, 0x59, 0x5f, 0x44, 0x45, + 0x53, 0x54, 0x49, 0x4e, 0x41, 0x54, 0x49, 0x4f, 0x4e, 0x5f, 0x55, 0x4e, 0x53, 0x50, 0x45, 0x43, + 0x49, 0x46, 0x49, 0x45, 0x44, 0x10, 0x00, 0x12, 0x0a, 0x0a, 0x06, 0x47, 0x49, 0x54, 0x48, 0x55, + 0x42, 0x10, 0x0a, 0x12, 0x13, 0x0a, 0x0f, 0x50, 0x41, 0x43, 0x4b, 0x41, 0x47, 0x45, 0x5f, 0x4d, + 0x41, 0x4e, 0x41, 0x47, 0x45, 0x52, 0x10, 0x14, 0x3a, 0x4a, 0x0a, 0x10, 0x6d, 0x65, 0x74, 0x68, + 0x6f, 0x64, 0x5f, 0x73, 0x69, 0x67, 0x6e, 0x61, 0x74, 0x75, 0x72, 0x65, 0x12, 0x1e, 0x2e, 0x67, + 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x4d, + 0x65, 0x74, 0x68, 0x6f, 0x64, 0x4f, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x18, 0x9b, 0x08, 0x20, + 0x03, 0x28, 0x09, 0x52, 0x0f, 0x6d, 0x65, 0x74, 0x68, 0x6f, 0x64, 0x53, 0x69, 0x67, 0x6e, 0x61, + 0x74, 0x75, 0x72, 0x65, 0x3a, 0x43, 0x0a, 0x0c, 0x64, 0x65, 0x66, 0x61, 0x75, 0x6c, 0x74, 0x5f, + 0x68, 0x6f, 0x73, 0x74, 0x12, 0x1f, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, + 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x53, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x4f, 0x70, + 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x18, 0x99, 0x08, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0b, 0x64, 0x65, + 0x66, 0x61, 0x75, 0x6c, 0x74, 0x48, 0x6f, 0x73, 0x74, 0x3a, 0x43, 0x0a, 0x0c, 0x6f, 0x61, 0x75, + 0x74, 0x68, 0x5f, 0x73, 0x63, 0x6f, 0x70, 0x65, 0x73, 0x12, 0x1f, 0x2e, 0x67, 0x6f, 0x6f, 0x67, + 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x53, 0x65, 0x72, 0x76, + 0x69, 0x63, 0x65, 0x4f, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x18, 0x9a, 0x08, 0x20, 0x01, 0x28, + 0x09, 0x52, 0x0b, 0x6f, 0x61, 0x75, 0x74, 0x68, 0x53, 0x63, 0x6f, 0x70, 0x65, 0x73, 0x42, 0x69, + 0x0a, 0x0e, 0x63, 0x6f, 0x6d, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x61, 0x70, 0x69, + 0x42, 0x0b, 0x43, 0x6c, 0x69, 0x65, 0x6e, 0x74, 0x50, 0x72, 0x6f, 0x74, 0x6f, 0x50, 0x01, 0x5a, + 0x41, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x67, 0x6f, 0x6c, 0x61, 0x6e, 0x67, 0x2e, 0x6f, + 0x72, 0x67, 0x2f, 0x67, 0x65, 0x6e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x2f, 0x67, 0x6f, 0x6f, 0x67, + 0x6c, 0x65, 0x61, 0x70, 0x69, 0x73, 0x2f, 0x61, 0x70, 0x69, 0x2f, 0x61, 0x6e, 0x6e, 0x6f, 0x74, + 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x3b, 0x61, 0x6e, 0x6e, 0x6f, 0x74, 0x61, 0x74, 0x69, 0x6f, + 0x6e, 0x73, 0xa2, 0x02, 0x04, 0x47, 0x41, 0x50, 0x49, 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, + 0x33, } +var ( + file_google_api_client_proto_rawDescOnce sync.Once + file_google_api_client_proto_rawDescData = file_google_api_client_proto_rawDesc +) + +func file_google_api_client_proto_rawDescGZIP() []byte { + file_google_api_client_proto_rawDescOnce.Do(func() { + file_google_api_client_proto_rawDescData = protoimpl.X.CompressGZIP(file_google_api_client_proto_rawDescData) + }) + return file_google_api_client_proto_rawDescData +} + +var file_google_api_client_proto_enumTypes = make([]protoimpl.EnumInfo, 2) +var file_google_api_client_proto_msgTypes = make([]protoimpl.MessageInfo, 14) var file_google_api_client_proto_goTypes = []interface{}{ - (*descriptorpb.MethodOptions)(nil), // 0: google.protobuf.MethodOptions - (*descriptorpb.ServiceOptions)(nil), // 1: google.protobuf.ServiceOptions + (ClientLibraryOrganization)(0), // 0: google.api.ClientLibraryOrganization + (ClientLibraryDestination)(0), // 1: google.api.ClientLibraryDestination + (*CommonLanguageSettings)(nil), // 2: google.api.CommonLanguageSettings + (*ClientLibrarySettings)(nil), // 3: google.api.ClientLibrarySettings + (*Publishing)(nil), // 4: google.api.Publishing + (*JavaSettings)(nil), // 5: google.api.JavaSettings + (*CppSettings)(nil), // 6: google.api.CppSettings + (*PhpSettings)(nil), // 7: google.api.PhpSettings + (*PythonSettings)(nil), // 8: google.api.PythonSettings + (*NodeSettings)(nil), // 9: google.api.NodeSettings + (*DotnetSettings)(nil), // 10: google.api.DotnetSettings + (*RubySettings)(nil), // 11: google.api.RubySettings + (*GoSettings)(nil), // 12: google.api.GoSettings + (*MethodSettings)(nil), // 13: google.api.MethodSettings + nil, // 14: google.api.JavaSettings.ServiceClassNamesEntry + (*MethodSettings_LongRunning)(nil), // 15: google.api.MethodSettings.LongRunning + (api.LaunchStage)(0), // 16: google.api.LaunchStage + (*durationpb.Duration)(nil), // 17: google.protobuf.Duration + (*descriptorpb.MethodOptions)(nil), // 18: google.protobuf.MethodOptions + (*descriptorpb.ServiceOptions)(nil), // 19: google.protobuf.ServiceOptions } var file_google_api_client_proto_depIdxs = []int32{ - 0, // 0: google.api.method_signature:extendee -> google.protobuf.MethodOptions - 1, // 1: google.api.default_host:extendee -> google.protobuf.ServiceOptions - 1, // 2: google.api.oauth_scopes:extendee -> google.protobuf.ServiceOptions - 3, // [3:3] is the sub-list for method output_type - 3, // [3:3] is the sub-list for method input_type - 3, // [3:3] is the sub-list for extension type_name - 0, // [0:3] is the sub-list for extension extendee - 0, // [0:0] is the sub-list for field type_name + 1, // 0: google.api.CommonLanguageSettings.destinations:type_name -> google.api.ClientLibraryDestination + 16, // 1: google.api.ClientLibrarySettings.launch_stage:type_name -> google.api.LaunchStage + 5, // 2: google.api.ClientLibrarySettings.java_settings:type_name -> google.api.JavaSettings + 6, // 3: google.api.ClientLibrarySettings.cpp_settings:type_name -> google.api.CppSettings + 7, // 4: google.api.ClientLibrarySettings.php_settings:type_name -> google.api.PhpSettings + 8, // 5: google.api.ClientLibrarySettings.python_settings:type_name -> google.api.PythonSettings + 9, // 6: google.api.ClientLibrarySettings.node_settings:type_name -> google.api.NodeSettings + 10, // 7: google.api.ClientLibrarySettings.dotnet_settings:type_name -> google.api.DotnetSettings + 11, // 8: google.api.ClientLibrarySettings.ruby_settings:type_name -> google.api.RubySettings + 12, // 9: google.api.ClientLibrarySettings.go_settings:type_name -> google.api.GoSettings + 13, // 10: google.api.Publishing.method_settings:type_name -> google.api.MethodSettings + 0, // 11: google.api.Publishing.organization:type_name -> google.api.ClientLibraryOrganization + 3, // 12: google.api.Publishing.library_settings:type_name -> google.api.ClientLibrarySettings + 14, // 13: google.api.JavaSettings.service_class_names:type_name -> google.api.JavaSettings.ServiceClassNamesEntry + 2, // 14: google.api.JavaSettings.common:type_name -> google.api.CommonLanguageSettings + 2, // 15: google.api.CppSettings.common:type_name -> google.api.CommonLanguageSettings + 2, // 16: google.api.PhpSettings.common:type_name -> google.api.CommonLanguageSettings + 2, // 17: google.api.PythonSettings.common:type_name -> google.api.CommonLanguageSettings + 2, // 18: google.api.NodeSettings.common:type_name -> google.api.CommonLanguageSettings + 2, // 19: google.api.DotnetSettings.common:type_name -> google.api.CommonLanguageSettings + 2, // 20: google.api.RubySettings.common:type_name -> google.api.CommonLanguageSettings + 2, // 21: google.api.GoSettings.common:type_name -> google.api.CommonLanguageSettings + 15, // 22: google.api.MethodSettings.long_running:type_name -> google.api.MethodSettings.LongRunning + 17, // 23: google.api.MethodSettings.LongRunning.initial_poll_delay:type_name -> google.protobuf.Duration + 17, // 24: google.api.MethodSettings.LongRunning.max_poll_delay:type_name -> google.protobuf.Duration + 17, // 25: google.api.MethodSettings.LongRunning.total_poll_timeout:type_name -> google.protobuf.Duration + 18, // 26: google.api.method_signature:extendee -> google.protobuf.MethodOptions + 19, // 27: google.api.default_host:extendee -> google.protobuf.ServiceOptions + 19, // 28: google.api.oauth_scopes:extendee -> google.protobuf.ServiceOptions + 29, // [29:29] is the sub-list for method output_type + 29, // [29:29] is the sub-list for method input_type + 29, // [29:29] is the sub-list for extension type_name + 26, // [26:29] is the sub-list for extension extendee + 0, // [0:26] is the sub-list for field type_name } func init() { file_google_api_client_proto_init() } @@ -193,18 +1471,178 @@ func file_google_api_client_proto_init() { if File_google_api_client_proto != nil { return } + if !protoimpl.UnsafeEnabled { + file_google_api_client_proto_msgTypes[0].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*CommonLanguageSettings); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_google_api_client_proto_msgTypes[1].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*ClientLibrarySettings); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_google_api_client_proto_msgTypes[2].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*Publishing); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_google_api_client_proto_msgTypes[3].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*JavaSettings); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_google_api_client_proto_msgTypes[4].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*CppSettings); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_google_api_client_proto_msgTypes[5].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*PhpSettings); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_google_api_client_proto_msgTypes[6].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*PythonSettings); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_google_api_client_proto_msgTypes[7].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*NodeSettings); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_google_api_client_proto_msgTypes[8].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*DotnetSettings); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_google_api_client_proto_msgTypes[9].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*RubySettings); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_google_api_client_proto_msgTypes[10].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*GoSettings); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_google_api_client_proto_msgTypes[11].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*MethodSettings); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_google_api_client_proto_msgTypes[13].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*MethodSettings_LongRunning); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + } type x struct{} out := protoimpl.TypeBuilder{ File: protoimpl.DescBuilder{ GoPackagePath: reflect.TypeOf(x{}).PkgPath(), RawDescriptor: file_google_api_client_proto_rawDesc, - NumEnums: 0, - NumMessages: 0, + NumEnums: 2, + NumMessages: 14, NumExtensions: 3, NumServices: 0, }, GoTypes: file_google_api_client_proto_goTypes, DependencyIndexes: file_google_api_client_proto_depIdxs, + EnumInfos: file_google_api_client_proto_enumTypes, + MessageInfos: file_google_api_client_proto_msgTypes, ExtensionInfos: file_google_api_client_proto_extTypes, }.Build() File_google_api_client_proto = out.File diff --git a/vendor/google.golang.org/genproto/googleapis/api/launch_stage.pb.go b/vendor/google.golang.org/genproto/googleapis/api/launch_stage.pb.go new file mode 100644 index 000000000..710753137 --- /dev/null +++ b/vendor/google.golang.org/genproto/googleapis/api/launch_stage.pb.go @@ -0,0 +1,203 @@ +// Copyright 2015 Google LLC +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. + +// Code generated by protoc-gen-go. DO NOT EDIT. +// versions: +// protoc-gen-go v1.26.0 +// protoc v3.18.1 +// source: google/api/launch_stage.proto + +package api + +import ( + reflect "reflect" + sync "sync" + + protoreflect "google.golang.org/protobuf/reflect/protoreflect" + protoimpl "google.golang.org/protobuf/runtime/protoimpl" +) + +const ( + // Verify that this generated code is sufficiently up-to-date. + _ = protoimpl.EnforceVersion(20 - protoimpl.MinVersion) + // Verify that runtime/protoimpl is sufficiently up-to-date. + _ = protoimpl.EnforceVersion(protoimpl.MaxVersion - 20) +) + +// The launch stage as defined by [Google Cloud Platform +// Launch Stages](https://cloud.google.com/terms/launch-stages). +type LaunchStage int32 + +const ( + // Do not use this default value. + LaunchStage_LAUNCH_STAGE_UNSPECIFIED LaunchStage = 0 + // The feature is not yet implemented. Users can not use it. + LaunchStage_UNIMPLEMENTED LaunchStage = 6 + // Prelaunch features are hidden from users and are only visible internally. + LaunchStage_PRELAUNCH LaunchStage = 7 + // Early Access features are limited to a closed group of testers. To use + // these features, you must sign up in advance and sign a Trusted Tester + // agreement (which includes confidentiality provisions). These features may + // be unstable, changed in backward-incompatible ways, and are not + // guaranteed to be released. + LaunchStage_EARLY_ACCESS LaunchStage = 1 + // Alpha is a limited availability test for releases before they are cleared + // for widespread use. By Alpha, all significant design issues are resolved + // and we are in the process of verifying functionality. Alpha customers + // need to apply for access, agree to applicable terms, and have their + // projects allowlisted. Alpha releases don't have to be feature complete, + // no SLAs are provided, and there are no technical support obligations, but + // they will be far enough along that customers can actually use them in + // test environments or for limited-use tests -- just like they would in + // normal production cases. + LaunchStage_ALPHA LaunchStage = 2 + // Beta is the point at which we are ready to open a release for any + // customer to use. There are no SLA or technical support obligations in a + // Beta release. Products will be complete from a feature perspective, but + // may have some open outstanding issues. Beta releases are suitable for + // limited production use cases. + LaunchStage_BETA LaunchStage = 3 + // GA features are open to all developers and are considered stable and + // fully qualified for production use. + LaunchStage_GA LaunchStage = 4 + // Deprecated features are scheduled to be shut down and removed. For more + // information, see the "Deprecation Policy" section of our [Terms of + // Service](https://cloud.google.com/terms/) + // and the [Google Cloud Platform Subject to the Deprecation + // Policy](https://cloud.google.com/terms/deprecation) documentation. + LaunchStage_DEPRECATED LaunchStage = 5 +) + +// Enum value maps for LaunchStage. +var ( + LaunchStage_name = map[int32]string{ + 0: "LAUNCH_STAGE_UNSPECIFIED", + 6: "UNIMPLEMENTED", + 7: "PRELAUNCH", + 1: "EARLY_ACCESS", + 2: "ALPHA", + 3: "BETA", + 4: "GA", + 5: "DEPRECATED", + } + LaunchStage_value = map[string]int32{ + "LAUNCH_STAGE_UNSPECIFIED": 0, + "UNIMPLEMENTED": 6, + "PRELAUNCH": 7, + "EARLY_ACCESS": 1, + "ALPHA": 2, + "BETA": 3, + "GA": 4, + "DEPRECATED": 5, + } +) + +func (x LaunchStage) Enum() *LaunchStage { + p := new(LaunchStage) + *p = x + return p +} + +func (x LaunchStage) String() string { + return protoimpl.X.EnumStringOf(x.Descriptor(), protoreflect.EnumNumber(x)) +} + +func (LaunchStage) Descriptor() protoreflect.EnumDescriptor { + return file_google_api_launch_stage_proto_enumTypes[0].Descriptor() +} + +func (LaunchStage) Type() protoreflect.EnumType { + return &file_google_api_launch_stage_proto_enumTypes[0] +} + +func (x LaunchStage) Number() protoreflect.EnumNumber { + return protoreflect.EnumNumber(x) +} + +// Deprecated: Use LaunchStage.Descriptor instead. +func (LaunchStage) EnumDescriptor() ([]byte, []int) { + return file_google_api_launch_stage_proto_rawDescGZIP(), []int{0} +} + +var File_google_api_launch_stage_proto protoreflect.FileDescriptor + +var file_google_api_launch_stage_proto_rawDesc = []byte{ + 0x0a, 0x1d, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2f, 0x61, 0x70, 0x69, 0x2f, 0x6c, 0x61, 0x75, + 0x6e, 0x63, 0x68, 0x5f, 0x73, 0x74, 0x61, 0x67, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x12, + 0x0a, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x61, 0x70, 0x69, 0x2a, 0x8c, 0x01, 0x0a, 0x0b, + 0x4c, 0x61, 0x75, 0x6e, 0x63, 0x68, 0x53, 0x74, 0x61, 0x67, 0x65, 0x12, 0x1c, 0x0a, 0x18, 0x4c, + 0x41, 0x55, 0x4e, 0x43, 0x48, 0x5f, 0x53, 0x54, 0x41, 0x47, 0x45, 0x5f, 0x55, 0x4e, 0x53, 0x50, + 0x45, 0x43, 0x49, 0x46, 0x49, 0x45, 0x44, 0x10, 0x00, 0x12, 0x11, 0x0a, 0x0d, 0x55, 0x4e, 0x49, + 0x4d, 0x50, 0x4c, 0x45, 0x4d, 0x45, 0x4e, 0x54, 0x45, 0x44, 0x10, 0x06, 0x12, 0x0d, 0x0a, 0x09, + 0x50, 0x52, 0x45, 0x4c, 0x41, 0x55, 0x4e, 0x43, 0x48, 0x10, 0x07, 0x12, 0x10, 0x0a, 0x0c, 0x45, + 0x41, 0x52, 0x4c, 0x59, 0x5f, 0x41, 0x43, 0x43, 0x45, 0x53, 0x53, 0x10, 0x01, 0x12, 0x09, 0x0a, + 0x05, 0x41, 0x4c, 0x50, 0x48, 0x41, 0x10, 0x02, 0x12, 0x08, 0x0a, 0x04, 0x42, 0x45, 0x54, 0x41, + 0x10, 0x03, 0x12, 0x06, 0x0a, 0x02, 0x47, 0x41, 0x10, 0x04, 0x12, 0x0e, 0x0a, 0x0a, 0x44, 0x45, + 0x50, 0x52, 0x45, 0x43, 0x41, 0x54, 0x45, 0x44, 0x10, 0x05, 0x42, 0x5a, 0x0a, 0x0e, 0x63, 0x6f, + 0x6d, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x61, 0x70, 0x69, 0x42, 0x10, 0x4c, 0x61, + 0x75, 0x6e, 0x63, 0x68, 0x53, 0x74, 0x61, 0x67, 0x65, 0x50, 0x72, 0x6f, 0x74, 0x6f, 0x50, 0x01, + 0x5a, 0x2d, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x67, 0x6f, 0x6c, 0x61, 0x6e, 0x67, 0x2e, + 0x6f, 0x72, 0x67, 0x2f, 0x67, 0x65, 0x6e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x2f, 0x67, 0x6f, 0x6f, + 0x67, 0x6c, 0x65, 0x61, 0x70, 0x69, 0x73, 0x2f, 0x61, 0x70, 0x69, 0x3b, 0x61, 0x70, 0x69, 0xa2, + 0x02, 0x04, 0x47, 0x41, 0x50, 0x49, 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33, +} + +var ( + file_google_api_launch_stage_proto_rawDescOnce sync.Once + file_google_api_launch_stage_proto_rawDescData = file_google_api_launch_stage_proto_rawDesc +) + +func file_google_api_launch_stage_proto_rawDescGZIP() []byte { + file_google_api_launch_stage_proto_rawDescOnce.Do(func() { + file_google_api_launch_stage_proto_rawDescData = protoimpl.X.CompressGZIP(file_google_api_launch_stage_proto_rawDescData) + }) + return file_google_api_launch_stage_proto_rawDescData +} + +var file_google_api_launch_stage_proto_enumTypes = make([]protoimpl.EnumInfo, 1) +var file_google_api_launch_stage_proto_goTypes = []interface{}{ + (LaunchStage)(0), // 0: google.api.LaunchStage +} +var file_google_api_launch_stage_proto_depIdxs = []int32{ + 0, // [0:0] is the sub-list for method output_type + 0, // [0:0] is the sub-list for method input_type + 0, // [0:0] is the sub-list for extension type_name + 0, // [0:0] is the sub-list for extension extendee + 0, // [0:0] is the sub-list for field type_name +} + +func init() { file_google_api_launch_stage_proto_init() } +func file_google_api_launch_stage_proto_init() { + if File_google_api_launch_stage_proto != nil { + return + } + type x struct{} + out := protoimpl.TypeBuilder{ + File: protoimpl.DescBuilder{ + GoPackagePath: reflect.TypeOf(x{}).PkgPath(), + RawDescriptor: file_google_api_launch_stage_proto_rawDesc, + NumEnums: 1, + NumMessages: 0, + NumExtensions: 0, + NumServices: 0, + }, + GoTypes: file_google_api_launch_stage_proto_goTypes, + DependencyIndexes: file_google_api_launch_stage_proto_depIdxs, + EnumInfos: file_google_api_launch_stage_proto_enumTypes, + }.Build() + File_google_api_launch_stage_proto = out.File + file_google_api_launch_stage_proto_rawDesc = nil + file_google_api_launch_stage_proto_goTypes = nil + file_google_api_launch_stage_proto_depIdxs = nil +} diff --git a/vendor/modules.txt b/vendor/modules.txt index 636d82684..17b3e4dce 100644 --- a/vendor/modules.txt +++ b/vendor/modules.txt @@ -1,4 +1,4 @@ -# cloud.google.com/go v0.106.0 +# cloud.google.com/go v0.107.0 ## explicit; go 1.19 cloud.google.com/go/internal cloud.google.com/go/internal/optional @@ -102,10 +102,10 @@ github.com/aws/aws-sdk-go-v2/internal/timeconv ## explicit; go 1.15 github.com/aws/aws-sdk-go-v2/aws/protocol/eventstream github.com/aws/aws-sdk-go-v2/aws/protocol/eventstream/eventstreamapi -# github.com/aws/aws-sdk-go-v2/config v1.17.10 +# github.com/aws/aws-sdk-go-v2/config v1.18.1 ## explicit; go 1.15 github.com/aws/aws-sdk-go-v2/config -# github.com/aws/aws-sdk-go-v2/credentials v1.12.23 +# github.com/aws/aws-sdk-go-v2/credentials v1.13.1 ## explicit; go 1.15 github.com/aws/aws-sdk-go-v2/credentials github.com/aws/aws-sdk-go-v2/credentials/ec2rolecreds @@ -118,7 +118,7 @@ github.com/aws/aws-sdk-go-v2/credentials/stscreds ## explicit; go 1.15 github.com/aws/aws-sdk-go-v2/feature/ec2/imds github.com/aws/aws-sdk-go-v2/feature/ec2/imds/internal/config -# github.com/aws/aws-sdk-go-v2/feature/s3/manager v1.11.37 +# github.com/aws/aws-sdk-go-v2/feature/s3/manager v1.11.40 ## explicit; go 1.15 github.com/aws/aws-sdk-go-v2/feature/s3/manager # github.com/aws/aws-sdk-go-v2/internal/configsources v1.1.25 @@ -149,7 +149,7 @@ github.com/aws/aws-sdk-go-v2/service/internal/presigned-url github.com/aws/aws-sdk-go-v2/service/internal/s3shared github.com/aws/aws-sdk-go-v2/service/internal/s3shared/arn github.com/aws/aws-sdk-go-v2/service/internal/s3shared/config -# github.com/aws/aws-sdk-go-v2/service/s3 v1.29.1 +# github.com/aws/aws-sdk-go-v2/service/s3 v1.29.3 ## explicit; go 1.15 github.com/aws/aws-sdk-go-v2/service/s3 github.com/aws/aws-sdk-go-v2/service/s3/internal/arn @@ -166,7 +166,7 @@ github.com/aws/aws-sdk-go-v2/service/sso/types github.com/aws/aws-sdk-go-v2/service/ssooidc github.com/aws/aws-sdk-go-v2/service/ssooidc/internal/endpoints github.com/aws/aws-sdk-go-v2/service/ssooidc/types -# github.com/aws/aws-sdk-go-v2/service/sts v1.17.1 +# github.com/aws/aws-sdk-go-v2/service/sts v1.17.3 ## explicit; go 1.15 github.com/aws/aws-sdk-go-v2/service/sts github.com/aws/aws-sdk-go-v2/service/sts/internal/endpoints @@ -327,7 +327,7 @@ github.com/prometheus/prometheus/tsdb/record github.com/prometheus/prometheus/tsdb/tombstones github.com/prometheus/prometheus/tsdb/tsdbutil github.com/prometheus/prometheus/tsdb/wal -# github.com/rivo/uniseg v0.4.2 +# github.com/rivo/uniseg v0.4.3 ## explicit; go 1.18 github.com/rivo/uniseg # github.com/russross/blackfriday/v2 v2.1.0 @@ -458,8 +458,9 @@ google.golang.org/appengine/internal/socket google.golang.org/appengine/internal/urlfetch google.golang.org/appengine/socket google.golang.org/appengine/urlfetch -# google.golang.org/genproto v0.0.0-20221109142239-94d6d90a7d66 +# google.golang.org/genproto v0.0.0-20221116193143-41c2ba794472 ## explicit; go 1.19 +google.golang.org/genproto/googleapis/api google.golang.org/genproto/googleapis/api/annotations google.golang.org/genproto/googleapis/iam/v1 google.golang.org/genproto/googleapis/rpc/code From 3ed238b75b04ea0e75c2978500d5332b5577209d Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Thu, 17 Nov 2022 12:49:09 +0100 Subject: [PATCH 02/46] build(deps): bump loader-utils in /app/vmui/packages/vmui (#3350) Bumps [loader-utils](https://github.com/webpack/loader-utils) from 2.0.3 to 2.0.4. - [Release notes](https://github.com/webpack/loader-utils/releases) - [Changelog](https://github.com/webpack/loader-utils/blob/v2.0.4/CHANGELOG.md) - [Commits](https://github.com/webpack/loader-utils/compare/v2.0.3...v2.0.4) --- updated-dependencies: - dependency-name: loader-utils dependency-type: indirect ... Signed-off-by: dependabot[bot] Signed-off-by: dependabot[bot] Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> From 51bfd1ab803ae16e2961555cf210bb5d95708dc4 Mon Sep 17 00:00:00 2001 From: Yury Molodov Date: Thu, 17 Nov 2022 17:42:33 +0100 Subject: [PATCH 03/46] vmui: add ability hide query (#3359) * feat: add ability hide query * fix: change logic hide query * fix: remove console.log --- .../Configurators/QueryEditor/QueryEditor.tsx | 6 ++- .../src/components/Main/Button/Button.tsx | 2 +- .../src/components/Main/Button/style.scss | 17 +++++++ .../vmui/src/components/Main/Icons/index.tsx | 23 +++++++++ .../packages/vmui/src/hooks/useFetchQuery.ts | 7 +-- .../QueryConfigurator/QueryConfigurator.tsx | 38 ++++++++++++-- .../CustomPanel/QueryConfigurator/style.scss | 7 ++- .../vmui/src/pages/CustomPanel/index.tsx | 49 ++++++++++++------- docs/CHANGELOG.md | 1 + 9 files changed, 122 insertions(+), 28 deletions(-) diff --git a/app/vmui/packages/vmui/src/components/Configurators/QueryEditor/QueryEditor.tsx b/app/vmui/packages/vmui/src/components/Configurators/QueryEditor/QueryEditor.tsx index 2fabde6bf..0fb1b13d9 100644 --- a/app/vmui/packages/vmui/src/components/Configurators/QueryEditor/QueryEditor.tsx +++ b/app/vmui/packages/vmui/src/components/Configurators/QueryEditor/QueryEditor.tsx @@ -18,7 +18,7 @@ export interface QueryEditorProps { error?: ErrorTypes | string; options: string[]; label: string; - size?: "small" | "medium" | undefined; + disabled?: boolean } const QueryEditor: FC = ({ @@ -31,6 +31,7 @@ const QueryEditor: FC = ({ error, options, label, + disabled = false }) => { const [focusOption, setFocusOption] = useState(-1); @@ -86,6 +87,7 @@ const QueryEditor: FC = ({ // Enter if (enter && hasAutocomplete && !shiftKey && !ctrlMetaKey) { + if (disabled) return; onChange(foundOptions[focusOption]); setOpenAutocomplete(false); } else if (enter && !shiftKey) { @@ -98,6 +100,7 @@ const QueryEditor: FC = ({ }; const createHandlerOnChangeAutocomplete = (item: string) => () => { + if (disabled) return; onChange(item); handleCloseAutocomplete(); }; @@ -127,6 +130,7 @@ const QueryEditor: FC = ({ error={error} onKeyDown={handleKeyDown} onChange={onChange} + disabled={disabled} /> ( /> ); + +export const VisibilityIcon = () => ( + + + +); + + +export const VisibilityOffIcon = () => ( + + + +); diff --git a/app/vmui/packages/vmui/src/hooks/useFetchQuery.ts b/app/vmui/packages/vmui/src/hooks/useFetchQuery.ts index bcb19472c..bfd7953b2 100644 --- a/app/vmui/packages/vmui/src/hooks/useFetchQuery.ts +++ b/app/vmui/packages/vmui/src/hooks/useFetchQuery.ts @@ -17,9 +17,10 @@ interface FetchQueryParams { visible: boolean display?: DisplayType, customStep: number, + hideQuery?: number[] } -export const useFetchQuery = ({ predefinedQuery, visible, display, customStep }: FetchQueryParams): { +export const useFetchQuery = ({ predefinedQuery, visible, display, customStep, hideQuery = [] }: FetchQueryParams): { fetchUrl?: string[], isLoading: boolean, graphData?: MetricResult[], @@ -111,14 +112,14 @@ export const useFetchQuery = ({ predefinedQuery, visible, display, customStep }: } else if (isValidHttpUrl(serverUrl)) { const updatedPeriod = { ...period }; updatedPeriod.step = customStep; - return expr.filter(q => q.trim()).map(q => displayChart + return expr.filter((q, i) => q.trim() && !hideQuery.includes(i)).map(q => displayChart ? getQueryRangeUrl(serverUrl, q, updatedPeriod, nocache, isTracingEnabled) : getQueryUrl(serverUrl, q, updatedPeriod, isTracingEnabled)); } else { setError(ErrorTypes.validServer); } }, - [serverUrl, period, displayType, customStep]); + [serverUrl, period, displayType, customStep, hideQuery]); useEffect(() => { if (!visible || !fetchUrl?.length) return; diff --git a/app/vmui/packages/vmui/src/pages/CustomPanel/QueryConfigurator/QueryConfigurator.tsx b/app/vmui/packages/vmui/src/pages/CustomPanel/QueryConfigurator/QueryConfigurator.tsx index 4fd10243a..543e91c1b 100644 --- a/app/vmui/packages/vmui/src/pages/CustomPanel/QueryConfigurator/QueryConfigurator.tsx +++ b/app/vmui/packages/vmui/src/pages/CustomPanel/QueryConfigurator/QueryConfigurator.tsx @@ -6,24 +6,28 @@ import usePrevious from "../../../hooks/usePrevious"; import { MAX_QUERY_FIELDS } from "../../../constants/graph"; import { useQueryDispatch, useQueryState } from "../../../state/query/QueryStateContext"; import { useTimeDispatch } from "../../../state/time/TimeStateContext"; -import { DeleteIcon, PlayIcon, PlusIcon } from "../../../components/Main/Icons"; +import { DeleteIcon, PlayIcon, PlusIcon, VisibilityIcon, VisibilityOffIcon } from "../../../components/Main/Icons"; import Button from "../../../components/Main/Button/Button"; import "./style.scss"; import Tooltip from "../../../components/Main/Tooltip/Tooltip"; +import classNames from "classnames"; export interface QueryConfiguratorProps { error?: ErrorTypes | string; queryOptions: string[] + onHideQuery: (queries: number[]) => void } -const QueryConfigurator: FC = ({ error, queryOptions }) => { +const QueryConfigurator: FC = ({ error, queryOptions, onHideQuery }) => { const { query, queryHistory, autocomplete } = useQueryState(); const queryDispatch = useQueryDispatch(); const timeDispatch = useTimeDispatch(); const [stateQuery, setStateQuery] = useState(query || []); + const [hideQuery, setHideQuery] = useState([]); const prevStateQuery = usePrevious(stateQuery) as (undefined | string[]); + const updateHistory = () => { queryDispatch({ type: "SET_QUERY_HISTORY", payload: stateQuery.map((q, i) => { @@ -51,6 +55,10 @@ const QueryConfigurator: FC = ({ error, queryOptions }) setStateQuery(prev => prev.filter((q, i) => i !== index)); }; + const onToggleHideQuery = (index: number) => { + setHideQuery(prev => prev.includes(index) ? prev.filter(n => n !== index) : [...prev, index]); + }; + const handleChangeQuery = (value: string, index: number) => { setStateQuery(prev => prev.map((q, i) => i === index ? value : q)); }; @@ -76,6 +84,11 @@ const QueryConfigurator: FC = ({ error, queryOptions }) const createHandlerRemoveQuery = (i: number) => () => { onRemoveQuery(i); + setHideQuery(prev => prev.map(n => n > i ? n - 1: n)); + }; + + const createHandlerHideQuery = (i: number) => () => { + onToggleHideQuery(i); }; useEffect(() => { @@ -84,11 +97,18 @@ const QueryConfigurator: FC = ({ error, queryOptions }) } }, [stateQuery]); + useEffect(() => { + onHideQuery(hideQuery); + }, [hideQuery]); + return
{stateQuery.map((q, i) => (
= ({ error, queryOptions }) onEnter={onRunQuery} onChange={createHandlerChangeQuery(i)} label={`Query ${i + 1}`} - size={"small"} + disabled={hideQuery.includes(i)} /> + +
+
+
{stateQuery.length > 1 && (
diff --git a/app/vmui/packages/vmui/src/pages/CustomPanel/QueryConfigurator/style.scss b/app/vmui/packages/vmui/src/pages/CustomPanel/QueryConfigurator/style.scss index cfbbf2d90..678988f10 100644 --- a/app/vmui/packages/vmui/src/pages/CustomPanel/QueryConfigurator/style.scss +++ b/app/vmui/packages/vmui/src/pages/CustomPanel/QueryConfigurator/style.scss @@ -9,10 +9,15 @@ &-row { display: grid; - grid-template-columns: 1fr auto; + grid-template-columns: 1fr auto auto; align-items: center; gap: $padding-small; + &_disabled { + filter: grayscale(100%); + opacity: 0.5; + } + &__button { display: grid; width: 36px; diff --git a/app/vmui/packages/vmui/src/pages/CustomPanel/index.tsx b/app/vmui/packages/vmui/src/pages/CustomPanel/index.tsx index c95997886..0f2701b1d 100644 --- a/app/vmui/packages/vmui/src/pages/CustomPanel/index.tsx +++ b/app/vmui/packages/vmui/src/pages/CustomPanel/index.tsx @@ -29,10 +29,18 @@ const CustomPanel: FC = () => { const [displayColumns, setDisplayColumns] = useState(); const [tracesState, setTracesState] = useState([]); + const [hideQuery, setHideQuery] = useState([]); const { customStep, yaxis } = useGraphState(); const graphDispatch = useGraphDispatch(); + const { queryOptions } = useFetchQueryOptions(); + const { isLoading, liveData, graphData, error, warning, traces } = useFetchQuery({ + visible: true, + customStep, + hideQuery + }); + const setYaxisLimits = (limits: AxisRange) => { graphDispatch({ type: "SET_YAXIS_LIMITS", payload: limits }); }; @@ -45,17 +53,15 @@ const CustomPanel: FC = () => { timeDispatch({ type: "SET_PERIOD", payload: { from, to } }); }; - const { queryOptions } = useFetchQueryOptions(); - const { isLoading, liveData, graphData, error, warning, traces } = useFetchQuery({ - visible: true, - customStep - }); - const handleTraceDelete = (trace: Trace) => { const updatedTraces = tracesState.filter((data) => data.idValue !== trace.idValue); setTracesState([...updatedTraces]); }; + const handleHideQuery = (queries: number[]) => { + setHideQuery(queries); + }; + useEffect(() => { if (traces) { setTracesState([...tracesState, ...traces]); @@ -71,6 +77,7 @@ const CustomPanel: FC = () => { {isTracingEnabled && (
@@ -80,22 +87,26 @@ const CustomPanel: FC = () => { />
)} + {isLoading && } {error && {error}} {warning && {warning}}
- {isLoading && }
- {displayType === "chart" && } - {displayType === "table" && } + {displayType === "chart" && ( + + )} + {displayType === "table" && ( + + )}
{graphData && period && (displayType === "chart") && ( { setPeriod={setPeriod} /> )} - {liveData && (displayType === "code") && } + {liveData && (displayType === "code") && ( + + )} {liveData && (displayType === "table") && ( Date: Thu, 17 Nov 2022 18:54:55 +0200 Subject: [PATCH 04/46] app/vmselect/vmui: `make vmui-update` after 51bfd1ab803ae16e2961555cf210bb5d95708dc4 --- README.md | 5 ++++- app/vmselect/vmui/asset-manifest.json | 8 ++++---- app/vmselect/vmui/index.html | 2 +- app/vmselect/vmui/static/css/main.0493d695.css | 1 - app/vmselect/vmui/static/css/main.f2cbb582.css | 1 + app/vmselect/vmui/static/js/main.0b7317e2.js | 2 -- app/vmselect/vmui/static/js/main.d0509bc3.js | 2 ++ ...7317e2.js.LICENSE.txt => main.d0509bc3.js.LICENSE.txt} | 0 docs/CHANGELOG.md | 7 +++---- docs/README.md | 7 ++++++- docs/Single-server-VictoriaMetrics.md | 7 ++++++- 11 files changed, 27 insertions(+), 15 deletions(-) delete mode 100644 app/vmselect/vmui/static/css/main.0493d695.css create mode 100644 app/vmselect/vmui/static/css/main.f2cbb582.css delete mode 100644 app/vmselect/vmui/static/js/main.0b7317e2.js create mode 100644 app/vmselect/vmui/static/js/main.d0509bc3.js rename app/vmselect/vmui/static/js/{main.0b7317e2.js.LICENSE.txt => main.d0509bc3.js.LICENSE.txt} (100%) diff --git a/README.md b/README.md index 5182cace1..ad60fcdbf 100644 --- a/README.md +++ b/README.md @@ -289,7 +289,10 @@ When querying the [backfilled data](https://docs.victoriametrics.com/#backfillin VMUI automatically adjusts the interval between datapoints on the graph depending on the horizontal resolution and on the selected time range. The step value can be customized by changing `Step value` input. -VMUI allows investigating correlations between multiple queries on the same graph. Just click `Add Query` button, enter an additional query in the newly appeared input field and press `Ctrl+Enter`. Results for all the queries should be displayed simultaneously on the same graph. +VMUI allows investigating correlations between multiple queries on the same graph. Just click `Add Query` button, +enter an additional query in the newly appeared input field and press `Enter`. +Results for all the queries are displayed simultaneously on the same graph. +Graphs for a particular query can be temporarily hidden by clicking the `eye` icon on the right side of the input field. See the [example VMUI at VictoriaMetrics playground](https://play.victoriametrics.com/select/accounting/1/6a716b0f-38bc-4856-90ce-448fd713e3fe/prometheus/graph/?g0.expr=100%20*%20sum(rate(process_cpu_seconds_total))%20by%20(job)&g0.range_input=1d). diff --git a/app/vmselect/vmui/asset-manifest.json b/app/vmselect/vmui/asset-manifest.json index 32f4977d6..a1f9aba33 100644 --- a/app/vmselect/vmui/asset-manifest.json +++ b/app/vmselect/vmui/asset-manifest.json @@ -1,12 +1,12 @@ { "files": { - "main.css": "./static/css/main.0493d695.css", - "main.js": "./static/js/main.0b7317e2.js", + "main.css": "./static/css/main.f2cbb582.css", + "main.js": "./static/js/main.d0509bc3.js", "static/js/27.c1ccfd29.chunk.js": "./static/js/27.c1ccfd29.chunk.js", "index.html": "./index.html" }, "entrypoints": [ - "static/css/main.0493d695.css", - "static/js/main.0b7317e2.js" + "static/css/main.f2cbb582.css", + "static/js/main.d0509bc3.js" ] } \ No newline at end of file diff --git a/app/vmselect/vmui/index.html b/app/vmselect/vmui/index.html index 85381f063..6032aabf0 100644 --- a/app/vmselect/vmui/index.html +++ b/app/vmselect/vmui/index.html @@ -1 +1 @@ -VM UI
\ No newline at end of file +VM UI
\ No newline at end of file diff --git a/app/vmselect/vmui/static/css/main.0493d695.css b/app/vmselect/vmui/static/css/main.0493d695.css deleted file mode 100644 index bb6c3d361..000000000 --- a/app/vmselect/vmui/static/css/main.0493d695.css +++ /dev/null @@ -1 +0,0 @@ -.vm-tabs{gap:16px;height:100%;position:relative;-webkit-user-select:none;user-select:none}.vm-tabs,.vm-tabs-item{align-items:center;display:flex;justify-content:center}.vm-tabs-item{color:inherit;cursor:pointer;font-size:inherit;font-weight:inherit;opacity:.6;padding:16px 8px;text-decoration:none;text-transform:uppercase;transition:opacity .2s}.vm-tabs-item_active{opacity:1}.vm-tabs-item__icon{display:grid;margin-right:8px;width:15px}.vm-tabs-item__icon_single{margin-right:0}.vm-tabs__indicator{border-bottom:2px solid;position:absolute;transition:width .2s ease,left .3s cubic-bezier(.28,.84,.42,1)}.vm-alert{grid-gap:8px;align-items:center;background-color:var(--color-background-block);border-radius:8px;box-shadow:1px 2px 12px hsla(0,6%,6%,.08);color:#110f0f;display:grid;font-size:14px;font-weight:500;gap:8px;grid-template-columns:20px 1fr;line-height:1.3;padding:16px;position:relative}.vm-alert:after{border-radius:8px;content:"";height:100%;left:0;opacity:.1;position:absolute;top:0;width:100%;z-index:1}.vm-alert__content,.vm-alert__icon{position:relative;z-index:2}.vm-alert__icon{align-items:center;display:flex;justify-content:center}.vm-alert__content{-webkit-filter:brightness(.6);filter:brightness(.6)}.vm-alert_success{color:var(--color-success)}.vm-alert_success:after{background-color:var(--color-success)}.vm-alert_error{color:var(--color-error)}.vm-alert_error:after{background-color:var(--color-error)}.vm-alert_info{color:var(--color-info)}.vm-alert_info:after{background-color:var(--color-info)}.vm-alert_warning{color:var(--color-warning)}.vm-alert_warning:after{background-color:var(--color-warning)}.vm-popper{background-color:var(--color-background-block);border-radius:4px;box-shadow:0 2px 8px 0 hsla(0,6%,6%,.2);opacity:0;pointer-events:none;position:fixed;transition:opacity .1s ease-in-out;z-index:-99}.vm-popper_open{-webkit-animation:scale .15s cubic-bezier(.28,.84,.42,1);animation:scale .15s cubic-bezier(.28,.84,.42,1);opacity:1;pointer-events:auto;z-index:101}.vm-popper_open_slider{-webkit-animation:slidePopper .3s cubic-bezier(.28,.84,.42,1.1);animation:slidePopper .3s cubic-bezier(.28,.84,.42,1.1);-webkit-transform-origin:top center;transform-origin:top center}.vm-button{align-items:center;border-radius:6px;color:#fff;cursor:pointer;display:flex;font-size:10px;font-weight:500;justify-content:center;line-height:15px;min-height:31px;padding:6px 14px;position:relative;text-transform:uppercase;-webkit-transform-style:preserve-3d;transform-style:preserve-3d;-webkit-user-select:none;user-select:none;white-space:nowrap}.vm-button:hover:after{background-color:hsla(0,6%,6%,.05)}.vm-button:after,.vm-button:before{border-radius:6px;content:"";height:100%;left:0;position:absolute;top:0;transition:background-color .2s ease;width:100%}.vm-button:before{-webkit-transform:translateZ(-2px);transform:translateZ(-2px)}.vm-button:after{background-color:transparent;-webkit-transform:translateZ(-1px);transform:translateZ(-1px)}.vm-button span{align-items:center;display:grid;justify-content:center}.vm-button span svg{width:15px}.vm-button__start-icon{margin-right:6px}.vm-button__end-icon{margin-left:6px}.vm-button_disabled{cursor:not-allowed;opacity:.3}.vm-button_icon{padding:6px 8px}.vm-button_icon .vm-button__end-icon,.vm-button_icon .vm-button__start-icon{margin:0}.vm-button_small{min-height:25px;padding:4px 6px}.vm-button_small span svg{width:13px}.vm-button_contained_primary{color:var(--color-primary-text)}.vm-button_contained_primary:before{background-color:var(--color-primary)}.vm-button_contained_primary:hover:after{background-color:hsla(0,6%,6%,.2)}.vm-button_contained_secondary{color:var(--color-secondary-text)}.vm-button_contained_secondary:before{background-color:var(--color-secondary)}.vm-button_contained_secondary:hover:after{background-color:hsla(0,6%,6%,.2)}.vm-button_contained_success{color:var(--color-success-text)}.vm-button_contained_success:before{background-color:var(--color-success)}.vm-button_contained_success:hover:after{background-color:hsla(0,6%,6%,.2)}.vm-button_contained_error{color:var(--color-error-text)}.vm-button_contained_error:before{background-color:var(--color-error)}.vm-button_text_primary{color:var(--color-primary)}.vm-button_text_secondary{color:var(--color-secondary)}.vm-button_text_success{color:var(--color-success)}.vm-button_text_error{color:var(--color-error)}.vm-button_outlined_primary{border:1px solid var(--color-primary);color:var(--color-primary)}.vm-button_outlined_error{border:1px solid var(--color-error);color:var(--color-error)}.vm-button_outlined_secondary{border:1px solid var(--color-secondary);color:var(--color-secondary)}.vm-button_outlined_success{border:1px solid var(--color-success);color:var(--color-success)}.vm-execution-controls-buttons{border-radius:7px;display:flex;justify-content:space-between;min-width:107px}.vm-execution-controls-buttons__arrow{align-items:center;display:flex;justify-content:center;-webkit-transform:rotate(0);transform:rotate(0);transition:-webkit-transform .2s ease-in-out;transition:transform .2s ease-in-out;transition:transform .2s ease-in-out,-webkit-transform .2s ease-in-out}.vm-execution-controls-buttons__arrow_open{-webkit-transform:rotate(180deg);transform:rotate(180deg)}.vm-execution-controls-list{font-size:12px;max-height:208px;overflow:auto;padding:8px 0;width:124px}.vm-tooltip{-webkit-animation:vm-scale .15s cubic-bezier(.28,.84,.42,1);animation:vm-scale .15s cubic-bezier(.28,.84,.42,1);background-color:rgba(97,97,97,.92);border-radius:4px;box-shadow:0 2px 8px 0 hsla(0,6%,6%,.2);color:#fff;font-size:10px;line-height:150%;opacity:1;padding:3px 8px;pointer-events:auto;position:fixed;transition:opacity .1s ease-in-out;white-space:nowrap;z-index:101}@-webkit-keyframes vm-scale{0%{-webkit-transform:scale(0);transform:scale(0)}to{-webkit-transform:scale(1);transform:scale(1)}}@keyframes vm-scale{0%{-webkit-transform:scale(0);transform:scale(0)}to{-webkit-transform:scale(1);transform:scale(1)}}.vm-time-duration{font-size:12px;max-height:168px;overflow:auto}.vm-calendar{background-color:var(--color-background-block);border-radius:8px;display:grid;font-size:12px;grid-template-rows:auto 1fr auto;padding:16px;-webkit-user-select:none;user-select:none}.vm-calendar__tabs{border-top:1px solid hsla(0,6%,6%,.15);margin:16px -16px -16px}.vm-calendar-header{grid-gap:24px;align-items:center;display:grid;gap:24px;grid-template-columns:1fr auto;justify-content:center;min-height:36px;padding-bottom:16px}.vm-calendar-header-left{grid-gap:8px;align-items:center;cursor:pointer;display:grid;gap:8px;grid-template-columns:auto auto;justify-content:flex-start;transition:opacity .2s ease-in-out}.vm-calendar-header-left:hover{opacity:.8}.vm-calendar-header-left__date{color:#110f0f;font-size:12px;font-weight:700}.vm-calendar-header-left__select-year{align-items:center;display:grid;height:14px;justify-content:center;width:14px}.vm-calendar-header-left__select-year svg{width:100%}.vm-calendar-header-right{grid-gap:8px;align-items:center;display:grid;gap:8px;grid-template-columns:18px 18px;justify-content:center}.vm-calendar-header-right__next,.vm-calendar-header-right__prev{cursor:pointer;transition:opacity .2s ease-in-out}.vm-calendar-header-right__next:hover,.vm-calendar-header-right__prev:hover{opacity:.8}.vm-calendar-header-right__prev{-webkit-transform:rotate(90deg);transform:rotate(90deg)}.vm-calendar-header-right__next{-webkit-transform:rotate(-90deg);transform:rotate(-90deg)}.vm-calendar-body{grid-gap:2px;display:grid;gap:2px;grid-template-columns:repeat(7,32px);grid-template-rows:repeat(6,32px)}.vm-calendar-body,.vm-calendar-body-cell{align-items:center;justify-content:center}.vm-calendar-body-cell{border-radius:50%;display:flex;height:100%;text-align:center}.vm-calendar-body-cell_weekday{color:hsla(0,6%,6%,.6)}.vm-calendar-body-cell_day{cursor:pointer;transition:color .2s ease,background-color .3s ease-in-out}.vm-calendar-body-cell_day:hover{background-color:hsla(0,6%,6%,.05)}.vm-calendar-body-cell_day_empty{pointer-events:none}.vm-calendar-body-cell_day_active{color:#fff}.vm-calendar-body-cell_day_active,.vm-calendar-body-cell_day_active:hover{background-color:var(--color-primary)}.vm-calendar-body-cell_day_today{border:1px solid var(--color-primary)}.vm-calendar-years{grid-gap:8px;display:grid;gap:8px;grid-template-columns:repeat(3,1fr);overflow:auto}.vm-calendar-years__year{align-items:center;border-radius:8px;cursor:pointer;display:flex;justify-content:center;padding:8px 16px;transition:color .2s ease,background-color .3s ease-in-out}.vm-calendar-years__year:hover{background-color:hsla(0,6%,6%,.05)}.vm-calendar-years__year_selected{color:#fff}.vm-calendar-years__year_selected,.vm-calendar-years__year_selected:hover{background-color:var(--color-primary)}.vm-calendar-time-picker{align-items:center;display:flex;flex-direction:column;justify-content:center}.vm-calendar-time-picker-clock{border:1px solid hsla(0,6%,6%,.15);border-radius:50%;box-shadow:1px 2px 12px hsla(0,6%,6%,.08);box-sizing:initial;height:230px;position:relative;width:230px}.vm-calendar-time-picker-clock:after{background-color:var(--color-primary);border-radius:50%;content:"";height:6px;left:50%;position:absolute;top:50%;-webkit-transform:translate(-50%,-50%);transform:translate(-50%,-50%);width:6px}.vm-calendar-time-picker-clock__arrow{background-color:var(--color-primary);height:107px;left:114px;margin-top:8px;opacity:.8;position:absolute;top:0;-webkit-transform-origin:bottom;transform-origin:bottom;transition:-webkit-transform .2s ease-in-out;transition:transform .2s ease-in-out;transition:transform .2s ease-in-out,-webkit-transform .2s ease-in-out;width:2px;z-index:0}.vm-calendar-time-picker-clock__arrow_offset{height:73px;margin-top:42px;z-index:2}.vm-calendar-time-picker-clock__arrow:after{background-color:var(--color-primary);border-radius:50%;content:"";height:30px;left:50%;position:absolute;top:0;-webkit-transform:translateX(-50%);transform:translateX(-50%);width:30px}.vm-calendar-time-picker-clock__time{align-items:flex-start;cursor:pointer;display:flex;height:115px;justify-content:center;left:100px;padding-top:8px;position:absolute;text-align:center;top:0;-webkit-transform-origin:bottom;transform-origin:bottom;width:30px;z-index:1}.vm-calendar-time-picker-clock__time_hide{display:none}.vm-calendar-time-picker-clock__time_offset{height:73px;margin-top:42px;padding:0;z-index:2}.vm-calendar-time-picker-clock__time:hover span{background-color:hsla(0,6%,6%,.1)}.vm-calendar-time-picker-clock__time span{align-items:center;border-radius:50%;display:grid;justify-content:center;min-height:30px;min-width:30px;position:relative;-webkit-transform-origin:center;transform-origin:center;transition:background-color .3s ease}.vm-calendar-time-picker-fields{align-items:center;display:flex;justify-content:space-between;margin-top:16px}.vm-calendar-time-picker-fields span{margin:0 8px}.vm-calendar-time-picker-fields__input{border:1px solid #d8d8d8;border-radius:4px;font-size:14px;height:32px;padding:2px 8px;text-align:center;width:64px}.vm-calendar-time-picker-fields__input:focus{border-color:var(--color-primary)}.vm-time-selector{display:grid;grid-template-columns:repeat(2,230px);padding:16px 0}.vm-time-selector-left{border-right:1px solid hsla(0,6%,6%,.15);display:flex;flex-direction:column;gap:8px;padding:0 16px}.vm-time-selector-left-inputs{align-items:flex-start;display:grid;flex-grow:1;justify-content:stretch}.vm-time-selector-left-inputs__date{grid-gap:8px;align-items:center;border-bottom:1px solid hsla(0,6%,6%,.15);cursor:pointer;display:grid;gap:8px;grid-template-columns:1fr 14px;justify-content:center;margin-bottom:16px;padding-bottom:8px;transition:color .2s ease-in-out,border-bottom-color .3s ease}.vm-time-selector-left-inputs__date:hover{border-bottom-color:var(--color-primary)}.vm-time-selector-left-inputs__date:hover,.vm-time-selector-left-inputs__date:hover svg{color:var(--color-primary)}.vm-time-selector-left-inputs__date label{color:hsla(0,6%,6%,.6);font-size:10px;grid-column:1/3}.vm-time-selector-left-inputs__date svg{color:hsla(0,6%,6%,.6);transition:color .2s ease-in-out}.vm-time-selector-left__controls{grid-gap:8px;display:grid;gap:8px;grid-template-columns:repeat(2,1fr)}.vm-text-field{display:grid;margin:6px 0;position:relative;width:100%}.vm-text-field:after{content:attr(data-replicated-value) " ";visibility:hidden;white-space:pre-wrap}.vm-text-field:after,.vm-text-field__input{background-color:transparent;border:1px solid hsla(0,6%,6%,.15);font-size:12px;grid-area:1/1/2/2;line-height:18px;overflow:hidden;padding:8px 16px;width:100%}.vm-text-field__error,.vm-text-field__helper-text,.vm-text-field__label{background-color:var(--color-background-block);font-size:10px;left:8px;line-height:10px;padding:0 3px;pointer-events:none;position:absolute;-webkit-user-select:none;user-select:none;z-index:2}.vm-text-field__label{color:hsla(0,6%,6%,.6);top:-5px}.vm-text-field__error{bottom:-5px;color:var(--color-error)}.vm-text-field__helper-text{bottom:-5px;color:hsla(0,6%,6%,.6)}.vm-text-field__input{border-radius:4px;display:block;min-height:34px;overflow:hidden;resize:none;transition:border .2s ease}.vm-text-field__input:focus,.vm-text-field__input:hover{border:1px solid var(--color-primary)}.vm-text-field__input_error,.vm-text-field__input_error:focus,.vm-text-field__input_error:hover{border:1px solid var(--color-error)}.vm-text-field__input_icon-start{padding-left:42px}.vm-text-field__input:disabled{background-color:inherit;color:inherit}.vm-text-field__input:disabled:hover{border-color:hsla(0,6%,6%,.4)}.vm-text-field__icon-end,.vm-text-field__icon-start{align-items:center;color:hsla(0,6%,6%,.6);display:flex;height:100%;justify-content:center;left:8px;max-width:15px;position:absolute;top:auto}.vm-text-field__icon-end svg,.vm-text-field__icon-start svg{height:auto;width:100%}.vm-text-field__icon-end{left:auto;right:8px}.vm-modal{align-items:center;background:hsla(0,6%,6%,.55);bottom:0;display:flex;justify-content:center;left:0;position:fixed;right:0;top:0;z-index:100}.vm-modal-content{background:#fff;border-radius:4px;box-shadow:0 0 24px hsla(0,6%,6%,.07);max-height:85vh;overflow:hidden;padding:22px}.vm-modal-content-header{align-items:center;display:grid;grid-template-columns:1fr auto;margin-bottom:22px}.vm-modal-content-header__title{font-size:14px;font-weight:700}.vm-modal-content-header__close{align-items:center;box-sizing:initial;color:#fff;cursor:pointer;display:flex;justify-content:center;padding:10px;width:24px}.vm-modal-content-header__close svg{height:auto;width:100%}.vm-server-configurator{grid-gap:16px;align-items:center;display:grid;gap:16px;width:600px}.vm-server-configurator__footer{align-items:center;display:inline-grid;gap:8px;grid-template-columns:repeat(2,1fr);justify-content:flex-end;margin-left:auto;margin-right:0}.vm-shortcuts{min-width:400px}.vm-shortcuts-section{margin-bottom:24px}.vm-shortcuts-section__title{border-bottom:1px solid hsla(0,6%,6%,.15);font-weight:700;margin-bottom:16px;padding:8px 0}.vm-shortcuts-section-list{grid-gap:16px;display:grid;gap:16px}.vm-shortcuts-section-list-item{grid-gap:8px;align-items:center;display:grid;gap:8px;grid-template-columns:180px 1fr}.vm-shortcuts-section-list-item__key{align-items:center;display:flex;gap:4px}.vm-shortcuts-section-list-item__key code{background-color:#fff;background-repeat:repeat-x;border:1px solid hsla(0,6%,6%,.15);border-radius:4px;color:#110f0f;display:inline-block;font-size:10px;line-height:2;padding:2px 8px 0;text-align:center}.vm-shortcuts-section-list-item__description{font-size:12px}.vm-header{align-items:center;display:flex;gap:48px;justify-content:flex-start;padding:8px 24px}.vm-header_app{padding:8px 0}.vm-header-logo{align-items:center;display:grid;justify-content:center}.vm-header-logo__icon{align-items:center;cursor:pointer;display:flex;margin-bottom:2px;position:relative;width:100%}.vm-header-logo__issue{color:inherit;cursor:pointer;font-size:10px;opacity:.4;text-align:center;text-decoration:underline;transition:opacity .2s;white-space:nowrap}.vm-header-logo__issue:hover{opacity:.8}.vm-header-nav{font-size:10px;font-weight:600}.vm-header__settings{align-items:center;display:flex;flex-grow:1;gap:8px;justify-content:flex-end}.vm-container{display:flex;flex-direction:column;min-height:calc(100vh - var(--scrollbar-height))}.vm-container-body{background-color:var(--color-background-body);flex-grow:1;min-height:100%;padding:24px}.vm-container-body_app{background-color:transparent;padding:8px 0}.uplot,.uplot *,.uplot :after,.uplot :before{box-sizing:border-box}.uplot{font-family: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;line-height:1.5;width:-webkit-min-content;width:min-content}.u-title{font-size:18px;font-weight:700;text-align:center}.u-wrap{position:relative;-webkit-user-select:none;user-select:none}.u-over,.u-under{position:absolute}.u-under{overflow:hidden}.uplot canvas{display:block;height:100%;position:relative;width:100%}.u-axis{position:absolute}.u-legend{margin:auto;text-align:center}.u-inline{display:block}.u-inline *{display:inline-block}.u-inline tr{margin-right:16px}.u-legend th{font-weight:600}.u-legend th>*{display:inline-block;vertical-align:middle}.u-legend .u-marker{background-clip:padding-box!important;height:1em;margin-right:4px;width:1em}.u-inline.u-live th:after{content:":";vertical-align:middle}.u-inline:not(.u-live) .u-value{display:none}.u-series>*{padding:4px}.u-series th{cursor:pointer}.u-legend .u-off>*{opacity:.3}.u-select{background:rgba(0,0,0,.07)}.u-cursor-x,.u-cursor-y,.u-select{pointer-events:none;position:absolute}.u-cursor-x,.u-cursor-y{left:0;top:0;will-change:transform;z-index:100}.u-hz .u-cursor-x,.u-vt .u-cursor-y{border-right:1px dashed #607d8b;height:100%}.u-hz .u-cursor-y,.u-vt .u-cursor-x{border-bottom:1px dashed #607d8b;width:100%}.u-cursor-pt{background-clip:padding-box!important;border:0 solid;border-radius:50%;left:0;pointer-events:none;position:absolute;top:0;will-change:transform;z-index:100}.u-axis.u-off,.u-cursor-pt.u-off,.u-cursor-x.u-off,.u-cursor-y.u-off,.u-select.u-off{display:none}.vm-line-chart{height:500px;pointer-events:auto}.u-tooltip,.vm-line-chart_panning{pointer-events:none}.u-tooltip{grid-gap:16px;word-wrap:break-word;background:rgba(97,97,97,.92);border-radius:8px;color:#fff;display:none;font-family:monospace;font-size:10px;font-weight:400;line-height:1.4;max-width:300px;padding:8px;position:absolute;z-index:100}.u-tooltip-data{align-items:center;display:flex;flex-wrap:wrap;line-height:150%}.u-tooltip-data__value{font-weight:700;padding:4px}.u-tooltip__info{grid-gap:4px;display:grid}.u-tooltip__marker{height:12px;margin-right:8px;width:12px}.vm-legend-item{grid-gap:8px;align-items:start;background-color:var(--color-background-block);cursor:pointer;display:grid;grid-template-columns:auto auto;justify-content:start;padding:8px 48px 8px 8px;transition:.2s ease}.vm-legend-item:hover{background-color:rgba(0,0,0,.1)}.vm-legend-item_hide{opacity:.5;text-decoration:line-through}.vm-legend-item__marker{border-radius:2px;box-sizing:border-box;height:14px;transition:.2s ease;width:14px}.vm-legend-item-info{font-weight:400}.vm-legend-item-info__free-fields{cursor:pointer;padding:3px}.vm-legend-item-info__free-fields:hover{text-decoration:underline}.vm-legend-item-info__free-fields:not(:last-child):after{content:","}.vm-legend{cursor:default;display:flex;flex-wrap:wrap;margin-top:24px;position:relative}.vm-legend-group{margin:0 16px 16px 0;min-width:23%}.vm-legend-group-title{align-items:center;border-bottom:1px solid hsla(0,6%,6%,.15);display:flex;margin-bottom:1px;padding:0 8px 8px}.vm-legend-group-title__count{font-weight:700;margin-right:8px}.vm-graph-view{width:100%}.vm-graph-view_full-width{width:calc(100vw - 96px - var(--scrollbar-width))}.vm-query-editor-autocomplete{max-height:300px;overflow:auto}.vm-additional-settings{align-items:center;display:inline-flex;flex-wrap:wrap;gap:24px;justify-content:flex-start}.vm-additional-settings__input{flex-basis:160px;margin-bottom:-6px}.vm-switch{align-items:center;cursor:pointer;display:flex;justify-content:flex-start}.vm-switch_disabled{cursor:default;opacity:.6}.vm-switch_secondary_active .vm-switch-track{background-color:var(--color-secondary)}.vm-switch_primary_active .vm-switch-track{background-color:var(--color-primary)}.vm-switch_active .vm-switch-track__thumb{left:20px}.vm-switch:hover .vm-switch-track{opacity:.8}.vm-switch-track{align-items:center;background-color:hsla(0,6%,6%,.4);border-radius:17px;display:flex;height:17px;justify-content:flex-start;padding:3px;position:relative;transition:background-color .2s ease,opacity .3s ease-out;width:34px}.vm-switch-track__thumb{background-color:var(--color-background-block);border-radius:50%;left:3px;min-height:11px;min-width:11px;position:absolute;top:auto;-webkit-transform-style:preserve-3d;transform-style:preserve-3d;transition:right .2s ease-out,left .2s ease-out}.vm-switch__label{color:inherit;font-size:inherit;margin-left:8px;transition:color .2s ease;white-space:nowrap}.vm-query-configurator{grid-gap:8px;display:grid;gap:8px}.vm-query-configurator-list{display:grid}.vm-query-configurator-list-row{grid-gap:8px;align-items:center;display:grid;gap:8px;grid-template-columns:1fr auto}.vm-query-configurator-list-row__button{display:grid;min-height:36px;width:36px}.vm-query-configurator-settings{align-items:flex-end;display:flex;gap:24px;justify-content:space-between}.vm-query-configurator-settings__buttons{grid-gap:8px;display:grid;gap:8px;grid-template-columns:repeat(2,auto)}.vm-json-view__copy{display:flex;justify-content:flex-end;position:-webkit-sticky;position:sticky;top:24px;z-index:2}.vm-json-view__code{font-size:12px;line-height:1.4;-webkit-transform:translateY(-32px);transform:translateY(-32px)}.vm-axes-limits{max-width:300px}.vm-axes-limits,.vm-axes-limits-list{grid-gap:16px;align-items:center;display:grid;gap:16px}.vm-axes-limits-list__inputs{grid-gap:8px;display:grid;gap:8px;grid-template-columns:repeat(2,120px)}.vm-graph-settings-popper{grid-gap:16px;display:grid;gap:16px;padding:0 0 16px}.vm-graph-settings-popper__body{grid-gap:8px;display:grid;gap:8px;padding:0 16px}.vm-spinner{align-items:center;-webkit-animation:vm-fade 2s cubic-bezier(.28,.84,.42,1.1);animation:vm-fade 2s cubic-bezier(.28,.84,.42,1.1);background-color:hsla(0,0%,100%,.5);bottom:0;display:flex;flex-direction:column;justify-content:center;left:0;pointer-events:none;position:fixed;right:0;top:0;z-index:99}.vm-spinner__message{color:hsla(0,6%,6%,.9);font-size:14px;line-height:1.3;margin-top:24px;text-align:center;white-space:pre-line}.half-circle-spinner,.half-circle-spinner *{box-sizing:border-box}.half-circle-spinner{border-radius:100%;height:60px;position:relative;width:60px}.half-circle-spinner .circle{border:6px solid transparent;border-radius:100%;content:"";height:100%;position:absolute;width:100%}.half-circle-spinner .circle.circle-1{-webkit-animation:half-circle-spinner-animation 1s infinite;animation:half-circle-spinner-animation 1s infinite;border-top-color:var(--color-primary)}.half-circle-spinner .circle.circle-2{-webkit-animation:half-circle-spinner-animation 1s infinite alternate;animation:half-circle-spinner-animation 1s infinite alternate;border-bottom-color:var(--color-primary)}@-webkit-keyframes half-circle-spinner-animation{0%{-webkit-transform:rotate(0deg);transform:rotate(0deg)}to{-webkit-transform:rotate(1turn);transform:rotate(1turn)}}@keyframes half-circle-spinner-animation{0%{-webkit-transform:rotate(0deg);transform:rotate(0deg)}to{-webkit-transform:rotate(1turn);transform:rotate(1turn)}}@-webkit-keyframes vm-fade{0%{opacity:0}to{opacity:1}}@keyframes vm-fade{0%{opacity:0}to{opacity:1}}.vm-tracings-view{grid-gap:24px;display:grid;gap:24px}.vm-tracings-view-trace-header{align-items:center;border-bottom:1px solid hsla(0,6%,6%,.15);display:flex;justify-content:space-between;padding:8px 8px 8px 24px}.vm-tracings-view-trace-header-title{font-size:14px;margin-right:8px}.vm-tracings-view-trace-header-title__query{font-weight:700}.vm-tracings-view-trace__nav{padding:24px 24px 24px 0}.vm-line-progress{grid-gap:8px;align-items:center;color:hsla(0,6%,6%,.6);display:grid;gap:8px;grid-template-columns:1fr auto;justify-content:center}.vm-line-progress-track{background-color:hsla(0,6%,6%,.05);border-radius:4px;height:20px;width:100%}.vm-line-progress-track__thumb{background-color:#1a90ff;border-radius:4px;height:100%}.vm-nested-nav{background-color:rgba(201,227,246,.4);border-radius:4px;margin-left:24px}.vm-nested-nav-header{grid-gap:8px;border-radius:4px;cursor:pointer;display:grid;gap:8px;grid-template-columns:auto 1fr;padding:8px;transition:background-color .2s ease-in-out}.vm-nested-nav-header:hover{background-color:hsla(0,6%,6%,.06)}.vm-nested-nav-header__icon{align-items:center;display:flex;justify-content:center;transition:-webkit-transform .2s ease-in-out;transition:transform .2s ease-in-out;transition:transform .2s ease-in-out,-webkit-transform .2s ease-in-out;width:20px}.vm-nested-nav-header__icon_open{-webkit-transform:rotate(180deg);transform:rotate(180deg)}.vm-nested-nav-header__message,.vm-nested-nav-header__progress{grid-column:2}.vm-nested-nav-header__duration{color:hsla(0,6%,6%,.6);grid-column:2}.vm-table-settings-popper{display:grid}.vm-table-settings-popper-list{grid-gap:8px;display:grid;gap:8px;max-height:350px;overflow:auto;padding:16px 16px 24px}.vm-table-settings-popper-list__item{font-size:12px;text-transform:capitalize}.vm-table-settings-popper__footer{align-items:center;display:inline-grid;gap:8px;grid-template-columns:1fr 1fr;justify-content:center;min-width:200px;padding:0 16px 16px}.vm-checkbox{align-items:center;cursor:pointer;display:flex;justify-content:flex-start;-webkit-user-select:none;user-select:none}.vm-checkbox_disabled{cursor:default;opacity:.6}.vm-checkbox_secondary_active .vm-checkbox-track{background-color:var(--color-secondary)}.vm-checkbox_secondary .vm-checkbox-track{border:1px solid var(--color-secondary)}.vm-checkbox_primary_active .vm-checkbox-track{background-color:var(--color-primary)}.vm-checkbox_primary .vm-checkbox-track{border:1px solid var(--color-primary)}.vm-checkbox_active .vm-checkbox-track__thumb{-webkit-transform:scale(1);transform:scale(1)}.vm-checkbox:hover .vm-checkbox-track{opacity:.8}.vm-checkbox-track{align-items:center;background-color:transparent;border-radius:4px;display:flex;height:16px;justify-content:center;padding:2px;position:relative;transition:background-color .2s ease,opacity .3s ease-out;width:16px}.vm-checkbox-track__thumb{align-items:center;color:#fff;display:grid;height:12px;justify-content:center;-webkit-transform:scale(0);transform:scale(0);transition:-webkit-transform .1s ease-in-out;transition:transform .1s ease-in-out;transition:transform .1s ease-in-out,-webkit-transform .1s ease-in-out;width:12px}.vm-checkbox-track__thumb svg{width:100%}.vm-checkbox__label{color:inherit;font-size:inherit;margin-left:8px;transition:color .2s ease;white-space:nowrap}.vm-custom-panel{grid-gap:24px;align-items:flex-start;display:grid;gap:24px;height:100%}.vm-custom-panel-body{position:relative}.vm-custom-panel-body-header{display:flex;font-size:10px;justify-content:space-between;margin:-24px -24px 24px;padding:0 24px;position:relative;z-index:1}.vm-custom-panel-body-header,.vm-predefined-panel-header{align-items:center;border-bottom:1px solid hsla(0,6%,6%,.15)}.vm-predefined-panel-header{grid-gap:8px;display:grid;gap:8px;grid-template-columns:auto 1fr 160px auto;justify-content:flex-start;padding:8px 16px}.vm-predefined-panel-header__description{line-height:1.3;white-space:pre-wrap}.vm-predefined-panel-header__description ol,.vm-predefined-panel-header__description ul{list-style-position:inside}.vm-predefined-panel-header__description a{color:#c9e3f6;text-decoration:underline}.vm-predefined-panel-header__info{align-items:center;color:var(--color-primary);display:flex;justify-content:center;width:18px}.vm-predefined-panel-body{padding:8px 16px}.vm-accordion-header{align-items:center;cursor:pointer;display:grid;font-size:inherit;position:relative}.vm-accordion-header__arrow{align-items:center;display:flex;justify-content:center;position:absolute;right:14px;top:auto;-webkit-transform:rotate(0);transform:rotate(0);transition:-webkit-transform .2s ease-in-out;transition:transform .2s ease-in-out;transition:transform .2s ease-in-out,-webkit-transform .2s ease-in-out}.vm-accordion-header__arrow_open{-webkit-transform:rotate(180deg);transform:rotate(180deg)}.vm-accordion-header__arrow svg{height:auto;width:14px}.accordion-section{overflow:hidden}.vm-predefined-dashboard{background-color:transparent}.vm-predefined-dashboard-header{align-items:center;border-radius:4px;box-shadow:1px 2px 12px hsla(0,6%,6%,.08);display:grid;font-weight:700;grid-template-columns:1fr auto;justify-content:space-between;line-height:14px;overflow:hidden;padding:16px;position:relative;-webkit-transform-style:preserve-3d;transform-style:preserve-3d;transition:box-shadow .2s ease-in-out}.vm-predefined-dashboard-header_open{border-radius:4px 4px 0 0;box-shadow:none}.vm-predefined-dashboard-header__title{font-size:12px}.vm-predefined-dashboard-header__count{font-size:10px;grid-column:2;margin-right:30px}.vm-predefined-dashboard-panels{grid-gap:16px;display:grid;gap:16px;grid-template-columns:repeat(12,1fr);padding:0}.vm-predefined-dashboard-panels-panel{border-radius:8px;overflow:hidden;position:relative}.vm-predefined-dashboard-panels-panel:hover .vm-predefined-dashboard-panels-panel__resizer{-webkit-transform:scale(1);transform:scale(1)}.vm-predefined-dashboard-panels-panel__resizer{bottom:0;cursor:se-resize;height:20px;position:absolute;right:0;-webkit-transform:scale(0);transform:scale(0);transition:-webkit-transform .2s ease-in-out;transition:transform .2s ease-in-out;transition:transform .2s ease-in-out,-webkit-transform .2s ease-in-out;width:20px;z-index:1}.vm-predefined-dashboard-panels-panel__resizer:after{border-bottom:2px solid hsla(0,6%,6%,.2);border-right:2px solid hsla(0,6%,6%,.2);bottom:5px;content:"";height:5px;position:absolute;right:5px;width:5px}.vm-predefined-dashboard-panels-panel__alert{grid-column:span 12}.vm-predefined-panels{grid-gap:16px;align-items:flex-start;display:grid;gap:16px}.vm-predefined-panels-tabs{align-items:center;display:flex;font-size:10px;justify-content:flex-start;overflow:hidden}.vm-predefined-panels-tabs__tab{border-right:1px solid hsla(0,6%,6%,.15);cursor:pointer;padding:16px;text-transform:uppercase;transition:opacity .2s ease-in-out,color .15s ease-in}.vm-predefined-panels-tabs__tab:hover{opacity:1}.vm-predefined-panels__dashboards{grid-gap:16px;display:grid;gap:16px}.vm-cardinality-configurator{grid-gap:8px;display:grid;gap:8px}.vm-cardinality-configurator-controls{align-items:center;display:flex;flex-wrap:wrap;gap:0 24px;justify-content:flex-start}.vm-cardinality-configurator-controls__query{flex-grow:1}.vm-cardinality-configurator-bottom{grid-gap:24px;align-items:flex-end;display:grid;gap:24px;grid-template-columns:1fr auto}.vm-cardinality-configurator-bottom__info{font-size:12px}.u-legend{color:#110f0f;font-family:Lato,sans-serif;font-size:14px}.u-legend .u-thead{display:none}.u-legend .u-series{display:flex;gap:8px}.u-legend .u-series th{display:none}.u-legend .u-series td:nth-child(2):after{content:":";margin-left:8px}.u-legend .u-series .u-value{display:block;padding:0;text-align:left}.vm-metrics-content-header{margin:-24px -24px 24px}.vm-cardinality-panel{grid-gap:24px;align-items:flex-start;display:grid;gap:24px}.vm-top-queries-panel-header{margin:-24px -24px 24px}.vm-top-queries{grid-gap:24px;align-items:flex-start;display:grid;gap:24px}.vm-top-queries-controls{grid-gap:8px;display:grid;gap:8px}.vm-top-queries-controls-bottom,.vm-top-queries-controls__fields{grid-gap:24px;display:grid;gap:24px;grid-template-columns:1fr auto}.vm-top-queries-controls-bottom{align-items:flex-end;justify-content:space-between}.vm-top-queries-controls-bottom__button{align-items:center;display:flex;justify-content:flex-end}.vm-top-queries-panels{grid-gap:24px;display:grid;gap:24px}#root,body,html{background-attachment:fixed;background-repeat:no-repeat;color:#110f0f;cursor:default;font-family:Lato,sans-serif;font-size:12px;margin:0;min-height:100%}body{overflow:scroll}*{cursor:inherit;font:inherit}code{font-family:JetBrains Mono,monospace}b{font-weight:700}input[type=number]::-webkit-inner-spin-button,input[type=number]::-webkit-outer-spin-button{-webkit-appearance:none;margin:0}.vm-snackbar{bottom:16px;left:16px;position:fixed;z-index:9}a,abbr,acronym,address,applet,article,aside,audio,big,body,canvas,caption,center,cite,code,del,details,dfn,div,em,embed,fieldset,figcaption,figure,footer,form,h1,h2,h3,h4,h5,h6,header,hgroup,html,iframe,img,ins,kbd,label,legend,li,mark,menu,nav,object,ol,output,p,pre,q,ruby,s,samp,section,small,span,strike,strong,sub,summary,sup,table,tbody,td,tfoot,th,thead,time,tr,tt,u,ul,var,video{border:0;margin:0;padding:0;vertical-align:initial}h1,h2,h3,h4,h5,h6{font-weight:400}article,aside,details,figcaption,figure,footer,header,hgroup,menu,nav,section{display:block}body{line-height:1}q:after,q:before{content:""}table{border-collapse:collapse;border-spacing:0}input::-webkit-input-placeholder{opacity:1;-webkit-transition:opacity .3s ease;transition:opacity .3s ease}input::placeholder{opacity:1;transition:opacity .3s ease}input:focus::-webkit-input-placeholder{opacity:0;-webkit-transition:opacity .3s ease;transition:opacity .3s ease}input:focus::placeholder{opacity:0;transition:opacity .3s ease}*{box-sizing:border-box;outline:none}button{background:none;border:none;border-radius:0;padding:0}strong{letter-spacing:1px}input[type=file]{cursor:pointer;font-size:0;height:100%;left:0;opacity:0;position:absolute;top:0;width:100%}input[type=file]:disabled{cursor:not-allowed}a{color:inherit;text-decoration:inherit}input,textarea{-webkit-text-fill-color:inherit;appearance:none;-webkit-appearance:none}input:disabled,textarea:disabled{opacity:1!important}input:placeholder-shown,textarea:placeholder-shown{width:100%}input:-webkit-autofill,input:-webkit-autofill:active,input:-webkit-autofill:focus,input:-webkit-autofill:hover{-webkit-box-shadow:inset 0 0 0 0 #fff!important;width:100%;z-index:2}.vm-header-button{border:1px solid hsla(0,6%,6%,.2)}.vm-list__item{background-color:transparent;cursor:pointer;padding:12px 16px;transition:background-color .2s ease}.vm-list__item:hover,.vm-list__item_active{background-color:hsla(0,6%,6%,.1)}.vm-popper-header{grid-gap:8px;align-items:center;background-color:#3f51b5;background-color:var(--color-primary);border-radius:4px 4px 0 0;color:#fff;display:grid;gap:8px;grid-template-columns:1fr auto;justify-content:space-between;padding:8px 8px 8px 16px}.vm-popper-header__title{font-weight:700}.vm-block{background-color:#fff;background-color:var(--color-background-block);border-radius:8px;box-shadow:1px 2px 12px hsla(0,6%,6%,.08);padding:24px}.vm-block_empty-padding{padding:0}.vm-section-header{align-items:center;border-bottom:1px solid hsla(0,6%,6%,.15);border-radius:8px 8px 0 0;display:grid;grid-template-columns:1fr auto;justify-content:center;padding:0 24px}.vm-section-header__title{font-size:12px;font-weight:700}.vm-section-header__tabs{align-items:center;display:flex;font-size:10px;justify-content:flex-start}.vm-table{border-collapse:initial;border-spacing:0;margin-top:-24px;width:100%}.vm-table,.vm-table__row{background-color:#fff;background-color:var(--color-background-block)}.vm-table__row{transition:background-color .2s ease}.vm-table__row:hover:not(.vm-table__row_header){background-color:hsla(0,6%,6%,.05)}.vm-table__row_header{position:-webkit-sticky;position:sticky;top:0;z-index:2}.vm-table__row_selected{background-color:rgba(26,144,255,.05)}.vm-table-cell{border-bottom:1px solid hsla(0,6%,6%,.15);height:40px;padding:8px;vertical-align:middle}.vm-table-cell__content{align-items:center;display:flex;justify-content:flex-start}.vm-table-cell_sort{cursor:pointer}.vm-table-cell_sort:hover{background-color:hsla(0,6%,6%,.05)}.vm-table-cell_header{font-weight:700;text-align:left;text-transform:capitalize}.vm-table-cell_gray{color:hsla(0,6%,6%,.4)}.vm-table-cell_right{text-align:right}.vm-table-cell_right .vm-table-cell__content{justify-content:flex-end}.vm-table-cell_no-wrap{white-space:nowrap}.vm-table__sort-icon{align-items:center;display:flex;justify-content:center;margin:0 8px;opacity:.4;transition:opacity .2s ease,-webkit-transform .2s ease-in-out;transition:opacity .2s ease,transform .2s ease-in-out;transition:opacity .2s ease,transform .2s ease-in-out,-webkit-transform .2s ease-in-out;width:15px}.vm-table__sort-icon_active{opacity:1}.vm-table__sort-icon_desc{-webkit-transform:rotate(180deg);transform:rotate(180deg)}:root{--color-primary:#3f51b5;--color-secondary:#e91e63;--color-error:#fd080e;--color-warning:#ff8308;--color-info:#03a9f4;--color-success:#4caf50;--color-primary-text:#fff;--color-secondary-text:#fff;--color-error-text:#fff;--color-warning-text:#fff;--color-info-text:#fff;--color-success-text:#fff;--color-background-body:#fefeff;--color-background-block:#fff} \ No newline at end of file diff --git a/app/vmselect/vmui/static/css/main.f2cbb582.css b/app/vmselect/vmui/static/css/main.f2cbb582.css new file mode 100644 index 000000000..e96da66ec --- /dev/null +++ b/app/vmselect/vmui/static/css/main.f2cbb582.css @@ -0,0 +1 @@ +.vm-tabs{gap:16px;height:100%;position:relative;-webkit-user-select:none;user-select:none}.vm-tabs,.vm-tabs-item{align-items:center;display:flex;justify-content:center}.vm-tabs-item{color:inherit;cursor:pointer;font-size:inherit;font-weight:inherit;opacity:.6;padding:16px 8px;text-decoration:none;text-transform:uppercase;transition:opacity .2s}.vm-tabs-item_active{opacity:1}.vm-tabs-item__icon{display:grid;margin-right:8px;width:15px}.vm-tabs-item__icon_single{margin-right:0}.vm-tabs__indicator{border-bottom:2px solid;position:absolute;transition:width .2s ease,left .3s cubic-bezier(.28,.84,.42,1)}.vm-alert{grid-gap:8px;align-items:center;background-color:var(--color-background-block);border-radius:8px;box-shadow:1px 2px 12px hsla(0,6%,6%,.08);color:#110f0f;display:grid;font-size:14px;font-weight:500;gap:8px;grid-template-columns:20px 1fr;line-height:1.3;padding:16px;position:relative}.vm-alert:after{border-radius:8px;content:"";height:100%;left:0;opacity:.1;position:absolute;top:0;width:100%;z-index:1}.vm-alert__content,.vm-alert__icon{position:relative;z-index:2}.vm-alert__icon{align-items:center;display:flex;justify-content:center}.vm-alert__content{-webkit-filter:brightness(.6);filter:brightness(.6)}.vm-alert_success{color:var(--color-success)}.vm-alert_success:after{background-color:var(--color-success)}.vm-alert_error{color:var(--color-error)}.vm-alert_error:after{background-color:var(--color-error)}.vm-alert_info{color:var(--color-info)}.vm-alert_info:after{background-color:var(--color-info)}.vm-alert_warning{color:var(--color-warning)}.vm-alert_warning:after{background-color:var(--color-warning)}.vm-popper{background-color:var(--color-background-block);border-radius:4px;box-shadow:0 2px 8px 0 hsla(0,6%,6%,.2);opacity:0;pointer-events:none;position:fixed;transition:opacity .1s ease-in-out;z-index:-99}.vm-popper_open{-webkit-animation:scale .15s cubic-bezier(.28,.84,.42,1);animation:scale .15s cubic-bezier(.28,.84,.42,1);opacity:1;pointer-events:auto;z-index:101}.vm-popper_open_slider{-webkit-animation:slidePopper .3s cubic-bezier(.28,.84,.42,1.1);animation:slidePopper .3s cubic-bezier(.28,.84,.42,1.1);-webkit-transform-origin:top center;transform-origin:top center}.vm-button{align-items:center;border-radius:6px;color:#fff;cursor:pointer;display:flex;font-size:10px;font-weight:500;justify-content:center;line-height:15px;min-height:31px;padding:6px 14px;position:relative;text-transform:uppercase;-webkit-transform-style:preserve-3d;transform-style:preserve-3d;-webkit-user-select:none;user-select:none;white-space:nowrap}.vm-button:hover:after{background-color:hsla(0,6%,6%,.05)}.vm-button:after,.vm-button:before{border-radius:6px;content:"";height:100%;left:0;position:absolute;top:0;transition:background-color .2s ease;width:100%}.vm-button:before{-webkit-transform:translateZ(-2px);transform:translateZ(-2px)}.vm-button:after{background-color:transparent;-webkit-transform:translateZ(-1px);transform:translateZ(-1px)}.vm-button span{align-items:center;display:grid;justify-content:center}.vm-button span svg{width:15px}.vm-button__start-icon{margin-right:6px}.vm-button__end-icon{margin-left:6px}.vm-button_disabled{cursor:not-allowed;opacity:.3}.vm-button_icon{padding:6px 8px}.vm-button_icon .vm-button__end-icon,.vm-button_icon .vm-button__start-icon{margin:0}.vm-button_small{min-height:25px;padding:4px 6px}.vm-button_small span svg{width:13px}.vm-button_contained_primary{color:var(--color-primary-text)}.vm-button_contained_primary:before{background-color:var(--color-primary)}.vm-button_contained_primary:hover:after{background-color:hsla(0,6%,6%,.2)}.vm-button_contained_secondary{color:var(--color-secondary-text)}.vm-button_contained_secondary:before{background-color:var(--color-secondary)}.vm-button_contained_secondary:hover:after{background-color:hsla(0,6%,6%,.2)}.vm-button_contained_success{color:var(--color-success-text)}.vm-button_contained_success:before{background-color:var(--color-success)}.vm-button_contained_success:hover:after{background-color:hsla(0,6%,6%,.2)}.vm-button_contained_error{color:var(--color-error-text)}.vm-button_contained_error:before{background-color:var(--color-error)}.vm-button_contained_gray{color:hsla(0,6%,6%,.6)}.vm-button_contained_gray:before{background-color:hsla(0,6%,6%,.6)}.vm-button_text_primary{color:var(--color-primary)}.vm-button_text_secondary{color:var(--color-secondary)}.vm-button_text_success{color:var(--color-success)}.vm-button_text_error{color:var(--color-error)}.vm-button_text_gray{color:hsla(0,6%,6%,.6)}.vm-button_outlined_primary{border:1px solid var(--color-primary);color:var(--color-primary)}.vm-button_outlined_error{border:1px solid var(--color-error);color:var(--color-error)}.vm-button_outlined_secondary{border:1px solid var(--color-secondary);color:var(--color-secondary)}.vm-button_outlined_success{border:1px solid var(--color-success);color:var(--color-success)}.vm-button_outlined_gray{border:1px solid hsla(0,6%,6%,.6);color:hsla(0,6%,6%,.6)}.vm-execution-controls-buttons{border-radius:7px;display:flex;justify-content:space-between;min-width:107px}.vm-execution-controls-buttons__arrow{align-items:center;display:flex;justify-content:center;-webkit-transform:rotate(0);transform:rotate(0);transition:-webkit-transform .2s ease-in-out;transition:transform .2s ease-in-out;transition:transform .2s ease-in-out,-webkit-transform .2s ease-in-out}.vm-execution-controls-buttons__arrow_open{-webkit-transform:rotate(180deg);transform:rotate(180deg)}.vm-execution-controls-list{font-size:12px;max-height:208px;overflow:auto;padding:8px 0;width:124px}.vm-tooltip{-webkit-animation:vm-scale .15s cubic-bezier(.28,.84,.42,1);animation:vm-scale .15s cubic-bezier(.28,.84,.42,1);background-color:rgba(97,97,97,.92);border-radius:4px;box-shadow:0 2px 8px 0 hsla(0,6%,6%,.2);color:#fff;font-size:10px;line-height:150%;opacity:1;padding:3px 8px;pointer-events:auto;position:fixed;transition:opacity .1s ease-in-out;white-space:nowrap;z-index:101}@-webkit-keyframes vm-scale{0%{-webkit-transform:scale(0);transform:scale(0)}to{-webkit-transform:scale(1);transform:scale(1)}}@keyframes vm-scale{0%{-webkit-transform:scale(0);transform:scale(0)}to{-webkit-transform:scale(1);transform:scale(1)}}.vm-time-duration{font-size:12px;max-height:168px;overflow:auto}.vm-calendar{background-color:var(--color-background-block);border-radius:8px;display:grid;font-size:12px;grid-template-rows:auto 1fr auto;padding:16px;-webkit-user-select:none;user-select:none}.vm-calendar__tabs{border-top:1px solid hsla(0,6%,6%,.15);margin:16px -16px -16px}.vm-calendar-header{grid-gap:24px;align-items:center;display:grid;gap:24px;grid-template-columns:1fr auto;justify-content:center;min-height:36px;padding-bottom:16px}.vm-calendar-header-left{grid-gap:8px;align-items:center;cursor:pointer;display:grid;gap:8px;grid-template-columns:auto auto;justify-content:flex-start;transition:opacity .2s ease-in-out}.vm-calendar-header-left:hover{opacity:.8}.vm-calendar-header-left__date{color:#110f0f;font-size:12px;font-weight:700}.vm-calendar-header-left__select-year{align-items:center;display:grid;height:14px;justify-content:center;width:14px}.vm-calendar-header-left__select-year svg{width:100%}.vm-calendar-header-right{grid-gap:8px;align-items:center;display:grid;gap:8px;grid-template-columns:18px 18px;justify-content:center}.vm-calendar-header-right__next,.vm-calendar-header-right__prev{cursor:pointer;transition:opacity .2s ease-in-out}.vm-calendar-header-right__next:hover,.vm-calendar-header-right__prev:hover{opacity:.8}.vm-calendar-header-right__prev{-webkit-transform:rotate(90deg);transform:rotate(90deg)}.vm-calendar-header-right__next{-webkit-transform:rotate(-90deg);transform:rotate(-90deg)}.vm-calendar-body{grid-gap:2px;display:grid;gap:2px;grid-template-columns:repeat(7,32px);grid-template-rows:repeat(6,32px)}.vm-calendar-body,.vm-calendar-body-cell{align-items:center;justify-content:center}.vm-calendar-body-cell{border-radius:50%;display:flex;height:100%;text-align:center}.vm-calendar-body-cell_weekday{color:hsla(0,6%,6%,.6)}.vm-calendar-body-cell_day{cursor:pointer;transition:color .2s ease,background-color .3s ease-in-out}.vm-calendar-body-cell_day:hover{background-color:hsla(0,6%,6%,.05)}.vm-calendar-body-cell_day_empty{pointer-events:none}.vm-calendar-body-cell_day_active{color:#fff}.vm-calendar-body-cell_day_active,.vm-calendar-body-cell_day_active:hover{background-color:var(--color-primary)}.vm-calendar-body-cell_day_today{border:1px solid var(--color-primary)}.vm-calendar-years{grid-gap:8px;display:grid;gap:8px;grid-template-columns:repeat(3,1fr);overflow:auto}.vm-calendar-years__year{align-items:center;border-radius:8px;cursor:pointer;display:flex;justify-content:center;padding:8px 16px;transition:color .2s ease,background-color .3s ease-in-out}.vm-calendar-years__year:hover{background-color:hsla(0,6%,6%,.05)}.vm-calendar-years__year_selected{color:#fff}.vm-calendar-years__year_selected,.vm-calendar-years__year_selected:hover{background-color:var(--color-primary)}.vm-calendar-time-picker{align-items:center;display:flex;flex-direction:column;justify-content:center}.vm-calendar-time-picker-clock{border:1px solid hsla(0,6%,6%,.15);border-radius:50%;box-shadow:1px 2px 12px hsla(0,6%,6%,.08);box-sizing:initial;height:230px;position:relative;width:230px}.vm-calendar-time-picker-clock:after{background-color:var(--color-primary);border-radius:50%;content:"";height:6px;left:50%;position:absolute;top:50%;-webkit-transform:translate(-50%,-50%);transform:translate(-50%,-50%);width:6px}.vm-calendar-time-picker-clock__arrow{background-color:var(--color-primary);height:107px;left:114px;margin-top:8px;opacity:.8;position:absolute;top:0;-webkit-transform-origin:bottom;transform-origin:bottom;transition:-webkit-transform .2s ease-in-out;transition:transform .2s ease-in-out;transition:transform .2s ease-in-out,-webkit-transform .2s ease-in-out;width:2px;z-index:0}.vm-calendar-time-picker-clock__arrow_offset{height:73px;margin-top:42px;z-index:2}.vm-calendar-time-picker-clock__arrow:after{background-color:var(--color-primary);border-radius:50%;content:"";height:30px;left:50%;position:absolute;top:0;-webkit-transform:translateX(-50%);transform:translateX(-50%);width:30px}.vm-calendar-time-picker-clock__time{align-items:flex-start;cursor:pointer;display:flex;height:115px;justify-content:center;left:100px;padding-top:8px;position:absolute;text-align:center;top:0;-webkit-transform-origin:bottom;transform-origin:bottom;width:30px;z-index:1}.vm-calendar-time-picker-clock__time_hide{display:none}.vm-calendar-time-picker-clock__time_offset{height:73px;margin-top:42px;padding:0;z-index:2}.vm-calendar-time-picker-clock__time:hover span{background-color:hsla(0,6%,6%,.1)}.vm-calendar-time-picker-clock__time span{align-items:center;border-radius:50%;display:grid;justify-content:center;min-height:30px;min-width:30px;position:relative;-webkit-transform-origin:center;transform-origin:center;transition:background-color .3s ease}.vm-calendar-time-picker-fields{align-items:center;display:flex;justify-content:space-between;margin-top:16px}.vm-calendar-time-picker-fields span{margin:0 8px}.vm-calendar-time-picker-fields__input{border:1px solid #d8d8d8;border-radius:4px;font-size:14px;height:32px;padding:2px 8px;text-align:center;width:64px}.vm-calendar-time-picker-fields__input:focus{border-color:var(--color-primary)}.vm-time-selector{display:grid;grid-template-columns:repeat(2,230px);padding:16px 0}.vm-time-selector-left{border-right:1px solid hsla(0,6%,6%,.15);display:flex;flex-direction:column;gap:8px;padding:0 16px}.vm-time-selector-left-inputs{align-items:flex-start;display:grid;flex-grow:1;justify-content:stretch}.vm-time-selector-left-inputs__date{grid-gap:8px;align-items:center;border-bottom:1px solid hsla(0,6%,6%,.15);cursor:pointer;display:grid;gap:8px;grid-template-columns:1fr 14px;justify-content:center;margin-bottom:16px;padding-bottom:8px;transition:color .2s ease-in-out,border-bottom-color .3s ease}.vm-time-selector-left-inputs__date:hover{border-bottom-color:var(--color-primary)}.vm-time-selector-left-inputs__date:hover,.vm-time-selector-left-inputs__date:hover svg{color:var(--color-primary)}.vm-time-selector-left-inputs__date label{color:hsla(0,6%,6%,.6);font-size:10px;grid-column:1/3}.vm-time-selector-left-inputs__date svg{color:hsla(0,6%,6%,.6);transition:color .2s ease-in-out}.vm-time-selector-left__controls{grid-gap:8px;display:grid;gap:8px;grid-template-columns:repeat(2,1fr)}.vm-text-field{display:grid;margin:6px 0;position:relative;width:100%}.vm-text-field:after{content:attr(data-replicated-value) " ";visibility:hidden;white-space:pre-wrap}.vm-text-field:after,.vm-text-field__input{background-color:transparent;border:1px solid hsla(0,6%,6%,.15);font-size:12px;grid-area:1/1/2/2;line-height:18px;overflow:hidden;padding:8px 16px;width:100%}.vm-text-field__error,.vm-text-field__helper-text,.vm-text-field__label{background-color:var(--color-background-block);font-size:10px;left:8px;line-height:10px;padding:0 3px;pointer-events:none;position:absolute;-webkit-user-select:none;user-select:none;z-index:2}.vm-text-field__label{color:hsla(0,6%,6%,.6);top:-5px}.vm-text-field__error{bottom:-5px;color:var(--color-error)}.vm-text-field__helper-text{bottom:-5px;color:hsla(0,6%,6%,.6)}.vm-text-field__input{border-radius:4px;display:block;min-height:34px;overflow:hidden;resize:none;transition:border .2s ease}.vm-text-field__input:focus,.vm-text-field__input:hover{border:1px solid var(--color-primary)}.vm-text-field__input_error,.vm-text-field__input_error:focus,.vm-text-field__input_error:hover{border:1px solid var(--color-error)}.vm-text-field__input_icon-start{padding-left:42px}.vm-text-field__input:disabled{background-color:inherit;color:inherit}.vm-text-field__input:disabled:hover{border-color:hsla(0,6%,6%,.4)}.vm-text-field__icon-end,.vm-text-field__icon-start{align-items:center;color:hsla(0,6%,6%,.6);display:flex;height:100%;justify-content:center;left:8px;max-width:15px;position:absolute;top:auto}.vm-text-field__icon-end svg,.vm-text-field__icon-start svg{height:auto;width:100%}.vm-text-field__icon-end{left:auto;right:8px}.vm-modal{align-items:center;background:hsla(0,6%,6%,.55);bottom:0;display:flex;justify-content:center;left:0;position:fixed;right:0;top:0;z-index:100}.vm-modal-content{background:#fff;border-radius:4px;box-shadow:0 0 24px hsla(0,6%,6%,.07);max-height:85vh;overflow:hidden;padding:22px}.vm-modal-content-header{align-items:center;display:grid;grid-template-columns:1fr auto;margin-bottom:22px}.vm-modal-content-header__title{font-size:14px;font-weight:700}.vm-modal-content-header__close{align-items:center;box-sizing:initial;color:#fff;cursor:pointer;display:flex;justify-content:center;padding:10px;width:24px}.vm-modal-content-header__close svg{height:auto;width:100%}.vm-server-configurator{grid-gap:16px;align-items:center;display:grid;gap:16px;width:600px}.vm-server-configurator__footer{align-items:center;display:inline-grid;gap:8px;grid-template-columns:repeat(2,1fr);justify-content:flex-end;margin-left:auto;margin-right:0}.vm-shortcuts{min-width:400px}.vm-shortcuts-section{margin-bottom:24px}.vm-shortcuts-section__title{border-bottom:1px solid hsla(0,6%,6%,.15);font-weight:700;margin-bottom:16px;padding:8px 0}.vm-shortcuts-section-list{grid-gap:16px;display:grid;gap:16px}.vm-shortcuts-section-list-item{grid-gap:8px;align-items:center;display:grid;gap:8px;grid-template-columns:180px 1fr}.vm-shortcuts-section-list-item__key{align-items:center;display:flex;gap:4px}.vm-shortcuts-section-list-item__key code{background-color:#fff;background-repeat:repeat-x;border:1px solid hsla(0,6%,6%,.15);border-radius:4px;color:#110f0f;display:inline-block;font-size:10px;line-height:2;padding:2px 8px 0;text-align:center}.vm-shortcuts-section-list-item__description{font-size:12px}.vm-header{align-items:center;display:flex;gap:48px;justify-content:flex-start;padding:8px 24px}.vm-header_app{padding:8px 0}.vm-header-logo{align-items:center;display:grid;justify-content:center}.vm-header-logo__icon{align-items:center;cursor:pointer;display:flex;margin-bottom:2px;position:relative;width:100%}.vm-header-logo__issue{color:inherit;cursor:pointer;font-size:10px;opacity:.4;text-align:center;text-decoration:underline;transition:opacity .2s;white-space:nowrap}.vm-header-logo__issue:hover{opacity:.8}.vm-header-nav{font-size:10px;font-weight:600}.vm-header__settings{align-items:center;display:flex;flex-grow:1;gap:8px;justify-content:flex-end}.vm-container{display:flex;flex-direction:column;min-height:calc(100vh - var(--scrollbar-height))}.vm-container-body{background-color:var(--color-background-body);flex-grow:1;min-height:100%;padding:24px}.vm-container-body_app{background-color:transparent;padding:8px 0}.uplot,.uplot *,.uplot :after,.uplot :before{box-sizing:border-box}.uplot{font-family: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;line-height:1.5;width:-webkit-min-content;width:min-content}.u-title{font-size:18px;font-weight:700;text-align:center}.u-wrap{position:relative;-webkit-user-select:none;user-select:none}.u-over,.u-under{position:absolute}.u-under{overflow:hidden}.uplot canvas{display:block;height:100%;position:relative;width:100%}.u-axis{position:absolute}.u-legend{margin:auto;text-align:center}.u-inline{display:block}.u-inline *{display:inline-block}.u-inline tr{margin-right:16px}.u-legend th{font-weight:600}.u-legend th>*{display:inline-block;vertical-align:middle}.u-legend .u-marker{background-clip:padding-box!important;height:1em;margin-right:4px;width:1em}.u-inline.u-live th:after{content:":";vertical-align:middle}.u-inline:not(.u-live) .u-value{display:none}.u-series>*{padding:4px}.u-series th{cursor:pointer}.u-legend .u-off>*{opacity:.3}.u-select{background:rgba(0,0,0,.07)}.u-cursor-x,.u-cursor-y,.u-select{pointer-events:none;position:absolute}.u-cursor-x,.u-cursor-y{left:0;top:0;will-change:transform;z-index:100}.u-hz .u-cursor-x,.u-vt .u-cursor-y{border-right:1px dashed #607d8b;height:100%}.u-hz .u-cursor-y,.u-vt .u-cursor-x{border-bottom:1px dashed #607d8b;width:100%}.u-cursor-pt{background-clip:padding-box!important;border:0 solid;border-radius:50%;left:0;pointer-events:none;position:absolute;top:0;will-change:transform;z-index:100}.u-axis.u-off,.u-cursor-pt.u-off,.u-cursor-x.u-off,.u-cursor-y.u-off,.u-select.u-off{display:none}.vm-line-chart{height:500px;pointer-events:auto}.u-tooltip,.vm-line-chart_panning{pointer-events:none}.u-tooltip{grid-gap:16px;word-wrap:break-word;background:rgba(97,97,97,.92);border-radius:8px;color:#fff;display:none;font-family:monospace;font-size:10px;font-weight:400;line-height:1.4;max-width:300px;padding:8px;position:absolute;z-index:100}.u-tooltip-data{align-items:center;display:flex;flex-wrap:wrap;line-height:150%}.u-tooltip-data__value{font-weight:700;padding:4px}.u-tooltip__info{grid-gap:4px;display:grid}.u-tooltip__marker{height:12px;margin-right:8px;width:12px}.vm-legend-item{grid-gap:8px;align-items:start;background-color:var(--color-background-block);cursor:pointer;display:grid;grid-template-columns:auto auto;justify-content:start;padding:8px 48px 8px 8px;transition:.2s ease}.vm-legend-item:hover{background-color:rgba(0,0,0,.1)}.vm-legend-item_hide{opacity:.5;text-decoration:line-through}.vm-legend-item__marker{border-radius:2px;box-sizing:border-box;height:14px;transition:.2s ease;width:14px}.vm-legend-item-info{font-weight:400}.vm-legend-item-info__free-fields{cursor:pointer;padding:3px}.vm-legend-item-info__free-fields:hover{text-decoration:underline}.vm-legend-item-info__free-fields:not(:last-child):after{content:","}.vm-legend{cursor:default;display:flex;flex-wrap:wrap;margin-top:24px;position:relative}.vm-legend-group{margin:0 16px 16px 0;min-width:23%}.vm-legend-group-title{align-items:center;border-bottom:1px solid hsla(0,6%,6%,.15);display:flex;margin-bottom:1px;padding:0 8px 8px}.vm-legend-group-title__count{font-weight:700;margin-right:8px}.vm-graph-view{width:100%}.vm-graph-view_full-width{width:calc(100vw - 96px - var(--scrollbar-width))}.vm-query-editor-autocomplete{max-height:300px;overflow:auto}.vm-additional-settings{align-items:center;display:inline-flex;flex-wrap:wrap;gap:24px;justify-content:flex-start}.vm-additional-settings__input{flex-basis:160px;margin-bottom:-6px}.vm-switch{align-items:center;cursor:pointer;display:flex;justify-content:flex-start}.vm-switch_disabled{cursor:default;opacity:.6}.vm-switch_secondary_active .vm-switch-track{background-color:var(--color-secondary)}.vm-switch_primary_active .vm-switch-track{background-color:var(--color-primary)}.vm-switch_active .vm-switch-track__thumb{left:20px}.vm-switch:hover .vm-switch-track{opacity:.8}.vm-switch-track{align-items:center;background-color:hsla(0,6%,6%,.4);border-radius:17px;display:flex;height:17px;justify-content:flex-start;padding:3px;position:relative;transition:background-color .2s ease,opacity .3s ease-out;width:34px}.vm-switch-track__thumb{background-color:var(--color-background-block);border-radius:50%;left:3px;min-height:11px;min-width:11px;position:absolute;top:auto;-webkit-transform-style:preserve-3d;transform-style:preserve-3d;transition:right .2s ease-out,left .2s ease-out}.vm-switch__label{color:inherit;font-size:inherit;margin-left:8px;transition:color .2s ease;white-space:nowrap}.vm-query-configurator{grid-gap:8px;display:grid;gap:8px}.vm-query-configurator-list{display:grid}.vm-query-configurator-list-row{grid-gap:8px;align-items:center;display:grid;gap:8px;grid-template-columns:1fr auto auto}.vm-query-configurator-list-row_disabled{-webkit-filter:grayscale(100%);filter:grayscale(100%);opacity:.5}.vm-query-configurator-list-row__button{display:grid;min-height:36px;width:36px}.vm-query-configurator-settings{align-items:flex-end;display:flex;gap:24px;justify-content:space-between}.vm-query-configurator-settings__buttons{grid-gap:8px;display:grid;gap:8px;grid-template-columns:repeat(2,auto)}.vm-json-view__copy{display:flex;justify-content:flex-end;position:-webkit-sticky;position:sticky;top:24px;z-index:2}.vm-json-view__code{font-size:12px;line-height:1.4;-webkit-transform:translateY(-32px);transform:translateY(-32px)}.vm-axes-limits{max-width:300px}.vm-axes-limits,.vm-axes-limits-list{grid-gap:16px;align-items:center;display:grid;gap:16px}.vm-axes-limits-list__inputs{grid-gap:8px;display:grid;gap:8px;grid-template-columns:repeat(2,120px)}.vm-graph-settings-popper{grid-gap:16px;display:grid;gap:16px;padding:0 0 16px}.vm-graph-settings-popper__body{grid-gap:8px;display:grid;gap:8px;padding:0 16px}.vm-spinner{align-items:center;-webkit-animation:vm-fade 2s cubic-bezier(.28,.84,.42,1.1);animation:vm-fade 2s cubic-bezier(.28,.84,.42,1.1);background-color:hsla(0,0%,100%,.5);bottom:0;display:flex;flex-direction:column;justify-content:center;left:0;pointer-events:none;position:fixed;right:0;top:0;z-index:99}.vm-spinner__message{color:hsla(0,6%,6%,.9);font-size:14px;line-height:1.3;margin-top:24px;text-align:center;white-space:pre-line}.half-circle-spinner,.half-circle-spinner *{box-sizing:border-box}.half-circle-spinner{border-radius:100%;height:60px;position:relative;width:60px}.half-circle-spinner .circle{border:6px solid transparent;border-radius:100%;content:"";height:100%;position:absolute;width:100%}.half-circle-spinner .circle.circle-1{-webkit-animation:half-circle-spinner-animation 1s infinite;animation:half-circle-spinner-animation 1s infinite;border-top-color:var(--color-primary)}.half-circle-spinner .circle.circle-2{-webkit-animation:half-circle-spinner-animation 1s infinite alternate;animation:half-circle-spinner-animation 1s infinite alternate;border-bottom-color:var(--color-primary)}@-webkit-keyframes half-circle-spinner-animation{0%{-webkit-transform:rotate(0deg);transform:rotate(0deg)}to{-webkit-transform:rotate(1turn);transform:rotate(1turn)}}@keyframes half-circle-spinner-animation{0%{-webkit-transform:rotate(0deg);transform:rotate(0deg)}to{-webkit-transform:rotate(1turn);transform:rotate(1turn)}}@-webkit-keyframes vm-fade{0%{opacity:0}to{opacity:1}}@keyframes vm-fade{0%{opacity:0}to{opacity:1}}.vm-tracings-view{grid-gap:24px;display:grid;gap:24px}.vm-tracings-view-trace-header{align-items:center;border-bottom:1px solid hsla(0,6%,6%,.15);display:flex;justify-content:space-between;padding:8px 8px 8px 24px}.vm-tracings-view-trace-header-title{font-size:14px;margin-right:8px}.vm-tracings-view-trace-header-title__query{font-weight:700}.vm-tracings-view-trace__nav{padding:24px 24px 24px 0}.vm-line-progress{grid-gap:8px;align-items:center;color:hsla(0,6%,6%,.6);display:grid;gap:8px;grid-template-columns:1fr auto;justify-content:center}.vm-line-progress-track{background-color:hsla(0,6%,6%,.05);border-radius:4px;height:20px;width:100%}.vm-line-progress-track__thumb{background-color:#1a90ff;border-radius:4px;height:100%}.vm-nested-nav{background-color:rgba(201,227,246,.4);border-radius:4px;margin-left:24px}.vm-nested-nav-header{grid-gap:8px;border-radius:4px;cursor:pointer;display:grid;gap:8px;grid-template-columns:auto 1fr;padding:8px;transition:background-color .2s ease-in-out}.vm-nested-nav-header:hover{background-color:hsla(0,6%,6%,.06)}.vm-nested-nav-header__icon{align-items:center;display:flex;justify-content:center;transition:-webkit-transform .2s ease-in-out;transition:transform .2s ease-in-out;transition:transform .2s ease-in-out,-webkit-transform .2s ease-in-out;width:20px}.vm-nested-nav-header__icon_open{-webkit-transform:rotate(180deg);transform:rotate(180deg)}.vm-nested-nav-header__message,.vm-nested-nav-header__progress{grid-column:2}.vm-nested-nav-header__duration{color:hsla(0,6%,6%,.6);grid-column:2}.vm-table-settings-popper{display:grid}.vm-table-settings-popper-list{grid-gap:8px;display:grid;gap:8px;max-height:350px;overflow:auto;padding:16px 16px 24px}.vm-table-settings-popper-list__item{font-size:12px;text-transform:capitalize}.vm-table-settings-popper__footer{align-items:center;display:inline-grid;gap:8px;grid-template-columns:1fr 1fr;justify-content:center;min-width:200px;padding:0 16px 16px}.vm-checkbox{align-items:center;cursor:pointer;display:flex;justify-content:flex-start;-webkit-user-select:none;user-select:none}.vm-checkbox_disabled{cursor:default;opacity:.6}.vm-checkbox_secondary_active .vm-checkbox-track{background-color:var(--color-secondary)}.vm-checkbox_secondary .vm-checkbox-track{border:1px solid var(--color-secondary)}.vm-checkbox_primary_active .vm-checkbox-track{background-color:var(--color-primary)}.vm-checkbox_primary .vm-checkbox-track{border:1px solid var(--color-primary)}.vm-checkbox_active .vm-checkbox-track__thumb{-webkit-transform:scale(1);transform:scale(1)}.vm-checkbox:hover .vm-checkbox-track{opacity:.8}.vm-checkbox-track{align-items:center;background-color:transparent;border-radius:4px;display:flex;height:16px;justify-content:center;padding:2px;position:relative;transition:background-color .2s ease,opacity .3s ease-out;width:16px}.vm-checkbox-track__thumb{align-items:center;color:#fff;display:grid;height:12px;justify-content:center;-webkit-transform:scale(0);transform:scale(0);transition:-webkit-transform .1s ease-in-out;transition:transform .1s ease-in-out;transition:transform .1s ease-in-out,-webkit-transform .1s ease-in-out;width:12px}.vm-checkbox-track__thumb svg{width:100%}.vm-checkbox__label{color:inherit;font-size:inherit;margin-left:8px;transition:color .2s ease;white-space:nowrap}.vm-custom-panel{grid-gap:24px;align-items:flex-start;display:grid;gap:24px;height:100%}.vm-custom-panel-body{position:relative}.vm-custom-panel-body-header{display:flex;font-size:10px;justify-content:space-between;margin:-24px -24px 24px;padding:0 24px;position:relative;z-index:1}.vm-custom-panel-body-header,.vm-predefined-panel-header{align-items:center;border-bottom:1px solid hsla(0,6%,6%,.15)}.vm-predefined-panel-header{grid-gap:8px;display:grid;gap:8px;grid-template-columns:auto 1fr 160px auto;justify-content:flex-start;padding:8px 16px}.vm-predefined-panel-header__description{line-height:1.3;white-space:pre-wrap}.vm-predefined-panel-header__description ol,.vm-predefined-panel-header__description ul{list-style-position:inside}.vm-predefined-panel-header__description a{color:#c9e3f6;text-decoration:underline}.vm-predefined-panel-header__info{align-items:center;color:var(--color-primary);display:flex;justify-content:center;width:18px}.vm-predefined-panel-body{padding:8px 16px}.vm-accordion-header{align-items:center;cursor:pointer;display:grid;font-size:inherit;position:relative}.vm-accordion-header__arrow{align-items:center;display:flex;justify-content:center;position:absolute;right:14px;top:auto;-webkit-transform:rotate(0);transform:rotate(0);transition:-webkit-transform .2s ease-in-out;transition:transform .2s ease-in-out;transition:transform .2s ease-in-out,-webkit-transform .2s ease-in-out}.vm-accordion-header__arrow_open{-webkit-transform:rotate(180deg);transform:rotate(180deg)}.vm-accordion-header__arrow svg{height:auto;width:14px}.accordion-section{overflow:hidden}.vm-predefined-dashboard{background-color:transparent}.vm-predefined-dashboard-header{align-items:center;border-radius:4px;box-shadow:1px 2px 12px hsla(0,6%,6%,.08);display:grid;font-weight:700;grid-template-columns:1fr auto;justify-content:space-between;line-height:14px;overflow:hidden;padding:16px;position:relative;-webkit-transform-style:preserve-3d;transform-style:preserve-3d;transition:box-shadow .2s ease-in-out}.vm-predefined-dashboard-header_open{border-radius:4px 4px 0 0;box-shadow:none}.vm-predefined-dashboard-header__title{font-size:12px}.vm-predefined-dashboard-header__count{font-size:10px;grid-column:2;margin-right:30px}.vm-predefined-dashboard-panels{grid-gap:16px;display:grid;gap:16px;grid-template-columns:repeat(12,1fr);padding:0}.vm-predefined-dashboard-panels-panel{border-radius:8px;overflow:hidden;position:relative}.vm-predefined-dashboard-panels-panel:hover .vm-predefined-dashboard-panels-panel__resizer{-webkit-transform:scale(1);transform:scale(1)}.vm-predefined-dashboard-panels-panel__resizer{bottom:0;cursor:se-resize;height:20px;position:absolute;right:0;-webkit-transform:scale(0);transform:scale(0);transition:-webkit-transform .2s ease-in-out;transition:transform .2s ease-in-out;transition:transform .2s ease-in-out,-webkit-transform .2s ease-in-out;width:20px;z-index:1}.vm-predefined-dashboard-panels-panel__resizer:after{border-bottom:2px solid hsla(0,6%,6%,.2);border-right:2px solid hsla(0,6%,6%,.2);bottom:5px;content:"";height:5px;position:absolute;right:5px;width:5px}.vm-predefined-dashboard-panels-panel__alert{grid-column:span 12}.vm-predefined-panels{grid-gap:16px;align-items:flex-start;display:grid;gap:16px}.vm-predefined-panels-tabs{align-items:center;display:flex;font-size:10px;justify-content:flex-start;overflow:hidden}.vm-predefined-panels-tabs__tab{border-right:1px solid hsla(0,6%,6%,.15);cursor:pointer;padding:16px;text-transform:uppercase;transition:opacity .2s ease-in-out,color .15s ease-in}.vm-predefined-panels-tabs__tab:hover{opacity:1}.vm-predefined-panels__dashboards{grid-gap:16px;display:grid;gap:16px}.vm-cardinality-configurator{grid-gap:8px;display:grid;gap:8px}.vm-cardinality-configurator-controls{align-items:center;display:flex;flex-wrap:wrap;gap:0 24px;justify-content:flex-start}.vm-cardinality-configurator-controls__query{flex-grow:1}.vm-cardinality-configurator-bottom{grid-gap:24px;align-items:flex-end;display:grid;gap:24px;grid-template-columns:1fr auto}.vm-cardinality-configurator-bottom__info{font-size:12px}.u-legend{color:#110f0f;font-family:Lato,sans-serif;font-size:14px}.u-legend .u-thead{display:none}.u-legend .u-series{display:flex;gap:8px}.u-legend .u-series th{display:none}.u-legend .u-series td:nth-child(2):after{content:":";margin-left:8px}.u-legend .u-series .u-value{display:block;padding:0;text-align:left}.vm-metrics-content-header{margin:-24px -24px 24px}.vm-cardinality-panel{grid-gap:24px;align-items:flex-start;display:grid;gap:24px}.vm-top-queries-panel-header{margin:-24px -24px 24px}.vm-top-queries{grid-gap:24px;align-items:flex-start;display:grid;gap:24px}.vm-top-queries-controls{grid-gap:8px;display:grid;gap:8px}.vm-top-queries-controls-bottom,.vm-top-queries-controls__fields{grid-gap:24px;display:grid;gap:24px;grid-template-columns:1fr auto}.vm-top-queries-controls-bottom{align-items:flex-end;justify-content:space-between}.vm-top-queries-controls-bottom__button{align-items:center;display:flex;justify-content:flex-end}.vm-top-queries-panels{grid-gap:24px;display:grid;gap:24px}#root,body,html{background-attachment:fixed;background-repeat:no-repeat;color:#110f0f;cursor:default;font-family:Lato,sans-serif;font-size:12px;margin:0;min-height:100%}body{overflow:scroll}*{cursor:inherit;font:inherit}code{font-family:JetBrains Mono,monospace}b{font-weight:700}input[type=number]::-webkit-inner-spin-button,input[type=number]::-webkit-outer-spin-button{-webkit-appearance:none;margin:0}.vm-snackbar{bottom:16px;left:16px;position:fixed;z-index:9}a,abbr,acronym,address,applet,article,aside,audio,big,body,canvas,caption,center,cite,code,del,details,dfn,div,em,embed,fieldset,figcaption,figure,footer,form,h1,h2,h3,h4,h5,h6,header,hgroup,html,iframe,img,ins,kbd,label,legend,li,mark,menu,nav,object,ol,output,p,pre,q,ruby,s,samp,section,small,span,strike,strong,sub,summary,sup,table,tbody,td,tfoot,th,thead,time,tr,tt,u,ul,var,video{border:0;margin:0;padding:0;vertical-align:initial}h1,h2,h3,h4,h5,h6{font-weight:400}article,aside,details,figcaption,figure,footer,header,hgroup,menu,nav,section{display:block}body{line-height:1}q:after,q:before{content:""}table{border-collapse:collapse;border-spacing:0}input::-webkit-input-placeholder{opacity:1;-webkit-transition:opacity .3s ease;transition:opacity .3s ease}input::placeholder{opacity:1;transition:opacity .3s ease}input:focus::-webkit-input-placeholder{opacity:0;-webkit-transition:opacity .3s ease;transition:opacity .3s ease}input:focus::placeholder{opacity:0;transition:opacity .3s ease}*{box-sizing:border-box;outline:none}button{background:none;border:none;border-radius:0;padding:0}strong{letter-spacing:1px}input[type=file]{cursor:pointer;font-size:0;height:100%;left:0;opacity:0;position:absolute;top:0;width:100%}input[type=file]:disabled{cursor:not-allowed}a{color:inherit;text-decoration:inherit}input,textarea{-webkit-text-fill-color:inherit;appearance:none;-webkit-appearance:none}input:disabled,textarea:disabled{opacity:1!important}input:placeholder-shown,textarea:placeholder-shown{width:100%}input:-webkit-autofill,input:-webkit-autofill:active,input:-webkit-autofill:focus,input:-webkit-autofill:hover{-webkit-box-shadow:inset 0 0 0 0 #fff!important;width:100%;z-index:2}.vm-header-button{border:1px solid hsla(0,6%,6%,.2)}.vm-list__item{background-color:transparent;cursor:pointer;padding:12px 16px;transition:background-color .2s ease}.vm-list__item:hover,.vm-list__item_active{background-color:hsla(0,6%,6%,.1)}.vm-popper-header{grid-gap:8px;align-items:center;background-color:#3f51b5;background-color:var(--color-primary);border-radius:4px 4px 0 0;color:#fff;display:grid;gap:8px;grid-template-columns:1fr auto;justify-content:space-between;padding:8px 8px 8px 16px}.vm-popper-header__title{font-weight:700}.vm-block{background-color:#fff;background-color:var(--color-background-block);border-radius:8px;box-shadow:1px 2px 12px hsla(0,6%,6%,.08);padding:24px}.vm-block_empty-padding{padding:0}.vm-section-header{align-items:center;border-bottom:1px solid hsla(0,6%,6%,.15);border-radius:8px 8px 0 0;display:grid;grid-template-columns:1fr auto;justify-content:center;padding:0 24px}.vm-section-header__title{font-size:12px;font-weight:700}.vm-section-header__tabs{align-items:center;display:flex;font-size:10px;justify-content:flex-start}.vm-table{border-collapse:initial;border-spacing:0;margin-top:-24px;width:100%}.vm-table,.vm-table__row{background-color:#fff;background-color:var(--color-background-block)}.vm-table__row{transition:background-color .2s ease}.vm-table__row:hover:not(.vm-table__row_header){background-color:hsla(0,6%,6%,.05)}.vm-table__row_header{position:-webkit-sticky;position:sticky;top:0;z-index:2}.vm-table__row_selected{background-color:rgba(26,144,255,.05)}.vm-table-cell{border-bottom:1px solid hsla(0,6%,6%,.15);height:40px;padding:8px;vertical-align:middle}.vm-table-cell__content{align-items:center;display:flex;justify-content:flex-start}.vm-table-cell_sort{cursor:pointer}.vm-table-cell_sort:hover{background-color:hsla(0,6%,6%,.05)}.vm-table-cell_header{font-weight:700;text-align:left;text-transform:capitalize}.vm-table-cell_gray{color:hsla(0,6%,6%,.4)}.vm-table-cell_right{text-align:right}.vm-table-cell_right .vm-table-cell__content{justify-content:flex-end}.vm-table-cell_no-wrap{white-space:nowrap}.vm-table__sort-icon{align-items:center;display:flex;justify-content:center;margin:0 8px;opacity:.4;transition:opacity .2s ease,-webkit-transform .2s ease-in-out;transition:opacity .2s ease,transform .2s ease-in-out;transition:opacity .2s ease,transform .2s ease-in-out,-webkit-transform .2s ease-in-out;width:15px}.vm-table__sort-icon_active{opacity:1}.vm-table__sort-icon_desc{-webkit-transform:rotate(180deg);transform:rotate(180deg)}:root{--color-primary:#3f51b5;--color-secondary:#e91e63;--color-error:#fd080e;--color-warning:#ff8308;--color-info:#03a9f4;--color-success:#4caf50;--color-primary-text:#fff;--color-secondary-text:#fff;--color-error-text:#fff;--color-warning-text:#fff;--color-info-text:#fff;--color-success-text:#fff;--color-background-body:#fefeff;--color-background-block:#fff} \ No newline at end of file diff --git a/app/vmselect/vmui/static/js/main.0b7317e2.js b/app/vmselect/vmui/static/js/main.0b7317e2.js deleted file mode 100644 index 570878bc1..000000000 --- a/app/vmselect/vmui/static/js/main.0b7317e2.js +++ /dev/null @@ -1,2 +0,0 @@ -/*! For license information please see main.0b7317e2.js.LICENSE.txt */ -!function(){var e={680:function(e,t,n){"use strict";var r=n(476),i=n(962),o=i(r("String.prototype.indexOf"));e.exports=function(e,t){var n=r(e,!!t);return"function"===typeof n&&o(e,".prototype.")>-1?i(n):n}},962:function(e,t,n){"use strict";var r=n(199),i=n(476),o=i("%Function.prototype.apply%"),a=i("%Function.prototype.call%"),u=i("%Reflect.apply%",!0)||r.call(a,o),l=i("%Object.getOwnPropertyDescriptor%",!0),c=i("%Object.defineProperty%",!0),s=i("%Math.max%");if(c)try{c({},"a",{value:1})}catch(d){c=null}e.exports=function(e){var t=u(r,a,arguments);if(l&&c){var n=l(t,"length");n.configurable&&c(t,"length",{value:1+s(0,e.length-(arguments.length-1))})}return t};var f=function(){return u(r,o,arguments)};c?c(e.exports,"apply",{value:f}):e.exports.apply=f},123:function(e,t){var n;!function(){"use strict";var r={}.hasOwnProperty;function i(){for(var e=[],t=0;t=t?e:""+Array(t+1-r.length).join(n)+e},g={s:y,z:function(e){var t=-e.utcOffset(),n=Math.abs(t),r=Math.floor(n/60),i=n%60;return(t<=0?"+":"-")+y(r,2,"0")+":"+y(i,2,"0")},m:function e(t,n){if(t.date()1)return e(a[0])}else{var u=t.name;b[u]=t,i=u}return!r&&i&&(_=i),i||!r&&_},x=function(e,t){if(D(e))return e.clone();var n="object"==typeof t?t:{};return n.date=e,n.args=arguments,new C(n)},k=g;k.l=w,k.i=D,k.w=function(e,t){return x(e,{locale:t.$L,utc:t.$u,x:t.$x,$offset:t.$offset})};var C=function(){function m(e){this.$L=w(e.locale,null,!0),this.parse(e)}var y=m.prototype;return y.parse=function(e){this.$d=function(e){var t=e.date,n=e.utc;if(null===t)return new Date(NaN);if(k.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 i=r[2]-1||0,o=(r[7]||"0").substring(0,3);return n?new Date(Date.UTC(r[1],i,r[3]||1,r[4]||0,r[5]||0,r[6]||0,o)):new Date(r[1],i,r[3]||1,r[4]||0,r[5]||0,r[6]||0,o)}}return new Date(t)}(e),this.$x=e.x||{},this.init()},y.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()},y.$utils=function(){return k},y.isValid=function(){return!(this.$d.toString()===h)},y.isSame=function(e,t){var n=x(e);return this.startOf(t)<=n&&n<=this.endOf(t)},y.isAfter=function(e,t){return x(e)1&&"boolean"!==typeof t)throw new a('"allowMissing" argument must be a boolean');if(null===k(/^%?[^%]*%?$/,e))throw new i("`%` may not be present anywhere but at the beginning and end of the intrinsic name");var n=A(e),r=n.length>0?n[0]:"",o=S("%"+r+"%",t),u=o.name,c=o.value,s=!1,f=o.alias;f&&(r=f[0],D(n,b([0,1],f)));for(var d=1,h=!0;d=n.length){var g=l(c,p);c=(h=!!g)&&"get"in g&&!("originalValue"in g.get)?g.get:c[p]}else h=_(c,p),c=c[p];h&&!s&&(v[u]=c)}}return c}},520:function(e,t,n){"use strict";var r="undefined"!==typeof Symbol&&Symbol,i=n(541);e.exports=function(){return"function"===typeof r&&("function"===typeof Symbol&&("symbol"===typeof r("foo")&&("symbol"===typeof Symbol("bar")&&i())))}},541:function(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 i=Object.getOwnPropertyDescriptor(e,t);if(42!==i.value||!0!==i.enumerable)return!1}return!0}},838:function(e,t,n){"use strict";var r=n(199);e.exports=r.call(Function.call,Object.prototype.hasOwnProperty)},936:function(e,t,n){var r=/^\s+|\s+$/g,i=/^[-+]0x[0-9a-f]+$/i,o=/^0b[01]+$/i,a=/^0o[0-7]+$/i,u=parseInt,l="object"==typeof n.g&&n.g&&n.g.Object===Object&&n.g,c="object"==typeof self&&self&&self.Object===Object&&self,s=l||c||Function("return this")(),f=Object.prototype.toString,d=Math.max,h=Math.min,p=function(){return s.Date.now()};function v(e){var t=typeof e;return!!e&&("object"==t||"function"==t)}function m(e){if("number"==typeof e)return e;if(function(e){return"symbol"==typeof e||function(e){return!!e&&"object"==typeof e}(e)&&"[object Symbol]"==f.call(e)}(e))return NaN;if(v(e)){var t="function"==typeof e.valueOf?e.valueOf():e;e=v(t)?t+"":t}if("string"!=typeof e)return 0===e?e:+e;e=e.replace(r,"");var n=o.test(e);return n||a.test(e)?u(e.slice(2),n?2:8):i.test(e)?NaN:+e}e.exports=function(e,t,n){var r,i,o,a,u,l,c=0,s=!1,f=!1,y=!0;if("function"!=typeof e)throw new TypeError("Expected a function");function g(t){var n=r,o=i;return r=i=void 0,c=t,a=e.apply(o,n)}function _(e){return c=e,u=setTimeout(D,t),s?g(e):a}function b(e){var n=e-l;return void 0===l||n>=t||n<0||f&&e-c>=o}function D(){var e=p();if(b(e))return w(e);u=setTimeout(D,function(e){var n=t-(e-l);return f?h(n,o-(e-c)):n}(e))}function w(e){return u=void 0,y&&r?g(e):(r=i=void 0,a)}function x(){var e=p(),n=b(e);if(r=arguments,i=this,l=e,n){if(void 0===u)return _(l);if(f)return u=setTimeout(D,t),g(l)}return void 0===u&&(u=setTimeout(D,t)),a}return t=m(t)||0,v(n)&&(s=!!n.leading,o=(f="maxWait"in n)?d(m(n.maxWait)||0,t):o,y="trailing"in n?!!n.trailing:y),x.cancel=function(){void 0!==u&&clearTimeout(u),c=0,r=l=i=u=void 0},x.flush=function(){return void 0===u?a:w(p())},x}},7:function(e,t,n){var r="__lodash_hash_undefined__",i="[object Function]",o="[object GeneratorFunction]",a=/\.|\[(?:[^[\]]*|(["'])(?:(?!\1)[^\\]|\\.)*?\1)\]/,u=/^\w*$/,l=/^\./,c=/[^.[\]]+|\[(?:(-?\d+(?:\.\d+)?)|(["'])((?:(?!\2)[^\\]|\\.)*?)\2)\]|(?=(?:\.|\[\])(?:\.|\[\]|$))/g,s=/\\(\\)?/g,f=/^\[object .+?Constructor\]$/,d="object"==typeof n.g&&n.g&&n.g.Object===Object&&n.g,h="object"==typeof self&&self&&self.Object===Object&&self,p=d||h||Function("return this")();var v=Array.prototype,m=Function.prototype,y=Object.prototype,g=p["__core-js_shared__"],_=function(){var e=/[^.]+$/.exec(g&&g.keys&&g.keys.IE_PROTO||"");return e?"Symbol(src)_1."+e:""}(),b=m.toString,D=y.hasOwnProperty,w=y.toString,x=RegExp("^"+b.call(D).replace(/[\\^$.*+?()[\]{}|]/g,"\\$&").replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g,"$1.*?")+"$"),k=p.Symbol,C=v.splice,E=$(p,"Map"),A=$(Object,"create"),S=k?k.prototype:void 0,F=S?S.toString:void 0;function N(e){var t=-1,n=e?e.length:0;for(this.clear();++t-1},O.prototype.set=function(e,t){var n=this.__data__,r=B(n,e);return r<0?n.push([e,t]):n[r][1]=t,this},T.prototype.clear=function(){this.__data__={hash:new N,map:new(E||O),string:new N}},T.prototype.delete=function(e){return P(this,e).delete(e)},T.prototype.get=function(e){return P(this,e).get(e)},T.prototype.has=function(e){return P(this,e).has(e)},T.prototype.set=function(e,t){return P(this,e).set(e,t),this};var R=j((function(e){var t;e=null==(t=e)?"":function(e){if("string"==typeof e)return e;if(H(e))return F?F.call(e):"";var t=e+"";return"0"==t&&1/e==-1/0?"-0":t}(t);var n=[];return l.test(e)&&n.push(""),e.replace(c,(function(e,t,r,i){n.push(r?i.replace(s,"$1"):t||e)})),n}));function I(e){if("string"==typeof e||H(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 n(){var r=arguments,i=t?t.apply(this,r):r[0],o=n.cache;if(o.has(i))return o.get(i);var a=e.apply(this,r);return n.cache=o.set(i,a),a};return n.cache=new(j.Cache||T),n}j.Cache=T;var z=Array.isArray;function U(e){var t=typeof e;return!!e&&("object"==t||"function"==t)}function H(e){return"symbol"==typeof e||function(e){return!!e&&"object"==typeof e}(e)&&"[object Symbol]"==w.call(e)}e.exports=function(e,t,n){var r=null==e?void 0:M(e,t);return void 0===r?n:r}},61:function(e,t,n){var r="Expected a function",i=/^\s+|\s+$/g,o=/^[-+]0x[0-9a-f]+$/i,a=/^0b[01]+$/i,u=/^0o[0-7]+$/i,l=parseInt,c="object"==typeof n.g&&n.g&&n.g.Object===Object&&n.g,s="object"==typeof self&&self&&self.Object===Object&&self,f=c||s||Function("return this")(),d=Object.prototype.toString,h=Math.max,p=Math.min,v=function(){return f.Date.now()};function m(e,t,n){var i,o,a,u,l,c,s=0,f=!1,d=!1,m=!0;if("function"!=typeof e)throw new TypeError(r);function _(t){var n=i,r=o;return i=o=void 0,s=t,u=e.apply(r,n)}function b(e){return s=e,l=setTimeout(w,t),f?_(e):u}function D(e){var n=e-c;return void 0===c||n>=t||n<0||d&&e-s>=a}function w(){var e=v();if(D(e))return x(e);l=setTimeout(w,function(e){var n=t-(e-c);return d?p(n,a-(e-s)):n}(e))}function x(e){return l=void 0,m&&i?_(e):(i=o=void 0,u)}function k(){var e=v(),n=D(e);if(i=arguments,o=this,c=e,n){if(void 0===l)return b(c);if(d)return l=setTimeout(w,t),_(c)}return void 0===l&&(l=setTimeout(w,t)),u}return t=g(t)||0,y(n)&&(f=!!n.leading,a=(d="maxWait"in n)?h(g(n.maxWait)||0,t):a,m="trailing"in n?!!n.trailing:m),k.cancel=function(){void 0!==l&&clearTimeout(l),s=0,i=c=o=l=void 0},k.flush=function(){return void 0===l?u:x(v())},k}function y(e){var t=typeof e;return!!e&&("object"==t||"function"==t)}function g(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(y(e)){var t="function"==typeof e.valueOf?e.valueOf():e;e=y(t)?t+"":t}if("string"!=typeof e)return 0===e?e:+e;e=e.replace(i,"");var n=a.test(e);return n||u.test(e)?l(e.slice(2),n?2:8):o.test(e)?NaN:+e}e.exports=function(e,t,n){var i=!0,o=!0;if("function"!=typeof e)throw new TypeError(r);return y(n)&&(i="leading"in n?!!n.leading:i,o="trailing"in n?!!n.trailing:o),m(e,t,{leading:i,maxWait:t,trailing:o})}},154:function(e,t,n){var r="function"===typeof Map&&Map.prototype,i=Object.getOwnPropertyDescriptor&&r?Object.getOwnPropertyDescriptor(Map.prototype,"size"):null,o=r&&i&&"function"===typeof i.get?i.get:null,a=r&&Map.prototype.forEach,u="function"===typeof Set&&Set.prototype,l=Object.getOwnPropertyDescriptor&&u?Object.getOwnPropertyDescriptor(Set.prototype,"size"):null,c=u&&l&&"function"===typeof l.get?l.get:null,s=u&&Set.prototype.forEach,f="function"===typeof WeakMap&&WeakMap.prototype?WeakMap.prototype.has:null,d="function"===typeof WeakSet&&WeakSet.prototype?WeakSet.prototype.has:null,h="function"===typeof WeakRef&&WeakRef.prototype?WeakRef.prototype.deref:null,p=Boolean.prototype.valueOf,v=Object.prototype.toString,m=Function.prototype.toString,y=String.prototype.match,g=String.prototype.slice,_=String.prototype.replace,b=String.prototype.toUpperCase,D=String.prototype.toLowerCase,w=RegExp.prototype.test,x=Array.prototype.concat,k=Array.prototype.join,C=Array.prototype.slice,E=Math.floor,A="function"===typeof BigInt?BigInt.prototype.valueOf:null,S=Object.getOwnPropertySymbols,F="function"===typeof Symbol&&"symbol"===typeof Symbol.iterator?Symbol.prototype.toString:null,N="function"===typeof Symbol&&"object"===typeof Symbol.iterator,O="function"===typeof Symbol&&Symbol.toStringTag&&(typeof Symbol.toStringTag===N||"symbol")?Symbol.toStringTag:null,T=Object.prototype.propertyIsEnumerable,B=("function"===typeof Reflect?Reflect.getPrototypeOf:Object.getPrototypeOf)||([].__proto__===Array.prototype?function(e){return e.__proto__}:null);function M(e,t){if(e===1/0||e===-1/0||e!==e||e&&e>-1e3&&e<1e3||w.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 i=String(r),o=g.call(t,i.length+1);return _.call(i,n,"$&_")+"."+_.call(_.call(o,/([0-9]{3})/g,"$&_"),/_$/,"")}}return _.call(t,n,"$&_")}var L=n(654),P=L.custom,$=U(P)?P:null;function R(e,t,n){var r="double"===(n.quoteStyle||t)?'"':"'";return r+e+r}function I(e){return _.call(String(e),/"/g,""")}function j(e){return"[object Array]"===V(e)&&(!O||!("object"===typeof e&&O in e))}function z(e){return"[object RegExp]"===V(e)&&(!O||!("object"===typeof e&&O in e))}function U(e){if(N)return e&&"object"===typeof e&&e instanceof Symbol;if("symbol"===typeof e)return!0;if(!e||"object"!==typeof e||!F)return!1;try{return F.call(e),!0}catch(t){}return!1}e.exports=function e(t,n,r,i){var u=n||{};if(Y(u,"quoteStyle")&&"single"!==u.quoteStyle&&"double"!==u.quoteStyle)throw new TypeError('option "quoteStyle" must be "single" or "double"');if(Y(u,"maxStringLength")&&("number"===typeof u.maxStringLength?u.maxStringLength<0&&u.maxStringLength!==1/0:null!==u.maxStringLength))throw new TypeError('option "maxStringLength", if provided, must be a positive integer, Infinity, or `null`');var l=!Y(u,"customInspect")||u.customInspect;if("boolean"!==typeof l&&"symbol"!==l)throw new TypeError("option \"customInspect\", if provided, must be `true`, `false`, or `'symbol'`");if(Y(u,"indent")&&null!==u.indent&&"\t"!==u.indent&&!(parseInt(u.indent,10)===u.indent&&u.indent>0))throw new TypeError('option "indent" must be "\\t", an integer > 0, or `null`');if(Y(u,"numericSeparator")&&"boolean"!==typeof u.numericSeparator)throw new TypeError('option "numericSeparator", if provided, must be `true` or `false`');var v=u.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,u);if("number"===typeof t){if(0===t)return 1/0/t>0?"0":"-0";var b=String(t);return v?M(t,b):b}if("bigint"===typeof t){var w=String(t)+"n";return v?M(t,w):w}var E="undefined"===typeof u.depth?5:u.depth;if("undefined"===typeof r&&(r=0),r>=E&&E>0&&"object"===typeof t)return j(t)?"[Array]":"[Object]";var S=function(e,t){var n;if("\t"===e.indent)n="\t";else{if(!("number"===typeof e.indent&&e.indent>0))return null;n=k.call(Array(e.indent+1)," ")}return{base:n,prev:k.call(Array(t+1),n)}}(u,r);if("undefined"===typeof i)i=[];else if(q(i,t)>=0)return"[Circular]";function P(t,n,o){if(n&&(i=C.call(i)).push(n),o){var a={depth:u.depth};return Y(u,"quoteStyle")&&(a.quoteStyle=u.quoteStyle),e(t,a,r+1,i)}return e(t,u,r+1,i)}if("function"===typeof t&&!z(t)){var H=function(e){if(e.name)return e.name;var t=y.call(m.call(e),/^function\s*([\w$]+)/);if(t)return t[1];return null}(t),Q=X(t,P);return"[Function"+(H?": "+H:" (anonymous)")+"]"+(Q.length>0?" { "+k.call(Q,", ")+" }":"")}if(U(t)){var ee=N?_.call(String(t),/^(Symbol\(.*\))_[^)]*$/,"$1"):F.call(t);return"object"!==typeof t||N?ee:G(ee)}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 te="<"+D.call(String(t.nodeName)),ne=t.attributes||[],re=0;re"}if(j(t)){if(0===t.length)return"[]";var ie=X(t,P);return S&&!function(e){for(var t=0;t=0)return!1;return!0}(ie)?"["+K(ie,S)+"]":"[ "+k.call(ie,", ")+" ]"}if(function(e){return"[object Error]"===V(e)&&(!O||!("object"===typeof e&&O in e))}(t)){var oe=X(t,P);return"cause"in Error.prototype||!("cause"in t)||T.call(t,"cause")?0===oe.length?"["+String(t)+"]":"{ ["+String(t)+"] "+k.call(oe,", ")+" }":"{ ["+String(t)+"] "+k.call(x.call("[cause]: "+P(t.cause),oe),", ")+" }"}if("object"===typeof t&&l){if($&&"function"===typeof t[$]&&L)return L(t,{depth:E-r});if("symbol"!==l&&"function"===typeof t.inspect)return t.inspect()}if(function(e){if(!o||!e||"object"!==typeof e)return!1;try{o.call(e);try{c.call(e)}catch(te){return!0}return e instanceof Map}catch(t){}return!1}(t)){var ae=[];return a.call(t,(function(e,n){ae.push(P(n,t,!0)+" => "+P(e,t))})),J("Map",o.call(t),ae,S)}if(function(e){if(!c||!e||"object"!==typeof e)return!1;try{c.call(e);try{o.call(e)}catch(t){return!0}return e instanceof Set}catch(n){}return!1}(t)){var ue=[];return s.call(t,(function(e){ue.push(P(e,t))})),J("Set",c.call(t),ue,S)}if(function(e){if(!f||!e||"object"!==typeof e)return!1;try{f.call(e,f);try{d.call(e,d)}catch(te){return!0}return e instanceof WeakMap}catch(t){}return!1}(t))return Z("WeakMap");if(function(e){if(!d||!e||"object"!==typeof e)return!1;try{d.call(e,d);try{f.call(e,f)}catch(te){return!0}return e instanceof WeakSet}catch(t){}return!1}(t))return Z("WeakSet");if(function(e){if(!h||!e||"object"!==typeof e)return!1;try{return h.call(e),!0}catch(t){}return!1}(t))return Z("WeakRef");if(function(e){return"[object Number]"===V(e)&&(!O||!("object"===typeof e&&O in e))}(t))return G(P(Number(t)));if(function(e){if(!e||"object"!==typeof e||!A)return!1;try{return A.call(e),!0}catch(t){}return!1}(t))return G(P(A.call(t)));if(function(e){return"[object Boolean]"===V(e)&&(!O||!("object"===typeof e&&O in e))}(t))return G(p.call(t));if(function(e){return"[object String]"===V(e)&&(!O||!("object"===typeof e&&O in e))}(t))return G(P(String(t)));if(!function(e){return"[object Date]"===V(e)&&(!O||!("object"===typeof e&&O in e))}(t)&&!z(t)){var le=X(t,P),ce=B?B(t)===Object.prototype:t instanceof Object||t.constructor===Object,se=t instanceof Object?"":"null prototype",fe=!ce&&O&&Object(t)===t&&O in t?g.call(V(t),8,-1):se?"Object":"",de=(ce||"function"!==typeof t.constructor?"":t.constructor.name?t.constructor.name+" ":"")+(fe||se?"["+k.call(x.call([],fe||[],se||[]),": ")+"] ":"");return 0===le.length?de+"{}":S?de+"{"+K(le,S)+"}":de+"{ "+k.call(le,", ")+" }"}return String(t)};var H=Object.prototype.hasOwnProperty||function(e){return e in this};function Y(e,t){return H.call(e,t)}function V(e){return v.call(e)}function q(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(g.call(e,0,t.maxStringLength),t)+r}return R(_.call(_.call(e,/(['\\])/g,"\\$1"),/[\x00-\x1f]/g,Q),"single",t)}function Q(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 G(e){return"Object("+e+")"}function Z(e){return e+" { ? }"}function J(e,t,n,r){return e+" ("+t+") {"+(r?K(n,r):k.call(n,", "))+"}"}function K(e,t){if(0===e.length)return"";var n="\n"+t.prev+t.base;return n+k.call(e,","+n)+"\n"+t.prev}function X(e,t){var n=j(e),r=[];if(n){r.length=e.length;for(var i=0;i-1?e.split(","):e},c=function(e,t,n,r){if(e){var o=n.allowDots?e.replace(/\.([^.[]+)/g,"[$1]"):e,a=/(\[[^[\]]*])/g,u=n.depth>0&&/(\[[^[\]]*])/.exec(o),c=u?o.slice(0,u.index):o,s=[];if(c){if(!n.plainObjects&&i.call(Object.prototype,c)&&!n.allowPrototypes)return;s.push(c)}for(var f=0;n.depth>0&&null!==(u=a.exec(o))&&f=0;--o){var a,u=e[o];if("[]"===u&&n.parseArrays)a=[].concat(i);else{a=n.plainObjects?Object.create(null):{};var c="["===u.charAt(0)&&"]"===u.charAt(u.length-1)?u.slice(1,-1):u,s=parseInt(c,10);n.parseArrays||""!==c?!isNaN(s)&&u!==c&&String(s)===c&&s>=0&&n.parseArrays&&s<=n.arrayLimit?(a=[])[s]=i:"__proto__"!==c&&(a[c]=i):a={0:i}}i=a}return i}(s,t,n,r)}};e.exports=function(e,t){var n=function(e){if(!e)return a;if(null!==e.decoder&&void 0!==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?a.charset:e.charset;return{allowDots:"undefined"===typeof e.allowDots?a.allowDots:!!e.allowDots,allowPrototypes:"boolean"===typeof e.allowPrototypes?e.allowPrototypes:a.allowPrototypes,allowSparse:"boolean"===typeof e.allowSparse?e.allowSparse:a.allowSparse,arrayLimit:"number"===typeof e.arrayLimit?e.arrayLimit:a.arrayLimit,charset:t,charsetSentinel:"boolean"===typeof e.charsetSentinel?e.charsetSentinel:a.charsetSentinel,comma:"boolean"===typeof e.comma?e.comma:a.comma,decoder:"function"===typeof e.decoder?e.decoder:a.decoder,delimiter:"string"===typeof e.delimiter||r.isRegExp(e.delimiter)?e.delimiter:a.delimiter,depth:"number"===typeof e.depth||!1===e.depth?+e.depth:a.depth,ignoreQueryPrefix:!0===e.ignoreQueryPrefix,interpretNumericEntities:"boolean"===typeof e.interpretNumericEntities?e.interpretNumericEntities:a.interpretNumericEntities,parameterLimit:"number"===typeof e.parameterLimit?e.parameterLimit:a.parameterLimit,parseArrays:!1!==e.parseArrays,plainObjects:"boolean"===typeof e.plainObjects?e.plainObjects:a.plainObjects,strictNullHandling:"boolean"===typeof e.strictNullHandling?e.strictNullHandling:a.strictNullHandling}}(t);if(""===e||null===e||"undefined"===typeof e)return n.plainObjects?Object.create(null):{};for(var s="string"===typeof e?function(e,t){var n,c={},s=t.ignoreQueryPrefix?e.replace(/^\?/,""):e,f=t.parameterLimit===1/0?void 0:t.parameterLimit,d=s.split(t.delimiter,f),h=-1,p=t.charset;if(t.charsetSentinel)for(n=0;n-1&&(m=o(m)?[m]:m),i.call(c,v)?c[v]=r.combine(c[v],m):c[v]=m}return c}(e,n):e,f=n.plainObjects?Object.create(null):{},d=Object.keys(s),h=0;h0?C.join(",")||null:void 0}];else if(l(h))M=h;else{var P=Object.keys(C);M=m?P.sort(m):P}for(var $=a&&l(C)&&1===C.length?n+"[]":n,R=0;R0?D+b:""}},837:function(e,t,n){"use strict";var r=n(609),i=Object.prototype.hasOwnProperty,o=Array.isArray,a=function(){for(var e=[],t=0;t<256;++t)e.push("%"+((t<16?"0":"")+t.toString(16)).toUpperCase());return e}(),u=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(o(n)){for(var r=[],i=0;i=48&&s<=57||s>=65&&s<=90||s>=97&&s<=122||o===r.RFC1738&&(40===s||41===s)?l+=u.charAt(c):s<128?l+=a[s]:s<2048?l+=a[192|s>>6]+a[128|63&s]:s<55296||s>=57344?l+=a[224|s>>12]+a[128|s>>6&63]+a[128|63&s]:(c+=1,s=65536+((1023&s)<<10|1023&u.charCodeAt(c)),l+=a[240|s>>18]+a[128|s>>12&63]+a[128|s>>6&63]+a[128|63&s])}return l},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(o(e)){for(var n=[],r=0;r2&&(u.children=arguments.length>3?t.call(arguments,2):r),"function"==typeof e&&null!=e.defaultProps)for(a in e.defaultProps)void 0===u[a]&&(u[a]=e.defaultProps[a]);return p(e,u,i,o,null)}function p(e,t,n,o,a){var u={type:e,props:t,key:n,ref:o,__k:null,__:null,__b:0,__e:null,__d:void 0,__c:null,__h:null,constructor:void 0,__v:null==a?++i:a};return null==a&&null!=r.vnode&&r.vnode(u),u}function v(){return{current:null}}function m(e){return e.children}function y(e,t){this.props=e,this.context=t}function g(e,t){if(null==t)return e.__?g(e.__,e.__.__k.indexOf(e)+1):null;for(var n;t0?p(y.type,y.props,y.key,y.ref?y.ref:null,y.__v):y)){if(y.__=n,y.__b=n.__b+1,null===(v=w[d])||v&&y.key==v.key&&y.type===v.type)w[d]=void 0;else for(h=0;h2&&(u.children=arguments.length>3?t.call(arguments,2):r),p(e.type,u,i||e.key,o||e.ref,null)}function I(e,t){var n={__c:t="__cC"+u++,__: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.shouldComponentUpdate=function(e){this.props.value!==e.value&&n.some(b)},this.sub=function(e){n.push(e);var t=e.componentWillUnmount;e.componentWillUnmount=function(){n.splice(n.indexOf(e),1),t&&t.call(e)}}),e.children}};return n.Provider.__=n.Consumer.contextType=n}t=c.slice,r={__e:function(e,t,n,r){for(var i,o,a;t=t.__;)if((i=t.__c)&&!i.__)try{if((o=i.constructor)&&null!=o.getDerivedStateFromError&&(i.setState(o.getDerivedStateFromError(e)),a=i.__d),null!=i.componentDidCatch&&(i.componentDidCatch(e,r||{}),a=i.__d),a)return i.__E=i}catch(t){e=t}throw e}},i=0,y.prototype.setState=function(e,t){var n;n=null!=this.__s&&this.__s!==this.state?this.__s:this.__s=f({},this.state),"function"==typeof e&&(e=e(f({},n),this.props)),e&&f(n,e),null!=e&&this.__v&&(t&&this._sb.push(t),b(this))},y.prototype.forceUpdate=function(e){this.__v&&(this.__e=!0,e&&this.__h.push(e),b(this))},y.prototype.render=m,o=[],D.__r=0,u=0;var j,z,U,H,Y=0,V=[],q=[],W=r.__b,Q=r.__r,G=r.diffed,Z=r.__c,J=r.unmount;function K(e,t){r.__h&&r.__h(z,e,Y||t),Y=0;var n=z.__H||(z.__H={__:[],__h:[]});return e>=n.__.length&&n.__.push({__V:q}),n.__[e]}function X(e){return Y=1,ee(ye,e)}function ee(e,t,n){var r=K(j++,2);if(r.t=e,!r.__c&&(r.__=[n?n(t):ye(void 0,t),function(e){var t=r.__N?r.__N[0]:r.__[0],n=r.t(t,e);t!==n&&(r.__N=[n,r.__[1]],r.__c.setState({}))}],r.__c=z,!z.u)){z.u=!0;var i=z.shouldComponentUpdate;z.shouldComponentUpdate=function(e,t,n){if(!r.__c.__H)return!0;var o=r.__c.__H.__.filter((function(e){return e.__c}));if(o.every((function(e){return!e.__N})))return!i||i.call(this,e,t,n);var a=!1;return o.forEach((function(e){if(e.__N){var t=e.__[0];e.__=e.__N,e.__N=void 0,t!==e.__[0]&&(a=!0)}})),!(!a&&r.__c.props===e)&&(!i||i.call(this,e,t,n))}}return r.__N||r.__}function te(e,t){var n=K(j++,3);!r.__s&&me(n.__H,t)&&(n.__=e,n.i=t,z.__H.__h.push(n))}function ne(e,t){var n=K(j++,4);!r.__s&&me(n.__H,t)&&(n.__=e,n.i=t,z.__h.push(n))}function re(e){return Y=5,oe((function(){return{current:e}}),[])}function ie(e,t,n){Y=6,ne((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 oe(e,t){var n=K(j++,7);return me(n.__H,t)?(n.__V=e(),n.i=t,n.__h=e,n.__V):n.__}function ae(e,t){return Y=8,oe((function(){return e}),t)}function ue(e){var t=z.context[e.__c],n=K(j++,9);return n.c=e,t?(null==n.__&&(n.__=!0,t.sub(z)),t.props.value):e.__}function le(e,t){r.useDebugValue&&r.useDebugValue(t?t(e):e)}function ce(e){var t=K(j++,10),n=X();return t.__=e,z.componentDidCatch||(z.componentDidCatch=function(e,r){t.__&&t.__(e,r),n[1](e)}),[n[0],function(){n[1](void 0)}]}function se(){var e=K(j++,11);if(!e.__){for(var t=z.__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 fe(){for(var e;e=V.shift();)if(e.__P&&e.__H)try{e.__H.__h.forEach(pe),e.__H.__h.forEach(ve),e.__H.__h=[]}catch(u){e.__H.__h=[],r.__e(u,e.__v)}}r.__b=function(e){z=null,W&&W(e)},r.__r=function(e){Q&&Q(e),j=0;var t=(z=e.__c).__H;t&&(U===z?(t.__h=[],z.__h=[],t.__.forEach((function(e){e.__N&&(e.__=e.__N),e.__V=q,e.__N=e.i=void 0}))):(t.__h.forEach(pe),t.__h.forEach(ve),t.__h=[])),U=z},r.diffed=function(e){G&&G(e);var t=e.__c;t&&t.__H&&(t.__H.__h.length&&(1!==V.push(t)&&H===r.requestAnimationFrame||((H=r.requestAnimationFrame)||he)(fe)),t.__H.__.forEach((function(e){e.i&&(e.__H=e.i),e.__V!==q&&(e.__=e.__V),e.i=void 0,e.__V=q}))),U=z=null},r.__c=function(e,t){t.some((function(e){try{e.__h.forEach(pe),e.__h=e.__h.filter((function(e){return!e.__||ve(e)}))}catch(i){t.some((function(e){e.__h&&(e.__h=[])})),t=[],r.__e(i,e.__v)}})),Z&&Z(e,t)},r.unmount=function(e){J&&J(e);var t,n=e.__c;n&&n.__H&&(n.__H.__.forEach((function(e){try{pe(e)}catch(e){t=e}})),n.__H=void 0,t&&r.__e(t,n.__v))};var de="function"==typeof requestAnimationFrame;function he(e){var t,n=function(){clearTimeout(r),de&&cancelAnimationFrame(t),setTimeout(e)},r=setTimeout(n,100);de&&(t=requestAnimationFrame(n))}function pe(e){var t=z,n=e.__c;"function"==typeof n&&(e.__c=void 0,n()),z=t}function ve(e){var t=z;e.__c=e.__(),z=t}function me(e,t){return!e||e.length!==t.length||t.some((function(t,n){return t!==e[n]}))}function ye(e,t){return"function"==typeof t?t(e):t}function ge(e,t){for(var n in t)e[n]=t[n];return e}function _e(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 be(e,t){return e===t&&(0!==e||1/e==1/t)||e!=e&&t!=t}function De(e){this.props=e}function we(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:_e(this.props,e)}function r(t){return this.shouldComponentUpdate=n,h(e,t)}return r.displayName="Memo("+(e.displayName||e.name)+")",r.prototype.isReactComponent=!0,r.__f=!0,r}(De.prototype=new y).isPureReactComponent=!0,De.prototype.shouldComponentUpdate=function(e,t){return _e(this.props,e)||_e(this.state,t)};var xe=r.__b;r.__b=function(e){e.type&&e.type.__f&&e.ref&&(e.props.ref=e.ref,e.ref=null),xe&&xe(e)};var ke="undefined"!=typeof Symbol&&Symbol.for&&Symbol.for("react.forward_ref")||3911;function Ce(e){function t(t){var n=ge({},t);return delete n.ref,e(n,t.ref||null)}return t.$$typeof=ke,t.render=t,t.prototype.isReactComponent=t.__f=!0,t.displayName="ForwardRef("+(e.displayName||e.name)+")",t}var Ee=function(e,t){return null==e?null:k(k(e).map(t))},Ae={map:Ee,forEach:Ee,count:function(e){return e?k(e).length:0},only:function(e){var t=k(e);if(1!==t.length)throw"Children.only";return t[0]},toArray:k},Se=r.__e;r.__e=function(e,t,n,r){if(e.then)for(var i,o=t;o=o.__;)if((i=o.__c)&&i.__c)return null==t.__e&&(t.__e=n.__e,t.__k=n.__k),i.__c(e,t);Se(e,t,n,r)};var Fe=r.unmount;function Ne(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=ge({},e)).__c&&(e.__c.__P===n&&(e.__c.__P=t),e.__c=null),e.__k=e.__k&&e.__k.map((function(e){return Ne(e,t,n)}))),e}function Oe(e,t,n){return e&&(e.__v=null,e.__k=e.__k&&e.__k.map((function(e){return Oe(e,t,n)})),e.__c&&e.__c.__P===t&&(e.__e&&n.insertBefore(e.__e,e.__d),e.__c.__e=!0,e.__c.__P=n)),e}function Te(){this.__u=0,this.t=null,this.__b=null}function Be(e){var t=e.__.__c;return t&&t.__a&&t.__a(e)}function Me(e){var t,n,r;function i(i){if(t||(t=e()).then((function(e){n=e.default||e}),(function(e){r=e})),r)throw r;if(!n)throw t;return h(n,i)}return i.displayName="Lazy",i.__f=!0,i}function Le(){this.u=null,this.o=null}r.unmount=function(e){var t=e.__c;t&&t.__R&&t.__R(),t&&!0===e.__h&&(e.type=null),Fe&&Fe(e)},(Te.prototype=new y).__c=function(e,t){var n=t.__c,r=this;null==r.t&&(r.t=[]),r.t.push(n);var i=Be(r.__v),o=!1,a=function(){o||(o=!0,n.__R=null,i?i(u):u())};n.__R=a;var u=function(){if(!--r.__u){if(r.state.__a){var e=r.state.__a;r.__v.__k[0]=Oe(e,e.__c.__P,e.__c.__O)}var t;for(r.setState({__a:r.__b=null});t=r.t.pop();)t.forceUpdate()}},l=!0===t.__h;r.__u++||l||r.setState({__a:r.__b=r.__v.__k[0]}),e.then(a,a)},Te.prototype.componentWillUnmount=function(){this.t=[]},Te.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]=Ne(this.__b,n,r.__O=r.__P)}this.__b=null}var i=t.__a&&h(m,null,e.fallback);return i&&(i.__h=null),[h(m,null,t.__a?null:e.children),i]};var Pe=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)}}),P(h($e,{context:t.context},e.__v),t.l)):t.l&&t.componentWillUnmount()}function Ie(e,t){var n=h(Re,{__v:e,i:t});return n.containerInfo=t,n}(Le.prototype=new y).__a=function(e){var t=this,n=Be(t.__v),r=t.o.get(e);return r[0]++,function(i){var o=function(){t.props.revealOrder?(r.push(i),Pe(t,e,r)):i()};n?n(o):o()}},Le.prototype.render=function(e){this.u=null,this.o=new Map;var t=k(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},Le.prototype.componentDidUpdate=Le.prototype.componentDidMount=function(){var e=this;this.o.forEach((function(t,n){Pe(e,n,t)}))};var je="undefined"!=typeof Symbol&&Symbol.for&&Symbol.for("react.element")||60103,ze=/^(?:accent|alignment|arabic|baseline|cap|clip(?!PathU)|color|dominant|fill|flood|font|glyph(?!R)|horiz|image|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]/,Ue="undefined"!=typeof document,He=function(e){return("undefined"!=typeof Symbol&&"symbol"==typeof Symbol()?/fil|che|rad/i:/fil|che|ra/i).test(e)};function Ye(e,t,n){return null==t.__k&&(t.textContent=""),P(e,t),"function"==typeof n&&n(),e?e.__c:null}function Ve(e,t,n){return $(e,t),"function"==typeof n&&n(),e?e.__c:null}y.prototype.isReactComponent={},["componentWillMount","componentWillReceiveProps","componentWillUpdate"].forEach((function(e){Object.defineProperty(y.prototype,e,{configurable:!0,get:function(){return this["UNSAFE_"+e]},set:function(t){Object.defineProperty(this,e,{configurable:!0,writable:!0,value:t})}})}));var qe=r.event;function We(){}function Qe(){return this.cancelBubble}function Ge(){return this.defaultPrevented}r.event=function(e){return qe&&(e=qe(e)),e.persist=We,e.isPropagationStopped=Qe,e.isDefaultPrevented=Ge,e.nativeEvent=e};var Ze,Je={configurable:!0,get:function(){return this.class}},Ke=r.vnode;r.vnode=function(e){var t=e.type,n=e.props,r=n;if("string"==typeof t){var i=-1===t.indexOf("-");for(var o in r={},n){var a=n[o];Ue&&"children"===o&&"noscript"===t||"value"===o&&"defaultValue"in n&&null==a||("defaultValue"===o&&"value"in n&&null==n.value?o="value":"download"===o&&!0===a?a="":/ondoubleclick/i.test(o)?o="ondblclick":/^onchange(textarea|input)/i.test(o+t)&&!He(n.type)?o="oninput":/^onfocus$/i.test(o)?o="onfocusin":/^onblur$/i.test(o)?o="onfocusout":/^on(Ani|Tra|Tou|BeforeInp|Compo)/.test(o)?o=o.toLowerCase():i&&ze.test(o)?o=o.replace(/[A-Z0-9]/g,"-$&").toLowerCase():null===a&&(a=void 0),/^oninput$/i.test(o)&&(o=o.toLowerCase(),r[o]&&(o="oninputCapture")),r[o]=a)}"select"==t&&r.multiple&&Array.isArray(r.value)&&(r.value=k(n.children).forEach((function(e){e.props.selected=-1!=r.value.indexOf(e.props.value)}))),"select"==t&&null!=r.defaultValue&&(r.value=k(n.children).forEach((function(e){e.props.selected=r.multiple?-1!=r.defaultValue.indexOf(e.props.value):r.defaultValue==e.props.value}))),e.props=r,n.class!=n.className&&(Je.enumerable="className"in n,null!=n.className&&(r.class=n.className),Object.defineProperty(r,"className",Je))}e.$$typeof=je,Ke&&Ke(e)};var Xe=r.__r;r.__r=function(e){Xe&&Xe(e),Ze=e.__c};var et={ReactCurrentDispatcher:{current:{readContext:function(e){return Ze.__n[e.__c].props.value}}}},tt="17.0.2";function nt(e){return h.bind(null,e)}function rt(e){return!!e&&e.$$typeof===je}function it(e){return rt(e)?R.apply(null,arguments):e}function ot(e){return!!e.__k&&(P(null,e),!0)}function at(e){return e&&(e.base||1===e.nodeType&&e)||null}var ut=function(e,t){return e(t)},lt=function(e,t){return e(t)},ct=m;function st(e){e()}function ft(e){return e}function dt(){return[!1,st]}var ht=ne;function pt(e,t){var n=t(),r=X({h:{__:n,v:t}}),i=r[0].h,o=r[1];return ne((function(){i.__=n,i.v=t,be(i.__,t())||o({h:i})}),[e,n,t]),te((function(){return be(i.__,i.v())||o({h:i}),e((function(){be(i.__,i.v())||o({h:i})}))}),[e]),n}var vt,mt={useState:X,useId:se,useReducer:ee,useEffect:te,useLayoutEffect:ne,useInsertionEffect:ht,useTransition:dt,useDeferredValue:ft,useSyncExternalStore:pt,startTransition:st,useRef:re,useImperativeHandle:ie,useMemo:oe,useCallback:ae,useContext:ue,useDebugValue:le,version:"17.0.2",Children:Ae,render:Ye,hydrate:Ve,unmountComponentAtNode:ot,createPortal:Ie,createElement:h,createContext:I,createFactory:nt,cloneElement:it,createRef:v,Fragment:m,isValidElement:rt,findDOMNode:at,Component:y,PureComponent:De,memo:we,forwardRef:Ce,flushSync:lt,unstable_batchedUpdates:ut,StrictMode:ct,Suspense:Te,SuspenseList:Le,lazy:Me,__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED:et};function yt(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n=0&&(t.hash=e.substr(n),e=e.substr(0,n));var r=e.indexOf("?");r>=0&&(t.search=e.substr(r),e=e.substr(0,r)),e&&(t.pathname=e)}return t}function zt(e){var t="undefined"!==typeof window&&"undefined"!==typeof window.location&&"null"!==window.location.origin?window.location.origin:"unknown://unknown",n="string"===typeof e?e:It(e);return new URL(n,t)}function Ut(e,t,n,r){void 0===r&&(r={});var i=r,o=i.window,a=void 0===o?document.defaultView:o,u=i.v5Compat,l=void 0!==u&&u,c=a.history,s=vt.Pop,f=null;function d(){s=vt.Pop,f&&f({action:s,location:h.location})}var h={get action(){return s},get location(){return e(a,c)},listen:function(e){if(f)throw new Error("A history only accepts one active listener");return a.addEventListener(Lt,d),f=e,function(){a.removeEventListener(Lt,d),f=null}},createHref:function(e){return t(a,e)},encodeLocation:function(e){var t=zt(It(e));return Bt({},e,{pathname:t.pathname,search:t.search,hash:t.hash})},push:function(e,t){s=vt.Push;var r=Rt(h.location,e,t);n&&n(r,e);var i=$t(r),o=h.createHref(r);try{c.pushState(i,"",o)}catch(u){a.location.assign(o)}l&&f&&f({action:s,location:h.location})},replace:function(e,t){s=vt.Replace;var r=Rt(h.location,e,t);n&&n(r,e);var i=$t(r),o=h.createHref(r);c.replaceState(i,"",o),l&&f&&f({action:s,location:h.location})},go:function(e){return c.go(e)}};return h}function Ht(e,t,n){void 0===n&&(n="/");var r=Jt(("string"===typeof t?jt(t):t).pathname||"/",n);if(null==r)return null;var i=Yt(e);!function(e){e.sort((function(e,t){return e.score!==t.score?t.score-e.score:function(e,t){var n=e.length===t.length&&e.slice(0,-1).every((function(e,n){return e===t[n]}));return n?e[e.length-1]-t[t.length-1]:0}(e.routesMeta.map((function(e){return e.childrenIndex})),t.routesMeta.map((function(e){return e.childrenIndex})))}))}(i);for(var o=null,a=0;null==o&&a0&&(Kt(!0!==e.index,'Index routes must not have child routes. Please remove all child routes from route path "'+a+'".'),Yt(e.children,t,u,a)),(null!=e.path||e.index)&&t.push({path:a,score:Wt(a,e.index),routesMeta:u})})),t}!function(e){e.data="data",e.deferred="deferred",e.redirect="redirect",e.error="error"}(Mt||(Mt={}));var Vt=/^:\w+$/,qt=function(e){return"*"===e};function Wt(e,t){var n=e.split("/"),r=n.length;return n.some(qt)&&(r+=-2),t&&(r+=2),n.filter((function(e){return!qt(e)})).reduce((function(e,t){return e+(Vt.test(t)?3:""===t?1:10)}),r)}function Qt(e,t){for(var n=e.routesMeta,r={},i="/",o=[],a=0;a and the router will parse it for you.'}function tn(e){return e.filter((function(e,t){return 0===t||e.route.path&&e.route.path.length>0}))}function nn(e,t,n,r){var i;void 0===r&&(r=!1),"string"===typeof e?i=jt(e):(Kt(!(i=Bt({},e)).pathname||!i.pathname.includes("?"),en("?","pathname","search",i)),Kt(!i.pathname||!i.pathname.includes("#"),en("#","pathname","hash",i)),Kt(!i.search||!i.search.includes("#"),en("#","search","hash",i)));var o,a=""===e||""===i.pathname,u=a?"/":i.pathname;if(r||null==u)o=n;else{var l=t.length-1;if(u.startsWith("..")){for(var c=u.split("/");".."===c[0];)c.shift(),l-=1;i.pathname=c.join("/")}o=l>=0?t[l]:"/"}var s=function(e,t){void 0===t&&(t="/");var n="string"===typeof e?jt(e):e,r=n.pathname,i=n.search,o=void 0===i?"":i,a=n.hash,u=void 0===a?"":a,l=r?r.startsWith("/")?r:function(e,t){var n=t.replace(/\/+$/,"").split("/");return e.split("/").forEach((function(e){".."===e?n.length>1&&n.pop():"."!==e&&n.push(e)})),n.length>1?n.join("/"):"/"}(r,t):t;return{pathname:l,search:an(o),hash:un(u)}}(i,o),f=u&&"/"!==u&&u.endsWith("/"),d=(a||"."===u)&&n.endsWith("/");return s.pathname.endsWith("/")||!f&&!d||(s.pathname+="/"),s}var rn=function(e){return e.join("/").replace(/\/\/+/g,"/")},on=function(e){return e.replace(/\/+$/,"").replace(/^\/*/,"/")},an=function(e){return e&&"?"!==e?e.startsWith("?")?e:"?"+e:""},un=function(e){return e&&"#"!==e?e.startsWith("#")?e:"#"+e:""};Error;var ln=xt((function e(t,n,r){Dt(this,e),this.status=t,this.statusText=n||"",this.data=r}));function cn(e){return e instanceof ln}"undefined"!==typeof window&&"undefined"!==typeof window.document&&window.document.createElement;var sn=new Set(["POST","PUT","PATCH","DELETE"]);new Set(["GET","HEAD"].concat(bt(sn)));function fn(){return fn=Object.assign?Object.assign.bind():function(e){for(var t=1;t")))}var Nn,On,Tn=function(e){Ct(n,e);var t=Nt(n);function n(e){var r;return Dt(this,n),(r=t.call(this,e)).state={location:e.location,error:e.error},r}return xt(n,[{key:"componentDidCatch",value:function(e,t){console.error("React Router caught the following error during render",e,t)}},{key:"render",value:function(){return this.state.error?h(kn.Provider,{value:this.state.error,children:this.props.component}):this.props.children}}],[{key:"getDerivedStateFromError",value:function(e){return{error:e}}},{key:"getDerivedStateFromProps",value:function(e,t){return t.location!==e.location?{error:e.error,location:e.location}:{error:e.error||t.error,location:t.location}}}]),n}(y);function Bn(e){var t=e.routeContext,n=e.match,r=e.children,i=ue(gn);return i&&n.route.errorElement&&(i._deepestRenderedBoundaryId=n.route.id),h(xn.Provider,{value:t},r)}function Mn(e,t,n){if(void 0===t&&(t=[]),null==e){if(null==n||!n.errors)return null;e=n.matches}var r=e,i=null==n?void 0:n.errors;if(null!=i){var o=r.findIndex((function(e){return e.route.id&&(null==i?void 0:i[e.route.id])}));o>=0||Kt(!1),r=r.slice(0,Math.min(r.length,o+1))}return r.reduceRight((function(e,o,a){var u=o.route.id?null==i?void 0:i[o.route.id]:null,l=n?o.route.errorElement||h(Fn,null):null,c=function(){return h(Bn,{match:o,routeContext:{outlet:e,matches:t.concat(r.slice(0,a+1))}},u?l:void 0!==o.route.element?o.route.element:e)};return n&&(o.route.errorElement||0===a)?h(Tn,{location:n.location,component:l,error:u,children:c()}):c()}),null)}function Ln(e){var t=ue(bn);return t||Kt(!1),t}!function(e){e.UseRevalidator="useRevalidator"}(Nn||(Nn={})),function(e){e.UseLoaderData="useLoaderData",e.UseActionData="useActionData",e.UseRouteError="useRouteError",e.UseNavigation="useNavigation",e.UseRouteLoaderData="useRouteLoaderData",e.UseMatches="useMatches",e.UseRevalidator="useRevalidator"}(On||(On={}));var Pn;function $n(e){return function(e){var t=ue(xn).outlet;return t?h(Sn.Provider,{value:e},t):t}(e.context)}function Rn(e){Kt(!1)}function In(e){var t=e.basename,n=void 0===t?"/":t,r=e.children,i=void 0===r?null:r,o=e.location,a=e.navigationType,u=void 0===a?vt.Pop:a,l=e.navigator,c=e.static,s=void 0!==c&&c;Cn()&&Kt(!1);var f=n.replace(/^\/*/,"/"),d=oe((function(){return{basename:f,navigator:l,static:s}}),[f,l,s]);"string"===typeof o&&(o=jt(o));var p=o,v=p.pathname,m=void 0===v?"/":v,y=p.search,g=void 0===y?"":y,_=p.hash,b=void 0===_?"":_,D=p.state,w=void 0===D?null:D,x=p.key,k=void 0===x?"default":x,C=oe((function(){var e=Jt(m,f);return null==e?null:{pathname:e,search:g,hash:b,state:w,key:k}}),[f,m,g,b,w,k]);return null==C?null:h(Dn.Provider,{value:d},h(wn.Provider,{children:i,value:{location:C,navigationType:u}}))}function jn(e){var t=e.children,n=e.location,r=ue(_n);return function(e,t){Cn()||Kt(!1);var n,r=ue(bn),i=ue(xn).matches,o=i[i.length-1],a=o?o.params:{},u=(o&&o.pathname,o?o.pathnameBase:"/"),l=(o&&o.route,En());if(t){var c,s="string"===typeof t?jt(t):t;"/"===u||(null==(c=s.pathname)?void 0:c.startsWith(u))||Kt(!1),n=s}else n=l;var f=n.pathname||"/",d=Ht(e,{pathname:"/"===u?f:f.slice(u.length)||"/"}),p=Mn(d&&d.map((function(e){return Object.assign({},e,{params:Object.assign({},a,e.params),pathname:rn([u,e.pathname]),pathnameBase:"/"===e.pathnameBase?u:rn([u,e.pathnameBase])})})),i,r||void 0);return t&&p?h(wn.Provider,{value:{location:fn({pathname:"/",search:"",hash:"",state:null,key:"default"},n),navigationType:vt.Pop}},p):p}(r&&!t?r.router.routes:zn(t),n)}!function(e){e[e.pending=0]="pending",e[e.success=1]="success",e[e.error=2]="error"}(Pn||(Pn={}));new Promise((function(){}));function zn(e,t){void 0===t&&(t=[]);var n=[];return Ae.forEach(e,(function(e,r){if(rt(e))if(e.type!==m){e.type!==Rn&&Kt(!1),e.props.index&&e.props.children&&Kt(!1);var i=[].concat(bt(t),[r]),o={id:e.props.id||i.join("-"),caseSensitive:e.props.caseSensitive,element:e.props.element,index:e.props.index,path:e.props.path,loader:e.props.loader,action:e.props.action,errorElement:e.props.errorElement,hasErrorBoundary:null!=e.props.errorElement,shouldRevalidate:e.props.shouldRevalidate,handle:e.props.handle};e.props.children&&(o.children=zn(e.props.children,i)),n.push(o)}else n.push.apply(n,zn(e.props.children,t))})),n}function Un(e){var t=e.basename,n=e.children,r=e.window,i=re();null==i.current&&(i.current=function(e){return void 0===e&&(e={}),Ut((function(e,t){var n=jt(e.location.hash.substr(1)),r=n.pathname,i=void 0===r?"/":r,o=n.search,a=void 0===o?"":o,u=n.hash;return Rt("",{pathname:i,search:a,hash:void 0===u?"":u},t.state&&t.state.usr||null,t.state&&t.state.key||"default")}),(function(e,t){var n=e.document.querySelector("base"),r="";if(n&&n.getAttribute("href")){var i=e.location.href,o=i.indexOf("#");r=-1===o?i:i.slice(0,o)}return r+"#"+("string"===typeof t?t:It(t))}),(function(e,t){Pt("/"===e.pathname.charAt(0),"relative pathnames are not supported in hash history.push("+JSON.stringify(t)+")")}),e)}({window:r,v5Compat:!0}));var o=i.current,a=_t(X({action:o.action,location:o.location}),2),u=a[0],l=a[1];return ne((function(){return o.listen(l)}),[o]),h(In,{basename:t,children:n,location:u.location,navigationType:u.action,navigator:o})}var Hn,Yn;(function(e){e.UseScrollRestoration="useScrollRestoration",e.UseSubmitImpl="useSubmitImpl",e.UseFetcher="useFetcher"})(Hn||(Hn={})),function(e){e.UseFetchers="useFetchers",e.UseScrollRestoration="useScrollRestoration"}(Yn||(Yn={}));var Vn;function qn(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}var Wn={home:"/",dashboards:"/dashboards",cardinality:"/cardinality",topQueries:"/top-queries"},Qn={header:{timeSelector:!0,executionControls:!0,globalSettings:!0}},Gn=(qn(Vn={},Wn.home,Qn),qn(Vn,Wn.dashboards,Qn),qn(Vn,Wn.cardinality,{header:{cardinalityDatePicker:!0,globalSettings:!0}}),Vn),Zn=Wn;function Jn(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}function Kn(e){for(var t=1;t2&&void 0!==arguments[2]?arguments[2]:window.location.search,r=nr().parse(n,{ignoreQueryPrefix:!0});return ir()(r,e,t||"")},lr={serverUrl:Xn().serverURL||window.location.href.replace(/\/(?:prometheus\/)?(?:graph|vmui)\/.*/,"/prometheus"),tenantId:Number(ur("g0.tenantID",0))};function cr(e,t){switch(t.type){case"SET_SERVER":return Kn(Kn({},e),{},{serverUrl:t.payload});case"SET_TENANT_ID":return Kn(Kn({},e),{},{tenantId:t.payload});default:throw new Error}}var sr=0;function fr(e,t,n,i,o){var a,u,l={};for(u in t)"ref"==u?a=t[u]:l[u]=t[u];var c={type:e,props:l,key:n,ref:a,__k:null,__:null,__b:0,__e:null,__d:void 0,__c:null,__h:null,constructor:void 0,__v:--sr,__source:o,__self:i};if("function"==typeof e&&(a=e.defaultProps))for(u in a)void 0===l[u]&&(l[u]=a[u]);return r.vnode&&r.vnode(c),c}var dr=I({}),hr=function(){return ue(dr).state},pr=function(){return ue(dr).dispatch},vr=Object.entries(lr).reduce((function(e,t){var n=_t(t,2),r=n[0],i=n[1];return Kn(Kn({},e),{},qn({},r,ur(r)||i))}),{}),mr=n(658),yr=n.n(mr),gr=n(446),_r=n.n(gr),br=n(635),Dr=n.n(br),wr="YYYY-MM-DD",xr="YYYY-MM-DD HH:mm:ss",kr="YYYY-MM-DD[T]HH:mm:ss";yr().extend(_r()),yr().extend(Dr());var Cr,Er=window.innerWidth/4,Ar=1,Sr=1578e8,Fr=[{long:"days",short:"d",possible:"day"},{long:"weeks",short:"w",possible:"week"},{long:"months",short:"M",possible:"mon"},{long:"years",short:"y",possible:"year"},{long:"hours",short:"h",possible:"hour"},{long:"minutes",short:"m",possible:"min"},{long:"seconds",short:"s",possible:"sec"},{long:"milliseconds",short:"ms",possible:"millisecond"}].map((function(e){return e.short})),Nr=function(e){return Math.round(1e3*e)/1e3},Or=function(e){var t=e.match(/\d+/g),n=e.match(/[a-zA-Z]+/g);if(n&&t&&Fr.includes(n[0]))return qn({},n[0],t[0])},Tr=function(e,t){var n=(t||new Date).valueOf()/1e3,r=e.trim().split(" ").reduce((function(e,t){var n=Or(t);return n?Kn(Kn({},e),n):Kn({},e)}),{}),i=yr().duration(r).asSeconds();return{start:n-i,end:n,step:Nr(i/Er)||.001,date:Br(t||new Date)}},Br=function(e){return yr()(e).utc().format(kr)},Mr=function(e){return yr()(e).format(kr)},Lr=function(e){var t=Math.floor(e%1e3),n=Math.floor(e/1e3%60),r=Math.floor(e/1e3/60%60),i=Math.floor(e/1e3/3600%24),o=Math.floor(e/864e5),a=["d","h","m","s","ms"],u=[o,i,r,n,t].map((function(e,t){return e?"".concat(e).concat(a[t]):""}));return u.filter((function(e){return e})).join(" ")},Pr=function(e){return new Date(1e3*e)},$r=[{title:"Last 5 minutes",duration:"5m"},{title:"Last 15 minutes",duration:"15m"},{title:"Last 30 minutes",duration:"30m",isDefault:!0},{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:function(){return yr()().subtract(1,"day").endOf("day").toDate()}},{title:"Today",duration:"1d",until:function(){return yr()().endOf("day").toDate()}}].map((function(e){return Kn({id:e.title.replace(/\s/g,"_").toLocaleLowerCase(),until:e.until?e.until:function(){return yr()().toDate()}},e)})),Rr=function(e){var t,n=e.relativeTimeId,r=e.defaultDuration,i=e.defaultEndInput,o=null===(t=$r.find((function(e){return e.isDefault})))||void 0===t?void 0:t.id,a=n||ur("g0.relative_time",o),u=$r.find((function(e){return e.id===a}));return{relativeTimeId:u?a:"none",duration:u?u.duration:r,endInput:u?u.until():i}},Ir=ur("g0.range_input"),jr=Rr({defaultDuration:Ir||"1h",defaultEndInput:new Date((Cr=ur("g0.end_input",new Date(yr()().utc().format(kr))),yr()(Cr).utcOffset(0,!0).local().format(kr))),relativeTimeId:Ir?ur("g0.relative_time","none"):void 0}),zr=jr.duration,Ur=jr.endInput,Hr=jr.relativeTimeId,Yr={duration:zr,period:Tr(zr,Ur),relativeTime:Hr};function Vr(e,t){switch(t.type){case"SET_DURATION":return Kn(Kn({},e),{},{duration:t.payload,period:Tr(t.payload,Pr(e.period.end)),relativeTime:"none"});case"SET_RELATIVE_TIME":return Kn(Kn({},e),{},{duration:t.payload.duration,period:Tr(t.payload.duration,new Date(t.payload.until)),relativeTime:t.payload.id});case"SET_PERIOD":var n=function(e){var t=e.to.valueOf()-e.from.valueOf();return Lr(t)}(t.payload);return Kn(Kn({},e),{},{duration:n,period:Tr(n,t.payload.to),relativeTime:"none"});case"RUN_QUERY":var r=Rr({relativeTimeId:e.relativeTime,defaultDuration:e.duration,defaultEndInput:Pr(e.period.end)}),i=r.duration,o=r.endInput;return Kn(Kn({},e),{},{period:Tr(i,o)});case"RUN_QUERY_TO_NOW":return Kn(Kn({},e),{},{period:Tr(e.duration)});default:throw new Error}}var qr=I({}),Wr=function(){return ue(qr).state},Qr=function(){return ue(qr).dispatch},Gr=function(e,t){t?window.localStorage.setItem(e,JSON.stringify({value:t})):Jr([e])},Zr=function(e){var 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(c){return t}},Jr=function(e){return e.forEach((function(e){return window.localStorage.removeItem(e)}))},Kr=function(){var e,t=(null===(e=window.location.search.match(/g\d+.expr/gim))||void 0===e?void 0:e.length)||1;return new Array(t>4?4:t).fill(1).map((function(e,t){return ur("g".concat(t,".expr"),"")}))}(),Xr={query:Kr,queryHistory:Kr.map((function(e){return{index:0,values:[e]}})),autocomplete:Zr("AUTOCOMPLETE")||!1};function ei(e,t){switch(t.type){case"SET_QUERY":return Kn(Kn({},e),{},{query:t.payload.map((function(e){return e}))});case"SET_QUERY_HISTORY":return Kn(Kn({},e),{},{queryHistory:t.payload});case"SET_QUERY_HISTORY_BY_INDEX":return e.queryHistory.splice(t.payload.queryNumber,1,t.payload.value),Kn(Kn({},e),{},{queryHistory:e.queryHistory});case"TOGGLE_AUTOCOMPLETE":return Gr("AUTOCOMPLETE",!e.autocomplete),Kn(Kn({},e),{},{autocomplete:!e.autocomplete});default:throw new Error}}var ti=I({}),ni=function(){return ue(ti).state},ri=function(){return ue(ti).dispatch},ii=function(){return fr("svg",{viewBox:"0 0 74 24",fill:"currentColor",children:[fr("path",{d:"M6.11771 9.47563C6.4774 9.7554 6.91935 9.90875 7.37507 9.9119H7.42685C7.9076 9.90451 8.38836 9.71964 8.67681 9.46823C10.1856 8.18898 14.5568 4.18115 14.5568 4.18115C15.7254 3.09415 12.4637 2.00716 7.42685 1.99977H7.36768C2.33084 2.00716 -0.930893 3.09415 0.237711 4.18115C0.237711 4.18115 4.60888 8.18898 6.11771 9.47563ZM8.67681 11.6422C8.31807 11.9246 7.87603 12.0806 7.41945 12.0859H7.37507C6.91849 12.0806 6.47645 11.9246 6.11771 11.6422C5.08224 10.7549 1.38413 7.41995 0.00103198 6.14809V8.07806C0.00103198 8.2925 0.0823905 8.57349 0.222919 8.70659L0.293358 8.77097L0.293386 8.77099C1.33788 9.72556 4.83907 12.9253 6.11771 14.0159C6.47645 14.2983 6.91849 14.4543 7.37507 14.4595H7.41945C7.9076 14.4447 8.38096 14.2599 8.67681 14.0159C9.98594 12.9067 13.6249 9.57175 14.5642 8.70659C14.7121 8.57349 14.7861 8.2925 14.7861 8.07806V6.14809C12.7662 7.99781 10.7297 9.82926 8.67681 11.6422ZM7.41945 16.6261C7.87517 16.623 8.31712 16.4696 8.67681 16.1898C10.7298 14.3744 12.7663 12.5405 14.7861 10.6883V12.6257C14.7861 12.8327 14.7121 13.1137 14.5642 13.2468C13.6249 14.1194 9.98594 17.4469 8.67681 18.5561C8.38096 18.8075 7.9076 18.9924 7.41945 18.9998H7.37507C6.91935 18.9966 6.4774 18.8433 6.11771 18.5635C4.91431 17.5371 1.74223 14.6362 0.502336 13.5023C0.3934 13.4027 0.299379 13.3167 0.222919 13.2468C0.0823905 13.1137 0.00103198 12.8327 0.00103198 12.6257V10.6883C1.38413 11.9528 5.08224 15.2951 6.11771 16.1825C6.47645 16.4649 6.91849 16.6209 7.37507 16.6261H7.41945Z",fill:"currentColor"}),fr("path",{d:"M35 3.54L29.16 18H26.73L20.89 3.54H23.05C23.2833 3.54 23.4733 3.59667 23.62 3.71C23.7667 3.82333 23.8767 3.97 23.95 4.15L27.36 12.97C27.4733 13.2567 27.58 13.5733 27.68 13.92C27.7867 14.26 27.8867 14.6167 27.98 14.99C28.06 14.6167 28.1467 14.26 28.24 13.92C28.3333 13.5733 28.4367 13.2567 28.55 12.97L31.94 4.15C31.9933 3.99667 32.0967 3.85667 32.25 3.73C32.41 3.60333 32.6033 3.54 32.83 3.54H35ZM52.1767 3.54V18H49.8067V8.66C49.8067 8.28667 49.8267 7.88333 49.8667 7.45L45.4967 15.66C45.2901 16.0533 44.9734 16.25 44.5467 16.25H44.1667C43.7401 16.25 43.4234 16.0533 43.2167 15.66L38.7967 7.42C38.8167 7.64 38.8334 7.85667 38.8467 8.07C38.8601 8.28333 38.8667 8.48 38.8667 8.66V18H36.4967V3.54H38.5267C38.6467 3.54 38.7501 3.54333 38.8367 3.55C38.9234 3.55667 39.0001 3.57333 39.0667 3.6C39.1401 3.62667 39.2034 3.67 39.2567 3.73C39.3167 3.79 39.3734 3.87 39.4267 3.97L43.7567 12C43.8701 12.2133 43.9734 12.4333 44.0667 12.66C44.1667 12.8867 44.2634 13.12 44.3567 13.36C44.4501 13.1133 44.5467 12.8767 44.6467 12.65C44.7467 12.4167 44.8534 12.1933 44.9667 11.98L49.2367 3.97C49.2901 3.87 49.3467 3.79 49.4067 3.73C49.4667 3.67 49.5301 3.62667 49.5967 3.6C49.6701 3.57333 49.7501 3.55667 49.8367 3.55C49.9234 3.54333 50.0267 3.54 50.1467 3.54H52.1767ZM61.063 17.27C61.743 17.27 62.3496 17.1533 62.883 16.92C63.423 16.68 63.8796 16.35 64.253 15.93C64.6263 15.51 64.9096 15.0167 65.103 14.45C65.303 13.8767 65.403 13.26 65.403 12.6V3.85H66.423V12.6C66.423 13.38 66.2996 14.11 66.053 14.79C65.8063 15.4633 65.4496 16.0533 64.983 16.56C64.523 17.06 63.9596 17.4533 63.293 17.74C62.633 18.0267 61.8896 18.17 61.063 18.17C60.2363 18.17 59.4896 18.0267 58.823 17.74C58.163 17.4533 57.5996 17.06 57.133 16.56C56.673 16.0533 56.3196 15.4633 56.073 14.79C55.8263 14.11 55.703 13.38 55.703 12.6V3.85H56.733V12.59C56.733 13.25 56.8296 13.8667 57.023 14.44C57.223 15.0067 57.5063 15.5 57.873 15.92C58.2463 16.34 58.6996 16.67 59.233 16.91C59.773 17.15 60.383 17.27 61.063 17.27ZM71.4442 18H70.4142V3.85H71.4442V18Z",fill:"currentColor"})]})},oi=function(){return fr("svg",{viewBox:"0 0 24 24",fill:"currentColor",children:fr("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"})})},ai=function(){return fr("svg",{viewBox:"0 0 24 24",fill:"currentColor",children:fr("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"})})},ui=function(){return fr("svg",{viewBox:"0 0 24 24",fill:"currentColor",children:fr("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"})})},li=function(){return fr("svg",{viewBox:"0 0 24 24",fill:"currentColor",children:fr("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"})})},ci=function(){return fr("svg",{viewBox:"0 0 24 24",fill:"currentColor",children:fr("path",{d:"M1 21h22L12 2 1 21zm12-3h-2v-2h2v2zm0-4h-2v-4h2v4z"})})},si=function(){return fr("svg",{viewBox:"0 0 24 24",fill:"currentColor",children:fr("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"})})},fi=function(){return fr("svg",{viewBox:"0 0 24 24",fill:"currentColor",children:fr("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"})})},di=function(){return fr("svg",{viewBox:"0 0 24 24",fill:"currentColor",children:fr("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"})})},hi=function(){return fr("svg",{viewBox:"0 0 24 24",fill:"currentColor",children:fr("path",{d:"M7.41 8.59 12 13.17l4.59-4.58L18 10l-6 6-6-6 1.41-1.41z"})})},pi=function(){return fr("svg",{viewBox:"0 0 24 24",fill:"currentColor",children:fr("path",{d:"m12 8-6 6 1.41 1.41L12 10.83l4.59 4.58L18 14z"})})},vi=function(){return fr("svg",{viewBox:"0 0 24 24",fill:"currentColor",children:fr("path",{d:"m7 10 5 5 5-5z"})})},mi=function(){return fr("svg",{viewBox:"0 0 24 24",fill:"currentColor",children:[fr("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"}),fr("path",{d:"M12.5 7H11v6l5.25 3.15.75-1.23-4.5-2.67z"})]})},yi=function(){return fr("svg",{viewBox:"0 0 24 24",fill:"currentColor",children:fr("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"})})},gi=function(){return fr("svg",{viewBox:"0 0 24 24",fill:"currentColor",children:fr("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"})})},_i=function(){return fr("svg",{viewBox:"0 0 24 24",fill:"currentColor",children:fr("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"})})},bi=function(){return fr("svg",{viewBox:"0 0 24 24",fill:"currentColor",children:fr("path",{d:"M8 5v14l11-7z"})})},Di=function(){return fr("svg",{viewBox:"0 0 24 24",fill:"currentColor",children:fr("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"})})},wi=function(){return fr("svg",{viewBox:"0 0 24 24",fill:"currentColor",children:fr("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"})})},xi=function(){return fr("svg",{viewBox:"0 0 24 24",fill:"currentColor",children:fr("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"})})},ki=function(){return fr("svg",{viewBox:"0 0 24 24",fill:"currentColor",children:fr("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"})})},Ci=function(){return fr("svg",{viewBox:"0 0 24 24",fill:"currentColor",children:fr("path",{d:"M6 19c0 1.1.9 2 2 2h8c1.1 0 2-.9 2-2V7H6v12zM19 4h-3.5l-1-1h-5l-1 1H5v2h14V4z"})})},Ei=function(){return fr("svg",{viewBox:"0 0 24 24",fill:"currentColor",children:fr("path",{d:"M19 13h-6v6h-2v-6H5v-2h6V5h2v6h6v2z"})})},Ai=function(){return fr("svg",{viewBox:"0 0 24 24",fill:"currentColor",children:fr("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"})})},Si=n(123),Fi=n.n(Si),Ni=function(e){return getComputedStyle(document.documentElement).getPropertyValue("--".concat(e))},Oi=function(e,t){document.documentElement.style.setProperty("--".concat(e),t)},Ti=function(e){var t=e.activeItem,n=e.items,r=e.color,i=void 0===r?Ni("color-primary"):r,o=e.onChange,a=e.indicatorPlacement,u=void 0===a?"bottom":a,l=re(null),c=_t(X({left:0,width:0,bottom:0}),2),s=c[0],f=c[1];return te((function(){if(l.current){var e=l.current,t=e.offsetLeft,n=e.offsetWidth,r=e.offsetHeight;f({left:t,width:n,bottom:"top"===u?r-2:0})}}),[t,l,n]),fr("div",{className:"vm-tabs",children:[n.map((function(e){return fr("div",{className:Fi()(qn({"vm-tabs-item":!0,"vm-tabs-item_active":t===e.value},e.className||"",e.className)),ref:t===e.value?l:void 0,style:{color:i},onClick:(n=e.value,function(){o(n)}),children:[e.icon&&fr("div",{className:Fi()({"vm-tabs-item__icon":!0,"vm-tabs-item__icon_single":!e.label}),children:e.icon}),e.label]},e.value);var n})),fr("div",{className:"vm-tabs__indicator",style:Kn(Kn({},s),{},{borderColor:i})})]})},Bi=[{value:"chart",icon:fr(wi,{}),label:"Graph",prometheusCode:0},{value:"code",icon:fr(ki,{}),label:"JSON",prometheusCode:3},{value:"table",icon:fr(xi,{}),label:"Table",prometheusCode:1}],Mi=function(){var e=ji().displayType,t=zi();return fr(Ti,{activeItem:e,items:Bi,onChange:function(n){var r;t({type:"SET_DISPLAY_TYPE",payload:null!==(r=n)&&void 0!==r?r:e})}})},Li=ur("g0.tab",0),Pi=Bi.find((function(e){return e.prometheusCode===+Li||e.value===Li})),$i={displayType:(null===Pi||void 0===Pi?void 0:Pi.value)||"chart",nocache:Zr("NO_CACHE")||!1,isTracingEnabled:Zr("QUERY_TRACING")||!1};function Ri(e,t){switch(t.type){case"SET_DISPLAY_TYPE":return Kn(Kn({},e),{},{displayType:t.payload});case"TOGGLE_QUERY_TRACING":return Gr("QUERY_TRACING",!e.isTracingEnabled),Kn(Kn({},e),{},{isTracingEnabled:!e.isTracingEnabled});case"TOGGLE_NO_CACHE":return Gr("NO_CACHE",!e.nocache),Kn(Kn({},e),{},{nocache:!e.nocache});default:throw new Error}}var Ii=I({}),ji=function(){return ue(Ii).state},zi=function(){return ue(Ii).dispatch},Ui={customStep:parseFloat(ur("g0.step_input","0")),yaxis:{limits:{enable:!1,range:{1:[0,0]}}}};function Hi(e,t){switch(t.type){case"TOGGLE_ENABLE_YAXIS_LIMITS":return Kn(Kn({},e),{},{yaxis:Kn(Kn({},e.yaxis),{},{limits:Kn(Kn({},e.yaxis.limits),{},{enable:!e.yaxis.limits.enable})})});case"SET_CUSTOM_STEP":return Kn(Kn({},e),{},{customStep:t.payload});case"SET_YAXIS_LIMITS":return Kn(Kn({},e),{},{yaxis:Kn(Kn({},e.yaxis),{},{limits:Kn(Kn({},e.yaxis.limits),{},{range:t.payload})})});default:throw new Error}}var Yi=I({}),Vi=function(){return ue(Yi).dispatch},qi={runQuery:0,topN:ur("topN",10),date:ur("date",yr()(new Date).format(wr)),focusLabel:ur("focusLabel",""),match:ur("match",""),extraLabel:ur("extra_label","")};function Wi(e,t){switch(t.type){case"SET_TOP_N":return Kn(Kn({},e),{},{topN:t.payload});case"SET_DATE":return Kn(Kn({},e),{},{date:t.payload});case"SET_MATCH":return Kn(Kn({},e),{},{match:t.payload});case"SET_EXTRA_LABEL":return Kn(Kn({},e),{},{extraLabel:t.payload});case"SET_FOCUS_LABEL":return Kn(Kn({},e),{},{focusLabel:t.payload});case"RUN_QUERY":return Kn(Kn({},e),{},{runQuery:e.runQuery+1});default:throw new Error}}var Qi=I({}),Gi=function(){return ue(Qi).state},Zi=function(){return ue(Qi).dispatch},Ji={topN:ur("topN",null),maxLifetime:ur("maxLifetime",""),runQuery:0};function Ki(e,t){switch(t.type){case"SET_TOP_N":return Kn(Kn({},e),{},{topN:t.payload});case"SET_MAX_LIFE_TIME":return Kn(Kn({},e),{},{maxLifetime:t.payload});case"SET_RUN_QUERY":return Kn(Kn({},e),{},{runQuery:e.runQuery+1});default:throw new Error}}var Xi,eo=I({}),to=function(){return ue(eo).state},no={success:fr(fi,{}),error:fr(si,{}),warning:fr(ci,{}),info:fr(li,{})},ro=function(e){var t=e.variant,n=e.children;return fr("div",{className:Fi()(qn({"vm-alert":!0},"vm-alert_".concat(t),t)),children:[fr("div",{className:"vm-alert__icon",children:no[t||"info"]}),fr("div",{className:"vm-alert__content",children:n})]})},io=I({showInfoMessage:function(){}}),oo=function(){for(var e=arguments.length,t=new Array(e),n=0;nd,v=r.top-20<0,m=r.left+g.width+20>f,y=r.left-20<0;return h&&(r.top=t.top-g.height-u),v&&(r.top=t.height+t.top+u),m&&(r.left=t.right-g.width-l),y&&(r.left=t.left+l),r}),[n,i,p,t]);d&&uo(b,(function(){return v(!1)}),n);var x=Fi()(qn({"vm-popper":!0,"vm-popper_open":p},"vm-popper_open_".concat(l),l));return fr(m,{children:p&&mt.createPortal(fr("div",{className:x,ref:b,style:w,children:t}),document.body)})},co=function(e){var t=e.children,n=e.title,r=e.open,i=e.placement,o=void 0===i?"bottom-center":i,a=e.offset,u=void 0===a?{top:6,left:0}:a,l=_t(X(!1),2),c=l[0],s=l[1],f=_t(X({width:0,height:0}),2),d=f[0],h=f[1],p=re(null),v=re(null),y=function(){return s(!1)};te((function(){return window.addEventListener("scroll",y),function(){window.removeEventListener("scroll",y)}}),[]),te((function(){v.current&&c&&h({width:v.current.clientWidth,height:v.current.clientHeight})}),[c]);var g=oe((function(){var e,t=null===p||void 0===p||null===(e=p.current)||void 0===e?void 0:e.base;if(!t||!c)return{};var n=t.getBoundingClientRect(),r={top:0,left:0},i="bottom-right"===o||"top-right"===o,a="bottom-left"===o||"top-left"===o,l=null===o||void 0===o?void 0:o.includes("top"),s=(null===u||void 0===u?void 0:u.top)||0,f=(null===u||void 0===u?void 0:u.left)||0;r.left=n.left-(d.width-n.width)/2+f,r.top=n.height+n.top+s,i&&(r.left=n.right-d.width),a&&(r.left=n.left+f),l&&(r.top=n.top-d.height-s);var h=window,v=h.innerWidth,m=h.innerHeight,y=r.top+d.height+20>m,g=r.top-20<0,_=r.left+d.width+20>v,b=r.left-20<0;return y&&(r.top=n.top-d.height-s),g&&(r.top=n.height+n.top+s),_&&(r.left=n.right-d.width-f),b&&(r.left=n.left+f),r.top<0&&(r.top=20),r.left<0&&(r.left=20),r}),[p,o,c,d]),_=function(){"boolean"!==typeof r&&s(!0)},b=function(){s(!1)};return te((function(){"boolean"===typeof r&&s(r)}),[r]),te((function(){var e,t=null===p||void 0===p||null===(e=p.current)||void 0===e?void 0:e.base;if(t)return t.addEventListener("mouseenter",_),t.addEventListener("mouseleave",b),function(){t.removeEventListener("mouseenter",_),t.removeEventListener("mouseleave",b)}}),[p]),fr(m,{children:[fr(m,{ref:p,children:t}),c&&mt.createPortal(fr("div",{className:"vm-tooltip",ref:v,style:g,children:n}),document.body)]})},so=[{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"}],fo=function(){var e=Qr(),t=er(),n=_t(X(!1),2),r=n[0],i=n[1],o=_t(X(so[0]),2),a=o[0],u=o[1];te((function(){var t,n=a.seconds;return r?t=setInterval((function(){e({type:"RUN_QUERY"})}),1e3*n):u(so[0]),function(){t&&clearInterval(t)}}),[a,r]);var l=_t(X(!1),2),c=l[0],s=l[1],f=re(null),d=function(e){return function(){!function(e){(r&&!e.seconds||!r&&e.seconds)&&i((function(e){return!e})),u(e),s(!1)}(e)}};return fr(m,{children:[fr("div",{className:"vm-execution-controls",children:fr("div",{className:Fi()({"vm-execution-controls-buttons":!0,"vm-header-button":!t}),children:[fr(co,{title:"Refresh dashboard",children:fr(ao,{variant:"contained",color:"primary",onClick:function(){e({type:"RUN_QUERY"})},startIcon:fr(di,{})})}),fr(co,{title:"Auto-refresh control",children:fr("div",{ref:f,children:fr(ao,{variant:"contained",color:"primary",fullWidth:!0,endIcon:fr("div",{className:Fi()({"vm-execution-controls-buttons__arrow":!0,"vm-execution-controls-buttons__arrow_open":c}),children:fr(hi,{})}),onClick:function(){s((function(e){return!e}))},children:a.title})})})]})}),fr(lo,{open:c,placement:"bottom-right",onClose:function(){s(!1)},buttonRef:f,children:fr("div",{className:"vm-execution-controls-list",children:so.map((function(e){return fr("div",{className:Fi()({"vm-list__item":!0,"vm-list__item_active":e.seconds===a.seconds}),onClick:d(e),children:e.title},e.seconds)}))})})]})},ho=function(e){var t=e.relativeTime,n=e.setDuration;return fr("div",{className:"vm-time-duration",children:$r.map((function(e){var r,i=e.id,o=e.duration,a=e.until,u=e.title;return fr("div",{className:Fi()({"vm-list__item":!0,"vm-list__item_active":i===t}),onClick:(r={duration:o,until:a(),id:i},function(){n(r)}),children:u||o},i)}))})},po=function(e){var t=_t(X({width:0,height:0}),2),n=t[0],r=t[1];return te((function(){var t=new ResizeObserver((function(e){var t=e[0].contentRect,n=t.width,i=t.height;r({width:n,height:i})}));return e&&t.observe(e),function(){e&&t.unobserve(e)}}),[]),n},vo=function(e){var t=e.viewDate,n=e.displayYears,r=e.onChangeViewDate;return fr("div",{className:"vm-calendar-header",children:[fr("div",{className:"vm-calendar-header-left",onClick:e.toggleDisplayYears,children:[fr("span",{className:"vm-calendar-header-left__date",children:t.format("MMMM YYYY")}),fr("div",{className:"vm-calendar-header-left__select-year",children:fr(vi,{})})]}),!n&&fr("div",{className:"vm-calendar-header-right",children:[fr("div",{className:"vm-calendar-header-right__prev",onClick:function(){r(t.subtract(1,"month"))},children:fr(hi,{})}),fr("div",{className:"vm-calendar-header-right__next",onClick:function(){r(t.add(1,"month"))},children:fr(hi,{})})]})]})},mo=["Sunday","Monday","Tuesday","Wednesday","Thursday","Friday","Saturday"],yo=function(e){var t=e.viewDate,n=e.selectDate,r=e.onChangeSelectDate,i=yr()().startOf("day"),o=oe((function(){var e=new Array(42).fill(null),n=t.startOf("month"),r=t.endOf("month").diff(n,"day")+1,i=new Array(r).fill(n).map((function(e,t){return e.add(t,"day")})),o=n.day();return e.splice.apply(e,[o,r].concat(bt(i))),e}),[t]),a=function(e){return function(){e&&r(e)}};return fr("div",{className:"vm-calendar-body",children:[mo.map((function(e){return fr("div",{className:"vm-calendar-body-cell vm-calendar-body-cell_weekday",children:e[0]},e)})),o.map((function(e,t){return fr("div",{className:Fi()({"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.toISOString())===n.startOf("day").toISOString(),"vm-calendar-body-cell_day_today":(e&&e.toISOString())===i.toISOString()}),onClick:a(e),children:e&&e.format("D")},e?e.toISOString():t)}))]})},go=function(e){var t=e.viewDate,n=e.onChangeViewDate,r=oe((function(){return t.format("YYYY")}),[t]),i=oe((function(){var e=yr()().subtract(103,"year");return new Array(206).fill(e).map((function(e,t){return e.add(t,"year")}))}),[t]);te((function(){var e=document.getElementById("vm-calendar-year-".concat(r));e&&e.scrollIntoView({block:"center"})}),[]);return fr("div",{className:"vm-calendar-years",children:i.map((function(e){return fr("div",{className:Fi()({"vm-calendar-years__year":!0,"vm-calendar-years__year_selected":e.format("YYYY")===r}),id:"vm-calendar-year-".concat(e.format("YYYY")),onClick:(t=e,function(){n(t)}),children:e.format("YYYY")},e.format("YYYY"));var t}))})};!function(e){e[e.hour=0]="hour",e[e.minutes=1]="minutes",e[e.seconds=2]="seconds"}(Xi||(Xi={}));var _o,bo=function(e){var t=e.selectDate,n=e.onChangeTime,r=e.onClose,i=_t(X(Xi.hour),2),o=i[0],a=i[1],u=_t(X(t.format("HH")),2),l=u[0],c=u[1],s=_t(X(t.format("mm")),2),f=s[0],d=s[1],h=_t(X(t.format("ss")),2),p=h[0],v=h[1],m=oe((function(){return o===Xi.hour?new Array(24).fill("00").map((function(e,t){return{value:t,degrees:t/12*360,offset:0===t||t>12,title:t?"".concat(t):e}})):new Array(60).fill("00").map((function(e,t){return{value:t,degrees:t/60*360,offset:!1,title:t?"".concat(t):e}}))}),[o,l,f,p]),y=oe((function(){switch(o){case Xi.hour:return+l/12*360;case Xi.minutes:return+f/60*360;case Xi.seconds:return+p/60*360}}),[o,l,f,p]),g=re(null),_=re(null),b=re(null),D=function(e){return function(t){!function(e,t){t.target.select(),a(e)}(e,t)}};return te((function(){n("".concat(l,":").concat(f,":").concat(p))}),[l,f,p]),te((function(){c(t.format("HH")),d(t.format("mm")),v(t.format("ss"))}),[t]),te((function(){g.current&&g.current.focus()}),[]),fr("div",{className:"vm-calendar-time-picker",children:[fr("div",{className:"vm-calendar-time-picker-clock",children:[fr("div",{className:Fi()({"vm-calendar-time-picker-clock__arrow":!0,"vm-calendar-time-picker-clock__arrow_offset":o===Xi.hour&&("00"===l||+l>12)}),style:{transform:"rotate(".concat(y,"deg)")}}),m.map((function(e){return fr("div",{className:Fi()({"vm-calendar-time-picker-clock__time":!0,"vm-calendar-time-picker-clock__time_offset":e.offset,"vm-calendar-time-picker-clock__time_hide":m.length>24&&e.value%5}),style:{transform:"rotate(".concat(e.degrees,"deg)")},onClick:(t=e.value,function(){var e=String(t);switch(o){case Xi.hour:c(e),_.current&&_.current.focus();break;case Xi.minutes:d(e),b.current&&b.current.focus();break;case Xi.seconds:v(e),r()}}),children:fr("span",{style:{transform:"rotate(-".concat(e.degrees,"deg)")},children:e.title})},e.value);var t}))]}),fr("div",{className:"vm-calendar-time-picker-fields",children:[fr("input",{className:"vm-calendar-time-picker-fields__input",value:l,onChange:function(e){var t=e.target,n=t.value,r=+n>23?"23":n;t.value=r,c(r),n.length>1&&_.current&&_.current.focus()},onFocus:D(Xi.hour),ref:g,type:"number",min:0,max:24}),fr("span",{children:":"}),fr("input",{className:"vm-calendar-time-picker-fields__input",value:f,onChange:function(e){var t=e.target,n=t.value,r=+n>59?"59":n;t.value=r,d(r),n.length>1&&b.current&&b.current.focus()},onFocus:D(Xi.minutes),ref:_,type:"number",min:0,max:60}),fr("span",{children:":"}),fr("input",{className:"vm-calendar-time-picker-fields__input",value:p,onChange:function(e){var t=e.target,n=t.value,i=+n>59?"59":n;t.value=i,v(i),n.length>1&&b.current&&r()},onFocus:D(Xi.seconds),ref:b,type:"number",min:0,max:60})]})]})},Do=[{value:"date",icon:fr(yi,{})},{value:"time",icon:fr(mi,{})}],wo=function(e){var t=e.date,n=e.timepicker,r=void 0!==n&&n,i=e.format,o=void 0===i?xr:i,a=e.onChange,u=e.onClose,l=_t(X(!1),2),c=l[0],s=l[1],f=_t(X(yr()(t)),2),d=f[0],h=f[1],p=_t(X(yr()(t)),2),v=p[0],y=p[1],g=_t(X(Do[0].value),2),_=g[0],b=g[1],D=function(e){h(e),s(!1)};return te((function(){v.format()!==yr()(t).format()&&a(v.format(o))}),[v]),fr("div",{className:"vm-calendar",children:["date"===_&&fr(vo,{viewDate:d,onChangeViewDate:D,toggleDisplayYears:function(){s((function(e){return!e}))},displayYears:c}),"date"===_&&fr(m,{children:[!c&&fr(yo,{viewDate:d,selectDate:v,onChangeSelectDate:function(e){y(e),r&&b("time")}}),c&&fr(go,{viewDate:d,onChangeViewDate:D})]}),"time"===_&&fr(bo,{selectDate:v,onChangeTime:function(e){var t=_t(e.split(":"),3),n=t[0],r=t[1],i=t[2];y((function(e){return e.set("hour",+n).set("minute",+r).set("second",+i)}))},onClose:function(){u&&u()}}),r&&fr("div",{className:"vm-calendar__tabs",children:fr(Ti,{activeItem:_,items:Do,onChange:function(e){b(e)},indicatorPlacement:"top"})})]})},xo=Ce((function(e,t){var n=e.date,r=e.targetRef,i=e.format,o=void 0===i?xr:i,a=e.timepicker,u=e.onChange,l=_t(X(!1),2),c=l[0],s=l[1],f=oe((function(){return n?yr()(n):yr()()}),[n]),d=function(){s((function(e){return!e}))},h=function(){s(!1)},p=function(e){"Escape"!==e.key&&"Enter"!==e.key||h()};return te((function(){var e;return null===(e=r.current)||void 0===e||e.addEventListener("click",d),function(){var e;null===(e=r.current)||void 0===e||e.removeEventListener("click",d)}}),[r]),te((function(){return window.addEventListener("keyup",p),function(){window.removeEventListener("keyup",p)}}),[]),fr(m,{children:fr(lo,{open:c,buttonRef:r,placement:"bottom-right",onClose:h,children:fr("div",{ref:t,children:fr(wo,{date:f,format:o,timepicker:a,onChange:function(e){a||h(),u(e)},onClose:h})})})})})),ko=xo,Co=function(){var e=re(null),t=po(document.body),n=oe((function(){return t.width>1120}),[t]),r=_t(X(),2),i=r[0],o=r[1],a=_t(X(),2),u=a[0],l=a[1],c=oe((function(){return yr()(u).format(xr)}),[u]),s=oe((function(){return yr()(i).format(xr)}),[i]),f=Wr(),d=f.period,h=d.end,p=d.start,v=f.relativeTime,y=Qr(),g=er();te((function(){o(Mr(Pr(h)))}),[h]),te((function(){l(Mr(Pr(p)))}),[p]);var _=oe((function(){return{start:yr()(Pr(p)).format(xr),end:yr()(Pr(h)).format(xr)}}),[p,h]),b=oe((function(){return v&&"none"!==v?v.replace(/_/g," "):"".concat(_.start," - ").concat(_.end)}),[v,_]),D=re(null),w=re(null),x=re(null),k=re(null),C=_t(X(!1),2),E=C[0],A=C[1],S=re(null),F=function(){A(!1)};return uo(e,(function(e){var t,n,r=e.target,i=(null===D||void 0===D?void 0:D.current)&&D.current.contains(r),o=(null===w||void 0===w?void 0:w.current)&&w.current.contains(r),a=(null===x||void 0===x?void 0:x.current)&&(null===x||void 0===x||null===(t=x.current)||void 0===t?void 0:t.contains(r)),u=(null===k||void 0===k?void 0:k.current)&&(null===k||void 0===k||null===(n=k.current)||void 0===n?void 0:n.contains(r));i||o||a||u||F()})),fr(m,{children:[fr("div",{ref:S,children:fr(co,{title:"Time range controls",children:fr(ao,{className:g?"":"vm-header-button",variant:"contained",color:"primary",startIcon:fr(mi,{}),onClick:function(){A((function(e){return!e}))},children:n&&fr("span",{children:b})})})}),fr(lo,{open:E,buttonRef:S,placement:"bottom-right",onClose:F,clickOutside:!1,children:fr("div",{className:"vm-time-selector",ref:e,children:[fr("div",{className:"vm-time-selector-left",children:[fr("div",{className:"vm-time-selector-left-inputs",children:[fr("div",{className:"vm-time-selector-left-inputs__date",ref:D,children:[fr("label",{children:"From:"}),fr("span",{children:c}),fr(yi,{}),fr(ko,{ref:x,date:u||"",onChange:function(e){return l(e)},targetRef:D,timepicker:!0})]}),fr("div",{className:"vm-time-selector-left-inputs__date",ref:w,children:[fr("label",{children:"To:"}),fr("span",{children:s}),fr(yi,{}),fr(ko,{ref:k,date:i||"",onChange:function(e){return o(e)},targetRef:w,timepicker:!0})]})]}),fr(ao,{variant:"text",startIcon:fr(gi,{}),onClick:function(){return y({type:"RUN_QUERY_TO_NOW"})},children:"switch to now"}),fr("div",{className:"vm-time-selector-left__controls",children:[fr(ao,{color:"error",variant:"outlined",onClick:function(){o(Mr(Pr(h))),l(Mr(Pr(p))),A(!1)},children:"Cancel"}),fr(ao,{color:"primary",onClick:function(){return u&&i&&y({type:"SET_PERIOD",payload:{from:new Date(u),to:new Date(i)}}),void A(!1)},children:"Apply"})]})]}),fr(ho,{relativeTime:v||"",setDuration:function(e){var t=e.duration,n=e.until,r=e.id;y({type:"SET_RELATIVE_TIME",payload:{duration:t,until:n,id:r}}),A(!1)}})]})})]})};!function(e){e.emptyServer="Please enter Server URL",e.validServer="Please provide a valid Server URL",e.validQuery="Please enter a valid Query and execute it"}(_o||(_o={}));var Eo=function(e){var t=e.label,n=e.value,r=e.type,i=void 0===r?"text":r,o=e.error,a=void 0===o?"":o,u=e.endIcon,l=e.startIcon,c=e.disabled,s=void 0!==c&&c,f=e.autofocus,d=void 0!==f&&f,h=e.helperText,p=e.onChange,v=e.onEnter,m=e.onKeyDown,y=re(null),g=re(null),_=oe((function(){return"textarea"===i?g:y}),[i]),b=Fi()({"vm-text-field__input":!0,"vm-text-field__input_error":a,"vm-text-field__input_icon-start":l,"vm-text-field__input_disabled":s,"vm-text-field__input_textarea":"textarea"===i}),D=function(e){m&&m(e),"Enter"!==e.key||e.shiftKey||(e.preventDefault(),v&&v())},w=function(e){s||p&&p(e.target.value)};return te((function(){var e;d&&(null===_||void 0===_||null===(e=_.current)||void 0===e?void 0:e.focus)&&_.current.focus()}),[_,d]),fr("label",{className:"vm-text-field","data-replicated-value":n,children:[l&&fr("div",{className:"vm-text-field__icon-start",children:l}),u&&fr("div",{className:"vm-text-field__icon-end",children:u}),"textarea"===i?fr("textarea",{className:b,disabled:s,ref:g,value:n,onInput:w,onKeyDown:D,rows:1}):fr("input",{className:b,disabled:s,ref:y,value:n,onInput:w,onKeyDown:D,type:i}),t&&fr("span",{className:"vm-text-field__label",children:t}),fr("span",{className:"vm-text-field__error","data-show":!!a,children:a}),h&&!a&&fr("span",{className:"vm-text-field__helper-text",children:h})]})},Ao=function(e){var t;try{t=new URL(e)}catch(g){return!1}return"http:"===t.protocol||"https:"===t.protocol},So=function(e){var t=e.setServer,n=e.onEnter,r=hr().serverUrl,i=_t(X(""),2),o=i[0],a=i[1],u=_t(X(r),2),l=u[0],c=u[1];return fr(Eo,{autofocus:!0,label:"Server URL",value:l,error:o,onChange:function(e){var n=e||"";c(n),t(n),a(""),n||a(_o.emptyServer),Ao(n)||a(_o.validServer)},onEnter:function(){n(l)}})},Fo=function(e){var t=e.title,n=e.children,r=e.onClose,i=function(e){"Escape"===e.key&&r()};return te((function(){return window.addEventListener("keyup",i),function(){window.removeEventListener("keyup",i)}}),[]),mt.createPortal(fr("div",{className:"vm-modal",onMouseDown:r,children:fr("div",{className:"vm-modal-content",children:[fr("div",{className:"vm-modal-content-header",children:[t&&fr("div",{className:"vm-modal-content-header__title",children:t}),fr("div",{className:"vm-modal-header__close",children:fr(ao,{variant:"text",size:"small",onClick:r,children:fr(ai,{})})})]}),fr("div",{className:"vm-modal-content-body",onMouseDown:function(e){e.stopPropagation()},children:n})]})}),document.body)},No="Setting Server URL",Oo=function(){var e=hr().serverUrl,t=pr(),n=_t(X(e),2),r=n[0],i=n[1],o=function(e){t({type:"SET_SERVER",payload:e||r}),c()},a=_t(X(!1),2),u=a[0],l=a[1],c=function(){return l(!1)};return fr(m,{children:[fr(co,{title:No,children:fr(ao,{className:"vm-header-button",variant:"contained",color:"primary",startIcon:fr(oi,{}),onClick:function(){return l(!0)}})}),u&&fr(Fo,{title:No,onClose:c,children:fr("div",{className:"vm-server-configurator",children:[fr("div",{className:"vm-server-configurator__input",children:fr(So,{setServer:i,onEnter:o})}),fr("div",{className:"vm-server-configurator__footer",children:[fr(ao,{variant:"outlined",color:"error",onClick:c,children:"Cancel"}),fr(ao,{variant:"contained",onClick:function(){o()},children:"apply"})]})]})})]})},To={windows:"Windows",mac:"Mac OS",linux:"Linux"},Bo=(Object.values(To).find((function(e){return navigator.userAgent.indexOf(e)>=0}))||"unknown")===To.mac?"Cmd":"Ctrl",Mo=[{title:"Query",list:[{keys:["Enter"],description:"Run"},{keys:["Shift","Enter"],description:"Multi-line queries"},{keys:[Bo,"Arrow Up"],description:"Previous command from the Query history"},{keys:[Bo,"Arrow Down"],description:"Next command from the Query history"}]},{title:"Graph",list:[{keys:[Bo,"Scroll Up"],description:"Zoom in"},{keys:[Bo,"Scroll Down"],description:"Zoom out"},{keys:[Bo,"Click and Drag"],description:"Move the graph left/right"}]},{title:"Legend",list:[{keys:["Mouse Click"],description:"Select series"},{keys:[Bo,"Mouse Click"],description:"Toggle multiple series"}]}],Lo=function(){var e=_t(X(!1),2),t=e[0],n=e[1],r=er();return fr(m,{children:[fr(co,{title:"Shortcut keys",placement:"bottom-center",children:fr(ao,{className:r?"":"vm-header-button",variant:"contained",color:"primary",startIcon:fr(_i,{}),onClick:function(){n(!0)}})}),t&&fr(Fo,{title:"Shortcut keys",onClose:function(){n(!1)},children:fr("div",{className:"vm-shortcuts",children:Mo.map((function(e){return fr("div",{className:"vm-shortcuts-section",children:[fr("h3",{className:"vm-shortcuts-section__title",children:e.title}),fr("div",{className:"vm-shortcuts-section-list",children:e.list.map((function(e){return fr("div",{className:"vm-shortcuts-section-list-item",children:[fr("div",{className:"vm-shortcuts-section-list-item__key",children:e.keys.map((function(t,n){return fr(m,{children:[fr("code",{children:t},t),n!==e.keys.length-1?"+":""]})}))}),fr("p",{className:"vm-shortcuts-section-list-item__description",children:e.description})]},e.keys.join("+"))}))})]},e.title)}))})})]})},Po=function(){var e=er(),t=re(null),n=Gi().date,r=Zi(),i=oe((function(){return yr()(n).format(wr)}),[n]);return fr("div",{children:[fr("div",{ref:t,children:fr(co,{title:"Date control",children:fr(ao,{className:e?"":"vm-header-button",variant:"contained",color:"primary",startIcon:fr(yi,{}),children:i})})}),fr(ko,{date:n||"",format:wr,onChange:function(e){r({type:"SET_DATE",payload:e})},targetRef:t})]})},$o=function(){var e=Ni("color-primary"),t=er(),n=Xn().headerStyles,r=(n=void 0===n?{}:n).background,i=void 0===r?t?"#FFF":e:r,o=n.color,a=void 0===o?t?e:"#FFF":o,u=An(),l=En(),c=l.search,s=l.pathname,f=oe((function(){return[{label:"Custom panel",value:Zn.home},{label:"Dashboards",value:Zn.dashboards,hide:t},{label:"Cardinality",value:Zn.cardinality},{label:"Top queries",value:Zn.topQueries}]}),[t]),d=_t(X(s),2),h=d[0],p=d[1],v=oe((function(){return(Gn[s]||{}).header||{}}),[s]),m=function(e){u({pathname:e,search:c})};return te((function(){p(s)}),[s]),fr("header",{className:Fi()({"vm-header":!0,"vm-header_app":t}),style:{background:i,color:a},children:[!t&&fr("div",{className:"vm-header-logo",style:{color:a},children:[fr("div",{className:"vm-header-logo__icon",onClick:function(){m(Zn.home),ar({}),window.location.reload()},children:fr(ii,{})}),fr("a",{className:"vm-header-logo__issue",target:"_blank",href:"https://github.com/VictoriaMetrics/VictoriaMetrics/issues/new",rel:"noreferrer",children:"create an issue"})]}),fr("div",{className:"vm-header-nav",children:fr(Ti,{activeItem:h,items:f.filter((function(e){return!e.hide})),color:a,onChange:function(e){p(e),u(e)}})}),fr("div",{className:"vm-header__settings",children:[(null===v||void 0===v?void 0:v.timeSelector)&&fr(Co,{}),(null===v||void 0===v?void 0:v.cardinalityDatePicker)&&fr(Po,{}),(null===v||void 0===v?void 0:v.executionControls)&&fr(fo,{}),(null===v||void 0===v?void 0:v.globalSettings)&&!t&&fr(Oo,{}),fr(Lo,{})]})]})},Ro=function(){var e=er();return fr("section",{className:"vm-container",children:[fr($o,{}),fr("div",{className:Fi()({"vm-container-body":!0,"vm-container-body_app":e}),children:fr($n,{})})]})};function Io(e,t){var n="undefined"!==typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(!n){if(Array.isArray(e)||(n=gt(e))||t&&e&&"number"===typeof e.length){n&&(e=n);var r=0,i=function(){};return{s:i,n:function(){return r>=e.length?{done:!0}:{done:!1,value:e[r++]}},e:function(e){throw e},f:i}}throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}var o,a=!0,u=!1;return{s:function(){n=n.call(e)},n:function(){var e=n.next();return a=e.done,e},e:function(e){u=!0,o=e},f:function(){try{a||null==n.return||n.return()}finally{if(u)throw o}}}}var jo,zo,Uo="u-off",Ho="u-label",Yo="width",Vo="height",qo="top",Wo="bottom",Qo="left",Go="right",Zo="#000",Jo="#0000",Ko="mousemove",Xo="mousedown",ea="mouseup",ta="mouseenter",na="mouseleave",ra="dblclick",ia="change",oa="dppxchange",aa="undefined"!=typeof window,ua=aa?document:null,la=aa?window:null,ca=aa?navigator:null;function sa(e,t){if(null!=t){var n=e.classList;!n.contains(t)&&n.add(t)}}function fa(e,t){var n=e.classList;n.contains(t)&&n.remove(t)}function da(e,t,n){e.style[t]=n+"px"}function ha(e,t,n,r){var i=ua.createElement(e);return null!=t&&sa(i,t),null!=n&&n.insertBefore(i,r),i}function pa(e,t){return ha("div",e,t)}var va=new WeakMap;function ma(e,t,n,r,i){var o="translate("+t+"px,"+n+"px)";o!=va.get(e)&&(e.style.transform=o,va.set(e,o),t<0||n<0||t>r||n>i?sa(e,Uo):fa(e,Uo))}var ya=new WeakMap;function ga(e,t,n){var r=t+n;r!=ya.get(e)&&(ya.set(e,r),e.style.background=t,e.style.borderColor=n)}var _a=new WeakMap;function ba(e,t,n,r){var i=t+""+n;i!=_a.get(e)&&(_a.set(e,i),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)}var Da={passive:!0},wa=Kn(Kn({},Da),{},{capture:!0});function xa(e,t,n,r){t.addEventListener(e,n,r?wa:Da)}function ka(e,t,n,r){t.removeEventListener(e,n,r?wa:Da)}function Ca(e,t,n,r){var i;n=n||0;for(var o=(r=r||t.length-1)<=2147483647;r-n>1;)t[i=o?n+r>>1:Ya((n+r)/2)]=t&&i<=n;i+=r)if(null!=e[i])return i;return-1}function Aa(e,t,n,r){var i=eu,o=-eu;if(1==r)i=e[t],o=e[n];else if(-1==r)i=e[n],o=e[t];else for(var a=t;a<=n;a++)null!=e[a]&&(i=Wa(i,e[a]),o=Qa(o,e[a]));return[i,o]}function Sa(e,t,n){for(var r=eu,i=-eu,o=t;o<=n;o++)e[o]>0&&(r=Wa(r,e[o]),i=Qa(i,e[o]));return[r==eu?1:r,i==-eu?10:i]}aa&&function e(){var t=devicePixelRatio;jo!=t&&(jo=t,zo&&ka(ia,zo,e),zo=matchMedia("(min-resolution: ".concat(jo-.001,"dppx) and (max-resolution: ").concat(jo+.001,"dppx)")),xa(ia,zo,e),la.dispatchEvent(new CustomEvent(oa)))}();var Fa=[0,0];function Na(e,t,n,r){return Fa[0]=n<0?du(e,-n):e,Fa[1]=r<0?du(t,-r):t,Fa}function Oa(e,t,n,r){var i,o,a,u=Za(e),l=10==n?Ja:Ka;return e==t&&(-1==u?(e*=n,t/=n):(e/=n,t*=n)),r?(i=Ya(l(e)),o=qa(l(t)),e=(a=Na(Ga(n,i),Ga(n,o),i,o))[0],t=a[1]):(i=Ya(l(Ha(e))),o=Ya(l(Ha(t))),e=fu(e,(a=Na(Ga(n,i),Ga(n,o),i,o))[0]),t=su(t,a[1])),[e,t]}function Ta(e,t,n,r){var i=Oa(e,t,n,r);return 0==e&&(i[0]=0),0==t&&(i[1]=0),i}var Ba={mode:3,pad:.1},Ma={pad:0,soft:null,mode:0},La={min:Ma,max:Ma};function Pa(e,t,n,r){return Du(n)?Ra(e,t,n):(Ma.pad=n,Ma.soft=r?0:null,Ma.mode=r?3:0,Ra(e,t,La))}function $a(e,t){return null==e?t:e}function Ra(e,t,n){var r=n.min,i=n.max,o=$a(r.pad,0),a=$a(i.pad,0),u=$a(r.hard,-eu),l=$a(i.hard,eu),c=$a(r.soft,eu),s=$a(i.soft,-eu),f=$a(r.mode,0),d=$a(i.mode,0),h=t-e;h<1e-9&&(h=0,0!=e&&0!=t||(h=1e-9,2==f&&c!=eu&&(o=0),2==d&&s!=-eu&&(a=0)));var p=h||Ha(t)||1e3,v=Ja(p),m=Ga(10,Ya(v)),y=du(fu(e-p*(0==h?0==e?.1:1:o),m/10),9),g=e>=c&&(1==f||3==f&&y<=c||2==f&&y>=c)?c:eu,_=Qa(u,y=g?g:Wa(g,y)),b=du(su(t+p*(0==h?0==t?.1:1:a),m/10),9),D=t<=s&&(1==d||3==d&&b>=s||2==d&&b<=s)?s:-eu,w=Wa(l,b>D&&t<=D?D:Qa(D,b));return _==w&&0==_&&(w=100),[_,w]}var Ia=new Intl.NumberFormat(aa?ca.language:"en-US"),ja=function(e){return Ia.format(e)},za=Math,Ua=za.PI,Ha=za.abs,Ya=za.floor,Va=za.round,qa=za.ceil,Wa=za.min,Qa=za.max,Ga=za.pow,Za=za.sign,Ja=za.log10,Ka=za.log2,Xa=function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:1;return za.asinh(e/t)},eu=1/0;function tu(e){return 1+(0|Ja((e^e>>31)-(e>>31)))}function nu(e,t){return Va(e/t)*t}function ru(e,t,n){return Wa(Qa(e,t),n)}function iu(e){return"function"==typeof e?e:function(){return e}}var ou=function(e){return e},au=function(e,t){return t},uu=function(e){return null},lu=function(e){return!0},cu=function(e,t){return e==t};function su(e,t){return qa(e/t)*t}function fu(e,t){return Ya(e/t)*t}function du(e,t){return Va(e*(t=Math.pow(10,t)))/t}var hu=new Map;function pu(e){return((""+e).split(".")[1]||"").length}function vu(e,t,n,r){for(var i=[],o=r.map(pu),a=t;a=0&&a>=0?0:u)+(a>=o[c]?0:o[c]),d=du(s,f);i.push(d),hu.set(d,f)}return i}var mu={},yu=[],gu=[null,null],_u=Array.isArray;function bu(e){return"string"==typeof e}function Du(e){var t=!1;if(null!=e){var n=e.constructor;t=null==n||n==Object}return t}function wu(e){return null!=e&&"object"==typeof e}var xu=Object.getPrototypeOf(Uint8Array);function ku(e){var t,n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:Du;if(_u(e)){var r=e.find((function(e){return null!=e}));if(_u(r)||n(r)){t=Array(e.length);for(var i=0;io){for(r=a-1;r>=0&&null==e[r];)e[r--]=null;for(r=a+1;r12?t-12:t},AA:function(e){return e.getHours()>=12?"PM":"AM"},aa:function(e){return e.getHours()>=12?"pm":"am"},a:function(e){return e.getHours()>=12?"p":"a"},mm:function(e){return Mu(e.getMinutes())},m:function(e){return e.getMinutes()},ss:function(e){return Mu(e.getSeconds())},s:function(e){return e.getSeconds()},fff:function(e){return((t=e.getMilliseconds())<10?"00":t<100?"0":"")+t;var t}};function Pu(e,t){t=t||Bu;for(var n,r=[],i=/\{([a-z]+)\}|[^{]+/gi;n=i.exec(e);)r.push("{"==n[0][0]?Lu[n[1]]:n[0]);return function(e){for(var n="",i=0;i=a,v=f>=o&&f=i?i:f,N=_+(Ya(c)-Ya(y))+su(y-_,F);h.push(N);for(var O=t(N),T=O.getHours()+O.getMinutes()/n+O.getSeconds()/r,B=f/r,M=d/u.axes[l]._space;!((N=du(N+f,1==e?0:3))>s);)if(B>1){var L=Ya(du(T+B,6))%24,P=t(N).getHours()-L;P>1&&(P=-1),T=(T+B)%24,du(((N-=P*r)-h[h.length-1])/f,3)*M>=.7&&h.push(N)}else h.push(N)}return h}}]}var tl=_t(el(1),3),nl=tl[0],rl=tl[1],il=tl[2],ol=_t(el(.001),3),al=ol[0],ul=ol[1],ll=ol[2];function cl(e,t){return e.map((function(e){return e.map((function(n,r){return 0==r||8==r||null==n?n:t(1==r||0==e[8]?n:e[1]+n)}))}))}function sl(e,t){return function(n,r,i,o,a){var u,l,c,s,f,d,h=t.find((function(e){return a>=e[0]}))||t[t.length-1];return r.map((function(t){var n=e(t),r=n.getFullYear(),i=n.getMonth(),o=n.getDate(),a=n.getHours(),p=n.getMinutes(),v=n.getSeconds(),m=r!=u&&h[2]||i!=l&&h[3]||o!=c&&h[4]||a!=s&&h[5]||p!=f&&h[6]||v!=d&&h[7]||h[1];return u=r,l=i,c=o,s=a,f=p,d=v,m(n)}))}}function fl(e,t,n){return new Date(e,t,n)}function dl(e,t){return t(e)}vu(2,-53,53,[1]);function hl(e,t){return function(n,r){return t(e(r))}}var pl={show:!0,live:!0,isolate:!1,markers:{show:!0,width:2,stroke:function(e,t){var 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:[]};var vl=[0,0];function ml(e,t,n){return function(e){0==e.button&&n(e)}}function yl(e,t,n){return n}var gl={show:!0,x:!0,y:!0,lock:!1,move:function(e,t,n){return vl[0]=t,vl[1]=n,vl},points:{show:function(e,t){var n=e.cursor.points,r=pa(),i=n.size(e,t);da(r,Yo,i),da(r,Vo,i);var o=i/-2;da(r,"marginLeft",o),da(r,"marginTop",o);var a=n.width(e,t,i);return a&&da(r,"borderWidth",a),r},size:function(e,t){return Rl(e.series[t].points.width,1)},width:0,stroke:function(e,t){var n=e.series[t].points;return n._stroke||n._fill},fill:function(e,t){var n=e.series[t].points;return n._fill||n._stroke}},bind:{mousedown:ml,mouseup:ml,click:ml,dblclick:ml,mousemove:yl,mouseleave:yl,mouseenter:yl},drag:{setScale:!0,x:!0,y:!1,dist:0,uni:null,_x:!1,_y:!1},focus:{prox:-1},left:-10,top:-10,idx:null,dataIdx:function(e,t,n){return n},idxs:null},_l={show:!0,stroke:"rgba(0,0,0,0.07)",width:2},bl=Cu({},_l,{filter:au}),Dl=Cu({},bl,{size:10}),wl=Cu({},_l,{show:!1}),xl='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"',kl="bold "+xl,Cl={show:!0,scale:"x",stroke:Zo,space:50,gap:5,size:50,labelGap:0,labelSize:30,labelFont:kl,side:2,grid:bl,ticks:Dl,border:wl,font:xl,rotate:0},El={show:!0,scale:"x",auto:!1,sorted:1,min:eu,max:-eu,idxs:[]};function Al(e,t,n,r,i){return t.map((function(e){return null==e?"":ja(e)}))}function Sl(e,t,n,r,i,o,a){for(var u=[],l=hu.get(i)||0,c=n=a?n:du(su(n,i),l);c<=r;c=du(c+i,l))u.push(Object.is(c,-0)?0:c);return u}function Fl(e,t,n,r,i,o,a){var u=[],l=e.scales[e.axes[t].scale].log,c=Ya((10==l?Ja:Ka)(n));i=Ga(l,c),c<0&&(i=du(i,-c));var s=n;do{u.push(s),(s=du(s+i,hu.get(i)))>=i*l&&(i=s)}while(s<=r);return u}function Nl(e,t,n,r,i,o,a){var u=e.scales[e.axes[t].scale].asinh,l=r>u?Fl(e,t,Qa(u,n),r,i):[u],c=r>=0&&n<=0?[0]:[];return(n<-u?Fl(e,t,Qa(u,-r),-n,i):[u]).reverse().map((function(e){return-e})).concat(c,l)}var Ol=/./,Tl=/[12357]/,Bl=/[125]/,Ml=/1/;function Ll(e,t,n,r,i){var o=e.axes[n],a=o.scale,u=e.scales[a];if(3==u.distr&&2==u.log)return t;var l=e.valToPos,c=o._space,s=l(10,a),f=l(9,a)-s>=c?Ol:l(7,a)-s>=c?Tl:l(5,a)-s>=c?Bl:Ml;return t.map((function(e){return 4==u.distr&&0==e||f.test(e)?e:null}))}function Pl(e,t){return null==t?"":ja(t)}var $l={show:!0,scale:"y",stroke:Zo,space:30,gap:5,size:50,labelGap:0,labelSize:30,labelFont:kl,side:3,grid:bl,ticks:Dl,border:wl,font:xl,rotate:0};function Rl(e,t){return du((3+2*(e||1))*t,3)}var Il={scale:null,auto:!0,sorted:0,min:eu,max:-eu},jl={show:!0,auto:!0,sorted:0,alpha:1,facets:[Cu({},Il,{scale:"x"}),Cu({},Il,{scale:"y"})]},zl={scale:"y",auto:!0,sorted:0,show:!0,spanGaps:!1,gaps:function(e,t,n,r,i){return i},alpha:1,points:{show:function(e,t){var n=e.series[0],r=n.scale,i=n.idxs,o=e._data[0],a=e.valToPos(o[i[0]],r,!0),u=e.valToPos(o[i[1]],r,!0),l=Ha(u-a)/(e.series[t].points.space*jo);return i[1]-i[0]<=l},filter:null},values:null,min:eu,max:-eu,idxs:[],path:null,clip:null};function Ul(e,t,n,r,i){return n/10}var Hl={time:!0,auto:!0,distr:1,log:10,asinh:1,min:null,max:null,dir:1,ori:0},Yl=Cu({},Hl,{time:!1,ori:1}),Vl={};function ql(e,t){var n=Vl[e];return n||(n={key:e,plots:[],sub:function(e){n.plots.push(e)},unsub:function(e){n.plots=n.plots.filter((function(t){return t!=e}))},pub:function(e,t,r,i,o,a,u){for(var l=0;l0){a=new Path2D;for(var u=0==t?oc:ac,l=n,c=0;cs[0]){var f=s[0]-l;f>0&&u(a,l,r,f,r+o),l=s[1]}}var d=n+i-l;d>0&&u(a,l,r,d,r+o)}return a}function Kl(e,t,n,r,i,o,a){for(var u=[],l=1==i?n:r;l>=n&&l<=r;l+=i){if(null===t[l]){var c=l,s=l;if(1==i)for(;++l<=r&&null===t[l];)s=l;else for(;--l>=n&&null===t[l];)s=l;var f=o(e[c]),d=s==c?f:o(e[s]);f=a<=0?o(e[c-i]):f,(d=a>=0?o(e[s+i]):d)>=f&&u.push([f,d])}}return u}function Xl(e){return 0==e?ou:1==e?Va:function(t){return nu(t,e)}}function ec(e){var t=0==e?tc:nc,n=0==e?function(e,t,n,r,i,o){e.arcTo(t,n,r,i,o)}:function(e,t,n,r,i,o){e.arcTo(n,t,i,r,o)},r=0==e?function(e,t,n,r,i){e.rect(t,n,r,i)}:function(e,t,n,r,i){e.rect(n,t,i,r)};return function(e,i,o,a,u){var l=arguments.length>5&&void 0!==arguments[5]?arguments[5]:0;0==l?r(e,i,o,a,u):(l=Wa(l,a/2,u/2),t(e,i+l,o),n(e,i+a,o,i+a,o+u,l),n(e,i+a,o+u,i,o+u,l),n(e,i,o+u,i,o,l),n(e,i,o,i+a,o,l),e.closePath())}}var tc=function(e,t,n){e.moveTo(t,n)},nc=function(e,t,n){e.moveTo(n,t)},rc=function(e,t,n){e.lineTo(t,n)},ic=function(e,t,n){e.lineTo(n,t)},oc=ec(0),ac=ec(1),uc=function(e,t,n,r,i,o){e.arc(t,n,r,i,o)},lc=function(e,t,n,r,i,o){e.arc(n,t,r,i,o)},cc=function(e,t,n,r,i,o,a){e.bezierCurveTo(t,n,r,i,o,a)},sc=function(e,t,n,r,i,o,a){e.bezierCurveTo(n,t,i,r,a,o)};function fc(e){return function(e,t,n,r,i){return Wl(e,t,(function(t,o,a,u,l,c,s,f,d,h,p){var v,m,y=t.pxRound,g=t.points;0==u.ori?(v=tc,m=uc):(v=nc,m=lc);var _=du(g.width*jo,3),b=(g.size-g.width)/2*jo,D=du(2*b,3),w=new Path2D,x=new Path2D,k=e.bbox,C=k.left,E=k.top,A=k.width,S=k.height;oc(x,C-D,E-D,A+2*D,S+2*D);var F=function(e){if(null!=a[e]){var t=y(c(o[e],u,h,f)),n=y(s(a[e],l,p,d));v(w,t+b,n),m(w,t,n,b,0,2*Ua)}};if(i)i.forEach(F);else for(var N=n;N<=r;N++)F(N);return{stroke:_>0?w:null,fill:w,clip:x,flags:3}}))}}function dc(e){return function(t,n,r,i,o,a){r!=i&&(o!=r&&a!=r&&e(t,n,r),o!=i&&a!=i&&e(t,n,i),e(t,n,a))}}var hc=dc(rc),pc=dc(ic);function vc(e){var t=$a(null===e||void 0===e?void 0:e.alignGaps,0);return function(e,n,r,i){return Wl(e,n,(function(o,a,u,l,c,s,f,d,h,p,v){var m,y,g=o.pxRound,_=function(e){return g(s(e,l,p,d))},b=function(e){return g(f(e,c,v,h))};0==l.ori?(m=rc,y=hc):(m=ic,y=pc);for(var D,w,x,k=l.dir*(0==l.ori?1:-1),C={stroke:new Path2D,fill:null,clip:null,band:null,gaps:null,flags:1},E=C.stroke,A=eu,S=-eu,F=_(a[1==k?r:i]),N=Ea(u,r,i,1*k),O=Ea(u,r,i,-1*k),T=_(a[N]),B=_(a[O]),M=1==k?r:i;M>=r&&M<=i;M+=k){var L=_(a[M]);L==F?null!=u[M]&&(w=b(u[M]),A==eu&&(m(E,L,w),D=w),A=Wa(w,A),S=Qa(w,S)):(A!=eu&&(y(E,F,A,S,D,w),x=F),null!=u[M]?(m(E,L,w=b(u[M])),A=S=D=w):(A=eu,S=-eu),F=L)}A!=eu&&A!=S&&x!=F&&y(E,F,A,S,D,w);var P=_t(Ql(e,n),2),$=P[0],R=P[1];if(null!=o.fill||0!=$){var I=C.fill=new Path2D(E),j=b(o.fillTo(e,n,o.min,o.max,$));m(I,B,j),m(I,T,j)}if(!o.spanGaps){var z,U=[];(z=U).push.apply(z,bt(Kl(a,u,r,i,k,_,t))),C.gaps=U=o.gaps(e,n,r,i,U),C.clip=Jl(U,l.ori,d,h,p,v)}return 0!=R&&(C.band=2==R?[Zl(e,n,r,i,E,-1),Zl(e,n,r,i,E,1)]:Zl(e,n,r,i,E,R)),C}))}}function mc(e,t,n,r,i,o){var a=e.length;if(a<2)return null;var u=new Path2D;if(n(u,e[0],t[0]),2==a)r(u,e[1],t[1]);else{for(var l=Array(a),c=Array(a-1),s=Array(a-1),f=Array(a-1),d=0;d0!==c[h]>0?l[h]=0:(l[h]=3*(f[h-1]+f[h])/((2*f[h]+f[h-1])/c[h-1]+(f[h]+2*f[h-1])/c[h]),isFinite(l[h])||(l[h]=0));l[a-1]=c[a-2];for(var p=0;p=i&&o+(l<5?hu.get(l):0)<=17)return[l,c]}while(++u0?e:t.clamp(r,e,t.min,t.max,t.key)):4==t.distr?Xa(e,t.asinh):e)-t._min)/(t._max-t._min)}function a(e,t,n,r){var i=o(e,t);return r+n*(-1==t.dir?1-i:i)}function u(e,t,n,r){var i=o(e,t);return r+n*(-1==t.dir?i:1-i)}function l(e,t,n,r){return 0==t.ori?a(e,t,n,r):u(e,t,n,r)}r.valToPosH=a,r.valToPosV=u;var c=!1;r.status=0;var s=r.root=pa("uplot");(null!=e.id&&(s.id=e.id),sa(s,e.class),e.title)&&(pa("u-title",s).textContent=e.title);var f=ha("canvas"),d=r.ctx=f.getContext("2d"),h=pa("u-wrap",s),p=r.under=pa("u-under",h);h.appendChild(f);var v=r.over=pa("u-over",h),m=+$a((e=ku(e)).pxAlign,1),y=Xl(m);(e.plugins||[]).forEach((function(t){t.opts&&(e=t.opts(r,e)||e)}));var g=e.ms||.001,_=r.series=1==i?Dc(e.series||[],El,zl,!1):function(e,t){return e.map((function(e,n){return 0==n?null:Cu({},t,e)}))}(e.series||[null],jl),b=r.axes=Dc(e.axes||[],Cl,$l,!0),D=r.scales={},w=r.bands=e.bands||[];w.forEach((function(e){e.fill=iu(e.fill||null),e.dir=$a(e.dir,-1)}));var x=2==i?_[1].facets[0].scale:_[0].scale,k={axes:function(){for(var e=function(e){var t=b[e];if(!t.show||!t._show)return"continue";var n=t.side,i=n%2,o=void 0,a=void 0,u=t.stroke(r,e),c=0==n||3==n?-1:1;if(t.label){var s=t.labelGap*c,f=Va((t._lpos+s)*jo);Je(t.labelFont[0],u,"center",2==n?qo:Wo),d.save(),1==i?(o=a=0,d.translate(f,Va(de+pe/2)),d.rotate((3==n?-Ua:Ua)/2)):(o=Va(fe+he/2),a=f),d.fillText(t.label,o,a),d.restore()}var h=_t(t._found,2),p=h[0],v=h[1];if(0==v)return"continue";var m=D[t.scale],g=0==i?he:pe,_=0==i?fe:de,w=Va(t.gap*jo),x=t._splits,k=2==m.distr?x.map((function(e){return qe[e]})):x,C=2==m.distr?qe[x[1]]-qe[x[0]]:p,E=t.ticks,A=t.border,S=E.show?Va(E.size*jo):0,F=t._rotate*-Ua/180,N=y(t._pos*jo),O=N+(S+w)*c;a=0==i?O:0,o=1==i?O:0,Je(t.font[0],u,1==t.align?Qo:2==t.align?Go:F>0?Qo:F<0?Go:0==i?"center":3==n?Go:Qo,F||1==i?"middle":2==n?qo:Wo);for(var T=1.5*t.font[1],B=x.map((function(e){return y(l(e,m,g,_))})),M=t._values,L=0;L0&&(_.forEach((function(e,n){if(n>0&&e.show&&null==e._paths){var i=function(e){var t=ru(He-1,0,Ne-1),n=ru(Ye+1,0,Ne-1);for(;null==e[t]&&t>0;)t--;for(;null==e[n]&&n0&&e.show){je!=e.alpha&&(d.globalAlpha=je=e.alpha),Xe(t,!1),e._paths&&et(t,!1),Xe(t,!0);var n=e.points.show(r,t,He,Ye),i=e.points.filter(r,t,n,e._paths?e._paths.gaps:null);(n||i)&&(e.points._paths=e.points.paths(r,t,He,Ye,i),et(t,!0)),1!=je&&(d.globalAlpha=je=1),on("drawSeries",t)}})))}},C=(e.drawOrder||["axes","series"]).map((function(e){return k[e]}));function E(t){var n=D[t];if(null==n){var r=(e.scales||mu)[t]||mu;if(null!=r.from)E(r.from),D[t]=Cu({},D[r.from],r,{key:t});else{(n=D[t]=Cu({},t==x?Hl:Yl,r)).key=t;var o=n.time,a=n.range,u=_u(a);if((t!=x||2==i&&!o)&&(!u||null!=a[0]&&null!=a[1]||(a={min:null==a[0]?Ba:{mode:1,hard:a[0],soft:a[0]},max:null==a[1]?Ba:{mode:1,hard:a[1],soft:a[1]}},u=!1),!u&&Du(a))){var l=a;a=function(e,t,n){return null==t?gu:Pa(t,n,l)}}n.range=iu(a||(o?kc:t==x?3==n.distr?Ac:4==n.distr?Fc:xc:3==n.distr?Ec:4==n.distr?Sc:Cc)),n.auto=iu(!u&&n.auto),n.clamp=iu(n.clamp||Ul),n._min=n._max=null}}}for(var A in E("x"),E("y"),1==i&&_.forEach((function(e){E(e.scale)})),b.forEach((function(e){E(e.scale)})),e.scales)E(A);var S,F,N=D[x],O=N.distr;0==N.ori?(sa(s,"u-hz"),S=a,F=u):(sa(s,"u-vt"),S=u,F=a);var T={};for(var B in D){var M=D[B];null==M.min&&null==M.max||(T[B]={min:M.min,max:M.max},M.min=M.max=null)}var L,P=e.tzDate||function(e){return new Date(Va(e/g))},$=e.fmtDate||Pu,R=1==g?il(P):ll(P),I=sl(P,cl(1==g?rl:ul,$)),j=hl(P,dl("{YYYY}-{MM}-{DD} {h}:{mm}{aa}",$)),z=[],U=r.legend=Cu({},pl,e.legend),H=U.show,Y=U.markers;U.idxs=z,Y.width=iu(Y.width),Y.dash=iu(Y.dash),Y.stroke=iu(Y.stroke),Y.fill=iu(Y.fill);var V,q=[],W=[],Q=!1,G={};if(U.live){var Z=_[1]?_[1].values:null;for(var J in V=(Q=null!=Z)?Z(r,1,0):{_:0})G[J]="--"}if(H)if(L=ha("table","u-legend",s),Q){var K=ha("tr","u-thead",L);for(var X in ha("th",null,K),V)ha("th",Ho,K).textContent=X}else sa(L,"u-inline"),U.live&&sa(L,"u-live");var ee={show:!0},te={show:!1};var ne=new Map;function re(e,t,n){var i=ne.get(t)||{},o=we.bind[e](r,t,n);o&&(xa(e,t,i[e]=o),ne.set(t,i))}function ie(e,t,n){var r=ne.get(t)||{};for(var i in r)null!=e&&i!=e||(ka(i,t,r[i]),delete r[i]);null==e&&ne.delete(t)}var oe=0,ae=0,ue=0,le=0,ce=0,se=0,fe=0,de=0,he=0,pe=0;r.bbox={};var ve=!1,me=!1,ye=!1,ge=!1,_e=!1;function be(e,t,n){(n||e!=r.width||t!=r.height)&&De(e,t),ut(!1),ye=!0,me=!0,ge=_e=we.left>=0,wt()}function De(e,t){r.width=oe=ue=e,r.height=ae=le=t,ce=se=0,function(){var e=!1,t=!1,n=!1,r=!1;b.forEach((function(i,o){if(i.show&&i._show){var a=i.side,u=a%2,l=i._size+(null!=i.label?i.labelSize:0);l>0&&(u?(ue-=l,3==a?(ce+=l,r=!0):n=!0):(le-=l,0==a?(se+=l,e=!0):t=!0))}})),Se[0]=e,Se[1]=n,Se[2]=t,Se[3]=r,ue-=Ue[1]+Ue[3],ce+=Ue[3],le-=Ue[2]+Ue[0],se+=Ue[0]}(),function(){var e=ce+ue,t=se+le,n=ce,r=se;function i(i,o){switch(i){case 1:return(e+=o)-o;case 2:return(t+=o)-o;case 3:return(n-=o)+o;case 0:return(r-=o)+o}}b.forEach((function(e,t){if(e.show&&e._show){var n=e.side;e._pos=i(n,e._size),null!=e.label&&(e._lpos=i(n,e.labelSize))}}))}();var n=r.bbox;fe=n.left=nu(ce*jo,.5),de=n.top=nu(se*jo,.5),he=n.width=nu(ue*jo,.5),pe=n.height=nu(le*jo,.5)}r.setSize=function(e){be(e.width,e.height)};var we=r.cursor=Cu({},gl,{drag:{y:2==i}},e.cursor);we.idxs=z,we._lock=!1;var xe=we.points;xe.show=iu(xe.show),xe.size=iu(xe.size),xe.stroke=iu(xe.stroke),xe.width=iu(xe.width),xe.fill=iu(xe.fill);var ke=r.focus=Cu({},e.focus||{alpha:.3},we.focus),Ce=ke.prox>=0,Ee=[null];function Ae(e,t){if(1==i||t>0){var n=1==i&&D[e.scale].time,o=e.value;e.value=n?bu(o)?hl(P,dl(o,$)):o||j:o||Pl,e.label=e.label||(n?"Time":"Value")}if(t>0){e.width=null==e.width?1:e.width,e.paths=e.paths||_c||uu,e.fillTo=iu(e.fillTo||Gl),e.pxAlign=+$a(e.pxAlign,m),e.pxRound=Xl(e.pxAlign),e.stroke=iu(e.stroke||null),e.fill=iu(e.fill||null),e._stroke=e._fill=e._paths=e._focus=null;var a=Rl(e.width,1),u=e.points=Cu({},{size:a,width:Qa(1,.2*a),stroke:e.stroke,space:2*a,paths:bc,_stroke:null,_fill:null},e.points);u.show=iu(u.show),u.filter=iu(u.filter),u.fill=iu(u.fill),u.stroke=iu(u.stroke),u.paths=iu(u.paths),u.pxAlign=e.pxAlign}if(H){var l=function(e,t){if(0==t&&(Q||!U.live||2==i))return gu;var n=[],o=ha("tr","u-series",L,L.childNodes[t]);sa(o,e.class),e.show||sa(o,Uo);var a=ha("th",null,o);if(Y.show){var u=pa("u-marker",a);if(t>0){var l=Y.width(r,t);l&&(u.style.border=l+"px "+Y.dash(r,t)+" "+Y.stroke(r,t)),u.style.background=Y.fill(r,t)}}var c=pa(Ho,a);for(var s in c.textContent=e.label,t>0&&(Y.show||(c.style.color=e.width>0?Y.stroke(r,t):Y.fill(r,t)),re("click",a,(function(t){if(!we._lock){var n=_.indexOf(e);if((t.ctrlKey||t.metaKey)!=U.isolate){var r=_.some((function(e,t){return t>0&&t!=n&&e.show}));_.forEach((function(e,t){t>0&&Pt(t,r?t==n?ee:te:ee,!0,an.setSeries)}))}else Pt(n,{show:!e.show},!0,an.setSeries)}})),Ce&&re(ta,a,(function(t){we._lock||Pt(_.indexOf(e),$t,!0,an.setSeries)}))),V){var f=ha("td","u-value",o);f.textContent="--",n.push(f)}return[o,n]}(e,t);q.splice(t,0,l[0]),W.splice(t,0,l[1]),U.values.push(null)}if(we.show){z.splice(t,0,null);var c=function(e,t){if(t>0){var n=we.points.show(r,t);if(n)return sa(n,"u-cursor-pt"),sa(n,e.class),ma(n,-10,-10,ue,le),v.insertBefore(n,Ee[t]),n}}(e,t);c&&Ee.splice(t,0,c)}on("addSeries",t)}r.addSeries=function(e,t){e=wc(e,t=null==t?_.length:t,El,zl),_.splice(t,0,e),Ae(_[t],t)},r.delSeries=function(e){if(_.splice(e,1),H){U.values.splice(e,1),W.splice(e,1);var t=q.splice(e,1)[0];ie(null,t.firstChild),t.remove()}we.show&&(z.splice(e,1),Ee.length>1&&Ee.splice(e,1)[0].remove()),on("delSeries",e)};var Se=[!1,!1,!1,!1];function Fe(e,t,n,r){var i=_t(n,4),o=i[0],a=i[1],u=i[2],l=i[3],c=t%2,s=0;return 0==c&&(l||a)&&(s=0==t&&!o||2==t&&!u?Va(Cl.size/3):0),1==c&&(o||u)&&(s=1==t&&!a||3==t&&!l?Va($l.size/2):0),s}var Ne,Oe,Te,Be,Me,Le,Pe,$e,Re,Ie,je,ze=r.padding=(e.padding||[Fe,Fe,Fe,Fe]).map((function(e){return iu($a(e,Fe))})),Ue=r._padding=ze.map((function(e,t){return e(r,t,Se,0)})),He=null,Ye=null,Ve=1==i?_[0].idxs:null,qe=null,We=!1;function Qe(e,n){if(t=null==e?[]:ku(e,wu),2==i){Ne=0;for(var o=1;o<_.length;o++)Ne+=t[o][0].length;r.data=t=e}else if(null==t[0]&&(t[0]=[]),r.data=t.slice(),qe=t[0],Ne=qe.length,2==O){t[0]=Array(Ne);for(var a=0;a=0,_e=!0,wt()}}function Ge(){var e,n;if(We=!0,1==i)if(Ne>0){if(He=Ve[0]=0,Ye=Ve[1]=Ne-1,e=t[0][He],n=t[0][Ye],2==O)e=He,n=Ye;else if(1==Ne)if(3==O){var r=_t(Oa(e,e,N.log,!1),2);e=r[0],n=r[1]}else if(4==O){var o=_t(Ta(e,e,N.log,!1),2);e=o[0],n=o[1]}else if(N.time)n=e+Va(86400/g);else{var a=_t(Pa(e,n,.1,!0),2);e=a[0],n=a[1]}}else He=Ve[0]=e=null,Ye=Ve[1]=n=null;Lt(x,e,n)}function Ze(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:Jo,t=arguments.length>1?arguments[1]:void 0,n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:yu,r=arguments.length>3&&void 0!==arguments[3]?arguments[3]:"butt",i=arguments.length>4&&void 0!==arguments[4]?arguments[4]:Jo,o=arguments.length>5&&void 0!==arguments[5]?arguments[5]:"round";e!=Oe&&(d.strokeStyle=Oe=e),i!=Te&&(d.fillStyle=Te=i),t!=Be&&(d.lineWidth=Be=t),o!=Le&&(d.lineJoin=Le=o),r!=Pe&&(d.lineCap=Pe=r),n!=Me&&d.setLineDash(Me=n)}function Je(e,t,n,r){t!=Te&&(d.fillStyle=Te=t),e!=$e&&(d.font=$e=e),n!=Re&&(d.textAlign=Re=n),r!=Ie&&(d.textBaseline=Ie=r)}function Ke(e,t,n,i){var o=arguments.length>4&&void 0!==arguments[4]?arguments[4]:0;if(i.length>0&&e.auto(r,We)&&(null==t||null==t.min)){var a=$a(He,0),u=$a(Ye,i.length-1),l=null==n.min?3==e.distr?Sa(i,a,u):Aa(i,a,u,o):[n.min,n.max];e.min=Wa(e.min,n.min=l[0]),e.max=Qa(e.max,n.max=l[1])}}function Xe(e,t){var n=t?_[e].points:_[e];n._stroke=n.stroke(r,e),n._fill=n.fill(r,e)}function et(e,n){var i=n?_[e].points:_[e],o=i._stroke,a=i._fill,u=i._paths,l=u.stroke,c=u.fill,s=u.clip,f=u.flags,h=null,p=du(i.width*jo,3),v=p%2/2;n&&null==a&&(a=p>0?"#fff":o);var m=1==i.pxAlign;if(m&&d.translate(v,v),!n){var y=fe,g=de,b=he,D=pe,x=p*jo/2;0==i.min&&(D+=x),0==i.max&&(g-=x,D+=x),(h=new Path2D).rect(y,g,b,D)}n?tt(o,p,i.dash,i.cap,a,l,c,f,s):function(e,n,i,o,a,u,l,c,s,f,d){var h=!1;w.forEach((function(p,v){if(p.series[0]==e){var m,y=_[p.series[1]],g=t[p.series[1]],b=(y._paths||mu).band;_u(b)&&(b=1==p.dir?b[0]:b[1]);var D=null;y.show&&b&&function(e,t,n){for(t=$a(t,0),n=$a(n,e.length-1);t<=n;){if(null!=e[t])return!0;t++}return!1}(g,He,Ye)?(D=p.fill(r,v)||u,m=y._paths.clip):b=null,tt(n,i,o,a,D,l,c,s,f,d,m,b),h=!0}})),h||tt(n,i,o,a,u,l,c,s,f,d)}(e,o,p,i.dash,i.cap,a,l,c,f,h,s),m&&d.translate(-v,-v)}r.setData=Qe;function tt(e,t,n,r,i,o,a,u,l,c,s,f){Ze(e,t,n,r,i),(l||c||f)&&(d.save(),l&&d.clip(l),c&&d.clip(c)),f?3==(3&u)?(d.clip(f),s&&d.clip(s),rt(i,a),nt(e,o,t)):2&u?(rt(i,a),d.clip(f),nt(e,o,t)):1&u&&(d.save(),d.clip(f),s&&d.clip(s),rt(i,a),d.restore(),nt(e,o,t)):(rt(i,a),nt(e,o,t)),(l||c||f)&&d.restore()}function nt(e,t,n){n>0&&(t instanceof Map?t.forEach((function(e,t){d.strokeStyle=Oe=t,d.stroke(e)})):null!=t&&e&&d.stroke(t))}function rt(e,t){t instanceof Map?t.forEach((function(e,t){d.fillStyle=Te=t,d.fill(e)})):null!=t&&e&&d.fill(t)}function it(e,t,n,r,i,o,a,u,l,c){var s=a%2/2;1==m&&d.translate(s,s),Ze(u,a,l,c,u),d.beginPath();var f,h,p,v,y=i+(0==r||3==r?-o:o);0==n?(h=i,v=y):(f=i,p=y);for(var g=0;g0&&(t._paths=null,e&&(1==i?(t.min=null,t.max=null):t.facets.forEach((function(e){e.min=null,e.max=null}))))}))}var lt,ct,st,ft,dt,ht,pt,vt,mt,yt,gt,bt,Dt=!1;function wt(){Dt||(Au(xt),Dt=!0)}function xt(){ve&&(!function(){var e=ku(D,wu);for(var n in e){var o=e[n],a=T[n];if(null!=a&&null!=a.min)Cu(o,a),n==x&&ut(!0);else if(n!=x||2==i)if(0==Ne&&null==o.from){var u=o.range(r,null,null,n);o.min=u[0],o.max=u[1]}else o.min=eu,o.max=-eu}if(Ne>0)for(var l in _.forEach((function(n,o){if(1==i){var a=n.scale,u=e[a],l=T[a];if(0==o){var c=u.range(r,u.min,u.max,a);u.min=c[0],u.max=c[1],He=Ca(u.min,t[0]),Ye=Ca(u.max,t[0]),t[0][He]u.max&&Ye--,n.min=qe[He],n.max=qe[Ye]}else n.show&&n.auto&&Ke(u,l,n,t[o],n.sorted);n.idxs[0]=He,n.idxs[1]=Ye}else if(o>0&&n.show&&n.auto){var s=_t(n.facets,2),f=s[0],d=s[1],h=f.scale,p=d.scale,v=_t(t[o],2),m=v[0],y=v[1];Ke(e[h],T[h],f,m,f.sorted),Ke(e[p],T[p],d,y,d.sorted),n.min=d.min,n.max=d.max}})),e){var c=e[l],s=T[l];if(null==c.from&&(null==s||null==s.min)){var f=c.range(r,c.min==eu?null:c.min,c.max==-eu?null:c.max,l);c.min=f[0],c.max=f[1]}}for(var d in e){var h=e[d];if(null!=h.from){var p=e[h.from];if(null==p.min)h.min=h.max=null;else{var v=h.range(r,p.min,p.max,d);h.min=v[0],h.max=v[1]}}}var m={},y=!1;for(var g in e){var b=e[g],w=D[g];if(w.min!=b.min||w.max!=b.max){w.min=b.min,w.max=b.max;var k=w.distr;w._min=3==k?Ja(w.min):4==k?Xa(w.min,w.asinh):w.min,w._max=3==k?Ja(w.max):4==k?Xa(w.max,w.asinh):w.max,m[g]=y=!0}}if(y){for(var C in _.forEach((function(e,t){2==i?t>0&&m.y&&(e._paths=null):m[e.scale]&&(e._paths=null)})),m)ye=!0,on("setScale",C);we.show&&(ge=_e=we.left>=0)}for(var E in T)T[E]=null}(),ve=!1),ye&&(!function(){for(var e=!1,t=0;!e;){var n=ot(++t),i=at(t);(e=3==t||n&&i)||(De(r.width,r.height),me=!0)}}(),ye=!1),me&&(da(p,Qo,ce),da(p,qo,se),da(p,Yo,ue),da(p,Vo,le),da(v,Qo,ce),da(v,qo,se),da(v,Yo,ue),da(v,Vo,le),da(h,Yo,oe),da(h,Vo,ae),f.width=Va(oe*jo),f.height=Va(ae*jo),b.forEach((function(e){var t=e._el,n=e._show,r=e._size,i=e._pos,o=e.side;if(null!=t)if(n){var a=o%2==1;da(t,a?"left":"top",i-(3===o||0===o?r:0)),da(t,a?"width":"height",r),da(t,a?"top":"left",a?se:ce),da(t,a?"height":"width",a?le:ue),fa(t,Uo)}else sa(t,Uo)})),Oe=Te=Be=Le=Pe=$e=Re=Ie=Me=null,je=1,Wt(!0),on("setSize"),me=!1),oe>0&&ae>0&&(d.clearRect(0,0,f.width,f.height),on("drawClear"),C.forEach((function(e){return e()})),on("draw")),we.show&&ge&&(Vt(null,!0,!1),ge=!1),c||(c=!0,r.status=1,on("ready")),We=!1,Dt=!1}function kt(e,n){var i=D[e];if(null==i.from){if(0==Ne){var o=i.range(r,n.min,n.max,e);n.min=o[0],n.max=o[1]}if(n.min>n.max){var a=n.min;n.min=n.max,n.max=a}if(Ne>1&&null!=n.min&&null!=n.max&&n.max-n.min<1e-16)return;e==x&&2==i.distr&&Ne>0&&(n.min=Ca(n.min,t[0]),n.max=Ca(n.max,t[0]),n.min==n.max&&n.max++),T[e]=n,ve=!0,wt()}}r.redraw=function(e,t){ye=t||!1,!1!==e?Lt(x,N.min,N.max):wt()},r.setScale=kt;var Ct=!1,Et=we.drag,At=Et.x,St=Et.y;we.show&&(we.x&&(lt=pa("u-cursor-x",v)),we.y&&(ct=pa("u-cursor-y",v)),0==N.ori?(st=lt,ft=ct):(st=ct,ft=lt),gt=we.left,bt=we.top);var Ft,Nt,Ot,Tt=r.select=Cu({show:!0,over:!0,left:0,width:0,top:0,height:0},e.select),Bt=Tt.show?pa("u-select",Tt.over?v:p):null;function Mt(e,t){if(Tt.show){for(var n in e)da(Bt,n,Tt[n]=e[n]);!1!==t&&on("setSelect")}}function Lt(e,t,n){kt(e,{min:t,max:n})}function Pt(e,t,n,o){null!=t.focus&&function(e){if(e!=Ot){var t=null==e,n=1!=ke.alpha;_.forEach((function(r,i){var o=t||0==i||i==e;r._focus=t?null:o,n&&function(e,t){_[e].alpha=t,we.show&&Ee[e]&&(Ee[e].style.opacity=t);H&&q[e]&&(q[e].style.opacity=t)}(i,o?1:ke.alpha)})),Ot=e,n&&wt()}}(e),null!=t.show&&_.forEach((function(n,r){r>0&&(e==r||null==e)&&(n.show=t.show,function(e,t){var n=_[e],r=H?q[e]:null;n.show?r&&fa(r,Uo):(r&&sa(r,Uo),Ee.length>1&&ma(Ee[e],-10,-10,ue,le))}(r,t.show),Lt(2==i?n.facets[1].scale:n.scale,null,null),wt())})),!1!==n&&on("setSeries",e,t),o&&cn("setSeries",r,e,t)}r.setSelect=Mt,r.setSeries=Pt,r.addBand=function(e,t){e.fill=iu(e.fill||null),e.dir=$a(e.dir,-1),t=null==t?w.length:t,w.splice(t,0,e)},r.setBand=function(e,t){Cu(w[e],t)},r.delBand=function(e){null==e?w.length=0:w.splice(e,1)};var $t={focus:!0};function Rt(e,t,n){var r=D[t];n&&(e=e/jo-(1==r.ori?se:ce));var i=ue;1==r.ori&&(e=(i=le)-e),-1==r.dir&&(e=i-e);var o=r._min,a=o+(r._max-o)*(e/i),u=r.distr;return 3==u?Ga(10,a):4==u?function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:1;return za.sinh(e)*t}(a,r.asinh):a}function It(e,t){da(Bt,Qo,Tt.left=e),da(Bt,Yo,Tt.width=t)}function jt(e,t){da(Bt,qo,Tt.top=e),da(Bt,Vo,Tt.height=t)}H&&Ce&&xa(na,L,(function(e){we._lock||null!=Ot&&Pt(null,$t,!0,an.setSeries)})),r.valToIdx=function(e){return Ca(e,t[0])},r.posToIdx=function(e,n){return Ca(Rt(e,x,n),t[0],He,Ye)},r.posToVal=Rt,r.valToPos=function(e,t,n){return 0==D[t].ori?a(e,D[t],n?he:ue,n?fe:0):u(e,D[t],n?pe:le,n?de:0)},r.batch=function(e){e(r),wt()},r.setCursor=function(e,t,n){gt=e.left,bt=e.top,Vt(null,t,n)};var zt=0==N.ori?It:jt,Ut=1==N.ori?It:jt;function Ht(e,t){if(null!=e){var n=e.idx;U.idx=n,_.forEach((function(e,t){(t>0||!Q)&&Yt(t,n)}))}H&&U.live&&function(){if(H&&U.live)for(var e=2==i?1:0;e<_.length;e++)if(0!=e||!Q){var t=U.values[e],n=0;for(var r in t)W[e][n++].firstChild.nodeValue=t[r]}}(),_e=!1,!1!==t&&on("setLegend")}function Yt(e,n){var i;if(null==n)i=G;else{var o=_[e],a=0==e&&2==O?qe:t[e];i=Q?o.values(r,e,n):{_:o.value(r,a[n],e,n)}}U.values[e]=i}function Vt(e,n,o){mt=gt,yt=bt;var a,u=_t(we.move(r,gt,bt),2);gt=u[0],bt=u[1],we.show&&(st&&ma(st,Va(gt),0,ue,le),ft&&ma(ft,0,Va(bt),ue,le));var l=He>Ye;Ft=eu;var s=0==N.ori?ue:le,f=1==N.ori?ue:le;if(gt<0||0==Ne||l){a=null;for(var d=0;d<_.length;d++)d>0&&Ee.length>1&&ma(Ee[d],-10,-10,ue,le);if(Ce&&Pt(null,$t,!0,null==e&&an.setSeries),U.live){z.fill(null),_e=!0;for(var h=0;h<_.length;h++)U.values[h]=G}}else{var p,v;1==i&&(a=Ca(p=Rt(0==N.ori?gt:bt,x),t[0],He,Ye),v=su(S(t[0][a],N,s,0),.5));for(var m=2==i?1:0;m<_.length;m++){var y=_[m],g=z[m],b=1==i?t[m][g]:t[m][1][g],w=we.dataIdx(r,m,a,p),k=1==i?t[m][w]:t[m][1][w];_e=_e||k!=b||w!=g,z[m]=w;var C=w==a?v:su(S(1==i?t[0][w]:t[m][0][w],N,s,0),.5);if(m>0&&y.show){var E=null==k?-10:su(F(k,1==i?D[y.scale]:D[y.facets[1].scale],f,0),.5);if(E>0&&1==i){var A=Ha(E-bt);A<=Ft&&(Ft=A,Nt=m)}var O=void 0,T=void 0;if(0==N.ori?(O=C,T=E):(O=E,T=C),_e&&Ee.length>1){ga(Ee[m],we.points.fill(r,m),we.points.stroke(r,m));var B=void 0,M=void 0,L=void 0,P=void 0,$=!0,R=we.points.bbox;if(null!=R){$=!1;var I=R(r,m);L=I.left,P=I.top,B=I.width,M=I.height}else L=O,P=T,B=M=we.points.size(r,m);ba(Ee[m],B,M,$),ma(Ee[m],L,P,ue,le)}}if(U.live){if(!_e||0==m&&Q)continue;Yt(m,w)}}}if(we.idx=a,we.left=gt,we.top=bt,_e&&(U.idx=a,Ht()),Tt.show&&Ct)if(null!=e){var j=_t(an.scales,2),H=j[0],Y=j[1],V=_t(an.match,2),q=V[0],W=V[1],Z=_t(e.cursor.sync.scales,2),J=Z[0],K=Z[1],X=e.cursor.drag;if(At=X._x,St=X._y,At||St){var ee,te,ne,re,ie,oe=e.select,ae=oe.left,ce=oe.top,se=oe.width,fe=oe.height,de=e.scales[H].ori,he=e.posToVal,pe=null!=H&&q(H,J),ve=null!=Y&&W(Y,K);pe&&At?(0==de?(ee=ae,te=se):(ee=ce,te=fe),ne=D[H],re=S(he(ee,J),ne,s,0),ie=S(he(ee+te,J),ne,s,0),zt(Wa(re,ie),Ha(ie-re))):zt(0,s),ve&&St?(1==de?(ee=ae,te=se):(ee=ce,te=fe),ne=D[Y],re=F(he(ee,K),ne,f,0),ie=F(he(ee+te,K),ne,f,0),Ut(Wa(re,ie),Ha(ie-re))):Ut(0,f)}else Jt()}else{var me=Ha(mt-dt),ye=Ha(yt-ht);if(1==N.ori){var ge=me;me=ye,ye=ge}At=Et.x&&me>=Et.dist,St=Et.y&&ye>=Et.dist;var be,De,xe=Et.uni;null!=xe?At&&St&&(St=ye>=xe,(At=me>=xe)||St||(ye>me?St=!0:At=!0)):Et.x&&Et.y&&(At||St)&&(At=St=!0),At&&(0==N.ori?(be=pt,De=gt):(be=vt,De=bt),zt(Wa(be,De),Ha(De-be)),St||Ut(0,f)),St&&(1==N.ori?(be=pt,De=gt):(be=vt,De=bt),Ut(Wa(be,De),Ha(De-be)),At||zt(0,s)),At||St||(zt(0,0),Ut(0,0))}if(Et._x=At,Et._y=St,null==e){if(o){if(null!=un){var Ae=_t(an.scales,2),Se=Ae[0],Fe=Ae[1];an.values[0]=null!=Se?Rt(0==N.ori?gt:bt,Se):null,an.values[1]=null!=Fe?Rt(1==N.ori?gt:bt,Fe):null}cn(Ko,r,gt,bt,ue,le,a)}if(Ce){var Oe=o&&an.setSeries,Te=ke.prox;null==Ot?Ft<=Te&&Pt(Nt,$t,!0,Oe):Ft>Te?Pt(null,$t,!0,Oe):Nt!=Ot&&Pt(Nt,$t,!0,Oe)}}c&&!1!==n&&on("setCursor")}r.setLegend=Ht;var qt=null;function Wt(e){!0===e?qt=null:on("syncRect",qt=v.getBoundingClientRect())}function Qt(e,t,n,r,i,o,a){we._lock||(Gt(e,t,n,r,i,o,a,!1,null!=e),null!=e?Vt(null,!0,!0):Vt(t,!0,!1))}function Gt(e,t,n,i,o,a,u,c,s){if(null==qt&&Wt(!1),null!=e)n=e.clientX-qt.left,i=e.clientY-qt.top;else{if(n<0||i<0)return gt=-10,void(bt=-10);var f=_t(an.scales,2),d=f[0],h=f[1],p=t.cursor.sync,v=_t(p.values,2),m=v[0],y=v[1],g=_t(p.scales,2),_=g[0],b=g[1],w=_t(an.match,2),x=w[0],k=w[1],C=t.axes[0].side%2==1,E=0==N.ori?ue:le,A=1==N.ori?ue:le,S=C?a:o,F=C?o:a,O=C?i:n,T=C?n:i;if(n=null!=_?x(d,_)?l(m,D[d],E,0):-10:E*(O/S),i=null!=b?k(h,b)?l(y,D[h],A,0):-10:A*(T/F),1==N.ori){var B=n;n=i,i=B}}if(s&&((n<=1||n>=ue-1)&&(n=nu(n,ue)),(i<=1||i>=le-1)&&(i=nu(i,le))),c){dt=n,ht=i;var M=_t(we.move(r,n,i),2);pt=M[0],vt=M[1]}else gt=n,bt=i}var Zt={width:0,height:0};function Jt(){Mt(Zt,!1)}function Kt(e,t,n,i,o,a,u){Ct=!0,At=St=Et._x=Et._y=!1,Gt(e,t,n,i,o,a,0,!0,!1),null!=e&&(re(ea,ua,Xt),cn(Xo,r,pt,vt,ue,le,null))}function Xt(e,t,n,i,o,a,u){Ct=Et._x=Et._y=!1,Gt(e,t,n,i,o,a,0,!1,!0);var l=Tt.left,c=Tt.top,s=Tt.width,f=Tt.height,d=s>0||f>0;if(d&&Mt(Tt),Et.setScale&&d){var h=l,p=s,v=c,m=f;if(1==N.ori&&(h=c,p=f,v=l,m=s),At&&Lt(x,Rt(h,x),Rt(h+p,x)),St)for(var y in D){var g=D[y];y!=x&&null==g.from&&g.min!=eu&&Lt(y,Rt(v+m,y),Rt(v,y))}Jt()}else we.lock&&(we._lock=!we._lock,we._lock||Vt(null,!0,!1));null!=e&&(ie(ea,ua),cn(ea,r,gt,bt,ue,le,null))}function en(e,t,n,i,o,a,u){Ge(),Jt(),null!=e&&cn(ra,r,gt,bt,ue,le,null)}function tn(){b.forEach(Tc),be(r.width,r.height,!0)}xa(oa,la,tn);var nn={};nn.mousedown=Kt,nn.mousemove=Qt,nn.mouseup=Xt,nn.dblclick=en,nn.setSeries=function(e,t,n,r){Pt(n,r,!0,!1)},we.show&&(re(Xo,v,Kt),re(Ko,v,Qt),re(ta,v,Wt),re(na,v,(function(e,t,n,r,i,o,a){if(!we._lock){var u=Ct;if(Ct){var l,c,s=!0,f=!0;0==N.ori?(l=At,c=St):(l=St,c=At),l&&c&&(s=gt<=10||gt>=ue-10,f=bt<=10||bt>=le-10),l&&s&&(gt=gt=3?Ll:au)),e.font=Oc(e.font),e.labelFont=Oc(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&&(Se[t]=!0,e._el=pa("u-axis",h))}})),n?n instanceof HTMLElement?(n.appendChild(s),sn()):n(r,sn):sn(),r}Bc.assign=Cu,Bc.fmtNum=ja,Bc.rangeNum=Pa,Bc.rangeLog=Oa,Bc.rangeAsinh=Ta,Bc.orient=Wl,Bc.pxRatio=jo,Bc.join=function(e,t){for(var n=new Set,r=0;r=o&&S<=a;S+=k){var F=c[S];if(null!=F){var N=_(l[S]),O=b(F);1==t?D(x,N,C):D(x,A,O),D(x,N,O),C=O,A=N}}var T=_t(Ql(e,i),2),B=T[0],M=T[1];if(null!=u.fill||0!=B){var L=w.fill=new Path2D(x),P=b(u.fillTo(e,i,u.min,u.max,B));D(L,A,P),D(L,E,P)}if(!u.spanGaps){var $,R=[];($=R).push.apply($,bt(Kl(l,c,o,a,k,_,r)));var I=u.width*jo/2,j=n||1==t?I:-I,z=n||-1==t?-I:I;R.forEach((function(e){e[0]+=j,e[1]+=z})),w.gaps=R=u.gaps(e,i,o,a,R),w.clip=Jl(R,s.ori,p,v,m,y)}return 0!=M&&(w.band=2==M?[Zl(e,i,o,a,x,-1),Zl(e,i,o,a,x,1)]:Zl(e,i,o,a,x,M)),w}))}},Mc.bars=function(e){var t=$a((e=e||mu).size,[.6,eu,1]),n=e.align||0,r=(e.gap||0)*jo,i=$a(e.radius,0),o=1-t[0],a=$a(t[1],eu)*jo,u=$a(t[2],1)*jo,l=$a(e.disp,mu),c=$a(e.each,(function(e){})),s=l.fill,f=l.stroke;return function(e,t,d,h){return Wl(e,t,(function(p,v,m,y,g,_,b,D,w,x,k){var C,E,A=p.pxRound,S=y.dir*(0==y.ori?1:-1),F=g.dir*(1==g.ori?1:-1),N=0==y.ori?oc:ac,O=0==y.ori?c:function(e,t,n,r,i,o,a){c(e,t,n,i,r,a,o)},T=_t(Ql(e,t),2),B=T[0],M=T[1],L=3==g.distr?1==B?g.max:g.min:0,P=b(L,g,k,w),$=A(p.width*jo),R=!1,I=null,j=null,z=null,U=null;null==s||0!=$&&null==f||(R=!0,I=s.values(e,t,d,h),j=new Map,new Set(I).forEach((function(e){null!=e&&j.set(e,new Path2D)})),$>0&&(z=f.values(e,t,d,h),U=new Map,new Set(z).forEach((function(e){null!=e&&U.set(e,new Path2D)}))));var H=l.x0,Y=l.size;if(null!=H&&null!=Y){v=H.values(e,t,d,h),2==H.unit&&(v=v.map((function(t){return e.posToVal(D+t*x,y.key,!0)})));var V=Y.values(e,t,d,h);E=A((E=2==Y.unit?V[0]*x:_(V[0],y,x,D)-_(0,y,x,D))-$),C=1==S?-$/2:E+$/2}else{var q=x;if(v.length>1)for(var W=null,Q=0,G=1/0;Q=d&&Q<=h;Q+=S){var ie=m[Q];if(void 0!==ie){var oe=_(2!=y.distr||null!=l?v[Q]:Q,y,x,D),ae=b($a(ie,L),g,k,w);null!=re&&null!=ie&&(P=b(re[Q],g,k,w));var ue=A(oe-C),le=A(Qa(ae,P)),ce=A(Wa(ae,P)),se=le-ce,fe=i*E;null!=ie&&(R?($>0&&null!=z[Q]&&N(U.get(z[Q]),ue,ce+Ya($/2),E,Qa(0,se-$),fe),null!=I[Q]&&N(j.get(I[Q]),ue,ce+Ya($/2),E,Qa(0,se-$),fe)):N(X,ue,ce+Ya($/2),E,Qa(0,se-$),fe),O(e,t,Q,ue-$/2,ce,E+$,se)),0!=M&&(F*M==1?(le=ce,ce=J):(ce=le,le=J),N(ee,ue-$/2,ce,E+$,Qa(0,se=le-ce),0))}}return $>0&&(K.stroke=R?U:X),K.fill=R?j:X,K}))}},Mc.spline=function(e){return function(e,t){var n=$a(null===t||void 0===t?void 0:t.alignGaps,0);return function(t,r,i,o){return Wl(t,r,(function(a,u,l,c,s,f,d,h,p,v,m){var y,g,_,b=a.pxRound,D=function(e){return b(f(e,c,v,h))},w=function(e){return b(d(e,s,m,p))};0==c.ori?(y=tc,_=rc,g=cc):(y=nc,_=ic,g=sc);var x=c.dir*(0==c.ori?1:-1);i=Ea(l,i,o,1),o=Ea(l,i,o,-1);for(var k=D(u[1==x?i:o]),C=k,E=[],A=[],S=1==x?i:o;S>=i&&S<=o;S+=x)if(null!=l[S]){var F=D(u[S]);E.push(C=F),A.push(w(l[S]))}var N={stroke:e(E,A,y,_,g,b),fill:null,clip:null,band:null,gaps:null,flags:1},O=N.stroke,T=_t(Ql(t,r),2),B=T[0],M=T[1];if(null!=a.fill||0!=B){var L=N.fill=new Path2D(O),P=w(a.fillTo(t,r,a.min,a.max,B));_(L,C,P),_(L,k,P)}if(!a.spanGaps){var $,R=[];($=R).push.apply($,bt(Kl(u,l,i,o,x,D,n))),N.gaps=R=a.gaps(t,r,i,o,R),N.clip=Jl(R,c.ori,h,p,v,m)}return 0!=M&&(N.band=2==M?[Zl(t,r,i,o,O,-1),Zl(t,r,i,o,O,1)]:Zl(t,r,i,o,O,M)),N}))}}(mc,e)};var Lc,Pc={height:500,legend:{show:!1},cursor:{drag:{x:!0,y:!1},focus:{prox:30},points:{size:5.6,width:1.4},bind:{click:function(){return null},dblclick:function(){return null}}}},$c=function(e){return void 0===e||null===e?"":e.toLocaleString("en-US",{maximumSignificantDigits:20})},Rc=function(e,t,n,r){var i,o=e.axes[n];if(r>1)return o._size||60;var a=6+((null===o||void 0===o||null===(i=o.ticks)||void 0===i?void 0:i.size)||0)+(o.gap||0),u=(null!==t&&void 0!==t?t:[]).reduce((function(e,t){return t.length>e.length?t:e}),"");return""!=u&&(a+=function(e,t){var n=document.createElement("span");n.innerText=e,n.style.cssText="position: absolute; z-index: -1; pointer-events: none; opacity: 0; font: ".concat(t),document.body.appendChild(n);var r=n.offsetWidth;return n.remove(),r}(u,e.ctx.font)),Math.ceil(a)},Ic=function(e){return function(e){for(var t=0,n=0;n>8*i&255).toString(16)).substr(-2);return r}(e)},jc=function(e){return e.replace(/^\[\d+]/,"").replace(/{.+}/gim,"")},zc=function(e){for(var t=e.length,n=-1/0;t--;){var r=e[t];Number.isFinite(r)&&r>n&&(n=r)}return Number.isFinite(n)?n:null},Uc=function(e){for(var t=e.length,n=1/0;t--;){var r=e[t];Number.isFinite(r)&&r2&&void 0!==arguments[2]?arguments[2]:"";return t.map((function(e){return"".concat($c(e)," ").concat(n)}))}(e,n,t)}};return e?Number(e)%2?n:Kn(Kn({},n),{},{side:1}):{space:80}}))},Yc=function(e,t){if(null==e||null==t)return[-1,1];var n=.02*(Math.abs(t-e)||Math.abs(e)||1);return[e-n,t+n]},Vc=function(e){var t,n,r=e.u,i=e.tooltipIdx,o=e.metrics,a=e.series,u=e.tooltip,l=e.tooltipOffset,c=e.unit,s=void 0===c?"":c,f=i.seriesIdx,d=i.dataIdx;if(null!==f&&void 0!==d){var h=r.data[f][d],p=r.data[0][d],v=(null===(t=o[f-1])||void 0===t?void 0:t.metric)||{},m=a[f],y=Ic(m.label||""),g=r.over.getBoundingClientRect(),_=g.width,b=g.height,D=r.valToPos(h||0,(null===(n=a[f])||void 0===n?void 0:n.scale)||"1"),w=r.valToPos(p,"x"),x=u.getBoundingClientRect(),k=x.width,C=x.height,E=w+k>=_,A=D+C>=b;u.style.display="grid",u.style.top="".concat(l.top+D+10-(A?C+10:0),"px"),u.style.left="".concat(l.left+w+10-(E?k+20:0),"px");var S=(m.label||"").replace(/{.+}/gim,"").trim(),F=jc(S),N=yr()(new Date(1e3*p)).format("YYYY-MM-DD HH:mm:ss:SSS (Z)"),O=Object.keys(v).filter((function(e){return"__name__"!==e})).map((function(e){return"
".concat(e,": ").concat(v[e],"
")})).join(""),T='
');u.innerHTML="
".concat(N,'
\n
\n ').concat(T).concat(F,': ').concat($c(h)," ").concat(s,'\n
\n
').concat(O,"
")}},qc=n(61),Wc=n.n(qc);!function(e){e.xRange="xRange",e.yRange="yRange",e.data="data"}(Lc||(Lc={}));var Qc=function(e){var t=e.data,n=e.series,r=e.metrics,i=void 0===r?[]:r,o=e.period,a=e.yaxis,u=e.unit,l=e.setPeriod,c=e.container,s=re(null),f=_t(X(!1),2),d=f[0],h=f[1],p=_t(X({min:o.start,max:o.end}),2),v=p[0],m=p[1],y=_t(X(),2),g=y[0],_=y[1],b=po(c),D=document.createElement("div");D.className="u-tooltip";var w={seriesIdx:null,dataIdx:void 0},x={left:0,top:0},k=ae(Wc()((function(e){var t=e.min,n=e.max;l({from:new Date(1e3*t),to:new Date(1e3*n)})}),500),[]),C=function(e){var t=e.u,n=e.min,r=e.max,i=1e3*(r-n);iSr||(t.setScale("x",{min:n,max:r}),m({min:n,max:r}),k({min:n,max:r}))},E=function(e){var t=e.target,n=e.ctrlKey,r=e.metaKey,i=e.key,o=t instanceof HTMLInputElement||t instanceof HTMLTextAreaElement;if(g&&!o){var a="+"===i||"="===i;if(("-"===i||a)&&!n&&!r){e.preventDefault();var u=(v.max-v.min)/10*(a?1:-1);C({u:g,min:v.min+u,max:v.max-u})}}},A=function(){return[v.min,v.max]},S=function(e){var 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;return a.limits.enable?a.limits.range[r]:Yc(t,n)},F=Kn(Kn({},Pc),{},{series:n,axes:Hc([{},{scale:"1"}],u),scales:Kn({},function(){var e={x:{range:A}},t=Object.keys(a.limits.range);return(t.length?t:["1"]).forEach((function(t){e[t]={range:function(e){var n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:0,r=arguments.length>2&&void 0!==arguments[2]?arguments[2]:1;return S(e,n,r,t)}}})),e}()),width:b.width||400,plugins:[{hooks:{ready:function(e){var t;x.left=parseFloat(e.over.style.left),x.top=parseFloat(e.over.style.top),null===(t=e.root.querySelector(".u-wrap"))||void 0===t||t.appendChild(D),e.over.addEventListener("mousedown",(function(t){var n=t.ctrlKey,r=t.metaKey;0===t.button&&(n||r)&&function(e){var t=e.e,n=e.factor,r=void 0===n?.85:n,i=e.u,o=e.setPanning,a=e.setPlotScale;t.preventDefault(),o(!0);var u=t.clientX,l=i.posToVal(1,"x")-i.posToVal(0,"x"),c=i.scales.x.min||0,s=i.scales.x.max||0,f=function(e){e.preventDefault();var t=l*((e.clientX-u)*r);a({u:i,min:c-t,max:s-t})};document.addEventListener("mousemove",f),document.addEventListener("mouseup",(function e(){o(!1),document.removeEventListener("mousemove",f),document.removeEventListener("mouseup",e)}))}({u:e,e:t,setPanning:h,setPlotScale:C,factor:.9})})),e.over.addEventListener("wheel",(function(t){if(t.ctrlKey||t.metaKey){t.preventDefault();var n=e.over.getBoundingClientRect().width,r=e.cursor.left&&e.cursor.left>0?e.cursor.left:0,i=e.posToVal(r,"x"),o=(e.scales.x.max||0)-(e.scales.x.min||0),a=t.deltaY<0?.9*o:o/.9,u=i-r/n*a,l=u+a;e.batch((function(){return C({u:e,min:u,max:l})}))}}))},setCursor:function(e){w.dataIdx!==e.cursor.idx&&(w.dataIdx=e.cursor.idx||0,null!==w.seriesIdx&&void 0!==w.dataIdx&&Vc({u:e,tooltipIdx:w,metrics:i,series:n,tooltip:D,tooltipOffset:x,unit:u}))},setSeries:function(e,t){w.seriesIdx!==t&&(w.seriesIdx=t,t&&void 0!==w.dataIdx?Vc({u:e,tooltipIdx:w,metrics:i,series:n,tooltip:D,tooltipOffset:x,unit:u}):D.style.display="none")}}}],hooks:{setSelect:[function(e){var t=e.posToVal(e.select.left,"x"),n=e.posToVal(e.select.left+e.select.width,"x");C({u:e,min:t,max:n})}]}}),N=function(e){if(g){switch(e){case Lc.xRange:g.scales.x.range=A;break;case Lc.yRange:Object.keys(a.limits.range).forEach((function(e){g.scales[e]&&(g.scales[e].range=function(t){var n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:0,r=arguments.length>2&&void 0!==arguments[2]?arguments[2]:1;return S(t,n,r,e)})}));break;case Lc.data:g.setData(t)}d||g.redraw()}};return te((function(){return m({min:o.start,max:o.end})}),[o]),te((function(){if(s.current){var e=new Bc(F,t,s.current);return _(e),m({min:o.start,max:o.end}),e.destroy}}),[s.current,n,b]),te((function(){return window.addEventListener("keydown",E),function(){window.removeEventListener("keydown",E)}}),[v]),te((function(){return N(Lc.data)}),[t]),te((function(){return N(Lc.xRange)}),[v]),te((function(){return N(Lc.yRange)}),[a]),fr("div",{className:Fi()({"vm-line-chart":!0,"vm-line-chart_panning":d}),children:fr("div",{ref:s})})};function Gc(){Gc=function(){return e};var e={},t=Object.prototype,n=t.hasOwnProperty,r=Object.defineProperty||function(e,t,n){e[t]=n.value},i="function"==typeof Symbol?Symbol:{},o=i.iterator||"@@iterator",a=i.asyncIterator||"@@asyncIterator",u=i.toStringTag||"@@toStringTag";function l(e,t,n){return Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}),e[t]}try{l({},"")}catch(S){l=function(e,t,n){return e[t]=n}}function c(e,t,n,i){var o=t&&t.prototype instanceof d?t:d,a=Object.create(o.prototype),u=new C(i||[]);return r(a,"_invoke",{value:D(e,n,u)}),a}function s(e,t,n){try{return{type:"normal",arg:e.call(t,n)}}catch(S){return{type:"throw",arg:S}}}e.wrap=c;var f={};function d(){}function h(){}function p(){}var v={};l(v,o,(function(){return this}));var m=Object.getPrototypeOf,y=m&&m(m(E([])));y&&y!==t&&n.call(y,o)&&(v=y);var g=p.prototype=d.prototype=Object.create(v);function _(e){["next","throw","return"].forEach((function(t){l(e,t,(function(e){return this._invoke(t,e)}))}))}function b(e,t){function i(r,o,a,u){var l=s(e[r],e,o);if("throw"!==l.type){var c=l.arg,f=c.value;return f&&"object"==St(f)&&n.call(f,"__await")?t.resolve(f.__await).then((function(e){i("next",e,a,u)}),(function(e){i("throw",e,a,u)})):t.resolve(f).then((function(e){c.value=e,a(c)}),(function(e){return i("throw",e,a,u)}))}u(l.arg)}var o;r(this,"_invoke",{value:function(e,n){function r(){return new t((function(t,r){i(e,n,t,r)}))}return o=o?o.then(r,r):r()}})}function D(e,t,n){var r="suspendedStart";return function(i,o){if("executing"===r)throw new Error("Generator is already running");if("completed"===r){if("throw"===i)throw o;return A()}for(n.method=i,n.arg=o;;){var a=n.delegate;if(a){var u=w(a,n);if(u){if(u===f)continue;return u}}if("next"===n.method)n.sent=n._sent=n.arg;else if("throw"===n.method){if("suspendedStart"===r)throw r="completed",n.arg;n.dispatchException(n.arg)}else"return"===n.method&&n.abrupt("return",n.arg);r="executing";var l=s(e,t,n);if("normal"===l.type){if(r=n.done?"completed":"suspendedYield",l.arg===f)continue;return{value:l.arg,done:n.done}}"throw"===l.type&&(r="completed",n.method="throw",n.arg=l.arg)}}}function w(e,t){var n=e.iterator[t.method];if(void 0===n){if(t.delegate=null,"throw"===t.method){if(e.iterator.return&&(t.method="return",t.arg=void 0,w(e,t),"throw"===t.method))return f;t.method="throw",t.arg=new TypeError("The iterator does not provide a 'throw' method")}return f}var r=s(n,e.iterator,t.arg);if("throw"===r.type)return t.method="throw",t.arg=r.arg,t.delegate=null,f;var i=r.arg;return i?i.done?(t[e.resultName]=i.value,t.next=e.nextLoc,"return"!==t.method&&(t.method="next",t.arg=void 0),t.delegate=null,f):i:(t.method="throw",t.arg=new TypeError("iterator result is not an object"),t.delegate=null,f)}function x(e){var t={tryLoc:e[0]};1 in e&&(t.catchLoc=e[1]),2 in e&&(t.finallyLoc=e[2],t.afterLoc=e[3]),this.tryEntries.push(t)}function k(e){var t=e.completion||{};t.type="normal",delete t.arg,e.completion=t}function C(e){this.tryEntries=[{tryLoc:"root"}],e.forEach(x,this),this.reset(!0)}function E(e){if(e){var t=e[o];if(t)return t.call(e);if("function"==typeof e.next)return e;if(!isNaN(e.length)){var r=-1,i=function t(){for(;++r=0;--i){var o=this.tryEntries[i],a=o.completion;if("root"===o.tryLoc)return r("end");if(o.tryLoc<=this.prev){var u=n.call(o,"catchLoc"),l=n.call(o,"finallyLoc");if(u&&l){if(this.prev=0;--r){var i=this.tryEntries[r];if(i.tryLoc<=this.prev&&n.call(i,"finallyLoc")&&this.prev=0;--t){var n=this.tryEntries[t];if(n.finallyLoc===e)return this.complete(n.completion,n.afterLoc),k(n),f}},catch:function(e){for(var t=this.tryEntries.length-1;t>=0;--t){var n=this.tryEntries[t];if(n.tryLoc===e){var r=n.completion;if("throw"===r.type){var i=r.arg;k(n)}return i}}throw new Error("illegal catch attempt")},delegateYield:function(e,t,n){return this.delegate={iterator:E(e),resultName:t,nextLoc:n},"next"===this.method&&(this.arg=void 0),f}},e}function Zc(e,t,n,r,i,o,a){try{var u=e[o](a),l=u.value}catch(c){return void n(c)}u.done?t(l):Promise.resolve(l).then(r,i)}function Jc(e){return function(){var t=this,n=arguments;return new Promise((function(r,i){var o=e.apply(t,n);function a(e){Zc(o,r,i,a,u,"next",e)}function u(e){Zc(o,r,i,a,u,"throw",e)}a(void 0)}))}}var Kc=function(e){var t=e.legend,n=e.onChange,r=_t(X(""),2),i=r[0],o=r[1],a=oe((function(){return function(e){var t=Object.keys(e.freeFormFields).filter((function(e){return"__name__"!==e}));return t.map((function(t){var n="".concat(t,'="').concat(e.freeFormFields[t],'"');return{id:"".concat(e.label,".").concat(n),freeField:n,key:t}}))}(t)}),[t]),u=function(){var e=Jc(Gc().mark((function e(t,n){return Gc().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,navigator.clipboard.writeText(t);case 2:o(n),setTimeout((function(){return o("")}),2e3);case 4:case"end":return e.stop()}}),e)})));return function(t,n){return e.apply(this,arguments)}}();return fr("div",{className:Fi()({"vm-legend-item":!0,"vm-legend-item_hide":!t.checked}),onClick:function(e){return function(t){n(e,t.ctrlKey||t.metaKey)}}(t),children:[fr("div",{className:"vm-legend-item__marker",style:{backgroundColor:t.color}}),fr("div",{className:"vm-legend-item-info",children:[fr("span",{className:"vm-legend-item-info__label",children:jc(t.label)}),"\xa0{",a.map((function(e){return fr(co,{open:i===e.id,title:"Copied!",placement:"top-center",children:fr("span",{className:"vm-legend-item-info__free-fields",onClick:(t=e.freeField,n=e.id,function(e){e.stopPropagation(),u(t,n)}),children:e.freeField},e.key)},e.id);var t,n})),"}"]})]})},Xc=function(e){var t=e.labels,n=e.query,r=e.onChange,i=oe((function(){return Array.from(new Set(t.map((function(e){return e.group}))))}),[t]);return fr(m,{children:fr("div",{className:"vm-legend",children:i.map((function(e){return fr("div",{className:"vm-legend-group",children:[fr("div",{className:"vm-legend-group-title",children:[fr("span",{className:"vm-legend-group-title__count",children:["Query ",e,": "]}),fr("span",{className:"vm-legend-group-title__query",children:n[e-1]})]}),fr("div",{children:t.filter((function(t){return t.group===e})).map((function(e){return fr(Kc,{legend:e,onChange:r},e.label)}))})]},e)}))})})};function es(e,t){if(null==e)return{};var n,r,i=function(e,t){if(null==e)return{};var n,r,i={},o=Object.keys(e);for(r=0;r=0||(i[n]=e[n]);return i}(e,t);if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(e);for(r=0;r=0||Object.prototype.propertyIsEnumerable.call(e,n)&&(i[n]=e[n])}return i}var ts=["__name__"],ns=function(e,t,n){var r=function(e,t){var n=e.metric,r=n.__name__,i=es(n,ts),o=t||r||"";return 0===Object.keys(e.metric).length?o||"Result ".concat(e.group):"".concat(o," {").concat(Object.entries(i).map((function(e){return"".concat(e[0],": ").concat(e[1])})).join(", "),"}")}(e,n[e.group-1]),i="[".concat(e.group,"]").concat(r);return{label:i,freeFormFields:e.metric,width:1.4,stroke:Ic(i),show:!is(i,t),scale:"1",points:{size:4.2,width:1.4}}},rs=function(e,t){return{group:t,label:e.label||"",color:e.stroke,checked:e.show||!1,freeFormFields:e.freeFormFields}},is=function(e,t){return t.includes("".concat(e))},os=function(e){switch(e){case"NaN":return NaN;case"Inf":case"+Inf":return 1/0;case"-Inf":return-1/0;default:return parseFloat(e)}},as=function(e){var t=e.data,n=void 0===t?[]:t,r=e.period,i=e.customStep,o=e.query,a=e.yaxis,u=e.unit,l=e.showLegend,c=void 0===l||l,s=e.setYaxisLimits,f=e.setPeriod,d=e.alias,h=void 0===d?[]:d,p=e.fullWidth,v=void 0===p||p,m=oe((function(){return i||r.step||1}),[r.step,i]),y=_t(X([[]]),2),g=y[0],_=y[1],b=_t(X([]),2),D=b[0],w=b[1],x=_t(X([]),2),k=x[0],C=x[1],E=_t(X([]),2),A=E[0],S=E[1],F=function(e){var t=function(e){var t={},n=Object.values(e).flat(),r=Uc(n),i=zc(n);return t[1]=Yc(r,i),t}(e);s(t)};te((function(){var e=[],t={},i=[],o=[{}];null===n||void 0===n||n.forEach((function(n){var r=ns(n,A,h);o.push(r),i.push(rs(r,n.group));var a,u=t[n.group]||[],l=Io(n.values);try{for(l.s();!(a=l.n()).done;){var c=a.value;e.push(c[0]),u.push(os(c[1]))}}catch(s){l.e(s)}finally{l.f()}t[n.group]=u}));var a=function(e,t,n){for(var r=Array.from(new Set(e)).sort((function(e,t){return e-t})),i=n.start,o=Nr(n.end+t),a=0,u=[];i<=o;){for(;a=r.length||r[a]>i)&&u.push(i)}for(;u.length<2;)u.push(i),i=Nr(i+t);return u}(e,m,r),u=n.map((function(e){var t,n=[],r=e.values,i=r.length,o=0,u=Io(a);try{for(u.s();!(t=u.n()).done;){for(var l=t.value;o1e10*h?n.map((function(){return f})):n}));u.unshift(a),F(t),_(u),w(o),C(i)}),[n]),te((function(){var e=[],t=[{}];null===n||void 0===n||n.forEach((function(n){var r=ns(n,A,h);t.push(r),e.push(rs(r,n.group))})),w(t),C(e)}),[A]);var N=re(null);return fr("div",{className:Fi()({"vm-graph-view":!0,"vm-graph-view_full-width":v}),ref:N,children:[(null===N||void 0===N?void 0:N.current)&&fr(Qc,{data:g,series:D,metrics:n,period:r,yaxis:a,unit:u,setPeriod:f,container:null===N||void 0===N?void 0:N.current}),c&&fr(Xc,{labels:k,query:o,onChange:function(e,t){S(function(e){var t=e.hideSeries,n=e.legend,r=e.metaKey,i=e.series,o=n.label,a=is(o,t),u=i.map((function(e){return e.label||""}));return r?a?t.filter((function(e){return e!==o})):[].concat(bt(t),[o]):t.length?a?bt(u.filter((function(e){return e!==o}))):[]:bt(u.filter((function(e){return e!==o})))}({hideSeries:A,legend:e,metaKey:t,series:D}))}})]})},us=function(e){var t=e.value,n=e.onChange,r=e.onEnter,i=e.onArrowUp,o=e.onArrowDown,a=e.autocomplete,u=e.error,l=e.options,s=e.label,f=_t(X(-1),2),d=f[0],h=f[1],p=_t(X(!1),2),v=p[0],m=p[1],y=re(null),g=re(null),_=oe((function(){if(h(0),!v)return[];try{var e=new RegExp(String(t),"i");return l.filter((function(n){return e.test(n)&&n!==t})).sort((function(t,n){var r,i;return((null===(r=t.match(e))||void 0===r?void 0:r.index)||0)-((null===(i=n.match(e))||void 0===i?void 0:i.index)||0)}))}catch(c){return[]}}),[v,l]),b=function(){m(!1)},D=function(e){return function(){n(e),b()}};return te((function(){var e=(t.match(/[a-zA-Z_:.][a-zA-Z0-9_:.]*/gm)||[]).length;m(a&&t.length>2&&e<=1)}),[a,t]),te((function(){if(g.current){var e=g.current.childNodes[d];null!==e&&void 0!==e&&e.scrollIntoView&&e.scrollIntoView({block:"center"})}}),[d]),uo(y,(function(){return m(!1)}),g),fr("div",{className:"vm-query-editor",ref:y,children:[fr(Eo,{value:t,label:s,type:"textarea",autofocus:!!t,error:u,onKeyDown:function(e){var t=e.key,a=e.ctrlKey,u=e.metaKey,l=e.shiftKey,c=a||u,s="ArrowUp"===t,f="ArrowDown"===t,p="Enter"===t,y=v&&_.length,g=s||f;(g&&y||g&&c||p&&y)&&e.preventDefault(),s&&y&&!c?h((function(e){return 0===e?0:e-1})):s&&c&&i(),f&&y&&!c?h((function(e){return e>=_.length-1?_.length-1:e+1})):f&&c&&o(),p&&y&&!l&&!c?(n(_[d]),m(!1)):p&&!l&&r()},onChange:n}),fr(lo,{open:v,buttonRef:y,placement:"bottom-left",onClose:b,children:fr("div",{className:"vm-query-editor-autocomplete",ref:g,children:_.map((function(e,t){return fr("div",{className:Fi()({"vm-list__item":!0,"vm-list__item_active":t===d}),id:"$autocomplete$".concat(e),onClick:D(e),children:e},e)}))})})]})},ls=n(936),cs=n.n(ls),ss=function(e){var t=e.defaultStep,n=e.setStep,r=_t(X(t),2),i=r[0],o=r[1],a=_t(X(""),2),u=a[0],l=a[1],c=ae(cs()((function(e){return n(e||1)}),700),[]),s=function(e){e>0?(o(e),c(e),l("")):l("step is out of allowed range")};return te((function(){t&&s(t)}),[t]),fr(Eo,{label:"Step value",type:"number",value:i,error:u,onChange:function(e){var t=+e;t&&s(t)},endIcon:fr(co,{title:"Reset step to default",children:fr(ao,{variant:"text",size:"small",startIcon:fr(ui,{}),onClick:function(){s(t||1)}})})})},fs=function(){var e=Xn().serverURL,t=hr().tenantId,n=pr(),r=Qr(),i=_t(X(t||0),2),o=i[0],a=i[1],u=ae(cs()((function(t){var i=Number(t);if(n({type:"SET_TENANT_ID",payload:i}),e){var o=e.replace(/(\/select\/)([\d]+)(\/prometheus)/gim,"$1".concat(i,"$3"));n({type:"SET_SERVER",payload:o}),r({type:"RUN_QUERY"})}}),700),[]);return te((function(){o!==t&&a(t)}),[t]),fr(Eo,{label:"Tenant ID",type:"number",value:o,onChange:function(e){a(e),u(e)},endIcon:fr(co,{title:"Define tenant id if you need request to another storage",children:fr(ao,{variant:"text",size:"small",startIcon:fr(li,{})})})})},ds=function(e){var t,n=e.value,r=void 0!==n&&n,i=e.disabled,o=void 0!==i&&i,a=e.label,u=e.color,l=void 0===u?"secondary":u,c=e.onChange;return fr("div",{className:Fi()((qn(t={"vm-switch":!0,"vm-switch_disabled":o,"vm-switch_active":r},"vm-switch_".concat(l,"_active"),r),qn(t,"vm-switch_".concat(l),l),t)),onClick:function(){o||c(!r)},children:[fr("div",{className:"vm-switch-track",children:fr("div",{className:"vm-switch-track__thumb"})}),a&&fr("span",{className:"vm-switch__label",children:a})]})},hs=function(){var e=Vi(),t=Xn().inputTenantID,n=ni().autocomplete,r=ri(),i=ji(),o=i.nocache,a=i.isTracingEnabled,u=zi(),l=Wr().period.step;return fr("div",{className:"vm-additional-settings",children:[fr(ds,{label:"Autocomplete",value:n,onChange:function(){r({type:"TOGGLE_AUTOCOMPLETE"})}}),fr(ds,{label:"Disable cache",value:o,onChange:function(){u({type:"TOGGLE_NO_CACHE"})}}),fr(ds,{label:"Trace query",value:a,onChange:function(){u({type:"TOGGLE_QUERY_TRACING"})}}),fr("div",{className:"vm-additional-settings__input",children:fr(ss,{defaultStep:l,setStep:function(t){e({type:"SET_CUSTOM_STEP",payload:t})}})}),!!t&&fr("div",{className:"vm-additional-settings__input",children:fr(fs,{})})]})};var ps=function(e){var t=re();return te((function(){t.current=e}),[e]),t.current},vs=function(e){var t=e.error,n=e.queryOptions,r=ni(),i=r.query,o=r.queryHistory,a=r.autocomplete,u=ri(),l=Qr(),c=_t(X(i||[]),2),s=c[0],f=c[1],d=ps(s),h=function(){u({type:"SET_QUERY_HISTORY",payload:s.map((function(e,t){var n=o[t]||{values:[]},r=e===n.values[n.values.length-1];return{index:n.values.length-Number(r),values:!r&&e?[].concat(bt(n.values),[e]):n.values}}))}),u({type:"SET_QUERY",payload:s}),l({type:"RUN_QUERY"})},p=function(e,t){f((function(n){return n.map((function(n,r){return r===t?e:n}))}))},v=function(e,t){return function(){!function(e,t){var n=o[t],r=n.index,i=n.values,a=r+e;a<0||a>=i.length||(p(i[a]||"",t),u({type:"SET_QUERY_HISTORY_BY_INDEX",payload:{value:{values:i,index:a},queryNumber:t}}))}(e,t)}},m=function(e){return function(t){p(t,e)}},y=function(e){return function(){var t;t=e,f((function(e){return e.filter((function(e,n){return n!==t}))}))}};return te((function(){d&&s.length1&&fr(co,{title:"Remove Query",children:fr("div",{className:"vm-query-configurator-list-row__button",children:fr(ao,{variant:"text",color:"error",startIcon:fr(Ci,{}),onClick:y(r)})})})]},r)}))}),fr("div",{className:"vm-query-configurator-settings",children:[fr(hs,{}),fr("div",{className:"vm-query-configurator-settings__buttons",children:[s.length<4&&fr(ao,{variant:"outlined",onClick:function(){f((function(e){return[].concat(bt(e),[""])}))},startIcon:fr(Ei,{}),children:"Add Query"}),fr(ao,{variant:"contained",onClick:h,startIcon:fr(bi,{}),children:"Execute Query"})]})]})]})};function ms(e){var t,n,r,i=2;for("undefined"!=typeof Symbol&&(n=Symbol.asyncIterator,r=Symbol.iterator);i--;){if(n&&null!=(t=e[n]))return t.call(e);if(r&&null!=(t=e[r]))return new ys(t.call(e));n="@@asyncIterator",r="@@iterator"}throw new TypeError("Object is not async iterable")}function ys(e){function t(e){if(Object(e)!==e)return Promise.reject(new TypeError(e+" is not an object."));var t=e.done;return Promise.resolve(e.value).then((function(e){return{value:e,done:t}}))}return ys=function(e){this.s=e,this.n=e.next},ys.prototype={s:null,n:null,next:function(){return t(this.n.apply(this.s,arguments))},return:function(e){var n=this.s.return;return void 0===n?Promise.resolve({value:e,done:!0}):t(n.apply(this.s,arguments))},throw:function(e){var n=this.s.return;return void 0===n?Promise.reject(e):t(n.apply(this.s,arguments))}},new ys(e)}var gs=0,_s=function(){function e(t,n){Dt(this,e),this.tracing=void 0,this.tracingChildren=void 0,this.query=void 0,this.id=void 0,this.tracing=t,this.query=n,this.id=gs++;var r=t.children||[];this.tracingChildren=r.map((function(t){return new e(t,n)}))}return xt(e,[{key:"queryValue",get:function(){return this.query}},{key:"idValue",get:function(){return this.id}},{key:"children",get:function(){return this.tracingChildren}},{key:"message",get:function(){return this.tracing.message}},{key:"duration",get:function(){return this.tracing.duration_msec}}]),e}(),bs=function(e){var t=e.predefinedQuery,n=e.visible,r=e.display,i=e.customStep,o=ni().query,a=Wr().period,u=ji(),l=u.displayType,c=u.nocache,s=u.isTracingEnabled,f=hr().serverUrl,d=_t(X(!1),2),h=d[0],p=d[1],v=_t(X(),2),m=v[0],y=v[1],g=_t(X(),2),_=g[0],b=g[1],D=_t(X(),2),w=D[0],x=D[1],k=_t(X(),2),C=k[0],E=k[1],A=_t(X(),2),S=A[0],F=A[1],N=_t(X([]),2),O=N[0],T=N[1];te((function(){C&&(y(void 0),b(void 0),x(void 0))}),[C]);var B=function(){var e=Jc(Gc().mark((function e(t,n,r,i){var o,a,u,l,c,s;return Gc().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return o=new AbortController,T([].concat(bt(n),[o])),e.prev=2,e.delegateYield(Gc().mark((function e(){var n,f,d,h,p,v,m,g,_,D,w,k;return Gc().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:n="chart"===r,f=or[r],d=[],h=[],p=1,v=0,a=!1,u=!1,e.prev=8,c=ms(t);case 10:return e.next=12,c.next();case 12:if(!(a=!(s=e.sent).done)){e.next=24;break}return m=s.value,e.next=16,fetch(m,{signal:o.signal});case 16:return g=e.sent,e.next=19,g.json();case 19:_=e.sent,g.ok?(E(void 0),_.trace&&(D=new _s(_.trace,i[p-1]),h.push(D)),w=f-d.length,_.data.result.slice(0,w).forEach((function(e){e.group=p,d.push(e)})),v+=_.data.result.length,p++):E("".concat(_.errorType,"\r\n").concat(null===_||void 0===_?void 0:_.error));case 21:a=!1,e.next=10;break;case 24:e.next=30;break;case 26:e.prev=26,e.t0=e.catch(8),u=!0,l=e.t0;case 30:if(e.prev=30,e.prev=31,!a||null==c.return){e.next=35;break}return e.next=35,c.return();case 35:if(e.prev=35,!u){e.next=38;break}throw l;case 38:return e.finish(35);case 39:return e.finish(30);case 40:k="Showing ".concat(f," series out of ").concat(v," series due to performance reasons. Please narrow down the query, so it returns less series"),F(v>f?k:""),n?y(d):b(d),x(h);case 44:case"end":return e.stop()}}),e,null,[[8,26,30,40],[31,,35,39]])}))(),"t0",4);case 4:e.next=9;break;case 6:e.prev=6,e.t1=e.catch(2),e.t1 instanceof Error&&"AbortError"!==e.t1.name&&E("".concat(e.t1.name,": ").concat(e.t1.message));case 9:p(!1);case 10:case"end":return e.stop()}}),e,null,[[2,6]])})));return function(t,n,r,i){return e.apply(this,arguments)}}(),M=ae(cs()(B,800),[]),L=oe((function(){var e=null!==t&&void 0!==t?t:o,n="chart"===(r||l);if(a)if(f)if(e.every((function(e){return!e.trim()})))E(_o.validQuery);else{if(Ao(f)){var u=Kn({},a);return u.step=i,e.filter((function(e){return e.trim()})).map((function(e){return n?function(e,t,n,r,i){return"".concat(e,"/api/v1/query_range?query=").concat(encodeURIComponent(t),"&start=").concat(n.start,"&end=").concat(n.end,"&step=").concat(n.step).concat(r?"&nocache=1":"").concat(i?"&trace=1":"")}(f,e,u,c,s):function(e,t,n,r){return"".concat(e,"/api/v1/query?query=").concat(encodeURIComponent(t),"&time=").concat(n.end,"&step=").concat(n.step).concat(r?"&trace=1":"")}(f,e,u,s)}))}E(_o.validServer)}else E(_o.emptyServer)}),[f,a,l,i]);return te((function(){n&&null!==L&&void 0!==L&&L.length&&(p(!0),M(L,O,r||l,null!==t&&void 0!==t?t:o))}),[L,n]),te((function(){var e=O.slice(0,-1);e.length&&(e.map((function(e){return e.abort()})),T(O.filter((function(e){return!e.signal.aborted}))))}),[O]),{fetchUrl:L,isLoading:h,graphData:m,liveData:_,error:C,warning:S,traces:w}},Ds=function(e){var t=e.data,n=ue(io).showInfoMessage,r=oe((function(){return JSON.stringify(t,null,2)}),[t]);return fr("div",{className:"vm-json-view",children:[fr("div",{className:"vm-json-view__copy",children:fr(ao,{variant:"outlined",fullWidth:!1,onClick:function(){navigator.clipboard.writeText(r),n({text:"Formatted JSON has been copied",type:"success"})},children:"Copy JSON"})}),fr("pre",{className:"vm-json-view__code",children:fr("code",{children:r})})]})},ws=function(e){var t=e.yaxis,n=e.setYaxisLimits,r=e.toggleEnableLimits,i=oe((function(){return Object.keys(t.limits.range)}),[t.limits.range]),o=ae(cs()((function(e,r,i){var o=t.limits.range;o[r][i]=+e,o[r][0]===o[r][1]||o[r][0]>o[r][1]||n(o)}),500),[t.limits.range]),a=function(e,t){return function(n){o(n,e,t)}};return fr("div",{className:"vm-axes-limits",children:[fr(ds,{value:t.limits.enable,onChange:r,label:"Fix the limits for y-axis"}),fr("div",{className:"vm-axes-limits-list",children:i.map((function(e){return fr("div",{className:"vm-axes-limits-list__inputs",children:[fr(Eo,{label:"Min ".concat(e),type:"number",disabled:!t.limits.enable,value:t.limits.range[e][0],onChange:a(e,0)}),fr(Eo,{label:"Max ".concat(e),type:"number",disabled:!t.limits.enable,value:t.limits.range[e][1],onChange:a(e,1)})]},e)}))})]})},xs="Axes settings",ks=function(e){var t=e.yaxis,n=e.setYaxisLimits,r=e.toggleEnableLimits,i=re(null),o=_t(X(!1),2),a=o[0],u=o[1],l=re(null);uo(i,(function(){return u(!1)}),l);var c=function(){u(!1)};return fr("div",{className:"vm-graph-settings",children:[fr(co,{title:xs,children:fr("div",{ref:l,children:fr(ao,{variant:"text",startIcon:fr(oi,{}),onClick:function(){u((function(e){return!e}))}})})}),fr(lo,{open:a,buttonRef:l,placement:"bottom-right",onClose:c,children:fr("div",{className:"vm-graph-settings-popper",ref:i,children:[fr("div",{className:"vm-popper-header",children:[fr("h3",{className:"vm-popper-header__title",children:xs}),fr(ao,{size:"small",startIcon:fr(ai,{}),onClick:c})]}),fr("div",{className:"vm-graph-settings-popper__body",children:fr(ws,{yaxis:t,setYaxisLimits:n,toggleEnableLimits:r})})]})})]})},Cs=function(e){var t=e.containerStyles,n=void 0===t?{}:t,r=e.message;return fr("div",{className:"vm-spinner",style:n&&{},children:[fr("div",{className:"half-circle-spinner",children:[fr("div",{className:"circle circle-1"}),fr("div",{className:"circle circle-2"})]}),r&&fr("div",{className:"vm-spinner__message",children:r})]})},Es=function(){var e=hr().serverUrl,t=_t(X([]),2),n=t[0],r=t[1],i=function(){var t=Jc(Gc().mark((function t(){var n,i,o;return Gc().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:if(e){t.next=2;break}return t.abrupt("return");case 2:return n="".concat(e,"/api/v1/label/__name__/values"),t.prev=3,t.next=6,fetch(n);case 6:return i=t.sent,t.next=9,i.json();case 9:o=t.sent,i.ok&&r(o.data),t.next=16;break;case 13:t.prev=13,t.t0=t.catch(3),console.error(t.t0);case 16:case"end":return t.stop()}}),t,null,[[3,13]])})));return function(){return t.apply(this,arguments)}}();return te((function(){i()}),[e]),{queryOptions:n}},As=function(e){var t=e.value;return fr("div",{className:"vm-line-progress",children:[fr("div",{className:"vm-line-progress-track",children:fr("div",{className:"vm-line-progress-track__thumb",style:{width:"".concat(t,"%")}})}),fr("span",{children:[t.toFixed(2),"%"]})]})},Ss=function e(t){var n,r=t.trace,i=t.totalMsec,o=_t(X({}),2),a=o[0],u=o[1],l=r.children&&!!r.children.length,c=r.duration/i*100;return fr("div",{className:"vm-nested-nav",children:[fr("div",{className:"vm-nested-nav-header",onClick:(n=r.idValue,function(){u((function(e){return Kn(Kn({},e),{},qn({},n,!e[n]))}))}),children:[l&&fr("div",{className:Fi()({"vm-nested-nav-header__icon":!0,"vm-nested-nav-header__icon_open":a[r.idValue]}),children:fr(pi,{})}),fr("div",{className:"vm-nested-nav-header__progress",children:fr(As,{value:c})}),fr("div",{className:"vm-nested-nav-header__message",children:r.message}),fr("div",{className:"vm-nested-nav-header__duration",children:"duration: ".concat(r.duration," ms")})]}),a[r.idValue]&&fr("div",{children:l&&r.children.map((function(t){return fr(e,{trace:t,totalMsec:i},t.duration)}))})]})},Fs=function(e){var t=e.traces,n=e.onDeleteClick;if(!t.length)return fr(ro,{variant:"info",children:"Please re-run the query to see results of the tracing"});return fr("div",{className:"vm-tracings-view",children:t.map((function(e){return fr("div",{className:"vm-tracings-view-trace vm-block vm-block_empty-padding",children:[fr("div",{className:"vm-tracings-view-trace-header",children:[fr("h3",{className:"vm-tracings-view-trace-header-title",children:["Trace for ",fr("b",{className:"vm-tracings-view-trace-header-title__query",children:e.queryValue})]}),fr(co,{title:"Remove trace",children:fr(ao,{variant:"text",color:"error",startIcon:fr(Ci,{}),onClick:(t=e,function(){n(t)})})})]}),fr("nav",{className:"vm-tracings-view-trace__nav",children:fr(Ss,{trace:e,totalMsec:e.duration})})]},e.idValue);var t}))})},Ns=function(e,t){return oe((function(){var n={};e.forEach((function(e){return Object.entries(e.metric).forEach((function(e){return n[e[0]]?n[e[0]].options.add(e[1]):n[e[0]]={options:new Set([e[1]])}}))}));var r=Object.entries(n).map((function(e){return{key:e[0],variations:e[1].options.size}})).sort((function(e,t){return e.variations-t.variations}));return t?r.filter((function(e){return t.includes(e.key)})):r}),[e,t])},Os=function(e){var t,n=e.checked,r=void 0!==n&&n,i=e.disabled,o=void 0!==i&&i,a=e.label,u=e.color,l=void 0===u?"secondary":u,c=e.onChange;return fr("div",{className:Fi()((qn(t={"vm-checkbox":!0,"vm-checkbox_disabled":o,"vm-checkbox_active":r},"vm-checkbox_".concat(l,"_active"),r),qn(t,"vm-checkbox_".concat(l),l),t)),onClick:function(){o||c(!r)},children:[fr("div",{className:"vm-checkbox-track",children:fr("div",{className:"vm-checkbox-track__thumb",children:fr(Ai,{})})}),a&&fr("span",{className:"vm-checkbox__label",children:a})]})},Ts="Display columns",Bs=function(e){var t=e.data,n=e.defaultColumns,r=e.onChange,i=re(null),o=_t(X(!1),2),a=o[0],u=o[1],l=Ns(t),c=oe((function(){return!l.length}),[l]),s=_t(X(l.map((function(e){return e.key}))),2),f=s[0],d=s[1],h=function(){u(!1),d(n||l.map((function(e){return e.key})))},p=function(e){return function(){!function(e){d((function(t){return f.includes(e)?t.filter((function(t){return t!==e})):[].concat(bt(t),[e])}))}(e)}};return te((function(){d(l.map((function(e){return e.key})))}),[l]),fr("div",{className:"vm-table-settings",children:[fr(co,{title:Ts,children:fr("div",{ref:i,children:fr(ao,{variant:"text",startIcon:fr(oi,{}),onClick:function(){u((function(e){return!e}))},disabled:c})})}),fr(lo,{open:a,onClose:h,placement:"bottom-right",buttonRef:i,children:fr("div",{className:"vm-table-settings-popper",children:[fr("div",{className:"vm-popper-header",children:[fr("h3",{className:"vm-popper-header__title",children:Ts}),fr(ao,{onClick:h,startIcon:fr(ai,{}),size:"small"})]}),fr("div",{className:"vm-table-settings-popper-list",children:l.map((function(e){return fr("div",{className:"vm-table-settings-popper-list__item",children:fr(Os,{checked:f.includes(e.key),onChange:p(e.key),label:e.key})},e.key)}))}),fr("div",{className:"vm-table-settings-popper__footer",children:[fr(ao,{color:"error",variant:"outlined",size:"small",onClick:function(){u(!1);var e=l.map((function(e){return e.key}));d(e),r(e)},children:"Reset"}),fr(ao,{variant:"contained",size:"small",onClick:function(){u(!1),r(f)},children:"apply"})]})]})})]})};function Ms(e){return function(e,t){return Object.fromEntries(Object.entries(e).filter(t))}(e,(function(e){return!!e[1]}))}var Ls=function(e){var t=e.data,n=e.displayColumns,r=Ns(t,n),i=_t(X(""),2),o=i[0],a=i[1],u=_t(X("asc"),2),l=u[0],c=u[1],s=oe((function(){var e=null===t||void 0===t?void 0:t.map((function(e){return{metadata:r.map((function(t){return e.metric[t.key]||"-"})),value:e.value?e.value[1]:"-"}})),n="Value"===o,i=r.findIndex((function(e){return e.key===o}));return n||-1!==i?e.sort((function(e,t){var r=n?Number(e.value):e.metadata[i],o=n?Number(t.value):t.metadata[i];return("asc"===l?ro)?-1:1})):e}),[r,t,o,l]),f=function(e){return function(){d(e)}},d=function(e){c((function(t){return"asc"===t&&o===e?"desc":"asc"})),a(e)};return s.length?fr("table",{className:"vm-table",children:[fr("thead",{className:"vm-table-header",children:fr("tr",{className:"vm-table__row vm-table__row_header",children:[r.map((function(e,t){return fr("td",{className:"vm-table-cell vm-table-cell_header vm-table-cell_sort",onClick:f(e.key),children:fr("div",{className:"vm-table-cell__content",children:[e.key,fr("div",{className:Fi()({"vm-table__sort-icon":!0,"vm-table__sort-icon_active":o===e.key,"vm-table__sort-icon_desc":"desc"===l&&o===e.key}),children:fr(vi,{})})]})},t)})),fr("td",{className:"vm-table-cell vm-table-cell_header vm-table-cell_right vm-table-cell_sort",onClick:f("Value"),children:fr("div",{className:"vm-table-cell__content",children:[fr("div",{className:Fi()({"vm-table__sort-icon":!0,"vm-table__sort-icon_active":"Value"===o,"vm-table__sort-icon_desc":"desc"===l}),children:fr(vi,{})}),"Value"]})})]})}),fr("tbody",{className:"vm-table-body",children:s.map((function(e,t){return fr("tr",{className:"vm-table__row",children:[e.metadata.map((function(e,n){return fr("td",{className:Fi()({"vm-table-cell vm-table-cell_no-wrap":!0,"vm-table-cell_gray":s[t-1]&&s[t-1].metadata[n]===e}),children:e},n)})),fr("td",{className:"vm-table-cell vm-table-cell_right",children:e.value})]},t)}))})]}):fr(ro,{variant:"warning",children:"No data to show"})},Ps=function(){var e=ji(),t=e.displayType,n=e.isTracingEnabled,r=ni().query,i=Wr().period,o=Qr();!function(){var e=hr().tenantId,t=ji().displayType,n=ni().query,r=Wr(),i=r.duration,o=r.relativeTime,a=r.period,u=a.date,l=a.step,c=function(){var r={};n.forEach((function(n,a){var c,s="g".concat(a);r["".concat(s,".expr")]=n,r["".concat(s,".range_input")]=i,r["".concat(s,".end_input")]=u,r["".concat(s,".step_input")]=l,r["".concat(s,".tab")]=(null===(c=Bi.find((function(e){return e.value===t})))||void 0===c?void 0:c.prometheusCode)||0,r["".concat(s,".relative_time")]=o,r["".concat(s,".tenantID")]=e})),ar(Ms(r))};te(c,[e,t,n,i,o,u,l]),te(c,[])}();var a=_t(X(),2),u=a[0],l=a[1],c=_t(X([]),2),s=c[0],f=c[1],d=ue(Yi).state,h=d.customStep,p=d.yaxis,v=Vi(),m=function(e){v({type:"SET_YAXIS_LIMITS",payload:e})},y=Es().queryOptions,g=bs({visible:!0,customStep:h}),_=g.isLoading,b=g.liveData,D=g.graphData,w=g.error,x=g.warning,k=g.traces;return te((function(){k&&f([].concat(bt(s),bt(k)))}),[k]),te((function(){f([])}),[t]),fr("div",{className:"vm-custom-panel",children:[fr(vs,{error:w,queryOptions:y}),n&&fr("div",{className:"vm-custom-panel__trace",children:fr(Fs,{traces:s,onDeleteClick:function(e){var t=s.filter((function(t){return t.idValue!==e.idValue}));f(bt(t))}})}),w&&fr(ro,{variant:"error",children:w}),x&&fr(ro,{variant:"warning",children:x}),fr("div",{className:"vm-custom-panel-body vm-block",children:[_&&fr(Cs,{}),fr("div",{className:"vm-custom-panel-body-header",children:[fr(Mi,{}),"chart"===t&&fr(ks,{yaxis:p,setYaxisLimits:m,toggleEnableLimits:function(){v({type:"TOGGLE_ENABLE_YAXIS_LIMITS"})}}),"table"===t&&fr(Bs,{data:b||[],defaultColumns:u,onChange:l})]}),D&&i&&"chart"===t&&fr(as,{data:D,period:i,customStep:h,query:r,yaxis:p,setYaxisLimits:m,setPeriod:function(e){var t=e.from,n=e.to;o({type:"SET_PERIOD",payload:{from:t,to:n}})}}),b&&"code"===t&&fr(Ds,{data:b}),b&&"table"===t&&fr(Ls,{data:b,displayColumns:u})]})]})},$s=function(){var e=Jc(Gc().mark((function e(t){var n,r;return Gc().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,fetch("./dashboards/".concat(t));case 2:return n=e.sent,e.next=5,n.json();case 5:return r=e.sent,e.abrupt("return",r);case 7:case"end":return e.stop()}}),e)})));return function(t){return e.apply(this,arguments)}}(),Rs=Jc(Gc().mark((function e(){var t;return Gc().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return t=window.__VMUI_PREDEFINED_DASHBOARDS__,e.next=3,Promise.all(t.map(function(){var e=Jc(Gc().mark((function e(t){return Gc().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.abrupt("return",$s(t));case 1:case"end":return e.stop()}}),e)})));return function(t){return e.apply(this,arguments)}}()));case 3:return e.abrupt("return",e.sent);case 4:case"end":return e.stop()}}),e)})));function Is(){return{async:!1,baseUrl:null,breaks:!1,extensions:null,gfm:!0,headerIds:!0,headerPrefix:"",highlight:null,langPrefix:"language-",mangle:!0,pedantic:!1,renderer:null,sanitize:!1,sanitizer:null,silent:!1,smartypants:!1,tokenizer:null,walkTokens:null,xhtml:!1}}var js={async:!1,baseUrl:null,breaks:!1,extensions:null,gfm:!0,headerIds:!0,headerPrefix:"",highlight:null,langPrefix:"language-",mangle:!0,pedantic:!1,renderer:null,sanitize:!1,sanitizer:null,silent:!1,smartypants:!1,tokenizer:null,walkTokens:null,xhtml:!1};var zs=/[&<>"']/,Us=/[&<>"']/g,Hs=/[<>"']|&(?!#?\w+;)/,Ys=/[<>"']|&(?!#?\w+;)/g,Vs={"&":"&","<":"<",">":">",'"':""","'":"'"},qs=function(e){return Vs[e]};function Ws(e,t){if(t){if(zs.test(e))return e.replace(Us,qs)}else if(Hs.test(e))return e.replace(Ys,qs);return e}var Qs=/&(#(?:\d+)|(?:#x[0-9A-Fa-f]+)|(?:\w+));?/gi;function Gs(e){return e.replace(Qs,(function(e,t){return"colon"===(t=t.toLowerCase())?":":"#"===t.charAt(0)?"x"===t.charAt(1)?String.fromCharCode(parseInt(t.substring(2),16)):String.fromCharCode(+t.substring(1)):""}))}var Zs=/(^|[^\[])\^/g;function Js(e,t){e="string"===typeof e?e:e.source,t=t||"";var n={replace:function(t,r){return r=(r=r.source||r).replace(Zs,"$1"),e=e.replace(t,r),n},getRegex:function(){return new RegExp(e,t)}};return n}var Ks=/[^\w:]/g,Xs=/^$|^[a-z][a-z0-9+.-]*:|^[?#]/i;function ef(e,t,n){if(e){var r;try{r=decodeURIComponent(Gs(n)).replace(Ks,"").toLowerCase()}catch(c){return null}if(0===r.indexOf("javascript:")||0===r.indexOf("vbscript:")||0===r.indexOf("data:"))return null}t&&!Xs.test(n)&&(n=function(e,t){tf[" "+e]||(nf.test(e)?tf[" "+e]=e+"/":tf[" "+e]=cf(e,"/",!0));var n=-1===(e=tf[" "+e]).indexOf(":");return"//"===t.substring(0,2)?n?t:e.replace(rf,"$1")+t:"/"===t.charAt(0)?n?t:e.replace(of,"$1")+t:e+t}(t,n));try{n=encodeURI(n).replace(/%25/g,"%")}catch(c){return null}return n}var tf={},nf=/^[^:]+:\/*[^/]*$/,rf=/^([^:]+:)[\s\S]*$/,of=/^([^:]+:\/*[^/]*)[\s\S]*$/;var af={exec:function(){}};function uf(e){for(var t,n,r=1;r=0&&"\\"===n[i];)r=!r;return r?"|":" |"})).split(/ \|/),r=0;if(n[0].trim()||n.shift(),n.length>0&&!n[n.length-1].trim()&&n.pop(),n.length>t)n.splice(t);else for(;n.length1;)1&t&&(n+=e),t>>=1,e+=e;return n+e}function df(e,t,n,r){var i=t.href,o=t.title?Ws(t.title):null,a=e[1].replace(/\\([\[\]])/g,"$1");if("!"!==e[0].charAt(0)){r.state.inLink=!0;var u={type:"link",raw:n,href:i,title:o,text:a,tokens:r.inlineTokens(a)};return r.state.inLink=!1,u}return{type:"image",raw:n,href:i,title:o,text:Ws(a)}}var hf=function(){function e(t){Dt(this,e),this.options=t||js}return xt(e,[{key:"space",value:function(e){var t=this.rules.block.newline.exec(e);if(t&&t[0].length>0)return{type:"space",raw:t[0]}}},{key:"code",value:function(e){var t=this.rules.block.code.exec(e);if(t){var n=t[0].replace(/^ {1,4}/gm,"");return{type:"code",raw:t[0],codeBlockStyle:"indented",text:this.options.pedantic?n:cf(n,"\n")}}}},{key:"fences",value:function(e){var t=this.rules.block.fences.exec(e);if(t){var n=t[0],r=function(e,t){var n=e.match(/^(\s+)(?:```)/);if(null===n)return t;var r=n[1];return t.split("\n").map((function(e){var t=e.match(/^\s+/);return null===t?e:_t(t,1)[0].length>=r.length?e.slice(r.length):e})).join("\n")}(n,t[3]||"");return{type:"code",raw:n,lang:t[2]?t[2].trim().replace(this.rules.inline._escapes,"$1"):t[2],text:r}}}},{key:"heading",value:function(e){var t=this.rules.block.heading.exec(e);if(t){var n=t[2].trim();if(/#$/.test(n)){var r=cf(n,"#");this.options.pedantic?n=r.trim():r&&!/ $/.test(r)||(n=r.trim())}return{type:"heading",raw:t[0],depth:t[1].length,text:n,tokens:this.lexer.inline(n)}}}},{key:"hr",value:function(e){var t=this.rules.block.hr.exec(e);if(t)return{type:"hr",raw:t[0]}}},{key:"blockquote",value:function(e){var t=this.rules.block.blockquote.exec(e);if(t){var n=t[0].replace(/^ *>[ \t]?/gm,"");return{type:"blockquote",raw:t[0],tokens:this.lexer.blockTokens(n,[]),text:n}}}},{key:"list",value:function(e){var t=this.rules.block.list.exec(e);if(t){var n,r,i,o,a,u,l,c,s,f,d,h,p=t[1].trim(),v=p.length>1,m={type:"list",raw:"",ordered:v,start:v?+p.slice(0,-1):"",loose:!1,items:[]};p=v?"\\d{1,9}\\".concat(p.slice(-1)):"\\".concat(p),this.options.pedantic&&(p=v?p:"[*+-]");for(var y=new RegExp("^( {0,3}".concat(p,")((?:[\t ][^\\n]*)?(?:\\n|$))"));e&&(h=!1,t=y.exec(e))&&!this.rules.block.hr.test(e);){if(n=t[0],e=e.substring(n.length),c=t[2].split("\n",1)[0],s=e.split("\n",1)[0],this.options.pedantic?(o=2,d=c.trimLeft()):(o=(o=t[2].search(/[^ ]/))>4?1:o,d=c.slice(o),o+=t[1].length),u=!1,!c&&/^ *$/.test(s)&&(n+=s+"\n",e=e.substring(s.length+1),h=!0),!h)for(var g=new RegExp("^ {0,".concat(Math.min(3,o-1),"}(?:[*+-]|\\d{1,9}[.)])((?: [^\\n]*)?(?:\\n|$))")),_=new RegExp("^ {0,".concat(Math.min(3,o-1),"}((?:- *){3,}|(?:_ *){3,}|(?:\\* *){3,})(?:\\n+|$)")),b=new RegExp("^ {0,".concat(Math.min(3,o-1),"}(?:```|~~~)")),D=new RegExp("^ {0,".concat(Math.min(3,o-1),"}#"));e&&(c=f=e.split("\n",1)[0],this.options.pedantic&&(c=c.replace(/^ {1,4}(?=( {4})*[^ ])/g," ")),!b.test(c))&&!D.test(c)&&!g.test(c)&&!_.test(e);){if(c.search(/[^ ]/)>=o||!c.trim())d+="\n"+c.slice(o);else{if(u)break;d+="\n"+c}u||c.trim()||(u=!0),n+=f+"\n",e=e.substring(f.length+1)}m.loose||(l?m.loose=!0:/\n *\n *$/.test(n)&&(l=!0)),this.options.gfm&&(r=/^\[[ xX]\] /.exec(d))&&(i="[ ] "!==r[0],d=d.replace(/^\[[ xX]\] +/,"")),m.items.push({type:"list_item",raw:n,task:!!r,checked:i,loose:!1,text:d}),m.raw+=n}m.items[m.items.length-1].raw=n.trimRight(),m.items[m.items.length-1].text=d.trimRight(),m.raw=m.raw.trimRight();var w=m.items.length;for(a=0;a1)return!0}}catch(i){r.e(i)}finally{r.f()}return!1}));!m.loose&&x.length&&k&&(m.loose=!0,m.items[a].loose=!0)}return m}}},{key:"html",value:function(e){var t=this.rules.block.html.exec(e);if(t){var n={type:"html",raw:t[0],pre:!this.options.sanitizer&&("pre"===t[1]||"script"===t[1]||"style"===t[1]),text:t[0]};if(this.options.sanitize){var r=this.options.sanitizer?this.options.sanitizer(t[0]):Ws(t[0]);n.type="paragraph",n.text=r,n.tokens=this.lexer.inline(r)}return n}}},{key:"def",value:function(e){var t=this.rules.block.def.exec(e);if(t)return t[3]&&(t[3]=t[3].substring(1,t[3].length-1)),{type:"def",tag:t[1].toLowerCase().replace(/\s+/g," "),raw:t[0],href:t[2]?t[2].replace(this.rules.inline._escapes,"$1"):t[2],title:t[3]?t[3].replace(this.rules.inline._escapes,"$1"):t[3]}}},{key:"table",value:function(e){var t=this.rules.block.table.exec(e);if(t){var n={type:"table",header:lf(t[1]).map((function(e){return{text:e}})),align:t[2].replace(/^ *|\| *$/g,"").split(/ *\| */),rows:t[3]&&t[3].trim()?t[3].replace(/\n[ \t]*$/,"").split("\n"):[]};if(n.header.length===n.align.length){n.raw=t[0];var r,i,o,a,u=n.align.length;for(r=0;r/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:this.options.sanitize?"text":"html",raw:t[0],inLink:this.lexer.state.inLink,inRawBlock:this.lexer.state.inRawBlock,text:this.options.sanitize?this.options.sanitizer?this.options.sanitizer(t[0]):Ws(t[0]):t[0]}}},{key:"link",value:function(e){var t=this.rules.inline.link.exec(e);if(t){var n=t[2].trim();if(!this.options.pedantic&&/^$/.test(n))return;var r=cf(n.slice(0,-1),"\\");if((n.length-r.length)%2===0)return}else{var i=function(e,t){if(-1===e.indexOf(t[1]))return-1;for(var n=e.length,r=0,i=0;i-1){var o=(0===t[0].indexOf("!")?5:4)+t[1].length+i;t[2]=t[2].substring(0,i),t[0]=t[0].substring(0,o).trim(),t[3]=""}}var a=t[2],u="";if(this.options.pedantic){var l=/^([^'"]*[^\s])\s+(['"])(.*)\2/.exec(a);l&&(a=l[1],u=l[3])}else u=t[3]?t[3].slice(1,-1):"";return a=a.trim(),/^$/.test(n)?a.slice(1):a.slice(1,-1)),df(t,{href:a?a.replace(this.rules.inline._escapes,"$1"):a,title:u?u.replace(this.rules.inline._escapes,"$1"):u},t[0],this.lexer)}}},{key:"reflink",value:function(e,t){var n;if((n=this.rules.inline.reflink.exec(e))||(n=this.rules.inline.nolink.exec(e))){var r=(n[2]||n[1]).replace(/\s+/g," ");if(!(r=t[r.toLowerCase()])||!r.href){var i=n[0].charAt(0);return{type:"text",raw:i,text:i}}return df(n,r,n[0],this.lexer)}}},{key:"emStrong",value:function(e,t){var n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:"",r=this.rules.inline.emStrong.lDelim.exec(e);if(r&&(!r[3]||!n.match(/(?:[0-9A-Za-z\xAA\xB2\xB3\xB5\xB9\xBA\xBC-\xBE\xC0-\xD6\xD8-\xF6\xF8-\u02C1\u02C6-\u02D1\u02E0-\u02E4\u02EC\u02EE\u0370-\u0374\u0376\u0377\u037A-\u037D\u037F\u0386\u0388-\u038A\u038C\u038E-\u03A1\u03A3-\u03F5\u03F7-\u0481\u048A-\u052F\u0531-\u0556\u0559\u0560-\u0588\u05D0-\u05EA\u05EF-\u05F2\u0620-\u064A\u0660-\u0669\u066E\u066F\u0671-\u06D3\u06D5\u06E5\u06E6\u06EE-\u06FC\u06FF\u0710\u0712-\u072F\u074D-\u07A5\u07B1\u07C0-\u07EA\u07F4\u07F5\u07FA\u0800-\u0815\u081A\u0824\u0828\u0840-\u0858\u0860-\u086A\u0870-\u0887\u0889-\u088E\u08A0-\u08C9\u0904-\u0939\u093D\u0950\u0958-\u0961\u0966-\u096F\u0971-\u0980\u0985-\u098C\u098F\u0990\u0993-\u09A8\u09AA-\u09B0\u09B2\u09B6-\u09B9\u09BD\u09CE\u09DC\u09DD\u09DF-\u09E1\u09E6-\u09F1\u09F4-\u09F9\u09FC\u0A05-\u0A0A\u0A0F\u0A10\u0A13-\u0A28\u0A2A-\u0A30\u0A32\u0A33\u0A35\u0A36\u0A38\u0A39\u0A59-\u0A5C\u0A5E\u0A66-\u0A6F\u0A72-\u0A74\u0A85-\u0A8D\u0A8F-\u0A91\u0A93-\u0AA8\u0AAA-\u0AB0\u0AB2\u0AB3\u0AB5-\u0AB9\u0ABD\u0AD0\u0AE0\u0AE1\u0AE6-\u0AEF\u0AF9\u0B05-\u0B0C\u0B0F\u0B10\u0B13-\u0B28\u0B2A-\u0B30\u0B32\u0B33\u0B35-\u0B39\u0B3D\u0B5C\u0B5D\u0B5F-\u0B61\u0B66-\u0B6F\u0B71-\u0B77\u0B83\u0B85-\u0B8A\u0B8E-\u0B90\u0B92-\u0B95\u0B99\u0B9A\u0B9C\u0B9E\u0B9F\u0BA3\u0BA4\u0BA8-\u0BAA\u0BAE-\u0BB9\u0BD0\u0BE6-\u0BF2\u0C05-\u0C0C\u0C0E-\u0C10\u0C12-\u0C28\u0C2A-\u0C39\u0C3D\u0C58-\u0C5A\u0C5D\u0C60\u0C61\u0C66-\u0C6F\u0C78-\u0C7E\u0C80\u0C85-\u0C8C\u0C8E-\u0C90\u0C92-\u0CA8\u0CAA-\u0CB3\u0CB5-\u0CB9\u0CBD\u0CDD\u0CDE\u0CE0\u0CE1\u0CE6-\u0CEF\u0CF1\u0CF2\u0D04-\u0D0C\u0D0E-\u0D10\u0D12-\u0D3A\u0D3D\u0D4E\u0D54-\u0D56\u0D58-\u0D61\u0D66-\u0D78\u0D7A-\u0D7F\u0D85-\u0D96\u0D9A-\u0DB1\u0DB3-\u0DBB\u0DBD\u0DC0-\u0DC6\u0DE6-\u0DEF\u0E01-\u0E30\u0E32\u0E33\u0E40-\u0E46\u0E50-\u0E59\u0E81\u0E82\u0E84\u0E86-\u0E8A\u0E8C-\u0EA3\u0EA5\u0EA7-\u0EB0\u0EB2\u0EB3\u0EBD\u0EC0-\u0EC4\u0EC6\u0ED0-\u0ED9\u0EDC-\u0EDF\u0F00\u0F20-\u0F33\u0F40-\u0F47\u0F49-\u0F6C\u0F88-\u0F8C\u1000-\u102A\u103F-\u1049\u1050-\u1055\u105A-\u105D\u1061\u1065\u1066\u106E-\u1070\u1075-\u1081\u108E\u1090-\u1099\u10A0-\u10C5\u10C7\u10CD\u10D0-\u10FA\u10FC-\u1248\u124A-\u124D\u1250-\u1256\u1258\u125A-\u125D\u1260-\u1288\u128A-\u128D\u1290-\u12B0\u12B2-\u12B5\u12B8-\u12BE\u12C0\u12C2-\u12C5\u12C8-\u12D6\u12D8-\u1310\u1312-\u1315\u1318-\u135A\u1369-\u137C\u1380-\u138F\u13A0-\u13F5\u13F8-\u13FD\u1401-\u166C\u166F-\u167F\u1681-\u169A\u16A0-\u16EA\u16EE-\u16F8\u1700-\u1711\u171F-\u1731\u1740-\u1751\u1760-\u176C\u176E-\u1770\u1780-\u17B3\u17D7\u17DC\u17E0-\u17E9\u17F0-\u17F9\u1810-\u1819\u1820-\u1878\u1880-\u1884\u1887-\u18A8\u18AA\u18B0-\u18F5\u1900-\u191E\u1946-\u196D\u1970-\u1974\u1980-\u19AB\u19B0-\u19C9\u19D0-\u19DA\u1A00-\u1A16\u1A20-\u1A54\u1A80-\u1A89\u1A90-\u1A99\u1AA7\u1B05-\u1B33\u1B45-\u1B4C\u1B50-\u1B59\u1B83-\u1BA0\u1BAE-\u1BE5\u1C00-\u1C23\u1C40-\u1C49\u1C4D-\u1C7D\u1C80-\u1C88\u1C90-\u1CBA\u1CBD-\u1CBF\u1CE9-\u1CEC\u1CEE-\u1CF3\u1CF5\u1CF6\u1CFA\u1D00-\u1DBF\u1E00-\u1F15\u1F18-\u1F1D\u1F20-\u1F45\u1F48-\u1F4D\u1F50-\u1F57\u1F59\u1F5B\u1F5D\u1F5F-\u1F7D\u1F80-\u1FB4\u1FB6-\u1FBC\u1FBE\u1FC2-\u1FC4\u1FC6-\u1FCC\u1FD0-\u1FD3\u1FD6-\u1FDB\u1FE0-\u1FEC\u1FF2-\u1FF4\u1FF6-\u1FFC\u2070\u2071\u2074-\u2079\u207F-\u2089\u2090-\u209C\u2102\u2107\u210A-\u2113\u2115\u2119-\u211D\u2124\u2126\u2128\u212A-\u212D\u212F-\u2139\u213C-\u213F\u2145-\u2149\u214E\u2150-\u2189\u2460-\u249B\u24EA-\u24FF\u2776-\u2793\u2C00-\u2CE4\u2CEB-\u2CEE\u2CF2\u2CF3\u2CFD\u2D00-\u2D25\u2D27\u2D2D\u2D30-\u2D67\u2D6F\u2D80-\u2D96\u2DA0-\u2DA6\u2DA8-\u2DAE\u2DB0-\u2DB6\u2DB8-\u2DBE\u2DC0-\u2DC6\u2DC8-\u2DCE\u2DD0-\u2DD6\u2DD8-\u2DDE\u2E2F\u3005-\u3007\u3021-\u3029\u3031-\u3035\u3038-\u303C\u3041-\u3096\u309D-\u309F\u30A1-\u30FA\u30FC-\u30FF\u3105-\u312F\u3131-\u318E\u3192-\u3195\u31A0-\u31BF\u31F0-\u31FF\u3220-\u3229\u3248-\u324F\u3251-\u325F\u3280-\u3289\u32B1-\u32BF\u3400-\u4DBF\u4E00-\uA48C\uA4D0-\uA4FD\uA500-\uA60C\uA610-\uA62B\uA640-\uA66E\uA67F-\uA69D\uA6A0-\uA6EF\uA717-\uA71F\uA722-\uA788\uA78B-\uA7CA\uA7D0\uA7D1\uA7D3\uA7D5-\uA7D9\uA7F2-\uA801\uA803-\uA805\uA807-\uA80A\uA80C-\uA822\uA830-\uA835\uA840-\uA873\uA882-\uA8B3\uA8D0-\uA8D9\uA8F2-\uA8F7\uA8FB\uA8FD\uA8FE\uA900-\uA925\uA930-\uA946\uA960-\uA97C\uA984-\uA9B2\uA9CF-\uA9D9\uA9E0-\uA9E4\uA9E6-\uA9FE\uAA00-\uAA28\uAA40-\uAA42\uAA44-\uAA4B\uAA50-\uAA59\uAA60-\uAA76\uAA7A\uAA7E-\uAAAF\uAAB1\uAAB5\uAAB6\uAAB9-\uAABD\uAAC0\uAAC2\uAADB-\uAADD\uAAE0-\uAAEA\uAAF2-\uAAF4\uAB01-\uAB06\uAB09-\uAB0E\uAB11-\uAB16\uAB20-\uAB26\uAB28-\uAB2E\uAB30-\uAB5A\uAB5C-\uAB69\uAB70-\uABE2\uABF0-\uABF9\uAC00-\uD7A3\uD7B0-\uD7C6\uD7CB-\uD7FB\uF900-\uFA6D\uFA70-\uFAD9\uFB00-\uFB06\uFB13-\uFB17\uFB1D\uFB1F-\uFB28\uFB2A-\uFB36\uFB38-\uFB3C\uFB3E\uFB40\uFB41\uFB43\uFB44\uFB46-\uFBB1\uFBD3-\uFD3D\uFD50-\uFD8F\uFD92-\uFDC7\uFDF0-\uFDFB\uFE70-\uFE74\uFE76-\uFEFC\uFF10-\uFF19\uFF21-\uFF3A\uFF41-\uFF5A\uFF66-\uFFBE\uFFC2-\uFFC7\uFFCA-\uFFCF\uFFD2-\uFFD7\uFFDA-\uFFDC]|\uD800[\uDC00-\uDC0B\uDC0D-\uDC26\uDC28-\uDC3A\uDC3C\uDC3D\uDC3F-\uDC4D\uDC50-\uDC5D\uDC80-\uDCFA\uDD07-\uDD33\uDD40-\uDD78\uDD8A\uDD8B\uDE80-\uDE9C\uDEA0-\uDED0\uDEE1-\uDEFB\uDF00-\uDF23\uDF2D-\uDF4A\uDF50-\uDF75\uDF80-\uDF9D\uDFA0-\uDFC3\uDFC8-\uDFCF\uDFD1-\uDFD5]|\uD801[\uDC00-\uDC9D\uDCA0-\uDCA9\uDCB0-\uDCD3\uDCD8-\uDCFB\uDD00-\uDD27\uDD30-\uDD63\uDD70-\uDD7A\uDD7C-\uDD8A\uDD8C-\uDD92\uDD94\uDD95\uDD97-\uDDA1\uDDA3-\uDDB1\uDDB3-\uDDB9\uDDBB\uDDBC\uDE00-\uDF36\uDF40-\uDF55\uDF60-\uDF67\uDF80-\uDF85\uDF87-\uDFB0\uDFB2-\uDFBA]|\uD802[\uDC00-\uDC05\uDC08\uDC0A-\uDC35\uDC37\uDC38\uDC3C\uDC3F-\uDC55\uDC58-\uDC76\uDC79-\uDC9E\uDCA7-\uDCAF\uDCE0-\uDCF2\uDCF4\uDCF5\uDCFB-\uDD1B\uDD20-\uDD39\uDD80-\uDDB7\uDDBC-\uDDCF\uDDD2-\uDE00\uDE10-\uDE13\uDE15-\uDE17\uDE19-\uDE35\uDE40-\uDE48\uDE60-\uDE7E\uDE80-\uDE9F\uDEC0-\uDEC7\uDEC9-\uDEE4\uDEEB-\uDEEF\uDF00-\uDF35\uDF40-\uDF55\uDF58-\uDF72\uDF78-\uDF91\uDFA9-\uDFAF]|\uD803[\uDC00-\uDC48\uDC80-\uDCB2\uDCC0-\uDCF2\uDCFA-\uDD23\uDD30-\uDD39\uDE60-\uDE7E\uDE80-\uDEA9\uDEB0\uDEB1\uDF00-\uDF27\uDF30-\uDF45\uDF51-\uDF54\uDF70-\uDF81\uDFB0-\uDFCB\uDFE0-\uDFF6]|\uD804[\uDC03-\uDC37\uDC52-\uDC6F\uDC71\uDC72\uDC75\uDC83-\uDCAF\uDCD0-\uDCE8\uDCF0-\uDCF9\uDD03-\uDD26\uDD36-\uDD3F\uDD44\uDD47\uDD50-\uDD72\uDD76\uDD83-\uDDB2\uDDC1-\uDDC4\uDDD0-\uDDDA\uDDDC\uDDE1-\uDDF4\uDE00-\uDE11\uDE13-\uDE2B\uDE3F\uDE40\uDE80-\uDE86\uDE88\uDE8A-\uDE8D\uDE8F-\uDE9D\uDE9F-\uDEA8\uDEB0-\uDEDE\uDEF0-\uDEF9\uDF05-\uDF0C\uDF0F\uDF10\uDF13-\uDF28\uDF2A-\uDF30\uDF32\uDF33\uDF35-\uDF39\uDF3D\uDF50\uDF5D-\uDF61]|\uD805[\uDC00-\uDC34\uDC47-\uDC4A\uDC50-\uDC59\uDC5F-\uDC61\uDC80-\uDCAF\uDCC4\uDCC5\uDCC7\uDCD0-\uDCD9\uDD80-\uDDAE\uDDD8-\uDDDB\uDE00-\uDE2F\uDE44\uDE50-\uDE59\uDE80-\uDEAA\uDEB8\uDEC0-\uDEC9\uDF00-\uDF1A\uDF30-\uDF3B\uDF40-\uDF46]|\uD806[\uDC00-\uDC2B\uDCA0-\uDCF2\uDCFF-\uDD06\uDD09\uDD0C-\uDD13\uDD15\uDD16\uDD18-\uDD2F\uDD3F\uDD41\uDD50-\uDD59\uDDA0-\uDDA7\uDDAA-\uDDD0\uDDE1\uDDE3\uDE00\uDE0B-\uDE32\uDE3A\uDE50\uDE5C-\uDE89\uDE9D\uDEB0-\uDEF8]|\uD807[\uDC00-\uDC08\uDC0A-\uDC2E\uDC40\uDC50-\uDC6C\uDC72-\uDC8F\uDD00-\uDD06\uDD08\uDD09\uDD0B-\uDD30\uDD46\uDD50-\uDD59\uDD60-\uDD65\uDD67\uDD68\uDD6A-\uDD89\uDD98\uDDA0-\uDDA9\uDEE0-\uDEF2\uDF02\uDF04-\uDF10\uDF12-\uDF33\uDF50-\uDF59\uDFB0\uDFC0-\uDFD4]|\uD808[\uDC00-\uDF99]|\uD809[\uDC00-\uDC6E\uDC80-\uDD43]|\uD80B[\uDF90-\uDFF0]|[\uD80C\uD81C-\uD820\uD822\uD840-\uD868\uD86A-\uD86C\uD86F-\uD872\uD874-\uD879\uD880-\uD883\uD885-\uD887][\uDC00-\uDFFF]|\uD80D[\uDC00-\uDC2F\uDC41-\uDC46]|\uD811[\uDC00-\uDE46]|\uD81A[\uDC00-\uDE38\uDE40-\uDE5E\uDE60-\uDE69\uDE70-\uDEBE\uDEC0-\uDEC9\uDED0-\uDEED\uDF00-\uDF2F\uDF40-\uDF43\uDF50-\uDF59\uDF5B-\uDF61\uDF63-\uDF77\uDF7D-\uDF8F]|\uD81B[\uDE40-\uDE96\uDF00-\uDF4A\uDF50\uDF93-\uDF9F\uDFE0\uDFE1\uDFE3]|\uD821[\uDC00-\uDFF7]|\uD823[\uDC00-\uDCD5\uDD00-\uDD08]|\uD82B[\uDFF0-\uDFF3\uDFF5-\uDFFB\uDFFD\uDFFE]|\uD82C[\uDC00-\uDD22\uDD32\uDD50-\uDD52\uDD55\uDD64-\uDD67\uDD70-\uDEFB]|\uD82F[\uDC00-\uDC6A\uDC70-\uDC7C\uDC80-\uDC88\uDC90-\uDC99]|\uD834[\uDEC0-\uDED3\uDEE0-\uDEF3\uDF60-\uDF78]|\uD835[\uDC00-\uDC54\uDC56-\uDC9C\uDC9E\uDC9F\uDCA2\uDCA5\uDCA6\uDCA9-\uDCAC\uDCAE-\uDCB9\uDCBB\uDCBD-\uDCC3\uDCC5-\uDD05\uDD07-\uDD0A\uDD0D-\uDD14\uDD16-\uDD1C\uDD1E-\uDD39\uDD3B-\uDD3E\uDD40-\uDD44\uDD46\uDD4A-\uDD50\uDD52-\uDEA5\uDEA8-\uDEC0\uDEC2-\uDEDA\uDEDC-\uDEFA\uDEFC-\uDF14\uDF16-\uDF34\uDF36-\uDF4E\uDF50-\uDF6E\uDF70-\uDF88\uDF8A-\uDFA8\uDFAA-\uDFC2\uDFC4-\uDFCB\uDFCE-\uDFFF]|\uD837[\uDF00-\uDF1E\uDF25-\uDF2A]|\uD838[\uDC30-\uDC6D\uDD00-\uDD2C\uDD37-\uDD3D\uDD40-\uDD49\uDD4E\uDE90-\uDEAD\uDEC0-\uDEEB\uDEF0-\uDEF9]|\uD839[\uDCD0-\uDCEB\uDCF0-\uDCF9\uDFE0-\uDFE6\uDFE8-\uDFEB\uDFED\uDFEE\uDFF0-\uDFFE]|\uD83A[\uDC00-\uDCC4\uDCC7-\uDCCF\uDD00-\uDD43\uDD4B\uDD50-\uDD59]|\uD83B[\uDC71-\uDCAB\uDCAD-\uDCAF\uDCB1-\uDCB4\uDD01-\uDD2D\uDD2F-\uDD3D\uDE00-\uDE03\uDE05-\uDE1F\uDE21\uDE22\uDE24\uDE27\uDE29-\uDE32\uDE34-\uDE37\uDE39\uDE3B\uDE42\uDE47\uDE49\uDE4B\uDE4D-\uDE4F\uDE51\uDE52\uDE54\uDE57\uDE59\uDE5B\uDE5D\uDE5F\uDE61\uDE62\uDE64\uDE67-\uDE6A\uDE6C-\uDE72\uDE74-\uDE77\uDE79-\uDE7C\uDE7E\uDE80-\uDE89\uDE8B-\uDE9B\uDEA1-\uDEA3\uDEA5-\uDEA9\uDEAB-\uDEBB]|\uD83C[\uDD00-\uDD0C]|\uD83E[\uDFF0-\uDFF9]|\uD869[\uDC00-\uDEDF\uDF00-\uDFFF]|\uD86D[\uDC00-\uDF39\uDF40-\uDFFF]|\uD86E[\uDC00-\uDC1D\uDC20-\uDFFF]|\uD873[\uDC00-\uDEA1\uDEB0-\uDFFF]|\uD87A[\uDC00-\uDFE0]|\uD87E[\uDC00-\uDE1D]|\uD884[\uDC00-\uDF4A\uDF50-\uDFFF]|\uD888[\uDC00-\uDFAF])/))){var i=r[1]||r[2]||"";if(!i||i&&(""===n||this.rules.inline.punctuation.exec(n))){var o,a,u=r[0].length-1,l=u,c=0,s="*"===r[0][0]?this.rules.inline.emStrong.rDelimAst:this.rules.inline.emStrong.rDelimUnd;for(s.lastIndex=0,t=t.slice(-1*e.length+u);null!=(r=s.exec(t));)if(o=r[1]||r[2]||r[3]||r[4]||r[5]||r[6])if(a=o.length,r[3]||r[4])l+=a;else if(!((r[5]||r[6])&&u%3)||(u+a)%3){if(!((l-=a)>0)){a=Math.min(a,a+l+c);var f=e.slice(0,u+r.index+(r[0].length-o.length)+a);if(Math.min(u,a)%2){var d=f.slice(1,-1);return{type:"em",raw:f,text:d,tokens:this.lexer.inlineTokens(d)}}var h=f.slice(2,-2);return{type:"strong",raw:f,text:h,tokens:this.lexer.inlineTokens(h)}}}else c+=a}}}},{key:"codespan",value:function(e){var t=this.rules.inline.code.exec(e);if(t){var n=t[2].replace(/\n/g," "),r=/[^ ]/.test(n),i=/^ /.test(n)&&/ $/.test(n);return r&&i&&(n=n.substring(1,n.length-1)),n=Ws(n,!0),{type:"codespan",raw:t[0],text:n}}}},{key:"br",value:function(e){var t=this.rules.inline.br.exec(e);if(t)return{type:"br",raw:t[0]}}},{key:"del",value:function(e){var t=this.rules.inline.del.exec(e);if(t)return{type:"del",raw:t[0],text:t[2],tokens:this.lexer.inlineTokens(t[2])}}},{key:"autolink",value:function(e,t){var n,r,i=this.rules.inline.autolink.exec(e);if(i)return r="@"===i[2]?"mailto:"+(n=Ws(this.options.mangle?t(i[1]):i[1])):n=Ws(i[1]),{type:"link",raw:i[0],text:n,href:r,tokens:[{type:"text",raw:n,text:n}]}}},{key:"url",value:function(e,t){var n;if(n=this.rules.inline.url.exec(e)){var r,i;if("@"===n[2])i="mailto:"+(r=Ws(this.options.mangle?t(n[0]):n[0]));else{var o;do{o=n[0],n[0]=this.rules.inline._backpedal.exec(n[0])[0]}while(o!==n[0]);r=Ws(n[0]),i="www."===n[1]?"http://"+r:r}return{type:"link",raw:n[0],text:r,href:i,tokens:[{type:"text",raw:r,text:r}]}}}},{key:"inlineText",value:function(e,t){var n,r=this.rules.inline.text.exec(e);if(r)return n=this.lexer.state.inRawBlock?this.options.sanitize?this.options.sanitizer?this.options.sanitizer(r[0]):Ws(r[0]):r[0]:Ws(this.options.smartypants?t(r[0]):r[0]),{type:"text",raw:r[0],text:n}}}]),e}(),pf={newline:/^(?: *(?:\n|$))+/,code:/^( {4}[^\n]+(?:\n(?: *(?:\n|$))*)?)+/,fences:/^ {0,3}(`{3,}(?=[^`\n]*\n)|~{3,})([^\n]*)\n(?:|([\s\S]*?)\n)(?: {0,3}\1[~`]* *(?=\n|$)|$)/,hr:/^ {0,3}((?:-[\t ]*){3,}|(?:_[ \t]*){3,}|(?:\*[ \t]*){3,})(?:\n+|$)/,heading:/^ {0,3}(#{1,6})(?=\s|$)(.*)(?:\n+|$)/,blockquote:/^( {0,3}> ?(paragraph|[^\n]*)(?:\n|$))+/,list:/^( {0,3}bull)([ \t][^\n]+?)?(?:\n|$)/,html:"^ {0,3}(?:<(script|pre|style|textarea)[\\s>][\\s\\S]*?(?:[^\\n]*\\n+|$)|comment[^\\n]*(\\n+|$)|<\\?[\\s\\S]*?(?:\\?>\\n*|$)|\\n*|$)|\\n*|$)|)[\\s\\S]*?(?:(?:\\n *)+\\n|$)|<(?!script|pre|style|textarea)([a-z][\\w-]*)(?:attribute)*? */?>(?=[ \\t]*(?:\\n|$))[\\s\\S]*?(?:(?:\\n *)+\\n|$)|(?=[ \\t]*(?:\\n|$))[\\s\\S]*?(?:(?:\\n *)+\\n|$))",def:/^ {0,3}\[(label)\]: *(?:\n *)?]+)>?(?:(?: +(?:\n *)?| *\n *)(title))? *(?:\n+|$)/,table:af,lheading:/^([^\n]+)\n {0,3}(=+|-+) *(?:\n+|$)/,_paragraph:/^([^\n]+(?:\n(?!hr|heading|lheading|blockquote|fences|list|html|table| +\n)[^\n]+)*)/,text:/^[^\n]+/,_label:/(?!\s*\])(?:\\.|[^\[\]\\])+/,_title:/(?:"(?:\\"?|[^"\\])*"|'[^'\n]*(?:\n[^'\n]+)*\n?'|\([^()]*\))/};pf.def=Js(pf.def).replace("label",pf._label).replace("title",pf._title).getRegex(),pf.bullet=/(?:[*+-]|\d{1,9}[.)])/,pf.listItemStart=Js(/^( *)(bull) */).replace("bull",pf.bullet).getRegex(),pf.list=Js(pf.list).replace(/bull/g,pf.bullet).replace("hr","\\n+(?=\\1?(?:(?:- *){3,}|(?:_ *){3,}|(?:\\* *){3,})(?:\\n+|$))").replace("def","\\n+(?="+pf.def.source+")").getRegex(),pf._tag="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|section|source|summary|table|tbody|td|tfoot|th|thead|title|tr|track|ul",pf._comment=/|$)/,pf.html=Js(pf.html,"i").replace("comment",pf._comment).replace("tag",pf._tag).replace("attribute",/ +[a-zA-Z:_][\w.:-]*(?: *= *"[^"\n]*"| *= *'[^'\n]*'| *= *[^\s"'=<>`]+)?/).getRegex(),pf.paragraph=Js(pf._paragraph).replace("hr",pf.hr).replace("heading"," {0,3}#{1,6} ").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",pf._tag).getRegex(),pf.blockquote=Js(pf.blockquote).replace("paragraph",pf.paragraph).getRegex(),pf.normal=uf({},pf),pf.gfm=uf({},pf.normal,{table:"^ *([^\\n ].*\\|.*)\\n {0,3}(?:\\| *)?(:?-+:? *(?:\\| *:?-+:? *)*)(?:\\| *)?(?:\\n((?:(?! *\\n|hr|heading|blockquote|code|fences|list|html).*(?:\\n|$))*)\\n*|$)"}),pf.gfm.table=Js(pf.gfm.table).replace("hr",pf.hr).replace("heading"," {0,3}#{1,6} ").replace("blockquote"," {0,3}>").replace("code"," {4}[^\\n]").replace("fences"," {0,3}(?:`{3,}(?=[^`\\n]*\\n)|~{3,})[^\\n]*\\n").replace("list"," {0,3}(?:[*+-]|1[.)]) ").replace("html",")|<(?:script|pre|style|textarea|!--)").replace("tag",pf._tag).getRegex(),pf.gfm.paragraph=Js(pf._paragraph).replace("hr",pf.hr).replace("heading"," {0,3}#{1,6} ").replace("|lheading","").replace("table",pf.gfm.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",pf._tag).getRegex(),pf.pedantic=uf({},pf.normal,{html:Js("^ *(?:comment *(?:\\n|\\s*$)|<(tag)[\\s\\S]+? *(?:\\n{2,}|\\s*$)|\\s]*)*?/?> *(?:\\n{2,}|\\s*$))").replace("comment",pf._comment).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:af,paragraph:Js(pf.normal._paragraph).replace("hr",pf.hr).replace("heading"," *#{1,6} *[^\n]").replace("lheading",pf.lheading).replace("blockquote"," {0,3}>").replace("|fences","").replace("|list","").replace("|html","").getRegex()});var vf={escape:/^\\([!"#$%&'()*+,\-./:;<=>?@\[\]\\^_`{|}~])/,autolink:/^<(scheme:[^\s\x00-\x1f<>]*|email)>/,url:af,tag:"^comment|^|^<[a-zA-Z][\\w-]*(?:attribute)*?\\s*/?>|^<\\?[\\s\\S]*?\\?>|^|^",link:/^!?\[(label)\]\(\s*(href)(?:\s+(title))?\s*\)/,reflink:/^!?\[(label)\]\[(ref)\]/,nolink:/^!?\[(ref)\](?:\[\])?/,reflinkSearch:"reflink|nolink(?!\\()",emStrong:{lDelim:/^(?:\*+(?:([punct_])|[^\s*]))|^_+(?:([punct*])|([^\s_]))/,rDelimAst:/^(?:[^_*\\]|\\.)*?\_\_(?:[^_*\\]|\\.)*?\*(?:[^_*\\]|\\.)*?(?=\_\_)|(?:[^*\\]|\\.)+(?=[^*])|[punct_](\*+)(?=[\s]|$)|(?:[^punct*_\s\\]|\\.)(\*+)(?=[punct_\s]|$)|[punct_\s](\*+)(?=[^punct*_\s])|[\s](\*+)(?=[punct_])|[punct_](\*+)(?=[punct_])|(?:[^punct*_\s\\]|\\.)(\*+)(?=[^punct*_\s])/,rDelimUnd:/^(?:[^_*\\]|\\.)*?\*\*(?:[^_*\\]|\\.)*?\_(?:[^_*\\]|\\.)*?(?=\*\*)|(?:[^_\\]|\\.)+(?=[^_])|[punct*](\_+)(?=[\s]|$)|(?:[^punct*_\s\\]|\\.)(\_+)(?=[punct*\s]|$)|[punct*\s](\_+)(?=[^punct*_\s])|[\s](\_+)(?=[punct*])|[punct*](\_+)(?=[punct*])/},code:/^(`+)([^`]|[^`][\s\S]*?[^`])\1(?!`)/,br:/^( {2,}|\\)\n(?!\s*$)/,del:af,text:/^(`+|[^`])(?:(?= {2,}\n)|[\s\S]*?(?:(?=[\\.5&&(n="x"+n.toString(16)),r+="&#"+n+";";return r}vf._punctuation="!\"#$%&'()+\\-.,/:;<=>?@\\[\\]`^{|}~",vf.punctuation=Js(vf.punctuation).replace(/punctuation/g,vf._punctuation).getRegex(),vf.blockSkip=/\[[^\]]*?\]\([^\)]*?\)|`[^`]*?`|<[^>]*?>/g,vf.escapedEmSt=/(?:^|[^\\])(?:\\\\)*\\[*_]/g,vf._comment=Js(pf._comment).replace("(?:--\x3e|$)","--\x3e").getRegex(),vf.emStrong.lDelim=Js(vf.emStrong.lDelim).replace(/punct/g,vf._punctuation).getRegex(),vf.emStrong.rDelimAst=Js(vf.emStrong.rDelimAst,"g").replace(/punct/g,vf._punctuation).getRegex(),vf.emStrong.rDelimUnd=Js(vf.emStrong.rDelimUnd,"g").replace(/punct/g,vf._punctuation).getRegex(),vf._escapes=/\\([!"#$%&'()*+,\-./:;<=>?@\[\]\\^_`{|}~])/g,vf._scheme=/[a-zA-Z][a-zA-Z0-9+.-]{1,31}/,vf._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])?)+(?![-_])/,vf.autolink=Js(vf.autolink).replace("scheme",vf._scheme).replace("email",vf._email).getRegex(),vf._attribute=/\s+[a-zA-Z:_][\w.:-]*(?:\s*=\s*"[^"]*"|\s*=\s*'[^']*'|\s*=\s*[^\s"'=<>`]+)?/,vf.tag=Js(vf.tag).replace("comment",vf._comment).replace("attribute",vf._attribute).getRegex(),vf._label=/(?:\[(?:\\.|[^\[\]\\])*\]|\\.|`[^`]*`|[^\[\]\\`])*?/,vf._href=/<(?:\\.|[^\n<>\\])+>|[^\s\x00-\x1f]*/,vf._title=/"(?:\\"?|[^"\\])*"|'(?:\\'?|[^'\\])*'|\((?:\\\)?|[^)\\])*\)/,vf.link=Js(vf.link).replace("label",vf._label).replace("href",vf._href).replace("title",vf._title).getRegex(),vf.reflink=Js(vf.reflink).replace("label",vf._label).replace("ref",pf._label).getRegex(),vf.nolink=Js(vf.nolink).replace("ref",pf._label).getRegex(),vf.reflinkSearch=Js(vf.reflinkSearch,"g").replace("reflink",vf.reflink).replace("nolink",vf.nolink).getRegex(),vf.normal=uf({},vf),vf.pedantic=uf({},vf.normal,{strong:{start:/^__|\*\*/,middle:/^__(?=\S)([\s\S]*?\S)__(?!_)|^\*\*(?=\S)([\s\S]*?\S)\*\*(?!\*)/,endAst:/\*\*(?!\*)/g,endUnd:/__(?!_)/g},em:{start:/^_|\*/,middle:/^()\*(?=\S)([\s\S]*?\S)\*(?!\*)|^_(?=\S)([\s\S]*?\S)_(?!_)/,endAst:/\*(?!\*)/g,endUnd:/_(?!_)/g},link:Js(/^!?\[(label)\]\((.*?)\)/).replace("label",vf._label).getRegex(),reflink:Js(/^!?\[(label)\]\s*\[([^\]]*)\]/).replace("label",vf._label).getRegex()}),vf.gfm=uf({},vf.normal,{escape:Js(vf.escape).replace("])","~|])").getRegex(),_extended_email:/[A-Za-z0-9._+-]+(@)[a-zA-Z0-9-_]+(?:\.[a-zA-Z0-9-_]*[a-zA-Z0-9])+(?![-_])/,url:/^((?:ftp|https?):\/\/|www\.)(?:[a-zA-Z0-9\-]+\.?)+[^\s<]*|^email/,_backpedal:/(?:[^?!.,:;*_~()&]+|\([^)]*\)|&(?![a-zA-Z0-9]+;$)|[?!.,:;*_~)]+(?!$))+/,del:/^(~~?)(?=[^\s~])([\s\S]*?[^\s~])\1(?=[^~]|$)/,text:/^([`~]+|[^`~])(?:(?= {2,}\n)|(?=[a-zA-Z0-9.!#$%&'*+\/=?_`{\|}~-]+@)|[\s\S]*?(?:(?=[\\1&&void 0!==arguments[1]?arguments[1]:[];for(e=this.options.pedantic?e.replace(/\t/g," ").replace(/^ +$/gm,""):e.replace(/^( *)(\t+)/gm,(function(e,t,n){return t+" ".repeat(n.length)}));e;)if(!(this.options.extensions&&this.options.extensions.block&&this.options.extensions.block.some((function(n){return!!(t=n.call({lexer:o},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])||"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])||"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&&function(){var t=1/0,n=e.slice(1),i=void 0;o.options.extensions.startBlock.forEach((function(e){"number"===typeof(i=e.call({lexer:this},n))&&i>=0&&(t=Math.min(t,i))})),t<1/0&&t>=0&&(r=e.substring(0,t+1))}(),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])&&"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){var u="Infinite loop on byte: "+e.charCodeAt(0);if(this.options.silent){console.error(u);break}throw new Error(u)}return this.state.top=!0,a}},{key:"inline",value:function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:[];return this.inlineQueue.push({src:e,tokens:t}),t}},{key:"inlineTokens",value:function(e){var t,n,r,i,o,a,u=this,l=arguments.length>1&&void 0!==arguments[1]?arguments[1]:[],c=e;if(this.tokens.links){var s=Object.keys(this.tokens.links);if(s.length>0)for(;null!=(i=this.tokenizer.rules.inline.reflinkSearch.exec(c));)s.includes(i[0].slice(i[0].lastIndexOf("[")+1,-1))&&(c=c.slice(0,i.index)+"["+ff("a",i[0].length-2)+"]"+c.slice(this.tokenizer.rules.inline.reflinkSearch.lastIndex))}for(;null!=(i=this.tokenizer.rules.inline.blockSkip.exec(c));)c=c.slice(0,i.index)+"["+ff("a",i[0].length-2)+"]"+c.slice(this.tokenizer.rules.inline.blockSkip.lastIndex);for(;null!=(i=this.tokenizer.rules.inline.escapedEmSt.exec(c));)c=c.slice(0,i.index+i[0].length-2)+"++"+c.slice(this.tokenizer.rules.inline.escapedEmSt.lastIndex),this.tokenizer.rules.inline.escapedEmSt.lastIndex--;for(;e;)if(o||(a=""),o=!1,!(this.options.extensions&&this.options.extensions.inline&&this.options.extensions.inline.some((function(n){return!!(t=n.call({lexer:u},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])&&"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])&&"text"===t.type&&"text"===n.type?(n.raw+=t.raw,n.text+=t.text):l.push(t);else if(t=this.tokenizer.emStrong(e,c,a))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,yf))e=e.substring(t.raw.length),l.push(t);else if(this.state.inLink||!(t=this.tokenizer.url(e,yf))){if(r=e,this.options.extensions&&this.options.extensions.startInline&&function(){var t=1/0,n=e.slice(1),i=void 0;u.options.extensions.startInline.forEach((function(e){"number"===typeof(i=e.call({lexer:this},n))&&i>=0&&(t=Math.min(t,i))})),t<1/0&&t>=0&&(r=e.substring(0,t+1))}(),t=this.tokenizer.inlineText(r,mf))e=e.substring(t.raw.length),"_"!==t.raw.slice(-1)&&(a=t.raw.slice(-1)),o=!0,(n=l[l.length-1])&&"text"===n.type?(n.raw+=t.raw,n.text+=t.text):l.push(t);else if(e){var f="Infinite loop on byte: "+e.charCodeAt(0);if(this.options.silent){console.error(f);break}throw new Error(f)}}else e=e.substring(t.raw.length),l.push(t);return l}}],[{key:"rules",get:function(){return{block:pf,inline:vf}}},{key:"lex",value:function(t,n){return new e(n).lex(t)}},{key:"lexInline",value:function(t,n){return new e(n).inlineTokens(t)}}]),e}(),_f=function(){function e(t){Dt(this,e),this.options=t||js}return xt(e,[{key:"code",value:function(e,t,n){var r=(t||"").match(/\S*/)[0];if(this.options.highlight){var i=this.options.highlight(e,r);null!=i&&i!==e&&(n=!0,e=i)}return e=e.replace(/\n$/,"")+"\n",r?'
'+(n?e:Ws(e,!0))+"
\n":"
"+(n?e:Ws(e,!0))+"
\n"}},{key:"blockquote",value:function(e){return"
\n".concat(e,"
\n")}},{key:"html",value:function(e){return e}},{key:"heading",value:function(e,t,n,r){if(this.options.headerIds){var i=this.options.headerPrefix+r.slug(n);return"').concat(e,"\n")}return"").concat(e,"\n")}},{key:"hr",value:function(){return this.options.xhtml?"
\n":"
\n"}},{key:"list",value:function(e,t,n){var r=t?"ol":"ul";return"<"+r+(t&&1!==n?' start="'+n+'"':"")+">\n"+e+"\n"}},{key:"listitem",value:function(e){return"
  • ".concat(e,"
  • \n")}},{key:"checkbox",value:function(e){return" "}},{key:"paragraph",value:function(e){return"

    ".concat(e,"

    \n")}},{key:"table",value:function(e,t){return t&&(t="".concat(t,"")),"\n\n"+e+"\n"+t+"
    \n"}},{key:"tablerow",value:function(e){return"\n".concat(e,"\n")}},{key:"tablecell",value:function(e,t){var n=t.header?"th":"td";return(t.align?"<".concat(n,' align="').concat(t.align,'">'):"<".concat(n,">"))+e+"\n")}},{key:"strong",value:function(e){return"".concat(e,"")}},{key:"em",value:function(e){return"".concat(e,"")}},{key:"codespan",value:function(e){return"".concat(e,"")}},{key:"br",value:function(){return this.options.xhtml?"
    ":"
    "}},{key:"del",value:function(e){return"".concat(e,"")}},{key:"link",value:function(e,t,n){if(null===(e=ef(this.options.sanitize,this.options.baseUrl,e)))return n;var r='"}},{key:"image",value:function(e,t,n){if(null===(e=ef(this.options.sanitize,this.options.baseUrl,e)))return n;var r='').concat(n,'":">"}},{key:"text",value:function(e){return e}}]),e}(),bf=function(){function e(){Dt(this,e)}return xt(e,[{key:"strong",value:function(e){return e}},{key:"em",value:function(e){return e}},{key:"codespan",value:function(e){return e}},{key:"del",value:function(e){return e}},{key:"html",value:function(e){return e}},{key:"text",value:function(e){return e}},{key:"link",value:function(e,t,n){return""+n}},{key:"image",value:function(e,t,n){return""+n}},{key:"br",value:function(){return""}}]),e}(),Df=function(){function e(){Dt(this,e),this.seen={}}return xt(e,[{key:"serialize",value:function(e){return e.toLowerCase().trim().replace(/<[!\/a-z].*?>/gi,"").replace(/[\u2000-\u206F\u2E00-\u2E7F\\'!"#$%&()*+,./:;<=>?@[\]^`{|}~]/g,"").replace(/\s/g,"-")}},{key:"getNextSafeSlug",value:function(e,t){var n=e,r=0;if(this.seen.hasOwnProperty(n)){r=this.seen[e];do{n=e+"-"+ ++r}while(this.seen.hasOwnProperty(n))}return t||(this.seen[e]=r,this.seen[n]=0),n}},{key:"slug",value:function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},n=this.serialize(e);return this.getNextSafeSlug(n,t.dryrun)}}]),e}(),wf=function(){function e(t){Dt(this,e),this.options=t||js,this.options.renderer=this.options.renderer||new _f,this.renderer=this.options.renderer,this.renderer.options=this.options,this.textRenderer=new bf,this.slugger=new Df}return xt(e,[{key:"parse",value:function(e){var t,n,r,i,o,a,u,l,c,s,f,d,h,p,v,m,y,g,_,b=!(arguments.length>1&&void 0!==arguments[1])||arguments[1],D="",w=e.length;for(t=0;t0&&"paragraph"===v.tokens[0].type?(v.tokens[0].text=g+" "+v.tokens[0].text,v.tokens[0].tokens&&v.tokens[0].tokens.length>0&&"text"===v.tokens[0].tokens[0].type&&(v.tokens[0].tokens[0].text=g+" "+v.tokens[0].tokens[0].text)):v.tokens.unshift({type:"text",text:g}):p+=g),p+=this.parse(v.tokens,h),c+=this.renderer.listitem(p,y,m);D+=this.renderer.list(c,f,d);continue;case"html":D+=this.renderer.html(s.text);continue;case"paragraph":D+=this.renderer.paragraph(this.parseInline(s.tokens));continue;case"text":for(c=s.tokens?this.parseInline(s.tokens):s.text;t+1An error occurred:

    "+Ws(e.message+"",!0)+"
    ";throw e}try{var l=gf.lex(e,t);if(t.walkTokens){if(t.async)return Promise.all(xf.walkTokens(l,t.walkTokens)).then((function(){return wf.parse(l,t)})).catch(u);xf.walkTokens(l,t.walkTokens)}return wf.parse(l,t)}catch(c){u(c)}}xf.options=xf.setOptions=function(e){var t;return uf(xf.defaults,e),t=xf.defaults,js=t,xf},xf.getDefaults=Is,xf.defaults=js,xf.use=function(){for(var e=arguments.length,t=new Array(e),n=0;nAn error occurred:

    "+Ws(c.message+"",!0)+"
    ";throw c}},xf.Parser=wf,xf.parser=wf.parse,xf.Renderer=_f,xf.TextRenderer=bf,xf.Lexer=gf,xf.lexer=gf.lex,xf.Tokenizer=hf,xf.Slugger=Df,xf.parse=xf;xf.options,xf.setOptions,xf.use,xf.walkTokens,xf.parseInline,wf.parse,gf.lex;var kf=function(e){var t=e.title,n=e.description,r=e.unit,i=e.expr,o=e.showLegend,a=e.filename,u=e.alias,l=Wr().period,c=Qr(),s=re(null),f=_t(X(!0),2),d=f[0],h=f[1],p=_t(X(l.step||1),2),v=p[0],y=p[1],g=_t(X({limits:{enable:!1,range:{1:[0,0]}}}),2),_=g[0],b=g[1],D=oe((function(){return Array.isArray(i)&&i.every((function(e){return e}))}),[i]),w=bs({predefinedQuery:D?i:[],display:"chart",visible:d,customStep:v}),x=w.isLoading,k=w.graphData,C=w.error,E=w.warning,A=function(e){var t=Kn({},_);t.limits.range=e,b(t)};if(te((function(){var e=new IntersectionObserver((function(e){e.forEach((function(e){return h(e.isIntersecting)}))}),{threshold:.1});return s.current&&e.observe(s.current),function(){s.current&&e.unobserve(s.current)}}),[]),!D)return fr(ro,{variant:"error",children:[fr("code",{children:'"expr"'})," not found. Check the configuration file ",fr("b",{children:a}),"."]});var S=function(){return fr("div",{className:"vm-predefined-panel-header__description vm-default-styles",children:[n&&fr(m,{children:[fr("div",{children:[fr("span",{children:"Description:"}),fr("div",{dangerouslySetInnerHTML:{__html:xf.parse(n)}})]}),fr("hr",{})]}),fr("div",{children:[fr("span",{children:"Queries:"}),fr("div",{children:i.map((function(e,t){return fr("div",{children:e},"".concat(t,"_").concat(e))}))})]})]})};return fr("div",{className:"vm-predefined-panel",ref:s,children:[fr("div",{className:"vm-predefined-panel-header",children:[fr(co,{title:fr(S,{}),children:fr("div",{className:"vm-predefined-panel-header__info",children:fr(li,{})})}),fr("h3",{className:"vm-predefined-panel-header__title",children:t||""}),fr("div",{className:"vm-predefined-panel-header__step",children:fr(ss,{defaultStep:l.step,setStep:y})}),fr(ks,{yaxis:_,setYaxisLimits:A,toggleEnableLimits:function(){var e=Kn({},_);e.limits.enable=!e.limits.enable,b(e)}})]}),fr("div",{className:"vm-predefined-panel-body",children:[x&&fr(Cs,{}),C&&fr(ro,{variant:"error",children:C}),E&&fr(ro,{variant:"warning",children:E}),k&&fr(as,{data:k,period:l,customStep:v,query:i,yaxis:_,unit:r,alias:u,showLegend:o,setYaxisLimits:A,setPeriod:function(e){var t=e.from,n=e.to;c({type:"SET_PERIOD",payload:{from:t,to:n}})},fullWidth:!1})]})]})},Cf=function(e){var t=e.defaultExpanded,n=void 0!==t&&t,r=e.onChange,i=e.title,o=e.children,a=_t(X(n),2),u=a[0],l=a[1];return te((function(){r&&r(u)}),[u]),fr(m,{children:[fr("header",{className:"vm-accordion-header ".concat(u&&"vm-accordion-header_open"),onClick:function(){l((function(e){return!e}))},children:[i,fr("div",{className:"vm-accordion-header__arrow ".concat(u&&"vm-accordion-header__arrow_open"),children:fr(hi,{})})]}),u&&fr("section",{className:"vm-accordion-section",children:o},"content")]})},Ef=function(e){var t=e.index,n=e.title,r=e.panels,i=e.filename,o=po(document.body),a=oe((function(){return o.width/12}),[o]),u=_t(X(!t),2),l=u[0],c=u[1],s=_t(X([]),2),f=s[0],d=s[1];te((function(){d(r&&r.map((function(e){return e.width||12})))}),[r]);var h=_t(X({start:0,target:0,enable:!1}),2),p=h[0],v=h[1],m=function(e){if(p.enable){var t=p.start,n=Math.ceil((t-e.clientX)/a);if(!(Math.abs(n)>=12)){var r=f.map((function(e,t){return e-(t===p.target?n:0)}));d(r)}}},y=function(){v(Kn(Kn({},p),{},{enable:!1}))},g=function(e){return function(t){!function(e,t){v({start:e.clientX,target:t,enable:!0})}(t,e)}};return te((function(){return window.addEventListener("mousemove",m),window.addEventListener("mouseup",y),function(){window.removeEventListener("mousemove",m),window.removeEventListener("mouseup",y)}}),[p]),fr("div",{className:"vm-predefined-dashboard",children:fr(Cf,{defaultExpanded:l,onChange:function(e){return c(e)},title:fr((function(){return fr("div",{className:Fi()({"vm-predefined-dashboard-header":!0,"vm-predefined-dashboard-header_open":l}),children:[(n||i)&&fr("span",{className:"vm-predefined-dashboard-header__title",children:n||"".concat(t+1,". ").concat(i)}),r&&fr("span",{className:"vm-predefined-dashboard-header__count",children:["(",r.length," panels)"]})]})}),{}),children:fr("div",{className:"vm-predefined-dashboard-panels",children:Array.isArray(r)&&r.length?r.map((function(e,t){return fr("div",{className:"vm-predefined-dashboard-panels-panel vm-block vm-block_empty-padding",style:{gridColumn:"span ".concat(f[t])},children:[fr(kf,{title:e.title,description:e.description,unit:e.unit,expr:e.expr,alias:e.alias,filename:i,showLegend:e.showLegend}),fr("button",{className:"vm-predefined-dashboard-panels-panel__resizer",onMouseDown:g(t)})]},t)})):fr("div",{className:"vm-predefined-dashboard-panels-panel__alert",children:fr(ro,{variant:"error",children:[fr("code",{children:'"panels"'})," not found. Check the configuration file ",fr("b",{children:i}),"."]})})})})})},Af=function(){!function(){var e=Wr(),t=e.duration,n=e.relativeTime,r=e.period,i=r.date,o=r.step,a=function(){var e,r=Ms((qn(e={},"g0.range_input",t),qn(e,"g0.end_input",i),qn(e,"g0.step_input",o),qn(e,"g0.relative_time",n),e));ar(r)};te(a,[t,n,i,o]),te(a,[])}();var e=_t(X([]),2),t=e[0],n=e[1],r=_t(X("0"),2),i=r[0],o=r[1],a=oe((function(){return t.map((function(e,t){return{label:e.title||"",value:"".concat(t),className:"vm-predefined-panels-tabs__tab"}}))}),[t]),u=oe((function(){return t[+i]||{}}),[t,i]),l=oe((function(){return null===u||void 0===u?void 0:u.rows}),[u]),c=oe((function(){return u.title||u.filename||""}),[u]),s=oe((function(){return Array.isArray(l)&&!!l.length}),[l]);return te((function(){Rs().then((function(e){return e.length&&n(e)}))}),[]),fr("div",{className:"vm-predefined-panels",children:[!t.length&&fr(ro,{variant:"info",children:"Dashboards not found"}),a.length>1&&fr("div",{className:"vm-predefined-panels-tabs vm-block vm-block_empty-padding",children:fr(Ti,{activeItem:i,items:a,onChange:function(e){o(e)}})}),fr("div",{className:"vm-predefined-panels__dashboards",children:[s&&l.map((function(e,t){return fr(Ef,{index:t,filename:c,title:e.title,panels:e.panels},"".concat(i,"_").concat(t))})),!!t.length&&!s&&fr(ro,{variant:"error",children:[fr("code",{children:'"rows"'})," not found. Check the configuration file ",fr("b",{children:c}),"."]})]})]})},Sf=function(e,t){var n=t.match?"&match[]="+encodeURIComponent(t.match):"",r=t.focusLabel?"&focusLabel="+encodeURIComponent(t.focusLabel):"";return"".concat(e,"/api/v1/status/tsdb?topN=").concat(t.topN,"&date=").concat(t.date).concat(n).concat(r)},Ff=function(){function e(){Dt(this,e),this.tsdbStatus=void 0,this.tabsNames=void 0,this.tsdbStatus=this.defaultTSDBStatus,this.tabsNames=["table","graph"]}return xt(e,[{key:"tsdbStatusData",get:function(){return this.tsdbStatus},set:function(e){this.tsdbStatus=e}},{key:"defaultTSDBStatus",get:function(){return{totalSeries:0,totalLabelValuePairs:0,seriesCountByMetricName:[],seriesCountByLabelName:[],seriesCountByFocusLabelValue:[],seriesCountByLabelValuePair:[],labelValueCountByLabelName:[]}}},{key:"keys",value:function(e){var t=[];return e&&(t=t.concat("seriesCountByFocusLabelValue")),t=t.concat("seriesCountByMetricName","seriesCountByLabelName","seriesCountByLabelValuePair","labelValueCountByLabelName"),t}},{key:"defaultState",get:function(){var e=this;return this.keys("job").reduce((function(t,n){return Kn(Kn({},t),{},{tabs:Kn(Kn({},t.tabs),{},qn({},n,e.tabsNames)),containerRefs:Kn(Kn({},t.containerRefs),{},qn({},n,re(null))),defaultActiveTab:Kn(Kn({},t.defaultActiveTab),{},qn({},n,0))})}),{tabs:{},containerRefs:{},defaultActiveTab:{}})}},{key:"sectionsTitles",value:function(e){return{seriesCountByMetricName:"Metric names with the highest number of series",seriesCountByLabelName:"Labels with the highest number of series",seriesCountByFocusLabelValue:'Values for "'.concat(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"}}},{key:"tablesHeaders",get:function(){return{seriesCountByMetricName:Nf,seriesCountByLabelName:Of,seriesCountByFocusLabelValue:Tf,seriesCountByLabelValuePair:Bf,labelValueCountByLabelName:Mf}}},{key:"totalSeries",value:function(e){return"labelValueCountByLabelName"===e?-1:this.tsdbStatus.totalSeries}}]),e}(),Nf=[{id:"name",label:"Metric name"},{id:"value",label:"Number of series"},{id:"percentage",label:"Percent of series"},{id:"action",label:"Action"}],Of=[{id:"name",label:"Label name"},{id:"value",label:"Number of series"},{id:"percentage",label:"Percent of series"},{id:"action",label:"Action"}],Tf=[{id:"name",label:"Label value"},{id:"value",label:"Number of series"},{id:"percentage",label:"Percent of series"},{disablePadding:!1,id:"action",label:"Action",numeric:!1}],Bf=[{id:"name",label:"Label=value pair"},{id:"value",label:"Number of series"},{id:"percentage",label:"Percent of series"},{id:"action",label:"Action"}],Mf=[{id:"name",label:"Label name"},{id:"value",label:"Number of unique values"},{id:"action",label:"Action"}],Lf={seriesCountByMetricName:function(e,t){return Pf("__name__",t)},seriesCountByLabelName:function(e,t){return"{".concat(t,'!=""}')},seriesCountByFocusLabelValue:function(e,t){return Pf(e,t)},seriesCountByLabelValuePair:function(e,t){var n=t.split("="),r=n[0],i=n.slice(1).join("=");return Pf(r,i)},labelValueCountByLabelName:function(e,t){return"{".concat(t,'!=""}')}},Pf=function(e,t){return e?"{"+e+"="+JSON.stringify(t)+"}":""},$f=function(e){var t=e.topN,n=e.error,r=e.query,i=e.onSetHistory,o=e.onRunQuery,a=e.onSetQuery,u=e.onTopNChange,l=e.onFocusLabelChange,c=e.totalSeries,s=e.totalLabelValuePairs,f=e.date,d=e.match,h=e.focusLabel,p=ni().autocomplete,v=ri(),m=Es().queryOptions,y=oe((function(){return t<1?"Number must be bigger than zero":""}),[t]);return fr("div",{className:"vm-cardinality-configurator vm-block",children:[fr("div",{className:"vm-cardinality-configurator-controls",children:[fr("div",{className:"vm-cardinality-configurator-controls__query",children:fr(us,{value:r||d||"",autocomplete:p,options:m,error:n,onArrowUp:function(){i(-1)},onArrowDown:function(){i(1)},onEnter:o,onChange:a,label:"Time series selector"})}),fr("div",{className:"vm-cardinality-configurator-controls__item",children:fr(Eo,{label:"Number of entries per table",type:"number",value:t,error:y,onChange:u})}),fr("div",{className:"vm-cardinality-configurator-controls__item",children:fr(Eo,{label:"Focus label",type:"text",value:h||"",onChange:l})}),fr("div",{className:"vm-cardinality-configurator-controls__item",children:fr(ds,{label:"Autocomplete",value:p,onChange:function(){v({type:"TOGGLE_AUTOCOMPLETE"})}})})]}),fr("div",{className:"vm-cardinality-configurator-bottom",children:[fr("div",{className:"vm-cardinality-configurator-bottom__info",children:["Analyzed ",fr("b",{children:c})," series with ",fr("b",{children:s}),' "label=value" pairs at ',fr("b",{children:f}),d&&fr("span",{children:[" for series selector ",fr("b",{children:d})]}),". Show top ",t," entries per table."]}),fr(ao,{startIcon:fr(bi,{}),onClick:o,children:"Execute Query"})]})]})};function Rf(e){var t=e.order,n=e.orderBy,r=e.onRequestSort,i=e.headerCells;return fr("thead",{className:"vm-table-header",children:fr("tr",{className:"vm-table__row vm-table__row_header",children:i.map((function(e){return fr("th",{className:Fi()({"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:(i=e.id,function(e){r(e,i)}),children:fr("div",{className:"vm-table-cell__content",children:[e.label,"action"!==e.id&&"percentage"!==e.id&&fr("div",{className:Fi()({"vm-table__sort-icon":!0,"vm-table__sort-icon_active":n===e.id,"vm-table__sort-icon_desc":"desc"===t&&n===e.id}),children:fr(vi,{})})]})},e.id);var i}))})})}function If(e,t,n){return t[n]e[n]?1:0}function jf(e,t){return"desc"===e?function(e,n){return If(e,n,t)}:function(e,n){return-If(e,n,t)}}function zf(e,t){var n=e.map((function(e,t){return[e,t]}));return n.sort((function(e,n){var r=t(e[0],n[0]);return 0!==r?r:e[1]-n[1]})),n.map((function(e){return e[0]}))}var Uf=function(e){var t=e.rows,n=e.headerCells,r=e.defaultSortColumn,i=e.tableCells,o=_t(X("desc"),2),a=o[0],u=o[1],l=_t(X(r),2),c=l[0],s=l[1],f=_t(X([]),2),d=f[0],h=f[1],p=function(e){return function(){var t=d.indexOf(e),n=[];-1===t?n=n.concat(d,e):0===t?n=n.concat(d.slice(1)):t===d.length-1?n=n.concat(d.slice(0,-1)):t>0&&(n=n.concat(d.slice(0,t),d.slice(t+1))),h(n)}},v=zf(t,jf(a,c));return fr("table",{className:"vm-table",children:[fr(Rf,{numSelected:d.length,order:a,orderBy:c,onSelectAllClick:function(e){if(e.target.checked){var n=t.map((function(e){return e.name}));h(n)}else h([])},onRequestSort:function(e,t){u(c===t&&"asc"===a?"desc":"asc"),s(t)},rowCount:t.length,headerCells:n}),fr("tbody",{className:"vm-table-header",children:v.map((function(e){return fr("tr",{className:Fi()({"vm-table__row":!0,"vm-table__row_selected":(t=e.name,-1!==d.indexOf(t))}),onClick:p(e.name),children:i(e)},e.name);var t}))})]})},Hf=function(e){var t=e.row,n=e.totalSeries,r=e.onActionClick,i=n>0?t.value/n*100:-1;return fr(m,{children:[fr("td",{className:"vm-table-cell",children:t.name},t.name),fr("td",{className:"vm-table-cell",children:t.value},t.value),i>0&&fr("td",{className:"vm-table-cell",children:fr(As,{value:i})},t.progressValue),fr("td",{className:"vm-table-cell vm-table-cell_right",children:fr("div",{className:"vm-table-cell__content",children:fr(co,{title:"Filter by ".concat(t.name),children:fr(ao,{variant:"text",size:"small",onClick:r,children:fr(Di,{})})})})},"action")]})},Yf=function(e){var t=e.data,n=e.container,r=e.configs,i=re(null),o=_t(X(),2),a=o[0],u=o[1],l=po(n),c=Kn(Kn({},r),{},{width:l.width||400});return te((function(){if(i.current){var e=new Bc(c,t,i.current);return u(e),e.destroy}}),[i.current,l]),te((function(){a&&a.setData(t)}),[t]),fr("div",{style:{height:"100%"},children:fr("div",{ref:i})})},Vf=function(e,t){return Math.round(e*(t=Math.pow(10,t)))/t},qf=1,Wf=function(e,t,n,r){return Vf(t+e*(n+r),6)},Qf=function(e,t,n,r,i){var o=1-t,a=n===qf?o/(e-1):2===n?o/e:3===n?o/(e+1):0;(isNaN(a)||a===1/0)&&(a=0);var u=n===qf?0:2===n?a/2:3===n?a:0,l=t/e,c=Vf(l,6);if(null==r)for(var s=0;s=n&&e<=i&&t>=r&&t<=o};function Zf(e,t,n,r,i){var o=this;o.x=e,o.y=t,o.w=n,o.h=r,o.l=i||0,o.o=[],o.q=null}var Jf={split:function(){var e=this,t=e.x,n=e.y,r=e.w/2,i=e.h/2,o=e.l+1;e.q=[new Zf(t+r,n,r,i,o),new Zf(t,n,r,i,o),new Zf(t,n+i,r,i,o),new Zf(t+r,n+i,r,i,o)]},quads:function(e,t,n,r,i){var o=this,a=o.q,u=o.x+o.w/2,l=o.y+o.h/2,c=tu,d=t+r>l;c&&f&&i(a[0]),s&&c&&i(a[1]),s&&d&&i(a[2]),f&&d&&i(a[3])},add:function(e){var t=this;if(null!=t.q)t.quads(e.x,e.y,e.w,e.h,(function(t){t.add(e)}));else{var n=t.o;if(n.push(e),n.length>10&&t.l<4){t.split();for(var r=function(e){var r=n[e];t.quads(r.x,r.y,r.w,r.h,(function(e){e.add(r)}))},i=0;i=0?"left":"right",e.ctx.textBaseline=1===s?"middle":i[n]>=0?"bottom":"top",e.ctx.fillText(i[n],f,g)}}))})),e.ctx.restore()}function b(e,t,n){return[0,Bc.rangeNum(0,n,.05,!0)[1]]}return{hooks:{drawClear:function(t){var n;if((y=y||new Zf(0,0,t.bbox.width,t.bbox.height)).clear(),t.series.forEach((function(e){e._paths=null})),l=d?[null].concat(m(t.data.length-1-o.length,t.data[0].length)):2===t.series.length?[null].concat(m(t.data[0].length,1)):[null].concat(function(e,t){var n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:h,r=Array.from({length:t},(function(){return{offs:Array(e).fill(0),size:Array(e).fill(0)}}));return Qf(e,n,p,null,(function(e,n,i){Qf(t,1,v,null,(function(t,o,a){r[t].offs[e]=n+i*o,r[t].size[e]=i*a}))})),r}(t.data[0].length,t.data.length-1-o.length,1===t.data[0].length?1:h)),null!=(null===(n=e.disp)||void 0===n?void 0:n.fill)){c=[null];for(var r=1;r0&&!o.includes(t)&&Bc.assign(e,{paths:g,points:{show:_}})}))}}}((Kf=[1],Xf=0,ed=1,td=0,nd=function(e,t){return{stroke:e,fill:t}}({unit:3,values:function(e){return e.data[1].map((function(e,t){return 0!==t?"#33BB55":"#F79420"}))}},{unit:3,values:function(e){return e.data[1].map((function(e,t){return 0!==t?"#33BB55":"#F79420"}))}}),{which:Kf,ori:Xf,dir:ed,radius:td,disp:nd}))]},id=function(e){var t=e.rows,n=e.activeTab,r=e.onChange,i=e.tabs,o=e.chartContainer,a=e.totalSeries,u=e.tabId,l=e.onActionClick,c=e.sectionTitle,s=e.tableHeaderCells,f=oe((function(){return i.map((function(e,t){return{value:String(t),label:e,icon:fr(0===t?xi:wi,{})}}))}),[i]);return fr("div",{className:"vm-metrics-content vm-block",children:[fr("div",{className:"vm-metrics-content-header vm-section-header",children:[fr("h5",{className:"vm-section-header__title",children:c}),fr("div",{className:"vm-section-header__tabs",children:fr(Ti,{activeItem:String(n),items:f,onChange:function(e){r(e,u)}})})]}),fr("div",{ref:o,children:[0===n&&fr(Uf,{rows:t,headerCells:s,defaultSortColumn:"value",tableCells:function(e){return fr(Hf,{row:e,totalSeries:a,onActionClick:l})}}),1===n&&fr(Yf,{data:[t.map((function(e){return e.name})),t.map((function(e){return e.value})),t.map((function(e,t){return t%12==0?1:t%10==0?2:0}))],container:(null===o||void 0===o?void 0:o.current)||null,configs:rd})]})]})},od=function(){var e=Gi(),t=e.topN,n=e.match,r=e.date,i=e.focusLabel,o=Zi();!function(){var e=Gi(),t=e.topN,n=e.match,r=e.date,i=e.focusLabel,o=e.extraLabel,a=function(){var e=Ms({topN:t,date:r,match:n,extraLabel:o,focusLabel:i});ar(e)};te(a,[t,n,r,i,o]),te(a,[])}();var a=_t(X(n||""),2),u=a[0],l=a[1],c=_t(X(0),2),s=c[0],f=c[1],d=_t(X([]),2),h=d[0],p=d[1],v=function(){var e=new Ff,t=Gi(),n=t.topN,r=t.extraLabel,i=t.match,o=t.date,a=t.runQuery,u=t.focusLabel,l=hr().serverUrl,c=_t(X(!1),2),s=c[0],f=c[1],d=_t(X(),2),h=d[0],p=d[1],v=_t(X(e.defaultTSDBStatus),2),m=v[0],y=v[1];te((function(){h&&(y(e.defaultTSDBStatus),f(!1))}),[h]);var g=function(){var t=Jc(Gc().mark((function t(n){var r,i,o,a;return Gc().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:if(l){t.next=2;break}return t.abrupt("return");case 2:return p(""),f(!0),y(e.defaultTSDBStatus),r=Sf(l,n),t.prev=6,t.next=9,fetch(r);case 9:return i=t.sent,t.next=12,i.json();case 12:o=t.sent,i.ok?(a=o.data,y(Kn({},a)),f(!1)):(p(o.error),y(e.defaultTSDBStatus),f(!1)),t.next=20;break;case 16:t.prev=16,t.t0=t.catch(6),f(!1),t.t0 instanceof Error&&p("".concat(t.t0.name,": ").concat(t.t0.message));case 20:case"end":return t.stop()}}),t,null,[[6,16]])})));return function(e){return t.apply(this,arguments)}}();return te((function(){g({topN:n,extraLabel:r,match:i,date:o,focusLabel:u})}),[l,a,o]),e.tsdbStatusData=m,{isLoading:s,appConfigurator:e,error:h}}(),m=v.isLoading,y=v.appConfigurator,g=v.error,_=_t(X(y.defaultState.defaultActiveTab),2),b=_[0],D=_[1],w=y.tsdbStatusData,x=y.defaultState,k=y.tablesHeaders,C=function(e,t){D(Kn(Kn({},b),{},qn({},t,+e)))};return fr("div",{className:"vm-cardinality-panel",children:[m&&fr(Cs,{message:"Please wait while cardinality stats is calculated. \n This may take some time if the db contains big number of time series."}),fr($f,{error:"",query:u,topN:t,date:r,match:n,totalSeries:w.totalSeries,totalLabelValuePairs:w.totalLabelValuePairs,focusLabel:i,onRunQuery:function(){p((function(e){return[].concat(bt(e),[u])})),f((function(e){return e+1})),o({type:"SET_MATCH",payload:u}),o({type:"RUN_QUERY"})},onSetQuery:function(e){l(e)},onSetHistory:function(e){var t=s+e;t<0||t>=h.length||(f(t),l(h[t]))},onTopNChange:function(e){o({type:"SET_TOP_N",payload:+e})},onFocusLabelChange:function(e){o({type:"SET_FOCUS_LABEL",payload:e})}}),g&&fr(ro,{variant:"error",children:g}),y.keys(i).map((function(e){return fr(id,{sectionTitle:y.sectionsTitles(i)[e],activeTab:b[e],rows:w[e],onChange:C,onActionClick:(t=e,function(e){var n=e.currentTarget.id,r=Lf[t](i,n);l(r),p((function(e){return[].concat(bt(e),[r])})),f((function(e){return e+1})),o({type:"SET_MATCH",payload:r});var a="";"labelValueCountByLabelName"!==t&&"seriesCountByLabelName"!=t||(a=n),o({type:"SET_FOCUS_LABEL",payload:a}),o({type:"RUN_QUERY"})}),tabs:x.tabs[e],chartContainer:x.containerRefs[e],totalSeries:y.totalSeries(e),tabId:e,tableHeaderCells:k[e]},e);var t}))]})},ad=function(e){var t=e.rows,n=e.columns,r=_t(X(e.defaultOrderBy||"count"),2),i=r[0],o=r[1],a=_t(X("desc"),2),u=a[0],l=a[1],c=oe((function(){return zf(t,jf(u,i))}),[t,i,u]),s=function(e){return function(){var t;t=e,l((function(e){return"asc"===e&&i===t?"desc":"asc"})),o(t)}};return fr("table",{className:"vm-table",children:[fr("thead",{className:"vm-table-header",children:fr("tr",{className:"vm-table__row vm-table__row_header",children:n.map((function(e){return fr("th",{className:"vm-table-cell vm-table-cell_header vm-table-cell_sort",onClick:s(e.key),children:fr("div",{className:"vm-table-cell__content",children:[e.title||e.key,fr("div",{className:Fi()({"vm-table__sort-icon":!0,"vm-table__sort-icon_active":i===e.key,"vm-table__sort-icon_desc":"desc"===u&&i===e.key}),children:fr(vi,{})})]})},e.key)}))})}),fr("tbody",{className:"vm-table-body",children:c.map((function(e,t){return fr("tr",{className:"vm-table__row",children:n.map((function(t){return fr("td",{className:"vm-table-cell",children:e[t.key]||"-"},t.key)}))},t)}))})]})},ud=["table","JSON"].map((function(e,t){return{value:String(t),label:e,icon:fr(0===t?xi:ki,{})}})),ld=function(e){var t=e.rows,n=e.title,r=e.columns,i=e.defaultOrderBy,o=_t(X(0),2),a=o[0],u=o[1];return fr("div",{className:"vm-top-queries-panel vm-block",children:[fr("div",{className:"vm-top-queries-panel-header vm-section-header",children:[fr("h5",{className:"vm-section-header__title",children:n}),fr("div",{className:"vm-section-header__tabs",children:fr(Ti,{activeItem:String(a),items:ud,onChange:function(e){u(+e)}})})]}),fr("div",{children:[0===a&&fr(ad,{rows:t,columns:r,defaultOrderBy:i}),1===a&&fr(Ds,{data:t})]})]})},cd=function(){var e=function(){var e=hr().serverUrl,t=to(),n=t.topN,r=t.maxLifetime,i=t.runQuery,o=_t(X(null),2),a=o[0],u=o[1],l=_t(X(!1),2),c=l[0],s=l[1],f=_t(X(),2),d=f[0],h=f[1],p=oe((function(){return function(e,t,n){return"".concat(e,"/api/v1/status/top_queries?topN=").concat(t||"","&maxLifetime=").concat(n||"")}(e,n,r)}),[e,n,r]),v=function(){var e=Jc(Gc().mark((function e(){var t,n;return Gc().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return s(!0),e.prev=1,e.next=4,fetch(p);case 4:return t=e.sent,e.next=7,t.json();case 7:n=e.sent,t.ok&&["topByAvgDuration","topByCount","topBySumDuration"].forEach((function(e){var t=n[e];Array.isArray(t)&&t.forEach((function(e){return e.timeRangeHours=+(e.timeRangeSeconds/3600).toFixed(2)}))})),u(t.ok?n:null),h(String(n.error||"")),e.next=16;break;case 13:e.prev=13,e.t0=e.catch(1),e.t0 instanceof Error&&"AbortError"!==e.t0.name&&h("".concat(e.t0.name,": ").concat(e.t0.message));case 16:s(!1);case 17:case"end":return e.stop()}}),e,null,[[1,13]])})));return function(){return e.apply(this,arguments)}}();return te((function(){v()}),[i]),{data:a,error:d,loading:c}}(),t=e.data,n=e.error,r=e.loading,i=to(),o=i.topN,a=i.maxLifetime,u=ue(eo).dispatch;!function(){var e=to(),t=e.topN,n=e.maxLifetime,r=function(){var e=Ms({topN:String(t),maxLifetime:n});ar(e)};te(r,[t,n]),te(r,[])}();var l=oe((function(){var e=a.trim().split(" ").reduce((function(e,t){var n=Or(t);return n?Kn(Kn({},e),n):Kn({},e)}),{});return!!yr().duration(e).asMilliseconds()}),[a]),c=oe((function(){return!!o&&o<1}),[o]),s=oe((function(){return c?"Number must be bigger than zero":""}),[c]),f=oe((function(){return l?"":"Invalid duration value"}),[l]),d=function(e){if(!t)return e;var n=t[e];return"number"===typeof n?$c(n):n||e},h=function(){u({type:"SET_RUN_QUERY"})},p=function(e){"Enter"===e.key&&h()};return te((function(){t&&(o||u({type:"SET_TOP_N",payload:+t.topN}),a||u({type:"SET_MAX_LIFE_TIME",payload:t.maxLifetime}))}),[t]),fr("div",{className:"vm-top-queries",children:[r&&fr(Cs,{containerStyles:{height:"500px"}}),fr("div",{className:"vm-top-queries-controls vm-block",children:[fr("div",{className:"vm-top-queries-controls__fields",children:[fr(Eo,{label:"Max lifetime",value:a,error:f,helperText:"For example ".concat("30ms, 15s, 3d4h, 1y2w"),onChange:function(e){u({type:"SET_MAX_LIFE_TIME",payload:e})},onKeyDown:p}),fr(Eo,{label:"Number of returned queries",type:"number",value:o||"",error:s,onChange:function(e){u({type:"SET_TOP_N",payload:+e})},onKeyDown:p})]}),fr("div",{className:"vm-top-queries-controls-bottom",children:[fr("div",{className:"vm-top-queries-controls-bottom__info",children:["VictoriaMetrics tracks the last\xa0",fr(co,{title:"search.queryStats.lastQueriesCount",children:fr("b",{children:d("search.queryStats.lastQueriesCount")})}),"\xa0queries with durations at least\xa0",fr(co,{title:"search.queryStats.minQueryDuration",children:fr("b",{children:d("search.queryStats.minQueryDuration")})})]}),fr("div",{className:"vm-top-queries-controls-bottom__button",children:fr(ao,{startIcon:fr(bi,{}),onClick:h,children:"Execute"})})]})]}),n&&fr(ro,{variant:"error",children:n}),t&&fr(m,{children:fr("div",{className:"vm-top-queries-panels",children:[fr(ld,{rows:t.topByCount,title:"Most frequently executed queries",columns:[{key:"query"},{key:"timeRangeHours",title:"time range, hours"},{key:"count"}]}),fr(ld,{rows:t.topByAvgDuration,title:"Most heavy queries",columns:[{key:"query"},{key:"avgDurationSeconds",title:"avg duration, seconds"},{key:"timeRangeHours",title:"time range, hours"},{key:"count"}],defaultOrderBy:"avgDurationSeconds"}),fr(ld,{rows:t.topBySumDuration,title:"Queries with most summary time to execute",columns:[{key:"query"},{key:"sumDurationSeconds",title:"sum duration, seconds"},{key:"timeRangeHours",title:"time range, hours"},{key:"count"}],defaultOrderBy:"sumDurationSeconds"})]})})]})},sd=["primary","secondary","error","warning","info","success"],fd=function(e){var t=e.setLoadingTheme,n=Xn().palette,r=void 0===n?{}:n,i=function(){sd.forEach((function(e){var t=function(e){var 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"}(Ni("color-".concat(e)));Oi("".concat(e,"-text"),t)}))};return te((function(){sd.forEach((function(e){var t=r[e];t&&Oi("color-".concat(e),t)})),function(){var e=window,t=e.innerWidth,n=e.innerHeight,r=document.documentElement,i=r.clientWidth,o=r.clientHeight;Oi("scrollbar-width","".concat(t-i,"px")),Oi("scrollbar-height","".concat(n-o,"px"))}(),i(),t(!1)}),[]),null},dd=function(){var e=_t(X(!0),2),t=e[0],n=e[1];return fr(m,t?{children:[fr(Cs,{}),fr(fd,{setLoadingTheme:n}),";"]}:{children:fr(Un,{children:fr(oo,{children:fr(jn,{children:fr(Rn,{path:"/",element:fr(Ro,{}),children:[fr(Rn,{path:Zn.home,element:fr(Ps,{})}),fr(Rn,{path:Zn.dashboards,element:fr(Af,{})}),fr(Rn,{path:Zn.cardinality,element:fr(od,{})}),fr(Rn,{path:Zn.topQueries,element:fr(cd,{})})]})})})})})},hd=function(e){e&&n.e(27).then(n.bind(n,27)).then((function(t){var n=t.getCLS,r=t.getFID,i=t.getFCP,o=t.getLCP,a=t.getTTFB;n(e),r(e),i(e),o(e),a(e)}))},pd=document.getElementById("root");pd&&Ye(fr(dd,{}),pd),hd()}()}(); \ No newline at end of file diff --git a/app/vmselect/vmui/static/js/main.d0509bc3.js b/app/vmselect/vmui/static/js/main.d0509bc3.js new file mode 100644 index 000000000..d6bfaceaa --- /dev/null +++ b/app/vmselect/vmui/static/js/main.d0509bc3.js @@ -0,0 +1,2 @@ +/*! For license information please see main.d0509bc3.js.LICENSE.txt */ +!function(){var e={680:function(e,t,n){"use strict";var r=n(476),i=n(962),o=i(r("String.prototype.indexOf"));e.exports=function(e,t){var n=r(e,!!t);return"function"===typeof n&&o(e,".prototype.")>-1?i(n):n}},962:function(e,t,n){"use strict";var r=n(199),i=n(476),o=i("%Function.prototype.apply%"),a=i("%Function.prototype.call%"),u=i("%Reflect.apply%",!0)||r.call(a,o),l=i("%Object.getOwnPropertyDescriptor%",!0),c=i("%Object.defineProperty%",!0),s=i("%Math.max%");if(c)try{c({},"a",{value:1})}catch(d){c=null}e.exports=function(e){var t=u(r,a,arguments);if(l&&c){var n=l(t,"length");n.configurable&&c(t,"length",{value:1+s(0,e.length-(arguments.length-1))})}return t};var f=function(){return u(r,o,arguments)};c?c(e.exports,"apply",{value:f}):e.exports.apply=f},123:function(e,t){var n;!function(){"use strict";var r={}.hasOwnProperty;function i(){for(var e=[],t=0;t=t?e:""+Array(t+1-r.length).join(n)+e},g={s:y,z:function(e){var t=-e.utcOffset(),n=Math.abs(t),r=Math.floor(n/60),i=n%60;return(t<=0?"+":"-")+y(r,2,"0")+":"+y(i,2,"0")},m:function e(t,n){if(t.date()1)return e(a[0])}else{var u=t.name;b[u]=t,i=u}return!r&&i&&(_=i),i||!r&&_},x=function(e,t){if(D(e))return e.clone();var n="object"==typeof t?t:{};return n.date=e,n.args=arguments,new C(n)},k=g;k.l=w,k.i=D,k.w=function(e,t){return x(e,{locale:t.$L,utc:t.$u,x:t.$x,$offset:t.$offset})};var C=function(){function m(e){this.$L=w(e.locale,null,!0),this.parse(e)}var y=m.prototype;return y.parse=function(e){this.$d=function(e){var t=e.date,n=e.utc;if(null===t)return new Date(NaN);if(k.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 i=r[2]-1||0,o=(r[7]||"0").substring(0,3);return n?new Date(Date.UTC(r[1],i,r[3]||1,r[4]||0,r[5]||0,r[6]||0,o)):new Date(r[1],i,r[3]||1,r[4]||0,r[5]||0,r[6]||0,o)}}return new Date(t)}(e),this.$x=e.x||{},this.init()},y.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()},y.$utils=function(){return k},y.isValid=function(){return!(this.$d.toString()===h)},y.isSame=function(e,t){var n=x(e);return this.startOf(t)<=n&&n<=this.endOf(t)},y.isAfter=function(e,t){return x(e)1&&"boolean"!==typeof t)throw new a('"allowMissing" argument must be a boolean');if(null===k(/^%?[^%]*%?$/,e))throw new i("`%` may not be present anywhere but at the beginning and end of the intrinsic name");var n=A(e),r=n.length>0?n[0]:"",o=S("%"+r+"%",t),u=o.name,c=o.value,s=!1,f=o.alias;f&&(r=f[0],D(n,b([0,1],f)));for(var d=1,h=!0;d=n.length){var g=l(c,p);c=(h=!!g)&&"get"in g&&!("originalValue"in g.get)?g.get:c[p]}else h=_(c,p),c=c[p];h&&!s&&(v[u]=c)}}return c}},520:function(e,t,n){"use strict";var r="undefined"!==typeof Symbol&&Symbol,i=n(541);e.exports=function(){return"function"===typeof r&&("function"===typeof Symbol&&("symbol"===typeof r("foo")&&("symbol"===typeof Symbol("bar")&&i())))}},541:function(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 i=Object.getOwnPropertyDescriptor(e,t);if(42!==i.value||!0!==i.enumerable)return!1}return!0}},838:function(e,t,n){"use strict";var r=n(199);e.exports=r.call(Function.call,Object.prototype.hasOwnProperty)},936:function(e,t,n){var r=/^\s+|\s+$/g,i=/^[-+]0x[0-9a-f]+$/i,o=/^0b[01]+$/i,a=/^0o[0-7]+$/i,u=parseInt,l="object"==typeof n.g&&n.g&&n.g.Object===Object&&n.g,c="object"==typeof self&&self&&self.Object===Object&&self,s=l||c||Function("return this")(),f=Object.prototype.toString,d=Math.max,h=Math.min,p=function(){return s.Date.now()};function v(e){var t=typeof e;return!!e&&("object"==t||"function"==t)}function m(e){if("number"==typeof e)return e;if(function(e){return"symbol"==typeof e||function(e){return!!e&&"object"==typeof e}(e)&&"[object Symbol]"==f.call(e)}(e))return NaN;if(v(e)){var t="function"==typeof e.valueOf?e.valueOf():e;e=v(t)?t+"":t}if("string"!=typeof e)return 0===e?e:+e;e=e.replace(r,"");var n=o.test(e);return n||a.test(e)?u(e.slice(2),n?2:8):i.test(e)?NaN:+e}e.exports=function(e,t,n){var r,i,o,a,u,l,c=0,s=!1,f=!1,y=!0;if("function"!=typeof e)throw new TypeError("Expected a function");function g(t){var n=r,o=i;return r=i=void 0,c=t,a=e.apply(o,n)}function _(e){return c=e,u=setTimeout(D,t),s?g(e):a}function b(e){var n=e-l;return void 0===l||n>=t||n<0||f&&e-c>=o}function D(){var e=p();if(b(e))return w(e);u=setTimeout(D,function(e){var n=t-(e-l);return f?h(n,o-(e-c)):n}(e))}function w(e){return u=void 0,y&&r?g(e):(r=i=void 0,a)}function x(){var e=p(),n=b(e);if(r=arguments,i=this,l=e,n){if(void 0===u)return _(l);if(f)return u=setTimeout(D,t),g(l)}return void 0===u&&(u=setTimeout(D,t)),a}return t=m(t)||0,v(n)&&(s=!!n.leading,o=(f="maxWait"in n)?d(m(n.maxWait)||0,t):o,y="trailing"in n?!!n.trailing:y),x.cancel=function(){void 0!==u&&clearTimeout(u),c=0,r=l=i=u=void 0},x.flush=function(){return void 0===u?a:w(p())},x}},7:function(e,t,n){var r="__lodash_hash_undefined__",i="[object Function]",o="[object GeneratorFunction]",a=/\.|\[(?:[^[\]]*|(["'])(?:(?!\1)[^\\]|\\.)*?\1)\]/,u=/^\w*$/,l=/^\./,c=/[^.[\]]+|\[(?:(-?\d+(?:\.\d+)?)|(["'])((?:(?!\2)[^\\]|\\.)*?)\2)\]|(?=(?:\.|\[\])(?:\.|\[\]|$))/g,s=/\\(\\)?/g,f=/^\[object .+?Constructor\]$/,d="object"==typeof n.g&&n.g&&n.g.Object===Object&&n.g,h="object"==typeof self&&self&&self.Object===Object&&self,p=d||h||Function("return this")();var v=Array.prototype,m=Function.prototype,y=Object.prototype,g=p["__core-js_shared__"],_=function(){var e=/[^.]+$/.exec(g&&g.keys&&g.keys.IE_PROTO||"");return e?"Symbol(src)_1."+e:""}(),b=m.toString,D=y.hasOwnProperty,w=y.toString,x=RegExp("^"+b.call(D).replace(/[\\^$.*+?()[\]{}|]/g,"\\$&").replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g,"$1.*?")+"$"),k=p.Symbol,C=v.splice,E=$(p,"Map"),A=$(Object,"create"),S=k?k.prototype:void 0,F=S?S.toString:void 0;function N(e){var t=-1,n=e?e.length:0;for(this.clear();++t-1},O.prototype.set=function(e,t){var n=this.__data__,r=B(n,e);return r<0?n.push([e,t]):n[r][1]=t,this},T.prototype.clear=function(){this.__data__={hash:new N,map:new(E||O),string:new N}},T.prototype.delete=function(e){return P(this,e).delete(e)},T.prototype.get=function(e){return P(this,e).get(e)},T.prototype.has=function(e){return P(this,e).has(e)},T.prototype.set=function(e,t){return P(this,e).set(e,t),this};var R=j((function(e){var t;e=null==(t=e)?"":function(e){if("string"==typeof e)return e;if(H(e))return F?F.call(e):"";var t=e+"";return"0"==t&&1/e==-1/0?"-0":t}(t);var n=[];return l.test(e)&&n.push(""),e.replace(c,(function(e,t,r,i){n.push(r?i.replace(s,"$1"):t||e)})),n}));function I(e){if("string"==typeof e||H(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 n(){var r=arguments,i=t?t.apply(this,r):r[0],o=n.cache;if(o.has(i))return o.get(i);var a=e.apply(this,r);return n.cache=o.set(i,a),a};return n.cache=new(j.Cache||T),n}j.Cache=T;var z=Array.isArray;function U(e){var t=typeof e;return!!e&&("object"==t||"function"==t)}function H(e){return"symbol"==typeof e||function(e){return!!e&&"object"==typeof e}(e)&&"[object Symbol]"==w.call(e)}e.exports=function(e,t,n){var r=null==e?void 0:M(e,t);return void 0===r?n:r}},61:function(e,t,n){var r="Expected a function",i=/^\s+|\s+$/g,o=/^[-+]0x[0-9a-f]+$/i,a=/^0b[01]+$/i,u=/^0o[0-7]+$/i,l=parseInt,c="object"==typeof n.g&&n.g&&n.g.Object===Object&&n.g,s="object"==typeof self&&self&&self.Object===Object&&self,f=c||s||Function("return this")(),d=Object.prototype.toString,h=Math.max,p=Math.min,v=function(){return f.Date.now()};function m(e,t,n){var i,o,a,u,l,c,s=0,f=!1,d=!1,m=!0;if("function"!=typeof e)throw new TypeError(r);function _(t){var n=i,r=o;return i=o=void 0,s=t,u=e.apply(r,n)}function b(e){return s=e,l=setTimeout(w,t),f?_(e):u}function D(e){var n=e-c;return void 0===c||n>=t||n<0||d&&e-s>=a}function w(){var e=v();if(D(e))return x(e);l=setTimeout(w,function(e){var n=t-(e-c);return d?p(n,a-(e-s)):n}(e))}function x(e){return l=void 0,m&&i?_(e):(i=o=void 0,u)}function k(){var e=v(),n=D(e);if(i=arguments,o=this,c=e,n){if(void 0===l)return b(c);if(d)return l=setTimeout(w,t),_(c)}return void 0===l&&(l=setTimeout(w,t)),u}return t=g(t)||0,y(n)&&(f=!!n.leading,a=(d="maxWait"in n)?h(g(n.maxWait)||0,t):a,m="trailing"in n?!!n.trailing:m),k.cancel=function(){void 0!==l&&clearTimeout(l),s=0,i=c=o=l=void 0},k.flush=function(){return void 0===l?u:x(v())},k}function y(e){var t=typeof e;return!!e&&("object"==t||"function"==t)}function g(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(y(e)){var t="function"==typeof e.valueOf?e.valueOf():e;e=y(t)?t+"":t}if("string"!=typeof e)return 0===e?e:+e;e=e.replace(i,"");var n=a.test(e);return n||u.test(e)?l(e.slice(2),n?2:8):o.test(e)?NaN:+e}e.exports=function(e,t,n){var i=!0,o=!0;if("function"!=typeof e)throw new TypeError(r);return y(n)&&(i="leading"in n?!!n.leading:i,o="trailing"in n?!!n.trailing:o),m(e,t,{leading:i,maxWait:t,trailing:o})}},154:function(e,t,n){var r="function"===typeof Map&&Map.prototype,i=Object.getOwnPropertyDescriptor&&r?Object.getOwnPropertyDescriptor(Map.prototype,"size"):null,o=r&&i&&"function"===typeof i.get?i.get:null,a=r&&Map.prototype.forEach,u="function"===typeof Set&&Set.prototype,l=Object.getOwnPropertyDescriptor&&u?Object.getOwnPropertyDescriptor(Set.prototype,"size"):null,c=u&&l&&"function"===typeof l.get?l.get:null,s=u&&Set.prototype.forEach,f="function"===typeof WeakMap&&WeakMap.prototype?WeakMap.prototype.has:null,d="function"===typeof WeakSet&&WeakSet.prototype?WeakSet.prototype.has:null,h="function"===typeof WeakRef&&WeakRef.prototype?WeakRef.prototype.deref:null,p=Boolean.prototype.valueOf,v=Object.prototype.toString,m=Function.prototype.toString,y=String.prototype.match,g=String.prototype.slice,_=String.prototype.replace,b=String.prototype.toUpperCase,D=String.prototype.toLowerCase,w=RegExp.prototype.test,x=Array.prototype.concat,k=Array.prototype.join,C=Array.prototype.slice,E=Math.floor,A="function"===typeof BigInt?BigInt.prototype.valueOf:null,S=Object.getOwnPropertySymbols,F="function"===typeof Symbol&&"symbol"===typeof Symbol.iterator?Symbol.prototype.toString:null,N="function"===typeof Symbol&&"object"===typeof Symbol.iterator,O="function"===typeof Symbol&&Symbol.toStringTag&&(typeof Symbol.toStringTag===N||"symbol")?Symbol.toStringTag:null,T=Object.prototype.propertyIsEnumerable,B=("function"===typeof Reflect?Reflect.getPrototypeOf:Object.getPrototypeOf)||([].__proto__===Array.prototype?function(e){return e.__proto__}:null);function M(e,t){if(e===1/0||e===-1/0||e!==e||e&&e>-1e3&&e<1e3||w.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 i=String(r),o=g.call(t,i.length+1);return _.call(i,n,"$&_")+"."+_.call(_.call(o,/([0-9]{3})/g,"$&_"),/_$/,"")}}return _.call(t,n,"$&_")}var L=n(654),P=L.custom,$=U(P)?P:null;function R(e,t,n){var r="double"===(n.quoteStyle||t)?'"':"'";return r+e+r}function I(e){return _.call(String(e),/"/g,""")}function j(e){return"[object Array]"===V(e)&&(!O||!("object"===typeof e&&O in e))}function z(e){return"[object RegExp]"===V(e)&&(!O||!("object"===typeof e&&O in e))}function U(e){if(N)return e&&"object"===typeof e&&e instanceof Symbol;if("symbol"===typeof e)return!0;if(!e||"object"!==typeof e||!F)return!1;try{return F.call(e),!0}catch(t){}return!1}e.exports=function e(t,n,r,i){var u=n||{};if(Y(u,"quoteStyle")&&"single"!==u.quoteStyle&&"double"!==u.quoteStyle)throw new TypeError('option "quoteStyle" must be "single" or "double"');if(Y(u,"maxStringLength")&&("number"===typeof u.maxStringLength?u.maxStringLength<0&&u.maxStringLength!==1/0:null!==u.maxStringLength))throw new TypeError('option "maxStringLength", if provided, must be a positive integer, Infinity, or `null`');var l=!Y(u,"customInspect")||u.customInspect;if("boolean"!==typeof l&&"symbol"!==l)throw new TypeError("option \"customInspect\", if provided, must be `true`, `false`, or `'symbol'`");if(Y(u,"indent")&&null!==u.indent&&"\t"!==u.indent&&!(parseInt(u.indent,10)===u.indent&&u.indent>0))throw new TypeError('option "indent" must be "\\t", an integer > 0, or `null`');if(Y(u,"numericSeparator")&&"boolean"!==typeof u.numericSeparator)throw new TypeError('option "numericSeparator", if provided, must be `true` or `false`');var v=u.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,u);if("number"===typeof t){if(0===t)return 1/0/t>0?"0":"-0";var b=String(t);return v?M(t,b):b}if("bigint"===typeof t){var w=String(t)+"n";return v?M(t,w):w}var E="undefined"===typeof u.depth?5:u.depth;if("undefined"===typeof r&&(r=0),r>=E&&E>0&&"object"===typeof t)return j(t)?"[Array]":"[Object]";var S=function(e,t){var n;if("\t"===e.indent)n="\t";else{if(!("number"===typeof e.indent&&e.indent>0))return null;n=k.call(Array(e.indent+1)," ")}return{base:n,prev:k.call(Array(t+1),n)}}(u,r);if("undefined"===typeof i)i=[];else if(q(i,t)>=0)return"[Circular]";function P(t,n,o){if(n&&(i=C.call(i)).push(n),o){var a={depth:u.depth};return Y(u,"quoteStyle")&&(a.quoteStyle=u.quoteStyle),e(t,a,r+1,i)}return e(t,u,r+1,i)}if("function"===typeof t&&!z(t)){var H=function(e){if(e.name)return e.name;var t=y.call(m.call(e),/^function\s*([\w$]+)/);if(t)return t[1];return null}(t),Q=X(t,P);return"[Function"+(H?": "+H:" (anonymous)")+"]"+(Q.length>0?" { "+k.call(Q,", ")+" }":"")}if(U(t)){var ee=N?_.call(String(t),/^(Symbol\(.*\))_[^)]*$/,"$1"):F.call(t);return"object"!==typeof t||N?ee:G(ee)}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 te="<"+D.call(String(t.nodeName)),ne=t.attributes||[],re=0;re"}if(j(t)){if(0===t.length)return"[]";var ie=X(t,P);return S&&!function(e){for(var t=0;t=0)return!1;return!0}(ie)?"["+K(ie,S)+"]":"[ "+k.call(ie,", ")+" ]"}if(function(e){return"[object Error]"===V(e)&&(!O||!("object"===typeof e&&O in e))}(t)){var oe=X(t,P);return"cause"in Error.prototype||!("cause"in t)||T.call(t,"cause")?0===oe.length?"["+String(t)+"]":"{ ["+String(t)+"] "+k.call(oe,", ")+" }":"{ ["+String(t)+"] "+k.call(x.call("[cause]: "+P(t.cause),oe),", ")+" }"}if("object"===typeof t&&l){if($&&"function"===typeof t[$]&&L)return L(t,{depth:E-r});if("symbol"!==l&&"function"===typeof t.inspect)return t.inspect()}if(function(e){if(!o||!e||"object"!==typeof e)return!1;try{o.call(e);try{c.call(e)}catch(te){return!0}return e instanceof Map}catch(t){}return!1}(t)){var ae=[];return a.call(t,(function(e,n){ae.push(P(n,t,!0)+" => "+P(e,t))})),J("Map",o.call(t),ae,S)}if(function(e){if(!c||!e||"object"!==typeof e)return!1;try{c.call(e);try{o.call(e)}catch(t){return!0}return e instanceof Set}catch(n){}return!1}(t)){var ue=[];return s.call(t,(function(e){ue.push(P(e,t))})),J("Set",c.call(t),ue,S)}if(function(e){if(!f||!e||"object"!==typeof e)return!1;try{f.call(e,f);try{d.call(e,d)}catch(te){return!0}return e instanceof WeakMap}catch(t){}return!1}(t))return Z("WeakMap");if(function(e){if(!d||!e||"object"!==typeof e)return!1;try{d.call(e,d);try{f.call(e,f)}catch(te){return!0}return e instanceof WeakSet}catch(t){}return!1}(t))return Z("WeakSet");if(function(e){if(!h||!e||"object"!==typeof e)return!1;try{return h.call(e),!0}catch(t){}return!1}(t))return Z("WeakRef");if(function(e){return"[object Number]"===V(e)&&(!O||!("object"===typeof e&&O in e))}(t))return G(P(Number(t)));if(function(e){if(!e||"object"!==typeof e||!A)return!1;try{return A.call(e),!0}catch(t){}return!1}(t))return G(P(A.call(t)));if(function(e){return"[object Boolean]"===V(e)&&(!O||!("object"===typeof e&&O in e))}(t))return G(p.call(t));if(function(e){return"[object String]"===V(e)&&(!O||!("object"===typeof e&&O in e))}(t))return G(P(String(t)));if(!function(e){return"[object Date]"===V(e)&&(!O||!("object"===typeof e&&O in e))}(t)&&!z(t)){var le=X(t,P),ce=B?B(t)===Object.prototype:t instanceof Object||t.constructor===Object,se=t instanceof Object?"":"null prototype",fe=!ce&&O&&Object(t)===t&&O in t?g.call(V(t),8,-1):se?"Object":"",de=(ce||"function"!==typeof t.constructor?"":t.constructor.name?t.constructor.name+" ":"")+(fe||se?"["+k.call(x.call([],fe||[],se||[]),": ")+"] ":"");return 0===le.length?de+"{}":S?de+"{"+K(le,S)+"}":de+"{ "+k.call(le,", ")+" }"}return String(t)};var H=Object.prototype.hasOwnProperty||function(e){return e in this};function Y(e,t){return H.call(e,t)}function V(e){return v.call(e)}function q(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(g.call(e,0,t.maxStringLength),t)+r}return R(_.call(_.call(e,/(['\\])/g,"\\$1"),/[\x00-\x1f]/g,Q),"single",t)}function Q(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 G(e){return"Object("+e+")"}function Z(e){return e+" { ? }"}function J(e,t,n,r){return e+" ("+t+") {"+(r?K(n,r):k.call(n,", "))+"}"}function K(e,t){if(0===e.length)return"";var n="\n"+t.prev+t.base;return n+k.call(e,","+n)+"\n"+t.prev}function X(e,t){var n=j(e),r=[];if(n){r.length=e.length;for(var i=0;i-1?e.split(","):e},c=function(e,t,n,r){if(e){var o=n.allowDots?e.replace(/\.([^.[]+)/g,"[$1]"):e,a=/(\[[^[\]]*])/g,u=n.depth>0&&/(\[[^[\]]*])/.exec(o),c=u?o.slice(0,u.index):o,s=[];if(c){if(!n.plainObjects&&i.call(Object.prototype,c)&&!n.allowPrototypes)return;s.push(c)}for(var f=0;n.depth>0&&null!==(u=a.exec(o))&&f=0;--o){var a,u=e[o];if("[]"===u&&n.parseArrays)a=[].concat(i);else{a=n.plainObjects?Object.create(null):{};var c="["===u.charAt(0)&&"]"===u.charAt(u.length-1)?u.slice(1,-1):u,s=parseInt(c,10);n.parseArrays||""!==c?!isNaN(s)&&u!==c&&String(s)===c&&s>=0&&n.parseArrays&&s<=n.arrayLimit?(a=[])[s]=i:"__proto__"!==c&&(a[c]=i):a={0:i}}i=a}return i}(s,t,n,r)}};e.exports=function(e,t){var n=function(e){if(!e)return a;if(null!==e.decoder&&void 0!==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?a.charset:e.charset;return{allowDots:"undefined"===typeof e.allowDots?a.allowDots:!!e.allowDots,allowPrototypes:"boolean"===typeof e.allowPrototypes?e.allowPrototypes:a.allowPrototypes,allowSparse:"boolean"===typeof e.allowSparse?e.allowSparse:a.allowSparse,arrayLimit:"number"===typeof e.arrayLimit?e.arrayLimit:a.arrayLimit,charset:t,charsetSentinel:"boolean"===typeof e.charsetSentinel?e.charsetSentinel:a.charsetSentinel,comma:"boolean"===typeof e.comma?e.comma:a.comma,decoder:"function"===typeof e.decoder?e.decoder:a.decoder,delimiter:"string"===typeof e.delimiter||r.isRegExp(e.delimiter)?e.delimiter:a.delimiter,depth:"number"===typeof e.depth||!1===e.depth?+e.depth:a.depth,ignoreQueryPrefix:!0===e.ignoreQueryPrefix,interpretNumericEntities:"boolean"===typeof e.interpretNumericEntities?e.interpretNumericEntities:a.interpretNumericEntities,parameterLimit:"number"===typeof e.parameterLimit?e.parameterLimit:a.parameterLimit,parseArrays:!1!==e.parseArrays,plainObjects:"boolean"===typeof e.plainObjects?e.plainObjects:a.plainObjects,strictNullHandling:"boolean"===typeof e.strictNullHandling?e.strictNullHandling:a.strictNullHandling}}(t);if(""===e||null===e||"undefined"===typeof e)return n.plainObjects?Object.create(null):{};for(var s="string"===typeof e?function(e,t){var n,c={},s=t.ignoreQueryPrefix?e.replace(/^\?/,""):e,f=t.parameterLimit===1/0?void 0:t.parameterLimit,d=s.split(t.delimiter,f),h=-1,p=t.charset;if(t.charsetSentinel)for(n=0;n-1&&(m=o(m)?[m]:m),i.call(c,v)?c[v]=r.combine(c[v],m):c[v]=m}return c}(e,n):e,f=n.plainObjects?Object.create(null):{},d=Object.keys(s),h=0;h0?C.join(",")||null:void 0}];else if(l(h))M=h;else{var P=Object.keys(C);M=m?P.sort(m):P}for(var $=a&&l(C)&&1===C.length?n+"[]":n,R=0;R0?D+b:""}},837:function(e,t,n){"use strict";var r=n(609),i=Object.prototype.hasOwnProperty,o=Array.isArray,a=function(){for(var e=[],t=0;t<256;++t)e.push("%"+((t<16?"0":"")+t.toString(16)).toUpperCase());return e}(),u=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(o(n)){for(var r=[],i=0;i=48&&s<=57||s>=65&&s<=90||s>=97&&s<=122||o===r.RFC1738&&(40===s||41===s)?l+=u.charAt(c):s<128?l+=a[s]:s<2048?l+=a[192|s>>6]+a[128|63&s]:s<55296||s>=57344?l+=a[224|s>>12]+a[128|s>>6&63]+a[128|63&s]:(c+=1,s=65536+((1023&s)<<10|1023&u.charCodeAt(c)),l+=a[240|s>>18]+a[128|s>>12&63]+a[128|s>>6&63]+a[128|63&s])}return l},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(o(e)){for(var n=[],r=0;r2&&(u.children=arguments.length>3?t.call(arguments,2):r),"function"==typeof e&&null!=e.defaultProps)for(a in e.defaultProps)void 0===u[a]&&(u[a]=e.defaultProps[a]);return p(e,u,i,o,null)}function p(e,t,n,o,a){var u={type:e,props:t,key:n,ref:o,__k:null,__:null,__b:0,__e:null,__d:void 0,__c:null,__h:null,constructor:void 0,__v:null==a?++i:a};return null==a&&null!=r.vnode&&r.vnode(u),u}function v(){return{current:null}}function m(e){return e.children}function y(e,t){this.props=e,this.context=t}function g(e,t){if(null==t)return e.__?g(e.__,e.__.__k.indexOf(e)+1):null;for(var n;t0?p(y.type,y.props,y.key,y.ref?y.ref:null,y.__v):y)){if(y.__=n,y.__b=n.__b+1,null===(v=w[d])||v&&y.key==v.key&&y.type===v.type)w[d]=void 0;else for(h=0;h2&&(u.children=arguments.length>3?t.call(arguments,2):r),p(e.type,u,i||e.key,o||e.ref,null)}function I(e,t){var n={__c:t="__cC"+u++,__: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.shouldComponentUpdate=function(e){this.props.value!==e.value&&n.some(b)},this.sub=function(e){n.push(e);var t=e.componentWillUnmount;e.componentWillUnmount=function(){n.splice(n.indexOf(e),1),t&&t.call(e)}}),e.children}};return n.Provider.__=n.Consumer.contextType=n}t=c.slice,r={__e:function(e,t,n,r){for(var i,o,a;t=t.__;)if((i=t.__c)&&!i.__)try{if((o=i.constructor)&&null!=o.getDerivedStateFromError&&(i.setState(o.getDerivedStateFromError(e)),a=i.__d),null!=i.componentDidCatch&&(i.componentDidCatch(e,r||{}),a=i.__d),a)return i.__E=i}catch(t){e=t}throw e}},i=0,y.prototype.setState=function(e,t){var n;n=null!=this.__s&&this.__s!==this.state?this.__s:this.__s=f({},this.state),"function"==typeof e&&(e=e(f({},n),this.props)),e&&f(n,e),null!=e&&this.__v&&(t&&this._sb.push(t),b(this))},y.prototype.forceUpdate=function(e){this.__v&&(this.__e=!0,e&&this.__h.push(e),b(this))},y.prototype.render=m,o=[],D.__r=0,u=0;var j,z,U,H,Y=0,V=[],q=[],W=r.__b,Q=r.__r,G=r.diffed,Z=r.__c,J=r.unmount;function K(e,t){r.__h&&r.__h(z,e,Y||t),Y=0;var n=z.__H||(z.__H={__:[],__h:[]});return e>=n.__.length&&n.__.push({__V:q}),n.__[e]}function X(e){return Y=1,ee(ye,e)}function ee(e,t,n){var r=K(j++,2);if(r.t=e,!r.__c&&(r.__=[n?n(t):ye(void 0,t),function(e){var t=r.__N?r.__N[0]:r.__[0],n=r.t(t,e);t!==n&&(r.__N=[n,r.__[1]],r.__c.setState({}))}],r.__c=z,!z.u)){z.u=!0;var i=z.shouldComponentUpdate;z.shouldComponentUpdate=function(e,t,n){if(!r.__c.__H)return!0;var o=r.__c.__H.__.filter((function(e){return e.__c}));if(o.every((function(e){return!e.__N})))return!i||i.call(this,e,t,n);var a=!1;return o.forEach((function(e){if(e.__N){var t=e.__[0];e.__=e.__N,e.__N=void 0,t!==e.__[0]&&(a=!0)}})),!(!a&&r.__c.props===e)&&(!i||i.call(this,e,t,n))}}return r.__N||r.__}function te(e,t){var n=K(j++,3);!r.__s&&me(n.__H,t)&&(n.__=e,n.i=t,z.__H.__h.push(n))}function ne(e,t){var n=K(j++,4);!r.__s&&me(n.__H,t)&&(n.__=e,n.i=t,z.__h.push(n))}function re(e){return Y=5,oe((function(){return{current:e}}),[])}function ie(e,t,n){Y=6,ne((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 oe(e,t){var n=K(j++,7);return me(n.__H,t)?(n.__V=e(),n.i=t,n.__h=e,n.__V):n.__}function ae(e,t){return Y=8,oe((function(){return e}),t)}function ue(e){var t=z.context[e.__c],n=K(j++,9);return n.c=e,t?(null==n.__&&(n.__=!0,t.sub(z)),t.props.value):e.__}function le(e,t){r.useDebugValue&&r.useDebugValue(t?t(e):e)}function ce(e){var t=K(j++,10),n=X();return t.__=e,z.componentDidCatch||(z.componentDidCatch=function(e,r){t.__&&t.__(e,r),n[1](e)}),[n[0],function(){n[1](void 0)}]}function se(){var e=K(j++,11);if(!e.__){for(var t=z.__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 fe(){for(var e;e=V.shift();)if(e.__P&&e.__H)try{e.__H.__h.forEach(pe),e.__H.__h.forEach(ve),e.__H.__h=[]}catch(u){e.__H.__h=[],r.__e(u,e.__v)}}r.__b=function(e){z=null,W&&W(e)},r.__r=function(e){Q&&Q(e),j=0;var t=(z=e.__c).__H;t&&(U===z?(t.__h=[],z.__h=[],t.__.forEach((function(e){e.__N&&(e.__=e.__N),e.__V=q,e.__N=e.i=void 0}))):(t.__h.forEach(pe),t.__h.forEach(ve),t.__h=[])),U=z},r.diffed=function(e){G&&G(e);var t=e.__c;t&&t.__H&&(t.__H.__h.length&&(1!==V.push(t)&&H===r.requestAnimationFrame||((H=r.requestAnimationFrame)||he)(fe)),t.__H.__.forEach((function(e){e.i&&(e.__H=e.i),e.__V!==q&&(e.__=e.__V),e.i=void 0,e.__V=q}))),U=z=null},r.__c=function(e,t){t.some((function(e){try{e.__h.forEach(pe),e.__h=e.__h.filter((function(e){return!e.__||ve(e)}))}catch(i){t.some((function(e){e.__h&&(e.__h=[])})),t=[],r.__e(i,e.__v)}})),Z&&Z(e,t)},r.unmount=function(e){J&&J(e);var t,n=e.__c;n&&n.__H&&(n.__H.__.forEach((function(e){try{pe(e)}catch(e){t=e}})),n.__H=void 0,t&&r.__e(t,n.__v))};var de="function"==typeof requestAnimationFrame;function he(e){var t,n=function(){clearTimeout(r),de&&cancelAnimationFrame(t),setTimeout(e)},r=setTimeout(n,100);de&&(t=requestAnimationFrame(n))}function pe(e){var t=z,n=e.__c;"function"==typeof n&&(e.__c=void 0,n()),z=t}function ve(e){var t=z;e.__c=e.__(),z=t}function me(e,t){return!e||e.length!==t.length||t.some((function(t,n){return t!==e[n]}))}function ye(e,t){return"function"==typeof t?t(e):t}function ge(e,t){for(var n in t)e[n]=t[n];return e}function _e(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 be(e,t){return e===t&&(0!==e||1/e==1/t)||e!=e&&t!=t}function De(e){this.props=e}function we(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:_e(this.props,e)}function r(t){return this.shouldComponentUpdate=n,h(e,t)}return r.displayName="Memo("+(e.displayName||e.name)+")",r.prototype.isReactComponent=!0,r.__f=!0,r}(De.prototype=new y).isPureReactComponent=!0,De.prototype.shouldComponentUpdate=function(e,t){return _e(this.props,e)||_e(this.state,t)};var xe=r.__b;r.__b=function(e){e.type&&e.type.__f&&e.ref&&(e.props.ref=e.ref,e.ref=null),xe&&xe(e)};var ke="undefined"!=typeof Symbol&&Symbol.for&&Symbol.for("react.forward_ref")||3911;function Ce(e){function t(t){var n=ge({},t);return delete n.ref,e(n,t.ref||null)}return t.$$typeof=ke,t.render=t,t.prototype.isReactComponent=t.__f=!0,t.displayName="ForwardRef("+(e.displayName||e.name)+")",t}var Ee=function(e,t){return null==e?null:k(k(e).map(t))},Ae={map:Ee,forEach:Ee,count:function(e){return e?k(e).length:0},only:function(e){var t=k(e);if(1!==t.length)throw"Children.only";return t[0]},toArray:k},Se=r.__e;r.__e=function(e,t,n,r){if(e.then)for(var i,o=t;o=o.__;)if((i=o.__c)&&i.__c)return null==t.__e&&(t.__e=n.__e,t.__k=n.__k),i.__c(e,t);Se(e,t,n,r)};var Fe=r.unmount;function Ne(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=ge({},e)).__c&&(e.__c.__P===n&&(e.__c.__P=t),e.__c=null),e.__k=e.__k&&e.__k.map((function(e){return Ne(e,t,n)}))),e}function Oe(e,t,n){return e&&(e.__v=null,e.__k=e.__k&&e.__k.map((function(e){return Oe(e,t,n)})),e.__c&&e.__c.__P===t&&(e.__e&&n.insertBefore(e.__e,e.__d),e.__c.__e=!0,e.__c.__P=n)),e}function Te(){this.__u=0,this.t=null,this.__b=null}function Be(e){var t=e.__.__c;return t&&t.__a&&t.__a(e)}function Me(e){var t,n,r;function i(i){if(t||(t=e()).then((function(e){n=e.default||e}),(function(e){r=e})),r)throw r;if(!n)throw t;return h(n,i)}return i.displayName="Lazy",i.__f=!0,i}function Le(){this.u=null,this.o=null}r.unmount=function(e){var t=e.__c;t&&t.__R&&t.__R(),t&&!0===e.__h&&(e.type=null),Fe&&Fe(e)},(Te.prototype=new y).__c=function(e,t){var n=t.__c,r=this;null==r.t&&(r.t=[]),r.t.push(n);var i=Be(r.__v),o=!1,a=function(){o||(o=!0,n.__R=null,i?i(u):u())};n.__R=a;var u=function(){if(!--r.__u){if(r.state.__a){var e=r.state.__a;r.__v.__k[0]=Oe(e,e.__c.__P,e.__c.__O)}var t;for(r.setState({__a:r.__b=null});t=r.t.pop();)t.forceUpdate()}},l=!0===t.__h;r.__u++||l||r.setState({__a:r.__b=r.__v.__k[0]}),e.then(a,a)},Te.prototype.componentWillUnmount=function(){this.t=[]},Te.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]=Ne(this.__b,n,r.__O=r.__P)}this.__b=null}var i=t.__a&&h(m,null,e.fallback);return i&&(i.__h=null),[h(m,null,t.__a?null:e.children),i]};var Pe=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)}}),P(h($e,{context:t.context},e.__v),t.l)):t.l&&t.componentWillUnmount()}function Ie(e,t){var n=h(Re,{__v:e,i:t});return n.containerInfo=t,n}(Le.prototype=new y).__a=function(e){var t=this,n=Be(t.__v),r=t.o.get(e);return r[0]++,function(i){var o=function(){t.props.revealOrder?(r.push(i),Pe(t,e,r)):i()};n?n(o):o()}},Le.prototype.render=function(e){this.u=null,this.o=new Map;var t=k(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},Le.prototype.componentDidUpdate=Le.prototype.componentDidMount=function(){var e=this;this.o.forEach((function(t,n){Pe(e,n,t)}))};var je="undefined"!=typeof Symbol&&Symbol.for&&Symbol.for("react.element")||60103,ze=/^(?:accent|alignment|arabic|baseline|cap|clip(?!PathU)|color|dominant|fill|flood|font|glyph(?!R)|horiz|image|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]/,Ue="undefined"!=typeof document,He=function(e){return("undefined"!=typeof Symbol&&"symbol"==typeof Symbol()?/fil|che|rad/i:/fil|che|ra/i).test(e)};function Ye(e,t,n){return null==t.__k&&(t.textContent=""),P(e,t),"function"==typeof n&&n(),e?e.__c:null}function Ve(e,t,n){return $(e,t),"function"==typeof n&&n(),e?e.__c:null}y.prototype.isReactComponent={},["componentWillMount","componentWillReceiveProps","componentWillUpdate"].forEach((function(e){Object.defineProperty(y.prototype,e,{configurable:!0,get:function(){return this["UNSAFE_"+e]},set:function(t){Object.defineProperty(this,e,{configurable:!0,writable:!0,value:t})}})}));var qe=r.event;function We(){}function Qe(){return this.cancelBubble}function Ge(){return this.defaultPrevented}r.event=function(e){return qe&&(e=qe(e)),e.persist=We,e.isPropagationStopped=Qe,e.isDefaultPrevented=Ge,e.nativeEvent=e};var Ze,Je={configurable:!0,get:function(){return this.class}},Ke=r.vnode;r.vnode=function(e){var t=e.type,n=e.props,r=n;if("string"==typeof t){var i=-1===t.indexOf("-");for(var o in r={},n){var a=n[o];Ue&&"children"===o&&"noscript"===t||"value"===o&&"defaultValue"in n&&null==a||("defaultValue"===o&&"value"in n&&null==n.value?o="value":"download"===o&&!0===a?a="":/ondoubleclick/i.test(o)?o="ondblclick":/^onchange(textarea|input)/i.test(o+t)&&!He(n.type)?o="oninput":/^onfocus$/i.test(o)?o="onfocusin":/^onblur$/i.test(o)?o="onfocusout":/^on(Ani|Tra|Tou|BeforeInp|Compo)/.test(o)?o=o.toLowerCase():i&&ze.test(o)?o=o.replace(/[A-Z0-9]/g,"-$&").toLowerCase():null===a&&(a=void 0),/^oninput$/i.test(o)&&(o=o.toLowerCase(),r[o]&&(o="oninputCapture")),r[o]=a)}"select"==t&&r.multiple&&Array.isArray(r.value)&&(r.value=k(n.children).forEach((function(e){e.props.selected=-1!=r.value.indexOf(e.props.value)}))),"select"==t&&null!=r.defaultValue&&(r.value=k(n.children).forEach((function(e){e.props.selected=r.multiple?-1!=r.defaultValue.indexOf(e.props.value):r.defaultValue==e.props.value}))),e.props=r,n.class!=n.className&&(Je.enumerable="className"in n,null!=n.className&&(r.class=n.className),Object.defineProperty(r,"className",Je))}e.$$typeof=je,Ke&&Ke(e)};var Xe=r.__r;r.__r=function(e){Xe&&Xe(e),Ze=e.__c};var et={ReactCurrentDispatcher:{current:{readContext:function(e){return Ze.__n[e.__c].props.value}}}},tt="17.0.2";function nt(e){return h.bind(null,e)}function rt(e){return!!e&&e.$$typeof===je}function it(e){return rt(e)?R.apply(null,arguments):e}function ot(e){return!!e.__k&&(P(null,e),!0)}function at(e){return e&&(e.base||1===e.nodeType&&e)||null}var ut=function(e,t){return e(t)},lt=function(e,t){return e(t)},ct=m;function st(e){e()}function ft(e){return e}function dt(){return[!1,st]}var ht=ne;function pt(e,t){var n=t(),r=X({h:{__:n,v:t}}),i=r[0].h,o=r[1];return ne((function(){i.__=n,i.v=t,be(i.__,t())||o({h:i})}),[e,n,t]),te((function(){return be(i.__,i.v())||o({h:i}),e((function(){be(i.__,i.v())||o({h:i})}))}),[e]),n}var vt,mt={useState:X,useId:se,useReducer:ee,useEffect:te,useLayoutEffect:ne,useInsertionEffect:ht,useTransition:dt,useDeferredValue:ft,useSyncExternalStore:pt,startTransition:st,useRef:re,useImperativeHandle:ie,useMemo:oe,useCallback:ae,useContext:ue,useDebugValue:le,version:"17.0.2",Children:Ae,render:Ye,hydrate:Ve,unmountComponentAtNode:ot,createPortal:Ie,createElement:h,createContext:I,createFactory:nt,cloneElement:it,createRef:v,Fragment:m,isValidElement:rt,findDOMNode:at,Component:y,PureComponent:De,memo:we,forwardRef:Ce,flushSync:lt,unstable_batchedUpdates:ut,StrictMode:ct,Suspense:Te,SuspenseList:Le,lazy:Me,__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED:et};function yt(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n=0&&(t.hash=e.substr(n),e=e.substr(0,n));var r=e.indexOf("?");r>=0&&(t.search=e.substr(r),e=e.substr(0,r)),e&&(t.pathname=e)}return t}function zt(e){var t="undefined"!==typeof window&&"undefined"!==typeof window.location&&"null"!==window.location.origin?window.location.origin:"unknown://unknown",n="string"===typeof e?e:It(e);return new URL(n,t)}function Ut(e,t,n,r){void 0===r&&(r={});var i=r,o=i.window,a=void 0===o?document.defaultView:o,u=i.v5Compat,l=void 0!==u&&u,c=a.history,s=vt.Pop,f=null;function d(){s=vt.Pop,f&&f({action:s,location:h.location})}var h={get action(){return s},get location(){return e(a,c)},listen:function(e){if(f)throw new Error("A history only accepts one active listener");return a.addEventListener(Lt,d),f=e,function(){a.removeEventListener(Lt,d),f=null}},createHref:function(e){return t(a,e)},encodeLocation:function(e){var t=zt(It(e));return Bt({},e,{pathname:t.pathname,search:t.search,hash:t.hash})},push:function(e,t){s=vt.Push;var r=Rt(h.location,e,t);n&&n(r,e);var i=$t(r),o=h.createHref(r);try{c.pushState(i,"",o)}catch(u){a.location.assign(o)}l&&f&&f({action:s,location:h.location})},replace:function(e,t){s=vt.Replace;var r=Rt(h.location,e,t);n&&n(r,e);var i=$t(r),o=h.createHref(r);c.replaceState(i,"",o),l&&f&&f({action:s,location:h.location})},go:function(e){return c.go(e)}};return h}function Ht(e,t,n){void 0===n&&(n="/");var r=Jt(("string"===typeof t?jt(t):t).pathname||"/",n);if(null==r)return null;var i=Yt(e);!function(e){e.sort((function(e,t){return e.score!==t.score?t.score-e.score:function(e,t){var n=e.length===t.length&&e.slice(0,-1).every((function(e,n){return e===t[n]}));return n?e[e.length-1]-t[t.length-1]:0}(e.routesMeta.map((function(e){return e.childrenIndex})),t.routesMeta.map((function(e){return e.childrenIndex})))}))}(i);for(var o=null,a=0;null==o&&a0&&(Kt(!0!==e.index,'Index routes must not have child routes. Please remove all child routes from route path "'+a+'".'),Yt(e.children,t,u,a)),(null!=e.path||e.index)&&t.push({path:a,score:Wt(a,e.index),routesMeta:u})})),t}!function(e){e.data="data",e.deferred="deferred",e.redirect="redirect",e.error="error"}(Mt||(Mt={}));var Vt=/^:\w+$/,qt=function(e){return"*"===e};function Wt(e,t){var n=e.split("/"),r=n.length;return n.some(qt)&&(r+=-2),t&&(r+=2),n.filter((function(e){return!qt(e)})).reduce((function(e,t){return e+(Vt.test(t)?3:""===t?1:10)}),r)}function Qt(e,t){for(var n=e.routesMeta,r={},i="/",o=[],a=0;a and the router will parse it for you.'}function tn(e){return e.filter((function(e,t){return 0===t||e.route.path&&e.route.path.length>0}))}function nn(e,t,n,r){var i;void 0===r&&(r=!1),"string"===typeof e?i=jt(e):(Kt(!(i=Bt({},e)).pathname||!i.pathname.includes("?"),en("?","pathname","search",i)),Kt(!i.pathname||!i.pathname.includes("#"),en("#","pathname","hash",i)),Kt(!i.search||!i.search.includes("#"),en("#","search","hash",i)));var o,a=""===e||""===i.pathname,u=a?"/":i.pathname;if(r||null==u)o=n;else{var l=t.length-1;if(u.startsWith("..")){for(var c=u.split("/");".."===c[0];)c.shift(),l-=1;i.pathname=c.join("/")}o=l>=0?t[l]:"/"}var s=function(e,t){void 0===t&&(t="/");var n="string"===typeof e?jt(e):e,r=n.pathname,i=n.search,o=void 0===i?"":i,a=n.hash,u=void 0===a?"":a,l=r?r.startsWith("/")?r:function(e,t){var n=t.replace(/\/+$/,"").split("/");return e.split("/").forEach((function(e){".."===e?n.length>1&&n.pop():"."!==e&&n.push(e)})),n.length>1?n.join("/"):"/"}(r,t):t;return{pathname:l,search:an(o),hash:un(u)}}(i,o),f=u&&"/"!==u&&u.endsWith("/"),d=(a||"."===u)&&n.endsWith("/");return s.pathname.endsWith("/")||!f&&!d||(s.pathname+="/"),s}var rn=function(e){return e.join("/").replace(/\/\/+/g,"/")},on=function(e){return e.replace(/\/+$/,"").replace(/^\/*/,"/")},an=function(e){return e&&"?"!==e?e.startsWith("?")?e:"?"+e:""},un=function(e){return e&&"#"!==e?e.startsWith("#")?e:"#"+e:""};Error;var ln=xt((function e(t,n,r){Dt(this,e),this.status=t,this.statusText=n||"",this.data=r}));function cn(e){return e instanceof ln}"undefined"!==typeof window&&"undefined"!==typeof window.document&&window.document.createElement;var sn=new Set(["POST","PUT","PATCH","DELETE"]);new Set(["GET","HEAD"].concat(bt(sn)));function fn(){return fn=Object.assign?Object.assign.bind():function(e){for(var t=1;t")))}var Nn,On,Tn=function(e){Ct(n,e);var t=Nt(n);function n(e){var r;return Dt(this,n),(r=t.call(this,e)).state={location:e.location,error:e.error},r}return xt(n,[{key:"componentDidCatch",value:function(e,t){console.error("React Router caught the following error during render",e,t)}},{key:"render",value:function(){return this.state.error?h(kn.Provider,{value:this.state.error,children:this.props.component}):this.props.children}}],[{key:"getDerivedStateFromError",value:function(e){return{error:e}}},{key:"getDerivedStateFromProps",value:function(e,t){return t.location!==e.location?{error:e.error,location:e.location}:{error:e.error||t.error,location:t.location}}}]),n}(y);function Bn(e){var t=e.routeContext,n=e.match,r=e.children,i=ue(gn);return i&&n.route.errorElement&&(i._deepestRenderedBoundaryId=n.route.id),h(xn.Provider,{value:t},r)}function Mn(e,t,n){if(void 0===t&&(t=[]),null==e){if(null==n||!n.errors)return null;e=n.matches}var r=e,i=null==n?void 0:n.errors;if(null!=i){var o=r.findIndex((function(e){return e.route.id&&(null==i?void 0:i[e.route.id])}));o>=0||Kt(!1),r=r.slice(0,Math.min(r.length,o+1))}return r.reduceRight((function(e,o,a){var u=o.route.id?null==i?void 0:i[o.route.id]:null,l=n?o.route.errorElement||h(Fn,null):null,c=function(){return h(Bn,{match:o,routeContext:{outlet:e,matches:t.concat(r.slice(0,a+1))}},u?l:void 0!==o.route.element?o.route.element:e)};return n&&(o.route.errorElement||0===a)?h(Tn,{location:n.location,component:l,error:u,children:c()}):c()}),null)}function Ln(e){var t=ue(bn);return t||Kt(!1),t}!function(e){e.UseRevalidator="useRevalidator"}(Nn||(Nn={})),function(e){e.UseLoaderData="useLoaderData",e.UseActionData="useActionData",e.UseRouteError="useRouteError",e.UseNavigation="useNavigation",e.UseRouteLoaderData="useRouteLoaderData",e.UseMatches="useMatches",e.UseRevalidator="useRevalidator"}(On||(On={}));var Pn;function $n(e){return function(e){var t=ue(xn).outlet;return t?h(Sn.Provider,{value:e},t):t}(e.context)}function Rn(e){Kt(!1)}function In(e){var t=e.basename,n=void 0===t?"/":t,r=e.children,i=void 0===r?null:r,o=e.location,a=e.navigationType,u=void 0===a?vt.Pop:a,l=e.navigator,c=e.static,s=void 0!==c&&c;Cn()&&Kt(!1);var f=n.replace(/^\/*/,"/"),d=oe((function(){return{basename:f,navigator:l,static:s}}),[f,l,s]);"string"===typeof o&&(o=jt(o));var p=o,v=p.pathname,m=void 0===v?"/":v,y=p.search,g=void 0===y?"":y,_=p.hash,b=void 0===_?"":_,D=p.state,w=void 0===D?null:D,x=p.key,k=void 0===x?"default":x,C=oe((function(){var e=Jt(m,f);return null==e?null:{pathname:e,search:g,hash:b,state:w,key:k}}),[f,m,g,b,w,k]);return null==C?null:h(Dn.Provider,{value:d},h(wn.Provider,{children:i,value:{location:C,navigationType:u}}))}function jn(e){var t=e.children,n=e.location,r=ue(_n);return function(e,t){Cn()||Kt(!1);var n,r=ue(bn),i=ue(xn).matches,o=i[i.length-1],a=o?o.params:{},u=(o&&o.pathname,o?o.pathnameBase:"/"),l=(o&&o.route,En());if(t){var c,s="string"===typeof t?jt(t):t;"/"===u||(null==(c=s.pathname)?void 0:c.startsWith(u))||Kt(!1),n=s}else n=l;var f=n.pathname||"/",d=Ht(e,{pathname:"/"===u?f:f.slice(u.length)||"/"}),p=Mn(d&&d.map((function(e){return Object.assign({},e,{params:Object.assign({},a,e.params),pathname:rn([u,e.pathname]),pathnameBase:"/"===e.pathnameBase?u:rn([u,e.pathnameBase])})})),i,r||void 0);return t&&p?h(wn.Provider,{value:{location:fn({pathname:"/",search:"",hash:"",state:null,key:"default"},n),navigationType:vt.Pop}},p):p}(r&&!t?r.router.routes:zn(t),n)}!function(e){e[e.pending=0]="pending",e[e.success=1]="success",e[e.error=2]="error"}(Pn||(Pn={}));new Promise((function(){}));function zn(e,t){void 0===t&&(t=[]);var n=[];return Ae.forEach(e,(function(e,r){if(rt(e))if(e.type!==m){e.type!==Rn&&Kt(!1),e.props.index&&e.props.children&&Kt(!1);var i=[].concat(bt(t),[r]),o={id:e.props.id||i.join("-"),caseSensitive:e.props.caseSensitive,element:e.props.element,index:e.props.index,path:e.props.path,loader:e.props.loader,action:e.props.action,errorElement:e.props.errorElement,hasErrorBoundary:null!=e.props.errorElement,shouldRevalidate:e.props.shouldRevalidate,handle:e.props.handle};e.props.children&&(o.children=zn(e.props.children,i)),n.push(o)}else n.push.apply(n,zn(e.props.children,t))})),n}function Un(e){var t=e.basename,n=e.children,r=e.window,i=re();null==i.current&&(i.current=function(e){return void 0===e&&(e={}),Ut((function(e,t){var n=jt(e.location.hash.substr(1)),r=n.pathname,i=void 0===r?"/":r,o=n.search,a=void 0===o?"":o,u=n.hash;return Rt("",{pathname:i,search:a,hash:void 0===u?"":u},t.state&&t.state.usr||null,t.state&&t.state.key||"default")}),(function(e,t){var n=e.document.querySelector("base"),r="";if(n&&n.getAttribute("href")){var i=e.location.href,o=i.indexOf("#");r=-1===o?i:i.slice(0,o)}return r+"#"+("string"===typeof t?t:It(t))}),(function(e,t){Pt("/"===e.pathname.charAt(0),"relative pathnames are not supported in hash history.push("+JSON.stringify(t)+")")}),e)}({window:r,v5Compat:!0}));var o=i.current,a=_t(X({action:o.action,location:o.location}),2),u=a[0],l=a[1];return ne((function(){return o.listen(l)}),[o]),h(In,{basename:t,children:n,location:u.location,navigationType:u.action,navigator:o})}var Hn,Yn;(function(e){e.UseScrollRestoration="useScrollRestoration",e.UseSubmitImpl="useSubmitImpl",e.UseFetcher="useFetcher"})(Hn||(Hn={})),function(e){e.UseFetchers="useFetchers",e.UseScrollRestoration="useScrollRestoration"}(Yn||(Yn={}));var Vn;function qn(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}var Wn={home:"/",dashboards:"/dashboards",cardinality:"/cardinality",topQueries:"/top-queries"},Qn={header:{timeSelector:!0,executionControls:!0,globalSettings:!0}},Gn=(qn(Vn={},Wn.home,Qn),qn(Vn,Wn.dashboards,Qn),qn(Vn,Wn.cardinality,{header:{cardinalityDatePicker:!0,globalSettings:!0}}),Vn),Zn=Wn;function Jn(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}function Kn(e){for(var t=1;t2&&void 0!==arguments[2]?arguments[2]:window.location.search,r=nr().parse(n,{ignoreQueryPrefix:!0});return ir()(r,e,t||"")},lr={serverUrl:Xn().serverURL||window.location.href.replace(/\/(?:prometheus\/)?(?:graph|vmui)\/.*/,"/prometheus"),tenantId:Number(ur("g0.tenantID",0))};function cr(e,t){switch(t.type){case"SET_SERVER":return Kn(Kn({},e),{},{serverUrl:t.payload});case"SET_TENANT_ID":return Kn(Kn({},e),{},{tenantId:t.payload});default:throw new Error}}var sr=0;function fr(e,t,n,i,o){var a,u,l={};for(u in t)"ref"==u?a=t[u]:l[u]=t[u];var c={type:e,props:l,key:n,ref:a,__k:null,__:null,__b:0,__e:null,__d:void 0,__c:null,__h:null,constructor:void 0,__v:--sr,__source:o,__self:i};if("function"==typeof e&&(a=e.defaultProps))for(u in a)void 0===l[u]&&(l[u]=a[u]);return r.vnode&&r.vnode(c),c}var dr=I({}),hr=function(){return ue(dr).state},pr=function(){return ue(dr).dispatch},vr=Object.entries(lr).reduce((function(e,t){var n=_t(t,2),r=n[0],i=n[1];return Kn(Kn({},e),{},qn({},r,ur(r)||i))}),{}),mr=n(658),yr=n.n(mr),gr=n(446),_r=n.n(gr),br=n(635),Dr=n.n(br),wr="YYYY-MM-DD",xr="YYYY-MM-DD HH:mm:ss",kr="YYYY-MM-DD[T]HH:mm:ss";yr().extend(_r()),yr().extend(Dr());var Cr,Er=window.innerWidth/4,Ar=1,Sr=1578e8,Fr=[{long:"days",short:"d",possible:"day"},{long:"weeks",short:"w",possible:"week"},{long:"months",short:"M",possible:"mon"},{long:"years",short:"y",possible:"year"},{long:"hours",short:"h",possible:"hour"},{long:"minutes",short:"m",possible:"min"},{long:"seconds",short:"s",possible:"sec"},{long:"milliseconds",short:"ms",possible:"millisecond"}].map((function(e){return e.short})),Nr=function(e){return Math.round(1e3*e)/1e3},Or=function(e){var t=e.match(/\d+/g),n=e.match(/[a-zA-Z]+/g);if(n&&t&&Fr.includes(n[0]))return qn({},n[0],t[0])},Tr=function(e,t){var n=(t||new Date).valueOf()/1e3,r=e.trim().split(" ").reduce((function(e,t){var n=Or(t);return n?Kn(Kn({},e),n):Kn({},e)}),{}),i=yr().duration(r).asSeconds();return{start:n-i,end:n,step:Nr(i/Er)||.001,date:Br(t||new Date)}},Br=function(e){return yr()(e).utc().format(kr)},Mr=function(e){return yr()(e).format(kr)},Lr=function(e){var t=Math.floor(e%1e3),n=Math.floor(e/1e3%60),r=Math.floor(e/1e3/60%60),i=Math.floor(e/1e3/3600%24),o=Math.floor(e/864e5),a=["d","h","m","s","ms"],u=[o,i,r,n,t].map((function(e,t){return e?"".concat(e).concat(a[t]):""}));return u.filter((function(e){return e})).join(" ")},Pr=function(e){return new Date(1e3*e)},$r=[{title:"Last 5 minutes",duration:"5m"},{title:"Last 15 minutes",duration:"15m"},{title:"Last 30 minutes",duration:"30m",isDefault:!0},{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:function(){return yr()().subtract(1,"day").endOf("day").toDate()}},{title:"Today",duration:"1d",until:function(){return yr()().endOf("day").toDate()}}].map((function(e){return Kn({id:e.title.replace(/\s/g,"_").toLocaleLowerCase(),until:e.until?e.until:function(){return yr()().toDate()}},e)})),Rr=function(e){var t,n=e.relativeTimeId,r=e.defaultDuration,i=e.defaultEndInput,o=null===(t=$r.find((function(e){return e.isDefault})))||void 0===t?void 0:t.id,a=n||ur("g0.relative_time",o),u=$r.find((function(e){return e.id===a}));return{relativeTimeId:u?a:"none",duration:u?u.duration:r,endInput:u?u.until():i}},Ir=ur("g0.range_input"),jr=Rr({defaultDuration:Ir||"1h",defaultEndInput:new Date((Cr=ur("g0.end_input",new Date(yr()().utc().format(kr))),yr()(Cr).utcOffset(0,!0).local().format(kr))),relativeTimeId:Ir?ur("g0.relative_time","none"):void 0}),zr=jr.duration,Ur=jr.endInput,Hr=jr.relativeTimeId,Yr={duration:zr,period:Tr(zr,Ur),relativeTime:Hr};function Vr(e,t){switch(t.type){case"SET_DURATION":return Kn(Kn({},e),{},{duration:t.payload,period:Tr(t.payload,Pr(e.period.end)),relativeTime:"none"});case"SET_RELATIVE_TIME":return Kn(Kn({},e),{},{duration:t.payload.duration,period:Tr(t.payload.duration,new Date(t.payload.until)),relativeTime:t.payload.id});case"SET_PERIOD":var n=function(e){var t=e.to.valueOf()-e.from.valueOf();return Lr(t)}(t.payload);return Kn(Kn({},e),{},{duration:n,period:Tr(n,t.payload.to),relativeTime:"none"});case"RUN_QUERY":var r=Rr({relativeTimeId:e.relativeTime,defaultDuration:e.duration,defaultEndInput:Pr(e.period.end)}),i=r.duration,o=r.endInput;return Kn(Kn({},e),{},{period:Tr(i,o)});case"RUN_QUERY_TO_NOW":return Kn(Kn({},e),{},{period:Tr(e.duration)});default:throw new Error}}var qr=I({}),Wr=function(){return ue(qr).state},Qr=function(){return ue(qr).dispatch},Gr=function(e,t){t?window.localStorage.setItem(e,JSON.stringify({value:t})):Jr([e])},Zr=function(e){var 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(c){return t}},Jr=function(e){return e.forEach((function(e){return window.localStorage.removeItem(e)}))},Kr=function(){var e,t=(null===(e=window.location.search.match(/g\d+.expr/gim))||void 0===e?void 0:e.length)||1;return new Array(t>4?4:t).fill(1).map((function(e,t){return ur("g".concat(t,".expr"),"")}))}(),Xr={query:Kr,queryHistory:Kr.map((function(e){return{index:0,values:[e]}})),autocomplete:Zr("AUTOCOMPLETE")||!1};function ei(e,t){switch(t.type){case"SET_QUERY":return Kn(Kn({},e),{},{query:t.payload.map((function(e){return e}))});case"SET_QUERY_HISTORY":return Kn(Kn({},e),{},{queryHistory:t.payload});case"SET_QUERY_HISTORY_BY_INDEX":return e.queryHistory.splice(t.payload.queryNumber,1,t.payload.value),Kn(Kn({},e),{},{queryHistory:e.queryHistory});case"TOGGLE_AUTOCOMPLETE":return Gr("AUTOCOMPLETE",!e.autocomplete),Kn(Kn({},e),{},{autocomplete:!e.autocomplete});default:throw new Error}}var ti=I({}),ni=function(){return ue(ti).state},ri=function(){return ue(ti).dispatch},ii=function(){return fr("svg",{viewBox:"0 0 74 24",fill:"currentColor",children:[fr("path",{d:"M6.11771 9.47563C6.4774 9.7554 6.91935 9.90875 7.37507 9.9119H7.42685C7.9076 9.90451 8.38836 9.71964 8.67681 9.46823C10.1856 8.18898 14.5568 4.18115 14.5568 4.18115C15.7254 3.09415 12.4637 2.00716 7.42685 1.99977H7.36768C2.33084 2.00716 -0.930893 3.09415 0.237711 4.18115C0.237711 4.18115 4.60888 8.18898 6.11771 9.47563ZM8.67681 11.6422C8.31807 11.9246 7.87603 12.0806 7.41945 12.0859H7.37507C6.91849 12.0806 6.47645 11.9246 6.11771 11.6422C5.08224 10.7549 1.38413 7.41995 0.00103198 6.14809V8.07806C0.00103198 8.2925 0.0823905 8.57349 0.222919 8.70659L0.293358 8.77097L0.293386 8.77099C1.33788 9.72556 4.83907 12.9253 6.11771 14.0159C6.47645 14.2983 6.91849 14.4543 7.37507 14.4595H7.41945C7.9076 14.4447 8.38096 14.2599 8.67681 14.0159C9.98594 12.9067 13.6249 9.57175 14.5642 8.70659C14.7121 8.57349 14.7861 8.2925 14.7861 8.07806V6.14809C12.7662 7.99781 10.7297 9.82926 8.67681 11.6422ZM7.41945 16.6261C7.87517 16.623 8.31712 16.4696 8.67681 16.1898C10.7298 14.3744 12.7663 12.5405 14.7861 10.6883V12.6257C14.7861 12.8327 14.7121 13.1137 14.5642 13.2468C13.6249 14.1194 9.98594 17.4469 8.67681 18.5561C8.38096 18.8075 7.9076 18.9924 7.41945 18.9998H7.37507C6.91935 18.9966 6.4774 18.8433 6.11771 18.5635C4.91431 17.5371 1.74223 14.6362 0.502336 13.5023C0.3934 13.4027 0.299379 13.3167 0.222919 13.2468C0.0823905 13.1137 0.00103198 12.8327 0.00103198 12.6257V10.6883C1.38413 11.9528 5.08224 15.2951 6.11771 16.1825C6.47645 16.4649 6.91849 16.6209 7.37507 16.6261H7.41945Z",fill:"currentColor"}),fr("path",{d:"M35 3.54L29.16 18H26.73L20.89 3.54H23.05C23.2833 3.54 23.4733 3.59667 23.62 3.71C23.7667 3.82333 23.8767 3.97 23.95 4.15L27.36 12.97C27.4733 13.2567 27.58 13.5733 27.68 13.92C27.7867 14.26 27.8867 14.6167 27.98 14.99C28.06 14.6167 28.1467 14.26 28.24 13.92C28.3333 13.5733 28.4367 13.2567 28.55 12.97L31.94 4.15C31.9933 3.99667 32.0967 3.85667 32.25 3.73C32.41 3.60333 32.6033 3.54 32.83 3.54H35ZM52.1767 3.54V18H49.8067V8.66C49.8067 8.28667 49.8267 7.88333 49.8667 7.45L45.4967 15.66C45.2901 16.0533 44.9734 16.25 44.5467 16.25H44.1667C43.7401 16.25 43.4234 16.0533 43.2167 15.66L38.7967 7.42C38.8167 7.64 38.8334 7.85667 38.8467 8.07C38.8601 8.28333 38.8667 8.48 38.8667 8.66V18H36.4967V3.54H38.5267C38.6467 3.54 38.7501 3.54333 38.8367 3.55C38.9234 3.55667 39.0001 3.57333 39.0667 3.6C39.1401 3.62667 39.2034 3.67 39.2567 3.73C39.3167 3.79 39.3734 3.87 39.4267 3.97L43.7567 12C43.8701 12.2133 43.9734 12.4333 44.0667 12.66C44.1667 12.8867 44.2634 13.12 44.3567 13.36C44.4501 13.1133 44.5467 12.8767 44.6467 12.65C44.7467 12.4167 44.8534 12.1933 44.9667 11.98L49.2367 3.97C49.2901 3.87 49.3467 3.79 49.4067 3.73C49.4667 3.67 49.5301 3.62667 49.5967 3.6C49.6701 3.57333 49.7501 3.55667 49.8367 3.55C49.9234 3.54333 50.0267 3.54 50.1467 3.54H52.1767ZM61.063 17.27C61.743 17.27 62.3496 17.1533 62.883 16.92C63.423 16.68 63.8796 16.35 64.253 15.93C64.6263 15.51 64.9096 15.0167 65.103 14.45C65.303 13.8767 65.403 13.26 65.403 12.6V3.85H66.423V12.6C66.423 13.38 66.2996 14.11 66.053 14.79C65.8063 15.4633 65.4496 16.0533 64.983 16.56C64.523 17.06 63.9596 17.4533 63.293 17.74C62.633 18.0267 61.8896 18.17 61.063 18.17C60.2363 18.17 59.4896 18.0267 58.823 17.74C58.163 17.4533 57.5996 17.06 57.133 16.56C56.673 16.0533 56.3196 15.4633 56.073 14.79C55.8263 14.11 55.703 13.38 55.703 12.6V3.85H56.733V12.59C56.733 13.25 56.8296 13.8667 57.023 14.44C57.223 15.0067 57.5063 15.5 57.873 15.92C58.2463 16.34 58.6996 16.67 59.233 16.91C59.773 17.15 60.383 17.27 61.063 17.27ZM71.4442 18H70.4142V3.85H71.4442V18Z",fill:"currentColor"})]})},oi=function(){return fr("svg",{viewBox:"0 0 24 24",fill:"currentColor",children:fr("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"})})},ai=function(){return fr("svg",{viewBox:"0 0 24 24",fill:"currentColor",children:fr("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"})})},ui=function(){return fr("svg",{viewBox:"0 0 24 24",fill:"currentColor",children:fr("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"})})},li=function(){return fr("svg",{viewBox:"0 0 24 24",fill:"currentColor",children:fr("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"})})},ci=function(){return fr("svg",{viewBox:"0 0 24 24",fill:"currentColor",children:fr("path",{d:"M1 21h22L12 2 1 21zm12-3h-2v-2h2v2zm0-4h-2v-4h2v4z"})})},si=function(){return fr("svg",{viewBox:"0 0 24 24",fill:"currentColor",children:fr("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"})})},fi=function(){return fr("svg",{viewBox:"0 0 24 24",fill:"currentColor",children:fr("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"})})},di=function(){return fr("svg",{viewBox:"0 0 24 24",fill:"currentColor",children:fr("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"})})},hi=function(){return fr("svg",{viewBox:"0 0 24 24",fill:"currentColor",children:fr("path",{d:"M7.41 8.59 12 13.17l4.59-4.58L18 10l-6 6-6-6 1.41-1.41z"})})},pi=function(){return fr("svg",{viewBox:"0 0 24 24",fill:"currentColor",children:fr("path",{d:"m12 8-6 6 1.41 1.41L12 10.83l4.59 4.58L18 14z"})})},vi=function(){return fr("svg",{viewBox:"0 0 24 24",fill:"currentColor",children:fr("path",{d:"m7 10 5 5 5-5z"})})},mi=function(){return fr("svg",{viewBox:"0 0 24 24",fill:"currentColor",children:[fr("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"}),fr("path",{d:"M12.5 7H11v6l5.25 3.15.75-1.23-4.5-2.67z"})]})},yi=function(){return fr("svg",{viewBox:"0 0 24 24",fill:"currentColor",children:fr("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"})})},gi=function(){return fr("svg",{viewBox:"0 0 24 24",fill:"currentColor",children:fr("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"})})},_i=function(){return fr("svg",{viewBox:"0 0 24 24",fill:"currentColor",children:fr("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"})})},bi=function(){return fr("svg",{viewBox:"0 0 24 24",fill:"currentColor",children:fr("path",{d:"M8 5v14l11-7z"})})},Di=function(){return fr("svg",{viewBox:"0 0 24 24",fill:"currentColor",children:fr("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"})})},wi=function(){return fr("svg",{viewBox:"0 0 24 24",fill:"currentColor",children:fr("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"})})},xi=function(){return fr("svg",{viewBox:"0 0 24 24",fill:"currentColor",children:fr("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"})})},ki=function(){return fr("svg",{viewBox:"0 0 24 24",fill:"currentColor",children:fr("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"})})},Ci=function(){return fr("svg",{viewBox:"0 0 24 24",fill:"currentColor",children:fr("path",{d:"M6 19c0 1.1.9 2 2 2h8c1.1 0 2-.9 2-2V7H6v12zM19 4h-3.5l-1-1h-5l-1 1H5v2h14V4z"})})},Ei=function(){return fr("svg",{viewBox:"0 0 24 24",fill:"currentColor",children:fr("path",{d:"M19 13h-6v6h-2v-6H5v-2h6V5h2v6h6v2z"})})},Ai=function(){return fr("svg",{viewBox:"0 0 24 24",fill:"currentColor",children:fr("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"})})},Si=function(){return fr("svg",{viewBox:"0 0 24 24",fill:"currentColor",children:fr("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"})})},Fi=function(){return fr("svg",{viewBox:"0 0 24 24",fill:"currentColor",children:fr("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"})})},Ni=n(123),Oi=n.n(Ni),Ti=function(e){return getComputedStyle(document.documentElement).getPropertyValue("--".concat(e))},Bi=function(e,t){document.documentElement.style.setProperty("--".concat(e),t)},Mi=function(e){var t=e.activeItem,n=e.items,r=e.color,i=void 0===r?Ti("color-primary"):r,o=e.onChange,a=e.indicatorPlacement,u=void 0===a?"bottom":a,l=re(null),c=_t(X({left:0,width:0,bottom:0}),2),s=c[0],f=c[1];return te((function(){if(l.current){var e=l.current,t=e.offsetLeft,n=e.offsetWidth,r=e.offsetHeight;f({left:t,width:n,bottom:"top"===u?r-2:0})}}),[t,l,n]),fr("div",{className:"vm-tabs",children:[n.map((function(e){return fr("div",{className:Oi()(qn({"vm-tabs-item":!0,"vm-tabs-item_active":t===e.value},e.className||"",e.className)),ref:t===e.value?l:void 0,style:{color:i},onClick:(n=e.value,function(){o(n)}),children:[e.icon&&fr("div",{className:Oi()({"vm-tabs-item__icon":!0,"vm-tabs-item__icon_single":!e.label}),children:e.icon}),e.label]},e.value);var n})),fr("div",{className:"vm-tabs__indicator",style:Kn(Kn({},s),{},{borderColor:i})})]})},Li=[{value:"chart",icon:fr(wi,{}),label:"Graph",prometheusCode:0},{value:"code",icon:fr(ki,{}),label:"JSON",prometheusCode:3},{value:"table",icon:fr(xi,{}),label:"Table",prometheusCode:1}],Pi=function(){var e=Ui().displayType,t=Hi();return fr(Mi,{activeItem:e,items:Li,onChange:function(n){var r;t({type:"SET_DISPLAY_TYPE",payload:null!==(r=n)&&void 0!==r?r:e})}})},$i=ur("g0.tab",0),Ri=Li.find((function(e){return e.prometheusCode===+$i||e.value===$i})),Ii={displayType:(null===Ri||void 0===Ri?void 0:Ri.value)||"chart",nocache:Zr("NO_CACHE")||!1,isTracingEnabled:Zr("QUERY_TRACING")||!1};function ji(e,t){switch(t.type){case"SET_DISPLAY_TYPE":return Kn(Kn({},e),{},{displayType:t.payload});case"TOGGLE_QUERY_TRACING":return Gr("QUERY_TRACING",!e.isTracingEnabled),Kn(Kn({},e),{},{isTracingEnabled:!e.isTracingEnabled});case"TOGGLE_NO_CACHE":return Gr("NO_CACHE",!e.nocache),Kn(Kn({},e),{},{nocache:!e.nocache});default:throw new Error}}var zi=I({}),Ui=function(){return ue(zi).state},Hi=function(){return ue(zi).dispatch},Yi={customStep:parseFloat(ur("g0.step_input","0")),yaxis:{limits:{enable:!1,range:{1:[0,0]}}}};function Vi(e,t){switch(t.type){case"TOGGLE_ENABLE_YAXIS_LIMITS":return Kn(Kn({},e),{},{yaxis:Kn(Kn({},e.yaxis),{},{limits:Kn(Kn({},e.yaxis.limits),{},{enable:!e.yaxis.limits.enable})})});case"SET_CUSTOM_STEP":return Kn(Kn({},e),{},{customStep:t.payload});case"SET_YAXIS_LIMITS":return Kn(Kn({},e),{},{yaxis:Kn(Kn({},e.yaxis),{},{limits:Kn(Kn({},e.yaxis.limits),{},{range:t.payload})})});default:throw new Error}}var qi=I({}),Wi=function(){return ue(qi).dispatch},Qi={runQuery:0,topN:ur("topN",10),date:ur("date",yr()(new Date).format(wr)),focusLabel:ur("focusLabel",""),match:ur("match",""),extraLabel:ur("extra_label","")};function Gi(e,t){switch(t.type){case"SET_TOP_N":return Kn(Kn({},e),{},{topN:t.payload});case"SET_DATE":return Kn(Kn({},e),{},{date:t.payload});case"SET_MATCH":return Kn(Kn({},e),{},{match:t.payload});case"SET_EXTRA_LABEL":return Kn(Kn({},e),{},{extraLabel:t.payload});case"SET_FOCUS_LABEL":return Kn(Kn({},e),{},{focusLabel:t.payload});case"RUN_QUERY":return Kn(Kn({},e),{},{runQuery:e.runQuery+1});default:throw new Error}}var Zi=I({}),Ji=function(){return ue(Zi).state},Ki=function(){return ue(Zi).dispatch},Xi={topN:ur("topN",null),maxLifetime:ur("maxLifetime",""),runQuery:0};function eo(e,t){switch(t.type){case"SET_TOP_N":return Kn(Kn({},e),{},{topN:t.payload});case"SET_MAX_LIFE_TIME":return Kn(Kn({},e),{},{maxLifetime:t.payload});case"SET_RUN_QUERY":return Kn(Kn({},e),{},{runQuery:e.runQuery+1});default:throw new Error}}var to,no=I({}),ro=function(){return ue(no).state},io={success:fr(fi,{}),error:fr(si,{}),warning:fr(ci,{}),info:fr(li,{})},oo=function(e){var t=e.variant,n=e.children;return fr("div",{className:Oi()(qn({"vm-alert":!0},"vm-alert_".concat(t),t)),children:[fr("div",{className:"vm-alert__icon",children:io[t||"info"]}),fr("div",{className:"vm-alert__content",children:n})]})},ao=I({showInfoMessage:function(){}}),uo=function(){for(var e=arguments.length,t=new Array(e),n=0;nd,v=r.top-20<0,m=r.left+g.width+20>f,y=r.left-20<0;return h&&(r.top=t.top-g.height-u),v&&(r.top=t.height+t.top+u),m&&(r.left=t.right-g.width-l),y&&(r.left=t.left+l),r}),[n,i,p,t]);d&&co(b,(function(){return v(!1)}),n);var x=Oi()(qn({"vm-popper":!0,"vm-popper_open":p},"vm-popper_open_".concat(l),l));return fr(m,{children:p&&mt.createPortal(fr("div",{className:x,ref:b,style:w,children:t}),document.body)})},fo=function(e){var t=e.children,n=e.title,r=e.open,i=e.placement,o=void 0===i?"bottom-center":i,a=e.offset,u=void 0===a?{top:6,left:0}:a,l=_t(X(!1),2),c=l[0],s=l[1],f=_t(X({width:0,height:0}),2),d=f[0],h=f[1],p=re(null),v=re(null),y=function(){return s(!1)};te((function(){return window.addEventListener("scroll",y),function(){window.removeEventListener("scroll",y)}}),[]),te((function(){v.current&&c&&h({width:v.current.clientWidth,height:v.current.clientHeight})}),[c]);var g=oe((function(){var e,t=null===p||void 0===p||null===(e=p.current)||void 0===e?void 0:e.base;if(!t||!c)return{};var n=t.getBoundingClientRect(),r={top:0,left:0},i="bottom-right"===o||"top-right"===o,a="bottom-left"===o||"top-left"===o,l=null===o||void 0===o?void 0:o.includes("top"),s=(null===u||void 0===u?void 0:u.top)||0,f=(null===u||void 0===u?void 0:u.left)||0;r.left=n.left-(d.width-n.width)/2+f,r.top=n.height+n.top+s,i&&(r.left=n.right-d.width),a&&(r.left=n.left+f),l&&(r.top=n.top-d.height-s);var h=window,v=h.innerWidth,m=h.innerHeight,y=r.top+d.height+20>m,g=r.top-20<0,_=r.left+d.width+20>v,b=r.left-20<0;return y&&(r.top=n.top-d.height-s),g&&(r.top=n.height+n.top+s),_&&(r.left=n.right-d.width-f),b&&(r.left=n.left+f),r.top<0&&(r.top=20),r.left<0&&(r.left=20),r}),[p,o,c,d]),_=function(){"boolean"!==typeof r&&s(!0)},b=function(){s(!1)};return te((function(){"boolean"===typeof r&&s(r)}),[r]),te((function(){var e,t=null===p||void 0===p||null===(e=p.current)||void 0===e?void 0:e.base;if(t)return t.addEventListener("mouseenter",_),t.addEventListener("mouseleave",b),function(){t.removeEventListener("mouseenter",_),t.removeEventListener("mouseleave",b)}}),[p]),fr(m,{children:[fr(m,{ref:p,children:t}),c&&mt.createPortal(fr("div",{className:"vm-tooltip",ref:v,style:g,children:n}),document.body)]})},ho=[{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"}],po=function(){var e=Qr(),t=er(),n=_t(X(!1),2),r=n[0],i=n[1],o=_t(X(ho[0]),2),a=o[0],u=o[1];te((function(){var t,n=a.seconds;return r?t=setInterval((function(){e({type:"RUN_QUERY"})}),1e3*n):u(ho[0]),function(){t&&clearInterval(t)}}),[a,r]);var l=_t(X(!1),2),c=l[0],s=l[1],f=re(null),d=function(e){return function(){!function(e){(r&&!e.seconds||!r&&e.seconds)&&i((function(e){return!e})),u(e),s(!1)}(e)}};return fr(m,{children:[fr("div",{className:"vm-execution-controls",children:fr("div",{className:Oi()({"vm-execution-controls-buttons":!0,"vm-header-button":!t}),children:[fr(fo,{title:"Refresh dashboard",children:fr(lo,{variant:"contained",color:"primary",onClick:function(){e({type:"RUN_QUERY"})},startIcon:fr(di,{})})}),fr(fo,{title:"Auto-refresh control",children:fr("div",{ref:f,children:fr(lo,{variant:"contained",color:"primary",fullWidth:!0,endIcon:fr("div",{className:Oi()({"vm-execution-controls-buttons__arrow":!0,"vm-execution-controls-buttons__arrow_open":c}),children:fr(hi,{})}),onClick:function(){s((function(e){return!e}))},children:a.title})})})]})}),fr(so,{open:c,placement:"bottom-right",onClose:function(){s(!1)},buttonRef:f,children:fr("div",{className:"vm-execution-controls-list",children:ho.map((function(e){return fr("div",{className:Oi()({"vm-list__item":!0,"vm-list__item_active":e.seconds===a.seconds}),onClick:d(e),children:e.title},e.seconds)}))})})]})},vo=function(e){var t=e.relativeTime,n=e.setDuration;return fr("div",{className:"vm-time-duration",children:$r.map((function(e){var r,i=e.id,o=e.duration,a=e.until,u=e.title;return fr("div",{className:Oi()({"vm-list__item":!0,"vm-list__item_active":i===t}),onClick:(r={duration:o,until:a(),id:i},function(){n(r)}),children:u||o},i)}))})},mo=function(e){var t=_t(X({width:0,height:0}),2),n=t[0],r=t[1];return te((function(){var t=new ResizeObserver((function(e){var t=e[0].contentRect,n=t.width,i=t.height;r({width:n,height:i})}));return e&&t.observe(e),function(){e&&t.unobserve(e)}}),[]),n},yo=function(e){var t=e.viewDate,n=e.displayYears,r=e.onChangeViewDate;return fr("div",{className:"vm-calendar-header",children:[fr("div",{className:"vm-calendar-header-left",onClick:e.toggleDisplayYears,children:[fr("span",{className:"vm-calendar-header-left__date",children:t.format("MMMM YYYY")}),fr("div",{className:"vm-calendar-header-left__select-year",children:fr(vi,{})})]}),!n&&fr("div",{className:"vm-calendar-header-right",children:[fr("div",{className:"vm-calendar-header-right__prev",onClick:function(){r(t.subtract(1,"month"))},children:fr(hi,{})}),fr("div",{className:"vm-calendar-header-right__next",onClick:function(){r(t.add(1,"month"))},children:fr(hi,{})})]})]})},go=["Sunday","Monday","Tuesday","Wednesday","Thursday","Friday","Saturday"],_o=function(e){var t=e.viewDate,n=e.selectDate,r=e.onChangeSelectDate,i=yr()().startOf("day"),o=oe((function(){var e=new Array(42).fill(null),n=t.startOf("month"),r=t.endOf("month").diff(n,"day")+1,i=new Array(r).fill(n).map((function(e,t){return e.add(t,"day")})),o=n.day();return e.splice.apply(e,[o,r].concat(bt(i))),e}),[t]),a=function(e){return function(){e&&r(e)}};return fr("div",{className:"vm-calendar-body",children:[go.map((function(e){return fr("div",{className:"vm-calendar-body-cell vm-calendar-body-cell_weekday",children:e[0]},e)})),o.map((function(e,t){return fr("div",{className:Oi()({"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.toISOString())===n.startOf("day").toISOString(),"vm-calendar-body-cell_day_today":(e&&e.toISOString())===i.toISOString()}),onClick:a(e),children:e&&e.format("D")},e?e.toISOString():t)}))]})},bo=function(e){var t=e.viewDate,n=e.onChangeViewDate,r=oe((function(){return t.format("YYYY")}),[t]),i=oe((function(){var e=yr()().subtract(103,"year");return new Array(206).fill(e).map((function(e,t){return e.add(t,"year")}))}),[t]);te((function(){var e=document.getElementById("vm-calendar-year-".concat(r));e&&e.scrollIntoView({block:"center"})}),[]);return fr("div",{className:"vm-calendar-years",children:i.map((function(e){return fr("div",{className:Oi()({"vm-calendar-years__year":!0,"vm-calendar-years__year_selected":e.format("YYYY")===r}),id:"vm-calendar-year-".concat(e.format("YYYY")),onClick:(t=e,function(){n(t)}),children:e.format("YYYY")},e.format("YYYY"));var t}))})};!function(e){e[e.hour=0]="hour",e[e.minutes=1]="minutes",e[e.seconds=2]="seconds"}(to||(to={}));var Do,wo=function(e){var t=e.selectDate,n=e.onChangeTime,r=e.onClose,i=_t(X(to.hour),2),o=i[0],a=i[1],u=_t(X(t.format("HH")),2),l=u[0],c=u[1],s=_t(X(t.format("mm")),2),f=s[0],d=s[1],h=_t(X(t.format("ss")),2),p=h[0],v=h[1],m=oe((function(){return o===to.hour?new Array(24).fill("00").map((function(e,t){return{value:t,degrees:t/12*360,offset:0===t||t>12,title:t?"".concat(t):e}})):new Array(60).fill("00").map((function(e,t){return{value:t,degrees:t/60*360,offset:!1,title:t?"".concat(t):e}}))}),[o,l,f,p]),y=oe((function(){switch(o){case to.hour:return+l/12*360;case to.minutes:return+f/60*360;case to.seconds:return+p/60*360}}),[o,l,f,p]),g=re(null),_=re(null),b=re(null),D=function(e){return function(t){!function(e,t){t.target.select(),a(e)}(e,t)}};return te((function(){n("".concat(l,":").concat(f,":").concat(p))}),[l,f,p]),te((function(){c(t.format("HH")),d(t.format("mm")),v(t.format("ss"))}),[t]),te((function(){g.current&&g.current.focus()}),[]),fr("div",{className:"vm-calendar-time-picker",children:[fr("div",{className:"vm-calendar-time-picker-clock",children:[fr("div",{className:Oi()({"vm-calendar-time-picker-clock__arrow":!0,"vm-calendar-time-picker-clock__arrow_offset":o===to.hour&&("00"===l||+l>12)}),style:{transform:"rotate(".concat(y,"deg)")}}),m.map((function(e){return fr("div",{className:Oi()({"vm-calendar-time-picker-clock__time":!0,"vm-calendar-time-picker-clock__time_offset":e.offset,"vm-calendar-time-picker-clock__time_hide":m.length>24&&e.value%5}),style:{transform:"rotate(".concat(e.degrees,"deg)")},onClick:(t=e.value,function(){var e=String(t);switch(o){case to.hour:c(e),_.current&&_.current.focus();break;case to.minutes:d(e),b.current&&b.current.focus();break;case to.seconds:v(e),r()}}),children:fr("span",{style:{transform:"rotate(-".concat(e.degrees,"deg)")},children:e.title})},e.value);var t}))]}),fr("div",{className:"vm-calendar-time-picker-fields",children:[fr("input",{className:"vm-calendar-time-picker-fields__input",value:l,onChange:function(e){var t=e.target,n=t.value,r=+n>23?"23":n;t.value=r,c(r),n.length>1&&_.current&&_.current.focus()},onFocus:D(to.hour),ref:g,type:"number",min:0,max:24}),fr("span",{children:":"}),fr("input",{className:"vm-calendar-time-picker-fields__input",value:f,onChange:function(e){var t=e.target,n=t.value,r=+n>59?"59":n;t.value=r,d(r),n.length>1&&b.current&&b.current.focus()},onFocus:D(to.minutes),ref:_,type:"number",min:0,max:60}),fr("span",{children:":"}),fr("input",{className:"vm-calendar-time-picker-fields__input",value:p,onChange:function(e){var t=e.target,n=t.value,i=+n>59?"59":n;t.value=i,v(i),n.length>1&&b.current&&r()},onFocus:D(to.seconds),ref:b,type:"number",min:0,max:60})]})]})},xo=[{value:"date",icon:fr(yi,{})},{value:"time",icon:fr(mi,{})}],ko=function(e){var t=e.date,n=e.timepicker,r=void 0!==n&&n,i=e.format,o=void 0===i?xr:i,a=e.onChange,u=e.onClose,l=_t(X(!1),2),c=l[0],s=l[1],f=_t(X(yr()(t)),2),d=f[0],h=f[1],p=_t(X(yr()(t)),2),v=p[0],y=p[1],g=_t(X(xo[0].value),2),_=g[0],b=g[1],D=function(e){h(e),s(!1)};return te((function(){v.format()!==yr()(t).format()&&a(v.format(o))}),[v]),fr("div",{className:"vm-calendar",children:["date"===_&&fr(yo,{viewDate:d,onChangeViewDate:D,toggleDisplayYears:function(){s((function(e){return!e}))},displayYears:c}),"date"===_&&fr(m,{children:[!c&&fr(_o,{viewDate:d,selectDate:v,onChangeSelectDate:function(e){y(e),r&&b("time")}}),c&&fr(bo,{viewDate:d,onChangeViewDate:D})]}),"time"===_&&fr(wo,{selectDate:v,onChangeTime:function(e){var t=_t(e.split(":"),3),n=t[0],r=t[1],i=t[2];y((function(e){return e.set("hour",+n).set("minute",+r).set("second",+i)}))},onClose:function(){u&&u()}}),r&&fr("div",{className:"vm-calendar__tabs",children:fr(Mi,{activeItem:_,items:xo,onChange:function(e){b(e)},indicatorPlacement:"top"})})]})},Co=Ce((function(e,t){var n=e.date,r=e.targetRef,i=e.format,o=void 0===i?xr:i,a=e.timepicker,u=e.onChange,l=_t(X(!1),2),c=l[0],s=l[1],f=oe((function(){return n?yr()(n):yr()()}),[n]),d=function(){s((function(e){return!e}))},h=function(){s(!1)},p=function(e){"Escape"!==e.key&&"Enter"!==e.key||h()};return te((function(){var e;return null===(e=r.current)||void 0===e||e.addEventListener("click",d),function(){var e;null===(e=r.current)||void 0===e||e.removeEventListener("click",d)}}),[r]),te((function(){return window.addEventListener("keyup",p),function(){window.removeEventListener("keyup",p)}}),[]),fr(m,{children:fr(so,{open:c,buttonRef:r,placement:"bottom-right",onClose:h,children:fr("div",{ref:t,children:fr(ko,{date:f,format:o,timepicker:a,onChange:function(e){a||h(),u(e)},onClose:h})})})})})),Eo=Co,Ao=function(){var e=re(null),t=mo(document.body),n=oe((function(){return t.width>1120}),[t]),r=_t(X(),2),i=r[0],o=r[1],a=_t(X(),2),u=a[0],l=a[1],c=oe((function(){return yr()(u).format(xr)}),[u]),s=oe((function(){return yr()(i).format(xr)}),[i]),f=Wr(),d=f.period,h=d.end,p=d.start,v=f.relativeTime,y=Qr(),g=er();te((function(){o(Mr(Pr(h)))}),[h]),te((function(){l(Mr(Pr(p)))}),[p]);var _=oe((function(){return{start:yr()(Pr(p)).format(xr),end:yr()(Pr(h)).format(xr)}}),[p,h]),b=oe((function(){return v&&"none"!==v?v.replace(/_/g," "):"".concat(_.start," - ").concat(_.end)}),[v,_]),D=re(null),w=re(null),x=re(null),k=re(null),C=_t(X(!1),2),E=C[0],A=C[1],S=re(null),F=function(){A(!1)};return co(e,(function(e){var t,n,r=e.target,i=(null===D||void 0===D?void 0:D.current)&&D.current.contains(r),o=(null===w||void 0===w?void 0:w.current)&&w.current.contains(r),a=(null===x||void 0===x?void 0:x.current)&&(null===x||void 0===x||null===(t=x.current)||void 0===t?void 0:t.contains(r)),u=(null===k||void 0===k?void 0:k.current)&&(null===k||void 0===k||null===(n=k.current)||void 0===n?void 0:n.contains(r));i||o||a||u||F()})),fr(m,{children:[fr("div",{ref:S,children:fr(fo,{title:"Time range controls",children:fr(lo,{className:g?"":"vm-header-button",variant:"contained",color:"primary",startIcon:fr(mi,{}),onClick:function(){A((function(e){return!e}))},children:n&&fr("span",{children:b})})})}),fr(so,{open:E,buttonRef:S,placement:"bottom-right",onClose:F,clickOutside:!1,children:fr("div",{className:"vm-time-selector",ref:e,children:[fr("div",{className:"vm-time-selector-left",children:[fr("div",{className:"vm-time-selector-left-inputs",children:[fr("div",{className:"vm-time-selector-left-inputs__date",ref:D,children:[fr("label",{children:"From:"}),fr("span",{children:c}),fr(yi,{}),fr(Eo,{ref:x,date:u||"",onChange:function(e){return l(e)},targetRef:D,timepicker:!0})]}),fr("div",{className:"vm-time-selector-left-inputs__date",ref:w,children:[fr("label",{children:"To:"}),fr("span",{children:s}),fr(yi,{}),fr(Eo,{ref:k,date:i||"",onChange:function(e){return o(e)},targetRef:w,timepicker:!0})]})]}),fr(lo,{variant:"text",startIcon:fr(gi,{}),onClick:function(){return y({type:"RUN_QUERY_TO_NOW"})},children:"switch to now"}),fr("div",{className:"vm-time-selector-left__controls",children:[fr(lo,{color:"error",variant:"outlined",onClick:function(){o(Mr(Pr(h))),l(Mr(Pr(p))),A(!1)},children:"Cancel"}),fr(lo,{color:"primary",onClick:function(){return u&&i&&y({type:"SET_PERIOD",payload:{from:new Date(u),to:new Date(i)}}),void A(!1)},children:"Apply"})]})]}),fr(vo,{relativeTime:v||"",setDuration:function(e){var t=e.duration,n=e.until,r=e.id;y({type:"SET_RELATIVE_TIME",payload:{duration:t,until:n,id:r}}),A(!1)}})]})})]})};!function(e){e.emptyServer="Please enter Server URL",e.validServer="Please provide a valid Server URL",e.validQuery="Please enter a valid Query and execute it"}(Do||(Do={}));var So=function(e){var t=e.label,n=e.value,r=e.type,i=void 0===r?"text":r,o=e.error,a=void 0===o?"":o,u=e.endIcon,l=e.startIcon,c=e.disabled,s=void 0!==c&&c,f=e.autofocus,d=void 0!==f&&f,h=e.helperText,p=e.onChange,v=e.onEnter,m=e.onKeyDown,y=re(null),g=re(null),_=oe((function(){return"textarea"===i?g:y}),[i]),b=Oi()({"vm-text-field__input":!0,"vm-text-field__input_error":a,"vm-text-field__input_icon-start":l,"vm-text-field__input_disabled":s,"vm-text-field__input_textarea":"textarea"===i}),D=function(e){m&&m(e),"Enter"!==e.key||e.shiftKey||(e.preventDefault(),v&&v())},w=function(e){s||p&&p(e.target.value)};return te((function(){var e;d&&(null===_||void 0===_||null===(e=_.current)||void 0===e?void 0:e.focus)&&_.current.focus()}),[_,d]),fr("label",{className:"vm-text-field","data-replicated-value":n,children:[l&&fr("div",{className:"vm-text-field__icon-start",children:l}),u&&fr("div",{className:"vm-text-field__icon-end",children:u}),"textarea"===i?fr("textarea",{className:b,disabled:s,ref:g,value:n,onInput:w,onKeyDown:D,rows:1}):fr("input",{className:b,disabled:s,ref:y,value:n,onInput:w,onKeyDown:D,type:i}),t&&fr("span",{className:"vm-text-field__label",children:t}),fr("span",{className:"vm-text-field__error","data-show":!!a,children:a}),h&&!a&&fr("span",{className:"vm-text-field__helper-text",children:h})]})},Fo=function(e){var t;try{t=new URL(e)}catch(g){return!1}return"http:"===t.protocol||"https:"===t.protocol},No=function(e){var t=e.setServer,n=e.onEnter,r=hr().serverUrl,i=_t(X(""),2),o=i[0],a=i[1],u=_t(X(r),2),l=u[0],c=u[1];return fr(So,{autofocus:!0,label:"Server URL",value:l,error:o,onChange:function(e){var n=e||"";c(n),t(n),a(""),n||a(Do.emptyServer),Fo(n)||a(Do.validServer)},onEnter:function(){n(l)}})},Oo=function(e){var t=e.title,n=e.children,r=e.onClose,i=function(e){"Escape"===e.key&&r()};return te((function(){return window.addEventListener("keyup",i),function(){window.removeEventListener("keyup",i)}}),[]),mt.createPortal(fr("div",{className:"vm-modal",onMouseDown:r,children:fr("div",{className:"vm-modal-content",children:[fr("div",{className:"vm-modal-content-header",children:[t&&fr("div",{className:"vm-modal-content-header__title",children:t}),fr("div",{className:"vm-modal-header__close",children:fr(lo,{variant:"text",size:"small",onClick:r,children:fr(ai,{})})})]}),fr("div",{className:"vm-modal-content-body",onMouseDown:function(e){e.stopPropagation()},children:n})]})}),document.body)},To="Setting Server URL",Bo=function(){var e=hr().serverUrl,t=pr(),n=_t(X(e),2),r=n[0],i=n[1],o=function(e){t({type:"SET_SERVER",payload:e||r}),c()},a=_t(X(!1),2),u=a[0],l=a[1],c=function(){return l(!1)};return fr(m,{children:[fr(fo,{title:To,children:fr(lo,{className:"vm-header-button",variant:"contained",color:"primary",startIcon:fr(oi,{}),onClick:function(){return l(!0)}})}),u&&fr(Oo,{title:To,onClose:c,children:fr("div",{className:"vm-server-configurator",children:[fr("div",{className:"vm-server-configurator__input",children:fr(No,{setServer:i,onEnter:o})}),fr("div",{className:"vm-server-configurator__footer",children:[fr(lo,{variant:"outlined",color:"error",onClick:c,children:"Cancel"}),fr(lo,{variant:"contained",onClick:function(){o()},children:"apply"})]})]})})]})},Mo={windows:"Windows",mac:"Mac OS",linux:"Linux"},Lo=(Object.values(Mo).find((function(e){return navigator.userAgent.indexOf(e)>=0}))||"unknown")===Mo.mac?"Cmd":"Ctrl",Po=[{title:"Query",list:[{keys:["Enter"],description:"Run"},{keys:["Shift","Enter"],description:"Multi-line queries"},{keys:[Lo,"Arrow Up"],description:"Previous command from the Query history"},{keys:[Lo,"Arrow Down"],description:"Next command from the Query history"}]},{title:"Graph",list:[{keys:[Lo,"Scroll Up"],description:"Zoom in"},{keys:[Lo,"Scroll Down"],description:"Zoom out"},{keys:[Lo,"Click and Drag"],description:"Move the graph left/right"}]},{title:"Legend",list:[{keys:["Mouse Click"],description:"Select series"},{keys:[Lo,"Mouse Click"],description:"Toggle multiple series"}]}],$o=function(){var e=_t(X(!1),2),t=e[0],n=e[1],r=er();return fr(m,{children:[fr(fo,{title:"Shortcut keys",placement:"bottom-center",children:fr(lo,{className:r?"":"vm-header-button",variant:"contained",color:"primary",startIcon:fr(_i,{}),onClick:function(){n(!0)}})}),t&&fr(Oo,{title:"Shortcut keys",onClose:function(){n(!1)},children:fr("div",{className:"vm-shortcuts",children:Po.map((function(e){return fr("div",{className:"vm-shortcuts-section",children:[fr("h3",{className:"vm-shortcuts-section__title",children:e.title}),fr("div",{className:"vm-shortcuts-section-list",children:e.list.map((function(e){return fr("div",{className:"vm-shortcuts-section-list-item",children:[fr("div",{className:"vm-shortcuts-section-list-item__key",children:e.keys.map((function(t,n){return fr(m,{children:[fr("code",{children:t},t),n!==e.keys.length-1?"+":""]})}))}),fr("p",{className:"vm-shortcuts-section-list-item__description",children:e.description})]},e.keys.join("+"))}))})]},e.title)}))})})]})},Ro=function(){var e=er(),t=re(null),n=Ji().date,r=Ki(),i=oe((function(){return yr()(n).format(wr)}),[n]);return fr("div",{children:[fr("div",{ref:t,children:fr(fo,{title:"Date control",children:fr(lo,{className:e?"":"vm-header-button",variant:"contained",color:"primary",startIcon:fr(yi,{}),children:i})})}),fr(Eo,{date:n||"",format:wr,onChange:function(e){r({type:"SET_DATE",payload:e})},targetRef:t})]})},Io=function(){var e=Ti("color-primary"),t=er(),n=Xn().headerStyles,r=(n=void 0===n?{}:n).background,i=void 0===r?t?"#FFF":e:r,o=n.color,a=void 0===o?t?e:"#FFF":o,u=An(),l=En(),c=l.search,s=l.pathname,f=oe((function(){return[{label:"Custom panel",value:Zn.home},{label:"Dashboards",value:Zn.dashboards,hide:t},{label:"Cardinality",value:Zn.cardinality},{label:"Top queries",value:Zn.topQueries}]}),[t]),d=_t(X(s),2),h=d[0],p=d[1],v=oe((function(){return(Gn[s]||{}).header||{}}),[s]),m=function(e){u({pathname:e,search:c})};return te((function(){p(s)}),[s]),fr("header",{className:Oi()({"vm-header":!0,"vm-header_app":t}),style:{background:i,color:a},children:[!t&&fr("div",{className:"vm-header-logo",style:{color:a},children:[fr("div",{className:"vm-header-logo__icon",onClick:function(){m(Zn.home),ar({}),window.location.reload()},children:fr(ii,{})}),fr("a",{className:"vm-header-logo__issue",target:"_blank",href:"https://github.com/VictoriaMetrics/VictoriaMetrics/issues/new",rel:"noreferrer",children:"create an issue"})]}),fr("div",{className:"vm-header-nav",children:fr(Mi,{activeItem:h,items:f.filter((function(e){return!e.hide})),color:a,onChange:function(e){p(e),u(e)}})}),fr("div",{className:"vm-header__settings",children:[(null===v||void 0===v?void 0:v.timeSelector)&&fr(Ao,{}),(null===v||void 0===v?void 0:v.cardinalityDatePicker)&&fr(Ro,{}),(null===v||void 0===v?void 0:v.executionControls)&&fr(po,{}),(null===v||void 0===v?void 0:v.globalSettings)&&!t&&fr(Bo,{}),fr($o,{})]})]})},jo=function(){var e=er();return fr("section",{className:"vm-container",children:[fr(Io,{}),fr("div",{className:Oi()({"vm-container-body":!0,"vm-container-body_app":e}),children:fr($n,{})})]})};function zo(e,t){var n="undefined"!==typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(!n){if(Array.isArray(e)||(n=gt(e))||t&&e&&"number"===typeof e.length){n&&(e=n);var r=0,i=function(){};return{s:i,n:function(){return r>=e.length?{done:!0}:{done:!1,value:e[r++]}},e:function(e){throw e},f:i}}throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}var o,a=!0,u=!1;return{s:function(){n=n.call(e)},n:function(){var e=n.next();return a=e.done,e},e:function(e){u=!0,o=e},f:function(){try{a||null==n.return||n.return()}finally{if(u)throw o}}}}var Uo,Ho,Yo="u-off",Vo="u-label",qo="width",Wo="height",Qo="top",Go="bottom",Zo="left",Jo="right",Ko="#000",Xo="#0000",ea="mousemove",ta="mousedown",na="mouseup",ra="mouseenter",ia="mouseleave",oa="dblclick",aa="change",ua="dppxchange",la="undefined"!=typeof window,ca=la?document:null,sa=la?window:null,fa=la?navigator:null;function da(e,t){if(null!=t){var n=e.classList;!n.contains(t)&&n.add(t)}}function ha(e,t){var n=e.classList;n.contains(t)&&n.remove(t)}function pa(e,t,n){e.style[t]=n+"px"}function va(e,t,n,r){var i=ca.createElement(e);return null!=t&&da(i,t),null!=n&&n.insertBefore(i,r),i}function ma(e,t){return va("div",e,t)}var ya=new WeakMap;function ga(e,t,n,r,i){var o="translate("+t+"px,"+n+"px)";o!=ya.get(e)&&(e.style.transform=o,ya.set(e,o),t<0||n<0||t>r||n>i?da(e,Yo):ha(e,Yo))}var _a=new WeakMap;function ba(e,t,n){var r=t+n;r!=_a.get(e)&&(_a.set(e,r),e.style.background=t,e.style.borderColor=n)}var Da=new WeakMap;function wa(e,t,n,r){var i=t+""+n;i!=Da.get(e)&&(Da.set(e,i),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)}var xa={passive:!0},ka=Kn(Kn({},xa),{},{capture:!0});function Ca(e,t,n,r){t.addEventListener(e,n,r?ka:xa)}function Ea(e,t,n,r){t.removeEventListener(e,n,r?ka:xa)}function Aa(e,t,n,r){var i;n=n||0;for(var o=(r=r||t.length-1)<=2147483647;r-n>1;)t[i=o?n+r>>1:qa((n+r)/2)]=t&&i<=n;i+=r)if(null!=e[i])return i;return-1}function Fa(e,t,n,r){var i=nu,o=-nu;if(1==r)i=e[t],o=e[n];else if(-1==r)i=e[n],o=e[t];else for(var a=t;a<=n;a++)null!=e[a]&&(i=Ga(i,e[a]),o=Za(o,e[a]));return[i,o]}function Na(e,t,n){for(var r=nu,i=-nu,o=t;o<=n;o++)e[o]>0&&(r=Ga(r,e[o]),i=Za(i,e[o]));return[r==nu?1:r,i==-nu?10:i]}la&&function e(){var t=devicePixelRatio;Uo!=t&&(Uo=t,Ho&&Ea(aa,Ho,e),Ho=matchMedia("(min-resolution: ".concat(Uo-.001,"dppx) and (max-resolution: ").concat(Uo+.001,"dppx)")),Ca(aa,Ho,e),sa.dispatchEvent(new CustomEvent(ua)))}();var Oa=[0,0];function Ta(e,t,n,r){return Oa[0]=n<0?pu(e,-n):e,Oa[1]=r<0?pu(t,-r):t,Oa}function Ba(e,t,n,r){var i,o,a,u=Ka(e),l=10==n?Xa:eu;return e==t&&(-1==u?(e*=n,t/=n):(e/=n,t*=n)),r?(i=qa(l(e)),o=Qa(l(t)),e=(a=Ta(Ja(n,i),Ja(n,o),i,o))[0],t=a[1]):(i=qa(l(Va(e))),o=qa(l(Va(t))),e=hu(e,(a=Ta(Ja(n,i),Ja(n,o),i,o))[0]),t=du(t,a[1])),[e,t]}function Ma(e,t,n,r){var i=Ba(e,t,n,r);return 0==e&&(i[0]=0),0==t&&(i[1]=0),i}var La={mode:3,pad:.1},Pa={pad:0,soft:null,mode:0},$a={min:Pa,max:Pa};function Ra(e,t,n,r){return xu(n)?ja(e,t,n):(Pa.pad=n,Pa.soft=r?0:null,Pa.mode=r?3:0,ja(e,t,$a))}function Ia(e,t){return null==e?t:e}function ja(e,t,n){var r=n.min,i=n.max,o=Ia(r.pad,0),a=Ia(i.pad,0),u=Ia(r.hard,-nu),l=Ia(i.hard,nu),c=Ia(r.soft,nu),s=Ia(i.soft,-nu),f=Ia(r.mode,0),d=Ia(i.mode,0),h=t-e;h<1e-9&&(h=0,0!=e&&0!=t||(h=1e-9,2==f&&c!=nu&&(o=0),2==d&&s!=-nu&&(a=0)));var p=h||Va(t)||1e3,v=Xa(p),m=Ja(10,qa(v)),y=pu(hu(e-p*(0==h?0==e?.1:1:o),m/10),9),g=e>=c&&(1==f||3==f&&y<=c||2==f&&y>=c)?c:nu,_=Za(u,y=g?g:Ga(g,y)),b=pu(du(t+p*(0==h?0==t?.1:1:a),m/10),9),D=t<=s&&(1==d||3==d&&b>=s||2==d&&b<=s)?s:-nu,w=Ga(l,b>D&&t<=D?D:Za(D,b));return _==w&&0==_&&(w=100),[_,w]}var za=new Intl.NumberFormat(la?fa.language:"en-US"),Ua=function(e){return za.format(e)},Ha=Math,Ya=Ha.PI,Va=Ha.abs,qa=Ha.floor,Wa=Ha.round,Qa=Ha.ceil,Ga=Ha.min,Za=Ha.max,Ja=Ha.pow,Ka=Ha.sign,Xa=Ha.log10,eu=Ha.log2,tu=function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:1;return Ha.asinh(e/t)},nu=1/0;function ru(e){return 1+(0|Xa((e^e>>31)-(e>>31)))}function iu(e,t){return Wa(e/t)*t}function ou(e,t,n){return Ga(Za(e,t),n)}function au(e){return"function"==typeof e?e:function(){return e}}var uu=function(e){return e},lu=function(e,t){return t},cu=function(e){return null},su=function(e){return!0},fu=function(e,t){return e==t};function du(e,t){return Qa(e/t)*t}function hu(e,t){return qa(e/t)*t}function pu(e,t){return Wa(e*(t=Math.pow(10,t)))/t}var vu=new Map;function mu(e){return((""+e).split(".")[1]||"").length}function yu(e,t,n,r){for(var i=[],o=r.map(mu),a=t;a=0&&a>=0?0:u)+(a>=o[c]?0:o[c]),d=pu(s,f);i.push(d),vu.set(d,f)}return i}var gu={},_u=[],bu=[null,null],Du=Array.isArray;function wu(e){return"string"==typeof e}function xu(e){var t=!1;if(null!=e){var n=e.constructor;t=null==n||n==Object}return t}function ku(e){return null!=e&&"object"==typeof e}var Cu=Object.getPrototypeOf(Uint8Array);function Eu(e){var t,n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:xu;if(Du(e)){var r=e.find((function(e){return null!=e}));if(Du(r)||n(r)){t=Array(e.length);for(var i=0;io){for(r=a-1;r>=0&&null==e[r];)e[r--]=null;for(r=a+1;r12?t-12:t},AA:function(e){return e.getHours()>=12?"PM":"AM"},aa:function(e){return e.getHours()>=12?"pm":"am"},a:function(e){return e.getHours()>=12?"p":"a"},mm:function(e){return Pu(e.getMinutes())},m:function(e){return e.getMinutes()},ss:function(e){return Pu(e.getSeconds())},s:function(e){return e.getSeconds()},fff:function(e){return((t=e.getMilliseconds())<10?"00":t<100?"0":"")+t;var t}};function Ru(e,t){t=t||Lu;for(var n,r=[],i=/\{([a-z]+)\}|[^{]+/gi;n=i.exec(e);)r.push("{"==n[0][0]?$u[n[1]]:n[0]);return function(e){for(var n="",i=0;i=a,v=f>=o&&f=i?i:f,N=_+(qa(c)-qa(y))+du(y-_,F);h.push(N);for(var O=t(N),T=O.getHours()+O.getMinutes()/n+O.getSeconds()/r,B=f/r,M=d/u.axes[l]._space;!((N=pu(N+f,1==e?0:3))>s);)if(B>1){var L=qa(pu(T+B,6))%24,P=t(N).getHours()-L;P>1&&(P=-1),T=(T+B)%24,pu(((N-=P*r)-h[h.length-1])/f,3)*M>=.7&&h.push(N)}else h.push(N)}return h}}]}var rl=_t(nl(1),3),il=rl[0],ol=rl[1],al=rl[2],ul=_t(nl(.001),3),ll=ul[0],cl=ul[1],sl=ul[2];function fl(e,t){return e.map((function(e){return e.map((function(n,r){return 0==r||8==r||null==n?n:t(1==r||0==e[8]?n:e[1]+n)}))}))}function dl(e,t){return function(n,r,i,o,a){var u,l,c,s,f,d,h=t.find((function(e){return a>=e[0]}))||t[t.length-1];return r.map((function(t){var n=e(t),r=n.getFullYear(),i=n.getMonth(),o=n.getDate(),a=n.getHours(),p=n.getMinutes(),v=n.getSeconds(),m=r!=u&&h[2]||i!=l&&h[3]||o!=c&&h[4]||a!=s&&h[5]||p!=f&&h[6]||v!=d&&h[7]||h[1];return u=r,l=i,c=o,s=a,f=p,d=v,m(n)}))}}function hl(e,t,n){return new Date(e,t,n)}function pl(e,t){return t(e)}yu(2,-53,53,[1]);function vl(e,t){return function(n,r){return t(e(r))}}var ml={show:!0,live:!0,isolate:!1,markers:{show:!0,width:2,stroke:function(e,t){var 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:[]};var yl=[0,0];function gl(e,t,n){return function(e){0==e.button&&n(e)}}function _l(e,t,n){return n}var bl={show:!0,x:!0,y:!0,lock:!1,move:function(e,t,n){return yl[0]=t,yl[1]=n,yl},points:{show:function(e,t){var n=e.cursor.points,r=ma(),i=n.size(e,t);pa(r,qo,i),pa(r,Wo,i);var o=i/-2;pa(r,"marginLeft",o),pa(r,"marginTop",o);var a=n.width(e,t,i);return a&&pa(r,"borderWidth",a),r},size:function(e,t){return jl(e.series[t].points.width,1)},width:0,stroke:function(e,t){var n=e.series[t].points;return n._stroke||n._fill},fill:function(e,t){var n=e.series[t].points;return n._fill||n._stroke}},bind:{mousedown:gl,mouseup:gl,click:gl,dblclick:gl,mousemove:_l,mouseleave:_l,mouseenter:_l},drag:{setScale:!0,x:!0,y:!1,dist:0,uni:null,_x:!1,_y:!1},focus:{prox:-1},left:-10,top:-10,idx:null,dataIdx:function(e,t,n){return n},idxs:null},Dl={show:!0,stroke:"rgba(0,0,0,0.07)",width:2},wl=Au({},Dl,{filter:lu}),xl=Au({},wl,{size:10}),kl=Au({},Dl,{show:!1}),Cl='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"',El="bold "+Cl,Al={show:!0,scale:"x",stroke:Ko,space:50,gap:5,size:50,labelGap:0,labelSize:30,labelFont:El,side:2,grid:wl,ticks:xl,border:kl,font:Cl,rotate:0},Sl={show:!0,scale:"x",auto:!1,sorted:1,min:nu,max:-nu,idxs:[]};function Fl(e,t,n,r,i){return t.map((function(e){return null==e?"":Ua(e)}))}function Nl(e,t,n,r,i,o,a){for(var u=[],l=vu.get(i)||0,c=n=a?n:pu(du(n,i),l);c<=r;c=pu(c+i,l))u.push(Object.is(c,-0)?0:c);return u}function Ol(e,t,n,r,i,o,a){var u=[],l=e.scales[e.axes[t].scale].log,c=qa((10==l?Xa:eu)(n));i=Ja(l,c),c<0&&(i=pu(i,-c));var s=n;do{u.push(s),(s=pu(s+i,vu.get(i)))>=i*l&&(i=s)}while(s<=r);return u}function Tl(e,t,n,r,i,o,a){var u=e.scales[e.axes[t].scale].asinh,l=r>u?Ol(e,t,Za(u,n),r,i):[u],c=r>=0&&n<=0?[0]:[];return(n<-u?Ol(e,t,Za(u,-r),-n,i):[u]).reverse().map((function(e){return-e})).concat(c,l)}var Bl=/./,Ml=/[12357]/,Ll=/[125]/,Pl=/1/;function $l(e,t,n,r,i){var o=e.axes[n],a=o.scale,u=e.scales[a];if(3==u.distr&&2==u.log)return t;var l=e.valToPos,c=o._space,s=l(10,a),f=l(9,a)-s>=c?Bl:l(7,a)-s>=c?Ml:l(5,a)-s>=c?Ll:Pl;return t.map((function(e){return 4==u.distr&&0==e||f.test(e)?e:null}))}function Rl(e,t){return null==t?"":Ua(t)}var Il={show:!0,scale:"y",stroke:Ko,space:30,gap:5,size:50,labelGap:0,labelSize:30,labelFont:El,side:3,grid:wl,ticks:xl,border:kl,font:Cl,rotate:0};function jl(e,t){return pu((3+2*(e||1))*t,3)}var zl={scale:null,auto:!0,sorted:0,min:nu,max:-nu},Ul={show:!0,auto:!0,sorted:0,alpha:1,facets:[Au({},zl,{scale:"x"}),Au({},zl,{scale:"y"})]},Hl={scale:"y",auto:!0,sorted:0,show:!0,spanGaps:!1,gaps:function(e,t,n,r,i){return i},alpha:1,points:{show:function(e,t){var n=e.series[0],r=n.scale,i=n.idxs,o=e._data[0],a=e.valToPos(o[i[0]],r,!0),u=e.valToPos(o[i[1]],r,!0),l=Va(u-a)/(e.series[t].points.space*Uo);return i[1]-i[0]<=l},filter:null},values:null,min:nu,max:-nu,idxs:[],path:null,clip:null};function Yl(e,t,n,r,i){return n/10}var Vl={time:!0,auto:!0,distr:1,log:10,asinh:1,min:null,max:null,dir:1,ori:0},ql=Au({},Vl,{time:!1,ori:1}),Wl={};function Ql(e,t){var n=Wl[e];return n||(n={key:e,plots:[],sub:function(e){n.plots.push(e)},unsub:function(e){n.plots=n.plots.filter((function(t){return t!=e}))},pub:function(e,t,r,i,o,a,u){for(var l=0;l0){a=new Path2D;for(var u=0==t?uc:lc,l=n,c=0;cs[0]){var f=s[0]-l;f>0&&u(a,l,r,f,r+o),l=s[1]}}var d=n+i-l;d>0&&u(a,l,r,d,r+o)}return a}function ec(e,t,n,r,i,o,a){for(var u=[],l=1==i?n:r;l>=n&&l<=r;l+=i){if(null===t[l]){var c=l,s=l;if(1==i)for(;++l<=r&&null===t[l];)s=l;else for(;--l>=n&&null===t[l];)s=l;var f=o(e[c]),d=s==c?f:o(e[s]);f=a<=0?o(e[c-i]):f,(d=a>=0?o(e[s+i]):d)>=f&&u.push([f,d])}}return u}function tc(e){return 0==e?uu:1==e?Wa:function(t){return iu(t,e)}}function nc(e){var t=0==e?rc:ic,n=0==e?function(e,t,n,r,i,o){e.arcTo(t,n,r,i,o)}:function(e,t,n,r,i,o){e.arcTo(n,t,i,r,o)},r=0==e?function(e,t,n,r,i){e.rect(t,n,r,i)}:function(e,t,n,r,i){e.rect(n,t,i,r)};return function(e,i,o,a,u){var l=arguments.length>5&&void 0!==arguments[5]?arguments[5]:0;0==l?r(e,i,o,a,u):(l=Ga(l,a/2,u/2),t(e,i+l,o),n(e,i+a,o,i+a,o+u,l),n(e,i+a,o+u,i,o+u,l),n(e,i,o+u,i,o,l),n(e,i,o,i+a,o,l),e.closePath())}}var rc=function(e,t,n){e.moveTo(t,n)},ic=function(e,t,n){e.moveTo(n,t)},oc=function(e,t,n){e.lineTo(t,n)},ac=function(e,t,n){e.lineTo(n,t)},uc=nc(0),lc=nc(1),cc=function(e,t,n,r,i,o){e.arc(t,n,r,i,o)},sc=function(e,t,n,r,i,o){e.arc(n,t,r,i,o)},fc=function(e,t,n,r,i,o,a){e.bezierCurveTo(t,n,r,i,o,a)},dc=function(e,t,n,r,i,o,a){e.bezierCurveTo(n,t,i,r,a,o)};function hc(e){return function(e,t,n,r,i){return Gl(e,t,(function(t,o,a,u,l,c,s,f,d,h,p){var v,m,y=t.pxRound,g=t.points;0==u.ori?(v=rc,m=cc):(v=ic,m=sc);var _=pu(g.width*Uo,3),b=(g.size-g.width)/2*Uo,D=pu(2*b,3),w=new Path2D,x=new Path2D,k=e.bbox,C=k.left,E=k.top,A=k.width,S=k.height;uc(x,C-D,E-D,A+2*D,S+2*D);var F=function(e){if(null!=a[e]){var t=y(c(o[e],u,h,f)),n=y(s(a[e],l,p,d));v(w,t+b,n),m(w,t,n,b,0,2*Ya)}};if(i)i.forEach(F);else for(var N=n;N<=r;N++)F(N);return{stroke:_>0?w:null,fill:w,clip:x,flags:3}}))}}function pc(e){return function(t,n,r,i,o,a){r!=i&&(o!=r&&a!=r&&e(t,n,r),o!=i&&a!=i&&e(t,n,i),e(t,n,a))}}var vc=pc(oc),mc=pc(ac);function yc(e){var t=Ia(null===e||void 0===e?void 0:e.alignGaps,0);return function(e,n,r,i){return Gl(e,n,(function(o,a,u,l,c,s,f,d,h,p,v){var m,y,g=o.pxRound,_=function(e){return g(s(e,l,p,d))},b=function(e){return g(f(e,c,v,h))};0==l.ori?(m=oc,y=vc):(m=ac,y=mc);for(var D,w,x,k=l.dir*(0==l.ori?1:-1),C={stroke:new Path2D,fill:null,clip:null,band:null,gaps:null,flags:1},E=C.stroke,A=nu,S=-nu,F=_(a[1==k?r:i]),N=Sa(u,r,i,1*k),O=Sa(u,r,i,-1*k),T=_(a[N]),B=_(a[O]),M=1==k?r:i;M>=r&&M<=i;M+=k){var L=_(a[M]);L==F?null!=u[M]&&(w=b(u[M]),A==nu&&(m(E,L,w),D=w),A=Ga(w,A),S=Za(w,S)):(A!=nu&&(y(E,F,A,S,D,w),x=F),null!=u[M]?(m(E,L,w=b(u[M])),A=S=D=w):(A=nu,S=-nu),F=L)}A!=nu&&A!=S&&x!=F&&y(E,F,A,S,D,w);var P=_t(Zl(e,n),2),$=P[0],R=P[1];if(null!=o.fill||0!=$){var I=C.fill=new Path2D(E),j=b(o.fillTo(e,n,o.min,o.max,$));m(I,B,j),m(I,T,j)}if(!o.spanGaps){var z,U=[];(z=U).push.apply(z,bt(ec(a,u,r,i,k,_,t))),C.gaps=U=o.gaps(e,n,r,i,U),C.clip=Xl(U,l.ori,d,h,p,v)}return 0!=R&&(C.band=2==R?[Kl(e,n,r,i,E,-1),Kl(e,n,r,i,E,1)]:Kl(e,n,r,i,E,R)),C}))}}function gc(e,t,n,r,i,o){var a=e.length;if(a<2)return null;var u=new Path2D;if(n(u,e[0],t[0]),2==a)r(u,e[1],t[1]);else{for(var l=Array(a),c=Array(a-1),s=Array(a-1),f=Array(a-1),d=0;d0!==c[h]>0?l[h]=0:(l[h]=3*(f[h-1]+f[h])/((2*f[h]+f[h-1])/c[h-1]+(f[h]+2*f[h-1])/c[h]),isFinite(l[h])||(l[h]=0));l[a-1]=c[a-2];for(var p=0;p=i&&o+(l<5?vu.get(l):0)<=17)return[l,c]}while(++u0?e:t.clamp(r,e,t.min,t.max,t.key)):4==t.distr?tu(e,t.asinh):e)-t._min)/(t._max-t._min)}function a(e,t,n,r){var i=o(e,t);return r+n*(-1==t.dir?1-i:i)}function u(e,t,n,r){var i=o(e,t);return r+n*(-1==t.dir?i:1-i)}function l(e,t,n,r){return 0==t.ori?a(e,t,n,r):u(e,t,n,r)}r.valToPosH=a,r.valToPosV=u;var c=!1;r.status=0;var s=r.root=ma("uplot");(null!=e.id&&(s.id=e.id),da(s,e.class),e.title)&&(ma("u-title",s).textContent=e.title);var f=va("canvas"),d=r.ctx=f.getContext("2d"),h=ma("u-wrap",s),p=r.under=ma("u-under",h);h.appendChild(f);var v=r.over=ma("u-over",h),m=+Ia((e=Eu(e)).pxAlign,1),y=tc(m);(e.plugins||[]).forEach((function(t){t.opts&&(e=t.opts(r,e)||e)}));var g=e.ms||.001,_=r.series=1==i?xc(e.series||[],Sl,Hl,!1):function(e,t){return e.map((function(e,n){return 0==n?null:Au({},t,e)}))}(e.series||[null],Ul),b=r.axes=xc(e.axes||[],Al,Il,!0),D=r.scales={},w=r.bands=e.bands||[];w.forEach((function(e){e.fill=au(e.fill||null),e.dir=Ia(e.dir,-1)}));var x=2==i?_[1].facets[0].scale:_[0].scale,k={axes:function(){for(var e=function(e){var t=b[e];if(!t.show||!t._show)return"continue";var n=t.side,i=n%2,o=void 0,a=void 0,u=t.stroke(r,e),c=0==n||3==n?-1:1;if(t.label){var s=t.labelGap*c,f=Wa((t._lpos+s)*Uo);Je(t.labelFont[0],u,"center",2==n?Qo:Go),d.save(),1==i?(o=a=0,d.translate(f,Wa(de+pe/2)),d.rotate((3==n?-Ya:Ya)/2)):(o=Wa(fe+he/2),a=f),d.fillText(t.label,o,a),d.restore()}var h=_t(t._found,2),p=h[0],v=h[1];if(0==v)return"continue";var m=D[t.scale],g=0==i?he:pe,_=0==i?fe:de,w=Wa(t.gap*Uo),x=t._splits,k=2==m.distr?x.map((function(e){return qe[e]})):x,C=2==m.distr?qe[x[1]]-qe[x[0]]:p,E=t.ticks,A=t.border,S=E.show?Wa(E.size*Uo):0,F=t._rotate*-Ya/180,N=y(t._pos*Uo),O=N+(S+w)*c;a=0==i?O:0,o=1==i?O:0,Je(t.font[0],u,1==t.align?Zo:2==t.align?Jo:F>0?Zo:F<0?Jo:0==i?"center":3==n?Jo:Zo,F||1==i?"middle":2==n?Qo:Go);for(var T=1.5*t.font[1],B=x.map((function(e){return y(l(e,m,g,_))})),M=t._values,L=0;L0&&(_.forEach((function(e,n){if(n>0&&e.show&&null==e._paths){var i=function(e){var t=ou(He-1,0,Ne-1),n=ou(Ye+1,0,Ne-1);for(;null==e[t]&&t>0;)t--;for(;null==e[n]&&n0&&e.show){je!=e.alpha&&(d.globalAlpha=je=e.alpha),Xe(t,!1),e._paths&&et(t,!1),Xe(t,!0);var n=e.points.show(r,t,He,Ye),i=e.points.filter(r,t,n,e._paths?e._paths.gaps:null);(n||i)&&(e.points._paths=e.points.paths(r,t,He,Ye,i),et(t,!0)),1!=je&&(d.globalAlpha=je=1),on("drawSeries",t)}})))}},C=(e.drawOrder||["axes","series"]).map((function(e){return k[e]}));function E(t){var n=D[t];if(null==n){var r=(e.scales||gu)[t]||gu;if(null!=r.from)E(r.from),D[t]=Au({},D[r.from],r,{key:t});else{(n=D[t]=Au({},t==x?Vl:ql,r)).key=t;var o=n.time,a=n.range,u=Du(a);if((t!=x||2==i&&!o)&&(!u||null!=a[0]&&null!=a[1]||(a={min:null==a[0]?La:{mode:1,hard:a[0],soft:a[0]},max:null==a[1]?La:{mode:1,hard:a[1],soft:a[1]}},u=!1),!u&&xu(a))){var l=a;a=function(e,t,n){return null==t?bu:Ra(t,n,l)}}n.range=au(a||(o?Ec:t==x?3==n.distr?Fc:4==n.distr?Oc:Cc:3==n.distr?Sc:4==n.distr?Nc:Ac)),n.auto=au(!u&&n.auto),n.clamp=au(n.clamp||Yl),n._min=n._max=null}}}for(var A in E("x"),E("y"),1==i&&_.forEach((function(e){E(e.scale)})),b.forEach((function(e){E(e.scale)})),e.scales)E(A);var S,F,N=D[x],O=N.distr;0==N.ori?(da(s,"u-hz"),S=a,F=u):(da(s,"u-vt"),S=u,F=a);var T={};for(var B in D){var M=D[B];null==M.min&&null==M.max||(T[B]={min:M.min,max:M.max},M.min=M.max=null)}var L,P=e.tzDate||function(e){return new Date(Wa(e/g))},$=e.fmtDate||Ru,R=1==g?al(P):sl(P),I=dl(P,fl(1==g?ol:cl,$)),j=vl(P,pl("{YYYY}-{MM}-{DD} {h}:{mm}{aa}",$)),z=[],U=r.legend=Au({},ml,e.legend),H=U.show,Y=U.markers;U.idxs=z,Y.width=au(Y.width),Y.dash=au(Y.dash),Y.stroke=au(Y.stroke),Y.fill=au(Y.fill);var V,q=[],W=[],Q=!1,G={};if(U.live){var Z=_[1]?_[1].values:null;for(var J in V=(Q=null!=Z)?Z(r,1,0):{_:0})G[J]="--"}if(H)if(L=va("table","u-legend",s),Q){var K=va("tr","u-thead",L);for(var X in va("th",null,K),V)va("th",Vo,K).textContent=X}else da(L,"u-inline"),U.live&&da(L,"u-live");var ee={show:!0},te={show:!1};var ne=new Map;function re(e,t,n){var i=ne.get(t)||{},o=we.bind[e](r,t,n);o&&(Ca(e,t,i[e]=o),ne.set(t,i))}function ie(e,t,n){var r=ne.get(t)||{};for(var i in r)null!=e&&i!=e||(Ea(i,t,r[i]),delete r[i]);null==e&&ne.delete(t)}var oe=0,ae=0,ue=0,le=0,ce=0,se=0,fe=0,de=0,he=0,pe=0;r.bbox={};var ve=!1,me=!1,ye=!1,ge=!1,_e=!1;function be(e,t,n){(n||e!=r.width||t!=r.height)&&De(e,t),ut(!1),ye=!0,me=!0,ge=_e=we.left>=0,wt()}function De(e,t){r.width=oe=ue=e,r.height=ae=le=t,ce=se=0,function(){var e=!1,t=!1,n=!1,r=!1;b.forEach((function(i,o){if(i.show&&i._show){var a=i.side,u=a%2,l=i._size+(null!=i.label?i.labelSize:0);l>0&&(u?(ue-=l,3==a?(ce+=l,r=!0):n=!0):(le-=l,0==a?(se+=l,e=!0):t=!0))}})),Se[0]=e,Se[1]=n,Se[2]=t,Se[3]=r,ue-=Ue[1]+Ue[3],ce+=Ue[3],le-=Ue[2]+Ue[0],se+=Ue[0]}(),function(){var e=ce+ue,t=se+le,n=ce,r=se;function i(i,o){switch(i){case 1:return(e+=o)-o;case 2:return(t+=o)-o;case 3:return(n-=o)+o;case 0:return(r-=o)+o}}b.forEach((function(e,t){if(e.show&&e._show){var n=e.side;e._pos=i(n,e._size),null!=e.label&&(e._lpos=i(n,e.labelSize))}}))}();var n=r.bbox;fe=n.left=iu(ce*Uo,.5),de=n.top=iu(se*Uo,.5),he=n.width=iu(ue*Uo,.5),pe=n.height=iu(le*Uo,.5)}r.setSize=function(e){be(e.width,e.height)};var we=r.cursor=Au({},bl,{drag:{y:2==i}},e.cursor);we.idxs=z,we._lock=!1;var xe=we.points;xe.show=au(xe.show),xe.size=au(xe.size),xe.stroke=au(xe.stroke),xe.width=au(xe.width),xe.fill=au(xe.fill);var ke=r.focus=Au({},e.focus||{alpha:.3},we.focus),Ce=ke.prox>=0,Ee=[null];function Ae(e,t){if(1==i||t>0){var n=1==i&&D[e.scale].time,o=e.value;e.value=n?wu(o)?vl(P,pl(o,$)):o||j:o||Rl,e.label=e.label||(n?"Time":"Value")}if(t>0){e.width=null==e.width?1:e.width,e.paths=e.paths||Dc||cu,e.fillTo=au(e.fillTo||Jl),e.pxAlign=+Ia(e.pxAlign,m),e.pxRound=tc(e.pxAlign),e.stroke=au(e.stroke||null),e.fill=au(e.fill||null),e._stroke=e._fill=e._paths=e._focus=null;var a=jl(e.width,1),u=e.points=Au({},{size:a,width:Za(1,.2*a),stroke:e.stroke,space:2*a,paths:wc,_stroke:null,_fill:null},e.points);u.show=au(u.show),u.filter=au(u.filter),u.fill=au(u.fill),u.stroke=au(u.stroke),u.paths=au(u.paths),u.pxAlign=e.pxAlign}if(H){var l=function(e,t){if(0==t&&(Q||!U.live||2==i))return bu;var n=[],o=va("tr","u-series",L,L.childNodes[t]);da(o,e.class),e.show||da(o,Yo);var a=va("th",null,o);if(Y.show){var u=ma("u-marker",a);if(t>0){var l=Y.width(r,t);l&&(u.style.border=l+"px "+Y.dash(r,t)+" "+Y.stroke(r,t)),u.style.background=Y.fill(r,t)}}var c=ma(Vo,a);for(var s in c.textContent=e.label,t>0&&(Y.show||(c.style.color=e.width>0?Y.stroke(r,t):Y.fill(r,t)),re("click",a,(function(t){if(!we._lock){var n=_.indexOf(e);if((t.ctrlKey||t.metaKey)!=U.isolate){var r=_.some((function(e,t){return t>0&&t!=n&&e.show}));_.forEach((function(e,t){t>0&&Pt(t,r?t==n?ee:te:ee,!0,an.setSeries)}))}else Pt(n,{show:!e.show},!0,an.setSeries)}})),Ce&&re(ra,a,(function(t){we._lock||Pt(_.indexOf(e),$t,!0,an.setSeries)}))),V){var f=va("td","u-value",o);f.textContent="--",n.push(f)}return[o,n]}(e,t);q.splice(t,0,l[0]),W.splice(t,0,l[1]),U.values.push(null)}if(we.show){z.splice(t,0,null);var c=function(e,t){if(t>0){var n=we.points.show(r,t);if(n)return da(n,"u-cursor-pt"),da(n,e.class),ga(n,-10,-10,ue,le),v.insertBefore(n,Ee[t]),n}}(e,t);c&&Ee.splice(t,0,c)}on("addSeries",t)}r.addSeries=function(e,t){e=kc(e,t=null==t?_.length:t,Sl,Hl),_.splice(t,0,e),Ae(_[t],t)},r.delSeries=function(e){if(_.splice(e,1),H){U.values.splice(e,1),W.splice(e,1);var t=q.splice(e,1)[0];ie(null,t.firstChild),t.remove()}we.show&&(z.splice(e,1),Ee.length>1&&Ee.splice(e,1)[0].remove()),on("delSeries",e)};var Se=[!1,!1,!1,!1];function Fe(e,t,n,r){var i=_t(n,4),o=i[0],a=i[1],u=i[2],l=i[3],c=t%2,s=0;return 0==c&&(l||a)&&(s=0==t&&!o||2==t&&!u?Wa(Al.size/3):0),1==c&&(o||u)&&(s=1==t&&!a||3==t&&!l?Wa(Il.size/2):0),s}var Ne,Oe,Te,Be,Me,Le,Pe,$e,Re,Ie,je,ze=r.padding=(e.padding||[Fe,Fe,Fe,Fe]).map((function(e){return au(Ia(e,Fe))})),Ue=r._padding=ze.map((function(e,t){return e(r,t,Se,0)})),He=null,Ye=null,Ve=1==i?_[0].idxs:null,qe=null,We=!1;function Qe(e,n){if(t=null==e?[]:Eu(e,ku),2==i){Ne=0;for(var o=1;o<_.length;o++)Ne+=t[o][0].length;r.data=t=e}else if(null==t[0]&&(t[0]=[]),r.data=t.slice(),qe=t[0],Ne=qe.length,2==O){t[0]=Array(Ne);for(var a=0;a=0,_e=!0,wt()}}function Ge(){var e,n;if(We=!0,1==i)if(Ne>0){if(He=Ve[0]=0,Ye=Ve[1]=Ne-1,e=t[0][He],n=t[0][Ye],2==O)e=He,n=Ye;else if(1==Ne)if(3==O){var r=_t(Ba(e,e,N.log,!1),2);e=r[0],n=r[1]}else if(4==O){var o=_t(Ma(e,e,N.log,!1),2);e=o[0],n=o[1]}else if(N.time)n=e+Wa(86400/g);else{var a=_t(Ra(e,n,.1,!0),2);e=a[0],n=a[1]}}else He=Ve[0]=e=null,Ye=Ve[1]=n=null;Lt(x,e,n)}function Ze(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:Xo,t=arguments.length>1?arguments[1]:void 0,n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:_u,r=arguments.length>3&&void 0!==arguments[3]?arguments[3]:"butt",i=arguments.length>4&&void 0!==arguments[4]?arguments[4]:Xo,o=arguments.length>5&&void 0!==arguments[5]?arguments[5]:"round";e!=Oe&&(d.strokeStyle=Oe=e),i!=Te&&(d.fillStyle=Te=i),t!=Be&&(d.lineWidth=Be=t),o!=Le&&(d.lineJoin=Le=o),r!=Pe&&(d.lineCap=Pe=r),n!=Me&&d.setLineDash(Me=n)}function Je(e,t,n,r){t!=Te&&(d.fillStyle=Te=t),e!=$e&&(d.font=$e=e),n!=Re&&(d.textAlign=Re=n),r!=Ie&&(d.textBaseline=Ie=r)}function Ke(e,t,n,i){var o=arguments.length>4&&void 0!==arguments[4]?arguments[4]:0;if(i.length>0&&e.auto(r,We)&&(null==t||null==t.min)){var a=Ia(He,0),u=Ia(Ye,i.length-1),l=null==n.min?3==e.distr?Na(i,a,u):Fa(i,a,u,o):[n.min,n.max];e.min=Ga(e.min,n.min=l[0]),e.max=Za(e.max,n.max=l[1])}}function Xe(e,t){var n=t?_[e].points:_[e];n._stroke=n.stroke(r,e),n._fill=n.fill(r,e)}function et(e,n){var i=n?_[e].points:_[e],o=i._stroke,a=i._fill,u=i._paths,l=u.stroke,c=u.fill,s=u.clip,f=u.flags,h=null,p=pu(i.width*Uo,3),v=p%2/2;n&&null==a&&(a=p>0?"#fff":o);var m=1==i.pxAlign;if(m&&d.translate(v,v),!n){var y=fe,g=de,b=he,D=pe,x=p*Uo/2;0==i.min&&(D+=x),0==i.max&&(g-=x,D+=x),(h=new Path2D).rect(y,g,b,D)}n?tt(o,p,i.dash,i.cap,a,l,c,f,s):function(e,n,i,o,a,u,l,c,s,f,d){var h=!1;w.forEach((function(p,v){if(p.series[0]==e){var m,y=_[p.series[1]],g=t[p.series[1]],b=(y._paths||gu).band;Du(b)&&(b=1==p.dir?b[0]:b[1]);var D=null;y.show&&b&&function(e,t,n){for(t=Ia(t,0),n=Ia(n,e.length-1);t<=n;){if(null!=e[t])return!0;t++}return!1}(g,He,Ye)?(D=p.fill(r,v)||u,m=y._paths.clip):b=null,tt(n,i,o,a,D,l,c,s,f,d,m,b),h=!0}})),h||tt(n,i,o,a,u,l,c,s,f,d)}(e,o,p,i.dash,i.cap,a,l,c,f,h,s),m&&d.translate(-v,-v)}r.setData=Qe;function tt(e,t,n,r,i,o,a,u,l,c,s,f){Ze(e,t,n,r,i),(l||c||f)&&(d.save(),l&&d.clip(l),c&&d.clip(c)),f?3==(3&u)?(d.clip(f),s&&d.clip(s),rt(i,a),nt(e,o,t)):2&u?(rt(i,a),d.clip(f),nt(e,o,t)):1&u&&(d.save(),d.clip(f),s&&d.clip(s),rt(i,a),d.restore(),nt(e,o,t)):(rt(i,a),nt(e,o,t)),(l||c||f)&&d.restore()}function nt(e,t,n){n>0&&(t instanceof Map?t.forEach((function(e,t){d.strokeStyle=Oe=t,d.stroke(e)})):null!=t&&e&&d.stroke(t))}function rt(e,t){t instanceof Map?t.forEach((function(e,t){d.fillStyle=Te=t,d.fill(e)})):null!=t&&e&&d.fill(t)}function it(e,t,n,r,i,o,a,u,l,c){var s=a%2/2;1==m&&d.translate(s,s),Ze(u,a,l,c,u),d.beginPath();var f,h,p,v,y=i+(0==r||3==r?-o:o);0==n?(h=i,v=y):(f=i,p=y);for(var g=0;g0&&(t._paths=null,e&&(1==i?(t.min=null,t.max=null):t.facets.forEach((function(e){e.min=null,e.max=null}))))}))}var lt,ct,st,ft,dt,ht,pt,vt,mt,yt,gt,bt,Dt=!1;function wt(){Dt||(Fu(xt),Dt=!0)}function xt(){ve&&(!function(){var e=Eu(D,ku);for(var n in e){var o=e[n],a=T[n];if(null!=a&&null!=a.min)Au(o,a),n==x&&ut(!0);else if(n!=x||2==i)if(0==Ne&&null==o.from){var u=o.range(r,null,null,n);o.min=u[0],o.max=u[1]}else o.min=nu,o.max=-nu}if(Ne>0)for(var l in _.forEach((function(n,o){if(1==i){var a=n.scale,u=e[a],l=T[a];if(0==o){var c=u.range(r,u.min,u.max,a);u.min=c[0],u.max=c[1],He=Aa(u.min,t[0]),Ye=Aa(u.max,t[0]),t[0][He]u.max&&Ye--,n.min=qe[He],n.max=qe[Ye]}else n.show&&n.auto&&Ke(u,l,n,t[o],n.sorted);n.idxs[0]=He,n.idxs[1]=Ye}else if(o>0&&n.show&&n.auto){var s=_t(n.facets,2),f=s[0],d=s[1],h=f.scale,p=d.scale,v=_t(t[o],2),m=v[0],y=v[1];Ke(e[h],T[h],f,m,f.sorted),Ke(e[p],T[p],d,y,d.sorted),n.min=d.min,n.max=d.max}})),e){var c=e[l],s=T[l];if(null==c.from&&(null==s||null==s.min)){var f=c.range(r,c.min==nu?null:c.min,c.max==-nu?null:c.max,l);c.min=f[0],c.max=f[1]}}for(var d in e){var h=e[d];if(null!=h.from){var p=e[h.from];if(null==p.min)h.min=h.max=null;else{var v=h.range(r,p.min,p.max,d);h.min=v[0],h.max=v[1]}}}var m={},y=!1;for(var g in e){var b=e[g],w=D[g];if(w.min!=b.min||w.max!=b.max){w.min=b.min,w.max=b.max;var k=w.distr;w._min=3==k?Xa(w.min):4==k?tu(w.min,w.asinh):w.min,w._max=3==k?Xa(w.max):4==k?tu(w.max,w.asinh):w.max,m[g]=y=!0}}if(y){for(var C in _.forEach((function(e,t){2==i?t>0&&m.y&&(e._paths=null):m[e.scale]&&(e._paths=null)})),m)ye=!0,on("setScale",C);we.show&&(ge=_e=we.left>=0)}for(var E in T)T[E]=null}(),ve=!1),ye&&(!function(){for(var e=!1,t=0;!e;){var n=ot(++t),i=at(t);(e=3==t||n&&i)||(De(r.width,r.height),me=!0)}}(),ye=!1),me&&(pa(p,Zo,ce),pa(p,Qo,se),pa(p,qo,ue),pa(p,Wo,le),pa(v,Zo,ce),pa(v,Qo,se),pa(v,qo,ue),pa(v,Wo,le),pa(h,qo,oe),pa(h,Wo,ae),f.width=Wa(oe*Uo),f.height=Wa(ae*Uo),b.forEach((function(e){var t=e._el,n=e._show,r=e._size,i=e._pos,o=e.side;if(null!=t)if(n){var a=o%2==1;pa(t,a?"left":"top",i-(3===o||0===o?r:0)),pa(t,a?"width":"height",r),pa(t,a?"top":"left",a?se:ce),pa(t,a?"height":"width",a?le:ue),ha(t,Yo)}else da(t,Yo)})),Oe=Te=Be=Le=Pe=$e=Re=Ie=Me=null,je=1,Wt(!0),on("setSize"),me=!1),oe>0&&ae>0&&(d.clearRect(0,0,f.width,f.height),on("drawClear"),C.forEach((function(e){return e()})),on("draw")),we.show&&ge&&(Vt(null,!0,!1),ge=!1),c||(c=!0,r.status=1,on("ready")),We=!1,Dt=!1}function kt(e,n){var i=D[e];if(null==i.from){if(0==Ne){var o=i.range(r,n.min,n.max,e);n.min=o[0],n.max=o[1]}if(n.min>n.max){var a=n.min;n.min=n.max,n.max=a}if(Ne>1&&null!=n.min&&null!=n.max&&n.max-n.min<1e-16)return;e==x&&2==i.distr&&Ne>0&&(n.min=Aa(n.min,t[0]),n.max=Aa(n.max,t[0]),n.min==n.max&&n.max++),T[e]=n,ve=!0,wt()}}r.redraw=function(e,t){ye=t||!1,!1!==e?Lt(x,N.min,N.max):wt()},r.setScale=kt;var Ct=!1,Et=we.drag,At=Et.x,St=Et.y;we.show&&(we.x&&(lt=ma("u-cursor-x",v)),we.y&&(ct=ma("u-cursor-y",v)),0==N.ori?(st=lt,ft=ct):(st=ct,ft=lt),gt=we.left,bt=we.top);var Ft,Nt,Ot,Tt=r.select=Au({show:!0,over:!0,left:0,width:0,top:0,height:0},e.select),Bt=Tt.show?ma("u-select",Tt.over?v:p):null;function Mt(e,t){if(Tt.show){for(var n in e)pa(Bt,n,Tt[n]=e[n]);!1!==t&&on("setSelect")}}function Lt(e,t,n){kt(e,{min:t,max:n})}function Pt(e,t,n,o){null!=t.focus&&function(e){if(e!=Ot){var t=null==e,n=1!=ke.alpha;_.forEach((function(r,i){var o=t||0==i||i==e;r._focus=t?null:o,n&&function(e,t){_[e].alpha=t,we.show&&Ee[e]&&(Ee[e].style.opacity=t);H&&q[e]&&(q[e].style.opacity=t)}(i,o?1:ke.alpha)})),Ot=e,n&&wt()}}(e),null!=t.show&&_.forEach((function(n,r){r>0&&(e==r||null==e)&&(n.show=t.show,function(e,t){var n=_[e],r=H?q[e]:null;n.show?r&&ha(r,Yo):(r&&da(r,Yo),Ee.length>1&&ga(Ee[e],-10,-10,ue,le))}(r,t.show),Lt(2==i?n.facets[1].scale:n.scale,null,null),wt())})),!1!==n&&on("setSeries",e,t),o&&cn("setSeries",r,e,t)}r.setSelect=Mt,r.setSeries=Pt,r.addBand=function(e,t){e.fill=au(e.fill||null),e.dir=Ia(e.dir,-1),t=null==t?w.length:t,w.splice(t,0,e)},r.setBand=function(e,t){Au(w[e],t)},r.delBand=function(e){null==e?w.length=0:w.splice(e,1)};var $t={focus:!0};function Rt(e,t,n){var r=D[t];n&&(e=e/Uo-(1==r.ori?se:ce));var i=ue;1==r.ori&&(e=(i=le)-e),-1==r.dir&&(e=i-e);var o=r._min,a=o+(r._max-o)*(e/i),u=r.distr;return 3==u?Ja(10,a):4==u?function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:1;return Ha.sinh(e)*t}(a,r.asinh):a}function It(e,t){pa(Bt,Zo,Tt.left=e),pa(Bt,qo,Tt.width=t)}function jt(e,t){pa(Bt,Qo,Tt.top=e),pa(Bt,Wo,Tt.height=t)}H&&Ce&&Ca(ia,L,(function(e){we._lock||null!=Ot&&Pt(null,$t,!0,an.setSeries)})),r.valToIdx=function(e){return Aa(e,t[0])},r.posToIdx=function(e,n){return Aa(Rt(e,x,n),t[0],He,Ye)},r.posToVal=Rt,r.valToPos=function(e,t,n){return 0==D[t].ori?a(e,D[t],n?he:ue,n?fe:0):u(e,D[t],n?pe:le,n?de:0)},r.batch=function(e){e(r),wt()},r.setCursor=function(e,t,n){gt=e.left,bt=e.top,Vt(null,t,n)};var zt=0==N.ori?It:jt,Ut=1==N.ori?It:jt;function Ht(e,t){if(null!=e){var n=e.idx;U.idx=n,_.forEach((function(e,t){(t>0||!Q)&&Yt(t,n)}))}H&&U.live&&function(){if(H&&U.live)for(var e=2==i?1:0;e<_.length;e++)if(0!=e||!Q){var t=U.values[e],n=0;for(var r in t)W[e][n++].firstChild.nodeValue=t[r]}}(),_e=!1,!1!==t&&on("setLegend")}function Yt(e,n){var i;if(null==n)i=G;else{var o=_[e],a=0==e&&2==O?qe:t[e];i=Q?o.values(r,e,n):{_:o.value(r,a[n],e,n)}}U.values[e]=i}function Vt(e,n,o){mt=gt,yt=bt;var a,u=_t(we.move(r,gt,bt),2);gt=u[0],bt=u[1],we.show&&(st&&ga(st,Wa(gt),0,ue,le),ft&&ga(ft,0,Wa(bt),ue,le));var l=He>Ye;Ft=nu;var s=0==N.ori?ue:le,f=1==N.ori?ue:le;if(gt<0||0==Ne||l){a=null;for(var d=0;d<_.length;d++)d>0&&Ee.length>1&&ga(Ee[d],-10,-10,ue,le);if(Ce&&Pt(null,$t,!0,null==e&&an.setSeries),U.live){z.fill(null),_e=!0;for(var h=0;h<_.length;h++)U.values[h]=G}}else{var p,v;1==i&&(a=Aa(p=Rt(0==N.ori?gt:bt,x),t[0],He,Ye),v=du(S(t[0][a],N,s,0),.5));for(var m=2==i?1:0;m<_.length;m++){var y=_[m],g=z[m],b=1==i?t[m][g]:t[m][1][g],w=we.dataIdx(r,m,a,p),k=1==i?t[m][w]:t[m][1][w];_e=_e||k!=b||w!=g,z[m]=w;var C=w==a?v:du(S(1==i?t[0][w]:t[m][0][w],N,s,0),.5);if(m>0&&y.show){var E=null==k?-10:du(F(k,1==i?D[y.scale]:D[y.facets[1].scale],f,0),.5);if(E>0&&1==i){var A=Va(E-bt);A<=Ft&&(Ft=A,Nt=m)}var O=void 0,T=void 0;if(0==N.ori?(O=C,T=E):(O=E,T=C),_e&&Ee.length>1){ba(Ee[m],we.points.fill(r,m),we.points.stroke(r,m));var B=void 0,M=void 0,L=void 0,P=void 0,$=!0,R=we.points.bbox;if(null!=R){$=!1;var I=R(r,m);L=I.left,P=I.top,B=I.width,M=I.height}else L=O,P=T,B=M=we.points.size(r,m);wa(Ee[m],B,M,$),ga(Ee[m],L,P,ue,le)}}if(U.live){if(!_e||0==m&&Q)continue;Yt(m,w)}}}if(we.idx=a,we.left=gt,we.top=bt,_e&&(U.idx=a,Ht()),Tt.show&&Ct)if(null!=e){var j=_t(an.scales,2),H=j[0],Y=j[1],V=_t(an.match,2),q=V[0],W=V[1],Z=_t(e.cursor.sync.scales,2),J=Z[0],K=Z[1],X=e.cursor.drag;if(At=X._x,St=X._y,At||St){var ee,te,ne,re,ie,oe=e.select,ae=oe.left,ce=oe.top,se=oe.width,fe=oe.height,de=e.scales[H].ori,he=e.posToVal,pe=null!=H&&q(H,J),ve=null!=Y&&W(Y,K);pe&&At?(0==de?(ee=ae,te=se):(ee=ce,te=fe),ne=D[H],re=S(he(ee,J),ne,s,0),ie=S(he(ee+te,J),ne,s,0),zt(Ga(re,ie),Va(ie-re))):zt(0,s),ve&&St?(1==de?(ee=ae,te=se):(ee=ce,te=fe),ne=D[Y],re=F(he(ee,K),ne,f,0),ie=F(he(ee+te,K),ne,f,0),Ut(Ga(re,ie),Va(ie-re))):Ut(0,f)}else Jt()}else{var me=Va(mt-dt),ye=Va(yt-ht);if(1==N.ori){var ge=me;me=ye,ye=ge}At=Et.x&&me>=Et.dist,St=Et.y&&ye>=Et.dist;var be,De,xe=Et.uni;null!=xe?At&&St&&(St=ye>=xe,(At=me>=xe)||St||(ye>me?St=!0:At=!0)):Et.x&&Et.y&&(At||St)&&(At=St=!0),At&&(0==N.ori?(be=pt,De=gt):(be=vt,De=bt),zt(Ga(be,De),Va(De-be)),St||Ut(0,f)),St&&(1==N.ori?(be=pt,De=gt):(be=vt,De=bt),Ut(Ga(be,De),Va(De-be)),At||zt(0,s)),At||St||(zt(0,0),Ut(0,0))}if(Et._x=At,Et._y=St,null==e){if(o){if(null!=un){var Ae=_t(an.scales,2),Se=Ae[0],Fe=Ae[1];an.values[0]=null!=Se?Rt(0==N.ori?gt:bt,Se):null,an.values[1]=null!=Fe?Rt(1==N.ori?gt:bt,Fe):null}cn(ea,r,gt,bt,ue,le,a)}if(Ce){var Oe=o&&an.setSeries,Te=ke.prox;null==Ot?Ft<=Te&&Pt(Nt,$t,!0,Oe):Ft>Te?Pt(null,$t,!0,Oe):Nt!=Ot&&Pt(Nt,$t,!0,Oe)}}c&&!1!==n&&on("setCursor")}r.setLegend=Ht;var qt=null;function Wt(e){!0===e?qt=null:on("syncRect",qt=v.getBoundingClientRect())}function Qt(e,t,n,r,i,o,a){we._lock||(Gt(e,t,n,r,i,o,a,!1,null!=e),null!=e?Vt(null,!0,!0):Vt(t,!0,!1))}function Gt(e,t,n,i,o,a,u,c,s){if(null==qt&&Wt(!1),null!=e)n=e.clientX-qt.left,i=e.clientY-qt.top;else{if(n<0||i<0)return gt=-10,void(bt=-10);var f=_t(an.scales,2),d=f[0],h=f[1],p=t.cursor.sync,v=_t(p.values,2),m=v[0],y=v[1],g=_t(p.scales,2),_=g[0],b=g[1],w=_t(an.match,2),x=w[0],k=w[1],C=t.axes[0].side%2==1,E=0==N.ori?ue:le,A=1==N.ori?ue:le,S=C?a:o,F=C?o:a,O=C?i:n,T=C?n:i;if(n=null!=_?x(d,_)?l(m,D[d],E,0):-10:E*(O/S),i=null!=b?k(h,b)?l(y,D[h],A,0):-10:A*(T/F),1==N.ori){var B=n;n=i,i=B}}if(s&&((n<=1||n>=ue-1)&&(n=iu(n,ue)),(i<=1||i>=le-1)&&(i=iu(i,le))),c){dt=n,ht=i;var M=_t(we.move(r,n,i),2);pt=M[0],vt=M[1]}else gt=n,bt=i}var Zt={width:0,height:0};function Jt(){Mt(Zt,!1)}function Kt(e,t,n,i,o,a,u){Ct=!0,At=St=Et._x=Et._y=!1,Gt(e,t,n,i,o,a,0,!0,!1),null!=e&&(re(na,ca,Xt),cn(ta,r,pt,vt,ue,le,null))}function Xt(e,t,n,i,o,a,u){Ct=Et._x=Et._y=!1,Gt(e,t,n,i,o,a,0,!1,!0);var l=Tt.left,c=Tt.top,s=Tt.width,f=Tt.height,d=s>0||f>0;if(d&&Mt(Tt),Et.setScale&&d){var h=l,p=s,v=c,m=f;if(1==N.ori&&(h=c,p=f,v=l,m=s),At&&Lt(x,Rt(h,x),Rt(h+p,x)),St)for(var y in D){var g=D[y];y!=x&&null==g.from&&g.min!=nu&&Lt(y,Rt(v+m,y),Rt(v,y))}Jt()}else we.lock&&(we._lock=!we._lock,we._lock||Vt(null,!0,!1));null!=e&&(ie(na,ca),cn(na,r,gt,bt,ue,le,null))}function en(e,t,n,i,o,a,u){Ge(),Jt(),null!=e&&cn(oa,r,gt,bt,ue,le,null)}function tn(){b.forEach(Mc),be(r.width,r.height,!0)}Ca(ua,sa,tn);var nn={};nn.mousedown=Kt,nn.mousemove=Qt,nn.mouseup=Xt,nn.dblclick=en,nn.setSeries=function(e,t,n,r){Pt(n,r,!0,!1)},we.show&&(re(ta,v,Kt),re(ea,v,Qt),re(ra,v,Wt),re(ia,v,(function(e,t,n,r,i,o,a){if(!we._lock){var u=Ct;if(Ct){var l,c,s=!0,f=!0;0==N.ori?(l=At,c=St):(l=St,c=At),l&&c&&(s=gt<=10||gt>=ue-10,f=bt<=10||bt>=le-10),l&&s&&(gt=gt=3?$l:lu)),e.font=Bc(e.font),e.labelFont=Bc(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&&(Se[t]=!0,e._el=ma("u-axis",h))}})),n?n instanceof HTMLElement?(n.appendChild(s),sn()):n(r,sn):sn(),r}Lc.assign=Au,Lc.fmtNum=Ua,Lc.rangeNum=Ra,Lc.rangeLog=Ba,Lc.rangeAsinh=Ma,Lc.orient=Gl,Lc.pxRatio=Uo,Lc.join=function(e,t){for(var n=new Set,r=0;r=o&&S<=a;S+=k){var F=c[S];if(null!=F){var N=_(l[S]),O=b(F);1==t?D(x,N,C):D(x,A,O),D(x,N,O),C=O,A=N}}var T=_t(Zl(e,i),2),B=T[0],M=T[1];if(null!=u.fill||0!=B){var L=w.fill=new Path2D(x),P=b(u.fillTo(e,i,u.min,u.max,B));D(L,A,P),D(L,E,P)}if(!u.spanGaps){var $,R=[];($=R).push.apply($,bt(ec(l,c,o,a,k,_,r)));var I=u.width*Uo/2,j=n||1==t?I:-I,z=n||-1==t?-I:I;R.forEach((function(e){e[0]+=j,e[1]+=z})),w.gaps=R=u.gaps(e,i,o,a,R),w.clip=Xl(R,s.ori,p,v,m,y)}return 0!=M&&(w.band=2==M?[Kl(e,i,o,a,x,-1),Kl(e,i,o,a,x,1)]:Kl(e,i,o,a,x,M)),w}))}},Pc.bars=function(e){var t=Ia((e=e||gu).size,[.6,nu,1]),n=e.align||0,r=(e.gap||0)*Uo,i=Ia(e.radius,0),o=1-t[0],a=Ia(t[1],nu)*Uo,u=Ia(t[2],1)*Uo,l=Ia(e.disp,gu),c=Ia(e.each,(function(e){})),s=l.fill,f=l.stroke;return function(e,t,d,h){return Gl(e,t,(function(p,v,m,y,g,_,b,D,w,x,k){var C,E,A=p.pxRound,S=y.dir*(0==y.ori?1:-1),F=g.dir*(1==g.ori?1:-1),N=0==y.ori?uc:lc,O=0==y.ori?c:function(e,t,n,r,i,o,a){c(e,t,n,i,r,a,o)},T=_t(Zl(e,t),2),B=T[0],M=T[1],L=3==g.distr?1==B?g.max:g.min:0,P=b(L,g,k,w),$=A(p.width*Uo),R=!1,I=null,j=null,z=null,U=null;null==s||0!=$&&null==f||(R=!0,I=s.values(e,t,d,h),j=new Map,new Set(I).forEach((function(e){null!=e&&j.set(e,new Path2D)})),$>0&&(z=f.values(e,t,d,h),U=new Map,new Set(z).forEach((function(e){null!=e&&U.set(e,new Path2D)}))));var H=l.x0,Y=l.size;if(null!=H&&null!=Y){v=H.values(e,t,d,h),2==H.unit&&(v=v.map((function(t){return e.posToVal(D+t*x,y.key,!0)})));var V=Y.values(e,t,d,h);E=A((E=2==Y.unit?V[0]*x:_(V[0],y,x,D)-_(0,y,x,D))-$),C=1==S?-$/2:E+$/2}else{var q=x;if(v.length>1)for(var W=null,Q=0,G=1/0;Q=d&&Q<=h;Q+=S){var ie=m[Q];if(void 0!==ie){var oe=_(2!=y.distr||null!=l?v[Q]:Q,y,x,D),ae=b(Ia(ie,L),g,k,w);null!=re&&null!=ie&&(P=b(re[Q],g,k,w));var ue=A(oe-C),le=A(Za(ae,P)),ce=A(Ga(ae,P)),se=le-ce,fe=i*E;null!=ie&&(R?($>0&&null!=z[Q]&&N(U.get(z[Q]),ue,ce+qa($/2),E,Za(0,se-$),fe),null!=I[Q]&&N(j.get(I[Q]),ue,ce+qa($/2),E,Za(0,se-$),fe)):N(X,ue,ce+qa($/2),E,Za(0,se-$),fe),O(e,t,Q,ue-$/2,ce,E+$,se)),0!=M&&(F*M==1?(le=ce,ce=J):(ce=le,le=J),N(ee,ue-$/2,ce,E+$,Za(0,se=le-ce),0))}}return $>0&&(K.stroke=R?U:X),K.fill=R?j:X,K}))}},Pc.spline=function(e){return function(e,t){var n=Ia(null===t||void 0===t?void 0:t.alignGaps,0);return function(t,r,i,o){return Gl(t,r,(function(a,u,l,c,s,f,d,h,p,v,m){var y,g,_,b=a.pxRound,D=function(e){return b(f(e,c,v,h))},w=function(e){return b(d(e,s,m,p))};0==c.ori?(y=rc,_=oc,g=fc):(y=ic,_=ac,g=dc);var x=c.dir*(0==c.ori?1:-1);i=Sa(l,i,o,1),o=Sa(l,i,o,-1);for(var k=D(u[1==x?i:o]),C=k,E=[],A=[],S=1==x?i:o;S>=i&&S<=o;S+=x)if(null!=l[S]){var F=D(u[S]);E.push(C=F),A.push(w(l[S]))}var N={stroke:e(E,A,y,_,g,b),fill:null,clip:null,band:null,gaps:null,flags:1},O=N.stroke,T=_t(Zl(t,r),2),B=T[0],M=T[1];if(null!=a.fill||0!=B){var L=N.fill=new Path2D(O),P=w(a.fillTo(t,r,a.min,a.max,B));_(L,C,P),_(L,k,P)}if(!a.spanGaps){var $,R=[];($=R).push.apply($,bt(ec(u,l,i,o,x,D,n))),N.gaps=R=a.gaps(t,r,i,o,R),N.clip=Xl(R,c.ori,h,p,v,m)}return 0!=M&&(N.band=2==M?[Kl(t,r,i,o,O,-1),Kl(t,r,i,o,O,1)]:Kl(t,r,i,o,O,M)),N}))}}(gc,e)};var $c,Rc={height:500,legend:{show:!1},cursor:{drag:{x:!0,y:!1},focus:{prox:30},points:{size:5.6,width:1.4},bind:{click:function(){return null},dblclick:function(){return null}}}},Ic=function(e){return void 0===e||null===e?"":e.toLocaleString("en-US",{maximumSignificantDigits:20})},jc=function(e,t,n,r){var i,o=e.axes[n];if(r>1)return o._size||60;var a=6+((null===o||void 0===o||null===(i=o.ticks)||void 0===i?void 0:i.size)||0)+(o.gap||0),u=(null!==t&&void 0!==t?t:[]).reduce((function(e,t){return t.length>e.length?t:e}),"");return""!=u&&(a+=function(e,t){var n=document.createElement("span");n.innerText=e,n.style.cssText="position: absolute; z-index: -1; pointer-events: none; opacity: 0; font: ".concat(t),document.body.appendChild(n);var r=n.offsetWidth;return n.remove(),r}(u,e.ctx.font)),Math.ceil(a)},zc=function(e){return function(e){for(var t=0,n=0;n>8*i&255).toString(16)).substr(-2);return r}(e)},Uc=function(e){return e.replace(/^\[\d+]/,"").replace(/{.+}/gim,"")},Hc=function(e){for(var t=e.length,n=-1/0;t--;){var r=e[t];Number.isFinite(r)&&r>n&&(n=r)}return Number.isFinite(n)?n:null},Yc=function(e){for(var t=e.length,n=1/0;t--;){var r=e[t];Number.isFinite(r)&&r2&&void 0!==arguments[2]?arguments[2]:"";return t.map((function(e){return"".concat(Ic(e)," ").concat(n)}))}(e,n,t)}};return e?Number(e)%2?n:Kn(Kn({},n),{},{side:1}):{space:80}}))},qc=function(e,t){if(null==e||null==t)return[-1,1];var n=.02*(Math.abs(t-e)||Math.abs(e)||1);return[e-n,t+n]},Wc=function(e){var t,n,r=e.u,i=e.tooltipIdx,o=e.metrics,a=e.series,u=e.tooltip,l=e.tooltipOffset,c=e.unit,s=void 0===c?"":c,f=i.seriesIdx,d=i.dataIdx;if(null!==f&&void 0!==d){var h=r.data[f][d],p=r.data[0][d],v=(null===(t=o[f-1])||void 0===t?void 0:t.metric)||{},m=a[f],y=zc(m.label||""),g=r.over.getBoundingClientRect(),_=g.width,b=g.height,D=r.valToPos(h||0,(null===(n=a[f])||void 0===n?void 0:n.scale)||"1"),w=r.valToPos(p,"x"),x=u.getBoundingClientRect(),k=x.width,C=x.height,E=w+k>=_,A=D+C>=b;u.style.display="grid",u.style.top="".concat(l.top+D+10-(A?C+10:0),"px"),u.style.left="".concat(l.left+w+10-(E?k+20:0),"px");var S=(m.label||"").replace(/{.+}/gim,"").trim(),F=Uc(S),N=yr()(new Date(1e3*p)).format("YYYY-MM-DD HH:mm:ss:SSS (Z)"),O=Object.keys(v).filter((function(e){return"__name__"!==e})).map((function(e){return"
    ".concat(e,": ").concat(v[e],"
    ")})).join(""),T='
    ');u.innerHTML="
    ".concat(N,'
    \n
    \n ').concat(T).concat(F,': ').concat(Ic(h)," ").concat(s,'\n
    \n
    ').concat(O,"
    ")}},Qc=n(61),Gc=n.n(Qc);!function(e){e.xRange="xRange",e.yRange="yRange",e.data="data"}($c||($c={}));var Zc=function(e){var t=e.data,n=e.series,r=e.metrics,i=void 0===r?[]:r,o=e.period,a=e.yaxis,u=e.unit,l=e.setPeriod,c=e.container,s=re(null),f=_t(X(!1),2),d=f[0],h=f[1],p=_t(X({min:o.start,max:o.end}),2),v=p[0],m=p[1],y=_t(X(),2),g=y[0],_=y[1],b=mo(c),D=document.createElement("div");D.className="u-tooltip";var w={seriesIdx:null,dataIdx:void 0},x={left:0,top:0},k=ae(Gc()((function(e){var t=e.min,n=e.max;l({from:new Date(1e3*t),to:new Date(1e3*n)})}),500),[]),C=function(e){var t=e.u,n=e.min,r=e.max,i=1e3*(r-n);iSr||(t.setScale("x",{min:n,max:r}),m({min:n,max:r}),k({min:n,max:r}))},E=function(e){var t=e.target,n=e.ctrlKey,r=e.metaKey,i=e.key,o=t instanceof HTMLInputElement||t instanceof HTMLTextAreaElement;if(g&&!o){var a="+"===i||"="===i;if(("-"===i||a)&&!n&&!r){e.preventDefault();var u=(v.max-v.min)/10*(a?1:-1);C({u:g,min:v.min+u,max:v.max-u})}}},A=function(){return[v.min,v.max]},S=function(e){var 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;return a.limits.enable?a.limits.range[r]:qc(t,n)},F=Kn(Kn({},Rc),{},{series:n,axes:Vc([{},{scale:"1"}],u),scales:Kn({},function(){var e={x:{range:A}},t=Object.keys(a.limits.range);return(t.length?t:["1"]).forEach((function(t){e[t]={range:function(e){var n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:0,r=arguments.length>2&&void 0!==arguments[2]?arguments[2]:1;return S(e,n,r,t)}}})),e}()),width:b.width||400,plugins:[{hooks:{ready:function(e){var t;x.left=parseFloat(e.over.style.left),x.top=parseFloat(e.over.style.top),null===(t=e.root.querySelector(".u-wrap"))||void 0===t||t.appendChild(D),e.over.addEventListener("mousedown",(function(t){var n=t.ctrlKey,r=t.metaKey;0===t.button&&(n||r)&&function(e){var t=e.e,n=e.factor,r=void 0===n?.85:n,i=e.u,o=e.setPanning,a=e.setPlotScale;t.preventDefault(),o(!0);var u=t.clientX,l=i.posToVal(1,"x")-i.posToVal(0,"x"),c=i.scales.x.min||0,s=i.scales.x.max||0,f=function(e){e.preventDefault();var t=l*((e.clientX-u)*r);a({u:i,min:c-t,max:s-t})};document.addEventListener("mousemove",f),document.addEventListener("mouseup",(function e(){o(!1),document.removeEventListener("mousemove",f),document.removeEventListener("mouseup",e)}))}({u:e,e:t,setPanning:h,setPlotScale:C,factor:.9})})),e.over.addEventListener("wheel",(function(t){if(t.ctrlKey||t.metaKey){t.preventDefault();var n=e.over.getBoundingClientRect().width,r=e.cursor.left&&e.cursor.left>0?e.cursor.left:0,i=e.posToVal(r,"x"),o=(e.scales.x.max||0)-(e.scales.x.min||0),a=t.deltaY<0?.9*o:o/.9,u=i-r/n*a,l=u+a;e.batch((function(){return C({u:e,min:u,max:l})}))}}))},setCursor:function(e){w.dataIdx!==e.cursor.idx&&(w.dataIdx=e.cursor.idx||0,null!==w.seriesIdx&&void 0!==w.dataIdx&&Wc({u:e,tooltipIdx:w,metrics:i,series:n,tooltip:D,tooltipOffset:x,unit:u}))},setSeries:function(e,t){w.seriesIdx!==t&&(w.seriesIdx=t,t&&void 0!==w.dataIdx?Wc({u:e,tooltipIdx:w,metrics:i,series:n,tooltip:D,tooltipOffset:x,unit:u}):D.style.display="none")}}}],hooks:{setSelect:[function(e){var t=e.posToVal(e.select.left,"x"),n=e.posToVal(e.select.left+e.select.width,"x");C({u:e,min:t,max:n})}]}}),N=function(e){if(g){switch(e){case $c.xRange:g.scales.x.range=A;break;case $c.yRange:Object.keys(a.limits.range).forEach((function(e){g.scales[e]&&(g.scales[e].range=function(t){var n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:0,r=arguments.length>2&&void 0!==arguments[2]?arguments[2]:1;return S(t,n,r,e)})}));break;case $c.data:g.setData(t)}d||g.redraw()}};return te((function(){return m({min:o.start,max:o.end})}),[o]),te((function(){if(s.current){var e=new Lc(F,t,s.current);return _(e),m({min:o.start,max:o.end}),e.destroy}}),[s.current,n,b]),te((function(){return window.addEventListener("keydown",E),function(){window.removeEventListener("keydown",E)}}),[v]),te((function(){return N($c.data)}),[t]),te((function(){return N($c.xRange)}),[v]),te((function(){return N($c.yRange)}),[a]),fr("div",{className:Oi()({"vm-line-chart":!0,"vm-line-chart_panning":d}),children:fr("div",{ref:s})})};function Jc(){Jc=function(){return e};var e={},t=Object.prototype,n=t.hasOwnProperty,r=Object.defineProperty||function(e,t,n){e[t]=n.value},i="function"==typeof Symbol?Symbol:{},o=i.iterator||"@@iterator",a=i.asyncIterator||"@@asyncIterator",u=i.toStringTag||"@@toStringTag";function l(e,t,n){return Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}),e[t]}try{l({},"")}catch(S){l=function(e,t,n){return e[t]=n}}function c(e,t,n,i){var o=t&&t.prototype instanceof d?t:d,a=Object.create(o.prototype),u=new C(i||[]);return r(a,"_invoke",{value:D(e,n,u)}),a}function s(e,t,n){try{return{type:"normal",arg:e.call(t,n)}}catch(S){return{type:"throw",arg:S}}}e.wrap=c;var f={};function d(){}function h(){}function p(){}var v={};l(v,o,(function(){return this}));var m=Object.getPrototypeOf,y=m&&m(m(E([])));y&&y!==t&&n.call(y,o)&&(v=y);var g=p.prototype=d.prototype=Object.create(v);function _(e){["next","throw","return"].forEach((function(t){l(e,t,(function(e){return this._invoke(t,e)}))}))}function b(e,t){function i(r,o,a,u){var l=s(e[r],e,o);if("throw"!==l.type){var c=l.arg,f=c.value;return f&&"object"==St(f)&&n.call(f,"__await")?t.resolve(f.__await).then((function(e){i("next",e,a,u)}),(function(e){i("throw",e,a,u)})):t.resolve(f).then((function(e){c.value=e,a(c)}),(function(e){return i("throw",e,a,u)}))}u(l.arg)}var o;r(this,"_invoke",{value:function(e,n){function r(){return new t((function(t,r){i(e,n,t,r)}))}return o=o?o.then(r,r):r()}})}function D(e,t,n){var r="suspendedStart";return function(i,o){if("executing"===r)throw new Error("Generator is already running");if("completed"===r){if("throw"===i)throw o;return A()}for(n.method=i,n.arg=o;;){var a=n.delegate;if(a){var u=w(a,n);if(u){if(u===f)continue;return u}}if("next"===n.method)n.sent=n._sent=n.arg;else if("throw"===n.method){if("suspendedStart"===r)throw r="completed",n.arg;n.dispatchException(n.arg)}else"return"===n.method&&n.abrupt("return",n.arg);r="executing";var l=s(e,t,n);if("normal"===l.type){if(r=n.done?"completed":"suspendedYield",l.arg===f)continue;return{value:l.arg,done:n.done}}"throw"===l.type&&(r="completed",n.method="throw",n.arg=l.arg)}}}function w(e,t){var n=e.iterator[t.method];if(void 0===n){if(t.delegate=null,"throw"===t.method){if(e.iterator.return&&(t.method="return",t.arg=void 0,w(e,t),"throw"===t.method))return f;t.method="throw",t.arg=new TypeError("The iterator does not provide a 'throw' method")}return f}var r=s(n,e.iterator,t.arg);if("throw"===r.type)return t.method="throw",t.arg=r.arg,t.delegate=null,f;var i=r.arg;return i?i.done?(t[e.resultName]=i.value,t.next=e.nextLoc,"return"!==t.method&&(t.method="next",t.arg=void 0),t.delegate=null,f):i:(t.method="throw",t.arg=new TypeError("iterator result is not an object"),t.delegate=null,f)}function x(e){var t={tryLoc:e[0]};1 in e&&(t.catchLoc=e[1]),2 in e&&(t.finallyLoc=e[2],t.afterLoc=e[3]),this.tryEntries.push(t)}function k(e){var t=e.completion||{};t.type="normal",delete t.arg,e.completion=t}function C(e){this.tryEntries=[{tryLoc:"root"}],e.forEach(x,this),this.reset(!0)}function E(e){if(e){var t=e[o];if(t)return t.call(e);if("function"==typeof e.next)return e;if(!isNaN(e.length)){var r=-1,i=function t(){for(;++r=0;--i){var o=this.tryEntries[i],a=o.completion;if("root"===o.tryLoc)return r("end");if(o.tryLoc<=this.prev){var u=n.call(o,"catchLoc"),l=n.call(o,"finallyLoc");if(u&&l){if(this.prev=0;--r){var i=this.tryEntries[r];if(i.tryLoc<=this.prev&&n.call(i,"finallyLoc")&&this.prev=0;--t){var n=this.tryEntries[t];if(n.finallyLoc===e)return this.complete(n.completion,n.afterLoc),k(n),f}},catch:function(e){for(var t=this.tryEntries.length-1;t>=0;--t){var n=this.tryEntries[t];if(n.tryLoc===e){var r=n.completion;if("throw"===r.type){var i=r.arg;k(n)}return i}}throw new Error("illegal catch attempt")},delegateYield:function(e,t,n){return this.delegate={iterator:E(e),resultName:t,nextLoc:n},"next"===this.method&&(this.arg=void 0),f}},e}function Kc(e,t,n,r,i,o,a){try{var u=e[o](a),l=u.value}catch(c){return void n(c)}u.done?t(l):Promise.resolve(l).then(r,i)}function Xc(e){return function(){var t=this,n=arguments;return new Promise((function(r,i){var o=e.apply(t,n);function a(e){Kc(o,r,i,a,u,"next",e)}function u(e){Kc(o,r,i,a,u,"throw",e)}a(void 0)}))}}var es=function(e){var t=e.legend,n=e.onChange,r=_t(X(""),2),i=r[0],o=r[1],a=oe((function(){return function(e){var t=Object.keys(e.freeFormFields).filter((function(e){return"__name__"!==e}));return t.map((function(t){var n="".concat(t,'="').concat(e.freeFormFields[t],'"');return{id:"".concat(e.label,".").concat(n),freeField:n,key:t}}))}(t)}),[t]),u=function(){var e=Xc(Jc().mark((function e(t,n){return Jc().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,navigator.clipboard.writeText(t);case 2:o(n),setTimeout((function(){return o("")}),2e3);case 4:case"end":return e.stop()}}),e)})));return function(t,n){return e.apply(this,arguments)}}();return fr("div",{className:Oi()({"vm-legend-item":!0,"vm-legend-item_hide":!t.checked}),onClick:function(e){return function(t){n(e,t.ctrlKey||t.metaKey)}}(t),children:[fr("div",{className:"vm-legend-item__marker",style:{backgroundColor:t.color}}),fr("div",{className:"vm-legend-item-info",children:[fr("span",{className:"vm-legend-item-info__label",children:Uc(t.label)}),"\xa0{",a.map((function(e){return fr(fo,{open:i===e.id,title:"Copied!",placement:"top-center",children:fr("span",{className:"vm-legend-item-info__free-fields",onClick:(t=e.freeField,n=e.id,function(e){e.stopPropagation(),u(t,n)}),children:e.freeField},e.key)},e.id);var t,n})),"}"]})]})},ts=function(e){var t=e.labels,n=e.query,r=e.onChange,i=oe((function(){return Array.from(new Set(t.map((function(e){return e.group}))))}),[t]);return fr(m,{children:fr("div",{className:"vm-legend",children:i.map((function(e){return fr("div",{className:"vm-legend-group",children:[fr("div",{className:"vm-legend-group-title",children:[fr("span",{className:"vm-legend-group-title__count",children:["Query ",e,": "]}),fr("span",{className:"vm-legend-group-title__query",children:n[e-1]})]}),fr("div",{children:t.filter((function(t){return t.group===e})).map((function(e){return fr(es,{legend:e,onChange:r},e.label)}))})]},e)}))})})};function ns(e,t){if(null==e)return{};var n,r,i=function(e,t){if(null==e)return{};var n,r,i={},o=Object.keys(e);for(r=0;r=0||(i[n]=e[n]);return i}(e,t);if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(e);for(r=0;r=0||Object.prototype.propertyIsEnumerable.call(e,n)&&(i[n]=e[n])}return i}var rs=["__name__"],is=function(e,t,n){var r=function(e,t){var n=e.metric,r=n.__name__,i=ns(n,rs),o=t||r||"";return 0===Object.keys(e.metric).length?o||"Result ".concat(e.group):"".concat(o," {").concat(Object.entries(i).map((function(e){return"".concat(e[0],": ").concat(e[1])})).join(", "),"}")}(e,n[e.group-1]),i="[".concat(e.group,"]").concat(r);return{label:i,freeFormFields:e.metric,width:1.4,stroke:zc(i),show:!as(i,t),scale:"1",points:{size:4.2,width:1.4}}},os=function(e,t){return{group:t,label:e.label||"",color:e.stroke,checked:e.show||!1,freeFormFields:e.freeFormFields}},as=function(e,t){return t.includes("".concat(e))},us=function(e){switch(e){case"NaN":return NaN;case"Inf":case"+Inf":return 1/0;case"-Inf":return-1/0;default:return parseFloat(e)}},ls=function(e){var t=e.data,n=void 0===t?[]:t,r=e.period,i=e.customStep,o=e.query,a=e.yaxis,u=e.unit,l=e.showLegend,c=void 0===l||l,s=e.setYaxisLimits,f=e.setPeriod,d=e.alias,h=void 0===d?[]:d,p=e.fullWidth,v=void 0===p||p,m=oe((function(){return i||r.step||1}),[r.step,i]),y=_t(X([[]]),2),g=y[0],_=y[1],b=_t(X([]),2),D=b[0],w=b[1],x=_t(X([]),2),k=x[0],C=x[1],E=_t(X([]),2),A=E[0],S=E[1],F=function(e){var t=function(e){var t={},n=Object.values(e).flat(),r=Yc(n),i=Hc(n);return t[1]=qc(r,i),t}(e);s(t)};te((function(){var e=[],t={},i=[],o=[{}];null===n||void 0===n||n.forEach((function(n){var r=is(n,A,h);o.push(r),i.push(os(r,n.group));var a,u=t[n.group]||[],l=zo(n.values);try{for(l.s();!(a=l.n()).done;){var c=a.value;e.push(c[0]),u.push(us(c[1]))}}catch(s){l.e(s)}finally{l.f()}t[n.group]=u}));var a=function(e,t,n){for(var r=Array.from(new Set(e)).sort((function(e,t){return e-t})),i=n.start,o=Nr(n.end+t),a=0,u=[];i<=o;){for(;a=r.length||r[a]>i)&&u.push(i)}for(;u.length<2;)u.push(i),i=Nr(i+t);return u}(e,m,r),u=n.map((function(e){var t,n=[],r=e.values,i=r.length,o=0,u=zo(a);try{for(u.s();!(t=u.n()).done;){for(var l=t.value;o1e10*h?n.map((function(){return f})):n}));u.unshift(a),F(t),_(u),w(o),C(i)}),[n]),te((function(){var e=[],t=[{}];null===n||void 0===n||n.forEach((function(n){var r=is(n,A,h);t.push(r),e.push(os(r,n.group))})),w(t),C(e)}),[A]);var N=re(null);return fr("div",{className:Oi()({"vm-graph-view":!0,"vm-graph-view_full-width":v}),ref:N,children:[(null===N||void 0===N?void 0:N.current)&&fr(Zc,{data:g,series:D,metrics:n,period:r,yaxis:a,unit:u,setPeriod:f,container:null===N||void 0===N?void 0:N.current}),c&&fr(ts,{labels:k,query:o,onChange:function(e,t){S(function(e){var t=e.hideSeries,n=e.legend,r=e.metaKey,i=e.series,o=n.label,a=as(o,t),u=i.map((function(e){return e.label||""}));return r?a?t.filter((function(e){return e!==o})):[].concat(bt(t),[o]):t.length?a?bt(u.filter((function(e){return e!==o}))):[]:bt(u.filter((function(e){return e!==o})))}({hideSeries:A,legend:e,metaKey:t,series:D}))}})]})},cs=function(e){var t=e.value,n=e.onChange,r=e.onEnter,i=e.onArrowUp,o=e.onArrowDown,a=e.autocomplete,u=e.error,l=e.options,s=e.label,f=e.disabled,d=void 0!==f&&f,h=_t(X(-1),2),p=h[0],v=h[1],m=_t(X(!1),2),y=m[0],g=m[1],_=re(null),b=re(null),D=oe((function(){if(v(0),!y)return[];try{var e=new RegExp(String(t),"i");return l.filter((function(n){return e.test(n)&&n!==t})).sort((function(t,n){var r,i;return((null===(r=t.match(e))||void 0===r?void 0:r.index)||0)-((null===(i=n.match(e))||void 0===i?void 0:i.index)||0)}))}catch(c){return[]}}),[y,l]),w=function(){g(!1)},x=function(e){return function(){d||(n(e),w())}};return te((function(){var e=(t.match(/[a-zA-Z_:.][a-zA-Z0-9_:.]*/gm)||[]).length;g(a&&t.length>2&&e<=1)}),[a,t]),te((function(){if(b.current){var e=b.current.childNodes[p];null!==e&&void 0!==e&&e.scrollIntoView&&e.scrollIntoView({block:"center"})}}),[p]),co(_,(function(){return g(!1)}),b),fr("div",{className:"vm-query-editor",ref:_,children:[fr(So,{value:t,label:s,type:"textarea",autofocus:!!t,error:u,onKeyDown:function(e){var t=e.key,a=e.ctrlKey,u=e.metaKey,l=e.shiftKey,c=a||u,s="ArrowUp"===t,f="ArrowDown"===t,h="Enter"===t,m=y&&D.length,_=s||f;if((_&&m||_&&c||h&&m)&&e.preventDefault(),s&&m&&!c?v((function(e){return 0===e?0:e-1})):s&&c&&i(),f&&m&&!c?v((function(e){return e>=D.length-1?D.length-1:e+1})):f&&c&&o(),h&&m&&!l&&!c){if(d)return;n(D[p]),g(!1)}else h&&!l&&r()},onChange:n,disabled:d}),fr(so,{open:y,buttonRef:_,placement:"bottom-left",onClose:w,children:fr("div",{className:"vm-query-editor-autocomplete",ref:b,children:D.map((function(e,t){return fr("div",{className:Oi()({"vm-list__item":!0,"vm-list__item_active":t===p}),id:"$autocomplete$".concat(e),onClick:x(e),children:e},e)}))})})]})},ss=n(936),fs=n.n(ss),ds=function(e){var t=e.defaultStep,n=e.setStep,r=_t(X(t),2),i=r[0],o=r[1],a=_t(X(""),2),u=a[0],l=a[1],c=ae(fs()((function(e){return n(e||1)}),700),[]),s=function(e){e>0?(o(e),c(e),l("")):l("step is out of allowed range")};return te((function(){t&&s(t)}),[t]),fr(So,{label:"Step value",type:"number",value:i,error:u,onChange:function(e){var t=+e;t&&s(t)},endIcon:fr(fo,{title:"Reset step to default",children:fr(lo,{variant:"text",size:"small",startIcon:fr(ui,{}),onClick:function(){s(t||1)}})})})},hs=function(){var e=Xn().serverURL,t=hr().tenantId,n=pr(),r=Qr(),i=_t(X(t||0),2),o=i[0],a=i[1],u=ae(fs()((function(t){var i=Number(t);if(n({type:"SET_TENANT_ID",payload:i}),e){var o=e.replace(/(\/select\/)([\d]+)(\/prometheus)/gim,"$1".concat(i,"$3"));n({type:"SET_SERVER",payload:o}),r({type:"RUN_QUERY"})}}),700),[]);return te((function(){o!==t&&a(t)}),[t]),fr(So,{label:"Tenant ID",type:"number",value:o,onChange:function(e){a(e),u(e)},endIcon:fr(fo,{title:"Define tenant id if you need request to another storage",children:fr(lo,{variant:"text",size:"small",startIcon:fr(li,{})})})})},ps=function(e){var t,n=e.value,r=void 0!==n&&n,i=e.disabled,o=void 0!==i&&i,a=e.label,u=e.color,l=void 0===u?"secondary":u,c=e.onChange;return fr("div",{className:Oi()((qn(t={"vm-switch":!0,"vm-switch_disabled":o,"vm-switch_active":r},"vm-switch_".concat(l,"_active"),r),qn(t,"vm-switch_".concat(l),l),t)),onClick:function(){o||c(!r)},children:[fr("div",{className:"vm-switch-track",children:fr("div",{className:"vm-switch-track__thumb"})}),a&&fr("span",{className:"vm-switch__label",children:a})]})},vs=function(){var e=Wi(),t=Xn().inputTenantID,n=ni().autocomplete,r=ri(),i=Ui(),o=i.nocache,a=i.isTracingEnabled,u=Hi(),l=Wr().period.step;return fr("div",{className:"vm-additional-settings",children:[fr(ps,{label:"Autocomplete",value:n,onChange:function(){r({type:"TOGGLE_AUTOCOMPLETE"})}}),fr(ps,{label:"Disable cache",value:o,onChange:function(){u({type:"TOGGLE_NO_CACHE"})}}),fr(ps,{label:"Trace query",value:a,onChange:function(){u({type:"TOGGLE_QUERY_TRACING"})}}),fr("div",{className:"vm-additional-settings__input",children:fr(ds,{defaultStep:l,setStep:function(t){e({type:"SET_CUSTOM_STEP",payload:t})}})}),!!t&&fr("div",{className:"vm-additional-settings__input",children:fr(hs,{})})]})};var ms=function(e){var t=re();return te((function(){t.current=e}),[e]),t.current},ys=function(e){var t=e.error,n=e.queryOptions,r=e.onHideQuery,i=ni(),o=i.query,a=i.queryHistory,u=i.autocomplete,l=ri(),c=Qr(),s=_t(X(o||[]),2),f=s[0],d=s[1],h=_t(X([]),2),p=h[0],v=h[1],m=ms(f),y=function(){l({type:"SET_QUERY_HISTORY",payload:f.map((function(e,t){var n=a[t]||{values:[]},r=e===n.values[n.values.length-1];return{index:n.values.length-Number(r),values:!r&&e?[].concat(bt(n.values),[e]):n.values}}))}),l({type:"SET_QUERY",payload:f}),c({type:"RUN_QUERY"})},g=function(e,t){d((function(n){return n.map((function(n,r){return r===t?e:n}))}))},_=function(e,t){return function(){!function(e,t){var n=a[t],r=n.index,i=n.values,o=r+e;o<0||o>=i.length||(g(i[o]||"",t),l({type:"SET_QUERY_HISTORY_BY_INDEX",payload:{value:{values:i,index:o},queryNumber:t}}))}(e,t)}},b=function(e){return function(t){g(t,e)}},D=function(e){return function(){var t;t=e,d((function(e){return e.filter((function(e,n){return n!==t}))})),v((function(t){return t.map((function(t){return t>e?t-1:t}))}))}},w=function(e){return function(){var t;t=e,v((function(e){return e.includes(t)?e.filter((function(e){return e!==t})):[].concat(bt(e),[t])}))}};return te((function(){m&&f.length1&&fr(fo,{title:"Remove Query",children:fr("div",{className:"vm-query-configurator-list-row__button",children:fr(lo,{variant:"text",color:"error",startIcon:fr(Ci,{}),onClick:D(r)})})})]},r)}))}),fr("div",{className:"vm-query-configurator-settings",children:[fr(vs,{}),fr("div",{className:"vm-query-configurator-settings__buttons",children:[f.length<4&&fr(lo,{variant:"outlined",onClick:function(){d((function(e){return[].concat(bt(e),[""])}))},startIcon:fr(Ei,{}),children:"Add Query"}),fr(lo,{variant:"contained",onClick:y,startIcon:fr(bi,{}),children:"Execute Query"})]})]})]})};function gs(e){var t,n,r,i=2;for("undefined"!=typeof Symbol&&(n=Symbol.asyncIterator,r=Symbol.iterator);i--;){if(n&&null!=(t=e[n]))return t.call(e);if(r&&null!=(t=e[r]))return new _s(t.call(e));n="@@asyncIterator",r="@@iterator"}throw new TypeError("Object is not async iterable")}function _s(e){function t(e){if(Object(e)!==e)return Promise.reject(new TypeError(e+" is not an object."));var t=e.done;return Promise.resolve(e.value).then((function(e){return{value:e,done:t}}))}return _s=function(e){this.s=e,this.n=e.next},_s.prototype={s:null,n:null,next:function(){return t(this.n.apply(this.s,arguments))},return:function(e){var n=this.s.return;return void 0===n?Promise.resolve({value:e,done:!0}):t(n.apply(this.s,arguments))},throw:function(e){var n=this.s.return;return void 0===n?Promise.reject(e):t(n.apply(this.s,arguments))}},new _s(e)}var bs=0,Ds=function(){function e(t,n){Dt(this,e),this.tracing=void 0,this.tracingChildren=void 0,this.query=void 0,this.id=void 0,this.tracing=t,this.query=n,this.id=bs++;var r=t.children||[];this.tracingChildren=r.map((function(t){return new e(t,n)}))}return xt(e,[{key:"queryValue",get:function(){return this.query}},{key:"idValue",get:function(){return this.id}},{key:"children",get:function(){return this.tracingChildren}},{key:"message",get:function(){return this.tracing.message}},{key:"duration",get:function(){return this.tracing.duration_msec}}]),e}(),ws=function(e){var t=e.predefinedQuery,n=e.visible,r=e.display,i=e.customStep,o=e.hideQuery,a=void 0===o?[]:o,u=ni().query,l=Wr().period,c=Ui(),s=c.displayType,f=c.nocache,d=c.isTracingEnabled,h=hr().serverUrl,p=_t(X(!1),2),v=p[0],m=p[1],y=_t(X(),2),g=y[0],_=y[1],b=_t(X(),2),D=b[0],w=b[1],x=_t(X(),2),k=x[0],C=x[1],E=_t(X(),2),A=E[0],S=E[1],F=_t(X(),2),N=F[0],O=F[1],T=_t(X([]),2),B=T[0],M=T[1];te((function(){A&&(_(void 0),w(void 0),C(void 0))}),[A]);var L=function(){var e=Xc(Jc().mark((function e(t,n,r,i){var o,a,u,l,c,s;return Jc().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return o=new AbortController,M([].concat(bt(n),[o])),e.prev=2,e.delegateYield(Jc().mark((function e(){var n,f,d,h,p,v,m,y,g,b,D,x;return Jc().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:n="chart"===r,f=or[r],d=[],h=[],p=1,v=0,a=!1,u=!1,e.prev=8,c=gs(t);case 10:return e.next=12,c.next();case 12:if(!(a=!(s=e.sent).done)){e.next=24;break}return m=s.value,e.next=16,fetch(m,{signal:o.signal});case 16:return y=e.sent,e.next=19,y.json();case 19:g=e.sent,y.ok?(S(void 0),g.trace&&(b=new Ds(g.trace,i[p-1]),h.push(b)),D=f-d.length,g.data.result.slice(0,D).forEach((function(e){e.group=p,d.push(e)})),v+=g.data.result.length,p++):S("".concat(g.errorType,"\r\n").concat(null===g||void 0===g?void 0:g.error));case 21:a=!1,e.next=10;break;case 24:e.next=30;break;case 26:e.prev=26,e.t0=e.catch(8),u=!0,l=e.t0;case 30:if(e.prev=30,e.prev=31,!a||null==c.return){e.next=35;break}return e.next=35,c.return();case 35:if(e.prev=35,!u){e.next=38;break}throw l;case 38:return e.finish(35);case 39:return e.finish(30);case 40:x="Showing ".concat(f," series out of ").concat(v," series due to performance reasons. Please narrow down the query, so it returns less series"),O(v>f?x:""),n?_(d):w(d),C(h);case 44:case"end":return e.stop()}}),e,null,[[8,26,30,40],[31,,35,39]])}))(),"t0",4);case 4:e.next=9;break;case 6:e.prev=6,e.t1=e.catch(2),e.t1 instanceof Error&&"AbortError"!==e.t1.name&&S("".concat(e.t1.name,": ").concat(e.t1.message));case 9:m(!1);case 10:case"end":return e.stop()}}),e,null,[[2,6]])})));return function(t,n,r,i){return e.apply(this,arguments)}}(),P=ae(fs()(L,800),[]),$=oe((function(){var e=null!==t&&void 0!==t?t:u,n="chart"===(r||s);if(l)if(h)if(e.every((function(e){return!e.trim()})))S(Do.validQuery);else{if(Fo(h)){var o=Kn({},l);return o.step=i,e.filter((function(e,t){return e.trim()&&!a.includes(t)})).map((function(e){return n?function(e,t,n,r,i){return"".concat(e,"/api/v1/query_range?query=").concat(encodeURIComponent(t),"&start=").concat(n.start,"&end=").concat(n.end,"&step=").concat(n.step).concat(r?"&nocache=1":"").concat(i?"&trace=1":"")}(h,e,o,f,d):function(e,t,n,r){return"".concat(e,"/api/v1/query?query=").concat(encodeURIComponent(t),"&time=").concat(n.end,"&step=").concat(n.step).concat(r?"&trace=1":"")}(h,e,o,d)}))}S(Do.validServer)}else S(Do.emptyServer)}),[h,l,s,i,a]);return te((function(){n&&null!==$&&void 0!==$&&$.length&&(m(!0),P($,B,r||s,null!==t&&void 0!==t?t:u))}),[$,n]),te((function(){var e=B.slice(0,-1);e.length&&(e.map((function(e){return e.abort()})),M(B.filter((function(e){return!e.signal.aborted}))))}),[B]),{fetchUrl:$,isLoading:v,graphData:g,liveData:D,error:A,warning:N,traces:k}},xs=function(e){var t=e.data,n=ue(ao).showInfoMessage,r=oe((function(){return JSON.stringify(t,null,2)}),[t]);return fr("div",{className:"vm-json-view",children:[fr("div",{className:"vm-json-view__copy",children:fr(lo,{variant:"outlined",fullWidth:!1,onClick:function(){navigator.clipboard.writeText(r),n({text:"Formatted JSON has been copied",type:"success"})},children:"Copy JSON"})}),fr("pre",{className:"vm-json-view__code",children:fr("code",{children:r})})]})},ks=function(e){var t=e.yaxis,n=e.setYaxisLimits,r=e.toggleEnableLimits,i=oe((function(){return Object.keys(t.limits.range)}),[t.limits.range]),o=ae(fs()((function(e,r,i){var o=t.limits.range;o[r][i]=+e,o[r][0]===o[r][1]||o[r][0]>o[r][1]||n(o)}),500),[t.limits.range]),a=function(e,t){return function(n){o(n,e,t)}};return fr("div",{className:"vm-axes-limits",children:[fr(ps,{value:t.limits.enable,onChange:r,label:"Fix the limits for y-axis"}),fr("div",{className:"vm-axes-limits-list",children:i.map((function(e){return fr("div",{className:"vm-axes-limits-list__inputs",children:[fr(So,{label:"Min ".concat(e),type:"number",disabled:!t.limits.enable,value:t.limits.range[e][0],onChange:a(e,0)}),fr(So,{label:"Max ".concat(e),type:"number",disabled:!t.limits.enable,value:t.limits.range[e][1],onChange:a(e,1)})]},e)}))})]})},Cs="Axes settings",Es=function(e){var t=e.yaxis,n=e.setYaxisLimits,r=e.toggleEnableLimits,i=re(null),o=_t(X(!1),2),a=o[0],u=o[1],l=re(null);co(i,(function(){return u(!1)}),l);var c=function(){u(!1)};return fr("div",{className:"vm-graph-settings",children:[fr(fo,{title:Cs,children:fr("div",{ref:l,children:fr(lo,{variant:"text",startIcon:fr(oi,{}),onClick:function(){u((function(e){return!e}))}})})}),fr(so,{open:a,buttonRef:l,placement:"bottom-right",onClose:c,children:fr("div",{className:"vm-graph-settings-popper",ref:i,children:[fr("div",{className:"vm-popper-header",children:[fr("h3",{className:"vm-popper-header__title",children:Cs}),fr(lo,{size:"small",startIcon:fr(ai,{}),onClick:c})]}),fr("div",{className:"vm-graph-settings-popper__body",children:fr(ks,{yaxis:t,setYaxisLimits:n,toggleEnableLimits:r})})]})})]})},As=function(e){var t=e.containerStyles,n=void 0===t?{}:t,r=e.message;return fr("div",{className:"vm-spinner",style:n&&{},children:[fr("div",{className:"half-circle-spinner",children:[fr("div",{className:"circle circle-1"}),fr("div",{className:"circle circle-2"})]}),r&&fr("div",{className:"vm-spinner__message",children:r})]})},Ss=function(){var e=hr().serverUrl,t=_t(X([]),2),n=t[0],r=t[1],i=function(){var t=Xc(Jc().mark((function t(){var n,i,o;return Jc().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:if(e){t.next=2;break}return t.abrupt("return");case 2:return n="".concat(e,"/api/v1/label/__name__/values"),t.prev=3,t.next=6,fetch(n);case 6:return i=t.sent,t.next=9,i.json();case 9:o=t.sent,i.ok&&r(o.data),t.next=16;break;case 13:t.prev=13,t.t0=t.catch(3),console.error(t.t0);case 16:case"end":return t.stop()}}),t,null,[[3,13]])})));return function(){return t.apply(this,arguments)}}();return te((function(){i()}),[e]),{queryOptions:n}},Fs=function(e){var t=e.value;return fr("div",{className:"vm-line-progress",children:[fr("div",{className:"vm-line-progress-track",children:fr("div",{className:"vm-line-progress-track__thumb",style:{width:"".concat(t,"%")}})}),fr("span",{children:[t.toFixed(2),"%"]})]})},Ns=function e(t){var n,r=t.trace,i=t.totalMsec,o=_t(X({}),2),a=o[0],u=o[1],l=r.children&&!!r.children.length,c=r.duration/i*100;return fr("div",{className:"vm-nested-nav",children:[fr("div",{className:"vm-nested-nav-header",onClick:(n=r.idValue,function(){u((function(e){return Kn(Kn({},e),{},qn({},n,!e[n]))}))}),children:[l&&fr("div",{className:Oi()({"vm-nested-nav-header__icon":!0,"vm-nested-nav-header__icon_open":a[r.idValue]}),children:fr(pi,{})}),fr("div",{className:"vm-nested-nav-header__progress",children:fr(Fs,{value:c})}),fr("div",{className:"vm-nested-nav-header__message",children:r.message}),fr("div",{className:"vm-nested-nav-header__duration",children:"duration: ".concat(r.duration," ms")})]}),a[r.idValue]&&fr("div",{children:l&&r.children.map((function(t){return fr(e,{trace:t,totalMsec:i},t.duration)}))})]})},Os=function(e){var t=e.traces,n=e.onDeleteClick;if(!t.length)return fr(oo,{variant:"info",children:"Please re-run the query to see results of the tracing"});return fr("div",{className:"vm-tracings-view",children:t.map((function(e){return fr("div",{className:"vm-tracings-view-trace vm-block vm-block_empty-padding",children:[fr("div",{className:"vm-tracings-view-trace-header",children:[fr("h3",{className:"vm-tracings-view-trace-header-title",children:["Trace for ",fr("b",{className:"vm-tracings-view-trace-header-title__query",children:e.queryValue})]}),fr(fo,{title:"Remove trace",children:fr(lo,{variant:"text",color:"error",startIcon:fr(Ci,{}),onClick:(t=e,function(){n(t)})})})]}),fr("nav",{className:"vm-tracings-view-trace__nav",children:fr(Ns,{trace:e,totalMsec:e.duration})})]},e.idValue);var t}))})},Ts=function(e,t){return oe((function(){var n={};e.forEach((function(e){return Object.entries(e.metric).forEach((function(e){return n[e[0]]?n[e[0]].options.add(e[1]):n[e[0]]={options:new Set([e[1]])}}))}));var r=Object.entries(n).map((function(e){return{key:e[0],variations:e[1].options.size}})).sort((function(e,t){return e.variations-t.variations}));return t?r.filter((function(e){return t.includes(e.key)})):r}),[e,t])},Bs=function(e){var t,n=e.checked,r=void 0!==n&&n,i=e.disabled,o=void 0!==i&&i,a=e.label,u=e.color,l=void 0===u?"secondary":u,c=e.onChange;return fr("div",{className:Oi()((qn(t={"vm-checkbox":!0,"vm-checkbox_disabled":o,"vm-checkbox_active":r},"vm-checkbox_".concat(l,"_active"),r),qn(t,"vm-checkbox_".concat(l),l),t)),onClick:function(){o||c(!r)},children:[fr("div",{className:"vm-checkbox-track",children:fr("div",{className:"vm-checkbox-track__thumb",children:fr(Ai,{})})}),a&&fr("span",{className:"vm-checkbox__label",children:a})]})},Ms="Display columns",Ls=function(e){var t=e.data,n=e.defaultColumns,r=e.onChange,i=re(null),o=_t(X(!1),2),a=o[0],u=o[1],l=Ts(t),c=oe((function(){return!l.length}),[l]),s=_t(X(l.map((function(e){return e.key}))),2),f=s[0],d=s[1],h=function(){u(!1),d(n||l.map((function(e){return e.key})))},p=function(e){return function(){!function(e){d((function(t){return f.includes(e)?t.filter((function(t){return t!==e})):[].concat(bt(t),[e])}))}(e)}};return te((function(){d(l.map((function(e){return e.key})))}),[l]),fr("div",{className:"vm-table-settings",children:[fr(fo,{title:Ms,children:fr("div",{ref:i,children:fr(lo,{variant:"text",startIcon:fr(oi,{}),onClick:function(){u((function(e){return!e}))},disabled:c})})}),fr(so,{open:a,onClose:h,placement:"bottom-right",buttonRef:i,children:fr("div",{className:"vm-table-settings-popper",children:[fr("div",{className:"vm-popper-header",children:[fr("h3",{className:"vm-popper-header__title",children:Ms}),fr(lo,{onClick:h,startIcon:fr(ai,{}),size:"small"})]}),fr("div",{className:"vm-table-settings-popper-list",children:l.map((function(e){return fr("div",{className:"vm-table-settings-popper-list__item",children:fr(Bs,{checked:f.includes(e.key),onChange:p(e.key),label:e.key})},e.key)}))}),fr("div",{className:"vm-table-settings-popper__footer",children:[fr(lo,{color:"error",variant:"outlined",size:"small",onClick:function(){u(!1);var e=l.map((function(e){return e.key}));d(e),r(e)},children:"Reset"}),fr(lo,{variant:"contained",size:"small",onClick:function(){u(!1),r(f)},children:"apply"})]})]})})]})};function Ps(e){return function(e,t){return Object.fromEntries(Object.entries(e).filter(t))}(e,(function(e){return!!e[1]}))}var $s=function(e){var t=e.data,n=e.displayColumns,r=Ts(t,n),i=_t(X(""),2),o=i[0],a=i[1],u=_t(X("asc"),2),l=u[0],c=u[1],s=oe((function(){var e=null===t||void 0===t?void 0:t.map((function(e){return{metadata:r.map((function(t){return e.metric[t.key]||"-"})),value:e.value?e.value[1]:"-"}})),n="Value"===o,i=r.findIndex((function(e){return e.key===o}));return n||-1!==i?e.sort((function(e,t){var r=n?Number(e.value):e.metadata[i],o=n?Number(t.value):t.metadata[i];return("asc"===l?ro)?-1:1})):e}),[r,t,o,l]),f=function(e){return function(){d(e)}},d=function(e){c((function(t){return"asc"===t&&o===e?"desc":"asc"})),a(e)};return s.length?fr("table",{className:"vm-table",children:[fr("thead",{className:"vm-table-header",children:fr("tr",{className:"vm-table__row vm-table__row_header",children:[r.map((function(e,t){return fr("td",{className:"vm-table-cell vm-table-cell_header vm-table-cell_sort",onClick:f(e.key),children:fr("div",{className:"vm-table-cell__content",children:[e.key,fr("div",{className:Oi()({"vm-table__sort-icon":!0,"vm-table__sort-icon_active":o===e.key,"vm-table__sort-icon_desc":"desc"===l&&o===e.key}),children:fr(vi,{})})]})},t)})),fr("td",{className:"vm-table-cell vm-table-cell_header vm-table-cell_right vm-table-cell_sort",onClick:f("Value"),children:fr("div",{className:"vm-table-cell__content",children:[fr("div",{className:Oi()({"vm-table__sort-icon":!0,"vm-table__sort-icon_active":"Value"===o,"vm-table__sort-icon_desc":"desc"===l}),children:fr(vi,{})}),"Value"]})})]})}),fr("tbody",{className:"vm-table-body",children:s.map((function(e,t){return fr("tr",{className:"vm-table__row",children:[e.metadata.map((function(e,n){return fr("td",{className:Oi()({"vm-table-cell vm-table-cell_no-wrap":!0,"vm-table-cell_gray":s[t-1]&&s[t-1].metadata[n]===e}),children:e},n)})),fr("td",{className:"vm-table-cell vm-table-cell_right",children:e.value})]},t)}))})]}):fr(oo,{variant:"warning",children:"No data to show"})},Rs=function(){var e=Ui(),t=e.displayType,n=e.isTracingEnabled,r=ni().query,i=Wr().period,o=Qr();!function(){var e=hr().tenantId,t=Ui().displayType,n=ni().query,r=Wr(),i=r.duration,o=r.relativeTime,a=r.period,u=a.date,l=a.step,c=function(){var r={};n.forEach((function(n,a){var c,s="g".concat(a);r["".concat(s,".expr")]=n,r["".concat(s,".range_input")]=i,r["".concat(s,".end_input")]=u,r["".concat(s,".step_input")]=l,r["".concat(s,".tab")]=(null===(c=Li.find((function(e){return e.value===t})))||void 0===c?void 0:c.prometheusCode)||0,r["".concat(s,".relative_time")]=o,r["".concat(s,".tenantID")]=e})),ar(Ps(r))};te(c,[e,t,n,i,o,u,l]),te(c,[])}();var a=_t(X(),2),u=a[0],l=a[1],c=_t(X([]),2),s=c[0],f=c[1],d=_t(X([]),2),h=d[0],p=d[1],v=ue(qi).state,m=v.customStep,y=v.yaxis,g=Wi(),_=Ss().queryOptions,b=ws({visible:!0,customStep:m,hideQuery:h}),D=b.isLoading,w=b.liveData,x=b.graphData,k=b.error,C=b.warning,E=b.traces,A=function(e){g({type:"SET_YAXIS_LIMITS",payload:e})};return te((function(){E&&f([].concat(bt(s),bt(E)))}),[E]),te((function(){f([])}),[t]),fr("div",{className:"vm-custom-panel",children:[fr(ys,{error:k,queryOptions:_,onHideQuery:function(e){p(e)}}),n&&fr("div",{className:"vm-custom-panel__trace",children:fr(Os,{traces:s,onDeleteClick:function(e){var t=s.filter((function(t){return t.idValue!==e.idValue}));f(bt(t))}})}),D&&fr(As,{}),k&&fr(oo,{variant:"error",children:k}),C&&fr(oo,{variant:"warning",children:C}),fr("div",{className:"vm-custom-panel-body vm-block",children:[fr("div",{className:"vm-custom-panel-body-header",children:[fr(Pi,{}),"chart"===t&&fr(Es,{yaxis:y,setYaxisLimits:A,toggleEnableLimits:function(){g({type:"TOGGLE_ENABLE_YAXIS_LIMITS"})}}),"table"===t&&fr(Ls,{data:w||[],defaultColumns:u,onChange:l})]}),x&&i&&"chart"===t&&fr(ls,{data:x,period:i,customStep:m,query:r,yaxis:y,setYaxisLimits:A,setPeriod:function(e){var t=e.from,n=e.to;o({type:"SET_PERIOD",payload:{from:t,to:n}})}}),w&&"code"===t&&fr(xs,{data:w}),w&&"table"===t&&fr($s,{data:w,displayColumns:u})]})]})},Is=function(){var e=Xc(Jc().mark((function e(t){var n,r;return Jc().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,fetch("./dashboards/".concat(t));case 2:return n=e.sent,e.next=5,n.json();case 5:return r=e.sent,e.abrupt("return",r);case 7:case"end":return e.stop()}}),e)})));return function(t){return e.apply(this,arguments)}}(),js=Xc(Jc().mark((function e(){var t;return Jc().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return t=window.__VMUI_PREDEFINED_DASHBOARDS__,e.next=3,Promise.all(t.map(function(){var e=Xc(Jc().mark((function e(t){return Jc().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.abrupt("return",Is(t));case 1:case"end":return e.stop()}}),e)})));return function(t){return e.apply(this,arguments)}}()));case 3:return e.abrupt("return",e.sent);case 4:case"end":return e.stop()}}),e)})));function zs(){return{async:!1,baseUrl:null,breaks:!1,extensions:null,gfm:!0,headerIds:!0,headerPrefix:"",highlight:null,langPrefix:"language-",mangle:!0,pedantic:!1,renderer:null,sanitize:!1,sanitizer:null,silent:!1,smartypants:!1,tokenizer:null,walkTokens:null,xhtml:!1}}var Us={async:!1,baseUrl:null,breaks:!1,extensions:null,gfm:!0,headerIds:!0,headerPrefix:"",highlight:null,langPrefix:"language-",mangle:!0,pedantic:!1,renderer:null,sanitize:!1,sanitizer:null,silent:!1,smartypants:!1,tokenizer:null,walkTokens:null,xhtml:!1};var Hs=/[&<>"']/,Ys=/[&<>"']/g,Vs=/[<>"']|&(?!#?\w+;)/,qs=/[<>"']|&(?!#?\w+;)/g,Ws={"&":"&","<":"<",">":">",'"':""","'":"'"},Qs=function(e){return Ws[e]};function Gs(e,t){if(t){if(Hs.test(e))return e.replace(Ys,Qs)}else if(Vs.test(e))return e.replace(qs,Qs);return e}var Zs=/&(#(?:\d+)|(?:#x[0-9A-Fa-f]+)|(?:\w+));?/gi;function Js(e){return e.replace(Zs,(function(e,t){return"colon"===(t=t.toLowerCase())?":":"#"===t.charAt(0)?"x"===t.charAt(1)?String.fromCharCode(parseInt(t.substring(2),16)):String.fromCharCode(+t.substring(1)):""}))}var Ks=/(^|[^\[])\^/g;function Xs(e,t){e="string"===typeof e?e:e.source,t=t||"";var n={replace:function(t,r){return r=(r=r.source||r).replace(Ks,"$1"),e=e.replace(t,r),n},getRegex:function(){return new RegExp(e,t)}};return n}var ef=/[^\w:]/g,tf=/^$|^[a-z][a-z0-9+.-]*:|^[?#]/i;function nf(e,t,n){if(e){var r;try{r=decodeURIComponent(Js(n)).replace(ef,"").toLowerCase()}catch(c){return null}if(0===r.indexOf("javascript:")||0===r.indexOf("vbscript:")||0===r.indexOf("data:"))return null}t&&!tf.test(n)&&(n=function(e,t){rf[" "+e]||(of.test(e)?rf[" "+e]=e+"/":rf[" "+e]=ff(e,"/",!0));var n=-1===(e=rf[" "+e]).indexOf(":");return"//"===t.substring(0,2)?n?t:e.replace(af,"$1")+t:"/"===t.charAt(0)?n?t:e.replace(uf,"$1")+t:e+t}(t,n));try{n=encodeURI(n).replace(/%25/g,"%")}catch(c){return null}return n}var rf={},of=/^[^:]+:\/*[^/]*$/,af=/^([^:]+:)[\s\S]*$/,uf=/^([^:]+:\/*[^/]*)[\s\S]*$/;var lf={exec:function(){}};function cf(e){for(var t,n,r=1;r=0&&"\\"===n[i];)r=!r;return r?"|":" |"})).split(/ \|/),r=0;if(n[0].trim()||n.shift(),n.length>0&&!n[n.length-1].trim()&&n.pop(),n.length>t)n.splice(t);else for(;n.length1;)1&t&&(n+=e),t>>=1,e+=e;return n+e}function pf(e,t,n,r){var i=t.href,o=t.title?Gs(t.title):null,a=e[1].replace(/\\([\[\]])/g,"$1");if("!"!==e[0].charAt(0)){r.state.inLink=!0;var u={type:"link",raw:n,href:i,title:o,text:a,tokens:r.inlineTokens(a)};return r.state.inLink=!1,u}return{type:"image",raw:n,href:i,title:o,text:Gs(a)}}var vf=function(){function e(t){Dt(this,e),this.options=t||Us}return xt(e,[{key:"space",value:function(e){var t=this.rules.block.newline.exec(e);if(t&&t[0].length>0)return{type:"space",raw:t[0]}}},{key:"code",value:function(e){var t=this.rules.block.code.exec(e);if(t){var n=t[0].replace(/^ {1,4}/gm,"");return{type:"code",raw:t[0],codeBlockStyle:"indented",text:this.options.pedantic?n:ff(n,"\n")}}}},{key:"fences",value:function(e){var t=this.rules.block.fences.exec(e);if(t){var n=t[0],r=function(e,t){var n=e.match(/^(\s+)(?:```)/);if(null===n)return t;var r=n[1];return t.split("\n").map((function(e){var t=e.match(/^\s+/);return null===t?e:_t(t,1)[0].length>=r.length?e.slice(r.length):e})).join("\n")}(n,t[3]||"");return{type:"code",raw:n,lang:t[2]?t[2].trim().replace(this.rules.inline._escapes,"$1"):t[2],text:r}}}},{key:"heading",value:function(e){var t=this.rules.block.heading.exec(e);if(t){var n=t[2].trim();if(/#$/.test(n)){var r=ff(n,"#");this.options.pedantic?n=r.trim():r&&!/ $/.test(r)||(n=r.trim())}return{type:"heading",raw:t[0],depth:t[1].length,text:n,tokens:this.lexer.inline(n)}}}},{key:"hr",value:function(e){var t=this.rules.block.hr.exec(e);if(t)return{type:"hr",raw:t[0]}}},{key:"blockquote",value:function(e){var t=this.rules.block.blockquote.exec(e);if(t){var n=t[0].replace(/^ *>[ \t]?/gm,"");return{type:"blockquote",raw:t[0],tokens:this.lexer.blockTokens(n,[]),text:n}}}},{key:"list",value:function(e){var t=this.rules.block.list.exec(e);if(t){var n,r,i,o,a,u,l,c,s,f,d,h,p=t[1].trim(),v=p.length>1,m={type:"list",raw:"",ordered:v,start:v?+p.slice(0,-1):"",loose:!1,items:[]};p=v?"\\d{1,9}\\".concat(p.slice(-1)):"\\".concat(p),this.options.pedantic&&(p=v?p:"[*+-]");for(var y=new RegExp("^( {0,3}".concat(p,")((?:[\t ][^\\n]*)?(?:\\n|$))"));e&&(h=!1,t=y.exec(e))&&!this.rules.block.hr.test(e);){if(n=t[0],e=e.substring(n.length),c=t[2].split("\n",1)[0],s=e.split("\n",1)[0],this.options.pedantic?(o=2,d=c.trimLeft()):(o=(o=t[2].search(/[^ ]/))>4?1:o,d=c.slice(o),o+=t[1].length),u=!1,!c&&/^ *$/.test(s)&&(n+=s+"\n",e=e.substring(s.length+1),h=!0),!h)for(var g=new RegExp("^ {0,".concat(Math.min(3,o-1),"}(?:[*+-]|\\d{1,9}[.)])((?: [^\\n]*)?(?:\\n|$))")),_=new RegExp("^ {0,".concat(Math.min(3,o-1),"}((?:- *){3,}|(?:_ *){3,}|(?:\\* *){3,})(?:\\n+|$)")),b=new RegExp("^ {0,".concat(Math.min(3,o-1),"}(?:```|~~~)")),D=new RegExp("^ {0,".concat(Math.min(3,o-1),"}#"));e&&(c=f=e.split("\n",1)[0],this.options.pedantic&&(c=c.replace(/^ {1,4}(?=( {4})*[^ ])/g," ")),!b.test(c))&&!D.test(c)&&!g.test(c)&&!_.test(e);){if(c.search(/[^ ]/)>=o||!c.trim())d+="\n"+c.slice(o);else{if(u)break;d+="\n"+c}u||c.trim()||(u=!0),n+=f+"\n",e=e.substring(f.length+1)}m.loose||(l?m.loose=!0:/\n *\n *$/.test(n)&&(l=!0)),this.options.gfm&&(r=/^\[[ xX]\] /.exec(d))&&(i="[ ] "!==r[0],d=d.replace(/^\[[ xX]\] +/,"")),m.items.push({type:"list_item",raw:n,task:!!r,checked:i,loose:!1,text:d}),m.raw+=n}m.items[m.items.length-1].raw=n.trimRight(),m.items[m.items.length-1].text=d.trimRight(),m.raw=m.raw.trimRight();var w=m.items.length;for(a=0;a1)return!0}}catch(i){r.e(i)}finally{r.f()}return!1}));!m.loose&&x.length&&k&&(m.loose=!0,m.items[a].loose=!0)}return m}}},{key:"html",value:function(e){var t=this.rules.block.html.exec(e);if(t){var n={type:"html",raw:t[0],pre:!this.options.sanitizer&&("pre"===t[1]||"script"===t[1]||"style"===t[1]),text:t[0]};if(this.options.sanitize){var r=this.options.sanitizer?this.options.sanitizer(t[0]):Gs(t[0]);n.type="paragraph",n.text=r,n.tokens=this.lexer.inline(r)}return n}}},{key:"def",value:function(e){var t=this.rules.block.def.exec(e);if(t)return t[3]&&(t[3]=t[3].substring(1,t[3].length-1)),{type:"def",tag:t[1].toLowerCase().replace(/\s+/g," "),raw:t[0],href:t[2]?t[2].replace(this.rules.inline._escapes,"$1"):t[2],title:t[3]?t[3].replace(this.rules.inline._escapes,"$1"):t[3]}}},{key:"table",value:function(e){var t=this.rules.block.table.exec(e);if(t){var n={type:"table",header:sf(t[1]).map((function(e){return{text:e}})),align:t[2].replace(/^ *|\| *$/g,"").split(/ *\| */),rows:t[3]&&t[3].trim()?t[3].replace(/\n[ \t]*$/,"").split("\n"):[]};if(n.header.length===n.align.length){n.raw=t[0];var r,i,o,a,u=n.align.length;for(r=0;r/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:this.options.sanitize?"text":"html",raw:t[0],inLink:this.lexer.state.inLink,inRawBlock:this.lexer.state.inRawBlock,text:this.options.sanitize?this.options.sanitizer?this.options.sanitizer(t[0]):Gs(t[0]):t[0]}}},{key:"link",value:function(e){var t=this.rules.inline.link.exec(e);if(t){var n=t[2].trim();if(!this.options.pedantic&&/^$/.test(n))return;var r=ff(n.slice(0,-1),"\\");if((n.length-r.length)%2===0)return}else{var i=function(e,t){if(-1===e.indexOf(t[1]))return-1;for(var n=e.length,r=0,i=0;i-1){var o=(0===t[0].indexOf("!")?5:4)+t[1].length+i;t[2]=t[2].substring(0,i),t[0]=t[0].substring(0,o).trim(),t[3]=""}}var a=t[2],u="";if(this.options.pedantic){var l=/^([^'"]*[^\s])\s+(['"])(.*)\2/.exec(a);l&&(a=l[1],u=l[3])}else u=t[3]?t[3].slice(1,-1):"";return a=a.trim(),/^$/.test(n)?a.slice(1):a.slice(1,-1)),pf(t,{href:a?a.replace(this.rules.inline._escapes,"$1"):a,title:u?u.replace(this.rules.inline._escapes,"$1"):u},t[0],this.lexer)}}},{key:"reflink",value:function(e,t){var n;if((n=this.rules.inline.reflink.exec(e))||(n=this.rules.inline.nolink.exec(e))){var r=(n[2]||n[1]).replace(/\s+/g," ");if(!(r=t[r.toLowerCase()])||!r.href){var i=n[0].charAt(0);return{type:"text",raw:i,text:i}}return pf(n,r,n[0],this.lexer)}}},{key:"emStrong",value:function(e,t){var n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:"",r=this.rules.inline.emStrong.lDelim.exec(e);if(r&&(!r[3]||!n.match(/(?:[0-9A-Za-z\xAA\xB2\xB3\xB5\xB9\xBA\xBC-\xBE\xC0-\xD6\xD8-\xF6\xF8-\u02C1\u02C6-\u02D1\u02E0-\u02E4\u02EC\u02EE\u0370-\u0374\u0376\u0377\u037A-\u037D\u037F\u0386\u0388-\u038A\u038C\u038E-\u03A1\u03A3-\u03F5\u03F7-\u0481\u048A-\u052F\u0531-\u0556\u0559\u0560-\u0588\u05D0-\u05EA\u05EF-\u05F2\u0620-\u064A\u0660-\u0669\u066E\u066F\u0671-\u06D3\u06D5\u06E5\u06E6\u06EE-\u06FC\u06FF\u0710\u0712-\u072F\u074D-\u07A5\u07B1\u07C0-\u07EA\u07F4\u07F5\u07FA\u0800-\u0815\u081A\u0824\u0828\u0840-\u0858\u0860-\u086A\u0870-\u0887\u0889-\u088E\u08A0-\u08C9\u0904-\u0939\u093D\u0950\u0958-\u0961\u0966-\u096F\u0971-\u0980\u0985-\u098C\u098F\u0990\u0993-\u09A8\u09AA-\u09B0\u09B2\u09B6-\u09B9\u09BD\u09CE\u09DC\u09DD\u09DF-\u09E1\u09E6-\u09F1\u09F4-\u09F9\u09FC\u0A05-\u0A0A\u0A0F\u0A10\u0A13-\u0A28\u0A2A-\u0A30\u0A32\u0A33\u0A35\u0A36\u0A38\u0A39\u0A59-\u0A5C\u0A5E\u0A66-\u0A6F\u0A72-\u0A74\u0A85-\u0A8D\u0A8F-\u0A91\u0A93-\u0AA8\u0AAA-\u0AB0\u0AB2\u0AB3\u0AB5-\u0AB9\u0ABD\u0AD0\u0AE0\u0AE1\u0AE6-\u0AEF\u0AF9\u0B05-\u0B0C\u0B0F\u0B10\u0B13-\u0B28\u0B2A-\u0B30\u0B32\u0B33\u0B35-\u0B39\u0B3D\u0B5C\u0B5D\u0B5F-\u0B61\u0B66-\u0B6F\u0B71-\u0B77\u0B83\u0B85-\u0B8A\u0B8E-\u0B90\u0B92-\u0B95\u0B99\u0B9A\u0B9C\u0B9E\u0B9F\u0BA3\u0BA4\u0BA8-\u0BAA\u0BAE-\u0BB9\u0BD0\u0BE6-\u0BF2\u0C05-\u0C0C\u0C0E-\u0C10\u0C12-\u0C28\u0C2A-\u0C39\u0C3D\u0C58-\u0C5A\u0C5D\u0C60\u0C61\u0C66-\u0C6F\u0C78-\u0C7E\u0C80\u0C85-\u0C8C\u0C8E-\u0C90\u0C92-\u0CA8\u0CAA-\u0CB3\u0CB5-\u0CB9\u0CBD\u0CDD\u0CDE\u0CE0\u0CE1\u0CE6-\u0CEF\u0CF1\u0CF2\u0D04-\u0D0C\u0D0E-\u0D10\u0D12-\u0D3A\u0D3D\u0D4E\u0D54-\u0D56\u0D58-\u0D61\u0D66-\u0D78\u0D7A-\u0D7F\u0D85-\u0D96\u0D9A-\u0DB1\u0DB3-\u0DBB\u0DBD\u0DC0-\u0DC6\u0DE6-\u0DEF\u0E01-\u0E30\u0E32\u0E33\u0E40-\u0E46\u0E50-\u0E59\u0E81\u0E82\u0E84\u0E86-\u0E8A\u0E8C-\u0EA3\u0EA5\u0EA7-\u0EB0\u0EB2\u0EB3\u0EBD\u0EC0-\u0EC4\u0EC6\u0ED0-\u0ED9\u0EDC-\u0EDF\u0F00\u0F20-\u0F33\u0F40-\u0F47\u0F49-\u0F6C\u0F88-\u0F8C\u1000-\u102A\u103F-\u1049\u1050-\u1055\u105A-\u105D\u1061\u1065\u1066\u106E-\u1070\u1075-\u1081\u108E\u1090-\u1099\u10A0-\u10C5\u10C7\u10CD\u10D0-\u10FA\u10FC-\u1248\u124A-\u124D\u1250-\u1256\u1258\u125A-\u125D\u1260-\u1288\u128A-\u128D\u1290-\u12B0\u12B2-\u12B5\u12B8-\u12BE\u12C0\u12C2-\u12C5\u12C8-\u12D6\u12D8-\u1310\u1312-\u1315\u1318-\u135A\u1369-\u137C\u1380-\u138F\u13A0-\u13F5\u13F8-\u13FD\u1401-\u166C\u166F-\u167F\u1681-\u169A\u16A0-\u16EA\u16EE-\u16F8\u1700-\u1711\u171F-\u1731\u1740-\u1751\u1760-\u176C\u176E-\u1770\u1780-\u17B3\u17D7\u17DC\u17E0-\u17E9\u17F0-\u17F9\u1810-\u1819\u1820-\u1878\u1880-\u1884\u1887-\u18A8\u18AA\u18B0-\u18F5\u1900-\u191E\u1946-\u196D\u1970-\u1974\u1980-\u19AB\u19B0-\u19C9\u19D0-\u19DA\u1A00-\u1A16\u1A20-\u1A54\u1A80-\u1A89\u1A90-\u1A99\u1AA7\u1B05-\u1B33\u1B45-\u1B4C\u1B50-\u1B59\u1B83-\u1BA0\u1BAE-\u1BE5\u1C00-\u1C23\u1C40-\u1C49\u1C4D-\u1C7D\u1C80-\u1C88\u1C90-\u1CBA\u1CBD-\u1CBF\u1CE9-\u1CEC\u1CEE-\u1CF3\u1CF5\u1CF6\u1CFA\u1D00-\u1DBF\u1E00-\u1F15\u1F18-\u1F1D\u1F20-\u1F45\u1F48-\u1F4D\u1F50-\u1F57\u1F59\u1F5B\u1F5D\u1F5F-\u1F7D\u1F80-\u1FB4\u1FB6-\u1FBC\u1FBE\u1FC2-\u1FC4\u1FC6-\u1FCC\u1FD0-\u1FD3\u1FD6-\u1FDB\u1FE0-\u1FEC\u1FF2-\u1FF4\u1FF6-\u1FFC\u2070\u2071\u2074-\u2079\u207F-\u2089\u2090-\u209C\u2102\u2107\u210A-\u2113\u2115\u2119-\u211D\u2124\u2126\u2128\u212A-\u212D\u212F-\u2139\u213C-\u213F\u2145-\u2149\u214E\u2150-\u2189\u2460-\u249B\u24EA-\u24FF\u2776-\u2793\u2C00-\u2CE4\u2CEB-\u2CEE\u2CF2\u2CF3\u2CFD\u2D00-\u2D25\u2D27\u2D2D\u2D30-\u2D67\u2D6F\u2D80-\u2D96\u2DA0-\u2DA6\u2DA8-\u2DAE\u2DB0-\u2DB6\u2DB8-\u2DBE\u2DC0-\u2DC6\u2DC8-\u2DCE\u2DD0-\u2DD6\u2DD8-\u2DDE\u2E2F\u3005-\u3007\u3021-\u3029\u3031-\u3035\u3038-\u303C\u3041-\u3096\u309D-\u309F\u30A1-\u30FA\u30FC-\u30FF\u3105-\u312F\u3131-\u318E\u3192-\u3195\u31A0-\u31BF\u31F0-\u31FF\u3220-\u3229\u3248-\u324F\u3251-\u325F\u3280-\u3289\u32B1-\u32BF\u3400-\u4DBF\u4E00-\uA48C\uA4D0-\uA4FD\uA500-\uA60C\uA610-\uA62B\uA640-\uA66E\uA67F-\uA69D\uA6A0-\uA6EF\uA717-\uA71F\uA722-\uA788\uA78B-\uA7CA\uA7D0\uA7D1\uA7D3\uA7D5-\uA7D9\uA7F2-\uA801\uA803-\uA805\uA807-\uA80A\uA80C-\uA822\uA830-\uA835\uA840-\uA873\uA882-\uA8B3\uA8D0-\uA8D9\uA8F2-\uA8F7\uA8FB\uA8FD\uA8FE\uA900-\uA925\uA930-\uA946\uA960-\uA97C\uA984-\uA9B2\uA9CF-\uA9D9\uA9E0-\uA9E4\uA9E6-\uA9FE\uAA00-\uAA28\uAA40-\uAA42\uAA44-\uAA4B\uAA50-\uAA59\uAA60-\uAA76\uAA7A\uAA7E-\uAAAF\uAAB1\uAAB5\uAAB6\uAAB9-\uAABD\uAAC0\uAAC2\uAADB-\uAADD\uAAE0-\uAAEA\uAAF2-\uAAF4\uAB01-\uAB06\uAB09-\uAB0E\uAB11-\uAB16\uAB20-\uAB26\uAB28-\uAB2E\uAB30-\uAB5A\uAB5C-\uAB69\uAB70-\uABE2\uABF0-\uABF9\uAC00-\uD7A3\uD7B0-\uD7C6\uD7CB-\uD7FB\uF900-\uFA6D\uFA70-\uFAD9\uFB00-\uFB06\uFB13-\uFB17\uFB1D\uFB1F-\uFB28\uFB2A-\uFB36\uFB38-\uFB3C\uFB3E\uFB40\uFB41\uFB43\uFB44\uFB46-\uFBB1\uFBD3-\uFD3D\uFD50-\uFD8F\uFD92-\uFDC7\uFDF0-\uFDFB\uFE70-\uFE74\uFE76-\uFEFC\uFF10-\uFF19\uFF21-\uFF3A\uFF41-\uFF5A\uFF66-\uFFBE\uFFC2-\uFFC7\uFFCA-\uFFCF\uFFD2-\uFFD7\uFFDA-\uFFDC]|\uD800[\uDC00-\uDC0B\uDC0D-\uDC26\uDC28-\uDC3A\uDC3C\uDC3D\uDC3F-\uDC4D\uDC50-\uDC5D\uDC80-\uDCFA\uDD07-\uDD33\uDD40-\uDD78\uDD8A\uDD8B\uDE80-\uDE9C\uDEA0-\uDED0\uDEE1-\uDEFB\uDF00-\uDF23\uDF2D-\uDF4A\uDF50-\uDF75\uDF80-\uDF9D\uDFA0-\uDFC3\uDFC8-\uDFCF\uDFD1-\uDFD5]|\uD801[\uDC00-\uDC9D\uDCA0-\uDCA9\uDCB0-\uDCD3\uDCD8-\uDCFB\uDD00-\uDD27\uDD30-\uDD63\uDD70-\uDD7A\uDD7C-\uDD8A\uDD8C-\uDD92\uDD94\uDD95\uDD97-\uDDA1\uDDA3-\uDDB1\uDDB3-\uDDB9\uDDBB\uDDBC\uDE00-\uDF36\uDF40-\uDF55\uDF60-\uDF67\uDF80-\uDF85\uDF87-\uDFB0\uDFB2-\uDFBA]|\uD802[\uDC00-\uDC05\uDC08\uDC0A-\uDC35\uDC37\uDC38\uDC3C\uDC3F-\uDC55\uDC58-\uDC76\uDC79-\uDC9E\uDCA7-\uDCAF\uDCE0-\uDCF2\uDCF4\uDCF5\uDCFB-\uDD1B\uDD20-\uDD39\uDD80-\uDDB7\uDDBC-\uDDCF\uDDD2-\uDE00\uDE10-\uDE13\uDE15-\uDE17\uDE19-\uDE35\uDE40-\uDE48\uDE60-\uDE7E\uDE80-\uDE9F\uDEC0-\uDEC7\uDEC9-\uDEE4\uDEEB-\uDEEF\uDF00-\uDF35\uDF40-\uDF55\uDF58-\uDF72\uDF78-\uDF91\uDFA9-\uDFAF]|\uD803[\uDC00-\uDC48\uDC80-\uDCB2\uDCC0-\uDCF2\uDCFA-\uDD23\uDD30-\uDD39\uDE60-\uDE7E\uDE80-\uDEA9\uDEB0\uDEB1\uDF00-\uDF27\uDF30-\uDF45\uDF51-\uDF54\uDF70-\uDF81\uDFB0-\uDFCB\uDFE0-\uDFF6]|\uD804[\uDC03-\uDC37\uDC52-\uDC6F\uDC71\uDC72\uDC75\uDC83-\uDCAF\uDCD0-\uDCE8\uDCF0-\uDCF9\uDD03-\uDD26\uDD36-\uDD3F\uDD44\uDD47\uDD50-\uDD72\uDD76\uDD83-\uDDB2\uDDC1-\uDDC4\uDDD0-\uDDDA\uDDDC\uDDE1-\uDDF4\uDE00-\uDE11\uDE13-\uDE2B\uDE3F\uDE40\uDE80-\uDE86\uDE88\uDE8A-\uDE8D\uDE8F-\uDE9D\uDE9F-\uDEA8\uDEB0-\uDEDE\uDEF0-\uDEF9\uDF05-\uDF0C\uDF0F\uDF10\uDF13-\uDF28\uDF2A-\uDF30\uDF32\uDF33\uDF35-\uDF39\uDF3D\uDF50\uDF5D-\uDF61]|\uD805[\uDC00-\uDC34\uDC47-\uDC4A\uDC50-\uDC59\uDC5F-\uDC61\uDC80-\uDCAF\uDCC4\uDCC5\uDCC7\uDCD0-\uDCD9\uDD80-\uDDAE\uDDD8-\uDDDB\uDE00-\uDE2F\uDE44\uDE50-\uDE59\uDE80-\uDEAA\uDEB8\uDEC0-\uDEC9\uDF00-\uDF1A\uDF30-\uDF3B\uDF40-\uDF46]|\uD806[\uDC00-\uDC2B\uDCA0-\uDCF2\uDCFF-\uDD06\uDD09\uDD0C-\uDD13\uDD15\uDD16\uDD18-\uDD2F\uDD3F\uDD41\uDD50-\uDD59\uDDA0-\uDDA7\uDDAA-\uDDD0\uDDE1\uDDE3\uDE00\uDE0B-\uDE32\uDE3A\uDE50\uDE5C-\uDE89\uDE9D\uDEB0-\uDEF8]|\uD807[\uDC00-\uDC08\uDC0A-\uDC2E\uDC40\uDC50-\uDC6C\uDC72-\uDC8F\uDD00-\uDD06\uDD08\uDD09\uDD0B-\uDD30\uDD46\uDD50-\uDD59\uDD60-\uDD65\uDD67\uDD68\uDD6A-\uDD89\uDD98\uDDA0-\uDDA9\uDEE0-\uDEF2\uDF02\uDF04-\uDF10\uDF12-\uDF33\uDF50-\uDF59\uDFB0\uDFC0-\uDFD4]|\uD808[\uDC00-\uDF99]|\uD809[\uDC00-\uDC6E\uDC80-\uDD43]|\uD80B[\uDF90-\uDFF0]|[\uD80C\uD81C-\uD820\uD822\uD840-\uD868\uD86A-\uD86C\uD86F-\uD872\uD874-\uD879\uD880-\uD883\uD885-\uD887][\uDC00-\uDFFF]|\uD80D[\uDC00-\uDC2F\uDC41-\uDC46]|\uD811[\uDC00-\uDE46]|\uD81A[\uDC00-\uDE38\uDE40-\uDE5E\uDE60-\uDE69\uDE70-\uDEBE\uDEC0-\uDEC9\uDED0-\uDEED\uDF00-\uDF2F\uDF40-\uDF43\uDF50-\uDF59\uDF5B-\uDF61\uDF63-\uDF77\uDF7D-\uDF8F]|\uD81B[\uDE40-\uDE96\uDF00-\uDF4A\uDF50\uDF93-\uDF9F\uDFE0\uDFE1\uDFE3]|\uD821[\uDC00-\uDFF7]|\uD823[\uDC00-\uDCD5\uDD00-\uDD08]|\uD82B[\uDFF0-\uDFF3\uDFF5-\uDFFB\uDFFD\uDFFE]|\uD82C[\uDC00-\uDD22\uDD32\uDD50-\uDD52\uDD55\uDD64-\uDD67\uDD70-\uDEFB]|\uD82F[\uDC00-\uDC6A\uDC70-\uDC7C\uDC80-\uDC88\uDC90-\uDC99]|\uD834[\uDEC0-\uDED3\uDEE0-\uDEF3\uDF60-\uDF78]|\uD835[\uDC00-\uDC54\uDC56-\uDC9C\uDC9E\uDC9F\uDCA2\uDCA5\uDCA6\uDCA9-\uDCAC\uDCAE-\uDCB9\uDCBB\uDCBD-\uDCC3\uDCC5-\uDD05\uDD07-\uDD0A\uDD0D-\uDD14\uDD16-\uDD1C\uDD1E-\uDD39\uDD3B-\uDD3E\uDD40-\uDD44\uDD46\uDD4A-\uDD50\uDD52-\uDEA5\uDEA8-\uDEC0\uDEC2-\uDEDA\uDEDC-\uDEFA\uDEFC-\uDF14\uDF16-\uDF34\uDF36-\uDF4E\uDF50-\uDF6E\uDF70-\uDF88\uDF8A-\uDFA8\uDFAA-\uDFC2\uDFC4-\uDFCB\uDFCE-\uDFFF]|\uD837[\uDF00-\uDF1E\uDF25-\uDF2A]|\uD838[\uDC30-\uDC6D\uDD00-\uDD2C\uDD37-\uDD3D\uDD40-\uDD49\uDD4E\uDE90-\uDEAD\uDEC0-\uDEEB\uDEF0-\uDEF9]|\uD839[\uDCD0-\uDCEB\uDCF0-\uDCF9\uDFE0-\uDFE6\uDFE8-\uDFEB\uDFED\uDFEE\uDFF0-\uDFFE]|\uD83A[\uDC00-\uDCC4\uDCC7-\uDCCF\uDD00-\uDD43\uDD4B\uDD50-\uDD59]|\uD83B[\uDC71-\uDCAB\uDCAD-\uDCAF\uDCB1-\uDCB4\uDD01-\uDD2D\uDD2F-\uDD3D\uDE00-\uDE03\uDE05-\uDE1F\uDE21\uDE22\uDE24\uDE27\uDE29-\uDE32\uDE34-\uDE37\uDE39\uDE3B\uDE42\uDE47\uDE49\uDE4B\uDE4D-\uDE4F\uDE51\uDE52\uDE54\uDE57\uDE59\uDE5B\uDE5D\uDE5F\uDE61\uDE62\uDE64\uDE67-\uDE6A\uDE6C-\uDE72\uDE74-\uDE77\uDE79-\uDE7C\uDE7E\uDE80-\uDE89\uDE8B-\uDE9B\uDEA1-\uDEA3\uDEA5-\uDEA9\uDEAB-\uDEBB]|\uD83C[\uDD00-\uDD0C]|\uD83E[\uDFF0-\uDFF9]|\uD869[\uDC00-\uDEDF\uDF00-\uDFFF]|\uD86D[\uDC00-\uDF39\uDF40-\uDFFF]|\uD86E[\uDC00-\uDC1D\uDC20-\uDFFF]|\uD873[\uDC00-\uDEA1\uDEB0-\uDFFF]|\uD87A[\uDC00-\uDFE0]|\uD87E[\uDC00-\uDE1D]|\uD884[\uDC00-\uDF4A\uDF50-\uDFFF]|\uD888[\uDC00-\uDFAF])/))){var i=r[1]||r[2]||"";if(!i||i&&(""===n||this.rules.inline.punctuation.exec(n))){var o,a,u=r[0].length-1,l=u,c=0,s="*"===r[0][0]?this.rules.inline.emStrong.rDelimAst:this.rules.inline.emStrong.rDelimUnd;for(s.lastIndex=0,t=t.slice(-1*e.length+u);null!=(r=s.exec(t));)if(o=r[1]||r[2]||r[3]||r[4]||r[5]||r[6])if(a=o.length,r[3]||r[4])l+=a;else if(!((r[5]||r[6])&&u%3)||(u+a)%3){if(!((l-=a)>0)){a=Math.min(a,a+l+c);var f=e.slice(0,u+r.index+(r[0].length-o.length)+a);if(Math.min(u,a)%2){var d=f.slice(1,-1);return{type:"em",raw:f,text:d,tokens:this.lexer.inlineTokens(d)}}var h=f.slice(2,-2);return{type:"strong",raw:f,text:h,tokens:this.lexer.inlineTokens(h)}}}else c+=a}}}},{key:"codespan",value:function(e){var t=this.rules.inline.code.exec(e);if(t){var n=t[2].replace(/\n/g," "),r=/[^ ]/.test(n),i=/^ /.test(n)&&/ $/.test(n);return r&&i&&(n=n.substring(1,n.length-1)),n=Gs(n,!0),{type:"codespan",raw:t[0],text:n}}}},{key:"br",value:function(e){var t=this.rules.inline.br.exec(e);if(t)return{type:"br",raw:t[0]}}},{key:"del",value:function(e){var t=this.rules.inline.del.exec(e);if(t)return{type:"del",raw:t[0],text:t[2],tokens:this.lexer.inlineTokens(t[2])}}},{key:"autolink",value:function(e,t){var n,r,i=this.rules.inline.autolink.exec(e);if(i)return r="@"===i[2]?"mailto:"+(n=Gs(this.options.mangle?t(i[1]):i[1])):n=Gs(i[1]),{type:"link",raw:i[0],text:n,href:r,tokens:[{type:"text",raw:n,text:n}]}}},{key:"url",value:function(e,t){var n;if(n=this.rules.inline.url.exec(e)){var r,i;if("@"===n[2])i="mailto:"+(r=Gs(this.options.mangle?t(n[0]):n[0]));else{var o;do{o=n[0],n[0]=this.rules.inline._backpedal.exec(n[0])[0]}while(o!==n[0]);r=Gs(n[0]),i="www."===n[1]?"http://"+r:r}return{type:"link",raw:n[0],text:r,href:i,tokens:[{type:"text",raw:r,text:r}]}}}},{key:"inlineText",value:function(e,t){var n,r=this.rules.inline.text.exec(e);if(r)return n=this.lexer.state.inRawBlock?this.options.sanitize?this.options.sanitizer?this.options.sanitizer(r[0]):Gs(r[0]):r[0]:Gs(this.options.smartypants?t(r[0]):r[0]),{type:"text",raw:r[0],text:n}}}]),e}(),mf={newline:/^(?: *(?:\n|$))+/,code:/^( {4}[^\n]+(?:\n(?: *(?:\n|$))*)?)+/,fences:/^ {0,3}(`{3,}(?=[^`\n]*\n)|~{3,})([^\n]*)\n(?:|([\s\S]*?)\n)(?: {0,3}\1[~`]* *(?=\n|$)|$)/,hr:/^ {0,3}((?:-[\t ]*){3,}|(?:_[ \t]*){3,}|(?:\*[ \t]*){3,})(?:\n+|$)/,heading:/^ {0,3}(#{1,6})(?=\s|$)(.*)(?:\n+|$)/,blockquote:/^( {0,3}> ?(paragraph|[^\n]*)(?:\n|$))+/,list:/^( {0,3}bull)([ \t][^\n]+?)?(?:\n|$)/,html:"^ {0,3}(?:<(script|pre|style|textarea)[\\s>][\\s\\S]*?(?:[^\\n]*\\n+|$)|comment[^\\n]*(\\n+|$)|<\\?[\\s\\S]*?(?:\\?>\\n*|$)|\\n*|$)|\\n*|$)|)[\\s\\S]*?(?:(?:\\n *)+\\n|$)|<(?!script|pre|style|textarea)([a-z][\\w-]*)(?:attribute)*? */?>(?=[ \\t]*(?:\\n|$))[\\s\\S]*?(?:(?:\\n *)+\\n|$)|(?=[ \\t]*(?:\\n|$))[\\s\\S]*?(?:(?:\\n *)+\\n|$))",def:/^ {0,3}\[(label)\]: *(?:\n *)?]+)>?(?:(?: +(?:\n *)?| *\n *)(title))? *(?:\n+|$)/,table:lf,lheading:/^([^\n]+)\n {0,3}(=+|-+) *(?:\n+|$)/,_paragraph:/^([^\n]+(?:\n(?!hr|heading|lheading|blockquote|fences|list|html|table| +\n)[^\n]+)*)/,text:/^[^\n]+/,_label:/(?!\s*\])(?:\\.|[^\[\]\\])+/,_title:/(?:"(?:\\"?|[^"\\])*"|'[^'\n]*(?:\n[^'\n]+)*\n?'|\([^()]*\))/};mf.def=Xs(mf.def).replace("label",mf._label).replace("title",mf._title).getRegex(),mf.bullet=/(?:[*+-]|\d{1,9}[.)])/,mf.listItemStart=Xs(/^( *)(bull) */).replace("bull",mf.bullet).getRegex(),mf.list=Xs(mf.list).replace(/bull/g,mf.bullet).replace("hr","\\n+(?=\\1?(?:(?:- *){3,}|(?:_ *){3,}|(?:\\* *){3,})(?:\\n+|$))").replace("def","\\n+(?="+mf.def.source+")").getRegex(),mf._tag="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|section|source|summary|table|tbody|td|tfoot|th|thead|title|tr|track|ul",mf._comment=/|$)/,mf.html=Xs(mf.html,"i").replace("comment",mf._comment).replace("tag",mf._tag).replace("attribute",/ +[a-zA-Z:_][\w.:-]*(?: *= *"[^"\n]*"| *= *'[^'\n]*'| *= *[^\s"'=<>`]+)?/).getRegex(),mf.paragraph=Xs(mf._paragraph).replace("hr",mf.hr).replace("heading"," {0,3}#{1,6} ").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",mf._tag).getRegex(),mf.blockquote=Xs(mf.blockquote).replace("paragraph",mf.paragraph).getRegex(),mf.normal=cf({},mf),mf.gfm=cf({},mf.normal,{table:"^ *([^\\n ].*\\|.*)\\n {0,3}(?:\\| *)?(:?-+:? *(?:\\| *:?-+:? *)*)(?:\\| *)?(?:\\n((?:(?! *\\n|hr|heading|blockquote|code|fences|list|html).*(?:\\n|$))*)\\n*|$)"}),mf.gfm.table=Xs(mf.gfm.table).replace("hr",mf.hr).replace("heading"," {0,3}#{1,6} ").replace("blockquote"," {0,3}>").replace("code"," {4}[^\\n]").replace("fences"," {0,3}(?:`{3,}(?=[^`\\n]*\\n)|~{3,})[^\\n]*\\n").replace("list"," {0,3}(?:[*+-]|1[.)]) ").replace("html",")|<(?:script|pre|style|textarea|!--)").replace("tag",mf._tag).getRegex(),mf.gfm.paragraph=Xs(mf._paragraph).replace("hr",mf.hr).replace("heading"," {0,3}#{1,6} ").replace("|lheading","").replace("table",mf.gfm.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",mf._tag).getRegex(),mf.pedantic=cf({},mf.normal,{html:Xs("^ *(?:comment *(?:\\n|\\s*$)|<(tag)[\\s\\S]+? *(?:\\n{2,}|\\s*$)|\\s]*)*?/?> *(?:\\n{2,}|\\s*$))").replace("comment",mf._comment).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:lf,paragraph:Xs(mf.normal._paragraph).replace("hr",mf.hr).replace("heading"," *#{1,6} *[^\n]").replace("lheading",mf.lheading).replace("blockquote"," {0,3}>").replace("|fences","").replace("|list","").replace("|html","").getRegex()});var yf={escape:/^\\([!"#$%&'()*+,\-./:;<=>?@\[\]\\^_`{|}~])/,autolink:/^<(scheme:[^\s\x00-\x1f<>]*|email)>/,url:lf,tag:"^comment|^|^<[a-zA-Z][\\w-]*(?:attribute)*?\\s*/?>|^<\\?[\\s\\S]*?\\?>|^|^",link:/^!?\[(label)\]\(\s*(href)(?:\s+(title))?\s*\)/,reflink:/^!?\[(label)\]\[(ref)\]/,nolink:/^!?\[(ref)\](?:\[\])?/,reflinkSearch:"reflink|nolink(?!\\()",emStrong:{lDelim:/^(?:\*+(?:([punct_])|[^\s*]))|^_+(?:([punct*])|([^\s_]))/,rDelimAst:/^(?:[^_*\\]|\\.)*?\_\_(?:[^_*\\]|\\.)*?\*(?:[^_*\\]|\\.)*?(?=\_\_)|(?:[^*\\]|\\.)+(?=[^*])|[punct_](\*+)(?=[\s]|$)|(?:[^punct*_\s\\]|\\.)(\*+)(?=[punct_\s]|$)|[punct_\s](\*+)(?=[^punct*_\s])|[\s](\*+)(?=[punct_])|[punct_](\*+)(?=[punct_])|(?:[^punct*_\s\\]|\\.)(\*+)(?=[^punct*_\s])/,rDelimUnd:/^(?:[^_*\\]|\\.)*?\*\*(?:[^_*\\]|\\.)*?\_(?:[^_*\\]|\\.)*?(?=\*\*)|(?:[^_\\]|\\.)+(?=[^_])|[punct*](\_+)(?=[\s]|$)|(?:[^punct*_\s\\]|\\.)(\_+)(?=[punct*\s]|$)|[punct*\s](\_+)(?=[^punct*_\s])|[\s](\_+)(?=[punct*])|[punct*](\_+)(?=[punct*])/},code:/^(`+)([^`]|[^`][\s\S]*?[^`])\1(?!`)/,br:/^( {2,}|\\)\n(?!\s*$)/,del:lf,text:/^(`+|[^`])(?:(?= {2,}\n)|[\s\S]*?(?:(?=[\\.5&&(n="x"+n.toString(16)),r+="&#"+n+";";return r}yf._punctuation="!\"#$%&'()+\\-.,/:;<=>?@\\[\\]`^{|}~",yf.punctuation=Xs(yf.punctuation).replace(/punctuation/g,yf._punctuation).getRegex(),yf.blockSkip=/\[[^\]]*?\]\([^\)]*?\)|`[^`]*?`|<[^>]*?>/g,yf.escapedEmSt=/(?:^|[^\\])(?:\\\\)*\\[*_]/g,yf._comment=Xs(mf._comment).replace("(?:--\x3e|$)","--\x3e").getRegex(),yf.emStrong.lDelim=Xs(yf.emStrong.lDelim).replace(/punct/g,yf._punctuation).getRegex(),yf.emStrong.rDelimAst=Xs(yf.emStrong.rDelimAst,"g").replace(/punct/g,yf._punctuation).getRegex(),yf.emStrong.rDelimUnd=Xs(yf.emStrong.rDelimUnd,"g").replace(/punct/g,yf._punctuation).getRegex(),yf._escapes=/\\([!"#$%&'()*+,\-./:;<=>?@\[\]\\^_`{|}~])/g,yf._scheme=/[a-zA-Z][a-zA-Z0-9+.-]{1,31}/,yf._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])?)+(?![-_])/,yf.autolink=Xs(yf.autolink).replace("scheme",yf._scheme).replace("email",yf._email).getRegex(),yf._attribute=/\s+[a-zA-Z:_][\w.:-]*(?:\s*=\s*"[^"]*"|\s*=\s*'[^']*'|\s*=\s*[^\s"'=<>`]+)?/,yf.tag=Xs(yf.tag).replace("comment",yf._comment).replace("attribute",yf._attribute).getRegex(),yf._label=/(?:\[(?:\\.|[^\[\]\\])*\]|\\.|`[^`]*`|[^\[\]\\`])*?/,yf._href=/<(?:\\.|[^\n<>\\])+>|[^\s\x00-\x1f]*/,yf._title=/"(?:\\"?|[^"\\])*"|'(?:\\'?|[^'\\])*'|\((?:\\\)?|[^)\\])*\)/,yf.link=Xs(yf.link).replace("label",yf._label).replace("href",yf._href).replace("title",yf._title).getRegex(),yf.reflink=Xs(yf.reflink).replace("label",yf._label).replace("ref",mf._label).getRegex(),yf.nolink=Xs(yf.nolink).replace("ref",mf._label).getRegex(),yf.reflinkSearch=Xs(yf.reflinkSearch,"g").replace("reflink",yf.reflink).replace("nolink",yf.nolink).getRegex(),yf.normal=cf({},yf),yf.pedantic=cf({},yf.normal,{strong:{start:/^__|\*\*/,middle:/^__(?=\S)([\s\S]*?\S)__(?!_)|^\*\*(?=\S)([\s\S]*?\S)\*\*(?!\*)/,endAst:/\*\*(?!\*)/g,endUnd:/__(?!_)/g},em:{start:/^_|\*/,middle:/^()\*(?=\S)([\s\S]*?\S)\*(?!\*)|^_(?=\S)([\s\S]*?\S)_(?!_)/,endAst:/\*(?!\*)/g,endUnd:/_(?!_)/g},link:Xs(/^!?\[(label)\]\((.*?)\)/).replace("label",yf._label).getRegex(),reflink:Xs(/^!?\[(label)\]\s*\[([^\]]*)\]/).replace("label",yf._label).getRegex()}),yf.gfm=cf({},yf.normal,{escape:Xs(yf.escape).replace("])","~|])").getRegex(),_extended_email:/[A-Za-z0-9._+-]+(@)[a-zA-Z0-9-_]+(?:\.[a-zA-Z0-9-_]*[a-zA-Z0-9])+(?![-_])/,url:/^((?:ftp|https?):\/\/|www\.)(?:[a-zA-Z0-9\-]+\.?)+[^\s<]*|^email/,_backpedal:/(?:[^?!.,:;*_~()&]+|\([^)]*\)|&(?![a-zA-Z0-9]+;$)|[?!.,:;*_~)]+(?!$))+/,del:/^(~~?)(?=[^\s~])([\s\S]*?[^\s~])\1(?=[^~]|$)/,text:/^([`~]+|[^`~])(?:(?= {2,}\n)|(?=[a-zA-Z0-9.!#$%&'*+\/=?_`{\|}~-]+@)|[\s\S]*?(?:(?=[\\1&&void 0!==arguments[1]?arguments[1]:[];for(e=this.options.pedantic?e.replace(/\t/g," ").replace(/^ +$/gm,""):e.replace(/^( *)(\t+)/gm,(function(e,t,n){return t+" ".repeat(n.length)}));e;)if(!(this.options.extensions&&this.options.extensions.block&&this.options.extensions.block.some((function(n){return!!(t=n.call({lexer:o},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])||"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])||"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&&function(){var t=1/0,n=e.slice(1),i=void 0;o.options.extensions.startBlock.forEach((function(e){"number"===typeof(i=e.call({lexer:this},n))&&i>=0&&(t=Math.min(t,i))})),t<1/0&&t>=0&&(r=e.substring(0,t+1))}(),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])&&"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){var u="Infinite loop on byte: "+e.charCodeAt(0);if(this.options.silent){console.error(u);break}throw new Error(u)}return this.state.top=!0,a}},{key:"inline",value:function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:[];return this.inlineQueue.push({src:e,tokens:t}),t}},{key:"inlineTokens",value:function(e){var t,n,r,i,o,a,u=this,l=arguments.length>1&&void 0!==arguments[1]?arguments[1]:[],c=e;if(this.tokens.links){var s=Object.keys(this.tokens.links);if(s.length>0)for(;null!=(i=this.tokenizer.rules.inline.reflinkSearch.exec(c));)s.includes(i[0].slice(i[0].lastIndexOf("[")+1,-1))&&(c=c.slice(0,i.index)+"["+hf("a",i[0].length-2)+"]"+c.slice(this.tokenizer.rules.inline.reflinkSearch.lastIndex))}for(;null!=(i=this.tokenizer.rules.inline.blockSkip.exec(c));)c=c.slice(0,i.index)+"["+hf("a",i[0].length-2)+"]"+c.slice(this.tokenizer.rules.inline.blockSkip.lastIndex);for(;null!=(i=this.tokenizer.rules.inline.escapedEmSt.exec(c));)c=c.slice(0,i.index+i[0].length-2)+"++"+c.slice(this.tokenizer.rules.inline.escapedEmSt.lastIndex),this.tokenizer.rules.inline.escapedEmSt.lastIndex--;for(;e;)if(o||(a=""),o=!1,!(this.options.extensions&&this.options.extensions.inline&&this.options.extensions.inline.some((function(n){return!!(t=n.call({lexer:u},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])&&"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])&&"text"===t.type&&"text"===n.type?(n.raw+=t.raw,n.text+=t.text):l.push(t);else if(t=this.tokenizer.emStrong(e,c,a))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,_f))e=e.substring(t.raw.length),l.push(t);else if(this.state.inLink||!(t=this.tokenizer.url(e,_f))){if(r=e,this.options.extensions&&this.options.extensions.startInline&&function(){var t=1/0,n=e.slice(1),i=void 0;u.options.extensions.startInline.forEach((function(e){"number"===typeof(i=e.call({lexer:this},n))&&i>=0&&(t=Math.min(t,i))})),t<1/0&&t>=0&&(r=e.substring(0,t+1))}(),t=this.tokenizer.inlineText(r,gf))e=e.substring(t.raw.length),"_"!==t.raw.slice(-1)&&(a=t.raw.slice(-1)),o=!0,(n=l[l.length-1])&&"text"===n.type?(n.raw+=t.raw,n.text+=t.text):l.push(t);else if(e){var f="Infinite loop on byte: "+e.charCodeAt(0);if(this.options.silent){console.error(f);break}throw new Error(f)}}else e=e.substring(t.raw.length),l.push(t);return l}}],[{key:"rules",get:function(){return{block:mf,inline:yf}}},{key:"lex",value:function(t,n){return new e(n).lex(t)}},{key:"lexInline",value:function(t,n){return new e(n).inlineTokens(t)}}]),e}(),Df=function(){function e(t){Dt(this,e),this.options=t||Us}return xt(e,[{key:"code",value:function(e,t,n){var r=(t||"").match(/\S*/)[0];if(this.options.highlight){var i=this.options.highlight(e,r);null!=i&&i!==e&&(n=!0,e=i)}return e=e.replace(/\n$/,"")+"\n",r?'
    '+(n?e:Gs(e,!0))+"
    \n":"
    "+(n?e:Gs(e,!0))+"
    \n"}},{key:"blockquote",value:function(e){return"
    \n".concat(e,"
    \n")}},{key:"html",value:function(e){return e}},{key:"heading",value:function(e,t,n,r){if(this.options.headerIds){var i=this.options.headerPrefix+r.slug(n);return"').concat(e,"\n")}return"").concat(e,"\n")}},{key:"hr",value:function(){return this.options.xhtml?"
    \n":"
    \n"}},{key:"list",value:function(e,t,n){var r=t?"ol":"ul";return"<"+r+(t&&1!==n?' start="'+n+'"':"")+">\n"+e+"\n"}},{key:"listitem",value:function(e){return"
  • ".concat(e,"
  • \n")}},{key:"checkbox",value:function(e){return" "}},{key:"paragraph",value:function(e){return"

    ".concat(e,"

    \n")}},{key:"table",value:function(e,t){return t&&(t="".concat(t,"")),"\n\n"+e+"\n"+t+"
    \n"}},{key:"tablerow",value:function(e){return"\n".concat(e,"\n")}},{key:"tablecell",value:function(e,t){var n=t.header?"th":"td";return(t.align?"<".concat(n,' align="').concat(t.align,'">'):"<".concat(n,">"))+e+"\n")}},{key:"strong",value:function(e){return"".concat(e,"")}},{key:"em",value:function(e){return"".concat(e,"")}},{key:"codespan",value:function(e){return"".concat(e,"")}},{key:"br",value:function(){return this.options.xhtml?"
    ":"
    "}},{key:"del",value:function(e){return"".concat(e,"")}},{key:"link",value:function(e,t,n){if(null===(e=nf(this.options.sanitize,this.options.baseUrl,e)))return n;var r='
    "}},{key:"image",value:function(e,t,n){if(null===(e=nf(this.options.sanitize,this.options.baseUrl,e)))return n;var r='').concat(n,'":">"}},{key:"text",value:function(e){return e}}]),e}(),wf=function(){function e(){Dt(this,e)}return xt(e,[{key:"strong",value:function(e){return e}},{key:"em",value:function(e){return e}},{key:"codespan",value:function(e){return e}},{key:"del",value:function(e){return e}},{key:"html",value:function(e){return e}},{key:"text",value:function(e){return e}},{key:"link",value:function(e,t,n){return""+n}},{key:"image",value:function(e,t,n){return""+n}},{key:"br",value:function(){return""}}]),e}(),xf=function(){function e(){Dt(this,e),this.seen={}}return xt(e,[{key:"serialize",value:function(e){return e.toLowerCase().trim().replace(/<[!\/a-z].*?>/gi,"").replace(/[\u2000-\u206F\u2E00-\u2E7F\\'!"#$%&()*+,./:;<=>?@[\]^`{|}~]/g,"").replace(/\s/g,"-")}},{key:"getNextSafeSlug",value:function(e,t){var n=e,r=0;if(this.seen.hasOwnProperty(n)){r=this.seen[e];do{n=e+"-"+ ++r}while(this.seen.hasOwnProperty(n))}return t||(this.seen[e]=r,this.seen[n]=0),n}},{key:"slug",value:function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},n=this.serialize(e);return this.getNextSafeSlug(n,t.dryrun)}}]),e}(),kf=function(){function e(t){Dt(this,e),this.options=t||Us,this.options.renderer=this.options.renderer||new Df,this.renderer=this.options.renderer,this.renderer.options=this.options,this.textRenderer=new wf,this.slugger=new xf}return xt(e,[{key:"parse",value:function(e){var t,n,r,i,o,a,u,l,c,s,f,d,h,p,v,m,y,g,_,b=!(arguments.length>1&&void 0!==arguments[1])||arguments[1],D="",w=e.length;for(t=0;t0&&"paragraph"===v.tokens[0].type?(v.tokens[0].text=g+" "+v.tokens[0].text,v.tokens[0].tokens&&v.tokens[0].tokens.length>0&&"text"===v.tokens[0].tokens[0].type&&(v.tokens[0].tokens[0].text=g+" "+v.tokens[0].tokens[0].text)):v.tokens.unshift({type:"text",text:g}):p+=g),p+=this.parse(v.tokens,h),c+=this.renderer.listitem(p,y,m);D+=this.renderer.list(c,f,d);continue;case"html":D+=this.renderer.html(s.text);continue;case"paragraph":D+=this.renderer.paragraph(this.parseInline(s.tokens));continue;case"text":for(c=s.tokens?this.parseInline(s.tokens):s.text;t+1An error occurred:

    "+Gs(e.message+"",!0)+"
    ";throw e}try{var l=bf.lex(e,t);if(t.walkTokens){if(t.async)return Promise.all(Cf.walkTokens(l,t.walkTokens)).then((function(){return kf.parse(l,t)})).catch(u);Cf.walkTokens(l,t.walkTokens)}return kf.parse(l,t)}catch(c){u(c)}}Cf.options=Cf.setOptions=function(e){var t;return cf(Cf.defaults,e),t=Cf.defaults,Us=t,Cf},Cf.getDefaults=zs,Cf.defaults=Us,Cf.use=function(){for(var e=arguments.length,t=new Array(e),n=0;nAn error occurred:

    "+Gs(c.message+"",!0)+"
    ";throw c}},Cf.Parser=kf,Cf.parser=kf.parse,Cf.Renderer=Df,Cf.TextRenderer=wf,Cf.Lexer=bf,Cf.lexer=bf.lex,Cf.Tokenizer=vf,Cf.Slugger=xf,Cf.parse=Cf;Cf.options,Cf.setOptions,Cf.use,Cf.walkTokens,Cf.parseInline,kf.parse,bf.lex;var Ef=function(e){var t=e.title,n=e.description,r=e.unit,i=e.expr,o=e.showLegend,a=e.filename,u=e.alias,l=Wr().period,c=Qr(),s=re(null),f=_t(X(!0),2),d=f[0],h=f[1],p=_t(X(l.step||1),2),v=p[0],y=p[1],g=_t(X({limits:{enable:!1,range:{1:[0,0]}}}),2),_=g[0],b=g[1],D=oe((function(){return Array.isArray(i)&&i.every((function(e){return e}))}),[i]),w=ws({predefinedQuery:D?i:[],display:"chart",visible:d,customStep:v}),x=w.isLoading,k=w.graphData,C=w.error,E=w.warning,A=function(e){var t=Kn({},_);t.limits.range=e,b(t)};if(te((function(){var e=new IntersectionObserver((function(e){e.forEach((function(e){return h(e.isIntersecting)}))}),{threshold:.1});return s.current&&e.observe(s.current),function(){s.current&&e.unobserve(s.current)}}),[]),!D)return fr(oo,{variant:"error",children:[fr("code",{children:'"expr"'})," not found. Check the configuration file ",fr("b",{children:a}),"."]});var S=function(){return fr("div",{className:"vm-predefined-panel-header__description vm-default-styles",children:[n&&fr(m,{children:[fr("div",{children:[fr("span",{children:"Description:"}),fr("div",{dangerouslySetInnerHTML:{__html:Cf.parse(n)}})]}),fr("hr",{})]}),fr("div",{children:[fr("span",{children:"Queries:"}),fr("div",{children:i.map((function(e,t){return fr("div",{children:e},"".concat(t,"_").concat(e))}))})]})]})};return fr("div",{className:"vm-predefined-panel",ref:s,children:[fr("div",{className:"vm-predefined-panel-header",children:[fr(fo,{title:fr(S,{}),children:fr("div",{className:"vm-predefined-panel-header__info",children:fr(li,{})})}),fr("h3",{className:"vm-predefined-panel-header__title",children:t||""}),fr("div",{className:"vm-predefined-panel-header__step",children:fr(ds,{defaultStep:l.step,setStep:y})}),fr(Es,{yaxis:_,setYaxisLimits:A,toggleEnableLimits:function(){var e=Kn({},_);e.limits.enable=!e.limits.enable,b(e)}})]}),fr("div",{className:"vm-predefined-panel-body",children:[x&&fr(As,{}),C&&fr(oo,{variant:"error",children:C}),E&&fr(oo,{variant:"warning",children:E}),k&&fr(ls,{data:k,period:l,customStep:v,query:i,yaxis:_,unit:r,alias:u,showLegend:o,setYaxisLimits:A,setPeriod:function(e){var t=e.from,n=e.to;c({type:"SET_PERIOD",payload:{from:t,to:n}})},fullWidth:!1})]})]})},Af=function(e){var t=e.defaultExpanded,n=void 0!==t&&t,r=e.onChange,i=e.title,o=e.children,a=_t(X(n),2),u=a[0],l=a[1];return te((function(){r&&r(u)}),[u]),fr(m,{children:[fr("header",{className:"vm-accordion-header ".concat(u&&"vm-accordion-header_open"),onClick:function(){l((function(e){return!e}))},children:[i,fr("div",{className:"vm-accordion-header__arrow ".concat(u&&"vm-accordion-header__arrow_open"),children:fr(hi,{})})]}),u&&fr("section",{className:"vm-accordion-section",children:o},"content")]})},Sf=function(e){var t=e.index,n=e.title,r=e.panels,i=e.filename,o=mo(document.body),a=oe((function(){return o.width/12}),[o]),u=_t(X(!t),2),l=u[0],c=u[1],s=_t(X([]),2),f=s[0],d=s[1];te((function(){d(r&&r.map((function(e){return e.width||12})))}),[r]);var h=_t(X({start:0,target:0,enable:!1}),2),p=h[0],v=h[1],m=function(e){if(p.enable){var t=p.start,n=Math.ceil((t-e.clientX)/a);if(!(Math.abs(n)>=12)){var r=f.map((function(e,t){return e-(t===p.target?n:0)}));d(r)}}},y=function(){v(Kn(Kn({},p),{},{enable:!1}))},g=function(e){return function(t){!function(e,t){v({start:e.clientX,target:t,enable:!0})}(t,e)}};return te((function(){return window.addEventListener("mousemove",m),window.addEventListener("mouseup",y),function(){window.removeEventListener("mousemove",m),window.removeEventListener("mouseup",y)}}),[p]),fr("div",{className:"vm-predefined-dashboard",children:fr(Af,{defaultExpanded:l,onChange:function(e){return c(e)},title:fr((function(){return fr("div",{className:Oi()({"vm-predefined-dashboard-header":!0,"vm-predefined-dashboard-header_open":l}),children:[(n||i)&&fr("span",{className:"vm-predefined-dashboard-header__title",children:n||"".concat(t+1,". ").concat(i)}),r&&fr("span",{className:"vm-predefined-dashboard-header__count",children:["(",r.length," panels)"]})]})}),{}),children:fr("div",{className:"vm-predefined-dashboard-panels",children:Array.isArray(r)&&r.length?r.map((function(e,t){return fr("div",{className:"vm-predefined-dashboard-panels-panel vm-block vm-block_empty-padding",style:{gridColumn:"span ".concat(f[t])},children:[fr(Ef,{title:e.title,description:e.description,unit:e.unit,expr:e.expr,alias:e.alias,filename:i,showLegend:e.showLegend}),fr("button",{className:"vm-predefined-dashboard-panels-panel__resizer",onMouseDown:g(t)})]},t)})):fr("div",{className:"vm-predefined-dashboard-panels-panel__alert",children:fr(oo,{variant:"error",children:[fr("code",{children:'"panels"'})," not found. Check the configuration file ",fr("b",{children:i}),"."]})})})})})},Ff=function(){!function(){var e=Wr(),t=e.duration,n=e.relativeTime,r=e.period,i=r.date,o=r.step,a=function(){var e,r=Ps((qn(e={},"g0.range_input",t),qn(e,"g0.end_input",i),qn(e,"g0.step_input",o),qn(e,"g0.relative_time",n),e));ar(r)};te(a,[t,n,i,o]),te(a,[])}();var e=_t(X([]),2),t=e[0],n=e[1],r=_t(X("0"),2),i=r[0],o=r[1],a=oe((function(){return t.map((function(e,t){return{label:e.title||"",value:"".concat(t),className:"vm-predefined-panels-tabs__tab"}}))}),[t]),u=oe((function(){return t[+i]||{}}),[t,i]),l=oe((function(){return null===u||void 0===u?void 0:u.rows}),[u]),c=oe((function(){return u.title||u.filename||""}),[u]),s=oe((function(){return Array.isArray(l)&&!!l.length}),[l]);return te((function(){js().then((function(e){return e.length&&n(e)}))}),[]),fr("div",{className:"vm-predefined-panels",children:[!t.length&&fr(oo,{variant:"info",children:"Dashboards not found"}),a.length>1&&fr("div",{className:"vm-predefined-panels-tabs vm-block vm-block_empty-padding",children:fr(Mi,{activeItem:i,items:a,onChange:function(e){o(e)}})}),fr("div",{className:"vm-predefined-panels__dashboards",children:[s&&l.map((function(e,t){return fr(Sf,{index:t,filename:c,title:e.title,panels:e.panels},"".concat(i,"_").concat(t))})),!!t.length&&!s&&fr(oo,{variant:"error",children:[fr("code",{children:'"rows"'})," not found. Check the configuration file ",fr("b",{children:c}),"."]})]})]})},Nf=function(e,t){var n=t.match?"&match[]="+encodeURIComponent(t.match):"",r=t.focusLabel?"&focusLabel="+encodeURIComponent(t.focusLabel):"";return"".concat(e,"/api/v1/status/tsdb?topN=").concat(t.topN,"&date=").concat(t.date).concat(n).concat(r)},Of=function(){function e(){Dt(this,e),this.tsdbStatus=void 0,this.tabsNames=void 0,this.tsdbStatus=this.defaultTSDBStatus,this.tabsNames=["table","graph"]}return xt(e,[{key:"tsdbStatusData",get:function(){return this.tsdbStatus},set:function(e){this.tsdbStatus=e}},{key:"defaultTSDBStatus",get:function(){return{totalSeries:0,totalLabelValuePairs:0,seriesCountByMetricName:[],seriesCountByLabelName:[],seriesCountByFocusLabelValue:[],seriesCountByLabelValuePair:[],labelValueCountByLabelName:[]}}},{key:"keys",value:function(e){var t=[];return e&&(t=t.concat("seriesCountByFocusLabelValue")),t=t.concat("seriesCountByMetricName","seriesCountByLabelName","seriesCountByLabelValuePair","labelValueCountByLabelName"),t}},{key:"defaultState",get:function(){var e=this;return this.keys("job").reduce((function(t,n){return Kn(Kn({},t),{},{tabs:Kn(Kn({},t.tabs),{},qn({},n,e.tabsNames)),containerRefs:Kn(Kn({},t.containerRefs),{},qn({},n,re(null))),defaultActiveTab:Kn(Kn({},t.defaultActiveTab),{},qn({},n,0))})}),{tabs:{},containerRefs:{},defaultActiveTab:{}})}},{key:"sectionsTitles",value:function(e){return{seriesCountByMetricName:"Metric names with the highest number of series",seriesCountByLabelName:"Labels with the highest number of series",seriesCountByFocusLabelValue:'Values for "'.concat(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"}}},{key:"tablesHeaders",get:function(){return{seriesCountByMetricName:Tf,seriesCountByLabelName:Bf,seriesCountByFocusLabelValue:Mf,seriesCountByLabelValuePair:Lf,labelValueCountByLabelName:Pf}}},{key:"totalSeries",value:function(e){return"labelValueCountByLabelName"===e?-1:this.tsdbStatus.totalSeries}}]),e}(),Tf=[{id:"name",label:"Metric name"},{id:"value",label:"Number of series"},{id:"percentage",label:"Percent of series"},{id:"action",label:"Action"}],Bf=[{id:"name",label:"Label name"},{id:"value",label:"Number of series"},{id:"percentage",label:"Percent of series"},{id:"action",label:"Action"}],Mf=[{id:"name",label:"Label value"},{id:"value",label:"Number of series"},{id:"percentage",label:"Percent of series"},{disablePadding:!1,id:"action",label:"Action",numeric:!1}],Lf=[{id:"name",label:"Label=value pair"},{id:"value",label:"Number of series"},{id:"percentage",label:"Percent of series"},{id:"action",label:"Action"}],Pf=[{id:"name",label:"Label name"},{id:"value",label:"Number of unique values"},{id:"action",label:"Action"}],$f={seriesCountByMetricName:function(e,t){return Rf("__name__",t)},seriesCountByLabelName:function(e,t){return"{".concat(t,'!=""}')},seriesCountByFocusLabelValue:function(e,t){return Rf(e,t)},seriesCountByLabelValuePair:function(e,t){var n=t.split("="),r=n[0],i=n.slice(1).join("=");return Rf(r,i)},labelValueCountByLabelName:function(e,t){return"{".concat(t,'!=""}')}},Rf=function(e,t){return e?"{"+e+"="+JSON.stringify(t)+"}":""},If=function(e){var t=e.topN,n=e.error,r=e.query,i=e.onSetHistory,o=e.onRunQuery,a=e.onSetQuery,u=e.onTopNChange,l=e.onFocusLabelChange,c=e.totalSeries,s=e.totalLabelValuePairs,f=e.date,d=e.match,h=e.focusLabel,p=ni().autocomplete,v=ri(),m=Ss().queryOptions,y=oe((function(){return t<1?"Number must be bigger than zero":""}),[t]);return fr("div",{className:"vm-cardinality-configurator vm-block",children:[fr("div",{className:"vm-cardinality-configurator-controls",children:[fr("div",{className:"vm-cardinality-configurator-controls__query",children:fr(cs,{value:r||d||"",autocomplete:p,options:m,error:n,onArrowUp:function(){i(-1)},onArrowDown:function(){i(1)},onEnter:o,onChange:a,label:"Time series selector"})}),fr("div",{className:"vm-cardinality-configurator-controls__item",children:fr(So,{label:"Number of entries per table",type:"number",value:t,error:y,onChange:u})}),fr("div",{className:"vm-cardinality-configurator-controls__item",children:fr(So,{label:"Focus label",type:"text",value:h||"",onChange:l})}),fr("div",{className:"vm-cardinality-configurator-controls__item",children:fr(ps,{label:"Autocomplete",value:p,onChange:function(){v({type:"TOGGLE_AUTOCOMPLETE"})}})})]}),fr("div",{className:"vm-cardinality-configurator-bottom",children:[fr("div",{className:"vm-cardinality-configurator-bottom__info",children:["Analyzed ",fr("b",{children:c})," series with ",fr("b",{children:s}),' "label=value" pairs at ',fr("b",{children:f}),d&&fr("span",{children:[" for series selector ",fr("b",{children:d})]}),". Show top ",t," entries per table."]}),fr(lo,{startIcon:fr(bi,{}),onClick:o,children:"Execute Query"})]})]})};function jf(e){var t=e.order,n=e.orderBy,r=e.onRequestSort,i=e.headerCells;return fr("thead",{className:"vm-table-header",children:fr("tr",{className:"vm-table__row vm-table__row_header",children:i.map((function(e){return fr("th",{className:Oi()({"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:(i=e.id,function(e){r(e,i)}),children:fr("div",{className:"vm-table-cell__content",children:[e.label,"action"!==e.id&&"percentage"!==e.id&&fr("div",{className:Oi()({"vm-table__sort-icon":!0,"vm-table__sort-icon_active":n===e.id,"vm-table__sort-icon_desc":"desc"===t&&n===e.id}),children:fr(vi,{})})]})},e.id);var i}))})})}function zf(e,t,n){return t[n]e[n]?1:0}function Uf(e,t){return"desc"===e?function(e,n){return zf(e,n,t)}:function(e,n){return-zf(e,n,t)}}function Hf(e,t){var n=e.map((function(e,t){return[e,t]}));return n.sort((function(e,n){var r=t(e[0],n[0]);return 0!==r?r:e[1]-n[1]})),n.map((function(e){return e[0]}))}var Yf=function(e){var t=e.rows,n=e.headerCells,r=e.defaultSortColumn,i=e.tableCells,o=_t(X("desc"),2),a=o[0],u=o[1],l=_t(X(r),2),c=l[0],s=l[1],f=_t(X([]),2),d=f[0],h=f[1],p=function(e){return function(){var t=d.indexOf(e),n=[];-1===t?n=n.concat(d,e):0===t?n=n.concat(d.slice(1)):t===d.length-1?n=n.concat(d.slice(0,-1)):t>0&&(n=n.concat(d.slice(0,t),d.slice(t+1))),h(n)}},v=Hf(t,Uf(a,c));return fr("table",{className:"vm-table",children:[fr(jf,{numSelected:d.length,order:a,orderBy:c,onSelectAllClick:function(e){if(e.target.checked){var n=t.map((function(e){return e.name}));h(n)}else h([])},onRequestSort:function(e,t){u(c===t&&"asc"===a?"desc":"asc"),s(t)},rowCount:t.length,headerCells:n}),fr("tbody",{className:"vm-table-header",children:v.map((function(e){return fr("tr",{className:Oi()({"vm-table__row":!0,"vm-table__row_selected":(t=e.name,-1!==d.indexOf(t))}),onClick:p(e.name),children:i(e)},e.name);var t}))})]})},Vf=function(e){var t=e.row,n=e.totalSeries,r=e.onActionClick,i=n>0?t.value/n*100:-1;return fr(m,{children:[fr("td",{className:"vm-table-cell",children:t.name},t.name),fr("td",{className:"vm-table-cell",children:t.value},t.value),i>0&&fr("td",{className:"vm-table-cell",children:fr(Fs,{value:i})},t.progressValue),fr("td",{className:"vm-table-cell vm-table-cell_right",children:fr("div",{className:"vm-table-cell__content",children:fr(fo,{title:"Filter by ".concat(t.name),children:fr(lo,{variant:"text",size:"small",onClick:r,children:fr(Di,{})})})})},"action")]})},qf=function(e){var t=e.data,n=e.container,r=e.configs,i=re(null),o=_t(X(),2),a=o[0],u=o[1],l=mo(n),c=Kn(Kn({},r),{},{width:l.width||400});return te((function(){if(i.current){var e=new Lc(c,t,i.current);return u(e),e.destroy}}),[i.current,l]),te((function(){a&&a.setData(t)}),[t]),fr("div",{style:{height:"100%"},children:fr("div",{ref:i})})},Wf=function(e,t){return Math.round(e*(t=Math.pow(10,t)))/t},Qf=1,Gf=function(e,t,n,r){return Wf(t+e*(n+r),6)},Zf=function(e,t,n,r,i){var o=1-t,a=n===Qf?o/(e-1):2===n?o/e:3===n?o/(e+1):0;(isNaN(a)||a===1/0)&&(a=0);var u=n===Qf?0:2===n?a/2:3===n?a:0,l=t/e,c=Wf(l,6);if(null==r)for(var s=0;s=n&&e<=i&&t>=r&&t<=o};function Kf(e,t,n,r,i){var o=this;o.x=e,o.y=t,o.w=n,o.h=r,o.l=i||0,o.o=[],o.q=null}var Xf={split:function(){var e=this,t=e.x,n=e.y,r=e.w/2,i=e.h/2,o=e.l+1;e.q=[new Kf(t+r,n,r,i,o),new Kf(t,n,r,i,o),new Kf(t,n+i,r,i,o),new Kf(t+r,n+i,r,i,o)]},quads:function(e,t,n,r,i){var o=this,a=o.q,u=o.x+o.w/2,l=o.y+o.h/2,c=tu,d=t+r>l;c&&f&&i(a[0]),s&&c&&i(a[1]),s&&d&&i(a[2]),f&&d&&i(a[3])},add:function(e){var t=this;if(null!=t.q)t.quads(e.x,e.y,e.w,e.h,(function(t){t.add(e)}));else{var n=t.o;if(n.push(e),n.length>10&&t.l<4){t.split();for(var r=function(e){var r=n[e];t.quads(r.x,r.y,r.w,r.h,(function(e){e.add(r)}))},i=0;i=0?"left":"right",e.ctx.textBaseline=1===s?"middle":i[n]>=0?"bottom":"top",e.ctx.fillText(i[n],f,g)}}))})),e.ctx.restore()}function b(e,t,n){return[0,Lc.rangeNum(0,n,.05,!0)[1]]}return{hooks:{drawClear:function(t){var n;if((y=y||new Kf(0,0,t.bbox.width,t.bbox.height)).clear(),t.series.forEach((function(e){e._paths=null})),l=d?[null].concat(m(t.data.length-1-o.length,t.data[0].length)):2===t.series.length?[null].concat(m(t.data[0].length,1)):[null].concat(function(e,t){var n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:h,r=Array.from({length:t},(function(){return{offs:Array(e).fill(0),size:Array(e).fill(0)}}));return Zf(e,n,p,null,(function(e,n,i){Zf(t,1,v,null,(function(t,o,a){r[t].offs[e]=n+i*o,r[t].size[e]=i*a}))})),r}(t.data[0].length,t.data.length-1-o.length,1===t.data[0].length?1:h)),null!=(null===(n=e.disp)||void 0===n?void 0:n.fill)){c=[null];for(var r=1;r0&&!o.includes(t)&&Lc.assign(e,{paths:g,points:{show:_}})}))}}}((ed=[1],td=0,nd=1,rd=0,id=function(e,t){return{stroke:e,fill:t}}({unit:3,values:function(e){return e.data[1].map((function(e,t){return 0!==t?"#33BB55":"#F79420"}))}},{unit:3,values:function(e){return e.data[1].map((function(e,t){return 0!==t?"#33BB55":"#F79420"}))}}),{which:ed,ori:td,dir:nd,radius:rd,disp:id}))]},ad=function(e){var t=e.rows,n=e.activeTab,r=e.onChange,i=e.tabs,o=e.chartContainer,a=e.totalSeries,u=e.tabId,l=e.onActionClick,c=e.sectionTitle,s=e.tableHeaderCells,f=oe((function(){return i.map((function(e,t){return{value:String(t),label:e,icon:fr(0===t?xi:wi,{})}}))}),[i]);return fr("div",{className:"vm-metrics-content vm-block",children:[fr("div",{className:"vm-metrics-content-header vm-section-header",children:[fr("h5",{className:"vm-section-header__title",children:c}),fr("div",{className:"vm-section-header__tabs",children:fr(Mi,{activeItem:String(n),items:f,onChange:function(e){r(e,u)}})})]}),fr("div",{ref:o,children:[0===n&&fr(Yf,{rows:t,headerCells:s,defaultSortColumn:"value",tableCells:function(e){return fr(Vf,{row:e,totalSeries:a,onActionClick:l})}}),1===n&&fr(qf,{data:[t.map((function(e){return e.name})),t.map((function(e){return e.value})),t.map((function(e,t){return t%12==0?1:t%10==0?2:0}))],container:(null===o||void 0===o?void 0:o.current)||null,configs:od})]})]})},ud=function(){var e=Ji(),t=e.topN,n=e.match,r=e.date,i=e.focusLabel,o=Ki();!function(){var e=Ji(),t=e.topN,n=e.match,r=e.date,i=e.focusLabel,o=e.extraLabel,a=function(){var e=Ps({topN:t,date:r,match:n,extraLabel:o,focusLabel:i});ar(e)};te(a,[t,n,r,i,o]),te(a,[])}();var a=_t(X(n||""),2),u=a[0],l=a[1],c=_t(X(0),2),s=c[0],f=c[1],d=_t(X([]),2),h=d[0],p=d[1],v=function(){var e=new Of,t=Ji(),n=t.topN,r=t.extraLabel,i=t.match,o=t.date,a=t.runQuery,u=t.focusLabel,l=hr().serverUrl,c=_t(X(!1),2),s=c[0],f=c[1],d=_t(X(),2),h=d[0],p=d[1],v=_t(X(e.defaultTSDBStatus),2),m=v[0],y=v[1];te((function(){h&&(y(e.defaultTSDBStatus),f(!1))}),[h]);var g=function(){var t=Xc(Jc().mark((function t(n){var r,i,o,a;return Jc().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:if(l){t.next=2;break}return t.abrupt("return");case 2:return p(""),f(!0),y(e.defaultTSDBStatus),r=Nf(l,n),t.prev=6,t.next=9,fetch(r);case 9:return i=t.sent,t.next=12,i.json();case 12:o=t.sent,i.ok?(a=o.data,y(Kn({},a)),f(!1)):(p(o.error),y(e.defaultTSDBStatus),f(!1)),t.next=20;break;case 16:t.prev=16,t.t0=t.catch(6),f(!1),t.t0 instanceof Error&&p("".concat(t.t0.name,": ").concat(t.t0.message));case 20:case"end":return t.stop()}}),t,null,[[6,16]])})));return function(e){return t.apply(this,arguments)}}();return te((function(){g({topN:n,extraLabel:r,match:i,date:o,focusLabel:u})}),[l,a,o]),e.tsdbStatusData=m,{isLoading:s,appConfigurator:e,error:h}}(),m=v.isLoading,y=v.appConfigurator,g=v.error,_=_t(X(y.defaultState.defaultActiveTab),2),b=_[0],D=_[1],w=y.tsdbStatusData,x=y.defaultState,k=y.tablesHeaders,C=function(e,t){D(Kn(Kn({},b),{},qn({},t,+e)))};return fr("div",{className:"vm-cardinality-panel",children:[m&&fr(As,{message:"Please wait while cardinality stats is calculated. \n This may take some time if the db contains big number of time series."}),fr(If,{error:"",query:u,topN:t,date:r,match:n,totalSeries:w.totalSeries,totalLabelValuePairs:w.totalLabelValuePairs,focusLabel:i,onRunQuery:function(){p((function(e){return[].concat(bt(e),[u])})),f((function(e){return e+1})),o({type:"SET_MATCH",payload:u}),o({type:"RUN_QUERY"})},onSetQuery:function(e){l(e)},onSetHistory:function(e){var t=s+e;t<0||t>=h.length||(f(t),l(h[t]))},onTopNChange:function(e){o({type:"SET_TOP_N",payload:+e})},onFocusLabelChange:function(e){o({type:"SET_FOCUS_LABEL",payload:e})}}),g&&fr(oo,{variant:"error",children:g}),y.keys(i).map((function(e){return fr(ad,{sectionTitle:y.sectionsTitles(i)[e],activeTab:b[e],rows:w[e],onChange:C,onActionClick:(t=e,function(e){var n=e.currentTarget.id,r=$f[t](i,n);l(r),p((function(e){return[].concat(bt(e),[r])})),f((function(e){return e+1})),o({type:"SET_MATCH",payload:r});var a="";"labelValueCountByLabelName"!==t&&"seriesCountByLabelName"!=t||(a=n),o({type:"SET_FOCUS_LABEL",payload:a}),o({type:"RUN_QUERY"})}),tabs:x.tabs[e],chartContainer:x.containerRefs[e],totalSeries:y.totalSeries(e),tabId:e,tableHeaderCells:k[e]},e);var t}))]})},ld=function(e){var t=e.rows,n=e.columns,r=_t(X(e.defaultOrderBy||"count"),2),i=r[0],o=r[1],a=_t(X("desc"),2),u=a[0],l=a[1],c=oe((function(){return Hf(t,Uf(u,i))}),[t,i,u]),s=function(e){return function(){var t;t=e,l((function(e){return"asc"===e&&i===t?"desc":"asc"})),o(t)}};return fr("table",{className:"vm-table",children:[fr("thead",{className:"vm-table-header",children:fr("tr",{className:"vm-table__row vm-table__row_header",children:n.map((function(e){return fr("th",{className:"vm-table-cell vm-table-cell_header vm-table-cell_sort",onClick:s(e.key),children:fr("div",{className:"vm-table-cell__content",children:[e.title||e.key,fr("div",{className:Oi()({"vm-table__sort-icon":!0,"vm-table__sort-icon_active":i===e.key,"vm-table__sort-icon_desc":"desc"===u&&i===e.key}),children:fr(vi,{})})]})},e.key)}))})}),fr("tbody",{className:"vm-table-body",children:c.map((function(e,t){return fr("tr",{className:"vm-table__row",children:n.map((function(t){return fr("td",{className:"vm-table-cell",children:e[t.key]||"-"},t.key)}))},t)}))})]})},cd=["table","JSON"].map((function(e,t){return{value:String(t),label:e,icon:fr(0===t?xi:ki,{})}})),sd=function(e){var t=e.rows,n=e.title,r=e.columns,i=e.defaultOrderBy,o=_t(X(0),2),a=o[0],u=o[1];return fr("div",{className:"vm-top-queries-panel vm-block",children:[fr("div",{className:"vm-top-queries-panel-header vm-section-header",children:[fr("h5",{className:"vm-section-header__title",children:n}),fr("div",{className:"vm-section-header__tabs",children:fr(Mi,{activeItem:String(a),items:cd,onChange:function(e){u(+e)}})})]}),fr("div",{children:[0===a&&fr(ld,{rows:t,columns:r,defaultOrderBy:i}),1===a&&fr(xs,{data:t})]})]})},fd=function(){var e=function(){var e=hr().serverUrl,t=ro(),n=t.topN,r=t.maxLifetime,i=t.runQuery,o=_t(X(null),2),a=o[0],u=o[1],l=_t(X(!1),2),c=l[0],s=l[1],f=_t(X(),2),d=f[0],h=f[1],p=oe((function(){return function(e,t,n){return"".concat(e,"/api/v1/status/top_queries?topN=").concat(t||"","&maxLifetime=").concat(n||"")}(e,n,r)}),[e,n,r]),v=function(){var e=Xc(Jc().mark((function e(){var t,n;return Jc().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return s(!0),e.prev=1,e.next=4,fetch(p);case 4:return t=e.sent,e.next=7,t.json();case 7:n=e.sent,t.ok&&["topByAvgDuration","topByCount","topBySumDuration"].forEach((function(e){var t=n[e];Array.isArray(t)&&t.forEach((function(e){return e.timeRangeHours=+(e.timeRangeSeconds/3600).toFixed(2)}))})),u(t.ok?n:null),h(String(n.error||"")),e.next=16;break;case 13:e.prev=13,e.t0=e.catch(1),e.t0 instanceof Error&&"AbortError"!==e.t0.name&&h("".concat(e.t0.name,": ").concat(e.t0.message));case 16:s(!1);case 17:case"end":return e.stop()}}),e,null,[[1,13]])})));return function(){return e.apply(this,arguments)}}();return te((function(){v()}),[i]),{data:a,error:d,loading:c}}(),t=e.data,n=e.error,r=e.loading,i=ro(),o=i.topN,a=i.maxLifetime,u=ue(no).dispatch;!function(){var e=ro(),t=e.topN,n=e.maxLifetime,r=function(){var e=Ps({topN:String(t),maxLifetime:n});ar(e)};te(r,[t,n]),te(r,[])}();var l=oe((function(){var e=a.trim().split(" ").reduce((function(e,t){var n=Or(t);return n?Kn(Kn({},e),n):Kn({},e)}),{});return!!yr().duration(e).asMilliseconds()}),[a]),c=oe((function(){return!!o&&o<1}),[o]),s=oe((function(){return c?"Number must be bigger than zero":""}),[c]),f=oe((function(){return l?"":"Invalid duration value"}),[l]),d=function(e){if(!t)return e;var n=t[e];return"number"===typeof n?Ic(n):n||e},h=function(){u({type:"SET_RUN_QUERY"})},p=function(e){"Enter"===e.key&&h()};return te((function(){t&&(o||u({type:"SET_TOP_N",payload:+t.topN}),a||u({type:"SET_MAX_LIFE_TIME",payload:t.maxLifetime}))}),[t]),fr("div",{className:"vm-top-queries",children:[r&&fr(As,{containerStyles:{height:"500px"}}),fr("div",{className:"vm-top-queries-controls vm-block",children:[fr("div",{className:"vm-top-queries-controls__fields",children:[fr(So,{label:"Max lifetime",value:a,error:f,helperText:"For example ".concat("30ms, 15s, 3d4h, 1y2w"),onChange:function(e){u({type:"SET_MAX_LIFE_TIME",payload:e})},onKeyDown:p}),fr(So,{label:"Number of returned queries",type:"number",value:o||"",error:s,onChange:function(e){u({type:"SET_TOP_N",payload:+e})},onKeyDown:p})]}),fr("div",{className:"vm-top-queries-controls-bottom",children:[fr("div",{className:"vm-top-queries-controls-bottom__info",children:["VictoriaMetrics tracks the last\xa0",fr(fo,{title:"search.queryStats.lastQueriesCount",children:fr("b",{children:d("search.queryStats.lastQueriesCount")})}),"\xa0queries with durations at least\xa0",fr(fo,{title:"search.queryStats.minQueryDuration",children:fr("b",{children:d("search.queryStats.minQueryDuration")})})]}),fr("div",{className:"vm-top-queries-controls-bottom__button",children:fr(lo,{startIcon:fr(bi,{}),onClick:h,children:"Execute"})})]})]}),n&&fr(oo,{variant:"error",children:n}),t&&fr(m,{children:fr("div",{className:"vm-top-queries-panels",children:[fr(sd,{rows:t.topByCount,title:"Most frequently executed queries",columns:[{key:"query"},{key:"timeRangeHours",title:"time range, hours"},{key:"count"}]}),fr(sd,{rows:t.topByAvgDuration,title:"Most heavy queries",columns:[{key:"query"},{key:"avgDurationSeconds",title:"avg duration, seconds"},{key:"timeRangeHours",title:"time range, hours"},{key:"count"}],defaultOrderBy:"avgDurationSeconds"}),fr(sd,{rows:t.topBySumDuration,title:"Queries with most summary time to execute",columns:[{key:"query"},{key:"sumDurationSeconds",title:"sum duration, seconds"},{key:"timeRangeHours",title:"time range, hours"},{key:"count"}],defaultOrderBy:"sumDurationSeconds"})]})})]})},dd=["primary","secondary","error","warning","info","success"],hd=function(e){var t=e.setLoadingTheme,n=Xn().palette,r=void 0===n?{}:n,i=function(){dd.forEach((function(e){var t=function(e){var 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"}(Ti("color-".concat(e)));Bi("".concat(e,"-text"),t)}))};return te((function(){dd.forEach((function(e){var t=r[e];t&&Bi("color-".concat(e),t)})),function(){var e=window,t=e.innerWidth,n=e.innerHeight,r=document.documentElement,i=r.clientWidth,o=r.clientHeight;Bi("scrollbar-width","".concat(t-i,"px")),Bi("scrollbar-height","".concat(n-o,"px"))}(),i(),t(!1)}),[]),null},pd=function(){var e=_t(X(!0),2),t=e[0],n=e[1];return fr(m,t?{children:[fr(As,{}),fr(hd,{setLoadingTheme:n}),";"]}:{children:fr(Un,{children:fr(uo,{children:fr(jn,{children:fr(Rn,{path:"/",element:fr(jo,{}),children:[fr(Rn,{path:Zn.home,element:fr(Rs,{})}),fr(Rn,{path:Zn.dashboards,element:fr(Ff,{})}),fr(Rn,{path:Zn.cardinality,element:fr(ud,{})}),fr(Rn,{path:Zn.topQueries,element:fr(fd,{})})]})})})})})},vd=function(e){e&&n.e(27).then(n.bind(n,27)).then((function(t){var n=t.getCLS,r=t.getFID,i=t.getFCP,o=t.getLCP,a=t.getTTFB;n(e),r(e),i(e),o(e),a(e)}))},md=document.getElementById("root");md&&Ye(fr(pd,{}),md),vd()}()}(); \ No newline at end of file diff --git a/app/vmselect/vmui/static/js/main.0b7317e2.js.LICENSE.txt b/app/vmselect/vmui/static/js/main.d0509bc3.js.LICENSE.txt similarity index 100% rename from app/vmselect/vmui/static/js/main.0b7317e2.js.LICENSE.txt rename to app/vmselect/vmui/static/js/main.d0509bc3.js.LICENSE.txt diff --git a/docs/CHANGELOG.md b/docs/CHANGELOG.md index eaf1e045f..64a39b796 100644 --- a/docs/CHANGELOG.md +++ b/docs/CHANGELOG.md @@ -17,11 +17,10 @@ The following tip changes can be tested by building VictoriaMetrics components f * FEATURE: [MetricsQL](https://docs.victoriametrics.com/MetricsQL.html): add [range_linear_regression](https://docs.victoriametrics.com/MetricsQL.html#range_linear_regression) function for calculating [simple linear regression](https://en.wikipedia.org/wiki/Simple_linear_regression) over the input time series on the selected time range. This function is useful for predictions and capacity planning. For example, `range_linear_regression(process_resident_memory_bytes)` can predict future memory usage based on the past memory usage. * FEATURE: [MetricsQL](https://docs.victoriametrics.com/MetricsQL.html): add [range_stddev](https://docs.victoriametrics.com/MetricsQL.html#range_stddev) and [range_stdvar](https://docs.victoriametrics.com/MetricsQL.html#range_stdvar) functions. -* FEATURE: [vmui](https://docs.victoriametrics.com/#vmui): improve structure project, change state management, reduce bundle size, remove Material-UI. See [this pull request](https://github.com/VictoriaMetrics/VictoriaMetrics/pull/3298) -* FEATURE: [vmui](https://docs.victoriametrics.com/#vmui): add the ability to hide the query. +* FEATURE: [vmui](https://docs.victoriametrics.com/#vmui): reduce JS bundle size from 200Kb to 100Kb. See [this pull request](https://github.com/VictoriaMetrics/VictoriaMetrics/pull/3298). +* FEATURE: [vmui](https://docs.victoriametrics.com/#vmui): add the ability to hide results of a particular query by clicking the `eye` icon. See [this pull request](https://github.com/VictoriaMetrics/VictoriaMetrics/pull/3359). -* BUGFIX: [vmui](https://docs.victoriametrics.com/#vmui): save the value of the switches "Trace request" and "Disable cache" after page reload. -* BUGFIX: [vmui](https://docs.victoriametrics.com/#vmui): properly show the tab when navigating from the Prometheus URL in Grafana. +* BUGFIX: [vmui](https://docs.victoriametrics.com/#vmui): properly display the requested graph on the requested time range when navigating from Prometheus URL in Grafana. ## [v1.83.1](https://github.com/VictoriaMetrics/VictoriaMetrics/releases/tag/v1.83.1) diff --git a/docs/README.md b/docs/README.md index 346e513f3..ce6504cbd 100644 --- a/docs/README.md +++ b/docs/README.md @@ -290,7 +290,10 @@ When querying the [backfilled data](https://docs.victoriametrics.com/#backfillin VMUI automatically adjusts the interval between datapoints on the graph depending on the horizontal resolution and on the selected time range. The step value can be customized by changing `Step value` input. -VMUI allows investigating correlations between multiple queries on the same graph. Just click `Add Query` button, enter an additional query in the newly appeared input field and press `Ctrl+Enter`. Results for all the queries should be displayed simultaneously on the same graph. +VMUI allows investigating correlations between multiple queries on the same graph. Just click `Add Query` button, +enter an additional query in the newly appeared input field and press `Enter`. +Results for all the queries are displayed simultaneously on the same graph. +Graphs for a particular query can be temporarily hidden by clicking the `eye` icon on the right side of the input field. See the [example VMUI at VictoriaMetrics playground](https://play.victoriametrics.com/select/accounting/1/6a716b0f-38bc-4856-90ce-448fd713e3fe/prometheus/graph/?g0.expr=100%20*%20sum(rate(process_cpu_seconds_total))%20by%20(job)&g0.range_input=1d). @@ -2163,6 +2166,8 @@ Pass `-help` to VictoriaMetrics in order to see the list of supported command-li Auth key for /debug/pprof/* endpoints. It must be passed via authKey query arg. It overrides httpAuth.* settings -precisionBits int The number of precision bits to store per each value. Lower precision bits improves data compression at the cost of precision loss (default 64) + -prevCacheRemovalPercent float + The previous cache is removed when the percent of requests it serves becomes lower than this value. Higher values reduce average memory usage at the cost of higher CPU usage (default 0.2) -promscrape.azureSDCheckInterval duration Interval for checking for changes in Azure. This works only if azure_sd_configs is configured in '-promscrape.config' file. See https://docs.victoriametrics.com/sd_configs.html#azure_sd_configs for details (default 1m0s) -promscrape.cluster.memberNum string diff --git a/docs/Single-server-VictoriaMetrics.md b/docs/Single-server-VictoriaMetrics.md index de6ae201e..9baac4623 100644 --- a/docs/Single-server-VictoriaMetrics.md +++ b/docs/Single-server-VictoriaMetrics.md @@ -293,7 +293,10 @@ When querying the [backfilled data](https://docs.victoriametrics.com/#backfillin VMUI automatically adjusts the interval between datapoints on the graph depending on the horizontal resolution and on the selected time range. The step value can be customized by changing `Step value` input. -VMUI allows investigating correlations between multiple queries on the same graph. Just click `Add Query` button, enter an additional query in the newly appeared input field and press `Ctrl+Enter`. Results for all the queries should be displayed simultaneously on the same graph. +VMUI allows investigating correlations between multiple queries on the same graph. Just click `Add Query` button, +enter an additional query in the newly appeared input field and press `Enter`. +Results for all the queries are displayed simultaneously on the same graph. +Graphs for a particular query can be temporarily hidden by clicking the `eye` icon on the right side of the input field. See the [example VMUI at VictoriaMetrics playground](https://play.victoriametrics.com/select/accounting/1/6a716b0f-38bc-4856-90ce-448fd713e3fe/prometheus/graph/?g0.expr=100%20*%20sum(rate(process_cpu_seconds_total))%20by%20(job)&g0.range_input=1d). @@ -2166,6 +2169,8 @@ Pass `-help` to VictoriaMetrics in order to see the list of supported command-li Auth key for /debug/pprof/* endpoints. It must be passed via authKey query arg. It overrides httpAuth.* settings -precisionBits int The number of precision bits to store per each value. Lower precision bits improves data compression at the cost of precision loss (default 64) + -prevCacheRemovalPercent float + The previous cache is removed when the percent of requests it serves becomes lower than this value. Higher values reduce average memory usage at the cost of higher CPU usage (default 0.2) -promscrape.azureSDCheckInterval duration Interval for checking for changes in Azure. This works only if azure_sd_configs is configured in '-promscrape.config' file. See https://docs.victoriametrics.com/sd_configs.html#azure_sd_configs for details (default 1m0s) -promscrape.cluster.memberNum string From 353396aa23fa79b7f609741f36ecba8ff63c204b Mon Sep 17 00:00:00 2001 From: Aliaksandr Valialkin Date: Thu, 17 Nov 2022 19:59:10 +0200 Subject: [PATCH 05/46] lib/workingsetcache: expose -cacheExpireDuration command-line flag for fine-tuning of the cache expiration While at it, decrease -prevCacheRemovalPercent from 0.2 to 0.1 and increase -cacheExpireDuration from 20 minutes to 30 minutes. This is needed for https://github.com/VictoriaMetrics/VictoriaMetrics/issues/3343 --- lib/workingsetcache/cache.go | 30 ++++++++++++------------------ 1 file changed, 12 insertions(+), 18 deletions(-) diff --git a/lib/workingsetcache/cache.go b/lib/workingsetcache/cache.go index 3e271029b..be7027976 100644 --- a/lib/workingsetcache/cache.go +++ b/lib/workingsetcache/cache.go @@ -11,8 +11,12 @@ import ( "github.com/VictoriaMetrics/fastcache" ) -var prevCacheRemovalPercent = flag.Float64("prevCacheRemovalPercent", 0.2, "The previous cache is removed when the percent of requests it serves becomes lower than this value. "+ - "Higher values reduce average memory usage at the cost of higher CPU usage") +var ( + prevCacheRemovalPercent = flag.Float64("prevCacheRemovalPercent", 0.1, "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") + cacheExpireDuration = flag.Duration("cacheExpireDuration", 30*time.Minute, "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") +) // Cache modes. const ( @@ -21,8 +25,6 @@ const ( whole = 2 ) -const defaultExpireDuration = 20 * time.Minute - // Cache is a cache for working set entries. // // The cache evicts inactive entries after the given expireDuration. @@ -58,14 +60,10 @@ type Cache struct { // // Stop must be called on the returned cache when it is no longer needed. func Load(filePath string, maxBytes int) *Cache { - return LoadWithExpire(filePath, maxBytes, defaultExpireDuration) + return loadWithExpire(filePath, maxBytes, *cacheExpireDuration) } -// LoadWithExpire loads the cache from filePath and limits its size to maxBytes -// and evicts inactive entires after expireDuration. -// -// Stop must be called on the returned cache when it is no longer needed. -func LoadWithExpire(filePath string, maxBytes int, expireDuration time.Duration) *Cache { +func loadWithExpire(filePath string, maxBytes int, expireDuration time.Duration) *Cache { curr := fastcache.LoadFromFileOrNew(filePath, maxBytes) var cs fastcache.Stats curr.UpdateStats(&cs) @@ -94,14 +92,10 @@ func LoadWithExpire(filePath string, maxBytes int, expireDuration time.Duration) // // Stop must be called on the returned cache when it is no longer needed. func New(maxBytes int) *Cache { - return NewWithExpire(maxBytes, defaultExpireDuration) + return newWithExpire(maxBytes, *cacheExpireDuration) } -// NewWithExpire creates new cache with the given maxBytes capacity and the given expireDuration -// for inactive entries. -// -// Stop must be called on the returned cache when it is no longer needed. -func NewWithExpire(maxBytes int, expireDuration time.Duration) *Cache { +func newWithExpire(maxBytes int, expireDuration time.Duration) *Cache { curr := fastcache.New(maxBytes / 2) prev := fastcache.New(1024) c := newCacheInternal(curr, prev, split, maxBytes) @@ -175,8 +169,8 @@ func (c *Cache) prevCacheWatcher() { minCurrRequests := uint64(1 / p) // Watch for the usage of the prev cache and drop it whenever it receives - // less than prevCacheRemovalPercent requests comparing to the curr cache during the last 30 seconds. - checkInterval := 30 * time.Second + // less than prevCacheRemovalPercent requests comparing to the curr cache during the last 60 seconds. + checkInterval := 60 * time.Second checkInterval += timeJitter(checkInterval / 10) t := time.NewTicker(checkInterval) defer t.Stop() From e79bfdf4b8f8631d29dc52159c79357836a1f8d2 Mon Sep 17 00:00:00 2001 From: Aliaksandr Valialkin Date: Thu, 17 Nov 2022 22:01:59 +0200 Subject: [PATCH 06/46] docs/CHANGELOG.md: document the fix for CPU usage spikes Updates https://github.com/VictoriaMetrics/VictoriaMetrics/issues/3343 --- docs/CHANGELOG.md | 1 + 1 file changed, 1 insertion(+) diff --git a/docs/CHANGELOG.md b/docs/CHANGELOG.md index 64a39b796..7dcc0bde7 100644 --- a/docs/CHANGELOG.md +++ b/docs/CHANGELOG.md @@ -21,6 +21,7 @@ The following tip changes can be tested by building VictoriaMetrics components f * FEATURE: [vmui](https://docs.victoriametrics.com/#vmui): add the ability to hide results of a particular query by clicking the `eye` icon. See [this pull request](https://github.com/VictoriaMetrics/VictoriaMetrics/pull/3359). * BUGFIX: [vmui](https://docs.victoriametrics.com/#vmui): properly display the requested graph on the requested time range when navigating from Prometheus URL in Grafana. +* BUGFIX: reduce CPU usage spikes and memory usage spikes under high data ingestion rate introduced in [v1.83.0](https://docs.victoriametrics.com/CHANGELOG.html#v1830). See [this issue](https://github.com/VictoriaMetrics/VictoriaMetrics/issues/3343). ## [v1.83.1](https://github.com/VictoriaMetrics/VictoriaMetrics/releases/tag/v1.83.1) From 519bd2af7b6bfc00721bebd71ce99df08e690f16 Mon Sep 17 00:00:00 2001 From: Yury Molodov Date: Thu, 17 Nov 2022 21:22:01 +0100 Subject: [PATCH 07/46] vmui: add trace analyzer (#3310) * refactor: change structure project * refactor: change structure project * fix: add hooks for set query params * refactor: add index for pages * docs: add TESTCASES.md * refactor: restructure components * feat: add page with trace analyzer * fix: change detect trace data * Update app/vmui/packages/vmui/src/pages/TracePage/index.tsx Co-authored-by: Zakhar Bessarab * Update app/vmui/packages/vmui/src/pages/TracePage/index.tsx Co-authored-by: Zakhar Bessarab * fix: change descriptions on trace page * Update app/vmui/packages/vmui/src/pages/TracePage/index.tsx Co-authored-by: Zakhar Bessarab * feat: add base components * feat: add reset styles * docs: add description about trace analyzer * feat: add styles for custom panel page * feat: add styles for predefined panels * feat: add style for TracingsView.tsx * feat: add Alerts * feat: add Tooltip.tsx * fix: correct styles * feat: add DatePicker.tsx * feat: add tables * feat: add theme provider * fix: replace using callbacks as props to handlers * fix: correct update time * fix: change TimePicker.tsx * fix: correct styles * fix: update packages * vmui: refactor code, remove material-ui * feat: add paste json for trace analyzer * vmui: update trace analyzer docs * app/vmselect/vmui: `make vmui-update` Co-authored-by: Zakhar Bessarab Co-authored-by: Aliaksandr Valialkin --- README.md | 4 +- app/vmselect/vmui/asset-manifest.json | 8 +- app/vmselect/vmui/index.html | 2 +- .../vmui/static/css/main.44a8ea12.css | 1 + .../vmui/static/css/main.f2cbb582.css | 1 - app/vmselect/vmui/static/js/main.d0509bc3.js | 2 - app/vmselect/vmui/static/js/main.da9caa97.js | 2 + ...CENSE.txt => main.da9caa97.js.LICENSE.txt} | 0 app/vmui/packages/vmui/src/App.tsx | 5 + .../vmui/src/components/Header/Header.tsx | 4 + .../vmui/src/components/Main/Alert/style.scss | 5 +- .../vmui/src/components/Main/Icons/index.tsx | 12 +- .../vmui/src/components/Main/Modal/style.scss | 2 - .../components/Main/TextField/TextField.tsx | 5 +- .../src/components/Main/TextField/style.scss | 2 +- .../vmui/src/components/TraceQuery/Trace.ts | 25 ++- .../components/TraceQuery/TracingsView.tsx | 112 ++++++++--- .../vmui/src/components/TraceQuery/style.scss | 1 + .../components/Views/JsonView/JsonView.tsx | 1 - .../src/pages/TracePage/JsonForm/JsonForm.tsx | 140 ++++++++++++++ .../src/pages/TracePage/JsonForm/style.scss | 41 ++++ .../vmui/src/pages/TracePage/index.tsx | 177 ++++++++++++++++++ .../vmui/src/pages/TracePage/style.scss | 66 +++++++ app/vmui/packages/vmui/src/router/index.ts | 1 + app/vmui/packages/vmui/src/styles/core.scss | 2 +- app/vmui/packages/vmui/src/types/index.ts | 4 +- docs/CHANGELOG.md | 1 + docs/README.md | 4 +- docs/Single-server-VictoriaMetrics.md | 4 +- 29 files changed, 580 insertions(+), 54 deletions(-) create mode 100644 app/vmselect/vmui/static/css/main.44a8ea12.css delete mode 100644 app/vmselect/vmui/static/css/main.f2cbb582.css delete mode 100644 app/vmselect/vmui/static/js/main.d0509bc3.js create mode 100644 app/vmselect/vmui/static/js/main.da9caa97.js rename app/vmselect/vmui/static/js/{main.d0509bc3.js.LICENSE.txt => main.da9caa97.js.LICENSE.txt} (100%) create mode 100644 app/vmui/packages/vmui/src/pages/TracePage/JsonForm/JsonForm.tsx create mode 100644 app/vmui/packages/vmui/src/pages/TracePage/JsonForm/style.scss create mode 100644 app/vmui/packages/vmui/src/pages/TracePage/index.tsx create mode 100644 app/vmui/packages/vmui/src/pages/TracePage/style.scss diff --git a/README.md b/README.md index ad60fcdbf..2eaa7d47a 100644 --- a/README.md +++ b/README.md @@ -1644,7 +1644,9 @@ All the durations and timestamps in traces are in milliseconds. Query tracing is allowed by default. It can be denied by passing `-denyQueryTracing` command-line flag to VictoriaMetrics. -[VMUI](#vmui) provides an UI for query tracing - just click `Trace query` checkbox and re-run the query in order to investigate its' trace. +[VMUI](#vmui) provides an UI: +- for query tracing - just click `Trace query` checkbox and re-run the query in order to investigate its' trace. +- for exploring custom trace - go to the tab `Trace analyzer` and upload or paste JSON with trace information. ## Cardinality limiter diff --git a/app/vmselect/vmui/asset-manifest.json b/app/vmselect/vmui/asset-manifest.json index a1f9aba33..24fc65b79 100644 --- a/app/vmselect/vmui/asset-manifest.json +++ b/app/vmselect/vmui/asset-manifest.json @@ -1,12 +1,12 @@ { "files": { - "main.css": "./static/css/main.f2cbb582.css", - "main.js": "./static/js/main.d0509bc3.js", + "main.css": "./static/css/main.44a8ea12.css", + "main.js": "./static/js/main.da9caa97.js", "static/js/27.c1ccfd29.chunk.js": "./static/js/27.c1ccfd29.chunk.js", "index.html": "./index.html" }, "entrypoints": [ - "static/css/main.f2cbb582.css", - "static/js/main.d0509bc3.js" + "static/css/main.44a8ea12.css", + "static/js/main.da9caa97.js" ] } \ No newline at end of file diff --git a/app/vmselect/vmui/index.html b/app/vmselect/vmui/index.html index 6032aabf0..9a378670f 100644 --- a/app/vmselect/vmui/index.html +++ b/app/vmselect/vmui/index.html @@ -1 +1 @@ -VM UI
    \ No newline at end of file +VM UI
    \ No newline at end of file diff --git a/app/vmselect/vmui/static/css/main.44a8ea12.css b/app/vmselect/vmui/static/css/main.44a8ea12.css new file mode 100644 index 000000000..9fd6fa9cf --- /dev/null +++ b/app/vmselect/vmui/static/css/main.44a8ea12.css @@ -0,0 +1 @@ +.vm-tabs{gap:16px;height:100%;position:relative;-webkit-user-select:none;user-select:none}.vm-tabs,.vm-tabs-item{align-items:center;display:flex;justify-content:center}.vm-tabs-item{color:inherit;cursor:pointer;font-size:inherit;font-weight:inherit;opacity:.6;padding:16px 8px;text-decoration:none;text-transform:uppercase;transition:opacity .2s}.vm-tabs-item_active{opacity:1}.vm-tabs-item__icon{display:grid;margin-right:8px;width:15px}.vm-tabs-item__icon_single{margin-right:0}.vm-tabs__indicator{border-bottom:2px solid;position:absolute;transition:width .2s ease,left .3s cubic-bezier(.28,.84,.42,1)}.vm-alert{grid-gap:8px;align-items:flex-start;background-color:var(--color-background-block);border-radius:8px;box-shadow:1px 2px 12px hsla(0,6%,6%,.08);color:#110f0f;display:grid;font-size:14px;font-weight:500;gap:8px;grid-template-columns:20px 1fr;line-height:20px;padding:16px;position:relative}.vm-alert:after{border-radius:8px;content:"";height:100%;left:0;opacity:.1;position:absolute;top:0;width:100%;z-index:1}.vm-alert__content,.vm-alert__icon{position:relative;z-index:2}.vm-alert__icon{align-items:center;display:flex;justify-content:center}.vm-alert__content{-webkit-filter:brightness(.6);filter:brightness(.6);white-space:pre-line}.vm-alert_success{color:var(--color-success)}.vm-alert_success:after{background-color:var(--color-success)}.vm-alert_error{color:var(--color-error)}.vm-alert_error:after{background-color:var(--color-error)}.vm-alert_info{color:var(--color-info)}.vm-alert_info:after{background-color:var(--color-info)}.vm-alert_warning{color:var(--color-warning)}.vm-alert_warning:after{background-color:var(--color-warning)}.vm-popper{background-color:var(--color-background-block);border-radius:4px;box-shadow:0 2px 8px 0 hsla(0,6%,6%,.2);opacity:0;pointer-events:none;position:fixed;transition:opacity .1s ease-in-out;z-index:-99}.vm-popper_open{-webkit-animation:scale .15s cubic-bezier(.28,.84,.42,1);animation:scale .15s cubic-bezier(.28,.84,.42,1);opacity:1;pointer-events:auto;z-index:101}.vm-popper_open_slider{-webkit-animation:slidePopper .3s cubic-bezier(.28,.84,.42,1.1);animation:slidePopper .3s cubic-bezier(.28,.84,.42,1.1);-webkit-transform-origin:top center;transform-origin:top center}.vm-button{align-items:center;border-radius:6px;color:#fff;cursor:pointer;display:flex;font-size:10px;font-weight:500;justify-content:center;line-height:15px;min-height:31px;padding:6px 14px;position:relative;text-transform:uppercase;-webkit-transform-style:preserve-3d;transform-style:preserve-3d;-webkit-user-select:none;user-select:none;white-space:nowrap}.vm-button:hover:after{background-color:hsla(0,6%,6%,.05)}.vm-button:after,.vm-button:before{border-radius:6px;content:"";height:100%;left:0;position:absolute;top:0;transition:background-color .2s ease;width:100%}.vm-button:before{-webkit-transform:translateZ(-2px);transform:translateZ(-2px)}.vm-button:after{background-color:transparent;-webkit-transform:translateZ(-1px);transform:translateZ(-1px)}.vm-button span{align-items:center;display:grid;justify-content:center}.vm-button span svg{width:15px}.vm-button__start-icon{margin-right:6px}.vm-button__end-icon{margin-left:6px}.vm-button_disabled{cursor:not-allowed;opacity:.3}.vm-button_icon{padding:6px 8px}.vm-button_icon .vm-button__end-icon,.vm-button_icon .vm-button__start-icon{margin:0}.vm-button_small{min-height:25px;padding:4px 6px}.vm-button_small span svg{width:13px}.vm-button_contained_primary{color:var(--color-primary-text)}.vm-button_contained_primary:before{background-color:var(--color-primary)}.vm-button_contained_primary:hover:after{background-color:hsla(0,6%,6%,.2)}.vm-button_contained_secondary{color:var(--color-secondary-text)}.vm-button_contained_secondary:before{background-color:var(--color-secondary)}.vm-button_contained_secondary:hover:after{background-color:hsla(0,6%,6%,.2)}.vm-button_contained_success{color:var(--color-success-text)}.vm-button_contained_success:before{background-color:var(--color-success)}.vm-button_contained_success:hover:after{background-color:hsla(0,6%,6%,.2)}.vm-button_contained_error{color:var(--color-error-text)}.vm-button_contained_error:before{background-color:var(--color-error)}.vm-button_contained_gray{color:hsla(0,6%,6%,.6)}.vm-button_contained_gray:before{background-color:hsla(0,6%,6%,.6)}.vm-button_text_primary{color:var(--color-primary)}.vm-button_text_secondary{color:var(--color-secondary)}.vm-button_text_success{color:var(--color-success)}.vm-button_text_error{color:var(--color-error)}.vm-button_text_gray{color:hsla(0,6%,6%,.6)}.vm-button_outlined_primary{border:1px solid var(--color-primary);color:var(--color-primary)}.vm-button_outlined_error{border:1px solid var(--color-error);color:var(--color-error)}.vm-button_outlined_secondary{border:1px solid var(--color-secondary);color:var(--color-secondary)}.vm-button_outlined_success{border:1px solid var(--color-success);color:var(--color-success)}.vm-button_outlined_gray{border:1px solid hsla(0,6%,6%,.6);color:hsla(0,6%,6%,.6)}.vm-execution-controls-buttons{border-radius:7px;display:flex;justify-content:space-between;min-width:107px}.vm-execution-controls-buttons__arrow{align-items:center;display:flex;justify-content:center;-webkit-transform:rotate(0);transform:rotate(0);transition:-webkit-transform .2s ease-in-out;transition:transform .2s ease-in-out;transition:transform .2s ease-in-out,-webkit-transform .2s ease-in-out}.vm-execution-controls-buttons__arrow_open{-webkit-transform:rotate(180deg);transform:rotate(180deg)}.vm-execution-controls-list{font-size:12px;max-height:208px;overflow:auto;padding:8px 0;width:124px}.vm-tooltip{-webkit-animation:vm-scale .15s cubic-bezier(.28,.84,.42,1);animation:vm-scale .15s cubic-bezier(.28,.84,.42,1);background-color:rgba(97,97,97,.92);border-radius:4px;box-shadow:0 2px 8px 0 hsla(0,6%,6%,.2);color:#fff;font-size:10px;line-height:150%;opacity:1;padding:3px 8px;pointer-events:auto;position:fixed;transition:opacity .1s ease-in-out;white-space:nowrap;z-index:101}@-webkit-keyframes vm-scale{0%{-webkit-transform:scale(0);transform:scale(0)}to{-webkit-transform:scale(1);transform:scale(1)}}@keyframes vm-scale{0%{-webkit-transform:scale(0);transform:scale(0)}to{-webkit-transform:scale(1);transform:scale(1)}}.vm-time-duration{font-size:12px;max-height:168px;overflow:auto}.vm-calendar{background-color:var(--color-background-block);border-radius:8px;display:grid;font-size:12px;grid-template-rows:auto 1fr auto;padding:16px;-webkit-user-select:none;user-select:none}.vm-calendar__tabs{border-top:1px solid hsla(0,6%,6%,.15);margin:16px -16px -16px}.vm-calendar-header{grid-gap:24px;align-items:center;display:grid;gap:24px;grid-template-columns:1fr auto;justify-content:center;min-height:36px;padding-bottom:16px}.vm-calendar-header-left{grid-gap:8px;align-items:center;cursor:pointer;display:grid;gap:8px;grid-template-columns:auto auto;justify-content:flex-start;transition:opacity .2s ease-in-out}.vm-calendar-header-left:hover{opacity:.8}.vm-calendar-header-left__date{color:#110f0f;font-size:12px;font-weight:700}.vm-calendar-header-left__select-year{align-items:center;display:grid;height:14px;justify-content:center;width:14px}.vm-calendar-header-left__select-year svg{width:100%}.vm-calendar-header-right{grid-gap:8px;align-items:center;display:grid;gap:8px;grid-template-columns:18px 18px;justify-content:center}.vm-calendar-header-right__next,.vm-calendar-header-right__prev{cursor:pointer;transition:opacity .2s ease-in-out}.vm-calendar-header-right__next:hover,.vm-calendar-header-right__prev:hover{opacity:.8}.vm-calendar-header-right__prev{-webkit-transform:rotate(90deg);transform:rotate(90deg)}.vm-calendar-header-right__next{-webkit-transform:rotate(-90deg);transform:rotate(-90deg)}.vm-calendar-body{grid-gap:2px;display:grid;gap:2px;grid-template-columns:repeat(7,32px);grid-template-rows:repeat(6,32px)}.vm-calendar-body,.vm-calendar-body-cell{align-items:center;justify-content:center}.vm-calendar-body-cell{border-radius:50%;display:flex;height:100%;text-align:center}.vm-calendar-body-cell_weekday{color:hsla(0,6%,6%,.6)}.vm-calendar-body-cell_day{cursor:pointer;transition:color .2s ease,background-color .3s ease-in-out}.vm-calendar-body-cell_day:hover{background-color:hsla(0,6%,6%,.05)}.vm-calendar-body-cell_day_empty{pointer-events:none}.vm-calendar-body-cell_day_active{color:#fff}.vm-calendar-body-cell_day_active,.vm-calendar-body-cell_day_active:hover{background-color:var(--color-primary)}.vm-calendar-body-cell_day_today{border:1px solid var(--color-primary)}.vm-calendar-years{grid-gap:8px;display:grid;gap:8px;grid-template-columns:repeat(3,1fr);overflow:auto}.vm-calendar-years__year{align-items:center;border-radius:8px;cursor:pointer;display:flex;justify-content:center;padding:8px 16px;transition:color .2s ease,background-color .3s ease-in-out}.vm-calendar-years__year:hover{background-color:hsla(0,6%,6%,.05)}.vm-calendar-years__year_selected{color:#fff}.vm-calendar-years__year_selected,.vm-calendar-years__year_selected:hover{background-color:var(--color-primary)}.vm-calendar-time-picker{align-items:center;display:flex;flex-direction:column;justify-content:center}.vm-calendar-time-picker-clock{border:1px solid hsla(0,6%,6%,.15);border-radius:50%;box-shadow:1px 2px 12px hsla(0,6%,6%,.08);box-sizing:initial;height:230px;position:relative;width:230px}.vm-calendar-time-picker-clock:after{background-color:var(--color-primary);border-radius:50%;content:"";height:6px;left:50%;position:absolute;top:50%;-webkit-transform:translate(-50%,-50%);transform:translate(-50%,-50%);width:6px}.vm-calendar-time-picker-clock__arrow{background-color:var(--color-primary);height:107px;left:114px;margin-top:8px;opacity:.8;position:absolute;top:0;-webkit-transform-origin:bottom;transform-origin:bottom;transition:-webkit-transform .2s ease-in-out;transition:transform .2s ease-in-out;transition:transform .2s ease-in-out,-webkit-transform .2s ease-in-out;width:2px;z-index:0}.vm-calendar-time-picker-clock__arrow_offset{height:73px;margin-top:42px;z-index:2}.vm-calendar-time-picker-clock__arrow:after{background-color:var(--color-primary);border-radius:50%;content:"";height:30px;left:50%;position:absolute;top:0;-webkit-transform:translateX(-50%);transform:translateX(-50%);width:30px}.vm-calendar-time-picker-clock__time{align-items:flex-start;cursor:pointer;display:flex;height:115px;justify-content:center;left:100px;padding-top:8px;position:absolute;text-align:center;top:0;-webkit-transform-origin:bottom;transform-origin:bottom;width:30px;z-index:1}.vm-calendar-time-picker-clock__time_hide{display:none}.vm-calendar-time-picker-clock__time_offset{height:73px;margin-top:42px;padding:0;z-index:2}.vm-calendar-time-picker-clock__time:hover span{background-color:hsla(0,6%,6%,.1)}.vm-calendar-time-picker-clock__time span{align-items:center;border-radius:50%;display:grid;justify-content:center;min-height:30px;min-width:30px;position:relative;-webkit-transform-origin:center;transform-origin:center;transition:background-color .3s ease}.vm-calendar-time-picker-fields{align-items:center;display:flex;justify-content:space-between;margin-top:16px}.vm-calendar-time-picker-fields span{margin:0 8px}.vm-calendar-time-picker-fields__input{border:1px solid #d8d8d8;border-radius:4px;font-size:14px;height:32px;padding:2px 8px;text-align:center;width:64px}.vm-calendar-time-picker-fields__input:focus{border-color:var(--color-primary)}.vm-time-selector{display:grid;grid-template-columns:repeat(2,230px);padding:16px 0}.vm-time-selector-left{border-right:1px solid hsla(0,6%,6%,.15);display:flex;flex-direction:column;gap:8px;padding:0 16px}.vm-time-selector-left-inputs{align-items:flex-start;display:grid;flex-grow:1;justify-content:stretch}.vm-time-selector-left-inputs__date{grid-gap:8px;align-items:center;border-bottom:1px solid hsla(0,6%,6%,.15);cursor:pointer;display:grid;gap:8px;grid-template-columns:1fr 14px;justify-content:center;margin-bottom:16px;padding-bottom:8px;transition:color .2s ease-in-out,border-bottom-color .3s ease}.vm-time-selector-left-inputs__date:hover{border-bottom-color:var(--color-primary)}.vm-time-selector-left-inputs__date:hover,.vm-time-selector-left-inputs__date:hover svg{color:var(--color-primary)}.vm-time-selector-left-inputs__date label{color:hsla(0,6%,6%,.6);font-size:10px;grid-column:1/3}.vm-time-selector-left-inputs__date svg{color:hsla(0,6%,6%,.6);transition:color .2s ease-in-out}.vm-time-selector-left__controls{grid-gap:8px;display:grid;gap:8px;grid-template-columns:repeat(2,1fr)}.vm-text-field{display:grid;margin:6px 0;position:relative;width:100%}.vm-text-field_textarea:after{content:attr(data-replicated-value) " ";visibility:hidden;white-space:pre-wrap}.vm-text-field:after,.vm-text-field__input{background-color:transparent;border:1px solid hsla(0,6%,6%,.15);font-size:12px;grid-area:1/1/2/2;line-height:18px;overflow:hidden;padding:8px 16px;width:100%}.vm-text-field__error,.vm-text-field__helper-text,.vm-text-field__label{background-color:var(--color-background-block);font-size:10px;left:8px;line-height:10px;padding:0 3px;pointer-events:none;position:absolute;-webkit-user-select:none;user-select:none;z-index:2}.vm-text-field__label{color:hsla(0,6%,6%,.6);top:-5px}.vm-text-field__error{bottom:-5px;color:var(--color-error)}.vm-text-field__helper-text{bottom:-5px;color:hsla(0,6%,6%,.6)}.vm-text-field__input{border-radius:4px;display:block;min-height:34px;overflow:hidden;resize:none;transition:border .2s ease}.vm-text-field__input:focus,.vm-text-field__input:hover{border:1px solid var(--color-primary)}.vm-text-field__input_error,.vm-text-field__input_error:focus,.vm-text-field__input_error:hover{border:1px solid var(--color-error)}.vm-text-field__input_icon-start{padding-left:42px}.vm-text-field__input:disabled{background-color:inherit;color:inherit}.vm-text-field__input:disabled:hover{border-color:hsla(0,6%,6%,.4)}.vm-text-field__icon-end,.vm-text-field__icon-start{align-items:center;color:hsla(0,6%,6%,.6);display:flex;height:100%;justify-content:center;left:8px;max-width:15px;position:absolute;top:auto}.vm-text-field__icon-end svg,.vm-text-field__icon-start svg{height:auto;width:100%}.vm-text-field__icon-end{left:auto;right:8px}.vm-modal{align-items:center;background:hsla(0,6%,6%,.55);bottom:0;display:flex;justify-content:center;left:0;position:fixed;right:0;top:0;z-index:100}.vm-modal-content{background:#fff;border-radius:4px;box-shadow:0 0 24px hsla(0,6%,6%,.07);padding:22px}.vm-modal-content-header{align-items:center;display:grid;grid-template-columns:1fr auto;margin-bottom:22px}.vm-modal-content-header__title{font-size:14px;font-weight:700}.vm-modal-content-header__close{align-items:center;box-sizing:initial;color:#fff;cursor:pointer;display:flex;justify-content:center;padding:10px;width:24px}.vm-modal-content-header__close svg{height:auto;width:100%}.vm-server-configurator{grid-gap:16px;align-items:center;display:grid;gap:16px;width:600px}.vm-server-configurator__footer{align-items:center;display:inline-grid;gap:8px;grid-template-columns:repeat(2,1fr);justify-content:flex-end;margin-left:auto;margin-right:0}.vm-shortcuts{min-width:400px}.vm-shortcuts-section{margin-bottom:24px}.vm-shortcuts-section__title{border-bottom:1px solid hsla(0,6%,6%,.15);font-weight:700;margin-bottom:16px;padding:8px 0}.vm-shortcuts-section-list{grid-gap:16px;display:grid;gap:16px}.vm-shortcuts-section-list-item{grid-gap:8px;align-items:center;display:grid;gap:8px;grid-template-columns:180px 1fr}.vm-shortcuts-section-list-item__key{align-items:center;display:flex;gap:4px}.vm-shortcuts-section-list-item__key code{background-color:#fff;background-repeat:repeat-x;border:1px solid hsla(0,6%,6%,.15);border-radius:4px;color:#110f0f;display:inline-block;font-size:10px;line-height:2;padding:2px 8px 0;text-align:center}.vm-shortcuts-section-list-item__description{font-size:12px}.vm-header{align-items:center;display:flex;gap:48px;justify-content:flex-start;padding:8px 24px}.vm-header_app{padding:8px 0}.vm-header-logo{align-items:center;display:grid;justify-content:center}.vm-header-logo__icon{align-items:center;cursor:pointer;display:flex;margin-bottom:2px;position:relative;width:100%}.vm-header-logo__issue{color:inherit;cursor:pointer;font-size:10px;opacity:.4;text-align:center;text-decoration:underline;transition:opacity .2s;white-space:nowrap}.vm-header-logo__issue:hover{opacity:.8}.vm-header-nav{font-size:10px;font-weight:600}.vm-header__settings{align-items:center;display:flex;flex-grow:1;gap:8px;justify-content:flex-end}.vm-container{display:flex;flex-direction:column;min-height:calc(100vh - var(--scrollbar-height))}.vm-container-body{background-color:var(--color-background-body);flex-grow:1;min-height:100%;padding:24px}.vm-container-body_app{background-color:transparent;padding:8px 0}.uplot,.uplot *,.uplot :after,.uplot :before{box-sizing:border-box}.uplot{font-family: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;line-height:1.5;width:-webkit-min-content;width:min-content}.u-title{font-size:18px;font-weight:700;text-align:center}.u-wrap{position:relative;-webkit-user-select:none;user-select:none}.u-over,.u-under{position:absolute}.u-under{overflow:hidden}.uplot canvas{display:block;height:100%;position:relative;width:100%}.u-axis{position:absolute}.u-legend{margin:auto;text-align:center}.u-inline{display:block}.u-inline *{display:inline-block}.u-inline tr{margin-right:16px}.u-legend th{font-weight:600}.u-legend th>*{display:inline-block;vertical-align:middle}.u-legend .u-marker{background-clip:padding-box!important;height:1em;margin-right:4px;width:1em}.u-inline.u-live th:after{content:":";vertical-align:middle}.u-inline:not(.u-live) .u-value{display:none}.u-series>*{padding:4px}.u-series th{cursor:pointer}.u-legend .u-off>*{opacity:.3}.u-select{background:rgba(0,0,0,.07)}.u-cursor-x,.u-cursor-y,.u-select{pointer-events:none;position:absolute}.u-cursor-x,.u-cursor-y{left:0;top:0;will-change:transform;z-index:100}.u-hz .u-cursor-x,.u-vt .u-cursor-y{border-right:1px dashed #607d8b;height:100%}.u-hz .u-cursor-y,.u-vt .u-cursor-x{border-bottom:1px dashed #607d8b;width:100%}.u-cursor-pt{background-clip:padding-box!important;border:0 solid;border-radius:50%;left:0;pointer-events:none;position:absolute;top:0;will-change:transform;z-index:100}.u-axis.u-off,.u-cursor-pt.u-off,.u-cursor-x.u-off,.u-cursor-y.u-off,.u-select.u-off{display:none}.vm-line-chart{height:500px;pointer-events:auto}.u-tooltip,.vm-line-chart_panning{pointer-events:none}.u-tooltip{grid-gap:16px;word-wrap:break-word;background:rgba(97,97,97,.92);border-radius:8px;color:#fff;display:none;font-family:monospace;font-size:10px;font-weight:400;line-height:1.4;max-width:300px;padding:8px;position:absolute;z-index:100}.u-tooltip-data{align-items:center;display:flex;flex-wrap:wrap;line-height:150%}.u-tooltip-data__value{font-weight:700;padding:4px}.u-tooltip__info{grid-gap:4px;display:grid}.u-tooltip__marker{height:12px;margin-right:8px;width:12px}.vm-legend-item{grid-gap:8px;align-items:start;background-color:var(--color-background-block);cursor:pointer;display:grid;grid-template-columns:auto auto;justify-content:start;padding:8px 48px 8px 8px;transition:.2s ease}.vm-legend-item:hover{background-color:rgba(0,0,0,.1)}.vm-legend-item_hide{opacity:.5;text-decoration:line-through}.vm-legend-item__marker{border-radius:2px;box-sizing:border-box;height:14px;transition:.2s ease;width:14px}.vm-legend-item-info{font-weight:400}.vm-legend-item-info__free-fields{cursor:pointer;padding:3px}.vm-legend-item-info__free-fields:hover{text-decoration:underline}.vm-legend-item-info__free-fields:not(:last-child):after{content:","}.vm-legend{cursor:default;display:flex;flex-wrap:wrap;margin-top:24px;position:relative}.vm-legend-group{margin:0 16px 16px 0;min-width:23%}.vm-legend-group-title{align-items:center;border-bottom:1px solid hsla(0,6%,6%,.15);display:flex;margin-bottom:1px;padding:0 8px 8px}.vm-legend-group-title__count{font-weight:700;margin-right:8px}.vm-graph-view{width:100%}.vm-graph-view_full-width{width:calc(100vw - 96px - var(--scrollbar-width))}.vm-query-editor-autocomplete{max-height:300px;overflow:auto}.vm-additional-settings{align-items:center;display:inline-flex;flex-wrap:wrap;gap:24px;justify-content:flex-start}.vm-additional-settings__input{flex-basis:160px;margin-bottom:-6px}.vm-switch{align-items:center;cursor:pointer;display:flex;justify-content:flex-start}.vm-switch_disabled{cursor:default;opacity:.6}.vm-switch_secondary_active .vm-switch-track{background-color:var(--color-secondary)}.vm-switch_primary_active .vm-switch-track{background-color:var(--color-primary)}.vm-switch_active .vm-switch-track__thumb{left:20px}.vm-switch:hover .vm-switch-track{opacity:.8}.vm-switch-track{align-items:center;background-color:hsla(0,6%,6%,.4);border-radius:17px;display:flex;height:17px;justify-content:flex-start;padding:3px;position:relative;transition:background-color .2s ease,opacity .3s ease-out;width:34px}.vm-switch-track__thumb{background-color:var(--color-background-block);border-radius:50%;left:3px;min-height:11px;min-width:11px;position:absolute;top:auto;-webkit-transform-style:preserve-3d;transform-style:preserve-3d;transition:right .2s ease-out,left .2s ease-out}.vm-switch__label{color:inherit;font-size:inherit;margin-left:8px;transition:color .2s ease;white-space:nowrap}.vm-query-configurator{grid-gap:8px;display:grid;gap:8px}.vm-query-configurator-list{display:grid}.vm-query-configurator-list-row{grid-gap:8px;align-items:center;display:grid;gap:8px;grid-template-columns:1fr auto auto}.vm-query-configurator-list-row_disabled{-webkit-filter:grayscale(100%);filter:grayscale(100%);opacity:.5}.vm-query-configurator-list-row__button{display:grid;min-height:36px;width:36px}.vm-query-configurator-settings{align-items:flex-end;display:flex;gap:24px;justify-content:space-between}.vm-query-configurator-settings__buttons{grid-gap:8px;display:grid;gap:8px;grid-template-columns:repeat(2,auto)}.vm-json-view__copy{display:flex;justify-content:flex-end;position:-webkit-sticky;position:sticky;top:24px;z-index:2}.vm-json-view__code{font-size:12px;line-height:1.4;-webkit-transform:translateY(-32px);transform:translateY(-32px)}.vm-axes-limits{max-width:300px}.vm-axes-limits,.vm-axes-limits-list{grid-gap:16px;align-items:center;display:grid;gap:16px}.vm-axes-limits-list__inputs{grid-gap:8px;display:grid;gap:8px;grid-template-columns:repeat(2,120px)}.vm-graph-settings-popper{grid-gap:16px;display:grid;gap:16px;padding:0 0 16px}.vm-graph-settings-popper__body{grid-gap:8px;display:grid;gap:8px;padding:0 16px}.vm-spinner{align-items:center;-webkit-animation:vm-fade 2s cubic-bezier(.28,.84,.42,1.1);animation:vm-fade 2s cubic-bezier(.28,.84,.42,1.1);background-color:hsla(0,0%,100%,.5);bottom:0;display:flex;flex-direction:column;justify-content:center;left:0;pointer-events:none;position:fixed;right:0;top:0;z-index:99}.vm-spinner__message{color:hsla(0,6%,6%,.9);font-size:14px;line-height:1.3;margin-top:24px;text-align:center;white-space:pre-line}.half-circle-spinner,.half-circle-spinner *{box-sizing:border-box}.half-circle-spinner{border-radius:100%;height:60px;position:relative;width:60px}.half-circle-spinner .circle{border:6px solid transparent;border-radius:100%;content:"";height:100%;position:absolute;width:100%}.half-circle-spinner .circle.circle-1{-webkit-animation:half-circle-spinner-animation 1s infinite;animation:half-circle-spinner-animation 1s infinite;border-top-color:var(--color-primary)}.half-circle-spinner .circle.circle-2{-webkit-animation:half-circle-spinner-animation 1s infinite alternate;animation:half-circle-spinner-animation 1s infinite alternate;border-bottom-color:var(--color-primary)}@-webkit-keyframes half-circle-spinner-animation{0%{-webkit-transform:rotate(0deg);transform:rotate(0deg)}to{-webkit-transform:rotate(1turn);transform:rotate(1turn)}}@keyframes half-circle-spinner-animation{0%{-webkit-transform:rotate(0deg);transform:rotate(0deg)}to{-webkit-transform:rotate(1turn);transform:rotate(1turn)}}@-webkit-keyframes vm-fade{0%{opacity:0}to{opacity:1}}@keyframes vm-fade{0%{opacity:0}to{opacity:1}}.vm-tracings-view{grid-gap:24px;display:grid;gap:24px}.vm-tracings-view-trace-header{align-items:center;border-bottom:1px solid hsla(0,6%,6%,.15);display:flex;justify-content:space-between;padding:8px 8px 8px 24px}.vm-tracings-view-trace-header-title{flex-grow:1;font-size:14px;margin-right:8px}.vm-tracings-view-trace-header-title__query{font-weight:700}.vm-tracings-view-trace__nav{padding:24px 24px 24px 0}.vm-line-progress{grid-gap:8px;align-items:center;color:hsla(0,6%,6%,.6);display:grid;gap:8px;grid-template-columns:1fr auto;justify-content:center}.vm-line-progress-track{background-color:hsla(0,6%,6%,.05);border-radius:4px;height:20px;width:100%}.vm-line-progress-track__thumb{background-color:#1a90ff;border-radius:4px;height:100%}.vm-nested-nav{background-color:rgba(201,227,246,.4);border-radius:4px;margin-left:24px}.vm-nested-nav-header{grid-gap:8px;border-radius:4px;cursor:pointer;display:grid;gap:8px;grid-template-columns:auto 1fr;padding:8px;transition:background-color .2s ease-in-out}.vm-nested-nav-header:hover{background-color:hsla(0,6%,6%,.06)}.vm-nested-nav-header__icon{align-items:center;display:flex;justify-content:center;transition:-webkit-transform .2s ease-in-out;transition:transform .2s ease-in-out;transition:transform .2s ease-in-out,-webkit-transform .2s ease-in-out;width:20px}.vm-nested-nav-header__icon_open{-webkit-transform:rotate(180deg);transform:rotate(180deg)}.vm-nested-nav-header__message,.vm-nested-nav-header__progress{grid-column:2}.vm-nested-nav-header__duration{color:hsla(0,6%,6%,.6);grid-column:2}.vm-json-form{grid-gap:16px;display:grid;gap:16px;grid-template-rows:auto calc(90vh - 150px) auto;max-height:900px;max-width:1000px;width:70vw}.vm-json-form_one-field{grid-template-rows:calc(90vh - 150px) auto}.vm-json-form textarea{height:100%;overflow:auto;width:100%}.vm-json-form-footer{align-items:center;display:flex;gap:8px;justify-content:space-between}.vm-json-form-footer__controls{align-items:center;display:flex;flex-grow:1;gap:8px;justify-content:flex-start}.vm-json-form-footer__controls_right{display:grid;grid-template-columns:repeat(2,90px);justify-content:flex-end}.vm-table-settings-popper{display:grid}.vm-table-settings-popper-list{grid-gap:8px;display:grid;gap:8px;max-height:350px;overflow:auto;padding:16px 16px 24px}.vm-table-settings-popper-list__item{font-size:12px;text-transform:capitalize}.vm-table-settings-popper__footer{align-items:center;display:inline-grid;gap:8px;grid-template-columns:1fr 1fr;justify-content:center;min-width:200px;padding:0 16px 16px}.vm-checkbox{align-items:center;cursor:pointer;display:flex;justify-content:flex-start;-webkit-user-select:none;user-select:none}.vm-checkbox_disabled{cursor:default;opacity:.6}.vm-checkbox_secondary_active .vm-checkbox-track{background-color:var(--color-secondary)}.vm-checkbox_secondary .vm-checkbox-track{border:1px solid var(--color-secondary)}.vm-checkbox_primary_active .vm-checkbox-track{background-color:var(--color-primary)}.vm-checkbox_primary .vm-checkbox-track{border:1px solid var(--color-primary)}.vm-checkbox_active .vm-checkbox-track__thumb{-webkit-transform:scale(1);transform:scale(1)}.vm-checkbox:hover .vm-checkbox-track{opacity:.8}.vm-checkbox-track{align-items:center;background-color:transparent;border-radius:4px;display:flex;height:16px;justify-content:center;padding:2px;position:relative;transition:background-color .2s ease,opacity .3s ease-out;width:16px}.vm-checkbox-track__thumb{align-items:center;color:#fff;display:grid;height:12px;justify-content:center;-webkit-transform:scale(0);transform:scale(0);transition:-webkit-transform .1s ease-in-out;transition:transform .1s ease-in-out;transition:transform .1s ease-in-out,-webkit-transform .1s ease-in-out;width:12px}.vm-checkbox-track__thumb svg{width:100%}.vm-checkbox__label{color:inherit;font-size:inherit;margin-left:8px;transition:color .2s ease;white-space:nowrap}.vm-custom-panel{grid-gap:24px;align-items:flex-start;display:grid;gap:24px;height:100%}.vm-custom-panel-body{position:relative}.vm-custom-panel-body-header{display:flex;font-size:10px;justify-content:space-between;margin:-24px -24px 24px;padding:0 24px;position:relative;z-index:1}.vm-custom-panel-body-header,.vm-predefined-panel-header{align-items:center;border-bottom:1px solid hsla(0,6%,6%,.15)}.vm-predefined-panel-header{grid-gap:8px;display:grid;gap:8px;grid-template-columns:auto 1fr 160px auto;justify-content:flex-start;padding:8px 16px}.vm-predefined-panel-header__description{line-height:1.3;white-space:pre-wrap}.vm-predefined-panel-header__description ol,.vm-predefined-panel-header__description ul{list-style-position:inside}.vm-predefined-panel-header__description a{color:#c9e3f6;text-decoration:underline}.vm-predefined-panel-header__info{align-items:center;color:var(--color-primary);display:flex;justify-content:center;width:18px}.vm-predefined-panel-body{padding:8px 16px}.vm-accordion-header{align-items:center;cursor:pointer;display:grid;font-size:inherit;position:relative}.vm-accordion-header__arrow{align-items:center;display:flex;justify-content:center;position:absolute;right:14px;top:auto;-webkit-transform:rotate(0);transform:rotate(0);transition:-webkit-transform .2s ease-in-out;transition:transform .2s ease-in-out;transition:transform .2s ease-in-out,-webkit-transform .2s ease-in-out}.vm-accordion-header__arrow_open{-webkit-transform:rotate(180deg);transform:rotate(180deg)}.vm-accordion-header__arrow svg{height:auto;width:14px}.accordion-section{overflow:hidden}.vm-predefined-dashboard{background-color:transparent}.vm-predefined-dashboard-header{align-items:center;border-radius:4px;box-shadow:1px 2px 12px hsla(0,6%,6%,.08);display:grid;font-weight:700;grid-template-columns:1fr auto;justify-content:space-between;line-height:14px;overflow:hidden;padding:16px;position:relative;-webkit-transform-style:preserve-3d;transform-style:preserve-3d;transition:box-shadow .2s ease-in-out}.vm-predefined-dashboard-header_open{border-radius:4px 4px 0 0;box-shadow:none}.vm-predefined-dashboard-header__title{font-size:12px}.vm-predefined-dashboard-header__count{font-size:10px;grid-column:2;margin-right:30px}.vm-predefined-dashboard-panels{grid-gap:16px;display:grid;gap:16px;grid-template-columns:repeat(12,1fr);padding:0}.vm-predefined-dashboard-panels-panel{border-radius:8px;overflow:hidden;position:relative}.vm-predefined-dashboard-panels-panel:hover .vm-predefined-dashboard-panels-panel__resizer{-webkit-transform:scale(1);transform:scale(1)}.vm-predefined-dashboard-panels-panel__resizer{bottom:0;cursor:se-resize;height:20px;position:absolute;right:0;-webkit-transform:scale(0);transform:scale(0);transition:-webkit-transform .2s ease-in-out;transition:transform .2s ease-in-out;transition:transform .2s ease-in-out,-webkit-transform .2s ease-in-out;width:20px;z-index:1}.vm-predefined-dashboard-panels-panel__resizer:after{border-bottom:2px solid hsla(0,6%,6%,.2);border-right:2px solid hsla(0,6%,6%,.2);bottom:5px;content:"";height:5px;position:absolute;right:5px;width:5px}.vm-predefined-dashboard-panels-panel__alert{grid-column:span 12}.vm-predefined-panels{grid-gap:16px;align-items:flex-start;display:grid;gap:16px}.vm-predefined-panels-tabs{align-items:center;display:flex;font-size:10px;justify-content:flex-start;overflow:hidden}.vm-predefined-panels-tabs__tab{border-right:1px solid hsla(0,6%,6%,.15);cursor:pointer;padding:16px;text-transform:uppercase;transition:opacity .2s ease-in-out,color .15s ease-in}.vm-predefined-panels-tabs__tab:hover{opacity:1}.vm-predefined-panels__dashboards{grid-gap:16px;display:grid;gap:16px}.vm-cardinality-configurator{grid-gap:8px;display:grid;gap:8px}.vm-cardinality-configurator-controls{align-items:center;display:flex;flex-wrap:wrap;gap:0 24px;justify-content:flex-start}.vm-cardinality-configurator-controls__query{flex-grow:1}.vm-cardinality-configurator-bottom{grid-gap:24px;align-items:flex-end;display:grid;gap:24px;grid-template-columns:1fr auto}.vm-cardinality-configurator-bottom__info{font-size:12px}.u-legend{color:#110f0f;font-family:Lato,sans-serif;font-size:14px}.u-legend .u-thead{display:none}.u-legend .u-series{display:flex;gap:8px}.u-legend .u-series th{display:none}.u-legend .u-series td:nth-child(2):after{content:":";margin-left:8px}.u-legend .u-series .u-value{display:block;padding:0;text-align:left}.vm-metrics-content-header{margin:-24px -24px 24px}.vm-cardinality-panel{grid-gap:24px;align-items:flex-start;display:grid;gap:24px}.vm-top-queries-panel-header{margin:-24px -24px 24px}.vm-top-queries{grid-gap:24px;align-items:flex-start;display:grid;gap:24px}.vm-top-queries-controls{grid-gap:8px;display:grid;gap:8px}.vm-top-queries-controls-bottom,.vm-top-queries-controls__fields{grid-gap:24px;display:grid;gap:24px;grid-template-columns:1fr auto}.vm-top-queries-controls-bottom{align-items:flex-end;justify-content:space-between}.vm-top-queries-controls-bottom__button{align-items:center;display:flex;justify-content:flex-end}.vm-top-queries-panels{grid-gap:24px;display:grid;gap:24px}.vm-trace-page{display:flex;flex-direction:column;min-height:100%;padding:16px}.vm-trace-page-controls{grid-gap:16px;align-items:center;display:grid;gap:16px;grid-template-columns:1fr 1fr;justify-content:center}.vm-trace-page-header{grid-gap:16px;align-items:start;display:grid;gap:16px;grid-template-columns:1fr auto;margin-bottom:24px}.vm-trace-page-header-errors{grid-gap:24px;align-items:flex-start;display:grid;gap:24px;grid-template-columns:1fr;justify-content:stretch}.vm-trace-page-header-errors-item{align-items:center;display:grid;justify-content:stretch;position:relative}.vm-trace-page-header-errors-item__filename{min-height:20px}.vm-trace-page-header-errors-item__close{position:absolute;right:8px;top:auto;z-index:2}.vm-trace-page-preview{align-items:center;display:flex;flex-direction:column;flex-grow:1;justify-content:center}.vm-trace-page-preview__text{font-size:14px;line-height:1.8;margin-bottom:8px;text-align:center;white-space:pre-line}#root,body,html{background-attachment:fixed;background-repeat:no-repeat;color:#110f0f;cursor:default;font-family:Lato,sans-serif;font-size:12px;margin:0;min-height:100%}body{overflow:scroll}*{cursor:inherit;font:inherit}code{font-family:JetBrains Mono,monospace}b{font-weight:700}input[type=number]::-webkit-inner-spin-button,input[type=number]::-webkit-outer-spin-button{-webkit-appearance:none;margin:0}.vm-snackbar{bottom:16px;left:16px;position:fixed;z-index:999}a,abbr,acronym,address,applet,article,aside,audio,big,body,canvas,caption,center,cite,code,del,details,dfn,div,em,embed,fieldset,figcaption,figure,footer,form,h1,h2,h3,h4,h5,h6,header,hgroup,html,iframe,img,ins,kbd,label,legend,li,mark,menu,nav,object,ol,output,p,pre,q,ruby,s,samp,section,small,span,strike,strong,sub,summary,sup,table,tbody,td,tfoot,th,thead,time,tr,tt,u,ul,var,video{border:0;margin:0;padding:0;vertical-align:initial}h1,h2,h3,h4,h5,h6{font-weight:400}article,aside,details,figcaption,figure,footer,header,hgroup,menu,nav,section{display:block}body{line-height:1}q:after,q:before{content:""}table{border-collapse:collapse;border-spacing:0}input::-webkit-input-placeholder{opacity:1;-webkit-transition:opacity .3s ease;transition:opacity .3s ease}input::placeholder{opacity:1;transition:opacity .3s ease}input:focus::-webkit-input-placeholder{opacity:0;-webkit-transition:opacity .3s ease;transition:opacity .3s ease}input:focus::placeholder{opacity:0;transition:opacity .3s ease}*{box-sizing:border-box;outline:none}button{background:none;border:none;border-radius:0;padding:0}strong{letter-spacing:1px}input[type=file]{cursor:pointer;font-size:0;height:100%;left:0;opacity:0;position:absolute;top:0;width:100%}input[type=file]:disabled{cursor:not-allowed}a{color:inherit;text-decoration:inherit}input,textarea{-webkit-text-fill-color:inherit;appearance:none;-webkit-appearance:none}input:disabled,textarea:disabled{opacity:1!important}input:placeholder-shown,textarea:placeholder-shown{width:100%}input:-webkit-autofill,input:-webkit-autofill:active,input:-webkit-autofill:focus,input:-webkit-autofill:hover{-webkit-box-shadow:inset 0 0 0 0 #fff!important;width:100%;z-index:2}.vm-header-button{border:1px solid hsla(0,6%,6%,.2)}.vm-list__item{background-color:transparent;cursor:pointer;padding:12px 16px;transition:background-color .2s ease}.vm-list__item:hover,.vm-list__item_active{background-color:hsla(0,6%,6%,.1)}.vm-popper-header{grid-gap:8px;align-items:center;background-color:#3f51b5;background-color:var(--color-primary);border-radius:4px 4px 0 0;color:#fff;display:grid;gap:8px;grid-template-columns:1fr auto;justify-content:space-between;padding:8px 8px 8px 16px}.vm-popper-header__title{font-weight:700}.vm-block{background-color:#fff;background-color:var(--color-background-block);border-radius:8px;box-shadow:1px 2px 12px hsla(0,6%,6%,.08);padding:24px}.vm-block_empty-padding{padding:0}.vm-section-header{align-items:center;border-bottom:1px solid hsla(0,6%,6%,.15);border-radius:8px 8px 0 0;display:grid;grid-template-columns:1fr auto;justify-content:center;padding:0 24px}.vm-section-header__title{font-size:12px;font-weight:700}.vm-section-header__tabs{align-items:center;display:flex;font-size:10px;justify-content:flex-start}.vm-table{border-collapse:initial;border-spacing:0;margin-top:-24px;width:100%}.vm-table,.vm-table__row{background-color:#fff;background-color:var(--color-background-block)}.vm-table__row{transition:background-color .2s ease}.vm-table__row:hover:not(.vm-table__row_header){background-color:hsla(0,6%,6%,.05)}.vm-table__row_header{position:-webkit-sticky;position:sticky;top:0;z-index:2}.vm-table__row_selected{background-color:rgba(26,144,255,.05)}.vm-table-cell{border-bottom:1px solid hsla(0,6%,6%,.15);height:40px;padding:8px;vertical-align:middle}.vm-table-cell__content{align-items:center;display:flex;justify-content:flex-start}.vm-table-cell_sort{cursor:pointer}.vm-table-cell_sort:hover{background-color:hsla(0,6%,6%,.05)}.vm-table-cell_header{font-weight:700;text-align:left;text-transform:capitalize}.vm-table-cell_gray{color:hsla(0,6%,6%,.4)}.vm-table-cell_right{text-align:right}.vm-table-cell_right .vm-table-cell__content{justify-content:flex-end}.vm-table-cell_no-wrap{white-space:nowrap}.vm-table__sort-icon{align-items:center;display:flex;justify-content:center;margin:0 8px;opacity:.4;transition:opacity .2s ease,-webkit-transform .2s ease-in-out;transition:opacity .2s ease,transform .2s ease-in-out;transition:opacity .2s ease,transform .2s ease-in-out,-webkit-transform .2s ease-in-out;width:15px}.vm-table__sort-icon_active{opacity:1}.vm-table__sort-icon_desc{-webkit-transform:rotate(180deg);transform:rotate(180deg)}:root{--color-primary:#3f51b5;--color-secondary:#e91e63;--color-error:#fd080e;--color-warning:#ff8308;--color-info:#03a9f4;--color-success:#4caf50;--color-primary-text:#fff;--color-secondary-text:#fff;--color-error-text:#fff;--color-warning-text:#fff;--color-info-text:#fff;--color-success-text:#fff;--color-background-body:#fefeff;--color-background-block:#fff} \ No newline at end of file diff --git a/app/vmselect/vmui/static/css/main.f2cbb582.css b/app/vmselect/vmui/static/css/main.f2cbb582.css deleted file mode 100644 index e96da66ec..000000000 --- a/app/vmselect/vmui/static/css/main.f2cbb582.css +++ /dev/null @@ -1 +0,0 @@ -.vm-tabs{gap:16px;height:100%;position:relative;-webkit-user-select:none;user-select:none}.vm-tabs,.vm-tabs-item{align-items:center;display:flex;justify-content:center}.vm-tabs-item{color:inherit;cursor:pointer;font-size:inherit;font-weight:inherit;opacity:.6;padding:16px 8px;text-decoration:none;text-transform:uppercase;transition:opacity .2s}.vm-tabs-item_active{opacity:1}.vm-tabs-item__icon{display:grid;margin-right:8px;width:15px}.vm-tabs-item__icon_single{margin-right:0}.vm-tabs__indicator{border-bottom:2px solid;position:absolute;transition:width .2s ease,left .3s cubic-bezier(.28,.84,.42,1)}.vm-alert{grid-gap:8px;align-items:center;background-color:var(--color-background-block);border-radius:8px;box-shadow:1px 2px 12px hsla(0,6%,6%,.08);color:#110f0f;display:grid;font-size:14px;font-weight:500;gap:8px;grid-template-columns:20px 1fr;line-height:1.3;padding:16px;position:relative}.vm-alert:after{border-radius:8px;content:"";height:100%;left:0;opacity:.1;position:absolute;top:0;width:100%;z-index:1}.vm-alert__content,.vm-alert__icon{position:relative;z-index:2}.vm-alert__icon{align-items:center;display:flex;justify-content:center}.vm-alert__content{-webkit-filter:brightness(.6);filter:brightness(.6)}.vm-alert_success{color:var(--color-success)}.vm-alert_success:after{background-color:var(--color-success)}.vm-alert_error{color:var(--color-error)}.vm-alert_error:after{background-color:var(--color-error)}.vm-alert_info{color:var(--color-info)}.vm-alert_info:after{background-color:var(--color-info)}.vm-alert_warning{color:var(--color-warning)}.vm-alert_warning:after{background-color:var(--color-warning)}.vm-popper{background-color:var(--color-background-block);border-radius:4px;box-shadow:0 2px 8px 0 hsla(0,6%,6%,.2);opacity:0;pointer-events:none;position:fixed;transition:opacity .1s ease-in-out;z-index:-99}.vm-popper_open{-webkit-animation:scale .15s cubic-bezier(.28,.84,.42,1);animation:scale .15s cubic-bezier(.28,.84,.42,1);opacity:1;pointer-events:auto;z-index:101}.vm-popper_open_slider{-webkit-animation:slidePopper .3s cubic-bezier(.28,.84,.42,1.1);animation:slidePopper .3s cubic-bezier(.28,.84,.42,1.1);-webkit-transform-origin:top center;transform-origin:top center}.vm-button{align-items:center;border-radius:6px;color:#fff;cursor:pointer;display:flex;font-size:10px;font-weight:500;justify-content:center;line-height:15px;min-height:31px;padding:6px 14px;position:relative;text-transform:uppercase;-webkit-transform-style:preserve-3d;transform-style:preserve-3d;-webkit-user-select:none;user-select:none;white-space:nowrap}.vm-button:hover:after{background-color:hsla(0,6%,6%,.05)}.vm-button:after,.vm-button:before{border-radius:6px;content:"";height:100%;left:0;position:absolute;top:0;transition:background-color .2s ease;width:100%}.vm-button:before{-webkit-transform:translateZ(-2px);transform:translateZ(-2px)}.vm-button:after{background-color:transparent;-webkit-transform:translateZ(-1px);transform:translateZ(-1px)}.vm-button span{align-items:center;display:grid;justify-content:center}.vm-button span svg{width:15px}.vm-button__start-icon{margin-right:6px}.vm-button__end-icon{margin-left:6px}.vm-button_disabled{cursor:not-allowed;opacity:.3}.vm-button_icon{padding:6px 8px}.vm-button_icon .vm-button__end-icon,.vm-button_icon .vm-button__start-icon{margin:0}.vm-button_small{min-height:25px;padding:4px 6px}.vm-button_small span svg{width:13px}.vm-button_contained_primary{color:var(--color-primary-text)}.vm-button_contained_primary:before{background-color:var(--color-primary)}.vm-button_contained_primary:hover:after{background-color:hsla(0,6%,6%,.2)}.vm-button_contained_secondary{color:var(--color-secondary-text)}.vm-button_contained_secondary:before{background-color:var(--color-secondary)}.vm-button_contained_secondary:hover:after{background-color:hsla(0,6%,6%,.2)}.vm-button_contained_success{color:var(--color-success-text)}.vm-button_contained_success:before{background-color:var(--color-success)}.vm-button_contained_success:hover:after{background-color:hsla(0,6%,6%,.2)}.vm-button_contained_error{color:var(--color-error-text)}.vm-button_contained_error:before{background-color:var(--color-error)}.vm-button_contained_gray{color:hsla(0,6%,6%,.6)}.vm-button_contained_gray:before{background-color:hsla(0,6%,6%,.6)}.vm-button_text_primary{color:var(--color-primary)}.vm-button_text_secondary{color:var(--color-secondary)}.vm-button_text_success{color:var(--color-success)}.vm-button_text_error{color:var(--color-error)}.vm-button_text_gray{color:hsla(0,6%,6%,.6)}.vm-button_outlined_primary{border:1px solid var(--color-primary);color:var(--color-primary)}.vm-button_outlined_error{border:1px solid var(--color-error);color:var(--color-error)}.vm-button_outlined_secondary{border:1px solid var(--color-secondary);color:var(--color-secondary)}.vm-button_outlined_success{border:1px solid var(--color-success);color:var(--color-success)}.vm-button_outlined_gray{border:1px solid hsla(0,6%,6%,.6);color:hsla(0,6%,6%,.6)}.vm-execution-controls-buttons{border-radius:7px;display:flex;justify-content:space-between;min-width:107px}.vm-execution-controls-buttons__arrow{align-items:center;display:flex;justify-content:center;-webkit-transform:rotate(0);transform:rotate(0);transition:-webkit-transform .2s ease-in-out;transition:transform .2s ease-in-out;transition:transform .2s ease-in-out,-webkit-transform .2s ease-in-out}.vm-execution-controls-buttons__arrow_open{-webkit-transform:rotate(180deg);transform:rotate(180deg)}.vm-execution-controls-list{font-size:12px;max-height:208px;overflow:auto;padding:8px 0;width:124px}.vm-tooltip{-webkit-animation:vm-scale .15s cubic-bezier(.28,.84,.42,1);animation:vm-scale .15s cubic-bezier(.28,.84,.42,1);background-color:rgba(97,97,97,.92);border-radius:4px;box-shadow:0 2px 8px 0 hsla(0,6%,6%,.2);color:#fff;font-size:10px;line-height:150%;opacity:1;padding:3px 8px;pointer-events:auto;position:fixed;transition:opacity .1s ease-in-out;white-space:nowrap;z-index:101}@-webkit-keyframes vm-scale{0%{-webkit-transform:scale(0);transform:scale(0)}to{-webkit-transform:scale(1);transform:scale(1)}}@keyframes vm-scale{0%{-webkit-transform:scale(0);transform:scale(0)}to{-webkit-transform:scale(1);transform:scale(1)}}.vm-time-duration{font-size:12px;max-height:168px;overflow:auto}.vm-calendar{background-color:var(--color-background-block);border-radius:8px;display:grid;font-size:12px;grid-template-rows:auto 1fr auto;padding:16px;-webkit-user-select:none;user-select:none}.vm-calendar__tabs{border-top:1px solid hsla(0,6%,6%,.15);margin:16px -16px -16px}.vm-calendar-header{grid-gap:24px;align-items:center;display:grid;gap:24px;grid-template-columns:1fr auto;justify-content:center;min-height:36px;padding-bottom:16px}.vm-calendar-header-left{grid-gap:8px;align-items:center;cursor:pointer;display:grid;gap:8px;grid-template-columns:auto auto;justify-content:flex-start;transition:opacity .2s ease-in-out}.vm-calendar-header-left:hover{opacity:.8}.vm-calendar-header-left__date{color:#110f0f;font-size:12px;font-weight:700}.vm-calendar-header-left__select-year{align-items:center;display:grid;height:14px;justify-content:center;width:14px}.vm-calendar-header-left__select-year svg{width:100%}.vm-calendar-header-right{grid-gap:8px;align-items:center;display:grid;gap:8px;grid-template-columns:18px 18px;justify-content:center}.vm-calendar-header-right__next,.vm-calendar-header-right__prev{cursor:pointer;transition:opacity .2s ease-in-out}.vm-calendar-header-right__next:hover,.vm-calendar-header-right__prev:hover{opacity:.8}.vm-calendar-header-right__prev{-webkit-transform:rotate(90deg);transform:rotate(90deg)}.vm-calendar-header-right__next{-webkit-transform:rotate(-90deg);transform:rotate(-90deg)}.vm-calendar-body{grid-gap:2px;display:grid;gap:2px;grid-template-columns:repeat(7,32px);grid-template-rows:repeat(6,32px)}.vm-calendar-body,.vm-calendar-body-cell{align-items:center;justify-content:center}.vm-calendar-body-cell{border-radius:50%;display:flex;height:100%;text-align:center}.vm-calendar-body-cell_weekday{color:hsla(0,6%,6%,.6)}.vm-calendar-body-cell_day{cursor:pointer;transition:color .2s ease,background-color .3s ease-in-out}.vm-calendar-body-cell_day:hover{background-color:hsla(0,6%,6%,.05)}.vm-calendar-body-cell_day_empty{pointer-events:none}.vm-calendar-body-cell_day_active{color:#fff}.vm-calendar-body-cell_day_active,.vm-calendar-body-cell_day_active:hover{background-color:var(--color-primary)}.vm-calendar-body-cell_day_today{border:1px solid var(--color-primary)}.vm-calendar-years{grid-gap:8px;display:grid;gap:8px;grid-template-columns:repeat(3,1fr);overflow:auto}.vm-calendar-years__year{align-items:center;border-radius:8px;cursor:pointer;display:flex;justify-content:center;padding:8px 16px;transition:color .2s ease,background-color .3s ease-in-out}.vm-calendar-years__year:hover{background-color:hsla(0,6%,6%,.05)}.vm-calendar-years__year_selected{color:#fff}.vm-calendar-years__year_selected,.vm-calendar-years__year_selected:hover{background-color:var(--color-primary)}.vm-calendar-time-picker{align-items:center;display:flex;flex-direction:column;justify-content:center}.vm-calendar-time-picker-clock{border:1px solid hsla(0,6%,6%,.15);border-radius:50%;box-shadow:1px 2px 12px hsla(0,6%,6%,.08);box-sizing:initial;height:230px;position:relative;width:230px}.vm-calendar-time-picker-clock:after{background-color:var(--color-primary);border-radius:50%;content:"";height:6px;left:50%;position:absolute;top:50%;-webkit-transform:translate(-50%,-50%);transform:translate(-50%,-50%);width:6px}.vm-calendar-time-picker-clock__arrow{background-color:var(--color-primary);height:107px;left:114px;margin-top:8px;opacity:.8;position:absolute;top:0;-webkit-transform-origin:bottom;transform-origin:bottom;transition:-webkit-transform .2s ease-in-out;transition:transform .2s ease-in-out;transition:transform .2s ease-in-out,-webkit-transform .2s ease-in-out;width:2px;z-index:0}.vm-calendar-time-picker-clock__arrow_offset{height:73px;margin-top:42px;z-index:2}.vm-calendar-time-picker-clock__arrow:after{background-color:var(--color-primary);border-radius:50%;content:"";height:30px;left:50%;position:absolute;top:0;-webkit-transform:translateX(-50%);transform:translateX(-50%);width:30px}.vm-calendar-time-picker-clock__time{align-items:flex-start;cursor:pointer;display:flex;height:115px;justify-content:center;left:100px;padding-top:8px;position:absolute;text-align:center;top:0;-webkit-transform-origin:bottom;transform-origin:bottom;width:30px;z-index:1}.vm-calendar-time-picker-clock__time_hide{display:none}.vm-calendar-time-picker-clock__time_offset{height:73px;margin-top:42px;padding:0;z-index:2}.vm-calendar-time-picker-clock__time:hover span{background-color:hsla(0,6%,6%,.1)}.vm-calendar-time-picker-clock__time span{align-items:center;border-radius:50%;display:grid;justify-content:center;min-height:30px;min-width:30px;position:relative;-webkit-transform-origin:center;transform-origin:center;transition:background-color .3s ease}.vm-calendar-time-picker-fields{align-items:center;display:flex;justify-content:space-between;margin-top:16px}.vm-calendar-time-picker-fields span{margin:0 8px}.vm-calendar-time-picker-fields__input{border:1px solid #d8d8d8;border-radius:4px;font-size:14px;height:32px;padding:2px 8px;text-align:center;width:64px}.vm-calendar-time-picker-fields__input:focus{border-color:var(--color-primary)}.vm-time-selector{display:grid;grid-template-columns:repeat(2,230px);padding:16px 0}.vm-time-selector-left{border-right:1px solid hsla(0,6%,6%,.15);display:flex;flex-direction:column;gap:8px;padding:0 16px}.vm-time-selector-left-inputs{align-items:flex-start;display:grid;flex-grow:1;justify-content:stretch}.vm-time-selector-left-inputs__date{grid-gap:8px;align-items:center;border-bottom:1px solid hsla(0,6%,6%,.15);cursor:pointer;display:grid;gap:8px;grid-template-columns:1fr 14px;justify-content:center;margin-bottom:16px;padding-bottom:8px;transition:color .2s ease-in-out,border-bottom-color .3s ease}.vm-time-selector-left-inputs__date:hover{border-bottom-color:var(--color-primary)}.vm-time-selector-left-inputs__date:hover,.vm-time-selector-left-inputs__date:hover svg{color:var(--color-primary)}.vm-time-selector-left-inputs__date label{color:hsla(0,6%,6%,.6);font-size:10px;grid-column:1/3}.vm-time-selector-left-inputs__date svg{color:hsla(0,6%,6%,.6);transition:color .2s ease-in-out}.vm-time-selector-left__controls{grid-gap:8px;display:grid;gap:8px;grid-template-columns:repeat(2,1fr)}.vm-text-field{display:grid;margin:6px 0;position:relative;width:100%}.vm-text-field:after{content:attr(data-replicated-value) " ";visibility:hidden;white-space:pre-wrap}.vm-text-field:after,.vm-text-field__input{background-color:transparent;border:1px solid hsla(0,6%,6%,.15);font-size:12px;grid-area:1/1/2/2;line-height:18px;overflow:hidden;padding:8px 16px;width:100%}.vm-text-field__error,.vm-text-field__helper-text,.vm-text-field__label{background-color:var(--color-background-block);font-size:10px;left:8px;line-height:10px;padding:0 3px;pointer-events:none;position:absolute;-webkit-user-select:none;user-select:none;z-index:2}.vm-text-field__label{color:hsla(0,6%,6%,.6);top:-5px}.vm-text-field__error{bottom:-5px;color:var(--color-error)}.vm-text-field__helper-text{bottom:-5px;color:hsla(0,6%,6%,.6)}.vm-text-field__input{border-radius:4px;display:block;min-height:34px;overflow:hidden;resize:none;transition:border .2s ease}.vm-text-field__input:focus,.vm-text-field__input:hover{border:1px solid var(--color-primary)}.vm-text-field__input_error,.vm-text-field__input_error:focus,.vm-text-field__input_error:hover{border:1px solid var(--color-error)}.vm-text-field__input_icon-start{padding-left:42px}.vm-text-field__input:disabled{background-color:inherit;color:inherit}.vm-text-field__input:disabled:hover{border-color:hsla(0,6%,6%,.4)}.vm-text-field__icon-end,.vm-text-field__icon-start{align-items:center;color:hsla(0,6%,6%,.6);display:flex;height:100%;justify-content:center;left:8px;max-width:15px;position:absolute;top:auto}.vm-text-field__icon-end svg,.vm-text-field__icon-start svg{height:auto;width:100%}.vm-text-field__icon-end{left:auto;right:8px}.vm-modal{align-items:center;background:hsla(0,6%,6%,.55);bottom:0;display:flex;justify-content:center;left:0;position:fixed;right:0;top:0;z-index:100}.vm-modal-content{background:#fff;border-radius:4px;box-shadow:0 0 24px hsla(0,6%,6%,.07);max-height:85vh;overflow:hidden;padding:22px}.vm-modal-content-header{align-items:center;display:grid;grid-template-columns:1fr auto;margin-bottom:22px}.vm-modal-content-header__title{font-size:14px;font-weight:700}.vm-modal-content-header__close{align-items:center;box-sizing:initial;color:#fff;cursor:pointer;display:flex;justify-content:center;padding:10px;width:24px}.vm-modal-content-header__close svg{height:auto;width:100%}.vm-server-configurator{grid-gap:16px;align-items:center;display:grid;gap:16px;width:600px}.vm-server-configurator__footer{align-items:center;display:inline-grid;gap:8px;grid-template-columns:repeat(2,1fr);justify-content:flex-end;margin-left:auto;margin-right:0}.vm-shortcuts{min-width:400px}.vm-shortcuts-section{margin-bottom:24px}.vm-shortcuts-section__title{border-bottom:1px solid hsla(0,6%,6%,.15);font-weight:700;margin-bottom:16px;padding:8px 0}.vm-shortcuts-section-list{grid-gap:16px;display:grid;gap:16px}.vm-shortcuts-section-list-item{grid-gap:8px;align-items:center;display:grid;gap:8px;grid-template-columns:180px 1fr}.vm-shortcuts-section-list-item__key{align-items:center;display:flex;gap:4px}.vm-shortcuts-section-list-item__key code{background-color:#fff;background-repeat:repeat-x;border:1px solid hsla(0,6%,6%,.15);border-radius:4px;color:#110f0f;display:inline-block;font-size:10px;line-height:2;padding:2px 8px 0;text-align:center}.vm-shortcuts-section-list-item__description{font-size:12px}.vm-header{align-items:center;display:flex;gap:48px;justify-content:flex-start;padding:8px 24px}.vm-header_app{padding:8px 0}.vm-header-logo{align-items:center;display:grid;justify-content:center}.vm-header-logo__icon{align-items:center;cursor:pointer;display:flex;margin-bottom:2px;position:relative;width:100%}.vm-header-logo__issue{color:inherit;cursor:pointer;font-size:10px;opacity:.4;text-align:center;text-decoration:underline;transition:opacity .2s;white-space:nowrap}.vm-header-logo__issue:hover{opacity:.8}.vm-header-nav{font-size:10px;font-weight:600}.vm-header__settings{align-items:center;display:flex;flex-grow:1;gap:8px;justify-content:flex-end}.vm-container{display:flex;flex-direction:column;min-height:calc(100vh - var(--scrollbar-height))}.vm-container-body{background-color:var(--color-background-body);flex-grow:1;min-height:100%;padding:24px}.vm-container-body_app{background-color:transparent;padding:8px 0}.uplot,.uplot *,.uplot :after,.uplot :before{box-sizing:border-box}.uplot{font-family: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;line-height:1.5;width:-webkit-min-content;width:min-content}.u-title{font-size:18px;font-weight:700;text-align:center}.u-wrap{position:relative;-webkit-user-select:none;user-select:none}.u-over,.u-under{position:absolute}.u-under{overflow:hidden}.uplot canvas{display:block;height:100%;position:relative;width:100%}.u-axis{position:absolute}.u-legend{margin:auto;text-align:center}.u-inline{display:block}.u-inline *{display:inline-block}.u-inline tr{margin-right:16px}.u-legend th{font-weight:600}.u-legend th>*{display:inline-block;vertical-align:middle}.u-legend .u-marker{background-clip:padding-box!important;height:1em;margin-right:4px;width:1em}.u-inline.u-live th:after{content:":";vertical-align:middle}.u-inline:not(.u-live) .u-value{display:none}.u-series>*{padding:4px}.u-series th{cursor:pointer}.u-legend .u-off>*{opacity:.3}.u-select{background:rgba(0,0,0,.07)}.u-cursor-x,.u-cursor-y,.u-select{pointer-events:none;position:absolute}.u-cursor-x,.u-cursor-y{left:0;top:0;will-change:transform;z-index:100}.u-hz .u-cursor-x,.u-vt .u-cursor-y{border-right:1px dashed #607d8b;height:100%}.u-hz .u-cursor-y,.u-vt .u-cursor-x{border-bottom:1px dashed #607d8b;width:100%}.u-cursor-pt{background-clip:padding-box!important;border:0 solid;border-radius:50%;left:0;pointer-events:none;position:absolute;top:0;will-change:transform;z-index:100}.u-axis.u-off,.u-cursor-pt.u-off,.u-cursor-x.u-off,.u-cursor-y.u-off,.u-select.u-off{display:none}.vm-line-chart{height:500px;pointer-events:auto}.u-tooltip,.vm-line-chart_panning{pointer-events:none}.u-tooltip{grid-gap:16px;word-wrap:break-word;background:rgba(97,97,97,.92);border-radius:8px;color:#fff;display:none;font-family:monospace;font-size:10px;font-weight:400;line-height:1.4;max-width:300px;padding:8px;position:absolute;z-index:100}.u-tooltip-data{align-items:center;display:flex;flex-wrap:wrap;line-height:150%}.u-tooltip-data__value{font-weight:700;padding:4px}.u-tooltip__info{grid-gap:4px;display:grid}.u-tooltip__marker{height:12px;margin-right:8px;width:12px}.vm-legend-item{grid-gap:8px;align-items:start;background-color:var(--color-background-block);cursor:pointer;display:grid;grid-template-columns:auto auto;justify-content:start;padding:8px 48px 8px 8px;transition:.2s ease}.vm-legend-item:hover{background-color:rgba(0,0,0,.1)}.vm-legend-item_hide{opacity:.5;text-decoration:line-through}.vm-legend-item__marker{border-radius:2px;box-sizing:border-box;height:14px;transition:.2s ease;width:14px}.vm-legend-item-info{font-weight:400}.vm-legend-item-info__free-fields{cursor:pointer;padding:3px}.vm-legend-item-info__free-fields:hover{text-decoration:underline}.vm-legend-item-info__free-fields:not(:last-child):after{content:","}.vm-legend{cursor:default;display:flex;flex-wrap:wrap;margin-top:24px;position:relative}.vm-legend-group{margin:0 16px 16px 0;min-width:23%}.vm-legend-group-title{align-items:center;border-bottom:1px solid hsla(0,6%,6%,.15);display:flex;margin-bottom:1px;padding:0 8px 8px}.vm-legend-group-title__count{font-weight:700;margin-right:8px}.vm-graph-view{width:100%}.vm-graph-view_full-width{width:calc(100vw - 96px - var(--scrollbar-width))}.vm-query-editor-autocomplete{max-height:300px;overflow:auto}.vm-additional-settings{align-items:center;display:inline-flex;flex-wrap:wrap;gap:24px;justify-content:flex-start}.vm-additional-settings__input{flex-basis:160px;margin-bottom:-6px}.vm-switch{align-items:center;cursor:pointer;display:flex;justify-content:flex-start}.vm-switch_disabled{cursor:default;opacity:.6}.vm-switch_secondary_active .vm-switch-track{background-color:var(--color-secondary)}.vm-switch_primary_active .vm-switch-track{background-color:var(--color-primary)}.vm-switch_active .vm-switch-track__thumb{left:20px}.vm-switch:hover .vm-switch-track{opacity:.8}.vm-switch-track{align-items:center;background-color:hsla(0,6%,6%,.4);border-radius:17px;display:flex;height:17px;justify-content:flex-start;padding:3px;position:relative;transition:background-color .2s ease,opacity .3s ease-out;width:34px}.vm-switch-track__thumb{background-color:var(--color-background-block);border-radius:50%;left:3px;min-height:11px;min-width:11px;position:absolute;top:auto;-webkit-transform-style:preserve-3d;transform-style:preserve-3d;transition:right .2s ease-out,left .2s ease-out}.vm-switch__label{color:inherit;font-size:inherit;margin-left:8px;transition:color .2s ease;white-space:nowrap}.vm-query-configurator{grid-gap:8px;display:grid;gap:8px}.vm-query-configurator-list{display:grid}.vm-query-configurator-list-row{grid-gap:8px;align-items:center;display:grid;gap:8px;grid-template-columns:1fr auto auto}.vm-query-configurator-list-row_disabled{-webkit-filter:grayscale(100%);filter:grayscale(100%);opacity:.5}.vm-query-configurator-list-row__button{display:grid;min-height:36px;width:36px}.vm-query-configurator-settings{align-items:flex-end;display:flex;gap:24px;justify-content:space-between}.vm-query-configurator-settings__buttons{grid-gap:8px;display:grid;gap:8px;grid-template-columns:repeat(2,auto)}.vm-json-view__copy{display:flex;justify-content:flex-end;position:-webkit-sticky;position:sticky;top:24px;z-index:2}.vm-json-view__code{font-size:12px;line-height:1.4;-webkit-transform:translateY(-32px);transform:translateY(-32px)}.vm-axes-limits{max-width:300px}.vm-axes-limits,.vm-axes-limits-list{grid-gap:16px;align-items:center;display:grid;gap:16px}.vm-axes-limits-list__inputs{grid-gap:8px;display:grid;gap:8px;grid-template-columns:repeat(2,120px)}.vm-graph-settings-popper{grid-gap:16px;display:grid;gap:16px;padding:0 0 16px}.vm-graph-settings-popper__body{grid-gap:8px;display:grid;gap:8px;padding:0 16px}.vm-spinner{align-items:center;-webkit-animation:vm-fade 2s cubic-bezier(.28,.84,.42,1.1);animation:vm-fade 2s cubic-bezier(.28,.84,.42,1.1);background-color:hsla(0,0%,100%,.5);bottom:0;display:flex;flex-direction:column;justify-content:center;left:0;pointer-events:none;position:fixed;right:0;top:0;z-index:99}.vm-spinner__message{color:hsla(0,6%,6%,.9);font-size:14px;line-height:1.3;margin-top:24px;text-align:center;white-space:pre-line}.half-circle-spinner,.half-circle-spinner *{box-sizing:border-box}.half-circle-spinner{border-radius:100%;height:60px;position:relative;width:60px}.half-circle-spinner .circle{border:6px solid transparent;border-radius:100%;content:"";height:100%;position:absolute;width:100%}.half-circle-spinner .circle.circle-1{-webkit-animation:half-circle-spinner-animation 1s infinite;animation:half-circle-spinner-animation 1s infinite;border-top-color:var(--color-primary)}.half-circle-spinner .circle.circle-2{-webkit-animation:half-circle-spinner-animation 1s infinite alternate;animation:half-circle-spinner-animation 1s infinite alternate;border-bottom-color:var(--color-primary)}@-webkit-keyframes half-circle-spinner-animation{0%{-webkit-transform:rotate(0deg);transform:rotate(0deg)}to{-webkit-transform:rotate(1turn);transform:rotate(1turn)}}@keyframes half-circle-spinner-animation{0%{-webkit-transform:rotate(0deg);transform:rotate(0deg)}to{-webkit-transform:rotate(1turn);transform:rotate(1turn)}}@-webkit-keyframes vm-fade{0%{opacity:0}to{opacity:1}}@keyframes vm-fade{0%{opacity:0}to{opacity:1}}.vm-tracings-view{grid-gap:24px;display:grid;gap:24px}.vm-tracings-view-trace-header{align-items:center;border-bottom:1px solid hsla(0,6%,6%,.15);display:flex;justify-content:space-between;padding:8px 8px 8px 24px}.vm-tracings-view-trace-header-title{font-size:14px;margin-right:8px}.vm-tracings-view-trace-header-title__query{font-weight:700}.vm-tracings-view-trace__nav{padding:24px 24px 24px 0}.vm-line-progress{grid-gap:8px;align-items:center;color:hsla(0,6%,6%,.6);display:grid;gap:8px;grid-template-columns:1fr auto;justify-content:center}.vm-line-progress-track{background-color:hsla(0,6%,6%,.05);border-radius:4px;height:20px;width:100%}.vm-line-progress-track__thumb{background-color:#1a90ff;border-radius:4px;height:100%}.vm-nested-nav{background-color:rgba(201,227,246,.4);border-radius:4px;margin-left:24px}.vm-nested-nav-header{grid-gap:8px;border-radius:4px;cursor:pointer;display:grid;gap:8px;grid-template-columns:auto 1fr;padding:8px;transition:background-color .2s ease-in-out}.vm-nested-nav-header:hover{background-color:hsla(0,6%,6%,.06)}.vm-nested-nav-header__icon{align-items:center;display:flex;justify-content:center;transition:-webkit-transform .2s ease-in-out;transition:transform .2s ease-in-out;transition:transform .2s ease-in-out,-webkit-transform .2s ease-in-out;width:20px}.vm-nested-nav-header__icon_open{-webkit-transform:rotate(180deg);transform:rotate(180deg)}.vm-nested-nav-header__message,.vm-nested-nav-header__progress{grid-column:2}.vm-nested-nav-header__duration{color:hsla(0,6%,6%,.6);grid-column:2}.vm-table-settings-popper{display:grid}.vm-table-settings-popper-list{grid-gap:8px;display:grid;gap:8px;max-height:350px;overflow:auto;padding:16px 16px 24px}.vm-table-settings-popper-list__item{font-size:12px;text-transform:capitalize}.vm-table-settings-popper__footer{align-items:center;display:inline-grid;gap:8px;grid-template-columns:1fr 1fr;justify-content:center;min-width:200px;padding:0 16px 16px}.vm-checkbox{align-items:center;cursor:pointer;display:flex;justify-content:flex-start;-webkit-user-select:none;user-select:none}.vm-checkbox_disabled{cursor:default;opacity:.6}.vm-checkbox_secondary_active .vm-checkbox-track{background-color:var(--color-secondary)}.vm-checkbox_secondary .vm-checkbox-track{border:1px solid var(--color-secondary)}.vm-checkbox_primary_active .vm-checkbox-track{background-color:var(--color-primary)}.vm-checkbox_primary .vm-checkbox-track{border:1px solid var(--color-primary)}.vm-checkbox_active .vm-checkbox-track__thumb{-webkit-transform:scale(1);transform:scale(1)}.vm-checkbox:hover .vm-checkbox-track{opacity:.8}.vm-checkbox-track{align-items:center;background-color:transparent;border-radius:4px;display:flex;height:16px;justify-content:center;padding:2px;position:relative;transition:background-color .2s ease,opacity .3s ease-out;width:16px}.vm-checkbox-track__thumb{align-items:center;color:#fff;display:grid;height:12px;justify-content:center;-webkit-transform:scale(0);transform:scale(0);transition:-webkit-transform .1s ease-in-out;transition:transform .1s ease-in-out;transition:transform .1s ease-in-out,-webkit-transform .1s ease-in-out;width:12px}.vm-checkbox-track__thumb svg{width:100%}.vm-checkbox__label{color:inherit;font-size:inherit;margin-left:8px;transition:color .2s ease;white-space:nowrap}.vm-custom-panel{grid-gap:24px;align-items:flex-start;display:grid;gap:24px;height:100%}.vm-custom-panel-body{position:relative}.vm-custom-panel-body-header{display:flex;font-size:10px;justify-content:space-between;margin:-24px -24px 24px;padding:0 24px;position:relative;z-index:1}.vm-custom-panel-body-header,.vm-predefined-panel-header{align-items:center;border-bottom:1px solid hsla(0,6%,6%,.15)}.vm-predefined-panel-header{grid-gap:8px;display:grid;gap:8px;grid-template-columns:auto 1fr 160px auto;justify-content:flex-start;padding:8px 16px}.vm-predefined-panel-header__description{line-height:1.3;white-space:pre-wrap}.vm-predefined-panel-header__description ol,.vm-predefined-panel-header__description ul{list-style-position:inside}.vm-predefined-panel-header__description a{color:#c9e3f6;text-decoration:underline}.vm-predefined-panel-header__info{align-items:center;color:var(--color-primary);display:flex;justify-content:center;width:18px}.vm-predefined-panel-body{padding:8px 16px}.vm-accordion-header{align-items:center;cursor:pointer;display:grid;font-size:inherit;position:relative}.vm-accordion-header__arrow{align-items:center;display:flex;justify-content:center;position:absolute;right:14px;top:auto;-webkit-transform:rotate(0);transform:rotate(0);transition:-webkit-transform .2s ease-in-out;transition:transform .2s ease-in-out;transition:transform .2s ease-in-out,-webkit-transform .2s ease-in-out}.vm-accordion-header__arrow_open{-webkit-transform:rotate(180deg);transform:rotate(180deg)}.vm-accordion-header__arrow svg{height:auto;width:14px}.accordion-section{overflow:hidden}.vm-predefined-dashboard{background-color:transparent}.vm-predefined-dashboard-header{align-items:center;border-radius:4px;box-shadow:1px 2px 12px hsla(0,6%,6%,.08);display:grid;font-weight:700;grid-template-columns:1fr auto;justify-content:space-between;line-height:14px;overflow:hidden;padding:16px;position:relative;-webkit-transform-style:preserve-3d;transform-style:preserve-3d;transition:box-shadow .2s ease-in-out}.vm-predefined-dashboard-header_open{border-radius:4px 4px 0 0;box-shadow:none}.vm-predefined-dashboard-header__title{font-size:12px}.vm-predefined-dashboard-header__count{font-size:10px;grid-column:2;margin-right:30px}.vm-predefined-dashboard-panels{grid-gap:16px;display:grid;gap:16px;grid-template-columns:repeat(12,1fr);padding:0}.vm-predefined-dashboard-panels-panel{border-radius:8px;overflow:hidden;position:relative}.vm-predefined-dashboard-panels-panel:hover .vm-predefined-dashboard-panels-panel__resizer{-webkit-transform:scale(1);transform:scale(1)}.vm-predefined-dashboard-panels-panel__resizer{bottom:0;cursor:se-resize;height:20px;position:absolute;right:0;-webkit-transform:scale(0);transform:scale(0);transition:-webkit-transform .2s ease-in-out;transition:transform .2s ease-in-out;transition:transform .2s ease-in-out,-webkit-transform .2s ease-in-out;width:20px;z-index:1}.vm-predefined-dashboard-panels-panel__resizer:after{border-bottom:2px solid hsla(0,6%,6%,.2);border-right:2px solid hsla(0,6%,6%,.2);bottom:5px;content:"";height:5px;position:absolute;right:5px;width:5px}.vm-predefined-dashboard-panels-panel__alert{grid-column:span 12}.vm-predefined-panels{grid-gap:16px;align-items:flex-start;display:grid;gap:16px}.vm-predefined-panels-tabs{align-items:center;display:flex;font-size:10px;justify-content:flex-start;overflow:hidden}.vm-predefined-panels-tabs__tab{border-right:1px solid hsla(0,6%,6%,.15);cursor:pointer;padding:16px;text-transform:uppercase;transition:opacity .2s ease-in-out,color .15s ease-in}.vm-predefined-panels-tabs__tab:hover{opacity:1}.vm-predefined-panels__dashboards{grid-gap:16px;display:grid;gap:16px}.vm-cardinality-configurator{grid-gap:8px;display:grid;gap:8px}.vm-cardinality-configurator-controls{align-items:center;display:flex;flex-wrap:wrap;gap:0 24px;justify-content:flex-start}.vm-cardinality-configurator-controls__query{flex-grow:1}.vm-cardinality-configurator-bottom{grid-gap:24px;align-items:flex-end;display:grid;gap:24px;grid-template-columns:1fr auto}.vm-cardinality-configurator-bottom__info{font-size:12px}.u-legend{color:#110f0f;font-family:Lato,sans-serif;font-size:14px}.u-legend .u-thead{display:none}.u-legend .u-series{display:flex;gap:8px}.u-legend .u-series th{display:none}.u-legend .u-series td:nth-child(2):after{content:":";margin-left:8px}.u-legend .u-series .u-value{display:block;padding:0;text-align:left}.vm-metrics-content-header{margin:-24px -24px 24px}.vm-cardinality-panel{grid-gap:24px;align-items:flex-start;display:grid;gap:24px}.vm-top-queries-panel-header{margin:-24px -24px 24px}.vm-top-queries{grid-gap:24px;align-items:flex-start;display:grid;gap:24px}.vm-top-queries-controls{grid-gap:8px;display:grid;gap:8px}.vm-top-queries-controls-bottom,.vm-top-queries-controls__fields{grid-gap:24px;display:grid;gap:24px;grid-template-columns:1fr auto}.vm-top-queries-controls-bottom{align-items:flex-end;justify-content:space-between}.vm-top-queries-controls-bottom__button{align-items:center;display:flex;justify-content:flex-end}.vm-top-queries-panels{grid-gap:24px;display:grid;gap:24px}#root,body,html{background-attachment:fixed;background-repeat:no-repeat;color:#110f0f;cursor:default;font-family:Lato,sans-serif;font-size:12px;margin:0;min-height:100%}body{overflow:scroll}*{cursor:inherit;font:inherit}code{font-family:JetBrains Mono,monospace}b{font-weight:700}input[type=number]::-webkit-inner-spin-button,input[type=number]::-webkit-outer-spin-button{-webkit-appearance:none;margin:0}.vm-snackbar{bottom:16px;left:16px;position:fixed;z-index:9}a,abbr,acronym,address,applet,article,aside,audio,big,body,canvas,caption,center,cite,code,del,details,dfn,div,em,embed,fieldset,figcaption,figure,footer,form,h1,h2,h3,h4,h5,h6,header,hgroup,html,iframe,img,ins,kbd,label,legend,li,mark,menu,nav,object,ol,output,p,pre,q,ruby,s,samp,section,small,span,strike,strong,sub,summary,sup,table,tbody,td,tfoot,th,thead,time,tr,tt,u,ul,var,video{border:0;margin:0;padding:0;vertical-align:initial}h1,h2,h3,h4,h5,h6{font-weight:400}article,aside,details,figcaption,figure,footer,header,hgroup,menu,nav,section{display:block}body{line-height:1}q:after,q:before{content:""}table{border-collapse:collapse;border-spacing:0}input::-webkit-input-placeholder{opacity:1;-webkit-transition:opacity .3s ease;transition:opacity .3s ease}input::placeholder{opacity:1;transition:opacity .3s ease}input:focus::-webkit-input-placeholder{opacity:0;-webkit-transition:opacity .3s ease;transition:opacity .3s ease}input:focus::placeholder{opacity:0;transition:opacity .3s ease}*{box-sizing:border-box;outline:none}button{background:none;border:none;border-radius:0;padding:0}strong{letter-spacing:1px}input[type=file]{cursor:pointer;font-size:0;height:100%;left:0;opacity:0;position:absolute;top:0;width:100%}input[type=file]:disabled{cursor:not-allowed}a{color:inherit;text-decoration:inherit}input,textarea{-webkit-text-fill-color:inherit;appearance:none;-webkit-appearance:none}input:disabled,textarea:disabled{opacity:1!important}input:placeholder-shown,textarea:placeholder-shown{width:100%}input:-webkit-autofill,input:-webkit-autofill:active,input:-webkit-autofill:focus,input:-webkit-autofill:hover{-webkit-box-shadow:inset 0 0 0 0 #fff!important;width:100%;z-index:2}.vm-header-button{border:1px solid hsla(0,6%,6%,.2)}.vm-list__item{background-color:transparent;cursor:pointer;padding:12px 16px;transition:background-color .2s ease}.vm-list__item:hover,.vm-list__item_active{background-color:hsla(0,6%,6%,.1)}.vm-popper-header{grid-gap:8px;align-items:center;background-color:#3f51b5;background-color:var(--color-primary);border-radius:4px 4px 0 0;color:#fff;display:grid;gap:8px;grid-template-columns:1fr auto;justify-content:space-between;padding:8px 8px 8px 16px}.vm-popper-header__title{font-weight:700}.vm-block{background-color:#fff;background-color:var(--color-background-block);border-radius:8px;box-shadow:1px 2px 12px hsla(0,6%,6%,.08);padding:24px}.vm-block_empty-padding{padding:0}.vm-section-header{align-items:center;border-bottom:1px solid hsla(0,6%,6%,.15);border-radius:8px 8px 0 0;display:grid;grid-template-columns:1fr auto;justify-content:center;padding:0 24px}.vm-section-header__title{font-size:12px;font-weight:700}.vm-section-header__tabs{align-items:center;display:flex;font-size:10px;justify-content:flex-start}.vm-table{border-collapse:initial;border-spacing:0;margin-top:-24px;width:100%}.vm-table,.vm-table__row{background-color:#fff;background-color:var(--color-background-block)}.vm-table__row{transition:background-color .2s ease}.vm-table__row:hover:not(.vm-table__row_header){background-color:hsla(0,6%,6%,.05)}.vm-table__row_header{position:-webkit-sticky;position:sticky;top:0;z-index:2}.vm-table__row_selected{background-color:rgba(26,144,255,.05)}.vm-table-cell{border-bottom:1px solid hsla(0,6%,6%,.15);height:40px;padding:8px;vertical-align:middle}.vm-table-cell__content{align-items:center;display:flex;justify-content:flex-start}.vm-table-cell_sort{cursor:pointer}.vm-table-cell_sort:hover{background-color:hsla(0,6%,6%,.05)}.vm-table-cell_header{font-weight:700;text-align:left;text-transform:capitalize}.vm-table-cell_gray{color:hsla(0,6%,6%,.4)}.vm-table-cell_right{text-align:right}.vm-table-cell_right .vm-table-cell__content{justify-content:flex-end}.vm-table-cell_no-wrap{white-space:nowrap}.vm-table__sort-icon{align-items:center;display:flex;justify-content:center;margin:0 8px;opacity:.4;transition:opacity .2s ease,-webkit-transform .2s ease-in-out;transition:opacity .2s ease,transform .2s ease-in-out;transition:opacity .2s ease,transform .2s ease-in-out,-webkit-transform .2s ease-in-out;width:15px}.vm-table__sort-icon_active{opacity:1}.vm-table__sort-icon_desc{-webkit-transform:rotate(180deg);transform:rotate(180deg)}:root{--color-primary:#3f51b5;--color-secondary:#e91e63;--color-error:#fd080e;--color-warning:#ff8308;--color-info:#03a9f4;--color-success:#4caf50;--color-primary-text:#fff;--color-secondary-text:#fff;--color-error-text:#fff;--color-warning-text:#fff;--color-info-text:#fff;--color-success-text:#fff;--color-background-body:#fefeff;--color-background-block:#fff} \ No newline at end of file diff --git a/app/vmselect/vmui/static/js/main.d0509bc3.js b/app/vmselect/vmui/static/js/main.d0509bc3.js deleted file mode 100644 index d6bfaceaa..000000000 --- a/app/vmselect/vmui/static/js/main.d0509bc3.js +++ /dev/null @@ -1,2 +0,0 @@ -/*! For license information please see main.d0509bc3.js.LICENSE.txt */ -!function(){var e={680:function(e,t,n){"use strict";var r=n(476),i=n(962),o=i(r("String.prototype.indexOf"));e.exports=function(e,t){var n=r(e,!!t);return"function"===typeof n&&o(e,".prototype.")>-1?i(n):n}},962:function(e,t,n){"use strict";var r=n(199),i=n(476),o=i("%Function.prototype.apply%"),a=i("%Function.prototype.call%"),u=i("%Reflect.apply%",!0)||r.call(a,o),l=i("%Object.getOwnPropertyDescriptor%",!0),c=i("%Object.defineProperty%",!0),s=i("%Math.max%");if(c)try{c({},"a",{value:1})}catch(d){c=null}e.exports=function(e){var t=u(r,a,arguments);if(l&&c){var n=l(t,"length");n.configurable&&c(t,"length",{value:1+s(0,e.length-(arguments.length-1))})}return t};var f=function(){return u(r,o,arguments)};c?c(e.exports,"apply",{value:f}):e.exports.apply=f},123:function(e,t){var n;!function(){"use strict";var r={}.hasOwnProperty;function i(){for(var e=[],t=0;t=t?e:""+Array(t+1-r.length).join(n)+e},g={s:y,z:function(e){var t=-e.utcOffset(),n=Math.abs(t),r=Math.floor(n/60),i=n%60;return(t<=0?"+":"-")+y(r,2,"0")+":"+y(i,2,"0")},m:function e(t,n){if(t.date()1)return e(a[0])}else{var u=t.name;b[u]=t,i=u}return!r&&i&&(_=i),i||!r&&_},x=function(e,t){if(D(e))return e.clone();var n="object"==typeof t?t:{};return n.date=e,n.args=arguments,new C(n)},k=g;k.l=w,k.i=D,k.w=function(e,t){return x(e,{locale:t.$L,utc:t.$u,x:t.$x,$offset:t.$offset})};var C=function(){function m(e){this.$L=w(e.locale,null,!0),this.parse(e)}var y=m.prototype;return y.parse=function(e){this.$d=function(e){var t=e.date,n=e.utc;if(null===t)return new Date(NaN);if(k.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 i=r[2]-1||0,o=(r[7]||"0").substring(0,3);return n?new Date(Date.UTC(r[1],i,r[3]||1,r[4]||0,r[5]||0,r[6]||0,o)):new Date(r[1],i,r[3]||1,r[4]||0,r[5]||0,r[6]||0,o)}}return new Date(t)}(e),this.$x=e.x||{},this.init()},y.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()},y.$utils=function(){return k},y.isValid=function(){return!(this.$d.toString()===h)},y.isSame=function(e,t){var n=x(e);return this.startOf(t)<=n&&n<=this.endOf(t)},y.isAfter=function(e,t){return x(e)1&&"boolean"!==typeof t)throw new a('"allowMissing" argument must be a boolean');if(null===k(/^%?[^%]*%?$/,e))throw new i("`%` may not be present anywhere but at the beginning and end of the intrinsic name");var n=A(e),r=n.length>0?n[0]:"",o=S("%"+r+"%",t),u=o.name,c=o.value,s=!1,f=o.alias;f&&(r=f[0],D(n,b([0,1],f)));for(var d=1,h=!0;d=n.length){var g=l(c,p);c=(h=!!g)&&"get"in g&&!("originalValue"in g.get)?g.get:c[p]}else h=_(c,p),c=c[p];h&&!s&&(v[u]=c)}}return c}},520:function(e,t,n){"use strict";var r="undefined"!==typeof Symbol&&Symbol,i=n(541);e.exports=function(){return"function"===typeof r&&("function"===typeof Symbol&&("symbol"===typeof r("foo")&&("symbol"===typeof Symbol("bar")&&i())))}},541:function(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 i=Object.getOwnPropertyDescriptor(e,t);if(42!==i.value||!0!==i.enumerable)return!1}return!0}},838:function(e,t,n){"use strict";var r=n(199);e.exports=r.call(Function.call,Object.prototype.hasOwnProperty)},936:function(e,t,n){var r=/^\s+|\s+$/g,i=/^[-+]0x[0-9a-f]+$/i,o=/^0b[01]+$/i,a=/^0o[0-7]+$/i,u=parseInt,l="object"==typeof n.g&&n.g&&n.g.Object===Object&&n.g,c="object"==typeof self&&self&&self.Object===Object&&self,s=l||c||Function("return this")(),f=Object.prototype.toString,d=Math.max,h=Math.min,p=function(){return s.Date.now()};function v(e){var t=typeof e;return!!e&&("object"==t||"function"==t)}function m(e){if("number"==typeof e)return e;if(function(e){return"symbol"==typeof e||function(e){return!!e&&"object"==typeof e}(e)&&"[object Symbol]"==f.call(e)}(e))return NaN;if(v(e)){var t="function"==typeof e.valueOf?e.valueOf():e;e=v(t)?t+"":t}if("string"!=typeof e)return 0===e?e:+e;e=e.replace(r,"");var n=o.test(e);return n||a.test(e)?u(e.slice(2),n?2:8):i.test(e)?NaN:+e}e.exports=function(e,t,n){var r,i,o,a,u,l,c=0,s=!1,f=!1,y=!0;if("function"!=typeof e)throw new TypeError("Expected a function");function g(t){var n=r,o=i;return r=i=void 0,c=t,a=e.apply(o,n)}function _(e){return c=e,u=setTimeout(D,t),s?g(e):a}function b(e){var n=e-l;return void 0===l||n>=t||n<0||f&&e-c>=o}function D(){var e=p();if(b(e))return w(e);u=setTimeout(D,function(e){var n=t-(e-l);return f?h(n,o-(e-c)):n}(e))}function w(e){return u=void 0,y&&r?g(e):(r=i=void 0,a)}function x(){var e=p(),n=b(e);if(r=arguments,i=this,l=e,n){if(void 0===u)return _(l);if(f)return u=setTimeout(D,t),g(l)}return void 0===u&&(u=setTimeout(D,t)),a}return t=m(t)||0,v(n)&&(s=!!n.leading,o=(f="maxWait"in n)?d(m(n.maxWait)||0,t):o,y="trailing"in n?!!n.trailing:y),x.cancel=function(){void 0!==u&&clearTimeout(u),c=0,r=l=i=u=void 0},x.flush=function(){return void 0===u?a:w(p())},x}},7:function(e,t,n){var r="__lodash_hash_undefined__",i="[object Function]",o="[object GeneratorFunction]",a=/\.|\[(?:[^[\]]*|(["'])(?:(?!\1)[^\\]|\\.)*?\1)\]/,u=/^\w*$/,l=/^\./,c=/[^.[\]]+|\[(?:(-?\d+(?:\.\d+)?)|(["'])((?:(?!\2)[^\\]|\\.)*?)\2)\]|(?=(?:\.|\[\])(?:\.|\[\]|$))/g,s=/\\(\\)?/g,f=/^\[object .+?Constructor\]$/,d="object"==typeof n.g&&n.g&&n.g.Object===Object&&n.g,h="object"==typeof self&&self&&self.Object===Object&&self,p=d||h||Function("return this")();var v=Array.prototype,m=Function.prototype,y=Object.prototype,g=p["__core-js_shared__"],_=function(){var e=/[^.]+$/.exec(g&&g.keys&&g.keys.IE_PROTO||"");return e?"Symbol(src)_1."+e:""}(),b=m.toString,D=y.hasOwnProperty,w=y.toString,x=RegExp("^"+b.call(D).replace(/[\\^$.*+?()[\]{}|]/g,"\\$&").replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g,"$1.*?")+"$"),k=p.Symbol,C=v.splice,E=$(p,"Map"),A=$(Object,"create"),S=k?k.prototype:void 0,F=S?S.toString:void 0;function N(e){var t=-1,n=e?e.length:0;for(this.clear();++t-1},O.prototype.set=function(e,t){var n=this.__data__,r=B(n,e);return r<0?n.push([e,t]):n[r][1]=t,this},T.prototype.clear=function(){this.__data__={hash:new N,map:new(E||O),string:new N}},T.prototype.delete=function(e){return P(this,e).delete(e)},T.prototype.get=function(e){return P(this,e).get(e)},T.prototype.has=function(e){return P(this,e).has(e)},T.prototype.set=function(e,t){return P(this,e).set(e,t),this};var R=j((function(e){var t;e=null==(t=e)?"":function(e){if("string"==typeof e)return e;if(H(e))return F?F.call(e):"";var t=e+"";return"0"==t&&1/e==-1/0?"-0":t}(t);var n=[];return l.test(e)&&n.push(""),e.replace(c,(function(e,t,r,i){n.push(r?i.replace(s,"$1"):t||e)})),n}));function I(e){if("string"==typeof e||H(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 n(){var r=arguments,i=t?t.apply(this,r):r[0],o=n.cache;if(o.has(i))return o.get(i);var a=e.apply(this,r);return n.cache=o.set(i,a),a};return n.cache=new(j.Cache||T),n}j.Cache=T;var z=Array.isArray;function U(e){var t=typeof e;return!!e&&("object"==t||"function"==t)}function H(e){return"symbol"==typeof e||function(e){return!!e&&"object"==typeof e}(e)&&"[object Symbol]"==w.call(e)}e.exports=function(e,t,n){var r=null==e?void 0:M(e,t);return void 0===r?n:r}},61:function(e,t,n){var r="Expected a function",i=/^\s+|\s+$/g,o=/^[-+]0x[0-9a-f]+$/i,a=/^0b[01]+$/i,u=/^0o[0-7]+$/i,l=parseInt,c="object"==typeof n.g&&n.g&&n.g.Object===Object&&n.g,s="object"==typeof self&&self&&self.Object===Object&&self,f=c||s||Function("return this")(),d=Object.prototype.toString,h=Math.max,p=Math.min,v=function(){return f.Date.now()};function m(e,t,n){var i,o,a,u,l,c,s=0,f=!1,d=!1,m=!0;if("function"!=typeof e)throw new TypeError(r);function _(t){var n=i,r=o;return i=o=void 0,s=t,u=e.apply(r,n)}function b(e){return s=e,l=setTimeout(w,t),f?_(e):u}function D(e){var n=e-c;return void 0===c||n>=t||n<0||d&&e-s>=a}function w(){var e=v();if(D(e))return x(e);l=setTimeout(w,function(e){var n=t-(e-c);return d?p(n,a-(e-s)):n}(e))}function x(e){return l=void 0,m&&i?_(e):(i=o=void 0,u)}function k(){var e=v(),n=D(e);if(i=arguments,o=this,c=e,n){if(void 0===l)return b(c);if(d)return l=setTimeout(w,t),_(c)}return void 0===l&&(l=setTimeout(w,t)),u}return t=g(t)||0,y(n)&&(f=!!n.leading,a=(d="maxWait"in n)?h(g(n.maxWait)||0,t):a,m="trailing"in n?!!n.trailing:m),k.cancel=function(){void 0!==l&&clearTimeout(l),s=0,i=c=o=l=void 0},k.flush=function(){return void 0===l?u:x(v())},k}function y(e){var t=typeof e;return!!e&&("object"==t||"function"==t)}function g(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(y(e)){var t="function"==typeof e.valueOf?e.valueOf():e;e=y(t)?t+"":t}if("string"!=typeof e)return 0===e?e:+e;e=e.replace(i,"");var n=a.test(e);return n||u.test(e)?l(e.slice(2),n?2:8):o.test(e)?NaN:+e}e.exports=function(e,t,n){var i=!0,o=!0;if("function"!=typeof e)throw new TypeError(r);return y(n)&&(i="leading"in n?!!n.leading:i,o="trailing"in n?!!n.trailing:o),m(e,t,{leading:i,maxWait:t,trailing:o})}},154:function(e,t,n){var r="function"===typeof Map&&Map.prototype,i=Object.getOwnPropertyDescriptor&&r?Object.getOwnPropertyDescriptor(Map.prototype,"size"):null,o=r&&i&&"function"===typeof i.get?i.get:null,a=r&&Map.prototype.forEach,u="function"===typeof Set&&Set.prototype,l=Object.getOwnPropertyDescriptor&&u?Object.getOwnPropertyDescriptor(Set.prototype,"size"):null,c=u&&l&&"function"===typeof l.get?l.get:null,s=u&&Set.prototype.forEach,f="function"===typeof WeakMap&&WeakMap.prototype?WeakMap.prototype.has:null,d="function"===typeof WeakSet&&WeakSet.prototype?WeakSet.prototype.has:null,h="function"===typeof WeakRef&&WeakRef.prototype?WeakRef.prototype.deref:null,p=Boolean.prototype.valueOf,v=Object.prototype.toString,m=Function.prototype.toString,y=String.prototype.match,g=String.prototype.slice,_=String.prototype.replace,b=String.prototype.toUpperCase,D=String.prototype.toLowerCase,w=RegExp.prototype.test,x=Array.prototype.concat,k=Array.prototype.join,C=Array.prototype.slice,E=Math.floor,A="function"===typeof BigInt?BigInt.prototype.valueOf:null,S=Object.getOwnPropertySymbols,F="function"===typeof Symbol&&"symbol"===typeof Symbol.iterator?Symbol.prototype.toString:null,N="function"===typeof Symbol&&"object"===typeof Symbol.iterator,O="function"===typeof Symbol&&Symbol.toStringTag&&(typeof Symbol.toStringTag===N||"symbol")?Symbol.toStringTag:null,T=Object.prototype.propertyIsEnumerable,B=("function"===typeof Reflect?Reflect.getPrototypeOf:Object.getPrototypeOf)||([].__proto__===Array.prototype?function(e){return e.__proto__}:null);function M(e,t){if(e===1/0||e===-1/0||e!==e||e&&e>-1e3&&e<1e3||w.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 i=String(r),o=g.call(t,i.length+1);return _.call(i,n,"$&_")+"."+_.call(_.call(o,/([0-9]{3})/g,"$&_"),/_$/,"")}}return _.call(t,n,"$&_")}var L=n(654),P=L.custom,$=U(P)?P:null;function R(e,t,n){var r="double"===(n.quoteStyle||t)?'"':"'";return r+e+r}function I(e){return _.call(String(e),/"/g,""")}function j(e){return"[object Array]"===V(e)&&(!O||!("object"===typeof e&&O in e))}function z(e){return"[object RegExp]"===V(e)&&(!O||!("object"===typeof e&&O in e))}function U(e){if(N)return e&&"object"===typeof e&&e instanceof Symbol;if("symbol"===typeof e)return!0;if(!e||"object"!==typeof e||!F)return!1;try{return F.call(e),!0}catch(t){}return!1}e.exports=function e(t,n,r,i){var u=n||{};if(Y(u,"quoteStyle")&&"single"!==u.quoteStyle&&"double"!==u.quoteStyle)throw new TypeError('option "quoteStyle" must be "single" or "double"');if(Y(u,"maxStringLength")&&("number"===typeof u.maxStringLength?u.maxStringLength<0&&u.maxStringLength!==1/0:null!==u.maxStringLength))throw new TypeError('option "maxStringLength", if provided, must be a positive integer, Infinity, or `null`');var l=!Y(u,"customInspect")||u.customInspect;if("boolean"!==typeof l&&"symbol"!==l)throw new TypeError("option \"customInspect\", if provided, must be `true`, `false`, or `'symbol'`");if(Y(u,"indent")&&null!==u.indent&&"\t"!==u.indent&&!(parseInt(u.indent,10)===u.indent&&u.indent>0))throw new TypeError('option "indent" must be "\\t", an integer > 0, or `null`');if(Y(u,"numericSeparator")&&"boolean"!==typeof u.numericSeparator)throw new TypeError('option "numericSeparator", if provided, must be `true` or `false`');var v=u.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,u);if("number"===typeof t){if(0===t)return 1/0/t>0?"0":"-0";var b=String(t);return v?M(t,b):b}if("bigint"===typeof t){var w=String(t)+"n";return v?M(t,w):w}var E="undefined"===typeof u.depth?5:u.depth;if("undefined"===typeof r&&(r=0),r>=E&&E>0&&"object"===typeof t)return j(t)?"[Array]":"[Object]";var S=function(e,t){var n;if("\t"===e.indent)n="\t";else{if(!("number"===typeof e.indent&&e.indent>0))return null;n=k.call(Array(e.indent+1)," ")}return{base:n,prev:k.call(Array(t+1),n)}}(u,r);if("undefined"===typeof i)i=[];else if(q(i,t)>=0)return"[Circular]";function P(t,n,o){if(n&&(i=C.call(i)).push(n),o){var a={depth:u.depth};return Y(u,"quoteStyle")&&(a.quoteStyle=u.quoteStyle),e(t,a,r+1,i)}return e(t,u,r+1,i)}if("function"===typeof t&&!z(t)){var H=function(e){if(e.name)return e.name;var t=y.call(m.call(e),/^function\s*([\w$]+)/);if(t)return t[1];return null}(t),Q=X(t,P);return"[Function"+(H?": "+H:" (anonymous)")+"]"+(Q.length>0?" { "+k.call(Q,", ")+" }":"")}if(U(t)){var ee=N?_.call(String(t),/^(Symbol\(.*\))_[^)]*$/,"$1"):F.call(t);return"object"!==typeof t||N?ee:G(ee)}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 te="<"+D.call(String(t.nodeName)),ne=t.attributes||[],re=0;re"}if(j(t)){if(0===t.length)return"[]";var ie=X(t,P);return S&&!function(e){for(var t=0;t=0)return!1;return!0}(ie)?"["+K(ie,S)+"]":"[ "+k.call(ie,", ")+" ]"}if(function(e){return"[object Error]"===V(e)&&(!O||!("object"===typeof e&&O in e))}(t)){var oe=X(t,P);return"cause"in Error.prototype||!("cause"in t)||T.call(t,"cause")?0===oe.length?"["+String(t)+"]":"{ ["+String(t)+"] "+k.call(oe,", ")+" }":"{ ["+String(t)+"] "+k.call(x.call("[cause]: "+P(t.cause),oe),", ")+" }"}if("object"===typeof t&&l){if($&&"function"===typeof t[$]&&L)return L(t,{depth:E-r});if("symbol"!==l&&"function"===typeof t.inspect)return t.inspect()}if(function(e){if(!o||!e||"object"!==typeof e)return!1;try{o.call(e);try{c.call(e)}catch(te){return!0}return e instanceof Map}catch(t){}return!1}(t)){var ae=[];return a.call(t,(function(e,n){ae.push(P(n,t,!0)+" => "+P(e,t))})),J("Map",o.call(t),ae,S)}if(function(e){if(!c||!e||"object"!==typeof e)return!1;try{c.call(e);try{o.call(e)}catch(t){return!0}return e instanceof Set}catch(n){}return!1}(t)){var ue=[];return s.call(t,(function(e){ue.push(P(e,t))})),J("Set",c.call(t),ue,S)}if(function(e){if(!f||!e||"object"!==typeof e)return!1;try{f.call(e,f);try{d.call(e,d)}catch(te){return!0}return e instanceof WeakMap}catch(t){}return!1}(t))return Z("WeakMap");if(function(e){if(!d||!e||"object"!==typeof e)return!1;try{d.call(e,d);try{f.call(e,f)}catch(te){return!0}return e instanceof WeakSet}catch(t){}return!1}(t))return Z("WeakSet");if(function(e){if(!h||!e||"object"!==typeof e)return!1;try{return h.call(e),!0}catch(t){}return!1}(t))return Z("WeakRef");if(function(e){return"[object Number]"===V(e)&&(!O||!("object"===typeof e&&O in e))}(t))return G(P(Number(t)));if(function(e){if(!e||"object"!==typeof e||!A)return!1;try{return A.call(e),!0}catch(t){}return!1}(t))return G(P(A.call(t)));if(function(e){return"[object Boolean]"===V(e)&&(!O||!("object"===typeof e&&O in e))}(t))return G(p.call(t));if(function(e){return"[object String]"===V(e)&&(!O||!("object"===typeof e&&O in e))}(t))return G(P(String(t)));if(!function(e){return"[object Date]"===V(e)&&(!O||!("object"===typeof e&&O in e))}(t)&&!z(t)){var le=X(t,P),ce=B?B(t)===Object.prototype:t instanceof Object||t.constructor===Object,se=t instanceof Object?"":"null prototype",fe=!ce&&O&&Object(t)===t&&O in t?g.call(V(t),8,-1):se?"Object":"",de=(ce||"function"!==typeof t.constructor?"":t.constructor.name?t.constructor.name+" ":"")+(fe||se?"["+k.call(x.call([],fe||[],se||[]),": ")+"] ":"");return 0===le.length?de+"{}":S?de+"{"+K(le,S)+"}":de+"{ "+k.call(le,", ")+" }"}return String(t)};var H=Object.prototype.hasOwnProperty||function(e){return e in this};function Y(e,t){return H.call(e,t)}function V(e){return v.call(e)}function q(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(g.call(e,0,t.maxStringLength),t)+r}return R(_.call(_.call(e,/(['\\])/g,"\\$1"),/[\x00-\x1f]/g,Q),"single",t)}function Q(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 G(e){return"Object("+e+")"}function Z(e){return e+" { ? }"}function J(e,t,n,r){return e+" ("+t+") {"+(r?K(n,r):k.call(n,", "))+"}"}function K(e,t){if(0===e.length)return"";var n="\n"+t.prev+t.base;return n+k.call(e,","+n)+"\n"+t.prev}function X(e,t){var n=j(e),r=[];if(n){r.length=e.length;for(var i=0;i-1?e.split(","):e},c=function(e,t,n,r){if(e){var o=n.allowDots?e.replace(/\.([^.[]+)/g,"[$1]"):e,a=/(\[[^[\]]*])/g,u=n.depth>0&&/(\[[^[\]]*])/.exec(o),c=u?o.slice(0,u.index):o,s=[];if(c){if(!n.plainObjects&&i.call(Object.prototype,c)&&!n.allowPrototypes)return;s.push(c)}for(var f=0;n.depth>0&&null!==(u=a.exec(o))&&f=0;--o){var a,u=e[o];if("[]"===u&&n.parseArrays)a=[].concat(i);else{a=n.plainObjects?Object.create(null):{};var c="["===u.charAt(0)&&"]"===u.charAt(u.length-1)?u.slice(1,-1):u,s=parseInt(c,10);n.parseArrays||""!==c?!isNaN(s)&&u!==c&&String(s)===c&&s>=0&&n.parseArrays&&s<=n.arrayLimit?(a=[])[s]=i:"__proto__"!==c&&(a[c]=i):a={0:i}}i=a}return i}(s,t,n,r)}};e.exports=function(e,t){var n=function(e){if(!e)return a;if(null!==e.decoder&&void 0!==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?a.charset:e.charset;return{allowDots:"undefined"===typeof e.allowDots?a.allowDots:!!e.allowDots,allowPrototypes:"boolean"===typeof e.allowPrototypes?e.allowPrototypes:a.allowPrototypes,allowSparse:"boolean"===typeof e.allowSparse?e.allowSparse:a.allowSparse,arrayLimit:"number"===typeof e.arrayLimit?e.arrayLimit:a.arrayLimit,charset:t,charsetSentinel:"boolean"===typeof e.charsetSentinel?e.charsetSentinel:a.charsetSentinel,comma:"boolean"===typeof e.comma?e.comma:a.comma,decoder:"function"===typeof e.decoder?e.decoder:a.decoder,delimiter:"string"===typeof e.delimiter||r.isRegExp(e.delimiter)?e.delimiter:a.delimiter,depth:"number"===typeof e.depth||!1===e.depth?+e.depth:a.depth,ignoreQueryPrefix:!0===e.ignoreQueryPrefix,interpretNumericEntities:"boolean"===typeof e.interpretNumericEntities?e.interpretNumericEntities:a.interpretNumericEntities,parameterLimit:"number"===typeof e.parameterLimit?e.parameterLimit:a.parameterLimit,parseArrays:!1!==e.parseArrays,plainObjects:"boolean"===typeof e.plainObjects?e.plainObjects:a.plainObjects,strictNullHandling:"boolean"===typeof e.strictNullHandling?e.strictNullHandling:a.strictNullHandling}}(t);if(""===e||null===e||"undefined"===typeof e)return n.plainObjects?Object.create(null):{};for(var s="string"===typeof e?function(e,t){var n,c={},s=t.ignoreQueryPrefix?e.replace(/^\?/,""):e,f=t.parameterLimit===1/0?void 0:t.parameterLimit,d=s.split(t.delimiter,f),h=-1,p=t.charset;if(t.charsetSentinel)for(n=0;n-1&&(m=o(m)?[m]:m),i.call(c,v)?c[v]=r.combine(c[v],m):c[v]=m}return c}(e,n):e,f=n.plainObjects?Object.create(null):{},d=Object.keys(s),h=0;h0?C.join(",")||null:void 0}];else if(l(h))M=h;else{var P=Object.keys(C);M=m?P.sort(m):P}for(var $=a&&l(C)&&1===C.length?n+"[]":n,R=0;R0?D+b:""}},837:function(e,t,n){"use strict";var r=n(609),i=Object.prototype.hasOwnProperty,o=Array.isArray,a=function(){for(var e=[],t=0;t<256;++t)e.push("%"+((t<16?"0":"")+t.toString(16)).toUpperCase());return e}(),u=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(o(n)){for(var r=[],i=0;i=48&&s<=57||s>=65&&s<=90||s>=97&&s<=122||o===r.RFC1738&&(40===s||41===s)?l+=u.charAt(c):s<128?l+=a[s]:s<2048?l+=a[192|s>>6]+a[128|63&s]:s<55296||s>=57344?l+=a[224|s>>12]+a[128|s>>6&63]+a[128|63&s]:(c+=1,s=65536+((1023&s)<<10|1023&u.charCodeAt(c)),l+=a[240|s>>18]+a[128|s>>12&63]+a[128|s>>6&63]+a[128|63&s])}return l},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(o(e)){for(var n=[],r=0;r2&&(u.children=arguments.length>3?t.call(arguments,2):r),"function"==typeof e&&null!=e.defaultProps)for(a in e.defaultProps)void 0===u[a]&&(u[a]=e.defaultProps[a]);return p(e,u,i,o,null)}function p(e,t,n,o,a){var u={type:e,props:t,key:n,ref:o,__k:null,__:null,__b:0,__e:null,__d:void 0,__c:null,__h:null,constructor:void 0,__v:null==a?++i:a};return null==a&&null!=r.vnode&&r.vnode(u),u}function v(){return{current:null}}function m(e){return e.children}function y(e,t){this.props=e,this.context=t}function g(e,t){if(null==t)return e.__?g(e.__,e.__.__k.indexOf(e)+1):null;for(var n;t0?p(y.type,y.props,y.key,y.ref?y.ref:null,y.__v):y)){if(y.__=n,y.__b=n.__b+1,null===(v=w[d])||v&&y.key==v.key&&y.type===v.type)w[d]=void 0;else for(h=0;h2&&(u.children=arguments.length>3?t.call(arguments,2):r),p(e.type,u,i||e.key,o||e.ref,null)}function I(e,t){var n={__c:t="__cC"+u++,__: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.shouldComponentUpdate=function(e){this.props.value!==e.value&&n.some(b)},this.sub=function(e){n.push(e);var t=e.componentWillUnmount;e.componentWillUnmount=function(){n.splice(n.indexOf(e),1),t&&t.call(e)}}),e.children}};return n.Provider.__=n.Consumer.contextType=n}t=c.slice,r={__e:function(e,t,n,r){for(var i,o,a;t=t.__;)if((i=t.__c)&&!i.__)try{if((o=i.constructor)&&null!=o.getDerivedStateFromError&&(i.setState(o.getDerivedStateFromError(e)),a=i.__d),null!=i.componentDidCatch&&(i.componentDidCatch(e,r||{}),a=i.__d),a)return i.__E=i}catch(t){e=t}throw e}},i=0,y.prototype.setState=function(e,t){var n;n=null!=this.__s&&this.__s!==this.state?this.__s:this.__s=f({},this.state),"function"==typeof e&&(e=e(f({},n),this.props)),e&&f(n,e),null!=e&&this.__v&&(t&&this._sb.push(t),b(this))},y.prototype.forceUpdate=function(e){this.__v&&(this.__e=!0,e&&this.__h.push(e),b(this))},y.prototype.render=m,o=[],D.__r=0,u=0;var j,z,U,H,Y=0,V=[],q=[],W=r.__b,Q=r.__r,G=r.diffed,Z=r.__c,J=r.unmount;function K(e,t){r.__h&&r.__h(z,e,Y||t),Y=0;var n=z.__H||(z.__H={__:[],__h:[]});return e>=n.__.length&&n.__.push({__V:q}),n.__[e]}function X(e){return Y=1,ee(ye,e)}function ee(e,t,n){var r=K(j++,2);if(r.t=e,!r.__c&&(r.__=[n?n(t):ye(void 0,t),function(e){var t=r.__N?r.__N[0]:r.__[0],n=r.t(t,e);t!==n&&(r.__N=[n,r.__[1]],r.__c.setState({}))}],r.__c=z,!z.u)){z.u=!0;var i=z.shouldComponentUpdate;z.shouldComponentUpdate=function(e,t,n){if(!r.__c.__H)return!0;var o=r.__c.__H.__.filter((function(e){return e.__c}));if(o.every((function(e){return!e.__N})))return!i||i.call(this,e,t,n);var a=!1;return o.forEach((function(e){if(e.__N){var t=e.__[0];e.__=e.__N,e.__N=void 0,t!==e.__[0]&&(a=!0)}})),!(!a&&r.__c.props===e)&&(!i||i.call(this,e,t,n))}}return r.__N||r.__}function te(e,t){var n=K(j++,3);!r.__s&&me(n.__H,t)&&(n.__=e,n.i=t,z.__H.__h.push(n))}function ne(e,t){var n=K(j++,4);!r.__s&&me(n.__H,t)&&(n.__=e,n.i=t,z.__h.push(n))}function re(e){return Y=5,oe((function(){return{current:e}}),[])}function ie(e,t,n){Y=6,ne((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 oe(e,t){var n=K(j++,7);return me(n.__H,t)?(n.__V=e(),n.i=t,n.__h=e,n.__V):n.__}function ae(e,t){return Y=8,oe((function(){return e}),t)}function ue(e){var t=z.context[e.__c],n=K(j++,9);return n.c=e,t?(null==n.__&&(n.__=!0,t.sub(z)),t.props.value):e.__}function le(e,t){r.useDebugValue&&r.useDebugValue(t?t(e):e)}function ce(e){var t=K(j++,10),n=X();return t.__=e,z.componentDidCatch||(z.componentDidCatch=function(e,r){t.__&&t.__(e,r),n[1](e)}),[n[0],function(){n[1](void 0)}]}function se(){var e=K(j++,11);if(!e.__){for(var t=z.__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 fe(){for(var e;e=V.shift();)if(e.__P&&e.__H)try{e.__H.__h.forEach(pe),e.__H.__h.forEach(ve),e.__H.__h=[]}catch(u){e.__H.__h=[],r.__e(u,e.__v)}}r.__b=function(e){z=null,W&&W(e)},r.__r=function(e){Q&&Q(e),j=0;var t=(z=e.__c).__H;t&&(U===z?(t.__h=[],z.__h=[],t.__.forEach((function(e){e.__N&&(e.__=e.__N),e.__V=q,e.__N=e.i=void 0}))):(t.__h.forEach(pe),t.__h.forEach(ve),t.__h=[])),U=z},r.diffed=function(e){G&&G(e);var t=e.__c;t&&t.__H&&(t.__H.__h.length&&(1!==V.push(t)&&H===r.requestAnimationFrame||((H=r.requestAnimationFrame)||he)(fe)),t.__H.__.forEach((function(e){e.i&&(e.__H=e.i),e.__V!==q&&(e.__=e.__V),e.i=void 0,e.__V=q}))),U=z=null},r.__c=function(e,t){t.some((function(e){try{e.__h.forEach(pe),e.__h=e.__h.filter((function(e){return!e.__||ve(e)}))}catch(i){t.some((function(e){e.__h&&(e.__h=[])})),t=[],r.__e(i,e.__v)}})),Z&&Z(e,t)},r.unmount=function(e){J&&J(e);var t,n=e.__c;n&&n.__H&&(n.__H.__.forEach((function(e){try{pe(e)}catch(e){t=e}})),n.__H=void 0,t&&r.__e(t,n.__v))};var de="function"==typeof requestAnimationFrame;function he(e){var t,n=function(){clearTimeout(r),de&&cancelAnimationFrame(t),setTimeout(e)},r=setTimeout(n,100);de&&(t=requestAnimationFrame(n))}function pe(e){var t=z,n=e.__c;"function"==typeof n&&(e.__c=void 0,n()),z=t}function ve(e){var t=z;e.__c=e.__(),z=t}function me(e,t){return!e||e.length!==t.length||t.some((function(t,n){return t!==e[n]}))}function ye(e,t){return"function"==typeof t?t(e):t}function ge(e,t){for(var n in t)e[n]=t[n];return e}function _e(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 be(e,t){return e===t&&(0!==e||1/e==1/t)||e!=e&&t!=t}function De(e){this.props=e}function we(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:_e(this.props,e)}function r(t){return this.shouldComponentUpdate=n,h(e,t)}return r.displayName="Memo("+(e.displayName||e.name)+")",r.prototype.isReactComponent=!0,r.__f=!0,r}(De.prototype=new y).isPureReactComponent=!0,De.prototype.shouldComponentUpdate=function(e,t){return _e(this.props,e)||_e(this.state,t)};var xe=r.__b;r.__b=function(e){e.type&&e.type.__f&&e.ref&&(e.props.ref=e.ref,e.ref=null),xe&&xe(e)};var ke="undefined"!=typeof Symbol&&Symbol.for&&Symbol.for("react.forward_ref")||3911;function Ce(e){function t(t){var n=ge({},t);return delete n.ref,e(n,t.ref||null)}return t.$$typeof=ke,t.render=t,t.prototype.isReactComponent=t.__f=!0,t.displayName="ForwardRef("+(e.displayName||e.name)+")",t}var Ee=function(e,t){return null==e?null:k(k(e).map(t))},Ae={map:Ee,forEach:Ee,count:function(e){return e?k(e).length:0},only:function(e){var t=k(e);if(1!==t.length)throw"Children.only";return t[0]},toArray:k},Se=r.__e;r.__e=function(e,t,n,r){if(e.then)for(var i,o=t;o=o.__;)if((i=o.__c)&&i.__c)return null==t.__e&&(t.__e=n.__e,t.__k=n.__k),i.__c(e,t);Se(e,t,n,r)};var Fe=r.unmount;function Ne(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=ge({},e)).__c&&(e.__c.__P===n&&(e.__c.__P=t),e.__c=null),e.__k=e.__k&&e.__k.map((function(e){return Ne(e,t,n)}))),e}function Oe(e,t,n){return e&&(e.__v=null,e.__k=e.__k&&e.__k.map((function(e){return Oe(e,t,n)})),e.__c&&e.__c.__P===t&&(e.__e&&n.insertBefore(e.__e,e.__d),e.__c.__e=!0,e.__c.__P=n)),e}function Te(){this.__u=0,this.t=null,this.__b=null}function Be(e){var t=e.__.__c;return t&&t.__a&&t.__a(e)}function Me(e){var t,n,r;function i(i){if(t||(t=e()).then((function(e){n=e.default||e}),(function(e){r=e})),r)throw r;if(!n)throw t;return h(n,i)}return i.displayName="Lazy",i.__f=!0,i}function Le(){this.u=null,this.o=null}r.unmount=function(e){var t=e.__c;t&&t.__R&&t.__R(),t&&!0===e.__h&&(e.type=null),Fe&&Fe(e)},(Te.prototype=new y).__c=function(e,t){var n=t.__c,r=this;null==r.t&&(r.t=[]),r.t.push(n);var i=Be(r.__v),o=!1,a=function(){o||(o=!0,n.__R=null,i?i(u):u())};n.__R=a;var u=function(){if(!--r.__u){if(r.state.__a){var e=r.state.__a;r.__v.__k[0]=Oe(e,e.__c.__P,e.__c.__O)}var t;for(r.setState({__a:r.__b=null});t=r.t.pop();)t.forceUpdate()}},l=!0===t.__h;r.__u++||l||r.setState({__a:r.__b=r.__v.__k[0]}),e.then(a,a)},Te.prototype.componentWillUnmount=function(){this.t=[]},Te.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]=Ne(this.__b,n,r.__O=r.__P)}this.__b=null}var i=t.__a&&h(m,null,e.fallback);return i&&(i.__h=null),[h(m,null,t.__a?null:e.children),i]};var Pe=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)}}),P(h($e,{context:t.context},e.__v),t.l)):t.l&&t.componentWillUnmount()}function Ie(e,t){var n=h(Re,{__v:e,i:t});return n.containerInfo=t,n}(Le.prototype=new y).__a=function(e){var t=this,n=Be(t.__v),r=t.o.get(e);return r[0]++,function(i){var o=function(){t.props.revealOrder?(r.push(i),Pe(t,e,r)):i()};n?n(o):o()}},Le.prototype.render=function(e){this.u=null,this.o=new Map;var t=k(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},Le.prototype.componentDidUpdate=Le.prototype.componentDidMount=function(){var e=this;this.o.forEach((function(t,n){Pe(e,n,t)}))};var je="undefined"!=typeof Symbol&&Symbol.for&&Symbol.for("react.element")||60103,ze=/^(?:accent|alignment|arabic|baseline|cap|clip(?!PathU)|color|dominant|fill|flood|font|glyph(?!R)|horiz|image|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]/,Ue="undefined"!=typeof document,He=function(e){return("undefined"!=typeof Symbol&&"symbol"==typeof Symbol()?/fil|che|rad/i:/fil|che|ra/i).test(e)};function Ye(e,t,n){return null==t.__k&&(t.textContent=""),P(e,t),"function"==typeof n&&n(),e?e.__c:null}function Ve(e,t,n){return $(e,t),"function"==typeof n&&n(),e?e.__c:null}y.prototype.isReactComponent={},["componentWillMount","componentWillReceiveProps","componentWillUpdate"].forEach((function(e){Object.defineProperty(y.prototype,e,{configurable:!0,get:function(){return this["UNSAFE_"+e]},set:function(t){Object.defineProperty(this,e,{configurable:!0,writable:!0,value:t})}})}));var qe=r.event;function We(){}function Qe(){return this.cancelBubble}function Ge(){return this.defaultPrevented}r.event=function(e){return qe&&(e=qe(e)),e.persist=We,e.isPropagationStopped=Qe,e.isDefaultPrevented=Ge,e.nativeEvent=e};var Ze,Je={configurable:!0,get:function(){return this.class}},Ke=r.vnode;r.vnode=function(e){var t=e.type,n=e.props,r=n;if("string"==typeof t){var i=-1===t.indexOf("-");for(var o in r={},n){var a=n[o];Ue&&"children"===o&&"noscript"===t||"value"===o&&"defaultValue"in n&&null==a||("defaultValue"===o&&"value"in n&&null==n.value?o="value":"download"===o&&!0===a?a="":/ondoubleclick/i.test(o)?o="ondblclick":/^onchange(textarea|input)/i.test(o+t)&&!He(n.type)?o="oninput":/^onfocus$/i.test(o)?o="onfocusin":/^onblur$/i.test(o)?o="onfocusout":/^on(Ani|Tra|Tou|BeforeInp|Compo)/.test(o)?o=o.toLowerCase():i&&ze.test(o)?o=o.replace(/[A-Z0-9]/g,"-$&").toLowerCase():null===a&&(a=void 0),/^oninput$/i.test(o)&&(o=o.toLowerCase(),r[o]&&(o="oninputCapture")),r[o]=a)}"select"==t&&r.multiple&&Array.isArray(r.value)&&(r.value=k(n.children).forEach((function(e){e.props.selected=-1!=r.value.indexOf(e.props.value)}))),"select"==t&&null!=r.defaultValue&&(r.value=k(n.children).forEach((function(e){e.props.selected=r.multiple?-1!=r.defaultValue.indexOf(e.props.value):r.defaultValue==e.props.value}))),e.props=r,n.class!=n.className&&(Je.enumerable="className"in n,null!=n.className&&(r.class=n.className),Object.defineProperty(r,"className",Je))}e.$$typeof=je,Ke&&Ke(e)};var Xe=r.__r;r.__r=function(e){Xe&&Xe(e),Ze=e.__c};var et={ReactCurrentDispatcher:{current:{readContext:function(e){return Ze.__n[e.__c].props.value}}}},tt="17.0.2";function nt(e){return h.bind(null,e)}function rt(e){return!!e&&e.$$typeof===je}function it(e){return rt(e)?R.apply(null,arguments):e}function ot(e){return!!e.__k&&(P(null,e),!0)}function at(e){return e&&(e.base||1===e.nodeType&&e)||null}var ut=function(e,t){return e(t)},lt=function(e,t){return e(t)},ct=m;function st(e){e()}function ft(e){return e}function dt(){return[!1,st]}var ht=ne;function pt(e,t){var n=t(),r=X({h:{__:n,v:t}}),i=r[0].h,o=r[1];return ne((function(){i.__=n,i.v=t,be(i.__,t())||o({h:i})}),[e,n,t]),te((function(){return be(i.__,i.v())||o({h:i}),e((function(){be(i.__,i.v())||o({h:i})}))}),[e]),n}var vt,mt={useState:X,useId:se,useReducer:ee,useEffect:te,useLayoutEffect:ne,useInsertionEffect:ht,useTransition:dt,useDeferredValue:ft,useSyncExternalStore:pt,startTransition:st,useRef:re,useImperativeHandle:ie,useMemo:oe,useCallback:ae,useContext:ue,useDebugValue:le,version:"17.0.2",Children:Ae,render:Ye,hydrate:Ve,unmountComponentAtNode:ot,createPortal:Ie,createElement:h,createContext:I,createFactory:nt,cloneElement:it,createRef:v,Fragment:m,isValidElement:rt,findDOMNode:at,Component:y,PureComponent:De,memo:we,forwardRef:Ce,flushSync:lt,unstable_batchedUpdates:ut,StrictMode:ct,Suspense:Te,SuspenseList:Le,lazy:Me,__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED:et};function yt(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n=0&&(t.hash=e.substr(n),e=e.substr(0,n));var r=e.indexOf("?");r>=0&&(t.search=e.substr(r),e=e.substr(0,r)),e&&(t.pathname=e)}return t}function zt(e){var t="undefined"!==typeof window&&"undefined"!==typeof window.location&&"null"!==window.location.origin?window.location.origin:"unknown://unknown",n="string"===typeof e?e:It(e);return new URL(n,t)}function Ut(e,t,n,r){void 0===r&&(r={});var i=r,o=i.window,a=void 0===o?document.defaultView:o,u=i.v5Compat,l=void 0!==u&&u,c=a.history,s=vt.Pop,f=null;function d(){s=vt.Pop,f&&f({action:s,location:h.location})}var h={get action(){return s},get location(){return e(a,c)},listen:function(e){if(f)throw new Error("A history only accepts one active listener");return a.addEventListener(Lt,d),f=e,function(){a.removeEventListener(Lt,d),f=null}},createHref:function(e){return t(a,e)},encodeLocation:function(e){var t=zt(It(e));return Bt({},e,{pathname:t.pathname,search:t.search,hash:t.hash})},push:function(e,t){s=vt.Push;var r=Rt(h.location,e,t);n&&n(r,e);var i=$t(r),o=h.createHref(r);try{c.pushState(i,"",o)}catch(u){a.location.assign(o)}l&&f&&f({action:s,location:h.location})},replace:function(e,t){s=vt.Replace;var r=Rt(h.location,e,t);n&&n(r,e);var i=$t(r),o=h.createHref(r);c.replaceState(i,"",o),l&&f&&f({action:s,location:h.location})},go:function(e){return c.go(e)}};return h}function Ht(e,t,n){void 0===n&&(n="/");var r=Jt(("string"===typeof t?jt(t):t).pathname||"/",n);if(null==r)return null;var i=Yt(e);!function(e){e.sort((function(e,t){return e.score!==t.score?t.score-e.score:function(e,t){var n=e.length===t.length&&e.slice(0,-1).every((function(e,n){return e===t[n]}));return n?e[e.length-1]-t[t.length-1]:0}(e.routesMeta.map((function(e){return e.childrenIndex})),t.routesMeta.map((function(e){return e.childrenIndex})))}))}(i);for(var o=null,a=0;null==o&&a0&&(Kt(!0!==e.index,'Index routes must not have child routes. Please remove all child routes from route path "'+a+'".'),Yt(e.children,t,u,a)),(null!=e.path||e.index)&&t.push({path:a,score:Wt(a,e.index),routesMeta:u})})),t}!function(e){e.data="data",e.deferred="deferred",e.redirect="redirect",e.error="error"}(Mt||(Mt={}));var Vt=/^:\w+$/,qt=function(e){return"*"===e};function Wt(e,t){var n=e.split("/"),r=n.length;return n.some(qt)&&(r+=-2),t&&(r+=2),n.filter((function(e){return!qt(e)})).reduce((function(e,t){return e+(Vt.test(t)?3:""===t?1:10)}),r)}function Qt(e,t){for(var n=e.routesMeta,r={},i="/",o=[],a=0;a and the router will parse it for you.'}function tn(e){return e.filter((function(e,t){return 0===t||e.route.path&&e.route.path.length>0}))}function nn(e,t,n,r){var i;void 0===r&&(r=!1),"string"===typeof e?i=jt(e):(Kt(!(i=Bt({},e)).pathname||!i.pathname.includes("?"),en("?","pathname","search",i)),Kt(!i.pathname||!i.pathname.includes("#"),en("#","pathname","hash",i)),Kt(!i.search||!i.search.includes("#"),en("#","search","hash",i)));var o,a=""===e||""===i.pathname,u=a?"/":i.pathname;if(r||null==u)o=n;else{var l=t.length-1;if(u.startsWith("..")){for(var c=u.split("/");".."===c[0];)c.shift(),l-=1;i.pathname=c.join("/")}o=l>=0?t[l]:"/"}var s=function(e,t){void 0===t&&(t="/");var n="string"===typeof e?jt(e):e,r=n.pathname,i=n.search,o=void 0===i?"":i,a=n.hash,u=void 0===a?"":a,l=r?r.startsWith("/")?r:function(e,t){var n=t.replace(/\/+$/,"").split("/");return e.split("/").forEach((function(e){".."===e?n.length>1&&n.pop():"."!==e&&n.push(e)})),n.length>1?n.join("/"):"/"}(r,t):t;return{pathname:l,search:an(o),hash:un(u)}}(i,o),f=u&&"/"!==u&&u.endsWith("/"),d=(a||"."===u)&&n.endsWith("/");return s.pathname.endsWith("/")||!f&&!d||(s.pathname+="/"),s}var rn=function(e){return e.join("/").replace(/\/\/+/g,"/")},on=function(e){return e.replace(/\/+$/,"").replace(/^\/*/,"/")},an=function(e){return e&&"?"!==e?e.startsWith("?")?e:"?"+e:""},un=function(e){return e&&"#"!==e?e.startsWith("#")?e:"#"+e:""};Error;var ln=xt((function e(t,n,r){Dt(this,e),this.status=t,this.statusText=n||"",this.data=r}));function cn(e){return e instanceof ln}"undefined"!==typeof window&&"undefined"!==typeof window.document&&window.document.createElement;var sn=new Set(["POST","PUT","PATCH","DELETE"]);new Set(["GET","HEAD"].concat(bt(sn)));function fn(){return fn=Object.assign?Object.assign.bind():function(e){for(var t=1;t")))}var Nn,On,Tn=function(e){Ct(n,e);var t=Nt(n);function n(e){var r;return Dt(this,n),(r=t.call(this,e)).state={location:e.location,error:e.error},r}return xt(n,[{key:"componentDidCatch",value:function(e,t){console.error("React Router caught the following error during render",e,t)}},{key:"render",value:function(){return this.state.error?h(kn.Provider,{value:this.state.error,children:this.props.component}):this.props.children}}],[{key:"getDerivedStateFromError",value:function(e){return{error:e}}},{key:"getDerivedStateFromProps",value:function(e,t){return t.location!==e.location?{error:e.error,location:e.location}:{error:e.error||t.error,location:t.location}}}]),n}(y);function Bn(e){var t=e.routeContext,n=e.match,r=e.children,i=ue(gn);return i&&n.route.errorElement&&(i._deepestRenderedBoundaryId=n.route.id),h(xn.Provider,{value:t},r)}function Mn(e,t,n){if(void 0===t&&(t=[]),null==e){if(null==n||!n.errors)return null;e=n.matches}var r=e,i=null==n?void 0:n.errors;if(null!=i){var o=r.findIndex((function(e){return e.route.id&&(null==i?void 0:i[e.route.id])}));o>=0||Kt(!1),r=r.slice(0,Math.min(r.length,o+1))}return r.reduceRight((function(e,o,a){var u=o.route.id?null==i?void 0:i[o.route.id]:null,l=n?o.route.errorElement||h(Fn,null):null,c=function(){return h(Bn,{match:o,routeContext:{outlet:e,matches:t.concat(r.slice(0,a+1))}},u?l:void 0!==o.route.element?o.route.element:e)};return n&&(o.route.errorElement||0===a)?h(Tn,{location:n.location,component:l,error:u,children:c()}):c()}),null)}function Ln(e){var t=ue(bn);return t||Kt(!1),t}!function(e){e.UseRevalidator="useRevalidator"}(Nn||(Nn={})),function(e){e.UseLoaderData="useLoaderData",e.UseActionData="useActionData",e.UseRouteError="useRouteError",e.UseNavigation="useNavigation",e.UseRouteLoaderData="useRouteLoaderData",e.UseMatches="useMatches",e.UseRevalidator="useRevalidator"}(On||(On={}));var Pn;function $n(e){return function(e){var t=ue(xn).outlet;return t?h(Sn.Provider,{value:e},t):t}(e.context)}function Rn(e){Kt(!1)}function In(e){var t=e.basename,n=void 0===t?"/":t,r=e.children,i=void 0===r?null:r,o=e.location,a=e.navigationType,u=void 0===a?vt.Pop:a,l=e.navigator,c=e.static,s=void 0!==c&&c;Cn()&&Kt(!1);var f=n.replace(/^\/*/,"/"),d=oe((function(){return{basename:f,navigator:l,static:s}}),[f,l,s]);"string"===typeof o&&(o=jt(o));var p=o,v=p.pathname,m=void 0===v?"/":v,y=p.search,g=void 0===y?"":y,_=p.hash,b=void 0===_?"":_,D=p.state,w=void 0===D?null:D,x=p.key,k=void 0===x?"default":x,C=oe((function(){var e=Jt(m,f);return null==e?null:{pathname:e,search:g,hash:b,state:w,key:k}}),[f,m,g,b,w,k]);return null==C?null:h(Dn.Provider,{value:d},h(wn.Provider,{children:i,value:{location:C,navigationType:u}}))}function jn(e){var t=e.children,n=e.location,r=ue(_n);return function(e,t){Cn()||Kt(!1);var n,r=ue(bn),i=ue(xn).matches,o=i[i.length-1],a=o?o.params:{},u=(o&&o.pathname,o?o.pathnameBase:"/"),l=(o&&o.route,En());if(t){var c,s="string"===typeof t?jt(t):t;"/"===u||(null==(c=s.pathname)?void 0:c.startsWith(u))||Kt(!1),n=s}else n=l;var f=n.pathname||"/",d=Ht(e,{pathname:"/"===u?f:f.slice(u.length)||"/"}),p=Mn(d&&d.map((function(e){return Object.assign({},e,{params:Object.assign({},a,e.params),pathname:rn([u,e.pathname]),pathnameBase:"/"===e.pathnameBase?u:rn([u,e.pathnameBase])})})),i,r||void 0);return t&&p?h(wn.Provider,{value:{location:fn({pathname:"/",search:"",hash:"",state:null,key:"default"},n),navigationType:vt.Pop}},p):p}(r&&!t?r.router.routes:zn(t),n)}!function(e){e[e.pending=0]="pending",e[e.success=1]="success",e[e.error=2]="error"}(Pn||(Pn={}));new Promise((function(){}));function zn(e,t){void 0===t&&(t=[]);var n=[];return Ae.forEach(e,(function(e,r){if(rt(e))if(e.type!==m){e.type!==Rn&&Kt(!1),e.props.index&&e.props.children&&Kt(!1);var i=[].concat(bt(t),[r]),o={id:e.props.id||i.join("-"),caseSensitive:e.props.caseSensitive,element:e.props.element,index:e.props.index,path:e.props.path,loader:e.props.loader,action:e.props.action,errorElement:e.props.errorElement,hasErrorBoundary:null!=e.props.errorElement,shouldRevalidate:e.props.shouldRevalidate,handle:e.props.handle};e.props.children&&(o.children=zn(e.props.children,i)),n.push(o)}else n.push.apply(n,zn(e.props.children,t))})),n}function Un(e){var t=e.basename,n=e.children,r=e.window,i=re();null==i.current&&(i.current=function(e){return void 0===e&&(e={}),Ut((function(e,t){var n=jt(e.location.hash.substr(1)),r=n.pathname,i=void 0===r?"/":r,o=n.search,a=void 0===o?"":o,u=n.hash;return Rt("",{pathname:i,search:a,hash:void 0===u?"":u},t.state&&t.state.usr||null,t.state&&t.state.key||"default")}),(function(e,t){var n=e.document.querySelector("base"),r="";if(n&&n.getAttribute("href")){var i=e.location.href,o=i.indexOf("#");r=-1===o?i:i.slice(0,o)}return r+"#"+("string"===typeof t?t:It(t))}),(function(e,t){Pt("/"===e.pathname.charAt(0),"relative pathnames are not supported in hash history.push("+JSON.stringify(t)+")")}),e)}({window:r,v5Compat:!0}));var o=i.current,a=_t(X({action:o.action,location:o.location}),2),u=a[0],l=a[1];return ne((function(){return o.listen(l)}),[o]),h(In,{basename:t,children:n,location:u.location,navigationType:u.action,navigator:o})}var Hn,Yn;(function(e){e.UseScrollRestoration="useScrollRestoration",e.UseSubmitImpl="useSubmitImpl",e.UseFetcher="useFetcher"})(Hn||(Hn={})),function(e){e.UseFetchers="useFetchers",e.UseScrollRestoration="useScrollRestoration"}(Yn||(Yn={}));var Vn;function qn(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}var Wn={home:"/",dashboards:"/dashboards",cardinality:"/cardinality",topQueries:"/top-queries"},Qn={header:{timeSelector:!0,executionControls:!0,globalSettings:!0}},Gn=(qn(Vn={},Wn.home,Qn),qn(Vn,Wn.dashboards,Qn),qn(Vn,Wn.cardinality,{header:{cardinalityDatePicker:!0,globalSettings:!0}}),Vn),Zn=Wn;function Jn(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}function Kn(e){for(var t=1;t2&&void 0!==arguments[2]?arguments[2]:window.location.search,r=nr().parse(n,{ignoreQueryPrefix:!0});return ir()(r,e,t||"")},lr={serverUrl:Xn().serverURL||window.location.href.replace(/\/(?:prometheus\/)?(?:graph|vmui)\/.*/,"/prometheus"),tenantId:Number(ur("g0.tenantID",0))};function cr(e,t){switch(t.type){case"SET_SERVER":return Kn(Kn({},e),{},{serverUrl:t.payload});case"SET_TENANT_ID":return Kn(Kn({},e),{},{tenantId:t.payload});default:throw new Error}}var sr=0;function fr(e,t,n,i,o){var a,u,l={};for(u in t)"ref"==u?a=t[u]:l[u]=t[u];var c={type:e,props:l,key:n,ref:a,__k:null,__:null,__b:0,__e:null,__d:void 0,__c:null,__h:null,constructor:void 0,__v:--sr,__source:o,__self:i};if("function"==typeof e&&(a=e.defaultProps))for(u in a)void 0===l[u]&&(l[u]=a[u]);return r.vnode&&r.vnode(c),c}var dr=I({}),hr=function(){return ue(dr).state},pr=function(){return ue(dr).dispatch},vr=Object.entries(lr).reduce((function(e,t){var n=_t(t,2),r=n[0],i=n[1];return Kn(Kn({},e),{},qn({},r,ur(r)||i))}),{}),mr=n(658),yr=n.n(mr),gr=n(446),_r=n.n(gr),br=n(635),Dr=n.n(br),wr="YYYY-MM-DD",xr="YYYY-MM-DD HH:mm:ss",kr="YYYY-MM-DD[T]HH:mm:ss";yr().extend(_r()),yr().extend(Dr());var Cr,Er=window.innerWidth/4,Ar=1,Sr=1578e8,Fr=[{long:"days",short:"d",possible:"day"},{long:"weeks",short:"w",possible:"week"},{long:"months",short:"M",possible:"mon"},{long:"years",short:"y",possible:"year"},{long:"hours",short:"h",possible:"hour"},{long:"minutes",short:"m",possible:"min"},{long:"seconds",short:"s",possible:"sec"},{long:"milliseconds",short:"ms",possible:"millisecond"}].map((function(e){return e.short})),Nr=function(e){return Math.round(1e3*e)/1e3},Or=function(e){var t=e.match(/\d+/g),n=e.match(/[a-zA-Z]+/g);if(n&&t&&Fr.includes(n[0]))return qn({},n[0],t[0])},Tr=function(e,t){var n=(t||new Date).valueOf()/1e3,r=e.trim().split(" ").reduce((function(e,t){var n=Or(t);return n?Kn(Kn({},e),n):Kn({},e)}),{}),i=yr().duration(r).asSeconds();return{start:n-i,end:n,step:Nr(i/Er)||.001,date:Br(t||new Date)}},Br=function(e){return yr()(e).utc().format(kr)},Mr=function(e){return yr()(e).format(kr)},Lr=function(e){var t=Math.floor(e%1e3),n=Math.floor(e/1e3%60),r=Math.floor(e/1e3/60%60),i=Math.floor(e/1e3/3600%24),o=Math.floor(e/864e5),a=["d","h","m","s","ms"],u=[o,i,r,n,t].map((function(e,t){return e?"".concat(e).concat(a[t]):""}));return u.filter((function(e){return e})).join(" ")},Pr=function(e){return new Date(1e3*e)},$r=[{title:"Last 5 minutes",duration:"5m"},{title:"Last 15 minutes",duration:"15m"},{title:"Last 30 minutes",duration:"30m",isDefault:!0},{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:function(){return yr()().subtract(1,"day").endOf("day").toDate()}},{title:"Today",duration:"1d",until:function(){return yr()().endOf("day").toDate()}}].map((function(e){return Kn({id:e.title.replace(/\s/g,"_").toLocaleLowerCase(),until:e.until?e.until:function(){return yr()().toDate()}},e)})),Rr=function(e){var t,n=e.relativeTimeId,r=e.defaultDuration,i=e.defaultEndInput,o=null===(t=$r.find((function(e){return e.isDefault})))||void 0===t?void 0:t.id,a=n||ur("g0.relative_time",o),u=$r.find((function(e){return e.id===a}));return{relativeTimeId:u?a:"none",duration:u?u.duration:r,endInput:u?u.until():i}},Ir=ur("g0.range_input"),jr=Rr({defaultDuration:Ir||"1h",defaultEndInput:new Date((Cr=ur("g0.end_input",new Date(yr()().utc().format(kr))),yr()(Cr).utcOffset(0,!0).local().format(kr))),relativeTimeId:Ir?ur("g0.relative_time","none"):void 0}),zr=jr.duration,Ur=jr.endInput,Hr=jr.relativeTimeId,Yr={duration:zr,period:Tr(zr,Ur),relativeTime:Hr};function Vr(e,t){switch(t.type){case"SET_DURATION":return Kn(Kn({},e),{},{duration:t.payload,period:Tr(t.payload,Pr(e.period.end)),relativeTime:"none"});case"SET_RELATIVE_TIME":return Kn(Kn({},e),{},{duration:t.payload.duration,period:Tr(t.payload.duration,new Date(t.payload.until)),relativeTime:t.payload.id});case"SET_PERIOD":var n=function(e){var t=e.to.valueOf()-e.from.valueOf();return Lr(t)}(t.payload);return Kn(Kn({},e),{},{duration:n,period:Tr(n,t.payload.to),relativeTime:"none"});case"RUN_QUERY":var r=Rr({relativeTimeId:e.relativeTime,defaultDuration:e.duration,defaultEndInput:Pr(e.period.end)}),i=r.duration,o=r.endInput;return Kn(Kn({},e),{},{period:Tr(i,o)});case"RUN_QUERY_TO_NOW":return Kn(Kn({},e),{},{period:Tr(e.duration)});default:throw new Error}}var qr=I({}),Wr=function(){return ue(qr).state},Qr=function(){return ue(qr).dispatch},Gr=function(e,t){t?window.localStorage.setItem(e,JSON.stringify({value:t})):Jr([e])},Zr=function(e){var 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(c){return t}},Jr=function(e){return e.forEach((function(e){return window.localStorage.removeItem(e)}))},Kr=function(){var e,t=(null===(e=window.location.search.match(/g\d+.expr/gim))||void 0===e?void 0:e.length)||1;return new Array(t>4?4:t).fill(1).map((function(e,t){return ur("g".concat(t,".expr"),"")}))}(),Xr={query:Kr,queryHistory:Kr.map((function(e){return{index:0,values:[e]}})),autocomplete:Zr("AUTOCOMPLETE")||!1};function ei(e,t){switch(t.type){case"SET_QUERY":return Kn(Kn({},e),{},{query:t.payload.map((function(e){return e}))});case"SET_QUERY_HISTORY":return Kn(Kn({},e),{},{queryHistory:t.payload});case"SET_QUERY_HISTORY_BY_INDEX":return e.queryHistory.splice(t.payload.queryNumber,1,t.payload.value),Kn(Kn({},e),{},{queryHistory:e.queryHistory});case"TOGGLE_AUTOCOMPLETE":return Gr("AUTOCOMPLETE",!e.autocomplete),Kn(Kn({},e),{},{autocomplete:!e.autocomplete});default:throw new Error}}var ti=I({}),ni=function(){return ue(ti).state},ri=function(){return ue(ti).dispatch},ii=function(){return fr("svg",{viewBox:"0 0 74 24",fill:"currentColor",children:[fr("path",{d:"M6.11771 9.47563C6.4774 9.7554 6.91935 9.90875 7.37507 9.9119H7.42685C7.9076 9.90451 8.38836 9.71964 8.67681 9.46823C10.1856 8.18898 14.5568 4.18115 14.5568 4.18115C15.7254 3.09415 12.4637 2.00716 7.42685 1.99977H7.36768C2.33084 2.00716 -0.930893 3.09415 0.237711 4.18115C0.237711 4.18115 4.60888 8.18898 6.11771 9.47563ZM8.67681 11.6422C8.31807 11.9246 7.87603 12.0806 7.41945 12.0859H7.37507C6.91849 12.0806 6.47645 11.9246 6.11771 11.6422C5.08224 10.7549 1.38413 7.41995 0.00103198 6.14809V8.07806C0.00103198 8.2925 0.0823905 8.57349 0.222919 8.70659L0.293358 8.77097L0.293386 8.77099C1.33788 9.72556 4.83907 12.9253 6.11771 14.0159C6.47645 14.2983 6.91849 14.4543 7.37507 14.4595H7.41945C7.9076 14.4447 8.38096 14.2599 8.67681 14.0159C9.98594 12.9067 13.6249 9.57175 14.5642 8.70659C14.7121 8.57349 14.7861 8.2925 14.7861 8.07806V6.14809C12.7662 7.99781 10.7297 9.82926 8.67681 11.6422ZM7.41945 16.6261C7.87517 16.623 8.31712 16.4696 8.67681 16.1898C10.7298 14.3744 12.7663 12.5405 14.7861 10.6883V12.6257C14.7861 12.8327 14.7121 13.1137 14.5642 13.2468C13.6249 14.1194 9.98594 17.4469 8.67681 18.5561C8.38096 18.8075 7.9076 18.9924 7.41945 18.9998H7.37507C6.91935 18.9966 6.4774 18.8433 6.11771 18.5635C4.91431 17.5371 1.74223 14.6362 0.502336 13.5023C0.3934 13.4027 0.299379 13.3167 0.222919 13.2468C0.0823905 13.1137 0.00103198 12.8327 0.00103198 12.6257V10.6883C1.38413 11.9528 5.08224 15.2951 6.11771 16.1825C6.47645 16.4649 6.91849 16.6209 7.37507 16.6261H7.41945Z",fill:"currentColor"}),fr("path",{d:"M35 3.54L29.16 18H26.73L20.89 3.54H23.05C23.2833 3.54 23.4733 3.59667 23.62 3.71C23.7667 3.82333 23.8767 3.97 23.95 4.15L27.36 12.97C27.4733 13.2567 27.58 13.5733 27.68 13.92C27.7867 14.26 27.8867 14.6167 27.98 14.99C28.06 14.6167 28.1467 14.26 28.24 13.92C28.3333 13.5733 28.4367 13.2567 28.55 12.97L31.94 4.15C31.9933 3.99667 32.0967 3.85667 32.25 3.73C32.41 3.60333 32.6033 3.54 32.83 3.54H35ZM52.1767 3.54V18H49.8067V8.66C49.8067 8.28667 49.8267 7.88333 49.8667 7.45L45.4967 15.66C45.2901 16.0533 44.9734 16.25 44.5467 16.25H44.1667C43.7401 16.25 43.4234 16.0533 43.2167 15.66L38.7967 7.42C38.8167 7.64 38.8334 7.85667 38.8467 8.07C38.8601 8.28333 38.8667 8.48 38.8667 8.66V18H36.4967V3.54H38.5267C38.6467 3.54 38.7501 3.54333 38.8367 3.55C38.9234 3.55667 39.0001 3.57333 39.0667 3.6C39.1401 3.62667 39.2034 3.67 39.2567 3.73C39.3167 3.79 39.3734 3.87 39.4267 3.97L43.7567 12C43.8701 12.2133 43.9734 12.4333 44.0667 12.66C44.1667 12.8867 44.2634 13.12 44.3567 13.36C44.4501 13.1133 44.5467 12.8767 44.6467 12.65C44.7467 12.4167 44.8534 12.1933 44.9667 11.98L49.2367 3.97C49.2901 3.87 49.3467 3.79 49.4067 3.73C49.4667 3.67 49.5301 3.62667 49.5967 3.6C49.6701 3.57333 49.7501 3.55667 49.8367 3.55C49.9234 3.54333 50.0267 3.54 50.1467 3.54H52.1767ZM61.063 17.27C61.743 17.27 62.3496 17.1533 62.883 16.92C63.423 16.68 63.8796 16.35 64.253 15.93C64.6263 15.51 64.9096 15.0167 65.103 14.45C65.303 13.8767 65.403 13.26 65.403 12.6V3.85H66.423V12.6C66.423 13.38 66.2996 14.11 66.053 14.79C65.8063 15.4633 65.4496 16.0533 64.983 16.56C64.523 17.06 63.9596 17.4533 63.293 17.74C62.633 18.0267 61.8896 18.17 61.063 18.17C60.2363 18.17 59.4896 18.0267 58.823 17.74C58.163 17.4533 57.5996 17.06 57.133 16.56C56.673 16.0533 56.3196 15.4633 56.073 14.79C55.8263 14.11 55.703 13.38 55.703 12.6V3.85H56.733V12.59C56.733 13.25 56.8296 13.8667 57.023 14.44C57.223 15.0067 57.5063 15.5 57.873 15.92C58.2463 16.34 58.6996 16.67 59.233 16.91C59.773 17.15 60.383 17.27 61.063 17.27ZM71.4442 18H70.4142V3.85H71.4442V18Z",fill:"currentColor"})]})},oi=function(){return fr("svg",{viewBox:"0 0 24 24",fill:"currentColor",children:fr("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"})})},ai=function(){return fr("svg",{viewBox:"0 0 24 24",fill:"currentColor",children:fr("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"})})},ui=function(){return fr("svg",{viewBox:"0 0 24 24",fill:"currentColor",children:fr("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"})})},li=function(){return fr("svg",{viewBox:"0 0 24 24",fill:"currentColor",children:fr("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"})})},ci=function(){return fr("svg",{viewBox:"0 0 24 24",fill:"currentColor",children:fr("path",{d:"M1 21h22L12 2 1 21zm12-3h-2v-2h2v2zm0-4h-2v-4h2v4z"})})},si=function(){return fr("svg",{viewBox:"0 0 24 24",fill:"currentColor",children:fr("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"})})},fi=function(){return fr("svg",{viewBox:"0 0 24 24",fill:"currentColor",children:fr("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"})})},di=function(){return fr("svg",{viewBox:"0 0 24 24",fill:"currentColor",children:fr("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"})})},hi=function(){return fr("svg",{viewBox:"0 0 24 24",fill:"currentColor",children:fr("path",{d:"M7.41 8.59 12 13.17l4.59-4.58L18 10l-6 6-6-6 1.41-1.41z"})})},pi=function(){return fr("svg",{viewBox:"0 0 24 24",fill:"currentColor",children:fr("path",{d:"m12 8-6 6 1.41 1.41L12 10.83l4.59 4.58L18 14z"})})},vi=function(){return fr("svg",{viewBox:"0 0 24 24",fill:"currentColor",children:fr("path",{d:"m7 10 5 5 5-5z"})})},mi=function(){return fr("svg",{viewBox:"0 0 24 24",fill:"currentColor",children:[fr("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"}),fr("path",{d:"M12.5 7H11v6l5.25 3.15.75-1.23-4.5-2.67z"})]})},yi=function(){return fr("svg",{viewBox:"0 0 24 24",fill:"currentColor",children:fr("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"})})},gi=function(){return fr("svg",{viewBox:"0 0 24 24",fill:"currentColor",children:fr("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"})})},_i=function(){return fr("svg",{viewBox:"0 0 24 24",fill:"currentColor",children:fr("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"})})},bi=function(){return fr("svg",{viewBox:"0 0 24 24",fill:"currentColor",children:fr("path",{d:"M8 5v14l11-7z"})})},Di=function(){return fr("svg",{viewBox:"0 0 24 24",fill:"currentColor",children:fr("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"})})},wi=function(){return fr("svg",{viewBox:"0 0 24 24",fill:"currentColor",children:fr("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"})})},xi=function(){return fr("svg",{viewBox:"0 0 24 24",fill:"currentColor",children:fr("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"})})},ki=function(){return fr("svg",{viewBox:"0 0 24 24",fill:"currentColor",children:fr("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"})})},Ci=function(){return fr("svg",{viewBox:"0 0 24 24",fill:"currentColor",children:fr("path",{d:"M6 19c0 1.1.9 2 2 2h8c1.1 0 2-.9 2-2V7H6v12zM19 4h-3.5l-1-1h-5l-1 1H5v2h14V4z"})})},Ei=function(){return fr("svg",{viewBox:"0 0 24 24",fill:"currentColor",children:fr("path",{d:"M19 13h-6v6h-2v-6H5v-2h6V5h2v6h6v2z"})})},Ai=function(){return fr("svg",{viewBox:"0 0 24 24",fill:"currentColor",children:fr("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"})})},Si=function(){return fr("svg",{viewBox:"0 0 24 24",fill:"currentColor",children:fr("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"})})},Fi=function(){return fr("svg",{viewBox:"0 0 24 24",fill:"currentColor",children:fr("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"})})},Ni=n(123),Oi=n.n(Ni),Ti=function(e){return getComputedStyle(document.documentElement).getPropertyValue("--".concat(e))},Bi=function(e,t){document.documentElement.style.setProperty("--".concat(e),t)},Mi=function(e){var t=e.activeItem,n=e.items,r=e.color,i=void 0===r?Ti("color-primary"):r,o=e.onChange,a=e.indicatorPlacement,u=void 0===a?"bottom":a,l=re(null),c=_t(X({left:0,width:0,bottom:0}),2),s=c[0],f=c[1];return te((function(){if(l.current){var e=l.current,t=e.offsetLeft,n=e.offsetWidth,r=e.offsetHeight;f({left:t,width:n,bottom:"top"===u?r-2:0})}}),[t,l,n]),fr("div",{className:"vm-tabs",children:[n.map((function(e){return fr("div",{className:Oi()(qn({"vm-tabs-item":!0,"vm-tabs-item_active":t===e.value},e.className||"",e.className)),ref:t===e.value?l:void 0,style:{color:i},onClick:(n=e.value,function(){o(n)}),children:[e.icon&&fr("div",{className:Oi()({"vm-tabs-item__icon":!0,"vm-tabs-item__icon_single":!e.label}),children:e.icon}),e.label]},e.value);var n})),fr("div",{className:"vm-tabs__indicator",style:Kn(Kn({},s),{},{borderColor:i})})]})},Li=[{value:"chart",icon:fr(wi,{}),label:"Graph",prometheusCode:0},{value:"code",icon:fr(ki,{}),label:"JSON",prometheusCode:3},{value:"table",icon:fr(xi,{}),label:"Table",prometheusCode:1}],Pi=function(){var e=Ui().displayType,t=Hi();return fr(Mi,{activeItem:e,items:Li,onChange:function(n){var r;t({type:"SET_DISPLAY_TYPE",payload:null!==(r=n)&&void 0!==r?r:e})}})},$i=ur("g0.tab",0),Ri=Li.find((function(e){return e.prometheusCode===+$i||e.value===$i})),Ii={displayType:(null===Ri||void 0===Ri?void 0:Ri.value)||"chart",nocache:Zr("NO_CACHE")||!1,isTracingEnabled:Zr("QUERY_TRACING")||!1};function ji(e,t){switch(t.type){case"SET_DISPLAY_TYPE":return Kn(Kn({},e),{},{displayType:t.payload});case"TOGGLE_QUERY_TRACING":return Gr("QUERY_TRACING",!e.isTracingEnabled),Kn(Kn({},e),{},{isTracingEnabled:!e.isTracingEnabled});case"TOGGLE_NO_CACHE":return Gr("NO_CACHE",!e.nocache),Kn(Kn({},e),{},{nocache:!e.nocache});default:throw new Error}}var zi=I({}),Ui=function(){return ue(zi).state},Hi=function(){return ue(zi).dispatch},Yi={customStep:parseFloat(ur("g0.step_input","0")),yaxis:{limits:{enable:!1,range:{1:[0,0]}}}};function Vi(e,t){switch(t.type){case"TOGGLE_ENABLE_YAXIS_LIMITS":return Kn(Kn({},e),{},{yaxis:Kn(Kn({},e.yaxis),{},{limits:Kn(Kn({},e.yaxis.limits),{},{enable:!e.yaxis.limits.enable})})});case"SET_CUSTOM_STEP":return Kn(Kn({},e),{},{customStep:t.payload});case"SET_YAXIS_LIMITS":return Kn(Kn({},e),{},{yaxis:Kn(Kn({},e.yaxis),{},{limits:Kn(Kn({},e.yaxis.limits),{},{range:t.payload})})});default:throw new Error}}var qi=I({}),Wi=function(){return ue(qi).dispatch},Qi={runQuery:0,topN:ur("topN",10),date:ur("date",yr()(new Date).format(wr)),focusLabel:ur("focusLabel",""),match:ur("match",""),extraLabel:ur("extra_label","")};function Gi(e,t){switch(t.type){case"SET_TOP_N":return Kn(Kn({},e),{},{topN:t.payload});case"SET_DATE":return Kn(Kn({},e),{},{date:t.payload});case"SET_MATCH":return Kn(Kn({},e),{},{match:t.payload});case"SET_EXTRA_LABEL":return Kn(Kn({},e),{},{extraLabel:t.payload});case"SET_FOCUS_LABEL":return Kn(Kn({},e),{},{focusLabel:t.payload});case"RUN_QUERY":return Kn(Kn({},e),{},{runQuery:e.runQuery+1});default:throw new Error}}var Zi=I({}),Ji=function(){return ue(Zi).state},Ki=function(){return ue(Zi).dispatch},Xi={topN:ur("topN",null),maxLifetime:ur("maxLifetime",""),runQuery:0};function eo(e,t){switch(t.type){case"SET_TOP_N":return Kn(Kn({},e),{},{topN:t.payload});case"SET_MAX_LIFE_TIME":return Kn(Kn({},e),{},{maxLifetime:t.payload});case"SET_RUN_QUERY":return Kn(Kn({},e),{},{runQuery:e.runQuery+1});default:throw new Error}}var to,no=I({}),ro=function(){return ue(no).state},io={success:fr(fi,{}),error:fr(si,{}),warning:fr(ci,{}),info:fr(li,{})},oo=function(e){var t=e.variant,n=e.children;return fr("div",{className:Oi()(qn({"vm-alert":!0},"vm-alert_".concat(t),t)),children:[fr("div",{className:"vm-alert__icon",children:io[t||"info"]}),fr("div",{className:"vm-alert__content",children:n})]})},ao=I({showInfoMessage:function(){}}),uo=function(){for(var e=arguments.length,t=new Array(e),n=0;nd,v=r.top-20<0,m=r.left+g.width+20>f,y=r.left-20<0;return h&&(r.top=t.top-g.height-u),v&&(r.top=t.height+t.top+u),m&&(r.left=t.right-g.width-l),y&&(r.left=t.left+l),r}),[n,i,p,t]);d&&co(b,(function(){return v(!1)}),n);var x=Oi()(qn({"vm-popper":!0,"vm-popper_open":p},"vm-popper_open_".concat(l),l));return fr(m,{children:p&&mt.createPortal(fr("div",{className:x,ref:b,style:w,children:t}),document.body)})},fo=function(e){var t=e.children,n=e.title,r=e.open,i=e.placement,o=void 0===i?"bottom-center":i,a=e.offset,u=void 0===a?{top:6,left:0}:a,l=_t(X(!1),2),c=l[0],s=l[1],f=_t(X({width:0,height:0}),2),d=f[0],h=f[1],p=re(null),v=re(null),y=function(){return s(!1)};te((function(){return window.addEventListener("scroll",y),function(){window.removeEventListener("scroll",y)}}),[]),te((function(){v.current&&c&&h({width:v.current.clientWidth,height:v.current.clientHeight})}),[c]);var g=oe((function(){var e,t=null===p||void 0===p||null===(e=p.current)||void 0===e?void 0:e.base;if(!t||!c)return{};var n=t.getBoundingClientRect(),r={top:0,left:0},i="bottom-right"===o||"top-right"===o,a="bottom-left"===o||"top-left"===o,l=null===o||void 0===o?void 0:o.includes("top"),s=(null===u||void 0===u?void 0:u.top)||0,f=(null===u||void 0===u?void 0:u.left)||0;r.left=n.left-(d.width-n.width)/2+f,r.top=n.height+n.top+s,i&&(r.left=n.right-d.width),a&&(r.left=n.left+f),l&&(r.top=n.top-d.height-s);var h=window,v=h.innerWidth,m=h.innerHeight,y=r.top+d.height+20>m,g=r.top-20<0,_=r.left+d.width+20>v,b=r.left-20<0;return y&&(r.top=n.top-d.height-s),g&&(r.top=n.height+n.top+s),_&&(r.left=n.right-d.width-f),b&&(r.left=n.left+f),r.top<0&&(r.top=20),r.left<0&&(r.left=20),r}),[p,o,c,d]),_=function(){"boolean"!==typeof r&&s(!0)},b=function(){s(!1)};return te((function(){"boolean"===typeof r&&s(r)}),[r]),te((function(){var e,t=null===p||void 0===p||null===(e=p.current)||void 0===e?void 0:e.base;if(t)return t.addEventListener("mouseenter",_),t.addEventListener("mouseleave",b),function(){t.removeEventListener("mouseenter",_),t.removeEventListener("mouseleave",b)}}),[p]),fr(m,{children:[fr(m,{ref:p,children:t}),c&&mt.createPortal(fr("div",{className:"vm-tooltip",ref:v,style:g,children:n}),document.body)]})},ho=[{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"}],po=function(){var e=Qr(),t=er(),n=_t(X(!1),2),r=n[0],i=n[1],o=_t(X(ho[0]),2),a=o[0],u=o[1];te((function(){var t,n=a.seconds;return r?t=setInterval((function(){e({type:"RUN_QUERY"})}),1e3*n):u(ho[0]),function(){t&&clearInterval(t)}}),[a,r]);var l=_t(X(!1),2),c=l[0],s=l[1],f=re(null),d=function(e){return function(){!function(e){(r&&!e.seconds||!r&&e.seconds)&&i((function(e){return!e})),u(e),s(!1)}(e)}};return fr(m,{children:[fr("div",{className:"vm-execution-controls",children:fr("div",{className:Oi()({"vm-execution-controls-buttons":!0,"vm-header-button":!t}),children:[fr(fo,{title:"Refresh dashboard",children:fr(lo,{variant:"contained",color:"primary",onClick:function(){e({type:"RUN_QUERY"})},startIcon:fr(di,{})})}),fr(fo,{title:"Auto-refresh control",children:fr("div",{ref:f,children:fr(lo,{variant:"contained",color:"primary",fullWidth:!0,endIcon:fr("div",{className:Oi()({"vm-execution-controls-buttons__arrow":!0,"vm-execution-controls-buttons__arrow_open":c}),children:fr(hi,{})}),onClick:function(){s((function(e){return!e}))},children:a.title})})})]})}),fr(so,{open:c,placement:"bottom-right",onClose:function(){s(!1)},buttonRef:f,children:fr("div",{className:"vm-execution-controls-list",children:ho.map((function(e){return fr("div",{className:Oi()({"vm-list__item":!0,"vm-list__item_active":e.seconds===a.seconds}),onClick:d(e),children:e.title},e.seconds)}))})})]})},vo=function(e){var t=e.relativeTime,n=e.setDuration;return fr("div",{className:"vm-time-duration",children:$r.map((function(e){var r,i=e.id,o=e.duration,a=e.until,u=e.title;return fr("div",{className:Oi()({"vm-list__item":!0,"vm-list__item_active":i===t}),onClick:(r={duration:o,until:a(),id:i},function(){n(r)}),children:u||o},i)}))})},mo=function(e){var t=_t(X({width:0,height:0}),2),n=t[0],r=t[1];return te((function(){var t=new ResizeObserver((function(e){var t=e[0].contentRect,n=t.width,i=t.height;r({width:n,height:i})}));return e&&t.observe(e),function(){e&&t.unobserve(e)}}),[]),n},yo=function(e){var t=e.viewDate,n=e.displayYears,r=e.onChangeViewDate;return fr("div",{className:"vm-calendar-header",children:[fr("div",{className:"vm-calendar-header-left",onClick:e.toggleDisplayYears,children:[fr("span",{className:"vm-calendar-header-left__date",children:t.format("MMMM YYYY")}),fr("div",{className:"vm-calendar-header-left__select-year",children:fr(vi,{})})]}),!n&&fr("div",{className:"vm-calendar-header-right",children:[fr("div",{className:"vm-calendar-header-right__prev",onClick:function(){r(t.subtract(1,"month"))},children:fr(hi,{})}),fr("div",{className:"vm-calendar-header-right__next",onClick:function(){r(t.add(1,"month"))},children:fr(hi,{})})]})]})},go=["Sunday","Monday","Tuesday","Wednesday","Thursday","Friday","Saturday"],_o=function(e){var t=e.viewDate,n=e.selectDate,r=e.onChangeSelectDate,i=yr()().startOf("day"),o=oe((function(){var e=new Array(42).fill(null),n=t.startOf("month"),r=t.endOf("month").diff(n,"day")+1,i=new Array(r).fill(n).map((function(e,t){return e.add(t,"day")})),o=n.day();return e.splice.apply(e,[o,r].concat(bt(i))),e}),[t]),a=function(e){return function(){e&&r(e)}};return fr("div",{className:"vm-calendar-body",children:[go.map((function(e){return fr("div",{className:"vm-calendar-body-cell vm-calendar-body-cell_weekday",children:e[0]},e)})),o.map((function(e,t){return fr("div",{className:Oi()({"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.toISOString())===n.startOf("day").toISOString(),"vm-calendar-body-cell_day_today":(e&&e.toISOString())===i.toISOString()}),onClick:a(e),children:e&&e.format("D")},e?e.toISOString():t)}))]})},bo=function(e){var t=e.viewDate,n=e.onChangeViewDate,r=oe((function(){return t.format("YYYY")}),[t]),i=oe((function(){var e=yr()().subtract(103,"year");return new Array(206).fill(e).map((function(e,t){return e.add(t,"year")}))}),[t]);te((function(){var e=document.getElementById("vm-calendar-year-".concat(r));e&&e.scrollIntoView({block:"center"})}),[]);return fr("div",{className:"vm-calendar-years",children:i.map((function(e){return fr("div",{className:Oi()({"vm-calendar-years__year":!0,"vm-calendar-years__year_selected":e.format("YYYY")===r}),id:"vm-calendar-year-".concat(e.format("YYYY")),onClick:(t=e,function(){n(t)}),children:e.format("YYYY")},e.format("YYYY"));var t}))})};!function(e){e[e.hour=0]="hour",e[e.minutes=1]="minutes",e[e.seconds=2]="seconds"}(to||(to={}));var Do,wo=function(e){var t=e.selectDate,n=e.onChangeTime,r=e.onClose,i=_t(X(to.hour),2),o=i[0],a=i[1],u=_t(X(t.format("HH")),2),l=u[0],c=u[1],s=_t(X(t.format("mm")),2),f=s[0],d=s[1],h=_t(X(t.format("ss")),2),p=h[0],v=h[1],m=oe((function(){return o===to.hour?new Array(24).fill("00").map((function(e,t){return{value:t,degrees:t/12*360,offset:0===t||t>12,title:t?"".concat(t):e}})):new Array(60).fill("00").map((function(e,t){return{value:t,degrees:t/60*360,offset:!1,title:t?"".concat(t):e}}))}),[o,l,f,p]),y=oe((function(){switch(o){case to.hour:return+l/12*360;case to.minutes:return+f/60*360;case to.seconds:return+p/60*360}}),[o,l,f,p]),g=re(null),_=re(null),b=re(null),D=function(e){return function(t){!function(e,t){t.target.select(),a(e)}(e,t)}};return te((function(){n("".concat(l,":").concat(f,":").concat(p))}),[l,f,p]),te((function(){c(t.format("HH")),d(t.format("mm")),v(t.format("ss"))}),[t]),te((function(){g.current&&g.current.focus()}),[]),fr("div",{className:"vm-calendar-time-picker",children:[fr("div",{className:"vm-calendar-time-picker-clock",children:[fr("div",{className:Oi()({"vm-calendar-time-picker-clock__arrow":!0,"vm-calendar-time-picker-clock__arrow_offset":o===to.hour&&("00"===l||+l>12)}),style:{transform:"rotate(".concat(y,"deg)")}}),m.map((function(e){return fr("div",{className:Oi()({"vm-calendar-time-picker-clock__time":!0,"vm-calendar-time-picker-clock__time_offset":e.offset,"vm-calendar-time-picker-clock__time_hide":m.length>24&&e.value%5}),style:{transform:"rotate(".concat(e.degrees,"deg)")},onClick:(t=e.value,function(){var e=String(t);switch(o){case to.hour:c(e),_.current&&_.current.focus();break;case to.minutes:d(e),b.current&&b.current.focus();break;case to.seconds:v(e),r()}}),children:fr("span",{style:{transform:"rotate(-".concat(e.degrees,"deg)")},children:e.title})},e.value);var t}))]}),fr("div",{className:"vm-calendar-time-picker-fields",children:[fr("input",{className:"vm-calendar-time-picker-fields__input",value:l,onChange:function(e){var t=e.target,n=t.value,r=+n>23?"23":n;t.value=r,c(r),n.length>1&&_.current&&_.current.focus()},onFocus:D(to.hour),ref:g,type:"number",min:0,max:24}),fr("span",{children:":"}),fr("input",{className:"vm-calendar-time-picker-fields__input",value:f,onChange:function(e){var t=e.target,n=t.value,r=+n>59?"59":n;t.value=r,d(r),n.length>1&&b.current&&b.current.focus()},onFocus:D(to.minutes),ref:_,type:"number",min:0,max:60}),fr("span",{children:":"}),fr("input",{className:"vm-calendar-time-picker-fields__input",value:p,onChange:function(e){var t=e.target,n=t.value,i=+n>59?"59":n;t.value=i,v(i),n.length>1&&b.current&&r()},onFocus:D(to.seconds),ref:b,type:"number",min:0,max:60})]})]})},xo=[{value:"date",icon:fr(yi,{})},{value:"time",icon:fr(mi,{})}],ko=function(e){var t=e.date,n=e.timepicker,r=void 0!==n&&n,i=e.format,o=void 0===i?xr:i,a=e.onChange,u=e.onClose,l=_t(X(!1),2),c=l[0],s=l[1],f=_t(X(yr()(t)),2),d=f[0],h=f[1],p=_t(X(yr()(t)),2),v=p[0],y=p[1],g=_t(X(xo[0].value),2),_=g[0],b=g[1],D=function(e){h(e),s(!1)};return te((function(){v.format()!==yr()(t).format()&&a(v.format(o))}),[v]),fr("div",{className:"vm-calendar",children:["date"===_&&fr(yo,{viewDate:d,onChangeViewDate:D,toggleDisplayYears:function(){s((function(e){return!e}))},displayYears:c}),"date"===_&&fr(m,{children:[!c&&fr(_o,{viewDate:d,selectDate:v,onChangeSelectDate:function(e){y(e),r&&b("time")}}),c&&fr(bo,{viewDate:d,onChangeViewDate:D})]}),"time"===_&&fr(wo,{selectDate:v,onChangeTime:function(e){var t=_t(e.split(":"),3),n=t[0],r=t[1],i=t[2];y((function(e){return e.set("hour",+n).set("minute",+r).set("second",+i)}))},onClose:function(){u&&u()}}),r&&fr("div",{className:"vm-calendar__tabs",children:fr(Mi,{activeItem:_,items:xo,onChange:function(e){b(e)},indicatorPlacement:"top"})})]})},Co=Ce((function(e,t){var n=e.date,r=e.targetRef,i=e.format,o=void 0===i?xr:i,a=e.timepicker,u=e.onChange,l=_t(X(!1),2),c=l[0],s=l[1],f=oe((function(){return n?yr()(n):yr()()}),[n]),d=function(){s((function(e){return!e}))},h=function(){s(!1)},p=function(e){"Escape"!==e.key&&"Enter"!==e.key||h()};return te((function(){var e;return null===(e=r.current)||void 0===e||e.addEventListener("click",d),function(){var e;null===(e=r.current)||void 0===e||e.removeEventListener("click",d)}}),[r]),te((function(){return window.addEventListener("keyup",p),function(){window.removeEventListener("keyup",p)}}),[]),fr(m,{children:fr(so,{open:c,buttonRef:r,placement:"bottom-right",onClose:h,children:fr("div",{ref:t,children:fr(ko,{date:f,format:o,timepicker:a,onChange:function(e){a||h(),u(e)},onClose:h})})})})})),Eo=Co,Ao=function(){var e=re(null),t=mo(document.body),n=oe((function(){return t.width>1120}),[t]),r=_t(X(),2),i=r[0],o=r[1],a=_t(X(),2),u=a[0],l=a[1],c=oe((function(){return yr()(u).format(xr)}),[u]),s=oe((function(){return yr()(i).format(xr)}),[i]),f=Wr(),d=f.period,h=d.end,p=d.start,v=f.relativeTime,y=Qr(),g=er();te((function(){o(Mr(Pr(h)))}),[h]),te((function(){l(Mr(Pr(p)))}),[p]);var _=oe((function(){return{start:yr()(Pr(p)).format(xr),end:yr()(Pr(h)).format(xr)}}),[p,h]),b=oe((function(){return v&&"none"!==v?v.replace(/_/g," "):"".concat(_.start," - ").concat(_.end)}),[v,_]),D=re(null),w=re(null),x=re(null),k=re(null),C=_t(X(!1),2),E=C[0],A=C[1],S=re(null),F=function(){A(!1)};return co(e,(function(e){var t,n,r=e.target,i=(null===D||void 0===D?void 0:D.current)&&D.current.contains(r),o=(null===w||void 0===w?void 0:w.current)&&w.current.contains(r),a=(null===x||void 0===x?void 0:x.current)&&(null===x||void 0===x||null===(t=x.current)||void 0===t?void 0:t.contains(r)),u=(null===k||void 0===k?void 0:k.current)&&(null===k||void 0===k||null===(n=k.current)||void 0===n?void 0:n.contains(r));i||o||a||u||F()})),fr(m,{children:[fr("div",{ref:S,children:fr(fo,{title:"Time range controls",children:fr(lo,{className:g?"":"vm-header-button",variant:"contained",color:"primary",startIcon:fr(mi,{}),onClick:function(){A((function(e){return!e}))},children:n&&fr("span",{children:b})})})}),fr(so,{open:E,buttonRef:S,placement:"bottom-right",onClose:F,clickOutside:!1,children:fr("div",{className:"vm-time-selector",ref:e,children:[fr("div",{className:"vm-time-selector-left",children:[fr("div",{className:"vm-time-selector-left-inputs",children:[fr("div",{className:"vm-time-selector-left-inputs__date",ref:D,children:[fr("label",{children:"From:"}),fr("span",{children:c}),fr(yi,{}),fr(Eo,{ref:x,date:u||"",onChange:function(e){return l(e)},targetRef:D,timepicker:!0})]}),fr("div",{className:"vm-time-selector-left-inputs__date",ref:w,children:[fr("label",{children:"To:"}),fr("span",{children:s}),fr(yi,{}),fr(Eo,{ref:k,date:i||"",onChange:function(e){return o(e)},targetRef:w,timepicker:!0})]})]}),fr(lo,{variant:"text",startIcon:fr(gi,{}),onClick:function(){return y({type:"RUN_QUERY_TO_NOW"})},children:"switch to now"}),fr("div",{className:"vm-time-selector-left__controls",children:[fr(lo,{color:"error",variant:"outlined",onClick:function(){o(Mr(Pr(h))),l(Mr(Pr(p))),A(!1)},children:"Cancel"}),fr(lo,{color:"primary",onClick:function(){return u&&i&&y({type:"SET_PERIOD",payload:{from:new Date(u),to:new Date(i)}}),void A(!1)},children:"Apply"})]})]}),fr(vo,{relativeTime:v||"",setDuration:function(e){var t=e.duration,n=e.until,r=e.id;y({type:"SET_RELATIVE_TIME",payload:{duration:t,until:n,id:r}}),A(!1)}})]})})]})};!function(e){e.emptyServer="Please enter Server URL",e.validServer="Please provide a valid Server URL",e.validQuery="Please enter a valid Query and execute it"}(Do||(Do={}));var So=function(e){var t=e.label,n=e.value,r=e.type,i=void 0===r?"text":r,o=e.error,a=void 0===o?"":o,u=e.endIcon,l=e.startIcon,c=e.disabled,s=void 0!==c&&c,f=e.autofocus,d=void 0!==f&&f,h=e.helperText,p=e.onChange,v=e.onEnter,m=e.onKeyDown,y=re(null),g=re(null),_=oe((function(){return"textarea"===i?g:y}),[i]),b=Oi()({"vm-text-field__input":!0,"vm-text-field__input_error":a,"vm-text-field__input_icon-start":l,"vm-text-field__input_disabled":s,"vm-text-field__input_textarea":"textarea"===i}),D=function(e){m&&m(e),"Enter"!==e.key||e.shiftKey||(e.preventDefault(),v&&v())},w=function(e){s||p&&p(e.target.value)};return te((function(){var e;d&&(null===_||void 0===_||null===(e=_.current)||void 0===e?void 0:e.focus)&&_.current.focus()}),[_,d]),fr("label",{className:"vm-text-field","data-replicated-value":n,children:[l&&fr("div",{className:"vm-text-field__icon-start",children:l}),u&&fr("div",{className:"vm-text-field__icon-end",children:u}),"textarea"===i?fr("textarea",{className:b,disabled:s,ref:g,value:n,onInput:w,onKeyDown:D,rows:1}):fr("input",{className:b,disabled:s,ref:y,value:n,onInput:w,onKeyDown:D,type:i}),t&&fr("span",{className:"vm-text-field__label",children:t}),fr("span",{className:"vm-text-field__error","data-show":!!a,children:a}),h&&!a&&fr("span",{className:"vm-text-field__helper-text",children:h})]})},Fo=function(e){var t;try{t=new URL(e)}catch(g){return!1}return"http:"===t.protocol||"https:"===t.protocol},No=function(e){var t=e.setServer,n=e.onEnter,r=hr().serverUrl,i=_t(X(""),2),o=i[0],a=i[1],u=_t(X(r),2),l=u[0],c=u[1];return fr(So,{autofocus:!0,label:"Server URL",value:l,error:o,onChange:function(e){var n=e||"";c(n),t(n),a(""),n||a(Do.emptyServer),Fo(n)||a(Do.validServer)},onEnter:function(){n(l)}})},Oo=function(e){var t=e.title,n=e.children,r=e.onClose,i=function(e){"Escape"===e.key&&r()};return te((function(){return window.addEventListener("keyup",i),function(){window.removeEventListener("keyup",i)}}),[]),mt.createPortal(fr("div",{className:"vm-modal",onMouseDown:r,children:fr("div",{className:"vm-modal-content",children:[fr("div",{className:"vm-modal-content-header",children:[t&&fr("div",{className:"vm-modal-content-header__title",children:t}),fr("div",{className:"vm-modal-header__close",children:fr(lo,{variant:"text",size:"small",onClick:r,children:fr(ai,{})})})]}),fr("div",{className:"vm-modal-content-body",onMouseDown:function(e){e.stopPropagation()},children:n})]})}),document.body)},To="Setting Server URL",Bo=function(){var e=hr().serverUrl,t=pr(),n=_t(X(e),2),r=n[0],i=n[1],o=function(e){t({type:"SET_SERVER",payload:e||r}),c()},a=_t(X(!1),2),u=a[0],l=a[1],c=function(){return l(!1)};return fr(m,{children:[fr(fo,{title:To,children:fr(lo,{className:"vm-header-button",variant:"contained",color:"primary",startIcon:fr(oi,{}),onClick:function(){return l(!0)}})}),u&&fr(Oo,{title:To,onClose:c,children:fr("div",{className:"vm-server-configurator",children:[fr("div",{className:"vm-server-configurator__input",children:fr(No,{setServer:i,onEnter:o})}),fr("div",{className:"vm-server-configurator__footer",children:[fr(lo,{variant:"outlined",color:"error",onClick:c,children:"Cancel"}),fr(lo,{variant:"contained",onClick:function(){o()},children:"apply"})]})]})})]})},Mo={windows:"Windows",mac:"Mac OS",linux:"Linux"},Lo=(Object.values(Mo).find((function(e){return navigator.userAgent.indexOf(e)>=0}))||"unknown")===Mo.mac?"Cmd":"Ctrl",Po=[{title:"Query",list:[{keys:["Enter"],description:"Run"},{keys:["Shift","Enter"],description:"Multi-line queries"},{keys:[Lo,"Arrow Up"],description:"Previous command from the Query history"},{keys:[Lo,"Arrow Down"],description:"Next command from the Query history"}]},{title:"Graph",list:[{keys:[Lo,"Scroll Up"],description:"Zoom in"},{keys:[Lo,"Scroll Down"],description:"Zoom out"},{keys:[Lo,"Click and Drag"],description:"Move the graph left/right"}]},{title:"Legend",list:[{keys:["Mouse Click"],description:"Select series"},{keys:[Lo,"Mouse Click"],description:"Toggle multiple series"}]}],$o=function(){var e=_t(X(!1),2),t=e[0],n=e[1],r=er();return fr(m,{children:[fr(fo,{title:"Shortcut keys",placement:"bottom-center",children:fr(lo,{className:r?"":"vm-header-button",variant:"contained",color:"primary",startIcon:fr(_i,{}),onClick:function(){n(!0)}})}),t&&fr(Oo,{title:"Shortcut keys",onClose:function(){n(!1)},children:fr("div",{className:"vm-shortcuts",children:Po.map((function(e){return fr("div",{className:"vm-shortcuts-section",children:[fr("h3",{className:"vm-shortcuts-section__title",children:e.title}),fr("div",{className:"vm-shortcuts-section-list",children:e.list.map((function(e){return fr("div",{className:"vm-shortcuts-section-list-item",children:[fr("div",{className:"vm-shortcuts-section-list-item__key",children:e.keys.map((function(t,n){return fr(m,{children:[fr("code",{children:t},t),n!==e.keys.length-1?"+":""]})}))}),fr("p",{className:"vm-shortcuts-section-list-item__description",children:e.description})]},e.keys.join("+"))}))})]},e.title)}))})})]})},Ro=function(){var e=er(),t=re(null),n=Ji().date,r=Ki(),i=oe((function(){return yr()(n).format(wr)}),[n]);return fr("div",{children:[fr("div",{ref:t,children:fr(fo,{title:"Date control",children:fr(lo,{className:e?"":"vm-header-button",variant:"contained",color:"primary",startIcon:fr(yi,{}),children:i})})}),fr(Eo,{date:n||"",format:wr,onChange:function(e){r({type:"SET_DATE",payload:e})},targetRef:t})]})},Io=function(){var e=Ti("color-primary"),t=er(),n=Xn().headerStyles,r=(n=void 0===n?{}:n).background,i=void 0===r?t?"#FFF":e:r,o=n.color,a=void 0===o?t?e:"#FFF":o,u=An(),l=En(),c=l.search,s=l.pathname,f=oe((function(){return[{label:"Custom panel",value:Zn.home},{label:"Dashboards",value:Zn.dashboards,hide:t},{label:"Cardinality",value:Zn.cardinality},{label:"Top queries",value:Zn.topQueries}]}),[t]),d=_t(X(s),2),h=d[0],p=d[1],v=oe((function(){return(Gn[s]||{}).header||{}}),[s]),m=function(e){u({pathname:e,search:c})};return te((function(){p(s)}),[s]),fr("header",{className:Oi()({"vm-header":!0,"vm-header_app":t}),style:{background:i,color:a},children:[!t&&fr("div",{className:"vm-header-logo",style:{color:a},children:[fr("div",{className:"vm-header-logo__icon",onClick:function(){m(Zn.home),ar({}),window.location.reload()},children:fr(ii,{})}),fr("a",{className:"vm-header-logo__issue",target:"_blank",href:"https://github.com/VictoriaMetrics/VictoriaMetrics/issues/new",rel:"noreferrer",children:"create an issue"})]}),fr("div",{className:"vm-header-nav",children:fr(Mi,{activeItem:h,items:f.filter((function(e){return!e.hide})),color:a,onChange:function(e){p(e),u(e)}})}),fr("div",{className:"vm-header__settings",children:[(null===v||void 0===v?void 0:v.timeSelector)&&fr(Ao,{}),(null===v||void 0===v?void 0:v.cardinalityDatePicker)&&fr(Ro,{}),(null===v||void 0===v?void 0:v.executionControls)&&fr(po,{}),(null===v||void 0===v?void 0:v.globalSettings)&&!t&&fr(Bo,{}),fr($o,{})]})]})},jo=function(){var e=er();return fr("section",{className:"vm-container",children:[fr(Io,{}),fr("div",{className:Oi()({"vm-container-body":!0,"vm-container-body_app":e}),children:fr($n,{})})]})};function zo(e,t){var n="undefined"!==typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(!n){if(Array.isArray(e)||(n=gt(e))||t&&e&&"number"===typeof e.length){n&&(e=n);var r=0,i=function(){};return{s:i,n:function(){return r>=e.length?{done:!0}:{done:!1,value:e[r++]}},e:function(e){throw e},f:i}}throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}var o,a=!0,u=!1;return{s:function(){n=n.call(e)},n:function(){var e=n.next();return a=e.done,e},e:function(e){u=!0,o=e},f:function(){try{a||null==n.return||n.return()}finally{if(u)throw o}}}}var Uo,Ho,Yo="u-off",Vo="u-label",qo="width",Wo="height",Qo="top",Go="bottom",Zo="left",Jo="right",Ko="#000",Xo="#0000",ea="mousemove",ta="mousedown",na="mouseup",ra="mouseenter",ia="mouseleave",oa="dblclick",aa="change",ua="dppxchange",la="undefined"!=typeof window,ca=la?document:null,sa=la?window:null,fa=la?navigator:null;function da(e,t){if(null!=t){var n=e.classList;!n.contains(t)&&n.add(t)}}function ha(e,t){var n=e.classList;n.contains(t)&&n.remove(t)}function pa(e,t,n){e.style[t]=n+"px"}function va(e,t,n,r){var i=ca.createElement(e);return null!=t&&da(i,t),null!=n&&n.insertBefore(i,r),i}function ma(e,t){return va("div",e,t)}var ya=new WeakMap;function ga(e,t,n,r,i){var o="translate("+t+"px,"+n+"px)";o!=ya.get(e)&&(e.style.transform=o,ya.set(e,o),t<0||n<0||t>r||n>i?da(e,Yo):ha(e,Yo))}var _a=new WeakMap;function ba(e,t,n){var r=t+n;r!=_a.get(e)&&(_a.set(e,r),e.style.background=t,e.style.borderColor=n)}var Da=new WeakMap;function wa(e,t,n,r){var i=t+""+n;i!=Da.get(e)&&(Da.set(e,i),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)}var xa={passive:!0},ka=Kn(Kn({},xa),{},{capture:!0});function Ca(e,t,n,r){t.addEventListener(e,n,r?ka:xa)}function Ea(e,t,n,r){t.removeEventListener(e,n,r?ka:xa)}function Aa(e,t,n,r){var i;n=n||0;for(var o=(r=r||t.length-1)<=2147483647;r-n>1;)t[i=o?n+r>>1:qa((n+r)/2)]=t&&i<=n;i+=r)if(null!=e[i])return i;return-1}function Fa(e,t,n,r){var i=nu,o=-nu;if(1==r)i=e[t],o=e[n];else if(-1==r)i=e[n],o=e[t];else for(var a=t;a<=n;a++)null!=e[a]&&(i=Ga(i,e[a]),o=Za(o,e[a]));return[i,o]}function Na(e,t,n){for(var r=nu,i=-nu,o=t;o<=n;o++)e[o]>0&&(r=Ga(r,e[o]),i=Za(i,e[o]));return[r==nu?1:r,i==-nu?10:i]}la&&function e(){var t=devicePixelRatio;Uo!=t&&(Uo=t,Ho&&Ea(aa,Ho,e),Ho=matchMedia("(min-resolution: ".concat(Uo-.001,"dppx) and (max-resolution: ").concat(Uo+.001,"dppx)")),Ca(aa,Ho,e),sa.dispatchEvent(new CustomEvent(ua)))}();var Oa=[0,0];function Ta(e,t,n,r){return Oa[0]=n<0?pu(e,-n):e,Oa[1]=r<0?pu(t,-r):t,Oa}function Ba(e,t,n,r){var i,o,a,u=Ka(e),l=10==n?Xa:eu;return e==t&&(-1==u?(e*=n,t/=n):(e/=n,t*=n)),r?(i=qa(l(e)),o=Qa(l(t)),e=(a=Ta(Ja(n,i),Ja(n,o),i,o))[0],t=a[1]):(i=qa(l(Va(e))),o=qa(l(Va(t))),e=hu(e,(a=Ta(Ja(n,i),Ja(n,o),i,o))[0]),t=du(t,a[1])),[e,t]}function Ma(e,t,n,r){var i=Ba(e,t,n,r);return 0==e&&(i[0]=0),0==t&&(i[1]=0),i}var La={mode:3,pad:.1},Pa={pad:0,soft:null,mode:0},$a={min:Pa,max:Pa};function Ra(e,t,n,r){return xu(n)?ja(e,t,n):(Pa.pad=n,Pa.soft=r?0:null,Pa.mode=r?3:0,ja(e,t,$a))}function Ia(e,t){return null==e?t:e}function ja(e,t,n){var r=n.min,i=n.max,o=Ia(r.pad,0),a=Ia(i.pad,0),u=Ia(r.hard,-nu),l=Ia(i.hard,nu),c=Ia(r.soft,nu),s=Ia(i.soft,-nu),f=Ia(r.mode,0),d=Ia(i.mode,0),h=t-e;h<1e-9&&(h=0,0!=e&&0!=t||(h=1e-9,2==f&&c!=nu&&(o=0),2==d&&s!=-nu&&(a=0)));var p=h||Va(t)||1e3,v=Xa(p),m=Ja(10,qa(v)),y=pu(hu(e-p*(0==h?0==e?.1:1:o),m/10),9),g=e>=c&&(1==f||3==f&&y<=c||2==f&&y>=c)?c:nu,_=Za(u,y=g?g:Ga(g,y)),b=pu(du(t+p*(0==h?0==t?.1:1:a),m/10),9),D=t<=s&&(1==d||3==d&&b>=s||2==d&&b<=s)?s:-nu,w=Ga(l,b>D&&t<=D?D:Za(D,b));return _==w&&0==_&&(w=100),[_,w]}var za=new Intl.NumberFormat(la?fa.language:"en-US"),Ua=function(e){return za.format(e)},Ha=Math,Ya=Ha.PI,Va=Ha.abs,qa=Ha.floor,Wa=Ha.round,Qa=Ha.ceil,Ga=Ha.min,Za=Ha.max,Ja=Ha.pow,Ka=Ha.sign,Xa=Ha.log10,eu=Ha.log2,tu=function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:1;return Ha.asinh(e/t)},nu=1/0;function ru(e){return 1+(0|Xa((e^e>>31)-(e>>31)))}function iu(e,t){return Wa(e/t)*t}function ou(e,t,n){return Ga(Za(e,t),n)}function au(e){return"function"==typeof e?e:function(){return e}}var uu=function(e){return e},lu=function(e,t){return t},cu=function(e){return null},su=function(e){return!0},fu=function(e,t){return e==t};function du(e,t){return Qa(e/t)*t}function hu(e,t){return qa(e/t)*t}function pu(e,t){return Wa(e*(t=Math.pow(10,t)))/t}var vu=new Map;function mu(e){return((""+e).split(".")[1]||"").length}function yu(e,t,n,r){for(var i=[],o=r.map(mu),a=t;a=0&&a>=0?0:u)+(a>=o[c]?0:o[c]),d=pu(s,f);i.push(d),vu.set(d,f)}return i}var gu={},_u=[],bu=[null,null],Du=Array.isArray;function wu(e){return"string"==typeof e}function xu(e){var t=!1;if(null!=e){var n=e.constructor;t=null==n||n==Object}return t}function ku(e){return null!=e&&"object"==typeof e}var Cu=Object.getPrototypeOf(Uint8Array);function Eu(e){var t,n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:xu;if(Du(e)){var r=e.find((function(e){return null!=e}));if(Du(r)||n(r)){t=Array(e.length);for(var i=0;io){for(r=a-1;r>=0&&null==e[r];)e[r--]=null;for(r=a+1;r12?t-12:t},AA:function(e){return e.getHours()>=12?"PM":"AM"},aa:function(e){return e.getHours()>=12?"pm":"am"},a:function(e){return e.getHours()>=12?"p":"a"},mm:function(e){return Pu(e.getMinutes())},m:function(e){return e.getMinutes()},ss:function(e){return Pu(e.getSeconds())},s:function(e){return e.getSeconds()},fff:function(e){return((t=e.getMilliseconds())<10?"00":t<100?"0":"")+t;var t}};function Ru(e,t){t=t||Lu;for(var n,r=[],i=/\{([a-z]+)\}|[^{]+/gi;n=i.exec(e);)r.push("{"==n[0][0]?$u[n[1]]:n[0]);return function(e){for(var n="",i=0;i=a,v=f>=o&&f=i?i:f,N=_+(qa(c)-qa(y))+du(y-_,F);h.push(N);for(var O=t(N),T=O.getHours()+O.getMinutes()/n+O.getSeconds()/r,B=f/r,M=d/u.axes[l]._space;!((N=pu(N+f,1==e?0:3))>s);)if(B>1){var L=qa(pu(T+B,6))%24,P=t(N).getHours()-L;P>1&&(P=-1),T=(T+B)%24,pu(((N-=P*r)-h[h.length-1])/f,3)*M>=.7&&h.push(N)}else h.push(N)}return h}}]}var rl=_t(nl(1),3),il=rl[0],ol=rl[1],al=rl[2],ul=_t(nl(.001),3),ll=ul[0],cl=ul[1],sl=ul[2];function fl(e,t){return e.map((function(e){return e.map((function(n,r){return 0==r||8==r||null==n?n:t(1==r||0==e[8]?n:e[1]+n)}))}))}function dl(e,t){return function(n,r,i,o,a){var u,l,c,s,f,d,h=t.find((function(e){return a>=e[0]}))||t[t.length-1];return r.map((function(t){var n=e(t),r=n.getFullYear(),i=n.getMonth(),o=n.getDate(),a=n.getHours(),p=n.getMinutes(),v=n.getSeconds(),m=r!=u&&h[2]||i!=l&&h[3]||o!=c&&h[4]||a!=s&&h[5]||p!=f&&h[6]||v!=d&&h[7]||h[1];return u=r,l=i,c=o,s=a,f=p,d=v,m(n)}))}}function hl(e,t,n){return new Date(e,t,n)}function pl(e,t){return t(e)}yu(2,-53,53,[1]);function vl(e,t){return function(n,r){return t(e(r))}}var ml={show:!0,live:!0,isolate:!1,markers:{show:!0,width:2,stroke:function(e,t){var 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:[]};var yl=[0,0];function gl(e,t,n){return function(e){0==e.button&&n(e)}}function _l(e,t,n){return n}var bl={show:!0,x:!0,y:!0,lock:!1,move:function(e,t,n){return yl[0]=t,yl[1]=n,yl},points:{show:function(e,t){var n=e.cursor.points,r=ma(),i=n.size(e,t);pa(r,qo,i),pa(r,Wo,i);var o=i/-2;pa(r,"marginLeft",o),pa(r,"marginTop",o);var a=n.width(e,t,i);return a&&pa(r,"borderWidth",a),r},size:function(e,t){return jl(e.series[t].points.width,1)},width:0,stroke:function(e,t){var n=e.series[t].points;return n._stroke||n._fill},fill:function(e,t){var n=e.series[t].points;return n._fill||n._stroke}},bind:{mousedown:gl,mouseup:gl,click:gl,dblclick:gl,mousemove:_l,mouseleave:_l,mouseenter:_l},drag:{setScale:!0,x:!0,y:!1,dist:0,uni:null,_x:!1,_y:!1},focus:{prox:-1},left:-10,top:-10,idx:null,dataIdx:function(e,t,n){return n},idxs:null},Dl={show:!0,stroke:"rgba(0,0,0,0.07)",width:2},wl=Au({},Dl,{filter:lu}),xl=Au({},wl,{size:10}),kl=Au({},Dl,{show:!1}),Cl='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"',El="bold "+Cl,Al={show:!0,scale:"x",stroke:Ko,space:50,gap:5,size:50,labelGap:0,labelSize:30,labelFont:El,side:2,grid:wl,ticks:xl,border:kl,font:Cl,rotate:0},Sl={show:!0,scale:"x",auto:!1,sorted:1,min:nu,max:-nu,idxs:[]};function Fl(e,t,n,r,i){return t.map((function(e){return null==e?"":Ua(e)}))}function Nl(e,t,n,r,i,o,a){for(var u=[],l=vu.get(i)||0,c=n=a?n:pu(du(n,i),l);c<=r;c=pu(c+i,l))u.push(Object.is(c,-0)?0:c);return u}function Ol(e,t,n,r,i,o,a){var u=[],l=e.scales[e.axes[t].scale].log,c=qa((10==l?Xa:eu)(n));i=Ja(l,c),c<0&&(i=pu(i,-c));var s=n;do{u.push(s),(s=pu(s+i,vu.get(i)))>=i*l&&(i=s)}while(s<=r);return u}function Tl(e,t,n,r,i,o,a){var u=e.scales[e.axes[t].scale].asinh,l=r>u?Ol(e,t,Za(u,n),r,i):[u],c=r>=0&&n<=0?[0]:[];return(n<-u?Ol(e,t,Za(u,-r),-n,i):[u]).reverse().map((function(e){return-e})).concat(c,l)}var Bl=/./,Ml=/[12357]/,Ll=/[125]/,Pl=/1/;function $l(e,t,n,r,i){var o=e.axes[n],a=o.scale,u=e.scales[a];if(3==u.distr&&2==u.log)return t;var l=e.valToPos,c=o._space,s=l(10,a),f=l(9,a)-s>=c?Bl:l(7,a)-s>=c?Ml:l(5,a)-s>=c?Ll:Pl;return t.map((function(e){return 4==u.distr&&0==e||f.test(e)?e:null}))}function Rl(e,t){return null==t?"":Ua(t)}var Il={show:!0,scale:"y",stroke:Ko,space:30,gap:5,size:50,labelGap:0,labelSize:30,labelFont:El,side:3,grid:wl,ticks:xl,border:kl,font:Cl,rotate:0};function jl(e,t){return pu((3+2*(e||1))*t,3)}var zl={scale:null,auto:!0,sorted:0,min:nu,max:-nu},Ul={show:!0,auto:!0,sorted:0,alpha:1,facets:[Au({},zl,{scale:"x"}),Au({},zl,{scale:"y"})]},Hl={scale:"y",auto:!0,sorted:0,show:!0,spanGaps:!1,gaps:function(e,t,n,r,i){return i},alpha:1,points:{show:function(e,t){var n=e.series[0],r=n.scale,i=n.idxs,o=e._data[0],a=e.valToPos(o[i[0]],r,!0),u=e.valToPos(o[i[1]],r,!0),l=Va(u-a)/(e.series[t].points.space*Uo);return i[1]-i[0]<=l},filter:null},values:null,min:nu,max:-nu,idxs:[],path:null,clip:null};function Yl(e,t,n,r,i){return n/10}var Vl={time:!0,auto:!0,distr:1,log:10,asinh:1,min:null,max:null,dir:1,ori:0},ql=Au({},Vl,{time:!1,ori:1}),Wl={};function Ql(e,t){var n=Wl[e];return n||(n={key:e,plots:[],sub:function(e){n.plots.push(e)},unsub:function(e){n.plots=n.plots.filter((function(t){return t!=e}))},pub:function(e,t,r,i,o,a,u){for(var l=0;l0){a=new Path2D;for(var u=0==t?uc:lc,l=n,c=0;cs[0]){var f=s[0]-l;f>0&&u(a,l,r,f,r+o),l=s[1]}}var d=n+i-l;d>0&&u(a,l,r,d,r+o)}return a}function ec(e,t,n,r,i,o,a){for(var u=[],l=1==i?n:r;l>=n&&l<=r;l+=i){if(null===t[l]){var c=l,s=l;if(1==i)for(;++l<=r&&null===t[l];)s=l;else for(;--l>=n&&null===t[l];)s=l;var f=o(e[c]),d=s==c?f:o(e[s]);f=a<=0?o(e[c-i]):f,(d=a>=0?o(e[s+i]):d)>=f&&u.push([f,d])}}return u}function tc(e){return 0==e?uu:1==e?Wa:function(t){return iu(t,e)}}function nc(e){var t=0==e?rc:ic,n=0==e?function(e,t,n,r,i,o){e.arcTo(t,n,r,i,o)}:function(e,t,n,r,i,o){e.arcTo(n,t,i,r,o)},r=0==e?function(e,t,n,r,i){e.rect(t,n,r,i)}:function(e,t,n,r,i){e.rect(n,t,i,r)};return function(e,i,o,a,u){var l=arguments.length>5&&void 0!==arguments[5]?arguments[5]:0;0==l?r(e,i,o,a,u):(l=Ga(l,a/2,u/2),t(e,i+l,o),n(e,i+a,o,i+a,o+u,l),n(e,i+a,o+u,i,o+u,l),n(e,i,o+u,i,o,l),n(e,i,o,i+a,o,l),e.closePath())}}var rc=function(e,t,n){e.moveTo(t,n)},ic=function(e,t,n){e.moveTo(n,t)},oc=function(e,t,n){e.lineTo(t,n)},ac=function(e,t,n){e.lineTo(n,t)},uc=nc(0),lc=nc(1),cc=function(e,t,n,r,i,o){e.arc(t,n,r,i,o)},sc=function(e,t,n,r,i,o){e.arc(n,t,r,i,o)},fc=function(e,t,n,r,i,o,a){e.bezierCurveTo(t,n,r,i,o,a)},dc=function(e,t,n,r,i,o,a){e.bezierCurveTo(n,t,i,r,a,o)};function hc(e){return function(e,t,n,r,i){return Gl(e,t,(function(t,o,a,u,l,c,s,f,d,h,p){var v,m,y=t.pxRound,g=t.points;0==u.ori?(v=rc,m=cc):(v=ic,m=sc);var _=pu(g.width*Uo,3),b=(g.size-g.width)/2*Uo,D=pu(2*b,3),w=new Path2D,x=new Path2D,k=e.bbox,C=k.left,E=k.top,A=k.width,S=k.height;uc(x,C-D,E-D,A+2*D,S+2*D);var F=function(e){if(null!=a[e]){var t=y(c(o[e],u,h,f)),n=y(s(a[e],l,p,d));v(w,t+b,n),m(w,t,n,b,0,2*Ya)}};if(i)i.forEach(F);else for(var N=n;N<=r;N++)F(N);return{stroke:_>0?w:null,fill:w,clip:x,flags:3}}))}}function pc(e){return function(t,n,r,i,o,a){r!=i&&(o!=r&&a!=r&&e(t,n,r),o!=i&&a!=i&&e(t,n,i),e(t,n,a))}}var vc=pc(oc),mc=pc(ac);function yc(e){var t=Ia(null===e||void 0===e?void 0:e.alignGaps,0);return function(e,n,r,i){return Gl(e,n,(function(o,a,u,l,c,s,f,d,h,p,v){var m,y,g=o.pxRound,_=function(e){return g(s(e,l,p,d))},b=function(e){return g(f(e,c,v,h))};0==l.ori?(m=oc,y=vc):(m=ac,y=mc);for(var D,w,x,k=l.dir*(0==l.ori?1:-1),C={stroke:new Path2D,fill:null,clip:null,band:null,gaps:null,flags:1},E=C.stroke,A=nu,S=-nu,F=_(a[1==k?r:i]),N=Sa(u,r,i,1*k),O=Sa(u,r,i,-1*k),T=_(a[N]),B=_(a[O]),M=1==k?r:i;M>=r&&M<=i;M+=k){var L=_(a[M]);L==F?null!=u[M]&&(w=b(u[M]),A==nu&&(m(E,L,w),D=w),A=Ga(w,A),S=Za(w,S)):(A!=nu&&(y(E,F,A,S,D,w),x=F),null!=u[M]?(m(E,L,w=b(u[M])),A=S=D=w):(A=nu,S=-nu),F=L)}A!=nu&&A!=S&&x!=F&&y(E,F,A,S,D,w);var P=_t(Zl(e,n),2),$=P[0],R=P[1];if(null!=o.fill||0!=$){var I=C.fill=new Path2D(E),j=b(o.fillTo(e,n,o.min,o.max,$));m(I,B,j),m(I,T,j)}if(!o.spanGaps){var z,U=[];(z=U).push.apply(z,bt(ec(a,u,r,i,k,_,t))),C.gaps=U=o.gaps(e,n,r,i,U),C.clip=Xl(U,l.ori,d,h,p,v)}return 0!=R&&(C.band=2==R?[Kl(e,n,r,i,E,-1),Kl(e,n,r,i,E,1)]:Kl(e,n,r,i,E,R)),C}))}}function gc(e,t,n,r,i,o){var a=e.length;if(a<2)return null;var u=new Path2D;if(n(u,e[0],t[0]),2==a)r(u,e[1],t[1]);else{for(var l=Array(a),c=Array(a-1),s=Array(a-1),f=Array(a-1),d=0;d0!==c[h]>0?l[h]=0:(l[h]=3*(f[h-1]+f[h])/((2*f[h]+f[h-1])/c[h-1]+(f[h]+2*f[h-1])/c[h]),isFinite(l[h])||(l[h]=0));l[a-1]=c[a-2];for(var p=0;p=i&&o+(l<5?vu.get(l):0)<=17)return[l,c]}while(++u0?e:t.clamp(r,e,t.min,t.max,t.key)):4==t.distr?tu(e,t.asinh):e)-t._min)/(t._max-t._min)}function a(e,t,n,r){var i=o(e,t);return r+n*(-1==t.dir?1-i:i)}function u(e,t,n,r){var i=o(e,t);return r+n*(-1==t.dir?i:1-i)}function l(e,t,n,r){return 0==t.ori?a(e,t,n,r):u(e,t,n,r)}r.valToPosH=a,r.valToPosV=u;var c=!1;r.status=0;var s=r.root=ma("uplot");(null!=e.id&&(s.id=e.id),da(s,e.class),e.title)&&(ma("u-title",s).textContent=e.title);var f=va("canvas"),d=r.ctx=f.getContext("2d"),h=ma("u-wrap",s),p=r.under=ma("u-under",h);h.appendChild(f);var v=r.over=ma("u-over",h),m=+Ia((e=Eu(e)).pxAlign,1),y=tc(m);(e.plugins||[]).forEach((function(t){t.opts&&(e=t.opts(r,e)||e)}));var g=e.ms||.001,_=r.series=1==i?xc(e.series||[],Sl,Hl,!1):function(e,t){return e.map((function(e,n){return 0==n?null:Au({},t,e)}))}(e.series||[null],Ul),b=r.axes=xc(e.axes||[],Al,Il,!0),D=r.scales={},w=r.bands=e.bands||[];w.forEach((function(e){e.fill=au(e.fill||null),e.dir=Ia(e.dir,-1)}));var x=2==i?_[1].facets[0].scale:_[0].scale,k={axes:function(){for(var e=function(e){var t=b[e];if(!t.show||!t._show)return"continue";var n=t.side,i=n%2,o=void 0,a=void 0,u=t.stroke(r,e),c=0==n||3==n?-1:1;if(t.label){var s=t.labelGap*c,f=Wa((t._lpos+s)*Uo);Je(t.labelFont[0],u,"center",2==n?Qo:Go),d.save(),1==i?(o=a=0,d.translate(f,Wa(de+pe/2)),d.rotate((3==n?-Ya:Ya)/2)):(o=Wa(fe+he/2),a=f),d.fillText(t.label,o,a),d.restore()}var h=_t(t._found,2),p=h[0],v=h[1];if(0==v)return"continue";var m=D[t.scale],g=0==i?he:pe,_=0==i?fe:de,w=Wa(t.gap*Uo),x=t._splits,k=2==m.distr?x.map((function(e){return qe[e]})):x,C=2==m.distr?qe[x[1]]-qe[x[0]]:p,E=t.ticks,A=t.border,S=E.show?Wa(E.size*Uo):0,F=t._rotate*-Ya/180,N=y(t._pos*Uo),O=N+(S+w)*c;a=0==i?O:0,o=1==i?O:0,Je(t.font[0],u,1==t.align?Zo:2==t.align?Jo:F>0?Zo:F<0?Jo:0==i?"center":3==n?Jo:Zo,F||1==i?"middle":2==n?Qo:Go);for(var T=1.5*t.font[1],B=x.map((function(e){return y(l(e,m,g,_))})),M=t._values,L=0;L0&&(_.forEach((function(e,n){if(n>0&&e.show&&null==e._paths){var i=function(e){var t=ou(He-1,0,Ne-1),n=ou(Ye+1,0,Ne-1);for(;null==e[t]&&t>0;)t--;for(;null==e[n]&&n0&&e.show){je!=e.alpha&&(d.globalAlpha=je=e.alpha),Xe(t,!1),e._paths&&et(t,!1),Xe(t,!0);var n=e.points.show(r,t,He,Ye),i=e.points.filter(r,t,n,e._paths?e._paths.gaps:null);(n||i)&&(e.points._paths=e.points.paths(r,t,He,Ye,i),et(t,!0)),1!=je&&(d.globalAlpha=je=1),on("drawSeries",t)}})))}},C=(e.drawOrder||["axes","series"]).map((function(e){return k[e]}));function E(t){var n=D[t];if(null==n){var r=(e.scales||gu)[t]||gu;if(null!=r.from)E(r.from),D[t]=Au({},D[r.from],r,{key:t});else{(n=D[t]=Au({},t==x?Vl:ql,r)).key=t;var o=n.time,a=n.range,u=Du(a);if((t!=x||2==i&&!o)&&(!u||null!=a[0]&&null!=a[1]||(a={min:null==a[0]?La:{mode:1,hard:a[0],soft:a[0]},max:null==a[1]?La:{mode:1,hard:a[1],soft:a[1]}},u=!1),!u&&xu(a))){var l=a;a=function(e,t,n){return null==t?bu:Ra(t,n,l)}}n.range=au(a||(o?Ec:t==x?3==n.distr?Fc:4==n.distr?Oc:Cc:3==n.distr?Sc:4==n.distr?Nc:Ac)),n.auto=au(!u&&n.auto),n.clamp=au(n.clamp||Yl),n._min=n._max=null}}}for(var A in E("x"),E("y"),1==i&&_.forEach((function(e){E(e.scale)})),b.forEach((function(e){E(e.scale)})),e.scales)E(A);var S,F,N=D[x],O=N.distr;0==N.ori?(da(s,"u-hz"),S=a,F=u):(da(s,"u-vt"),S=u,F=a);var T={};for(var B in D){var M=D[B];null==M.min&&null==M.max||(T[B]={min:M.min,max:M.max},M.min=M.max=null)}var L,P=e.tzDate||function(e){return new Date(Wa(e/g))},$=e.fmtDate||Ru,R=1==g?al(P):sl(P),I=dl(P,fl(1==g?ol:cl,$)),j=vl(P,pl("{YYYY}-{MM}-{DD} {h}:{mm}{aa}",$)),z=[],U=r.legend=Au({},ml,e.legend),H=U.show,Y=U.markers;U.idxs=z,Y.width=au(Y.width),Y.dash=au(Y.dash),Y.stroke=au(Y.stroke),Y.fill=au(Y.fill);var V,q=[],W=[],Q=!1,G={};if(U.live){var Z=_[1]?_[1].values:null;for(var J in V=(Q=null!=Z)?Z(r,1,0):{_:0})G[J]="--"}if(H)if(L=va("table","u-legend",s),Q){var K=va("tr","u-thead",L);for(var X in va("th",null,K),V)va("th",Vo,K).textContent=X}else da(L,"u-inline"),U.live&&da(L,"u-live");var ee={show:!0},te={show:!1};var ne=new Map;function re(e,t,n){var i=ne.get(t)||{},o=we.bind[e](r,t,n);o&&(Ca(e,t,i[e]=o),ne.set(t,i))}function ie(e,t,n){var r=ne.get(t)||{};for(var i in r)null!=e&&i!=e||(Ea(i,t,r[i]),delete r[i]);null==e&&ne.delete(t)}var oe=0,ae=0,ue=0,le=0,ce=0,se=0,fe=0,de=0,he=0,pe=0;r.bbox={};var ve=!1,me=!1,ye=!1,ge=!1,_e=!1;function be(e,t,n){(n||e!=r.width||t!=r.height)&&De(e,t),ut(!1),ye=!0,me=!0,ge=_e=we.left>=0,wt()}function De(e,t){r.width=oe=ue=e,r.height=ae=le=t,ce=se=0,function(){var e=!1,t=!1,n=!1,r=!1;b.forEach((function(i,o){if(i.show&&i._show){var a=i.side,u=a%2,l=i._size+(null!=i.label?i.labelSize:0);l>0&&(u?(ue-=l,3==a?(ce+=l,r=!0):n=!0):(le-=l,0==a?(se+=l,e=!0):t=!0))}})),Se[0]=e,Se[1]=n,Se[2]=t,Se[3]=r,ue-=Ue[1]+Ue[3],ce+=Ue[3],le-=Ue[2]+Ue[0],se+=Ue[0]}(),function(){var e=ce+ue,t=se+le,n=ce,r=se;function i(i,o){switch(i){case 1:return(e+=o)-o;case 2:return(t+=o)-o;case 3:return(n-=o)+o;case 0:return(r-=o)+o}}b.forEach((function(e,t){if(e.show&&e._show){var n=e.side;e._pos=i(n,e._size),null!=e.label&&(e._lpos=i(n,e.labelSize))}}))}();var n=r.bbox;fe=n.left=iu(ce*Uo,.5),de=n.top=iu(se*Uo,.5),he=n.width=iu(ue*Uo,.5),pe=n.height=iu(le*Uo,.5)}r.setSize=function(e){be(e.width,e.height)};var we=r.cursor=Au({},bl,{drag:{y:2==i}},e.cursor);we.idxs=z,we._lock=!1;var xe=we.points;xe.show=au(xe.show),xe.size=au(xe.size),xe.stroke=au(xe.stroke),xe.width=au(xe.width),xe.fill=au(xe.fill);var ke=r.focus=Au({},e.focus||{alpha:.3},we.focus),Ce=ke.prox>=0,Ee=[null];function Ae(e,t){if(1==i||t>0){var n=1==i&&D[e.scale].time,o=e.value;e.value=n?wu(o)?vl(P,pl(o,$)):o||j:o||Rl,e.label=e.label||(n?"Time":"Value")}if(t>0){e.width=null==e.width?1:e.width,e.paths=e.paths||Dc||cu,e.fillTo=au(e.fillTo||Jl),e.pxAlign=+Ia(e.pxAlign,m),e.pxRound=tc(e.pxAlign),e.stroke=au(e.stroke||null),e.fill=au(e.fill||null),e._stroke=e._fill=e._paths=e._focus=null;var a=jl(e.width,1),u=e.points=Au({},{size:a,width:Za(1,.2*a),stroke:e.stroke,space:2*a,paths:wc,_stroke:null,_fill:null},e.points);u.show=au(u.show),u.filter=au(u.filter),u.fill=au(u.fill),u.stroke=au(u.stroke),u.paths=au(u.paths),u.pxAlign=e.pxAlign}if(H){var l=function(e,t){if(0==t&&(Q||!U.live||2==i))return bu;var n=[],o=va("tr","u-series",L,L.childNodes[t]);da(o,e.class),e.show||da(o,Yo);var a=va("th",null,o);if(Y.show){var u=ma("u-marker",a);if(t>0){var l=Y.width(r,t);l&&(u.style.border=l+"px "+Y.dash(r,t)+" "+Y.stroke(r,t)),u.style.background=Y.fill(r,t)}}var c=ma(Vo,a);for(var s in c.textContent=e.label,t>0&&(Y.show||(c.style.color=e.width>0?Y.stroke(r,t):Y.fill(r,t)),re("click",a,(function(t){if(!we._lock){var n=_.indexOf(e);if((t.ctrlKey||t.metaKey)!=U.isolate){var r=_.some((function(e,t){return t>0&&t!=n&&e.show}));_.forEach((function(e,t){t>0&&Pt(t,r?t==n?ee:te:ee,!0,an.setSeries)}))}else Pt(n,{show:!e.show},!0,an.setSeries)}})),Ce&&re(ra,a,(function(t){we._lock||Pt(_.indexOf(e),$t,!0,an.setSeries)}))),V){var f=va("td","u-value",o);f.textContent="--",n.push(f)}return[o,n]}(e,t);q.splice(t,0,l[0]),W.splice(t,0,l[1]),U.values.push(null)}if(we.show){z.splice(t,0,null);var c=function(e,t){if(t>0){var n=we.points.show(r,t);if(n)return da(n,"u-cursor-pt"),da(n,e.class),ga(n,-10,-10,ue,le),v.insertBefore(n,Ee[t]),n}}(e,t);c&&Ee.splice(t,0,c)}on("addSeries",t)}r.addSeries=function(e,t){e=kc(e,t=null==t?_.length:t,Sl,Hl),_.splice(t,0,e),Ae(_[t],t)},r.delSeries=function(e){if(_.splice(e,1),H){U.values.splice(e,1),W.splice(e,1);var t=q.splice(e,1)[0];ie(null,t.firstChild),t.remove()}we.show&&(z.splice(e,1),Ee.length>1&&Ee.splice(e,1)[0].remove()),on("delSeries",e)};var Se=[!1,!1,!1,!1];function Fe(e,t,n,r){var i=_t(n,4),o=i[0],a=i[1],u=i[2],l=i[3],c=t%2,s=0;return 0==c&&(l||a)&&(s=0==t&&!o||2==t&&!u?Wa(Al.size/3):0),1==c&&(o||u)&&(s=1==t&&!a||3==t&&!l?Wa(Il.size/2):0),s}var Ne,Oe,Te,Be,Me,Le,Pe,$e,Re,Ie,je,ze=r.padding=(e.padding||[Fe,Fe,Fe,Fe]).map((function(e){return au(Ia(e,Fe))})),Ue=r._padding=ze.map((function(e,t){return e(r,t,Se,0)})),He=null,Ye=null,Ve=1==i?_[0].idxs:null,qe=null,We=!1;function Qe(e,n){if(t=null==e?[]:Eu(e,ku),2==i){Ne=0;for(var o=1;o<_.length;o++)Ne+=t[o][0].length;r.data=t=e}else if(null==t[0]&&(t[0]=[]),r.data=t.slice(),qe=t[0],Ne=qe.length,2==O){t[0]=Array(Ne);for(var a=0;a=0,_e=!0,wt()}}function Ge(){var e,n;if(We=!0,1==i)if(Ne>0){if(He=Ve[0]=0,Ye=Ve[1]=Ne-1,e=t[0][He],n=t[0][Ye],2==O)e=He,n=Ye;else if(1==Ne)if(3==O){var r=_t(Ba(e,e,N.log,!1),2);e=r[0],n=r[1]}else if(4==O){var o=_t(Ma(e,e,N.log,!1),2);e=o[0],n=o[1]}else if(N.time)n=e+Wa(86400/g);else{var a=_t(Ra(e,n,.1,!0),2);e=a[0],n=a[1]}}else He=Ve[0]=e=null,Ye=Ve[1]=n=null;Lt(x,e,n)}function Ze(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:Xo,t=arguments.length>1?arguments[1]:void 0,n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:_u,r=arguments.length>3&&void 0!==arguments[3]?arguments[3]:"butt",i=arguments.length>4&&void 0!==arguments[4]?arguments[4]:Xo,o=arguments.length>5&&void 0!==arguments[5]?arguments[5]:"round";e!=Oe&&(d.strokeStyle=Oe=e),i!=Te&&(d.fillStyle=Te=i),t!=Be&&(d.lineWidth=Be=t),o!=Le&&(d.lineJoin=Le=o),r!=Pe&&(d.lineCap=Pe=r),n!=Me&&d.setLineDash(Me=n)}function Je(e,t,n,r){t!=Te&&(d.fillStyle=Te=t),e!=$e&&(d.font=$e=e),n!=Re&&(d.textAlign=Re=n),r!=Ie&&(d.textBaseline=Ie=r)}function Ke(e,t,n,i){var o=arguments.length>4&&void 0!==arguments[4]?arguments[4]:0;if(i.length>0&&e.auto(r,We)&&(null==t||null==t.min)){var a=Ia(He,0),u=Ia(Ye,i.length-1),l=null==n.min?3==e.distr?Na(i,a,u):Fa(i,a,u,o):[n.min,n.max];e.min=Ga(e.min,n.min=l[0]),e.max=Za(e.max,n.max=l[1])}}function Xe(e,t){var n=t?_[e].points:_[e];n._stroke=n.stroke(r,e),n._fill=n.fill(r,e)}function et(e,n){var i=n?_[e].points:_[e],o=i._stroke,a=i._fill,u=i._paths,l=u.stroke,c=u.fill,s=u.clip,f=u.flags,h=null,p=pu(i.width*Uo,3),v=p%2/2;n&&null==a&&(a=p>0?"#fff":o);var m=1==i.pxAlign;if(m&&d.translate(v,v),!n){var y=fe,g=de,b=he,D=pe,x=p*Uo/2;0==i.min&&(D+=x),0==i.max&&(g-=x,D+=x),(h=new Path2D).rect(y,g,b,D)}n?tt(o,p,i.dash,i.cap,a,l,c,f,s):function(e,n,i,o,a,u,l,c,s,f,d){var h=!1;w.forEach((function(p,v){if(p.series[0]==e){var m,y=_[p.series[1]],g=t[p.series[1]],b=(y._paths||gu).band;Du(b)&&(b=1==p.dir?b[0]:b[1]);var D=null;y.show&&b&&function(e,t,n){for(t=Ia(t,0),n=Ia(n,e.length-1);t<=n;){if(null!=e[t])return!0;t++}return!1}(g,He,Ye)?(D=p.fill(r,v)||u,m=y._paths.clip):b=null,tt(n,i,o,a,D,l,c,s,f,d,m,b),h=!0}})),h||tt(n,i,o,a,u,l,c,s,f,d)}(e,o,p,i.dash,i.cap,a,l,c,f,h,s),m&&d.translate(-v,-v)}r.setData=Qe;function tt(e,t,n,r,i,o,a,u,l,c,s,f){Ze(e,t,n,r,i),(l||c||f)&&(d.save(),l&&d.clip(l),c&&d.clip(c)),f?3==(3&u)?(d.clip(f),s&&d.clip(s),rt(i,a),nt(e,o,t)):2&u?(rt(i,a),d.clip(f),nt(e,o,t)):1&u&&(d.save(),d.clip(f),s&&d.clip(s),rt(i,a),d.restore(),nt(e,o,t)):(rt(i,a),nt(e,o,t)),(l||c||f)&&d.restore()}function nt(e,t,n){n>0&&(t instanceof Map?t.forEach((function(e,t){d.strokeStyle=Oe=t,d.stroke(e)})):null!=t&&e&&d.stroke(t))}function rt(e,t){t instanceof Map?t.forEach((function(e,t){d.fillStyle=Te=t,d.fill(e)})):null!=t&&e&&d.fill(t)}function it(e,t,n,r,i,o,a,u,l,c){var s=a%2/2;1==m&&d.translate(s,s),Ze(u,a,l,c,u),d.beginPath();var f,h,p,v,y=i+(0==r||3==r?-o:o);0==n?(h=i,v=y):(f=i,p=y);for(var g=0;g0&&(t._paths=null,e&&(1==i?(t.min=null,t.max=null):t.facets.forEach((function(e){e.min=null,e.max=null}))))}))}var lt,ct,st,ft,dt,ht,pt,vt,mt,yt,gt,bt,Dt=!1;function wt(){Dt||(Fu(xt),Dt=!0)}function xt(){ve&&(!function(){var e=Eu(D,ku);for(var n in e){var o=e[n],a=T[n];if(null!=a&&null!=a.min)Au(o,a),n==x&&ut(!0);else if(n!=x||2==i)if(0==Ne&&null==o.from){var u=o.range(r,null,null,n);o.min=u[0],o.max=u[1]}else o.min=nu,o.max=-nu}if(Ne>0)for(var l in _.forEach((function(n,o){if(1==i){var a=n.scale,u=e[a],l=T[a];if(0==o){var c=u.range(r,u.min,u.max,a);u.min=c[0],u.max=c[1],He=Aa(u.min,t[0]),Ye=Aa(u.max,t[0]),t[0][He]u.max&&Ye--,n.min=qe[He],n.max=qe[Ye]}else n.show&&n.auto&&Ke(u,l,n,t[o],n.sorted);n.idxs[0]=He,n.idxs[1]=Ye}else if(o>0&&n.show&&n.auto){var s=_t(n.facets,2),f=s[0],d=s[1],h=f.scale,p=d.scale,v=_t(t[o],2),m=v[0],y=v[1];Ke(e[h],T[h],f,m,f.sorted),Ke(e[p],T[p],d,y,d.sorted),n.min=d.min,n.max=d.max}})),e){var c=e[l],s=T[l];if(null==c.from&&(null==s||null==s.min)){var f=c.range(r,c.min==nu?null:c.min,c.max==-nu?null:c.max,l);c.min=f[0],c.max=f[1]}}for(var d in e){var h=e[d];if(null!=h.from){var p=e[h.from];if(null==p.min)h.min=h.max=null;else{var v=h.range(r,p.min,p.max,d);h.min=v[0],h.max=v[1]}}}var m={},y=!1;for(var g in e){var b=e[g],w=D[g];if(w.min!=b.min||w.max!=b.max){w.min=b.min,w.max=b.max;var k=w.distr;w._min=3==k?Xa(w.min):4==k?tu(w.min,w.asinh):w.min,w._max=3==k?Xa(w.max):4==k?tu(w.max,w.asinh):w.max,m[g]=y=!0}}if(y){for(var C in _.forEach((function(e,t){2==i?t>0&&m.y&&(e._paths=null):m[e.scale]&&(e._paths=null)})),m)ye=!0,on("setScale",C);we.show&&(ge=_e=we.left>=0)}for(var E in T)T[E]=null}(),ve=!1),ye&&(!function(){for(var e=!1,t=0;!e;){var n=ot(++t),i=at(t);(e=3==t||n&&i)||(De(r.width,r.height),me=!0)}}(),ye=!1),me&&(pa(p,Zo,ce),pa(p,Qo,se),pa(p,qo,ue),pa(p,Wo,le),pa(v,Zo,ce),pa(v,Qo,se),pa(v,qo,ue),pa(v,Wo,le),pa(h,qo,oe),pa(h,Wo,ae),f.width=Wa(oe*Uo),f.height=Wa(ae*Uo),b.forEach((function(e){var t=e._el,n=e._show,r=e._size,i=e._pos,o=e.side;if(null!=t)if(n){var a=o%2==1;pa(t,a?"left":"top",i-(3===o||0===o?r:0)),pa(t,a?"width":"height",r),pa(t,a?"top":"left",a?se:ce),pa(t,a?"height":"width",a?le:ue),ha(t,Yo)}else da(t,Yo)})),Oe=Te=Be=Le=Pe=$e=Re=Ie=Me=null,je=1,Wt(!0),on("setSize"),me=!1),oe>0&&ae>0&&(d.clearRect(0,0,f.width,f.height),on("drawClear"),C.forEach((function(e){return e()})),on("draw")),we.show&&ge&&(Vt(null,!0,!1),ge=!1),c||(c=!0,r.status=1,on("ready")),We=!1,Dt=!1}function kt(e,n){var i=D[e];if(null==i.from){if(0==Ne){var o=i.range(r,n.min,n.max,e);n.min=o[0],n.max=o[1]}if(n.min>n.max){var a=n.min;n.min=n.max,n.max=a}if(Ne>1&&null!=n.min&&null!=n.max&&n.max-n.min<1e-16)return;e==x&&2==i.distr&&Ne>0&&(n.min=Aa(n.min,t[0]),n.max=Aa(n.max,t[0]),n.min==n.max&&n.max++),T[e]=n,ve=!0,wt()}}r.redraw=function(e,t){ye=t||!1,!1!==e?Lt(x,N.min,N.max):wt()},r.setScale=kt;var Ct=!1,Et=we.drag,At=Et.x,St=Et.y;we.show&&(we.x&&(lt=ma("u-cursor-x",v)),we.y&&(ct=ma("u-cursor-y",v)),0==N.ori?(st=lt,ft=ct):(st=ct,ft=lt),gt=we.left,bt=we.top);var Ft,Nt,Ot,Tt=r.select=Au({show:!0,over:!0,left:0,width:0,top:0,height:0},e.select),Bt=Tt.show?ma("u-select",Tt.over?v:p):null;function Mt(e,t){if(Tt.show){for(var n in e)pa(Bt,n,Tt[n]=e[n]);!1!==t&&on("setSelect")}}function Lt(e,t,n){kt(e,{min:t,max:n})}function Pt(e,t,n,o){null!=t.focus&&function(e){if(e!=Ot){var t=null==e,n=1!=ke.alpha;_.forEach((function(r,i){var o=t||0==i||i==e;r._focus=t?null:o,n&&function(e,t){_[e].alpha=t,we.show&&Ee[e]&&(Ee[e].style.opacity=t);H&&q[e]&&(q[e].style.opacity=t)}(i,o?1:ke.alpha)})),Ot=e,n&&wt()}}(e),null!=t.show&&_.forEach((function(n,r){r>0&&(e==r||null==e)&&(n.show=t.show,function(e,t){var n=_[e],r=H?q[e]:null;n.show?r&&ha(r,Yo):(r&&da(r,Yo),Ee.length>1&&ga(Ee[e],-10,-10,ue,le))}(r,t.show),Lt(2==i?n.facets[1].scale:n.scale,null,null),wt())})),!1!==n&&on("setSeries",e,t),o&&cn("setSeries",r,e,t)}r.setSelect=Mt,r.setSeries=Pt,r.addBand=function(e,t){e.fill=au(e.fill||null),e.dir=Ia(e.dir,-1),t=null==t?w.length:t,w.splice(t,0,e)},r.setBand=function(e,t){Au(w[e],t)},r.delBand=function(e){null==e?w.length=0:w.splice(e,1)};var $t={focus:!0};function Rt(e,t,n){var r=D[t];n&&(e=e/Uo-(1==r.ori?se:ce));var i=ue;1==r.ori&&(e=(i=le)-e),-1==r.dir&&(e=i-e);var o=r._min,a=o+(r._max-o)*(e/i),u=r.distr;return 3==u?Ja(10,a):4==u?function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:1;return Ha.sinh(e)*t}(a,r.asinh):a}function It(e,t){pa(Bt,Zo,Tt.left=e),pa(Bt,qo,Tt.width=t)}function jt(e,t){pa(Bt,Qo,Tt.top=e),pa(Bt,Wo,Tt.height=t)}H&&Ce&&Ca(ia,L,(function(e){we._lock||null!=Ot&&Pt(null,$t,!0,an.setSeries)})),r.valToIdx=function(e){return Aa(e,t[0])},r.posToIdx=function(e,n){return Aa(Rt(e,x,n),t[0],He,Ye)},r.posToVal=Rt,r.valToPos=function(e,t,n){return 0==D[t].ori?a(e,D[t],n?he:ue,n?fe:0):u(e,D[t],n?pe:le,n?de:0)},r.batch=function(e){e(r),wt()},r.setCursor=function(e,t,n){gt=e.left,bt=e.top,Vt(null,t,n)};var zt=0==N.ori?It:jt,Ut=1==N.ori?It:jt;function Ht(e,t){if(null!=e){var n=e.idx;U.idx=n,_.forEach((function(e,t){(t>0||!Q)&&Yt(t,n)}))}H&&U.live&&function(){if(H&&U.live)for(var e=2==i?1:0;e<_.length;e++)if(0!=e||!Q){var t=U.values[e],n=0;for(var r in t)W[e][n++].firstChild.nodeValue=t[r]}}(),_e=!1,!1!==t&&on("setLegend")}function Yt(e,n){var i;if(null==n)i=G;else{var o=_[e],a=0==e&&2==O?qe:t[e];i=Q?o.values(r,e,n):{_:o.value(r,a[n],e,n)}}U.values[e]=i}function Vt(e,n,o){mt=gt,yt=bt;var a,u=_t(we.move(r,gt,bt),2);gt=u[0],bt=u[1],we.show&&(st&&ga(st,Wa(gt),0,ue,le),ft&&ga(ft,0,Wa(bt),ue,le));var l=He>Ye;Ft=nu;var s=0==N.ori?ue:le,f=1==N.ori?ue:le;if(gt<0||0==Ne||l){a=null;for(var d=0;d<_.length;d++)d>0&&Ee.length>1&&ga(Ee[d],-10,-10,ue,le);if(Ce&&Pt(null,$t,!0,null==e&&an.setSeries),U.live){z.fill(null),_e=!0;for(var h=0;h<_.length;h++)U.values[h]=G}}else{var p,v;1==i&&(a=Aa(p=Rt(0==N.ori?gt:bt,x),t[0],He,Ye),v=du(S(t[0][a],N,s,0),.5));for(var m=2==i?1:0;m<_.length;m++){var y=_[m],g=z[m],b=1==i?t[m][g]:t[m][1][g],w=we.dataIdx(r,m,a,p),k=1==i?t[m][w]:t[m][1][w];_e=_e||k!=b||w!=g,z[m]=w;var C=w==a?v:du(S(1==i?t[0][w]:t[m][0][w],N,s,0),.5);if(m>0&&y.show){var E=null==k?-10:du(F(k,1==i?D[y.scale]:D[y.facets[1].scale],f,0),.5);if(E>0&&1==i){var A=Va(E-bt);A<=Ft&&(Ft=A,Nt=m)}var O=void 0,T=void 0;if(0==N.ori?(O=C,T=E):(O=E,T=C),_e&&Ee.length>1){ba(Ee[m],we.points.fill(r,m),we.points.stroke(r,m));var B=void 0,M=void 0,L=void 0,P=void 0,$=!0,R=we.points.bbox;if(null!=R){$=!1;var I=R(r,m);L=I.left,P=I.top,B=I.width,M=I.height}else L=O,P=T,B=M=we.points.size(r,m);wa(Ee[m],B,M,$),ga(Ee[m],L,P,ue,le)}}if(U.live){if(!_e||0==m&&Q)continue;Yt(m,w)}}}if(we.idx=a,we.left=gt,we.top=bt,_e&&(U.idx=a,Ht()),Tt.show&&Ct)if(null!=e){var j=_t(an.scales,2),H=j[0],Y=j[1],V=_t(an.match,2),q=V[0],W=V[1],Z=_t(e.cursor.sync.scales,2),J=Z[0],K=Z[1],X=e.cursor.drag;if(At=X._x,St=X._y,At||St){var ee,te,ne,re,ie,oe=e.select,ae=oe.left,ce=oe.top,se=oe.width,fe=oe.height,de=e.scales[H].ori,he=e.posToVal,pe=null!=H&&q(H,J),ve=null!=Y&&W(Y,K);pe&&At?(0==de?(ee=ae,te=se):(ee=ce,te=fe),ne=D[H],re=S(he(ee,J),ne,s,0),ie=S(he(ee+te,J),ne,s,0),zt(Ga(re,ie),Va(ie-re))):zt(0,s),ve&&St?(1==de?(ee=ae,te=se):(ee=ce,te=fe),ne=D[Y],re=F(he(ee,K),ne,f,0),ie=F(he(ee+te,K),ne,f,0),Ut(Ga(re,ie),Va(ie-re))):Ut(0,f)}else Jt()}else{var me=Va(mt-dt),ye=Va(yt-ht);if(1==N.ori){var ge=me;me=ye,ye=ge}At=Et.x&&me>=Et.dist,St=Et.y&&ye>=Et.dist;var be,De,xe=Et.uni;null!=xe?At&&St&&(St=ye>=xe,(At=me>=xe)||St||(ye>me?St=!0:At=!0)):Et.x&&Et.y&&(At||St)&&(At=St=!0),At&&(0==N.ori?(be=pt,De=gt):(be=vt,De=bt),zt(Ga(be,De),Va(De-be)),St||Ut(0,f)),St&&(1==N.ori?(be=pt,De=gt):(be=vt,De=bt),Ut(Ga(be,De),Va(De-be)),At||zt(0,s)),At||St||(zt(0,0),Ut(0,0))}if(Et._x=At,Et._y=St,null==e){if(o){if(null!=un){var Ae=_t(an.scales,2),Se=Ae[0],Fe=Ae[1];an.values[0]=null!=Se?Rt(0==N.ori?gt:bt,Se):null,an.values[1]=null!=Fe?Rt(1==N.ori?gt:bt,Fe):null}cn(ea,r,gt,bt,ue,le,a)}if(Ce){var Oe=o&&an.setSeries,Te=ke.prox;null==Ot?Ft<=Te&&Pt(Nt,$t,!0,Oe):Ft>Te?Pt(null,$t,!0,Oe):Nt!=Ot&&Pt(Nt,$t,!0,Oe)}}c&&!1!==n&&on("setCursor")}r.setLegend=Ht;var qt=null;function Wt(e){!0===e?qt=null:on("syncRect",qt=v.getBoundingClientRect())}function Qt(e,t,n,r,i,o,a){we._lock||(Gt(e,t,n,r,i,o,a,!1,null!=e),null!=e?Vt(null,!0,!0):Vt(t,!0,!1))}function Gt(e,t,n,i,o,a,u,c,s){if(null==qt&&Wt(!1),null!=e)n=e.clientX-qt.left,i=e.clientY-qt.top;else{if(n<0||i<0)return gt=-10,void(bt=-10);var f=_t(an.scales,2),d=f[0],h=f[1],p=t.cursor.sync,v=_t(p.values,2),m=v[0],y=v[1],g=_t(p.scales,2),_=g[0],b=g[1],w=_t(an.match,2),x=w[0],k=w[1],C=t.axes[0].side%2==1,E=0==N.ori?ue:le,A=1==N.ori?ue:le,S=C?a:o,F=C?o:a,O=C?i:n,T=C?n:i;if(n=null!=_?x(d,_)?l(m,D[d],E,0):-10:E*(O/S),i=null!=b?k(h,b)?l(y,D[h],A,0):-10:A*(T/F),1==N.ori){var B=n;n=i,i=B}}if(s&&((n<=1||n>=ue-1)&&(n=iu(n,ue)),(i<=1||i>=le-1)&&(i=iu(i,le))),c){dt=n,ht=i;var M=_t(we.move(r,n,i),2);pt=M[0],vt=M[1]}else gt=n,bt=i}var Zt={width:0,height:0};function Jt(){Mt(Zt,!1)}function Kt(e,t,n,i,o,a,u){Ct=!0,At=St=Et._x=Et._y=!1,Gt(e,t,n,i,o,a,0,!0,!1),null!=e&&(re(na,ca,Xt),cn(ta,r,pt,vt,ue,le,null))}function Xt(e,t,n,i,o,a,u){Ct=Et._x=Et._y=!1,Gt(e,t,n,i,o,a,0,!1,!0);var l=Tt.left,c=Tt.top,s=Tt.width,f=Tt.height,d=s>0||f>0;if(d&&Mt(Tt),Et.setScale&&d){var h=l,p=s,v=c,m=f;if(1==N.ori&&(h=c,p=f,v=l,m=s),At&&Lt(x,Rt(h,x),Rt(h+p,x)),St)for(var y in D){var g=D[y];y!=x&&null==g.from&&g.min!=nu&&Lt(y,Rt(v+m,y),Rt(v,y))}Jt()}else we.lock&&(we._lock=!we._lock,we._lock||Vt(null,!0,!1));null!=e&&(ie(na,ca),cn(na,r,gt,bt,ue,le,null))}function en(e,t,n,i,o,a,u){Ge(),Jt(),null!=e&&cn(oa,r,gt,bt,ue,le,null)}function tn(){b.forEach(Mc),be(r.width,r.height,!0)}Ca(ua,sa,tn);var nn={};nn.mousedown=Kt,nn.mousemove=Qt,nn.mouseup=Xt,nn.dblclick=en,nn.setSeries=function(e,t,n,r){Pt(n,r,!0,!1)},we.show&&(re(ta,v,Kt),re(ea,v,Qt),re(ra,v,Wt),re(ia,v,(function(e,t,n,r,i,o,a){if(!we._lock){var u=Ct;if(Ct){var l,c,s=!0,f=!0;0==N.ori?(l=At,c=St):(l=St,c=At),l&&c&&(s=gt<=10||gt>=ue-10,f=bt<=10||bt>=le-10),l&&s&&(gt=gt=3?$l:lu)),e.font=Bc(e.font),e.labelFont=Bc(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&&(Se[t]=!0,e._el=ma("u-axis",h))}})),n?n instanceof HTMLElement?(n.appendChild(s),sn()):n(r,sn):sn(),r}Lc.assign=Au,Lc.fmtNum=Ua,Lc.rangeNum=Ra,Lc.rangeLog=Ba,Lc.rangeAsinh=Ma,Lc.orient=Gl,Lc.pxRatio=Uo,Lc.join=function(e,t){for(var n=new Set,r=0;r=o&&S<=a;S+=k){var F=c[S];if(null!=F){var N=_(l[S]),O=b(F);1==t?D(x,N,C):D(x,A,O),D(x,N,O),C=O,A=N}}var T=_t(Zl(e,i),2),B=T[0],M=T[1];if(null!=u.fill||0!=B){var L=w.fill=new Path2D(x),P=b(u.fillTo(e,i,u.min,u.max,B));D(L,A,P),D(L,E,P)}if(!u.spanGaps){var $,R=[];($=R).push.apply($,bt(ec(l,c,o,a,k,_,r)));var I=u.width*Uo/2,j=n||1==t?I:-I,z=n||-1==t?-I:I;R.forEach((function(e){e[0]+=j,e[1]+=z})),w.gaps=R=u.gaps(e,i,o,a,R),w.clip=Xl(R,s.ori,p,v,m,y)}return 0!=M&&(w.band=2==M?[Kl(e,i,o,a,x,-1),Kl(e,i,o,a,x,1)]:Kl(e,i,o,a,x,M)),w}))}},Pc.bars=function(e){var t=Ia((e=e||gu).size,[.6,nu,1]),n=e.align||0,r=(e.gap||0)*Uo,i=Ia(e.radius,0),o=1-t[0],a=Ia(t[1],nu)*Uo,u=Ia(t[2],1)*Uo,l=Ia(e.disp,gu),c=Ia(e.each,(function(e){})),s=l.fill,f=l.stroke;return function(e,t,d,h){return Gl(e,t,(function(p,v,m,y,g,_,b,D,w,x,k){var C,E,A=p.pxRound,S=y.dir*(0==y.ori?1:-1),F=g.dir*(1==g.ori?1:-1),N=0==y.ori?uc:lc,O=0==y.ori?c:function(e,t,n,r,i,o,a){c(e,t,n,i,r,a,o)},T=_t(Zl(e,t),2),B=T[0],M=T[1],L=3==g.distr?1==B?g.max:g.min:0,P=b(L,g,k,w),$=A(p.width*Uo),R=!1,I=null,j=null,z=null,U=null;null==s||0!=$&&null==f||(R=!0,I=s.values(e,t,d,h),j=new Map,new Set(I).forEach((function(e){null!=e&&j.set(e,new Path2D)})),$>0&&(z=f.values(e,t,d,h),U=new Map,new Set(z).forEach((function(e){null!=e&&U.set(e,new Path2D)}))));var H=l.x0,Y=l.size;if(null!=H&&null!=Y){v=H.values(e,t,d,h),2==H.unit&&(v=v.map((function(t){return e.posToVal(D+t*x,y.key,!0)})));var V=Y.values(e,t,d,h);E=A((E=2==Y.unit?V[0]*x:_(V[0],y,x,D)-_(0,y,x,D))-$),C=1==S?-$/2:E+$/2}else{var q=x;if(v.length>1)for(var W=null,Q=0,G=1/0;Q=d&&Q<=h;Q+=S){var ie=m[Q];if(void 0!==ie){var oe=_(2!=y.distr||null!=l?v[Q]:Q,y,x,D),ae=b(Ia(ie,L),g,k,w);null!=re&&null!=ie&&(P=b(re[Q],g,k,w));var ue=A(oe-C),le=A(Za(ae,P)),ce=A(Ga(ae,P)),se=le-ce,fe=i*E;null!=ie&&(R?($>0&&null!=z[Q]&&N(U.get(z[Q]),ue,ce+qa($/2),E,Za(0,se-$),fe),null!=I[Q]&&N(j.get(I[Q]),ue,ce+qa($/2),E,Za(0,se-$),fe)):N(X,ue,ce+qa($/2),E,Za(0,se-$),fe),O(e,t,Q,ue-$/2,ce,E+$,se)),0!=M&&(F*M==1?(le=ce,ce=J):(ce=le,le=J),N(ee,ue-$/2,ce,E+$,Za(0,se=le-ce),0))}}return $>0&&(K.stroke=R?U:X),K.fill=R?j:X,K}))}},Pc.spline=function(e){return function(e,t){var n=Ia(null===t||void 0===t?void 0:t.alignGaps,0);return function(t,r,i,o){return Gl(t,r,(function(a,u,l,c,s,f,d,h,p,v,m){var y,g,_,b=a.pxRound,D=function(e){return b(f(e,c,v,h))},w=function(e){return b(d(e,s,m,p))};0==c.ori?(y=rc,_=oc,g=fc):(y=ic,_=ac,g=dc);var x=c.dir*(0==c.ori?1:-1);i=Sa(l,i,o,1),o=Sa(l,i,o,-1);for(var k=D(u[1==x?i:o]),C=k,E=[],A=[],S=1==x?i:o;S>=i&&S<=o;S+=x)if(null!=l[S]){var F=D(u[S]);E.push(C=F),A.push(w(l[S]))}var N={stroke:e(E,A,y,_,g,b),fill:null,clip:null,band:null,gaps:null,flags:1},O=N.stroke,T=_t(Zl(t,r),2),B=T[0],M=T[1];if(null!=a.fill||0!=B){var L=N.fill=new Path2D(O),P=w(a.fillTo(t,r,a.min,a.max,B));_(L,C,P),_(L,k,P)}if(!a.spanGaps){var $,R=[];($=R).push.apply($,bt(ec(u,l,i,o,x,D,n))),N.gaps=R=a.gaps(t,r,i,o,R),N.clip=Xl(R,c.ori,h,p,v,m)}return 0!=M&&(N.band=2==M?[Kl(t,r,i,o,O,-1),Kl(t,r,i,o,O,1)]:Kl(t,r,i,o,O,M)),N}))}}(gc,e)};var $c,Rc={height:500,legend:{show:!1},cursor:{drag:{x:!0,y:!1},focus:{prox:30},points:{size:5.6,width:1.4},bind:{click:function(){return null},dblclick:function(){return null}}}},Ic=function(e){return void 0===e||null===e?"":e.toLocaleString("en-US",{maximumSignificantDigits:20})},jc=function(e,t,n,r){var i,o=e.axes[n];if(r>1)return o._size||60;var a=6+((null===o||void 0===o||null===(i=o.ticks)||void 0===i?void 0:i.size)||0)+(o.gap||0),u=(null!==t&&void 0!==t?t:[]).reduce((function(e,t){return t.length>e.length?t:e}),"");return""!=u&&(a+=function(e,t){var n=document.createElement("span");n.innerText=e,n.style.cssText="position: absolute; z-index: -1; pointer-events: none; opacity: 0; font: ".concat(t),document.body.appendChild(n);var r=n.offsetWidth;return n.remove(),r}(u,e.ctx.font)),Math.ceil(a)},zc=function(e){return function(e){for(var t=0,n=0;n>8*i&255).toString(16)).substr(-2);return r}(e)},Uc=function(e){return e.replace(/^\[\d+]/,"").replace(/{.+}/gim,"")},Hc=function(e){for(var t=e.length,n=-1/0;t--;){var r=e[t];Number.isFinite(r)&&r>n&&(n=r)}return Number.isFinite(n)?n:null},Yc=function(e){for(var t=e.length,n=1/0;t--;){var r=e[t];Number.isFinite(r)&&r2&&void 0!==arguments[2]?arguments[2]:"";return t.map((function(e){return"".concat(Ic(e)," ").concat(n)}))}(e,n,t)}};return e?Number(e)%2?n:Kn(Kn({},n),{},{side:1}):{space:80}}))},qc=function(e,t){if(null==e||null==t)return[-1,1];var n=.02*(Math.abs(t-e)||Math.abs(e)||1);return[e-n,t+n]},Wc=function(e){var t,n,r=e.u,i=e.tooltipIdx,o=e.metrics,a=e.series,u=e.tooltip,l=e.tooltipOffset,c=e.unit,s=void 0===c?"":c,f=i.seriesIdx,d=i.dataIdx;if(null!==f&&void 0!==d){var h=r.data[f][d],p=r.data[0][d],v=(null===(t=o[f-1])||void 0===t?void 0:t.metric)||{},m=a[f],y=zc(m.label||""),g=r.over.getBoundingClientRect(),_=g.width,b=g.height,D=r.valToPos(h||0,(null===(n=a[f])||void 0===n?void 0:n.scale)||"1"),w=r.valToPos(p,"x"),x=u.getBoundingClientRect(),k=x.width,C=x.height,E=w+k>=_,A=D+C>=b;u.style.display="grid",u.style.top="".concat(l.top+D+10-(A?C+10:0),"px"),u.style.left="".concat(l.left+w+10-(E?k+20:0),"px");var S=(m.label||"").replace(/{.+}/gim,"").trim(),F=Uc(S),N=yr()(new Date(1e3*p)).format("YYYY-MM-DD HH:mm:ss:SSS (Z)"),O=Object.keys(v).filter((function(e){return"__name__"!==e})).map((function(e){return"
    ".concat(e,": ").concat(v[e],"
    ")})).join(""),T='
    ');u.innerHTML="
    ".concat(N,'
    \n
    \n ').concat(T).concat(F,': ').concat(Ic(h)," ").concat(s,'\n
    \n
    ').concat(O,"
    ")}},Qc=n(61),Gc=n.n(Qc);!function(e){e.xRange="xRange",e.yRange="yRange",e.data="data"}($c||($c={}));var Zc=function(e){var t=e.data,n=e.series,r=e.metrics,i=void 0===r?[]:r,o=e.period,a=e.yaxis,u=e.unit,l=e.setPeriod,c=e.container,s=re(null),f=_t(X(!1),2),d=f[0],h=f[1],p=_t(X({min:o.start,max:o.end}),2),v=p[0],m=p[1],y=_t(X(),2),g=y[0],_=y[1],b=mo(c),D=document.createElement("div");D.className="u-tooltip";var w={seriesIdx:null,dataIdx:void 0},x={left:0,top:0},k=ae(Gc()((function(e){var t=e.min,n=e.max;l({from:new Date(1e3*t),to:new Date(1e3*n)})}),500),[]),C=function(e){var t=e.u,n=e.min,r=e.max,i=1e3*(r-n);iSr||(t.setScale("x",{min:n,max:r}),m({min:n,max:r}),k({min:n,max:r}))},E=function(e){var t=e.target,n=e.ctrlKey,r=e.metaKey,i=e.key,o=t instanceof HTMLInputElement||t instanceof HTMLTextAreaElement;if(g&&!o){var a="+"===i||"="===i;if(("-"===i||a)&&!n&&!r){e.preventDefault();var u=(v.max-v.min)/10*(a?1:-1);C({u:g,min:v.min+u,max:v.max-u})}}},A=function(){return[v.min,v.max]},S=function(e){var 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;return a.limits.enable?a.limits.range[r]:qc(t,n)},F=Kn(Kn({},Rc),{},{series:n,axes:Vc([{},{scale:"1"}],u),scales:Kn({},function(){var e={x:{range:A}},t=Object.keys(a.limits.range);return(t.length?t:["1"]).forEach((function(t){e[t]={range:function(e){var n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:0,r=arguments.length>2&&void 0!==arguments[2]?arguments[2]:1;return S(e,n,r,t)}}})),e}()),width:b.width||400,plugins:[{hooks:{ready:function(e){var t;x.left=parseFloat(e.over.style.left),x.top=parseFloat(e.over.style.top),null===(t=e.root.querySelector(".u-wrap"))||void 0===t||t.appendChild(D),e.over.addEventListener("mousedown",(function(t){var n=t.ctrlKey,r=t.metaKey;0===t.button&&(n||r)&&function(e){var t=e.e,n=e.factor,r=void 0===n?.85:n,i=e.u,o=e.setPanning,a=e.setPlotScale;t.preventDefault(),o(!0);var u=t.clientX,l=i.posToVal(1,"x")-i.posToVal(0,"x"),c=i.scales.x.min||0,s=i.scales.x.max||0,f=function(e){e.preventDefault();var t=l*((e.clientX-u)*r);a({u:i,min:c-t,max:s-t})};document.addEventListener("mousemove",f),document.addEventListener("mouseup",(function e(){o(!1),document.removeEventListener("mousemove",f),document.removeEventListener("mouseup",e)}))}({u:e,e:t,setPanning:h,setPlotScale:C,factor:.9})})),e.over.addEventListener("wheel",(function(t){if(t.ctrlKey||t.metaKey){t.preventDefault();var n=e.over.getBoundingClientRect().width,r=e.cursor.left&&e.cursor.left>0?e.cursor.left:0,i=e.posToVal(r,"x"),o=(e.scales.x.max||0)-(e.scales.x.min||0),a=t.deltaY<0?.9*o:o/.9,u=i-r/n*a,l=u+a;e.batch((function(){return C({u:e,min:u,max:l})}))}}))},setCursor:function(e){w.dataIdx!==e.cursor.idx&&(w.dataIdx=e.cursor.idx||0,null!==w.seriesIdx&&void 0!==w.dataIdx&&Wc({u:e,tooltipIdx:w,metrics:i,series:n,tooltip:D,tooltipOffset:x,unit:u}))},setSeries:function(e,t){w.seriesIdx!==t&&(w.seriesIdx=t,t&&void 0!==w.dataIdx?Wc({u:e,tooltipIdx:w,metrics:i,series:n,tooltip:D,tooltipOffset:x,unit:u}):D.style.display="none")}}}],hooks:{setSelect:[function(e){var t=e.posToVal(e.select.left,"x"),n=e.posToVal(e.select.left+e.select.width,"x");C({u:e,min:t,max:n})}]}}),N=function(e){if(g){switch(e){case $c.xRange:g.scales.x.range=A;break;case $c.yRange:Object.keys(a.limits.range).forEach((function(e){g.scales[e]&&(g.scales[e].range=function(t){var n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:0,r=arguments.length>2&&void 0!==arguments[2]?arguments[2]:1;return S(t,n,r,e)})}));break;case $c.data:g.setData(t)}d||g.redraw()}};return te((function(){return m({min:o.start,max:o.end})}),[o]),te((function(){if(s.current){var e=new Lc(F,t,s.current);return _(e),m({min:o.start,max:o.end}),e.destroy}}),[s.current,n,b]),te((function(){return window.addEventListener("keydown",E),function(){window.removeEventListener("keydown",E)}}),[v]),te((function(){return N($c.data)}),[t]),te((function(){return N($c.xRange)}),[v]),te((function(){return N($c.yRange)}),[a]),fr("div",{className:Oi()({"vm-line-chart":!0,"vm-line-chart_panning":d}),children:fr("div",{ref:s})})};function Jc(){Jc=function(){return e};var e={},t=Object.prototype,n=t.hasOwnProperty,r=Object.defineProperty||function(e,t,n){e[t]=n.value},i="function"==typeof Symbol?Symbol:{},o=i.iterator||"@@iterator",a=i.asyncIterator||"@@asyncIterator",u=i.toStringTag||"@@toStringTag";function l(e,t,n){return Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}),e[t]}try{l({},"")}catch(S){l=function(e,t,n){return e[t]=n}}function c(e,t,n,i){var o=t&&t.prototype instanceof d?t:d,a=Object.create(o.prototype),u=new C(i||[]);return r(a,"_invoke",{value:D(e,n,u)}),a}function s(e,t,n){try{return{type:"normal",arg:e.call(t,n)}}catch(S){return{type:"throw",arg:S}}}e.wrap=c;var f={};function d(){}function h(){}function p(){}var v={};l(v,o,(function(){return this}));var m=Object.getPrototypeOf,y=m&&m(m(E([])));y&&y!==t&&n.call(y,o)&&(v=y);var g=p.prototype=d.prototype=Object.create(v);function _(e){["next","throw","return"].forEach((function(t){l(e,t,(function(e){return this._invoke(t,e)}))}))}function b(e,t){function i(r,o,a,u){var l=s(e[r],e,o);if("throw"!==l.type){var c=l.arg,f=c.value;return f&&"object"==St(f)&&n.call(f,"__await")?t.resolve(f.__await).then((function(e){i("next",e,a,u)}),(function(e){i("throw",e,a,u)})):t.resolve(f).then((function(e){c.value=e,a(c)}),(function(e){return i("throw",e,a,u)}))}u(l.arg)}var o;r(this,"_invoke",{value:function(e,n){function r(){return new t((function(t,r){i(e,n,t,r)}))}return o=o?o.then(r,r):r()}})}function D(e,t,n){var r="suspendedStart";return function(i,o){if("executing"===r)throw new Error("Generator is already running");if("completed"===r){if("throw"===i)throw o;return A()}for(n.method=i,n.arg=o;;){var a=n.delegate;if(a){var u=w(a,n);if(u){if(u===f)continue;return u}}if("next"===n.method)n.sent=n._sent=n.arg;else if("throw"===n.method){if("suspendedStart"===r)throw r="completed",n.arg;n.dispatchException(n.arg)}else"return"===n.method&&n.abrupt("return",n.arg);r="executing";var l=s(e,t,n);if("normal"===l.type){if(r=n.done?"completed":"suspendedYield",l.arg===f)continue;return{value:l.arg,done:n.done}}"throw"===l.type&&(r="completed",n.method="throw",n.arg=l.arg)}}}function w(e,t){var n=e.iterator[t.method];if(void 0===n){if(t.delegate=null,"throw"===t.method){if(e.iterator.return&&(t.method="return",t.arg=void 0,w(e,t),"throw"===t.method))return f;t.method="throw",t.arg=new TypeError("The iterator does not provide a 'throw' method")}return f}var r=s(n,e.iterator,t.arg);if("throw"===r.type)return t.method="throw",t.arg=r.arg,t.delegate=null,f;var i=r.arg;return i?i.done?(t[e.resultName]=i.value,t.next=e.nextLoc,"return"!==t.method&&(t.method="next",t.arg=void 0),t.delegate=null,f):i:(t.method="throw",t.arg=new TypeError("iterator result is not an object"),t.delegate=null,f)}function x(e){var t={tryLoc:e[0]};1 in e&&(t.catchLoc=e[1]),2 in e&&(t.finallyLoc=e[2],t.afterLoc=e[3]),this.tryEntries.push(t)}function k(e){var t=e.completion||{};t.type="normal",delete t.arg,e.completion=t}function C(e){this.tryEntries=[{tryLoc:"root"}],e.forEach(x,this),this.reset(!0)}function E(e){if(e){var t=e[o];if(t)return t.call(e);if("function"==typeof e.next)return e;if(!isNaN(e.length)){var r=-1,i=function t(){for(;++r=0;--i){var o=this.tryEntries[i],a=o.completion;if("root"===o.tryLoc)return r("end");if(o.tryLoc<=this.prev){var u=n.call(o,"catchLoc"),l=n.call(o,"finallyLoc");if(u&&l){if(this.prev=0;--r){var i=this.tryEntries[r];if(i.tryLoc<=this.prev&&n.call(i,"finallyLoc")&&this.prev=0;--t){var n=this.tryEntries[t];if(n.finallyLoc===e)return this.complete(n.completion,n.afterLoc),k(n),f}},catch:function(e){for(var t=this.tryEntries.length-1;t>=0;--t){var n=this.tryEntries[t];if(n.tryLoc===e){var r=n.completion;if("throw"===r.type){var i=r.arg;k(n)}return i}}throw new Error("illegal catch attempt")},delegateYield:function(e,t,n){return this.delegate={iterator:E(e),resultName:t,nextLoc:n},"next"===this.method&&(this.arg=void 0),f}},e}function Kc(e,t,n,r,i,o,a){try{var u=e[o](a),l=u.value}catch(c){return void n(c)}u.done?t(l):Promise.resolve(l).then(r,i)}function Xc(e){return function(){var t=this,n=arguments;return new Promise((function(r,i){var o=e.apply(t,n);function a(e){Kc(o,r,i,a,u,"next",e)}function u(e){Kc(o,r,i,a,u,"throw",e)}a(void 0)}))}}var es=function(e){var t=e.legend,n=e.onChange,r=_t(X(""),2),i=r[0],o=r[1],a=oe((function(){return function(e){var t=Object.keys(e.freeFormFields).filter((function(e){return"__name__"!==e}));return t.map((function(t){var n="".concat(t,'="').concat(e.freeFormFields[t],'"');return{id:"".concat(e.label,".").concat(n),freeField:n,key:t}}))}(t)}),[t]),u=function(){var e=Xc(Jc().mark((function e(t,n){return Jc().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,navigator.clipboard.writeText(t);case 2:o(n),setTimeout((function(){return o("")}),2e3);case 4:case"end":return e.stop()}}),e)})));return function(t,n){return e.apply(this,arguments)}}();return fr("div",{className:Oi()({"vm-legend-item":!0,"vm-legend-item_hide":!t.checked}),onClick:function(e){return function(t){n(e,t.ctrlKey||t.metaKey)}}(t),children:[fr("div",{className:"vm-legend-item__marker",style:{backgroundColor:t.color}}),fr("div",{className:"vm-legend-item-info",children:[fr("span",{className:"vm-legend-item-info__label",children:Uc(t.label)}),"\xa0{",a.map((function(e){return fr(fo,{open:i===e.id,title:"Copied!",placement:"top-center",children:fr("span",{className:"vm-legend-item-info__free-fields",onClick:(t=e.freeField,n=e.id,function(e){e.stopPropagation(),u(t,n)}),children:e.freeField},e.key)},e.id);var t,n})),"}"]})]})},ts=function(e){var t=e.labels,n=e.query,r=e.onChange,i=oe((function(){return Array.from(new Set(t.map((function(e){return e.group}))))}),[t]);return fr(m,{children:fr("div",{className:"vm-legend",children:i.map((function(e){return fr("div",{className:"vm-legend-group",children:[fr("div",{className:"vm-legend-group-title",children:[fr("span",{className:"vm-legend-group-title__count",children:["Query ",e,": "]}),fr("span",{className:"vm-legend-group-title__query",children:n[e-1]})]}),fr("div",{children:t.filter((function(t){return t.group===e})).map((function(e){return fr(es,{legend:e,onChange:r},e.label)}))})]},e)}))})})};function ns(e,t){if(null==e)return{};var n,r,i=function(e,t){if(null==e)return{};var n,r,i={},o=Object.keys(e);for(r=0;r=0||(i[n]=e[n]);return i}(e,t);if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(e);for(r=0;r=0||Object.prototype.propertyIsEnumerable.call(e,n)&&(i[n]=e[n])}return i}var rs=["__name__"],is=function(e,t,n){var r=function(e,t){var n=e.metric,r=n.__name__,i=ns(n,rs),o=t||r||"";return 0===Object.keys(e.metric).length?o||"Result ".concat(e.group):"".concat(o," {").concat(Object.entries(i).map((function(e){return"".concat(e[0],": ").concat(e[1])})).join(", "),"}")}(e,n[e.group-1]),i="[".concat(e.group,"]").concat(r);return{label:i,freeFormFields:e.metric,width:1.4,stroke:zc(i),show:!as(i,t),scale:"1",points:{size:4.2,width:1.4}}},os=function(e,t){return{group:t,label:e.label||"",color:e.stroke,checked:e.show||!1,freeFormFields:e.freeFormFields}},as=function(e,t){return t.includes("".concat(e))},us=function(e){switch(e){case"NaN":return NaN;case"Inf":case"+Inf":return 1/0;case"-Inf":return-1/0;default:return parseFloat(e)}},ls=function(e){var t=e.data,n=void 0===t?[]:t,r=e.period,i=e.customStep,o=e.query,a=e.yaxis,u=e.unit,l=e.showLegend,c=void 0===l||l,s=e.setYaxisLimits,f=e.setPeriod,d=e.alias,h=void 0===d?[]:d,p=e.fullWidth,v=void 0===p||p,m=oe((function(){return i||r.step||1}),[r.step,i]),y=_t(X([[]]),2),g=y[0],_=y[1],b=_t(X([]),2),D=b[0],w=b[1],x=_t(X([]),2),k=x[0],C=x[1],E=_t(X([]),2),A=E[0],S=E[1],F=function(e){var t=function(e){var t={},n=Object.values(e).flat(),r=Yc(n),i=Hc(n);return t[1]=qc(r,i),t}(e);s(t)};te((function(){var e=[],t={},i=[],o=[{}];null===n||void 0===n||n.forEach((function(n){var r=is(n,A,h);o.push(r),i.push(os(r,n.group));var a,u=t[n.group]||[],l=zo(n.values);try{for(l.s();!(a=l.n()).done;){var c=a.value;e.push(c[0]),u.push(us(c[1]))}}catch(s){l.e(s)}finally{l.f()}t[n.group]=u}));var a=function(e,t,n){for(var r=Array.from(new Set(e)).sort((function(e,t){return e-t})),i=n.start,o=Nr(n.end+t),a=0,u=[];i<=o;){for(;a=r.length||r[a]>i)&&u.push(i)}for(;u.length<2;)u.push(i),i=Nr(i+t);return u}(e,m,r),u=n.map((function(e){var t,n=[],r=e.values,i=r.length,o=0,u=zo(a);try{for(u.s();!(t=u.n()).done;){for(var l=t.value;o1e10*h?n.map((function(){return f})):n}));u.unshift(a),F(t),_(u),w(o),C(i)}),[n]),te((function(){var e=[],t=[{}];null===n||void 0===n||n.forEach((function(n){var r=is(n,A,h);t.push(r),e.push(os(r,n.group))})),w(t),C(e)}),[A]);var N=re(null);return fr("div",{className:Oi()({"vm-graph-view":!0,"vm-graph-view_full-width":v}),ref:N,children:[(null===N||void 0===N?void 0:N.current)&&fr(Zc,{data:g,series:D,metrics:n,period:r,yaxis:a,unit:u,setPeriod:f,container:null===N||void 0===N?void 0:N.current}),c&&fr(ts,{labels:k,query:o,onChange:function(e,t){S(function(e){var t=e.hideSeries,n=e.legend,r=e.metaKey,i=e.series,o=n.label,a=as(o,t),u=i.map((function(e){return e.label||""}));return r?a?t.filter((function(e){return e!==o})):[].concat(bt(t),[o]):t.length?a?bt(u.filter((function(e){return e!==o}))):[]:bt(u.filter((function(e){return e!==o})))}({hideSeries:A,legend:e,metaKey:t,series:D}))}})]})},cs=function(e){var t=e.value,n=e.onChange,r=e.onEnter,i=e.onArrowUp,o=e.onArrowDown,a=e.autocomplete,u=e.error,l=e.options,s=e.label,f=e.disabled,d=void 0!==f&&f,h=_t(X(-1),2),p=h[0],v=h[1],m=_t(X(!1),2),y=m[0],g=m[1],_=re(null),b=re(null),D=oe((function(){if(v(0),!y)return[];try{var e=new RegExp(String(t),"i");return l.filter((function(n){return e.test(n)&&n!==t})).sort((function(t,n){var r,i;return((null===(r=t.match(e))||void 0===r?void 0:r.index)||0)-((null===(i=n.match(e))||void 0===i?void 0:i.index)||0)}))}catch(c){return[]}}),[y,l]),w=function(){g(!1)},x=function(e){return function(){d||(n(e),w())}};return te((function(){var e=(t.match(/[a-zA-Z_:.][a-zA-Z0-9_:.]*/gm)||[]).length;g(a&&t.length>2&&e<=1)}),[a,t]),te((function(){if(b.current){var e=b.current.childNodes[p];null!==e&&void 0!==e&&e.scrollIntoView&&e.scrollIntoView({block:"center"})}}),[p]),co(_,(function(){return g(!1)}),b),fr("div",{className:"vm-query-editor",ref:_,children:[fr(So,{value:t,label:s,type:"textarea",autofocus:!!t,error:u,onKeyDown:function(e){var t=e.key,a=e.ctrlKey,u=e.metaKey,l=e.shiftKey,c=a||u,s="ArrowUp"===t,f="ArrowDown"===t,h="Enter"===t,m=y&&D.length,_=s||f;if((_&&m||_&&c||h&&m)&&e.preventDefault(),s&&m&&!c?v((function(e){return 0===e?0:e-1})):s&&c&&i(),f&&m&&!c?v((function(e){return e>=D.length-1?D.length-1:e+1})):f&&c&&o(),h&&m&&!l&&!c){if(d)return;n(D[p]),g(!1)}else h&&!l&&r()},onChange:n,disabled:d}),fr(so,{open:y,buttonRef:_,placement:"bottom-left",onClose:w,children:fr("div",{className:"vm-query-editor-autocomplete",ref:b,children:D.map((function(e,t){return fr("div",{className:Oi()({"vm-list__item":!0,"vm-list__item_active":t===p}),id:"$autocomplete$".concat(e),onClick:x(e),children:e},e)}))})})]})},ss=n(936),fs=n.n(ss),ds=function(e){var t=e.defaultStep,n=e.setStep,r=_t(X(t),2),i=r[0],o=r[1],a=_t(X(""),2),u=a[0],l=a[1],c=ae(fs()((function(e){return n(e||1)}),700),[]),s=function(e){e>0?(o(e),c(e),l("")):l("step is out of allowed range")};return te((function(){t&&s(t)}),[t]),fr(So,{label:"Step value",type:"number",value:i,error:u,onChange:function(e){var t=+e;t&&s(t)},endIcon:fr(fo,{title:"Reset step to default",children:fr(lo,{variant:"text",size:"small",startIcon:fr(ui,{}),onClick:function(){s(t||1)}})})})},hs=function(){var e=Xn().serverURL,t=hr().tenantId,n=pr(),r=Qr(),i=_t(X(t||0),2),o=i[0],a=i[1],u=ae(fs()((function(t){var i=Number(t);if(n({type:"SET_TENANT_ID",payload:i}),e){var o=e.replace(/(\/select\/)([\d]+)(\/prometheus)/gim,"$1".concat(i,"$3"));n({type:"SET_SERVER",payload:o}),r({type:"RUN_QUERY"})}}),700),[]);return te((function(){o!==t&&a(t)}),[t]),fr(So,{label:"Tenant ID",type:"number",value:o,onChange:function(e){a(e),u(e)},endIcon:fr(fo,{title:"Define tenant id if you need request to another storage",children:fr(lo,{variant:"text",size:"small",startIcon:fr(li,{})})})})},ps=function(e){var t,n=e.value,r=void 0!==n&&n,i=e.disabled,o=void 0!==i&&i,a=e.label,u=e.color,l=void 0===u?"secondary":u,c=e.onChange;return fr("div",{className:Oi()((qn(t={"vm-switch":!0,"vm-switch_disabled":o,"vm-switch_active":r},"vm-switch_".concat(l,"_active"),r),qn(t,"vm-switch_".concat(l),l),t)),onClick:function(){o||c(!r)},children:[fr("div",{className:"vm-switch-track",children:fr("div",{className:"vm-switch-track__thumb"})}),a&&fr("span",{className:"vm-switch__label",children:a})]})},vs=function(){var e=Wi(),t=Xn().inputTenantID,n=ni().autocomplete,r=ri(),i=Ui(),o=i.nocache,a=i.isTracingEnabled,u=Hi(),l=Wr().period.step;return fr("div",{className:"vm-additional-settings",children:[fr(ps,{label:"Autocomplete",value:n,onChange:function(){r({type:"TOGGLE_AUTOCOMPLETE"})}}),fr(ps,{label:"Disable cache",value:o,onChange:function(){u({type:"TOGGLE_NO_CACHE"})}}),fr(ps,{label:"Trace query",value:a,onChange:function(){u({type:"TOGGLE_QUERY_TRACING"})}}),fr("div",{className:"vm-additional-settings__input",children:fr(ds,{defaultStep:l,setStep:function(t){e({type:"SET_CUSTOM_STEP",payload:t})}})}),!!t&&fr("div",{className:"vm-additional-settings__input",children:fr(hs,{})})]})};var ms=function(e){var t=re();return te((function(){t.current=e}),[e]),t.current},ys=function(e){var t=e.error,n=e.queryOptions,r=e.onHideQuery,i=ni(),o=i.query,a=i.queryHistory,u=i.autocomplete,l=ri(),c=Qr(),s=_t(X(o||[]),2),f=s[0],d=s[1],h=_t(X([]),2),p=h[0],v=h[1],m=ms(f),y=function(){l({type:"SET_QUERY_HISTORY",payload:f.map((function(e,t){var n=a[t]||{values:[]},r=e===n.values[n.values.length-1];return{index:n.values.length-Number(r),values:!r&&e?[].concat(bt(n.values),[e]):n.values}}))}),l({type:"SET_QUERY",payload:f}),c({type:"RUN_QUERY"})},g=function(e,t){d((function(n){return n.map((function(n,r){return r===t?e:n}))}))},_=function(e,t){return function(){!function(e,t){var n=a[t],r=n.index,i=n.values,o=r+e;o<0||o>=i.length||(g(i[o]||"",t),l({type:"SET_QUERY_HISTORY_BY_INDEX",payload:{value:{values:i,index:o},queryNumber:t}}))}(e,t)}},b=function(e){return function(t){g(t,e)}},D=function(e){return function(){var t;t=e,d((function(e){return e.filter((function(e,n){return n!==t}))})),v((function(t){return t.map((function(t){return t>e?t-1:t}))}))}},w=function(e){return function(){var t;t=e,v((function(e){return e.includes(t)?e.filter((function(e){return e!==t})):[].concat(bt(e),[t])}))}};return te((function(){m&&f.length1&&fr(fo,{title:"Remove Query",children:fr("div",{className:"vm-query-configurator-list-row__button",children:fr(lo,{variant:"text",color:"error",startIcon:fr(Ci,{}),onClick:D(r)})})})]},r)}))}),fr("div",{className:"vm-query-configurator-settings",children:[fr(vs,{}),fr("div",{className:"vm-query-configurator-settings__buttons",children:[f.length<4&&fr(lo,{variant:"outlined",onClick:function(){d((function(e){return[].concat(bt(e),[""])}))},startIcon:fr(Ei,{}),children:"Add Query"}),fr(lo,{variant:"contained",onClick:y,startIcon:fr(bi,{}),children:"Execute Query"})]})]})]})};function gs(e){var t,n,r,i=2;for("undefined"!=typeof Symbol&&(n=Symbol.asyncIterator,r=Symbol.iterator);i--;){if(n&&null!=(t=e[n]))return t.call(e);if(r&&null!=(t=e[r]))return new _s(t.call(e));n="@@asyncIterator",r="@@iterator"}throw new TypeError("Object is not async iterable")}function _s(e){function t(e){if(Object(e)!==e)return Promise.reject(new TypeError(e+" is not an object."));var t=e.done;return Promise.resolve(e.value).then((function(e){return{value:e,done:t}}))}return _s=function(e){this.s=e,this.n=e.next},_s.prototype={s:null,n:null,next:function(){return t(this.n.apply(this.s,arguments))},return:function(e){var n=this.s.return;return void 0===n?Promise.resolve({value:e,done:!0}):t(n.apply(this.s,arguments))},throw:function(e){var n=this.s.return;return void 0===n?Promise.reject(e):t(n.apply(this.s,arguments))}},new _s(e)}var bs=0,Ds=function(){function e(t,n){Dt(this,e),this.tracing=void 0,this.tracingChildren=void 0,this.query=void 0,this.id=void 0,this.tracing=t,this.query=n,this.id=bs++;var r=t.children||[];this.tracingChildren=r.map((function(t){return new e(t,n)}))}return xt(e,[{key:"queryValue",get:function(){return this.query}},{key:"idValue",get:function(){return this.id}},{key:"children",get:function(){return this.tracingChildren}},{key:"message",get:function(){return this.tracing.message}},{key:"duration",get:function(){return this.tracing.duration_msec}}]),e}(),ws=function(e){var t=e.predefinedQuery,n=e.visible,r=e.display,i=e.customStep,o=e.hideQuery,a=void 0===o?[]:o,u=ni().query,l=Wr().period,c=Ui(),s=c.displayType,f=c.nocache,d=c.isTracingEnabled,h=hr().serverUrl,p=_t(X(!1),2),v=p[0],m=p[1],y=_t(X(),2),g=y[0],_=y[1],b=_t(X(),2),D=b[0],w=b[1],x=_t(X(),2),k=x[0],C=x[1],E=_t(X(),2),A=E[0],S=E[1],F=_t(X(),2),N=F[0],O=F[1],T=_t(X([]),2),B=T[0],M=T[1];te((function(){A&&(_(void 0),w(void 0),C(void 0))}),[A]);var L=function(){var e=Xc(Jc().mark((function e(t,n,r,i){var o,a,u,l,c,s;return Jc().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return o=new AbortController,M([].concat(bt(n),[o])),e.prev=2,e.delegateYield(Jc().mark((function e(){var n,f,d,h,p,v,m,y,g,b,D,x;return Jc().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:n="chart"===r,f=or[r],d=[],h=[],p=1,v=0,a=!1,u=!1,e.prev=8,c=gs(t);case 10:return e.next=12,c.next();case 12:if(!(a=!(s=e.sent).done)){e.next=24;break}return m=s.value,e.next=16,fetch(m,{signal:o.signal});case 16:return y=e.sent,e.next=19,y.json();case 19:g=e.sent,y.ok?(S(void 0),g.trace&&(b=new Ds(g.trace,i[p-1]),h.push(b)),D=f-d.length,g.data.result.slice(0,D).forEach((function(e){e.group=p,d.push(e)})),v+=g.data.result.length,p++):S("".concat(g.errorType,"\r\n").concat(null===g||void 0===g?void 0:g.error));case 21:a=!1,e.next=10;break;case 24:e.next=30;break;case 26:e.prev=26,e.t0=e.catch(8),u=!0,l=e.t0;case 30:if(e.prev=30,e.prev=31,!a||null==c.return){e.next=35;break}return e.next=35,c.return();case 35:if(e.prev=35,!u){e.next=38;break}throw l;case 38:return e.finish(35);case 39:return e.finish(30);case 40:x="Showing ".concat(f," series out of ").concat(v," series due to performance reasons. Please narrow down the query, so it returns less series"),O(v>f?x:""),n?_(d):w(d),C(h);case 44:case"end":return e.stop()}}),e,null,[[8,26,30,40],[31,,35,39]])}))(),"t0",4);case 4:e.next=9;break;case 6:e.prev=6,e.t1=e.catch(2),e.t1 instanceof Error&&"AbortError"!==e.t1.name&&S("".concat(e.t1.name,": ").concat(e.t1.message));case 9:m(!1);case 10:case"end":return e.stop()}}),e,null,[[2,6]])})));return function(t,n,r,i){return e.apply(this,arguments)}}(),P=ae(fs()(L,800),[]),$=oe((function(){var e=null!==t&&void 0!==t?t:u,n="chart"===(r||s);if(l)if(h)if(e.every((function(e){return!e.trim()})))S(Do.validQuery);else{if(Fo(h)){var o=Kn({},l);return o.step=i,e.filter((function(e,t){return e.trim()&&!a.includes(t)})).map((function(e){return n?function(e,t,n,r,i){return"".concat(e,"/api/v1/query_range?query=").concat(encodeURIComponent(t),"&start=").concat(n.start,"&end=").concat(n.end,"&step=").concat(n.step).concat(r?"&nocache=1":"").concat(i?"&trace=1":"")}(h,e,o,f,d):function(e,t,n,r){return"".concat(e,"/api/v1/query?query=").concat(encodeURIComponent(t),"&time=").concat(n.end,"&step=").concat(n.step).concat(r?"&trace=1":"")}(h,e,o,d)}))}S(Do.validServer)}else S(Do.emptyServer)}),[h,l,s,i,a]);return te((function(){n&&null!==$&&void 0!==$&&$.length&&(m(!0),P($,B,r||s,null!==t&&void 0!==t?t:u))}),[$,n]),te((function(){var e=B.slice(0,-1);e.length&&(e.map((function(e){return e.abort()})),M(B.filter((function(e){return!e.signal.aborted}))))}),[B]),{fetchUrl:$,isLoading:v,graphData:g,liveData:D,error:A,warning:N,traces:k}},xs=function(e){var t=e.data,n=ue(ao).showInfoMessage,r=oe((function(){return JSON.stringify(t,null,2)}),[t]);return fr("div",{className:"vm-json-view",children:[fr("div",{className:"vm-json-view__copy",children:fr(lo,{variant:"outlined",fullWidth:!1,onClick:function(){navigator.clipboard.writeText(r),n({text:"Formatted JSON has been copied",type:"success"})},children:"Copy JSON"})}),fr("pre",{className:"vm-json-view__code",children:fr("code",{children:r})})]})},ks=function(e){var t=e.yaxis,n=e.setYaxisLimits,r=e.toggleEnableLimits,i=oe((function(){return Object.keys(t.limits.range)}),[t.limits.range]),o=ae(fs()((function(e,r,i){var o=t.limits.range;o[r][i]=+e,o[r][0]===o[r][1]||o[r][0]>o[r][1]||n(o)}),500),[t.limits.range]),a=function(e,t){return function(n){o(n,e,t)}};return fr("div",{className:"vm-axes-limits",children:[fr(ps,{value:t.limits.enable,onChange:r,label:"Fix the limits for y-axis"}),fr("div",{className:"vm-axes-limits-list",children:i.map((function(e){return fr("div",{className:"vm-axes-limits-list__inputs",children:[fr(So,{label:"Min ".concat(e),type:"number",disabled:!t.limits.enable,value:t.limits.range[e][0],onChange:a(e,0)}),fr(So,{label:"Max ".concat(e),type:"number",disabled:!t.limits.enable,value:t.limits.range[e][1],onChange:a(e,1)})]},e)}))})]})},Cs="Axes settings",Es=function(e){var t=e.yaxis,n=e.setYaxisLimits,r=e.toggleEnableLimits,i=re(null),o=_t(X(!1),2),a=o[0],u=o[1],l=re(null);co(i,(function(){return u(!1)}),l);var c=function(){u(!1)};return fr("div",{className:"vm-graph-settings",children:[fr(fo,{title:Cs,children:fr("div",{ref:l,children:fr(lo,{variant:"text",startIcon:fr(oi,{}),onClick:function(){u((function(e){return!e}))}})})}),fr(so,{open:a,buttonRef:l,placement:"bottom-right",onClose:c,children:fr("div",{className:"vm-graph-settings-popper",ref:i,children:[fr("div",{className:"vm-popper-header",children:[fr("h3",{className:"vm-popper-header__title",children:Cs}),fr(lo,{size:"small",startIcon:fr(ai,{}),onClick:c})]}),fr("div",{className:"vm-graph-settings-popper__body",children:fr(ks,{yaxis:t,setYaxisLimits:n,toggleEnableLimits:r})})]})})]})},As=function(e){var t=e.containerStyles,n=void 0===t?{}:t,r=e.message;return fr("div",{className:"vm-spinner",style:n&&{},children:[fr("div",{className:"half-circle-spinner",children:[fr("div",{className:"circle circle-1"}),fr("div",{className:"circle circle-2"})]}),r&&fr("div",{className:"vm-spinner__message",children:r})]})},Ss=function(){var e=hr().serverUrl,t=_t(X([]),2),n=t[0],r=t[1],i=function(){var t=Xc(Jc().mark((function t(){var n,i,o;return Jc().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:if(e){t.next=2;break}return t.abrupt("return");case 2:return n="".concat(e,"/api/v1/label/__name__/values"),t.prev=3,t.next=6,fetch(n);case 6:return i=t.sent,t.next=9,i.json();case 9:o=t.sent,i.ok&&r(o.data),t.next=16;break;case 13:t.prev=13,t.t0=t.catch(3),console.error(t.t0);case 16:case"end":return t.stop()}}),t,null,[[3,13]])})));return function(){return t.apply(this,arguments)}}();return te((function(){i()}),[e]),{queryOptions:n}},Fs=function(e){var t=e.value;return fr("div",{className:"vm-line-progress",children:[fr("div",{className:"vm-line-progress-track",children:fr("div",{className:"vm-line-progress-track__thumb",style:{width:"".concat(t,"%")}})}),fr("span",{children:[t.toFixed(2),"%"]})]})},Ns=function e(t){var n,r=t.trace,i=t.totalMsec,o=_t(X({}),2),a=o[0],u=o[1],l=r.children&&!!r.children.length,c=r.duration/i*100;return fr("div",{className:"vm-nested-nav",children:[fr("div",{className:"vm-nested-nav-header",onClick:(n=r.idValue,function(){u((function(e){return Kn(Kn({},e),{},qn({},n,!e[n]))}))}),children:[l&&fr("div",{className:Oi()({"vm-nested-nav-header__icon":!0,"vm-nested-nav-header__icon_open":a[r.idValue]}),children:fr(pi,{})}),fr("div",{className:"vm-nested-nav-header__progress",children:fr(Fs,{value:c})}),fr("div",{className:"vm-nested-nav-header__message",children:r.message}),fr("div",{className:"vm-nested-nav-header__duration",children:"duration: ".concat(r.duration," ms")})]}),a[r.idValue]&&fr("div",{children:l&&r.children.map((function(t){return fr(e,{trace:t,totalMsec:i},t.duration)}))})]})},Os=function(e){var t=e.traces,n=e.onDeleteClick;if(!t.length)return fr(oo,{variant:"info",children:"Please re-run the query to see results of the tracing"});return fr("div",{className:"vm-tracings-view",children:t.map((function(e){return fr("div",{className:"vm-tracings-view-trace vm-block vm-block_empty-padding",children:[fr("div",{className:"vm-tracings-view-trace-header",children:[fr("h3",{className:"vm-tracings-view-trace-header-title",children:["Trace for ",fr("b",{className:"vm-tracings-view-trace-header-title__query",children:e.queryValue})]}),fr(fo,{title:"Remove trace",children:fr(lo,{variant:"text",color:"error",startIcon:fr(Ci,{}),onClick:(t=e,function(){n(t)})})})]}),fr("nav",{className:"vm-tracings-view-trace__nav",children:fr(Ns,{trace:e,totalMsec:e.duration})})]},e.idValue);var t}))})},Ts=function(e,t){return oe((function(){var n={};e.forEach((function(e){return Object.entries(e.metric).forEach((function(e){return n[e[0]]?n[e[0]].options.add(e[1]):n[e[0]]={options:new Set([e[1]])}}))}));var r=Object.entries(n).map((function(e){return{key:e[0],variations:e[1].options.size}})).sort((function(e,t){return e.variations-t.variations}));return t?r.filter((function(e){return t.includes(e.key)})):r}),[e,t])},Bs=function(e){var t,n=e.checked,r=void 0!==n&&n,i=e.disabled,o=void 0!==i&&i,a=e.label,u=e.color,l=void 0===u?"secondary":u,c=e.onChange;return fr("div",{className:Oi()((qn(t={"vm-checkbox":!0,"vm-checkbox_disabled":o,"vm-checkbox_active":r},"vm-checkbox_".concat(l,"_active"),r),qn(t,"vm-checkbox_".concat(l),l),t)),onClick:function(){o||c(!r)},children:[fr("div",{className:"vm-checkbox-track",children:fr("div",{className:"vm-checkbox-track__thumb",children:fr(Ai,{})})}),a&&fr("span",{className:"vm-checkbox__label",children:a})]})},Ms="Display columns",Ls=function(e){var t=e.data,n=e.defaultColumns,r=e.onChange,i=re(null),o=_t(X(!1),2),a=o[0],u=o[1],l=Ts(t),c=oe((function(){return!l.length}),[l]),s=_t(X(l.map((function(e){return e.key}))),2),f=s[0],d=s[1],h=function(){u(!1),d(n||l.map((function(e){return e.key})))},p=function(e){return function(){!function(e){d((function(t){return f.includes(e)?t.filter((function(t){return t!==e})):[].concat(bt(t),[e])}))}(e)}};return te((function(){d(l.map((function(e){return e.key})))}),[l]),fr("div",{className:"vm-table-settings",children:[fr(fo,{title:Ms,children:fr("div",{ref:i,children:fr(lo,{variant:"text",startIcon:fr(oi,{}),onClick:function(){u((function(e){return!e}))},disabled:c})})}),fr(so,{open:a,onClose:h,placement:"bottom-right",buttonRef:i,children:fr("div",{className:"vm-table-settings-popper",children:[fr("div",{className:"vm-popper-header",children:[fr("h3",{className:"vm-popper-header__title",children:Ms}),fr(lo,{onClick:h,startIcon:fr(ai,{}),size:"small"})]}),fr("div",{className:"vm-table-settings-popper-list",children:l.map((function(e){return fr("div",{className:"vm-table-settings-popper-list__item",children:fr(Bs,{checked:f.includes(e.key),onChange:p(e.key),label:e.key})},e.key)}))}),fr("div",{className:"vm-table-settings-popper__footer",children:[fr(lo,{color:"error",variant:"outlined",size:"small",onClick:function(){u(!1);var e=l.map((function(e){return e.key}));d(e),r(e)},children:"Reset"}),fr(lo,{variant:"contained",size:"small",onClick:function(){u(!1),r(f)},children:"apply"})]})]})})]})};function Ps(e){return function(e,t){return Object.fromEntries(Object.entries(e).filter(t))}(e,(function(e){return!!e[1]}))}var $s=function(e){var t=e.data,n=e.displayColumns,r=Ts(t,n),i=_t(X(""),2),o=i[0],a=i[1],u=_t(X("asc"),2),l=u[0],c=u[1],s=oe((function(){var e=null===t||void 0===t?void 0:t.map((function(e){return{metadata:r.map((function(t){return e.metric[t.key]||"-"})),value:e.value?e.value[1]:"-"}})),n="Value"===o,i=r.findIndex((function(e){return e.key===o}));return n||-1!==i?e.sort((function(e,t){var r=n?Number(e.value):e.metadata[i],o=n?Number(t.value):t.metadata[i];return("asc"===l?ro)?-1:1})):e}),[r,t,o,l]),f=function(e){return function(){d(e)}},d=function(e){c((function(t){return"asc"===t&&o===e?"desc":"asc"})),a(e)};return s.length?fr("table",{className:"vm-table",children:[fr("thead",{className:"vm-table-header",children:fr("tr",{className:"vm-table__row vm-table__row_header",children:[r.map((function(e,t){return fr("td",{className:"vm-table-cell vm-table-cell_header vm-table-cell_sort",onClick:f(e.key),children:fr("div",{className:"vm-table-cell__content",children:[e.key,fr("div",{className:Oi()({"vm-table__sort-icon":!0,"vm-table__sort-icon_active":o===e.key,"vm-table__sort-icon_desc":"desc"===l&&o===e.key}),children:fr(vi,{})})]})},t)})),fr("td",{className:"vm-table-cell vm-table-cell_header vm-table-cell_right vm-table-cell_sort",onClick:f("Value"),children:fr("div",{className:"vm-table-cell__content",children:[fr("div",{className:Oi()({"vm-table__sort-icon":!0,"vm-table__sort-icon_active":"Value"===o,"vm-table__sort-icon_desc":"desc"===l}),children:fr(vi,{})}),"Value"]})})]})}),fr("tbody",{className:"vm-table-body",children:s.map((function(e,t){return fr("tr",{className:"vm-table__row",children:[e.metadata.map((function(e,n){return fr("td",{className:Oi()({"vm-table-cell vm-table-cell_no-wrap":!0,"vm-table-cell_gray":s[t-1]&&s[t-1].metadata[n]===e}),children:e},n)})),fr("td",{className:"vm-table-cell vm-table-cell_right",children:e.value})]},t)}))})]}):fr(oo,{variant:"warning",children:"No data to show"})},Rs=function(){var e=Ui(),t=e.displayType,n=e.isTracingEnabled,r=ni().query,i=Wr().period,o=Qr();!function(){var e=hr().tenantId,t=Ui().displayType,n=ni().query,r=Wr(),i=r.duration,o=r.relativeTime,a=r.period,u=a.date,l=a.step,c=function(){var r={};n.forEach((function(n,a){var c,s="g".concat(a);r["".concat(s,".expr")]=n,r["".concat(s,".range_input")]=i,r["".concat(s,".end_input")]=u,r["".concat(s,".step_input")]=l,r["".concat(s,".tab")]=(null===(c=Li.find((function(e){return e.value===t})))||void 0===c?void 0:c.prometheusCode)||0,r["".concat(s,".relative_time")]=o,r["".concat(s,".tenantID")]=e})),ar(Ps(r))};te(c,[e,t,n,i,o,u,l]),te(c,[])}();var a=_t(X(),2),u=a[0],l=a[1],c=_t(X([]),2),s=c[0],f=c[1],d=_t(X([]),2),h=d[0],p=d[1],v=ue(qi).state,m=v.customStep,y=v.yaxis,g=Wi(),_=Ss().queryOptions,b=ws({visible:!0,customStep:m,hideQuery:h}),D=b.isLoading,w=b.liveData,x=b.graphData,k=b.error,C=b.warning,E=b.traces,A=function(e){g({type:"SET_YAXIS_LIMITS",payload:e})};return te((function(){E&&f([].concat(bt(s),bt(E)))}),[E]),te((function(){f([])}),[t]),fr("div",{className:"vm-custom-panel",children:[fr(ys,{error:k,queryOptions:_,onHideQuery:function(e){p(e)}}),n&&fr("div",{className:"vm-custom-panel__trace",children:fr(Os,{traces:s,onDeleteClick:function(e){var t=s.filter((function(t){return t.idValue!==e.idValue}));f(bt(t))}})}),D&&fr(As,{}),k&&fr(oo,{variant:"error",children:k}),C&&fr(oo,{variant:"warning",children:C}),fr("div",{className:"vm-custom-panel-body vm-block",children:[fr("div",{className:"vm-custom-panel-body-header",children:[fr(Pi,{}),"chart"===t&&fr(Es,{yaxis:y,setYaxisLimits:A,toggleEnableLimits:function(){g({type:"TOGGLE_ENABLE_YAXIS_LIMITS"})}}),"table"===t&&fr(Ls,{data:w||[],defaultColumns:u,onChange:l})]}),x&&i&&"chart"===t&&fr(ls,{data:x,period:i,customStep:m,query:r,yaxis:y,setYaxisLimits:A,setPeriod:function(e){var t=e.from,n=e.to;o({type:"SET_PERIOD",payload:{from:t,to:n}})}}),w&&"code"===t&&fr(xs,{data:w}),w&&"table"===t&&fr($s,{data:w,displayColumns:u})]})]})},Is=function(){var e=Xc(Jc().mark((function e(t){var n,r;return Jc().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,fetch("./dashboards/".concat(t));case 2:return n=e.sent,e.next=5,n.json();case 5:return r=e.sent,e.abrupt("return",r);case 7:case"end":return e.stop()}}),e)})));return function(t){return e.apply(this,arguments)}}(),js=Xc(Jc().mark((function e(){var t;return Jc().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return t=window.__VMUI_PREDEFINED_DASHBOARDS__,e.next=3,Promise.all(t.map(function(){var e=Xc(Jc().mark((function e(t){return Jc().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.abrupt("return",Is(t));case 1:case"end":return e.stop()}}),e)})));return function(t){return e.apply(this,arguments)}}()));case 3:return e.abrupt("return",e.sent);case 4:case"end":return e.stop()}}),e)})));function zs(){return{async:!1,baseUrl:null,breaks:!1,extensions:null,gfm:!0,headerIds:!0,headerPrefix:"",highlight:null,langPrefix:"language-",mangle:!0,pedantic:!1,renderer:null,sanitize:!1,sanitizer:null,silent:!1,smartypants:!1,tokenizer:null,walkTokens:null,xhtml:!1}}var Us={async:!1,baseUrl:null,breaks:!1,extensions:null,gfm:!0,headerIds:!0,headerPrefix:"",highlight:null,langPrefix:"language-",mangle:!0,pedantic:!1,renderer:null,sanitize:!1,sanitizer:null,silent:!1,smartypants:!1,tokenizer:null,walkTokens:null,xhtml:!1};var Hs=/[&<>"']/,Ys=/[&<>"']/g,Vs=/[<>"']|&(?!#?\w+;)/,qs=/[<>"']|&(?!#?\w+;)/g,Ws={"&":"&","<":"<",">":">",'"':""","'":"'"},Qs=function(e){return Ws[e]};function Gs(e,t){if(t){if(Hs.test(e))return e.replace(Ys,Qs)}else if(Vs.test(e))return e.replace(qs,Qs);return e}var Zs=/&(#(?:\d+)|(?:#x[0-9A-Fa-f]+)|(?:\w+));?/gi;function Js(e){return e.replace(Zs,(function(e,t){return"colon"===(t=t.toLowerCase())?":":"#"===t.charAt(0)?"x"===t.charAt(1)?String.fromCharCode(parseInt(t.substring(2),16)):String.fromCharCode(+t.substring(1)):""}))}var Ks=/(^|[^\[])\^/g;function Xs(e,t){e="string"===typeof e?e:e.source,t=t||"";var n={replace:function(t,r){return r=(r=r.source||r).replace(Ks,"$1"),e=e.replace(t,r),n},getRegex:function(){return new RegExp(e,t)}};return n}var ef=/[^\w:]/g,tf=/^$|^[a-z][a-z0-9+.-]*:|^[?#]/i;function nf(e,t,n){if(e){var r;try{r=decodeURIComponent(Js(n)).replace(ef,"").toLowerCase()}catch(c){return null}if(0===r.indexOf("javascript:")||0===r.indexOf("vbscript:")||0===r.indexOf("data:"))return null}t&&!tf.test(n)&&(n=function(e,t){rf[" "+e]||(of.test(e)?rf[" "+e]=e+"/":rf[" "+e]=ff(e,"/",!0));var n=-1===(e=rf[" "+e]).indexOf(":");return"//"===t.substring(0,2)?n?t:e.replace(af,"$1")+t:"/"===t.charAt(0)?n?t:e.replace(uf,"$1")+t:e+t}(t,n));try{n=encodeURI(n).replace(/%25/g,"%")}catch(c){return null}return n}var rf={},of=/^[^:]+:\/*[^/]*$/,af=/^([^:]+:)[\s\S]*$/,uf=/^([^:]+:\/*[^/]*)[\s\S]*$/;var lf={exec:function(){}};function cf(e){for(var t,n,r=1;r=0&&"\\"===n[i];)r=!r;return r?"|":" |"})).split(/ \|/),r=0;if(n[0].trim()||n.shift(),n.length>0&&!n[n.length-1].trim()&&n.pop(),n.length>t)n.splice(t);else for(;n.length1;)1&t&&(n+=e),t>>=1,e+=e;return n+e}function pf(e,t,n,r){var i=t.href,o=t.title?Gs(t.title):null,a=e[1].replace(/\\([\[\]])/g,"$1");if("!"!==e[0].charAt(0)){r.state.inLink=!0;var u={type:"link",raw:n,href:i,title:o,text:a,tokens:r.inlineTokens(a)};return r.state.inLink=!1,u}return{type:"image",raw:n,href:i,title:o,text:Gs(a)}}var vf=function(){function e(t){Dt(this,e),this.options=t||Us}return xt(e,[{key:"space",value:function(e){var t=this.rules.block.newline.exec(e);if(t&&t[0].length>0)return{type:"space",raw:t[0]}}},{key:"code",value:function(e){var t=this.rules.block.code.exec(e);if(t){var n=t[0].replace(/^ {1,4}/gm,"");return{type:"code",raw:t[0],codeBlockStyle:"indented",text:this.options.pedantic?n:ff(n,"\n")}}}},{key:"fences",value:function(e){var t=this.rules.block.fences.exec(e);if(t){var n=t[0],r=function(e,t){var n=e.match(/^(\s+)(?:```)/);if(null===n)return t;var r=n[1];return t.split("\n").map((function(e){var t=e.match(/^\s+/);return null===t?e:_t(t,1)[0].length>=r.length?e.slice(r.length):e})).join("\n")}(n,t[3]||"");return{type:"code",raw:n,lang:t[2]?t[2].trim().replace(this.rules.inline._escapes,"$1"):t[2],text:r}}}},{key:"heading",value:function(e){var t=this.rules.block.heading.exec(e);if(t){var n=t[2].trim();if(/#$/.test(n)){var r=ff(n,"#");this.options.pedantic?n=r.trim():r&&!/ $/.test(r)||(n=r.trim())}return{type:"heading",raw:t[0],depth:t[1].length,text:n,tokens:this.lexer.inline(n)}}}},{key:"hr",value:function(e){var t=this.rules.block.hr.exec(e);if(t)return{type:"hr",raw:t[0]}}},{key:"blockquote",value:function(e){var t=this.rules.block.blockquote.exec(e);if(t){var n=t[0].replace(/^ *>[ \t]?/gm,"");return{type:"blockquote",raw:t[0],tokens:this.lexer.blockTokens(n,[]),text:n}}}},{key:"list",value:function(e){var t=this.rules.block.list.exec(e);if(t){var n,r,i,o,a,u,l,c,s,f,d,h,p=t[1].trim(),v=p.length>1,m={type:"list",raw:"",ordered:v,start:v?+p.slice(0,-1):"",loose:!1,items:[]};p=v?"\\d{1,9}\\".concat(p.slice(-1)):"\\".concat(p),this.options.pedantic&&(p=v?p:"[*+-]");for(var y=new RegExp("^( {0,3}".concat(p,")((?:[\t ][^\\n]*)?(?:\\n|$))"));e&&(h=!1,t=y.exec(e))&&!this.rules.block.hr.test(e);){if(n=t[0],e=e.substring(n.length),c=t[2].split("\n",1)[0],s=e.split("\n",1)[0],this.options.pedantic?(o=2,d=c.trimLeft()):(o=(o=t[2].search(/[^ ]/))>4?1:o,d=c.slice(o),o+=t[1].length),u=!1,!c&&/^ *$/.test(s)&&(n+=s+"\n",e=e.substring(s.length+1),h=!0),!h)for(var g=new RegExp("^ {0,".concat(Math.min(3,o-1),"}(?:[*+-]|\\d{1,9}[.)])((?: [^\\n]*)?(?:\\n|$))")),_=new RegExp("^ {0,".concat(Math.min(3,o-1),"}((?:- *){3,}|(?:_ *){3,}|(?:\\* *){3,})(?:\\n+|$)")),b=new RegExp("^ {0,".concat(Math.min(3,o-1),"}(?:```|~~~)")),D=new RegExp("^ {0,".concat(Math.min(3,o-1),"}#"));e&&(c=f=e.split("\n",1)[0],this.options.pedantic&&(c=c.replace(/^ {1,4}(?=( {4})*[^ ])/g," ")),!b.test(c))&&!D.test(c)&&!g.test(c)&&!_.test(e);){if(c.search(/[^ ]/)>=o||!c.trim())d+="\n"+c.slice(o);else{if(u)break;d+="\n"+c}u||c.trim()||(u=!0),n+=f+"\n",e=e.substring(f.length+1)}m.loose||(l?m.loose=!0:/\n *\n *$/.test(n)&&(l=!0)),this.options.gfm&&(r=/^\[[ xX]\] /.exec(d))&&(i="[ ] "!==r[0],d=d.replace(/^\[[ xX]\] +/,"")),m.items.push({type:"list_item",raw:n,task:!!r,checked:i,loose:!1,text:d}),m.raw+=n}m.items[m.items.length-1].raw=n.trimRight(),m.items[m.items.length-1].text=d.trimRight(),m.raw=m.raw.trimRight();var w=m.items.length;for(a=0;a1)return!0}}catch(i){r.e(i)}finally{r.f()}return!1}));!m.loose&&x.length&&k&&(m.loose=!0,m.items[a].loose=!0)}return m}}},{key:"html",value:function(e){var t=this.rules.block.html.exec(e);if(t){var n={type:"html",raw:t[0],pre:!this.options.sanitizer&&("pre"===t[1]||"script"===t[1]||"style"===t[1]),text:t[0]};if(this.options.sanitize){var r=this.options.sanitizer?this.options.sanitizer(t[0]):Gs(t[0]);n.type="paragraph",n.text=r,n.tokens=this.lexer.inline(r)}return n}}},{key:"def",value:function(e){var t=this.rules.block.def.exec(e);if(t)return t[3]&&(t[3]=t[3].substring(1,t[3].length-1)),{type:"def",tag:t[1].toLowerCase().replace(/\s+/g," "),raw:t[0],href:t[2]?t[2].replace(this.rules.inline._escapes,"$1"):t[2],title:t[3]?t[3].replace(this.rules.inline._escapes,"$1"):t[3]}}},{key:"table",value:function(e){var t=this.rules.block.table.exec(e);if(t){var n={type:"table",header:sf(t[1]).map((function(e){return{text:e}})),align:t[2].replace(/^ *|\| *$/g,"").split(/ *\| */),rows:t[3]&&t[3].trim()?t[3].replace(/\n[ \t]*$/,"").split("\n"):[]};if(n.header.length===n.align.length){n.raw=t[0];var r,i,o,a,u=n.align.length;for(r=0;r/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:this.options.sanitize?"text":"html",raw:t[0],inLink:this.lexer.state.inLink,inRawBlock:this.lexer.state.inRawBlock,text:this.options.sanitize?this.options.sanitizer?this.options.sanitizer(t[0]):Gs(t[0]):t[0]}}},{key:"link",value:function(e){var t=this.rules.inline.link.exec(e);if(t){var n=t[2].trim();if(!this.options.pedantic&&/^$/.test(n))return;var r=ff(n.slice(0,-1),"\\");if((n.length-r.length)%2===0)return}else{var i=function(e,t){if(-1===e.indexOf(t[1]))return-1;for(var n=e.length,r=0,i=0;i-1){var o=(0===t[0].indexOf("!")?5:4)+t[1].length+i;t[2]=t[2].substring(0,i),t[0]=t[0].substring(0,o).trim(),t[3]=""}}var a=t[2],u="";if(this.options.pedantic){var l=/^([^'"]*[^\s])\s+(['"])(.*)\2/.exec(a);l&&(a=l[1],u=l[3])}else u=t[3]?t[3].slice(1,-1):"";return a=a.trim(),/^$/.test(n)?a.slice(1):a.slice(1,-1)),pf(t,{href:a?a.replace(this.rules.inline._escapes,"$1"):a,title:u?u.replace(this.rules.inline._escapes,"$1"):u},t[0],this.lexer)}}},{key:"reflink",value:function(e,t){var n;if((n=this.rules.inline.reflink.exec(e))||(n=this.rules.inline.nolink.exec(e))){var r=(n[2]||n[1]).replace(/\s+/g," ");if(!(r=t[r.toLowerCase()])||!r.href){var i=n[0].charAt(0);return{type:"text",raw:i,text:i}}return pf(n,r,n[0],this.lexer)}}},{key:"emStrong",value:function(e,t){var n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:"",r=this.rules.inline.emStrong.lDelim.exec(e);if(r&&(!r[3]||!n.match(/(?:[0-9A-Za-z\xAA\xB2\xB3\xB5\xB9\xBA\xBC-\xBE\xC0-\xD6\xD8-\xF6\xF8-\u02C1\u02C6-\u02D1\u02E0-\u02E4\u02EC\u02EE\u0370-\u0374\u0376\u0377\u037A-\u037D\u037F\u0386\u0388-\u038A\u038C\u038E-\u03A1\u03A3-\u03F5\u03F7-\u0481\u048A-\u052F\u0531-\u0556\u0559\u0560-\u0588\u05D0-\u05EA\u05EF-\u05F2\u0620-\u064A\u0660-\u0669\u066E\u066F\u0671-\u06D3\u06D5\u06E5\u06E6\u06EE-\u06FC\u06FF\u0710\u0712-\u072F\u074D-\u07A5\u07B1\u07C0-\u07EA\u07F4\u07F5\u07FA\u0800-\u0815\u081A\u0824\u0828\u0840-\u0858\u0860-\u086A\u0870-\u0887\u0889-\u088E\u08A0-\u08C9\u0904-\u0939\u093D\u0950\u0958-\u0961\u0966-\u096F\u0971-\u0980\u0985-\u098C\u098F\u0990\u0993-\u09A8\u09AA-\u09B0\u09B2\u09B6-\u09B9\u09BD\u09CE\u09DC\u09DD\u09DF-\u09E1\u09E6-\u09F1\u09F4-\u09F9\u09FC\u0A05-\u0A0A\u0A0F\u0A10\u0A13-\u0A28\u0A2A-\u0A30\u0A32\u0A33\u0A35\u0A36\u0A38\u0A39\u0A59-\u0A5C\u0A5E\u0A66-\u0A6F\u0A72-\u0A74\u0A85-\u0A8D\u0A8F-\u0A91\u0A93-\u0AA8\u0AAA-\u0AB0\u0AB2\u0AB3\u0AB5-\u0AB9\u0ABD\u0AD0\u0AE0\u0AE1\u0AE6-\u0AEF\u0AF9\u0B05-\u0B0C\u0B0F\u0B10\u0B13-\u0B28\u0B2A-\u0B30\u0B32\u0B33\u0B35-\u0B39\u0B3D\u0B5C\u0B5D\u0B5F-\u0B61\u0B66-\u0B6F\u0B71-\u0B77\u0B83\u0B85-\u0B8A\u0B8E-\u0B90\u0B92-\u0B95\u0B99\u0B9A\u0B9C\u0B9E\u0B9F\u0BA3\u0BA4\u0BA8-\u0BAA\u0BAE-\u0BB9\u0BD0\u0BE6-\u0BF2\u0C05-\u0C0C\u0C0E-\u0C10\u0C12-\u0C28\u0C2A-\u0C39\u0C3D\u0C58-\u0C5A\u0C5D\u0C60\u0C61\u0C66-\u0C6F\u0C78-\u0C7E\u0C80\u0C85-\u0C8C\u0C8E-\u0C90\u0C92-\u0CA8\u0CAA-\u0CB3\u0CB5-\u0CB9\u0CBD\u0CDD\u0CDE\u0CE0\u0CE1\u0CE6-\u0CEF\u0CF1\u0CF2\u0D04-\u0D0C\u0D0E-\u0D10\u0D12-\u0D3A\u0D3D\u0D4E\u0D54-\u0D56\u0D58-\u0D61\u0D66-\u0D78\u0D7A-\u0D7F\u0D85-\u0D96\u0D9A-\u0DB1\u0DB3-\u0DBB\u0DBD\u0DC0-\u0DC6\u0DE6-\u0DEF\u0E01-\u0E30\u0E32\u0E33\u0E40-\u0E46\u0E50-\u0E59\u0E81\u0E82\u0E84\u0E86-\u0E8A\u0E8C-\u0EA3\u0EA5\u0EA7-\u0EB0\u0EB2\u0EB3\u0EBD\u0EC0-\u0EC4\u0EC6\u0ED0-\u0ED9\u0EDC-\u0EDF\u0F00\u0F20-\u0F33\u0F40-\u0F47\u0F49-\u0F6C\u0F88-\u0F8C\u1000-\u102A\u103F-\u1049\u1050-\u1055\u105A-\u105D\u1061\u1065\u1066\u106E-\u1070\u1075-\u1081\u108E\u1090-\u1099\u10A0-\u10C5\u10C7\u10CD\u10D0-\u10FA\u10FC-\u1248\u124A-\u124D\u1250-\u1256\u1258\u125A-\u125D\u1260-\u1288\u128A-\u128D\u1290-\u12B0\u12B2-\u12B5\u12B8-\u12BE\u12C0\u12C2-\u12C5\u12C8-\u12D6\u12D8-\u1310\u1312-\u1315\u1318-\u135A\u1369-\u137C\u1380-\u138F\u13A0-\u13F5\u13F8-\u13FD\u1401-\u166C\u166F-\u167F\u1681-\u169A\u16A0-\u16EA\u16EE-\u16F8\u1700-\u1711\u171F-\u1731\u1740-\u1751\u1760-\u176C\u176E-\u1770\u1780-\u17B3\u17D7\u17DC\u17E0-\u17E9\u17F0-\u17F9\u1810-\u1819\u1820-\u1878\u1880-\u1884\u1887-\u18A8\u18AA\u18B0-\u18F5\u1900-\u191E\u1946-\u196D\u1970-\u1974\u1980-\u19AB\u19B0-\u19C9\u19D0-\u19DA\u1A00-\u1A16\u1A20-\u1A54\u1A80-\u1A89\u1A90-\u1A99\u1AA7\u1B05-\u1B33\u1B45-\u1B4C\u1B50-\u1B59\u1B83-\u1BA0\u1BAE-\u1BE5\u1C00-\u1C23\u1C40-\u1C49\u1C4D-\u1C7D\u1C80-\u1C88\u1C90-\u1CBA\u1CBD-\u1CBF\u1CE9-\u1CEC\u1CEE-\u1CF3\u1CF5\u1CF6\u1CFA\u1D00-\u1DBF\u1E00-\u1F15\u1F18-\u1F1D\u1F20-\u1F45\u1F48-\u1F4D\u1F50-\u1F57\u1F59\u1F5B\u1F5D\u1F5F-\u1F7D\u1F80-\u1FB4\u1FB6-\u1FBC\u1FBE\u1FC2-\u1FC4\u1FC6-\u1FCC\u1FD0-\u1FD3\u1FD6-\u1FDB\u1FE0-\u1FEC\u1FF2-\u1FF4\u1FF6-\u1FFC\u2070\u2071\u2074-\u2079\u207F-\u2089\u2090-\u209C\u2102\u2107\u210A-\u2113\u2115\u2119-\u211D\u2124\u2126\u2128\u212A-\u212D\u212F-\u2139\u213C-\u213F\u2145-\u2149\u214E\u2150-\u2189\u2460-\u249B\u24EA-\u24FF\u2776-\u2793\u2C00-\u2CE4\u2CEB-\u2CEE\u2CF2\u2CF3\u2CFD\u2D00-\u2D25\u2D27\u2D2D\u2D30-\u2D67\u2D6F\u2D80-\u2D96\u2DA0-\u2DA6\u2DA8-\u2DAE\u2DB0-\u2DB6\u2DB8-\u2DBE\u2DC0-\u2DC6\u2DC8-\u2DCE\u2DD0-\u2DD6\u2DD8-\u2DDE\u2E2F\u3005-\u3007\u3021-\u3029\u3031-\u3035\u3038-\u303C\u3041-\u3096\u309D-\u309F\u30A1-\u30FA\u30FC-\u30FF\u3105-\u312F\u3131-\u318E\u3192-\u3195\u31A0-\u31BF\u31F0-\u31FF\u3220-\u3229\u3248-\u324F\u3251-\u325F\u3280-\u3289\u32B1-\u32BF\u3400-\u4DBF\u4E00-\uA48C\uA4D0-\uA4FD\uA500-\uA60C\uA610-\uA62B\uA640-\uA66E\uA67F-\uA69D\uA6A0-\uA6EF\uA717-\uA71F\uA722-\uA788\uA78B-\uA7CA\uA7D0\uA7D1\uA7D3\uA7D5-\uA7D9\uA7F2-\uA801\uA803-\uA805\uA807-\uA80A\uA80C-\uA822\uA830-\uA835\uA840-\uA873\uA882-\uA8B3\uA8D0-\uA8D9\uA8F2-\uA8F7\uA8FB\uA8FD\uA8FE\uA900-\uA925\uA930-\uA946\uA960-\uA97C\uA984-\uA9B2\uA9CF-\uA9D9\uA9E0-\uA9E4\uA9E6-\uA9FE\uAA00-\uAA28\uAA40-\uAA42\uAA44-\uAA4B\uAA50-\uAA59\uAA60-\uAA76\uAA7A\uAA7E-\uAAAF\uAAB1\uAAB5\uAAB6\uAAB9-\uAABD\uAAC0\uAAC2\uAADB-\uAADD\uAAE0-\uAAEA\uAAF2-\uAAF4\uAB01-\uAB06\uAB09-\uAB0E\uAB11-\uAB16\uAB20-\uAB26\uAB28-\uAB2E\uAB30-\uAB5A\uAB5C-\uAB69\uAB70-\uABE2\uABF0-\uABF9\uAC00-\uD7A3\uD7B0-\uD7C6\uD7CB-\uD7FB\uF900-\uFA6D\uFA70-\uFAD9\uFB00-\uFB06\uFB13-\uFB17\uFB1D\uFB1F-\uFB28\uFB2A-\uFB36\uFB38-\uFB3C\uFB3E\uFB40\uFB41\uFB43\uFB44\uFB46-\uFBB1\uFBD3-\uFD3D\uFD50-\uFD8F\uFD92-\uFDC7\uFDF0-\uFDFB\uFE70-\uFE74\uFE76-\uFEFC\uFF10-\uFF19\uFF21-\uFF3A\uFF41-\uFF5A\uFF66-\uFFBE\uFFC2-\uFFC7\uFFCA-\uFFCF\uFFD2-\uFFD7\uFFDA-\uFFDC]|\uD800[\uDC00-\uDC0B\uDC0D-\uDC26\uDC28-\uDC3A\uDC3C\uDC3D\uDC3F-\uDC4D\uDC50-\uDC5D\uDC80-\uDCFA\uDD07-\uDD33\uDD40-\uDD78\uDD8A\uDD8B\uDE80-\uDE9C\uDEA0-\uDED0\uDEE1-\uDEFB\uDF00-\uDF23\uDF2D-\uDF4A\uDF50-\uDF75\uDF80-\uDF9D\uDFA0-\uDFC3\uDFC8-\uDFCF\uDFD1-\uDFD5]|\uD801[\uDC00-\uDC9D\uDCA0-\uDCA9\uDCB0-\uDCD3\uDCD8-\uDCFB\uDD00-\uDD27\uDD30-\uDD63\uDD70-\uDD7A\uDD7C-\uDD8A\uDD8C-\uDD92\uDD94\uDD95\uDD97-\uDDA1\uDDA3-\uDDB1\uDDB3-\uDDB9\uDDBB\uDDBC\uDE00-\uDF36\uDF40-\uDF55\uDF60-\uDF67\uDF80-\uDF85\uDF87-\uDFB0\uDFB2-\uDFBA]|\uD802[\uDC00-\uDC05\uDC08\uDC0A-\uDC35\uDC37\uDC38\uDC3C\uDC3F-\uDC55\uDC58-\uDC76\uDC79-\uDC9E\uDCA7-\uDCAF\uDCE0-\uDCF2\uDCF4\uDCF5\uDCFB-\uDD1B\uDD20-\uDD39\uDD80-\uDDB7\uDDBC-\uDDCF\uDDD2-\uDE00\uDE10-\uDE13\uDE15-\uDE17\uDE19-\uDE35\uDE40-\uDE48\uDE60-\uDE7E\uDE80-\uDE9F\uDEC0-\uDEC7\uDEC9-\uDEE4\uDEEB-\uDEEF\uDF00-\uDF35\uDF40-\uDF55\uDF58-\uDF72\uDF78-\uDF91\uDFA9-\uDFAF]|\uD803[\uDC00-\uDC48\uDC80-\uDCB2\uDCC0-\uDCF2\uDCFA-\uDD23\uDD30-\uDD39\uDE60-\uDE7E\uDE80-\uDEA9\uDEB0\uDEB1\uDF00-\uDF27\uDF30-\uDF45\uDF51-\uDF54\uDF70-\uDF81\uDFB0-\uDFCB\uDFE0-\uDFF6]|\uD804[\uDC03-\uDC37\uDC52-\uDC6F\uDC71\uDC72\uDC75\uDC83-\uDCAF\uDCD0-\uDCE8\uDCF0-\uDCF9\uDD03-\uDD26\uDD36-\uDD3F\uDD44\uDD47\uDD50-\uDD72\uDD76\uDD83-\uDDB2\uDDC1-\uDDC4\uDDD0-\uDDDA\uDDDC\uDDE1-\uDDF4\uDE00-\uDE11\uDE13-\uDE2B\uDE3F\uDE40\uDE80-\uDE86\uDE88\uDE8A-\uDE8D\uDE8F-\uDE9D\uDE9F-\uDEA8\uDEB0-\uDEDE\uDEF0-\uDEF9\uDF05-\uDF0C\uDF0F\uDF10\uDF13-\uDF28\uDF2A-\uDF30\uDF32\uDF33\uDF35-\uDF39\uDF3D\uDF50\uDF5D-\uDF61]|\uD805[\uDC00-\uDC34\uDC47-\uDC4A\uDC50-\uDC59\uDC5F-\uDC61\uDC80-\uDCAF\uDCC4\uDCC5\uDCC7\uDCD0-\uDCD9\uDD80-\uDDAE\uDDD8-\uDDDB\uDE00-\uDE2F\uDE44\uDE50-\uDE59\uDE80-\uDEAA\uDEB8\uDEC0-\uDEC9\uDF00-\uDF1A\uDF30-\uDF3B\uDF40-\uDF46]|\uD806[\uDC00-\uDC2B\uDCA0-\uDCF2\uDCFF-\uDD06\uDD09\uDD0C-\uDD13\uDD15\uDD16\uDD18-\uDD2F\uDD3F\uDD41\uDD50-\uDD59\uDDA0-\uDDA7\uDDAA-\uDDD0\uDDE1\uDDE3\uDE00\uDE0B-\uDE32\uDE3A\uDE50\uDE5C-\uDE89\uDE9D\uDEB0-\uDEF8]|\uD807[\uDC00-\uDC08\uDC0A-\uDC2E\uDC40\uDC50-\uDC6C\uDC72-\uDC8F\uDD00-\uDD06\uDD08\uDD09\uDD0B-\uDD30\uDD46\uDD50-\uDD59\uDD60-\uDD65\uDD67\uDD68\uDD6A-\uDD89\uDD98\uDDA0-\uDDA9\uDEE0-\uDEF2\uDF02\uDF04-\uDF10\uDF12-\uDF33\uDF50-\uDF59\uDFB0\uDFC0-\uDFD4]|\uD808[\uDC00-\uDF99]|\uD809[\uDC00-\uDC6E\uDC80-\uDD43]|\uD80B[\uDF90-\uDFF0]|[\uD80C\uD81C-\uD820\uD822\uD840-\uD868\uD86A-\uD86C\uD86F-\uD872\uD874-\uD879\uD880-\uD883\uD885-\uD887][\uDC00-\uDFFF]|\uD80D[\uDC00-\uDC2F\uDC41-\uDC46]|\uD811[\uDC00-\uDE46]|\uD81A[\uDC00-\uDE38\uDE40-\uDE5E\uDE60-\uDE69\uDE70-\uDEBE\uDEC0-\uDEC9\uDED0-\uDEED\uDF00-\uDF2F\uDF40-\uDF43\uDF50-\uDF59\uDF5B-\uDF61\uDF63-\uDF77\uDF7D-\uDF8F]|\uD81B[\uDE40-\uDE96\uDF00-\uDF4A\uDF50\uDF93-\uDF9F\uDFE0\uDFE1\uDFE3]|\uD821[\uDC00-\uDFF7]|\uD823[\uDC00-\uDCD5\uDD00-\uDD08]|\uD82B[\uDFF0-\uDFF3\uDFF5-\uDFFB\uDFFD\uDFFE]|\uD82C[\uDC00-\uDD22\uDD32\uDD50-\uDD52\uDD55\uDD64-\uDD67\uDD70-\uDEFB]|\uD82F[\uDC00-\uDC6A\uDC70-\uDC7C\uDC80-\uDC88\uDC90-\uDC99]|\uD834[\uDEC0-\uDED3\uDEE0-\uDEF3\uDF60-\uDF78]|\uD835[\uDC00-\uDC54\uDC56-\uDC9C\uDC9E\uDC9F\uDCA2\uDCA5\uDCA6\uDCA9-\uDCAC\uDCAE-\uDCB9\uDCBB\uDCBD-\uDCC3\uDCC5-\uDD05\uDD07-\uDD0A\uDD0D-\uDD14\uDD16-\uDD1C\uDD1E-\uDD39\uDD3B-\uDD3E\uDD40-\uDD44\uDD46\uDD4A-\uDD50\uDD52-\uDEA5\uDEA8-\uDEC0\uDEC2-\uDEDA\uDEDC-\uDEFA\uDEFC-\uDF14\uDF16-\uDF34\uDF36-\uDF4E\uDF50-\uDF6E\uDF70-\uDF88\uDF8A-\uDFA8\uDFAA-\uDFC2\uDFC4-\uDFCB\uDFCE-\uDFFF]|\uD837[\uDF00-\uDF1E\uDF25-\uDF2A]|\uD838[\uDC30-\uDC6D\uDD00-\uDD2C\uDD37-\uDD3D\uDD40-\uDD49\uDD4E\uDE90-\uDEAD\uDEC0-\uDEEB\uDEF0-\uDEF9]|\uD839[\uDCD0-\uDCEB\uDCF0-\uDCF9\uDFE0-\uDFE6\uDFE8-\uDFEB\uDFED\uDFEE\uDFF0-\uDFFE]|\uD83A[\uDC00-\uDCC4\uDCC7-\uDCCF\uDD00-\uDD43\uDD4B\uDD50-\uDD59]|\uD83B[\uDC71-\uDCAB\uDCAD-\uDCAF\uDCB1-\uDCB4\uDD01-\uDD2D\uDD2F-\uDD3D\uDE00-\uDE03\uDE05-\uDE1F\uDE21\uDE22\uDE24\uDE27\uDE29-\uDE32\uDE34-\uDE37\uDE39\uDE3B\uDE42\uDE47\uDE49\uDE4B\uDE4D-\uDE4F\uDE51\uDE52\uDE54\uDE57\uDE59\uDE5B\uDE5D\uDE5F\uDE61\uDE62\uDE64\uDE67-\uDE6A\uDE6C-\uDE72\uDE74-\uDE77\uDE79-\uDE7C\uDE7E\uDE80-\uDE89\uDE8B-\uDE9B\uDEA1-\uDEA3\uDEA5-\uDEA9\uDEAB-\uDEBB]|\uD83C[\uDD00-\uDD0C]|\uD83E[\uDFF0-\uDFF9]|\uD869[\uDC00-\uDEDF\uDF00-\uDFFF]|\uD86D[\uDC00-\uDF39\uDF40-\uDFFF]|\uD86E[\uDC00-\uDC1D\uDC20-\uDFFF]|\uD873[\uDC00-\uDEA1\uDEB0-\uDFFF]|\uD87A[\uDC00-\uDFE0]|\uD87E[\uDC00-\uDE1D]|\uD884[\uDC00-\uDF4A\uDF50-\uDFFF]|\uD888[\uDC00-\uDFAF])/))){var i=r[1]||r[2]||"";if(!i||i&&(""===n||this.rules.inline.punctuation.exec(n))){var o,a,u=r[0].length-1,l=u,c=0,s="*"===r[0][0]?this.rules.inline.emStrong.rDelimAst:this.rules.inline.emStrong.rDelimUnd;for(s.lastIndex=0,t=t.slice(-1*e.length+u);null!=(r=s.exec(t));)if(o=r[1]||r[2]||r[3]||r[4]||r[5]||r[6])if(a=o.length,r[3]||r[4])l+=a;else if(!((r[5]||r[6])&&u%3)||(u+a)%3){if(!((l-=a)>0)){a=Math.min(a,a+l+c);var f=e.slice(0,u+r.index+(r[0].length-o.length)+a);if(Math.min(u,a)%2){var d=f.slice(1,-1);return{type:"em",raw:f,text:d,tokens:this.lexer.inlineTokens(d)}}var h=f.slice(2,-2);return{type:"strong",raw:f,text:h,tokens:this.lexer.inlineTokens(h)}}}else c+=a}}}},{key:"codespan",value:function(e){var t=this.rules.inline.code.exec(e);if(t){var n=t[2].replace(/\n/g," "),r=/[^ ]/.test(n),i=/^ /.test(n)&&/ $/.test(n);return r&&i&&(n=n.substring(1,n.length-1)),n=Gs(n,!0),{type:"codespan",raw:t[0],text:n}}}},{key:"br",value:function(e){var t=this.rules.inline.br.exec(e);if(t)return{type:"br",raw:t[0]}}},{key:"del",value:function(e){var t=this.rules.inline.del.exec(e);if(t)return{type:"del",raw:t[0],text:t[2],tokens:this.lexer.inlineTokens(t[2])}}},{key:"autolink",value:function(e,t){var n,r,i=this.rules.inline.autolink.exec(e);if(i)return r="@"===i[2]?"mailto:"+(n=Gs(this.options.mangle?t(i[1]):i[1])):n=Gs(i[1]),{type:"link",raw:i[0],text:n,href:r,tokens:[{type:"text",raw:n,text:n}]}}},{key:"url",value:function(e,t){var n;if(n=this.rules.inline.url.exec(e)){var r,i;if("@"===n[2])i="mailto:"+(r=Gs(this.options.mangle?t(n[0]):n[0]));else{var o;do{o=n[0],n[0]=this.rules.inline._backpedal.exec(n[0])[0]}while(o!==n[0]);r=Gs(n[0]),i="www."===n[1]?"http://"+r:r}return{type:"link",raw:n[0],text:r,href:i,tokens:[{type:"text",raw:r,text:r}]}}}},{key:"inlineText",value:function(e,t){var n,r=this.rules.inline.text.exec(e);if(r)return n=this.lexer.state.inRawBlock?this.options.sanitize?this.options.sanitizer?this.options.sanitizer(r[0]):Gs(r[0]):r[0]:Gs(this.options.smartypants?t(r[0]):r[0]),{type:"text",raw:r[0],text:n}}}]),e}(),mf={newline:/^(?: *(?:\n|$))+/,code:/^( {4}[^\n]+(?:\n(?: *(?:\n|$))*)?)+/,fences:/^ {0,3}(`{3,}(?=[^`\n]*\n)|~{3,})([^\n]*)\n(?:|([\s\S]*?)\n)(?: {0,3}\1[~`]* *(?=\n|$)|$)/,hr:/^ {0,3}((?:-[\t ]*){3,}|(?:_[ \t]*){3,}|(?:\*[ \t]*){3,})(?:\n+|$)/,heading:/^ {0,3}(#{1,6})(?=\s|$)(.*)(?:\n+|$)/,blockquote:/^( {0,3}> ?(paragraph|[^\n]*)(?:\n|$))+/,list:/^( {0,3}bull)([ \t][^\n]+?)?(?:\n|$)/,html:"^ {0,3}(?:<(script|pre|style|textarea)[\\s>][\\s\\S]*?(?:[^\\n]*\\n+|$)|comment[^\\n]*(\\n+|$)|<\\?[\\s\\S]*?(?:\\?>\\n*|$)|\\n*|$)|\\n*|$)|)[\\s\\S]*?(?:(?:\\n *)+\\n|$)|<(?!script|pre|style|textarea)([a-z][\\w-]*)(?:attribute)*? */?>(?=[ \\t]*(?:\\n|$))[\\s\\S]*?(?:(?:\\n *)+\\n|$)|(?=[ \\t]*(?:\\n|$))[\\s\\S]*?(?:(?:\\n *)+\\n|$))",def:/^ {0,3}\[(label)\]: *(?:\n *)?]+)>?(?:(?: +(?:\n *)?| *\n *)(title))? *(?:\n+|$)/,table:lf,lheading:/^([^\n]+)\n {0,3}(=+|-+) *(?:\n+|$)/,_paragraph:/^([^\n]+(?:\n(?!hr|heading|lheading|blockquote|fences|list|html|table| +\n)[^\n]+)*)/,text:/^[^\n]+/,_label:/(?!\s*\])(?:\\.|[^\[\]\\])+/,_title:/(?:"(?:\\"?|[^"\\])*"|'[^'\n]*(?:\n[^'\n]+)*\n?'|\([^()]*\))/};mf.def=Xs(mf.def).replace("label",mf._label).replace("title",mf._title).getRegex(),mf.bullet=/(?:[*+-]|\d{1,9}[.)])/,mf.listItemStart=Xs(/^( *)(bull) */).replace("bull",mf.bullet).getRegex(),mf.list=Xs(mf.list).replace(/bull/g,mf.bullet).replace("hr","\\n+(?=\\1?(?:(?:- *){3,}|(?:_ *){3,}|(?:\\* *){3,})(?:\\n+|$))").replace("def","\\n+(?="+mf.def.source+")").getRegex(),mf._tag="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|section|source|summary|table|tbody|td|tfoot|th|thead|title|tr|track|ul",mf._comment=/|$)/,mf.html=Xs(mf.html,"i").replace("comment",mf._comment).replace("tag",mf._tag).replace("attribute",/ +[a-zA-Z:_][\w.:-]*(?: *= *"[^"\n]*"| *= *'[^'\n]*'| *= *[^\s"'=<>`]+)?/).getRegex(),mf.paragraph=Xs(mf._paragraph).replace("hr",mf.hr).replace("heading"," {0,3}#{1,6} ").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",mf._tag).getRegex(),mf.blockquote=Xs(mf.blockquote).replace("paragraph",mf.paragraph).getRegex(),mf.normal=cf({},mf),mf.gfm=cf({},mf.normal,{table:"^ *([^\\n ].*\\|.*)\\n {0,3}(?:\\| *)?(:?-+:? *(?:\\| *:?-+:? *)*)(?:\\| *)?(?:\\n((?:(?! *\\n|hr|heading|blockquote|code|fences|list|html).*(?:\\n|$))*)\\n*|$)"}),mf.gfm.table=Xs(mf.gfm.table).replace("hr",mf.hr).replace("heading"," {0,3}#{1,6} ").replace("blockquote"," {0,3}>").replace("code"," {4}[^\\n]").replace("fences"," {0,3}(?:`{3,}(?=[^`\\n]*\\n)|~{3,})[^\\n]*\\n").replace("list"," {0,3}(?:[*+-]|1[.)]) ").replace("html",")|<(?:script|pre|style|textarea|!--)").replace("tag",mf._tag).getRegex(),mf.gfm.paragraph=Xs(mf._paragraph).replace("hr",mf.hr).replace("heading"," {0,3}#{1,6} ").replace("|lheading","").replace("table",mf.gfm.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",mf._tag).getRegex(),mf.pedantic=cf({},mf.normal,{html:Xs("^ *(?:comment *(?:\\n|\\s*$)|<(tag)[\\s\\S]+? *(?:\\n{2,}|\\s*$)|\\s]*)*?/?> *(?:\\n{2,}|\\s*$))").replace("comment",mf._comment).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:lf,paragraph:Xs(mf.normal._paragraph).replace("hr",mf.hr).replace("heading"," *#{1,6} *[^\n]").replace("lheading",mf.lheading).replace("blockquote"," {0,3}>").replace("|fences","").replace("|list","").replace("|html","").getRegex()});var yf={escape:/^\\([!"#$%&'()*+,\-./:;<=>?@\[\]\\^_`{|}~])/,autolink:/^<(scheme:[^\s\x00-\x1f<>]*|email)>/,url:lf,tag:"^comment|^|^<[a-zA-Z][\\w-]*(?:attribute)*?\\s*/?>|^<\\?[\\s\\S]*?\\?>|^|^",link:/^!?\[(label)\]\(\s*(href)(?:\s+(title))?\s*\)/,reflink:/^!?\[(label)\]\[(ref)\]/,nolink:/^!?\[(ref)\](?:\[\])?/,reflinkSearch:"reflink|nolink(?!\\()",emStrong:{lDelim:/^(?:\*+(?:([punct_])|[^\s*]))|^_+(?:([punct*])|([^\s_]))/,rDelimAst:/^(?:[^_*\\]|\\.)*?\_\_(?:[^_*\\]|\\.)*?\*(?:[^_*\\]|\\.)*?(?=\_\_)|(?:[^*\\]|\\.)+(?=[^*])|[punct_](\*+)(?=[\s]|$)|(?:[^punct*_\s\\]|\\.)(\*+)(?=[punct_\s]|$)|[punct_\s](\*+)(?=[^punct*_\s])|[\s](\*+)(?=[punct_])|[punct_](\*+)(?=[punct_])|(?:[^punct*_\s\\]|\\.)(\*+)(?=[^punct*_\s])/,rDelimUnd:/^(?:[^_*\\]|\\.)*?\*\*(?:[^_*\\]|\\.)*?\_(?:[^_*\\]|\\.)*?(?=\*\*)|(?:[^_\\]|\\.)+(?=[^_])|[punct*](\_+)(?=[\s]|$)|(?:[^punct*_\s\\]|\\.)(\_+)(?=[punct*\s]|$)|[punct*\s](\_+)(?=[^punct*_\s])|[\s](\_+)(?=[punct*])|[punct*](\_+)(?=[punct*])/},code:/^(`+)([^`]|[^`][\s\S]*?[^`])\1(?!`)/,br:/^( {2,}|\\)\n(?!\s*$)/,del:lf,text:/^(`+|[^`])(?:(?= {2,}\n)|[\s\S]*?(?:(?=[\\.5&&(n="x"+n.toString(16)),r+="&#"+n+";";return r}yf._punctuation="!\"#$%&'()+\\-.,/:;<=>?@\\[\\]`^{|}~",yf.punctuation=Xs(yf.punctuation).replace(/punctuation/g,yf._punctuation).getRegex(),yf.blockSkip=/\[[^\]]*?\]\([^\)]*?\)|`[^`]*?`|<[^>]*?>/g,yf.escapedEmSt=/(?:^|[^\\])(?:\\\\)*\\[*_]/g,yf._comment=Xs(mf._comment).replace("(?:--\x3e|$)","--\x3e").getRegex(),yf.emStrong.lDelim=Xs(yf.emStrong.lDelim).replace(/punct/g,yf._punctuation).getRegex(),yf.emStrong.rDelimAst=Xs(yf.emStrong.rDelimAst,"g").replace(/punct/g,yf._punctuation).getRegex(),yf.emStrong.rDelimUnd=Xs(yf.emStrong.rDelimUnd,"g").replace(/punct/g,yf._punctuation).getRegex(),yf._escapes=/\\([!"#$%&'()*+,\-./:;<=>?@\[\]\\^_`{|}~])/g,yf._scheme=/[a-zA-Z][a-zA-Z0-9+.-]{1,31}/,yf._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])?)+(?![-_])/,yf.autolink=Xs(yf.autolink).replace("scheme",yf._scheme).replace("email",yf._email).getRegex(),yf._attribute=/\s+[a-zA-Z:_][\w.:-]*(?:\s*=\s*"[^"]*"|\s*=\s*'[^']*'|\s*=\s*[^\s"'=<>`]+)?/,yf.tag=Xs(yf.tag).replace("comment",yf._comment).replace("attribute",yf._attribute).getRegex(),yf._label=/(?:\[(?:\\.|[^\[\]\\])*\]|\\.|`[^`]*`|[^\[\]\\`])*?/,yf._href=/<(?:\\.|[^\n<>\\])+>|[^\s\x00-\x1f]*/,yf._title=/"(?:\\"?|[^"\\])*"|'(?:\\'?|[^'\\])*'|\((?:\\\)?|[^)\\])*\)/,yf.link=Xs(yf.link).replace("label",yf._label).replace("href",yf._href).replace("title",yf._title).getRegex(),yf.reflink=Xs(yf.reflink).replace("label",yf._label).replace("ref",mf._label).getRegex(),yf.nolink=Xs(yf.nolink).replace("ref",mf._label).getRegex(),yf.reflinkSearch=Xs(yf.reflinkSearch,"g").replace("reflink",yf.reflink).replace("nolink",yf.nolink).getRegex(),yf.normal=cf({},yf),yf.pedantic=cf({},yf.normal,{strong:{start:/^__|\*\*/,middle:/^__(?=\S)([\s\S]*?\S)__(?!_)|^\*\*(?=\S)([\s\S]*?\S)\*\*(?!\*)/,endAst:/\*\*(?!\*)/g,endUnd:/__(?!_)/g},em:{start:/^_|\*/,middle:/^()\*(?=\S)([\s\S]*?\S)\*(?!\*)|^_(?=\S)([\s\S]*?\S)_(?!_)/,endAst:/\*(?!\*)/g,endUnd:/_(?!_)/g},link:Xs(/^!?\[(label)\]\((.*?)\)/).replace("label",yf._label).getRegex(),reflink:Xs(/^!?\[(label)\]\s*\[([^\]]*)\]/).replace("label",yf._label).getRegex()}),yf.gfm=cf({},yf.normal,{escape:Xs(yf.escape).replace("])","~|])").getRegex(),_extended_email:/[A-Za-z0-9._+-]+(@)[a-zA-Z0-9-_]+(?:\.[a-zA-Z0-9-_]*[a-zA-Z0-9])+(?![-_])/,url:/^((?:ftp|https?):\/\/|www\.)(?:[a-zA-Z0-9\-]+\.?)+[^\s<]*|^email/,_backpedal:/(?:[^?!.,:;*_~()&]+|\([^)]*\)|&(?![a-zA-Z0-9]+;$)|[?!.,:;*_~)]+(?!$))+/,del:/^(~~?)(?=[^\s~])([\s\S]*?[^\s~])\1(?=[^~]|$)/,text:/^([`~]+|[^`~])(?:(?= {2,}\n)|(?=[a-zA-Z0-9.!#$%&'*+\/=?_`{\|}~-]+@)|[\s\S]*?(?:(?=[\\1&&void 0!==arguments[1]?arguments[1]:[];for(e=this.options.pedantic?e.replace(/\t/g," ").replace(/^ +$/gm,""):e.replace(/^( *)(\t+)/gm,(function(e,t,n){return t+" ".repeat(n.length)}));e;)if(!(this.options.extensions&&this.options.extensions.block&&this.options.extensions.block.some((function(n){return!!(t=n.call({lexer:o},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])||"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])||"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&&function(){var t=1/0,n=e.slice(1),i=void 0;o.options.extensions.startBlock.forEach((function(e){"number"===typeof(i=e.call({lexer:this},n))&&i>=0&&(t=Math.min(t,i))})),t<1/0&&t>=0&&(r=e.substring(0,t+1))}(),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])&&"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){var u="Infinite loop on byte: "+e.charCodeAt(0);if(this.options.silent){console.error(u);break}throw new Error(u)}return this.state.top=!0,a}},{key:"inline",value:function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:[];return this.inlineQueue.push({src:e,tokens:t}),t}},{key:"inlineTokens",value:function(e){var t,n,r,i,o,a,u=this,l=arguments.length>1&&void 0!==arguments[1]?arguments[1]:[],c=e;if(this.tokens.links){var s=Object.keys(this.tokens.links);if(s.length>0)for(;null!=(i=this.tokenizer.rules.inline.reflinkSearch.exec(c));)s.includes(i[0].slice(i[0].lastIndexOf("[")+1,-1))&&(c=c.slice(0,i.index)+"["+hf("a",i[0].length-2)+"]"+c.slice(this.tokenizer.rules.inline.reflinkSearch.lastIndex))}for(;null!=(i=this.tokenizer.rules.inline.blockSkip.exec(c));)c=c.slice(0,i.index)+"["+hf("a",i[0].length-2)+"]"+c.slice(this.tokenizer.rules.inline.blockSkip.lastIndex);for(;null!=(i=this.tokenizer.rules.inline.escapedEmSt.exec(c));)c=c.slice(0,i.index+i[0].length-2)+"++"+c.slice(this.tokenizer.rules.inline.escapedEmSt.lastIndex),this.tokenizer.rules.inline.escapedEmSt.lastIndex--;for(;e;)if(o||(a=""),o=!1,!(this.options.extensions&&this.options.extensions.inline&&this.options.extensions.inline.some((function(n){return!!(t=n.call({lexer:u},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])&&"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])&&"text"===t.type&&"text"===n.type?(n.raw+=t.raw,n.text+=t.text):l.push(t);else if(t=this.tokenizer.emStrong(e,c,a))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,_f))e=e.substring(t.raw.length),l.push(t);else if(this.state.inLink||!(t=this.tokenizer.url(e,_f))){if(r=e,this.options.extensions&&this.options.extensions.startInline&&function(){var t=1/0,n=e.slice(1),i=void 0;u.options.extensions.startInline.forEach((function(e){"number"===typeof(i=e.call({lexer:this},n))&&i>=0&&(t=Math.min(t,i))})),t<1/0&&t>=0&&(r=e.substring(0,t+1))}(),t=this.tokenizer.inlineText(r,gf))e=e.substring(t.raw.length),"_"!==t.raw.slice(-1)&&(a=t.raw.slice(-1)),o=!0,(n=l[l.length-1])&&"text"===n.type?(n.raw+=t.raw,n.text+=t.text):l.push(t);else if(e){var f="Infinite loop on byte: "+e.charCodeAt(0);if(this.options.silent){console.error(f);break}throw new Error(f)}}else e=e.substring(t.raw.length),l.push(t);return l}}],[{key:"rules",get:function(){return{block:mf,inline:yf}}},{key:"lex",value:function(t,n){return new e(n).lex(t)}},{key:"lexInline",value:function(t,n){return new e(n).inlineTokens(t)}}]),e}(),Df=function(){function e(t){Dt(this,e),this.options=t||Us}return xt(e,[{key:"code",value:function(e,t,n){var r=(t||"").match(/\S*/)[0];if(this.options.highlight){var i=this.options.highlight(e,r);null!=i&&i!==e&&(n=!0,e=i)}return e=e.replace(/\n$/,"")+"\n",r?'
    '+(n?e:Gs(e,!0))+"
    \n":"
    "+(n?e:Gs(e,!0))+"
    \n"}},{key:"blockquote",value:function(e){return"
    \n".concat(e,"
    \n")}},{key:"html",value:function(e){return e}},{key:"heading",value:function(e,t,n,r){if(this.options.headerIds){var i=this.options.headerPrefix+r.slug(n);return"').concat(e,"\n")}return"").concat(e,"\n")}},{key:"hr",value:function(){return this.options.xhtml?"
    \n":"
    \n"}},{key:"list",value:function(e,t,n){var r=t?"ol":"ul";return"<"+r+(t&&1!==n?' start="'+n+'"':"")+">\n"+e+"\n"}},{key:"listitem",value:function(e){return"
  • ".concat(e,"
  • \n")}},{key:"checkbox",value:function(e){return" "}},{key:"paragraph",value:function(e){return"

    ".concat(e,"

    \n")}},{key:"table",value:function(e,t){return t&&(t="".concat(t,"")),"\n\n"+e+"\n"+t+"
    \n"}},{key:"tablerow",value:function(e){return"\n".concat(e,"\n")}},{key:"tablecell",value:function(e,t){var n=t.header?"th":"td";return(t.align?"<".concat(n,' align="').concat(t.align,'">'):"<".concat(n,">"))+e+"\n")}},{key:"strong",value:function(e){return"".concat(e,"")}},{key:"em",value:function(e){return"".concat(e,"")}},{key:"codespan",value:function(e){return"".concat(e,"")}},{key:"br",value:function(){return this.options.xhtml?"
    ":"
    "}},{key:"del",value:function(e){return"".concat(e,"")}},{key:"link",value:function(e,t,n){if(null===(e=nf(this.options.sanitize,this.options.baseUrl,e)))return n;var r='
    "}},{key:"image",value:function(e,t,n){if(null===(e=nf(this.options.sanitize,this.options.baseUrl,e)))return n;var r='').concat(n,'":">"}},{key:"text",value:function(e){return e}}]),e}(),wf=function(){function e(){Dt(this,e)}return xt(e,[{key:"strong",value:function(e){return e}},{key:"em",value:function(e){return e}},{key:"codespan",value:function(e){return e}},{key:"del",value:function(e){return e}},{key:"html",value:function(e){return e}},{key:"text",value:function(e){return e}},{key:"link",value:function(e,t,n){return""+n}},{key:"image",value:function(e,t,n){return""+n}},{key:"br",value:function(){return""}}]),e}(),xf=function(){function e(){Dt(this,e),this.seen={}}return xt(e,[{key:"serialize",value:function(e){return e.toLowerCase().trim().replace(/<[!\/a-z].*?>/gi,"").replace(/[\u2000-\u206F\u2E00-\u2E7F\\'!"#$%&()*+,./:;<=>?@[\]^`{|}~]/g,"").replace(/\s/g,"-")}},{key:"getNextSafeSlug",value:function(e,t){var n=e,r=0;if(this.seen.hasOwnProperty(n)){r=this.seen[e];do{n=e+"-"+ ++r}while(this.seen.hasOwnProperty(n))}return t||(this.seen[e]=r,this.seen[n]=0),n}},{key:"slug",value:function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},n=this.serialize(e);return this.getNextSafeSlug(n,t.dryrun)}}]),e}(),kf=function(){function e(t){Dt(this,e),this.options=t||Us,this.options.renderer=this.options.renderer||new Df,this.renderer=this.options.renderer,this.renderer.options=this.options,this.textRenderer=new wf,this.slugger=new xf}return xt(e,[{key:"parse",value:function(e){var t,n,r,i,o,a,u,l,c,s,f,d,h,p,v,m,y,g,_,b=!(arguments.length>1&&void 0!==arguments[1])||arguments[1],D="",w=e.length;for(t=0;t0&&"paragraph"===v.tokens[0].type?(v.tokens[0].text=g+" "+v.tokens[0].text,v.tokens[0].tokens&&v.tokens[0].tokens.length>0&&"text"===v.tokens[0].tokens[0].type&&(v.tokens[0].tokens[0].text=g+" "+v.tokens[0].tokens[0].text)):v.tokens.unshift({type:"text",text:g}):p+=g),p+=this.parse(v.tokens,h),c+=this.renderer.listitem(p,y,m);D+=this.renderer.list(c,f,d);continue;case"html":D+=this.renderer.html(s.text);continue;case"paragraph":D+=this.renderer.paragraph(this.parseInline(s.tokens));continue;case"text":for(c=s.tokens?this.parseInline(s.tokens):s.text;t+1An error occurred:

    "+Gs(e.message+"",!0)+"
    ";throw e}try{var l=bf.lex(e,t);if(t.walkTokens){if(t.async)return Promise.all(Cf.walkTokens(l,t.walkTokens)).then((function(){return kf.parse(l,t)})).catch(u);Cf.walkTokens(l,t.walkTokens)}return kf.parse(l,t)}catch(c){u(c)}}Cf.options=Cf.setOptions=function(e){var t;return cf(Cf.defaults,e),t=Cf.defaults,Us=t,Cf},Cf.getDefaults=zs,Cf.defaults=Us,Cf.use=function(){for(var e=arguments.length,t=new Array(e),n=0;nAn error occurred:

    "+Gs(c.message+"",!0)+"
    ";throw c}},Cf.Parser=kf,Cf.parser=kf.parse,Cf.Renderer=Df,Cf.TextRenderer=wf,Cf.Lexer=bf,Cf.lexer=bf.lex,Cf.Tokenizer=vf,Cf.Slugger=xf,Cf.parse=Cf;Cf.options,Cf.setOptions,Cf.use,Cf.walkTokens,Cf.parseInline,kf.parse,bf.lex;var Ef=function(e){var t=e.title,n=e.description,r=e.unit,i=e.expr,o=e.showLegend,a=e.filename,u=e.alias,l=Wr().period,c=Qr(),s=re(null),f=_t(X(!0),2),d=f[0],h=f[1],p=_t(X(l.step||1),2),v=p[0],y=p[1],g=_t(X({limits:{enable:!1,range:{1:[0,0]}}}),2),_=g[0],b=g[1],D=oe((function(){return Array.isArray(i)&&i.every((function(e){return e}))}),[i]),w=ws({predefinedQuery:D?i:[],display:"chart",visible:d,customStep:v}),x=w.isLoading,k=w.graphData,C=w.error,E=w.warning,A=function(e){var t=Kn({},_);t.limits.range=e,b(t)};if(te((function(){var e=new IntersectionObserver((function(e){e.forEach((function(e){return h(e.isIntersecting)}))}),{threshold:.1});return s.current&&e.observe(s.current),function(){s.current&&e.unobserve(s.current)}}),[]),!D)return fr(oo,{variant:"error",children:[fr("code",{children:'"expr"'})," not found. Check the configuration file ",fr("b",{children:a}),"."]});var S=function(){return fr("div",{className:"vm-predefined-panel-header__description vm-default-styles",children:[n&&fr(m,{children:[fr("div",{children:[fr("span",{children:"Description:"}),fr("div",{dangerouslySetInnerHTML:{__html:Cf.parse(n)}})]}),fr("hr",{})]}),fr("div",{children:[fr("span",{children:"Queries:"}),fr("div",{children:i.map((function(e,t){return fr("div",{children:e},"".concat(t,"_").concat(e))}))})]})]})};return fr("div",{className:"vm-predefined-panel",ref:s,children:[fr("div",{className:"vm-predefined-panel-header",children:[fr(fo,{title:fr(S,{}),children:fr("div",{className:"vm-predefined-panel-header__info",children:fr(li,{})})}),fr("h3",{className:"vm-predefined-panel-header__title",children:t||""}),fr("div",{className:"vm-predefined-panel-header__step",children:fr(ds,{defaultStep:l.step,setStep:y})}),fr(Es,{yaxis:_,setYaxisLimits:A,toggleEnableLimits:function(){var e=Kn({},_);e.limits.enable=!e.limits.enable,b(e)}})]}),fr("div",{className:"vm-predefined-panel-body",children:[x&&fr(As,{}),C&&fr(oo,{variant:"error",children:C}),E&&fr(oo,{variant:"warning",children:E}),k&&fr(ls,{data:k,period:l,customStep:v,query:i,yaxis:_,unit:r,alias:u,showLegend:o,setYaxisLimits:A,setPeriod:function(e){var t=e.from,n=e.to;c({type:"SET_PERIOD",payload:{from:t,to:n}})},fullWidth:!1})]})]})},Af=function(e){var t=e.defaultExpanded,n=void 0!==t&&t,r=e.onChange,i=e.title,o=e.children,a=_t(X(n),2),u=a[0],l=a[1];return te((function(){r&&r(u)}),[u]),fr(m,{children:[fr("header",{className:"vm-accordion-header ".concat(u&&"vm-accordion-header_open"),onClick:function(){l((function(e){return!e}))},children:[i,fr("div",{className:"vm-accordion-header__arrow ".concat(u&&"vm-accordion-header__arrow_open"),children:fr(hi,{})})]}),u&&fr("section",{className:"vm-accordion-section",children:o},"content")]})},Sf=function(e){var t=e.index,n=e.title,r=e.panels,i=e.filename,o=mo(document.body),a=oe((function(){return o.width/12}),[o]),u=_t(X(!t),2),l=u[0],c=u[1],s=_t(X([]),2),f=s[0],d=s[1];te((function(){d(r&&r.map((function(e){return e.width||12})))}),[r]);var h=_t(X({start:0,target:0,enable:!1}),2),p=h[0],v=h[1],m=function(e){if(p.enable){var t=p.start,n=Math.ceil((t-e.clientX)/a);if(!(Math.abs(n)>=12)){var r=f.map((function(e,t){return e-(t===p.target?n:0)}));d(r)}}},y=function(){v(Kn(Kn({},p),{},{enable:!1}))},g=function(e){return function(t){!function(e,t){v({start:e.clientX,target:t,enable:!0})}(t,e)}};return te((function(){return window.addEventListener("mousemove",m),window.addEventListener("mouseup",y),function(){window.removeEventListener("mousemove",m),window.removeEventListener("mouseup",y)}}),[p]),fr("div",{className:"vm-predefined-dashboard",children:fr(Af,{defaultExpanded:l,onChange:function(e){return c(e)},title:fr((function(){return fr("div",{className:Oi()({"vm-predefined-dashboard-header":!0,"vm-predefined-dashboard-header_open":l}),children:[(n||i)&&fr("span",{className:"vm-predefined-dashboard-header__title",children:n||"".concat(t+1,". ").concat(i)}),r&&fr("span",{className:"vm-predefined-dashboard-header__count",children:["(",r.length," panels)"]})]})}),{}),children:fr("div",{className:"vm-predefined-dashboard-panels",children:Array.isArray(r)&&r.length?r.map((function(e,t){return fr("div",{className:"vm-predefined-dashboard-panels-panel vm-block vm-block_empty-padding",style:{gridColumn:"span ".concat(f[t])},children:[fr(Ef,{title:e.title,description:e.description,unit:e.unit,expr:e.expr,alias:e.alias,filename:i,showLegend:e.showLegend}),fr("button",{className:"vm-predefined-dashboard-panels-panel__resizer",onMouseDown:g(t)})]},t)})):fr("div",{className:"vm-predefined-dashboard-panels-panel__alert",children:fr(oo,{variant:"error",children:[fr("code",{children:'"panels"'})," not found. Check the configuration file ",fr("b",{children:i}),"."]})})})})})},Ff=function(){!function(){var e=Wr(),t=e.duration,n=e.relativeTime,r=e.period,i=r.date,o=r.step,a=function(){var e,r=Ps((qn(e={},"g0.range_input",t),qn(e,"g0.end_input",i),qn(e,"g0.step_input",o),qn(e,"g0.relative_time",n),e));ar(r)};te(a,[t,n,i,o]),te(a,[])}();var e=_t(X([]),2),t=e[0],n=e[1],r=_t(X("0"),2),i=r[0],o=r[1],a=oe((function(){return t.map((function(e,t){return{label:e.title||"",value:"".concat(t),className:"vm-predefined-panels-tabs__tab"}}))}),[t]),u=oe((function(){return t[+i]||{}}),[t,i]),l=oe((function(){return null===u||void 0===u?void 0:u.rows}),[u]),c=oe((function(){return u.title||u.filename||""}),[u]),s=oe((function(){return Array.isArray(l)&&!!l.length}),[l]);return te((function(){js().then((function(e){return e.length&&n(e)}))}),[]),fr("div",{className:"vm-predefined-panels",children:[!t.length&&fr(oo,{variant:"info",children:"Dashboards not found"}),a.length>1&&fr("div",{className:"vm-predefined-panels-tabs vm-block vm-block_empty-padding",children:fr(Mi,{activeItem:i,items:a,onChange:function(e){o(e)}})}),fr("div",{className:"vm-predefined-panels__dashboards",children:[s&&l.map((function(e,t){return fr(Sf,{index:t,filename:c,title:e.title,panels:e.panels},"".concat(i,"_").concat(t))})),!!t.length&&!s&&fr(oo,{variant:"error",children:[fr("code",{children:'"rows"'})," not found. Check the configuration file ",fr("b",{children:c}),"."]})]})]})},Nf=function(e,t){var n=t.match?"&match[]="+encodeURIComponent(t.match):"",r=t.focusLabel?"&focusLabel="+encodeURIComponent(t.focusLabel):"";return"".concat(e,"/api/v1/status/tsdb?topN=").concat(t.topN,"&date=").concat(t.date).concat(n).concat(r)},Of=function(){function e(){Dt(this,e),this.tsdbStatus=void 0,this.tabsNames=void 0,this.tsdbStatus=this.defaultTSDBStatus,this.tabsNames=["table","graph"]}return xt(e,[{key:"tsdbStatusData",get:function(){return this.tsdbStatus},set:function(e){this.tsdbStatus=e}},{key:"defaultTSDBStatus",get:function(){return{totalSeries:0,totalLabelValuePairs:0,seriesCountByMetricName:[],seriesCountByLabelName:[],seriesCountByFocusLabelValue:[],seriesCountByLabelValuePair:[],labelValueCountByLabelName:[]}}},{key:"keys",value:function(e){var t=[];return e&&(t=t.concat("seriesCountByFocusLabelValue")),t=t.concat("seriesCountByMetricName","seriesCountByLabelName","seriesCountByLabelValuePair","labelValueCountByLabelName"),t}},{key:"defaultState",get:function(){var e=this;return this.keys("job").reduce((function(t,n){return Kn(Kn({},t),{},{tabs:Kn(Kn({},t.tabs),{},qn({},n,e.tabsNames)),containerRefs:Kn(Kn({},t.containerRefs),{},qn({},n,re(null))),defaultActiveTab:Kn(Kn({},t.defaultActiveTab),{},qn({},n,0))})}),{tabs:{},containerRefs:{},defaultActiveTab:{}})}},{key:"sectionsTitles",value:function(e){return{seriesCountByMetricName:"Metric names with the highest number of series",seriesCountByLabelName:"Labels with the highest number of series",seriesCountByFocusLabelValue:'Values for "'.concat(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"}}},{key:"tablesHeaders",get:function(){return{seriesCountByMetricName:Tf,seriesCountByLabelName:Bf,seriesCountByFocusLabelValue:Mf,seriesCountByLabelValuePair:Lf,labelValueCountByLabelName:Pf}}},{key:"totalSeries",value:function(e){return"labelValueCountByLabelName"===e?-1:this.tsdbStatus.totalSeries}}]),e}(),Tf=[{id:"name",label:"Metric name"},{id:"value",label:"Number of series"},{id:"percentage",label:"Percent of series"},{id:"action",label:"Action"}],Bf=[{id:"name",label:"Label name"},{id:"value",label:"Number of series"},{id:"percentage",label:"Percent of series"},{id:"action",label:"Action"}],Mf=[{id:"name",label:"Label value"},{id:"value",label:"Number of series"},{id:"percentage",label:"Percent of series"},{disablePadding:!1,id:"action",label:"Action",numeric:!1}],Lf=[{id:"name",label:"Label=value pair"},{id:"value",label:"Number of series"},{id:"percentage",label:"Percent of series"},{id:"action",label:"Action"}],Pf=[{id:"name",label:"Label name"},{id:"value",label:"Number of unique values"},{id:"action",label:"Action"}],$f={seriesCountByMetricName:function(e,t){return Rf("__name__",t)},seriesCountByLabelName:function(e,t){return"{".concat(t,'!=""}')},seriesCountByFocusLabelValue:function(e,t){return Rf(e,t)},seriesCountByLabelValuePair:function(e,t){var n=t.split("="),r=n[0],i=n.slice(1).join("=");return Rf(r,i)},labelValueCountByLabelName:function(e,t){return"{".concat(t,'!=""}')}},Rf=function(e,t){return e?"{"+e+"="+JSON.stringify(t)+"}":""},If=function(e){var t=e.topN,n=e.error,r=e.query,i=e.onSetHistory,o=e.onRunQuery,a=e.onSetQuery,u=e.onTopNChange,l=e.onFocusLabelChange,c=e.totalSeries,s=e.totalLabelValuePairs,f=e.date,d=e.match,h=e.focusLabel,p=ni().autocomplete,v=ri(),m=Ss().queryOptions,y=oe((function(){return t<1?"Number must be bigger than zero":""}),[t]);return fr("div",{className:"vm-cardinality-configurator vm-block",children:[fr("div",{className:"vm-cardinality-configurator-controls",children:[fr("div",{className:"vm-cardinality-configurator-controls__query",children:fr(cs,{value:r||d||"",autocomplete:p,options:m,error:n,onArrowUp:function(){i(-1)},onArrowDown:function(){i(1)},onEnter:o,onChange:a,label:"Time series selector"})}),fr("div",{className:"vm-cardinality-configurator-controls__item",children:fr(So,{label:"Number of entries per table",type:"number",value:t,error:y,onChange:u})}),fr("div",{className:"vm-cardinality-configurator-controls__item",children:fr(So,{label:"Focus label",type:"text",value:h||"",onChange:l})}),fr("div",{className:"vm-cardinality-configurator-controls__item",children:fr(ps,{label:"Autocomplete",value:p,onChange:function(){v({type:"TOGGLE_AUTOCOMPLETE"})}})})]}),fr("div",{className:"vm-cardinality-configurator-bottom",children:[fr("div",{className:"vm-cardinality-configurator-bottom__info",children:["Analyzed ",fr("b",{children:c})," series with ",fr("b",{children:s}),' "label=value" pairs at ',fr("b",{children:f}),d&&fr("span",{children:[" for series selector ",fr("b",{children:d})]}),". Show top ",t," entries per table."]}),fr(lo,{startIcon:fr(bi,{}),onClick:o,children:"Execute Query"})]})]})};function jf(e){var t=e.order,n=e.orderBy,r=e.onRequestSort,i=e.headerCells;return fr("thead",{className:"vm-table-header",children:fr("tr",{className:"vm-table__row vm-table__row_header",children:i.map((function(e){return fr("th",{className:Oi()({"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:(i=e.id,function(e){r(e,i)}),children:fr("div",{className:"vm-table-cell__content",children:[e.label,"action"!==e.id&&"percentage"!==e.id&&fr("div",{className:Oi()({"vm-table__sort-icon":!0,"vm-table__sort-icon_active":n===e.id,"vm-table__sort-icon_desc":"desc"===t&&n===e.id}),children:fr(vi,{})})]})},e.id);var i}))})})}function zf(e,t,n){return t[n]e[n]?1:0}function Uf(e,t){return"desc"===e?function(e,n){return zf(e,n,t)}:function(e,n){return-zf(e,n,t)}}function Hf(e,t){var n=e.map((function(e,t){return[e,t]}));return n.sort((function(e,n){var r=t(e[0],n[0]);return 0!==r?r:e[1]-n[1]})),n.map((function(e){return e[0]}))}var Yf=function(e){var t=e.rows,n=e.headerCells,r=e.defaultSortColumn,i=e.tableCells,o=_t(X("desc"),2),a=o[0],u=o[1],l=_t(X(r),2),c=l[0],s=l[1],f=_t(X([]),2),d=f[0],h=f[1],p=function(e){return function(){var t=d.indexOf(e),n=[];-1===t?n=n.concat(d,e):0===t?n=n.concat(d.slice(1)):t===d.length-1?n=n.concat(d.slice(0,-1)):t>0&&(n=n.concat(d.slice(0,t),d.slice(t+1))),h(n)}},v=Hf(t,Uf(a,c));return fr("table",{className:"vm-table",children:[fr(jf,{numSelected:d.length,order:a,orderBy:c,onSelectAllClick:function(e){if(e.target.checked){var n=t.map((function(e){return e.name}));h(n)}else h([])},onRequestSort:function(e,t){u(c===t&&"asc"===a?"desc":"asc"),s(t)},rowCount:t.length,headerCells:n}),fr("tbody",{className:"vm-table-header",children:v.map((function(e){return fr("tr",{className:Oi()({"vm-table__row":!0,"vm-table__row_selected":(t=e.name,-1!==d.indexOf(t))}),onClick:p(e.name),children:i(e)},e.name);var t}))})]})},Vf=function(e){var t=e.row,n=e.totalSeries,r=e.onActionClick,i=n>0?t.value/n*100:-1;return fr(m,{children:[fr("td",{className:"vm-table-cell",children:t.name},t.name),fr("td",{className:"vm-table-cell",children:t.value},t.value),i>0&&fr("td",{className:"vm-table-cell",children:fr(Fs,{value:i})},t.progressValue),fr("td",{className:"vm-table-cell vm-table-cell_right",children:fr("div",{className:"vm-table-cell__content",children:fr(fo,{title:"Filter by ".concat(t.name),children:fr(lo,{variant:"text",size:"small",onClick:r,children:fr(Di,{})})})})},"action")]})},qf=function(e){var t=e.data,n=e.container,r=e.configs,i=re(null),o=_t(X(),2),a=o[0],u=o[1],l=mo(n),c=Kn(Kn({},r),{},{width:l.width||400});return te((function(){if(i.current){var e=new Lc(c,t,i.current);return u(e),e.destroy}}),[i.current,l]),te((function(){a&&a.setData(t)}),[t]),fr("div",{style:{height:"100%"},children:fr("div",{ref:i})})},Wf=function(e,t){return Math.round(e*(t=Math.pow(10,t)))/t},Qf=1,Gf=function(e,t,n,r){return Wf(t+e*(n+r),6)},Zf=function(e,t,n,r,i){var o=1-t,a=n===Qf?o/(e-1):2===n?o/e:3===n?o/(e+1):0;(isNaN(a)||a===1/0)&&(a=0);var u=n===Qf?0:2===n?a/2:3===n?a:0,l=t/e,c=Wf(l,6);if(null==r)for(var s=0;s=n&&e<=i&&t>=r&&t<=o};function Kf(e,t,n,r,i){var o=this;o.x=e,o.y=t,o.w=n,o.h=r,o.l=i||0,o.o=[],o.q=null}var Xf={split:function(){var e=this,t=e.x,n=e.y,r=e.w/2,i=e.h/2,o=e.l+1;e.q=[new Kf(t+r,n,r,i,o),new Kf(t,n,r,i,o),new Kf(t,n+i,r,i,o),new Kf(t+r,n+i,r,i,o)]},quads:function(e,t,n,r,i){var o=this,a=o.q,u=o.x+o.w/2,l=o.y+o.h/2,c=tu,d=t+r>l;c&&f&&i(a[0]),s&&c&&i(a[1]),s&&d&&i(a[2]),f&&d&&i(a[3])},add:function(e){var t=this;if(null!=t.q)t.quads(e.x,e.y,e.w,e.h,(function(t){t.add(e)}));else{var n=t.o;if(n.push(e),n.length>10&&t.l<4){t.split();for(var r=function(e){var r=n[e];t.quads(r.x,r.y,r.w,r.h,(function(e){e.add(r)}))},i=0;i=0?"left":"right",e.ctx.textBaseline=1===s?"middle":i[n]>=0?"bottom":"top",e.ctx.fillText(i[n],f,g)}}))})),e.ctx.restore()}function b(e,t,n){return[0,Lc.rangeNum(0,n,.05,!0)[1]]}return{hooks:{drawClear:function(t){var n;if((y=y||new Kf(0,0,t.bbox.width,t.bbox.height)).clear(),t.series.forEach((function(e){e._paths=null})),l=d?[null].concat(m(t.data.length-1-o.length,t.data[0].length)):2===t.series.length?[null].concat(m(t.data[0].length,1)):[null].concat(function(e,t){var n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:h,r=Array.from({length:t},(function(){return{offs:Array(e).fill(0),size:Array(e).fill(0)}}));return Zf(e,n,p,null,(function(e,n,i){Zf(t,1,v,null,(function(t,o,a){r[t].offs[e]=n+i*o,r[t].size[e]=i*a}))})),r}(t.data[0].length,t.data.length-1-o.length,1===t.data[0].length?1:h)),null!=(null===(n=e.disp)||void 0===n?void 0:n.fill)){c=[null];for(var r=1;r0&&!o.includes(t)&&Lc.assign(e,{paths:g,points:{show:_}})}))}}}((ed=[1],td=0,nd=1,rd=0,id=function(e,t){return{stroke:e,fill:t}}({unit:3,values:function(e){return e.data[1].map((function(e,t){return 0!==t?"#33BB55":"#F79420"}))}},{unit:3,values:function(e){return e.data[1].map((function(e,t){return 0!==t?"#33BB55":"#F79420"}))}}),{which:ed,ori:td,dir:nd,radius:rd,disp:id}))]},ad=function(e){var t=e.rows,n=e.activeTab,r=e.onChange,i=e.tabs,o=e.chartContainer,a=e.totalSeries,u=e.tabId,l=e.onActionClick,c=e.sectionTitle,s=e.tableHeaderCells,f=oe((function(){return i.map((function(e,t){return{value:String(t),label:e,icon:fr(0===t?xi:wi,{})}}))}),[i]);return fr("div",{className:"vm-metrics-content vm-block",children:[fr("div",{className:"vm-metrics-content-header vm-section-header",children:[fr("h5",{className:"vm-section-header__title",children:c}),fr("div",{className:"vm-section-header__tabs",children:fr(Mi,{activeItem:String(n),items:f,onChange:function(e){r(e,u)}})})]}),fr("div",{ref:o,children:[0===n&&fr(Yf,{rows:t,headerCells:s,defaultSortColumn:"value",tableCells:function(e){return fr(Vf,{row:e,totalSeries:a,onActionClick:l})}}),1===n&&fr(qf,{data:[t.map((function(e){return e.name})),t.map((function(e){return e.value})),t.map((function(e,t){return t%12==0?1:t%10==0?2:0}))],container:(null===o||void 0===o?void 0:o.current)||null,configs:od})]})]})},ud=function(){var e=Ji(),t=e.topN,n=e.match,r=e.date,i=e.focusLabel,o=Ki();!function(){var e=Ji(),t=e.topN,n=e.match,r=e.date,i=e.focusLabel,o=e.extraLabel,a=function(){var e=Ps({topN:t,date:r,match:n,extraLabel:o,focusLabel:i});ar(e)};te(a,[t,n,r,i,o]),te(a,[])}();var a=_t(X(n||""),2),u=a[0],l=a[1],c=_t(X(0),2),s=c[0],f=c[1],d=_t(X([]),2),h=d[0],p=d[1],v=function(){var e=new Of,t=Ji(),n=t.topN,r=t.extraLabel,i=t.match,o=t.date,a=t.runQuery,u=t.focusLabel,l=hr().serverUrl,c=_t(X(!1),2),s=c[0],f=c[1],d=_t(X(),2),h=d[0],p=d[1],v=_t(X(e.defaultTSDBStatus),2),m=v[0],y=v[1];te((function(){h&&(y(e.defaultTSDBStatus),f(!1))}),[h]);var g=function(){var t=Xc(Jc().mark((function t(n){var r,i,o,a;return Jc().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:if(l){t.next=2;break}return t.abrupt("return");case 2:return p(""),f(!0),y(e.defaultTSDBStatus),r=Nf(l,n),t.prev=6,t.next=9,fetch(r);case 9:return i=t.sent,t.next=12,i.json();case 12:o=t.sent,i.ok?(a=o.data,y(Kn({},a)),f(!1)):(p(o.error),y(e.defaultTSDBStatus),f(!1)),t.next=20;break;case 16:t.prev=16,t.t0=t.catch(6),f(!1),t.t0 instanceof Error&&p("".concat(t.t0.name,": ").concat(t.t0.message));case 20:case"end":return t.stop()}}),t,null,[[6,16]])})));return function(e){return t.apply(this,arguments)}}();return te((function(){g({topN:n,extraLabel:r,match:i,date:o,focusLabel:u})}),[l,a,o]),e.tsdbStatusData=m,{isLoading:s,appConfigurator:e,error:h}}(),m=v.isLoading,y=v.appConfigurator,g=v.error,_=_t(X(y.defaultState.defaultActiveTab),2),b=_[0],D=_[1],w=y.tsdbStatusData,x=y.defaultState,k=y.tablesHeaders,C=function(e,t){D(Kn(Kn({},b),{},qn({},t,+e)))};return fr("div",{className:"vm-cardinality-panel",children:[m&&fr(As,{message:"Please wait while cardinality stats is calculated. \n This may take some time if the db contains big number of time series."}),fr(If,{error:"",query:u,topN:t,date:r,match:n,totalSeries:w.totalSeries,totalLabelValuePairs:w.totalLabelValuePairs,focusLabel:i,onRunQuery:function(){p((function(e){return[].concat(bt(e),[u])})),f((function(e){return e+1})),o({type:"SET_MATCH",payload:u}),o({type:"RUN_QUERY"})},onSetQuery:function(e){l(e)},onSetHistory:function(e){var t=s+e;t<0||t>=h.length||(f(t),l(h[t]))},onTopNChange:function(e){o({type:"SET_TOP_N",payload:+e})},onFocusLabelChange:function(e){o({type:"SET_FOCUS_LABEL",payload:e})}}),g&&fr(oo,{variant:"error",children:g}),y.keys(i).map((function(e){return fr(ad,{sectionTitle:y.sectionsTitles(i)[e],activeTab:b[e],rows:w[e],onChange:C,onActionClick:(t=e,function(e){var n=e.currentTarget.id,r=$f[t](i,n);l(r),p((function(e){return[].concat(bt(e),[r])})),f((function(e){return e+1})),o({type:"SET_MATCH",payload:r});var a="";"labelValueCountByLabelName"!==t&&"seriesCountByLabelName"!=t||(a=n),o({type:"SET_FOCUS_LABEL",payload:a}),o({type:"RUN_QUERY"})}),tabs:x.tabs[e],chartContainer:x.containerRefs[e],totalSeries:y.totalSeries(e),tabId:e,tableHeaderCells:k[e]},e);var t}))]})},ld=function(e){var t=e.rows,n=e.columns,r=_t(X(e.defaultOrderBy||"count"),2),i=r[0],o=r[1],a=_t(X("desc"),2),u=a[0],l=a[1],c=oe((function(){return Hf(t,Uf(u,i))}),[t,i,u]),s=function(e){return function(){var t;t=e,l((function(e){return"asc"===e&&i===t?"desc":"asc"})),o(t)}};return fr("table",{className:"vm-table",children:[fr("thead",{className:"vm-table-header",children:fr("tr",{className:"vm-table__row vm-table__row_header",children:n.map((function(e){return fr("th",{className:"vm-table-cell vm-table-cell_header vm-table-cell_sort",onClick:s(e.key),children:fr("div",{className:"vm-table-cell__content",children:[e.title||e.key,fr("div",{className:Oi()({"vm-table__sort-icon":!0,"vm-table__sort-icon_active":i===e.key,"vm-table__sort-icon_desc":"desc"===u&&i===e.key}),children:fr(vi,{})})]})},e.key)}))})}),fr("tbody",{className:"vm-table-body",children:c.map((function(e,t){return fr("tr",{className:"vm-table__row",children:n.map((function(t){return fr("td",{className:"vm-table-cell",children:e[t.key]||"-"},t.key)}))},t)}))})]})},cd=["table","JSON"].map((function(e,t){return{value:String(t),label:e,icon:fr(0===t?xi:ki,{})}})),sd=function(e){var t=e.rows,n=e.title,r=e.columns,i=e.defaultOrderBy,o=_t(X(0),2),a=o[0],u=o[1];return fr("div",{className:"vm-top-queries-panel vm-block",children:[fr("div",{className:"vm-top-queries-panel-header vm-section-header",children:[fr("h5",{className:"vm-section-header__title",children:n}),fr("div",{className:"vm-section-header__tabs",children:fr(Mi,{activeItem:String(a),items:cd,onChange:function(e){u(+e)}})})]}),fr("div",{children:[0===a&&fr(ld,{rows:t,columns:r,defaultOrderBy:i}),1===a&&fr(xs,{data:t})]})]})},fd=function(){var e=function(){var e=hr().serverUrl,t=ro(),n=t.topN,r=t.maxLifetime,i=t.runQuery,o=_t(X(null),2),a=o[0],u=o[1],l=_t(X(!1),2),c=l[0],s=l[1],f=_t(X(),2),d=f[0],h=f[1],p=oe((function(){return function(e,t,n){return"".concat(e,"/api/v1/status/top_queries?topN=").concat(t||"","&maxLifetime=").concat(n||"")}(e,n,r)}),[e,n,r]),v=function(){var e=Xc(Jc().mark((function e(){var t,n;return Jc().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return s(!0),e.prev=1,e.next=4,fetch(p);case 4:return t=e.sent,e.next=7,t.json();case 7:n=e.sent,t.ok&&["topByAvgDuration","topByCount","topBySumDuration"].forEach((function(e){var t=n[e];Array.isArray(t)&&t.forEach((function(e){return e.timeRangeHours=+(e.timeRangeSeconds/3600).toFixed(2)}))})),u(t.ok?n:null),h(String(n.error||"")),e.next=16;break;case 13:e.prev=13,e.t0=e.catch(1),e.t0 instanceof Error&&"AbortError"!==e.t0.name&&h("".concat(e.t0.name,": ").concat(e.t0.message));case 16:s(!1);case 17:case"end":return e.stop()}}),e,null,[[1,13]])})));return function(){return e.apply(this,arguments)}}();return te((function(){v()}),[i]),{data:a,error:d,loading:c}}(),t=e.data,n=e.error,r=e.loading,i=ro(),o=i.topN,a=i.maxLifetime,u=ue(no).dispatch;!function(){var e=ro(),t=e.topN,n=e.maxLifetime,r=function(){var e=Ps({topN:String(t),maxLifetime:n});ar(e)};te(r,[t,n]),te(r,[])}();var l=oe((function(){var e=a.trim().split(" ").reduce((function(e,t){var n=Or(t);return n?Kn(Kn({},e),n):Kn({},e)}),{});return!!yr().duration(e).asMilliseconds()}),[a]),c=oe((function(){return!!o&&o<1}),[o]),s=oe((function(){return c?"Number must be bigger than zero":""}),[c]),f=oe((function(){return l?"":"Invalid duration value"}),[l]),d=function(e){if(!t)return e;var n=t[e];return"number"===typeof n?Ic(n):n||e},h=function(){u({type:"SET_RUN_QUERY"})},p=function(e){"Enter"===e.key&&h()};return te((function(){t&&(o||u({type:"SET_TOP_N",payload:+t.topN}),a||u({type:"SET_MAX_LIFE_TIME",payload:t.maxLifetime}))}),[t]),fr("div",{className:"vm-top-queries",children:[r&&fr(As,{containerStyles:{height:"500px"}}),fr("div",{className:"vm-top-queries-controls vm-block",children:[fr("div",{className:"vm-top-queries-controls__fields",children:[fr(So,{label:"Max lifetime",value:a,error:f,helperText:"For example ".concat("30ms, 15s, 3d4h, 1y2w"),onChange:function(e){u({type:"SET_MAX_LIFE_TIME",payload:e})},onKeyDown:p}),fr(So,{label:"Number of returned queries",type:"number",value:o||"",error:s,onChange:function(e){u({type:"SET_TOP_N",payload:+e})},onKeyDown:p})]}),fr("div",{className:"vm-top-queries-controls-bottom",children:[fr("div",{className:"vm-top-queries-controls-bottom__info",children:["VictoriaMetrics tracks the last\xa0",fr(fo,{title:"search.queryStats.lastQueriesCount",children:fr("b",{children:d("search.queryStats.lastQueriesCount")})}),"\xa0queries with durations at least\xa0",fr(fo,{title:"search.queryStats.minQueryDuration",children:fr("b",{children:d("search.queryStats.minQueryDuration")})})]}),fr("div",{className:"vm-top-queries-controls-bottom__button",children:fr(lo,{startIcon:fr(bi,{}),onClick:h,children:"Execute"})})]})]}),n&&fr(oo,{variant:"error",children:n}),t&&fr(m,{children:fr("div",{className:"vm-top-queries-panels",children:[fr(sd,{rows:t.topByCount,title:"Most frequently executed queries",columns:[{key:"query"},{key:"timeRangeHours",title:"time range, hours"},{key:"count"}]}),fr(sd,{rows:t.topByAvgDuration,title:"Most heavy queries",columns:[{key:"query"},{key:"avgDurationSeconds",title:"avg duration, seconds"},{key:"timeRangeHours",title:"time range, hours"},{key:"count"}],defaultOrderBy:"avgDurationSeconds"}),fr(sd,{rows:t.topBySumDuration,title:"Queries with most summary time to execute",columns:[{key:"query"},{key:"sumDurationSeconds",title:"sum duration, seconds"},{key:"timeRangeHours",title:"time range, hours"},{key:"count"}],defaultOrderBy:"sumDurationSeconds"})]})})]})},dd=["primary","secondary","error","warning","info","success"],hd=function(e){var t=e.setLoadingTheme,n=Xn().palette,r=void 0===n?{}:n,i=function(){dd.forEach((function(e){var t=function(e){var 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"}(Ti("color-".concat(e)));Bi("".concat(e,"-text"),t)}))};return te((function(){dd.forEach((function(e){var t=r[e];t&&Bi("color-".concat(e),t)})),function(){var e=window,t=e.innerWidth,n=e.innerHeight,r=document.documentElement,i=r.clientWidth,o=r.clientHeight;Bi("scrollbar-width","".concat(t-i,"px")),Bi("scrollbar-height","".concat(n-o,"px"))}(),i(),t(!1)}),[]),null},pd=function(){var e=_t(X(!0),2),t=e[0],n=e[1];return fr(m,t?{children:[fr(As,{}),fr(hd,{setLoadingTheme:n}),";"]}:{children:fr(Un,{children:fr(uo,{children:fr(jn,{children:fr(Rn,{path:"/",element:fr(jo,{}),children:[fr(Rn,{path:Zn.home,element:fr(Rs,{})}),fr(Rn,{path:Zn.dashboards,element:fr(Ff,{})}),fr(Rn,{path:Zn.cardinality,element:fr(ud,{})}),fr(Rn,{path:Zn.topQueries,element:fr(fd,{})})]})})})})})},vd=function(e){e&&n.e(27).then(n.bind(n,27)).then((function(t){var n=t.getCLS,r=t.getFID,i=t.getFCP,o=t.getLCP,a=t.getTTFB;n(e),r(e),i(e),o(e),a(e)}))},md=document.getElementById("root");md&&Ye(fr(pd,{}),md),vd()}()}(); \ No newline at end of file diff --git a/app/vmselect/vmui/static/js/main.da9caa97.js b/app/vmselect/vmui/static/js/main.da9caa97.js new file mode 100644 index 000000000..0d8742d6a --- /dev/null +++ b/app/vmselect/vmui/static/js/main.da9caa97.js @@ -0,0 +1,2 @@ +/*! For license information please see main.da9caa97.js.LICENSE.txt */ +!function(){var e={680:function(e,t,n){"use strict";var r=n(476),i=n(962),o=i(r("String.prototype.indexOf"));e.exports=function(e,t){var n=r(e,!!t);return"function"===typeof n&&o(e,".prototype.")>-1?i(n):n}},962:function(e,t,n){"use strict";var r=n(199),i=n(476),o=i("%Function.prototype.apply%"),a=i("%Function.prototype.call%"),u=i("%Reflect.apply%",!0)||r.call(a,o),l=i("%Object.getOwnPropertyDescriptor%",!0),c=i("%Object.defineProperty%",!0),s=i("%Math.max%");if(c)try{c({},"a",{value:1})}catch(d){c=null}e.exports=function(e){var t=u(r,a,arguments);if(l&&c){var n=l(t,"length");n.configurable&&c(t,"length",{value:1+s(0,e.length-(arguments.length-1))})}return t};var f=function(){return u(r,o,arguments)};c?c(e.exports,"apply",{value:f}):e.exports.apply=f},123:function(e,t){var n;!function(){"use strict";var r={}.hasOwnProperty;function i(){for(var e=[],t=0;t=t?e:""+Array(t+1-r.length).join(n)+e},g={s:y,z:function(e){var t=-e.utcOffset(),n=Math.abs(t),r=Math.floor(n/60),i=n%60;return(t<=0?"+":"-")+y(r,2,"0")+":"+y(i,2,"0")},m:function e(t,n){if(t.date()1)return e(a[0])}else{var u=t.name;b[u]=t,i=u}return!r&&i&&(_=i),i||!r&&_},x=function(e,t){if(D(e))return e.clone();var n="object"==typeof t?t:{};return n.date=e,n.args=arguments,new C(n)},k=g;k.l=w,k.i=D,k.w=function(e,t){return x(e,{locale:t.$L,utc:t.$u,x:t.$x,$offset:t.$offset})};var C=function(){function m(e){this.$L=w(e.locale,null,!0),this.parse(e)}var y=m.prototype;return y.parse=function(e){this.$d=function(e){var t=e.date,n=e.utc;if(null===t)return new Date(NaN);if(k.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 i=r[2]-1||0,o=(r[7]||"0").substring(0,3);return n?new Date(Date.UTC(r[1],i,r[3]||1,r[4]||0,r[5]||0,r[6]||0,o)):new Date(r[1],i,r[3]||1,r[4]||0,r[5]||0,r[6]||0,o)}}return new Date(t)}(e),this.$x=e.x||{},this.init()},y.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()},y.$utils=function(){return k},y.isValid=function(){return!(this.$d.toString()===h)},y.isSame=function(e,t){var n=x(e);return this.startOf(t)<=n&&n<=this.endOf(t)},y.isAfter=function(e,t){return x(e)1&&"boolean"!==typeof t)throw new a('"allowMissing" argument must be a boolean');if(null===k(/^%?[^%]*%?$/,e))throw new i("`%` may not be present anywhere but at the beginning and end of the intrinsic name");var n=A(e),r=n.length>0?n[0]:"",o=S("%"+r+"%",t),u=o.name,c=o.value,s=!1,f=o.alias;f&&(r=f[0],D(n,b([0,1],f)));for(var d=1,h=!0;d=n.length){var g=l(c,p);c=(h=!!g)&&"get"in g&&!("originalValue"in g.get)?g.get:c[p]}else h=_(c,p),c=c[p];h&&!s&&(v[u]=c)}}return c}},520:function(e,t,n){"use strict";var r="undefined"!==typeof Symbol&&Symbol,i=n(541);e.exports=function(){return"function"===typeof r&&("function"===typeof Symbol&&("symbol"===typeof r("foo")&&("symbol"===typeof Symbol("bar")&&i())))}},541:function(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 i=Object.getOwnPropertyDescriptor(e,t);if(42!==i.value||!0!==i.enumerable)return!1}return!0}},838:function(e,t,n){"use strict";var r=n(199);e.exports=r.call(Function.call,Object.prototype.hasOwnProperty)},936:function(e,t,n){var r=/^\s+|\s+$/g,i=/^[-+]0x[0-9a-f]+$/i,o=/^0b[01]+$/i,a=/^0o[0-7]+$/i,u=parseInt,l="object"==typeof n.g&&n.g&&n.g.Object===Object&&n.g,c="object"==typeof self&&self&&self.Object===Object&&self,s=l||c||Function("return this")(),f=Object.prototype.toString,d=Math.max,h=Math.min,p=function(){return s.Date.now()};function v(e){var t=typeof e;return!!e&&("object"==t||"function"==t)}function m(e){if("number"==typeof e)return e;if(function(e){return"symbol"==typeof e||function(e){return!!e&&"object"==typeof e}(e)&&"[object Symbol]"==f.call(e)}(e))return NaN;if(v(e)){var t="function"==typeof e.valueOf?e.valueOf():e;e=v(t)?t+"":t}if("string"!=typeof e)return 0===e?e:+e;e=e.replace(r,"");var n=o.test(e);return n||a.test(e)?u(e.slice(2),n?2:8):i.test(e)?NaN:+e}e.exports=function(e,t,n){var r,i,o,a,u,l,c=0,s=!1,f=!1,y=!0;if("function"!=typeof e)throw new TypeError("Expected a function");function g(t){var n=r,o=i;return r=i=void 0,c=t,a=e.apply(o,n)}function _(e){return c=e,u=setTimeout(D,t),s?g(e):a}function b(e){var n=e-l;return void 0===l||n>=t||n<0||f&&e-c>=o}function D(){var e=p();if(b(e))return w(e);u=setTimeout(D,function(e){var n=t-(e-l);return f?h(n,o-(e-c)):n}(e))}function w(e){return u=void 0,y&&r?g(e):(r=i=void 0,a)}function x(){var e=p(),n=b(e);if(r=arguments,i=this,l=e,n){if(void 0===u)return _(l);if(f)return u=setTimeout(D,t),g(l)}return void 0===u&&(u=setTimeout(D,t)),a}return t=m(t)||0,v(n)&&(s=!!n.leading,o=(f="maxWait"in n)?d(m(n.maxWait)||0,t):o,y="trailing"in n?!!n.trailing:y),x.cancel=function(){void 0!==u&&clearTimeout(u),c=0,r=l=i=u=void 0},x.flush=function(){return void 0===u?a:w(p())},x}},7:function(e,t,n){var r="__lodash_hash_undefined__",i="[object Function]",o="[object GeneratorFunction]",a=/\.|\[(?:[^[\]]*|(["'])(?:(?!\1)[^\\]|\\.)*?\1)\]/,u=/^\w*$/,l=/^\./,c=/[^.[\]]+|\[(?:(-?\d+(?:\.\d+)?)|(["'])((?:(?!\2)[^\\]|\\.)*?)\2)\]|(?=(?:\.|\[\])(?:\.|\[\]|$))/g,s=/\\(\\)?/g,f=/^\[object .+?Constructor\]$/,d="object"==typeof n.g&&n.g&&n.g.Object===Object&&n.g,h="object"==typeof self&&self&&self.Object===Object&&self,p=d||h||Function("return this")();var v=Array.prototype,m=Function.prototype,y=Object.prototype,g=p["__core-js_shared__"],_=function(){var e=/[^.]+$/.exec(g&&g.keys&&g.keys.IE_PROTO||"");return e?"Symbol(src)_1."+e:""}(),b=m.toString,D=y.hasOwnProperty,w=y.toString,x=RegExp("^"+b.call(D).replace(/[\\^$.*+?()[\]{}|]/g,"\\$&").replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g,"$1.*?")+"$"),k=p.Symbol,C=v.splice,E=$(p,"Map"),A=$(Object,"create"),S=k?k.prototype:void 0,F=S?S.toString:void 0;function N(e){var t=-1,n=e?e.length:0;for(this.clear();++t-1},O.prototype.set=function(e,t){var n=this.__data__,r=B(n,e);return r<0?n.push([e,t]):n[r][1]=t,this},T.prototype.clear=function(){this.__data__={hash:new N,map:new(E||O),string:new N}},T.prototype.delete=function(e){return P(this,e).delete(e)},T.prototype.get=function(e){return P(this,e).get(e)},T.prototype.has=function(e){return P(this,e).has(e)},T.prototype.set=function(e,t){return P(this,e).set(e,t),this};var R=j((function(e){var t;e=null==(t=e)?"":function(e){if("string"==typeof e)return e;if(H(e))return F?F.call(e):"";var t=e+"";return"0"==t&&1/e==-1/0?"-0":t}(t);var n=[];return l.test(e)&&n.push(""),e.replace(c,(function(e,t,r,i){n.push(r?i.replace(s,"$1"):t||e)})),n}));function I(e){if("string"==typeof e||H(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 n(){var r=arguments,i=t?t.apply(this,r):r[0],o=n.cache;if(o.has(i))return o.get(i);var a=e.apply(this,r);return n.cache=o.set(i,a),a};return n.cache=new(j.Cache||T),n}j.Cache=T;var z=Array.isArray;function U(e){var t=typeof e;return!!e&&("object"==t||"function"==t)}function H(e){return"symbol"==typeof e||function(e){return!!e&&"object"==typeof e}(e)&&"[object Symbol]"==w.call(e)}e.exports=function(e,t,n){var r=null==e?void 0:M(e,t);return void 0===r?n:r}},61:function(e,t,n){var r="Expected a function",i=/^\s+|\s+$/g,o=/^[-+]0x[0-9a-f]+$/i,a=/^0b[01]+$/i,u=/^0o[0-7]+$/i,l=parseInt,c="object"==typeof n.g&&n.g&&n.g.Object===Object&&n.g,s="object"==typeof self&&self&&self.Object===Object&&self,f=c||s||Function("return this")(),d=Object.prototype.toString,h=Math.max,p=Math.min,v=function(){return f.Date.now()};function m(e,t,n){var i,o,a,u,l,c,s=0,f=!1,d=!1,m=!0;if("function"!=typeof e)throw new TypeError(r);function _(t){var n=i,r=o;return i=o=void 0,s=t,u=e.apply(r,n)}function b(e){return s=e,l=setTimeout(w,t),f?_(e):u}function D(e){var n=e-c;return void 0===c||n>=t||n<0||d&&e-s>=a}function w(){var e=v();if(D(e))return x(e);l=setTimeout(w,function(e){var n=t-(e-c);return d?p(n,a-(e-s)):n}(e))}function x(e){return l=void 0,m&&i?_(e):(i=o=void 0,u)}function k(){var e=v(),n=D(e);if(i=arguments,o=this,c=e,n){if(void 0===l)return b(c);if(d)return l=setTimeout(w,t),_(c)}return void 0===l&&(l=setTimeout(w,t)),u}return t=g(t)||0,y(n)&&(f=!!n.leading,a=(d="maxWait"in n)?h(g(n.maxWait)||0,t):a,m="trailing"in n?!!n.trailing:m),k.cancel=function(){void 0!==l&&clearTimeout(l),s=0,i=c=o=l=void 0},k.flush=function(){return void 0===l?u:x(v())},k}function y(e){var t=typeof e;return!!e&&("object"==t||"function"==t)}function g(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(y(e)){var t="function"==typeof e.valueOf?e.valueOf():e;e=y(t)?t+"":t}if("string"!=typeof e)return 0===e?e:+e;e=e.replace(i,"");var n=a.test(e);return n||u.test(e)?l(e.slice(2),n?2:8):o.test(e)?NaN:+e}e.exports=function(e,t,n){var i=!0,o=!0;if("function"!=typeof e)throw new TypeError(r);return y(n)&&(i="leading"in n?!!n.leading:i,o="trailing"in n?!!n.trailing:o),m(e,t,{leading:i,maxWait:t,trailing:o})}},154:function(e,t,n){var r="function"===typeof Map&&Map.prototype,i=Object.getOwnPropertyDescriptor&&r?Object.getOwnPropertyDescriptor(Map.prototype,"size"):null,o=r&&i&&"function"===typeof i.get?i.get:null,a=r&&Map.prototype.forEach,u="function"===typeof Set&&Set.prototype,l=Object.getOwnPropertyDescriptor&&u?Object.getOwnPropertyDescriptor(Set.prototype,"size"):null,c=u&&l&&"function"===typeof l.get?l.get:null,s=u&&Set.prototype.forEach,f="function"===typeof WeakMap&&WeakMap.prototype?WeakMap.prototype.has:null,d="function"===typeof WeakSet&&WeakSet.prototype?WeakSet.prototype.has:null,h="function"===typeof WeakRef&&WeakRef.prototype?WeakRef.prototype.deref:null,p=Boolean.prototype.valueOf,v=Object.prototype.toString,m=Function.prototype.toString,y=String.prototype.match,g=String.prototype.slice,_=String.prototype.replace,b=String.prototype.toUpperCase,D=String.prototype.toLowerCase,w=RegExp.prototype.test,x=Array.prototype.concat,k=Array.prototype.join,C=Array.prototype.slice,E=Math.floor,A="function"===typeof BigInt?BigInt.prototype.valueOf:null,S=Object.getOwnPropertySymbols,F="function"===typeof Symbol&&"symbol"===typeof Symbol.iterator?Symbol.prototype.toString:null,N="function"===typeof Symbol&&"object"===typeof Symbol.iterator,O="function"===typeof Symbol&&Symbol.toStringTag&&(typeof Symbol.toStringTag===N||"symbol")?Symbol.toStringTag:null,T=Object.prototype.propertyIsEnumerable,B=("function"===typeof Reflect?Reflect.getPrototypeOf:Object.getPrototypeOf)||([].__proto__===Array.prototype?function(e){return e.__proto__}:null);function M(e,t){if(e===1/0||e===-1/0||e!==e||e&&e>-1e3&&e<1e3||w.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 i=String(r),o=g.call(t,i.length+1);return _.call(i,n,"$&_")+"."+_.call(_.call(o,/([0-9]{3})/g,"$&_"),/_$/,"")}}return _.call(t,n,"$&_")}var L=n(654),P=L.custom,$=U(P)?P:null;function R(e,t,n){var r="double"===(n.quoteStyle||t)?'"':"'";return r+e+r}function I(e){return _.call(String(e),/"/g,""")}function j(e){return"[object Array]"===V(e)&&(!O||!("object"===typeof e&&O in e))}function z(e){return"[object RegExp]"===V(e)&&(!O||!("object"===typeof e&&O in e))}function U(e){if(N)return e&&"object"===typeof e&&e instanceof Symbol;if("symbol"===typeof e)return!0;if(!e||"object"!==typeof e||!F)return!1;try{return F.call(e),!0}catch(t){}return!1}e.exports=function e(t,n,r,i){var u=n||{};if(Y(u,"quoteStyle")&&"single"!==u.quoteStyle&&"double"!==u.quoteStyle)throw new TypeError('option "quoteStyle" must be "single" or "double"');if(Y(u,"maxStringLength")&&("number"===typeof u.maxStringLength?u.maxStringLength<0&&u.maxStringLength!==1/0:null!==u.maxStringLength))throw new TypeError('option "maxStringLength", if provided, must be a positive integer, Infinity, or `null`');var l=!Y(u,"customInspect")||u.customInspect;if("boolean"!==typeof l&&"symbol"!==l)throw new TypeError("option \"customInspect\", if provided, must be `true`, `false`, or `'symbol'`");if(Y(u,"indent")&&null!==u.indent&&"\t"!==u.indent&&!(parseInt(u.indent,10)===u.indent&&u.indent>0))throw new TypeError('option "indent" must be "\\t", an integer > 0, or `null`');if(Y(u,"numericSeparator")&&"boolean"!==typeof u.numericSeparator)throw new TypeError('option "numericSeparator", if provided, must be `true` or `false`');var v=u.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,u);if("number"===typeof t){if(0===t)return 1/0/t>0?"0":"-0";var b=String(t);return v?M(t,b):b}if("bigint"===typeof t){var w=String(t)+"n";return v?M(t,w):w}var E="undefined"===typeof u.depth?5:u.depth;if("undefined"===typeof r&&(r=0),r>=E&&E>0&&"object"===typeof t)return j(t)?"[Array]":"[Object]";var S=function(e,t){var n;if("\t"===e.indent)n="\t";else{if(!("number"===typeof e.indent&&e.indent>0))return null;n=k.call(Array(e.indent+1)," ")}return{base:n,prev:k.call(Array(t+1),n)}}(u,r);if("undefined"===typeof i)i=[];else if(q(i,t)>=0)return"[Circular]";function P(t,n,o){if(n&&(i=C.call(i)).push(n),o){var a={depth:u.depth};return Y(u,"quoteStyle")&&(a.quoteStyle=u.quoteStyle),e(t,a,r+1,i)}return e(t,u,r+1,i)}if("function"===typeof t&&!z(t)){var H=function(e){if(e.name)return e.name;var t=y.call(m.call(e),/^function\s*([\w$]+)/);if(t)return t[1];return null}(t),Q=X(t,P);return"[Function"+(H?": "+H:" (anonymous)")+"]"+(Q.length>0?" { "+k.call(Q,", ")+" }":"")}if(U(t)){var ee=N?_.call(String(t),/^(Symbol\(.*\))_[^)]*$/,"$1"):F.call(t);return"object"!==typeof t||N?ee:G(ee)}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 te="<"+D.call(String(t.nodeName)),ne=t.attributes||[],re=0;re"}if(j(t)){if(0===t.length)return"[]";var ie=X(t,P);return S&&!function(e){for(var t=0;t=0)return!1;return!0}(ie)?"["+K(ie,S)+"]":"[ "+k.call(ie,", ")+" ]"}if(function(e){return"[object Error]"===V(e)&&(!O||!("object"===typeof e&&O in e))}(t)){var oe=X(t,P);return"cause"in Error.prototype||!("cause"in t)||T.call(t,"cause")?0===oe.length?"["+String(t)+"]":"{ ["+String(t)+"] "+k.call(oe,", ")+" }":"{ ["+String(t)+"] "+k.call(x.call("[cause]: "+P(t.cause),oe),", ")+" }"}if("object"===typeof t&&l){if($&&"function"===typeof t[$]&&L)return L(t,{depth:E-r});if("symbol"!==l&&"function"===typeof t.inspect)return t.inspect()}if(function(e){if(!o||!e||"object"!==typeof e)return!1;try{o.call(e);try{c.call(e)}catch(te){return!0}return e instanceof Map}catch(t){}return!1}(t)){var ae=[];return a.call(t,(function(e,n){ae.push(P(n,t,!0)+" => "+P(e,t))})),Z("Map",o.call(t),ae,S)}if(function(e){if(!c||!e||"object"!==typeof e)return!1;try{c.call(e);try{o.call(e)}catch(t){return!0}return e instanceof Set}catch(n){}return!1}(t)){var ue=[];return s.call(t,(function(e){ue.push(P(e,t))})),Z("Set",c.call(t),ue,S)}if(function(e){if(!f||!e||"object"!==typeof e)return!1;try{f.call(e,f);try{d.call(e,d)}catch(te){return!0}return e instanceof WeakMap}catch(t){}return!1}(t))return J("WeakMap");if(function(e){if(!d||!e||"object"!==typeof e)return!1;try{d.call(e,d);try{f.call(e,f)}catch(te){return!0}return e instanceof WeakSet}catch(t){}return!1}(t))return J("WeakSet");if(function(e){if(!h||!e||"object"!==typeof e)return!1;try{return h.call(e),!0}catch(t){}return!1}(t))return J("WeakRef");if(function(e){return"[object Number]"===V(e)&&(!O||!("object"===typeof e&&O in e))}(t))return G(P(Number(t)));if(function(e){if(!e||"object"!==typeof e||!A)return!1;try{return A.call(e),!0}catch(t){}return!1}(t))return G(P(A.call(t)));if(function(e){return"[object Boolean]"===V(e)&&(!O||!("object"===typeof e&&O in e))}(t))return G(p.call(t));if(function(e){return"[object String]"===V(e)&&(!O||!("object"===typeof e&&O in e))}(t))return G(P(String(t)));if(!function(e){return"[object Date]"===V(e)&&(!O||!("object"===typeof e&&O in e))}(t)&&!z(t)){var le=X(t,P),ce=B?B(t)===Object.prototype:t instanceof Object||t.constructor===Object,se=t instanceof Object?"":"null prototype",fe=!ce&&O&&Object(t)===t&&O in t?g.call(V(t),8,-1):se?"Object":"",de=(ce||"function"!==typeof t.constructor?"":t.constructor.name?t.constructor.name+" ":"")+(fe||se?"["+k.call(x.call([],fe||[],se||[]),": ")+"] ":"");return 0===le.length?de+"{}":S?de+"{"+K(le,S)+"}":de+"{ "+k.call(le,", ")+" }"}return String(t)};var H=Object.prototype.hasOwnProperty||function(e){return e in this};function Y(e,t){return H.call(e,t)}function V(e){return v.call(e)}function q(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(g.call(e,0,t.maxStringLength),t)+r}return R(_.call(_.call(e,/(['\\])/g,"\\$1"),/[\x00-\x1f]/g,Q),"single",t)}function Q(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 G(e){return"Object("+e+")"}function J(e){return e+" { ? }"}function Z(e,t,n,r){return e+" ("+t+") {"+(r?K(n,r):k.call(n,", "))+"}"}function K(e,t){if(0===e.length)return"";var n="\n"+t.prev+t.base;return n+k.call(e,","+n)+"\n"+t.prev}function X(e,t){var n=j(e),r=[];if(n){r.length=e.length;for(var i=0;i-1?e.split(","):e},c=function(e,t,n,r){if(e){var o=n.allowDots?e.replace(/\.([^.[]+)/g,"[$1]"):e,a=/(\[[^[\]]*])/g,u=n.depth>0&&/(\[[^[\]]*])/.exec(o),c=u?o.slice(0,u.index):o,s=[];if(c){if(!n.plainObjects&&i.call(Object.prototype,c)&&!n.allowPrototypes)return;s.push(c)}for(var f=0;n.depth>0&&null!==(u=a.exec(o))&&f=0;--o){var a,u=e[o];if("[]"===u&&n.parseArrays)a=[].concat(i);else{a=n.plainObjects?Object.create(null):{};var c="["===u.charAt(0)&&"]"===u.charAt(u.length-1)?u.slice(1,-1):u,s=parseInt(c,10);n.parseArrays||""!==c?!isNaN(s)&&u!==c&&String(s)===c&&s>=0&&n.parseArrays&&s<=n.arrayLimit?(a=[])[s]=i:"__proto__"!==c&&(a[c]=i):a={0:i}}i=a}return i}(s,t,n,r)}};e.exports=function(e,t){var n=function(e){if(!e)return a;if(null!==e.decoder&&void 0!==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?a.charset:e.charset;return{allowDots:"undefined"===typeof e.allowDots?a.allowDots:!!e.allowDots,allowPrototypes:"boolean"===typeof e.allowPrototypes?e.allowPrototypes:a.allowPrototypes,allowSparse:"boolean"===typeof e.allowSparse?e.allowSparse:a.allowSparse,arrayLimit:"number"===typeof e.arrayLimit?e.arrayLimit:a.arrayLimit,charset:t,charsetSentinel:"boolean"===typeof e.charsetSentinel?e.charsetSentinel:a.charsetSentinel,comma:"boolean"===typeof e.comma?e.comma:a.comma,decoder:"function"===typeof e.decoder?e.decoder:a.decoder,delimiter:"string"===typeof e.delimiter||r.isRegExp(e.delimiter)?e.delimiter:a.delimiter,depth:"number"===typeof e.depth||!1===e.depth?+e.depth:a.depth,ignoreQueryPrefix:!0===e.ignoreQueryPrefix,interpretNumericEntities:"boolean"===typeof e.interpretNumericEntities?e.interpretNumericEntities:a.interpretNumericEntities,parameterLimit:"number"===typeof e.parameterLimit?e.parameterLimit:a.parameterLimit,parseArrays:!1!==e.parseArrays,plainObjects:"boolean"===typeof e.plainObjects?e.plainObjects:a.plainObjects,strictNullHandling:"boolean"===typeof e.strictNullHandling?e.strictNullHandling:a.strictNullHandling}}(t);if(""===e||null===e||"undefined"===typeof e)return n.plainObjects?Object.create(null):{};for(var s="string"===typeof e?function(e,t){var n,c={},s=t.ignoreQueryPrefix?e.replace(/^\?/,""):e,f=t.parameterLimit===1/0?void 0:t.parameterLimit,d=s.split(t.delimiter,f),h=-1,p=t.charset;if(t.charsetSentinel)for(n=0;n-1&&(m=o(m)?[m]:m),i.call(c,v)?c[v]=r.combine(c[v],m):c[v]=m}return c}(e,n):e,f=n.plainObjects?Object.create(null):{},d=Object.keys(s),h=0;h0?C.join(",")||null:void 0}];else if(l(h))M=h;else{var P=Object.keys(C);M=m?P.sort(m):P}for(var $=a&&l(C)&&1===C.length?n+"[]":n,R=0;R0?D+b:""}},837:function(e,t,n){"use strict";var r=n(609),i=Object.prototype.hasOwnProperty,o=Array.isArray,a=function(){for(var e=[],t=0;t<256;++t)e.push("%"+((t<16?"0":"")+t.toString(16)).toUpperCase());return e}(),u=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(o(n)){for(var r=[],i=0;i=48&&s<=57||s>=65&&s<=90||s>=97&&s<=122||o===r.RFC1738&&(40===s||41===s)?l+=u.charAt(c):s<128?l+=a[s]:s<2048?l+=a[192|s>>6]+a[128|63&s]:s<55296||s>=57344?l+=a[224|s>>12]+a[128|s>>6&63]+a[128|63&s]:(c+=1,s=65536+((1023&s)<<10|1023&u.charCodeAt(c)),l+=a[240|s>>18]+a[128|s>>12&63]+a[128|s>>6&63]+a[128|63&s])}return l},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(o(e)){for(var n=[],r=0;r2&&(u.children=arguments.length>3?t.call(arguments,2):r),"function"==typeof e&&null!=e.defaultProps)for(a in e.defaultProps)void 0===u[a]&&(u[a]=e.defaultProps[a]);return p(e,u,i,o,null)}function p(e,t,n,o,a){var u={type:e,props:t,key:n,ref:o,__k:null,__:null,__b:0,__e:null,__d:void 0,__c:null,__h:null,constructor:void 0,__v:null==a?++i:a};return null==a&&null!=r.vnode&&r.vnode(u),u}function v(){return{current:null}}function m(e){return e.children}function y(e,t){this.props=e,this.context=t}function g(e,t){if(null==t)return e.__?g(e.__,e.__.__k.indexOf(e)+1):null;for(var n;t0?p(y.type,y.props,y.key,y.ref?y.ref:null,y.__v):y)){if(y.__=n,y.__b=n.__b+1,null===(v=w[d])||v&&y.key==v.key&&y.type===v.type)w[d]=void 0;else for(h=0;h2&&(u.children=arguments.length>3?t.call(arguments,2):r),p(e.type,u,i||e.key,o||e.ref,null)}function I(e,t){var n={__c:t="__cC"+u++,__: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.shouldComponentUpdate=function(e){this.props.value!==e.value&&n.some(b)},this.sub=function(e){n.push(e);var t=e.componentWillUnmount;e.componentWillUnmount=function(){n.splice(n.indexOf(e),1),t&&t.call(e)}}),e.children}};return n.Provider.__=n.Consumer.contextType=n}t=c.slice,r={__e:function(e,t,n,r){for(var i,o,a;t=t.__;)if((i=t.__c)&&!i.__)try{if((o=i.constructor)&&null!=o.getDerivedStateFromError&&(i.setState(o.getDerivedStateFromError(e)),a=i.__d),null!=i.componentDidCatch&&(i.componentDidCatch(e,r||{}),a=i.__d),a)return i.__E=i}catch(t){e=t}throw e}},i=0,y.prototype.setState=function(e,t){var n;n=null!=this.__s&&this.__s!==this.state?this.__s:this.__s=f({},this.state),"function"==typeof e&&(e=e(f({},n),this.props)),e&&f(n,e),null!=e&&this.__v&&(t&&this._sb.push(t),b(this))},y.prototype.forceUpdate=function(e){this.__v&&(this.__e=!0,e&&this.__h.push(e),b(this))},y.prototype.render=m,o=[],D.__r=0,u=0;var j,z,U,H,Y=0,V=[],q=[],W=r.__b,Q=r.__r,G=r.diffed,J=r.__c,Z=r.unmount;function K(e,t){r.__h&&r.__h(z,e,Y||t),Y=0;var n=z.__H||(z.__H={__:[],__h:[]});return e>=n.__.length&&n.__.push({__V:q}),n.__[e]}function X(e){return Y=1,ee(ye,e)}function ee(e,t,n){var r=K(j++,2);if(r.t=e,!r.__c&&(r.__=[n?n(t):ye(void 0,t),function(e){var t=r.__N?r.__N[0]:r.__[0],n=r.t(t,e);t!==n&&(r.__N=[n,r.__[1]],r.__c.setState({}))}],r.__c=z,!z.u)){z.u=!0;var i=z.shouldComponentUpdate;z.shouldComponentUpdate=function(e,t,n){if(!r.__c.__H)return!0;var o=r.__c.__H.__.filter((function(e){return e.__c}));if(o.every((function(e){return!e.__N})))return!i||i.call(this,e,t,n);var a=!1;return o.forEach((function(e){if(e.__N){var t=e.__[0];e.__=e.__N,e.__N=void 0,t!==e.__[0]&&(a=!0)}})),!(!a&&r.__c.props===e)&&(!i||i.call(this,e,t,n))}}return r.__N||r.__}function te(e,t){var n=K(j++,3);!r.__s&&me(n.__H,t)&&(n.__=e,n.i=t,z.__H.__h.push(n))}function ne(e,t){var n=K(j++,4);!r.__s&&me(n.__H,t)&&(n.__=e,n.i=t,z.__h.push(n))}function re(e){return Y=5,oe((function(){return{current:e}}),[])}function ie(e,t,n){Y=6,ne((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 oe(e,t){var n=K(j++,7);return me(n.__H,t)?(n.__V=e(),n.i=t,n.__h=e,n.__V):n.__}function ae(e,t){return Y=8,oe((function(){return e}),t)}function ue(e){var t=z.context[e.__c],n=K(j++,9);return n.c=e,t?(null==n.__&&(n.__=!0,t.sub(z)),t.props.value):e.__}function le(e,t){r.useDebugValue&&r.useDebugValue(t?t(e):e)}function ce(e){var t=K(j++,10),n=X();return t.__=e,z.componentDidCatch||(z.componentDidCatch=function(e,r){t.__&&t.__(e,r),n[1](e)}),[n[0],function(){n[1](void 0)}]}function se(){var e=K(j++,11);if(!e.__){for(var t=z.__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 fe(){for(var e;e=V.shift();)if(e.__P&&e.__H)try{e.__H.__h.forEach(pe),e.__H.__h.forEach(ve),e.__H.__h=[]}catch(u){e.__H.__h=[],r.__e(u,e.__v)}}r.__b=function(e){z=null,W&&W(e)},r.__r=function(e){Q&&Q(e),j=0;var t=(z=e.__c).__H;t&&(U===z?(t.__h=[],z.__h=[],t.__.forEach((function(e){e.__N&&(e.__=e.__N),e.__V=q,e.__N=e.i=void 0}))):(t.__h.forEach(pe),t.__h.forEach(ve),t.__h=[])),U=z},r.diffed=function(e){G&&G(e);var t=e.__c;t&&t.__H&&(t.__H.__h.length&&(1!==V.push(t)&&H===r.requestAnimationFrame||((H=r.requestAnimationFrame)||he)(fe)),t.__H.__.forEach((function(e){e.i&&(e.__H=e.i),e.__V!==q&&(e.__=e.__V),e.i=void 0,e.__V=q}))),U=z=null},r.__c=function(e,t){t.some((function(e){try{e.__h.forEach(pe),e.__h=e.__h.filter((function(e){return!e.__||ve(e)}))}catch(i){t.some((function(e){e.__h&&(e.__h=[])})),t=[],r.__e(i,e.__v)}})),J&&J(e,t)},r.unmount=function(e){Z&&Z(e);var t,n=e.__c;n&&n.__H&&(n.__H.__.forEach((function(e){try{pe(e)}catch(e){t=e}})),n.__H=void 0,t&&r.__e(t,n.__v))};var de="function"==typeof requestAnimationFrame;function he(e){var t,n=function(){clearTimeout(r),de&&cancelAnimationFrame(t),setTimeout(e)},r=setTimeout(n,100);de&&(t=requestAnimationFrame(n))}function pe(e){var t=z,n=e.__c;"function"==typeof n&&(e.__c=void 0,n()),z=t}function ve(e){var t=z;e.__c=e.__(),z=t}function me(e,t){return!e||e.length!==t.length||t.some((function(t,n){return t!==e[n]}))}function ye(e,t){return"function"==typeof t?t(e):t}function ge(e,t){for(var n in t)e[n]=t[n];return e}function _e(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 be(e,t){return e===t&&(0!==e||1/e==1/t)||e!=e&&t!=t}function De(e){this.props=e}function we(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:_e(this.props,e)}function r(t){return this.shouldComponentUpdate=n,h(e,t)}return r.displayName="Memo("+(e.displayName||e.name)+")",r.prototype.isReactComponent=!0,r.__f=!0,r}(De.prototype=new y).isPureReactComponent=!0,De.prototype.shouldComponentUpdate=function(e,t){return _e(this.props,e)||_e(this.state,t)};var xe=r.__b;r.__b=function(e){e.type&&e.type.__f&&e.ref&&(e.props.ref=e.ref,e.ref=null),xe&&xe(e)};var ke="undefined"!=typeof Symbol&&Symbol.for&&Symbol.for("react.forward_ref")||3911;function Ce(e){function t(t){var n=ge({},t);return delete n.ref,e(n,t.ref||null)}return t.$$typeof=ke,t.render=t,t.prototype.isReactComponent=t.__f=!0,t.displayName="ForwardRef("+(e.displayName||e.name)+")",t}var Ee=function(e,t){return null==e?null:k(k(e).map(t))},Ae={map:Ee,forEach:Ee,count:function(e){return e?k(e).length:0},only:function(e){var t=k(e);if(1!==t.length)throw"Children.only";return t[0]},toArray:k},Se=r.__e;r.__e=function(e,t,n,r){if(e.then)for(var i,o=t;o=o.__;)if((i=o.__c)&&i.__c)return null==t.__e&&(t.__e=n.__e,t.__k=n.__k),i.__c(e,t);Se(e,t,n,r)};var Fe=r.unmount;function Ne(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=ge({},e)).__c&&(e.__c.__P===n&&(e.__c.__P=t),e.__c=null),e.__k=e.__k&&e.__k.map((function(e){return Ne(e,t,n)}))),e}function Oe(e,t,n){return e&&(e.__v=null,e.__k=e.__k&&e.__k.map((function(e){return Oe(e,t,n)})),e.__c&&e.__c.__P===t&&(e.__e&&n.insertBefore(e.__e,e.__d),e.__c.__e=!0,e.__c.__P=n)),e}function Te(){this.__u=0,this.t=null,this.__b=null}function Be(e){var t=e.__.__c;return t&&t.__a&&t.__a(e)}function Me(e){var t,n,r;function i(i){if(t||(t=e()).then((function(e){n=e.default||e}),(function(e){r=e})),r)throw r;if(!n)throw t;return h(n,i)}return i.displayName="Lazy",i.__f=!0,i}function Le(){this.u=null,this.o=null}r.unmount=function(e){var t=e.__c;t&&t.__R&&t.__R(),t&&!0===e.__h&&(e.type=null),Fe&&Fe(e)},(Te.prototype=new y).__c=function(e,t){var n=t.__c,r=this;null==r.t&&(r.t=[]),r.t.push(n);var i=Be(r.__v),o=!1,a=function(){o||(o=!0,n.__R=null,i?i(u):u())};n.__R=a;var u=function(){if(!--r.__u){if(r.state.__a){var e=r.state.__a;r.__v.__k[0]=Oe(e,e.__c.__P,e.__c.__O)}var t;for(r.setState({__a:r.__b=null});t=r.t.pop();)t.forceUpdate()}},l=!0===t.__h;r.__u++||l||r.setState({__a:r.__b=r.__v.__k[0]}),e.then(a,a)},Te.prototype.componentWillUnmount=function(){this.t=[]},Te.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]=Ne(this.__b,n,r.__O=r.__P)}this.__b=null}var i=t.__a&&h(m,null,e.fallback);return i&&(i.__h=null),[h(m,null,t.__a?null:e.children),i]};var Pe=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)}}),P(h($e,{context:t.context},e.__v),t.l)):t.l&&t.componentWillUnmount()}function Ie(e,t){var n=h(Re,{__v:e,i:t});return n.containerInfo=t,n}(Le.prototype=new y).__a=function(e){var t=this,n=Be(t.__v),r=t.o.get(e);return r[0]++,function(i){var o=function(){t.props.revealOrder?(r.push(i),Pe(t,e,r)):i()};n?n(o):o()}},Le.prototype.render=function(e){this.u=null,this.o=new Map;var t=k(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},Le.prototype.componentDidUpdate=Le.prototype.componentDidMount=function(){var e=this;this.o.forEach((function(t,n){Pe(e,n,t)}))};var je="undefined"!=typeof Symbol&&Symbol.for&&Symbol.for("react.element")||60103,ze=/^(?:accent|alignment|arabic|baseline|cap|clip(?!PathU)|color|dominant|fill|flood|font|glyph(?!R)|horiz|image|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]/,Ue="undefined"!=typeof document,He=function(e){return("undefined"!=typeof Symbol&&"symbol"==typeof Symbol()?/fil|che|rad/i:/fil|che|ra/i).test(e)};function Ye(e,t,n){return null==t.__k&&(t.textContent=""),P(e,t),"function"==typeof n&&n(),e?e.__c:null}function Ve(e,t,n){return $(e,t),"function"==typeof n&&n(),e?e.__c:null}y.prototype.isReactComponent={},["componentWillMount","componentWillReceiveProps","componentWillUpdate"].forEach((function(e){Object.defineProperty(y.prototype,e,{configurable:!0,get:function(){return this["UNSAFE_"+e]},set:function(t){Object.defineProperty(this,e,{configurable:!0,writable:!0,value:t})}})}));var qe=r.event;function We(){}function Qe(){return this.cancelBubble}function Ge(){return this.defaultPrevented}r.event=function(e){return qe&&(e=qe(e)),e.persist=We,e.isPropagationStopped=Qe,e.isDefaultPrevented=Ge,e.nativeEvent=e};var Je,Ze={configurable:!0,get:function(){return this.class}},Ke=r.vnode;r.vnode=function(e){var t=e.type,n=e.props,r=n;if("string"==typeof t){var i=-1===t.indexOf("-");for(var o in r={},n){var a=n[o];Ue&&"children"===o&&"noscript"===t||"value"===o&&"defaultValue"in n&&null==a||("defaultValue"===o&&"value"in n&&null==n.value?o="value":"download"===o&&!0===a?a="":/ondoubleclick/i.test(o)?o="ondblclick":/^onchange(textarea|input)/i.test(o+t)&&!He(n.type)?o="oninput":/^onfocus$/i.test(o)?o="onfocusin":/^onblur$/i.test(o)?o="onfocusout":/^on(Ani|Tra|Tou|BeforeInp|Compo)/.test(o)?o=o.toLowerCase():i&&ze.test(o)?o=o.replace(/[A-Z0-9]/g,"-$&").toLowerCase():null===a&&(a=void 0),/^oninput$/i.test(o)&&(o=o.toLowerCase(),r[o]&&(o="oninputCapture")),r[o]=a)}"select"==t&&r.multiple&&Array.isArray(r.value)&&(r.value=k(n.children).forEach((function(e){e.props.selected=-1!=r.value.indexOf(e.props.value)}))),"select"==t&&null!=r.defaultValue&&(r.value=k(n.children).forEach((function(e){e.props.selected=r.multiple?-1!=r.defaultValue.indexOf(e.props.value):r.defaultValue==e.props.value}))),e.props=r,n.class!=n.className&&(Ze.enumerable="className"in n,null!=n.className&&(r.class=n.className),Object.defineProperty(r,"className",Ze))}e.$$typeof=je,Ke&&Ke(e)};var Xe=r.__r;r.__r=function(e){Xe&&Xe(e),Je=e.__c};var et={ReactCurrentDispatcher:{current:{readContext:function(e){return Je.__n[e.__c].props.value}}}},tt="17.0.2";function nt(e){return h.bind(null,e)}function rt(e){return!!e&&e.$$typeof===je}function it(e){return rt(e)?R.apply(null,arguments):e}function ot(e){return!!e.__k&&(P(null,e),!0)}function at(e){return e&&(e.base||1===e.nodeType&&e)||null}var ut=function(e,t){return e(t)},lt=function(e,t){return e(t)},ct=m;function st(e){e()}function ft(e){return e}function dt(){return[!1,st]}var ht=ne;function pt(e,t){var n=t(),r=X({h:{__:n,v:t}}),i=r[0].h,o=r[1];return ne((function(){i.__=n,i.v=t,be(i.__,t())||o({h:i})}),[e,n,t]),te((function(){return be(i.__,i.v())||o({h:i}),e((function(){be(i.__,i.v())||o({h:i})}))}),[e]),n}var vt,mt={useState:X,useId:se,useReducer:ee,useEffect:te,useLayoutEffect:ne,useInsertionEffect:ht,useTransition:dt,useDeferredValue:ft,useSyncExternalStore:pt,startTransition:st,useRef:re,useImperativeHandle:ie,useMemo:oe,useCallback:ae,useContext:ue,useDebugValue:le,version:"17.0.2",Children:Ae,render:Ye,hydrate:Ve,unmountComponentAtNode:ot,createPortal:Ie,createElement:h,createContext:I,createFactory:nt,cloneElement:it,createRef:v,Fragment:m,isValidElement:rt,findDOMNode:at,Component:y,PureComponent:De,memo:we,forwardRef:Ce,flushSync:lt,unstable_batchedUpdates:ut,StrictMode:ct,Suspense:Te,SuspenseList:Le,lazy:Me,__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED:et};function yt(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n=0&&(t.hash=e.substr(n),e=e.substr(0,n));var r=e.indexOf("?");r>=0&&(t.search=e.substr(r),e=e.substr(0,r)),e&&(t.pathname=e)}return t}function zt(e){var t="undefined"!==typeof window&&"undefined"!==typeof window.location&&"null"!==window.location.origin?window.location.origin:"unknown://unknown",n="string"===typeof e?e:It(e);return new URL(n,t)}function Ut(e,t,n,r){void 0===r&&(r={});var i=r,o=i.window,a=void 0===o?document.defaultView:o,u=i.v5Compat,l=void 0!==u&&u,c=a.history,s=vt.Pop,f=null;function d(){s=vt.Pop,f&&f({action:s,location:h.location})}var h={get action(){return s},get location(){return e(a,c)},listen:function(e){if(f)throw new Error("A history only accepts one active listener");return a.addEventListener(Lt,d),f=e,function(){a.removeEventListener(Lt,d),f=null}},createHref:function(e){return t(a,e)},encodeLocation:function(e){var t=zt(It(e));return Bt({},e,{pathname:t.pathname,search:t.search,hash:t.hash})},push:function(e,t){s=vt.Push;var r=Rt(h.location,e,t);n&&n(r,e);var i=$t(r),o=h.createHref(r);try{c.pushState(i,"",o)}catch(u){a.location.assign(o)}l&&f&&f({action:s,location:h.location})},replace:function(e,t){s=vt.Replace;var r=Rt(h.location,e,t);n&&n(r,e);var i=$t(r),o=h.createHref(r);c.replaceState(i,"",o),l&&f&&f({action:s,location:h.location})},go:function(e){return c.go(e)}};return h}function Ht(e,t,n){void 0===n&&(n="/");var r=Zt(("string"===typeof t?jt(t):t).pathname||"/",n);if(null==r)return null;var i=Yt(e);!function(e){e.sort((function(e,t){return e.score!==t.score?t.score-e.score:function(e,t){var n=e.length===t.length&&e.slice(0,-1).every((function(e,n){return e===t[n]}));return n?e[e.length-1]-t[t.length-1]:0}(e.routesMeta.map((function(e){return e.childrenIndex})),t.routesMeta.map((function(e){return e.childrenIndex})))}))}(i);for(var o=null,a=0;null==o&&a0&&(Kt(!0!==e.index,'Index routes must not have child routes. Please remove all child routes from route path "'+a+'".'),Yt(e.children,t,u,a)),(null!=e.path||e.index)&&t.push({path:a,score:Wt(a,e.index),routesMeta:u})})),t}!function(e){e.data="data",e.deferred="deferred",e.redirect="redirect",e.error="error"}(Mt||(Mt={}));var Vt=/^:\w+$/,qt=function(e){return"*"===e};function Wt(e,t){var n=e.split("/"),r=n.length;return n.some(qt)&&(r+=-2),t&&(r+=2),n.filter((function(e){return!qt(e)})).reduce((function(e,t){return e+(Vt.test(t)?3:""===t?1:10)}),r)}function Qt(e,t){for(var n=e.routesMeta,r={},i="/",o=[],a=0;a and the router will parse it for you.'}function tn(e){return e.filter((function(e,t){return 0===t||e.route.path&&e.route.path.length>0}))}function nn(e,t,n,r){var i;void 0===r&&(r=!1),"string"===typeof e?i=jt(e):(Kt(!(i=Bt({},e)).pathname||!i.pathname.includes("?"),en("?","pathname","search",i)),Kt(!i.pathname||!i.pathname.includes("#"),en("#","pathname","hash",i)),Kt(!i.search||!i.search.includes("#"),en("#","search","hash",i)));var o,a=""===e||""===i.pathname,u=a?"/":i.pathname;if(r||null==u)o=n;else{var l=t.length-1;if(u.startsWith("..")){for(var c=u.split("/");".."===c[0];)c.shift(),l-=1;i.pathname=c.join("/")}o=l>=0?t[l]:"/"}var s=function(e,t){void 0===t&&(t="/");var n="string"===typeof e?jt(e):e,r=n.pathname,i=n.search,o=void 0===i?"":i,a=n.hash,u=void 0===a?"":a,l=r?r.startsWith("/")?r:function(e,t){var n=t.replace(/\/+$/,"").split("/");return e.split("/").forEach((function(e){".."===e?n.length>1&&n.pop():"."!==e&&n.push(e)})),n.length>1?n.join("/"):"/"}(r,t):t;return{pathname:l,search:an(o),hash:un(u)}}(i,o),f=u&&"/"!==u&&u.endsWith("/"),d=(a||"."===u)&&n.endsWith("/");return s.pathname.endsWith("/")||!f&&!d||(s.pathname+="/"),s}var rn=function(e){return e.join("/").replace(/\/\/+/g,"/")},on=function(e){return e.replace(/\/+$/,"").replace(/^\/*/,"/")},an=function(e){return e&&"?"!==e?e.startsWith("?")?e:"?"+e:""},un=function(e){return e&&"#"!==e?e.startsWith("#")?e:"#"+e:""};Error;var ln=xt((function e(t,n,r){Dt(this,e),this.status=t,this.statusText=n||"",this.data=r}));function cn(e){return e instanceof ln}"undefined"!==typeof window&&"undefined"!==typeof window.document&&window.document.createElement;var sn=new Set(["POST","PUT","PATCH","DELETE"]);new Set(["GET","HEAD"].concat(bt(sn)));function fn(){return fn=Object.assign?Object.assign.bind():function(e){for(var t=1;t")))}var Nn,On,Tn=function(e){Ct(n,e);var t=Nt(n);function n(e){var r;return Dt(this,n),(r=t.call(this,e)).state={location:e.location,error:e.error},r}return xt(n,[{key:"componentDidCatch",value:function(e,t){console.error("React Router caught the following error during render",e,t)}},{key:"render",value:function(){return this.state.error?h(kn.Provider,{value:this.state.error,children:this.props.component}):this.props.children}}],[{key:"getDerivedStateFromError",value:function(e){return{error:e}}},{key:"getDerivedStateFromProps",value:function(e,t){return t.location!==e.location?{error:e.error,location:e.location}:{error:e.error||t.error,location:t.location}}}]),n}(y);function Bn(e){var t=e.routeContext,n=e.match,r=e.children,i=ue(gn);return i&&n.route.errorElement&&(i._deepestRenderedBoundaryId=n.route.id),h(xn.Provider,{value:t},r)}function Mn(e,t,n){if(void 0===t&&(t=[]),null==e){if(null==n||!n.errors)return null;e=n.matches}var r=e,i=null==n?void 0:n.errors;if(null!=i){var o=r.findIndex((function(e){return e.route.id&&(null==i?void 0:i[e.route.id])}));o>=0||Kt(!1),r=r.slice(0,Math.min(r.length,o+1))}return r.reduceRight((function(e,o,a){var u=o.route.id?null==i?void 0:i[o.route.id]:null,l=n?o.route.errorElement||h(Fn,null):null,c=function(){return h(Bn,{match:o,routeContext:{outlet:e,matches:t.concat(r.slice(0,a+1))}},u?l:void 0!==o.route.element?o.route.element:e)};return n&&(o.route.errorElement||0===a)?h(Tn,{location:n.location,component:l,error:u,children:c()}):c()}),null)}function Ln(e){var t=ue(bn);return t||Kt(!1),t}!function(e){e.UseRevalidator="useRevalidator"}(Nn||(Nn={})),function(e){e.UseLoaderData="useLoaderData",e.UseActionData="useActionData",e.UseRouteError="useRouteError",e.UseNavigation="useNavigation",e.UseRouteLoaderData="useRouteLoaderData",e.UseMatches="useMatches",e.UseRevalidator="useRevalidator"}(On||(On={}));var Pn;function $n(e){return function(e){var t=ue(xn).outlet;return t?h(Sn.Provider,{value:e},t):t}(e.context)}function Rn(e){Kt(!1)}function In(e){var t=e.basename,n=void 0===t?"/":t,r=e.children,i=void 0===r?null:r,o=e.location,a=e.navigationType,u=void 0===a?vt.Pop:a,l=e.navigator,c=e.static,s=void 0!==c&&c;Cn()&&Kt(!1);var f=n.replace(/^\/*/,"/"),d=oe((function(){return{basename:f,navigator:l,static:s}}),[f,l,s]);"string"===typeof o&&(o=jt(o));var p=o,v=p.pathname,m=void 0===v?"/":v,y=p.search,g=void 0===y?"":y,_=p.hash,b=void 0===_?"":_,D=p.state,w=void 0===D?null:D,x=p.key,k=void 0===x?"default":x,C=oe((function(){var e=Zt(m,f);return null==e?null:{pathname:e,search:g,hash:b,state:w,key:k}}),[f,m,g,b,w,k]);return null==C?null:h(Dn.Provider,{value:d},h(wn.Provider,{children:i,value:{location:C,navigationType:u}}))}function jn(e){var t=e.children,n=e.location,r=ue(_n);return function(e,t){Cn()||Kt(!1);var n,r=ue(bn),i=ue(xn).matches,o=i[i.length-1],a=o?o.params:{},u=(o&&o.pathname,o?o.pathnameBase:"/"),l=(o&&o.route,En());if(t){var c,s="string"===typeof t?jt(t):t;"/"===u||(null==(c=s.pathname)?void 0:c.startsWith(u))||Kt(!1),n=s}else n=l;var f=n.pathname||"/",d=Ht(e,{pathname:"/"===u?f:f.slice(u.length)||"/"}),p=Mn(d&&d.map((function(e){return Object.assign({},e,{params:Object.assign({},a,e.params),pathname:rn([u,e.pathname]),pathnameBase:"/"===e.pathnameBase?u:rn([u,e.pathnameBase])})})),i,r||void 0);return t&&p?h(wn.Provider,{value:{location:fn({pathname:"/",search:"",hash:"",state:null,key:"default"},n),navigationType:vt.Pop}},p):p}(r&&!t?r.router.routes:zn(t),n)}!function(e){e[e.pending=0]="pending",e[e.success=1]="success",e[e.error=2]="error"}(Pn||(Pn={}));new Promise((function(){}));function zn(e,t){void 0===t&&(t=[]);var n=[];return Ae.forEach(e,(function(e,r){if(rt(e))if(e.type!==m){e.type!==Rn&&Kt(!1),e.props.index&&e.props.children&&Kt(!1);var i=[].concat(bt(t),[r]),o={id:e.props.id||i.join("-"),caseSensitive:e.props.caseSensitive,element:e.props.element,index:e.props.index,path:e.props.path,loader:e.props.loader,action:e.props.action,errorElement:e.props.errorElement,hasErrorBoundary:null!=e.props.errorElement,shouldRevalidate:e.props.shouldRevalidate,handle:e.props.handle};e.props.children&&(o.children=zn(e.props.children,i)),n.push(o)}else n.push.apply(n,zn(e.props.children,t))})),n}function Un(e){var t=e.basename,n=e.children,r=e.window,i=re();null==i.current&&(i.current=function(e){return void 0===e&&(e={}),Ut((function(e,t){var n=jt(e.location.hash.substr(1)),r=n.pathname,i=void 0===r?"/":r,o=n.search,a=void 0===o?"":o,u=n.hash;return Rt("",{pathname:i,search:a,hash:void 0===u?"":u},t.state&&t.state.usr||null,t.state&&t.state.key||"default")}),(function(e,t){var n=e.document.querySelector("base"),r="";if(n&&n.getAttribute("href")){var i=e.location.href,o=i.indexOf("#");r=-1===o?i:i.slice(0,o)}return r+"#"+("string"===typeof t?t:It(t))}),(function(e,t){Pt("/"===e.pathname.charAt(0),"relative pathnames are not supported in hash history.push("+JSON.stringify(t)+")")}),e)}({window:r,v5Compat:!0}));var o=i.current,a=_t(X({action:o.action,location:o.location}),2),u=a[0],l=a[1];return ne((function(){return o.listen(l)}),[o]),h(In,{basename:t,children:n,location:u.location,navigationType:u.action,navigator:o})}var Hn,Yn;(function(e){e.UseScrollRestoration="useScrollRestoration",e.UseSubmitImpl="useSubmitImpl",e.UseFetcher="useFetcher"})(Hn||(Hn={})),function(e){e.UseFetchers="useFetchers",e.UseScrollRestoration="useScrollRestoration"}(Yn||(Yn={}));var Vn;function qn(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}var Wn={home:"/",dashboards:"/dashboards",cardinality:"/cardinality",topQueries:"/top-queries",trace:"/trace"},Qn={header:{timeSelector:!0,executionControls:!0,globalSettings:!0}},Gn=(qn(Vn={},Wn.home,Qn),qn(Vn,Wn.dashboards,Qn),qn(Vn,Wn.cardinality,{header:{cardinalityDatePicker:!0,globalSettings:!0}}),Vn),Jn=Wn;function Zn(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}function Kn(e){for(var t=1;t2&&void 0!==arguments[2]?arguments[2]:window.location.search,r=nr().parse(n,{ignoreQueryPrefix:!0});return ir()(r,e,t||"")},lr={serverUrl:Xn().serverURL||window.location.href.replace(/\/(?:prometheus\/)?(?:graph|vmui)\/.*/,"/prometheus"),tenantId:Number(ur("g0.tenantID",0))};function cr(e,t){switch(t.type){case"SET_SERVER":return Kn(Kn({},e),{},{serverUrl:t.payload});case"SET_TENANT_ID":return Kn(Kn({},e),{},{tenantId:t.payload});default:throw new Error}}var sr=0;function fr(e,t,n,i,o){var a,u,l={};for(u in t)"ref"==u?a=t[u]:l[u]=t[u];var c={type:e,props:l,key:n,ref:a,__k:null,__:null,__b:0,__e:null,__d:void 0,__c:null,__h:null,constructor:void 0,__v:--sr,__source:o,__self:i};if("function"==typeof e&&(a=e.defaultProps))for(u in a)void 0===l[u]&&(l[u]=a[u]);return r.vnode&&r.vnode(c),c}var dr=I({}),hr=function(){return ue(dr).state},pr=function(){return ue(dr).dispatch},vr=Object.entries(lr).reduce((function(e,t){var n=_t(t,2),r=n[0],i=n[1];return Kn(Kn({},e),{},qn({},r,ur(r)||i))}),{}),mr=n(658),yr=n.n(mr),gr=n(446),_r=n.n(gr),br=n(635),Dr=n.n(br),wr="YYYY-MM-DD",xr="YYYY-MM-DD HH:mm:ss",kr="YYYY-MM-DD[T]HH:mm:ss";yr().extend(_r()),yr().extend(Dr());var Cr,Er=window.innerWidth/4,Ar=1,Sr=1578e8,Fr=[{long:"days",short:"d",possible:"day"},{long:"weeks",short:"w",possible:"week"},{long:"months",short:"M",possible:"mon"},{long:"years",short:"y",possible:"year"},{long:"hours",short:"h",possible:"hour"},{long:"minutes",short:"m",possible:"min"},{long:"seconds",short:"s",possible:"sec"},{long:"milliseconds",short:"ms",possible:"millisecond"}].map((function(e){return e.short})),Nr=function(e){return Math.round(1e3*e)/1e3},Or=function(e){var t=e.match(/\d+/g),n=e.match(/[a-zA-Z]+/g);if(n&&t&&Fr.includes(n[0]))return qn({},n[0],t[0])},Tr=function(e,t){var n=(t||new Date).valueOf()/1e3,r=e.trim().split(" ").reduce((function(e,t){var n=Or(t);return n?Kn(Kn({},e),n):Kn({},e)}),{}),i=yr().duration(r).asSeconds();return{start:n-i,end:n,step:Nr(i/Er)||.001,date:Br(t||new Date)}},Br=function(e){return yr()(e).utc().format(kr)},Mr=function(e){return yr()(e).format(kr)},Lr=function(e){var t=Math.floor(e%1e3),n=Math.floor(e/1e3%60),r=Math.floor(e/1e3/60%60),i=Math.floor(e/1e3/3600%24),o=Math.floor(e/864e5),a=["d","h","m","s","ms"],u=[o,i,r,n,t].map((function(e,t){return e?"".concat(e).concat(a[t]):""}));return u.filter((function(e){return e})).join(" ")},Pr=function(e){return new Date(1e3*e)},$r=[{title:"Last 5 minutes",duration:"5m"},{title:"Last 15 minutes",duration:"15m"},{title:"Last 30 minutes",duration:"30m",isDefault:!0},{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:function(){return yr()().subtract(1,"day").endOf("day").toDate()}},{title:"Today",duration:"1d",until:function(){return yr()().endOf("day").toDate()}}].map((function(e){return Kn({id:e.title.replace(/\s/g,"_").toLocaleLowerCase(),until:e.until?e.until:function(){return yr()().toDate()}},e)})),Rr=function(e){var t,n=e.relativeTimeId,r=e.defaultDuration,i=e.defaultEndInput,o=null===(t=$r.find((function(e){return e.isDefault})))||void 0===t?void 0:t.id,a=n||ur("g0.relative_time",o),u=$r.find((function(e){return e.id===a}));return{relativeTimeId:u?a:"none",duration:u?u.duration:r,endInput:u?u.until():i}},Ir=ur("g0.range_input"),jr=Rr({defaultDuration:Ir||"1h",defaultEndInput:new Date((Cr=ur("g0.end_input",new Date(yr()().utc().format(kr))),yr()(Cr).utcOffset(0,!0).local().format(kr))),relativeTimeId:Ir?ur("g0.relative_time","none"):void 0}),zr=jr.duration,Ur=jr.endInput,Hr=jr.relativeTimeId,Yr={duration:zr,period:Tr(zr,Ur),relativeTime:Hr};function Vr(e,t){switch(t.type){case"SET_DURATION":return Kn(Kn({},e),{},{duration:t.payload,period:Tr(t.payload,Pr(e.period.end)),relativeTime:"none"});case"SET_RELATIVE_TIME":return Kn(Kn({},e),{},{duration:t.payload.duration,period:Tr(t.payload.duration,new Date(t.payload.until)),relativeTime:t.payload.id});case"SET_PERIOD":var n=function(e){var t=e.to.valueOf()-e.from.valueOf();return Lr(t)}(t.payload);return Kn(Kn({},e),{},{duration:n,period:Tr(n,t.payload.to),relativeTime:"none"});case"RUN_QUERY":var r=Rr({relativeTimeId:e.relativeTime,defaultDuration:e.duration,defaultEndInput:Pr(e.period.end)}),i=r.duration,o=r.endInput;return Kn(Kn({},e),{},{period:Tr(i,o)});case"RUN_QUERY_TO_NOW":return Kn(Kn({},e),{},{period:Tr(e.duration)});default:throw new Error}}var qr=I({}),Wr=function(){return ue(qr).state},Qr=function(){return ue(qr).dispatch},Gr=function(e,t){t?window.localStorage.setItem(e,JSON.stringify({value:t})):Zr([e])},Jr=function(e){var 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(c){return t}},Zr=function(e){return e.forEach((function(e){return window.localStorage.removeItem(e)}))},Kr=function(){var e,t=(null===(e=window.location.search.match(/g\d+.expr/gim))||void 0===e?void 0:e.length)||1;return new Array(t>4?4:t).fill(1).map((function(e,t){return ur("g".concat(t,".expr"),"")}))}(),Xr={query:Kr,queryHistory:Kr.map((function(e){return{index:0,values:[e]}})),autocomplete:Jr("AUTOCOMPLETE")||!1};function ei(e,t){switch(t.type){case"SET_QUERY":return Kn(Kn({},e),{},{query:t.payload.map((function(e){return e}))});case"SET_QUERY_HISTORY":return Kn(Kn({},e),{},{queryHistory:t.payload});case"SET_QUERY_HISTORY_BY_INDEX":return e.queryHistory.splice(t.payload.queryNumber,1,t.payload.value),Kn(Kn({},e),{},{queryHistory:e.queryHistory});case"TOGGLE_AUTOCOMPLETE":return Gr("AUTOCOMPLETE",!e.autocomplete),Kn(Kn({},e),{},{autocomplete:!e.autocomplete});default:throw new Error}}var ti=I({}),ni=function(){return ue(ti).state},ri=function(){return ue(ti).dispatch},ii=function(){return fr("svg",{viewBox:"0 0 74 24",fill:"currentColor",children:[fr("path",{d:"M6.11771 9.47563C6.4774 9.7554 6.91935 9.90875 7.37507 9.9119H7.42685C7.9076 9.90451 8.38836 9.71964 8.67681 9.46823C10.1856 8.18898 14.5568 4.18115 14.5568 4.18115C15.7254 3.09415 12.4637 2.00716 7.42685 1.99977H7.36768C2.33084 2.00716 -0.930893 3.09415 0.237711 4.18115C0.237711 4.18115 4.60888 8.18898 6.11771 9.47563ZM8.67681 11.6422C8.31807 11.9246 7.87603 12.0806 7.41945 12.0859H7.37507C6.91849 12.0806 6.47645 11.9246 6.11771 11.6422C5.08224 10.7549 1.38413 7.41995 0.00103198 6.14809V8.07806C0.00103198 8.2925 0.0823905 8.57349 0.222919 8.70659L0.293358 8.77097L0.293386 8.77099C1.33788 9.72556 4.83907 12.9253 6.11771 14.0159C6.47645 14.2983 6.91849 14.4543 7.37507 14.4595H7.41945C7.9076 14.4447 8.38096 14.2599 8.67681 14.0159C9.98594 12.9067 13.6249 9.57175 14.5642 8.70659C14.7121 8.57349 14.7861 8.2925 14.7861 8.07806V6.14809C12.7662 7.99781 10.7297 9.82926 8.67681 11.6422ZM7.41945 16.6261C7.87517 16.623 8.31712 16.4696 8.67681 16.1898C10.7298 14.3744 12.7663 12.5405 14.7861 10.6883V12.6257C14.7861 12.8327 14.7121 13.1137 14.5642 13.2468C13.6249 14.1194 9.98594 17.4469 8.67681 18.5561C8.38096 18.8075 7.9076 18.9924 7.41945 18.9998H7.37507C6.91935 18.9966 6.4774 18.8433 6.11771 18.5635C4.91431 17.5371 1.74223 14.6362 0.502336 13.5023C0.3934 13.4027 0.299379 13.3167 0.222919 13.2468C0.0823905 13.1137 0.00103198 12.8327 0.00103198 12.6257V10.6883C1.38413 11.9528 5.08224 15.2951 6.11771 16.1825C6.47645 16.4649 6.91849 16.6209 7.37507 16.6261H7.41945Z",fill:"currentColor"}),fr("path",{d:"M35 3.54L29.16 18H26.73L20.89 3.54H23.05C23.2833 3.54 23.4733 3.59667 23.62 3.71C23.7667 3.82333 23.8767 3.97 23.95 4.15L27.36 12.97C27.4733 13.2567 27.58 13.5733 27.68 13.92C27.7867 14.26 27.8867 14.6167 27.98 14.99C28.06 14.6167 28.1467 14.26 28.24 13.92C28.3333 13.5733 28.4367 13.2567 28.55 12.97L31.94 4.15C31.9933 3.99667 32.0967 3.85667 32.25 3.73C32.41 3.60333 32.6033 3.54 32.83 3.54H35ZM52.1767 3.54V18H49.8067V8.66C49.8067 8.28667 49.8267 7.88333 49.8667 7.45L45.4967 15.66C45.2901 16.0533 44.9734 16.25 44.5467 16.25H44.1667C43.7401 16.25 43.4234 16.0533 43.2167 15.66L38.7967 7.42C38.8167 7.64 38.8334 7.85667 38.8467 8.07C38.8601 8.28333 38.8667 8.48 38.8667 8.66V18H36.4967V3.54H38.5267C38.6467 3.54 38.7501 3.54333 38.8367 3.55C38.9234 3.55667 39.0001 3.57333 39.0667 3.6C39.1401 3.62667 39.2034 3.67 39.2567 3.73C39.3167 3.79 39.3734 3.87 39.4267 3.97L43.7567 12C43.8701 12.2133 43.9734 12.4333 44.0667 12.66C44.1667 12.8867 44.2634 13.12 44.3567 13.36C44.4501 13.1133 44.5467 12.8767 44.6467 12.65C44.7467 12.4167 44.8534 12.1933 44.9667 11.98L49.2367 3.97C49.2901 3.87 49.3467 3.79 49.4067 3.73C49.4667 3.67 49.5301 3.62667 49.5967 3.6C49.6701 3.57333 49.7501 3.55667 49.8367 3.55C49.9234 3.54333 50.0267 3.54 50.1467 3.54H52.1767ZM61.063 17.27C61.743 17.27 62.3496 17.1533 62.883 16.92C63.423 16.68 63.8796 16.35 64.253 15.93C64.6263 15.51 64.9096 15.0167 65.103 14.45C65.303 13.8767 65.403 13.26 65.403 12.6V3.85H66.423V12.6C66.423 13.38 66.2996 14.11 66.053 14.79C65.8063 15.4633 65.4496 16.0533 64.983 16.56C64.523 17.06 63.9596 17.4533 63.293 17.74C62.633 18.0267 61.8896 18.17 61.063 18.17C60.2363 18.17 59.4896 18.0267 58.823 17.74C58.163 17.4533 57.5996 17.06 57.133 16.56C56.673 16.0533 56.3196 15.4633 56.073 14.79C55.8263 14.11 55.703 13.38 55.703 12.6V3.85H56.733V12.59C56.733 13.25 56.8296 13.8667 57.023 14.44C57.223 15.0067 57.5063 15.5 57.873 15.92C58.2463 16.34 58.6996 16.67 59.233 16.91C59.773 17.15 60.383 17.27 61.063 17.27ZM71.4442 18H70.4142V3.85H71.4442V18Z",fill:"currentColor"})]})},oi=function(){return fr("svg",{viewBox:"0 0 24 24",fill:"currentColor",children:fr("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"})})},ai=function(){return fr("svg",{viewBox:"0 0 24 24",fill:"currentColor",children:fr("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"})})},ui=function(){return fr("svg",{viewBox:"0 0 24 24",fill:"currentColor",children:fr("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"})})},li=function(){return fr("svg",{viewBox:"0 0 24 24",fill:"currentColor",children:fr("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"})})},ci=function(){return fr("svg",{viewBox:"0 0 24 24",fill:"currentColor",children:fr("path",{d:"M1 21h22L12 2 1 21zm12-3h-2v-2h2v2zm0-4h-2v-4h2v4z"})})},si=function(){return fr("svg",{viewBox:"0 0 24 24",fill:"currentColor",children:fr("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"})})},fi=function(){return fr("svg",{viewBox:"0 0 24 24",fill:"currentColor",children:fr("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"})})},di=function(){return fr("svg",{viewBox:"0 0 24 24",fill:"currentColor",children:fr("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"})})},hi=function(){return fr("svg",{viewBox:"0 0 24 24",fill:"currentColor",children:fr("path",{d:"M7.41 8.59 12 13.17l4.59-4.58L18 10l-6 6-6-6 1.41-1.41z"})})},pi=function(){return fr("svg",{viewBox:"0 0 24 24",fill:"currentColor",children:fr("path",{d:"m12 8-6 6 1.41 1.41L12 10.83l4.59 4.58L18 14z"})})},vi=function(){return fr("svg",{viewBox:"0 0 24 24",fill:"currentColor",children:fr("path",{d:"m7 10 5 5 5-5z"})})},mi=function(){return fr("svg",{viewBox:"0 0 24 24",fill:"currentColor",children:[fr("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"}),fr("path",{d:"M12.5 7H11v6l5.25 3.15.75-1.23-4.5-2.67z"})]})},yi=function(){return fr("svg",{viewBox:"0 0 24 24",fill:"currentColor",children:fr("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"})})},gi=function(){return fr("svg",{viewBox:"0 0 24 24",fill:"currentColor",children:fr("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"})})},_i=function(){return fr("svg",{viewBox:"0 0 24 24",fill:"currentColor",children:fr("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"})})},bi=function(){return fr("svg",{viewBox:"0 0 24 24",fill:"currentColor",children:fr("path",{d:"M8 5v14l11-7z"})})},Di=function(){return fr("svg",{viewBox:"0 0 24 24",fill:"currentColor",children:fr("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"})})},wi=function(){return fr("svg",{viewBox:"0 0 24 24",fill:"currentColor",children:fr("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"})})},xi=function(){return fr("svg",{viewBox:"0 0 24 24",fill:"currentColor",children:fr("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"})})},ki=function(){return fr("svg",{viewBox:"0 0 24 24",fill:"currentColor",children:fr("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"})})},Ci=function(){return fr("svg",{viewBox:"0 0 24 24",fill:"currentColor",children:fr("path",{d:"M6 19c0 1.1.9 2 2 2h8c1.1 0 2-.9 2-2V7H6v12zM19 4h-3.5l-1-1h-5l-1 1H5v2h14V4z"})})},Ei=function(){return fr("svg",{viewBox:"0 0 24 24",fill:"currentColor",children:fr("path",{d:"M19 13h-6v6h-2v-6H5v-2h6V5h2v6h6v2z"})})},Ai=function(){return fr("svg",{viewBox:"0 0 24 24",fill:"currentColor",children:fr("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"})})},Si=function(){return fr("svg",{viewBox:"0 0 24 24",fill:"currentColor",children:fr("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"})})},Fi=function(){return fr("svg",{viewBox:"0 0 24 24",fill:"currentColor",children:fr("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"})})},Ni=function(){return fr("svg",{viewBox:"0 0 24 24",fill:"currentColor",children:fr("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"})})},Oi=n(123),Ti=n.n(Oi),Bi=function(e){return getComputedStyle(document.documentElement).getPropertyValue("--".concat(e))},Mi=function(e,t){document.documentElement.style.setProperty("--".concat(e),t)},Li=function(e){var t=e.activeItem,n=e.items,r=e.color,i=void 0===r?Bi("color-primary"):r,o=e.onChange,a=e.indicatorPlacement,u=void 0===a?"bottom":a,l=re(null),c=_t(X({left:0,width:0,bottom:0}),2),s=c[0],f=c[1];return te((function(){if(l.current){var e=l.current,t=e.offsetLeft,n=e.offsetWidth,r=e.offsetHeight;f({left:t,width:n,bottom:"top"===u?r-2:0})}}),[t,l,n]),fr("div",{className:"vm-tabs",children:[n.map((function(e){return fr("div",{className:Ti()(qn({"vm-tabs-item":!0,"vm-tabs-item_active":t===e.value},e.className||"",e.className)),ref:t===e.value?l:void 0,style:{color:i},onClick:(n=e.value,function(){o(n)}),children:[e.icon&&fr("div",{className:Ti()({"vm-tabs-item__icon":!0,"vm-tabs-item__icon_single":!e.label}),children:e.icon}),e.label]},e.value);var n})),fr("div",{className:"vm-tabs__indicator",style:Kn(Kn({},s),{},{borderColor:i})})]})},Pi=[{value:"chart",icon:fr(wi,{}),label:"Graph",prometheusCode:0},{value:"code",icon:fr(ki,{}),label:"JSON",prometheusCode:3},{value:"table",icon:fr(xi,{}),label:"Table",prometheusCode:1}],$i=function(){var e=Hi().displayType,t=Yi();return fr(Li,{activeItem:e,items:Pi,onChange:function(n){var r;t({type:"SET_DISPLAY_TYPE",payload:null!==(r=n)&&void 0!==r?r:e})}})},Ri=ur("g0.tab",0),Ii=Pi.find((function(e){return e.prometheusCode===+Ri||e.value===Ri})),ji={displayType:(null===Ii||void 0===Ii?void 0:Ii.value)||"chart",nocache:Jr("NO_CACHE")||!1,isTracingEnabled:Jr("QUERY_TRACING")||!1};function zi(e,t){switch(t.type){case"SET_DISPLAY_TYPE":return Kn(Kn({},e),{},{displayType:t.payload});case"TOGGLE_QUERY_TRACING":return Gr("QUERY_TRACING",!e.isTracingEnabled),Kn(Kn({},e),{},{isTracingEnabled:!e.isTracingEnabled});case"TOGGLE_NO_CACHE":return Gr("NO_CACHE",!e.nocache),Kn(Kn({},e),{},{nocache:!e.nocache});default:throw new Error}}var Ui=I({}),Hi=function(){return ue(Ui).state},Yi=function(){return ue(Ui).dispatch},Vi={customStep:parseFloat(ur("g0.step_input","0")),yaxis:{limits:{enable:!1,range:{1:[0,0]}}}};function qi(e,t){switch(t.type){case"TOGGLE_ENABLE_YAXIS_LIMITS":return Kn(Kn({},e),{},{yaxis:Kn(Kn({},e.yaxis),{},{limits:Kn(Kn({},e.yaxis.limits),{},{enable:!e.yaxis.limits.enable})})});case"SET_CUSTOM_STEP":return Kn(Kn({},e),{},{customStep:t.payload});case"SET_YAXIS_LIMITS":return Kn(Kn({},e),{},{yaxis:Kn(Kn({},e.yaxis),{},{limits:Kn(Kn({},e.yaxis.limits),{},{range:t.payload})})});default:throw new Error}}var Wi=I({}),Qi=function(){return ue(Wi).dispatch},Gi={runQuery:0,topN:ur("topN",10),date:ur("date",yr()(new Date).format(wr)),focusLabel:ur("focusLabel",""),match:ur("match",""),extraLabel:ur("extra_label","")};function Ji(e,t){switch(t.type){case"SET_TOP_N":return Kn(Kn({},e),{},{topN:t.payload});case"SET_DATE":return Kn(Kn({},e),{},{date:t.payload});case"SET_MATCH":return Kn(Kn({},e),{},{match:t.payload});case"SET_EXTRA_LABEL":return Kn(Kn({},e),{},{extraLabel:t.payload});case"SET_FOCUS_LABEL":return Kn(Kn({},e),{},{focusLabel:t.payload});case"RUN_QUERY":return Kn(Kn({},e),{},{runQuery:e.runQuery+1});default:throw new Error}}var Zi=I({}),Ki=function(){return ue(Zi).state},Xi=function(){return ue(Zi).dispatch},eo={topN:ur("topN",null),maxLifetime:ur("maxLifetime",""),runQuery:0};function to(e,t){switch(t.type){case"SET_TOP_N":return Kn(Kn({},e),{},{topN:t.payload});case"SET_MAX_LIFE_TIME":return Kn(Kn({},e),{},{maxLifetime:t.payload});case"SET_RUN_QUERY":return Kn(Kn({},e),{},{runQuery:e.runQuery+1});default:throw new Error}}var no,ro=I({}),io=function(){return ue(ro).state},oo={success:fr(fi,{}),error:fr(si,{}),warning:fr(ci,{}),info:fr(li,{})},ao=function(e){var t=e.variant,n=e.children;return fr("div",{className:Ti()(qn({"vm-alert":!0},"vm-alert_".concat(t),t)),children:[fr("div",{className:"vm-alert__icon",children:oo[t||"info"]}),fr("div",{className:"vm-alert__content",children:n})]})},uo=I({showInfoMessage:function(){}}),lo=function(){return ue(uo)},co=function(){for(var e=arguments.length,t=new Array(e),n=0;nd,v=r.top-20<0,m=r.left+g.width+20>f,y=r.left-20<0;return h&&(r.top=t.top-g.height-u),v&&(r.top=t.height+t.top+u),m&&(r.left=t.right-g.width-l),y&&(r.left=t.left+l),r}),[n,i,p,t]);d&&fo(b,(function(){return v(!1)}),n);var x=Ti()(qn({"vm-popper":!0,"vm-popper_open":p},"vm-popper_open_".concat(l),l));return fr(m,{children:p&&mt.createPortal(fr("div",{className:x,ref:b,style:w,children:t}),document.body)})},po=function(e){var t=e.children,n=e.title,r=e.open,i=e.placement,o=void 0===i?"bottom-center":i,a=e.offset,u=void 0===a?{top:6,left:0}:a,l=_t(X(!1),2),c=l[0],s=l[1],f=_t(X({width:0,height:0}),2),d=f[0],h=f[1],p=re(null),v=re(null),y=function(){return s(!1)};te((function(){return window.addEventListener("scroll",y),function(){window.removeEventListener("scroll",y)}}),[]),te((function(){v.current&&c&&h({width:v.current.clientWidth,height:v.current.clientHeight})}),[c]);var g=oe((function(){var e,t=null===p||void 0===p||null===(e=p.current)||void 0===e?void 0:e.base;if(!t||!c)return{};var n=t.getBoundingClientRect(),r={top:0,left:0},i="bottom-right"===o||"top-right"===o,a="bottom-left"===o||"top-left"===o,l=null===o||void 0===o?void 0:o.includes("top"),s=(null===u||void 0===u?void 0:u.top)||0,f=(null===u||void 0===u?void 0:u.left)||0;r.left=n.left-(d.width-n.width)/2+f,r.top=n.height+n.top+s,i&&(r.left=n.right-d.width),a&&(r.left=n.left+f),l&&(r.top=n.top-d.height-s);var h=window,v=h.innerWidth,m=h.innerHeight,y=r.top+d.height+20>m,g=r.top-20<0,_=r.left+d.width+20>v,b=r.left-20<0;return y&&(r.top=n.top-d.height-s),g&&(r.top=n.height+n.top+s),_&&(r.left=n.right-d.width-f),b&&(r.left=n.left+f),r.top<0&&(r.top=20),r.left<0&&(r.left=20),r}),[p,o,c,d]),_=function(){"boolean"!==typeof r&&s(!0)},b=function(){s(!1)};return te((function(){"boolean"===typeof r&&s(r)}),[r]),te((function(){var e,t=null===p||void 0===p||null===(e=p.current)||void 0===e?void 0:e.base;if(t)return t.addEventListener("mouseenter",_),t.addEventListener("mouseleave",b),function(){t.removeEventListener("mouseenter",_),t.removeEventListener("mouseleave",b)}}),[p]),fr(m,{children:[fr(m,{ref:p,children:t}),c&&mt.createPortal(fr("div",{className:"vm-tooltip",ref:v,style:g,children:n}),document.body)]})},vo=[{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"}],mo=function(){var e=Qr(),t=er(),n=_t(X(!1),2),r=n[0],i=n[1],o=_t(X(vo[0]),2),a=o[0],u=o[1];te((function(){var t,n=a.seconds;return r?t=setInterval((function(){e({type:"RUN_QUERY"})}),1e3*n):u(vo[0]),function(){t&&clearInterval(t)}}),[a,r]);var l=_t(X(!1),2),c=l[0],s=l[1],f=re(null),d=function(e){return function(){!function(e){(r&&!e.seconds||!r&&e.seconds)&&i((function(e){return!e})),u(e),s(!1)}(e)}};return fr(m,{children:[fr("div",{className:"vm-execution-controls",children:fr("div",{className:Ti()({"vm-execution-controls-buttons":!0,"vm-header-button":!t}),children:[fr(po,{title:"Refresh dashboard",children:fr(so,{variant:"contained",color:"primary",onClick:function(){e({type:"RUN_QUERY"})},startIcon:fr(di,{})})}),fr(po,{title:"Auto-refresh control",children:fr("div",{ref:f,children:fr(so,{variant:"contained",color:"primary",fullWidth:!0,endIcon:fr("div",{className:Ti()({"vm-execution-controls-buttons__arrow":!0,"vm-execution-controls-buttons__arrow_open":c}),children:fr(hi,{})}),onClick:function(){s((function(e){return!e}))},children:a.title})})})]})}),fr(ho,{open:c,placement:"bottom-right",onClose:function(){s(!1)},buttonRef:f,children:fr("div",{className:"vm-execution-controls-list",children:vo.map((function(e){return fr("div",{className:Ti()({"vm-list__item":!0,"vm-list__item_active":e.seconds===a.seconds}),onClick:d(e),children:e.title},e.seconds)}))})})]})},yo=function(e){var t=e.relativeTime,n=e.setDuration;return fr("div",{className:"vm-time-duration",children:$r.map((function(e){var r,i=e.id,o=e.duration,a=e.until,u=e.title;return fr("div",{className:Ti()({"vm-list__item":!0,"vm-list__item_active":i===t}),onClick:(r={duration:o,until:a(),id:i},function(){n(r)}),children:u||o},i)}))})},go=function(e){var t=_t(X({width:0,height:0}),2),n=t[0],r=t[1];return te((function(){var t=new ResizeObserver((function(e){var t=e[0].contentRect,n=t.width,i=t.height;r({width:n,height:i})}));return e&&t.observe(e),function(){e&&t.unobserve(e)}}),[]),n},_o=function(e){var t=e.viewDate,n=e.displayYears,r=e.onChangeViewDate;return fr("div",{className:"vm-calendar-header",children:[fr("div",{className:"vm-calendar-header-left",onClick:e.toggleDisplayYears,children:[fr("span",{className:"vm-calendar-header-left__date",children:t.format("MMMM YYYY")}),fr("div",{className:"vm-calendar-header-left__select-year",children:fr(vi,{})})]}),!n&&fr("div",{className:"vm-calendar-header-right",children:[fr("div",{className:"vm-calendar-header-right__prev",onClick:function(){r(t.subtract(1,"month"))},children:fr(hi,{})}),fr("div",{className:"vm-calendar-header-right__next",onClick:function(){r(t.add(1,"month"))},children:fr(hi,{})})]})]})},bo=["Sunday","Monday","Tuesday","Wednesday","Thursday","Friday","Saturday"],Do=function(e){var t=e.viewDate,n=e.selectDate,r=e.onChangeSelectDate,i=yr()().startOf("day"),o=oe((function(){var e=new Array(42).fill(null),n=t.startOf("month"),r=t.endOf("month").diff(n,"day")+1,i=new Array(r).fill(n).map((function(e,t){return e.add(t,"day")})),o=n.day();return e.splice.apply(e,[o,r].concat(bt(i))),e}),[t]),a=function(e){return function(){e&&r(e)}};return fr("div",{className:"vm-calendar-body",children:[bo.map((function(e){return fr("div",{className:"vm-calendar-body-cell vm-calendar-body-cell_weekday",children:e[0]},e)})),o.map((function(e,t){return fr("div",{className:Ti()({"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.toISOString())===n.startOf("day").toISOString(),"vm-calendar-body-cell_day_today":(e&&e.toISOString())===i.toISOString()}),onClick:a(e),children:e&&e.format("D")},e?e.toISOString():t)}))]})},wo=function(e){var t=e.viewDate,n=e.onChangeViewDate,r=oe((function(){return t.format("YYYY")}),[t]),i=oe((function(){var e=yr()().subtract(103,"year");return new Array(206).fill(e).map((function(e,t){return e.add(t,"year")}))}),[t]);te((function(){var e=document.getElementById("vm-calendar-year-".concat(r));e&&e.scrollIntoView({block:"center"})}),[]);return fr("div",{className:"vm-calendar-years",children:i.map((function(e){return fr("div",{className:Ti()({"vm-calendar-years__year":!0,"vm-calendar-years__year_selected":e.format("YYYY")===r}),id:"vm-calendar-year-".concat(e.format("YYYY")),onClick:(t=e,function(){n(t)}),children:e.format("YYYY")},e.format("YYYY"));var t}))})};!function(e){e[e.hour=0]="hour",e[e.minutes=1]="minutes",e[e.seconds=2]="seconds"}(no||(no={}));var xo,ko=function(e){var t=e.selectDate,n=e.onChangeTime,r=e.onClose,i=_t(X(no.hour),2),o=i[0],a=i[1],u=_t(X(t.format("HH")),2),l=u[0],c=u[1],s=_t(X(t.format("mm")),2),f=s[0],d=s[1],h=_t(X(t.format("ss")),2),p=h[0],v=h[1],m=oe((function(){return o===no.hour?new Array(24).fill("00").map((function(e,t){return{value:t,degrees:t/12*360,offset:0===t||t>12,title:t?"".concat(t):e}})):new Array(60).fill("00").map((function(e,t){return{value:t,degrees:t/60*360,offset:!1,title:t?"".concat(t):e}}))}),[o,l,f,p]),y=oe((function(){switch(o){case no.hour:return+l/12*360;case no.minutes:return+f/60*360;case no.seconds:return+p/60*360}}),[o,l,f,p]),g=re(null),_=re(null),b=re(null),D=function(e){return function(t){!function(e,t){t.target.select(),a(e)}(e,t)}};return te((function(){n("".concat(l,":").concat(f,":").concat(p))}),[l,f,p]),te((function(){c(t.format("HH")),d(t.format("mm")),v(t.format("ss"))}),[t]),te((function(){g.current&&g.current.focus()}),[]),fr("div",{className:"vm-calendar-time-picker",children:[fr("div",{className:"vm-calendar-time-picker-clock",children:[fr("div",{className:Ti()({"vm-calendar-time-picker-clock__arrow":!0,"vm-calendar-time-picker-clock__arrow_offset":o===no.hour&&("00"===l||+l>12)}),style:{transform:"rotate(".concat(y,"deg)")}}),m.map((function(e){return fr("div",{className:Ti()({"vm-calendar-time-picker-clock__time":!0,"vm-calendar-time-picker-clock__time_offset":e.offset,"vm-calendar-time-picker-clock__time_hide":m.length>24&&e.value%5}),style:{transform:"rotate(".concat(e.degrees,"deg)")},onClick:(t=e.value,function(){var e=String(t);switch(o){case no.hour:c(e),_.current&&_.current.focus();break;case no.minutes:d(e),b.current&&b.current.focus();break;case no.seconds:v(e),r()}}),children:fr("span",{style:{transform:"rotate(-".concat(e.degrees,"deg)")},children:e.title})},e.value);var t}))]}),fr("div",{className:"vm-calendar-time-picker-fields",children:[fr("input",{className:"vm-calendar-time-picker-fields__input",value:l,onChange:function(e){var t=e.target,n=t.value,r=+n>23?"23":n;t.value=r,c(r),n.length>1&&_.current&&_.current.focus()},onFocus:D(no.hour),ref:g,type:"number",min:0,max:24}),fr("span",{children:":"}),fr("input",{className:"vm-calendar-time-picker-fields__input",value:f,onChange:function(e){var t=e.target,n=t.value,r=+n>59?"59":n;t.value=r,d(r),n.length>1&&b.current&&b.current.focus()},onFocus:D(no.minutes),ref:_,type:"number",min:0,max:60}),fr("span",{children:":"}),fr("input",{className:"vm-calendar-time-picker-fields__input",value:p,onChange:function(e){var t=e.target,n=t.value,i=+n>59?"59":n;t.value=i,v(i),n.length>1&&b.current&&r()},onFocus:D(no.seconds),ref:b,type:"number",min:0,max:60})]})]})},Co=[{value:"date",icon:fr(yi,{})},{value:"time",icon:fr(mi,{})}],Eo=function(e){var t=e.date,n=e.timepicker,r=void 0!==n&&n,i=e.format,o=void 0===i?xr:i,a=e.onChange,u=e.onClose,l=_t(X(!1),2),c=l[0],s=l[1],f=_t(X(yr()(t)),2),d=f[0],h=f[1],p=_t(X(yr()(t)),2),v=p[0],y=p[1],g=_t(X(Co[0].value),2),_=g[0],b=g[1],D=function(e){h(e),s(!1)};return te((function(){v.format()!==yr()(t).format()&&a(v.format(o))}),[v]),fr("div",{className:"vm-calendar",children:["date"===_&&fr(_o,{viewDate:d,onChangeViewDate:D,toggleDisplayYears:function(){s((function(e){return!e}))},displayYears:c}),"date"===_&&fr(m,{children:[!c&&fr(Do,{viewDate:d,selectDate:v,onChangeSelectDate:function(e){y(e),r&&b("time")}}),c&&fr(wo,{viewDate:d,onChangeViewDate:D})]}),"time"===_&&fr(ko,{selectDate:v,onChangeTime:function(e){var t=_t(e.split(":"),3),n=t[0],r=t[1],i=t[2];y((function(e){return e.set("hour",+n).set("minute",+r).set("second",+i)}))},onClose:function(){u&&u()}}),r&&fr("div",{className:"vm-calendar__tabs",children:fr(Li,{activeItem:_,items:Co,onChange:function(e){b(e)},indicatorPlacement:"top"})})]})},Ao=Ce((function(e,t){var n=e.date,r=e.targetRef,i=e.format,o=void 0===i?xr:i,a=e.timepicker,u=e.onChange,l=_t(X(!1),2),c=l[0],s=l[1],f=oe((function(){return n?yr()(n):yr()()}),[n]),d=function(){s((function(e){return!e}))},h=function(){s(!1)},p=function(e){"Escape"!==e.key&&"Enter"!==e.key||h()};return te((function(){var e;return null===(e=r.current)||void 0===e||e.addEventListener("click",d),function(){var e;null===(e=r.current)||void 0===e||e.removeEventListener("click",d)}}),[r]),te((function(){return window.addEventListener("keyup",p),function(){window.removeEventListener("keyup",p)}}),[]),fr(m,{children:fr(ho,{open:c,buttonRef:r,placement:"bottom-right",onClose:h,children:fr("div",{ref:t,children:fr(Eo,{date:f,format:o,timepicker:a,onChange:function(e){a||h(),u(e)},onClose:h})})})})})),So=Ao,Fo=function(){var e=re(null),t=go(document.body),n=oe((function(){return t.width>1120}),[t]),r=_t(X(),2),i=r[0],o=r[1],a=_t(X(),2),u=a[0],l=a[1],c=oe((function(){return yr()(u).format(xr)}),[u]),s=oe((function(){return yr()(i).format(xr)}),[i]),f=Wr(),d=f.period,h=d.end,p=d.start,v=f.relativeTime,y=Qr(),g=er();te((function(){o(Mr(Pr(h)))}),[h]),te((function(){l(Mr(Pr(p)))}),[p]);var _=oe((function(){return{start:yr()(Pr(p)).format(xr),end:yr()(Pr(h)).format(xr)}}),[p,h]),b=oe((function(){return v&&"none"!==v?v.replace(/_/g," "):"".concat(_.start," - ").concat(_.end)}),[v,_]),D=re(null),w=re(null),x=re(null),k=re(null),C=_t(X(!1),2),E=C[0],A=C[1],S=re(null),F=function(){A(!1)};return fo(e,(function(e){var t,n,r=e.target,i=(null===D||void 0===D?void 0:D.current)&&D.current.contains(r),o=(null===w||void 0===w?void 0:w.current)&&w.current.contains(r),a=(null===x||void 0===x?void 0:x.current)&&(null===x||void 0===x||null===(t=x.current)||void 0===t?void 0:t.contains(r)),u=(null===k||void 0===k?void 0:k.current)&&(null===k||void 0===k||null===(n=k.current)||void 0===n?void 0:n.contains(r));i||o||a||u||F()})),fr(m,{children:[fr("div",{ref:S,children:fr(po,{title:"Time range controls",children:fr(so,{className:g?"":"vm-header-button",variant:"contained",color:"primary",startIcon:fr(mi,{}),onClick:function(){A((function(e){return!e}))},children:n&&fr("span",{children:b})})})}),fr(ho,{open:E,buttonRef:S,placement:"bottom-right",onClose:F,clickOutside:!1,children:fr("div",{className:"vm-time-selector",ref:e,children:[fr("div",{className:"vm-time-selector-left",children:[fr("div",{className:"vm-time-selector-left-inputs",children:[fr("div",{className:"vm-time-selector-left-inputs__date",ref:D,children:[fr("label",{children:"From:"}),fr("span",{children:c}),fr(yi,{}),fr(So,{ref:x,date:u||"",onChange:function(e){return l(e)},targetRef:D,timepicker:!0})]}),fr("div",{className:"vm-time-selector-left-inputs__date",ref:w,children:[fr("label",{children:"To:"}),fr("span",{children:s}),fr(yi,{}),fr(So,{ref:k,date:i||"",onChange:function(e){return o(e)},targetRef:w,timepicker:!0})]})]}),fr(so,{variant:"text",startIcon:fr(gi,{}),onClick:function(){return y({type:"RUN_QUERY_TO_NOW"})},children:"switch to now"}),fr("div",{className:"vm-time-selector-left__controls",children:[fr(so,{color:"error",variant:"outlined",onClick:function(){o(Mr(Pr(h))),l(Mr(Pr(p))),A(!1)},children:"Cancel"}),fr(so,{color:"primary",onClick:function(){return u&&i&&y({type:"SET_PERIOD",payload:{from:new Date(u),to:new Date(i)}}),void A(!1)},children:"Apply"})]})]}),fr(yo,{relativeTime:v||"",setDuration:function(e){var t=e.duration,n=e.until,r=e.id;y({type:"SET_RELATIVE_TIME",payload:{duration:t,until:n,id:r}}),A(!1)}})]})})]})};!function(e){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"}(xo||(xo={}));var No=function(e){var t=e.label,n=e.value,r=e.type,i=void 0===r?"text":r,o=e.error,a=void 0===o?"":o,u=e.endIcon,l=e.startIcon,c=e.disabled,s=void 0!==c&&c,f=e.autofocus,d=void 0!==f&&f,h=e.helperText,p=e.onChange,v=e.onEnter,m=e.onKeyDown,y=re(null),g=re(null),_=oe((function(){return"textarea"===i?g:y}),[i]),b=Ti()({"vm-text-field__input":!0,"vm-text-field__input_error":a,"vm-text-field__input_icon-start":l,"vm-text-field__input_disabled":s,"vm-text-field__input_textarea":"textarea"===i}),D=function(e){m&&m(e),"Enter"!==e.key||e.shiftKey||(e.preventDefault(),v&&v())},w=function(e){s||p&&p(e.target.value)};return te((function(){var e;d&&(null===_||void 0===_||null===(e=_.current)||void 0===e?void 0:e.focus)&&_.current.focus()}),[_,d]),fr("label",{className:Ti()({"vm-text-field":!0,"vm-text-field_textarea":"textarea"===i}),"data-replicated-value":n,children:[l&&fr("div",{className:"vm-text-field__icon-start",children:l}),u&&fr("div",{className:"vm-text-field__icon-end",children:u}),"textarea"===i?fr("textarea",{className:b,disabled:s,ref:g,value:n,onInput:w,onKeyDown:D,rows:1}):fr("input",{className:b,disabled:s,ref:y,value:n,onInput:w,onKeyDown:D,type:i}),t&&fr("span",{className:"vm-text-field__label",children:t}),fr("span",{className:"vm-text-field__error","data-show":!!a,children:a}),h&&!a&&fr("span",{className:"vm-text-field__helper-text",children:h})]})},Oo=function(e){var t;try{t=new URL(e)}catch(g){return!1}return"http:"===t.protocol||"https:"===t.protocol},To=function(e){var t=e.setServer,n=e.onEnter,r=hr().serverUrl,i=_t(X(""),2),o=i[0],a=i[1],u=_t(X(r),2),l=u[0],c=u[1];return fr(No,{autofocus:!0,label:"Server URL",value:l,error:o,onChange:function(e){var n=e||"";c(n),t(n),a(""),n||a(xo.emptyServer),Oo(n)||a(xo.validServer)},onEnter:function(){n(l)}})},Bo=function(e){var t=e.title,n=e.children,r=e.onClose,i=function(e){"Escape"===e.key&&r()};return te((function(){return window.addEventListener("keyup",i),function(){window.removeEventListener("keyup",i)}}),[]),mt.createPortal(fr("div",{className:"vm-modal",onMouseDown:r,children:fr("div",{className:"vm-modal-content",children:[fr("div",{className:"vm-modal-content-header",children:[t&&fr("div",{className:"vm-modal-content-header__title",children:t}),fr("div",{className:"vm-modal-header__close",children:fr(so,{variant:"text",size:"small",onClick:r,children:fr(ai,{})})})]}),fr("div",{className:"vm-modal-content-body",onMouseDown:function(e){e.stopPropagation()},children:n})]})}),document.body)},Mo="Setting Server URL",Lo=function(){var e=hr().serverUrl,t=pr(),n=_t(X(e),2),r=n[0],i=n[1],o=function(e){t({type:"SET_SERVER",payload:e||r}),c()},a=_t(X(!1),2),u=a[0],l=a[1],c=function(){return l(!1)};return fr(m,{children:[fr(po,{title:Mo,children:fr(so,{className:"vm-header-button",variant:"contained",color:"primary",startIcon:fr(oi,{}),onClick:function(){return l(!0)}})}),u&&fr(Bo,{title:Mo,onClose:c,children:fr("div",{className:"vm-server-configurator",children:[fr("div",{className:"vm-server-configurator__input",children:fr(To,{setServer:i,onEnter:o})}),fr("div",{className:"vm-server-configurator__footer",children:[fr(so,{variant:"outlined",color:"error",onClick:c,children:"Cancel"}),fr(so,{variant:"contained",onClick:function(){o()},children:"apply"})]})]})})]})},Po={windows:"Windows",mac:"Mac OS",linux:"Linux"},$o=(Object.values(Po).find((function(e){return navigator.userAgent.indexOf(e)>=0}))||"unknown")===Po.mac?"Cmd":"Ctrl",Ro=[{title:"Query",list:[{keys:["Enter"],description:"Run"},{keys:["Shift","Enter"],description:"Multi-line queries"},{keys:[$o,"Arrow Up"],description:"Previous command from the Query history"},{keys:[$o,"Arrow Down"],description:"Next command from the Query history"}]},{title:"Graph",list:[{keys:[$o,"Scroll Up"],description:"Zoom in"},{keys:[$o,"Scroll Down"],description:"Zoom out"},{keys:[$o,"Click and Drag"],description:"Move the graph left/right"}]},{title:"Legend",list:[{keys:["Mouse Click"],description:"Select series"},{keys:[$o,"Mouse Click"],description:"Toggle multiple series"}]}],Io=function(){var e=_t(X(!1),2),t=e[0],n=e[1],r=er();return fr(m,{children:[fr(po,{title:"Shortcut keys",placement:"bottom-center",children:fr(so,{className:r?"":"vm-header-button",variant:"contained",color:"primary",startIcon:fr(_i,{}),onClick:function(){n(!0)}})}),t&&fr(Bo,{title:"Shortcut keys",onClose:function(){n(!1)},children:fr("div",{className:"vm-shortcuts",children:Ro.map((function(e){return fr("div",{className:"vm-shortcuts-section",children:[fr("h3",{className:"vm-shortcuts-section__title",children:e.title}),fr("div",{className:"vm-shortcuts-section-list",children:e.list.map((function(e){return fr("div",{className:"vm-shortcuts-section-list-item",children:[fr("div",{className:"vm-shortcuts-section-list-item__key",children:e.keys.map((function(t,n){return fr(m,{children:[fr("code",{children:t},t),n!==e.keys.length-1?"+":""]})}))}),fr("p",{className:"vm-shortcuts-section-list-item__description",children:e.description})]},e.keys.join("+"))}))})]},e.title)}))})})]})},jo=function(){var e=er(),t=re(null),n=Ki().date,r=Xi(),i=oe((function(){return yr()(n).format(wr)}),[n]);return fr("div",{children:[fr("div",{ref:t,children:fr(po,{title:"Date control",children:fr(so,{className:e?"":"vm-header-button",variant:"contained",color:"primary",startIcon:fr(yi,{}),children:i})})}),fr(So,{date:n||"",format:wr,onChange:function(e){r({type:"SET_DATE",payload:e})},targetRef:t})]})},zo=function(){var e=Bi("color-primary"),t=er(),n=Xn().headerStyles,r=(n=void 0===n?{}:n).background,i=void 0===r?t?"#FFF":e:r,o=n.color,a=void 0===o?t?e:"#FFF":o,u=An(),l=En(),c=l.search,s=l.pathname,f=oe((function(){return[{label:"Custom panel",value:Jn.home},{label:"Dashboards",value:Jn.dashboards,hide:t},{label:"Cardinality",value:Jn.cardinality},{label:"Top queries",value:Jn.topQueries},{label:"Trace analyzer",value:Jn.trace}]}),[t]),d=_t(X(s),2),h=d[0],p=d[1],v=oe((function(){return(Gn[s]||{}).header||{}}),[s]),m=function(e){u({pathname:e,search:c})};return te((function(){p(s)}),[s]),fr("header",{className:Ti()({"vm-header":!0,"vm-header_app":t}),style:{background:i,color:a},children:[!t&&fr("div",{className:"vm-header-logo",style:{color:a},children:[fr("div",{className:"vm-header-logo__icon",onClick:function(){m(Jn.home),ar({}),window.location.reload()},children:fr(ii,{})}),fr("a",{className:"vm-header-logo__issue",target:"_blank",href:"https://github.com/VictoriaMetrics/VictoriaMetrics/issues/new",rel:"noreferrer",children:"create an issue"})]}),fr("div",{className:"vm-header-nav",children:fr(Li,{activeItem:h,items:f.filter((function(e){return!e.hide})),color:a,onChange:function(e){p(e),u(e)}})}),fr("div",{className:"vm-header__settings",children:[(null===v||void 0===v?void 0:v.timeSelector)&&fr(Fo,{}),(null===v||void 0===v?void 0:v.cardinalityDatePicker)&&fr(jo,{}),(null===v||void 0===v?void 0:v.executionControls)&&fr(mo,{}),(null===v||void 0===v?void 0:v.globalSettings)&&!t&&fr(Lo,{}),fr(Io,{})]})]})},Uo=function(){var e=er();return fr("section",{className:"vm-container",children:[fr(zo,{}),fr("div",{className:Ti()({"vm-container-body":!0,"vm-container-body_app":e}),children:fr($n,{})})]})};function Ho(e,t){var n="undefined"!==typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(!n){if(Array.isArray(e)||(n=gt(e))||t&&e&&"number"===typeof e.length){n&&(e=n);var r=0,i=function(){};return{s:i,n:function(){return r>=e.length?{done:!0}:{done:!1,value:e[r++]}},e:function(e){throw e},f:i}}throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}var o,a=!0,u=!1;return{s:function(){n=n.call(e)},n:function(){var e=n.next();return a=e.done,e},e:function(e){u=!0,o=e},f:function(){try{a||null==n.return||n.return()}finally{if(u)throw o}}}}var Yo,Vo,qo="u-off",Wo="u-label",Qo="width",Go="height",Jo="top",Zo="bottom",Ko="left",Xo="right",ea="#000",ta="#0000",na="mousemove",ra="mousedown",ia="mouseup",oa="mouseenter",aa="mouseleave",ua="dblclick",la="change",ca="dppxchange",sa="undefined"!=typeof window,fa=sa?document:null,da=sa?window:null,ha=sa?navigator:null;function pa(e,t){if(null!=t){var n=e.classList;!n.contains(t)&&n.add(t)}}function va(e,t){var n=e.classList;n.contains(t)&&n.remove(t)}function ma(e,t,n){e.style[t]=n+"px"}function ya(e,t,n,r){var i=fa.createElement(e);return null!=t&&pa(i,t),null!=n&&n.insertBefore(i,r),i}function ga(e,t){return ya("div",e,t)}var _a=new WeakMap;function ba(e,t,n,r,i){var o="translate("+t+"px,"+n+"px)";o!=_a.get(e)&&(e.style.transform=o,_a.set(e,o),t<0||n<0||t>r||n>i?pa(e,qo):va(e,qo))}var Da=new WeakMap;function wa(e,t,n){var r=t+n;r!=Da.get(e)&&(Da.set(e,r),e.style.background=t,e.style.borderColor=n)}var xa=new WeakMap;function ka(e,t,n,r){var i=t+""+n;i!=xa.get(e)&&(xa.set(e,i),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)}var Ca={passive:!0},Ea=Kn(Kn({},Ca),{},{capture:!0});function Aa(e,t,n,r){t.addEventListener(e,n,r?Ea:Ca)}function Sa(e,t,n,r){t.removeEventListener(e,n,r?Ea:Ca)}function Fa(e,t,n,r){var i;n=n||0;for(var o=(r=r||t.length-1)<=2147483647;r-n>1;)t[i=o?n+r>>1:Qa((n+r)/2)]=t&&i<=n;i+=r)if(null!=e[i])return i;return-1}function Oa(e,t,n,r){var i=iu,o=-iu;if(1==r)i=e[t],o=e[n];else if(-1==r)i=e[n],o=e[t];else for(var a=t;a<=n;a++)null!=e[a]&&(i=Za(i,e[a]),o=Ka(o,e[a]));return[i,o]}function Ta(e,t,n){for(var r=iu,i=-iu,o=t;o<=n;o++)e[o]>0&&(r=Za(r,e[o]),i=Ka(i,e[o]));return[r==iu?1:r,i==-iu?10:i]}sa&&function e(){var t=devicePixelRatio;Yo!=t&&(Yo=t,Vo&&Sa(la,Vo,e),Vo=matchMedia("(min-resolution: ".concat(Yo-.001,"dppx) and (max-resolution: ").concat(Yo+.001,"dppx)")),Aa(la,Vo,e),da.dispatchEvent(new CustomEvent(ca)))}();var Ba=[0,0];function Ma(e,t,n,r){return Ba[0]=n<0?mu(e,-n):e,Ba[1]=r<0?mu(t,-r):t,Ba}function La(e,t,n,r){var i,o,a,u=eu(e),l=10==n?tu:nu;return e==t&&(-1==u?(e*=n,t/=n):(e/=n,t*=n)),r?(i=Qa(l(e)),o=Ja(l(t)),e=(a=Ma(Xa(n,i),Xa(n,o),i,o))[0],t=a[1]):(i=Qa(l(Wa(e))),o=Qa(l(Wa(t))),e=vu(e,(a=Ma(Xa(n,i),Xa(n,o),i,o))[0]),t=pu(t,a[1])),[e,t]}function Pa(e,t,n,r){var i=La(e,t,n,r);return 0==e&&(i[0]=0),0==t&&(i[1]=0),i}var $a={mode:3,pad:.1},Ra={pad:0,soft:null,mode:0},Ia={min:Ra,max:Ra};function ja(e,t,n,r){return Cu(n)?Ua(e,t,n):(Ra.pad=n,Ra.soft=r?0:null,Ra.mode=r?3:0,Ua(e,t,Ia))}function za(e,t){return null==e?t:e}function Ua(e,t,n){var r=n.min,i=n.max,o=za(r.pad,0),a=za(i.pad,0),u=za(r.hard,-iu),l=za(i.hard,iu),c=za(r.soft,iu),s=za(i.soft,-iu),f=za(r.mode,0),d=za(i.mode,0),h=t-e;h<1e-9&&(h=0,0!=e&&0!=t||(h=1e-9,2==f&&c!=iu&&(o=0),2==d&&s!=-iu&&(a=0)));var p=h||Wa(t)||1e3,v=tu(p),m=Xa(10,Qa(v)),y=mu(vu(e-p*(0==h?0==e?.1:1:o),m/10),9),g=e>=c&&(1==f||3==f&&y<=c||2==f&&y>=c)?c:iu,_=Ka(u,y=g?g:Za(g,y)),b=mu(pu(t+p*(0==h?0==t?.1:1:a),m/10),9),D=t<=s&&(1==d||3==d&&b>=s||2==d&&b<=s)?s:-iu,w=Za(l,b>D&&t<=D?D:Ka(D,b));return _==w&&0==_&&(w=100),[_,w]}var Ha=new Intl.NumberFormat(sa?ha.language:"en-US"),Ya=function(e){return Ha.format(e)},Va=Math,qa=Va.PI,Wa=Va.abs,Qa=Va.floor,Ga=Va.round,Ja=Va.ceil,Za=Va.min,Ka=Va.max,Xa=Va.pow,eu=Va.sign,tu=Va.log10,nu=Va.log2,ru=function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:1;return Va.asinh(e/t)},iu=1/0;function ou(e){return 1+(0|tu((e^e>>31)-(e>>31)))}function au(e,t){return Ga(e/t)*t}function uu(e,t,n){return Za(Ka(e,t),n)}function lu(e){return"function"==typeof e?e:function(){return e}}var cu=function(e){return e},su=function(e,t){return t},fu=function(e){return null},du=function(e){return!0},hu=function(e,t){return e==t};function pu(e,t){return Ja(e/t)*t}function vu(e,t){return Qa(e/t)*t}function mu(e,t){return Ga(e*(t=Math.pow(10,t)))/t}var yu=new Map;function gu(e){return((""+e).split(".")[1]||"").length}function _u(e,t,n,r){for(var i=[],o=r.map(gu),a=t;a=0&&a>=0?0:u)+(a>=o[c]?0:o[c]),d=mu(s,f);i.push(d),yu.set(d,f)}return i}var bu={},Du=[],wu=[null,null],xu=Array.isArray;function ku(e){return"string"==typeof e}function Cu(e){var t=!1;if(null!=e){var n=e.constructor;t=null==n||n==Object}return t}function Eu(e){return null!=e&&"object"==typeof e}var Au=Object.getPrototypeOf(Uint8Array);function Su(e){var t,n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:Cu;if(xu(e)){var r=e.find((function(e){return null!=e}));if(xu(r)||n(r)){t=Array(e.length);for(var i=0;io){for(r=a-1;r>=0&&null==e[r];)e[r--]=null;for(r=a+1;r12?t-12:t},AA:function(e){return e.getHours()>=12?"PM":"AM"},aa:function(e){return e.getHours()>=12?"pm":"am"},a:function(e){return e.getHours()>=12?"p":"a"},mm:function(e){return Ru(e.getMinutes())},m:function(e){return e.getMinutes()},ss:function(e){return Ru(e.getSeconds())},s:function(e){return e.getSeconds()},fff:function(e){return((t=e.getMilliseconds())<10?"00":t<100?"0":"")+t;var t}};function ju(e,t){t=t||$u;for(var n,r=[],i=/\{([a-z]+)\}|[^{]+/gi;n=i.exec(e);)r.push("{"==n[0][0]?Iu[n[1]]:n[0]);return function(e){for(var n="",i=0;i=a,v=f>=o&&f=i?i:f,N=_+(Qa(c)-Qa(y))+pu(y-_,F);h.push(N);for(var O=t(N),T=O.getHours()+O.getMinutes()/n+O.getSeconds()/r,B=f/r,M=d/u.axes[l]._space;!((N=mu(N+f,1==e?0:3))>s);)if(B>1){var L=Qa(mu(T+B,6))%24,P=t(N).getHours()-L;P>1&&(P=-1),T=(T+B)%24,mu(((N-=P*r)-h[h.length-1])/f,3)*M>=.7&&h.push(N)}else h.push(N)}return h}}]}var ol=_t(il(1),3),al=ol[0],ul=ol[1],ll=ol[2],cl=_t(il(.001),3),sl=cl[0],fl=cl[1],dl=cl[2];function hl(e,t){return e.map((function(e){return e.map((function(n,r){return 0==r||8==r||null==n?n:t(1==r||0==e[8]?n:e[1]+n)}))}))}function pl(e,t){return function(n,r,i,o,a){var u,l,c,s,f,d,h=t.find((function(e){return a>=e[0]}))||t[t.length-1];return r.map((function(t){var n=e(t),r=n.getFullYear(),i=n.getMonth(),o=n.getDate(),a=n.getHours(),p=n.getMinutes(),v=n.getSeconds(),m=r!=u&&h[2]||i!=l&&h[3]||o!=c&&h[4]||a!=s&&h[5]||p!=f&&h[6]||v!=d&&h[7]||h[1];return u=r,l=i,c=o,s=a,f=p,d=v,m(n)}))}}function vl(e,t,n){return new Date(e,t,n)}function ml(e,t){return t(e)}_u(2,-53,53,[1]);function yl(e,t){return function(n,r){return t(e(r))}}var gl={show:!0,live:!0,isolate:!1,markers:{show:!0,width:2,stroke:function(e,t){var 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:[]};var _l=[0,0];function bl(e,t,n){return function(e){0==e.button&&n(e)}}function Dl(e,t,n){return n}var wl={show:!0,x:!0,y:!0,lock:!1,move:function(e,t,n){return _l[0]=t,_l[1]=n,_l},points:{show:function(e,t){var n=e.cursor.points,r=ga(),i=n.size(e,t);ma(r,Qo,i),ma(r,Go,i);var o=i/-2;ma(r,"marginLeft",o),ma(r,"marginTop",o);var a=n.width(e,t,i);return a&&ma(r,"borderWidth",a),r},size:function(e,t){return Ul(e.series[t].points.width,1)},width:0,stroke:function(e,t){var n=e.series[t].points;return n._stroke||n._fill},fill:function(e,t){var n=e.series[t].points;return n._fill||n._stroke}},bind:{mousedown:bl,mouseup:bl,click:bl,dblclick:bl,mousemove:Dl,mouseleave:Dl,mouseenter:Dl},drag:{setScale:!0,x:!0,y:!1,dist:0,uni:null,_x:!1,_y:!1},focus:{prox:-1},left:-10,top:-10,idx:null,dataIdx:function(e,t,n){return n},idxs:null},xl={show:!0,stroke:"rgba(0,0,0,0.07)",width:2},kl=Fu({},xl,{filter:su}),Cl=Fu({},kl,{size:10}),El=Fu({},xl,{show:!1}),Al='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"',Sl="bold "+Al,Fl={show:!0,scale:"x",stroke:ea,space:50,gap:5,size:50,labelGap:0,labelSize:30,labelFont:Sl,side:2,grid:kl,ticks:Cl,border:El,font:Al,rotate:0},Nl={show:!0,scale:"x",auto:!1,sorted:1,min:iu,max:-iu,idxs:[]};function Ol(e,t,n,r,i){return t.map((function(e){return null==e?"":Ya(e)}))}function Tl(e,t,n,r,i,o,a){for(var u=[],l=yu.get(i)||0,c=n=a?n:mu(pu(n,i),l);c<=r;c=mu(c+i,l))u.push(Object.is(c,-0)?0:c);return u}function Bl(e,t,n,r,i,o,a){var u=[],l=e.scales[e.axes[t].scale].log,c=Qa((10==l?tu:nu)(n));i=Xa(l,c),c<0&&(i=mu(i,-c));var s=n;do{u.push(s),(s=mu(s+i,yu.get(i)))>=i*l&&(i=s)}while(s<=r);return u}function Ml(e,t,n,r,i,o,a){var u=e.scales[e.axes[t].scale].asinh,l=r>u?Bl(e,t,Ka(u,n),r,i):[u],c=r>=0&&n<=0?[0]:[];return(n<-u?Bl(e,t,Ka(u,-r),-n,i):[u]).reverse().map((function(e){return-e})).concat(c,l)}var Ll=/./,Pl=/[12357]/,$l=/[125]/,Rl=/1/;function Il(e,t,n,r,i){var o=e.axes[n],a=o.scale,u=e.scales[a];if(3==u.distr&&2==u.log)return t;var l=e.valToPos,c=o._space,s=l(10,a),f=l(9,a)-s>=c?Ll:l(7,a)-s>=c?Pl:l(5,a)-s>=c?$l:Rl;return t.map((function(e){return 4==u.distr&&0==e||f.test(e)?e:null}))}function jl(e,t){return null==t?"":Ya(t)}var zl={show:!0,scale:"y",stroke:ea,space:30,gap:5,size:50,labelGap:0,labelSize:30,labelFont:Sl,side:3,grid:kl,ticks:Cl,border:El,font:Al,rotate:0};function Ul(e,t){return mu((3+2*(e||1))*t,3)}var Hl={scale:null,auto:!0,sorted:0,min:iu,max:-iu},Yl={show:!0,auto:!0,sorted:0,alpha:1,facets:[Fu({},Hl,{scale:"x"}),Fu({},Hl,{scale:"y"})]},Vl={scale:"y",auto:!0,sorted:0,show:!0,spanGaps:!1,gaps:function(e,t,n,r,i){return i},alpha:1,points:{show:function(e,t){var n=e.series[0],r=n.scale,i=n.idxs,o=e._data[0],a=e.valToPos(o[i[0]],r,!0),u=e.valToPos(o[i[1]],r,!0),l=Wa(u-a)/(e.series[t].points.space*Yo);return i[1]-i[0]<=l},filter:null},values:null,min:iu,max:-iu,idxs:[],path:null,clip:null};function ql(e,t,n,r,i){return n/10}var Wl={time:!0,auto:!0,distr:1,log:10,asinh:1,min:null,max:null,dir:1,ori:0},Ql=Fu({},Wl,{time:!1,ori:1}),Gl={};function Jl(e,t){var n=Gl[e];return n||(n={key:e,plots:[],sub:function(e){n.plots.push(e)},unsub:function(e){n.plots=n.plots.filter((function(t){return t!=e}))},pub:function(e,t,r,i,o,a,u){for(var l=0;l0){a=new Path2D;for(var u=0==t?cc:sc,l=n,c=0;cs[0]){var f=s[0]-l;f>0&&u(a,l,r,f,r+o),l=s[1]}}var d=n+i-l;d>0&&u(a,l,r,d,r+o)}return a}function nc(e,t,n,r,i,o,a){for(var u=[],l=1==i?n:r;l>=n&&l<=r;l+=i){if(null===t[l]){var c=l,s=l;if(1==i)for(;++l<=r&&null===t[l];)s=l;else for(;--l>=n&&null===t[l];)s=l;var f=o(e[c]),d=s==c?f:o(e[s]);f=a<=0?o(e[c-i]):f,(d=a>=0?o(e[s+i]):d)>=f&&u.push([f,d])}}return u}function rc(e){return 0==e?cu:1==e?Ga:function(t){return au(t,e)}}function ic(e){var t=0==e?oc:ac,n=0==e?function(e,t,n,r,i,o){e.arcTo(t,n,r,i,o)}:function(e,t,n,r,i,o){e.arcTo(n,t,i,r,o)},r=0==e?function(e,t,n,r,i){e.rect(t,n,r,i)}:function(e,t,n,r,i){e.rect(n,t,i,r)};return function(e,i,o,a,u){var l=arguments.length>5&&void 0!==arguments[5]?arguments[5]:0;0==l?r(e,i,o,a,u):(l=Za(l,a/2,u/2),t(e,i+l,o),n(e,i+a,o,i+a,o+u,l),n(e,i+a,o+u,i,o+u,l),n(e,i,o+u,i,o,l),n(e,i,o,i+a,o,l),e.closePath())}}var oc=function(e,t,n){e.moveTo(t,n)},ac=function(e,t,n){e.moveTo(n,t)},uc=function(e,t,n){e.lineTo(t,n)},lc=function(e,t,n){e.lineTo(n,t)},cc=ic(0),sc=ic(1),fc=function(e,t,n,r,i,o){e.arc(t,n,r,i,o)},dc=function(e,t,n,r,i,o){e.arc(n,t,r,i,o)},hc=function(e,t,n,r,i,o,a){e.bezierCurveTo(t,n,r,i,o,a)},pc=function(e,t,n,r,i,o,a){e.bezierCurveTo(n,t,i,r,a,o)};function vc(e){return function(e,t,n,r,i){return Zl(e,t,(function(t,o,a,u,l,c,s,f,d,h,p){var v,m,y=t.pxRound,g=t.points;0==u.ori?(v=oc,m=fc):(v=ac,m=dc);var _=mu(g.width*Yo,3),b=(g.size-g.width)/2*Yo,D=mu(2*b,3),w=new Path2D,x=new Path2D,k=e.bbox,C=k.left,E=k.top,A=k.width,S=k.height;cc(x,C-D,E-D,A+2*D,S+2*D);var F=function(e){if(null!=a[e]){var t=y(c(o[e],u,h,f)),n=y(s(a[e],l,p,d));v(w,t+b,n),m(w,t,n,b,0,2*qa)}};if(i)i.forEach(F);else for(var N=n;N<=r;N++)F(N);return{stroke:_>0?w:null,fill:w,clip:x,flags:3}}))}}function mc(e){return function(t,n,r,i,o,a){r!=i&&(o!=r&&a!=r&&e(t,n,r),o!=i&&a!=i&&e(t,n,i),e(t,n,a))}}var yc=mc(uc),gc=mc(lc);function _c(e){var t=za(null===e||void 0===e?void 0:e.alignGaps,0);return function(e,n,r,i){return Zl(e,n,(function(o,a,u,l,c,s,f,d,h,p,v){var m,y,g=o.pxRound,_=function(e){return g(s(e,l,p,d))},b=function(e){return g(f(e,c,v,h))};0==l.ori?(m=uc,y=yc):(m=lc,y=gc);for(var D,w,x,k=l.dir*(0==l.ori?1:-1),C={stroke:new Path2D,fill:null,clip:null,band:null,gaps:null,flags:1},E=C.stroke,A=iu,S=-iu,F=_(a[1==k?r:i]),N=Na(u,r,i,1*k),O=Na(u,r,i,-1*k),T=_(a[N]),B=_(a[O]),M=1==k?r:i;M>=r&&M<=i;M+=k){var L=_(a[M]);L==F?null!=u[M]&&(w=b(u[M]),A==iu&&(m(E,L,w),D=w),A=Za(w,A),S=Ka(w,S)):(A!=iu&&(y(E,F,A,S,D,w),x=F),null!=u[M]?(m(E,L,w=b(u[M])),A=S=D=w):(A=iu,S=-iu),F=L)}A!=iu&&A!=S&&x!=F&&y(E,F,A,S,D,w);var P=_t(Kl(e,n),2),$=P[0],R=P[1];if(null!=o.fill||0!=$){var I=C.fill=new Path2D(E),j=b(o.fillTo(e,n,o.min,o.max,$));m(I,B,j),m(I,T,j)}if(!o.spanGaps){var z,U=[];(z=U).push.apply(z,bt(nc(a,u,r,i,k,_,t))),C.gaps=U=o.gaps(e,n,r,i,U),C.clip=tc(U,l.ori,d,h,p,v)}return 0!=R&&(C.band=2==R?[ec(e,n,r,i,E,-1),ec(e,n,r,i,E,1)]:ec(e,n,r,i,E,R)),C}))}}function bc(e,t,n,r,i,o){var a=e.length;if(a<2)return null;var u=new Path2D;if(n(u,e[0],t[0]),2==a)r(u,e[1],t[1]);else{for(var l=Array(a),c=Array(a-1),s=Array(a-1),f=Array(a-1),d=0;d0!==c[h]>0?l[h]=0:(l[h]=3*(f[h-1]+f[h])/((2*f[h]+f[h-1])/c[h-1]+(f[h]+2*f[h-1])/c[h]),isFinite(l[h])||(l[h]=0));l[a-1]=c[a-2];for(var p=0;p=i&&o+(l<5?yu.get(l):0)<=17)return[l,c]}while(++u0?e:t.clamp(r,e,t.min,t.max,t.key)):4==t.distr?ru(e,t.asinh):e)-t._min)/(t._max-t._min)}function a(e,t,n,r){var i=o(e,t);return r+n*(-1==t.dir?1-i:i)}function u(e,t,n,r){var i=o(e,t);return r+n*(-1==t.dir?i:1-i)}function l(e,t,n,r){return 0==t.ori?a(e,t,n,r):u(e,t,n,r)}r.valToPosH=a,r.valToPosV=u;var c=!1;r.status=0;var s=r.root=ga("uplot");(null!=e.id&&(s.id=e.id),pa(s,e.class),e.title)&&(ga("u-title",s).textContent=e.title);var f=ya("canvas"),d=r.ctx=f.getContext("2d"),h=ga("u-wrap",s),p=r.under=ga("u-under",h);h.appendChild(f);var v=r.over=ga("u-over",h),m=+za((e=Su(e)).pxAlign,1),y=rc(m);(e.plugins||[]).forEach((function(t){t.opts&&(e=t.opts(r,e)||e)}));var g=e.ms||.001,_=r.series=1==i?Cc(e.series||[],Nl,Vl,!1):function(e,t){return e.map((function(e,n){return 0==n?null:Fu({},t,e)}))}(e.series||[null],Yl),b=r.axes=Cc(e.axes||[],Fl,zl,!0),D=r.scales={},w=r.bands=e.bands||[];w.forEach((function(e){e.fill=lu(e.fill||null),e.dir=za(e.dir,-1)}));var x=2==i?_[1].facets[0].scale:_[0].scale,k={axes:function(){for(var e=function(e){var t=b[e];if(!t.show||!t._show)return"continue";var n=t.side,i=n%2,o=void 0,a=void 0,u=t.stroke(r,e),c=0==n||3==n?-1:1;if(t.label){var s=t.labelGap*c,f=Ga((t._lpos+s)*Yo);Ze(t.labelFont[0],u,"center",2==n?Jo:Zo),d.save(),1==i?(o=a=0,d.translate(f,Ga(de+pe/2)),d.rotate((3==n?-qa:qa)/2)):(o=Ga(fe+he/2),a=f),d.fillText(t.label,o,a),d.restore()}var h=_t(t._found,2),p=h[0],v=h[1];if(0==v)return"continue";var m=D[t.scale],g=0==i?he:pe,_=0==i?fe:de,w=Ga(t.gap*Yo),x=t._splits,k=2==m.distr?x.map((function(e){return qe[e]})):x,C=2==m.distr?qe[x[1]]-qe[x[0]]:p,E=t.ticks,A=t.border,S=E.show?Ga(E.size*Yo):0,F=t._rotate*-qa/180,N=y(t._pos*Yo),O=N+(S+w)*c;a=0==i?O:0,o=1==i?O:0,Ze(t.font[0],u,1==t.align?Ko:2==t.align?Xo:F>0?Ko:F<0?Xo:0==i?"center":3==n?Xo:Ko,F||1==i?"middle":2==n?Jo:Zo);for(var T=1.5*t.font[1],B=x.map((function(e){return y(l(e,m,g,_))})),M=t._values,L=0;L0&&(_.forEach((function(e,n){if(n>0&&e.show&&null==e._paths){var i=function(e){var t=uu(He-1,0,Ne-1),n=uu(Ye+1,0,Ne-1);for(;null==e[t]&&t>0;)t--;for(;null==e[n]&&n0&&e.show){je!=e.alpha&&(d.globalAlpha=je=e.alpha),Xe(t,!1),e._paths&&et(t,!1),Xe(t,!0);var n=e.points.show(r,t,He,Ye),i=e.points.filter(r,t,n,e._paths?e._paths.gaps:null);(n||i)&&(e.points._paths=e.points.paths(r,t,He,Ye,i),et(t,!0)),1!=je&&(d.globalAlpha=je=1),on("drawSeries",t)}})))}},C=(e.drawOrder||["axes","series"]).map((function(e){return k[e]}));function E(t){var n=D[t];if(null==n){var r=(e.scales||bu)[t]||bu;if(null!=r.from)E(r.from),D[t]=Fu({},D[r.from],r,{key:t});else{(n=D[t]=Fu({},t==x?Wl:Ql,r)).key=t;var o=n.time,a=n.range,u=xu(a);if((t!=x||2==i&&!o)&&(!u||null!=a[0]&&null!=a[1]||(a={min:null==a[0]?$a:{mode:1,hard:a[0],soft:a[0]},max:null==a[1]?$a:{mode:1,hard:a[1],soft:a[1]}},u=!1),!u&&Cu(a))){var l=a;a=function(e,t,n){return null==t?wu:ja(t,n,l)}}n.range=lu(a||(o?Sc:t==x?3==n.distr?Oc:4==n.distr?Bc:Ac:3==n.distr?Nc:4==n.distr?Tc:Fc)),n.auto=lu(!u&&n.auto),n.clamp=lu(n.clamp||ql),n._min=n._max=null}}}for(var A in E("x"),E("y"),1==i&&_.forEach((function(e){E(e.scale)})),b.forEach((function(e){E(e.scale)})),e.scales)E(A);var S,F,N=D[x],O=N.distr;0==N.ori?(pa(s,"u-hz"),S=a,F=u):(pa(s,"u-vt"),S=u,F=a);var T={};for(var B in D){var M=D[B];null==M.min&&null==M.max||(T[B]={min:M.min,max:M.max},M.min=M.max=null)}var L,P=e.tzDate||function(e){return new Date(Ga(e/g))},$=e.fmtDate||ju,R=1==g?ll(P):dl(P),I=pl(P,hl(1==g?ul:fl,$)),j=yl(P,ml("{YYYY}-{MM}-{DD} {h}:{mm}{aa}",$)),z=[],U=r.legend=Fu({},gl,e.legend),H=U.show,Y=U.markers;U.idxs=z,Y.width=lu(Y.width),Y.dash=lu(Y.dash),Y.stroke=lu(Y.stroke),Y.fill=lu(Y.fill);var V,q=[],W=[],Q=!1,G={};if(U.live){var J=_[1]?_[1].values:null;for(var Z in V=(Q=null!=J)?J(r,1,0):{_:0})G[Z]="--"}if(H)if(L=ya("table","u-legend",s),Q){var K=ya("tr","u-thead",L);for(var X in ya("th",null,K),V)ya("th",Wo,K).textContent=X}else pa(L,"u-inline"),U.live&&pa(L,"u-live");var ee={show:!0},te={show:!1};var ne=new Map;function re(e,t,n){var i=ne.get(t)||{},o=we.bind[e](r,t,n);o&&(Aa(e,t,i[e]=o),ne.set(t,i))}function ie(e,t,n){var r=ne.get(t)||{};for(var i in r)null!=e&&i!=e||(Sa(i,t,r[i]),delete r[i]);null==e&&ne.delete(t)}var oe=0,ae=0,ue=0,le=0,ce=0,se=0,fe=0,de=0,he=0,pe=0;r.bbox={};var ve=!1,me=!1,ye=!1,ge=!1,_e=!1;function be(e,t,n){(n||e!=r.width||t!=r.height)&&De(e,t),ut(!1),ye=!0,me=!0,ge=_e=we.left>=0,wt()}function De(e,t){r.width=oe=ue=e,r.height=ae=le=t,ce=se=0,function(){var e=!1,t=!1,n=!1,r=!1;b.forEach((function(i,o){if(i.show&&i._show){var a=i.side,u=a%2,l=i._size+(null!=i.label?i.labelSize:0);l>0&&(u?(ue-=l,3==a?(ce+=l,r=!0):n=!0):(le-=l,0==a?(se+=l,e=!0):t=!0))}})),Se[0]=e,Se[1]=n,Se[2]=t,Se[3]=r,ue-=Ue[1]+Ue[3],ce+=Ue[3],le-=Ue[2]+Ue[0],se+=Ue[0]}(),function(){var e=ce+ue,t=se+le,n=ce,r=se;function i(i,o){switch(i){case 1:return(e+=o)-o;case 2:return(t+=o)-o;case 3:return(n-=o)+o;case 0:return(r-=o)+o}}b.forEach((function(e,t){if(e.show&&e._show){var n=e.side;e._pos=i(n,e._size),null!=e.label&&(e._lpos=i(n,e.labelSize))}}))}();var n=r.bbox;fe=n.left=au(ce*Yo,.5),de=n.top=au(se*Yo,.5),he=n.width=au(ue*Yo,.5),pe=n.height=au(le*Yo,.5)}r.setSize=function(e){be(e.width,e.height)};var we=r.cursor=Fu({},wl,{drag:{y:2==i}},e.cursor);we.idxs=z,we._lock=!1;var xe=we.points;xe.show=lu(xe.show),xe.size=lu(xe.size),xe.stroke=lu(xe.stroke),xe.width=lu(xe.width),xe.fill=lu(xe.fill);var ke=r.focus=Fu({},e.focus||{alpha:.3},we.focus),Ce=ke.prox>=0,Ee=[null];function Ae(e,t){if(1==i||t>0){var n=1==i&&D[e.scale].time,o=e.value;e.value=n?ku(o)?yl(P,ml(o,$)):o||j:o||jl,e.label=e.label||(n?"Time":"Value")}if(t>0){e.width=null==e.width?1:e.width,e.paths=e.paths||xc||fu,e.fillTo=lu(e.fillTo||Xl),e.pxAlign=+za(e.pxAlign,m),e.pxRound=rc(e.pxAlign),e.stroke=lu(e.stroke||null),e.fill=lu(e.fill||null),e._stroke=e._fill=e._paths=e._focus=null;var a=Ul(e.width,1),u=e.points=Fu({},{size:a,width:Ka(1,.2*a),stroke:e.stroke,space:2*a,paths:kc,_stroke:null,_fill:null},e.points);u.show=lu(u.show),u.filter=lu(u.filter),u.fill=lu(u.fill),u.stroke=lu(u.stroke),u.paths=lu(u.paths),u.pxAlign=e.pxAlign}if(H){var l=function(e,t){if(0==t&&(Q||!U.live||2==i))return wu;var n=[],o=ya("tr","u-series",L,L.childNodes[t]);pa(o,e.class),e.show||pa(o,qo);var a=ya("th",null,o);if(Y.show){var u=ga("u-marker",a);if(t>0){var l=Y.width(r,t);l&&(u.style.border=l+"px "+Y.dash(r,t)+" "+Y.stroke(r,t)),u.style.background=Y.fill(r,t)}}var c=ga(Wo,a);for(var s in c.textContent=e.label,t>0&&(Y.show||(c.style.color=e.width>0?Y.stroke(r,t):Y.fill(r,t)),re("click",a,(function(t){if(!we._lock){var n=_.indexOf(e);if((t.ctrlKey||t.metaKey)!=U.isolate){var r=_.some((function(e,t){return t>0&&t!=n&&e.show}));_.forEach((function(e,t){t>0&&Pt(t,r?t==n?ee:te:ee,!0,an.setSeries)}))}else Pt(n,{show:!e.show},!0,an.setSeries)}})),Ce&&re(oa,a,(function(t){we._lock||Pt(_.indexOf(e),$t,!0,an.setSeries)}))),V){var f=ya("td","u-value",o);f.textContent="--",n.push(f)}return[o,n]}(e,t);q.splice(t,0,l[0]),W.splice(t,0,l[1]),U.values.push(null)}if(we.show){z.splice(t,0,null);var c=function(e,t){if(t>0){var n=we.points.show(r,t);if(n)return pa(n,"u-cursor-pt"),pa(n,e.class),ba(n,-10,-10,ue,le),v.insertBefore(n,Ee[t]),n}}(e,t);c&&Ee.splice(t,0,c)}on("addSeries",t)}r.addSeries=function(e,t){e=Ec(e,t=null==t?_.length:t,Nl,Vl),_.splice(t,0,e),Ae(_[t],t)},r.delSeries=function(e){if(_.splice(e,1),H){U.values.splice(e,1),W.splice(e,1);var t=q.splice(e,1)[0];ie(null,t.firstChild),t.remove()}we.show&&(z.splice(e,1),Ee.length>1&&Ee.splice(e,1)[0].remove()),on("delSeries",e)};var Se=[!1,!1,!1,!1];function Fe(e,t,n,r){var i=_t(n,4),o=i[0],a=i[1],u=i[2],l=i[3],c=t%2,s=0;return 0==c&&(l||a)&&(s=0==t&&!o||2==t&&!u?Ga(Fl.size/3):0),1==c&&(o||u)&&(s=1==t&&!a||3==t&&!l?Ga(zl.size/2):0),s}var Ne,Oe,Te,Be,Me,Le,Pe,$e,Re,Ie,je,ze=r.padding=(e.padding||[Fe,Fe,Fe,Fe]).map((function(e){return lu(za(e,Fe))})),Ue=r._padding=ze.map((function(e,t){return e(r,t,Se,0)})),He=null,Ye=null,Ve=1==i?_[0].idxs:null,qe=null,We=!1;function Qe(e,n){if(t=null==e?[]:Su(e,Eu),2==i){Ne=0;for(var o=1;o<_.length;o++)Ne+=t[o][0].length;r.data=t=e}else if(null==t[0]&&(t[0]=[]),r.data=t.slice(),qe=t[0],Ne=qe.length,2==O){t[0]=Array(Ne);for(var a=0;a=0,_e=!0,wt()}}function Ge(){var e,n;if(We=!0,1==i)if(Ne>0){if(He=Ve[0]=0,Ye=Ve[1]=Ne-1,e=t[0][He],n=t[0][Ye],2==O)e=He,n=Ye;else if(1==Ne)if(3==O){var r=_t(La(e,e,N.log,!1),2);e=r[0],n=r[1]}else if(4==O){var o=_t(Pa(e,e,N.log,!1),2);e=o[0],n=o[1]}else if(N.time)n=e+Ga(86400/g);else{var a=_t(ja(e,n,.1,!0),2);e=a[0],n=a[1]}}else He=Ve[0]=e=null,Ye=Ve[1]=n=null;Lt(x,e,n)}function Je(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:ta,t=arguments.length>1?arguments[1]:void 0,n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:Du,r=arguments.length>3&&void 0!==arguments[3]?arguments[3]:"butt",i=arguments.length>4&&void 0!==arguments[4]?arguments[4]:ta,o=arguments.length>5&&void 0!==arguments[5]?arguments[5]:"round";e!=Oe&&(d.strokeStyle=Oe=e),i!=Te&&(d.fillStyle=Te=i),t!=Be&&(d.lineWidth=Be=t),o!=Le&&(d.lineJoin=Le=o),r!=Pe&&(d.lineCap=Pe=r),n!=Me&&d.setLineDash(Me=n)}function Ze(e,t,n,r){t!=Te&&(d.fillStyle=Te=t),e!=$e&&(d.font=$e=e),n!=Re&&(d.textAlign=Re=n),r!=Ie&&(d.textBaseline=Ie=r)}function Ke(e,t,n,i){var o=arguments.length>4&&void 0!==arguments[4]?arguments[4]:0;if(i.length>0&&e.auto(r,We)&&(null==t||null==t.min)){var a=za(He,0),u=za(Ye,i.length-1),l=null==n.min?3==e.distr?Ta(i,a,u):Oa(i,a,u,o):[n.min,n.max];e.min=Za(e.min,n.min=l[0]),e.max=Ka(e.max,n.max=l[1])}}function Xe(e,t){var n=t?_[e].points:_[e];n._stroke=n.stroke(r,e),n._fill=n.fill(r,e)}function et(e,n){var i=n?_[e].points:_[e],o=i._stroke,a=i._fill,u=i._paths,l=u.stroke,c=u.fill,s=u.clip,f=u.flags,h=null,p=mu(i.width*Yo,3),v=p%2/2;n&&null==a&&(a=p>0?"#fff":o);var m=1==i.pxAlign;if(m&&d.translate(v,v),!n){var y=fe,g=de,b=he,D=pe,x=p*Yo/2;0==i.min&&(D+=x),0==i.max&&(g-=x,D+=x),(h=new Path2D).rect(y,g,b,D)}n?tt(o,p,i.dash,i.cap,a,l,c,f,s):function(e,n,i,o,a,u,l,c,s,f,d){var h=!1;w.forEach((function(p,v){if(p.series[0]==e){var m,y=_[p.series[1]],g=t[p.series[1]],b=(y._paths||bu).band;xu(b)&&(b=1==p.dir?b[0]:b[1]);var D=null;y.show&&b&&function(e,t,n){for(t=za(t,0),n=za(n,e.length-1);t<=n;){if(null!=e[t])return!0;t++}return!1}(g,He,Ye)?(D=p.fill(r,v)||u,m=y._paths.clip):b=null,tt(n,i,o,a,D,l,c,s,f,d,m,b),h=!0}})),h||tt(n,i,o,a,u,l,c,s,f,d)}(e,o,p,i.dash,i.cap,a,l,c,f,h,s),m&&d.translate(-v,-v)}r.setData=Qe;function tt(e,t,n,r,i,o,a,u,l,c,s,f){Je(e,t,n,r,i),(l||c||f)&&(d.save(),l&&d.clip(l),c&&d.clip(c)),f?3==(3&u)?(d.clip(f),s&&d.clip(s),rt(i,a),nt(e,o,t)):2&u?(rt(i,a),d.clip(f),nt(e,o,t)):1&u&&(d.save(),d.clip(f),s&&d.clip(s),rt(i,a),d.restore(),nt(e,o,t)):(rt(i,a),nt(e,o,t)),(l||c||f)&&d.restore()}function nt(e,t,n){n>0&&(t instanceof Map?t.forEach((function(e,t){d.strokeStyle=Oe=t,d.stroke(e)})):null!=t&&e&&d.stroke(t))}function rt(e,t){t instanceof Map?t.forEach((function(e,t){d.fillStyle=Te=t,d.fill(e)})):null!=t&&e&&d.fill(t)}function it(e,t,n,r,i,o,a,u,l,c){var s=a%2/2;1==m&&d.translate(s,s),Je(u,a,l,c,u),d.beginPath();var f,h,p,v,y=i+(0==r||3==r?-o:o);0==n?(h=i,v=y):(f=i,p=y);for(var g=0;g0&&(t._paths=null,e&&(1==i?(t.min=null,t.max=null):t.facets.forEach((function(e){e.min=null,e.max=null}))))}))}var lt,ct,st,ft,dt,ht,pt,vt,mt,yt,gt,bt,Dt=!1;function wt(){Dt||(Ou(xt),Dt=!0)}function xt(){ve&&(!function(){var e=Su(D,Eu);for(var n in e){var o=e[n],a=T[n];if(null!=a&&null!=a.min)Fu(o,a),n==x&&ut(!0);else if(n!=x||2==i)if(0==Ne&&null==o.from){var u=o.range(r,null,null,n);o.min=u[0],o.max=u[1]}else o.min=iu,o.max=-iu}if(Ne>0)for(var l in _.forEach((function(n,o){if(1==i){var a=n.scale,u=e[a],l=T[a];if(0==o){var c=u.range(r,u.min,u.max,a);u.min=c[0],u.max=c[1],He=Fa(u.min,t[0]),Ye=Fa(u.max,t[0]),t[0][He]u.max&&Ye--,n.min=qe[He],n.max=qe[Ye]}else n.show&&n.auto&&Ke(u,l,n,t[o],n.sorted);n.idxs[0]=He,n.idxs[1]=Ye}else if(o>0&&n.show&&n.auto){var s=_t(n.facets,2),f=s[0],d=s[1],h=f.scale,p=d.scale,v=_t(t[o],2),m=v[0],y=v[1];Ke(e[h],T[h],f,m,f.sorted),Ke(e[p],T[p],d,y,d.sorted),n.min=d.min,n.max=d.max}})),e){var c=e[l],s=T[l];if(null==c.from&&(null==s||null==s.min)){var f=c.range(r,c.min==iu?null:c.min,c.max==-iu?null:c.max,l);c.min=f[0],c.max=f[1]}}for(var d in e){var h=e[d];if(null!=h.from){var p=e[h.from];if(null==p.min)h.min=h.max=null;else{var v=h.range(r,p.min,p.max,d);h.min=v[0],h.max=v[1]}}}var m={},y=!1;for(var g in e){var b=e[g],w=D[g];if(w.min!=b.min||w.max!=b.max){w.min=b.min,w.max=b.max;var k=w.distr;w._min=3==k?tu(w.min):4==k?ru(w.min,w.asinh):w.min,w._max=3==k?tu(w.max):4==k?ru(w.max,w.asinh):w.max,m[g]=y=!0}}if(y){for(var C in _.forEach((function(e,t){2==i?t>0&&m.y&&(e._paths=null):m[e.scale]&&(e._paths=null)})),m)ye=!0,on("setScale",C);we.show&&(ge=_e=we.left>=0)}for(var E in T)T[E]=null}(),ve=!1),ye&&(!function(){for(var e=!1,t=0;!e;){var n=ot(++t),i=at(t);(e=3==t||n&&i)||(De(r.width,r.height),me=!0)}}(),ye=!1),me&&(ma(p,Ko,ce),ma(p,Jo,se),ma(p,Qo,ue),ma(p,Go,le),ma(v,Ko,ce),ma(v,Jo,se),ma(v,Qo,ue),ma(v,Go,le),ma(h,Qo,oe),ma(h,Go,ae),f.width=Ga(oe*Yo),f.height=Ga(ae*Yo),b.forEach((function(e){var t=e._el,n=e._show,r=e._size,i=e._pos,o=e.side;if(null!=t)if(n){var a=o%2==1;ma(t,a?"left":"top",i-(3===o||0===o?r:0)),ma(t,a?"width":"height",r),ma(t,a?"top":"left",a?se:ce),ma(t,a?"height":"width",a?le:ue),va(t,qo)}else pa(t,qo)})),Oe=Te=Be=Le=Pe=$e=Re=Ie=Me=null,je=1,Wt(!0),on("setSize"),me=!1),oe>0&&ae>0&&(d.clearRect(0,0,f.width,f.height),on("drawClear"),C.forEach((function(e){return e()})),on("draw")),we.show&&ge&&(Vt(null,!0,!1),ge=!1),c||(c=!0,r.status=1,on("ready")),We=!1,Dt=!1}function kt(e,n){var i=D[e];if(null==i.from){if(0==Ne){var o=i.range(r,n.min,n.max,e);n.min=o[0],n.max=o[1]}if(n.min>n.max){var a=n.min;n.min=n.max,n.max=a}if(Ne>1&&null!=n.min&&null!=n.max&&n.max-n.min<1e-16)return;e==x&&2==i.distr&&Ne>0&&(n.min=Fa(n.min,t[0]),n.max=Fa(n.max,t[0]),n.min==n.max&&n.max++),T[e]=n,ve=!0,wt()}}r.redraw=function(e,t){ye=t||!1,!1!==e?Lt(x,N.min,N.max):wt()},r.setScale=kt;var Ct=!1,Et=we.drag,At=Et.x,St=Et.y;we.show&&(we.x&&(lt=ga("u-cursor-x",v)),we.y&&(ct=ga("u-cursor-y",v)),0==N.ori?(st=lt,ft=ct):(st=ct,ft=lt),gt=we.left,bt=we.top);var Ft,Nt,Ot,Tt=r.select=Fu({show:!0,over:!0,left:0,width:0,top:0,height:0},e.select),Bt=Tt.show?ga("u-select",Tt.over?v:p):null;function Mt(e,t){if(Tt.show){for(var n in e)ma(Bt,n,Tt[n]=e[n]);!1!==t&&on("setSelect")}}function Lt(e,t,n){kt(e,{min:t,max:n})}function Pt(e,t,n,o){null!=t.focus&&function(e){if(e!=Ot){var t=null==e,n=1!=ke.alpha;_.forEach((function(r,i){var o=t||0==i||i==e;r._focus=t?null:o,n&&function(e,t){_[e].alpha=t,we.show&&Ee[e]&&(Ee[e].style.opacity=t);H&&q[e]&&(q[e].style.opacity=t)}(i,o?1:ke.alpha)})),Ot=e,n&&wt()}}(e),null!=t.show&&_.forEach((function(n,r){r>0&&(e==r||null==e)&&(n.show=t.show,function(e,t){var n=_[e],r=H?q[e]:null;n.show?r&&va(r,qo):(r&&pa(r,qo),Ee.length>1&&ba(Ee[e],-10,-10,ue,le))}(r,t.show),Lt(2==i?n.facets[1].scale:n.scale,null,null),wt())})),!1!==n&&on("setSeries",e,t),o&&cn("setSeries",r,e,t)}r.setSelect=Mt,r.setSeries=Pt,r.addBand=function(e,t){e.fill=lu(e.fill||null),e.dir=za(e.dir,-1),t=null==t?w.length:t,w.splice(t,0,e)},r.setBand=function(e,t){Fu(w[e],t)},r.delBand=function(e){null==e?w.length=0:w.splice(e,1)};var $t={focus:!0};function Rt(e,t,n){var r=D[t];n&&(e=e/Yo-(1==r.ori?se:ce));var i=ue;1==r.ori&&(e=(i=le)-e),-1==r.dir&&(e=i-e);var o=r._min,a=o+(r._max-o)*(e/i),u=r.distr;return 3==u?Xa(10,a):4==u?function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:1;return Va.sinh(e)*t}(a,r.asinh):a}function It(e,t){ma(Bt,Ko,Tt.left=e),ma(Bt,Qo,Tt.width=t)}function jt(e,t){ma(Bt,Jo,Tt.top=e),ma(Bt,Go,Tt.height=t)}H&&Ce&&Aa(aa,L,(function(e){we._lock||null!=Ot&&Pt(null,$t,!0,an.setSeries)})),r.valToIdx=function(e){return Fa(e,t[0])},r.posToIdx=function(e,n){return Fa(Rt(e,x,n),t[0],He,Ye)},r.posToVal=Rt,r.valToPos=function(e,t,n){return 0==D[t].ori?a(e,D[t],n?he:ue,n?fe:0):u(e,D[t],n?pe:le,n?de:0)},r.batch=function(e){e(r),wt()},r.setCursor=function(e,t,n){gt=e.left,bt=e.top,Vt(null,t,n)};var zt=0==N.ori?It:jt,Ut=1==N.ori?It:jt;function Ht(e,t){if(null!=e){var n=e.idx;U.idx=n,_.forEach((function(e,t){(t>0||!Q)&&Yt(t,n)}))}H&&U.live&&function(){if(H&&U.live)for(var e=2==i?1:0;e<_.length;e++)if(0!=e||!Q){var t=U.values[e],n=0;for(var r in t)W[e][n++].firstChild.nodeValue=t[r]}}(),_e=!1,!1!==t&&on("setLegend")}function Yt(e,n){var i;if(null==n)i=G;else{var o=_[e],a=0==e&&2==O?qe:t[e];i=Q?o.values(r,e,n):{_:o.value(r,a[n],e,n)}}U.values[e]=i}function Vt(e,n,o){mt=gt,yt=bt;var a,u=_t(we.move(r,gt,bt),2);gt=u[0],bt=u[1],we.show&&(st&&ba(st,Ga(gt),0,ue,le),ft&&ba(ft,0,Ga(bt),ue,le));var l=He>Ye;Ft=iu;var s=0==N.ori?ue:le,f=1==N.ori?ue:le;if(gt<0||0==Ne||l){a=null;for(var d=0;d<_.length;d++)d>0&&Ee.length>1&&ba(Ee[d],-10,-10,ue,le);if(Ce&&Pt(null,$t,!0,null==e&&an.setSeries),U.live){z.fill(null),_e=!0;for(var h=0;h<_.length;h++)U.values[h]=G}}else{var p,v;1==i&&(a=Fa(p=Rt(0==N.ori?gt:bt,x),t[0],He,Ye),v=pu(S(t[0][a],N,s,0),.5));for(var m=2==i?1:0;m<_.length;m++){var y=_[m],g=z[m],b=1==i?t[m][g]:t[m][1][g],w=we.dataIdx(r,m,a,p),k=1==i?t[m][w]:t[m][1][w];_e=_e||k!=b||w!=g,z[m]=w;var C=w==a?v:pu(S(1==i?t[0][w]:t[m][0][w],N,s,0),.5);if(m>0&&y.show){var E=null==k?-10:pu(F(k,1==i?D[y.scale]:D[y.facets[1].scale],f,0),.5);if(E>0&&1==i){var A=Wa(E-bt);A<=Ft&&(Ft=A,Nt=m)}var O=void 0,T=void 0;if(0==N.ori?(O=C,T=E):(O=E,T=C),_e&&Ee.length>1){wa(Ee[m],we.points.fill(r,m),we.points.stroke(r,m));var B=void 0,M=void 0,L=void 0,P=void 0,$=!0,R=we.points.bbox;if(null!=R){$=!1;var I=R(r,m);L=I.left,P=I.top,B=I.width,M=I.height}else L=O,P=T,B=M=we.points.size(r,m);ka(Ee[m],B,M,$),ba(Ee[m],L,P,ue,le)}}if(U.live){if(!_e||0==m&&Q)continue;Yt(m,w)}}}if(we.idx=a,we.left=gt,we.top=bt,_e&&(U.idx=a,Ht()),Tt.show&&Ct)if(null!=e){var j=_t(an.scales,2),H=j[0],Y=j[1],V=_t(an.match,2),q=V[0],W=V[1],J=_t(e.cursor.sync.scales,2),Z=J[0],K=J[1],X=e.cursor.drag;if(At=X._x,St=X._y,At||St){var ee,te,ne,re,ie,oe=e.select,ae=oe.left,ce=oe.top,se=oe.width,fe=oe.height,de=e.scales[H].ori,he=e.posToVal,pe=null!=H&&q(H,Z),ve=null!=Y&&W(Y,K);pe&&At?(0==de?(ee=ae,te=se):(ee=ce,te=fe),ne=D[H],re=S(he(ee,Z),ne,s,0),ie=S(he(ee+te,Z),ne,s,0),zt(Za(re,ie),Wa(ie-re))):zt(0,s),ve&&St?(1==de?(ee=ae,te=se):(ee=ce,te=fe),ne=D[Y],re=F(he(ee,K),ne,f,0),ie=F(he(ee+te,K),ne,f,0),Ut(Za(re,ie),Wa(ie-re))):Ut(0,f)}else Zt()}else{var me=Wa(mt-dt),ye=Wa(yt-ht);if(1==N.ori){var ge=me;me=ye,ye=ge}At=Et.x&&me>=Et.dist,St=Et.y&&ye>=Et.dist;var be,De,xe=Et.uni;null!=xe?At&&St&&(St=ye>=xe,(At=me>=xe)||St||(ye>me?St=!0:At=!0)):Et.x&&Et.y&&(At||St)&&(At=St=!0),At&&(0==N.ori?(be=pt,De=gt):(be=vt,De=bt),zt(Za(be,De),Wa(De-be)),St||Ut(0,f)),St&&(1==N.ori?(be=pt,De=gt):(be=vt,De=bt),Ut(Za(be,De),Wa(De-be)),At||zt(0,s)),At||St||(zt(0,0),Ut(0,0))}if(Et._x=At,Et._y=St,null==e){if(o){if(null!=un){var Ae=_t(an.scales,2),Se=Ae[0],Fe=Ae[1];an.values[0]=null!=Se?Rt(0==N.ori?gt:bt,Se):null,an.values[1]=null!=Fe?Rt(1==N.ori?gt:bt,Fe):null}cn(na,r,gt,bt,ue,le,a)}if(Ce){var Oe=o&&an.setSeries,Te=ke.prox;null==Ot?Ft<=Te&&Pt(Nt,$t,!0,Oe):Ft>Te?Pt(null,$t,!0,Oe):Nt!=Ot&&Pt(Nt,$t,!0,Oe)}}c&&!1!==n&&on("setCursor")}r.setLegend=Ht;var qt=null;function Wt(e){!0===e?qt=null:on("syncRect",qt=v.getBoundingClientRect())}function Qt(e,t,n,r,i,o,a){we._lock||(Gt(e,t,n,r,i,o,a,!1,null!=e),null!=e?Vt(null,!0,!0):Vt(t,!0,!1))}function Gt(e,t,n,i,o,a,u,c,s){if(null==qt&&Wt(!1),null!=e)n=e.clientX-qt.left,i=e.clientY-qt.top;else{if(n<0||i<0)return gt=-10,void(bt=-10);var f=_t(an.scales,2),d=f[0],h=f[1],p=t.cursor.sync,v=_t(p.values,2),m=v[0],y=v[1],g=_t(p.scales,2),_=g[0],b=g[1],w=_t(an.match,2),x=w[0],k=w[1],C=t.axes[0].side%2==1,E=0==N.ori?ue:le,A=1==N.ori?ue:le,S=C?a:o,F=C?o:a,O=C?i:n,T=C?n:i;if(n=null!=_?x(d,_)?l(m,D[d],E,0):-10:E*(O/S),i=null!=b?k(h,b)?l(y,D[h],A,0):-10:A*(T/F),1==N.ori){var B=n;n=i,i=B}}if(s&&((n<=1||n>=ue-1)&&(n=au(n,ue)),(i<=1||i>=le-1)&&(i=au(i,le))),c){dt=n,ht=i;var M=_t(we.move(r,n,i),2);pt=M[0],vt=M[1]}else gt=n,bt=i}var Jt={width:0,height:0};function Zt(){Mt(Jt,!1)}function Kt(e,t,n,i,o,a,u){Ct=!0,At=St=Et._x=Et._y=!1,Gt(e,t,n,i,o,a,0,!0,!1),null!=e&&(re(ia,fa,Xt),cn(ra,r,pt,vt,ue,le,null))}function Xt(e,t,n,i,o,a,u){Ct=Et._x=Et._y=!1,Gt(e,t,n,i,o,a,0,!1,!0);var l=Tt.left,c=Tt.top,s=Tt.width,f=Tt.height,d=s>0||f>0;if(d&&Mt(Tt),Et.setScale&&d){var h=l,p=s,v=c,m=f;if(1==N.ori&&(h=c,p=f,v=l,m=s),At&&Lt(x,Rt(h,x),Rt(h+p,x)),St)for(var y in D){var g=D[y];y!=x&&null==g.from&&g.min!=iu&&Lt(y,Rt(v+m,y),Rt(v,y))}Zt()}else we.lock&&(we._lock=!we._lock,we._lock||Vt(null,!0,!1));null!=e&&(ie(ia,fa),cn(ia,r,gt,bt,ue,le,null))}function en(e,t,n,i,o,a,u){Ge(),Zt(),null!=e&&cn(ua,r,gt,bt,ue,le,null)}function tn(){b.forEach(Pc),be(r.width,r.height,!0)}Aa(ca,da,tn);var nn={};nn.mousedown=Kt,nn.mousemove=Qt,nn.mouseup=Xt,nn.dblclick=en,nn.setSeries=function(e,t,n,r){Pt(n,r,!0,!1)},we.show&&(re(ra,v,Kt),re(na,v,Qt),re(oa,v,Wt),re(aa,v,(function(e,t,n,r,i,o,a){if(!we._lock){var u=Ct;if(Ct){var l,c,s=!0,f=!0;0==N.ori?(l=At,c=St):(l=St,c=At),l&&c&&(s=gt<=10||gt>=ue-10,f=bt<=10||bt>=le-10),l&&s&&(gt=gt=3?Il:su)),e.font=Lc(e.font),e.labelFont=Lc(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&&(Se[t]=!0,e._el=ga("u-axis",h))}})),n?n instanceof HTMLElement?(n.appendChild(s),sn()):n(r,sn):sn(),r}$c.assign=Fu,$c.fmtNum=Ya,$c.rangeNum=ja,$c.rangeLog=La,$c.rangeAsinh=Pa,$c.orient=Zl,$c.pxRatio=Yo,$c.join=function(e,t){for(var n=new Set,r=0;r=o&&S<=a;S+=k){var F=c[S];if(null!=F){var N=_(l[S]),O=b(F);1==t?D(x,N,C):D(x,A,O),D(x,N,O),C=O,A=N}}var T=_t(Kl(e,i),2),B=T[0],M=T[1];if(null!=u.fill||0!=B){var L=w.fill=new Path2D(x),P=b(u.fillTo(e,i,u.min,u.max,B));D(L,A,P),D(L,E,P)}if(!u.spanGaps){var $,R=[];($=R).push.apply($,bt(nc(l,c,o,a,k,_,r)));var I=u.width*Yo/2,j=n||1==t?I:-I,z=n||-1==t?-I:I;R.forEach((function(e){e[0]+=j,e[1]+=z})),w.gaps=R=u.gaps(e,i,o,a,R),w.clip=tc(R,s.ori,p,v,m,y)}return 0!=M&&(w.band=2==M?[ec(e,i,o,a,x,-1),ec(e,i,o,a,x,1)]:ec(e,i,o,a,x,M)),w}))}},Rc.bars=function(e){var t=za((e=e||bu).size,[.6,iu,1]),n=e.align||0,r=(e.gap||0)*Yo,i=za(e.radius,0),o=1-t[0],a=za(t[1],iu)*Yo,u=za(t[2],1)*Yo,l=za(e.disp,bu),c=za(e.each,(function(e){})),s=l.fill,f=l.stroke;return function(e,t,d,h){return Zl(e,t,(function(p,v,m,y,g,_,b,D,w,x,k){var C,E,A=p.pxRound,S=y.dir*(0==y.ori?1:-1),F=g.dir*(1==g.ori?1:-1),N=0==y.ori?cc:sc,O=0==y.ori?c:function(e,t,n,r,i,o,a){c(e,t,n,i,r,a,o)},T=_t(Kl(e,t),2),B=T[0],M=T[1],L=3==g.distr?1==B?g.max:g.min:0,P=b(L,g,k,w),$=A(p.width*Yo),R=!1,I=null,j=null,z=null,U=null;null==s||0!=$&&null==f||(R=!0,I=s.values(e,t,d,h),j=new Map,new Set(I).forEach((function(e){null!=e&&j.set(e,new Path2D)})),$>0&&(z=f.values(e,t,d,h),U=new Map,new Set(z).forEach((function(e){null!=e&&U.set(e,new Path2D)}))));var H=l.x0,Y=l.size;if(null!=H&&null!=Y){v=H.values(e,t,d,h),2==H.unit&&(v=v.map((function(t){return e.posToVal(D+t*x,y.key,!0)})));var V=Y.values(e,t,d,h);E=A((E=2==Y.unit?V[0]*x:_(V[0],y,x,D)-_(0,y,x,D))-$),C=1==S?-$/2:E+$/2}else{var q=x;if(v.length>1)for(var W=null,Q=0,G=1/0;Q=d&&Q<=h;Q+=S){var ie=m[Q];if(void 0!==ie){var oe=_(2!=y.distr||null!=l?v[Q]:Q,y,x,D),ae=b(za(ie,L),g,k,w);null!=re&&null!=ie&&(P=b(re[Q],g,k,w));var ue=A(oe-C),le=A(Ka(ae,P)),ce=A(Za(ae,P)),se=le-ce,fe=i*E;null!=ie&&(R?($>0&&null!=z[Q]&&N(U.get(z[Q]),ue,ce+Qa($/2),E,Ka(0,se-$),fe),null!=I[Q]&&N(j.get(I[Q]),ue,ce+Qa($/2),E,Ka(0,se-$),fe)):N(X,ue,ce+Qa($/2),E,Ka(0,se-$),fe),O(e,t,Q,ue-$/2,ce,E+$,se)),0!=M&&(F*M==1?(le=ce,ce=Z):(ce=le,le=Z),N(ee,ue-$/2,ce,E+$,Ka(0,se=le-ce),0))}}return $>0&&(K.stroke=R?U:X),K.fill=R?j:X,K}))}},Rc.spline=function(e){return function(e,t){var n=za(null===t||void 0===t?void 0:t.alignGaps,0);return function(t,r,i,o){return Zl(t,r,(function(a,u,l,c,s,f,d,h,p,v,m){var y,g,_,b=a.pxRound,D=function(e){return b(f(e,c,v,h))},w=function(e){return b(d(e,s,m,p))};0==c.ori?(y=oc,_=uc,g=hc):(y=ac,_=lc,g=pc);var x=c.dir*(0==c.ori?1:-1);i=Na(l,i,o,1),o=Na(l,i,o,-1);for(var k=D(u[1==x?i:o]),C=k,E=[],A=[],S=1==x?i:o;S>=i&&S<=o;S+=x)if(null!=l[S]){var F=D(u[S]);E.push(C=F),A.push(w(l[S]))}var N={stroke:e(E,A,y,_,g,b),fill:null,clip:null,band:null,gaps:null,flags:1},O=N.stroke,T=_t(Kl(t,r),2),B=T[0],M=T[1];if(null!=a.fill||0!=B){var L=N.fill=new Path2D(O),P=w(a.fillTo(t,r,a.min,a.max,B));_(L,C,P),_(L,k,P)}if(!a.spanGaps){var $,R=[];($=R).push.apply($,bt(nc(u,l,i,o,x,D,n))),N.gaps=R=a.gaps(t,r,i,o,R),N.clip=tc(R,c.ori,h,p,v,m)}return 0!=M&&(N.band=2==M?[ec(t,r,i,o,O,-1),ec(t,r,i,o,O,1)]:ec(t,r,i,o,O,M)),N}))}}(bc,e)};var Ic,jc={height:500,legend:{show:!1},cursor:{drag:{x:!0,y:!1},focus:{prox:30},points:{size:5.6,width:1.4},bind:{click:function(){return null},dblclick:function(){return null}}}},zc=function(e){return void 0===e||null===e?"":e.toLocaleString("en-US",{maximumSignificantDigits:20})},Uc=function(e,t,n,r){var i,o=e.axes[n];if(r>1)return o._size||60;var a=6+((null===o||void 0===o||null===(i=o.ticks)||void 0===i?void 0:i.size)||0)+(o.gap||0),u=(null!==t&&void 0!==t?t:[]).reduce((function(e,t){return t.length>e.length?t:e}),"");return""!=u&&(a+=function(e,t){var n=document.createElement("span");n.innerText=e,n.style.cssText="position: absolute; z-index: -1; pointer-events: none; opacity: 0; font: ".concat(t),document.body.appendChild(n);var r=n.offsetWidth;return n.remove(),r}(u,e.ctx.font)),Math.ceil(a)},Hc=function(e){return function(e){for(var t=0,n=0;n>8*i&255).toString(16)).substr(-2);return r}(e)},Yc=function(e){return e.replace(/^\[\d+]/,"").replace(/{.+}/gim,"")},Vc=function(e){for(var t=e.length,n=-1/0;t--;){var r=e[t];Number.isFinite(r)&&r>n&&(n=r)}return Number.isFinite(n)?n:null},qc=function(e){for(var t=e.length,n=1/0;t--;){var r=e[t];Number.isFinite(r)&&r2&&void 0!==arguments[2]?arguments[2]:"";return t.map((function(e){return"".concat(zc(e)," ").concat(n)}))}(e,n,t)}};return e?Number(e)%2?n:Kn(Kn({},n),{},{side:1}):{space:80}}))},Qc=function(e,t){if(null==e||null==t)return[-1,1];var n=.02*(Math.abs(t-e)||Math.abs(e)||1);return[e-n,t+n]},Gc=function(e){var t,n,r=e.u,i=e.tooltipIdx,o=e.metrics,a=e.series,u=e.tooltip,l=e.tooltipOffset,c=e.unit,s=void 0===c?"":c,f=i.seriesIdx,d=i.dataIdx;if(null!==f&&void 0!==d){var h=r.data[f][d],p=r.data[0][d],v=(null===(t=o[f-1])||void 0===t?void 0:t.metric)||{},m=a[f],y=Hc(m.label||""),g=r.over.getBoundingClientRect(),_=g.width,b=g.height,D=r.valToPos(h||0,(null===(n=a[f])||void 0===n?void 0:n.scale)||"1"),w=r.valToPos(p,"x"),x=u.getBoundingClientRect(),k=x.width,C=x.height,E=w+k>=_,A=D+C>=b;u.style.display="grid",u.style.top="".concat(l.top+D+10-(A?C+10:0),"px"),u.style.left="".concat(l.left+w+10-(E?k+20:0),"px");var S=(m.label||"").replace(/{.+}/gim,"").trim(),F=Yc(S),N=yr()(new Date(1e3*p)).format("YYYY-MM-DD HH:mm:ss:SSS (Z)"),O=Object.keys(v).filter((function(e){return"__name__"!==e})).map((function(e){return"
    ".concat(e,": ").concat(v[e],"
    ")})).join(""),T='
    ');u.innerHTML="
    ".concat(N,'
    \n
    \n ').concat(T).concat(F,': ').concat(zc(h)," ").concat(s,'\n
    \n
    ').concat(O,"
    ")}},Jc=n(61),Zc=n.n(Jc);!function(e){e.xRange="xRange",e.yRange="yRange",e.data="data"}(Ic||(Ic={}));var Kc=function(e){var t=e.data,n=e.series,r=e.metrics,i=void 0===r?[]:r,o=e.period,a=e.yaxis,u=e.unit,l=e.setPeriod,c=e.container,s=re(null),f=_t(X(!1),2),d=f[0],h=f[1],p=_t(X({min:o.start,max:o.end}),2),v=p[0],m=p[1],y=_t(X(),2),g=y[0],_=y[1],b=go(c),D=document.createElement("div");D.className="u-tooltip";var w={seriesIdx:null,dataIdx:void 0},x={left:0,top:0},k=ae(Zc()((function(e){var t=e.min,n=e.max;l({from:new Date(1e3*t),to:new Date(1e3*n)})}),500),[]),C=function(e){var t=e.u,n=e.min,r=e.max,i=1e3*(r-n);iSr||(t.setScale("x",{min:n,max:r}),m({min:n,max:r}),k({min:n,max:r}))},E=function(e){var t=e.target,n=e.ctrlKey,r=e.metaKey,i=e.key,o=t instanceof HTMLInputElement||t instanceof HTMLTextAreaElement;if(g&&!o){var a="+"===i||"="===i;if(("-"===i||a)&&!n&&!r){e.preventDefault();var u=(v.max-v.min)/10*(a?1:-1);C({u:g,min:v.min+u,max:v.max-u})}}},A=function(){return[v.min,v.max]},S=function(e){var 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;return a.limits.enable?a.limits.range[r]:Qc(t,n)},F=Kn(Kn({},jc),{},{series:n,axes:Wc([{},{scale:"1"}],u),scales:Kn({},function(){var e={x:{range:A}},t=Object.keys(a.limits.range);return(t.length?t:["1"]).forEach((function(t){e[t]={range:function(e){var n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:0,r=arguments.length>2&&void 0!==arguments[2]?arguments[2]:1;return S(e,n,r,t)}}})),e}()),width:b.width||400,plugins:[{hooks:{ready:function(e){var t;x.left=parseFloat(e.over.style.left),x.top=parseFloat(e.over.style.top),null===(t=e.root.querySelector(".u-wrap"))||void 0===t||t.appendChild(D),e.over.addEventListener("mousedown",(function(t){var n=t.ctrlKey,r=t.metaKey;0===t.button&&(n||r)&&function(e){var t=e.e,n=e.factor,r=void 0===n?.85:n,i=e.u,o=e.setPanning,a=e.setPlotScale;t.preventDefault(),o(!0);var u=t.clientX,l=i.posToVal(1,"x")-i.posToVal(0,"x"),c=i.scales.x.min||0,s=i.scales.x.max||0,f=function(e){e.preventDefault();var t=l*((e.clientX-u)*r);a({u:i,min:c-t,max:s-t})};document.addEventListener("mousemove",f),document.addEventListener("mouseup",(function e(){o(!1),document.removeEventListener("mousemove",f),document.removeEventListener("mouseup",e)}))}({u:e,e:t,setPanning:h,setPlotScale:C,factor:.9})})),e.over.addEventListener("wheel",(function(t){if(t.ctrlKey||t.metaKey){t.preventDefault();var n=e.over.getBoundingClientRect().width,r=e.cursor.left&&e.cursor.left>0?e.cursor.left:0,i=e.posToVal(r,"x"),o=(e.scales.x.max||0)-(e.scales.x.min||0),a=t.deltaY<0?.9*o:o/.9,u=i-r/n*a,l=u+a;e.batch((function(){return C({u:e,min:u,max:l})}))}}))},setCursor:function(e){w.dataIdx!==e.cursor.idx&&(w.dataIdx=e.cursor.idx||0,null!==w.seriesIdx&&void 0!==w.dataIdx&&Gc({u:e,tooltipIdx:w,metrics:i,series:n,tooltip:D,tooltipOffset:x,unit:u}))},setSeries:function(e,t){w.seriesIdx!==t&&(w.seriesIdx=t,t&&void 0!==w.dataIdx?Gc({u:e,tooltipIdx:w,metrics:i,series:n,tooltip:D,tooltipOffset:x,unit:u}):D.style.display="none")}}}],hooks:{setSelect:[function(e){var t=e.posToVal(e.select.left,"x"),n=e.posToVal(e.select.left+e.select.width,"x");C({u:e,min:t,max:n})}]}}),N=function(e){if(g){switch(e){case Ic.xRange:g.scales.x.range=A;break;case Ic.yRange:Object.keys(a.limits.range).forEach((function(e){g.scales[e]&&(g.scales[e].range=function(t){var n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:0,r=arguments.length>2&&void 0!==arguments[2]?arguments[2]:1;return S(t,n,r,e)})}));break;case Ic.data:g.setData(t)}d||g.redraw()}};return te((function(){return m({min:o.start,max:o.end})}),[o]),te((function(){if(s.current){var e=new $c(F,t,s.current);return _(e),m({min:o.start,max:o.end}),e.destroy}}),[s.current,n,b]),te((function(){return window.addEventListener("keydown",E),function(){window.removeEventListener("keydown",E)}}),[v]),te((function(){return N(Ic.data)}),[t]),te((function(){return N(Ic.xRange)}),[v]),te((function(){return N(Ic.yRange)}),[a]),fr("div",{className:Ti()({"vm-line-chart":!0,"vm-line-chart_panning":d}),children:fr("div",{ref:s})})};function Xc(){Xc=function(){return e};var e={},t=Object.prototype,n=t.hasOwnProperty,r=Object.defineProperty||function(e,t,n){e[t]=n.value},i="function"==typeof Symbol?Symbol:{},o=i.iterator||"@@iterator",a=i.asyncIterator||"@@asyncIterator",u=i.toStringTag||"@@toStringTag";function l(e,t,n){return Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}),e[t]}try{l({},"")}catch(S){l=function(e,t,n){return e[t]=n}}function c(e,t,n,i){var o=t&&t.prototype instanceof d?t:d,a=Object.create(o.prototype),u=new C(i||[]);return r(a,"_invoke",{value:D(e,n,u)}),a}function s(e,t,n){try{return{type:"normal",arg:e.call(t,n)}}catch(S){return{type:"throw",arg:S}}}e.wrap=c;var f={};function d(){}function h(){}function p(){}var v={};l(v,o,(function(){return this}));var m=Object.getPrototypeOf,y=m&&m(m(E([])));y&&y!==t&&n.call(y,o)&&(v=y);var g=p.prototype=d.prototype=Object.create(v);function _(e){["next","throw","return"].forEach((function(t){l(e,t,(function(e){return this._invoke(t,e)}))}))}function b(e,t){function i(r,o,a,u){var l=s(e[r],e,o);if("throw"!==l.type){var c=l.arg,f=c.value;return f&&"object"==St(f)&&n.call(f,"__await")?t.resolve(f.__await).then((function(e){i("next",e,a,u)}),(function(e){i("throw",e,a,u)})):t.resolve(f).then((function(e){c.value=e,a(c)}),(function(e){return i("throw",e,a,u)}))}u(l.arg)}var o;r(this,"_invoke",{value:function(e,n){function r(){return new t((function(t,r){i(e,n,t,r)}))}return o=o?o.then(r,r):r()}})}function D(e,t,n){var r="suspendedStart";return function(i,o){if("executing"===r)throw new Error("Generator is already running");if("completed"===r){if("throw"===i)throw o;return A()}for(n.method=i,n.arg=o;;){var a=n.delegate;if(a){var u=w(a,n);if(u){if(u===f)continue;return u}}if("next"===n.method)n.sent=n._sent=n.arg;else if("throw"===n.method){if("suspendedStart"===r)throw r="completed",n.arg;n.dispatchException(n.arg)}else"return"===n.method&&n.abrupt("return",n.arg);r="executing";var l=s(e,t,n);if("normal"===l.type){if(r=n.done?"completed":"suspendedYield",l.arg===f)continue;return{value:l.arg,done:n.done}}"throw"===l.type&&(r="completed",n.method="throw",n.arg=l.arg)}}}function w(e,t){var n=e.iterator[t.method];if(void 0===n){if(t.delegate=null,"throw"===t.method){if(e.iterator.return&&(t.method="return",t.arg=void 0,w(e,t),"throw"===t.method))return f;t.method="throw",t.arg=new TypeError("The iterator does not provide a 'throw' method")}return f}var r=s(n,e.iterator,t.arg);if("throw"===r.type)return t.method="throw",t.arg=r.arg,t.delegate=null,f;var i=r.arg;return i?i.done?(t[e.resultName]=i.value,t.next=e.nextLoc,"return"!==t.method&&(t.method="next",t.arg=void 0),t.delegate=null,f):i:(t.method="throw",t.arg=new TypeError("iterator result is not an object"),t.delegate=null,f)}function x(e){var t={tryLoc:e[0]};1 in e&&(t.catchLoc=e[1]),2 in e&&(t.finallyLoc=e[2],t.afterLoc=e[3]),this.tryEntries.push(t)}function k(e){var t=e.completion||{};t.type="normal",delete t.arg,e.completion=t}function C(e){this.tryEntries=[{tryLoc:"root"}],e.forEach(x,this),this.reset(!0)}function E(e){if(e){var t=e[o];if(t)return t.call(e);if("function"==typeof e.next)return e;if(!isNaN(e.length)){var r=-1,i=function t(){for(;++r=0;--i){var o=this.tryEntries[i],a=o.completion;if("root"===o.tryLoc)return r("end");if(o.tryLoc<=this.prev){var u=n.call(o,"catchLoc"),l=n.call(o,"finallyLoc");if(u&&l){if(this.prev=0;--r){var i=this.tryEntries[r];if(i.tryLoc<=this.prev&&n.call(i,"finallyLoc")&&this.prev=0;--t){var n=this.tryEntries[t];if(n.finallyLoc===e)return this.complete(n.completion,n.afterLoc),k(n),f}},catch:function(e){for(var t=this.tryEntries.length-1;t>=0;--t){var n=this.tryEntries[t];if(n.tryLoc===e){var r=n.completion;if("throw"===r.type){var i=r.arg;k(n)}return i}}throw new Error("illegal catch attempt")},delegateYield:function(e,t,n){return this.delegate={iterator:E(e),resultName:t,nextLoc:n},"next"===this.method&&(this.arg=void 0),f}},e}function es(e,t,n,r,i,o,a){try{var u=e[o](a),l=u.value}catch(c){return void n(c)}u.done?t(l):Promise.resolve(l).then(r,i)}function ts(e){return function(){var t=this,n=arguments;return new Promise((function(r,i){var o=e.apply(t,n);function a(e){es(o,r,i,a,u,"next",e)}function u(e){es(o,r,i,a,u,"throw",e)}a(void 0)}))}}var ns=function(e){var t=e.legend,n=e.onChange,r=_t(X(""),2),i=r[0],o=r[1],a=oe((function(){return function(e){var t=Object.keys(e.freeFormFields).filter((function(e){return"__name__"!==e}));return t.map((function(t){var n="".concat(t,'="').concat(e.freeFormFields[t],'"');return{id:"".concat(e.label,".").concat(n),freeField:n,key:t}}))}(t)}),[t]),u=function(){var e=ts(Xc().mark((function e(t,n){return Xc().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,navigator.clipboard.writeText(t);case 2:o(n),setTimeout((function(){return o("")}),2e3);case 4:case"end":return e.stop()}}),e)})));return function(t,n){return e.apply(this,arguments)}}();return fr("div",{className:Ti()({"vm-legend-item":!0,"vm-legend-item_hide":!t.checked}),onClick:function(e){return function(t){n(e,t.ctrlKey||t.metaKey)}}(t),children:[fr("div",{className:"vm-legend-item__marker",style:{backgroundColor:t.color}}),fr("div",{className:"vm-legend-item-info",children:[fr("span",{className:"vm-legend-item-info__label",children:Yc(t.label)}),"\xa0{",a.map((function(e){return fr(po,{open:i===e.id,title:"Copied!",placement:"top-center",children:fr("span",{className:"vm-legend-item-info__free-fields",onClick:(t=e.freeField,n=e.id,function(e){e.stopPropagation(),u(t,n)}),children:e.freeField},e.key)},e.id);var t,n})),"}"]})]})},rs=function(e){var t=e.labels,n=e.query,r=e.onChange,i=oe((function(){return Array.from(new Set(t.map((function(e){return e.group}))))}),[t]);return fr(m,{children:fr("div",{className:"vm-legend",children:i.map((function(e){return fr("div",{className:"vm-legend-group",children:[fr("div",{className:"vm-legend-group-title",children:[fr("span",{className:"vm-legend-group-title__count",children:["Query ",e,": "]}),fr("span",{className:"vm-legend-group-title__query",children:n[e-1]})]}),fr("div",{children:t.filter((function(t){return t.group===e})).map((function(e){return fr(ns,{legend:e,onChange:r},e.label)}))})]},e)}))})})};function is(e,t){if(null==e)return{};var n,r,i=function(e,t){if(null==e)return{};var n,r,i={},o=Object.keys(e);for(r=0;r=0||(i[n]=e[n]);return i}(e,t);if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(e);for(r=0;r=0||Object.prototype.propertyIsEnumerable.call(e,n)&&(i[n]=e[n])}return i}var os=["__name__"],as=function(e,t,n){var r=function(e,t){var n=e.metric,r=n.__name__,i=is(n,os),o=t||r||"";return 0===Object.keys(e.metric).length?o||"Result ".concat(e.group):"".concat(o," {").concat(Object.entries(i).map((function(e){return"".concat(e[0],": ").concat(e[1])})).join(", "),"}")}(e,n[e.group-1]),i="[".concat(e.group,"]").concat(r);return{label:i,freeFormFields:e.metric,width:1.4,stroke:Hc(i),show:!ls(i,t),scale:"1",points:{size:4.2,width:1.4}}},us=function(e,t){return{group:t,label:e.label||"",color:e.stroke,checked:e.show||!1,freeFormFields:e.freeFormFields}},ls=function(e,t){return t.includes("".concat(e))},cs=function(e){switch(e){case"NaN":return NaN;case"Inf":case"+Inf":return 1/0;case"-Inf":return-1/0;default:return parseFloat(e)}},ss=function(e){var t=e.data,n=void 0===t?[]:t,r=e.period,i=e.customStep,o=e.query,a=e.yaxis,u=e.unit,l=e.showLegend,c=void 0===l||l,s=e.setYaxisLimits,f=e.setPeriod,d=e.alias,h=void 0===d?[]:d,p=e.fullWidth,v=void 0===p||p,m=oe((function(){return i||r.step||1}),[r.step,i]),y=_t(X([[]]),2),g=y[0],_=y[1],b=_t(X([]),2),D=b[0],w=b[1],x=_t(X([]),2),k=x[0],C=x[1],E=_t(X([]),2),A=E[0],S=E[1],F=function(e){var t=function(e){var t={},n=Object.values(e).flat(),r=qc(n),i=Vc(n);return t[1]=Qc(r,i),t}(e);s(t)};te((function(){var e=[],t={},i=[],o=[{}];null===n||void 0===n||n.forEach((function(n){var r=as(n,A,h);o.push(r),i.push(us(r,n.group));var a,u=t[n.group]||[],l=Ho(n.values);try{for(l.s();!(a=l.n()).done;){var c=a.value;e.push(c[0]),u.push(cs(c[1]))}}catch(s){l.e(s)}finally{l.f()}t[n.group]=u}));var a=function(e,t,n){for(var r=Array.from(new Set(e)).sort((function(e,t){return e-t})),i=n.start,o=Nr(n.end+t),a=0,u=[];i<=o;){for(;a=r.length||r[a]>i)&&u.push(i)}for(;u.length<2;)u.push(i),i=Nr(i+t);return u}(e,m,r),u=n.map((function(e){var t,n=[],r=e.values,i=r.length,o=0,u=Ho(a);try{for(u.s();!(t=u.n()).done;){for(var l=t.value;o1e10*h?n.map((function(){return f})):n}));u.unshift(a),F(t),_(u),w(o),C(i)}),[n]),te((function(){var e=[],t=[{}];null===n||void 0===n||n.forEach((function(n){var r=as(n,A,h);t.push(r),e.push(us(r,n.group))})),w(t),C(e)}),[A]);var N=re(null);return fr("div",{className:Ti()({"vm-graph-view":!0,"vm-graph-view_full-width":v}),ref:N,children:[(null===N||void 0===N?void 0:N.current)&&fr(Kc,{data:g,series:D,metrics:n,period:r,yaxis:a,unit:u,setPeriod:f,container:null===N||void 0===N?void 0:N.current}),c&&fr(rs,{labels:k,query:o,onChange:function(e,t){S(function(e){var t=e.hideSeries,n=e.legend,r=e.metaKey,i=e.series,o=n.label,a=ls(o,t),u=i.map((function(e){return e.label||""}));return r?a?t.filter((function(e){return e!==o})):[].concat(bt(t),[o]):t.length?a?bt(u.filter((function(e){return e!==o}))):[]:bt(u.filter((function(e){return e!==o})))}({hideSeries:A,legend:e,metaKey:t,series:D}))}})]})},fs=function(e){var t=e.value,n=e.onChange,r=e.onEnter,i=e.onArrowUp,o=e.onArrowDown,a=e.autocomplete,u=e.error,l=e.options,s=e.label,f=e.disabled,d=void 0!==f&&f,h=_t(X(-1),2),p=h[0],v=h[1],m=_t(X(!1),2),y=m[0],g=m[1],_=re(null),b=re(null),D=oe((function(){if(v(0),!y)return[];try{var e=new RegExp(String(t),"i");return l.filter((function(n){return e.test(n)&&n!==t})).sort((function(t,n){var r,i;return((null===(r=t.match(e))||void 0===r?void 0:r.index)||0)-((null===(i=n.match(e))||void 0===i?void 0:i.index)||0)}))}catch(c){return[]}}),[y,l]),w=function(){g(!1)},x=function(e){return function(){d||(n(e),w())}};return te((function(){var e=(t.match(/[a-zA-Z_:.][a-zA-Z0-9_:.]*/gm)||[]).length;g(a&&t.length>2&&e<=1)}),[a,t]),te((function(){if(b.current){var e=b.current.childNodes[p];null!==e&&void 0!==e&&e.scrollIntoView&&e.scrollIntoView({block:"center"})}}),[p]),fo(_,(function(){return g(!1)}),b),fr("div",{className:"vm-query-editor",ref:_,children:[fr(No,{value:t,label:s,type:"textarea",autofocus:!!t,error:u,onKeyDown:function(e){var t=e.key,a=e.ctrlKey,u=e.metaKey,l=e.shiftKey,c=a||u,s="ArrowUp"===t,f="ArrowDown"===t,h="Enter"===t,m=y&&D.length,_=s||f;if((_&&m||_&&c||h&&m)&&e.preventDefault(),s&&m&&!c?v((function(e){return 0===e?0:e-1})):s&&c&&i(),f&&m&&!c?v((function(e){return e>=D.length-1?D.length-1:e+1})):f&&c&&o(),h&&m&&!l&&!c){if(d)return;n(D[p]),g(!1)}else h&&!l&&r()},onChange:n,disabled:d}),fr(ho,{open:y,buttonRef:_,placement:"bottom-left",onClose:w,children:fr("div",{className:"vm-query-editor-autocomplete",ref:b,children:D.map((function(e,t){return fr("div",{className:Ti()({"vm-list__item":!0,"vm-list__item_active":t===p}),id:"$autocomplete$".concat(e),onClick:x(e),children:e},e)}))})})]})},ds=n(936),hs=n.n(ds),ps=function(e){var t=e.defaultStep,n=e.setStep,r=_t(X(t),2),i=r[0],o=r[1],a=_t(X(""),2),u=a[0],l=a[1],c=ae(hs()((function(e){return n(e||1)}),700),[]),s=function(e){e>0?(o(e),c(e),l("")):l("step is out of allowed range")};return te((function(){t&&s(t)}),[t]),fr(No,{label:"Step value",type:"number",value:i,error:u,onChange:function(e){var t=+e;t&&s(t)},endIcon:fr(po,{title:"Reset step to default",children:fr(so,{variant:"text",size:"small",startIcon:fr(ui,{}),onClick:function(){s(t||1)}})})})},vs=function(){var e=Xn().serverURL,t=hr().tenantId,n=pr(),r=Qr(),i=_t(X(t||0),2),o=i[0],a=i[1],u=ae(hs()((function(t){var i=Number(t);if(n({type:"SET_TENANT_ID",payload:i}),e){var o=e.replace(/(\/select\/)([\d]+)(\/prometheus)/gim,"$1".concat(i,"$3"));n({type:"SET_SERVER",payload:o}),r({type:"RUN_QUERY"})}}),700),[]);return te((function(){o!==t&&a(t)}),[t]),fr(No,{label:"Tenant ID",type:"number",value:o,onChange:function(e){a(e),u(e)},endIcon:fr(po,{title:"Define tenant id if you need request to another storage",children:fr(so,{variant:"text",size:"small",startIcon:fr(li,{})})})})},ms=function(e){var t,n=e.value,r=void 0!==n&&n,i=e.disabled,o=void 0!==i&&i,a=e.label,u=e.color,l=void 0===u?"secondary":u,c=e.onChange;return fr("div",{className:Ti()((qn(t={"vm-switch":!0,"vm-switch_disabled":o,"vm-switch_active":r},"vm-switch_".concat(l,"_active"),r),qn(t,"vm-switch_".concat(l),l),t)),onClick:function(){o||c(!r)},children:[fr("div",{className:"vm-switch-track",children:fr("div",{className:"vm-switch-track__thumb"})}),a&&fr("span",{className:"vm-switch__label",children:a})]})},ys=function(){var e=Qi(),t=Xn().inputTenantID,n=ni().autocomplete,r=ri(),i=Hi(),o=i.nocache,a=i.isTracingEnabled,u=Yi(),l=Wr().period.step;return fr("div",{className:"vm-additional-settings",children:[fr(ms,{label:"Autocomplete",value:n,onChange:function(){r({type:"TOGGLE_AUTOCOMPLETE"})}}),fr(ms,{label:"Disable cache",value:o,onChange:function(){u({type:"TOGGLE_NO_CACHE"})}}),fr(ms,{label:"Trace query",value:a,onChange:function(){u({type:"TOGGLE_QUERY_TRACING"})}}),fr("div",{className:"vm-additional-settings__input",children:fr(ps,{defaultStep:l,setStep:function(t){e({type:"SET_CUSTOM_STEP",payload:t})}})}),!!t&&fr("div",{className:"vm-additional-settings__input",children:fr(vs,{})})]})};var gs=function(e){var t=re();return te((function(){t.current=e}),[e]),t.current},_s=function(e){var t=e.error,n=e.queryOptions,r=e.onHideQuery,i=ni(),o=i.query,a=i.queryHistory,u=i.autocomplete,l=ri(),c=Qr(),s=_t(X(o||[]),2),f=s[0],d=s[1],h=_t(X([]),2),p=h[0],v=h[1],m=gs(f),y=function(){l({type:"SET_QUERY_HISTORY",payload:f.map((function(e,t){var n=a[t]||{values:[]},r=e===n.values[n.values.length-1];return{index:n.values.length-Number(r),values:!r&&e?[].concat(bt(n.values),[e]):n.values}}))}),l({type:"SET_QUERY",payload:f}),c({type:"RUN_QUERY"})},g=function(e,t){d((function(n){return n.map((function(n,r){return r===t?e:n}))}))},_=function(e,t){return function(){!function(e,t){var n=a[t],r=n.index,i=n.values,o=r+e;o<0||o>=i.length||(g(i[o]||"",t),l({type:"SET_QUERY_HISTORY_BY_INDEX",payload:{value:{values:i,index:o},queryNumber:t}}))}(e,t)}},b=function(e){return function(t){g(t,e)}},D=function(e){return function(){var t;t=e,d((function(e){return e.filter((function(e,n){return n!==t}))})),v((function(t){return t.map((function(t){return t>e?t-1:t}))}))}},w=function(e){return function(){var t;t=e,v((function(e){return e.includes(t)?e.filter((function(e){return e!==t})):[].concat(bt(e),[t])}))}};return te((function(){m&&f.length1&&fr(po,{title:"Remove Query",children:fr("div",{className:"vm-query-configurator-list-row__button",children:fr(so,{variant:"text",color:"error",startIcon:fr(Ci,{}),onClick:D(r)})})})]},r)}))}),fr("div",{className:"vm-query-configurator-settings",children:[fr(ys,{}),fr("div",{className:"vm-query-configurator-settings__buttons",children:[f.length<4&&fr(so,{variant:"outlined",onClick:function(){d((function(e){return[].concat(bt(e),[""])}))},startIcon:fr(Ei,{}),children:"Add Query"}),fr(so,{variant:"contained",onClick:y,startIcon:fr(bi,{}),children:"Execute Query"})]})]})]})};function bs(e){var t,n,r,i=2;for("undefined"!=typeof Symbol&&(n=Symbol.asyncIterator,r=Symbol.iterator);i--;){if(n&&null!=(t=e[n]))return t.call(e);if(r&&null!=(t=e[r]))return new Ds(t.call(e));n="@@asyncIterator",r="@@iterator"}throw new TypeError("Object is not async iterable")}function Ds(e){function t(e){if(Object(e)!==e)return Promise.reject(new TypeError(e+" is not an object."));var t=e.done;return Promise.resolve(e.value).then((function(e){return{value:e,done:t}}))}return Ds=function(e){this.s=e,this.n=e.next},Ds.prototype={s:null,n:null,next:function(){return t(this.n.apply(this.s,arguments))},return:function(e){var n=this.s.return;return void 0===n?Promise.resolve({value:e,done:!0}):t(n.apply(this.s,arguments))},throw:function(e){var n=this.s.return;return void 0===n?Promise.reject(e):t(n.apply(this.s,arguments))}},new Ds(e)}var ws=0,xs=function(){function e(t,n){Dt(this,e),this.tracing=void 0,this.query=void 0,this.tracingChildren=void 0,this.originalTracing=void 0,this.id=void 0,this.tracing=t,this.originalTracing=JSON.parse(JSON.stringify(t)),this.query=n,this.id=ws++;var r=t.children||[];this.tracingChildren=r.map((function(t){return new e(t,n)}))}return xt(e,[{key:"queryValue",get:function(){return this.query}},{key:"idValue",get:function(){return this.id}},{key:"children",get:function(){return this.tracingChildren}},{key:"message",get:function(){return this.tracing.message}},{key:"duration",get:function(){return this.tracing.duration_msec}},{key:"JSON",get:function(){return JSON.stringify(this.tracing,null,2)}},{key:"originalJSON",get:function(){return JSON.stringify(this.originalTracing,null,2)}},{key:"setTracing",value:function(t){var n=this;this.tracing=t;var r=t.children||[];this.tracingChildren=r.map((function(t){return new e(t,n.query)}))}},{key:"setQuery",value:function(e){this.query=e}},{key:"resetTracing",value:function(){this.tracing=this.originalTracing}}]),e}(),ks=function(e){var t=e.predefinedQuery,n=e.visible,r=e.display,i=e.customStep,o=e.hideQuery,a=void 0===o?[]:o,u=ni().query,l=Wr().period,c=Hi(),s=c.displayType,f=c.nocache,d=c.isTracingEnabled,h=hr().serverUrl,p=_t(X(!1),2),v=p[0],m=p[1],y=_t(X(),2),g=y[0],_=y[1],b=_t(X(),2),D=b[0],w=b[1],x=_t(X(),2),k=x[0],C=x[1],E=_t(X(),2),A=E[0],S=E[1],F=_t(X(),2),N=F[0],O=F[1],T=_t(X([]),2),B=T[0],M=T[1];te((function(){A&&(_(void 0),w(void 0),C(void 0))}),[A]);var L=function(){var e=ts(Xc().mark((function e(t,n,r,i){var o,a,u,l,c,s;return Xc().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return o=new AbortController,M([].concat(bt(n),[o])),e.prev=2,e.delegateYield(Xc().mark((function e(){var n,f,d,h,p,v,m,y,g,b,D,x;return Xc().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:n="chart"===r,f=or[r],d=[],h=[],p=1,v=0,a=!1,u=!1,e.prev=8,c=bs(t);case 10:return e.next=12,c.next();case 12:if(!(a=!(s=e.sent).done)){e.next=24;break}return m=s.value,e.next=16,fetch(m,{signal:o.signal});case 16:return y=e.sent,e.next=19,y.json();case 19:g=e.sent,y.ok?(S(void 0),g.trace&&(b=new xs(g.trace,i[p-1]),h.push(b)),D=f-d.length,g.data.result.slice(0,D).forEach((function(e){e.group=p,d.push(e)})),v+=g.data.result.length,p++):S("".concat(g.errorType,"\r\n").concat(null===g||void 0===g?void 0:g.error));case 21:a=!1,e.next=10;break;case 24:e.next=30;break;case 26:e.prev=26,e.t0=e.catch(8),u=!0,l=e.t0;case 30:if(e.prev=30,e.prev=31,!a||null==c.return){e.next=35;break}return e.next=35,c.return();case 35:if(e.prev=35,!u){e.next=38;break}throw l;case 38:return e.finish(35);case 39:return e.finish(30);case 40:x="Showing ".concat(f," series out of ").concat(v," series due to performance reasons. Please narrow down the query, so it returns less series"),O(v>f?x:""),n?_(d):w(d),C(h);case 44:case"end":return e.stop()}}),e,null,[[8,26,30,40],[31,,35,39]])}))(),"t0",4);case 4:e.next=9;break;case 6:e.prev=6,e.t1=e.catch(2),e.t1 instanceof Error&&"AbortError"!==e.t1.name&&S("".concat(e.t1.name,": ").concat(e.t1.message));case 9:m(!1);case 10:case"end":return e.stop()}}),e,null,[[2,6]])})));return function(t,n,r,i){return e.apply(this,arguments)}}(),P=ae(hs()(L,800),[]),$=oe((function(){var e=null!==t&&void 0!==t?t:u,n="chart"===(r||s);if(l)if(h)if(e.every((function(e){return!e.trim()})))S(xo.validQuery);else{if(Oo(h)){var o=Kn({},l);return o.step=i,e.filter((function(e,t){return e.trim()&&!a.includes(t)})).map((function(e){return n?function(e,t,n,r,i){return"".concat(e,"/api/v1/query_range?query=").concat(encodeURIComponent(t),"&start=").concat(n.start,"&end=").concat(n.end,"&step=").concat(n.step).concat(r?"&nocache=1":"").concat(i?"&trace=1":"")}(h,e,o,f,d):function(e,t,n,r){return"".concat(e,"/api/v1/query?query=").concat(encodeURIComponent(t),"&time=").concat(n.end,"&step=").concat(n.step).concat(r?"&trace=1":"")}(h,e,o,d)}))}S(xo.validServer)}else S(xo.emptyServer)}),[h,l,s,i,a]);return te((function(){n&&null!==$&&void 0!==$&&$.length&&(m(!0),P($,B,r||s,null!==t&&void 0!==t?t:u))}),[$,n]),te((function(){var e=B.slice(0,-1);e.length&&(e.map((function(e){return e.abort()})),M(B.filter((function(e){return!e.signal.aborted}))))}),[B]),{fetchUrl:$,isLoading:v,graphData:g,liveData:D,error:A,warning:N,traces:k}},Cs=function(e){var t=e.data,n=lo().showInfoMessage,r=oe((function(){return JSON.stringify(t,null,2)}),[t]);return fr("div",{className:"vm-json-view",children:[fr("div",{className:"vm-json-view__copy",children:fr(so,{variant:"outlined",onClick:function(){navigator.clipboard.writeText(r),n({text:"Formatted JSON has been copied",type:"success"})},children:"Copy JSON"})}),fr("pre",{className:"vm-json-view__code",children:fr("code",{children:r})})]})},Es=function(e){var t=e.yaxis,n=e.setYaxisLimits,r=e.toggleEnableLimits,i=oe((function(){return Object.keys(t.limits.range)}),[t.limits.range]),o=ae(hs()((function(e,r,i){var o=t.limits.range;o[r][i]=+e,o[r][0]===o[r][1]||o[r][0]>o[r][1]||n(o)}),500),[t.limits.range]),a=function(e,t){return function(n){o(n,e,t)}};return fr("div",{className:"vm-axes-limits",children:[fr(ms,{value:t.limits.enable,onChange:r,label:"Fix the limits for y-axis"}),fr("div",{className:"vm-axes-limits-list",children:i.map((function(e){return fr("div",{className:"vm-axes-limits-list__inputs",children:[fr(No,{label:"Min ".concat(e),type:"number",disabled:!t.limits.enable,value:t.limits.range[e][0],onChange:a(e,0)}),fr(No,{label:"Max ".concat(e),type:"number",disabled:!t.limits.enable,value:t.limits.range[e][1],onChange:a(e,1)})]},e)}))})]})},As="Axes settings",Ss=function(e){var t=e.yaxis,n=e.setYaxisLimits,r=e.toggleEnableLimits,i=re(null),o=_t(X(!1),2),a=o[0],u=o[1],l=re(null);fo(i,(function(){return u(!1)}),l);var c=function(){u(!1)};return fr("div",{className:"vm-graph-settings",children:[fr(po,{title:As,children:fr("div",{ref:l,children:fr(so,{variant:"text",startIcon:fr(oi,{}),onClick:function(){u((function(e){return!e}))}})})}),fr(ho,{open:a,buttonRef:l,placement:"bottom-right",onClose:c,children:fr("div",{className:"vm-graph-settings-popper",ref:i,children:[fr("div",{className:"vm-popper-header",children:[fr("h3",{className:"vm-popper-header__title",children:As}),fr(so,{size:"small",startIcon:fr(ai,{}),onClick:c})]}),fr("div",{className:"vm-graph-settings-popper__body",children:fr(Es,{yaxis:t,setYaxisLimits:n,toggleEnableLimits:r})})]})})]})},Fs=function(e){var t=e.containerStyles,n=void 0===t?{}:t,r=e.message;return fr("div",{className:"vm-spinner",style:n&&{},children:[fr("div",{className:"half-circle-spinner",children:[fr("div",{className:"circle circle-1"}),fr("div",{className:"circle circle-2"})]}),r&&fr("div",{className:"vm-spinner__message",children:r})]})},Ns=function(){var e=hr().serverUrl,t=_t(X([]),2),n=t[0],r=t[1],i=function(){var t=ts(Xc().mark((function t(){var n,i,o;return Xc().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:if(e){t.next=2;break}return t.abrupt("return");case 2:return n="".concat(e,"/api/v1/label/__name__/values"),t.prev=3,t.next=6,fetch(n);case 6:return i=t.sent,t.next=9,i.json();case 9:o=t.sent,i.ok&&r(o.data),t.next=16;break;case 13:t.prev=13,t.t0=t.catch(3),console.error(t.t0);case 16:case"end":return t.stop()}}),t,null,[[3,13]])})));return function(){return t.apply(this,arguments)}}();return te((function(){i()}),[e]),{queryOptions:n}},Os=function(e){var t=e.value;return fr("div",{className:"vm-line-progress",children:[fr("div",{className:"vm-line-progress-track",children:fr("div",{className:"vm-line-progress-track__thumb",style:{width:"".concat(t,"%")}})}),fr("span",{children:[t.toFixed(2),"%"]})]})},Ts=function e(t){var n,r=t.trace,i=t.totalMsec,o=_t(X({}),2),a=o[0],u=o[1],l=r.children&&!!r.children.length,c=r.duration/i*100;return fr("div",{className:"vm-nested-nav",children:[fr("div",{className:"vm-nested-nav-header",onClick:(n=r.idValue,function(){u((function(e){return Kn(Kn({},e),{},qn({},n,!e[n]))}))}),children:[l&&fr("div",{className:Ti()({"vm-nested-nav-header__icon":!0,"vm-nested-nav-header__icon_open":a[r.idValue]}),children:fr(pi,{})}),fr("div",{className:"vm-nested-nav-header__progress",children:fr(Os,{value:c})}),fr("div",{className:"vm-nested-nav-header__message",children:r.message}),fr("div",{className:"vm-nested-nav-header__duration",children:"duration: ".concat(r.duration," ms")})]}),a[r.idValue]&&fr("div",{children:l&&r.children.map((function(t){return fr(e,{trace:t,totalMsec:i},t.duration)}))})]})},Bs=function(e){var t=e.editable,n=void 0!==t&&t,r=e.defaultTile,i=void 0===r?"JSON":r,o=e.displayTitle,a=void 0===o||o,u=e.defaultJson,l=void 0===u?"":u,s=e.resetValue,f=void 0===s?"":s,d=e.onClose,h=e.onUpload,p=lo().showInfoMessage,v=_t(X(l),2),m=v[0],y=v[1],g=_t(X(i),2),_=g[0],b=g[1],D=_t(X(""),2),w=D[0],x=D[1],k=_t(X(""),2),C=k[0],E=k[1],A=oe((function(){try{var e=JSON.parse(m),t=e.trace||e;return t.duration_msec?(new xs(t,""),""):xo.traceNotFound}catch(c){return c instanceof Error?c.message:"Unknown error"}}),[m]),S=function(){var e=ts(Xc().mark((function e(){return Xc().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,navigator.clipboard.writeText(m);case 2:p({text:"Formatted JSON has been copied",type:"success"});case 3:case"end":return e.stop()}}),e)})));return function(){return e.apply(this,arguments)}}(),F=function(){E(A),_.trim()||x(xo.emptyTitle),A||w||(h(m,_),d())};return fr("div",{className:Ti()({"vm-json-form":!0,"vm-json-form_one-field":!a}),children:[a&&fr(No,{value:_,label:"Title",error:w,onEnter:F,onChange:function(e){b(e)}}),fr(No,{value:m,label:"JSON",type:"textarea",error:C,autofocus:!0,onChange:function(e){E(""),y(e)},disabled:!n}),fr("div",{className:"vm-json-form-footer",children:[fr("div",{className:"vm-json-form-footer__controls",children:[fr(so,{variant:"outlined",startIcon:fr(Ni,{}),onClick:S,children:"Copy JSON"}),f&&fr(so,{variant:"text",startIcon:fr(ui,{}),onClick:function(){y(f)},children:"Reset JSON"})]}),fr("div",{className:"vm-json-form-footer__controls vm-json-form-footer__controls_right",children:[fr(so,{variant:"outlined",color:"error",onClick:d,children:"Cancel"}),fr(so,{variant:"contained",onClick:F,children:"apply"})]})]})]})},Ms=function(e){var t=e.traces,n=e.jsonEditor,r=void 0!==n&&n,i=e.onDeleteClick,o=_t(X(null),2),a=o[0],u=o[1],l=function(){u(null)};if(!t.length)return fr(ao,{variant:"info",children:"Please re-run the query to see results of the tracing"});var s=function(e){return function(){i(e)}};return fr(m,{children:[fr("div",{className:"vm-tracings-view",children:t.map((function(e){return fr("div",{className:"vm-tracings-view-trace vm-block vm-block_empty-padding",children:[fr("div",{className:"vm-tracings-view-trace-header",children:[fr("h3",{className:"vm-tracings-view-trace-header-title",children:["Trace for ",fr("b",{className:"vm-tracings-view-trace-header-title__query",children:e.queryValue})]}),fr(po,{title:"Open JSON",children:fr(so,{variant:"text",startIcon:fr(ki,{}),onClick:(t=e,function(){u(t)})})}),fr(po,{title:"Remove trace",children:fr(so,{variant:"text",color:"error",startIcon:fr(Ci,{}),onClick:s(e)})})]}),fr("nav",{className:"vm-tracings-view-trace__nav",children:fr(Ts,{trace:e,totalMsec:e.duration})})]},e.idValue);var t}))}),a&&fr(Bo,{title:a.queryValue,onClose:l,children:fr(Bs,{editable:r,displayTitle:r,defaultTile:a.queryValue,defaultJson:a.JSON,resetValue:a.originalJSON,onClose:l,onUpload:function(e,t){if(r&&a)try{a.setTracing(JSON.parse(e)),a.setQuery(t),u(null)}catch(c){console.error(c)}}})})]})},Ls=function(e,t){return oe((function(){var n={};e.forEach((function(e){return Object.entries(e.metric).forEach((function(e){return n[e[0]]?n[e[0]].options.add(e[1]):n[e[0]]={options:new Set([e[1]])}}))}));var r=Object.entries(n).map((function(e){return{key:e[0],variations:e[1].options.size}})).sort((function(e,t){return e.variations-t.variations}));return t?r.filter((function(e){return t.includes(e.key)})):r}),[e,t])},Ps=function(e){var t,n=e.checked,r=void 0!==n&&n,i=e.disabled,o=void 0!==i&&i,a=e.label,u=e.color,l=void 0===u?"secondary":u,c=e.onChange;return fr("div",{className:Ti()((qn(t={"vm-checkbox":!0,"vm-checkbox_disabled":o,"vm-checkbox_active":r},"vm-checkbox_".concat(l,"_active"),r),qn(t,"vm-checkbox_".concat(l),l),t)),onClick:function(){o||c(!r)},children:[fr("div",{className:"vm-checkbox-track",children:fr("div",{className:"vm-checkbox-track__thumb",children:fr(Ai,{})})}),a&&fr("span",{className:"vm-checkbox__label",children:a})]})},$s="Display columns",Rs=function(e){var t=e.data,n=e.defaultColumns,r=e.onChange,i=re(null),o=_t(X(!1),2),a=o[0],u=o[1],l=Ls(t),c=oe((function(){return!l.length}),[l]),s=_t(X(l.map((function(e){return e.key}))),2),f=s[0],d=s[1],h=function(){u(!1),d(n||l.map((function(e){return e.key})))},p=function(e){return function(){!function(e){d((function(t){return f.includes(e)?t.filter((function(t){return t!==e})):[].concat(bt(t),[e])}))}(e)}};return te((function(){d(l.map((function(e){return e.key})))}),[l]),fr("div",{className:"vm-table-settings",children:[fr(po,{title:$s,children:fr("div",{ref:i,children:fr(so,{variant:"text",startIcon:fr(oi,{}),onClick:function(){u((function(e){return!e}))},disabled:c})})}),fr(ho,{open:a,onClose:h,placement:"bottom-right",buttonRef:i,children:fr("div",{className:"vm-table-settings-popper",children:[fr("div",{className:"vm-popper-header",children:[fr("h3",{className:"vm-popper-header__title",children:$s}),fr(so,{onClick:h,startIcon:fr(ai,{}),size:"small"})]}),fr("div",{className:"vm-table-settings-popper-list",children:l.map((function(e){return fr("div",{className:"vm-table-settings-popper-list__item",children:fr(Ps,{checked:f.includes(e.key),onChange:p(e.key),label:e.key})},e.key)}))}),fr("div",{className:"vm-table-settings-popper__footer",children:[fr(so,{color:"error",variant:"outlined",size:"small",onClick:function(){u(!1);var e=l.map((function(e){return e.key}));d(e),r(e)},children:"Reset"}),fr(so,{variant:"contained",size:"small",onClick:function(){u(!1),r(f)},children:"apply"})]})]})})]})};function Is(e){return function(e,t){return Object.fromEntries(Object.entries(e).filter(t))}(e,(function(e){return!!e[1]}))}var js=function(e){var t=e.data,n=e.displayColumns,r=Ls(t,n),i=_t(X(""),2),o=i[0],a=i[1],u=_t(X("asc"),2),l=u[0],c=u[1],s=oe((function(){var e=null===t||void 0===t?void 0:t.map((function(e){return{metadata:r.map((function(t){return e.metric[t.key]||"-"})),value:e.value?e.value[1]:"-"}})),n="Value"===o,i=r.findIndex((function(e){return e.key===o}));return n||-1!==i?e.sort((function(e,t){var r=n?Number(e.value):e.metadata[i],o=n?Number(t.value):t.metadata[i];return("asc"===l?ro)?-1:1})):e}),[r,t,o,l]),f=function(e){return function(){d(e)}},d=function(e){c((function(t){return"asc"===t&&o===e?"desc":"asc"})),a(e)};return s.length?fr("table",{className:"vm-table",children:[fr("thead",{className:"vm-table-header",children:fr("tr",{className:"vm-table__row vm-table__row_header",children:[r.map((function(e,t){return fr("td",{className:"vm-table-cell vm-table-cell_header vm-table-cell_sort",onClick:f(e.key),children:fr("div",{className:"vm-table-cell__content",children:[e.key,fr("div",{className:Ti()({"vm-table__sort-icon":!0,"vm-table__sort-icon_active":o===e.key,"vm-table__sort-icon_desc":"desc"===l&&o===e.key}),children:fr(vi,{})})]})},t)})),fr("td",{className:"vm-table-cell vm-table-cell_header vm-table-cell_right vm-table-cell_sort",onClick:f("Value"),children:fr("div",{className:"vm-table-cell__content",children:[fr("div",{className:Ti()({"vm-table__sort-icon":!0,"vm-table__sort-icon_active":"Value"===o,"vm-table__sort-icon_desc":"desc"===l}),children:fr(vi,{})}),"Value"]})})]})}),fr("tbody",{className:"vm-table-body",children:s.map((function(e,t){return fr("tr",{className:"vm-table__row",children:[e.metadata.map((function(e,n){return fr("td",{className:Ti()({"vm-table-cell vm-table-cell_no-wrap":!0,"vm-table-cell_gray":s[t-1]&&s[t-1].metadata[n]===e}),children:e},n)})),fr("td",{className:"vm-table-cell vm-table-cell_right",children:e.value})]},t)}))})]}):fr(ao,{variant:"warning",children:"No data to show"})},zs=function(){var e=Hi(),t=e.displayType,n=e.isTracingEnabled,r=ni().query,i=Wr().period,o=Qr();!function(){var e=hr().tenantId,t=Hi().displayType,n=ni().query,r=Wr(),i=r.duration,o=r.relativeTime,a=r.period,u=a.date,l=a.step,c=function(){var r={};n.forEach((function(n,a){var c,s="g".concat(a);r["".concat(s,".expr")]=n,r["".concat(s,".range_input")]=i,r["".concat(s,".end_input")]=u,r["".concat(s,".step_input")]=l,r["".concat(s,".tab")]=(null===(c=Pi.find((function(e){return e.value===t})))||void 0===c?void 0:c.prometheusCode)||0,r["".concat(s,".relative_time")]=o,r["".concat(s,".tenantID")]=e})),ar(Is(r))};te(c,[e,t,n,i,o,u,l]),te(c,[])}();var a=_t(X(),2),u=a[0],l=a[1],c=_t(X([]),2),s=c[0],f=c[1],d=_t(X([]),2),h=d[0],p=d[1],v=ue(Wi).state,m=v.customStep,y=v.yaxis,g=Qi(),_=Ns().queryOptions,b=ks({visible:!0,customStep:m,hideQuery:h}),D=b.isLoading,w=b.liveData,x=b.graphData,k=b.error,C=b.warning,E=b.traces,A=function(e){g({type:"SET_YAXIS_LIMITS",payload:e})};return te((function(){E&&f([].concat(bt(s),bt(E)))}),[E]),te((function(){f([])}),[t]),fr("div",{className:"vm-custom-panel",children:[fr(_s,{error:k,queryOptions:_,onHideQuery:function(e){p(e)}}),n&&fr("div",{className:"vm-custom-panel__trace",children:fr(Ms,{traces:s,onDeleteClick:function(e){var t=s.filter((function(t){return t.idValue!==e.idValue}));f(bt(t))}})}),D&&fr(Fs,{}),k&&fr(ao,{variant:"error",children:k}),C&&fr(ao,{variant:"warning",children:C}),fr("div",{className:"vm-custom-panel-body vm-block",children:[fr("div",{className:"vm-custom-panel-body-header",children:[fr($i,{}),"chart"===t&&fr(Ss,{yaxis:y,setYaxisLimits:A,toggleEnableLimits:function(){g({type:"TOGGLE_ENABLE_YAXIS_LIMITS"})}}),"table"===t&&fr(Rs,{data:w||[],defaultColumns:u,onChange:l})]}),x&&i&&"chart"===t&&fr(ss,{data:x,period:i,customStep:m,query:r,yaxis:y,setYaxisLimits:A,setPeriod:function(e){var t=e.from,n=e.to;o({type:"SET_PERIOD",payload:{from:t,to:n}})}}),w&&"code"===t&&fr(Cs,{data:w}),w&&"table"===t&&fr(js,{data:w,displayColumns:u})]})]})},Us=function(){var e=ts(Xc().mark((function e(t){var n,r;return Xc().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,fetch("./dashboards/".concat(t));case 2:return n=e.sent,e.next=5,n.json();case 5:return r=e.sent,e.abrupt("return",r);case 7:case"end":return e.stop()}}),e)})));return function(t){return e.apply(this,arguments)}}(),Hs=ts(Xc().mark((function e(){var t;return Xc().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return t=window.__VMUI_PREDEFINED_DASHBOARDS__,e.next=3,Promise.all(t.map(function(){var e=ts(Xc().mark((function e(t){return Xc().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.abrupt("return",Us(t));case 1:case"end":return e.stop()}}),e)})));return function(t){return e.apply(this,arguments)}}()));case 3:return e.abrupt("return",e.sent);case 4:case"end":return e.stop()}}),e)})));function Ys(){return{async:!1,baseUrl:null,breaks:!1,extensions:null,gfm:!0,headerIds:!0,headerPrefix:"",highlight:null,langPrefix:"language-",mangle:!0,pedantic:!1,renderer:null,sanitize:!1,sanitizer:null,silent:!1,smartypants:!1,tokenizer:null,walkTokens:null,xhtml:!1}}var Vs={async:!1,baseUrl:null,breaks:!1,extensions:null,gfm:!0,headerIds:!0,headerPrefix:"",highlight:null,langPrefix:"language-",mangle:!0,pedantic:!1,renderer:null,sanitize:!1,sanitizer:null,silent:!1,smartypants:!1,tokenizer:null,walkTokens:null,xhtml:!1};var qs=/[&<>"']/,Ws=/[&<>"']/g,Qs=/[<>"']|&(?!#?\w+;)/,Gs=/[<>"']|&(?!#?\w+;)/g,Js={"&":"&","<":"<",">":">",'"':""","'":"'"},Zs=function(e){return Js[e]};function Ks(e,t){if(t){if(qs.test(e))return e.replace(Ws,Zs)}else if(Qs.test(e))return e.replace(Gs,Zs);return e}var Xs=/&(#(?:\d+)|(?:#x[0-9A-Fa-f]+)|(?:\w+));?/gi;function ef(e){return e.replace(Xs,(function(e,t){return"colon"===(t=t.toLowerCase())?":":"#"===t.charAt(0)?"x"===t.charAt(1)?String.fromCharCode(parseInt(t.substring(2),16)):String.fromCharCode(+t.substring(1)):""}))}var tf=/(^|[^\[])\^/g;function nf(e,t){e="string"===typeof e?e:e.source,t=t||"";var n={replace:function(t,r){return r=(r=r.source||r).replace(tf,"$1"),e=e.replace(t,r),n},getRegex:function(){return new RegExp(e,t)}};return n}var rf=/[^\w:]/g,of=/^$|^[a-z][a-z0-9+.-]*:|^[?#]/i;function af(e,t,n){if(e){var r;try{r=decodeURIComponent(ef(n)).replace(rf,"").toLowerCase()}catch(c){return null}if(0===r.indexOf("javascript:")||0===r.indexOf("vbscript:")||0===r.indexOf("data:"))return null}t&&!of.test(n)&&(n=function(e,t){uf[" "+e]||(lf.test(e)?uf[" "+e]=e+"/":uf[" "+e]=pf(e,"/",!0));var n=-1===(e=uf[" "+e]).indexOf(":");return"//"===t.substring(0,2)?n?t:e.replace(cf,"$1")+t:"/"===t.charAt(0)?n?t:e.replace(sf,"$1")+t:e+t}(t,n));try{n=encodeURI(n).replace(/%25/g,"%")}catch(c){return null}return n}var uf={},lf=/^[^:]+:\/*[^/]*$/,cf=/^([^:]+:)[\s\S]*$/,sf=/^([^:]+:\/*[^/]*)[\s\S]*$/;var ff={exec:function(){}};function df(e){for(var t,n,r=1;r=0&&"\\"===n[i];)r=!r;return r?"|":" |"})).split(/ \|/),r=0;if(n[0].trim()||n.shift(),n.length>0&&!n[n.length-1].trim()&&n.pop(),n.length>t)n.splice(t);else for(;n.length1;)1&t&&(n+=e),t>>=1,e+=e;return n+e}function yf(e,t,n,r){var i=t.href,o=t.title?Ks(t.title):null,a=e[1].replace(/\\([\[\]])/g,"$1");if("!"!==e[0].charAt(0)){r.state.inLink=!0;var u={type:"link",raw:n,href:i,title:o,text:a,tokens:r.inlineTokens(a)};return r.state.inLink=!1,u}return{type:"image",raw:n,href:i,title:o,text:Ks(a)}}var gf=function(){function e(t){Dt(this,e),this.options=t||Vs}return xt(e,[{key:"space",value:function(e){var t=this.rules.block.newline.exec(e);if(t&&t[0].length>0)return{type:"space",raw:t[0]}}},{key:"code",value:function(e){var t=this.rules.block.code.exec(e);if(t){var n=t[0].replace(/^ {1,4}/gm,"");return{type:"code",raw:t[0],codeBlockStyle:"indented",text:this.options.pedantic?n:pf(n,"\n")}}}},{key:"fences",value:function(e){var t=this.rules.block.fences.exec(e);if(t){var n=t[0],r=function(e,t){var n=e.match(/^(\s+)(?:```)/);if(null===n)return t;var r=n[1];return t.split("\n").map((function(e){var t=e.match(/^\s+/);return null===t?e:_t(t,1)[0].length>=r.length?e.slice(r.length):e})).join("\n")}(n,t[3]||"");return{type:"code",raw:n,lang:t[2]?t[2].trim().replace(this.rules.inline._escapes,"$1"):t[2],text:r}}}},{key:"heading",value:function(e){var t=this.rules.block.heading.exec(e);if(t){var n=t[2].trim();if(/#$/.test(n)){var r=pf(n,"#");this.options.pedantic?n=r.trim():r&&!/ $/.test(r)||(n=r.trim())}return{type:"heading",raw:t[0],depth:t[1].length,text:n,tokens:this.lexer.inline(n)}}}},{key:"hr",value:function(e){var t=this.rules.block.hr.exec(e);if(t)return{type:"hr",raw:t[0]}}},{key:"blockquote",value:function(e){var t=this.rules.block.blockquote.exec(e);if(t){var n=t[0].replace(/^ *>[ \t]?/gm,"");return{type:"blockquote",raw:t[0],tokens:this.lexer.blockTokens(n,[]),text:n}}}},{key:"list",value:function(e){var t=this.rules.block.list.exec(e);if(t){var n,r,i,o,a,u,l,c,s,f,d,h,p=t[1].trim(),v=p.length>1,m={type:"list",raw:"",ordered:v,start:v?+p.slice(0,-1):"",loose:!1,items:[]};p=v?"\\d{1,9}\\".concat(p.slice(-1)):"\\".concat(p),this.options.pedantic&&(p=v?p:"[*+-]");for(var y=new RegExp("^( {0,3}".concat(p,")((?:[\t ][^\\n]*)?(?:\\n|$))"));e&&(h=!1,t=y.exec(e))&&!this.rules.block.hr.test(e);){if(n=t[0],e=e.substring(n.length),c=t[2].split("\n",1)[0],s=e.split("\n",1)[0],this.options.pedantic?(o=2,d=c.trimLeft()):(o=(o=t[2].search(/[^ ]/))>4?1:o,d=c.slice(o),o+=t[1].length),u=!1,!c&&/^ *$/.test(s)&&(n+=s+"\n",e=e.substring(s.length+1),h=!0),!h)for(var g=new RegExp("^ {0,".concat(Math.min(3,o-1),"}(?:[*+-]|\\d{1,9}[.)])((?: [^\\n]*)?(?:\\n|$))")),_=new RegExp("^ {0,".concat(Math.min(3,o-1),"}((?:- *){3,}|(?:_ *){3,}|(?:\\* *){3,})(?:\\n+|$)")),b=new RegExp("^ {0,".concat(Math.min(3,o-1),"}(?:```|~~~)")),D=new RegExp("^ {0,".concat(Math.min(3,o-1),"}#"));e&&(c=f=e.split("\n",1)[0],this.options.pedantic&&(c=c.replace(/^ {1,4}(?=( {4})*[^ ])/g," ")),!b.test(c))&&!D.test(c)&&!g.test(c)&&!_.test(e);){if(c.search(/[^ ]/)>=o||!c.trim())d+="\n"+c.slice(o);else{if(u)break;d+="\n"+c}u||c.trim()||(u=!0),n+=f+"\n",e=e.substring(f.length+1)}m.loose||(l?m.loose=!0:/\n *\n *$/.test(n)&&(l=!0)),this.options.gfm&&(r=/^\[[ xX]\] /.exec(d))&&(i="[ ] "!==r[0],d=d.replace(/^\[[ xX]\] +/,"")),m.items.push({type:"list_item",raw:n,task:!!r,checked:i,loose:!1,text:d}),m.raw+=n}m.items[m.items.length-1].raw=n.trimRight(),m.items[m.items.length-1].text=d.trimRight(),m.raw=m.raw.trimRight();var w=m.items.length;for(a=0;a1)return!0}}catch(i){r.e(i)}finally{r.f()}return!1}));!m.loose&&x.length&&k&&(m.loose=!0,m.items[a].loose=!0)}return m}}},{key:"html",value:function(e){var t=this.rules.block.html.exec(e);if(t){var n={type:"html",raw:t[0],pre:!this.options.sanitizer&&("pre"===t[1]||"script"===t[1]||"style"===t[1]),text:t[0]};if(this.options.sanitize){var r=this.options.sanitizer?this.options.sanitizer(t[0]):Ks(t[0]);n.type="paragraph",n.text=r,n.tokens=this.lexer.inline(r)}return n}}},{key:"def",value:function(e){var t=this.rules.block.def.exec(e);if(t)return t[3]&&(t[3]=t[3].substring(1,t[3].length-1)),{type:"def",tag:t[1].toLowerCase().replace(/\s+/g," "),raw:t[0],href:t[2]?t[2].replace(this.rules.inline._escapes,"$1"):t[2],title:t[3]?t[3].replace(this.rules.inline._escapes,"$1"):t[3]}}},{key:"table",value:function(e){var t=this.rules.block.table.exec(e);if(t){var n={type:"table",header:hf(t[1]).map((function(e){return{text:e}})),align:t[2].replace(/^ *|\| *$/g,"").split(/ *\| */),rows:t[3]&&t[3].trim()?t[3].replace(/\n[ \t]*$/,"").split("\n"):[]};if(n.header.length===n.align.length){n.raw=t[0];var r,i,o,a,u=n.align.length;for(r=0;r/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:this.options.sanitize?"text":"html",raw:t[0],inLink:this.lexer.state.inLink,inRawBlock:this.lexer.state.inRawBlock,text:this.options.sanitize?this.options.sanitizer?this.options.sanitizer(t[0]):Ks(t[0]):t[0]}}},{key:"link",value:function(e){var t=this.rules.inline.link.exec(e);if(t){var n=t[2].trim();if(!this.options.pedantic&&/^$/.test(n))return;var r=pf(n.slice(0,-1),"\\");if((n.length-r.length)%2===0)return}else{var i=function(e,t){if(-1===e.indexOf(t[1]))return-1;for(var n=e.length,r=0,i=0;i-1){var o=(0===t[0].indexOf("!")?5:4)+t[1].length+i;t[2]=t[2].substring(0,i),t[0]=t[0].substring(0,o).trim(),t[3]=""}}var a=t[2],u="";if(this.options.pedantic){var l=/^([^'"]*[^\s])\s+(['"])(.*)\2/.exec(a);l&&(a=l[1],u=l[3])}else u=t[3]?t[3].slice(1,-1):"";return a=a.trim(),/^$/.test(n)?a.slice(1):a.slice(1,-1)),yf(t,{href:a?a.replace(this.rules.inline._escapes,"$1"):a,title:u?u.replace(this.rules.inline._escapes,"$1"):u},t[0],this.lexer)}}},{key:"reflink",value:function(e,t){var n;if((n=this.rules.inline.reflink.exec(e))||(n=this.rules.inline.nolink.exec(e))){var r=(n[2]||n[1]).replace(/\s+/g," ");if(!(r=t[r.toLowerCase()])||!r.href){var i=n[0].charAt(0);return{type:"text",raw:i,text:i}}return yf(n,r,n[0],this.lexer)}}},{key:"emStrong",value:function(e,t){var n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:"",r=this.rules.inline.emStrong.lDelim.exec(e);if(r&&(!r[3]||!n.match(/(?:[0-9A-Za-z\xAA\xB2\xB3\xB5\xB9\xBA\xBC-\xBE\xC0-\xD6\xD8-\xF6\xF8-\u02C1\u02C6-\u02D1\u02E0-\u02E4\u02EC\u02EE\u0370-\u0374\u0376\u0377\u037A-\u037D\u037F\u0386\u0388-\u038A\u038C\u038E-\u03A1\u03A3-\u03F5\u03F7-\u0481\u048A-\u052F\u0531-\u0556\u0559\u0560-\u0588\u05D0-\u05EA\u05EF-\u05F2\u0620-\u064A\u0660-\u0669\u066E\u066F\u0671-\u06D3\u06D5\u06E5\u06E6\u06EE-\u06FC\u06FF\u0710\u0712-\u072F\u074D-\u07A5\u07B1\u07C0-\u07EA\u07F4\u07F5\u07FA\u0800-\u0815\u081A\u0824\u0828\u0840-\u0858\u0860-\u086A\u0870-\u0887\u0889-\u088E\u08A0-\u08C9\u0904-\u0939\u093D\u0950\u0958-\u0961\u0966-\u096F\u0971-\u0980\u0985-\u098C\u098F\u0990\u0993-\u09A8\u09AA-\u09B0\u09B2\u09B6-\u09B9\u09BD\u09CE\u09DC\u09DD\u09DF-\u09E1\u09E6-\u09F1\u09F4-\u09F9\u09FC\u0A05-\u0A0A\u0A0F\u0A10\u0A13-\u0A28\u0A2A-\u0A30\u0A32\u0A33\u0A35\u0A36\u0A38\u0A39\u0A59-\u0A5C\u0A5E\u0A66-\u0A6F\u0A72-\u0A74\u0A85-\u0A8D\u0A8F-\u0A91\u0A93-\u0AA8\u0AAA-\u0AB0\u0AB2\u0AB3\u0AB5-\u0AB9\u0ABD\u0AD0\u0AE0\u0AE1\u0AE6-\u0AEF\u0AF9\u0B05-\u0B0C\u0B0F\u0B10\u0B13-\u0B28\u0B2A-\u0B30\u0B32\u0B33\u0B35-\u0B39\u0B3D\u0B5C\u0B5D\u0B5F-\u0B61\u0B66-\u0B6F\u0B71-\u0B77\u0B83\u0B85-\u0B8A\u0B8E-\u0B90\u0B92-\u0B95\u0B99\u0B9A\u0B9C\u0B9E\u0B9F\u0BA3\u0BA4\u0BA8-\u0BAA\u0BAE-\u0BB9\u0BD0\u0BE6-\u0BF2\u0C05-\u0C0C\u0C0E-\u0C10\u0C12-\u0C28\u0C2A-\u0C39\u0C3D\u0C58-\u0C5A\u0C5D\u0C60\u0C61\u0C66-\u0C6F\u0C78-\u0C7E\u0C80\u0C85-\u0C8C\u0C8E-\u0C90\u0C92-\u0CA8\u0CAA-\u0CB3\u0CB5-\u0CB9\u0CBD\u0CDD\u0CDE\u0CE0\u0CE1\u0CE6-\u0CEF\u0CF1\u0CF2\u0D04-\u0D0C\u0D0E-\u0D10\u0D12-\u0D3A\u0D3D\u0D4E\u0D54-\u0D56\u0D58-\u0D61\u0D66-\u0D78\u0D7A-\u0D7F\u0D85-\u0D96\u0D9A-\u0DB1\u0DB3-\u0DBB\u0DBD\u0DC0-\u0DC6\u0DE6-\u0DEF\u0E01-\u0E30\u0E32\u0E33\u0E40-\u0E46\u0E50-\u0E59\u0E81\u0E82\u0E84\u0E86-\u0E8A\u0E8C-\u0EA3\u0EA5\u0EA7-\u0EB0\u0EB2\u0EB3\u0EBD\u0EC0-\u0EC4\u0EC6\u0ED0-\u0ED9\u0EDC-\u0EDF\u0F00\u0F20-\u0F33\u0F40-\u0F47\u0F49-\u0F6C\u0F88-\u0F8C\u1000-\u102A\u103F-\u1049\u1050-\u1055\u105A-\u105D\u1061\u1065\u1066\u106E-\u1070\u1075-\u1081\u108E\u1090-\u1099\u10A0-\u10C5\u10C7\u10CD\u10D0-\u10FA\u10FC-\u1248\u124A-\u124D\u1250-\u1256\u1258\u125A-\u125D\u1260-\u1288\u128A-\u128D\u1290-\u12B0\u12B2-\u12B5\u12B8-\u12BE\u12C0\u12C2-\u12C5\u12C8-\u12D6\u12D8-\u1310\u1312-\u1315\u1318-\u135A\u1369-\u137C\u1380-\u138F\u13A0-\u13F5\u13F8-\u13FD\u1401-\u166C\u166F-\u167F\u1681-\u169A\u16A0-\u16EA\u16EE-\u16F8\u1700-\u1711\u171F-\u1731\u1740-\u1751\u1760-\u176C\u176E-\u1770\u1780-\u17B3\u17D7\u17DC\u17E0-\u17E9\u17F0-\u17F9\u1810-\u1819\u1820-\u1878\u1880-\u1884\u1887-\u18A8\u18AA\u18B0-\u18F5\u1900-\u191E\u1946-\u196D\u1970-\u1974\u1980-\u19AB\u19B0-\u19C9\u19D0-\u19DA\u1A00-\u1A16\u1A20-\u1A54\u1A80-\u1A89\u1A90-\u1A99\u1AA7\u1B05-\u1B33\u1B45-\u1B4C\u1B50-\u1B59\u1B83-\u1BA0\u1BAE-\u1BE5\u1C00-\u1C23\u1C40-\u1C49\u1C4D-\u1C7D\u1C80-\u1C88\u1C90-\u1CBA\u1CBD-\u1CBF\u1CE9-\u1CEC\u1CEE-\u1CF3\u1CF5\u1CF6\u1CFA\u1D00-\u1DBF\u1E00-\u1F15\u1F18-\u1F1D\u1F20-\u1F45\u1F48-\u1F4D\u1F50-\u1F57\u1F59\u1F5B\u1F5D\u1F5F-\u1F7D\u1F80-\u1FB4\u1FB6-\u1FBC\u1FBE\u1FC2-\u1FC4\u1FC6-\u1FCC\u1FD0-\u1FD3\u1FD6-\u1FDB\u1FE0-\u1FEC\u1FF2-\u1FF4\u1FF6-\u1FFC\u2070\u2071\u2074-\u2079\u207F-\u2089\u2090-\u209C\u2102\u2107\u210A-\u2113\u2115\u2119-\u211D\u2124\u2126\u2128\u212A-\u212D\u212F-\u2139\u213C-\u213F\u2145-\u2149\u214E\u2150-\u2189\u2460-\u249B\u24EA-\u24FF\u2776-\u2793\u2C00-\u2CE4\u2CEB-\u2CEE\u2CF2\u2CF3\u2CFD\u2D00-\u2D25\u2D27\u2D2D\u2D30-\u2D67\u2D6F\u2D80-\u2D96\u2DA0-\u2DA6\u2DA8-\u2DAE\u2DB0-\u2DB6\u2DB8-\u2DBE\u2DC0-\u2DC6\u2DC8-\u2DCE\u2DD0-\u2DD6\u2DD8-\u2DDE\u2E2F\u3005-\u3007\u3021-\u3029\u3031-\u3035\u3038-\u303C\u3041-\u3096\u309D-\u309F\u30A1-\u30FA\u30FC-\u30FF\u3105-\u312F\u3131-\u318E\u3192-\u3195\u31A0-\u31BF\u31F0-\u31FF\u3220-\u3229\u3248-\u324F\u3251-\u325F\u3280-\u3289\u32B1-\u32BF\u3400-\u4DBF\u4E00-\uA48C\uA4D0-\uA4FD\uA500-\uA60C\uA610-\uA62B\uA640-\uA66E\uA67F-\uA69D\uA6A0-\uA6EF\uA717-\uA71F\uA722-\uA788\uA78B-\uA7CA\uA7D0\uA7D1\uA7D3\uA7D5-\uA7D9\uA7F2-\uA801\uA803-\uA805\uA807-\uA80A\uA80C-\uA822\uA830-\uA835\uA840-\uA873\uA882-\uA8B3\uA8D0-\uA8D9\uA8F2-\uA8F7\uA8FB\uA8FD\uA8FE\uA900-\uA925\uA930-\uA946\uA960-\uA97C\uA984-\uA9B2\uA9CF-\uA9D9\uA9E0-\uA9E4\uA9E6-\uA9FE\uAA00-\uAA28\uAA40-\uAA42\uAA44-\uAA4B\uAA50-\uAA59\uAA60-\uAA76\uAA7A\uAA7E-\uAAAF\uAAB1\uAAB5\uAAB6\uAAB9-\uAABD\uAAC0\uAAC2\uAADB-\uAADD\uAAE0-\uAAEA\uAAF2-\uAAF4\uAB01-\uAB06\uAB09-\uAB0E\uAB11-\uAB16\uAB20-\uAB26\uAB28-\uAB2E\uAB30-\uAB5A\uAB5C-\uAB69\uAB70-\uABE2\uABF0-\uABF9\uAC00-\uD7A3\uD7B0-\uD7C6\uD7CB-\uD7FB\uF900-\uFA6D\uFA70-\uFAD9\uFB00-\uFB06\uFB13-\uFB17\uFB1D\uFB1F-\uFB28\uFB2A-\uFB36\uFB38-\uFB3C\uFB3E\uFB40\uFB41\uFB43\uFB44\uFB46-\uFBB1\uFBD3-\uFD3D\uFD50-\uFD8F\uFD92-\uFDC7\uFDF0-\uFDFB\uFE70-\uFE74\uFE76-\uFEFC\uFF10-\uFF19\uFF21-\uFF3A\uFF41-\uFF5A\uFF66-\uFFBE\uFFC2-\uFFC7\uFFCA-\uFFCF\uFFD2-\uFFD7\uFFDA-\uFFDC]|\uD800[\uDC00-\uDC0B\uDC0D-\uDC26\uDC28-\uDC3A\uDC3C\uDC3D\uDC3F-\uDC4D\uDC50-\uDC5D\uDC80-\uDCFA\uDD07-\uDD33\uDD40-\uDD78\uDD8A\uDD8B\uDE80-\uDE9C\uDEA0-\uDED0\uDEE1-\uDEFB\uDF00-\uDF23\uDF2D-\uDF4A\uDF50-\uDF75\uDF80-\uDF9D\uDFA0-\uDFC3\uDFC8-\uDFCF\uDFD1-\uDFD5]|\uD801[\uDC00-\uDC9D\uDCA0-\uDCA9\uDCB0-\uDCD3\uDCD8-\uDCFB\uDD00-\uDD27\uDD30-\uDD63\uDD70-\uDD7A\uDD7C-\uDD8A\uDD8C-\uDD92\uDD94\uDD95\uDD97-\uDDA1\uDDA3-\uDDB1\uDDB3-\uDDB9\uDDBB\uDDBC\uDE00-\uDF36\uDF40-\uDF55\uDF60-\uDF67\uDF80-\uDF85\uDF87-\uDFB0\uDFB2-\uDFBA]|\uD802[\uDC00-\uDC05\uDC08\uDC0A-\uDC35\uDC37\uDC38\uDC3C\uDC3F-\uDC55\uDC58-\uDC76\uDC79-\uDC9E\uDCA7-\uDCAF\uDCE0-\uDCF2\uDCF4\uDCF5\uDCFB-\uDD1B\uDD20-\uDD39\uDD80-\uDDB7\uDDBC-\uDDCF\uDDD2-\uDE00\uDE10-\uDE13\uDE15-\uDE17\uDE19-\uDE35\uDE40-\uDE48\uDE60-\uDE7E\uDE80-\uDE9F\uDEC0-\uDEC7\uDEC9-\uDEE4\uDEEB-\uDEEF\uDF00-\uDF35\uDF40-\uDF55\uDF58-\uDF72\uDF78-\uDF91\uDFA9-\uDFAF]|\uD803[\uDC00-\uDC48\uDC80-\uDCB2\uDCC0-\uDCF2\uDCFA-\uDD23\uDD30-\uDD39\uDE60-\uDE7E\uDE80-\uDEA9\uDEB0\uDEB1\uDF00-\uDF27\uDF30-\uDF45\uDF51-\uDF54\uDF70-\uDF81\uDFB0-\uDFCB\uDFE0-\uDFF6]|\uD804[\uDC03-\uDC37\uDC52-\uDC6F\uDC71\uDC72\uDC75\uDC83-\uDCAF\uDCD0-\uDCE8\uDCF0-\uDCF9\uDD03-\uDD26\uDD36-\uDD3F\uDD44\uDD47\uDD50-\uDD72\uDD76\uDD83-\uDDB2\uDDC1-\uDDC4\uDDD0-\uDDDA\uDDDC\uDDE1-\uDDF4\uDE00-\uDE11\uDE13-\uDE2B\uDE3F\uDE40\uDE80-\uDE86\uDE88\uDE8A-\uDE8D\uDE8F-\uDE9D\uDE9F-\uDEA8\uDEB0-\uDEDE\uDEF0-\uDEF9\uDF05-\uDF0C\uDF0F\uDF10\uDF13-\uDF28\uDF2A-\uDF30\uDF32\uDF33\uDF35-\uDF39\uDF3D\uDF50\uDF5D-\uDF61]|\uD805[\uDC00-\uDC34\uDC47-\uDC4A\uDC50-\uDC59\uDC5F-\uDC61\uDC80-\uDCAF\uDCC4\uDCC5\uDCC7\uDCD0-\uDCD9\uDD80-\uDDAE\uDDD8-\uDDDB\uDE00-\uDE2F\uDE44\uDE50-\uDE59\uDE80-\uDEAA\uDEB8\uDEC0-\uDEC9\uDF00-\uDF1A\uDF30-\uDF3B\uDF40-\uDF46]|\uD806[\uDC00-\uDC2B\uDCA0-\uDCF2\uDCFF-\uDD06\uDD09\uDD0C-\uDD13\uDD15\uDD16\uDD18-\uDD2F\uDD3F\uDD41\uDD50-\uDD59\uDDA0-\uDDA7\uDDAA-\uDDD0\uDDE1\uDDE3\uDE00\uDE0B-\uDE32\uDE3A\uDE50\uDE5C-\uDE89\uDE9D\uDEB0-\uDEF8]|\uD807[\uDC00-\uDC08\uDC0A-\uDC2E\uDC40\uDC50-\uDC6C\uDC72-\uDC8F\uDD00-\uDD06\uDD08\uDD09\uDD0B-\uDD30\uDD46\uDD50-\uDD59\uDD60-\uDD65\uDD67\uDD68\uDD6A-\uDD89\uDD98\uDDA0-\uDDA9\uDEE0-\uDEF2\uDF02\uDF04-\uDF10\uDF12-\uDF33\uDF50-\uDF59\uDFB0\uDFC0-\uDFD4]|\uD808[\uDC00-\uDF99]|\uD809[\uDC00-\uDC6E\uDC80-\uDD43]|\uD80B[\uDF90-\uDFF0]|[\uD80C\uD81C-\uD820\uD822\uD840-\uD868\uD86A-\uD86C\uD86F-\uD872\uD874-\uD879\uD880-\uD883\uD885-\uD887][\uDC00-\uDFFF]|\uD80D[\uDC00-\uDC2F\uDC41-\uDC46]|\uD811[\uDC00-\uDE46]|\uD81A[\uDC00-\uDE38\uDE40-\uDE5E\uDE60-\uDE69\uDE70-\uDEBE\uDEC0-\uDEC9\uDED0-\uDEED\uDF00-\uDF2F\uDF40-\uDF43\uDF50-\uDF59\uDF5B-\uDF61\uDF63-\uDF77\uDF7D-\uDF8F]|\uD81B[\uDE40-\uDE96\uDF00-\uDF4A\uDF50\uDF93-\uDF9F\uDFE0\uDFE1\uDFE3]|\uD821[\uDC00-\uDFF7]|\uD823[\uDC00-\uDCD5\uDD00-\uDD08]|\uD82B[\uDFF0-\uDFF3\uDFF5-\uDFFB\uDFFD\uDFFE]|\uD82C[\uDC00-\uDD22\uDD32\uDD50-\uDD52\uDD55\uDD64-\uDD67\uDD70-\uDEFB]|\uD82F[\uDC00-\uDC6A\uDC70-\uDC7C\uDC80-\uDC88\uDC90-\uDC99]|\uD834[\uDEC0-\uDED3\uDEE0-\uDEF3\uDF60-\uDF78]|\uD835[\uDC00-\uDC54\uDC56-\uDC9C\uDC9E\uDC9F\uDCA2\uDCA5\uDCA6\uDCA9-\uDCAC\uDCAE-\uDCB9\uDCBB\uDCBD-\uDCC3\uDCC5-\uDD05\uDD07-\uDD0A\uDD0D-\uDD14\uDD16-\uDD1C\uDD1E-\uDD39\uDD3B-\uDD3E\uDD40-\uDD44\uDD46\uDD4A-\uDD50\uDD52-\uDEA5\uDEA8-\uDEC0\uDEC2-\uDEDA\uDEDC-\uDEFA\uDEFC-\uDF14\uDF16-\uDF34\uDF36-\uDF4E\uDF50-\uDF6E\uDF70-\uDF88\uDF8A-\uDFA8\uDFAA-\uDFC2\uDFC4-\uDFCB\uDFCE-\uDFFF]|\uD837[\uDF00-\uDF1E\uDF25-\uDF2A]|\uD838[\uDC30-\uDC6D\uDD00-\uDD2C\uDD37-\uDD3D\uDD40-\uDD49\uDD4E\uDE90-\uDEAD\uDEC0-\uDEEB\uDEF0-\uDEF9]|\uD839[\uDCD0-\uDCEB\uDCF0-\uDCF9\uDFE0-\uDFE6\uDFE8-\uDFEB\uDFED\uDFEE\uDFF0-\uDFFE]|\uD83A[\uDC00-\uDCC4\uDCC7-\uDCCF\uDD00-\uDD43\uDD4B\uDD50-\uDD59]|\uD83B[\uDC71-\uDCAB\uDCAD-\uDCAF\uDCB1-\uDCB4\uDD01-\uDD2D\uDD2F-\uDD3D\uDE00-\uDE03\uDE05-\uDE1F\uDE21\uDE22\uDE24\uDE27\uDE29-\uDE32\uDE34-\uDE37\uDE39\uDE3B\uDE42\uDE47\uDE49\uDE4B\uDE4D-\uDE4F\uDE51\uDE52\uDE54\uDE57\uDE59\uDE5B\uDE5D\uDE5F\uDE61\uDE62\uDE64\uDE67-\uDE6A\uDE6C-\uDE72\uDE74-\uDE77\uDE79-\uDE7C\uDE7E\uDE80-\uDE89\uDE8B-\uDE9B\uDEA1-\uDEA3\uDEA5-\uDEA9\uDEAB-\uDEBB]|\uD83C[\uDD00-\uDD0C]|\uD83E[\uDFF0-\uDFF9]|\uD869[\uDC00-\uDEDF\uDF00-\uDFFF]|\uD86D[\uDC00-\uDF39\uDF40-\uDFFF]|\uD86E[\uDC00-\uDC1D\uDC20-\uDFFF]|\uD873[\uDC00-\uDEA1\uDEB0-\uDFFF]|\uD87A[\uDC00-\uDFE0]|\uD87E[\uDC00-\uDE1D]|\uD884[\uDC00-\uDF4A\uDF50-\uDFFF]|\uD888[\uDC00-\uDFAF])/))){var i=r[1]||r[2]||"";if(!i||i&&(""===n||this.rules.inline.punctuation.exec(n))){var o,a,u=r[0].length-1,l=u,c=0,s="*"===r[0][0]?this.rules.inline.emStrong.rDelimAst:this.rules.inline.emStrong.rDelimUnd;for(s.lastIndex=0,t=t.slice(-1*e.length+u);null!=(r=s.exec(t));)if(o=r[1]||r[2]||r[3]||r[4]||r[5]||r[6])if(a=o.length,r[3]||r[4])l+=a;else if(!((r[5]||r[6])&&u%3)||(u+a)%3){if(!((l-=a)>0)){a=Math.min(a,a+l+c);var f=e.slice(0,u+r.index+(r[0].length-o.length)+a);if(Math.min(u,a)%2){var d=f.slice(1,-1);return{type:"em",raw:f,text:d,tokens:this.lexer.inlineTokens(d)}}var h=f.slice(2,-2);return{type:"strong",raw:f,text:h,tokens:this.lexer.inlineTokens(h)}}}else c+=a}}}},{key:"codespan",value:function(e){var t=this.rules.inline.code.exec(e);if(t){var n=t[2].replace(/\n/g," "),r=/[^ ]/.test(n),i=/^ /.test(n)&&/ $/.test(n);return r&&i&&(n=n.substring(1,n.length-1)),n=Ks(n,!0),{type:"codespan",raw:t[0],text:n}}}},{key:"br",value:function(e){var t=this.rules.inline.br.exec(e);if(t)return{type:"br",raw:t[0]}}},{key:"del",value:function(e){var t=this.rules.inline.del.exec(e);if(t)return{type:"del",raw:t[0],text:t[2],tokens:this.lexer.inlineTokens(t[2])}}},{key:"autolink",value:function(e,t){var n,r,i=this.rules.inline.autolink.exec(e);if(i)return r="@"===i[2]?"mailto:"+(n=Ks(this.options.mangle?t(i[1]):i[1])):n=Ks(i[1]),{type:"link",raw:i[0],text:n,href:r,tokens:[{type:"text",raw:n,text:n}]}}},{key:"url",value:function(e,t){var n;if(n=this.rules.inline.url.exec(e)){var r,i;if("@"===n[2])i="mailto:"+(r=Ks(this.options.mangle?t(n[0]):n[0]));else{var o;do{o=n[0],n[0]=this.rules.inline._backpedal.exec(n[0])[0]}while(o!==n[0]);r=Ks(n[0]),i="www."===n[1]?"http://"+r:r}return{type:"link",raw:n[0],text:r,href:i,tokens:[{type:"text",raw:r,text:r}]}}}},{key:"inlineText",value:function(e,t){var n,r=this.rules.inline.text.exec(e);if(r)return n=this.lexer.state.inRawBlock?this.options.sanitize?this.options.sanitizer?this.options.sanitizer(r[0]):Ks(r[0]):r[0]:Ks(this.options.smartypants?t(r[0]):r[0]),{type:"text",raw:r[0],text:n}}}]),e}(),_f={newline:/^(?: *(?:\n|$))+/,code:/^( {4}[^\n]+(?:\n(?: *(?:\n|$))*)?)+/,fences:/^ {0,3}(`{3,}(?=[^`\n]*\n)|~{3,})([^\n]*)\n(?:|([\s\S]*?)\n)(?: {0,3}\1[~`]* *(?=\n|$)|$)/,hr:/^ {0,3}((?:-[\t ]*){3,}|(?:_[ \t]*){3,}|(?:\*[ \t]*){3,})(?:\n+|$)/,heading:/^ {0,3}(#{1,6})(?=\s|$)(.*)(?:\n+|$)/,blockquote:/^( {0,3}> ?(paragraph|[^\n]*)(?:\n|$))+/,list:/^( {0,3}bull)([ \t][^\n]+?)?(?:\n|$)/,html:"^ {0,3}(?:<(script|pre|style|textarea)[\\s>][\\s\\S]*?(?:[^\\n]*\\n+|$)|comment[^\\n]*(\\n+|$)|<\\?[\\s\\S]*?(?:\\?>\\n*|$)|\\n*|$)|\\n*|$)|)[\\s\\S]*?(?:(?:\\n *)+\\n|$)|<(?!script|pre|style|textarea)([a-z][\\w-]*)(?:attribute)*? */?>(?=[ \\t]*(?:\\n|$))[\\s\\S]*?(?:(?:\\n *)+\\n|$)|(?=[ \\t]*(?:\\n|$))[\\s\\S]*?(?:(?:\\n *)+\\n|$))",def:/^ {0,3}\[(label)\]: *(?:\n *)?]+)>?(?:(?: +(?:\n *)?| *\n *)(title))? *(?:\n+|$)/,table:ff,lheading:/^([^\n]+)\n {0,3}(=+|-+) *(?:\n+|$)/,_paragraph:/^([^\n]+(?:\n(?!hr|heading|lheading|blockquote|fences|list|html|table| +\n)[^\n]+)*)/,text:/^[^\n]+/,_label:/(?!\s*\])(?:\\.|[^\[\]\\])+/,_title:/(?:"(?:\\"?|[^"\\])*"|'[^'\n]*(?:\n[^'\n]+)*\n?'|\([^()]*\))/};_f.def=nf(_f.def).replace("label",_f._label).replace("title",_f._title).getRegex(),_f.bullet=/(?:[*+-]|\d{1,9}[.)])/,_f.listItemStart=nf(/^( *)(bull) */).replace("bull",_f.bullet).getRegex(),_f.list=nf(_f.list).replace(/bull/g,_f.bullet).replace("hr","\\n+(?=\\1?(?:(?:- *){3,}|(?:_ *){3,}|(?:\\* *){3,})(?:\\n+|$))").replace("def","\\n+(?="+_f.def.source+")").getRegex(),_f._tag="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|section|source|summary|table|tbody|td|tfoot|th|thead|title|tr|track|ul",_f._comment=/|$)/,_f.html=nf(_f.html,"i").replace("comment",_f._comment).replace("tag",_f._tag).replace("attribute",/ +[a-zA-Z:_][\w.:-]*(?: *= *"[^"\n]*"| *= *'[^'\n]*'| *= *[^\s"'=<>`]+)?/).getRegex(),_f.paragraph=nf(_f._paragraph).replace("hr",_f.hr).replace("heading"," {0,3}#{1,6} ").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",_f._tag).getRegex(),_f.blockquote=nf(_f.blockquote).replace("paragraph",_f.paragraph).getRegex(),_f.normal=df({},_f),_f.gfm=df({},_f.normal,{table:"^ *([^\\n ].*\\|.*)\\n {0,3}(?:\\| *)?(:?-+:? *(?:\\| *:?-+:? *)*)(?:\\| *)?(?:\\n((?:(?! *\\n|hr|heading|blockquote|code|fences|list|html).*(?:\\n|$))*)\\n*|$)"}),_f.gfm.table=nf(_f.gfm.table).replace("hr",_f.hr).replace("heading"," {0,3}#{1,6} ").replace("blockquote"," {0,3}>").replace("code"," {4}[^\\n]").replace("fences"," {0,3}(?:`{3,}(?=[^`\\n]*\\n)|~{3,})[^\\n]*\\n").replace("list"," {0,3}(?:[*+-]|1[.)]) ").replace("html",")|<(?:script|pre|style|textarea|!--)").replace("tag",_f._tag).getRegex(),_f.gfm.paragraph=nf(_f._paragraph).replace("hr",_f.hr).replace("heading"," {0,3}#{1,6} ").replace("|lheading","").replace("table",_f.gfm.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",_f._tag).getRegex(),_f.pedantic=df({},_f.normal,{html:nf("^ *(?:comment *(?:\\n|\\s*$)|<(tag)[\\s\\S]+? *(?:\\n{2,}|\\s*$)|\\s]*)*?/?> *(?:\\n{2,}|\\s*$))").replace("comment",_f._comment).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:ff,paragraph:nf(_f.normal._paragraph).replace("hr",_f.hr).replace("heading"," *#{1,6} *[^\n]").replace("lheading",_f.lheading).replace("blockquote"," {0,3}>").replace("|fences","").replace("|list","").replace("|html","").getRegex()});var bf={escape:/^\\([!"#$%&'()*+,\-./:;<=>?@\[\]\\^_`{|}~])/,autolink:/^<(scheme:[^\s\x00-\x1f<>]*|email)>/,url:ff,tag:"^comment|^|^<[a-zA-Z][\\w-]*(?:attribute)*?\\s*/?>|^<\\?[\\s\\S]*?\\?>|^|^",link:/^!?\[(label)\]\(\s*(href)(?:\s+(title))?\s*\)/,reflink:/^!?\[(label)\]\[(ref)\]/,nolink:/^!?\[(ref)\](?:\[\])?/,reflinkSearch:"reflink|nolink(?!\\()",emStrong:{lDelim:/^(?:\*+(?:([punct_])|[^\s*]))|^_+(?:([punct*])|([^\s_]))/,rDelimAst:/^(?:[^_*\\]|\\.)*?\_\_(?:[^_*\\]|\\.)*?\*(?:[^_*\\]|\\.)*?(?=\_\_)|(?:[^*\\]|\\.)+(?=[^*])|[punct_](\*+)(?=[\s]|$)|(?:[^punct*_\s\\]|\\.)(\*+)(?=[punct_\s]|$)|[punct_\s](\*+)(?=[^punct*_\s])|[\s](\*+)(?=[punct_])|[punct_](\*+)(?=[punct_])|(?:[^punct*_\s\\]|\\.)(\*+)(?=[^punct*_\s])/,rDelimUnd:/^(?:[^_*\\]|\\.)*?\*\*(?:[^_*\\]|\\.)*?\_(?:[^_*\\]|\\.)*?(?=\*\*)|(?:[^_\\]|\\.)+(?=[^_])|[punct*](\_+)(?=[\s]|$)|(?:[^punct*_\s\\]|\\.)(\_+)(?=[punct*\s]|$)|[punct*\s](\_+)(?=[^punct*_\s])|[\s](\_+)(?=[punct*])|[punct*](\_+)(?=[punct*])/},code:/^(`+)([^`]|[^`][\s\S]*?[^`])\1(?!`)/,br:/^( {2,}|\\)\n(?!\s*$)/,del:ff,text:/^(`+|[^`])(?:(?= {2,}\n)|[\s\S]*?(?:(?=[\\.5&&(n="x"+n.toString(16)),r+="&#"+n+";";return r}bf._punctuation="!\"#$%&'()+\\-.,/:;<=>?@\\[\\]`^{|}~",bf.punctuation=nf(bf.punctuation).replace(/punctuation/g,bf._punctuation).getRegex(),bf.blockSkip=/\[[^\]]*?\]\([^\)]*?\)|`[^`]*?`|<[^>]*?>/g,bf.escapedEmSt=/(?:^|[^\\])(?:\\\\)*\\[*_]/g,bf._comment=nf(_f._comment).replace("(?:--\x3e|$)","--\x3e").getRegex(),bf.emStrong.lDelim=nf(bf.emStrong.lDelim).replace(/punct/g,bf._punctuation).getRegex(),bf.emStrong.rDelimAst=nf(bf.emStrong.rDelimAst,"g").replace(/punct/g,bf._punctuation).getRegex(),bf.emStrong.rDelimUnd=nf(bf.emStrong.rDelimUnd,"g").replace(/punct/g,bf._punctuation).getRegex(),bf._escapes=/\\([!"#$%&'()*+,\-./:;<=>?@\[\]\\^_`{|}~])/g,bf._scheme=/[a-zA-Z][a-zA-Z0-9+.-]{1,31}/,bf._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])?)+(?![-_])/,bf.autolink=nf(bf.autolink).replace("scheme",bf._scheme).replace("email",bf._email).getRegex(),bf._attribute=/\s+[a-zA-Z:_][\w.:-]*(?:\s*=\s*"[^"]*"|\s*=\s*'[^']*'|\s*=\s*[^\s"'=<>`]+)?/,bf.tag=nf(bf.tag).replace("comment",bf._comment).replace("attribute",bf._attribute).getRegex(),bf._label=/(?:\[(?:\\.|[^\[\]\\])*\]|\\.|`[^`]*`|[^\[\]\\`])*?/,bf._href=/<(?:\\.|[^\n<>\\])+>|[^\s\x00-\x1f]*/,bf._title=/"(?:\\"?|[^"\\])*"|'(?:\\'?|[^'\\])*'|\((?:\\\)?|[^)\\])*\)/,bf.link=nf(bf.link).replace("label",bf._label).replace("href",bf._href).replace("title",bf._title).getRegex(),bf.reflink=nf(bf.reflink).replace("label",bf._label).replace("ref",_f._label).getRegex(),bf.nolink=nf(bf.nolink).replace("ref",_f._label).getRegex(),bf.reflinkSearch=nf(bf.reflinkSearch,"g").replace("reflink",bf.reflink).replace("nolink",bf.nolink).getRegex(),bf.normal=df({},bf),bf.pedantic=df({},bf.normal,{strong:{start:/^__|\*\*/,middle:/^__(?=\S)([\s\S]*?\S)__(?!_)|^\*\*(?=\S)([\s\S]*?\S)\*\*(?!\*)/,endAst:/\*\*(?!\*)/g,endUnd:/__(?!_)/g},em:{start:/^_|\*/,middle:/^()\*(?=\S)([\s\S]*?\S)\*(?!\*)|^_(?=\S)([\s\S]*?\S)_(?!_)/,endAst:/\*(?!\*)/g,endUnd:/_(?!_)/g},link:nf(/^!?\[(label)\]\((.*?)\)/).replace("label",bf._label).getRegex(),reflink:nf(/^!?\[(label)\]\s*\[([^\]]*)\]/).replace("label",bf._label).getRegex()}),bf.gfm=df({},bf.normal,{escape:nf(bf.escape).replace("])","~|])").getRegex(),_extended_email:/[A-Za-z0-9._+-]+(@)[a-zA-Z0-9-_]+(?:\.[a-zA-Z0-9-_]*[a-zA-Z0-9])+(?![-_])/,url:/^((?:ftp|https?):\/\/|www\.)(?:[a-zA-Z0-9\-]+\.?)+[^\s<]*|^email/,_backpedal:/(?:[^?!.,:;*_~()&]+|\([^)]*\)|&(?![a-zA-Z0-9]+;$)|[?!.,:;*_~)]+(?!$))+/,del:/^(~~?)(?=[^\s~])([\s\S]*?[^\s~])\1(?=[^~]|$)/,text:/^([`~]+|[^`~])(?:(?= {2,}\n)|(?=[a-zA-Z0-9.!#$%&'*+\/=?_`{\|}~-]+@)|[\s\S]*?(?:(?=[\\1&&void 0!==arguments[1]?arguments[1]:[];for(e=this.options.pedantic?e.replace(/\t/g," ").replace(/^ +$/gm,""):e.replace(/^( *)(\t+)/gm,(function(e,t,n){return t+" ".repeat(n.length)}));e;)if(!(this.options.extensions&&this.options.extensions.block&&this.options.extensions.block.some((function(n){return!!(t=n.call({lexer:o},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])||"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])||"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&&function(){var t=1/0,n=e.slice(1),i=void 0;o.options.extensions.startBlock.forEach((function(e){"number"===typeof(i=e.call({lexer:this},n))&&i>=0&&(t=Math.min(t,i))})),t<1/0&&t>=0&&(r=e.substring(0,t+1))}(),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])&&"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){var u="Infinite loop on byte: "+e.charCodeAt(0);if(this.options.silent){console.error(u);break}throw new Error(u)}return this.state.top=!0,a}},{key:"inline",value:function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:[];return this.inlineQueue.push({src:e,tokens:t}),t}},{key:"inlineTokens",value:function(e){var t,n,r,i,o,a,u=this,l=arguments.length>1&&void 0!==arguments[1]?arguments[1]:[],c=e;if(this.tokens.links){var s=Object.keys(this.tokens.links);if(s.length>0)for(;null!=(i=this.tokenizer.rules.inline.reflinkSearch.exec(c));)s.includes(i[0].slice(i[0].lastIndexOf("[")+1,-1))&&(c=c.slice(0,i.index)+"["+mf("a",i[0].length-2)+"]"+c.slice(this.tokenizer.rules.inline.reflinkSearch.lastIndex))}for(;null!=(i=this.tokenizer.rules.inline.blockSkip.exec(c));)c=c.slice(0,i.index)+"["+mf("a",i[0].length-2)+"]"+c.slice(this.tokenizer.rules.inline.blockSkip.lastIndex);for(;null!=(i=this.tokenizer.rules.inline.escapedEmSt.exec(c));)c=c.slice(0,i.index+i[0].length-2)+"++"+c.slice(this.tokenizer.rules.inline.escapedEmSt.lastIndex),this.tokenizer.rules.inline.escapedEmSt.lastIndex--;for(;e;)if(o||(a=""),o=!1,!(this.options.extensions&&this.options.extensions.inline&&this.options.extensions.inline.some((function(n){return!!(t=n.call({lexer:u},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])&&"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])&&"text"===t.type&&"text"===n.type?(n.raw+=t.raw,n.text+=t.text):l.push(t);else if(t=this.tokenizer.emStrong(e,c,a))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,wf))e=e.substring(t.raw.length),l.push(t);else if(this.state.inLink||!(t=this.tokenizer.url(e,wf))){if(r=e,this.options.extensions&&this.options.extensions.startInline&&function(){var t=1/0,n=e.slice(1),i=void 0;u.options.extensions.startInline.forEach((function(e){"number"===typeof(i=e.call({lexer:this},n))&&i>=0&&(t=Math.min(t,i))})),t<1/0&&t>=0&&(r=e.substring(0,t+1))}(),t=this.tokenizer.inlineText(r,Df))e=e.substring(t.raw.length),"_"!==t.raw.slice(-1)&&(a=t.raw.slice(-1)),o=!0,(n=l[l.length-1])&&"text"===n.type?(n.raw+=t.raw,n.text+=t.text):l.push(t);else if(e){var f="Infinite loop on byte: "+e.charCodeAt(0);if(this.options.silent){console.error(f);break}throw new Error(f)}}else e=e.substring(t.raw.length),l.push(t);return l}}],[{key:"rules",get:function(){return{block:_f,inline:bf}}},{key:"lex",value:function(t,n){return new e(n).lex(t)}},{key:"lexInline",value:function(t,n){return new e(n).inlineTokens(t)}}]),e}(),kf=function(){function e(t){Dt(this,e),this.options=t||Vs}return xt(e,[{key:"code",value:function(e,t,n){var r=(t||"").match(/\S*/)[0];if(this.options.highlight){var i=this.options.highlight(e,r);null!=i&&i!==e&&(n=!0,e=i)}return e=e.replace(/\n$/,"")+"\n",r?'
    '+(n?e:Ks(e,!0))+"
    \n":"
    "+(n?e:Ks(e,!0))+"
    \n"}},{key:"blockquote",value:function(e){return"
    \n".concat(e,"
    \n")}},{key:"html",value:function(e){return e}},{key:"heading",value:function(e,t,n,r){if(this.options.headerIds){var i=this.options.headerPrefix+r.slug(n);return"').concat(e,"\n")}return"").concat(e,"\n")}},{key:"hr",value:function(){return this.options.xhtml?"
    \n":"
    \n"}},{key:"list",value:function(e,t,n){var r=t?"ol":"ul";return"<"+r+(t&&1!==n?' start="'+n+'"':"")+">\n"+e+"\n"}},{key:"listitem",value:function(e){return"
  • ".concat(e,"
  • \n")}},{key:"checkbox",value:function(e){return" "}},{key:"paragraph",value:function(e){return"

    ".concat(e,"

    \n")}},{key:"table",value:function(e,t){return t&&(t="".concat(t,"")),"\n\n"+e+"\n"+t+"
    \n"}},{key:"tablerow",value:function(e){return"\n".concat(e,"\n")}},{key:"tablecell",value:function(e,t){var n=t.header?"th":"td";return(t.align?"<".concat(n,' align="').concat(t.align,'">'):"<".concat(n,">"))+e+"\n")}},{key:"strong",value:function(e){return"".concat(e,"")}},{key:"em",value:function(e){return"".concat(e,"")}},{key:"codespan",value:function(e){return"".concat(e,"")}},{key:"br",value:function(){return this.options.xhtml?"
    ":"
    "}},{key:"del",value:function(e){return"".concat(e,"")}},{key:"link",value:function(e,t,n){if(null===(e=af(this.options.sanitize,this.options.baseUrl,e)))return n;var r='
    "}},{key:"image",value:function(e,t,n){if(null===(e=af(this.options.sanitize,this.options.baseUrl,e)))return n;var r='').concat(n,'":">"}},{key:"text",value:function(e){return e}}]),e}(),Cf=function(){function e(){Dt(this,e)}return xt(e,[{key:"strong",value:function(e){return e}},{key:"em",value:function(e){return e}},{key:"codespan",value:function(e){return e}},{key:"del",value:function(e){return e}},{key:"html",value:function(e){return e}},{key:"text",value:function(e){return e}},{key:"link",value:function(e,t,n){return""+n}},{key:"image",value:function(e,t,n){return""+n}},{key:"br",value:function(){return""}}]),e}(),Ef=function(){function e(){Dt(this,e),this.seen={}}return xt(e,[{key:"serialize",value:function(e){return e.toLowerCase().trim().replace(/<[!\/a-z].*?>/gi,"").replace(/[\u2000-\u206F\u2E00-\u2E7F\\'!"#$%&()*+,./:;<=>?@[\]^`{|}~]/g,"").replace(/\s/g,"-")}},{key:"getNextSafeSlug",value:function(e,t){var n=e,r=0;if(this.seen.hasOwnProperty(n)){r=this.seen[e];do{n=e+"-"+ ++r}while(this.seen.hasOwnProperty(n))}return t||(this.seen[e]=r,this.seen[n]=0),n}},{key:"slug",value:function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},n=this.serialize(e);return this.getNextSafeSlug(n,t.dryrun)}}]),e}(),Af=function(){function e(t){Dt(this,e),this.options=t||Vs,this.options.renderer=this.options.renderer||new kf,this.renderer=this.options.renderer,this.renderer.options=this.options,this.textRenderer=new Cf,this.slugger=new Ef}return xt(e,[{key:"parse",value:function(e){var t,n,r,i,o,a,u,l,c,s,f,d,h,p,v,m,y,g,_,b=!(arguments.length>1&&void 0!==arguments[1])||arguments[1],D="",w=e.length;for(t=0;t0&&"paragraph"===v.tokens[0].type?(v.tokens[0].text=g+" "+v.tokens[0].text,v.tokens[0].tokens&&v.tokens[0].tokens.length>0&&"text"===v.tokens[0].tokens[0].type&&(v.tokens[0].tokens[0].text=g+" "+v.tokens[0].tokens[0].text)):v.tokens.unshift({type:"text",text:g}):p+=g),p+=this.parse(v.tokens,h),c+=this.renderer.listitem(p,y,m);D+=this.renderer.list(c,f,d);continue;case"html":D+=this.renderer.html(s.text);continue;case"paragraph":D+=this.renderer.paragraph(this.parseInline(s.tokens));continue;case"text":for(c=s.tokens?this.parseInline(s.tokens):s.text;t+1An error occurred:

    "+Ks(e.message+"",!0)+"
    ";throw e}try{var l=xf.lex(e,t);if(t.walkTokens){if(t.async)return Promise.all(Sf.walkTokens(l,t.walkTokens)).then((function(){return Af.parse(l,t)})).catch(u);Sf.walkTokens(l,t.walkTokens)}return Af.parse(l,t)}catch(c){u(c)}}Sf.options=Sf.setOptions=function(e){var t;return df(Sf.defaults,e),t=Sf.defaults,Vs=t,Sf},Sf.getDefaults=Ys,Sf.defaults=Vs,Sf.use=function(){for(var e=arguments.length,t=new Array(e),n=0;nAn error occurred:

    "+Ks(c.message+"",!0)+"
    ";throw c}},Sf.Parser=Af,Sf.parser=Af.parse,Sf.Renderer=kf,Sf.TextRenderer=Cf,Sf.Lexer=xf,Sf.lexer=xf.lex,Sf.Tokenizer=gf,Sf.Slugger=Ef,Sf.parse=Sf;Sf.options,Sf.setOptions,Sf.use,Sf.walkTokens,Sf.parseInline,Af.parse,xf.lex;var Ff=function(e){var t=e.title,n=e.description,r=e.unit,i=e.expr,o=e.showLegend,a=e.filename,u=e.alias,l=Wr().period,c=Qr(),s=re(null),f=_t(X(!0),2),d=f[0],h=f[1],p=_t(X(l.step||1),2),v=p[0],y=p[1],g=_t(X({limits:{enable:!1,range:{1:[0,0]}}}),2),_=g[0],b=g[1],D=oe((function(){return Array.isArray(i)&&i.every((function(e){return e}))}),[i]),w=ks({predefinedQuery:D?i:[],display:"chart",visible:d,customStep:v}),x=w.isLoading,k=w.graphData,C=w.error,E=w.warning,A=function(e){var t=Kn({},_);t.limits.range=e,b(t)};if(te((function(){var e=new IntersectionObserver((function(e){e.forEach((function(e){return h(e.isIntersecting)}))}),{threshold:.1});return s.current&&e.observe(s.current),function(){s.current&&e.unobserve(s.current)}}),[]),!D)return fr(ao,{variant:"error",children:[fr("code",{children:'"expr"'})," not found. Check the configuration file ",fr("b",{children:a}),"."]});var S=function(){return fr("div",{className:"vm-predefined-panel-header__description vm-default-styles",children:[n&&fr(m,{children:[fr("div",{children:[fr("span",{children:"Description:"}),fr("div",{dangerouslySetInnerHTML:{__html:Sf.parse(n)}})]}),fr("hr",{})]}),fr("div",{children:[fr("span",{children:"Queries:"}),fr("div",{children:i.map((function(e,t){return fr("div",{children:e},"".concat(t,"_").concat(e))}))})]})]})};return fr("div",{className:"vm-predefined-panel",ref:s,children:[fr("div",{className:"vm-predefined-panel-header",children:[fr(po,{title:fr(S,{}),children:fr("div",{className:"vm-predefined-panel-header__info",children:fr(li,{})})}),fr("h3",{className:"vm-predefined-panel-header__title",children:t||""}),fr("div",{className:"vm-predefined-panel-header__step",children:fr(ps,{defaultStep:l.step,setStep:y})}),fr(Ss,{yaxis:_,setYaxisLimits:A,toggleEnableLimits:function(){var e=Kn({},_);e.limits.enable=!e.limits.enable,b(e)}})]}),fr("div",{className:"vm-predefined-panel-body",children:[x&&fr(Fs,{}),C&&fr(ao,{variant:"error",children:C}),E&&fr(ao,{variant:"warning",children:E}),k&&fr(ss,{data:k,period:l,customStep:v,query:i,yaxis:_,unit:r,alias:u,showLegend:o,setYaxisLimits:A,setPeriod:function(e){var t=e.from,n=e.to;c({type:"SET_PERIOD",payload:{from:t,to:n}})},fullWidth:!1})]})]})},Nf=function(e){var t=e.defaultExpanded,n=void 0!==t&&t,r=e.onChange,i=e.title,o=e.children,a=_t(X(n),2),u=a[0],l=a[1];return te((function(){r&&r(u)}),[u]),fr(m,{children:[fr("header",{className:"vm-accordion-header ".concat(u&&"vm-accordion-header_open"),onClick:function(){l((function(e){return!e}))},children:[i,fr("div",{className:"vm-accordion-header__arrow ".concat(u&&"vm-accordion-header__arrow_open"),children:fr(hi,{})})]}),u&&fr("section",{className:"vm-accordion-section",children:o},"content")]})},Of=function(e){var t=e.index,n=e.title,r=e.panels,i=e.filename,o=go(document.body),a=oe((function(){return o.width/12}),[o]),u=_t(X(!t),2),l=u[0],c=u[1],s=_t(X([]),2),f=s[0],d=s[1];te((function(){d(r&&r.map((function(e){return e.width||12})))}),[r]);var h=_t(X({start:0,target:0,enable:!1}),2),p=h[0],v=h[1],m=function(e){if(p.enable){var t=p.start,n=Math.ceil((t-e.clientX)/a);if(!(Math.abs(n)>=12)){var r=f.map((function(e,t){return e-(t===p.target?n:0)}));d(r)}}},y=function(){v(Kn(Kn({},p),{},{enable:!1}))},g=function(e){return function(t){!function(e,t){v({start:e.clientX,target:t,enable:!0})}(t,e)}};return te((function(){return window.addEventListener("mousemove",m),window.addEventListener("mouseup",y),function(){window.removeEventListener("mousemove",m),window.removeEventListener("mouseup",y)}}),[p]),fr("div",{className:"vm-predefined-dashboard",children:fr(Nf,{defaultExpanded:l,onChange:function(e){return c(e)},title:fr((function(){return fr("div",{className:Ti()({"vm-predefined-dashboard-header":!0,"vm-predefined-dashboard-header_open":l}),children:[(n||i)&&fr("span",{className:"vm-predefined-dashboard-header__title",children:n||"".concat(t+1,". ").concat(i)}),r&&fr("span",{className:"vm-predefined-dashboard-header__count",children:["(",r.length," panels)"]})]})}),{}),children:fr("div",{className:"vm-predefined-dashboard-panels",children:Array.isArray(r)&&r.length?r.map((function(e,t){return fr("div",{className:"vm-predefined-dashboard-panels-panel vm-block vm-block_empty-padding",style:{gridColumn:"span ".concat(f[t])},children:[fr(Ff,{title:e.title,description:e.description,unit:e.unit,expr:e.expr,alias:e.alias,filename:i,showLegend:e.showLegend}),fr("button",{className:"vm-predefined-dashboard-panels-panel__resizer",onMouseDown:g(t)})]},t)})):fr("div",{className:"vm-predefined-dashboard-panels-panel__alert",children:fr(ao,{variant:"error",children:[fr("code",{children:'"panels"'})," not found. Check the configuration file ",fr("b",{children:i}),"."]})})})})})},Tf=function(){!function(){var e=Wr(),t=e.duration,n=e.relativeTime,r=e.period,i=r.date,o=r.step,a=function(){var e,r=Is((qn(e={},"g0.range_input",t),qn(e,"g0.end_input",i),qn(e,"g0.step_input",o),qn(e,"g0.relative_time",n),e));ar(r)};te(a,[t,n,i,o]),te(a,[])}();var e=_t(X([]),2),t=e[0],n=e[1],r=_t(X("0"),2),i=r[0],o=r[1],a=oe((function(){return t.map((function(e,t){return{label:e.title||"",value:"".concat(t),className:"vm-predefined-panels-tabs__tab"}}))}),[t]),u=oe((function(){return t[+i]||{}}),[t,i]),l=oe((function(){return null===u||void 0===u?void 0:u.rows}),[u]),c=oe((function(){return u.title||u.filename||""}),[u]),s=oe((function(){return Array.isArray(l)&&!!l.length}),[l]);return te((function(){Hs().then((function(e){return e.length&&n(e)}))}),[]),fr("div",{className:"vm-predefined-panels",children:[!t.length&&fr(ao,{variant:"info",children:"Dashboards not found"}),a.length>1&&fr("div",{className:"vm-predefined-panels-tabs vm-block vm-block_empty-padding",children:fr(Li,{activeItem:i,items:a,onChange:function(e){o(e)}})}),fr("div",{className:"vm-predefined-panels__dashboards",children:[s&&l.map((function(e,t){return fr(Of,{index:t,filename:c,title:e.title,panels:e.panels},"".concat(i,"_").concat(t))})),!!t.length&&!s&&fr(ao,{variant:"error",children:[fr("code",{children:'"rows"'})," not found. Check the configuration file ",fr("b",{children:c}),"."]})]})]})},Bf=function(e,t){var n=t.match?"&match[]="+encodeURIComponent(t.match):"",r=t.focusLabel?"&focusLabel="+encodeURIComponent(t.focusLabel):"";return"".concat(e,"/api/v1/status/tsdb?topN=").concat(t.topN,"&date=").concat(t.date).concat(n).concat(r)},Mf=function(){function e(){Dt(this,e),this.tsdbStatus=void 0,this.tabsNames=void 0,this.tsdbStatus=this.defaultTSDBStatus,this.tabsNames=["table","graph"]}return xt(e,[{key:"tsdbStatusData",get:function(){return this.tsdbStatus},set:function(e){this.tsdbStatus=e}},{key:"defaultTSDBStatus",get:function(){return{totalSeries:0,totalLabelValuePairs:0,seriesCountByMetricName:[],seriesCountByLabelName:[],seriesCountByFocusLabelValue:[],seriesCountByLabelValuePair:[],labelValueCountByLabelName:[]}}},{key:"keys",value:function(e){var t=[];return e&&(t=t.concat("seriesCountByFocusLabelValue")),t=t.concat("seriesCountByMetricName","seriesCountByLabelName","seriesCountByLabelValuePair","labelValueCountByLabelName"),t}},{key:"defaultState",get:function(){var e=this;return this.keys("job").reduce((function(t,n){return Kn(Kn({},t),{},{tabs:Kn(Kn({},t.tabs),{},qn({},n,e.tabsNames)),containerRefs:Kn(Kn({},t.containerRefs),{},qn({},n,re(null))),defaultActiveTab:Kn(Kn({},t.defaultActiveTab),{},qn({},n,0))})}),{tabs:{},containerRefs:{},defaultActiveTab:{}})}},{key:"sectionsTitles",value:function(e){return{seriesCountByMetricName:"Metric names with the highest number of series",seriesCountByLabelName:"Labels with the highest number of series",seriesCountByFocusLabelValue:'Values for "'.concat(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"}}},{key:"tablesHeaders",get:function(){return{seriesCountByMetricName:Lf,seriesCountByLabelName:Pf,seriesCountByFocusLabelValue:$f,seriesCountByLabelValuePair:Rf,labelValueCountByLabelName:If}}},{key:"totalSeries",value:function(e){return"labelValueCountByLabelName"===e?-1:this.tsdbStatus.totalSeries}}]),e}(),Lf=[{id:"name",label:"Metric name"},{id:"value",label:"Number of series"},{id:"percentage",label:"Percent of series"},{id:"action",label:"Action"}],Pf=[{id:"name",label:"Label name"},{id:"value",label:"Number of series"},{id:"percentage",label:"Percent of series"},{id:"action",label:"Action"}],$f=[{id:"name",label:"Label value"},{id:"value",label:"Number of series"},{id:"percentage",label:"Percent of series"},{disablePadding:!1,id:"action",label:"Action",numeric:!1}],Rf=[{id:"name",label:"Label=value pair"},{id:"value",label:"Number of series"},{id:"percentage",label:"Percent of series"},{id:"action",label:"Action"}],If=[{id:"name",label:"Label name"},{id:"value",label:"Number of unique values"},{id:"action",label:"Action"}],jf={seriesCountByMetricName:function(e,t){return zf("__name__",t)},seriesCountByLabelName:function(e,t){return"{".concat(t,'!=""}')},seriesCountByFocusLabelValue:function(e,t){return zf(e,t)},seriesCountByLabelValuePair:function(e,t){var n=t.split("="),r=n[0],i=n.slice(1).join("=");return zf(r,i)},labelValueCountByLabelName:function(e,t){return"{".concat(t,'!=""}')}},zf=function(e,t){return e?"{"+e+"="+JSON.stringify(t)+"}":""},Uf=function(e){var t=e.topN,n=e.error,r=e.query,i=e.onSetHistory,o=e.onRunQuery,a=e.onSetQuery,u=e.onTopNChange,l=e.onFocusLabelChange,c=e.totalSeries,s=e.totalLabelValuePairs,f=e.date,d=e.match,h=e.focusLabel,p=ni().autocomplete,v=ri(),m=Ns().queryOptions,y=oe((function(){return t<1?"Number must be bigger than zero":""}),[t]);return fr("div",{className:"vm-cardinality-configurator vm-block",children:[fr("div",{className:"vm-cardinality-configurator-controls",children:[fr("div",{className:"vm-cardinality-configurator-controls__query",children:fr(fs,{value:r||d||"",autocomplete:p,options:m,error:n,onArrowUp:function(){i(-1)},onArrowDown:function(){i(1)},onEnter:o,onChange:a,label:"Time series selector"})}),fr("div",{className:"vm-cardinality-configurator-controls__item",children:fr(No,{label:"Number of entries per table",type:"number",value:t,error:y,onChange:u})}),fr("div",{className:"vm-cardinality-configurator-controls__item",children:fr(No,{label:"Focus label",type:"text",value:h||"",onChange:l})}),fr("div",{className:"vm-cardinality-configurator-controls__item",children:fr(ms,{label:"Autocomplete",value:p,onChange:function(){v({type:"TOGGLE_AUTOCOMPLETE"})}})})]}),fr("div",{className:"vm-cardinality-configurator-bottom",children:[fr("div",{className:"vm-cardinality-configurator-bottom__info",children:["Analyzed ",fr("b",{children:c})," series with ",fr("b",{children:s}),' "label=value" pairs at ',fr("b",{children:f}),d&&fr("span",{children:[" for series selector ",fr("b",{children:d})]}),". Show top ",t," entries per table."]}),fr(so,{startIcon:fr(bi,{}),onClick:o,children:"Execute Query"})]})]})};function Hf(e){var t=e.order,n=e.orderBy,r=e.onRequestSort,i=e.headerCells;return fr("thead",{className:"vm-table-header",children:fr("tr",{className:"vm-table__row vm-table__row_header",children:i.map((function(e){return fr("th",{className:Ti()({"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:(i=e.id,function(e){r(e,i)}),children:fr("div",{className:"vm-table-cell__content",children:[e.label,"action"!==e.id&&"percentage"!==e.id&&fr("div",{className:Ti()({"vm-table__sort-icon":!0,"vm-table__sort-icon_active":n===e.id,"vm-table__sort-icon_desc":"desc"===t&&n===e.id}),children:fr(vi,{})})]})},e.id);var i}))})})}function Yf(e,t,n){return t[n]e[n]?1:0}function Vf(e,t){return"desc"===e?function(e,n){return Yf(e,n,t)}:function(e,n){return-Yf(e,n,t)}}function qf(e,t){var n=e.map((function(e,t){return[e,t]}));return n.sort((function(e,n){var r=t(e[0],n[0]);return 0!==r?r:e[1]-n[1]})),n.map((function(e){return e[0]}))}var Wf=function(e){var t=e.rows,n=e.headerCells,r=e.defaultSortColumn,i=e.tableCells,o=_t(X("desc"),2),a=o[0],u=o[1],l=_t(X(r),2),c=l[0],s=l[1],f=_t(X([]),2),d=f[0],h=f[1],p=function(e){return function(){var t=d.indexOf(e),n=[];-1===t?n=n.concat(d,e):0===t?n=n.concat(d.slice(1)):t===d.length-1?n=n.concat(d.slice(0,-1)):t>0&&(n=n.concat(d.slice(0,t),d.slice(t+1))),h(n)}},v=qf(t,Vf(a,c));return fr("table",{className:"vm-table",children:[fr(Hf,{numSelected:d.length,order:a,orderBy:c,onSelectAllClick:function(e){if(e.target.checked){var n=t.map((function(e){return e.name}));h(n)}else h([])},onRequestSort:function(e,t){u(c===t&&"asc"===a?"desc":"asc"),s(t)},rowCount:t.length,headerCells:n}),fr("tbody",{className:"vm-table-header",children:v.map((function(e){return fr("tr",{className:Ti()({"vm-table__row":!0,"vm-table__row_selected":(t=e.name,-1!==d.indexOf(t))}),onClick:p(e.name),children:i(e)},e.name);var t}))})]})},Qf=function(e){var t=e.row,n=e.totalSeries,r=e.onActionClick,i=n>0?t.value/n*100:-1;return fr(m,{children:[fr("td",{className:"vm-table-cell",children:t.name},t.name),fr("td",{className:"vm-table-cell",children:t.value},t.value),i>0&&fr("td",{className:"vm-table-cell",children:fr(Os,{value:i})},t.progressValue),fr("td",{className:"vm-table-cell vm-table-cell_right",children:fr("div",{className:"vm-table-cell__content",children:fr(po,{title:"Filter by ".concat(t.name),children:fr(so,{variant:"text",size:"small",onClick:r,children:fr(Di,{})})})})},"action")]})},Gf=function(e){var t=e.data,n=e.container,r=e.configs,i=re(null),o=_t(X(),2),a=o[0],u=o[1],l=go(n),c=Kn(Kn({},r),{},{width:l.width||400});return te((function(){if(i.current){var e=new $c(c,t,i.current);return u(e),e.destroy}}),[i.current,l]),te((function(){a&&a.setData(t)}),[t]),fr("div",{style:{height:"100%"},children:fr("div",{ref:i})})},Jf=function(e,t){return Math.round(e*(t=Math.pow(10,t)))/t},Zf=1,Kf=function(e,t,n,r){return Jf(t+e*(n+r),6)},Xf=function(e,t,n,r,i){var o=1-t,a=n===Zf?o/(e-1):2===n?o/e:3===n?o/(e+1):0;(isNaN(a)||a===1/0)&&(a=0);var u=n===Zf?0:2===n?a/2:3===n?a:0,l=t/e,c=Jf(l,6);if(null==r)for(var s=0;s=n&&e<=i&&t>=r&&t<=o};function td(e,t,n,r,i){var o=this;o.x=e,o.y=t,o.w=n,o.h=r,o.l=i||0,o.o=[],o.q=null}var nd={split:function(){var e=this,t=e.x,n=e.y,r=e.w/2,i=e.h/2,o=e.l+1;e.q=[new td(t+r,n,r,i,o),new td(t,n,r,i,o),new td(t,n+i,r,i,o),new td(t+r,n+i,r,i,o)]},quads:function(e,t,n,r,i){var o=this,a=o.q,u=o.x+o.w/2,l=o.y+o.h/2,c=tu,d=t+r>l;c&&f&&i(a[0]),s&&c&&i(a[1]),s&&d&&i(a[2]),f&&d&&i(a[3])},add:function(e){var t=this;if(null!=t.q)t.quads(e.x,e.y,e.w,e.h,(function(t){t.add(e)}));else{var n=t.o;if(n.push(e),n.length>10&&t.l<4){t.split();for(var r=function(e){var r=n[e];t.quads(r.x,r.y,r.w,r.h,(function(e){e.add(r)}))},i=0;i=0?"left":"right",e.ctx.textBaseline=1===s?"middle":i[n]>=0?"bottom":"top",e.ctx.fillText(i[n],f,g)}}))})),e.ctx.restore()}function b(e,t,n){return[0,$c.rangeNum(0,n,.05,!0)[1]]}return{hooks:{drawClear:function(t){var n;if((y=y||new td(0,0,t.bbox.width,t.bbox.height)).clear(),t.series.forEach((function(e){e._paths=null})),l=d?[null].concat(m(t.data.length-1-o.length,t.data[0].length)):2===t.series.length?[null].concat(m(t.data[0].length,1)):[null].concat(function(e,t){var n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:h,r=Array.from({length:t},(function(){return{offs:Array(e).fill(0),size:Array(e).fill(0)}}));return Xf(e,n,p,null,(function(e,n,i){Xf(t,1,v,null,(function(t,o,a){r[t].offs[e]=n+i*o,r[t].size[e]=i*a}))})),r}(t.data[0].length,t.data.length-1-o.length,1===t.data[0].length?1:h)),null!=(null===(n=e.disp)||void 0===n?void 0:n.fill)){c=[null];for(var r=1;r0&&!o.includes(t)&&$c.assign(e,{paths:g,points:{show:_}})}))}}}((rd=[1],id=0,od=1,ad=0,ud=function(e,t){return{stroke:e,fill:t}}({unit:3,values:function(e){return e.data[1].map((function(e,t){return 0!==t?"#33BB55":"#F79420"}))}},{unit:3,values:function(e){return e.data[1].map((function(e,t){return 0!==t?"#33BB55":"#F79420"}))}}),{which:rd,ori:id,dir:od,radius:ad,disp:ud}))]},cd=function(e){var t=e.rows,n=e.activeTab,r=e.onChange,i=e.tabs,o=e.chartContainer,a=e.totalSeries,u=e.tabId,l=e.onActionClick,c=e.sectionTitle,s=e.tableHeaderCells,f=oe((function(){return i.map((function(e,t){return{value:String(t),label:e,icon:fr(0===t?xi:wi,{})}}))}),[i]);return fr("div",{className:"vm-metrics-content vm-block",children:[fr("div",{className:"vm-metrics-content-header vm-section-header",children:[fr("h5",{className:"vm-section-header__title",children:c}),fr("div",{className:"vm-section-header__tabs",children:fr(Li,{activeItem:String(n),items:f,onChange:function(e){r(e,u)}})})]}),fr("div",{ref:o,children:[0===n&&fr(Wf,{rows:t,headerCells:s,defaultSortColumn:"value",tableCells:function(e){return fr(Qf,{row:e,totalSeries:a,onActionClick:l})}}),1===n&&fr(Gf,{data:[t.map((function(e){return e.name})),t.map((function(e){return e.value})),t.map((function(e,t){return t%12==0?1:t%10==0?2:0}))],container:(null===o||void 0===o?void 0:o.current)||null,configs:ld})]})]})},sd=function(){var e=Ki(),t=e.topN,n=e.match,r=e.date,i=e.focusLabel,o=Xi();!function(){var e=Ki(),t=e.topN,n=e.match,r=e.date,i=e.focusLabel,o=e.extraLabel,a=function(){var e=Is({topN:t,date:r,match:n,extraLabel:o,focusLabel:i});ar(e)};te(a,[t,n,r,i,o]),te(a,[])}();var a=_t(X(n||""),2),u=a[0],l=a[1],c=_t(X(0),2),s=c[0],f=c[1],d=_t(X([]),2),h=d[0],p=d[1],v=function(){var e=new Mf,t=Ki(),n=t.topN,r=t.extraLabel,i=t.match,o=t.date,a=t.runQuery,u=t.focusLabel,l=hr().serverUrl,c=_t(X(!1),2),s=c[0],f=c[1],d=_t(X(),2),h=d[0],p=d[1],v=_t(X(e.defaultTSDBStatus),2),m=v[0],y=v[1];te((function(){h&&(y(e.defaultTSDBStatus),f(!1))}),[h]);var g=function(){var t=ts(Xc().mark((function t(n){var r,i,o,a;return Xc().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:if(l){t.next=2;break}return t.abrupt("return");case 2:return p(""),f(!0),y(e.defaultTSDBStatus),r=Bf(l,n),t.prev=6,t.next=9,fetch(r);case 9:return i=t.sent,t.next=12,i.json();case 12:o=t.sent,i.ok?(a=o.data,y(Kn({},a)),f(!1)):(p(o.error),y(e.defaultTSDBStatus),f(!1)),t.next=20;break;case 16:t.prev=16,t.t0=t.catch(6),f(!1),t.t0 instanceof Error&&p("".concat(t.t0.name,": ").concat(t.t0.message));case 20:case"end":return t.stop()}}),t,null,[[6,16]])})));return function(e){return t.apply(this,arguments)}}();return te((function(){g({topN:n,extraLabel:r,match:i,date:o,focusLabel:u})}),[l,a,o]),e.tsdbStatusData=m,{isLoading:s,appConfigurator:e,error:h}}(),m=v.isLoading,y=v.appConfigurator,g=v.error,_=_t(X(y.defaultState.defaultActiveTab),2),b=_[0],D=_[1],w=y.tsdbStatusData,x=y.defaultState,k=y.tablesHeaders,C=function(e,t){D(Kn(Kn({},b),{},qn({},t,+e)))};return fr("div",{className:"vm-cardinality-panel",children:[m&&fr(Fs,{message:"Please wait while cardinality stats is calculated. \n This may take some time if the db contains big number of time series."}),fr(Uf,{error:"",query:u,topN:t,date:r,match:n,totalSeries:w.totalSeries,totalLabelValuePairs:w.totalLabelValuePairs,focusLabel:i,onRunQuery:function(){p((function(e){return[].concat(bt(e),[u])})),f((function(e){return e+1})),o({type:"SET_MATCH",payload:u}),o({type:"RUN_QUERY"})},onSetQuery:function(e){l(e)},onSetHistory:function(e){var t=s+e;t<0||t>=h.length||(f(t),l(h[t]))},onTopNChange:function(e){o({type:"SET_TOP_N",payload:+e})},onFocusLabelChange:function(e){o({type:"SET_FOCUS_LABEL",payload:e})}}),g&&fr(ao,{variant:"error",children:g}),y.keys(i).map((function(e){return fr(cd,{sectionTitle:y.sectionsTitles(i)[e],activeTab:b[e],rows:w[e],onChange:C,onActionClick:(t=e,function(e){var n=e.currentTarget.id,r=jf[t](i,n);l(r),p((function(e){return[].concat(bt(e),[r])})),f((function(e){return e+1})),o({type:"SET_MATCH",payload:r});var a="";"labelValueCountByLabelName"!==t&&"seriesCountByLabelName"!=t||(a=n),o({type:"SET_FOCUS_LABEL",payload:a}),o({type:"RUN_QUERY"})}),tabs:x.tabs[e],chartContainer:x.containerRefs[e],totalSeries:y.totalSeries(e),tabId:e,tableHeaderCells:k[e]},e);var t}))]})},fd=function(e){var t=e.rows,n=e.columns,r=_t(X(e.defaultOrderBy||"count"),2),i=r[0],o=r[1],a=_t(X("desc"),2),u=a[0],l=a[1],c=oe((function(){return qf(t,Vf(u,i))}),[t,i,u]),s=function(e){return function(){var t;t=e,l((function(e){return"asc"===e&&i===t?"desc":"asc"})),o(t)}};return fr("table",{className:"vm-table",children:[fr("thead",{className:"vm-table-header",children:fr("tr",{className:"vm-table__row vm-table__row_header",children:n.map((function(e){return fr("th",{className:"vm-table-cell vm-table-cell_header vm-table-cell_sort",onClick:s(e.key),children:fr("div",{className:"vm-table-cell__content",children:[e.title||e.key,fr("div",{className:Ti()({"vm-table__sort-icon":!0,"vm-table__sort-icon_active":i===e.key,"vm-table__sort-icon_desc":"desc"===u&&i===e.key}),children:fr(vi,{})})]})},e.key)}))})}),fr("tbody",{className:"vm-table-body",children:c.map((function(e,t){return fr("tr",{className:"vm-table__row",children:n.map((function(t){return fr("td",{className:"vm-table-cell",children:e[t.key]||"-"},t.key)}))},t)}))})]})},dd=["table","JSON"].map((function(e,t){return{value:String(t),label:e,icon:fr(0===t?xi:ki,{})}})),hd=function(e){var t=e.rows,n=e.title,r=e.columns,i=e.defaultOrderBy,o=_t(X(0),2),a=o[0],u=o[1];return fr("div",{className:"vm-top-queries-panel vm-block",children:[fr("div",{className:"vm-top-queries-panel-header vm-section-header",children:[fr("h5",{className:"vm-section-header__title",children:n}),fr("div",{className:"vm-section-header__tabs",children:fr(Li,{activeItem:String(a),items:dd,onChange:function(e){u(+e)}})})]}),fr("div",{children:[0===a&&fr(fd,{rows:t,columns:r,defaultOrderBy:i}),1===a&&fr(Cs,{data:t})]})]})},pd=function(){var e=function(){var e=hr().serverUrl,t=io(),n=t.topN,r=t.maxLifetime,i=t.runQuery,o=_t(X(null),2),a=o[0],u=o[1],l=_t(X(!1),2),c=l[0],s=l[1],f=_t(X(),2),d=f[0],h=f[1],p=oe((function(){return function(e,t,n){return"".concat(e,"/api/v1/status/top_queries?topN=").concat(t||"","&maxLifetime=").concat(n||"")}(e,n,r)}),[e,n,r]),v=function(){var e=ts(Xc().mark((function e(){var t,n;return Xc().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return s(!0),e.prev=1,e.next=4,fetch(p);case 4:return t=e.sent,e.next=7,t.json();case 7:n=e.sent,t.ok&&["topByAvgDuration","topByCount","topBySumDuration"].forEach((function(e){var t=n[e];Array.isArray(t)&&t.forEach((function(e){return e.timeRangeHours=+(e.timeRangeSeconds/3600).toFixed(2)}))})),u(t.ok?n:null),h(String(n.error||"")),e.next=16;break;case 13:e.prev=13,e.t0=e.catch(1),e.t0 instanceof Error&&"AbortError"!==e.t0.name&&h("".concat(e.t0.name,": ").concat(e.t0.message));case 16:s(!1);case 17:case"end":return e.stop()}}),e,null,[[1,13]])})));return function(){return e.apply(this,arguments)}}();return te((function(){v()}),[i]),{data:a,error:d,loading:c}}(),t=e.data,n=e.error,r=e.loading,i=io(),o=i.topN,a=i.maxLifetime,u=ue(ro).dispatch;!function(){var e=io(),t=e.topN,n=e.maxLifetime,r=function(){var e=Is({topN:String(t),maxLifetime:n});ar(e)};te(r,[t,n]),te(r,[])}();var l=oe((function(){var e=a.trim().split(" ").reduce((function(e,t){var n=Or(t);return n?Kn(Kn({},e),n):Kn({},e)}),{});return!!yr().duration(e).asMilliseconds()}),[a]),c=oe((function(){return!!o&&o<1}),[o]),s=oe((function(){return c?"Number must be bigger than zero":""}),[c]),f=oe((function(){return l?"":"Invalid duration value"}),[l]),d=function(e){if(!t)return e;var n=t[e];return"number"===typeof n?zc(n):n||e},h=function(){u({type:"SET_RUN_QUERY"})},p=function(e){"Enter"===e.key&&h()};return te((function(){t&&(o||u({type:"SET_TOP_N",payload:+t.topN}),a||u({type:"SET_MAX_LIFE_TIME",payload:t.maxLifetime}))}),[t]),fr("div",{className:"vm-top-queries",children:[r&&fr(Fs,{containerStyles:{height:"500px"}}),fr("div",{className:"vm-top-queries-controls vm-block",children:[fr("div",{className:"vm-top-queries-controls__fields",children:[fr(No,{label:"Max lifetime",value:a,error:f,helperText:"For example ".concat("30ms, 15s, 3d4h, 1y2w"),onChange:function(e){u({type:"SET_MAX_LIFE_TIME",payload:e})},onKeyDown:p}),fr(No,{label:"Number of returned queries",type:"number",value:o||"",error:s,onChange:function(e){u({type:"SET_TOP_N",payload:+e})},onKeyDown:p})]}),fr("div",{className:"vm-top-queries-controls-bottom",children:[fr("div",{className:"vm-top-queries-controls-bottom__info",children:["VictoriaMetrics tracks the last\xa0",fr(po,{title:"search.queryStats.lastQueriesCount",children:fr("b",{children:d("search.queryStats.lastQueriesCount")})}),"\xa0queries with durations at least\xa0",fr(po,{title:"search.queryStats.minQueryDuration",children:fr("b",{children:d("search.queryStats.minQueryDuration")})})]}),fr("div",{className:"vm-top-queries-controls-bottom__button",children:fr(so,{startIcon:fr(bi,{}),onClick:h,children:"Execute"})})]})]}),n&&fr(ao,{variant:"error",children:n}),t&&fr(m,{children:fr("div",{className:"vm-top-queries-panels",children:[fr(hd,{rows:t.topByCount,title:"Most frequently executed queries",columns:[{key:"query"},{key:"timeRangeHours",title:"time range, hours"},{key:"count"}]}),fr(hd,{rows:t.topByAvgDuration,title:"Most heavy queries",columns:[{key:"query"},{key:"avgDurationSeconds",title:"avg duration, seconds"},{key:"timeRangeHours",title:"time range, hours"},{key:"count"}],defaultOrderBy:"avgDurationSeconds"}),fr(hd,{rows:t.topBySumDuration,title:"Queries with most summary time to execute",columns:[{key:"query"},{key:"sumDurationSeconds",title:"sum duration, seconds"},{key:"timeRangeHours",title:"time range, hours"},{key:"count"}],defaultOrderBy:"sumDurationSeconds"})]})})]})},vd=["primary","secondary","error","warning","info","success"],md=function(e){var t=e.setLoadingTheme,n=Xn().palette,r=void 0===n?{}:n,i=function(){vd.forEach((function(e){var t=function(e){var 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"}(Bi("color-".concat(e)));Mi("".concat(e,"-text"),t)}))};return te((function(){vd.forEach((function(e){var t=r[e];t&&Mi("color-".concat(e),t)})),function(){var e=window,t=e.innerWidth,n=e.innerHeight,r=document.documentElement,i=r.clientWidth,o=r.clientHeight;Mi("scrollbar-width","".concat(t-i,"px")),Mi("scrollbar-height","".concat(n-o,"px"))}(),i(),t(!1)}),[]),null},yd=function(){var e=_t(X(!1),2),t=e[0],n=e[1],r=_t(X([]),2),i=r[0],o=r[1],a=_t(X([]),2),u=a[0],l=a[1],s=oe((function(){return!!i.length}),[i]),f=function(){n(!0)},d=function(){n(!1)},h=function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"";l((function(n){return[{filename:t,text:": ".concat(e.message)}].concat(bt(n))}))},p=function(e,t){try{var n=JSON.parse(e),r=n.trace||n;if(!r.duration_msec)return void h(new Error(xo.traceNotFound),t);var i=new xs(r,t);o((function(e){return[i].concat(bt(e))}))}catch(c){c instanceof Error&&h(c,t)}},v=function(e){l([]),Array.from(e.target.files||[]).map((function(e){var t=new FileReader,n=(null===e||void 0===e?void 0:e.name)||"";t.onload=function(e){var t,r=String(null===(t=e.target)||void 0===t?void 0:t.result);p(r,n)},t.readAsText(e)})),e.target.value=""},m=function(e){return function(){!function(e){l((function(t){return t.filter((function(t,n){return n!==e}))}))}(e)}},y=function(){return fr("div",{className:"vm-trace-page-controls",children:[fr(so,{variant:"outlined",onClick:f,children:"Paste JSON"}),fr(po,{title:"The file must contain tracing information in JSON format",children:fr(so,{children:["Upload Files",fr("input",{id:"json",type:"file",accept:"application/json",multiple:!0,title:" ",onChange:v})]})})]})};return fr("div",{className:"vm-trace-page",children:[fr("div",{className:"vm-trace-page-header",children:[fr("div",{className:"vm-trace-page-header-errors",children:u.map((function(e,t){return fr("div",{className:"vm-trace-page-header-errors-item",children:[fr(ao,{variant:"error",children:[fr("b",{className:"vm-trace-page-header-errors-item__filename",children:e.filename}),fr("span",{children:e.text})]}),fr(so,{className:"vm-trace-page-header-errors-item__close",startIcon:fr(ai,{}),variant:"text",color:"error",onClick:m(t)})]},"".concat(e,"_").concat(t))}))}),fr("div",{children:s&&fr(y,{})})]}),s&&fr("div",{children:fr(Ms,{jsonEditor:!0,traces:i,onDeleteClick:function(e){var t=i.filter((function(t){return t.idValue!==e.idValue}));o(bt(t))}})}),!s&&fr("div",{className:"vm-trace-page-preview",children:[fr("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",fr("a",{href:"https://docs.victoriametrics.com/#query-tracing",target:"_blank",rel:"noreferrer",children:"https://docs.victoriametrics.com/#query-tracing"}),"\n","Tracing graph will be displayed after file upload."]}),fr(y,{})]}),t&&fr(Bo,{title:"Paste JSON",onClose:d,children:fr(Bs,{editable:!0,displayTitle:!0,defaultTile:"JSON ".concat(i.length+1),onClose:d,onUpload:p})})]})},gd=function(){var e=_t(X(!0),2),t=e[0],n=e[1];return fr(m,t?{children:[fr(Fs,{}),fr(md,{setLoadingTheme:n}),";"]}:{children:fr(Un,{children:fr(co,{children:fr(jn,{children:fr(Rn,{path:"/",element:fr(Uo,{}),children:[fr(Rn,{path:Jn.home,element:fr(zs,{})}),fr(Rn,{path:Jn.dashboards,element:fr(Tf,{})}),fr(Rn,{path:Jn.cardinality,element:fr(sd,{})}),fr(Rn,{path:Jn.topQueries,element:fr(pd,{})}),fr(Rn,{path:Jn.trace,element:fr(yd,{})})]})})})})})},_d=function(e){e&&n.e(27).then(n.bind(n,27)).then((function(t){var n=t.getCLS,r=t.getFID,i=t.getFCP,o=t.getLCP,a=t.getTTFB;n(e),r(e),i(e),o(e),a(e)}))},bd=document.getElementById("root");bd&&Ye(fr(gd,{}),bd),_d()}()}(); \ No newline at end of file diff --git a/app/vmselect/vmui/static/js/main.d0509bc3.js.LICENSE.txt b/app/vmselect/vmui/static/js/main.da9caa97.js.LICENSE.txt similarity index 100% rename from app/vmselect/vmui/static/js/main.d0509bc3.js.LICENSE.txt rename to app/vmselect/vmui/static/js/main.da9caa97.js.LICENSE.txt diff --git a/app/vmui/packages/vmui/src/App.tsx b/app/vmui/packages/vmui/src/App.tsx index 4ab8a19aa..4a199c79b 100644 --- a/app/vmui/packages/vmui/src/App.tsx +++ b/app/vmui/packages/vmui/src/App.tsx @@ -9,6 +9,7 @@ import CardinalityPanel from "./pages/CardinalityPanel"; import TopQueries from "./pages/TopQueries"; import ThemeProvider from "./components/Main/ThemeProvider/ThemeProvider"; import Spinner from "./components/Main/Spinner/Spinner"; +import TracePage from "./pages/TracePage"; const App: FC = () => { @@ -45,6 +46,10 @@ const App: FC = () => { path={router.topQueries} element={} /> + } + /> diff --git a/app/vmui/packages/vmui/src/components/Header/Header.tsx b/app/vmui/packages/vmui/src/components/Header/Header.tsx index 8d047e5e7..8ec5b7b17 100644 --- a/app/vmui/packages/vmui/src/components/Header/Header.tsx +++ b/app/vmui/packages/vmui/src/components/Header/Header.tsx @@ -43,6 +43,10 @@ const Header: FC = () => { { label: "Top queries", value: router.topQueries, + }, + { + label: "Trace analyzer", + value: router.trace, } ]), [appModeEnable]); diff --git a/app/vmui/packages/vmui/src/components/Main/Alert/style.scss b/app/vmui/packages/vmui/src/components/Main/Alert/style.scss index 4bef64257..ef0b3a235 100644 --- a/app/vmui/packages/vmui/src/components/Main/Alert/style.scss +++ b/app/vmui/packages/vmui/src/components/Main/Alert/style.scss @@ -4,7 +4,7 @@ position: relative; display: grid; grid-template-columns: 20px 1fr; - align-items: center; + align-items: flex-start; gap: $padding-small; padding: $padding-global; background-color: $color-background-block; @@ -13,7 +13,7 @@ font-size: $font-size-medium; font-weight: 500; color: $color-text; - line-height: 1.3; + line-height: 20px; &:after { position: absolute; @@ -41,6 +41,7 @@ &__content { filter: brightness(0.6); + white-space: pre-line; } &_success { diff --git a/app/vmui/packages/vmui/src/components/Main/Icons/index.tsx b/app/vmui/packages/vmui/src/components/Main/Icons/index.tsx index 7907f53a8..68ab7a9bf 100644 --- a/app/vmui/packages/vmui/src/components/Main/Icons/index.tsx +++ b/app/vmui/packages/vmui/src/components/Main/Icons/index.tsx @@ -279,7 +279,6 @@ export const VisibilityIcon = () => ( ); - export const VisibilityOffIcon = () => ( ( > ); + +export const CopyIcon = () => ( + + + +); diff --git a/app/vmui/packages/vmui/src/components/Main/Modal/style.scss b/app/vmui/packages/vmui/src/components/Main/Modal/style.scss index 1b5f5e9de..65ff3946b 100644 --- a/app/vmui/packages/vmui/src/components/Main/Modal/style.scss +++ b/app/vmui/packages/vmui/src/components/Main/Modal/style.scss @@ -16,11 +16,9 @@ $padding-modal: 22px; &-content { padding: $padding-modal; - max-height: 85vh; background: $color-white; box-shadow: 0 0 24px rgba($color-black, 0.07); border-radius: $border-radius-small; - overflow: hidden; &-header { display: grid; diff --git a/app/vmui/packages/vmui/src/components/Main/TextField/TextField.tsx b/app/vmui/packages/vmui/src/components/Main/TextField/TextField.tsx index b02fef559..7e1436a2f 100644 --- a/app/vmui/packages/vmui/src/components/Main/TextField/TextField.tsx +++ b/app/vmui/packages/vmui/src/components/Main/TextField/TextField.tsx @@ -64,7 +64,10 @@ const TextField: FC = ({ }, [fieldRef, autofocus]); return
    + ); +}; + +export default JsonForm; diff --git a/app/vmui/packages/vmui/src/pages/TracePage/JsonForm/style.scss b/app/vmui/packages/vmui/src/pages/TracePage/JsonForm/style.scss new file mode 100644 index 000000000..a315094ba --- /dev/null +++ b/app/vmui/packages/vmui/src/pages/TracePage/JsonForm/style.scss @@ -0,0 +1,41 @@ +@use "src/styles/variables" as *; + +.vm-json-form { + display: grid; + grid-template-rows: auto calc(90vh - 78px - ($padding-medium*3)) auto; + gap: $padding-global; + width: 70vw; + max-width: 1000px; + max-height: 900px; + + &_one-field { + grid-template-rows: calc(90vh - 78px - ($padding-medium*3)) auto; + } + + textarea { + overflow: auto; + width: 100%; + height: 100%; + } + + &-footer { + display: flex; + align-items: center; + justify-content: space-between; + gap: $padding-small; + + &__controls { + flex-grow: 1; + display: flex; + align-items: center; + justify-content: flex-start; + gap: $padding-small; + + &_right { + display: grid; + grid-template-columns: repeat(2, 90px); + justify-content: flex-end; + } + } + } +} diff --git a/app/vmui/packages/vmui/src/pages/TracePage/index.tsx b/app/vmui/packages/vmui/src/pages/TracePage/index.tsx new file mode 100644 index 000000000..440c093ae --- /dev/null +++ b/app/vmui/packages/vmui/src/pages/TracePage/index.tsx @@ -0,0 +1,177 @@ +import React, { FC, useMemo, useState } from "preact/compat"; +import { ChangeEvent } from "react"; +import Trace from "../../components/TraceQuery/Trace"; +import TracingsView from "../../components/TraceQuery/TracingsView"; +import Tooltip from "../../components/Main/Tooltip/Tooltip"; +import Button from "../../components/Main/Button/Button"; +import Alert from "../../components/Main/Alert/Alert"; +import "./style.scss"; +import { CloseIcon } from "../../components/Main/Icons"; +import Modal from "../../components/Main/Modal/Modal"; +import JsonForm from "./JsonForm/JsonForm"; +import { ErrorTypes } from "../../types"; + +const TracePage: FC = () => { + const [openModal, setOpenModal] = useState(false); + const [tracesState, setTracesState] = useState([]); + const [errors, setErrors] = useState<{filename: string, text: string}[]>([]); + const hasTraces = useMemo(() => !!tracesState.length, [tracesState]); + + const handleOpenModal = () => { + setOpenModal(true); + }; + + const handleCloseModal = () => { + setOpenModal(false); + }; + + const handleError = (e: Error, filename = "") => { + setErrors(prev => [{ filename, text: `: ${e.message}` }, ...prev]); + }; + + const handleOnload = (result: string, filename: string) => { + try { + const resp = JSON.parse(result); + const traceData = resp.trace || resp; + if (!traceData.duration_msec) { + handleError(new Error(ErrorTypes.traceNotFound), filename); + return; + } + const trace = new Trace(traceData, filename); + setTracesState(prev => [trace, ...prev]); + } catch (e) { + if (e instanceof Error) handleError(e, filename); + } + }; + + const handleChange = (e: ChangeEvent) => { + setErrors([]); + const files = Array.from(e.target.files || []); + files.map(f => { + const reader = new FileReader(); + const filename = f?.name || ""; + reader.onload = (e) => { + const result = String(e.target?.result); + handleOnload(result, filename); + }; + reader.readAsText(f); + }); + e.target.value = ""; + }; + + const handleTraceDelete = (trace: Trace) => { + const updatedTraces = tracesState.filter((data) => data.idValue !== trace.idValue); + setTracesState([...updatedTraces]); + }; + + const handleCloseError = (index: number) => { + setErrors(prev => prev.filter((e,i) => i !== index)); + }; + + const createHandlerCloseError = (index: number) => () => { + handleCloseError(index); + }; + + const UploadButtons = () => ( +
    + + + + +
    + ); + + return ( +
    + ); +}; + +export default TracePage; diff --git a/app/vmui/packages/vmui/src/pages/TracePage/style.scss b/app/vmui/packages/vmui/src/pages/TracePage/style.scss new file mode 100644 index 000000000..9745370c2 --- /dev/null +++ b/app/vmui/packages/vmui/src/pages/TracePage/style.scss @@ -0,0 +1,66 @@ +@use "src/styles/variables" as *; + +.vm-trace-page { + display: flex; + flex-direction: column; + padding: $padding-global; + min-height: 100%; + + &-controls { + display: grid; + grid-template-columns: 1fr 1fr; + gap: $padding-global; + align-items: center; + justify-content: center; + } + + &-header { + display: grid; + grid-template-columns: 1fr auto; + align-items: start; + gap: $padding-global; + margin-bottom: $padding-medium; + + &-errors { + display: grid; + align-items: flex-start; + justify-content: stretch; + grid-template-columns: 1fr; + gap: $padding-medium; + + &-item { + position: relative; + display: grid; + align-items: center; + justify-content: stretch; + + &__filename { + min-height: 20px; + } + + &__close { + position: absolute; + top: auto; + right: $padding-small; + z-index: 2; + } + } + } + } + + &-preview { + flex-grow: 1; + display: flex; + flex-direction: column; + align-items: center; + justify-content: center; + + &__text { + margin-bottom: $padding-small; + font-size: $font-size-medium; + white-space: pre-line; + text-align: center; + line-height: 1.8; + } + } +} diff --git a/app/vmui/packages/vmui/src/router/index.ts b/app/vmui/packages/vmui/src/router/index.ts index e81f665a8..ff566ae86 100644 --- a/app/vmui/packages/vmui/src/router/index.ts +++ b/app/vmui/packages/vmui/src/router/index.ts @@ -3,6 +3,7 @@ const router = { dashboards: "/dashboards", cardinality: "/cardinality", topQueries: "/top-queries", + trace: "/trace" }; export interface RouterOptions { diff --git a/app/vmui/packages/vmui/src/styles/core.scss b/app/vmui/packages/vmui/src/styles/core.scss index e5a3c5fbb..a7a7fd91f 100644 --- a/app/vmui/packages/vmui/src/styles/core.scss +++ b/app/vmui/packages/vmui/src/styles/core.scss @@ -38,5 +38,5 @@ input[type=number]::-webkit-outer-spin-button { position: fixed; left: $padding-global; bottom: $padding-global; - z-index: 9; + z-index: 999; } diff --git a/app/vmui/packages/vmui/src/types/index.ts b/app/vmui/packages/vmui/src/types/index.ts index 14b876273..3e711e82e 100644 --- a/app/vmui/packages/vmui/src/types/index.ts +++ b/app/vmui/packages/vmui/src/types/index.ts @@ -40,7 +40,9 @@ export interface InstantDataSeries { export enum ErrorTypes { emptyServer = "Please enter Server URL", validServer = "Please provide a valid Server URL", - validQuery = "Please enter a valid Query and execute it" + validQuery = "Please enter a valid Query and execute it", + traceNotFound = "Not found the tracing information", + emptyTitle = "Please enter title", } export interface PanelSettings { diff --git a/docs/CHANGELOG.md b/docs/CHANGELOG.md index 7dcc0bde7..299ec6bf4 100644 --- a/docs/CHANGELOG.md +++ b/docs/CHANGELOG.md @@ -17,6 +17,7 @@ The following tip changes can be tested by building VictoriaMetrics components f * FEATURE: [MetricsQL](https://docs.victoriametrics.com/MetricsQL.html): add [range_linear_regression](https://docs.victoriametrics.com/MetricsQL.html#range_linear_regression) function for calculating [simple linear regression](https://en.wikipedia.org/wiki/Simple_linear_regression) over the input time series on the selected time range. This function is useful for predictions and capacity planning. For example, `range_linear_regression(process_resident_memory_bytes)` can predict future memory usage based on the past memory usage. * FEATURE: [MetricsQL](https://docs.victoriametrics.com/MetricsQL.html): add [range_stddev](https://docs.victoriametrics.com/MetricsQL.html#range_stddev) and [range_stdvar](https://docs.victoriametrics.com/MetricsQL.html#range_stdvar) functions. +* FEATURE: [vmui](https://docs.victoriametrics.com/#vmui): add the ability to upload/paste JSON to investigate the trace. See [this issue](https://github.com/VictoriaMetrics/VictoriaMetrics/issues/3308) and [this pull request](https://github.com/VictoriaMetrics/VictoriaMetrics/pull/3310). * FEATURE: [vmui](https://docs.victoriametrics.com/#vmui): reduce JS bundle size from 200Kb to 100Kb. See [this pull request](https://github.com/VictoriaMetrics/VictoriaMetrics/pull/3298). * FEATURE: [vmui](https://docs.victoriametrics.com/#vmui): add the ability to hide results of a particular query by clicking the `eye` icon. See [this pull request](https://github.com/VictoriaMetrics/VictoriaMetrics/pull/3359). diff --git a/docs/README.md b/docs/README.md index ce6504cbd..21ccbe25f 100644 --- a/docs/README.md +++ b/docs/README.md @@ -1645,7 +1645,9 @@ All the durations and timestamps in traces are in milliseconds. Query tracing is allowed by default. It can be denied by passing `-denyQueryTracing` command-line flag to VictoriaMetrics. -[VMUI](#vmui) provides an UI for query tracing - just click `Trace query` checkbox and re-run the query in order to investigate its' trace. +[VMUI](#vmui) provides an UI: +- for query tracing - just click `Trace query` checkbox and re-run the query in order to investigate its' trace. +- for exploring custom trace - go to the tab `Trace analyzer` and upload or paste JSON with trace information. ## Cardinality limiter diff --git a/docs/Single-server-VictoriaMetrics.md b/docs/Single-server-VictoriaMetrics.md index 9baac4623..3fc46ef80 100644 --- a/docs/Single-server-VictoriaMetrics.md +++ b/docs/Single-server-VictoriaMetrics.md @@ -1648,7 +1648,9 @@ All the durations and timestamps in traces are in milliseconds. Query tracing is allowed by default. It can be denied by passing `-denyQueryTracing` command-line flag to VictoriaMetrics. -[VMUI](#vmui) provides an UI for query tracing - just click `Trace query` checkbox and re-run the query in order to investigate its' trace. +[VMUI](#vmui) provides an UI: +- for query tracing - just click `Trace query` checkbox and re-run the query in order to investigate its' trace. +- for exploring custom trace - go to the tab `Trace analyzer` and upload or paste JSON with trace information. ## Cardinality limiter From cae0f37eddc7d380d2957cf57901706b23307b2b Mon Sep 17 00:00:00 2001 From: Aliaksandr Valialkin Date: Fri, 18 Nov 2022 13:40:01 +0200 Subject: [PATCH 08/46] app/vmselect/netstorage: remove superflouos map lookup at ProcessSearchQuery This should reduce CPU usage a bit during querying --- app/vmselect/netstorage/netstorage.go | 16 ++++++++++------ 1 file changed, 10 insertions(+), 6 deletions(-) diff --git a/app/vmselect/netstorage/netstorage.go b/app/vmselect/netstorage/netstorage.go index f8bf40754..f7c1daca5 100644 --- a/app/vmselect/netstorage/netstorage.go +++ b/app/vmselect/netstorage/netstorage.go @@ -1011,7 +1011,10 @@ func ProcessSearchQuery(qt *querytracer.Tracer, sq *storage.SearchQuery, deadlin startTime := time.Now() maxSeriesCount := sr.Init(qt, vmstorage.Storage, tfss, tr, sq.MaxMetrics, deadline.Deadline()) indexSearchDuration.UpdateDuration(startTime) - m := make(map[string][]blockRef, maxSeriesCount) + type blockRefs struct { + brs []blockRef + } + m := make(map[string]*blockRefs, maxSeriesCount) orderedMetricNames := make([]string, 0, maxSeriesCount) blocksRead := 0 samples := 0 @@ -1040,13 +1043,14 @@ func ProcessSearchQuery(qt *querytracer.Tracer, sq *storage.SearchQuery, deadlin } metricName := sr.MetricBlockRef.MetricName brs := m[string(metricName)] - brs = append(brs, blockRef{ + if brs == nil { + brs = &blockRefs{} + } + brs.brs = append(brs.brs, blockRef{ partRef: br.PartRef(), addr: addr, }) - if len(brs) > 1 { - m[string(metricName)] = brs - } else { + if len(brs.brs) == 1 { // An optimization for big number of time series with long metricName values: // use only a single copy of metricName for both orderedMetricNames and m. orderedMetricNames = append(orderedMetricNames, string(metricName)) @@ -1075,7 +1079,7 @@ func ProcessSearchQuery(qt *querytracer.Tracer, sq *storage.SearchQuery, deadlin for i, metricName := range orderedMetricNames { pts[i] = packedTimeseries{ metricName: metricName, - brs: m[metricName], + brs: m[metricName].brs, } } rss.packedTimeseries = pts From a061d33400a98d80840f9a8d9dee18dd510f1c57 Mon Sep 17 00:00:00 2001 From: Aliaksandr Valialkin Date: Fri, 18 Nov 2022 14:03:42 +0200 Subject: [PATCH 09/46] app/vmselect: clarify that it isnt recommended setting -replicationFactor at vmselect nodes even if the replication is enabled at vminsert nodes --- docs/Cluster-VictoriaMetrics.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/docs/Cluster-VictoriaMetrics.md b/docs/Cluster-VictoriaMetrics.md index c2d072ef9..bf4c490b3 100644 --- a/docs/Cluster-VictoriaMetrics.md +++ b/docs/Cluster-VictoriaMetrics.md @@ -984,7 +984,7 @@ Below is the output for `/path/to/vmselect -help`: Optional URL to push metrics exposed at /metrics page. See https://docs.victoriametrics.com/#push-metrics . By default metrics exposed at /metrics page aren't pushed to any remote storage Supports an array of values separated by comma or specified via multiple flags. -replicationFactor int - How many copies of every time series is available on vmstorage nodes. See -replicationFactor command-line flag for vminsert nodes (default 1) + How many copies of every time series is available on vmstorage nodes. vmselect cancels responses from the slowest -replicationFactor-1 vmstorage nodes if -replicationFactor is set by assuming it already received complete data. It isn't recommended setting this flag to values other than 1 at vmselect nodes, since it may result in incomplete responses after adding new vmstorage nodes even if the replication is enabled at vminsert nodes (default 1) -search.cacheTimestampOffset duration The maximum duration since the current time for response data, which is always queried from the original raw data, without using the response cache. Increase this value if you see gaps in responses due to time synchronization issues between VictoriaMetrics and data sources (default 5m0s) -search.denyPartialResponse From 65b4e96a80b69f042ca0515e1a098db8de034424 Mon Sep 17 00:00:00 2001 From: Aliaksandr Valialkin Date: Fri, 18 Nov 2022 14:06:23 +0200 Subject: [PATCH 10/46] docs/Cluster-VictoriaMetrics.md: sync with cluster branch --- docs/Cluster-VictoriaMetrics.md | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/docs/Cluster-VictoriaMetrics.md b/docs/Cluster-VictoriaMetrics.md index bf4c490b3..6854753ce 100644 --- a/docs/Cluster-VictoriaMetrics.md +++ b/docs/Cluster-VictoriaMetrics.md @@ -719,7 +719,7 @@ Below is the output for `/path/to/vminsert -help`: -cluster.tlsKeyFile string Path to client-side TLS key file to use when connecting to -storageNode if -cluster.tls flag is set. See https://docs.victoriametrics.com/Cluster-VictoriaMetrics.html#mtls-protection . This flag is available only in enterprise version of VictoriaMetrics -clusternativeListenAddr string - TCP address to listen for data from other vminsert nodes in multi-level cluster setup. See https://docs.victoriametrics.com/Cluster-VictoriaMetrics.html#multi-level-cluster-setup . Usually :8400 must be set. Doesn't work if empty + TCP address to listen for data from other vminsert nodes in multi-level cluster setup. See https://docs.victoriametrics.com/Cluster-VictoriaMetrics.html#multi-level-cluster-setup . Usually :8400 should be set to match default vmstorage port for vminsert. Disabled if empty -csvTrimTimestamp duration Trim timestamps when importing csv data to this duration. Minimum practical duration is 1ms. Higher duration (i.e. 1s) may be used for reducing disk space usage for timestamp data (default 1ms) -datadog.maxInsertRequestSize size @@ -912,7 +912,7 @@ Below is the output for `/path/to/vmselect -help`: -clusternative.tlsKeyFile string Path to server-side TLS key file to use when accepting connections at -clusternativeListenAddr if -clusternative.tls flag is set. See https://docs.victoriametrics.com/Cluster-VictoriaMetrics.html#mtls-protection -clusternativeListenAddr string - TCP address to listen for requests from other vmselect nodes in multi-level cluster setup. See https://docs.victoriametrics.com/Cluster-VictoriaMetrics.html#multi-level-cluster-setup . Usually :8401 must be set. Doesn't work if empty + TCP address to listen for requests from other vmselect nodes in multi-level cluster setup. See https://docs.victoriametrics.com/Cluster-VictoriaMetrics.html#multi-level-cluster-setup . Usually :8401 should be set to match default vmstorage port for vmselect. Disabled if empty -dedup.minScrapeInterval duration Leave only the last sample in every time series per each discrete interval equal to -dedup.minScrapeInterval > 0. See https://docs.victoriametrics.com/#deduplication for details -denyQueryTracing From cb1a621d631421293c08882073aead8c5bc6cf8e Mon Sep 17 00:00:00 2001 From: Aliaksandr Valialkin Date: Mon, 21 Nov 2022 15:15:18 +0200 Subject: [PATCH 11/46] app/{vminsert,vmselect}: add `-storageNode.filter` command-line flag for filtering the discovered storage nodes Updates https://github.com/VictoriaMetrics/VictoriaMetrics/issues/3353 --- docs/CHANGELOG.md | 1 + docs/Cluster-VictoriaMetrics.md | 30 ++++++++++++++++++++++++------ 2 files changed, 25 insertions(+), 6 deletions(-) diff --git a/docs/CHANGELOG.md b/docs/CHANGELOG.md index 299ec6bf4..bc46cdba9 100644 --- a/docs/CHANGELOG.md +++ b/docs/CHANGELOG.md @@ -15,6 +15,7 @@ The following tip changes can be tested by building VictoriaMetrics components f ## tip +* FEATURE: [VictoriaMetrics enterprise](https://docs.victoriametrics.com/enterprise.html): add `-storageNode.filter` command-line flag for filtering the [discovered vmstorage nodes](https://docs.victoriametrics.com/Cluster-VictoriaMetrics.html#automatic-vmstorage-discovery) with arbitrary regular expressions. See [this feature request](https://github.com/VictoriaMetrics/VictoriaMetrics/issues/3353). * FEATURE: [MetricsQL](https://docs.victoriametrics.com/MetricsQL.html): add [range_linear_regression](https://docs.victoriametrics.com/MetricsQL.html#range_linear_regression) function for calculating [simple linear regression](https://en.wikipedia.org/wiki/Simple_linear_regression) over the input time series on the selected time range. This function is useful for predictions and capacity planning. For example, `range_linear_regression(process_resident_memory_bytes)` can predict future memory usage based on the past memory usage. * FEATURE: [MetricsQL](https://docs.victoriametrics.com/MetricsQL.html): add [range_stddev](https://docs.victoriametrics.com/MetricsQL.html#range_stddev) and [range_stdvar](https://docs.victoriametrics.com/MetricsQL.html#range_stdvar) functions. * FEATURE: [vmui](https://docs.victoriametrics.com/#vmui): add the ability to upload/paste JSON to investigate the trace. See [this issue](https://github.com/VictoriaMetrics/VictoriaMetrics/issues/3308) and [this pull request](https://github.com/VictoriaMetrics/VictoriaMetrics/pull/3310). diff --git a/docs/Cluster-VictoriaMetrics.md b/docs/Cluster-VictoriaMetrics.md index 6854753ce..2f5ef5433 100644 --- a/docs/Cluster-VictoriaMetrics.md +++ b/docs/Cluster-VictoriaMetrics.md @@ -215,6 +215,10 @@ For example, `-storageNode='dns+srv:vmstorage-hot' -storageNode='dns+srv:vmstora It is OK to pass regular static `vmstorage` addresses together with `dns+srv` addresses at `-storageNode`. For example, `-storageNode=vmstorage1,vmstorage2 -storageNode='dns+srv:vmstorage-autodiscovery'`. +The discovered addresses can be filtered with optional `-storageNode.filter` command-line flag, which can contain arbitrary regular expression filter. +For example, `-storageNode.filter='^[^:]+:8400$'` would leave discovered addresses ending with `8400` port only, e.g. the default port used +for sending data from `vminsert` to `vmstorage` node according to `-vminsertAddr` command-line flag. + The currently discovered `vmstorage` nodes can be [monitored](#monitoring) with `vm_rpc_vmstorage_is_reachable` and `vm_rpc_vmstorage_is_read_only` metrics. ## mTLS protection @@ -708,6 +712,8 @@ Report bugs and propose new features [here](https://github.com/VictoriaMetrics/V Below is the output for `/path/to/vminsert -help`: ``` + -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) -cluster.tls Whether to use TLS for connections to -storageNode. See https://docs.victoriametrics.com/Cluster-VictoriaMetrics.html#mtls-protection .This flag is available only in enterprise version of VictoriaMetrics -cluster.tlsCAFile string @@ -719,7 +725,7 @@ Below is the output for `/path/to/vminsert -help`: -cluster.tlsKeyFile string Path to client-side TLS key file to use when connecting to -storageNode if -cluster.tls flag is set. See https://docs.victoriametrics.com/Cluster-VictoriaMetrics.html#mtls-protection . This flag is available only in enterprise version of VictoriaMetrics -clusternativeListenAddr string - TCP address to listen for data from other vminsert nodes in multi-level cluster setup. See https://docs.victoriametrics.com/Cluster-VictoriaMetrics.html#multi-level-cluster-setup . Usually :8400 should be set to match default vmstorage port for vminsert. Disabled if empty + TCP address to listen for data from other vminsert nodes in multi-level cluster setup. See https://docs.victoriametrics.com/Cluster-VictoriaMetrics.html#multi-level-cluster-setup . Usually :8400 should be set to match default vmstorage port for vminsert. Disabled work if empty -csvTrimTimestamp duration Trim timestamps when importing csv data to this duration. Minimum practical duration is 1ms. Higher duration (i.e. 1s) may be used for reducing disk space usage for timestamp data (default 1ms) -datadog.maxInsertRequestSize size @@ -833,6 +839,8 @@ Below is the output for `/path/to/vminsert -help`: Trim timestamps for OpenTSDB HTTP data to this duration. Minimum practical duration is 1ms. Higher duration (i.e. 1s) may be used for reducing disk space usage for timestamp data (default 1ms) -pprofAuthKey string Auth key for /debug/pprof/* endpoints. It must be passed via authKey query arg. It overrides httpAuth.* settings + -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.extraLabel array Optional labels to add to metrics pushed to -pushmetrics.url . For example, -pushmetrics.extraLabel='instance="foo"' adds instance="foo" label to all the metrics pushed to -pushmetrics.url Supports an array of values separated by comma or specified via multiple flags. @@ -854,6 +862,8 @@ Below is the output for `/path/to/vminsert -help`: -storageNode array Comma-separated addresses of vmstorage nodes; usage: -storageNode=vmstorage-host1,...,vmstorage-hostN . Enterprise version of VictoriaMetrics supports automatic discovery of vmstorage addresses via dns+srv records. For example, -storageNode=dns+srv:vmstorage.addrs . See https://docs.victoriametrics.com/Cluster-VictoriaMetrics.html#automatic-vmstorage-discovery Supports an array of values separated by comma or specified via multiple flags. + -storageNode.filter string + An optional regexp filter for discovered -storageNode addresses according to https://docs.victoriametrics.com/Cluster-VictoriaMetrics.html#automatic-vmstorage-discovery. Discovered addresses matching the filter are retained, while other addresses are ignored. This flag is available only in enterprise version of VictoriaMetrics -tls Whether to enable TLS for incoming HTTP requests at -httpListenAddr (aka https). -tlsCertFile and -tlsKeyFile must be set if -tls is set -tlsCertFile string @@ -880,6 +890,8 @@ Below is the output for `/path/to/vmselect -help`: ``` -cacheDataPath string Path to directory for cache files. Cache isn't saved if empty + -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) -cluster.tls Whether to use TLS for connections to -storageNode. See https://docs.victoriametrics.com/Cluster-VictoriaMetrics.html#mtls-protection .This flag is available only in enterprise version of VictoriaMetrics -cluster.tlsCAFile string @@ -912,13 +924,13 @@ Below is the output for `/path/to/vmselect -help`: -clusternative.tlsKeyFile string Path to server-side TLS key file to use when accepting connections at -clusternativeListenAddr if -clusternative.tls flag is set. See https://docs.victoriametrics.com/Cluster-VictoriaMetrics.html#mtls-protection -clusternativeListenAddr string - TCP address to listen for requests from other vmselect nodes in multi-level cluster setup. See https://docs.victoriametrics.com/Cluster-VictoriaMetrics.html#multi-level-cluster-setup . Usually :8401 should be set to match default vmstorage port for vmselect. Disabled if empty + TCP address to listen for requests from other vmselect nodes in multi-level cluster setup. See https://docs.victoriametrics.com/Cluster-VictoriaMetrics.html#multi-level-cluster-setup . Usually :8401 should be set to match default vmstorage port for vmselect. Disabled work if empty -dedup.minScrapeInterval duration Leave only the last sample in every time series per each discrete interval equal to -dedup.minScrapeInterval > 0. See https://docs.victoriametrics.com/#deduplication for details -denyQueryTracing Whether to disable the ability to trace queries. See https://docs.victoriametrics.com/#query-tracing -downsampling.period array - Comma-separated downsampling periods in the format 'offset:period'. For example, '30d:10m' instructs to leave a single sample per 10 minutes for samples older than 30 days. See https://docs.victoriametrics.com/#downsampling for details + Comma-separated downsampling periods in the format 'offset:period'. For example, '30d:10m' instructs to leave a single sample per 10 minutes for samples older than 30 days. See https://docs.victoriametrics.com/#downsampling for details. This flag is available only in enterprise version of VictoriaMetrics Supports an array of values separated by comma or specified via multiple flags. -enableTCP6 Whether to enable IPv6 for listening and dialing. By default only IPv4 TCP and UDP is used @@ -975,6 +987,8 @@ Below is the output for `/path/to/vmselect -help`: Auth key for /metrics endpoint. It must be passed via authKey query arg. It overrides httpAuth.* settings -pprofAuthKey string Auth key for /debug/pprof/* endpoints. It must be passed via authKey query arg. It overrides httpAuth.* settings + -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.extraLabel array Optional labels to add to metrics pushed to -pushmetrics.url . For example, -pushmetrics.extraLabel='instance="foo"' adds instance="foo" label to all the metrics pushed to -pushmetrics.url Supports an array of values separated by comma or specified via multiple flags. @@ -1061,8 +1075,10 @@ Below is the output for `/path/to/vmselect -help`: Comma-separated addresses of vmselect nodes; usage: -selectNode=vmselect-host1,...,vmselect-hostN Supports an array of values separated by comma or specified via multiple flags. -storageNode array - Comma-separated addresses of vmstorage nodes; usage: -storageNode=vmstorage-host1,...,vmstorage-hostN . Enterprise version of VictoriaMetrics supports automatic discovery of vmstorage addresses via dns+srv records. For example, -storageNode=dns+srv:vmstorage.addrs .See https://docs.victoriametrics.com/Cluster-VictoriaMetrics.html#automatic-vmstorage-discovery + Comma-separated addresses of vmstorage nodes; usage: -storageNode=vmstorage-host1,...,vmstorage-hostN . Enterprise version of VictoriaMetrics supports automatic discovery of vmstorage addresses via dns+srv records. For example, -storageNode=dns+srv:vmstorage.addrs . See https://docs.victoriametrics.com/Cluster-VictoriaMetrics.html#automatic-vmstorage-discovery Supports an array of values separated by comma or specified via multiple flags. + -storageNode.filter string + An optional regexp filter for discovered -storageNode addresses according to https://docs.victoriametrics.com/Cluster-VictoriaMetrics.html#automatic-vmstorage-discovery. Discovered addresses matching the filter are retained, while other addresses are ignored. This flag is available only in enterprise version of VictoriaMetrics -tls Whether to enable TLS for incoming HTTP requests at -httpListenAddr (aka https). -tlsCertFile and -tlsKeyFile must be set if -tls is set -tlsCertFile string @@ -1089,6 +1105,8 @@ Below is the output for `/path/to/vmstorage -help`: ``` -bigMergeConcurrency int The maximum number of CPU cores to use for big merges. Default value is used if set to 0 + -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) -cluster.tls Whether to use TLS when accepting connections from vminsert and vmselect. See https://docs.victoriametrics.com/Cluster-VictoriaMetrics.html#mtls-protection . This flag is available only in enterprise version of VictoriaMetrics -cluster.tlsCAFile string @@ -1109,7 +1127,7 @@ Below is the output for `/path/to/vmstorage -help`: -denyQueryTracing Whether to disable the ability to trace queries. See https://docs.victoriametrics.com/#query-tracing -downsampling.period array - Comma-separated downsampling periods in the format 'offset:period'. For example, '30d:10m' instructs to leave a single sample per 10 minutes for samples older than 30 days. See https://docs.victoriametrics.com/#downsampling for details + Comma-separated downsampling periods in the format 'offset:period'. For example, '30d:10m' instructs to leave a single sample per 10 minutes for samples older than 30 days. See https://docs.victoriametrics.com/#downsampling for details. This flag is available only in enterprise version of VictoriaMetrics Supports an array of values separated by comma or specified via multiple flags. -enableTCP6 Whether to enable IPv6 for listening and dialing. By default only IPv4 TCP and UDP is used @@ -1175,7 +1193,7 @@ Below is the output for `/path/to/vmstorage -help`: -precisionBits int The number of precision bits to store per each value. Lower precision bits improves data compression at the cost of precision loss (default 64) -prevCacheRemovalPercent float - The previous cache is removed when the percent of requests it serves becomes lower than this value. Higher values reduce average memory usage at the cost of higher CPU usage (default 0.2) + 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.extraLabel array Optional labels to add to metrics pushed to -pushmetrics.url . For example, -pushmetrics.extraLabel='instance="foo"' adds instance="foo" label to all the metrics pushed to -pushmetrics.url Supports an array of values separated by comma or specified via multiple flags. From 20d758e3e4e28a208a1096fe1b8c393c55e779c8 Mon Sep 17 00:00:00 2001 From: Aliaksandr Valialkin Date: Mon, 21 Nov 2022 15:34:13 +0200 Subject: [PATCH 12/46] all: add a link to https://docs.victoriametrics.com/enterprise.html into description for enterprise flags --- README.md | 16 +++++++------ app/vmagent/README.md | 24 +++++++++++-------- app/vmalert/README.md | 17 +++++++------- app/vmauth/README.md | 2 +- app/vmbackup/README.md | 2 +- app/vmbackupmanager/README.md | 11 ++++++--- app/vmgateway/README.md | 12 +++++----- app/vmrestore/README.md | 2 +- docs/Cluster-VictoriaMetrics.md | 34 +++++++++++++-------------- docs/README.md | 16 +++++++------ docs/Single-server-VictoriaMetrics.md | 16 +++++++------ docs/vmagent.md | 24 +++++++++++-------- docs/vmalert.md | 17 +++++++------- docs/vmauth.md | 2 +- docs/vmbackup.md | 2 +- docs/vmbackupmanager.md | 11 ++++++--- docs/vmgateway.md | 12 +++++----- docs/vmrestore.md | 2 +- 18 files changed, 122 insertions(+), 100 deletions(-) diff --git a/README.md b/README.md index 2eaa7d47a..558f17c6b 100644 --- a/README.md +++ b/README.md @@ -2035,6 +2035,8 @@ Pass `-help` to VictoriaMetrics in order to see the list of supported command-li ``` -bigMergeConcurrency int The maximum number of CPU cores to use for big merges. Default value is used if set to 0 + -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) -configAuthKey string Authorization key for accessing /config page. It must be passed via authKey query arg -csvTrimTimestamp duration @@ -2053,7 +2055,7 @@ Pass `-help` to VictoriaMetrics in order to see the list of supported command-li -denyQueryTracing Whether to disable the ability to trace queries. See https://docs.victoriametrics.com/#query-tracing -downsampling.period array - Comma-separated downsampling periods in the format 'offset:period'. For example, '30d:10m' instructs to leave a single sample per 10 minutes for samples older than 30 days. See https://docs.victoriametrics.com/#downsampling for details. This flag is available only in enterprise version of VictoriaMetrics + Comma-separated downsampling periods in the format 'offset:period'. For example, '30d:10m' instructs to leave a single sample per 10 minutes for samples older than 30 days. See https://docs.victoriametrics.com/#downsampling for details. This flag is available only in VictoriaMetrics enterprise. See https://docs.victoriametrics.com/enterprise.html Supports an array of values separated by comma or specified via multiple flags. -dryRun Whether to check only -promscrape.config and then exit. Unknown config entries aren't allowed in -promscrape.config by default. This can be changed with -promscrape.config.strictParse=false command-line flag @@ -2064,7 +2066,7 @@ Pass `-help` to VictoriaMetrics in order to see the list of supported command-li -envflag.prefix string Prefix for environment variables if -envflag.enable is set -eula - By specifying this flag, you confirm that you have an enterprise license and accept the EULA https://victoriametrics.com/assets/VM_EULA.pdf . This flag is available only in enterprise version of VictoriaMetrics + By specifying this flag, you confirm that you have an enterprise license and accept the EULA https://victoriametrics.com/assets/VM_EULA.pdf . This flag is available only in VictoriaMetrics enterprise. See https://docs.victoriametrics.com/enterprise.html -finalMergeDelay duration The delay before starting final merge for per-month partition after no new data is ingested into it. Final merge may require additional disk IO and CPU resources. Final merge may increase query speed and reduce disk space usage in some cases. Zero value disables final merge -flagsAuthKey string @@ -2168,7 +2170,7 @@ Pass `-help` to VictoriaMetrics in order to see the list of supported command-li -precisionBits int The number of precision bits to store per each value. Lower precision bits improves data compression at the cost of precision loss (default 64) -prevCacheRemovalPercent float - The previous cache is removed when the percent of requests it serves becomes lower than this value. Higher values reduce average memory usage at the cost of higher CPU usage (default 0.2) + 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) -promscrape.azureSDCheckInterval duration Interval for checking for changes in Azure. This works only if azure_sd_configs is configured in '-promscrape.config' file. See https://docs.victoriametrics.com/sd_configs.html#azure_sd_configs for details (default 1m0s) -promscrape.cluster.memberNum string @@ -2263,7 +2265,7 @@ Pass `-help` to VictoriaMetrics in order to see the list of supported command-li -relabelDebug Whether to log metrics before and after relabeling with -relabelConfig. If the -relabelDebug is enabled, then the metrics aren't sent to storage. This is useful for debugging the relabeling configs -retentionFilter array - Retention filter in the format 'filter:retention'. For example, '{env="dev"}:3d' configures the retention for time series with env="dev" label to 3 days. See https://docs.victoriametrics.com/#retention-filters for details. This flag is available only in enterprise version of VictoriaMetrics + Retention filter in the format 'filter:retention'. For example, '{env="dev"}:3d' configures the retention for time series with env="dev" label to 3 days. See https://docs.victoriametrics.com/#retention-filters for details. This flag is available only in VictoriaMetrics enterprise. See https://docs.victoriametrics.com/enterprise.html Supports an array of values separated by comma or specified via multiple flags. -retentionPeriod value Data with timestamps outside the retentionPeriod is automatically deleted. See also -retentionFilter @@ -2277,9 +2279,9 @@ Pass `-help` to VictoriaMetrics in order to see the list of supported command-li -search.disableCache Whether to disable response caching. This may be useful during data backfilling -search.graphiteMaxPointsPerSeries int - The maximum number of points per series Graphite render API can return. This flag is available only in enterprise version of VictoriaMetrics (default 1000000) + The maximum number of points per series Graphite render API can return. This flag is available only in VictoriaMetrics enterprise. See https://docs.victoriametrics.com/enterprise.html (default 1000000) -search.graphiteStorageStep duration - The interval between datapoints stored in the database. It is used at Graphite Render API handler for normalizing the interval between datapoints in case it isn't normalized. It can be overridden by sending 'storage_step' query arg to /render API or by sending the desired interval via 'Storage-Step' http header during querying /render API. This flag is available only in enterprise version of VictoriaMetrics (default 10s) + The interval between datapoints stored in the database. It is used at Graphite Render API handler for normalizing the interval between datapoints in case it isn't normalized. It can be overridden by sending 'storage_step' query arg to /render API or by sending the desired interval via 'Storage-Step' http header during querying /render API. This flag is available only in VictoriaMetrics enterprise. See https://docs.victoriametrics.com/enterprise.html (default 10s) -search.latencyOffset duration The time when data points become visible in query results after the collection. Too small value can result in incomplete last points for query results (default 30s) -search.logSlowQueryDuration duration @@ -2293,7 +2295,7 @@ Pass `-help` to VictoriaMetrics in order to see the list of supported command-li -search.maxFederateSeries int The maximum number of time series, which can be returned from /federate. This option allows limiting memory usage (default 1000000) -search.maxGraphiteSeries int - The maximum number of time series, which can be scanned during queries to Graphite Render API. See https://docs.victoriametrics.com/#graphite-render-api-usage . This flag is available only in enterprise version of VictoriaMetrics (default 300000) + The maximum number of time series, which can be scanned during queries to Graphite Render API. See https://docs.victoriametrics.com/#graphite-render-api-usage . This flag is available only in VictoriaMetrics enterprise. See https://docs.victoriametrics.com/enterprise.html (default 300000) -search.maxLookback duration Synonym to -search.lookback-delta from Prometheus. The value is dynamically detected from interval between time series datapoints if not set. It can be overridden on per-query basis via max_lookback arg. See also '-search.maxStalenessInterval' flag, which has the same meaining due to historical reasons -search.maxMemoryPerQuery size diff --git a/app/vmagent/README.md b/app/vmagent/README.md index c98eb2c2d..7514e1167 100644 --- a/app/vmagent/README.md +++ b/app/vmagent/README.md @@ -1107,6 +1107,8 @@ vmagent collects metrics data via popular data ingestion protocols and routes th See the docs at https://docs.victoriametrics.com/vmagent.html . + -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) -configAuthKey string Authorization key for accessing /config page. It must be passed via authKey query arg -csvTrimTimestamp duration @@ -1127,7 +1129,7 @@ See the docs at https://docs.victoriametrics.com/vmagent.html . -envflag.prefix string Prefix for environment variables if -envflag.enable is set -eula - By specifying this flag, you confirm that you have an enterprise license and accept the EULA https://victoriametrics.com/assets/VM_EULA.pdf . This flag is available only in enterprise version of VictoriaMetrics + By specifying this flag, you confirm that you have an enterprise license and accept the EULA https://victoriametrics.com/assets/VM_EULA.pdf . This flag is available only in VictoriaMetrics enterprise. See https://docs.victoriametrics.com/enterprise.html -flagsAuthKey string Auth key for /flags endpoint. It must be passed via authKey query arg. It overrides httpAuth.* settings -fs.disableMmap @@ -1178,30 +1180,30 @@ See the docs at https://docs.victoriametrics.com/vmagent.html . -insert.maxQueueDuration duration The maximum duration for waiting in the queue for insert requests due to -maxConcurrentInserts (default 1m0s) -kafka.consumer.topic array - Kafka topic names for data consumption. This flag is available only in enterprise version of VictoriaMetrics + Kafka topic names for data consumption. This flag is available only in VictoriaMetrics enterprise. See https://docs.victoriametrics.com/enterprise.html Supports an array of values separated by comma or specified via multiple flags. -kafka.consumer.topic.basicAuth.password array - Optional basic auth password for -kafka.consumer.topic. Must be used in conjunction with any supported auth methods for kafka client, specified by flag -kafka.consumer.topic.options='security.protocol=SASL_SSL;sasl.mechanisms=PLAIN' . This flag is available only in enterprise version of VictoriaMetrics + Optional basic auth password for -kafka.consumer.topic. Must be used in conjunction with any supported auth methods for kafka client, specified by flag -kafka.consumer.topic.options='security.protocol=SASL_SSL;sasl.mechanisms=PLAIN' . This flag is available only in VictoriaMetrics enterprise. See https://docs.victoriametrics.com/enterprise.html Supports an array of values separated by comma or specified via multiple flags. -kafka.consumer.topic.basicAuth.username array - Optional basic auth username for -kafka.consumer.topic. Must be used in conjunction with any supported auth methods for kafka client, specified by flag -kafka.consumer.topic.options='security.protocol=SASL_SSL;sasl.mechanisms=PLAIN' . This flag is available only in enterprise version of VictoriaMetrics + Optional basic auth username for -kafka.consumer.topic. Must be used in conjunction with any supported auth methods for kafka client, specified by flag -kafka.consumer.topic.options='security.protocol=SASL_SSL;sasl.mechanisms=PLAIN' . This flag is available only in VictoriaMetrics enterprise. See https://docs.victoriametrics.com/enterprise.html Supports an array of values separated by comma or specified via multiple flags. -kafka.consumer.topic.brokers array - List of brokers to connect for given topic, e.g. -kafka.consumer.topic.broker=host-1:9092;host-2:9092 . This flag is available only in enterprise version of VictoriaMetrics + List of brokers to connect for given topic, e.g. -kafka.consumer.topic.broker=host-1:9092;host-2:9092 . This flag is available only in VictoriaMetrics enterprise. See https://docs.victoriametrics.com/enterprise.html Supports an array of values separated by comma or specified via multiple flags. -kafka.consumer.topic.defaultFormat string - Expected data format in the topic if -kafka.consumer.topic.format is skipped. This flag is available only in enterprise version of VictoriaMetrics (default "promremotewrite") + Expected data format in the topic if -kafka.consumer.topic.format is skipped. This flag is available only in VictoriaMetrics enterprise. See https://docs.victoriametrics.com/enterprise.html (default "promremotewrite") -kafka.consumer.topic.format array - data format for corresponding kafka topic. Valid formats: influx, prometheus, promremotewrite, graphite, jsonline . This flag is available only in enterprise version of VictoriaMetrics + data format for corresponding kafka topic. Valid formats: influx, prometheus, promremotewrite, graphite, jsonline . This flag is available only in VictoriaMetrics enterprise. See https://docs.victoriametrics.com/enterprise.html Supports an array of values separated by comma or specified via multiple flags. -kafka.consumer.topic.groupID array - Defines group.id for topic. This flag is available only in enterprise version of VictoriaMetrics + Defines group.id for topic. This flag is available only in VictoriaMetrics enterprise. See https://docs.victoriametrics.com/enterprise.html Supports an array of values separated by comma or specified via multiple flags. -kafka.consumer.topic.isGzipped array - Enables gzip setting for topic messages payload. Only prometheus, jsonline and influx formats accept gzipped messages.This flag is available only in enterprise version of VictoriaMetrics + Enables gzip setting for topic messages payload. Only prometheus, jsonline and influx formats accept gzipped messages.This flag is available only in VictoriaMetrics enterprise. See https://docs.victoriametrics.com/enterprise.html Supports array of values separated by comma or specified via multiple flags. -kafka.consumer.topic.options array - Optional key=value;key1=value2 settings for topic consumer. See full configuration options at https://github.com/edenhill/librdkafka/blob/master/CONFIGURATION.md . This flag is available only in enterprise version of VictoriaMetrics + Optional key=value;key1=value2 settings for topic consumer. See full configuration options at https://github.com/edenhill/librdkafka/blob/master/CONFIGURATION.md . This flag is available only in VictoriaMetrics enterprise. See https://docs.victoriametrics.com/enterprise.html Supports an array of values separated by comma or specified via multiple flags. -loggerDisableTimestamps Whether to disable writing timestamps in logs @@ -1242,6 +1244,8 @@ See the docs at https://docs.victoriametrics.com/vmagent.html . Trim timestamps for OpenTSDB HTTP data to this duration. Minimum practical duration is 1ms. Higher duration (i.e. 1s) may be used for reducing disk space usage for timestamp data (default 1ms) -pprofAuthKey string Auth key for /debug/pprof/* endpoints. It must be passed via authKey query arg. It overrides httpAuth.* settings + -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) -promscrape.azureSDCheckInterval duration Interval for checking for changes in Azure. This works only if azure_sd_configs is configured in '-promscrape.config' file. See https://docs.victoriametrics.com/sd_configs.html#azure_sd_configs for details (default 1m0s) -promscrape.cluster.memberNum string diff --git a/app/vmalert/README.md b/app/vmalert/README.md index b356b2f4c..347d724f6 100644 --- a/app/vmalert/README.md +++ b/app/vmalert/README.md @@ -781,7 +781,7 @@ The shortlist of configuration flags is the following: {% raw %} ``` -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.html#multitenancy . This flag is available only in enterprise version of VictoriaMetrics + 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.html#multitenancy . This flag is available only in VictoriaMetrics enterprise. See https://docs.victoriametrics.com/enterprise.html -configCheckInterval duration Interval for checking for changes in '-rule' or '-notifier.config' files. By default the checking is disabled. Send SIGHUP signal in order to force config check for changes. -datasource.appendTypePrefix @@ -805,11 +805,11 @@ The shortlist of configuration flags is the following: -datasource.maxIdleConnections int Defines the number of idle (keep-alive connections) to each configured datasource. Consider setting this value equal to the value: groups_total * group.concurrency. Too low a value may result in a high number of sockets in TIME_WAIT state. (default 100) -datasource.oauth2.clientID string - Optional OAuth2 clientID to use for -datasource.url. + Optional OAuth2 clientID to use for -datasource.url. -datasource.oauth2.clientSecret string Optional OAuth2 clientSecret to use for -datasource.url. -datasource.oauth2.clientSecretFile string - Optional OAuth2 clientSecretFile to use for -datasource.url. + Optional OAuth2 clientSecretFile to use for -datasource.url. -datasource.oauth2.scopes string Optional OAuth2 scopes to use for -datasource.url. Scopes must be delimited by ';' -datasource.oauth2.tokenUrl string @@ -835,9 +835,9 @@ The shortlist of configuration flags is the following: -datasource.url string Datasource compatible with Prometheus HTTP API. It can be single node VictoriaMetrics or vmselect URL. Required parameter. E.g. http://127.0.0.1:8428 . See also '-datasource.disablePathAppend', '-datasource.showURL'. -defaultTenant.graphite string - Default tenant for Graphite alerting groups. See https://docs.victoriametrics.com/vmalert.html#multitenancy .This flag is available only in enterprise version of VictoriaMetrics + Default tenant for Graphite alerting groups. See https://docs.victoriametrics.com/vmalert.html#multitenancy .This flag is available only in VictoriaMetrics enterprise. See https://docs.victoriametrics.com/enterprise.html -defaultTenant.prometheus string - Default tenant for Prometheus alerting groups. See https://docs.victoriametrics.com/vmalert.html#multitenancy . This flag is available only in enterprise version of VictoriaMetrics + Default tenant for Prometheus alerting groups. See https://docs.victoriametrics.com/vmalert.html#multitenancy . This flag is available only in VictoriaMetrics enterprise. See https://docs.victoriametrics.com/enterprise.html -disableAlertgroupLabel Whether to disable adding group's Name as label to generated alerts and time series. -dryRun @@ -849,12 +849,11 @@ The shortlist of configuration flags is the following: -envflag.prefix string Prefix for environment variables if -envflag.enable is set -eula - By specifying this flag, you confirm that you have an enterprise license and accept the EULA https://victoriametrics.com/assets/VM_EULA.pdf . This flag is available only in enterprise version of VictoriaMetrics + By specifying this flag, you confirm that you have an enterprise license and accept the EULA https://victoriametrics.com/assets/VM_EULA.pdf . This flag is available only in VictoriaMetrics enterprise. See https://docs.victoriametrics.com/enterprise.html -evaluationInterval duration How often to evaluate the rules (default 1m0s) -external.alert.source string - External Alert Source allows to override the Source link for alerts sent to AlertManager for cases where you want to build a custom link to Grafana, Prometheus or any other service. Supports templating - see https://docs.victoriametrics.com/vmalert.html#templating . For example, link to Grafana: -external.alert.source='explore?orgId=1&left=["now-1h","now","VictoriaMetrics",{"expr":{{$expr|jsonEscape|queryEscape}} },{"mode":"Metrics"},{"ui":[true,true,true,"none"]}]' . If empty 'vmalert/alert?group_id={{.GroupID}}&alert_id={{.AlertID}}' is used - If empty 'vmalert/alert?group_id={{.GroupID}}&alert_id={{.AlertID}}' is used. + External Alert Source allows to override the Source link for alerts sent to AlertManager for cases where you want to build a custom link to Grafana, Prometheus or any other service. Supports templating - see https://docs.victoriametrics.com/vmalert.html#templating . For example, link to Grafana: -external.alert.source='explore?orgId=1&left=["now-1h","now","VictoriaMetrics",{"expr":{{$expr|jsonEscape|queryEscape}} },{"mode":"Metrics"},{"ui":[true,true,true,"none"]}]' . If empty 'vmalert/alert?group_id={{.GroupID}}&alert_id={{.AlertID}}' is used. -external.label array Optional label in the form 'Name=value' to add to all generated recording rules and alerts. Pass multiple -label flags in order to add multiple label sets. Supports an array of values separated by comma or specified via multiple flags. @@ -1002,7 +1001,7 @@ The shortlist of configuration flags is the following: -remoteRead.oauth2.scopes string Optional OAuth2 scopes to use for -remoteRead.url. Scopes must be delimited by ';'. -remoteRead.oauth2.tokenUrl string - Optional OAuth2 tokenURL to use for -remoteRead.url. + Optional OAuth2 tokenURL to use for -remoteRead.url. -remoteRead.showURL Whether to show -remoteRead.url in the exported metrics. It is hidden by default, since it can contain sensitive info such as auth key -remoteRead.tlsCAFile string diff --git a/app/vmauth/README.md b/app/vmauth/README.md index 2fad07707..89e102430 100644 --- a/app/vmauth/README.md +++ b/app/vmauth/README.md @@ -239,7 +239,7 @@ See the docs at https://docs.victoriametrics.com/vmauth.html . -envflag.prefix string Prefix for environment variables if -envflag.enable is set -eula - By specifying this flag, you confirm that you have an enterprise license and accept the EULA https://victoriametrics.com/assets/VM_EULA.pdf . This flag is available only in enterprise version of VictoriaMetrics + By specifying this flag, you confirm that you have an enterprise license and accept the EULA https://victoriametrics.com/assets/VM_EULA.pdf . This flag is available only in VictoriaMetrics enterprise. See https://docs.victoriametrics.com/enterprise.html -flagsAuthKey string Auth key for /flags endpoint. It must be passed via authKey query arg. It overrides httpAuth.* settings -fs.disableMmap diff --git a/app/vmbackup/README.md b/app/vmbackup/README.md index b194f9ce9..cfb2f96c1 100644 --- a/app/vmbackup/README.md +++ b/app/vmbackup/README.md @@ -196,7 +196,7 @@ See [this article](https://medium.com/@valyala/speeding-up-backups-for-big-time- -envflag.prefix string Prefix for environment variables if -envflag.enable is set -eula - By specifying this flag, you confirm that you have an enterprise license and accept the EULA https://victoriametrics.com/assets/VM_EULA.pdf . This flag is available only in enterprise version of VictoriaMetrics + By specifying this flag, you confirm that you have an enterprise license and accept the EULA https://victoriametrics.com/assets/VM_EULA.pdf . This flag is available only in VictoriaMetrics enterprise. See https://docs.victoriametrics.com/enterprise.html -flagsAuthKey string Auth key for /flags endpoint. It must be passed via authKey query arg. It overrides httpAuth.* settings -fs.disableMmap diff --git a/app/vmbackupmanager/README.md b/app/vmbackupmanager/README.md index 6c12c5c4c..281794ec6 100644 --- a/app/vmbackupmanager/README.md +++ b/app/vmbackupmanager/README.md @@ -299,6 +299,13 @@ The shortlist of configuration flags is the following: ``` vmbackupmanager performs regular backups according to the provided configs. +subcommands: + backup: provides auxiliary backup-related commands + restore: restores backup specified by restore mark if it exists + +command-line flags: + -apiURL string + vmbackupmanager address to perform API requests (default "http://127.0.0.1:8300") -concurrency int The number of concurrent workers. Higher concurrency may reduce backup duration (default 10) -configFilePath string @@ -328,7 +335,7 @@ vmbackupmanager performs regular backups according to the provided configs. -envflag.prefix string Prefix for environment variables if -envflag.enable is set -eula - By specifying this flag, you confirm that you have an enterprise license and accept the EULA https://victoriametrics.com/assets/VM_EULA.pdf . This flag is available only in enterprise version of VictoriaMetrics + By specifying this flag, you confirm that you have an enterprise license and accept the EULA https://victoriametrics.com/assets/VM_EULA.pdf . This flag is available only in VictoriaMetrics enterprise. See https://docs.victoriametrics.com/enterprise.html -flagsAuthKey string Auth key for /flags endpoint. It must be passed via authKey query arg. It overrides httpAuth.* settings -fs.disableMmap @@ -392,8 +399,6 @@ vmbackupmanager performs regular backups according to the provided configs. -pushmetrics.url array Optional URL to push metrics exposed at /metrics page. See https://docs.victoriametrics.com/#push-metrics . By default metrics exposed at /metrics page aren't pushed to any remote storage Supports an array of values separated by comma or specified via multiple flags. - -restoreOnStart - Check if backup restore was requested and restore requested backup. -runOnStart Upload backups immediately after start of the service. Otherwise the backup starts on new hour -s3ForcePathStyle diff --git a/app/vmgateway/README.md b/app/vmgateway/README.md index f32011537..dbfd17cc7 100644 --- a/app/vmgateway/README.md +++ b/app/vmgateway/README.md @@ -176,8 +176,8 @@ curl 'http://localhost:8431/api/v1/labels' -H 'Authorization: Bearer eyJhbGciOiJ The shortlist of configuration flags include the following: ```console - -auth.httpHeader - HTTP header name to look for JWT authorization token + -auth.httpHeader string + HTTP header name to look for JWT authorization token (default "Authorization") -clusterMode enable this for the cluster version -datasource.appendTypePrefix @@ -201,17 +201,17 @@ The shortlist of configuration flags include the following: -datasource.maxIdleConnections int Defines the number of idle (keep-alive connections) to each configured datasource. Consider setting this value equal to the value: groups_total * group.concurrency. Too low a value may result in a high number of sockets in TIME_WAIT state. (default 100) -datasource.oauth2.clientID string - Optional OAuth2 clientID to use for -datasource.url. + Optional OAuth2 clientID to use for -datasource.url. -datasource.oauth2.clientSecret string Optional OAuth2 clientSecret to use for -datasource.url. -datasource.oauth2.clientSecretFile string - Optional OAuth2 clientSecretFile to use for -datasource.url. + Optional OAuth2 clientSecretFile to use for -datasource.url. -datasource.oauth2.scopes string Optional OAuth2 scopes to use for -datasource.url. Scopes must be delimited by ';' -datasource.oauth2.tokenUrl string Optional OAuth2 tokenURL to use for -datasource.url. -datasource.queryStep duration - queryStep defines how far a value can fallback to when evaluating queries. For example, if datasource.queryStep=15s then param "step" with value "15s" will be added to every query.If queryStep isn't specified, rule's evaluationInterval will be used instead. + How far a value can fallback to when evaluating queries. For example, if -datasource.queryStep=15s then param "step" with value "15s" will be added to every query. If set to 0, rule's evaluation interval will be used instead. (default 5m0s) -datasource.queryTimeAlignment Whether to align "time" parameter with evaluation interval.Alignment supposed to produce deterministic results despite of number of vmalert replicas or time they were started. See more details here https://github.com/VictoriaMetrics/VictoriaMetrics/pull/1257 (default true) -datasource.roundDigits int @@ -241,7 +241,7 @@ The shortlist of configuration flags include the following: -envflag.prefix string Prefix for environment variables if -envflag.enable is set -eula - By specifying this flag, you confirm that you have an enterprise license and accept the EULA https://victoriametrics.com/assets/VM_EULA.pdf . This flag is available only in enterprise version of VictoriaMetrics + By specifying this flag, you confirm that you have an enterprise license and accept the EULA https://victoriametrics.com/assets/VM_EULA.pdf . This flag is available only in VictoriaMetrics enterprise. See https://docs.victoriametrics.com/enterprise.html -flagsAuthKey string Auth key for /flags endpoint. It must be passed via authKey query arg. It overrides httpAuth.* settings -fs.disableMmap diff --git a/app/vmrestore/README.md b/app/vmrestore/README.md index e26ca0890..960775d3f 100644 --- a/app/vmrestore/README.md +++ b/app/vmrestore/README.md @@ -100,7 +100,7 @@ i.e. the end result would be similar to [rsync --delete](https://askubuntu.com/q -envflag.prefix string Prefix for environment variables if -envflag.enable is set -eula - By specifying this flag, you confirm that you have an enterprise license and accept the EULA https://victoriametrics.com/assets/VM_EULA.pdf . This flag is available only in enterprise version of VictoriaMetrics + By specifying this flag, you confirm that you have an enterprise license and accept the EULA https://victoriametrics.com/assets/VM_EULA.pdf . This flag is available only in VictoriaMetrics enterprise. See https://docs.victoriametrics.com/enterprise.html -flagsAuthKey string Auth key for /flags endpoint. It must be passed via authKey query arg. It overrides httpAuth.* settings -fs.disableMmap diff --git a/docs/Cluster-VictoriaMetrics.md b/docs/Cluster-VictoriaMetrics.md index 2f5ef5433..1393d3d64 100644 --- a/docs/Cluster-VictoriaMetrics.md +++ b/docs/Cluster-VictoriaMetrics.md @@ -746,7 +746,7 @@ Below is the output for `/path/to/vminsert -help`: -envflag.prefix string Prefix for environment variables if -envflag.enable is set -eula - By specifying this flag, you confirm that you have an enterprise license and accept the EULA https://victoriametrics.com/assets/VM_EULA.pdf . This flag is available only in enterprise version of VictoriaMetrics + By specifying this flag, you confirm that you have an enterprise license and accept the EULA https://victoriametrics.com/assets/VM_EULA.pdf . This flag is available only in VictoriaMetrics enterprise. See https://docs.victoriametrics.com/enterprise.html -flagsAuthKey string Auth key for /flags endpoint. It must be passed via authKey query arg. It overrides httpAuth.* settings -fs.disableMmap @@ -863,7 +863,7 @@ Below is the output for `/path/to/vminsert -help`: Comma-separated addresses of vmstorage nodes; usage: -storageNode=vmstorage-host1,...,vmstorage-hostN . Enterprise version of VictoriaMetrics supports automatic discovery of vmstorage addresses via dns+srv records. For example, -storageNode=dns+srv:vmstorage.addrs . See https://docs.victoriametrics.com/Cluster-VictoriaMetrics.html#automatic-vmstorage-discovery Supports an array of values separated by comma or specified via multiple flags. -storageNode.filter string - An optional regexp filter for discovered -storageNode addresses according to https://docs.victoriametrics.com/Cluster-VictoriaMetrics.html#automatic-vmstorage-discovery. Discovered addresses matching the filter are retained, while other addresses are ignored. This flag is available only in enterprise version of VictoriaMetrics + An optional regexp filter for discovered -storageNode addresses according to https://docs.victoriametrics.com/Cluster-VictoriaMetrics.html#automatic-vmstorage-discovery. Discovered addresses matching the filter are retained, while other addresses are ignored. This flag is available only in VictoriaMetrics enterprise. See https://docs.victoriametrics.com/enterprise.html -tls Whether to enable TLS for incoming HTTP requests at -httpListenAddr (aka https). -tlsCertFile and -tlsKeyFile must be set if -tls is set -tlsCertFile string @@ -930,7 +930,7 @@ Below is the output for `/path/to/vmselect -help`: -denyQueryTracing Whether to disable the ability to trace queries. See https://docs.victoriametrics.com/#query-tracing -downsampling.period array - Comma-separated downsampling periods in the format 'offset:period'. For example, '30d:10m' instructs to leave a single sample per 10 minutes for samples older than 30 days. See https://docs.victoriametrics.com/#downsampling for details. This flag is available only in enterprise version of VictoriaMetrics + Comma-separated downsampling periods in the format 'offset:period'. For example, '30d:10m' instructs to leave a single sample per 10 minutes for samples older than 30 days. See https://docs.victoriametrics.com/#downsampling for details. This flag is available only in VictoriaMetrics enterprise. See https://docs.victoriametrics.com/enterprise.html Supports an array of values separated by comma or specified via multiple flags. -enableTCP6 Whether to enable IPv6 for listening and dialing. By default only IPv4 TCP and UDP is used @@ -939,7 +939,7 @@ Below is the output for `/path/to/vmselect -help`: -envflag.prefix string Prefix for environment variables if -envflag.enable is set -eula - By specifying this flag, you confirm that you have an enterprise license and accept the EULA https://victoriametrics.com/assets/VM_EULA.pdf . This flag is available only in enterprise version of VictoriaMetrics + By specifying this flag, you confirm that you have an enterprise license and accept the EULA https://victoriametrics.com/assets/VM_EULA.pdf . This flag is available only in VictoriaMetrics enterprise. See https://docs.victoriametrics.com/enterprise.html -flagsAuthKey string Auth key for /flags endpoint. It must be passed via authKey query arg. It overrides httpAuth.* settings -fs.disableMmap @@ -1006,9 +1006,9 @@ Below is the output for `/path/to/vmselect -help`: -search.disableCache Whether to disable response caching. This may be useful during data backfilling -search.graphiteMaxPointsPerSeries int - The maximum number of points per series Graphite render API can return. This flag is available only in enterprise version of VictoriaMetrics (default 1000000) + The maximum number of points per series Graphite render API can return. This flag is available only in VictoriaMetrics enterprise. See https://docs.victoriametrics.com/enterprise.html (default 1000000) -search.graphiteStorageStep duration - The interval between datapoints stored in the database. It is used at Graphite Render API handler for normalizing the interval between datapoints in case it isn't normalized. It can be overridden by sending 'storage_step' query arg to /render API or by sending the desired interval via 'Storage-Step' http header during querying /render API. This flag is available only in enterprise version of VictoriaMetrics (default 10s) + The interval between datapoints stored in the database. It is used at Graphite Render API handler for normalizing the interval between datapoints in case it isn't normalized. It can be overridden by sending 'storage_step' query arg to /render API or by sending the desired interval via 'Storage-Step' http header during querying /render API. This flag is available only in VictoriaMetrics enterprise. See https://docs.victoriametrics.com/enterprise.html (default 10s) -search.latencyOffset duration The time when data points become visible in query results after the collection. Too small value can result in incomplete last points for query results (default 30s) -search.logSlowQueryDuration duration @@ -1022,7 +1022,7 @@ Below is the output for `/path/to/vmselect -help`: -search.maxFederateSeries int The maximum number of time series, which can be returned from /federate. This option allows limiting memory usage (default 1000000) -search.maxGraphiteSeries int - The maximum number of time series, which can be scanned during queries to Graphite Render API. See https://docs.victoriametrics.com/#graphite-render-api-usage . This flag is available only in enterprise version of VictoriaMetrics (default 300000) + The maximum number of time series, which can be scanned during queries to Graphite Render API. See https://docs.victoriametrics.com/#graphite-render-api-usage . This flag is available only in VictoriaMetrics enterprise. See https://docs.victoriametrics.com/enterprise.html (default 300000) -search.maxLookback duration Synonym to -search.lookback-delta from Prometheus. The value is dynamically detected from interval between time series datapoints if not set. It can be overridden on per-query basis via max_lookback arg. See also '-search.maxStalenessInterval' flag, which has the same meaining due to historical reasons -search.maxMemoryPerQuery size @@ -1078,7 +1078,7 @@ Below is the output for `/path/to/vmselect -help`: Comma-separated addresses of vmstorage nodes; usage: -storageNode=vmstorage-host1,...,vmstorage-hostN . Enterprise version of VictoriaMetrics supports automatic discovery of vmstorage addresses via dns+srv records. For example, -storageNode=dns+srv:vmstorage.addrs . See https://docs.victoriametrics.com/Cluster-VictoriaMetrics.html#automatic-vmstorage-discovery Supports an array of values separated by comma or specified via multiple flags. -storageNode.filter string - An optional regexp filter for discovered -storageNode addresses according to https://docs.victoriametrics.com/Cluster-VictoriaMetrics.html#automatic-vmstorage-discovery. Discovered addresses matching the filter are retained, while other addresses are ignored. This flag is available only in enterprise version of VictoriaMetrics + An optional regexp filter for discovered -storageNode addresses according to https://docs.victoriametrics.com/Cluster-VictoriaMetrics.html#automatic-vmstorage-discovery. Discovered addresses matching the filter are retained, while other addresses are ignored. This flag is available only in VictoriaMetrics enterprise. See https://docs.victoriametrics.com/enterprise.html -tls Whether to enable TLS for incoming HTTP requests at -httpListenAddr (aka https). -tlsCertFile and -tlsKeyFile must be set if -tls is set -tlsCertFile string @@ -1108,18 +1108,18 @@ Below is the output for `/path/to/vmstorage -help`: -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) -cluster.tls - Whether to use TLS when accepting connections from vminsert and vmselect. See https://docs.victoriametrics.com/Cluster-VictoriaMetrics.html#mtls-protection . This flag is available only in enterprise version of VictoriaMetrics + Whether to use TLS when accepting connections from vminsert and vmselect. See https://docs.victoriametrics.com/Cluster-VictoriaMetrics.html#mtls-protection . This flag is available only in VictoriaMetrics enterprise. See https://docs.victoriametrics.com/enterprise.html -cluster.tlsCAFile string - Path to TLS CA file to use for verifying certificates provided by vminsert and vmselect if -cluster.tls flag is set. By default system CA is used. See https://docs.victoriametrics.com/Cluster-VictoriaMetrics.html#mtls-protection . This flag is available only in enterprise version of VictoriaMetrics + Path to TLS CA file to use for verifying certificates provided by vminsert and vmselect if -cluster.tls flag is set. By default system CA is used. See https://docs.victoriametrics.com/Cluster-VictoriaMetrics.html#mtls-protection . This flag is available only in VictoriaMetrics enterprise. See https://docs.victoriametrics.com/enterprise.html -cluster.tlsCertFile string - Path to server-side TLS certificate file to use when accepting connections from vminsert and vmselect if -cluster.tls flag is set. See https://docs.victoriametrics.com/Cluster-VictoriaMetrics.html#mtls-protection . This flag is available only in enterprise version of VictoriaMetrics + Path to server-side TLS certificate file to use when accepting connections from vminsert and vmselect if -cluster.tls flag is set. See https://docs.victoriametrics.com/Cluster-VictoriaMetrics.html#mtls-protection . This flag is available only in VictoriaMetrics enterprise. See https://docs.victoriametrics.com/enterprise.html -cluster.tlsCipherSuites array - Optional list of TLS cipher suites used for connections from vminsert and vmselect if -cluster.tls flag is set. See the list of supported cipher suites at https://pkg.go.dev/crypto/tls#pkg-constants .This flag is available only in enterprise version of VictoriaMetrics + Optional list of TLS cipher suites used for connections from vminsert and vmselect if -cluster.tls flag is set. See the list of supported cipher suites at https://pkg.go.dev/crypto/tls#pkg-constants .This flag is available only in VictoriaMetrics enterprise. See https://docs.victoriametrics.com/enterprise.html Supports an array of values separated by comma or specified via multiple flags. -cluster.tlsInsecureSkipVerify - Whether to skip verification of TLS certificates provided by vminsert and vmselect if -cluster.tls flag is set. Note that disabled TLS certificate verification breaks security. This flag is available only in enterprise version of VictoriaMetrics + Whether to skip verification of TLS certificates provided by vminsert and vmselect if -cluster.tls flag is set. Note that disabled TLS certificate verification breaks security. This flag is available only in VictoriaMetrics enterprise. See https://docs.victoriametrics.com/enterprise.html -cluster.tlsKeyFile string - Path to server-side TLS key file to use when accepting connections from vminsert and vmselect if -cluster.tls flag is set. See https://docs.victoriametrics.com/Cluster-VictoriaMetrics.html#mtls-protection . This flag is available only in enterprise version of VictoriaMetrics + Path to server-side TLS key file to use when accepting connections from vminsert and vmselect if -cluster.tls flag is set. See https://docs.victoriametrics.com/Cluster-VictoriaMetrics.html#mtls-protection . This flag is available only in VictoriaMetrics enterprise. See https://docs.victoriametrics.com/enterprise.html -dedup.minScrapeInterval duration Leave only the last sample in every time series per each discrete interval equal to -dedup.minScrapeInterval > 0. See https://docs.victoriametrics.com/#deduplication for details -denyQueriesOutsideRetention @@ -1127,7 +1127,7 @@ Below is the output for `/path/to/vmstorage -help`: -denyQueryTracing Whether to disable the ability to trace queries. See https://docs.victoriametrics.com/#query-tracing -downsampling.period array - Comma-separated downsampling periods in the format 'offset:period'. For example, '30d:10m' instructs to leave a single sample per 10 minutes for samples older than 30 days. See https://docs.victoriametrics.com/#downsampling for details. This flag is available only in enterprise version of VictoriaMetrics + Comma-separated downsampling periods in the format 'offset:period'. For example, '30d:10m' instructs to leave a single sample per 10 minutes for samples older than 30 days. See https://docs.victoriametrics.com/#downsampling for details. This flag is available only in VictoriaMetrics enterprise. See https://docs.victoriametrics.com/enterprise.html Supports an array of values separated by comma or specified via multiple flags. -enableTCP6 Whether to enable IPv6 for listening and dialing. By default only IPv4 TCP and UDP is used @@ -1136,7 +1136,7 @@ Below is the output for `/path/to/vmstorage -help`: -envflag.prefix string Prefix for environment variables if -envflag.enable is set -eula - By specifying this flag, you confirm that you have an enterprise license and accept the EULA https://victoriametrics.com/assets/VM_EULA.pdf . This flag is available only in enterprise version of VictoriaMetrics + By specifying this flag, you confirm that you have an enterprise license and accept the EULA https://victoriametrics.com/assets/VM_EULA.pdf . This flag is available only in VictoriaMetrics enterprise. See https://docs.victoriametrics.com/enterprise.html -finalMergeDelay duration The delay before starting final merge for per-month partition after no new data is ingested into it. Final merge may require additional disk IO and CPU resources. Final merge may increase query speed and reduce disk space usage in some cases. Zero value disables final merge -flagsAuthKey string @@ -1203,7 +1203,7 @@ Below is the output for `/path/to/vmstorage -help`: Optional URL to push metrics exposed at /metrics page. See https://docs.victoriametrics.com/#push-metrics . By default metrics exposed at /metrics page aren't pushed to any remote storage Supports an array of values separated by comma or specified via multiple flags. -retentionFilter array - Retention filter in the format 'filter:retention'. For example, '{env="dev"}:3d' configures the retention for time series with env="dev" label to 3 days. See https://docs.victoriametrics.com/#retention-filters for details. This flag is available only in enterprise version of VictoriaMetrics + Retention filter in the format 'filter:retention'. For example, '{env="dev"}:3d' configures the retention for time series with env="dev" label to 3 days. See https://docs.victoriametrics.com/#retention-filters for details. This flag is available only in VictoriaMetrics enterprise. See https://docs.victoriametrics.com/enterprise.html Supports an array of values separated by comma or specified via multiple flags. -retentionPeriod value Data with timestamps outside the retentionPeriod is automatically deleted. See also -retentionFilter diff --git a/docs/README.md b/docs/README.md index 21ccbe25f..5953839cf 100644 --- a/docs/README.md +++ b/docs/README.md @@ -2036,6 +2036,8 @@ Pass `-help` to VictoriaMetrics in order to see the list of supported command-li ``` -bigMergeConcurrency int The maximum number of CPU cores to use for big merges. Default value is used if set to 0 + -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) -configAuthKey string Authorization key for accessing /config page. It must be passed via authKey query arg -csvTrimTimestamp duration @@ -2054,7 +2056,7 @@ Pass `-help` to VictoriaMetrics in order to see the list of supported command-li -denyQueryTracing Whether to disable the ability to trace queries. See https://docs.victoriametrics.com/#query-tracing -downsampling.period array - Comma-separated downsampling periods in the format 'offset:period'. For example, '30d:10m' instructs to leave a single sample per 10 minutes for samples older than 30 days. See https://docs.victoriametrics.com/#downsampling for details. This flag is available only in enterprise version of VictoriaMetrics + Comma-separated downsampling periods in the format 'offset:period'. For example, '30d:10m' instructs to leave a single sample per 10 minutes for samples older than 30 days. See https://docs.victoriametrics.com/#downsampling for details. This flag is available only in VictoriaMetrics enterprise. See https://docs.victoriametrics.com/enterprise.html Supports an array of values separated by comma or specified via multiple flags. -dryRun Whether to check only -promscrape.config and then exit. Unknown config entries aren't allowed in -promscrape.config by default. This can be changed with -promscrape.config.strictParse=false command-line flag @@ -2065,7 +2067,7 @@ Pass `-help` to VictoriaMetrics in order to see the list of supported command-li -envflag.prefix string Prefix for environment variables if -envflag.enable is set -eula - By specifying this flag, you confirm that you have an enterprise license and accept the EULA https://victoriametrics.com/assets/VM_EULA.pdf . This flag is available only in enterprise version of VictoriaMetrics + By specifying this flag, you confirm that you have an enterprise license and accept the EULA https://victoriametrics.com/assets/VM_EULA.pdf . This flag is available only in VictoriaMetrics enterprise. See https://docs.victoriametrics.com/enterprise.html -finalMergeDelay duration The delay before starting final merge for per-month partition after no new data is ingested into it. Final merge may require additional disk IO and CPU resources. Final merge may increase query speed and reduce disk space usage in some cases. Zero value disables final merge -flagsAuthKey string @@ -2169,7 +2171,7 @@ Pass `-help` to VictoriaMetrics in order to see the list of supported command-li -precisionBits int The number of precision bits to store per each value. Lower precision bits improves data compression at the cost of precision loss (default 64) -prevCacheRemovalPercent float - The previous cache is removed when the percent of requests it serves becomes lower than this value. Higher values reduce average memory usage at the cost of higher CPU usage (default 0.2) + 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) -promscrape.azureSDCheckInterval duration Interval for checking for changes in Azure. This works only if azure_sd_configs is configured in '-promscrape.config' file. See https://docs.victoriametrics.com/sd_configs.html#azure_sd_configs for details (default 1m0s) -promscrape.cluster.memberNum string @@ -2264,7 +2266,7 @@ Pass `-help` to VictoriaMetrics in order to see the list of supported command-li -relabelDebug Whether to log metrics before and after relabeling with -relabelConfig. If the -relabelDebug is enabled, then the metrics aren't sent to storage. This is useful for debugging the relabeling configs -retentionFilter array - Retention filter in the format 'filter:retention'. For example, '{env="dev"}:3d' configures the retention for time series with env="dev" label to 3 days. See https://docs.victoriametrics.com/#retention-filters for details. This flag is available only in enterprise version of VictoriaMetrics + Retention filter in the format 'filter:retention'. For example, '{env="dev"}:3d' configures the retention for time series with env="dev" label to 3 days. See https://docs.victoriametrics.com/#retention-filters for details. This flag is available only in VictoriaMetrics enterprise. See https://docs.victoriametrics.com/enterprise.html Supports an array of values separated by comma or specified via multiple flags. -retentionPeriod value Data with timestamps outside the retentionPeriod is automatically deleted. See also -retentionFilter @@ -2278,9 +2280,9 @@ Pass `-help` to VictoriaMetrics in order to see the list of supported command-li -search.disableCache Whether to disable response caching. This may be useful during data backfilling -search.graphiteMaxPointsPerSeries int - The maximum number of points per series Graphite render API can return. This flag is available only in enterprise version of VictoriaMetrics (default 1000000) + The maximum number of points per series Graphite render API can return. This flag is available only in VictoriaMetrics enterprise. See https://docs.victoriametrics.com/enterprise.html (default 1000000) -search.graphiteStorageStep duration - The interval between datapoints stored in the database. It is used at Graphite Render API handler for normalizing the interval between datapoints in case it isn't normalized. It can be overridden by sending 'storage_step' query arg to /render API or by sending the desired interval via 'Storage-Step' http header during querying /render API. This flag is available only in enterprise version of VictoriaMetrics (default 10s) + The interval between datapoints stored in the database. It is used at Graphite Render API handler for normalizing the interval between datapoints in case it isn't normalized. It can be overridden by sending 'storage_step' query arg to /render API or by sending the desired interval via 'Storage-Step' http header during querying /render API. This flag is available only in VictoriaMetrics enterprise. See https://docs.victoriametrics.com/enterprise.html (default 10s) -search.latencyOffset duration The time when data points become visible in query results after the collection. Too small value can result in incomplete last points for query results (default 30s) -search.logSlowQueryDuration duration @@ -2294,7 +2296,7 @@ Pass `-help` to VictoriaMetrics in order to see the list of supported command-li -search.maxFederateSeries int The maximum number of time series, which can be returned from /federate. This option allows limiting memory usage (default 1000000) -search.maxGraphiteSeries int - The maximum number of time series, which can be scanned during queries to Graphite Render API. See https://docs.victoriametrics.com/#graphite-render-api-usage . This flag is available only in enterprise version of VictoriaMetrics (default 300000) + The maximum number of time series, which can be scanned during queries to Graphite Render API. See https://docs.victoriametrics.com/#graphite-render-api-usage . This flag is available only in VictoriaMetrics enterprise. See https://docs.victoriametrics.com/enterprise.html (default 300000) -search.maxLookback duration Synonym to -search.lookback-delta from Prometheus. The value is dynamically detected from interval between time series datapoints if not set. It can be overridden on per-query basis via max_lookback arg. See also '-search.maxStalenessInterval' flag, which has the same meaining due to historical reasons -search.maxMemoryPerQuery size diff --git a/docs/Single-server-VictoriaMetrics.md b/docs/Single-server-VictoriaMetrics.md index 3fc46ef80..bb7578f89 100644 --- a/docs/Single-server-VictoriaMetrics.md +++ b/docs/Single-server-VictoriaMetrics.md @@ -2039,6 +2039,8 @@ Pass `-help` to VictoriaMetrics in order to see the list of supported command-li ``` -bigMergeConcurrency int The maximum number of CPU cores to use for big merges. Default value is used if set to 0 + -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) -configAuthKey string Authorization key for accessing /config page. It must be passed via authKey query arg -csvTrimTimestamp duration @@ -2057,7 +2059,7 @@ Pass `-help` to VictoriaMetrics in order to see the list of supported command-li -denyQueryTracing Whether to disable the ability to trace queries. See https://docs.victoriametrics.com/#query-tracing -downsampling.period array - Comma-separated downsampling periods in the format 'offset:period'. For example, '30d:10m' instructs to leave a single sample per 10 minutes for samples older than 30 days. See https://docs.victoriametrics.com/#downsampling for details. This flag is available only in enterprise version of VictoriaMetrics + Comma-separated downsampling periods in the format 'offset:period'. For example, '30d:10m' instructs to leave a single sample per 10 minutes for samples older than 30 days. See https://docs.victoriametrics.com/#downsampling for details. This flag is available only in VictoriaMetrics enterprise. See https://docs.victoriametrics.com/enterprise.html Supports an array of values separated by comma or specified via multiple flags. -dryRun Whether to check only -promscrape.config and then exit. Unknown config entries aren't allowed in -promscrape.config by default. This can be changed with -promscrape.config.strictParse=false command-line flag @@ -2068,7 +2070,7 @@ Pass `-help` to VictoriaMetrics in order to see the list of supported command-li -envflag.prefix string Prefix for environment variables if -envflag.enable is set -eula - By specifying this flag, you confirm that you have an enterprise license and accept the EULA https://victoriametrics.com/assets/VM_EULA.pdf . This flag is available only in enterprise version of VictoriaMetrics + By specifying this flag, you confirm that you have an enterprise license and accept the EULA https://victoriametrics.com/assets/VM_EULA.pdf . This flag is available only in VictoriaMetrics enterprise. See https://docs.victoriametrics.com/enterprise.html -finalMergeDelay duration The delay before starting final merge for per-month partition after no new data is ingested into it. Final merge may require additional disk IO and CPU resources. Final merge may increase query speed and reduce disk space usage in some cases. Zero value disables final merge -flagsAuthKey string @@ -2172,7 +2174,7 @@ Pass `-help` to VictoriaMetrics in order to see the list of supported command-li -precisionBits int The number of precision bits to store per each value. Lower precision bits improves data compression at the cost of precision loss (default 64) -prevCacheRemovalPercent float - The previous cache is removed when the percent of requests it serves becomes lower than this value. Higher values reduce average memory usage at the cost of higher CPU usage (default 0.2) + 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) -promscrape.azureSDCheckInterval duration Interval for checking for changes in Azure. This works only if azure_sd_configs is configured in '-promscrape.config' file. See https://docs.victoriametrics.com/sd_configs.html#azure_sd_configs for details (default 1m0s) -promscrape.cluster.memberNum string @@ -2267,7 +2269,7 @@ Pass `-help` to VictoriaMetrics in order to see the list of supported command-li -relabelDebug Whether to log metrics before and after relabeling with -relabelConfig. If the -relabelDebug is enabled, then the metrics aren't sent to storage. This is useful for debugging the relabeling configs -retentionFilter array - Retention filter in the format 'filter:retention'. For example, '{env="dev"}:3d' configures the retention for time series with env="dev" label to 3 days. See https://docs.victoriametrics.com/#retention-filters for details. This flag is available only in enterprise version of VictoriaMetrics + Retention filter in the format 'filter:retention'. For example, '{env="dev"}:3d' configures the retention for time series with env="dev" label to 3 days. See https://docs.victoriametrics.com/#retention-filters for details. This flag is available only in VictoriaMetrics enterprise. See https://docs.victoriametrics.com/enterprise.html Supports an array of values separated by comma or specified via multiple flags. -retentionPeriod value Data with timestamps outside the retentionPeriod is automatically deleted. See also -retentionFilter @@ -2281,9 +2283,9 @@ Pass `-help` to VictoriaMetrics in order to see the list of supported command-li -search.disableCache Whether to disable response caching. This may be useful during data backfilling -search.graphiteMaxPointsPerSeries int - The maximum number of points per series Graphite render API can return. This flag is available only in enterprise version of VictoriaMetrics (default 1000000) + The maximum number of points per series Graphite render API can return. This flag is available only in VictoriaMetrics enterprise. See https://docs.victoriametrics.com/enterprise.html (default 1000000) -search.graphiteStorageStep duration - The interval between datapoints stored in the database. It is used at Graphite Render API handler for normalizing the interval between datapoints in case it isn't normalized. It can be overridden by sending 'storage_step' query arg to /render API or by sending the desired interval via 'Storage-Step' http header during querying /render API. This flag is available only in enterprise version of VictoriaMetrics (default 10s) + The interval between datapoints stored in the database. It is used at Graphite Render API handler for normalizing the interval between datapoints in case it isn't normalized. It can be overridden by sending 'storage_step' query arg to /render API or by sending the desired interval via 'Storage-Step' http header during querying /render API. This flag is available only in VictoriaMetrics enterprise. See https://docs.victoriametrics.com/enterprise.html (default 10s) -search.latencyOffset duration The time when data points become visible in query results after the collection. Too small value can result in incomplete last points for query results (default 30s) -search.logSlowQueryDuration duration @@ -2297,7 +2299,7 @@ Pass `-help` to VictoriaMetrics in order to see the list of supported command-li -search.maxFederateSeries int The maximum number of time series, which can be returned from /federate. This option allows limiting memory usage (default 1000000) -search.maxGraphiteSeries int - The maximum number of time series, which can be scanned during queries to Graphite Render API. See https://docs.victoriametrics.com/#graphite-render-api-usage . This flag is available only in enterprise version of VictoriaMetrics (default 300000) + The maximum number of time series, which can be scanned during queries to Graphite Render API. See https://docs.victoriametrics.com/#graphite-render-api-usage . This flag is available only in VictoriaMetrics enterprise. See https://docs.victoriametrics.com/enterprise.html (default 300000) -search.maxLookback duration Synonym to -search.lookback-delta from Prometheus. The value is dynamically detected from interval between time series datapoints if not set. It can be overridden on per-query basis via max_lookback arg. See also '-search.maxStalenessInterval' flag, which has the same meaining due to historical reasons -search.maxMemoryPerQuery size diff --git a/docs/vmagent.md b/docs/vmagent.md index 29052bc08..60e3faf6d 100644 --- a/docs/vmagent.md +++ b/docs/vmagent.md @@ -1111,6 +1111,8 @@ vmagent collects metrics data via popular data ingestion protocols and routes th See the docs at https://docs.victoriametrics.com/vmagent.html . + -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) -configAuthKey string Authorization key for accessing /config page. It must be passed via authKey query arg -csvTrimTimestamp duration @@ -1131,7 +1133,7 @@ See the docs at https://docs.victoriametrics.com/vmagent.html . -envflag.prefix string Prefix for environment variables if -envflag.enable is set -eula - By specifying this flag, you confirm that you have an enterprise license and accept the EULA https://victoriametrics.com/assets/VM_EULA.pdf . This flag is available only in enterprise version of VictoriaMetrics + By specifying this flag, you confirm that you have an enterprise license and accept the EULA https://victoriametrics.com/assets/VM_EULA.pdf . This flag is available only in VictoriaMetrics enterprise. See https://docs.victoriametrics.com/enterprise.html -flagsAuthKey string Auth key for /flags endpoint. It must be passed via authKey query arg. It overrides httpAuth.* settings -fs.disableMmap @@ -1182,30 +1184,30 @@ See the docs at https://docs.victoriametrics.com/vmagent.html . -insert.maxQueueDuration duration The maximum duration for waiting in the queue for insert requests due to -maxConcurrentInserts (default 1m0s) -kafka.consumer.topic array - Kafka topic names for data consumption. This flag is available only in enterprise version of VictoriaMetrics + Kafka topic names for data consumption. This flag is available only in VictoriaMetrics enterprise. See https://docs.victoriametrics.com/enterprise.html Supports an array of values separated by comma or specified via multiple flags. -kafka.consumer.topic.basicAuth.password array - Optional basic auth password for -kafka.consumer.topic. Must be used in conjunction with any supported auth methods for kafka client, specified by flag -kafka.consumer.topic.options='security.protocol=SASL_SSL;sasl.mechanisms=PLAIN' . This flag is available only in enterprise version of VictoriaMetrics + Optional basic auth password for -kafka.consumer.topic. Must be used in conjunction with any supported auth methods for kafka client, specified by flag -kafka.consumer.topic.options='security.protocol=SASL_SSL;sasl.mechanisms=PLAIN' . This flag is available only in VictoriaMetrics enterprise. See https://docs.victoriametrics.com/enterprise.html Supports an array of values separated by comma or specified via multiple flags. -kafka.consumer.topic.basicAuth.username array - Optional basic auth username for -kafka.consumer.topic. Must be used in conjunction with any supported auth methods for kafka client, specified by flag -kafka.consumer.topic.options='security.protocol=SASL_SSL;sasl.mechanisms=PLAIN' . This flag is available only in enterprise version of VictoriaMetrics + Optional basic auth username for -kafka.consumer.topic. Must be used in conjunction with any supported auth methods for kafka client, specified by flag -kafka.consumer.topic.options='security.protocol=SASL_SSL;sasl.mechanisms=PLAIN' . This flag is available only in VictoriaMetrics enterprise. See https://docs.victoriametrics.com/enterprise.html Supports an array of values separated by comma or specified via multiple flags. -kafka.consumer.topic.brokers array - List of brokers to connect for given topic, e.g. -kafka.consumer.topic.broker=host-1:9092;host-2:9092 . This flag is available only in enterprise version of VictoriaMetrics + List of brokers to connect for given topic, e.g. -kafka.consumer.topic.broker=host-1:9092;host-2:9092 . This flag is available only in VictoriaMetrics enterprise. See https://docs.victoriametrics.com/enterprise.html Supports an array of values separated by comma or specified via multiple flags. -kafka.consumer.topic.defaultFormat string - Expected data format in the topic if -kafka.consumer.topic.format is skipped. This flag is available only in enterprise version of VictoriaMetrics (default "promremotewrite") + Expected data format in the topic if -kafka.consumer.topic.format is skipped. This flag is available only in VictoriaMetrics enterprise. See https://docs.victoriametrics.com/enterprise.html (default "promremotewrite") -kafka.consumer.topic.format array - data format for corresponding kafka topic. Valid formats: influx, prometheus, promremotewrite, graphite, jsonline . This flag is available only in enterprise version of VictoriaMetrics + data format for corresponding kafka topic. Valid formats: influx, prometheus, promremotewrite, graphite, jsonline . This flag is available only in VictoriaMetrics enterprise. See https://docs.victoriametrics.com/enterprise.html Supports an array of values separated by comma or specified via multiple flags. -kafka.consumer.topic.groupID array - Defines group.id for topic. This flag is available only in enterprise version of VictoriaMetrics + Defines group.id for topic. This flag is available only in VictoriaMetrics enterprise. See https://docs.victoriametrics.com/enterprise.html Supports an array of values separated by comma or specified via multiple flags. -kafka.consumer.topic.isGzipped array - Enables gzip setting for topic messages payload. Only prometheus, jsonline and influx formats accept gzipped messages.This flag is available only in enterprise version of VictoriaMetrics + Enables gzip setting for topic messages payload. Only prometheus, jsonline and influx formats accept gzipped messages.This flag is available only in VictoriaMetrics enterprise. See https://docs.victoriametrics.com/enterprise.html Supports array of values separated by comma or specified via multiple flags. -kafka.consumer.topic.options array - Optional key=value;key1=value2 settings for topic consumer. See full configuration options at https://github.com/edenhill/librdkafka/blob/master/CONFIGURATION.md . This flag is available only in enterprise version of VictoriaMetrics + Optional key=value;key1=value2 settings for topic consumer. See full configuration options at https://github.com/edenhill/librdkafka/blob/master/CONFIGURATION.md . This flag is available only in VictoriaMetrics enterprise. See https://docs.victoriametrics.com/enterprise.html Supports an array of values separated by comma or specified via multiple flags. -loggerDisableTimestamps Whether to disable writing timestamps in logs @@ -1246,6 +1248,8 @@ See the docs at https://docs.victoriametrics.com/vmagent.html . Trim timestamps for OpenTSDB HTTP data to this duration. Minimum practical duration is 1ms. Higher duration (i.e. 1s) may be used for reducing disk space usage for timestamp data (default 1ms) -pprofAuthKey string Auth key for /debug/pprof/* endpoints. It must be passed via authKey query arg. It overrides httpAuth.* settings + -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) -promscrape.azureSDCheckInterval duration Interval for checking for changes in Azure. This works only if azure_sd_configs is configured in '-promscrape.config' file. See https://docs.victoriametrics.com/sd_configs.html#azure_sd_configs for details (default 1m0s) -promscrape.cluster.memberNum string diff --git a/docs/vmalert.md b/docs/vmalert.md index 319f6f479..5dcbe9ac8 100644 --- a/docs/vmalert.md +++ b/docs/vmalert.md @@ -785,7 +785,7 @@ The shortlist of configuration flags is the following: {% raw %} ``` -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.html#multitenancy . This flag is available only in enterprise version of VictoriaMetrics + 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.html#multitenancy . This flag is available only in VictoriaMetrics enterprise. See https://docs.victoriametrics.com/enterprise.html -configCheckInterval duration Interval for checking for changes in '-rule' or '-notifier.config' files. By default the checking is disabled. Send SIGHUP signal in order to force config check for changes. -datasource.appendTypePrefix @@ -809,11 +809,11 @@ The shortlist of configuration flags is the following: -datasource.maxIdleConnections int Defines the number of idle (keep-alive connections) to each configured datasource. Consider setting this value equal to the value: groups_total * group.concurrency. Too low a value may result in a high number of sockets in TIME_WAIT state. (default 100) -datasource.oauth2.clientID string - Optional OAuth2 clientID to use for -datasource.url. + Optional OAuth2 clientID to use for -datasource.url. -datasource.oauth2.clientSecret string Optional OAuth2 clientSecret to use for -datasource.url. -datasource.oauth2.clientSecretFile string - Optional OAuth2 clientSecretFile to use for -datasource.url. + Optional OAuth2 clientSecretFile to use for -datasource.url. -datasource.oauth2.scopes string Optional OAuth2 scopes to use for -datasource.url. Scopes must be delimited by ';' -datasource.oauth2.tokenUrl string @@ -839,9 +839,9 @@ The shortlist of configuration flags is the following: -datasource.url string Datasource compatible with Prometheus HTTP API. It can be single node VictoriaMetrics or vmselect URL. Required parameter. E.g. http://127.0.0.1:8428 . See also '-datasource.disablePathAppend', '-datasource.showURL'. -defaultTenant.graphite string - Default tenant for Graphite alerting groups. See https://docs.victoriametrics.com/vmalert.html#multitenancy .This flag is available only in enterprise version of VictoriaMetrics + Default tenant for Graphite alerting groups. See https://docs.victoriametrics.com/vmalert.html#multitenancy .This flag is available only in VictoriaMetrics enterprise. See https://docs.victoriametrics.com/enterprise.html -defaultTenant.prometheus string - Default tenant for Prometheus alerting groups. See https://docs.victoriametrics.com/vmalert.html#multitenancy . This flag is available only in enterprise version of VictoriaMetrics + Default tenant for Prometheus alerting groups. See https://docs.victoriametrics.com/vmalert.html#multitenancy . This flag is available only in VictoriaMetrics enterprise. See https://docs.victoriametrics.com/enterprise.html -disableAlertgroupLabel Whether to disable adding group's Name as label to generated alerts and time series. -dryRun @@ -853,12 +853,11 @@ The shortlist of configuration flags is the following: -envflag.prefix string Prefix for environment variables if -envflag.enable is set -eula - By specifying this flag, you confirm that you have an enterprise license and accept the EULA https://victoriametrics.com/assets/VM_EULA.pdf . This flag is available only in enterprise version of VictoriaMetrics + By specifying this flag, you confirm that you have an enterprise license and accept the EULA https://victoriametrics.com/assets/VM_EULA.pdf . This flag is available only in VictoriaMetrics enterprise. See https://docs.victoriametrics.com/enterprise.html -evaluationInterval duration How often to evaluate the rules (default 1m0s) -external.alert.source string - External Alert Source allows to override the Source link for alerts sent to AlertManager for cases where you want to build a custom link to Grafana, Prometheus or any other service. Supports templating - see https://docs.victoriametrics.com/vmalert.html#templating . For example, link to Grafana: -external.alert.source='explore?orgId=1&left=["now-1h","now","VictoriaMetrics",{"expr":{{$expr|jsonEscape|queryEscape}} },{"mode":"Metrics"},{"ui":[true,true,true,"none"]}]' . If empty 'vmalert/alert?group_id={{.GroupID}}&alert_id={{.AlertID}}' is used - If empty 'vmalert/alert?group_id={{.GroupID}}&alert_id={{.AlertID}}' is used. + External Alert Source allows to override the Source link for alerts sent to AlertManager for cases where you want to build a custom link to Grafana, Prometheus or any other service. Supports templating - see https://docs.victoriametrics.com/vmalert.html#templating . For example, link to Grafana: -external.alert.source='explore?orgId=1&left=["now-1h","now","VictoriaMetrics",{"expr":{{$expr|jsonEscape|queryEscape}} },{"mode":"Metrics"},{"ui":[true,true,true,"none"]}]' . If empty 'vmalert/alert?group_id={{.GroupID}}&alert_id={{.AlertID}}' is used. -external.label array Optional label in the form 'Name=value' to add to all generated recording rules and alerts. Pass multiple -label flags in order to add multiple label sets. Supports an array of values separated by comma or specified via multiple flags. @@ -1006,7 +1005,7 @@ The shortlist of configuration flags is the following: -remoteRead.oauth2.scopes string Optional OAuth2 scopes to use for -remoteRead.url. Scopes must be delimited by ';'. -remoteRead.oauth2.tokenUrl string - Optional OAuth2 tokenURL to use for -remoteRead.url. + Optional OAuth2 tokenURL to use for -remoteRead.url. -remoteRead.showURL Whether to show -remoteRead.url in the exported metrics. It is hidden by default, since it can contain sensitive info such as auth key -remoteRead.tlsCAFile string diff --git a/docs/vmauth.md b/docs/vmauth.md index 252d501fd..4912ca638 100644 --- a/docs/vmauth.md +++ b/docs/vmauth.md @@ -243,7 +243,7 @@ See the docs at https://docs.victoriametrics.com/vmauth.html . -envflag.prefix string Prefix for environment variables if -envflag.enable is set -eula - By specifying this flag, you confirm that you have an enterprise license and accept the EULA https://victoriametrics.com/assets/VM_EULA.pdf . This flag is available only in enterprise version of VictoriaMetrics + By specifying this flag, you confirm that you have an enterprise license and accept the EULA https://victoriametrics.com/assets/VM_EULA.pdf . This flag is available only in VictoriaMetrics enterprise. See https://docs.victoriametrics.com/enterprise.html -flagsAuthKey string Auth key for /flags endpoint. It must be passed via authKey query arg. It overrides httpAuth.* settings -fs.disableMmap diff --git a/docs/vmbackup.md b/docs/vmbackup.md index 5c4a901c7..2caffde57 100644 --- a/docs/vmbackup.md +++ b/docs/vmbackup.md @@ -200,7 +200,7 @@ See [this article](https://medium.com/@valyala/speeding-up-backups-for-big-time- -envflag.prefix string Prefix for environment variables if -envflag.enable is set -eula - By specifying this flag, you confirm that you have an enterprise license and accept the EULA https://victoriametrics.com/assets/VM_EULA.pdf . This flag is available only in enterprise version of VictoriaMetrics + By specifying this flag, you confirm that you have an enterprise license and accept the EULA https://victoriametrics.com/assets/VM_EULA.pdf . This flag is available only in VictoriaMetrics enterprise. See https://docs.victoriametrics.com/enterprise.html -flagsAuthKey string Auth key for /flags endpoint. It must be passed via authKey query arg. It overrides httpAuth.* settings -fs.disableMmap diff --git a/docs/vmbackupmanager.md b/docs/vmbackupmanager.md index 9b7a67294..4b8980a90 100644 --- a/docs/vmbackupmanager.md +++ b/docs/vmbackupmanager.md @@ -303,6 +303,13 @@ The shortlist of configuration flags is the following: ``` vmbackupmanager performs regular backups according to the provided configs. +subcommands: + backup: provides auxiliary backup-related commands + restore: restores backup specified by restore mark if it exists + +command-line flags: + -apiURL string + vmbackupmanager address to perform API requests (default "http://127.0.0.1:8300") -concurrency int The number of concurrent workers. Higher concurrency may reduce backup duration (default 10) -configFilePath string @@ -332,7 +339,7 @@ vmbackupmanager performs regular backups according to the provided configs. -envflag.prefix string Prefix for environment variables if -envflag.enable is set -eula - By specifying this flag, you confirm that you have an enterprise license and accept the EULA https://victoriametrics.com/assets/VM_EULA.pdf . This flag is available only in enterprise version of VictoriaMetrics + By specifying this flag, you confirm that you have an enterprise license and accept the EULA https://victoriametrics.com/assets/VM_EULA.pdf . This flag is available only in VictoriaMetrics enterprise. See https://docs.victoriametrics.com/enterprise.html -flagsAuthKey string Auth key for /flags endpoint. It must be passed via authKey query arg. It overrides httpAuth.* settings -fs.disableMmap @@ -396,8 +403,6 @@ vmbackupmanager performs regular backups according to the provided configs. -pushmetrics.url array Optional URL to push metrics exposed at /metrics page. See https://docs.victoriametrics.com/#push-metrics . By default metrics exposed at /metrics page aren't pushed to any remote storage Supports an array of values separated by comma or specified via multiple flags. - -restoreOnStart - Check if backup restore was requested and restore requested backup. -runOnStart Upload backups immediately after start of the service. Otherwise the backup starts on new hour -s3ForcePathStyle diff --git a/docs/vmgateway.md b/docs/vmgateway.md index 93f6dc45f..19c9a4ed4 100644 --- a/docs/vmgateway.md +++ b/docs/vmgateway.md @@ -180,8 +180,8 @@ curl 'http://localhost:8431/api/v1/labels' -H 'Authorization: Bearer eyJhbGciOiJ The shortlist of configuration flags include the following: ```console - -auth.httpHeader - HTTP header name to look for JWT authorization token + -auth.httpHeader string + HTTP header name to look for JWT authorization token (default "Authorization") -clusterMode enable this for the cluster version -datasource.appendTypePrefix @@ -205,17 +205,17 @@ The shortlist of configuration flags include the following: -datasource.maxIdleConnections int Defines the number of idle (keep-alive connections) to each configured datasource. Consider setting this value equal to the value: groups_total * group.concurrency. Too low a value may result in a high number of sockets in TIME_WAIT state. (default 100) -datasource.oauth2.clientID string - Optional OAuth2 clientID to use for -datasource.url. + Optional OAuth2 clientID to use for -datasource.url. -datasource.oauth2.clientSecret string Optional OAuth2 clientSecret to use for -datasource.url. -datasource.oauth2.clientSecretFile string - Optional OAuth2 clientSecretFile to use for -datasource.url. + Optional OAuth2 clientSecretFile to use for -datasource.url. -datasource.oauth2.scopes string Optional OAuth2 scopes to use for -datasource.url. Scopes must be delimited by ';' -datasource.oauth2.tokenUrl string Optional OAuth2 tokenURL to use for -datasource.url. -datasource.queryStep duration - queryStep defines how far a value can fallback to when evaluating queries. For example, if datasource.queryStep=15s then param "step" with value "15s" will be added to every query.If queryStep isn't specified, rule's evaluationInterval will be used instead. + How far a value can fallback to when evaluating queries. For example, if -datasource.queryStep=15s then param "step" with value "15s" will be added to every query. If set to 0, rule's evaluation interval will be used instead. (default 5m0s) -datasource.queryTimeAlignment Whether to align "time" parameter with evaluation interval.Alignment supposed to produce deterministic results despite of number of vmalert replicas or time they were started. See more details here https://github.com/VictoriaMetrics/VictoriaMetrics/pull/1257 (default true) -datasource.roundDigits int @@ -245,7 +245,7 @@ The shortlist of configuration flags include the following: -envflag.prefix string Prefix for environment variables if -envflag.enable is set -eula - By specifying this flag, you confirm that you have an enterprise license and accept the EULA https://victoriametrics.com/assets/VM_EULA.pdf . This flag is available only in enterprise version of VictoriaMetrics + By specifying this flag, you confirm that you have an enterprise license and accept the EULA https://victoriametrics.com/assets/VM_EULA.pdf . This flag is available only in VictoriaMetrics enterprise. See https://docs.victoriametrics.com/enterprise.html -flagsAuthKey string Auth key for /flags endpoint. It must be passed via authKey query arg. It overrides httpAuth.* settings -fs.disableMmap diff --git a/docs/vmrestore.md b/docs/vmrestore.md index 3a8f25352..23d3e98f3 100644 --- a/docs/vmrestore.md +++ b/docs/vmrestore.md @@ -104,7 +104,7 @@ i.e. the end result would be similar to [rsync --delete](https://askubuntu.com/q -envflag.prefix string Prefix for environment variables if -envflag.enable is set -eula - By specifying this flag, you confirm that you have an enterprise license and accept the EULA https://victoriametrics.com/assets/VM_EULA.pdf . This flag is available only in enterprise version of VictoriaMetrics + By specifying this flag, you confirm that you have an enterprise license and accept the EULA https://victoriametrics.com/assets/VM_EULA.pdf . This flag is available only in VictoriaMetrics enterprise. See https://docs.victoriametrics.com/enterprise.html -flagsAuthKey string Auth key for /flags endpoint. It must be passed via authKey query arg. It overrides httpAuth.* settings -fs.disableMmap From 84742f229a4203f6d9eddde0a30c42da14da912c Mon Sep 17 00:00:00 2001 From: Roman Khavronenko Date: Mon, 21 Nov 2022 14:45:45 +0100 Subject: [PATCH 13/46] vmalert: add default list of alerting rules (#3373) The default list of alerting rules contains the basic rules for checking vmalert's health state and is recommended to use for monitoring vmalert deployments. Signed-off-by: hagen1778 --- app/vmalert/README.md | 4 +- deployment/docker/alerts-vmalert.yml | 72 ++++++++++++++++++++ deployment/docker/docker-compose-cluster.yml | 1 + deployment/docker/docker-compose.yml | 1 + docs/CHANGELOG.md | 1 + docs/vmalert.md | 4 +- 6 files changed, 81 insertions(+), 2 deletions(-) create mode 100644 deployment/docker/alerts-vmalert.yml diff --git a/app/vmalert/README.md b/app/vmalert/README.md index 347d724f6..6dcce9d67 100644 --- a/app/vmalert/README.md +++ b/app/vmalert/README.md @@ -673,10 +673,12 @@ See full description for these flags in `./vmalert -help`. ## Monitoring `vmalert` exports various metrics in Prometheus exposition format at `http://vmalert-host:8880/metrics` page. +The default list of alerting rules for these metric can be found [here](https://github.com/VictoriaMetrics/VictoriaMetrics/tree/master/deployment/docker). We recommend setting up regular scraping of this page either through `vmagent` or by Prometheus so that the exported metrics may be analyzed later. -Use the official [Grafana dashboard](https://grafana.com/grafana/dashboards/14950) for `vmalert` overview. Graphs on this dashboard contain useful hints - hover the `i` icon at the top left corner of each graph in order to read it. +Use the official [Grafana dashboard](https://grafana.com/grafana/dashboards/14950) for `vmalert` overview. +Graphs on this dashboard contain useful hints - hover the `i` icon in the top left corner of each graph in order to read it. If you have suggestions for improvements or have found a bug - please open an issue on github or add a review to the dashboard. diff --git a/deployment/docker/alerts-vmalert.yml b/deployment/docker/alerts-vmalert.yml new file mode 100644 index 000000000..e5d48e096 --- /dev/null +++ b/deployment/docker/alerts-vmalert.yml @@ -0,0 +1,72 @@ +# File contains default list of alerts for мьфдуке service. +# The alerts below are just recommendations and may require some updates +# and threshold calibration according to every specific setup. +groups: + # Alerts group for vmalert assumes that Grafana dashboard + # https://grafana.com/grafana/dashboards/14950-victoriametrics-vmalert is installed. + # Pls update the `dashboard` annotation according to your setup. + - name: vmalert + interval: 5s + rules: + - alert: ConfigurationReloadFailure + expr: vmalert_config_last_reload_successful != 1 + labels: + severity: warning + annotations: + summary: "Configuration reload failed for vmalert instance {{ $labels.instance }}" + description: "Configuration hot-reload failed for vmalert on instance {{ $labels.instance }}. + Check vmalert's logs for detailed error message." + + - alert: AlertingRulesError + expr: sum(vmalert_alerting_rules_error) by(job, instance, group) > 0 + for: 5m + labels: + severity: warning + annotations: + dashboard: "http://localhost:3000/d/LzldHAVnz?viewPanel=13&var-instance={{ $labels.instance }}&var-group={{ $labels.group }}" + summary: "Alerting rules are failing for vmalert instance {{ $labels.instance }}" + description: "Alerting rules execution is failing for group \"{{ $labels.group }}\". + Check vmalert's logs for detailed error message." + + - alert: RecordingRulesError + expr: sum(vmalert_recording_rules_error) by(job, instance, group) > 0 + for: 5m + labels: + severity: warning + annotations: + dashboard: "http://localhost:3000/d/LzldHAVnz?viewPanel=30&var-instance={{ $labels.instance }}&var-group={{ $labels.group }}" + summary: "Recording rules are failing for vmalert instance {{ $labels.instance }}" + description: "Recording rules execution is failing for group \"{{ $labels.group }}\". + Check vmalert's logs for detailed error message." + + - alert: RecordingRulesNoData + expr: sum(vmalert_recording_rules_last_evaluation_samples) by(job, group, recording) < 1 + for: 30m + labels: + severity: warning + annotations: + dashboard: "http://localhost:3000/d/LzldHAVnz?viewPanel=33&var-group={{ $labels.group }}" + summary: "Recording rule {{ $labels.recording }} ({ $labels.group }}) produces no data" + description: "Recording rule \"{{ $labels.recording }}\" from group \"{{ $labels.group }}\" + produces 0 samples over the last 30min. It might be caused by a misconfiguration + or incorrect query expression." + + - alert: RemoteWriteErrors + expr: sum(increase(vmalert_remotewrite_errors_total[5m])) by(job, instance) > 0 + for: 15m + labels: + severity: warning + annotations: + summary: "vmalert instance {{ $labels.instance }} is failing to push metrics to remote write URL" + 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: AlertmanagerErrors + expr: sum(increase(vmalert_alerts_send_errors_total[5m])) by(job, instance, addr) > 0 + for: 15m + labels: + severity: warning + annotations: + summary: "vmalert instance {{ $labels.instance }} is failing to send notifications to Alertmanager" + description: "vmalert instance {{ $labels.instance }} is failing to send alert notifications to \"{{ $labels.addr }}\". + Check vmalert's logs for detailed error message." diff --git a/deployment/docker/docker-compose-cluster.yml b/deployment/docker/docker-compose-cluster.yml index 2b6621e6f..1069e6674 100644 --- a/deployment/docker/docker-compose-cluster.yml +++ b/deployment/docker/docker-compose-cluster.yml @@ -91,6 +91,7 @@ services: - ./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 command: - '--datasource.url=http://vmselect:8481/select/0/prometheus' - '--remoteRead.url=http://vmselect:8481/select/0/prometheus' diff --git a/deployment/docker/docker-compose.yml b/deployment/docker/docker-compose.yml index 3f1733403..3d6a8a47c 100644 --- a/deployment/docker/docker-compose.yml +++ b/deployment/docker/docker-compose.yml @@ -66,6 +66,7 @@ services: - ./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 command: - "--datasource.url=http://victoriametrics:8428/" - "--remoteRead.url=http://victoriametrics:8428/" diff --git a/docs/CHANGELOG.md b/docs/CHANGELOG.md index bc46cdba9..d8fd86897 100644 --- a/docs/CHANGELOG.md +++ b/docs/CHANGELOG.md @@ -21,6 +21,7 @@ The following tip changes can be tested by building VictoriaMetrics components f * FEATURE: [vmui](https://docs.victoriametrics.com/#vmui): add the ability to upload/paste JSON to investigate the trace. See [this issue](https://github.com/VictoriaMetrics/VictoriaMetrics/issues/3308) and [this pull request](https://github.com/VictoriaMetrics/VictoriaMetrics/pull/3310). * FEATURE: [vmui](https://docs.victoriametrics.com/#vmui): reduce JS bundle size from 200Kb to 100Kb. See [this pull request](https://github.com/VictoriaMetrics/VictoriaMetrics/pull/3298). * FEATURE: [vmui](https://docs.victoriametrics.com/#vmui): add the ability to hide results of a particular query by clicking the `eye` icon. See [this pull request](https://github.com/VictoriaMetrics/VictoriaMetrics/pull/3359). +* FEATURE: [vmalert](https://docs.victoriametrics.com/vmalert.html): add default alert list for vmalert's metrics. See [alerts-vmalert.yml](https://github.com/VictoriaMetrics/VictoriaMetrics/blob/master/deployment/docker/alerts-vmalert.yml). * BUGFIX: [vmui](https://docs.victoriametrics.com/#vmui): properly display the requested graph on the requested time range when navigating from Prometheus URL in Grafana. * BUGFIX: reduce CPU usage spikes and memory usage spikes under high data ingestion rate introduced in [v1.83.0](https://docs.victoriametrics.com/CHANGELOG.html#v1830). See [this issue](https://github.com/VictoriaMetrics/VictoriaMetrics/issues/3343). diff --git a/docs/vmalert.md b/docs/vmalert.md index 5dcbe9ac8..60402d01d 100644 --- a/docs/vmalert.md +++ b/docs/vmalert.md @@ -677,10 +677,12 @@ See full description for these flags in `./vmalert -help`. ## Monitoring `vmalert` exports various metrics in Prometheus exposition format at `http://vmalert-host:8880/metrics` page. +The default list of alerting rules for these metric can be found [here](https://github.com/VictoriaMetrics/VictoriaMetrics/tree/master/deployment/docker). We recommend setting up regular scraping of this page either through `vmagent` or by Prometheus so that the exported metrics may be analyzed later. -Use the official [Grafana dashboard](https://grafana.com/grafana/dashboards/14950) for `vmalert` overview. Graphs on this dashboard contain useful hints - hover the `i` icon at the top left corner of each graph in order to read it. +Use the official [Grafana dashboard](https://grafana.com/grafana/dashboards/14950) for `vmalert` overview. +Graphs on this dashboard contain useful hints - hover the `i` icon in the top left corner of each graph in order to read it. If you have suggestions for improvements or have found a bug - please open an issue on github or add a review to the dashboard. From b796a0dc3f511a1e4a46ce6c3b41381701d3a246 Mon Sep 17 00:00:00 2001 From: Aliaksandr Valialkin Date: Mon, 21 Nov 2022 16:08:48 +0200 Subject: [PATCH 14/46] app/vmselect/promql: optimize `e1 op e2` when `e1` returns an empty result Updates https://github.com/VictoriaMetrics/VictoriaMetrics/issues/3349 --- app/vmselect/promql/eval.go | 6 ++++++ docs/CHANGELOG.md | 1 + 2 files changed, 7 insertions(+) diff --git a/app/vmselect/promql/eval.go b/app/vmselect/promql/eval.go index a0afdef0b..1118de005 100644 --- a/app/vmselect/promql/eval.go +++ b/app/vmselect/promql/eval.go @@ -488,6 +488,12 @@ func execBinaryOpArgs(qt *querytracer.Tracer, ec *EvalConfig, exprFirst, exprSec if err != nil { return nil, nil, err } + if len(tssFirst) == 0 && strings.ToLower(be.Op) != "or" { + // Fast path: there is no sense in executing the exprSecond when exprFirst returns an empty result, + // since the "exprFirst op exprSecond" would return an empty result in any case. + // See https://github.com/VictoriaMetrics/VictoriaMetrics/issues/3349 + return nil, nil, nil + } lfs := getCommonLabelFilters(tssFirst) lfs = metricsql.TrimFiltersByGroupModifier(lfs, be) exprSecond = metricsql.PushdownBinaryOpFilters(exprSecond, lfs) diff --git a/docs/CHANGELOG.md b/docs/CHANGELOG.md index d8fd86897..f57d55306 100644 --- a/docs/CHANGELOG.md +++ b/docs/CHANGELOG.md @@ -18,6 +18,7 @@ The following tip changes can be tested by building VictoriaMetrics components f * FEATURE: [VictoriaMetrics enterprise](https://docs.victoriametrics.com/enterprise.html): add `-storageNode.filter` command-line flag for filtering the [discovered vmstorage nodes](https://docs.victoriametrics.com/Cluster-VictoriaMetrics.html#automatic-vmstorage-discovery) with arbitrary regular expressions. See [this feature request](https://github.com/VictoriaMetrics/VictoriaMetrics/issues/3353). * FEATURE: [MetricsQL](https://docs.victoriametrics.com/MetricsQL.html): add [range_linear_regression](https://docs.victoriametrics.com/MetricsQL.html#range_linear_regression) function for calculating [simple linear regression](https://en.wikipedia.org/wiki/Simple_linear_regression) over the input time series on the selected time range. This function is useful for predictions and capacity planning. For example, `range_linear_regression(process_resident_memory_bytes)` can predict future memory usage based on the past memory usage. * FEATURE: [MetricsQL](https://docs.victoriametrics.com/MetricsQL.html): add [range_stddev](https://docs.victoriametrics.com/MetricsQL.html#range_stddev) and [range_stdvar](https://docs.victoriametrics.com/MetricsQL.html#range_stdvar) functions. +* FEATURE: [MetricsQL](https://docs.victoriametrics.com/MetricsQL.html): optimize `expr1 op expr2` query when `expr1` returns an empty result. In this case there is no sense in executing `expr2` for `op` not equal to `or`, since the end result will be empty according to [PromQL series matching rules](https://prometheus.io/docs/prometheus/latest/querying/operators/#vector-matching). See [this issue](https://github.com/VictoriaMetrics/VictoriaMetrics/issues/3349). Thanks to @jianglinjian for pointing to this case. * FEATURE: [vmui](https://docs.victoriametrics.com/#vmui): add the ability to upload/paste JSON to investigate the trace. See [this issue](https://github.com/VictoriaMetrics/VictoriaMetrics/issues/3308) and [this pull request](https://github.com/VictoriaMetrics/VictoriaMetrics/pull/3310). * FEATURE: [vmui](https://docs.victoriametrics.com/#vmui): reduce JS bundle size from 200Kb to 100Kb. See [this pull request](https://github.com/VictoriaMetrics/VictoriaMetrics/pull/3298). * FEATURE: [vmui](https://docs.victoriametrics.com/#vmui): add the ability to hide results of a particular query by clicking the `eye` icon. See [this pull request](https://github.com/VictoriaMetrics/VictoriaMetrics/pull/3359). From 0b6f439b1109f50427b20b90f0d19d2ae6595300 Mon Sep 17 00:00:00 2001 From: Roman Khavronenko Date: Mon, 21 Nov 2022 15:23:23 +0100 Subject: [PATCH 15/46] vmalert: bump alerting rules evaluation interval to reasonable 30s (#3374) Signed-off-by: hagen1778 --- deployment/docker/alerts-vmalert.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/deployment/docker/alerts-vmalert.yml b/deployment/docker/alerts-vmalert.yml index e5d48e096..5e84ea4b6 100644 --- a/deployment/docker/alerts-vmalert.yml +++ b/deployment/docker/alerts-vmalert.yml @@ -6,7 +6,7 @@ groups: # https://grafana.com/grafana/dashboards/14950-victoriametrics-vmalert is installed. # Pls update the `dashboard` annotation according to your setup. - name: vmalert - interval: 5s + interval: 30s rules: - alert: ConfigurationReloadFailure expr: vmalert_config_last_reload_successful != 1 From 2c9e403d5f4617c1710709c4a9198b92d415f256 Mon Sep 17 00:00:00 2001 From: Aliaksandr Valialkin Date: Mon, 21 Nov 2022 16:46:02 +0200 Subject: [PATCH 16/46] app/vmselect/promql: properly return an empty result from limit_offset() if offset exceeds the number of inner time series Updates https://github.com/VictoriaMetrics/VictoriaMetrics/issues/3312 --- app/vmselect/promql/exec_test.go | 10 ++++++++++ app/vmselect/promql/transform.go | 2 ++ docs/CHANGELOG.md | 1 + 3 files changed, 13 insertions(+) diff --git a/app/vmselect/promql/exec_test.go b/app/vmselect/promql/exec_test.go index ed04ba369..8930f6363 100644 --- a/app/vmselect/promql/exec_test.go +++ b/app/vmselect/promql/exec_test.go @@ -2281,6 +2281,16 @@ func TestExecSuccess(t *testing.T) { resultExpected := []netstorage.Result{r} f(q, resultExpected) }) + t.Run(`limit_offset(too-big-offset)`, func(t *testing.T) { + t.Parallel() + q := `limit_offset(1, 10, sort_by_label(( + label_set(time()*1, "foo", "y"), + label_set(time()*2, "foo", "a"), + label_set(time()*3, "foo", "x"), + ), "foo"))` + resultExpected := []netstorage.Result{} + f(q, resultExpected) + }) t.Run(`limit_offset NaN`, func(t *testing.T) { t.Parallel() // q returns 3 time series, where foo=3 contains only NaN values diff --git a/app/vmselect/promql/transform.go b/app/vmselect/promql/transform.go index 8b3f8d338..3fa73ed6f 100644 --- a/app/vmselect/promql/transform.go +++ b/app/vmselect/promql/transform.go @@ -1943,6 +1943,8 @@ func transformLimitOffset(tfa *transformFuncArg) ([]*timeseries, error) { rvs := removeEmptySeries(args[2]) if len(rvs) >= offset { rvs = rvs[offset:] + } else { + rvs = nil } if len(rvs) > limit { rvs = rvs[:limit] diff --git a/docs/CHANGELOG.md b/docs/CHANGELOG.md index f57d55306..930882d70 100644 --- a/docs/CHANGELOG.md +++ b/docs/CHANGELOG.md @@ -24,6 +24,7 @@ The following tip changes can be tested by building VictoriaMetrics components f * FEATURE: [vmui](https://docs.victoriametrics.com/#vmui): add the ability to hide results of a particular query by clicking the `eye` icon. See [this pull request](https://github.com/VictoriaMetrics/VictoriaMetrics/pull/3359). * FEATURE: [vmalert](https://docs.victoriametrics.com/vmalert.html): add default alert list for vmalert's metrics. See [alerts-vmalert.yml](https://github.com/VictoriaMetrics/VictoriaMetrics/blob/master/deployment/docker/alerts-vmalert.yml). +* BUGFIX: [MetricsQL](https://docs.victoriametrics.com/MetricsQL.html): properly return an empty result from [limit_offset](https://docs.victoriametrics.com/MetricsQL.html#limit_offset) if the `offset` arg exceeds the number of inner time series. See [this issue](https://github.com/VictoriaMetrics/VictoriaMetrics/issues/3312). * BUGFIX: [vmui](https://docs.victoriametrics.com/#vmui): properly display the requested graph on the requested time range when navigating from Prometheus URL in Grafana. * BUGFIX: reduce CPU usage spikes and memory usage spikes under high data ingestion rate introduced in [v1.83.0](https://docs.victoriametrics.com/CHANGELOG.html#v1830). See [this issue](https://github.com/VictoriaMetrics/VictoriaMetrics/issues/3343). From 05ed98c98b63ba147784542f919075c623e53e1f Mon Sep 17 00:00:00 2001 From: Aliaksandr Valialkin Date: Mon, 21 Nov 2022 21:27:52 +0200 Subject: [PATCH 17/46] app/vmselect/promql: allow using SI and IEC suffixes in numeric values inside queries For example, 10Ki is equivalent to 10*1024, while 5.3M is equivalent to 5.3*1000*1000 --- docs/CHANGELOG.md | 1 + docs/MetricsQL.md | 1 + go.mod | 2 +- go.sum | 4 +- .../VictoriaMetrics/metricsql/lexer.go | 121 +++++++++++++++++- .../VictoriaMetrics/metricsql/parser.go | 29 +++-- vendor/modules.txt | 2 +- 7 files changed, 139 insertions(+), 21 deletions(-) diff --git a/docs/CHANGELOG.md b/docs/CHANGELOG.md index 930882d70..70aca2453 100644 --- a/docs/CHANGELOG.md +++ b/docs/CHANGELOG.md @@ -16,6 +16,7 @@ The following tip changes can be tested by building VictoriaMetrics components f ## tip * FEATURE: [VictoriaMetrics enterprise](https://docs.victoriametrics.com/enterprise.html): add `-storageNode.filter` command-line flag for filtering the [discovered vmstorage nodes](https://docs.victoriametrics.com/Cluster-VictoriaMetrics.html#automatic-vmstorage-discovery) with arbitrary regular expressions. See [this feature request](https://github.com/VictoriaMetrics/VictoriaMetrics/issues/3353). +* FEATURE: [MetricsQL](https://docs.victoriametrics.com/MetricsQL.html): allow using numeric values with `K`, `Ki`, `M`, `Mi`, `G`, `Gi`, `T` and `Ti` suffixes inside MetricsQL queries. For example `8Ki` equals to `8*1024`, while `8.2M` equals to `8.2*1000*1000`. * FEATURE: [MetricsQL](https://docs.victoriametrics.com/MetricsQL.html): add [range_linear_regression](https://docs.victoriametrics.com/MetricsQL.html#range_linear_regression) function for calculating [simple linear regression](https://en.wikipedia.org/wiki/Simple_linear_regression) over the input time series on the selected time range. This function is useful for predictions and capacity planning. For example, `range_linear_regression(process_resident_memory_bytes)` can predict future memory usage based on the past memory usage. * FEATURE: [MetricsQL](https://docs.victoriametrics.com/MetricsQL.html): add [range_stddev](https://docs.victoriametrics.com/MetricsQL.html#range_stddev) and [range_stdvar](https://docs.victoriametrics.com/MetricsQL.html#range_stdvar) functions. * FEATURE: [MetricsQL](https://docs.victoriametrics.com/MetricsQL.html): optimize `expr1 op expr2` query when `expr1` returns an empty result. In this case there is no sense in executing `expr2` for `op` not equal to `or`, since the end result will be empty according to [PromQL series matching rules](https://prometheus.io/docs/prometheus/latest/querying/operators/#vector-matching). See [this issue](https://github.com/VictoriaMetrics/VictoriaMetrics/issues/3349). Thanks to @jianglinjian for pointing to this case. diff --git a/docs/MetricsQL.md b/docs/MetricsQL.md index 33d1b9c92..217c6f8da 100644 --- a/docs/MetricsQL.md +++ b/docs/MetricsQL.md @@ -73,6 +73,7 @@ The list of MetricsQL features: * The duration suffix is optional. The duration is in seconds if the suffix is missing. For example, `rate(m[300] offset 1800)` is equivalent to `rate(m[5m]) offset 30m`. * The duration can be placed anywhere in the query. For example, `sum_over_time(m[1h]) / 1h` is equivalent to `sum_over_time(m[1h]) / 3600`. +* Numeric values can have `K`, `Ki`, `M`, `Mi`, `G`, `Gi`, `T` and `Ti` suffixes. For example, `8K` is equivalent to `8000`, while `1.2Mi` is equvalent to `1.2*1024*1024`. * Trailing commas on all the lists are allowed - label filters, function args and with expressions. For instance, the following queries are valid: `m{foo="bar",}`, `f(a, b,)`, `WITH (x=y,) x`. This simplifies maintenance of multi-line queries. diff --git a/go.mod b/go.mod index 0c8db875c..0eeed2444 100644 --- a/go.mod +++ b/go.mod @@ -12,7 +12,7 @@ require ( // like https://github.com/valyala/fasthttp/commit/996610f021ff45fdc98c2ce7884d5fa4e7f9199b github.com/VictoriaMetrics/fasthttp v1.1.0 github.com/VictoriaMetrics/metrics v1.23.0 - github.com/VictoriaMetrics/metricsql v0.47.0 + github.com/VictoriaMetrics/metricsql v0.48.0 github.com/aws/aws-sdk-go-v2 v1.17.1 github.com/aws/aws-sdk-go-v2/config v1.18.1 github.com/aws/aws-sdk-go-v2/feature/s3/manager v1.11.40 diff --git a/go.sum b/go.sum index 62b35fb06..6f9c862bc 100644 --- a/go.sum +++ b/go.sum @@ -100,8 +100,8 @@ github.com/VictoriaMetrics/fasthttp v1.1.0/go.mod h1:/7DMcogqd+aaD3G3Hg5kFgoFwlR github.com/VictoriaMetrics/metrics v1.18.1/go.mod h1:ArjwVz7WpgpegX/JpB0zpNF2h2232kErkEnzH1sxMmA= github.com/VictoriaMetrics/metrics v1.23.0 h1:WzfqyzCaxUZip+OBbg1+lV33WChDSu4ssYII3nxtpeA= github.com/VictoriaMetrics/metrics v1.23.0/go.mod h1:rAr/llLpEnAdTehiNlUxKgnjcOuROSzpw0GvjpEbvFc= -github.com/VictoriaMetrics/metricsql v0.47.0 h1:PQwadjoQnKKkaUiupkDq0ZbCAHX2qP8OOexJ9oJwupo= -github.com/VictoriaMetrics/metricsql v0.47.0/go.mod h1:6pP1ZeLVJHqJrHlF6Ij3gmpQIznSsgktEcZgsAWYel0= +github.com/VictoriaMetrics/metricsql v0.48.0 h1:rq8ULfIDJ0QyDbyQWRuWrMTffEqL2sevU2Zs3Vx1pfw= +github.com/VictoriaMetrics/metricsql v0.48.0/go.mod h1:6pP1ZeLVJHqJrHlF6Ij3gmpQIznSsgktEcZgsAWYel0= github.com/VividCortex/ewma v1.1.1/go.mod h1:2Tkkvm3sRDVXaiyucHiACn4cqf7DpdyLvmxzcbUokwA= github.com/VividCortex/ewma v1.2.0 h1:f58SaIzcDXrSy3kWaHNvuJgJ3Nmz59Zji6XoJR/q1ow= github.com/VividCortex/ewma v1.2.0/go.mod h1:nz4BbCtbLyFDeC9SUHbtcT5644juEuWfUAUnGx7j5l4= diff --git a/vendor/github.com/VictoriaMetrics/metricsql/lexer.go b/vendor/github.com/VictoriaMetrics/metricsql/lexer.go index 947da2c53..c1a0ec69b 100644 --- a/vendor/github.com/VictoriaMetrics/metricsql/lexer.go +++ b/vendor/github.com/VictoriaMetrics/metricsql/lexer.go @@ -149,6 +149,73 @@ func scanString(s string) (string, error) { } } +func parsePositiveNumber(s string) (float64, error) { + if isSpecialIntegerPrefix(s) { + n, err := strconv.ParseInt(s, 0, 64) + if err != nil { + return 0, err + } + return float64(n), nil + } + s = strings.ToLower(s) + m := float64(1) + switch true { + case strings.HasSuffix(s, "kib"): + s = s[:len(s)-3] + m = 1024 + case strings.HasSuffix(s, "ki"): + s = s[:len(s)-2] + m = 1024 + case strings.HasSuffix(s, "kb"): + s = s[:len(s)-2] + m = 1000 + case strings.HasSuffix(s, "k"): + s = s[:len(s)-1] + m = 1000 + case strings.HasSuffix(s, "mib"): + s = s[:len(s)-3] + m = 1024 * 1024 + case strings.HasSuffix(s, "mi"): + s = s[:len(s)-2] + m = 1024 * 1024 + case strings.HasSuffix(s, "mb"): + s = s[:len(s)-2] + m = 1000 * 1000 + case strings.HasSuffix(s, "m"): + s = s[:len(s)-1] + m = 1000 * 1000 + case strings.HasSuffix(s, "gib"): + s = s[:len(s)-3] + m = 1024 * 1024 * 1024 + case strings.HasSuffix(s, "gi"): + s = s[:len(s)-2] + m = 1024 * 1024 * 1024 + case strings.HasSuffix(s, "gb"): + s = s[:len(s)-2] + m = 1000 * 1000 * 1000 + case strings.HasSuffix(s, "g"): + s = s[:len(s)-1] + m = 1000 * 1000 * 1000 + case strings.HasSuffix(s, "tib"): + s = s[:len(s)-3] + m = 1024 * 1024 * 1024 * 1024 + case strings.HasSuffix(s, "ti"): + s = s[:len(s)-2] + m = 1024 * 1024 * 1024 * 1024 + case strings.HasSuffix(s, "tb"): + s = s[:len(s)-2] + m = 1000 * 1000 * 1000 * 1000 + case strings.HasSuffix(s, "t"): + s = s[:len(s)-1] + m = 1000 * 1000 * 1000 * 1000 + } + v, err := strconv.ParseFloat(s, 64) + if err != nil { + return 0, err + } + return v * m, nil +} + func scanPositiveNumber(s string) (string, error) { // Scan integer part. It may be empty if fractional part exists. i := 0 @@ -171,7 +238,14 @@ func scanPositiveNumber(s string) (string, error) { } return s, nil } + if sLen := scanNumMultiplier(s[i:]); sLen > 0 { + i += sLen + return s[:i], nil + } if s[i] != '.' && s[i] != 'e' && s[i] != 'E' { + if i == 0 { + return "", fmt.Errorf("missing positive number") + } return s[:i], nil } @@ -182,14 +256,15 @@ func scanPositiveNumber(s string) (string, error) { for j < len(s) && isDecimalChar(s[j]) { j++ } - if j == i { - return "", fmt.Errorf("missing fractional part in %q", s) - } i = j if i == len(s) { return s, nil } } + if sLen := scanNumMultiplier(s[i:]); sLen > 0 { + i += sLen + return s[:i], nil + } if s[i] != 'e' && s[i] != 'E' { return s[:i], nil @@ -213,6 +288,46 @@ func scanPositiveNumber(s string) (string, error) { return s[:j], nil } +func scanNumMultiplier(s string) int { + s = strings.ToLower(s) + switch true { + case strings.HasPrefix(s, "kib"): + return 3 + case strings.HasPrefix(s, "ki"): + return 2 + case strings.HasPrefix(s, "kb"): + return 2 + case strings.HasPrefix(s, "k"): + return 1 + case strings.HasPrefix(s, "mib"): + return 3 + case strings.HasPrefix(s, "mi"): + return 2 + case strings.HasPrefix(s, "mb"): + return 2 + case strings.HasPrefix(s, "m"): + return 1 + case strings.HasPrefix(s, "gib"): + return 3 + case strings.HasPrefix(s, "gi"): + return 2 + case strings.HasPrefix(s, "gb"): + return 2 + case strings.HasPrefix(s, "g"): + return 1 + case strings.HasPrefix(s, "tib"): + return 3 + case strings.HasPrefix(s, "ti"): + return 2 + case strings.HasPrefix(s, "tb"): + return 2 + case strings.HasPrefix(s, "t"): + return 1 + default: + return 0 + } +} + func scanIdent(s string) string { i := 0 for i < len(s) { diff --git a/vendor/github.com/VictoriaMetrics/metricsql/parser.go b/vendor/github.com/VictoriaMetrics/metricsql/parser.go index ac64fc438..9b92dbabb 100644 --- a/vendor/github.com/VictoriaMetrics/metricsql/parser.go +++ b/vendor/github.com/VictoriaMetrics/metricsql/parser.go @@ -479,24 +479,19 @@ func (p *parser) parsePositiveNumberExpr() (*NumberExpr, error) { if !isPositiveNumberPrefix(p.lex.Token) && !isInfOrNaN(p.lex.Token) { return nil, fmt.Errorf(`positiveNumberExpr: unexpected token %q; want "number"`, p.lex.Token) } - var ne NumberExpr - if isSpecialIntegerPrefix(p.lex.Token) { - in, err := strconv.ParseInt(p.lex.Token, 0, 64) - if err != nil { - return nil, fmt.Errorf(`positiveNumberExpr: cannot parse integer %q: %s`, p.lex.Token, err) - } - ne.N = float64(in) - } else { - n, err := strconv.ParseFloat(p.lex.Token, 64) - if err != nil { - return nil, fmt.Errorf(`positiveNumberExpr: cannot parse %q: %s`, p.lex.Token, err) - } - ne.N = n + s := p.lex.Token + n, err := parsePositiveNumber(s) + if err != nil { + return nil, fmt.Errorf(`positivenumberExpr: cannot parse %q: %s`, s, err) } if err := p.lex.Next(); err != nil { return nil, err } - return &ne, nil + ne := &NumberExpr{ + N: n, + s: s, + } + return ne, nil } func (p *parser) parseStringExpr() (*StringExpr, error) { @@ -1499,10 +1494,16 @@ func (se *StringExpr) AppendString(dst []byte) []byte { type NumberExpr struct { // N is the parsed number, i.e. `1.23`, `-234`, etc. N float64 + + // s contains the original string representation for N. + s string } // AppendString appends string representation of ne to dst and returns the result. func (ne *NumberExpr) AppendString(dst []byte) []byte { + if ne.s != "" { + return append(dst, ne.s...) + } return strconv.AppendFloat(dst, ne.N, 'g', -1, 64) } diff --git a/vendor/modules.txt b/vendor/modules.txt index 17b3e4dce..ad20c9371 100644 --- a/vendor/modules.txt +++ b/vendor/modules.txt @@ -69,7 +69,7 @@ github.com/VictoriaMetrics/fasthttp/stackless # github.com/VictoriaMetrics/metrics v1.23.0 ## explicit; go 1.15 github.com/VictoriaMetrics/metrics -# github.com/VictoriaMetrics/metricsql v0.47.0 +# github.com/VictoriaMetrics/metricsql v0.48.0 ## explicit; go 1.13 github.com/VictoriaMetrics/metricsql github.com/VictoriaMetrics/metricsql/binaryop From 95f02665583598ea81895e10d03453ef9950ce7e Mon Sep 17 00:00:00 2001 From: Aliaksandr Valialkin Date: Mon, 21 Nov 2022 22:32:03 +0200 Subject: [PATCH 18/46] lib/promscrape/discovery/gce: do not pass filter arg when discovering zones The filter arg isn't supported by zones API in GCE. See https://github.com/VictoriaMetrics/VictoriaMetrics/issues/3202 --- docs/CHANGELOG.md | 1 + lib/promscrape/discovery/gce/api.go | 4 +++- lib/promscrape/discovery/gce/zone.go | 4 ++-- 3 files changed, 6 insertions(+), 3 deletions(-) diff --git a/docs/CHANGELOG.md b/docs/CHANGELOG.md index 70aca2453..fbd61aa35 100644 --- a/docs/CHANGELOG.md +++ b/docs/CHANGELOG.md @@ -26,6 +26,7 @@ The following tip changes can be tested by building VictoriaMetrics components f * FEATURE: [vmalert](https://docs.victoriametrics.com/vmalert.html): add default alert list for vmalert's metrics. See [alerts-vmalert.yml](https://github.com/VictoriaMetrics/VictoriaMetrics/blob/master/deployment/docker/alerts-vmalert.yml). * BUGFIX: [MetricsQL](https://docs.victoriametrics.com/MetricsQL.html): properly return an empty result from [limit_offset](https://docs.victoriametrics.com/MetricsQL.html#limit_offset) if the `offset` arg exceeds the number of inner time series. See [this issue](https://github.com/VictoriaMetrics/VictoriaMetrics/issues/3312). +* BUGFIX: [vmagent](https://docs.victoriametrics.com/vmagent.html): properly discover GCE zones when `filter` option is set at [gce_sd_configs](https://docs.victoriametrics.com/sd_configs.html#gce_sd_configs). See [this issue](https://github.com/VictoriaMetrics/VictoriaMetrics/issues/3202). * BUGFIX: [vmui](https://docs.victoriametrics.com/#vmui): properly display the requested graph on the requested time range when navigating from Prometheus URL in Grafana. * BUGFIX: reduce CPU usage spikes and memory usage spikes under high data ingestion rate introduced in [v1.83.0](https://docs.victoriametrics.com/CHANGELOG.html#v1830). See [this issue](https://github.com/VictoriaMetrics/VictoriaMetrics/issues/3343). diff --git a/lib/promscrape/discovery/gce/api.go b/lib/promscrape/discovery/gce/api.go index fdf373901..fc6c51438 100644 --- a/lib/promscrape/discovery/gce/api.go +++ b/lib/promscrape/discovery/gce/api.go @@ -58,7 +58,9 @@ func newAPIConfig(sdc *SDConfig) (*apiConfig, error) { logger.Infof("autodetected the current GCE zone: %q", zone) } else if len(zones) == 1 && zones[0] == "*" { // Autodetect zones for project. - zs, err := getZonesForProject(client, project, sdc.Filter) + // Do not pass sdc.Filter when discovering zones, since GCE doesn't support it. + // See https://github.com/VictoriaMetrics/VictoriaMetrics/issues/3202 + zs, err := getZonesForProject(client, project) if err != nil { return nil, fmt.Errorf("cannot obtain zones for project %q: %w", project, err) } diff --git a/lib/promscrape/discovery/gce/zone.go b/lib/promscrape/discovery/gce/zone.go index b949bab9e..b3144656c 100644 --- a/lib/promscrape/discovery/gce/zone.go +++ b/lib/promscrape/discovery/gce/zone.go @@ -6,13 +6,13 @@ import ( "net/http" ) -func getZonesForProject(client *http.Client, project, filter string) ([]string, error) { +func getZonesForProject(client *http.Client, project string) ([]string, error) { // See https://cloud.google.com/compute/docs/reference/rest/v1/zones zonesURL := fmt.Sprintf("https://compute.googleapis.com/compute/v1/projects/%s/zones", project) var zones []string pageToken := "" for { - data, err := getAPIResponse(client, zonesURL, filter, pageToken) + data, err := getAPIResponse(client, zonesURL, "", pageToken) if err != nil { return nil, fmt.Errorf("cannot obtain zones: %w", err) } From d9c3a2b60516d86fb5a33b4bc7d316bd694c3342 Mon Sep 17 00:00:00 2001 From: Aliaksandr Valialkin Date: Mon, 21 Nov 2022 23:24:57 +0200 Subject: [PATCH 19/46] app/vmselect/promql: add `range_normalize(q1, ..., qN)` function for normalizing query results into [0..1] value range This may be useful for analyzing correlation between time series with different value ranges --- app/vmselect/promql/exec_test.go | 17 ++++++++++ app/vmselect/promql/transform.go | 34 +++++++++++++++++++ docs/CHANGELOG.md | 1 + docs/MetricsQL.md | 5 +++ go.mod | 2 +- go.sum | 4 +-- .../VictoriaMetrics/metricsql/optimizer.go | 2 +- .../VictoriaMetrics/metricsql/transform.go | 1 + vendor/modules.txt | 2 +- 9 files changed, 63 insertions(+), 5 deletions(-) diff --git a/app/vmselect/promql/exec_test.go b/app/vmselect/promql/exec_test.go index 8930f6363..49eb8d540 100644 --- a/app/vmselect/promql/exec_test.go +++ b/app/vmselect/promql/exec_test.go @@ -6902,6 +6902,23 @@ func TestExecSuccess(t *testing.T) { resultExpected := []netstorage.Result{r} f(q, resultExpected) }) + t.Run(`range_normalize(time(),alias(-time(),"negative"))`, func(t *testing.T) { + t.Parallel() + q := `range_normalize(time(),alias(-time(), "negative"))` + r1 := netstorage.Result{ + MetricName: metricNameExpected, + Values: []float64{0, 0.2, 0.4, 0.6, 0.8, 1}, + Timestamps: timestampsExpected, + } + r2 := netstorage.Result{ + MetricName: metricNameExpected, + Values: []float64{1, 0.8, 0.6, 0.4, 0.2, 0}, + Timestamps: timestampsExpected, + } + r2.MetricName.MetricGroup = []byte("negative") + resultExpected := []netstorage.Result{r1, r2} + f(q, resultExpected) + }) t.Run(`range_first(time())`, func(t *testing.T) { t.Parallel() q := `range_first(time())` diff --git a/app/vmselect/promql/transform.go b/app/vmselect/promql/transform.go index 3fa73ed6f..f4d151295 100644 --- a/app/vmselect/promql/transform.go +++ b/app/vmselect/promql/transform.go @@ -91,6 +91,7 @@ var transformFuncs = map[string]transformFunc{ "range_linear_regression": transformRangeLinearRegression, "range_max": newTransformFuncRange(runningMax), "range_min": newTransformFuncRange(runningMin), + "range_normalize": transformRangeNormalize, "range_quantile": transformRangeQuantile, "range_stddev": transformRangeStddev, "range_stdvar": transformRangeStdvar, @@ -142,6 +143,7 @@ var transformFuncsKeepMetricName = map[string]bool{ "range_linear_regression": true, "range_max": true, "range_min": true, + "range_normalize": true, "range_quantile": true, "range_stdvar": true, "range_sddev": true, @@ -1240,6 +1242,38 @@ func newTransformFuncRange(rf func(a, b float64, idx int) float64) transformFunc } } +func transformRangeNormalize(tfa *transformFuncArg) ([]*timeseries, error) { + args := tfa.args + var rvs []*timeseries + for _, tss := range args { + for _, ts := range tss { + values := ts.Values + vMin := inf + vMax := -inf + for _, v := range values { + if math.IsNaN(v) { + continue + } + if v < vMin { + vMin = v + } + if v > vMax { + vMax = v + } + } + d := vMax - vMin + if math.IsInf(d, 0) { + continue + } + for i, v := range values { + values[i] = (v - vMin) / d + } + rvs = append(rvs, ts) + } + } + return rvs, nil +} + func transformRangeLinearRegression(tfa *transformFuncArg) ([]*timeseries, error) { args := tfa.args if err := expectTransformArgsNum(args, 1); err != nil { diff --git a/docs/CHANGELOG.md b/docs/CHANGELOG.md index fbd61aa35..558c36ed4 100644 --- a/docs/CHANGELOG.md +++ b/docs/CHANGELOG.md @@ -17,6 +17,7 @@ The following tip changes can be tested by building VictoriaMetrics components f * FEATURE: [VictoriaMetrics enterprise](https://docs.victoriametrics.com/enterprise.html): add `-storageNode.filter` command-line flag for filtering the [discovered vmstorage nodes](https://docs.victoriametrics.com/Cluster-VictoriaMetrics.html#automatic-vmstorage-discovery) with arbitrary regular expressions. See [this feature request](https://github.com/VictoriaMetrics/VictoriaMetrics/issues/3353). * FEATURE: [MetricsQL](https://docs.victoriametrics.com/MetricsQL.html): allow using numeric values with `K`, `Ki`, `M`, `Mi`, `G`, `Gi`, `T` and `Ti` suffixes inside MetricsQL queries. For example `8Ki` equals to `8*1024`, while `8.2M` equals to `8.2*1000*1000`. +* FEATURE: [MetricsQL](https://docs.victoriametrics.com/MetricsQL.html): add [range_normalize](https://docs.victoriametrics.com/MetricsQL.html#range_normalize) function for normalizing multiple time series into `[0...1]` value range. This function is useful for correlation analyzis of time series with distinct value ranges. * FEATURE: [MetricsQL](https://docs.victoriametrics.com/MetricsQL.html): add [range_linear_regression](https://docs.victoriametrics.com/MetricsQL.html#range_linear_regression) function for calculating [simple linear regression](https://en.wikipedia.org/wiki/Simple_linear_regression) over the input time series on the selected time range. This function is useful for predictions and capacity planning. For example, `range_linear_regression(process_resident_memory_bytes)` can predict future memory usage based on the past memory usage. * FEATURE: [MetricsQL](https://docs.victoriametrics.com/MetricsQL.html): add [range_stddev](https://docs.victoriametrics.com/MetricsQL.html#range_stddev) and [range_stdvar](https://docs.victoriametrics.com/MetricsQL.html#range_stdvar) functions. * FEATURE: [MetricsQL](https://docs.victoriametrics.com/MetricsQL.html): optimize `expr1 op expr2` query when `expr1` returns an empty result. In this case there is no sense in executing `expr2` for `op` not equal to `or`, since the end result will be empty according to [PromQL series matching rules](https://prometheus.io/docs/prometheus/latest/querying/operators/#vector-matching). See [this issue](https://github.com/VictoriaMetrics/VictoriaMetrics/issues/3349). Thanks to @jianglinjian for pointing to this case. diff --git a/docs/MetricsQL.md b/docs/MetricsQL.md index 217c6f8da..e16949ec1 100644 --- a/docs/MetricsQL.md +++ b/docs/MetricsQL.md @@ -1221,6 +1221,11 @@ over the selected time range per each time series returned by `q`. This function `range_min(q)` is a [transform function](#transform-functions), which calculates the min value across points per each time series returned by `q`. +#### range_normalize + +`range_normalize(q1, ...)` is a [transform function](#transform-functions), which normalizes values for time series returned by `q1, ...` into `[0 ... 1]` range. +This function is useful for correlating time series with distinct value ranges. + #### range_quantile `range_quantile(phi, q)` is a [transform function](#transform-functions), which returns `phi`-quantile across points per each time series returned by `q`. diff --git a/go.mod b/go.mod index 0eeed2444..4ec30937b 100644 --- a/go.mod +++ b/go.mod @@ -12,7 +12,7 @@ require ( // like https://github.com/valyala/fasthttp/commit/996610f021ff45fdc98c2ce7884d5fa4e7f9199b github.com/VictoriaMetrics/fasthttp v1.1.0 github.com/VictoriaMetrics/metrics v1.23.0 - github.com/VictoriaMetrics/metricsql v0.48.0 + github.com/VictoriaMetrics/metricsql v0.49.0 github.com/aws/aws-sdk-go-v2 v1.17.1 github.com/aws/aws-sdk-go-v2/config v1.18.1 github.com/aws/aws-sdk-go-v2/feature/s3/manager v1.11.40 diff --git a/go.sum b/go.sum index 6f9c862bc..9ecd8cf86 100644 --- a/go.sum +++ b/go.sum @@ -100,8 +100,8 @@ github.com/VictoriaMetrics/fasthttp v1.1.0/go.mod h1:/7DMcogqd+aaD3G3Hg5kFgoFwlR github.com/VictoriaMetrics/metrics v1.18.1/go.mod h1:ArjwVz7WpgpegX/JpB0zpNF2h2232kErkEnzH1sxMmA= github.com/VictoriaMetrics/metrics v1.23.0 h1:WzfqyzCaxUZip+OBbg1+lV33WChDSu4ssYII3nxtpeA= github.com/VictoriaMetrics/metrics v1.23.0/go.mod h1:rAr/llLpEnAdTehiNlUxKgnjcOuROSzpw0GvjpEbvFc= -github.com/VictoriaMetrics/metricsql v0.48.0 h1:rq8ULfIDJ0QyDbyQWRuWrMTffEqL2sevU2Zs3Vx1pfw= -github.com/VictoriaMetrics/metricsql v0.48.0/go.mod h1:6pP1ZeLVJHqJrHlF6Ij3gmpQIznSsgktEcZgsAWYel0= +github.com/VictoriaMetrics/metricsql v0.49.0 h1:7R04eab3gU0PKu8Ksak7SJnORXm0K+hSGt2+t3XGyKg= +github.com/VictoriaMetrics/metricsql v0.49.0/go.mod h1:6pP1ZeLVJHqJrHlF6Ij3gmpQIznSsgktEcZgsAWYel0= github.com/VividCortex/ewma v1.1.1/go.mod h1:2Tkkvm3sRDVXaiyucHiACn4cqf7DpdyLvmxzcbUokwA= github.com/VividCortex/ewma v1.2.0 h1:f58SaIzcDXrSy3kWaHNvuJgJ3Nmz59Zji6XoJR/q1ow= github.com/VividCortex/ewma v1.2.0/go.mod h1:nz4BbCtbLyFDeC9SUHbtcT5644juEuWfUAUnGx7j5l4= diff --git a/vendor/github.com/VictoriaMetrics/metricsql/optimizer.go b/vendor/github.com/VictoriaMetrics/metricsql/optimizer.go index e56659b86..3a432e63e 100644 --- a/vendor/github.com/VictoriaMetrics/metricsql/optimizer.go +++ b/vendor/github.com/VictoriaMetrics/metricsql/optimizer.go @@ -386,7 +386,7 @@ func getTransformArgIdxForOptimization(funcName string, args []Expr) int { return -1 } switch funcName { - case "", "absent", "scalar", "union", "vector": + case "", "absent", "scalar", "union", "vector", "range_normalize": return -1 case "end", "now", "pi", "ru", "start", "step", "time": return -1 diff --git a/vendor/github.com/VictoriaMetrics/metricsql/transform.go b/vendor/github.com/VictoriaMetrics/metricsql/transform.go index 40d315832..5876c8290 100644 --- a/vendor/github.com/VictoriaMetrics/metricsql/transform.go +++ b/vendor/github.com/VictoriaMetrics/metricsql/transform.go @@ -76,6 +76,7 @@ var transformFuncs = map[string]bool{ "range_linear_regression": true, "range_max": true, "range_min": true, + "range_normalize": true, "range_quantile": true, "range_stddev": true, "range_stdvar": true, diff --git a/vendor/modules.txt b/vendor/modules.txt index ad20c9371..c172a7d07 100644 --- a/vendor/modules.txt +++ b/vendor/modules.txt @@ -69,7 +69,7 @@ github.com/VictoriaMetrics/fasthttp/stackless # github.com/VictoriaMetrics/metrics v1.23.0 ## explicit; go 1.15 github.com/VictoriaMetrics/metrics -# github.com/VictoriaMetrics/metricsql v0.48.0 +# github.com/VictoriaMetrics/metricsql v0.49.0 ## explicit; go 1.13 github.com/VictoriaMetrics/metricsql github.com/VictoriaMetrics/metricsql/binaryop From ee1479bac6fdcf47239ade62dddbe27b8ee6b8cc Mon Sep 17 00:00:00 2001 From: Aliaksandr Valialkin Date: Mon, 21 Nov 2022 23:27:00 +0200 Subject: [PATCH 20/46] docs/CHANGELOG.md: link to the related issue for range_normalize() function --- docs/CHANGELOG.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/docs/CHANGELOG.md b/docs/CHANGELOG.md index 558c36ed4..51149a0dc 100644 --- a/docs/CHANGELOG.md +++ b/docs/CHANGELOG.md @@ -17,7 +17,7 @@ The following tip changes can be tested by building VictoriaMetrics components f * FEATURE: [VictoriaMetrics enterprise](https://docs.victoriametrics.com/enterprise.html): add `-storageNode.filter` command-line flag for filtering the [discovered vmstorage nodes](https://docs.victoriametrics.com/Cluster-VictoriaMetrics.html#automatic-vmstorage-discovery) with arbitrary regular expressions. See [this feature request](https://github.com/VictoriaMetrics/VictoriaMetrics/issues/3353). * FEATURE: [MetricsQL](https://docs.victoriametrics.com/MetricsQL.html): allow using numeric values with `K`, `Ki`, `M`, `Mi`, `G`, `Gi`, `T` and `Ti` suffixes inside MetricsQL queries. For example `8Ki` equals to `8*1024`, while `8.2M` equals to `8.2*1000*1000`. -* FEATURE: [MetricsQL](https://docs.victoriametrics.com/MetricsQL.html): add [range_normalize](https://docs.victoriametrics.com/MetricsQL.html#range_normalize) function for normalizing multiple time series into `[0...1]` value range. This function is useful for correlation analyzis of time series with distinct value ranges. +* FEATURE: [MetricsQL](https://docs.victoriametrics.com/MetricsQL.html): add [range_normalize](https://docs.victoriametrics.com/MetricsQL.html#range_normalize) function for normalizing multiple time series into `[0...1]` value range. This function is useful for correlation analyzis of time series with distinct value ranges. See [this issue](https://github.com/VictoriaMetrics/VictoriaMetrics/issues/3167). * FEATURE: [MetricsQL](https://docs.victoriametrics.com/MetricsQL.html): add [range_linear_regression](https://docs.victoriametrics.com/MetricsQL.html#range_linear_regression) function for calculating [simple linear regression](https://en.wikipedia.org/wiki/Simple_linear_regression) over the input time series on the selected time range. This function is useful for predictions and capacity planning. For example, `range_linear_regression(process_resident_memory_bytes)` can predict future memory usage based on the past memory usage. * FEATURE: [MetricsQL](https://docs.victoriametrics.com/MetricsQL.html): add [range_stddev](https://docs.victoriametrics.com/MetricsQL.html#range_stddev) and [range_stdvar](https://docs.victoriametrics.com/MetricsQL.html#range_stdvar) functions. * FEATURE: [MetricsQL](https://docs.victoriametrics.com/MetricsQL.html): optimize `expr1 op expr2` query when `expr1` returns an empty result. In this case there is no sense in executing `expr2` for `op` not equal to `or`, since the end result will be empty according to [PromQL series matching rules](https://prometheus.io/docs/prometheus/latest/querying/operators/#vector-matching). See [this issue](https://github.com/VictoriaMetrics/VictoriaMetrics/issues/3349). Thanks to @jianglinjian for pointing to this case. From 82d254af082a653970af5e4de50e98a121c1e0c4 Mon Sep 17 00:00:00 2001 From: Yury Molodov Date: Mon, 21 Nov 2022 23:26:53 +0100 Subject: [PATCH 21/46] vmui: sticky tooltip (#3376) * feat: add ability to make tooltip "sticky" * vmui: add ability to make tooltip "sticky" --- .../Chart/ChartTooltip/ChartTooltip.tsx | 181 ++++++++++++++++++ .../components/Chart/ChartTooltip/style.scss | 77 ++++++++ .../components/Chart/LineChart/LineChart.tsx | 124 +++++++++--- .../src/components/Chart/LineChart/style.scss | 41 +--- .../src/components/Main/Button/Button.tsx | 3 + .../vmui/src/components/Main/Icons/index.tsx | 9 + .../packages/vmui/src/styles/variables.scss | 3 +- .../packages/vmui/src/utils/uplot/tooltip.ts | 36 ---- .../packages/vmui/src/utils/uplot/types.ts | 17 -- docs/CHANGELOG.md | 1 + 10 files changed, 372 insertions(+), 120 deletions(-) create mode 100644 app/vmui/packages/vmui/src/components/Chart/ChartTooltip/ChartTooltip.tsx create mode 100644 app/vmui/packages/vmui/src/components/Chart/ChartTooltip/style.scss delete mode 100644 app/vmui/packages/vmui/src/utils/uplot/tooltip.ts diff --git a/app/vmui/packages/vmui/src/components/Chart/ChartTooltip/ChartTooltip.tsx b/app/vmui/packages/vmui/src/components/Chart/ChartTooltip/ChartTooltip.tsx new file mode 100644 index 000000000..099771946 --- /dev/null +++ b/app/vmui/packages/vmui/src/components/Chart/ChartTooltip/ChartTooltip.tsx @@ -0,0 +1,181 @@ +import React, { FC, useEffect, useMemo, useRef, useState } from "preact/compat"; +import uPlot, { Series } from "uplot"; +import { MetricResult } from "../../../api/types"; +import { formatPrettyNumber, getColorLine, getLegendLabel } from "../../../utils/uplot/helpers"; +import dayjs from "dayjs"; +import { DATE_FULL_TIMEZONE_FORMAT } from "../../../constants/date"; +import ReactDOM from "react-dom"; +import get from "lodash.get"; +import Button from "../../Main/Button/Button"; +import { CloseIcon, DragIcon } from "../../Main/Icons"; +import classNames from "classnames"; +import { MouseEvent as ReactMouseEvent } from "react"; +import "./style.scss"; + +export interface ChartTooltipProps { + id: string, + u: uPlot, + metrics: MetricResult[], + series: Series[], + unit?: string, + isSticky?: boolean, + tooltipOffset: { left: number, top: number }, + tooltipIdx: { seriesIdx: number, dataIdx: number }, + onClose?: (id: string) => void +} + +const ChartTooltip: FC = ({ + u, + id, + unit = "", + metrics, + series, + tooltipIdx, + tooltipOffset, + isSticky, + onClose +}) => { + const tooltipRef = useRef(null); + + const [position, setPosition] = useState({ top: -999, left: -999 }); + const [moving, setMoving] = useState(false); + const [moved, setMoved] = useState(false); + + const [seriesIdx, setSeriesIdx] = useState(tooltipIdx.seriesIdx); + const [dataIdx, setDataIdx] = useState(tooltipIdx.dataIdx); + + const targetPortal = useMemo(() => u.root.querySelector(".u-wrap"), [u]); + + const value = useMemo(() => get(u, ["data", seriesIdx, dataIdx], 0), [u, seriesIdx, dataIdx]); + const valueFormat = useMemo(() => formatPrettyNumber(value), [value]); + const dataTime = useMemo(() => u.data[0][dataIdx], [u, dataIdx]); + const date = useMemo(() => dayjs(new Date(dataTime * 1000)).format(DATE_FULL_TIMEZONE_FORMAT), [dataTime]); + + const color = useMemo(() => getColorLine(series[seriesIdx]?.label || ""), [series, seriesIdx]); + + const name = useMemo(() => { + const metricName = (series[seriesIdx]?.label || "").replace(/{.+}/gmi, "").trim(); + return getLegendLabel(metricName); + }, []); + + const fields = useMemo(() => { + const metric = metrics[seriesIdx - 1]?.metric || {}; + const fields = Object.keys(metric).filter(k => k !== "__name__"); + return fields.map(key => `${key}="${metric[key]}"`); + }, [metrics, seriesIdx]); + + const handleClose = () => { + onClose && onClose(id); + }; + + const handleMouseDown = (e: ReactMouseEvent) => { + setMoved(true); + setMoving(true); + const { clientX, clientY } = e; + setPosition({ top: clientY, left: clientX }); + }; + + const handleMouseMove = (e: MouseEvent) => { + if (!moving) return; + const { clientX, clientY } = e; + setPosition({ top: clientY, left: clientX }); + }; + + const handleMouseUp = () => { + setMoving(false); + }; + + const calcPosition = () => { + if (!tooltipRef.current) return; + + const topOnChart = u.valToPos((value || 0), series[seriesIdx]?.scale || "1"); + const leftOnChart = u.valToPos(dataTime, "x"); + const { width: tooltipWidth, height: tooltipHeight } = tooltipRef.current.getBoundingClientRect(); + const { width, height } = u.over.getBoundingClientRect(); + + const margin = 10; + const overflowX = leftOnChart + tooltipWidth >= width ? tooltipWidth + (2 * margin) : 0; + const overflowY = topOnChart + tooltipHeight >= height ? tooltipHeight + (2 * margin) : 0; + + setPosition({ + top: topOnChart + tooltipOffset.top + margin - overflowY, + left: leftOnChart + tooltipOffset.left + margin - overflowX + }); + }; + + useEffect(calcPosition, [u, value, dataTime, seriesIdx, tooltipOffset, tooltipRef]); + + useEffect(() => { + setSeriesIdx(tooltipIdx.seriesIdx); + setDataIdx(tooltipIdx.dataIdx); + }, [tooltipIdx]); + + useEffect(() => { + if (moving) { + document.addEventListener("mousemove", handleMouseMove); + document.addEventListener("mouseup", handleMouseUp); + } + + return () => { + document.removeEventListener("mousemove", handleMouseMove); + document.removeEventListener("mouseup", handleMouseUp); + }; + }, [moving]); + + if (!targetPortal || tooltipIdx.seriesIdx < 0 || tooltipIdx.dataIdx < 0) return null; + + return ReactDOM.createPortal(( +
    +
    +
    {date}
    + {isSticky && ( + <> +
    +
    +
    +

    + {name}: + {valueFormat} + {unit} +

    +
    + {!!fields.length && ( +
    + {fields.map((f, i) => ( +
    {f}
    + ))} +
    + )} +
    + ), targetPortal); +}; + +export default ChartTooltip; diff --git a/app/vmui/packages/vmui/src/components/Chart/ChartTooltip/style.scss b/app/vmui/packages/vmui/src/components/Chart/ChartTooltip/style.scss new file mode 100644 index 000000000..9c8cedc94 --- /dev/null +++ b/app/vmui/packages/vmui/src/components/Chart/ChartTooltip/style.scss @@ -0,0 +1,77 @@ +@use "src/styles/variables" as *; +$chart-tooltip-width: 300px; +$chart-tooltip-icon-width: 25px; +$chart-tooltip-date-width: $chart-tooltip-width - (2*$chart-tooltip-icon-width) - (2*$padding-global) - $padding-small; +$chart-tooltip-x: -1 * ($padding-small + $padding-global + $chart-tooltip-date-width + ($chart-tooltip-icon-width/2)); +$chart-tooltip-y: -1 * ($padding-small + ($chart-tooltip-icon-width/2)); + +.vm-chart-tooltip { + position: absolute; + display: grid; + gap: $padding-global; + width: $chart-tooltip-width; + padding: $padding-small; + border-radius: $border-radius-medium; + background: $color-background-tooltip; + color: $color-white; + font-size: $font-size-small; + font-weight: normal; + line-height: 150%; + word-wrap: break-word; + font-family: $font-family-monospace; + z-index: 98; + user-select: text; + pointer-events: none; + + &_sticky { + background-color: $color-dove-gray; + pointer-events: auto; + z-index: 99; + } + + &_moved { + position: fixed; + margin-top: $chart-tooltip-y; + margin-left: $chart-tooltip-x; + } + + &-header { + display: grid; + grid-template-columns: 1fr $chart-tooltip-icon-width $chart-tooltip-icon-width; + gap: $padding-small; + align-items: center; + justify-content: center; + min-height: 25px; + + &__close { + color: $color-white; + } + + &__drag { + color: $color-white; + cursor: move; + } + } + + &-data { + display: flex; + flex-wrap: wrap; + align-items: center; + + &__value { + padding: 4px; + font-weight: bold; + } + + &__marker { + width: 12px; + height: 12px; + margin-right: $padding-small; + } + } + + &-info { + display: grid; + grid-gap: 4px; + } +} diff --git a/app/vmui/packages/vmui/src/components/Chart/LineChart/LineChart.tsx b/app/vmui/packages/vmui/src/components/Chart/LineChart/LineChart.tsx index b8c37503f..1e7e4ff7c 100644 --- a/app/vmui/packages/vmui/src/components/Chart/LineChart/LineChart.tsx +++ b/app/vmui/packages/vmui/src/components/Chart/LineChart/LineChart.tsx @@ -1,9 +1,15 @@ -import React, { FC, useCallback, useEffect, useRef, useState } from "preact/compat"; -import uPlot, { AlignedData as uPlotData, Options as uPlotOptions, Series as uPlotSeries, Range, Scales, Scale } from "uplot"; +import React, { FC, useCallback, useEffect, useMemo, useRef, useState } from "preact/compat"; +import uPlot, { + AlignedData as uPlotData, + Options as uPlotOptions, + Series as uPlotSeries, + Range, + Scales, + Scale, +} from "uplot"; import { defaultOptions } from "../../../utils/uplot/helpers"; import { dragChart } from "../../../utils/uplot/events"; import { getAxes, getMinMaxBuffer } from "../../../utils/uplot/axes"; -import { setTooltip } from "../../../utils/uplot/tooltip"; import { MetricResult } from "../../../api/types"; import { limitsDurations } from "../../../utils/time"; import throttle from "lodash.throttle"; @@ -13,6 +19,7 @@ import { YaxisState } from "../../../state/graph/reducer"; import "uplot/dist/uPlot.min.css"; import "./style.scss"; import classNames from "classnames"; +import ChartTooltip, { ChartTooltipProps } from "../ChartTooltip/ChartTooltip"; export interface LineChartProps { metrics: MetricResult[]; @@ -24,21 +31,30 @@ export interface LineChartProps { setPeriod: ({ from, to }: {from: Date, to: Date}) => void; container: HTMLDivElement | null } + enum typeChartUpdate {xRange = "xRange", yRange = "yRange", data = "data"} -const LineChart: FC = ({ data, series, metrics = [], - period, yaxis, unit, setPeriod, container }) => { - +const LineChart: FC = ({ + data, + series, + metrics = [], + period, + yaxis, + unit, + setPeriod, + container +}) => { const uPlotRef = useRef(null); const [isPanning, setPanning] = useState(false); const [xRange, setXRange] = useState({ min: period.start, max: period.end }); const [uPlotInst, setUPlotInst] = useState(); const layoutSize = useResize(container); - const tooltip = document.createElement("div"); - tooltip.className = "u-tooltip"; - const tooltipIdx: {seriesIdx: number | null, dataIdx: number | undefined} = { seriesIdx: null, dataIdx: undefined }; - const tooltipOffset = { left: 0, top: 0 }; + const [showTooltip, setShowTooltip] = useState(false); + const [tooltipIdx, setTooltipIdx] = useState({ seriesIdx: -1, dataIdx: -1 }); + const [tooltipOffset, setTooltipOffset] = useState({ left: 0, top: 0 }); + const [stickyTooltips, setStickyToolTips] = useState([]); + const tooltipId = useMemo(() => `${tooltipIdx.seriesIdx}_${tooltipIdx.dataIdx}`, [tooltipIdx]); const setScale = ({ min, max }: { min: number, max: number }): void => { setPeriod({ from: new Date(min * 1000), to: new Date(max * 1000) }); @@ -54,12 +70,13 @@ const LineChart: FC = ({ data, series, metrics = [], const onReadyChart = (u: uPlot) => { const factor = 0.9; - tooltipOffset.left = parseFloat(u.over.style.left); - tooltipOffset.top = parseFloat(u.over.style.top); - u.root.querySelector(".u-wrap")?.appendChild(tooltip); + setTooltipOffset({ + left: parseFloat(u.over.style.left), + top: parseFloat(u.over.style.top) + }); u.over.addEventListener("mousedown", e => { - const { ctrlKey, metaKey } = e; - const leftClick = e.button === 0; + const { ctrlKey, metaKey, button } = e; + const leftClick = button === 0; const leftClickWithMeta = leftClick && (ctrlKey || metaKey); if (leftClickWithMeta) { // drag pan @@ -98,21 +115,37 @@ const LineChart: FC = ({ data, series, metrics = [], } }; - const setCursor = (u: uPlot) => { - if (tooltipIdx.dataIdx === u.cursor.idx) return; - tooltipIdx.dataIdx = u.cursor.idx || 0; - if (tooltipIdx.seriesIdx !== null && tooltipIdx.dataIdx !== undefined) { - setTooltip({ u, tooltipIdx, metrics, series, tooltip, tooltipOffset, unit }); + const handleClick = () => { + const id = `${tooltipIdx.seriesIdx}_${tooltipIdx.dataIdx}`; + const props = { + id, + unit, + series, + metrics, + tooltipIdx, + tooltipOffset, + }; + + if (!stickyTooltips.find(t => t.id === id)) { + const tooltipProps = JSON.parse(JSON.stringify(props)); + setStickyToolTips(prev => [...prev, tooltipProps]); } }; - const seriesFocus = (u: uPlot, sidx: (number | null)) => { - if (tooltipIdx.seriesIdx === sidx) return; - tooltipIdx.seriesIdx = sidx; - sidx && tooltipIdx.dataIdx !== undefined - ? setTooltip({ u, tooltipIdx, metrics, series, tooltip, tooltipOffset, unit }) - : tooltip.style.display = "none"; + const handleUnStick = (id:string) => { + setStickyToolTips(prev => prev.filter(t => t.id !== id)); }; + + const setCursor = (u: uPlot) => { + const dataIdx = u.cursor.idx ?? -1; + setTooltipIdx(prev => ({ ...prev, dataIdx })); + }; + + const seriesFocus = (u: uPlot, sidx: (number | null)) => { + const seriesIdx = sidx ?? -1; + setTooltipIdx(prev => ({ ...prev, seriesIdx })); + }; + const getRangeX = (): Range.MinMax => [xRange.min, xRange.max]; const getRangeY = (u: uPlot, min = 0, max = 1, axis: string): Range.MinMax => { if (yaxis.limits.enable) return yaxis.limits.range[axis]; @@ -168,6 +201,8 @@ const LineChart: FC = ({ data, series, metrics = [], useEffect(() => setXRange({ min: period.start, max: period.end }), [period]); useEffect(() => { + setStickyToolTips([]); + setTooltipIdx({ seriesIdx: -1, dataIdx: -1 }); if (!uPlotRef.current) return; const u = new uPlot(options, data, uPlotRef.current); setUPlotInst(u); @@ -187,6 +222,17 @@ const LineChart: FC = ({ data, series, metrics = [], useEffect(() => updateChart(typeChartUpdate.xRange), [xRange]); useEffect(() => updateChart(typeChartUpdate.yRange), [yaxis]); + useEffect(() => { + const show = tooltipIdx.dataIdx !== -1 && tooltipIdx.seriesIdx !== -1; + setShowTooltip(show); + + if (show) window.addEventListener("click", handleClick); + + return () => { + window.removeEventListener("click", handleClick); + }; + }, [tooltipIdx, stickyTooltips]); + return (
    = ({ data, series, metrics = [], "vm-line-chart_panning": isPanning })} > -
    +
    + {uPlotInst && showTooltip && ( + + )} + + {uPlotInst && stickyTooltips.map(t => ( + + ))}
    ); }; diff --git a/app/vmui/packages/vmui/src/components/Chart/LineChart/style.scss b/app/vmui/packages/vmui/src/components/Chart/LineChart/style.scss index d1b3b26de..30186608f 100644 --- a/app/vmui/packages/vmui/src/components/Chart/LineChart/style.scss +++ b/app/vmui/packages/vmui/src/components/Chart/LineChart/style.scss @@ -7,45 +7,8 @@ &_panning { pointer-events: none; } -} -.u-tooltip { - position: absolute; - display: none; - grid-gap: $padding-global; - max-width: 300px; - padding: $padding-small; - border-radius: $border-radius-medium; - background: $color-background-tooltip; - color: $color-white; - font-size: $font-size-small; - font-weight: normal; - line-height: 1.4; - word-wrap: break-word; - font-family: monospace; - pointer-events: none; - z-index: 100; - - &-data { - display: flex; - flex-wrap: wrap; - align-items: center; - line-height: 150%; - - &__value { - padding: 4px; - font-weight: bold; - } - } - - &__info { - display: grid; - grid-gap: 4px; - } - - &__marker { - width: 12px; - height: 12px; - margin-right: $padding-small; + &__u-plot { + position: relative; } } diff --git a/app/vmui/packages/vmui/src/components/Main/Button/Button.tsx b/app/vmui/packages/vmui/src/components/Main/Button/Button.tsx index 09d5c9edd..ad54f6168 100644 --- a/app/vmui/packages/vmui/src/components/Main/Button/Button.tsx +++ b/app/vmui/packages/vmui/src/components/Main/Button/Button.tsx @@ -14,6 +14,7 @@ interface ButtonProps { children?: ReactNode className?: string onClick?: (e: ReactMouseEvent) => void + onMouseDown?: (e: ReactMouseEvent) => void } const Button: FC = ({ @@ -27,6 +28,7 @@ const Button: FC = ({ className, disabled, onClick, + onMouseDown, }) => { const classesButton = classNames({ @@ -45,6 +47,7 @@ const Button: FC = ({ className={classesButton} disabled={disabled} onClick={onClick} + onMouseDown={onMouseDown} > <> {startIcon && {startIcon}} diff --git a/app/vmui/packages/vmui/src/components/Main/Icons/index.tsx b/app/vmui/packages/vmui/src/components/Main/Icons/index.tsx index 68ab7a9bf..cd7ea24dc 100644 --- a/app/vmui/packages/vmui/src/components/Main/Icons/index.tsx +++ b/app/vmui/packages/vmui/src/components/Main/Icons/index.tsx @@ -300,3 +300,12 @@ export const CopyIcon = () => ( > ); + +export const DragIcon = () => ( + + + +); diff --git a/app/vmui/packages/vmui/src/styles/variables.scss b/app/vmui/packages/vmui/src/styles/variables.scss index 094acc677..a3c55ae3d 100644 --- a/app/vmui/packages/vmui/src/styles/variables.scss +++ b/app/vmui/packages/vmui/src/styles/variables.scss @@ -18,6 +18,7 @@ $color-text-secondary: rgba($color-text, 0.6); $color-text-disabled: rgba($color-text, 0.4); $color-black: #110f0f; +$color-dove-gray: #616161; $color-silver: #C4C4C4; $color-alto: #D8D8D8; $color-white: #ffffff; @@ -30,7 +31,7 @@ $color-tropical-blue: #C9E3F6; $color-background-body: var(--color-background-body); $color-background-block: var(--color-background-block); $color-background-modal: rgba($color-black, 0.7); -$color-background-tooltip: rgba(97, 97, 97, 0.92); +$color-background-tooltip: rgba($color-dove-gray, 0.92); /************* padding *************/ diff --git a/app/vmui/packages/vmui/src/utils/uplot/tooltip.ts b/app/vmui/packages/vmui/src/utils/uplot/tooltip.ts deleted file mode 100644 index 970da5b5e..000000000 --- a/app/vmui/packages/vmui/src/utils/uplot/tooltip.ts +++ /dev/null @@ -1,36 +0,0 @@ -import dayjs from "dayjs"; -import { SetupTooltip } from "./types"; -import { getColorLine, formatPrettyNumber, getLegendLabel } from "./helpers"; -import { DATE_FULL_TIMEZONE_FORMAT } from "../../constants/date"; - -// TODO create jsx component -export const setTooltip = ({ u, tooltipIdx, metrics, series, tooltip, tooltipOffset, unit = "" }: SetupTooltip): void => { - const { seriesIdx, dataIdx } = tooltipIdx; - if (seriesIdx === null || dataIdx === undefined) return; - const dataSeries = u.data[seriesIdx][dataIdx]; - const dataTime = u.data[0][dataIdx]; - const metric = metrics[seriesIdx - 1]?.metric || {}; - const selectedSeries = series[seriesIdx]; - const color = getColorLine(selectedSeries.label || ""); - - const { width, height } = u.over.getBoundingClientRect(); - const top = u.valToPos((dataSeries || 0), series[seriesIdx]?.scale || "1"); - const lft = u.valToPos(dataTime, "x"); - const { width: tooltipWidth, height: tooltipHeight } = tooltip.getBoundingClientRect(); - const overflowX = lft + tooltipWidth >= width; - const overflowY = top + tooltipHeight >= height; - - tooltip.style.display = "grid"; - tooltip.style.top = `${tooltipOffset.top + top + 10 - (overflowY ? tooltipHeight + 10 : 0)}px`; - tooltip.style.left = `${tooltipOffset.left + lft + 10 - (overflowX ? tooltipWidth + 20 : 0)}px`; - const metricName = (selectedSeries.label || "").replace(/{.+}/gmi, "").trim(); - const name = getLegendLabel(metricName); - const date = dayjs(new Date(dataTime * 1000)).format(DATE_FULL_TIMEZONE_FORMAT); - const info = Object.keys(metric).filter(k => k !== "__name__").map(k => `
    ${k}: ${metric[k]}
    `).join(""); - const marker = `
    `; - tooltip.innerHTML = `
    ${date}
    -
    - ${marker}${name}: ${formatPrettyNumber(dataSeries)} ${unit} -
    -
    ${info}
    `; -}; diff --git a/app/vmui/packages/vmui/src/utils/uplot/types.ts b/app/vmui/packages/vmui/src/utils/uplot/types.ts index 604b86549..e46850228 100644 --- a/app/vmui/packages/vmui/src/utils/uplot/types.ts +++ b/app/vmui/packages/vmui/src/utils/uplot/types.ts @@ -1,21 +1,4 @@ import uPlot, { Series } from "uplot"; -import { MetricResult } from "../../api/types"; - -export interface SetupTooltip { - u: uPlot, - metrics: MetricResult[], - series: Series[], - tooltip: HTMLDivElement, - unit?: string, - tooltipOffset: { - left: number, - top: number - }, - tooltipIdx: { - seriesIdx: number | null, - dataIdx: number | undefined - } -} export interface HideSeriesArgs { hideSeries: string[], diff --git a/docs/CHANGELOG.md b/docs/CHANGELOG.md index 51149a0dc..8f922c3a1 100644 --- a/docs/CHANGELOG.md +++ b/docs/CHANGELOG.md @@ -24,6 +24,7 @@ The following tip changes can be tested by building VictoriaMetrics components f * FEATURE: [vmui](https://docs.victoriametrics.com/#vmui): add the ability to upload/paste JSON to investigate the trace. See [this issue](https://github.com/VictoriaMetrics/VictoriaMetrics/issues/3308) and [this pull request](https://github.com/VictoriaMetrics/VictoriaMetrics/pull/3310). * FEATURE: [vmui](https://docs.victoriametrics.com/#vmui): reduce JS bundle size from 200Kb to 100Kb. See [this pull request](https://github.com/VictoriaMetrics/VictoriaMetrics/pull/3298). * FEATURE: [vmui](https://docs.victoriametrics.com/#vmui): add the ability to hide results of a particular query by clicking the `eye` icon. See [this pull request](https://github.com/VictoriaMetrics/VictoriaMetrics/pull/3359). +* 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: [vmalert](https://docs.victoriametrics.com/vmalert.html): add default alert list for vmalert's metrics. See [alerts-vmalert.yml](https://github.com/VictoriaMetrics/VictoriaMetrics/blob/master/deployment/docker/alerts-vmalert.yml). * BUGFIX: [MetricsQL](https://docs.victoriametrics.com/MetricsQL.html): properly return an empty result from [limit_offset](https://docs.victoriametrics.com/MetricsQL.html#limit_offset) if the `offset` arg exceeds the number of inner time series. See [this issue](https://github.com/VictoriaMetrics/VictoriaMetrics/issues/3312). From f81072f9a7ae8dd2be2486573b43f765f48df588 Mon Sep 17 00:00:00 2001 From: Yury Molodov Date: Mon, 21 Nov 2022 23:28:03 +0100 Subject: [PATCH 22/46] vmui: minor fixes (#3361) * fix: reset the value of the switches trace and cache * fix: add cursor text for inputs * fix: solve the Infinite loop of useFetchQuery.ts * fix: change condition for show/hide autocomplete * fix: add limit error length for input --- .../Configurators/QueryEditor/QueryEditor.tsx | 29 ++++++++++++------- .../src/components/Main/TextField/style.scss | 9 +++++- .../packages/vmui/src/hooks/useFetchQuery.ts | 10 +++++-- .../vmui/src/state/customPanel/reducer.ts | 7 ++--- app/vmui/packages/vmui/src/styles/core.scss | 5 ++++ 5 files changed, 42 insertions(+), 18 deletions(-) diff --git a/app/vmui/packages/vmui/src/components/Configurators/QueryEditor/QueryEditor.tsx b/app/vmui/packages/vmui/src/components/Configurators/QueryEditor/QueryEditor.tsx index 0fb1b13d9..6dec9e180 100644 --- a/app/vmui/packages/vmui/src/components/Configurators/QueryEditor/QueryEditor.tsx +++ b/app/vmui/packages/vmui/src/components/Configurators/QueryEditor/QueryEditor.tsx @@ -41,7 +41,6 @@ const QueryEditor: FC = ({ const wrapperEl = useRef(null); const foundOptions = useMemo(() => { - setFocusOption(0); if (!openAutocomplete) return []; try { const regexp = new RegExp(String(value), "i"); @@ -50,7 +49,11 @@ const QueryEditor: FC = ({ } catch (e) { return []; } - }, [openAutocomplete, options]); + }, [openAutocomplete, options, value]); + + const handleCloseAutocomplete = () => { + setOpenAutocomplete(false); + }; const handleKeyDown = (e: KeyboardEvent) => { const { key, ctrlKey, metaKey, shiftKey } = e; @@ -59,8 +62,10 @@ const QueryEditor: FC = ({ const arrowUp = key === "ArrowUp"; const arrowDown = key === "ArrowDown"; const enter = key === "Enter"; + const escape = key === "Escape"; const hasAutocomplete = openAutocomplete && foundOptions.length; + const valueAutocomplete = foundOptions[focusOption]; const isArrows = arrowUp || arrowDown; const arrowsByOptions = isArrows && hasAutocomplete; @@ -86,17 +91,19 @@ const QueryEditor: FC = ({ } // Enter - if (enter && hasAutocomplete && !shiftKey && !ctrlMetaKey) { + if (valueAutocomplete && enter && hasAutocomplete && !shiftKey && !ctrlMetaKey) { if (disabled) return; - onChange(foundOptions[focusOption]); - setOpenAutocomplete(false); + onChange(valueAutocomplete); + handleCloseAutocomplete(); } else if (enter && !shiftKey) { onEnter(); + handleCloseAutocomplete(); } - }; - const handleCloseAutocomplete = () => { - setOpenAutocomplete(false); + // Escape + if (escape && openAutocomplete) { + handleCloseAutocomplete(); + } }; const createHandlerOnChangeAutocomplete = (item: string) => () => { @@ -106,9 +113,11 @@ const QueryEditor: FC = ({ }; useEffect(() => { + if (!autocomplete || !foundOptions.length) return; + setFocusOption(-1); const words = (value.match(/[a-zA-Z_:.][a-zA-Z0-9_:.]*/gm) || []).length; setOpenAutocomplete(autocomplete && value.length > 2 && words <= 1); - }, [autocomplete, value]); + }, [autocomplete, value, foundOptions]); useEffect(() => { if (!wrapperEl.current) return; @@ -116,7 +125,7 @@ const QueryEditor: FC = ({ if (target?.scrollIntoView) target.scrollIntoView({ block: "center" }); }, [focusOption]); - useClickOutside(autocompleteAnchorEl, () => setOpenAutocomplete(false), wrapperEl); + useClickOutside(autocompleteAnchorEl, handleCloseAutocomplete, wrapperEl); return
    { + const byQuery = q.trim(); + const byHideQuery = hideQuery ? !hideQuery.includes(i) : true; + return byQuery && byHideQuery; + }; + const fetchUrl = useMemo(() => { const expr = predefinedQuery ?? query; const displayChart = (display || displayType) === "chart"; @@ -112,7 +118,7 @@ export const useFetchQuery = ({ predefinedQuery, visible, display, customStep, h } else if (isValidHttpUrl(serverUrl)) { const updatedPeriod = { ...period }; updatedPeriod.step = customStep; - return expr.filter((q, i) => q.trim() && !hideQuery.includes(i)).map(q => displayChart + return expr.filter(filterExpr).map(q => displayChart ? getQueryRangeUrl(serverUrl, q, updatedPeriod, nocache, isTracingEnabled) : getQueryUrl(serverUrl, q, updatedPeriod, isTracingEnabled)); } else { diff --git a/app/vmui/packages/vmui/src/state/customPanel/reducer.ts b/app/vmui/packages/vmui/src/state/customPanel/reducer.ts index cc28d05dc..55b12528c 100644 --- a/app/vmui/packages/vmui/src/state/customPanel/reducer.ts +++ b/app/vmui/packages/vmui/src/state/customPanel/reducer.ts @@ -1,5 +1,4 @@ import { DisplayType, displayTypeTabs } from "../../pages/CustomPanel/DisplayTypeSwitch"; -import { getFromStorage, saveToStorage } from "../../utils/storage"; import { getQueryStringValue } from "../../utils/query-string"; export interface CustomPanelState { @@ -18,8 +17,8 @@ const displayType = displayTypeTabs.find(t => t.prometheusCode === +queryTab || export const initialCustomPanelState: CustomPanelState = { displayType: (displayType?.value || "chart") as DisplayType, - nocache: getFromStorage("NO_CACHE") as boolean || false, - isTracingEnabled: getFromStorage("QUERY_TRACING") as boolean || false, + nocache: false, + isTracingEnabled: false, }; export function reducer(state: CustomPanelState, action: CustomPanelAction): CustomPanelState { @@ -30,14 +29,12 @@ export function reducer(state: CustomPanelState, action: CustomPanelAction): Cus displayType: action.payload }; case "TOGGLE_QUERY_TRACING": - saveToStorage("QUERY_TRACING", !state.isTracingEnabled); return { ...state, isTracingEnabled: !state.isTracingEnabled, }; case "TOGGLE_NO_CACHE": - saveToStorage("NO_CACHE", !state.nocache); return { ...state, nocache: !state.nocache diff --git a/app/vmui/packages/vmui/src/styles/core.scss b/app/vmui/packages/vmui/src/styles/core.scss index a7a7fd91f..1fc75cd73 100644 --- a/app/vmui/packages/vmui/src/styles/core.scss +++ b/app/vmui/packages/vmui/src/styles/core.scss @@ -28,6 +28,11 @@ b { font-weight: bold; } +textarea, +input { + cursor: text; +} + input[type=number]::-webkit-inner-spin-button, input[type=number]::-webkit-outer-spin-button { -webkit-appearance: none; From 7d1b3e7e149a8d68c4ec24116f7b48b33e95d0ef Mon Sep 17 00:00:00 2001 From: Yury Molodov Date: Mon, 21 Nov 2022 23:31:33 +0100 Subject: [PATCH 23/46] vmui: add copy button to row on Table view (#3363) * feat: add copy button to row on Table view * vmui: add copy button to row on Table view Co-authored-by: Aliaksandr Valialkin --- .../components/Views/TableView/TableView.tsx | 50 +++++++++++++++++-- app/vmui/packages/vmui/src/types/index.ts | 1 + docs/CHANGELOG.md | 1 + 3 files changed, 47 insertions(+), 5 deletions(-) diff --git a/app/vmui/packages/vmui/src/components/Views/TableView/TableView.tsx b/app/vmui/packages/vmui/src/components/Views/TableView/TableView.tsx index 32126a22c..b11c2e9c6 100644 --- a/app/vmui/packages/vmui/src/components/Views/TableView/TableView.tsx +++ b/app/vmui/packages/vmui/src/components/Views/TableView/TableView.tsx @@ -4,7 +4,10 @@ import { InstantDataSeries } from "../../../types"; import { useSortedCategories } from "../../../hooks/useSortedCategories"; import Alert from "../../Main/Alert/Alert"; import classNames from "classnames"; -import { ArrowDropDownIcon } from "../../Main/Icons"; +import { ArrowDropDownIcon, CopyIcon } from "../../Main/Icons"; +import Tooltip from "../../Main/Tooltip/Tooltip"; +import Button from "../../Main/Button/Button"; +import { useSnack } from "../../../contexts/Snackbar"; export interface GraphViewProps { data: InstantMetricResult[]; @@ -12,16 +15,24 @@ export interface GraphViewProps { } const TableView: FC = ({ data, displayColumns }) => { + const { showInfoMessage } = useSnack(); const sortedColumns = useSortedCategories(data, displayColumns); const [orderBy, setOrderBy] = useState(""); const [orderDir, setOrderDir] = useState<"asc" | "desc">("asc"); + const getCopyValue = (metric: {[p: string]: string}) => { + const { __name__, ...fields } = metric; + if (!__name__ && !Object.keys(fields).length) return ""; + return `${__name__} ${JSON.stringify(fields)}`; + }; + const rows: InstantDataSeries[] = useMemo(() => { const rows = data?.map(d => ({ metadata: sortedColumns.map(c => d.metric[c.key] || "-"), - value: d.value ? d.value[1] : "-" + value: d.value ? d.value[1] : "-", + copyValue: getCopyValue(d.metric) })); const orderByValue = orderBy === "Value"; const rowIndex = sortedColumns.findIndex(c => c.key === orderBy); @@ -34,15 +45,26 @@ const TableView: FC = ({ data, displayColumns }) => { }); }, [sortedColumns, data, orderBy, orderDir]); - const createSortHandler = (key: string) => () => { - sortHandler(key); - }; + const hasCopyValue = useMemo(() => rows.some(r => r.copyValue), [rows]); const sortHandler = (key: string) => { setOrderDir((prev) => prev === "asc" && orderBy === key ? "desc" : "asc"); setOrderBy(key); }; + const copyHandler = async (copyValue: string) => { + await navigator.clipboard.writeText(copyValue); + showInfoMessage({ text: "Row has been copied", type: "success" }); + }; + + const createSortHandler = (key: string) => () => { + sortHandler(key); + }; + + const createCopyHandler = (copyValue: string) => () => { + copyHandler(copyValue); + }; + if (!rows.length) return No data to show; return ( @@ -86,6 +108,7 @@ const TableView: FC = ({ data, displayColumns }) => { Value
    + {hasCopyValue && } @@ -108,6 +131,23 @@ const TableView: FC = ({ data, displayColumns }) => { {row.value} + {hasCopyValue && ( + + {row.copyValue && ( +
    + +
    + )} + + )} ))} diff --git a/app/vmui/packages/vmui/src/types/index.ts b/app/vmui/packages/vmui/src/types/index.ts index 3e711e82e..0bbbdb4d2 100644 --- a/app/vmui/packages/vmui/src/types/index.ts +++ b/app/vmui/packages/vmui/src/types/index.ts @@ -35,6 +35,7 @@ export interface DataSeries extends MetricBase{ export interface InstantDataSeries { metadata: string[]; // just ordered columns value: string; + copyValue: string; } export enum ErrorTypes { diff --git a/docs/CHANGELOG.md b/docs/CHANGELOG.md index 8f922c3a1..a9d8c2ab1 100644 --- a/docs/CHANGELOG.md +++ b/docs/CHANGELOG.md @@ -24,6 +24,7 @@ The following tip changes can be tested by building VictoriaMetrics components f * FEATURE: [vmui](https://docs.victoriametrics.com/#vmui): add the ability to upload/paste JSON to investigate the trace. See [this issue](https://github.com/VictoriaMetrics/VictoriaMetrics/issues/3308) and [this pull request](https://github.com/VictoriaMetrics/VictoriaMetrics/pull/3310). * FEATURE: [vmui](https://docs.victoriametrics.com/#vmui): reduce JS bundle size from 200Kb to 100Kb. See [this pull request](https://github.com/VictoriaMetrics/VictoriaMetrics/pull/3298). * FEATURE: [vmui](https://docs.victoriametrics.com/#vmui): add the ability to hide results of a particular query by clicking the `eye` icon. See [this pull request](https://github.com/VictoriaMetrics/VictoriaMetrics/pull/3359). +* FEATURE: [vmui](https://docs.victoriametrics.com/#vmui): add copy button to row on Table view. The button copies row in MetricQL format. See [this issue](https://github.com/VictoriaMetrics/VictoriaMetrics/issues/2815). * 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: [vmalert](https://docs.victoriametrics.com/vmalert.html): add default alert list for vmalert's metrics. See [alerts-vmalert.yml](https://github.com/VictoriaMetrics/VictoriaMetrics/blob/master/deployment/docker/alerts-vmalert.yml). From 2ddfde78c323769f4c34ae118c8526fff158ff90 Mon Sep 17 00:00:00 2001 From: Aliaksandr Valialkin Date: Tue, 22 Nov 2022 00:34:33 +0200 Subject: [PATCH 24/46] app/vmselect/vmui: `make vmui-update` after 7d1b3e7e149a8d68c4ec24116f7b48b33e95d0ef --- app/vmselect/vmui/asset-manifest.json | 8 ++++---- app/vmselect/vmui/index.html | 2 +- app/vmselect/vmui/static/css/main.44a8ea12.css | 1 - app/vmselect/vmui/static/css/main.c52a0b3d.css | 1 + app/vmselect/vmui/static/js/main.c86c7c69.js | 2 ++ ...9caa97.js.LICENSE.txt => main.c86c7c69.js.LICENSE.txt} | 0 app/vmselect/vmui/static/js/main.da9caa97.js | 2 -- 7 files changed, 8 insertions(+), 8 deletions(-) delete mode 100644 app/vmselect/vmui/static/css/main.44a8ea12.css create mode 100644 app/vmselect/vmui/static/css/main.c52a0b3d.css create mode 100644 app/vmselect/vmui/static/js/main.c86c7c69.js rename app/vmselect/vmui/static/js/{main.da9caa97.js.LICENSE.txt => main.c86c7c69.js.LICENSE.txt} (100%) delete mode 100644 app/vmselect/vmui/static/js/main.da9caa97.js diff --git a/app/vmselect/vmui/asset-manifest.json b/app/vmselect/vmui/asset-manifest.json index 24fc65b79..be6938533 100644 --- a/app/vmselect/vmui/asset-manifest.json +++ b/app/vmselect/vmui/asset-manifest.json @@ -1,12 +1,12 @@ { "files": { - "main.css": "./static/css/main.44a8ea12.css", - "main.js": "./static/js/main.da9caa97.js", + "main.css": "./static/css/main.c52a0b3d.css", + "main.js": "./static/js/main.c86c7c69.js", "static/js/27.c1ccfd29.chunk.js": "./static/js/27.c1ccfd29.chunk.js", "index.html": "./index.html" }, "entrypoints": [ - "static/css/main.44a8ea12.css", - "static/js/main.da9caa97.js" + "static/css/main.c52a0b3d.css", + "static/js/main.c86c7c69.js" ] } \ No newline at end of file diff --git a/app/vmselect/vmui/index.html b/app/vmselect/vmui/index.html index 9a378670f..8a0c16df8 100644 --- a/app/vmselect/vmui/index.html +++ b/app/vmselect/vmui/index.html @@ -1 +1 @@ -VM UI
    \ No newline at end of file +VM UI
    \ No newline at end of file diff --git a/app/vmselect/vmui/static/css/main.44a8ea12.css b/app/vmselect/vmui/static/css/main.44a8ea12.css deleted file mode 100644 index 9fd6fa9cf..000000000 --- a/app/vmselect/vmui/static/css/main.44a8ea12.css +++ /dev/null @@ -1 +0,0 @@ -.vm-tabs{gap:16px;height:100%;position:relative;-webkit-user-select:none;user-select:none}.vm-tabs,.vm-tabs-item{align-items:center;display:flex;justify-content:center}.vm-tabs-item{color:inherit;cursor:pointer;font-size:inherit;font-weight:inherit;opacity:.6;padding:16px 8px;text-decoration:none;text-transform:uppercase;transition:opacity .2s}.vm-tabs-item_active{opacity:1}.vm-tabs-item__icon{display:grid;margin-right:8px;width:15px}.vm-tabs-item__icon_single{margin-right:0}.vm-tabs__indicator{border-bottom:2px solid;position:absolute;transition:width .2s ease,left .3s cubic-bezier(.28,.84,.42,1)}.vm-alert{grid-gap:8px;align-items:flex-start;background-color:var(--color-background-block);border-radius:8px;box-shadow:1px 2px 12px hsla(0,6%,6%,.08);color:#110f0f;display:grid;font-size:14px;font-weight:500;gap:8px;grid-template-columns:20px 1fr;line-height:20px;padding:16px;position:relative}.vm-alert:after{border-radius:8px;content:"";height:100%;left:0;opacity:.1;position:absolute;top:0;width:100%;z-index:1}.vm-alert__content,.vm-alert__icon{position:relative;z-index:2}.vm-alert__icon{align-items:center;display:flex;justify-content:center}.vm-alert__content{-webkit-filter:brightness(.6);filter:brightness(.6);white-space:pre-line}.vm-alert_success{color:var(--color-success)}.vm-alert_success:after{background-color:var(--color-success)}.vm-alert_error{color:var(--color-error)}.vm-alert_error:after{background-color:var(--color-error)}.vm-alert_info{color:var(--color-info)}.vm-alert_info:after{background-color:var(--color-info)}.vm-alert_warning{color:var(--color-warning)}.vm-alert_warning:after{background-color:var(--color-warning)}.vm-popper{background-color:var(--color-background-block);border-radius:4px;box-shadow:0 2px 8px 0 hsla(0,6%,6%,.2);opacity:0;pointer-events:none;position:fixed;transition:opacity .1s ease-in-out;z-index:-99}.vm-popper_open{-webkit-animation:scale .15s cubic-bezier(.28,.84,.42,1);animation:scale .15s cubic-bezier(.28,.84,.42,1);opacity:1;pointer-events:auto;z-index:101}.vm-popper_open_slider{-webkit-animation:slidePopper .3s cubic-bezier(.28,.84,.42,1.1);animation:slidePopper .3s cubic-bezier(.28,.84,.42,1.1);-webkit-transform-origin:top center;transform-origin:top center}.vm-button{align-items:center;border-radius:6px;color:#fff;cursor:pointer;display:flex;font-size:10px;font-weight:500;justify-content:center;line-height:15px;min-height:31px;padding:6px 14px;position:relative;text-transform:uppercase;-webkit-transform-style:preserve-3d;transform-style:preserve-3d;-webkit-user-select:none;user-select:none;white-space:nowrap}.vm-button:hover:after{background-color:hsla(0,6%,6%,.05)}.vm-button:after,.vm-button:before{border-radius:6px;content:"";height:100%;left:0;position:absolute;top:0;transition:background-color .2s ease;width:100%}.vm-button:before{-webkit-transform:translateZ(-2px);transform:translateZ(-2px)}.vm-button:after{background-color:transparent;-webkit-transform:translateZ(-1px);transform:translateZ(-1px)}.vm-button span{align-items:center;display:grid;justify-content:center}.vm-button span svg{width:15px}.vm-button__start-icon{margin-right:6px}.vm-button__end-icon{margin-left:6px}.vm-button_disabled{cursor:not-allowed;opacity:.3}.vm-button_icon{padding:6px 8px}.vm-button_icon .vm-button__end-icon,.vm-button_icon .vm-button__start-icon{margin:0}.vm-button_small{min-height:25px;padding:4px 6px}.vm-button_small span svg{width:13px}.vm-button_contained_primary{color:var(--color-primary-text)}.vm-button_contained_primary:before{background-color:var(--color-primary)}.vm-button_contained_primary:hover:after{background-color:hsla(0,6%,6%,.2)}.vm-button_contained_secondary{color:var(--color-secondary-text)}.vm-button_contained_secondary:before{background-color:var(--color-secondary)}.vm-button_contained_secondary:hover:after{background-color:hsla(0,6%,6%,.2)}.vm-button_contained_success{color:var(--color-success-text)}.vm-button_contained_success:before{background-color:var(--color-success)}.vm-button_contained_success:hover:after{background-color:hsla(0,6%,6%,.2)}.vm-button_contained_error{color:var(--color-error-text)}.vm-button_contained_error:before{background-color:var(--color-error)}.vm-button_contained_gray{color:hsla(0,6%,6%,.6)}.vm-button_contained_gray:before{background-color:hsla(0,6%,6%,.6)}.vm-button_text_primary{color:var(--color-primary)}.vm-button_text_secondary{color:var(--color-secondary)}.vm-button_text_success{color:var(--color-success)}.vm-button_text_error{color:var(--color-error)}.vm-button_text_gray{color:hsla(0,6%,6%,.6)}.vm-button_outlined_primary{border:1px solid var(--color-primary);color:var(--color-primary)}.vm-button_outlined_error{border:1px solid var(--color-error);color:var(--color-error)}.vm-button_outlined_secondary{border:1px solid var(--color-secondary);color:var(--color-secondary)}.vm-button_outlined_success{border:1px solid var(--color-success);color:var(--color-success)}.vm-button_outlined_gray{border:1px solid hsla(0,6%,6%,.6);color:hsla(0,6%,6%,.6)}.vm-execution-controls-buttons{border-radius:7px;display:flex;justify-content:space-between;min-width:107px}.vm-execution-controls-buttons__arrow{align-items:center;display:flex;justify-content:center;-webkit-transform:rotate(0);transform:rotate(0);transition:-webkit-transform .2s ease-in-out;transition:transform .2s ease-in-out;transition:transform .2s ease-in-out,-webkit-transform .2s ease-in-out}.vm-execution-controls-buttons__arrow_open{-webkit-transform:rotate(180deg);transform:rotate(180deg)}.vm-execution-controls-list{font-size:12px;max-height:208px;overflow:auto;padding:8px 0;width:124px}.vm-tooltip{-webkit-animation:vm-scale .15s cubic-bezier(.28,.84,.42,1);animation:vm-scale .15s cubic-bezier(.28,.84,.42,1);background-color:rgba(97,97,97,.92);border-radius:4px;box-shadow:0 2px 8px 0 hsla(0,6%,6%,.2);color:#fff;font-size:10px;line-height:150%;opacity:1;padding:3px 8px;pointer-events:auto;position:fixed;transition:opacity .1s ease-in-out;white-space:nowrap;z-index:101}@-webkit-keyframes vm-scale{0%{-webkit-transform:scale(0);transform:scale(0)}to{-webkit-transform:scale(1);transform:scale(1)}}@keyframes vm-scale{0%{-webkit-transform:scale(0);transform:scale(0)}to{-webkit-transform:scale(1);transform:scale(1)}}.vm-time-duration{font-size:12px;max-height:168px;overflow:auto}.vm-calendar{background-color:var(--color-background-block);border-radius:8px;display:grid;font-size:12px;grid-template-rows:auto 1fr auto;padding:16px;-webkit-user-select:none;user-select:none}.vm-calendar__tabs{border-top:1px solid hsla(0,6%,6%,.15);margin:16px -16px -16px}.vm-calendar-header{grid-gap:24px;align-items:center;display:grid;gap:24px;grid-template-columns:1fr auto;justify-content:center;min-height:36px;padding-bottom:16px}.vm-calendar-header-left{grid-gap:8px;align-items:center;cursor:pointer;display:grid;gap:8px;grid-template-columns:auto auto;justify-content:flex-start;transition:opacity .2s ease-in-out}.vm-calendar-header-left:hover{opacity:.8}.vm-calendar-header-left__date{color:#110f0f;font-size:12px;font-weight:700}.vm-calendar-header-left__select-year{align-items:center;display:grid;height:14px;justify-content:center;width:14px}.vm-calendar-header-left__select-year svg{width:100%}.vm-calendar-header-right{grid-gap:8px;align-items:center;display:grid;gap:8px;grid-template-columns:18px 18px;justify-content:center}.vm-calendar-header-right__next,.vm-calendar-header-right__prev{cursor:pointer;transition:opacity .2s ease-in-out}.vm-calendar-header-right__next:hover,.vm-calendar-header-right__prev:hover{opacity:.8}.vm-calendar-header-right__prev{-webkit-transform:rotate(90deg);transform:rotate(90deg)}.vm-calendar-header-right__next{-webkit-transform:rotate(-90deg);transform:rotate(-90deg)}.vm-calendar-body{grid-gap:2px;display:grid;gap:2px;grid-template-columns:repeat(7,32px);grid-template-rows:repeat(6,32px)}.vm-calendar-body,.vm-calendar-body-cell{align-items:center;justify-content:center}.vm-calendar-body-cell{border-radius:50%;display:flex;height:100%;text-align:center}.vm-calendar-body-cell_weekday{color:hsla(0,6%,6%,.6)}.vm-calendar-body-cell_day{cursor:pointer;transition:color .2s ease,background-color .3s ease-in-out}.vm-calendar-body-cell_day:hover{background-color:hsla(0,6%,6%,.05)}.vm-calendar-body-cell_day_empty{pointer-events:none}.vm-calendar-body-cell_day_active{color:#fff}.vm-calendar-body-cell_day_active,.vm-calendar-body-cell_day_active:hover{background-color:var(--color-primary)}.vm-calendar-body-cell_day_today{border:1px solid var(--color-primary)}.vm-calendar-years{grid-gap:8px;display:grid;gap:8px;grid-template-columns:repeat(3,1fr);overflow:auto}.vm-calendar-years__year{align-items:center;border-radius:8px;cursor:pointer;display:flex;justify-content:center;padding:8px 16px;transition:color .2s ease,background-color .3s ease-in-out}.vm-calendar-years__year:hover{background-color:hsla(0,6%,6%,.05)}.vm-calendar-years__year_selected{color:#fff}.vm-calendar-years__year_selected,.vm-calendar-years__year_selected:hover{background-color:var(--color-primary)}.vm-calendar-time-picker{align-items:center;display:flex;flex-direction:column;justify-content:center}.vm-calendar-time-picker-clock{border:1px solid hsla(0,6%,6%,.15);border-radius:50%;box-shadow:1px 2px 12px hsla(0,6%,6%,.08);box-sizing:initial;height:230px;position:relative;width:230px}.vm-calendar-time-picker-clock:after{background-color:var(--color-primary);border-radius:50%;content:"";height:6px;left:50%;position:absolute;top:50%;-webkit-transform:translate(-50%,-50%);transform:translate(-50%,-50%);width:6px}.vm-calendar-time-picker-clock__arrow{background-color:var(--color-primary);height:107px;left:114px;margin-top:8px;opacity:.8;position:absolute;top:0;-webkit-transform-origin:bottom;transform-origin:bottom;transition:-webkit-transform .2s ease-in-out;transition:transform .2s ease-in-out;transition:transform .2s ease-in-out,-webkit-transform .2s ease-in-out;width:2px;z-index:0}.vm-calendar-time-picker-clock__arrow_offset{height:73px;margin-top:42px;z-index:2}.vm-calendar-time-picker-clock__arrow:after{background-color:var(--color-primary);border-radius:50%;content:"";height:30px;left:50%;position:absolute;top:0;-webkit-transform:translateX(-50%);transform:translateX(-50%);width:30px}.vm-calendar-time-picker-clock__time{align-items:flex-start;cursor:pointer;display:flex;height:115px;justify-content:center;left:100px;padding-top:8px;position:absolute;text-align:center;top:0;-webkit-transform-origin:bottom;transform-origin:bottom;width:30px;z-index:1}.vm-calendar-time-picker-clock__time_hide{display:none}.vm-calendar-time-picker-clock__time_offset{height:73px;margin-top:42px;padding:0;z-index:2}.vm-calendar-time-picker-clock__time:hover span{background-color:hsla(0,6%,6%,.1)}.vm-calendar-time-picker-clock__time span{align-items:center;border-radius:50%;display:grid;justify-content:center;min-height:30px;min-width:30px;position:relative;-webkit-transform-origin:center;transform-origin:center;transition:background-color .3s ease}.vm-calendar-time-picker-fields{align-items:center;display:flex;justify-content:space-between;margin-top:16px}.vm-calendar-time-picker-fields span{margin:0 8px}.vm-calendar-time-picker-fields__input{border:1px solid #d8d8d8;border-radius:4px;font-size:14px;height:32px;padding:2px 8px;text-align:center;width:64px}.vm-calendar-time-picker-fields__input:focus{border-color:var(--color-primary)}.vm-time-selector{display:grid;grid-template-columns:repeat(2,230px);padding:16px 0}.vm-time-selector-left{border-right:1px solid hsla(0,6%,6%,.15);display:flex;flex-direction:column;gap:8px;padding:0 16px}.vm-time-selector-left-inputs{align-items:flex-start;display:grid;flex-grow:1;justify-content:stretch}.vm-time-selector-left-inputs__date{grid-gap:8px;align-items:center;border-bottom:1px solid hsla(0,6%,6%,.15);cursor:pointer;display:grid;gap:8px;grid-template-columns:1fr 14px;justify-content:center;margin-bottom:16px;padding-bottom:8px;transition:color .2s ease-in-out,border-bottom-color .3s ease}.vm-time-selector-left-inputs__date:hover{border-bottom-color:var(--color-primary)}.vm-time-selector-left-inputs__date:hover,.vm-time-selector-left-inputs__date:hover svg{color:var(--color-primary)}.vm-time-selector-left-inputs__date label{color:hsla(0,6%,6%,.6);font-size:10px;grid-column:1/3}.vm-time-selector-left-inputs__date svg{color:hsla(0,6%,6%,.6);transition:color .2s ease-in-out}.vm-time-selector-left__controls{grid-gap:8px;display:grid;gap:8px;grid-template-columns:repeat(2,1fr)}.vm-text-field{display:grid;margin:6px 0;position:relative;width:100%}.vm-text-field_textarea:after{content:attr(data-replicated-value) " ";visibility:hidden;white-space:pre-wrap}.vm-text-field:after,.vm-text-field__input{background-color:transparent;border:1px solid hsla(0,6%,6%,.15);font-size:12px;grid-area:1/1/2/2;line-height:18px;overflow:hidden;padding:8px 16px;width:100%}.vm-text-field__error,.vm-text-field__helper-text,.vm-text-field__label{background-color:var(--color-background-block);font-size:10px;left:8px;line-height:10px;padding:0 3px;pointer-events:none;position:absolute;-webkit-user-select:none;user-select:none;z-index:2}.vm-text-field__label{color:hsla(0,6%,6%,.6);top:-5px}.vm-text-field__error{bottom:-5px;color:var(--color-error)}.vm-text-field__helper-text{bottom:-5px;color:hsla(0,6%,6%,.6)}.vm-text-field__input{border-radius:4px;display:block;min-height:34px;overflow:hidden;resize:none;transition:border .2s ease}.vm-text-field__input:focus,.vm-text-field__input:hover{border:1px solid var(--color-primary)}.vm-text-field__input_error,.vm-text-field__input_error:focus,.vm-text-field__input_error:hover{border:1px solid var(--color-error)}.vm-text-field__input_icon-start{padding-left:42px}.vm-text-field__input:disabled{background-color:inherit;color:inherit}.vm-text-field__input:disabled:hover{border-color:hsla(0,6%,6%,.4)}.vm-text-field__icon-end,.vm-text-field__icon-start{align-items:center;color:hsla(0,6%,6%,.6);display:flex;height:100%;justify-content:center;left:8px;max-width:15px;position:absolute;top:auto}.vm-text-field__icon-end svg,.vm-text-field__icon-start svg{height:auto;width:100%}.vm-text-field__icon-end{left:auto;right:8px}.vm-modal{align-items:center;background:hsla(0,6%,6%,.55);bottom:0;display:flex;justify-content:center;left:0;position:fixed;right:0;top:0;z-index:100}.vm-modal-content{background:#fff;border-radius:4px;box-shadow:0 0 24px hsla(0,6%,6%,.07);padding:22px}.vm-modal-content-header{align-items:center;display:grid;grid-template-columns:1fr auto;margin-bottom:22px}.vm-modal-content-header__title{font-size:14px;font-weight:700}.vm-modal-content-header__close{align-items:center;box-sizing:initial;color:#fff;cursor:pointer;display:flex;justify-content:center;padding:10px;width:24px}.vm-modal-content-header__close svg{height:auto;width:100%}.vm-server-configurator{grid-gap:16px;align-items:center;display:grid;gap:16px;width:600px}.vm-server-configurator__footer{align-items:center;display:inline-grid;gap:8px;grid-template-columns:repeat(2,1fr);justify-content:flex-end;margin-left:auto;margin-right:0}.vm-shortcuts{min-width:400px}.vm-shortcuts-section{margin-bottom:24px}.vm-shortcuts-section__title{border-bottom:1px solid hsla(0,6%,6%,.15);font-weight:700;margin-bottom:16px;padding:8px 0}.vm-shortcuts-section-list{grid-gap:16px;display:grid;gap:16px}.vm-shortcuts-section-list-item{grid-gap:8px;align-items:center;display:grid;gap:8px;grid-template-columns:180px 1fr}.vm-shortcuts-section-list-item__key{align-items:center;display:flex;gap:4px}.vm-shortcuts-section-list-item__key code{background-color:#fff;background-repeat:repeat-x;border:1px solid hsla(0,6%,6%,.15);border-radius:4px;color:#110f0f;display:inline-block;font-size:10px;line-height:2;padding:2px 8px 0;text-align:center}.vm-shortcuts-section-list-item__description{font-size:12px}.vm-header{align-items:center;display:flex;gap:48px;justify-content:flex-start;padding:8px 24px}.vm-header_app{padding:8px 0}.vm-header-logo{align-items:center;display:grid;justify-content:center}.vm-header-logo__icon{align-items:center;cursor:pointer;display:flex;margin-bottom:2px;position:relative;width:100%}.vm-header-logo__issue{color:inherit;cursor:pointer;font-size:10px;opacity:.4;text-align:center;text-decoration:underline;transition:opacity .2s;white-space:nowrap}.vm-header-logo__issue:hover{opacity:.8}.vm-header-nav{font-size:10px;font-weight:600}.vm-header__settings{align-items:center;display:flex;flex-grow:1;gap:8px;justify-content:flex-end}.vm-container{display:flex;flex-direction:column;min-height:calc(100vh - var(--scrollbar-height))}.vm-container-body{background-color:var(--color-background-body);flex-grow:1;min-height:100%;padding:24px}.vm-container-body_app{background-color:transparent;padding:8px 0}.uplot,.uplot *,.uplot :after,.uplot :before{box-sizing:border-box}.uplot{font-family: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;line-height:1.5;width:-webkit-min-content;width:min-content}.u-title{font-size:18px;font-weight:700;text-align:center}.u-wrap{position:relative;-webkit-user-select:none;user-select:none}.u-over,.u-under{position:absolute}.u-under{overflow:hidden}.uplot canvas{display:block;height:100%;position:relative;width:100%}.u-axis{position:absolute}.u-legend{margin:auto;text-align:center}.u-inline{display:block}.u-inline *{display:inline-block}.u-inline tr{margin-right:16px}.u-legend th{font-weight:600}.u-legend th>*{display:inline-block;vertical-align:middle}.u-legend .u-marker{background-clip:padding-box!important;height:1em;margin-right:4px;width:1em}.u-inline.u-live th:after{content:":";vertical-align:middle}.u-inline:not(.u-live) .u-value{display:none}.u-series>*{padding:4px}.u-series th{cursor:pointer}.u-legend .u-off>*{opacity:.3}.u-select{background:rgba(0,0,0,.07)}.u-cursor-x,.u-cursor-y,.u-select{pointer-events:none;position:absolute}.u-cursor-x,.u-cursor-y{left:0;top:0;will-change:transform;z-index:100}.u-hz .u-cursor-x,.u-vt .u-cursor-y{border-right:1px dashed #607d8b;height:100%}.u-hz .u-cursor-y,.u-vt .u-cursor-x{border-bottom:1px dashed #607d8b;width:100%}.u-cursor-pt{background-clip:padding-box!important;border:0 solid;border-radius:50%;left:0;pointer-events:none;position:absolute;top:0;will-change:transform;z-index:100}.u-axis.u-off,.u-cursor-pt.u-off,.u-cursor-x.u-off,.u-cursor-y.u-off,.u-select.u-off{display:none}.vm-line-chart{height:500px;pointer-events:auto}.u-tooltip,.vm-line-chart_panning{pointer-events:none}.u-tooltip{grid-gap:16px;word-wrap:break-word;background:rgba(97,97,97,.92);border-radius:8px;color:#fff;display:none;font-family:monospace;font-size:10px;font-weight:400;line-height:1.4;max-width:300px;padding:8px;position:absolute;z-index:100}.u-tooltip-data{align-items:center;display:flex;flex-wrap:wrap;line-height:150%}.u-tooltip-data__value{font-weight:700;padding:4px}.u-tooltip__info{grid-gap:4px;display:grid}.u-tooltip__marker{height:12px;margin-right:8px;width:12px}.vm-legend-item{grid-gap:8px;align-items:start;background-color:var(--color-background-block);cursor:pointer;display:grid;grid-template-columns:auto auto;justify-content:start;padding:8px 48px 8px 8px;transition:.2s ease}.vm-legend-item:hover{background-color:rgba(0,0,0,.1)}.vm-legend-item_hide{opacity:.5;text-decoration:line-through}.vm-legend-item__marker{border-radius:2px;box-sizing:border-box;height:14px;transition:.2s ease;width:14px}.vm-legend-item-info{font-weight:400}.vm-legend-item-info__free-fields{cursor:pointer;padding:3px}.vm-legend-item-info__free-fields:hover{text-decoration:underline}.vm-legend-item-info__free-fields:not(:last-child):after{content:","}.vm-legend{cursor:default;display:flex;flex-wrap:wrap;margin-top:24px;position:relative}.vm-legend-group{margin:0 16px 16px 0;min-width:23%}.vm-legend-group-title{align-items:center;border-bottom:1px solid hsla(0,6%,6%,.15);display:flex;margin-bottom:1px;padding:0 8px 8px}.vm-legend-group-title__count{font-weight:700;margin-right:8px}.vm-graph-view{width:100%}.vm-graph-view_full-width{width:calc(100vw - 96px - var(--scrollbar-width))}.vm-query-editor-autocomplete{max-height:300px;overflow:auto}.vm-additional-settings{align-items:center;display:inline-flex;flex-wrap:wrap;gap:24px;justify-content:flex-start}.vm-additional-settings__input{flex-basis:160px;margin-bottom:-6px}.vm-switch{align-items:center;cursor:pointer;display:flex;justify-content:flex-start}.vm-switch_disabled{cursor:default;opacity:.6}.vm-switch_secondary_active .vm-switch-track{background-color:var(--color-secondary)}.vm-switch_primary_active .vm-switch-track{background-color:var(--color-primary)}.vm-switch_active .vm-switch-track__thumb{left:20px}.vm-switch:hover .vm-switch-track{opacity:.8}.vm-switch-track{align-items:center;background-color:hsla(0,6%,6%,.4);border-radius:17px;display:flex;height:17px;justify-content:flex-start;padding:3px;position:relative;transition:background-color .2s ease,opacity .3s ease-out;width:34px}.vm-switch-track__thumb{background-color:var(--color-background-block);border-radius:50%;left:3px;min-height:11px;min-width:11px;position:absolute;top:auto;-webkit-transform-style:preserve-3d;transform-style:preserve-3d;transition:right .2s ease-out,left .2s ease-out}.vm-switch__label{color:inherit;font-size:inherit;margin-left:8px;transition:color .2s ease;white-space:nowrap}.vm-query-configurator{grid-gap:8px;display:grid;gap:8px}.vm-query-configurator-list{display:grid}.vm-query-configurator-list-row{grid-gap:8px;align-items:center;display:grid;gap:8px;grid-template-columns:1fr auto auto}.vm-query-configurator-list-row_disabled{-webkit-filter:grayscale(100%);filter:grayscale(100%);opacity:.5}.vm-query-configurator-list-row__button{display:grid;min-height:36px;width:36px}.vm-query-configurator-settings{align-items:flex-end;display:flex;gap:24px;justify-content:space-between}.vm-query-configurator-settings__buttons{grid-gap:8px;display:grid;gap:8px;grid-template-columns:repeat(2,auto)}.vm-json-view__copy{display:flex;justify-content:flex-end;position:-webkit-sticky;position:sticky;top:24px;z-index:2}.vm-json-view__code{font-size:12px;line-height:1.4;-webkit-transform:translateY(-32px);transform:translateY(-32px)}.vm-axes-limits{max-width:300px}.vm-axes-limits,.vm-axes-limits-list{grid-gap:16px;align-items:center;display:grid;gap:16px}.vm-axes-limits-list__inputs{grid-gap:8px;display:grid;gap:8px;grid-template-columns:repeat(2,120px)}.vm-graph-settings-popper{grid-gap:16px;display:grid;gap:16px;padding:0 0 16px}.vm-graph-settings-popper__body{grid-gap:8px;display:grid;gap:8px;padding:0 16px}.vm-spinner{align-items:center;-webkit-animation:vm-fade 2s cubic-bezier(.28,.84,.42,1.1);animation:vm-fade 2s cubic-bezier(.28,.84,.42,1.1);background-color:hsla(0,0%,100%,.5);bottom:0;display:flex;flex-direction:column;justify-content:center;left:0;pointer-events:none;position:fixed;right:0;top:0;z-index:99}.vm-spinner__message{color:hsla(0,6%,6%,.9);font-size:14px;line-height:1.3;margin-top:24px;text-align:center;white-space:pre-line}.half-circle-spinner,.half-circle-spinner *{box-sizing:border-box}.half-circle-spinner{border-radius:100%;height:60px;position:relative;width:60px}.half-circle-spinner .circle{border:6px solid transparent;border-radius:100%;content:"";height:100%;position:absolute;width:100%}.half-circle-spinner .circle.circle-1{-webkit-animation:half-circle-spinner-animation 1s infinite;animation:half-circle-spinner-animation 1s infinite;border-top-color:var(--color-primary)}.half-circle-spinner .circle.circle-2{-webkit-animation:half-circle-spinner-animation 1s infinite alternate;animation:half-circle-spinner-animation 1s infinite alternate;border-bottom-color:var(--color-primary)}@-webkit-keyframes half-circle-spinner-animation{0%{-webkit-transform:rotate(0deg);transform:rotate(0deg)}to{-webkit-transform:rotate(1turn);transform:rotate(1turn)}}@keyframes half-circle-spinner-animation{0%{-webkit-transform:rotate(0deg);transform:rotate(0deg)}to{-webkit-transform:rotate(1turn);transform:rotate(1turn)}}@-webkit-keyframes vm-fade{0%{opacity:0}to{opacity:1}}@keyframes vm-fade{0%{opacity:0}to{opacity:1}}.vm-tracings-view{grid-gap:24px;display:grid;gap:24px}.vm-tracings-view-trace-header{align-items:center;border-bottom:1px solid hsla(0,6%,6%,.15);display:flex;justify-content:space-between;padding:8px 8px 8px 24px}.vm-tracings-view-trace-header-title{flex-grow:1;font-size:14px;margin-right:8px}.vm-tracings-view-trace-header-title__query{font-weight:700}.vm-tracings-view-trace__nav{padding:24px 24px 24px 0}.vm-line-progress{grid-gap:8px;align-items:center;color:hsla(0,6%,6%,.6);display:grid;gap:8px;grid-template-columns:1fr auto;justify-content:center}.vm-line-progress-track{background-color:hsla(0,6%,6%,.05);border-radius:4px;height:20px;width:100%}.vm-line-progress-track__thumb{background-color:#1a90ff;border-radius:4px;height:100%}.vm-nested-nav{background-color:rgba(201,227,246,.4);border-radius:4px;margin-left:24px}.vm-nested-nav-header{grid-gap:8px;border-radius:4px;cursor:pointer;display:grid;gap:8px;grid-template-columns:auto 1fr;padding:8px;transition:background-color .2s ease-in-out}.vm-nested-nav-header:hover{background-color:hsla(0,6%,6%,.06)}.vm-nested-nav-header__icon{align-items:center;display:flex;justify-content:center;transition:-webkit-transform .2s ease-in-out;transition:transform .2s ease-in-out;transition:transform .2s ease-in-out,-webkit-transform .2s ease-in-out;width:20px}.vm-nested-nav-header__icon_open{-webkit-transform:rotate(180deg);transform:rotate(180deg)}.vm-nested-nav-header__message,.vm-nested-nav-header__progress{grid-column:2}.vm-nested-nav-header__duration{color:hsla(0,6%,6%,.6);grid-column:2}.vm-json-form{grid-gap:16px;display:grid;gap:16px;grid-template-rows:auto calc(90vh - 150px) auto;max-height:900px;max-width:1000px;width:70vw}.vm-json-form_one-field{grid-template-rows:calc(90vh - 150px) auto}.vm-json-form textarea{height:100%;overflow:auto;width:100%}.vm-json-form-footer{align-items:center;display:flex;gap:8px;justify-content:space-between}.vm-json-form-footer__controls{align-items:center;display:flex;flex-grow:1;gap:8px;justify-content:flex-start}.vm-json-form-footer__controls_right{display:grid;grid-template-columns:repeat(2,90px);justify-content:flex-end}.vm-table-settings-popper{display:grid}.vm-table-settings-popper-list{grid-gap:8px;display:grid;gap:8px;max-height:350px;overflow:auto;padding:16px 16px 24px}.vm-table-settings-popper-list__item{font-size:12px;text-transform:capitalize}.vm-table-settings-popper__footer{align-items:center;display:inline-grid;gap:8px;grid-template-columns:1fr 1fr;justify-content:center;min-width:200px;padding:0 16px 16px}.vm-checkbox{align-items:center;cursor:pointer;display:flex;justify-content:flex-start;-webkit-user-select:none;user-select:none}.vm-checkbox_disabled{cursor:default;opacity:.6}.vm-checkbox_secondary_active .vm-checkbox-track{background-color:var(--color-secondary)}.vm-checkbox_secondary .vm-checkbox-track{border:1px solid var(--color-secondary)}.vm-checkbox_primary_active .vm-checkbox-track{background-color:var(--color-primary)}.vm-checkbox_primary .vm-checkbox-track{border:1px solid var(--color-primary)}.vm-checkbox_active .vm-checkbox-track__thumb{-webkit-transform:scale(1);transform:scale(1)}.vm-checkbox:hover .vm-checkbox-track{opacity:.8}.vm-checkbox-track{align-items:center;background-color:transparent;border-radius:4px;display:flex;height:16px;justify-content:center;padding:2px;position:relative;transition:background-color .2s ease,opacity .3s ease-out;width:16px}.vm-checkbox-track__thumb{align-items:center;color:#fff;display:grid;height:12px;justify-content:center;-webkit-transform:scale(0);transform:scale(0);transition:-webkit-transform .1s ease-in-out;transition:transform .1s ease-in-out;transition:transform .1s ease-in-out,-webkit-transform .1s ease-in-out;width:12px}.vm-checkbox-track__thumb svg{width:100%}.vm-checkbox__label{color:inherit;font-size:inherit;margin-left:8px;transition:color .2s ease;white-space:nowrap}.vm-custom-panel{grid-gap:24px;align-items:flex-start;display:grid;gap:24px;height:100%}.vm-custom-panel-body{position:relative}.vm-custom-panel-body-header{display:flex;font-size:10px;justify-content:space-between;margin:-24px -24px 24px;padding:0 24px;position:relative;z-index:1}.vm-custom-panel-body-header,.vm-predefined-panel-header{align-items:center;border-bottom:1px solid hsla(0,6%,6%,.15)}.vm-predefined-panel-header{grid-gap:8px;display:grid;gap:8px;grid-template-columns:auto 1fr 160px auto;justify-content:flex-start;padding:8px 16px}.vm-predefined-panel-header__description{line-height:1.3;white-space:pre-wrap}.vm-predefined-panel-header__description ol,.vm-predefined-panel-header__description ul{list-style-position:inside}.vm-predefined-panel-header__description a{color:#c9e3f6;text-decoration:underline}.vm-predefined-panel-header__info{align-items:center;color:var(--color-primary);display:flex;justify-content:center;width:18px}.vm-predefined-panel-body{padding:8px 16px}.vm-accordion-header{align-items:center;cursor:pointer;display:grid;font-size:inherit;position:relative}.vm-accordion-header__arrow{align-items:center;display:flex;justify-content:center;position:absolute;right:14px;top:auto;-webkit-transform:rotate(0);transform:rotate(0);transition:-webkit-transform .2s ease-in-out;transition:transform .2s ease-in-out;transition:transform .2s ease-in-out,-webkit-transform .2s ease-in-out}.vm-accordion-header__arrow_open{-webkit-transform:rotate(180deg);transform:rotate(180deg)}.vm-accordion-header__arrow svg{height:auto;width:14px}.accordion-section{overflow:hidden}.vm-predefined-dashboard{background-color:transparent}.vm-predefined-dashboard-header{align-items:center;border-radius:4px;box-shadow:1px 2px 12px hsla(0,6%,6%,.08);display:grid;font-weight:700;grid-template-columns:1fr auto;justify-content:space-between;line-height:14px;overflow:hidden;padding:16px;position:relative;-webkit-transform-style:preserve-3d;transform-style:preserve-3d;transition:box-shadow .2s ease-in-out}.vm-predefined-dashboard-header_open{border-radius:4px 4px 0 0;box-shadow:none}.vm-predefined-dashboard-header__title{font-size:12px}.vm-predefined-dashboard-header__count{font-size:10px;grid-column:2;margin-right:30px}.vm-predefined-dashboard-panels{grid-gap:16px;display:grid;gap:16px;grid-template-columns:repeat(12,1fr);padding:0}.vm-predefined-dashboard-panels-panel{border-radius:8px;overflow:hidden;position:relative}.vm-predefined-dashboard-panels-panel:hover .vm-predefined-dashboard-panels-panel__resizer{-webkit-transform:scale(1);transform:scale(1)}.vm-predefined-dashboard-panels-panel__resizer{bottom:0;cursor:se-resize;height:20px;position:absolute;right:0;-webkit-transform:scale(0);transform:scale(0);transition:-webkit-transform .2s ease-in-out;transition:transform .2s ease-in-out;transition:transform .2s ease-in-out,-webkit-transform .2s ease-in-out;width:20px;z-index:1}.vm-predefined-dashboard-panels-panel__resizer:after{border-bottom:2px solid hsla(0,6%,6%,.2);border-right:2px solid hsla(0,6%,6%,.2);bottom:5px;content:"";height:5px;position:absolute;right:5px;width:5px}.vm-predefined-dashboard-panels-panel__alert{grid-column:span 12}.vm-predefined-panels{grid-gap:16px;align-items:flex-start;display:grid;gap:16px}.vm-predefined-panels-tabs{align-items:center;display:flex;font-size:10px;justify-content:flex-start;overflow:hidden}.vm-predefined-panels-tabs__tab{border-right:1px solid hsla(0,6%,6%,.15);cursor:pointer;padding:16px;text-transform:uppercase;transition:opacity .2s ease-in-out,color .15s ease-in}.vm-predefined-panels-tabs__tab:hover{opacity:1}.vm-predefined-panels__dashboards{grid-gap:16px;display:grid;gap:16px}.vm-cardinality-configurator{grid-gap:8px;display:grid;gap:8px}.vm-cardinality-configurator-controls{align-items:center;display:flex;flex-wrap:wrap;gap:0 24px;justify-content:flex-start}.vm-cardinality-configurator-controls__query{flex-grow:1}.vm-cardinality-configurator-bottom{grid-gap:24px;align-items:flex-end;display:grid;gap:24px;grid-template-columns:1fr auto}.vm-cardinality-configurator-bottom__info{font-size:12px}.u-legend{color:#110f0f;font-family:Lato,sans-serif;font-size:14px}.u-legend .u-thead{display:none}.u-legend .u-series{display:flex;gap:8px}.u-legend .u-series th{display:none}.u-legend .u-series td:nth-child(2):after{content:":";margin-left:8px}.u-legend .u-series .u-value{display:block;padding:0;text-align:left}.vm-metrics-content-header{margin:-24px -24px 24px}.vm-cardinality-panel{grid-gap:24px;align-items:flex-start;display:grid;gap:24px}.vm-top-queries-panel-header{margin:-24px -24px 24px}.vm-top-queries{grid-gap:24px;align-items:flex-start;display:grid;gap:24px}.vm-top-queries-controls{grid-gap:8px;display:grid;gap:8px}.vm-top-queries-controls-bottom,.vm-top-queries-controls__fields{grid-gap:24px;display:grid;gap:24px;grid-template-columns:1fr auto}.vm-top-queries-controls-bottom{align-items:flex-end;justify-content:space-between}.vm-top-queries-controls-bottom__button{align-items:center;display:flex;justify-content:flex-end}.vm-top-queries-panels{grid-gap:24px;display:grid;gap:24px}.vm-trace-page{display:flex;flex-direction:column;min-height:100%;padding:16px}.vm-trace-page-controls{grid-gap:16px;align-items:center;display:grid;gap:16px;grid-template-columns:1fr 1fr;justify-content:center}.vm-trace-page-header{grid-gap:16px;align-items:start;display:grid;gap:16px;grid-template-columns:1fr auto;margin-bottom:24px}.vm-trace-page-header-errors{grid-gap:24px;align-items:flex-start;display:grid;gap:24px;grid-template-columns:1fr;justify-content:stretch}.vm-trace-page-header-errors-item{align-items:center;display:grid;justify-content:stretch;position:relative}.vm-trace-page-header-errors-item__filename{min-height:20px}.vm-trace-page-header-errors-item__close{position:absolute;right:8px;top:auto;z-index:2}.vm-trace-page-preview{align-items:center;display:flex;flex-direction:column;flex-grow:1;justify-content:center}.vm-trace-page-preview__text{font-size:14px;line-height:1.8;margin-bottom:8px;text-align:center;white-space:pre-line}#root,body,html{background-attachment:fixed;background-repeat:no-repeat;color:#110f0f;cursor:default;font-family:Lato,sans-serif;font-size:12px;margin:0;min-height:100%}body{overflow:scroll}*{cursor:inherit;font:inherit}code{font-family:JetBrains Mono,monospace}b{font-weight:700}input[type=number]::-webkit-inner-spin-button,input[type=number]::-webkit-outer-spin-button{-webkit-appearance:none;margin:0}.vm-snackbar{bottom:16px;left:16px;position:fixed;z-index:999}a,abbr,acronym,address,applet,article,aside,audio,big,body,canvas,caption,center,cite,code,del,details,dfn,div,em,embed,fieldset,figcaption,figure,footer,form,h1,h2,h3,h4,h5,h6,header,hgroup,html,iframe,img,ins,kbd,label,legend,li,mark,menu,nav,object,ol,output,p,pre,q,ruby,s,samp,section,small,span,strike,strong,sub,summary,sup,table,tbody,td,tfoot,th,thead,time,tr,tt,u,ul,var,video{border:0;margin:0;padding:0;vertical-align:initial}h1,h2,h3,h4,h5,h6{font-weight:400}article,aside,details,figcaption,figure,footer,header,hgroup,menu,nav,section{display:block}body{line-height:1}q:after,q:before{content:""}table{border-collapse:collapse;border-spacing:0}input::-webkit-input-placeholder{opacity:1;-webkit-transition:opacity .3s ease;transition:opacity .3s ease}input::placeholder{opacity:1;transition:opacity .3s ease}input:focus::-webkit-input-placeholder{opacity:0;-webkit-transition:opacity .3s ease;transition:opacity .3s ease}input:focus::placeholder{opacity:0;transition:opacity .3s ease}*{box-sizing:border-box;outline:none}button{background:none;border:none;border-radius:0;padding:0}strong{letter-spacing:1px}input[type=file]{cursor:pointer;font-size:0;height:100%;left:0;opacity:0;position:absolute;top:0;width:100%}input[type=file]:disabled{cursor:not-allowed}a{color:inherit;text-decoration:inherit}input,textarea{-webkit-text-fill-color:inherit;appearance:none;-webkit-appearance:none}input:disabled,textarea:disabled{opacity:1!important}input:placeholder-shown,textarea:placeholder-shown{width:100%}input:-webkit-autofill,input:-webkit-autofill:active,input:-webkit-autofill:focus,input:-webkit-autofill:hover{-webkit-box-shadow:inset 0 0 0 0 #fff!important;width:100%;z-index:2}.vm-header-button{border:1px solid hsla(0,6%,6%,.2)}.vm-list__item{background-color:transparent;cursor:pointer;padding:12px 16px;transition:background-color .2s ease}.vm-list__item:hover,.vm-list__item_active{background-color:hsla(0,6%,6%,.1)}.vm-popper-header{grid-gap:8px;align-items:center;background-color:#3f51b5;background-color:var(--color-primary);border-radius:4px 4px 0 0;color:#fff;display:grid;gap:8px;grid-template-columns:1fr auto;justify-content:space-between;padding:8px 8px 8px 16px}.vm-popper-header__title{font-weight:700}.vm-block{background-color:#fff;background-color:var(--color-background-block);border-radius:8px;box-shadow:1px 2px 12px hsla(0,6%,6%,.08);padding:24px}.vm-block_empty-padding{padding:0}.vm-section-header{align-items:center;border-bottom:1px solid hsla(0,6%,6%,.15);border-radius:8px 8px 0 0;display:grid;grid-template-columns:1fr auto;justify-content:center;padding:0 24px}.vm-section-header__title{font-size:12px;font-weight:700}.vm-section-header__tabs{align-items:center;display:flex;font-size:10px;justify-content:flex-start}.vm-table{border-collapse:initial;border-spacing:0;margin-top:-24px;width:100%}.vm-table,.vm-table__row{background-color:#fff;background-color:var(--color-background-block)}.vm-table__row{transition:background-color .2s ease}.vm-table__row:hover:not(.vm-table__row_header){background-color:hsla(0,6%,6%,.05)}.vm-table__row_header{position:-webkit-sticky;position:sticky;top:0;z-index:2}.vm-table__row_selected{background-color:rgba(26,144,255,.05)}.vm-table-cell{border-bottom:1px solid hsla(0,6%,6%,.15);height:40px;padding:8px;vertical-align:middle}.vm-table-cell__content{align-items:center;display:flex;justify-content:flex-start}.vm-table-cell_sort{cursor:pointer}.vm-table-cell_sort:hover{background-color:hsla(0,6%,6%,.05)}.vm-table-cell_header{font-weight:700;text-align:left;text-transform:capitalize}.vm-table-cell_gray{color:hsla(0,6%,6%,.4)}.vm-table-cell_right{text-align:right}.vm-table-cell_right .vm-table-cell__content{justify-content:flex-end}.vm-table-cell_no-wrap{white-space:nowrap}.vm-table__sort-icon{align-items:center;display:flex;justify-content:center;margin:0 8px;opacity:.4;transition:opacity .2s ease,-webkit-transform .2s ease-in-out;transition:opacity .2s ease,transform .2s ease-in-out;transition:opacity .2s ease,transform .2s ease-in-out,-webkit-transform .2s ease-in-out;width:15px}.vm-table__sort-icon_active{opacity:1}.vm-table__sort-icon_desc{-webkit-transform:rotate(180deg);transform:rotate(180deg)}:root{--color-primary:#3f51b5;--color-secondary:#e91e63;--color-error:#fd080e;--color-warning:#ff8308;--color-info:#03a9f4;--color-success:#4caf50;--color-primary-text:#fff;--color-secondary-text:#fff;--color-error-text:#fff;--color-warning-text:#fff;--color-info-text:#fff;--color-success-text:#fff;--color-background-body:#fefeff;--color-background-block:#fff} \ No newline at end of file diff --git a/app/vmselect/vmui/static/css/main.c52a0b3d.css b/app/vmselect/vmui/static/css/main.c52a0b3d.css new file mode 100644 index 000000000..95ebc84c8 --- /dev/null +++ b/app/vmselect/vmui/static/css/main.c52a0b3d.css @@ -0,0 +1 @@ +.vm-tabs{gap:16px;height:100%;position:relative;-webkit-user-select:none;user-select:none}.vm-tabs,.vm-tabs-item{align-items:center;display:flex;justify-content:center}.vm-tabs-item{color:inherit;cursor:pointer;font-size:inherit;font-weight:inherit;opacity:.6;padding:16px 8px;text-decoration:none;text-transform:uppercase;transition:opacity .2s}.vm-tabs-item_active{opacity:1}.vm-tabs-item__icon{display:grid;margin-right:8px;width:15px}.vm-tabs-item__icon_single{margin-right:0}.vm-tabs__indicator{border-bottom:2px solid;position:absolute;transition:width .2s ease,left .3s cubic-bezier(.28,.84,.42,1)}.vm-alert{grid-gap:8px;align-items:flex-start;background-color:var(--color-background-block);border-radius:8px;box-shadow:1px 2px 12px hsla(0,6%,6%,.08);color:#110f0f;display:grid;font-size:14px;font-weight:500;gap:8px;grid-template-columns:20px 1fr;line-height:20px;padding:16px;position:relative}.vm-alert:after{border-radius:8px;content:"";height:100%;left:0;opacity:.1;position:absolute;top:0;width:100%;z-index:1}.vm-alert__content,.vm-alert__icon{position:relative;z-index:2}.vm-alert__icon{align-items:center;display:flex;justify-content:center}.vm-alert__content{-webkit-filter:brightness(.6);filter:brightness(.6);white-space:pre-line}.vm-alert_success{color:var(--color-success)}.vm-alert_success:after{background-color:var(--color-success)}.vm-alert_error{color:var(--color-error)}.vm-alert_error:after{background-color:var(--color-error)}.vm-alert_info{color:var(--color-info)}.vm-alert_info:after{background-color:var(--color-info)}.vm-alert_warning{color:var(--color-warning)}.vm-alert_warning:after{background-color:var(--color-warning)}.vm-popper{background-color:var(--color-background-block);border-radius:4px;box-shadow:0 2px 8px 0 hsla(0,6%,6%,.2);opacity:0;pointer-events:none;position:fixed;transition:opacity .1s ease-in-out;z-index:-99}.vm-popper_open{-webkit-animation:scale .15s cubic-bezier(.28,.84,.42,1);animation:scale .15s cubic-bezier(.28,.84,.42,1);opacity:1;pointer-events:auto;z-index:101}.vm-popper_open_slider{-webkit-animation:slidePopper .3s cubic-bezier(.28,.84,.42,1.1);animation:slidePopper .3s cubic-bezier(.28,.84,.42,1.1);-webkit-transform-origin:top center;transform-origin:top center}.vm-button{align-items:center;border-radius:6px;color:#fff;cursor:pointer;display:flex;font-size:10px;font-weight:500;justify-content:center;line-height:15px;min-height:31px;padding:6px 14px;position:relative;text-transform:uppercase;-webkit-transform-style:preserve-3d;transform-style:preserve-3d;-webkit-user-select:none;user-select:none;white-space:nowrap}.vm-button:hover:after{background-color:hsla(0,6%,6%,.05)}.vm-button:after,.vm-button:before{border-radius:6px;content:"";height:100%;left:0;position:absolute;top:0;transition:background-color .2s ease;width:100%}.vm-button:before{-webkit-transform:translateZ(-2px);transform:translateZ(-2px)}.vm-button:after{background-color:transparent;-webkit-transform:translateZ(-1px);transform:translateZ(-1px)}.vm-button span{align-items:center;display:grid;justify-content:center}.vm-button span svg{width:15px}.vm-button__start-icon{margin-right:6px}.vm-button__end-icon{margin-left:6px}.vm-button_disabled{cursor:not-allowed;opacity:.3}.vm-button_icon{padding:6px 8px}.vm-button_icon .vm-button__end-icon,.vm-button_icon .vm-button__start-icon{margin:0}.vm-button_small{min-height:25px;padding:4px 6px}.vm-button_small span svg{width:13px}.vm-button_contained_primary{color:var(--color-primary-text)}.vm-button_contained_primary:before{background-color:var(--color-primary)}.vm-button_contained_primary:hover:after{background-color:hsla(0,6%,6%,.2)}.vm-button_contained_secondary{color:var(--color-secondary-text)}.vm-button_contained_secondary:before{background-color:var(--color-secondary)}.vm-button_contained_secondary:hover:after{background-color:hsla(0,6%,6%,.2)}.vm-button_contained_success{color:var(--color-success-text)}.vm-button_contained_success:before{background-color:var(--color-success)}.vm-button_contained_success:hover:after{background-color:hsla(0,6%,6%,.2)}.vm-button_contained_error{color:var(--color-error-text)}.vm-button_contained_error:before{background-color:var(--color-error)}.vm-button_contained_gray{color:hsla(0,6%,6%,.6)}.vm-button_contained_gray:before{background-color:hsla(0,6%,6%,.6)}.vm-button_text_primary{color:var(--color-primary)}.vm-button_text_secondary{color:var(--color-secondary)}.vm-button_text_success{color:var(--color-success)}.vm-button_text_error{color:var(--color-error)}.vm-button_text_gray{color:hsla(0,6%,6%,.6)}.vm-button_outlined_primary{border:1px solid var(--color-primary);color:var(--color-primary)}.vm-button_outlined_error{border:1px solid var(--color-error);color:var(--color-error)}.vm-button_outlined_secondary{border:1px solid var(--color-secondary);color:var(--color-secondary)}.vm-button_outlined_success{border:1px solid var(--color-success);color:var(--color-success)}.vm-button_outlined_gray{border:1px solid hsla(0,6%,6%,.6);color:hsla(0,6%,6%,.6)}.vm-execution-controls-buttons{border-radius:7px;display:flex;justify-content:space-between;min-width:107px}.vm-execution-controls-buttons__arrow{align-items:center;display:flex;justify-content:center;-webkit-transform:rotate(0);transform:rotate(0);transition:-webkit-transform .2s ease-in-out;transition:transform .2s ease-in-out;transition:transform .2s ease-in-out,-webkit-transform .2s ease-in-out}.vm-execution-controls-buttons__arrow_open{-webkit-transform:rotate(180deg);transform:rotate(180deg)}.vm-execution-controls-list{font-size:12px;max-height:208px;overflow:auto;padding:8px 0;width:124px}.vm-tooltip{-webkit-animation:vm-scale .15s cubic-bezier(.28,.84,.42,1);animation:vm-scale .15s cubic-bezier(.28,.84,.42,1);background-color:rgba(97,97,97,.92);border-radius:4px;box-shadow:0 2px 8px 0 hsla(0,6%,6%,.2);color:#fff;font-size:10px;line-height:150%;opacity:1;padding:3px 8px;pointer-events:auto;position:fixed;transition:opacity .1s ease-in-out;white-space:nowrap;z-index:101}@-webkit-keyframes vm-scale{0%{-webkit-transform:scale(0);transform:scale(0)}to{-webkit-transform:scale(1);transform:scale(1)}}@keyframes vm-scale{0%{-webkit-transform:scale(0);transform:scale(0)}to{-webkit-transform:scale(1);transform:scale(1)}}.vm-time-duration{font-size:12px;max-height:168px;overflow:auto}.vm-calendar{background-color:var(--color-background-block);border-radius:8px;display:grid;font-size:12px;grid-template-rows:auto 1fr auto;padding:16px;-webkit-user-select:none;user-select:none}.vm-calendar__tabs{border-top:1px solid hsla(0,6%,6%,.15);margin:16px -16px -16px}.vm-calendar-header{grid-gap:24px;align-items:center;display:grid;gap:24px;grid-template-columns:1fr auto;justify-content:center;min-height:36px;padding-bottom:16px}.vm-calendar-header-left{grid-gap:8px;align-items:center;cursor:pointer;display:grid;gap:8px;grid-template-columns:auto auto;justify-content:flex-start;transition:opacity .2s ease-in-out}.vm-calendar-header-left:hover{opacity:.8}.vm-calendar-header-left__date{color:#110f0f;font-size:12px;font-weight:700}.vm-calendar-header-left__select-year{align-items:center;display:grid;height:14px;justify-content:center;width:14px}.vm-calendar-header-left__select-year svg{width:100%}.vm-calendar-header-right{grid-gap:8px;align-items:center;display:grid;gap:8px;grid-template-columns:18px 18px;justify-content:center}.vm-calendar-header-right__next,.vm-calendar-header-right__prev{cursor:pointer;transition:opacity .2s ease-in-out}.vm-calendar-header-right__next:hover,.vm-calendar-header-right__prev:hover{opacity:.8}.vm-calendar-header-right__prev{-webkit-transform:rotate(90deg);transform:rotate(90deg)}.vm-calendar-header-right__next{-webkit-transform:rotate(-90deg);transform:rotate(-90deg)}.vm-calendar-body{grid-gap:2px;display:grid;gap:2px;grid-template-columns:repeat(7,32px);grid-template-rows:repeat(6,32px)}.vm-calendar-body,.vm-calendar-body-cell{align-items:center;justify-content:center}.vm-calendar-body-cell{border-radius:50%;display:flex;height:100%;text-align:center}.vm-calendar-body-cell_weekday{color:hsla(0,6%,6%,.6)}.vm-calendar-body-cell_day{cursor:pointer;transition:color .2s ease,background-color .3s ease-in-out}.vm-calendar-body-cell_day:hover{background-color:hsla(0,6%,6%,.05)}.vm-calendar-body-cell_day_empty{pointer-events:none}.vm-calendar-body-cell_day_active{color:#fff}.vm-calendar-body-cell_day_active,.vm-calendar-body-cell_day_active:hover{background-color:var(--color-primary)}.vm-calendar-body-cell_day_today{border:1px solid var(--color-primary)}.vm-calendar-years{grid-gap:8px;display:grid;gap:8px;grid-template-columns:repeat(3,1fr);overflow:auto}.vm-calendar-years__year{align-items:center;border-radius:8px;cursor:pointer;display:flex;justify-content:center;padding:8px 16px;transition:color .2s ease,background-color .3s ease-in-out}.vm-calendar-years__year:hover{background-color:hsla(0,6%,6%,.05)}.vm-calendar-years__year_selected{color:#fff}.vm-calendar-years__year_selected,.vm-calendar-years__year_selected:hover{background-color:var(--color-primary)}.vm-calendar-time-picker{align-items:center;display:flex;flex-direction:column;justify-content:center}.vm-calendar-time-picker-clock{border:1px solid hsla(0,6%,6%,.15);border-radius:50%;box-shadow:1px 2px 12px hsla(0,6%,6%,.08);box-sizing:initial;height:230px;position:relative;width:230px}.vm-calendar-time-picker-clock:after{background-color:var(--color-primary);border-radius:50%;content:"";height:6px;left:50%;position:absolute;top:50%;-webkit-transform:translate(-50%,-50%);transform:translate(-50%,-50%);width:6px}.vm-calendar-time-picker-clock__arrow{background-color:var(--color-primary);height:107px;left:114px;margin-top:8px;opacity:.8;position:absolute;top:0;-webkit-transform-origin:bottom;transform-origin:bottom;transition:-webkit-transform .2s ease-in-out;transition:transform .2s ease-in-out;transition:transform .2s ease-in-out,-webkit-transform .2s ease-in-out;width:2px;z-index:0}.vm-calendar-time-picker-clock__arrow_offset{height:73px;margin-top:42px;z-index:2}.vm-calendar-time-picker-clock__arrow:after{background-color:var(--color-primary);border-radius:50%;content:"";height:30px;left:50%;position:absolute;top:0;-webkit-transform:translateX(-50%);transform:translateX(-50%);width:30px}.vm-calendar-time-picker-clock__time{align-items:flex-start;cursor:pointer;display:flex;height:115px;justify-content:center;left:100px;padding-top:8px;position:absolute;text-align:center;top:0;-webkit-transform-origin:bottom;transform-origin:bottom;width:30px;z-index:1}.vm-calendar-time-picker-clock__time_hide{display:none}.vm-calendar-time-picker-clock__time_offset{height:73px;margin-top:42px;padding:0;z-index:2}.vm-calendar-time-picker-clock__time:hover span{background-color:hsla(0,6%,6%,.1)}.vm-calendar-time-picker-clock__time span{align-items:center;border-radius:50%;display:grid;justify-content:center;min-height:30px;min-width:30px;position:relative;-webkit-transform-origin:center;transform-origin:center;transition:background-color .3s ease}.vm-calendar-time-picker-fields{align-items:center;display:flex;justify-content:space-between;margin-top:16px}.vm-calendar-time-picker-fields span{margin:0 8px}.vm-calendar-time-picker-fields__input{border:1px solid #d8d8d8;border-radius:4px;font-size:14px;height:32px;padding:2px 8px;text-align:center;width:64px}.vm-calendar-time-picker-fields__input:focus{border-color:var(--color-primary)}.vm-time-selector{display:grid;grid-template-columns:repeat(2,230px);padding:16px 0}.vm-time-selector-left{border-right:1px solid hsla(0,6%,6%,.15);display:flex;flex-direction:column;gap:8px;padding:0 16px}.vm-time-selector-left-inputs{align-items:flex-start;display:grid;flex-grow:1;justify-content:stretch}.vm-time-selector-left-inputs__date{grid-gap:8px;align-items:center;border-bottom:1px solid hsla(0,6%,6%,.15);cursor:pointer;display:grid;gap:8px;grid-template-columns:1fr 14px;justify-content:center;margin-bottom:16px;padding-bottom:8px;transition:color .2s ease-in-out,border-bottom-color .3s ease}.vm-time-selector-left-inputs__date:hover{border-bottom-color:var(--color-primary)}.vm-time-selector-left-inputs__date:hover,.vm-time-selector-left-inputs__date:hover svg{color:var(--color-primary)}.vm-time-selector-left-inputs__date label{color:hsla(0,6%,6%,.6);font-size:10px;grid-column:1/3}.vm-time-selector-left-inputs__date svg{color:hsla(0,6%,6%,.6);transition:color .2s ease-in-out}.vm-time-selector-left__controls{grid-gap:8px;display:grid;gap:8px;grid-template-columns:repeat(2,1fr)}.vm-text-field{display:grid;margin:6px 0;position:relative;width:100%}.vm-text-field_textarea:after{content:attr(data-replicated-value) " ";visibility:hidden;white-space:pre-wrap}.vm-text-field:after,.vm-text-field__input{background-color:transparent;border:1px solid hsla(0,6%,6%,.15);font-size:12px;grid-area:1/1/2/2;line-height:18px;overflow:hidden;padding:8px 16px;width:100%}.vm-text-field__error,.vm-text-field__helper-text,.vm-text-field__label{-webkit-line-clamp:2;line-clamp:2;-webkit-box-orient:vertical;background-color:var(--color-background-block);display:-webkit-box;font-size:10px;left:8px;line-height:10px;max-width:calc(100% - 16px);overflow:hidden;padding:0 3px;pointer-events:none;position:absolute;text-overflow:ellipsis;-webkit-user-select:none;user-select:none;z-index:2}.vm-text-field__label{color:hsla(0,6%,6%,.6);top:-5px}.vm-text-field__error{color:var(--color-error);top:calc(100% - 5px)}.vm-text-field__helper-text{bottom:-5px;color:hsla(0,6%,6%,.6)}.vm-text-field__input{border-radius:4px;display:block;min-height:34px;overflow:hidden;resize:none;transition:border .2s ease}.vm-text-field__input:focus,.vm-text-field__input:hover{border:1px solid var(--color-primary)}.vm-text-field__input_error,.vm-text-field__input_error:focus,.vm-text-field__input_error:hover{border:1px solid var(--color-error)}.vm-text-field__input_icon-start{padding-left:42px}.vm-text-field__input:disabled{background-color:inherit;color:inherit}.vm-text-field__input:disabled:hover{border-color:hsla(0,6%,6%,.4)}.vm-text-field__icon-end,.vm-text-field__icon-start{align-items:center;color:hsla(0,6%,6%,.6);display:flex;height:100%;justify-content:center;left:8px;max-width:15px;position:absolute;top:auto}.vm-text-field__icon-end svg,.vm-text-field__icon-start svg{height:auto;width:100%}.vm-text-field__icon-end{left:auto;right:8px}.vm-modal{align-items:center;background:hsla(0,6%,6%,.55);bottom:0;display:flex;justify-content:center;left:0;position:fixed;right:0;top:0;z-index:100}.vm-modal-content{background:#fff;border-radius:4px;box-shadow:0 0 24px hsla(0,6%,6%,.07);padding:22px}.vm-modal-content-header{align-items:center;display:grid;grid-template-columns:1fr auto;margin-bottom:22px}.vm-modal-content-header__title{font-size:14px;font-weight:700}.vm-modal-content-header__close{align-items:center;box-sizing:initial;color:#fff;cursor:pointer;display:flex;justify-content:center;padding:10px;width:24px}.vm-modal-content-header__close svg{height:auto;width:100%}.vm-server-configurator{grid-gap:16px;align-items:center;display:grid;gap:16px;width:600px}.vm-server-configurator__footer{align-items:center;display:inline-grid;gap:8px;grid-template-columns:repeat(2,1fr);justify-content:flex-end;margin-left:auto;margin-right:0}.vm-shortcuts{min-width:400px}.vm-shortcuts-section{margin-bottom:24px}.vm-shortcuts-section__title{border-bottom:1px solid hsla(0,6%,6%,.15);font-weight:700;margin-bottom:16px;padding:8px 0}.vm-shortcuts-section-list{grid-gap:16px;display:grid;gap:16px}.vm-shortcuts-section-list-item{grid-gap:8px;align-items:center;display:grid;gap:8px;grid-template-columns:180px 1fr}.vm-shortcuts-section-list-item__key{align-items:center;display:flex;gap:4px}.vm-shortcuts-section-list-item__key code{background-color:#fff;background-repeat:repeat-x;border:1px solid hsla(0,6%,6%,.15);border-radius:4px;color:#110f0f;display:inline-block;font-size:10px;line-height:2;padding:2px 8px 0;text-align:center}.vm-shortcuts-section-list-item__description{font-size:12px}.vm-header{align-items:center;display:flex;gap:48px;justify-content:flex-start;padding:8px 24px}.vm-header_app{padding:8px 0}.vm-header-logo{align-items:center;display:grid;justify-content:center}.vm-header-logo__icon{align-items:center;cursor:pointer;display:flex;margin-bottom:2px;position:relative;width:100%}.vm-header-logo__issue{color:inherit;cursor:pointer;font-size:10px;opacity:.4;text-align:center;text-decoration:underline;transition:opacity .2s;white-space:nowrap}.vm-header-logo__issue:hover{opacity:.8}.vm-header-nav{font-size:10px;font-weight:600}.vm-header__settings{align-items:center;display:flex;flex-grow:1;gap:8px;justify-content:flex-end}.vm-container{display:flex;flex-direction:column;min-height:calc(100vh - var(--scrollbar-height))}.vm-container-body{background-color:var(--color-background-body);flex-grow:1;min-height:100%;padding:24px}.vm-container-body_app{background-color:transparent;padding:8px 0}.uplot,.uplot *,.uplot :after,.uplot :before{box-sizing:border-box}.uplot{font-family: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;line-height:1.5;width:-webkit-min-content;width:min-content}.u-title{font-size:18px;font-weight:700;text-align:center}.u-wrap{position:relative;-webkit-user-select:none;user-select:none}.u-over,.u-under{position:absolute}.u-under{overflow:hidden}.uplot canvas{display:block;height:100%;position:relative;width:100%}.u-axis{position:absolute}.u-legend{margin:auto;text-align:center}.u-inline{display:block}.u-inline *{display:inline-block}.u-inline tr{margin-right:16px}.u-legend th{font-weight:600}.u-legend th>*{display:inline-block;vertical-align:middle}.u-legend .u-marker{background-clip:padding-box!important;height:1em;margin-right:4px;width:1em}.u-inline.u-live th:after{content:":";vertical-align:middle}.u-inline:not(.u-live) .u-value{display:none}.u-series>*{padding:4px}.u-series th{cursor:pointer}.u-legend .u-off>*{opacity:.3}.u-select{background:rgba(0,0,0,.07)}.u-cursor-x,.u-cursor-y,.u-select{pointer-events:none;position:absolute}.u-cursor-x,.u-cursor-y{left:0;top:0;will-change:transform;z-index:100}.u-hz .u-cursor-x,.u-vt .u-cursor-y{border-right:1px dashed #607d8b;height:100%}.u-hz .u-cursor-y,.u-vt .u-cursor-x{border-bottom:1px dashed #607d8b;width:100%}.u-cursor-pt{background-clip:padding-box!important;border:0 solid;border-radius:50%;left:0;pointer-events:none;position:absolute;top:0;will-change:transform;z-index:100}.u-axis.u-off,.u-cursor-pt.u-off,.u-cursor-x.u-off,.u-cursor-y.u-off,.u-select.u-off{display:none}.vm-line-chart{height:500px;pointer-events:auto}.vm-line-chart_panning{pointer-events:none}.vm-line-chart__u-plot{position:relative}.vm-chart-tooltip{grid-gap:16px;word-wrap:break-word;background:rgba(97,97,97,.92);border-radius:8px;color:#fff;display:grid;font-family:JetBrains Mono,monospace;font-size:10px;font-weight:400;gap:16px;line-height:150%;padding:8px;pointer-events:none;position:absolute;-webkit-user-select:text;user-select:text;width:300px;z-index:98}.vm-chart-tooltip_sticky{background-color:#616161;pointer-events:auto;z-index:99}.vm-chart-tooltip_moved{margin-left:-246.5px;margin-top:-20.5px;position:fixed}.vm-chart-tooltip-header{grid-gap:8px;align-items:center;display:grid;gap:8px;grid-template-columns:1fr 25px 25px;justify-content:center;min-height:25px}.vm-chart-tooltip-header__close{color:#fff}.vm-chart-tooltip-header__drag{color:#fff;cursor:move}.vm-chart-tooltip-data{align-items:center;display:flex;flex-wrap:wrap}.vm-chart-tooltip-data__value{font-weight:700;padding:4px}.vm-chart-tooltip-data__marker{height:12px;margin-right:8px;width:12px}.vm-chart-tooltip-info{grid-gap:4px;display:grid}.vm-legend-item{grid-gap:8px;align-items:start;background-color:var(--color-background-block);cursor:pointer;display:grid;grid-template-columns:auto auto;justify-content:start;padding:8px 48px 8px 8px;transition:.2s ease}.vm-legend-item:hover{background-color:rgba(0,0,0,.1)}.vm-legend-item_hide{opacity:.5;text-decoration:line-through}.vm-legend-item__marker{border-radius:2px;box-sizing:border-box;height:14px;transition:.2s ease;width:14px}.vm-legend-item-info{font-weight:400}.vm-legend-item-info__free-fields{cursor:pointer;padding:3px}.vm-legend-item-info__free-fields:hover{text-decoration:underline}.vm-legend-item-info__free-fields:not(:last-child):after{content:","}.vm-legend{cursor:default;display:flex;flex-wrap:wrap;margin-top:24px;position:relative}.vm-legend-group{margin:0 16px 16px 0;min-width:23%}.vm-legend-group-title{align-items:center;border-bottom:1px solid hsla(0,6%,6%,.15);display:flex;margin-bottom:1px;padding:0 8px 8px}.vm-legend-group-title__count{font-weight:700;margin-right:8px}.vm-graph-view{width:100%}.vm-graph-view_full-width{width:calc(100vw - 96px - var(--scrollbar-width))}.vm-query-editor-autocomplete{max-height:300px;overflow:auto}.vm-additional-settings{align-items:center;display:inline-flex;flex-wrap:wrap;gap:24px;justify-content:flex-start}.vm-additional-settings__input{flex-basis:160px;margin-bottom:-6px}.vm-switch{align-items:center;cursor:pointer;display:flex;justify-content:flex-start}.vm-switch_disabled{cursor:default;opacity:.6}.vm-switch_secondary_active .vm-switch-track{background-color:var(--color-secondary)}.vm-switch_primary_active .vm-switch-track{background-color:var(--color-primary)}.vm-switch_active .vm-switch-track__thumb{left:20px}.vm-switch:hover .vm-switch-track{opacity:.8}.vm-switch-track{align-items:center;background-color:hsla(0,6%,6%,.4);border-radius:17px;display:flex;height:17px;justify-content:flex-start;padding:3px;position:relative;transition:background-color .2s ease,opacity .3s ease-out;width:34px}.vm-switch-track__thumb{background-color:var(--color-background-block);border-radius:50%;left:3px;min-height:11px;min-width:11px;position:absolute;top:auto;-webkit-transform-style:preserve-3d;transform-style:preserve-3d;transition:right .2s ease-out,left .2s ease-out}.vm-switch__label{color:inherit;font-size:inherit;margin-left:8px;transition:color .2s ease;white-space:nowrap}.vm-query-configurator{grid-gap:8px;display:grid;gap:8px}.vm-query-configurator-list{display:grid}.vm-query-configurator-list-row{grid-gap:8px;align-items:center;display:grid;gap:8px;grid-template-columns:1fr auto auto}.vm-query-configurator-list-row_disabled{-webkit-filter:grayscale(100%);filter:grayscale(100%);opacity:.5}.vm-query-configurator-list-row__button{display:grid;min-height:36px;width:36px}.vm-query-configurator-settings{align-items:flex-end;display:flex;gap:24px;justify-content:space-between}.vm-query-configurator-settings__buttons{grid-gap:8px;display:grid;gap:8px;grid-template-columns:repeat(2,auto)}.vm-json-view__copy{display:flex;justify-content:flex-end;position:-webkit-sticky;position:sticky;top:24px;z-index:2}.vm-json-view__code{font-size:12px;line-height:1.4;-webkit-transform:translateY(-32px);transform:translateY(-32px)}.vm-axes-limits{max-width:300px}.vm-axes-limits,.vm-axes-limits-list{grid-gap:16px;align-items:center;display:grid;gap:16px}.vm-axes-limits-list__inputs{grid-gap:8px;display:grid;gap:8px;grid-template-columns:repeat(2,120px)}.vm-graph-settings-popper{grid-gap:16px;display:grid;gap:16px;padding:0 0 16px}.vm-graph-settings-popper__body{grid-gap:8px;display:grid;gap:8px;padding:0 16px}.vm-spinner{align-items:center;-webkit-animation:vm-fade 2s cubic-bezier(.28,.84,.42,1.1);animation:vm-fade 2s cubic-bezier(.28,.84,.42,1.1);background-color:hsla(0,0%,100%,.5);bottom:0;display:flex;flex-direction:column;justify-content:center;left:0;pointer-events:none;position:fixed;right:0;top:0;z-index:99}.vm-spinner__message{color:hsla(0,6%,6%,.9);font-size:14px;line-height:1.3;margin-top:24px;text-align:center;white-space:pre-line}.half-circle-spinner,.half-circle-spinner *{box-sizing:border-box}.half-circle-spinner{border-radius:100%;height:60px;position:relative;width:60px}.half-circle-spinner .circle{border:6px solid transparent;border-radius:100%;content:"";height:100%;position:absolute;width:100%}.half-circle-spinner .circle.circle-1{-webkit-animation:half-circle-spinner-animation 1s infinite;animation:half-circle-spinner-animation 1s infinite;border-top-color:var(--color-primary)}.half-circle-spinner .circle.circle-2{-webkit-animation:half-circle-spinner-animation 1s infinite alternate;animation:half-circle-spinner-animation 1s infinite alternate;border-bottom-color:var(--color-primary)}@-webkit-keyframes half-circle-spinner-animation{0%{-webkit-transform:rotate(0deg);transform:rotate(0deg)}to{-webkit-transform:rotate(1turn);transform:rotate(1turn)}}@keyframes half-circle-spinner-animation{0%{-webkit-transform:rotate(0deg);transform:rotate(0deg)}to{-webkit-transform:rotate(1turn);transform:rotate(1turn)}}@-webkit-keyframes vm-fade{0%{opacity:0}to{opacity:1}}@keyframes vm-fade{0%{opacity:0}to{opacity:1}}.vm-tracings-view{grid-gap:24px;display:grid;gap:24px}.vm-tracings-view-trace-header{align-items:center;border-bottom:1px solid hsla(0,6%,6%,.15);display:flex;justify-content:space-between;padding:8px 8px 8px 24px}.vm-tracings-view-trace-header-title{flex-grow:1;font-size:14px;margin-right:8px}.vm-tracings-view-trace-header-title__query{font-weight:700}.vm-tracings-view-trace__nav{padding:24px 24px 24px 0}.vm-line-progress{grid-gap:8px;align-items:center;color:hsla(0,6%,6%,.6);display:grid;gap:8px;grid-template-columns:1fr auto;justify-content:center}.vm-line-progress-track{background-color:hsla(0,6%,6%,.05);border-radius:4px;height:20px;width:100%}.vm-line-progress-track__thumb{background-color:#1a90ff;border-radius:4px;height:100%}.vm-nested-nav{background-color:rgba(201,227,246,.4);border-radius:4px;margin-left:24px}.vm-nested-nav-header{grid-gap:8px;border-radius:4px;cursor:pointer;display:grid;gap:8px;grid-template-columns:auto 1fr;padding:8px;transition:background-color .2s ease-in-out}.vm-nested-nav-header:hover{background-color:hsla(0,6%,6%,.06)}.vm-nested-nav-header__icon{align-items:center;display:flex;justify-content:center;transition:-webkit-transform .2s ease-in-out;transition:transform .2s ease-in-out;transition:transform .2s ease-in-out,-webkit-transform .2s ease-in-out;width:20px}.vm-nested-nav-header__icon_open{-webkit-transform:rotate(180deg);transform:rotate(180deg)}.vm-nested-nav-header__message,.vm-nested-nav-header__progress{grid-column:2}.vm-nested-nav-header__duration{color:hsla(0,6%,6%,.6);grid-column:2}.vm-json-form{grid-gap:16px;display:grid;gap:16px;grid-template-rows:auto calc(90vh - 150px) auto;max-height:900px;max-width:1000px;width:70vw}.vm-json-form_one-field{grid-template-rows:calc(90vh - 150px) auto}.vm-json-form textarea{height:100%;overflow:auto;width:100%}.vm-json-form-footer{align-items:center;display:flex;gap:8px;justify-content:space-between}.vm-json-form-footer__controls{align-items:center;display:flex;flex-grow:1;gap:8px;justify-content:flex-start}.vm-json-form-footer__controls_right{display:grid;grid-template-columns:repeat(2,90px);justify-content:flex-end}.vm-table-settings-popper{display:grid}.vm-table-settings-popper-list{grid-gap:8px;display:grid;gap:8px;max-height:350px;overflow:auto;padding:16px 16px 24px}.vm-table-settings-popper-list__item{font-size:12px;text-transform:capitalize}.vm-table-settings-popper__footer{align-items:center;display:inline-grid;gap:8px;grid-template-columns:1fr 1fr;justify-content:center;min-width:200px;padding:0 16px 16px}.vm-checkbox{align-items:center;cursor:pointer;display:flex;justify-content:flex-start;-webkit-user-select:none;user-select:none}.vm-checkbox_disabled{cursor:default;opacity:.6}.vm-checkbox_secondary_active .vm-checkbox-track{background-color:var(--color-secondary)}.vm-checkbox_secondary .vm-checkbox-track{border:1px solid var(--color-secondary)}.vm-checkbox_primary_active .vm-checkbox-track{background-color:var(--color-primary)}.vm-checkbox_primary .vm-checkbox-track{border:1px solid var(--color-primary)}.vm-checkbox_active .vm-checkbox-track__thumb{-webkit-transform:scale(1);transform:scale(1)}.vm-checkbox:hover .vm-checkbox-track{opacity:.8}.vm-checkbox-track{align-items:center;background-color:transparent;border-radius:4px;display:flex;height:16px;justify-content:center;padding:2px;position:relative;transition:background-color .2s ease,opacity .3s ease-out;width:16px}.vm-checkbox-track__thumb{align-items:center;color:#fff;display:grid;height:12px;justify-content:center;-webkit-transform:scale(0);transform:scale(0);transition:-webkit-transform .1s ease-in-out;transition:transform .1s ease-in-out;transition:transform .1s ease-in-out,-webkit-transform .1s ease-in-out;width:12px}.vm-checkbox-track__thumb svg{width:100%}.vm-checkbox__label{color:inherit;font-size:inherit;margin-left:8px;transition:color .2s ease;white-space:nowrap}.vm-custom-panel{grid-gap:24px;align-items:flex-start;display:grid;gap:24px;height:100%}.vm-custom-panel-body{position:relative}.vm-custom-panel-body-header{display:flex;font-size:10px;justify-content:space-between;margin:-24px -24px 24px;padding:0 24px;position:relative;z-index:1}.vm-custom-panel-body-header,.vm-predefined-panel-header{align-items:center;border-bottom:1px solid hsla(0,6%,6%,.15)}.vm-predefined-panel-header{grid-gap:8px;display:grid;gap:8px;grid-template-columns:auto 1fr 160px auto;justify-content:flex-start;padding:8px 16px}.vm-predefined-panel-header__description{line-height:1.3;white-space:pre-wrap}.vm-predefined-panel-header__description ol,.vm-predefined-panel-header__description ul{list-style-position:inside}.vm-predefined-panel-header__description a{color:#c9e3f6;text-decoration:underline}.vm-predefined-panel-header__info{align-items:center;color:var(--color-primary);display:flex;justify-content:center;width:18px}.vm-predefined-panel-body{padding:8px 16px}.vm-accordion-header{align-items:center;cursor:pointer;display:grid;font-size:inherit;position:relative}.vm-accordion-header__arrow{align-items:center;display:flex;justify-content:center;position:absolute;right:14px;top:auto;-webkit-transform:rotate(0);transform:rotate(0);transition:-webkit-transform .2s ease-in-out;transition:transform .2s ease-in-out;transition:transform .2s ease-in-out,-webkit-transform .2s ease-in-out}.vm-accordion-header__arrow_open{-webkit-transform:rotate(180deg);transform:rotate(180deg)}.vm-accordion-header__arrow svg{height:auto;width:14px}.accordion-section{overflow:hidden}.vm-predefined-dashboard{background-color:transparent}.vm-predefined-dashboard-header{align-items:center;border-radius:4px;box-shadow:1px 2px 12px hsla(0,6%,6%,.08);display:grid;font-weight:700;grid-template-columns:1fr auto;justify-content:space-between;line-height:14px;overflow:hidden;padding:16px;position:relative;-webkit-transform-style:preserve-3d;transform-style:preserve-3d;transition:box-shadow .2s ease-in-out}.vm-predefined-dashboard-header_open{border-radius:4px 4px 0 0;box-shadow:none}.vm-predefined-dashboard-header__title{font-size:12px}.vm-predefined-dashboard-header__count{font-size:10px;grid-column:2;margin-right:30px}.vm-predefined-dashboard-panels{grid-gap:16px;display:grid;gap:16px;grid-template-columns:repeat(12,1fr);padding:0}.vm-predefined-dashboard-panels-panel{border-radius:8px;overflow:hidden;position:relative}.vm-predefined-dashboard-panels-panel:hover .vm-predefined-dashboard-panels-panel__resizer{-webkit-transform:scale(1);transform:scale(1)}.vm-predefined-dashboard-panels-panel__resizer{bottom:0;cursor:se-resize;height:20px;position:absolute;right:0;-webkit-transform:scale(0);transform:scale(0);transition:-webkit-transform .2s ease-in-out;transition:transform .2s ease-in-out;transition:transform .2s ease-in-out,-webkit-transform .2s ease-in-out;width:20px;z-index:1}.vm-predefined-dashboard-panels-panel__resizer:after{border-bottom:2px solid hsla(0,6%,6%,.2);border-right:2px solid hsla(0,6%,6%,.2);bottom:5px;content:"";height:5px;position:absolute;right:5px;width:5px}.vm-predefined-dashboard-panels-panel__alert{grid-column:span 12}.vm-predefined-panels{grid-gap:16px;align-items:flex-start;display:grid;gap:16px}.vm-predefined-panels-tabs{align-items:center;display:flex;font-size:10px;justify-content:flex-start;overflow:hidden}.vm-predefined-panels-tabs__tab{border-right:1px solid hsla(0,6%,6%,.15);cursor:pointer;padding:16px;text-transform:uppercase;transition:opacity .2s ease-in-out,color .15s ease-in}.vm-predefined-panels-tabs__tab:hover{opacity:1}.vm-predefined-panels__dashboards{grid-gap:16px;display:grid;gap:16px}.vm-cardinality-configurator{grid-gap:8px;display:grid;gap:8px}.vm-cardinality-configurator-controls{align-items:center;display:flex;flex-wrap:wrap;gap:0 24px;justify-content:flex-start}.vm-cardinality-configurator-controls__query{flex-grow:1}.vm-cardinality-configurator-bottom{grid-gap:24px;align-items:flex-end;display:grid;gap:24px;grid-template-columns:1fr auto}.vm-cardinality-configurator-bottom__info{font-size:12px}.u-legend{color:#110f0f;font-family:Lato,sans-serif;font-size:14px}.u-legend .u-thead{display:none}.u-legend .u-series{display:flex;gap:8px}.u-legend .u-series th{display:none}.u-legend .u-series td:nth-child(2):after{content:":";margin-left:8px}.u-legend .u-series .u-value{display:block;padding:0;text-align:left}.vm-metrics-content-header{margin:-24px -24px 24px}.vm-cardinality-panel{grid-gap:24px;align-items:flex-start;display:grid;gap:24px}.vm-top-queries-panel-header{margin:-24px -24px 24px}.vm-top-queries{grid-gap:24px;align-items:flex-start;display:grid;gap:24px}.vm-top-queries-controls{grid-gap:8px;display:grid;gap:8px}.vm-top-queries-controls-bottom,.vm-top-queries-controls__fields{grid-gap:24px;display:grid;gap:24px;grid-template-columns:1fr auto}.vm-top-queries-controls-bottom{align-items:flex-end;justify-content:space-between}.vm-top-queries-controls-bottom__button{align-items:center;display:flex;justify-content:flex-end}.vm-top-queries-panels{grid-gap:24px;display:grid;gap:24px}.vm-trace-page{display:flex;flex-direction:column;min-height:100%;padding:16px}.vm-trace-page-controls{grid-gap:16px;align-items:center;display:grid;gap:16px;grid-template-columns:1fr 1fr;justify-content:center}.vm-trace-page-header{grid-gap:16px;align-items:start;display:grid;gap:16px;grid-template-columns:1fr auto;margin-bottom:24px}.vm-trace-page-header-errors{grid-gap:24px;align-items:flex-start;display:grid;gap:24px;grid-template-columns:1fr;justify-content:stretch}.vm-trace-page-header-errors-item{align-items:center;display:grid;justify-content:stretch;position:relative}.vm-trace-page-header-errors-item__filename{min-height:20px}.vm-trace-page-header-errors-item__close{position:absolute;right:8px;top:auto;z-index:2}.vm-trace-page-preview{align-items:center;display:flex;flex-direction:column;flex-grow:1;justify-content:center}.vm-trace-page-preview__text{font-size:14px;line-height:1.8;margin-bottom:8px;text-align:center;white-space:pre-line}#root,body,html{background-attachment:fixed;background-repeat:no-repeat;color:#110f0f;cursor:default;font-family:Lato,sans-serif;font-size:12px;margin:0;min-height:100%}body{overflow:scroll}*{cursor:inherit;font:inherit}code{font-family:JetBrains Mono,monospace}b{font-weight:700}input,textarea{cursor:text}input[type=number]::-webkit-inner-spin-button,input[type=number]::-webkit-outer-spin-button{-webkit-appearance:none;margin:0}.vm-snackbar{bottom:16px;left:16px;position:fixed;z-index:999}a,abbr,acronym,address,applet,article,aside,audio,big,body,canvas,caption,center,cite,code,del,details,dfn,div,em,embed,fieldset,figcaption,figure,footer,form,h1,h2,h3,h4,h5,h6,header,hgroup,html,iframe,img,ins,kbd,label,legend,li,mark,menu,nav,object,ol,output,p,pre,q,ruby,s,samp,section,small,span,strike,strong,sub,summary,sup,table,tbody,td,tfoot,th,thead,time,tr,tt,u,ul,var,video{border:0;margin:0;padding:0;vertical-align:initial}h1,h2,h3,h4,h5,h6{font-weight:400}article,aside,details,figcaption,figure,footer,header,hgroup,menu,nav,section{display:block}body{line-height:1}q:after,q:before{content:""}table{border-collapse:collapse;border-spacing:0}input::-webkit-input-placeholder{opacity:1;-webkit-transition:opacity .3s ease;transition:opacity .3s ease}input::placeholder{opacity:1;transition:opacity .3s ease}input:focus::-webkit-input-placeholder{opacity:0;-webkit-transition:opacity .3s ease;transition:opacity .3s ease}input:focus::placeholder{opacity:0;transition:opacity .3s ease}*{box-sizing:border-box;outline:none}button{background:none;border:none;border-radius:0;padding:0}strong{letter-spacing:1px}input[type=file]{cursor:pointer;font-size:0;height:100%;left:0;opacity:0;position:absolute;top:0;width:100%}input[type=file]:disabled{cursor:not-allowed}a{color:inherit;text-decoration:inherit}input,textarea{-webkit-text-fill-color:inherit;appearance:none;-webkit-appearance:none}input:disabled,textarea:disabled{opacity:1!important}input:placeholder-shown,textarea:placeholder-shown{width:100%}input:-webkit-autofill,input:-webkit-autofill:active,input:-webkit-autofill:focus,input:-webkit-autofill:hover{-webkit-box-shadow:inset 0 0 0 0 #fff!important;width:100%;z-index:2}.vm-header-button{border:1px solid hsla(0,6%,6%,.2)}.vm-list__item{background-color:transparent;cursor:pointer;padding:12px 16px;transition:background-color .2s ease}.vm-list__item:hover,.vm-list__item_active{background-color:hsla(0,6%,6%,.1)}.vm-popper-header{grid-gap:8px;align-items:center;background-color:#3f51b5;background-color:var(--color-primary);border-radius:4px 4px 0 0;color:#fff;display:grid;gap:8px;grid-template-columns:1fr auto;justify-content:space-between;padding:8px 8px 8px 16px}.vm-popper-header__title{font-weight:700}.vm-block{background-color:#fff;background-color:var(--color-background-block);border-radius:8px;box-shadow:1px 2px 12px hsla(0,6%,6%,.08);padding:24px}.vm-block_empty-padding{padding:0}.vm-section-header{align-items:center;border-bottom:1px solid hsla(0,6%,6%,.15);border-radius:8px 8px 0 0;display:grid;grid-template-columns:1fr auto;justify-content:center;padding:0 24px}.vm-section-header__title{font-size:12px;font-weight:700}.vm-section-header__tabs{align-items:center;display:flex;font-size:10px;justify-content:flex-start}.vm-table{border-collapse:initial;border-spacing:0;margin-top:-24px;width:100%}.vm-table,.vm-table__row{background-color:#fff;background-color:var(--color-background-block)}.vm-table__row{transition:background-color .2s ease}.vm-table__row:hover:not(.vm-table__row_header){background-color:hsla(0,6%,6%,.05)}.vm-table__row_header{position:-webkit-sticky;position:sticky;top:0;z-index:2}.vm-table__row_selected{background-color:rgba(26,144,255,.05)}.vm-table-cell{border-bottom:1px solid hsla(0,6%,6%,.15);height:40px;padding:8px;vertical-align:middle}.vm-table-cell__content{align-items:center;display:flex;justify-content:flex-start}.vm-table-cell_sort{cursor:pointer}.vm-table-cell_sort:hover{background-color:hsla(0,6%,6%,.05)}.vm-table-cell_header{font-weight:700;text-align:left;text-transform:capitalize}.vm-table-cell_gray{color:hsla(0,6%,6%,.4)}.vm-table-cell_right{text-align:right}.vm-table-cell_right .vm-table-cell__content{justify-content:flex-end}.vm-table-cell_no-wrap{white-space:nowrap}.vm-table__sort-icon{align-items:center;display:flex;justify-content:center;margin:0 8px;opacity:.4;transition:opacity .2s ease,-webkit-transform .2s ease-in-out;transition:opacity .2s ease,transform .2s ease-in-out;transition:opacity .2s ease,transform .2s ease-in-out,-webkit-transform .2s ease-in-out;width:15px}.vm-table__sort-icon_active{opacity:1}.vm-table__sort-icon_desc{-webkit-transform:rotate(180deg);transform:rotate(180deg)}:root{--color-primary:#3f51b5;--color-secondary:#e91e63;--color-error:#fd080e;--color-warning:#ff8308;--color-info:#03a9f4;--color-success:#4caf50;--color-primary-text:#fff;--color-secondary-text:#fff;--color-error-text:#fff;--color-warning-text:#fff;--color-info-text:#fff;--color-success-text:#fff;--color-background-body:#fefeff;--color-background-block:#fff} \ No newline at end of file diff --git a/app/vmselect/vmui/static/js/main.c86c7c69.js b/app/vmselect/vmui/static/js/main.c86c7c69.js new file mode 100644 index 000000000..031556493 --- /dev/null +++ b/app/vmselect/vmui/static/js/main.c86c7c69.js @@ -0,0 +1,2 @@ +/*! For license information please see main.c86c7c69.js.LICENSE.txt */ +!function(){var e={680:function(e,t,n){"use strict";var r=n(476),i=n(962),o=i(r("String.prototype.indexOf"));e.exports=function(e,t){var n=r(e,!!t);return"function"===typeof n&&o(e,".prototype.")>-1?i(n):n}},962:function(e,t,n){"use strict";var r=n(199),i=n(476),o=i("%Function.prototype.apply%"),a=i("%Function.prototype.call%"),u=i("%Reflect.apply%",!0)||r.call(a,o),l=i("%Object.getOwnPropertyDescriptor%",!0),c=i("%Object.defineProperty%",!0),s=i("%Math.max%");if(c)try{c({},"a",{value:1})}catch(d){c=null}e.exports=function(e){var t=u(r,a,arguments);if(l&&c){var n=l(t,"length");n.configurable&&c(t,"length",{value:1+s(0,e.length-(arguments.length-1))})}return t};var f=function(){return u(r,o,arguments)};c?c(e.exports,"apply",{value:f}):e.exports.apply=f},123:function(e,t){var n;!function(){"use strict";var r={}.hasOwnProperty;function i(){for(var e=[],t=0;t=t?e:""+Array(t+1-r.length).join(n)+e},g={s:y,z:function(e){var t=-e.utcOffset(),n=Math.abs(t),r=Math.floor(n/60),i=n%60;return(t<=0?"+":"-")+y(r,2,"0")+":"+y(i,2,"0")},m:function e(t,n){if(t.date()1)return e(a[0])}else{var u=t.name;b[u]=t,i=u}return!r&&i&&(_=i),i||!r&&_},x=function(e,t){if(D(e))return e.clone();var n="object"==typeof t?t:{};return n.date=e,n.args=arguments,new C(n)},k=g;k.l=w,k.i=D,k.w=function(e,t){return x(e,{locale:t.$L,utc:t.$u,x:t.$x,$offset:t.$offset})};var C=function(){function m(e){this.$L=w(e.locale,null,!0),this.parse(e)}var y=m.prototype;return y.parse=function(e){this.$d=function(e){var t=e.date,n=e.utc;if(null===t)return new Date(NaN);if(k.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 i=r[2]-1||0,o=(r[7]||"0").substring(0,3);return n?new Date(Date.UTC(r[1],i,r[3]||1,r[4]||0,r[5]||0,r[6]||0,o)):new Date(r[1],i,r[3]||1,r[4]||0,r[5]||0,r[6]||0,o)}}return new Date(t)}(e),this.$x=e.x||{},this.init()},y.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()},y.$utils=function(){return k},y.isValid=function(){return!(this.$d.toString()===h)},y.isSame=function(e,t){var n=x(e);return this.startOf(t)<=n&&n<=this.endOf(t)},y.isAfter=function(e,t){return x(e)1&&"boolean"!==typeof t)throw new a('"allowMissing" argument must be a boolean');if(null===k(/^%?[^%]*%?$/,e))throw new i("`%` may not be present anywhere but at the beginning and end of the intrinsic name");var n=S(e),r=n.length>0?n[0]:"",o=A("%"+r+"%",t),u=o.name,c=o.value,s=!1,f=o.alias;f&&(r=f[0],D(n,b([0,1],f)));for(var d=1,h=!0;d=n.length){var g=l(c,p);c=(h=!!g)&&"get"in g&&!("originalValue"in g.get)?g.get:c[p]}else h=_(c,p),c=c[p];h&&!s&&(v[u]=c)}}return c}},520:function(e,t,n){"use strict";var r="undefined"!==typeof Symbol&&Symbol,i=n(541);e.exports=function(){return"function"===typeof r&&("function"===typeof Symbol&&("symbol"===typeof r("foo")&&("symbol"===typeof Symbol("bar")&&i())))}},541:function(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 i=Object.getOwnPropertyDescriptor(e,t);if(42!==i.value||!0!==i.enumerable)return!1}return!0}},838:function(e,t,n){"use strict";var r=n(199);e.exports=r.call(Function.call,Object.prototype.hasOwnProperty)},936:function(e,t,n){var r=/^\s+|\s+$/g,i=/^[-+]0x[0-9a-f]+$/i,o=/^0b[01]+$/i,a=/^0o[0-7]+$/i,u=parseInt,l="object"==typeof n.g&&n.g&&n.g.Object===Object&&n.g,c="object"==typeof self&&self&&self.Object===Object&&self,s=l||c||Function("return this")(),f=Object.prototype.toString,d=Math.max,h=Math.min,p=function(){return s.Date.now()};function v(e){var t=typeof e;return!!e&&("object"==t||"function"==t)}function m(e){if("number"==typeof e)return e;if(function(e){return"symbol"==typeof e||function(e){return!!e&&"object"==typeof e}(e)&&"[object Symbol]"==f.call(e)}(e))return NaN;if(v(e)){var t="function"==typeof e.valueOf?e.valueOf():e;e=v(t)?t+"":t}if("string"!=typeof e)return 0===e?e:+e;e=e.replace(r,"");var n=o.test(e);return n||a.test(e)?u(e.slice(2),n?2:8):i.test(e)?NaN:+e}e.exports=function(e,t,n){var r,i,o,a,u,l,c=0,s=!1,f=!1,y=!0;if("function"!=typeof e)throw new TypeError("Expected a function");function g(t){var n=r,o=i;return r=i=void 0,c=t,a=e.apply(o,n)}function _(e){return c=e,u=setTimeout(D,t),s?g(e):a}function b(e){var n=e-l;return void 0===l||n>=t||n<0||f&&e-c>=o}function D(){var e=p();if(b(e))return w(e);u=setTimeout(D,function(e){var n=t-(e-l);return f?h(n,o-(e-c)):n}(e))}function w(e){return u=void 0,y&&r?g(e):(r=i=void 0,a)}function x(){var e=p(),n=b(e);if(r=arguments,i=this,l=e,n){if(void 0===u)return _(l);if(f)return u=setTimeout(D,t),g(l)}return void 0===u&&(u=setTimeout(D,t)),a}return t=m(t)||0,v(n)&&(s=!!n.leading,o=(f="maxWait"in n)?d(m(n.maxWait)||0,t):o,y="trailing"in n?!!n.trailing:y),x.cancel=function(){void 0!==u&&clearTimeout(u),c=0,r=l=i=u=void 0},x.flush=function(){return void 0===u?a:w(p())},x}},7:function(e,t,n){var r="__lodash_hash_undefined__",i="[object Function]",o="[object GeneratorFunction]",a=/\.|\[(?:[^[\]]*|(["'])(?:(?!\1)[^\\]|\\.)*?\1)\]/,u=/^\w*$/,l=/^\./,c=/[^.[\]]+|\[(?:(-?\d+(?:\.\d+)?)|(["'])((?:(?!\2)[^\\]|\\.)*?)\2)\]|(?=(?:\.|\[\])(?:\.|\[\]|$))/g,s=/\\(\\)?/g,f=/^\[object .+?Constructor\]$/,d="object"==typeof n.g&&n.g&&n.g.Object===Object&&n.g,h="object"==typeof self&&self&&self.Object===Object&&self,p=d||h||Function("return this")();var v=Array.prototype,m=Function.prototype,y=Object.prototype,g=p["__core-js_shared__"],_=function(){var e=/[^.]+$/.exec(g&&g.keys&&g.keys.IE_PROTO||"");return e?"Symbol(src)_1."+e:""}(),b=m.toString,D=y.hasOwnProperty,w=y.toString,x=RegExp("^"+b.call(D).replace(/[\\^$.*+?()[\]{}|]/g,"\\$&").replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g,"$1.*?")+"$"),k=p.Symbol,C=v.splice,E=$(p,"Map"),S=$(Object,"create"),A=k?k.prototype:void 0,F=A?A.toString:void 0;function N(e){var t=-1,n=e?e.length:0;for(this.clear();++t-1},O.prototype.set=function(e,t){var n=this.__data__,r=B(n,e);return r<0?n.push([e,t]):n[r][1]=t,this},T.prototype.clear=function(){this.__data__={hash:new N,map:new(E||O),string:new N}},T.prototype.delete=function(e){return P(this,e).delete(e)},T.prototype.get=function(e){return P(this,e).get(e)},T.prototype.has=function(e){return P(this,e).has(e)},T.prototype.set=function(e,t){return P(this,e).set(e,t),this};var I=j((function(e){var t;e=null==(t=e)?"":function(e){if("string"==typeof e)return e;if(H(e))return F?F.call(e):"";var t=e+"";return"0"==t&&1/e==-1/0?"-0":t}(t);var n=[];return l.test(e)&&n.push(""),e.replace(c,(function(e,t,r,i){n.push(r?i.replace(s,"$1"):t||e)})),n}));function R(e){if("string"==typeof e||H(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 n(){var r=arguments,i=t?t.apply(this,r):r[0],o=n.cache;if(o.has(i))return o.get(i);var a=e.apply(this,r);return n.cache=o.set(i,a),a};return n.cache=new(j.Cache||T),n}j.Cache=T;var z=Array.isArray;function U(e){var t=typeof e;return!!e&&("object"==t||"function"==t)}function H(e){return"symbol"==typeof e||function(e){return!!e&&"object"==typeof e}(e)&&"[object Symbol]"==w.call(e)}e.exports=function(e,t,n){var r=null==e?void 0:M(e,t);return void 0===r?n:r}},61:function(e,t,n){var r="Expected a function",i=/^\s+|\s+$/g,o=/^[-+]0x[0-9a-f]+$/i,a=/^0b[01]+$/i,u=/^0o[0-7]+$/i,l=parseInt,c="object"==typeof n.g&&n.g&&n.g.Object===Object&&n.g,s="object"==typeof self&&self&&self.Object===Object&&self,f=c||s||Function("return this")(),d=Object.prototype.toString,h=Math.max,p=Math.min,v=function(){return f.Date.now()};function m(e,t,n){var i,o,a,u,l,c,s=0,f=!1,d=!1,m=!0;if("function"!=typeof e)throw new TypeError(r);function _(t){var n=i,r=o;return i=o=void 0,s=t,u=e.apply(r,n)}function b(e){return s=e,l=setTimeout(w,t),f?_(e):u}function D(e){var n=e-c;return void 0===c||n>=t||n<0||d&&e-s>=a}function w(){var e=v();if(D(e))return x(e);l=setTimeout(w,function(e){var n=t-(e-c);return d?p(n,a-(e-s)):n}(e))}function x(e){return l=void 0,m&&i?_(e):(i=o=void 0,u)}function k(){var e=v(),n=D(e);if(i=arguments,o=this,c=e,n){if(void 0===l)return b(c);if(d)return l=setTimeout(w,t),_(c)}return void 0===l&&(l=setTimeout(w,t)),u}return t=g(t)||0,y(n)&&(f=!!n.leading,a=(d="maxWait"in n)?h(g(n.maxWait)||0,t):a,m="trailing"in n?!!n.trailing:m),k.cancel=function(){void 0!==l&&clearTimeout(l),s=0,i=c=o=l=void 0},k.flush=function(){return void 0===l?u:x(v())},k}function y(e){var t=typeof e;return!!e&&("object"==t||"function"==t)}function g(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(y(e)){var t="function"==typeof e.valueOf?e.valueOf():e;e=y(t)?t+"":t}if("string"!=typeof e)return 0===e?e:+e;e=e.replace(i,"");var n=a.test(e);return n||u.test(e)?l(e.slice(2),n?2:8):o.test(e)?NaN:+e}e.exports=function(e,t,n){var i=!0,o=!0;if("function"!=typeof e)throw new TypeError(r);return y(n)&&(i="leading"in n?!!n.leading:i,o="trailing"in n?!!n.trailing:o),m(e,t,{leading:i,maxWait:t,trailing:o})}},154:function(e,t,n){var r="function"===typeof Map&&Map.prototype,i=Object.getOwnPropertyDescriptor&&r?Object.getOwnPropertyDescriptor(Map.prototype,"size"):null,o=r&&i&&"function"===typeof i.get?i.get:null,a=r&&Map.prototype.forEach,u="function"===typeof Set&&Set.prototype,l=Object.getOwnPropertyDescriptor&&u?Object.getOwnPropertyDescriptor(Set.prototype,"size"):null,c=u&&l&&"function"===typeof l.get?l.get:null,s=u&&Set.prototype.forEach,f="function"===typeof WeakMap&&WeakMap.prototype?WeakMap.prototype.has:null,d="function"===typeof WeakSet&&WeakSet.prototype?WeakSet.prototype.has:null,h="function"===typeof WeakRef&&WeakRef.prototype?WeakRef.prototype.deref:null,p=Boolean.prototype.valueOf,v=Object.prototype.toString,m=Function.prototype.toString,y=String.prototype.match,g=String.prototype.slice,_=String.prototype.replace,b=String.prototype.toUpperCase,D=String.prototype.toLowerCase,w=RegExp.prototype.test,x=Array.prototype.concat,k=Array.prototype.join,C=Array.prototype.slice,E=Math.floor,S="function"===typeof BigInt?BigInt.prototype.valueOf:null,A=Object.getOwnPropertySymbols,F="function"===typeof Symbol&&"symbol"===typeof Symbol.iterator?Symbol.prototype.toString:null,N="function"===typeof Symbol&&"object"===typeof Symbol.iterator,O="function"===typeof Symbol&&Symbol.toStringTag&&(typeof Symbol.toStringTag===N||"symbol")?Symbol.toStringTag:null,T=Object.prototype.propertyIsEnumerable,B=("function"===typeof Reflect?Reflect.getPrototypeOf:Object.getPrototypeOf)||([].__proto__===Array.prototype?function(e){return e.__proto__}:null);function M(e,t){if(e===1/0||e===-1/0||e!==e||e&&e>-1e3&&e<1e3||w.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 i=String(r),o=g.call(t,i.length+1);return _.call(i,n,"$&_")+"."+_.call(_.call(o,/([0-9]{3})/g,"$&_"),/_$/,"")}}return _.call(t,n,"$&_")}var L=n(654),P=L.custom,$=U(P)?P:null;function I(e,t,n){var r="double"===(n.quoteStyle||t)?'"':"'";return r+e+r}function R(e){return _.call(String(e),/"/g,""")}function j(e){return"[object Array]"===Y(e)&&(!O||!("object"===typeof e&&O in e))}function z(e){return"[object RegExp]"===Y(e)&&(!O||!("object"===typeof e&&O in e))}function U(e){if(N)return e&&"object"===typeof e&&e instanceof Symbol;if("symbol"===typeof e)return!0;if(!e||"object"!==typeof e||!F)return!1;try{return F.call(e),!0}catch(t){}return!1}e.exports=function e(t,n,r,i){var u=n||{};if(V(u,"quoteStyle")&&"single"!==u.quoteStyle&&"double"!==u.quoteStyle)throw new TypeError('option "quoteStyle" must be "single" or "double"');if(V(u,"maxStringLength")&&("number"===typeof u.maxStringLength?u.maxStringLength<0&&u.maxStringLength!==1/0:null!==u.maxStringLength))throw new TypeError('option "maxStringLength", if provided, must be a positive integer, Infinity, or `null`');var l=!V(u,"customInspect")||u.customInspect;if("boolean"!==typeof l&&"symbol"!==l)throw new TypeError("option \"customInspect\", if provided, must be `true`, `false`, or `'symbol'`");if(V(u,"indent")&&null!==u.indent&&"\t"!==u.indent&&!(parseInt(u.indent,10)===u.indent&&u.indent>0))throw new TypeError('option "indent" must be "\\t", an integer > 0, or `null`');if(V(u,"numericSeparator")&&"boolean"!==typeof u.numericSeparator)throw new TypeError('option "numericSeparator", if provided, must be `true` or `false`');var v=u.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,u);if("number"===typeof t){if(0===t)return 1/0/t>0?"0":"-0";var b=String(t);return v?M(t,b):b}if("bigint"===typeof t){var w=String(t)+"n";return v?M(t,w):w}var E="undefined"===typeof u.depth?5:u.depth;if("undefined"===typeof r&&(r=0),r>=E&&E>0&&"object"===typeof t)return j(t)?"[Array]":"[Object]";var A=function(e,t){var n;if("\t"===e.indent)n="\t";else{if(!("number"===typeof e.indent&&e.indent>0))return null;n=k.call(Array(e.indent+1)," ")}return{base:n,prev:k.call(Array(t+1),n)}}(u,r);if("undefined"===typeof i)i=[];else if(q(i,t)>=0)return"[Circular]";function P(t,n,o){if(n&&(i=C.call(i)).push(n),o){var a={depth:u.depth};return V(u,"quoteStyle")&&(a.quoteStyle=u.quoteStyle),e(t,a,r+1,i)}return e(t,u,r+1,i)}if("function"===typeof t&&!z(t)){var H=function(e){if(e.name)return e.name;var t=y.call(m.call(e),/^function\s*([\w$]+)/);if(t)return t[1];return null}(t),Q=X(t,P);return"[Function"+(H?": "+H:" (anonymous)")+"]"+(Q.length>0?" { "+k.call(Q,", ")+" }":"")}if(U(t)){var ee=N?_.call(String(t),/^(Symbol\(.*\))_[^)]*$/,"$1"):F.call(t);return"object"!==typeof t||N?ee:G(ee)}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 te="<"+D.call(String(t.nodeName)),ne=t.attributes||[],re=0;re"}if(j(t)){if(0===t.length)return"[]";var ie=X(t,P);return A&&!function(e){for(var t=0;t=0)return!1;return!0}(ie)?"["+K(ie,A)+"]":"[ "+k.call(ie,", ")+" ]"}if(function(e){return"[object Error]"===Y(e)&&(!O||!("object"===typeof e&&O in e))}(t)){var oe=X(t,P);return"cause"in Error.prototype||!("cause"in t)||T.call(t,"cause")?0===oe.length?"["+String(t)+"]":"{ ["+String(t)+"] "+k.call(oe,", ")+" }":"{ ["+String(t)+"] "+k.call(x.call("[cause]: "+P(t.cause),oe),", ")+" }"}if("object"===typeof t&&l){if($&&"function"===typeof t[$]&&L)return L(t,{depth:E-r});if("symbol"!==l&&"function"===typeof t.inspect)return t.inspect()}if(function(e){if(!o||!e||"object"!==typeof e)return!1;try{o.call(e);try{c.call(e)}catch(te){return!0}return e instanceof Map}catch(t){}return!1}(t)){var ae=[];return a.call(t,(function(e,n){ae.push(P(n,t,!0)+" => "+P(e,t))})),Z("Map",o.call(t),ae,A)}if(function(e){if(!c||!e||"object"!==typeof e)return!1;try{c.call(e);try{o.call(e)}catch(t){return!0}return e instanceof Set}catch(n){}return!1}(t)){var ue=[];return s.call(t,(function(e){ue.push(P(e,t))})),Z("Set",c.call(t),ue,A)}if(function(e){if(!f||!e||"object"!==typeof e)return!1;try{f.call(e,f);try{d.call(e,d)}catch(te){return!0}return e instanceof WeakMap}catch(t){}return!1}(t))return J("WeakMap");if(function(e){if(!d||!e||"object"!==typeof e)return!1;try{d.call(e,d);try{f.call(e,f)}catch(te){return!0}return e instanceof WeakSet}catch(t){}return!1}(t))return J("WeakSet");if(function(e){if(!h||!e||"object"!==typeof e)return!1;try{return h.call(e),!0}catch(t){}return!1}(t))return J("WeakRef");if(function(e){return"[object Number]"===Y(e)&&(!O||!("object"===typeof e&&O in e))}(t))return G(P(Number(t)));if(function(e){if(!e||"object"!==typeof e||!S)return!1;try{return S.call(e),!0}catch(t){}return!1}(t))return G(P(S.call(t)));if(function(e){return"[object Boolean]"===Y(e)&&(!O||!("object"===typeof e&&O in e))}(t))return G(p.call(t));if(function(e){return"[object String]"===Y(e)&&(!O||!("object"===typeof e&&O in e))}(t))return G(P(String(t)));if(!function(e){return"[object Date]"===Y(e)&&(!O||!("object"===typeof e&&O in e))}(t)&&!z(t)){var le=X(t,P),ce=B?B(t)===Object.prototype:t instanceof Object||t.constructor===Object,se=t instanceof Object?"":"null prototype",fe=!ce&&O&&Object(t)===t&&O in t?g.call(Y(t),8,-1):se?"Object":"",de=(ce||"function"!==typeof t.constructor?"":t.constructor.name?t.constructor.name+" ":"")+(fe||se?"["+k.call(x.call([],fe||[],se||[]),": ")+"] ":"");return 0===le.length?de+"{}":A?de+"{"+K(le,A)+"}":de+"{ "+k.call(le,", ")+" }"}return String(t)};var H=Object.prototype.hasOwnProperty||function(e){return e in this};function V(e,t){return H.call(e,t)}function Y(e){return v.call(e)}function q(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(g.call(e,0,t.maxStringLength),t)+r}return I(_.call(_.call(e,/(['\\])/g,"\\$1"),/[\x00-\x1f]/g,Q),"single",t)}function Q(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 G(e){return"Object("+e+")"}function J(e){return e+" { ? }"}function Z(e,t,n,r){return e+" ("+t+") {"+(r?K(n,r):k.call(n,", "))+"}"}function K(e,t){if(0===e.length)return"";var n="\n"+t.prev+t.base;return n+k.call(e,","+n)+"\n"+t.prev}function X(e,t){var n=j(e),r=[];if(n){r.length=e.length;for(var i=0;i-1?e.split(","):e},c=function(e,t,n,r){if(e){var o=n.allowDots?e.replace(/\.([^.[]+)/g,"[$1]"):e,a=/(\[[^[\]]*])/g,u=n.depth>0&&/(\[[^[\]]*])/.exec(o),c=u?o.slice(0,u.index):o,s=[];if(c){if(!n.plainObjects&&i.call(Object.prototype,c)&&!n.allowPrototypes)return;s.push(c)}for(var f=0;n.depth>0&&null!==(u=a.exec(o))&&f=0;--o){var a,u=e[o];if("[]"===u&&n.parseArrays)a=[].concat(i);else{a=n.plainObjects?Object.create(null):{};var c="["===u.charAt(0)&&"]"===u.charAt(u.length-1)?u.slice(1,-1):u,s=parseInt(c,10);n.parseArrays||""!==c?!isNaN(s)&&u!==c&&String(s)===c&&s>=0&&n.parseArrays&&s<=n.arrayLimit?(a=[])[s]=i:"__proto__"!==c&&(a[c]=i):a={0:i}}i=a}return i}(s,t,n,r)}};e.exports=function(e,t){var n=function(e){if(!e)return a;if(null!==e.decoder&&void 0!==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?a.charset:e.charset;return{allowDots:"undefined"===typeof e.allowDots?a.allowDots:!!e.allowDots,allowPrototypes:"boolean"===typeof e.allowPrototypes?e.allowPrototypes:a.allowPrototypes,allowSparse:"boolean"===typeof e.allowSparse?e.allowSparse:a.allowSparse,arrayLimit:"number"===typeof e.arrayLimit?e.arrayLimit:a.arrayLimit,charset:t,charsetSentinel:"boolean"===typeof e.charsetSentinel?e.charsetSentinel:a.charsetSentinel,comma:"boolean"===typeof e.comma?e.comma:a.comma,decoder:"function"===typeof e.decoder?e.decoder:a.decoder,delimiter:"string"===typeof e.delimiter||r.isRegExp(e.delimiter)?e.delimiter:a.delimiter,depth:"number"===typeof e.depth||!1===e.depth?+e.depth:a.depth,ignoreQueryPrefix:!0===e.ignoreQueryPrefix,interpretNumericEntities:"boolean"===typeof e.interpretNumericEntities?e.interpretNumericEntities:a.interpretNumericEntities,parameterLimit:"number"===typeof e.parameterLimit?e.parameterLimit:a.parameterLimit,parseArrays:!1!==e.parseArrays,plainObjects:"boolean"===typeof e.plainObjects?e.plainObjects:a.plainObjects,strictNullHandling:"boolean"===typeof e.strictNullHandling?e.strictNullHandling:a.strictNullHandling}}(t);if(""===e||null===e||"undefined"===typeof e)return n.plainObjects?Object.create(null):{};for(var s="string"===typeof e?function(e,t){var n,c={},s=t.ignoreQueryPrefix?e.replace(/^\?/,""):e,f=t.parameterLimit===1/0?void 0:t.parameterLimit,d=s.split(t.delimiter,f),h=-1,p=t.charset;if(t.charsetSentinel)for(n=0;n-1&&(m=o(m)?[m]:m),i.call(c,v)?c[v]=r.combine(c[v],m):c[v]=m}return c}(e,n):e,f=n.plainObjects?Object.create(null):{},d=Object.keys(s),h=0;h0?C.join(",")||null:void 0}];else if(l(h))M=h;else{var P=Object.keys(C);M=m?P.sort(m):P}for(var $=a&&l(C)&&1===C.length?n+"[]":n,I=0;I0?D+b:""}},837:function(e,t,n){"use strict";var r=n(609),i=Object.prototype.hasOwnProperty,o=Array.isArray,a=function(){for(var e=[],t=0;t<256;++t)e.push("%"+((t<16?"0":"")+t.toString(16)).toUpperCase());return e}(),u=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(o(n)){for(var r=[],i=0;i=48&&s<=57||s>=65&&s<=90||s>=97&&s<=122||o===r.RFC1738&&(40===s||41===s)?l+=u.charAt(c):s<128?l+=a[s]:s<2048?l+=a[192|s>>6]+a[128|63&s]:s<55296||s>=57344?l+=a[224|s>>12]+a[128|s>>6&63]+a[128|63&s]:(c+=1,s=65536+((1023&s)<<10|1023&u.charCodeAt(c)),l+=a[240|s>>18]+a[128|s>>12&63]+a[128|s>>6&63]+a[128|63&s])}return l},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(o(e)){for(var n=[],r=0;r2&&(u.children=arguments.length>3?t.call(arguments,2):r),"function"==typeof e&&null!=e.defaultProps)for(a in e.defaultProps)void 0===u[a]&&(u[a]=e.defaultProps[a]);return p(e,u,i,o,null)}function p(e,t,n,o,a){var u={type:e,props:t,key:n,ref:o,__k:null,__:null,__b:0,__e:null,__d:void 0,__c:null,__h:null,constructor:void 0,__v:null==a?++i:a};return null==a&&null!=r.vnode&&r.vnode(u),u}function v(){return{current:null}}function m(e){return e.children}function y(e,t){this.props=e,this.context=t}function g(e,t){if(null==t)return e.__?g(e.__,e.__.__k.indexOf(e)+1):null;for(var n;t0?p(y.type,y.props,y.key,y.ref?y.ref:null,y.__v):y)){if(y.__=n,y.__b=n.__b+1,null===(v=w[d])||v&&y.key==v.key&&y.type===v.type)w[d]=void 0;else for(h=0;h2&&(u.children=arguments.length>3?t.call(arguments,2):r),p(e.type,u,i||e.key,o||e.ref,null)}function R(e,t){var n={__c:t="__cC"+u++,__: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.shouldComponentUpdate=function(e){this.props.value!==e.value&&n.some(b)},this.sub=function(e){n.push(e);var t=e.componentWillUnmount;e.componentWillUnmount=function(){n.splice(n.indexOf(e),1),t&&t.call(e)}}),e.children}};return n.Provider.__=n.Consumer.contextType=n}t=c.slice,r={__e:function(e,t,n,r){for(var i,o,a;t=t.__;)if((i=t.__c)&&!i.__)try{if((o=i.constructor)&&null!=o.getDerivedStateFromError&&(i.setState(o.getDerivedStateFromError(e)),a=i.__d),null!=i.componentDidCatch&&(i.componentDidCatch(e,r||{}),a=i.__d),a)return i.__E=i}catch(t){e=t}throw e}},i=0,y.prototype.setState=function(e,t){var n;n=null!=this.__s&&this.__s!==this.state?this.__s:this.__s=f({},this.state),"function"==typeof e&&(e=e(f({},n),this.props)),e&&f(n,e),null!=e&&this.__v&&(t&&this._sb.push(t),b(this))},y.prototype.forceUpdate=function(e){this.__v&&(this.__e=!0,e&&this.__h.push(e),b(this))},y.prototype.render=m,o=[],D.__r=0,u=0;var j,z,U,H,V=0,Y=[],q=[],W=r.__b,Q=r.__r,G=r.diffed,J=r.__c,Z=r.unmount;function K(e,t){r.__h&&r.__h(z,e,V||t),V=0;var n=z.__H||(z.__H={__:[],__h:[]});return e>=n.__.length&&n.__.push({__V:q}),n.__[e]}function X(e){return V=1,ee(ye,e)}function ee(e,t,n){var r=K(j++,2);if(r.t=e,!r.__c&&(r.__=[n?n(t):ye(void 0,t),function(e){var t=r.__N?r.__N[0]:r.__[0],n=r.t(t,e);t!==n&&(r.__N=[n,r.__[1]],r.__c.setState({}))}],r.__c=z,!z.u)){z.u=!0;var i=z.shouldComponentUpdate;z.shouldComponentUpdate=function(e,t,n){if(!r.__c.__H)return!0;var o=r.__c.__H.__.filter((function(e){return e.__c}));if(o.every((function(e){return!e.__N})))return!i||i.call(this,e,t,n);var a=!1;return o.forEach((function(e){if(e.__N){var t=e.__[0];e.__=e.__N,e.__N=void 0,t!==e.__[0]&&(a=!0)}})),!(!a&&r.__c.props===e)&&(!i||i.call(this,e,t,n))}}return r.__N||r.__}function te(e,t){var n=K(j++,3);!r.__s&&me(n.__H,t)&&(n.__=e,n.i=t,z.__H.__h.push(n))}function ne(e,t){var n=K(j++,4);!r.__s&&me(n.__H,t)&&(n.__=e,n.i=t,z.__h.push(n))}function re(e){return V=5,oe((function(){return{current:e}}),[])}function ie(e,t,n){V=6,ne((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 oe(e,t){var n=K(j++,7);return me(n.__H,t)?(n.__V=e(),n.i=t,n.__h=e,n.__V):n.__}function ae(e,t){return V=8,oe((function(){return e}),t)}function ue(e){var t=z.context[e.__c],n=K(j++,9);return n.c=e,t?(null==n.__&&(n.__=!0,t.sub(z)),t.props.value):e.__}function le(e,t){r.useDebugValue&&r.useDebugValue(t?t(e):e)}function ce(e){var t=K(j++,10),n=X();return t.__=e,z.componentDidCatch||(z.componentDidCatch=function(e,r){t.__&&t.__(e,r),n[1](e)}),[n[0],function(){n[1](void 0)}]}function se(){var e=K(j++,11);if(!e.__){for(var t=z.__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 fe(){for(var e;e=Y.shift();)if(e.__P&&e.__H)try{e.__H.__h.forEach(pe),e.__H.__h.forEach(ve),e.__H.__h=[]}catch(u){e.__H.__h=[],r.__e(u,e.__v)}}r.__b=function(e){z=null,W&&W(e)},r.__r=function(e){Q&&Q(e),j=0;var t=(z=e.__c).__H;t&&(U===z?(t.__h=[],z.__h=[],t.__.forEach((function(e){e.__N&&(e.__=e.__N),e.__V=q,e.__N=e.i=void 0}))):(t.__h.forEach(pe),t.__h.forEach(ve),t.__h=[])),U=z},r.diffed=function(e){G&&G(e);var t=e.__c;t&&t.__H&&(t.__H.__h.length&&(1!==Y.push(t)&&H===r.requestAnimationFrame||((H=r.requestAnimationFrame)||he)(fe)),t.__H.__.forEach((function(e){e.i&&(e.__H=e.i),e.__V!==q&&(e.__=e.__V),e.i=void 0,e.__V=q}))),U=z=null},r.__c=function(e,t){t.some((function(e){try{e.__h.forEach(pe),e.__h=e.__h.filter((function(e){return!e.__||ve(e)}))}catch(i){t.some((function(e){e.__h&&(e.__h=[])})),t=[],r.__e(i,e.__v)}})),J&&J(e,t)},r.unmount=function(e){Z&&Z(e);var t,n=e.__c;n&&n.__H&&(n.__H.__.forEach((function(e){try{pe(e)}catch(e){t=e}})),n.__H=void 0,t&&r.__e(t,n.__v))};var de="function"==typeof requestAnimationFrame;function he(e){var t,n=function(){clearTimeout(r),de&&cancelAnimationFrame(t),setTimeout(e)},r=setTimeout(n,100);de&&(t=requestAnimationFrame(n))}function pe(e){var t=z,n=e.__c;"function"==typeof n&&(e.__c=void 0,n()),z=t}function ve(e){var t=z;e.__c=e.__(),z=t}function me(e,t){return!e||e.length!==t.length||t.some((function(t,n){return t!==e[n]}))}function ye(e,t){return"function"==typeof t?t(e):t}function ge(e,t){for(var n in t)e[n]=t[n];return e}function _e(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 be(e,t){return e===t&&(0!==e||1/e==1/t)||e!=e&&t!=t}function De(e){this.props=e}function we(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:_e(this.props,e)}function r(t){return this.shouldComponentUpdate=n,h(e,t)}return r.displayName="Memo("+(e.displayName||e.name)+")",r.prototype.isReactComponent=!0,r.__f=!0,r}(De.prototype=new y).isPureReactComponent=!0,De.prototype.shouldComponentUpdate=function(e,t){return _e(this.props,e)||_e(this.state,t)};var xe=r.__b;r.__b=function(e){e.type&&e.type.__f&&e.ref&&(e.props.ref=e.ref,e.ref=null),xe&&xe(e)};var ke="undefined"!=typeof Symbol&&Symbol.for&&Symbol.for("react.forward_ref")||3911;function Ce(e){function t(t){var n=ge({},t);return delete n.ref,e(n,t.ref||null)}return t.$$typeof=ke,t.render=t,t.prototype.isReactComponent=t.__f=!0,t.displayName="ForwardRef("+(e.displayName||e.name)+")",t}var Ee=function(e,t){return null==e?null:k(k(e).map(t))},Se={map:Ee,forEach:Ee,count:function(e){return e?k(e).length:0},only:function(e){var t=k(e);if(1!==t.length)throw"Children.only";return t[0]},toArray:k},Ae=r.__e;r.__e=function(e,t,n,r){if(e.then)for(var i,o=t;o=o.__;)if((i=o.__c)&&i.__c)return null==t.__e&&(t.__e=n.__e,t.__k=n.__k),i.__c(e,t);Ae(e,t,n,r)};var Fe=r.unmount;function Ne(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=ge({},e)).__c&&(e.__c.__P===n&&(e.__c.__P=t),e.__c=null),e.__k=e.__k&&e.__k.map((function(e){return Ne(e,t,n)}))),e}function Oe(e,t,n){return e&&(e.__v=null,e.__k=e.__k&&e.__k.map((function(e){return Oe(e,t,n)})),e.__c&&e.__c.__P===t&&(e.__e&&n.insertBefore(e.__e,e.__d),e.__c.__e=!0,e.__c.__P=n)),e}function Te(){this.__u=0,this.t=null,this.__b=null}function Be(e){var t=e.__.__c;return t&&t.__a&&t.__a(e)}function Me(e){var t,n,r;function i(i){if(t||(t=e()).then((function(e){n=e.default||e}),(function(e){r=e})),r)throw r;if(!n)throw t;return h(n,i)}return i.displayName="Lazy",i.__f=!0,i}function Le(){this.u=null,this.o=null}r.unmount=function(e){var t=e.__c;t&&t.__R&&t.__R(),t&&!0===e.__h&&(e.type=null),Fe&&Fe(e)},(Te.prototype=new y).__c=function(e,t){var n=t.__c,r=this;null==r.t&&(r.t=[]),r.t.push(n);var i=Be(r.__v),o=!1,a=function(){o||(o=!0,n.__R=null,i?i(u):u())};n.__R=a;var u=function(){if(!--r.__u){if(r.state.__a){var e=r.state.__a;r.__v.__k[0]=Oe(e,e.__c.__P,e.__c.__O)}var t;for(r.setState({__a:r.__b=null});t=r.t.pop();)t.forceUpdate()}},l=!0===t.__h;r.__u++||l||r.setState({__a:r.__b=r.__v.__k[0]}),e.then(a,a)},Te.prototype.componentWillUnmount=function(){this.t=[]},Te.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]=Ne(this.__b,n,r.__O=r.__P)}this.__b=null}var i=t.__a&&h(m,null,e.fallback);return i&&(i.__h=null),[h(m,null,t.__a?null:e.children),i]};var Pe=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)}}),P(h($e,{context:t.context},e.__v),t.l)):t.l&&t.componentWillUnmount()}function Re(e,t){var n=h(Ie,{__v:e,i:t});return n.containerInfo=t,n}(Le.prototype=new y).__a=function(e){var t=this,n=Be(t.__v),r=t.o.get(e);return r[0]++,function(i){var o=function(){t.props.revealOrder?(r.push(i),Pe(t,e,r)):i()};n?n(o):o()}},Le.prototype.render=function(e){this.u=null,this.o=new Map;var t=k(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},Le.prototype.componentDidUpdate=Le.prototype.componentDidMount=function(){var e=this;this.o.forEach((function(t,n){Pe(e,n,t)}))};var je="undefined"!=typeof Symbol&&Symbol.for&&Symbol.for("react.element")||60103,ze=/^(?:accent|alignment|arabic|baseline|cap|clip(?!PathU)|color|dominant|fill|flood|font|glyph(?!R)|horiz|image|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]/,Ue="undefined"!=typeof document,He=function(e){return("undefined"!=typeof Symbol&&"symbol"==typeof Symbol()?/fil|che|rad/i:/fil|che|ra/i).test(e)};function Ve(e,t,n){return null==t.__k&&(t.textContent=""),P(e,t),"function"==typeof n&&n(),e?e.__c:null}function Ye(e,t,n){return $(e,t),"function"==typeof n&&n(),e?e.__c:null}y.prototype.isReactComponent={},["componentWillMount","componentWillReceiveProps","componentWillUpdate"].forEach((function(e){Object.defineProperty(y.prototype,e,{configurable:!0,get:function(){return this["UNSAFE_"+e]},set:function(t){Object.defineProperty(this,e,{configurable:!0,writable:!0,value:t})}})}));var qe=r.event;function We(){}function Qe(){return this.cancelBubble}function Ge(){return this.defaultPrevented}r.event=function(e){return qe&&(e=qe(e)),e.persist=We,e.isPropagationStopped=Qe,e.isDefaultPrevented=Ge,e.nativeEvent=e};var Je,Ze={configurable:!0,get:function(){return this.class}},Ke=r.vnode;r.vnode=function(e){var t=e.type,n=e.props,r=n;if("string"==typeof t){var i=-1===t.indexOf("-");for(var o in r={},n){var a=n[o];Ue&&"children"===o&&"noscript"===t||"value"===o&&"defaultValue"in n&&null==a||("defaultValue"===o&&"value"in n&&null==n.value?o="value":"download"===o&&!0===a?a="":/ondoubleclick/i.test(o)?o="ondblclick":/^onchange(textarea|input)/i.test(o+t)&&!He(n.type)?o="oninput":/^onfocus$/i.test(o)?o="onfocusin":/^onblur$/i.test(o)?o="onfocusout":/^on(Ani|Tra|Tou|BeforeInp|Compo)/.test(o)?o=o.toLowerCase():i&&ze.test(o)?o=o.replace(/[A-Z0-9]/g,"-$&").toLowerCase():null===a&&(a=void 0),/^oninput$/i.test(o)&&(o=o.toLowerCase(),r[o]&&(o="oninputCapture")),r[o]=a)}"select"==t&&r.multiple&&Array.isArray(r.value)&&(r.value=k(n.children).forEach((function(e){e.props.selected=-1!=r.value.indexOf(e.props.value)}))),"select"==t&&null!=r.defaultValue&&(r.value=k(n.children).forEach((function(e){e.props.selected=r.multiple?-1!=r.defaultValue.indexOf(e.props.value):r.defaultValue==e.props.value}))),e.props=r,n.class!=n.className&&(Ze.enumerable="className"in n,null!=n.className&&(r.class=n.className),Object.defineProperty(r,"className",Ze))}e.$$typeof=je,Ke&&Ke(e)};var Xe=r.__r;r.__r=function(e){Xe&&Xe(e),Je=e.__c};var et={ReactCurrentDispatcher:{current:{readContext:function(e){return Je.__n[e.__c].props.value}}}},tt="17.0.2";function nt(e){return h.bind(null,e)}function rt(e){return!!e&&e.$$typeof===je}function it(e){return rt(e)?I.apply(null,arguments):e}function ot(e){return!!e.__k&&(P(null,e),!0)}function at(e){return e&&(e.base||1===e.nodeType&&e)||null}var ut=function(e,t){return e(t)},lt=function(e,t){return e(t)},ct=m;function st(e){e()}function ft(e){return e}function dt(){return[!1,st]}var ht=ne;function pt(e,t){var n=t(),r=X({h:{__:n,v:t}}),i=r[0].h,o=r[1];return ne((function(){i.__=n,i.v=t,be(i.__,t())||o({h:i})}),[e,n,t]),te((function(){return be(i.__,i.v())||o({h:i}),e((function(){be(i.__,i.v())||o({h:i})}))}),[e]),n}var vt,mt={useState:X,useId:se,useReducer:ee,useEffect:te,useLayoutEffect:ne,useInsertionEffect:ht,useTransition:dt,useDeferredValue:ft,useSyncExternalStore:pt,startTransition:st,useRef:re,useImperativeHandle:ie,useMemo:oe,useCallback:ae,useContext:ue,useDebugValue:le,version:"17.0.2",Children:Se,render:Ve,hydrate:Ye,unmountComponentAtNode:ot,createPortal:Re,createElement:h,createContext:R,createFactory:nt,cloneElement:it,createRef:v,Fragment:m,isValidElement:rt,findDOMNode:at,Component:y,PureComponent:De,memo:we,forwardRef:Ce,flushSync:lt,unstable_batchedUpdates:ut,StrictMode:ct,Suspense:Te,SuspenseList:Le,lazy:Me,__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED:et};function yt(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n=0&&(t.hash=e.substr(n),e=e.substr(0,n));var r=e.indexOf("?");r>=0&&(t.search=e.substr(r),e=e.substr(0,r)),e&&(t.pathname=e)}return t}function zt(e){var t="undefined"!==typeof window&&"undefined"!==typeof window.location&&"null"!==window.location.origin?window.location.origin:"unknown://unknown",n="string"===typeof e?e:Rt(e);return new URL(n,t)}function Ut(e,t,n,r){void 0===r&&(r={});var i=r,o=i.window,a=void 0===o?document.defaultView:o,u=i.v5Compat,l=void 0!==u&&u,c=a.history,s=vt.Pop,f=null;function d(){s=vt.Pop,f&&f({action:s,location:h.location})}var h={get action(){return s},get location(){return e(a,c)},listen:function(e){if(f)throw new Error("A history only accepts one active listener");return a.addEventListener(Lt,d),f=e,function(){a.removeEventListener(Lt,d),f=null}},createHref:function(e){return t(a,e)},encodeLocation:function(e){var t=zt(Rt(e));return Bt({},e,{pathname:t.pathname,search:t.search,hash:t.hash})},push:function(e,t){s=vt.Push;var r=It(h.location,e,t);n&&n(r,e);var i=$t(r),o=h.createHref(r);try{c.pushState(i,"",o)}catch(u){a.location.assign(o)}l&&f&&f({action:s,location:h.location})},replace:function(e,t){s=vt.Replace;var r=It(h.location,e,t);n&&n(r,e);var i=$t(r),o=h.createHref(r);c.replaceState(i,"",o),l&&f&&f({action:s,location:h.location})},go:function(e){return c.go(e)}};return h}function Ht(e,t,n){void 0===n&&(n="/");var r=Zt(("string"===typeof t?jt(t):t).pathname||"/",n);if(null==r)return null;var i=Vt(e);!function(e){e.sort((function(e,t){return e.score!==t.score?t.score-e.score:function(e,t){var n=e.length===t.length&&e.slice(0,-1).every((function(e,n){return e===t[n]}));return n?e[e.length-1]-t[t.length-1]:0}(e.routesMeta.map((function(e){return e.childrenIndex})),t.routesMeta.map((function(e){return e.childrenIndex})))}))}(i);for(var o=null,a=0;null==o&&a0&&(Kt(!0!==e.index,'Index routes must not have child routes. Please remove all child routes from route path "'+a+'".'),Vt(e.children,t,u,a)),(null!=e.path||e.index)&&t.push({path:a,score:Wt(a,e.index),routesMeta:u})})),t}!function(e){e.data="data",e.deferred="deferred",e.redirect="redirect",e.error="error"}(Mt||(Mt={}));var Yt=/^:\w+$/,qt=function(e){return"*"===e};function Wt(e,t){var n=e.split("/"),r=n.length;return n.some(qt)&&(r+=-2),t&&(r+=2),n.filter((function(e){return!qt(e)})).reduce((function(e,t){return e+(Yt.test(t)?3:""===t?1:10)}),r)}function Qt(e,t){for(var n=e.routesMeta,r={},i="/",o=[],a=0;a and the router will parse it for you.'}function tn(e){return e.filter((function(e,t){return 0===t||e.route.path&&e.route.path.length>0}))}function nn(e,t,n,r){var i;void 0===r&&(r=!1),"string"===typeof e?i=jt(e):(Kt(!(i=Bt({},e)).pathname||!i.pathname.includes("?"),en("?","pathname","search",i)),Kt(!i.pathname||!i.pathname.includes("#"),en("#","pathname","hash",i)),Kt(!i.search||!i.search.includes("#"),en("#","search","hash",i)));var o,a=""===e||""===i.pathname,u=a?"/":i.pathname;if(r||null==u)o=n;else{var l=t.length-1;if(u.startsWith("..")){for(var c=u.split("/");".."===c[0];)c.shift(),l-=1;i.pathname=c.join("/")}o=l>=0?t[l]:"/"}var s=function(e,t){void 0===t&&(t="/");var n="string"===typeof e?jt(e):e,r=n.pathname,i=n.search,o=void 0===i?"":i,a=n.hash,u=void 0===a?"":a,l=r?r.startsWith("/")?r:function(e,t){var n=t.replace(/\/+$/,"").split("/");return e.split("/").forEach((function(e){".."===e?n.length>1&&n.pop():"."!==e&&n.push(e)})),n.length>1?n.join("/"):"/"}(r,t):t;return{pathname:l,search:an(o),hash:un(u)}}(i,o),f=u&&"/"!==u&&u.endsWith("/"),d=(a||"."===u)&&n.endsWith("/");return s.pathname.endsWith("/")||!f&&!d||(s.pathname+="/"),s}var rn=function(e){return e.join("/").replace(/\/\/+/g,"/")},on=function(e){return e.replace(/\/+$/,"").replace(/^\/*/,"/")},an=function(e){return e&&"?"!==e?e.startsWith("?")?e:"?"+e:""},un=function(e){return e&&"#"!==e?e.startsWith("#")?e:"#"+e:""};Error;var ln=xt((function e(t,n,r){Dt(this,e),this.status=t,this.statusText=n||"",this.data=r}));function cn(e){return e instanceof ln}"undefined"!==typeof window&&"undefined"!==typeof window.document&&window.document.createElement;var sn=new Set(["POST","PUT","PATCH","DELETE"]);new Set(["GET","HEAD"].concat(bt(sn)));function fn(){return fn=Object.assign?Object.assign.bind():function(e){for(var t=1;t")))}var Nn,On,Tn=function(e){Ct(n,e);var t=Nt(n);function n(e){var r;return Dt(this,n),(r=t.call(this,e)).state={location:e.location,error:e.error},r}return xt(n,[{key:"componentDidCatch",value:function(e,t){console.error("React Router caught the following error during render",e,t)}},{key:"render",value:function(){return this.state.error?h(kn.Provider,{value:this.state.error,children:this.props.component}):this.props.children}}],[{key:"getDerivedStateFromError",value:function(e){return{error:e}}},{key:"getDerivedStateFromProps",value:function(e,t){return t.location!==e.location?{error:e.error,location:e.location}:{error:e.error||t.error,location:t.location}}}]),n}(y);function Bn(e){var t=e.routeContext,n=e.match,r=e.children,i=ue(gn);return i&&n.route.errorElement&&(i._deepestRenderedBoundaryId=n.route.id),h(xn.Provider,{value:t},r)}function Mn(e,t,n){if(void 0===t&&(t=[]),null==e){if(null==n||!n.errors)return null;e=n.matches}var r=e,i=null==n?void 0:n.errors;if(null!=i){var o=r.findIndex((function(e){return e.route.id&&(null==i?void 0:i[e.route.id])}));o>=0||Kt(!1),r=r.slice(0,Math.min(r.length,o+1))}return r.reduceRight((function(e,o,a){var u=o.route.id?null==i?void 0:i[o.route.id]:null,l=n?o.route.errorElement||h(Fn,null):null,c=function(){return h(Bn,{match:o,routeContext:{outlet:e,matches:t.concat(r.slice(0,a+1))}},u?l:void 0!==o.route.element?o.route.element:e)};return n&&(o.route.errorElement||0===a)?h(Tn,{location:n.location,component:l,error:u,children:c()}):c()}),null)}function Ln(e){var t=ue(bn);return t||Kt(!1),t}!function(e){e.UseRevalidator="useRevalidator"}(Nn||(Nn={})),function(e){e.UseLoaderData="useLoaderData",e.UseActionData="useActionData",e.UseRouteError="useRouteError",e.UseNavigation="useNavigation",e.UseRouteLoaderData="useRouteLoaderData",e.UseMatches="useMatches",e.UseRevalidator="useRevalidator"}(On||(On={}));var Pn;function $n(e){return function(e){var t=ue(xn).outlet;return t?h(An.Provider,{value:e},t):t}(e.context)}function In(e){Kt(!1)}function Rn(e){var t=e.basename,n=void 0===t?"/":t,r=e.children,i=void 0===r?null:r,o=e.location,a=e.navigationType,u=void 0===a?vt.Pop:a,l=e.navigator,c=e.static,s=void 0!==c&&c;Cn()&&Kt(!1);var f=n.replace(/^\/*/,"/"),d=oe((function(){return{basename:f,navigator:l,static:s}}),[f,l,s]);"string"===typeof o&&(o=jt(o));var p=o,v=p.pathname,m=void 0===v?"/":v,y=p.search,g=void 0===y?"":y,_=p.hash,b=void 0===_?"":_,D=p.state,w=void 0===D?null:D,x=p.key,k=void 0===x?"default":x,C=oe((function(){var e=Zt(m,f);return null==e?null:{pathname:e,search:g,hash:b,state:w,key:k}}),[f,m,g,b,w,k]);return null==C?null:h(Dn.Provider,{value:d},h(wn.Provider,{children:i,value:{location:C,navigationType:u}}))}function jn(e){var t=e.children,n=e.location,r=ue(_n);return function(e,t){Cn()||Kt(!1);var n,r=ue(bn),i=ue(xn).matches,o=i[i.length-1],a=o?o.params:{},u=(o&&o.pathname,o?o.pathnameBase:"/"),l=(o&&o.route,En());if(t){var c,s="string"===typeof t?jt(t):t;"/"===u||(null==(c=s.pathname)?void 0:c.startsWith(u))||Kt(!1),n=s}else n=l;var f=n.pathname||"/",d=Ht(e,{pathname:"/"===u?f:f.slice(u.length)||"/"}),p=Mn(d&&d.map((function(e){return Object.assign({},e,{params:Object.assign({},a,e.params),pathname:rn([u,e.pathname]),pathnameBase:"/"===e.pathnameBase?u:rn([u,e.pathnameBase])})})),i,r||void 0);return t&&p?h(wn.Provider,{value:{location:fn({pathname:"/",search:"",hash:"",state:null,key:"default"},n),navigationType:vt.Pop}},p):p}(r&&!t?r.router.routes:zn(t),n)}!function(e){e[e.pending=0]="pending",e[e.success=1]="success",e[e.error=2]="error"}(Pn||(Pn={}));new Promise((function(){}));function zn(e,t){void 0===t&&(t=[]);var n=[];return Se.forEach(e,(function(e,r){if(rt(e))if(e.type!==m){e.type!==In&&Kt(!1),e.props.index&&e.props.children&&Kt(!1);var i=[].concat(bt(t),[r]),o={id:e.props.id||i.join("-"),caseSensitive:e.props.caseSensitive,element:e.props.element,index:e.props.index,path:e.props.path,loader:e.props.loader,action:e.props.action,errorElement:e.props.errorElement,hasErrorBoundary:null!=e.props.errorElement,shouldRevalidate:e.props.shouldRevalidate,handle:e.props.handle};e.props.children&&(o.children=zn(e.props.children,i)),n.push(o)}else n.push.apply(n,zn(e.props.children,t))})),n}function Un(e){var t=e.basename,n=e.children,r=e.window,i=re();null==i.current&&(i.current=function(e){return void 0===e&&(e={}),Ut((function(e,t){var n=jt(e.location.hash.substr(1)),r=n.pathname,i=void 0===r?"/":r,o=n.search,a=void 0===o?"":o,u=n.hash;return It("",{pathname:i,search:a,hash:void 0===u?"":u},t.state&&t.state.usr||null,t.state&&t.state.key||"default")}),(function(e,t){var n=e.document.querySelector("base"),r="";if(n&&n.getAttribute("href")){var i=e.location.href,o=i.indexOf("#");r=-1===o?i:i.slice(0,o)}return r+"#"+("string"===typeof t?t:Rt(t))}),(function(e,t){Pt("/"===e.pathname.charAt(0),"relative pathnames are not supported in hash history.push("+JSON.stringify(t)+")")}),e)}({window:r,v5Compat:!0}));var o=i.current,a=_t(X({action:o.action,location:o.location}),2),u=a[0],l=a[1];return ne((function(){return o.listen(l)}),[o]),h(Rn,{basename:t,children:n,location:u.location,navigationType:u.action,navigator:o})}var Hn,Vn;(function(e){e.UseScrollRestoration="useScrollRestoration",e.UseSubmitImpl="useSubmitImpl",e.UseFetcher="useFetcher"})(Hn||(Hn={})),function(e){e.UseFetchers="useFetchers",e.UseScrollRestoration="useScrollRestoration"}(Vn||(Vn={}));var Yn;function qn(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}var Wn={home:"/",dashboards:"/dashboards",cardinality:"/cardinality",topQueries:"/top-queries",trace:"/trace"},Qn={header:{timeSelector:!0,executionControls:!0,globalSettings:!0}},Gn=(qn(Yn={},Wn.home,Qn),qn(Yn,Wn.dashboards,Qn),qn(Yn,Wn.cardinality,{header:{cardinalityDatePicker:!0,globalSettings:!0}}),Yn),Jn=Wn;function Zn(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}function Kn(e){for(var t=1;t2&&void 0!==arguments[2]?arguments[2]:window.location.search,r=nr().parse(n,{ignoreQueryPrefix:!0});return ir()(r,e,t||"")},lr={serverUrl:Xn().serverURL||window.location.href.replace(/\/(?:prometheus\/)?(?:graph|vmui)\/.*/,"/prometheus"),tenantId:Number(ur("g0.tenantID",0))};function cr(e,t){switch(t.type){case"SET_SERVER":return Kn(Kn({},e),{},{serverUrl:t.payload});case"SET_TENANT_ID":return Kn(Kn({},e),{},{tenantId:t.payload});default:throw new Error}}var sr=0;function fr(e,t,n,i,o){var a,u,l={};for(u in t)"ref"==u?a=t[u]:l[u]=t[u];var c={type:e,props:l,key:n,ref:a,__k:null,__:null,__b:0,__e:null,__d:void 0,__c:null,__h:null,constructor:void 0,__v:--sr,__source:o,__self:i};if("function"==typeof e&&(a=e.defaultProps))for(u in a)void 0===l[u]&&(l[u]=a[u]);return r.vnode&&r.vnode(c),c}var dr=R({}),hr=function(){return ue(dr).state},pr=function(){return ue(dr).dispatch},vr=Object.entries(lr).reduce((function(e,t){var n=_t(t,2),r=n[0],i=n[1];return Kn(Kn({},e),{},qn({},r,ur(r)||i))}),{}),mr=n(658),yr=n.n(mr),gr=n(446),_r=n.n(gr),br=n(635),Dr=n.n(br),wr="YYYY-MM-DD",xr="YYYY-MM-DD HH:mm:ss",kr="YYYY-MM-DD[T]HH:mm:ss";yr().extend(_r()),yr().extend(Dr());var Cr,Er=window.innerWidth/4,Sr=1,Ar=1578e8,Fr=[{long:"days",short:"d",possible:"day"},{long:"weeks",short:"w",possible:"week"},{long:"months",short:"M",possible:"mon"},{long:"years",short:"y",possible:"year"},{long:"hours",short:"h",possible:"hour"},{long:"minutes",short:"m",possible:"min"},{long:"seconds",short:"s",possible:"sec"},{long:"milliseconds",short:"ms",possible:"millisecond"}].map((function(e){return e.short})),Nr=function(e){return Math.round(1e3*e)/1e3},Or=function(e){var t=e.match(/\d+/g),n=e.match(/[a-zA-Z]+/g);if(n&&t&&Fr.includes(n[0]))return qn({},n[0],t[0])},Tr=function(e,t){var n=(t||new Date).valueOf()/1e3,r=e.trim().split(" ").reduce((function(e,t){var n=Or(t);return n?Kn(Kn({},e),n):Kn({},e)}),{}),i=yr().duration(r).asSeconds();return{start:n-i,end:n,step:Nr(i/Er)||.001,date:Br(t||new Date)}},Br=function(e){return yr()(e).utc().format(kr)},Mr=function(e){return yr()(e).format(kr)},Lr=function(e){var t=Math.floor(e%1e3),n=Math.floor(e/1e3%60),r=Math.floor(e/1e3/60%60),i=Math.floor(e/1e3/3600%24),o=Math.floor(e/864e5),a=["d","h","m","s","ms"],u=[o,i,r,n,t].map((function(e,t){return e?"".concat(e).concat(a[t]):""}));return u.filter((function(e){return e})).join(" ")},Pr=function(e){return new Date(1e3*e)},$r=[{title:"Last 5 minutes",duration:"5m"},{title:"Last 15 minutes",duration:"15m"},{title:"Last 30 minutes",duration:"30m",isDefault:!0},{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:function(){return yr()().subtract(1,"day").endOf("day").toDate()}},{title:"Today",duration:"1d",until:function(){return yr()().endOf("day").toDate()}}].map((function(e){return Kn({id:e.title.replace(/\s/g,"_").toLocaleLowerCase(),until:e.until?e.until:function(){return yr()().toDate()}},e)})),Ir=function(e){var t,n=e.relativeTimeId,r=e.defaultDuration,i=e.defaultEndInput,o=null===(t=$r.find((function(e){return e.isDefault})))||void 0===t?void 0:t.id,a=n||ur("g0.relative_time",o),u=$r.find((function(e){return e.id===a}));return{relativeTimeId:u?a:"none",duration:u?u.duration:r,endInput:u?u.until():i}},Rr=ur("g0.range_input"),jr=Ir({defaultDuration:Rr||"1h",defaultEndInput:new Date((Cr=ur("g0.end_input",new Date(yr()().utc().format(kr))),yr()(Cr).utcOffset(0,!0).local().format(kr))),relativeTimeId:Rr?ur("g0.relative_time","none"):void 0}),zr=jr.duration,Ur=jr.endInput,Hr=jr.relativeTimeId,Vr={duration:zr,period:Tr(zr,Ur),relativeTime:Hr};function Yr(e,t){switch(t.type){case"SET_DURATION":return Kn(Kn({},e),{},{duration:t.payload,period:Tr(t.payload,Pr(e.period.end)),relativeTime:"none"});case"SET_RELATIVE_TIME":return Kn(Kn({},e),{},{duration:t.payload.duration,period:Tr(t.payload.duration,new Date(t.payload.until)),relativeTime:t.payload.id});case"SET_PERIOD":var n=function(e){var t=e.to.valueOf()-e.from.valueOf();return Lr(t)}(t.payload);return Kn(Kn({},e),{},{duration:n,period:Tr(n,t.payload.to),relativeTime:"none"});case"RUN_QUERY":var r=Ir({relativeTimeId:e.relativeTime,defaultDuration:e.duration,defaultEndInput:Pr(e.period.end)}),i=r.duration,o=r.endInput;return Kn(Kn({},e),{},{period:Tr(i,o)});case"RUN_QUERY_TO_NOW":return Kn(Kn({},e),{},{period:Tr(e.duration)});default:throw new Error}}var qr=R({}),Wr=function(){return ue(qr).state},Qr=function(){return ue(qr).dispatch},Gr=function(e){return e.forEach((function(e){return window.localStorage.removeItem(e)}))},Jr=function(){var e,t=(null===(e=window.location.search.match(/g\d+.expr/gim))||void 0===e?void 0:e.length)||1;return new Array(t>4?4:t).fill(1).map((function(e,t){return ur("g".concat(t,".expr"),"")}))}(),Zr={query:Jr,queryHistory:Jr.map((function(e){return{index:0,values:[e]}})),autocomplete:function(e){var 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(c){return t}}("AUTOCOMPLETE")||!1};function Kr(e,t){switch(t.type){case"SET_QUERY":return Kn(Kn({},e),{},{query:t.payload.map((function(e){return e}))});case"SET_QUERY_HISTORY":return Kn(Kn({},e),{},{queryHistory:t.payload});case"SET_QUERY_HISTORY_BY_INDEX":return e.queryHistory.splice(t.payload.queryNumber,1,t.payload.value),Kn(Kn({},e),{},{queryHistory:e.queryHistory});case"TOGGLE_AUTOCOMPLETE":return n="AUTOCOMPLETE",(r=!e.autocomplete)?window.localStorage.setItem(n,JSON.stringify({value:r})):Gr([n]),Kn(Kn({},e),{},{autocomplete:!e.autocomplete});default:throw new Error}var n,r}var Xr=R({}),ei=function(){return ue(Xr).state},ti=function(){return ue(Xr).dispatch},ni=function(){return fr("svg",{viewBox:"0 0 74 24",fill:"currentColor",children:[fr("path",{d:"M6.11771 9.47563C6.4774 9.7554 6.91935 9.90875 7.37507 9.9119H7.42685C7.9076 9.90451 8.38836 9.71964 8.67681 9.46823C10.1856 8.18898 14.5568 4.18115 14.5568 4.18115C15.7254 3.09415 12.4637 2.00716 7.42685 1.99977H7.36768C2.33084 2.00716 -0.930893 3.09415 0.237711 4.18115C0.237711 4.18115 4.60888 8.18898 6.11771 9.47563ZM8.67681 11.6422C8.31807 11.9246 7.87603 12.0806 7.41945 12.0859H7.37507C6.91849 12.0806 6.47645 11.9246 6.11771 11.6422C5.08224 10.7549 1.38413 7.41995 0.00103198 6.14809V8.07806C0.00103198 8.2925 0.0823905 8.57349 0.222919 8.70659L0.293358 8.77097L0.293386 8.77099C1.33788 9.72556 4.83907 12.9253 6.11771 14.0159C6.47645 14.2983 6.91849 14.4543 7.37507 14.4595H7.41945C7.9076 14.4447 8.38096 14.2599 8.67681 14.0159C9.98594 12.9067 13.6249 9.57175 14.5642 8.70659C14.7121 8.57349 14.7861 8.2925 14.7861 8.07806V6.14809C12.7662 7.99781 10.7297 9.82926 8.67681 11.6422ZM7.41945 16.6261C7.87517 16.623 8.31712 16.4696 8.67681 16.1898C10.7298 14.3744 12.7663 12.5405 14.7861 10.6883V12.6257C14.7861 12.8327 14.7121 13.1137 14.5642 13.2468C13.6249 14.1194 9.98594 17.4469 8.67681 18.5561C8.38096 18.8075 7.9076 18.9924 7.41945 18.9998H7.37507C6.91935 18.9966 6.4774 18.8433 6.11771 18.5635C4.91431 17.5371 1.74223 14.6362 0.502336 13.5023C0.3934 13.4027 0.299379 13.3167 0.222919 13.2468C0.0823905 13.1137 0.00103198 12.8327 0.00103198 12.6257V10.6883C1.38413 11.9528 5.08224 15.2951 6.11771 16.1825C6.47645 16.4649 6.91849 16.6209 7.37507 16.6261H7.41945Z",fill:"currentColor"}),fr("path",{d:"M35 3.54L29.16 18H26.73L20.89 3.54H23.05C23.2833 3.54 23.4733 3.59667 23.62 3.71C23.7667 3.82333 23.8767 3.97 23.95 4.15L27.36 12.97C27.4733 13.2567 27.58 13.5733 27.68 13.92C27.7867 14.26 27.8867 14.6167 27.98 14.99C28.06 14.6167 28.1467 14.26 28.24 13.92C28.3333 13.5733 28.4367 13.2567 28.55 12.97L31.94 4.15C31.9933 3.99667 32.0967 3.85667 32.25 3.73C32.41 3.60333 32.6033 3.54 32.83 3.54H35ZM52.1767 3.54V18H49.8067V8.66C49.8067 8.28667 49.8267 7.88333 49.8667 7.45L45.4967 15.66C45.2901 16.0533 44.9734 16.25 44.5467 16.25H44.1667C43.7401 16.25 43.4234 16.0533 43.2167 15.66L38.7967 7.42C38.8167 7.64 38.8334 7.85667 38.8467 8.07C38.8601 8.28333 38.8667 8.48 38.8667 8.66V18H36.4967V3.54H38.5267C38.6467 3.54 38.7501 3.54333 38.8367 3.55C38.9234 3.55667 39.0001 3.57333 39.0667 3.6C39.1401 3.62667 39.2034 3.67 39.2567 3.73C39.3167 3.79 39.3734 3.87 39.4267 3.97L43.7567 12C43.8701 12.2133 43.9734 12.4333 44.0667 12.66C44.1667 12.8867 44.2634 13.12 44.3567 13.36C44.4501 13.1133 44.5467 12.8767 44.6467 12.65C44.7467 12.4167 44.8534 12.1933 44.9667 11.98L49.2367 3.97C49.2901 3.87 49.3467 3.79 49.4067 3.73C49.4667 3.67 49.5301 3.62667 49.5967 3.6C49.6701 3.57333 49.7501 3.55667 49.8367 3.55C49.9234 3.54333 50.0267 3.54 50.1467 3.54H52.1767ZM61.063 17.27C61.743 17.27 62.3496 17.1533 62.883 16.92C63.423 16.68 63.8796 16.35 64.253 15.93C64.6263 15.51 64.9096 15.0167 65.103 14.45C65.303 13.8767 65.403 13.26 65.403 12.6V3.85H66.423V12.6C66.423 13.38 66.2996 14.11 66.053 14.79C65.8063 15.4633 65.4496 16.0533 64.983 16.56C64.523 17.06 63.9596 17.4533 63.293 17.74C62.633 18.0267 61.8896 18.17 61.063 18.17C60.2363 18.17 59.4896 18.0267 58.823 17.74C58.163 17.4533 57.5996 17.06 57.133 16.56C56.673 16.0533 56.3196 15.4633 56.073 14.79C55.8263 14.11 55.703 13.38 55.703 12.6V3.85H56.733V12.59C56.733 13.25 56.8296 13.8667 57.023 14.44C57.223 15.0067 57.5063 15.5 57.873 15.92C58.2463 16.34 58.6996 16.67 59.233 16.91C59.773 17.15 60.383 17.27 61.063 17.27ZM71.4442 18H70.4142V3.85H71.4442V18Z",fill:"currentColor"})]})},ri=function(){return fr("svg",{viewBox:"0 0 24 24",fill:"currentColor",children:fr("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"})})},ii=function(){return fr("svg",{viewBox:"0 0 24 24",fill:"currentColor",children:fr("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"})})},oi=function(){return fr("svg",{viewBox:"0 0 24 24",fill:"currentColor",children:fr("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"})})},ai=function(){return fr("svg",{viewBox:"0 0 24 24",fill:"currentColor",children:fr("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"})})},ui=function(){return fr("svg",{viewBox:"0 0 24 24",fill:"currentColor",children:fr("path",{d:"M1 21h22L12 2 1 21zm12-3h-2v-2h2v2zm0-4h-2v-4h2v4z"})})},li=function(){return fr("svg",{viewBox:"0 0 24 24",fill:"currentColor",children:fr("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"})})},ci=function(){return fr("svg",{viewBox:"0 0 24 24",fill:"currentColor",children:fr("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"})})},si=function(){return fr("svg",{viewBox:"0 0 24 24",fill:"currentColor",children:fr("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"})})},fi=function(){return fr("svg",{viewBox:"0 0 24 24",fill:"currentColor",children:fr("path",{d:"M7.41 8.59 12 13.17l4.59-4.58L18 10l-6 6-6-6 1.41-1.41z"})})},di=function(){return fr("svg",{viewBox:"0 0 24 24",fill:"currentColor",children:fr("path",{d:"m12 8-6 6 1.41 1.41L12 10.83l4.59 4.58L18 14z"})})},hi=function(){return fr("svg",{viewBox:"0 0 24 24",fill:"currentColor",children:fr("path",{d:"m7 10 5 5 5-5z"})})},pi=function(){return fr("svg",{viewBox:"0 0 24 24",fill:"currentColor",children:[fr("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"}),fr("path",{d:"M12.5 7H11v6l5.25 3.15.75-1.23-4.5-2.67z"})]})},vi=function(){return fr("svg",{viewBox:"0 0 24 24",fill:"currentColor",children:fr("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"})})},mi=function(){return fr("svg",{viewBox:"0 0 24 24",fill:"currentColor",children:fr("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"})})},yi=function(){return fr("svg",{viewBox:"0 0 24 24",fill:"currentColor",children:fr("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"})})},gi=function(){return fr("svg",{viewBox:"0 0 24 24",fill:"currentColor",children:fr("path",{d:"M8 5v14l11-7z"})})},_i=function(){return fr("svg",{viewBox:"0 0 24 24",fill:"currentColor",children:fr("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"})})},bi=function(){return fr("svg",{viewBox:"0 0 24 24",fill:"currentColor",children:fr("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"})})},Di=function(){return fr("svg",{viewBox:"0 0 24 24",fill:"currentColor",children:fr("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"})})},wi=function(){return fr("svg",{viewBox:"0 0 24 24",fill:"currentColor",children:fr("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"})})},xi=function(){return fr("svg",{viewBox:"0 0 24 24",fill:"currentColor",children:fr("path",{d:"M6 19c0 1.1.9 2 2 2h8c1.1 0 2-.9 2-2V7H6v12zM19 4h-3.5l-1-1h-5l-1 1H5v2h14V4z"})})},ki=function(){return fr("svg",{viewBox:"0 0 24 24",fill:"currentColor",children:fr("path",{d:"M19 13h-6v6h-2v-6H5v-2h6V5h2v6h6v2z"})})},Ci=function(){return fr("svg",{viewBox:"0 0 24 24",fill:"currentColor",children:fr("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"})})},Ei=function(){return fr("svg",{viewBox:"0 0 24 24",fill:"currentColor",children:fr("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"})})},Si=function(){return fr("svg",{viewBox:"0 0 24 24",fill:"currentColor",children:fr("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"})})},Ai=function(){return fr("svg",{viewBox:"0 0 24 24",fill:"currentColor",children:fr("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"})})},Fi=function(){return fr("svg",{viewBox:"0 0 24 24",fill:"currentColor",children:fr("path",{d:"M20 9H4v2h16V9zM4 15h16v-2H4v2z"})})},Ni=n(123),Oi=n.n(Ni),Ti=function(e){return getComputedStyle(document.documentElement).getPropertyValue("--".concat(e))},Bi=function(e,t){document.documentElement.style.setProperty("--".concat(e),t)},Mi=function(e){var t=e.activeItem,n=e.items,r=e.color,i=void 0===r?Ti("color-primary"):r,o=e.onChange,a=e.indicatorPlacement,u=void 0===a?"bottom":a,l=re(null),c=_t(X({left:0,width:0,bottom:0}),2),s=c[0],f=c[1];return te((function(){if(l.current){var e=l.current,t=e.offsetLeft,n=e.offsetWidth,r=e.offsetHeight;f({left:t,width:n,bottom:"top"===u?r-2:0})}}),[t,l,n]),fr("div",{className:"vm-tabs",children:[n.map((function(e){return fr("div",{className:Oi()(qn({"vm-tabs-item":!0,"vm-tabs-item_active":t===e.value},e.className||"",e.className)),ref:t===e.value?l:void 0,style:{color:i},onClick:(n=e.value,function(){o(n)}),children:[e.icon&&fr("div",{className:Oi()({"vm-tabs-item__icon":!0,"vm-tabs-item__icon_single":!e.label}),children:e.icon}),e.label]},e.value);var n})),fr("div",{className:"vm-tabs__indicator",style:Kn(Kn({},s),{},{borderColor:i})})]})},Li=[{value:"chart",icon:fr(bi,{}),label:"Graph",prometheusCode:0},{value:"code",icon:fr(wi,{}),label:"JSON",prometheusCode:3},{value:"table",icon:fr(Di,{}),label:"Table",prometheusCode:1}],Pi=function(){var e=Ui().displayType,t=Hi();return fr(Mi,{activeItem:e,items:Li,onChange:function(n){var r;t({type:"SET_DISPLAY_TYPE",payload:null!==(r=n)&&void 0!==r?r:e})}})},$i=ur("g0.tab",0),Ii=Li.find((function(e){return e.prometheusCode===+$i||e.value===$i})),Ri={displayType:(null===Ii||void 0===Ii?void 0:Ii.value)||"chart",nocache:!1,isTracingEnabled:!1};function ji(e,t){switch(t.type){case"SET_DISPLAY_TYPE":return Kn(Kn({},e),{},{displayType:t.payload});case"TOGGLE_QUERY_TRACING":return Kn(Kn({},e),{},{isTracingEnabled:!e.isTracingEnabled});case"TOGGLE_NO_CACHE":return Kn(Kn({},e),{},{nocache:!e.nocache});default:throw new Error}}var zi=R({}),Ui=function(){return ue(zi).state},Hi=function(){return ue(zi).dispatch},Vi={customStep:parseFloat(ur("g0.step_input","0")),yaxis:{limits:{enable:!1,range:{1:[0,0]}}}};function Yi(e,t){switch(t.type){case"TOGGLE_ENABLE_YAXIS_LIMITS":return Kn(Kn({},e),{},{yaxis:Kn(Kn({},e.yaxis),{},{limits:Kn(Kn({},e.yaxis.limits),{},{enable:!e.yaxis.limits.enable})})});case"SET_CUSTOM_STEP":return Kn(Kn({},e),{},{customStep:t.payload});case"SET_YAXIS_LIMITS":return Kn(Kn({},e),{},{yaxis:Kn(Kn({},e.yaxis),{},{limits:Kn(Kn({},e.yaxis.limits),{},{range:t.payload})})});default:throw new Error}}var qi=R({}),Wi=function(){return ue(qi).dispatch},Qi={runQuery:0,topN:ur("topN",10),date:ur("date",yr()(new Date).format(wr)),focusLabel:ur("focusLabel",""),match:ur("match",""),extraLabel:ur("extra_label","")};function Gi(e,t){switch(t.type){case"SET_TOP_N":return Kn(Kn({},e),{},{topN:t.payload});case"SET_DATE":return Kn(Kn({},e),{},{date:t.payload});case"SET_MATCH":return Kn(Kn({},e),{},{match:t.payload});case"SET_EXTRA_LABEL":return Kn(Kn({},e),{},{extraLabel:t.payload});case"SET_FOCUS_LABEL":return Kn(Kn({},e),{},{focusLabel:t.payload});case"RUN_QUERY":return Kn(Kn({},e),{},{runQuery:e.runQuery+1});default:throw new Error}}var Ji=R({}),Zi=function(){return ue(Ji).state},Ki=function(){return ue(Ji).dispatch},Xi={topN:ur("topN",null),maxLifetime:ur("maxLifetime",""),runQuery:0};function eo(e,t){switch(t.type){case"SET_TOP_N":return Kn(Kn({},e),{},{topN:t.payload});case"SET_MAX_LIFE_TIME":return Kn(Kn({},e),{},{maxLifetime:t.payload});case"SET_RUN_QUERY":return Kn(Kn({},e),{},{runQuery:e.runQuery+1});default:throw new Error}}var to,no=R({}),ro=function(){return ue(no).state},io={success:fr(ci,{}),error:fr(li,{}),warning:fr(ui,{}),info:fr(ai,{})},oo=function(e){var t=e.variant,n=e.children;return fr("div",{className:Oi()(qn({"vm-alert":!0},"vm-alert_".concat(t),t)),children:[fr("div",{className:"vm-alert__icon",children:io[t||"info"]}),fr("div",{className:"vm-alert__content",children:n})]})},ao=R({showInfoMessage:function(){}}),uo=function(){return ue(ao)},lo=function(){for(var e=arguments.length,t=new Array(e),n=0;nd,v=r.top-20<0,m=r.left+g.width+20>f,y=r.left-20<0;return h&&(r.top=t.top-g.height-u),v&&(r.top=t.height+t.top+u),m&&(r.left=t.right-g.width-l),y&&(r.left=t.left+l),r}),[n,i,p,t]);d&&so(b,(function(){return v(!1)}),n);var x=Oi()(qn({"vm-popper":!0,"vm-popper_open":p},"vm-popper_open_".concat(l),l));return fr(m,{children:p&&mt.createPortal(fr("div",{className:x,ref:b,style:w,children:t}),document.body)})},ho=function(e){var t=e.children,n=e.title,r=e.open,i=e.placement,o=void 0===i?"bottom-center":i,a=e.offset,u=void 0===a?{top:6,left:0}:a,l=_t(X(!1),2),c=l[0],s=l[1],f=_t(X({width:0,height:0}),2),d=f[0],h=f[1],p=re(null),v=re(null),y=function(){return s(!1)};te((function(){return window.addEventListener("scroll",y),function(){window.removeEventListener("scroll",y)}}),[]),te((function(){v.current&&c&&h({width:v.current.clientWidth,height:v.current.clientHeight})}),[c]);var g=oe((function(){var e,t=null===p||void 0===p||null===(e=p.current)||void 0===e?void 0:e.base;if(!t||!c)return{};var n=t.getBoundingClientRect(),r={top:0,left:0},i="bottom-right"===o||"top-right"===o,a="bottom-left"===o||"top-left"===o,l=null===o||void 0===o?void 0:o.includes("top"),s=(null===u||void 0===u?void 0:u.top)||0,f=(null===u||void 0===u?void 0:u.left)||0;r.left=n.left-(d.width-n.width)/2+f,r.top=n.height+n.top+s,i&&(r.left=n.right-d.width),a&&(r.left=n.left+f),l&&(r.top=n.top-d.height-s);var h=window,v=h.innerWidth,m=h.innerHeight,y=r.top+d.height+20>m,g=r.top-20<0,_=r.left+d.width+20>v,b=r.left-20<0;return y&&(r.top=n.top-d.height-s),g&&(r.top=n.height+n.top+s),_&&(r.left=n.right-d.width-f),b&&(r.left=n.left+f),r.top<0&&(r.top=20),r.left<0&&(r.left=20),r}),[p,o,c,d]),_=function(){"boolean"!==typeof r&&s(!0)},b=function(){s(!1)};return te((function(){"boolean"===typeof r&&s(r)}),[r]),te((function(){var e,t=null===p||void 0===p||null===(e=p.current)||void 0===e?void 0:e.base;if(t)return t.addEventListener("mouseenter",_),t.addEventListener("mouseleave",b),function(){t.removeEventListener("mouseenter",_),t.removeEventListener("mouseleave",b)}}),[p]),fr(m,{children:[fr(m,{ref:p,children:t}),c&&mt.createPortal(fr("div",{className:"vm-tooltip",ref:v,style:g,children:n}),document.body)]})},po=[{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"}],vo=function(){var e=Qr(),t=er(),n=_t(X(!1),2),r=n[0],i=n[1],o=_t(X(po[0]),2),a=o[0],u=o[1];te((function(){var t,n=a.seconds;return r?t=setInterval((function(){e({type:"RUN_QUERY"})}),1e3*n):u(po[0]),function(){t&&clearInterval(t)}}),[a,r]);var l=_t(X(!1),2),c=l[0],s=l[1],f=re(null),d=function(e){return function(){!function(e){(r&&!e.seconds||!r&&e.seconds)&&i((function(e){return!e})),u(e),s(!1)}(e)}};return fr(m,{children:[fr("div",{className:"vm-execution-controls",children:fr("div",{className:Oi()({"vm-execution-controls-buttons":!0,"vm-header-button":!t}),children:[fr(ho,{title:"Refresh dashboard",children:fr(co,{variant:"contained",color:"primary",onClick:function(){e({type:"RUN_QUERY"})},startIcon:fr(si,{})})}),fr(ho,{title:"Auto-refresh control",children:fr("div",{ref:f,children:fr(co,{variant:"contained",color:"primary",fullWidth:!0,endIcon:fr("div",{className:Oi()({"vm-execution-controls-buttons__arrow":!0,"vm-execution-controls-buttons__arrow_open":c}),children:fr(fi,{})}),onClick:function(){s((function(e){return!e}))},children:a.title})})})]})}),fr(fo,{open:c,placement:"bottom-right",onClose:function(){s(!1)},buttonRef:f,children:fr("div",{className:"vm-execution-controls-list",children:po.map((function(e){return fr("div",{className:Oi()({"vm-list__item":!0,"vm-list__item_active":e.seconds===a.seconds}),onClick:d(e),children:e.title},e.seconds)}))})})]})},mo=function(e){var t=e.relativeTime,n=e.setDuration;return fr("div",{className:"vm-time-duration",children:$r.map((function(e){var r,i=e.id,o=e.duration,a=e.until,u=e.title;return fr("div",{className:Oi()({"vm-list__item":!0,"vm-list__item_active":i===t}),onClick:(r={duration:o,until:a(),id:i},function(){n(r)}),children:u||o},i)}))})},yo=function(e){var t=_t(X({width:0,height:0}),2),n=t[0],r=t[1];return te((function(){var t=new ResizeObserver((function(e){var t=e[0].contentRect,n=t.width,i=t.height;r({width:n,height:i})}));return e&&t.observe(e),function(){e&&t.unobserve(e)}}),[]),n},go=function(e){var t=e.viewDate,n=e.displayYears,r=e.onChangeViewDate;return fr("div",{className:"vm-calendar-header",children:[fr("div",{className:"vm-calendar-header-left",onClick:e.toggleDisplayYears,children:[fr("span",{className:"vm-calendar-header-left__date",children:t.format("MMMM YYYY")}),fr("div",{className:"vm-calendar-header-left__select-year",children:fr(hi,{})})]}),!n&&fr("div",{className:"vm-calendar-header-right",children:[fr("div",{className:"vm-calendar-header-right__prev",onClick:function(){r(t.subtract(1,"month"))},children:fr(fi,{})}),fr("div",{className:"vm-calendar-header-right__next",onClick:function(){r(t.add(1,"month"))},children:fr(fi,{})})]})]})},_o=["Sunday","Monday","Tuesday","Wednesday","Thursday","Friday","Saturday"],bo=function(e){var t=e.viewDate,n=e.selectDate,r=e.onChangeSelectDate,i=yr()().startOf("day"),o=oe((function(){var e=new Array(42).fill(null),n=t.startOf("month"),r=t.endOf("month").diff(n,"day")+1,i=new Array(r).fill(n).map((function(e,t){return e.add(t,"day")})),o=n.day();return e.splice.apply(e,[o,r].concat(bt(i))),e}),[t]),a=function(e){return function(){e&&r(e)}};return fr("div",{className:"vm-calendar-body",children:[_o.map((function(e){return fr("div",{className:"vm-calendar-body-cell vm-calendar-body-cell_weekday",children:e[0]},e)})),o.map((function(e,t){return fr("div",{className:Oi()({"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.toISOString())===n.startOf("day").toISOString(),"vm-calendar-body-cell_day_today":(e&&e.toISOString())===i.toISOString()}),onClick:a(e),children:e&&e.format("D")},e?e.toISOString():t)}))]})},Do=function(e){var t=e.viewDate,n=e.onChangeViewDate,r=oe((function(){return t.format("YYYY")}),[t]),i=oe((function(){var e=yr()().subtract(103,"year");return new Array(206).fill(e).map((function(e,t){return e.add(t,"year")}))}),[t]);te((function(){var e=document.getElementById("vm-calendar-year-".concat(r));e&&e.scrollIntoView({block:"center"})}),[]);return fr("div",{className:"vm-calendar-years",children:i.map((function(e){return fr("div",{className:Oi()({"vm-calendar-years__year":!0,"vm-calendar-years__year_selected":e.format("YYYY")===r}),id:"vm-calendar-year-".concat(e.format("YYYY")),onClick:(t=e,function(){n(t)}),children:e.format("YYYY")},e.format("YYYY"));var t}))})};!function(e){e[e.hour=0]="hour",e[e.minutes=1]="minutes",e[e.seconds=2]="seconds"}(to||(to={}));var wo,xo=function(e){var t=e.selectDate,n=e.onChangeTime,r=e.onClose,i=_t(X(to.hour),2),o=i[0],a=i[1],u=_t(X(t.format("HH")),2),l=u[0],c=u[1],s=_t(X(t.format("mm")),2),f=s[0],d=s[1],h=_t(X(t.format("ss")),2),p=h[0],v=h[1],m=oe((function(){return o===to.hour?new Array(24).fill("00").map((function(e,t){return{value:t,degrees:t/12*360,offset:0===t||t>12,title:t?"".concat(t):e}})):new Array(60).fill("00").map((function(e,t){return{value:t,degrees:t/60*360,offset:!1,title:t?"".concat(t):e}}))}),[o,l,f,p]),y=oe((function(){switch(o){case to.hour:return+l/12*360;case to.minutes:return+f/60*360;case to.seconds:return+p/60*360}}),[o,l,f,p]),g=re(null),_=re(null),b=re(null),D=function(e){return function(t){!function(e,t){t.target.select(),a(e)}(e,t)}};return te((function(){n("".concat(l,":").concat(f,":").concat(p))}),[l,f,p]),te((function(){c(t.format("HH")),d(t.format("mm")),v(t.format("ss"))}),[t]),te((function(){g.current&&g.current.focus()}),[]),fr("div",{className:"vm-calendar-time-picker",children:[fr("div",{className:"vm-calendar-time-picker-clock",children:[fr("div",{className:Oi()({"vm-calendar-time-picker-clock__arrow":!0,"vm-calendar-time-picker-clock__arrow_offset":o===to.hour&&("00"===l||+l>12)}),style:{transform:"rotate(".concat(y,"deg)")}}),m.map((function(e){return fr("div",{className:Oi()({"vm-calendar-time-picker-clock__time":!0,"vm-calendar-time-picker-clock__time_offset":e.offset,"vm-calendar-time-picker-clock__time_hide":m.length>24&&e.value%5}),style:{transform:"rotate(".concat(e.degrees,"deg)")},onClick:(t=e.value,function(){var e=String(t);switch(o){case to.hour:c(e),_.current&&_.current.focus();break;case to.minutes:d(e),b.current&&b.current.focus();break;case to.seconds:v(e),r()}}),children:fr("span",{style:{transform:"rotate(-".concat(e.degrees,"deg)")},children:e.title})},e.value);var t}))]}),fr("div",{className:"vm-calendar-time-picker-fields",children:[fr("input",{className:"vm-calendar-time-picker-fields__input",value:l,onChange:function(e){var t=e.target,n=t.value,r=+n>23?"23":n;t.value=r,c(r),n.length>1&&_.current&&_.current.focus()},onFocus:D(to.hour),ref:g,type:"number",min:0,max:24}),fr("span",{children:":"}),fr("input",{className:"vm-calendar-time-picker-fields__input",value:f,onChange:function(e){var t=e.target,n=t.value,r=+n>59?"59":n;t.value=r,d(r),n.length>1&&b.current&&b.current.focus()},onFocus:D(to.minutes),ref:_,type:"number",min:0,max:60}),fr("span",{children:":"}),fr("input",{className:"vm-calendar-time-picker-fields__input",value:p,onChange:function(e){var t=e.target,n=t.value,i=+n>59?"59":n;t.value=i,v(i),n.length>1&&b.current&&r()},onFocus:D(to.seconds),ref:b,type:"number",min:0,max:60})]})]})},ko=[{value:"date",icon:fr(vi,{})},{value:"time",icon:fr(pi,{})}],Co=function(e){var t=e.date,n=e.timepicker,r=void 0!==n&&n,i=e.format,o=void 0===i?xr:i,a=e.onChange,u=e.onClose,l=_t(X(!1),2),c=l[0],s=l[1],f=_t(X(yr()(t)),2),d=f[0],h=f[1],p=_t(X(yr()(t)),2),v=p[0],y=p[1],g=_t(X(ko[0].value),2),_=g[0],b=g[1],D=function(e){h(e),s(!1)};return te((function(){v.format()!==yr()(t).format()&&a(v.format(o))}),[v]),fr("div",{className:"vm-calendar",children:["date"===_&&fr(go,{viewDate:d,onChangeViewDate:D,toggleDisplayYears:function(){s((function(e){return!e}))},displayYears:c}),"date"===_&&fr(m,{children:[!c&&fr(bo,{viewDate:d,selectDate:v,onChangeSelectDate:function(e){y(e),r&&b("time")}}),c&&fr(Do,{viewDate:d,onChangeViewDate:D})]}),"time"===_&&fr(xo,{selectDate:v,onChangeTime:function(e){var t=_t(e.split(":"),3),n=t[0],r=t[1],i=t[2];y((function(e){return e.set("hour",+n).set("minute",+r).set("second",+i)}))},onClose:function(){u&&u()}}),r&&fr("div",{className:"vm-calendar__tabs",children:fr(Mi,{activeItem:_,items:ko,onChange:function(e){b(e)},indicatorPlacement:"top"})})]})},Eo=Ce((function(e,t){var n=e.date,r=e.targetRef,i=e.format,o=void 0===i?xr:i,a=e.timepicker,u=e.onChange,l=_t(X(!1),2),c=l[0],s=l[1],f=oe((function(){return n?yr()(n):yr()()}),[n]),d=function(){s((function(e){return!e}))},h=function(){s(!1)},p=function(e){"Escape"!==e.key&&"Enter"!==e.key||h()};return te((function(){var e;return null===(e=r.current)||void 0===e||e.addEventListener("click",d),function(){var e;null===(e=r.current)||void 0===e||e.removeEventListener("click",d)}}),[r]),te((function(){return window.addEventListener("keyup",p),function(){window.removeEventListener("keyup",p)}}),[]),fr(m,{children:fr(fo,{open:c,buttonRef:r,placement:"bottom-right",onClose:h,children:fr("div",{ref:t,children:fr(Co,{date:f,format:o,timepicker:a,onChange:function(e){a||h(),u(e)},onClose:h})})})})})),So=Eo,Ao=function(){var e=re(null),t=yo(document.body),n=oe((function(){return t.width>1120}),[t]),r=_t(X(),2),i=r[0],o=r[1],a=_t(X(),2),u=a[0],l=a[1],c=oe((function(){return yr()(u).format(xr)}),[u]),s=oe((function(){return yr()(i).format(xr)}),[i]),f=Wr(),d=f.period,h=d.end,p=d.start,v=f.relativeTime,y=Qr(),g=er();te((function(){o(Mr(Pr(h)))}),[h]),te((function(){l(Mr(Pr(p)))}),[p]);var _=oe((function(){return{start:yr()(Pr(p)).format(xr),end:yr()(Pr(h)).format(xr)}}),[p,h]),b=oe((function(){return v&&"none"!==v?v.replace(/_/g," "):"".concat(_.start," - ").concat(_.end)}),[v,_]),D=re(null),w=re(null),x=re(null),k=re(null),C=_t(X(!1),2),E=C[0],S=C[1],A=re(null),F=function(){S(!1)};return so(e,(function(e){var t,n,r=e.target,i=(null===D||void 0===D?void 0:D.current)&&D.current.contains(r),o=(null===w||void 0===w?void 0:w.current)&&w.current.contains(r),a=(null===x||void 0===x?void 0:x.current)&&(null===x||void 0===x||null===(t=x.current)||void 0===t?void 0:t.contains(r)),u=(null===k||void 0===k?void 0:k.current)&&(null===k||void 0===k||null===(n=k.current)||void 0===n?void 0:n.contains(r));i||o||a||u||F()})),fr(m,{children:[fr("div",{ref:A,children:fr(ho,{title:"Time range controls",children:fr(co,{className:g?"":"vm-header-button",variant:"contained",color:"primary",startIcon:fr(pi,{}),onClick:function(){S((function(e){return!e}))},children:n&&fr("span",{children:b})})})}),fr(fo,{open:E,buttonRef:A,placement:"bottom-right",onClose:F,clickOutside:!1,children:fr("div",{className:"vm-time-selector",ref:e,children:[fr("div",{className:"vm-time-selector-left",children:[fr("div",{className:"vm-time-selector-left-inputs",children:[fr("div",{className:"vm-time-selector-left-inputs__date",ref:D,children:[fr("label",{children:"From:"}),fr("span",{children:c}),fr(vi,{}),fr(So,{ref:x,date:u||"",onChange:function(e){return l(e)},targetRef:D,timepicker:!0})]}),fr("div",{className:"vm-time-selector-left-inputs__date",ref:w,children:[fr("label",{children:"To:"}),fr("span",{children:s}),fr(vi,{}),fr(So,{ref:k,date:i||"",onChange:function(e){return o(e)},targetRef:w,timepicker:!0})]})]}),fr(co,{variant:"text",startIcon:fr(mi,{}),onClick:function(){return y({type:"RUN_QUERY_TO_NOW"})},children:"switch to now"}),fr("div",{className:"vm-time-selector-left__controls",children:[fr(co,{color:"error",variant:"outlined",onClick:function(){o(Mr(Pr(h))),l(Mr(Pr(p))),S(!1)},children:"Cancel"}),fr(co,{color:"primary",onClick:function(){return u&&i&&y({type:"SET_PERIOD",payload:{from:new Date(u),to:new Date(i)}}),void S(!1)},children:"Apply"})]})]}),fr(mo,{relativeTime:v||"",setDuration:function(e){var t=e.duration,n=e.until,r=e.id;y({type:"SET_RELATIVE_TIME",payload:{duration:t,until:n,id:r}}),S(!1)}})]})})]})};!function(e){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"}(wo||(wo={}));var Fo=function(e){var t=e.label,n=e.value,r=e.type,i=void 0===r?"text":r,o=e.error,a=void 0===o?"":o,u=e.endIcon,l=e.startIcon,c=e.disabled,s=void 0!==c&&c,f=e.autofocus,d=void 0!==f&&f,h=e.helperText,p=e.onChange,v=e.onEnter,m=e.onKeyDown,y=re(null),g=re(null),_=oe((function(){return"textarea"===i?g:y}),[i]),b=Oi()({"vm-text-field__input":!0,"vm-text-field__input_error":a,"vm-text-field__input_icon-start":l,"vm-text-field__input_disabled":s,"vm-text-field__input_textarea":"textarea"===i}),D=function(e){m&&m(e),"Enter"!==e.key||e.shiftKey||(e.preventDefault(),v&&v())},w=function(e){s||p&&p(e.target.value)};return te((function(){var e;d&&(null===_||void 0===_||null===(e=_.current)||void 0===e?void 0:e.focus)&&_.current.focus()}),[_,d]),fr("label",{className:Oi()({"vm-text-field":!0,"vm-text-field_textarea":"textarea"===i}),"data-replicated-value":n,children:[l&&fr("div",{className:"vm-text-field__icon-start",children:l}),u&&fr("div",{className:"vm-text-field__icon-end",children:u}),"textarea"===i?fr("textarea",{className:b,disabled:s,ref:g,value:n,onInput:w,onKeyDown:D,rows:1}):fr("input",{className:b,disabled:s,ref:y,value:n,onInput:w,onKeyDown:D,type:i}),t&&fr("span",{className:"vm-text-field__label",children:t}),fr("span",{className:"vm-text-field__error","data-show":!!a,children:a}),h&&!a&&fr("span",{className:"vm-text-field__helper-text",children:h})]})},No=function(e){var t;try{t=new URL(e)}catch(g){return!1}return"http:"===t.protocol||"https:"===t.protocol},Oo=function(e){var t=e.setServer,n=e.onEnter,r=hr().serverUrl,i=_t(X(""),2),o=i[0],a=i[1],u=_t(X(r),2),l=u[0],c=u[1];return fr(Fo,{autofocus:!0,label:"Server URL",value:l,error:o,onChange:function(e){var n=e||"";c(n),t(n),a(""),n||a(wo.emptyServer),No(n)||a(wo.validServer)},onEnter:function(){n(l)}})},To=function(e){var t=e.title,n=e.children,r=e.onClose,i=function(e){"Escape"===e.key&&r()};return te((function(){return window.addEventListener("keyup",i),function(){window.removeEventListener("keyup",i)}}),[]),mt.createPortal(fr("div",{className:"vm-modal",onMouseDown:r,children:fr("div",{className:"vm-modal-content",children:[fr("div",{className:"vm-modal-content-header",children:[t&&fr("div",{className:"vm-modal-content-header__title",children:t}),fr("div",{className:"vm-modal-header__close",children:fr(co,{variant:"text",size:"small",onClick:r,children:fr(ii,{})})})]}),fr("div",{className:"vm-modal-content-body",onMouseDown:function(e){e.stopPropagation()},children:n})]})}),document.body)},Bo="Setting Server URL",Mo=function(){var e=hr().serverUrl,t=pr(),n=_t(X(e),2),r=n[0],i=n[1],o=function(e){t({type:"SET_SERVER",payload:e||r}),c()},a=_t(X(!1),2),u=a[0],l=a[1],c=function(){return l(!1)};return fr(m,{children:[fr(ho,{title:Bo,children:fr(co,{className:"vm-header-button",variant:"contained",color:"primary",startIcon:fr(ri,{}),onClick:function(){return l(!0)}})}),u&&fr(To,{title:Bo,onClose:c,children:fr("div",{className:"vm-server-configurator",children:[fr("div",{className:"vm-server-configurator__input",children:fr(Oo,{setServer:i,onEnter:o})}),fr("div",{className:"vm-server-configurator__footer",children:[fr(co,{variant:"outlined",color:"error",onClick:c,children:"Cancel"}),fr(co,{variant:"contained",onClick:function(){o()},children:"apply"})]})]})})]})},Lo={windows:"Windows",mac:"Mac OS",linux:"Linux"},Po=(Object.values(Lo).find((function(e){return navigator.userAgent.indexOf(e)>=0}))||"unknown")===Lo.mac?"Cmd":"Ctrl",$o=[{title:"Query",list:[{keys:["Enter"],description:"Run"},{keys:["Shift","Enter"],description:"Multi-line queries"},{keys:[Po,"Arrow Up"],description:"Previous command from the Query history"},{keys:[Po,"Arrow Down"],description:"Next command from the Query history"}]},{title:"Graph",list:[{keys:[Po,"Scroll Up"],description:"Zoom in"},{keys:[Po,"Scroll Down"],description:"Zoom out"},{keys:[Po,"Click and Drag"],description:"Move the graph left/right"}]},{title:"Legend",list:[{keys:["Mouse Click"],description:"Select series"},{keys:[Po,"Mouse Click"],description:"Toggle multiple series"}]}],Io=function(){var e=_t(X(!1),2),t=e[0],n=e[1],r=er();return fr(m,{children:[fr(ho,{title:"Shortcut keys",placement:"bottom-center",children:fr(co,{className:r?"":"vm-header-button",variant:"contained",color:"primary",startIcon:fr(yi,{}),onClick:function(){n(!0)}})}),t&&fr(To,{title:"Shortcut keys",onClose:function(){n(!1)},children:fr("div",{className:"vm-shortcuts",children:$o.map((function(e){return fr("div",{className:"vm-shortcuts-section",children:[fr("h3",{className:"vm-shortcuts-section__title",children:e.title}),fr("div",{className:"vm-shortcuts-section-list",children:e.list.map((function(e){return fr("div",{className:"vm-shortcuts-section-list-item",children:[fr("div",{className:"vm-shortcuts-section-list-item__key",children:e.keys.map((function(t,n){return fr(m,{children:[fr("code",{children:t},t),n!==e.keys.length-1?"+":""]})}))}),fr("p",{className:"vm-shortcuts-section-list-item__description",children:e.description})]},e.keys.join("+"))}))})]},e.title)}))})})]})},Ro=function(){var e=er(),t=re(null),n=Zi().date,r=Ki(),i=oe((function(){return yr()(n).format(wr)}),[n]);return fr("div",{children:[fr("div",{ref:t,children:fr(ho,{title:"Date control",children:fr(co,{className:e?"":"vm-header-button",variant:"contained",color:"primary",startIcon:fr(vi,{}),children:i})})}),fr(So,{date:n||"",format:wr,onChange:function(e){r({type:"SET_DATE",payload:e})},targetRef:t})]})},jo=function(){var e=Ti("color-primary"),t=er(),n=Xn().headerStyles,r=(n=void 0===n?{}:n).background,i=void 0===r?t?"#FFF":e:r,o=n.color,a=void 0===o?t?e:"#FFF":o,u=Sn(),l=En(),c=l.search,s=l.pathname,f=oe((function(){return[{label:"Custom panel",value:Jn.home},{label:"Dashboards",value:Jn.dashboards,hide:t},{label:"Cardinality",value:Jn.cardinality},{label:"Top queries",value:Jn.topQueries},{label:"Trace analyzer",value:Jn.trace}]}),[t]),d=_t(X(s),2),h=d[0],p=d[1],v=oe((function(){return(Gn[s]||{}).header||{}}),[s]),m=function(e){u({pathname:e,search:c})};return te((function(){p(s)}),[s]),fr("header",{className:Oi()({"vm-header":!0,"vm-header_app":t}),style:{background:i,color:a},children:[!t&&fr("div",{className:"vm-header-logo",style:{color:a},children:[fr("div",{className:"vm-header-logo__icon",onClick:function(){m(Jn.home),ar({}),window.location.reload()},children:fr(ni,{})}),fr("a",{className:"vm-header-logo__issue",target:"_blank",href:"https://github.com/VictoriaMetrics/VictoriaMetrics/issues/new",rel:"noreferrer",children:"create an issue"})]}),fr("div",{className:"vm-header-nav",children:fr(Mi,{activeItem:h,items:f.filter((function(e){return!e.hide})),color:a,onChange:function(e){p(e),u(e)}})}),fr("div",{className:"vm-header__settings",children:[(null===v||void 0===v?void 0:v.timeSelector)&&fr(Ao,{}),(null===v||void 0===v?void 0:v.cardinalityDatePicker)&&fr(Ro,{}),(null===v||void 0===v?void 0:v.executionControls)&&fr(vo,{}),(null===v||void 0===v?void 0:v.globalSettings)&&!t&&fr(Mo,{}),fr(Io,{})]})]})},zo=function(){var e=er();return fr("section",{className:"vm-container",children:[fr(jo,{}),fr("div",{className:Oi()({"vm-container-body":!0,"vm-container-body_app":e}),children:fr($n,{})})]})};function Uo(e,t){var n="undefined"!==typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(!n){if(Array.isArray(e)||(n=gt(e))||t&&e&&"number"===typeof e.length){n&&(e=n);var r=0,i=function(){};return{s:i,n:function(){return r>=e.length?{done:!0}:{done:!1,value:e[r++]}},e:function(e){throw e},f:i}}throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}var o,a=!0,u=!1;return{s:function(){n=n.call(e)},n:function(){var e=n.next();return a=e.done,e},e:function(e){u=!0,o=e},f:function(){try{a||null==n.return||n.return()}finally{if(u)throw o}}}}var Ho,Vo,Yo="u-off",qo="u-label",Wo="width",Qo="height",Go="top",Jo="bottom",Zo="left",Ko="right",Xo="#000",ea="#0000",ta="mousemove",na="mousedown",ra="mouseup",ia="mouseenter",oa="mouseleave",aa="dblclick",ua="change",la="dppxchange",ca="undefined"!=typeof window,sa=ca?document:null,fa=ca?window:null,da=ca?navigator:null;function ha(e,t){if(null!=t){var n=e.classList;!n.contains(t)&&n.add(t)}}function pa(e,t){var n=e.classList;n.contains(t)&&n.remove(t)}function va(e,t,n){e.style[t]=n+"px"}function ma(e,t,n,r){var i=sa.createElement(e);return null!=t&&ha(i,t),null!=n&&n.insertBefore(i,r),i}function ya(e,t){return ma("div",e,t)}var ga=new WeakMap;function _a(e,t,n,r,i){var o="translate("+t+"px,"+n+"px)";o!=ga.get(e)&&(e.style.transform=o,ga.set(e,o),t<0||n<0||t>r||n>i?ha(e,Yo):pa(e,Yo))}var ba=new WeakMap;function Da(e,t,n){var r=t+n;r!=ba.get(e)&&(ba.set(e,r),e.style.background=t,e.style.borderColor=n)}var wa=new WeakMap;function xa(e,t,n,r){var i=t+""+n;i!=wa.get(e)&&(wa.set(e,i),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)}var ka={passive:!0},Ca=Kn(Kn({},ka),{},{capture:!0});function Ea(e,t,n,r){t.addEventListener(e,n,r?Ca:ka)}function Sa(e,t,n,r){t.removeEventListener(e,n,r?Ca:ka)}function Aa(e,t,n,r){var i;n=n||0;for(var o=(r=r||t.length-1)<=2147483647;r-n>1;)t[i=o?n+r>>1:Wa((n+r)/2)]=t&&i<=n;i+=r)if(null!=e[i])return i;return-1}function Na(e,t,n,r){var i=ru,o=-ru;if(1==r)i=e[t],o=e[n];else if(-1==r)i=e[n],o=e[t];else for(var a=t;a<=n;a++)null!=e[a]&&(i=Ja(i,e[a]),o=Za(o,e[a]));return[i,o]}function Oa(e,t,n){for(var r=ru,i=-ru,o=t;o<=n;o++)e[o]>0&&(r=Ja(r,e[o]),i=Za(i,e[o]));return[r==ru?1:r,i==-ru?10:i]}ca&&function e(){var t=devicePixelRatio;Ho!=t&&(Ho=t,Vo&&Sa(ua,Vo,e),Vo=matchMedia("(min-resolution: ".concat(Ho-.001,"dppx) and (max-resolution: ").concat(Ho+.001,"dppx)")),Ea(ua,Vo,e),fa.dispatchEvent(new CustomEvent(la)))}();var Ta=[0,0];function Ba(e,t,n,r){return Ta[0]=n<0?vu(e,-n):e,Ta[1]=r<0?vu(t,-r):t,Ta}function Ma(e,t,n,r){var i,o,a,u=Xa(e),l=10==n?eu:tu;return e==t&&(-1==u?(e*=n,t/=n):(e/=n,t*=n)),r?(i=Wa(l(e)),o=Ga(l(t)),e=(a=Ba(Ka(n,i),Ka(n,o),i,o))[0],t=a[1]):(i=Wa(l(qa(e))),o=Wa(l(qa(t))),e=pu(e,(a=Ba(Ka(n,i),Ka(n,o),i,o))[0]),t=hu(t,a[1])),[e,t]}function La(e,t,n,r){var i=Ma(e,t,n,r);return 0==e&&(i[0]=0),0==t&&(i[1]=0),i}var Pa={mode:3,pad:.1},$a={pad:0,soft:null,mode:0},Ia={min:$a,max:$a};function Ra(e,t,n,r){return ku(n)?za(e,t,n):($a.pad=n,$a.soft=r?0:null,$a.mode=r?3:0,za(e,t,Ia))}function ja(e,t){return null==e?t:e}function za(e,t,n){var r=n.min,i=n.max,o=ja(r.pad,0),a=ja(i.pad,0),u=ja(r.hard,-ru),l=ja(i.hard,ru),c=ja(r.soft,ru),s=ja(i.soft,-ru),f=ja(r.mode,0),d=ja(i.mode,0),h=t-e;h<1e-9&&(h=0,0!=e&&0!=t||(h=1e-9,2==f&&c!=ru&&(o=0),2==d&&s!=-ru&&(a=0)));var p=h||qa(t)||1e3,v=eu(p),m=Ka(10,Wa(v)),y=vu(pu(e-p*(0==h?0==e?.1:1:o),m/10),9),g=e>=c&&(1==f||3==f&&y<=c||2==f&&y>=c)?c:ru,_=Za(u,y=g?g:Ja(g,y)),b=vu(hu(t+p*(0==h?0==t?.1:1:a),m/10),9),D=t<=s&&(1==d||3==d&&b>=s||2==d&&b<=s)?s:-ru,w=Ja(l,b>D&&t<=D?D:Za(D,b));return _==w&&0==_&&(w=100),[_,w]}var Ua=new Intl.NumberFormat(ca?da.language:"en-US"),Ha=function(e){return Ua.format(e)},Va=Math,Ya=Va.PI,qa=Va.abs,Wa=Va.floor,Qa=Va.round,Ga=Va.ceil,Ja=Va.min,Za=Va.max,Ka=Va.pow,Xa=Va.sign,eu=Va.log10,tu=Va.log2,nu=function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:1;return Va.asinh(e/t)},ru=1/0;function iu(e){return 1+(0|eu((e^e>>31)-(e>>31)))}function ou(e,t){return Qa(e/t)*t}function au(e,t,n){return Ja(Za(e,t),n)}function uu(e){return"function"==typeof e?e:function(){return e}}var lu=function(e){return e},cu=function(e,t){return t},su=function(e){return null},fu=function(e){return!0},du=function(e,t){return e==t};function hu(e,t){return Ga(e/t)*t}function pu(e,t){return Wa(e/t)*t}function vu(e,t){return Qa(e*(t=Math.pow(10,t)))/t}var mu=new Map;function yu(e){return((""+e).split(".")[1]||"").length}function gu(e,t,n,r){for(var i=[],o=r.map(yu),a=t;a=0&&a>=0?0:u)+(a>=o[c]?0:o[c]),d=vu(s,f);i.push(d),mu.set(d,f)}return i}var _u={},bu=[],Du=[null,null],wu=Array.isArray;function xu(e){return"string"==typeof e}function ku(e){var t=!1;if(null!=e){var n=e.constructor;t=null==n||n==Object}return t}function Cu(e){return null!=e&&"object"==typeof e}var Eu=Object.getPrototypeOf(Uint8Array);function Su(e){var t,n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:ku;if(wu(e)){var r=e.find((function(e){return null!=e}));if(wu(r)||n(r)){t=Array(e.length);for(var i=0;io){for(r=a-1;r>=0&&null==e[r];)e[r--]=null;for(r=a+1;r12?t-12:t},AA:function(e){return e.getHours()>=12?"PM":"AM"},aa:function(e){return e.getHours()>=12?"pm":"am"},a:function(e){return e.getHours()>=12?"p":"a"},mm:function(e){return $u(e.getMinutes())},m:function(e){return e.getMinutes()},ss:function(e){return $u(e.getSeconds())},s:function(e){return e.getSeconds()},fff:function(e){return((t=e.getMilliseconds())<10?"00":t<100?"0":"")+t;var t}};function Ru(e,t){t=t||Pu;for(var n,r=[],i=/\{([a-z]+)\}|[^{]+/gi;n=i.exec(e);)r.push("{"==n[0][0]?Iu[n[1]]:n[0]);return function(e){for(var n="",i=0;i=a,v=f>=o&&f=i?i:f,N=_+(Wa(c)-Wa(y))+hu(y-_,F);h.push(N);for(var O=t(N),T=O.getHours()+O.getMinutes()/n+O.getSeconds()/r,B=f/r,M=d/u.axes[l]._space;!((N=vu(N+f,1==e?0:3))>s);)if(B>1){var L=Wa(vu(T+B,6))%24,P=t(N).getHours()-L;P>1&&(P=-1),T=(T+B)%24,vu(((N-=P*r)-h[h.length-1])/f,3)*M>=.7&&h.push(N)}else h.push(N)}return h}}]}var il=_t(rl(1),3),ol=il[0],al=il[1],ul=il[2],ll=_t(rl(.001),3),cl=ll[0],sl=ll[1],fl=ll[2];function dl(e,t){return e.map((function(e){return e.map((function(n,r){return 0==r||8==r||null==n?n:t(1==r||0==e[8]?n:e[1]+n)}))}))}function hl(e,t){return function(n,r,i,o,a){var u,l,c,s,f,d,h=t.find((function(e){return a>=e[0]}))||t[t.length-1];return r.map((function(t){var n=e(t),r=n.getFullYear(),i=n.getMonth(),o=n.getDate(),a=n.getHours(),p=n.getMinutes(),v=n.getSeconds(),m=r!=u&&h[2]||i!=l&&h[3]||o!=c&&h[4]||a!=s&&h[5]||p!=f&&h[6]||v!=d&&h[7]||h[1];return u=r,l=i,c=o,s=a,f=p,d=v,m(n)}))}}function pl(e,t,n){return new Date(e,t,n)}function vl(e,t){return t(e)}gu(2,-53,53,[1]);function ml(e,t){return function(n,r){return t(e(r))}}var yl={show:!0,live:!0,isolate:!1,markers:{show:!0,width:2,stroke:function(e,t){var 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:[]};var gl=[0,0];function _l(e,t,n){return function(e){0==e.button&&n(e)}}function bl(e,t,n){return n}var Dl={show:!0,x:!0,y:!0,lock:!1,move:function(e,t,n){return gl[0]=t,gl[1]=n,gl},points:{show:function(e,t){var n=e.cursor.points,r=ya(),i=n.size(e,t);va(r,Wo,i),va(r,Qo,i);var o=i/-2;va(r,"marginLeft",o),va(r,"marginTop",o);var a=n.width(e,t,i);return a&&va(r,"borderWidth",a),r},size:function(e,t){return zl(e.series[t].points.width,1)},width:0,stroke:function(e,t){var n=e.series[t].points;return n._stroke||n._fill},fill:function(e,t){var n=e.series[t].points;return n._fill||n._stroke}},bind:{mousedown:_l,mouseup:_l,click:_l,dblclick:_l,mousemove:bl,mouseleave:bl,mouseenter:bl},drag:{setScale:!0,x:!0,y:!1,dist:0,uni:null,_x:!1,_y:!1},focus:{prox:-1},left:-10,top:-10,idx:null,dataIdx:function(e,t,n){return n},idxs:null},wl={show:!0,stroke:"rgba(0,0,0,0.07)",width:2},xl=Au({},wl,{filter:cu}),kl=Au({},xl,{size:10}),Cl=Au({},wl,{show:!1}),El='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"',Sl="bold "+El,Al={show:!0,scale:"x",stroke:Xo,space:50,gap:5,size:50,labelGap:0,labelSize:30,labelFont:Sl,side:2,grid:xl,ticks:kl,border:Cl,font:El,rotate:0},Fl={show:!0,scale:"x",auto:!1,sorted:1,min:ru,max:-ru,idxs:[]};function Nl(e,t,n,r,i){return t.map((function(e){return null==e?"":Ha(e)}))}function Ol(e,t,n,r,i,o,a){for(var u=[],l=mu.get(i)||0,c=n=a?n:vu(hu(n,i),l);c<=r;c=vu(c+i,l))u.push(Object.is(c,-0)?0:c);return u}function Tl(e,t,n,r,i,o,a){var u=[],l=e.scales[e.axes[t].scale].log,c=Wa((10==l?eu:tu)(n));i=Ka(l,c),c<0&&(i=vu(i,-c));var s=n;do{u.push(s),(s=vu(s+i,mu.get(i)))>=i*l&&(i=s)}while(s<=r);return u}function Bl(e,t,n,r,i,o,a){var u=e.scales[e.axes[t].scale].asinh,l=r>u?Tl(e,t,Za(u,n),r,i):[u],c=r>=0&&n<=0?[0]:[];return(n<-u?Tl(e,t,Za(u,-r),-n,i):[u]).reverse().map((function(e){return-e})).concat(c,l)}var Ml=/./,Ll=/[12357]/,Pl=/[125]/,$l=/1/;function Il(e,t,n,r,i){var o=e.axes[n],a=o.scale,u=e.scales[a];if(3==u.distr&&2==u.log)return t;var l=e.valToPos,c=o._space,s=l(10,a),f=l(9,a)-s>=c?Ml:l(7,a)-s>=c?Ll:l(5,a)-s>=c?Pl:$l;return t.map((function(e){return 4==u.distr&&0==e||f.test(e)?e:null}))}function Rl(e,t){return null==t?"":Ha(t)}var jl={show:!0,scale:"y",stroke:Xo,space:30,gap:5,size:50,labelGap:0,labelSize:30,labelFont:Sl,side:3,grid:xl,ticks:kl,border:Cl,font:El,rotate:0};function zl(e,t){return vu((3+2*(e||1))*t,3)}var Ul={scale:null,auto:!0,sorted:0,min:ru,max:-ru},Hl={show:!0,auto:!0,sorted:0,alpha:1,facets:[Au({},Ul,{scale:"x"}),Au({},Ul,{scale:"y"})]},Vl={scale:"y",auto:!0,sorted:0,show:!0,spanGaps:!1,gaps:function(e,t,n,r,i){return i},alpha:1,points:{show:function(e,t){var n=e.series[0],r=n.scale,i=n.idxs,o=e._data[0],a=e.valToPos(o[i[0]],r,!0),u=e.valToPos(o[i[1]],r,!0),l=qa(u-a)/(e.series[t].points.space*Ho);return i[1]-i[0]<=l},filter:null},values:null,min:ru,max:-ru,idxs:[],path:null,clip:null};function Yl(e,t,n,r,i){return n/10}var ql={time:!0,auto:!0,distr:1,log:10,asinh:1,min:null,max:null,dir:1,ori:0},Wl=Au({},ql,{time:!1,ori:1}),Ql={};function Gl(e,t){var n=Ql[e];return n||(n={key:e,plots:[],sub:function(e){n.plots.push(e)},unsub:function(e){n.plots=n.plots.filter((function(t){return t!=e}))},pub:function(e,t,r,i,o,a,u){for(var l=0;l0){a=new Path2D;for(var u=0==t?lc:cc,l=n,c=0;cs[0]){var f=s[0]-l;f>0&&u(a,l,r,f,r+o),l=s[1]}}var d=n+i-l;d>0&&u(a,l,r,d,r+o)}return a}function tc(e,t,n,r,i,o,a){for(var u=[],l=1==i?n:r;l>=n&&l<=r;l+=i){if(null===t[l]){var c=l,s=l;if(1==i)for(;++l<=r&&null===t[l];)s=l;else for(;--l>=n&&null===t[l];)s=l;var f=o(e[c]),d=s==c?f:o(e[s]);f=a<=0?o(e[c-i]):f,(d=a>=0?o(e[s+i]):d)>=f&&u.push([f,d])}}return u}function nc(e){return 0==e?lu:1==e?Qa:function(t){return ou(t,e)}}function rc(e){var t=0==e?ic:oc,n=0==e?function(e,t,n,r,i,o){e.arcTo(t,n,r,i,o)}:function(e,t,n,r,i,o){e.arcTo(n,t,i,r,o)},r=0==e?function(e,t,n,r,i){e.rect(t,n,r,i)}:function(e,t,n,r,i){e.rect(n,t,i,r)};return function(e,i,o,a,u){var l=arguments.length>5&&void 0!==arguments[5]?arguments[5]:0;0==l?r(e,i,o,a,u):(l=Ja(l,a/2,u/2),t(e,i+l,o),n(e,i+a,o,i+a,o+u,l),n(e,i+a,o+u,i,o+u,l),n(e,i,o+u,i,o,l),n(e,i,o,i+a,o,l),e.closePath())}}var ic=function(e,t,n){e.moveTo(t,n)},oc=function(e,t,n){e.moveTo(n,t)},ac=function(e,t,n){e.lineTo(t,n)},uc=function(e,t,n){e.lineTo(n,t)},lc=rc(0),cc=rc(1),sc=function(e,t,n,r,i,o){e.arc(t,n,r,i,o)},fc=function(e,t,n,r,i,o){e.arc(n,t,r,i,o)},dc=function(e,t,n,r,i,o,a){e.bezierCurveTo(t,n,r,i,o,a)},hc=function(e,t,n,r,i,o,a){e.bezierCurveTo(n,t,i,r,a,o)};function pc(e){return function(e,t,n,r,i){return Jl(e,t,(function(t,o,a,u,l,c,s,f,d,h,p){var v,m,y=t.pxRound,g=t.points;0==u.ori?(v=ic,m=sc):(v=oc,m=fc);var _=vu(g.width*Ho,3),b=(g.size-g.width)/2*Ho,D=vu(2*b,3),w=new Path2D,x=new Path2D,k=e.bbox,C=k.left,E=k.top,S=k.width,A=k.height;lc(x,C-D,E-D,S+2*D,A+2*D);var F=function(e){if(null!=a[e]){var t=y(c(o[e],u,h,f)),n=y(s(a[e],l,p,d));v(w,t+b,n),m(w,t,n,b,0,2*Ya)}};if(i)i.forEach(F);else for(var N=n;N<=r;N++)F(N);return{stroke:_>0?w:null,fill:w,clip:x,flags:3}}))}}function vc(e){return function(t,n,r,i,o,a){r!=i&&(o!=r&&a!=r&&e(t,n,r),o!=i&&a!=i&&e(t,n,i),e(t,n,a))}}var mc=vc(ac),yc=vc(uc);function gc(e){var t=ja(null===e||void 0===e?void 0:e.alignGaps,0);return function(e,n,r,i){return Jl(e,n,(function(o,a,u,l,c,s,f,d,h,p,v){var m,y,g=o.pxRound,_=function(e){return g(s(e,l,p,d))},b=function(e){return g(f(e,c,v,h))};0==l.ori?(m=ac,y=mc):(m=uc,y=yc);for(var D,w,x,k=l.dir*(0==l.ori?1:-1),C={stroke:new Path2D,fill:null,clip:null,band:null,gaps:null,flags:1},E=C.stroke,S=ru,A=-ru,F=_(a[1==k?r:i]),N=Fa(u,r,i,1*k),O=Fa(u,r,i,-1*k),T=_(a[N]),B=_(a[O]),M=1==k?r:i;M>=r&&M<=i;M+=k){var L=_(a[M]);L==F?null!=u[M]&&(w=b(u[M]),S==ru&&(m(E,L,w),D=w),S=Ja(w,S),A=Za(w,A)):(S!=ru&&(y(E,F,S,A,D,w),x=F),null!=u[M]?(m(E,L,w=b(u[M])),S=A=D=w):(S=ru,A=-ru),F=L)}S!=ru&&S!=A&&x!=F&&y(E,F,S,A,D,w);var P=_t(Zl(e,n),2),$=P[0],I=P[1];if(null!=o.fill||0!=$){var R=C.fill=new Path2D(E),j=b(o.fillTo(e,n,o.min,o.max,$));m(R,B,j),m(R,T,j)}if(!o.spanGaps){var z,U=[];(z=U).push.apply(z,bt(tc(a,u,r,i,k,_,t))),C.gaps=U=o.gaps(e,n,r,i,U),C.clip=ec(U,l.ori,d,h,p,v)}return 0!=I&&(C.band=2==I?[Xl(e,n,r,i,E,-1),Xl(e,n,r,i,E,1)]:Xl(e,n,r,i,E,I)),C}))}}function _c(e,t,n,r,i,o){var a=e.length;if(a<2)return null;var u=new Path2D;if(n(u,e[0],t[0]),2==a)r(u,e[1],t[1]);else{for(var l=Array(a),c=Array(a-1),s=Array(a-1),f=Array(a-1),d=0;d0!==c[h]>0?l[h]=0:(l[h]=3*(f[h-1]+f[h])/((2*f[h]+f[h-1])/c[h-1]+(f[h]+2*f[h-1])/c[h]),isFinite(l[h])||(l[h]=0));l[a-1]=c[a-2];for(var p=0;p=i&&o+(l<5?mu.get(l):0)<=17)return[l,c]}while(++u0?e:t.clamp(r,e,t.min,t.max,t.key)):4==t.distr?nu(e,t.asinh):e)-t._min)/(t._max-t._min)}function a(e,t,n,r){var i=o(e,t);return r+n*(-1==t.dir?1-i:i)}function u(e,t,n,r){var i=o(e,t);return r+n*(-1==t.dir?i:1-i)}function l(e,t,n,r){return 0==t.ori?a(e,t,n,r):u(e,t,n,r)}r.valToPosH=a,r.valToPosV=u;var c=!1;r.status=0;var s=r.root=ya("uplot");(null!=e.id&&(s.id=e.id),ha(s,e.class),e.title)&&(ya("u-title",s).textContent=e.title);var f=ma("canvas"),d=r.ctx=f.getContext("2d"),h=ya("u-wrap",s),p=r.under=ya("u-under",h);h.appendChild(f);var v=r.over=ya("u-over",h),m=+ja((e=Su(e)).pxAlign,1),y=nc(m);(e.plugins||[]).forEach((function(t){t.opts&&(e=t.opts(r,e)||e)}));var g=e.ms||.001,_=r.series=1==i?kc(e.series||[],Fl,Vl,!1):function(e,t){return e.map((function(e,n){return 0==n?null:Au({},t,e)}))}(e.series||[null],Hl),b=r.axes=kc(e.axes||[],Al,jl,!0),D=r.scales={},w=r.bands=e.bands||[];w.forEach((function(e){e.fill=uu(e.fill||null),e.dir=ja(e.dir,-1)}));var x=2==i?_[1].facets[0].scale:_[0].scale,k={axes:function(){for(var e=function(e){var t=b[e];if(!t.show||!t._show)return"continue";var n=t.side,i=n%2,o=void 0,a=void 0,u=t.stroke(r,e),c=0==n||3==n?-1:1;if(t.label){var s=t.labelGap*c,f=Qa((t._lpos+s)*Ho);Ze(t.labelFont[0],u,"center",2==n?Go:Jo),d.save(),1==i?(o=a=0,d.translate(f,Qa(de+pe/2)),d.rotate((3==n?-Ya:Ya)/2)):(o=Qa(fe+he/2),a=f),d.fillText(t.label,o,a),d.restore()}var h=_t(t._found,2),p=h[0],v=h[1];if(0==v)return"continue";var m=D[t.scale],g=0==i?he:pe,_=0==i?fe:de,w=Qa(t.gap*Ho),x=t._splits,k=2==m.distr?x.map((function(e){return qe[e]})):x,C=2==m.distr?qe[x[1]]-qe[x[0]]:p,E=t.ticks,S=t.border,A=E.show?Qa(E.size*Ho):0,F=t._rotate*-Ya/180,N=y(t._pos*Ho),O=N+(A+w)*c;a=0==i?O:0,o=1==i?O:0,Ze(t.font[0],u,1==t.align?Zo:2==t.align?Ko:F>0?Zo:F<0?Ko:0==i?"center":3==n?Ko:Zo,F||1==i?"middle":2==n?Go:Jo);for(var T=1.5*t.font[1],B=x.map((function(e){return y(l(e,m,g,_))})),M=t._values,L=0;L0&&(_.forEach((function(e,n){if(n>0&&e.show&&null==e._paths){var i=function(e){var t=au(He-1,0,Ne-1),n=au(Ve+1,0,Ne-1);for(;null==e[t]&&t>0;)t--;for(;null==e[n]&&n0&&e.show){je!=e.alpha&&(d.globalAlpha=je=e.alpha),Xe(t,!1),e._paths&&et(t,!1),Xe(t,!0);var n=e.points.show(r,t,He,Ve),i=e.points.filter(r,t,n,e._paths?e._paths.gaps:null);(n||i)&&(e.points._paths=e.points.paths(r,t,He,Ve,i),et(t,!0)),1!=je&&(d.globalAlpha=je=1),on("drawSeries",t)}})))}},C=(e.drawOrder||["axes","series"]).map((function(e){return k[e]}));function E(t){var n=D[t];if(null==n){var r=(e.scales||_u)[t]||_u;if(null!=r.from)E(r.from),D[t]=Au({},D[r.from],r,{key:t});else{(n=D[t]=Au({},t==x?ql:Wl,r)).key=t;var o=n.time,a=n.range,u=wu(a);if((t!=x||2==i&&!o)&&(!u||null!=a[0]&&null!=a[1]||(a={min:null==a[0]?Pa:{mode:1,hard:a[0],soft:a[0]},max:null==a[1]?Pa:{mode:1,hard:a[1],soft:a[1]}},u=!1),!u&&ku(a))){var l=a;a=function(e,t,n){return null==t?Du:Ra(t,n,l)}}n.range=uu(a||(o?Sc:t==x?3==n.distr?Nc:4==n.distr?Tc:Ec:3==n.distr?Fc:4==n.distr?Oc:Ac)),n.auto=uu(!u&&n.auto),n.clamp=uu(n.clamp||Yl),n._min=n._max=null}}}for(var S in E("x"),E("y"),1==i&&_.forEach((function(e){E(e.scale)})),b.forEach((function(e){E(e.scale)})),e.scales)E(S);var A,F,N=D[x],O=N.distr;0==N.ori?(ha(s,"u-hz"),A=a,F=u):(ha(s,"u-vt"),A=u,F=a);var T={};for(var B in D){var M=D[B];null==M.min&&null==M.max||(T[B]={min:M.min,max:M.max},M.min=M.max=null)}var L,P=e.tzDate||function(e){return new Date(Qa(e/g))},$=e.fmtDate||Ru,I=1==g?ul(P):fl(P),R=hl(P,dl(1==g?al:sl,$)),j=ml(P,vl("{YYYY}-{MM}-{DD} {h}:{mm}{aa}",$)),z=[],U=r.legend=Au({},yl,e.legend),H=U.show,V=U.markers;U.idxs=z,V.width=uu(V.width),V.dash=uu(V.dash),V.stroke=uu(V.stroke),V.fill=uu(V.fill);var Y,q=[],W=[],Q=!1,G={};if(U.live){var J=_[1]?_[1].values:null;for(var Z in Y=(Q=null!=J)?J(r,1,0):{_:0})G[Z]="--"}if(H)if(L=ma("table","u-legend",s),Q){var K=ma("tr","u-thead",L);for(var X in ma("th",null,K),Y)ma("th",qo,K).textContent=X}else ha(L,"u-inline"),U.live&&ha(L,"u-live");var ee={show:!0},te={show:!1};var ne=new Map;function re(e,t,n){var i=ne.get(t)||{},o=we.bind[e](r,t,n);o&&(Ea(e,t,i[e]=o),ne.set(t,i))}function ie(e,t,n){var r=ne.get(t)||{};for(var i in r)null!=e&&i!=e||(Sa(i,t,r[i]),delete r[i]);null==e&&ne.delete(t)}var oe=0,ae=0,ue=0,le=0,ce=0,se=0,fe=0,de=0,he=0,pe=0;r.bbox={};var ve=!1,me=!1,ye=!1,ge=!1,_e=!1;function be(e,t,n){(n||e!=r.width||t!=r.height)&&De(e,t),ut(!1),ye=!0,me=!0,ge=_e=we.left>=0,wt()}function De(e,t){r.width=oe=ue=e,r.height=ae=le=t,ce=se=0,function(){var e=!1,t=!1,n=!1,r=!1;b.forEach((function(i,o){if(i.show&&i._show){var a=i.side,u=a%2,l=i._size+(null!=i.label?i.labelSize:0);l>0&&(u?(ue-=l,3==a?(ce+=l,r=!0):n=!0):(le-=l,0==a?(se+=l,e=!0):t=!0))}})),Ae[0]=e,Ae[1]=n,Ae[2]=t,Ae[3]=r,ue-=Ue[1]+Ue[3],ce+=Ue[3],le-=Ue[2]+Ue[0],se+=Ue[0]}(),function(){var e=ce+ue,t=se+le,n=ce,r=se;function i(i,o){switch(i){case 1:return(e+=o)-o;case 2:return(t+=o)-o;case 3:return(n-=o)+o;case 0:return(r-=o)+o}}b.forEach((function(e,t){if(e.show&&e._show){var n=e.side;e._pos=i(n,e._size),null!=e.label&&(e._lpos=i(n,e.labelSize))}}))}();var n=r.bbox;fe=n.left=ou(ce*Ho,.5),de=n.top=ou(se*Ho,.5),he=n.width=ou(ue*Ho,.5),pe=n.height=ou(le*Ho,.5)}r.setSize=function(e){be(e.width,e.height)};var we=r.cursor=Au({},Dl,{drag:{y:2==i}},e.cursor);we.idxs=z,we._lock=!1;var xe=we.points;xe.show=uu(xe.show),xe.size=uu(xe.size),xe.stroke=uu(xe.stroke),xe.width=uu(xe.width),xe.fill=uu(xe.fill);var ke=r.focus=Au({},e.focus||{alpha:.3},we.focus),Ce=ke.prox>=0,Ee=[null];function Se(e,t){if(1==i||t>0){var n=1==i&&D[e.scale].time,o=e.value;e.value=n?xu(o)?ml(P,vl(o,$)):o||j:o||Rl,e.label=e.label||(n?"Time":"Value")}if(t>0){e.width=null==e.width?1:e.width,e.paths=e.paths||wc||su,e.fillTo=uu(e.fillTo||Kl),e.pxAlign=+ja(e.pxAlign,m),e.pxRound=nc(e.pxAlign),e.stroke=uu(e.stroke||null),e.fill=uu(e.fill||null),e._stroke=e._fill=e._paths=e._focus=null;var a=zl(e.width,1),u=e.points=Au({},{size:a,width:Za(1,.2*a),stroke:e.stroke,space:2*a,paths:xc,_stroke:null,_fill:null},e.points);u.show=uu(u.show),u.filter=uu(u.filter),u.fill=uu(u.fill),u.stroke=uu(u.stroke),u.paths=uu(u.paths),u.pxAlign=e.pxAlign}if(H){var l=function(e,t){if(0==t&&(Q||!U.live||2==i))return Du;var n=[],o=ma("tr","u-series",L,L.childNodes[t]);ha(o,e.class),e.show||ha(o,Yo);var a=ma("th",null,o);if(V.show){var u=ya("u-marker",a);if(t>0){var l=V.width(r,t);l&&(u.style.border=l+"px "+V.dash(r,t)+" "+V.stroke(r,t)),u.style.background=V.fill(r,t)}}var c=ya(qo,a);for(var s in c.textContent=e.label,t>0&&(V.show||(c.style.color=e.width>0?V.stroke(r,t):V.fill(r,t)),re("click",a,(function(t){if(!we._lock){var n=_.indexOf(e);if((t.ctrlKey||t.metaKey)!=U.isolate){var r=_.some((function(e,t){return t>0&&t!=n&&e.show}));_.forEach((function(e,t){t>0&&Pt(t,r?t==n?ee:te:ee,!0,an.setSeries)}))}else Pt(n,{show:!e.show},!0,an.setSeries)}})),Ce&&re(ia,a,(function(t){we._lock||Pt(_.indexOf(e),$t,!0,an.setSeries)}))),Y){var f=ma("td","u-value",o);f.textContent="--",n.push(f)}return[o,n]}(e,t);q.splice(t,0,l[0]),W.splice(t,0,l[1]),U.values.push(null)}if(we.show){z.splice(t,0,null);var c=function(e,t){if(t>0){var n=we.points.show(r,t);if(n)return ha(n,"u-cursor-pt"),ha(n,e.class),_a(n,-10,-10,ue,le),v.insertBefore(n,Ee[t]),n}}(e,t);c&&Ee.splice(t,0,c)}on("addSeries",t)}r.addSeries=function(e,t){e=Cc(e,t=null==t?_.length:t,Fl,Vl),_.splice(t,0,e),Se(_[t],t)},r.delSeries=function(e){if(_.splice(e,1),H){U.values.splice(e,1),W.splice(e,1);var t=q.splice(e,1)[0];ie(null,t.firstChild),t.remove()}we.show&&(z.splice(e,1),Ee.length>1&&Ee.splice(e,1)[0].remove()),on("delSeries",e)};var Ae=[!1,!1,!1,!1];function Fe(e,t,n,r){var i=_t(n,4),o=i[0],a=i[1],u=i[2],l=i[3],c=t%2,s=0;return 0==c&&(l||a)&&(s=0==t&&!o||2==t&&!u?Qa(Al.size/3):0),1==c&&(o||u)&&(s=1==t&&!a||3==t&&!l?Qa(jl.size/2):0),s}var Ne,Oe,Te,Be,Me,Le,Pe,$e,Ie,Re,je,ze=r.padding=(e.padding||[Fe,Fe,Fe,Fe]).map((function(e){return uu(ja(e,Fe))})),Ue=r._padding=ze.map((function(e,t){return e(r,t,Ae,0)})),He=null,Ve=null,Ye=1==i?_[0].idxs:null,qe=null,We=!1;function Qe(e,n){if(t=null==e?[]:Su(e,Cu),2==i){Ne=0;for(var o=1;o<_.length;o++)Ne+=t[o][0].length;r.data=t=e}else if(null==t[0]&&(t[0]=[]),r.data=t.slice(),qe=t[0],Ne=qe.length,2==O){t[0]=Array(Ne);for(var a=0;a=0,_e=!0,wt()}}function Ge(){var e,n;if(We=!0,1==i)if(Ne>0){if(He=Ye[0]=0,Ve=Ye[1]=Ne-1,e=t[0][He],n=t[0][Ve],2==O)e=He,n=Ve;else if(1==Ne)if(3==O){var r=_t(Ma(e,e,N.log,!1),2);e=r[0],n=r[1]}else if(4==O){var o=_t(La(e,e,N.log,!1),2);e=o[0],n=o[1]}else if(N.time)n=e+Qa(86400/g);else{var a=_t(Ra(e,n,.1,!0),2);e=a[0],n=a[1]}}else He=Ye[0]=e=null,Ve=Ye[1]=n=null;Lt(x,e,n)}function Je(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:ea,t=arguments.length>1?arguments[1]:void 0,n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:bu,r=arguments.length>3&&void 0!==arguments[3]?arguments[3]:"butt",i=arguments.length>4&&void 0!==arguments[4]?arguments[4]:ea,o=arguments.length>5&&void 0!==arguments[5]?arguments[5]:"round";e!=Oe&&(d.strokeStyle=Oe=e),i!=Te&&(d.fillStyle=Te=i),t!=Be&&(d.lineWidth=Be=t),o!=Le&&(d.lineJoin=Le=o),r!=Pe&&(d.lineCap=Pe=r),n!=Me&&d.setLineDash(Me=n)}function Ze(e,t,n,r){t!=Te&&(d.fillStyle=Te=t),e!=$e&&(d.font=$e=e),n!=Ie&&(d.textAlign=Ie=n),r!=Re&&(d.textBaseline=Re=r)}function Ke(e,t,n,i){var o=arguments.length>4&&void 0!==arguments[4]?arguments[4]:0;if(i.length>0&&e.auto(r,We)&&(null==t||null==t.min)){var a=ja(He,0),u=ja(Ve,i.length-1),l=null==n.min?3==e.distr?Oa(i,a,u):Na(i,a,u,o):[n.min,n.max];e.min=Ja(e.min,n.min=l[0]),e.max=Za(e.max,n.max=l[1])}}function Xe(e,t){var n=t?_[e].points:_[e];n._stroke=n.stroke(r,e),n._fill=n.fill(r,e)}function et(e,n){var i=n?_[e].points:_[e],o=i._stroke,a=i._fill,u=i._paths,l=u.stroke,c=u.fill,s=u.clip,f=u.flags,h=null,p=vu(i.width*Ho,3),v=p%2/2;n&&null==a&&(a=p>0?"#fff":o);var m=1==i.pxAlign;if(m&&d.translate(v,v),!n){var y=fe,g=de,b=he,D=pe,x=p*Ho/2;0==i.min&&(D+=x),0==i.max&&(g-=x,D+=x),(h=new Path2D).rect(y,g,b,D)}n?tt(o,p,i.dash,i.cap,a,l,c,f,s):function(e,n,i,o,a,u,l,c,s,f,d){var h=!1;w.forEach((function(p,v){if(p.series[0]==e){var m,y=_[p.series[1]],g=t[p.series[1]],b=(y._paths||_u).band;wu(b)&&(b=1==p.dir?b[0]:b[1]);var D=null;y.show&&b&&function(e,t,n){for(t=ja(t,0),n=ja(n,e.length-1);t<=n;){if(null!=e[t])return!0;t++}return!1}(g,He,Ve)?(D=p.fill(r,v)||u,m=y._paths.clip):b=null,tt(n,i,o,a,D,l,c,s,f,d,m,b),h=!0}})),h||tt(n,i,o,a,u,l,c,s,f,d)}(e,o,p,i.dash,i.cap,a,l,c,f,h,s),m&&d.translate(-v,-v)}r.setData=Qe;function tt(e,t,n,r,i,o,a,u,l,c,s,f){Je(e,t,n,r,i),(l||c||f)&&(d.save(),l&&d.clip(l),c&&d.clip(c)),f?3==(3&u)?(d.clip(f),s&&d.clip(s),rt(i,a),nt(e,o,t)):2&u?(rt(i,a),d.clip(f),nt(e,o,t)):1&u&&(d.save(),d.clip(f),s&&d.clip(s),rt(i,a),d.restore(),nt(e,o,t)):(rt(i,a),nt(e,o,t)),(l||c||f)&&d.restore()}function nt(e,t,n){n>0&&(t instanceof Map?t.forEach((function(e,t){d.strokeStyle=Oe=t,d.stroke(e)})):null!=t&&e&&d.stroke(t))}function rt(e,t){t instanceof Map?t.forEach((function(e,t){d.fillStyle=Te=t,d.fill(e)})):null!=t&&e&&d.fill(t)}function it(e,t,n,r,i,o,a,u,l,c){var s=a%2/2;1==m&&d.translate(s,s),Je(u,a,l,c,u),d.beginPath();var f,h,p,v,y=i+(0==r||3==r?-o:o);0==n?(h=i,v=y):(f=i,p=y);for(var g=0;g0&&(t._paths=null,e&&(1==i?(t.min=null,t.max=null):t.facets.forEach((function(e){e.min=null,e.max=null}))))}))}var lt,ct,st,ft,dt,ht,pt,vt,mt,yt,gt,bt,Dt=!1;function wt(){Dt||(Nu(xt),Dt=!0)}function xt(){ve&&(!function(){var e=Su(D,Cu);for(var n in e){var o=e[n],a=T[n];if(null!=a&&null!=a.min)Au(o,a),n==x&&ut(!0);else if(n!=x||2==i)if(0==Ne&&null==o.from){var u=o.range(r,null,null,n);o.min=u[0],o.max=u[1]}else o.min=ru,o.max=-ru}if(Ne>0)for(var l in _.forEach((function(n,o){if(1==i){var a=n.scale,u=e[a],l=T[a];if(0==o){var c=u.range(r,u.min,u.max,a);u.min=c[0],u.max=c[1],He=Aa(u.min,t[0]),Ve=Aa(u.max,t[0]),t[0][He]u.max&&Ve--,n.min=qe[He],n.max=qe[Ve]}else n.show&&n.auto&&Ke(u,l,n,t[o],n.sorted);n.idxs[0]=He,n.idxs[1]=Ve}else if(o>0&&n.show&&n.auto){var s=_t(n.facets,2),f=s[0],d=s[1],h=f.scale,p=d.scale,v=_t(t[o],2),m=v[0],y=v[1];Ke(e[h],T[h],f,m,f.sorted),Ke(e[p],T[p],d,y,d.sorted),n.min=d.min,n.max=d.max}})),e){var c=e[l],s=T[l];if(null==c.from&&(null==s||null==s.min)){var f=c.range(r,c.min==ru?null:c.min,c.max==-ru?null:c.max,l);c.min=f[0],c.max=f[1]}}for(var d in e){var h=e[d];if(null!=h.from){var p=e[h.from];if(null==p.min)h.min=h.max=null;else{var v=h.range(r,p.min,p.max,d);h.min=v[0],h.max=v[1]}}}var m={},y=!1;for(var g in e){var b=e[g],w=D[g];if(w.min!=b.min||w.max!=b.max){w.min=b.min,w.max=b.max;var k=w.distr;w._min=3==k?eu(w.min):4==k?nu(w.min,w.asinh):w.min,w._max=3==k?eu(w.max):4==k?nu(w.max,w.asinh):w.max,m[g]=y=!0}}if(y){for(var C in _.forEach((function(e,t){2==i?t>0&&m.y&&(e._paths=null):m[e.scale]&&(e._paths=null)})),m)ye=!0,on("setScale",C);we.show&&(ge=_e=we.left>=0)}for(var E in T)T[E]=null}(),ve=!1),ye&&(!function(){for(var e=!1,t=0;!e;){var n=ot(++t),i=at(t);(e=3==t||n&&i)||(De(r.width,r.height),me=!0)}}(),ye=!1),me&&(va(p,Zo,ce),va(p,Go,se),va(p,Wo,ue),va(p,Qo,le),va(v,Zo,ce),va(v,Go,se),va(v,Wo,ue),va(v,Qo,le),va(h,Wo,oe),va(h,Qo,ae),f.width=Qa(oe*Ho),f.height=Qa(ae*Ho),b.forEach((function(e){var t=e._el,n=e._show,r=e._size,i=e._pos,o=e.side;if(null!=t)if(n){var a=o%2==1;va(t,a?"left":"top",i-(3===o||0===o?r:0)),va(t,a?"width":"height",r),va(t,a?"top":"left",a?se:ce),va(t,a?"height":"width",a?le:ue),pa(t,Yo)}else ha(t,Yo)})),Oe=Te=Be=Le=Pe=$e=Ie=Re=Me=null,je=1,Wt(!0),on("setSize"),me=!1),oe>0&&ae>0&&(d.clearRect(0,0,f.width,f.height),on("drawClear"),C.forEach((function(e){return e()})),on("draw")),we.show&&ge&&(Yt(null,!0,!1),ge=!1),c||(c=!0,r.status=1,on("ready")),We=!1,Dt=!1}function kt(e,n){var i=D[e];if(null==i.from){if(0==Ne){var o=i.range(r,n.min,n.max,e);n.min=o[0],n.max=o[1]}if(n.min>n.max){var a=n.min;n.min=n.max,n.max=a}if(Ne>1&&null!=n.min&&null!=n.max&&n.max-n.min<1e-16)return;e==x&&2==i.distr&&Ne>0&&(n.min=Aa(n.min,t[0]),n.max=Aa(n.max,t[0]),n.min==n.max&&n.max++),T[e]=n,ve=!0,wt()}}r.redraw=function(e,t){ye=t||!1,!1!==e?Lt(x,N.min,N.max):wt()},r.setScale=kt;var Ct=!1,Et=we.drag,St=Et.x,At=Et.y;we.show&&(we.x&&(lt=ya("u-cursor-x",v)),we.y&&(ct=ya("u-cursor-y",v)),0==N.ori?(st=lt,ft=ct):(st=ct,ft=lt),gt=we.left,bt=we.top);var Ft,Nt,Ot,Tt=r.select=Au({show:!0,over:!0,left:0,width:0,top:0,height:0},e.select),Bt=Tt.show?ya("u-select",Tt.over?v:p):null;function Mt(e,t){if(Tt.show){for(var n in e)va(Bt,n,Tt[n]=e[n]);!1!==t&&on("setSelect")}}function Lt(e,t,n){kt(e,{min:t,max:n})}function Pt(e,t,n,o){null!=t.focus&&function(e){if(e!=Ot){var t=null==e,n=1!=ke.alpha;_.forEach((function(r,i){var o=t||0==i||i==e;r._focus=t?null:o,n&&function(e,t){_[e].alpha=t,we.show&&Ee[e]&&(Ee[e].style.opacity=t);H&&q[e]&&(q[e].style.opacity=t)}(i,o?1:ke.alpha)})),Ot=e,n&&wt()}}(e),null!=t.show&&_.forEach((function(n,r){r>0&&(e==r||null==e)&&(n.show=t.show,function(e,t){var n=_[e],r=H?q[e]:null;n.show?r&&pa(r,Yo):(r&&ha(r,Yo),Ee.length>1&&_a(Ee[e],-10,-10,ue,le))}(r,t.show),Lt(2==i?n.facets[1].scale:n.scale,null,null),wt())})),!1!==n&&on("setSeries",e,t),o&&cn("setSeries",r,e,t)}r.setSelect=Mt,r.setSeries=Pt,r.addBand=function(e,t){e.fill=uu(e.fill||null),e.dir=ja(e.dir,-1),t=null==t?w.length:t,w.splice(t,0,e)},r.setBand=function(e,t){Au(w[e],t)},r.delBand=function(e){null==e?w.length=0:w.splice(e,1)};var $t={focus:!0};function It(e,t,n){var r=D[t];n&&(e=e/Ho-(1==r.ori?se:ce));var i=ue;1==r.ori&&(e=(i=le)-e),-1==r.dir&&(e=i-e);var o=r._min,a=o+(r._max-o)*(e/i),u=r.distr;return 3==u?Ka(10,a):4==u?function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:1;return Va.sinh(e)*t}(a,r.asinh):a}function Rt(e,t){va(Bt,Zo,Tt.left=e),va(Bt,Wo,Tt.width=t)}function jt(e,t){va(Bt,Go,Tt.top=e),va(Bt,Qo,Tt.height=t)}H&&Ce&&Ea(oa,L,(function(e){we._lock||null!=Ot&&Pt(null,$t,!0,an.setSeries)})),r.valToIdx=function(e){return Aa(e,t[0])},r.posToIdx=function(e,n){return Aa(It(e,x,n),t[0],He,Ve)},r.posToVal=It,r.valToPos=function(e,t,n){return 0==D[t].ori?a(e,D[t],n?he:ue,n?fe:0):u(e,D[t],n?pe:le,n?de:0)},r.batch=function(e){e(r),wt()},r.setCursor=function(e,t,n){gt=e.left,bt=e.top,Yt(null,t,n)};var zt=0==N.ori?Rt:jt,Ut=1==N.ori?Rt:jt;function Ht(e,t){if(null!=e){var n=e.idx;U.idx=n,_.forEach((function(e,t){(t>0||!Q)&&Vt(t,n)}))}H&&U.live&&function(){if(H&&U.live)for(var e=2==i?1:0;e<_.length;e++)if(0!=e||!Q){var t=U.values[e],n=0;for(var r in t)W[e][n++].firstChild.nodeValue=t[r]}}(),_e=!1,!1!==t&&on("setLegend")}function Vt(e,n){var i;if(null==n)i=G;else{var o=_[e],a=0==e&&2==O?qe:t[e];i=Q?o.values(r,e,n):{_:o.value(r,a[n],e,n)}}U.values[e]=i}function Yt(e,n,o){mt=gt,yt=bt;var a,u=_t(we.move(r,gt,bt),2);gt=u[0],bt=u[1],we.show&&(st&&_a(st,Qa(gt),0,ue,le),ft&&_a(ft,0,Qa(bt),ue,le));var l=He>Ve;Ft=ru;var s=0==N.ori?ue:le,f=1==N.ori?ue:le;if(gt<0||0==Ne||l){a=null;for(var d=0;d<_.length;d++)d>0&&Ee.length>1&&_a(Ee[d],-10,-10,ue,le);if(Ce&&Pt(null,$t,!0,null==e&&an.setSeries),U.live){z.fill(null),_e=!0;for(var h=0;h<_.length;h++)U.values[h]=G}}else{var p,v;1==i&&(a=Aa(p=It(0==N.ori?gt:bt,x),t[0],He,Ve),v=hu(A(t[0][a],N,s,0),.5));for(var m=2==i?1:0;m<_.length;m++){var y=_[m],g=z[m],b=1==i?t[m][g]:t[m][1][g],w=we.dataIdx(r,m,a,p),k=1==i?t[m][w]:t[m][1][w];_e=_e||k!=b||w!=g,z[m]=w;var C=w==a?v:hu(A(1==i?t[0][w]:t[m][0][w],N,s,0),.5);if(m>0&&y.show){var E=null==k?-10:hu(F(k,1==i?D[y.scale]:D[y.facets[1].scale],f,0),.5);if(E>0&&1==i){var S=qa(E-bt);S<=Ft&&(Ft=S,Nt=m)}var O=void 0,T=void 0;if(0==N.ori?(O=C,T=E):(O=E,T=C),_e&&Ee.length>1){Da(Ee[m],we.points.fill(r,m),we.points.stroke(r,m));var B=void 0,M=void 0,L=void 0,P=void 0,$=!0,I=we.points.bbox;if(null!=I){$=!1;var R=I(r,m);L=R.left,P=R.top,B=R.width,M=R.height}else L=O,P=T,B=M=we.points.size(r,m);xa(Ee[m],B,M,$),_a(Ee[m],L,P,ue,le)}}if(U.live){if(!_e||0==m&&Q)continue;Vt(m,w)}}}if(we.idx=a,we.left=gt,we.top=bt,_e&&(U.idx=a,Ht()),Tt.show&&Ct)if(null!=e){var j=_t(an.scales,2),H=j[0],V=j[1],Y=_t(an.match,2),q=Y[0],W=Y[1],J=_t(e.cursor.sync.scales,2),Z=J[0],K=J[1],X=e.cursor.drag;if(St=X._x,At=X._y,St||At){var ee,te,ne,re,ie,oe=e.select,ae=oe.left,ce=oe.top,se=oe.width,fe=oe.height,de=e.scales[H].ori,he=e.posToVal,pe=null!=H&&q(H,Z),ve=null!=V&&W(V,K);pe&&St?(0==de?(ee=ae,te=se):(ee=ce,te=fe),ne=D[H],re=A(he(ee,Z),ne,s,0),ie=A(he(ee+te,Z),ne,s,0),zt(Ja(re,ie),qa(ie-re))):zt(0,s),ve&&At?(1==de?(ee=ae,te=se):(ee=ce,te=fe),ne=D[V],re=F(he(ee,K),ne,f,0),ie=F(he(ee+te,K),ne,f,0),Ut(Ja(re,ie),qa(ie-re))):Ut(0,f)}else Zt()}else{var me=qa(mt-dt),ye=qa(yt-ht);if(1==N.ori){var ge=me;me=ye,ye=ge}St=Et.x&&me>=Et.dist,At=Et.y&&ye>=Et.dist;var be,De,xe=Et.uni;null!=xe?St&&At&&(At=ye>=xe,(St=me>=xe)||At||(ye>me?At=!0:St=!0)):Et.x&&Et.y&&(St||At)&&(St=At=!0),St&&(0==N.ori?(be=pt,De=gt):(be=vt,De=bt),zt(Ja(be,De),qa(De-be)),At||Ut(0,f)),At&&(1==N.ori?(be=pt,De=gt):(be=vt,De=bt),Ut(Ja(be,De),qa(De-be)),St||zt(0,s)),St||At||(zt(0,0),Ut(0,0))}if(Et._x=St,Et._y=At,null==e){if(o){if(null!=un){var Se=_t(an.scales,2),Ae=Se[0],Fe=Se[1];an.values[0]=null!=Ae?It(0==N.ori?gt:bt,Ae):null,an.values[1]=null!=Fe?It(1==N.ori?gt:bt,Fe):null}cn(ta,r,gt,bt,ue,le,a)}if(Ce){var Oe=o&&an.setSeries,Te=ke.prox;null==Ot?Ft<=Te&&Pt(Nt,$t,!0,Oe):Ft>Te?Pt(null,$t,!0,Oe):Nt!=Ot&&Pt(Nt,$t,!0,Oe)}}c&&!1!==n&&on("setCursor")}r.setLegend=Ht;var qt=null;function Wt(e){!0===e?qt=null:on("syncRect",qt=v.getBoundingClientRect())}function Qt(e,t,n,r,i,o,a){we._lock||(Gt(e,t,n,r,i,o,a,!1,null!=e),null!=e?Yt(null,!0,!0):Yt(t,!0,!1))}function Gt(e,t,n,i,o,a,u,c,s){if(null==qt&&Wt(!1),null!=e)n=e.clientX-qt.left,i=e.clientY-qt.top;else{if(n<0||i<0)return gt=-10,void(bt=-10);var f=_t(an.scales,2),d=f[0],h=f[1],p=t.cursor.sync,v=_t(p.values,2),m=v[0],y=v[1],g=_t(p.scales,2),_=g[0],b=g[1],w=_t(an.match,2),x=w[0],k=w[1],C=t.axes[0].side%2==1,E=0==N.ori?ue:le,S=1==N.ori?ue:le,A=C?a:o,F=C?o:a,O=C?i:n,T=C?n:i;if(n=null!=_?x(d,_)?l(m,D[d],E,0):-10:E*(O/A),i=null!=b?k(h,b)?l(y,D[h],S,0):-10:S*(T/F),1==N.ori){var B=n;n=i,i=B}}if(s&&((n<=1||n>=ue-1)&&(n=ou(n,ue)),(i<=1||i>=le-1)&&(i=ou(i,le))),c){dt=n,ht=i;var M=_t(we.move(r,n,i),2);pt=M[0],vt=M[1]}else gt=n,bt=i}var Jt={width:0,height:0};function Zt(){Mt(Jt,!1)}function Kt(e,t,n,i,o,a,u){Ct=!0,St=At=Et._x=Et._y=!1,Gt(e,t,n,i,o,a,0,!0,!1),null!=e&&(re(ra,sa,Xt),cn(na,r,pt,vt,ue,le,null))}function Xt(e,t,n,i,o,a,u){Ct=Et._x=Et._y=!1,Gt(e,t,n,i,o,a,0,!1,!0);var l=Tt.left,c=Tt.top,s=Tt.width,f=Tt.height,d=s>0||f>0;if(d&&Mt(Tt),Et.setScale&&d){var h=l,p=s,v=c,m=f;if(1==N.ori&&(h=c,p=f,v=l,m=s),St&&Lt(x,It(h,x),It(h+p,x)),At)for(var y in D){var g=D[y];y!=x&&null==g.from&&g.min!=ru&&Lt(y,It(v+m,y),It(v,y))}Zt()}else we.lock&&(we._lock=!we._lock,we._lock||Yt(null,!0,!1));null!=e&&(ie(ra,sa),cn(ra,r,gt,bt,ue,le,null))}function en(e,t,n,i,o,a,u){Ge(),Zt(),null!=e&&cn(aa,r,gt,bt,ue,le,null)}function tn(){b.forEach(Lc),be(r.width,r.height,!0)}Ea(la,fa,tn);var nn={};nn.mousedown=Kt,nn.mousemove=Qt,nn.mouseup=Xt,nn.dblclick=en,nn.setSeries=function(e,t,n,r){Pt(n,r,!0,!1)},we.show&&(re(na,v,Kt),re(ta,v,Qt),re(ia,v,Wt),re(oa,v,(function(e,t,n,r,i,o,a){if(!we._lock){var u=Ct;if(Ct){var l,c,s=!0,f=!0;0==N.ori?(l=St,c=At):(l=At,c=St),l&&c&&(s=gt<=10||gt>=ue-10,f=bt<=10||bt>=le-10),l&&s&&(gt=gt=3?Il:cu)),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&&(Ae[t]=!0,e._el=ya("u-axis",h))}})),n?n instanceof HTMLElement?(n.appendChild(s),sn()):n(r,sn):sn(),r}Pc.assign=Au,Pc.fmtNum=Ha,Pc.rangeNum=Ra,Pc.rangeLog=Ma,Pc.rangeAsinh=La,Pc.orient=Jl,Pc.pxRatio=Ho,Pc.join=function(e,t){for(var n=new Set,r=0;r=o&&A<=a;A+=k){var F=c[A];if(null!=F){var N=_(l[A]),O=b(F);1==t?D(x,N,C):D(x,S,O),D(x,N,O),C=O,S=N}}var T=_t(Zl(e,i),2),B=T[0],M=T[1];if(null!=u.fill||0!=B){var L=w.fill=new Path2D(x),P=b(u.fillTo(e,i,u.min,u.max,B));D(L,S,P),D(L,E,P)}if(!u.spanGaps){var $,I=[];($=I).push.apply($,bt(tc(l,c,o,a,k,_,r)));var R=u.width*Ho/2,j=n||1==t?R:-R,z=n||-1==t?-R:R;I.forEach((function(e){e[0]+=j,e[1]+=z})),w.gaps=I=u.gaps(e,i,o,a,I),w.clip=ec(I,s.ori,p,v,m,y)}return 0!=M&&(w.band=2==M?[Xl(e,i,o,a,x,-1),Xl(e,i,o,a,x,1)]:Xl(e,i,o,a,x,M)),w}))}},$c.bars=function(e){var t=ja((e=e||_u).size,[.6,ru,1]),n=e.align||0,r=(e.gap||0)*Ho,i=ja(e.radius,0),o=1-t[0],a=ja(t[1],ru)*Ho,u=ja(t[2],1)*Ho,l=ja(e.disp,_u),c=ja(e.each,(function(e){})),s=l.fill,f=l.stroke;return function(e,t,d,h){return Jl(e,t,(function(p,v,m,y,g,_,b,D,w,x,k){var C,E,S=p.pxRound,A=y.dir*(0==y.ori?1:-1),F=g.dir*(1==g.ori?1:-1),N=0==y.ori?lc:cc,O=0==y.ori?c:function(e,t,n,r,i,o,a){c(e,t,n,i,r,a,o)},T=_t(Zl(e,t),2),B=T[0],M=T[1],L=3==g.distr?1==B?g.max:g.min:0,P=b(L,g,k,w),$=S(p.width*Ho),I=!1,R=null,j=null,z=null,U=null;null==s||0!=$&&null==f||(I=!0,R=s.values(e,t,d,h),j=new Map,new Set(R).forEach((function(e){null!=e&&j.set(e,new Path2D)})),$>0&&(z=f.values(e,t,d,h),U=new Map,new Set(z).forEach((function(e){null!=e&&U.set(e,new Path2D)}))));var H=l.x0,V=l.size;if(null!=H&&null!=V){v=H.values(e,t,d,h),2==H.unit&&(v=v.map((function(t){return e.posToVal(D+t*x,y.key,!0)})));var Y=V.values(e,t,d,h);E=S((E=2==V.unit?Y[0]*x:_(Y[0],y,x,D)-_(0,y,x,D))-$),C=1==A?-$/2:E+$/2}else{var q=x;if(v.length>1)for(var W=null,Q=0,G=1/0;Q=d&&Q<=h;Q+=A){var ie=m[Q];if(void 0!==ie){var oe=_(2!=y.distr||null!=l?v[Q]:Q,y,x,D),ae=b(ja(ie,L),g,k,w);null!=re&&null!=ie&&(P=b(re[Q],g,k,w));var ue=S(oe-C),le=S(Za(ae,P)),ce=S(Ja(ae,P)),se=le-ce,fe=i*E;null!=ie&&(I?($>0&&null!=z[Q]&&N(U.get(z[Q]),ue,ce+Wa($/2),E,Za(0,se-$),fe),null!=R[Q]&&N(j.get(R[Q]),ue,ce+Wa($/2),E,Za(0,se-$),fe)):N(X,ue,ce+Wa($/2),E,Za(0,se-$),fe),O(e,t,Q,ue-$/2,ce,E+$,se)),0!=M&&(F*M==1?(le=ce,ce=Z):(ce=le,le=Z),N(ee,ue-$/2,ce,E+$,Za(0,se=le-ce),0))}}return $>0&&(K.stroke=I?U:X),K.fill=I?j:X,K}))}},$c.spline=function(e){return function(e,t){var n=ja(null===t||void 0===t?void 0:t.alignGaps,0);return function(t,r,i,o){return Jl(t,r,(function(a,u,l,c,s,f,d,h,p,v,m){var y,g,_,b=a.pxRound,D=function(e){return b(f(e,c,v,h))},w=function(e){return b(d(e,s,m,p))};0==c.ori?(y=ic,_=ac,g=dc):(y=oc,_=uc,g=hc);var x=c.dir*(0==c.ori?1:-1);i=Fa(l,i,o,1),o=Fa(l,i,o,-1);for(var k=D(u[1==x?i:o]),C=k,E=[],S=[],A=1==x?i:o;A>=i&&A<=o;A+=x)if(null!=l[A]){var F=D(u[A]);E.push(C=F),S.push(w(l[A]))}var N={stroke:e(E,S,y,_,g,b),fill:null,clip:null,band:null,gaps:null,flags:1},O=N.stroke,T=_t(Zl(t,r),2),B=T[0],M=T[1];if(null!=a.fill||0!=B){var L=N.fill=new Path2D(O),P=w(a.fillTo(t,r,a.min,a.max,B));_(L,C,P),_(L,k,P)}if(!a.spanGaps){var $,I=[];($=I).push.apply($,bt(tc(u,l,i,o,x,D,n))),N.gaps=I=a.gaps(t,r,i,o,I),N.clip=ec(I,c.ori,h,p,v,m)}return 0!=M&&(N.band=2==M?[Xl(t,r,i,o,O,-1),Xl(t,r,i,o,O,1)]:Xl(t,r,i,o,O,M)),N}))}}(_c,e)};var Ic,Rc={height:500,legend:{show:!1},cursor:{drag:{x:!0,y:!1},focus:{prox:30},points:{size:5.6,width:1.4},bind:{click:function(){return null},dblclick:function(){return null}}}},jc=function(e){return void 0===e||null===e?"":e.toLocaleString("en-US",{maximumSignificantDigits:20})},zc=function(e,t,n,r){var i,o=e.axes[n];if(r>1)return o._size||60;var a=6+((null===o||void 0===o||null===(i=o.ticks)||void 0===i?void 0:i.size)||0)+(o.gap||0),u=(null!==t&&void 0!==t?t:[]).reduce((function(e,t){return t.length>e.length?t:e}),"");return""!=u&&(a+=function(e,t){var n=document.createElement("span");n.innerText=e,n.style.cssText="position: absolute; z-index: -1; pointer-events: none; opacity: 0; font: ".concat(t),document.body.appendChild(n);var r=n.offsetWidth;return n.remove(),r}(u,e.ctx.font)),Math.ceil(a)},Uc=function(e){return function(e){for(var t=0,n=0;n>8*i&255).toString(16)).substr(-2);return r}(e)},Hc=function(e){return e.replace(/^\[\d+]/,"").replace(/{.+}/gim,"")},Vc=function(e){for(var t=e.length,n=-1/0;t--;){var r=e[t];Number.isFinite(r)&&r>n&&(n=r)}return Number.isFinite(n)?n:null},Yc=function(e){for(var t=e.length,n=1/0;t--;){var r=e[t];Number.isFinite(r)&&r2&&void 0!==arguments[2]?arguments[2]:"";return t.map((function(e){return"".concat(jc(e)," ").concat(n)}))}(e,n,t)}};return e?Number(e)%2?n:Kn(Kn({},n),{},{side:1}):{space:80}}))},Wc=function(e,t){if(null==e||null==t)return[-1,1];var n=.02*(Math.abs(t-e)||Math.abs(e)||1);return[e-n,t+n]},Qc=n(61),Gc=n.n(Qc),Jc=function(e){var t=e.u,n=e.id,r=e.unit,i=void 0===r?"":r,o=e.metrics,a=e.series,u=e.tooltipIdx,l=e.tooltipOffset,c=e.isSticky,s=e.onClose,f=re(null),d=_t(X({top:-999,left:-999}),2),h=d[0],p=d[1],v=_t(X(!1),2),y=v[0],g=v[1],_=_t(X(!1),2),b=_[0],D=_[1],w=_t(X(u.seriesIdx),2),x=w[0],k=w[1],C=_t(X(u.dataIdx),2),E=C[0],S=C[1],A=oe((function(){return t.root.querySelector(".u-wrap")}),[t]),F=oe((function(){return ir()(t,["data",x,E],0)}),[t,x,E]),N=oe((function(){return jc(F)}),[F]),O=oe((function(){return t.data[0][E]}),[t,E]),T=oe((function(){return yr()(new Date(1e3*O)).format("YYYY-MM-DD HH:mm:ss:SSS (Z)")}),[O]),B=oe((function(){var e;return Uc((null===(e=a[x])||void 0===e?void 0:e.label)||"")}),[a,x]),M=oe((function(){var e,t=((null===(e=a[x])||void 0===e?void 0:e.label)||"").replace(/{.+}/gim,"").trim();return Hc(t)}),[]),L=oe((function(){var e,t=(null===(e=o[x-1])||void 0===e?void 0:e.metric)||{},n=Object.keys(t).filter((function(e){return"__name__"!==e}));return n.map((function(e){return"".concat(e,'="').concat(t[e],'"')}))}),[o,x]),P=function(e){if(y){var t=e.clientX,n=e.clientY;p({top:n,left:t})}},$=function(){g(!1)};return te((function(){var e;if(f.current){var n=t.valToPos(F||0,(null===(e=a[x])||void 0===e?void 0:e.scale)||"1"),r=t.valToPos(O,"x"),i=f.current.getBoundingClientRect(),o=i.width,u=i.height,c=t.over.getBoundingClientRect(),s=r+o>=c.width?o+20:0,d=n+u>=c.height?u+20:0;p({top:n+l.top+10-d,left:r+l.left+10-s})}}),[t,F,O,x,l,f]),te((function(){k(u.seriesIdx),S(u.dataIdx)}),[u]),te((function(){return y&&(document.addEventListener("mousemove",P),document.addEventListener("mouseup",$)),function(){document.removeEventListener("mousemove",P),document.removeEventListener("mouseup",$)}}),[y]),!A||u.seriesIdx<0||u.dataIdx<0?null:mt.createPortal(fr("div",{className:Oi()({"vm-chart-tooltip":!0,"vm-chart-tooltip_sticky":c,"vm-chart-tooltip_moved":b}),ref:f,style:h,children:[fr("div",{className:"vm-chart-tooltip-header",children:[fr("div",{className:"vm-chart-tooltip-header__date",children:T}),c&&fr(m,{children:[fr(co,{className:"vm-chart-tooltip-header__drag",variant:"text",size:"small",startIcon:fr(Fi,{}),onMouseDown:function(e){D(!0),g(!0);var t=e.clientX,n=e.clientY;p({top:n,left:t})}}),fr(co,{className:"vm-chart-tooltip-header__close",variant:"text",size:"small",startIcon:fr(ii,{}),onClick:function(){s&&s(n)}})]})]}),fr("div",{className:"vm-chart-tooltip-data",children:[fr("div",{className:"vm-chart-tooltip-data__marker",style:{background:B}}),fr("p",{children:[M,":",fr("b",{className:"vm-chart-tooltip-data__value",children:N}),i]})]}),!!L.length&&fr("div",{className:"vm-chart-tooltip-info",children:L.map((function(e,t){return fr("div",{children:e},"".concat(e,"_").concat(t))}))})]}),A)};!function(e){e.xRange="xRange",e.yRange="yRange",e.data="data"}(Ic||(Ic={}));var Zc=function(e){var t=e.data,n=e.series,r=e.metrics,i=void 0===r?[]:r,o=e.period,a=e.yaxis,u=e.unit,l=e.setPeriod,c=e.container,s=re(null),f=_t(X(!1),2),d=f[0],p=f[1],v=_t(X({min:o.start,max:o.end}),2),m=v[0],y=v[1],g=_t(X(),2),_=g[0],b=g[1],D=yo(c),w=_t(X(!1),2),x=w[0],k=w[1],C=_t(X({seriesIdx:-1,dataIdx:-1}),2),E=C[0],S=C[1],A=_t(X({left:0,top:0}),2),F=A[0],N=A[1],O=_t(X([]),2),T=O[0],B=O[1],M=oe((function(){return"".concat(E.seriesIdx,"_").concat(E.dataIdx)}),[E]),L=ae(Gc()((function(e){var t=e.min,n=e.max;l({from:new Date(1e3*t),to:new Date(1e3*n)})}),500),[]),P=function(e){var t=e.u,n=e.min,r=e.max,i=1e3*(r-n);iAr||(t.setScale("x",{min:n,max:r}),y({min:n,max:r}),L({min:n,max:r}))},$=function(e){var t=e.target,n=e.ctrlKey,r=e.metaKey,i=e.key,o=t instanceof HTMLInputElement||t instanceof HTMLTextAreaElement;if(_&&!o){var a="+"===i||"="===i;if(("-"===i||a)&&!n&&!r){e.preventDefault();var u=(m.max-m.min)/10*(a?1:-1);P({u:_,min:m.min+u,max:m.max-u})}}},I=function(){var e="".concat(E.seriesIdx,"_").concat(E.dataIdx),t={id:e,unit:u,series:n,metrics:i,tooltipIdx:E,tooltipOffset:F};if(!T.find((function(t){return t.id===e}))){var r=JSON.parse(JSON.stringify(t));B((function(e){return[].concat(bt(e),[r])}))}},R=function(e){B((function(t){return t.filter((function(t){return t.id!==e}))}))},j=function(){return[m.min,m.max]},z=function(e){var 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;return a.limits.enable?a.limits.range[r]:Wc(t,n)},U=Kn(Kn({},Rc),{},{series:n,axes:qc([{},{scale:"1"}],u),scales:Kn({},function(){var e={x:{range:j}},t=Object.keys(a.limits.range);return(t.length?t:["1"]).forEach((function(t){e[t]={range:function(e){var n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:0,r=arguments.length>2&&void 0!==arguments[2]?arguments[2]:1;return z(e,n,r,t)}}})),e}()),width:D.width||400,plugins:[{hooks:{ready:function(e){N({left:parseFloat(e.over.style.left),top:parseFloat(e.over.style.top)}),e.over.addEventListener("mousedown",(function(t){var n=t.ctrlKey,r=t.metaKey;0===t.button&&(n||r)&&function(e){var t=e.e,n=e.factor,r=void 0===n?.85:n,i=e.u,o=e.setPanning,a=e.setPlotScale;t.preventDefault(),o(!0);var u=t.clientX,l=i.posToVal(1,"x")-i.posToVal(0,"x"),c=i.scales.x.min||0,s=i.scales.x.max||0,f=function(e){e.preventDefault();var t=l*((e.clientX-u)*r);a({u:i,min:c-t,max:s-t})};document.addEventListener("mousemove",f),document.addEventListener("mouseup",(function e(){o(!1),document.removeEventListener("mousemove",f),document.removeEventListener("mouseup",e)}))}({u:e,e:t,setPanning:p,setPlotScale:P,factor:.9})})),e.over.addEventListener("wheel",(function(t){if(t.ctrlKey||t.metaKey){t.preventDefault();var n=e.over.getBoundingClientRect().width,r=e.cursor.left&&e.cursor.left>0?e.cursor.left:0,i=e.posToVal(r,"x"),o=(e.scales.x.max||0)-(e.scales.x.min||0),a=t.deltaY<0?.9*o:o/.9,u=i-r/n*a,l=u+a;e.batch((function(){return P({u:e,min:u,max:l})}))}}))},setCursor:function(e){var t,n=null!==(t=e.cursor.idx)&&void 0!==t?t:-1;S((function(e){return Kn(Kn({},e),{},{dataIdx:n})}))},setSeries:function(e,t){var n=null!==t&&void 0!==t?t:-1;S((function(e){return Kn(Kn({},e),{},{seriesIdx:n})}))}}}],hooks:{setSelect:[function(e){var t=e.posToVal(e.select.left,"x"),n=e.posToVal(e.select.left+e.select.width,"x");P({u:e,min:t,max:n})}]}}),H=function(e){if(_){switch(e){case Ic.xRange:_.scales.x.range=j;break;case Ic.yRange:Object.keys(a.limits.range).forEach((function(e){_.scales[e]&&(_.scales[e].range=function(t){var n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:0,r=arguments.length>2&&void 0!==arguments[2]?arguments[2]:1;return z(t,n,r,e)})}));break;case Ic.data:_.setData(t)}d||_.redraw()}};return te((function(){return y({min:o.start,max:o.end})}),[o]),te((function(){if(B([]),S({seriesIdx:-1,dataIdx:-1}),s.current){var e=new Pc(U,t,s.current);return b(e),y({min:o.start,max:o.end}),e.destroy}}),[s.current,n,D]),te((function(){return window.addEventListener("keydown",$),function(){window.removeEventListener("keydown",$)}}),[m]),te((function(){return H(Ic.data)}),[t]),te((function(){return H(Ic.xRange)}),[m]),te((function(){return H(Ic.yRange)}),[a]),te((function(){var e=-1!==E.dataIdx&&-1!==E.seriesIdx;return k(e),e&&window.addEventListener("click",I),function(){window.removeEventListener("click",I)}}),[E,T]),fr("div",{className:Oi()({"vm-line-chart":!0,"vm-line-chart_panning":d}),children:[fr("div",{className:"vm-line-chart__u-plot",ref:s}),_&&x&&fr(Jc,{unit:u,u:_,series:n,metrics:i,tooltipIdx:E,tooltipOffset:F,id:M}),_&&T.map((function(e){return h(Jc,Kn(Kn({},e),{},{isSticky:!0,u:_,key:e.id,onClose:R}))}))]})};function Kc(){Kc=function(){return e};var e={},t=Object.prototype,n=t.hasOwnProperty,r=Object.defineProperty||function(e,t,n){e[t]=n.value},i="function"==typeof Symbol?Symbol:{},o=i.iterator||"@@iterator",a=i.asyncIterator||"@@asyncIterator",u=i.toStringTag||"@@toStringTag";function l(e,t,n){return Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}),e[t]}try{l({},"")}catch(A){l=function(e,t,n){return e[t]=n}}function c(e,t,n,i){var o=t&&t.prototype instanceof d?t:d,a=Object.create(o.prototype),u=new C(i||[]);return r(a,"_invoke",{value:D(e,n,u)}),a}function s(e,t,n){try{return{type:"normal",arg:e.call(t,n)}}catch(A){return{type:"throw",arg:A}}}e.wrap=c;var f={};function d(){}function h(){}function p(){}var v={};l(v,o,(function(){return this}));var m=Object.getPrototypeOf,y=m&&m(m(E([])));y&&y!==t&&n.call(y,o)&&(v=y);var g=p.prototype=d.prototype=Object.create(v);function _(e){["next","throw","return"].forEach((function(t){l(e,t,(function(e){return this._invoke(t,e)}))}))}function b(e,t){function i(r,o,a,u){var l=s(e[r],e,o);if("throw"!==l.type){var c=l.arg,f=c.value;return f&&"object"==At(f)&&n.call(f,"__await")?t.resolve(f.__await).then((function(e){i("next",e,a,u)}),(function(e){i("throw",e,a,u)})):t.resolve(f).then((function(e){c.value=e,a(c)}),(function(e){return i("throw",e,a,u)}))}u(l.arg)}var o;r(this,"_invoke",{value:function(e,n){function r(){return new t((function(t,r){i(e,n,t,r)}))}return o=o?o.then(r,r):r()}})}function D(e,t,n){var r="suspendedStart";return function(i,o){if("executing"===r)throw new Error("Generator is already running");if("completed"===r){if("throw"===i)throw o;return S()}for(n.method=i,n.arg=o;;){var a=n.delegate;if(a){var u=w(a,n);if(u){if(u===f)continue;return u}}if("next"===n.method)n.sent=n._sent=n.arg;else if("throw"===n.method){if("suspendedStart"===r)throw r="completed",n.arg;n.dispatchException(n.arg)}else"return"===n.method&&n.abrupt("return",n.arg);r="executing";var l=s(e,t,n);if("normal"===l.type){if(r=n.done?"completed":"suspendedYield",l.arg===f)continue;return{value:l.arg,done:n.done}}"throw"===l.type&&(r="completed",n.method="throw",n.arg=l.arg)}}}function w(e,t){var n=e.iterator[t.method];if(void 0===n){if(t.delegate=null,"throw"===t.method){if(e.iterator.return&&(t.method="return",t.arg=void 0,w(e,t),"throw"===t.method))return f;t.method="throw",t.arg=new TypeError("The iterator does not provide a 'throw' method")}return f}var r=s(n,e.iterator,t.arg);if("throw"===r.type)return t.method="throw",t.arg=r.arg,t.delegate=null,f;var i=r.arg;return i?i.done?(t[e.resultName]=i.value,t.next=e.nextLoc,"return"!==t.method&&(t.method="next",t.arg=void 0),t.delegate=null,f):i:(t.method="throw",t.arg=new TypeError("iterator result is not an object"),t.delegate=null,f)}function x(e){var t={tryLoc:e[0]};1 in e&&(t.catchLoc=e[1]),2 in e&&(t.finallyLoc=e[2],t.afterLoc=e[3]),this.tryEntries.push(t)}function k(e){var t=e.completion||{};t.type="normal",delete t.arg,e.completion=t}function C(e){this.tryEntries=[{tryLoc:"root"}],e.forEach(x,this),this.reset(!0)}function E(e){if(e){var t=e[o];if(t)return t.call(e);if("function"==typeof e.next)return e;if(!isNaN(e.length)){var r=-1,i=function t(){for(;++r=0;--i){var o=this.tryEntries[i],a=o.completion;if("root"===o.tryLoc)return r("end");if(o.tryLoc<=this.prev){var u=n.call(o,"catchLoc"),l=n.call(o,"finallyLoc");if(u&&l){if(this.prev=0;--r){var i=this.tryEntries[r];if(i.tryLoc<=this.prev&&n.call(i,"finallyLoc")&&this.prev=0;--t){var n=this.tryEntries[t];if(n.finallyLoc===e)return this.complete(n.completion,n.afterLoc),k(n),f}},catch:function(e){for(var t=this.tryEntries.length-1;t>=0;--t){var n=this.tryEntries[t];if(n.tryLoc===e){var r=n.completion;if("throw"===r.type){var i=r.arg;k(n)}return i}}throw new Error("illegal catch attempt")},delegateYield:function(e,t,n){return this.delegate={iterator:E(e),resultName:t,nextLoc:n},"next"===this.method&&(this.arg=void 0),f}},e}function Xc(e,t,n,r,i,o,a){try{var u=e[o](a),l=u.value}catch(c){return void n(c)}u.done?t(l):Promise.resolve(l).then(r,i)}function es(e){return function(){var t=this,n=arguments;return new Promise((function(r,i){var o=e.apply(t,n);function a(e){Xc(o,r,i,a,u,"next",e)}function u(e){Xc(o,r,i,a,u,"throw",e)}a(void 0)}))}}var ts=function(e){var t=e.legend,n=e.onChange,r=_t(X(""),2),i=r[0],o=r[1],a=oe((function(){return function(e){var t=Object.keys(e.freeFormFields).filter((function(e){return"__name__"!==e}));return t.map((function(t){var n="".concat(t,'="').concat(e.freeFormFields[t],'"');return{id:"".concat(e.label,".").concat(n),freeField:n,key:t}}))}(t)}),[t]),u=function(){var e=es(Kc().mark((function e(t,n){return Kc().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,navigator.clipboard.writeText(t);case 2:o(n),setTimeout((function(){return o("")}),2e3);case 4:case"end":return e.stop()}}),e)})));return function(t,n){return e.apply(this,arguments)}}();return fr("div",{className:Oi()({"vm-legend-item":!0,"vm-legend-item_hide":!t.checked}),onClick:function(e){return function(t){n(e,t.ctrlKey||t.metaKey)}}(t),children:[fr("div",{className:"vm-legend-item__marker",style:{backgroundColor:t.color}}),fr("div",{className:"vm-legend-item-info",children:[fr("span",{className:"vm-legend-item-info__label",children:Hc(t.label)}),"\xa0{",a.map((function(e){return fr(ho,{open:i===e.id,title:"Copied!",placement:"top-center",children:fr("span",{className:"vm-legend-item-info__free-fields",onClick:(t=e.freeField,n=e.id,function(e){e.stopPropagation(),u(t,n)}),children:e.freeField},e.key)},e.id);var t,n})),"}"]})]})},ns=function(e){var t=e.labels,n=e.query,r=e.onChange,i=oe((function(){return Array.from(new Set(t.map((function(e){return e.group}))))}),[t]);return fr(m,{children:fr("div",{className:"vm-legend",children:i.map((function(e){return fr("div",{className:"vm-legend-group",children:[fr("div",{className:"vm-legend-group-title",children:[fr("span",{className:"vm-legend-group-title__count",children:["Query ",e,": "]}),fr("span",{className:"vm-legend-group-title__query",children:n[e-1]})]}),fr("div",{children:t.filter((function(t){return t.group===e})).map((function(e){return fr(ts,{legend:e,onChange:r},e.label)}))})]},e)}))})})};function rs(e,t){if(null==e)return{};var n,r,i=function(e,t){if(null==e)return{};var n,r,i={},o=Object.keys(e);for(r=0;r=0||(i[n]=e[n]);return i}(e,t);if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(e);for(r=0;r=0||Object.prototype.propertyIsEnumerable.call(e,n)&&(i[n]=e[n])}return i}var is=["__name__"],os=function(e,t,n){var r=function(e,t){var n=e.metric,r=n.__name__,i=rs(n,is),o=t||r||"";return 0===Object.keys(e.metric).length?o||"Result ".concat(e.group):"".concat(o," {").concat(Object.entries(i).map((function(e){return"".concat(e[0],": ").concat(e[1])})).join(", "),"}")}(e,n[e.group-1]),i="[".concat(e.group,"]").concat(r);return{label:i,freeFormFields:e.metric,width:1.4,stroke:Uc(i),show:!us(i,t),scale:"1",points:{size:4.2,width:1.4}}},as=function(e,t){return{group:t,label:e.label||"",color:e.stroke,checked:e.show||!1,freeFormFields:e.freeFormFields}},us=function(e,t){return t.includes("".concat(e))},ls=function(e){switch(e){case"NaN":return NaN;case"Inf":case"+Inf":return 1/0;case"-Inf":return-1/0;default:return parseFloat(e)}},cs=function(e){var t=e.data,n=void 0===t?[]:t,r=e.period,i=e.customStep,o=e.query,a=e.yaxis,u=e.unit,l=e.showLegend,c=void 0===l||l,s=e.setYaxisLimits,f=e.setPeriod,d=e.alias,h=void 0===d?[]:d,p=e.fullWidth,v=void 0===p||p,m=oe((function(){return i||r.step||1}),[r.step,i]),y=_t(X([[]]),2),g=y[0],_=y[1],b=_t(X([]),2),D=b[0],w=b[1],x=_t(X([]),2),k=x[0],C=x[1],E=_t(X([]),2),S=E[0],A=E[1],F=function(e){var t=function(e){var t={},n=Object.values(e).flat(),r=Yc(n),i=Vc(n);return t[1]=Wc(r,i),t}(e);s(t)};te((function(){var e=[],t={},i=[],o=[{}];null===n||void 0===n||n.forEach((function(n){var r=os(n,S,h);o.push(r),i.push(as(r,n.group));var a,u=t[n.group]||[],l=Uo(n.values);try{for(l.s();!(a=l.n()).done;){var c=a.value;e.push(c[0]),u.push(ls(c[1]))}}catch(s){l.e(s)}finally{l.f()}t[n.group]=u}));var a=function(e,t,n){for(var r=Array.from(new Set(e)).sort((function(e,t){return e-t})),i=n.start,o=Nr(n.end+t),a=0,u=[];i<=o;){for(;a=r.length||r[a]>i)&&u.push(i)}for(;u.length<2;)u.push(i),i=Nr(i+t);return u}(e,m,r),u=n.map((function(e){var t,n=[],r=e.values,i=r.length,o=0,u=Uo(a);try{for(u.s();!(t=u.n()).done;){for(var l=t.value;o1e10*h?n.map((function(){return f})):n}));u.unshift(a),F(t),_(u),w(o),C(i)}),[n]),te((function(){var e=[],t=[{}];null===n||void 0===n||n.forEach((function(n){var r=os(n,S,h);t.push(r),e.push(as(r,n.group))})),w(t),C(e)}),[S]);var N=re(null);return fr("div",{className:Oi()({"vm-graph-view":!0,"vm-graph-view_full-width":v}),ref:N,children:[(null===N||void 0===N?void 0:N.current)&&fr(Zc,{data:g,series:D,metrics:n,period:r,yaxis:a,unit:u,setPeriod:f,container:null===N||void 0===N?void 0:N.current}),c&&fr(ns,{labels:k,query:o,onChange:function(e,t){A(function(e){var t=e.hideSeries,n=e.legend,r=e.metaKey,i=e.series,o=n.label,a=us(o,t),u=i.map((function(e){return e.label||""}));return r?a?t.filter((function(e){return e!==o})):[].concat(bt(t),[o]):t.length?a?bt(u.filter((function(e){return e!==o}))):[]:bt(u.filter((function(e){return e!==o})))}({hideSeries:S,legend:e,metaKey:t,series:D}))}})]})},ss=function(e){var t=e.value,n=e.onChange,r=e.onEnter,i=e.onArrowUp,o=e.onArrowDown,a=e.autocomplete,u=e.error,l=e.options,s=e.label,f=e.disabled,d=void 0!==f&&f,h=_t(X(-1),2),p=h[0],v=h[1],m=_t(X(!1),2),y=m[0],g=m[1],_=re(null),b=re(null),D=oe((function(){if(!y)return[];try{var e=new RegExp(String(t),"i");return l.filter((function(n){return e.test(n)&&n!==t})).sort((function(t,n){var r,i;return((null===(r=t.match(e))||void 0===r?void 0:r.index)||0)-((null===(i=n.match(e))||void 0===i?void 0:i.index)||0)}))}catch(c){return[]}}),[y,l,t]),w=function(){g(!1)},x=function(e){return function(){d||(n(e),w())}};return te((function(){if(a&&D.length){v(-1);var e=(t.match(/[a-zA-Z_:.][a-zA-Z0-9_:.]*/gm)||[]).length;g(a&&t.length>2&&e<=1)}}),[a,t,D]),te((function(){if(b.current){var e=b.current.childNodes[p];null!==e&&void 0!==e&&e.scrollIntoView&&e.scrollIntoView({block:"center"})}}),[p]),so(_,w,b),fr("div",{className:"vm-query-editor",ref:_,children:[fr(Fo,{value:t,label:s,type:"textarea",autofocus:!!t,error:u,onKeyDown:function(e){var t=e.key,a=e.ctrlKey,u=e.metaKey,l=e.shiftKey,c=a||u,s="ArrowUp"===t,f="ArrowDown"===t,h="Enter"===t,m="Escape"===t,g=y&&D.length,_=D[p],b=s||f;if((b&&g||b&&c||h&&g)&&e.preventDefault(),s&&g&&!c?v((function(e){return 0===e?0:e-1})):s&&c&&i(),f&&g&&!c?v((function(e){return e>=D.length-1?D.length-1:e+1})):f&&c&&o(),_&&h&&g&&!l&&!c){if(d)return;n(_),w()}else h&&!l&&(r(),w());m&&y&&w()},onChange:n,disabled:d}),fr(fo,{open:y,buttonRef:_,placement:"bottom-left",onClose:w,children:fr("div",{className:"vm-query-editor-autocomplete",ref:b,children:D.map((function(e,t){return fr("div",{className:Oi()({"vm-list__item":!0,"vm-list__item_active":t===p}),id:"$autocomplete$".concat(e),onClick:x(e),children:e},e)}))})})]})},fs=n(936),ds=n.n(fs),hs=function(e){var t=e.defaultStep,n=e.setStep,r=_t(X(t),2),i=r[0],o=r[1],a=_t(X(""),2),u=a[0],l=a[1],c=ae(ds()((function(e){return n(e||1)}),700),[]),s=function(e){e>0?(o(e),c(e),l("")):l("step is out of allowed range")};return te((function(){t&&s(t)}),[t]),fr(Fo,{label:"Step value",type:"number",value:i,error:u,onChange:function(e){var t=+e;t&&s(t)},endIcon:fr(ho,{title:"Reset step to default",children:fr(co,{variant:"text",size:"small",startIcon:fr(oi,{}),onClick:function(){s(t||1)}})})})},ps=function(){var e=Xn().serverURL,t=hr().tenantId,n=pr(),r=Qr(),i=_t(X(t||0),2),o=i[0],a=i[1],u=ae(ds()((function(t){var i=Number(t);if(n({type:"SET_TENANT_ID",payload:i}),e){var o=e.replace(/(\/select\/)([\d]+)(\/prometheus)/gim,"$1".concat(i,"$3"));n({type:"SET_SERVER",payload:o}),r({type:"RUN_QUERY"})}}),700),[]);return te((function(){o!==t&&a(t)}),[t]),fr(Fo,{label:"Tenant ID",type:"number",value:o,onChange:function(e){a(e),u(e)},endIcon:fr(ho,{title:"Define tenant id if you need request to another storage",children:fr(co,{variant:"text",size:"small",startIcon:fr(ai,{})})})})},vs=function(e){var t,n=e.value,r=void 0!==n&&n,i=e.disabled,o=void 0!==i&&i,a=e.label,u=e.color,l=void 0===u?"secondary":u,c=e.onChange;return fr("div",{className:Oi()((qn(t={"vm-switch":!0,"vm-switch_disabled":o,"vm-switch_active":r},"vm-switch_".concat(l,"_active"),r),qn(t,"vm-switch_".concat(l),l),t)),onClick:function(){o||c(!r)},children:[fr("div",{className:"vm-switch-track",children:fr("div",{className:"vm-switch-track__thumb"})}),a&&fr("span",{className:"vm-switch__label",children:a})]})},ms=function(){var e=Wi(),t=Xn().inputTenantID,n=ei().autocomplete,r=ti(),i=Ui(),o=i.nocache,a=i.isTracingEnabled,u=Hi(),l=Wr().period.step;return fr("div",{className:"vm-additional-settings",children:[fr(vs,{label:"Autocomplete",value:n,onChange:function(){r({type:"TOGGLE_AUTOCOMPLETE"})}}),fr(vs,{label:"Disable cache",value:o,onChange:function(){u({type:"TOGGLE_NO_CACHE"})}}),fr(vs,{label:"Trace query",value:a,onChange:function(){u({type:"TOGGLE_QUERY_TRACING"})}}),fr("div",{className:"vm-additional-settings__input",children:fr(hs,{defaultStep:l,setStep:function(t){e({type:"SET_CUSTOM_STEP",payload:t})}})}),!!t&&fr("div",{className:"vm-additional-settings__input",children:fr(ps,{})})]})};var ys=function(e){var t=re();return te((function(){t.current=e}),[e]),t.current},gs=function(e){var t=e.error,n=e.queryOptions,r=e.onHideQuery,i=ei(),o=i.query,a=i.queryHistory,u=i.autocomplete,l=ti(),c=Qr(),s=_t(X(o||[]),2),f=s[0],d=s[1],h=_t(X([]),2),p=h[0],v=h[1],m=ys(f),y=function(){l({type:"SET_QUERY_HISTORY",payload:f.map((function(e,t){var n=a[t]||{values:[]},r=e===n.values[n.values.length-1];return{index:n.values.length-Number(r),values:!r&&e?[].concat(bt(n.values),[e]):n.values}}))}),l({type:"SET_QUERY",payload:f}),c({type:"RUN_QUERY"})},g=function(e,t){d((function(n){return n.map((function(n,r){return r===t?e:n}))}))},_=function(e,t){return function(){!function(e,t){var n=a[t],r=n.index,i=n.values,o=r+e;o<0||o>=i.length||(g(i[o]||"",t),l({type:"SET_QUERY_HISTORY_BY_INDEX",payload:{value:{values:i,index:o},queryNumber:t}}))}(e,t)}},b=function(e){return function(t){g(t,e)}},D=function(e){return function(){var t;t=e,d((function(e){return e.filter((function(e,n){return n!==t}))})),v((function(t){return t.map((function(t){return t>e?t-1:t}))}))}},w=function(e){return function(){var t;t=e,v((function(e){return e.includes(t)?e.filter((function(e){return e!==t})):[].concat(bt(e),[t])}))}};return te((function(){m&&f.length1&&fr(ho,{title:"Remove Query",children:fr("div",{className:"vm-query-configurator-list-row__button",children:fr(co,{variant:"text",color:"error",startIcon:fr(xi,{}),onClick:D(r)})})})]},r)}))}),fr("div",{className:"vm-query-configurator-settings",children:[fr(ms,{}),fr("div",{className:"vm-query-configurator-settings__buttons",children:[f.length<4&&fr(co,{variant:"outlined",onClick:function(){d((function(e){return[].concat(bt(e),[""])}))},startIcon:fr(ki,{}),children:"Add Query"}),fr(co,{variant:"contained",onClick:y,startIcon:fr(gi,{}),children:"Execute Query"})]})]})]})};function _s(e){var t,n,r,i=2;for("undefined"!=typeof Symbol&&(n=Symbol.asyncIterator,r=Symbol.iterator);i--;){if(n&&null!=(t=e[n]))return t.call(e);if(r&&null!=(t=e[r]))return new bs(t.call(e));n="@@asyncIterator",r="@@iterator"}throw new TypeError("Object is not async iterable")}function bs(e){function t(e){if(Object(e)!==e)return Promise.reject(new TypeError(e+" is not an object."));var t=e.done;return Promise.resolve(e.value).then((function(e){return{value:e,done:t}}))}return bs=function(e){this.s=e,this.n=e.next},bs.prototype={s:null,n:null,next:function(){return t(this.n.apply(this.s,arguments))},return:function(e){var n=this.s.return;return void 0===n?Promise.resolve({value:e,done:!0}):t(n.apply(this.s,arguments))},throw:function(e){var n=this.s.return;return void 0===n?Promise.reject(e):t(n.apply(this.s,arguments))}},new bs(e)}var Ds=0,ws=function(){function e(t,n){Dt(this,e),this.tracing=void 0,this.query=void 0,this.tracingChildren=void 0,this.originalTracing=void 0,this.id=void 0,this.tracing=t,this.originalTracing=JSON.parse(JSON.stringify(t)),this.query=n,this.id=Ds++;var r=t.children||[];this.tracingChildren=r.map((function(t){return new e(t,n)}))}return xt(e,[{key:"queryValue",get:function(){return this.query}},{key:"idValue",get:function(){return this.id}},{key:"children",get:function(){return this.tracingChildren}},{key:"message",get:function(){return this.tracing.message}},{key:"duration",get:function(){return this.tracing.duration_msec}},{key:"JSON",get:function(){return JSON.stringify(this.tracing,null,2)}},{key:"originalJSON",get:function(){return JSON.stringify(this.originalTracing,null,2)}},{key:"setTracing",value:function(t){var n=this;this.tracing=t;var r=t.children||[];this.tracingChildren=r.map((function(t){return new e(t,n.query)}))}},{key:"setQuery",value:function(e){this.query=e}},{key:"resetTracing",value:function(){this.tracing=this.originalTracing}}]),e}(),xs=function(e){var t=e.predefinedQuery,n=e.visible,r=e.display,i=e.customStep,o=e.hideQuery,a=ei().query,u=Wr().period,l=Ui(),c=l.displayType,s=l.nocache,f=l.isTracingEnabled,d=hr().serverUrl,h=_t(X(!1),2),p=h[0],v=h[1],m=_t(X(),2),y=m[0],g=m[1],_=_t(X(),2),b=_[0],D=_[1],w=_t(X(),2),x=w[0],k=w[1],C=_t(X(),2),E=C[0],S=C[1],A=_t(X(),2),F=A[0],N=A[1],O=_t(X([]),2),T=O[0],B=O[1];te((function(){E&&(g(void 0),D(void 0),k(void 0))}),[E]);var M=function(){var e=es(Kc().mark((function e(t,n,r,i){var o,a,u,l,c,s;return Kc().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return o=new AbortController,B([].concat(bt(n),[o])),e.prev=2,e.delegateYield(Kc().mark((function e(){var n,f,d,h,p,v,m,y,_,b,w,x;return Kc().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:n="chart"===r,f=or[r],d=[],h=[],p=1,v=0,a=!1,u=!1,e.prev=8,c=_s(t);case 10:return e.next=12,c.next();case 12:if(!(a=!(s=e.sent).done)){e.next=24;break}return m=s.value,e.next=16,fetch(m,{signal:o.signal});case 16:return y=e.sent,e.next=19,y.json();case 19:_=e.sent,y.ok?(S(void 0),_.trace&&(b=new ws(_.trace,i[p-1]),h.push(b)),w=f-d.length,_.data.result.slice(0,w).forEach((function(e){e.group=p,d.push(e)})),v+=_.data.result.length,p++):S("".concat(_.errorType,"\r\n").concat(null===_||void 0===_?void 0:_.error));case 21:a=!1,e.next=10;break;case 24:e.next=30;break;case 26:e.prev=26,e.t0=e.catch(8),u=!0,l=e.t0;case 30:if(e.prev=30,e.prev=31,!a||null==c.return){e.next=35;break}return e.next=35,c.return();case 35:if(e.prev=35,!u){e.next=38;break}throw l;case 38:return e.finish(35);case 39:return e.finish(30);case 40:x="Showing ".concat(f," series out of ").concat(v," series due to performance reasons. Please narrow down the query, so it returns less series"),N(v>f?x:""),n?g(d):D(d),k(h);case 44:case"end":return e.stop()}}),e,null,[[8,26,30,40],[31,,35,39]])}))(),"t0",4);case 4:e.next=9;break;case 6:e.prev=6,e.t1=e.catch(2),e.t1 instanceof Error&&"AbortError"!==e.t1.name&&S("".concat(e.t1.name,": ").concat(e.t1.message));case 9:v(!1);case 10:case"end":return e.stop()}}),e,null,[[2,6]])})));return function(t,n,r,i){return e.apply(this,arguments)}}(),L=ae(ds()(M,800),[]),P=function(e,t){var n=e.trim(),r=!o||!o.includes(t);return n&&r},$=oe((function(){var e=null!==t&&void 0!==t?t:a,n="chart"===(r||c);if(u)if(d)if(e.every((function(e){return!e.trim()})))S(wo.validQuery);else{if(No(d)){var o=Kn({},u);return o.step=i,e.filter(P).map((function(e){return n?function(e,t,n,r,i){return"".concat(e,"/api/v1/query_range?query=").concat(encodeURIComponent(t),"&start=").concat(n.start,"&end=").concat(n.end,"&step=").concat(n.step).concat(r?"&nocache=1":"").concat(i?"&trace=1":"")}(d,e,o,s,f):function(e,t,n,r){return"".concat(e,"/api/v1/query?query=").concat(encodeURIComponent(t),"&time=").concat(n.end,"&step=").concat(n.step).concat(r?"&trace=1":"")}(d,e,o,f)}))}S(wo.validServer)}else S(wo.emptyServer)}),[d,u,c,i,o]);return te((function(){n&&null!==$&&void 0!==$&&$.length&&(v(!0),L($,T,r||c,null!==t&&void 0!==t?t:a))}),[$,n]),te((function(){var e=T.slice(0,-1);e.length&&(e.map((function(e){return e.abort()})),B(T.filter((function(e){return!e.signal.aborted}))))}),[T]),{fetchUrl:$,isLoading:p,graphData:y,liveData:b,error:E,warning:F,traces:x}},ks=function(e){var t=e.data,n=uo().showInfoMessage,r=oe((function(){return JSON.stringify(t,null,2)}),[t]);return fr("div",{className:"vm-json-view",children:[fr("div",{className:"vm-json-view__copy",children:fr(co,{variant:"outlined",onClick:function(){navigator.clipboard.writeText(r),n({text:"Formatted JSON has been copied",type:"success"})},children:"Copy JSON"})}),fr("pre",{className:"vm-json-view__code",children:fr("code",{children:r})})]})},Cs=function(e){var t=e.yaxis,n=e.setYaxisLimits,r=e.toggleEnableLimits,i=oe((function(){return Object.keys(t.limits.range)}),[t.limits.range]),o=ae(ds()((function(e,r,i){var o=t.limits.range;o[r][i]=+e,o[r][0]===o[r][1]||o[r][0]>o[r][1]||n(o)}),500),[t.limits.range]),a=function(e,t){return function(n){o(n,e,t)}};return fr("div",{className:"vm-axes-limits",children:[fr(vs,{value:t.limits.enable,onChange:r,label:"Fix the limits for y-axis"}),fr("div",{className:"vm-axes-limits-list",children:i.map((function(e){return fr("div",{className:"vm-axes-limits-list__inputs",children:[fr(Fo,{label:"Min ".concat(e),type:"number",disabled:!t.limits.enable,value:t.limits.range[e][0],onChange:a(e,0)}),fr(Fo,{label:"Max ".concat(e),type:"number",disabled:!t.limits.enable,value:t.limits.range[e][1],onChange:a(e,1)})]},e)}))})]})},Es="Axes settings",Ss=function(e){var t=e.yaxis,n=e.setYaxisLimits,r=e.toggleEnableLimits,i=re(null),o=_t(X(!1),2),a=o[0],u=o[1],l=re(null);so(i,(function(){return u(!1)}),l);var c=function(){u(!1)};return fr("div",{className:"vm-graph-settings",children:[fr(ho,{title:Es,children:fr("div",{ref:l,children:fr(co,{variant:"text",startIcon:fr(ri,{}),onClick:function(){u((function(e){return!e}))}})})}),fr(fo,{open:a,buttonRef:l,placement:"bottom-right",onClose:c,children:fr("div",{className:"vm-graph-settings-popper",ref:i,children:[fr("div",{className:"vm-popper-header",children:[fr("h3",{className:"vm-popper-header__title",children:Es}),fr(co,{size:"small",startIcon:fr(ii,{}),onClick:c})]}),fr("div",{className:"vm-graph-settings-popper__body",children:fr(Cs,{yaxis:t,setYaxisLimits:n,toggleEnableLimits:r})})]})})]})},As=function(e){var t=e.containerStyles,n=void 0===t?{}:t,r=e.message;return fr("div",{className:"vm-spinner",style:n&&{},children:[fr("div",{className:"half-circle-spinner",children:[fr("div",{className:"circle circle-1"}),fr("div",{className:"circle circle-2"})]}),r&&fr("div",{className:"vm-spinner__message",children:r})]})},Fs=function(){var e=hr().serverUrl,t=_t(X([]),2),n=t[0],r=t[1],i=function(){var t=es(Kc().mark((function t(){var n,i,o;return Kc().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:if(e){t.next=2;break}return t.abrupt("return");case 2:return n="".concat(e,"/api/v1/label/__name__/values"),t.prev=3,t.next=6,fetch(n);case 6:return i=t.sent,t.next=9,i.json();case 9:o=t.sent,i.ok&&r(o.data),t.next=16;break;case 13:t.prev=13,t.t0=t.catch(3),console.error(t.t0);case 16:case"end":return t.stop()}}),t,null,[[3,13]])})));return function(){return t.apply(this,arguments)}}();return te((function(){i()}),[e]),{queryOptions:n}},Ns=function(e){var t=e.value;return fr("div",{className:"vm-line-progress",children:[fr("div",{className:"vm-line-progress-track",children:fr("div",{className:"vm-line-progress-track__thumb",style:{width:"".concat(t,"%")}})}),fr("span",{children:[t.toFixed(2),"%"]})]})},Os=function e(t){var n,r=t.trace,i=t.totalMsec,o=_t(X({}),2),a=o[0],u=o[1],l=r.children&&!!r.children.length,c=r.duration/i*100;return fr("div",{className:"vm-nested-nav",children:[fr("div",{className:"vm-nested-nav-header",onClick:(n=r.idValue,function(){u((function(e){return Kn(Kn({},e),{},qn({},n,!e[n]))}))}),children:[l&&fr("div",{className:Oi()({"vm-nested-nav-header__icon":!0,"vm-nested-nav-header__icon_open":a[r.idValue]}),children:fr(di,{})}),fr("div",{className:"vm-nested-nav-header__progress",children:fr(Ns,{value:c})}),fr("div",{className:"vm-nested-nav-header__message",children:r.message}),fr("div",{className:"vm-nested-nav-header__duration",children:"duration: ".concat(r.duration," ms")})]}),a[r.idValue]&&fr("div",{children:l&&r.children.map((function(t){return fr(e,{trace:t,totalMsec:i},t.duration)}))})]})},Ts=function(e){var t=e.editable,n=void 0!==t&&t,r=e.defaultTile,i=void 0===r?"JSON":r,o=e.displayTitle,a=void 0===o||o,u=e.defaultJson,l=void 0===u?"":u,s=e.resetValue,f=void 0===s?"":s,d=e.onClose,h=e.onUpload,p=uo().showInfoMessage,v=_t(X(l),2),m=v[0],y=v[1],g=_t(X(i),2),_=g[0],b=g[1],D=_t(X(""),2),w=D[0],x=D[1],k=_t(X(""),2),C=k[0],E=k[1],S=oe((function(){try{var e=JSON.parse(m),t=e.trace||e;return t.duration_msec?(new ws(t,""),""):wo.traceNotFound}catch(c){return c instanceof Error?c.message:"Unknown error"}}),[m]),A=function(){var e=es(Kc().mark((function e(){return Kc().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,navigator.clipboard.writeText(m);case 2:p({text:"Formatted JSON has been copied",type:"success"});case 3:case"end":return e.stop()}}),e)})));return function(){return e.apply(this,arguments)}}(),F=function(){E(S),_.trim()||x(wo.emptyTitle),S||w||(h(m,_),d())};return fr("div",{className:Oi()({"vm-json-form":!0,"vm-json-form_one-field":!a}),children:[a&&fr(Fo,{value:_,label:"Title",error:w,onEnter:F,onChange:function(e){b(e)}}),fr(Fo,{value:m,label:"JSON",type:"textarea",error:C,autofocus:!0,onChange:function(e){E(""),y(e)},disabled:!n}),fr("div",{className:"vm-json-form-footer",children:[fr("div",{className:"vm-json-form-footer__controls",children:[fr(co,{variant:"outlined",startIcon:fr(Ai,{}),onClick:A,children:"Copy JSON"}),f&&fr(co,{variant:"text",startIcon:fr(oi,{}),onClick:function(){y(f)},children:"Reset JSON"})]}),fr("div",{className:"vm-json-form-footer__controls vm-json-form-footer__controls_right",children:[fr(co,{variant:"outlined",color:"error",onClick:d,children:"Cancel"}),fr(co,{variant:"contained",onClick:F,children:"apply"})]})]})]})},Bs=function(e){var t=e.traces,n=e.jsonEditor,r=void 0!==n&&n,i=e.onDeleteClick,o=_t(X(null),2),a=o[0],u=o[1],l=function(){u(null)};if(!t.length)return fr(oo,{variant:"info",children:"Please re-run the query to see results of the tracing"});var s=function(e){return function(){i(e)}};return fr(m,{children:[fr("div",{className:"vm-tracings-view",children:t.map((function(e){return fr("div",{className:"vm-tracings-view-trace vm-block vm-block_empty-padding",children:[fr("div",{className:"vm-tracings-view-trace-header",children:[fr("h3",{className:"vm-tracings-view-trace-header-title",children:["Trace for ",fr("b",{className:"vm-tracings-view-trace-header-title__query",children:e.queryValue})]}),fr(ho,{title:"Open JSON",children:fr(co,{variant:"text",startIcon:fr(wi,{}),onClick:(t=e,function(){u(t)})})}),fr(ho,{title:"Remove trace",children:fr(co,{variant:"text",color:"error",startIcon:fr(xi,{}),onClick:s(e)})})]}),fr("nav",{className:"vm-tracings-view-trace__nav",children:fr(Os,{trace:e,totalMsec:e.duration})})]},e.idValue);var t}))}),a&&fr(To,{title:a.queryValue,onClose:l,children:fr(Ts,{editable:r,displayTitle:r,defaultTile:a.queryValue,defaultJson:a.JSON,resetValue:a.originalJSON,onClose:l,onUpload:function(e,t){if(r&&a)try{a.setTracing(JSON.parse(e)),a.setQuery(t),u(null)}catch(c){console.error(c)}}})})]})},Ms=function(e,t){return oe((function(){var n={};e.forEach((function(e){return Object.entries(e.metric).forEach((function(e){return n[e[0]]?n[e[0]].options.add(e[1]):n[e[0]]={options:new Set([e[1]])}}))}));var r=Object.entries(n).map((function(e){return{key:e[0],variations:e[1].options.size}})).sort((function(e,t){return e.variations-t.variations}));return t?r.filter((function(e){return t.includes(e.key)})):r}),[e,t])},Ls=function(e){var t,n=e.checked,r=void 0!==n&&n,i=e.disabled,o=void 0!==i&&i,a=e.label,u=e.color,l=void 0===u?"secondary":u,c=e.onChange;return fr("div",{className:Oi()((qn(t={"vm-checkbox":!0,"vm-checkbox_disabled":o,"vm-checkbox_active":r},"vm-checkbox_".concat(l,"_active"),r),qn(t,"vm-checkbox_".concat(l),l),t)),onClick:function(){o||c(!r)},children:[fr("div",{className:"vm-checkbox-track",children:fr("div",{className:"vm-checkbox-track__thumb",children:fr(Ci,{})})}),a&&fr("span",{className:"vm-checkbox__label",children:a})]})},Ps="Display columns",$s=function(e){var t=e.data,n=e.defaultColumns,r=e.onChange,i=re(null),o=_t(X(!1),2),a=o[0],u=o[1],l=Ms(t),c=oe((function(){return!l.length}),[l]),s=_t(X(l.map((function(e){return e.key}))),2),f=s[0],d=s[1],h=function(){u(!1),d(n||l.map((function(e){return e.key})))},p=function(e){return function(){!function(e){d((function(t){return f.includes(e)?t.filter((function(t){return t!==e})):[].concat(bt(t),[e])}))}(e)}};return te((function(){d(l.map((function(e){return e.key})))}),[l]),fr("div",{className:"vm-table-settings",children:[fr(ho,{title:Ps,children:fr("div",{ref:i,children:fr(co,{variant:"text",startIcon:fr(ri,{}),onClick:function(){u((function(e){return!e}))},disabled:c})})}),fr(fo,{open:a,onClose:h,placement:"bottom-right",buttonRef:i,children:fr("div",{className:"vm-table-settings-popper",children:[fr("div",{className:"vm-popper-header",children:[fr("h3",{className:"vm-popper-header__title",children:Ps}),fr(co,{onClick:h,startIcon:fr(ii,{}),size:"small"})]}),fr("div",{className:"vm-table-settings-popper-list",children:l.map((function(e){return fr("div",{className:"vm-table-settings-popper-list__item",children:fr(Ls,{checked:f.includes(e.key),onChange:p(e.key),label:e.key})},e.key)}))}),fr("div",{className:"vm-table-settings-popper__footer",children:[fr(co,{color:"error",variant:"outlined",size:"small",onClick:function(){u(!1);var e=l.map((function(e){return e.key}));d(e),r(e)},children:"Reset"}),fr(co,{variant:"contained",size:"small",onClick:function(){u(!1),r(f)},children:"apply"})]})]})})]})};function Is(e){return function(e,t){return Object.fromEntries(Object.entries(e).filter(t))}(e,(function(e){return!!e[1]}))}var Rs=["__name__"],js=function(e){var t=e.data,n=e.displayColumns,r=uo().showInfoMessage,i=Ms(t,n),o=_t(X(""),2),a=o[0],u=o[1],l=_t(X("asc"),2),c=l[0],s=l[1],f=function(e){var t=e.__name__,n=rs(e,Rs);return t||Object.keys(n).length?"".concat(t," ").concat(JSON.stringify(n)):""},d=oe((function(){var e=null===t||void 0===t?void 0:t.map((function(e){return{metadata:i.map((function(t){return e.metric[t.key]||"-"})),value:e.value?e.value[1]:"-",copyValue:f(e.metric)}})),n="Value"===a,r=i.findIndex((function(e){return e.key===a}));return n||-1!==r?e.sort((function(e,t){var i=n?Number(e.value):e.metadata[r],o=n?Number(t.value):t.metadata[r];return("asc"===c?io)?-1:1})):e}),[i,t,a,c]),h=oe((function(){return d.some((function(e){return e.copyValue}))}),[d]),p=function(){var e=es(Kc().mark((function e(t){return Kc().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,navigator.clipboard.writeText(t);case 2:r({text:"Row has been copied",type:"success"});case 3:case"end":return e.stop()}}),e)})));return function(t){return e.apply(this,arguments)}}(),v=function(e){return function(){!function(e){s((function(t){return"asc"===t&&a===e?"desc":"asc"})),u(e)}(e)}};return d.length?fr("table",{className:"vm-table",children:[fr("thead",{className:"vm-table-header",children:fr("tr",{className:"vm-table__row vm-table__row_header",children:[i.map((function(e,t){return fr("td",{className:"vm-table-cell vm-table-cell_header vm-table-cell_sort",onClick:v(e.key),children:fr("div",{className:"vm-table-cell__content",children:[e.key,fr("div",{className:Oi()({"vm-table__sort-icon":!0,"vm-table__sort-icon_active":a===e.key,"vm-table__sort-icon_desc":"desc"===c&&a===e.key}),children:fr(hi,{})})]})},t)})),fr("td",{className:"vm-table-cell vm-table-cell_header vm-table-cell_right vm-table-cell_sort",onClick:v("Value"),children:fr("div",{className:"vm-table-cell__content",children:[fr("div",{className:Oi()({"vm-table__sort-icon":!0,"vm-table__sort-icon_active":"Value"===a,"vm-table__sort-icon_desc":"desc"===c}),children:fr(hi,{})}),"Value"]})}),h&&fr("td",{className:"vm-table-cell vm-table-cell_header"})]})}),fr("tbody",{className:"vm-table-body",children:d.map((function(e,t){return fr("tr",{className:"vm-table__row",children:[e.metadata.map((function(e,n){return fr("td",{className:Oi()({"vm-table-cell vm-table-cell_no-wrap":!0,"vm-table-cell_gray":d[t-1]&&d[t-1].metadata[n]===e}),children:e},n)})),fr("td",{className:"vm-table-cell vm-table-cell_right",children:e.value}),h&&fr("td",{className:"vm-table-cell vm-table-cell_right",children:e.copyValue&&fr("div",{className:"vm-table-cell__content",children:fr(ho,{title:"Copy row",children:fr(co,{variant:"text",color:"gray",size:"small",startIcon:fr(Ai,{}),onClick:(n=e.copyValue,function(){p(n)})})})})})]},t);var n}))})]}):fr(oo,{variant:"warning",children:"No data to show"})},zs=function(){var e=Ui(),t=e.displayType,n=e.isTracingEnabled,r=ei().query,i=Wr().period,o=Qr();!function(){var e=hr().tenantId,t=Ui().displayType,n=ei().query,r=Wr(),i=r.duration,o=r.relativeTime,a=r.period,u=a.date,l=a.step,c=function(){var r={};n.forEach((function(n,a){var c,s="g".concat(a);r["".concat(s,".expr")]=n,r["".concat(s,".range_input")]=i,r["".concat(s,".end_input")]=u,r["".concat(s,".step_input")]=l,r["".concat(s,".tab")]=(null===(c=Li.find((function(e){return e.value===t})))||void 0===c?void 0:c.prometheusCode)||0,r["".concat(s,".relative_time")]=o,r["".concat(s,".tenantID")]=e})),ar(Is(r))};te(c,[e,t,n,i,o,u,l]),te(c,[])}();var a=_t(X(),2),u=a[0],l=a[1],c=_t(X([]),2),s=c[0],f=c[1],d=_t(X([]),2),h=d[0],p=d[1],v=ue(qi).state,m=v.customStep,y=v.yaxis,g=Wi(),_=Fs().queryOptions,b=xs({visible:!0,customStep:m,hideQuery:h}),D=b.isLoading,w=b.liveData,x=b.graphData,k=b.error,C=b.warning,E=b.traces,S=function(e){g({type:"SET_YAXIS_LIMITS",payload:e})};return te((function(){E&&f([].concat(bt(s),bt(E)))}),[E]),te((function(){f([])}),[t]),fr("div",{className:"vm-custom-panel",children:[fr(gs,{error:k,queryOptions:_,onHideQuery:function(e){p(e)}}),n&&fr("div",{className:"vm-custom-panel__trace",children:fr(Bs,{traces:s,onDeleteClick:function(e){var t=s.filter((function(t){return t.idValue!==e.idValue}));f(bt(t))}})}),D&&fr(As,{}),k&&fr(oo,{variant:"error",children:k}),C&&fr(oo,{variant:"warning",children:C}),fr("div",{className:"vm-custom-panel-body vm-block",children:[fr("div",{className:"vm-custom-panel-body-header",children:[fr(Pi,{}),"chart"===t&&fr(Ss,{yaxis:y,setYaxisLimits:S,toggleEnableLimits:function(){g({type:"TOGGLE_ENABLE_YAXIS_LIMITS"})}}),"table"===t&&fr($s,{data:w||[],defaultColumns:u,onChange:l})]}),x&&i&&"chart"===t&&fr(cs,{data:x,period:i,customStep:m,query:r,yaxis:y,setYaxisLimits:S,setPeriod:function(e){var t=e.from,n=e.to;o({type:"SET_PERIOD",payload:{from:t,to:n}})}}),w&&"code"===t&&fr(ks,{data:w}),w&&"table"===t&&fr(js,{data:w,displayColumns:u})]})]})},Us=function(){var e=es(Kc().mark((function e(t){var n,r;return Kc().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,fetch("./dashboards/".concat(t));case 2:return n=e.sent,e.next=5,n.json();case 5:return r=e.sent,e.abrupt("return",r);case 7:case"end":return e.stop()}}),e)})));return function(t){return e.apply(this,arguments)}}(),Hs=es(Kc().mark((function e(){var t;return Kc().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return t=window.__VMUI_PREDEFINED_DASHBOARDS__,e.next=3,Promise.all(t.map(function(){var e=es(Kc().mark((function e(t){return Kc().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.abrupt("return",Us(t));case 1:case"end":return e.stop()}}),e)})));return function(t){return e.apply(this,arguments)}}()));case 3:return e.abrupt("return",e.sent);case 4:case"end":return e.stop()}}),e)})));function Vs(){return{async:!1,baseUrl:null,breaks:!1,extensions:null,gfm:!0,headerIds:!0,headerPrefix:"",highlight:null,langPrefix:"language-",mangle:!0,pedantic:!1,renderer:null,sanitize:!1,sanitizer:null,silent:!1,smartypants:!1,tokenizer:null,walkTokens:null,xhtml:!1}}var Ys={async:!1,baseUrl:null,breaks:!1,extensions:null,gfm:!0,headerIds:!0,headerPrefix:"",highlight:null,langPrefix:"language-",mangle:!0,pedantic:!1,renderer:null,sanitize:!1,sanitizer:null,silent:!1,smartypants:!1,tokenizer:null,walkTokens:null,xhtml:!1};var qs=/[&<>"']/,Ws=/[&<>"']/g,Qs=/[<>"']|&(?!#?\w+;)/,Gs=/[<>"']|&(?!#?\w+;)/g,Js={"&":"&","<":"<",">":">",'"':""","'":"'"},Zs=function(e){return Js[e]};function Ks(e,t){if(t){if(qs.test(e))return e.replace(Ws,Zs)}else if(Qs.test(e))return e.replace(Gs,Zs);return e}var Xs=/&(#(?:\d+)|(?:#x[0-9A-Fa-f]+)|(?:\w+));?/gi;function ef(e){return e.replace(Xs,(function(e,t){return"colon"===(t=t.toLowerCase())?":":"#"===t.charAt(0)?"x"===t.charAt(1)?String.fromCharCode(parseInt(t.substring(2),16)):String.fromCharCode(+t.substring(1)):""}))}var tf=/(^|[^\[])\^/g;function nf(e,t){e="string"===typeof e?e:e.source,t=t||"";var n={replace:function(t,r){return r=(r=r.source||r).replace(tf,"$1"),e=e.replace(t,r),n},getRegex:function(){return new RegExp(e,t)}};return n}var rf=/[^\w:]/g,of=/^$|^[a-z][a-z0-9+.-]*:|^[?#]/i;function af(e,t,n){if(e){var r;try{r=decodeURIComponent(ef(n)).replace(rf,"").toLowerCase()}catch(c){return null}if(0===r.indexOf("javascript:")||0===r.indexOf("vbscript:")||0===r.indexOf("data:"))return null}t&&!of.test(n)&&(n=function(e,t){uf[" "+e]||(lf.test(e)?uf[" "+e]=e+"/":uf[" "+e]=pf(e,"/",!0));var n=-1===(e=uf[" "+e]).indexOf(":");return"//"===t.substring(0,2)?n?t:e.replace(cf,"$1")+t:"/"===t.charAt(0)?n?t:e.replace(sf,"$1")+t:e+t}(t,n));try{n=encodeURI(n).replace(/%25/g,"%")}catch(c){return null}return n}var uf={},lf=/^[^:]+:\/*[^/]*$/,cf=/^([^:]+:)[\s\S]*$/,sf=/^([^:]+:\/*[^/]*)[\s\S]*$/;var ff={exec:function(){}};function df(e){for(var t,n,r=1;r=0&&"\\"===n[i];)r=!r;return r?"|":" |"})).split(/ \|/),r=0;if(n[0].trim()||n.shift(),n.length>0&&!n[n.length-1].trim()&&n.pop(),n.length>t)n.splice(t);else for(;n.length1;)1&t&&(n+=e),t>>=1,e+=e;return n+e}function yf(e,t,n,r){var i=t.href,o=t.title?Ks(t.title):null,a=e[1].replace(/\\([\[\]])/g,"$1");if("!"!==e[0].charAt(0)){r.state.inLink=!0;var u={type:"link",raw:n,href:i,title:o,text:a,tokens:r.inlineTokens(a)};return r.state.inLink=!1,u}return{type:"image",raw:n,href:i,title:o,text:Ks(a)}}var gf=function(){function e(t){Dt(this,e),this.options=t||Ys}return xt(e,[{key:"space",value:function(e){var t=this.rules.block.newline.exec(e);if(t&&t[0].length>0)return{type:"space",raw:t[0]}}},{key:"code",value:function(e){var t=this.rules.block.code.exec(e);if(t){var n=t[0].replace(/^ {1,4}/gm,"");return{type:"code",raw:t[0],codeBlockStyle:"indented",text:this.options.pedantic?n:pf(n,"\n")}}}},{key:"fences",value:function(e){var t=this.rules.block.fences.exec(e);if(t){var n=t[0],r=function(e,t){var n=e.match(/^(\s+)(?:```)/);if(null===n)return t;var r=n[1];return t.split("\n").map((function(e){var t=e.match(/^\s+/);return null===t?e:_t(t,1)[0].length>=r.length?e.slice(r.length):e})).join("\n")}(n,t[3]||"");return{type:"code",raw:n,lang:t[2]?t[2].trim().replace(this.rules.inline._escapes,"$1"):t[2],text:r}}}},{key:"heading",value:function(e){var t=this.rules.block.heading.exec(e);if(t){var n=t[2].trim();if(/#$/.test(n)){var r=pf(n,"#");this.options.pedantic?n=r.trim():r&&!/ $/.test(r)||(n=r.trim())}return{type:"heading",raw:t[0],depth:t[1].length,text:n,tokens:this.lexer.inline(n)}}}},{key:"hr",value:function(e){var t=this.rules.block.hr.exec(e);if(t)return{type:"hr",raw:t[0]}}},{key:"blockquote",value:function(e){var t=this.rules.block.blockquote.exec(e);if(t){var n=t[0].replace(/^ *>[ \t]?/gm,"");return{type:"blockquote",raw:t[0],tokens:this.lexer.blockTokens(n,[]),text:n}}}},{key:"list",value:function(e){var t=this.rules.block.list.exec(e);if(t){var n,r,i,o,a,u,l,c,s,f,d,h,p=t[1].trim(),v=p.length>1,m={type:"list",raw:"",ordered:v,start:v?+p.slice(0,-1):"",loose:!1,items:[]};p=v?"\\d{1,9}\\".concat(p.slice(-1)):"\\".concat(p),this.options.pedantic&&(p=v?p:"[*+-]");for(var y=new RegExp("^( {0,3}".concat(p,")((?:[\t ][^\\n]*)?(?:\\n|$))"));e&&(h=!1,t=y.exec(e))&&!this.rules.block.hr.test(e);){if(n=t[0],e=e.substring(n.length),c=t[2].split("\n",1)[0],s=e.split("\n",1)[0],this.options.pedantic?(o=2,d=c.trimLeft()):(o=(o=t[2].search(/[^ ]/))>4?1:o,d=c.slice(o),o+=t[1].length),u=!1,!c&&/^ *$/.test(s)&&(n+=s+"\n",e=e.substring(s.length+1),h=!0),!h)for(var g=new RegExp("^ {0,".concat(Math.min(3,o-1),"}(?:[*+-]|\\d{1,9}[.)])((?: [^\\n]*)?(?:\\n|$))")),_=new RegExp("^ {0,".concat(Math.min(3,o-1),"}((?:- *){3,}|(?:_ *){3,}|(?:\\* *){3,})(?:\\n+|$)")),b=new RegExp("^ {0,".concat(Math.min(3,o-1),"}(?:```|~~~)")),D=new RegExp("^ {0,".concat(Math.min(3,o-1),"}#"));e&&(c=f=e.split("\n",1)[0],this.options.pedantic&&(c=c.replace(/^ {1,4}(?=( {4})*[^ ])/g," ")),!b.test(c))&&!D.test(c)&&!g.test(c)&&!_.test(e);){if(c.search(/[^ ]/)>=o||!c.trim())d+="\n"+c.slice(o);else{if(u)break;d+="\n"+c}u||c.trim()||(u=!0),n+=f+"\n",e=e.substring(f.length+1)}m.loose||(l?m.loose=!0:/\n *\n *$/.test(n)&&(l=!0)),this.options.gfm&&(r=/^\[[ xX]\] /.exec(d))&&(i="[ ] "!==r[0],d=d.replace(/^\[[ xX]\] +/,"")),m.items.push({type:"list_item",raw:n,task:!!r,checked:i,loose:!1,text:d}),m.raw+=n}m.items[m.items.length-1].raw=n.trimRight(),m.items[m.items.length-1].text=d.trimRight(),m.raw=m.raw.trimRight();var w=m.items.length;for(a=0;a1)return!0}}catch(i){r.e(i)}finally{r.f()}return!1}));!m.loose&&x.length&&k&&(m.loose=!0,m.items[a].loose=!0)}return m}}},{key:"html",value:function(e){var t=this.rules.block.html.exec(e);if(t){var n={type:"html",raw:t[0],pre:!this.options.sanitizer&&("pre"===t[1]||"script"===t[1]||"style"===t[1]),text:t[0]};if(this.options.sanitize){var r=this.options.sanitizer?this.options.sanitizer(t[0]):Ks(t[0]);n.type="paragraph",n.text=r,n.tokens=this.lexer.inline(r)}return n}}},{key:"def",value:function(e){var t=this.rules.block.def.exec(e);if(t)return t[3]&&(t[3]=t[3].substring(1,t[3].length-1)),{type:"def",tag:t[1].toLowerCase().replace(/\s+/g," "),raw:t[0],href:t[2]?t[2].replace(this.rules.inline._escapes,"$1"):t[2],title:t[3]?t[3].replace(this.rules.inline._escapes,"$1"):t[3]}}},{key:"table",value:function(e){var t=this.rules.block.table.exec(e);if(t){var n={type:"table",header:hf(t[1]).map((function(e){return{text:e}})),align:t[2].replace(/^ *|\| *$/g,"").split(/ *\| */),rows:t[3]&&t[3].trim()?t[3].replace(/\n[ \t]*$/,"").split("\n"):[]};if(n.header.length===n.align.length){n.raw=t[0];var r,i,o,a,u=n.align.length;for(r=0;r/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:this.options.sanitize?"text":"html",raw:t[0],inLink:this.lexer.state.inLink,inRawBlock:this.lexer.state.inRawBlock,text:this.options.sanitize?this.options.sanitizer?this.options.sanitizer(t[0]):Ks(t[0]):t[0]}}},{key:"link",value:function(e){var t=this.rules.inline.link.exec(e);if(t){var n=t[2].trim();if(!this.options.pedantic&&/^$/.test(n))return;var r=pf(n.slice(0,-1),"\\");if((n.length-r.length)%2===0)return}else{var i=function(e,t){if(-1===e.indexOf(t[1]))return-1;for(var n=e.length,r=0,i=0;i-1){var o=(0===t[0].indexOf("!")?5:4)+t[1].length+i;t[2]=t[2].substring(0,i),t[0]=t[0].substring(0,o).trim(),t[3]=""}}var a=t[2],u="";if(this.options.pedantic){var l=/^([^'"]*[^\s])\s+(['"])(.*)\2/.exec(a);l&&(a=l[1],u=l[3])}else u=t[3]?t[3].slice(1,-1):"";return a=a.trim(),/^$/.test(n)?a.slice(1):a.slice(1,-1)),yf(t,{href:a?a.replace(this.rules.inline._escapes,"$1"):a,title:u?u.replace(this.rules.inline._escapes,"$1"):u},t[0],this.lexer)}}},{key:"reflink",value:function(e,t){var n;if((n=this.rules.inline.reflink.exec(e))||(n=this.rules.inline.nolink.exec(e))){var r=(n[2]||n[1]).replace(/\s+/g," ");if(!(r=t[r.toLowerCase()])||!r.href){var i=n[0].charAt(0);return{type:"text",raw:i,text:i}}return yf(n,r,n[0],this.lexer)}}},{key:"emStrong",value:function(e,t){var n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:"",r=this.rules.inline.emStrong.lDelim.exec(e);if(r&&(!r[3]||!n.match(/(?:[0-9A-Za-z\xAA\xB2\xB3\xB5\xB9\xBA\xBC-\xBE\xC0-\xD6\xD8-\xF6\xF8-\u02C1\u02C6-\u02D1\u02E0-\u02E4\u02EC\u02EE\u0370-\u0374\u0376\u0377\u037A-\u037D\u037F\u0386\u0388-\u038A\u038C\u038E-\u03A1\u03A3-\u03F5\u03F7-\u0481\u048A-\u052F\u0531-\u0556\u0559\u0560-\u0588\u05D0-\u05EA\u05EF-\u05F2\u0620-\u064A\u0660-\u0669\u066E\u066F\u0671-\u06D3\u06D5\u06E5\u06E6\u06EE-\u06FC\u06FF\u0710\u0712-\u072F\u074D-\u07A5\u07B1\u07C0-\u07EA\u07F4\u07F5\u07FA\u0800-\u0815\u081A\u0824\u0828\u0840-\u0858\u0860-\u086A\u0870-\u0887\u0889-\u088E\u08A0-\u08C9\u0904-\u0939\u093D\u0950\u0958-\u0961\u0966-\u096F\u0971-\u0980\u0985-\u098C\u098F\u0990\u0993-\u09A8\u09AA-\u09B0\u09B2\u09B6-\u09B9\u09BD\u09CE\u09DC\u09DD\u09DF-\u09E1\u09E6-\u09F1\u09F4-\u09F9\u09FC\u0A05-\u0A0A\u0A0F\u0A10\u0A13-\u0A28\u0A2A-\u0A30\u0A32\u0A33\u0A35\u0A36\u0A38\u0A39\u0A59-\u0A5C\u0A5E\u0A66-\u0A6F\u0A72-\u0A74\u0A85-\u0A8D\u0A8F-\u0A91\u0A93-\u0AA8\u0AAA-\u0AB0\u0AB2\u0AB3\u0AB5-\u0AB9\u0ABD\u0AD0\u0AE0\u0AE1\u0AE6-\u0AEF\u0AF9\u0B05-\u0B0C\u0B0F\u0B10\u0B13-\u0B28\u0B2A-\u0B30\u0B32\u0B33\u0B35-\u0B39\u0B3D\u0B5C\u0B5D\u0B5F-\u0B61\u0B66-\u0B6F\u0B71-\u0B77\u0B83\u0B85-\u0B8A\u0B8E-\u0B90\u0B92-\u0B95\u0B99\u0B9A\u0B9C\u0B9E\u0B9F\u0BA3\u0BA4\u0BA8-\u0BAA\u0BAE-\u0BB9\u0BD0\u0BE6-\u0BF2\u0C05-\u0C0C\u0C0E-\u0C10\u0C12-\u0C28\u0C2A-\u0C39\u0C3D\u0C58-\u0C5A\u0C5D\u0C60\u0C61\u0C66-\u0C6F\u0C78-\u0C7E\u0C80\u0C85-\u0C8C\u0C8E-\u0C90\u0C92-\u0CA8\u0CAA-\u0CB3\u0CB5-\u0CB9\u0CBD\u0CDD\u0CDE\u0CE0\u0CE1\u0CE6-\u0CEF\u0CF1\u0CF2\u0D04-\u0D0C\u0D0E-\u0D10\u0D12-\u0D3A\u0D3D\u0D4E\u0D54-\u0D56\u0D58-\u0D61\u0D66-\u0D78\u0D7A-\u0D7F\u0D85-\u0D96\u0D9A-\u0DB1\u0DB3-\u0DBB\u0DBD\u0DC0-\u0DC6\u0DE6-\u0DEF\u0E01-\u0E30\u0E32\u0E33\u0E40-\u0E46\u0E50-\u0E59\u0E81\u0E82\u0E84\u0E86-\u0E8A\u0E8C-\u0EA3\u0EA5\u0EA7-\u0EB0\u0EB2\u0EB3\u0EBD\u0EC0-\u0EC4\u0EC6\u0ED0-\u0ED9\u0EDC-\u0EDF\u0F00\u0F20-\u0F33\u0F40-\u0F47\u0F49-\u0F6C\u0F88-\u0F8C\u1000-\u102A\u103F-\u1049\u1050-\u1055\u105A-\u105D\u1061\u1065\u1066\u106E-\u1070\u1075-\u1081\u108E\u1090-\u1099\u10A0-\u10C5\u10C7\u10CD\u10D0-\u10FA\u10FC-\u1248\u124A-\u124D\u1250-\u1256\u1258\u125A-\u125D\u1260-\u1288\u128A-\u128D\u1290-\u12B0\u12B2-\u12B5\u12B8-\u12BE\u12C0\u12C2-\u12C5\u12C8-\u12D6\u12D8-\u1310\u1312-\u1315\u1318-\u135A\u1369-\u137C\u1380-\u138F\u13A0-\u13F5\u13F8-\u13FD\u1401-\u166C\u166F-\u167F\u1681-\u169A\u16A0-\u16EA\u16EE-\u16F8\u1700-\u1711\u171F-\u1731\u1740-\u1751\u1760-\u176C\u176E-\u1770\u1780-\u17B3\u17D7\u17DC\u17E0-\u17E9\u17F0-\u17F9\u1810-\u1819\u1820-\u1878\u1880-\u1884\u1887-\u18A8\u18AA\u18B0-\u18F5\u1900-\u191E\u1946-\u196D\u1970-\u1974\u1980-\u19AB\u19B0-\u19C9\u19D0-\u19DA\u1A00-\u1A16\u1A20-\u1A54\u1A80-\u1A89\u1A90-\u1A99\u1AA7\u1B05-\u1B33\u1B45-\u1B4C\u1B50-\u1B59\u1B83-\u1BA0\u1BAE-\u1BE5\u1C00-\u1C23\u1C40-\u1C49\u1C4D-\u1C7D\u1C80-\u1C88\u1C90-\u1CBA\u1CBD-\u1CBF\u1CE9-\u1CEC\u1CEE-\u1CF3\u1CF5\u1CF6\u1CFA\u1D00-\u1DBF\u1E00-\u1F15\u1F18-\u1F1D\u1F20-\u1F45\u1F48-\u1F4D\u1F50-\u1F57\u1F59\u1F5B\u1F5D\u1F5F-\u1F7D\u1F80-\u1FB4\u1FB6-\u1FBC\u1FBE\u1FC2-\u1FC4\u1FC6-\u1FCC\u1FD0-\u1FD3\u1FD6-\u1FDB\u1FE0-\u1FEC\u1FF2-\u1FF4\u1FF6-\u1FFC\u2070\u2071\u2074-\u2079\u207F-\u2089\u2090-\u209C\u2102\u2107\u210A-\u2113\u2115\u2119-\u211D\u2124\u2126\u2128\u212A-\u212D\u212F-\u2139\u213C-\u213F\u2145-\u2149\u214E\u2150-\u2189\u2460-\u249B\u24EA-\u24FF\u2776-\u2793\u2C00-\u2CE4\u2CEB-\u2CEE\u2CF2\u2CF3\u2CFD\u2D00-\u2D25\u2D27\u2D2D\u2D30-\u2D67\u2D6F\u2D80-\u2D96\u2DA0-\u2DA6\u2DA8-\u2DAE\u2DB0-\u2DB6\u2DB8-\u2DBE\u2DC0-\u2DC6\u2DC8-\u2DCE\u2DD0-\u2DD6\u2DD8-\u2DDE\u2E2F\u3005-\u3007\u3021-\u3029\u3031-\u3035\u3038-\u303C\u3041-\u3096\u309D-\u309F\u30A1-\u30FA\u30FC-\u30FF\u3105-\u312F\u3131-\u318E\u3192-\u3195\u31A0-\u31BF\u31F0-\u31FF\u3220-\u3229\u3248-\u324F\u3251-\u325F\u3280-\u3289\u32B1-\u32BF\u3400-\u4DBF\u4E00-\uA48C\uA4D0-\uA4FD\uA500-\uA60C\uA610-\uA62B\uA640-\uA66E\uA67F-\uA69D\uA6A0-\uA6EF\uA717-\uA71F\uA722-\uA788\uA78B-\uA7CA\uA7D0\uA7D1\uA7D3\uA7D5-\uA7D9\uA7F2-\uA801\uA803-\uA805\uA807-\uA80A\uA80C-\uA822\uA830-\uA835\uA840-\uA873\uA882-\uA8B3\uA8D0-\uA8D9\uA8F2-\uA8F7\uA8FB\uA8FD\uA8FE\uA900-\uA925\uA930-\uA946\uA960-\uA97C\uA984-\uA9B2\uA9CF-\uA9D9\uA9E0-\uA9E4\uA9E6-\uA9FE\uAA00-\uAA28\uAA40-\uAA42\uAA44-\uAA4B\uAA50-\uAA59\uAA60-\uAA76\uAA7A\uAA7E-\uAAAF\uAAB1\uAAB5\uAAB6\uAAB9-\uAABD\uAAC0\uAAC2\uAADB-\uAADD\uAAE0-\uAAEA\uAAF2-\uAAF4\uAB01-\uAB06\uAB09-\uAB0E\uAB11-\uAB16\uAB20-\uAB26\uAB28-\uAB2E\uAB30-\uAB5A\uAB5C-\uAB69\uAB70-\uABE2\uABF0-\uABF9\uAC00-\uD7A3\uD7B0-\uD7C6\uD7CB-\uD7FB\uF900-\uFA6D\uFA70-\uFAD9\uFB00-\uFB06\uFB13-\uFB17\uFB1D\uFB1F-\uFB28\uFB2A-\uFB36\uFB38-\uFB3C\uFB3E\uFB40\uFB41\uFB43\uFB44\uFB46-\uFBB1\uFBD3-\uFD3D\uFD50-\uFD8F\uFD92-\uFDC7\uFDF0-\uFDFB\uFE70-\uFE74\uFE76-\uFEFC\uFF10-\uFF19\uFF21-\uFF3A\uFF41-\uFF5A\uFF66-\uFFBE\uFFC2-\uFFC7\uFFCA-\uFFCF\uFFD2-\uFFD7\uFFDA-\uFFDC]|\uD800[\uDC00-\uDC0B\uDC0D-\uDC26\uDC28-\uDC3A\uDC3C\uDC3D\uDC3F-\uDC4D\uDC50-\uDC5D\uDC80-\uDCFA\uDD07-\uDD33\uDD40-\uDD78\uDD8A\uDD8B\uDE80-\uDE9C\uDEA0-\uDED0\uDEE1-\uDEFB\uDF00-\uDF23\uDF2D-\uDF4A\uDF50-\uDF75\uDF80-\uDF9D\uDFA0-\uDFC3\uDFC8-\uDFCF\uDFD1-\uDFD5]|\uD801[\uDC00-\uDC9D\uDCA0-\uDCA9\uDCB0-\uDCD3\uDCD8-\uDCFB\uDD00-\uDD27\uDD30-\uDD63\uDD70-\uDD7A\uDD7C-\uDD8A\uDD8C-\uDD92\uDD94\uDD95\uDD97-\uDDA1\uDDA3-\uDDB1\uDDB3-\uDDB9\uDDBB\uDDBC\uDE00-\uDF36\uDF40-\uDF55\uDF60-\uDF67\uDF80-\uDF85\uDF87-\uDFB0\uDFB2-\uDFBA]|\uD802[\uDC00-\uDC05\uDC08\uDC0A-\uDC35\uDC37\uDC38\uDC3C\uDC3F-\uDC55\uDC58-\uDC76\uDC79-\uDC9E\uDCA7-\uDCAF\uDCE0-\uDCF2\uDCF4\uDCF5\uDCFB-\uDD1B\uDD20-\uDD39\uDD80-\uDDB7\uDDBC-\uDDCF\uDDD2-\uDE00\uDE10-\uDE13\uDE15-\uDE17\uDE19-\uDE35\uDE40-\uDE48\uDE60-\uDE7E\uDE80-\uDE9F\uDEC0-\uDEC7\uDEC9-\uDEE4\uDEEB-\uDEEF\uDF00-\uDF35\uDF40-\uDF55\uDF58-\uDF72\uDF78-\uDF91\uDFA9-\uDFAF]|\uD803[\uDC00-\uDC48\uDC80-\uDCB2\uDCC0-\uDCF2\uDCFA-\uDD23\uDD30-\uDD39\uDE60-\uDE7E\uDE80-\uDEA9\uDEB0\uDEB1\uDF00-\uDF27\uDF30-\uDF45\uDF51-\uDF54\uDF70-\uDF81\uDFB0-\uDFCB\uDFE0-\uDFF6]|\uD804[\uDC03-\uDC37\uDC52-\uDC6F\uDC71\uDC72\uDC75\uDC83-\uDCAF\uDCD0-\uDCE8\uDCF0-\uDCF9\uDD03-\uDD26\uDD36-\uDD3F\uDD44\uDD47\uDD50-\uDD72\uDD76\uDD83-\uDDB2\uDDC1-\uDDC4\uDDD0-\uDDDA\uDDDC\uDDE1-\uDDF4\uDE00-\uDE11\uDE13-\uDE2B\uDE3F\uDE40\uDE80-\uDE86\uDE88\uDE8A-\uDE8D\uDE8F-\uDE9D\uDE9F-\uDEA8\uDEB0-\uDEDE\uDEF0-\uDEF9\uDF05-\uDF0C\uDF0F\uDF10\uDF13-\uDF28\uDF2A-\uDF30\uDF32\uDF33\uDF35-\uDF39\uDF3D\uDF50\uDF5D-\uDF61]|\uD805[\uDC00-\uDC34\uDC47-\uDC4A\uDC50-\uDC59\uDC5F-\uDC61\uDC80-\uDCAF\uDCC4\uDCC5\uDCC7\uDCD0-\uDCD9\uDD80-\uDDAE\uDDD8-\uDDDB\uDE00-\uDE2F\uDE44\uDE50-\uDE59\uDE80-\uDEAA\uDEB8\uDEC0-\uDEC9\uDF00-\uDF1A\uDF30-\uDF3B\uDF40-\uDF46]|\uD806[\uDC00-\uDC2B\uDCA0-\uDCF2\uDCFF-\uDD06\uDD09\uDD0C-\uDD13\uDD15\uDD16\uDD18-\uDD2F\uDD3F\uDD41\uDD50-\uDD59\uDDA0-\uDDA7\uDDAA-\uDDD0\uDDE1\uDDE3\uDE00\uDE0B-\uDE32\uDE3A\uDE50\uDE5C-\uDE89\uDE9D\uDEB0-\uDEF8]|\uD807[\uDC00-\uDC08\uDC0A-\uDC2E\uDC40\uDC50-\uDC6C\uDC72-\uDC8F\uDD00-\uDD06\uDD08\uDD09\uDD0B-\uDD30\uDD46\uDD50-\uDD59\uDD60-\uDD65\uDD67\uDD68\uDD6A-\uDD89\uDD98\uDDA0-\uDDA9\uDEE0-\uDEF2\uDF02\uDF04-\uDF10\uDF12-\uDF33\uDF50-\uDF59\uDFB0\uDFC0-\uDFD4]|\uD808[\uDC00-\uDF99]|\uD809[\uDC00-\uDC6E\uDC80-\uDD43]|\uD80B[\uDF90-\uDFF0]|[\uD80C\uD81C-\uD820\uD822\uD840-\uD868\uD86A-\uD86C\uD86F-\uD872\uD874-\uD879\uD880-\uD883\uD885-\uD887][\uDC00-\uDFFF]|\uD80D[\uDC00-\uDC2F\uDC41-\uDC46]|\uD811[\uDC00-\uDE46]|\uD81A[\uDC00-\uDE38\uDE40-\uDE5E\uDE60-\uDE69\uDE70-\uDEBE\uDEC0-\uDEC9\uDED0-\uDEED\uDF00-\uDF2F\uDF40-\uDF43\uDF50-\uDF59\uDF5B-\uDF61\uDF63-\uDF77\uDF7D-\uDF8F]|\uD81B[\uDE40-\uDE96\uDF00-\uDF4A\uDF50\uDF93-\uDF9F\uDFE0\uDFE1\uDFE3]|\uD821[\uDC00-\uDFF7]|\uD823[\uDC00-\uDCD5\uDD00-\uDD08]|\uD82B[\uDFF0-\uDFF3\uDFF5-\uDFFB\uDFFD\uDFFE]|\uD82C[\uDC00-\uDD22\uDD32\uDD50-\uDD52\uDD55\uDD64-\uDD67\uDD70-\uDEFB]|\uD82F[\uDC00-\uDC6A\uDC70-\uDC7C\uDC80-\uDC88\uDC90-\uDC99]|\uD834[\uDEC0-\uDED3\uDEE0-\uDEF3\uDF60-\uDF78]|\uD835[\uDC00-\uDC54\uDC56-\uDC9C\uDC9E\uDC9F\uDCA2\uDCA5\uDCA6\uDCA9-\uDCAC\uDCAE-\uDCB9\uDCBB\uDCBD-\uDCC3\uDCC5-\uDD05\uDD07-\uDD0A\uDD0D-\uDD14\uDD16-\uDD1C\uDD1E-\uDD39\uDD3B-\uDD3E\uDD40-\uDD44\uDD46\uDD4A-\uDD50\uDD52-\uDEA5\uDEA8-\uDEC0\uDEC2-\uDEDA\uDEDC-\uDEFA\uDEFC-\uDF14\uDF16-\uDF34\uDF36-\uDF4E\uDF50-\uDF6E\uDF70-\uDF88\uDF8A-\uDFA8\uDFAA-\uDFC2\uDFC4-\uDFCB\uDFCE-\uDFFF]|\uD837[\uDF00-\uDF1E\uDF25-\uDF2A]|\uD838[\uDC30-\uDC6D\uDD00-\uDD2C\uDD37-\uDD3D\uDD40-\uDD49\uDD4E\uDE90-\uDEAD\uDEC0-\uDEEB\uDEF0-\uDEF9]|\uD839[\uDCD0-\uDCEB\uDCF0-\uDCF9\uDFE0-\uDFE6\uDFE8-\uDFEB\uDFED\uDFEE\uDFF0-\uDFFE]|\uD83A[\uDC00-\uDCC4\uDCC7-\uDCCF\uDD00-\uDD43\uDD4B\uDD50-\uDD59]|\uD83B[\uDC71-\uDCAB\uDCAD-\uDCAF\uDCB1-\uDCB4\uDD01-\uDD2D\uDD2F-\uDD3D\uDE00-\uDE03\uDE05-\uDE1F\uDE21\uDE22\uDE24\uDE27\uDE29-\uDE32\uDE34-\uDE37\uDE39\uDE3B\uDE42\uDE47\uDE49\uDE4B\uDE4D-\uDE4F\uDE51\uDE52\uDE54\uDE57\uDE59\uDE5B\uDE5D\uDE5F\uDE61\uDE62\uDE64\uDE67-\uDE6A\uDE6C-\uDE72\uDE74-\uDE77\uDE79-\uDE7C\uDE7E\uDE80-\uDE89\uDE8B-\uDE9B\uDEA1-\uDEA3\uDEA5-\uDEA9\uDEAB-\uDEBB]|\uD83C[\uDD00-\uDD0C]|\uD83E[\uDFF0-\uDFF9]|\uD869[\uDC00-\uDEDF\uDF00-\uDFFF]|\uD86D[\uDC00-\uDF39\uDF40-\uDFFF]|\uD86E[\uDC00-\uDC1D\uDC20-\uDFFF]|\uD873[\uDC00-\uDEA1\uDEB0-\uDFFF]|\uD87A[\uDC00-\uDFE0]|\uD87E[\uDC00-\uDE1D]|\uD884[\uDC00-\uDF4A\uDF50-\uDFFF]|\uD888[\uDC00-\uDFAF])/))){var i=r[1]||r[2]||"";if(!i||i&&(""===n||this.rules.inline.punctuation.exec(n))){var o,a,u=r[0].length-1,l=u,c=0,s="*"===r[0][0]?this.rules.inline.emStrong.rDelimAst:this.rules.inline.emStrong.rDelimUnd;for(s.lastIndex=0,t=t.slice(-1*e.length+u);null!=(r=s.exec(t));)if(o=r[1]||r[2]||r[3]||r[4]||r[5]||r[6])if(a=o.length,r[3]||r[4])l+=a;else if(!((r[5]||r[6])&&u%3)||(u+a)%3){if(!((l-=a)>0)){a=Math.min(a,a+l+c);var f=e.slice(0,u+r.index+(r[0].length-o.length)+a);if(Math.min(u,a)%2){var d=f.slice(1,-1);return{type:"em",raw:f,text:d,tokens:this.lexer.inlineTokens(d)}}var h=f.slice(2,-2);return{type:"strong",raw:f,text:h,tokens:this.lexer.inlineTokens(h)}}}else c+=a}}}},{key:"codespan",value:function(e){var t=this.rules.inline.code.exec(e);if(t){var n=t[2].replace(/\n/g," "),r=/[^ ]/.test(n),i=/^ /.test(n)&&/ $/.test(n);return r&&i&&(n=n.substring(1,n.length-1)),n=Ks(n,!0),{type:"codespan",raw:t[0],text:n}}}},{key:"br",value:function(e){var t=this.rules.inline.br.exec(e);if(t)return{type:"br",raw:t[0]}}},{key:"del",value:function(e){var t=this.rules.inline.del.exec(e);if(t)return{type:"del",raw:t[0],text:t[2],tokens:this.lexer.inlineTokens(t[2])}}},{key:"autolink",value:function(e,t){var n,r,i=this.rules.inline.autolink.exec(e);if(i)return r="@"===i[2]?"mailto:"+(n=Ks(this.options.mangle?t(i[1]):i[1])):n=Ks(i[1]),{type:"link",raw:i[0],text:n,href:r,tokens:[{type:"text",raw:n,text:n}]}}},{key:"url",value:function(e,t){var n;if(n=this.rules.inline.url.exec(e)){var r,i;if("@"===n[2])i="mailto:"+(r=Ks(this.options.mangle?t(n[0]):n[0]));else{var o;do{o=n[0],n[0]=this.rules.inline._backpedal.exec(n[0])[0]}while(o!==n[0]);r=Ks(n[0]),i="www."===n[1]?"http://"+r:r}return{type:"link",raw:n[0],text:r,href:i,tokens:[{type:"text",raw:r,text:r}]}}}},{key:"inlineText",value:function(e,t){var n,r=this.rules.inline.text.exec(e);if(r)return n=this.lexer.state.inRawBlock?this.options.sanitize?this.options.sanitizer?this.options.sanitizer(r[0]):Ks(r[0]):r[0]:Ks(this.options.smartypants?t(r[0]):r[0]),{type:"text",raw:r[0],text:n}}}]),e}(),_f={newline:/^(?: *(?:\n|$))+/,code:/^( {4}[^\n]+(?:\n(?: *(?:\n|$))*)?)+/,fences:/^ {0,3}(`{3,}(?=[^`\n]*\n)|~{3,})([^\n]*)\n(?:|([\s\S]*?)\n)(?: {0,3}\1[~`]* *(?=\n|$)|$)/,hr:/^ {0,3}((?:-[\t ]*){3,}|(?:_[ \t]*){3,}|(?:\*[ \t]*){3,})(?:\n+|$)/,heading:/^ {0,3}(#{1,6})(?=\s|$)(.*)(?:\n+|$)/,blockquote:/^( {0,3}> ?(paragraph|[^\n]*)(?:\n|$))+/,list:/^( {0,3}bull)([ \t][^\n]+?)?(?:\n|$)/,html:"^ {0,3}(?:<(script|pre|style|textarea)[\\s>][\\s\\S]*?(?:[^\\n]*\\n+|$)|comment[^\\n]*(\\n+|$)|<\\?[\\s\\S]*?(?:\\?>\\n*|$)|\\n*|$)|\\n*|$)|)[\\s\\S]*?(?:(?:\\n *)+\\n|$)|<(?!script|pre|style|textarea)([a-z][\\w-]*)(?:attribute)*? */?>(?=[ \\t]*(?:\\n|$))[\\s\\S]*?(?:(?:\\n *)+\\n|$)|(?=[ \\t]*(?:\\n|$))[\\s\\S]*?(?:(?:\\n *)+\\n|$))",def:/^ {0,3}\[(label)\]: *(?:\n *)?]+)>?(?:(?: +(?:\n *)?| *\n *)(title))? *(?:\n+|$)/,table:ff,lheading:/^([^\n]+)\n {0,3}(=+|-+) *(?:\n+|$)/,_paragraph:/^([^\n]+(?:\n(?!hr|heading|lheading|blockquote|fences|list|html|table| +\n)[^\n]+)*)/,text:/^[^\n]+/,_label:/(?!\s*\])(?:\\.|[^\[\]\\])+/,_title:/(?:"(?:\\"?|[^"\\])*"|'[^'\n]*(?:\n[^'\n]+)*\n?'|\([^()]*\))/};_f.def=nf(_f.def).replace("label",_f._label).replace("title",_f._title).getRegex(),_f.bullet=/(?:[*+-]|\d{1,9}[.)])/,_f.listItemStart=nf(/^( *)(bull) */).replace("bull",_f.bullet).getRegex(),_f.list=nf(_f.list).replace(/bull/g,_f.bullet).replace("hr","\\n+(?=\\1?(?:(?:- *){3,}|(?:_ *){3,}|(?:\\* *){3,})(?:\\n+|$))").replace("def","\\n+(?="+_f.def.source+")").getRegex(),_f._tag="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|section|source|summary|table|tbody|td|tfoot|th|thead|title|tr|track|ul",_f._comment=/|$)/,_f.html=nf(_f.html,"i").replace("comment",_f._comment).replace("tag",_f._tag).replace("attribute",/ +[a-zA-Z:_][\w.:-]*(?: *= *"[^"\n]*"| *= *'[^'\n]*'| *= *[^\s"'=<>`]+)?/).getRegex(),_f.paragraph=nf(_f._paragraph).replace("hr",_f.hr).replace("heading"," {0,3}#{1,6} ").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",_f._tag).getRegex(),_f.blockquote=nf(_f.blockquote).replace("paragraph",_f.paragraph).getRegex(),_f.normal=df({},_f),_f.gfm=df({},_f.normal,{table:"^ *([^\\n ].*\\|.*)\\n {0,3}(?:\\| *)?(:?-+:? *(?:\\| *:?-+:? *)*)(?:\\| *)?(?:\\n((?:(?! *\\n|hr|heading|blockquote|code|fences|list|html).*(?:\\n|$))*)\\n*|$)"}),_f.gfm.table=nf(_f.gfm.table).replace("hr",_f.hr).replace("heading"," {0,3}#{1,6} ").replace("blockquote"," {0,3}>").replace("code"," {4}[^\\n]").replace("fences"," {0,3}(?:`{3,}(?=[^`\\n]*\\n)|~{3,})[^\\n]*\\n").replace("list"," {0,3}(?:[*+-]|1[.)]) ").replace("html",")|<(?:script|pre|style|textarea|!--)").replace("tag",_f._tag).getRegex(),_f.gfm.paragraph=nf(_f._paragraph).replace("hr",_f.hr).replace("heading"," {0,3}#{1,6} ").replace("|lheading","").replace("table",_f.gfm.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",_f._tag).getRegex(),_f.pedantic=df({},_f.normal,{html:nf("^ *(?:comment *(?:\\n|\\s*$)|<(tag)[\\s\\S]+? *(?:\\n{2,}|\\s*$)|\\s]*)*?/?> *(?:\\n{2,}|\\s*$))").replace("comment",_f._comment).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:ff,paragraph:nf(_f.normal._paragraph).replace("hr",_f.hr).replace("heading"," *#{1,6} *[^\n]").replace("lheading",_f.lheading).replace("blockquote"," {0,3}>").replace("|fences","").replace("|list","").replace("|html","").getRegex()});var bf={escape:/^\\([!"#$%&'()*+,\-./:;<=>?@\[\]\\^_`{|}~])/,autolink:/^<(scheme:[^\s\x00-\x1f<>]*|email)>/,url:ff,tag:"^comment|^|^<[a-zA-Z][\\w-]*(?:attribute)*?\\s*/?>|^<\\?[\\s\\S]*?\\?>|^|^",link:/^!?\[(label)\]\(\s*(href)(?:\s+(title))?\s*\)/,reflink:/^!?\[(label)\]\[(ref)\]/,nolink:/^!?\[(ref)\](?:\[\])?/,reflinkSearch:"reflink|nolink(?!\\()",emStrong:{lDelim:/^(?:\*+(?:([punct_])|[^\s*]))|^_+(?:([punct*])|([^\s_]))/,rDelimAst:/^(?:[^_*\\]|\\.)*?\_\_(?:[^_*\\]|\\.)*?\*(?:[^_*\\]|\\.)*?(?=\_\_)|(?:[^*\\]|\\.)+(?=[^*])|[punct_](\*+)(?=[\s]|$)|(?:[^punct*_\s\\]|\\.)(\*+)(?=[punct_\s]|$)|[punct_\s](\*+)(?=[^punct*_\s])|[\s](\*+)(?=[punct_])|[punct_](\*+)(?=[punct_])|(?:[^punct*_\s\\]|\\.)(\*+)(?=[^punct*_\s])/,rDelimUnd:/^(?:[^_*\\]|\\.)*?\*\*(?:[^_*\\]|\\.)*?\_(?:[^_*\\]|\\.)*?(?=\*\*)|(?:[^_\\]|\\.)+(?=[^_])|[punct*](\_+)(?=[\s]|$)|(?:[^punct*_\s\\]|\\.)(\_+)(?=[punct*\s]|$)|[punct*\s](\_+)(?=[^punct*_\s])|[\s](\_+)(?=[punct*])|[punct*](\_+)(?=[punct*])/},code:/^(`+)([^`]|[^`][\s\S]*?[^`])\1(?!`)/,br:/^( {2,}|\\)\n(?!\s*$)/,del:ff,text:/^(`+|[^`])(?:(?= {2,}\n)|[\s\S]*?(?:(?=[\\.5&&(n="x"+n.toString(16)),r+="&#"+n+";";return r}bf._punctuation="!\"#$%&'()+\\-.,/:;<=>?@\\[\\]`^{|}~",bf.punctuation=nf(bf.punctuation).replace(/punctuation/g,bf._punctuation).getRegex(),bf.blockSkip=/\[[^\]]*?\]\([^\)]*?\)|`[^`]*?`|<[^>]*?>/g,bf.escapedEmSt=/(?:^|[^\\])(?:\\\\)*\\[*_]/g,bf._comment=nf(_f._comment).replace("(?:--\x3e|$)","--\x3e").getRegex(),bf.emStrong.lDelim=nf(bf.emStrong.lDelim).replace(/punct/g,bf._punctuation).getRegex(),bf.emStrong.rDelimAst=nf(bf.emStrong.rDelimAst,"g").replace(/punct/g,bf._punctuation).getRegex(),bf.emStrong.rDelimUnd=nf(bf.emStrong.rDelimUnd,"g").replace(/punct/g,bf._punctuation).getRegex(),bf._escapes=/\\([!"#$%&'()*+,\-./:;<=>?@\[\]\\^_`{|}~])/g,bf._scheme=/[a-zA-Z][a-zA-Z0-9+.-]{1,31}/,bf._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])?)+(?![-_])/,bf.autolink=nf(bf.autolink).replace("scheme",bf._scheme).replace("email",bf._email).getRegex(),bf._attribute=/\s+[a-zA-Z:_][\w.:-]*(?:\s*=\s*"[^"]*"|\s*=\s*'[^']*'|\s*=\s*[^\s"'=<>`]+)?/,bf.tag=nf(bf.tag).replace("comment",bf._comment).replace("attribute",bf._attribute).getRegex(),bf._label=/(?:\[(?:\\.|[^\[\]\\])*\]|\\.|`[^`]*`|[^\[\]\\`])*?/,bf._href=/<(?:\\.|[^\n<>\\])+>|[^\s\x00-\x1f]*/,bf._title=/"(?:\\"?|[^"\\])*"|'(?:\\'?|[^'\\])*'|\((?:\\\)?|[^)\\])*\)/,bf.link=nf(bf.link).replace("label",bf._label).replace("href",bf._href).replace("title",bf._title).getRegex(),bf.reflink=nf(bf.reflink).replace("label",bf._label).replace("ref",_f._label).getRegex(),bf.nolink=nf(bf.nolink).replace("ref",_f._label).getRegex(),bf.reflinkSearch=nf(bf.reflinkSearch,"g").replace("reflink",bf.reflink).replace("nolink",bf.nolink).getRegex(),bf.normal=df({},bf),bf.pedantic=df({},bf.normal,{strong:{start:/^__|\*\*/,middle:/^__(?=\S)([\s\S]*?\S)__(?!_)|^\*\*(?=\S)([\s\S]*?\S)\*\*(?!\*)/,endAst:/\*\*(?!\*)/g,endUnd:/__(?!_)/g},em:{start:/^_|\*/,middle:/^()\*(?=\S)([\s\S]*?\S)\*(?!\*)|^_(?=\S)([\s\S]*?\S)_(?!_)/,endAst:/\*(?!\*)/g,endUnd:/_(?!_)/g},link:nf(/^!?\[(label)\]\((.*?)\)/).replace("label",bf._label).getRegex(),reflink:nf(/^!?\[(label)\]\s*\[([^\]]*)\]/).replace("label",bf._label).getRegex()}),bf.gfm=df({},bf.normal,{escape:nf(bf.escape).replace("])","~|])").getRegex(),_extended_email:/[A-Za-z0-9._+-]+(@)[a-zA-Z0-9-_]+(?:\.[a-zA-Z0-9-_]*[a-zA-Z0-9])+(?![-_])/,url:/^((?:ftp|https?):\/\/|www\.)(?:[a-zA-Z0-9\-]+\.?)+[^\s<]*|^email/,_backpedal:/(?:[^?!.,:;*_~()&]+|\([^)]*\)|&(?![a-zA-Z0-9]+;$)|[?!.,:;*_~)]+(?!$))+/,del:/^(~~?)(?=[^\s~])([\s\S]*?[^\s~])\1(?=[^~]|$)/,text:/^([`~]+|[^`~])(?:(?= {2,}\n)|(?=[a-zA-Z0-9.!#$%&'*+\/=?_`{\|}~-]+@)|[\s\S]*?(?:(?=[\\1&&void 0!==arguments[1]?arguments[1]:[];for(e=this.options.pedantic?e.replace(/\t/g," ").replace(/^ +$/gm,""):e.replace(/^( *)(\t+)/gm,(function(e,t,n){return t+" ".repeat(n.length)}));e;)if(!(this.options.extensions&&this.options.extensions.block&&this.options.extensions.block.some((function(n){return!!(t=n.call({lexer:o},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])||"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])||"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&&function(){var t=1/0,n=e.slice(1),i=void 0;o.options.extensions.startBlock.forEach((function(e){"number"===typeof(i=e.call({lexer:this},n))&&i>=0&&(t=Math.min(t,i))})),t<1/0&&t>=0&&(r=e.substring(0,t+1))}(),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])&&"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){var u="Infinite loop on byte: "+e.charCodeAt(0);if(this.options.silent){console.error(u);break}throw new Error(u)}return this.state.top=!0,a}},{key:"inline",value:function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:[];return this.inlineQueue.push({src:e,tokens:t}),t}},{key:"inlineTokens",value:function(e){var t,n,r,i,o,a,u=this,l=arguments.length>1&&void 0!==arguments[1]?arguments[1]:[],c=e;if(this.tokens.links){var s=Object.keys(this.tokens.links);if(s.length>0)for(;null!=(i=this.tokenizer.rules.inline.reflinkSearch.exec(c));)s.includes(i[0].slice(i[0].lastIndexOf("[")+1,-1))&&(c=c.slice(0,i.index)+"["+mf("a",i[0].length-2)+"]"+c.slice(this.tokenizer.rules.inline.reflinkSearch.lastIndex))}for(;null!=(i=this.tokenizer.rules.inline.blockSkip.exec(c));)c=c.slice(0,i.index)+"["+mf("a",i[0].length-2)+"]"+c.slice(this.tokenizer.rules.inline.blockSkip.lastIndex);for(;null!=(i=this.tokenizer.rules.inline.escapedEmSt.exec(c));)c=c.slice(0,i.index+i[0].length-2)+"++"+c.slice(this.tokenizer.rules.inline.escapedEmSt.lastIndex),this.tokenizer.rules.inline.escapedEmSt.lastIndex--;for(;e;)if(o||(a=""),o=!1,!(this.options.extensions&&this.options.extensions.inline&&this.options.extensions.inline.some((function(n){return!!(t=n.call({lexer:u},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])&&"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])&&"text"===t.type&&"text"===n.type?(n.raw+=t.raw,n.text+=t.text):l.push(t);else if(t=this.tokenizer.emStrong(e,c,a))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,wf))e=e.substring(t.raw.length),l.push(t);else if(this.state.inLink||!(t=this.tokenizer.url(e,wf))){if(r=e,this.options.extensions&&this.options.extensions.startInline&&function(){var t=1/0,n=e.slice(1),i=void 0;u.options.extensions.startInline.forEach((function(e){"number"===typeof(i=e.call({lexer:this},n))&&i>=0&&(t=Math.min(t,i))})),t<1/0&&t>=0&&(r=e.substring(0,t+1))}(),t=this.tokenizer.inlineText(r,Df))e=e.substring(t.raw.length),"_"!==t.raw.slice(-1)&&(a=t.raw.slice(-1)),o=!0,(n=l[l.length-1])&&"text"===n.type?(n.raw+=t.raw,n.text+=t.text):l.push(t);else if(e){var f="Infinite loop on byte: "+e.charCodeAt(0);if(this.options.silent){console.error(f);break}throw new Error(f)}}else e=e.substring(t.raw.length),l.push(t);return l}}],[{key:"rules",get:function(){return{block:_f,inline:bf}}},{key:"lex",value:function(t,n){return new e(n).lex(t)}},{key:"lexInline",value:function(t,n){return new e(n).inlineTokens(t)}}]),e}(),kf=function(){function e(t){Dt(this,e),this.options=t||Ys}return xt(e,[{key:"code",value:function(e,t,n){var r=(t||"").match(/\S*/)[0];if(this.options.highlight){var i=this.options.highlight(e,r);null!=i&&i!==e&&(n=!0,e=i)}return e=e.replace(/\n$/,"")+"\n",r?'
    '+(n?e:Ks(e,!0))+"
    \n":"
    "+(n?e:Ks(e,!0))+"
    \n"}},{key:"blockquote",value:function(e){return"
    \n".concat(e,"
    \n")}},{key:"html",value:function(e){return e}},{key:"heading",value:function(e,t,n,r){if(this.options.headerIds){var i=this.options.headerPrefix+r.slug(n);return"').concat(e,"\n")}return"").concat(e,"\n")}},{key:"hr",value:function(){return this.options.xhtml?"
    \n":"
    \n"}},{key:"list",value:function(e,t,n){var r=t?"ol":"ul";return"<"+r+(t&&1!==n?' start="'+n+'"':"")+">\n"+e+"\n"}},{key:"listitem",value:function(e){return"
  • ".concat(e,"
  • \n")}},{key:"checkbox",value:function(e){return" "}},{key:"paragraph",value:function(e){return"

    ".concat(e,"

    \n")}},{key:"table",value:function(e,t){return t&&(t="".concat(t,"")),"\n\n"+e+"\n"+t+"
    \n"}},{key:"tablerow",value:function(e){return"\n".concat(e,"\n")}},{key:"tablecell",value:function(e,t){var n=t.header?"th":"td";return(t.align?"<".concat(n,' align="').concat(t.align,'">'):"<".concat(n,">"))+e+"\n")}},{key:"strong",value:function(e){return"".concat(e,"")}},{key:"em",value:function(e){return"".concat(e,"")}},{key:"codespan",value:function(e){return"".concat(e,"")}},{key:"br",value:function(){return this.options.xhtml?"
    ":"
    "}},{key:"del",value:function(e){return"".concat(e,"")}},{key:"link",value:function(e,t,n){if(null===(e=af(this.options.sanitize,this.options.baseUrl,e)))return n;var r='"}},{key:"image",value:function(e,t,n){if(null===(e=af(this.options.sanitize,this.options.baseUrl,e)))return n;var r='').concat(n,'":">"}},{key:"text",value:function(e){return e}}]),e}(),Cf=function(){function e(){Dt(this,e)}return xt(e,[{key:"strong",value:function(e){return e}},{key:"em",value:function(e){return e}},{key:"codespan",value:function(e){return e}},{key:"del",value:function(e){return e}},{key:"html",value:function(e){return e}},{key:"text",value:function(e){return e}},{key:"link",value:function(e,t,n){return""+n}},{key:"image",value:function(e,t,n){return""+n}},{key:"br",value:function(){return""}}]),e}(),Ef=function(){function e(){Dt(this,e),this.seen={}}return xt(e,[{key:"serialize",value:function(e){return e.toLowerCase().trim().replace(/<[!\/a-z].*?>/gi,"").replace(/[\u2000-\u206F\u2E00-\u2E7F\\'!"#$%&()*+,./:;<=>?@[\]^`{|}~]/g,"").replace(/\s/g,"-")}},{key:"getNextSafeSlug",value:function(e,t){var n=e,r=0;if(this.seen.hasOwnProperty(n)){r=this.seen[e];do{n=e+"-"+ ++r}while(this.seen.hasOwnProperty(n))}return t||(this.seen[e]=r,this.seen[n]=0),n}},{key:"slug",value:function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},n=this.serialize(e);return this.getNextSafeSlug(n,t.dryrun)}}]),e}(),Sf=function(){function e(t){Dt(this,e),this.options=t||Ys,this.options.renderer=this.options.renderer||new kf,this.renderer=this.options.renderer,this.renderer.options=this.options,this.textRenderer=new Cf,this.slugger=new Ef}return xt(e,[{key:"parse",value:function(e){var t,n,r,i,o,a,u,l,c,s,f,d,h,p,v,m,y,g,_,b=!(arguments.length>1&&void 0!==arguments[1])||arguments[1],D="",w=e.length;for(t=0;t0&&"paragraph"===v.tokens[0].type?(v.tokens[0].text=g+" "+v.tokens[0].text,v.tokens[0].tokens&&v.tokens[0].tokens.length>0&&"text"===v.tokens[0].tokens[0].type&&(v.tokens[0].tokens[0].text=g+" "+v.tokens[0].tokens[0].text)):v.tokens.unshift({type:"text",text:g}):p+=g),p+=this.parse(v.tokens,h),c+=this.renderer.listitem(p,y,m);D+=this.renderer.list(c,f,d);continue;case"html":D+=this.renderer.html(s.text);continue;case"paragraph":D+=this.renderer.paragraph(this.parseInline(s.tokens));continue;case"text":for(c=s.tokens?this.parseInline(s.tokens):s.text;t+1An error occurred:

    "+Ks(e.message+"",!0)+"
    ";throw e}try{var l=xf.lex(e,t);if(t.walkTokens){if(t.async)return Promise.all(Af.walkTokens(l,t.walkTokens)).then((function(){return Sf.parse(l,t)})).catch(u);Af.walkTokens(l,t.walkTokens)}return Sf.parse(l,t)}catch(c){u(c)}}Af.options=Af.setOptions=function(e){var t;return df(Af.defaults,e),t=Af.defaults,Ys=t,Af},Af.getDefaults=Vs,Af.defaults=Ys,Af.use=function(){for(var e=arguments.length,t=new Array(e),n=0;nAn error occurred:

    "+Ks(c.message+"",!0)+"
    ";throw c}},Af.Parser=Sf,Af.parser=Sf.parse,Af.Renderer=kf,Af.TextRenderer=Cf,Af.Lexer=xf,Af.lexer=xf.lex,Af.Tokenizer=gf,Af.Slugger=Ef,Af.parse=Af;Af.options,Af.setOptions,Af.use,Af.walkTokens,Af.parseInline,Sf.parse,xf.lex;var Ff=function(e){var t=e.title,n=e.description,r=e.unit,i=e.expr,o=e.showLegend,a=e.filename,u=e.alias,l=Wr().period,c=Qr(),s=re(null),f=_t(X(!0),2),d=f[0],h=f[1],p=_t(X(l.step||1),2),v=p[0],y=p[1],g=_t(X({limits:{enable:!1,range:{1:[0,0]}}}),2),_=g[0],b=g[1],D=oe((function(){return Array.isArray(i)&&i.every((function(e){return e}))}),[i]),w=xs({predefinedQuery:D?i:[],display:"chart",visible:d,customStep:v}),x=w.isLoading,k=w.graphData,C=w.error,E=w.warning,S=function(e){var t=Kn({},_);t.limits.range=e,b(t)};if(te((function(){var e=new IntersectionObserver((function(e){e.forEach((function(e){return h(e.isIntersecting)}))}),{threshold:.1});return s.current&&e.observe(s.current),function(){s.current&&e.unobserve(s.current)}}),[]),!D)return fr(oo,{variant:"error",children:[fr("code",{children:'"expr"'})," not found. Check the configuration file ",fr("b",{children:a}),"."]});var A=function(){return fr("div",{className:"vm-predefined-panel-header__description vm-default-styles",children:[n&&fr(m,{children:[fr("div",{children:[fr("span",{children:"Description:"}),fr("div",{dangerouslySetInnerHTML:{__html:Af.parse(n)}})]}),fr("hr",{})]}),fr("div",{children:[fr("span",{children:"Queries:"}),fr("div",{children:i.map((function(e,t){return fr("div",{children:e},"".concat(t,"_").concat(e))}))})]})]})};return fr("div",{className:"vm-predefined-panel",ref:s,children:[fr("div",{className:"vm-predefined-panel-header",children:[fr(ho,{title:fr(A,{}),children:fr("div",{className:"vm-predefined-panel-header__info",children:fr(ai,{})})}),fr("h3",{className:"vm-predefined-panel-header__title",children:t||""}),fr("div",{className:"vm-predefined-panel-header__step",children:fr(hs,{defaultStep:l.step,setStep:y})}),fr(Ss,{yaxis:_,setYaxisLimits:S,toggleEnableLimits:function(){var e=Kn({},_);e.limits.enable=!e.limits.enable,b(e)}})]}),fr("div",{className:"vm-predefined-panel-body",children:[x&&fr(As,{}),C&&fr(oo,{variant:"error",children:C}),E&&fr(oo,{variant:"warning",children:E}),k&&fr(cs,{data:k,period:l,customStep:v,query:i,yaxis:_,unit:r,alias:u,showLegend:o,setYaxisLimits:S,setPeriod:function(e){var t=e.from,n=e.to;c({type:"SET_PERIOD",payload:{from:t,to:n}})},fullWidth:!1})]})]})},Nf=function(e){var t=e.defaultExpanded,n=void 0!==t&&t,r=e.onChange,i=e.title,o=e.children,a=_t(X(n),2),u=a[0],l=a[1];return te((function(){r&&r(u)}),[u]),fr(m,{children:[fr("header",{className:"vm-accordion-header ".concat(u&&"vm-accordion-header_open"),onClick:function(){l((function(e){return!e}))},children:[i,fr("div",{className:"vm-accordion-header__arrow ".concat(u&&"vm-accordion-header__arrow_open"),children:fr(fi,{})})]}),u&&fr("section",{className:"vm-accordion-section",children:o},"content")]})},Of=function(e){var t=e.index,n=e.title,r=e.panels,i=e.filename,o=yo(document.body),a=oe((function(){return o.width/12}),[o]),u=_t(X(!t),2),l=u[0],c=u[1],s=_t(X([]),2),f=s[0],d=s[1];te((function(){d(r&&r.map((function(e){return e.width||12})))}),[r]);var h=_t(X({start:0,target:0,enable:!1}),2),p=h[0],v=h[1],m=function(e){if(p.enable){var t=p.start,n=Math.ceil((t-e.clientX)/a);if(!(Math.abs(n)>=12)){var r=f.map((function(e,t){return e-(t===p.target?n:0)}));d(r)}}},y=function(){v(Kn(Kn({},p),{},{enable:!1}))},g=function(e){return function(t){!function(e,t){v({start:e.clientX,target:t,enable:!0})}(t,e)}};return te((function(){return window.addEventListener("mousemove",m),window.addEventListener("mouseup",y),function(){window.removeEventListener("mousemove",m),window.removeEventListener("mouseup",y)}}),[p]),fr("div",{className:"vm-predefined-dashboard",children:fr(Nf,{defaultExpanded:l,onChange:function(e){return c(e)},title:fr((function(){return fr("div",{className:Oi()({"vm-predefined-dashboard-header":!0,"vm-predefined-dashboard-header_open":l}),children:[(n||i)&&fr("span",{className:"vm-predefined-dashboard-header__title",children:n||"".concat(t+1,". ").concat(i)}),r&&fr("span",{className:"vm-predefined-dashboard-header__count",children:["(",r.length," panels)"]})]})}),{}),children:fr("div",{className:"vm-predefined-dashboard-panels",children:Array.isArray(r)&&r.length?r.map((function(e,t){return fr("div",{className:"vm-predefined-dashboard-panels-panel vm-block vm-block_empty-padding",style:{gridColumn:"span ".concat(f[t])},children:[fr(Ff,{title:e.title,description:e.description,unit:e.unit,expr:e.expr,alias:e.alias,filename:i,showLegend:e.showLegend}),fr("button",{className:"vm-predefined-dashboard-panels-panel__resizer",onMouseDown:g(t)})]},t)})):fr("div",{className:"vm-predefined-dashboard-panels-panel__alert",children:fr(oo,{variant:"error",children:[fr("code",{children:'"panels"'})," not found. Check the configuration file ",fr("b",{children:i}),"."]})})})})})},Tf=function(){!function(){var e=Wr(),t=e.duration,n=e.relativeTime,r=e.period,i=r.date,o=r.step,a=function(){var e,r=Is((qn(e={},"g0.range_input",t),qn(e,"g0.end_input",i),qn(e,"g0.step_input",o),qn(e,"g0.relative_time",n),e));ar(r)};te(a,[t,n,i,o]),te(a,[])}();var e=_t(X([]),2),t=e[0],n=e[1],r=_t(X("0"),2),i=r[0],o=r[1],a=oe((function(){return t.map((function(e,t){return{label:e.title||"",value:"".concat(t),className:"vm-predefined-panels-tabs__tab"}}))}),[t]),u=oe((function(){return t[+i]||{}}),[t,i]),l=oe((function(){return null===u||void 0===u?void 0:u.rows}),[u]),c=oe((function(){return u.title||u.filename||""}),[u]),s=oe((function(){return Array.isArray(l)&&!!l.length}),[l]);return te((function(){Hs().then((function(e){return e.length&&n(e)}))}),[]),fr("div",{className:"vm-predefined-panels",children:[!t.length&&fr(oo,{variant:"info",children:"Dashboards not found"}),a.length>1&&fr("div",{className:"vm-predefined-panels-tabs vm-block vm-block_empty-padding",children:fr(Mi,{activeItem:i,items:a,onChange:function(e){o(e)}})}),fr("div",{className:"vm-predefined-panels__dashboards",children:[s&&l.map((function(e,t){return fr(Of,{index:t,filename:c,title:e.title,panels:e.panels},"".concat(i,"_").concat(t))})),!!t.length&&!s&&fr(oo,{variant:"error",children:[fr("code",{children:'"rows"'})," not found. Check the configuration file ",fr("b",{children:c}),"."]})]})]})},Bf=function(e,t){var n=t.match?"&match[]="+encodeURIComponent(t.match):"",r=t.focusLabel?"&focusLabel="+encodeURIComponent(t.focusLabel):"";return"".concat(e,"/api/v1/status/tsdb?topN=").concat(t.topN,"&date=").concat(t.date).concat(n).concat(r)},Mf=function(){function e(){Dt(this,e),this.tsdbStatus=void 0,this.tabsNames=void 0,this.tsdbStatus=this.defaultTSDBStatus,this.tabsNames=["table","graph"]}return xt(e,[{key:"tsdbStatusData",get:function(){return this.tsdbStatus},set:function(e){this.tsdbStatus=e}},{key:"defaultTSDBStatus",get:function(){return{totalSeries:0,totalLabelValuePairs:0,seriesCountByMetricName:[],seriesCountByLabelName:[],seriesCountByFocusLabelValue:[],seriesCountByLabelValuePair:[],labelValueCountByLabelName:[]}}},{key:"keys",value:function(e){var t=[];return e&&(t=t.concat("seriesCountByFocusLabelValue")),t=t.concat("seriesCountByMetricName","seriesCountByLabelName","seriesCountByLabelValuePair","labelValueCountByLabelName"),t}},{key:"defaultState",get:function(){var e=this;return this.keys("job").reduce((function(t,n){return Kn(Kn({},t),{},{tabs:Kn(Kn({},t.tabs),{},qn({},n,e.tabsNames)),containerRefs:Kn(Kn({},t.containerRefs),{},qn({},n,re(null))),defaultActiveTab:Kn(Kn({},t.defaultActiveTab),{},qn({},n,0))})}),{tabs:{},containerRefs:{},defaultActiveTab:{}})}},{key:"sectionsTitles",value:function(e){return{seriesCountByMetricName:"Metric names with the highest number of series",seriesCountByLabelName:"Labels with the highest number of series",seriesCountByFocusLabelValue:'Values for "'.concat(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"}}},{key:"tablesHeaders",get:function(){return{seriesCountByMetricName:Lf,seriesCountByLabelName:Pf,seriesCountByFocusLabelValue:$f,seriesCountByLabelValuePair:If,labelValueCountByLabelName:Rf}}},{key:"totalSeries",value:function(e){return"labelValueCountByLabelName"===e?-1:this.tsdbStatus.totalSeries}}]),e}(),Lf=[{id:"name",label:"Metric name"},{id:"value",label:"Number of series"},{id:"percentage",label:"Percent of series"},{id:"action",label:"Action"}],Pf=[{id:"name",label:"Label name"},{id:"value",label:"Number of series"},{id:"percentage",label:"Percent of series"},{id:"action",label:"Action"}],$f=[{id:"name",label:"Label value"},{id:"value",label:"Number of series"},{id:"percentage",label:"Percent of series"},{disablePadding:!1,id:"action",label:"Action",numeric:!1}],If=[{id:"name",label:"Label=value pair"},{id:"value",label:"Number of series"},{id:"percentage",label:"Percent of series"},{id:"action",label:"Action"}],Rf=[{id:"name",label:"Label name"},{id:"value",label:"Number of unique values"},{id:"action",label:"Action"}],jf={seriesCountByMetricName:function(e,t){return zf("__name__",t)},seriesCountByLabelName:function(e,t){return"{".concat(t,'!=""}')},seriesCountByFocusLabelValue:function(e,t){return zf(e,t)},seriesCountByLabelValuePair:function(e,t){var n=t.split("="),r=n[0],i=n.slice(1).join("=");return zf(r,i)},labelValueCountByLabelName:function(e,t){return"{".concat(t,'!=""}')}},zf=function(e,t){return e?"{"+e+"="+JSON.stringify(t)+"}":""},Uf=function(e){var t=e.topN,n=e.error,r=e.query,i=e.onSetHistory,o=e.onRunQuery,a=e.onSetQuery,u=e.onTopNChange,l=e.onFocusLabelChange,c=e.totalSeries,s=e.totalLabelValuePairs,f=e.date,d=e.match,h=e.focusLabel,p=ei().autocomplete,v=ti(),m=Fs().queryOptions,y=oe((function(){return t<1?"Number must be bigger than zero":""}),[t]);return fr("div",{className:"vm-cardinality-configurator vm-block",children:[fr("div",{className:"vm-cardinality-configurator-controls",children:[fr("div",{className:"vm-cardinality-configurator-controls__query",children:fr(ss,{value:r||d||"",autocomplete:p,options:m,error:n,onArrowUp:function(){i(-1)},onArrowDown:function(){i(1)},onEnter:o,onChange:a,label:"Time series selector"})}),fr("div",{className:"vm-cardinality-configurator-controls__item",children:fr(Fo,{label:"Number of entries per table",type:"number",value:t,error:y,onChange:u})}),fr("div",{className:"vm-cardinality-configurator-controls__item",children:fr(Fo,{label:"Focus label",type:"text",value:h||"",onChange:l})}),fr("div",{className:"vm-cardinality-configurator-controls__item",children:fr(vs,{label:"Autocomplete",value:p,onChange:function(){v({type:"TOGGLE_AUTOCOMPLETE"})}})})]}),fr("div",{className:"vm-cardinality-configurator-bottom",children:[fr("div",{className:"vm-cardinality-configurator-bottom__info",children:["Analyzed ",fr("b",{children:c})," series with ",fr("b",{children:s}),' "label=value" pairs at ',fr("b",{children:f}),d&&fr("span",{children:[" for series selector ",fr("b",{children:d})]}),". Show top ",t," entries per table."]}),fr(co,{startIcon:fr(gi,{}),onClick:o,children:"Execute Query"})]})]})};function Hf(e){var t=e.order,n=e.orderBy,r=e.onRequestSort,i=e.headerCells;return fr("thead",{className:"vm-table-header",children:fr("tr",{className:"vm-table__row vm-table__row_header",children:i.map((function(e){return fr("th",{className:Oi()({"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:(i=e.id,function(e){r(e,i)}),children:fr("div",{className:"vm-table-cell__content",children:[e.label,"action"!==e.id&&"percentage"!==e.id&&fr("div",{className:Oi()({"vm-table__sort-icon":!0,"vm-table__sort-icon_active":n===e.id,"vm-table__sort-icon_desc":"desc"===t&&n===e.id}),children:fr(hi,{})})]})},e.id);var i}))})})}function Vf(e,t,n){return t[n]e[n]?1:0}function Yf(e,t){return"desc"===e?function(e,n){return Vf(e,n,t)}:function(e,n){return-Vf(e,n,t)}}function qf(e,t){var n=e.map((function(e,t){return[e,t]}));return n.sort((function(e,n){var r=t(e[0],n[0]);return 0!==r?r:e[1]-n[1]})),n.map((function(e){return e[0]}))}var Wf=function(e){var t=e.rows,n=e.headerCells,r=e.defaultSortColumn,i=e.tableCells,o=_t(X("desc"),2),a=o[0],u=o[1],l=_t(X(r),2),c=l[0],s=l[1],f=_t(X([]),2),d=f[0],h=f[1],p=function(e){return function(){var t=d.indexOf(e),n=[];-1===t?n=n.concat(d,e):0===t?n=n.concat(d.slice(1)):t===d.length-1?n=n.concat(d.slice(0,-1)):t>0&&(n=n.concat(d.slice(0,t),d.slice(t+1))),h(n)}},v=qf(t,Yf(a,c));return fr("table",{className:"vm-table",children:[fr(Hf,{numSelected:d.length,order:a,orderBy:c,onSelectAllClick:function(e){if(e.target.checked){var n=t.map((function(e){return e.name}));h(n)}else h([])},onRequestSort:function(e,t){u(c===t&&"asc"===a?"desc":"asc"),s(t)},rowCount:t.length,headerCells:n}),fr("tbody",{className:"vm-table-header",children:v.map((function(e){return fr("tr",{className:Oi()({"vm-table__row":!0,"vm-table__row_selected":(t=e.name,-1!==d.indexOf(t))}),onClick:p(e.name),children:i(e)},e.name);var t}))})]})},Qf=function(e){var t=e.row,n=e.totalSeries,r=e.onActionClick,i=n>0?t.value/n*100:-1;return fr(m,{children:[fr("td",{className:"vm-table-cell",children:t.name},t.name),fr("td",{className:"vm-table-cell",children:t.value},t.value),i>0&&fr("td",{className:"vm-table-cell",children:fr(Ns,{value:i})},t.progressValue),fr("td",{className:"vm-table-cell vm-table-cell_right",children:fr("div",{className:"vm-table-cell__content",children:fr(ho,{title:"Filter by ".concat(t.name),children:fr(co,{variant:"text",size:"small",onClick:r,children:fr(_i,{})})})})},"action")]})},Gf=function(e){var t=e.data,n=e.container,r=e.configs,i=re(null),o=_t(X(),2),a=o[0],u=o[1],l=yo(n),c=Kn(Kn({},r),{},{width:l.width||400});return te((function(){if(i.current){var e=new Pc(c,t,i.current);return u(e),e.destroy}}),[i.current,l]),te((function(){a&&a.setData(t)}),[t]),fr("div",{style:{height:"100%"},children:fr("div",{ref:i})})},Jf=function(e,t){return Math.round(e*(t=Math.pow(10,t)))/t},Zf=1,Kf=function(e,t,n,r){return Jf(t+e*(n+r),6)},Xf=function(e,t,n,r,i){var o=1-t,a=n===Zf?o/(e-1):2===n?o/e:3===n?o/(e+1):0;(isNaN(a)||a===1/0)&&(a=0);var u=n===Zf?0:2===n?a/2:3===n?a:0,l=t/e,c=Jf(l,6);if(null==r)for(var s=0;s=n&&e<=i&&t>=r&&t<=o};function td(e,t,n,r,i){var o=this;o.x=e,o.y=t,o.w=n,o.h=r,o.l=i||0,o.o=[],o.q=null}var nd={split:function(){var e=this,t=e.x,n=e.y,r=e.w/2,i=e.h/2,o=e.l+1;e.q=[new td(t+r,n,r,i,o),new td(t,n,r,i,o),new td(t,n+i,r,i,o),new td(t+r,n+i,r,i,o)]},quads:function(e,t,n,r,i){var o=this,a=o.q,u=o.x+o.w/2,l=o.y+o.h/2,c=tu,d=t+r>l;c&&f&&i(a[0]),s&&c&&i(a[1]),s&&d&&i(a[2]),f&&d&&i(a[3])},add:function(e){var t=this;if(null!=t.q)t.quads(e.x,e.y,e.w,e.h,(function(t){t.add(e)}));else{var n=t.o;if(n.push(e),n.length>10&&t.l<4){t.split();for(var r=function(e){var r=n[e];t.quads(r.x,r.y,r.w,r.h,(function(e){e.add(r)}))},i=0;i=0?"left":"right",e.ctx.textBaseline=1===s?"middle":i[n]>=0?"bottom":"top",e.ctx.fillText(i[n],f,g)}}))})),e.ctx.restore()}function b(e,t,n){return[0,Pc.rangeNum(0,n,.05,!0)[1]]}return{hooks:{drawClear:function(t){var n;if((y=y||new td(0,0,t.bbox.width,t.bbox.height)).clear(),t.series.forEach((function(e){e._paths=null})),l=d?[null].concat(m(t.data.length-1-o.length,t.data[0].length)):2===t.series.length?[null].concat(m(t.data[0].length,1)):[null].concat(function(e,t){var n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:h,r=Array.from({length:t},(function(){return{offs:Array(e).fill(0),size:Array(e).fill(0)}}));return Xf(e,n,p,null,(function(e,n,i){Xf(t,1,v,null,(function(t,o,a){r[t].offs[e]=n+i*o,r[t].size[e]=i*a}))})),r}(t.data[0].length,t.data.length-1-o.length,1===t.data[0].length?1:h)),null!=(null===(n=e.disp)||void 0===n?void 0:n.fill)){c=[null];for(var r=1;r0&&!o.includes(t)&&Pc.assign(e,{paths:g,points:{show:_}})}))}}}((rd=[1],id=0,od=1,ad=0,ud=function(e,t){return{stroke:e,fill:t}}({unit:3,values:function(e){return e.data[1].map((function(e,t){return 0!==t?"#33BB55":"#F79420"}))}},{unit:3,values:function(e){return e.data[1].map((function(e,t){return 0!==t?"#33BB55":"#F79420"}))}}),{which:rd,ori:id,dir:od,radius:ad,disp:ud}))]},cd=function(e){var t=e.rows,n=e.activeTab,r=e.onChange,i=e.tabs,o=e.chartContainer,a=e.totalSeries,u=e.tabId,l=e.onActionClick,c=e.sectionTitle,s=e.tableHeaderCells,f=oe((function(){return i.map((function(e,t){return{value:String(t),label:e,icon:fr(0===t?Di:bi,{})}}))}),[i]);return fr("div",{className:"vm-metrics-content vm-block",children:[fr("div",{className:"vm-metrics-content-header vm-section-header",children:[fr("h5",{className:"vm-section-header__title",children:c}),fr("div",{className:"vm-section-header__tabs",children:fr(Mi,{activeItem:String(n),items:f,onChange:function(e){r(e,u)}})})]}),fr("div",{ref:o,children:[0===n&&fr(Wf,{rows:t,headerCells:s,defaultSortColumn:"value",tableCells:function(e){return fr(Qf,{row:e,totalSeries:a,onActionClick:l})}}),1===n&&fr(Gf,{data:[t.map((function(e){return e.name})),t.map((function(e){return e.value})),t.map((function(e,t){return t%12==0?1:t%10==0?2:0}))],container:(null===o||void 0===o?void 0:o.current)||null,configs:ld})]})]})},sd=function(){var e=Zi(),t=e.topN,n=e.match,r=e.date,i=e.focusLabel,o=Ki();!function(){var e=Zi(),t=e.topN,n=e.match,r=e.date,i=e.focusLabel,o=e.extraLabel,a=function(){var e=Is({topN:t,date:r,match:n,extraLabel:o,focusLabel:i});ar(e)};te(a,[t,n,r,i,o]),te(a,[])}();var a=_t(X(n||""),2),u=a[0],l=a[1],c=_t(X(0),2),s=c[0],f=c[1],d=_t(X([]),2),h=d[0],p=d[1],v=function(){var e=new Mf,t=Zi(),n=t.topN,r=t.extraLabel,i=t.match,o=t.date,a=t.runQuery,u=t.focusLabel,l=hr().serverUrl,c=_t(X(!1),2),s=c[0],f=c[1],d=_t(X(),2),h=d[0],p=d[1],v=_t(X(e.defaultTSDBStatus),2),m=v[0],y=v[1];te((function(){h&&(y(e.defaultTSDBStatus),f(!1))}),[h]);var g=function(){var t=es(Kc().mark((function t(n){var r,i,o,a;return Kc().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:if(l){t.next=2;break}return t.abrupt("return");case 2:return p(""),f(!0),y(e.defaultTSDBStatus),r=Bf(l,n),t.prev=6,t.next=9,fetch(r);case 9:return i=t.sent,t.next=12,i.json();case 12:o=t.sent,i.ok?(a=o.data,y(Kn({},a)),f(!1)):(p(o.error),y(e.defaultTSDBStatus),f(!1)),t.next=20;break;case 16:t.prev=16,t.t0=t.catch(6),f(!1),t.t0 instanceof Error&&p("".concat(t.t0.name,": ").concat(t.t0.message));case 20:case"end":return t.stop()}}),t,null,[[6,16]])})));return function(e){return t.apply(this,arguments)}}();return te((function(){g({topN:n,extraLabel:r,match:i,date:o,focusLabel:u})}),[l,a,o]),e.tsdbStatusData=m,{isLoading:s,appConfigurator:e,error:h}}(),m=v.isLoading,y=v.appConfigurator,g=v.error,_=_t(X(y.defaultState.defaultActiveTab),2),b=_[0],D=_[1],w=y.tsdbStatusData,x=y.defaultState,k=y.tablesHeaders,C=function(e,t){D(Kn(Kn({},b),{},qn({},t,+e)))};return fr("div",{className:"vm-cardinality-panel",children:[m&&fr(As,{message:"Please wait while cardinality stats is calculated. \n This may take some time if the db contains big number of time series."}),fr(Uf,{error:"",query:u,topN:t,date:r,match:n,totalSeries:w.totalSeries,totalLabelValuePairs:w.totalLabelValuePairs,focusLabel:i,onRunQuery:function(){p((function(e){return[].concat(bt(e),[u])})),f((function(e){return e+1})),o({type:"SET_MATCH",payload:u}),o({type:"RUN_QUERY"})},onSetQuery:function(e){l(e)},onSetHistory:function(e){var t=s+e;t<0||t>=h.length||(f(t),l(h[t]))},onTopNChange:function(e){o({type:"SET_TOP_N",payload:+e})},onFocusLabelChange:function(e){o({type:"SET_FOCUS_LABEL",payload:e})}}),g&&fr(oo,{variant:"error",children:g}),y.keys(i).map((function(e){return fr(cd,{sectionTitle:y.sectionsTitles(i)[e],activeTab:b[e],rows:w[e],onChange:C,onActionClick:(t=e,function(e){var n=e.currentTarget.id,r=jf[t](i,n);l(r),p((function(e){return[].concat(bt(e),[r])})),f((function(e){return e+1})),o({type:"SET_MATCH",payload:r});var a="";"labelValueCountByLabelName"!==t&&"seriesCountByLabelName"!=t||(a=n),o({type:"SET_FOCUS_LABEL",payload:a}),o({type:"RUN_QUERY"})}),tabs:x.tabs[e],chartContainer:x.containerRefs[e],totalSeries:y.totalSeries(e),tabId:e,tableHeaderCells:k[e]},e);var t}))]})},fd=function(e){var t=e.rows,n=e.columns,r=_t(X(e.defaultOrderBy||"count"),2),i=r[0],o=r[1],a=_t(X("desc"),2),u=a[0],l=a[1],c=oe((function(){return qf(t,Yf(u,i))}),[t,i,u]),s=function(e){return function(){var t;t=e,l((function(e){return"asc"===e&&i===t?"desc":"asc"})),o(t)}};return fr("table",{className:"vm-table",children:[fr("thead",{className:"vm-table-header",children:fr("tr",{className:"vm-table__row vm-table__row_header",children:n.map((function(e){return fr("th",{className:"vm-table-cell vm-table-cell_header vm-table-cell_sort",onClick:s(e.key),children:fr("div",{className:"vm-table-cell__content",children:[e.title||e.key,fr("div",{className:Oi()({"vm-table__sort-icon":!0,"vm-table__sort-icon_active":i===e.key,"vm-table__sort-icon_desc":"desc"===u&&i===e.key}),children:fr(hi,{})})]})},e.key)}))})}),fr("tbody",{className:"vm-table-body",children:c.map((function(e,t){return fr("tr",{className:"vm-table__row",children:n.map((function(t){return fr("td",{className:"vm-table-cell",children:e[t.key]||"-"},t.key)}))},t)}))})]})},dd=["table","JSON"].map((function(e,t){return{value:String(t),label:e,icon:fr(0===t?Di:wi,{})}})),hd=function(e){var t=e.rows,n=e.title,r=e.columns,i=e.defaultOrderBy,o=_t(X(0),2),a=o[0],u=o[1];return fr("div",{className:"vm-top-queries-panel vm-block",children:[fr("div",{className:"vm-top-queries-panel-header vm-section-header",children:[fr("h5",{className:"vm-section-header__title",children:n}),fr("div",{className:"vm-section-header__tabs",children:fr(Mi,{activeItem:String(a),items:dd,onChange:function(e){u(+e)}})})]}),fr("div",{children:[0===a&&fr(fd,{rows:t,columns:r,defaultOrderBy:i}),1===a&&fr(ks,{data:t})]})]})},pd=function(){var e=function(){var e=hr().serverUrl,t=ro(),n=t.topN,r=t.maxLifetime,i=t.runQuery,o=_t(X(null),2),a=o[0],u=o[1],l=_t(X(!1),2),c=l[0],s=l[1],f=_t(X(),2),d=f[0],h=f[1],p=oe((function(){return function(e,t,n){return"".concat(e,"/api/v1/status/top_queries?topN=").concat(t||"","&maxLifetime=").concat(n||"")}(e,n,r)}),[e,n,r]),v=function(){var e=es(Kc().mark((function e(){var t,n;return Kc().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return s(!0),e.prev=1,e.next=4,fetch(p);case 4:return t=e.sent,e.next=7,t.json();case 7:n=e.sent,t.ok&&["topByAvgDuration","topByCount","topBySumDuration"].forEach((function(e){var t=n[e];Array.isArray(t)&&t.forEach((function(e){return e.timeRangeHours=+(e.timeRangeSeconds/3600).toFixed(2)}))})),u(t.ok?n:null),h(String(n.error||"")),e.next=16;break;case 13:e.prev=13,e.t0=e.catch(1),e.t0 instanceof Error&&"AbortError"!==e.t0.name&&h("".concat(e.t0.name,": ").concat(e.t0.message));case 16:s(!1);case 17:case"end":return e.stop()}}),e,null,[[1,13]])})));return function(){return e.apply(this,arguments)}}();return te((function(){v()}),[i]),{data:a,error:d,loading:c}}(),t=e.data,n=e.error,r=e.loading,i=ro(),o=i.topN,a=i.maxLifetime,u=ue(no).dispatch;!function(){var e=ro(),t=e.topN,n=e.maxLifetime,r=function(){var e=Is({topN:String(t),maxLifetime:n});ar(e)};te(r,[t,n]),te(r,[])}();var l=oe((function(){var e=a.trim().split(" ").reduce((function(e,t){var n=Or(t);return n?Kn(Kn({},e),n):Kn({},e)}),{});return!!yr().duration(e).asMilliseconds()}),[a]),c=oe((function(){return!!o&&o<1}),[o]),s=oe((function(){return c?"Number must be bigger than zero":""}),[c]),f=oe((function(){return l?"":"Invalid duration value"}),[l]),d=function(e){if(!t)return e;var n=t[e];return"number"===typeof n?jc(n):n||e},h=function(){u({type:"SET_RUN_QUERY"})},p=function(e){"Enter"===e.key&&h()};return te((function(){t&&(o||u({type:"SET_TOP_N",payload:+t.topN}),a||u({type:"SET_MAX_LIFE_TIME",payload:t.maxLifetime}))}),[t]),fr("div",{className:"vm-top-queries",children:[r&&fr(As,{containerStyles:{height:"500px"}}),fr("div",{className:"vm-top-queries-controls vm-block",children:[fr("div",{className:"vm-top-queries-controls__fields",children:[fr(Fo,{label:"Max lifetime",value:a,error:f,helperText:"For example ".concat("30ms, 15s, 3d4h, 1y2w"),onChange:function(e){u({type:"SET_MAX_LIFE_TIME",payload:e})},onKeyDown:p}),fr(Fo,{label:"Number of returned queries",type:"number",value:o||"",error:s,onChange:function(e){u({type:"SET_TOP_N",payload:+e})},onKeyDown:p})]}),fr("div",{className:"vm-top-queries-controls-bottom",children:[fr("div",{className:"vm-top-queries-controls-bottom__info",children:["VictoriaMetrics tracks the last\xa0",fr(ho,{title:"search.queryStats.lastQueriesCount",children:fr("b",{children:d("search.queryStats.lastQueriesCount")})}),"\xa0queries with durations at least\xa0",fr(ho,{title:"search.queryStats.minQueryDuration",children:fr("b",{children:d("search.queryStats.minQueryDuration")})})]}),fr("div",{className:"vm-top-queries-controls-bottom__button",children:fr(co,{startIcon:fr(gi,{}),onClick:h,children:"Execute"})})]})]}),n&&fr(oo,{variant:"error",children:n}),t&&fr(m,{children:fr("div",{className:"vm-top-queries-panels",children:[fr(hd,{rows:t.topByCount,title:"Most frequently executed queries",columns:[{key:"query"},{key:"timeRangeHours",title:"time range, hours"},{key:"count"}]}),fr(hd,{rows:t.topByAvgDuration,title:"Most heavy queries",columns:[{key:"query"},{key:"avgDurationSeconds",title:"avg duration, seconds"},{key:"timeRangeHours",title:"time range, hours"},{key:"count"}],defaultOrderBy:"avgDurationSeconds"}),fr(hd,{rows:t.topBySumDuration,title:"Queries with most summary time to execute",columns:[{key:"query"},{key:"sumDurationSeconds",title:"sum duration, seconds"},{key:"timeRangeHours",title:"time range, hours"},{key:"count"}],defaultOrderBy:"sumDurationSeconds"})]})})]})},vd=["primary","secondary","error","warning","info","success"],md=function(e){var t=e.setLoadingTheme,n=Xn().palette,r=void 0===n?{}:n,i=function(){vd.forEach((function(e){var t=function(e){var 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"}(Ti("color-".concat(e)));Bi("".concat(e,"-text"),t)}))};return te((function(){vd.forEach((function(e){var t=r[e];t&&Bi("color-".concat(e),t)})),function(){var e=window,t=e.innerWidth,n=e.innerHeight,r=document.documentElement,i=r.clientWidth,o=r.clientHeight;Bi("scrollbar-width","".concat(t-i,"px")),Bi("scrollbar-height","".concat(n-o,"px"))}(),i(),t(!1)}),[]),null},yd=function(){var e=_t(X(!1),2),t=e[0],n=e[1],r=_t(X([]),2),i=r[0],o=r[1],a=_t(X([]),2),u=a[0],l=a[1],s=oe((function(){return!!i.length}),[i]),f=function(){n(!0)},d=function(){n(!1)},h=function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"";l((function(n){return[{filename:t,text:": ".concat(e.message)}].concat(bt(n))}))},p=function(e,t){try{var n=JSON.parse(e),r=n.trace||n;if(!r.duration_msec)return void h(new Error(wo.traceNotFound),t);var i=new ws(r,t);o((function(e){return[i].concat(bt(e))}))}catch(c){c instanceof Error&&h(c,t)}},v=function(e){l([]),Array.from(e.target.files||[]).map((function(e){var t=new FileReader,n=(null===e||void 0===e?void 0:e.name)||"";t.onload=function(e){var t,r=String(null===(t=e.target)||void 0===t?void 0:t.result);p(r,n)},t.readAsText(e)})),e.target.value=""},m=function(e){return function(){!function(e){l((function(t){return t.filter((function(t,n){return n!==e}))}))}(e)}},y=function(){return fr("div",{className:"vm-trace-page-controls",children:[fr(co,{variant:"outlined",onClick:f,children:"Paste JSON"}),fr(ho,{title:"The file must contain tracing information in JSON format",children:fr(co,{children:["Upload Files",fr("input",{id:"json",type:"file",accept:"application/json",multiple:!0,title:" ",onChange:v})]})})]})};return fr("div",{className:"vm-trace-page",children:[fr("div",{className:"vm-trace-page-header",children:[fr("div",{className:"vm-trace-page-header-errors",children:u.map((function(e,t){return fr("div",{className:"vm-trace-page-header-errors-item",children:[fr(oo,{variant:"error",children:[fr("b",{className:"vm-trace-page-header-errors-item__filename",children:e.filename}),fr("span",{children:e.text})]}),fr(co,{className:"vm-trace-page-header-errors-item__close",startIcon:fr(ii,{}),variant:"text",color:"error",onClick:m(t)})]},"".concat(e,"_").concat(t))}))}),fr("div",{children:s&&fr(y,{})})]}),s&&fr("div",{children:fr(Bs,{jsonEditor:!0,traces:i,onDeleteClick:function(e){var t=i.filter((function(t){return t.idValue!==e.idValue}));o(bt(t))}})}),!s&&fr("div",{className:"vm-trace-page-preview",children:[fr("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",fr("a",{href:"https://docs.victoriametrics.com/#query-tracing",target:"_blank",rel:"noreferrer",children:"https://docs.victoriametrics.com/#query-tracing"}),"\n","Tracing graph will be displayed after file upload."]}),fr(y,{})]}),t&&fr(To,{title:"Paste JSON",onClose:d,children:fr(Ts,{editable:!0,displayTitle:!0,defaultTile:"JSON ".concat(i.length+1),onClose:d,onUpload:p})})]})},gd=function(){var e=_t(X(!0),2),t=e[0],n=e[1];return fr(m,t?{children:[fr(As,{}),fr(md,{setLoadingTheme:n}),";"]}:{children:fr(Un,{children:fr(lo,{children:fr(jn,{children:fr(In,{path:"/",element:fr(zo,{}),children:[fr(In,{path:Jn.home,element:fr(zs,{})}),fr(In,{path:Jn.dashboards,element:fr(Tf,{})}),fr(In,{path:Jn.cardinality,element:fr(sd,{})}),fr(In,{path:Jn.topQueries,element:fr(pd,{})}),fr(In,{path:Jn.trace,element:fr(yd,{})})]})})})})})},_d=function(e){e&&n.e(27).then(n.bind(n,27)).then((function(t){var n=t.getCLS,r=t.getFID,i=t.getFCP,o=t.getLCP,a=t.getTTFB;n(e),r(e),i(e),o(e),a(e)}))},bd=document.getElementById("root");bd&&Ve(fr(gd,{}),bd),_d()}()}(); \ No newline at end of file diff --git a/app/vmselect/vmui/static/js/main.da9caa97.js.LICENSE.txt b/app/vmselect/vmui/static/js/main.c86c7c69.js.LICENSE.txt similarity index 100% rename from app/vmselect/vmui/static/js/main.da9caa97.js.LICENSE.txt rename to app/vmselect/vmui/static/js/main.c86c7c69.js.LICENSE.txt diff --git a/app/vmselect/vmui/static/js/main.da9caa97.js b/app/vmselect/vmui/static/js/main.da9caa97.js deleted file mode 100644 index 0d8742d6a..000000000 --- a/app/vmselect/vmui/static/js/main.da9caa97.js +++ /dev/null @@ -1,2 +0,0 @@ -/*! For license information please see main.da9caa97.js.LICENSE.txt */ -!function(){var e={680:function(e,t,n){"use strict";var r=n(476),i=n(962),o=i(r("String.prototype.indexOf"));e.exports=function(e,t){var n=r(e,!!t);return"function"===typeof n&&o(e,".prototype.")>-1?i(n):n}},962:function(e,t,n){"use strict";var r=n(199),i=n(476),o=i("%Function.prototype.apply%"),a=i("%Function.prototype.call%"),u=i("%Reflect.apply%",!0)||r.call(a,o),l=i("%Object.getOwnPropertyDescriptor%",!0),c=i("%Object.defineProperty%",!0),s=i("%Math.max%");if(c)try{c({},"a",{value:1})}catch(d){c=null}e.exports=function(e){var t=u(r,a,arguments);if(l&&c){var n=l(t,"length");n.configurable&&c(t,"length",{value:1+s(0,e.length-(arguments.length-1))})}return t};var f=function(){return u(r,o,arguments)};c?c(e.exports,"apply",{value:f}):e.exports.apply=f},123:function(e,t){var n;!function(){"use strict";var r={}.hasOwnProperty;function i(){for(var e=[],t=0;t=t?e:""+Array(t+1-r.length).join(n)+e},g={s:y,z:function(e){var t=-e.utcOffset(),n=Math.abs(t),r=Math.floor(n/60),i=n%60;return(t<=0?"+":"-")+y(r,2,"0")+":"+y(i,2,"0")},m:function e(t,n){if(t.date()1)return e(a[0])}else{var u=t.name;b[u]=t,i=u}return!r&&i&&(_=i),i||!r&&_},x=function(e,t){if(D(e))return e.clone();var n="object"==typeof t?t:{};return n.date=e,n.args=arguments,new C(n)},k=g;k.l=w,k.i=D,k.w=function(e,t){return x(e,{locale:t.$L,utc:t.$u,x:t.$x,$offset:t.$offset})};var C=function(){function m(e){this.$L=w(e.locale,null,!0),this.parse(e)}var y=m.prototype;return y.parse=function(e){this.$d=function(e){var t=e.date,n=e.utc;if(null===t)return new Date(NaN);if(k.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 i=r[2]-1||0,o=(r[7]||"0").substring(0,3);return n?new Date(Date.UTC(r[1],i,r[3]||1,r[4]||0,r[5]||0,r[6]||0,o)):new Date(r[1],i,r[3]||1,r[4]||0,r[5]||0,r[6]||0,o)}}return new Date(t)}(e),this.$x=e.x||{},this.init()},y.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()},y.$utils=function(){return k},y.isValid=function(){return!(this.$d.toString()===h)},y.isSame=function(e,t){var n=x(e);return this.startOf(t)<=n&&n<=this.endOf(t)},y.isAfter=function(e,t){return x(e)1&&"boolean"!==typeof t)throw new a('"allowMissing" argument must be a boolean');if(null===k(/^%?[^%]*%?$/,e))throw new i("`%` may not be present anywhere but at the beginning and end of the intrinsic name");var n=A(e),r=n.length>0?n[0]:"",o=S("%"+r+"%",t),u=o.name,c=o.value,s=!1,f=o.alias;f&&(r=f[0],D(n,b([0,1],f)));for(var d=1,h=!0;d=n.length){var g=l(c,p);c=(h=!!g)&&"get"in g&&!("originalValue"in g.get)?g.get:c[p]}else h=_(c,p),c=c[p];h&&!s&&(v[u]=c)}}return c}},520:function(e,t,n){"use strict";var r="undefined"!==typeof Symbol&&Symbol,i=n(541);e.exports=function(){return"function"===typeof r&&("function"===typeof Symbol&&("symbol"===typeof r("foo")&&("symbol"===typeof Symbol("bar")&&i())))}},541:function(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 i=Object.getOwnPropertyDescriptor(e,t);if(42!==i.value||!0!==i.enumerable)return!1}return!0}},838:function(e,t,n){"use strict";var r=n(199);e.exports=r.call(Function.call,Object.prototype.hasOwnProperty)},936:function(e,t,n){var r=/^\s+|\s+$/g,i=/^[-+]0x[0-9a-f]+$/i,o=/^0b[01]+$/i,a=/^0o[0-7]+$/i,u=parseInt,l="object"==typeof n.g&&n.g&&n.g.Object===Object&&n.g,c="object"==typeof self&&self&&self.Object===Object&&self,s=l||c||Function("return this")(),f=Object.prototype.toString,d=Math.max,h=Math.min,p=function(){return s.Date.now()};function v(e){var t=typeof e;return!!e&&("object"==t||"function"==t)}function m(e){if("number"==typeof e)return e;if(function(e){return"symbol"==typeof e||function(e){return!!e&&"object"==typeof e}(e)&&"[object Symbol]"==f.call(e)}(e))return NaN;if(v(e)){var t="function"==typeof e.valueOf?e.valueOf():e;e=v(t)?t+"":t}if("string"!=typeof e)return 0===e?e:+e;e=e.replace(r,"");var n=o.test(e);return n||a.test(e)?u(e.slice(2),n?2:8):i.test(e)?NaN:+e}e.exports=function(e,t,n){var r,i,o,a,u,l,c=0,s=!1,f=!1,y=!0;if("function"!=typeof e)throw new TypeError("Expected a function");function g(t){var n=r,o=i;return r=i=void 0,c=t,a=e.apply(o,n)}function _(e){return c=e,u=setTimeout(D,t),s?g(e):a}function b(e){var n=e-l;return void 0===l||n>=t||n<0||f&&e-c>=o}function D(){var e=p();if(b(e))return w(e);u=setTimeout(D,function(e){var n=t-(e-l);return f?h(n,o-(e-c)):n}(e))}function w(e){return u=void 0,y&&r?g(e):(r=i=void 0,a)}function x(){var e=p(),n=b(e);if(r=arguments,i=this,l=e,n){if(void 0===u)return _(l);if(f)return u=setTimeout(D,t),g(l)}return void 0===u&&(u=setTimeout(D,t)),a}return t=m(t)||0,v(n)&&(s=!!n.leading,o=(f="maxWait"in n)?d(m(n.maxWait)||0,t):o,y="trailing"in n?!!n.trailing:y),x.cancel=function(){void 0!==u&&clearTimeout(u),c=0,r=l=i=u=void 0},x.flush=function(){return void 0===u?a:w(p())},x}},7:function(e,t,n){var r="__lodash_hash_undefined__",i="[object Function]",o="[object GeneratorFunction]",a=/\.|\[(?:[^[\]]*|(["'])(?:(?!\1)[^\\]|\\.)*?\1)\]/,u=/^\w*$/,l=/^\./,c=/[^.[\]]+|\[(?:(-?\d+(?:\.\d+)?)|(["'])((?:(?!\2)[^\\]|\\.)*?)\2)\]|(?=(?:\.|\[\])(?:\.|\[\]|$))/g,s=/\\(\\)?/g,f=/^\[object .+?Constructor\]$/,d="object"==typeof n.g&&n.g&&n.g.Object===Object&&n.g,h="object"==typeof self&&self&&self.Object===Object&&self,p=d||h||Function("return this")();var v=Array.prototype,m=Function.prototype,y=Object.prototype,g=p["__core-js_shared__"],_=function(){var e=/[^.]+$/.exec(g&&g.keys&&g.keys.IE_PROTO||"");return e?"Symbol(src)_1."+e:""}(),b=m.toString,D=y.hasOwnProperty,w=y.toString,x=RegExp("^"+b.call(D).replace(/[\\^$.*+?()[\]{}|]/g,"\\$&").replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g,"$1.*?")+"$"),k=p.Symbol,C=v.splice,E=$(p,"Map"),A=$(Object,"create"),S=k?k.prototype:void 0,F=S?S.toString:void 0;function N(e){var t=-1,n=e?e.length:0;for(this.clear();++t-1},O.prototype.set=function(e,t){var n=this.__data__,r=B(n,e);return r<0?n.push([e,t]):n[r][1]=t,this},T.prototype.clear=function(){this.__data__={hash:new N,map:new(E||O),string:new N}},T.prototype.delete=function(e){return P(this,e).delete(e)},T.prototype.get=function(e){return P(this,e).get(e)},T.prototype.has=function(e){return P(this,e).has(e)},T.prototype.set=function(e,t){return P(this,e).set(e,t),this};var R=j((function(e){var t;e=null==(t=e)?"":function(e){if("string"==typeof e)return e;if(H(e))return F?F.call(e):"";var t=e+"";return"0"==t&&1/e==-1/0?"-0":t}(t);var n=[];return l.test(e)&&n.push(""),e.replace(c,(function(e,t,r,i){n.push(r?i.replace(s,"$1"):t||e)})),n}));function I(e){if("string"==typeof e||H(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 n(){var r=arguments,i=t?t.apply(this,r):r[0],o=n.cache;if(o.has(i))return o.get(i);var a=e.apply(this,r);return n.cache=o.set(i,a),a};return n.cache=new(j.Cache||T),n}j.Cache=T;var z=Array.isArray;function U(e){var t=typeof e;return!!e&&("object"==t||"function"==t)}function H(e){return"symbol"==typeof e||function(e){return!!e&&"object"==typeof e}(e)&&"[object Symbol]"==w.call(e)}e.exports=function(e,t,n){var r=null==e?void 0:M(e,t);return void 0===r?n:r}},61:function(e,t,n){var r="Expected a function",i=/^\s+|\s+$/g,o=/^[-+]0x[0-9a-f]+$/i,a=/^0b[01]+$/i,u=/^0o[0-7]+$/i,l=parseInt,c="object"==typeof n.g&&n.g&&n.g.Object===Object&&n.g,s="object"==typeof self&&self&&self.Object===Object&&self,f=c||s||Function("return this")(),d=Object.prototype.toString,h=Math.max,p=Math.min,v=function(){return f.Date.now()};function m(e,t,n){var i,o,a,u,l,c,s=0,f=!1,d=!1,m=!0;if("function"!=typeof e)throw new TypeError(r);function _(t){var n=i,r=o;return i=o=void 0,s=t,u=e.apply(r,n)}function b(e){return s=e,l=setTimeout(w,t),f?_(e):u}function D(e){var n=e-c;return void 0===c||n>=t||n<0||d&&e-s>=a}function w(){var e=v();if(D(e))return x(e);l=setTimeout(w,function(e){var n=t-(e-c);return d?p(n,a-(e-s)):n}(e))}function x(e){return l=void 0,m&&i?_(e):(i=o=void 0,u)}function k(){var e=v(),n=D(e);if(i=arguments,o=this,c=e,n){if(void 0===l)return b(c);if(d)return l=setTimeout(w,t),_(c)}return void 0===l&&(l=setTimeout(w,t)),u}return t=g(t)||0,y(n)&&(f=!!n.leading,a=(d="maxWait"in n)?h(g(n.maxWait)||0,t):a,m="trailing"in n?!!n.trailing:m),k.cancel=function(){void 0!==l&&clearTimeout(l),s=0,i=c=o=l=void 0},k.flush=function(){return void 0===l?u:x(v())},k}function y(e){var t=typeof e;return!!e&&("object"==t||"function"==t)}function g(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(y(e)){var t="function"==typeof e.valueOf?e.valueOf():e;e=y(t)?t+"":t}if("string"!=typeof e)return 0===e?e:+e;e=e.replace(i,"");var n=a.test(e);return n||u.test(e)?l(e.slice(2),n?2:8):o.test(e)?NaN:+e}e.exports=function(e,t,n){var i=!0,o=!0;if("function"!=typeof e)throw new TypeError(r);return y(n)&&(i="leading"in n?!!n.leading:i,o="trailing"in n?!!n.trailing:o),m(e,t,{leading:i,maxWait:t,trailing:o})}},154:function(e,t,n){var r="function"===typeof Map&&Map.prototype,i=Object.getOwnPropertyDescriptor&&r?Object.getOwnPropertyDescriptor(Map.prototype,"size"):null,o=r&&i&&"function"===typeof i.get?i.get:null,a=r&&Map.prototype.forEach,u="function"===typeof Set&&Set.prototype,l=Object.getOwnPropertyDescriptor&&u?Object.getOwnPropertyDescriptor(Set.prototype,"size"):null,c=u&&l&&"function"===typeof l.get?l.get:null,s=u&&Set.prototype.forEach,f="function"===typeof WeakMap&&WeakMap.prototype?WeakMap.prototype.has:null,d="function"===typeof WeakSet&&WeakSet.prototype?WeakSet.prototype.has:null,h="function"===typeof WeakRef&&WeakRef.prototype?WeakRef.prototype.deref:null,p=Boolean.prototype.valueOf,v=Object.prototype.toString,m=Function.prototype.toString,y=String.prototype.match,g=String.prototype.slice,_=String.prototype.replace,b=String.prototype.toUpperCase,D=String.prototype.toLowerCase,w=RegExp.prototype.test,x=Array.prototype.concat,k=Array.prototype.join,C=Array.prototype.slice,E=Math.floor,A="function"===typeof BigInt?BigInt.prototype.valueOf:null,S=Object.getOwnPropertySymbols,F="function"===typeof Symbol&&"symbol"===typeof Symbol.iterator?Symbol.prototype.toString:null,N="function"===typeof Symbol&&"object"===typeof Symbol.iterator,O="function"===typeof Symbol&&Symbol.toStringTag&&(typeof Symbol.toStringTag===N||"symbol")?Symbol.toStringTag:null,T=Object.prototype.propertyIsEnumerable,B=("function"===typeof Reflect?Reflect.getPrototypeOf:Object.getPrototypeOf)||([].__proto__===Array.prototype?function(e){return e.__proto__}:null);function M(e,t){if(e===1/0||e===-1/0||e!==e||e&&e>-1e3&&e<1e3||w.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 i=String(r),o=g.call(t,i.length+1);return _.call(i,n,"$&_")+"."+_.call(_.call(o,/([0-9]{3})/g,"$&_"),/_$/,"")}}return _.call(t,n,"$&_")}var L=n(654),P=L.custom,$=U(P)?P:null;function R(e,t,n){var r="double"===(n.quoteStyle||t)?'"':"'";return r+e+r}function I(e){return _.call(String(e),/"/g,""")}function j(e){return"[object Array]"===V(e)&&(!O||!("object"===typeof e&&O in e))}function z(e){return"[object RegExp]"===V(e)&&(!O||!("object"===typeof e&&O in e))}function U(e){if(N)return e&&"object"===typeof e&&e instanceof Symbol;if("symbol"===typeof e)return!0;if(!e||"object"!==typeof e||!F)return!1;try{return F.call(e),!0}catch(t){}return!1}e.exports=function e(t,n,r,i){var u=n||{};if(Y(u,"quoteStyle")&&"single"!==u.quoteStyle&&"double"!==u.quoteStyle)throw new TypeError('option "quoteStyle" must be "single" or "double"');if(Y(u,"maxStringLength")&&("number"===typeof u.maxStringLength?u.maxStringLength<0&&u.maxStringLength!==1/0:null!==u.maxStringLength))throw new TypeError('option "maxStringLength", if provided, must be a positive integer, Infinity, or `null`');var l=!Y(u,"customInspect")||u.customInspect;if("boolean"!==typeof l&&"symbol"!==l)throw new TypeError("option \"customInspect\", if provided, must be `true`, `false`, or `'symbol'`");if(Y(u,"indent")&&null!==u.indent&&"\t"!==u.indent&&!(parseInt(u.indent,10)===u.indent&&u.indent>0))throw new TypeError('option "indent" must be "\\t", an integer > 0, or `null`');if(Y(u,"numericSeparator")&&"boolean"!==typeof u.numericSeparator)throw new TypeError('option "numericSeparator", if provided, must be `true` or `false`');var v=u.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,u);if("number"===typeof t){if(0===t)return 1/0/t>0?"0":"-0";var b=String(t);return v?M(t,b):b}if("bigint"===typeof t){var w=String(t)+"n";return v?M(t,w):w}var E="undefined"===typeof u.depth?5:u.depth;if("undefined"===typeof r&&(r=0),r>=E&&E>0&&"object"===typeof t)return j(t)?"[Array]":"[Object]";var S=function(e,t){var n;if("\t"===e.indent)n="\t";else{if(!("number"===typeof e.indent&&e.indent>0))return null;n=k.call(Array(e.indent+1)," ")}return{base:n,prev:k.call(Array(t+1),n)}}(u,r);if("undefined"===typeof i)i=[];else if(q(i,t)>=0)return"[Circular]";function P(t,n,o){if(n&&(i=C.call(i)).push(n),o){var a={depth:u.depth};return Y(u,"quoteStyle")&&(a.quoteStyle=u.quoteStyle),e(t,a,r+1,i)}return e(t,u,r+1,i)}if("function"===typeof t&&!z(t)){var H=function(e){if(e.name)return e.name;var t=y.call(m.call(e),/^function\s*([\w$]+)/);if(t)return t[1];return null}(t),Q=X(t,P);return"[Function"+(H?": "+H:" (anonymous)")+"]"+(Q.length>0?" { "+k.call(Q,", ")+" }":"")}if(U(t)){var ee=N?_.call(String(t),/^(Symbol\(.*\))_[^)]*$/,"$1"):F.call(t);return"object"!==typeof t||N?ee:G(ee)}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 te="<"+D.call(String(t.nodeName)),ne=t.attributes||[],re=0;re"}if(j(t)){if(0===t.length)return"[]";var ie=X(t,P);return S&&!function(e){for(var t=0;t=0)return!1;return!0}(ie)?"["+K(ie,S)+"]":"[ "+k.call(ie,", ")+" ]"}if(function(e){return"[object Error]"===V(e)&&(!O||!("object"===typeof e&&O in e))}(t)){var oe=X(t,P);return"cause"in Error.prototype||!("cause"in t)||T.call(t,"cause")?0===oe.length?"["+String(t)+"]":"{ ["+String(t)+"] "+k.call(oe,", ")+" }":"{ ["+String(t)+"] "+k.call(x.call("[cause]: "+P(t.cause),oe),", ")+" }"}if("object"===typeof t&&l){if($&&"function"===typeof t[$]&&L)return L(t,{depth:E-r});if("symbol"!==l&&"function"===typeof t.inspect)return t.inspect()}if(function(e){if(!o||!e||"object"!==typeof e)return!1;try{o.call(e);try{c.call(e)}catch(te){return!0}return e instanceof Map}catch(t){}return!1}(t)){var ae=[];return a.call(t,(function(e,n){ae.push(P(n,t,!0)+" => "+P(e,t))})),Z("Map",o.call(t),ae,S)}if(function(e){if(!c||!e||"object"!==typeof e)return!1;try{c.call(e);try{o.call(e)}catch(t){return!0}return e instanceof Set}catch(n){}return!1}(t)){var ue=[];return s.call(t,(function(e){ue.push(P(e,t))})),Z("Set",c.call(t),ue,S)}if(function(e){if(!f||!e||"object"!==typeof e)return!1;try{f.call(e,f);try{d.call(e,d)}catch(te){return!0}return e instanceof WeakMap}catch(t){}return!1}(t))return J("WeakMap");if(function(e){if(!d||!e||"object"!==typeof e)return!1;try{d.call(e,d);try{f.call(e,f)}catch(te){return!0}return e instanceof WeakSet}catch(t){}return!1}(t))return J("WeakSet");if(function(e){if(!h||!e||"object"!==typeof e)return!1;try{return h.call(e),!0}catch(t){}return!1}(t))return J("WeakRef");if(function(e){return"[object Number]"===V(e)&&(!O||!("object"===typeof e&&O in e))}(t))return G(P(Number(t)));if(function(e){if(!e||"object"!==typeof e||!A)return!1;try{return A.call(e),!0}catch(t){}return!1}(t))return G(P(A.call(t)));if(function(e){return"[object Boolean]"===V(e)&&(!O||!("object"===typeof e&&O in e))}(t))return G(p.call(t));if(function(e){return"[object String]"===V(e)&&(!O||!("object"===typeof e&&O in e))}(t))return G(P(String(t)));if(!function(e){return"[object Date]"===V(e)&&(!O||!("object"===typeof e&&O in e))}(t)&&!z(t)){var le=X(t,P),ce=B?B(t)===Object.prototype:t instanceof Object||t.constructor===Object,se=t instanceof Object?"":"null prototype",fe=!ce&&O&&Object(t)===t&&O in t?g.call(V(t),8,-1):se?"Object":"",de=(ce||"function"!==typeof t.constructor?"":t.constructor.name?t.constructor.name+" ":"")+(fe||se?"["+k.call(x.call([],fe||[],se||[]),": ")+"] ":"");return 0===le.length?de+"{}":S?de+"{"+K(le,S)+"}":de+"{ "+k.call(le,", ")+" }"}return String(t)};var H=Object.prototype.hasOwnProperty||function(e){return e in this};function Y(e,t){return H.call(e,t)}function V(e){return v.call(e)}function q(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(g.call(e,0,t.maxStringLength),t)+r}return R(_.call(_.call(e,/(['\\])/g,"\\$1"),/[\x00-\x1f]/g,Q),"single",t)}function Q(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 G(e){return"Object("+e+")"}function J(e){return e+" { ? }"}function Z(e,t,n,r){return e+" ("+t+") {"+(r?K(n,r):k.call(n,", "))+"}"}function K(e,t){if(0===e.length)return"";var n="\n"+t.prev+t.base;return n+k.call(e,","+n)+"\n"+t.prev}function X(e,t){var n=j(e),r=[];if(n){r.length=e.length;for(var i=0;i-1?e.split(","):e},c=function(e,t,n,r){if(e){var o=n.allowDots?e.replace(/\.([^.[]+)/g,"[$1]"):e,a=/(\[[^[\]]*])/g,u=n.depth>0&&/(\[[^[\]]*])/.exec(o),c=u?o.slice(0,u.index):o,s=[];if(c){if(!n.plainObjects&&i.call(Object.prototype,c)&&!n.allowPrototypes)return;s.push(c)}for(var f=0;n.depth>0&&null!==(u=a.exec(o))&&f=0;--o){var a,u=e[o];if("[]"===u&&n.parseArrays)a=[].concat(i);else{a=n.plainObjects?Object.create(null):{};var c="["===u.charAt(0)&&"]"===u.charAt(u.length-1)?u.slice(1,-1):u,s=parseInt(c,10);n.parseArrays||""!==c?!isNaN(s)&&u!==c&&String(s)===c&&s>=0&&n.parseArrays&&s<=n.arrayLimit?(a=[])[s]=i:"__proto__"!==c&&(a[c]=i):a={0:i}}i=a}return i}(s,t,n,r)}};e.exports=function(e,t){var n=function(e){if(!e)return a;if(null!==e.decoder&&void 0!==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?a.charset:e.charset;return{allowDots:"undefined"===typeof e.allowDots?a.allowDots:!!e.allowDots,allowPrototypes:"boolean"===typeof e.allowPrototypes?e.allowPrototypes:a.allowPrototypes,allowSparse:"boolean"===typeof e.allowSparse?e.allowSparse:a.allowSparse,arrayLimit:"number"===typeof e.arrayLimit?e.arrayLimit:a.arrayLimit,charset:t,charsetSentinel:"boolean"===typeof e.charsetSentinel?e.charsetSentinel:a.charsetSentinel,comma:"boolean"===typeof e.comma?e.comma:a.comma,decoder:"function"===typeof e.decoder?e.decoder:a.decoder,delimiter:"string"===typeof e.delimiter||r.isRegExp(e.delimiter)?e.delimiter:a.delimiter,depth:"number"===typeof e.depth||!1===e.depth?+e.depth:a.depth,ignoreQueryPrefix:!0===e.ignoreQueryPrefix,interpretNumericEntities:"boolean"===typeof e.interpretNumericEntities?e.interpretNumericEntities:a.interpretNumericEntities,parameterLimit:"number"===typeof e.parameterLimit?e.parameterLimit:a.parameterLimit,parseArrays:!1!==e.parseArrays,plainObjects:"boolean"===typeof e.plainObjects?e.plainObjects:a.plainObjects,strictNullHandling:"boolean"===typeof e.strictNullHandling?e.strictNullHandling:a.strictNullHandling}}(t);if(""===e||null===e||"undefined"===typeof e)return n.plainObjects?Object.create(null):{};for(var s="string"===typeof e?function(e,t){var n,c={},s=t.ignoreQueryPrefix?e.replace(/^\?/,""):e,f=t.parameterLimit===1/0?void 0:t.parameterLimit,d=s.split(t.delimiter,f),h=-1,p=t.charset;if(t.charsetSentinel)for(n=0;n-1&&(m=o(m)?[m]:m),i.call(c,v)?c[v]=r.combine(c[v],m):c[v]=m}return c}(e,n):e,f=n.plainObjects?Object.create(null):{},d=Object.keys(s),h=0;h0?C.join(",")||null:void 0}];else if(l(h))M=h;else{var P=Object.keys(C);M=m?P.sort(m):P}for(var $=a&&l(C)&&1===C.length?n+"[]":n,R=0;R0?D+b:""}},837:function(e,t,n){"use strict";var r=n(609),i=Object.prototype.hasOwnProperty,o=Array.isArray,a=function(){for(var e=[],t=0;t<256;++t)e.push("%"+((t<16?"0":"")+t.toString(16)).toUpperCase());return e}(),u=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(o(n)){for(var r=[],i=0;i=48&&s<=57||s>=65&&s<=90||s>=97&&s<=122||o===r.RFC1738&&(40===s||41===s)?l+=u.charAt(c):s<128?l+=a[s]:s<2048?l+=a[192|s>>6]+a[128|63&s]:s<55296||s>=57344?l+=a[224|s>>12]+a[128|s>>6&63]+a[128|63&s]:(c+=1,s=65536+((1023&s)<<10|1023&u.charCodeAt(c)),l+=a[240|s>>18]+a[128|s>>12&63]+a[128|s>>6&63]+a[128|63&s])}return l},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(o(e)){for(var n=[],r=0;r2&&(u.children=arguments.length>3?t.call(arguments,2):r),"function"==typeof e&&null!=e.defaultProps)for(a in e.defaultProps)void 0===u[a]&&(u[a]=e.defaultProps[a]);return p(e,u,i,o,null)}function p(e,t,n,o,a){var u={type:e,props:t,key:n,ref:o,__k:null,__:null,__b:0,__e:null,__d:void 0,__c:null,__h:null,constructor:void 0,__v:null==a?++i:a};return null==a&&null!=r.vnode&&r.vnode(u),u}function v(){return{current:null}}function m(e){return e.children}function y(e,t){this.props=e,this.context=t}function g(e,t){if(null==t)return e.__?g(e.__,e.__.__k.indexOf(e)+1):null;for(var n;t0?p(y.type,y.props,y.key,y.ref?y.ref:null,y.__v):y)){if(y.__=n,y.__b=n.__b+1,null===(v=w[d])||v&&y.key==v.key&&y.type===v.type)w[d]=void 0;else for(h=0;h2&&(u.children=arguments.length>3?t.call(arguments,2):r),p(e.type,u,i||e.key,o||e.ref,null)}function I(e,t){var n={__c:t="__cC"+u++,__: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.shouldComponentUpdate=function(e){this.props.value!==e.value&&n.some(b)},this.sub=function(e){n.push(e);var t=e.componentWillUnmount;e.componentWillUnmount=function(){n.splice(n.indexOf(e),1),t&&t.call(e)}}),e.children}};return n.Provider.__=n.Consumer.contextType=n}t=c.slice,r={__e:function(e,t,n,r){for(var i,o,a;t=t.__;)if((i=t.__c)&&!i.__)try{if((o=i.constructor)&&null!=o.getDerivedStateFromError&&(i.setState(o.getDerivedStateFromError(e)),a=i.__d),null!=i.componentDidCatch&&(i.componentDidCatch(e,r||{}),a=i.__d),a)return i.__E=i}catch(t){e=t}throw e}},i=0,y.prototype.setState=function(e,t){var n;n=null!=this.__s&&this.__s!==this.state?this.__s:this.__s=f({},this.state),"function"==typeof e&&(e=e(f({},n),this.props)),e&&f(n,e),null!=e&&this.__v&&(t&&this._sb.push(t),b(this))},y.prototype.forceUpdate=function(e){this.__v&&(this.__e=!0,e&&this.__h.push(e),b(this))},y.prototype.render=m,o=[],D.__r=0,u=0;var j,z,U,H,Y=0,V=[],q=[],W=r.__b,Q=r.__r,G=r.diffed,J=r.__c,Z=r.unmount;function K(e,t){r.__h&&r.__h(z,e,Y||t),Y=0;var n=z.__H||(z.__H={__:[],__h:[]});return e>=n.__.length&&n.__.push({__V:q}),n.__[e]}function X(e){return Y=1,ee(ye,e)}function ee(e,t,n){var r=K(j++,2);if(r.t=e,!r.__c&&(r.__=[n?n(t):ye(void 0,t),function(e){var t=r.__N?r.__N[0]:r.__[0],n=r.t(t,e);t!==n&&(r.__N=[n,r.__[1]],r.__c.setState({}))}],r.__c=z,!z.u)){z.u=!0;var i=z.shouldComponentUpdate;z.shouldComponentUpdate=function(e,t,n){if(!r.__c.__H)return!0;var o=r.__c.__H.__.filter((function(e){return e.__c}));if(o.every((function(e){return!e.__N})))return!i||i.call(this,e,t,n);var a=!1;return o.forEach((function(e){if(e.__N){var t=e.__[0];e.__=e.__N,e.__N=void 0,t!==e.__[0]&&(a=!0)}})),!(!a&&r.__c.props===e)&&(!i||i.call(this,e,t,n))}}return r.__N||r.__}function te(e,t){var n=K(j++,3);!r.__s&&me(n.__H,t)&&(n.__=e,n.i=t,z.__H.__h.push(n))}function ne(e,t){var n=K(j++,4);!r.__s&&me(n.__H,t)&&(n.__=e,n.i=t,z.__h.push(n))}function re(e){return Y=5,oe((function(){return{current:e}}),[])}function ie(e,t,n){Y=6,ne((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 oe(e,t){var n=K(j++,7);return me(n.__H,t)?(n.__V=e(),n.i=t,n.__h=e,n.__V):n.__}function ae(e,t){return Y=8,oe((function(){return e}),t)}function ue(e){var t=z.context[e.__c],n=K(j++,9);return n.c=e,t?(null==n.__&&(n.__=!0,t.sub(z)),t.props.value):e.__}function le(e,t){r.useDebugValue&&r.useDebugValue(t?t(e):e)}function ce(e){var t=K(j++,10),n=X();return t.__=e,z.componentDidCatch||(z.componentDidCatch=function(e,r){t.__&&t.__(e,r),n[1](e)}),[n[0],function(){n[1](void 0)}]}function se(){var e=K(j++,11);if(!e.__){for(var t=z.__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 fe(){for(var e;e=V.shift();)if(e.__P&&e.__H)try{e.__H.__h.forEach(pe),e.__H.__h.forEach(ve),e.__H.__h=[]}catch(u){e.__H.__h=[],r.__e(u,e.__v)}}r.__b=function(e){z=null,W&&W(e)},r.__r=function(e){Q&&Q(e),j=0;var t=(z=e.__c).__H;t&&(U===z?(t.__h=[],z.__h=[],t.__.forEach((function(e){e.__N&&(e.__=e.__N),e.__V=q,e.__N=e.i=void 0}))):(t.__h.forEach(pe),t.__h.forEach(ve),t.__h=[])),U=z},r.diffed=function(e){G&&G(e);var t=e.__c;t&&t.__H&&(t.__H.__h.length&&(1!==V.push(t)&&H===r.requestAnimationFrame||((H=r.requestAnimationFrame)||he)(fe)),t.__H.__.forEach((function(e){e.i&&(e.__H=e.i),e.__V!==q&&(e.__=e.__V),e.i=void 0,e.__V=q}))),U=z=null},r.__c=function(e,t){t.some((function(e){try{e.__h.forEach(pe),e.__h=e.__h.filter((function(e){return!e.__||ve(e)}))}catch(i){t.some((function(e){e.__h&&(e.__h=[])})),t=[],r.__e(i,e.__v)}})),J&&J(e,t)},r.unmount=function(e){Z&&Z(e);var t,n=e.__c;n&&n.__H&&(n.__H.__.forEach((function(e){try{pe(e)}catch(e){t=e}})),n.__H=void 0,t&&r.__e(t,n.__v))};var de="function"==typeof requestAnimationFrame;function he(e){var t,n=function(){clearTimeout(r),de&&cancelAnimationFrame(t),setTimeout(e)},r=setTimeout(n,100);de&&(t=requestAnimationFrame(n))}function pe(e){var t=z,n=e.__c;"function"==typeof n&&(e.__c=void 0,n()),z=t}function ve(e){var t=z;e.__c=e.__(),z=t}function me(e,t){return!e||e.length!==t.length||t.some((function(t,n){return t!==e[n]}))}function ye(e,t){return"function"==typeof t?t(e):t}function ge(e,t){for(var n in t)e[n]=t[n];return e}function _e(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 be(e,t){return e===t&&(0!==e||1/e==1/t)||e!=e&&t!=t}function De(e){this.props=e}function we(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:_e(this.props,e)}function r(t){return this.shouldComponentUpdate=n,h(e,t)}return r.displayName="Memo("+(e.displayName||e.name)+")",r.prototype.isReactComponent=!0,r.__f=!0,r}(De.prototype=new y).isPureReactComponent=!0,De.prototype.shouldComponentUpdate=function(e,t){return _e(this.props,e)||_e(this.state,t)};var xe=r.__b;r.__b=function(e){e.type&&e.type.__f&&e.ref&&(e.props.ref=e.ref,e.ref=null),xe&&xe(e)};var ke="undefined"!=typeof Symbol&&Symbol.for&&Symbol.for("react.forward_ref")||3911;function Ce(e){function t(t){var n=ge({},t);return delete n.ref,e(n,t.ref||null)}return t.$$typeof=ke,t.render=t,t.prototype.isReactComponent=t.__f=!0,t.displayName="ForwardRef("+(e.displayName||e.name)+")",t}var Ee=function(e,t){return null==e?null:k(k(e).map(t))},Ae={map:Ee,forEach:Ee,count:function(e){return e?k(e).length:0},only:function(e){var t=k(e);if(1!==t.length)throw"Children.only";return t[0]},toArray:k},Se=r.__e;r.__e=function(e,t,n,r){if(e.then)for(var i,o=t;o=o.__;)if((i=o.__c)&&i.__c)return null==t.__e&&(t.__e=n.__e,t.__k=n.__k),i.__c(e,t);Se(e,t,n,r)};var Fe=r.unmount;function Ne(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=ge({},e)).__c&&(e.__c.__P===n&&(e.__c.__P=t),e.__c=null),e.__k=e.__k&&e.__k.map((function(e){return Ne(e,t,n)}))),e}function Oe(e,t,n){return e&&(e.__v=null,e.__k=e.__k&&e.__k.map((function(e){return Oe(e,t,n)})),e.__c&&e.__c.__P===t&&(e.__e&&n.insertBefore(e.__e,e.__d),e.__c.__e=!0,e.__c.__P=n)),e}function Te(){this.__u=0,this.t=null,this.__b=null}function Be(e){var t=e.__.__c;return t&&t.__a&&t.__a(e)}function Me(e){var t,n,r;function i(i){if(t||(t=e()).then((function(e){n=e.default||e}),(function(e){r=e})),r)throw r;if(!n)throw t;return h(n,i)}return i.displayName="Lazy",i.__f=!0,i}function Le(){this.u=null,this.o=null}r.unmount=function(e){var t=e.__c;t&&t.__R&&t.__R(),t&&!0===e.__h&&(e.type=null),Fe&&Fe(e)},(Te.prototype=new y).__c=function(e,t){var n=t.__c,r=this;null==r.t&&(r.t=[]),r.t.push(n);var i=Be(r.__v),o=!1,a=function(){o||(o=!0,n.__R=null,i?i(u):u())};n.__R=a;var u=function(){if(!--r.__u){if(r.state.__a){var e=r.state.__a;r.__v.__k[0]=Oe(e,e.__c.__P,e.__c.__O)}var t;for(r.setState({__a:r.__b=null});t=r.t.pop();)t.forceUpdate()}},l=!0===t.__h;r.__u++||l||r.setState({__a:r.__b=r.__v.__k[0]}),e.then(a,a)},Te.prototype.componentWillUnmount=function(){this.t=[]},Te.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]=Ne(this.__b,n,r.__O=r.__P)}this.__b=null}var i=t.__a&&h(m,null,e.fallback);return i&&(i.__h=null),[h(m,null,t.__a?null:e.children),i]};var Pe=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)}}),P(h($e,{context:t.context},e.__v),t.l)):t.l&&t.componentWillUnmount()}function Ie(e,t){var n=h(Re,{__v:e,i:t});return n.containerInfo=t,n}(Le.prototype=new y).__a=function(e){var t=this,n=Be(t.__v),r=t.o.get(e);return r[0]++,function(i){var o=function(){t.props.revealOrder?(r.push(i),Pe(t,e,r)):i()};n?n(o):o()}},Le.prototype.render=function(e){this.u=null,this.o=new Map;var t=k(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},Le.prototype.componentDidUpdate=Le.prototype.componentDidMount=function(){var e=this;this.o.forEach((function(t,n){Pe(e,n,t)}))};var je="undefined"!=typeof Symbol&&Symbol.for&&Symbol.for("react.element")||60103,ze=/^(?:accent|alignment|arabic|baseline|cap|clip(?!PathU)|color|dominant|fill|flood|font|glyph(?!R)|horiz|image|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]/,Ue="undefined"!=typeof document,He=function(e){return("undefined"!=typeof Symbol&&"symbol"==typeof Symbol()?/fil|che|rad/i:/fil|che|ra/i).test(e)};function Ye(e,t,n){return null==t.__k&&(t.textContent=""),P(e,t),"function"==typeof n&&n(),e?e.__c:null}function Ve(e,t,n){return $(e,t),"function"==typeof n&&n(),e?e.__c:null}y.prototype.isReactComponent={},["componentWillMount","componentWillReceiveProps","componentWillUpdate"].forEach((function(e){Object.defineProperty(y.prototype,e,{configurable:!0,get:function(){return this["UNSAFE_"+e]},set:function(t){Object.defineProperty(this,e,{configurable:!0,writable:!0,value:t})}})}));var qe=r.event;function We(){}function Qe(){return this.cancelBubble}function Ge(){return this.defaultPrevented}r.event=function(e){return qe&&(e=qe(e)),e.persist=We,e.isPropagationStopped=Qe,e.isDefaultPrevented=Ge,e.nativeEvent=e};var Je,Ze={configurable:!0,get:function(){return this.class}},Ke=r.vnode;r.vnode=function(e){var t=e.type,n=e.props,r=n;if("string"==typeof t){var i=-1===t.indexOf("-");for(var o in r={},n){var a=n[o];Ue&&"children"===o&&"noscript"===t||"value"===o&&"defaultValue"in n&&null==a||("defaultValue"===o&&"value"in n&&null==n.value?o="value":"download"===o&&!0===a?a="":/ondoubleclick/i.test(o)?o="ondblclick":/^onchange(textarea|input)/i.test(o+t)&&!He(n.type)?o="oninput":/^onfocus$/i.test(o)?o="onfocusin":/^onblur$/i.test(o)?o="onfocusout":/^on(Ani|Tra|Tou|BeforeInp|Compo)/.test(o)?o=o.toLowerCase():i&&ze.test(o)?o=o.replace(/[A-Z0-9]/g,"-$&").toLowerCase():null===a&&(a=void 0),/^oninput$/i.test(o)&&(o=o.toLowerCase(),r[o]&&(o="oninputCapture")),r[o]=a)}"select"==t&&r.multiple&&Array.isArray(r.value)&&(r.value=k(n.children).forEach((function(e){e.props.selected=-1!=r.value.indexOf(e.props.value)}))),"select"==t&&null!=r.defaultValue&&(r.value=k(n.children).forEach((function(e){e.props.selected=r.multiple?-1!=r.defaultValue.indexOf(e.props.value):r.defaultValue==e.props.value}))),e.props=r,n.class!=n.className&&(Ze.enumerable="className"in n,null!=n.className&&(r.class=n.className),Object.defineProperty(r,"className",Ze))}e.$$typeof=je,Ke&&Ke(e)};var Xe=r.__r;r.__r=function(e){Xe&&Xe(e),Je=e.__c};var et={ReactCurrentDispatcher:{current:{readContext:function(e){return Je.__n[e.__c].props.value}}}},tt="17.0.2";function nt(e){return h.bind(null,e)}function rt(e){return!!e&&e.$$typeof===je}function it(e){return rt(e)?R.apply(null,arguments):e}function ot(e){return!!e.__k&&(P(null,e),!0)}function at(e){return e&&(e.base||1===e.nodeType&&e)||null}var ut=function(e,t){return e(t)},lt=function(e,t){return e(t)},ct=m;function st(e){e()}function ft(e){return e}function dt(){return[!1,st]}var ht=ne;function pt(e,t){var n=t(),r=X({h:{__:n,v:t}}),i=r[0].h,o=r[1];return ne((function(){i.__=n,i.v=t,be(i.__,t())||o({h:i})}),[e,n,t]),te((function(){return be(i.__,i.v())||o({h:i}),e((function(){be(i.__,i.v())||o({h:i})}))}),[e]),n}var vt,mt={useState:X,useId:se,useReducer:ee,useEffect:te,useLayoutEffect:ne,useInsertionEffect:ht,useTransition:dt,useDeferredValue:ft,useSyncExternalStore:pt,startTransition:st,useRef:re,useImperativeHandle:ie,useMemo:oe,useCallback:ae,useContext:ue,useDebugValue:le,version:"17.0.2",Children:Ae,render:Ye,hydrate:Ve,unmountComponentAtNode:ot,createPortal:Ie,createElement:h,createContext:I,createFactory:nt,cloneElement:it,createRef:v,Fragment:m,isValidElement:rt,findDOMNode:at,Component:y,PureComponent:De,memo:we,forwardRef:Ce,flushSync:lt,unstable_batchedUpdates:ut,StrictMode:ct,Suspense:Te,SuspenseList:Le,lazy:Me,__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED:et};function yt(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n=0&&(t.hash=e.substr(n),e=e.substr(0,n));var r=e.indexOf("?");r>=0&&(t.search=e.substr(r),e=e.substr(0,r)),e&&(t.pathname=e)}return t}function zt(e){var t="undefined"!==typeof window&&"undefined"!==typeof window.location&&"null"!==window.location.origin?window.location.origin:"unknown://unknown",n="string"===typeof e?e:It(e);return new URL(n,t)}function Ut(e,t,n,r){void 0===r&&(r={});var i=r,o=i.window,a=void 0===o?document.defaultView:o,u=i.v5Compat,l=void 0!==u&&u,c=a.history,s=vt.Pop,f=null;function d(){s=vt.Pop,f&&f({action:s,location:h.location})}var h={get action(){return s},get location(){return e(a,c)},listen:function(e){if(f)throw new Error("A history only accepts one active listener");return a.addEventListener(Lt,d),f=e,function(){a.removeEventListener(Lt,d),f=null}},createHref:function(e){return t(a,e)},encodeLocation:function(e){var t=zt(It(e));return Bt({},e,{pathname:t.pathname,search:t.search,hash:t.hash})},push:function(e,t){s=vt.Push;var r=Rt(h.location,e,t);n&&n(r,e);var i=$t(r),o=h.createHref(r);try{c.pushState(i,"",o)}catch(u){a.location.assign(o)}l&&f&&f({action:s,location:h.location})},replace:function(e,t){s=vt.Replace;var r=Rt(h.location,e,t);n&&n(r,e);var i=$t(r),o=h.createHref(r);c.replaceState(i,"",o),l&&f&&f({action:s,location:h.location})},go:function(e){return c.go(e)}};return h}function Ht(e,t,n){void 0===n&&(n="/");var r=Zt(("string"===typeof t?jt(t):t).pathname||"/",n);if(null==r)return null;var i=Yt(e);!function(e){e.sort((function(e,t){return e.score!==t.score?t.score-e.score:function(e,t){var n=e.length===t.length&&e.slice(0,-1).every((function(e,n){return e===t[n]}));return n?e[e.length-1]-t[t.length-1]:0}(e.routesMeta.map((function(e){return e.childrenIndex})),t.routesMeta.map((function(e){return e.childrenIndex})))}))}(i);for(var o=null,a=0;null==o&&a0&&(Kt(!0!==e.index,'Index routes must not have child routes. Please remove all child routes from route path "'+a+'".'),Yt(e.children,t,u,a)),(null!=e.path||e.index)&&t.push({path:a,score:Wt(a,e.index),routesMeta:u})})),t}!function(e){e.data="data",e.deferred="deferred",e.redirect="redirect",e.error="error"}(Mt||(Mt={}));var Vt=/^:\w+$/,qt=function(e){return"*"===e};function Wt(e,t){var n=e.split("/"),r=n.length;return n.some(qt)&&(r+=-2),t&&(r+=2),n.filter((function(e){return!qt(e)})).reduce((function(e,t){return e+(Vt.test(t)?3:""===t?1:10)}),r)}function Qt(e,t){for(var n=e.routesMeta,r={},i="/",o=[],a=0;a and the router will parse it for you.'}function tn(e){return e.filter((function(e,t){return 0===t||e.route.path&&e.route.path.length>0}))}function nn(e,t,n,r){var i;void 0===r&&(r=!1),"string"===typeof e?i=jt(e):(Kt(!(i=Bt({},e)).pathname||!i.pathname.includes("?"),en("?","pathname","search",i)),Kt(!i.pathname||!i.pathname.includes("#"),en("#","pathname","hash",i)),Kt(!i.search||!i.search.includes("#"),en("#","search","hash",i)));var o,a=""===e||""===i.pathname,u=a?"/":i.pathname;if(r||null==u)o=n;else{var l=t.length-1;if(u.startsWith("..")){for(var c=u.split("/");".."===c[0];)c.shift(),l-=1;i.pathname=c.join("/")}o=l>=0?t[l]:"/"}var s=function(e,t){void 0===t&&(t="/");var n="string"===typeof e?jt(e):e,r=n.pathname,i=n.search,o=void 0===i?"":i,a=n.hash,u=void 0===a?"":a,l=r?r.startsWith("/")?r:function(e,t){var n=t.replace(/\/+$/,"").split("/");return e.split("/").forEach((function(e){".."===e?n.length>1&&n.pop():"."!==e&&n.push(e)})),n.length>1?n.join("/"):"/"}(r,t):t;return{pathname:l,search:an(o),hash:un(u)}}(i,o),f=u&&"/"!==u&&u.endsWith("/"),d=(a||"."===u)&&n.endsWith("/");return s.pathname.endsWith("/")||!f&&!d||(s.pathname+="/"),s}var rn=function(e){return e.join("/").replace(/\/\/+/g,"/")},on=function(e){return e.replace(/\/+$/,"").replace(/^\/*/,"/")},an=function(e){return e&&"?"!==e?e.startsWith("?")?e:"?"+e:""},un=function(e){return e&&"#"!==e?e.startsWith("#")?e:"#"+e:""};Error;var ln=xt((function e(t,n,r){Dt(this,e),this.status=t,this.statusText=n||"",this.data=r}));function cn(e){return e instanceof ln}"undefined"!==typeof window&&"undefined"!==typeof window.document&&window.document.createElement;var sn=new Set(["POST","PUT","PATCH","DELETE"]);new Set(["GET","HEAD"].concat(bt(sn)));function fn(){return fn=Object.assign?Object.assign.bind():function(e){for(var t=1;t")))}var Nn,On,Tn=function(e){Ct(n,e);var t=Nt(n);function n(e){var r;return Dt(this,n),(r=t.call(this,e)).state={location:e.location,error:e.error},r}return xt(n,[{key:"componentDidCatch",value:function(e,t){console.error("React Router caught the following error during render",e,t)}},{key:"render",value:function(){return this.state.error?h(kn.Provider,{value:this.state.error,children:this.props.component}):this.props.children}}],[{key:"getDerivedStateFromError",value:function(e){return{error:e}}},{key:"getDerivedStateFromProps",value:function(e,t){return t.location!==e.location?{error:e.error,location:e.location}:{error:e.error||t.error,location:t.location}}}]),n}(y);function Bn(e){var t=e.routeContext,n=e.match,r=e.children,i=ue(gn);return i&&n.route.errorElement&&(i._deepestRenderedBoundaryId=n.route.id),h(xn.Provider,{value:t},r)}function Mn(e,t,n){if(void 0===t&&(t=[]),null==e){if(null==n||!n.errors)return null;e=n.matches}var r=e,i=null==n?void 0:n.errors;if(null!=i){var o=r.findIndex((function(e){return e.route.id&&(null==i?void 0:i[e.route.id])}));o>=0||Kt(!1),r=r.slice(0,Math.min(r.length,o+1))}return r.reduceRight((function(e,o,a){var u=o.route.id?null==i?void 0:i[o.route.id]:null,l=n?o.route.errorElement||h(Fn,null):null,c=function(){return h(Bn,{match:o,routeContext:{outlet:e,matches:t.concat(r.slice(0,a+1))}},u?l:void 0!==o.route.element?o.route.element:e)};return n&&(o.route.errorElement||0===a)?h(Tn,{location:n.location,component:l,error:u,children:c()}):c()}),null)}function Ln(e){var t=ue(bn);return t||Kt(!1),t}!function(e){e.UseRevalidator="useRevalidator"}(Nn||(Nn={})),function(e){e.UseLoaderData="useLoaderData",e.UseActionData="useActionData",e.UseRouteError="useRouteError",e.UseNavigation="useNavigation",e.UseRouteLoaderData="useRouteLoaderData",e.UseMatches="useMatches",e.UseRevalidator="useRevalidator"}(On||(On={}));var Pn;function $n(e){return function(e){var t=ue(xn).outlet;return t?h(Sn.Provider,{value:e},t):t}(e.context)}function Rn(e){Kt(!1)}function In(e){var t=e.basename,n=void 0===t?"/":t,r=e.children,i=void 0===r?null:r,o=e.location,a=e.navigationType,u=void 0===a?vt.Pop:a,l=e.navigator,c=e.static,s=void 0!==c&&c;Cn()&&Kt(!1);var f=n.replace(/^\/*/,"/"),d=oe((function(){return{basename:f,navigator:l,static:s}}),[f,l,s]);"string"===typeof o&&(o=jt(o));var p=o,v=p.pathname,m=void 0===v?"/":v,y=p.search,g=void 0===y?"":y,_=p.hash,b=void 0===_?"":_,D=p.state,w=void 0===D?null:D,x=p.key,k=void 0===x?"default":x,C=oe((function(){var e=Zt(m,f);return null==e?null:{pathname:e,search:g,hash:b,state:w,key:k}}),[f,m,g,b,w,k]);return null==C?null:h(Dn.Provider,{value:d},h(wn.Provider,{children:i,value:{location:C,navigationType:u}}))}function jn(e){var t=e.children,n=e.location,r=ue(_n);return function(e,t){Cn()||Kt(!1);var n,r=ue(bn),i=ue(xn).matches,o=i[i.length-1],a=o?o.params:{},u=(o&&o.pathname,o?o.pathnameBase:"/"),l=(o&&o.route,En());if(t){var c,s="string"===typeof t?jt(t):t;"/"===u||(null==(c=s.pathname)?void 0:c.startsWith(u))||Kt(!1),n=s}else n=l;var f=n.pathname||"/",d=Ht(e,{pathname:"/"===u?f:f.slice(u.length)||"/"}),p=Mn(d&&d.map((function(e){return Object.assign({},e,{params:Object.assign({},a,e.params),pathname:rn([u,e.pathname]),pathnameBase:"/"===e.pathnameBase?u:rn([u,e.pathnameBase])})})),i,r||void 0);return t&&p?h(wn.Provider,{value:{location:fn({pathname:"/",search:"",hash:"",state:null,key:"default"},n),navigationType:vt.Pop}},p):p}(r&&!t?r.router.routes:zn(t),n)}!function(e){e[e.pending=0]="pending",e[e.success=1]="success",e[e.error=2]="error"}(Pn||(Pn={}));new Promise((function(){}));function zn(e,t){void 0===t&&(t=[]);var n=[];return Ae.forEach(e,(function(e,r){if(rt(e))if(e.type!==m){e.type!==Rn&&Kt(!1),e.props.index&&e.props.children&&Kt(!1);var i=[].concat(bt(t),[r]),o={id:e.props.id||i.join("-"),caseSensitive:e.props.caseSensitive,element:e.props.element,index:e.props.index,path:e.props.path,loader:e.props.loader,action:e.props.action,errorElement:e.props.errorElement,hasErrorBoundary:null!=e.props.errorElement,shouldRevalidate:e.props.shouldRevalidate,handle:e.props.handle};e.props.children&&(o.children=zn(e.props.children,i)),n.push(o)}else n.push.apply(n,zn(e.props.children,t))})),n}function Un(e){var t=e.basename,n=e.children,r=e.window,i=re();null==i.current&&(i.current=function(e){return void 0===e&&(e={}),Ut((function(e,t){var n=jt(e.location.hash.substr(1)),r=n.pathname,i=void 0===r?"/":r,o=n.search,a=void 0===o?"":o,u=n.hash;return Rt("",{pathname:i,search:a,hash:void 0===u?"":u},t.state&&t.state.usr||null,t.state&&t.state.key||"default")}),(function(e,t){var n=e.document.querySelector("base"),r="";if(n&&n.getAttribute("href")){var i=e.location.href,o=i.indexOf("#");r=-1===o?i:i.slice(0,o)}return r+"#"+("string"===typeof t?t:It(t))}),(function(e,t){Pt("/"===e.pathname.charAt(0),"relative pathnames are not supported in hash history.push("+JSON.stringify(t)+")")}),e)}({window:r,v5Compat:!0}));var o=i.current,a=_t(X({action:o.action,location:o.location}),2),u=a[0],l=a[1];return ne((function(){return o.listen(l)}),[o]),h(In,{basename:t,children:n,location:u.location,navigationType:u.action,navigator:o})}var Hn,Yn;(function(e){e.UseScrollRestoration="useScrollRestoration",e.UseSubmitImpl="useSubmitImpl",e.UseFetcher="useFetcher"})(Hn||(Hn={})),function(e){e.UseFetchers="useFetchers",e.UseScrollRestoration="useScrollRestoration"}(Yn||(Yn={}));var Vn;function qn(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}var Wn={home:"/",dashboards:"/dashboards",cardinality:"/cardinality",topQueries:"/top-queries",trace:"/trace"},Qn={header:{timeSelector:!0,executionControls:!0,globalSettings:!0}},Gn=(qn(Vn={},Wn.home,Qn),qn(Vn,Wn.dashboards,Qn),qn(Vn,Wn.cardinality,{header:{cardinalityDatePicker:!0,globalSettings:!0}}),Vn),Jn=Wn;function Zn(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}function Kn(e){for(var t=1;t2&&void 0!==arguments[2]?arguments[2]:window.location.search,r=nr().parse(n,{ignoreQueryPrefix:!0});return ir()(r,e,t||"")},lr={serverUrl:Xn().serverURL||window.location.href.replace(/\/(?:prometheus\/)?(?:graph|vmui)\/.*/,"/prometheus"),tenantId:Number(ur("g0.tenantID",0))};function cr(e,t){switch(t.type){case"SET_SERVER":return Kn(Kn({},e),{},{serverUrl:t.payload});case"SET_TENANT_ID":return Kn(Kn({},e),{},{tenantId:t.payload});default:throw new Error}}var sr=0;function fr(e,t,n,i,o){var a,u,l={};for(u in t)"ref"==u?a=t[u]:l[u]=t[u];var c={type:e,props:l,key:n,ref:a,__k:null,__:null,__b:0,__e:null,__d:void 0,__c:null,__h:null,constructor:void 0,__v:--sr,__source:o,__self:i};if("function"==typeof e&&(a=e.defaultProps))for(u in a)void 0===l[u]&&(l[u]=a[u]);return r.vnode&&r.vnode(c),c}var dr=I({}),hr=function(){return ue(dr).state},pr=function(){return ue(dr).dispatch},vr=Object.entries(lr).reduce((function(e,t){var n=_t(t,2),r=n[0],i=n[1];return Kn(Kn({},e),{},qn({},r,ur(r)||i))}),{}),mr=n(658),yr=n.n(mr),gr=n(446),_r=n.n(gr),br=n(635),Dr=n.n(br),wr="YYYY-MM-DD",xr="YYYY-MM-DD HH:mm:ss",kr="YYYY-MM-DD[T]HH:mm:ss";yr().extend(_r()),yr().extend(Dr());var Cr,Er=window.innerWidth/4,Ar=1,Sr=1578e8,Fr=[{long:"days",short:"d",possible:"day"},{long:"weeks",short:"w",possible:"week"},{long:"months",short:"M",possible:"mon"},{long:"years",short:"y",possible:"year"},{long:"hours",short:"h",possible:"hour"},{long:"minutes",short:"m",possible:"min"},{long:"seconds",short:"s",possible:"sec"},{long:"milliseconds",short:"ms",possible:"millisecond"}].map((function(e){return e.short})),Nr=function(e){return Math.round(1e3*e)/1e3},Or=function(e){var t=e.match(/\d+/g),n=e.match(/[a-zA-Z]+/g);if(n&&t&&Fr.includes(n[0]))return qn({},n[0],t[0])},Tr=function(e,t){var n=(t||new Date).valueOf()/1e3,r=e.trim().split(" ").reduce((function(e,t){var n=Or(t);return n?Kn(Kn({},e),n):Kn({},e)}),{}),i=yr().duration(r).asSeconds();return{start:n-i,end:n,step:Nr(i/Er)||.001,date:Br(t||new Date)}},Br=function(e){return yr()(e).utc().format(kr)},Mr=function(e){return yr()(e).format(kr)},Lr=function(e){var t=Math.floor(e%1e3),n=Math.floor(e/1e3%60),r=Math.floor(e/1e3/60%60),i=Math.floor(e/1e3/3600%24),o=Math.floor(e/864e5),a=["d","h","m","s","ms"],u=[o,i,r,n,t].map((function(e,t){return e?"".concat(e).concat(a[t]):""}));return u.filter((function(e){return e})).join(" ")},Pr=function(e){return new Date(1e3*e)},$r=[{title:"Last 5 minutes",duration:"5m"},{title:"Last 15 minutes",duration:"15m"},{title:"Last 30 minutes",duration:"30m",isDefault:!0},{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:function(){return yr()().subtract(1,"day").endOf("day").toDate()}},{title:"Today",duration:"1d",until:function(){return yr()().endOf("day").toDate()}}].map((function(e){return Kn({id:e.title.replace(/\s/g,"_").toLocaleLowerCase(),until:e.until?e.until:function(){return yr()().toDate()}},e)})),Rr=function(e){var t,n=e.relativeTimeId,r=e.defaultDuration,i=e.defaultEndInput,o=null===(t=$r.find((function(e){return e.isDefault})))||void 0===t?void 0:t.id,a=n||ur("g0.relative_time",o),u=$r.find((function(e){return e.id===a}));return{relativeTimeId:u?a:"none",duration:u?u.duration:r,endInput:u?u.until():i}},Ir=ur("g0.range_input"),jr=Rr({defaultDuration:Ir||"1h",defaultEndInput:new Date((Cr=ur("g0.end_input",new Date(yr()().utc().format(kr))),yr()(Cr).utcOffset(0,!0).local().format(kr))),relativeTimeId:Ir?ur("g0.relative_time","none"):void 0}),zr=jr.duration,Ur=jr.endInput,Hr=jr.relativeTimeId,Yr={duration:zr,period:Tr(zr,Ur),relativeTime:Hr};function Vr(e,t){switch(t.type){case"SET_DURATION":return Kn(Kn({},e),{},{duration:t.payload,period:Tr(t.payload,Pr(e.period.end)),relativeTime:"none"});case"SET_RELATIVE_TIME":return Kn(Kn({},e),{},{duration:t.payload.duration,period:Tr(t.payload.duration,new Date(t.payload.until)),relativeTime:t.payload.id});case"SET_PERIOD":var n=function(e){var t=e.to.valueOf()-e.from.valueOf();return Lr(t)}(t.payload);return Kn(Kn({},e),{},{duration:n,period:Tr(n,t.payload.to),relativeTime:"none"});case"RUN_QUERY":var r=Rr({relativeTimeId:e.relativeTime,defaultDuration:e.duration,defaultEndInput:Pr(e.period.end)}),i=r.duration,o=r.endInput;return Kn(Kn({},e),{},{period:Tr(i,o)});case"RUN_QUERY_TO_NOW":return Kn(Kn({},e),{},{period:Tr(e.duration)});default:throw new Error}}var qr=I({}),Wr=function(){return ue(qr).state},Qr=function(){return ue(qr).dispatch},Gr=function(e,t){t?window.localStorage.setItem(e,JSON.stringify({value:t})):Zr([e])},Jr=function(e){var 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(c){return t}},Zr=function(e){return e.forEach((function(e){return window.localStorage.removeItem(e)}))},Kr=function(){var e,t=(null===(e=window.location.search.match(/g\d+.expr/gim))||void 0===e?void 0:e.length)||1;return new Array(t>4?4:t).fill(1).map((function(e,t){return ur("g".concat(t,".expr"),"")}))}(),Xr={query:Kr,queryHistory:Kr.map((function(e){return{index:0,values:[e]}})),autocomplete:Jr("AUTOCOMPLETE")||!1};function ei(e,t){switch(t.type){case"SET_QUERY":return Kn(Kn({},e),{},{query:t.payload.map((function(e){return e}))});case"SET_QUERY_HISTORY":return Kn(Kn({},e),{},{queryHistory:t.payload});case"SET_QUERY_HISTORY_BY_INDEX":return e.queryHistory.splice(t.payload.queryNumber,1,t.payload.value),Kn(Kn({},e),{},{queryHistory:e.queryHistory});case"TOGGLE_AUTOCOMPLETE":return Gr("AUTOCOMPLETE",!e.autocomplete),Kn(Kn({},e),{},{autocomplete:!e.autocomplete});default:throw new Error}}var ti=I({}),ni=function(){return ue(ti).state},ri=function(){return ue(ti).dispatch},ii=function(){return fr("svg",{viewBox:"0 0 74 24",fill:"currentColor",children:[fr("path",{d:"M6.11771 9.47563C6.4774 9.7554 6.91935 9.90875 7.37507 9.9119H7.42685C7.9076 9.90451 8.38836 9.71964 8.67681 9.46823C10.1856 8.18898 14.5568 4.18115 14.5568 4.18115C15.7254 3.09415 12.4637 2.00716 7.42685 1.99977H7.36768C2.33084 2.00716 -0.930893 3.09415 0.237711 4.18115C0.237711 4.18115 4.60888 8.18898 6.11771 9.47563ZM8.67681 11.6422C8.31807 11.9246 7.87603 12.0806 7.41945 12.0859H7.37507C6.91849 12.0806 6.47645 11.9246 6.11771 11.6422C5.08224 10.7549 1.38413 7.41995 0.00103198 6.14809V8.07806C0.00103198 8.2925 0.0823905 8.57349 0.222919 8.70659L0.293358 8.77097L0.293386 8.77099C1.33788 9.72556 4.83907 12.9253 6.11771 14.0159C6.47645 14.2983 6.91849 14.4543 7.37507 14.4595H7.41945C7.9076 14.4447 8.38096 14.2599 8.67681 14.0159C9.98594 12.9067 13.6249 9.57175 14.5642 8.70659C14.7121 8.57349 14.7861 8.2925 14.7861 8.07806V6.14809C12.7662 7.99781 10.7297 9.82926 8.67681 11.6422ZM7.41945 16.6261C7.87517 16.623 8.31712 16.4696 8.67681 16.1898C10.7298 14.3744 12.7663 12.5405 14.7861 10.6883V12.6257C14.7861 12.8327 14.7121 13.1137 14.5642 13.2468C13.6249 14.1194 9.98594 17.4469 8.67681 18.5561C8.38096 18.8075 7.9076 18.9924 7.41945 18.9998H7.37507C6.91935 18.9966 6.4774 18.8433 6.11771 18.5635C4.91431 17.5371 1.74223 14.6362 0.502336 13.5023C0.3934 13.4027 0.299379 13.3167 0.222919 13.2468C0.0823905 13.1137 0.00103198 12.8327 0.00103198 12.6257V10.6883C1.38413 11.9528 5.08224 15.2951 6.11771 16.1825C6.47645 16.4649 6.91849 16.6209 7.37507 16.6261H7.41945Z",fill:"currentColor"}),fr("path",{d:"M35 3.54L29.16 18H26.73L20.89 3.54H23.05C23.2833 3.54 23.4733 3.59667 23.62 3.71C23.7667 3.82333 23.8767 3.97 23.95 4.15L27.36 12.97C27.4733 13.2567 27.58 13.5733 27.68 13.92C27.7867 14.26 27.8867 14.6167 27.98 14.99C28.06 14.6167 28.1467 14.26 28.24 13.92C28.3333 13.5733 28.4367 13.2567 28.55 12.97L31.94 4.15C31.9933 3.99667 32.0967 3.85667 32.25 3.73C32.41 3.60333 32.6033 3.54 32.83 3.54H35ZM52.1767 3.54V18H49.8067V8.66C49.8067 8.28667 49.8267 7.88333 49.8667 7.45L45.4967 15.66C45.2901 16.0533 44.9734 16.25 44.5467 16.25H44.1667C43.7401 16.25 43.4234 16.0533 43.2167 15.66L38.7967 7.42C38.8167 7.64 38.8334 7.85667 38.8467 8.07C38.8601 8.28333 38.8667 8.48 38.8667 8.66V18H36.4967V3.54H38.5267C38.6467 3.54 38.7501 3.54333 38.8367 3.55C38.9234 3.55667 39.0001 3.57333 39.0667 3.6C39.1401 3.62667 39.2034 3.67 39.2567 3.73C39.3167 3.79 39.3734 3.87 39.4267 3.97L43.7567 12C43.8701 12.2133 43.9734 12.4333 44.0667 12.66C44.1667 12.8867 44.2634 13.12 44.3567 13.36C44.4501 13.1133 44.5467 12.8767 44.6467 12.65C44.7467 12.4167 44.8534 12.1933 44.9667 11.98L49.2367 3.97C49.2901 3.87 49.3467 3.79 49.4067 3.73C49.4667 3.67 49.5301 3.62667 49.5967 3.6C49.6701 3.57333 49.7501 3.55667 49.8367 3.55C49.9234 3.54333 50.0267 3.54 50.1467 3.54H52.1767ZM61.063 17.27C61.743 17.27 62.3496 17.1533 62.883 16.92C63.423 16.68 63.8796 16.35 64.253 15.93C64.6263 15.51 64.9096 15.0167 65.103 14.45C65.303 13.8767 65.403 13.26 65.403 12.6V3.85H66.423V12.6C66.423 13.38 66.2996 14.11 66.053 14.79C65.8063 15.4633 65.4496 16.0533 64.983 16.56C64.523 17.06 63.9596 17.4533 63.293 17.74C62.633 18.0267 61.8896 18.17 61.063 18.17C60.2363 18.17 59.4896 18.0267 58.823 17.74C58.163 17.4533 57.5996 17.06 57.133 16.56C56.673 16.0533 56.3196 15.4633 56.073 14.79C55.8263 14.11 55.703 13.38 55.703 12.6V3.85H56.733V12.59C56.733 13.25 56.8296 13.8667 57.023 14.44C57.223 15.0067 57.5063 15.5 57.873 15.92C58.2463 16.34 58.6996 16.67 59.233 16.91C59.773 17.15 60.383 17.27 61.063 17.27ZM71.4442 18H70.4142V3.85H71.4442V18Z",fill:"currentColor"})]})},oi=function(){return fr("svg",{viewBox:"0 0 24 24",fill:"currentColor",children:fr("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"})})},ai=function(){return fr("svg",{viewBox:"0 0 24 24",fill:"currentColor",children:fr("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"})})},ui=function(){return fr("svg",{viewBox:"0 0 24 24",fill:"currentColor",children:fr("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"})})},li=function(){return fr("svg",{viewBox:"0 0 24 24",fill:"currentColor",children:fr("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"})})},ci=function(){return fr("svg",{viewBox:"0 0 24 24",fill:"currentColor",children:fr("path",{d:"M1 21h22L12 2 1 21zm12-3h-2v-2h2v2zm0-4h-2v-4h2v4z"})})},si=function(){return fr("svg",{viewBox:"0 0 24 24",fill:"currentColor",children:fr("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"})})},fi=function(){return fr("svg",{viewBox:"0 0 24 24",fill:"currentColor",children:fr("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"})})},di=function(){return fr("svg",{viewBox:"0 0 24 24",fill:"currentColor",children:fr("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"})})},hi=function(){return fr("svg",{viewBox:"0 0 24 24",fill:"currentColor",children:fr("path",{d:"M7.41 8.59 12 13.17l4.59-4.58L18 10l-6 6-6-6 1.41-1.41z"})})},pi=function(){return fr("svg",{viewBox:"0 0 24 24",fill:"currentColor",children:fr("path",{d:"m12 8-6 6 1.41 1.41L12 10.83l4.59 4.58L18 14z"})})},vi=function(){return fr("svg",{viewBox:"0 0 24 24",fill:"currentColor",children:fr("path",{d:"m7 10 5 5 5-5z"})})},mi=function(){return fr("svg",{viewBox:"0 0 24 24",fill:"currentColor",children:[fr("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"}),fr("path",{d:"M12.5 7H11v6l5.25 3.15.75-1.23-4.5-2.67z"})]})},yi=function(){return fr("svg",{viewBox:"0 0 24 24",fill:"currentColor",children:fr("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"})})},gi=function(){return fr("svg",{viewBox:"0 0 24 24",fill:"currentColor",children:fr("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"})})},_i=function(){return fr("svg",{viewBox:"0 0 24 24",fill:"currentColor",children:fr("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"})})},bi=function(){return fr("svg",{viewBox:"0 0 24 24",fill:"currentColor",children:fr("path",{d:"M8 5v14l11-7z"})})},Di=function(){return fr("svg",{viewBox:"0 0 24 24",fill:"currentColor",children:fr("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"})})},wi=function(){return fr("svg",{viewBox:"0 0 24 24",fill:"currentColor",children:fr("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"})})},xi=function(){return fr("svg",{viewBox:"0 0 24 24",fill:"currentColor",children:fr("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"})})},ki=function(){return fr("svg",{viewBox:"0 0 24 24",fill:"currentColor",children:fr("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"})})},Ci=function(){return fr("svg",{viewBox:"0 0 24 24",fill:"currentColor",children:fr("path",{d:"M6 19c0 1.1.9 2 2 2h8c1.1 0 2-.9 2-2V7H6v12zM19 4h-3.5l-1-1h-5l-1 1H5v2h14V4z"})})},Ei=function(){return fr("svg",{viewBox:"0 0 24 24",fill:"currentColor",children:fr("path",{d:"M19 13h-6v6h-2v-6H5v-2h6V5h2v6h6v2z"})})},Ai=function(){return fr("svg",{viewBox:"0 0 24 24",fill:"currentColor",children:fr("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"})})},Si=function(){return fr("svg",{viewBox:"0 0 24 24",fill:"currentColor",children:fr("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"})})},Fi=function(){return fr("svg",{viewBox:"0 0 24 24",fill:"currentColor",children:fr("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"})})},Ni=function(){return fr("svg",{viewBox:"0 0 24 24",fill:"currentColor",children:fr("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"})})},Oi=n(123),Ti=n.n(Oi),Bi=function(e){return getComputedStyle(document.documentElement).getPropertyValue("--".concat(e))},Mi=function(e,t){document.documentElement.style.setProperty("--".concat(e),t)},Li=function(e){var t=e.activeItem,n=e.items,r=e.color,i=void 0===r?Bi("color-primary"):r,o=e.onChange,a=e.indicatorPlacement,u=void 0===a?"bottom":a,l=re(null),c=_t(X({left:0,width:0,bottom:0}),2),s=c[0],f=c[1];return te((function(){if(l.current){var e=l.current,t=e.offsetLeft,n=e.offsetWidth,r=e.offsetHeight;f({left:t,width:n,bottom:"top"===u?r-2:0})}}),[t,l,n]),fr("div",{className:"vm-tabs",children:[n.map((function(e){return fr("div",{className:Ti()(qn({"vm-tabs-item":!0,"vm-tabs-item_active":t===e.value},e.className||"",e.className)),ref:t===e.value?l:void 0,style:{color:i},onClick:(n=e.value,function(){o(n)}),children:[e.icon&&fr("div",{className:Ti()({"vm-tabs-item__icon":!0,"vm-tabs-item__icon_single":!e.label}),children:e.icon}),e.label]},e.value);var n})),fr("div",{className:"vm-tabs__indicator",style:Kn(Kn({},s),{},{borderColor:i})})]})},Pi=[{value:"chart",icon:fr(wi,{}),label:"Graph",prometheusCode:0},{value:"code",icon:fr(ki,{}),label:"JSON",prometheusCode:3},{value:"table",icon:fr(xi,{}),label:"Table",prometheusCode:1}],$i=function(){var e=Hi().displayType,t=Yi();return fr(Li,{activeItem:e,items:Pi,onChange:function(n){var r;t({type:"SET_DISPLAY_TYPE",payload:null!==(r=n)&&void 0!==r?r:e})}})},Ri=ur("g0.tab",0),Ii=Pi.find((function(e){return e.prometheusCode===+Ri||e.value===Ri})),ji={displayType:(null===Ii||void 0===Ii?void 0:Ii.value)||"chart",nocache:Jr("NO_CACHE")||!1,isTracingEnabled:Jr("QUERY_TRACING")||!1};function zi(e,t){switch(t.type){case"SET_DISPLAY_TYPE":return Kn(Kn({},e),{},{displayType:t.payload});case"TOGGLE_QUERY_TRACING":return Gr("QUERY_TRACING",!e.isTracingEnabled),Kn(Kn({},e),{},{isTracingEnabled:!e.isTracingEnabled});case"TOGGLE_NO_CACHE":return Gr("NO_CACHE",!e.nocache),Kn(Kn({},e),{},{nocache:!e.nocache});default:throw new Error}}var Ui=I({}),Hi=function(){return ue(Ui).state},Yi=function(){return ue(Ui).dispatch},Vi={customStep:parseFloat(ur("g0.step_input","0")),yaxis:{limits:{enable:!1,range:{1:[0,0]}}}};function qi(e,t){switch(t.type){case"TOGGLE_ENABLE_YAXIS_LIMITS":return Kn(Kn({},e),{},{yaxis:Kn(Kn({},e.yaxis),{},{limits:Kn(Kn({},e.yaxis.limits),{},{enable:!e.yaxis.limits.enable})})});case"SET_CUSTOM_STEP":return Kn(Kn({},e),{},{customStep:t.payload});case"SET_YAXIS_LIMITS":return Kn(Kn({},e),{},{yaxis:Kn(Kn({},e.yaxis),{},{limits:Kn(Kn({},e.yaxis.limits),{},{range:t.payload})})});default:throw new Error}}var Wi=I({}),Qi=function(){return ue(Wi).dispatch},Gi={runQuery:0,topN:ur("topN",10),date:ur("date",yr()(new Date).format(wr)),focusLabel:ur("focusLabel",""),match:ur("match",""),extraLabel:ur("extra_label","")};function Ji(e,t){switch(t.type){case"SET_TOP_N":return Kn(Kn({},e),{},{topN:t.payload});case"SET_DATE":return Kn(Kn({},e),{},{date:t.payload});case"SET_MATCH":return Kn(Kn({},e),{},{match:t.payload});case"SET_EXTRA_LABEL":return Kn(Kn({},e),{},{extraLabel:t.payload});case"SET_FOCUS_LABEL":return Kn(Kn({},e),{},{focusLabel:t.payload});case"RUN_QUERY":return Kn(Kn({},e),{},{runQuery:e.runQuery+1});default:throw new Error}}var Zi=I({}),Ki=function(){return ue(Zi).state},Xi=function(){return ue(Zi).dispatch},eo={topN:ur("topN",null),maxLifetime:ur("maxLifetime",""),runQuery:0};function to(e,t){switch(t.type){case"SET_TOP_N":return Kn(Kn({},e),{},{topN:t.payload});case"SET_MAX_LIFE_TIME":return Kn(Kn({},e),{},{maxLifetime:t.payload});case"SET_RUN_QUERY":return Kn(Kn({},e),{},{runQuery:e.runQuery+1});default:throw new Error}}var no,ro=I({}),io=function(){return ue(ro).state},oo={success:fr(fi,{}),error:fr(si,{}),warning:fr(ci,{}),info:fr(li,{})},ao=function(e){var t=e.variant,n=e.children;return fr("div",{className:Ti()(qn({"vm-alert":!0},"vm-alert_".concat(t),t)),children:[fr("div",{className:"vm-alert__icon",children:oo[t||"info"]}),fr("div",{className:"vm-alert__content",children:n})]})},uo=I({showInfoMessage:function(){}}),lo=function(){return ue(uo)},co=function(){for(var e=arguments.length,t=new Array(e),n=0;nd,v=r.top-20<0,m=r.left+g.width+20>f,y=r.left-20<0;return h&&(r.top=t.top-g.height-u),v&&(r.top=t.height+t.top+u),m&&(r.left=t.right-g.width-l),y&&(r.left=t.left+l),r}),[n,i,p,t]);d&&fo(b,(function(){return v(!1)}),n);var x=Ti()(qn({"vm-popper":!0,"vm-popper_open":p},"vm-popper_open_".concat(l),l));return fr(m,{children:p&&mt.createPortal(fr("div",{className:x,ref:b,style:w,children:t}),document.body)})},po=function(e){var t=e.children,n=e.title,r=e.open,i=e.placement,o=void 0===i?"bottom-center":i,a=e.offset,u=void 0===a?{top:6,left:0}:a,l=_t(X(!1),2),c=l[0],s=l[1],f=_t(X({width:0,height:0}),2),d=f[0],h=f[1],p=re(null),v=re(null),y=function(){return s(!1)};te((function(){return window.addEventListener("scroll",y),function(){window.removeEventListener("scroll",y)}}),[]),te((function(){v.current&&c&&h({width:v.current.clientWidth,height:v.current.clientHeight})}),[c]);var g=oe((function(){var e,t=null===p||void 0===p||null===(e=p.current)||void 0===e?void 0:e.base;if(!t||!c)return{};var n=t.getBoundingClientRect(),r={top:0,left:0},i="bottom-right"===o||"top-right"===o,a="bottom-left"===o||"top-left"===o,l=null===o||void 0===o?void 0:o.includes("top"),s=(null===u||void 0===u?void 0:u.top)||0,f=(null===u||void 0===u?void 0:u.left)||0;r.left=n.left-(d.width-n.width)/2+f,r.top=n.height+n.top+s,i&&(r.left=n.right-d.width),a&&(r.left=n.left+f),l&&(r.top=n.top-d.height-s);var h=window,v=h.innerWidth,m=h.innerHeight,y=r.top+d.height+20>m,g=r.top-20<0,_=r.left+d.width+20>v,b=r.left-20<0;return y&&(r.top=n.top-d.height-s),g&&(r.top=n.height+n.top+s),_&&(r.left=n.right-d.width-f),b&&(r.left=n.left+f),r.top<0&&(r.top=20),r.left<0&&(r.left=20),r}),[p,o,c,d]),_=function(){"boolean"!==typeof r&&s(!0)},b=function(){s(!1)};return te((function(){"boolean"===typeof r&&s(r)}),[r]),te((function(){var e,t=null===p||void 0===p||null===(e=p.current)||void 0===e?void 0:e.base;if(t)return t.addEventListener("mouseenter",_),t.addEventListener("mouseleave",b),function(){t.removeEventListener("mouseenter",_),t.removeEventListener("mouseleave",b)}}),[p]),fr(m,{children:[fr(m,{ref:p,children:t}),c&&mt.createPortal(fr("div",{className:"vm-tooltip",ref:v,style:g,children:n}),document.body)]})},vo=[{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"}],mo=function(){var e=Qr(),t=er(),n=_t(X(!1),2),r=n[0],i=n[1],o=_t(X(vo[0]),2),a=o[0],u=o[1];te((function(){var t,n=a.seconds;return r?t=setInterval((function(){e({type:"RUN_QUERY"})}),1e3*n):u(vo[0]),function(){t&&clearInterval(t)}}),[a,r]);var l=_t(X(!1),2),c=l[0],s=l[1],f=re(null),d=function(e){return function(){!function(e){(r&&!e.seconds||!r&&e.seconds)&&i((function(e){return!e})),u(e),s(!1)}(e)}};return fr(m,{children:[fr("div",{className:"vm-execution-controls",children:fr("div",{className:Ti()({"vm-execution-controls-buttons":!0,"vm-header-button":!t}),children:[fr(po,{title:"Refresh dashboard",children:fr(so,{variant:"contained",color:"primary",onClick:function(){e({type:"RUN_QUERY"})},startIcon:fr(di,{})})}),fr(po,{title:"Auto-refresh control",children:fr("div",{ref:f,children:fr(so,{variant:"contained",color:"primary",fullWidth:!0,endIcon:fr("div",{className:Ti()({"vm-execution-controls-buttons__arrow":!0,"vm-execution-controls-buttons__arrow_open":c}),children:fr(hi,{})}),onClick:function(){s((function(e){return!e}))},children:a.title})})})]})}),fr(ho,{open:c,placement:"bottom-right",onClose:function(){s(!1)},buttonRef:f,children:fr("div",{className:"vm-execution-controls-list",children:vo.map((function(e){return fr("div",{className:Ti()({"vm-list__item":!0,"vm-list__item_active":e.seconds===a.seconds}),onClick:d(e),children:e.title},e.seconds)}))})})]})},yo=function(e){var t=e.relativeTime,n=e.setDuration;return fr("div",{className:"vm-time-duration",children:$r.map((function(e){var r,i=e.id,o=e.duration,a=e.until,u=e.title;return fr("div",{className:Ti()({"vm-list__item":!0,"vm-list__item_active":i===t}),onClick:(r={duration:o,until:a(),id:i},function(){n(r)}),children:u||o},i)}))})},go=function(e){var t=_t(X({width:0,height:0}),2),n=t[0],r=t[1];return te((function(){var t=new ResizeObserver((function(e){var t=e[0].contentRect,n=t.width,i=t.height;r({width:n,height:i})}));return e&&t.observe(e),function(){e&&t.unobserve(e)}}),[]),n},_o=function(e){var t=e.viewDate,n=e.displayYears,r=e.onChangeViewDate;return fr("div",{className:"vm-calendar-header",children:[fr("div",{className:"vm-calendar-header-left",onClick:e.toggleDisplayYears,children:[fr("span",{className:"vm-calendar-header-left__date",children:t.format("MMMM YYYY")}),fr("div",{className:"vm-calendar-header-left__select-year",children:fr(vi,{})})]}),!n&&fr("div",{className:"vm-calendar-header-right",children:[fr("div",{className:"vm-calendar-header-right__prev",onClick:function(){r(t.subtract(1,"month"))},children:fr(hi,{})}),fr("div",{className:"vm-calendar-header-right__next",onClick:function(){r(t.add(1,"month"))},children:fr(hi,{})})]})]})},bo=["Sunday","Monday","Tuesday","Wednesday","Thursday","Friday","Saturday"],Do=function(e){var t=e.viewDate,n=e.selectDate,r=e.onChangeSelectDate,i=yr()().startOf("day"),o=oe((function(){var e=new Array(42).fill(null),n=t.startOf("month"),r=t.endOf("month").diff(n,"day")+1,i=new Array(r).fill(n).map((function(e,t){return e.add(t,"day")})),o=n.day();return e.splice.apply(e,[o,r].concat(bt(i))),e}),[t]),a=function(e){return function(){e&&r(e)}};return fr("div",{className:"vm-calendar-body",children:[bo.map((function(e){return fr("div",{className:"vm-calendar-body-cell vm-calendar-body-cell_weekday",children:e[0]},e)})),o.map((function(e,t){return fr("div",{className:Ti()({"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.toISOString())===n.startOf("day").toISOString(),"vm-calendar-body-cell_day_today":(e&&e.toISOString())===i.toISOString()}),onClick:a(e),children:e&&e.format("D")},e?e.toISOString():t)}))]})},wo=function(e){var t=e.viewDate,n=e.onChangeViewDate,r=oe((function(){return t.format("YYYY")}),[t]),i=oe((function(){var e=yr()().subtract(103,"year");return new Array(206).fill(e).map((function(e,t){return e.add(t,"year")}))}),[t]);te((function(){var e=document.getElementById("vm-calendar-year-".concat(r));e&&e.scrollIntoView({block:"center"})}),[]);return fr("div",{className:"vm-calendar-years",children:i.map((function(e){return fr("div",{className:Ti()({"vm-calendar-years__year":!0,"vm-calendar-years__year_selected":e.format("YYYY")===r}),id:"vm-calendar-year-".concat(e.format("YYYY")),onClick:(t=e,function(){n(t)}),children:e.format("YYYY")},e.format("YYYY"));var t}))})};!function(e){e[e.hour=0]="hour",e[e.minutes=1]="minutes",e[e.seconds=2]="seconds"}(no||(no={}));var xo,ko=function(e){var t=e.selectDate,n=e.onChangeTime,r=e.onClose,i=_t(X(no.hour),2),o=i[0],a=i[1],u=_t(X(t.format("HH")),2),l=u[0],c=u[1],s=_t(X(t.format("mm")),2),f=s[0],d=s[1],h=_t(X(t.format("ss")),2),p=h[0],v=h[1],m=oe((function(){return o===no.hour?new Array(24).fill("00").map((function(e,t){return{value:t,degrees:t/12*360,offset:0===t||t>12,title:t?"".concat(t):e}})):new Array(60).fill("00").map((function(e,t){return{value:t,degrees:t/60*360,offset:!1,title:t?"".concat(t):e}}))}),[o,l,f,p]),y=oe((function(){switch(o){case no.hour:return+l/12*360;case no.minutes:return+f/60*360;case no.seconds:return+p/60*360}}),[o,l,f,p]),g=re(null),_=re(null),b=re(null),D=function(e){return function(t){!function(e,t){t.target.select(),a(e)}(e,t)}};return te((function(){n("".concat(l,":").concat(f,":").concat(p))}),[l,f,p]),te((function(){c(t.format("HH")),d(t.format("mm")),v(t.format("ss"))}),[t]),te((function(){g.current&&g.current.focus()}),[]),fr("div",{className:"vm-calendar-time-picker",children:[fr("div",{className:"vm-calendar-time-picker-clock",children:[fr("div",{className:Ti()({"vm-calendar-time-picker-clock__arrow":!0,"vm-calendar-time-picker-clock__arrow_offset":o===no.hour&&("00"===l||+l>12)}),style:{transform:"rotate(".concat(y,"deg)")}}),m.map((function(e){return fr("div",{className:Ti()({"vm-calendar-time-picker-clock__time":!0,"vm-calendar-time-picker-clock__time_offset":e.offset,"vm-calendar-time-picker-clock__time_hide":m.length>24&&e.value%5}),style:{transform:"rotate(".concat(e.degrees,"deg)")},onClick:(t=e.value,function(){var e=String(t);switch(o){case no.hour:c(e),_.current&&_.current.focus();break;case no.minutes:d(e),b.current&&b.current.focus();break;case no.seconds:v(e),r()}}),children:fr("span",{style:{transform:"rotate(-".concat(e.degrees,"deg)")},children:e.title})},e.value);var t}))]}),fr("div",{className:"vm-calendar-time-picker-fields",children:[fr("input",{className:"vm-calendar-time-picker-fields__input",value:l,onChange:function(e){var t=e.target,n=t.value,r=+n>23?"23":n;t.value=r,c(r),n.length>1&&_.current&&_.current.focus()},onFocus:D(no.hour),ref:g,type:"number",min:0,max:24}),fr("span",{children:":"}),fr("input",{className:"vm-calendar-time-picker-fields__input",value:f,onChange:function(e){var t=e.target,n=t.value,r=+n>59?"59":n;t.value=r,d(r),n.length>1&&b.current&&b.current.focus()},onFocus:D(no.minutes),ref:_,type:"number",min:0,max:60}),fr("span",{children:":"}),fr("input",{className:"vm-calendar-time-picker-fields__input",value:p,onChange:function(e){var t=e.target,n=t.value,i=+n>59?"59":n;t.value=i,v(i),n.length>1&&b.current&&r()},onFocus:D(no.seconds),ref:b,type:"number",min:0,max:60})]})]})},Co=[{value:"date",icon:fr(yi,{})},{value:"time",icon:fr(mi,{})}],Eo=function(e){var t=e.date,n=e.timepicker,r=void 0!==n&&n,i=e.format,o=void 0===i?xr:i,a=e.onChange,u=e.onClose,l=_t(X(!1),2),c=l[0],s=l[1],f=_t(X(yr()(t)),2),d=f[0],h=f[1],p=_t(X(yr()(t)),2),v=p[0],y=p[1],g=_t(X(Co[0].value),2),_=g[0],b=g[1],D=function(e){h(e),s(!1)};return te((function(){v.format()!==yr()(t).format()&&a(v.format(o))}),[v]),fr("div",{className:"vm-calendar",children:["date"===_&&fr(_o,{viewDate:d,onChangeViewDate:D,toggleDisplayYears:function(){s((function(e){return!e}))},displayYears:c}),"date"===_&&fr(m,{children:[!c&&fr(Do,{viewDate:d,selectDate:v,onChangeSelectDate:function(e){y(e),r&&b("time")}}),c&&fr(wo,{viewDate:d,onChangeViewDate:D})]}),"time"===_&&fr(ko,{selectDate:v,onChangeTime:function(e){var t=_t(e.split(":"),3),n=t[0],r=t[1],i=t[2];y((function(e){return e.set("hour",+n).set("minute",+r).set("second",+i)}))},onClose:function(){u&&u()}}),r&&fr("div",{className:"vm-calendar__tabs",children:fr(Li,{activeItem:_,items:Co,onChange:function(e){b(e)},indicatorPlacement:"top"})})]})},Ao=Ce((function(e,t){var n=e.date,r=e.targetRef,i=e.format,o=void 0===i?xr:i,a=e.timepicker,u=e.onChange,l=_t(X(!1),2),c=l[0],s=l[1],f=oe((function(){return n?yr()(n):yr()()}),[n]),d=function(){s((function(e){return!e}))},h=function(){s(!1)},p=function(e){"Escape"!==e.key&&"Enter"!==e.key||h()};return te((function(){var e;return null===(e=r.current)||void 0===e||e.addEventListener("click",d),function(){var e;null===(e=r.current)||void 0===e||e.removeEventListener("click",d)}}),[r]),te((function(){return window.addEventListener("keyup",p),function(){window.removeEventListener("keyup",p)}}),[]),fr(m,{children:fr(ho,{open:c,buttonRef:r,placement:"bottom-right",onClose:h,children:fr("div",{ref:t,children:fr(Eo,{date:f,format:o,timepicker:a,onChange:function(e){a||h(),u(e)},onClose:h})})})})})),So=Ao,Fo=function(){var e=re(null),t=go(document.body),n=oe((function(){return t.width>1120}),[t]),r=_t(X(),2),i=r[0],o=r[1],a=_t(X(),2),u=a[0],l=a[1],c=oe((function(){return yr()(u).format(xr)}),[u]),s=oe((function(){return yr()(i).format(xr)}),[i]),f=Wr(),d=f.period,h=d.end,p=d.start,v=f.relativeTime,y=Qr(),g=er();te((function(){o(Mr(Pr(h)))}),[h]),te((function(){l(Mr(Pr(p)))}),[p]);var _=oe((function(){return{start:yr()(Pr(p)).format(xr),end:yr()(Pr(h)).format(xr)}}),[p,h]),b=oe((function(){return v&&"none"!==v?v.replace(/_/g," "):"".concat(_.start," - ").concat(_.end)}),[v,_]),D=re(null),w=re(null),x=re(null),k=re(null),C=_t(X(!1),2),E=C[0],A=C[1],S=re(null),F=function(){A(!1)};return fo(e,(function(e){var t,n,r=e.target,i=(null===D||void 0===D?void 0:D.current)&&D.current.contains(r),o=(null===w||void 0===w?void 0:w.current)&&w.current.contains(r),a=(null===x||void 0===x?void 0:x.current)&&(null===x||void 0===x||null===(t=x.current)||void 0===t?void 0:t.contains(r)),u=(null===k||void 0===k?void 0:k.current)&&(null===k||void 0===k||null===(n=k.current)||void 0===n?void 0:n.contains(r));i||o||a||u||F()})),fr(m,{children:[fr("div",{ref:S,children:fr(po,{title:"Time range controls",children:fr(so,{className:g?"":"vm-header-button",variant:"contained",color:"primary",startIcon:fr(mi,{}),onClick:function(){A((function(e){return!e}))},children:n&&fr("span",{children:b})})})}),fr(ho,{open:E,buttonRef:S,placement:"bottom-right",onClose:F,clickOutside:!1,children:fr("div",{className:"vm-time-selector",ref:e,children:[fr("div",{className:"vm-time-selector-left",children:[fr("div",{className:"vm-time-selector-left-inputs",children:[fr("div",{className:"vm-time-selector-left-inputs__date",ref:D,children:[fr("label",{children:"From:"}),fr("span",{children:c}),fr(yi,{}),fr(So,{ref:x,date:u||"",onChange:function(e){return l(e)},targetRef:D,timepicker:!0})]}),fr("div",{className:"vm-time-selector-left-inputs__date",ref:w,children:[fr("label",{children:"To:"}),fr("span",{children:s}),fr(yi,{}),fr(So,{ref:k,date:i||"",onChange:function(e){return o(e)},targetRef:w,timepicker:!0})]})]}),fr(so,{variant:"text",startIcon:fr(gi,{}),onClick:function(){return y({type:"RUN_QUERY_TO_NOW"})},children:"switch to now"}),fr("div",{className:"vm-time-selector-left__controls",children:[fr(so,{color:"error",variant:"outlined",onClick:function(){o(Mr(Pr(h))),l(Mr(Pr(p))),A(!1)},children:"Cancel"}),fr(so,{color:"primary",onClick:function(){return u&&i&&y({type:"SET_PERIOD",payload:{from:new Date(u),to:new Date(i)}}),void A(!1)},children:"Apply"})]})]}),fr(yo,{relativeTime:v||"",setDuration:function(e){var t=e.duration,n=e.until,r=e.id;y({type:"SET_RELATIVE_TIME",payload:{duration:t,until:n,id:r}}),A(!1)}})]})})]})};!function(e){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"}(xo||(xo={}));var No=function(e){var t=e.label,n=e.value,r=e.type,i=void 0===r?"text":r,o=e.error,a=void 0===o?"":o,u=e.endIcon,l=e.startIcon,c=e.disabled,s=void 0!==c&&c,f=e.autofocus,d=void 0!==f&&f,h=e.helperText,p=e.onChange,v=e.onEnter,m=e.onKeyDown,y=re(null),g=re(null),_=oe((function(){return"textarea"===i?g:y}),[i]),b=Ti()({"vm-text-field__input":!0,"vm-text-field__input_error":a,"vm-text-field__input_icon-start":l,"vm-text-field__input_disabled":s,"vm-text-field__input_textarea":"textarea"===i}),D=function(e){m&&m(e),"Enter"!==e.key||e.shiftKey||(e.preventDefault(),v&&v())},w=function(e){s||p&&p(e.target.value)};return te((function(){var e;d&&(null===_||void 0===_||null===(e=_.current)||void 0===e?void 0:e.focus)&&_.current.focus()}),[_,d]),fr("label",{className:Ti()({"vm-text-field":!0,"vm-text-field_textarea":"textarea"===i}),"data-replicated-value":n,children:[l&&fr("div",{className:"vm-text-field__icon-start",children:l}),u&&fr("div",{className:"vm-text-field__icon-end",children:u}),"textarea"===i?fr("textarea",{className:b,disabled:s,ref:g,value:n,onInput:w,onKeyDown:D,rows:1}):fr("input",{className:b,disabled:s,ref:y,value:n,onInput:w,onKeyDown:D,type:i}),t&&fr("span",{className:"vm-text-field__label",children:t}),fr("span",{className:"vm-text-field__error","data-show":!!a,children:a}),h&&!a&&fr("span",{className:"vm-text-field__helper-text",children:h})]})},Oo=function(e){var t;try{t=new URL(e)}catch(g){return!1}return"http:"===t.protocol||"https:"===t.protocol},To=function(e){var t=e.setServer,n=e.onEnter,r=hr().serverUrl,i=_t(X(""),2),o=i[0],a=i[1],u=_t(X(r),2),l=u[0],c=u[1];return fr(No,{autofocus:!0,label:"Server URL",value:l,error:o,onChange:function(e){var n=e||"";c(n),t(n),a(""),n||a(xo.emptyServer),Oo(n)||a(xo.validServer)},onEnter:function(){n(l)}})},Bo=function(e){var t=e.title,n=e.children,r=e.onClose,i=function(e){"Escape"===e.key&&r()};return te((function(){return window.addEventListener("keyup",i),function(){window.removeEventListener("keyup",i)}}),[]),mt.createPortal(fr("div",{className:"vm-modal",onMouseDown:r,children:fr("div",{className:"vm-modal-content",children:[fr("div",{className:"vm-modal-content-header",children:[t&&fr("div",{className:"vm-modal-content-header__title",children:t}),fr("div",{className:"vm-modal-header__close",children:fr(so,{variant:"text",size:"small",onClick:r,children:fr(ai,{})})})]}),fr("div",{className:"vm-modal-content-body",onMouseDown:function(e){e.stopPropagation()},children:n})]})}),document.body)},Mo="Setting Server URL",Lo=function(){var e=hr().serverUrl,t=pr(),n=_t(X(e),2),r=n[0],i=n[1],o=function(e){t({type:"SET_SERVER",payload:e||r}),c()},a=_t(X(!1),2),u=a[0],l=a[1],c=function(){return l(!1)};return fr(m,{children:[fr(po,{title:Mo,children:fr(so,{className:"vm-header-button",variant:"contained",color:"primary",startIcon:fr(oi,{}),onClick:function(){return l(!0)}})}),u&&fr(Bo,{title:Mo,onClose:c,children:fr("div",{className:"vm-server-configurator",children:[fr("div",{className:"vm-server-configurator__input",children:fr(To,{setServer:i,onEnter:o})}),fr("div",{className:"vm-server-configurator__footer",children:[fr(so,{variant:"outlined",color:"error",onClick:c,children:"Cancel"}),fr(so,{variant:"contained",onClick:function(){o()},children:"apply"})]})]})})]})},Po={windows:"Windows",mac:"Mac OS",linux:"Linux"},$o=(Object.values(Po).find((function(e){return navigator.userAgent.indexOf(e)>=0}))||"unknown")===Po.mac?"Cmd":"Ctrl",Ro=[{title:"Query",list:[{keys:["Enter"],description:"Run"},{keys:["Shift","Enter"],description:"Multi-line queries"},{keys:[$o,"Arrow Up"],description:"Previous command from the Query history"},{keys:[$o,"Arrow Down"],description:"Next command from the Query history"}]},{title:"Graph",list:[{keys:[$o,"Scroll Up"],description:"Zoom in"},{keys:[$o,"Scroll Down"],description:"Zoom out"},{keys:[$o,"Click and Drag"],description:"Move the graph left/right"}]},{title:"Legend",list:[{keys:["Mouse Click"],description:"Select series"},{keys:[$o,"Mouse Click"],description:"Toggle multiple series"}]}],Io=function(){var e=_t(X(!1),2),t=e[0],n=e[1],r=er();return fr(m,{children:[fr(po,{title:"Shortcut keys",placement:"bottom-center",children:fr(so,{className:r?"":"vm-header-button",variant:"contained",color:"primary",startIcon:fr(_i,{}),onClick:function(){n(!0)}})}),t&&fr(Bo,{title:"Shortcut keys",onClose:function(){n(!1)},children:fr("div",{className:"vm-shortcuts",children:Ro.map((function(e){return fr("div",{className:"vm-shortcuts-section",children:[fr("h3",{className:"vm-shortcuts-section__title",children:e.title}),fr("div",{className:"vm-shortcuts-section-list",children:e.list.map((function(e){return fr("div",{className:"vm-shortcuts-section-list-item",children:[fr("div",{className:"vm-shortcuts-section-list-item__key",children:e.keys.map((function(t,n){return fr(m,{children:[fr("code",{children:t},t),n!==e.keys.length-1?"+":""]})}))}),fr("p",{className:"vm-shortcuts-section-list-item__description",children:e.description})]},e.keys.join("+"))}))})]},e.title)}))})})]})},jo=function(){var e=er(),t=re(null),n=Ki().date,r=Xi(),i=oe((function(){return yr()(n).format(wr)}),[n]);return fr("div",{children:[fr("div",{ref:t,children:fr(po,{title:"Date control",children:fr(so,{className:e?"":"vm-header-button",variant:"contained",color:"primary",startIcon:fr(yi,{}),children:i})})}),fr(So,{date:n||"",format:wr,onChange:function(e){r({type:"SET_DATE",payload:e})},targetRef:t})]})},zo=function(){var e=Bi("color-primary"),t=er(),n=Xn().headerStyles,r=(n=void 0===n?{}:n).background,i=void 0===r?t?"#FFF":e:r,o=n.color,a=void 0===o?t?e:"#FFF":o,u=An(),l=En(),c=l.search,s=l.pathname,f=oe((function(){return[{label:"Custom panel",value:Jn.home},{label:"Dashboards",value:Jn.dashboards,hide:t},{label:"Cardinality",value:Jn.cardinality},{label:"Top queries",value:Jn.topQueries},{label:"Trace analyzer",value:Jn.trace}]}),[t]),d=_t(X(s),2),h=d[0],p=d[1],v=oe((function(){return(Gn[s]||{}).header||{}}),[s]),m=function(e){u({pathname:e,search:c})};return te((function(){p(s)}),[s]),fr("header",{className:Ti()({"vm-header":!0,"vm-header_app":t}),style:{background:i,color:a},children:[!t&&fr("div",{className:"vm-header-logo",style:{color:a},children:[fr("div",{className:"vm-header-logo__icon",onClick:function(){m(Jn.home),ar({}),window.location.reload()},children:fr(ii,{})}),fr("a",{className:"vm-header-logo__issue",target:"_blank",href:"https://github.com/VictoriaMetrics/VictoriaMetrics/issues/new",rel:"noreferrer",children:"create an issue"})]}),fr("div",{className:"vm-header-nav",children:fr(Li,{activeItem:h,items:f.filter((function(e){return!e.hide})),color:a,onChange:function(e){p(e),u(e)}})}),fr("div",{className:"vm-header__settings",children:[(null===v||void 0===v?void 0:v.timeSelector)&&fr(Fo,{}),(null===v||void 0===v?void 0:v.cardinalityDatePicker)&&fr(jo,{}),(null===v||void 0===v?void 0:v.executionControls)&&fr(mo,{}),(null===v||void 0===v?void 0:v.globalSettings)&&!t&&fr(Lo,{}),fr(Io,{})]})]})},Uo=function(){var e=er();return fr("section",{className:"vm-container",children:[fr(zo,{}),fr("div",{className:Ti()({"vm-container-body":!0,"vm-container-body_app":e}),children:fr($n,{})})]})};function Ho(e,t){var n="undefined"!==typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(!n){if(Array.isArray(e)||(n=gt(e))||t&&e&&"number"===typeof e.length){n&&(e=n);var r=0,i=function(){};return{s:i,n:function(){return r>=e.length?{done:!0}:{done:!1,value:e[r++]}},e:function(e){throw e},f:i}}throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}var o,a=!0,u=!1;return{s:function(){n=n.call(e)},n:function(){var e=n.next();return a=e.done,e},e:function(e){u=!0,o=e},f:function(){try{a||null==n.return||n.return()}finally{if(u)throw o}}}}var Yo,Vo,qo="u-off",Wo="u-label",Qo="width",Go="height",Jo="top",Zo="bottom",Ko="left",Xo="right",ea="#000",ta="#0000",na="mousemove",ra="mousedown",ia="mouseup",oa="mouseenter",aa="mouseleave",ua="dblclick",la="change",ca="dppxchange",sa="undefined"!=typeof window,fa=sa?document:null,da=sa?window:null,ha=sa?navigator:null;function pa(e,t){if(null!=t){var n=e.classList;!n.contains(t)&&n.add(t)}}function va(e,t){var n=e.classList;n.contains(t)&&n.remove(t)}function ma(e,t,n){e.style[t]=n+"px"}function ya(e,t,n,r){var i=fa.createElement(e);return null!=t&&pa(i,t),null!=n&&n.insertBefore(i,r),i}function ga(e,t){return ya("div",e,t)}var _a=new WeakMap;function ba(e,t,n,r,i){var o="translate("+t+"px,"+n+"px)";o!=_a.get(e)&&(e.style.transform=o,_a.set(e,o),t<0||n<0||t>r||n>i?pa(e,qo):va(e,qo))}var Da=new WeakMap;function wa(e,t,n){var r=t+n;r!=Da.get(e)&&(Da.set(e,r),e.style.background=t,e.style.borderColor=n)}var xa=new WeakMap;function ka(e,t,n,r){var i=t+""+n;i!=xa.get(e)&&(xa.set(e,i),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)}var Ca={passive:!0},Ea=Kn(Kn({},Ca),{},{capture:!0});function Aa(e,t,n,r){t.addEventListener(e,n,r?Ea:Ca)}function Sa(e,t,n,r){t.removeEventListener(e,n,r?Ea:Ca)}function Fa(e,t,n,r){var i;n=n||0;for(var o=(r=r||t.length-1)<=2147483647;r-n>1;)t[i=o?n+r>>1:Qa((n+r)/2)]=t&&i<=n;i+=r)if(null!=e[i])return i;return-1}function Oa(e,t,n,r){var i=iu,o=-iu;if(1==r)i=e[t],o=e[n];else if(-1==r)i=e[n],o=e[t];else for(var a=t;a<=n;a++)null!=e[a]&&(i=Za(i,e[a]),o=Ka(o,e[a]));return[i,o]}function Ta(e,t,n){for(var r=iu,i=-iu,o=t;o<=n;o++)e[o]>0&&(r=Za(r,e[o]),i=Ka(i,e[o]));return[r==iu?1:r,i==-iu?10:i]}sa&&function e(){var t=devicePixelRatio;Yo!=t&&(Yo=t,Vo&&Sa(la,Vo,e),Vo=matchMedia("(min-resolution: ".concat(Yo-.001,"dppx) and (max-resolution: ").concat(Yo+.001,"dppx)")),Aa(la,Vo,e),da.dispatchEvent(new CustomEvent(ca)))}();var Ba=[0,0];function Ma(e,t,n,r){return Ba[0]=n<0?mu(e,-n):e,Ba[1]=r<0?mu(t,-r):t,Ba}function La(e,t,n,r){var i,o,a,u=eu(e),l=10==n?tu:nu;return e==t&&(-1==u?(e*=n,t/=n):(e/=n,t*=n)),r?(i=Qa(l(e)),o=Ja(l(t)),e=(a=Ma(Xa(n,i),Xa(n,o),i,o))[0],t=a[1]):(i=Qa(l(Wa(e))),o=Qa(l(Wa(t))),e=vu(e,(a=Ma(Xa(n,i),Xa(n,o),i,o))[0]),t=pu(t,a[1])),[e,t]}function Pa(e,t,n,r){var i=La(e,t,n,r);return 0==e&&(i[0]=0),0==t&&(i[1]=0),i}var $a={mode:3,pad:.1},Ra={pad:0,soft:null,mode:0},Ia={min:Ra,max:Ra};function ja(e,t,n,r){return Cu(n)?Ua(e,t,n):(Ra.pad=n,Ra.soft=r?0:null,Ra.mode=r?3:0,Ua(e,t,Ia))}function za(e,t){return null==e?t:e}function Ua(e,t,n){var r=n.min,i=n.max,o=za(r.pad,0),a=za(i.pad,0),u=za(r.hard,-iu),l=za(i.hard,iu),c=za(r.soft,iu),s=za(i.soft,-iu),f=za(r.mode,0),d=za(i.mode,0),h=t-e;h<1e-9&&(h=0,0!=e&&0!=t||(h=1e-9,2==f&&c!=iu&&(o=0),2==d&&s!=-iu&&(a=0)));var p=h||Wa(t)||1e3,v=tu(p),m=Xa(10,Qa(v)),y=mu(vu(e-p*(0==h?0==e?.1:1:o),m/10),9),g=e>=c&&(1==f||3==f&&y<=c||2==f&&y>=c)?c:iu,_=Ka(u,y=g?g:Za(g,y)),b=mu(pu(t+p*(0==h?0==t?.1:1:a),m/10),9),D=t<=s&&(1==d||3==d&&b>=s||2==d&&b<=s)?s:-iu,w=Za(l,b>D&&t<=D?D:Ka(D,b));return _==w&&0==_&&(w=100),[_,w]}var Ha=new Intl.NumberFormat(sa?ha.language:"en-US"),Ya=function(e){return Ha.format(e)},Va=Math,qa=Va.PI,Wa=Va.abs,Qa=Va.floor,Ga=Va.round,Ja=Va.ceil,Za=Va.min,Ka=Va.max,Xa=Va.pow,eu=Va.sign,tu=Va.log10,nu=Va.log2,ru=function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:1;return Va.asinh(e/t)},iu=1/0;function ou(e){return 1+(0|tu((e^e>>31)-(e>>31)))}function au(e,t){return Ga(e/t)*t}function uu(e,t,n){return Za(Ka(e,t),n)}function lu(e){return"function"==typeof e?e:function(){return e}}var cu=function(e){return e},su=function(e,t){return t},fu=function(e){return null},du=function(e){return!0},hu=function(e,t){return e==t};function pu(e,t){return Ja(e/t)*t}function vu(e,t){return Qa(e/t)*t}function mu(e,t){return Ga(e*(t=Math.pow(10,t)))/t}var yu=new Map;function gu(e){return((""+e).split(".")[1]||"").length}function _u(e,t,n,r){for(var i=[],o=r.map(gu),a=t;a=0&&a>=0?0:u)+(a>=o[c]?0:o[c]),d=mu(s,f);i.push(d),yu.set(d,f)}return i}var bu={},Du=[],wu=[null,null],xu=Array.isArray;function ku(e){return"string"==typeof e}function Cu(e){var t=!1;if(null!=e){var n=e.constructor;t=null==n||n==Object}return t}function Eu(e){return null!=e&&"object"==typeof e}var Au=Object.getPrototypeOf(Uint8Array);function Su(e){var t,n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:Cu;if(xu(e)){var r=e.find((function(e){return null!=e}));if(xu(r)||n(r)){t=Array(e.length);for(var i=0;io){for(r=a-1;r>=0&&null==e[r];)e[r--]=null;for(r=a+1;r12?t-12:t},AA:function(e){return e.getHours()>=12?"PM":"AM"},aa:function(e){return e.getHours()>=12?"pm":"am"},a:function(e){return e.getHours()>=12?"p":"a"},mm:function(e){return Ru(e.getMinutes())},m:function(e){return e.getMinutes()},ss:function(e){return Ru(e.getSeconds())},s:function(e){return e.getSeconds()},fff:function(e){return((t=e.getMilliseconds())<10?"00":t<100?"0":"")+t;var t}};function ju(e,t){t=t||$u;for(var n,r=[],i=/\{([a-z]+)\}|[^{]+/gi;n=i.exec(e);)r.push("{"==n[0][0]?Iu[n[1]]:n[0]);return function(e){for(var n="",i=0;i=a,v=f>=o&&f=i?i:f,N=_+(Qa(c)-Qa(y))+pu(y-_,F);h.push(N);for(var O=t(N),T=O.getHours()+O.getMinutes()/n+O.getSeconds()/r,B=f/r,M=d/u.axes[l]._space;!((N=mu(N+f,1==e?0:3))>s);)if(B>1){var L=Qa(mu(T+B,6))%24,P=t(N).getHours()-L;P>1&&(P=-1),T=(T+B)%24,mu(((N-=P*r)-h[h.length-1])/f,3)*M>=.7&&h.push(N)}else h.push(N)}return h}}]}var ol=_t(il(1),3),al=ol[0],ul=ol[1],ll=ol[2],cl=_t(il(.001),3),sl=cl[0],fl=cl[1],dl=cl[2];function hl(e,t){return e.map((function(e){return e.map((function(n,r){return 0==r||8==r||null==n?n:t(1==r||0==e[8]?n:e[1]+n)}))}))}function pl(e,t){return function(n,r,i,o,a){var u,l,c,s,f,d,h=t.find((function(e){return a>=e[0]}))||t[t.length-1];return r.map((function(t){var n=e(t),r=n.getFullYear(),i=n.getMonth(),o=n.getDate(),a=n.getHours(),p=n.getMinutes(),v=n.getSeconds(),m=r!=u&&h[2]||i!=l&&h[3]||o!=c&&h[4]||a!=s&&h[5]||p!=f&&h[6]||v!=d&&h[7]||h[1];return u=r,l=i,c=o,s=a,f=p,d=v,m(n)}))}}function vl(e,t,n){return new Date(e,t,n)}function ml(e,t){return t(e)}_u(2,-53,53,[1]);function yl(e,t){return function(n,r){return t(e(r))}}var gl={show:!0,live:!0,isolate:!1,markers:{show:!0,width:2,stroke:function(e,t){var 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:[]};var _l=[0,0];function bl(e,t,n){return function(e){0==e.button&&n(e)}}function Dl(e,t,n){return n}var wl={show:!0,x:!0,y:!0,lock:!1,move:function(e,t,n){return _l[0]=t,_l[1]=n,_l},points:{show:function(e,t){var n=e.cursor.points,r=ga(),i=n.size(e,t);ma(r,Qo,i),ma(r,Go,i);var o=i/-2;ma(r,"marginLeft",o),ma(r,"marginTop",o);var a=n.width(e,t,i);return a&&ma(r,"borderWidth",a),r},size:function(e,t){return Ul(e.series[t].points.width,1)},width:0,stroke:function(e,t){var n=e.series[t].points;return n._stroke||n._fill},fill:function(e,t){var n=e.series[t].points;return n._fill||n._stroke}},bind:{mousedown:bl,mouseup:bl,click:bl,dblclick:bl,mousemove:Dl,mouseleave:Dl,mouseenter:Dl},drag:{setScale:!0,x:!0,y:!1,dist:0,uni:null,_x:!1,_y:!1},focus:{prox:-1},left:-10,top:-10,idx:null,dataIdx:function(e,t,n){return n},idxs:null},xl={show:!0,stroke:"rgba(0,0,0,0.07)",width:2},kl=Fu({},xl,{filter:su}),Cl=Fu({},kl,{size:10}),El=Fu({},xl,{show:!1}),Al='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"',Sl="bold "+Al,Fl={show:!0,scale:"x",stroke:ea,space:50,gap:5,size:50,labelGap:0,labelSize:30,labelFont:Sl,side:2,grid:kl,ticks:Cl,border:El,font:Al,rotate:0},Nl={show:!0,scale:"x",auto:!1,sorted:1,min:iu,max:-iu,idxs:[]};function Ol(e,t,n,r,i){return t.map((function(e){return null==e?"":Ya(e)}))}function Tl(e,t,n,r,i,o,a){for(var u=[],l=yu.get(i)||0,c=n=a?n:mu(pu(n,i),l);c<=r;c=mu(c+i,l))u.push(Object.is(c,-0)?0:c);return u}function Bl(e,t,n,r,i,o,a){var u=[],l=e.scales[e.axes[t].scale].log,c=Qa((10==l?tu:nu)(n));i=Xa(l,c),c<0&&(i=mu(i,-c));var s=n;do{u.push(s),(s=mu(s+i,yu.get(i)))>=i*l&&(i=s)}while(s<=r);return u}function Ml(e,t,n,r,i,o,a){var u=e.scales[e.axes[t].scale].asinh,l=r>u?Bl(e,t,Ka(u,n),r,i):[u],c=r>=0&&n<=0?[0]:[];return(n<-u?Bl(e,t,Ka(u,-r),-n,i):[u]).reverse().map((function(e){return-e})).concat(c,l)}var Ll=/./,Pl=/[12357]/,$l=/[125]/,Rl=/1/;function Il(e,t,n,r,i){var o=e.axes[n],a=o.scale,u=e.scales[a];if(3==u.distr&&2==u.log)return t;var l=e.valToPos,c=o._space,s=l(10,a),f=l(9,a)-s>=c?Ll:l(7,a)-s>=c?Pl:l(5,a)-s>=c?$l:Rl;return t.map((function(e){return 4==u.distr&&0==e||f.test(e)?e:null}))}function jl(e,t){return null==t?"":Ya(t)}var zl={show:!0,scale:"y",stroke:ea,space:30,gap:5,size:50,labelGap:0,labelSize:30,labelFont:Sl,side:3,grid:kl,ticks:Cl,border:El,font:Al,rotate:0};function Ul(e,t){return mu((3+2*(e||1))*t,3)}var Hl={scale:null,auto:!0,sorted:0,min:iu,max:-iu},Yl={show:!0,auto:!0,sorted:0,alpha:1,facets:[Fu({},Hl,{scale:"x"}),Fu({},Hl,{scale:"y"})]},Vl={scale:"y",auto:!0,sorted:0,show:!0,spanGaps:!1,gaps:function(e,t,n,r,i){return i},alpha:1,points:{show:function(e,t){var n=e.series[0],r=n.scale,i=n.idxs,o=e._data[0],a=e.valToPos(o[i[0]],r,!0),u=e.valToPos(o[i[1]],r,!0),l=Wa(u-a)/(e.series[t].points.space*Yo);return i[1]-i[0]<=l},filter:null},values:null,min:iu,max:-iu,idxs:[],path:null,clip:null};function ql(e,t,n,r,i){return n/10}var Wl={time:!0,auto:!0,distr:1,log:10,asinh:1,min:null,max:null,dir:1,ori:0},Ql=Fu({},Wl,{time:!1,ori:1}),Gl={};function Jl(e,t){var n=Gl[e];return n||(n={key:e,plots:[],sub:function(e){n.plots.push(e)},unsub:function(e){n.plots=n.plots.filter((function(t){return t!=e}))},pub:function(e,t,r,i,o,a,u){for(var l=0;l0){a=new Path2D;for(var u=0==t?cc:sc,l=n,c=0;cs[0]){var f=s[0]-l;f>0&&u(a,l,r,f,r+o),l=s[1]}}var d=n+i-l;d>0&&u(a,l,r,d,r+o)}return a}function nc(e,t,n,r,i,o,a){for(var u=[],l=1==i?n:r;l>=n&&l<=r;l+=i){if(null===t[l]){var c=l,s=l;if(1==i)for(;++l<=r&&null===t[l];)s=l;else for(;--l>=n&&null===t[l];)s=l;var f=o(e[c]),d=s==c?f:o(e[s]);f=a<=0?o(e[c-i]):f,(d=a>=0?o(e[s+i]):d)>=f&&u.push([f,d])}}return u}function rc(e){return 0==e?cu:1==e?Ga:function(t){return au(t,e)}}function ic(e){var t=0==e?oc:ac,n=0==e?function(e,t,n,r,i,o){e.arcTo(t,n,r,i,o)}:function(e,t,n,r,i,o){e.arcTo(n,t,i,r,o)},r=0==e?function(e,t,n,r,i){e.rect(t,n,r,i)}:function(e,t,n,r,i){e.rect(n,t,i,r)};return function(e,i,o,a,u){var l=arguments.length>5&&void 0!==arguments[5]?arguments[5]:0;0==l?r(e,i,o,a,u):(l=Za(l,a/2,u/2),t(e,i+l,o),n(e,i+a,o,i+a,o+u,l),n(e,i+a,o+u,i,o+u,l),n(e,i,o+u,i,o,l),n(e,i,o,i+a,o,l),e.closePath())}}var oc=function(e,t,n){e.moveTo(t,n)},ac=function(e,t,n){e.moveTo(n,t)},uc=function(e,t,n){e.lineTo(t,n)},lc=function(e,t,n){e.lineTo(n,t)},cc=ic(0),sc=ic(1),fc=function(e,t,n,r,i,o){e.arc(t,n,r,i,o)},dc=function(e,t,n,r,i,o){e.arc(n,t,r,i,o)},hc=function(e,t,n,r,i,o,a){e.bezierCurveTo(t,n,r,i,o,a)},pc=function(e,t,n,r,i,o,a){e.bezierCurveTo(n,t,i,r,a,o)};function vc(e){return function(e,t,n,r,i){return Zl(e,t,(function(t,o,a,u,l,c,s,f,d,h,p){var v,m,y=t.pxRound,g=t.points;0==u.ori?(v=oc,m=fc):(v=ac,m=dc);var _=mu(g.width*Yo,3),b=(g.size-g.width)/2*Yo,D=mu(2*b,3),w=new Path2D,x=new Path2D,k=e.bbox,C=k.left,E=k.top,A=k.width,S=k.height;cc(x,C-D,E-D,A+2*D,S+2*D);var F=function(e){if(null!=a[e]){var t=y(c(o[e],u,h,f)),n=y(s(a[e],l,p,d));v(w,t+b,n),m(w,t,n,b,0,2*qa)}};if(i)i.forEach(F);else for(var N=n;N<=r;N++)F(N);return{stroke:_>0?w:null,fill:w,clip:x,flags:3}}))}}function mc(e){return function(t,n,r,i,o,a){r!=i&&(o!=r&&a!=r&&e(t,n,r),o!=i&&a!=i&&e(t,n,i),e(t,n,a))}}var yc=mc(uc),gc=mc(lc);function _c(e){var t=za(null===e||void 0===e?void 0:e.alignGaps,0);return function(e,n,r,i){return Zl(e,n,(function(o,a,u,l,c,s,f,d,h,p,v){var m,y,g=o.pxRound,_=function(e){return g(s(e,l,p,d))},b=function(e){return g(f(e,c,v,h))};0==l.ori?(m=uc,y=yc):(m=lc,y=gc);for(var D,w,x,k=l.dir*(0==l.ori?1:-1),C={stroke:new Path2D,fill:null,clip:null,band:null,gaps:null,flags:1},E=C.stroke,A=iu,S=-iu,F=_(a[1==k?r:i]),N=Na(u,r,i,1*k),O=Na(u,r,i,-1*k),T=_(a[N]),B=_(a[O]),M=1==k?r:i;M>=r&&M<=i;M+=k){var L=_(a[M]);L==F?null!=u[M]&&(w=b(u[M]),A==iu&&(m(E,L,w),D=w),A=Za(w,A),S=Ka(w,S)):(A!=iu&&(y(E,F,A,S,D,w),x=F),null!=u[M]?(m(E,L,w=b(u[M])),A=S=D=w):(A=iu,S=-iu),F=L)}A!=iu&&A!=S&&x!=F&&y(E,F,A,S,D,w);var P=_t(Kl(e,n),2),$=P[0],R=P[1];if(null!=o.fill||0!=$){var I=C.fill=new Path2D(E),j=b(o.fillTo(e,n,o.min,o.max,$));m(I,B,j),m(I,T,j)}if(!o.spanGaps){var z,U=[];(z=U).push.apply(z,bt(nc(a,u,r,i,k,_,t))),C.gaps=U=o.gaps(e,n,r,i,U),C.clip=tc(U,l.ori,d,h,p,v)}return 0!=R&&(C.band=2==R?[ec(e,n,r,i,E,-1),ec(e,n,r,i,E,1)]:ec(e,n,r,i,E,R)),C}))}}function bc(e,t,n,r,i,o){var a=e.length;if(a<2)return null;var u=new Path2D;if(n(u,e[0],t[0]),2==a)r(u,e[1],t[1]);else{for(var l=Array(a),c=Array(a-1),s=Array(a-1),f=Array(a-1),d=0;d0!==c[h]>0?l[h]=0:(l[h]=3*(f[h-1]+f[h])/((2*f[h]+f[h-1])/c[h-1]+(f[h]+2*f[h-1])/c[h]),isFinite(l[h])||(l[h]=0));l[a-1]=c[a-2];for(var p=0;p=i&&o+(l<5?yu.get(l):0)<=17)return[l,c]}while(++u0?e:t.clamp(r,e,t.min,t.max,t.key)):4==t.distr?ru(e,t.asinh):e)-t._min)/(t._max-t._min)}function a(e,t,n,r){var i=o(e,t);return r+n*(-1==t.dir?1-i:i)}function u(e,t,n,r){var i=o(e,t);return r+n*(-1==t.dir?i:1-i)}function l(e,t,n,r){return 0==t.ori?a(e,t,n,r):u(e,t,n,r)}r.valToPosH=a,r.valToPosV=u;var c=!1;r.status=0;var s=r.root=ga("uplot");(null!=e.id&&(s.id=e.id),pa(s,e.class),e.title)&&(ga("u-title",s).textContent=e.title);var f=ya("canvas"),d=r.ctx=f.getContext("2d"),h=ga("u-wrap",s),p=r.under=ga("u-under",h);h.appendChild(f);var v=r.over=ga("u-over",h),m=+za((e=Su(e)).pxAlign,1),y=rc(m);(e.plugins||[]).forEach((function(t){t.opts&&(e=t.opts(r,e)||e)}));var g=e.ms||.001,_=r.series=1==i?Cc(e.series||[],Nl,Vl,!1):function(e,t){return e.map((function(e,n){return 0==n?null:Fu({},t,e)}))}(e.series||[null],Yl),b=r.axes=Cc(e.axes||[],Fl,zl,!0),D=r.scales={},w=r.bands=e.bands||[];w.forEach((function(e){e.fill=lu(e.fill||null),e.dir=za(e.dir,-1)}));var x=2==i?_[1].facets[0].scale:_[0].scale,k={axes:function(){for(var e=function(e){var t=b[e];if(!t.show||!t._show)return"continue";var n=t.side,i=n%2,o=void 0,a=void 0,u=t.stroke(r,e),c=0==n||3==n?-1:1;if(t.label){var s=t.labelGap*c,f=Ga((t._lpos+s)*Yo);Ze(t.labelFont[0],u,"center",2==n?Jo:Zo),d.save(),1==i?(o=a=0,d.translate(f,Ga(de+pe/2)),d.rotate((3==n?-qa:qa)/2)):(o=Ga(fe+he/2),a=f),d.fillText(t.label,o,a),d.restore()}var h=_t(t._found,2),p=h[0],v=h[1];if(0==v)return"continue";var m=D[t.scale],g=0==i?he:pe,_=0==i?fe:de,w=Ga(t.gap*Yo),x=t._splits,k=2==m.distr?x.map((function(e){return qe[e]})):x,C=2==m.distr?qe[x[1]]-qe[x[0]]:p,E=t.ticks,A=t.border,S=E.show?Ga(E.size*Yo):0,F=t._rotate*-qa/180,N=y(t._pos*Yo),O=N+(S+w)*c;a=0==i?O:0,o=1==i?O:0,Ze(t.font[0],u,1==t.align?Ko:2==t.align?Xo:F>0?Ko:F<0?Xo:0==i?"center":3==n?Xo:Ko,F||1==i?"middle":2==n?Jo:Zo);for(var T=1.5*t.font[1],B=x.map((function(e){return y(l(e,m,g,_))})),M=t._values,L=0;L0&&(_.forEach((function(e,n){if(n>0&&e.show&&null==e._paths){var i=function(e){var t=uu(He-1,0,Ne-1),n=uu(Ye+1,0,Ne-1);for(;null==e[t]&&t>0;)t--;for(;null==e[n]&&n0&&e.show){je!=e.alpha&&(d.globalAlpha=je=e.alpha),Xe(t,!1),e._paths&&et(t,!1),Xe(t,!0);var n=e.points.show(r,t,He,Ye),i=e.points.filter(r,t,n,e._paths?e._paths.gaps:null);(n||i)&&(e.points._paths=e.points.paths(r,t,He,Ye,i),et(t,!0)),1!=je&&(d.globalAlpha=je=1),on("drawSeries",t)}})))}},C=(e.drawOrder||["axes","series"]).map((function(e){return k[e]}));function E(t){var n=D[t];if(null==n){var r=(e.scales||bu)[t]||bu;if(null!=r.from)E(r.from),D[t]=Fu({},D[r.from],r,{key:t});else{(n=D[t]=Fu({},t==x?Wl:Ql,r)).key=t;var o=n.time,a=n.range,u=xu(a);if((t!=x||2==i&&!o)&&(!u||null!=a[0]&&null!=a[1]||(a={min:null==a[0]?$a:{mode:1,hard:a[0],soft:a[0]},max:null==a[1]?$a:{mode:1,hard:a[1],soft:a[1]}},u=!1),!u&&Cu(a))){var l=a;a=function(e,t,n){return null==t?wu:ja(t,n,l)}}n.range=lu(a||(o?Sc:t==x?3==n.distr?Oc:4==n.distr?Bc:Ac:3==n.distr?Nc:4==n.distr?Tc:Fc)),n.auto=lu(!u&&n.auto),n.clamp=lu(n.clamp||ql),n._min=n._max=null}}}for(var A in E("x"),E("y"),1==i&&_.forEach((function(e){E(e.scale)})),b.forEach((function(e){E(e.scale)})),e.scales)E(A);var S,F,N=D[x],O=N.distr;0==N.ori?(pa(s,"u-hz"),S=a,F=u):(pa(s,"u-vt"),S=u,F=a);var T={};for(var B in D){var M=D[B];null==M.min&&null==M.max||(T[B]={min:M.min,max:M.max},M.min=M.max=null)}var L,P=e.tzDate||function(e){return new Date(Ga(e/g))},$=e.fmtDate||ju,R=1==g?ll(P):dl(P),I=pl(P,hl(1==g?ul:fl,$)),j=yl(P,ml("{YYYY}-{MM}-{DD} {h}:{mm}{aa}",$)),z=[],U=r.legend=Fu({},gl,e.legend),H=U.show,Y=U.markers;U.idxs=z,Y.width=lu(Y.width),Y.dash=lu(Y.dash),Y.stroke=lu(Y.stroke),Y.fill=lu(Y.fill);var V,q=[],W=[],Q=!1,G={};if(U.live){var J=_[1]?_[1].values:null;for(var Z in V=(Q=null!=J)?J(r,1,0):{_:0})G[Z]="--"}if(H)if(L=ya("table","u-legend",s),Q){var K=ya("tr","u-thead",L);for(var X in ya("th",null,K),V)ya("th",Wo,K).textContent=X}else pa(L,"u-inline"),U.live&&pa(L,"u-live");var ee={show:!0},te={show:!1};var ne=new Map;function re(e,t,n){var i=ne.get(t)||{},o=we.bind[e](r,t,n);o&&(Aa(e,t,i[e]=o),ne.set(t,i))}function ie(e,t,n){var r=ne.get(t)||{};for(var i in r)null!=e&&i!=e||(Sa(i,t,r[i]),delete r[i]);null==e&&ne.delete(t)}var oe=0,ae=0,ue=0,le=0,ce=0,se=0,fe=0,de=0,he=0,pe=0;r.bbox={};var ve=!1,me=!1,ye=!1,ge=!1,_e=!1;function be(e,t,n){(n||e!=r.width||t!=r.height)&&De(e,t),ut(!1),ye=!0,me=!0,ge=_e=we.left>=0,wt()}function De(e,t){r.width=oe=ue=e,r.height=ae=le=t,ce=se=0,function(){var e=!1,t=!1,n=!1,r=!1;b.forEach((function(i,o){if(i.show&&i._show){var a=i.side,u=a%2,l=i._size+(null!=i.label?i.labelSize:0);l>0&&(u?(ue-=l,3==a?(ce+=l,r=!0):n=!0):(le-=l,0==a?(se+=l,e=!0):t=!0))}})),Se[0]=e,Se[1]=n,Se[2]=t,Se[3]=r,ue-=Ue[1]+Ue[3],ce+=Ue[3],le-=Ue[2]+Ue[0],se+=Ue[0]}(),function(){var e=ce+ue,t=se+le,n=ce,r=se;function i(i,o){switch(i){case 1:return(e+=o)-o;case 2:return(t+=o)-o;case 3:return(n-=o)+o;case 0:return(r-=o)+o}}b.forEach((function(e,t){if(e.show&&e._show){var n=e.side;e._pos=i(n,e._size),null!=e.label&&(e._lpos=i(n,e.labelSize))}}))}();var n=r.bbox;fe=n.left=au(ce*Yo,.5),de=n.top=au(se*Yo,.5),he=n.width=au(ue*Yo,.5),pe=n.height=au(le*Yo,.5)}r.setSize=function(e){be(e.width,e.height)};var we=r.cursor=Fu({},wl,{drag:{y:2==i}},e.cursor);we.idxs=z,we._lock=!1;var xe=we.points;xe.show=lu(xe.show),xe.size=lu(xe.size),xe.stroke=lu(xe.stroke),xe.width=lu(xe.width),xe.fill=lu(xe.fill);var ke=r.focus=Fu({},e.focus||{alpha:.3},we.focus),Ce=ke.prox>=0,Ee=[null];function Ae(e,t){if(1==i||t>0){var n=1==i&&D[e.scale].time,o=e.value;e.value=n?ku(o)?yl(P,ml(o,$)):o||j:o||jl,e.label=e.label||(n?"Time":"Value")}if(t>0){e.width=null==e.width?1:e.width,e.paths=e.paths||xc||fu,e.fillTo=lu(e.fillTo||Xl),e.pxAlign=+za(e.pxAlign,m),e.pxRound=rc(e.pxAlign),e.stroke=lu(e.stroke||null),e.fill=lu(e.fill||null),e._stroke=e._fill=e._paths=e._focus=null;var a=Ul(e.width,1),u=e.points=Fu({},{size:a,width:Ka(1,.2*a),stroke:e.stroke,space:2*a,paths:kc,_stroke:null,_fill:null},e.points);u.show=lu(u.show),u.filter=lu(u.filter),u.fill=lu(u.fill),u.stroke=lu(u.stroke),u.paths=lu(u.paths),u.pxAlign=e.pxAlign}if(H){var l=function(e,t){if(0==t&&(Q||!U.live||2==i))return wu;var n=[],o=ya("tr","u-series",L,L.childNodes[t]);pa(o,e.class),e.show||pa(o,qo);var a=ya("th",null,o);if(Y.show){var u=ga("u-marker",a);if(t>0){var l=Y.width(r,t);l&&(u.style.border=l+"px "+Y.dash(r,t)+" "+Y.stroke(r,t)),u.style.background=Y.fill(r,t)}}var c=ga(Wo,a);for(var s in c.textContent=e.label,t>0&&(Y.show||(c.style.color=e.width>0?Y.stroke(r,t):Y.fill(r,t)),re("click",a,(function(t){if(!we._lock){var n=_.indexOf(e);if((t.ctrlKey||t.metaKey)!=U.isolate){var r=_.some((function(e,t){return t>0&&t!=n&&e.show}));_.forEach((function(e,t){t>0&&Pt(t,r?t==n?ee:te:ee,!0,an.setSeries)}))}else Pt(n,{show:!e.show},!0,an.setSeries)}})),Ce&&re(oa,a,(function(t){we._lock||Pt(_.indexOf(e),$t,!0,an.setSeries)}))),V){var f=ya("td","u-value",o);f.textContent="--",n.push(f)}return[o,n]}(e,t);q.splice(t,0,l[0]),W.splice(t,0,l[1]),U.values.push(null)}if(we.show){z.splice(t,0,null);var c=function(e,t){if(t>0){var n=we.points.show(r,t);if(n)return pa(n,"u-cursor-pt"),pa(n,e.class),ba(n,-10,-10,ue,le),v.insertBefore(n,Ee[t]),n}}(e,t);c&&Ee.splice(t,0,c)}on("addSeries",t)}r.addSeries=function(e,t){e=Ec(e,t=null==t?_.length:t,Nl,Vl),_.splice(t,0,e),Ae(_[t],t)},r.delSeries=function(e){if(_.splice(e,1),H){U.values.splice(e,1),W.splice(e,1);var t=q.splice(e,1)[0];ie(null,t.firstChild),t.remove()}we.show&&(z.splice(e,1),Ee.length>1&&Ee.splice(e,1)[0].remove()),on("delSeries",e)};var Se=[!1,!1,!1,!1];function Fe(e,t,n,r){var i=_t(n,4),o=i[0],a=i[1],u=i[2],l=i[3],c=t%2,s=0;return 0==c&&(l||a)&&(s=0==t&&!o||2==t&&!u?Ga(Fl.size/3):0),1==c&&(o||u)&&(s=1==t&&!a||3==t&&!l?Ga(zl.size/2):0),s}var Ne,Oe,Te,Be,Me,Le,Pe,$e,Re,Ie,je,ze=r.padding=(e.padding||[Fe,Fe,Fe,Fe]).map((function(e){return lu(za(e,Fe))})),Ue=r._padding=ze.map((function(e,t){return e(r,t,Se,0)})),He=null,Ye=null,Ve=1==i?_[0].idxs:null,qe=null,We=!1;function Qe(e,n){if(t=null==e?[]:Su(e,Eu),2==i){Ne=0;for(var o=1;o<_.length;o++)Ne+=t[o][0].length;r.data=t=e}else if(null==t[0]&&(t[0]=[]),r.data=t.slice(),qe=t[0],Ne=qe.length,2==O){t[0]=Array(Ne);for(var a=0;a=0,_e=!0,wt()}}function Ge(){var e,n;if(We=!0,1==i)if(Ne>0){if(He=Ve[0]=0,Ye=Ve[1]=Ne-1,e=t[0][He],n=t[0][Ye],2==O)e=He,n=Ye;else if(1==Ne)if(3==O){var r=_t(La(e,e,N.log,!1),2);e=r[0],n=r[1]}else if(4==O){var o=_t(Pa(e,e,N.log,!1),2);e=o[0],n=o[1]}else if(N.time)n=e+Ga(86400/g);else{var a=_t(ja(e,n,.1,!0),2);e=a[0],n=a[1]}}else He=Ve[0]=e=null,Ye=Ve[1]=n=null;Lt(x,e,n)}function Je(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:ta,t=arguments.length>1?arguments[1]:void 0,n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:Du,r=arguments.length>3&&void 0!==arguments[3]?arguments[3]:"butt",i=arguments.length>4&&void 0!==arguments[4]?arguments[4]:ta,o=arguments.length>5&&void 0!==arguments[5]?arguments[5]:"round";e!=Oe&&(d.strokeStyle=Oe=e),i!=Te&&(d.fillStyle=Te=i),t!=Be&&(d.lineWidth=Be=t),o!=Le&&(d.lineJoin=Le=o),r!=Pe&&(d.lineCap=Pe=r),n!=Me&&d.setLineDash(Me=n)}function Ze(e,t,n,r){t!=Te&&(d.fillStyle=Te=t),e!=$e&&(d.font=$e=e),n!=Re&&(d.textAlign=Re=n),r!=Ie&&(d.textBaseline=Ie=r)}function Ke(e,t,n,i){var o=arguments.length>4&&void 0!==arguments[4]?arguments[4]:0;if(i.length>0&&e.auto(r,We)&&(null==t||null==t.min)){var a=za(He,0),u=za(Ye,i.length-1),l=null==n.min?3==e.distr?Ta(i,a,u):Oa(i,a,u,o):[n.min,n.max];e.min=Za(e.min,n.min=l[0]),e.max=Ka(e.max,n.max=l[1])}}function Xe(e,t){var n=t?_[e].points:_[e];n._stroke=n.stroke(r,e),n._fill=n.fill(r,e)}function et(e,n){var i=n?_[e].points:_[e],o=i._stroke,a=i._fill,u=i._paths,l=u.stroke,c=u.fill,s=u.clip,f=u.flags,h=null,p=mu(i.width*Yo,3),v=p%2/2;n&&null==a&&(a=p>0?"#fff":o);var m=1==i.pxAlign;if(m&&d.translate(v,v),!n){var y=fe,g=de,b=he,D=pe,x=p*Yo/2;0==i.min&&(D+=x),0==i.max&&(g-=x,D+=x),(h=new Path2D).rect(y,g,b,D)}n?tt(o,p,i.dash,i.cap,a,l,c,f,s):function(e,n,i,o,a,u,l,c,s,f,d){var h=!1;w.forEach((function(p,v){if(p.series[0]==e){var m,y=_[p.series[1]],g=t[p.series[1]],b=(y._paths||bu).band;xu(b)&&(b=1==p.dir?b[0]:b[1]);var D=null;y.show&&b&&function(e,t,n){for(t=za(t,0),n=za(n,e.length-1);t<=n;){if(null!=e[t])return!0;t++}return!1}(g,He,Ye)?(D=p.fill(r,v)||u,m=y._paths.clip):b=null,tt(n,i,o,a,D,l,c,s,f,d,m,b),h=!0}})),h||tt(n,i,o,a,u,l,c,s,f,d)}(e,o,p,i.dash,i.cap,a,l,c,f,h,s),m&&d.translate(-v,-v)}r.setData=Qe;function tt(e,t,n,r,i,o,a,u,l,c,s,f){Je(e,t,n,r,i),(l||c||f)&&(d.save(),l&&d.clip(l),c&&d.clip(c)),f?3==(3&u)?(d.clip(f),s&&d.clip(s),rt(i,a),nt(e,o,t)):2&u?(rt(i,a),d.clip(f),nt(e,o,t)):1&u&&(d.save(),d.clip(f),s&&d.clip(s),rt(i,a),d.restore(),nt(e,o,t)):(rt(i,a),nt(e,o,t)),(l||c||f)&&d.restore()}function nt(e,t,n){n>0&&(t instanceof Map?t.forEach((function(e,t){d.strokeStyle=Oe=t,d.stroke(e)})):null!=t&&e&&d.stroke(t))}function rt(e,t){t instanceof Map?t.forEach((function(e,t){d.fillStyle=Te=t,d.fill(e)})):null!=t&&e&&d.fill(t)}function it(e,t,n,r,i,o,a,u,l,c){var s=a%2/2;1==m&&d.translate(s,s),Je(u,a,l,c,u),d.beginPath();var f,h,p,v,y=i+(0==r||3==r?-o:o);0==n?(h=i,v=y):(f=i,p=y);for(var g=0;g0&&(t._paths=null,e&&(1==i?(t.min=null,t.max=null):t.facets.forEach((function(e){e.min=null,e.max=null}))))}))}var lt,ct,st,ft,dt,ht,pt,vt,mt,yt,gt,bt,Dt=!1;function wt(){Dt||(Ou(xt),Dt=!0)}function xt(){ve&&(!function(){var e=Su(D,Eu);for(var n in e){var o=e[n],a=T[n];if(null!=a&&null!=a.min)Fu(o,a),n==x&&ut(!0);else if(n!=x||2==i)if(0==Ne&&null==o.from){var u=o.range(r,null,null,n);o.min=u[0],o.max=u[1]}else o.min=iu,o.max=-iu}if(Ne>0)for(var l in _.forEach((function(n,o){if(1==i){var a=n.scale,u=e[a],l=T[a];if(0==o){var c=u.range(r,u.min,u.max,a);u.min=c[0],u.max=c[1],He=Fa(u.min,t[0]),Ye=Fa(u.max,t[0]),t[0][He]u.max&&Ye--,n.min=qe[He],n.max=qe[Ye]}else n.show&&n.auto&&Ke(u,l,n,t[o],n.sorted);n.idxs[0]=He,n.idxs[1]=Ye}else if(o>0&&n.show&&n.auto){var s=_t(n.facets,2),f=s[0],d=s[1],h=f.scale,p=d.scale,v=_t(t[o],2),m=v[0],y=v[1];Ke(e[h],T[h],f,m,f.sorted),Ke(e[p],T[p],d,y,d.sorted),n.min=d.min,n.max=d.max}})),e){var c=e[l],s=T[l];if(null==c.from&&(null==s||null==s.min)){var f=c.range(r,c.min==iu?null:c.min,c.max==-iu?null:c.max,l);c.min=f[0],c.max=f[1]}}for(var d in e){var h=e[d];if(null!=h.from){var p=e[h.from];if(null==p.min)h.min=h.max=null;else{var v=h.range(r,p.min,p.max,d);h.min=v[0],h.max=v[1]}}}var m={},y=!1;for(var g in e){var b=e[g],w=D[g];if(w.min!=b.min||w.max!=b.max){w.min=b.min,w.max=b.max;var k=w.distr;w._min=3==k?tu(w.min):4==k?ru(w.min,w.asinh):w.min,w._max=3==k?tu(w.max):4==k?ru(w.max,w.asinh):w.max,m[g]=y=!0}}if(y){for(var C in _.forEach((function(e,t){2==i?t>0&&m.y&&(e._paths=null):m[e.scale]&&(e._paths=null)})),m)ye=!0,on("setScale",C);we.show&&(ge=_e=we.left>=0)}for(var E in T)T[E]=null}(),ve=!1),ye&&(!function(){for(var e=!1,t=0;!e;){var n=ot(++t),i=at(t);(e=3==t||n&&i)||(De(r.width,r.height),me=!0)}}(),ye=!1),me&&(ma(p,Ko,ce),ma(p,Jo,se),ma(p,Qo,ue),ma(p,Go,le),ma(v,Ko,ce),ma(v,Jo,se),ma(v,Qo,ue),ma(v,Go,le),ma(h,Qo,oe),ma(h,Go,ae),f.width=Ga(oe*Yo),f.height=Ga(ae*Yo),b.forEach((function(e){var t=e._el,n=e._show,r=e._size,i=e._pos,o=e.side;if(null!=t)if(n){var a=o%2==1;ma(t,a?"left":"top",i-(3===o||0===o?r:0)),ma(t,a?"width":"height",r),ma(t,a?"top":"left",a?se:ce),ma(t,a?"height":"width",a?le:ue),va(t,qo)}else pa(t,qo)})),Oe=Te=Be=Le=Pe=$e=Re=Ie=Me=null,je=1,Wt(!0),on("setSize"),me=!1),oe>0&&ae>0&&(d.clearRect(0,0,f.width,f.height),on("drawClear"),C.forEach((function(e){return e()})),on("draw")),we.show&&ge&&(Vt(null,!0,!1),ge=!1),c||(c=!0,r.status=1,on("ready")),We=!1,Dt=!1}function kt(e,n){var i=D[e];if(null==i.from){if(0==Ne){var o=i.range(r,n.min,n.max,e);n.min=o[0],n.max=o[1]}if(n.min>n.max){var a=n.min;n.min=n.max,n.max=a}if(Ne>1&&null!=n.min&&null!=n.max&&n.max-n.min<1e-16)return;e==x&&2==i.distr&&Ne>0&&(n.min=Fa(n.min,t[0]),n.max=Fa(n.max,t[0]),n.min==n.max&&n.max++),T[e]=n,ve=!0,wt()}}r.redraw=function(e,t){ye=t||!1,!1!==e?Lt(x,N.min,N.max):wt()},r.setScale=kt;var Ct=!1,Et=we.drag,At=Et.x,St=Et.y;we.show&&(we.x&&(lt=ga("u-cursor-x",v)),we.y&&(ct=ga("u-cursor-y",v)),0==N.ori?(st=lt,ft=ct):(st=ct,ft=lt),gt=we.left,bt=we.top);var Ft,Nt,Ot,Tt=r.select=Fu({show:!0,over:!0,left:0,width:0,top:0,height:0},e.select),Bt=Tt.show?ga("u-select",Tt.over?v:p):null;function Mt(e,t){if(Tt.show){for(var n in e)ma(Bt,n,Tt[n]=e[n]);!1!==t&&on("setSelect")}}function Lt(e,t,n){kt(e,{min:t,max:n})}function Pt(e,t,n,o){null!=t.focus&&function(e){if(e!=Ot){var t=null==e,n=1!=ke.alpha;_.forEach((function(r,i){var o=t||0==i||i==e;r._focus=t?null:o,n&&function(e,t){_[e].alpha=t,we.show&&Ee[e]&&(Ee[e].style.opacity=t);H&&q[e]&&(q[e].style.opacity=t)}(i,o?1:ke.alpha)})),Ot=e,n&&wt()}}(e),null!=t.show&&_.forEach((function(n,r){r>0&&(e==r||null==e)&&(n.show=t.show,function(e,t){var n=_[e],r=H?q[e]:null;n.show?r&&va(r,qo):(r&&pa(r,qo),Ee.length>1&&ba(Ee[e],-10,-10,ue,le))}(r,t.show),Lt(2==i?n.facets[1].scale:n.scale,null,null),wt())})),!1!==n&&on("setSeries",e,t),o&&cn("setSeries",r,e,t)}r.setSelect=Mt,r.setSeries=Pt,r.addBand=function(e,t){e.fill=lu(e.fill||null),e.dir=za(e.dir,-1),t=null==t?w.length:t,w.splice(t,0,e)},r.setBand=function(e,t){Fu(w[e],t)},r.delBand=function(e){null==e?w.length=0:w.splice(e,1)};var $t={focus:!0};function Rt(e,t,n){var r=D[t];n&&(e=e/Yo-(1==r.ori?se:ce));var i=ue;1==r.ori&&(e=(i=le)-e),-1==r.dir&&(e=i-e);var o=r._min,a=o+(r._max-o)*(e/i),u=r.distr;return 3==u?Xa(10,a):4==u?function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:1;return Va.sinh(e)*t}(a,r.asinh):a}function It(e,t){ma(Bt,Ko,Tt.left=e),ma(Bt,Qo,Tt.width=t)}function jt(e,t){ma(Bt,Jo,Tt.top=e),ma(Bt,Go,Tt.height=t)}H&&Ce&&Aa(aa,L,(function(e){we._lock||null!=Ot&&Pt(null,$t,!0,an.setSeries)})),r.valToIdx=function(e){return Fa(e,t[0])},r.posToIdx=function(e,n){return Fa(Rt(e,x,n),t[0],He,Ye)},r.posToVal=Rt,r.valToPos=function(e,t,n){return 0==D[t].ori?a(e,D[t],n?he:ue,n?fe:0):u(e,D[t],n?pe:le,n?de:0)},r.batch=function(e){e(r),wt()},r.setCursor=function(e,t,n){gt=e.left,bt=e.top,Vt(null,t,n)};var zt=0==N.ori?It:jt,Ut=1==N.ori?It:jt;function Ht(e,t){if(null!=e){var n=e.idx;U.idx=n,_.forEach((function(e,t){(t>0||!Q)&&Yt(t,n)}))}H&&U.live&&function(){if(H&&U.live)for(var e=2==i?1:0;e<_.length;e++)if(0!=e||!Q){var t=U.values[e],n=0;for(var r in t)W[e][n++].firstChild.nodeValue=t[r]}}(),_e=!1,!1!==t&&on("setLegend")}function Yt(e,n){var i;if(null==n)i=G;else{var o=_[e],a=0==e&&2==O?qe:t[e];i=Q?o.values(r,e,n):{_:o.value(r,a[n],e,n)}}U.values[e]=i}function Vt(e,n,o){mt=gt,yt=bt;var a,u=_t(we.move(r,gt,bt),2);gt=u[0],bt=u[1],we.show&&(st&&ba(st,Ga(gt),0,ue,le),ft&&ba(ft,0,Ga(bt),ue,le));var l=He>Ye;Ft=iu;var s=0==N.ori?ue:le,f=1==N.ori?ue:le;if(gt<0||0==Ne||l){a=null;for(var d=0;d<_.length;d++)d>0&&Ee.length>1&&ba(Ee[d],-10,-10,ue,le);if(Ce&&Pt(null,$t,!0,null==e&&an.setSeries),U.live){z.fill(null),_e=!0;for(var h=0;h<_.length;h++)U.values[h]=G}}else{var p,v;1==i&&(a=Fa(p=Rt(0==N.ori?gt:bt,x),t[0],He,Ye),v=pu(S(t[0][a],N,s,0),.5));for(var m=2==i?1:0;m<_.length;m++){var y=_[m],g=z[m],b=1==i?t[m][g]:t[m][1][g],w=we.dataIdx(r,m,a,p),k=1==i?t[m][w]:t[m][1][w];_e=_e||k!=b||w!=g,z[m]=w;var C=w==a?v:pu(S(1==i?t[0][w]:t[m][0][w],N,s,0),.5);if(m>0&&y.show){var E=null==k?-10:pu(F(k,1==i?D[y.scale]:D[y.facets[1].scale],f,0),.5);if(E>0&&1==i){var A=Wa(E-bt);A<=Ft&&(Ft=A,Nt=m)}var O=void 0,T=void 0;if(0==N.ori?(O=C,T=E):(O=E,T=C),_e&&Ee.length>1){wa(Ee[m],we.points.fill(r,m),we.points.stroke(r,m));var B=void 0,M=void 0,L=void 0,P=void 0,$=!0,R=we.points.bbox;if(null!=R){$=!1;var I=R(r,m);L=I.left,P=I.top,B=I.width,M=I.height}else L=O,P=T,B=M=we.points.size(r,m);ka(Ee[m],B,M,$),ba(Ee[m],L,P,ue,le)}}if(U.live){if(!_e||0==m&&Q)continue;Yt(m,w)}}}if(we.idx=a,we.left=gt,we.top=bt,_e&&(U.idx=a,Ht()),Tt.show&&Ct)if(null!=e){var j=_t(an.scales,2),H=j[0],Y=j[1],V=_t(an.match,2),q=V[0],W=V[1],J=_t(e.cursor.sync.scales,2),Z=J[0],K=J[1],X=e.cursor.drag;if(At=X._x,St=X._y,At||St){var ee,te,ne,re,ie,oe=e.select,ae=oe.left,ce=oe.top,se=oe.width,fe=oe.height,de=e.scales[H].ori,he=e.posToVal,pe=null!=H&&q(H,Z),ve=null!=Y&&W(Y,K);pe&&At?(0==de?(ee=ae,te=se):(ee=ce,te=fe),ne=D[H],re=S(he(ee,Z),ne,s,0),ie=S(he(ee+te,Z),ne,s,0),zt(Za(re,ie),Wa(ie-re))):zt(0,s),ve&&St?(1==de?(ee=ae,te=se):(ee=ce,te=fe),ne=D[Y],re=F(he(ee,K),ne,f,0),ie=F(he(ee+te,K),ne,f,0),Ut(Za(re,ie),Wa(ie-re))):Ut(0,f)}else Zt()}else{var me=Wa(mt-dt),ye=Wa(yt-ht);if(1==N.ori){var ge=me;me=ye,ye=ge}At=Et.x&&me>=Et.dist,St=Et.y&&ye>=Et.dist;var be,De,xe=Et.uni;null!=xe?At&&St&&(St=ye>=xe,(At=me>=xe)||St||(ye>me?St=!0:At=!0)):Et.x&&Et.y&&(At||St)&&(At=St=!0),At&&(0==N.ori?(be=pt,De=gt):(be=vt,De=bt),zt(Za(be,De),Wa(De-be)),St||Ut(0,f)),St&&(1==N.ori?(be=pt,De=gt):(be=vt,De=bt),Ut(Za(be,De),Wa(De-be)),At||zt(0,s)),At||St||(zt(0,0),Ut(0,0))}if(Et._x=At,Et._y=St,null==e){if(o){if(null!=un){var Ae=_t(an.scales,2),Se=Ae[0],Fe=Ae[1];an.values[0]=null!=Se?Rt(0==N.ori?gt:bt,Se):null,an.values[1]=null!=Fe?Rt(1==N.ori?gt:bt,Fe):null}cn(na,r,gt,bt,ue,le,a)}if(Ce){var Oe=o&&an.setSeries,Te=ke.prox;null==Ot?Ft<=Te&&Pt(Nt,$t,!0,Oe):Ft>Te?Pt(null,$t,!0,Oe):Nt!=Ot&&Pt(Nt,$t,!0,Oe)}}c&&!1!==n&&on("setCursor")}r.setLegend=Ht;var qt=null;function Wt(e){!0===e?qt=null:on("syncRect",qt=v.getBoundingClientRect())}function Qt(e,t,n,r,i,o,a){we._lock||(Gt(e,t,n,r,i,o,a,!1,null!=e),null!=e?Vt(null,!0,!0):Vt(t,!0,!1))}function Gt(e,t,n,i,o,a,u,c,s){if(null==qt&&Wt(!1),null!=e)n=e.clientX-qt.left,i=e.clientY-qt.top;else{if(n<0||i<0)return gt=-10,void(bt=-10);var f=_t(an.scales,2),d=f[0],h=f[1],p=t.cursor.sync,v=_t(p.values,2),m=v[0],y=v[1],g=_t(p.scales,2),_=g[0],b=g[1],w=_t(an.match,2),x=w[0],k=w[1],C=t.axes[0].side%2==1,E=0==N.ori?ue:le,A=1==N.ori?ue:le,S=C?a:o,F=C?o:a,O=C?i:n,T=C?n:i;if(n=null!=_?x(d,_)?l(m,D[d],E,0):-10:E*(O/S),i=null!=b?k(h,b)?l(y,D[h],A,0):-10:A*(T/F),1==N.ori){var B=n;n=i,i=B}}if(s&&((n<=1||n>=ue-1)&&(n=au(n,ue)),(i<=1||i>=le-1)&&(i=au(i,le))),c){dt=n,ht=i;var M=_t(we.move(r,n,i),2);pt=M[0],vt=M[1]}else gt=n,bt=i}var Jt={width:0,height:0};function Zt(){Mt(Jt,!1)}function Kt(e,t,n,i,o,a,u){Ct=!0,At=St=Et._x=Et._y=!1,Gt(e,t,n,i,o,a,0,!0,!1),null!=e&&(re(ia,fa,Xt),cn(ra,r,pt,vt,ue,le,null))}function Xt(e,t,n,i,o,a,u){Ct=Et._x=Et._y=!1,Gt(e,t,n,i,o,a,0,!1,!0);var l=Tt.left,c=Tt.top,s=Tt.width,f=Tt.height,d=s>0||f>0;if(d&&Mt(Tt),Et.setScale&&d){var h=l,p=s,v=c,m=f;if(1==N.ori&&(h=c,p=f,v=l,m=s),At&&Lt(x,Rt(h,x),Rt(h+p,x)),St)for(var y in D){var g=D[y];y!=x&&null==g.from&&g.min!=iu&&Lt(y,Rt(v+m,y),Rt(v,y))}Zt()}else we.lock&&(we._lock=!we._lock,we._lock||Vt(null,!0,!1));null!=e&&(ie(ia,fa),cn(ia,r,gt,bt,ue,le,null))}function en(e,t,n,i,o,a,u){Ge(),Zt(),null!=e&&cn(ua,r,gt,bt,ue,le,null)}function tn(){b.forEach(Pc),be(r.width,r.height,!0)}Aa(ca,da,tn);var nn={};nn.mousedown=Kt,nn.mousemove=Qt,nn.mouseup=Xt,nn.dblclick=en,nn.setSeries=function(e,t,n,r){Pt(n,r,!0,!1)},we.show&&(re(ra,v,Kt),re(na,v,Qt),re(oa,v,Wt),re(aa,v,(function(e,t,n,r,i,o,a){if(!we._lock){var u=Ct;if(Ct){var l,c,s=!0,f=!0;0==N.ori?(l=At,c=St):(l=St,c=At),l&&c&&(s=gt<=10||gt>=ue-10,f=bt<=10||bt>=le-10),l&&s&&(gt=gt=3?Il:su)),e.font=Lc(e.font),e.labelFont=Lc(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&&(Se[t]=!0,e._el=ga("u-axis",h))}})),n?n instanceof HTMLElement?(n.appendChild(s),sn()):n(r,sn):sn(),r}$c.assign=Fu,$c.fmtNum=Ya,$c.rangeNum=ja,$c.rangeLog=La,$c.rangeAsinh=Pa,$c.orient=Zl,$c.pxRatio=Yo,$c.join=function(e,t){for(var n=new Set,r=0;r=o&&S<=a;S+=k){var F=c[S];if(null!=F){var N=_(l[S]),O=b(F);1==t?D(x,N,C):D(x,A,O),D(x,N,O),C=O,A=N}}var T=_t(Kl(e,i),2),B=T[0],M=T[1];if(null!=u.fill||0!=B){var L=w.fill=new Path2D(x),P=b(u.fillTo(e,i,u.min,u.max,B));D(L,A,P),D(L,E,P)}if(!u.spanGaps){var $,R=[];($=R).push.apply($,bt(nc(l,c,o,a,k,_,r)));var I=u.width*Yo/2,j=n||1==t?I:-I,z=n||-1==t?-I:I;R.forEach((function(e){e[0]+=j,e[1]+=z})),w.gaps=R=u.gaps(e,i,o,a,R),w.clip=tc(R,s.ori,p,v,m,y)}return 0!=M&&(w.band=2==M?[ec(e,i,o,a,x,-1),ec(e,i,o,a,x,1)]:ec(e,i,o,a,x,M)),w}))}},Rc.bars=function(e){var t=za((e=e||bu).size,[.6,iu,1]),n=e.align||0,r=(e.gap||0)*Yo,i=za(e.radius,0),o=1-t[0],a=za(t[1],iu)*Yo,u=za(t[2],1)*Yo,l=za(e.disp,bu),c=za(e.each,(function(e){})),s=l.fill,f=l.stroke;return function(e,t,d,h){return Zl(e,t,(function(p,v,m,y,g,_,b,D,w,x,k){var C,E,A=p.pxRound,S=y.dir*(0==y.ori?1:-1),F=g.dir*(1==g.ori?1:-1),N=0==y.ori?cc:sc,O=0==y.ori?c:function(e,t,n,r,i,o,a){c(e,t,n,i,r,a,o)},T=_t(Kl(e,t),2),B=T[0],M=T[1],L=3==g.distr?1==B?g.max:g.min:0,P=b(L,g,k,w),$=A(p.width*Yo),R=!1,I=null,j=null,z=null,U=null;null==s||0!=$&&null==f||(R=!0,I=s.values(e,t,d,h),j=new Map,new Set(I).forEach((function(e){null!=e&&j.set(e,new Path2D)})),$>0&&(z=f.values(e,t,d,h),U=new Map,new Set(z).forEach((function(e){null!=e&&U.set(e,new Path2D)}))));var H=l.x0,Y=l.size;if(null!=H&&null!=Y){v=H.values(e,t,d,h),2==H.unit&&(v=v.map((function(t){return e.posToVal(D+t*x,y.key,!0)})));var V=Y.values(e,t,d,h);E=A((E=2==Y.unit?V[0]*x:_(V[0],y,x,D)-_(0,y,x,D))-$),C=1==S?-$/2:E+$/2}else{var q=x;if(v.length>1)for(var W=null,Q=0,G=1/0;Q=d&&Q<=h;Q+=S){var ie=m[Q];if(void 0!==ie){var oe=_(2!=y.distr||null!=l?v[Q]:Q,y,x,D),ae=b(za(ie,L),g,k,w);null!=re&&null!=ie&&(P=b(re[Q],g,k,w));var ue=A(oe-C),le=A(Ka(ae,P)),ce=A(Za(ae,P)),se=le-ce,fe=i*E;null!=ie&&(R?($>0&&null!=z[Q]&&N(U.get(z[Q]),ue,ce+Qa($/2),E,Ka(0,se-$),fe),null!=I[Q]&&N(j.get(I[Q]),ue,ce+Qa($/2),E,Ka(0,se-$),fe)):N(X,ue,ce+Qa($/2),E,Ka(0,se-$),fe),O(e,t,Q,ue-$/2,ce,E+$,se)),0!=M&&(F*M==1?(le=ce,ce=Z):(ce=le,le=Z),N(ee,ue-$/2,ce,E+$,Ka(0,se=le-ce),0))}}return $>0&&(K.stroke=R?U:X),K.fill=R?j:X,K}))}},Rc.spline=function(e){return function(e,t){var n=za(null===t||void 0===t?void 0:t.alignGaps,0);return function(t,r,i,o){return Zl(t,r,(function(a,u,l,c,s,f,d,h,p,v,m){var y,g,_,b=a.pxRound,D=function(e){return b(f(e,c,v,h))},w=function(e){return b(d(e,s,m,p))};0==c.ori?(y=oc,_=uc,g=hc):(y=ac,_=lc,g=pc);var x=c.dir*(0==c.ori?1:-1);i=Na(l,i,o,1),o=Na(l,i,o,-1);for(var k=D(u[1==x?i:o]),C=k,E=[],A=[],S=1==x?i:o;S>=i&&S<=o;S+=x)if(null!=l[S]){var F=D(u[S]);E.push(C=F),A.push(w(l[S]))}var N={stroke:e(E,A,y,_,g,b),fill:null,clip:null,band:null,gaps:null,flags:1},O=N.stroke,T=_t(Kl(t,r),2),B=T[0],M=T[1];if(null!=a.fill||0!=B){var L=N.fill=new Path2D(O),P=w(a.fillTo(t,r,a.min,a.max,B));_(L,C,P),_(L,k,P)}if(!a.spanGaps){var $,R=[];($=R).push.apply($,bt(nc(u,l,i,o,x,D,n))),N.gaps=R=a.gaps(t,r,i,o,R),N.clip=tc(R,c.ori,h,p,v,m)}return 0!=M&&(N.band=2==M?[ec(t,r,i,o,O,-1),ec(t,r,i,o,O,1)]:ec(t,r,i,o,O,M)),N}))}}(bc,e)};var Ic,jc={height:500,legend:{show:!1},cursor:{drag:{x:!0,y:!1},focus:{prox:30},points:{size:5.6,width:1.4},bind:{click:function(){return null},dblclick:function(){return null}}}},zc=function(e){return void 0===e||null===e?"":e.toLocaleString("en-US",{maximumSignificantDigits:20})},Uc=function(e,t,n,r){var i,o=e.axes[n];if(r>1)return o._size||60;var a=6+((null===o||void 0===o||null===(i=o.ticks)||void 0===i?void 0:i.size)||0)+(o.gap||0),u=(null!==t&&void 0!==t?t:[]).reduce((function(e,t){return t.length>e.length?t:e}),"");return""!=u&&(a+=function(e,t){var n=document.createElement("span");n.innerText=e,n.style.cssText="position: absolute; z-index: -1; pointer-events: none; opacity: 0; font: ".concat(t),document.body.appendChild(n);var r=n.offsetWidth;return n.remove(),r}(u,e.ctx.font)),Math.ceil(a)},Hc=function(e){return function(e){for(var t=0,n=0;n>8*i&255).toString(16)).substr(-2);return r}(e)},Yc=function(e){return e.replace(/^\[\d+]/,"").replace(/{.+}/gim,"")},Vc=function(e){for(var t=e.length,n=-1/0;t--;){var r=e[t];Number.isFinite(r)&&r>n&&(n=r)}return Number.isFinite(n)?n:null},qc=function(e){for(var t=e.length,n=1/0;t--;){var r=e[t];Number.isFinite(r)&&r2&&void 0!==arguments[2]?arguments[2]:"";return t.map((function(e){return"".concat(zc(e)," ").concat(n)}))}(e,n,t)}};return e?Number(e)%2?n:Kn(Kn({},n),{},{side:1}):{space:80}}))},Qc=function(e,t){if(null==e||null==t)return[-1,1];var n=.02*(Math.abs(t-e)||Math.abs(e)||1);return[e-n,t+n]},Gc=function(e){var t,n,r=e.u,i=e.tooltipIdx,o=e.metrics,a=e.series,u=e.tooltip,l=e.tooltipOffset,c=e.unit,s=void 0===c?"":c,f=i.seriesIdx,d=i.dataIdx;if(null!==f&&void 0!==d){var h=r.data[f][d],p=r.data[0][d],v=(null===(t=o[f-1])||void 0===t?void 0:t.metric)||{},m=a[f],y=Hc(m.label||""),g=r.over.getBoundingClientRect(),_=g.width,b=g.height,D=r.valToPos(h||0,(null===(n=a[f])||void 0===n?void 0:n.scale)||"1"),w=r.valToPos(p,"x"),x=u.getBoundingClientRect(),k=x.width,C=x.height,E=w+k>=_,A=D+C>=b;u.style.display="grid",u.style.top="".concat(l.top+D+10-(A?C+10:0),"px"),u.style.left="".concat(l.left+w+10-(E?k+20:0),"px");var S=(m.label||"").replace(/{.+}/gim,"").trim(),F=Yc(S),N=yr()(new Date(1e3*p)).format("YYYY-MM-DD HH:mm:ss:SSS (Z)"),O=Object.keys(v).filter((function(e){return"__name__"!==e})).map((function(e){return"
    ".concat(e,": ").concat(v[e],"
    ")})).join(""),T='
    ');u.innerHTML="
    ".concat(N,'
    \n
    \n ').concat(T).concat(F,': ').concat(zc(h)," ").concat(s,'\n
    \n
    ').concat(O,"
    ")}},Jc=n(61),Zc=n.n(Jc);!function(e){e.xRange="xRange",e.yRange="yRange",e.data="data"}(Ic||(Ic={}));var Kc=function(e){var t=e.data,n=e.series,r=e.metrics,i=void 0===r?[]:r,o=e.period,a=e.yaxis,u=e.unit,l=e.setPeriod,c=e.container,s=re(null),f=_t(X(!1),2),d=f[0],h=f[1],p=_t(X({min:o.start,max:o.end}),2),v=p[0],m=p[1],y=_t(X(),2),g=y[0],_=y[1],b=go(c),D=document.createElement("div");D.className="u-tooltip";var w={seriesIdx:null,dataIdx:void 0},x={left:0,top:0},k=ae(Zc()((function(e){var t=e.min,n=e.max;l({from:new Date(1e3*t),to:new Date(1e3*n)})}),500),[]),C=function(e){var t=e.u,n=e.min,r=e.max,i=1e3*(r-n);iSr||(t.setScale("x",{min:n,max:r}),m({min:n,max:r}),k({min:n,max:r}))},E=function(e){var t=e.target,n=e.ctrlKey,r=e.metaKey,i=e.key,o=t instanceof HTMLInputElement||t instanceof HTMLTextAreaElement;if(g&&!o){var a="+"===i||"="===i;if(("-"===i||a)&&!n&&!r){e.preventDefault();var u=(v.max-v.min)/10*(a?1:-1);C({u:g,min:v.min+u,max:v.max-u})}}},A=function(){return[v.min,v.max]},S=function(e){var 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;return a.limits.enable?a.limits.range[r]:Qc(t,n)},F=Kn(Kn({},jc),{},{series:n,axes:Wc([{},{scale:"1"}],u),scales:Kn({},function(){var e={x:{range:A}},t=Object.keys(a.limits.range);return(t.length?t:["1"]).forEach((function(t){e[t]={range:function(e){var n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:0,r=arguments.length>2&&void 0!==arguments[2]?arguments[2]:1;return S(e,n,r,t)}}})),e}()),width:b.width||400,plugins:[{hooks:{ready:function(e){var t;x.left=parseFloat(e.over.style.left),x.top=parseFloat(e.over.style.top),null===(t=e.root.querySelector(".u-wrap"))||void 0===t||t.appendChild(D),e.over.addEventListener("mousedown",(function(t){var n=t.ctrlKey,r=t.metaKey;0===t.button&&(n||r)&&function(e){var t=e.e,n=e.factor,r=void 0===n?.85:n,i=e.u,o=e.setPanning,a=e.setPlotScale;t.preventDefault(),o(!0);var u=t.clientX,l=i.posToVal(1,"x")-i.posToVal(0,"x"),c=i.scales.x.min||0,s=i.scales.x.max||0,f=function(e){e.preventDefault();var t=l*((e.clientX-u)*r);a({u:i,min:c-t,max:s-t})};document.addEventListener("mousemove",f),document.addEventListener("mouseup",(function e(){o(!1),document.removeEventListener("mousemove",f),document.removeEventListener("mouseup",e)}))}({u:e,e:t,setPanning:h,setPlotScale:C,factor:.9})})),e.over.addEventListener("wheel",(function(t){if(t.ctrlKey||t.metaKey){t.preventDefault();var n=e.over.getBoundingClientRect().width,r=e.cursor.left&&e.cursor.left>0?e.cursor.left:0,i=e.posToVal(r,"x"),o=(e.scales.x.max||0)-(e.scales.x.min||0),a=t.deltaY<0?.9*o:o/.9,u=i-r/n*a,l=u+a;e.batch((function(){return C({u:e,min:u,max:l})}))}}))},setCursor:function(e){w.dataIdx!==e.cursor.idx&&(w.dataIdx=e.cursor.idx||0,null!==w.seriesIdx&&void 0!==w.dataIdx&&Gc({u:e,tooltipIdx:w,metrics:i,series:n,tooltip:D,tooltipOffset:x,unit:u}))},setSeries:function(e,t){w.seriesIdx!==t&&(w.seriesIdx=t,t&&void 0!==w.dataIdx?Gc({u:e,tooltipIdx:w,metrics:i,series:n,tooltip:D,tooltipOffset:x,unit:u}):D.style.display="none")}}}],hooks:{setSelect:[function(e){var t=e.posToVal(e.select.left,"x"),n=e.posToVal(e.select.left+e.select.width,"x");C({u:e,min:t,max:n})}]}}),N=function(e){if(g){switch(e){case Ic.xRange:g.scales.x.range=A;break;case Ic.yRange:Object.keys(a.limits.range).forEach((function(e){g.scales[e]&&(g.scales[e].range=function(t){var n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:0,r=arguments.length>2&&void 0!==arguments[2]?arguments[2]:1;return S(t,n,r,e)})}));break;case Ic.data:g.setData(t)}d||g.redraw()}};return te((function(){return m({min:o.start,max:o.end})}),[o]),te((function(){if(s.current){var e=new $c(F,t,s.current);return _(e),m({min:o.start,max:o.end}),e.destroy}}),[s.current,n,b]),te((function(){return window.addEventListener("keydown",E),function(){window.removeEventListener("keydown",E)}}),[v]),te((function(){return N(Ic.data)}),[t]),te((function(){return N(Ic.xRange)}),[v]),te((function(){return N(Ic.yRange)}),[a]),fr("div",{className:Ti()({"vm-line-chart":!0,"vm-line-chart_panning":d}),children:fr("div",{ref:s})})};function Xc(){Xc=function(){return e};var e={},t=Object.prototype,n=t.hasOwnProperty,r=Object.defineProperty||function(e,t,n){e[t]=n.value},i="function"==typeof Symbol?Symbol:{},o=i.iterator||"@@iterator",a=i.asyncIterator||"@@asyncIterator",u=i.toStringTag||"@@toStringTag";function l(e,t,n){return Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}),e[t]}try{l({},"")}catch(S){l=function(e,t,n){return e[t]=n}}function c(e,t,n,i){var o=t&&t.prototype instanceof d?t:d,a=Object.create(o.prototype),u=new C(i||[]);return r(a,"_invoke",{value:D(e,n,u)}),a}function s(e,t,n){try{return{type:"normal",arg:e.call(t,n)}}catch(S){return{type:"throw",arg:S}}}e.wrap=c;var f={};function d(){}function h(){}function p(){}var v={};l(v,o,(function(){return this}));var m=Object.getPrototypeOf,y=m&&m(m(E([])));y&&y!==t&&n.call(y,o)&&(v=y);var g=p.prototype=d.prototype=Object.create(v);function _(e){["next","throw","return"].forEach((function(t){l(e,t,(function(e){return this._invoke(t,e)}))}))}function b(e,t){function i(r,o,a,u){var l=s(e[r],e,o);if("throw"!==l.type){var c=l.arg,f=c.value;return f&&"object"==St(f)&&n.call(f,"__await")?t.resolve(f.__await).then((function(e){i("next",e,a,u)}),(function(e){i("throw",e,a,u)})):t.resolve(f).then((function(e){c.value=e,a(c)}),(function(e){return i("throw",e,a,u)}))}u(l.arg)}var o;r(this,"_invoke",{value:function(e,n){function r(){return new t((function(t,r){i(e,n,t,r)}))}return o=o?o.then(r,r):r()}})}function D(e,t,n){var r="suspendedStart";return function(i,o){if("executing"===r)throw new Error("Generator is already running");if("completed"===r){if("throw"===i)throw o;return A()}for(n.method=i,n.arg=o;;){var a=n.delegate;if(a){var u=w(a,n);if(u){if(u===f)continue;return u}}if("next"===n.method)n.sent=n._sent=n.arg;else if("throw"===n.method){if("suspendedStart"===r)throw r="completed",n.arg;n.dispatchException(n.arg)}else"return"===n.method&&n.abrupt("return",n.arg);r="executing";var l=s(e,t,n);if("normal"===l.type){if(r=n.done?"completed":"suspendedYield",l.arg===f)continue;return{value:l.arg,done:n.done}}"throw"===l.type&&(r="completed",n.method="throw",n.arg=l.arg)}}}function w(e,t){var n=e.iterator[t.method];if(void 0===n){if(t.delegate=null,"throw"===t.method){if(e.iterator.return&&(t.method="return",t.arg=void 0,w(e,t),"throw"===t.method))return f;t.method="throw",t.arg=new TypeError("The iterator does not provide a 'throw' method")}return f}var r=s(n,e.iterator,t.arg);if("throw"===r.type)return t.method="throw",t.arg=r.arg,t.delegate=null,f;var i=r.arg;return i?i.done?(t[e.resultName]=i.value,t.next=e.nextLoc,"return"!==t.method&&(t.method="next",t.arg=void 0),t.delegate=null,f):i:(t.method="throw",t.arg=new TypeError("iterator result is not an object"),t.delegate=null,f)}function x(e){var t={tryLoc:e[0]};1 in e&&(t.catchLoc=e[1]),2 in e&&(t.finallyLoc=e[2],t.afterLoc=e[3]),this.tryEntries.push(t)}function k(e){var t=e.completion||{};t.type="normal",delete t.arg,e.completion=t}function C(e){this.tryEntries=[{tryLoc:"root"}],e.forEach(x,this),this.reset(!0)}function E(e){if(e){var t=e[o];if(t)return t.call(e);if("function"==typeof e.next)return e;if(!isNaN(e.length)){var r=-1,i=function t(){for(;++r=0;--i){var o=this.tryEntries[i],a=o.completion;if("root"===o.tryLoc)return r("end");if(o.tryLoc<=this.prev){var u=n.call(o,"catchLoc"),l=n.call(o,"finallyLoc");if(u&&l){if(this.prev=0;--r){var i=this.tryEntries[r];if(i.tryLoc<=this.prev&&n.call(i,"finallyLoc")&&this.prev=0;--t){var n=this.tryEntries[t];if(n.finallyLoc===e)return this.complete(n.completion,n.afterLoc),k(n),f}},catch:function(e){for(var t=this.tryEntries.length-1;t>=0;--t){var n=this.tryEntries[t];if(n.tryLoc===e){var r=n.completion;if("throw"===r.type){var i=r.arg;k(n)}return i}}throw new Error("illegal catch attempt")},delegateYield:function(e,t,n){return this.delegate={iterator:E(e),resultName:t,nextLoc:n},"next"===this.method&&(this.arg=void 0),f}},e}function es(e,t,n,r,i,o,a){try{var u=e[o](a),l=u.value}catch(c){return void n(c)}u.done?t(l):Promise.resolve(l).then(r,i)}function ts(e){return function(){var t=this,n=arguments;return new Promise((function(r,i){var o=e.apply(t,n);function a(e){es(o,r,i,a,u,"next",e)}function u(e){es(o,r,i,a,u,"throw",e)}a(void 0)}))}}var ns=function(e){var t=e.legend,n=e.onChange,r=_t(X(""),2),i=r[0],o=r[1],a=oe((function(){return function(e){var t=Object.keys(e.freeFormFields).filter((function(e){return"__name__"!==e}));return t.map((function(t){var n="".concat(t,'="').concat(e.freeFormFields[t],'"');return{id:"".concat(e.label,".").concat(n),freeField:n,key:t}}))}(t)}),[t]),u=function(){var e=ts(Xc().mark((function e(t,n){return Xc().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,navigator.clipboard.writeText(t);case 2:o(n),setTimeout((function(){return o("")}),2e3);case 4:case"end":return e.stop()}}),e)})));return function(t,n){return e.apply(this,arguments)}}();return fr("div",{className:Ti()({"vm-legend-item":!0,"vm-legend-item_hide":!t.checked}),onClick:function(e){return function(t){n(e,t.ctrlKey||t.metaKey)}}(t),children:[fr("div",{className:"vm-legend-item__marker",style:{backgroundColor:t.color}}),fr("div",{className:"vm-legend-item-info",children:[fr("span",{className:"vm-legend-item-info__label",children:Yc(t.label)}),"\xa0{",a.map((function(e){return fr(po,{open:i===e.id,title:"Copied!",placement:"top-center",children:fr("span",{className:"vm-legend-item-info__free-fields",onClick:(t=e.freeField,n=e.id,function(e){e.stopPropagation(),u(t,n)}),children:e.freeField},e.key)},e.id);var t,n})),"}"]})]})},rs=function(e){var t=e.labels,n=e.query,r=e.onChange,i=oe((function(){return Array.from(new Set(t.map((function(e){return e.group}))))}),[t]);return fr(m,{children:fr("div",{className:"vm-legend",children:i.map((function(e){return fr("div",{className:"vm-legend-group",children:[fr("div",{className:"vm-legend-group-title",children:[fr("span",{className:"vm-legend-group-title__count",children:["Query ",e,": "]}),fr("span",{className:"vm-legend-group-title__query",children:n[e-1]})]}),fr("div",{children:t.filter((function(t){return t.group===e})).map((function(e){return fr(ns,{legend:e,onChange:r},e.label)}))})]},e)}))})})};function is(e,t){if(null==e)return{};var n,r,i=function(e,t){if(null==e)return{};var n,r,i={},o=Object.keys(e);for(r=0;r=0||(i[n]=e[n]);return i}(e,t);if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(e);for(r=0;r=0||Object.prototype.propertyIsEnumerable.call(e,n)&&(i[n]=e[n])}return i}var os=["__name__"],as=function(e,t,n){var r=function(e,t){var n=e.metric,r=n.__name__,i=is(n,os),o=t||r||"";return 0===Object.keys(e.metric).length?o||"Result ".concat(e.group):"".concat(o," {").concat(Object.entries(i).map((function(e){return"".concat(e[0],": ").concat(e[1])})).join(", "),"}")}(e,n[e.group-1]),i="[".concat(e.group,"]").concat(r);return{label:i,freeFormFields:e.metric,width:1.4,stroke:Hc(i),show:!ls(i,t),scale:"1",points:{size:4.2,width:1.4}}},us=function(e,t){return{group:t,label:e.label||"",color:e.stroke,checked:e.show||!1,freeFormFields:e.freeFormFields}},ls=function(e,t){return t.includes("".concat(e))},cs=function(e){switch(e){case"NaN":return NaN;case"Inf":case"+Inf":return 1/0;case"-Inf":return-1/0;default:return parseFloat(e)}},ss=function(e){var t=e.data,n=void 0===t?[]:t,r=e.period,i=e.customStep,o=e.query,a=e.yaxis,u=e.unit,l=e.showLegend,c=void 0===l||l,s=e.setYaxisLimits,f=e.setPeriod,d=e.alias,h=void 0===d?[]:d,p=e.fullWidth,v=void 0===p||p,m=oe((function(){return i||r.step||1}),[r.step,i]),y=_t(X([[]]),2),g=y[0],_=y[1],b=_t(X([]),2),D=b[0],w=b[1],x=_t(X([]),2),k=x[0],C=x[1],E=_t(X([]),2),A=E[0],S=E[1],F=function(e){var t=function(e){var t={},n=Object.values(e).flat(),r=qc(n),i=Vc(n);return t[1]=Qc(r,i),t}(e);s(t)};te((function(){var e=[],t={},i=[],o=[{}];null===n||void 0===n||n.forEach((function(n){var r=as(n,A,h);o.push(r),i.push(us(r,n.group));var a,u=t[n.group]||[],l=Ho(n.values);try{for(l.s();!(a=l.n()).done;){var c=a.value;e.push(c[0]),u.push(cs(c[1]))}}catch(s){l.e(s)}finally{l.f()}t[n.group]=u}));var a=function(e,t,n){for(var r=Array.from(new Set(e)).sort((function(e,t){return e-t})),i=n.start,o=Nr(n.end+t),a=0,u=[];i<=o;){for(;a=r.length||r[a]>i)&&u.push(i)}for(;u.length<2;)u.push(i),i=Nr(i+t);return u}(e,m,r),u=n.map((function(e){var t,n=[],r=e.values,i=r.length,o=0,u=Ho(a);try{for(u.s();!(t=u.n()).done;){for(var l=t.value;o1e10*h?n.map((function(){return f})):n}));u.unshift(a),F(t),_(u),w(o),C(i)}),[n]),te((function(){var e=[],t=[{}];null===n||void 0===n||n.forEach((function(n){var r=as(n,A,h);t.push(r),e.push(us(r,n.group))})),w(t),C(e)}),[A]);var N=re(null);return fr("div",{className:Ti()({"vm-graph-view":!0,"vm-graph-view_full-width":v}),ref:N,children:[(null===N||void 0===N?void 0:N.current)&&fr(Kc,{data:g,series:D,metrics:n,period:r,yaxis:a,unit:u,setPeriod:f,container:null===N||void 0===N?void 0:N.current}),c&&fr(rs,{labels:k,query:o,onChange:function(e,t){S(function(e){var t=e.hideSeries,n=e.legend,r=e.metaKey,i=e.series,o=n.label,a=ls(o,t),u=i.map((function(e){return e.label||""}));return r?a?t.filter((function(e){return e!==o})):[].concat(bt(t),[o]):t.length?a?bt(u.filter((function(e){return e!==o}))):[]:bt(u.filter((function(e){return e!==o})))}({hideSeries:A,legend:e,metaKey:t,series:D}))}})]})},fs=function(e){var t=e.value,n=e.onChange,r=e.onEnter,i=e.onArrowUp,o=e.onArrowDown,a=e.autocomplete,u=e.error,l=e.options,s=e.label,f=e.disabled,d=void 0!==f&&f,h=_t(X(-1),2),p=h[0],v=h[1],m=_t(X(!1),2),y=m[0],g=m[1],_=re(null),b=re(null),D=oe((function(){if(v(0),!y)return[];try{var e=new RegExp(String(t),"i");return l.filter((function(n){return e.test(n)&&n!==t})).sort((function(t,n){var r,i;return((null===(r=t.match(e))||void 0===r?void 0:r.index)||0)-((null===(i=n.match(e))||void 0===i?void 0:i.index)||0)}))}catch(c){return[]}}),[y,l]),w=function(){g(!1)},x=function(e){return function(){d||(n(e),w())}};return te((function(){var e=(t.match(/[a-zA-Z_:.][a-zA-Z0-9_:.]*/gm)||[]).length;g(a&&t.length>2&&e<=1)}),[a,t]),te((function(){if(b.current){var e=b.current.childNodes[p];null!==e&&void 0!==e&&e.scrollIntoView&&e.scrollIntoView({block:"center"})}}),[p]),fo(_,(function(){return g(!1)}),b),fr("div",{className:"vm-query-editor",ref:_,children:[fr(No,{value:t,label:s,type:"textarea",autofocus:!!t,error:u,onKeyDown:function(e){var t=e.key,a=e.ctrlKey,u=e.metaKey,l=e.shiftKey,c=a||u,s="ArrowUp"===t,f="ArrowDown"===t,h="Enter"===t,m=y&&D.length,_=s||f;if((_&&m||_&&c||h&&m)&&e.preventDefault(),s&&m&&!c?v((function(e){return 0===e?0:e-1})):s&&c&&i(),f&&m&&!c?v((function(e){return e>=D.length-1?D.length-1:e+1})):f&&c&&o(),h&&m&&!l&&!c){if(d)return;n(D[p]),g(!1)}else h&&!l&&r()},onChange:n,disabled:d}),fr(ho,{open:y,buttonRef:_,placement:"bottom-left",onClose:w,children:fr("div",{className:"vm-query-editor-autocomplete",ref:b,children:D.map((function(e,t){return fr("div",{className:Ti()({"vm-list__item":!0,"vm-list__item_active":t===p}),id:"$autocomplete$".concat(e),onClick:x(e),children:e},e)}))})})]})},ds=n(936),hs=n.n(ds),ps=function(e){var t=e.defaultStep,n=e.setStep,r=_t(X(t),2),i=r[0],o=r[1],a=_t(X(""),2),u=a[0],l=a[1],c=ae(hs()((function(e){return n(e||1)}),700),[]),s=function(e){e>0?(o(e),c(e),l("")):l("step is out of allowed range")};return te((function(){t&&s(t)}),[t]),fr(No,{label:"Step value",type:"number",value:i,error:u,onChange:function(e){var t=+e;t&&s(t)},endIcon:fr(po,{title:"Reset step to default",children:fr(so,{variant:"text",size:"small",startIcon:fr(ui,{}),onClick:function(){s(t||1)}})})})},vs=function(){var e=Xn().serverURL,t=hr().tenantId,n=pr(),r=Qr(),i=_t(X(t||0),2),o=i[0],a=i[1],u=ae(hs()((function(t){var i=Number(t);if(n({type:"SET_TENANT_ID",payload:i}),e){var o=e.replace(/(\/select\/)([\d]+)(\/prometheus)/gim,"$1".concat(i,"$3"));n({type:"SET_SERVER",payload:o}),r({type:"RUN_QUERY"})}}),700),[]);return te((function(){o!==t&&a(t)}),[t]),fr(No,{label:"Tenant ID",type:"number",value:o,onChange:function(e){a(e),u(e)},endIcon:fr(po,{title:"Define tenant id if you need request to another storage",children:fr(so,{variant:"text",size:"small",startIcon:fr(li,{})})})})},ms=function(e){var t,n=e.value,r=void 0!==n&&n,i=e.disabled,o=void 0!==i&&i,a=e.label,u=e.color,l=void 0===u?"secondary":u,c=e.onChange;return fr("div",{className:Ti()((qn(t={"vm-switch":!0,"vm-switch_disabled":o,"vm-switch_active":r},"vm-switch_".concat(l,"_active"),r),qn(t,"vm-switch_".concat(l),l),t)),onClick:function(){o||c(!r)},children:[fr("div",{className:"vm-switch-track",children:fr("div",{className:"vm-switch-track__thumb"})}),a&&fr("span",{className:"vm-switch__label",children:a})]})},ys=function(){var e=Qi(),t=Xn().inputTenantID,n=ni().autocomplete,r=ri(),i=Hi(),o=i.nocache,a=i.isTracingEnabled,u=Yi(),l=Wr().period.step;return fr("div",{className:"vm-additional-settings",children:[fr(ms,{label:"Autocomplete",value:n,onChange:function(){r({type:"TOGGLE_AUTOCOMPLETE"})}}),fr(ms,{label:"Disable cache",value:o,onChange:function(){u({type:"TOGGLE_NO_CACHE"})}}),fr(ms,{label:"Trace query",value:a,onChange:function(){u({type:"TOGGLE_QUERY_TRACING"})}}),fr("div",{className:"vm-additional-settings__input",children:fr(ps,{defaultStep:l,setStep:function(t){e({type:"SET_CUSTOM_STEP",payload:t})}})}),!!t&&fr("div",{className:"vm-additional-settings__input",children:fr(vs,{})})]})};var gs=function(e){var t=re();return te((function(){t.current=e}),[e]),t.current},_s=function(e){var t=e.error,n=e.queryOptions,r=e.onHideQuery,i=ni(),o=i.query,a=i.queryHistory,u=i.autocomplete,l=ri(),c=Qr(),s=_t(X(o||[]),2),f=s[0],d=s[1],h=_t(X([]),2),p=h[0],v=h[1],m=gs(f),y=function(){l({type:"SET_QUERY_HISTORY",payload:f.map((function(e,t){var n=a[t]||{values:[]},r=e===n.values[n.values.length-1];return{index:n.values.length-Number(r),values:!r&&e?[].concat(bt(n.values),[e]):n.values}}))}),l({type:"SET_QUERY",payload:f}),c({type:"RUN_QUERY"})},g=function(e,t){d((function(n){return n.map((function(n,r){return r===t?e:n}))}))},_=function(e,t){return function(){!function(e,t){var n=a[t],r=n.index,i=n.values,o=r+e;o<0||o>=i.length||(g(i[o]||"",t),l({type:"SET_QUERY_HISTORY_BY_INDEX",payload:{value:{values:i,index:o},queryNumber:t}}))}(e,t)}},b=function(e){return function(t){g(t,e)}},D=function(e){return function(){var t;t=e,d((function(e){return e.filter((function(e,n){return n!==t}))})),v((function(t){return t.map((function(t){return t>e?t-1:t}))}))}},w=function(e){return function(){var t;t=e,v((function(e){return e.includes(t)?e.filter((function(e){return e!==t})):[].concat(bt(e),[t])}))}};return te((function(){m&&f.length1&&fr(po,{title:"Remove Query",children:fr("div",{className:"vm-query-configurator-list-row__button",children:fr(so,{variant:"text",color:"error",startIcon:fr(Ci,{}),onClick:D(r)})})})]},r)}))}),fr("div",{className:"vm-query-configurator-settings",children:[fr(ys,{}),fr("div",{className:"vm-query-configurator-settings__buttons",children:[f.length<4&&fr(so,{variant:"outlined",onClick:function(){d((function(e){return[].concat(bt(e),[""])}))},startIcon:fr(Ei,{}),children:"Add Query"}),fr(so,{variant:"contained",onClick:y,startIcon:fr(bi,{}),children:"Execute Query"})]})]})]})};function bs(e){var t,n,r,i=2;for("undefined"!=typeof Symbol&&(n=Symbol.asyncIterator,r=Symbol.iterator);i--;){if(n&&null!=(t=e[n]))return t.call(e);if(r&&null!=(t=e[r]))return new Ds(t.call(e));n="@@asyncIterator",r="@@iterator"}throw new TypeError("Object is not async iterable")}function Ds(e){function t(e){if(Object(e)!==e)return Promise.reject(new TypeError(e+" is not an object."));var t=e.done;return Promise.resolve(e.value).then((function(e){return{value:e,done:t}}))}return Ds=function(e){this.s=e,this.n=e.next},Ds.prototype={s:null,n:null,next:function(){return t(this.n.apply(this.s,arguments))},return:function(e){var n=this.s.return;return void 0===n?Promise.resolve({value:e,done:!0}):t(n.apply(this.s,arguments))},throw:function(e){var n=this.s.return;return void 0===n?Promise.reject(e):t(n.apply(this.s,arguments))}},new Ds(e)}var ws=0,xs=function(){function e(t,n){Dt(this,e),this.tracing=void 0,this.query=void 0,this.tracingChildren=void 0,this.originalTracing=void 0,this.id=void 0,this.tracing=t,this.originalTracing=JSON.parse(JSON.stringify(t)),this.query=n,this.id=ws++;var r=t.children||[];this.tracingChildren=r.map((function(t){return new e(t,n)}))}return xt(e,[{key:"queryValue",get:function(){return this.query}},{key:"idValue",get:function(){return this.id}},{key:"children",get:function(){return this.tracingChildren}},{key:"message",get:function(){return this.tracing.message}},{key:"duration",get:function(){return this.tracing.duration_msec}},{key:"JSON",get:function(){return JSON.stringify(this.tracing,null,2)}},{key:"originalJSON",get:function(){return JSON.stringify(this.originalTracing,null,2)}},{key:"setTracing",value:function(t){var n=this;this.tracing=t;var r=t.children||[];this.tracingChildren=r.map((function(t){return new e(t,n.query)}))}},{key:"setQuery",value:function(e){this.query=e}},{key:"resetTracing",value:function(){this.tracing=this.originalTracing}}]),e}(),ks=function(e){var t=e.predefinedQuery,n=e.visible,r=e.display,i=e.customStep,o=e.hideQuery,a=void 0===o?[]:o,u=ni().query,l=Wr().period,c=Hi(),s=c.displayType,f=c.nocache,d=c.isTracingEnabled,h=hr().serverUrl,p=_t(X(!1),2),v=p[0],m=p[1],y=_t(X(),2),g=y[0],_=y[1],b=_t(X(),2),D=b[0],w=b[1],x=_t(X(),2),k=x[0],C=x[1],E=_t(X(),2),A=E[0],S=E[1],F=_t(X(),2),N=F[0],O=F[1],T=_t(X([]),2),B=T[0],M=T[1];te((function(){A&&(_(void 0),w(void 0),C(void 0))}),[A]);var L=function(){var e=ts(Xc().mark((function e(t,n,r,i){var o,a,u,l,c,s;return Xc().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return o=new AbortController,M([].concat(bt(n),[o])),e.prev=2,e.delegateYield(Xc().mark((function e(){var n,f,d,h,p,v,m,y,g,b,D,x;return Xc().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:n="chart"===r,f=or[r],d=[],h=[],p=1,v=0,a=!1,u=!1,e.prev=8,c=bs(t);case 10:return e.next=12,c.next();case 12:if(!(a=!(s=e.sent).done)){e.next=24;break}return m=s.value,e.next=16,fetch(m,{signal:o.signal});case 16:return y=e.sent,e.next=19,y.json();case 19:g=e.sent,y.ok?(S(void 0),g.trace&&(b=new xs(g.trace,i[p-1]),h.push(b)),D=f-d.length,g.data.result.slice(0,D).forEach((function(e){e.group=p,d.push(e)})),v+=g.data.result.length,p++):S("".concat(g.errorType,"\r\n").concat(null===g||void 0===g?void 0:g.error));case 21:a=!1,e.next=10;break;case 24:e.next=30;break;case 26:e.prev=26,e.t0=e.catch(8),u=!0,l=e.t0;case 30:if(e.prev=30,e.prev=31,!a||null==c.return){e.next=35;break}return e.next=35,c.return();case 35:if(e.prev=35,!u){e.next=38;break}throw l;case 38:return e.finish(35);case 39:return e.finish(30);case 40:x="Showing ".concat(f," series out of ").concat(v," series due to performance reasons. Please narrow down the query, so it returns less series"),O(v>f?x:""),n?_(d):w(d),C(h);case 44:case"end":return e.stop()}}),e,null,[[8,26,30,40],[31,,35,39]])}))(),"t0",4);case 4:e.next=9;break;case 6:e.prev=6,e.t1=e.catch(2),e.t1 instanceof Error&&"AbortError"!==e.t1.name&&S("".concat(e.t1.name,": ").concat(e.t1.message));case 9:m(!1);case 10:case"end":return e.stop()}}),e,null,[[2,6]])})));return function(t,n,r,i){return e.apply(this,arguments)}}(),P=ae(hs()(L,800),[]),$=oe((function(){var e=null!==t&&void 0!==t?t:u,n="chart"===(r||s);if(l)if(h)if(e.every((function(e){return!e.trim()})))S(xo.validQuery);else{if(Oo(h)){var o=Kn({},l);return o.step=i,e.filter((function(e,t){return e.trim()&&!a.includes(t)})).map((function(e){return n?function(e,t,n,r,i){return"".concat(e,"/api/v1/query_range?query=").concat(encodeURIComponent(t),"&start=").concat(n.start,"&end=").concat(n.end,"&step=").concat(n.step).concat(r?"&nocache=1":"").concat(i?"&trace=1":"")}(h,e,o,f,d):function(e,t,n,r){return"".concat(e,"/api/v1/query?query=").concat(encodeURIComponent(t),"&time=").concat(n.end,"&step=").concat(n.step).concat(r?"&trace=1":"")}(h,e,o,d)}))}S(xo.validServer)}else S(xo.emptyServer)}),[h,l,s,i,a]);return te((function(){n&&null!==$&&void 0!==$&&$.length&&(m(!0),P($,B,r||s,null!==t&&void 0!==t?t:u))}),[$,n]),te((function(){var e=B.slice(0,-1);e.length&&(e.map((function(e){return e.abort()})),M(B.filter((function(e){return!e.signal.aborted}))))}),[B]),{fetchUrl:$,isLoading:v,graphData:g,liveData:D,error:A,warning:N,traces:k}},Cs=function(e){var t=e.data,n=lo().showInfoMessage,r=oe((function(){return JSON.stringify(t,null,2)}),[t]);return fr("div",{className:"vm-json-view",children:[fr("div",{className:"vm-json-view__copy",children:fr(so,{variant:"outlined",onClick:function(){navigator.clipboard.writeText(r),n({text:"Formatted JSON has been copied",type:"success"})},children:"Copy JSON"})}),fr("pre",{className:"vm-json-view__code",children:fr("code",{children:r})})]})},Es=function(e){var t=e.yaxis,n=e.setYaxisLimits,r=e.toggleEnableLimits,i=oe((function(){return Object.keys(t.limits.range)}),[t.limits.range]),o=ae(hs()((function(e,r,i){var o=t.limits.range;o[r][i]=+e,o[r][0]===o[r][1]||o[r][0]>o[r][1]||n(o)}),500),[t.limits.range]),a=function(e,t){return function(n){o(n,e,t)}};return fr("div",{className:"vm-axes-limits",children:[fr(ms,{value:t.limits.enable,onChange:r,label:"Fix the limits for y-axis"}),fr("div",{className:"vm-axes-limits-list",children:i.map((function(e){return fr("div",{className:"vm-axes-limits-list__inputs",children:[fr(No,{label:"Min ".concat(e),type:"number",disabled:!t.limits.enable,value:t.limits.range[e][0],onChange:a(e,0)}),fr(No,{label:"Max ".concat(e),type:"number",disabled:!t.limits.enable,value:t.limits.range[e][1],onChange:a(e,1)})]},e)}))})]})},As="Axes settings",Ss=function(e){var t=e.yaxis,n=e.setYaxisLimits,r=e.toggleEnableLimits,i=re(null),o=_t(X(!1),2),a=o[0],u=o[1],l=re(null);fo(i,(function(){return u(!1)}),l);var c=function(){u(!1)};return fr("div",{className:"vm-graph-settings",children:[fr(po,{title:As,children:fr("div",{ref:l,children:fr(so,{variant:"text",startIcon:fr(oi,{}),onClick:function(){u((function(e){return!e}))}})})}),fr(ho,{open:a,buttonRef:l,placement:"bottom-right",onClose:c,children:fr("div",{className:"vm-graph-settings-popper",ref:i,children:[fr("div",{className:"vm-popper-header",children:[fr("h3",{className:"vm-popper-header__title",children:As}),fr(so,{size:"small",startIcon:fr(ai,{}),onClick:c})]}),fr("div",{className:"vm-graph-settings-popper__body",children:fr(Es,{yaxis:t,setYaxisLimits:n,toggleEnableLimits:r})})]})})]})},Fs=function(e){var t=e.containerStyles,n=void 0===t?{}:t,r=e.message;return fr("div",{className:"vm-spinner",style:n&&{},children:[fr("div",{className:"half-circle-spinner",children:[fr("div",{className:"circle circle-1"}),fr("div",{className:"circle circle-2"})]}),r&&fr("div",{className:"vm-spinner__message",children:r})]})},Ns=function(){var e=hr().serverUrl,t=_t(X([]),2),n=t[0],r=t[1],i=function(){var t=ts(Xc().mark((function t(){var n,i,o;return Xc().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:if(e){t.next=2;break}return t.abrupt("return");case 2:return n="".concat(e,"/api/v1/label/__name__/values"),t.prev=3,t.next=6,fetch(n);case 6:return i=t.sent,t.next=9,i.json();case 9:o=t.sent,i.ok&&r(o.data),t.next=16;break;case 13:t.prev=13,t.t0=t.catch(3),console.error(t.t0);case 16:case"end":return t.stop()}}),t,null,[[3,13]])})));return function(){return t.apply(this,arguments)}}();return te((function(){i()}),[e]),{queryOptions:n}},Os=function(e){var t=e.value;return fr("div",{className:"vm-line-progress",children:[fr("div",{className:"vm-line-progress-track",children:fr("div",{className:"vm-line-progress-track__thumb",style:{width:"".concat(t,"%")}})}),fr("span",{children:[t.toFixed(2),"%"]})]})},Ts=function e(t){var n,r=t.trace,i=t.totalMsec,o=_t(X({}),2),a=o[0],u=o[1],l=r.children&&!!r.children.length,c=r.duration/i*100;return fr("div",{className:"vm-nested-nav",children:[fr("div",{className:"vm-nested-nav-header",onClick:(n=r.idValue,function(){u((function(e){return Kn(Kn({},e),{},qn({},n,!e[n]))}))}),children:[l&&fr("div",{className:Ti()({"vm-nested-nav-header__icon":!0,"vm-nested-nav-header__icon_open":a[r.idValue]}),children:fr(pi,{})}),fr("div",{className:"vm-nested-nav-header__progress",children:fr(Os,{value:c})}),fr("div",{className:"vm-nested-nav-header__message",children:r.message}),fr("div",{className:"vm-nested-nav-header__duration",children:"duration: ".concat(r.duration," ms")})]}),a[r.idValue]&&fr("div",{children:l&&r.children.map((function(t){return fr(e,{trace:t,totalMsec:i},t.duration)}))})]})},Bs=function(e){var t=e.editable,n=void 0!==t&&t,r=e.defaultTile,i=void 0===r?"JSON":r,o=e.displayTitle,a=void 0===o||o,u=e.defaultJson,l=void 0===u?"":u,s=e.resetValue,f=void 0===s?"":s,d=e.onClose,h=e.onUpload,p=lo().showInfoMessage,v=_t(X(l),2),m=v[0],y=v[1],g=_t(X(i),2),_=g[0],b=g[1],D=_t(X(""),2),w=D[0],x=D[1],k=_t(X(""),2),C=k[0],E=k[1],A=oe((function(){try{var e=JSON.parse(m),t=e.trace||e;return t.duration_msec?(new xs(t,""),""):xo.traceNotFound}catch(c){return c instanceof Error?c.message:"Unknown error"}}),[m]),S=function(){var e=ts(Xc().mark((function e(){return Xc().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,navigator.clipboard.writeText(m);case 2:p({text:"Formatted JSON has been copied",type:"success"});case 3:case"end":return e.stop()}}),e)})));return function(){return e.apply(this,arguments)}}(),F=function(){E(A),_.trim()||x(xo.emptyTitle),A||w||(h(m,_),d())};return fr("div",{className:Ti()({"vm-json-form":!0,"vm-json-form_one-field":!a}),children:[a&&fr(No,{value:_,label:"Title",error:w,onEnter:F,onChange:function(e){b(e)}}),fr(No,{value:m,label:"JSON",type:"textarea",error:C,autofocus:!0,onChange:function(e){E(""),y(e)},disabled:!n}),fr("div",{className:"vm-json-form-footer",children:[fr("div",{className:"vm-json-form-footer__controls",children:[fr(so,{variant:"outlined",startIcon:fr(Ni,{}),onClick:S,children:"Copy JSON"}),f&&fr(so,{variant:"text",startIcon:fr(ui,{}),onClick:function(){y(f)},children:"Reset JSON"})]}),fr("div",{className:"vm-json-form-footer__controls vm-json-form-footer__controls_right",children:[fr(so,{variant:"outlined",color:"error",onClick:d,children:"Cancel"}),fr(so,{variant:"contained",onClick:F,children:"apply"})]})]})]})},Ms=function(e){var t=e.traces,n=e.jsonEditor,r=void 0!==n&&n,i=e.onDeleteClick,o=_t(X(null),2),a=o[0],u=o[1],l=function(){u(null)};if(!t.length)return fr(ao,{variant:"info",children:"Please re-run the query to see results of the tracing"});var s=function(e){return function(){i(e)}};return fr(m,{children:[fr("div",{className:"vm-tracings-view",children:t.map((function(e){return fr("div",{className:"vm-tracings-view-trace vm-block vm-block_empty-padding",children:[fr("div",{className:"vm-tracings-view-trace-header",children:[fr("h3",{className:"vm-tracings-view-trace-header-title",children:["Trace for ",fr("b",{className:"vm-tracings-view-trace-header-title__query",children:e.queryValue})]}),fr(po,{title:"Open JSON",children:fr(so,{variant:"text",startIcon:fr(ki,{}),onClick:(t=e,function(){u(t)})})}),fr(po,{title:"Remove trace",children:fr(so,{variant:"text",color:"error",startIcon:fr(Ci,{}),onClick:s(e)})})]}),fr("nav",{className:"vm-tracings-view-trace__nav",children:fr(Ts,{trace:e,totalMsec:e.duration})})]},e.idValue);var t}))}),a&&fr(Bo,{title:a.queryValue,onClose:l,children:fr(Bs,{editable:r,displayTitle:r,defaultTile:a.queryValue,defaultJson:a.JSON,resetValue:a.originalJSON,onClose:l,onUpload:function(e,t){if(r&&a)try{a.setTracing(JSON.parse(e)),a.setQuery(t),u(null)}catch(c){console.error(c)}}})})]})},Ls=function(e,t){return oe((function(){var n={};e.forEach((function(e){return Object.entries(e.metric).forEach((function(e){return n[e[0]]?n[e[0]].options.add(e[1]):n[e[0]]={options:new Set([e[1]])}}))}));var r=Object.entries(n).map((function(e){return{key:e[0],variations:e[1].options.size}})).sort((function(e,t){return e.variations-t.variations}));return t?r.filter((function(e){return t.includes(e.key)})):r}),[e,t])},Ps=function(e){var t,n=e.checked,r=void 0!==n&&n,i=e.disabled,o=void 0!==i&&i,a=e.label,u=e.color,l=void 0===u?"secondary":u,c=e.onChange;return fr("div",{className:Ti()((qn(t={"vm-checkbox":!0,"vm-checkbox_disabled":o,"vm-checkbox_active":r},"vm-checkbox_".concat(l,"_active"),r),qn(t,"vm-checkbox_".concat(l),l),t)),onClick:function(){o||c(!r)},children:[fr("div",{className:"vm-checkbox-track",children:fr("div",{className:"vm-checkbox-track__thumb",children:fr(Ai,{})})}),a&&fr("span",{className:"vm-checkbox__label",children:a})]})},$s="Display columns",Rs=function(e){var t=e.data,n=e.defaultColumns,r=e.onChange,i=re(null),o=_t(X(!1),2),a=o[0],u=o[1],l=Ls(t),c=oe((function(){return!l.length}),[l]),s=_t(X(l.map((function(e){return e.key}))),2),f=s[0],d=s[1],h=function(){u(!1),d(n||l.map((function(e){return e.key})))},p=function(e){return function(){!function(e){d((function(t){return f.includes(e)?t.filter((function(t){return t!==e})):[].concat(bt(t),[e])}))}(e)}};return te((function(){d(l.map((function(e){return e.key})))}),[l]),fr("div",{className:"vm-table-settings",children:[fr(po,{title:$s,children:fr("div",{ref:i,children:fr(so,{variant:"text",startIcon:fr(oi,{}),onClick:function(){u((function(e){return!e}))},disabled:c})})}),fr(ho,{open:a,onClose:h,placement:"bottom-right",buttonRef:i,children:fr("div",{className:"vm-table-settings-popper",children:[fr("div",{className:"vm-popper-header",children:[fr("h3",{className:"vm-popper-header__title",children:$s}),fr(so,{onClick:h,startIcon:fr(ai,{}),size:"small"})]}),fr("div",{className:"vm-table-settings-popper-list",children:l.map((function(e){return fr("div",{className:"vm-table-settings-popper-list__item",children:fr(Ps,{checked:f.includes(e.key),onChange:p(e.key),label:e.key})},e.key)}))}),fr("div",{className:"vm-table-settings-popper__footer",children:[fr(so,{color:"error",variant:"outlined",size:"small",onClick:function(){u(!1);var e=l.map((function(e){return e.key}));d(e),r(e)},children:"Reset"}),fr(so,{variant:"contained",size:"small",onClick:function(){u(!1),r(f)},children:"apply"})]})]})})]})};function Is(e){return function(e,t){return Object.fromEntries(Object.entries(e).filter(t))}(e,(function(e){return!!e[1]}))}var js=function(e){var t=e.data,n=e.displayColumns,r=Ls(t,n),i=_t(X(""),2),o=i[0],a=i[1],u=_t(X("asc"),2),l=u[0],c=u[1],s=oe((function(){var e=null===t||void 0===t?void 0:t.map((function(e){return{metadata:r.map((function(t){return e.metric[t.key]||"-"})),value:e.value?e.value[1]:"-"}})),n="Value"===o,i=r.findIndex((function(e){return e.key===o}));return n||-1!==i?e.sort((function(e,t){var r=n?Number(e.value):e.metadata[i],o=n?Number(t.value):t.metadata[i];return("asc"===l?ro)?-1:1})):e}),[r,t,o,l]),f=function(e){return function(){d(e)}},d=function(e){c((function(t){return"asc"===t&&o===e?"desc":"asc"})),a(e)};return s.length?fr("table",{className:"vm-table",children:[fr("thead",{className:"vm-table-header",children:fr("tr",{className:"vm-table__row vm-table__row_header",children:[r.map((function(e,t){return fr("td",{className:"vm-table-cell vm-table-cell_header vm-table-cell_sort",onClick:f(e.key),children:fr("div",{className:"vm-table-cell__content",children:[e.key,fr("div",{className:Ti()({"vm-table__sort-icon":!0,"vm-table__sort-icon_active":o===e.key,"vm-table__sort-icon_desc":"desc"===l&&o===e.key}),children:fr(vi,{})})]})},t)})),fr("td",{className:"vm-table-cell vm-table-cell_header vm-table-cell_right vm-table-cell_sort",onClick:f("Value"),children:fr("div",{className:"vm-table-cell__content",children:[fr("div",{className:Ti()({"vm-table__sort-icon":!0,"vm-table__sort-icon_active":"Value"===o,"vm-table__sort-icon_desc":"desc"===l}),children:fr(vi,{})}),"Value"]})})]})}),fr("tbody",{className:"vm-table-body",children:s.map((function(e,t){return fr("tr",{className:"vm-table__row",children:[e.metadata.map((function(e,n){return fr("td",{className:Ti()({"vm-table-cell vm-table-cell_no-wrap":!0,"vm-table-cell_gray":s[t-1]&&s[t-1].metadata[n]===e}),children:e},n)})),fr("td",{className:"vm-table-cell vm-table-cell_right",children:e.value})]},t)}))})]}):fr(ao,{variant:"warning",children:"No data to show"})},zs=function(){var e=Hi(),t=e.displayType,n=e.isTracingEnabled,r=ni().query,i=Wr().period,o=Qr();!function(){var e=hr().tenantId,t=Hi().displayType,n=ni().query,r=Wr(),i=r.duration,o=r.relativeTime,a=r.period,u=a.date,l=a.step,c=function(){var r={};n.forEach((function(n,a){var c,s="g".concat(a);r["".concat(s,".expr")]=n,r["".concat(s,".range_input")]=i,r["".concat(s,".end_input")]=u,r["".concat(s,".step_input")]=l,r["".concat(s,".tab")]=(null===(c=Pi.find((function(e){return e.value===t})))||void 0===c?void 0:c.prometheusCode)||0,r["".concat(s,".relative_time")]=o,r["".concat(s,".tenantID")]=e})),ar(Is(r))};te(c,[e,t,n,i,o,u,l]),te(c,[])}();var a=_t(X(),2),u=a[0],l=a[1],c=_t(X([]),2),s=c[0],f=c[1],d=_t(X([]),2),h=d[0],p=d[1],v=ue(Wi).state,m=v.customStep,y=v.yaxis,g=Qi(),_=Ns().queryOptions,b=ks({visible:!0,customStep:m,hideQuery:h}),D=b.isLoading,w=b.liveData,x=b.graphData,k=b.error,C=b.warning,E=b.traces,A=function(e){g({type:"SET_YAXIS_LIMITS",payload:e})};return te((function(){E&&f([].concat(bt(s),bt(E)))}),[E]),te((function(){f([])}),[t]),fr("div",{className:"vm-custom-panel",children:[fr(_s,{error:k,queryOptions:_,onHideQuery:function(e){p(e)}}),n&&fr("div",{className:"vm-custom-panel__trace",children:fr(Ms,{traces:s,onDeleteClick:function(e){var t=s.filter((function(t){return t.idValue!==e.idValue}));f(bt(t))}})}),D&&fr(Fs,{}),k&&fr(ao,{variant:"error",children:k}),C&&fr(ao,{variant:"warning",children:C}),fr("div",{className:"vm-custom-panel-body vm-block",children:[fr("div",{className:"vm-custom-panel-body-header",children:[fr($i,{}),"chart"===t&&fr(Ss,{yaxis:y,setYaxisLimits:A,toggleEnableLimits:function(){g({type:"TOGGLE_ENABLE_YAXIS_LIMITS"})}}),"table"===t&&fr(Rs,{data:w||[],defaultColumns:u,onChange:l})]}),x&&i&&"chart"===t&&fr(ss,{data:x,period:i,customStep:m,query:r,yaxis:y,setYaxisLimits:A,setPeriod:function(e){var t=e.from,n=e.to;o({type:"SET_PERIOD",payload:{from:t,to:n}})}}),w&&"code"===t&&fr(Cs,{data:w}),w&&"table"===t&&fr(js,{data:w,displayColumns:u})]})]})},Us=function(){var e=ts(Xc().mark((function e(t){var n,r;return Xc().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,fetch("./dashboards/".concat(t));case 2:return n=e.sent,e.next=5,n.json();case 5:return r=e.sent,e.abrupt("return",r);case 7:case"end":return e.stop()}}),e)})));return function(t){return e.apply(this,arguments)}}(),Hs=ts(Xc().mark((function e(){var t;return Xc().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return t=window.__VMUI_PREDEFINED_DASHBOARDS__,e.next=3,Promise.all(t.map(function(){var e=ts(Xc().mark((function e(t){return Xc().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.abrupt("return",Us(t));case 1:case"end":return e.stop()}}),e)})));return function(t){return e.apply(this,arguments)}}()));case 3:return e.abrupt("return",e.sent);case 4:case"end":return e.stop()}}),e)})));function Ys(){return{async:!1,baseUrl:null,breaks:!1,extensions:null,gfm:!0,headerIds:!0,headerPrefix:"",highlight:null,langPrefix:"language-",mangle:!0,pedantic:!1,renderer:null,sanitize:!1,sanitizer:null,silent:!1,smartypants:!1,tokenizer:null,walkTokens:null,xhtml:!1}}var Vs={async:!1,baseUrl:null,breaks:!1,extensions:null,gfm:!0,headerIds:!0,headerPrefix:"",highlight:null,langPrefix:"language-",mangle:!0,pedantic:!1,renderer:null,sanitize:!1,sanitizer:null,silent:!1,smartypants:!1,tokenizer:null,walkTokens:null,xhtml:!1};var qs=/[&<>"']/,Ws=/[&<>"']/g,Qs=/[<>"']|&(?!#?\w+;)/,Gs=/[<>"']|&(?!#?\w+;)/g,Js={"&":"&","<":"<",">":">",'"':""","'":"'"},Zs=function(e){return Js[e]};function Ks(e,t){if(t){if(qs.test(e))return e.replace(Ws,Zs)}else if(Qs.test(e))return e.replace(Gs,Zs);return e}var Xs=/&(#(?:\d+)|(?:#x[0-9A-Fa-f]+)|(?:\w+));?/gi;function ef(e){return e.replace(Xs,(function(e,t){return"colon"===(t=t.toLowerCase())?":":"#"===t.charAt(0)?"x"===t.charAt(1)?String.fromCharCode(parseInt(t.substring(2),16)):String.fromCharCode(+t.substring(1)):""}))}var tf=/(^|[^\[])\^/g;function nf(e,t){e="string"===typeof e?e:e.source,t=t||"";var n={replace:function(t,r){return r=(r=r.source||r).replace(tf,"$1"),e=e.replace(t,r),n},getRegex:function(){return new RegExp(e,t)}};return n}var rf=/[^\w:]/g,of=/^$|^[a-z][a-z0-9+.-]*:|^[?#]/i;function af(e,t,n){if(e){var r;try{r=decodeURIComponent(ef(n)).replace(rf,"").toLowerCase()}catch(c){return null}if(0===r.indexOf("javascript:")||0===r.indexOf("vbscript:")||0===r.indexOf("data:"))return null}t&&!of.test(n)&&(n=function(e,t){uf[" "+e]||(lf.test(e)?uf[" "+e]=e+"/":uf[" "+e]=pf(e,"/",!0));var n=-1===(e=uf[" "+e]).indexOf(":");return"//"===t.substring(0,2)?n?t:e.replace(cf,"$1")+t:"/"===t.charAt(0)?n?t:e.replace(sf,"$1")+t:e+t}(t,n));try{n=encodeURI(n).replace(/%25/g,"%")}catch(c){return null}return n}var uf={},lf=/^[^:]+:\/*[^/]*$/,cf=/^([^:]+:)[\s\S]*$/,sf=/^([^:]+:\/*[^/]*)[\s\S]*$/;var ff={exec:function(){}};function df(e){for(var t,n,r=1;r=0&&"\\"===n[i];)r=!r;return r?"|":" |"})).split(/ \|/),r=0;if(n[0].trim()||n.shift(),n.length>0&&!n[n.length-1].trim()&&n.pop(),n.length>t)n.splice(t);else for(;n.length1;)1&t&&(n+=e),t>>=1,e+=e;return n+e}function yf(e,t,n,r){var i=t.href,o=t.title?Ks(t.title):null,a=e[1].replace(/\\([\[\]])/g,"$1");if("!"!==e[0].charAt(0)){r.state.inLink=!0;var u={type:"link",raw:n,href:i,title:o,text:a,tokens:r.inlineTokens(a)};return r.state.inLink=!1,u}return{type:"image",raw:n,href:i,title:o,text:Ks(a)}}var gf=function(){function e(t){Dt(this,e),this.options=t||Vs}return xt(e,[{key:"space",value:function(e){var t=this.rules.block.newline.exec(e);if(t&&t[0].length>0)return{type:"space",raw:t[0]}}},{key:"code",value:function(e){var t=this.rules.block.code.exec(e);if(t){var n=t[0].replace(/^ {1,4}/gm,"");return{type:"code",raw:t[0],codeBlockStyle:"indented",text:this.options.pedantic?n:pf(n,"\n")}}}},{key:"fences",value:function(e){var t=this.rules.block.fences.exec(e);if(t){var n=t[0],r=function(e,t){var n=e.match(/^(\s+)(?:```)/);if(null===n)return t;var r=n[1];return t.split("\n").map((function(e){var t=e.match(/^\s+/);return null===t?e:_t(t,1)[0].length>=r.length?e.slice(r.length):e})).join("\n")}(n,t[3]||"");return{type:"code",raw:n,lang:t[2]?t[2].trim().replace(this.rules.inline._escapes,"$1"):t[2],text:r}}}},{key:"heading",value:function(e){var t=this.rules.block.heading.exec(e);if(t){var n=t[2].trim();if(/#$/.test(n)){var r=pf(n,"#");this.options.pedantic?n=r.trim():r&&!/ $/.test(r)||(n=r.trim())}return{type:"heading",raw:t[0],depth:t[1].length,text:n,tokens:this.lexer.inline(n)}}}},{key:"hr",value:function(e){var t=this.rules.block.hr.exec(e);if(t)return{type:"hr",raw:t[0]}}},{key:"blockquote",value:function(e){var t=this.rules.block.blockquote.exec(e);if(t){var n=t[0].replace(/^ *>[ \t]?/gm,"");return{type:"blockquote",raw:t[0],tokens:this.lexer.blockTokens(n,[]),text:n}}}},{key:"list",value:function(e){var t=this.rules.block.list.exec(e);if(t){var n,r,i,o,a,u,l,c,s,f,d,h,p=t[1].trim(),v=p.length>1,m={type:"list",raw:"",ordered:v,start:v?+p.slice(0,-1):"",loose:!1,items:[]};p=v?"\\d{1,9}\\".concat(p.slice(-1)):"\\".concat(p),this.options.pedantic&&(p=v?p:"[*+-]");for(var y=new RegExp("^( {0,3}".concat(p,")((?:[\t ][^\\n]*)?(?:\\n|$))"));e&&(h=!1,t=y.exec(e))&&!this.rules.block.hr.test(e);){if(n=t[0],e=e.substring(n.length),c=t[2].split("\n",1)[0],s=e.split("\n",1)[0],this.options.pedantic?(o=2,d=c.trimLeft()):(o=(o=t[2].search(/[^ ]/))>4?1:o,d=c.slice(o),o+=t[1].length),u=!1,!c&&/^ *$/.test(s)&&(n+=s+"\n",e=e.substring(s.length+1),h=!0),!h)for(var g=new RegExp("^ {0,".concat(Math.min(3,o-1),"}(?:[*+-]|\\d{1,9}[.)])((?: [^\\n]*)?(?:\\n|$))")),_=new RegExp("^ {0,".concat(Math.min(3,o-1),"}((?:- *){3,}|(?:_ *){3,}|(?:\\* *){3,})(?:\\n+|$)")),b=new RegExp("^ {0,".concat(Math.min(3,o-1),"}(?:```|~~~)")),D=new RegExp("^ {0,".concat(Math.min(3,o-1),"}#"));e&&(c=f=e.split("\n",1)[0],this.options.pedantic&&(c=c.replace(/^ {1,4}(?=( {4})*[^ ])/g," ")),!b.test(c))&&!D.test(c)&&!g.test(c)&&!_.test(e);){if(c.search(/[^ ]/)>=o||!c.trim())d+="\n"+c.slice(o);else{if(u)break;d+="\n"+c}u||c.trim()||(u=!0),n+=f+"\n",e=e.substring(f.length+1)}m.loose||(l?m.loose=!0:/\n *\n *$/.test(n)&&(l=!0)),this.options.gfm&&(r=/^\[[ xX]\] /.exec(d))&&(i="[ ] "!==r[0],d=d.replace(/^\[[ xX]\] +/,"")),m.items.push({type:"list_item",raw:n,task:!!r,checked:i,loose:!1,text:d}),m.raw+=n}m.items[m.items.length-1].raw=n.trimRight(),m.items[m.items.length-1].text=d.trimRight(),m.raw=m.raw.trimRight();var w=m.items.length;for(a=0;a1)return!0}}catch(i){r.e(i)}finally{r.f()}return!1}));!m.loose&&x.length&&k&&(m.loose=!0,m.items[a].loose=!0)}return m}}},{key:"html",value:function(e){var t=this.rules.block.html.exec(e);if(t){var n={type:"html",raw:t[0],pre:!this.options.sanitizer&&("pre"===t[1]||"script"===t[1]||"style"===t[1]),text:t[0]};if(this.options.sanitize){var r=this.options.sanitizer?this.options.sanitizer(t[0]):Ks(t[0]);n.type="paragraph",n.text=r,n.tokens=this.lexer.inline(r)}return n}}},{key:"def",value:function(e){var t=this.rules.block.def.exec(e);if(t)return t[3]&&(t[3]=t[3].substring(1,t[3].length-1)),{type:"def",tag:t[1].toLowerCase().replace(/\s+/g," "),raw:t[0],href:t[2]?t[2].replace(this.rules.inline._escapes,"$1"):t[2],title:t[3]?t[3].replace(this.rules.inline._escapes,"$1"):t[3]}}},{key:"table",value:function(e){var t=this.rules.block.table.exec(e);if(t){var n={type:"table",header:hf(t[1]).map((function(e){return{text:e}})),align:t[2].replace(/^ *|\| *$/g,"").split(/ *\| */),rows:t[3]&&t[3].trim()?t[3].replace(/\n[ \t]*$/,"").split("\n"):[]};if(n.header.length===n.align.length){n.raw=t[0];var r,i,o,a,u=n.align.length;for(r=0;r/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:this.options.sanitize?"text":"html",raw:t[0],inLink:this.lexer.state.inLink,inRawBlock:this.lexer.state.inRawBlock,text:this.options.sanitize?this.options.sanitizer?this.options.sanitizer(t[0]):Ks(t[0]):t[0]}}},{key:"link",value:function(e){var t=this.rules.inline.link.exec(e);if(t){var n=t[2].trim();if(!this.options.pedantic&&/^$/.test(n))return;var r=pf(n.slice(0,-1),"\\");if((n.length-r.length)%2===0)return}else{var i=function(e,t){if(-1===e.indexOf(t[1]))return-1;for(var n=e.length,r=0,i=0;i-1){var o=(0===t[0].indexOf("!")?5:4)+t[1].length+i;t[2]=t[2].substring(0,i),t[0]=t[0].substring(0,o).trim(),t[3]=""}}var a=t[2],u="";if(this.options.pedantic){var l=/^([^'"]*[^\s])\s+(['"])(.*)\2/.exec(a);l&&(a=l[1],u=l[3])}else u=t[3]?t[3].slice(1,-1):"";return a=a.trim(),/^$/.test(n)?a.slice(1):a.slice(1,-1)),yf(t,{href:a?a.replace(this.rules.inline._escapes,"$1"):a,title:u?u.replace(this.rules.inline._escapes,"$1"):u},t[0],this.lexer)}}},{key:"reflink",value:function(e,t){var n;if((n=this.rules.inline.reflink.exec(e))||(n=this.rules.inline.nolink.exec(e))){var r=(n[2]||n[1]).replace(/\s+/g," ");if(!(r=t[r.toLowerCase()])||!r.href){var i=n[0].charAt(0);return{type:"text",raw:i,text:i}}return yf(n,r,n[0],this.lexer)}}},{key:"emStrong",value:function(e,t){var n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:"",r=this.rules.inline.emStrong.lDelim.exec(e);if(r&&(!r[3]||!n.match(/(?:[0-9A-Za-z\xAA\xB2\xB3\xB5\xB9\xBA\xBC-\xBE\xC0-\xD6\xD8-\xF6\xF8-\u02C1\u02C6-\u02D1\u02E0-\u02E4\u02EC\u02EE\u0370-\u0374\u0376\u0377\u037A-\u037D\u037F\u0386\u0388-\u038A\u038C\u038E-\u03A1\u03A3-\u03F5\u03F7-\u0481\u048A-\u052F\u0531-\u0556\u0559\u0560-\u0588\u05D0-\u05EA\u05EF-\u05F2\u0620-\u064A\u0660-\u0669\u066E\u066F\u0671-\u06D3\u06D5\u06E5\u06E6\u06EE-\u06FC\u06FF\u0710\u0712-\u072F\u074D-\u07A5\u07B1\u07C0-\u07EA\u07F4\u07F5\u07FA\u0800-\u0815\u081A\u0824\u0828\u0840-\u0858\u0860-\u086A\u0870-\u0887\u0889-\u088E\u08A0-\u08C9\u0904-\u0939\u093D\u0950\u0958-\u0961\u0966-\u096F\u0971-\u0980\u0985-\u098C\u098F\u0990\u0993-\u09A8\u09AA-\u09B0\u09B2\u09B6-\u09B9\u09BD\u09CE\u09DC\u09DD\u09DF-\u09E1\u09E6-\u09F1\u09F4-\u09F9\u09FC\u0A05-\u0A0A\u0A0F\u0A10\u0A13-\u0A28\u0A2A-\u0A30\u0A32\u0A33\u0A35\u0A36\u0A38\u0A39\u0A59-\u0A5C\u0A5E\u0A66-\u0A6F\u0A72-\u0A74\u0A85-\u0A8D\u0A8F-\u0A91\u0A93-\u0AA8\u0AAA-\u0AB0\u0AB2\u0AB3\u0AB5-\u0AB9\u0ABD\u0AD0\u0AE0\u0AE1\u0AE6-\u0AEF\u0AF9\u0B05-\u0B0C\u0B0F\u0B10\u0B13-\u0B28\u0B2A-\u0B30\u0B32\u0B33\u0B35-\u0B39\u0B3D\u0B5C\u0B5D\u0B5F-\u0B61\u0B66-\u0B6F\u0B71-\u0B77\u0B83\u0B85-\u0B8A\u0B8E-\u0B90\u0B92-\u0B95\u0B99\u0B9A\u0B9C\u0B9E\u0B9F\u0BA3\u0BA4\u0BA8-\u0BAA\u0BAE-\u0BB9\u0BD0\u0BE6-\u0BF2\u0C05-\u0C0C\u0C0E-\u0C10\u0C12-\u0C28\u0C2A-\u0C39\u0C3D\u0C58-\u0C5A\u0C5D\u0C60\u0C61\u0C66-\u0C6F\u0C78-\u0C7E\u0C80\u0C85-\u0C8C\u0C8E-\u0C90\u0C92-\u0CA8\u0CAA-\u0CB3\u0CB5-\u0CB9\u0CBD\u0CDD\u0CDE\u0CE0\u0CE1\u0CE6-\u0CEF\u0CF1\u0CF2\u0D04-\u0D0C\u0D0E-\u0D10\u0D12-\u0D3A\u0D3D\u0D4E\u0D54-\u0D56\u0D58-\u0D61\u0D66-\u0D78\u0D7A-\u0D7F\u0D85-\u0D96\u0D9A-\u0DB1\u0DB3-\u0DBB\u0DBD\u0DC0-\u0DC6\u0DE6-\u0DEF\u0E01-\u0E30\u0E32\u0E33\u0E40-\u0E46\u0E50-\u0E59\u0E81\u0E82\u0E84\u0E86-\u0E8A\u0E8C-\u0EA3\u0EA5\u0EA7-\u0EB0\u0EB2\u0EB3\u0EBD\u0EC0-\u0EC4\u0EC6\u0ED0-\u0ED9\u0EDC-\u0EDF\u0F00\u0F20-\u0F33\u0F40-\u0F47\u0F49-\u0F6C\u0F88-\u0F8C\u1000-\u102A\u103F-\u1049\u1050-\u1055\u105A-\u105D\u1061\u1065\u1066\u106E-\u1070\u1075-\u1081\u108E\u1090-\u1099\u10A0-\u10C5\u10C7\u10CD\u10D0-\u10FA\u10FC-\u1248\u124A-\u124D\u1250-\u1256\u1258\u125A-\u125D\u1260-\u1288\u128A-\u128D\u1290-\u12B0\u12B2-\u12B5\u12B8-\u12BE\u12C0\u12C2-\u12C5\u12C8-\u12D6\u12D8-\u1310\u1312-\u1315\u1318-\u135A\u1369-\u137C\u1380-\u138F\u13A0-\u13F5\u13F8-\u13FD\u1401-\u166C\u166F-\u167F\u1681-\u169A\u16A0-\u16EA\u16EE-\u16F8\u1700-\u1711\u171F-\u1731\u1740-\u1751\u1760-\u176C\u176E-\u1770\u1780-\u17B3\u17D7\u17DC\u17E0-\u17E9\u17F0-\u17F9\u1810-\u1819\u1820-\u1878\u1880-\u1884\u1887-\u18A8\u18AA\u18B0-\u18F5\u1900-\u191E\u1946-\u196D\u1970-\u1974\u1980-\u19AB\u19B0-\u19C9\u19D0-\u19DA\u1A00-\u1A16\u1A20-\u1A54\u1A80-\u1A89\u1A90-\u1A99\u1AA7\u1B05-\u1B33\u1B45-\u1B4C\u1B50-\u1B59\u1B83-\u1BA0\u1BAE-\u1BE5\u1C00-\u1C23\u1C40-\u1C49\u1C4D-\u1C7D\u1C80-\u1C88\u1C90-\u1CBA\u1CBD-\u1CBF\u1CE9-\u1CEC\u1CEE-\u1CF3\u1CF5\u1CF6\u1CFA\u1D00-\u1DBF\u1E00-\u1F15\u1F18-\u1F1D\u1F20-\u1F45\u1F48-\u1F4D\u1F50-\u1F57\u1F59\u1F5B\u1F5D\u1F5F-\u1F7D\u1F80-\u1FB4\u1FB6-\u1FBC\u1FBE\u1FC2-\u1FC4\u1FC6-\u1FCC\u1FD0-\u1FD3\u1FD6-\u1FDB\u1FE0-\u1FEC\u1FF2-\u1FF4\u1FF6-\u1FFC\u2070\u2071\u2074-\u2079\u207F-\u2089\u2090-\u209C\u2102\u2107\u210A-\u2113\u2115\u2119-\u211D\u2124\u2126\u2128\u212A-\u212D\u212F-\u2139\u213C-\u213F\u2145-\u2149\u214E\u2150-\u2189\u2460-\u249B\u24EA-\u24FF\u2776-\u2793\u2C00-\u2CE4\u2CEB-\u2CEE\u2CF2\u2CF3\u2CFD\u2D00-\u2D25\u2D27\u2D2D\u2D30-\u2D67\u2D6F\u2D80-\u2D96\u2DA0-\u2DA6\u2DA8-\u2DAE\u2DB0-\u2DB6\u2DB8-\u2DBE\u2DC0-\u2DC6\u2DC8-\u2DCE\u2DD0-\u2DD6\u2DD8-\u2DDE\u2E2F\u3005-\u3007\u3021-\u3029\u3031-\u3035\u3038-\u303C\u3041-\u3096\u309D-\u309F\u30A1-\u30FA\u30FC-\u30FF\u3105-\u312F\u3131-\u318E\u3192-\u3195\u31A0-\u31BF\u31F0-\u31FF\u3220-\u3229\u3248-\u324F\u3251-\u325F\u3280-\u3289\u32B1-\u32BF\u3400-\u4DBF\u4E00-\uA48C\uA4D0-\uA4FD\uA500-\uA60C\uA610-\uA62B\uA640-\uA66E\uA67F-\uA69D\uA6A0-\uA6EF\uA717-\uA71F\uA722-\uA788\uA78B-\uA7CA\uA7D0\uA7D1\uA7D3\uA7D5-\uA7D9\uA7F2-\uA801\uA803-\uA805\uA807-\uA80A\uA80C-\uA822\uA830-\uA835\uA840-\uA873\uA882-\uA8B3\uA8D0-\uA8D9\uA8F2-\uA8F7\uA8FB\uA8FD\uA8FE\uA900-\uA925\uA930-\uA946\uA960-\uA97C\uA984-\uA9B2\uA9CF-\uA9D9\uA9E0-\uA9E4\uA9E6-\uA9FE\uAA00-\uAA28\uAA40-\uAA42\uAA44-\uAA4B\uAA50-\uAA59\uAA60-\uAA76\uAA7A\uAA7E-\uAAAF\uAAB1\uAAB5\uAAB6\uAAB9-\uAABD\uAAC0\uAAC2\uAADB-\uAADD\uAAE0-\uAAEA\uAAF2-\uAAF4\uAB01-\uAB06\uAB09-\uAB0E\uAB11-\uAB16\uAB20-\uAB26\uAB28-\uAB2E\uAB30-\uAB5A\uAB5C-\uAB69\uAB70-\uABE2\uABF0-\uABF9\uAC00-\uD7A3\uD7B0-\uD7C6\uD7CB-\uD7FB\uF900-\uFA6D\uFA70-\uFAD9\uFB00-\uFB06\uFB13-\uFB17\uFB1D\uFB1F-\uFB28\uFB2A-\uFB36\uFB38-\uFB3C\uFB3E\uFB40\uFB41\uFB43\uFB44\uFB46-\uFBB1\uFBD3-\uFD3D\uFD50-\uFD8F\uFD92-\uFDC7\uFDF0-\uFDFB\uFE70-\uFE74\uFE76-\uFEFC\uFF10-\uFF19\uFF21-\uFF3A\uFF41-\uFF5A\uFF66-\uFFBE\uFFC2-\uFFC7\uFFCA-\uFFCF\uFFD2-\uFFD7\uFFDA-\uFFDC]|\uD800[\uDC00-\uDC0B\uDC0D-\uDC26\uDC28-\uDC3A\uDC3C\uDC3D\uDC3F-\uDC4D\uDC50-\uDC5D\uDC80-\uDCFA\uDD07-\uDD33\uDD40-\uDD78\uDD8A\uDD8B\uDE80-\uDE9C\uDEA0-\uDED0\uDEE1-\uDEFB\uDF00-\uDF23\uDF2D-\uDF4A\uDF50-\uDF75\uDF80-\uDF9D\uDFA0-\uDFC3\uDFC8-\uDFCF\uDFD1-\uDFD5]|\uD801[\uDC00-\uDC9D\uDCA0-\uDCA9\uDCB0-\uDCD3\uDCD8-\uDCFB\uDD00-\uDD27\uDD30-\uDD63\uDD70-\uDD7A\uDD7C-\uDD8A\uDD8C-\uDD92\uDD94\uDD95\uDD97-\uDDA1\uDDA3-\uDDB1\uDDB3-\uDDB9\uDDBB\uDDBC\uDE00-\uDF36\uDF40-\uDF55\uDF60-\uDF67\uDF80-\uDF85\uDF87-\uDFB0\uDFB2-\uDFBA]|\uD802[\uDC00-\uDC05\uDC08\uDC0A-\uDC35\uDC37\uDC38\uDC3C\uDC3F-\uDC55\uDC58-\uDC76\uDC79-\uDC9E\uDCA7-\uDCAF\uDCE0-\uDCF2\uDCF4\uDCF5\uDCFB-\uDD1B\uDD20-\uDD39\uDD80-\uDDB7\uDDBC-\uDDCF\uDDD2-\uDE00\uDE10-\uDE13\uDE15-\uDE17\uDE19-\uDE35\uDE40-\uDE48\uDE60-\uDE7E\uDE80-\uDE9F\uDEC0-\uDEC7\uDEC9-\uDEE4\uDEEB-\uDEEF\uDF00-\uDF35\uDF40-\uDF55\uDF58-\uDF72\uDF78-\uDF91\uDFA9-\uDFAF]|\uD803[\uDC00-\uDC48\uDC80-\uDCB2\uDCC0-\uDCF2\uDCFA-\uDD23\uDD30-\uDD39\uDE60-\uDE7E\uDE80-\uDEA9\uDEB0\uDEB1\uDF00-\uDF27\uDF30-\uDF45\uDF51-\uDF54\uDF70-\uDF81\uDFB0-\uDFCB\uDFE0-\uDFF6]|\uD804[\uDC03-\uDC37\uDC52-\uDC6F\uDC71\uDC72\uDC75\uDC83-\uDCAF\uDCD0-\uDCE8\uDCF0-\uDCF9\uDD03-\uDD26\uDD36-\uDD3F\uDD44\uDD47\uDD50-\uDD72\uDD76\uDD83-\uDDB2\uDDC1-\uDDC4\uDDD0-\uDDDA\uDDDC\uDDE1-\uDDF4\uDE00-\uDE11\uDE13-\uDE2B\uDE3F\uDE40\uDE80-\uDE86\uDE88\uDE8A-\uDE8D\uDE8F-\uDE9D\uDE9F-\uDEA8\uDEB0-\uDEDE\uDEF0-\uDEF9\uDF05-\uDF0C\uDF0F\uDF10\uDF13-\uDF28\uDF2A-\uDF30\uDF32\uDF33\uDF35-\uDF39\uDF3D\uDF50\uDF5D-\uDF61]|\uD805[\uDC00-\uDC34\uDC47-\uDC4A\uDC50-\uDC59\uDC5F-\uDC61\uDC80-\uDCAF\uDCC4\uDCC5\uDCC7\uDCD0-\uDCD9\uDD80-\uDDAE\uDDD8-\uDDDB\uDE00-\uDE2F\uDE44\uDE50-\uDE59\uDE80-\uDEAA\uDEB8\uDEC0-\uDEC9\uDF00-\uDF1A\uDF30-\uDF3B\uDF40-\uDF46]|\uD806[\uDC00-\uDC2B\uDCA0-\uDCF2\uDCFF-\uDD06\uDD09\uDD0C-\uDD13\uDD15\uDD16\uDD18-\uDD2F\uDD3F\uDD41\uDD50-\uDD59\uDDA0-\uDDA7\uDDAA-\uDDD0\uDDE1\uDDE3\uDE00\uDE0B-\uDE32\uDE3A\uDE50\uDE5C-\uDE89\uDE9D\uDEB0-\uDEF8]|\uD807[\uDC00-\uDC08\uDC0A-\uDC2E\uDC40\uDC50-\uDC6C\uDC72-\uDC8F\uDD00-\uDD06\uDD08\uDD09\uDD0B-\uDD30\uDD46\uDD50-\uDD59\uDD60-\uDD65\uDD67\uDD68\uDD6A-\uDD89\uDD98\uDDA0-\uDDA9\uDEE0-\uDEF2\uDF02\uDF04-\uDF10\uDF12-\uDF33\uDF50-\uDF59\uDFB0\uDFC0-\uDFD4]|\uD808[\uDC00-\uDF99]|\uD809[\uDC00-\uDC6E\uDC80-\uDD43]|\uD80B[\uDF90-\uDFF0]|[\uD80C\uD81C-\uD820\uD822\uD840-\uD868\uD86A-\uD86C\uD86F-\uD872\uD874-\uD879\uD880-\uD883\uD885-\uD887][\uDC00-\uDFFF]|\uD80D[\uDC00-\uDC2F\uDC41-\uDC46]|\uD811[\uDC00-\uDE46]|\uD81A[\uDC00-\uDE38\uDE40-\uDE5E\uDE60-\uDE69\uDE70-\uDEBE\uDEC0-\uDEC9\uDED0-\uDEED\uDF00-\uDF2F\uDF40-\uDF43\uDF50-\uDF59\uDF5B-\uDF61\uDF63-\uDF77\uDF7D-\uDF8F]|\uD81B[\uDE40-\uDE96\uDF00-\uDF4A\uDF50\uDF93-\uDF9F\uDFE0\uDFE1\uDFE3]|\uD821[\uDC00-\uDFF7]|\uD823[\uDC00-\uDCD5\uDD00-\uDD08]|\uD82B[\uDFF0-\uDFF3\uDFF5-\uDFFB\uDFFD\uDFFE]|\uD82C[\uDC00-\uDD22\uDD32\uDD50-\uDD52\uDD55\uDD64-\uDD67\uDD70-\uDEFB]|\uD82F[\uDC00-\uDC6A\uDC70-\uDC7C\uDC80-\uDC88\uDC90-\uDC99]|\uD834[\uDEC0-\uDED3\uDEE0-\uDEF3\uDF60-\uDF78]|\uD835[\uDC00-\uDC54\uDC56-\uDC9C\uDC9E\uDC9F\uDCA2\uDCA5\uDCA6\uDCA9-\uDCAC\uDCAE-\uDCB9\uDCBB\uDCBD-\uDCC3\uDCC5-\uDD05\uDD07-\uDD0A\uDD0D-\uDD14\uDD16-\uDD1C\uDD1E-\uDD39\uDD3B-\uDD3E\uDD40-\uDD44\uDD46\uDD4A-\uDD50\uDD52-\uDEA5\uDEA8-\uDEC0\uDEC2-\uDEDA\uDEDC-\uDEFA\uDEFC-\uDF14\uDF16-\uDF34\uDF36-\uDF4E\uDF50-\uDF6E\uDF70-\uDF88\uDF8A-\uDFA8\uDFAA-\uDFC2\uDFC4-\uDFCB\uDFCE-\uDFFF]|\uD837[\uDF00-\uDF1E\uDF25-\uDF2A]|\uD838[\uDC30-\uDC6D\uDD00-\uDD2C\uDD37-\uDD3D\uDD40-\uDD49\uDD4E\uDE90-\uDEAD\uDEC0-\uDEEB\uDEF0-\uDEF9]|\uD839[\uDCD0-\uDCEB\uDCF0-\uDCF9\uDFE0-\uDFE6\uDFE8-\uDFEB\uDFED\uDFEE\uDFF0-\uDFFE]|\uD83A[\uDC00-\uDCC4\uDCC7-\uDCCF\uDD00-\uDD43\uDD4B\uDD50-\uDD59]|\uD83B[\uDC71-\uDCAB\uDCAD-\uDCAF\uDCB1-\uDCB4\uDD01-\uDD2D\uDD2F-\uDD3D\uDE00-\uDE03\uDE05-\uDE1F\uDE21\uDE22\uDE24\uDE27\uDE29-\uDE32\uDE34-\uDE37\uDE39\uDE3B\uDE42\uDE47\uDE49\uDE4B\uDE4D-\uDE4F\uDE51\uDE52\uDE54\uDE57\uDE59\uDE5B\uDE5D\uDE5F\uDE61\uDE62\uDE64\uDE67-\uDE6A\uDE6C-\uDE72\uDE74-\uDE77\uDE79-\uDE7C\uDE7E\uDE80-\uDE89\uDE8B-\uDE9B\uDEA1-\uDEA3\uDEA5-\uDEA9\uDEAB-\uDEBB]|\uD83C[\uDD00-\uDD0C]|\uD83E[\uDFF0-\uDFF9]|\uD869[\uDC00-\uDEDF\uDF00-\uDFFF]|\uD86D[\uDC00-\uDF39\uDF40-\uDFFF]|\uD86E[\uDC00-\uDC1D\uDC20-\uDFFF]|\uD873[\uDC00-\uDEA1\uDEB0-\uDFFF]|\uD87A[\uDC00-\uDFE0]|\uD87E[\uDC00-\uDE1D]|\uD884[\uDC00-\uDF4A\uDF50-\uDFFF]|\uD888[\uDC00-\uDFAF])/))){var i=r[1]||r[2]||"";if(!i||i&&(""===n||this.rules.inline.punctuation.exec(n))){var o,a,u=r[0].length-1,l=u,c=0,s="*"===r[0][0]?this.rules.inline.emStrong.rDelimAst:this.rules.inline.emStrong.rDelimUnd;for(s.lastIndex=0,t=t.slice(-1*e.length+u);null!=(r=s.exec(t));)if(o=r[1]||r[2]||r[3]||r[4]||r[5]||r[6])if(a=o.length,r[3]||r[4])l+=a;else if(!((r[5]||r[6])&&u%3)||(u+a)%3){if(!((l-=a)>0)){a=Math.min(a,a+l+c);var f=e.slice(0,u+r.index+(r[0].length-o.length)+a);if(Math.min(u,a)%2){var d=f.slice(1,-1);return{type:"em",raw:f,text:d,tokens:this.lexer.inlineTokens(d)}}var h=f.slice(2,-2);return{type:"strong",raw:f,text:h,tokens:this.lexer.inlineTokens(h)}}}else c+=a}}}},{key:"codespan",value:function(e){var t=this.rules.inline.code.exec(e);if(t){var n=t[2].replace(/\n/g," "),r=/[^ ]/.test(n),i=/^ /.test(n)&&/ $/.test(n);return r&&i&&(n=n.substring(1,n.length-1)),n=Ks(n,!0),{type:"codespan",raw:t[0],text:n}}}},{key:"br",value:function(e){var t=this.rules.inline.br.exec(e);if(t)return{type:"br",raw:t[0]}}},{key:"del",value:function(e){var t=this.rules.inline.del.exec(e);if(t)return{type:"del",raw:t[0],text:t[2],tokens:this.lexer.inlineTokens(t[2])}}},{key:"autolink",value:function(e,t){var n,r,i=this.rules.inline.autolink.exec(e);if(i)return r="@"===i[2]?"mailto:"+(n=Ks(this.options.mangle?t(i[1]):i[1])):n=Ks(i[1]),{type:"link",raw:i[0],text:n,href:r,tokens:[{type:"text",raw:n,text:n}]}}},{key:"url",value:function(e,t){var n;if(n=this.rules.inline.url.exec(e)){var r,i;if("@"===n[2])i="mailto:"+(r=Ks(this.options.mangle?t(n[0]):n[0]));else{var o;do{o=n[0],n[0]=this.rules.inline._backpedal.exec(n[0])[0]}while(o!==n[0]);r=Ks(n[0]),i="www."===n[1]?"http://"+r:r}return{type:"link",raw:n[0],text:r,href:i,tokens:[{type:"text",raw:r,text:r}]}}}},{key:"inlineText",value:function(e,t){var n,r=this.rules.inline.text.exec(e);if(r)return n=this.lexer.state.inRawBlock?this.options.sanitize?this.options.sanitizer?this.options.sanitizer(r[0]):Ks(r[0]):r[0]:Ks(this.options.smartypants?t(r[0]):r[0]),{type:"text",raw:r[0],text:n}}}]),e}(),_f={newline:/^(?: *(?:\n|$))+/,code:/^( {4}[^\n]+(?:\n(?: *(?:\n|$))*)?)+/,fences:/^ {0,3}(`{3,}(?=[^`\n]*\n)|~{3,})([^\n]*)\n(?:|([\s\S]*?)\n)(?: {0,3}\1[~`]* *(?=\n|$)|$)/,hr:/^ {0,3}((?:-[\t ]*){3,}|(?:_[ \t]*){3,}|(?:\*[ \t]*){3,})(?:\n+|$)/,heading:/^ {0,3}(#{1,6})(?=\s|$)(.*)(?:\n+|$)/,blockquote:/^( {0,3}> ?(paragraph|[^\n]*)(?:\n|$))+/,list:/^( {0,3}bull)([ \t][^\n]+?)?(?:\n|$)/,html:"^ {0,3}(?:<(script|pre|style|textarea)[\\s>][\\s\\S]*?(?:[^\\n]*\\n+|$)|comment[^\\n]*(\\n+|$)|<\\?[\\s\\S]*?(?:\\?>\\n*|$)|\\n*|$)|\\n*|$)|)[\\s\\S]*?(?:(?:\\n *)+\\n|$)|<(?!script|pre|style|textarea)([a-z][\\w-]*)(?:attribute)*? */?>(?=[ \\t]*(?:\\n|$))[\\s\\S]*?(?:(?:\\n *)+\\n|$)|(?=[ \\t]*(?:\\n|$))[\\s\\S]*?(?:(?:\\n *)+\\n|$))",def:/^ {0,3}\[(label)\]: *(?:\n *)?]+)>?(?:(?: +(?:\n *)?| *\n *)(title))? *(?:\n+|$)/,table:ff,lheading:/^([^\n]+)\n {0,3}(=+|-+) *(?:\n+|$)/,_paragraph:/^([^\n]+(?:\n(?!hr|heading|lheading|blockquote|fences|list|html|table| +\n)[^\n]+)*)/,text:/^[^\n]+/,_label:/(?!\s*\])(?:\\.|[^\[\]\\])+/,_title:/(?:"(?:\\"?|[^"\\])*"|'[^'\n]*(?:\n[^'\n]+)*\n?'|\([^()]*\))/};_f.def=nf(_f.def).replace("label",_f._label).replace("title",_f._title).getRegex(),_f.bullet=/(?:[*+-]|\d{1,9}[.)])/,_f.listItemStart=nf(/^( *)(bull) */).replace("bull",_f.bullet).getRegex(),_f.list=nf(_f.list).replace(/bull/g,_f.bullet).replace("hr","\\n+(?=\\1?(?:(?:- *){3,}|(?:_ *){3,}|(?:\\* *){3,})(?:\\n+|$))").replace("def","\\n+(?="+_f.def.source+")").getRegex(),_f._tag="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|section|source|summary|table|tbody|td|tfoot|th|thead|title|tr|track|ul",_f._comment=/|$)/,_f.html=nf(_f.html,"i").replace("comment",_f._comment).replace("tag",_f._tag).replace("attribute",/ +[a-zA-Z:_][\w.:-]*(?: *= *"[^"\n]*"| *= *'[^'\n]*'| *= *[^\s"'=<>`]+)?/).getRegex(),_f.paragraph=nf(_f._paragraph).replace("hr",_f.hr).replace("heading"," {0,3}#{1,6} ").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",_f._tag).getRegex(),_f.blockquote=nf(_f.blockquote).replace("paragraph",_f.paragraph).getRegex(),_f.normal=df({},_f),_f.gfm=df({},_f.normal,{table:"^ *([^\\n ].*\\|.*)\\n {0,3}(?:\\| *)?(:?-+:? *(?:\\| *:?-+:? *)*)(?:\\| *)?(?:\\n((?:(?! *\\n|hr|heading|blockquote|code|fences|list|html).*(?:\\n|$))*)\\n*|$)"}),_f.gfm.table=nf(_f.gfm.table).replace("hr",_f.hr).replace("heading"," {0,3}#{1,6} ").replace("blockquote"," {0,3}>").replace("code"," {4}[^\\n]").replace("fences"," {0,3}(?:`{3,}(?=[^`\\n]*\\n)|~{3,})[^\\n]*\\n").replace("list"," {0,3}(?:[*+-]|1[.)]) ").replace("html",")|<(?:script|pre|style|textarea|!--)").replace("tag",_f._tag).getRegex(),_f.gfm.paragraph=nf(_f._paragraph).replace("hr",_f.hr).replace("heading"," {0,3}#{1,6} ").replace("|lheading","").replace("table",_f.gfm.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",_f._tag).getRegex(),_f.pedantic=df({},_f.normal,{html:nf("^ *(?:comment *(?:\\n|\\s*$)|<(tag)[\\s\\S]+? *(?:\\n{2,}|\\s*$)|\\s]*)*?/?> *(?:\\n{2,}|\\s*$))").replace("comment",_f._comment).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:ff,paragraph:nf(_f.normal._paragraph).replace("hr",_f.hr).replace("heading"," *#{1,6} *[^\n]").replace("lheading",_f.lheading).replace("blockquote"," {0,3}>").replace("|fences","").replace("|list","").replace("|html","").getRegex()});var bf={escape:/^\\([!"#$%&'()*+,\-./:;<=>?@\[\]\\^_`{|}~])/,autolink:/^<(scheme:[^\s\x00-\x1f<>]*|email)>/,url:ff,tag:"^comment|^|^<[a-zA-Z][\\w-]*(?:attribute)*?\\s*/?>|^<\\?[\\s\\S]*?\\?>|^|^",link:/^!?\[(label)\]\(\s*(href)(?:\s+(title))?\s*\)/,reflink:/^!?\[(label)\]\[(ref)\]/,nolink:/^!?\[(ref)\](?:\[\])?/,reflinkSearch:"reflink|nolink(?!\\()",emStrong:{lDelim:/^(?:\*+(?:([punct_])|[^\s*]))|^_+(?:([punct*])|([^\s_]))/,rDelimAst:/^(?:[^_*\\]|\\.)*?\_\_(?:[^_*\\]|\\.)*?\*(?:[^_*\\]|\\.)*?(?=\_\_)|(?:[^*\\]|\\.)+(?=[^*])|[punct_](\*+)(?=[\s]|$)|(?:[^punct*_\s\\]|\\.)(\*+)(?=[punct_\s]|$)|[punct_\s](\*+)(?=[^punct*_\s])|[\s](\*+)(?=[punct_])|[punct_](\*+)(?=[punct_])|(?:[^punct*_\s\\]|\\.)(\*+)(?=[^punct*_\s])/,rDelimUnd:/^(?:[^_*\\]|\\.)*?\*\*(?:[^_*\\]|\\.)*?\_(?:[^_*\\]|\\.)*?(?=\*\*)|(?:[^_\\]|\\.)+(?=[^_])|[punct*](\_+)(?=[\s]|$)|(?:[^punct*_\s\\]|\\.)(\_+)(?=[punct*\s]|$)|[punct*\s](\_+)(?=[^punct*_\s])|[\s](\_+)(?=[punct*])|[punct*](\_+)(?=[punct*])/},code:/^(`+)([^`]|[^`][\s\S]*?[^`])\1(?!`)/,br:/^( {2,}|\\)\n(?!\s*$)/,del:ff,text:/^(`+|[^`])(?:(?= {2,}\n)|[\s\S]*?(?:(?=[\\.5&&(n="x"+n.toString(16)),r+="&#"+n+";";return r}bf._punctuation="!\"#$%&'()+\\-.,/:;<=>?@\\[\\]`^{|}~",bf.punctuation=nf(bf.punctuation).replace(/punctuation/g,bf._punctuation).getRegex(),bf.blockSkip=/\[[^\]]*?\]\([^\)]*?\)|`[^`]*?`|<[^>]*?>/g,bf.escapedEmSt=/(?:^|[^\\])(?:\\\\)*\\[*_]/g,bf._comment=nf(_f._comment).replace("(?:--\x3e|$)","--\x3e").getRegex(),bf.emStrong.lDelim=nf(bf.emStrong.lDelim).replace(/punct/g,bf._punctuation).getRegex(),bf.emStrong.rDelimAst=nf(bf.emStrong.rDelimAst,"g").replace(/punct/g,bf._punctuation).getRegex(),bf.emStrong.rDelimUnd=nf(bf.emStrong.rDelimUnd,"g").replace(/punct/g,bf._punctuation).getRegex(),bf._escapes=/\\([!"#$%&'()*+,\-./:;<=>?@\[\]\\^_`{|}~])/g,bf._scheme=/[a-zA-Z][a-zA-Z0-9+.-]{1,31}/,bf._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])?)+(?![-_])/,bf.autolink=nf(bf.autolink).replace("scheme",bf._scheme).replace("email",bf._email).getRegex(),bf._attribute=/\s+[a-zA-Z:_][\w.:-]*(?:\s*=\s*"[^"]*"|\s*=\s*'[^']*'|\s*=\s*[^\s"'=<>`]+)?/,bf.tag=nf(bf.tag).replace("comment",bf._comment).replace("attribute",bf._attribute).getRegex(),bf._label=/(?:\[(?:\\.|[^\[\]\\])*\]|\\.|`[^`]*`|[^\[\]\\`])*?/,bf._href=/<(?:\\.|[^\n<>\\])+>|[^\s\x00-\x1f]*/,bf._title=/"(?:\\"?|[^"\\])*"|'(?:\\'?|[^'\\])*'|\((?:\\\)?|[^)\\])*\)/,bf.link=nf(bf.link).replace("label",bf._label).replace("href",bf._href).replace("title",bf._title).getRegex(),bf.reflink=nf(bf.reflink).replace("label",bf._label).replace("ref",_f._label).getRegex(),bf.nolink=nf(bf.nolink).replace("ref",_f._label).getRegex(),bf.reflinkSearch=nf(bf.reflinkSearch,"g").replace("reflink",bf.reflink).replace("nolink",bf.nolink).getRegex(),bf.normal=df({},bf),bf.pedantic=df({},bf.normal,{strong:{start:/^__|\*\*/,middle:/^__(?=\S)([\s\S]*?\S)__(?!_)|^\*\*(?=\S)([\s\S]*?\S)\*\*(?!\*)/,endAst:/\*\*(?!\*)/g,endUnd:/__(?!_)/g},em:{start:/^_|\*/,middle:/^()\*(?=\S)([\s\S]*?\S)\*(?!\*)|^_(?=\S)([\s\S]*?\S)_(?!_)/,endAst:/\*(?!\*)/g,endUnd:/_(?!_)/g},link:nf(/^!?\[(label)\]\((.*?)\)/).replace("label",bf._label).getRegex(),reflink:nf(/^!?\[(label)\]\s*\[([^\]]*)\]/).replace("label",bf._label).getRegex()}),bf.gfm=df({},bf.normal,{escape:nf(bf.escape).replace("])","~|])").getRegex(),_extended_email:/[A-Za-z0-9._+-]+(@)[a-zA-Z0-9-_]+(?:\.[a-zA-Z0-9-_]*[a-zA-Z0-9])+(?![-_])/,url:/^((?:ftp|https?):\/\/|www\.)(?:[a-zA-Z0-9\-]+\.?)+[^\s<]*|^email/,_backpedal:/(?:[^?!.,:;*_~()&]+|\([^)]*\)|&(?![a-zA-Z0-9]+;$)|[?!.,:;*_~)]+(?!$))+/,del:/^(~~?)(?=[^\s~])([\s\S]*?[^\s~])\1(?=[^~]|$)/,text:/^([`~]+|[^`~])(?:(?= {2,}\n)|(?=[a-zA-Z0-9.!#$%&'*+\/=?_`{\|}~-]+@)|[\s\S]*?(?:(?=[\\1&&void 0!==arguments[1]?arguments[1]:[];for(e=this.options.pedantic?e.replace(/\t/g," ").replace(/^ +$/gm,""):e.replace(/^( *)(\t+)/gm,(function(e,t,n){return t+" ".repeat(n.length)}));e;)if(!(this.options.extensions&&this.options.extensions.block&&this.options.extensions.block.some((function(n){return!!(t=n.call({lexer:o},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])||"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])||"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&&function(){var t=1/0,n=e.slice(1),i=void 0;o.options.extensions.startBlock.forEach((function(e){"number"===typeof(i=e.call({lexer:this},n))&&i>=0&&(t=Math.min(t,i))})),t<1/0&&t>=0&&(r=e.substring(0,t+1))}(),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])&&"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){var u="Infinite loop on byte: "+e.charCodeAt(0);if(this.options.silent){console.error(u);break}throw new Error(u)}return this.state.top=!0,a}},{key:"inline",value:function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:[];return this.inlineQueue.push({src:e,tokens:t}),t}},{key:"inlineTokens",value:function(e){var t,n,r,i,o,a,u=this,l=arguments.length>1&&void 0!==arguments[1]?arguments[1]:[],c=e;if(this.tokens.links){var s=Object.keys(this.tokens.links);if(s.length>0)for(;null!=(i=this.tokenizer.rules.inline.reflinkSearch.exec(c));)s.includes(i[0].slice(i[0].lastIndexOf("[")+1,-1))&&(c=c.slice(0,i.index)+"["+mf("a",i[0].length-2)+"]"+c.slice(this.tokenizer.rules.inline.reflinkSearch.lastIndex))}for(;null!=(i=this.tokenizer.rules.inline.blockSkip.exec(c));)c=c.slice(0,i.index)+"["+mf("a",i[0].length-2)+"]"+c.slice(this.tokenizer.rules.inline.blockSkip.lastIndex);for(;null!=(i=this.tokenizer.rules.inline.escapedEmSt.exec(c));)c=c.slice(0,i.index+i[0].length-2)+"++"+c.slice(this.tokenizer.rules.inline.escapedEmSt.lastIndex),this.tokenizer.rules.inline.escapedEmSt.lastIndex--;for(;e;)if(o||(a=""),o=!1,!(this.options.extensions&&this.options.extensions.inline&&this.options.extensions.inline.some((function(n){return!!(t=n.call({lexer:u},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])&&"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])&&"text"===t.type&&"text"===n.type?(n.raw+=t.raw,n.text+=t.text):l.push(t);else if(t=this.tokenizer.emStrong(e,c,a))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,wf))e=e.substring(t.raw.length),l.push(t);else if(this.state.inLink||!(t=this.tokenizer.url(e,wf))){if(r=e,this.options.extensions&&this.options.extensions.startInline&&function(){var t=1/0,n=e.slice(1),i=void 0;u.options.extensions.startInline.forEach((function(e){"number"===typeof(i=e.call({lexer:this},n))&&i>=0&&(t=Math.min(t,i))})),t<1/0&&t>=0&&(r=e.substring(0,t+1))}(),t=this.tokenizer.inlineText(r,Df))e=e.substring(t.raw.length),"_"!==t.raw.slice(-1)&&(a=t.raw.slice(-1)),o=!0,(n=l[l.length-1])&&"text"===n.type?(n.raw+=t.raw,n.text+=t.text):l.push(t);else if(e){var f="Infinite loop on byte: "+e.charCodeAt(0);if(this.options.silent){console.error(f);break}throw new Error(f)}}else e=e.substring(t.raw.length),l.push(t);return l}}],[{key:"rules",get:function(){return{block:_f,inline:bf}}},{key:"lex",value:function(t,n){return new e(n).lex(t)}},{key:"lexInline",value:function(t,n){return new e(n).inlineTokens(t)}}]),e}(),kf=function(){function e(t){Dt(this,e),this.options=t||Vs}return xt(e,[{key:"code",value:function(e,t,n){var r=(t||"").match(/\S*/)[0];if(this.options.highlight){var i=this.options.highlight(e,r);null!=i&&i!==e&&(n=!0,e=i)}return e=e.replace(/\n$/,"")+"\n",r?'
    '+(n?e:Ks(e,!0))+"
    \n":"
    "+(n?e:Ks(e,!0))+"
    \n"}},{key:"blockquote",value:function(e){return"
    \n".concat(e,"
    \n")}},{key:"html",value:function(e){return e}},{key:"heading",value:function(e,t,n,r){if(this.options.headerIds){var i=this.options.headerPrefix+r.slug(n);return"').concat(e,"\n")}return"").concat(e,"\n")}},{key:"hr",value:function(){return this.options.xhtml?"
    \n":"
    \n"}},{key:"list",value:function(e,t,n){var r=t?"ol":"ul";return"<"+r+(t&&1!==n?' start="'+n+'"':"")+">\n"+e+"\n"}},{key:"listitem",value:function(e){return"
  • ".concat(e,"
  • \n")}},{key:"checkbox",value:function(e){return" "}},{key:"paragraph",value:function(e){return"

    ".concat(e,"

    \n")}},{key:"table",value:function(e,t){return t&&(t="".concat(t,"")),"\n\n"+e+"\n"+t+"
    \n"}},{key:"tablerow",value:function(e){return"\n".concat(e,"\n")}},{key:"tablecell",value:function(e,t){var n=t.header?"th":"td";return(t.align?"<".concat(n,' align="').concat(t.align,'">'):"<".concat(n,">"))+e+"\n")}},{key:"strong",value:function(e){return"".concat(e,"")}},{key:"em",value:function(e){return"".concat(e,"")}},{key:"codespan",value:function(e){return"".concat(e,"")}},{key:"br",value:function(){return this.options.xhtml?"
    ":"
    "}},{key:"del",value:function(e){return"".concat(e,"")}},{key:"link",value:function(e,t,n){if(null===(e=af(this.options.sanitize,this.options.baseUrl,e)))return n;var r='
    "}},{key:"image",value:function(e,t,n){if(null===(e=af(this.options.sanitize,this.options.baseUrl,e)))return n;var r='').concat(n,'":">"}},{key:"text",value:function(e){return e}}]),e}(),Cf=function(){function e(){Dt(this,e)}return xt(e,[{key:"strong",value:function(e){return e}},{key:"em",value:function(e){return e}},{key:"codespan",value:function(e){return e}},{key:"del",value:function(e){return e}},{key:"html",value:function(e){return e}},{key:"text",value:function(e){return e}},{key:"link",value:function(e,t,n){return""+n}},{key:"image",value:function(e,t,n){return""+n}},{key:"br",value:function(){return""}}]),e}(),Ef=function(){function e(){Dt(this,e),this.seen={}}return xt(e,[{key:"serialize",value:function(e){return e.toLowerCase().trim().replace(/<[!\/a-z].*?>/gi,"").replace(/[\u2000-\u206F\u2E00-\u2E7F\\'!"#$%&()*+,./:;<=>?@[\]^`{|}~]/g,"").replace(/\s/g,"-")}},{key:"getNextSafeSlug",value:function(e,t){var n=e,r=0;if(this.seen.hasOwnProperty(n)){r=this.seen[e];do{n=e+"-"+ ++r}while(this.seen.hasOwnProperty(n))}return t||(this.seen[e]=r,this.seen[n]=0),n}},{key:"slug",value:function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},n=this.serialize(e);return this.getNextSafeSlug(n,t.dryrun)}}]),e}(),Af=function(){function e(t){Dt(this,e),this.options=t||Vs,this.options.renderer=this.options.renderer||new kf,this.renderer=this.options.renderer,this.renderer.options=this.options,this.textRenderer=new Cf,this.slugger=new Ef}return xt(e,[{key:"parse",value:function(e){var t,n,r,i,o,a,u,l,c,s,f,d,h,p,v,m,y,g,_,b=!(arguments.length>1&&void 0!==arguments[1])||arguments[1],D="",w=e.length;for(t=0;t0&&"paragraph"===v.tokens[0].type?(v.tokens[0].text=g+" "+v.tokens[0].text,v.tokens[0].tokens&&v.tokens[0].tokens.length>0&&"text"===v.tokens[0].tokens[0].type&&(v.tokens[0].tokens[0].text=g+" "+v.tokens[0].tokens[0].text)):v.tokens.unshift({type:"text",text:g}):p+=g),p+=this.parse(v.tokens,h),c+=this.renderer.listitem(p,y,m);D+=this.renderer.list(c,f,d);continue;case"html":D+=this.renderer.html(s.text);continue;case"paragraph":D+=this.renderer.paragraph(this.parseInline(s.tokens));continue;case"text":for(c=s.tokens?this.parseInline(s.tokens):s.text;t+1An error occurred:

    "+Ks(e.message+"",!0)+"
    ";throw e}try{var l=xf.lex(e,t);if(t.walkTokens){if(t.async)return Promise.all(Sf.walkTokens(l,t.walkTokens)).then((function(){return Af.parse(l,t)})).catch(u);Sf.walkTokens(l,t.walkTokens)}return Af.parse(l,t)}catch(c){u(c)}}Sf.options=Sf.setOptions=function(e){var t;return df(Sf.defaults,e),t=Sf.defaults,Vs=t,Sf},Sf.getDefaults=Ys,Sf.defaults=Vs,Sf.use=function(){for(var e=arguments.length,t=new Array(e),n=0;nAn error occurred:

    "+Ks(c.message+"",!0)+"
    ";throw c}},Sf.Parser=Af,Sf.parser=Af.parse,Sf.Renderer=kf,Sf.TextRenderer=Cf,Sf.Lexer=xf,Sf.lexer=xf.lex,Sf.Tokenizer=gf,Sf.Slugger=Ef,Sf.parse=Sf;Sf.options,Sf.setOptions,Sf.use,Sf.walkTokens,Sf.parseInline,Af.parse,xf.lex;var Ff=function(e){var t=e.title,n=e.description,r=e.unit,i=e.expr,o=e.showLegend,a=e.filename,u=e.alias,l=Wr().period,c=Qr(),s=re(null),f=_t(X(!0),2),d=f[0],h=f[1],p=_t(X(l.step||1),2),v=p[0],y=p[1],g=_t(X({limits:{enable:!1,range:{1:[0,0]}}}),2),_=g[0],b=g[1],D=oe((function(){return Array.isArray(i)&&i.every((function(e){return e}))}),[i]),w=ks({predefinedQuery:D?i:[],display:"chart",visible:d,customStep:v}),x=w.isLoading,k=w.graphData,C=w.error,E=w.warning,A=function(e){var t=Kn({},_);t.limits.range=e,b(t)};if(te((function(){var e=new IntersectionObserver((function(e){e.forEach((function(e){return h(e.isIntersecting)}))}),{threshold:.1});return s.current&&e.observe(s.current),function(){s.current&&e.unobserve(s.current)}}),[]),!D)return fr(ao,{variant:"error",children:[fr("code",{children:'"expr"'})," not found. Check the configuration file ",fr("b",{children:a}),"."]});var S=function(){return fr("div",{className:"vm-predefined-panel-header__description vm-default-styles",children:[n&&fr(m,{children:[fr("div",{children:[fr("span",{children:"Description:"}),fr("div",{dangerouslySetInnerHTML:{__html:Sf.parse(n)}})]}),fr("hr",{})]}),fr("div",{children:[fr("span",{children:"Queries:"}),fr("div",{children:i.map((function(e,t){return fr("div",{children:e},"".concat(t,"_").concat(e))}))})]})]})};return fr("div",{className:"vm-predefined-panel",ref:s,children:[fr("div",{className:"vm-predefined-panel-header",children:[fr(po,{title:fr(S,{}),children:fr("div",{className:"vm-predefined-panel-header__info",children:fr(li,{})})}),fr("h3",{className:"vm-predefined-panel-header__title",children:t||""}),fr("div",{className:"vm-predefined-panel-header__step",children:fr(ps,{defaultStep:l.step,setStep:y})}),fr(Ss,{yaxis:_,setYaxisLimits:A,toggleEnableLimits:function(){var e=Kn({},_);e.limits.enable=!e.limits.enable,b(e)}})]}),fr("div",{className:"vm-predefined-panel-body",children:[x&&fr(Fs,{}),C&&fr(ao,{variant:"error",children:C}),E&&fr(ao,{variant:"warning",children:E}),k&&fr(ss,{data:k,period:l,customStep:v,query:i,yaxis:_,unit:r,alias:u,showLegend:o,setYaxisLimits:A,setPeriod:function(e){var t=e.from,n=e.to;c({type:"SET_PERIOD",payload:{from:t,to:n}})},fullWidth:!1})]})]})},Nf=function(e){var t=e.defaultExpanded,n=void 0!==t&&t,r=e.onChange,i=e.title,o=e.children,a=_t(X(n),2),u=a[0],l=a[1];return te((function(){r&&r(u)}),[u]),fr(m,{children:[fr("header",{className:"vm-accordion-header ".concat(u&&"vm-accordion-header_open"),onClick:function(){l((function(e){return!e}))},children:[i,fr("div",{className:"vm-accordion-header__arrow ".concat(u&&"vm-accordion-header__arrow_open"),children:fr(hi,{})})]}),u&&fr("section",{className:"vm-accordion-section",children:o},"content")]})},Of=function(e){var t=e.index,n=e.title,r=e.panels,i=e.filename,o=go(document.body),a=oe((function(){return o.width/12}),[o]),u=_t(X(!t),2),l=u[0],c=u[1],s=_t(X([]),2),f=s[0],d=s[1];te((function(){d(r&&r.map((function(e){return e.width||12})))}),[r]);var h=_t(X({start:0,target:0,enable:!1}),2),p=h[0],v=h[1],m=function(e){if(p.enable){var t=p.start,n=Math.ceil((t-e.clientX)/a);if(!(Math.abs(n)>=12)){var r=f.map((function(e,t){return e-(t===p.target?n:0)}));d(r)}}},y=function(){v(Kn(Kn({},p),{},{enable:!1}))},g=function(e){return function(t){!function(e,t){v({start:e.clientX,target:t,enable:!0})}(t,e)}};return te((function(){return window.addEventListener("mousemove",m),window.addEventListener("mouseup",y),function(){window.removeEventListener("mousemove",m),window.removeEventListener("mouseup",y)}}),[p]),fr("div",{className:"vm-predefined-dashboard",children:fr(Nf,{defaultExpanded:l,onChange:function(e){return c(e)},title:fr((function(){return fr("div",{className:Ti()({"vm-predefined-dashboard-header":!0,"vm-predefined-dashboard-header_open":l}),children:[(n||i)&&fr("span",{className:"vm-predefined-dashboard-header__title",children:n||"".concat(t+1,". ").concat(i)}),r&&fr("span",{className:"vm-predefined-dashboard-header__count",children:["(",r.length," panels)"]})]})}),{}),children:fr("div",{className:"vm-predefined-dashboard-panels",children:Array.isArray(r)&&r.length?r.map((function(e,t){return fr("div",{className:"vm-predefined-dashboard-panels-panel vm-block vm-block_empty-padding",style:{gridColumn:"span ".concat(f[t])},children:[fr(Ff,{title:e.title,description:e.description,unit:e.unit,expr:e.expr,alias:e.alias,filename:i,showLegend:e.showLegend}),fr("button",{className:"vm-predefined-dashboard-panels-panel__resizer",onMouseDown:g(t)})]},t)})):fr("div",{className:"vm-predefined-dashboard-panels-panel__alert",children:fr(ao,{variant:"error",children:[fr("code",{children:'"panels"'})," not found. Check the configuration file ",fr("b",{children:i}),"."]})})})})})},Tf=function(){!function(){var e=Wr(),t=e.duration,n=e.relativeTime,r=e.period,i=r.date,o=r.step,a=function(){var e,r=Is((qn(e={},"g0.range_input",t),qn(e,"g0.end_input",i),qn(e,"g0.step_input",o),qn(e,"g0.relative_time",n),e));ar(r)};te(a,[t,n,i,o]),te(a,[])}();var e=_t(X([]),2),t=e[0],n=e[1],r=_t(X("0"),2),i=r[0],o=r[1],a=oe((function(){return t.map((function(e,t){return{label:e.title||"",value:"".concat(t),className:"vm-predefined-panels-tabs__tab"}}))}),[t]),u=oe((function(){return t[+i]||{}}),[t,i]),l=oe((function(){return null===u||void 0===u?void 0:u.rows}),[u]),c=oe((function(){return u.title||u.filename||""}),[u]),s=oe((function(){return Array.isArray(l)&&!!l.length}),[l]);return te((function(){Hs().then((function(e){return e.length&&n(e)}))}),[]),fr("div",{className:"vm-predefined-panels",children:[!t.length&&fr(ao,{variant:"info",children:"Dashboards not found"}),a.length>1&&fr("div",{className:"vm-predefined-panels-tabs vm-block vm-block_empty-padding",children:fr(Li,{activeItem:i,items:a,onChange:function(e){o(e)}})}),fr("div",{className:"vm-predefined-panels__dashboards",children:[s&&l.map((function(e,t){return fr(Of,{index:t,filename:c,title:e.title,panels:e.panels},"".concat(i,"_").concat(t))})),!!t.length&&!s&&fr(ao,{variant:"error",children:[fr("code",{children:'"rows"'})," not found. Check the configuration file ",fr("b",{children:c}),"."]})]})]})},Bf=function(e,t){var n=t.match?"&match[]="+encodeURIComponent(t.match):"",r=t.focusLabel?"&focusLabel="+encodeURIComponent(t.focusLabel):"";return"".concat(e,"/api/v1/status/tsdb?topN=").concat(t.topN,"&date=").concat(t.date).concat(n).concat(r)},Mf=function(){function e(){Dt(this,e),this.tsdbStatus=void 0,this.tabsNames=void 0,this.tsdbStatus=this.defaultTSDBStatus,this.tabsNames=["table","graph"]}return xt(e,[{key:"tsdbStatusData",get:function(){return this.tsdbStatus},set:function(e){this.tsdbStatus=e}},{key:"defaultTSDBStatus",get:function(){return{totalSeries:0,totalLabelValuePairs:0,seriesCountByMetricName:[],seriesCountByLabelName:[],seriesCountByFocusLabelValue:[],seriesCountByLabelValuePair:[],labelValueCountByLabelName:[]}}},{key:"keys",value:function(e){var t=[];return e&&(t=t.concat("seriesCountByFocusLabelValue")),t=t.concat("seriesCountByMetricName","seriesCountByLabelName","seriesCountByLabelValuePair","labelValueCountByLabelName"),t}},{key:"defaultState",get:function(){var e=this;return this.keys("job").reduce((function(t,n){return Kn(Kn({},t),{},{tabs:Kn(Kn({},t.tabs),{},qn({},n,e.tabsNames)),containerRefs:Kn(Kn({},t.containerRefs),{},qn({},n,re(null))),defaultActiveTab:Kn(Kn({},t.defaultActiveTab),{},qn({},n,0))})}),{tabs:{},containerRefs:{},defaultActiveTab:{}})}},{key:"sectionsTitles",value:function(e){return{seriesCountByMetricName:"Metric names with the highest number of series",seriesCountByLabelName:"Labels with the highest number of series",seriesCountByFocusLabelValue:'Values for "'.concat(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"}}},{key:"tablesHeaders",get:function(){return{seriesCountByMetricName:Lf,seriesCountByLabelName:Pf,seriesCountByFocusLabelValue:$f,seriesCountByLabelValuePair:Rf,labelValueCountByLabelName:If}}},{key:"totalSeries",value:function(e){return"labelValueCountByLabelName"===e?-1:this.tsdbStatus.totalSeries}}]),e}(),Lf=[{id:"name",label:"Metric name"},{id:"value",label:"Number of series"},{id:"percentage",label:"Percent of series"},{id:"action",label:"Action"}],Pf=[{id:"name",label:"Label name"},{id:"value",label:"Number of series"},{id:"percentage",label:"Percent of series"},{id:"action",label:"Action"}],$f=[{id:"name",label:"Label value"},{id:"value",label:"Number of series"},{id:"percentage",label:"Percent of series"},{disablePadding:!1,id:"action",label:"Action",numeric:!1}],Rf=[{id:"name",label:"Label=value pair"},{id:"value",label:"Number of series"},{id:"percentage",label:"Percent of series"},{id:"action",label:"Action"}],If=[{id:"name",label:"Label name"},{id:"value",label:"Number of unique values"},{id:"action",label:"Action"}],jf={seriesCountByMetricName:function(e,t){return zf("__name__",t)},seriesCountByLabelName:function(e,t){return"{".concat(t,'!=""}')},seriesCountByFocusLabelValue:function(e,t){return zf(e,t)},seriesCountByLabelValuePair:function(e,t){var n=t.split("="),r=n[0],i=n.slice(1).join("=");return zf(r,i)},labelValueCountByLabelName:function(e,t){return"{".concat(t,'!=""}')}},zf=function(e,t){return e?"{"+e+"="+JSON.stringify(t)+"}":""},Uf=function(e){var t=e.topN,n=e.error,r=e.query,i=e.onSetHistory,o=e.onRunQuery,a=e.onSetQuery,u=e.onTopNChange,l=e.onFocusLabelChange,c=e.totalSeries,s=e.totalLabelValuePairs,f=e.date,d=e.match,h=e.focusLabel,p=ni().autocomplete,v=ri(),m=Ns().queryOptions,y=oe((function(){return t<1?"Number must be bigger than zero":""}),[t]);return fr("div",{className:"vm-cardinality-configurator vm-block",children:[fr("div",{className:"vm-cardinality-configurator-controls",children:[fr("div",{className:"vm-cardinality-configurator-controls__query",children:fr(fs,{value:r||d||"",autocomplete:p,options:m,error:n,onArrowUp:function(){i(-1)},onArrowDown:function(){i(1)},onEnter:o,onChange:a,label:"Time series selector"})}),fr("div",{className:"vm-cardinality-configurator-controls__item",children:fr(No,{label:"Number of entries per table",type:"number",value:t,error:y,onChange:u})}),fr("div",{className:"vm-cardinality-configurator-controls__item",children:fr(No,{label:"Focus label",type:"text",value:h||"",onChange:l})}),fr("div",{className:"vm-cardinality-configurator-controls__item",children:fr(ms,{label:"Autocomplete",value:p,onChange:function(){v({type:"TOGGLE_AUTOCOMPLETE"})}})})]}),fr("div",{className:"vm-cardinality-configurator-bottom",children:[fr("div",{className:"vm-cardinality-configurator-bottom__info",children:["Analyzed ",fr("b",{children:c})," series with ",fr("b",{children:s}),' "label=value" pairs at ',fr("b",{children:f}),d&&fr("span",{children:[" for series selector ",fr("b",{children:d})]}),". Show top ",t," entries per table."]}),fr(so,{startIcon:fr(bi,{}),onClick:o,children:"Execute Query"})]})]})};function Hf(e){var t=e.order,n=e.orderBy,r=e.onRequestSort,i=e.headerCells;return fr("thead",{className:"vm-table-header",children:fr("tr",{className:"vm-table__row vm-table__row_header",children:i.map((function(e){return fr("th",{className:Ti()({"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:(i=e.id,function(e){r(e,i)}),children:fr("div",{className:"vm-table-cell__content",children:[e.label,"action"!==e.id&&"percentage"!==e.id&&fr("div",{className:Ti()({"vm-table__sort-icon":!0,"vm-table__sort-icon_active":n===e.id,"vm-table__sort-icon_desc":"desc"===t&&n===e.id}),children:fr(vi,{})})]})},e.id);var i}))})})}function Yf(e,t,n){return t[n]e[n]?1:0}function Vf(e,t){return"desc"===e?function(e,n){return Yf(e,n,t)}:function(e,n){return-Yf(e,n,t)}}function qf(e,t){var n=e.map((function(e,t){return[e,t]}));return n.sort((function(e,n){var r=t(e[0],n[0]);return 0!==r?r:e[1]-n[1]})),n.map((function(e){return e[0]}))}var Wf=function(e){var t=e.rows,n=e.headerCells,r=e.defaultSortColumn,i=e.tableCells,o=_t(X("desc"),2),a=o[0],u=o[1],l=_t(X(r),2),c=l[0],s=l[1],f=_t(X([]),2),d=f[0],h=f[1],p=function(e){return function(){var t=d.indexOf(e),n=[];-1===t?n=n.concat(d,e):0===t?n=n.concat(d.slice(1)):t===d.length-1?n=n.concat(d.slice(0,-1)):t>0&&(n=n.concat(d.slice(0,t),d.slice(t+1))),h(n)}},v=qf(t,Vf(a,c));return fr("table",{className:"vm-table",children:[fr(Hf,{numSelected:d.length,order:a,orderBy:c,onSelectAllClick:function(e){if(e.target.checked){var n=t.map((function(e){return e.name}));h(n)}else h([])},onRequestSort:function(e,t){u(c===t&&"asc"===a?"desc":"asc"),s(t)},rowCount:t.length,headerCells:n}),fr("tbody",{className:"vm-table-header",children:v.map((function(e){return fr("tr",{className:Ti()({"vm-table__row":!0,"vm-table__row_selected":(t=e.name,-1!==d.indexOf(t))}),onClick:p(e.name),children:i(e)},e.name);var t}))})]})},Qf=function(e){var t=e.row,n=e.totalSeries,r=e.onActionClick,i=n>0?t.value/n*100:-1;return fr(m,{children:[fr("td",{className:"vm-table-cell",children:t.name},t.name),fr("td",{className:"vm-table-cell",children:t.value},t.value),i>0&&fr("td",{className:"vm-table-cell",children:fr(Os,{value:i})},t.progressValue),fr("td",{className:"vm-table-cell vm-table-cell_right",children:fr("div",{className:"vm-table-cell__content",children:fr(po,{title:"Filter by ".concat(t.name),children:fr(so,{variant:"text",size:"small",onClick:r,children:fr(Di,{})})})})},"action")]})},Gf=function(e){var t=e.data,n=e.container,r=e.configs,i=re(null),o=_t(X(),2),a=o[0],u=o[1],l=go(n),c=Kn(Kn({},r),{},{width:l.width||400});return te((function(){if(i.current){var e=new $c(c,t,i.current);return u(e),e.destroy}}),[i.current,l]),te((function(){a&&a.setData(t)}),[t]),fr("div",{style:{height:"100%"},children:fr("div",{ref:i})})},Jf=function(e,t){return Math.round(e*(t=Math.pow(10,t)))/t},Zf=1,Kf=function(e,t,n,r){return Jf(t+e*(n+r),6)},Xf=function(e,t,n,r,i){var o=1-t,a=n===Zf?o/(e-1):2===n?o/e:3===n?o/(e+1):0;(isNaN(a)||a===1/0)&&(a=0);var u=n===Zf?0:2===n?a/2:3===n?a:0,l=t/e,c=Jf(l,6);if(null==r)for(var s=0;s=n&&e<=i&&t>=r&&t<=o};function td(e,t,n,r,i){var o=this;o.x=e,o.y=t,o.w=n,o.h=r,o.l=i||0,o.o=[],o.q=null}var nd={split:function(){var e=this,t=e.x,n=e.y,r=e.w/2,i=e.h/2,o=e.l+1;e.q=[new td(t+r,n,r,i,o),new td(t,n,r,i,o),new td(t,n+i,r,i,o),new td(t+r,n+i,r,i,o)]},quads:function(e,t,n,r,i){var o=this,a=o.q,u=o.x+o.w/2,l=o.y+o.h/2,c=tu,d=t+r>l;c&&f&&i(a[0]),s&&c&&i(a[1]),s&&d&&i(a[2]),f&&d&&i(a[3])},add:function(e){var t=this;if(null!=t.q)t.quads(e.x,e.y,e.w,e.h,(function(t){t.add(e)}));else{var n=t.o;if(n.push(e),n.length>10&&t.l<4){t.split();for(var r=function(e){var r=n[e];t.quads(r.x,r.y,r.w,r.h,(function(e){e.add(r)}))},i=0;i=0?"left":"right",e.ctx.textBaseline=1===s?"middle":i[n]>=0?"bottom":"top",e.ctx.fillText(i[n],f,g)}}))})),e.ctx.restore()}function b(e,t,n){return[0,$c.rangeNum(0,n,.05,!0)[1]]}return{hooks:{drawClear:function(t){var n;if((y=y||new td(0,0,t.bbox.width,t.bbox.height)).clear(),t.series.forEach((function(e){e._paths=null})),l=d?[null].concat(m(t.data.length-1-o.length,t.data[0].length)):2===t.series.length?[null].concat(m(t.data[0].length,1)):[null].concat(function(e,t){var n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:h,r=Array.from({length:t},(function(){return{offs:Array(e).fill(0),size:Array(e).fill(0)}}));return Xf(e,n,p,null,(function(e,n,i){Xf(t,1,v,null,(function(t,o,a){r[t].offs[e]=n+i*o,r[t].size[e]=i*a}))})),r}(t.data[0].length,t.data.length-1-o.length,1===t.data[0].length?1:h)),null!=(null===(n=e.disp)||void 0===n?void 0:n.fill)){c=[null];for(var r=1;r0&&!o.includes(t)&&$c.assign(e,{paths:g,points:{show:_}})}))}}}((rd=[1],id=0,od=1,ad=0,ud=function(e,t){return{stroke:e,fill:t}}({unit:3,values:function(e){return e.data[1].map((function(e,t){return 0!==t?"#33BB55":"#F79420"}))}},{unit:3,values:function(e){return e.data[1].map((function(e,t){return 0!==t?"#33BB55":"#F79420"}))}}),{which:rd,ori:id,dir:od,radius:ad,disp:ud}))]},cd=function(e){var t=e.rows,n=e.activeTab,r=e.onChange,i=e.tabs,o=e.chartContainer,a=e.totalSeries,u=e.tabId,l=e.onActionClick,c=e.sectionTitle,s=e.tableHeaderCells,f=oe((function(){return i.map((function(e,t){return{value:String(t),label:e,icon:fr(0===t?xi:wi,{})}}))}),[i]);return fr("div",{className:"vm-metrics-content vm-block",children:[fr("div",{className:"vm-metrics-content-header vm-section-header",children:[fr("h5",{className:"vm-section-header__title",children:c}),fr("div",{className:"vm-section-header__tabs",children:fr(Li,{activeItem:String(n),items:f,onChange:function(e){r(e,u)}})})]}),fr("div",{ref:o,children:[0===n&&fr(Wf,{rows:t,headerCells:s,defaultSortColumn:"value",tableCells:function(e){return fr(Qf,{row:e,totalSeries:a,onActionClick:l})}}),1===n&&fr(Gf,{data:[t.map((function(e){return e.name})),t.map((function(e){return e.value})),t.map((function(e,t){return t%12==0?1:t%10==0?2:0}))],container:(null===o||void 0===o?void 0:o.current)||null,configs:ld})]})]})},sd=function(){var e=Ki(),t=e.topN,n=e.match,r=e.date,i=e.focusLabel,o=Xi();!function(){var e=Ki(),t=e.topN,n=e.match,r=e.date,i=e.focusLabel,o=e.extraLabel,a=function(){var e=Is({topN:t,date:r,match:n,extraLabel:o,focusLabel:i});ar(e)};te(a,[t,n,r,i,o]),te(a,[])}();var a=_t(X(n||""),2),u=a[0],l=a[1],c=_t(X(0),2),s=c[0],f=c[1],d=_t(X([]),2),h=d[0],p=d[1],v=function(){var e=new Mf,t=Ki(),n=t.topN,r=t.extraLabel,i=t.match,o=t.date,a=t.runQuery,u=t.focusLabel,l=hr().serverUrl,c=_t(X(!1),2),s=c[0],f=c[1],d=_t(X(),2),h=d[0],p=d[1],v=_t(X(e.defaultTSDBStatus),2),m=v[0],y=v[1];te((function(){h&&(y(e.defaultTSDBStatus),f(!1))}),[h]);var g=function(){var t=ts(Xc().mark((function t(n){var r,i,o,a;return Xc().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:if(l){t.next=2;break}return t.abrupt("return");case 2:return p(""),f(!0),y(e.defaultTSDBStatus),r=Bf(l,n),t.prev=6,t.next=9,fetch(r);case 9:return i=t.sent,t.next=12,i.json();case 12:o=t.sent,i.ok?(a=o.data,y(Kn({},a)),f(!1)):(p(o.error),y(e.defaultTSDBStatus),f(!1)),t.next=20;break;case 16:t.prev=16,t.t0=t.catch(6),f(!1),t.t0 instanceof Error&&p("".concat(t.t0.name,": ").concat(t.t0.message));case 20:case"end":return t.stop()}}),t,null,[[6,16]])})));return function(e){return t.apply(this,arguments)}}();return te((function(){g({topN:n,extraLabel:r,match:i,date:o,focusLabel:u})}),[l,a,o]),e.tsdbStatusData=m,{isLoading:s,appConfigurator:e,error:h}}(),m=v.isLoading,y=v.appConfigurator,g=v.error,_=_t(X(y.defaultState.defaultActiveTab),2),b=_[0],D=_[1],w=y.tsdbStatusData,x=y.defaultState,k=y.tablesHeaders,C=function(e,t){D(Kn(Kn({},b),{},qn({},t,+e)))};return fr("div",{className:"vm-cardinality-panel",children:[m&&fr(Fs,{message:"Please wait while cardinality stats is calculated. \n This may take some time if the db contains big number of time series."}),fr(Uf,{error:"",query:u,topN:t,date:r,match:n,totalSeries:w.totalSeries,totalLabelValuePairs:w.totalLabelValuePairs,focusLabel:i,onRunQuery:function(){p((function(e){return[].concat(bt(e),[u])})),f((function(e){return e+1})),o({type:"SET_MATCH",payload:u}),o({type:"RUN_QUERY"})},onSetQuery:function(e){l(e)},onSetHistory:function(e){var t=s+e;t<0||t>=h.length||(f(t),l(h[t]))},onTopNChange:function(e){o({type:"SET_TOP_N",payload:+e})},onFocusLabelChange:function(e){o({type:"SET_FOCUS_LABEL",payload:e})}}),g&&fr(ao,{variant:"error",children:g}),y.keys(i).map((function(e){return fr(cd,{sectionTitle:y.sectionsTitles(i)[e],activeTab:b[e],rows:w[e],onChange:C,onActionClick:(t=e,function(e){var n=e.currentTarget.id,r=jf[t](i,n);l(r),p((function(e){return[].concat(bt(e),[r])})),f((function(e){return e+1})),o({type:"SET_MATCH",payload:r});var a="";"labelValueCountByLabelName"!==t&&"seriesCountByLabelName"!=t||(a=n),o({type:"SET_FOCUS_LABEL",payload:a}),o({type:"RUN_QUERY"})}),tabs:x.tabs[e],chartContainer:x.containerRefs[e],totalSeries:y.totalSeries(e),tabId:e,tableHeaderCells:k[e]},e);var t}))]})},fd=function(e){var t=e.rows,n=e.columns,r=_t(X(e.defaultOrderBy||"count"),2),i=r[0],o=r[1],a=_t(X("desc"),2),u=a[0],l=a[1],c=oe((function(){return qf(t,Vf(u,i))}),[t,i,u]),s=function(e){return function(){var t;t=e,l((function(e){return"asc"===e&&i===t?"desc":"asc"})),o(t)}};return fr("table",{className:"vm-table",children:[fr("thead",{className:"vm-table-header",children:fr("tr",{className:"vm-table__row vm-table__row_header",children:n.map((function(e){return fr("th",{className:"vm-table-cell vm-table-cell_header vm-table-cell_sort",onClick:s(e.key),children:fr("div",{className:"vm-table-cell__content",children:[e.title||e.key,fr("div",{className:Ti()({"vm-table__sort-icon":!0,"vm-table__sort-icon_active":i===e.key,"vm-table__sort-icon_desc":"desc"===u&&i===e.key}),children:fr(vi,{})})]})},e.key)}))})}),fr("tbody",{className:"vm-table-body",children:c.map((function(e,t){return fr("tr",{className:"vm-table__row",children:n.map((function(t){return fr("td",{className:"vm-table-cell",children:e[t.key]||"-"},t.key)}))},t)}))})]})},dd=["table","JSON"].map((function(e,t){return{value:String(t),label:e,icon:fr(0===t?xi:ki,{})}})),hd=function(e){var t=e.rows,n=e.title,r=e.columns,i=e.defaultOrderBy,o=_t(X(0),2),a=o[0],u=o[1];return fr("div",{className:"vm-top-queries-panel vm-block",children:[fr("div",{className:"vm-top-queries-panel-header vm-section-header",children:[fr("h5",{className:"vm-section-header__title",children:n}),fr("div",{className:"vm-section-header__tabs",children:fr(Li,{activeItem:String(a),items:dd,onChange:function(e){u(+e)}})})]}),fr("div",{children:[0===a&&fr(fd,{rows:t,columns:r,defaultOrderBy:i}),1===a&&fr(Cs,{data:t})]})]})},pd=function(){var e=function(){var e=hr().serverUrl,t=io(),n=t.topN,r=t.maxLifetime,i=t.runQuery,o=_t(X(null),2),a=o[0],u=o[1],l=_t(X(!1),2),c=l[0],s=l[1],f=_t(X(),2),d=f[0],h=f[1],p=oe((function(){return function(e,t,n){return"".concat(e,"/api/v1/status/top_queries?topN=").concat(t||"","&maxLifetime=").concat(n||"")}(e,n,r)}),[e,n,r]),v=function(){var e=ts(Xc().mark((function e(){var t,n;return Xc().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return s(!0),e.prev=1,e.next=4,fetch(p);case 4:return t=e.sent,e.next=7,t.json();case 7:n=e.sent,t.ok&&["topByAvgDuration","topByCount","topBySumDuration"].forEach((function(e){var t=n[e];Array.isArray(t)&&t.forEach((function(e){return e.timeRangeHours=+(e.timeRangeSeconds/3600).toFixed(2)}))})),u(t.ok?n:null),h(String(n.error||"")),e.next=16;break;case 13:e.prev=13,e.t0=e.catch(1),e.t0 instanceof Error&&"AbortError"!==e.t0.name&&h("".concat(e.t0.name,": ").concat(e.t0.message));case 16:s(!1);case 17:case"end":return e.stop()}}),e,null,[[1,13]])})));return function(){return e.apply(this,arguments)}}();return te((function(){v()}),[i]),{data:a,error:d,loading:c}}(),t=e.data,n=e.error,r=e.loading,i=io(),o=i.topN,a=i.maxLifetime,u=ue(ro).dispatch;!function(){var e=io(),t=e.topN,n=e.maxLifetime,r=function(){var e=Is({topN:String(t),maxLifetime:n});ar(e)};te(r,[t,n]),te(r,[])}();var l=oe((function(){var e=a.trim().split(" ").reduce((function(e,t){var n=Or(t);return n?Kn(Kn({},e),n):Kn({},e)}),{});return!!yr().duration(e).asMilliseconds()}),[a]),c=oe((function(){return!!o&&o<1}),[o]),s=oe((function(){return c?"Number must be bigger than zero":""}),[c]),f=oe((function(){return l?"":"Invalid duration value"}),[l]),d=function(e){if(!t)return e;var n=t[e];return"number"===typeof n?zc(n):n||e},h=function(){u({type:"SET_RUN_QUERY"})},p=function(e){"Enter"===e.key&&h()};return te((function(){t&&(o||u({type:"SET_TOP_N",payload:+t.topN}),a||u({type:"SET_MAX_LIFE_TIME",payload:t.maxLifetime}))}),[t]),fr("div",{className:"vm-top-queries",children:[r&&fr(Fs,{containerStyles:{height:"500px"}}),fr("div",{className:"vm-top-queries-controls vm-block",children:[fr("div",{className:"vm-top-queries-controls__fields",children:[fr(No,{label:"Max lifetime",value:a,error:f,helperText:"For example ".concat("30ms, 15s, 3d4h, 1y2w"),onChange:function(e){u({type:"SET_MAX_LIFE_TIME",payload:e})},onKeyDown:p}),fr(No,{label:"Number of returned queries",type:"number",value:o||"",error:s,onChange:function(e){u({type:"SET_TOP_N",payload:+e})},onKeyDown:p})]}),fr("div",{className:"vm-top-queries-controls-bottom",children:[fr("div",{className:"vm-top-queries-controls-bottom__info",children:["VictoriaMetrics tracks the last\xa0",fr(po,{title:"search.queryStats.lastQueriesCount",children:fr("b",{children:d("search.queryStats.lastQueriesCount")})}),"\xa0queries with durations at least\xa0",fr(po,{title:"search.queryStats.minQueryDuration",children:fr("b",{children:d("search.queryStats.minQueryDuration")})})]}),fr("div",{className:"vm-top-queries-controls-bottom__button",children:fr(so,{startIcon:fr(bi,{}),onClick:h,children:"Execute"})})]})]}),n&&fr(ao,{variant:"error",children:n}),t&&fr(m,{children:fr("div",{className:"vm-top-queries-panels",children:[fr(hd,{rows:t.topByCount,title:"Most frequently executed queries",columns:[{key:"query"},{key:"timeRangeHours",title:"time range, hours"},{key:"count"}]}),fr(hd,{rows:t.topByAvgDuration,title:"Most heavy queries",columns:[{key:"query"},{key:"avgDurationSeconds",title:"avg duration, seconds"},{key:"timeRangeHours",title:"time range, hours"},{key:"count"}],defaultOrderBy:"avgDurationSeconds"}),fr(hd,{rows:t.topBySumDuration,title:"Queries with most summary time to execute",columns:[{key:"query"},{key:"sumDurationSeconds",title:"sum duration, seconds"},{key:"timeRangeHours",title:"time range, hours"},{key:"count"}],defaultOrderBy:"sumDurationSeconds"})]})})]})},vd=["primary","secondary","error","warning","info","success"],md=function(e){var t=e.setLoadingTheme,n=Xn().palette,r=void 0===n?{}:n,i=function(){vd.forEach((function(e){var t=function(e){var 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"}(Bi("color-".concat(e)));Mi("".concat(e,"-text"),t)}))};return te((function(){vd.forEach((function(e){var t=r[e];t&&Mi("color-".concat(e),t)})),function(){var e=window,t=e.innerWidth,n=e.innerHeight,r=document.documentElement,i=r.clientWidth,o=r.clientHeight;Mi("scrollbar-width","".concat(t-i,"px")),Mi("scrollbar-height","".concat(n-o,"px"))}(),i(),t(!1)}),[]),null},yd=function(){var e=_t(X(!1),2),t=e[0],n=e[1],r=_t(X([]),2),i=r[0],o=r[1],a=_t(X([]),2),u=a[0],l=a[1],s=oe((function(){return!!i.length}),[i]),f=function(){n(!0)},d=function(){n(!1)},h=function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"";l((function(n){return[{filename:t,text:": ".concat(e.message)}].concat(bt(n))}))},p=function(e,t){try{var n=JSON.parse(e),r=n.trace||n;if(!r.duration_msec)return void h(new Error(xo.traceNotFound),t);var i=new xs(r,t);o((function(e){return[i].concat(bt(e))}))}catch(c){c instanceof Error&&h(c,t)}},v=function(e){l([]),Array.from(e.target.files||[]).map((function(e){var t=new FileReader,n=(null===e||void 0===e?void 0:e.name)||"";t.onload=function(e){var t,r=String(null===(t=e.target)||void 0===t?void 0:t.result);p(r,n)},t.readAsText(e)})),e.target.value=""},m=function(e){return function(){!function(e){l((function(t){return t.filter((function(t,n){return n!==e}))}))}(e)}},y=function(){return fr("div",{className:"vm-trace-page-controls",children:[fr(so,{variant:"outlined",onClick:f,children:"Paste JSON"}),fr(po,{title:"The file must contain tracing information in JSON format",children:fr(so,{children:["Upload Files",fr("input",{id:"json",type:"file",accept:"application/json",multiple:!0,title:" ",onChange:v})]})})]})};return fr("div",{className:"vm-trace-page",children:[fr("div",{className:"vm-trace-page-header",children:[fr("div",{className:"vm-trace-page-header-errors",children:u.map((function(e,t){return fr("div",{className:"vm-trace-page-header-errors-item",children:[fr(ao,{variant:"error",children:[fr("b",{className:"vm-trace-page-header-errors-item__filename",children:e.filename}),fr("span",{children:e.text})]}),fr(so,{className:"vm-trace-page-header-errors-item__close",startIcon:fr(ai,{}),variant:"text",color:"error",onClick:m(t)})]},"".concat(e,"_").concat(t))}))}),fr("div",{children:s&&fr(y,{})})]}),s&&fr("div",{children:fr(Ms,{jsonEditor:!0,traces:i,onDeleteClick:function(e){var t=i.filter((function(t){return t.idValue!==e.idValue}));o(bt(t))}})}),!s&&fr("div",{className:"vm-trace-page-preview",children:[fr("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",fr("a",{href:"https://docs.victoriametrics.com/#query-tracing",target:"_blank",rel:"noreferrer",children:"https://docs.victoriametrics.com/#query-tracing"}),"\n","Tracing graph will be displayed after file upload."]}),fr(y,{})]}),t&&fr(Bo,{title:"Paste JSON",onClose:d,children:fr(Bs,{editable:!0,displayTitle:!0,defaultTile:"JSON ".concat(i.length+1),onClose:d,onUpload:p})})]})},gd=function(){var e=_t(X(!0),2),t=e[0],n=e[1];return fr(m,t?{children:[fr(Fs,{}),fr(md,{setLoadingTheme:n}),";"]}:{children:fr(Un,{children:fr(co,{children:fr(jn,{children:fr(Rn,{path:"/",element:fr(Uo,{}),children:[fr(Rn,{path:Jn.home,element:fr(zs,{})}),fr(Rn,{path:Jn.dashboards,element:fr(Tf,{})}),fr(Rn,{path:Jn.cardinality,element:fr(sd,{})}),fr(Rn,{path:Jn.topQueries,element:fr(pd,{})}),fr(Rn,{path:Jn.trace,element:fr(yd,{})})]})})})})})},_d=function(e){e&&n.e(27).then(n.bind(n,27)).then((function(t){var n=t.getCLS,r=t.getFID,i=t.getFCP,o=t.getLCP,a=t.getTTFB;n(e),r(e),i(e),o(e),a(e)}))},bd=document.getElementById("root");bd&&Ye(fr(gd,{}),bd),_d()}()}(); \ No newline at end of file From 03d88bc066627cf4d32be681c85bb85aabdc86f3 Mon Sep 17 00:00:00 2001 From: Roman Khavronenko Date: Mon, 21 Nov 2022 23:38:43 +0100 Subject: [PATCH 25/46] vmagent: expose metrics for tracking config state (#3375) Expose `vm_relabel_config_*` and `vm_promscrape_config_*` metrics for tracking relabel and scrape configuration hot-reloads. https://github.com/VictoriaMetrics/VictoriaMetrics/issues/3345 Signed-off-by: hagen1778 Signed-off-by: hagen1778 --- app/vmagent/remotewrite/remotewrite.go | 16 ++++++++++++++++ deployment/docker/alerts-vmagent.yml | 14 +++++++++++++- docs/CHANGELOG.md | 1 + lib/promscrape/scraper.go | 19 +++++++++++++++++-- 4 files changed, 47 insertions(+), 3 deletions(-) diff --git a/app/vmagent/remotewrite/remotewrite.go b/app/vmagent/remotewrite/remotewrite.go index a7326f66e..c48143926 100644 --- a/app/vmagent/remotewrite/remotewrite.go +++ b/app/vmagent/remotewrite/remotewrite.go @@ -13,6 +13,7 @@ import ( "github.com/VictoriaMetrics/VictoriaMetrics/lib/bloomfilter" "github.com/VictoriaMetrics/VictoriaMetrics/lib/bytesutil" "github.com/VictoriaMetrics/VictoriaMetrics/lib/cgroup" + "github.com/VictoriaMetrics/VictoriaMetrics/lib/fasttime" "github.com/VictoriaMetrics/VictoriaMetrics/lib/flagutil" "github.com/VictoriaMetrics/VictoriaMetrics/lib/logger" "github.com/VictoriaMetrics/VictoriaMetrics/lib/memory" @@ -139,6 +140,8 @@ func Init() { logger.Fatalf("cannot load relabel configs: %s", err) } allRelabelConfigs.Store(rcs) + configSuccess.Set(1) + configTimestamp.Set(fasttime.UnixTimestamp()) if len(*remoteWriteURLs) > 0 { rwctxsDefault = newRemoteWriteCtxs(nil, *remoteWriteURLs) @@ -154,18 +157,31 @@ func Init() { case <-stopCh: return } + configReloads.Inc() logger.Infof("SIGHUP received; reloading relabel configs pointed by -remoteWrite.relabelConfig and -remoteWrite.urlRelabelConfig") rcs, err := loadRelabelConfigs() if err != nil { + configReloadErrors.Inc() + configSuccess.Set(0) logger.Errorf("cannot reload relabel configs; preserving the previous configs; error: %s", err) continue } + allRelabelConfigs.Store(rcs) + configSuccess.Set(1) + configTimestamp.Set(fasttime.UnixTimestamp()) logger.Infof("Successfully reloaded relabel configs") } }() } +var ( + configReloads = metrics.NewCounter(`vm_relabel_config_reloads_total`) + configReloadErrors = metrics.NewCounter(`vm_relabel_config_reloads_errors_total`) + configSuccess = metrics.NewCounter(`vm_relabel_config_last_reload_successful`) + configTimestamp = metrics.NewCounter(`vm_relabel_config_last_reload_success_timestamp_seconds`) +) + func newRemoteWriteCtxs(at *auth.Token, urls []string) []*remoteWriteCtx { if len(urls) == 0 { logger.Panicf("BUG: urls must be non-empty") diff --git a/deployment/docker/alerts-vmagent.yml b/deployment/docker/alerts-vmagent.yml index 0fd9b8d56..560e7be86 100644 --- a/deployment/docker/alerts-vmagent.yml +++ b/deployment/docker/alerts-vmagent.yml @@ -119,4 +119,16 @@ groups: dashboard: "http://localhost:3000/d/G7Z9GzMGz?viewPanel=90&var-instance={{ $labels.instance }}" summary: "Instance {{ $labels.instance }} reached 90% of the limit" description: "Max series limit set via -remoteWrite.maxDailySeries flag is close to reaching the max value. - Then samples for new time series will be dropped instead of sending them to remote storage systems." \ No newline at end of file + Then samples for new time series will be dropped instead of sending them to remote storage systems." + + - alert: ConfigurationReloadFailure + expr: | + vm_promscrape_config_last_reload_successful != 1 + or + vm_relabel_config_last_reload_successful != 1 + labels: + severity: warning + annotations: + summary: "Configuration reload failed for vmagent instance {{ $labels.instance }}" + description: "Configuration hot-reload failed for vmagent on instance {{ $labels.instance }}. + Check vmagent's logs for detailed error message." \ No newline at end of file diff --git a/docs/CHANGELOG.md b/docs/CHANGELOG.md index a9d8c2ab1..b9163388d 100644 --- a/docs/CHANGELOG.md +++ b/docs/CHANGELOG.md @@ -27,6 +27,7 @@ The following tip changes can be tested by building VictoriaMetrics components f * FEATURE: [vmui](https://docs.victoriametrics.com/#vmui): add copy button to row on Table view. The button copies row in MetricQL format. See [this issue](https://github.com/VictoriaMetrics/VictoriaMetrics/issues/2815). * 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: [vmalert](https://docs.victoriametrics.com/vmalert.html): 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: [vmagent](https://docs.victoriametrics.com/vmagent.html): expose `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.html): properly return an empty result from [limit_offset](https://docs.victoriametrics.com/MetricsQL.html#limit_offset) if the `offset` arg exceeds the number of inner time series. See [this issue](https://github.com/VictoriaMetrics/VictoriaMetrics/issues/3312). * BUGFIX: [vmagent](https://docs.victoriametrics.com/vmagent.html): properly discover GCE zones when `filter` option is set at [gce_sd_configs](https://docs.victoriametrics.com/sd_configs.html#gce_sd_configs). See [this issue](https://github.com/VictoriaMetrics/VictoriaMetrics/issues/3202). diff --git a/lib/promscrape/scraper.go b/lib/promscrape/scraper.go index 9ae5eed6d..470a387bd 100644 --- a/lib/promscrape/scraper.go +++ b/lib/promscrape/scraper.go @@ -4,12 +4,13 @@ import ( "bytes" "flag" "fmt" - "github.com/VictoriaMetrics/VictoriaMetrics/lib/auth" "io" "sync" "sync/atomic" "time" + "github.com/VictoriaMetrics/VictoriaMetrics/lib/auth" + "github.com/VictoriaMetrics/VictoriaMetrics/lib/fasttime" "github.com/VictoriaMetrics/VictoriaMetrics/lib/logger" "github.com/VictoriaMetrics/VictoriaMetrics/lib/procutil" "github.com/VictoriaMetrics/VictoriaMetrics/lib/prompbmarshal" @@ -112,6 +113,9 @@ func runScraper(configFile string, pushData func(at *auth.Token, wr *prompbmarsh configData.Store(&marshaledData) cfg.mustStart() + configSuccess.Set(1) + configTimestamp.Set(fasttime.UnixTimestamp()) + scs := newScrapeConfigs(pushData, globalStopCh) scs.add("azure_sd_configs", *azure.SDCheckInterval, func(cfg *Config, swsPrev []*ScrapeWork) []*ScrapeWork { return cfg.getAzureSDScrapeWork(swsPrev) }) scs.add("consul_sd_configs", *consul.SDCheckInterval, func(cfg *Config, swsPrev []*ScrapeWork) []*ScrapeWork { return cfg.getConsulSDScrapeWork(swsPrev) }) @@ -143,6 +147,8 @@ func runScraper(configFile string, pushData func(at *auth.Token, wr *prompbmarsh logger.Infof("SIGHUP received; reloading Prometheus configs from %q", configFile) cfgNew, dataNew, err := loadConfig(configFile) if err != nil { + configReloadErrors.Inc() + configSuccess.Set(0) logger.Errorf("cannot read %q on SIGHUP: %s; continuing with the previous config", configFile, err) goto waitForChans } @@ -158,6 +164,8 @@ func runScraper(configFile string, pushData func(at *auth.Token, wr *prompbmarsh case <-tickerCh: cfgNew, dataNew, err := loadConfig(configFile) if err != nil { + configReloadErrors.Inc() + configSuccess.Set(0) logger.Errorf("cannot read %q: %s; continuing with the previous config", configFile, err) goto waitForChans } @@ -180,10 +188,17 @@ func runScraper(configFile string, pushData func(at *auth.Token, wr *prompbmarsh } logger.Infof("found changes in %q; applying these changes", configFile) configReloads.Inc() + configSuccess.Set(1) + configTimestamp.Set(fasttime.UnixTimestamp()) } } -var configReloads = metrics.NewCounter(`vm_promscrape_config_reloads_total`) +var ( + configReloads = metrics.NewCounter(`vm_promscrape_config_reloads_total`) + configReloadErrors = metrics.NewCounter(`vm_promscrape_config_reloads_errors_total`) + configSuccess = metrics.NewCounter(`vm_promscrape_config_last_reload_successful`) + configTimestamp = metrics.NewCounter(`vm_promscrape_config_last_reload_success_timestamp_seconds`) +) type scrapeConfigs struct { pushData func(at *auth.Token, wr *prompbmarshal.WriteRequest) From 9498f871e7514602301e2f56f9fb9a74c42ec10a Mon Sep 17 00:00:00 2001 From: Aliaksandr Valialkin Date: Tue, 22 Nov 2022 00:47:40 +0200 Subject: [PATCH 26/46] app/vminsert: add missing vm_relabel_config_* metrics after 03d88bc066627cf4d32be681c85bb85aabdc86f3 Updates https://github.com/VictoriaMetrics/VictoriaMetrics/issues/3345 --- app/vmagent/remotewrite/remotewrite.go | 8 ++++---- app/vminsert/relabel/relabel.go | 16 ++++++++++++++++ deployment/docker/alerts-vmagent.yml | 4 ++-- docs/CHANGELOG.md | 4 ++-- 4 files changed, 24 insertions(+), 8 deletions(-) diff --git a/app/vmagent/remotewrite/remotewrite.go b/app/vmagent/remotewrite/remotewrite.go index c48143926..ae5234ff4 100644 --- a/app/vmagent/remotewrite/remotewrite.go +++ b/app/vmagent/remotewrite/remotewrite.go @@ -176,10 +176,10 @@ func Init() { } var ( - configReloads = metrics.NewCounter(`vm_relabel_config_reloads_total`) - configReloadErrors = metrics.NewCounter(`vm_relabel_config_reloads_errors_total`) - configSuccess = metrics.NewCounter(`vm_relabel_config_last_reload_successful`) - configTimestamp = metrics.NewCounter(`vm_relabel_config_last_reload_success_timestamp_seconds`) + configReloads = metrics.NewCounter(`vmagent_relabel_config_reloads_total`) + configReloadErrors = metrics.NewCounter(`vmagent_relabel_config_reloads_errors_total`) + configSuccess = metrics.NewCounter(`vmagent_relabel_config_last_reload_successful`) + configTimestamp = metrics.NewCounter(`vmagent_relabel_config_last_reload_success_timestamp_seconds`) ) func newRemoteWriteCtxs(at *auth.Token, urls []string) []*remoteWriteCtx { diff --git a/app/vminsert/relabel/relabel.go b/app/vminsert/relabel/relabel.go index 494280089..5c8db252e 100644 --- a/app/vminsert/relabel/relabel.go +++ b/app/vminsert/relabel/relabel.go @@ -6,6 +6,7 @@ import ( "sync/atomic" "github.com/VictoriaMetrics/VictoriaMetrics/lib/bytesutil" + "github.com/VictoriaMetrics/VictoriaMetrics/lib/fasttime" "github.com/VictoriaMetrics/VictoriaMetrics/lib/logger" "github.com/VictoriaMetrics/VictoriaMetrics/lib/procutil" "github.com/VictoriaMetrics/VictoriaMetrics/lib/prompb" @@ -38,23 +39,38 @@ func Init() { logger.Fatalf("cannot load relabelConfig: %s", err) } pcsGlobal.Store(pcs) + configSuccess.Set(1) + configTimestamp.Set(fasttime.UnixTimestamp()) + if len(*relabelConfig) == 0 { return } go func() { for range sighupCh { + configReloads.Inc() logger.Infof("received SIGHUP; reloading -relabelConfig=%q...", *relabelConfig) pcs, err := loadRelabelConfig() if err != nil { + configReloadErrors.Inc() + configSuccess.Set(0) logger.Errorf("cannot load the updated relabelConfig: %s; preserving the previous config", err) continue } pcsGlobal.Store(pcs) + configSuccess.Set(1) + configTimestamp.Set(fasttime.UnixTimestamp()) logger.Infof("successfully reloaded -relabelConfig=%q", *relabelConfig) } }() } +var ( + configReloads = metrics.NewCounter(`vm_relabel_config_reloads_total`) + configReloadErrors = metrics.NewCounter(`vm_relabel_config_reloads_errors_total`) + configSuccess = metrics.NewCounter(`vm_relabel_config_last_reload_successful`) + configTimestamp = metrics.NewCounter(`vm_relabel_config_last_reload_success_timestamp_seconds`) +) + var pcsGlobal atomic.Value func loadRelabelConfig() (*promrelabel.ParsedConfigs, error) { diff --git a/deployment/docker/alerts-vmagent.yml b/deployment/docker/alerts-vmagent.yml index 560e7be86..3c65b3009 100644 --- a/deployment/docker/alerts-vmagent.yml +++ b/deployment/docker/alerts-vmagent.yml @@ -125,10 +125,10 @@ groups: expr: | vm_promscrape_config_last_reload_successful != 1 or - vm_relabel_config_last_reload_successful != 1 + vmagent_relabel_config_last_reload_successful != 1 labels: severity: warning annotations: summary: "Configuration reload failed for vmagent instance {{ $labels.instance }}" description: "Configuration hot-reload failed for vmagent on instance {{ $labels.instance }}. - Check vmagent's logs for detailed error message." \ No newline at end of file + Check vmagent's logs for detailed error message." diff --git a/docs/CHANGELOG.md b/docs/CHANGELOG.md index b9163388d..c16d9eec3 100644 --- a/docs/CHANGELOG.md +++ b/docs/CHANGELOG.md @@ -17,7 +17,7 @@ The following tip changes can be tested by building VictoriaMetrics components f * FEATURE: [VictoriaMetrics enterprise](https://docs.victoriametrics.com/enterprise.html): add `-storageNode.filter` command-line flag for filtering the [discovered vmstorage nodes](https://docs.victoriametrics.com/Cluster-VictoriaMetrics.html#automatic-vmstorage-discovery) with arbitrary regular expressions. See [this feature request](https://github.com/VictoriaMetrics/VictoriaMetrics/issues/3353). * FEATURE: [MetricsQL](https://docs.victoriametrics.com/MetricsQL.html): allow using numeric values with `K`, `Ki`, `M`, `Mi`, `G`, `Gi`, `T` and `Ti` suffixes inside MetricsQL queries. For example `8Ki` equals to `8*1024`, while `8.2M` equals to `8.2*1000*1000`. -* FEATURE: [MetricsQL](https://docs.victoriametrics.com/MetricsQL.html): add [range_normalize](https://docs.victoriametrics.com/MetricsQL.html#range_normalize) function for normalizing multiple time series into `[0...1]` value range. This function is useful for correlation analyzis of time series with distinct value ranges. See [this issue](https://github.com/VictoriaMetrics/VictoriaMetrics/issues/3167). +* FEATURE: [MetricsQL](https://docs.victoriametrics.com/MetricsQL.html): add [range_normalize](https://docs.victoriametrics.com/MetricsQL.html#range_normalize) function for normalizing multiple time series into `[0...1]` value range. This function is useful for correlation analysis of time series with distinct value ranges. See [this issue](https://github.com/VictoriaMetrics/VictoriaMetrics/issues/3167). * FEATURE: [MetricsQL](https://docs.victoriametrics.com/MetricsQL.html): add [range_linear_regression](https://docs.victoriametrics.com/MetricsQL.html#range_linear_regression) function for calculating [simple linear regression](https://en.wikipedia.org/wiki/Simple_linear_regression) over the input time series on the selected time range. This function is useful for predictions and capacity planning. For example, `range_linear_regression(process_resident_memory_bytes)` can predict future memory usage based on the past memory usage. * FEATURE: [MetricsQL](https://docs.victoriametrics.com/MetricsQL.html): add [range_stddev](https://docs.victoriametrics.com/MetricsQL.html#range_stddev) and [range_stdvar](https://docs.victoriametrics.com/MetricsQL.html#range_stdvar) functions. * FEATURE: [MetricsQL](https://docs.victoriametrics.com/MetricsQL.html): optimize `expr1 op expr2` query when `expr1` returns an empty result. In this case there is no sense in executing `expr2` for `op` not equal to `or`, since the end result will be empty according to [PromQL series matching rules](https://prometheus.io/docs/prometheus/latest/querying/operators/#vector-matching). See [this issue](https://github.com/VictoriaMetrics/VictoriaMetrics/issues/3349). Thanks to @jianglinjian for pointing to this case. @@ -27,7 +27,7 @@ The following tip changes can be tested by building VictoriaMetrics components f * FEATURE: [vmui](https://docs.victoriametrics.com/#vmui): add copy button to row on Table view. The button copies row in MetricQL format. See [this issue](https://github.com/VictoriaMetrics/VictoriaMetrics/issues/2815). * 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: [vmalert](https://docs.victoriametrics.com/vmalert.html): 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: [vmagent](https://docs.victoriametrics.com/vmagent.html): expose `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). +* FEATURE: [vmagent](https://docs.victoriametrics.com/vmagent.html): 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.html): properly return an empty result from [limit_offset](https://docs.victoriametrics.com/MetricsQL.html#limit_offset) if the `offset` arg exceeds the number of inner time series. See [this issue](https://github.com/VictoriaMetrics/VictoriaMetrics/issues/3312). * BUGFIX: [vmagent](https://docs.victoriametrics.com/vmagent.html): properly discover GCE zones when `filter` option is set at [gce_sd_configs](https://docs.victoriametrics.com/sd_configs.html#gce_sd_configs). See [this issue](https://github.com/VictoriaMetrics/VictoriaMetrics/issues/3202). From b1622ad63e7690e13daf011d3b3e6fe0c04dbbe6 Mon Sep 17 00:00:00 2001 From: Aliaksandr Valialkin Date: Tue, 22 Nov 2022 01:08:02 +0200 Subject: [PATCH 27/46] docs/Articles.md: add a link to https://www.youtube.com/watch?v=_zORxrgLtec (OSA Con 2022: Specifics of data analysis in Time Series Databases) --- docs/Articles.md | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/docs/Articles.md b/docs/Articles.md index 61996462a..7320cbceb 100644 --- a/docs/Articles.md +++ b/docs/Articles.md @@ -108,6 +108,7 @@ See also [case studies](https://docs.victoriametrics.com/CaseStudies.html). ### Other articles -* [How ClickHouse inspired us to build a high performance time series database](https://www.youtube.com/watch?v=p9qjb_yoBro). See also [slides](https://docs.google.com/presentation/d/1SdFrwsyR-HMXfbzrY8xfDZH_Dg6E7E5NJ84tQozMn3w/edit?usp=sharing). +* [How ClickHouse inspired us to build a high performance time series database](https://www.youtube.com/watch?v=p9qjb_yoBro). See also [slides](https://docs.google.com/presentation/d/1SdFrwsyR-HMXfbzrY8xfDZH_Dg6E7E5NJ84tQozMn3w/edit?usp=sharing) +* [OSA Con 2022: Specifics of data analysis in Time Series Databases](https://www.youtube.com/watch?v=_zORxrgLtec) * [Comparing Thanos to VictoriaMetrics cluster](https://faun.pub/comparing-thanos-to-victoriametrics-cluster-b193bea1683) * [Evaluation performance and correctness: VictoriaMetrics response](https://valyala.medium.com/evaluating-performance-and-correctness-victoriametrics-response-e27315627e87) From 633ad34eb7732515075137f2b2363d0c00e264a1 Mon Sep 17 00:00:00 2001 From: Aliaksandr Valialkin Date: Tue, 22 Nov 2022 11:26:16 +0200 Subject: [PATCH 28/46] vendor: `make vendor-update` --- go.mod | 12 +- go.sum | 24 +-- .../aws/aws-sdk-go-v2/config/CHANGELOG.md | 4 + .../config/go_module_metadata.go | 2 +- .../aws-sdk-go-v2/credentials/CHANGELOG.md | 4 + .../credentials/go_module_metadata.go | 2 +- .../feature/s3/manager/CHANGELOG.md | 4 + .../feature/s3/manager/go_module_metadata.go | 2 +- .../aws-sdk-go-v2/service/sts/CHANGELOG.md | 4 + .../service/sts/api_op_AssumeRole.go | 87 ++++----- .../service/sts/api_op_AssumeRoleWithSAML.go | 74 ++++---- .../sts/api_op_AssumeRoleWithWebIdentity.go | 74 ++++---- .../service/sts/api_op_GetFederationToken.go | 87 ++++----- .../service/sts/go_module_metadata.go | 2 +- .../grpc/attributes/attributes.go | 2 +- vendor/google.golang.org/grpc/backoff.go | 2 +- .../grpc/balancer/balancer.go | 23 +++ .../grpc/balancer/base/balancer.go | 4 +- .../grpc/balancer/conn_state_evaluator.go | 12 +- .../grpclb/grpc_lb_v1/load_balancer.pb.go | 2 + .../grpc/balancer/grpclb/grpclb.go | 24 +-- .../grpc/balancer_conn_wrappers.go | 71 +++++++- .../grpc_binarylog_v1/binarylog.pb.go | 13 +- .../grpc/channelz/channelz.go | 2 +- vendor/google.golang.org/grpc/clientconn.go | 137 ++++++-------- .../internal/proto/grpc_gcp/handshaker.pb.go | 2 + .../grpc/credentials/credentials.go | 20 +-- .../grpc/credentials/google/xds.go | 1 + .../google.golang.org/grpc/credentials/tls.go | 2 +- .../grpc/encoding/encoding.go | 5 +- .../grpc/grpclog/loggerv2.go | 2 +- .../grpc/internal/binarylog/env_config.go | 18 +- .../grpc/internal/channelz/types.go | 16 +- .../grpc/internal/envconfig/envconfig.go | 8 +- .../grpc/internal/grpclog/grpclog.go | 2 +- .../grpc/internal/grpcsync/oncefunc.go | 32 ++++ .../grpc/internal/grpcutil/compressor.go | 47 +++++ .../grpc/internal/grpcutil/method.go | 1 - .../internal/serviceconfig/serviceconfig.go | 8 +- .../grpc/internal/status/status.go | 10 ++ .../grpc/internal/transport/handler_server.go | 8 +- .../grpc/internal/transport/http2_client.go | 167 +++++++++++------- .../grpc/internal/transport/transport.go | 14 +- .../grpc/metadata/metadata.go | 20 ++- .../google.golang.org/grpc/picker_wrapper.go | 7 +- vendor/google.golang.org/grpc/preloader.go | 2 +- .../grpc/resolver/resolver.go | 14 +- vendor/google.golang.org/grpc/rpc_util.go | 39 ++-- .../grpc/serviceconfig/serviceconfig.go | 2 +- .../google.golang.org/grpc/status/status.go | 12 +- vendor/google.golang.org/grpc/stream.go | 20 ++- vendor/google.golang.org/grpc/tap/tap.go | 2 +- vendor/google.golang.org/grpc/version.go | 2 +- vendor/google.golang.org/grpc/vet.sh | 6 +- vendor/modules.txt | 12 +- 55 files changed, 719 insertions(+), 456 deletions(-) create mode 100644 vendor/google.golang.org/grpc/internal/grpcsync/oncefunc.go create mode 100644 vendor/google.golang.org/grpc/internal/grpcutil/compressor.go diff --git a/go.mod b/go.mod index 4ec30937b..f169e9a97 100644 --- a/go.mod +++ b/go.mod @@ -14,8 +14,8 @@ require ( github.com/VictoriaMetrics/metrics v1.23.0 github.com/VictoriaMetrics/metricsql v0.49.0 github.com/aws/aws-sdk-go-v2 v1.17.1 - github.com/aws/aws-sdk-go-v2/config v1.18.1 - github.com/aws/aws-sdk-go-v2/feature/s3/manager v1.11.40 + github.com/aws/aws-sdk-go-v2/config v1.18.2 + github.com/aws/aws-sdk-go-v2/feature/s3/manager v1.11.41 github.com/aws/aws-sdk-go-v2/service/s3 v1.29.3 github.com/cespare/xxhash/v2 v2.1.2 github.com/cheggaaa/pb/v3 v3.1.0 @@ -45,7 +45,7 @@ require ( github.com/Azure/azure-sdk-for-go/sdk/internal v1.1.1 // indirect github.com/VividCortex/ewma v1.2.0 // indirect github.com/aws/aws-sdk-go-v2/aws/protocol/eventstream v1.4.9 // indirect - github.com/aws/aws-sdk-go-v2/credentials v1.13.1 // indirect + github.com/aws/aws-sdk-go-v2/credentials v1.13.2 // indirect github.com/aws/aws-sdk-go-v2/feature/ec2/imds v1.12.19 // indirect github.com/aws/aws-sdk-go-v2/internal/configsources v1.1.25 // indirect github.com/aws/aws-sdk-go-v2/internal/endpoints/v2 v2.4.19 // indirect @@ -57,7 +57,7 @@ require ( github.com/aws/aws-sdk-go-v2/service/internal/s3shared v1.13.19 // indirect github.com/aws/aws-sdk-go-v2/service/sso v1.11.25 // indirect github.com/aws/aws-sdk-go-v2/service/ssooidc v1.13.8 // indirect - github.com/aws/aws-sdk-go-v2/service/sts v1.17.3 // indirect + github.com/aws/aws-sdk-go-v2/service/sts v1.17.4 // indirect github.com/aws/smithy-go v1.13.4 // indirect github.com/beorn7/perks v1.0.1 // indirect github.com/cpuguy83/go-md2man/v2 v2.0.2 // indirect @@ -93,7 +93,7 @@ require ( golang.org/x/text v0.4.0 // indirect golang.org/x/xerrors v0.0.0-20220907171357-04be3eba64a2 // indirect google.golang.org/appengine v1.6.7 // indirect - google.golang.org/genproto v0.0.0-20221116193143-41c2ba794472 // indirect - google.golang.org/grpc v1.50.1 // indirect + google.golang.org/genproto v0.0.0-20221118155620-16455021b5e6 // indirect + google.golang.org/grpc v1.51.0 // indirect google.golang.org/protobuf v1.28.1 // indirect ) diff --git a/go.sum b/go.sum index 9ecd8cf86..c866952df 100644 --- a/go.sum +++ b/go.sum @@ -143,14 +143,14 @@ github.com/aws/aws-sdk-go-v2 v1.17.1 h1:02c72fDJr87N8RAC2s3Qu0YuvMRZKNZJ9F+lAehC github.com/aws/aws-sdk-go-v2 v1.17.1/go.mod h1:JLnGeGONAyi2lWXI1p0PCIOIy333JMVK1U7Hf0aRFLw= github.com/aws/aws-sdk-go-v2/aws/protocol/eventstream v1.4.9 h1:RKci2D7tMwpvGpDNZnGQw9wk6v7o/xSwFcUAuNPoB8k= github.com/aws/aws-sdk-go-v2/aws/protocol/eventstream v1.4.9/go.mod h1:vCmV1q1VK8eoQJ5+aYE7PkK1K6v41qJ5pJdK3ggCDvg= -github.com/aws/aws-sdk-go-v2/config v1.18.1 h1:wMzU9tBq/tEdTUcmB9WsYe5stdP0/EAf84vfeqS5S6A= -github.com/aws/aws-sdk-go-v2/config v1.18.1/go.mod h1:jQIgBmQJa5oPzTUtWMjFryPDCBlVqIgoFmdfFKLx4WE= -github.com/aws/aws-sdk-go-v2/credentials v1.13.1 h1:HusGjp9C8zwu1SSEh3s501Llqr2xhn+FYKV5XMnOt6M= -github.com/aws/aws-sdk-go-v2/credentials v1.13.1/go.mod h1:C8xoJdzfQq/kl6gGIuJeHpcAaZnraJfTV9FoBgW1QYg= +github.com/aws/aws-sdk-go-v2/config v1.18.2 h1:tRhTb3xMZsB0gW0sXWpqs9FeIP8iQp5SvnvwiPXzHwo= +github.com/aws/aws-sdk-go-v2/config v1.18.2/go.mod h1:9XVoZTdD8ICjrgI5ddb8j918q6lEZkFYpb7uohgvU6c= +github.com/aws/aws-sdk-go-v2/credentials v1.13.2 h1:F/v1w0XcFDZjL0bCdi9XWJenoPKjGbzljBhDKcryzEQ= +github.com/aws/aws-sdk-go-v2/credentials v1.13.2/go.mod h1:eAT5aj/WJ2UDIA0IVNFc2byQLeD89SDEi4cjzH/MKoQ= github.com/aws/aws-sdk-go-v2/feature/ec2/imds v1.12.19 h1:E3PXZSI3F2bzyj6XxUXdTIfvp425HHhwKsFvmzBwHgs= github.com/aws/aws-sdk-go-v2/feature/ec2/imds v1.12.19/go.mod h1:VihW95zQpeKQWVPGkwT+2+WJNQV8UXFfMTWdU6VErL8= -github.com/aws/aws-sdk-go-v2/feature/s3/manager v1.11.40 h1:Q8Pshd76l1y24DSWJrQPyYY6xVNmpcsZHEfE9xZ4rpU= -github.com/aws/aws-sdk-go-v2/feature/s3/manager v1.11.40/go.mod h1:rxGAF7fGMCse4bUVO+55P1mWCMCnUZPmh3LAnl0PZms= +github.com/aws/aws-sdk-go-v2/feature/s3/manager v1.11.41 h1:ssgdsNm11dvFtO7F/AeiW4dAO3eGsDeg5fwpag/JP/I= +github.com/aws/aws-sdk-go-v2/feature/s3/manager v1.11.41/go.mod h1:CS+AbDFAaPU9TQOo7U6mVV23YvqCOElnqmh0XQjgJ1g= github.com/aws/aws-sdk-go-v2/internal/configsources v1.1.25 h1:nBO/RFxeq/IS5G9Of+ZrgucRciie2qpLy++3UGZ+q2E= github.com/aws/aws-sdk-go-v2/internal/configsources v1.1.25/go.mod h1:Zb29PYkf42vVYQY6pvSyJCJcFHlPIiY+YKdPtwnvMkY= github.com/aws/aws-sdk-go-v2/internal/endpoints/v2 v2.4.19 h1:oRHDrwCTVT8ZXi4sr9Ld+EXk7N/KGssOr2ygNeojEhw= @@ -173,8 +173,8 @@ github.com/aws/aws-sdk-go-v2/service/sso v1.11.25 h1:GFZitO48N/7EsFDt8fMa5iYdmWq github.com/aws/aws-sdk-go-v2/service/sso v1.11.25/go.mod h1:IARHuzTXmj1C0KS35vboR0FeJ89OkEy1M9mWbK2ifCI= github.com/aws/aws-sdk-go-v2/service/ssooidc v1.13.8 h1:jcw6kKZrtNfBPJkaHrscDOZoe5gvi9wjudnxvozYFJo= github.com/aws/aws-sdk-go-v2/service/ssooidc v1.13.8/go.mod h1:er2JHN+kBY6FcMfcBBKNGCT3CarImmdFzishsqBmSRI= -github.com/aws/aws-sdk-go-v2/service/sts v1.17.3 h1:WMAsVk4yQTHOZ2m7dFnF5Azr/aDecBbpWRwc+M6iFIM= -github.com/aws/aws-sdk-go-v2/service/sts v1.17.3/go.mod h1:bXcN3koeVYiJcdDU89n3kCYILob7Y34AeLopUbZgLT4= +github.com/aws/aws-sdk-go-v2/service/sts v1.17.4 h1:YNncBj5dVYd05i4ZQ+YicOotSXo0ufc9P8kTioi13EM= +github.com/aws/aws-sdk-go-v2/service/sts v1.17.4/go.mod h1:bXcN3koeVYiJcdDU89n3kCYILob7Y34AeLopUbZgLT4= github.com/aws/smithy-go v1.13.4 h1:/RN2z1txIJWeXeOkzX+Hk/4Uuvv7dWtCjbmVJcrskyk= github.com/aws/smithy-go v1.13.4/go.mod h1:Tg+OJXh4MB2R/uN61Ko2f6hTZwB/ZYGOtib8J3gBHzA= github.com/beorn7/perks v0.0.0-20180321164747-3a771d992973/go.mod h1:Dwedo/Wpr24TaqPxmxbtue+5NUziq4I4S80YR8gNf3Q= @@ -1256,8 +1256,8 @@ google.golang.org/genproto v0.0.0-20200729003335-053ba62fc06f/go.mod h1:FWY/as6D google.golang.org/genproto v0.0.0-20200804131852-c06518451d9c/go.mod h1:FWY/as6DDZQgahTzZj3fqbO1CbirC29ZNUFHwi0/+no= google.golang.org/genproto v0.0.0-20200825200019-8632dd797987/go.mod h1:FWY/as6DDZQgahTzZj3fqbO1CbirC29ZNUFHwi0/+no= google.golang.org/genproto v0.0.0-20200904004341-0bd0a958aa1d/go.mod h1:FWY/as6DDZQgahTzZj3fqbO1CbirC29ZNUFHwi0/+no= -google.golang.org/genproto v0.0.0-20221116193143-41c2ba794472 h1:kIfItBRE5gkUKpH4H5lNGciZbka1JrmRli3ArqrKFkA= -google.golang.org/genproto v0.0.0-20221116193143-41c2ba794472/go.mod h1:rZS5c/ZVYMaOGBfO68GWtjOw/eLaZM1X6iVtgjZ+EWg= +google.golang.org/genproto v0.0.0-20221118155620-16455021b5e6 h1:a2S6M0+660BgMNl++4JPlcAO/CjkqYItDEZwkoDQK7c= +google.golang.org/genproto v0.0.0-20221118155620-16455021b5e6/go.mod h1:rZS5c/ZVYMaOGBfO68GWtjOw/eLaZM1X6iVtgjZ+EWg= google.golang.org/grpc v1.17.0/go.mod h1:6QZJwpn2B+Zp71q/5VxRsJ6NXXVCE5NRUHRo+f3cWCs= google.golang.org/grpc v1.19.0/go.mod h1:mqu4LbDTu4XGKhr4mRzUsmM4RtVoemTSY81AxZiDr8c= google.golang.org/grpc v1.20.0/go.mod h1:chYK+tFQF0nDUGJgXMSgLCQk3phJEuONr2DCgLDdAQM= @@ -1278,8 +1278,8 @@ google.golang.org/grpc v1.31.0/go.mod h1:N36X2cJ7JwdamYAgDz+s+rVMFjt3numwzf/HckM google.golang.org/grpc v1.31.1/go.mod h1:N36X2cJ7JwdamYAgDz+s+rVMFjt3numwzf/HckM8pak= google.golang.org/grpc v1.33.1/go.mod h1:fr5YgcSWrqhRRxogOsw7RzIpsmvOZ6IcH4kBYTpR3n0= google.golang.org/grpc v1.33.2/go.mod h1:JMHMWHQWaTccqQQlmk3MJZS+GWXOdAesneDmEnv2fbc= -google.golang.org/grpc v1.50.1 h1:DS/BukOZWp8s6p4Dt/tOaJaTQyPyOoCcrjroHuCeLzY= -google.golang.org/grpc v1.50.1/go.mod h1:ZgQEeidpAuNRZ8iRrlBKXZQP1ghovWIVhdJRyCDK+GI= +google.golang.org/grpc v1.51.0 h1:E1eGv1FTqoLIdnBCZufiSHgKjlqG6fKFf6pPWtMTh8U= +google.golang.org/grpc v1.51.0/go.mod h1:wgNDFcnuBGmxLKI/qn4T+m5BtEBYXJPvibbUPsAIPww= google.golang.org/protobuf v0.0.0-20200109180630-ec00e32a8dfd/go.mod h1:DFci5gLYBciE7Vtevhsrf46CRTquxDuWsQurQQe4oz8= google.golang.org/protobuf v0.0.0-20200221191635-4d8936d0db64/go.mod h1:kwYJMbMJ01Woi6D6+Kah6886xMZcty6N08ah7+eCXa0= google.golang.org/protobuf v0.0.0-20200228230310-ab0ca4ff8a60/go.mod h1:cfTl7dwQJ+fmap5saPgwCLgHXTUD7jkjRqWcaiX5VyM= diff --git a/vendor/github.com/aws/aws-sdk-go-v2/config/CHANGELOG.md b/vendor/github.com/aws/aws-sdk-go-v2/config/CHANGELOG.md index 4544603af..a94956f6c 100644 --- a/vendor/github.com/aws/aws-sdk-go-v2/config/CHANGELOG.md +++ b/vendor/github.com/aws/aws-sdk-go-v2/config/CHANGELOG.md @@ -1,3 +1,7 @@ +# v1.18.2 (2022-11-17) + +* **Dependency Update**: Updated to the latest SDK module versions + # v1.18.1 (2022-11-16) * **Dependency Update**: Updated to the latest SDK module versions diff --git a/vendor/github.com/aws/aws-sdk-go-v2/config/go_module_metadata.go b/vendor/github.com/aws/aws-sdk-go-v2/config/go_module_metadata.go index 65864ef61..8c40a351d 100644 --- a/vendor/github.com/aws/aws-sdk-go-v2/config/go_module_metadata.go +++ b/vendor/github.com/aws/aws-sdk-go-v2/config/go_module_metadata.go @@ -3,4 +3,4 @@ package config // goModuleVersion is the tagged release for this module -const goModuleVersion = "1.18.1" +const goModuleVersion = "1.18.2" diff --git a/vendor/github.com/aws/aws-sdk-go-v2/credentials/CHANGELOG.md b/vendor/github.com/aws/aws-sdk-go-v2/credentials/CHANGELOG.md index 0e3450eec..d8a8e7506 100644 --- a/vendor/github.com/aws/aws-sdk-go-v2/credentials/CHANGELOG.md +++ b/vendor/github.com/aws/aws-sdk-go-v2/credentials/CHANGELOG.md @@ -1,3 +1,7 @@ +# v1.13.2 (2022-11-17) + +* **Dependency Update**: Updated to the latest SDK module versions + # v1.13.1 (2022-11-16) * **Dependency Update**: Updated to the latest SDK module versions diff --git a/vendor/github.com/aws/aws-sdk-go-v2/credentials/go_module_metadata.go b/vendor/github.com/aws/aws-sdk-go-v2/credentials/go_module_metadata.go index 19296d1e3..14ae9d7cb 100644 --- a/vendor/github.com/aws/aws-sdk-go-v2/credentials/go_module_metadata.go +++ b/vendor/github.com/aws/aws-sdk-go-v2/credentials/go_module_metadata.go @@ -3,4 +3,4 @@ package credentials // goModuleVersion is the tagged release for this module -const goModuleVersion = "1.13.1" +const goModuleVersion = "1.13.2" diff --git a/vendor/github.com/aws/aws-sdk-go-v2/feature/s3/manager/CHANGELOG.md b/vendor/github.com/aws/aws-sdk-go-v2/feature/s3/manager/CHANGELOG.md index 4dfb5d672..6476a0d69 100644 --- a/vendor/github.com/aws/aws-sdk-go-v2/feature/s3/manager/CHANGELOG.md +++ b/vendor/github.com/aws/aws-sdk-go-v2/feature/s3/manager/CHANGELOG.md @@ -1,3 +1,7 @@ +# v1.11.41 (2022-11-17) + +* **Dependency Update**: Updated to the latest SDK module versions + # v1.11.40 (2022-11-16) * **Dependency Update**: Updated to the latest SDK module versions diff --git a/vendor/github.com/aws/aws-sdk-go-v2/feature/s3/manager/go_module_metadata.go b/vendor/github.com/aws/aws-sdk-go-v2/feature/s3/manager/go_module_metadata.go index e5d6e1b6a..e16d39dcd 100644 --- a/vendor/github.com/aws/aws-sdk-go-v2/feature/s3/manager/go_module_metadata.go +++ b/vendor/github.com/aws/aws-sdk-go-v2/feature/s3/manager/go_module_metadata.go @@ -3,4 +3,4 @@ package manager // goModuleVersion is the tagged release for this module -const goModuleVersion = "1.11.40" +const goModuleVersion = "1.11.41" diff --git a/vendor/github.com/aws/aws-sdk-go-v2/service/sts/CHANGELOG.md b/vendor/github.com/aws/aws-sdk-go-v2/service/sts/CHANGELOG.md index a2b23672e..d50d45edc 100644 --- a/vendor/github.com/aws/aws-sdk-go-v2/service/sts/CHANGELOG.md +++ b/vendor/github.com/aws/aws-sdk-go-v2/service/sts/CHANGELOG.md @@ -1,3 +1,7 @@ +# v1.17.4 (2022-11-17) + +* **Documentation**: Documentation updates for AWS Security Token Service. + # v1.17.3 (2022-11-16) * No change notes available for this release. diff --git a/vendor/github.com/aws/aws-sdk-go-v2/service/sts/api_op_AssumeRole.go b/vendor/github.com/aws/aws-sdk-go-v2/service/sts/api_op_AssumeRole.go index 9ae61e72c..f4f4f46f4 100644 --- a/vendor/github.com/aws/aws-sdk-go-v2/service/sts/api_op_AssumeRole.go +++ b/vendor/github.com/aws/aws-sdk-go-v2/service/sts/api_op_AssumeRole.go @@ -28,16 +28,16 @@ import ( // inline or managed session policies // (https://docs.aws.amazon.com/IAM/latest/UserGuide/access_policies.html#policies_session) // to this operation. You can pass a single JSON policy document to use as an -// inline session policy. You can also specify up to 10 managed policies to use as -// managed session policies. The plaintext that you use for both inline and managed -// session policies can't exceed 2,048 characters. Passing policies to this -// operation returns new temporary credentials. The resulting session's permissions -// are the intersection of the role's identity-based policy and the session -// policies. You can use the role's temporary credentials in subsequent Amazon Web -// Services API calls to access resources in the account that owns the role. You -// cannot use session policies to grant more permissions than those allowed by the -// identity-based policy of the role that is being assumed. For more information, -// see Session Policies +// inline session policy. You can also specify up to 10 managed policy Amazon +// Resource Names (ARNs) to use as managed session policies. The plaintext that you +// use for both inline and managed session policies can't exceed 2,048 characters. +// Passing policies to this operation returns new temporary credentials. The +// resulting session's permissions are the intersection of the role's +// identity-based policy and the session policies. You can use the role's temporary +// credentials in subsequent Amazon Web Services API calls to access resources in +// the account that owns the role. You cannot use session policies to grant more +// permissions than those allowed by the identity-based policy of the role that is +// being assumed. For more information, see Session Policies // (https://docs.aws.amazon.com/IAM/latest/UserGuide/access_policies.html#policies_session) // in the IAM User Guide. When you create a role, you create two policies: A role // trust policy that specifies who can assume the role and a permissions policy @@ -189,11 +189,11 @@ type AssumeRoleInput struct { // be any ASCII character from the space character to the end of the valid // character list (\u0020 through \u00FF). It can also include the tab (\u0009), // linefeed (\u000A), and carriage return (\u000D) characters. An Amazon Web - // Services conversion compresses the passed session policies and session tags into - // a packed binary format that has a separate limit. Your request can fail for this - // limit even if your plaintext meets the other requirements. The PackedPolicySize - // response element indicates by percentage how close the policies and tags for - // your request are to the upper size limit. + // Services conversion compresses the passed inline session policy, managed policy + // ARNs, and session tags into a packed binary format that has a separate limit. + // Your request can fail for this limit even if your plaintext meets the other + // requirements. The PackedPolicySize response element indicates by percentage how + // close the policies and tags for your request are to the upper size limit. Policy *string // The Amazon Resource Names (ARNs) of the IAM managed policies that you want to @@ -204,18 +204,18 @@ type AssumeRoleInput struct { // Amazon Resource Names (ARNs) and Amazon Web Services Service Namespaces // (https://docs.aws.amazon.com/general/latest/gr/aws-arns-and-namespaces.html) in // the Amazon Web Services General Reference. An Amazon Web Services conversion - // compresses the passed session policies and session tags into a packed binary - // format that has a separate limit. Your request can fail for this limit even if - // your plaintext meets the other requirements. The PackedPolicySize response - // element indicates by percentage how close the policies and tags for your request - // are to the upper size limit. Passing policies to this operation returns new - // temporary credentials. The resulting session's permissions are the intersection - // of the role's identity-based policy and the session policies. You can use the - // role's temporary credentials in subsequent Amazon Web Services API calls to - // access resources in the account that owns the role. You cannot use session - // policies to grant more permissions than those allowed by the identity-based - // policy of the role that is being assumed. For more information, see Session - // Policies + // compresses the passed inline session policy, managed policy ARNs, and session + // tags into a packed binary format that has a separate limit. Your request can + // fail for this limit even if your plaintext meets the other requirements. The + // PackedPolicySize response element indicates by percentage how close the policies + // and tags for your request are to the upper size limit. Passing policies to this + // operation returns new temporary credentials. The resulting session's permissions + // are the intersection of the role's identity-based policy and the session + // policies. You can use the role's temporary credentials in subsequent Amazon Web + // Services API calls to access resources in the account that owns the role. You + // cannot use session policies to grant more permissions than those allowed by the + // identity-based policy of the role that is being assumed. For more information, + // see Session Policies // (https://docs.aws.amazon.com/IAM/latest/UserGuide/access_policies.html#policies_session) // in the IAM User Guide. PolicyArns []types.PolicyDescriptorType @@ -257,22 +257,23 @@ type AssumeRoleInput struct { // Character Limits // (https://docs.aws.amazon.com/IAM/latest/UserGuide/reference_iam-limits.html#reference_iam-limits-entity-length) // in the IAM User Guide. An Amazon Web Services conversion compresses the passed - // session policies and session tags into a packed binary format that has a - // separate limit. Your request can fail for this limit even if your plaintext - // meets the other requirements. The PackedPolicySize response element indicates by - // percentage how close the policies and tags for your request are to the upper - // size limit. You can pass a session tag with the same key as a tag that is - // already attached to the role. When you do, session tags override a role tag with - // the same key. Tag key–value pairs are not case sensitive, but case is preserved. - // This means that you cannot have separate Department and department tag keys. - // Assume that the role has the Department=Marketing tag and you pass the - // department=engineering session tag. Department and department are not saved as - // separate tags, and the session tag passed in the request takes precedence over - // the role tag. Additionally, if you used temporary credentials to perform this - // operation, the new session inherits any transitive session tags from the calling - // session. If you pass a session tag with the same key as an inherited tag, the - // operation fails. To view the inherited tags for a session, see the CloudTrail - // logs. For more information, see Viewing Session Tags in CloudTrail + // inline session policy, managed policy ARNs, and session tags into a packed + // binary format that has a separate limit. Your request can fail for this limit + // even if your plaintext meets the other requirements. The PackedPolicySize + // response element indicates by percentage how close the policies and tags for + // your request are to the upper size limit. You can pass a session tag with the + // same key as a tag that is already attached to the role. When you do, session + // tags override a role tag with the same key. Tag key–value pairs are not case + // sensitive, but case is preserved. This means that you cannot have separate + // Department and department tag keys. Assume that the role has the + // Department=Marketing tag and you pass the department=engineering session tag. + // Department and department are not saved as separate tags, and the session tag + // passed in the request takes precedence over the role tag. Additionally, if you + // used temporary credentials to perform this operation, the new session inherits + // any transitive session tags from the calling session. If you pass a session tag + // with the same key as an inherited tag, the operation fails. To view the + // inherited tags for a session, see the CloudTrail logs. For more information, see + // Viewing Session Tags in CloudTrail // (https://docs.aws.amazon.com/IAM/latest/UserGuide/id_session-tags.html#id_session-tags_ctlogs) // in the IAM User Guide. Tags []types.Tag diff --git a/vendor/github.com/aws/aws-sdk-go-v2/service/sts/api_op_AssumeRoleWithSAML.go b/vendor/github.com/aws/aws-sdk-go-v2/service/sts/api_op_AssumeRoleWithSAML.go index e12315e4c..4ed0f5d07 100644 --- a/vendor/github.com/aws/aws-sdk-go-v2/service/sts/api_op_AssumeRoleWithSAML.go +++ b/vendor/github.com/aws/aws-sdk-go-v2/service/sts/api_op_AssumeRoleWithSAML.go @@ -53,16 +53,16 @@ import ( // pass inline or managed session policies // (https://docs.aws.amazon.com/IAM/latest/UserGuide/access_policies.html#policies_session) // to this operation. You can pass a single JSON policy document to use as an -// inline session policy. You can also specify up to 10 managed policies to use as -// managed session policies. The plaintext that you use for both inline and managed -// session policies can't exceed 2,048 characters. Passing policies to this -// operation returns new temporary credentials. The resulting session's permissions -// are the intersection of the role's identity-based policy and the session -// policies. You can use the role's temporary credentials in subsequent Amazon Web -// Services API calls to access resources in the account that owns the role. You -// cannot use session policies to grant more permissions than those allowed by the -// identity-based policy of the role that is being assumed. For more information, -// see Session Policies +// inline session policy. You can also specify up to 10 managed policy Amazon +// Resource Names (ARNs) to use as managed session policies. The plaintext that you +// use for both inline and managed session policies can't exceed 2,048 characters. +// Passing policies to this operation returns new temporary credentials. The +// resulting session's permissions are the intersection of the role's +// identity-based policy and the session policies. You can use the role's temporary +// credentials in subsequent Amazon Web Services API calls to access resources in +// the account that owns the role. You cannot use session policies to grant more +// permissions than those allowed by the identity-based policy of the role that is +// being assumed. For more information, see Session Policies // (https://docs.aws.amazon.com/IAM/latest/UserGuide/access_policies.html#policies_session) // in the IAM User Guide. Calling AssumeRoleWithSAML does not require the use of // Amazon Web Services security credentials. The identity of the caller is @@ -82,16 +82,16 @@ import ( // these and additional limits, see IAM and STS Character Limits // (https://docs.aws.amazon.com/IAM/latest/UserGuide/reference_iam-limits.html#reference_iam-limits-entity-length) // in the IAM User Guide. An Amazon Web Services conversion compresses the passed -// session policies and session tags into a packed binary format that has a -// separate limit. Your request can fail for this limit even if your plaintext -// meets the other requirements. The PackedPolicySize response element indicates by -// percentage how close the policies and tags for your request are to the upper -// size limit. You can pass a session tag with the same key as a tag that is -// attached to the role. When you do, session tags override the role's tags with -// the same key. An administrator must grant you the permissions necessary to pass -// session tags. The administrator can also create granular permissions to allow -// you to pass only specific session tags. For more information, see Tutorial: -// Using Tags for Attribute-Based Access Control +// inline session policy, managed policy ARNs, and session tags into a packed +// binary format that has a separate limit. Your request can fail for this limit +// even if your plaintext meets the other requirements. The PackedPolicySize +// response element indicates by percentage how close the policies and tags for +// your request are to the upper size limit. You can pass a session tag with the +// same key as a tag that is attached to the role. When you do, session tags +// override the role's tags with the same key. An administrator must grant you the +// permissions necessary to pass session tags. The administrator can also create +// granular permissions to allow you to pass only specific session tags. For more +// information, see Tutorial: Using Tags for Attribute-Based Access Control // (https://docs.aws.amazon.com/IAM/latest/UserGuide/tutorial_attribute-based-access-control.html) // in the IAM User Guide. You can set the session tags as transitive. Transitive // tags persist during role chaining. For more information, see Chaining Roles with @@ -194,11 +194,11 @@ type AssumeRoleWithSAMLInput struct { // be any ASCII character from the space character to the end of the valid // character list (\u0020 through \u00FF). It can also include the tab (\u0009), // linefeed (\u000A), and carriage return (\u000D) characters. An Amazon Web - // Services conversion compresses the passed session policies and session tags into - // a packed binary format that has a separate limit. Your request can fail for this - // limit even if your plaintext meets the other requirements. The PackedPolicySize - // response element indicates by percentage how close the policies and tags for - // your request are to the upper size limit. + // Services conversion compresses the passed inline session policy, managed policy + // ARNs, and session tags into a packed binary format that has a separate limit. + // Your request can fail for this limit even if your plaintext meets the other + // requirements. The PackedPolicySize response element indicates by percentage how + // close the policies and tags for your request are to the upper size limit. Policy *string // The Amazon Resource Names (ARNs) of the IAM managed policies that you want to @@ -209,18 +209,18 @@ type AssumeRoleWithSAMLInput struct { // Amazon Resource Names (ARNs) and Amazon Web Services Service Namespaces // (https://docs.aws.amazon.com/general/latest/gr/aws-arns-and-namespaces.html) in // the Amazon Web Services General Reference. An Amazon Web Services conversion - // compresses the passed session policies and session tags into a packed binary - // format that has a separate limit. Your request can fail for this limit even if - // your plaintext meets the other requirements. The PackedPolicySize response - // element indicates by percentage how close the policies and tags for your request - // are to the upper size limit. Passing policies to this operation returns new - // temporary credentials. The resulting session's permissions are the intersection - // of the role's identity-based policy and the session policies. You can use the - // role's temporary credentials in subsequent Amazon Web Services API calls to - // access resources in the account that owns the role. You cannot use session - // policies to grant more permissions than those allowed by the identity-based - // policy of the role that is being assumed. For more information, see Session - // Policies + // compresses the passed inline session policy, managed policy ARNs, and session + // tags into a packed binary format that has a separate limit. Your request can + // fail for this limit even if your plaintext meets the other requirements. The + // PackedPolicySize response element indicates by percentage how close the policies + // and tags for your request are to the upper size limit. Passing policies to this + // operation returns new temporary credentials. The resulting session's permissions + // are the intersection of the role's identity-based policy and the session + // policies. You can use the role's temporary credentials in subsequent Amazon Web + // Services API calls to access resources in the account that owns the role. You + // cannot use session policies to grant more permissions than those allowed by the + // identity-based policy of the role that is being assumed. For more information, + // see Session Policies // (https://docs.aws.amazon.com/IAM/latest/UserGuide/access_policies.html#policies_session) // in the IAM User Guide. PolicyArns []types.PolicyDescriptorType diff --git a/vendor/github.com/aws/aws-sdk-go-v2/service/sts/api_op_AssumeRoleWithWebIdentity.go b/vendor/github.com/aws/aws-sdk-go-v2/service/sts/api_op_AssumeRoleWithWebIdentity.go index 2e8b51c98..e2ff4ac62 100644 --- a/vendor/github.com/aws/aws-sdk-go-v2/service/sts/api_op_AssumeRoleWithWebIdentity.go +++ b/vendor/github.com/aws/aws-sdk-go-v2/service/sts/api_op_AssumeRoleWithWebIdentity.go @@ -63,16 +63,16 @@ import ( // inline or managed session policies // (https://docs.aws.amazon.com/IAM/latest/UserGuide/access_policies.html#policies_session) // to this operation. You can pass a single JSON policy document to use as an -// inline session policy. You can also specify up to 10 managed policies to use as -// managed session policies. The plaintext that you use for both inline and managed -// session policies can't exceed 2,048 characters. Passing policies to this -// operation returns new temporary credentials. The resulting session's permissions -// are the intersection of the role's identity-based policy and the session -// policies. You can use the role's temporary credentials in subsequent Amazon Web -// Services API calls to access resources in the account that owns the role. You -// cannot use session policies to grant more permissions than those allowed by the -// identity-based policy of the role that is being assumed. For more information, -// see Session Policies +// inline session policy. You can also specify up to 10 managed policy Amazon +// Resource Names (ARNs) to use as managed session policies. The plaintext that you +// use for both inline and managed session policies can't exceed 2,048 characters. +// Passing policies to this operation returns new temporary credentials. The +// resulting session's permissions are the intersection of the role's +// identity-based policy and the session policies. You can use the role's temporary +// credentials in subsequent Amazon Web Services API calls to access resources in +// the account that owns the role. You cannot use session policies to grant more +// permissions than those allowed by the identity-based policy of the role that is +// being assumed. For more information, see Session Policies // (https://docs.aws.amazon.com/IAM/latest/UserGuide/access_policies.html#policies_session) // in the IAM User Guide. Tags (Optional) You can configure your IdP to pass // attributes into your web identity token as session tags. Each session tag @@ -84,16 +84,16 @@ import ( // these and additional limits, see IAM and STS Character Limits // (https://docs.aws.amazon.com/IAM/latest/UserGuide/reference_iam-limits.html#reference_iam-limits-entity-length) // in the IAM User Guide. An Amazon Web Services conversion compresses the passed -// session policies and session tags into a packed binary format that has a -// separate limit. Your request can fail for this limit even if your plaintext -// meets the other requirements. The PackedPolicySize response element indicates by -// percentage how close the policies and tags for your request are to the upper -// size limit. You can pass a session tag with the same key as a tag that is -// attached to the role. When you do, the session tag overrides the role tag with -// the same key. An administrator must grant you the permissions necessary to pass -// session tags. The administrator can also create granular permissions to allow -// you to pass only specific session tags. For more information, see Tutorial: -// Using Tags for Attribute-Based Access Control +// inline session policy, managed policy ARNs, and session tags into a packed +// binary format that has a separate limit. Your request can fail for this limit +// even if your plaintext meets the other requirements. The PackedPolicySize +// response element indicates by percentage how close the policies and tags for +// your request are to the upper size limit. You can pass a session tag with the +// same key as a tag that is attached to the role. When you do, the session tag +// overrides the role tag with the same key. An administrator must grant you the +// permissions necessary to pass session tags. The administrator can also create +// granular permissions to allow you to pass only specific session tags. For more +// information, see Tutorial: Using Tags for Attribute-Based Access Control // (https://docs.aws.amazon.com/IAM/latest/UserGuide/tutorial_attribute-based-access-control.html) // in the IAM User Guide. You can set the session tags as transitive. Transitive // tags persist during role chaining. For more information, see Chaining Roles with @@ -215,11 +215,11 @@ type AssumeRoleWithWebIdentityInput struct { // be any ASCII character from the space character to the end of the valid // character list (\u0020 through \u00FF). It can also include the tab (\u0009), // linefeed (\u000A), and carriage return (\u000D) characters. An Amazon Web - // Services conversion compresses the passed session policies and session tags into - // a packed binary format that has a separate limit. Your request can fail for this - // limit even if your plaintext meets the other requirements. The PackedPolicySize - // response element indicates by percentage how close the policies and tags for - // your request are to the upper size limit. + // Services conversion compresses the passed inline session policy, managed policy + // ARNs, and session tags into a packed binary format that has a separate limit. + // Your request can fail for this limit even if your plaintext meets the other + // requirements. The PackedPolicySize response element indicates by percentage how + // close the policies and tags for your request are to the upper size limit. Policy *string // The Amazon Resource Names (ARNs) of the IAM managed policies that you want to @@ -230,18 +230,18 @@ type AssumeRoleWithWebIdentityInput struct { // Amazon Resource Names (ARNs) and Amazon Web Services Service Namespaces // (https://docs.aws.amazon.com/general/latest/gr/aws-arns-and-namespaces.html) in // the Amazon Web Services General Reference. An Amazon Web Services conversion - // compresses the passed session policies and session tags into a packed binary - // format that has a separate limit. Your request can fail for this limit even if - // your plaintext meets the other requirements. The PackedPolicySize response - // element indicates by percentage how close the policies and tags for your request - // are to the upper size limit. Passing policies to this operation returns new - // temporary credentials. The resulting session's permissions are the intersection - // of the role's identity-based policy and the session policies. You can use the - // role's temporary credentials in subsequent Amazon Web Services API calls to - // access resources in the account that owns the role. You cannot use session - // policies to grant more permissions than those allowed by the identity-based - // policy of the role that is being assumed. For more information, see Session - // Policies + // compresses the passed inline session policy, managed policy ARNs, and session + // tags into a packed binary format that has a separate limit. Your request can + // fail for this limit even if your plaintext meets the other requirements. The + // PackedPolicySize response element indicates by percentage how close the policies + // and tags for your request are to the upper size limit. Passing policies to this + // operation returns new temporary credentials. The resulting session's permissions + // are the intersection of the role's identity-based policy and the session + // policies. You can use the role's temporary credentials in subsequent Amazon Web + // Services API calls to access resources in the account that owns the role. You + // cannot use session policies to grant more permissions than those allowed by the + // identity-based policy of the role that is being assumed. For more information, + // see Session Policies // (https://docs.aws.amazon.com/IAM/latest/UserGuide/access_policies.html#policies_session) // in the IAM User Guide. PolicyArns []types.PolicyDescriptorType diff --git a/vendor/github.com/aws/aws-sdk-go-v2/service/sts/api_op_GetFederationToken.go b/vendor/github.com/aws/aws-sdk-go-v2/service/sts/api_op_GetFederationToken.go index 01a3d411b..60026a139 100644 --- a/vendor/github.com/aws/aws-sdk-go-v2/service/sts/api_op_GetFederationToken.go +++ b/vendor/github.com/aws/aws-sdk-go-v2/service/sts/api_op_GetFederationToken.go @@ -55,16 +55,16 @@ import ( // session policy // (https://docs.aws.amazon.com/IAM/latest/UserGuide/access_policies.html#policies_session) // to this operation. You can pass a single JSON policy document to use as an -// inline session policy. You can also specify up to 10 managed policies to use as -// managed session policies. The plaintext that you use for both inline and managed -// session policies can't exceed 2,048 characters. Though the session policy -// parameters are optional, if you do not pass a policy, then the resulting -// federated user session has no permissions. When you pass session policies, the -// session permissions are the intersection of the IAM user policies and the -// session policies that you pass. This gives you a way to further restrict the -// permissions for a federated user. You cannot use session policies to grant more -// permissions than those that are defined in the permissions policy of the IAM -// user. For more information, see Session Policies +// inline session policy. You can also specify up to 10 managed policy Amazon +// Resource Names (ARNs) to use as managed session policies. The plaintext that you +// use for both inline and managed session policies can't exceed 2,048 characters. +// Though the session policy parameters are optional, if you do not pass a policy, +// then the resulting federated user session has no permissions. When you pass +// session policies, the session permissions are the intersection of the IAM user +// policies and the session policies that you pass. This gives you a way to further +// restrict the permissions for a federated user. You cannot use session policies +// to grant more permissions than those that are defined in the permissions policy +// of the IAM user. For more information, see Session Policies // (https://docs.aws.amazon.com/IAM/latest/UserGuide/access_policies.html#policies_session) // in the IAM User Guide. For information about using GetFederationToken to create // temporary security credentials, see GetFederationToken—Federation Through a @@ -135,15 +135,15 @@ type GetFederationTokenInput struct { // You must pass an inline or managed session policy // (https://docs.aws.amazon.com/IAM/latest/UserGuide/access_policies.html#policies_session) // to this operation. You can pass a single JSON policy document to use as an - // inline session policy. You can also specify up to 10 managed policies to use as - // managed session policies. This parameter is optional. However, if you do not - // pass any session policies, then the resulting federated user session has no - // permissions. When you pass session policies, the session permissions are the - // intersection of the IAM user policies and the session policies that you pass. - // This gives you a way to further restrict the permissions for a federated user. - // You cannot use session policies to grant more permissions than those that are - // defined in the permissions policy of the IAM user. For more information, see - // Session Policies + // inline session policy. You can also specify up to 10 managed policy Amazon + // Resource Names (ARNs) to use as managed session policies. This parameter is + // optional. However, if you do not pass any session policies, then the resulting + // federated user session has no permissions. When you pass session policies, the + // session permissions are the intersection of the IAM user policies and the + // session policies that you pass. This gives you a way to further restrict the + // permissions for a federated user. You cannot use session policies to grant more + // permissions than those that are defined in the permissions policy of the IAM + // user. For more information, see Session Policies // (https://docs.aws.amazon.com/IAM/latest/UserGuide/access_policies.html#policies_session) // in the IAM User Guide. The resulting credentials can be used to access a // resource that has a resource-based policy. If that policy specifically @@ -155,11 +155,11 @@ type GetFederationTokenInput struct { // from the space character to the end of the valid character list (\u0020 through // \u00FF). It can also include the tab (\u0009), linefeed (\u000A), and carriage // return (\u000D) characters. An Amazon Web Services conversion compresses the - // passed session policies and session tags into a packed binary format that has a - // separate limit. Your request can fail for this limit even if your plaintext - // meets the other requirements. The PackedPolicySize response element indicates by - // percentage how close the policies and tags for your request are to the upper - // size limit. + // passed inline session policy, managed policy ARNs, and session tags into a + // packed binary format that has a separate limit. Your request can fail for this + // limit even if your plaintext meets the other requirements. The PackedPolicySize + // response element indicates by percentage how close the policies and tags for + // your request are to the upper size limit. Policy *string // The Amazon Resource Names (ARNs) of the IAM managed policies that you want to @@ -168,11 +168,11 @@ type GetFederationTokenInput struct { // managed session policy // (https://docs.aws.amazon.com/IAM/latest/UserGuide/access_policies.html#policies_session) // to this operation. You can pass a single JSON policy document to use as an - // inline session policy. You can also specify up to 10 managed policies to use as - // managed session policies. The plaintext that you use for both inline and managed - // session policies can't exceed 2,048 characters. You can provide up to 10 managed - // policy ARNs. For more information about ARNs, see Amazon Resource Names (ARNs) - // and Amazon Web Services Service Namespaces + // inline session policy. You can also specify up to 10 managed policy Amazon + // Resource Names (ARNs) to use as managed session policies. The plaintext that you + // use for both inline and managed session policies can't exceed 2,048 characters. + // You can provide up to 10 managed policy ARNs. For more information about ARNs, + // see Amazon Resource Names (ARNs) and Amazon Web Services Service Namespaces // (https://docs.aws.amazon.com/general/latest/gr/aws-arns-and-namespaces.html) in // the Amazon Web Services General Reference. This parameter is optional. However, // if you do not pass any session policies, then the resulting federated user @@ -188,11 +188,12 @@ type GetFederationTokenInput struct { // references the federated user session in the Principal element of the policy, // the session has the permissions allowed by the policy. These permissions are // granted in addition to the permissions that are granted by the session policies. - // An Amazon Web Services conversion compresses the passed session policies and - // session tags into a packed binary format that has a separate limit. Your request - // can fail for this limit even if your plaintext meets the other requirements. The - // PackedPolicySize response element indicates by percentage how close the policies - // and tags for your request are to the upper size limit. + // An Amazon Web Services conversion compresses the passed inline session policy, + // managed policy ARNs, and session tags into a packed binary format that has a + // separate limit. Your request can fail for this limit even if your plaintext + // meets the other requirements. The PackedPolicySize response element indicates by + // percentage how close the policies and tags for your request are to the upper + // size limit. PolicyArns []types.PolicyDescriptorType // A list of session tags. Each session tag consists of a key name and an @@ -205,15 +206,15 @@ type GetFederationTokenInput struct { // Character Limits // (https://docs.aws.amazon.com/IAM/latest/UserGuide/reference_iam-limits.html#reference_iam-limits-entity-length) // in the IAM User Guide. An Amazon Web Services conversion compresses the passed - // session policies and session tags into a packed binary format that has a - // separate limit. Your request can fail for this limit even if your plaintext - // meets the other requirements. The PackedPolicySize response element indicates by - // percentage how close the policies and tags for your request are to the upper - // size limit. You can pass a session tag with the same key as a tag that is - // already attached to the user you are federating. When you do, session tags - // override a user tag with the same key. Tag key–value pairs are not case - // sensitive, but case is preserved. This means that you cannot have separate - // Department and department tag keys. Assume that the role has the + // inline session policy, managed policy ARNs, and session tags into a packed + // binary format that has a separate limit. Your request can fail for this limit + // even if your plaintext meets the other requirements. The PackedPolicySize + // response element indicates by percentage how close the policies and tags for + // your request are to the upper size limit. You can pass a session tag with the + // same key as a tag that is already attached to the user you are federating. When + // you do, session tags override a user tag with the same key. Tag key–value pairs + // are not case sensitive, but case is preserved. This means that you cannot have + // separate Department and department tag keys. Assume that the role has the // Department=Marketing tag and you pass the department=engineering session tag. // Department and department are not saved as separate tags, and the session tag // passed in the request takes precedence over the role tag. diff --git a/vendor/github.com/aws/aws-sdk-go-v2/service/sts/go_module_metadata.go b/vendor/github.com/aws/aws-sdk-go-v2/service/sts/go_module_metadata.go index 55d44802d..b0c7518be 100644 --- a/vendor/github.com/aws/aws-sdk-go-v2/service/sts/go_module_metadata.go +++ b/vendor/github.com/aws/aws-sdk-go-v2/service/sts/go_module_metadata.go @@ -3,4 +3,4 @@ package sts // goModuleVersion is the tagged release for this module -const goModuleVersion = "1.17.3" +const goModuleVersion = "1.17.4" diff --git a/vendor/google.golang.org/grpc/attributes/attributes.go b/vendor/google.golang.org/grpc/attributes/attributes.go index ae13ddac1..02f5dc531 100644 --- a/vendor/google.golang.org/grpc/attributes/attributes.go +++ b/vendor/google.golang.org/grpc/attributes/attributes.go @@ -19,7 +19,7 @@ // Package attributes defines a generic key/value store used in various gRPC // components. // -// Experimental +// # Experimental // // Notice: This package is EXPERIMENTAL and may be changed or removed in a // later release. diff --git a/vendor/google.golang.org/grpc/backoff.go b/vendor/google.golang.org/grpc/backoff.go index 542594f5c..29475e31c 100644 --- a/vendor/google.golang.org/grpc/backoff.go +++ b/vendor/google.golang.org/grpc/backoff.go @@ -48,7 +48,7 @@ type BackoffConfig struct { // here for more details: // https://github.com/grpc/grpc/blob/master/doc/connection-backoff.md. // -// Experimental +// # Experimental // // Notice: This type is EXPERIMENTAL and may be changed or removed in a // later release. diff --git a/vendor/google.golang.org/grpc/balancer/balancer.go b/vendor/google.golang.org/grpc/balancer/balancer.go index f4f9408f3..392b21fb2 100644 --- a/vendor/google.golang.org/grpc/balancer/balancer.go +++ b/vendor/google.golang.org/grpc/balancer/balancer.go @@ -110,6 +110,11 @@ type SubConn interface { UpdateAddresses([]resolver.Address) // Connect starts the connecting for this SubConn. Connect() + // GetOrBuildProducer returns a reference to the existing Producer for this + // ProducerBuilder in this SubConn, or, if one does not currently exist, + // creates a new one and returns it. Returns a close function which must + // be called when the Producer is no longer needed. + GetOrBuildProducer(ProducerBuilder) (p Producer, close func()) } // NewSubConnOptions contains options to create new SubConn. @@ -371,3 +376,21 @@ type ClientConnState struct { // ErrBadResolverState may be returned by UpdateClientConnState to indicate a // problem with the provided name resolver data. var ErrBadResolverState = errors.New("bad resolver state") + +// A ProducerBuilder is a simple constructor for a Producer. It is used by the +// SubConn to create producers when needed. +type ProducerBuilder interface { + // Build creates a Producer. The first parameter is always a + // grpc.ClientConnInterface (a type to allow creating RPCs/streams on the + // associated SubConn), but is declared as interface{} to avoid a + // dependency cycle. Should also return a close function that will be + // called when all references to the Producer have been given up. + Build(grpcClientConnInterface interface{}) (p Producer, close func()) +} + +// A Producer is a type shared among potentially many consumers. It is +// associated with a SubConn, and an implementation will typically contain +// other methods to provide additional functionality, e.g. configuration or +// subscription registration. +type Producer interface { +} diff --git a/vendor/google.golang.org/grpc/balancer/base/balancer.go b/vendor/google.golang.org/grpc/balancer/base/balancer.go index e8dfc828a..3929c26d3 100644 --- a/vendor/google.golang.org/grpc/balancer/base/balancer.go +++ b/vendor/google.golang.org/grpc/balancer/base/balancer.go @@ -157,8 +157,8 @@ func (b *baseBalancer) mergeErrors() error { // regeneratePicker takes a snapshot of the balancer, and generates a picker // from it. The picker is -// - errPicker if the balancer is in TransientFailure, -// - built by the pickerBuilder with all READY SubConns otherwise. +// - errPicker if the balancer is in TransientFailure, +// - built by the pickerBuilder with all READY SubConns otherwise. func (b *baseBalancer) regeneratePicker() { if b.state == connectivity.TransientFailure { b.picker = NewErrPicker(b.mergeErrors()) diff --git a/vendor/google.golang.org/grpc/balancer/conn_state_evaluator.go b/vendor/google.golang.org/grpc/balancer/conn_state_evaluator.go index a87b6809a..c33413581 100644 --- a/vendor/google.golang.org/grpc/balancer/conn_state_evaluator.go +++ b/vendor/google.golang.org/grpc/balancer/conn_state_evaluator.go @@ -34,10 +34,10 @@ type ConnectivityStateEvaluator struct { // RecordTransition records state change happening in subConn and based on that // it evaluates what aggregated state should be. // -// - If at least one SubConn in Ready, the aggregated state is Ready; -// - Else if at least one SubConn in Connecting, the aggregated state is Connecting; -// - Else if at least one SubConn is Idle, the aggregated state is Idle; -// - Else if at least one SubConn is TransientFailure (or there are no SubConns), the aggregated state is Transient Failure. +// - If at least one SubConn in Ready, the aggregated state is Ready; +// - Else if at least one SubConn in Connecting, the aggregated state is Connecting; +// - Else if at least one SubConn is Idle, the aggregated state is Idle; +// - Else if at least one SubConn is TransientFailure (or there are no SubConns), the aggregated state is Transient Failure. // // Shutdown is not considered. func (cse *ConnectivityStateEvaluator) RecordTransition(oldState, newState connectivity.State) connectivity.State { @@ -55,7 +55,11 @@ func (cse *ConnectivityStateEvaluator) RecordTransition(oldState, newState conne cse.numIdle += updateVal } } + return cse.CurrentState() +} +// CurrentState returns the current aggregate conn state by evaluating the counters +func (cse *ConnectivityStateEvaluator) CurrentState() connectivity.State { // Evaluate. if cse.numReady > 0 { return connectivity.Ready diff --git a/vendor/google.golang.org/grpc/balancer/grpclb/grpc_lb_v1/load_balancer.pb.go b/vendor/google.golang.org/grpc/balancer/grpclb/grpc_lb_v1/load_balancer.pb.go index c393d7ffd..bf4c3cb44 100644 --- a/vendor/google.golang.org/grpc/balancer/grpclb/grpc_lb_v1/load_balancer.pb.go +++ b/vendor/google.golang.org/grpc/balancer/grpclb/grpc_lb_v1/load_balancer.pb.go @@ -52,6 +52,7 @@ type LoadBalanceRequest struct { unknownFields protoimpl.UnknownFields // Types that are assignable to LoadBalanceRequestType: + // // *LoadBalanceRequest_InitialRequest // *LoadBalanceRequest_ClientStats LoadBalanceRequestType isLoadBalanceRequest_LoadBalanceRequestType `protobuf_oneof:"load_balance_request_type"` @@ -340,6 +341,7 @@ type LoadBalanceResponse struct { unknownFields protoimpl.UnknownFields // Types that are assignable to LoadBalanceResponseType: + // // *LoadBalanceResponse_InitialResponse // *LoadBalanceResponse_ServerList // *LoadBalanceResponse_FallbackResponse diff --git a/vendor/google.golang.org/grpc/balancer/grpclb/grpclb.go b/vendor/google.golang.org/grpc/balancer/grpclb/grpclb.go index 6c3402e36..dd15810d0 100644 --- a/vendor/google.golang.org/grpc/balancer/grpclb/grpclb.go +++ b/vendor/google.golang.org/grpc/balancer/grpclb/grpclb.go @@ -19,7 +19,8 @@ // Package grpclb defines a grpclb balancer. // // To install grpclb balancer, import this package as: -// import _ "google.golang.org/grpc/balancer/grpclb" +// +// import _ "google.golang.org/grpc/balancer/grpclb" package grpclb import ( @@ -229,8 +230,9 @@ type lbBalancer struct { // regeneratePicker takes a snapshot of the balancer, and generates a picker from // it. The picker -// - always returns ErrTransientFailure if the balancer is in TransientFailure, -// - does two layer roundrobin pick otherwise. +// - always returns ErrTransientFailure if the balancer is in TransientFailure, +// - does two layer roundrobin pick otherwise. +// // Caller must hold lb.mu. func (lb *lbBalancer) regeneratePicker(resetDrop bool) { if lb.state == connectivity.TransientFailure { @@ -290,14 +292,14 @@ func (lb *lbBalancer) regeneratePicker(resetDrop bool) { // fallback and grpclb). lb.scState contains states for all SubConns, including // those in cache (SubConns are cached for 10 seconds after remove). // -// The aggregated state is: -// - If at least one SubConn in Ready, the aggregated state is Ready; -// - Else if at least one SubConn in Connecting or IDLE, the aggregated state is Connecting; -// - It's OK to consider IDLE as Connecting. SubConns never stay in IDLE, -// they start to connect immediately. But there's a race between the overall -// state is reported, and when the new SubConn state arrives. And SubConns -// never go back to IDLE. -// - Else the aggregated state is TransientFailure. +// The aggregated state is: +// - If at least one SubConn in Ready, the aggregated state is Ready; +// - Else if at least one SubConn in Connecting or IDLE, the aggregated state is Connecting; +// - It's OK to consider IDLE as Connecting. SubConns never stay in IDLE, +// they start to connect immediately. But there's a race between the overall +// state is reported, and when the new SubConn state arrives. And SubConns +// never go back to IDLE. +// - Else the aggregated state is TransientFailure. func (lb *lbBalancer) aggregateSubConnStates() connectivity.State { var numConnecting uint64 diff --git a/vendor/google.golang.org/grpc/balancer_conn_wrappers.go b/vendor/google.golang.org/grpc/balancer_conn_wrappers.go index b1c23eaae..0359956d3 100644 --- a/vendor/google.golang.org/grpc/balancer_conn_wrappers.go +++ b/vendor/google.golang.org/grpc/balancer_conn_wrappers.go @@ -19,17 +19,20 @@ package grpc import ( + "context" "fmt" "strings" "sync" "google.golang.org/grpc/balancer" + "google.golang.org/grpc/codes" "google.golang.org/grpc/connectivity" "google.golang.org/grpc/internal/balancer/gracefulswitch" "google.golang.org/grpc/internal/buffer" "google.golang.org/grpc/internal/channelz" "google.golang.org/grpc/internal/grpcsync" "google.golang.org/grpc/resolver" + "google.golang.org/grpc/status" ) // ccBalancerWrapper sits between the ClientConn and the Balancer. @@ -305,7 +308,7 @@ func (ccb *ccBalancerWrapper) NewSubConn(addrs []resolver.Address, opts balancer channelz.Warningf(logger, ccb.cc.channelzID, "acBalancerWrapper: NewSubConn: failed to newAddrConn: %v", err) return nil, err } - acbw := &acBalancerWrapper{ac: ac} + acbw := &acBalancerWrapper{ac: ac, producers: make(map[balancer.ProducerBuilder]*refCountedProducer)} acbw.ac.mu.Lock() ac.acbw = acbw acbw.ac.mu.Unlock() @@ -359,8 +362,9 @@ func (ccb *ccBalancerWrapper) Target() string { // acBalancerWrapper is a wrapper on top of ac for balancers. // It implements balancer.SubConn interface. type acBalancerWrapper struct { - mu sync.Mutex - ac *addrConn + mu sync.Mutex + ac *addrConn + producers map[balancer.ProducerBuilder]*refCountedProducer } func (acbw *acBalancerWrapper) UpdateAddresses(addrs []resolver.Address) { @@ -414,3 +418,64 @@ func (acbw *acBalancerWrapper) getAddrConn() *addrConn { defer acbw.mu.Unlock() return acbw.ac } + +var errSubConnNotReady = status.Error(codes.Unavailable, "SubConn not currently connected") + +// NewStream begins a streaming RPC on the addrConn. If the addrConn is not +// ready, returns errSubConnNotReady. +func (acbw *acBalancerWrapper) NewStream(ctx context.Context, desc *StreamDesc, method string, opts ...CallOption) (ClientStream, error) { + transport := acbw.ac.getReadyTransport() + if transport == nil { + return nil, errSubConnNotReady + } + return newNonRetryClientStream(ctx, desc, method, transport, acbw.ac, opts...) +} + +// Invoke performs a unary RPC. If the addrConn is not ready, returns +// errSubConnNotReady. +func (acbw *acBalancerWrapper) Invoke(ctx context.Context, method string, args interface{}, reply interface{}, opts ...CallOption) error { + cs, err := acbw.NewStream(ctx, unaryStreamDesc, method, opts...) + if err != nil { + return err + } + if err := cs.SendMsg(args); err != nil { + return err + } + return cs.RecvMsg(reply) +} + +type refCountedProducer struct { + producer balancer.Producer + refs int // number of current refs to the producer + close func() // underlying producer's close function +} + +func (acbw *acBalancerWrapper) GetOrBuildProducer(pb balancer.ProducerBuilder) (balancer.Producer, func()) { + acbw.mu.Lock() + defer acbw.mu.Unlock() + + // Look up existing producer from this builder. + pData := acbw.producers[pb] + if pData == nil { + // Not found; create a new one and add it to the producers map. + p, close := pb.Build(acbw) + pData = &refCountedProducer{producer: p, close: close} + acbw.producers[pb] = pData + } + // Account for this new reference. + pData.refs++ + + // Return a cleanup function wrapped in a OnceFunc to remove this reference + // and delete the refCountedProducer from the map if the total reference + // count goes to zero. + unref := func() { + acbw.mu.Lock() + pData.refs-- + if pData.refs == 0 { + defer pData.close() // Run outside the acbw mutex + delete(acbw.producers, pb) + } + acbw.mu.Unlock() + } + return pData.producer, grpcsync.OnceFunc(unref) +} diff --git a/vendor/google.golang.org/grpc/binarylog/grpc_binarylog_v1/binarylog.pb.go b/vendor/google.golang.org/grpc/binarylog/grpc_binarylog_v1/binarylog.pb.go index ed75290cd..64a232f28 100644 --- a/vendor/google.golang.org/grpc/binarylog/grpc_binarylog_v1/binarylog.pb.go +++ b/vendor/google.golang.org/grpc/binarylog/grpc_binarylog_v1/binarylog.pb.go @@ -261,6 +261,7 @@ type GrpcLogEntry struct { // according to the type of the log entry. // // Types that are assignable to Payload: + // // *GrpcLogEntry_ClientHeader // *GrpcLogEntry_ServerHeader // *GrpcLogEntry_Message @@ -694,12 +695,12 @@ func (x *Message) GetData() []byte { // Header keys added by gRPC are omitted. To be more specific, // implementations will not log the following entries, and this is // not to be treated as a truncation: -// - entries handled by grpc that are not user visible, such as those -// that begin with 'grpc-' (with exception of grpc-trace-bin) -// or keys like 'lb-token' -// - transport specific entries, including but not limited to: -// ':path', ':authority', 'content-encoding', 'user-agent', 'te', etc -// - entries added for call credentials +// - entries handled by grpc that are not user visible, such as those +// that begin with 'grpc-' (with exception of grpc-trace-bin) +// or keys like 'lb-token' +// - transport specific entries, including but not limited to: +// ':path', ':authority', 'content-encoding', 'user-agent', 'te', etc +// - entries added for call credentials // // Implementations must always log grpc-trace-bin if it is present. // Practically speaking it will only be visible on server side because diff --git a/vendor/google.golang.org/grpc/channelz/channelz.go b/vendor/google.golang.org/grpc/channelz/channelz.go index a220c47c5..32b7fa579 100644 --- a/vendor/google.golang.org/grpc/channelz/channelz.go +++ b/vendor/google.golang.org/grpc/channelz/channelz.go @@ -23,7 +23,7 @@ // https://github.com/grpc/proposal/blob/master/A14-channelz.md, is provided by // the `internal/channelz` package. // -// Experimental +// # Experimental // // Notice: All APIs in this package are experimental and may be removed in a // later release. diff --git a/vendor/google.golang.org/grpc/clientconn.go b/vendor/google.golang.org/grpc/clientconn.go index 779b03bca..422639c79 100644 --- a/vendor/google.golang.org/grpc/clientconn.go +++ b/vendor/google.golang.org/grpc/clientconn.go @@ -503,7 +503,7 @@ type ClientConn struct { // WaitForStateChange waits until the connectivity.State of ClientConn changes from sourceState or // ctx expires. A true value is returned in former case and false in latter. // -// Experimental +// # Experimental // // Notice: This API is EXPERIMENTAL and may be changed or removed in a // later release. @@ -522,7 +522,7 @@ func (cc *ClientConn) WaitForStateChange(ctx context.Context, sourceState connec // GetState returns the connectivity.State of ClientConn. // -// Experimental +// # Experimental // // Notice: This API is EXPERIMENTAL and may be changed or removed in a later // release. @@ -534,7 +534,7 @@ func (cc *ClientConn) GetState() connectivity.State { // the channel is idle. Does not wait for the connection attempts to begin // before returning. // -// Experimental +// # Experimental // // Notice: This API is EXPERIMENTAL and may be changed or removed in a later // release. @@ -761,7 +761,7 @@ func (cc *ClientConn) channelzMetric() *channelz.ChannelInternalMetric { // Target returns the target string of the ClientConn. // -// Experimental +// # Experimental // // Notice: This API is EXPERIMENTAL and may be changed or removed in a // later release. @@ -831,9 +831,9 @@ func equalAddresses(a, b []resolver.Address) bool { // // If ac is Ready, it checks whether current connected address of ac is in the // new addrs list. -// - If true, it updates ac.addrs and returns true. The ac will keep using -// the existing connection. -// - If false, it does nothing and returns false. +// - If true, it updates ac.addrs and returns true. The ac will keep using +// the existing connection. +// - If false, it does nothing and returns false. func (ac *addrConn) tryUpdateAddrs(addrs []resolver.Address) bool { ac.mu.Lock() defer ac.mu.Unlock() @@ -998,7 +998,7 @@ func (cc *ClientConn) resolveNow(o resolver.ResolveNowOptions) { // However, if a previously unavailable network becomes available, this may be // used to trigger an immediate reconnect. // -// Experimental +// # Experimental // // Notice: This API is EXPERIMENTAL and may be changed or removed in a // later release. @@ -1228,38 +1228,33 @@ func (ac *addrConn) tryAllAddrs(addrs []resolver.Address, connectDeadline time.T // address was not successfully connected, or updates ac appropriately with the // new transport. func (ac *addrConn) createTransport(addr resolver.Address, copts transport.ConnectOptions, connectDeadline time.Time) error { - // TODO: Delete prefaceReceived and move the logic to wait for it into the - // transport. - prefaceReceived := grpcsync.NewEvent() - connClosed := grpcsync.NewEvent() - addr.ServerName = ac.cc.getServerName(addr) hctx, hcancel := context.WithCancel(ac.ctx) - hcStarted := false // protected by ac.mu - onClose := func() { + onClose := grpcsync.OnceFunc(func() { ac.mu.Lock() defer ac.mu.Unlock() - defer connClosed.Fire() - defer hcancel() - if !hcStarted || hctx.Err() != nil { - // We didn't start the health check or set the state to READY, so - // no need to do anything else here. - // - // OR, we have already cancelled the health check context, meaning - // we have already called onClose once for this transport. In this - // case it would be dangerous to clear the transport and update the - // state, since there may be a new transport in this addrConn. + if ac.state == connectivity.Shutdown { + // Already shut down. tearDown() already cleared the transport and + // canceled hctx via ac.ctx, and we expected this connection to be + // closed, so do nothing here. + return + } + hcancel() + if ac.transport == nil { + // We're still connecting to this address, which could error. Do + // not update the connectivity state or resolve; these will happen + // at the end of the tryAllAddrs connection loop in the event of an + // error. return } ac.transport = nil - // Refresh the name resolver + // Refresh the name resolver on any connection loss. ac.cc.resolveNow(resolver.ResolveNowOptions{}) - if ac.state != connectivity.Shutdown { - ac.updateConnectivityState(connectivity.Idle, nil) - } - } - + // Always go idle and wait for the LB policy to initiate a new + // connection attempt. + ac.updateConnectivityState(connectivity.Idle, nil) + }) onGoAway := func(r transport.GoAwayReason) { ac.mu.Lock() ac.adjustParams(r) @@ -1271,7 +1266,7 @@ func (ac *addrConn) createTransport(addr resolver.Address, copts transport.Conne defer cancel() copts.ChannelzParentID = ac.channelzID - newTr, err := transport.NewClientTransport(connectCtx, ac.cc.ctx, addr, copts, func() { prefaceReceived.Fire() }, onGoAway, onClose) + newTr, err := transport.NewClientTransport(connectCtx, ac.cc.ctx, addr, copts, onGoAway, onClose) if err != nil { // newTr is either nil, or closed. hcancel() @@ -1279,60 +1274,34 @@ func (ac *addrConn) createTransport(addr resolver.Address, copts transport.Conne return err } - select { - case <-connectCtx.Done(): - // We didn't get the preface in time. + ac.mu.Lock() + defer ac.mu.Unlock() + if ac.state == connectivity.Shutdown { + // This can happen if the subConn was removed while in `Connecting` + // state. tearDown() would have set the state to `Shutdown`, but + // would not have closed the transport since ac.transport would not + // have been set at that point. + // + // We run this in a goroutine because newTr.Close() calls onClose() + // inline, which requires locking ac.mu. + // // The error we pass to Close() is immaterial since there are no open // streams at this point, so no trailers with error details will be sent // out. We just need to pass a non-nil error. - newTr.Close(transport.ErrConnClosing) - if connectCtx.Err() == context.DeadlineExceeded { - err := errors.New("failed to receive server preface within timeout") - channelz.Warningf(logger, ac.channelzID, "grpc: addrConn.createTransport failed to connect to %s: %v", addr, err) - return err - } + go newTr.Close(transport.ErrConnClosing) return nil - case <-prefaceReceived.Done(): - // We got the preface - huzzah! things are good. - ac.mu.Lock() - defer ac.mu.Unlock() - if connClosed.HasFired() { - // onClose called first; go idle but do nothing else. - if ac.state != connectivity.Shutdown { - ac.updateConnectivityState(connectivity.Idle, nil) - } - return nil - } - if ac.state == connectivity.Shutdown { - // This can happen if the subConn was removed while in `Connecting` - // state. tearDown() would have set the state to `Shutdown`, but - // would not have closed the transport since ac.transport would not - // been set at that point. - // - // We run this in a goroutine because newTr.Close() calls onClose() - // inline, which requires locking ac.mu. - // - // The error we pass to Close() is immaterial since there are no open - // streams at this point, so no trailers with error details will be sent - // out. We just need to pass a non-nil error. - go newTr.Close(transport.ErrConnClosing) - return nil - } - ac.curAddr = addr - ac.transport = newTr - hcStarted = true - ac.startHealthCheck(hctx) // Will set state to READY if appropriate. - return nil - case <-connClosed.Done(): - // The transport has already closed. If we received the preface, too, - // this is not an error. - select { - case <-prefaceReceived.Done(): - return nil - default: - return errors.New("connection closed before server preface received") - } } + if hctx.Err() != nil { + // onClose was already called for this connection, but the connection + // was successfully established first. Consider it a success and set + // the new state to Idle. + ac.updateConnectivityState(connectivity.Idle, nil) + return nil + } + ac.curAddr = addr + ac.transport = newTr + ac.startHealthCheck(hctx) // Will set state to READY if appropriate. + return nil } // startHealthCheck starts the health checking stream (RPC) to watch the health @@ -1583,7 +1552,7 @@ func (cc *ClientConn) parseTargetAndFindResolver() (resolver.Builder, error) { channelz.Infof(logger, cc.channelzID, "dial target %q parse failed: %v", cc.target, err) } else { channelz.Infof(logger, cc.channelzID, "parsed dial target is: %+v", parsedTarget) - rb = cc.getResolver(parsedTarget.Scheme) + rb = cc.getResolver(parsedTarget.URL.Scheme) if rb != nil { cc.parsedTarget = parsedTarget return rb, nil @@ -1604,9 +1573,9 @@ func (cc *ClientConn) parseTargetAndFindResolver() (resolver.Builder, error) { return nil, err } channelz.Infof(logger, cc.channelzID, "parsed dial target is: %+v", parsedTarget) - rb = cc.getResolver(parsedTarget.Scheme) + rb = cc.getResolver(parsedTarget.URL.Scheme) if rb == nil { - return nil, fmt.Errorf("could not get resolver for default scheme: %q", parsedTarget.Scheme) + return nil, fmt.Errorf("could not get resolver for default scheme: %q", parsedTarget.URL.Scheme) } cc.parsedTarget = parsedTarget return rb, nil diff --git a/vendor/google.golang.org/grpc/credentials/alts/internal/proto/grpc_gcp/handshaker.pb.go b/vendor/google.golang.org/grpc/credentials/alts/internal/proto/grpc_gcp/handshaker.pb.go index 40570e9bf..383c5fb97 100644 --- a/vendor/google.golang.org/grpc/credentials/alts/internal/proto/grpc_gcp/handshaker.pb.go +++ b/vendor/google.golang.org/grpc/credentials/alts/internal/proto/grpc_gcp/handshaker.pb.go @@ -216,6 +216,7 @@ type Identity struct { unknownFields protoimpl.UnknownFields // Types that are assignable to IdentityOneof: + // // *Identity_ServiceAccount // *Identity_Hostname IdentityOneof isIdentity_IdentityOneof `protobuf_oneof:"identity_oneof"` @@ -664,6 +665,7 @@ type HandshakerReq struct { unknownFields protoimpl.UnknownFields // Types that are assignable to ReqOneof: + // // *HandshakerReq_ClientStart // *HandshakerReq_ServerStart // *HandshakerReq_Next diff --git a/vendor/google.golang.org/grpc/credentials/credentials.go b/vendor/google.golang.org/grpc/credentials/credentials.go index 96ff1877e..5feac3aa0 100644 --- a/vendor/google.golang.org/grpc/credentials/credentials.go +++ b/vendor/google.golang.org/grpc/credentials/credentials.go @@ -36,16 +36,16 @@ import ( // PerRPCCredentials defines the common interface for the credentials which need to // attach security information to every RPC (e.g., oauth2). type PerRPCCredentials interface { - // GetRequestMetadata gets the current request metadata, refreshing - // tokens if required. This should be called by the transport layer on - // each request, and the data should be populated in headers or other - // context. If a status code is returned, it will be used as the status - // for the RPC. uri is the URI of the entry point for the request. - // When supported by the underlying implementation, ctx can be used for - // timeout and cancellation. Additionally, RequestInfo data will be - // available via ctx to this call. - // TODO(zhaoq): Define the set of the qualified keys instead of leaving - // it as an arbitrary string. + // GetRequestMetadata gets the current request metadata, refreshing tokens + // if required. This should be called by the transport layer on each + // request, and the data should be populated in headers or other + // context. If a status code is returned, it will be used as the status for + // the RPC (restricted to an allowable set of codes as defined by gRFC + // A54). uri is the URI of the entry point for the request. When supported + // by the underlying implementation, ctx can be used for timeout and + // cancellation. Additionally, RequestInfo data will be available via ctx + // to this call. TODO(zhaoq): Define the set of the qualified keys instead + // of leaving it as an arbitrary string. GetRequestMetadata(ctx context.Context, uri ...string) (map[string]string, error) // RequireTransportSecurity indicates whether the credentials requires // transport security. diff --git a/vendor/google.golang.org/grpc/credentials/google/xds.go b/vendor/google.golang.org/grpc/credentials/google/xds.go index e32edc042..2c5c8b9ee 100644 --- a/vendor/google.golang.org/grpc/credentials/google/xds.go +++ b/vendor/google.golang.org/grpc/credentials/google/xds.go @@ -40,6 +40,7 @@ const cfeClusterAuthorityName = "traffic-director-c2p.xds.googleapis.com" // "xdstp://traffic-director-c2p.xds.googleapis.com/envoy.config.cluster.v3.Cluster/google_cfe_", // use TLS // - otherwise, use ALTS +// // - else, do TLS // // On the server, ServerHandshake always does TLS. diff --git a/vendor/google.golang.org/grpc/credentials/tls.go b/vendor/google.golang.org/grpc/credentials/tls.go index 784822d05..ce2bbc10a 100644 --- a/vendor/google.golang.org/grpc/credentials/tls.go +++ b/vendor/google.golang.org/grpc/credentials/tls.go @@ -195,7 +195,7 @@ func NewServerTLSFromFile(certFile, keyFile string) (TransportCredentials, error // TLSChannelzSecurityValue defines the struct that TLS protocol should return // from GetSecurityValue(), containing security info like cipher and certificate used. // -// Experimental +// # Experimental // // Notice: This type is EXPERIMENTAL and may be changed or removed in a // later release. diff --git a/vendor/google.golang.org/grpc/encoding/encoding.go b/vendor/google.golang.org/grpc/encoding/encoding.go index 18e530fc9..711763d54 100644 --- a/vendor/google.golang.org/grpc/encoding/encoding.go +++ b/vendor/google.golang.org/grpc/encoding/encoding.go @@ -19,7 +19,7 @@ // Package encoding defines the interface for the compressor and codec, and // functions to register and retrieve compressors and codecs. // -// Experimental +// # Experimental // // Notice: This package is EXPERIMENTAL and may be changed or removed in a // later release. @@ -28,6 +28,8 @@ package encoding import ( "io" "strings" + + "google.golang.org/grpc/internal/grpcutil" ) // Identity specifies the optional encoding for uncompressed streams. @@ -73,6 +75,7 @@ var registeredCompressor = make(map[string]Compressor) // registered with the same name, the one registered last will take effect. func RegisterCompressor(c Compressor) { registeredCompressor[c.Name()] = c + grpcutil.RegisteredCompressorNames = append(grpcutil.RegisteredCompressorNames, c.Name()) } // GetCompressor returns Compressor for the given compressor name. diff --git a/vendor/google.golang.org/grpc/grpclog/loggerv2.go b/vendor/google.golang.org/grpc/grpclog/loggerv2.go index 7c1f66409..b5560b47e 100644 --- a/vendor/google.golang.org/grpc/grpclog/loggerv2.go +++ b/vendor/google.golang.org/grpc/grpclog/loggerv2.go @@ -242,7 +242,7 @@ func (g *loggerT) V(l int) bool { // DepthLoggerV2, the below functions will be called with the appropriate stack // depth set for trivial functions the logger may ignore. // -// Experimental +// # Experimental // // Notice: This type is EXPERIMENTAL and may be changed or removed in a // later release. diff --git a/vendor/google.golang.org/grpc/internal/binarylog/env_config.go b/vendor/google.golang.org/grpc/internal/binarylog/env_config.go index c5579e650..f9e80e27a 100644 --- a/vendor/google.golang.org/grpc/internal/binarylog/env_config.go +++ b/vendor/google.golang.org/grpc/internal/binarylog/env_config.go @@ -30,15 +30,15 @@ import ( // to build a new logger and assign it to binarylog.Logger. // // Example filter config strings: -// - "" Nothing will be logged -// - "*" All headers and messages will be fully logged. -// - "*{h}" Only headers will be logged. -// - "*{m:256}" Only the first 256 bytes of each message will be logged. -// - "Foo/*" Logs every method in service Foo -// - "Foo/*,-Foo/Bar" Logs every method in service Foo except method /Foo/Bar -// - "Foo/*,Foo/Bar{m:256}" Logs the first 256 bytes of each message in method -// /Foo/Bar, logs all headers and messages in every other method in service -// Foo. +// - "" Nothing will be logged +// - "*" All headers and messages will be fully logged. +// - "*{h}" Only headers will be logged. +// - "*{m:256}" Only the first 256 bytes of each message will be logged. +// - "Foo/*" Logs every method in service Foo +// - "Foo/*,-Foo/Bar" Logs every method in service Foo except method /Foo/Bar +// - "Foo/*,Foo/Bar{m:256}" Logs the first 256 bytes of each message in method +// /Foo/Bar, logs all headers and messages in every other method in service +// Foo. // // If two configs exist for one certain method or service, the one specified // later overrides the previous config. diff --git a/vendor/google.golang.org/grpc/internal/channelz/types.go b/vendor/google.golang.org/grpc/internal/channelz/types.go index ad0ce4dab..7b2f350e2 100644 --- a/vendor/google.golang.org/grpc/internal/channelz/types.go +++ b/vendor/google.golang.org/grpc/internal/channelz/types.go @@ -273,10 +273,10 @@ func (c *channel) deleteSelfFromMap() (delete bool) { // deleteSelfIfReady tries to delete the channel itself from the channelz database. // The delete process includes two steps: -// 1. delete the channel from the entry relation tree, i.e. delete the channel reference from its -// parent's child list. -// 2. delete the channel from the map, i.e. delete the channel entirely from channelz. Lookup by id -// will return entry not found error. +// 1. delete the channel from the entry relation tree, i.e. delete the channel reference from its +// parent's child list. +// 2. delete the channel from the map, i.e. delete the channel entirely from channelz. Lookup by id +// will return entry not found error. func (c *channel) deleteSelfIfReady() { if !c.deleteSelfFromTree() { return @@ -381,10 +381,10 @@ func (sc *subChannel) deleteSelfFromMap() (delete bool) { // deleteSelfIfReady tries to delete the subchannel itself from the channelz database. // The delete process includes two steps: -// 1. delete the subchannel from the entry relation tree, i.e. delete the subchannel reference from -// its parent's child list. -// 2. delete the subchannel from the map, i.e. delete the subchannel entirely from channelz. Lookup -// by id will return entry not found error. +// 1. delete the subchannel from the entry relation tree, i.e. delete the subchannel reference from +// its parent's child list. +// 2. delete the subchannel from the map, i.e. delete the subchannel entirely from channelz. Lookup +// by id will return entry not found error. func (sc *subChannel) deleteSelfIfReady() { if !sc.deleteSelfFromTree() { return diff --git a/vendor/google.golang.org/grpc/internal/envconfig/envconfig.go b/vendor/google.golang.org/grpc/internal/envconfig/envconfig.go index 6f0272543..7edd196bd 100644 --- a/vendor/google.golang.org/grpc/internal/envconfig/envconfig.go +++ b/vendor/google.golang.org/grpc/internal/envconfig/envconfig.go @@ -25,11 +25,15 @@ import ( ) const ( - prefix = "GRPC_GO_" - txtErrIgnoreStr = prefix + "IGNORE_TXT_ERRORS" + prefix = "GRPC_GO_" + txtErrIgnoreStr = prefix + "IGNORE_TXT_ERRORS" + advertiseCompressorsStr = prefix + "ADVERTISE_COMPRESSORS" ) var ( // TXTErrIgnore is set if TXT errors should be ignored ("GRPC_GO_IGNORE_TXT_ERRORS" is not "false"). TXTErrIgnore = !strings.EqualFold(os.Getenv(txtErrIgnoreStr), "false") + // AdvertiseCompressors is set if registered compressor should be advertised + // ("GRPC_GO_ADVERTISE_COMPRESSORS" is not "false"). + AdvertiseCompressors = !strings.EqualFold(os.Getenv(advertiseCompressorsStr), "false") ) diff --git a/vendor/google.golang.org/grpc/internal/grpclog/grpclog.go b/vendor/google.golang.org/grpc/internal/grpclog/grpclog.go index 30a3b4258..b68e26a36 100644 --- a/vendor/google.golang.org/grpc/internal/grpclog/grpclog.go +++ b/vendor/google.golang.org/grpc/internal/grpclog/grpclog.go @@ -110,7 +110,7 @@ type LoggerV2 interface { // This is a copy of the DepthLoggerV2 defined in the external grpclog package. // It is defined here to avoid a circular dependency. // -// Experimental +// # Experimental // // Notice: This type is EXPERIMENTAL and may be changed or removed in a // later release. diff --git a/vendor/google.golang.org/grpc/internal/grpcsync/oncefunc.go b/vendor/google.golang.org/grpc/internal/grpcsync/oncefunc.go new file mode 100644 index 000000000..6635f7bca --- /dev/null +++ b/vendor/google.golang.org/grpc/internal/grpcsync/oncefunc.go @@ -0,0 +1,32 @@ +/* + * + * Copyright 2022 gRPC authors. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + * + */ + +package grpcsync + +import ( + "sync" +) + +// OnceFunc returns a function wrapping f which ensures f is only executed +// once even if the returned function is executed multiple times. +func OnceFunc(f func()) func() { + var once sync.Once + return func() { + once.Do(f) + } +} diff --git a/vendor/google.golang.org/grpc/internal/grpcutil/compressor.go b/vendor/google.golang.org/grpc/internal/grpcutil/compressor.go new file mode 100644 index 000000000..9f4090967 --- /dev/null +++ b/vendor/google.golang.org/grpc/internal/grpcutil/compressor.go @@ -0,0 +1,47 @@ +/* + * + * Copyright 2022 gRPC authors. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + * + */ + +package grpcutil + +import ( + "strings" + + "google.golang.org/grpc/internal/envconfig" +) + +// RegisteredCompressorNames holds names of the registered compressors. +var RegisteredCompressorNames []string + +// IsCompressorNameRegistered returns true when name is available in registry. +func IsCompressorNameRegistered(name string) bool { + for _, compressor := range RegisteredCompressorNames { + if compressor == name { + return true + } + } + return false +} + +// RegisteredCompressors returns a string of registered compressor names +// separated by comma. +func RegisteredCompressors() string { + if !envconfig.AdvertiseCompressors { + return "" + } + return strings.Join(RegisteredCompressorNames, ",") +} diff --git a/vendor/google.golang.org/grpc/internal/grpcutil/method.go b/vendor/google.golang.org/grpc/internal/grpcutil/method.go index e9c4af648..ec62b4775 100644 --- a/vendor/google.golang.org/grpc/internal/grpcutil/method.go +++ b/vendor/google.golang.org/grpc/internal/grpcutil/method.go @@ -25,7 +25,6 @@ import ( // ParseMethod splits service and method from the input. It expects format // "/service/method". -// func ParseMethod(methodName string) (service, method string, _ error) { if !strings.HasPrefix(methodName, "/") { return "", "", errors.New("invalid method name: should start with /") diff --git a/vendor/google.golang.org/grpc/internal/serviceconfig/serviceconfig.go b/vendor/google.golang.org/grpc/internal/serviceconfig/serviceconfig.go index badbdbf59..51e733e49 100644 --- a/vendor/google.golang.org/grpc/internal/serviceconfig/serviceconfig.go +++ b/vendor/google.golang.org/grpc/internal/serviceconfig/serviceconfig.go @@ -67,10 +67,10 @@ func (bc *BalancerConfig) MarshalJSON() ([]byte, error) { // ServiceConfig contains a list of loadBalancingConfigs, each with a name and // config. This method iterates through that list in order, and stops at the // first policy that is supported. -// - If the config for the first supported policy is invalid, the whole service -// config is invalid. -// - If the list doesn't contain any supported policy, the whole service config -// is invalid. +// - If the config for the first supported policy is invalid, the whole service +// config is invalid. +// - If the list doesn't contain any supported policy, the whole service config +// is invalid. func (bc *BalancerConfig) UnmarshalJSON(b []byte) error { var ir intermediateBalancerConfig err := json.Unmarshal(b, &ir) diff --git a/vendor/google.golang.org/grpc/internal/status/status.go b/vendor/google.golang.org/grpc/internal/status/status.go index e5c6513ed..b0ead4f54 100644 --- a/vendor/google.golang.org/grpc/internal/status/status.go +++ b/vendor/google.golang.org/grpc/internal/status/status.go @@ -164,3 +164,13 @@ func (e *Error) Is(target error) bool { } return proto.Equal(e.s.s, tse.s.s) } + +// IsRestrictedControlPlaneCode returns whether the status includes a code +// restricted for control plane usage as defined by gRFC A54. +func IsRestrictedControlPlaneCode(s *Status) bool { + switch s.Code() { + case codes.InvalidArgument, codes.NotFound, codes.AlreadyExists, codes.FailedPrecondition, codes.Aborted, codes.OutOfRange, codes.DataLoss: + return true + } + return false +} diff --git a/vendor/google.golang.org/grpc/internal/transport/handler_server.go b/vendor/google.golang.org/grpc/internal/transport/handler_server.go index 090120925..fb272235d 100644 --- a/vendor/google.golang.org/grpc/internal/transport/handler_server.go +++ b/vendor/google.golang.org/grpc/internal/transport/handler_server.go @@ -442,10 +442,10 @@ func (ht *serverHandlerTransport) Drain() { // mapRecvMsgError returns the non-nil err into the appropriate // error value as expected by callers of *grpc.parser.recvMsg. // In particular, in can only be: -// * io.EOF -// * io.ErrUnexpectedEOF -// * of type transport.ConnectionError -// * an error from the status package +// - io.EOF +// - io.ErrUnexpectedEOF +// - of type transport.ConnectionError +// - an error from the status package func mapRecvMsgError(err error) error { if err == io.EOF || err == io.ErrUnexpectedEOF { return err diff --git a/vendor/google.golang.org/grpc/internal/transport/http2_client.go b/vendor/google.golang.org/grpc/internal/transport/http2_client.go index 5c2f35b24..d518b07e1 100644 --- a/vendor/google.golang.org/grpc/internal/transport/http2_client.go +++ b/vendor/google.golang.org/grpc/internal/transport/http2_client.go @@ -38,8 +38,10 @@ import ( "google.golang.org/grpc/credentials" "google.golang.org/grpc/internal/channelz" icredentials "google.golang.org/grpc/internal/credentials" + "google.golang.org/grpc/internal/grpcsync" "google.golang.org/grpc/internal/grpcutil" imetadata "google.golang.org/grpc/internal/metadata" + istatus "google.golang.org/grpc/internal/status" "google.golang.org/grpc/internal/syscall" "google.golang.org/grpc/internal/transport/networktype" "google.golang.org/grpc/keepalive" @@ -99,16 +101,13 @@ type http2Client struct { maxSendHeaderListSize *uint32 bdpEst *bdpEstimator - // onPrefaceReceipt is a callback that client transport calls upon - // receiving server preface to signal that a succefull HTTP2 - // connection was established. - onPrefaceReceipt func() maxConcurrentStreams uint32 streamQuota int64 streamsQuotaAvailable chan struct{} waitingStreams uint32 nextID uint32 + registeredCompressors string // Do not access controlBuf with mu held. mu sync.Mutex // guard the following variables @@ -194,7 +193,7 @@ func isTemporary(err error) bool { // newHTTP2Client constructs a connected ClientTransport to addr based on HTTP2 // and starts to receive messages on it. Non-nil error returns if construction // fails. -func newHTTP2Client(connectCtx, ctx context.Context, addr resolver.Address, opts ConnectOptions, onPrefaceReceipt func(), onGoAway func(GoAwayReason), onClose func()) (_ *http2Client, err error) { +func newHTTP2Client(connectCtx, ctx context.Context, addr resolver.Address, opts ConnectOptions, onGoAway func(GoAwayReason), onClose func()) (_ *http2Client, err error) { scheme := "http" ctx, cancel := context.WithCancel(ctx) defer func() { @@ -216,12 +215,35 @@ func newHTTP2Client(connectCtx, ctx context.Context, addr resolver.Address, opts } return nil, connectionErrorf(true, err, "transport: Error while dialing %v", err) } + // Any further errors will close the underlying connection defer func(conn net.Conn) { if err != nil { conn.Close() } }(conn) + + // The following defer and goroutine monitor the connectCtx for cancelation + // and deadline. On context expiration, the connection is hard closed and + // this function will naturally fail as a result. Otherwise, the defer + // waits for the goroutine to exit to prevent the context from being + // monitored (and to prevent the connection from ever being closed) after + // returning from this function. + ctxMonitorDone := grpcsync.NewEvent() + newClientCtx, newClientDone := context.WithCancel(connectCtx) + defer func() { + newClientDone() // Awaken the goroutine below if connectCtx hasn't expired. + <-ctxMonitorDone.Done() // Wait for the goroutine below to exit. + }() + go func(conn net.Conn) { + defer ctxMonitorDone.Fire() // Signal this goroutine has exited. + <-newClientCtx.Done() // Block until connectCtx expires or the defer above executes. + if connectCtx.Err() != nil { + // connectCtx expired before exiting the function. Hard close the connection. + conn.Close() + } + }(conn) + kp := opts.KeepaliveParams // Validate keepalive parameters. if kp.Time == 0 { @@ -253,15 +275,7 @@ func newHTTP2Client(connectCtx, ctx context.Context, addr resolver.Address, opts } } if transportCreds != nil { - rawConn := conn - // Pull the deadline from the connectCtx, which will be used for - // timeouts in the authentication protocol handshake. Can ignore the - // boolean as the deadline will return the zero value, which will make - // the conn not timeout on I/O operations. - deadline, _ := connectCtx.Deadline() - rawConn.SetDeadline(deadline) - conn, authInfo, err = transportCreds.ClientHandshake(connectCtx, addr.ServerName, rawConn) - rawConn.SetDeadline(time.Time{}) + conn, authInfo, err = transportCreds.ClientHandshake(connectCtx, addr.ServerName, conn) if err != nil { return nil, connectionErrorf(isTemporary(err), err, "transport: authentication handshake failed: %v", err) } @@ -299,6 +313,7 @@ func newHTTP2Client(connectCtx, ctx context.Context, addr resolver.Address, opts ctxDone: ctx.Done(), // Cache Done chan. cancel: cancel, userAgent: opts.UserAgent, + registeredCompressors: grpcutil.RegisteredCompressors(), conn: conn, remoteAddr: conn.RemoteAddr(), localAddr: conn.LocalAddr(), @@ -315,16 +330,15 @@ func newHTTP2Client(connectCtx, ctx context.Context, addr resolver.Address, opts kp: kp, statsHandlers: opts.StatsHandlers, initialWindowSize: initialWindowSize, - onPrefaceReceipt: onPrefaceReceipt, nextID: 1, maxConcurrentStreams: defaultMaxStreamsClient, streamQuota: defaultMaxStreamsClient, streamsQuotaAvailable: make(chan struct{}, 1), czData: new(channelzData), onGoAway: onGoAway, - onClose: onClose, keepaliveEnabled: keepaliveEnabled, bufferPool: newBufferPool(), + onClose: onClose, } // Add peer information to the http2client context. t.ctx = peer.NewContext(t.ctx, t.getPeer()) @@ -363,21 +377,32 @@ func newHTTP2Client(connectCtx, ctx context.Context, addr resolver.Address, opts t.kpDormancyCond = sync.NewCond(&t.mu) go t.keepalive() } - // Start the reader goroutine for incoming message. Each transport has - // a dedicated goroutine which reads HTTP2 frame from network. Then it - // dispatches the frame to the corresponding stream entity. - go t.reader() + + // Start the reader goroutine for incoming messages. Each transport has a + // dedicated goroutine which reads HTTP2 frames from the network. Then it + // dispatches the frame to the corresponding stream entity. When the + // server preface is received, readerErrCh is closed. If an error occurs + // first, an error is pushed to the channel. This must be checked before + // returning from this function. + readerErrCh := make(chan error, 1) + go t.reader(readerErrCh) + defer func() { + if err == nil { + err = <-readerErrCh + } + if err != nil { + t.Close(err) + } + }() // Send connection preface to server. n, err := t.conn.Write(clientPreface) if err != nil { err = connectionErrorf(true, err, "transport: failed to write client preface: %v", err) - t.Close(err) return nil, err } if n != len(clientPreface) { err = connectionErrorf(true, nil, "transport: preface mismatch, wrote %d bytes; want %d", n, len(clientPreface)) - t.Close(err) return nil, err } var ss []http2.Setting @@ -397,14 +422,12 @@ func newHTTP2Client(connectCtx, ctx context.Context, addr resolver.Address, opts err = t.framer.fr.WriteSettings(ss...) if err != nil { err = connectionErrorf(true, err, "transport: failed to write initial settings frame: %v", err) - t.Close(err) return nil, err } // Adjust the connection flow control window if needed. if delta := uint32(icwz - defaultWindowSize); delta > 0 { if err := t.framer.fr.WriteWindowUpdate(0, delta); err != nil { err = connectionErrorf(true, err, "transport: failed to write window update: %v", err) - t.Close(err) return nil, err } } @@ -507,9 +530,22 @@ func (t *http2Client) createHeaderFields(ctx context.Context, callHdr *CallHdr) headerFields = append(headerFields, hpack.HeaderField{Name: "grpc-previous-rpc-attempts", Value: strconv.Itoa(callHdr.PreviousAttempts)}) } + registeredCompressors := t.registeredCompressors if callHdr.SendCompress != "" { headerFields = append(headerFields, hpack.HeaderField{Name: "grpc-encoding", Value: callHdr.SendCompress}) - headerFields = append(headerFields, hpack.HeaderField{Name: "grpc-accept-encoding", Value: callHdr.SendCompress}) + // Include the outgoing compressor name when compressor is not registered + // via encoding.RegisterCompressor. This is possible when client uses + // WithCompressor dial option. + if !grpcutil.IsCompressorNameRegistered(callHdr.SendCompress) { + if registeredCompressors != "" { + registeredCompressors += "," + } + registeredCompressors += callHdr.SendCompress + } + } + + if registeredCompressors != "" { + headerFields = append(headerFields, hpack.HeaderField{Name: "grpc-accept-encoding", Value: registeredCompressors}) } if dl, ok := ctx.Deadline(); ok { // Send out timeout regardless its value. The server can detect timeout context by itself. @@ -589,7 +625,11 @@ func (t *http2Client) getTrAuthData(ctx context.Context, audience string) (map[s for _, c := range t.perRPCCreds { data, err := c.GetRequestMetadata(ctx, audience) if err != nil { - if _, ok := status.FromError(err); ok { + if st, ok := status.FromError(err); ok { + // Restrict the code to the list allowed by gRFC A54. + if istatus.IsRestrictedControlPlaneCode(st) { + err = status.Errorf(codes.Internal, "transport: received per-RPC creds error with illegal status: %v", err) + } return nil, err } @@ -618,7 +658,14 @@ func (t *http2Client) getCallAuthData(ctx context.Context, audience string, call } data, err := callCreds.GetRequestMetadata(ctx, audience) if err != nil { - return nil, status.Errorf(codes.Internal, "transport: %v", err) + if st, ok := status.FromError(err); ok { + // Restrict the code to the list allowed by gRFC A54. + if istatus.IsRestrictedControlPlaneCode(st) { + err = status.Errorf(codes.Internal, "transport: received per-RPC creds error with illegal status: %v", err) + } + return nil, err + } + return nil, status.Errorf(codes.Internal, "transport: per-RPC creds failed due to error: %v", err) } callAuthData = make(map[string]string, len(data)) for k, v := range data { @@ -634,13 +681,13 @@ func (t *http2Client) getCallAuthData(ctx context.Context, audience string, call // NewStream errors result in transparent retry, as they mean nothing went onto // the wire. However, there are two notable exceptions: // -// 1. If the stream headers violate the max header list size allowed by the -// server. It's possible this could succeed on another transport, even if -// it's unlikely, but do not transparently retry. -// 2. If the credentials errored when requesting their headers. In this case, -// it's possible a retry can fix the problem, but indefinitely transparently -// retrying is not appropriate as it is likely the credentials, if they can -// eventually succeed, would need I/O to do so. +// 1. If the stream headers violate the max header list size allowed by the +// server. It's possible this could succeed on another transport, even if +// it's unlikely, but do not transparently retry. +// 2. If the credentials errored when requesting their headers. In this case, +// it's possible a retry can fix the problem, but indefinitely transparently +// retrying is not appropriate as it is likely the credentials, if they can +// eventually succeed, would need I/O to do so. type NewStreamError struct { Err error @@ -880,19 +927,15 @@ func (t *http2Client) closeStream(s *Stream, err error, rst bool, rstCode http2. // Close kicks off the shutdown process of the transport. This should be called // only once on a transport. Once it is called, the transport should not be // accessed any more. -// -// This method blocks until the addrConn that initiated this transport is -// re-connected. This happens because t.onClose() begins reconnect logic at the -// addrConn level and blocks until the addrConn is successfully connected. func (t *http2Client) Close(err error) { t.mu.Lock() - // Make sure we only Close once. + // Make sure we only close once. if t.state == closing { t.mu.Unlock() return } - // Call t.onClose before setting the state to closing to prevent the client - // from attempting to create new streams ASAP. + // Call t.onClose ASAP to prevent the client from attempting to create new + // streams. t.onClose() t.state = closing streams := t.activeStreams @@ -1482,33 +1525,35 @@ func (t *http2Client) operateHeaders(frame *http2.MetaHeadersFrame) { t.closeStream(s, io.EOF, rst, http2.ErrCodeNo, statusGen, mdata, true) } -// reader runs as a separate goroutine in charge of reading data from network -// connection. -// -// TODO(zhaoq): currently one reader per transport. Investigate whether this is -// optimal. -// TODO(zhaoq): Check the validity of the incoming frame sequence. -func (t *http2Client) reader() { - defer close(t.readerDone) - // Check the validity of server preface. +// readServerPreface reads and handles the initial settings frame from the +// server. +func (t *http2Client) readServerPreface() error { frame, err := t.framer.fr.ReadFrame() if err != nil { - err = connectionErrorf(true, err, "error reading server preface: %v", err) - t.Close(err) // this kicks off resetTransport, so must be last before return - return - } - t.conn.SetReadDeadline(time.Time{}) // reset deadline once we get the settings frame (we didn't time out, yay!) - if t.keepaliveEnabled { - atomic.StoreInt64(&t.lastRead, time.Now().UnixNano()) + return connectionErrorf(true, err, "error reading server preface: %v", err) } sf, ok := frame.(*http2.SettingsFrame) if !ok { - // this kicks off resetTransport, so must be last before return - t.Close(connectionErrorf(true, nil, "initial http2 frame from server is not a settings frame: %T", frame)) + return connectionErrorf(true, nil, "initial http2 frame from server is not a settings frame: %T", frame) + } + t.handleSettings(sf, true) + return nil +} + +// reader verifies the server preface and reads all subsequent data from +// network connection. If the server preface is not read successfully, an +// error is pushed to errCh; otherwise errCh is closed with no error. +func (t *http2Client) reader(errCh chan<- error) { + defer close(t.readerDone) + + if err := t.readServerPreface(); err != nil { + errCh <- err return } - t.onPrefaceReceipt() - t.handleSettings(sf, true) + close(errCh) + if t.keepaliveEnabled { + atomic.StoreInt64(&t.lastRead, time.Now().UnixNano()) + } // loop to keep reading incoming messages on this transport. for { diff --git a/vendor/google.golang.org/grpc/internal/transport/transport.go b/vendor/google.golang.org/grpc/internal/transport/transport.go index 6c3ba8515..2e615ee20 100644 --- a/vendor/google.golang.org/grpc/internal/transport/transport.go +++ b/vendor/google.golang.org/grpc/internal/transport/transport.go @@ -43,6 +43,10 @@ import ( "google.golang.org/grpc/tap" ) +// ErrNoHeaders is used as a signal that a trailers only response was received, +// and is not a real error. +var ErrNoHeaders = errors.New("stream has no headers") + const logLevel = 2 type bufferPool struct { @@ -366,9 +370,15 @@ func (s *Stream) Header() (metadata.MD, error) { return s.header.Copy(), nil } s.waitOnHeader() + if !s.headerValid { return nil, s.status.Err() } + + if s.noHeaders { + return nil, ErrNoHeaders + } + return s.header.Copy(), nil } @@ -573,8 +583,8 @@ type ConnectOptions struct { // NewClientTransport establishes the transport with the required ConnectOptions // and returns it to the caller. -func NewClientTransport(connectCtx, ctx context.Context, addr resolver.Address, opts ConnectOptions, onPrefaceReceipt func(), onGoAway func(GoAwayReason), onClose func()) (ClientTransport, error) { - return newHTTP2Client(connectCtx, ctx, addr, opts, onPrefaceReceipt, onGoAway, onClose) +func NewClientTransport(connectCtx, ctx context.Context, addr resolver.Address, opts ConnectOptions, onGoAway func(GoAwayReason), onClose func()) (ClientTransport, error) { + return newHTTP2Client(connectCtx, ctx, addr, opts, onGoAway, onClose) } // Options provides additional hints and information for message diff --git a/vendor/google.golang.org/grpc/metadata/metadata.go b/vendor/google.golang.org/grpc/metadata/metadata.go index 98d62e067..fb4a88f59 100644 --- a/vendor/google.golang.org/grpc/metadata/metadata.go +++ b/vendor/google.golang.org/grpc/metadata/metadata.go @@ -41,10 +41,11 @@ type MD map[string][]string // New creates an MD from a given key-value map. // // Only the following ASCII characters are allowed in keys: -// - digits: 0-9 -// - uppercase letters: A-Z (normalized to lower) -// - lowercase letters: a-z -// - special characters: -_. +// - digits: 0-9 +// - uppercase letters: A-Z (normalized to lower) +// - lowercase letters: a-z +// - special characters: -_. +// // Uppercase letters are automatically converted to lowercase. // // Keys beginning with "grpc-" are reserved for grpc-internal use only and may @@ -62,10 +63,11 @@ func New(m map[string]string) MD { // Pairs panics if len(kv) is odd. // // Only the following ASCII characters are allowed in keys: -// - digits: 0-9 -// - uppercase letters: A-Z (normalized to lower) -// - lowercase letters: a-z -// - special characters: -_. +// - digits: 0-9 +// - uppercase letters: A-Z (normalized to lower) +// - lowercase letters: a-z +// - special characters: -_. +// // Uppercase letters are automatically converted to lowercase. // // Keys beginning with "grpc-" are reserved for grpc-internal use only and may @@ -196,7 +198,7 @@ func FromIncomingContext(ctx context.Context) (MD, bool) { // ValueFromIncomingContext returns the metadata value corresponding to the metadata // key from the incoming metadata if it exists. Key must be lower-case. // -// Experimental +// # Experimental // // Notice: This API is EXPERIMENTAL and may be changed or removed in a // later release. diff --git a/vendor/google.golang.org/grpc/picker_wrapper.go b/vendor/google.golang.org/grpc/picker_wrapper.go index 843633c91..a5d5516ee 100644 --- a/vendor/google.golang.org/grpc/picker_wrapper.go +++ b/vendor/google.golang.org/grpc/picker_wrapper.go @@ -26,6 +26,7 @@ import ( "google.golang.org/grpc/balancer" "google.golang.org/grpc/codes" "google.golang.org/grpc/internal/channelz" + istatus "google.golang.org/grpc/internal/status" "google.golang.org/grpc/internal/transport" "google.golang.org/grpc/status" ) @@ -129,8 +130,12 @@ func (pw *pickerWrapper) pick(ctx context.Context, failfast bool, info balancer. if err == balancer.ErrNoSubConnAvailable { continue } - if _, ok := status.FromError(err); ok { + if st, ok := status.FromError(err); ok { // Status error: end the RPC unconditionally with this status. + // First restrict the code to the list allowed by gRFC A54. + if istatus.IsRestrictedControlPlaneCode(st) { + err = status.Errorf(codes.Internal, "received picker error with illegal status: %v", err) + } return nil, nil, dropError{error: err} } // For all other errors, wait for ready RPCs should block and other diff --git a/vendor/google.golang.org/grpc/preloader.go b/vendor/google.golang.org/grpc/preloader.go index 0a1e975ad..cd4554785 100644 --- a/vendor/google.golang.org/grpc/preloader.go +++ b/vendor/google.golang.org/grpc/preloader.go @@ -25,7 +25,7 @@ import ( // PreparedMsg is responsible for creating a Marshalled and Compressed object. // -// Experimental +// # Experimental // // Notice: This type is EXPERIMENTAL and may be changed or removed in a // later release. diff --git a/vendor/google.golang.org/grpc/resolver/resolver.go b/vendor/google.golang.org/grpc/resolver/resolver.go index ca2e35a35..967cbc737 100644 --- a/vendor/google.golang.org/grpc/resolver/resolver.go +++ b/vendor/google.golang.org/grpc/resolver/resolver.go @@ -96,7 +96,7 @@ const ( // Address represents a server the client connects to. // -// Experimental +// # Experimental // // Notice: This type is EXPERIMENTAL and may be changed or removed in a // later release. @@ -236,12 +236,12 @@ type ClientConn interface { // // Examples: // -// - "dns://some_authority/foo.bar" -// Target{Scheme: "dns", Authority: "some_authority", Endpoint: "foo.bar"} -// - "foo.bar" -// Target{Scheme: resolver.GetDefaultScheme(), Endpoint: "foo.bar"} -// - "unknown_scheme://authority/endpoint" -// Target{Scheme: resolver.GetDefaultScheme(), Endpoint: "unknown_scheme://authority/endpoint"} +// - "dns://some_authority/foo.bar" +// Target{Scheme: "dns", Authority: "some_authority", Endpoint: "foo.bar"} +// - "foo.bar" +// Target{Scheme: resolver.GetDefaultScheme(), Endpoint: "foo.bar"} +// - "unknown_scheme://authority/endpoint" +// Target{Scheme: resolver.GetDefaultScheme(), Endpoint: "unknown_scheme://authority/endpoint"} type Target struct { // Deprecated: use URL.Scheme instead. Scheme string diff --git a/vendor/google.golang.org/grpc/rpc_util.go b/vendor/google.golang.org/grpc/rpc_util.go index 5d407b004..934fc1aa0 100644 --- a/vendor/google.golang.org/grpc/rpc_util.go +++ b/vendor/google.golang.org/grpc/rpc_util.go @@ -198,7 +198,7 @@ func Header(md *metadata.MD) CallOption { // HeaderCallOption is a CallOption for collecting response header metadata. // The metadata field will be populated *after* the RPC completes. // -// Experimental +// # Experimental // // Notice: This type is EXPERIMENTAL and may be changed or removed in a // later release. @@ -220,7 +220,7 @@ func Trailer(md *metadata.MD) CallOption { // TrailerCallOption is a CallOption for collecting response trailer metadata. // The metadata field will be populated *after* the RPC completes. // -// Experimental +// # Experimental // // Notice: This type is EXPERIMENTAL and may be changed or removed in a // later release. @@ -242,7 +242,7 @@ func Peer(p *peer.Peer) CallOption { // PeerCallOption is a CallOption for collecting the identity of the remote // peer. The peer field will be populated *after* the RPC completes. // -// Experimental +// # Experimental // // Notice: This type is EXPERIMENTAL and may be changed or removed in a // later release. @@ -282,7 +282,7 @@ func FailFast(failFast bool) CallOption { // FailFastCallOption is a CallOption for indicating whether an RPC should fail // fast or not. // -// Experimental +// # Experimental // // Notice: This type is EXPERIMENTAL and may be changed or removed in a // later release. @@ -305,7 +305,7 @@ func MaxCallRecvMsgSize(bytes int) CallOption { // MaxRecvMsgSizeCallOption is a CallOption that indicates the maximum message // size in bytes the client can receive. // -// Experimental +// # Experimental // // Notice: This type is EXPERIMENTAL and may be changed or removed in a // later release. @@ -328,7 +328,7 @@ func MaxCallSendMsgSize(bytes int) CallOption { // MaxSendMsgSizeCallOption is a CallOption that indicates the maximum message // size in bytes the client can send. // -// Experimental +// # Experimental // // Notice: This type is EXPERIMENTAL and may be changed or removed in a // later release. @@ -351,7 +351,7 @@ func PerRPCCredentials(creds credentials.PerRPCCredentials) CallOption { // PerRPCCredsCallOption is a CallOption that indicates the per-RPC // credentials to use for the call. // -// Experimental +// # Experimental // // Notice: This type is EXPERIMENTAL and may be changed or removed in a // later release. @@ -369,7 +369,7 @@ func (o PerRPCCredsCallOption) after(c *callInfo, attempt *csAttempt) {} // sending the request. If WithCompressor is also set, UseCompressor has // higher priority. // -// Experimental +// # Experimental // // Notice: This API is EXPERIMENTAL and may be changed or removed in a // later release. @@ -379,7 +379,7 @@ func UseCompressor(name string) CallOption { // CompressorCallOption is a CallOption that indicates the compressor to use. // -// Experimental +// # Experimental // // Notice: This type is EXPERIMENTAL and may be changed or removed in a // later release. @@ -416,7 +416,7 @@ func CallContentSubtype(contentSubtype string) CallOption { // ContentSubtypeCallOption is a CallOption that indicates the content-subtype // used for marshaling messages. // -// Experimental +// # Experimental // // Notice: This type is EXPERIMENTAL and may be changed or removed in a // later release. @@ -444,7 +444,7 @@ func (o ContentSubtypeCallOption) after(c *callInfo, attempt *csAttempt) {} // This function is provided for advanced users; prefer to use only // CallContentSubtype to select a registered codec instead. // -// Experimental +// # Experimental // // Notice: This API is EXPERIMENTAL and may be changed or removed in a // later release. @@ -455,7 +455,7 @@ func ForceCodec(codec encoding.Codec) CallOption { // ForceCodecCallOption is a CallOption that indicates the codec used for // marshaling messages. // -// Experimental +// # Experimental // // Notice: This type is EXPERIMENTAL and may be changed or removed in a // later release. @@ -480,7 +480,7 @@ func CallCustomCodec(codec Codec) CallOption { // CustomCodecCallOption is a CallOption that indicates the codec used for // marshaling messages. // -// Experimental +// # Experimental // // Notice: This type is EXPERIMENTAL and may be changed or removed in a // later release. @@ -497,7 +497,7 @@ func (o CustomCodecCallOption) after(c *callInfo, attempt *csAttempt) {} // MaxRetryRPCBufferSize returns a CallOption that limits the amount of memory // used for buffering this RPC's requests for retry purposes. // -// Experimental +// # Experimental // // Notice: This API is EXPERIMENTAL and may be changed or removed in a // later release. @@ -508,7 +508,7 @@ func MaxRetryRPCBufferSize(bytes int) CallOption { // MaxRetryRPCBufferSizeCallOption is a CallOption indicating the amount of // memory to be used for caching this RPC for retry purposes. // -// Experimental +// # Experimental // // Notice: This type is EXPERIMENTAL and may be changed or removed in a // later release. @@ -548,10 +548,11 @@ type parser struct { // format. The caller owns the returned msg memory. // // If there is an error, possible values are: -// * io.EOF, when no messages remain -// * io.ErrUnexpectedEOF -// * of type transport.ConnectionError -// * an error from the status package +// - io.EOF, when no messages remain +// - io.ErrUnexpectedEOF +// - of type transport.ConnectionError +// - an error from the status package +// // No other error values or types must be returned, which also means // that the underlying io.Reader must not return an incompatible // error. diff --git a/vendor/google.golang.org/grpc/serviceconfig/serviceconfig.go b/vendor/google.golang.org/grpc/serviceconfig/serviceconfig.go index 73a2f9266..35e7a20a0 100644 --- a/vendor/google.golang.org/grpc/serviceconfig/serviceconfig.go +++ b/vendor/google.golang.org/grpc/serviceconfig/serviceconfig.go @@ -19,7 +19,7 @@ // Package serviceconfig defines types and methods for operating on gRPC // service configs. // -// Experimental +// # Experimental // // Notice: This package is EXPERIMENTAL and may be changed or removed in a // later release. diff --git a/vendor/google.golang.org/grpc/status/status.go b/vendor/google.golang.org/grpc/status/status.go index 6d163b6e3..623be39f2 100644 --- a/vendor/google.golang.org/grpc/status/status.go +++ b/vendor/google.golang.org/grpc/status/status.go @@ -76,14 +76,14 @@ func FromProto(s *spb.Status) *Status { // FromError returns a Status representation of err. // -// - If err was produced by this package or implements the method `GRPCStatus() -// *Status`, the appropriate Status is returned. +// - If err was produced by this package or implements the method `GRPCStatus() +// *Status`, the appropriate Status is returned. // -// - If err is nil, a Status is returned with codes.OK and no message. +// - If err is nil, a Status is returned with codes.OK and no message. // -// - Otherwise, err is an error not compatible with this package. In this -// case, a Status is returned with codes.Unknown and err's Error() message, -// and ok is false. +// - Otherwise, err is an error not compatible with this package. In this +// case, a Status is returned with codes.Unknown and err's Error() message, +// and ok is false. func FromError(err error) (s *Status, ok bool) { if err == nil { return nil, true diff --git a/vendor/google.golang.org/grpc/stream.go b/vendor/google.golang.org/grpc/stream.go index 0c16cfb2e..960c3e33d 100644 --- a/vendor/google.golang.org/grpc/stream.go +++ b/vendor/google.golang.org/grpc/stream.go @@ -39,6 +39,7 @@ import ( imetadata "google.golang.org/grpc/internal/metadata" iresolver "google.golang.org/grpc/internal/resolver" "google.golang.org/grpc/internal/serviceconfig" + istatus "google.golang.org/grpc/internal/status" "google.golang.org/grpc/internal/transport" "google.golang.org/grpc/metadata" "google.golang.org/grpc/peer" @@ -195,6 +196,13 @@ func newClientStream(ctx context.Context, desc *StreamDesc, cc *ClientConn, meth rpcInfo := iresolver.RPCInfo{Context: ctx, Method: method} rpcConfig, err := cc.safeConfigSelector.SelectConfig(rpcInfo) if err != nil { + if st, ok := status.FromError(err); ok { + // Restrict the code to the list allowed by gRFC A54. + if istatus.IsRestrictedControlPlaneCode(st) { + err = status.Errorf(codes.Internal, "config selector returned illegal status: %v", err) + } + return nil, err + } return nil, toRPCErr(err) } @@ -744,17 +752,25 @@ func (cs *clientStream) withRetry(op func(a *csAttempt) error, onSuccess func()) func (cs *clientStream) Header() (metadata.MD, error) { var m metadata.MD + noHeader := false err := cs.withRetry(func(a *csAttempt) error { var err error m, err = a.s.Header() + if err == transport.ErrNoHeaders { + noHeader = true + return nil + } return toRPCErr(err) }, cs.commitAttemptLocked) + if err != nil { cs.finish(err) return nil, err } - if len(cs.binlogs) != 0 && !cs.serverHeaderBinlogged { - // Only log if binary log is on and header has not been logged. + + if len(cs.binlogs) != 0 && !cs.serverHeaderBinlogged && !noHeader { + // Only log if binary log is on and header has not been logged, and + // there is actually headers to log. logEntry := &binarylog.ServerHeader{ OnClientSide: true, Header: m, diff --git a/vendor/google.golang.org/grpc/tap/tap.go b/vendor/google.golang.org/grpc/tap/tap.go index dbf34e6bb..bfa5dfa40 100644 --- a/vendor/google.golang.org/grpc/tap/tap.go +++ b/vendor/google.golang.org/grpc/tap/tap.go @@ -19,7 +19,7 @@ // Package tap defines the function handles which are executed on the transport // layer of gRPC-Go and related information. // -// Experimental +// # Experimental // // Notice: This API is EXPERIMENTAL and may be changed or removed in a // later release. diff --git a/vendor/google.golang.org/grpc/version.go b/vendor/google.golang.org/grpc/version.go index d472ca643..2198e7098 100644 --- a/vendor/google.golang.org/grpc/version.go +++ b/vendor/google.golang.org/grpc/version.go @@ -19,4 +19,4 @@ package grpc // Version is the current grpc version. -const Version = "1.50.1" +const Version = "1.51.0" diff --git a/vendor/google.golang.org/grpc/vet.sh b/vendor/google.golang.org/grpc/vet.sh index c3fc8253b..bd8e0cdb3 100644 --- a/vendor/google.golang.org/grpc/vet.sh +++ b/vendor/google.golang.org/grpc/vet.sh @@ -67,7 +67,9 @@ elif [[ "$#" -ne 0 ]]; then fi # - Ensure all source files contain a copyright message. -not git grep -L "\(Copyright [0-9]\{4,\} gRPC authors\)\|DO NOT EDIT" -- '*.go' +# (Done in two parts because Darwin "git grep" has broken support for compound +# exclusion matches.) +(grep -L "DO NOT EDIT" $(git grep -L "\(Copyright [0-9]\{4,\} gRPC authors\)" -- '*.go') || true) | fail_on_output # - Make sure all tests in grpc and grpc/test use leakcheck via Teardown. not grep 'func Test[^(]' *_test.go @@ -81,7 +83,7 @@ not git grep -l 'x/net/context' -- "*.go" git grep -l '"math/rand"' -- "*.go" 2>&1 | not grep -v '^examples\|^stress\|grpcrand\|^benchmark\|wrr_test' # - Do not call grpclog directly. Use grpclog.Component instead. -git grep -l 'grpclog.I\|grpclog.W\|grpclog.E\|grpclog.F\|grpclog.V' -- "*.go" | not grep -v '^grpclog/component.go\|^internal/grpctest/tlogger_test.go' +git grep -l -e 'grpclog.I' --or -e 'grpclog.W' --or -e 'grpclog.E' --or -e 'grpclog.F' --or -e 'grpclog.V' -- "*.go" | not grep -v '^grpclog/component.go\|^internal/grpctest/tlogger_test.go' # - Ensure all ptypes proto packages are renamed when importing. not git grep "\(import \|^\s*\)\"github.com/golang/protobuf/ptypes/" -- "*.go" diff --git a/vendor/modules.txt b/vendor/modules.txt index c172a7d07..8e52a5fa6 100644 --- a/vendor/modules.txt +++ b/vendor/modules.txt @@ -102,10 +102,10 @@ github.com/aws/aws-sdk-go-v2/internal/timeconv ## explicit; go 1.15 github.com/aws/aws-sdk-go-v2/aws/protocol/eventstream github.com/aws/aws-sdk-go-v2/aws/protocol/eventstream/eventstreamapi -# github.com/aws/aws-sdk-go-v2/config v1.18.1 +# github.com/aws/aws-sdk-go-v2/config v1.18.2 ## explicit; go 1.15 github.com/aws/aws-sdk-go-v2/config -# github.com/aws/aws-sdk-go-v2/credentials v1.13.1 +# github.com/aws/aws-sdk-go-v2/credentials v1.13.2 ## explicit; go 1.15 github.com/aws/aws-sdk-go-v2/credentials github.com/aws/aws-sdk-go-v2/credentials/ec2rolecreds @@ -118,7 +118,7 @@ github.com/aws/aws-sdk-go-v2/credentials/stscreds ## explicit; go 1.15 github.com/aws/aws-sdk-go-v2/feature/ec2/imds github.com/aws/aws-sdk-go-v2/feature/ec2/imds/internal/config -# github.com/aws/aws-sdk-go-v2/feature/s3/manager v1.11.40 +# github.com/aws/aws-sdk-go-v2/feature/s3/manager v1.11.41 ## explicit; go 1.15 github.com/aws/aws-sdk-go-v2/feature/s3/manager # github.com/aws/aws-sdk-go-v2/internal/configsources v1.1.25 @@ -166,7 +166,7 @@ github.com/aws/aws-sdk-go-v2/service/sso/types github.com/aws/aws-sdk-go-v2/service/ssooidc github.com/aws/aws-sdk-go-v2/service/ssooidc/internal/endpoints github.com/aws/aws-sdk-go-v2/service/ssooidc/types -# github.com/aws/aws-sdk-go-v2/service/sts v1.17.3 +# github.com/aws/aws-sdk-go-v2/service/sts v1.17.4 ## explicit; go 1.15 github.com/aws/aws-sdk-go-v2/service/sts github.com/aws/aws-sdk-go-v2/service/sts/internal/endpoints @@ -458,7 +458,7 @@ google.golang.org/appengine/internal/socket google.golang.org/appengine/internal/urlfetch google.golang.org/appengine/socket google.golang.org/appengine/urlfetch -# google.golang.org/genproto v0.0.0-20221116193143-41c2ba794472 +# google.golang.org/genproto v0.0.0-20221118155620-16455021b5e6 ## explicit; go 1.19 google.golang.org/genproto/googleapis/api google.golang.org/genproto/googleapis/api/annotations @@ -469,7 +469,7 @@ google.golang.org/genproto/googleapis/rpc/status google.golang.org/genproto/googleapis/type/date google.golang.org/genproto/googleapis/type/expr google.golang.org/genproto/protobuf/field_mask -# google.golang.org/grpc v1.50.1 +# google.golang.org/grpc v1.51.0 ## explicit; go 1.17 google.golang.org/grpc google.golang.org/grpc/attributes From 7dc2349913ca4b90fede4838663f76456c3011cb Mon Sep 17 00:00:00 2001 From: Yury Molodov Date: Tue, 22 Nov 2022 14:31:17 +0100 Subject: [PATCH 29/46] vmui: add set up series custom limits (#3368) * feat: add set up series custom limits * feat: add button for show series without limits * fix: resolve merge conflicts --- .../components/Chart/ChartTooltip/style.scss | 15 ++-- .../GlobalSettings/GlobalSettings.tsx | 41 ++++++--- .../LimitsConfigurator/LimitsConfigurator.tsx | 88 +++++++++++++++++++ .../LimitsConfigurator/style.scss | 28 ++++++ .../ServerConfigurator/ServerConfigurator.tsx | 21 ++--- .../Configurators/GlobalSettings/style.scss | 2 +- .../Configurators/QueryEditor/QueryEditor.tsx | 4 +- .../vmui/src/components/Main/Alert/Alert.tsx | 2 +- .../vmui/src/components/Main/Alert/style.scss | 2 +- .../src/components/Main/Button/Button.tsx | 2 +- .../src/components/Main/Button/style.scss | 18 ++++ app/vmui/packages/vmui/src/constants/graph.ts | 4 +- .../packages/vmui/src/hooks/useFetchQuery.ts | 50 +++++++++-- .../vmui/src/pages/CustomPanel/index.tsx | 26 +++++- .../vmui/src/pages/CustomPanel/style.scss | 7 ++ .../vmui/src/state/customPanel/reducer.ts | 13 +++ app/vmui/packages/vmui/src/types/index.ts | 7 ++ app/vmui/packages/vmui/src/utils/storage.ts | 1 + docs/CHANGELOG.md | 1 + 19 files changed, 279 insertions(+), 53 deletions(-) create mode 100644 app/vmui/packages/vmui/src/components/Configurators/GlobalSettings/LimitsConfigurator/LimitsConfigurator.tsx create mode 100644 app/vmui/packages/vmui/src/components/Configurators/GlobalSettings/LimitsConfigurator/style.scss diff --git a/app/vmui/packages/vmui/src/components/Chart/ChartTooltip/style.scss b/app/vmui/packages/vmui/src/components/Chart/ChartTooltip/style.scss index 9c8cedc94..5d1a9fe5e 100644 --- a/app/vmui/packages/vmui/src/components/Chart/ChartTooltip/style.scss +++ b/app/vmui/packages/vmui/src/components/Chart/ChartTooltip/style.scss @@ -1,9 +1,10 @@ @use "src/styles/variables" as *; $chart-tooltip-width: 300px; $chart-tooltip-icon-width: 25px; +$chart-tooltip-half-icon: calc($chart-tooltip-icon-width/2); $chart-tooltip-date-width: $chart-tooltip-width - (2*$chart-tooltip-icon-width) - (2*$padding-global) - $padding-small; -$chart-tooltip-x: -1 * ($padding-small + $padding-global + $chart-tooltip-date-width + ($chart-tooltip-icon-width/2)); -$chart-tooltip-y: -1 * ($padding-small + ($chart-tooltip-icon-width/2)); +$chart-tooltip-x: -1 * ($padding-small + $padding-global + $chart-tooltip-date-width + $chart-tooltip-half-icon); +$chart-tooltip-y: -1 * ($padding-small + $chart-tooltip-half-icon); .vm-chart-tooltip { position: absolute; @@ -54,9 +55,12 @@ $chart-tooltip-y: -1 * ($padding-small + ($chart-tooltip-icon-width/2)); } &-data { - display: flex; - flex-wrap: wrap; - align-items: center; + display: grid; + grid-template-columns: auto 1fr; + gap: $padding-small; + align-items: flex-start; + word-break: break-all; + line-height: 12px; &__value { padding: 4px; @@ -66,7 +70,6 @@ $chart-tooltip-y: -1 * ($padding-small + ($chart-tooltip-icon-width/2)); &__marker { width: 12px; height: 12px; - margin-right: $padding-small; } } diff --git a/app/vmui/packages/vmui/src/components/Configurators/GlobalSettings/GlobalSettings.tsx b/app/vmui/packages/vmui/src/components/Configurators/GlobalSettings/GlobalSettings.tsx index 2676a159e..32164d807 100644 --- a/app/vmui/packages/vmui/src/components/Configurators/GlobalSettings/GlobalSettings.tsx +++ b/app/vmui/packages/vmui/src/components/Configurators/GlobalSettings/GlobalSettings.tsx @@ -6,28 +6,33 @@ import Button from "../../Main/Button/Button"; import Modal from "../../Main/Modal/Modal"; import "./style.scss"; import Tooltip from "../../Main/Tooltip/Tooltip"; +import LimitsConfigurator from "./LimitsConfigurator/LimitsConfigurator"; +import { SeriesLimits } from "../../../types"; +import { useCustomPanelDispatch, useCustomPanelState } from "../../../state/customPanel/CustomPanelStateContext"; -const title = "Setting Server URL"; +const title = "Settings"; const GlobalSettings: FC = () => { - const { serverUrl } = useAppState(); + const { serverUrl: stateServerUrl } = useAppState(); + const { seriesLimits } = useCustomPanelState(); + const dispatch = useAppDispatch(); - const [changedServerUrl, setChangedServerUrl] = useState(serverUrl); + const customPanelDispatch = useCustomPanelDispatch(); - const setServer = (url?: string) => { - dispatch({ type: "SET_SERVER", payload: url || changedServerUrl }); - handleClose(); - }; - - const createSetServer = () => () => { - setServer(); - }; + const [serverUrl, setServerUrl] = useState(stateServerUrl); + const [limits, setLimits] = useState(seriesLimits); const [open, setOpen] = useState(false); const handleOpen = () => setOpen(true); const handleClose = () => setOpen(false); + const handlerApply = () => { + dispatch({ type: "SET_SERVER", payload: serverUrl }); + customPanelDispatch({ type: "SET_SERIES_LIMITS", payload: limits }); + handleClose(); + }; + return <> diff --git a/app/vmui/packages/vmui/src/components/Configurators/GlobalSettings/LimitsConfigurator/LimitsConfigurator.tsx b/app/vmui/packages/vmui/src/components/Configurators/GlobalSettings/LimitsConfigurator/LimitsConfigurator.tsx new file mode 100644 index 000000000..3267b3857 --- /dev/null +++ b/app/vmui/packages/vmui/src/components/Configurators/GlobalSettings/LimitsConfigurator/LimitsConfigurator.tsx @@ -0,0 +1,88 @@ +import React, { FC, useState } from "preact/compat"; +import { DisplayType, ErrorTypes, SeriesLimits } from "../../../../types"; +import TextField from "../../../Main/TextField/TextField"; +import Tooltip from "../../../Main/Tooltip/Tooltip"; +import { InfoIcon, RestartIcon } from "../../../Main/Icons"; +import Button from "../../../Main/Button/Button"; +import { DEFAULT_MAX_SERIES } from "../../../../constants/graph"; +import "./style.scss"; + +export interface ServerConfiguratorProps { + limits: SeriesLimits + onChange: (limits: SeriesLimits) => void + onEnter: () => void +} + +const fields: {label: string, type: DisplayType}[] = [ + { label: "Graph", type: "chart" }, + { label: "JSON", type: "code" }, + { label: "Table", type: "table" } +]; + +const LimitsConfigurator: FC = ({ limits, onChange , onEnter }) => { + + const [error, setError] = useState({ + table: "", + chart: "", + code: "" + }); + + const handleChange = (val: string, type: DisplayType) => { + const value = val || ""; + setError(prev => ({ ...prev, [type]: +value < 0 ? ErrorTypes.positiveNumber : "" })); + onChange({ + ...limits, + [type]: !value ? Infinity : value + }); + }; + + const handleReset = () => { + onChange(DEFAULT_MAX_SERIES); + }; + + const createChangeHandler = (type: DisplayType) => (val: string) => { + handleChange(val, type); + }; + + return ( +
    +
    + Series limits by tabs + + +
    +
    +
    + {fields.map(f => ( + + ))} +
    +
    + ); +}; + +export default LimitsConfigurator; diff --git a/app/vmui/packages/vmui/src/components/Configurators/GlobalSettings/LimitsConfigurator/style.scss b/app/vmui/packages/vmui/src/components/Configurators/GlobalSettings/LimitsConfigurator/style.scss new file mode 100644 index 000000000..4443b82d9 --- /dev/null +++ b/app/vmui/packages/vmui/src/components/Configurators/GlobalSettings/LimitsConfigurator/style.scss @@ -0,0 +1,28 @@ +@use "src/styles/variables" as *; + +.vm-limits-configurator { + + &-title { + display: flex; + align-items: center; + justify-content: flex-start; + font-size: $font-size; + font-weight: bold; + margin-bottom: $padding-global; + + &__reset { + display: flex; + align-items: center; + justify-content: flex-end; + flex-grow: 1; + } + } + + &__inputs { + display: grid; + grid-template-columns: repeat(3, 1fr); + align-items: center; + justify-content: space-between; + gap: $padding-global; + } +} diff --git a/app/vmui/packages/vmui/src/components/Configurators/GlobalSettings/ServerConfigurator/ServerConfigurator.tsx b/app/vmui/packages/vmui/src/components/Configurators/GlobalSettings/ServerConfigurator/ServerConfigurator.tsx index 620a9c8f5..3e62f3788 100644 --- a/app/vmui/packages/vmui/src/components/Configurators/GlobalSettings/ServerConfigurator/ServerConfigurator.tsx +++ b/app/vmui/packages/vmui/src/components/Configurators/GlobalSettings/ServerConfigurator/ServerConfigurator.tsx @@ -1,41 +1,34 @@ import React, { FC, useState } from "preact/compat"; -import { useAppState } from "../../../../state/common/StateContext"; import { ErrorTypes } from "../../../../types"; import TextField from "../../../Main/TextField/TextField"; import { isValidHttpUrl } from "../../../../utils/url"; export interface ServerConfiguratorProps { - setServer: (url: string) => void - onEnter: (url: string) => void + serverUrl: string + onChange: (url: string) => void + onEnter: () => void } -const ServerConfigurator: FC = ({ setServer , onEnter }) => { +const ServerConfigurator: FC = ({ serverUrl, onChange , onEnter }) => { - const { serverUrl } = useAppState(); const [error, setError] = useState(""); - const [changedServerUrl, setChangedServerUrl] = useState(serverUrl); const onChangeServer = (val: string) => { const value = val || ""; - setChangedServerUrl(value); - setServer(value); + onChange(value); setError(""); if (!value) setError(ErrorTypes.emptyServer); if (!isValidHttpUrl(value)) setError(ErrorTypes.validServer); }; - const handleEnter = () => { - onEnter(changedServerUrl); - }; - return ( ); }; diff --git a/app/vmui/packages/vmui/src/components/Configurators/GlobalSettings/style.scss b/app/vmui/packages/vmui/src/components/Configurators/GlobalSettings/style.scss index 1b1ff9089..5f40cf32d 100644 --- a/app/vmui/packages/vmui/src/components/Configurators/GlobalSettings/style.scss +++ b/app/vmui/packages/vmui/src/components/Configurators/GlobalSettings/style.scss @@ -3,7 +3,7 @@ .vm-server-configurator { display: grid; align-items: center; - gap: $padding-global; + gap: $padding-medium; width: 600px; &__input { diff --git a/app/vmui/packages/vmui/src/components/Configurators/QueryEditor/QueryEditor.tsx b/app/vmui/packages/vmui/src/components/Configurators/QueryEditor/QueryEditor.tsx index 6dec9e180..5f5f63587 100644 --- a/app/vmui/packages/vmui/src/components/Configurators/QueryEditor/QueryEditor.tsx +++ b/app/vmui/packages/vmui/src/components/Configurators/QueryEditor/QueryEditor.tsx @@ -113,11 +113,11 @@ const QueryEditor: FC = ({ }; useEffect(() => { - if (!autocomplete || !foundOptions.length) return; + if (!autocomplete) return; setFocusOption(-1); const words = (value.match(/[a-zA-Z_:.][a-zA-Z0-9_:.]*/gm) || []).length; setOpenAutocomplete(autocomplete && value.length > 2 && words <= 1); - }, [autocomplete, value, foundOptions]); + }, [autocomplete, value]); useEffect(() => { if (!wrapperEl.current) return; diff --git a/app/vmui/packages/vmui/src/components/Main/Alert/Alert.tsx b/app/vmui/packages/vmui/src/components/Main/Alert/Alert.tsx index 6d1312839..f8e418186 100644 --- a/app/vmui/packages/vmui/src/components/Main/Alert/Alert.tsx +++ b/app/vmui/packages/vmui/src/components/Main/Alert/Alert.tsx @@ -1,8 +1,8 @@ import React, { FC } from "preact/compat"; import { ReactNode } from "react"; import classNames from "classnames"; -import "./style.scss"; import { ErrorIcon, InfoIcon, SuccessIcon, WarningIcon } from "../Icons"; +import "./style.scss"; interface AlertProps { variant?: "success" | "error" | "info" | "warning" diff --git a/app/vmui/packages/vmui/src/components/Main/Alert/style.scss b/app/vmui/packages/vmui/src/components/Main/Alert/style.scss index ef0b3a235..929129fa8 100644 --- a/app/vmui/packages/vmui/src/components/Main/Alert/style.scss +++ b/app/vmui/packages/vmui/src/components/Main/Alert/style.scss @@ -4,7 +4,7 @@ position: relative; display: grid; grid-template-columns: 20px 1fr; - align-items: flex-start; + align-items: center; gap: $padding-small; padding: $padding-global; background-color: $color-background-block; diff --git a/app/vmui/packages/vmui/src/components/Main/Button/Button.tsx b/app/vmui/packages/vmui/src/components/Main/Button/Button.tsx index ad54f6168..5d939e609 100644 --- a/app/vmui/packages/vmui/src/components/Main/Button/Button.tsx +++ b/app/vmui/packages/vmui/src/components/Main/Button/Button.tsx @@ -5,7 +5,7 @@ import "./style.scss"; interface ButtonProps { variant?: "contained" | "outlined" | "text" - color?: "primary" | "secondary" | "success" | "error" | "gray" + color?: "primary" | "secondary" | "success" | "error" | "gray" | "warning" size?: "small" | "medium" | "large" endIcon?: ReactNode startIcon?: ReactNode diff --git a/app/vmui/packages/vmui/src/components/Main/Button/style.scss b/app/vmui/packages/vmui/src/components/Main/Button/style.scss index f264fc2bb..5b07823b6 100644 --- a/app/vmui/packages/vmui/src/components/Main/Button/style.scss +++ b/app/vmui/packages/vmui/src/components/Main/Button/style.scss @@ -143,6 +143,15 @@ $button-radius: 6px; } } + &_contained_warning { + color: $color-warning; + + &:before { + background-color: $color-warning; + opacity: 0.2; + } + } + /* variant TEXT */ &_text_primary { @@ -165,6 +174,10 @@ $button-radius: 6px; color: $color-text-secondary; } + &_text_warning { + color: $color-warning; + } + /* variant OUTLINED */ &_outlined_primary { @@ -191,4 +204,9 @@ $button-radius: 6px; border: 1px solid $color-text-secondary; color: $color-text-secondary; } + + &_outlined_warning { + border: 1px solid $color-warning; + color: $color-warning; + } } diff --git a/app/vmui/packages/vmui/src/constants/graph.ts b/app/vmui/packages/vmui/src/constants/graph.ts index 88a80f0db..a0ca2b67c 100644 --- a/app/vmui/packages/vmui/src/constants/graph.ts +++ b/app/vmui/packages/vmui/src/constants/graph.ts @@ -1,6 +1,6 @@ export const MAX_QUERY_FIELDS = 4; -export const MAX_SERIES = { +export const DEFAULT_MAX_SERIES = { table: 100, chart: 20, - code: Infinity, + code: 1000, }; diff --git a/app/vmui/packages/vmui/src/hooks/useFetchQuery.ts b/app/vmui/packages/vmui/src/hooks/useFetchQuery.ts index 781530d5f..f82855bba 100644 --- a/app/vmui/packages/vmui/src/hooks/useFetchQuery.ts +++ b/app/vmui/packages/vmui/src/hooks/useFetchQuery.ts @@ -3,11 +3,10 @@ import { getQueryRangeUrl, getQueryUrl } from "../api/query-range"; import { useAppState } from "../state/common/StateContext"; import { InstantMetricResult, MetricBase, MetricResult } from "../api/types"; import { isValidHttpUrl } from "../utils/url"; -import { ErrorTypes } from "../types"; +import { ErrorTypes, SeriesLimits } from "../types"; import debounce from "lodash.debounce"; import { DisplayType } from "../pages/CustomPanel/DisplayTypeSwitch"; import Trace from "../components/TraceQuery/Trace"; -import { MAX_SERIES } from "../constants/graph"; import { useQueryState } from "../state/query/QueryStateContext"; import { useTimeState } from "../state/time/TimeStateContext"; import { useCustomPanelState } from "../state/customPanel/CustomPanelStateContext"; @@ -18,9 +17,10 @@ interface FetchQueryParams { display?: DisplayType, customStep: number, hideQuery?: number[] + showAllSeries?: boolean } -export const useFetchQuery = ({ predefinedQuery, visible, display, customStep, hideQuery }: FetchQueryParams): { +interface FetchQueryReturn { fetchUrl?: string[], isLoading: boolean, graphData?: MetricResult[], @@ -28,10 +28,28 @@ export const useFetchQuery = ({ predefinedQuery, visible, display, customStep, h error?: ErrorTypes | string, warning?: string, traces?: Trace[], -} => { +} + +interface FetchDataParams { + fetchUrl: string[], + fetchQueue: AbortController[], + displayType: DisplayType, + query: string[], + stateSeriesLimits: SeriesLimits, + showAllSeries?: boolean, +} + +export const useFetchQuery = ({ + predefinedQuery, + visible, + display, + customStep, + hideQuery, + showAllSeries +}: FetchQueryParams): FetchQueryReturn => { const { query } = useQueryState(); const { period } = useTimeState(); - const { displayType, nocache, isTracingEnabled } = useCustomPanelState(); + const { displayType, nocache, isTracingEnabled, seriesLimits: stateSeriesLimits } = useCustomPanelState(); const { serverUrl } = useAppState(); const [isLoading, setIsLoading] = useState(false); @@ -50,12 +68,19 @@ export const useFetchQuery = ({ predefinedQuery, visible, display, customStep, h } }, [error]); - const fetchData = async (fetchUrl: string[], fetchQueue: AbortController[], displayType: DisplayType, query: string[]) => { + const fetchData = async ({ + fetchUrl, + fetchQueue, + displayType, + query, + stateSeriesLimits, + showAllSeries, + }: FetchDataParams) => { const controller = new AbortController(); setFetchQueue([...fetchQueue, controller]); try { const isDisplayChart = displayType === "chart"; - const seriesLimit = MAX_SERIES[displayType]; + const seriesLimit = showAllSeries ? Infinity : stateSeriesLimits[displayType]; const tempData: MetricBase[] = []; const tempTraces: Trace[] = []; let counter = 1; @@ -131,8 +156,15 @@ export const useFetchQuery = ({ predefinedQuery, visible, display, customStep, h if (!visible || !fetchUrl?.length) return; setIsLoading(true); const expr = predefinedQuery ?? query; - throttledFetchData(fetchUrl, fetchQueue, (display || displayType), expr); - }, [fetchUrl, visible]); + throttledFetchData({ + fetchUrl, + fetchQueue, + displayType: display || displayType, + query: expr, + stateSeriesLimits, + showAllSeries, + }); + }, [fetchUrl, visible, stateSeriesLimits, showAllSeries]); useEffect(() => { const fetchPast = fetchQueue.slice(0, -1); diff --git a/app/vmui/packages/vmui/src/pages/CustomPanel/index.tsx b/app/vmui/packages/vmui/src/pages/CustomPanel/index.tsx index 0f2701b1d..76abebd2f 100644 --- a/app/vmui/packages/vmui/src/pages/CustomPanel/index.tsx +++ b/app/vmui/packages/vmui/src/pages/CustomPanel/index.tsx @@ -19,6 +19,7 @@ import { useSetQueryParams } from "./hooks/useSetQueryParams"; import "./style.scss"; import Alert from "../../components/Main/Alert/Alert"; import TableView from "../../components/Views/TableView/TableView"; +import Button from "../../components/Main/Button/Button"; const CustomPanel: FC = () => { const { displayType, isTracingEnabled } = useCustomPanelState(); @@ -30,6 +31,7 @@ const CustomPanel: FC = () => { const [displayColumns, setDisplayColumns] = useState(); const [tracesState, setTracesState] = useState([]); const [hideQuery, setHideQuery] = useState([]); + const [showAllSeries, setShowAllSeries] = useState(false); const { customStep, yaxis } = useGraphState(); const graphDispatch = useGraphDispatch(); @@ -38,7 +40,8 @@ const CustomPanel: FC = () => { const { isLoading, liveData, graphData, error, warning, traces } = useFetchQuery({ visible: true, customStep, - hideQuery + hideQuery, + showAllSeries }); const setYaxisLimits = (limits: AxisRange) => { @@ -53,6 +56,10 @@ const CustomPanel: FC = () => { timeDispatch({ type: "SET_PERIOD", payload: { from, to } }); }; + const handleShowAll = () => { + setShowAllSeries(true); + }; + const handleTraceDelete = (trace: Trace) => { const updatedTraces = tracesState.filter((data) => data.idValue !== trace.idValue); setTracesState([...updatedTraces]); @@ -72,6 +79,10 @@ const CustomPanel: FC = () => { setTracesState([]); }, [displayType]); + useEffect(() => { + setShowAllSeries(false); + }, [query]); + return (
    { )} {isLoading && } {error && {error}} - {warning && {warning}} + {warning && +
    +

    {warning}

    + +
    +
    }
    diff --git a/app/vmui/packages/vmui/src/pages/CustomPanel/style.scss b/app/vmui/packages/vmui/src/pages/CustomPanel/style.scss index 0ff52b463..a46bbde39 100644 --- a/app/vmui/packages/vmui/src/pages/CustomPanel/style.scss +++ b/app/vmui/packages/vmui/src/pages/CustomPanel/style.scss @@ -6,6 +6,13 @@ gap: $padding-medium; height: 100%; + &__warning { + display: grid; + grid-template-columns: 1fr auto; + align-items: center; + justify-content: space-between; + } + &__trace { } diff --git a/app/vmui/packages/vmui/src/state/customPanel/reducer.ts b/app/vmui/packages/vmui/src/state/customPanel/reducer.ts index 55b12528c..79fe17863 100644 --- a/app/vmui/packages/vmui/src/state/customPanel/reducer.ts +++ b/app/vmui/packages/vmui/src/state/customPanel/reducer.ts @@ -1,24 +1,31 @@ import { DisplayType, displayTypeTabs } from "../../pages/CustomPanel/DisplayTypeSwitch"; +import { getFromStorage, saveToStorage } from "../../utils/storage"; import { getQueryStringValue } from "../../utils/query-string"; +import { SeriesLimits } from "../../types"; +import { DEFAULT_MAX_SERIES } from "../../constants/graph"; export interface CustomPanelState { displayType: DisplayType; nocache: boolean; isTracingEnabled: boolean; + seriesLimits: SeriesLimits } export type CustomPanelAction = | { type: "SET_DISPLAY_TYPE", payload: DisplayType } + | { type: "SET_SERIES_LIMITS", payload: SeriesLimits } | { type: "TOGGLE_NO_CACHE"} | { type: "TOGGLE_QUERY_TRACING" } const queryTab = getQueryStringValue("g0.tab", 0) as string; const displayType = displayTypeTabs.find(t => t.prometheusCode === +queryTab || t.value === queryTab); +const limitsStorage = getFromStorage("SERIES_LIMITS") as string; export const initialCustomPanelState: CustomPanelState = { displayType: (displayType?.value || "chart") as DisplayType, nocache: false, isTracingEnabled: false, + seriesLimits: limitsStorage ? JSON.parse(getFromStorage("SERIES_LIMITS") as string) : DEFAULT_MAX_SERIES }; export function reducer(state: CustomPanelState, action: CustomPanelAction): CustomPanelState { @@ -28,6 +35,12 @@ export function reducer(state: CustomPanelState, action: CustomPanelAction): Cus ...state, displayType: action.payload }; + case "SET_SERIES_LIMITS": + saveToStorage("SERIES_LIMITS", JSON.stringify(action.payload)); + return { + ...state, + seriesLimits: action.payload + }; case "TOGGLE_QUERY_TRACING": return { ...state, diff --git a/app/vmui/packages/vmui/src/types/index.ts b/app/vmui/packages/vmui/src/types/index.ts index 0bbbdb4d2..be5d2a56c 100644 --- a/app/vmui/packages/vmui/src/types/index.ts +++ b/app/vmui/packages/vmui/src/types/index.ts @@ -44,6 +44,7 @@ export enum ErrorTypes { validQuery = "Please enter a valid Query and execute it", traceNotFound = "Not found the tracing information", emptyTitle = "Please enter title", + positiveNumber = "Please enter positive number" } export interface PanelSettings { @@ -98,3 +99,9 @@ export interface TopQueriesData extends TopQueryStats{ topByCount: TopQuery[] topBySumDuration: TopQuery[] } + +export interface SeriesLimits { + table: number, + chart: number, + code: number, +} diff --git a/app/vmui/packages/vmui/src/utils/storage.ts b/app/vmui/packages/vmui/src/utils/storage.ts index 9185e8a4a..82455ea21 100644 --- a/app/vmui/packages/vmui/src/utils/storage.ts +++ b/app/vmui/packages/vmui/src/utils/storage.ts @@ -4,6 +4,7 @@ export type StorageKeys = "BASIC_AUTH_DATA" | "AUTOCOMPLETE" | "NO_CACHE" | "QUERY_TRACING" + | "SERIES_LIMITS" export const saveToStorage = (key: StorageKeys, value: string | boolean | Record): void => { if (value) { diff --git a/docs/CHANGELOG.md b/docs/CHANGELOG.md index c16d9eec3..361bfaad1 100644 --- a/docs/CHANGELOG.md +++ b/docs/CHANGELOG.md @@ -26,6 +26,7 @@ The following tip changes can be tested by building VictoriaMetrics components f * FEATURE: [vmui](https://docs.victoriametrics.com/#vmui): add the ability to hide results of a particular query by clicking the `eye` icon. See [this pull request](https://github.com/VictoriaMetrics/VictoriaMetrics/pull/3359). * FEATURE: [vmui](https://docs.victoriametrics.com/#vmui): add copy button to row on Table view. The button copies row in MetricQL format. See [this issue](https://github.com/VictoriaMetrics/VictoriaMetrics/issues/2815). * 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.html): 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: [vmagent](https://docs.victoriametrics.com/vmagent.html): 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). From ccf9bb32acf10f854810e2a6c912d61c55f6d31c Mon Sep 17 00:00:00 2001 From: Aliaksandr Valialkin Date: Tue, 22 Nov 2022 15:36:03 +0200 Subject: [PATCH 30/46] app/vmselect/vmui: `make vmui-update` after 7dc2349913ca4b90fede4838663f76456c3011cb --- app/vmselect/vmui/asset-manifest.json | 8 ++++---- app/vmselect/vmui/index.html | 2 +- app/vmselect/vmui/static/css/main.423b74d3.css | 1 + app/vmselect/vmui/static/css/main.c52a0b3d.css | 1 - app/vmselect/vmui/static/js/main.a09b3097.js | 2 ++ ...6c7c69.js.LICENSE.txt => main.a09b3097.js.LICENSE.txt} | 0 app/vmselect/vmui/static/js/main.c86c7c69.js | 2 -- 7 files changed, 8 insertions(+), 8 deletions(-) create mode 100644 app/vmselect/vmui/static/css/main.423b74d3.css delete mode 100644 app/vmselect/vmui/static/css/main.c52a0b3d.css create mode 100644 app/vmselect/vmui/static/js/main.a09b3097.js rename app/vmselect/vmui/static/js/{main.c86c7c69.js.LICENSE.txt => main.a09b3097.js.LICENSE.txt} (100%) delete mode 100644 app/vmselect/vmui/static/js/main.c86c7c69.js diff --git a/app/vmselect/vmui/asset-manifest.json b/app/vmselect/vmui/asset-manifest.json index be6938533..d1f71e19e 100644 --- a/app/vmselect/vmui/asset-manifest.json +++ b/app/vmselect/vmui/asset-manifest.json @@ -1,12 +1,12 @@ { "files": { - "main.css": "./static/css/main.c52a0b3d.css", - "main.js": "./static/js/main.c86c7c69.js", + "main.css": "./static/css/main.423b74d3.css", + "main.js": "./static/js/main.a09b3097.js", "static/js/27.c1ccfd29.chunk.js": "./static/js/27.c1ccfd29.chunk.js", "index.html": "./index.html" }, "entrypoints": [ - "static/css/main.c52a0b3d.css", - "static/js/main.c86c7c69.js" + "static/css/main.423b74d3.css", + "static/js/main.a09b3097.js" ] } \ No newline at end of file diff --git a/app/vmselect/vmui/index.html b/app/vmselect/vmui/index.html index 8a0c16df8..6f4a07027 100644 --- a/app/vmselect/vmui/index.html +++ b/app/vmselect/vmui/index.html @@ -1 +1 @@ -VM UI
    \ No newline at end of file +VM UI
    \ No newline at end of file diff --git a/app/vmselect/vmui/static/css/main.423b74d3.css b/app/vmselect/vmui/static/css/main.423b74d3.css new file mode 100644 index 000000000..737c9b91b --- /dev/null +++ b/app/vmselect/vmui/static/css/main.423b74d3.css @@ -0,0 +1 @@ +.vm-tabs{gap:16px;height:100%;position:relative;-webkit-user-select:none;user-select:none}.vm-tabs,.vm-tabs-item{align-items:center;display:flex;justify-content:center}.vm-tabs-item{color:inherit;cursor:pointer;font-size:inherit;font-weight:inherit;opacity:.6;padding:16px 8px;text-decoration:none;text-transform:uppercase;transition:opacity .2s}.vm-tabs-item_active{opacity:1}.vm-tabs-item__icon{display:grid;margin-right:8px;width:15px}.vm-tabs-item__icon_single{margin-right:0}.vm-tabs__indicator{border-bottom:2px solid;position:absolute;transition:width .2s ease,left .3s cubic-bezier(.28,.84,.42,1)}.vm-alert{grid-gap:8px;align-items:center;background-color:var(--color-background-block);border-radius:8px;box-shadow:1px 2px 12px hsla(0,6%,6%,.08);color:#110f0f;display:grid;font-size:14px;font-weight:500;gap:8px;grid-template-columns:20px 1fr;line-height:20px;padding:16px;position:relative}.vm-alert:after{border-radius:8px;content:"";height:100%;left:0;opacity:.1;position:absolute;top:0;width:100%;z-index:1}.vm-alert__content,.vm-alert__icon{position:relative;z-index:2}.vm-alert__icon{align-items:center;display:flex;justify-content:center}.vm-alert__content{-webkit-filter:brightness(.6);filter:brightness(.6);white-space:pre-line}.vm-alert_success{color:var(--color-success)}.vm-alert_success:after{background-color:var(--color-success)}.vm-alert_error{color:var(--color-error)}.vm-alert_error:after{background-color:var(--color-error)}.vm-alert_info{color:var(--color-info)}.vm-alert_info:after{background-color:var(--color-info)}.vm-alert_warning{color:var(--color-warning)}.vm-alert_warning:after{background-color:var(--color-warning)}.vm-popper{background-color:var(--color-background-block);border-radius:4px;box-shadow:0 2px 8px 0 hsla(0,6%,6%,.2);opacity:0;pointer-events:none;position:fixed;transition:opacity .1s ease-in-out;z-index:-99}.vm-popper_open{-webkit-animation:scale .15s cubic-bezier(.28,.84,.42,1);animation:scale .15s cubic-bezier(.28,.84,.42,1);opacity:1;pointer-events:auto;z-index:101}.vm-popper_open_slider{-webkit-animation:slidePopper .3s cubic-bezier(.28,.84,.42,1.1);animation:slidePopper .3s cubic-bezier(.28,.84,.42,1.1);-webkit-transform-origin:top center;transform-origin:top center}.vm-button{align-items:center;border-radius:6px;color:#fff;cursor:pointer;display:flex;font-size:10px;font-weight:500;justify-content:center;line-height:15px;min-height:31px;padding:6px 14px;position:relative;text-transform:uppercase;-webkit-transform-style:preserve-3d;transform-style:preserve-3d;-webkit-user-select:none;user-select:none;white-space:nowrap}.vm-button:hover:after{background-color:hsla(0,6%,6%,.05)}.vm-button:after,.vm-button:before{border-radius:6px;content:"";height:100%;left:0;position:absolute;top:0;transition:background-color .2s ease;width:100%}.vm-button:before{-webkit-transform:translateZ(-2px);transform:translateZ(-2px)}.vm-button:after{background-color:transparent;-webkit-transform:translateZ(-1px);transform:translateZ(-1px)}.vm-button span{align-items:center;display:grid;justify-content:center}.vm-button span svg{width:15px}.vm-button__start-icon{margin-right:6px}.vm-button__end-icon{margin-left:6px}.vm-button_disabled{cursor:not-allowed;opacity:.3}.vm-button_icon{padding:6px 8px}.vm-button_icon .vm-button__end-icon,.vm-button_icon .vm-button__start-icon{margin:0}.vm-button_small{min-height:25px;padding:4px 6px}.vm-button_small span svg{width:13px}.vm-button_contained_primary{color:var(--color-primary-text)}.vm-button_contained_primary:before{background-color:var(--color-primary)}.vm-button_contained_primary:hover:after{background-color:hsla(0,6%,6%,.2)}.vm-button_contained_secondary{color:var(--color-secondary-text)}.vm-button_contained_secondary:before{background-color:var(--color-secondary)}.vm-button_contained_secondary:hover:after{background-color:hsla(0,6%,6%,.2)}.vm-button_contained_success{color:var(--color-success-text)}.vm-button_contained_success:before{background-color:var(--color-success)}.vm-button_contained_success:hover:after{background-color:hsla(0,6%,6%,.2)}.vm-button_contained_error{color:var(--color-error-text)}.vm-button_contained_error:before{background-color:var(--color-error)}.vm-button_contained_gray{color:hsla(0,6%,6%,.6)}.vm-button_contained_gray:before{background-color:hsla(0,6%,6%,.6)}.vm-button_contained_warning{color:var(--color-warning)}.vm-button_contained_warning:before{background-color:var(--color-warning);opacity:.2}.vm-button_text_primary{color:var(--color-primary)}.vm-button_text_secondary{color:var(--color-secondary)}.vm-button_text_success{color:var(--color-success)}.vm-button_text_error{color:var(--color-error)}.vm-button_text_gray{color:hsla(0,6%,6%,.6)}.vm-button_text_warning{color:var(--color-warning)}.vm-button_outlined_primary{border:1px solid var(--color-primary);color:var(--color-primary)}.vm-button_outlined_error{border:1px solid var(--color-error);color:var(--color-error)}.vm-button_outlined_secondary{border:1px solid var(--color-secondary);color:var(--color-secondary)}.vm-button_outlined_success{border:1px solid var(--color-success);color:var(--color-success)}.vm-button_outlined_gray{border:1px solid hsla(0,6%,6%,.6);color:hsla(0,6%,6%,.6)}.vm-button_outlined_warning{border:1px solid var(--color-warning);color:var(--color-warning)}.vm-execution-controls-buttons{border-radius:7px;display:flex;justify-content:space-between;min-width:107px}.vm-execution-controls-buttons__arrow{align-items:center;display:flex;justify-content:center;-webkit-transform:rotate(0);transform:rotate(0);transition:-webkit-transform .2s ease-in-out;transition:transform .2s ease-in-out;transition:transform .2s ease-in-out,-webkit-transform .2s ease-in-out}.vm-execution-controls-buttons__arrow_open{-webkit-transform:rotate(180deg);transform:rotate(180deg)}.vm-execution-controls-list{font-size:12px;max-height:208px;overflow:auto;padding:8px 0;width:124px}.vm-tooltip{-webkit-animation:vm-scale .15s cubic-bezier(.28,.84,.42,1);animation:vm-scale .15s cubic-bezier(.28,.84,.42,1);background-color:rgba(97,97,97,.92);border-radius:4px;box-shadow:0 2px 8px 0 hsla(0,6%,6%,.2);color:#fff;font-size:10px;line-height:150%;opacity:1;padding:3px 8px;pointer-events:auto;position:fixed;transition:opacity .1s ease-in-out;white-space:nowrap;z-index:101}@-webkit-keyframes vm-scale{0%{-webkit-transform:scale(0);transform:scale(0)}to{-webkit-transform:scale(1);transform:scale(1)}}@keyframes vm-scale{0%{-webkit-transform:scale(0);transform:scale(0)}to{-webkit-transform:scale(1);transform:scale(1)}}.vm-time-duration{font-size:12px;max-height:168px;overflow:auto}.vm-calendar{background-color:var(--color-background-block);border-radius:8px;display:grid;font-size:12px;grid-template-rows:auto 1fr auto;padding:16px;-webkit-user-select:none;user-select:none}.vm-calendar__tabs{border-top:1px solid hsla(0,6%,6%,.15);margin:16px -16px -16px}.vm-calendar-header{grid-gap:24px;align-items:center;display:grid;gap:24px;grid-template-columns:1fr auto;justify-content:center;min-height:36px;padding-bottom:16px}.vm-calendar-header-left{grid-gap:8px;align-items:center;cursor:pointer;display:grid;gap:8px;grid-template-columns:auto auto;justify-content:flex-start;transition:opacity .2s ease-in-out}.vm-calendar-header-left:hover{opacity:.8}.vm-calendar-header-left__date{color:#110f0f;font-size:12px;font-weight:700}.vm-calendar-header-left__select-year{align-items:center;display:grid;height:14px;justify-content:center;width:14px}.vm-calendar-header-left__select-year svg{width:100%}.vm-calendar-header-right{grid-gap:8px;align-items:center;display:grid;gap:8px;grid-template-columns:18px 18px;justify-content:center}.vm-calendar-header-right__next,.vm-calendar-header-right__prev{cursor:pointer;transition:opacity .2s ease-in-out}.vm-calendar-header-right__next:hover,.vm-calendar-header-right__prev:hover{opacity:.8}.vm-calendar-header-right__prev{-webkit-transform:rotate(90deg);transform:rotate(90deg)}.vm-calendar-header-right__next{-webkit-transform:rotate(-90deg);transform:rotate(-90deg)}.vm-calendar-body{grid-gap:2px;display:grid;gap:2px;grid-template-columns:repeat(7,32px);grid-template-rows:repeat(6,32px)}.vm-calendar-body,.vm-calendar-body-cell{align-items:center;justify-content:center}.vm-calendar-body-cell{border-radius:50%;display:flex;height:100%;text-align:center}.vm-calendar-body-cell_weekday{color:hsla(0,6%,6%,.6)}.vm-calendar-body-cell_day{cursor:pointer;transition:color .2s ease,background-color .3s ease-in-out}.vm-calendar-body-cell_day:hover{background-color:hsla(0,6%,6%,.05)}.vm-calendar-body-cell_day_empty{pointer-events:none}.vm-calendar-body-cell_day_active{color:#fff}.vm-calendar-body-cell_day_active,.vm-calendar-body-cell_day_active:hover{background-color:var(--color-primary)}.vm-calendar-body-cell_day_today{border:1px solid var(--color-primary)}.vm-calendar-years{grid-gap:8px;display:grid;gap:8px;grid-template-columns:repeat(3,1fr);overflow:auto}.vm-calendar-years__year{align-items:center;border-radius:8px;cursor:pointer;display:flex;justify-content:center;padding:8px 16px;transition:color .2s ease,background-color .3s ease-in-out}.vm-calendar-years__year:hover{background-color:hsla(0,6%,6%,.05)}.vm-calendar-years__year_selected{color:#fff}.vm-calendar-years__year_selected,.vm-calendar-years__year_selected:hover{background-color:var(--color-primary)}.vm-calendar-time-picker{align-items:center;display:flex;flex-direction:column;justify-content:center}.vm-calendar-time-picker-clock{border:1px solid hsla(0,6%,6%,.15);border-radius:50%;box-shadow:1px 2px 12px hsla(0,6%,6%,.08);box-sizing:initial;height:230px;position:relative;width:230px}.vm-calendar-time-picker-clock:after{background-color:var(--color-primary);border-radius:50%;content:"";height:6px;left:50%;position:absolute;top:50%;-webkit-transform:translate(-50%,-50%);transform:translate(-50%,-50%);width:6px}.vm-calendar-time-picker-clock__arrow{background-color:var(--color-primary);height:107px;left:114px;margin-top:8px;opacity:.8;position:absolute;top:0;-webkit-transform-origin:bottom;transform-origin:bottom;transition:-webkit-transform .2s ease-in-out;transition:transform .2s ease-in-out;transition:transform .2s ease-in-out,-webkit-transform .2s ease-in-out;width:2px;z-index:0}.vm-calendar-time-picker-clock__arrow_offset{height:73px;margin-top:42px;z-index:2}.vm-calendar-time-picker-clock__arrow:after{background-color:var(--color-primary);border-radius:50%;content:"";height:30px;left:50%;position:absolute;top:0;-webkit-transform:translateX(-50%);transform:translateX(-50%);width:30px}.vm-calendar-time-picker-clock__time{align-items:flex-start;cursor:pointer;display:flex;height:115px;justify-content:center;left:100px;padding-top:8px;position:absolute;text-align:center;top:0;-webkit-transform-origin:bottom;transform-origin:bottom;width:30px;z-index:1}.vm-calendar-time-picker-clock__time_hide{display:none}.vm-calendar-time-picker-clock__time_offset{height:73px;margin-top:42px;padding:0;z-index:2}.vm-calendar-time-picker-clock__time:hover span{background-color:hsla(0,6%,6%,.1)}.vm-calendar-time-picker-clock__time span{align-items:center;border-radius:50%;display:grid;justify-content:center;min-height:30px;min-width:30px;position:relative;-webkit-transform-origin:center;transform-origin:center;transition:background-color .3s ease}.vm-calendar-time-picker-fields{align-items:center;display:flex;justify-content:space-between;margin-top:16px}.vm-calendar-time-picker-fields span{margin:0 8px}.vm-calendar-time-picker-fields__input{border:1px solid #d8d8d8;border-radius:4px;font-size:14px;height:32px;padding:2px 8px;text-align:center;width:64px}.vm-calendar-time-picker-fields__input:focus{border-color:var(--color-primary)}.vm-time-selector{display:grid;grid-template-columns:repeat(2,230px);padding:16px 0}.vm-time-selector-left{border-right:1px solid hsla(0,6%,6%,.15);display:flex;flex-direction:column;gap:8px;padding:0 16px}.vm-time-selector-left-inputs{align-items:flex-start;display:grid;flex-grow:1;justify-content:stretch}.vm-time-selector-left-inputs__date{grid-gap:8px;align-items:center;border-bottom:1px solid hsla(0,6%,6%,.15);cursor:pointer;display:grid;gap:8px;grid-template-columns:1fr 14px;justify-content:center;margin-bottom:16px;padding-bottom:8px;transition:color .2s ease-in-out,border-bottom-color .3s ease}.vm-time-selector-left-inputs__date:hover{border-bottom-color:var(--color-primary)}.vm-time-selector-left-inputs__date:hover,.vm-time-selector-left-inputs__date:hover svg{color:var(--color-primary)}.vm-time-selector-left-inputs__date label{color:hsla(0,6%,6%,.6);font-size:10px;grid-column:1/3}.vm-time-selector-left-inputs__date svg{color:hsla(0,6%,6%,.6);transition:color .2s ease-in-out}.vm-time-selector-left__controls{grid-gap:8px;display:grid;gap:8px;grid-template-columns:repeat(2,1fr)}.vm-text-field{display:grid;margin:6px 0;position:relative;width:100%}.vm-text-field_textarea:after{content:attr(data-replicated-value) " ";visibility:hidden;white-space:pre-wrap}.vm-text-field:after,.vm-text-field__input{background-color:transparent;border:1px solid hsla(0,6%,6%,.15);font-size:12px;grid-area:1/1/2/2;line-height:18px;overflow:hidden;padding:8px 16px;width:100%}.vm-text-field__error,.vm-text-field__helper-text,.vm-text-field__label{-webkit-line-clamp:2;line-clamp:2;-webkit-box-orient:vertical;background-color:var(--color-background-block);display:-webkit-box;font-size:10px;left:8px;line-height:10px;max-width:calc(100% - 16px);overflow:hidden;padding:0 3px;pointer-events:none;position:absolute;text-overflow:ellipsis;-webkit-user-select:none;user-select:none;z-index:2}.vm-text-field__label{color:hsla(0,6%,6%,.6);top:-5px}.vm-text-field__error{color:var(--color-error);top:calc(100% - 5px)}.vm-text-field__helper-text{bottom:-5px;color:hsla(0,6%,6%,.6)}.vm-text-field__input{border-radius:4px;display:block;min-height:34px;overflow:hidden;resize:none;transition:border .2s ease}.vm-text-field__input:focus,.vm-text-field__input:hover{border:1px solid var(--color-primary)}.vm-text-field__input_error,.vm-text-field__input_error:focus,.vm-text-field__input_error:hover{border:1px solid var(--color-error)}.vm-text-field__input_icon-start{padding-left:42px}.vm-text-field__input:disabled{background-color:inherit;color:inherit}.vm-text-field__input:disabled:hover{border-color:hsla(0,6%,6%,.4)}.vm-text-field__icon-end,.vm-text-field__icon-start{align-items:center;color:hsla(0,6%,6%,.6);display:flex;height:100%;justify-content:center;left:8px;max-width:15px;position:absolute;top:auto}.vm-text-field__icon-end svg,.vm-text-field__icon-start svg{height:auto;width:100%}.vm-text-field__icon-end{left:auto;right:8px}.vm-modal{align-items:center;background:hsla(0,6%,6%,.55);bottom:0;display:flex;justify-content:center;left:0;position:fixed;right:0;top:0;z-index:100}.vm-modal-content{background:#fff;border-radius:4px;box-shadow:0 0 24px hsla(0,6%,6%,.07);padding:22px}.vm-modal-content-header{align-items:center;display:grid;grid-template-columns:1fr auto;margin-bottom:22px}.vm-modal-content-header__title{font-size:14px;font-weight:700}.vm-modal-content-header__close{align-items:center;box-sizing:initial;color:#fff;cursor:pointer;display:flex;justify-content:center;padding:10px;width:24px}.vm-modal-content-header__close svg{height:auto;width:100%}.vm-server-configurator{grid-gap:24px;align-items:center;display:grid;gap:24px;width:600px}.vm-server-configurator__footer{align-items:center;display:inline-grid;gap:8px;grid-template-columns:repeat(2,1fr);justify-content:flex-end;margin-left:auto;margin-right:0}.vm-limits-configurator-title{align-items:center;display:flex;font-size:12px;font-weight:700;justify-content:flex-start;margin-bottom:16px}.vm-limits-configurator-title__reset{align-items:center;display:flex;flex-grow:1;justify-content:flex-end}.vm-limits-configurator__inputs{grid-gap:16px;align-items:center;display:grid;gap:16px;grid-template-columns:repeat(3,1fr);justify-content:space-between}.vm-shortcuts{min-width:400px}.vm-shortcuts-section{margin-bottom:24px}.vm-shortcuts-section__title{border-bottom:1px solid hsla(0,6%,6%,.15);font-weight:700;margin-bottom:16px;padding:8px 0}.vm-shortcuts-section-list{grid-gap:16px;display:grid;gap:16px}.vm-shortcuts-section-list-item{grid-gap:8px;align-items:center;display:grid;gap:8px;grid-template-columns:180px 1fr}.vm-shortcuts-section-list-item__key{align-items:center;display:flex;gap:4px}.vm-shortcuts-section-list-item__key code{background-color:#fff;background-repeat:repeat-x;border:1px solid hsla(0,6%,6%,.15);border-radius:4px;color:#110f0f;display:inline-block;font-size:10px;line-height:2;padding:2px 8px 0;text-align:center}.vm-shortcuts-section-list-item__description{font-size:12px}.vm-header{align-items:center;display:flex;gap:48px;justify-content:flex-start;padding:8px 24px}.vm-header_app{padding:8px 0}.vm-header-logo{align-items:center;display:grid;justify-content:center}.vm-header-logo__icon{align-items:center;cursor:pointer;display:flex;margin-bottom:2px;position:relative;width:100%}.vm-header-logo__issue{color:inherit;cursor:pointer;font-size:10px;opacity:.4;text-align:center;text-decoration:underline;transition:opacity .2s;white-space:nowrap}.vm-header-logo__issue:hover{opacity:.8}.vm-header-nav{font-size:10px;font-weight:600}.vm-header__settings{align-items:center;display:flex;flex-grow:1;gap:8px;justify-content:flex-end}.vm-container{display:flex;flex-direction:column;min-height:calc(100vh - var(--scrollbar-height))}.vm-container-body{background-color:var(--color-background-body);flex-grow:1;min-height:100%;padding:24px}.vm-container-body_app{background-color:transparent;padding:8px 0}.uplot,.uplot *,.uplot :after,.uplot :before{box-sizing:border-box}.uplot{font-family: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;line-height:1.5;width:-webkit-min-content;width:min-content}.u-title{font-size:18px;font-weight:700;text-align:center}.u-wrap{position:relative;-webkit-user-select:none;user-select:none}.u-over,.u-under{position:absolute}.u-under{overflow:hidden}.uplot canvas{display:block;height:100%;position:relative;width:100%}.u-axis{position:absolute}.u-legend{margin:auto;text-align:center}.u-inline{display:block}.u-inline *{display:inline-block}.u-inline tr{margin-right:16px}.u-legend th{font-weight:600}.u-legend th>*{display:inline-block;vertical-align:middle}.u-legend .u-marker{background-clip:padding-box!important;height:1em;margin-right:4px;width:1em}.u-inline.u-live th:after{content:":";vertical-align:middle}.u-inline:not(.u-live) .u-value{display:none}.u-series>*{padding:4px}.u-series th{cursor:pointer}.u-legend .u-off>*{opacity:.3}.u-select{background:rgba(0,0,0,.07)}.u-cursor-x,.u-cursor-y,.u-select{pointer-events:none;position:absolute}.u-cursor-x,.u-cursor-y{left:0;top:0;will-change:transform;z-index:100}.u-hz .u-cursor-x,.u-vt .u-cursor-y{border-right:1px dashed #607d8b;height:100%}.u-hz .u-cursor-y,.u-vt .u-cursor-x{border-bottom:1px dashed #607d8b;width:100%}.u-cursor-pt{background-clip:padding-box!important;border:0 solid;border-radius:50%;left:0;pointer-events:none;position:absolute;top:0;will-change:transform;z-index:100}.u-axis.u-off,.u-cursor-pt.u-off,.u-cursor-x.u-off,.u-cursor-y.u-off,.u-select.u-off{display:none}.vm-line-chart{height:500px;pointer-events:auto}.vm-line-chart_panning{pointer-events:none}.vm-line-chart__u-plot{position:relative}.vm-chart-tooltip{grid-gap:16px;word-wrap:break-word;background:rgba(97,97,97,.92);border-radius:8px;color:#fff;display:grid;font-family:JetBrains Mono,monospace;font-size:10px;font-weight:400;gap:16px;line-height:150%;padding:8px;pointer-events:none;position:absolute;-webkit-user-select:text;user-select:text;width:300px;z-index:98}.vm-chart-tooltip_sticky{background-color:#616161;pointer-events:auto;z-index:99}.vm-chart-tooltip_moved{margin-left:-246.5px;margin-top:-20.5px;position:fixed}.vm-chart-tooltip-header{grid-gap:8px;align-items:center;display:grid;gap:8px;grid-template-columns:1fr 25px 25px;justify-content:center;min-height:25px}.vm-chart-tooltip-header__close{color:#fff}.vm-chart-tooltip-header__drag{color:#fff;cursor:move}.vm-chart-tooltip-data{grid-gap:8px;align-items:flex-start;display:grid;gap:8px;grid-template-columns:auto 1fr;line-height:12px;word-break:break-all}.vm-chart-tooltip-data__value{font-weight:700;padding:4px}.vm-chart-tooltip-data__marker{height:12px;width:12px}.vm-chart-tooltip-info{grid-gap:4px;display:grid}.vm-legend-item{grid-gap:8px;align-items:start;background-color:var(--color-background-block);cursor:pointer;display:grid;grid-template-columns:auto auto;justify-content:start;padding:8px 48px 8px 8px;transition:.2s ease}.vm-legend-item:hover{background-color:rgba(0,0,0,.1)}.vm-legend-item_hide{opacity:.5;text-decoration:line-through}.vm-legend-item__marker{border-radius:2px;box-sizing:border-box;height:14px;transition:.2s ease;width:14px}.vm-legend-item-info{font-weight:400}.vm-legend-item-info__free-fields{cursor:pointer;padding:3px}.vm-legend-item-info__free-fields:hover{text-decoration:underline}.vm-legend-item-info__free-fields:not(:last-child):after{content:","}.vm-legend{cursor:default;display:flex;flex-wrap:wrap;margin-top:24px;position:relative}.vm-legend-group{margin:0 16px 16px 0;min-width:23%}.vm-legend-group-title{align-items:center;border-bottom:1px solid hsla(0,6%,6%,.15);display:flex;margin-bottom:1px;padding:0 8px 8px}.vm-legend-group-title__count{font-weight:700;margin-right:8px}.vm-graph-view{width:100%}.vm-graph-view_full-width{width:calc(100vw - 96px - var(--scrollbar-width))}.vm-query-editor-autocomplete{max-height:300px;overflow:auto}.vm-additional-settings{align-items:center;display:inline-flex;flex-wrap:wrap;gap:24px;justify-content:flex-start}.vm-additional-settings__input{flex-basis:160px;margin-bottom:-6px}.vm-switch{align-items:center;cursor:pointer;display:flex;justify-content:flex-start}.vm-switch_disabled{cursor:default;opacity:.6}.vm-switch_secondary_active .vm-switch-track{background-color:var(--color-secondary)}.vm-switch_primary_active .vm-switch-track{background-color:var(--color-primary)}.vm-switch_active .vm-switch-track__thumb{left:20px}.vm-switch:hover .vm-switch-track{opacity:.8}.vm-switch-track{align-items:center;background-color:hsla(0,6%,6%,.4);border-radius:17px;display:flex;height:17px;justify-content:flex-start;padding:3px;position:relative;transition:background-color .2s ease,opacity .3s ease-out;width:34px}.vm-switch-track__thumb{background-color:var(--color-background-block);border-radius:50%;left:3px;min-height:11px;min-width:11px;position:absolute;top:auto;-webkit-transform-style:preserve-3d;transform-style:preserve-3d;transition:right .2s ease-out,left .2s ease-out}.vm-switch__label{color:inherit;font-size:inherit;margin-left:8px;transition:color .2s ease;white-space:nowrap}.vm-query-configurator{grid-gap:8px;display:grid;gap:8px}.vm-query-configurator-list{display:grid}.vm-query-configurator-list-row{grid-gap:8px;align-items:center;display:grid;gap:8px;grid-template-columns:1fr auto auto}.vm-query-configurator-list-row_disabled{-webkit-filter:grayscale(100%);filter:grayscale(100%);opacity:.5}.vm-query-configurator-list-row__button{display:grid;min-height:36px;width:36px}.vm-query-configurator-settings{align-items:flex-end;display:flex;gap:24px;justify-content:space-between}.vm-query-configurator-settings__buttons{grid-gap:8px;display:grid;gap:8px;grid-template-columns:repeat(2,auto)}.vm-json-view__copy{display:flex;justify-content:flex-end;position:-webkit-sticky;position:sticky;top:24px;z-index:2}.vm-json-view__code{font-size:12px;line-height:1.4;-webkit-transform:translateY(-32px);transform:translateY(-32px)}.vm-axes-limits{max-width:300px}.vm-axes-limits,.vm-axes-limits-list{grid-gap:16px;align-items:center;display:grid;gap:16px}.vm-axes-limits-list__inputs{grid-gap:8px;display:grid;gap:8px;grid-template-columns:repeat(2,120px)}.vm-graph-settings-popper{grid-gap:16px;display:grid;gap:16px;padding:0 0 16px}.vm-graph-settings-popper__body{grid-gap:8px;display:grid;gap:8px;padding:0 16px}.vm-spinner{align-items:center;-webkit-animation:vm-fade 2s cubic-bezier(.28,.84,.42,1.1);animation:vm-fade 2s cubic-bezier(.28,.84,.42,1.1);background-color:hsla(0,0%,100%,.5);bottom:0;display:flex;flex-direction:column;justify-content:center;left:0;pointer-events:none;position:fixed;right:0;top:0;z-index:99}.vm-spinner__message{color:hsla(0,6%,6%,.9);font-size:14px;line-height:1.3;margin-top:24px;text-align:center;white-space:pre-line}.half-circle-spinner,.half-circle-spinner *{box-sizing:border-box}.half-circle-spinner{border-radius:100%;height:60px;position:relative;width:60px}.half-circle-spinner .circle{border:6px solid transparent;border-radius:100%;content:"";height:100%;position:absolute;width:100%}.half-circle-spinner .circle.circle-1{-webkit-animation:half-circle-spinner-animation 1s infinite;animation:half-circle-spinner-animation 1s infinite;border-top-color:var(--color-primary)}.half-circle-spinner .circle.circle-2{-webkit-animation:half-circle-spinner-animation 1s infinite alternate;animation:half-circle-spinner-animation 1s infinite alternate;border-bottom-color:var(--color-primary)}@-webkit-keyframes half-circle-spinner-animation{0%{-webkit-transform:rotate(0deg);transform:rotate(0deg)}to{-webkit-transform:rotate(1turn);transform:rotate(1turn)}}@keyframes half-circle-spinner-animation{0%{-webkit-transform:rotate(0deg);transform:rotate(0deg)}to{-webkit-transform:rotate(1turn);transform:rotate(1turn)}}@-webkit-keyframes vm-fade{0%{opacity:0}to{opacity:1}}@keyframes vm-fade{0%{opacity:0}to{opacity:1}}.vm-tracings-view{grid-gap:24px;display:grid;gap:24px}.vm-tracings-view-trace-header{align-items:center;border-bottom:1px solid hsla(0,6%,6%,.15);display:flex;justify-content:space-between;padding:8px 8px 8px 24px}.vm-tracings-view-trace-header-title{flex-grow:1;font-size:14px;margin-right:8px}.vm-tracings-view-trace-header-title__query{font-weight:700}.vm-tracings-view-trace__nav{padding:24px 24px 24px 0}.vm-line-progress{grid-gap:8px;align-items:center;color:hsla(0,6%,6%,.6);display:grid;gap:8px;grid-template-columns:1fr auto;justify-content:center}.vm-line-progress-track{background-color:hsla(0,6%,6%,.05);border-radius:4px;height:20px;width:100%}.vm-line-progress-track__thumb{background-color:#1a90ff;border-radius:4px;height:100%}.vm-nested-nav{background-color:rgba(201,227,246,.4);border-radius:4px;margin-left:24px}.vm-nested-nav-header{grid-gap:8px;border-radius:4px;cursor:pointer;display:grid;gap:8px;grid-template-columns:auto 1fr;padding:8px;transition:background-color .2s ease-in-out}.vm-nested-nav-header:hover{background-color:hsla(0,6%,6%,.06)}.vm-nested-nav-header__icon{align-items:center;display:flex;justify-content:center;transition:-webkit-transform .2s ease-in-out;transition:transform .2s ease-in-out;transition:transform .2s ease-in-out,-webkit-transform .2s ease-in-out;width:20px}.vm-nested-nav-header__icon_open{-webkit-transform:rotate(180deg);transform:rotate(180deg)}.vm-nested-nav-header__message,.vm-nested-nav-header__progress{grid-column:2}.vm-nested-nav-header__duration{color:hsla(0,6%,6%,.6);grid-column:2}.vm-json-form{grid-gap:16px;display:grid;gap:16px;grid-template-rows:auto calc(90vh - 150px) auto;max-height:900px;max-width:1000px;width:70vw}.vm-json-form_one-field{grid-template-rows:calc(90vh - 150px) auto}.vm-json-form textarea{height:100%;overflow:auto;width:100%}.vm-json-form-footer{align-items:center;display:flex;gap:8px;justify-content:space-between}.vm-json-form-footer__controls{align-items:center;display:flex;flex-grow:1;gap:8px;justify-content:flex-start}.vm-json-form-footer__controls_right{display:grid;grid-template-columns:repeat(2,90px);justify-content:flex-end}.vm-table-settings-popper{display:grid}.vm-table-settings-popper-list{grid-gap:8px;display:grid;gap:8px;max-height:350px;overflow:auto;padding:16px 16px 24px}.vm-table-settings-popper-list__item{font-size:12px;text-transform:capitalize}.vm-table-settings-popper__footer{align-items:center;display:inline-grid;gap:8px;grid-template-columns:1fr 1fr;justify-content:center;min-width:200px;padding:0 16px 16px}.vm-checkbox{align-items:center;cursor:pointer;display:flex;justify-content:flex-start;-webkit-user-select:none;user-select:none}.vm-checkbox_disabled{cursor:default;opacity:.6}.vm-checkbox_secondary_active .vm-checkbox-track{background-color:var(--color-secondary)}.vm-checkbox_secondary .vm-checkbox-track{border:1px solid var(--color-secondary)}.vm-checkbox_primary_active .vm-checkbox-track{background-color:var(--color-primary)}.vm-checkbox_primary .vm-checkbox-track{border:1px solid var(--color-primary)}.vm-checkbox_active .vm-checkbox-track__thumb{-webkit-transform:scale(1);transform:scale(1)}.vm-checkbox:hover .vm-checkbox-track{opacity:.8}.vm-checkbox-track{align-items:center;background-color:transparent;border-radius:4px;display:flex;height:16px;justify-content:center;padding:2px;position:relative;transition:background-color .2s ease,opacity .3s ease-out;width:16px}.vm-checkbox-track__thumb{align-items:center;color:#fff;display:grid;height:12px;justify-content:center;-webkit-transform:scale(0);transform:scale(0);transition:-webkit-transform .1s ease-in-out;transition:transform .1s ease-in-out;transition:transform .1s ease-in-out,-webkit-transform .1s ease-in-out;width:12px}.vm-checkbox-track__thumb svg{width:100%}.vm-checkbox__label{color:inherit;font-size:inherit;margin-left:8px;transition:color .2s ease;white-space:nowrap}.vm-custom-panel{grid-gap:24px;align-items:flex-start;display:grid;gap:24px;height:100%}.vm-custom-panel__warning{align-items:center;display:grid;grid-template-columns:1fr auto;justify-content:space-between}.vm-custom-panel-body{position:relative}.vm-custom-panel-body-header{display:flex;font-size:10px;justify-content:space-between;margin:-24px -24px 24px;padding:0 24px;position:relative;z-index:1}.vm-custom-panel-body-header,.vm-predefined-panel-header{align-items:center;border-bottom:1px solid hsla(0,6%,6%,.15)}.vm-predefined-panel-header{grid-gap:8px;display:grid;gap:8px;grid-template-columns:auto 1fr 160px auto;justify-content:flex-start;padding:8px 16px}.vm-predefined-panel-header__description{line-height:1.3;white-space:pre-wrap}.vm-predefined-panel-header__description ol,.vm-predefined-panel-header__description ul{list-style-position:inside}.vm-predefined-panel-header__description a{color:#c9e3f6;text-decoration:underline}.vm-predefined-panel-header__info{align-items:center;color:var(--color-primary);display:flex;justify-content:center;width:18px}.vm-predefined-panel-body{padding:8px 16px}.vm-accordion-header{align-items:center;cursor:pointer;display:grid;font-size:inherit;position:relative}.vm-accordion-header__arrow{align-items:center;display:flex;justify-content:center;position:absolute;right:14px;top:auto;-webkit-transform:rotate(0);transform:rotate(0);transition:-webkit-transform .2s ease-in-out;transition:transform .2s ease-in-out;transition:transform .2s ease-in-out,-webkit-transform .2s ease-in-out}.vm-accordion-header__arrow_open{-webkit-transform:rotate(180deg);transform:rotate(180deg)}.vm-accordion-header__arrow svg{height:auto;width:14px}.accordion-section{overflow:hidden}.vm-predefined-dashboard{background-color:transparent}.vm-predefined-dashboard-header{align-items:center;border-radius:4px;box-shadow:1px 2px 12px hsla(0,6%,6%,.08);display:grid;font-weight:700;grid-template-columns:1fr auto;justify-content:space-between;line-height:14px;overflow:hidden;padding:16px;position:relative;-webkit-transform-style:preserve-3d;transform-style:preserve-3d;transition:box-shadow .2s ease-in-out}.vm-predefined-dashboard-header_open{border-radius:4px 4px 0 0;box-shadow:none}.vm-predefined-dashboard-header__title{font-size:12px}.vm-predefined-dashboard-header__count{font-size:10px;grid-column:2;margin-right:30px}.vm-predefined-dashboard-panels{grid-gap:16px;display:grid;gap:16px;grid-template-columns:repeat(12,1fr);padding:0}.vm-predefined-dashboard-panels-panel{border-radius:8px;overflow:hidden;position:relative}.vm-predefined-dashboard-panels-panel:hover .vm-predefined-dashboard-panels-panel__resizer{-webkit-transform:scale(1);transform:scale(1)}.vm-predefined-dashboard-panels-panel__resizer{bottom:0;cursor:se-resize;height:20px;position:absolute;right:0;-webkit-transform:scale(0);transform:scale(0);transition:-webkit-transform .2s ease-in-out;transition:transform .2s ease-in-out;transition:transform .2s ease-in-out,-webkit-transform .2s ease-in-out;width:20px;z-index:1}.vm-predefined-dashboard-panels-panel__resizer:after{border-bottom:2px solid hsla(0,6%,6%,.2);border-right:2px solid hsla(0,6%,6%,.2);bottom:5px;content:"";height:5px;position:absolute;right:5px;width:5px}.vm-predefined-dashboard-panels-panel__alert{grid-column:span 12}.vm-predefined-panels{grid-gap:16px;align-items:flex-start;display:grid;gap:16px}.vm-predefined-panels-tabs{align-items:center;display:flex;font-size:10px;justify-content:flex-start;overflow:hidden}.vm-predefined-panels-tabs__tab{border-right:1px solid hsla(0,6%,6%,.15);cursor:pointer;padding:16px;text-transform:uppercase;transition:opacity .2s ease-in-out,color .15s ease-in}.vm-predefined-panels-tabs__tab:hover{opacity:1}.vm-predefined-panels__dashboards{grid-gap:16px;display:grid;gap:16px}.vm-cardinality-configurator{grid-gap:8px;display:grid;gap:8px}.vm-cardinality-configurator-controls{align-items:center;display:flex;flex-wrap:wrap;gap:0 24px;justify-content:flex-start}.vm-cardinality-configurator-controls__query{flex-grow:1}.vm-cardinality-configurator-bottom{grid-gap:24px;align-items:flex-end;display:grid;gap:24px;grid-template-columns:1fr auto}.vm-cardinality-configurator-bottom__info{font-size:12px}.u-legend{color:#110f0f;font-family:Lato,sans-serif;font-size:14px}.u-legend .u-thead{display:none}.u-legend .u-series{display:flex;gap:8px}.u-legend .u-series th{display:none}.u-legend .u-series td:nth-child(2):after{content:":";margin-left:8px}.u-legend .u-series .u-value{display:block;padding:0;text-align:left}.vm-metrics-content-header{margin:-24px -24px 24px}.vm-cardinality-panel{grid-gap:24px;align-items:flex-start;display:grid;gap:24px}.vm-top-queries-panel-header{margin:-24px -24px 24px}.vm-top-queries{grid-gap:24px;align-items:flex-start;display:grid;gap:24px}.vm-top-queries-controls{grid-gap:8px;display:grid;gap:8px}.vm-top-queries-controls-bottom,.vm-top-queries-controls__fields{grid-gap:24px;display:grid;gap:24px;grid-template-columns:1fr auto}.vm-top-queries-controls-bottom{align-items:flex-end;justify-content:space-between}.vm-top-queries-controls-bottom__button{align-items:center;display:flex;justify-content:flex-end}.vm-top-queries-panels{grid-gap:24px;display:grid;gap:24px}.vm-trace-page{display:flex;flex-direction:column;min-height:100%;padding:16px}.vm-trace-page-controls{grid-gap:16px;align-items:center;display:grid;gap:16px;grid-template-columns:1fr 1fr;justify-content:center}.vm-trace-page-header{grid-gap:16px;align-items:start;display:grid;gap:16px;grid-template-columns:1fr auto;margin-bottom:24px}.vm-trace-page-header-errors{grid-gap:24px;align-items:flex-start;display:grid;gap:24px;grid-template-columns:1fr;justify-content:stretch}.vm-trace-page-header-errors-item{align-items:center;display:grid;justify-content:stretch;position:relative}.vm-trace-page-header-errors-item__filename{min-height:20px}.vm-trace-page-header-errors-item__close{position:absolute;right:8px;top:auto;z-index:2}.vm-trace-page-preview{align-items:center;display:flex;flex-direction:column;flex-grow:1;justify-content:center}.vm-trace-page-preview__text{font-size:14px;line-height:1.8;margin-bottom:8px;text-align:center;white-space:pre-line}#root,body,html{background-attachment:fixed;background-repeat:no-repeat;color:#110f0f;cursor:default;font-family:Lato,sans-serif;font-size:12px;margin:0;min-height:100%}body{overflow:scroll}*{cursor:inherit;font:inherit}code{font-family:JetBrains Mono,monospace}b{font-weight:700}input,textarea{cursor:text}input[type=number]::-webkit-inner-spin-button,input[type=number]::-webkit-outer-spin-button{-webkit-appearance:none;margin:0}.vm-snackbar{bottom:16px;left:16px;position:fixed;z-index:999}a,abbr,acronym,address,applet,article,aside,audio,big,body,canvas,caption,center,cite,code,del,details,dfn,div,em,embed,fieldset,figcaption,figure,footer,form,h1,h2,h3,h4,h5,h6,header,hgroup,html,iframe,img,ins,kbd,label,legend,li,mark,menu,nav,object,ol,output,p,pre,q,ruby,s,samp,section,small,span,strike,strong,sub,summary,sup,table,tbody,td,tfoot,th,thead,time,tr,tt,u,ul,var,video{border:0;margin:0;padding:0;vertical-align:initial}h1,h2,h3,h4,h5,h6{font-weight:400}article,aside,details,figcaption,figure,footer,header,hgroup,menu,nav,section{display:block}body{line-height:1}q:after,q:before{content:""}table{border-collapse:collapse;border-spacing:0}input::-webkit-input-placeholder{opacity:1;-webkit-transition:opacity .3s ease;transition:opacity .3s ease}input::placeholder{opacity:1;transition:opacity .3s ease}input:focus::-webkit-input-placeholder{opacity:0;-webkit-transition:opacity .3s ease;transition:opacity .3s ease}input:focus::placeholder{opacity:0;transition:opacity .3s ease}*{box-sizing:border-box;outline:none}button{background:none;border:none;border-radius:0;padding:0}strong{letter-spacing:1px}input[type=file]{cursor:pointer;font-size:0;height:100%;left:0;opacity:0;position:absolute;top:0;width:100%}input[type=file]:disabled{cursor:not-allowed}a{color:inherit;text-decoration:inherit}input,textarea{-webkit-text-fill-color:inherit;appearance:none;-webkit-appearance:none}input:disabled,textarea:disabled{opacity:1!important}input:placeholder-shown,textarea:placeholder-shown{width:100%}input:-webkit-autofill,input:-webkit-autofill:active,input:-webkit-autofill:focus,input:-webkit-autofill:hover{-webkit-box-shadow:inset 0 0 0 0 #fff!important;width:100%;z-index:2}.vm-header-button{border:1px solid hsla(0,6%,6%,.2)}.vm-list__item{background-color:transparent;cursor:pointer;padding:12px 16px;transition:background-color .2s ease}.vm-list__item:hover,.vm-list__item_active{background-color:hsla(0,6%,6%,.1)}.vm-popper-header{grid-gap:8px;align-items:center;background-color:#3f51b5;background-color:var(--color-primary);border-radius:4px 4px 0 0;color:#fff;display:grid;gap:8px;grid-template-columns:1fr auto;justify-content:space-between;padding:8px 8px 8px 16px}.vm-popper-header__title{font-weight:700}.vm-block{background-color:#fff;background-color:var(--color-background-block);border-radius:8px;box-shadow:1px 2px 12px hsla(0,6%,6%,.08);padding:24px}.vm-block_empty-padding{padding:0}.vm-section-header{align-items:center;border-bottom:1px solid hsla(0,6%,6%,.15);border-radius:8px 8px 0 0;display:grid;grid-template-columns:1fr auto;justify-content:center;padding:0 24px}.vm-section-header__title{font-size:12px;font-weight:700}.vm-section-header__tabs{align-items:center;display:flex;font-size:10px;justify-content:flex-start}.vm-table{border-collapse:initial;border-spacing:0;margin-top:-24px;width:100%}.vm-table,.vm-table__row{background-color:#fff;background-color:var(--color-background-block)}.vm-table__row{transition:background-color .2s ease}.vm-table__row:hover:not(.vm-table__row_header){background-color:hsla(0,6%,6%,.05)}.vm-table__row_header{position:-webkit-sticky;position:sticky;top:0;z-index:2}.vm-table__row_selected{background-color:rgba(26,144,255,.05)}.vm-table-cell{border-bottom:1px solid hsla(0,6%,6%,.15);height:40px;padding:8px;vertical-align:middle}.vm-table-cell__content{align-items:center;display:flex;justify-content:flex-start}.vm-table-cell_sort{cursor:pointer}.vm-table-cell_sort:hover{background-color:hsla(0,6%,6%,.05)}.vm-table-cell_header{font-weight:700;text-align:left;text-transform:capitalize}.vm-table-cell_gray{color:hsla(0,6%,6%,.4)}.vm-table-cell_right{text-align:right}.vm-table-cell_right .vm-table-cell__content{justify-content:flex-end}.vm-table-cell_no-wrap{white-space:nowrap}.vm-table__sort-icon{align-items:center;display:flex;justify-content:center;margin:0 8px;opacity:.4;transition:opacity .2s ease,-webkit-transform .2s ease-in-out;transition:opacity .2s ease,transform .2s ease-in-out;transition:opacity .2s ease,transform .2s ease-in-out,-webkit-transform .2s ease-in-out;width:15px}.vm-table__sort-icon_active{opacity:1}.vm-table__sort-icon_desc{-webkit-transform:rotate(180deg);transform:rotate(180deg)}:root{--color-primary:#3f51b5;--color-secondary:#e91e63;--color-error:#fd080e;--color-warning:#ff8308;--color-info:#03a9f4;--color-success:#4caf50;--color-primary-text:#fff;--color-secondary-text:#fff;--color-error-text:#fff;--color-warning-text:#fff;--color-info-text:#fff;--color-success-text:#fff;--color-background-body:#fefeff;--color-background-block:#fff} \ No newline at end of file diff --git a/app/vmselect/vmui/static/css/main.c52a0b3d.css b/app/vmselect/vmui/static/css/main.c52a0b3d.css deleted file mode 100644 index 95ebc84c8..000000000 --- a/app/vmselect/vmui/static/css/main.c52a0b3d.css +++ /dev/null @@ -1 +0,0 @@ -.vm-tabs{gap:16px;height:100%;position:relative;-webkit-user-select:none;user-select:none}.vm-tabs,.vm-tabs-item{align-items:center;display:flex;justify-content:center}.vm-tabs-item{color:inherit;cursor:pointer;font-size:inherit;font-weight:inherit;opacity:.6;padding:16px 8px;text-decoration:none;text-transform:uppercase;transition:opacity .2s}.vm-tabs-item_active{opacity:1}.vm-tabs-item__icon{display:grid;margin-right:8px;width:15px}.vm-tabs-item__icon_single{margin-right:0}.vm-tabs__indicator{border-bottom:2px solid;position:absolute;transition:width .2s ease,left .3s cubic-bezier(.28,.84,.42,1)}.vm-alert{grid-gap:8px;align-items:flex-start;background-color:var(--color-background-block);border-radius:8px;box-shadow:1px 2px 12px hsla(0,6%,6%,.08);color:#110f0f;display:grid;font-size:14px;font-weight:500;gap:8px;grid-template-columns:20px 1fr;line-height:20px;padding:16px;position:relative}.vm-alert:after{border-radius:8px;content:"";height:100%;left:0;opacity:.1;position:absolute;top:0;width:100%;z-index:1}.vm-alert__content,.vm-alert__icon{position:relative;z-index:2}.vm-alert__icon{align-items:center;display:flex;justify-content:center}.vm-alert__content{-webkit-filter:brightness(.6);filter:brightness(.6);white-space:pre-line}.vm-alert_success{color:var(--color-success)}.vm-alert_success:after{background-color:var(--color-success)}.vm-alert_error{color:var(--color-error)}.vm-alert_error:after{background-color:var(--color-error)}.vm-alert_info{color:var(--color-info)}.vm-alert_info:after{background-color:var(--color-info)}.vm-alert_warning{color:var(--color-warning)}.vm-alert_warning:after{background-color:var(--color-warning)}.vm-popper{background-color:var(--color-background-block);border-radius:4px;box-shadow:0 2px 8px 0 hsla(0,6%,6%,.2);opacity:0;pointer-events:none;position:fixed;transition:opacity .1s ease-in-out;z-index:-99}.vm-popper_open{-webkit-animation:scale .15s cubic-bezier(.28,.84,.42,1);animation:scale .15s cubic-bezier(.28,.84,.42,1);opacity:1;pointer-events:auto;z-index:101}.vm-popper_open_slider{-webkit-animation:slidePopper .3s cubic-bezier(.28,.84,.42,1.1);animation:slidePopper .3s cubic-bezier(.28,.84,.42,1.1);-webkit-transform-origin:top center;transform-origin:top center}.vm-button{align-items:center;border-radius:6px;color:#fff;cursor:pointer;display:flex;font-size:10px;font-weight:500;justify-content:center;line-height:15px;min-height:31px;padding:6px 14px;position:relative;text-transform:uppercase;-webkit-transform-style:preserve-3d;transform-style:preserve-3d;-webkit-user-select:none;user-select:none;white-space:nowrap}.vm-button:hover:after{background-color:hsla(0,6%,6%,.05)}.vm-button:after,.vm-button:before{border-radius:6px;content:"";height:100%;left:0;position:absolute;top:0;transition:background-color .2s ease;width:100%}.vm-button:before{-webkit-transform:translateZ(-2px);transform:translateZ(-2px)}.vm-button:after{background-color:transparent;-webkit-transform:translateZ(-1px);transform:translateZ(-1px)}.vm-button span{align-items:center;display:grid;justify-content:center}.vm-button span svg{width:15px}.vm-button__start-icon{margin-right:6px}.vm-button__end-icon{margin-left:6px}.vm-button_disabled{cursor:not-allowed;opacity:.3}.vm-button_icon{padding:6px 8px}.vm-button_icon .vm-button__end-icon,.vm-button_icon .vm-button__start-icon{margin:0}.vm-button_small{min-height:25px;padding:4px 6px}.vm-button_small span svg{width:13px}.vm-button_contained_primary{color:var(--color-primary-text)}.vm-button_contained_primary:before{background-color:var(--color-primary)}.vm-button_contained_primary:hover:after{background-color:hsla(0,6%,6%,.2)}.vm-button_contained_secondary{color:var(--color-secondary-text)}.vm-button_contained_secondary:before{background-color:var(--color-secondary)}.vm-button_contained_secondary:hover:after{background-color:hsla(0,6%,6%,.2)}.vm-button_contained_success{color:var(--color-success-text)}.vm-button_contained_success:before{background-color:var(--color-success)}.vm-button_contained_success:hover:after{background-color:hsla(0,6%,6%,.2)}.vm-button_contained_error{color:var(--color-error-text)}.vm-button_contained_error:before{background-color:var(--color-error)}.vm-button_contained_gray{color:hsla(0,6%,6%,.6)}.vm-button_contained_gray:before{background-color:hsla(0,6%,6%,.6)}.vm-button_text_primary{color:var(--color-primary)}.vm-button_text_secondary{color:var(--color-secondary)}.vm-button_text_success{color:var(--color-success)}.vm-button_text_error{color:var(--color-error)}.vm-button_text_gray{color:hsla(0,6%,6%,.6)}.vm-button_outlined_primary{border:1px solid var(--color-primary);color:var(--color-primary)}.vm-button_outlined_error{border:1px solid var(--color-error);color:var(--color-error)}.vm-button_outlined_secondary{border:1px solid var(--color-secondary);color:var(--color-secondary)}.vm-button_outlined_success{border:1px solid var(--color-success);color:var(--color-success)}.vm-button_outlined_gray{border:1px solid hsla(0,6%,6%,.6);color:hsla(0,6%,6%,.6)}.vm-execution-controls-buttons{border-radius:7px;display:flex;justify-content:space-between;min-width:107px}.vm-execution-controls-buttons__arrow{align-items:center;display:flex;justify-content:center;-webkit-transform:rotate(0);transform:rotate(0);transition:-webkit-transform .2s ease-in-out;transition:transform .2s ease-in-out;transition:transform .2s ease-in-out,-webkit-transform .2s ease-in-out}.vm-execution-controls-buttons__arrow_open{-webkit-transform:rotate(180deg);transform:rotate(180deg)}.vm-execution-controls-list{font-size:12px;max-height:208px;overflow:auto;padding:8px 0;width:124px}.vm-tooltip{-webkit-animation:vm-scale .15s cubic-bezier(.28,.84,.42,1);animation:vm-scale .15s cubic-bezier(.28,.84,.42,1);background-color:rgba(97,97,97,.92);border-radius:4px;box-shadow:0 2px 8px 0 hsla(0,6%,6%,.2);color:#fff;font-size:10px;line-height:150%;opacity:1;padding:3px 8px;pointer-events:auto;position:fixed;transition:opacity .1s ease-in-out;white-space:nowrap;z-index:101}@-webkit-keyframes vm-scale{0%{-webkit-transform:scale(0);transform:scale(0)}to{-webkit-transform:scale(1);transform:scale(1)}}@keyframes vm-scale{0%{-webkit-transform:scale(0);transform:scale(0)}to{-webkit-transform:scale(1);transform:scale(1)}}.vm-time-duration{font-size:12px;max-height:168px;overflow:auto}.vm-calendar{background-color:var(--color-background-block);border-radius:8px;display:grid;font-size:12px;grid-template-rows:auto 1fr auto;padding:16px;-webkit-user-select:none;user-select:none}.vm-calendar__tabs{border-top:1px solid hsla(0,6%,6%,.15);margin:16px -16px -16px}.vm-calendar-header{grid-gap:24px;align-items:center;display:grid;gap:24px;grid-template-columns:1fr auto;justify-content:center;min-height:36px;padding-bottom:16px}.vm-calendar-header-left{grid-gap:8px;align-items:center;cursor:pointer;display:grid;gap:8px;grid-template-columns:auto auto;justify-content:flex-start;transition:opacity .2s ease-in-out}.vm-calendar-header-left:hover{opacity:.8}.vm-calendar-header-left__date{color:#110f0f;font-size:12px;font-weight:700}.vm-calendar-header-left__select-year{align-items:center;display:grid;height:14px;justify-content:center;width:14px}.vm-calendar-header-left__select-year svg{width:100%}.vm-calendar-header-right{grid-gap:8px;align-items:center;display:grid;gap:8px;grid-template-columns:18px 18px;justify-content:center}.vm-calendar-header-right__next,.vm-calendar-header-right__prev{cursor:pointer;transition:opacity .2s ease-in-out}.vm-calendar-header-right__next:hover,.vm-calendar-header-right__prev:hover{opacity:.8}.vm-calendar-header-right__prev{-webkit-transform:rotate(90deg);transform:rotate(90deg)}.vm-calendar-header-right__next{-webkit-transform:rotate(-90deg);transform:rotate(-90deg)}.vm-calendar-body{grid-gap:2px;display:grid;gap:2px;grid-template-columns:repeat(7,32px);grid-template-rows:repeat(6,32px)}.vm-calendar-body,.vm-calendar-body-cell{align-items:center;justify-content:center}.vm-calendar-body-cell{border-radius:50%;display:flex;height:100%;text-align:center}.vm-calendar-body-cell_weekday{color:hsla(0,6%,6%,.6)}.vm-calendar-body-cell_day{cursor:pointer;transition:color .2s ease,background-color .3s ease-in-out}.vm-calendar-body-cell_day:hover{background-color:hsla(0,6%,6%,.05)}.vm-calendar-body-cell_day_empty{pointer-events:none}.vm-calendar-body-cell_day_active{color:#fff}.vm-calendar-body-cell_day_active,.vm-calendar-body-cell_day_active:hover{background-color:var(--color-primary)}.vm-calendar-body-cell_day_today{border:1px solid var(--color-primary)}.vm-calendar-years{grid-gap:8px;display:grid;gap:8px;grid-template-columns:repeat(3,1fr);overflow:auto}.vm-calendar-years__year{align-items:center;border-radius:8px;cursor:pointer;display:flex;justify-content:center;padding:8px 16px;transition:color .2s ease,background-color .3s ease-in-out}.vm-calendar-years__year:hover{background-color:hsla(0,6%,6%,.05)}.vm-calendar-years__year_selected{color:#fff}.vm-calendar-years__year_selected,.vm-calendar-years__year_selected:hover{background-color:var(--color-primary)}.vm-calendar-time-picker{align-items:center;display:flex;flex-direction:column;justify-content:center}.vm-calendar-time-picker-clock{border:1px solid hsla(0,6%,6%,.15);border-radius:50%;box-shadow:1px 2px 12px hsla(0,6%,6%,.08);box-sizing:initial;height:230px;position:relative;width:230px}.vm-calendar-time-picker-clock:after{background-color:var(--color-primary);border-radius:50%;content:"";height:6px;left:50%;position:absolute;top:50%;-webkit-transform:translate(-50%,-50%);transform:translate(-50%,-50%);width:6px}.vm-calendar-time-picker-clock__arrow{background-color:var(--color-primary);height:107px;left:114px;margin-top:8px;opacity:.8;position:absolute;top:0;-webkit-transform-origin:bottom;transform-origin:bottom;transition:-webkit-transform .2s ease-in-out;transition:transform .2s ease-in-out;transition:transform .2s ease-in-out,-webkit-transform .2s ease-in-out;width:2px;z-index:0}.vm-calendar-time-picker-clock__arrow_offset{height:73px;margin-top:42px;z-index:2}.vm-calendar-time-picker-clock__arrow:after{background-color:var(--color-primary);border-radius:50%;content:"";height:30px;left:50%;position:absolute;top:0;-webkit-transform:translateX(-50%);transform:translateX(-50%);width:30px}.vm-calendar-time-picker-clock__time{align-items:flex-start;cursor:pointer;display:flex;height:115px;justify-content:center;left:100px;padding-top:8px;position:absolute;text-align:center;top:0;-webkit-transform-origin:bottom;transform-origin:bottom;width:30px;z-index:1}.vm-calendar-time-picker-clock__time_hide{display:none}.vm-calendar-time-picker-clock__time_offset{height:73px;margin-top:42px;padding:0;z-index:2}.vm-calendar-time-picker-clock__time:hover span{background-color:hsla(0,6%,6%,.1)}.vm-calendar-time-picker-clock__time span{align-items:center;border-radius:50%;display:grid;justify-content:center;min-height:30px;min-width:30px;position:relative;-webkit-transform-origin:center;transform-origin:center;transition:background-color .3s ease}.vm-calendar-time-picker-fields{align-items:center;display:flex;justify-content:space-between;margin-top:16px}.vm-calendar-time-picker-fields span{margin:0 8px}.vm-calendar-time-picker-fields__input{border:1px solid #d8d8d8;border-radius:4px;font-size:14px;height:32px;padding:2px 8px;text-align:center;width:64px}.vm-calendar-time-picker-fields__input:focus{border-color:var(--color-primary)}.vm-time-selector{display:grid;grid-template-columns:repeat(2,230px);padding:16px 0}.vm-time-selector-left{border-right:1px solid hsla(0,6%,6%,.15);display:flex;flex-direction:column;gap:8px;padding:0 16px}.vm-time-selector-left-inputs{align-items:flex-start;display:grid;flex-grow:1;justify-content:stretch}.vm-time-selector-left-inputs__date{grid-gap:8px;align-items:center;border-bottom:1px solid hsla(0,6%,6%,.15);cursor:pointer;display:grid;gap:8px;grid-template-columns:1fr 14px;justify-content:center;margin-bottom:16px;padding-bottom:8px;transition:color .2s ease-in-out,border-bottom-color .3s ease}.vm-time-selector-left-inputs__date:hover{border-bottom-color:var(--color-primary)}.vm-time-selector-left-inputs__date:hover,.vm-time-selector-left-inputs__date:hover svg{color:var(--color-primary)}.vm-time-selector-left-inputs__date label{color:hsla(0,6%,6%,.6);font-size:10px;grid-column:1/3}.vm-time-selector-left-inputs__date svg{color:hsla(0,6%,6%,.6);transition:color .2s ease-in-out}.vm-time-selector-left__controls{grid-gap:8px;display:grid;gap:8px;grid-template-columns:repeat(2,1fr)}.vm-text-field{display:grid;margin:6px 0;position:relative;width:100%}.vm-text-field_textarea:after{content:attr(data-replicated-value) " ";visibility:hidden;white-space:pre-wrap}.vm-text-field:after,.vm-text-field__input{background-color:transparent;border:1px solid hsla(0,6%,6%,.15);font-size:12px;grid-area:1/1/2/2;line-height:18px;overflow:hidden;padding:8px 16px;width:100%}.vm-text-field__error,.vm-text-field__helper-text,.vm-text-field__label{-webkit-line-clamp:2;line-clamp:2;-webkit-box-orient:vertical;background-color:var(--color-background-block);display:-webkit-box;font-size:10px;left:8px;line-height:10px;max-width:calc(100% - 16px);overflow:hidden;padding:0 3px;pointer-events:none;position:absolute;text-overflow:ellipsis;-webkit-user-select:none;user-select:none;z-index:2}.vm-text-field__label{color:hsla(0,6%,6%,.6);top:-5px}.vm-text-field__error{color:var(--color-error);top:calc(100% - 5px)}.vm-text-field__helper-text{bottom:-5px;color:hsla(0,6%,6%,.6)}.vm-text-field__input{border-radius:4px;display:block;min-height:34px;overflow:hidden;resize:none;transition:border .2s ease}.vm-text-field__input:focus,.vm-text-field__input:hover{border:1px solid var(--color-primary)}.vm-text-field__input_error,.vm-text-field__input_error:focus,.vm-text-field__input_error:hover{border:1px solid var(--color-error)}.vm-text-field__input_icon-start{padding-left:42px}.vm-text-field__input:disabled{background-color:inherit;color:inherit}.vm-text-field__input:disabled:hover{border-color:hsla(0,6%,6%,.4)}.vm-text-field__icon-end,.vm-text-field__icon-start{align-items:center;color:hsla(0,6%,6%,.6);display:flex;height:100%;justify-content:center;left:8px;max-width:15px;position:absolute;top:auto}.vm-text-field__icon-end svg,.vm-text-field__icon-start svg{height:auto;width:100%}.vm-text-field__icon-end{left:auto;right:8px}.vm-modal{align-items:center;background:hsla(0,6%,6%,.55);bottom:0;display:flex;justify-content:center;left:0;position:fixed;right:0;top:0;z-index:100}.vm-modal-content{background:#fff;border-radius:4px;box-shadow:0 0 24px hsla(0,6%,6%,.07);padding:22px}.vm-modal-content-header{align-items:center;display:grid;grid-template-columns:1fr auto;margin-bottom:22px}.vm-modal-content-header__title{font-size:14px;font-weight:700}.vm-modal-content-header__close{align-items:center;box-sizing:initial;color:#fff;cursor:pointer;display:flex;justify-content:center;padding:10px;width:24px}.vm-modal-content-header__close svg{height:auto;width:100%}.vm-server-configurator{grid-gap:16px;align-items:center;display:grid;gap:16px;width:600px}.vm-server-configurator__footer{align-items:center;display:inline-grid;gap:8px;grid-template-columns:repeat(2,1fr);justify-content:flex-end;margin-left:auto;margin-right:0}.vm-shortcuts{min-width:400px}.vm-shortcuts-section{margin-bottom:24px}.vm-shortcuts-section__title{border-bottom:1px solid hsla(0,6%,6%,.15);font-weight:700;margin-bottom:16px;padding:8px 0}.vm-shortcuts-section-list{grid-gap:16px;display:grid;gap:16px}.vm-shortcuts-section-list-item{grid-gap:8px;align-items:center;display:grid;gap:8px;grid-template-columns:180px 1fr}.vm-shortcuts-section-list-item__key{align-items:center;display:flex;gap:4px}.vm-shortcuts-section-list-item__key code{background-color:#fff;background-repeat:repeat-x;border:1px solid hsla(0,6%,6%,.15);border-radius:4px;color:#110f0f;display:inline-block;font-size:10px;line-height:2;padding:2px 8px 0;text-align:center}.vm-shortcuts-section-list-item__description{font-size:12px}.vm-header{align-items:center;display:flex;gap:48px;justify-content:flex-start;padding:8px 24px}.vm-header_app{padding:8px 0}.vm-header-logo{align-items:center;display:grid;justify-content:center}.vm-header-logo__icon{align-items:center;cursor:pointer;display:flex;margin-bottom:2px;position:relative;width:100%}.vm-header-logo__issue{color:inherit;cursor:pointer;font-size:10px;opacity:.4;text-align:center;text-decoration:underline;transition:opacity .2s;white-space:nowrap}.vm-header-logo__issue:hover{opacity:.8}.vm-header-nav{font-size:10px;font-weight:600}.vm-header__settings{align-items:center;display:flex;flex-grow:1;gap:8px;justify-content:flex-end}.vm-container{display:flex;flex-direction:column;min-height:calc(100vh - var(--scrollbar-height))}.vm-container-body{background-color:var(--color-background-body);flex-grow:1;min-height:100%;padding:24px}.vm-container-body_app{background-color:transparent;padding:8px 0}.uplot,.uplot *,.uplot :after,.uplot :before{box-sizing:border-box}.uplot{font-family: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;line-height:1.5;width:-webkit-min-content;width:min-content}.u-title{font-size:18px;font-weight:700;text-align:center}.u-wrap{position:relative;-webkit-user-select:none;user-select:none}.u-over,.u-under{position:absolute}.u-under{overflow:hidden}.uplot canvas{display:block;height:100%;position:relative;width:100%}.u-axis{position:absolute}.u-legend{margin:auto;text-align:center}.u-inline{display:block}.u-inline *{display:inline-block}.u-inline tr{margin-right:16px}.u-legend th{font-weight:600}.u-legend th>*{display:inline-block;vertical-align:middle}.u-legend .u-marker{background-clip:padding-box!important;height:1em;margin-right:4px;width:1em}.u-inline.u-live th:after{content:":";vertical-align:middle}.u-inline:not(.u-live) .u-value{display:none}.u-series>*{padding:4px}.u-series th{cursor:pointer}.u-legend .u-off>*{opacity:.3}.u-select{background:rgba(0,0,0,.07)}.u-cursor-x,.u-cursor-y,.u-select{pointer-events:none;position:absolute}.u-cursor-x,.u-cursor-y{left:0;top:0;will-change:transform;z-index:100}.u-hz .u-cursor-x,.u-vt .u-cursor-y{border-right:1px dashed #607d8b;height:100%}.u-hz .u-cursor-y,.u-vt .u-cursor-x{border-bottom:1px dashed #607d8b;width:100%}.u-cursor-pt{background-clip:padding-box!important;border:0 solid;border-radius:50%;left:0;pointer-events:none;position:absolute;top:0;will-change:transform;z-index:100}.u-axis.u-off,.u-cursor-pt.u-off,.u-cursor-x.u-off,.u-cursor-y.u-off,.u-select.u-off{display:none}.vm-line-chart{height:500px;pointer-events:auto}.vm-line-chart_panning{pointer-events:none}.vm-line-chart__u-plot{position:relative}.vm-chart-tooltip{grid-gap:16px;word-wrap:break-word;background:rgba(97,97,97,.92);border-radius:8px;color:#fff;display:grid;font-family:JetBrains Mono,monospace;font-size:10px;font-weight:400;gap:16px;line-height:150%;padding:8px;pointer-events:none;position:absolute;-webkit-user-select:text;user-select:text;width:300px;z-index:98}.vm-chart-tooltip_sticky{background-color:#616161;pointer-events:auto;z-index:99}.vm-chart-tooltip_moved{margin-left:-246.5px;margin-top:-20.5px;position:fixed}.vm-chart-tooltip-header{grid-gap:8px;align-items:center;display:grid;gap:8px;grid-template-columns:1fr 25px 25px;justify-content:center;min-height:25px}.vm-chart-tooltip-header__close{color:#fff}.vm-chart-tooltip-header__drag{color:#fff;cursor:move}.vm-chart-tooltip-data{align-items:center;display:flex;flex-wrap:wrap}.vm-chart-tooltip-data__value{font-weight:700;padding:4px}.vm-chart-tooltip-data__marker{height:12px;margin-right:8px;width:12px}.vm-chart-tooltip-info{grid-gap:4px;display:grid}.vm-legend-item{grid-gap:8px;align-items:start;background-color:var(--color-background-block);cursor:pointer;display:grid;grid-template-columns:auto auto;justify-content:start;padding:8px 48px 8px 8px;transition:.2s ease}.vm-legend-item:hover{background-color:rgba(0,0,0,.1)}.vm-legend-item_hide{opacity:.5;text-decoration:line-through}.vm-legend-item__marker{border-radius:2px;box-sizing:border-box;height:14px;transition:.2s ease;width:14px}.vm-legend-item-info{font-weight:400}.vm-legend-item-info__free-fields{cursor:pointer;padding:3px}.vm-legend-item-info__free-fields:hover{text-decoration:underline}.vm-legend-item-info__free-fields:not(:last-child):after{content:","}.vm-legend{cursor:default;display:flex;flex-wrap:wrap;margin-top:24px;position:relative}.vm-legend-group{margin:0 16px 16px 0;min-width:23%}.vm-legend-group-title{align-items:center;border-bottom:1px solid hsla(0,6%,6%,.15);display:flex;margin-bottom:1px;padding:0 8px 8px}.vm-legend-group-title__count{font-weight:700;margin-right:8px}.vm-graph-view{width:100%}.vm-graph-view_full-width{width:calc(100vw - 96px - var(--scrollbar-width))}.vm-query-editor-autocomplete{max-height:300px;overflow:auto}.vm-additional-settings{align-items:center;display:inline-flex;flex-wrap:wrap;gap:24px;justify-content:flex-start}.vm-additional-settings__input{flex-basis:160px;margin-bottom:-6px}.vm-switch{align-items:center;cursor:pointer;display:flex;justify-content:flex-start}.vm-switch_disabled{cursor:default;opacity:.6}.vm-switch_secondary_active .vm-switch-track{background-color:var(--color-secondary)}.vm-switch_primary_active .vm-switch-track{background-color:var(--color-primary)}.vm-switch_active .vm-switch-track__thumb{left:20px}.vm-switch:hover .vm-switch-track{opacity:.8}.vm-switch-track{align-items:center;background-color:hsla(0,6%,6%,.4);border-radius:17px;display:flex;height:17px;justify-content:flex-start;padding:3px;position:relative;transition:background-color .2s ease,opacity .3s ease-out;width:34px}.vm-switch-track__thumb{background-color:var(--color-background-block);border-radius:50%;left:3px;min-height:11px;min-width:11px;position:absolute;top:auto;-webkit-transform-style:preserve-3d;transform-style:preserve-3d;transition:right .2s ease-out,left .2s ease-out}.vm-switch__label{color:inherit;font-size:inherit;margin-left:8px;transition:color .2s ease;white-space:nowrap}.vm-query-configurator{grid-gap:8px;display:grid;gap:8px}.vm-query-configurator-list{display:grid}.vm-query-configurator-list-row{grid-gap:8px;align-items:center;display:grid;gap:8px;grid-template-columns:1fr auto auto}.vm-query-configurator-list-row_disabled{-webkit-filter:grayscale(100%);filter:grayscale(100%);opacity:.5}.vm-query-configurator-list-row__button{display:grid;min-height:36px;width:36px}.vm-query-configurator-settings{align-items:flex-end;display:flex;gap:24px;justify-content:space-between}.vm-query-configurator-settings__buttons{grid-gap:8px;display:grid;gap:8px;grid-template-columns:repeat(2,auto)}.vm-json-view__copy{display:flex;justify-content:flex-end;position:-webkit-sticky;position:sticky;top:24px;z-index:2}.vm-json-view__code{font-size:12px;line-height:1.4;-webkit-transform:translateY(-32px);transform:translateY(-32px)}.vm-axes-limits{max-width:300px}.vm-axes-limits,.vm-axes-limits-list{grid-gap:16px;align-items:center;display:grid;gap:16px}.vm-axes-limits-list__inputs{grid-gap:8px;display:grid;gap:8px;grid-template-columns:repeat(2,120px)}.vm-graph-settings-popper{grid-gap:16px;display:grid;gap:16px;padding:0 0 16px}.vm-graph-settings-popper__body{grid-gap:8px;display:grid;gap:8px;padding:0 16px}.vm-spinner{align-items:center;-webkit-animation:vm-fade 2s cubic-bezier(.28,.84,.42,1.1);animation:vm-fade 2s cubic-bezier(.28,.84,.42,1.1);background-color:hsla(0,0%,100%,.5);bottom:0;display:flex;flex-direction:column;justify-content:center;left:0;pointer-events:none;position:fixed;right:0;top:0;z-index:99}.vm-spinner__message{color:hsla(0,6%,6%,.9);font-size:14px;line-height:1.3;margin-top:24px;text-align:center;white-space:pre-line}.half-circle-spinner,.half-circle-spinner *{box-sizing:border-box}.half-circle-spinner{border-radius:100%;height:60px;position:relative;width:60px}.half-circle-spinner .circle{border:6px solid transparent;border-radius:100%;content:"";height:100%;position:absolute;width:100%}.half-circle-spinner .circle.circle-1{-webkit-animation:half-circle-spinner-animation 1s infinite;animation:half-circle-spinner-animation 1s infinite;border-top-color:var(--color-primary)}.half-circle-spinner .circle.circle-2{-webkit-animation:half-circle-spinner-animation 1s infinite alternate;animation:half-circle-spinner-animation 1s infinite alternate;border-bottom-color:var(--color-primary)}@-webkit-keyframes half-circle-spinner-animation{0%{-webkit-transform:rotate(0deg);transform:rotate(0deg)}to{-webkit-transform:rotate(1turn);transform:rotate(1turn)}}@keyframes half-circle-spinner-animation{0%{-webkit-transform:rotate(0deg);transform:rotate(0deg)}to{-webkit-transform:rotate(1turn);transform:rotate(1turn)}}@-webkit-keyframes vm-fade{0%{opacity:0}to{opacity:1}}@keyframes vm-fade{0%{opacity:0}to{opacity:1}}.vm-tracings-view{grid-gap:24px;display:grid;gap:24px}.vm-tracings-view-trace-header{align-items:center;border-bottom:1px solid hsla(0,6%,6%,.15);display:flex;justify-content:space-between;padding:8px 8px 8px 24px}.vm-tracings-view-trace-header-title{flex-grow:1;font-size:14px;margin-right:8px}.vm-tracings-view-trace-header-title__query{font-weight:700}.vm-tracings-view-trace__nav{padding:24px 24px 24px 0}.vm-line-progress{grid-gap:8px;align-items:center;color:hsla(0,6%,6%,.6);display:grid;gap:8px;grid-template-columns:1fr auto;justify-content:center}.vm-line-progress-track{background-color:hsla(0,6%,6%,.05);border-radius:4px;height:20px;width:100%}.vm-line-progress-track__thumb{background-color:#1a90ff;border-radius:4px;height:100%}.vm-nested-nav{background-color:rgba(201,227,246,.4);border-radius:4px;margin-left:24px}.vm-nested-nav-header{grid-gap:8px;border-radius:4px;cursor:pointer;display:grid;gap:8px;grid-template-columns:auto 1fr;padding:8px;transition:background-color .2s ease-in-out}.vm-nested-nav-header:hover{background-color:hsla(0,6%,6%,.06)}.vm-nested-nav-header__icon{align-items:center;display:flex;justify-content:center;transition:-webkit-transform .2s ease-in-out;transition:transform .2s ease-in-out;transition:transform .2s ease-in-out,-webkit-transform .2s ease-in-out;width:20px}.vm-nested-nav-header__icon_open{-webkit-transform:rotate(180deg);transform:rotate(180deg)}.vm-nested-nav-header__message,.vm-nested-nav-header__progress{grid-column:2}.vm-nested-nav-header__duration{color:hsla(0,6%,6%,.6);grid-column:2}.vm-json-form{grid-gap:16px;display:grid;gap:16px;grid-template-rows:auto calc(90vh - 150px) auto;max-height:900px;max-width:1000px;width:70vw}.vm-json-form_one-field{grid-template-rows:calc(90vh - 150px) auto}.vm-json-form textarea{height:100%;overflow:auto;width:100%}.vm-json-form-footer{align-items:center;display:flex;gap:8px;justify-content:space-between}.vm-json-form-footer__controls{align-items:center;display:flex;flex-grow:1;gap:8px;justify-content:flex-start}.vm-json-form-footer__controls_right{display:grid;grid-template-columns:repeat(2,90px);justify-content:flex-end}.vm-table-settings-popper{display:grid}.vm-table-settings-popper-list{grid-gap:8px;display:grid;gap:8px;max-height:350px;overflow:auto;padding:16px 16px 24px}.vm-table-settings-popper-list__item{font-size:12px;text-transform:capitalize}.vm-table-settings-popper__footer{align-items:center;display:inline-grid;gap:8px;grid-template-columns:1fr 1fr;justify-content:center;min-width:200px;padding:0 16px 16px}.vm-checkbox{align-items:center;cursor:pointer;display:flex;justify-content:flex-start;-webkit-user-select:none;user-select:none}.vm-checkbox_disabled{cursor:default;opacity:.6}.vm-checkbox_secondary_active .vm-checkbox-track{background-color:var(--color-secondary)}.vm-checkbox_secondary .vm-checkbox-track{border:1px solid var(--color-secondary)}.vm-checkbox_primary_active .vm-checkbox-track{background-color:var(--color-primary)}.vm-checkbox_primary .vm-checkbox-track{border:1px solid var(--color-primary)}.vm-checkbox_active .vm-checkbox-track__thumb{-webkit-transform:scale(1);transform:scale(1)}.vm-checkbox:hover .vm-checkbox-track{opacity:.8}.vm-checkbox-track{align-items:center;background-color:transparent;border-radius:4px;display:flex;height:16px;justify-content:center;padding:2px;position:relative;transition:background-color .2s ease,opacity .3s ease-out;width:16px}.vm-checkbox-track__thumb{align-items:center;color:#fff;display:grid;height:12px;justify-content:center;-webkit-transform:scale(0);transform:scale(0);transition:-webkit-transform .1s ease-in-out;transition:transform .1s ease-in-out;transition:transform .1s ease-in-out,-webkit-transform .1s ease-in-out;width:12px}.vm-checkbox-track__thumb svg{width:100%}.vm-checkbox__label{color:inherit;font-size:inherit;margin-left:8px;transition:color .2s ease;white-space:nowrap}.vm-custom-panel{grid-gap:24px;align-items:flex-start;display:grid;gap:24px;height:100%}.vm-custom-panel-body{position:relative}.vm-custom-panel-body-header{display:flex;font-size:10px;justify-content:space-between;margin:-24px -24px 24px;padding:0 24px;position:relative;z-index:1}.vm-custom-panel-body-header,.vm-predefined-panel-header{align-items:center;border-bottom:1px solid hsla(0,6%,6%,.15)}.vm-predefined-panel-header{grid-gap:8px;display:grid;gap:8px;grid-template-columns:auto 1fr 160px auto;justify-content:flex-start;padding:8px 16px}.vm-predefined-panel-header__description{line-height:1.3;white-space:pre-wrap}.vm-predefined-panel-header__description ol,.vm-predefined-panel-header__description ul{list-style-position:inside}.vm-predefined-panel-header__description a{color:#c9e3f6;text-decoration:underline}.vm-predefined-panel-header__info{align-items:center;color:var(--color-primary);display:flex;justify-content:center;width:18px}.vm-predefined-panel-body{padding:8px 16px}.vm-accordion-header{align-items:center;cursor:pointer;display:grid;font-size:inherit;position:relative}.vm-accordion-header__arrow{align-items:center;display:flex;justify-content:center;position:absolute;right:14px;top:auto;-webkit-transform:rotate(0);transform:rotate(0);transition:-webkit-transform .2s ease-in-out;transition:transform .2s ease-in-out;transition:transform .2s ease-in-out,-webkit-transform .2s ease-in-out}.vm-accordion-header__arrow_open{-webkit-transform:rotate(180deg);transform:rotate(180deg)}.vm-accordion-header__arrow svg{height:auto;width:14px}.accordion-section{overflow:hidden}.vm-predefined-dashboard{background-color:transparent}.vm-predefined-dashboard-header{align-items:center;border-radius:4px;box-shadow:1px 2px 12px hsla(0,6%,6%,.08);display:grid;font-weight:700;grid-template-columns:1fr auto;justify-content:space-between;line-height:14px;overflow:hidden;padding:16px;position:relative;-webkit-transform-style:preserve-3d;transform-style:preserve-3d;transition:box-shadow .2s ease-in-out}.vm-predefined-dashboard-header_open{border-radius:4px 4px 0 0;box-shadow:none}.vm-predefined-dashboard-header__title{font-size:12px}.vm-predefined-dashboard-header__count{font-size:10px;grid-column:2;margin-right:30px}.vm-predefined-dashboard-panels{grid-gap:16px;display:grid;gap:16px;grid-template-columns:repeat(12,1fr);padding:0}.vm-predefined-dashboard-panels-panel{border-radius:8px;overflow:hidden;position:relative}.vm-predefined-dashboard-panels-panel:hover .vm-predefined-dashboard-panels-panel__resizer{-webkit-transform:scale(1);transform:scale(1)}.vm-predefined-dashboard-panels-panel__resizer{bottom:0;cursor:se-resize;height:20px;position:absolute;right:0;-webkit-transform:scale(0);transform:scale(0);transition:-webkit-transform .2s ease-in-out;transition:transform .2s ease-in-out;transition:transform .2s ease-in-out,-webkit-transform .2s ease-in-out;width:20px;z-index:1}.vm-predefined-dashboard-panels-panel__resizer:after{border-bottom:2px solid hsla(0,6%,6%,.2);border-right:2px solid hsla(0,6%,6%,.2);bottom:5px;content:"";height:5px;position:absolute;right:5px;width:5px}.vm-predefined-dashboard-panels-panel__alert{grid-column:span 12}.vm-predefined-panels{grid-gap:16px;align-items:flex-start;display:grid;gap:16px}.vm-predefined-panels-tabs{align-items:center;display:flex;font-size:10px;justify-content:flex-start;overflow:hidden}.vm-predefined-panels-tabs__tab{border-right:1px solid hsla(0,6%,6%,.15);cursor:pointer;padding:16px;text-transform:uppercase;transition:opacity .2s ease-in-out,color .15s ease-in}.vm-predefined-panels-tabs__tab:hover{opacity:1}.vm-predefined-panels__dashboards{grid-gap:16px;display:grid;gap:16px}.vm-cardinality-configurator{grid-gap:8px;display:grid;gap:8px}.vm-cardinality-configurator-controls{align-items:center;display:flex;flex-wrap:wrap;gap:0 24px;justify-content:flex-start}.vm-cardinality-configurator-controls__query{flex-grow:1}.vm-cardinality-configurator-bottom{grid-gap:24px;align-items:flex-end;display:grid;gap:24px;grid-template-columns:1fr auto}.vm-cardinality-configurator-bottom__info{font-size:12px}.u-legend{color:#110f0f;font-family:Lato,sans-serif;font-size:14px}.u-legend .u-thead{display:none}.u-legend .u-series{display:flex;gap:8px}.u-legend .u-series th{display:none}.u-legend .u-series td:nth-child(2):after{content:":";margin-left:8px}.u-legend .u-series .u-value{display:block;padding:0;text-align:left}.vm-metrics-content-header{margin:-24px -24px 24px}.vm-cardinality-panel{grid-gap:24px;align-items:flex-start;display:grid;gap:24px}.vm-top-queries-panel-header{margin:-24px -24px 24px}.vm-top-queries{grid-gap:24px;align-items:flex-start;display:grid;gap:24px}.vm-top-queries-controls{grid-gap:8px;display:grid;gap:8px}.vm-top-queries-controls-bottom,.vm-top-queries-controls__fields{grid-gap:24px;display:grid;gap:24px;grid-template-columns:1fr auto}.vm-top-queries-controls-bottom{align-items:flex-end;justify-content:space-between}.vm-top-queries-controls-bottom__button{align-items:center;display:flex;justify-content:flex-end}.vm-top-queries-panels{grid-gap:24px;display:grid;gap:24px}.vm-trace-page{display:flex;flex-direction:column;min-height:100%;padding:16px}.vm-trace-page-controls{grid-gap:16px;align-items:center;display:grid;gap:16px;grid-template-columns:1fr 1fr;justify-content:center}.vm-trace-page-header{grid-gap:16px;align-items:start;display:grid;gap:16px;grid-template-columns:1fr auto;margin-bottom:24px}.vm-trace-page-header-errors{grid-gap:24px;align-items:flex-start;display:grid;gap:24px;grid-template-columns:1fr;justify-content:stretch}.vm-trace-page-header-errors-item{align-items:center;display:grid;justify-content:stretch;position:relative}.vm-trace-page-header-errors-item__filename{min-height:20px}.vm-trace-page-header-errors-item__close{position:absolute;right:8px;top:auto;z-index:2}.vm-trace-page-preview{align-items:center;display:flex;flex-direction:column;flex-grow:1;justify-content:center}.vm-trace-page-preview__text{font-size:14px;line-height:1.8;margin-bottom:8px;text-align:center;white-space:pre-line}#root,body,html{background-attachment:fixed;background-repeat:no-repeat;color:#110f0f;cursor:default;font-family:Lato,sans-serif;font-size:12px;margin:0;min-height:100%}body{overflow:scroll}*{cursor:inherit;font:inherit}code{font-family:JetBrains Mono,monospace}b{font-weight:700}input,textarea{cursor:text}input[type=number]::-webkit-inner-spin-button,input[type=number]::-webkit-outer-spin-button{-webkit-appearance:none;margin:0}.vm-snackbar{bottom:16px;left:16px;position:fixed;z-index:999}a,abbr,acronym,address,applet,article,aside,audio,big,body,canvas,caption,center,cite,code,del,details,dfn,div,em,embed,fieldset,figcaption,figure,footer,form,h1,h2,h3,h4,h5,h6,header,hgroup,html,iframe,img,ins,kbd,label,legend,li,mark,menu,nav,object,ol,output,p,pre,q,ruby,s,samp,section,small,span,strike,strong,sub,summary,sup,table,tbody,td,tfoot,th,thead,time,tr,tt,u,ul,var,video{border:0;margin:0;padding:0;vertical-align:initial}h1,h2,h3,h4,h5,h6{font-weight:400}article,aside,details,figcaption,figure,footer,header,hgroup,menu,nav,section{display:block}body{line-height:1}q:after,q:before{content:""}table{border-collapse:collapse;border-spacing:0}input::-webkit-input-placeholder{opacity:1;-webkit-transition:opacity .3s ease;transition:opacity .3s ease}input::placeholder{opacity:1;transition:opacity .3s ease}input:focus::-webkit-input-placeholder{opacity:0;-webkit-transition:opacity .3s ease;transition:opacity .3s ease}input:focus::placeholder{opacity:0;transition:opacity .3s ease}*{box-sizing:border-box;outline:none}button{background:none;border:none;border-radius:0;padding:0}strong{letter-spacing:1px}input[type=file]{cursor:pointer;font-size:0;height:100%;left:0;opacity:0;position:absolute;top:0;width:100%}input[type=file]:disabled{cursor:not-allowed}a{color:inherit;text-decoration:inherit}input,textarea{-webkit-text-fill-color:inherit;appearance:none;-webkit-appearance:none}input:disabled,textarea:disabled{opacity:1!important}input:placeholder-shown,textarea:placeholder-shown{width:100%}input:-webkit-autofill,input:-webkit-autofill:active,input:-webkit-autofill:focus,input:-webkit-autofill:hover{-webkit-box-shadow:inset 0 0 0 0 #fff!important;width:100%;z-index:2}.vm-header-button{border:1px solid hsla(0,6%,6%,.2)}.vm-list__item{background-color:transparent;cursor:pointer;padding:12px 16px;transition:background-color .2s ease}.vm-list__item:hover,.vm-list__item_active{background-color:hsla(0,6%,6%,.1)}.vm-popper-header{grid-gap:8px;align-items:center;background-color:#3f51b5;background-color:var(--color-primary);border-radius:4px 4px 0 0;color:#fff;display:grid;gap:8px;grid-template-columns:1fr auto;justify-content:space-between;padding:8px 8px 8px 16px}.vm-popper-header__title{font-weight:700}.vm-block{background-color:#fff;background-color:var(--color-background-block);border-radius:8px;box-shadow:1px 2px 12px hsla(0,6%,6%,.08);padding:24px}.vm-block_empty-padding{padding:0}.vm-section-header{align-items:center;border-bottom:1px solid hsla(0,6%,6%,.15);border-radius:8px 8px 0 0;display:grid;grid-template-columns:1fr auto;justify-content:center;padding:0 24px}.vm-section-header__title{font-size:12px;font-weight:700}.vm-section-header__tabs{align-items:center;display:flex;font-size:10px;justify-content:flex-start}.vm-table{border-collapse:initial;border-spacing:0;margin-top:-24px;width:100%}.vm-table,.vm-table__row{background-color:#fff;background-color:var(--color-background-block)}.vm-table__row{transition:background-color .2s ease}.vm-table__row:hover:not(.vm-table__row_header){background-color:hsla(0,6%,6%,.05)}.vm-table__row_header{position:-webkit-sticky;position:sticky;top:0;z-index:2}.vm-table__row_selected{background-color:rgba(26,144,255,.05)}.vm-table-cell{border-bottom:1px solid hsla(0,6%,6%,.15);height:40px;padding:8px;vertical-align:middle}.vm-table-cell__content{align-items:center;display:flex;justify-content:flex-start}.vm-table-cell_sort{cursor:pointer}.vm-table-cell_sort:hover{background-color:hsla(0,6%,6%,.05)}.vm-table-cell_header{font-weight:700;text-align:left;text-transform:capitalize}.vm-table-cell_gray{color:hsla(0,6%,6%,.4)}.vm-table-cell_right{text-align:right}.vm-table-cell_right .vm-table-cell__content{justify-content:flex-end}.vm-table-cell_no-wrap{white-space:nowrap}.vm-table__sort-icon{align-items:center;display:flex;justify-content:center;margin:0 8px;opacity:.4;transition:opacity .2s ease,-webkit-transform .2s ease-in-out;transition:opacity .2s ease,transform .2s ease-in-out;transition:opacity .2s ease,transform .2s ease-in-out,-webkit-transform .2s ease-in-out;width:15px}.vm-table__sort-icon_active{opacity:1}.vm-table__sort-icon_desc{-webkit-transform:rotate(180deg);transform:rotate(180deg)}:root{--color-primary:#3f51b5;--color-secondary:#e91e63;--color-error:#fd080e;--color-warning:#ff8308;--color-info:#03a9f4;--color-success:#4caf50;--color-primary-text:#fff;--color-secondary-text:#fff;--color-error-text:#fff;--color-warning-text:#fff;--color-info-text:#fff;--color-success-text:#fff;--color-background-body:#fefeff;--color-background-block:#fff} \ No newline at end of file diff --git a/app/vmselect/vmui/static/js/main.a09b3097.js b/app/vmselect/vmui/static/js/main.a09b3097.js new file mode 100644 index 000000000..9b8792a25 --- /dev/null +++ b/app/vmselect/vmui/static/js/main.a09b3097.js @@ -0,0 +1,2 @@ +/*! For license information please see main.a09b3097.js.LICENSE.txt */ +!function(){var e={680:function(e,t,n){"use strict";var r=n(476),i=n(962),o=i(r("String.prototype.indexOf"));e.exports=function(e,t){var n=r(e,!!t);return"function"===typeof n&&o(e,".prototype.")>-1?i(n):n}},962:function(e,t,n){"use strict";var r=n(199),i=n(476),o=i("%Function.prototype.apply%"),a=i("%Function.prototype.call%"),u=i("%Reflect.apply%",!0)||r.call(a,o),l=i("%Object.getOwnPropertyDescriptor%",!0),c=i("%Object.defineProperty%",!0),s=i("%Math.max%");if(c)try{c({},"a",{value:1})}catch(d){c=null}e.exports=function(e){var t=u(r,a,arguments);if(l&&c){var n=l(t,"length");n.configurable&&c(t,"length",{value:1+s(0,e.length-(arguments.length-1))})}return t};var f=function(){return u(r,o,arguments)};c?c(e.exports,"apply",{value:f}):e.exports.apply=f},123:function(e,t){var n;!function(){"use strict";var r={}.hasOwnProperty;function i(){for(var e=[],t=0;t=t?e:""+Array(t+1-r.length).join(n)+e},g={s:y,z:function(e){var t=-e.utcOffset(),n=Math.abs(t),r=Math.floor(n/60),i=n%60;return(t<=0?"+":"-")+y(r,2,"0")+":"+y(i,2,"0")},m:function e(t,n){if(t.date()1)return e(a[0])}else{var u=t.name;b[u]=t,i=u}return!r&&i&&(_=i),i||!r&&_},x=function(e,t){if(D(e))return e.clone();var n="object"==typeof t?t:{};return n.date=e,n.args=arguments,new C(n)},k=g;k.l=w,k.i=D,k.w=function(e,t){return x(e,{locale:t.$L,utc:t.$u,x:t.$x,$offset:t.$offset})};var C=function(){function m(e){this.$L=w(e.locale,null,!0),this.parse(e)}var y=m.prototype;return y.parse=function(e){this.$d=function(e){var t=e.date,n=e.utc;if(null===t)return new Date(NaN);if(k.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 i=r[2]-1||0,o=(r[7]||"0").substring(0,3);return n?new Date(Date.UTC(r[1],i,r[3]||1,r[4]||0,r[5]||0,r[6]||0,o)):new Date(r[1],i,r[3]||1,r[4]||0,r[5]||0,r[6]||0,o)}}return new Date(t)}(e),this.$x=e.x||{},this.init()},y.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()},y.$utils=function(){return k},y.isValid=function(){return!(this.$d.toString()===h)},y.isSame=function(e,t){var n=x(e);return this.startOf(t)<=n&&n<=this.endOf(t)},y.isAfter=function(e,t){return x(e)1&&"boolean"!==typeof t)throw new a('"allowMissing" argument must be a boolean');if(null===k(/^%?[^%]*%?$/,e))throw new i("`%` may not be present anywhere but at the beginning and end of the intrinsic name");var n=S(e),r=n.length>0?n[0]:"",o=A("%"+r+"%",t),u=o.name,c=o.value,s=!1,f=o.alias;f&&(r=f[0],D(n,b([0,1],f)));for(var d=1,h=!0;d=n.length){var g=l(c,p);c=(h=!!g)&&"get"in g&&!("originalValue"in g.get)?g.get:c[p]}else h=_(c,p),c=c[p];h&&!s&&(v[u]=c)}}return c}},520:function(e,t,n){"use strict";var r="undefined"!==typeof Symbol&&Symbol,i=n(541);e.exports=function(){return"function"===typeof r&&("function"===typeof Symbol&&("symbol"===typeof r("foo")&&("symbol"===typeof Symbol("bar")&&i())))}},541:function(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 i=Object.getOwnPropertyDescriptor(e,t);if(42!==i.value||!0!==i.enumerable)return!1}return!0}},838:function(e,t,n){"use strict";var r=n(199);e.exports=r.call(Function.call,Object.prototype.hasOwnProperty)},936:function(e,t,n){var r=/^\s+|\s+$/g,i=/^[-+]0x[0-9a-f]+$/i,o=/^0b[01]+$/i,a=/^0o[0-7]+$/i,u=parseInt,l="object"==typeof n.g&&n.g&&n.g.Object===Object&&n.g,c="object"==typeof self&&self&&self.Object===Object&&self,s=l||c||Function("return this")(),f=Object.prototype.toString,d=Math.max,h=Math.min,p=function(){return s.Date.now()};function v(e){var t=typeof e;return!!e&&("object"==t||"function"==t)}function m(e){if("number"==typeof e)return e;if(function(e){return"symbol"==typeof e||function(e){return!!e&&"object"==typeof e}(e)&&"[object Symbol]"==f.call(e)}(e))return NaN;if(v(e)){var t="function"==typeof e.valueOf?e.valueOf():e;e=v(t)?t+"":t}if("string"!=typeof e)return 0===e?e:+e;e=e.replace(r,"");var n=o.test(e);return n||a.test(e)?u(e.slice(2),n?2:8):i.test(e)?NaN:+e}e.exports=function(e,t,n){var r,i,o,a,u,l,c=0,s=!1,f=!1,y=!0;if("function"!=typeof e)throw new TypeError("Expected a function");function g(t){var n=r,o=i;return r=i=void 0,c=t,a=e.apply(o,n)}function _(e){return c=e,u=setTimeout(D,t),s?g(e):a}function b(e){var n=e-l;return void 0===l||n>=t||n<0||f&&e-c>=o}function D(){var e=p();if(b(e))return w(e);u=setTimeout(D,function(e){var n=t-(e-l);return f?h(n,o-(e-c)):n}(e))}function w(e){return u=void 0,y&&r?g(e):(r=i=void 0,a)}function x(){var e=p(),n=b(e);if(r=arguments,i=this,l=e,n){if(void 0===u)return _(l);if(f)return u=setTimeout(D,t),g(l)}return void 0===u&&(u=setTimeout(D,t)),a}return t=m(t)||0,v(n)&&(s=!!n.leading,o=(f="maxWait"in n)?d(m(n.maxWait)||0,t):o,y="trailing"in n?!!n.trailing:y),x.cancel=function(){void 0!==u&&clearTimeout(u),c=0,r=l=i=u=void 0},x.flush=function(){return void 0===u?a:w(p())},x}},7:function(e,t,n){var r="__lodash_hash_undefined__",i="[object Function]",o="[object GeneratorFunction]",a=/\.|\[(?:[^[\]]*|(["'])(?:(?!\1)[^\\]|\\.)*?\1)\]/,u=/^\w*$/,l=/^\./,c=/[^.[\]]+|\[(?:(-?\d+(?:\.\d+)?)|(["'])((?:(?!\2)[^\\]|\\.)*?)\2)\]|(?=(?:\.|\[\])(?:\.|\[\]|$))/g,s=/\\(\\)?/g,f=/^\[object .+?Constructor\]$/,d="object"==typeof n.g&&n.g&&n.g.Object===Object&&n.g,h="object"==typeof self&&self&&self.Object===Object&&self,p=d||h||Function("return this")();var v=Array.prototype,m=Function.prototype,y=Object.prototype,g=p["__core-js_shared__"],_=function(){var e=/[^.]+$/.exec(g&&g.keys&&g.keys.IE_PROTO||"");return e?"Symbol(src)_1."+e:""}(),b=m.toString,D=y.hasOwnProperty,w=y.toString,x=RegExp("^"+b.call(D).replace(/[\\^$.*+?()[\]{}|]/g,"\\$&").replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g,"$1.*?")+"$"),k=p.Symbol,C=v.splice,E=I(p,"Map"),S=I(Object,"create"),A=k?k.prototype:void 0,F=A?A.toString:void 0;function N(e){var t=-1,n=e?e.length:0;for(this.clear();++t-1},O.prototype.set=function(e,t){var n=this.__data__,r=B(n,e);return r<0?n.push([e,t]):n[r][1]=t,this},T.prototype.clear=function(){this.__data__={hash:new N,map:new(E||O),string:new N}},T.prototype.delete=function(e){return P(this,e).delete(e)},T.prototype.get=function(e){return P(this,e).get(e)},T.prototype.has=function(e){return P(this,e).has(e)},T.prototype.set=function(e,t){return P(this,e).set(e,t),this};var $=j((function(e){var t;e=null==(t=e)?"":function(e){if("string"==typeof e)return e;if(H(e))return F?F.call(e):"";var t=e+"";return"0"==t&&1/e==-1/0?"-0":t}(t);var n=[];return l.test(e)&&n.push(""),e.replace(c,(function(e,t,r,i){n.push(r?i.replace(s,"$1"):t||e)})),n}));function R(e){if("string"==typeof e||H(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 n(){var r=arguments,i=t?t.apply(this,r):r[0],o=n.cache;if(o.has(i))return o.get(i);var a=e.apply(this,r);return n.cache=o.set(i,a),a};return n.cache=new(j.Cache||T),n}j.Cache=T;var z=Array.isArray;function U(e){var t=typeof e;return!!e&&("object"==t||"function"==t)}function H(e){return"symbol"==typeof e||function(e){return!!e&&"object"==typeof e}(e)&&"[object Symbol]"==w.call(e)}e.exports=function(e,t,n){var r=null==e?void 0:M(e,t);return void 0===r?n:r}},61:function(e,t,n){var r="Expected a function",i=/^\s+|\s+$/g,o=/^[-+]0x[0-9a-f]+$/i,a=/^0b[01]+$/i,u=/^0o[0-7]+$/i,l=parseInt,c="object"==typeof n.g&&n.g&&n.g.Object===Object&&n.g,s="object"==typeof self&&self&&self.Object===Object&&self,f=c||s||Function("return this")(),d=Object.prototype.toString,h=Math.max,p=Math.min,v=function(){return f.Date.now()};function m(e,t,n){var i,o,a,u,l,c,s=0,f=!1,d=!1,m=!0;if("function"!=typeof e)throw new TypeError(r);function _(t){var n=i,r=o;return i=o=void 0,s=t,u=e.apply(r,n)}function b(e){return s=e,l=setTimeout(w,t),f?_(e):u}function D(e){var n=e-c;return void 0===c||n>=t||n<0||d&&e-s>=a}function w(){var e=v();if(D(e))return x(e);l=setTimeout(w,function(e){var n=t-(e-c);return d?p(n,a-(e-s)):n}(e))}function x(e){return l=void 0,m&&i?_(e):(i=o=void 0,u)}function k(){var e=v(),n=D(e);if(i=arguments,o=this,c=e,n){if(void 0===l)return b(c);if(d)return l=setTimeout(w,t),_(c)}return void 0===l&&(l=setTimeout(w,t)),u}return t=g(t)||0,y(n)&&(f=!!n.leading,a=(d="maxWait"in n)?h(g(n.maxWait)||0,t):a,m="trailing"in n?!!n.trailing:m),k.cancel=function(){void 0!==l&&clearTimeout(l),s=0,i=c=o=l=void 0},k.flush=function(){return void 0===l?u:x(v())},k}function y(e){var t=typeof e;return!!e&&("object"==t||"function"==t)}function g(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(y(e)){var t="function"==typeof e.valueOf?e.valueOf():e;e=y(t)?t+"":t}if("string"!=typeof e)return 0===e?e:+e;e=e.replace(i,"");var n=a.test(e);return n||u.test(e)?l(e.slice(2),n?2:8):o.test(e)?NaN:+e}e.exports=function(e,t,n){var i=!0,o=!0;if("function"!=typeof e)throw new TypeError(r);return y(n)&&(i="leading"in n?!!n.leading:i,o="trailing"in n?!!n.trailing:o),m(e,t,{leading:i,maxWait:t,trailing:o})}},154:function(e,t,n){var r="function"===typeof Map&&Map.prototype,i=Object.getOwnPropertyDescriptor&&r?Object.getOwnPropertyDescriptor(Map.prototype,"size"):null,o=r&&i&&"function"===typeof i.get?i.get:null,a=r&&Map.prototype.forEach,u="function"===typeof Set&&Set.prototype,l=Object.getOwnPropertyDescriptor&&u?Object.getOwnPropertyDescriptor(Set.prototype,"size"):null,c=u&&l&&"function"===typeof l.get?l.get:null,s=u&&Set.prototype.forEach,f="function"===typeof WeakMap&&WeakMap.prototype?WeakMap.prototype.has:null,d="function"===typeof WeakSet&&WeakSet.prototype?WeakSet.prototype.has:null,h="function"===typeof WeakRef&&WeakRef.prototype?WeakRef.prototype.deref:null,p=Boolean.prototype.valueOf,v=Object.prototype.toString,m=Function.prototype.toString,y=String.prototype.match,g=String.prototype.slice,_=String.prototype.replace,b=String.prototype.toUpperCase,D=String.prototype.toLowerCase,w=RegExp.prototype.test,x=Array.prototype.concat,k=Array.prototype.join,C=Array.prototype.slice,E=Math.floor,S="function"===typeof BigInt?BigInt.prototype.valueOf:null,A=Object.getOwnPropertySymbols,F="function"===typeof Symbol&&"symbol"===typeof Symbol.iterator?Symbol.prototype.toString:null,N="function"===typeof Symbol&&"object"===typeof Symbol.iterator,O="function"===typeof Symbol&&Symbol.toStringTag&&(typeof Symbol.toStringTag===N||"symbol")?Symbol.toStringTag:null,T=Object.prototype.propertyIsEnumerable,B=("function"===typeof Reflect?Reflect.getPrototypeOf:Object.getPrototypeOf)||([].__proto__===Array.prototype?function(e){return e.__proto__}:null);function M(e,t){if(e===1/0||e===-1/0||e!==e||e&&e>-1e3&&e<1e3||w.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 i=String(r),o=g.call(t,i.length+1);return _.call(i,n,"$&_")+"."+_.call(_.call(o,/([0-9]{3})/g,"$&_"),/_$/,"")}}return _.call(t,n,"$&_")}var L=n(654),P=L.custom,I=U(P)?P:null;function $(e,t,n){var r="double"===(n.quoteStyle||t)?'"':"'";return r+e+r}function R(e){return _.call(String(e),/"/g,""")}function j(e){return"[object Array]"===Y(e)&&(!O||!("object"===typeof e&&O in e))}function z(e){return"[object RegExp]"===Y(e)&&(!O||!("object"===typeof e&&O in e))}function U(e){if(N)return e&&"object"===typeof e&&e instanceof Symbol;if("symbol"===typeof e)return!0;if(!e||"object"!==typeof e||!F)return!1;try{return F.call(e),!0}catch(t){}return!1}e.exports=function e(t,n,r,i){var u=n||{};if(V(u,"quoteStyle")&&"single"!==u.quoteStyle&&"double"!==u.quoteStyle)throw new TypeError('option "quoteStyle" must be "single" or "double"');if(V(u,"maxStringLength")&&("number"===typeof u.maxStringLength?u.maxStringLength<0&&u.maxStringLength!==1/0:null!==u.maxStringLength))throw new TypeError('option "maxStringLength", if provided, must be a positive integer, Infinity, or `null`');var l=!V(u,"customInspect")||u.customInspect;if("boolean"!==typeof l&&"symbol"!==l)throw new TypeError("option \"customInspect\", if provided, must be `true`, `false`, or `'symbol'`");if(V(u,"indent")&&null!==u.indent&&"\t"!==u.indent&&!(parseInt(u.indent,10)===u.indent&&u.indent>0))throw new TypeError('option "indent" must be "\\t", an integer > 0, or `null`');if(V(u,"numericSeparator")&&"boolean"!==typeof u.numericSeparator)throw new TypeError('option "numericSeparator", if provided, must be `true` or `false`');var v=u.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,u);if("number"===typeof t){if(0===t)return 1/0/t>0?"0":"-0";var b=String(t);return v?M(t,b):b}if("bigint"===typeof t){var w=String(t)+"n";return v?M(t,w):w}var E="undefined"===typeof u.depth?5:u.depth;if("undefined"===typeof r&&(r=0),r>=E&&E>0&&"object"===typeof t)return j(t)?"[Array]":"[Object]";var A=function(e,t){var n;if("\t"===e.indent)n="\t";else{if(!("number"===typeof e.indent&&e.indent>0))return null;n=k.call(Array(e.indent+1)," ")}return{base:n,prev:k.call(Array(t+1),n)}}(u,r);if("undefined"===typeof i)i=[];else if(q(i,t)>=0)return"[Circular]";function P(t,n,o){if(n&&(i=C.call(i)).push(n),o){var a={depth:u.depth};return V(u,"quoteStyle")&&(a.quoteStyle=u.quoteStyle),e(t,a,r+1,i)}return e(t,u,r+1,i)}if("function"===typeof t&&!z(t)){var H=function(e){if(e.name)return e.name;var t=y.call(m.call(e),/^function\s*([\w$]+)/);if(t)return t[1];return null}(t),Q=X(t,P);return"[Function"+(H?": "+H:" (anonymous)")+"]"+(Q.length>0?" { "+k.call(Q,", ")+" }":"")}if(U(t)){var ee=N?_.call(String(t),/^(Symbol\(.*\))_[^)]*$/,"$1"):F.call(t);return"object"!==typeof t||N?ee:G(ee)}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 te="<"+D.call(String(t.nodeName)),ne=t.attributes||[],re=0;re"}if(j(t)){if(0===t.length)return"[]";var ie=X(t,P);return A&&!function(e){for(var t=0;t=0)return!1;return!0}(ie)?"["+K(ie,A)+"]":"[ "+k.call(ie,", ")+" ]"}if(function(e){return"[object Error]"===Y(e)&&(!O||!("object"===typeof e&&O in e))}(t)){var oe=X(t,P);return"cause"in Error.prototype||!("cause"in t)||T.call(t,"cause")?0===oe.length?"["+String(t)+"]":"{ ["+String(t)+"] "+k.call(oe,", ")+" }":"{ ["+String(t)+"] "+k.call(x.call("[cause]: "+P(t.cause),oe),", ")+" }"}if("object"===typeof t&&l){if(I&&"function"===typeof t[I]&&L)return L(t,{depth:E-r});if("symbol"!==l&&"function"===typeof t.inspect)return t.inspect()}if(function(e){if(!o||!e||"object"!==typeof e)return!1;try{o.call(e);try{c.call(e)}catch(te){return!0}return e instanceof Map}catch(t){}return!1}(t)){var ae=[];return a.call(t,(function(e,n){ae.push(P(n,t,!0)+" => "+P(e,t))})),Z("Map",o.call(t),ae,A)}if(function(e){if(!c||!e||"object"!==typeof e)return!1;try{c.call(e);try{o.call(e)}catch(t){return!0}return e instanceof Set}catch(n){}return!1}(t)){var ue=[];return s.call(t,(function(e){ue.push(P(e,t))})),Z("Set",c.call(t),ue,A)}if(function(e){if(!f||!e||"object"!==typeof e)return!1;try{f.call(e,f);try{d.call(e,d)}catch(te){return!0}return e instanceof WeakMap}catch(t){}return!1}(t))return J("WeakMap");if(function(e){if(!d||!e||"object"!==typeof e)return!1;try{d.call(e,d);try{f.call(e,f)}catch(te){return!0}return e instanceof WeakSet}catch(t){}return!1}(t))return J("WeakSet");if(function(e){if(!h||!e||"object"!==typeof e)return!1;try{return h.call(e),!0}catch(t){}return!1}(t))return J("WeakRef");if(function(e){return"[object Number]"===Y(e)&&(!O||!("object"===typeof e&&O in e))}(t))return G(P(Number(t)));if(function(e){if(!e||"object"!==typeof e||!S)return!1;try{return S.call(e),!0}catch(t){}return!1}(t))return G(P(S.call(t)));if(function(e){return"[object Boolean]"===Y(e)&&(!O||!("object"===typeof e&&O in e))}(t))return G(p.call(t));if(function(e){return"[object String]"===Y(e)&&(!O||!("object"===typeof e&&O in e))}(t))return G(P(String(t)));if(!function(e){return"[object Date]"===Y(e)&&(!O||!("object"===typeof e&&O in e))}(t)&&!z(t)){var le=X(t,P),ce=B?B(t)===Object.prototype:t instanceof Object||t.constructor===Object,se=t instanceof Object?"":"null prototype",fe=!ce&&O&&Object(t)===t&&O in t?g.call(Y(t),8,-1):se?"Object":"",de=(ce||"function"!==typeof t.constructor?"":t.constructor.name?t.constructor.name+" ":"")+(fe||se?"["+k.call(x.call([],fe||[],se||[]),": ")+"] ":"");return 0===le.length?de+"{}":A?de+"{"+K(le,A)+"}":de+"{ "+k.call(le,", ")+" }"}return String(t)};var H=Object.prototype.hasOwnProperty||function(e){return e in this};function V(e,t){return H.call(e,t)}function Y(e){return v.call(e)}function q(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(g.call(e,0,t.maxStringLength),t)+r}return $(_.call(_.call(e,/(['\\])/g,"\\$1"),/[\x00-\x1f]/g,Q),"single",t)}function Q(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 G(e){return"Object("+e+")"}function J(e){return e+" { ? }"}function Z(e,t,n,r){return e+" ("+t+") {"+(r?K(n,r):k.call(n,", "))+"}"}function K(e,t){if(0===e.length)return"";var n="\n"+t.prev+t.base;return n+k.call(e,","+n)+"\n"+t.prev}function X(e,t){var n=j(e),r=[];if(n){r.length=e.length;for(var i=0;i-1?e.split(","):e},c=function(e,t,n,r){if(e){var o=n.allowDots?e.replace(/\.([^.[]+)/g,"[$1]"):e,a=/(\[[^[\]]*])/g,u=n.depth>0&&/(\[[^[\]]*])/.exec(o),c=u?o.slice(0,u.index):o,s=[];if(c){if(!n.plainObjects&&i.call(Object.prototype,c)&&!n.allowPrototypes)return;s.push(c)}for(var f=0;n.depth>0&&null!==(u=a.exec(o))&&f=0;--o){var a,u=e[o];if("[]"===u&&n.parseArrays)a=[].concat(i);else{a=n.plainObjects?Object.create(null):{};var c="["===u.charAt(0)&&"]"===u.charAt(u.length-1)?u.slice(1,-1):u,s=parseInt(c,10);n.parseArrays||""!==c?!isNaN(s)&&u!==c&&String(s)===c&&s>=0&&n.parseArrays&&s<=n.arrayLimit?(a=[])[s]=i:"__proto__"!==c&&(a[c]=i):a={0:i}}i=a}return i}(s,t,n,r)}};e.exports=function(e,t){var n=function(e){if(!e)return a;if(null!==e.decoder&&void 0!==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?a.charset:e.charset;return{allowDots:"undefined"===typeof e.allowDots?a.allowDots:!!e.allowDots,allowPrototypes:"boolean"===typeof e.allowPrototypes?e.allowPrototypes:a.allowPrototypes,allowSparse:"boolean"===typeof e.allowSparse?e.allowSparse:a.allowSparse,arrayLimit:"number"===typeof e.arrayLimit?e.arrayLimit:a.arrayLimit,charset:t,charsetSentinel:"boolean"===typeof e.charsetSentinel?e.charsetSentinel:a.charsetSentinel,comma:"boolean"===typeof e.comma?e.comma:a.comma,decoder:"function"===typeof e.decoder?e.decoder:a.decoder,delimiter:"string"===typeof e.delimiter||r.isRegExp(e.delimiter)?e.delimiter:a.delimiter,depth:"number"===typeof e.depth||!1===e.depth?+e.depth:a.depth,ignoreQueryPrefix:!0===e.ignoreQueryPrefix,interpretNumericEntities:"boolean"===typeof e.interpretNumericEntities?e.interpretNumericEntities:a.interpretNumericEntities,parameterLimit:"number"===typeof e.parameterLimit?e.parameterLimit:a.parameterLimit,parseArrays:!1!==e.parseArrays,plainObjects:"boolean"===typeof e.plainObjects?e.plainObjects:a.plainObjects,strictNullHandling:"boolean"===typeof e.strictNullHandling?e.strictNullHandling:a.strictNullHandling}}(t);if(""===e||null===e||"undefined"===typeof e)return n.plainObjects?Object.create(null):{};for(var s="string"===typeof e?function(e,t){var n,c={},s=t.ignoreQueryPrefix?e.replace(/^\?/,""):e,f=t.parameterLimit===1/0?void 0:t.parameterLimit,d=s.split(t.delimiter,f),h=-1,p=t.charset;if(t.charsetSentinel)for(n=0;n-1&&(m=o(m)?[m]:m),i.call(c,v)?c[v]=r.combine(c[v],m):c[v]=m}return c}(e,n):e,f=n.plainObjects?Object.create(null):{},d=Object.keys(s),h=0;h0?C.join(",")||null:void 0}];else if(l(h))M=h;else{var P=Object.keys(C);M=m?P.sort(m):P}for(var I=a&&l(C)&&1===C.length?n+"[]":n,$=0;$0?D+b:""}},837:function(e,t,n){"use strict";var r=n(609),i=Object.prototype.hasOwnProperty,o=Array.isArray,a=function(){for(var e=[],t=0;t<256;++t)e.push("%"+((t<16?"0":"")+t.toString(16)).toUpperCase());return e}(),u=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(o(n)){for(var r=[],i=0;i=48&&s<=57||s>=65&&s<=90||s>=97&&s<=122||o===r.RFC1738&&(40===s||41===s)?l+=u.charAt(c):s<128?l+=a[s]:s<2048?l+=a[192|s>>6]+a[128|63&s]:s<55296||s>=57344?l+=a[224|s>>12]+a[128|s>>6&63]+a[128|63&s]:(c+=1,s=65536+((1023&s)<<10|1023&u.charCodeAt(c)),l+=a[240|s>>18]+a[128|s>>12&63]+a[128|s>>6&63]+a[128|63&s])}return l},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(o(e)){for(var n=[],r=0;r2&&(u.children=arguments.length>3?t.call(arguments,2):r),"function"==typeof e&&null!=e.defaultProps)for(a in e.defaultProps)void 0===u[a]&&(u[a]=e.defaultProps[a]);return p(e,u,i,o,null)}function p(e,t,n,o,a){var u={type:e,props:t,key:n,ref:o,__k:null,__:null,__b:0,__e:null,__d:void 0,__c:null,__h:null,constructor:void 0,__v:null==a?++i:a};return null==a&&null!=r.vnode&&r.vnode(u),u}function v(){return{current:null}}function m(e){return e.children}function y(e,t){this.props=e,this.context=t}function g(e,t){if(null==t)return e.__?g(e.__,e.__.__k.indexOf(e)+1):null;for(var n;t0?p(y.type,y.props,y.key,y.ref?y.ref:null,y.__v):y)){if(y.__=n,y.__b=n.__b+1,null===(v=w[d])||v&&y.key==v.key&&y.type===v.type)w[d]=void 0;else for(h=0;h2&&(u.children=arguments.length>3?t.call(arguments,2):r),p(e.type,u,i||e.key,o||e.ref,null)}function R(e,t){var n={__c:t="__cC"+u++,__: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.shouldComponentUpdate=function(e){this.props.value!==e.value&&n.some(b)},this.sub=function(e){n.push(e);var t=e.componentWillUnmount;e.componentWillUnmount=function(){n.splice(n.indexOf(e),1),t&&t.call(e)}}),e.children}};return n.Provider.__=n.Consumer.contextType=n}t=c.slice,r={__e:function(e,t,n,r){for(var i,o,a;t=t.__;)if((i=t.__c)&&!i.__)try{if((o=i.constructor)&&null!=o.getDerivedStateFromError&&(i.setState(o.getDerivedStateFromError(e)),a=i.__d),null!=i.componentDidCatch&&(i.componentDidCatch(e,r||{}),a=i.__d),a)return i.__E=i}catch(t){e=t}throw e}},i=0,y.prototype.setState=function(e,t){var n;n=null!=this.__s&&this.__s!==this.state?this.__s:this.__s=f({},this.state),"function"==typeof e&&(e=e(f({},n),this.props)),e&&f(n,e),null!=e&&this.__v&&(t&&this._sb.push(t),b(this))},y.prototype.forceUpdate=function(e){this.__v&&(this.__e=!0,e&&this.__h.push(e),b(this))},y.prototype.render=m,o=[],D.__r=0,u=0;var j,z,U,H,V=0,Y=[],q=[],W=r.__b,Q=r.__r,G=r.diffed,J=r.__c,Z=r.unmount;function K(e,t){r.__h&&r.__h(z,e,V||t),V=0;var n=z.__H||(z.__H={__:[],__h:[]});return e>=n.__.length&&n.__.push({__V:q}),n.__[e]}function X(e){return V=1,ee(ye,e)}function ee(e,t,n){var r=K(j++,2);if(r.t=e,!r.__c&&(r.__=[n?n(t):ye(void 0,t),function(e){var t=r.__N?r.__N[0]:r.__[0],n=r.t(t,e);t!==n&&(r.__N=[n,r.__[1]],r.__c.setState({}))}],r.__c=z,!z.u)){z.u=!0;var i=z.shouldComponentUpdate;z.shouldComponentUpdate=function(e,t,n){if(!r.__c.__H)return!0;var o=r.__c.__H.__.filter((function(e){return e.__c}));if(o.every((function(e){return!e.__N})))return!i||i.call(this,e,t,n);var a=!1;return o.forEach((function(e){if(e.__N){var t=e.__[0];e.__=e.__N,e.__N=void 0,t!==e.__[0]&&(a=!0)}})),!(!a&&r.__c.props===e)&&(!i||i.call(this,e,t,n))}}return r.__N||r.__}function te(e,t){var n=K(j++,3);!r.__s&&me(n.__H,t)&&(n.__=e,n.i=t,z.__H.__h.push(n))}function ne(e,t){var n=K(j++,4);!r.__s&&me(n.__H,t)&&(n.__=e,n.i=t,z.__h.push(n))}function re(e){return V=5,oe((function(){return{current:e}}),[])}function ie(e,t,n){V=6,ne((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 oe(e,t){var n=K(j++,7);return me(n.__H,t)?(n.__V=e(),n.i=t,n.__h=e,n.__V):n.__}function ae(e,t){return V=8,oe((function(){return e}),t)}function ue(e){var t=z.context[e.__c],n=K(j++,9);return n.c=e,t?(null==n.__&&(n.__=!0,t.sub(z)),t.props.value):e.__}function le(e,t){r.useDebugValue&&r.useDebugValue(t?t(e):e)}function ce(e){var t=K(j++,10),n=X();return t.__=e,z.componentDidCatch||(z.componentDidCatch=function(e,r){t.__&&t.__(e,r),n[1](e)}),[n[0],function(){n[1](void 0)}]}function se(){var e=K(j++,11);if(!e.__){for(var t=z.__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 fe(){for(var e;e=Y.shift();)if(e.__P&&e.__H)try{e.__H.__h.forEach(pe),e.__H.__h.forEach(ve),e.__H.__h=[]}catch(u){e.__H.__h=[],r.__e(u,e.__v)}}r.__b=function(e){z=null,W&&W(e)},r.__r=function(e){Q&&Q(e),j=0;var t=(z=e.__c).__H;t&&(U===z?(t.__h=[],z.__h=[],t.__.forEach((function(e){e.__N&&(e.__=e.__N),e.__V=q,e.__N=e.i=void 0}))):(t.__h.forEach(pe),t.__h.forEach(ve),t.__h=[])),U=z},r.diffed=function(e){G&&G(e);var t=e.__c;t&&t.__H&&(t.__H.__h.length&&(1!==Y.push(t)&&H===r.requestAnimationFrame||((H=r.requestAnimationFrame)||he)(fe)),t.__H.__.forEach((function(e){e.i&&(e.__H=e.i),e.__V!==q&&(e.__=e.__V),e.i=void 0,e.__V=q}))),U=z=null},r.__c=function(e,t){t.some((function(e){try{e.__h.forEach(pe),e.__h=e.__h.filter((function(e){return!e.__||ve(e)}))}catch(i){t.some((function(e){e.__h&&(e.__h=[])})),t=[],r.__e(i,e.__v)}})),J&&J(e,t)},r.unmount=function(e){Z&&Z(e);var t,n=e.__c;n&&n.__H&&(n.__H.__.forEach((function(e){try{pe(e)}catch(e){t=e}})),n.__H=void 0,t&&r.__e(t,n.__v))};var de="function"==typeof requestAnimationFrame;function he(e){var t,n=function(){clearTimeout(r),de&&cancelAnimationFrame(t),setTimeout(e)},r=setTimeout(n,100);de&&(t=requestAnimationFrame(n))}function pe(e){var t=z,n=e.__c;"function"==typeof n&&(e.__c=void 0,n()),z=t}function ve(e){var t=z;e.__c=e.__(),z=t}function me(e,t){return!e||e.length!==t.length||t.some((function(t,n){return t!==e[n]}))}function ye(e,t){return"function"==typeof t?t(e):t}function ge(e,t){for(var n in t)e[n]=t[n];return e}function _e(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 be(e,t){return e===t&&(0!==e||1/e==1/t)||e!=e&&t!=t}function De(e){this.props=e}function we(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:_e(this.props,e)}function r(t){return this.shouldComponentUpdate=n,h(e,t)}return r.displayName="Memo("+(e.displayName||e.name)+")",r.prototype.isReactComponent=!0,r.__f=!0,r}(De.prototype=new y).isPureReactComponent=!0,De.prototype.shouldComponentUpdate=function(e,t){return _e(this.props,e)||_e(this.state,t)};var xe=r.__b;r.__b=function(e){e.type&&e.type.__f&&e.ref&&(e.props.ref=e.ref,e.ref=null),xe&&xe(e)};var ke="undefined"!=typeof Symbol&&Symbol.for&&Symbol.for("react.forward_ref")||3911;function Ce(e){function t(t){var n=ge({},t);return delete n.ref,e(n,t.ref||null)}return t.$$typeof=ke,t.render=t,t.prototype.isReactComponent=t.__f=!0,t.displayName="ForwardRef("+(e.displayName||e.name)+")",t}var Ee=function(e,t){return null==e?null:k(k(e).map(t))},Se={map:Ee,forEach:Ee,count:function(e){return e?k(e).length:0},only:function(e){var t=k(e);if(1!==t.length)throw"Children.only";return t[0]},toArray:k},Ae=r.__e;r.__e=function(e,t,n,r){if(e.then)for(var i,o=t;o=o.__;)if((i=o.__c)&&i.__c)return null==t.__e&&(t.__e=n.__e,t.__k=n.__k),i.__c(e,t);Ae(e,t,n,r)};var Fe=r.unmount;function Ne(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=ge({},e)).__c&&(e.__c.__P===n&&(e.__c.__P=t),e.__c=null),e.__k=e.__k&&e.__k.map((function(e){return Ne(e,t,n)}))),e}function Oe(e,t,n){return e&&(e.__v=null,e.__k=e.__k&&e.__k.map((function(e){return Oe(e,t,n)})),e.__c&&e.__c.__P===t&&(e.__e&&n.insertBefore(e.__e,e.__d),e.__c.__e=!0,e.__c.__P=n)),e}function Te(){this.__u=0,this.t=null,this.__b=null}function Be(e){var t=e.__.__c;return t&&t.__a&&t.__a(e)}function Me(e){var t,n,r;function i(i){if(t||(t=e()).then((function(e){n=e.default||e}),(function(e){r=e})),r)throw r;if(!n)throw t;return h(n,i)}return i.displayName="Lazy",i.__f=!0,i}function Le(){this.u=null,this.o=null}r.unmount=function(e){var t=e.__c;t&&t.__R&&t.__R(),t&&!0===e.__h&&(e.type=null),Fe&&Fe(e)},(Te.prototype=new y).__c=function(e,t){var n=t.__c,r=this;null==r.t&&(r.t=[]),r.t.push(n);var i=Be(r.__v),o=!1,a=function(){o||(o=!0,n.__R=null,i?i(u):u())};n.__R=a;var u=function(){if(!--r.__u){if(r.state.__a){var e=r.state.__a;r.__v.__k[0]=Oe(e,e.__c.__P,e.__c.__O)}var t;for(r.setState({__a:r.__b=null});t=r.t.pop();)t.forceUpdate()}},l=!0===t.__h;r.__u++||l||r.setState({__a:r.__b=r.__v.__k[0]}),e.then(a,a)},Te.prototype.componentWillUnmount=function(){this.t=[]},Te.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]=Ne(this.__b,n,r.__O=r.__P)}this.__b=null}var i=t.__a&&h(m,null,e.fallback);return i&&(i.__h=null),[h(m,null,t.__a?null:e.children),i]};var Pe=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)}}),P(h(Ie,{context:t.context},e.__v),t.l)):t.l&&t.componentWillUnmount()}function Re(e,t){var n=h($e,{__v:e,i:t});return n.containerInfo=t,n}(Le.prototype=new y).__a=function(e){var t=this,n=Be(t.__v),r=t.o.get(e);return r[0]++,function(i){var o=function(){t.props.revealOrder?(r.push(i),Pe(t,e,r)):i()};n?n(o):o()}},Le.prototype.render=function(e){this.u=null,this.o=new Map;var t=k(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},Le.prototype.componentDidUpdate=Le.prototype.componentDidMount=function(){var e=this;this.o.forEach((function(t,n){Pe(e,n,t)}))};var je="undefined"!=typeof Symbol&&Symbol.for&&Symbol.for("react.element")||60103,ze=/^(?:accent|alignment|arabic|baseline|cap|clip(?!PathU)|color|dominant|fill|flood|font|glyph(?!R)|horiz|image|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]/,Ue="undefined"!=typeof document,He=function(e){return("undefined"!=typeof Symbol&&"symbol"==typeof Symbol()?/fil|che|rad/i:/fil|che|ra/i).test(e)};function Ve(e,t,n){return null==t.__k&&(t.textContent=""),P(e,t),"function"==typeof n&&n(),e?e.__c:null}function Ye(e,t,n){return I(e,t),"function"==typeof n&&n(),e?e.__c:null}y.prototype.isReactComponent={},["componentWillMount","componentWillReceiveProps","componentWillUpdate"].forEach((function(e){Object.defineProperty(y.prototype,e,{configurable:!0,get:function(){return this["UNSAFE_"+e]},set:function(t){Object.defineProperty(this,e,{configurable:!0,writable:!0,value:t})}})}));var qe=r.event;function We(){}function Qe(){return this.cancelBubble}function Ge(){return this.defaultPrevented}r.event=function(e){return qe&&(e=qe(e)),e.persist=We,e.isPropagationStopped=Qe,e.isDefaultPrevented=Ge,e.nativeEvent=e};var Je,Ze={configurable:!0,get:function(){return this.class}},Ke=r.vnode;r.vnode=function(e){var t=e.type,n=e.props,r=n;if("string"==typeof t){var i=-1===t.indexOf("-");for(var o in r={},n){var a=n[o];Ue&&"children"===o&&"noscript"===t||"value"===o&&"defaultValue"in n&&null==a||("defaultValue"===o&&"value"in n&&null==n.value?o="value":"download"===o&&!0===a?a="":/ondoubleclick/i.test(o)?o="ondblclick":/^onchange(textarea|input)/i.test(o+t)&&!He(n.type)?o="oninput":/^onfocus$/i.test(o)?o="onfocusin":/^onblur$/i.test(o)?o="onfocusout":/^on(Ani|Tra|Tou|BeforeInp|Compo)/.test(o)?o=o.toLowerCase():i&&ze.test(o)?o=o.replace(/[A-Z0-9]/g,"-$&").toLowerCase():null===a&&(a=void 0),/^oninput$/i.test(o)&&(o=o.toLowerCase(),r[o]&&(o="oninputCapture")),r[o]=a)}"select"==t&&r.multiple&&Array.isArray(r.value)&&(r.value=k(n.children).forEach((function(e){e.props.selected=-1!=r.value.indexOf(e.props.value)}))),"select"==t&&null!=r.defaultValue&&(r.value=k(n.children).forEach((function(e){e.props.selected=r.multiple?-1!=r.defaultValue.indexOf(e.props.value):r.defaultValue==e.props.value}))),e.props=r,n.class!=n.className&&(Ze.enumerable="className"in n,null!=n.className&&(r.class=n.className),Object.defineProperty(r,"className",Ze))}e.$$typeof=je,Ke&&Ke(e)};var Xe=r.__r;r.__r=function(e){Xe&&Xe(e),Je=e.__c};var et={ReactCurrentDispatcher:{current:{readContext:function(e){return Je.__n[e.__c].props.value}}}},tt="17.0.2";function nt(e){return h.bind(null,e)}function rt(e){return!!e&&e.$$typeof===je}function it(e){return rt(e)?$.apply(null,arguments):e}function ot(e){return!!e.__k&&(P(null,e),!0)}function at(e){return e&&(e.base||1===e.nodeType&&e)||null}var ut=function(e,t){return e(t)},lt=function(e,t){return e(t)},ct=m;function st(e){e()}function ft(e){return e}function dt(){return[!1,st]}var ht=ne;function pt(e,t){var n=t(),r=X({h:{__:n,v:t}}),i=r[0].h,o=r[1];return ne((function(){i.__=n,i.v=t,be(i.__,t())||o({h:i})}),[e,n,t]),te((function(){return be(i.__,i.v())||o({h:i}),e((function(){be(i.__,i.v())||o({h:i})}))}),[e]),n}var vt,mt={useState:X,useId:se,useReducer:ee,useEffect:te,useLayoutEffect:ne,useInsertionEffect:ht,useTransition:dt,useDeferredValue:ft,useSyncExternalStore:pt,startTransition:st,useRef:re,useImperativeHandle:ie,useMemo:oe,useCallback:ae,useContext:ue,useDebugValue:le,version:"17.0.2",Children:Se,render:Ve,hydrate:Ye,unmountComponentAtNode:ot,createPortal:Re,createElement:h,createContext:R,createFactory:nt,cloneElement:it,createRef:v,Fragment:m,isValidElement:rt,findDOMNode:at,Component:y,PureComponent:De,memo:we,forwardRef:Ce,flushSync:lt,unstable_batchedUpdates:ut,StrictMode:ct,Suspense:Te,SuspenseList:Le,lazy:Me,__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED:et};function yt(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n=0&&(t.hash=e.substr(n),e=e.substr(0,n));var r=e.indexOf("?");r>=0&&(t.search=e.substr(r),e=e.substr(0,r)),e&&(t.pathname=e)}return t}function zt(e){var t="undefined"!==typeof window&&"undefined"!==typeof window.location&&"null"!==window.location.origin?window.location.origin:"unknown://unknown",n="string"===typeof e?e:Rt(e);return new URL(n,t)}function Ut(e,t,n,r){void 0===r&&(r={});var i=r,o=i.window,a=void 0===o?document.defaultView:o,u=i.v5Compat,l=void 0!==u&&u,c=a.history,s=vt.Pop,f=null;function d(){s=vt.Pop,f&&f({action:s,location:h.location})}var h={get action(){return s},get location(){return e(a,c)},listen:function(e){if(f)throw new Error("A history only accepts one active listener");return a.addEventListener(Lt,d),f=e,function(){a.removeEventListener(Lt,d),f=null}},createHref:function(e){return t(a,e)},encodeLocation:function(e){var t=zt(Rt(e));return Bt({},e,{pathname:t.pathname,search:t.search,hash:t.hash})},push:function(e,t){s=vt.Push;var r=$t(h.location,e,t);n&&n(r,e);var i=It(r),o=h.createHref(r);try{c.pushState(i,"",o)}catch(u){a.location.assign(o)}l&&f&&f({action:s,location:h.location})},replace:function(e,t){s=vt.Replace;var r=$t(h.location,e,t);n&&n(r,e);var i=It(r),o=h.createHref(r);c.replaceState(i,"",o),l&&f&&f({action:s,location:h.location})},go:function(e){return c.go(e)}};return h}function Ht(e,t,n){void 0===n&&(n="/");var r=Zt(("string"===typeof t?jt(t):t).pathname||"/",n);if(null==r)return null;var i=Vt(e);!function(e){e.sort((function(e,t){return e.score!==t.score?t.score-e.score:function(e,t){var n=e.length===t.length&&e.slice(0,-1).every((function(e,n){return e===t[n]}));return n?e[e.length-1]-t[t.length-1]:0}(e.routesMeta.map((function(e){return e.childrenIndex})),t.routesMeta.map((function(e){return e.childrenIndex})))}))}(i);for(var o=null,a=0;null==o&&a0&&(Kt(!0!==e.index,'Index routes must not have child routes. Please remove all child routes from route path "'+a+'".'),Vt(e.children,t,u,a)),(null!=e.path||e.index)&&t.push({path:a,score:Wt(a,e.index),routesMeta:u})})),t}!function(e){e.data="data",e.deferred="deferred",e.redirect="redirect",e.error="error"}(Mt||(Mt={}));var Yt=/^:\w+$/,qt=function(e){return"*"===e};function Wt(e,t){var n=e.split("/"),r=n.length;return n.some(qt)&&(r+=-2),t&&(r+=2),n.filter((function(e){return!qt(e)})).reduce((function(e,t){return e+(Yt.test(t)?3:""===t?1:10)}),r)}function Qt(e,t){for(var n=e.routesMeta,r={},i="/",o=[],a=0;a and the router will parse it for you.'}function tn(e){return e.filter((function(e,t){return 0===t||e.route.path&&e.route.path.length>0}))}function nn(e,t,n,r){var i;void 0===r&&(r=!1),"string"===typeof e?i=jt(e):(Kt(!(i=Bt({},e)).pathname||!i.pathname.includes("?"),en("?","pathname","search",i)),Kt(!i.pathname||!i.pathname.includes("#"),en("#","pathname","hash",i)),Kt(!i.search||!i.search.includes("#"),en("#","search","hash",i)));var o,a=""===e||""===i.pathname,u=a?"/":i.pathname;if(r||null==u)o=n;else{var l=t.length-1;if(u.startsWith("..")){for(var c=u.split("/");".."===c[0];)c.shift(),l-=1;i.pathname=c.join("/")}o=l>=0?t[l]:"/"}var s=function(e,t){void 0===t&&(t="/");var n="string"===typeof e?jt(e):e,r=n.pathname,i=n.search,o=void 0===i?"":i,a=n.hash,u=void 0===a?"":a,l=r?r.startsWith("/")?r:function(e,t){var n=t.replace(/\/+$/,"").split("/");return e.split("/").forEach((function(e){".."===e?n.length>1&&n.pop():"."!==e&&n.push(e)})),n.length>1?n.join("/"):"/"}(r,t):t;return{pathname:l,search:an(o),hash:un(u)}}(i,o),f=u&&"/"!==u&&u.endsWith("/"),d=(a||"."===u)&&n.endsWith("/");return s.pathname.endsWith("/")||!f&&!d||(s.pathname+="/"),s}var rn=function(e){return e.join("/").replace(/\/\/+/g,"/")},on=function(e){return e.replace(/\/+$/,"").replace(/^\/*/,"/")},an=function(e){return e&&"?"!==e?e.startsWith("?")?e:"?"+e:""},un=function(e){return e&&"#"!==e?e.startsWith("#")?e:"#"+e:""};Error;var ln=xt((function e(t,n,r){Dt(this,e),this.status=t,this.statusText=n||"",this.data=r}));function cn(e){return e instanceof ln}"undefined"!==typeof window&&"undefined"!==typeof window.document&&window.document.createElement;var sn=new Set(["POST","PUT","PATCH","DELETE"]);new Set(["GET","HEAD"].concat(bt(sn)));function fn(){return fn=Object.assign?Object.assign.bind():function(e){for(var t=1;t")))}var Nn,On,Tn=function(e){Ct(n,e);var t=Nt(n);function n(e){var r;return Dt(this,n),(r=t.call(this,e)).state={location:e.location,error:e.error},r}return xt(n,[{key:"componentDidCatch",value:function(e,t){console.error("React Router caught the following error during render",e,t)}},{key:"render",value:function(){return this.state.error?h(kn.Provider,{value:this.state.error,children:this.props.component}):this.props.children}}],[{key:"getDerivedStateFromError",value:function(e){return{error:e}}},{key:"getDerivedStateFromProps",value:function(e,t){return t.location!==e.location?{error:e.error,location:e.location}:{error:e.error||t.error,location:t.location}}}]),n}(y);function Bn(e){var t=e.routeContext,n=e.match,r=e.children,i=ue(gn);return i&&n.route.errorElement&&(i._deepestRenderedBoundaryId=n.route.id),h(xn.Provider,{value:t},r)}function Mn(e,t,n){if(void 0===t&&(t=[]),null==e){if(null==n||!n.errors)return null;e=n.matches}var r=e,i=null==n?void 0:n.errors;if(null!=i){var o=r.findIndex((function(e){return e.route.id&&(null==i?void 0:i[e.route.id])}));o>=0||Kt(!1),r=r.slice(0,Math.min(r.length,o+1))}return r.reduceRight((function(e,o,a){var u=o.route.id?null==i?void 0:i[o.route.id]:null,l=n?o.route.errorElement||h(Fn,null):null,c=function(){return h(Bn,{match:o,routeContext:{outlet:e,matches:t.concat(r.slice(0,a+1))}},u?l:void 0!==o.route.element?o.route.element:e)};return n&&(o.route.errorElement||0===a)?h(Tn,{location:n.location,component:l,error:u,children:c()}):c()}),null)}function Ln(e){var t=ue(bn);return t||Kt(!1),t}!function(e){e.UseRevalidator="useRevalidator"}(Nn||(Nn={})),function(e){e.UseLoaderData="useLoaderData",e.UseActionData="useActionData",e.UseRouteError="useRouteError",e.UseNavigation="useNavigation",e.UseRouteLoaderData="useRouteLoaderData",e.UseMatches="useMatches",e.UseRevalidator="useRevalidator"}(On||(On={}));var Pn;function In(e){return function(e){var t=ue(xn).outlet;return t?h(An.Provider,{value:e},t):t}(e.context)}function $n(e){Kt(!1)}function Rn(e){var t=e.basename,n=void 0===t?"/":t,r=e.children,i=void 0===r?null:r,o=e.location,a=e.navigationType,u=void 0===a?vt.Pop:a,l=e.navigator,c=e.static,s=void 0!==c&&c;Cn()&&Kt(!1);var f=n.replace(/^\/*/,"/"),d=oe((function(){return{basename:f,navigator:l,static:s}}),[f,l,s]);"string"===typeof o&&(o=jt(o));var p=o,v=p.pathname,m=void 0===v?"/":v,y=p.search,g=void 0===y?"":y,_=p.hash,b=void 0===_?"":_,D=p.state,w=void 0===D?null:D,x=p.key,k=void 0===x?"default":x,C=oe((function(){var e=Zt(m,f);return null==e?null:{pathname:e,search:g,hash:b,state:w,key:k}}),[f,m,g,b,w,k]);return null==C?null:h(Dn.Provider,{value:d},h(wn.Provider,{children:i,value:{location:C,navigationType:u}}))}function jn(e){var t=e.children,n=e.location,r=ue(_n);return function(e,t){Cn()||Kt(!1);var n,r=ue(bn),i=ue(xn).matches,o=i[i.length-1],a=o?o.params:{},u=(o&&o.pathname,o?o.pathnameBase:"/"),l=(o&&o.route,En());if(t){var c,s="string"===typeof t?jt(t):t;"/"===u||(null==(c=s.pathname)?void 0:c.startsWith(u))||Kt(!1),n=s}else n=l;var f=n.pathname||"/",d=Ht(e,{pathname:"/"===u?f:f.slice(u.length)||"/"}),p=Mn(d&&d.map((function(e){return Object.assign({},e,{params:Object.assign({},a,e.params),pathname:rn([u,e.pathname]),pathnameBase:"/"===e.pathnameBase?u:rn([u,e.pathnameBase])})})),i,r||void 0);return t&&p?h(wn.Provider,{value:{location:fn({pathname:"/",search:"",hash:"",state:null,key:"default"},n),navigationType:vt.Pop}},p):p}(r&&!t?r.router.routes:zn(t),n)}!function(e){e[e.pending=0]="pending",e[e.success=1]="success",e[e.error=2]="error"}(Pn||(Pn={}));new Promise((function(){}));function zn(e,t){void 0===t&&(t=[]);var n=[];return Se.forEach(e,(function(e,r){if(rt(e))if(e.type!==m){e.type!==$n&&Kt(!1),e.props.index&&e.props.children&&Kt(!1);var i=[].concat(bt(t),[r]),o={id:e.props.id||i.join("-"),caseSensitive:e.props.caseSensitive,element:e.props.element,index:e.props.index,path:e.props.path,loader:e.props.loader,action:e.props.action,errorElement:e.props.errorElement,hasErrorBoundary:null!=e.props.errorElement,shouldRevalidate:e.props.shouldRevalidate,handle:e.props.handle};e.props.children&&(o.children=zn(e.props.children,i)),n.push(o)}else n.push.apply(n,zn(e.props.children,t))})),n}function Un(e){var t=e.basename,n=e.children,r=e.window,i=re();null==i.current&&(i.current=function(e){return void 0===e&&(e={}),Ut((function(e,t){var n=jt(e.location.hash.substr(1)),r=n.pathname,i=void 0===r?"/":r,o=n.search,a=void 0===o?"":o,u=n.hash;return $t("",{pathname:i,search:a,hash:void 0===u?"":u},t.state&&t.state.usr||null,t.state&&t.state.key||"default")}),(function(e,t){var n=e.document.querySelector("base"),r="";if(n&&n.getAttribute("href")){var i=e.location.href,o=i.indexOf("#");r=-1===o?i:i.slice(0,o)}return r+"#"+("string"===typeof t?t:Rt(t))}),(function(e,t){Pt("/"===e.pathname.charAt(0),"relative pathnames are not supported in hash history.push("+JSON.stringify(t)+")")}),e)}({window:r,v5Compat:!0}));var o=i.current,a=_t(X({action:o.action,location:o.location}),2),u=a[0],l=a[1];return ne((function(){return o.listen(l)}),[o]),h(Rn,{basename:t,children:n,location:u.location,navigationType:u.action,navigator:o})}var Hn,Vn;(function(e){e.UseScrollRestoration="useScrollRestoration",e.UseSubmitImpl="useSubmitImpl",e.UseFetcher="useFetcher"})(Hn||(Hn={})),function(e){e.UseFetchers="useFetchers",e.UseScrollRestoration="useScrollRestoration"}(Vn||(Vn={}));var Yn;function qn(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}var Wn={home:"/",dashboards:"/dashboards",cardinality:"/cardinality",topQueries:"/top-queries",trace:"/trace"},Qn={header:{timeSelector:!0,executionControls:!0,globalSettings:!0}},Gn=(qn(Yn={},Wn.home,Qn),qn(Yn,Wn.dashboards,Qn),qn(Yn,Wn.cardinality,{header:{cardinalityDatePicker:!0,globalSettings:!0}}),Yn),Jn=Wn;function Zn(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}function Kn(e){for(var t=1;t2&&void 0!==arguments[2]?arguments[2]:window.location.search,r=nr().parse(n,{ignoreQueryPrefix:!0});return ir()(r,e,t||"")},lr={serverUrl:Xn().serverURL||window.location.href.replace(/\/(?:prometheus\/)?(?:graph|vmui)\/.*/,"/prometheus"),tenantId:Number(ur("g0.tenantID",0))};function cr(e,t){switch(t.type){case"SET_SERVER":return Kn(Kn({},e),{},{serverUrl:t.payload});case"SET_TENANT_ID":return Kn(Kn({},e),{},{tenantId:t.payload});default:throw new Error}}var sr=0;function fr(e,t,n,i,o){var a,u,l={};for(u in t)"ref"==u?a=t[u]:l[u]=t[u];var c={type:e,props:l,key:n,ref:a,__k:null,__:null,__b:0,__e:null,__d:void 0,__c:null,__h:null,constructor:void 0,__v:--sr,__source:o,__self:i};if("function"==typeof e&&(a=e.defaultProps))for(u in a)void 0===l[u]&&(l[u]=a[u]);return r.vnode&&r.vnode(c),c}var dr=R({}),hr=function(){return ue(dr).state},pr=function(){return ue(dr).dispatch},vr=Object.entries(lr).reduce((function(e,t){var n=_t(t,2),r=n[0],i=n[1];return Kn(Kn({},e),{},qn({},r,ur(r)||i))}),{}),mr=n(658),yr=n.n(mr),gr=n(446),_r=n.n(gr),br=n(635),Dr=n.n(br),wr="YYYY-MM-DD",xr="YYYY-MM-DD HH:mm:ss",kr="YYYY-MM-DD[T]HH:mm:ss";yr().extend(_r()),yr().extend(Dr());var Cr,Er=window.innerWidth/4,Sr=1,Ar=1578e8,Fr=[{long:"days",short:"d",possible:"day"},{long:"weeks",short:"w",possible:"week"},{long:"months",short:"M",possible:"mon"},{long:"years",short:"y",possible:"year"},{long:"hours",short:"h",possible:"hour"},{long:"minutes",short:"m",possible:"min"},{long:"seconds",short:"s",possible:"sec"},{long:"milliseconds",short:"ms",possible:"millisecond"}].map((function(e){return e.short})),Nr=function(e){return Math.round(1e3*e)/1e3},Or=function(e){var t=e.match(/\d+/g),n=e.match(/[a-zA-Z]+/g);if(n&&t&&Fr.includes(n[0]))return qn({},n[0],t[0])},Tr=function(e,t){var n=(t||new Date).valueOf()/1e3,r=e.trim().split(" ").reduce((function(e,t){var n=Or(t);return n?Kn(Kn({},e),n):Kn({},e)}),{}),i=yr().duration(r).asSeconds();return{start:n-i,end:n,step:Nr(i/Er)||.001,date:Br(t||new Date)}},Br=function(e){return yr()(e).utc().format(kr)},Mr=function(e){return yr()(e).format(kr)},Lr=function(e){var t=Math.floor(e%1e3),n=Math.floor(e/1e3%60),r=Math.floor(e/1e3/60%60),i=Math.floor(e/1e3/3600%24),o=Math.floor(e/864e5),a=["d","h","m","s","ms"],u=[o,i,r,n,t].map((function(e,t){return e?"".concat(e).concat(a[t]):""}));return u.filter((function(e){return e})).join(" ")},Pr=function(e){return new Date(1e3*e)},Ir=[{title:"Last 5 minutes",duration:"5m"},{title:"Last 15 minutes",duration:"15m"},{title:"Last 30 minutes",duration:"30m",isDefault:!0},{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:function(){return yr()().subtract(1,"day").endOf("day").toDate()}},{title:"Today",duration:"1d",until:function(){return yr()().endOf("day").toDate()}}].map((function(e){return Kn({id:e.title.replace(/\s/g,"_").toLocaleLowerCase(),until:e.until?e.until:function(){return yr()().toDate()}},e)})),$r=function(e){var t,n=e.relativeTimeId,r=e.defaultDuration,i=e.defaultEndInput,o=null===(t=Ir.find((function(e){return e.isDefault})))||void 0===t?void 0:t.id,a=n||ur("g0.relative_time",o),u=Ir.find((function(e){return e.id===a}));return{relativeTimeId:u?a:"none",duration:u?u.duration:r,endInput:u?u.until():i}},Rr=ur("g0.range_input"),jr=$r({defaultDuration:Rr||"1h",defaultEndInput:new Date((Cr=ur("g0.end_input",new Date(yr()().utc().format(kr))),yr()(Cr).utcOffset(0,!0).local().format(kr))),relativeTimeId:Rr?ur("g0.relative_time","none"):void 0}),zr=jr.duration,Ur=jr.endInput,Hr=jr.relativeTimeId,Vr={duration:zr,period:Tr(zr,Ur),relativeTime:Hr};function Yr(e,t){switch(t.type){case"SET_DURATION":return Kn(Kn({},e),{},{duration:t.payload,period:Tr(t.payload,Pr(e.period.end)),relativeTime:"none"});case"SET_RELATIVE_TIME":return Kn(Kn({},e),{},{duration:t.payload.duration,period:Tr(t.payload.duration,new Date(t.payload.until)),relativeTime:t.payload.id});case"SET_PERIOD":var n=function(e){var t=e.to.valueOf()-e.from.valueOf();return Lr(t)}(t.payload);return Kn(Kn({},e),{},{duration:n,period:Tr(n,t.payload.to),relativeTime:"none"});case"RUN_QUERY":var r=$r({relativeTimeId:e.relativeTime,defaultDuration:e.duration,defaultEndInput:Pr(e.period.end)}),i=r.duration,o=r.endInput;return Kn(Kn({},e),{},{period:Tr(i,o)});case"RUN_QUERY_TO_NOW":return Kn(Kn({},e),{},{period:Tr(e.duration)});default:throw new Error}}var qr=R({}),Wr=function(){return ue(qr).state},Qr=function(){return ue(qr).dispatch},Gr=function(e,t){t?window.localStorage.setItem(e,JSON.stringify({value:t})):Zr([e])},Jr=function(e){var 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(c){return t}},Zr=function(e){return e.forEach((function(e){return window.localStorage.removeItem(e)}))},Kr=function(){var e,t=(null===(e=window.location.search.match(/g\d+.expr/gim))||void 0===e?void 0:e.length)||1;return new Array(t>4?4:t).fill(1).map((function(e,t){return ur("g".concat(t,".expr"),"")}))}(),Xr={query:Kr,queryHistory:Kr.map((function(e){return{index:0,values:[e]}})),autocomplete:Jr("AUTOCOMPLETE")||!1};function ei(e,t){switch(t.type){case"SET_QUERY":return Kn(Kn({},e),{},{query:t.payload.map((function(e){return e}))});case"SET_QUERY_HISTORY":return Kn(Kn({},e),{},{queryHistory:t.payload});case"SET_QUERY_HISTORY_BY_INDEX":return e.queryHistory.splice(t.payload.queryNumber,1,t.payload.value),Kn(Kn({},e),{},{queryHistory:e.queryHistory});case"TOGGLE_AUTOCOMPLETE":return Gr("AUTOCOMPLETE",!e.autocomplete),Kn(Kn({},e),{},{autocomplete:!e.autocomplete});default:throw new Error}}var ti=R({}),ni=function(){return ue(ti).state},ri=function(){return ue(ti).dispatch},ii=function(){return fr("svg",{viewBox:"0 0 74 24",fill:"currentColor",children:[fr("path",{d:"M6.11771 9.47563C6.4774 9.7554 6.91935 9.90875 7.37507 9.9119H7.42685C7.9076 9.90451 8.38836 9.71964 8.67681 9.46823C10.1856 8.18898 14.5568 4.18115 14.5568 4.18115C15.7254 3.09415 12.4637 2.00716 7.42685 1.99977H7.36768C2.33084 2.00716 -0.930893 3.09415 0.237711 4.18115C0.237711 4.18115 4.60888 8.18898 6.11771 9.47563ZM8.67681 11.6422C8.31807 11.9246 7.87603 12.0806 7.41945 12.0859H7.37507C6.91849 12.0806 6.47645 11.9246 6.11771 11.6422C5.08224 10.7549 1.38413 7.41995 0.00103198 6.14809V8.07806C0.00103198 8.2925 0.0823905 8.57349 0.222919 8.70659L0.293358 8.77097L0.293386 8.77099C1.33788 9.72556 4.83907 12.9253 6.11771 14.0159C6.47645 14.2983 6.91849 14.4543 7.37507 14.4595H7.41945C7.9076 14.4447 8.38096 14.2599 8.67681 14.0159C9.98594 12.9067 13.6249 9.57175 14.5642 8.70659C14.7121 8.57349 14.7861 8.2925 14.7861 8.07806V6.14809C12.7662 7.99781 10.7297 9.82926 8.67681 11.6422ZM7.41945 16.6261C7.87517 16.623 8.31712 16.4696 8.67681 16.1898C10.7298 14.3744 12.7663 12.5405 14.7861 10.6883V12.6257C14.7861 12.8327 14.7121 13.1137 14.5642 13.2468C13.6249 14.1194 9.98594 17.4469 8.67681 18.5561C8.38096 18.8075 7.9076 18.9924 7.41945 18.9998H7.37507C6.91935 18.9966 6.4774 18.8433 6.11771 18.5635C4.91431 17.5371 1.74223 14.6362 0.502336 13.5023C0.3934 13.4027 0.299379 13.3167 0.222919 13.2468C0.0823905 13.1137 0.00103198 12.8327 0.00103198 12.6257V10.6883C1.38413 11.9528 5.08224 15.2951 6.11771 16.1825C6.47645 16.4649 6.91849 16.6209 7.37507 16.6261H7.41945Z",fill:"currentColor"}),fr("path",{d:"M35 3.54L29.16 18H26.73L20.89 3.54H23.05C23.2833 3.54 23.4733 3.59667 23.62 3.71C23.7667 3.82333 23.8767 3.97 23.95 4.15L27.36 12.97C27.4733 13.2567 27.58 13.5733 27.68 13.92C27.7867 14.26 27.8867 14.6167 27.98 14.99C28.06 14.6167 28.1467 14.26 28.24 13.92C28.3333 13.5733 28.4367 13.2567 28.55 12.97L31.94 4.15C31.9933 3.99667 32.0967 3.85667 32.25 3.73C32.41 3.60333 32.6033 3.54 32.83 3.54H35ZM52.1767 3.54V18H49.8067V8.66C49.8067 8.28667 49.8267 7.88333 49.8667 7.45L45.4967 15.66C45.2901 16.0533 44.9734 16.25 44.5467 16.25H44.1667C43.7401 16.25 43.4234 16.0533 43.2167 15.66L38.7967 7.42C38.8167 7.64 38.8334 7.85667 38.8467 8.07C38.8601 8.28333 38.8667 8.48 38.8667 8.66V18H36.4967V3.54H38.5267C38.6467 3.54 38.7501 3.54333 38.8367 3.55C38.9234 3.55667 39.0001 3.57333 39.0667 3.6C39.1401 3.62667 39.2034 3.67 39.2567 3.73C39.3167 3.79 39.3734 3.87 39.4267 3.97L43.7567 12C43.8701 12.2133 43.9734 12.4333 44.0667 12.66C44.1667 12.8867 44.2634 13.12 44.3567 13.36C44.4501 13.1133 44.5467 12.8767 44.6467 12.65C44.7467 12.4167 44.8534 12.1933 44.9667 11.98L49.2367 3.97C49.2901 3.87 49.3467 3.79 49.4067 3.73C49.4667 3.67 49.5301 3.62667 49.5967 3.6C49.6701 3.57333 49.7501 3.55667 49.8367 3.55C49.9234 3.54333 50.0267 3.54 50.1467 3.54H52.1767ZM61.063 17.27C61.743 17.27 62.3496 17.1533 62.883 16.92C63.423 16.68 63.8796 16.35 64.253 15.93C64.6263 15.51 64.9096 15.0167 65.103 14.45C65.303 13.8767 65.403 13.26 65.403 12.6V3.85H66.423V12.6C66.423 13.38 66.2996 14.11 66.053 14.79C65.8063 15.4633 65.4496 16.0533 64.983 16.56C64.523 17.06 63.9596 17.4533 63.293 17.74C62.633 18.0267 61.8896 18.17 61.063 18.17C60.2363 18.17 59.4896 18.0267 58.823 17.74C58.163 17.4533 57.5996 17.06 57.133 16.56C56.673 16.0533 56.3196 15.4633 56.073 14.79C55.8263 14.11 55.703 13.38 55.703 12.6V3.85H56.733V12.59C56.733 13.25 56.8296 13.8667 57.023 14.44C57.223 15.0067 57.5063 15.5 57.873 15.92C58.2463 16.34 58.6996 16.67 59.233 16.91C59.773 17.15 60.383 17.27 61.063 17.27ZM71.4442 18H70.4142V3.85H71.4442V18Z",fill:"currentColor"})]})},oi=function(){return fr("svg",{viewBox:"0 0 24 24",fill:"currentColor",children:fr("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"})})},ai=function(){return fr("svg",{viewBox:"0 0 24 24",fill:"currentColor",children:fr("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"})})},ui=function(){return fr("svg",{viewBox:"0 0 24 24",fill:"currentColor",children:fr("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"})})},li=function(){return fr("svg",{viewBox:"0 0 24 24",fill:"currentColor",children:fr("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"})})},ci=function(){return fr("svg",{viewBox:"0 0 24 24",fill:"currentColor",children:fr("path",{d:"M1 21h22L12 2 1 21zm12-3h-2v-2h2v2zm0-4h-2v-4h2v4z"})})},si=function(){return fr("svg",{viewBox:"0 0 24 24",fill:"currentColor",children:fr("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"})})},fi=function(){return fr("svg",{viewBox:"0 0 24 24",fill:"currentColor",children:fr("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"})})},di=function(){return fr("svg",{viewBox:"0 0 24 24",fill:"currentColor",children:fr("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"})})},hi=function(){return fr("svg",{viewBox:"0 0 24 24",fill:"currentColor",children:fr("path",{d:"M7.41 8.59 12 13.17l4.59-4.58L18 10l-6 6-6-6 1.41-1.41z"})})},pi=function(){return fr("svg",{viewBox:"0 0 24 24",fill:"currentColor",children:fr("path",{d:"m12 8-6 6 1.41 1.41L12 10.83l4.59 4.58L18 14z"})})},vi=function(){return fr("svg",{viewBox:"0 0 24 24",fill:"currentColor",children:fr("path",{d:"m7 10 5 5 5-5z"})})},mi=function(){return fr("svg",{viewBox:"0 0 24 24",fill:"currentColor",children:[fr("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"}),fr("path",{d:"M12.5 7H11v6l5.25 3.15.75-1.23-4.5-2.67z"})]})},yi=function(){return fr("svg",{viewBox:"0 0 24 24",fill:"currentColor",children:fr("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"})})},gi=function(){return fr("svg",{viewBox:"0 0 24 24",fill:"currentColor",children:fr("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"})})},_i=function(){return fr("svg",{viewBox:"0 0 24 24",fill:"currentColor",children:fr("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"})})},bi=function(){return fr("svg",{viewBox:"0 0 24 24",fill:"currentColor",children:fr("path",{d:"M8 5v14l11-7z"})})},Di=function(){return fr("svg",{viewBox:"0 0 24 24",fill:"currentColor",children:fr("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"})})},wi=function(){return fr("svg",{viewBox:"0 0 24 24",fill:"currentColor",children:fr("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"})})},xi=function(){return fr("svg",{viewBox:"0 0 24 24",fill:"currentColor",children:fr("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"})})},ki=function(){return fr("svg",{viewBox:"0 0 24 24",fill:"currentColor",children:fr("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"})})},Ci=function(){return fr("svg",{viewBox:"0 0 24 24",fill:"currentColor",children:fr("path",{d:"M6 19c0 1.1.9 2 2 2h8c1.1 0 2-.9 2-2V7H6v12zM19 4h-3.5l-1-1h-5l-1 1H5v2h14V4z"})})},Ei=function(){return fr("svg",{viewBox:"0 0 24 24",fill:"currentColor",children:fr("path",{d:"M19 13h-6v6h-2v-6H5v-2h6V5h2v6h6v2z"})})},Si=function(){return fr("svg",{viewBox:"0 0 24 24",fill:"currentColor",children:fr("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"})})},Ai=function(){return fr("svg",{viewBox:"0 0 24 24",fill:"currentColor",children:fr("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"})})},Fi=function(){return fr("svg",{viewBox:"0 0 24 24",fill:"currentColor",children:fr("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"})})},Ni=function(){return fr("svg",{viewBox:"0 0 24 24",fill:"currentColor",children:fr("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"})})},Oi=function(){return fr("svg",{viewBox:"0 0 24 24",fill:"currentColor",children:fr("path",{d:"M20 9H4v2h16V9zM4 15h16v-2H4v2z"})})},Ti=n(123),Bi=n.n(Ti),Mi=function(e){return getComputedStyle(document.documentElement).getPropertyValue("--".concat(e))},Li=function(e,t){document.documentElement.style.setProperty("--".concat(e),t)},Pi=function(e){var t=e.activeItem,n=e.items,r=e.color,i=void 0===r?Mi("color-primary"):r,o=e.onChange,a=e.indicatorPlacement,u=void 0===a?"bottom":a,l=re(null),c=_t(X({left:0,width:0,bottom:0}),2),s=c[0],f=c[1];return te((function(){if(l.current){var e=l.current,t=e.offsetLeft,n=e.offsetWidth,r=e.offsetHeight;f({left:t,width:n,bottom:"top"===u?r-2:0})}}),[t,l,n]),fr("div",{className:"vm-tabs",children:[n.map((function(e){return fr("div",{className:Bi()(qn({"vm-tabs-item":!0,"vm-tabs-item_active":t===e.value},e.className||"",e.className)),ref:t===e.value?l:void 0,style:{color:i},onClick:(n=e.value,function(){o(n)}),children:[e.icon&&fr("div",{className:Bi()({"vm-tabs-item__icon":!0,"vm-tabs-item__icon_single":!e.label}),children:e.icon}),e.label]},e.value);var n})),fr("div",{className:"vm-tabs__indicator",style:Kn(Kn({},s),{},{borderColor:i})})]})},Ii=[{value:"chart",icon:fr(wi,{}),label:"Graph",prometheusCode:0},{value:"code",icon:fr(ki,{}),label:"JSON",prometheusCode:3},{value:"table",icon:fr(xi,{}),label:"Table",prometheusCode:1}],$i=function(){var e=Yi().displayType,t=qi();return fr(Pi,{activeItem:e,items:Ii,onChange:function(n){var r;t({type:"SET_DISPLAY_TYPE",payload:null!==(r=n)&&void 0!==r?r:e})}})},Ri=ur("g0.tab",0),ji=Ii.find((function(e){return e.prometheusCode===+Ri||e.value===Ri})),zi=Jr("SERIES_LIMITS"),Ui={displayType:(null===ji||void 0===ji?void 0:ji.value)||"chart",nocache:!1,isTracingEnabled:!1,seriesLimits:zi?JSON.parse(Jr("SERIES_LIMITS")):or};function Hi(e,t){switch(t.type){case"SET_DISPLAY_TYPE":return Kn(Kn({},e),{},{displayType:t.payload});case"SET_SERIES_LIMITS":return Gr("SERIES_LIMITS",JSON.stringify(t.payload)),Kn(Kn({},e),{},{seriesLimits:t.payload});case"TOGGLE_QUERY_TRACING":return Kn(Kn({},e),{},{isTracingEnabled:!e.isTracingEnabled});case"TOGGLE_NO_CACHE":return Kn(Kn({},e),{},{nocache:!e.nocache});default:throw new Error}}var Vi=R({}),Yi=function(){return ue(Vi).state},qi=function(){return ue(Vi).dispatch},Wi={customStep:parseFloat(ur("g0.step_input","0")),yaxis:{limits:{enable:!1,range:{1:[0,0]}}}};function Qi(e,t){switch(t.type){case"TOGGLE_ENABLE_YAXIS_LIMITS":return Kn(Kn({},e),{},{yaxis:Kn(Kn({},e.yaxis),{},{limits:Kn(Kn({},e.yaxis.limits),{},{enable:!e.yaxis.limits.enable})})});case"SET_CUSTOM_STEP":return Kn(Kn({},e),{},{customStep:t.payload});case"SET_YAXIS_LIMITS":return Kn(Kn({},e),{},{yaxis:Kn(Kn({},e.yaxis),{},{limits:Kn(Kn({},e.yaxis.limits),{},{range:t.payload})})});default:throw new Error}}var Gi=R({}),Ji=function(){return ue(Gi).dispatch},Zi={runQuery:0,topN:ur("topN",10),date:ur("date",yr()(new Date).format(wr)),focusLabel:ur("focusLabel",""),match:ur("match",""),extraLabel:ur("extra_label","")};function Ki(e,t){switch(t.type){case"SET_TOP_N":return Kn(Kn({},e),{},{topN:t.payload});case"SET_DATE":return Kn(Kn({},e),{},{date:t.payload});case"SET_MATCH":return Kn(Kn({},e),{},{match:t.payload});case"SET_EXTRA_LABEL":return Kn(Kn({},e),{},{extraLabel:t.payload});case"SET_FOCUS_LABEL":return Kn(Kn({},e),{},{focusLabel:t.payload});case"RUN_QUERY":return Kn(Kn({},e),{},{runQuery:e.runQuery+1});default:throw new Error}}var Xi=R({}),eo=function(){return ue(Xi).state},to=function(){return ue(Xi).dispatch},no={topN:ur("topN",null),maxLifetime:ur("maxLifetime",""),runQuery:0};function ro(e,t){switch(t.type){case"SET_TOP_N":return Kn(Kn({},e),{},{topN:t.payload});case"SET_MAX_LIFE_TIME":return Kn(Kn({},e),{},{maxLifetime:t.payload});case"SET_RUN_QUERY":return Kn(Kn({},e),{},{runQuery:e.runQuery+1});default:throw new Error}}var io,oo=R({}),ao=function(){return ue(oo).state},uo={success:fr(fi,{}),error:fr(si,{}),warning:fr(ci,{}),info:fr(li,{})},lo=function(e){var t=e.variant,n=e.children;return fr("div",{className:Bi()(qn({"vm-alert":!0},"vm-alert_".concat(t),t)),children:[fr("div",{className:"vm-alert__icon",children:uo[t||"info"]}),fr("div",{className:"vm-alert__content",children:n})]})},co=R({showInfoMessage:function(){}}),so=function(){return ue(co)},fo=function(){for(var e=arguments.length,t=new Array(e),n=0;nd,v=r.top-20<0,m=r.left+g.width+20>f,y=r.left-20<0;return h&&(r.top=t.top-g.height-u),v&&(r.top=t.height+t.top+u),m&&(r.left=t.right-g.width-l),y&&(r.left=t.left+l),r}),[n,i,p,t]);d&&po(b,(function(){return v(!1)}),n);var x=Bi()(qn({"vm-popper":!0,"vm-popper_open":p},"vm-popper_open_".concat(l),l));return fr(m,{children:p&&mt.createPortal(fr("div",{className:x,ref:b,style:w,children:t}),document.body)})},mo=function(e){var t=e.children,n=e.title,r=e.open,i=e.placement,o=void 0===i?"bottom-center":i,a=e.offset,u=void 0===a?{top:6,left:0}:a,l=_t(X(!1),2),c=l[0],s=l[1],f=_t(X({width:0,height:0}),2),d=f[0],h=f[1],p=re(null),v=re(null),y=function(){return s(!1)};te((function(){return window.addEventListener("scroll",y),function(){window.removeEventListener("scroll",y)}}),[]),te((function(){v.current&&c&&h({width:v.current.clientWidth,height:v.current.clientHeight})}),[c]);var g=oe((function(){var e,t=null===p||void 0===p||null===(e=p.current)||void 0===e?void 0:e.base;if(!t||!c)return{};var n=t.getBoundingClientRect(),r={top:0,left:0},i="bottom-right"===o||"top-right"===o,a="bottom-left"===o||"top-left"===o,l=null===o||void 0===o?void 0:o.includes("top"),s=(null===u||void 0===u?void 0:u.top)||0,f=(null===u||void 0===u?void 0:u.left)||0;r.left=n.left-(d.width-n.width)/2+f,r.top=n.height+n.top+s,i&&(r.left=n.right-d.width),a&&(r.left=n.left+f),l&&(r.top=n.top-d.height-s);var h=window,v=h.innerWidth,m=h.innerHeight,y=r.top+d.height+20>m,g=r.top-20<0,_=r.left+d.width+20>v,b=r.left-20<0;return y&&(r.top=n.top-d.height-s),g&&(r.top=n.height+n.top+s),_&&(r.left=n.right-d.width-f),b&&(r.left=n.left+f),r.top<0&&(r.top=20),r.left<0&&(r.left=20),r}),[p,o,c,d]),_=function(){"boolean"!==typeof r&&s(!0)},b=function(){s(!1)};return te((function(){"boolean"===typeof r&&s(r)}),[r]),te((function(){var e,t=null===p||void 0===p||null===(e=p.current)||void 0===e?void 0:e.base;if(t)return t.addEventListener("mouseenter",_),t.addEventListener("mouseleave",b),function(){t.removeEventListener("mouseenter",_),t.removeEventListener("mouseleave",b)}}),[p]),fr(m,{children:[fr(m,{ref:p,children:t}),c&&mt.createPortal(fr("div",{className:"vm-tooltip",ref:v,style:g,children:n}),document.body)]})},yo=[{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"}],go=function(){var e=Qr(),t=er(),n=_t(X(!1),2),r=n[0],i=n[1],o=_t(X(yo[0]),2),a=o[0],u=o[1];te((function(){var t,n=a.seconds;return r?t=setInterval((function(){e({type:"RUN_QUERY"})}),1e3*n):u(yo[0]),function(){t&&clearInterval(t)}}),[a,r]);var l=_t(X(!1),2),c=l[0],s=l[1],f=re(null),d=function(e){return function(){!function(e){(r&&!e.seconds||!r&&e.seconds)&&i((function(e){return!e})),u(e),s(!1)}(e)}};return fr(m,{children:[fr("div",{className:"vm-execution-controls",children:fr("div",{className:Bi()({"vm-execution-controls-buttons":!0,"vm-header-button":!t}),children:[fr(mo,{title:"Refresh dashboard",children:fr(ho,{variant:"contained",color:"primary",onClick:function(){e({type:"RUN_QUERY"})},startIcon:fr(di,{})})}),fr(mo,{title:"Auto-refresh control",children:fr("div",{ref:f,children:fr(ho,{variant:"contained",color:"primary",fullWidth:!0,endIcon:fr("div",{className:Bi()({"vm-execution-controls-buttons__arrow":!0,"vm-execution-controls-buttons__arrow_open":c}),children:fr(hi,{})}),onClick:function(){s((function(e){return!e}))},children:a.title})})})]})}),fr(vo,{open:c,placement:"bottom-right",onClose:function(){s(!1)},buttonRef:f,children:fr("div",{className:"vm-execution-controls-list",children:yo.map((function(e){return fr("div",{className:Bi()({"vm-list__item":!0,"vm-list__item_active":e.seconds===a.seconds}),onClick:d(e),children:e.title},e.seconds)}))})})]})},_o=function(e){var t=e.relativeTime,n=e.setDuration;return fr("div",{className:"vm-time-duration",children:Ir.map((function(e){var r,i=e.id,o=e.duration,a=e.until,u=e.title;return fr("div",{className:Bi()({"vm-list__item":!0,"vm-list__item_active":i===t}),onClick:(r={duration:o,until:a(),id:i},function(){n(r)}),children:u||o},i)}))})},bo=function(e){var t=_t(X({width:0,height:0}),2),n=t[0],r=t[1];return te((function(){var t=new ResizeObserver((function(e){var t=e[0].contentRect,n=t.width,i=t.height;r({width:n,height:i})}));return e&&t.observe(e),function(){e&&t.unobserve(e)}}),[]),n},Do=function(e){var t=e.viewDate,n=e.displayYears,r=e.onChangeViewDate;return fr("div",{className:"vm-calendar-header",children:[fr("div",{className:"vm-calendar-header-left",onClick:e.toggleDisplayYears,children:[fr("span",{className:"vm-calendar-header-left__date",children:t.format("MMMM YYYY")}),fr("div",{className:"vm-calendar-header-left__select-year",children:fr(vi,{})})]}),!n&&fr("div",{className:"vm-calendar-header-right",children:[fr("div",{className:"vm-calendar-header-right__prev",onClick:function(){r(t.subtract(1,"month"))},children:fr(hi,{})}),fr("div",{className:"vm-calendar-header-right__next",onClick:function(){r(t.add(1,"month"))},children:fr(hi,{})})]})]})},wo=["Sunday","Monday","Tuesday","Wednesday","Thursday","Friday","Saturday"],xo=function(e){var t=e.viewDate,n=e.selectDate,r=e.onChangeSelectDate,i=yr()().startOf("day"),o=oe((function(){var e=new Array(42).fill(null),n=t.startOf("month"),r=t.endOf("month").diff(n,"day")+1,i=new Array(r).fill(n).map((function(e,t){return e.add(t,"day")})),o=n.day();return e.splice.apply(e,[o,r].concat(bt(i))),e}),[t]),a=function(e){return function(){e&&r(e)}};return fr("div",{className:"vm-calendar-body",children:[wo.map((function(e){return fr("div",{className:"vm-calendar-body-cell vm-calendar-body-cell_weekday",children:e[0]},e)})),o.map((function(e,t){return fr("div",{className:Bi()({"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.toISOString())===n.startOf("day").toISOString(),"vm-calendar-body-cell_day_today":(e&&e.toISOString())===i.toISOString()}),onClick:a(e),children:e&&e.format("D")},e?e.toISOString():t)}))]})},ko=function(e){var t=e.viewDate,n=e.onChangeViewDate,r=oe((function(){return t.format("YYYY")}),[t]),i=oe((function(){var e=yr()().subtract(103,"year");return new Array(206).fill(e).map((function(e,t){return e.add(t,"year")}))}),[t]);te((function(){var e=document.getElementById("vm-calendar-year-".concat(r));e&&e.scrollIntoView({block:"center"})}),[]);return fr("div",{className:"vm-calendar-years",children:i.map((function(e){return fr("div",{className:Bi()({"vm-calendar-years__year":!0,"vm-calendar-years__year_selected":e.format("YYYY")===r}),id:"vm-calendar-year-".concat(e.format("YYYY")),onClick:(t=e,function(){n(t)}),children:e.format("YYYY")},e.format("YYYY"));var t}))})};!function(e){e[e.hour=0]="hour",e[e.minutes=1]="minutes",e[e.seconds=2]="seconds"}(io||(io={}));var Co,Eo=function(e){var t=e.selectDate,n=e.onChangeTime,r=e.onClose,i=_t(X(io.hour),2),o=i[0],a=i[1],u=_t(X(t.format("HH")),2),l=u[0],c=u[1],s=_t(X(t.format("mm")),2),f=s[0],d=s[1],h=_t(X(t.format("ss")),2),p=h[0],v=h[1],m=oe((function(){return o===io.hour?new Array(24).fill("00").map((function(e,t){return{value:t,degrees:t/12*360,offset:0===t||t>12,title:t?"".concat(t):e}})):new Array(60).fill("00").map((function(e,t){return{value:t,degrees:t/60*360,offset:!1,title:t?"".concat(t):e}}))}),[o,l,f,p]),y=oe((function(){switch(o){case io.hour:return+l/12*360;case io.minutes:return+f/60*360;case io.seconds:return+p/60*360}}),[o,l,f,p]),g=re(null),_=re(null),b=re(null),D=function(e){return function(t){!function(e,t){t.target.select(),a(e)}(e,t)}};return te((function(){n("".concat(l,":").concat(f,":").concat(p))}),[l,f,p]),te((function(){c(t.format("HH")),d(t.format("mm")),v(t.format("ss"))}),[t]),te((function(){g.current&&g.current.focus()}),[]),fr("div",{className:"vm-calendar-time-picker",children:[fr("div",{className:"vm-calendar-time-picker-clock",children:[fr("div",{className:Bi()({"vm-calendar-time-picker-clock__arrow":!0,"vm-calendar-time-picker-clock__arrow_offset":o===io.hour&&("00"===l||+l>12)}),style:{transform:"rotate(".concat(y,"deg)")}}),m.map((function(e){return fr("div",{className:Bi()({"vm-calendar-time-picker-clock__time":!0,"vm-calendar-time-picker-clock__time_offset":e.offset,"vm-calendar-time-picker-clock__time_hide":m.length>24&&e.value%5}),style:{transform:"rotate(".concat(e.degrees,"deg)")},onClick:(t=e.value,function(){var e=String(t);switch(o){case io.hour:c(e),_.current&&_.current.focus();break;case io.minutes:d(e),b.current&&b.current.focus();break;case io.seconds:v(e),r()}}),children:fr("span",{style:{transform:"rotate(-".concat(e.degrees,"deg)")},children:e.title})},e.value);var t}))]}),fr("div",{className:"vm-calendar-time-picker-fields",children:[fr("input",{className:"vm-calendar-time-picker-fields__input",value:l,onChange:function(e){var t=e.target,n=t.value,r=+n>23?"23":n;t.value=r,c(r),n.length>1&&_.current&&_.current.focus()},onFocus:D(io.hour),ref:g,type:"number",min:0,max:24}),fr("span",{children:":"}),fr("input",{className:"vm-calendar-time-picker-fields__input",value:f,onChange:function(e){var t=e.target,n=t.value,r=+n>59?"59":n;t.value=r,d(r),n.length>1&&b.current&&b.current.focus()},onFocus:D(io.minutes),ref:_,type:"number",min:0,max:60}),fr("span",{children:":"}),fr("input",{className:"vm-calendar-time-picker-fields__input",value:p,onChange:function(e){var t=e.target,n=t.value,i=+n>59?"59":n;t.value=i,v(i),n.length>1&&b.current&&r()},onFocus:D(io.seconds),ref:b,type:"number",min:0,max:60})]})]})},So=[{value:"date",icon:fr(yi,{})},{value:"time",icon:fr(mi,{})}],Ao=function(e){var t=e.date,n=e.timepicker,r=void 0!==n&&n,i=e.format,o=void 0===i?xr:i,a=e.onChange,u=e.onClose,l=_t(X(!1),2),c=l[0],s=l[1],f=_t(X(yr()(t)),2),d=f[0],h=f[1],p=_t(X(yr()(t)),2),v=p[0],y=p[1],g=_t(X(So[0].value),2),_=g[0],b=g[1],D=function(e){h(e),s(!1)};return te((function(){v.format()!==yr()(t).format()&&a(v.format(o))}),[v]),fr("div",{className:"vm-calendar",children:["date"===_&&fr(Do,{viewDate:d,onChangeViewDate:D,toggleDisplayYears:function(){s((function(e){return!e}))},displayYears:c}),"date"===_&&fr(m,{children:[!c&&fr(xo,{viewDate:d,selectDate:v,onChangeSelectDate:function(e){y(e),r&&b("time")}}),c&&fr(ko,{viewDate:d,onChangeViewDate:D})]}),"time"===_&&fr(Eo,{selectDate:v,onChangeTime:function(e){var t=_t(e.split(":"),3),n=t[0],r=t[1],i=t[2];y((function(e){return e.set("hour",+n).set("minute",+r).set("second",+i)}))},onClose:function(){u&&u()}}),r&&fr("div",{className:"vm-calendar__tabs",children:fr(Pi,{activeItem:_,items:So,onChange:function(e){b(e)},indicatorPlacement:"top"})})]})},Fo=Ce((function(e,t){var n=e.date,r=e.targetRef,i=e.format,o=void 0===i?xr:i,a=e.timepicker,u=e.onChange,l=_t(X(!1),2),c=l[0],s=l[1],f=oe((function(){return n?yr()(n):yr()()}),[n]),d=function(){s((function(e){return!e}))},h=function(){s(!1)},p=function(e){"Escape"!==e.key&&"Enter"!==e.key||h()};return te((function(){var e;return null===(e=r.current)||void 0===e||e.addEventListener("click",d),function(){var e;null===(e=r.current)||void 0===e||e.removeEventListener("click",d)}}),[r]),te((function(){return window.addEventListener("keyup",p),function(){window.removeEventListener("keyup",p)}}),[]),fr(m,{children:fr(vo,{open:c,buttonRef:r,placement:"bottom-right",onClose:h,children:fr("div",{ref:t,children:fr(Ao,{date:f,format:o,timepicker:a,onChange:function(e){a||h(),u(e)},onClose:h})})})})})),No=Fo,Oo=function(){var e=re(null),t=bo(document.body),n=oe((function(){return t.width>1120}),[t]),r=_t(X(),2),i=r[0],o=r[1],a=_t(X(),2),u=a[0],l=a[1],c=oe((function(){return yr()(u).format(xr)}),[u]),s=oe((function(){return yr()(i).format(xr)}),[i]),f=Wr(),d=f.period,h=d.end,p=d.start,v=f.relativeTime,y=Qr(),g=er();te((function(){o(Mr(Pr(h)))}),[h]),te((function(){l(Mr(Pr(p)))}),[p]);var _=oe((function(){return{start:yr()(Pr(p)).format(xr),end:yr()(Pr(h)).format(xr)}}),[p,h]),b=oe((function(){return v&&"none"!==v?v.replace(/_/g," "):"".concat(_.start," - ").concat(_.end)}),[v,_]),D=re(null),w=re(null),x=re(null),k=re(null),C=_t(X(!1),2),E=C[0],S=C[1],A=re(null),F=function(){S(!1)};return po(e,(function(e){var t,n,r=e.target,i=(null===D||void 0===D?void 0:D.current)&&D.current.contains(r),o=(null===w||void 0===w?void 0:w.current)&&w.current.contains(r),a=(null===x||void 0===x?void 0:x.current)&&(null===x||void 0===x||null===(t=x.current)||void 0===t?void 0:t.contains(r)),u=(null===k||void 0===k?void 0:k.current)&&(null===k||void 0===k||null===(n=k.current)||void 0===n?void 0:n.contains(r));i||o||a||u||F()})),fr(m,{children:[fr("div",{ref:A,children:fr(mo,{title:"Time range controls",children:fr(ho,{className:g?"":"vm-header-button",variant:"contained",color:"primary",startIcon:fr(mi,{}),onClick:function(){S((function(e){return!e}))},children:n&&fr("span",{children:b})})})}),fr(vo,{open:E,buttonRef:A,placement:"bottom-right",onClose:F,clickOutside:!1,children:fr("div",{className:"vm-time-selector",ref:e,children:[fr("div",{className:"vm-time-selector-left",children:[fr("div",{className:"vm-time-selector-left-inputs",children:[fr("div",{className:"vm-time-selector-left-inputs__date",ref:D,children:[fr("label",{children:"From:"}),fr("span",{children:c}),fr(yi,{}),fr(No,{ref:x,date:u||"",onChange:function(e){return l(e)},targetRef:D,timepicker:!0})]}),fr("div",{className:"vm-time-selector-left-inputs__date",ref:w,children:[fr("label",{children:"To:"}),fr("span",{children:s}),fr(yi,{}),fr(No,{ref:k,date:i||"",onChange:function(e){return o(e)},targetRef:w,timepicker:!0})]})]}),fr(ho,{variant:"text",startIcon:fr(gi,{}),onClick:function(){return y({type:"RUN_QUERY_TO_NOW"})},children:"switch to now"}),fr("div",{className:"vm-time-selector-left__controls",children:[fr(ho,{color:"error",variant:"outlined",onClick:function(){o(Mr(Pr(h))),l(Mr(Pr(p))),S(!1)},children:"Cancel"}),fr(ho,{color:"primary",onClick:function(){return u&&i&&y({type:"SET_PERIOD",payload:{from:new Date(u),to:new Date(i)}}),void S(!1)},children:"Apply"})]})]}),fr(_o,{relativeTime:v||"",setDuration:function(e){var t=e.duration,n=e.until,r=e.id;y({type:"SET_RELATIVE_TIME",payload:{duration:t,until:n,id:r}}),S(!1)}})]})})]})};!function(e){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"}(Co||(Co={}));var To=function(e){var t=e.label,n=e.value,r=e.type,i=void 0===r?"text":r,o=e.error,a=void 0===o?"":o,u=e.endIcon,l=e.startIcon,c=e.disabled,s=void 0!==c&&c,f=e.autofocus,d=void 0!==f&&f,h=e.helperText,p=e.onChange,v=e.onEnter,m=e.onKeyDown,y=re(null),g=re(null),_=oe((function(){return"textarea"===i?g:y}),[i]),b=Bi()({"vm-text-field__input":!0,"vm-text-field__input_error":a,"vm-text-field__input_icon-start":l,"vm-text-field__input_disabled":s,"vm-text-field__input_textarea":"textarea"===i}),D=function(e){m&&m(e),"Enter"!==e.key||e.shiftKey||(e.preventDefault(),v&&v())},w=function(e){s||p&&p(e.target.value)};return te((function(){var e;d&&(null===_||void 0===_||null===(e=_.current)||void 0===e?void 0:e.focus)&&_.current.focus()}),[_,d]),fr("label",{className:Bi()({"vm-text-field":!0,"vm-text-field_textarea":"textarea"===i}),"data-replicated-value":n,children:[l&&fr("div",{className:"vm-text-field__icon-start",children:l}),u&&fr("div",{className:"vm-text-field__icon-end",children:u}),"textarea"===i?fr("textarea",{className:b,disabled:s,ref:g,value:n,onInput:w,onKeyDown:D,rows:1}):fr("input",{className:b,disabled:s,ref:y,value:n,onInput:w,onKeyDown:D,type:i}),t&&fr("span",{className:"vm-text-field__label",children:t}),fr("span",{className:"vm-text-field__error","data-show":!!a,children:a}),h&&!a&&fr("span",{className:"vm-text-field__helper-text",children:h})]})},Bo=function(e){var t;try{t=new URL(e)}catch(g){return!1}return"http:"===t.protocol||"https:"===t.protocol},Mo=function(e){var t=e.serverUrl,n=e.onChange,r=e.onEnter,i=_t(X(""),2),o=i[0],a=i[1];return fr(To,{autofocus:!0,label:"Server URL",value:t,error:o,onChange:function(e){var t=e||"";n(t),a(""),t||a(Co.emptyServer),Bo(t)||a(Co.validServer)},onEnter:r})},Lo=function(e){var t=e.title,n=e.children,r=e.onClose,i=function(e){"Escape"===e.key&&r()};return te((function(){return window.addEventListener("keyup",i),function(){window.removeEventListener("keyup",i)}}),[]),mt.createPortal(fr("div",{className:"vm-modal",onMouseDown:r,children:fr("div",{className:"vm-modal-content",children:[fr("div",{className:"vm-modal-content-header",children:[t&&fr("div",{className:"vm-modal-content-header__title",children:t}),fr("div",{className:"vm-modal-header__close",children:fr(ho,{variant:"text",size:"small",onClick:r,children:fr(ai,{})})})]}),fr("div",{className:"vm-modal-content-body",onMouseDown:function(e){e.stopPropagation()},children:n})]})}),document.body)},Po=[{label:"Graph",type:"chart"},{label:"JSON",type:"code"},{label:"Table",type:"table"}],Io=function(e){var t=e.limits,n=e.onChange,r=e.onEnter,i=_t(X({table:"",chart:"",code:""}),2),o=i[0],a=i[1],u=function(e){return function(r){!function(e,r){var i=e||"";a((function(e){return Kn(Kn({},e),{},qn({},r,+i<0?Co.positiveNumber:""))})),n(Kn(Kn({},t),{},qn({},r,i||1/0)))}(r,e)}};return fr("div",{className:"vm-limits-configurator",children:[fr("div",{className:"vm-limits-configurator-title",children:["Series limits by tabs",fr(mo,{title:"To disable limits set to 0",children:fr(ho,{variant:"text",color:"primary",size:"small",startIcon:fr(li,{})})}),fr("div",{className:"vm-limits-configurator-title__reset",children:fr(ho,{variant:"text",color:"primary",size:"small",startIcon:fr(ui,{}),onClick:function(){n(or)},children:"Reset"})})]}),fr("div",{className:"vm-limits-configurator__inputs",children:Po.map((function(e){return fr(To,{label:e.label,value:t[e.type],error:o[e.type],onChange:u(e.type),onEnter:r,type:"number"},e.type)}))})]})},$o="Settings",Ro=function(){var e=hr().serverUrl,t=Yi().seriesLimits,n=pr(),r=qi(),i=_t(X(e),2),o=i[0],a=i[1],u=_t(X(t),2),l=u[0],c=u[1],s=_t(X(!1),2),f=s[0],d=s[1],h=function(){return d(!1)},p=function(){n({type:"SET_SERVER",payload:o}),r({type:"SET_SERIES_LIMITS",payload:l}),h()};return fr(m,{children:[fr(mo,{title:$o,children:fr(ho,{className:"vm-header-button",variant:"contained",color:"primary",startIcon:fr(oi,{}),onClick:function(){return d(!0)}})}),f&&fr(Lo,{title:$o,onClose:h,children:fr("div",{className:"vm-server-configurator",children:[fr("div",{className:"vm-server-configurator__input",children:fr(Mo,{serverUrl:o,onChange:a,onEnter:p})}),fr("div",{className:"vm-server-configurator__input",children:fr(Io,{limits:l,onChange:c,onEnter:p})}),fr("div",{className:"vm-server-configurator__footer",children:[fr(ho,{variant:"outlined",color:"error",onClick:h,children:"Cancel"}),fr(ho,{variant:"contained",onClick:p,children:"apply"})]})]})})]})},jo={windows:"Windows",mac:"Mac OS",linux:"Linux"},zo=(Object.values(jo).find((function(e){return navigator.userAgent.indexOf(e)>=0}))||"unknown")===jo.mac?"Cmd":"Ctrl",Uo=[{title:"Query",list:[{keys:["Enter"],description:"Run"},{keys:["Shift","Enter"],description:"Multi-line queries"},{keys:[zo,"Arrow Up"],description:"Previous command from the Query history"},{keys:[zo,"Arrow Down"],description:"Next command from the Query history"}]},{title:"Graph",list:[{keys:[zo,"Scroll Up"],description:"Zoom in"},{keys:[zo,"Scroll Down"],description:"Zoom out"},{keys:[zo,"Click and Drag"],description:"Move the graph left/right"}]},{title:"Legend",list:[{keys:["Mouse Click"],description:"Select series"},{keys:[zo,"Mouse Click"],description:"Toggle multiple series"}]}],Ho=function(){var e=_t(X(!1),2),t=e[0],n=e[1],r=er();return fr(m,{children:[fr(mo,{title:"Shortcut keys",placement:"bottom-center",children:fr(ho,{className:r?"":"vm-header-button",variant:"contained",color:"primary",startIcon:fr(_i,{}),onClick:function(){n(!0)}})}),t&&fr(Lo,{title:"Shortcut keys",onClose:function(){n(!1)},children:fr("div",{className:"vm-shortcuts",children:Uo.map((function(e){return fr("div",{className:"vm-shortcuts-section",children:[fr("h3",{className:"vm-shortcuts-section__title",children:e.title}),fr("div",{className:"vm-shortcuts-section-list",children:e.list.map((function(e){return fr("div",{className:"vm-shortcuts-section-list-item",children:[fr("div",{className:"vm-shortcuts-section-list-item__key",children:e.keys.map((function(t,n){return fr(m,{children:[fr("code",{children:t},t),n!==e.keys.length-1?"+":""]})}))}),fr("p",{className:"vm-shortcuts-section-list-item__description",children:e.description})]},e.keys.join("+"))}))})]},e.title)}))})})]})},Vo=function(){var e=er(),t=re(null),n=eo().date,r=to(),i=oe((function(){return yr()(n).format(wr)}),[n]);return fr("div",{children:[fr("div",{ref:t,children:fr(mo,{title:"Date control",children:fr(ho,{className:e?"":"vm-header-button",variant:"contained",color:"primary",startIcon:fr(yi,{}),children:i})})}),fr(No,{date:n||"",format:wr,onChange:function(e){r({type:"SET_DATE",payload:e})},targetRef:t})]})},Yo=function(){var e=Mi("color-primary"),t=er(),n=Xn().headerStyles,r=(n=void 0===n?{}:n).background,i=void 0===r?t?"#FFF":e:r,o=n.color,a=void 0===o?t?e:"#FFF":o,u=Sn(),l=En(),c=l.search,s=l.pathname,f=oe((function(){return[{label:"Custom panel",value:Jn.home},{label:"Dashboards",value:Jn.dashboards,hide:t},{label:"Cardinality",value:Jn.cardinality},{label:"Top queries",value:Jn.topQueries},{label:"Trace analyzer",value:Jn.trace}]}),[t]),d=_t(X(s),2),h=d[0],p=d[1],v=oe((function(){return(Gn[s]||{}).header||{}}),[s]),m=function(e){u({pathname:e,search:c})};return te((function(){p(s)}),[s]),fr("header",{className:Bi()({"vm-header":!0,"vm-header_app":t}),style:{background:i,color:a},children:[!t&&fr("div",{className:"vm-header-logo",style:{color:a},children:[fr("div",{className:"vm-header-logo__icon",onClick:function(){m(Jn.home),ar({}),window.location.reload()},children:fr(ii,{})}),fr("a",{className:"vm-header-logo__issue",target:"_blank",href:"https://github.com/VictoriaMetrics/VictoriaMetrics/issues/new",rel:"noreferrer",children:"create an issue"})]}),fr("div",{className:"vm-header-nav",children:fr(Pi,{activeItem:h,items:f.filter((function(e){return!e.hide})),color:a,onChange:function(e){p(e),u(e)}})}),fr("div",{className:"vm-header__settings",children:[(null===v||void 0===v?void 0:v.timeSelector)&&fr(Oo,{}),(null===v||void 0===v?void 0:v.cardinalityDatePicker)&&fr(Vo,{}),(null===v||void 0===v?void 0:v.executionControls)&&fr(go,{}),(null===v||void 0===v?void 0:v.globalSettings)&&!t&&fr(Ro,{}),fr(Ho,{})]})]})},qo=function(){var e=er();return fr("section",{className:"vm-container",children:[fr(Yo,{}),fr("div",{className:Bi()({"vm-container-body":!0,"vm-container-body_app":e}),children:fr(In,{})})]})};function Wo(e,t){var n="undefined"!==typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(!n){if(Array.isArray(e)||(n=gt(e))||t&&e&&"number"===typeof e.length){n&&(e=n);var r=0,i=function(){};return{s:i,n:function(){return r>=e.length?{done:!0}:{done:!1,value:e[r++]}},e:function(e){throw e},f:i}}throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}var o,a=!0,u=!1;return{s:function(){n=n.call(e)},n:function(){var e=n.next();return a=e.done,e},e:function(e){u=!0,o=e},f:function(){try{a||null==n.return||n.return()}finally{if(u)throw o}}}}var Qo,Go,Jo="u-off",Zo="u-label",Ko="width",Xo="height",ea="top",ta="bottom",na="left",ra="right",ia="#000",oa="#0000",aa="mousemove",ua="mousedown",la="mouseup",ca="mouseenter",sa="mouseleave",fa="dblclick",da="change",ha="dppxchange",pa="undefined"!=typeof window,va=pa?document:null,ma=pa?window:null,ya=pa?navigator:null;function ga(e,t){if(null!=t){var n=e.classList;!n.contains(t)&&n.add(t)}}function _a(e,t){var n=e.classList;n.contains(t)&&n.remove(t)}function ba(e,t,n){e.style[t]=n+"px"}function Da(e,t,n,r){var i=va.createElement(e);return null!=t&&ga(i,t),null!=n&&n.insertBefore(i,r),i}function wa(e,t){return Da("div",e,t)}var xa=new WeakMap;function ka(e,t,n,r,i){var o="translate("+t+"px,"+n+"px)";o!=xa.get(e)&&(e.style.transform=o,xa.set(e,o),t<0||n<0||t>r||n>i?ga(e,Jo):_a(e,Jo))}var Ca=new WeakMap;function Ea(e,t,n){var r=t+n;r!=Ca.get(e)&&(Ca.set(e,r),e.style.background=t,e.style.borderColor=n)}var Sa=new WeakMap;function Aa(e,t,n,r){var i=t+""+n;i!=Sa.get(e)&&(Sa.set(e,i),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)}var Fa={passive:!0},Na=Kn(Kn({},Fa),{},{capture:!0});function Oa(e,t,n,r){t.addEventListener(e,n,r?Na:Fa)}function Ta(e,t,n,r){t.removeEventListener(e,n,r?Na:Fa)}function Ba(e,t,n,r){var i;n=n||0;for(var o=(r=r||t.length-1)<=2147483647;r-n>1;)t[i=o?n+r>>1:Ka((n+r)/2)]=t&&i<=n;i+=r)if(null!=e[i])return i;return-1}function La(e,t,n,r){var i=lu,o=-lu;if(1==r)i=e[t],o=e[n];else if(-1==r)i=e[n],o=e[t];else for(var a=t;a<=n;a++)null!=e[a]&&(i=tu(i,e[a]),o=nu(o,e[a]));return[i,o]}function Pa(e,t,n){for(var r=lu,i=-lu,o=t;o<=n;o++)e[o]>0&&(r=tu(r,e[o]),i=nu(i,e[o]));return[r==lu?1:r,i==-lu?10:i]}pa&&function e(){var t=devicePixelRatio;Qo!=t&&(Qo=t,Go&&Ta(da,Go,e),Go=matchMedia("(min-resolution: ".concat(Qo-.001,"dppx) and (max-resolution: ").concat(Qo+.001,"dppx)")),Oa(da,Go,e),ma.dispatchEvent(new CustomEvent(ha)))}();var Ia=[0,0];function $a(e,t,n,r){return Ia[0]=n<0?bu(e,-n):e,Ia[1]=r<0?bu(t,-r):t,Ia}function Ra(e,t,n,r){var i,o,a,u=iu(e),l=10==n?ou:au;return e==t&&(-1==u?(e*=n,t/=n):(e/=n,t*=n)),r?(i=Ka(l(e)),o=eu(l(t)),e=(a=$a(ru(n,i),ru(n,o),i,o))[0],t=a[1]):(i=Ka(l(Za(e))),o=Ka(l(Za(t))),e=_u(e,(a=$a(ru(n,i),ru(n,o),i,o))[0]),t=gu(t,a[1])),[e,t]}function ja(e,t,n,r){var i=Ra(e,t,n,r);return 0==e&&(i[0]=0),0==t&&(i[1]=0),i}var za={mode:3,pad:.1},Ua={pad:0,soft:null,mode:0},Ha={min:Ua,max:Ua};function Va(e,t,n,r){return Fu(n)?qa(e,t,n):(Ua.pad=n,Ua.soft=r?0:null,Ua.mode=r?3:0,qa(e,t,Ha))}function Ya(e,t){return null==e?t:e}function qa(e,t,n){var r=n.min,i=n.max,o=Ya(r.pad,0),a=Ya(i.pad,0),u=Ya(r.hard,-lu),l=Ya(i.hard,lu),c=Ya(r.soft,lu),s=Ya(i.soft,-lu),f=Ya(r.mode,0),d=Ya(i.mode,0),h=t-e;h<1e-9&&(h=0,0!=e&&0!=t||(h=1e-9,2==f&&c!=lu&&(o=0),2==d&&s!=-lu&&(a=0)));var p=h||Za(t)||1e3,v=ou(p),m=ru(10,Ka(v)),y=bu(_u(e-p*(0==h?0==e?.1:1:o),m/10),9),g=e>=c&&(1==f||3==f&&y<=c||2==f&&y>=c)?c:lu,_=nu(u,y=g?g:tu(g,y)),b=bu(gu(t+p*(0==h?0==t?.1:1:a),m/10),9),D=t<=s&&(1==d||3==d&&b>=s||2==d&&b<=s)?s:-lu,w=tu(l,b>D&&t<=D?D:nu(D,b));return _==w&&0==_&&(w=100),[_,w]}var Wa=new Intl.NumberFormat(pa?ya.language:"en-US"),Qa=function(e){return Wa.format(e)},Ga=Math,Ja=Ga.PI,Za=Ga.abs,Ka=Ga.floor,Xa=Ga.round,eu=Ga.ceil,tu=Ga.min,nu=Ga.max,ru=Ga.pow,iu=Ga.sign,ou=Ga.log10,au=Ga.log2,uu=function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:1;return Ga.asinh(e/t)},lu=1/0;function cu(e){return 1+(0|ou((e^e>>31)-(e>>31)))}function su(e,t){return Xa(e/t)*t}function fu(e,t,n){return tu(nu(e,t),n)}function du(e){return"function"==typeof e?e:function(){return e}}var hu=function(e){return e},pu=function(e,t){return t},vu=function(e){return null},mu=function(e){return!0},yu=function(e,t){return e==t};function gu(e,t){return eu(e/t)*t}function _u(e,t){return Ka(e/t)*t}function bu(e,t){return Xa(e*(t=Math.pow(10,t)))/t}var Du=new Map;function wu(e){return((""+e).split(".")[1]||"").length}function xu(e,t,n,r){for(var i=[],o=r.map(wu),a=t;a=0&&a>=0?0:u)+(a>=o[c]?0:o[c]),d=bu(s,f);i.push(d),Du.set(d,f)}return i}var ku={},Cu=[],Eu=[null,null],Su=Array.isArray;function Au(e){return"string"==typeof e}function Fu(e){var t=!1;if(null!=e){var n=e.constructor;t=null==n||n==Object}return t}function Nu(e){return null!=e&&"object"==typeof e}var Ou=Object.getPrototypeOf(Uint8Array);function Tu(e){var t,n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:Fu;if(Su(e)){var r=e.find((function(e){return null!=e}));if(Su(r)||n(r)){t=Array(e.length);for(var i=0;io){for(r=a-1;r>=0&&null==e[r];)e[r--]=null;for(r=a+1;r12?t-12:t},AA:function(e){return e.getHours()>=12?"PM":"AM"},aa:function(e){return e.getHours()>=12?"pm":"am"},a:function(e){return e.getHours()>=12?"p":"a"},mm:function(e){return Uu(e.getMinutes())},m:function(e){return e.getMinutes()},ss:function(e){return Uu(e.getSeconds())},s:function(e){return e.getSeconds()},fff:function(e){return((t=e.getMilliseconds())<10?"00":t<100?"0":"")+t;var t}};function Vu(e,t){t=t||zu;for(var n,r=[],i=/\{([a-z]+)\}|[^{]+/gi;n=i.exec(e);)r.push("{"==n[0][0]?Hu[n[1]]:n[0]);return function(e){for(var n="",i=0;i=a,v=f>=o&&f=i?i:f,N=_+(Ka(c)-Ka(y))+gu(y-_,F);h.push(N);for(var O=t(N),T=O.getHours()+O.getMinutes()/n+O.getSeconds()/r,B=f/r,M=d/u.axes[l]._space;!((N=bu(N+f,1==e?0:3))>s);)if(B>1){var L=Ka(bu(T+B,6))%24,P=t(N).getHours()-L;P>1&&(P=-1),T=(T+B)%24,bu(((N-=P*r)-h[h.length-1])/f,3)*M>=.7&&h.push(N)}else h.push(N)}return h}}]}var cl=_t(ll(1),3),sl=cl[0],fl=cl[1],dl=cl[2],hl=_t(ll(.001),3),pl=hl[0],vl=hl[1],ml=hl[2];function yl(e,t){return e.map((function(e){return e.map((function(n,r){return 0==r||8==r||null==n?n:t(1==r||0==e[8]?n:e[1]+n)}))}))}function gl(e,t){return function(n,r,i,o,a){var u,l,c,s,f,d,h=t.find((function(e){return a>=e[0]}))||t[t.length-1];return r.map((function(t){var n=e(t),r=n.getFullYear(),i=n.getMonth(),o=n.getDate(),a=n.getHours(),p=n.getMinutes(),v=n.getSeconds(),m=r!=u&&h[2]||i!=l&&h[3]||o!=c&&h[4]||a!=s&&h[5]||p!=f&&h[6]||v!=d&&h[7]||h[1];return u=r,l=i,c=o,s=a,f=p,d=v,m(n)}))}}function _l(e,t,n){return new Date(e,t,n)}function bl(e,t){return t(e)}xu(2,-53,53,[1]);function Dl(e,t){return function(n,r){return t(e(r))}}var wl={show:!0,live:!0,isolate:!1,markers:{show:!0,width:2,stroke:function(e,t){var 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:[]};var xl=[0,0];function kl(e,t,n){return function(e){0==e.button&&n(e)}}function Cl(e,t,n){return n}var El={show:!0,x:!0,y:!0,lock:!1,move:function(e,t,n){return xl[0]=t,xl[1]=n,xl},points:{show:function(e,t){var n=e.cursor.points,r=wa(),i=n.size(e,t);ba(r,Ko,i),ba(r,Xo,i);var o=i/-2;ba(r,"marginLeft",o),ba(r,"marginTop",o);var a=n.width(e,t,i);return a&&ba(r,"borderWidth",a),r},size:function(e,t){return ql(e.series[t].points.width,1)},width:0,stroke:function(e,t){var n=e.series[t].points;return n._stroke||n._fill},fill:function(e,t){var n=e.series[t].points;return n._fill||n._stroke}},bind:{mousedown:kl,mouseup:kl,click:kl,dblclick:kl,mousemove:Cl,mouseleave:Cl,mouseenter:Cl},drag:{setScale:!0,x:!0,y:!1,dist:0,uni:null,_x:!1,_y:!1},focus:{prox:-1},left:-10,top:-10,idx:null,dataIdx:function(e,t,n){return n},idxs:null},Sl={show:!0,stroke:"rgba(0,0,0,0.07)",width:2},Al=Bu({},Sl,{filter:pu}),Fl=Bu({},Al,{size:10}),Nl=Bu({},Sl,{show:!1}),Ol='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"',Tl="bold "+Ol,Bl={show:!0,scale:"x",stroke:ia,space:50,gap:5,size:50,labelGap:0,labelSize:30,labelFont:Tl,side:2,grid:Al,ticks:Fl,border:Nl,font:Ol,rotate:0},Ml={show:!0,scale:"x",auto:!1,sorted:1,min:lu,max:-lu,idxs:[]};function Ll(e,t,n,r,i){return t.map((function(e){return null==e?"":Qa(e)}))}function Pl(e,t,n,r,i,o,a){for(var u=[],l=Du.get(i)||0,c=n=a?n:bu(gu(n,i),l);c<=r;c=bu(c+i,l))u.push(Object.is(c,-0)?0:c);return u}function Il(e,t,n,r,i,o,a){var u=[],l=e.scales[e.axes[t].scale].log,c=Ka((10==l?ou:au)(n));i=ru(l,c),c<0&&(i=bu(i,-c));var s=n;do{u.push(s),(s=bu(s+i,Du.get(i)))>=i*l&&(i=s)}while(s<=r);return u}function $l(e,t,n,r,i,o,a){var u=e.scales[e.axes[t].scale].asinh,l=r>u?Il(e,t,nu(u,n),r,i):[u],c=r>=0&&n<=0?[0]:[];return(n<-u?Il(e,t,nu(u,-r),-n,i):[u]).reverse().map((function(e){return-e})).concat(c,l)}var Rl=/./,jl=/[12357]/,zl=/[125]/,Ul=/1/;function Hl(e,t,n,r,i){var o=e.axes[n],a=o.scale,u=e.scales[a];if(3==u.distr&&2==u.log)return t;var l=e.valToPos,c=o._space,s=l(10,a),f=l(9,a)-s>=c?Rl:l(7,a)-s>=c?jl:l(5,a)-s>=c?zl:Ul;return t.map((function(e){return 4==u.distr&&0==e||f.test(e)?e:null}))}function Vl(e,t){return null==t?"":Qa(t)}var Yl={show:!0,scale:"y",stroke:ia,space:30,gap:5,size:50,labelGap:0,labelSize:30,labelFont:Tl,side:3,grid:Al,ticks:Fl,border:Nl,font:Ol,rotate:0};function ql(e,t){return bu((3+2*(e||1))*t,3)}var Wl={scale:null,auto:!0,sorted:0,min:lu,max:-lu},Ql={show:!0,auto:!0,sorted:0,alpha:1,facets:[Bu({},Wl,{scale:"x"}),Bu({},Wl,{scale:"y"})]},Gl={scale:"y",auto:!0,sorted:0,show:!0,spanGaps:!1,gaps:function(e,t,n,r,i){return i},alpha:1,points:{show:function(e,t){var n=e.series[0],r=n.scale,i=n.idxs,o=e._data[0],a=e.valToPos(o[i[0]],r,!0),u=e.valToPos(o[i[1]],r,!0),l=Za(u-a)/(e.series[t].points.space*Qo);return i[1]-i[0]<=l},filter:null},values:null,min:lu,max:-lu,idxs:[],path:null,clip:null};function Jl(e,t,n,r,i){return n/10}var Zl={time:!0,auto:!0,distr:1,log:10,asinh:1,min:null,max:null,dir:1,ori:0},Kl=Bu({},Zl,{time:!1,ori:1}),Xl={};function ec(e,t){var n=Xl[e];return n||(n={key:e,plots:[],sub:function(e){n.plots.push(e)},unsub:function(e){n.plots=n.plots.filter((function(t){return t!=e}))},pub:function(e,t,r,i,o,a,u){for(var l=0;l0){a=new Path2D;for(var u=0==t?hc:pc,l=n,c=0;cs[0]){var f=s[0]-l;f>0&&u(a,l,r,f,r+o),l=s[1]}}var d=n+i-l;d>0&&u(a,l,r,d,r+o)}return a}function ac(e,t,n,r,i,o,a){for(var u=[],l=1==i?n:r;l>=n&&l<=r;l+=i){if(null===t[l]){var c=l,s=l;if(1==i)for(;++l<=r&&null===t[l];)s=l;else for(;--l>=n&&null===t[l];)s=l;var f=o(e[c]),d=s==c?f:o(e[s]);f=a<=0?o(e[c-i]):f,(d=a>=0?o(e[s+i]):d)>=f&&u.push([f,d])}}return u}function uc(e){return 0==e?hu:1==e?Xa:function(t){return su(t,e)}}function lc(e){var t=0==e?cc:sc,n=0==e?function(e,t,n,r,i,o){e.arcTo(t,n,r,i,o)}:function(e,t,n,r,i,o){e.arcTo(n,t,i,r,o)},r=0==e?function(e,t,n,r,i){e.rect(t,n,r,i)}:function(e,t,n,r,i){e.rect(n,t,i,r)};return function(e,i,o,a,u){var l=arguments.length>5&&void 0!==arguments[5]?arguments[5]:0;0==l?r(e,i,o,a,u):(l=tu(l,a/2,u/2),t(e,i+l,o),n(e,i+a,o,i+a,o+u,l),n(e,i+a,o+u,i,o+u,l),n(e,i,o+u,i,o,l),n(e,i,o,i+a,o,l),e.closePath())}}var cc=function(e,t,n){e.moveTo(t,n)},sc=function(e,t,n){e.moveTo(n,t)},fc=function(e,t,n){e.lineTo(t,n)},dc=function(e,t,n){e.lineTo(n,t)},hc=lc(0),pc=lc(1),vc=function(e,t,n,r,i,o){e.arc(t,n,r,i,o)},mc=function(e,t,n,r,i,o){e.arc(n,t,r,i,o)},yc=function(e,t,n,r,i,o,a){e.bezierCurveTo(t,n,r,i,o,a)},gc=function(e,t,n,r,i,o,a){e.bezierCurveTo(n,t,i,r,a,o)};function _c(e){return function(e,t,n,r,i){return tc(e,t,(function(t,o,a,u,l,c,s,f,d,h,p){var v,m,y=t.pxRound,g=t.points;0==u.ori?(v=cc,m=vc):(v=sc,m=mc);var _=bu(g.width*Qo,3),b=(g.size-g.width)/2*Qo,D=bu(2*b,3),w=new Path2D,x=new Path2D,k=e.bbox,C=k.left,E=k.top,S=k.width,A=k.height;hc(x,C-D,E-D,S+2*D,A+2*D);var F=function(e){if(null!=a[e]){var t=y(c(o[e],u,h,f)),n=y(s(a[e],l,p,d));v(w,t+b,n),m(w,t,n,b,0,2*Ja)}};if(i)i.forEach(F);else for(var N=n;N<=r;N++)F(N);return{stroke:_>0?w:null,fill:w,clip:x,flags:3}}))}}function bc(e){return function(t,n,r,i,o,a){r!=i&&(o!=r&&a!=r&&e(t,n,r),o!=i&&a!=i&&e(t,n,i),e(t,n,a))}}var Dc=bc(fc),wc=bc(dc);function xc(e){var t=Ya(null===e||void 0===e?void 0:e.alignGaps,0);return function(e,n,r,i){return tc(e,n,(function(o,a,u,l,c,s,f,d,h,p,v){var m,y,g=o.pxRound,_=function(e){return g(s(e,l,p,d))},b=function(e){return g(f(e,c,v,h))};0==l.ori?(m=fc,y=Dc):(m=dc,y=wc);for(var D,w,x,k=l.dir*(0==l.ori?1:-1),C={stroke:new Path2D,fill:null,clip:null,band:null,gaps:null,flags:1},E=C.stroke,S=lu,A=-lu,F=_(a[1==k?r:i]),N=Ma(u,r,i,1*k),O=Ma(u,r,i,-1*k),T=_(a[N]),B=_(a[O]),M=1==k?r:i;M>=r&&M<=i;M+=k){var L=_(a[M]);L==F?null!=u[M]&&(w=b(u[M]),S==lu&&(m(E,L,w),D=w),S=tu(w,S),A=nu(w,A)):(S!=lu&&(y(E,F,S,A,D,w),x=F),null!=u[M]?(m(E,L,w=b(u[M])),S=A=D=w):(S=lu,A=-lu),F=L)}S!=lu&&S!=A&&x!=F&&y(E,F,S,A,D,w);var P=_t(nc(e,n),2),I=P[0],$=P[1];if(null!=o.fill||0!=I){var R=C.fill=new Path2D(E),j=b(o.fillTo(e,n,o.min,o.max,I));m(R,B,j),m(R,T,j)}if(!o.spanGaps){var z,U=[];(z=U).push.apply(z,bt(ac(a,u,r,i,k,_,t))),C.gaps=U=o.gaps(e,n,r,i,U),C.clip=oc(U,l.ori,d,h,p,v)}return 0!=$&&(C.band=2==$?[ic(e,n,r,i,E,-1),ic(e,n,r,i,E,1)]:ic(e,n,r,i,E,$)),C}))}}function kc(e,t,n,r,i,o){var a=e.length;if(a<2)return null;var u=new Path2D;if(n(u,e[0],t[0]),2==a)r(u,e[1],t[1]);else{for(var l=Array(a),c=Array(a-1),s=Array(a-1),f=Array(a-1),d=0;d0!==c[h]>0?l[h]=0:(l[h]=3*(f[h-1]+f[h])/((2*f[h]+f[h-1])/c[h-1]+(f[h]+2*f[h-1])/c[h]),isFinite(l[h])||(l[h]=0));l[a-1]=c[a-2];for(var p=0;p=i&&o+(l<5?Du.get(l):0)<=17)return[l,c]}while(++u0?e:t.clamp(r,e,t.min,t.max,t.key)):4==t.distr?uu(e,t.asinh):e)-t._min)/(t._max-t._min)}function a(e,t,n,r){var i=o(e,t);return r+n*(-1==t.dir?1-i:i)}function u(e,t,n,r){var i=o(e,t);return r+n*(-1==t.dir?i:1-i)}function l(e,t,n,r){return 0==t.ori?a(e,t,n,r):u(e,t,n,r)}r.valToPosH=a,r.valToPosV=u;var c=!1;r.status=0;var s=r.root=wa("uplot");(null!=e.id&&(s.id=e.id),ga(s,e.class),e.title)&&(wa("u-title",s).textContent=e.title);var f=Da("canvas"),d=r.ctx=f.getContext("2d"),h=wa("u-wrap",s),p=r.under=wa("u-under",h);h.appendChild(f);var v=r.over=wa("u-over",h),m=+Ya((e=Tu(e)).pxAlign,1),y=uc(m);(e.plugins||[]).forEach((function(t){t.opts&&(e=t.opts(r,e)||e)}));var g=e.ms||.001,_=r.series=1==i?Fc(e.series||[],Ml,Gl,!1):function(e,t){return e.map((function(e,n){return 0==n?null:Bu({},t,e)}))}(e.series||[null],Ql),b=r.axes=Fc(e.axes||[],Bl,Yl,!0),D=r.scales={},w=r.bands=e.bands||[];w.forEach((function(e){e.fill=du(e.fill||null),e.dir=Ya(e.dir,-1)}));var x=2==i?_[1].facets[0].scale:_[0].scale,k={axes:function(){for(var e=function(e){var t=b[e];if(!t.show||!t._show)return"continue";var n=t.side,i=n%2,o=void 0,a=void 0,u=t.stroke(r,e),c=0==n||3==n?-1:1;if(t.label){var s=t.labelGap*c,f=Xa((t._lpos+s)*Qo);Ze(t.labelFont[0],u,"center",2==n?ea:ta),d.save(),1==i?(o=a=0,d.translate(f,Xa(de+pe/2)),d.rotate((3==n?-Ja:Ja)/2)):(o=Xa(fe+he/2),a=f),d.fillText(t.label,o,a),d.restore()}var h=_t(t._found,2),p=h[0],v=h[1];if(0==v)return"continue";var m=D[t.scale],g=0==i?he:pe,_=0==i?fe:de,w=Xa(t.gap*Qo),x=t._splits,k=2==m.distr?x.map((function(e){return qe[e]})):x,C=2==m.distr?qe[x[1]]-qe[x[0]]:p,E=t.ticks,S=t.border,A=E.show?Xa(E.size*Qo):0,F=t._rotate*-Ja/180,N=y(t._pos*Qo),O=N+(A+w)*c;a=0==i?O:0,o=1==i?O:0,Ze(t.font[0],u,1==t.align?na:2==t.align?ra:F>0?na:F<0?ra:0==i?"center":3==n?ra:na,F||1==i?"middle":2==n?ea:ta);for(var T=1.5*t.font[1],B=x.map((function(e){return y(l(e,m,g,_))})),M=t._values,L=0;L0&&(_.forEach((function(e,n){if(n>0&&e.show&&null==e._paths){var i=function(e){var t=fu(He-1,0,Ne-1),n=fu(Ve+1,0,Ne-1);for(;null==e[t]&&t>0;)t--;for(;null==e[n]&&n0&&e.show){je!=e.alpha&&(d.globalAlpha=je=e.alpha),Xe(t,!1),e._paths&&et(t,!1),Xe(t,!0);var n=e.points.show(r,t,He,Ve),i=e.points.filter(r,t,n,e._paths?e._paths.gaps:null);(n||i)&&(e.points._paths=e.points.paths(r,t,He,Ve,i),et(t,!0)),1!=je&&(d.globalAlpha=je=1),on("drawSeries",t)}})))}},C=(e.drawOrder||["axes","series"]).map((function(e){return k[e]}));function E(t){var n=D[t];if(null==n){var r=(e.scales||ku)[t]||ku;if(null!=r.from)E(r.from),D[t]=Bu({},D[r.from],r,{key:t});else{(n=D[t]=Bu({},t==x?Zl:Kl,r)).key=t;var o=n.time,a=n.range,u=Su(a);if((t!=x||2==i&&!o)&&(!u||null!=a[0]&&null!=a[1]||(a={min:null==a[0]?za:{mode:1,hard:a[0],soft:a[0]},max:null==a[1]?za:{mode:1,hard:a[1],soft:a[1]}},u=!1),!u&&Fu(a))){var l=a;a=function(e,t,n){return null==t?Eu:Va(t,n,l)}}n.range=du(a||(o?Tc:t==x?3==n.distr?Lc:4==n.distr?Ic:Oc:3==n.distr?Mc:4==n.distr?Pc:Bc)),n.auto=du(!u&&n.auto),n.clamp=du(n.clamp||Jl),n._min=n._max=null}}}for(var S in E("x"),E("y"),1==i&&_.forEach((function(e){E(e.scale)})),b.forEach((function(e){E(e.scale)})),e.scales)E(S);var A,F,N=D[x],O=N.distr;0==N.ori?(ga(s,"u-hz"),A=a,F=u):(ga(s,"u-vt"),A=u,F=a);var T={};for(var B in D){var M=D[B];null==M.min&&null==M.max||(T[B]={min:M.min,max:M.max},M.min=M.max=null)}var L,P=e.tzDate||function(e){return new Date(Xa(e/g))},I=e.fmtDate||Vu,$=1==g?dl(P):ml(P),R=gl(P,yl(1==g?fl:vl,I)),j=Dl(P,bl("{YYYY}-{MM}-{DD} {h}:{mm}{aa}",I)),z=[],U=r.legend=Bu({},wl,e.legend),H=U.show,V=U.markers;U.idxs=z,V.width=du(V.width),V.dash=du(V.dash),V.stroke=du(V.stroke),V.fill=du(V.fill);var Y,q=[],W=[],Q=!1,G={};if(U.live){var J=_[1]?_[1].values:null;for(var Z in Y=(Q=null!=J)?J(r,1,0):{_:0})G[Z]="--"}if(H)if(L=Da("table","u-legend",s),Q){var K=Da("tr","u-thead",L);for(var X in Da("th",null,K),Y)Da("th",Zo,K).textContent=X}else ga(L,"u-inline"),U.live&&ga(L,"u-live");var ee={show:!0},te={show:!1};var ne=new Map;function re(e,t,n){var i=ne.get(t)||{},o=we.bind[e](r,t,n);o&&(Oa(e,t,i[e]=o),ne.set(t,i))}function ie(e,t,n){var r=ne.get(t)||{};for(var i in r)null!=e&&i!=e||(Ta(i,t,r[i]),delete r[i]);null==e&&ne.delete(t)}var oe=0,ae=0,ue=0,le=0,ce=0,se=0,fe=0,de=0,he=0,pe=0;r.bbox={};var ve=!1,me=!1,ye=!1,ge=!1,_e=!1;function be(e,t,n){(n||e!=r.width||t!=r.height)&&De(e,t),ut(!1),ye=!0,me=!0,ge=_e=we.left>=0,wt()}function De(e,t){r.width=oe=ue=e,r.height=ae=le=t,ce=se=0,function(){var e=!1,t=!1,n=!1,r=!1;b.forEach((function(i,o){if(i.show&&i._show){var a=i.side,u=a%2,l=i._size+(null!=i.label?i.labelSize:0);l>0&&(u?(ue-=l,3==a?(ce+=l,r=!0):n=!0):(le-=l,0==a?(se+=l,e=!0):t=!0))}})),Ae[0]=e,Ae[1]=n,Ae[2]=t,Ae[3]=r,ue-=Ue[1]+Ue[3],ce+=Ue[3],le-=Ue[2]+Ue[0],se+=Ue[0]}(),function(){var e=ce+ue,t=se+le,n=ce,r=se;function i(i,o){switch(i){case 1:return(e+=o)-o;case 2:return(t+=o)-o;case 3:return(n-=o)+o;case 0:return(r-=o)+o}}b.forEach((function(e,t){if(e.show&&e._show){var n=e.side;e._pos=i(n,e._size),null!=e.label&&(e._lpos=i(n,e.labelSize))}}))}();var n=r.bbox;fe=n.left=su(ce*Qo,.5),de=n.top=su(se*Qo,.5),he=n.width=su(ue*Qo,.5),pe=n.height=su(le*Qo,.5)}r.setSize=function(e){be(e.width,e.height)};var we=r.cursor=Bu({},El,{drag:{y:2==i}},e.cursor);we.idxs=z,we._lock=!1;var xe=we.points;xe.show=du(xe.show),xe.size=du(xe.size),xe.stroke=du(xe.stroke),xe.width=du(xe.width),xe.fill=du(xe.fill);var ke=r.focus=Bu({},e.focus||{alpha:.3},we.focus),Ce=ke.prox>=0,Ee=[null];function Se(e,t){if(1==i||t>0){var n=1==i&&D[e.scale].time,o=e.value;e.value=n?Au(o)?Dl(P,bl(o,I)):o||j:o||Vl,e.label=e.label||(n?"Time":"Value")}if(t>0){e.width=null==e.width?1:e.width,e.paths=e.paths||Sc||vu,e.fillTo=du(e.fillTo||rc),e.pxAlign=+Ya(e.pxAlign,m),e.pxRound=uc(e.pxAlign),e.stroke=du(e.stroke||null),e.fill=du(e.fill||null),e._stroke=e._fill=e._paths=e._focus=null;var a=ql(e.width,1),u=e.points=Bu({},{size:a,width:nu(1,.2*a),stroke:e.stroke,space:2*a,paths:Ac,_stroke:null,_fill:null},e.points);u.show=du(u.show),u.filter=du(u.filter),u.fill=du(u.fill),u.stroke=du(u.stroke),u.paths=du(u.paths),u.pxAlign=e.pxAlign}if(H){var l=function(e,t){if(0==t&&(Q||!U.live||2==i))return Eu;var n=[],o=Da("tr","u-series",L,L.childNodes[t]);ga(o,e.class),e.show||ga(o,Jo);var a=Da("th",null,o);if(V.show){var u=wa("u-marker",a);if(t>0){var l=V.width(r,t);l&&(u.style.border=l+"px "+V.dash(r,t)+" "+V.stroke(r,t)),u.style.background=V.fill(r,t)}}var c=wa(Zo,a);for(var s in c.textContent=e.label,t>0&&(V.show||(c.style.color=e.width>0?V.stroke(r,t):V.fill(r,t)),re("click",a,(function(t){if(!we._lock){var n=_.indexOf(e);if((t.ctrlKey||t.metaKey)!=U.isolate){var r=_.some((function(e,t){return t>0&&t!=n&&e.show}));_.forEach((function(e,t){t>0&&Pt(t,r?t==n?ee:te:ee,!0,an.setSeries)}))}else Pt(n,{show:!e.show},!0,an.setSeries)}})),Ce&&re(ca,a,(function(t){we._lock||Pt(_.indexOf(e),It,!0,an.setSeries)}))),Y){var f=Da("td","u-value",o);f.textContent="--",n.push(f)}return[o,n]}(e,t);q.splice(t,0,l[0]),W.splice(t,0,l[1]),U.values.push(null)}if(we.show){z.splice(t,0,null);var c=function(e,t){if(t>0){var n=we.points.show(r,t);if(n)return ga(n,"u-cursor-pt"),ga(n,e.class),ka(n,-10,-10,ue,le),v.insertBefore(n,Ee[t]),n}}(e,t);c&&Ee.splice(t,0,c)}on("addSeries",t)}r.addSeries=function(e,t){e=Nc(e,t=null==t?_.length:t,Ml,Gl),_.splice(t,0,e),Se(_[t],t)},r.delSeries=function(e){if(_.splice(e,1),H){U.values.splice(e,1),W.splice(e,1);var t=q.splice(e,1)[0];ie(null,t.firstChild),t.remove()}we.show&&(z.splice(e,1),Ee.length>1&&Ee.splice(e,1)[0].remove()),on("delSeries",e)};var Ae=[!1,!1,!1,!1];function Fe(e,t,n,r){var i=_t(n,4),o=i[0],a=i[1],u=i[2],l=i[3],c=t%2,s=0;return 0==c&&(l||a)&&(s=0==t&&!o||2==t&&!u?Xa(Bl.size/3):0),1==c&&(o||u)&&(s=1==t&&!a||3==t&&!l?Xa(Yl.size/2):0),s}var Ne,Oe,Te,Be,Me,Le,Pe,Ie,$e,Re,je,ze=r.padding=(e.padding||[Fe,Fe,Fe,Fe]).map((function(e){return du(Ya(e,Fe))})),Ue=r._padding=ze.map((function(e,t){return e(r,t,Ae,0)})),He=null,Ve=null,Ye=1==i?_[0].idxs:null,qe=null,We=!1;function Qe(e,n){if(t=null==e?[]:Tu(e,Nu),2==i){Ne=0;for(var o=1;o<_.length;o++)Ne+=t[o][0].length;r.data=t=e}else if(null==t[0]&&(t[0]=[]),r.data=t.slice(),qe=t[0],Ne=qe.length,2==O){t[0]=Array(Ne);for(var a=0;a=0,_e=!0,wt()}}function Ge(){var e,n;if(We=!0,1==i)if(Ne>0){if(He=Ye[0]=0,Ve=Ye[1]=Ne-1,e=t[0][He],n=t[0][Ve],2==O)e=He,n=Ve;else if(1==Ne)if(3==O){var r=_t(Ra(e,e,N.log,!1),2);e=r[0],n=r[1]}else if(4==O){var o=_t(ja(e,e,N.log,!1),2);e=o[0],n=o[1]}else if(N.time)n=e+Xa(86400/g);else{var a=_t(Va(e,n,.1,!0),2);e=a[0],n=a[1]}}else He=Ye[0]=e=null,Ve=Ye[1]=n=null;Lt(x,e,n)}function Je(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:oa,t=arguments.length>1?arguments[1]:void 0,n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:Cu,r=arguments.length>3&&void 0!==arguments[3]?arguments[3]:"butt",i=arguments.length>4&&void 0!==arguments[4]?arguments[4]:oa,o=arguments.length>5&&void 0!==arguments[5]?arguments[5]:"round";e!=Oe&&(d.strokeStyle=Oe=e),i!=Te&&(d.fillStyle=Te=i),t!=Be&&(d.lineWidth=Be=t),o!=Le&&(d.lineJoin=Le=o),r!=Pe&&(d.lineCap=Pe=r),n!=Me&&d.setLineDash(Me=n)}function Ze(e,t,n,r){t!=Te&&(d.fillStyle=Te=t),e!=Ie&&(d.font=Ie=e),n!=$e&&(d.textAlign=$e=n),r!=Re&&(d.textBaseline=Re=r)}function Ke(e,t,n,i){var o=arguments.length>4&&void 0!==arguments[4]?arguments[4]:0;if(i.length>0&&e.auto(r,We)&&(null==t||null==t.min)){var a=Ya(He,0),u=Ya(Ve,i.length-1),l=null==n.min?3==e.distr?Pa(i,a,u):La(i,a,u,o):[n.min,n.max];e.min=tu(e.min,n.min=l[0]),e.max=nu(e.max,n.max=l[1])}}function Xe(e,t){var n=t?_[e].points:_[e];n._stroke=n.stroke(r,e),n._fill=n.fill(r,e)}function et(e,n){var i=n?_[e].points:_[e],o=i._stroke,a=i._fill,u=i._paths,l=u.stroke,c=u.fill,s=u.clip,f=u.flags,h=null,p=bu(i.width*Qo,3),v=p%2/2;n&&null==a&&(a=p>0?"#fff":o);var m=1==i.pxAlign;if(m&&d.translate(v,v),!n){var y=fe,g=de,b=he,D=pe,x=p*Qo/2;0==i.min&&(D+=x),0==i.max&&(g-=x,D+=x),(h=new Path2D).rect(y,g,b,D)}n?tt(o,p,i.dash,i.cap,a,l,c,f,s):function(e,n,i,o,a,u,l,c,s,f,d){var h=!1;w.forEach((function(p,v){if(p.series[0]==e){var m,y=_[p.series[1]],g=t[p.series[1]],b=(y._paths||ku).band;Su(b)&&(b=1==p.dir?b[0]:b[1]);var D=null;y.show&&b&&function(e,t,n){for(t=Ya(t,0),n=Ya(n,e.length-1);t<=n;){if(null!=e[t])return!0;t++}return!1}(g,He,Ve)?(D=p.fill(r,v)||u,m=y._paths.clip):b=null,tt(n,i,o,a,D,l,c,s,f,d,m,b),h=!0}})),h||tt(n,i,o,a,u,l,c,s,f,d)}(e,o,p,i.dash,i.cap,a,l,c,f,h,s),m&&d.translate(-v,-v)}r.setData=Qe;function tt(e,t,n,r,i,o,a,u,l,c,s,f){Je(e,t,n,r,i),(l||c||f)&&(d.save(),l&&d.clip(l),c&&d.clip(c)),f?3==(3&u)?(d.clip(f),s&&d.clip(s),rt(i,a),nt(e,o,t)):2&u?(rt(i,a),d.clip(f),nt(e,o,t)):1&u&&(d.save(),d.clip(f),s&&d.clip(s),rt(i,a),d.restore(),nt(e,o,t)):(rt(i,a),nt(e,o,t)),(l||c||f)&&d.restore()}function nt(e,t,n){n>0&&(t instanceof Map?t.forEach((function(e,t){d.strokeStyle=Oe=t,d.stroke(e)})):null!=t&&e&&d.stroke(t))}function rt(e,t){t instanceof Map?t.forEach((function(e,t){d.fillStyle=Te=t,d.fill(e)})):null!=t&&e&&d.fill(t)}function it(e,t,n,r,i,o,a,u,l,c){var s=a%2/2;1==m&&d.translate(s,s),Je(u,a,l,c,u),d.beginPath();var f,h,p,v,y=i+(0==r||3==r?-o:o);0==n?(h=i,v=y):(f=i,p=y);for(var g=0;g0&&(t._paths=null,e&&(1==i?(t.min=null,t.max=null):t.facets.forEach((function(e){e.min=null,e.max=null}))))}))}var lt,ct,st,ft,dt,ht,pt,vt,mt,yt,gt,bt,Dt=!1;function wt(){Dt||(Lu(xt),Dt=!0)}function xt(){ve&&(!function(){var e=Tu(D,Nu);for(var n in e){var o=e[n],a=T[n];if(null!=a&&null!=a.min)Bu(o,a),n==x&&ut(!0);else if(n!=x||2==i)if(0==Ne&&null==o.from){var u=o.range(r,null,null,n);o.min=u[0],o.max=u[1]}else o.min=lu,o.max=-lu}if(Ne>0)for(var l in _.forEach((function(n,o){if(1==i){var a=n.scale,u=e[a],l=T[a];if(0==o){var c=u.range(r,u.min,u.max,a);u.min=c[0],u.max=c[1],He=Ba(u.min,t[0]),Ve=Ba(u.max,t[0]),t[0][He]u.max&&Ve--,n.min=qe[He],n.max=qe[Ve]}else n.show&&n.auto&&Ke(u,l,n,t[o],n.sorted);n.idxs[0]=He,n.idxs[1]=Ve}else if(o>0&&n.show&&n.auto){var s=_t(n.facets,2),f=s[0],d=s[1],h=f.scale,p=d.scale,v=_t(t[o],2),m=v[0],y=v[1];Ke(e[h],T[h],f,m,f.sorted),Ke(e[p],T[p],d,y,d.sorted),n.min=d.min,n.max=d.max}})),e){var c=e[l],s=T[l];if(null==c.from&&(null==s||null==s.min)){var f=c.range(r,c.min==lu?null:c.min,c.max==-lu?null:c.max,l);c.min=f[0],c.max=f[1]}}for(var d in e){var h=e[d];if(null!=h.from){var p=e[h.from];if(null==p.min)h.min=h.max=null;else{var v=h.range(r,p.min,p.max,d);h.min=v[0],h.max=v[1]}}}var m={},y=!1;for(var g in e){var b=e[g],w=D[g];if(w.min!=b.min||w.max!=b.max){w.min=b.min,w.max=b.max;var k=w.distr;w._min=3==k?ou(w.min):4==k?uu(w.min,w.asinh):w.min,w._max=3==k?ou(w.max):4==k?uu(w.max,w.asinh):w.max,m[g]=y=!0}}if(y){for(var C in _.forEach((function(e,t){2==i?t>0&&m.y&&(e._paths=null):m[e.scale]&&(e._paths=null)})),m)ye=!0,on("setScale",C);we.show&&(ge=_e=we.left>=0)}for(var E in T)T[E]=null}(),ve=!1),ye&&(!function(){for(var e=!1,t=0;!e;){var n=ot(++t),i=at(t);(e=3==t||n&&i)||(De(r.width,r.height),me=!0)}}(),ye=!1),me&&(ba(p,na,ce),ba(p,ea,se),ba(p,Ko,ue),ba(p,Xo,le),ba(v,na,ce),ba(v,ea,se),ba(v,Ko,ue),ba(v,Xo,le),ba(h,Ko,oe),ba(h,Xo,ae),f.width=Xa(oe*Qo),f.height=Xa(ae*Qo),b.forEach((function(e){var t=e._el,n=e._show,r=e._size,i=e._pos,o=e.side;if(null!=t)if(n){var a=o%2==1;ba(t,a?"left":"top",i-(3===o||0===o?r:0)),ba(t,a?"width":"height",r),ba(t,a?"top":"left",a?se:ce),ba(t,a?"height":"width",a?le:ue),_a(t,Jo)}else ga(t,Jo)})),Oe=Te=Be=Le=Pe=Ie=$e=Re=Me=null,je=1,Wt(!0),on("setSize"),me=!1),oe>0&&ae>0&&(d.clearRect(0,0,f.width,f.height),on("drawClear"),C.forEach((function(e){return e()})),on("draw")),we.show&&ge&&(Yt(null,!0,!1),ge=!1),c||(c=!0,r.status=1,on("ready")),We=!1,Dt=!1}function kt(e,n){var i=D[e];if(null==i.from){if(0==Ne){var o=i.range(r,n.min,n.max,e);n.min=o[0],n.max=o[1]}if(n.min>n.max){var a=n.min;n.min=n.max,n.max=a}if(Ne>1&&null!=n.min&&null!=n.max&&n.max-n.min<1e-16)return;e==x&&2==i.distr&&Ne>0&&(n.min=Ba(n.min,t[0]),n.max=Ba(n.max,t[0]),n.min==n.max&&n.max++),T[e]=n,ve=!0,wt()}}r.redraw=function(e,t){ye=t||!1,!1!==e?Lt(x,N.min,N.max):wt()},r.setScale=kt;var Ct=!1,Et=we.drag,St=Et.x,At=Et.y;we.show&&(we.x&&(lt=wa("u-cursor-x",v)),we.y&&(ct=wa("u-cursor-y",v)),0==N.ori?(st=lt,ft=ct):(st=ct,ft=lt),gt=we.left,bt=we.top);var Ft,Nt,Ot,Tt=r.select=Bu({show:!0,over:!0,left:0,width:0,top:0,height:0},e.select),Bt=Tt.show?wa("u-select",Tt.over?v:p):null;function Mt(e,t){if(Tt.show){for(var n in e)ba(Bt,n,Tt[n]=e[n]);!1!==t&&on("setSelect")}}function Lt(e,t,n){kt(e,{min:t,max:n})}function Pt(e,t,n,o){null!=t.focus&&function(e){if(e!=Ot){var t=null==e,n=1!=ke.alpha;_.forEach((function(r,i){var o=t||0==i||i==e;r._focus=t?null:o,n&&function(e,t){_[e].alpha=t,we.show&&Ee[e]&&(Ee[e].style.opacity=t);H&&q[e]&&(q[e].style.opacity=t)}(i,o?1:ke.alpha)})),Ot=e,n&&wt()}}(e),null!=t.show&&_.forEach((function(n,r){r>0&&(e==r||null==e)&&(n.show=t.show,function(e,t){var n=_[e],r=H?q[e]:null;n.show?r&&_a(r,Jo):(r&&ga(r,Jo),Ee.length>1&&ka(Ee[e],-10,-10,ue,le))}(r,t.show),Lt(2==i?n.facets[1].scale:n.scale,null,null),wt())})),!1!==n&&on("setSeries",e,t),o&&cn("setSeries",r,e,t)}r.setSelect=Mt,r.setSeries=Pt,r.addBand=function(e,t){e.fill=du(e.fill||null),e.dir=Ya(e.dir,-1),t=null==t?w.length:t,w.splice(t,0,e)},r.setBand=function(e,t){Bu(w[e],t)},r.delBand=function(e){null==e?w.length=0:w.splice(e,1)};var It={focus:!0};function $t(e,t,n){var r=D[t];n&&(e=e/Qo-(1==r.ori?se:ce));var i=ue;1==r.ori&&(e=(i=le)-e),-1==r.dir&&(e=i-e);var o=r._min,a=o+(r._max-o)*(e/i),u=r.distr;return 3==u?ru(10,a):4==u?function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:1;return Ga.sinh(e)*t}(a,r.asinh):a}function Rt(e,t){ba(Bt,na,Tt.left=e),ba(Bt,Ko,Tt.width=t)}function jt(e,t){ba(Bt,ea,Tt.top=e),ba(Bt,Xo,Tt.height=t)}H&&Ce&&Oa(sa,L,(function(e){we._lock||null!=Ot&&Pt(null,It,!0,an.setSeries)})),r.valToIdx=function(e){return Ba(e,t[0])},r.posToIdx=function(e,n){return Ba($t(e,x,n),t[0],He,Ve)},r.posToVal=$t,r.valToPos=function(e,t,n){return 0==D[t].ori?a(e,D[t],n?he:ue,n?fe:0):u(e,D[t],n?pe:le,n?de:0)},r.batch=function(e){e(r),wt()},r.setCursor=function(e,t,n){gt=e.left,bt=e.top,Yt(null,t,n)};var zt=0==N.ori?Rt:jt,Ut=1==N.ori?Rt:jt;function Ht(e,t){if(null!=e){var n=e.idx;U.idx=n,_.forEach((function(e,t){(t>0||!Q)&&Vt(t,n)}))}H&&U.live&&function(){if(H&&U.live)for(var e=2==i?1:0;e<_.length;e++)if(0!=e||!Q){var t=U.values[e],n=0;for(var r in t)W[e][n++].firstChild.nodeValue=t[r]}}(),_e=!1,!1!==t&&on("setLegend")}function Vt(e,n){var i;if(null==n)i=G;else{var o=_[e],a=0==e&&2==O?qe:t[e];i=Q?o.values(r,e,n):{_:o.value(r,a[n],e,n)}}U.values[e]=i}function Yt(e,n,o){mt=gt,yt=bt;var a,u=_t(we.move(r,gt,bt),2);gt=u[0],bt=u[1],we.show&&(st&&ka(st,Xa(gt),0,ue,le),ft&&ka(ft,0,Xa(bt),ue,le));var l=He>Ve;Ft=lu;var s=0==N.ori?ue:le,f=1==N.ori?ue:le;if(gt<0||0==Ne||l){a=null;for(var d=0;d<_.length;d++)d>0&&Ee.length>1&&ka(Ee[d],-10,-10,ue,le);if(Ce&&Pt(null,It,!0,null==e&&an.setSeries),U.live){z.fill(null),_e=!0;for(var h=0;h<_.length;h++)U.values[h]=G}}else{var p,v;1==i&&(a=Ba(p=$t(0==N.ori?gt:bt,x),t[0],He,Ve),v=gu(A(t[0][a],N,s,0),.5));for(var m=2==i?1:0;m<_.length;m++){var y=_[m],g=z[m],b=1==i?t[m][g]:t[m][1][g],w=we.dataIdx(r,m,a,p),k=1==i?t[m][w]:t[m][1][w];_e=_e||k!=b||w!=g,z[m]=w;var C=w==a?v:gu(A(1==i?t[0][w]:t[m][0][w],N,s,0),.5);if(m>0&&y.show){var E=null==k?-10:gu(F(k,1==i?D[y.scale]:D[y.facets[1].scale],f,0),.5);if(E>0&&1==i){var S=Za(E-bt);S<=Ft&&(Ft=S,Nt=m)}var O=void 0,T=void 0;if(0==N.ori?(O=C,T=E):(O=E,T=C),_e&&Ee.length>1){Ea(Ee[m],we.points.fill(r,m),we.points.stroke(r,m));var B=void 0,M=void 0,L=void 0,P=void 0,I=!0,$=we.points.bbox;if(null!=$){I=!1;var R=$(r,m);L=R.left,P=R.top,B=R.width,M=R.height}else L=O,P=T,B=M=we.points.size(r,m);Aa(Ee[m],B,M,I),ka(Ee[m],L,P,ue,le)}}if(U.live){if(!_e||0==m&&Q)continue;Vt(m,w)}}}if(we.idx=a,we.left=gt,we.top=bt,_e&&(U.idx=a,Ht()),Tt.show&&Ct)if(null!=e){var j=_t(an.scales,2),H=j[0],V=j[1],Y=_t(an.match,2),q=Y[0],W=Y[1],J=_t(e.cursor.sync.scales,2),Z=J[0],K=J[1],X=e.cursor.drag;if(St=X._x,At=X._y,St||At){var ee,te,ne,re,ie,oe=e.select,ae=oe.left,ce=oe.top,se=oe.width,fe=oe.height,de=e.scales[H].ori,he=e.posToVal,pe=null!=H&&q(H,Z),ve=null!=V&&W(V,K);pe&&St?(0==de?(ee=ae,te=se):(ee=ce,te=fe),ne=D[H],re=A(he(ee,Z),ne,s,0),ie=A(he(ee+te,Z),ne,s,0),zt(tu(re,ie),Za(ie-re))):zt(0,s),ve&&At?(1==de?(ee=ae,te=se):(ee=ce,te=fe),ne=D[V],re=F(he(ee,K),ne,f,0),ie=F(he(ee+te,K),ne,f,0),Ut(tu(re,ie),Za(ie-re))):Ut(0,f)}else Zt()}else{var me=Za(mt-dt),ye=Za(yt-ht);if(1==N.ori){var ge=me;me=ye,ye=ge}St=Et.x&&me>=Et.dist,At=Et.y&&ye>=Et.dist;var be,De,xe=Et.uni;null!=xe?St&&At&&(At=ye>=xe,(St=me>=xe)||At||(ye>me?At=!0:St=!0)):Et.x&&Et.y&&(St||At)&&(St=At=!0),St&&(0==N.ori?(be=pt,De=gt):(be=vt,De=bt),zt(tu(be,De),Za(De-be)),At||Ut(0,f)),At&&(1==N.ori?(be=pt,De=gt):(be=vt,De=bt),Ut(tu(be,De),Za(De-be)),St||zt(0,s)),St||At||(zt(0,0),Ut(0,0))}if(Et._x=St,Et._y=At,null==e){if(o){if(null!=un){var Se=_t(an.scales,2),Ae=Se[0],Fe=Se[1];an.values[0]=null!=Ae?$t(0==N.ori?gt:bt,Ae):null,an.values[1]=null!=Fe?$t(1==N.ori?gt:bt,Fe):null}cn(aa,r,gt,bt,ue,le,a)}if(Ce){var Oe=o&&an.setSeries,Te=ke.prox;null==Ot?Ft<=Te&&Pt(Nt,It,!0,Oe):Ft>Te?Pt(null,It,!0,Oe):Nt!=Ot&&Pt(Nt,It,!0,Oe)}}c&&!1!==n&&on("setCursor")}r.setLegend=Ht;var qt=null;function Wt(e){!0===e?qt=null:on("syncRect",qt=v.getBoundingClientRect())}function Qt(e,t,n,r,i,o,a){we._lock||(Gt(e,t,n,r,i,o,a,!1,null!=e),null!=e?Yt(null,!0,!0):Yt(t,!0,!1))}function Gt(e,t,n,i,o,a,u,c,s){if(null==qt&&Wt(!1),null!=e)n=e.clientX-qt.left,i=e.clientY-qt.top;else{if(n<0||i<0)return gt=-10,void(bt=-10);var f=_t(an.scales,2),d=f[0],h=f[1],p=t.cursor.sync,v=_t(p.values,2),m=v[0],y=v[1],g=_t(p.scales,2),_=g[0],b=g[1],w=_t(an.match,2),x=w[0],k=w[1],C=t.axes[0].side%2==1,E=0==N.ori?ue:le,S=1==N.ori?ue:le,A=C?a:o,F=C?o:a,O=C?i:n,T=C?n:i;if(n=null!=_?x(d,_)?l(m,D[d],E,0):-10:E*(O/A),i=null!=b?k(h,b)?l(y,D[h],S,0):-10:S*(T/F),1==N.ori){var B=n;n=i,i=B}}if(s&&((n<=1||n>=ue-1)&&(n=su(n,ue)),(i<=1||i>=le-1)&&(i=su(i,le))),c){dt=n,ht=i;var M=_t(we.move(r,n,i),2);pt=M[0],vt=M[1]}else gt=n,bt=i}var Jt={width:0,height:0};function Zt(){Mt(Jt,!1)}function Kt(e,t,n,i,o,a,u){Ct=!0,St=At=Et._x=Et._y=!1,Gt(e,t,n,i,o,a,0,!0,!1),null!=e&&(re(la,va,Xt),cn(ua,r,pt,vt,ue,le,null))}function Xt(e,t,n,i,o,a,u){Ct=Et._x=Et._y=!1,Gt(e,t,n,i,o,a,0,!1,!0);var l=Tt.left,c=Tt.top,s=Tt.width,f=Tt.height,d=s>0||f>0;if(d&&Mt(Tt),Et.setScale&&d){var h=l,p=s,v=c,m=f;if(1==N.ori&&(h=c,p=f,v=l,m=s),St&&Lt(x,$t(h,x),$t(h+p,x)),At)for(var y in D){var g=D[y];y!=x&&null==g.from&&g.min!=lu&&Lt(y,$t(v+m,y),$t(v,y))}Zt()}else we.lock&&(we._lock=!we._lock,we._lock||Yt(null,!0,!1));null!=e&&(ie(la,va),cn(la,r,gt,bt,ue,le,null))}function en(e,t,n,i,o,a,u){Ge(),Zt(),null!=e&&cn(fa,r,gt,bt,ue,le,null)}function tn(){b.forEach(jc),be(r.width,r.height,!0)}Oa(ha,ma,tn);var nn={};nn.mousedown=Kt,nn.mousemove=Qt,nn.mouseup=Xt,nn.dblclick=en,nn.setSeries=function(e,t,n,r){Pt(n,r,!0,!1)},we.show&&(re(ua,v,Kt),re(aa,v,Qt),re(ca,v,Wt),re(sa,v,(function(e,t,n,r,i,o,a){if(!we._lock){var u=Ct;if(Ct){var l,c,s=!0,f=!0;0==N.ori?(l=St,c=At):(l=At,c=St),l&&c&&(s=gt<=10||gt>=ue-10,f=bt<=10||bt>=le-10),l&&s&&(gt=gt=3?Hl:pu)),e.font=Rc(e.font),e.labelFont=Rc(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&&(Ae[t]=!0,e._el=wa("u-axis",h))}})),n?n instanceof HTMLElement?(n.appendChild(s),sn()):n(r,sn):sn(),r}zc.assign=Bu,zc.fmtNum=Qa,zc.rangeNum=Va,zc.rangeLog=Ra,zc.rangeAsinh=ja,zc.orient=tc,zc.pxRatio=Qo,zc.join=function(e,t){for(var n=new Set,r=0;r=o&&A<=a;A+=k){var F=c[A];if(null!=F){var N=_(l[A]),O=b(F);1==t?D(x,N,C):D(x,S,O),D(x,N,O),C=O,S=N}}var T=_t(nc(e,i),2),B=T[0],M=T[1];if(null!=u.fill||0!=B){var L=w.fill=new Path2D(x),P=b(u.fillTo(e,i,u.min,u.max,B));D(L,S,P),D(L,E,P)}if(!u.spanGaps){var I,$=[];(I=$).push.apply(I,bt(ac(l,c,o,a,k,_,r)));var R=u.width*Qo/2,j=n||1==t?R:-R,z=n||-1==t?-R:R;$.forEach((function(e){e[0]+=j,e[1]+=z})),w.gaps=$=u.gaps(e,i,o,a,$),w.clip=oc($,s.ori,p,v,m,y)}return 0!=M&&(w.band=2==M?[ic(e,i,o,a,x,-1),ic(e,i,o,a,x,1)]:ic(e,i,o,a,x,M)),w}))}},Uc.bars=function(e){var t=Ya((e=e||ku).size,[.6,lu,1]),n=e.align||0,r=(e.gap||0)*Qo,i=Ya(e.radius,0),o=1-t[0],a=Ya(t[1],lu)*Qo,u=Ya(t[2],1)*Qo,l=Ya(e.disp,ku),c=Ya(e.each,(function(e){})),s=l.fill,f=l.stroke;return function(e,t,d,h){return tc(e,t,(function(p,v,m,y,g,_,b,D,w,x,k){var C,E,S=p.pxRound,A=y.dir*(0==y.ori?1:-1),F=g.dir*(1==g.ori?1:-1),N=0==y.ori?hc:pc,O=0==y.ori?c:function(e,t,n,r,i,o,a){c(e,t,n,i,r,a,o)},T=_t(nc(e,t),2),B=T[0],M=T[1],L=3==g.distr?1==B?g.max:g.min:0,P=b(L,g,k,w),I=S(p.width*Qo),$=!1,R=null,j=null,z=null,U=null;null==s||0!=I&&null==f||($=!0,R=s.values(e,t,d,h),j=new Map,new Set(R).forEach((function(e){null!=e&&j.set(e,new Path2D)})),I>0&&(z=f.values(e,t,d,h),U=new Map,new Set(z).forEach((function(e){null!=e&&U.set(e,new Path2D)}))));var H=l.x0,V=l.size;if(null!=H&&null!=V){v=H.values(e,t,d,h),2==H.unit&&(v=v.map((function(t){return e.posToVal(D+t*x,y.key,!0)})));var Y=V.values(e,t,d,h);E=S((E=2==V.unit?Y[0]*x:_(Y[0],y,x,D)-_(0,y,x,D))-I),C=1==A?-I/2:E+I/2}else{var q=x;if(v.length>1)for(var W=null,Q=0,G=1/0;Q=d&&Q<=h;Q+=A){var ie=m[Q];if(void 0!==ie){var oe=_(2!=y.distr||null!=l?v[Q]:Q,y,x,D),ae=b(Ya(ie,L),g,k,w);null!=re&&null!=ie&&(P=b(re[Q],g,k,w));var ue=S(oe-C),le=S(nu(ae,P)),ce=S(tu(ae,P)),se=le-ce,fe=i*E;null!=ie&&($?(I>0&&null!=z[Q]&&N(U.get(z[Q]),ue,ce+Ka(I/2),E,nu(0,se-I),fe),null!=R[Q]&&N(j.get(R[Q]),ue,ce+Ka(I/2),E,nu(0,se-I),fe)):N(X,ue,ce+Ka(I/2),E,nu(0,se-I),fe),O(e,t,Q,ue-I/2,ce,E+I,se)),0!=M&&(F*M==1?(le=ce,ce=Z):(ce=le,le=Z),N(ee,ue-I/2,ce,E+I,nu(0,se=le-ce),0))}}return I>0&&(K.stroke=$?U:X),K.fill=$?j:X,K}))}},Uc.spline=function(e){return function(e,t){var n=Ya(null===t||void 0===t?void 0:t.alignGaps,0);return function(t,r,i,o){return tc(t,r,(function(a,u,l,c,s,f,d,h,p,v,m){var y,g,_,b=a.pxRound,D=function(e){return b(f(e,c,v,h))},w=function(e){return b(d(e,s,m,p))};0==c.ori?(y=cc,_=fc,g=yc):(y=sc,_=dc,g=gc);var x=c.dir*(0==c.ori?1:-1);i=Ma(l,i,o,1),o=Ma(l,i,o,-1);for(var k=D(u[1==x?i:o]),C=k,E=[],S=[],A=1==x?i:o;A>=i&&A<=o;A+=x)if(null!=l[A]){var F=D(u[A]);E.push(C=F),S.push(w(l[A]))}var N={stroke:e(E,S,y,_,g,b),fill:null,clip:null,band:null,gaps:null,flags:1},O=N.stroke,T=_t(nc(t,r),2),B=T[0],M=T[1];if(null!=a.fill||0!=B){var L=N.fill=new Path2D(O),P=w(a.fillTo(t,r,a.min,a.max,B));_(L,C,P),_(L,k,P)}if(!a.spanGaps){var I,$=[];(I=$).push.apply(I,bt(ac(u,l,i,o,x,D,n))),N.gaps=$=a.gaps(t,r,i,o,$),N.clip=oc($,c.ori,h,p,v,m)}return 0!=M&&(N.band=2==M?[ic(t,r,i,o,O,-1),ic(t,r,i,o,O,1)]:ic(t,r,i,o,O,M)),N}))}}(kc,e)};var Hc,Vc={height:500,legend:{show:!1},cursor:{drag:{x:!0,y:!1},focus:{prox:30},points:{size:5.6,width:1.4},bind:{click:function(){return null},dblclick:function(){return null}}}},Yc=function(e){return void 0===e||null===e?"":e.toLocaleString("en-US",{maximumSignificantDigits:20})},qc=function(e,t,n,r){var i,o=e.axes[n];if(r>1)return o._size||60;var a=6+((null===o||void 0===o||null===(i=o.ticks)||void 0===i?void 0:i.size)||0)+(o.gap||0),u=(null!==t&&void 0!==t?t:[]).reduce((function(e,t){return t.length>e.length?t:e}),"");return""!=u&&(a+=function(e,t){var n=document.createElement("span");n.innerText=e,n.style.cssText="position: absolute; z-index: -1; pointer-events: none; opacity: 0; font: ".concat(t),document.body.appendChild(n);var r=n.offsetWidth;return n.remove(),r}(u,e.ctx.font)),Math.ceil(a)},Wc=function(e){return function(e){for(var t=0,n=0;n>8*i&255).toString(16)).substr(-2);return r}(e)},Qc=function(e){return e.replace(/^\[\d+]/,"").replace(/{.+}/gim,"")},Gc=function(e){for(var t=e.length,n=-1/0;t--;){var r=e[t];Number.isFinite(r)&&r>n&&(n=r)}return Number.isFinite(n)?n:null},Jc=function(e){for(var t=e.length,n=1/0;t--;){var r=e[t];Number.isFinite(r)&&r2&&void 0!==arguments[2]?arguments[2]:"";return t.map((function(e){return"".concat(Yc(e)," ").concat(n)}))}(e,n,t)}};return e?Number(e)%2?n:Kn(Kn({},n),{},{side:1}):{space:80}}))},Kc=function(e,t){if(null==e||null==t)return[-1,1];var n=.02*(Math.abs(t-e)||Math.abs(e)||1);return[e-n,t+n]},Xc=n(61),es=n.n(Xc),ts=function(e){var t=e.u,n=e.id,r=e.unit,i=void 0===r?"":r,o=e.metrics,a=e.series,u=e.tooltipIdx,l=e.tooltipOffset,c=e.isSticky,s=e.onClose,f=re(null),d=_t(X({top:-999,left:-999}),2),h=d[0],p=d[1],v=_t(X(!1),2),y=v[0],g=v[1],_=_t(X(!1),2),b=_[0],D=_[1],w=_t(X(u.seriesIdx),2),x=w[0],k=w[1],C=_t(X(u.dataIdx),2),E=C[0],S=C[1],A=oe((function(){return t.root.querySelector(".u-wrap")}),[t]),F=oe((function(){return ir()(t,["data",x,E],0)}),[t,x,E]),N=oe((function(){return Yc(F)}),[F]),O=oe((function(){return t.data[0][E]}),[t,E]),T=oe((function(){return yr()(new Date(1e3*O)).format("YYYY-MM-DD HH:mm:ss:SSS (Z)")}),[O]),B=oe((function(){var e;return Wc((null===(e=a[x])||void 0===e?void 0:e.label)||"")}),[a,x]),M=oe((function(){var e,t=((null===(e=a[x])||void 0===e?void 0:e.label)||"").replace(/{.+}/gim,"").trim();return Qc(t)}),[]),L=oe((function(){var e,t=(null===(e=o[x-1])||void 0===e?void 0:e.metric)||{},n=Object.keys(t).filter((function(e){return"__name__"!==e}));return n.map((function(e){return"".concat(e,'="').concat(t[e],'"')}))}),[o,x]),P=function(e){if(y){var t=e.clientX,n=e.clientY;p({top:n,left:t})}},I=function(){g(!1)};return te((function(){var e;if(f.current){var n=t.valToPos(F||0,(null===(e=a[x])||void 0===e?void 0:e.scale)||"1"),r=t.valToPos(O,"x"),i=f.current.getBoundingClientRect(),o=i.width,u=i.height,c=t.over.getBoundingClientRect(),s=r+o>=c.width?o+20:0,d=n+u>=c.height?u+20:0;p({top:n+l.top+10-d,left:r+l.left+10-s})}}),[t,F,O,x,l,f]),te((function(){k(u.seriesIdx),S(u.dataIdx)}),[u]),te((function(){return y&&(document.addEventListener("mousemove",P),document.addEventListener("mouseup",I)),function(){document.removeEventListener("mousemove",P),document.removeEventListener("mouseup",I)}}),[y]),!A||u.seriesIdx<0||u.dataIdx<0?null:mt.createPortal(fr("div",{className:Bi()({"vm-chart-tooltip":!0,"vm-chart-tooltip_sticky":c,"vm-chart-tooltip_moved":b}),ref:f,style:h,children:[fr("div",{className:"vm-chart-tooltip-header",children:[fr("div",{className:"vm-chart-tooltip-header__date",children:T}),c&&fr(m,{children:[fr(ho,{className:"vm-chart-tooltip-header__drag",variant:"text",size:"small",startIcon:fr(Oi,{}),onMouseDown:function(e){D(!0),g(!0);var t=e.clientX,n=e.clientY;p({top:n,left:t})}}),fr(ho,{className:"vm-chart-tooltip-header__close",variant:"text",size:"small",startIcon:fr(ai,{}),onClick:function(){s&&s(n)}})]})]}),fr("div",{className:"vm-chart-tooltip-data",children:[fr("div",{className:"vm-chart-tooltip-data__marker",style:{background:B}}),fr("p",{children:[M,":",fr("b",{className:"vm-chart-tooltip-data__value",children:N}),i]})]}),!!L.length&&fr("div",{className:"vm-chart-tooltip-info",children:L.map((function(e,t){return fr("div",{children:e},"".concat(e,"_").concat(t))}))})]}),A)};!function(e){e.xRange="xRange",e.yRange="yRange",e.data="data"}(Hc||(Hc={}));var ns=function(e){var t=e.data,n=e.series,r=e.metrics,i=void 0===r?[]:r,o=e.period,a=e.yaxis,u=e.unit,l=e.setPeriod,c=e.container,s=re(null),f=_t(X(!1),2),d=f[0],p=f[1],v=_t(X({min:o.start,max:o.end}),2),m=v[0],y=v[1],g=_t(X(),2),_=g[0],b=g[1],D=bo(c),w=_t(X(!1),2),x=w[0],k=w[1],C=_t(X({seriesIdx:-1,dataIdx:-1}),2),E=C[0],S=C[1],A=_t(X({left:0,top:0}),2),F=A[0],N=A[1],O=_t(X([]),2),T=O[0],B=O[1],M=oe((function(){return"".concat(E.seriesIdx,"_").concat(E.dataIdx)}),[E]),L=ae(es()((function(e){var t=e.min,n=e.max;l({from:new Date(1e3*t),to:new Date(1e3*n)})}),500),[]),P=function(e){var t=e.u,n=e.min,r=e.max,i=1e3*(r-n);iAr||(t.setScale("x",{min:n,max:r}),y({min:n,max:r}),L({min:n,max:r}))},I=function(e){var t=e.target,n=e.ctrlKey,r=e.metaKey,i=e.key,o=t instanceof HTMLInputElement||t instanceof HTMLTextAreaElement;if(_&&!o){var a="+"===i||"="===i;if(("-"===i||a)&&!n&&!r){e.preventDefault();var u=(m.max-m.min)/10*(a?1:-1);P({u:_,min:m.min+u,max:m.max-u})}}},$=function(){var e="".concat(E.seriesIdx,"_").concat(E.dataIdx),t={id:e,unit:u,series:n,metrics:i,tooltipIdx:E,tooltipOffset:F};if(!T.find((function(t){return t.id===e}))){var r=JSON.parse(JSON.stringify(t));B((function(e){return[].concat(bt(e),[r])}))}},R=function(e){B((function(t){return t.filter((function(t){return t.id!==e}))}))},j=function(){return[m.min,m.max]},z=function(e){var 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;return a.limits.enable?a.limits.range[r]:Kc(t,n)},U=Kn(Kn({},Vc),{},{series:n,axes:Zc([{},{scale:"1"}],u),scales:Kn({},function(){var e={x:{range:j}},t=Object.keys(a.limits.range);return(t.length?t:["1"]).forEach((function(t){e[t]={range:function(e){var n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:0,r=arguments.length>2&&void 0!==arguments[2]?arguments[2]:1;return z(e,n,r,t)}}})),e}()),width:D.width||400,plugins:[{hooks:{ready:function(e){N({left:parseFloat(e.over.style.left),top:parseFloat(e.over.style.top)}),e.over.addEventListener("mousedown",(function(t){var n=t.ctrlKey,r=t.metaKey;0===t.button&&(n||r)&&function(e){var t=e.e,n=e.factor,r=void 0===n?.85:n,i=e.u,o=e.setPanning,a=e.setPlotScale;t.preventDefault(),o(!0);var u=t.clientX,l=i.posToVal(1,"x")-i.posToVal(0,"x"),c=i.scales.x.min||0,s=i.scales.x.max||0,f=function(e){e.preventDefault();var t=l*((e.clientX-u)*r);a({u:i,min:c-t,max:s-t})};document.addEventListener("mousemove",f),document.addEventListener("mouseup",(function e(){o(!1),document.removeEventListener("mousemove",f),document.removeEventListener("mouseup",e)}))}({u:e,e:t,setPanning:p,setPlotScale:P,factor:.9})})),e.over.addEventListener("wheel",(function(t){if(t.ctrlKey||t.metaKey){t.preventDefault();var n=e.over.getBoundingClientRect().width,r=e.cursor.left&&e.cursor.left>0?e.cursor.left:0,i=e.posToVal(r,"x"),o=(e.scales.x.max||0)-(e.scales.x.min||0),a=t.deltaY<0?.9*o:o/.9,u=i-r/n*a,l=u+a;e.batch((function(){return P({u:e,min:u,max:l})}))}}))},setCursor:function(e){var t,n=null!==(t=e.cursor.idx)&&void 0!==t?t:-1;S((function(e){return Kn(Kn({},e),{},{dataIdx:n})}))},setSeries:function(e,t){var n=null!==t&&void 0!==t?t:-1;S((function(e){return Kn(Kn({},e),{},{seriesIdx:n})}))}}}],hooks:{setSelect:[function(e){var t=e.posToVal(e.select.left,"x"),n=e.posToVal(e.select.left+e.select.width,"x");P({u:e,min:t,max:n})}]}}),H=function(e){if(_){switch(e){case Hc.xRange:_.scales.x.range=j;break;case Hc.yRange:Object.keys(a.limits.range).forEach((function(e){_.scales[e]&&(_.scales[e].range=function(t){var n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:0,r=arguments.length>2&&void 0!==arguments[2]?arguments[2]:1;return z(t,n,r,e)})}));break;case Hc.data:_.setData(t)}d||_.redraw()}};return te((function(){return y({min:o.start,max:o.end})}),[o]),te((function(){if(B([]),S({seriesIdx:-1,dataIdx:-1}),s.current){var e=new zc(U,t,s.current);return b(e),y({min:o.start,max:o.end}),e.destroy}}),[s.current,n,D]),te((function(){return window.addEventListener("keydown",I),function(){window.removeEventListener("keydown",I)}}),[m]),te((function(){return H(Hc.data)}),[t]),te((function(){return H(Hc.xRange)}),[m]),te((function(){return H(Hc.yRange)}),[a]),te((function(){var e=-1!==E.dataIdx&&-1!==E.seriesIdx;return k(e),e&&window.addEventListener("click",$),function(){window.removeEventListener("click",$)}}),[E,T]),fr("div",{className:Bi()({"vm-line-chart":!0,"vm-line-chart_panning":d}),children:[fr("div",{className:"vm-line-chart__u-plot",ref:s}),_&&x&&fr(ts,{unit:u,u:_,series:n,metrics:i,tooltipIdx:E,tooltipOffset:F,id:M}),_&&T.map((function(e){return h(ts,Kn(Kn({},e),{},{isSticky:!0,u:_,key:e.id,onClose:R}))}))]})};function rs(){rs=function(){return e};var e={},t=Object.prototype,n=t.hasOwnProperty,r=Object.defineProperty||function(e,t,n){e[t]=n.value},i="function"==typeof Symbol?Symbol:{},o=i.iterator||"@@iterator",a=i.asyncIterator||"@@asyncIterator",u=i.toStringTag||"@@toStringTag";function l(e,t,n){return Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}),e[t]}try{l({},"")}catch(A){l=function(e,t,n){return e[t]=n}}function c(e,t,n,i){var o=t&&t.prototype instanceof d?t:d,a=Object.create(o.prototype),u=new C(i||[]);return r(a,"_invoke",{value:D(e,n,u)}),a}function s(e,t,n){try{return{type:"normal",arg:e.call(t,n)}}catch(A){return{type:"throw",arg:A}}}e.wrap=c;var f={};function d(){}function h(){}function p(){}var v={};l(v,o,(function(){return this}));var m=Object.getPrototypeOf,y=m&&m(m(E([])));y&&y!==t&&n.call(y,o)&&(v=y);var g=p.prototype=d.prototype=Object.create(v);function _(e){["next","throw","return"].forEach((function(t){l(e,t,(function(e){return this._invoke(t,e)}))}))}function b(e,t){function i(r,o,a,u){var l=s(e[r],e,o);if("throw"!==l.type){var c=l.arg,f=c.value;return f&&"object"==At(f)&&n.call(f,"__await")?t.resolve(f.__await).then((function(e){i("next",e,a,u)}),(function(e){i("throw",e,a,u)})):t.resolve(f).then((function(e){c.value=e,a(c)}),(function(e){return i("throw",e,a,u)}))}u(l.arg)}var o;r(this,"_invoke",{value:function(e,n){function r(){return new t((function(t,r){i(e,n,t,r)}))}return o=o?o.then(r,r):r()}})}function D(e,t,n){var r="suspendedStart";return function(i,o){if("executing"===r)throw new Error("Generator is already running");if("completed"===r){if("throw"===i)throw o;return S()}for(n.method=i,n.arg=o;;){var a=n.delegate;if(a){var u=w(a,n);if(u){if(u===f)continue;return u}}if("next"===n.method)n.sent=n._sent=n.arg;else if("throw"===n.method){if("suspendedStart"===r)throw r="completed",n.arg;n.dispatchException(n.arg)}else"return"===n.method&&n.abrupt("return",n.arg);r="executing";var l=s(e,t,n);if("normal"===l.type){if(r=n.done?"completed":"suspendedYield",l.arg===f)continue;return{value:l.arg,done:n.done}}"throw"===l.type&&(r="completed",n.method="throw",n.arg=l.arg)}}}function w(e,t){var n=e.iterator[t.method];if(void 0===n){if(t.delegate=null,"throw"===t.method){if(e.iterator.return&&(t.method="return",t.arg=void 0,w(e,t),"throw"===t.method))return f;t.method="throw",t.arg=new TypeError("The iterator does not provide a 'throw' method")}return f}var r=s(n,e.iterator,t.arg);if("throw"===r.type)return t.method="throw",t.arg=r.arg,t.delegate=null,f;var i=r.arg;return i?i.done?(t[e.resultName]=i.value,t.next=e.nextLoc,"return"!==t.method&&(t.method="next",t.arg=void 0),t.delegate=null,f):i:(t.method="throw",t.arg=new TypeError("iterator result is not an object"),t.delegate=null,f)}function x(e){var t={tryLoc:e[0]};1 in e&&(t.catchLoc=e[1]),2 in e&&(t.finallyLoc=e[2],t.afterLoc=e[3]),this.tryEntries.push(t)}function k(e){var t=e.completion||{};t.type="normal",delete t.arg,e.completion=t}function C(e){this.tryEntries=[{tryLoc:"root"}],e.forEach(x,this),this.reset(!0)}function E(e){if(e){var t=e[o];if(t)return t.call(e);if("function"==typeof e.next)return e;if(!isNaN(e.length)){var r=-1,i=function t(){for(;++r=0;--i){var o=this.tryEntries[i],a=o.completion;if("root"===o.tryLoc)return r("end");if(o.tryLoc<=this.prev){var u=n.call(o,"catchLoc"),l=n.call(o,"finallyLoc");if(u&&l){if(this.prev=0;--r){var i=this.tryEntries[r];if(i.tryLoc<=this.prev&&n.call(i,"finallyLoc")&&this.prev=0;--t){var n=this.tryEntries[t];if(n.finallyLoc===e)return this.complete(n.completion,n.afterLoc),k(n),f}},catch:function(e){for(var t=this.tryEntries.length-1;t>=0;--t){var n=this.tryEntries[t];if(n.tryLoc===e){var r=n.completion;if("throw"===r.type){var i=r.arg;k(n)}return i}}throw new Error("illegal catch attempt")},delegateYield:function(e,t,n){return this.delegate={iterator:E(e),resultName:t,nextLoc:n},"next"===this.method&&(this.arg=void 0),f}},e}function is(e,t,n,r,i,o,a){try{var u=e[o](a),l=u.value}catch(c){return void n(c)}u.done?t(l):Promise.resolve(l).then(r,i)}function os(e){return function(){var t=this,n=arguments;return new Promise((function(r,i){var o=e.apply(t,n);function a(e){is(o,r,i,a,u,"next",e)}function u(e){is(o,r,i,a,u,"throw",e)}a(void 0)}))}}var as=function(e){var t=e.legend,n=e.onChange,r=_t(X(""),2),i=r[0],o=r[1],a=oe((function(){return function(e){var t=Object.keys(e.freeFormFields).filter((function(e){return"__name__"!==e}));return t.map((function(t){var n="".concat(t,'="').concat(e.freeFormFields[t],'"');return{id:"".concat(e.label,".").concat(n),freeField:n,key:t}}))}(t)}),[t]),u=function(){var e=os(rs().mark((function e(t,n){return rs().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,navigator.clipboard.writeText(t);case 2:o(n),setTimeout((function(){return o("")}),2e3);case 4:case"end":return e.stop()}}),e)})));return function(t,n){return e.apply(this,arguments)}}();return fr("div",{className:Bi()({"vm-legend-item":!0,"vm-legend-item_hide":!t.checked}),onClick:function(e){return function(t){n(e,t.ctrlKey||t.metaKey)}}(t),children:[fr("div",{className:"vm-legend-item__marker",style:{backgroundColor:t.color}}),fr("div",{className:"vm-legend-item-info",children:[fr("span",{className:"vm-legend-item-info__label",children:Qc(t.label)}),"\xa0{",a.map((function(e){return fr(mo,{open:i===e.id,title:"Copied!",placement:"top-center",children:fr("span",{className:"vm-legend-item-info__free-fields",onClick:(t=e.freeField,n=e.id,function(e){e.stopPropagation(),u(t,n)}),children:e.freeField},e.key)},e.id);var t,n})),"}"]})]})},us=function(e){var t=e.labels,n=e.query,r=e.onChange,i=oe((function(){return Array.from(new Set(t.map((function(e){return e.group}))))}),[t]);return fr(m,{children:fr("div",{className:"vm-legend",children:i.map((function(e){return fr("div",{className:"vm-legend-group",children:[fr("div",{className:"vm-legend-group-title",children:[fr("span",{className:"vm-legend-group-title__count",children:["Query ",e,": "]}),fr("span",{className:"vm-legend-group-title__query",children:n[e-1]})]}),fr("div",{children:t.filter((function(t){return t.group===e})).map((function(e){return fr(as,{legend:e,onChange:r},e.label)}))})]},e)}))})})};function ls(e,t){if(null==e)return{};var n,r,i=function(e,t){if(null==e)return{};var n,r,i={},o=Object.keys(e);for(r=0;r=0||(i[n]=e[n]);return i}(e,t);if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(e);for(r=0;r=0||Object.prototype.propertyIsEnumerable.call(e,n)&&(i[n]=e[n])}return i}var cs=["__name__"],ss=function(e,t,n){var r=function(e,t){var n=e.metric,r=n.__name__,i=ls(n,cs),o=t||r||"";return 0===Object.keys(e.metric).length?o||"Result ".concat(e.group):"".concat(o," {").concat(Object.entries(i).map((function(e){return"".concat(e[0],": ").concat(e[1])})).join(", "),"}")}(e,n[e.group-1]),i="[".concat(e.group,"]").concat(r);return{label:i,freeFormFields:e.metric,width:1.4,stroke:Wc(i),show:!ds(i,t),scale:"1",points:{size:4.2,width:1.4}}},fs=function(e,t){return{group:t,label:e.label||"",color:e.stroke,checked:e.show||!1,freeFormFields:e.freeFormFields}},ds=function(e,t){return t.includes("".concat(e))},hs=function(e){switch(e){case"NaN":return NaN;case"Inf":case"+Inf":return 1/0;case"-Inf":return-1/0;default:return parseFloat(e)}},ps=function(e){var t=e.data,n=void 0===t?[]:t,r=e.period,i=e.customStep,o=e.query,a=e.yaxis,u=e.unit,l=e.showLegend,c=void 0===l||l,s=e.setYaxisLimits,f=e.setPeriod,d=e.alias,h=void 0===d?[]:d,p=e.fullWidth,v=void 0===p||p,m=oe((function(){return i||r.step||1}),[r.step,i]),y=_t(X([[]]),2),g=y[0],_=y[1],b=_t(X([]),2),D=b[0],w=b[1],x=_t(X([]),2),k=x[0],C=x[1],E=_t(X([]),2),S=E[0],A=E[1],F=function(e){var t=function(e){var t={},n=Object.values(e).flat(),r=Jc(n),i=Gc(n);return t[1]=Kc(r,i),t}(e);s(t)};te((function(){var e=[],t={},i=[],o=[{}];null===n||void 0===n||n.forEach((function(n){var r=ss(n,S,h);o.push(r),i.push(fs(r,n.group));var a,u=t[n.group]||[],l=Wo(n.values);try{for(l.s();!(a=l.n()).done;){var c=a.value;e.push(c[0]),u.push(hs(c[1]))}}catch(s){l.e(s)}finally{l.f()}t[n.group]=u}));var a=function(e,t,n){for(var r=Array.from(new Set(e)).sort((function(e,t){return e-t})),i=n.start,o=Nr(n.end+t),a=0,u=[];i<=o;){for(;a=r.length||r[a]>i)&&u.push(i)}for(;u.length<2;)u.push(i),i=Nr(i+t);return u}(e,m,r),u=n.map((function(e){var t,n=[],r=e.values,i=r.length,o=0,u=Wo(a);try{for(u.s();!(t=u.n()).done;){for(var l=t.value;o1e10*h?n.map((function(){return f})):n}));u.unshift(a),F(t),_(u),w(o),C(i)}),[n]),te((function(){var e=[],t=[{}];null===n||void 0===n||n.forEach((function(n){var r=ss(n,S,h);t.push(r),e.push(fs(r,n.group))})),w(t),C(e)}),[S]);var N=re(null);return fr("div",{className:Bi()({"vm-graph-view":!0,"vm-graph-view_full-width":v}),ref:N,children:[(null===N||void 0===N?void 0:N.current)&&fr(ns,{data:g,series:D,metrics:n,period:r,yaxis:a,unit:u,setPeriod:f,container:null===N||void 0===N?void 0:N.current}),c&&fr(us,{labels:k,query:o,onChange:function(e,t){A(function(e){var t=e.hideSeries,n=e.legend,r=e.metaKey,i=e.series,o=n.label,a=ds(o,t),u=i.map((function(e){return e.label||""}));return r?a?t.filter((function(e){return e!==o})):[].concat(bt(t),[o]):t.length?a?bt(u.filter((function(e){return e!==o}))):[]:bt(u.filter((function(e){return e!==o})))}({hideSeries:S,legend:e,metaKey:t,series:D}))}})]})},vs=function(e){var t=e.value,n=e.onChange,r=e.onEnter,i=e.onArrowUp,o=e.onArrowDown,a=e.autocomplete,u=e.error,l=e.options,s=e.label,f=e.disabled,d=void 0!==f&&f,h=_t(X(-1),2),p=h[0],v=h[1],m=_t(X(!1),2),y=m[0],g=m[1],_=re(null),b=re(null),D=oe((function(){if(!y)return[];try{var e=new RegExp(String(t),"i");return l.filter((function(n){return e.test(n)&&n!==t})).sort((function(t,n){var r,i;return((null===(r=t.match(e))||void 0===r?void 0:r.index)||0)-((null===(i=n.match(e))||void 0===i?void 0:i.index)||0)}))}catch(c){return[]}}),[y,l,t]),w=function(){g(!1)},x=function(e){return function(){d||(n(e),w())}};return te((function(){if(a){v(-1);var e=(t.match(/[a-zA-Z_:.][a-zA-Z0-9_:.]*/gm)||[]).length;g(a&&t.length>2&&e<=1)}}),[a,t]),te((function(){if(b.current){var e=b.current.childNodes[p];null!==e&&void 0!==e&&e.scrollIntoView&&e.scrollIntoView({block:"center"})}}),[p]),po(_,w,b),fr("div",{className:"vm-query-editor",ref:_,children:[fr(To,{value:t,label:s,type:"textarea",autofocus:!!t,error:u,onKeyDown:function(e){var t=e.key,a=e.ctrlKey,u=e.metaKey,l=e.shiftKey,c=a||u,s="ArrowUp"===t,f="ArrowDown"===t,h="Enter"===t,m="Escape"===t,g=y&&D.length,_=D[p],b=s||f;if((b&&g||b&&c||h&&g)&&e.preventDefault(),s&&g&&!c?v((function(e){return 0===e?0:e-1})):s&&c&&i(),f&&g&&!c?v((function(e){return e>=D.length-1?D.length-1:e+1})):f&&c&&o(),_&&h&&g&&!l&&!c){if(d)return;n(_),w()}else h&&!l&&(r(),w());m&&y&&w()},onChange:n,disabled:d}),fr(vo,{open:y,buttonRef:_,placement:"bottom-left",onClose:w,children:fr("div",{className:"vm-query-editor-autocomplete",ref:b,children:D.map((function(e,t){return fr("div",{className:Bi()({"vm-list__item":!0,"vm-list__item_active":t===p}),id:"$autocomplete$".concat(e),onClick:x(e),children:e},e)}))})})]})},ms=n(936),ys=n.n(ms),gs=function(e){var t=e.defaultStep,n=e.setStep,r=_t(X(t),2),i=r[0],o=r[1],a=_t(X(""),2),u=a[0],l=a[1],c=ae(ys()((function(e){return n(e||1)}),700),[]),s=function(e){e>0?(o(e),c(e),l("")):l("step is out of allowed range")};return te((function(){t&&s(t)}),[t]),fr(To,{label:"Step value",type:"number",value:i,error:u,onChange:function(e){var t=+e;t&&s(t)},endIcon:fr(mo,{title:"Reset step to default",children:fr(ho,{variant:"text",size:"small",startIcon:fr(ui,{}),onClick:function(){s(t||1)}})})})},_s=function(){var e=Xn().serverURL,t=hr().tenantId,n=pr(),r=Qr(),i=_t(X(t||0),2),o=i[0],a=i[1],u=ae(ys()((function(t){var i=Number(t);if(n({type:"SET_TENANT_ID",payload:i}),e){var o=e.replace(/(\/select\/)([\d]+)(\/prometheus)/gim,"$1".concat(i,"$3"));n({type:"SET_SERVER",payload:o}),r({type:"RUN_QUERY"})}}),700),[]);return te((function(){o!==t&&a(t)}),[t]),fr(To,{label:"Tenant ID",type:"number",value:o,onChange:function(e){a(e),u(e)},endIcon:fr(mo,{title:"Define tenant id if you need request to another storage",children:fr(ho,{variant:"text",size:"small",startIcon:fr(li,{})})})})},bs=function(e){var t,n=e.value,r=void 0!==n&&n,i=e.disabled,o=void 0!==i&&i,a=e.label,u=e.color,l=void 0===u?"secondary":u,c=e.onChange;return fr("div",{className:Bi()((qn(t={"vm-switch":!0,"vm-switch_disabled":o,"vm-switch_active":r},"vm-switch_".concat(l,"_active"),r),qn(t,"vm-switch_".concat(l),l),t)),onClick:function(){o||c(!r)},children:[fr("div",{className:"vm-switch-track",children:fr("div",{className:"vm-switch-track__thumb"})}),a&&fr("span",{className:"vm-switch__label",children:a})]})},Ds=function(){var e=Ji(),t=Xn().inputTenantID,n=ni().autocomplete,r=ri(),i=Yi(),o=i.nocache,a=i.isTracingEnabled,u=qi(),l=Wr().period.step;return fr("div",{className:"vm-additional-settings",children:[fr(bs,{label:"Autocomplete",value:n,onChange:function(){r({type:"TOGGLE_AUTOCOMPLETE"})}}),fr(bs,{label:"Disable cache",value:o,onChange:function(){u({type:"TOGGLE_NO_CACHE"})}}),fr(bs,{label:"Trace query",value:a,onChange:function(){u({type:"TOGGLE_QUERY_TRACING"})}}),fr("div",{className:"vm-additional-settings__input",children:fr(gs,{defaultStep:l,setStep:function(t){e({type:"SET_CUSTOM_STEP",payload:t})}})}),!!t&&fr("div",{className:"vm-additional-settings__input",children:fr(_s,{})})]})};var ws=function(e){var t=re();return te((function(){t.current=e}),[e]),t.current},xs=function(e){var t=e.error,n=e.queryOptions,r=e.onHideQuery,i=ni(),o=i.query,a=i.queryHistory,u=i.autocomplete,l=ri(),c=Qr(),s=_t(X(o||[]),2),f=s[0],d=s[1],h=_t(X([]),2),p=h[0],v=h[1],m=ws(f),y=function(){l({type:"SET_QUERY_HISTORY",payload:f.map((function(e,t){var n=a[t]||{values:[]},r=e===n.values[n.values.length-1];return{index:n.values.length-Number(r),values:!r&&e?[].concat(bt(n.values),[e]):n.values}}))}),l({type:"SET_QUERY",payload:f}),c({type:"RUN_QUERY"})},g=function(e,t){d((function(n){return n.map((function(n,r){return r===t?e:n}))}))},_=function(e,t){return function(){!function(e,t){var n=a[t],r=n.index,i=n.values,o=r+e;o<0||o>=i.length||(g(i[o]||"",t),l({type:"SET_QUERY_HISTORY_BY_INDEX",payload:{value:{values:i,index:o},queryNumber:t}}))}(e,t)}},b=function(e){return function(t){g(t,e)}},D=function(e){return function(){var t;t=e,d((function(e){return e.filter((function(e,n){return n!==t}))})),v((function(t){return t.map((function(t){return t>e?t-1:t}))}))}},w=function(e){return function(){var t;t=e,v((function(e){return e.includes(t)?e.filter((function(e){return e!==t})):[].concat(bt(e),[t])}))}};return te((function(){m&&f.length1&&fr(mo,{title:"Remove Query",children:fr("div",{className:"vm-query-configurator-list-row__button",children:fr(ho,{variant:"text",color:"error",startIcon:fr(Ci,{}),onClick:D(r)})})})]},r)}))}),fr("div",{className:"vm-query-configurator-settings",children:[fr(Ds,{}),fr("div",{className:"vm-query-configurator-settings__buttons",children:[f.length<4&&fr(ho,{variant:"outlined",onClick:function(){d((function(e){return[].concat(bt(e),[""])}))},startIcon:fr(Ei,{}),children:"Add Query"}),fr(ho,{variant:"contained",onClick:y,startIcon:fr(bi,{}),children:"Execute Query"})]})]})]})};function ks(e){var t,n,r,i=2;for("undefined"!=typeof Symbol&&(n=Symbol.asyncIterator,r=Symbol.iterator);i--;){if(n&&null!=(t=e[n]))return t.call(e);if(r&&null!=(t=e[r]))return new Cs(t.call(e));n="@@asyncIterator",r="@@iterator"}throw new TypeError("Object is not async iterable")}function Cs(e){function t(e){if(Object(e)!==e)return Promise.reject(new TypeError(e+" is not an object."));var t=e.done;return Promise.resolve(e.value).then((function(e){return{value:e,done:t}}))}return Cs=function(e){this.s=e,this.n=e.next},Cs.prototype={s:null,n:null,next:function(){return t(this.n.apply(this.s,arguments))},return:function(e){var n=this.s.return;return void 0===n?Promise.resolve({value:e,done:!0}):t(n.apply(this.s,arguments))},throw:function(e){var n=this.s.return;return void 0===n?Promise.reject(e):t(n.apply(this.s,arguments))}},new Cs(e)}var Es=0,Ss=function(){function e(t,n){Dt(this,e),this.tracing=void 0,this.query=void 0,this.tracingChildren=void 0,this.originalTracing=void 0,this.id=void 0,this.tracing=t,this.originalTracing=JSON.parse(JSON.stringify(t)),this.query=n,this.id=Es++;var r=t.children||[];this.tracingChildren=r.map((function(t){return new e(t,n)}))}return xt(e,[{key:"queryValue",get:function(){return this.query}},{key:"idValue",get:function(){return this.id}},{key:"children",get:function(){return this.tracingChildren}},{key:"message",get:function(){return this.tracing.message}},{key:"duration",get:function(){return this.tracing.duration_msec}},{key:"JSON",get:function(){return JSON.stringify(this.tracing,null,2)}},{key:"originalJSON",get:function(){return JSON.stringify(this.originalTracing,null,2)}},{key:"setTracing",value:function(t){var n=this;this.tracing=t;var r=t.children||[];this.tracingChildren=r.map((function(t){return new e(t,n.query)}))}},{key:"setQuery",value:function(e){this.query=e}},{key:"resetTracing",value:function(){this.tracing=this.originalTracing}}]),e}(),As=function(e){var t=e.predefinedQuery,n=e.visible,r=e.display,i=e.customStep,o=e.hideQuery,a=e.showAllSeries,u=ni().query,l=Wr().period,c=Yi(),s=c.displayType,f=c.nocache,d=c.isTracingEnabled,h=c.seriesLimits,p=hr().serverUrl,v=_t(X(!1),2),m=v[0],y=v[1],g=_t(X(),2),_=g[0],b=g[1],D=_t(X(),2),w=D[0],x=D[1],k=_t(X(),2),C=k[0],E=k[1],S=_t(X(),2),A=S[0],F=S[1],N=_t(X(),2),O=N[0],T=N[1],B=_t(X([]),2),M=B[0],L=B[1];te((function(){A&&(b(void 0),x(void 0),E(void 0))}),[A]);var P=function(){var e=os(rs().mark((function e(t){var n,r,i,o,a,u,l,c,s,f,d,h;return rs().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return n=t.fetchUrl,r=t.fetchQueue,i=t.displayType,o=t.query,a=t.stateSeriesLimits,u=t.showAllSeries,l=new AbortController,L([].concat(bt(r),[l])),e.prev=3,e.delegateYield(rs().mark((function e(){var t,r,p,v,m,y,g,_,D,w,k,C;return rs().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:t="chart"===i,r=u?1/0:a[i],p=[],v=[],m=1,y=0,c=!1,s=!1,e.prev=8,d=ks(n);case 10:return e.next=12,d.next();case 12:if(!(c=!(h=e.sent).done)){e.next=24;break}return g=h.value,e.next=16,fetch(g,{signal:l.signal});case 16:return _=e.sent,e.next=19,_.json();case 19:D=e.sent,_.ok?(F(void 0),D.trace&&(w=new Ss(D.trace,o[m-1]),v.push(w)),k=r-p.length,D.data.result.slice(0,k).forEach((function(e){e.group=m,p.push(e)})),y+=D.data.result.length,m++):F("".concat(D.errorType,"\r\n").concat(null===D||void 0===D?void 0:D.error));case 21:c=!1,e.next=10;break;case 24:e.next=30;break;case 26:e.prev=26,e.t0=e.catch(8),s=!0,f=e.t0;case 30:if(e.prev=30,e.prev=31,!c||null==d.return){e.next=35;break}return e.next=35,d.return();case 35:if(e.prev=35,!s){e.next=38;break}throw f;case 38:return e.finish(35);case 39:return e.finish(30);case 40:C="Showing ".concat(r," series out of ").concat(y," series due to performance reasons. Please narrow down the query, so it returns less series"),T(y>r?C:""),t?b(p):x(p),E(v);case 44:case"end":return e.stop()}}),e,null,[[8,26,30,40],[31,,35,39]])}))(),"t0",5);case 5:e.next=10;break;case 7:e.prev=7,e.t1=e.catch(3),e.t1 instanceof Error&&"AbortError"!==e.t1.name&&F("".concat(e.t1.name,": ").concat(e.t1.message));case 10:y(!1);case 11:case"end":return e.stop()}}),e,null,[[3,7]])})));return function(t){return e.apply(this,arguments)}}(),I=ae(ys()(P,800),[]),$=function(e,t){var n=e.trim(),r=!o||!o.includes(t);return n&&r},R=oe((function(){var e=null!==t&&void 0!==t?t:u,n="chart"===(r||s);if(l)if(p)if(e.every((function(e){return!e.trim()})))F(Co.validQuery);else{if(Bo(p)){var o=Kn({},l);return o.step=i,e.filter($).map((function(e){return n?function(e,t,n,r,i){return"".concat(e,"/api/v1/query_range?query=").concat(encodeURIComponent(t),"&start=").concat(n.start,"&end=").concat(n.end,"&step=").concat(n.step).concat(r?"&nocache=1":"").concat(i?"&trace=1":"")}(p,e,o,f,d):function(e,t,n,r){return"".concat(e,"/api/v1/query?query=").concat(encodeURIComponent(t),"&time=").concat(n.end,"&step=").concat(n.step).concat(r?"&trace=1":"")}(p,e,o,d)}))}F(Co.validServer)}else F(Co.emptyServer)}),[p,l,s,i,o]);return te((function(){n&&null!==R&&void 0!==R&&R.length&&(y(!0),I({fetchUrl:R,fetchQueue:M,displayType:r||s,query:null!==t&&void 0!==t?t:u,stateSeriesLimits:h,showAllSeries:a}))}),[R,n,h,a]),te((function(){var e=M.slice(0,-1);e.length&&(e.map((function(e){return e.abort()})),L(M.filter((function(e){return!e.signal.aborted}))))}),[M]),{fetchUrl:R,isLoading:m,graphData:_,liveData:w,error:A,warning:O,traces:C}},Fs=function(e){var t=e.data,n=so().showInfoMessage,r=oe((function(){return JSON.stringify(t,null,2)}),[t]);return fr("div",{className:"vm-json-view",children:[fr("div",{className:"vm-json-view__copy",children:fr(ho,{variant:"outlined",onClick:function(){navigator.clipboard.writeText(r),n({text:"Formatted JSON has been copied",type:"success"})},children:"Copy JSON"})}),fr("pre",{className:"vm-json-view__code",children:fr("code",{children:r})})]})},Ns=function(e){var t=e.yaxis,n=e.setYaxisLimits,r=e.toggleEnableLimits,i=oe((function(){return Object.keys(t.limits.range)}),[t.limits.range]),o=ae(ys()((function(e,r,i){var o=t.limits.range;o[r][i]=+e,o[r][0]===o[r][1]||o[r][0]>o[r][1]||n(o)}),500),[t.limits.range]),a=function(e,t){return function(n){o(n,e,t)}};return fr("div",{className:"vm-axes-limits",children:[fr(bs,{value:t.limits.enable,onChange:r,label:"Fix the limits for y-axis"}),fr("div",{className:"vm-axes-limits-list",children:i.map((function(e){return fr("div",{className:"vm-axes-limits-list__inputs",children:[fr(To,{label:"Min ".concat(e),type:"number",disabled:!t.limits.enable,value:t.limits.range[e][0],onChange:a(e,0)}),fr(To,{label:"Max ".concat(e),type:"number",disabled:!t.limits.enable,value:t.limits.range[e][1],onChange:a(e,1)})]},e)}))})]})},Os="Axes settings",Ts=function(e){var t=e.yaxis,n=e.setYaxisLimits,r=e.toggleEnableLimits,i=re(null),o=_t(X(!1),2),a=o[0],u=o[1],l=re(null);po(i,(function(){return u(!1)}),l);var c=function(){u(!1)};return fr("div",{className:"vm-graph-settings",children:[fr(mo,{title:Os,children:fr("div",{ref:l,children:fr(ho,{variant:"text",startIcon:fr(oi,{}),onClick:function(){u((function(e){return!e}))}})})}),fr(vo,{open:a,buttonRef:l,placement:"bottom-right",onClose:c,children:fr("div",{className:"vm-graph-settings-popper",ref:i,children:[fr("div",{className:"vm-popper-header",children:[fr("h3",{className:"vm-popper-header__title",children:Os}),fr(ho,{size:"small",startIcon:fr(ai,{}),onClick:c})]}),fr("div",{className:"vm-graph-settings-popper__body",children:fr(Ns,{yaxis:t,setYaxisLimits:n,toggleEnableLimits:r})})]})})]})},Bs=function(e){var t=e.containerStyles,n=void 0===t?{}:t,r=e.message;return fr("div",{className:"vm-spinner",style:n&&{},children:[fr("div",{className:"half-circle-spinner",children:[fr("div",{className:"circle circle-1"}),fr("div",{className:"circle circle-2"})]}),r&&fr("div",{className:"vm-spinner__message",children:r})]})},Ms=function(){var e=hr().serverUrl,t=_t(X([]),2),n=t[0],r=t[1],i=function(){var t=os(rs().mark((function t(){var n,i,o;return rs().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:if(e){t.next=2;break}return t.abrupt("return");case 2:return n="".concat(e,"/api/v1/label/__name__/values"),t.prev=3,t.next=6,fetch(n);case 6:return i=t.sent,t.next=9,i.json();case 9:o=t.sent,i.ok&&r(o.data),t.next=16;break;case 13:t.prev=13,t.t0=t.catch(3),console.error(t.t0);case 16:case"end":return t.stop()}}),t,null,[[3,13]])})));return function(){return t.apply(this,arguments)}}();return te((function(){i()}),[e]),{queryOptions:n}},Ls=function(e){var t=e.value;return fr("div",{className:"vm-line-progress",children:[fr("div",{className:"vm-line-progress-track",children:fr("div",{className:"vm-line-progress-track__thumb",style:{width:"".concat(t,"%")}})}),fr("span",{children:[t.toFixed(2),"%"]})]})},Ps=function e(t){var n,r=t.trace,i=t.totalMsec,o=_t(X({}),2),a=o[0],u=o[1],l=r.children&&!!r.children.length,c=r.duration/i*100;return fr("div",{className:"vm-nested-nav",children:[fr("div",{className:"vm-nested-nav-header",onClick:(n=r.idValue,function(){u((function(e){return Kn(Kn({},e),{},qn({},n,!e[n]))}))}),children:[l&&fr("div",{className:Bi()({"vm-nested-nav-header__icon":!0,"vm-nested-nav-header__icon_open":a[r.idValue]}),children:fr(pi,{})}),fr("div",{className:"vm-nested-nav-header__progress",children:fr(Ls,{value:c})}),fr("div",{className:"vm-nested-nav-header__message",children:r.message}),fr("div",{className:"vm-nested-nav-header__duration",children:"duration: ".concat(r.duration," ms")})]}),a[r.idValue]&&fr("div",{children:l&&r.children.map((function(t){return fr(e,{trace:t,totalMsec:i},t.duration)}))})]})},Is=function(e){var t=e.editable,n=void 0!==t&&t,r=e.defaultTile,i=void 0===r?"JSON":r,o=e.displayTitle,a=void 0===o||o,u=e.defaultJson,l=void 0===u?"":u,s=e.resetValue,f=void 0===s?"":s,d=e.onClose,h=e.onUpload,p=so().showInfoMessage,v=_t(X(l),2),m=v[0],y=v[1],g=_t(X(i),2),_=g[0],b=g[1],D=_t(X(""),2),w=D[0],x=D[1],k=_t(X(""),2),C=k[0],E=k[1],S=oe((function(){try{var e=JSON.parse(m),t=e.trace||e;return t.duration_msec?(new Ss(t,""),""):Co.traceNotFound}catch(c){return c instanceof Error?c.message:"Unknown error"}}),[m]),A=function(){var e=os(rs().mark((function e(){return rs().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,navigator.clipboard.writeText(m);case 2:p({text:"Formatted JSON has been copied",type:"success"});case 3:case"end":return e.stop()}}),e)})));return function(){return e.apply(this,arguments)}}(),F=function(){E(S),_.trim()||x(Co.emptyTitle),S||w||(h(m,_),d())};return fr("div",{className:Bi()({"vm-json-form":!0,"vm-json-form_one-field":!a}),children:[a&&fr(To,{value:_,label:"Title",error:w,onEnter:F,onChange:function(e){b(e)}}),fr(To,{value:m,label:"JSON",type:"textarea",error:C,autofocus:!0,onChange:function(e){E(""),y(e)},disabled:!n}),fr("div",{className:"vm-json-form-footer",children:[fr("div",{className:"vm-json-form-footer__controls",children:[fr(ho,{variant:"outlined",startIcon:fr(Ni,{}),onClick:A,children:"Copy JSON"}),f&&fr(ho,{variant:"text",startIcon:fr(ui,{}),onClick:function(){y(f)},children:"Reset JSON"})]}),fr("div",{className:"vm-json-form-footer__controls vm-json-form-footer__controls_right",children:[fr(ho,{variant:"outlined",color:"error",onClick:d,children:"Cancel"}),fr(ho,{variant:"contained",onClick:F,children:"apply"})]})]})]})},$s=function(e){var t=e.traces,n=e.jsonEditor,r=void 0!==n&&n,i=e.onDeleteClick,o=_t(X(null),2),a=o[0],u=o[1],l=function(){u(null)};if(!t.length)return fr(lo,{variant:"info",children:"Please re-run the query to see results of the tracing"});var s=function(e){return function(){i(e)}};return fr(m,{children:[fr("div",{className:"vm-tracings-view",children:t.map((function(e){return fr("div",{className:"vm-tracings-view-trace vm-block vm-block_empty-padding",children:[fr("div",{className:"vm-tracings-view-trace-header",children:[fr("h3",{className:"vm-tracings-view-trace-header-title",children:["Trace for ",fr("b",{className:"vm-tracings-view-trace-header-title__query",children:e.queryValue})]}),fr(mo,{title:"Open JSON",children:fr(ho,{variant:"text",startIcon:fr(ki,{}),onClick:(t=e,function(){u(t)})})}),fr(mo,{title:"Remove trace",children:fr(ho,{variant:"text",color:"error",startIcon:fr(Ci,{}),onClick:s(e)})})]}),fr("nav",{className:"vm-tracings-view-trace__nav",children:fr(Ps,{trace:e,totalMsec:e.duration})})]},e.idValue);var t}))}),a&&fr(Lo,{title:a.queryValue,onClose:l,children:fr(Is,{editable:r,displayTitle:r,defaultTile:a.queryValue,defaultJson:a.JSON,resetValue:a.originalJSON,onClose:l,onUpload:function(e,t){if(r&&a)try{a.setTracing(JSON.parse(e)),a.setQuery(t),u(null)}catch(c){console.error(c)}}})})]})},Rs=function(e,t){return oe((function(){var n={};e.forEach((function(e){return Object.entries(e.metric).forEach((function(e){return n[e[0]]?n[e[0]].options.add(e[1]):n[e[0]]={options:new Set([e[1]])}}))}));var r=Object.entries(n).map((function(e){return{key:e[0],variations:e[1].options.size}})).sort((function(e,t){return e.variations-t.variations}));return t?r.filter((function(e){return t.includes(e.key)})):r}),[e,t])},js=function(e){var t,n=e.checked,r=void 0!==n&&n,i=e.disabled,o=void 0!==i&&i,a=e.label,u=e.color,l=void 0===u?"secondary":u,c=e.onChange;return fr("div",{className:Bi()((qn(t={"vm-checkbox":!0,"vm-checkbox_disabled":o,"vm-checkbox_active":r},"vm-checkbox_".concat(l,"_active"),r),qn(t,"vm-checkbox_".concat(l),l),t)),onClick:function(){o||c(!r)},children:[fr("div",{className:"vm-checkbox-track",children:fr("div",{className:"vm-checkbox-track__thumb",children:fr(Si,{})})}),a&&fr("span",{className:"vm-checkbox__label",children:a})]})},zs="Display columns",Us=function(e){var t=e.data,n=e.defaultColumns,r=e.onChange,i=re(null),o=_t(X(!1),2),a=o[0],u=o[1],l=Rs(t),c=oe((function(){return!l.length}),[l]),s=_t(X(l.map((function(e){return e.key}))),2),f=s[0],d=s[1],h=function(){u(!1),d(n||l.map((function(e){return e.key})))},p=function(e){return function(){!function(e){d((function(t){return f.includes(e)?t.filter((function(t){return t!==e})):[].concat(bt(t),[e])}))}(e)}};return te((function(){d(l.map((function(e){return e.key})))}),[l]),fr("div",{className:"vm-table-settings",children:[fr(mo,{title:zs,children:fr("div",{ref:i,children:fr(ho,{variant:"text",startIcon:fr(oi,{}),onClick:function(){u((function(e){return!e}))},disabled:c})})}),fr(vo,{open:a,onClose:h,placement:"bottom-right",buttonRef:i,children:fr("div",{className:"vm-table-settings-popper",children:[fr("div",{className:"vm-popper-header",children:[fr("h3",{className:"vm-popper-header__title",children:zs}),fr(ho,{onClick:h,startIcon:fr(ai,{}),size:"small"})]}),fr("div",{className:"vm-table-settings-popper-list",children:l.map((function(e){return fr("div",{className:"vm-table-settings-popper-list__item",children:fr(js,{checked:f.includes(e.key),onChange:p(e.key),label:e.key})},e.key)}))}),fr("div",{className:"vm-table-settings-popper__footer",children:[fr(ho,{color:"error",variant:"outlined",size:"small",onClick:function(){u(!1);var e=l.map((function(e){return e.key}));d(e),r(e)},children:"Reset"}),fr(ho,{variant:"contained",size:"small",onClick:function(){u(!1),r(f)},children:"apply"})]})]})})]})};function Hs(e){return function(e,t){return Object.fromEntries(Object.entries(e).filter(t))}(e,(function(e){return!!e[1]}))}var Vs=["__name__"],Ys=function(e){var t=e.data,n=e.displayColumns,r=so().showInfoMessage,i=Rs(t,n),o=_t(X(""),2),a=o[0],u=o[1],l=_t(X("asc"),2),c=l[0],s=l[1],f=function(e){var t=e.__name__,n=ls(e,Vs);return t||Object.keys(n).length?"".concat(t," ").concat(JSON.stringify(n)):""},d=oe((function(){var e=null===t||void 0===t?void 0:t.map((function(e){return{metadata:i.map((function(t){return e.metric[t.key]||"-"})),value:e.value?e.value[1]:"-",copyValue:f(e.metric)}})),n="Value"===a,r=i.findIndex((function(e){return e.key===a}));return n||-1!==r?e.sort((function(e,t){var i=n?Number(e.value):e.metadata[r],o=n?Number(t.value):t.metadata[r];return("asc"===c?io)?-1:1})):e}),[i,t,a,c]),h=oe((function(){return d.some((function(e){return e.copyValue}))}),[d]),p=function(){var e=os(rs().mark((function e(t){return rs().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,navigator.clipboard.writeText(t);case 2:r({text:"Row has been copied",type:"success"});case 3:case"end":return e.stop()}}),e)})));return function(t){return e.apply(this,arguments)}}(),v=function(e){return function(){!function(e){s((function(t){return"asc"===t&&a===e?"desc":"asc"})),u(e)}(e)}};return d.length?fr("table",{className:"vm-table",children:[fr("thead",{className:"vm-table-header",children:fr("tr",{className:"vm-table__row vm-table__row_header",children:[i.map((function(e,t){return fr("td",{className:"vm-table-cell vm-table-cell_header vm-table-cell_sort",onClick:v(e.key),children:fr("div",{className:"vm-table-cell__content",children:[e.key,fr("div",{className:Bi()({"vm-table__sort-icon":!0,"vm-table__sort-icon_active":a===e.key,"vm-table__sort-icon_desc":"desc"===c&&a===e.key}),children:fr(vi,{})})]})},t)})),fr("td",{className:"vm-table-cell vm-table-cell_header vm-table-cell_right vm-table-cell_sort",onClick:v("Value"),children:fr("div",{className:"vm-table-cell__content",children:[fr("div",{className:Bi()({"vm-table__sort-icon":!0,"vm-table__sort-icon_active":"Value"===a,"vm-table__sort-icon_desc":"desc"===c}),children:fr(vi,{})}),"Value"]})}),h&&fr("td",{className:"vm-table-cell vm-table-cell_header"})]})}),fr("tbody",{className:"vm-table-body",children:d.map((function(e,t){return fr("tr",{className:"vm-table__row",children:[e.metadata.map((function(e,n){return fr("td",{className:Bi()({"vm-table-cell vm-table-cell_no-wrap":!0,"vm-table-cell_gray":d[t-1]&&d[t-1].metadata[n]===e}),children:e},n)})),fr("td",{className:"vm-table-cell vm-table-cell_right",children:e.value}),h&&fr("td",{className:"vm-table-cell vm-table-cell_right",children:e.copyValue&&fr("div",{className:"vm-table-cell__content",children:fr(mo,{title:"Copy row",children:fr(ho,{variant:"text",color:"gray",size:"small",startIcon:fr(Ni,{}),onClick:(n=e.copyValue,function(){p(n)})})})})})]},t);var n}))})]}):fr(lo,{variant:"warning",children:"No data to show"})},qs=function(){var e=Yi(),t=e.displayType,n=e.isTracingEnabled,r=ni().query,i=Wr().period,o=Qr();!function(){var e=hr().tenantId,t=Yi().displayType,n=ni().query,r=Wr(),i=r.duration,o=r.relativeTime,a=r.period,u=a.date,l=a.step,c=function(){var r={};n.forEach((function(n,a){var c,s="g".concat(a);r["".concat(s,".expr")]=n,r["".concat(s,".range_input")]=i,r["".concat(s,".end_input")]=u,r["".concat(s,".step_input")]=l,r["".concat(s,".tab")]=(null===(c=Ii.find((function(e){return e.value===t})))||void 0===c?void 0:c.prometheusCode)||0,r["".concat(s,".relative_time")]=o,r["".concat(s,".tenantID")]=e})),ar(Hs(r))};te(c,[e,t,n,i,o,u,l]),te(c,[])}();var a=_t(X(),2),u=a[0],l=a[1],c=_t(X([]),2),s=c[0],f=c[1],d=_t(X([]),2),h=d[0],p=d[1],v=_t(X(!1),2),m=v[0],y=v[1],g=ue(Gi).state,_=g.customStep,b=g.yaxis,D=Ji(),w=Ms().queryOptions,x=As({visible:!0,customStep:_,hideQuery:h,showAllSeries:m}),k=x.isLoading,C=x.liveData,E=x.graphData,S=x.error,A=x.warning,F=x.traces,N=function(e){D({type:"SET_YAXIS_LIMITS",payload:e})};return te((function(){F&&f([].concat(bt(s),bt(F)))}),[F]),te((function(){f([])}),[t]),te((function(){y(!1)}),[r]),fr("div",{className:"vm-custom-panel",children:[fr(xs,{error:S,queryOptions:w,onHideQuery:function(e){p(e)}}),n&&fr("div",{className:"vm-custom-panel__trace",children:fr($s,{traces:s,onDeleteClick:function(e){var t=s.filter((function(t){return t.idValue!==e.idValue}));f(bt(t))}})}),k&&fr(Bs,{}),S&&fr(lo,{variant:"error",children:S}),A&&fr(lo,{variant:"warning",children:fr("div",{className:"vm-custom-panel__warning",children:[fr("p",{children:A}),fr(ho,{color:"warning",variant:"outlined",onClick:function(){y(!0)},children:"Show all"})]})}),fr("div",{className:"vm-custom-panel-body vm-block",children:[fr("div",{className:"vm-custom-panel-body-header",children:[fr($i,{}),"chart"===t&&fr(Ts,{yaxis:b,setYaxisLimits:N,toggleEnableLimits:function(){D({type:"TOGGLE_ENABLE_YAXIS_LIMITS"})}}),"table"===t&&fr(Us,{data:C||[],defaultColumns:u,onChange:l})]}),E&&i&&"chart"===t&&fr(ps,{data:E,period:i,customStep:_,query:r,yaxis:b,setYaxisLimits:N,setPeriod:function(e){var t=e.from,n=e.to;o({type:"SET_PERIOD",payload:{from:t,to:n}})}}),C&&"code"===t&&fr(Fs,{data:C}),C&&"table"===t&&fr(Ys,{data:C,displayColumns:u})]})]})},Ws=function(){var e=os(rs().mark((function e(t){var n,r;return rs().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,fetch("./dashboards/".concat(t));case 2:return n=e.sent,e.next=5,n.json();case 5:return r=e.sent,e.abrupt("return",r);case 7:case"end":return e.stop()}}),e)})));return function(t){return e.apply(this,arguments)}}(),Qs=os(rs().mark((function e(){var t;return rs().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return t=window.__VMUI_PREDEFINED_DASHBOARDS__,e.next=3,Promise.all(t.map(function(){var e=os(rs().mark((function e(t){return rs().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.abrupt("return",Ws(t));case 1:case"end":return e.stop()}}),e)})));return function(t){return e.apply(this,arguments)}}()));case 3:return e.abrupt("return",e.sent);case 4:case"end":return e.stop()}}),e)})));function Gs(){return{async:!1,baseUrl:null,breaks:!1,extensions:null,gfm:!0,headerIds:!0,headerPrefix:"",highlight:null,langPrefix:"language-",mangle:!0,pedantic:!1,renderer:null,sanitize:!1,sanitizer:null,silent:!1,smartypants:!1,tokenizer:null,walkTokens:null,xhtml:!1}}var Js={async:!1,baseUrl:null,breaks:!1,extensions:null,gfm:!0,headerIds:!0,headerPrefix:"",highlight:null,langPrefix:"language-",mangle:!0,pedantic:!1,renderer:null,sanitize:!1,sanitizer:null,silent:!1,smartypants:!1,tokenizer:null,walkTokens:null,xhtml:!1};var Zs=/[&<>"']/,Ks=/[&<>"']/g,Xs=/[<>"']|&(?!#?\w+;)/,ef=/[<>"']|&(?!#?\w+;)/g,tf={"&":"&","<":"<",">":">",'"':""","'":"'"},nf=function(e){return tf[e]};function rf(e,t){if(t){if(Zs.test(e))return e.replace(Ks,nf)}else if(Xs.test(e))return e.replace(ef,nf);return e}var of=/&(#(?:\d+)|(?:#x[0-9A-Fa-f]+)|(?:\w+));?/gi;function af(e){return e.replace(of,(function(e,t){return"colon"===(t=t.toLowerCase())?":":"#"===t.charAt(0)?"x"===t.charAt(1)?String.fromCharCode(parseInt(t.substring(2),16)):String.fromCharCode(+t.substring(1)):""}))}var uf=/(^|[^\[])\^/g;function lf(e,t){e="string"===typeof e?e:e.source,t=t||"";var n={replace:function(t,r){return r=(r=r.source||r).replace(uf,"$1"),e=e.replace(t,r),n},getRegex:function(){return new RegExp(e,t)}};return n}var cf=/[^\w:]/g,sf=/^$|^[a-z][a-z0-9+.-]*:|^[?#]/i;function ff(e,t,n){if(e){var r;try{r=decodeURIComponent(af(n)).replace(cf,"").toLowerCase()}catch(c){return null}if(0===r.indexOf("javascript:")||0===r.indexOf("vbscript:")||0===r.indexOf("data:"))return null}t&&!sf.test(n)&&(n=function(e,t){df[" "+e]||(hf.test(e)?df[" "+e]=e+"/":df[" "+e]=_f(e,"/",!0));var n=-1===(e=df[" "+e]).indexOf(":");return"//"===t.substring(0,2)?n?t:e.replace(pf,"$1")+t:"/"===t.charAt(0)?n?t:e.replace(vf,"$1")+t:e+t}(t,n));try{n=encodeURI(n).replace(/%25/g,"%")}catch(c){return null}return n}var df={},hf=/^[^:]+:\/*[^/]*$/,pf=/^([^:]+:)[\s\S]*$/,vf=/^([^:]+:\/*[^/]*)[\s\S]*$/;var mf={exec:function(){}};function yf(e){for(var t,n,r=1;r=0&&"\\"===n[i];)r=!r;return r?"|":" |"})).split(/ \|/),r=0;if(n[0].trim()||n.shift(),n.length>0&&!n[n.length-1].trim()&&n.pop(),n.length>t)n.splice(t);else for(;n.length1;)1&t&&(n+=e),t>>=1,e+=e;return n+e}function wf(e,t,n,r){var i=t.href,o=t.title?rf(t.title):null,a=e[1].replace(/\\([\[\]])/g,"$1");if("!"!==e[0].charAt(0)){r.state.inLink=!0;var u={type:"link",raw:n,href:i,title:o,text:a,tokens:r.inlineTokens(a)};return r.state.inLink=!1,u}return{type:"image",raw:n,href:i,title:o,text:rf(a)}}var xf=function(){function e(t){Dt(this,e),this.options=t||Js}return xt(e,[{key:"space",value:function(e){var t=this.rules.block.newline.exec(e);if(t&&t[0].length>0)return{type:"space",raw:t[0]}}},{key:"code",value:function(e){var t=this.rules.block.code.exec(e);if(t){var n=t[0].replace(/^ {1,4}/gm,"");return{type:"code",raw:t[0],codeBlockStyle:"indented",text:this.options.pedantic?n:_f(n,"\n")}}}},{key:"fences",value:function(e){var t=this.rules.block.fences.exec(e);if(t){var n=t[0],r=function(e,t){var n=e.match(/^(\s+)(?:```)/);if(null===n)return t;var r=n[1];return t.split("\n").map((function(e){var t=e.match(/^\s+/);return null===t?e:_t(t,1)[0].length>=r.length?e.slice(r.length):e})).join("\n")}(n,t[3]||"");return{type:"code",raw:n,lang:t[2]?t[2].trim().replace(this.rules.inline._escapes,"$1"):t[2],text:r}}}},{key:"heading",value:function(e){var t=this.rules.block.heading.exec(e);if(t){var n=t[2].trim();if(/#$/.test(n)){var r=_f(n,"#");this.options.pedantic?n=r.trim():r&&!/ $/.test(r)||(n=r.trim())}return{type:"heading",raw:t[0],depth:t[1].length,text:n,tokens:this.lexer.inline(n)}}}},{key:"hr",value:function(e){var t=this.rules.block.hr.exec(e);if(t)return{type:"hr",raw:t[0]}}},{key:"blockquote",value:function(e){var t=this.rules.block.blockquote.exec(e);if(t){var n=t[0].replace(/^ *>[ \t]?/gm,"");return{type:"blockquote",raw:t[0],tokens:this.lexer.blockTokens(n,[]),text:n}}}},{key:"list",value:function(e){var t=this.rules.block.list.exec(e);if(t){var n,r,i,o,a,u,l,c,s,f,d,h,p=t[1].trim(),v=p.length>1,m={type:"list",raw:"",ordered:v,start:v?+p.slice(0,-1):"",loose:!1,items:[]};p=v?"\\d{1,9}\\".concat(p.slice(-1)):"\\".concat(p),this.options.pedantic&&(p=v?p:"[*+-]");for(var y=new RegExp("^( {0,3}".concat(p,")((?:[\t ][^\\n]*)?(?:\\n|$))"));e&&(h=!1,t=y.exec(e))&&!this.rules.block.hr.test(e);){if(n=t[0],e=e.substring(n.length),c=t[2].split("\n",1)[0],s=e.split("\n",1)[0],this.options.pedantic?(o=2,d=c.trimLeft()):(o=(o=t[2].search(/[^ ]/))>4?1:o,d=c.slice(o),o+=t[1].length),u=!1,!c&&/^ *$/.test(s)&&(n+=s+"\n",e=e.substring(s.length+1),h=!0),!h)for(var g=new RegExp("^ {0,".concat(Math.min(3,o-1),"}(?:[*+-]|\\d{1,9}[.)])((?: [^\\n]*)?(?:\\n|$))")),_=new RegExp("^ {0,".concat(Math.min(3,o-1),"}((?:- *){3,}|(?:_ *){3,}|(?:\\* *){3,})(?:\\n+|$)")),b=new RegExp("^ {0,".concat(Math.min(3,o-1),"}(?:```|~~~)")),D=new RegExp("^ {0,".concat(Math.min(3,o-1),"}#"));e&&(c=f=e.split("\n",1)[0],this.options.pedantic&&(c=c.replace(/^ {1,4}(?=( {4})*[^ ])/g," ")),!b.test(c))&&!D.test(c)&&!g.test(c)&&!_.test(e);){if(c.search(/[^ ]/)>=o||!c.trim())d+="\n"+c.slice(o);else{if(u)break;d+="\n"+c}u||c.trim()||(u=!0),n+=f+"\n",e=e.substring(f.length+1)}m.loose||(l?m.loose=!0:/\n *\n *$/.test(n)&&(l=!0)),this.options.gfm&&(r=/^\[[ xX]\] /.exec(d))&&(i="[ ] "!==r[0],d=d.replace(/^\[[ xX]\] +/,"")),m.items.push({type:"list_item",raw:n,task:!!r,checked:i,loose:!1,text:d}),m.raw+=n}m.items[m.items.length-1].raw=n.trimRight(),m.items[m.items.length-1].text=d.trimRight(),m.raw=m.raw.trimRight();var w=m.items.length;for(a=0;a1)return!0}}catch(i){r.e(i)}finally{r.f()}return!1}));!m.loose&&x.length&&k&&(m.loose=!0,m.items[a].loose=!0)}return m}}},{key:"html",value:function(e){var t=this.rules.block.html.exec(e);if(t){var n={type:"html",raw:t[0],pre:!this.options.sanitizer&&("pre"===t[1]||"script"===t[1]||"style"===t[1]),text:t[0]};if(this.options.sanitize){var r=this.options.sanitizer?this.options.sanitizer(t[0]):rf(t[0]);n.type="paragraph",n.text=r,n.tokens=this.lexer.inline(r)}return n}}},{key:"def",value:function(e){var t=this.rules.block.def.exec(e);if(t)return t[3]&&(t[3]=t[3].substring(1,t[3].length-1)),{type:"def",tag:t[1].toLowerCase().replace(/\s+/g," "),raw:t[0],href:t[2]?t[2].replace(this.rules.inline._escapes,"$1"):t[2],title:t[3]?t[3].replace(this.rules.inline._escapes,"$1"):t[3]}}},{key:"table",value:function(e){var t=this.rules.block.table.exec(e);if(t){var n={type:"table",header:gf(t[1]).map((function(e){return{text:e}})),align:t[2].replace(/^ *|\| *$/g,"").split(/ *\| */),rows:t[3]&&t[3].trim()?t[3].replace(/\n[ \t]*$/,"").split("\n"):[]};if(n.header.length===n.align.length){n.raw=t[0];var r,i,o,a,u=n.align.length;for(r=0;r/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:this.options.sanitize?"text":"html",raw:t[0],inLink:this.lexer.state.inLink,inRawBlock:this.lexer.state.inRawBlock,text:this.options.sanitize?this.options.sanitizer?this.options.sanitizer(t[0]):rf(t[0]):t[0]}}},{key:"link",value:function(e){var t=this.rules.inline.link.exec(e);if(t){var n=t[2].trim();if(!this.options.pedantic&&/^$/.test(n))return;var r=_f(n.slice(0,-1),"\\");if((n.length-r.length)%2===0)return}else{var i=function(e,t){if(-1===e.indexOf(t[1]))return-1;for(var n=e.length,r=0,i=0;i-1){var o=(0===t[0].indexOf("!")?5:4)+t[1].length+i;t[2]=t[2].substring(0,i),t[0]=t[0].substring(0,o).trim(),t[3]=""}}var a=t[2],u="";if(this.options.pedantic){var l=/^([^'"]*[^\s])\s+(['"])(.*)\2/.exec(a);l&&(a=l[1],u=l[3])}else u=t[3]?t[3].slice(1,-1):"";return a=a.trim(),/^$/.test(n)?a.slice(1):a.slice(1,-1)),wf(t,{href:a?a.replace(this.rules.inline._escapes,"$1"):a,title:u?u.replace(this.rules.inline._escapes,"$1"):u},t[0],this.lexer)}}},{key:"reflink",value:function(e,t){var n;if((n=this.rules.inline.reflink.exec(e))||(n=this.rules.inline.nolink.exec(e))){var r=(n[2]||n[1]).replace(/\s+/g," ");if(!(r=t[r.toLowerCase()])||!r.href){var i=n[0].charAt(0);return{type:"text",raw:i,text:i}}return wf(n,r,n[0],this.lexer)}}},{key:"emStrong",value:function(e,t){var n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:"",r=this.rules.inline.emStrong.lDelim.exec(e);if(r&&(!r[3]||!n.match(/(?:[0-9A-Za-z\xAA\xB2\xB3\xB5\xB9\xBA\xBC-\xBE\xC0-\xD6\xD8-\xF6\xF8-\u02C1\u02C6-\u02D1\u02E0-\u02E4\u02EC\u02EE\u0370-\u0374\u0376\u0377\u037A-\u037D\u037F\u0386\u0388-\u038A\u038C\u038E-\u03A1\u03A3-\u03F5\u03F7-\u0481\u048A-\u052F\u0531-\u0556\u0559\u0560-\u0588\u05D0-\u05EA\u05EF-\u05F2\u0620-\u064A\u0660-\u0669\u066E\u066F\u0671-\u06D3\u06D5\u06E5\u06E6\u06EE-\u06FC\u06FF\u0710\u0712-\u072F\u074D-\u07A5\u07B1\u07C0-\u07EA\u07F4\u07F5\u07FA\u0800-\u0815\u081A\u0824\u0828\u0840-\u0858\u0860-\u086A\u0870-\u0887\u0889-\u088E\u08A0-\u08C9\u0904-\u0939\u093D\u0950\u0958-\u0961\u0966-\u096F\u0971-\u0980\u0985-\u098C\u098F\u0990\u0993-\u09A8\u09AA-\u09B0\u09B2\u09B6-\u09B9\u09BD\u09CE\u09DC\u09DD\u09DF-\u09E1\u09E6-\u09F1\u09F4-\u09F9\u09FC\u0A05-\u0A0A\u0A0F\u0A10\u0A13-\u0A28\u0A2A-\u0A30\u0A32\u0A33\u0A35\u0A36\u0A38\u0A39\u0A59-\u0A5C\u0A5E\u0A66-\u0A6F\u0A72-\u0A74\u0A85-\u0A8D\u0A8F-\u0A91\u0A93-\u0AA8\u0AAA-\u0AB0\u0AB2\u0AB3\u0AB5-\u0AB9\u0ABD\u0AD0\u0AE0\u0AE1\u0AE6-\u0AEF\u0AF9\u0B05-\u0B0C\u0B0F\u0B10\u0B13-\u0B28\u0B2A-\u0B30\u0B32\u0B33\u0B35-\u0B39\u0B3D\u0B5C\u0B5D\u0B5F-\u0B61\u0B66-\u0B6F\u0B71-\u0B77\u0B83\u0B85-\u0B8A\u0B8E-\u0B90\u0B92-\u0B95\u0B99\u0B9A\u0B9C\u0B9E\u0B9F\u0BA3\u0BA4\u0BA8-\u0BAA\u0BAE-\u0BB9\u0BD0\u0BE6-\u0BF2\u0C05-\u0C0C\u0C0E-\u0C10\u0C12-\u0C28\u0C2A-\u0C39\u0C3D\u0C58-\u0C5A\u0C5D\u0C60\u0C61\u0C66-\u0C6F\u0C78-\u0C7E\u0C80\u0C85-\u0C8C\u0C8E-\u0C90\u0C92-\u0CA8\u0CAA-\u0CB3\u0CB5-\u0CB9\u0CBD\u0CDD\u0CDE\u0CE0\u0CE1\u0CE6-\u0CEF\u0CF1\u0CF2\u0D04-\u0D0C\u0D0E-\u0D10\u0D12-\u0D3A\u0D3D\u0D4E\u0D54-\u0D56\u0D58-\u0D61\u0D66-\u0D78\u0D7A-\u0D7F\u0D85-\u0D96\u0D9A-\u0DB1\u0DB3-\u0DBB\u0DBD\u0DC0-\u0DC6\u0DE6-\u0DEF\u0E01-\u0E30\u0E32\u0E33\u0E40-\u0E46\u0E50-\u0E59\u0E81\u0E82\u0E84\u0E86-\u0E8A\u0E8C-\u0EA3\u0EA5\u0EA7-\u0EB0\u0EB2\u0EB3\u0EBD\u0EC0-\u0EC4\u0EC6\u0ED0-\u0ED9\u0EDC-\u0EDF\u0F00\u0F20-\u0F33\u0F40-\u0F47\u0F49-\u0F6C\u0F88-\u0F8C\u1000-\u102A\u103F-\u1049\u1050-\u1055\u105A-\u105D\u1061\u1065\u1066\u106E-\u1070\u1075-\u1081\u108E\u1090-\u1099\u10A0-\u10C5\u10C7\u10CD\u10D0-\u10FA\u10FC-\u1248\u124A-\u124D\u1250-\u1256\u1258\u125A-\u125D\u1260-\u1288\u128A-\u128D\u1290-\u12B0\u12B2-\u12B5\u12B8-\u12BE\u12C0\u12C2-\u12C5\u12C8-\u12D6\u12D8-\u1310\u1312-\u1315\u1318-\u135A\u1369-\u137C\u1380-\u138F\u13A0-\u13F5\u13F8-\u13FD\u1401-\u166C\u166F-\u167F\u1681-\u169A\u16A0-\u16EA\u16EE-\u16F8\u1700-\u1711\u171F-\u1731\u1740-\u1751\u1760-\u176C\u176E-\u1770\u1780-\u17B3\u17D7\u17DC\u17E0-\u17E9\u17F0-\u17F9\u1810-\u1819\u1820-\u1878\u1880-\u1884\u1887-\u18A8\u18AA\u18B0-\u18F5\u1900-\u191E\u1946-\u196D\u1970-\u1974\u1980-\u19AB\u19B0-\u19C9\u19D0-\u19DA\u1A00-\u1A16\u1A20-\u1A54\u1A80-\u1A89\u1A90-\u1A99\u1AA7\u1B05-\u1B33\u1B45-\u1B4C\u1B50-\u1B59\u1B83-\u1BA0\u1BAE-\u1BE5\u1C00-\u1C23\u1C40-\u1C49\u1C4D-\u1C7D\u1C80-\u1C88\u1C90-\u1CBA\u1CBD-\u1CBF\u1CE9-\u1CEC\u1CEE-\u1CF3\u1CF5\u1CF6\u1CFA\u1D00-\u1DBF\u1E00-\u1F15\u1F18-\u1F1D\u1F20-\u1F45\u1F48-\u1F4D\u1F50-\u1F57\u1F59\u1F5B\u1F5D\u1F5F-\u1F7D\u1F80-\u1FB4\u1FB6-\u1FBC\u1FBE\u1FC2-\u1FC4\u1FC6-\u1FCC\u1FD0-\u1FD3\u1FD6-\u1FDB\u1FE0-\u1FEC\u1FF2-\u1FF4\u1FF6-\u1FFC\u2070\u2071\u2074-\u2079\u207F-\u2089\u2090-\u209C\u2102\u2107\u210A-\u2113\u2115\u2119-\u211D\u2124\u2126\u2128\u212A-\u212D\u212F-\u2139\u213C-\u213F\u2145-\u2149\u214E\u2150-\u2189\u2460-\u249B\u24EA-\u24FF\u2776-\u2793\u2C00-\u2CE4\u2CEB-\u2CEE\u2CF2\u2CF3\u2CFD\u2D00-\u2D25\u2D27\u2D2D\u2D30-\u2D67\u2D6F\u2D80-\u2D96\u2DA0-\u2DA6\u2DA8-\u2DAE\u2DB0-\u2DB6\u2DB8-\u2DBE\u2DC0-\u2DC6\u2DC8-\u2DCE\u2DD0-\u2DD6\u2DD8-\u2DDE\u2E2F\u3005-\u3007\u3021-\u3029\u3031-\u3035\u3038-\u303C\u3041-\u3096\u309D-\u309F\u30A1-\u30FA\u30FC-\u30FF\u3105-\u312F\u3131-\u318E\u3192-\u3195\u31A0-\u31BF\u31F0-\u31FF\u3220-\u3229\u3248-\u324F\u3251-\u325F\u3280-\u3289\u32B1-\u32BF\u3400-\u4DBF\u4E00-\uA48C\uA4D0-\uA4FD\uA500-\uA60C\uA610-\uA62B\uA640-\uA66E\uA67F-\uA69D\uA6A0-\uA6EF\uA717-\uA71F\uA722-\uA788\uA78B-\uA7CA\uA7D0\uA7D1\uA7D3\uA7D5-\uA7D9\uA7F2-\uA801\uA803-\uA805\uA807-\uA80A\uA80C-\uA822\uA830-\uA835\uA840-\uA873\uA882-\uA8B3\uA8D0-\uA8D9\uA8F2-\uA8F7\uA8FB\uA8FD\uA8FE\uA900-\uA925\uA930-\uA946\uA960-\uA97C\uA984-\uA9B2\uA9CF-\uA9D9\uA9E0-\uA9E4\uA9E6-\uA9FE\uAA00-\uAA28\uAA40-\uAA42\uAA44-\uAA4B\uAA50-\uAA59\uAA60-\uAA76\uAA7A\uAA7E-\uAAAF\uAAB1\uAAB5\uAAB6\uAAB9-\uAABD\uAAC0\uAAC2\uAADB-\uAADD\uAAE0-\uAAEA\uAAF2-\uAAF4\uAB01-\uAB06\uAB09-\uAB0E\uAB11-\uAB16\uAB20-\uAB26\uAB28-\uAB2E\uAB30-\uAB5A\uAB5C-\uAB69\uAB70-\uABE2\uABF0-\uABF9\uAC00-\uD7A3\uD7B0-\uD7C6\uD7CB-\uD7FB\uF900-\uFA6D\uFA70-\uFAD9\uFB00-\uFB06\uFB13-\uFB17\uFB1D\uFB1F-\uFB28\uFB2A-\uFB36\uFB38-\uFB3C\uFB3E\uFB40\uFB41\uFB43\uFB44\uFB46-\uFBB1\uFBD3-\uFD3D\uFD50-\uFD8F\uFD92-\uFDC7\uFDF0-\uFDFB\uFE70-\uFE74\uFE76-\uFEFC\uFF10-\uFF19\uFF21-\uFF3A\uFF41-\uFF5A\uFF66-\uFFBE\uFFC2-\uFFC7\uFFCA-\uFFCF\uFFD2-\uFFD7\uFFDA-\uFFDC]|\uD800[\uDC00-\uDC0B\uDC0D-\uDC26\uDC28-\uDC3A\uDC3C\uDC3D\uDC3F-\uDC4D\uDC50-\uDC5D\uDC80-\uDCFA\uDD07-\uDD33\uDD40-\uDD78\uDD8A\uDD8B\uDE80-\uDE9C\uDEA0-\uDED0\uDEE1-\uDEFB\uDF00-\uDF23\uDF2D-\uDF4A\uDF50-\uDF75\uDF80-\uDF9D\uDFA0-\uDFC3\uDFC8-\uDFCF\uDFD1-\uDFD5]|\uD801[\uDC00-\uDC9D\uDCA0-\uDCA9\uDCB0-\uDCD3\uDCD8-\uDCFB\uDD00-\uDD27\uDD30-\uDD63\uDD70-\uDD7A\uDD7C-\uDD8A\uDD8C-\uDD92\uDD94\uDD95\uDD97-\uDDA1\uDDA3-\uDDB1\uDDB3-\uDDB9\uDDBB\uDDBC\uDE00-\uDF36\uDF40-\uDF55\uDF60-\uDF67\uDF80-\uDF85\uDF87-\uDFB0\uDFB2-\uDFBA]|\uD802[\uDC00-\uDC05\uDC08\uDC0A-\uDC35\uDC37\uDC38\uDC3C\uDC3F-\uDC55\uDC58-\uDC76\uDC79-\uDC9E\uDCA7-\uDCAF\uDCE0-\uDCF2\uDCF4\uDCF5\uDCFB-\uDD1B\uDD20-\uDD39\uDD80-\uDDB7\uDDBC-\uDDCF\uDDD2-\uDE00\uDE10-\uDE13\uDE15-\uDE17\uDE19-\uDE35\uDE40-\uDE48\uDE60-\uDE7E\uDE80-\uDE9F\uDEC0-\uDEC7\uDEC9-\uDEE4\uDEEB-\uDEEF\uDF00-\uDF35\uDF40-\uDF55\uDF58-\uDF72\uDF78-\uDF91\uDFA9-\uDFAF]|\uD803[\uDC00-\uDC48\uDC80-\uDCB2\uDCC0-\uDCF2\uDCFA-\uDD23\uDD30-\uDD39\uDE60-\uDE7E\uDE80-\uDEA9\uDEB0\uDEB1\uDF00-\uDF27\uDF30-\uDF45\uDF51-\uDF54\uDF70-\uDF81\uDFB0-\uDFCB\uDFE0-\uDFF6]|\uD804[\uDC03-\uDC37\uDC52-\uDC6F\uDC71\uDC72\uDC75\uDC83-\uDCAF\uDCD0-\uDCE8\uDCF0-\uDCF9\uDD03-\uDD26\uDD36-\uDD3F\uDD44\uDD47\uDD50-\uDD72\uDD76\uDD83-\uDDB2\uDDC1-\uDDC4\uDDD0-\uDDDA\uDDDC\uDDE1-\uDDF4\uDE00-\uDE11\uDE13-\uDE2B\uDE3F\uDE40\uDE80-\uDE86\uDE88\uDE8A-\uDE8D\uDE8F-\uDE9D\uDE9F-\uDEA8\uDEB0-\uDEDE\uDEF0-\uDEF9\uDF05-\uDF0C\uDF0F\uDF10\uDF13-\uDF28\uDF2A-\uDF30\uDF32\uDF33\uDF35-\uDF39\uDF3D\uDF50\uDF5D-\uDF61]|\uD805[\uDC00-\uDC34\uDC47-\uDC4A\uDC50-\uDC59\uDC5F-\uDC61\uDC80-\uDCAF\uDCC4\uDCC5\uDCC7\uDCD0-\uDCD9\uDD80-\uDDAE\uDDD8-\uDDDB\uDE00-\uDE2F\uDE44\uDE50-\uDE59\uDE80-\uDEAA\uDEB8\uDEC0-\uDEC9\uDF00-\uDF1A\uDF30-\uDF3B\uDF40-\uDF46]|\uD806[\uDC00-\uDC2B\uDCA0-\uDCF2\uDCFF-\uDD06\uDD09\uDD0C-\uDD13\uDD15\uDD16\uDD18-\uDD2F\uDD3F\uDD41\uDD50-\uDD59\uDDA0-\uDDA7\uDDAA-\uDDD0\uDDE1\uDDE3\uDE00\uDE0B-\uDE32\uDE3A\uDE50\uDE5C-\uDE89\uDE9D\uDEB0-\uDEF8]|\uD807[\uDC00-\uDC08\uDC0A-\uDC2E\uDC40\uDC50-\uDC6C\uDC72-\uDC8F\uDD00-\uDD06\uDD08\uDD09\uDD0B-\uDD30\uDD46\uDD50-\uDD59\uDD60-\uDD65\uDD67\uDD68\uDD6A-\uDD89\uDD98\uDDA0-\uDDA9\uDEE0-\uDEF2\uDF02\uDF04-\uDF10\uDF12-\uDF33\uDF50-\uDF59\uDFB0\uDFC0-\uDFD4]|\uD808[\uDC00-\uDF99]|\uD809[\uDC00-\uDC6E\uDC80-\uDD43]|\uD80B[\uDF90-\uDFF0]|[\uD80C\uD81C-\uD820\uD822\uD840-\uD868\uD86A-\uD86C\uD86F-\uD872\uD874-\uD879\uD880-\uD883\uD885-\uD887][\uDC00-\uDFFF]|\uD80D[\uDC00-\uDC2F\uDC41-\uDC46]|\uD811[\uDC00-\uDE46]|\uD81A[\uDC00-\uDE38\uDE40-\uDE5E\uDE60-\uDE69\uDE70-\uDEBE\uDEC0-\uDEC9\uDED0-\uDEED\uDF00-\uDF2F\uDF40-\uDF43\uDF50-\uDF59\uDF5B-\uDF61\uDF63-\uDF77\uDF7D-\uDF8F]|\uD81B[\uDE40-\uDE96\uDF00-\uDF4A\uDF50\uDF93-\uDF9F\uDFE0\uDFE1\uDFE3]|\uD821[\uDC00-\uDFF7]|\uD823[\uDC00-\uDCD5\uDD00-\uDD08]|\uD82B[\uDFF0-\uDFF3\uDFF5-\uDFFB\uDFFD\uDFFE]|\uD82C[\uDC00-\uDD22\uDD32\uDD50-\uDD52\uDD55\uDD64-\uDD67\uDD70-\uDEFB]|\uD82F[\uDC00-\uDC6A\uDC70-\uDC7C\uDC80-\uDC88\uDC90-\uDC99]|\uD834[\uDEC0-\uDED3\uDEE0-\uDEF3\uDF60-\uDF78]|\uD835[\uDC00-\uDC54\uDC56-\uDC9C\uDC9E\uDC9F\uDCA2\uDCA5\uDCA6\uDCA9-\uDCAC\uDCAE-\uDCB9\uDCBB\uDCBD-\uDCC3\uDCC5-\uDD05\uDD07-\uDD0A\uDD0D-\uDD14\uDD16-\uDD1C\uDD1E-\uDD39\uDD3B-\uDD3E\uDD40-\uDD44\uDD46\uDD4A-\uDD50\uDD52-\uDEA5\uDEA8-\uDEC0\uDEC2-\uDEDA\uDEDC-\uDEFA\uDEFC-\uDF14\uDF16-\uDF34\uDF36-\uDF4E\uDF50-\uDF6E\uDF70-\uDF88\uDF8A-\uDFA8\uDFAA-\uDFC2\uDFC4-\uDFCB\uDFCE-\uDFFF]|\uD837[\uDF00-\uDF1E\uDF25-\uDF2A]|\uD838[\uDC30-\uDC6D\uDD00-\uDD2C\uDD37-\uDD3D\uDD40-\uDD49\uDD4E\uDE90-\uDEAD\uDEC0-\uDEEB\uDEF0-\uDEF9]|\uD839[\uDCD0-\uDCEB\uDCF0-\uDCF9\uDFE0-\uDFE6\uDFE8-\uDFEB\uDFED\uDFEE\uDFF0-\uDFFE]|\uD83A[\uDC00-\uDCC4\uDCC7-\uDCCF\uDD00-\uDD43\uDD4B\uDD50-\uDD59]|\uD83B[\uDC71-\uDCAB\uDCAD-\uDCAF\uDCB1-\uDCB4\uDD01-\uDD2D\uDD2F-\uDD3D\uDE00-\uDE03\uDE05-\uDE1F\uDE21\uDE22\uDE24\uDE27\uDE29-\uDE32\uDE34-\uDE37\uDE39\uDE3B\uDE42\uDE47\uDE49\uDE4B\uDE4D-\uDE4F\uDE51\uDE52\uDE54\uDE57\uDE59\uDE5B\uDE5D\uDE5F\uDE61\uDE62\uDE64\uDE67-\uDE6A\uDE6C-\uDE72\uDE74-\uDE77\uDE79-\uDE7C\uDE7E\uDE80-\uDE89\uDE8B-\uDE9B\uDEA1-\uDEA3\uDEA5-\uDEA9\uDEAB-\uDEBB]|\uD83C[\uDD00-\uDD0C]|\uD83E[\uDFF0-\uDFF9]|\uD869[\uDC00-\uDEDF\uDF00-\uDFFF]|\uD86D[\uDC00-\uDF39\uDF40-\uDFFF]|\uD86E[\uDC00-\uDC1D\uDC20-\uDFFF]|\uD873[\uDC00-\uDEA1\uDEB0-\uDFFF]|\uD87A[\uDC00-\uDFE0]|\uD87E[\uDC00-\uDE1D]|\uD884[\uDC00-\uDF4A\uDF50-\uDFFF]|\uD888[\uDC00-\uDFAF])/))){var i=r[1]||r[2]||"";if(!i||i&&(""===n||this.rules.inline.punctuation.exec(n))){var o,a,u=r[0].length-1,l=u,c=0,s="*"===r[0][0]?this.rules.inline.emStrong.rDelimAst:this.rules.inline.emStrong.rDelimUnd;for(s.lastIndex=0,t=t.slice(-1*e.length+u);null!=(r=s.exec(t));)if(o=r[1]||r[2]||r[3]||r[4]||r[5]||r[6])if(a=o.length,r[3]||r[4])l+=a;else if(!((r[5]||r[6])&&u%3)||(u+a)%3){if(!((l-=a)>0)){a=Math.min(a,a+l+c);var f=e.slice(0,u+r.index+(r[0].length-o.length)+a);if(Math.min(u,a)%2){var d=f.slice(1,-1);return{type:"em",raw:f,text:d,tokens:this.lexer.inlineTokens(d)}}var h=f.slice(2,-2);return{type:"strong",raw:f,text:h,tokens:this.lexer.inlineTokens(h)}}}else c+=a}}}},{key:"codespan",value:function(e){var t=this.rules.inline.code.exec(e);if(t){var n=t[2].replace(/\n/g," "),r=/[^ ]/.test(n),i=/^ /.test(n)&&/ $/.test(n);return r&&i&&(n=n.substring(1,n.length-1)),n=rf(n,!0),{type:"codespan",raw:t[0],text:n}}}},{key:"br",value:function(e){var t=this.rules.inline.br.exec(e);if(t)return{type:"br",raw:t[0]}}},{key:"del",value:function(e){var t=this.rules.inline.del.exec(e);if(t)return{type:"del",raw:t[0],text:t[2],tokens:this.lexer.inlineTokens(t[2])}}},{key:"autolink",value:function(e,t){var n,r,i=this.rules.inline.autolink.exec(e);if(i)return r="@"===i[2]?"mailto:"+(n=rf(this.options.mangle?t(i[1]):i[1])):n=rf(i[1]),{type:"link",raw:i[0],text:n,href:r,tokens:[{type:"text",raw:n,text:n}]}}},{key:"url",value:function(e,t){var n;if(n=this.rules.inline.url.exec(e)){var r,i;if("@"===n[2])i="mailto:"+(r=rf(this.options.mangle?t(n[0]):n[0]));else{var o;do{o=n[0],n[0]=this.rules.inline._backpedal.exec(n[0])[0]}while(o!==n[0]);r=rf(n[0]),i="www."===n[1]?"http://"+r:r}return{type:"link",raw:n[0],text:r,href:i,tokens:[{type:"text",raw:r,text:r}]}}}},{key:"inlineText",value:function(e,t){var n,r=this.rules.inline.text.exec(e);if(r)return n=this.lexer.state.inRawBlock?this.options.sanitize?this.options.sanitizer?this.options.sanitizer(r[0]):rf(r[0]):r[0]:rf(this.options.smartypants?t(r[0]):r[0]),{type:"text",raw:r[0],text:n}}}]),e}(),kf={newline:/^(?: *(?:\n|$))+/,code:/^( {4}[^\n]+(?:\n(?: *(?:\n|$))*)?)+/,fences:/^ {0,3}(`{3,}(?=[^`\n]*\n)|~{3,})([^\n]*)\n(?:|([\s\S]*?)\n)(?: {0,3}\1[~`]* *(?=\n|$)|$)/,hr:/^ {0,3}((?:-[\t ]*){3,}|(?:_[ \t]*){3,}|(?:\*[ \t]*){3,})(?:\n+|$)/,heading:/^ {0,3}(#{1,6})(?=\s|$)(.*)(?:\n+|$)/,blockquote:/^( {0,3}> ?(paragraph|[^\n]*)(?:\n|$))+/,list:/^( {0,3}bull)([ \t][^\n]+?)?(?:\n|$)/,html:"^ {0,3}(?:<(script|pre|style|textarea)[\\s>][\\s\\S]*?(?:[^\\n]*\\n+|$)|comment[^\\n]*(\\n+|$)|<\\?[\\s\\S]*?(?:\\?>\\n*|$)|\\n*|$)|\\n*|$)|)[\\s\\S]*?(?:(?:\\n *)+\\n|$)|<(?!script|pre|style|textarea)([a-z][\\w-]*)(?:attribute)*? */?>(?=[ \\t]*(?:\\n|$))[\\s\\S]*?(?:(?:\\n *)+\\n|$)|(?=[ \\t]*(?:\\n|$))[\\s\\S]*?(?:(?:\\n *)+\\n|$))",def:/^ {0,3}\[(label)\]: *(?:\n *)?]+)>?(?:(?: +(?:\n *)?| *\n *)(title))? *(?:\n+|$)/,table:mf,lheading:/^([^\n]+)\n {0,3}(=+|-+) *(?:\n+|$)/,_paragraph:/^([^\n]+(?:\n(?!hr|heading|lheading|blockquote|fences|list|html|table| +\n)[^\n]+)*)/,text:/^[^\n]+/,_label:/(?!\s*\])(?:\\.|[^\[\]\\])+/,_title:/(?:"(?:\\"?|[^"\\])*"|'[^'\n]*(?:\n[^'\n]+)*\n?'|\([^()]*\))/};kf.def=lf(kf.def).replace("label",kf._label).replace("title",kf._title).getRegex(),kf.bullet=/(?:[*+-]|\d{1,9}[.)])/,kf.listItemStart=lf(/^( *)(bull) */).replace("bull",kf.bullet).getRegex(),kf.list=lf(kf.list).replace(/bull/g,kf.bullet).replace("hr","\\n+(?=\\1?(?:(?:- *){3,}|(?:_ *){3,}|(?:\\* *){3,})(?:\\n+|$))").replace("def","\\n+(?="+kf.def.source+")").getRegex(),kf._tag="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|section|source|summary|table|tbody|td|tfoot|th|thead|title|tr|track|ul",kf._comment=/|$)/,kf.html=lf(kf.html,"i").replace("comment",kf._comment).replace("tag",kf._tag).replace("attribute",/ +[a-zA-Z:_][\w.:-]*(?: *= *"[^"\n]*"| *= *'[^'\n]*'| *= *[^\s"'=<>`]+)?/).getRegex(),kf.paragraph=lf(kf._paragraph).replace("hr",kf.hr).replace("heading"," {0,3}#{1,6} ").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",kf._tag).getRegex(),kf.blockquote=lf(kf.blockquote).replace("paragraph",kf.paragraph).getRegex(),kf.normal=yf({},kf),kf.gfm=yf({},kf.normal,{table:"^ *([^\\n ].*\\|.*)\\n {0,3}(?:\\| *)?(:?-+:? *(?:\\| *:?-+:? *)*)(?:\\| *)?(?:\\n((?:(?! *\\n|hr|heading|blockquote|code|fences|list|html).*(?:\\n|$))*)\\n*|$)"}),kf.gfm.table=lf(kf.gfm.table).replace("hr",kf.hr).replace("heading"," {0,3}#{1,6} ").replace("blockquote"," {0,3}>").replace("code"," {4}[^\\n]").replace("fences"," {0,3}(?:`{3,}(?=[^`\\n]*\\n)|~{3,})[^\\n]*\\n").replace("list"," {0,3}(?:[*+-]|1[.)]) ").replace("html",")|<(?:script|pre|style|textarea|!--)").replace("tag",kf._tag).getRegex(),kf.gfm.paragraph=lf(kf._paragraph).replace("hr",kf.hr).replace("heading"," {0,3}#{1,6} ").replace("|lheading","").replace("table",kf.gfm.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",kf._tag).getRegex(),kf.pedantic=yf({},kf.normal,{html:lf("^ *(?:comment *(?:\\n|\\s*$)|<(tag)[\\s\\S]+? *(?:\\n{2,}|\\s*$)|\\s]*)*?/?> *(?:\\n{2,}|\\s*$))").replace("comment",kf._comment).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:mf,paragraph:lf(kf.normal._paragraph).replace("hr",kf.hr).replace("heading"," *#{1,6} *[^\n]").replace("lheading",kf.lheading).replace("blockquote"," {0,3}>").replace("|fences","").replace("|list","").replace("|html","").getRegex()});var Cf={escape:/^\\([!"#$%&'()*+,\-./:;<=>?@\[\]\\^_`{|}~])/,autolink:/^<(scheme:[^\s\x00-\x1f<>]*|email)>/,url:mf,tag:"^comment|^|^<[a-zA-Z][\\w-]*(?:attribute)*?\\s*/?>|^<\\?[\\s\\S]*?\\?>|^|^",link:/^!?\[(label)\]\(\s*(href)(?:\s+(title))?\s*\)/,reflink:/^!?\[(label)\]\[(ref)\]/,nolink:/^!?\[(ref)\](?:\[\])?/,reflinkSearch:"reflink|nolink(?!\\()",emStrong:{lDelim:/^(?:\*+(?:([punct_])|[^\s*]))|^_+(?:([punct*])|([^\s_]))/,rDelimAst:/^(?:[^_*\\]|\\.)*?\_\_(?:[^_*\\]|\\.)*?\*(?:[^_*\\]|\\.)*?(?=\_\_)|(?:[^*\\]|\\.)+(?=[^*])|[punct_](\*+)(?=[\s]|$)|(?:[^punct*_\s\\]|\\.)(\*+)(?=[punct_\s]|$)|[punct_\s](\*+)(?=[^punct*_\s])|[\s](\*+)(?=[punct_])|[punct_](\*+)(?=[punct_])|(?:[^punct*_\s\\]|\\.)(\*+)(?=[^punct*_\s])/,rDelimUnd:/^(?:[^_*\\]|\\.)*?\*\*(?:[^_*\\]|\\.)*?\_(?:[^_*\\]|\\.)*?(?=\*\*)|(?:[^_\\]|\\.)+(?=[^_])|[punct*](\_+)(?=[\s]|$)|(?:[^punct*_\s\\]|\\.)(\_+)(?=[punct*\s]|$)|[punct*\s](\_+)(?=[^punct*_\s])|[\s](\_+)(?=[punct*])|[punct*](\_+)(?=[punct*])/},code:/^(`+)([^`]|[^`][\s\S]*?[^`])\1(?!`)/,br:/^( {2,}|\\)\n(?!\s*$)/,del:mf,text:/^(`+|[^`])(?:(?= {2,}\n)|[\s\S]*?(?:(?=[\\.5&&(n="x"+n.toString(16)),r+="&#"+n+";";return r}Cf._punctuation="!\"#$%&'()+\\-.,/:;<=>?@\\[\\]`^{|}~",Cf.punctuation=lf(Cf.punctuation).replace(/punctuation/g,Cf._punctuation).getRegex(),Cf.blockSkip=/\[[^\]]*?\]\([^\)]*?\)|`[^`]*?`|<[^>]*?>/g,Cf.escapedEmSt=/(?:^|[^\\])(?:\\\\)*\\[*_]/g,Cf._comment=lf(kf._comment).replace("(?:--\x3e|$)","--\x3e").getRegex(),Cf.emStrong.lDelim=lf(Cf.emStrong.lDelim).replace(/punct/g,Cf._punctuation).getRegex(),Cf.emStrong.rDelimAst=lf(Cf.emStrong.rDelimAst,"g").replace(/punct/g,Cf._punctuation).getRegex(),Cf.emStrong.rDelimUnd=lf(Cf.emStrong.rDelimUnd,"g").replace(/punct/g,Cf._punctuation).getRegex(),Cf._escapes=/\\([!"#$%&'()*+,\-./:;<=>?@\[\]\\^_`{|}~])/g,Cf._scheme=/[a-zA-Z][a-zA-Z0-9+.-]{1,31}/,Cf._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])?)+(?![-_])/,Cf.autolink=lf(Cf.autolink).replace("scheme",Cf._scheme).replace("email",Cf._email).getRegex(),Cf._attribute=/\s+[a-zA-Z:_][\w.:-]*(?:\s*=\s*"[^"]*"|\s*=\s*'[^']*'|\s*=\s*[^\s"'=<>`]+)?/,Cf.tag=lf(Cf.tag).replace("comment",Cf._comment).replace("attribute",Cf._attribute).getRegex(),Cf._label=/(?:\[(?:\\.|[^\[\]\\])*\]|\\.|`[^`]*`|[^\[\]\\`])*?/,Cf._href=/<(?:\\.|[^\n<>\\])+>|[^\s\x00-\x1f]*/,Cf._title=/"(?:\\"?|[^"\\])*"|'(?:\\'?|[^'\\])*'|\((?:\\\)?|[^)\\])*\)/,Cf.link=lf(Cf.link).replace("label",Cf._label).replace("href",Cf._href).replace("title",Cf._title).getRegex(),Cf.reflink=lf(Cf.reflink).replace("label",Cf._label).replace("ref",kf._label).getRegex(),Cf.nolink=lf(Cf.nolink).replace("ref",kf._label).getRegex(),Cf.reflinkSearch=lf(Cf.reflinkSearch,"g").replace("reflink",Cf.reflink).replace("nolink",Cf.nolink).getRegex(),Cf.normal=yf({},Cf),Cf.pedantic=yf({},Cf.normal,{strong:{start:/^__|\*\*/,middle:/^__(?=\S)([\s\S]*?\S)__(?!_)|^\*\*(?=\S)([\s\S]*?\S)\*\*(?!\*)/,endAst:/\*\*(?!\*)/g,endUnd:/__(?!_)/g},em:{start:/^_|\*/,middle:/^()\*(?=\S)([\s\S]*?\S)\*(?!\*)|^_(?=\S)([\s\S]*?\S)_(?!_)/,endAst:/\*(?!\*)/g,endUnd:/_(?!_)/g},link:lf(/^!?\[(label)\]\((.*?)\)/).replace("label",Cf._label).getRegex(),reflink:lf(/^!?\[(label)\]\s*\[([^\]]*)\]/).replace("label",Cf._label).getRegex()}),Cf.gfm=yf({},Cf.normal,{escape:lf(Cf.escape).replace("])","~|])").getRegex(),_extended_email:/[A-Za-z0-9._+-]+(@)[a-zA-Z0-9-_]+(?:\.[a-zA-Z0-9-_]*[a-zA-Z0-9])+(?![-_])/,url:/^((?:ftp|https?):\/\/|www\.)(?:[a-zA-Z0-9\-]+\.?)+[^\s<]*|^email/,_backpedal:/(?:[^?!.,:;*_~()&]+|\([^)]*\)|&(?![a-zA-Z0-9]+;$)|[?!.,:;*_~)]+(?!$))+/,del:/^(~~?)(?=[^\s~])([\s\S]*?[^\s~])\1(?=[^~]|$)/,text:/^([`~]+|[^`~])(?:(?= {2,}\n)|(?=[a-zA-Z0-9.!#$%&'*+\/=?_`{\|}~-]+@)|[\s\S]*?(?:(?=[\\1&&void 0!==arguments[1]?arguments[1]:[];for(e=this.options.pedantic?e.replace(/\t/g," ").replace(/^ +$/gm,""):e.replace(/^( *)(\t+)/gm,(function(e,t,n){return t+" ".repeat(n.length)}));e;)if(!(this.options.extensions&&this.options.extensions.block&&this.options.extensions.block.some((function(n){return!!(t=n.call({lexer:o},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])||"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])||"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&&function(){var t=1/0,n=e.slice(1),i=void 0;o.options.extensions.startBlock.forEach((function(e){"number"===typeof(i=e.call({lexer:this},n))&&i>=0&&(t=Math.min(t,i))})),t<1/0&&t>=0&&(r=e.substring(0,t+1))}(),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])&&"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){var u="Infinite loop on byte: "+e.charCodeAt(0);if(this.options.silent){console.error(u);break}throw new Error(u)}return this.state.top=!0,a}},{key:"inline",value:function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:[];return this.inlineQueue.push({src:e,tokens:t}),t}},{key:"inlineTokens",value:function(e){var t,n,r,i,o,a,u=this,l=arguments.length>1&&void 0!==arguments[1]?arguments[1]:[],c=e;if(this.tokens.links){var s=Object.keys(this.tokens.links);if(s.length>0)for(;null!=(i=this.tokenizer.rules.inline.reflinkSearch.exec(c));)s.includes(i[0].slice(i[0].lastIndexOf("[")+1,-1))&&(c=c.slice(0,i.index)+"["+Df("a",i[0].length-2)+"]"+c.slice(this.tokenizer.rules.inline.reflinkSearch.lastIndex))}for(;null!=(i=this.tokenizer.rules.inline.blockSkip.exec(c));)c=c.slice(0,i.index)+"["+Df("a",i[0].length-2)+"]"+c.slice(this.tokenizer.rules.inline.blockSkip.lastIndex);for(;null!=(i=this.tokenizer.rules.inline.escapedEmSt.exec(c));)c=c.slice(0,i.index+i[0].length-2)+"++"+c.slice(this.tokenizer.rules.inline.escapedEmSt.lastIndex),this.tokenizer.rules.inline.escapedEmSt.lastIndex--;for(;e;)if(o||(a=""),o=!1,!(this.options.extensions&&this.options.extensions.inline&&this.options.extensions.inline.some((function(n){return!!(t=n.call({lexer:u},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])&&"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])&&"text"===t.type&&"text"===n.type?(n.raw+=t.raw,n.text+=t.text):l.push(t);else if(t=this.tokenizer.emStrong(e,c,a))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,Sf))e=e.substring(t.raw.length),l.push(t);else if(this.state.inLink||!(t=this.tokenizer.url(e,Sf))){if(r=e,this.options.extensions&&this.options.extensions.startInline&&function(){var t=1/0,n=e.slice(1),i=void 0;u.options.extensions.startInline.forEach((function(e){"number"===typeof(i=e.call({lexer:this},n))&&i>=0&&(t=Math.min(t,i))})),t<1/0&&t>=0&&(r=e.substring(0,t+1))}(),t=this.tokenizer.inlineText(r,Ef))e=e.substring(t.raw.length),"_"!==t.raw.slice(-1)&&(a=t.raw.slice(-1)),o=!0,(n=l[l.length-1])&&"text"===n.type?(n.raw+=t.raw,n.text+=t.text):l.push(t);else if(e){var f="Infinite loop on byte: "+e.charCodeAt(0);if(this.options.silent){console.error(f);break}throw new Error(f)}}else e=e.substring(t.raw.length),l.push(t);return l}}],[{key:"rules",get:function(){return{block:kf,inline:Cf}}},{key:"lex",value:function(t,n){return new e(n).lex(t)}},{key:"lexInline",value:function(t,n){return new e(n).inlineTokens(t)}}]),e}(),Ff=function(){function e(t){Dt(this,e),this.options=t||Js}return xt(e,[{key:"code",value:function(e,t,n){var r=(t||"").match(/\S*/)[0];if(this.options.highlight){var i=this.options.highlight(e,r);null!=i&&i!==e&&(n=!0,e=i)}return e=e.replace(/\n$/,"")+"\n",r?'
    '+(n?e:rf(e,!0))+"
    \n":"
    "+(n?e:rf(e,!0))+"
    \n"}},{key:"blockquote",value:function(e){return"
    \n".concat(e,"
    \n")}},{key:"html",value:function(e){return e}},{key:"heading",value:function(e,t,n,r){if(this.options.headerIds){var i=this.options.headerPrefix+r.slug(n);return"').concat(e,"\n")}return"").concat(e,"\n")}},{key:"hr",value:function(){return this.options.xhtml?"
    \n":"
    \n"}},{key:"list",value:function(e,t,n){var r=t?"ol":"ul";return"<"+r+(t&&1!==n?' start="'+n+'"':"")+">\n"+e+"\n"}},{key:"listitem",value:function(e){return"
  • ".concat(e,"
  • \n")}},{key:"checkbox",value:function(e){return" "}},{key:"paragraph",value:function(e){return"

    ".concat(e,"

    \n")}},{key:"table",value:function(e,t){return t&&(t="".concat(t,"")),"\n\n"+e+"\n"+t+"
    \n"}},{key:"tablerow",value:function(e){return"\n".concat(e,"\n")}},{key:"tablecell",value:function(e,t){var n=t.header?"th":"td";return(t.align?"<".concat(n,' align="').concat(t.align,'">'):"<".concat(n,">"))+e+"\n")}},{key:"strong",value:function(e){return"".concat(e,"")}},{key:"em",value:function(e){return"".concat(e,"")}},{key:"codespan",value:function(e){return"".concat(e,"")}},{key:"br",value:function(){return this.options.xhtml?"
    ":"
    "}},{key:"del",value:function(e){return"".concat(e,"")}},{key:"link",value:function(e,t,n){if(null===(e=ff(this.options.sanitize,this.options.baseUrl,e)))return n;var r='
    "}},{key:"image",value:function(e,t,n){if(null===(e=ff(this.options.sanitize,this.options.baseUrl,e)))return n;var r='').concat(n,'":">"}},{key:"text",value:function(e){return e}}]),e}(),Nf=function(){function e(){Dt(this,e)}return xt(e,[{key:"strong",value:function(e){return e}},{key:"em",value:function(e){return e}},{key:"codespan",value:function(e){return e}},{key:"del",value:function(e){return e}},{key:"html",value:function(e){return e}},{key:"text",value:function(e){return e}},{key:"link",value:function(e,t,n){return""+n}},{key:"image",value:function(e,t,n){return""+n}},{key:"br",value:function(){return""}}]),e}(),Of=function(){function e(){Dt(this,e),this.seen={}}return xt(e,[{key:"serialize",value:function(e){return e.toLowerCase().trim().replace(/<[!\/a-z].*?>/gi,"").replace(/[\u2000-\u206F\u2E00-\u2E7F\\'!"#$%&()*+,./:;<=>?@[\]^`{|}~]/g,"").replace(/\s/g,"-")}},{key:"getNextSafeSlug",value:function(e,t){var n=e,r=0;if(this.seen.hasOwnProperty(n)){r=this.seen[e];do{n=e+"-"+ ++r}while(this.seen.hasOwnProperty(n))}return t||(this.seen[e]=r,this.seen[n]=0),n}},{key:"slug",value:function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},n=this.serialize(e);return this.getNextSafeSlug(n,t.dryrun)}}]),e}(),Tf=function(){function e(t){Dt(this,e),this.options=t||Js,this.options.renderer=this.options.renderer||new Ff,this.renderer=this.options.renderer,this.renderer.options=this.options,this.textRenderer=new Nf,this.slugger=new Of}return xt(e,[{key:"parse",value:function(e){var t,n,r,i,o,a,u,l,c,s,f,d,h,p,v,m,y,g,_,b=!(arguments.length>1&&void 0!==arguments[1])||arguments[1],D="",w=e.length;for(t=0;t0&&"paragraph"===v.tokens[0].type?(v.tokens[0].text=g+" "+v.tokens[0].text,v.tokens[0].tokens&&v.tokens[0].tokens.length>0&&"text"===v.tokens[0].tokens[0].type&&(v.tokens[0].tokens[0].text=g+" "+v.tokens[0].tokens[0].text)):v.tokens.unshift({type:"text",text:g}):p+=g),p+=this.parse(v.tokens,h),c+=this.renderer.listitem(p,y,m);D+=this.renderer.list(c,f,d);continue;case"html":D+=this.renderer.html(s.text);continue;case"paragraph":D+=this.renderer.paragraph(this.parseInline(s.tokens));continue;case"text":for(c=s.tokens?this.parseInline(s.tokens):s.text;t+1An error occurred:

    "+rf(e.message+"",!0)+"
    ";throw e}try{var l=Af.lex(e,t);if(t.walkTokens){if(t.async)return Promise.all(Bf.walkTokens(l,t.walkTokens)).then((function(){return Tf.parse(l,t)})).catch(u);Bf.walkTokens(l,t.walkTokens)}return Tf.parse(l,t)}catch(c){u(c)}}Bf.options=Bf.setOptions=function(e){var t;return yf(Bf.defaults,e),t=Bf.defaults,Js=t,Bf},Bf.getDefaults=Gs,Bf.defaults=Js,Bf.use=function(){for(var e=arguments.length,t=new Array(e),n=0;nAn error occurred:

    "+rf(c.message+"",!0)+"
    ";throw c}},Bf.Parser=Tf,Bf.parser=Tf.parse,Bf.Renderer=Ff,Bf.TextRenderer=Nf,Bf.Lexer=Af,Bf.lexer=Af.lex,Bf.Tokenizer=xf,Bf.Slugger=Of,Bf.parse=Bf;Bf.options,Bf.setOptions,Bf.use,Bf.walkTokens,Bf.parseInline,Tf.parse,Af.lex;var Mf=function(e){var t=e.title,n=e.description,r=e.unit,i=e.expr,o=e.showLegend,a=e.filename,u=e.alias,l=Wr().period,c=Qr(),s=re(null),f=_t(X(!0),2),d=f[0],h=f[1],p=_t(X(l.step||1),2),v=p[0],y=p[1],g=_t(X({limits:{enable:!1,range:{1:[0,0]}}}),2),_=g[0],b=g[1],D=oe((function(){return Array.isArray(i)&&i.every((function(e){return e}))}),[i]),w=As({predefinedQuery:D?i:[],display:"chart",visible:d,customStep:v}),x=w.isLoading,k=w.graphData,C=w.error,E=w.warning,S=function(e){var t=Kn({},_);t.limits.range=e,b(t)};if(te((function(){var e=new IntersectionObserver((function(e){e.forEach((function(e){return h(e.isIntersecting)}))}),{threshold:.1});return s.current&&e.observe(s.current),function(){s.current&&e.unobserve(s.current)}}),[]),!D)return fr(lo,{variant:"error",children:[fr("code",{children:'"expr"'})," not found. Check the configuration file ",fr("b",{children:a}),"."]});var A=function(){return fr("div",{className:"vm-predefined-panel-header__description vm-default-styles",children:[n&&fr(m,{children:[fr("div",{children:[fr("span",{children:"Description:"}),fr("div",{dangerouslySetInnerHTML:{__html:Bf.parse(n)}})]}),fr("hr",{})]}),fr("div",{children:[fr("span",{children:"Queries:"}),fr("div",{children:i.map((function(e,t){return fr("div",{children:e},"".concat(t,"_").concat(e))}))})]})]})};return fr("div",{className:"vm-predefined-panel",ref:s,children:[fr("div",{className:"vm-predefined-panel-header",children:[fr(mo,{title:fr(A,{}),children:fr("div",{className:"vm-predefined-panel-header__info",children:fr(li,{})})}),fr("h3",{className:"vm-predefined-panel-header__title",children:t||""}),fr("div",{className:"vm-predefined-panel-header__step",children:fr(gs,{defaultStep:l.step,setStep:y})}),fr(Ts,{yaxis:_,setYaxisLimits:S,toggleEnableLimits:function(){var e=Kn({},_);e.limits.enable=!e.limits.enable,b(e)}})]}),fr("div",{className:"vm-predefined-panel-body",children:[x&&fr(Bs,{}),C&&fr(lo,{variant:"error",children:C}),E&&fr(lo,{variant:"warning",children:E}),k&&fr(ps,{data:k,period:l,customStep:v,query:i,yaxis:_,unit:r,alias:u,showLegend:o,setYaxisLimits:S,setPeriod:function(e){var t=e.from,n=e.to;c({type:"SET_PERIOD",payload:{from:t,to:n}})},fullWidth:!1})]})]})},Lf=function(e){var t=e.defaultExpanded,n=void 0!==t&&t,r=e.onChange,i=e.title,o=e.children,a=_t(X(n),2),u=a[0],l=a[1];return te((function(){r&&r(u)}),[u]),fr(m,{children:[fr("header",{className:"vm-accordion-header ".concat(u&&"vm-accordion-header_open"),onClick:function(){l((function(e){return!e}))},children:[i,fr("div",{className:"vm-accordion-header__arrow ".concat(u&&"vm-accordion-header__arrow_open"),children:fr(hi,{})})]}),u&&fr("section",{className:"vm-accordion-section",children:o},"content")]})},Pf=function(e){var t=e.index,n=e.title,r=e.panels,i=e.filename,o=bo(document.body),a=oe((function(){return o.width/12}),[o]),u=_t(X(!t),2),l=u[0],c=u[1],s=_t(X([]),2),f=s[0],d=s[1];te((function(){d(r&&r.map((function(e){return e.width||12})))}),[r]);var h=_t(X({start:0,target:0,enable:!1}),2),p=h[0],v=h[1],m=function(e){if(p.enable){var t=p.start,n=Math.ceil((t-e.clientX)/a);if(!(Math.abs(n)>=12)){var r=f.map((function(e,t){return e-(t===p.target?n:0)}));d(r)}}},y=function(){v(Kn(Kn({},p),{},{enable:!1}))},g=function(e){return function(t){!function(e,t){v({start:e.clientX,target:t,enable:!0})}(t,e)}};return te((function(){return window.addEventListener("mousemove",m),window.addEventListener("mouseup",y),function(){window.removeEventListener("mousemove",m),window.removeEventListener("mouseup",y)}}),[p]),fr("div",{className:"vm-predefined-dashboard",children:fr(Lf,{defaultExpanded:l,onChange:function(e){return c(e)},title:fr((function(){return fr("div",{className:Bi()({"vm-predefined-dashboard-header":!0,"vm-predefined-dashboard-header_open":l}),children:[(n||i)&&fr("span",{className:"vm-predefined-dashboard-header__title",children:n||"".concat(t+1,". ").concat(i)}),r&&fr("span",{className:"vm-predefined-dashboard-header__count",children:["(",r.length," panels)"]})]})}),{}),children:fr("div",{className:"vm-predefined-dashboard-panels",children:Array.isArray(r)&&r.length?r.map((function(e,t){return fr("div",{className:"vm-predefined-dashboard-panels-panel vm-block vm-block_empty-padding",style:{gridColumn:"span ".concat(f[t])},children:[fr(Mf,{title:e.title,description:e.description,unit:e.unit,expr:e.expr,alias:e.alias,filename:i,showLegend:e.showLegend}),fr("button",{className:"vm-predefined-dashboard-panels-panel__resizer",onMouseDown:g(t)})]},t)})):fr("div",{className:"vm-predefined-dashboard-panels-panel__alert",children:fr(lo,{variant:"error",children:[fr("code",{children:'"panels"'})," not found. Check the configuration file ",fr("b",{children:i}),"."]})})})})})},If=function(){!function(){var e=Wr(),t=e.duration,n=e.relativeTime,r=e.period,i=r.date,o=r.step,a=function(){var e,r=Hs((qn(e={},"g0.range_input",t),qn(e,"g0.end_input",i),qn(e,"g0.step_input",o),qn(e,"g0.relative_time",n),e));ar(r)};te(a,[t,n,i,o]),te(a,[])}();var e=_t(X([]),2),t=e[0],n=e[1],r=_t(X("0"),2),i=r[0],o=r[1],a=oe((function(){return t.map((function(e,t){return{label:e.title||"",value:"".concat(t),className:"vm-predefined-panels-tabs__tab"}}))}),[t]),u=oe((function(){return t[+i]||{}}),[t,i]),l=oe((function(){return null===u||void 0===u?void 0:u.rows}),[u]),c=oe((function(){return u.title||u.filename||""}),[u]),s=oe((function(){return Array.isArray(l)&&!!l.length}),[l]);return te((function(){Qs().then((function(e){return e.length&&n(e)}))}),[]),fr("div",{className:"vm-predefined-panels",children:[!t.length&&fr(lo,{variant:"info",children:"Dashboards not found"}),a.length>1&&fr("div",{className:"vm-predefined-panels-tabs vm-block vm-block_empty-padding",children:fr(Pi,{activeItem:i,items:a,onChange:function(e){o(e)}})}),fr("div",{className:"vm-predefined-panels__dashboards",children:[s&&l.map((function(e,t){return fr(Pf,{index:t,filename:c,title:e.title,panels:e.panels},"".concat(i,"_").concat(t))})),!!t.length&&!s&&fr(lo,{variant:"error",children:[fr("code",{children:'"rows"'})," not found. Check the configuration file ",fr("b",{children:c}),"."]})]})]})},$f=function(e,t){var n=t.match?"&match[]="+encodeURIComponent(t.match):"",r=t.focusLabel?"&focusLabel="+encodeURIComponent(t.focusLabel):"";return"".concat(e,"/api/v1/status/tsdb?topN=").concat(t.topN,"&date=").concat(t.date).concat(n).concat(r)},Rf=function(){function e(){Dt(this,e),this.tsdbStatus=void 0,this.tabsNames=void 0,this.tsdbStatus=this.defaultTSDBStatus,this.tabsNames=["table","graph"]}return xt(e,[{key:"tsdbStatusData",get:function(){return this.tsdbStatus},set:function(e){this.tsdbStatus=e}},{key:"defaultTSDBStatus",get:function(){return{totalSeries:0,totalLabelValuePairs:0,seriesCountByMetricName:[],seriesCountByLabelName:[],seriesCountByFocusLabelValue:[],seriesCountByLabelValuePair:[],labelValueCountByLabelName:[]}}},{key:"keys",value:function(e){var t=[];return e&&(t=t.concat("seriesCountByFocusLabelValue")),t=t.concat("seriesCountByMetricName","seriesCountByLabelName","seriesCountByLabelValuePair","labelValueCountByLabelName"),t}},{key:"defaultState",get:function(){var e=this;return this.keys("job").reduce((function(t,n){return Kn(Kn({},t),{},{tabs:Kn(Kn({},t.tabs),{},qn({},n,e.tabsNames)),containerRefs:Kn(Kn({},t.containerRefs),{},qn({},n,re(null))),defaultActiveTab:Kn(Kn({},t.defaultActiveTab),{},qn({},n,0))})}),{tabs:{},containerRefs:{},defaultActiveTab:{}})}},{key:"sectionsTitles",value:function(e){return{seriesCountByMetricName:"Metric names with the highest number of series",seriesCountByLabelName:"Labels with the highest number of series",seriesCountByFocusLabelValue:'Values for "'.concat(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"}}},{key:"tablesHeaders",get:function(){return{seriesCountByMetricName:jf,seriesCountByLabelName:zf,seriesCountByFocusLabelValue:Uf,seriesCountByLabelValuePair:Hf,labelValueCountByLabelName:Vf}}},{key:"totalSeries",value:function(e){return"labelValueCountByLabelName"===e?-1:this.tsdbStatus.totalSeries}}]),e}(),jf=[{id:"name",label:"Metric name"},{id:"value",label:"Number of series"},{id:"percentage",label:"Percent of series"},{id:"action",label:"Action"}],zf=[{id:"name",label:"Label name"},{id:"value",label:"Number of series"},{id:"percentage",label:"Percent of series"},{id:"action",label:"Action"}],Uf=[{id:"name",label:"Label value"},{id:"value",label:"Number of series"},{id:"percentage",label:"Percent of series"},{disablePadding:!1,id:"action",label:"Action",numeric:!1}],Hf=[{id:"name",label:"Label=value pair"},{id:"value",label:"Number of series"},{id:"percentage",label:"Percent of series"},{id:"action",label:"Action"}],Vf=[{id:"name",label:"Label name"},{id:"value",label:"Number of unique values"},{id:"action",label:"Action"}],Yf={seriesCountByMetricName:function(e,t){return qf("__name__",t)},seriesCountByLabelName:function(e,t){return"{".concat(t,'!=""}')},seriesCountByFocusLabelValue:function(e,t){return qf(e,t)},seriesCountByLabelValuePair:function(e,t){var n=t.split("="),r=n[0],i=n.slice(1).join("=");return qf(r,i)},labelValueCountByLabelName:function(e,t){return"{".concat(t,'!=""}')}},qf=function(e,t){return e?"{"+e+"="+JSON.stringify(t)+"}":""},Wf=function(e){var t=e.topN,n=e.error,r=e.query,i=e.onSetHistory,o=e.onRunQuery,a=e.onSetQuery,u=e.onTopNChange,l=e.onFocusLabelChange,c=e.totalSeries,s=e.totalLabelValuePairs,f=e.date,d=e.match,h=e.focusLabel,p=ni().autocomplete,v=ri(),m=Ms().queryOptions,y=oe((function(){return t<1?"Number must be bigger than zero":""}),[t]);return fr("div",{className:"vm-cardinality-configurator vm-block",children:[fr("div",{className:"vm-cardinality-configurator-controls",children:[fr("div",{className:"vm-cardinality-configurator-controls__query",children:fr(vs,{value:r||d||"",autocomplete:p,options:m,error:n,onArrowUp:function(){i(-1)},onArrowDown:function(){i(1)},onEnter:o,onChange:a,label:"Time series selector"})}),fr("div",{className:"vm-cardinality-configurator-controls__item",children:fr(To,{label:"Number of entries per table",type:"number",value:t,error:y,onChange:u})}),fr("div",{className:"vm-cardinality-configurator-controls__item",children:fr(To,{label:"Focus label",type:"text",value:h||"",onChange:l})}),fr("div",{className:"vm-cardinality-configurator-controls__item",children:fr(bs,{label:"Autocomplete",value:p,onChange:function(){v({type:"TOGGLE_AUTOCOMPLETE"})}})})]}),fr("div",{className:"vm-cardinality-configurator-bottom",children:[fr("div",{className:"vm-cardinality-configurator-bottom__info",children:["Analyzed ",fr("b",{children:c})," series with ",fr("b",{children:s}),' "label=value" pairs at ',fr("b",{children:f}),d&&fr("span",{children:[" for series selector ",fr("b",{children:d})]}),". Show top ",t," entries per table."]}),fr(ho,{startIcon:fr(bi,{}),onClick:o,children:"Execute Query"})]})]})};function Qf(e){var t=e.order,n=e.orderBy,r=e.onRequestSort,i=e.headerCells;return fr("thead",{className:"vm-table-header",children:fr("tr",{className:"vm-table__row vm-table__row_header",children:i.map((function(e){return fr("th",{className:Bi()({"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:(i=e.id,function(e){r(e,i)}),children:fr("div",{className:"vm-table-cell__content",children:[e.label,"action"!==e.id&&"percentage"!==e.id&&fr("div",{className:Bi()({"vm-table__sort-icon":!0,"vm-table__sort-icon_active":n===e.id,"vm-table__sort-icon_desc":"desc"===t&&n===e.id}),children:fr(vi,{})})]})},e.id);var i}))})})}function Gf(e,t,n){return t[n]e[n]?1:0}function Jf(e,t){return"desc"===e?function(e,n){return Gf(e,n,t)}:function(e,n){return-Gf(e,n,t)}}function Zf(e,t){var n=e.map((function(e,t){return[e,t]}));return n.sort((function(e,n){var r=t(e[0],n[0]);return 0!==r?r:e[1]-n[1]})),n.map((function(e){return e[0]}))}var Kf=function(e){var t=e.rows,n=e.headerCells,r=e.defaultSortColumn,i=e.tableCells,o=_t(X("desc"),2),a=o[0],u=o[1],l=_t(X(r),2),c=l[0],s=l[1],f=_t(X([]),2),d=f[0],h=f[1],p=function(e){return function(){var t=d.indexOf(e),n=[];-1===t?n=n.concat(d,e):0===t?n=n.concat(d.slice(1)):t===d.length-1?n=n.concat(d.slice(0,-1)):t>0&&(n=n.concat(d.slice(0,t),d.slice(t+1))),h(n)}},v=Zf(t,Jf(a,c));return fr("table",{className:"vm-table",children:[fr(Qf,{numSelected:d.length,order:a,orderBy:c,onSelectAllClick:function(e){if(e.target.checked){var n=t.map((function(e){return e.name}));h(n)}else h([])},onRequestSort:function(e,t){u(c===t&&"asc"===a?"desc":"asc"),s(t)},rowCount:t.length,headerCells:n}),fr("tbody",{className:"vm-table-header",children:v.map((function(e){return fr("tr",{className:Bi()({"vm-table__row":!0,"vm-table__row_selected":(t=e.name,-1!==d.indexOf(t))}),onClick:p(e.name),children:i(e)},e.name);var t}))})]})},Xf=function(e){var t=e.row,n=e.totalSeries,r=e.onActionClick,i=n>0?t.value/n*100:-1;return fr(m,{children:[fr("td",{className:"vm-table-cell",children:t.name},t.name),fr("td",{className:"vm-table-cell",children:t.value},t.value),i>0&&fr("td",{className:"vm-table-cell",children:fr(Ls,{value:i})},t.progressValue),fr("td",{className:"vm-table-cell vm-table-cell_right",children:fr("div",{className:"vm-table-cell__content",children:fr(mo,{title:"Filter by ".concat(t.name),children:fr(ho,{variant:"text",size:"small",onClick:r,children:fr(Di,{})})})})},"action")]})},ed=function(e){var t=e.data,n=e.container,r=e.configs,i=re(null),o=_t(X(),2),a=o[0],u=o[1],l=bo(n),c=Kn(Kn({},r),{},{width:l.width||400});return te((function(){if(i.current){var e=new zc(c,t,i.current);return u(e),e.destroy}}),[i.current,l]),te((function(){a&&a.setData(t)}),[t]),fr("div",{style:{height:"100%"},children:fr("div",{ref:i})})},td=function(e,t){return Math.round(e*(t=Math.pow(10,t)))/t},nd=1,rd=function(e,t,n,r){return td(t+e*(n+r),6)},id=function(e,t,n,r,i){var o=1-t,a=n===nd?o/(e-1):2===n?o/e:3===n?o/(e+1):0;(isNaN(a)||a===1/0)&&(a=0);var u=n===nd?0:2===n?a/2:3===n?a:0,l=t/e,c=td(l,6);if(null==r)for(var s=0;s=n&&e<=i&&t>=r&&t<=o};function ad(e,t,n,r,i){var o=this;o.x=e,o.y=t,o.w=n,o.h=r,o.l=i||0,o.o=[],o.q=null}var ud={split:function(){var e=this,t=e.x,n=e.y,r=e.w/2,i=e.h/2,o=e.l+1;e.q=[new ad(t+r,n,r,i,o),new ad(t,n,r,i,o),new ad(t,n+i,r,i,o),new ad(t+r,n+i,r,i,o)]},quads:function(e,t,n,r,i){var o=this,a=o.q,u=o.x+o.w/2,l=o.y+o.h/2,c=tu,d=t+r>l;c&&f&&i(a[0]),s&&c&&i(a[1]),s&&d&&i(a[2]),f&&d&&i(a[3])},add:function(e){var t=this;if(null!=t.q)t.quads(e.x,e.y,e.w,e.h,(function(t){t.add(e)}));else{var n=t.o;if(n.push(e),n.length>10&&t.l<4){t.split();for(var r=function(e){var r=n[e];t.quads(r.x,r.y,r.w,r.h,(function(e){e.add(r)}))},i=0;i=0?"left":"right",e.ctx.textBaseline=1===s?"middle":i[n]>=0?"bottom":"top",e.ctx.fillText(i[n],f,g)}}))})),e.ctx.restore()}function b(e,t,n){return[0,zc.rangeNum(0,n,.05,!0)[1]]}return{hooks:{drawClear:function(t){var n;if((y=y||new ad(0,0,t.bbox.width,t.bbox.height)).clear(),t.series.forEach((function(e){e._paths=null})),l=d?[null].concat(m(t.data.length-1-o.length,t.data[0].length)):2===t.series.length?[null].concat(m(t.data[0].length,1)):[null].concat(function(e,t){var n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:h,r=Array.from({length:t},(function(){return{offs:Array(e).fill(0),size:Array(e).fill(0)}}));return id(e,n,p,null,(function(e,n,i){id(t,1,v,null,(function(t,o,a){r[t].offs[e]=n+i*o,r[t].size[e]=i*a}))})),r}(t.data[0].length,t.data.length-1-o.length,1===t.data[0].length?1:h)),null!=(null===(n=e.disp)||void 0===n?void 0:n.fill)){c=[null];for(var r=1;r0&&!o.includes(t)&&zc.assign(e,{paths:g,points:{show:_}})}))}}}((ld=[1],cd=0,sd=1,fd=0,dd=function(e,t){return{stroke:e,fill:t}}({unit:3,values:function(e){return e.data[1].map((function(e,t){return 0!==t?"#33BB55":"#F79420"}))}},{unit:3,values:function(e){return e.data[1].map((function(e,t){return 0!==t?"#33BB55":"#F79420"}))}}),{which:ld,ori:cd,dir:sd,radius:fd,disp:dd}))]},pd=function(e){var t=e.rows,n=e.activeTab,r=e.onChange,i=e.tabs,o=e.chartContainer,a=e.totalSeries,u=e.tabId,l=e.onActionClick,c=e.sectionTitle,s=e.tableHeaderCells,f=oe((function(){return i.map((function(e,t){return{value:String(t),label:e,icon:fr(0===t?xi:wi,{})}}))}),[i]);return fr("div",{className:"vm-metrics-content vm-block",children:[fr("div",{className:"vm-metrics-content-header vm-section-header",children:[fr("h5",{className:"vm-section-header__title",children:c}),fr("div",{className:"vm-section-header__tabs",children:fr(Pi,{activeItem:String(n),items:f,onChange:function(e){r(e,u)}})})]}),fr("div",{ref:o,children:[0===n&&fr(Kf,{rows:t,headerCells:s,defaultSortColumn:"value",tableCells:function(e){return fr(Xf,{row:e,totalSeries:a,onActionClick:l})}}),1===n&&fr(ed,{data:[t.map((function(e){return e.name})),t.map((function(e){return e.value})),t.map((function(e,t){return t%12==0?1:t%10==0?2:0}))],container:(null===o||void 0===o?void 0:o.current)||null,configs:hd})]})]})},vd=function(){var e=eo(),t=e.topN,n=e.match,r=e.date,i=e.focusLabel,o=to();!function(){var e=eo(),t=e.topN,n=e.match,r=e.date,i=e.focusLabel,o=e.extraLabel,a=function(){var e=Hs({topN:t,date:r,match:n,extraLabel:o,focusLabel:i});ar(e)};te(a,[t,n,r,i,o]),te(a,[])}();var a=_t(X(n||""),2),u=a[0],l=a[1],c=_t(X(0),2),s=c[0],f=c[1],d=_t(X([]),2),h=d[0],p=d[1],v=function(){var e=new Rf,t=eo(),n=t.topN,r=t.extraLabel,i=t.match,o=t.date,a=t.runQuery,u=t.focusLabel,l=hr().serverUrl,c=_t(X(!1),2),s=c[0],f=c[1],d=_t(X(),2),h=d[0],p=d[1],v=_t(X(e.defaultTSDBStatus),2),m=v[0],y=v[1];te((function(){h&&(y(e.defaultTSDBStatus),f(!1))}),[h]);var g=function(){var t=os(rs().mark((function t(n){var r,i,o,a;return rs().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:if(l){t.next=2;break}return t.abrupt("return");case 2:return p(""),f(!0),y(e.defaultTSDBStatus),r=$f(l,n),t.prev=6,t.next=9,fetch(r);case 9:return i=t.sent,t.next=12,i.json();case 12:o=t.sent,i.ok?(a=o.data,y(Kn({},a)),f(!1)):(p(o.error),y(e.defaultTSDBStatus),f(!1)),t.next=20;break;case 16:t.prev=16,t.t0=t.catch(6),f(!1),t.t0 instanceof Error&&p("".concat(t.t0.name,": ").concat(t.t0.message));case 20:case"end":return t.stop()}}),t,null,[[6,16]])})));return function(e){return t.apply(this,arguments)}}();return te((function(){g({topN:n,extraLabel:r,match:i,date:o,focusLabel:u})}),[l,a,o]),e.tsdbStatusData=m,{isLoading:s,appConfigurator:e,error:h}}(),m=v.isLoading,y=v.appConfigurator,g=v.error,_=_t(X(y.defaultState.defaultActiveTab),2),b=_[0],D=_[1],w=y.tsdbStatusData,x=y.defaultState,k=y.tablesHeaders,C=function(e,t){D(Kn(Kn({},b),{},qn({},t,+e)))};return fr("div",{className:"vm-cardinality-panel",children:[m&&fr(Bs,{message:"Please wait while cardinality stats is calculated. \n This may take some time if the db contains big number of time series."}),fr(Wf,{error:"",query:u,topN:t,date:r,match:n,totalSeries:w.totalSeries,totalLabelValuePairs:w.totalLabelValuePairs,focusLabel:i,onRunQuery:function(){p((function(e){return[].concat(bt(e),[u])})),f((function(e){return e+1})),o({type:"SET_MATCH",payload:u}),o({type:"RUN_QUERY"})},onSetQuery:function(e){l(e)},onSetHistory:function(e){var t=s+e;t<0||t>=h.length||(f(t),l(h[t]))},onTopNChange:function(e){o({type:"SET_TOP_N",payload:+e})},onFocusLabelChange:function(e){o({type:"SET_FOCUS_LABEL",payload:e})}}),g&&fr(lo,{variant:"error",children:g}),y.keys(i).map((function(e){return fr(pd,{sectionTitle:y.sectionsTitles(i)[e],activeTab:b[e],rows:w[e],onChange:C,onActionClick:(t=e,function(e){var n=e.currentTarget.id,r=Yf[t](i,n);l(r),p((function(e){return[].concat(bt(e),[r])})),f((function(e){return e+1})),o({type:"SET_MATCH",payload:r});var a="";"labelValueCountByLabelName"!==t&&"seriesCountByLabelName"!=t||(a=n),o({type:"SET_FOCUS_LABEL",payload:a}),o({type:"RUN_QUERY"})}),tabs:x.tabs[e],chartContainer:x.containerRefs[e],totalSeries:y.totalSeries(e),tabId:e,tableHeaderCells:k[e]},e);var t}))]})},md=function(e){var t=e.rows,n=e.columns,r=_t(X(e.defaultOrderBy||"count"),2),i=r[0],o=r[1],a=_t(X("desc"),2),u=a[0],l=a[1],c=oe((function(){return Zf(t,Jf(u,i))}),[t,i,u]),s=function(e){return function(){var t;t=e,l((function(e){return"asc"===e&&i===t?"desc":"asc"})),o(t)}};return fr("table",{className:"vm-table",children:[fr("thead",{className:"vm-table-header",children:fr("tr",{className:"vm-table__row vm-table__row_header",children:n.map((function(e){return fr("th",{className:"vm-table-cell vm-table-cell_header vm-table-cell_sort",onClick:s(e.key),children:fr("div",{className:"vm-table-cell__content",children:[e.title||e.key,fr("div",{className:Bi()({"vm-table__sort-icon":!0,"vm-table__sort-icon_active":i===e.key,"vm-table__sort-icon_desc":"desc"===u&&i===e.key}),children:fr(vi,{})})]})},e.key)}))})}),fr("tbody",{className:"vm-table-body",children:c.map((function(e,t){return fr("tr",{className:"vm-table__row",children:n.map((function(t){return fr("td",{className:"vm-table-cell",children:e[t.key]||"-"},t.key)}))},t)}))})]})},yd=["table","JSON"].map((function(e,t){return{value:String(t),label:e,icon:fr(0===t?xi:ki,{})}})),gd=function(e){var t=e.rows,n=e.title,r=e.columns,i=e.defaultOrderBy,o=_t(X(0),2),a=o[0],u=o[1];return fr("div",{className:"vm-top-queries-panel vm-block",children:[fr("div",{className:"vm-top-queries-panel-header vm-section-header",children:[fr("h5",{className:"vm-section-header__title",children:n}),fr("div",{className:"vm-section-header__tabs",children:fr(Pi,{activeItem:String(a),items:yd,onChange:function(e){u(+e)}})})]}),fr("div",{children:[0===a&&fr(md,{rows:t,columns:r,defaultOrderBy:i}),1===a&&fr(Fs,{data:t})]})]})},_d=function(){var e=function(){var e=hr().serverUrl,t=ao(),n=t.topN,r=t.maxLifetime,i=t.runQuery,o=_t(X(null),2),a=o[0],u=o[1],l=_t(X(!1),2),c=l[0],s=l[1],f=_t(X(),2),d=f[0],h=f[1],p=oe((function(){return function(e,t,n){return"".concat(e,"/api/v1/status/top_queries?topN=").concat(t||"","&maxLifetime=").concat(n||"")}(e,n,r)}),[e,n,r]),v=function(){var e=os(rs().mark((function e(){var t,n;return rs().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return s(!0),e.prev=1,e.next=4,fetch(p);case 4:return t=e.sent,e.next=7,t.json();case 7:n=e.sent,t.ok&&["topByAvgDuration","topByCount","topBySumDuration"].forEach((function(e){var t=n[e];Array.isArray(t)&&t.forEach((function(e){return e.timeRangeHours=+(e.timeRangeSeconds/3600).toFixed(2)}))})),u(t.ok?n:null),h(String(n.error||"")),e.next=16;break;case 13:e.prev=13,e.t0=e.catch(1),e.t0 instanceof Error&&"AbortError"!==e.t0.name&&h("".concat(e.t0.name,": ").concat(e.t0.message));case 16:s(!1);case 17:case"end":return e.stop()}}),e,null,[[1,13]])})));return function(){return e.apply(this,arguments)}}();return te((function(){v()}),[i]),{data:a,error:d,loading:c}}(),t=e.data,n=e.error,r=e.loading,i=ao(),o=i.topN,a=i.maxLifetime,u=ue(oo).dispatch;!function(){var e=ao(),t=e.topN,n=e.maxLifetime,r=function(){var e=Hs({topN:String(t),maxLifetime:n});ar(e)};te(r,[t,n]),te(r,[])}();var l=oe((function(){var e=a.trim().split(" ").reduce((function(e,t){var n=Or(t);return n?Kn(Kn({},e),n):Kn({},e)}),{});return!!yr().duration(e).asMilliseconds()}),[a]),c=oe((function(){return!!o&&o<1}),[o]),s=oe((function(){return c?"Number must be bigger than zero":""}),[c]),f=oe((function(){return l?"":"Invalid duration value"}),[l]),d=function(e){if(!t)return e;var n=t[e];return"number"===typeof n?Yc(n):n||e},h=function(){u({type:"SET_RUN_QUERY"})},p=function(e){"Enter"===e.key&&h()};return te((function(){t&&(o||u({type:"SET_TOP_N",payload:+t.topN}),a||u({type:"SET_MAX_LIFE_TIME",payload:t.maxLifetime}))}),[t]),fr("div",{className:"vm-top-queries",children:[r&&fr(Bs,{containerStyles:{height:"500px"}}),fr("div",{className:"vm-top-queries-controls vm-block",children:[fr("div",{className:"vm-top-queries-controls__fields",children:[fr(To,{label:"Max lifetime",value:a,error:f,helperText:"For example ".concat("30ms, 15s, 3d4h, 1y2w"),onChange:function(e){u({type:"SET_MAX_LIFE_TIME",payload:e})},onKeyDown:p}),fr(To,{label:"Number of returned queries",type:"number",value:o||"",error:s,onChange:function(e){u({type:"SET_TOP_N",payload:+e})},onKeyDown:p})]}),fr("div",{className:"vm-top-queries-controls-bottom",children:[fr("div",{className:"vm-top-queries-controls-bottom__info",children:["VictoriaMetrics tracks the last\xa0",fr(mo,{title:"search.queryStats.lastQueriesCount",children:fr("b",{children:d("search.queryStats.lastQueriesCount")})}),"\xa0queries with durations at least\xa0",fr(mo,{title:"search.queryStats.minQueryDuration",children:fr("b",{children:d("search.queryStats.minQueryDuration")})})]}),fr("div",{className:"vm-top-queries-controls-bottom__button",children:fr(ho,{startIcon:fr(bi,{}),onClick:h,children:"Execute"})})]})]}),n&&fr(lo,{variant:"error",children:n}),t&&fr(m,{children:fr("div",{className:"vm-top-queries-panels",children:[fr(gd,{rows:t.topByCount,title:"Most frequently executed queries",columns:[{key:"query"},{key:"timeRangeHours",title:"time range, hours"},{key:"count"}]}),fr(gd,{rows:t.topByAvgDuration,title:"Most heavy queries",columns:[{key:"query"},{key:"avgDurationSeconds",title:"avg duration, seconds"},{key:"timeRangeHours",title:"time range, hours"},{key:"count"}],defaultOrderBy:"avgDurationSeconds"}),fr(gd,{rows:t.topBySumDuration,title:"Queries with most summary time to execute",columns:[{key:"query"},{key:"sumDurationSeconds",title:"sum duration, seconds"},{key:"timeRangeHours",title:"time range, hours"},{key:"count"}],defaultOrderBy:"sumDurationSeconds"})]})})]})},bd=["primary","secondary","error","warning","info","success"],Dd=function(e){var t=e.setLoadingTheme,n=Xn().palette,r=void 0===n?{}:n,i=function(){bd.forEach((function(e){var t=function(e){var 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"}(Mi("color-".concat(e)));Li("".concat(e,"-text"),t)}))};return te((function(){bd.forEach((function(e){var t=r[e];t&&Li("color-".concat(e),t)})),function(){var e=window,t=e.innerWidth,n=e.innerHeight,r=document.documentElement,i=r.clientWidth,o=r.clientHeight;Li("scrollbar-width","".concat(t-i,"px")),Li("scrollbar-height","".concat(n-o,"px"))}(),i(),t(!1)}),[]),null},wd=function(){var e=_t(X(!1),2),t=e[0],n=e[1],r=_t(X([]),2),i=r[0],o=r[1],a=_t(X([]),2),u=a[0],l=a[1],s=oe((function(){return!!i.length}),[i]),f=function(){n(!0)},d=function(){n(!1)},h=function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"";l((function(n){return[{filename:t,text:": ".concat(e.message)}].concat(bt(n))}))},p=function(e,t){try{var n=JSON.parse(e),r=n.trace||n;if(!r.duration_msec)return void h(new Error(Co.traceNotFound),t);var i=new Ss(r,t);o((function(e){return[i].concat(bt(e))}))}catch(c){c instanceof Error&&h(c,t)}},v=function(e){l([]),Array.from(e.target.files||[]).map((function(e){var t=new FileReader,n=(null===e||void 0===e?void 0:e.name)||"";t.onload=function(e){var t,r=String(null===(t=e.target)||void 0===t?void 0:t.result);p(r,n)},t.readAsText(e)})),e.target.value=""},m=function(e){return function(){!function(e){l((function(t){return t.filter((function(t,n){return n!==e}))}))}(e)}},y=function(){return fr("div",{className:"vm-trace-page-controls",children:[fr(ho,{variant:"outlined",onClick:f,children:"Paste JSON"}),fr(mo,{title:"The file must contain tracing information in JSON format",children:fr(ho,{children:["Upload Files",fr("input",{id:"json",type:"file",accept:"application/json",multiple:!0,title:" ",onChange:v})]})})]})};return fr("div",{className:"vm-trace-page",children:[fr("div",{className:"vm-trace-page-header",children:[fr("div",{className:"vm-trace-page-header-errors",children:u.map((function(e,t){return fr("div",{className:"vm-trace-page-header-errors-item",children:[fr(lo,{variant:"error",children:[fr("b",{className:"vm-trace-page-header-errors-item__filename",children:e.filename}),fr("span",{children:e.text})]}),fr(ho,{className:"vm-trace-page-header-errors-item__close",startIcon:fr(ai,{}),variant:"text",color:"error",onClick:m(t)})]},"".concat(e,"_").concat(t))}))}),fr("div",{children:s&&fr(y,{})})]}),s&&fr("div",{children:fr($s,{jsonEditor:!0,traces:i,onDeleteClick:function(e){var t=i.filter((function(t){return t.idValue!==e.idValue}));o(bt(t))}})}),!s&&fr("div",{className:"vm-trace-page-preview",children:[fr("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",fr("a",{href:"https://docs.victoriametrics.com/#query-tracing",target:"_blank",rel:"noreferrer",children:"https://docs.victoriametrics.com/#query-tracing"}),"\n","Tracing graph will be displayed after file upload."]}),fr(y,{})]}),t&&fr(Lo,{title:"Paste JSON",onClose:d,children:fr(Is,{editable:!0,displayTitle:!0,defaultTile:"JSON ".concat(i.length+1),onClose:d,onUpload:p})})]})},xd=function(){var e=_t(X(!0),2),t=e[0],n=e[1];return fr(m,t?{children:[fr(Bs,{}),fr(Dd,{setLoadingTheme:n}),";"]}:{children:fr(Un,{children:fr(fo,{children:fr(jn,{children:fr($n,{path:"/",element:fr(qo,{}),children:[fr($n,{path:Jn.home,element:fr(qs,{})}),fr($n,{path:Jn.dashboards,element:fr(If,{})}),fr($n,{path:Jn.cardinality,element:fr(vd,{})}),fr($n,{path:Jn.topQueries,element:fr(_d,{})}),fr($n,{path:Jn.trace,element:fr(wd,{})})]})})})})})},kd=function(e){e&&n.e(27).then(n.bind(n,27)).then((function(t){var n=t.getCLS,r=t.getFID,i=t.getFCP,o=t.getLCP,a=t.getTTFB;n(e),r(e),i(e),o(e),a(e)}))},Cd=document.getElementById("root");Cd&&Ve(fr(xd,{}),Cd),kd()}()}(); \ No newline at end of file diff --git a/app/vmselect/vmui/static/js/main.c86c7c69.js.LICENSE.txt b/app/vmselect/vmui/static/js/main.a09b3097.js.LICENSE.txt similarity index 100% rename from app/vmselect/vmui/static/js/main.c86c7c69.js.LICENSE.txt rename to app/vmselect/vmui/static/js/main.a09b3097.js.LICENSE.txt diff --git a/app/vmselect/vmui/static/js/main.c86c7c69.js b/app/vmselect/vmui/static/js/main.c86c7c69.js deleted file mode 100644 index 031556493..000000000 --- a/app/vmselect/vmui/static/js/main.c86c7c69.js +++ /dev/null @@ -1,2 +0,0 @@ -/*! For license information please see main.c86c7c69.js.LICENSE.txt */ -!function(){var e={680:function(e,t,n){"use strict";var r=n(476),i=n(962),o=i(r("String.prototype.indexOf"));e.exports=function(e,t){var n=r(e,!!t);return"function"===typeof n&&o(e,".prototype.")>-1?i(n):n}},962:function(e,t,n){"use strict";var r=n(199),i=n(476),o=i("%Function.prototype.apply%"),a=i("%Function.prototype.call%"),u=i("%Reflect.apply%",!0)||r.call(a,o),l=i("%Object.getOwnPropertyDescriptor%",!0),c=i("%Object.defineProperty%",!0),s=i("%Math.max%");if(c)try{c({},"a",{value:1})}catch(d){c=null}e.exports=function(e){var t=u(r,a,arguments);if(l&&c){var n=l(t,"length");n.configurable&&c(t,"length",{value:1+s(0,e.length-(arguments.length-1))})}return t};var f=function(){return u(r,o,arguments)};c?c(e.exports,"apply",{value:f}):e.exports.apply=f},123:function(e,t){var n;!function(){"use strict";var r={}.hasOwnProperty;function i(){for(var e=[],t=0;t=t?e:""+Array(t+1-r.length).join(n)+e},g={s:y,z:function(e){var t=-e.utcOffset(),n=Math.abs(t),r=Math.floor(n/60),i=n%60;return(t<=0?"+":"-")+y(r,2,"0")+":"+y(i,2,"0")},m:function e(t,n){if(t.date()1)return e(a[0])}else{var u=t.name;b[u]=t,i=u}return!r&&i&&(_=i),i||!r&&_},x=function(e,t){if(D(e))return e.clone();var n="object"==typeof t?t:{};return n.date=e,n.args=arguments,new C(n)},k=g;k.l=w,k.i=D,k.w=function(e,t){return x(e,{locale:t.$L,utc:t.$u,x:t.$x,$offset:t.$offset})};var C=function(){function m(e){this.$L=w(e.locale,null,!0),this.parse(e)}var y=m.prototype;return y.parse=function(e){this.$d=function(e){var t=e.date,n=e.utc;if(null===t)return new Date(NaN);if(k.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 i=r[2]-1||0,o=(r[7]||"0").substring(0,3);return n?new Date(Date.UTC(r[1],i,r[3]||1,r[4]||0,r[5]||0,r[6]||0,o)):new Date(r[1],i,r[3]||1,r[4]||0,r[5]||0,r[6]||0,o)}}return new Date(t)}(e),this.$x=e.x||{},this.init()},y.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()},y.$utils=function(){return k},y.isValid=function(){return!(this.$d.toString()===h)},y.isSame=function(e,t){var n=x(e);return this.startOf(t)<=n&&n<=this.endOf(t)},y.isAfter=function(e,t){return x(e)1&&"boolean"!==typeof t)throw new a('"allowMissing" argument must be a boolean');if(null===k(/^%?[^%]*%?$/,e))throw new i("`%` may not be present anywhere but at the beginning and end of the intrinsic name");var n=S(e),r=n.length>0?n[0]:"",o=A("%"+r+"%",t),u=o.name,c=o.value,s=!1,f=o.alias;f&&(r=f[0],D(n,b([0,1],f)));for(var d=1,h=!0;d=n.length){var g=l(c,p);c=(h=!!g)&&"get"in g&&!("originalValue"in g.get)?g.get:c[p]}else h=_(c,p),c=c[p];h&&!s&&(v[u]=c)}}return c}},520:function(e,t,n){"use strict";var r="undefined"!==typeof Symbol&&Symbol,i=n(541);e.exports=function(){return"function"===typeof r&&("function"===typeof Symbol&&("symbol"===typeof r("foo")&&("symbol"===typeof Symbol("bar")&&i())))}},541:function(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 i=Object.getOwnPropertyDescriptor(e,t);if(42!==i.value||!0!==i.enumerable)return!1}return!0}},838:function(e,t,n){"use strict";var r=n(199);e.exports=r.call(Function.call,Object.prototype.hasOwnProperty)},936:function(e,t,n){var r=/^\s+|\s+$/g,i=/^[-+]0x[0-9a-f]+$/i,o=/^0b[01]+$/i,a=/^0o[0-7]+$/i,u=parseInt,l="object"==typeof n.g&&n.g&&n.g.Object===Object&&n.g,c="object"==typeof self&&self&&self.Object===Object&&self,s=l||c||Function("return this")(),f=Object.prototype.toString,d=Math.max,h=Math.min,p=function(){return s.Date.now()};function v(e){var t=typeof e;return!!e&&("object"==t||"function"==t)}function m(e){if("number"==typeof e)return e;if(function(e){return"symbol"==typeof e||function(e){return!!e&&"object"==typeof e}(e)&&"[object Symbol]"==f.call(e)}(e))return NaN;if(v(e)){var t="function"==typeof e.valueOf?e.valueOf():e;e=v(t)?t+"":t}if("string"!=typeof e)return 0===e?e:+e;e=e.replace(r,"");var n=o.test(e);return n||a.test(e)?u(e.slice(2),n?2:8):i.test(e)?NaN:+e}e.exports=function(e,t,n){var r,i,o,a,u,l,c=0,s=!1,f=!1,y=!0;if("function"!=typeof e)throw new TypeError("Expected a function");function g(t){var n=r,o=i;return r=i=void 0,c=t,a=e.apply(o,n)}function _(e){return c=e,u=setTimeout(D,t),s?g(e):a}function b(e){var n=e-l;return void 0===l||n>=t||n<0||f&&e-c>=o}function D(){var e=p();if(b(e))return w(e);u=setTimeout(D,function(e){var n=t-(e-l);return f?h(n,o-(e-c)):n}(e))}function w(e){return u=void 0,y&&r?g(e):(r=i=void 0,a)}function x(){var e=p(),n=b(e);if(r=arguments,i=this,l=e,n){if(void 0===u)return _(l);if(f)return u=setTimeout(D,t),g(l)}return void 0===u&&(u=setTimeout(D,t)),a}return t=m(t)||0,v(n)&&(s=!!n.leading,o=(f="maxWait"in n)?d(m(n.maxWait)||0,t):o,y="trailing"in n?!!n.trailing:y),x.cancel=function(){void 0!==u&&clearTimeout(u),c=0,r=l=i=u=void 0},x.flush=function(){return void 0===u?a:w(p())},x}},7:function(e,t,n){var r="__lodash_hash_undefined__",i="[object Function]",o="[object GeneratorFunction]",a=/\.|\[(?:[^[\]]*|(["'])(?:(?!\1)[^\\]|\\.)*?\1)\]/,u=/^\w*$/,l=/^\./,c=/[^.[\]]+|\[(?:(-?\d+(?:\.\d+)?)|(["'])((?:(?!\2)[^\\]|\\.)*?)\2)\]|(?=(?:\.|\[\])(?:\.|\[\]|$))/g,s=/\\(\\)?/g,f=/^\[object .+?Constructor\]$/,d="object"==typeof n.g&&n.g&&n.g.Object===Object&&n.g,h="object"==typeof self&&self&&self.Object===Object&&self,p=d||h||Function("return this")();var v=Array.prototype,m=Function.prototype,y=Object.prototype,g=p["__core-js_shared__"],_=function(){var e=/[^.]+$/.exec(g&&g.keys&&g.keys.IE_PROTO||"");return e?"Symbol(src)_1."+e:""}(),b=m.toString,D=y.hasOwnProperty,w=y.toString,x=RegExp("^"+b.call(D).replace(/[\\^$.*+?()[\]{}|]/g,"\\$&").replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g,"$1.*?")+"$"),k=p.Symbol,C=v.splice,E=$(p,"Map"),S=$(Object,"create"),A=k?k.prototype:void 0,F=A?A.toString:void 0;function N(e){var t=-1,n=e?e.length:0;for(this.clear();++t-1},O.prototype.set=function(e,t){var n=this.__data__,r=B(n,e);return r<0?n.push([e,t]):n[r][1]=t,this},T.prototype.clear=function(){this.__data__={hash:new N,map:new(E||O),string:new N}},T.prototype.delete=function(e){return P(this,e).delete(e)},T.prototype.get=function(e){return P(this,e).get(e)},T.prototype.has=function(e){return P(this,e).has(e)},T.prototype.set=function(e,t){return P(this,e).set(e,t),this};var I=j((function(e){var t;e=null==(t=e)?"":function(e){if("string"==typeof e)return e;if(H(e))return F?F.call(e):"";var t=e+"";return"0"==t&&1/e==-1/0?"-0":t}(t);var n=[];return l.test(e)&&n.push(""),e.replace(c,(function(e,t,r,i){n.push(r?i.replace(s,"$1"):t||e)})),n}));function R(e){if("string"==typeof e||H(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 n(){var r=arguments,i=t?t.apply(this,r):r[0],o=n.cache;if(o.has(i))return o.get(i);var a=e.apply(this,r);return n.cache=o.set(i,a),a};return n.cache=new(j.Cache||T),n}j.Cache=T;var z=Array.isArray;function U(e){var t=typeof e;return!!e&&("object"==t||"function"==t)}function H(e){return"symbol"==typeof e||function(e){return!!e&&"object"==typeof e}(e)&&"[object Symbol]"==w.call(e)}e.exports=function(e,t,n){var r=null==e?void 0:M(e,t);return void 0===r?n:r}},61:function(e,t,n){var r="Expected a function",i=/^\s+|\s+$/g,o=/^[-+]0x[0-9a-f]+$/i,a=/^0b[01]+$/i,u=/^0o[0-7]+$/i,l=parseInt,c="object"==typeof n.g&&n.g&&n.g.Object===Object&&n.g,s="object"==typeof self&&self&&self.Object===Object&&self,f=c||s||Function("return this")(),d=Object.prototype.toString,h=Math.max,p=Math.min,v=function(){return f.Date.now()};function m(e,t,n){var i,o,a,u,l,c,s=0,f=!1,d=!1,m=!0;if("function"!=typeof e)throw new TypeError(r);function _(t){var n=i,r=o;return i=o=void 0,s=t,u=e.apply(r,n)}function b(e){return s=e,l=setTimeout(w,t),f?_(e):u}function D(e){var n=e-c;return void 0===c||n>=t||n<0||d&&e-s>=a}function w(){var e=v();if(D(e))return x(e);l=setTimeout(w,function(e){var n=t-(e-c);return d?p(n,a-(e-s)):n}(e))}function x(e){return l=void 0,m&&i?_(e):(i=o=void 0,u)}function k(){var e=v(),n=D(e);if(i=arguments,o=this,c=e,n){if(void 0===l)return b(c);if(d)return l=setTimeout(w,t),_(c)}return void 0===l&&(l=setTimeout(w,t)),u}return t=g(t)||0,y(n)&&(f=!!n.leading,a=(d="maxWait"in n)?h(g(n.maxWait)||0,t):a,m="trailing"in n?!!n.trailing:m),k.cancel=function(){void 0!==l&&clearTimeout(l),s=0,i=c=o=l=void 0},k.flush=function(){return void 0===l?u:x(v())},k}function y(e){var t=typeof e;return!!e&&("object"==t||"function"==t)}function g(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(y(e)){var t="function"==typeof e.valueOf?e.valueOf():e;e=y(t)?t+"":t}if("string"!=typeof e)return 0===e?e:+e;e=e.replace(i,"");var n=a.test(e);return n||u.test(e)?l(e.slice(2),n?2:8):o.test(e)?NaN:+e}e.exports=function(e,t,n){var i=!0,o=!0;if("function"!=typeof e)throw new TypeError(r);return y(n)&&(i="leading"in n?!!n.leading:i,o="trailing"in n?!!n.trailing:o),m(e,t,{leading:i,maxWait:t,trailing:o})}},154:function(e,t,n){var r="function"===typeof Map&&Map.prototype,i=Object.getOwnPropertyDescriptor&&r?Object.getOwnPropertyDescriptor(Map.prototype,"size"):null,o=r&&i&&"function"===typeof i.get?i.get:null,a=r&&Map.prototype.forEach,u="function"===typeof Set&&Set.prototype,l=Object.getOwnPropertyDescriptor&&u?Object.getOwnPropertyDescriptor(Set.prototype,"size"):null,c=u&&l&&"function"===typeof l.get?l.get:null,s=u&&Set.prototype.forEach,f="function"===typeof WeakMap&&WeakMap.prototype?WeakMap.prototype.has:null,d="function"===typeof WeakSet&&WeakSet.prototype?WeakSet.prototype.has:null,h="function"===typeof WeakRef&&WeakRef.prototype?WeakRef.prototype.deref:null,p=Boolean.prototype.valueOf,v=Object.prototype.toString,m=Function.prototype.toString,y=String.prototype.match,g=String.prototype.slice,_=String.prototype.replace,b=String.prototype.toUpperCase,D=String.prototype.toLowerCase,w=RegExp.prototype.test,x=Array.prototype.concat,k=Array.prototype.join,C=Array.prototype.slice,E=Math.floor,S="function"===typeof BigInt?BigInt.prototype.valueOf:null,A=Object.getOwnPropertySymbols,F="function"===typeof Symbol&&"symbol"===typeof Symbol.iterator?Symbol.prototype.toString:null,N="function"===typeof Symbol&&"object"===typeof Symbol.iterator,O="function"===typeof Symbol&&Symbol.toStringTag&&(typeof Symbol.toStringTag===N||"symbol")?Symbol.toStringTag:null,T=Object.prototype.propertyIsEnumerable,B=("function"===typeof Reflect?Reflect.getPrototypeOf:Object.getPrototypeOf)||([].__proto__===Array.prototype?function(e){return e.__proto__}:null);function M(e,t){if(e===1/0||e===-1/0||e!==e||e&&e>-1e3&&e<1e3||w.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 i=String(r),o=g.call(t,i.length+1);return _.call(i,n,"$&_")+"."+_.call(_.call(o,/([0-9]{3})/g,"$&_"),/_$/,"")}}return _.call(t,n,"$&_")}var L=n(654),P=L.custom,$=U(P)?P:null;function I(e,t,n){var r="double"===(n.quoteStyle||t)?'"':"'";return r+e+r}function R(e){return _.call(String(e),/"/g,""")}function j(e){return"[object Array]"===Y(e)&&(!O||!("object"===typeof e&&O in e))}function z(e){return"[object RegExp]"===Y(e)&&(!O||!("object"===typeof e&&O in e))}function U(e){if(N)return e&&"object"===typeof e&&e instanceof Symbol;if("symbol"===typeof e)return!0;if(!e||"object"!==typeof e||!F)return!1;try{return F.call(e),!0}catch(t){}return!1}e.exports=function e(t,n,r,i){var u=n||{};if(V(u,"quoteStyle")&&"single"!==u.quoteStyle&&"double"!==u.quoteStyle)throw new TypeError('option "quoteStyle" must be "single" or "double"');if(V(u,"maxStringLength")&&("number"===typeof u.maxStringLength?u.maxStringLength<0&&u.maxStringLength!==1/0:null!==u.maxStringLength))throw new TypeError('option "maxStringLength", if provided, must be a positive integer, Infinity, or `null`');var l=!V(u,"customInspect")||u.customInspect;if("boolean"!==typeof l&&"symbol"!==l)throw new TypeError("option \"customInspect\", if provided, must be `true`, `false`, or `'symbol'`");if(V(u,"indent")&&null!==u.indent&&"\t"!==u.indent&&!(parseInt(u.indent,10)===u.indent&&u.indent>0))throw new TypeError('option "indent" must be "\\t", an integer > 0, or `null`');if(V(u,"numericSeparator")&&"boolean"!==typeof u.numericSeparator)throw new TypeError('option "numericSeparator", if provided, must be `true` or `false`');var v=u.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,u);if("number"===typeof t){if(0===t)return 1/0/t>0?"0":"-0";var b=String(t);return v?M(t,b):b}if("bigint"===typeof t){var w=String(t)+"n";return v?M(t,w):w}var E="undefined"===typeof u.depth?5:u.depth;if("undefined"===typeof r&&(r=0),r>=E&&E>0&&"object"===typeof t)return j(t)?"[Array]":"[Object]";var A=function(e,t){var n;if("\t"===e.indent)n="\t";else{if(!("number"===typeof e.indent&&e.indent>0))return null;n=k.call(Array(e.indent+1)," ")}return{base:n,prev:k.call(Array(t+1),n)}}(u,r);if("undefined"===typeof i)i=[];else if(q(i,t)>=0)return"[Circular]";function P(t,n,o){if(n&&(i=C.call(i)).push(n),o){var a={depth:u.depth};return V(u,"quoteStyle")&&(a.quoteStyle=u.quoteStyle),e(t,a,r+1,i)}return e(t,u,r+1,i)}if("function"===typeof t&&!z(t)){var H=function(e){if(e.name)return e.name;var t=y.call(m.call(e),/^function\s*([\w$]+)/);if(t)return t[1];return null}(t),Q=X(t,P);return"[Function"+(H?": "+H:" (anonymous)")+"]"+(Q.length>0?" { "+k.call(Q,", ")+" }":"")}if(U(t)){var ee=N?_.call(String(t),/^(Symbol\(.*\))_[^)]*$/,"$1"):F.call(t);return"object"!==typeof t||N?ee:G(ee)}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 te="<"+D.call(String(t.nodeName)),ne=t.attributes||[],re=0;re"}if(j(t)){if(0===t.length)return"[]";var ie=X(t,P);return A&&!function(e){for(var t=0;t=0)return!1;return!0}(ie)?"["+K(ie,A)+"]":"[ "+k.call(ie,", ")+" ]"}if(function(e){return"[object Error]"===Y(e)&&(!O||!("object"===typeof e&&O in e))}(t)){var oe=X(t,P);return"cause"in Error.prototype||!("cause"in t)||T.call(t,"cause")?0===oe.length?"["+String(t)+"]":"{ ["+String(t)+"] "+k.call(oe,", ")+" }":"{ ["+String(t)+"] "+k.call(x.call("[cause]: "+P(t.cause),oe),", ")+" }"}if("object"===typeof t&&l){if($&&"function"===typeof t[$]&&L)return L(t,{depth:E-r});if("symbol"!==l&&"function"===typeof t.inspect)return t.inspect()}if(function(e){if(!o||!e||"object"!==typeof e)return!1;try{o.call(e);try{c.call(e)}catch(te){return!0}return e instanceof Map}catch(t){}return!1}(t)){var ae=[];return a.call(t,(function(e,n){ae.push(P(n,t,!0)+" => "+P(e,t))})),Z("Map",o.call(t),ae,A)}if(function(e){if(!c||!e||"object"!==typeof e)return!1;try{c.call(e);try{o.call(e)}catch(t){return!0}return e instanceof Set}catch(n){}return!1}(t)){var ue=[];return s.call(t,(function(e){ue.push(P(e,t))})),Z("Set",c.call(t),ue,A)}if(function(e){if(!f||!e||"object"!==typeof e)return!1;try{f.call(e,f);try{d.call(e,d)}catch(te){return!0}return e instanceof WeakMap}catch(t){}return!1}(t))return J("WeakMap");if(function(e){if(!d||!e||"object"!==typeof e)return!1;try{d.call(e,d);try{f.call(e,f)}catch(te){return!0}return e instanceof WeakSet}catch(t){}return!1}(t))return J("WeakSet");if(function(e){if(!h||!e||"object"!==typeof e)return!1;try{return h.call(e),!0}catch(t){}return!1}(t))return J("WeakRef");if(function(e){return"[object Number]"===Y(e)&&(!O||!("object"===typeof e&&O in e))}(t))return G(P(Number(t)));if(function(e){if(!e||"object"!==typeof e||!S)return!1;try{return S.call(e),!0}catch(t){}return!1}(t))return G(P(S.call(t)));if(function(e){return"[object Boolean]"===Y(e)&&(!O||!("object"===typeof e&&O in e))}(t))return G(p.call(t));if(function(e){return"[object String]"===Y(e)&&(!O||!("object"===typeof e&&O in e))}(t))return G(P(String(t)));if(!function(e){return"[object Date]"===Y(e)&&(!O||!("object"===typeof e&&O in e))}(t)&&!z(t)){var le=X(t,P),ce=B?B(t)===Object.prototype:t instanceof Object||t.constructor===Object,se=t instanceof Object?"":"null prototype",fe=!ce&&O&&Object(t)===t&&O in t?g.call(Y(t),8,-1):se?"Object":"",de=(ce||"function"!==typeof t.constructor?"":t.constructor.name?t.constructor.name+" ":"")+(fe||se?"["+k.call(x.call([],fe||[],se||[]),": ")+"] ":"");return 0===le.length?de+"{}":A?de+"{"+K(le,A)+"}":de+"{ "+k.call(le,", ")+" }"}return String(t)};var H=Object.prototype.hasOwnProperty||function(e){return e in this};function V(e,t){return H.call(e,t)}function Y(e){return v.call(e)}function q(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(g.call(e,0,t.maxStringLength),t)+r}return I(_.call(_.call(e,/(['\\])/g,"\\$1"),/[\x00-\x1f]/g,Q),"single",t)}function Q(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 G(e){return"Object("+e+")"}function J(e){return e+" { ? }"}function Z(e,t,n,r){return e+" ("+t+") {"+(r?K(n,r):k.call(n,", "))+"}"}function K(e,t){if(0===e.length)return"";var n="\n"+t.prev+t.base;return n+k.call(e,","+n)+"\n"+t.prev}function X(e,t){var n=j(e),r=[];if(n){r.length=e.length;for(var i=0;i-1?e.split(","):e},c=function(e,t,n,r){if(e){var o=n.allowDots?e.replace(/\.([^.[]+)/g,"[$1]"):e,a=/(\[[^[\]]*])/g,u=n.depth>0&&/(\[[^[\]]*])/.exec(o),c=u?o.slice(0,u.index):o,s=[];if(c){if(!n.plainObjects&&i.call(Object.prototype,c)&&!n.allowPrototypes)return;s.push(c)}for(var f=0;n.depth>0&&null!==(u=a.exec(o))&&f=0;--o){var a,u=e[o];if("[]"===u&&n.parseArrays)a=[].concat(i);else{a=n.plainObjects?Object.create(null):{};var c="["===u.charAt(0)&&"]"===u.charAt(u.length-1)?u.slice(1,-1):u,s=parseInt(c,10);n.parseArrays||""!==c?!isNaN(s)&&u!==c&&String(s)===c&&s>=0&&n.parseArrays&&s<=n.arrayLimit?(a=[])[s]=i:"__proto__"!==c&&(a[c]=i):a={0:i}}i=a}return i}(s,t,n,r)}};e.exports=function(e,t){var n=function(e){if(!e)return a;if(null!==e.decoder&&void 0!==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?a.charset:e.charset;return{allowDots:"undefined"===typeof e.allowDots?a.allowDots:!!e.allowDots,allowPrototypes:"boolean"===typeof e.allowPrototypes?e.allowPrototypes:a.allowPrototypes,allowSparse:"boolean"===typeof e.allowSparse?e.allowSparse:a.allowSparse,arrayLimit:"number"===typeof e.arrayLimit?e.arrayLimit:a.arrayLimit,charset:t,charsetSentinel:"boolean"===typeof e.charsetSentinel?e.charsetSentinel:a.charsetSentinel,comma:"boolean"===typeof e.comma?e.comma:a.comma,decoder:"function"===typeof e.decoder?e.decoder:a.decoder,delimiter:"string"===typeof e.delimiter||r.isRegExp(e.delimiter)?e.delimiter:a.delimiter,depth:"number"===typeof e.depth||!1===e.depth?+e.depth:a.depth,ignoreQueryPrefix:!0===e.ignoreQueryPrefix,interpretNumericEntities:"boolean"===typeof e.interpretNumericEntities?e.interpretNumericEntities:a.interpretNumericEntities,parameterLimit:"number"===typeof e.parameterLimit?e.parameterLimit:a.parameterLimit,parseArrays:!1!==e.parseArrays,plainObjects:"boolean"===typeof e.plainObjects?e.plainObjects:a.plainObjects,strictNullHandling:"boolean"===typeof e.strictNullHandling?e.strictNullHandling:a.strictNullHandling}}(t);if(""===e||null===e||"undefined"===typeof e)return n.plainObjects?Object.create(null):{};for(var s="string"===typeof e?function(e,t){var n,c={},s=t.ignoreQueryPrefix?e.replace(/^\?/,""):e,f=t.parameterLimit===1/0?void 0:t.parameterLimit,d=s.split(t.delimiter,f),h=-1,p=t.charset;if(t.charsetSentinel)for(n=0;n-1&&(m=o(m)?[m]:m),i.call(c,v)?c[v]=r.combine(c[v],m):c[v]=m}return c}(e,n):e,f=n.plainObjects?Object.create(null):{},d=Object.keys(s),h=0;h0?C.join(",")||null:void 0}];else if(l(h))M=h;else{var P=Object.keys(C);M=m?P.sort(m):P}for(var $=a&&l(C)&&1===C.length?n+"[]":n,I=0;I0?D+b:""}},837:function(e,t,n){"use strict";var r=n(609),i=Object.prototype.hasOwnProperty,o=Array.isArray,a=function(){for(var e=[],t=0;t<256;++t)e.push("%"+((t<16?"0":"")+t.toString(16)).toUpperCase());return e}(),u=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(o(n)){for(var r=[],i=0;i=48&&s<=57||s>=65&&s<=90||s>=97&&s<=122||o===r.RFC1738&&(40===s||41===s)?l+=u.charAt(c):s<128?l+=a[s]:s<2048?l+=a[192|s>>6]+a[128|63&s]:s<55296||s>=57344?l+=a[224|s>>12]+a[128|s>>6&63]+a[128|63&s]:(c+=1,s=65536+((1023&s)<<10|1023&u.charCodeAt(c)),l+=a[240|s>>18]+a[128|s>>12&63]+a[128|s>>6&63]+a[128|63&s])}return l},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(o(e)){for(var n=[],r=0;r2&&(u.children=arguments.length>3?t.call(arguments,2):r),"function"==typeof e&&null!=e.defaultProps)for(a in e.defaultProps)void 0===u[a]&&(u[a]=e.defaultProps[a]);return p(e,u,i,o,null)}function p(e,t,n,o,a){var u={type:e,props:t,key:n,ref:o,__k:null,__:null,__b:0,__e:null,__d:void 0,__c:null,__h:null,constructor:void 0,__v:null==a?++i:a};return null==a&&null!=r.vnode&&r.vnode(u),u}function v(){return{current:null}}function m(e){return e.children}function y(e,t){this.props=e,this.context=t}function g(e,t){if(null==t)return e.__?g(e.__,e.__.__k.indexOf(e)+1):null;for(var n;t0?p(y.type,y.props,y.key,y.ref?y.ref:null,y.__v):y)){if(y.__=n,y.__b=n.__b+1,null===(v=w[d])||v&&y.key==v.key&&y.type===v.type)w[d]=void 0;else for(h=0;h2&&(u.children=arguments.length>3?t.call(arguments,2):r),p(e.type,u,i||e.key,o||e.ref,null)}function R(e,t){var n={__c:t="__cC"+u++,__: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.shouldComponentUpdate=function(e){this.props.value!==e.value&&n.some(b)},this.sub=function(e){n.push(e);var t=e.componentWillUnmount;e.componentWillUnmount=function(){n.splice(n.indexOf(e),1),t&&t.call(e)}}),e.children}};return n.Provider.__=n.Consumer.contextType=n}t=c.slice,r={__e:function(e,t,n,r){for(var i,o,a;t=t.__;)if((i=t.__c)&&!i.__)try{if((o=i.constructor)&&null!=o.getDerivedStateFromError&&(i.setState(o.getDerivedStateFromError(e)),a=i.__d),null!=i.componentDidCatch&&(i.componentDidCatch(e,r||{}),a=i.__d),a)return i.__E=i}catch(t){e=t}throw e}},i=0,y.prototype.setState=function(e,t){var n;n=null!=this.__s&&this.__s!==this.state?this.__s:this.__s=f({},this.state),"function"==typeof e&&(e=e(f({},n),this.props)),e&&f(n,e),null!=e&&this.__v&&(t&&this._sb.push(t),b(this))},y.prototype.forceUpdate=function(e){this.__v&&(this.__e=!0,e&&this.__h.push(e),b(this))},y.prototype.render=m,o=[],D.__r=0,u=0;var j,z,U,H,V=0,Y=[],q=[],W=r.__b,Q=r.__r,G=r.diffed,J=r.__c,Z=r.unmount;function K(e,t){r.__h&&r.__h(z,e,V||t),V=0;var n=z.__H||(z.__H={__:[],__h:[]});return e>=n.__.length&&n.__.push({__V:q}),n.__[e]}function X(e){return V=1,ee(ye,e)}function ee(e,t,n){var r=K(j++,2);if(r.t=e,!r.__c&&(r.__=[n?n(t):ye(void 0,t),function(e){var t=r.__N?r.__N[0]:r.__[0],n=r.t(t,e);t!==n&&(r.__N=[n,r.__[1]],r.__c.setState({}))}],r.__c=z,!z.u)){z.u=!0;var i=z.shouldComponentUpdate;z.shouldComponentUpdate=function(e,t,n){if(!r.__c.__H)return!0;var o=r.__c.__H.__.filter((function(e){return e.__c}));if(o.every((function(e){return!e.__N})))return!i||i.call(this,e,t,n);var a=!1;return o.forEach((function(e){if(e.__N){var t=e.__[0];e.__=e.__N,e.__N=void 0,t!==e.__[0]&&(a=!0)}})),!(!a&&r.__c.props===e)&&(!i||i.call(this,e,t,n))}}return r.__N||r.__}function te(e,t){var n=K(j++,3);!r.__s&&me(n.__H,t)&&(n.__=e,n.i=t,z.__H.__h.push(n))}function ne(e,t){var n=K(j++,4);!r.__s&&me(n.__H,t)&&(n.__=e,n.i=t,z.__h.push(n))}function re(e){return V=5,oe((function(){return{current:e}}),[])}function ie(e,t,n){V=6,ne((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 oe(e,t){var n=K(j++,7);return me(n.__H,t)?(n.__V=e(),n.i=t,n.__h=e,n.__V):n.__}function ae(e,t){return V=8,oe((function(){return e}),t)}function ue(e){var t=z.context[e.__c],n=K(j++,9);return n.c=e,t?(null==n.__&&(n.__=!0,t.sub(z)),t.props.value):e.__}function le(e,t){r.useDebugValue&&r.useDebugValue(t?t(e):e)}function ce(e){var t=K(j++,10),n=X();return t.__=e,z.componentDidCatch||(z.componentDidCatch=function(e,r){t.__&&t.__(e,r),n[1](e)}),[n[0],function(){n[1](void 0)}]}function se(){var e=K(j++,11);if(!e.__){for(var t=z.__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 fe(){for(var e;e=Y.shift();)if(e.__P&&e.__H)try{e.__H.__h.forEach(pe),e.__H.__h.forEach(ve),e.__H.__h=[]}catch(u){e.__H.__h=[],r.__e(u,e.__v)}}r.__b=function(e){z=null,W&&W(e)},r.__r=function(e){Q&&Q(e),j=0;var t=(z=e.__c).__H;t&&(U===z?(t.__h=[],z.__h=[],t.__.forEach((function(e){e.__N&&(e.__=e.__N),e.__V=q,e.__N=e.i=void 0}))):(t.__h.forEach(pe),t.__h.forEach(ve),t.__h=[])),U=z},r.diffed=function(e){G&&G(e);var t=e.__c;t&&t.__H&&(t.__H.__h.length&&(1!==Y.push(t)&&H===r.requestAnimationFrame||((H=r.requestAnimationFrame)||he)(fe)),t.__H.__.forEach((function(e){e.i&&(e.__H=e.i),e.__V!==q&&(e.__=e.__V),e.i=void 0,e.__V=q}))),U=z=null},r.__c=function(e,t){t.some((function(e){try{e.__h.forEach(pe),e.__h=e.__h.filter((function(e){return!e.__||ve(e)}))}catch(i){t.some((function(e){e.__h&&(e.__h=[])})),t=[],r.__e(i,e.__v)}})),J&&J(e,t)},r.unmount=function(e){Z&&Z(e);var t,n=e.__c;n&&n.__H&&(n.__H.__.forEach((function(e){try{pe(e)}catch(e){t=e}})),n.__H=void 0,t&&r.__e(t,n.__v))};var de="function"==typeof requestAnimationFrame;function he(e){var t,n=function(){clearTimeout(r),de&&cancelAnimationFrame(t),setTimeout(e)},r=setTimeout(n,100);de&&(t=requestAnimationFrame(n))}function pe(e){var t=z,n=e.__c;"function"==typeof n&&(e.__c=void 0,n()),z=t}function ve(e){var t=z;e.__c=e.__(),z=t}function me(e,t){return!e||e.length!==t.length||t.some((function(t,n){return t!==e[n]}))}function ye(e,t){return"function"==typeof t?t(e):t}function ge(e,t){for(var n in t)e[n]=t[n];return e}function _e(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 be(e,t){return e===t&&(0!==e||1/e==1/t)||e!=e&&t!=t}function De(e){this.props=e}function we(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:_e(this.props,e)}function r(t){return this.shouldComponentUpdate=n,h(e,t)}return r.displayName="Memo("+(e.displayName||e.name)+")",r.prototype.isReactComponent=!0,r.__f=!0,r}(De.prototype=new y).isPureReactComponent=!0,De.prototype.shouldComponentUpdate=function(e,t){return _e(this.props,e)||_e(this.state,t)};var xe=r.__b;r.__b=function(e){e.type&&e.type.__f&&e.ref&&(e.props.ref=e.ref,e.ref=null),xe&&xe(e)};var ke="undefined"!=typeof Symbol&&Symbol.for&&Symbol.for("react.forward_ref")||3911;function Ce(e){function t(t){var n=ge({},t);return delete n.ref,e(n,t.ref||null)}return t.$$typeof=ke,t.render=t,t.prototype.isReactComponent=t.__f=!0,t.displayName="ForwardRef("+(e.displayName||e.name)+")",t}var Ee=function(e,t){return null==e?null:k(k(e).map(t))},Se={map:Ee,forEach:Ee,count:function(e){return e?k(e).length:0},only:function(e){var t=k(e);if(1!==t.length)throw"Children.only";return t[0]},toArray:k},Ae=r.__e;r.__e=function(e,t,n,r){if(e.then)for(var i,o=t;o=o.__;)if((i=o.__c)&&i.__c)return null==t.__e&&(t.__e=n.__e,t.__k=n.__k),i.__c(e,t);Ae(e,t,n,r)};var Fe=r.unmount;function Ne(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=ge({},e)).__c&&(e.__c.__P===n&&(e.__c.__P=t),e.__c=null),e.__k=e.__k&&e.__k.map((function(e){return Ne(e,t,n)}))),e}function Oe(e,t,n){return e&&(e.__v=null,e.__k=e.__k&&e.__k.map((function(e){return Oe(e,t,n)})),e.__c&&e.__c.__P===t&&(e.__e&&n.insertBefore(e.__e,e.__d),e.__c.__e=!0,e.__c.__P=n)),e}function Te(){this.__u=0,this.t=null,this.__b=null}function Be(e){var t=e.__.__c;return t&&t.__a&&t.__a(e)}function Me(e){var t,n,r;function i(i){if(t||(t=e()).then((function(e){n=e.default||e}),(function(e){r=e})),r)throw r;if(!n)throw t;return h(n,i)}return i.displayName="Lazy",i.__f=!0,i}function Le(){this.u=null,this.o=null}r.unmount=function(e){var t=e.__c;t&&t.__R&&t.__R(),t&&!0===e.__h&&(e.type=null),Fe&&Fe(e)},(Te.prototype=new y).__c=function(e,t){var n=t.__c,r=this;null==r.t&&(r.t=[]),r.t.push(n);var i=Be(r.__v),o=!1,a=function(){o||(o=!0,n.__R=null,i?i(u):u())};n.__R=a;var u=function(){if(!--r.__u){if(r.state.__a){var e=r.state.__a;r.__v.__k[0]=Oe(e,e.__c.__P,e.__c.__O)}var t;for(r.setState({__a:r.__b=null});t=r.t.pop();)t.forceUpdate()}},l=!0===t.__h;r.__u++||l||r.setState({__a:r.__b=r.__v.__k[0]}),e.then(a,a)},Te.prototype.componentWillUnmount=function(){this.t=[]},Te.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]=Ne(this.__b,n,r.__O=r.__P)}this.__b=null}var i=t.__a&&h(m,null,e.fallback);return i&&(i.__h=null),[h(m,null,t.__a?null:e.children),i]};var Pe=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)}}),P(h($e,{context:t.context},e.__v),t.l)):t.l&&t.componentWillUnmount()}function Re(e,t){var n=h(Ie,{__v:e,i:t});return n.containerInfo=t,n}(Le.prototype=new y).__a=function(e){var t=this,n=Be(t.__v),r=t.o.get(e);return r[0]++,function(i){var o=function(){t.props.revealOrder?(r.push(i),Pe(t,e,r)):i()};n?n(o):o()}},Le.prototype.render=function(e){this.u=null,this.o=new Map;var t=k(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},Le.prototype.componentDidUpdate=Le.prototype.componentDidMount=function(){var e=this;this.o.forEach((function(t,n){Pe(e,n,t)}))};var je="undefined"!=typeof Symbol&&Symbol.for&&Symbol.for("react.element")||60103,ze=/^(?:accent|alignment|arabic|baseline|cap|clip(?!PathU)|color|dominant|fill|flood|font|glyph(?!R)|horiz|image|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]/,Ue="undefined"!=typeof document,He=function(e){return("undefined"!=typeof Symbol&&"symbol"==typeof Symbol()?/fil|che|rad/i:/fil|che|ra/i).test(e)};function Ve(e,t,n){return null==t.__k&&(t.textContent=""),P(e,t),"function"==typeof n&&n(),e?e.__c:null}function Ye(e,t,n){return $(e,t),"function"==typeof n&&n(),e?e.__c:null}y.prototype.isReactComponent={},["componentWillMount","componentWillReceiveProps","componentWillUpdate"].forEach((function(e){Object.defineProperty(y.prototype,e,{configurable:!0,get:function(){return this["UNSAFE_"+e]},set:function(t){Object.defineProperty(this,e,{configurable:!0,writable:!0,value:t})}})}));var qe=r.event;function We(){}function Qe(){return this.cancelBubble}function Ge(){return this.defaultPrevented}r.event=function(e){return qe&&(e=qe(e)),e.persist=We,e.isPropagationStopped=Qe,e.isDefaultPrevented=Ge,e.nativeEvent=e};var Je,Ze={configurable:!0,get:function(){return this.class}},Ke=r.vnode;r.vnode=function(e){var t=e.type,n=e.props,r=n;if("string"==typeof t){var i=-1===t.indexOf("-");for(var o in r={},n){var a=n[o];Ue&&"children"===o&&"noscript"===t||"value"===o&&"defaultValue"in n&&null==a||("defaultValue"===o&&"value"in n&&null==n.value?o="value":"download"===o&&!0===a?a="":/ondoubleclick/i.test(o)?o="ondblclick":/^onchange(textarea|input)/i.test(o+t)&&!He(n.type)?o="oninput":/^onfocus$/i.test(o)?o="onfocusin":/^onblur$/i.test(o)?o="onfocusout":/^on(Ani|Tra|Tou|BeforeInp|Compo)/.test(o)?o=o.toLowerCase():i&&ze.test(o)?o=o.replace(/[A-Z0-9]/g,"-$&").toLowerCase():null===a&&(a=void 0),/^oninput$/i.test(o)&&(o=o.toLowerCase(),r[o]&&(o="oninputCapture")),r[o]=a)}"select"==t&&r.multiple&&Array.isArray(r.value)&&(r.value=k(n.children).forEach((function(e){e.props.selected=-1!=r.value.indexOf(e.props.value)}))),"select"==t&&null!=r.defaultValue&&(r.value=k(n.children).forEach((function(e){e.props.selected=r.multiple?-1!=r.defaultValue.indexOf(e.props.value):r.defaultValue==e.props.value}))),e.props=r,n.class!=n.className&&(Ze.enumerable="className"in n,null!=n.className&&(r.class=n.className),Object.defineProperty(r,"className",Ze))}e.$$typeof=je,Ke&&Ke(e)};var Xe=r.__r;r.__r=function(e){Xe&&Xe(e),Je=e.__c};var et={ReactCurrentDispatcher:{current:{readContext:function(e){return Je.__n[e.__c].props.value}}}},tt="17.0.2";function nt(e){return h.bind(null,e)}function rt(e){return!!e&&e.$$typeof===je}function it(e){return rt(e)?I.apply(null,arguments):e}function ot(e){return!!e.__k&&(P(null,e),!0)}function at(e){return e&&(e.base||1===e.nodeType&&e)||null}var ut=function(e,t){return e(t)},lt=function(e,t){return e(t)},ct=m;function st(e){e()}function ft(e){return e}function dt(){return[!1,st]}var ht=ne;function pt(e,t){var n=t(),r=X({h:{__:n,v:t}}),i=r[0].h,o=r[1];return ne((function(){i.__=n,i.v=t,be(i.__,t())||o({h:i})}),[e,n,t]),te((function(){return be(i.__,i.v())||o({h:i}),e((function(){be(i.__,i.v())||o({h:i})}))}),[e]),n}var vt,mt={useState:X,useId:se,useReducer:ee,useEffect:te,useLayoutEffect:ne,useInsertionEffect:ht,useTransition:dt,useDeferredValue:ft,useSyncExternalStore:pt,startTransition:st,useRef:re,useImperativeHandle:ie,useMemo:oe,useCallback:ae,useContext:ue,useDebugValue:le,version:"17.0.2",Children:Se,render:Ve,hydrate:Ye,unmountComponentAtNode:ot,createPortal:Re,createElement:h,createContext:R,createFactory:nt,cloneElement:it,createRef:v,Fragment:m,isValidElement:rt,findDOMNode:at,Component:y,PureComponent:De,memo:we,forwardRef:Ce,flushSync:lt,unstable_batchedUpdates:ut,StrictMode:ct,Suspense:Te,SuspenseList:Le,lazy:Me,__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED:et};function yt(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n=0&&(t.hash=e.substr(n),e=e.substr(0,n));var r=e.indexOf("?");r>=0&&(t.search=e.substr(r),e=e.substr(0,r)),e&&(t.pathname=e)}return t}function zt(e){var t="undefined"!==typeof window&&"undefined"!==typeof window.location&&"null"!==window.location.origin?window.location.origin:"unknown://unknown",n="string"===typeof e?e:Rt(e);return new URL(n,t)}function Ut(e,t,n,r){void 0===r&&(r={});var i=r,o=i.window,a=void 0===o?document.defaultView:o,u=i.v5Compat,l=void 0!==u&&u,c=a.history,s=vt.Pop,f=null;function d(){s=vt.Pop,f&&f({action:s,location:h.location})}var h={get action(){return s},get location(){return e(a,c)},listen:function(e){if(f)throw new Error("A history only accepts one active listener");return a.addEventListener(Lt,d),f=e,function(){a.removeEventListener(Lt,d),f=null}},createHref:function(e){return t(a,e)},encodeLocation:function(e){var t=zt(Rt(e));return Bt({},e,{pathname:t.pathname,search:t.search,hash:t.hash})},push:function(e,t){s=vt.Push;var r=It(h.location,e,t);n&&n(r,e);var i=$t(r),o=h.createHref(r);try{c.pushState(i,"",o)}catch(u){a.location.assign(o)}l&&f&&f({action:s,location:h.location})},replace:function(e,t){s=vt.Replace;var r=It(h.location,e,t);n&&n(r,e);var i=$t(r),o=h.createHref(r);c.replaceState(i,"",o),l&&f&&f({action:s,location:h.location})},go:function(e){return c.go(e)}};return h}function Ht(e,t,n){void 0===n&&(n="/");var r=Zt(("string"===typeof t?jt(t):t).pathname||"/",n);if(null==r)return null;var i=Vt(e);!function(e){e.sort((function(e,t){return e.score!==t.score?t.score-e.score:function(e,t){var n=e.length===t.length&&e.slice(0,-1).every((function(e,n){return e===t[n]}));return n?e[e.length-1]-t[t.length-1]:0}(e.routesMeta.map((function(e){return e.childrenIndex})),t.routesMeta.map((function(e){return e.childrenIndex})))}))}(i);for(var o=null,a=0;null==o&&a0&&(Kt(!0!==e.index,'Index routes must not have child routes. Please remove all child routes from route path "'+a+'".'),Vt(e.children,t,u,a)),(null!=e.path||e.index)&&t.push({path:a,score:Wt(a,e.index),routesMeta:u})})),t}!function(e){e.data="data",e.deferred="deferred",e.redirect="redirect",e.error="error"}(Mt||(Mt={}));var Yt=/^:\w+$/,qt=function(e){return"*"===e};function Wt(e,t){var n=e.split("/"),r=n.length;return n.some(qt)&&(r+=-2),t&&(r+=2),n.filter((function(e){return!qt(e)})).reduce((function(e,t){return e+(Yt.test(t)?3:""===t?1:10)}),r)}function Qt(e,t){for(var n=e.routesMeta,r={},i="/",o=[],a=0;a and the router will parse it for you.'}function tn(e){return e.filter((function(e,t){return 0===t||e.route.path&&e.route.path.length>0}))}function nn(e,t,n,r){var i;void 0===r&&(r=!1),"string"===typeof e?i=jt(e):(Kt(!(i=Bt({},e)).pathname||!i.pathname.includes("?"),en("?","pathname","search",i)),Kt(!i.pathname||!i.pathname.includes("#"),en("#","pathname","hash",i)),Kt(!i.search||!i.search.includes("#"),en("#","search","hash",i)));var o,a=""===e||""===i.pathname,u=a?"/":i.pathname;if(r||null==u)o=n;else{var l=t.length-1;if(u.startsWith("..")){for(var c=u.split("/");".."===c[0];)c.shift(),l-=1;i.pathname=c.join("/")}o=l>=0?t[l]:"/"}var s=function(e,t){void 0===t&&(t="/");var n="string"===typeof e?jt(e):e,r=n.pathname,i=n.search,o=void 0===i?"":i,a=n.hash,u=void 0===a?"":a,l=r?r.startsWith("/")?r:function(e,t){var n=t.replace(/\/+$/,"").split("/");return e.split("/").forEach((function(e){".."===e?n.length>1&&n.pop():"."!==e&&n.push(e)})),n.length>1?n.join("/"):"/"}(r,t):t;return{pathname:l,search:an(o),hash:un(u)}}(i,o),f=u&&"/"!==u&&u.endsWith("/"),d=(a||"."===u)&&n.endsWith("/");return s.pathname.endsWith("/")||!f&&!d||(s.pathname+="/"),s}var rn=function(e){return e.join("/").replace(/\/\/+/g,"/")},on=function(e){return e.replace(/\/+$/,"").replace(/^\/*/,"/")},an=function(e){return e&&"?"!==e?e.startsWith("?")?e:"?"+e:""},un=function(e){return e&&"#"!==e?e.startsWith("#")?e:"#"+e:""};Error;var ln=xt((function e(t,n,r){Dt(this,e),this.status=t,this.statusText=n||"",this.data=r}));function cn(e){return e instanceof ln}"undefined"!==typeof window&&"undefined"!==typeof window.document&&window.document.createElement;var sn=new Set(["POST","PUT","PATCH","DELETE"]);new Set(["GET","HEAD"].concat(bt(sn)));function fn(){return fn=Object.assign?Object.assign.bind():function(e){for(var t=1;t")))}var Nn,On,Tn=function(e){Ct(n,e);var t=Nt(n);function n(e){var r;return Dt(this,n),(r=t.call(this,e)).state={location:e.location,error:e.error},r}return xt(n,[{key:"componentDidCatch",value:function(e,t){console.error("React Router caught the following error during render",e,t)}},{key:"render",value:function(){return this.state.error?h(kn.Provider,{value:this.state.error,children:this.props.component}):this.props.children}}],[{key:"getDerivedStateFromError",value:function(e){return{error:e}}},{key:"getDerivedStateFromProps",value:function(e,t){return t.location!==e.location?{error:e.error,location:e.location}:{error:e.error||t.error,location:t.location}}}]),n}(y);function Bn(e){var t=e.routeContext,n=e.match,r=e.children,i=ue(gn);return i&&n.route.errorElement&&(i._deepestRenderedBoundaryId=n.route.id),h(xn.Provider,{value:t},r)}function Mn(e,t,n){if(void 0===t&&(t=[]),null==e){if(null==n||!n.errors)return null;e=n.matches}var r=e,i=null==n?void 0:n.errors;if(null!=i){var o=r.findIndex((function(e){return e.route.id&&(null==i?void 0:i[e.route.id])}));o>=0||Kt(!1),r=r.slice(0,Math.min(r.length,o+1))}return r.reduceRight((function(e,o,a){var u=o.route.id?null==i?void 0:i[o.route.id]:null,l=n?o.route.errorElement||h(Fn,null):null,c=function(){return h(Bn,{match:o,routeContext:{outlet:e,matches:t.concat(r.slice(0,a+1))}},u?l:void 0!==o.route.element?o.route.element:e)};return n&&(o.route.errorElement||0===a)?h(Tn,{location:n.location,component:l,error:u,children:c()}):c()}),null)}function Ln(e){var t=ue(bn);return t||Kt(!1),t}!function(e){e.UseRevalidator="useRevalidator"}(Nn||(Nn={})),function(e){e.UseLoaderData="useLoaderData",e.UseActionData="useActionData",e.UseRouteError="useRouteError",e.UseNavigation="useNavigation",e.UseRouteLoaderData="useRouteLoaderData",e.UseMatches="useMatches",e.UseRevalidator="useRevalidator"}(On||(On={}));var Pn;function $n(e){return function(e){var t=ue(xn).outlet;return t?h(An.Provider,{value:e},t):t}(e.context)}function In(e){Kt(!1)}function Rn(e){var t=e.basename,n=void 0===t?"/":t,r=e.children,i=void 0===r?null:r,o=e.location,a=e.navigationType,u=void 0===a?vt.Pop:a,l=e.navigator,c=e.static,s=void 0!==c&&c;Cn()&&Kt(!1);var f=n.replace(/^\/*/,"/"),d=oe((function(){return{basename:f,navigator:l,static:s}}),[f,l,s]);"string"===typeof o&&(o=jt(o));var p=o,v=p.pathname,m=void 0===v?"/":v,y=p.search,g=void 0===y?"":y,_=p.hash,b=void 0===_?"":_,D=p.state,w=void 0===D?null:D,x=p.key,k=void 0===x?"default":x,C=oe((function(){var e=Zt(m,f);return null==e?null:{pathname:e,search:g,hash:b,state:w,key:k}}),[f,m,g,b,w,k]);return null==C?null:h(Dn.Provider,{value:d},h(wn.Provider,{children:i,value:{location:C,navigationType:u}}))}function jn(e){var t=e.children,n=e.location,r=ue(_n);return function(e,t){Cn()||Kt(!1);var n,r=ue(bn),i=ue(xn).matches,o=i[i.length-1],a=o?o.params:{},u=(o&&o.pathname,o?o.pathnameBase:"/"),l=(o&&o.route,En());if(t){var c,s="string"===typeof t?jt(t):t;"/"===u||(null==(c=s.pathname)?void 0:c.startsWith(u))||Kt(!1),n=s}else n=l;var f=n.pathname||"/",d=Ht(e,{pathname:"/"===u?f:f.slice(u.length)||"/"}),p=Mn(d&&d.map((function(e){return Object.assign({},e,{params:Object.assign({},a,e.params),pathname:rn([u,e.pathname]),pathnameBase:"/"===e.pathnameBase?u:rn([u,e.pathnameBase])})})),i,r||void 0);return t&&p?h(wn.Provider,{value:{location:fn({pathname:"/",search:"",hash:"",state:null,key:"default"},n),navigationType:vt.Pop}},p):p}(r&&!t?r.router.routes:zn(t),n)}!function(e){e[e.pending=0]="pending",e[e.success=1]="success",e[e.error=2]="error"}(Pn||(Pn={}));new Promise((function(){}));function zn(e,t){void 0===t&&(t=[]);var n=[];return Se.forEach(e,(function(e,r){if(rt(e))if(e.type!==m){e.type!==In&&Kt(!1),e.props.index&&e.props.children&&Kt(!1);var i=[].concat(bt(t),[r]),o={id:e.props.id||i.join("-"),caseSensitive:e.props.caseSensitive,element:e.props.element,index:e.props.index,path:e.props.path,loader:e.props.loader,action:e.props.action,errorElement:e.props.errorElement,hasErrorBoundary:null!=e.props.errorElement,shouldRevalidate:e.props.shouldRevalidate,handle:e.props.handle};e.props.children&&(o.children=zn(e.props.children,i)),n.push(o)}else n.push.apply(n,zn(e.props.children,t))})),n}function Un(e){var t=e.basename,n=e.children,r=e.window,i=re();null==i.current&&(i.current=function(e){return void 0===e&&(e={}),Ut((function(e,t){var n=jt(e.location.hash.substr(1)),r=n.pathname,i=void 0===r?"/":r,o=n.search,a=void 0===o?"":o,u=n.hash;return It("",{pathname:i,search:a,hash:void 0===u?"":u},t.state&&t.state.usr||null,t.state&&t.state.key||"default")}),(function(e,t){var n=e.document.querySelector("base"),r="";if(n&&n.getAttribute("href")){var i=e.location.href,o=i.indexOf("#");r=-1===o?i:i.slice(0,o)}return r+"#"+("string"===typeof t?t:Rt(t))}),(function(e,t){Pt("/"===e.pathname.charAt(0),"relative pathnames are not supported in hash history.push("+JSON.stringify(t)+")")}),e)}({window:r,v5Compat:!0}));var o=i.current,a=_t(X({action:o.action,location:o.location}),2),u=a[0],l=a[1];return ne((function(){return o.listen(l)}),[o]),h(Rn,{basename:t,children:n,location:u.location,navigationType:u.action,navigator:o})}var Hn,Vn;(function(e){e.UseScrollRestoration="useScrollRestoration",e.UseSubmitImpl="useSubmitImpl",e.UseFetcher="useFetcher"})(Hn||(Hn={})),function(e){e.UseFetchers="useFetchers",e.UseScrollRestoration="useScrollRestoration"}(Vn||(Vn={}));var Yn;function qn(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}var Wn={home:"/",dashboards:"/dashboards",cardinality:"/cardinality",topQueries:"/top-queries",trace:"/trace"},Qn={header:{timeSelector:!0,executionControls:!0,globalSettings:!0}},Gn=(qn(Yn={},Wn.home,Qn),qn(Yn,Wn.dashboards,Qn),qn(Yn,Wn.cardinality,{header:{cardinalityDatePicker:!0,globalSettings:!0}}),Yn),Jn=Wn;function Zn(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}function Kn(e){for(var t=1;t2&&void 0!==arguments[2]?arguments[2]:window.location.search,r=nr().parse(n,{ignoreQueryPrefix:!0});return ir()(r,e,t||"")},lr={serverUrl:Xn().serverURL||window.location.href.replace(/\/(?:prometheus\/)?(?:graph|vmui)\/.*/,"/prometheus"),tenantId:Number(ur("g0.tenantID",0))};function cr(e,t){switch(t.type){case"SET_SERVER":return Kn(Kn({},e),{},{serverUrl:t.payload});case"SET_TENANT_ID":return Kn(Kn({},e),{},{tenantId:t.payload});default:throw new Error}}var sr=0;function fr(e,t,n,i,o){var a,u,l={};for(u in t)"ref"==u?a=t[u]:l[u]=t[u];var c={type:e,props:l,key:n,ref:a,__k:null,__:null,__b:0,__e:null,__d:void 0,__c:null,__h:null,constructor:void 0,__v:--sr,__source:o,__self:i};if("function"==typeof e&&(a=e.defaultProps))for(u in a)void 0===l[u]&&(l[u]=a[u]);return r.vnode&&r.vnode(c),c}var dr=R({}),hr=function(){return ue(dr).state},pr=function(){return ue(dr).dispatch},vr=Object.entries(lr).reduce((function(e,t){var n=_t(t,2),r=n[0],i=n[1];return Kn(Kn({},e),{},qn({},r,ur(r)||i))}),{}),mr=n(658),yr=n.n(mr),gr=n(446),_r=n.n(gr),br=n(635),Dr=n.n(br),wr="YYYY-MM-DD",xr="YYYY-MM-DD HH:mm:ss",kr="YYYY-MM-DD[T]HH:mm:ss";yr().extend(_r()),yr().extend(Dr());var Cr,Er=window.innerWidth/4,Sr=1,Ar=1578e8,Fr=[{long:"days",short:"d",possible:"day"},{long:"weeks",short:"w",possible:"week"},{long:"months",short:"M",possible:"mon"},{long:"years",short:"y",possible:"year"},{long:"hours",short:"h",possible:"hour"},{long:"minutes",short:"m",possible:"min"},{long:"seconds",short:"s",possible:"sec"},{long:"milliseconds",short:"ms",possible:"millisecond"}].map((function(e){return e.short})),Nr=function(e){return Math.round(1e3*e)/1e3},Or=function(e){var t=e.match(/\d+/g),n=e.match(/[a-zA-Z]+/g);if(n&&t&&Fr.includes(n[0]))return qn({},n[0],t[0])},Tr=function(e,t){var n=(t||new Date).valueOf()/1e3,r=e.trim().split(" ").reduce((function(e,t){var n=Or(t);return n?Kn(Kn({},e),n):Kn({},e)}),{}),i=yr().duration(r).asSeconds();return{start:n-i,end:n,step:Nr(i/Er)||.001,date:Br(t||new Date)}},Br=function(e){return yr()(e).utc().format(kr)},Mr=function(e){return yr()(e).format(kr)},Lr=function(e){var t=Math.floor(e%1e3),n=Math.floor(e/1e3%60),r=Math.floor(e/1e3/60%60),i=Math.floor(e/1e3/3600%24),o=Math.floor(e/864e5),a=["d","h","m","s","ms"],u=[o,i,r,n,t].map((function(e,t){return e?"".concat(e).concat(a[t]):""}));return u.filter((function(e){return e})).join(" ")},Pr=function(e){return new Date(1e3*e)},$r=[{title:"Last 5 minutes",duration:"5m"},{title:"Last 15 minutes",duration:"15m"},{title:"Last 30 minutes",duration:"30m",isDefault:!0},{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:function(){return yr()().subtract(1,"day").endOf("day").toDate()}},{title:"Today",duration:"1d",until:function(){return yr()().endOf("day").toDate()}}].map((function(e){return Kn({id:e.title.replace(/\s/g,"_").toLocaleLowerCase(),until:e.until?e.until:function(){return yr()().toDate()}},e)})),Ir=function(e){var t,n=e.relativeTimeId,r=e.defaultDuration,i=e.defaultEndInput,o=null===(t=$r.find((function(e){return e.isDefault})))||void 0===t?void 0:t.id,a=n||ur("g0.relative_time",o),u=$r.find((function(e){return e.id===a}));return{relativeTimeId:u?a:"none",duration:u?u.duration:r,endInput:u?u.until():i}},Rr=ur("g0.range_input"),jr=Ir({defaultDuration:Rr||"1h",defaultEndInput:new Date((Cr=ur("g0.end_input",new Date(yr()().utc().format(kr))),yr()(Cr).utcOffset(0,!0).local().format(kr))),relativeTimeId:Rr?ur("g0.relative_time","none"):void 0}),zr=jr.duration,Ur=jr.endInput,Hr=jr.relativeTimeId,Vr={duration:zr,period:Tr(zr,Ur),relativeTime:Hr};function Yr(e,t){switch(t.type){case"SET_DURATION":return Kn(Kn({},e),{},{duration:t.payload,period:Tr(t.payload,Pr(e.period.end)),relativeTime:"none"});case"SET_RELATIVE_TIME":return Kn(Kn({},e),{},{duration:t.payload.duration,period:Tr(t.payload.duration,new Date(t.payload.until)),relativeTime:t.payload.id});case"SET_PERIOD":var n=function(e){var t=e.to.valueOf()-e.from.valueOf();return Lr(t)}(t.payload);return Kn(Kn({},e),{},{duration:n,period:Tr(n,t.payload.to),relativeTime:"none"});case"RUN_QUERY":var r=Ir({relativeTimeId:e.relativeTime,defaultDuration:e.duration,defaultEndInput:Pr(e.period.end)}),i=r.duration,o=r.endInput;return Kn(Kn({},e),{},{period:Tr(i,o)});case"RUN_QUERY_TO_NOW":return Kn(Kn({},e),{},{period:Tr(e.duration)});default:throw new Error}}var qr=R({}),Wr=function(){return ue(qr).state},Qr=function(){return ue(qr).dispatch},Gr=function(e){return e.forEach((function(e){return window.localStorage.removeItem(e)}))},Jr=function(){var e,t=(null===(e=window.location.search.match(/g\d+.expr/gim))||void 0===e?void 0:e.length)||1;return new Array(t>4?4:t).fill(1).map((function(e,t){return ur("g".concat(t,".expr"),"")}))}(),Zr={query:Jr,queryHistory:Jr.map((function(e){return{index:0,values:[e]}})),autocomplete:function(e){var 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(c){return t}}("AUTOCOMPLETE")||!1};function Kr(e,t){switch(t.type){case"SET_QUERY":return Kn(Kn({},e),{},{query:t.payload.map((function(e){return e}))});case"SET_QUERY_HISTORY":return Kn(Kn({},e),{},{queryHistory:t.payload});case"SET_QUERY_HISTORY_BY_INDEX":return e.queryHistory.splice(t.payload.queryNumber,1,t.payload.value),Kn(Kn({},e),{},{queryHistory:e.queryHistory});case"TOGGLE_AUTOCOMPLETE":return n="AUTOCOMPLETE",(r=!e.autocomplete)?window.localStorage.setItem(n,JSON.stringify({value:r})):Gr([n]),Kn(Kn({},e),{},{autocomplete:!e.autocomplete});default:throw new Error}var n,r}var Xr=R({}),ei=function(){return ue(Xr).state},ti=function(){return ue(Xr).dispatch},ni=function(){return fr("svg",{viewBox:"0 0 74 24",fill:"currentColor",children:[fr("path",{d:"M6.11771 9.47563C6.4774 9.7554 6.91935 9.90875 7.37507 9.9119H7.42685C7.9076 9.90451 8.38836 9.71964 8.67681 9.46823C10.1856 8.18898 14.5568 4.18115 14.5568 4.18115C15.7254 3.09415 12.4637 2.00716 7.42685 1.99977H7.36768C2.33084 2.00716 -0.930893 3.09415 0.237711 4.18115C0.237711 4.18115 4.60888 8.18898 6.11771 9.47563ZM8.67681 11.6422C8.31807 11.9246 7.87603 12.0806 7.41945 12.0859H7.37507C6.91849 12.0806 6.47645 11.9246 6.11771 11.6422C5.08224 10.7549 1.38413 7.41995 0.00103198 6.14809V8.07806C0.00103198 8.2925 0.0823905 8.57349 0.222919 8.70659L0.293358 8.77097L0.293386 8.77099C1.33788 9.72556 4.83907 12.9253 6.11771 14.0159C6.47645 14.2983 6.91849 14.4543 7.37507 14.4595H7.41945C7.9076 14.4447 8.38096 14.2599 8.67681 14.0159C9.98594 12.9067 13.6249 9.57175 14.5642 8.70659C14.7121 8.57349 14.7861 8.2925 14.7861 8.07806V6.14809C12.7662 7.99781 10.7297 9.82926 8.67681 11.6422ZM7.41945 16.6261C7.87517 16.623 8.31712 16.4696 8.67681 16.1898C10.7298 14.3744 12.7663 12.5405 14.7861 10.6883V12.6257C14.7861 12.8327 14.7121 13.1137 14.5642 13.2468C13.6249 14.1194 9.98594 17.4469 8.67681 18.5561C8.38096 18.8075 7.9076 18.9924 7.41945 18.9998H7.37507C6.91935 18.9966 6.4774 18.8433 6.11771 18.5635C4.91431 17.5371 1.74223 14.6362 0.502336 13.5023C0.3934 13.4027 0.299379 13.3167 0.222919 13.2468C0.0823905 13.1137 0.00103198 12.8327 0.00103198 12.6257V10.6883C1.38413 11.9528 5.08224 15.2951 6.11771 16.1825C6.47645 16.4649 6.91849 16.6209 7.37507 16.6261H7.41945Z",fill:"currentColor"}),fr("path",{d:"M35 3.54L29.16 18H26.73L20.89 3.54H23.05C23.2833 3.54 23.4733 3.59667 23.62 3.71C23.7667 3.82333 23.8767 3.97 23.95 4.15L27.36 12.97C27.4733 13.2567 27.58 13.5733 27.68 13.92C27.7867 14.26 27.8867 14.6167 27.98 14.99C28.06 14.6167 28.1467 14.26 28.24 13.92C28.3333 13.5733 28.4367 13.2567 28.55 12.97L31.94 4.15C31.9933 3.99667 32.0967 3.85667 32.25 3.73C32.41 3.60333 32.6033 3.54 32.83 3.54H35ZM52.1767 3.54V18H49.8067V8.66C49.8067 8.28667 49.8267 7.88333 49.8667 7.45L45.4967 15.66C45.2901 16.0533 44.9734 16.25 44.5467 16.25H44.1667C43.7401 16.25 43.4234 16.0533 43.2167 15.66L38.7967 7.42C38.8167 7.64 38.8334 7.85667 38.8467 8.07C38.8601 8.28333 38.8667 8.48 38.8667 8.66V18H36.4967V3.54H38.5267C38.6467 3.54 38.7501 3.54333 38.8367 3.55C38.9234 3.55667 39.0001 3.57333 39.0667 3.6C39.1401 3.62667 39.2034 3.67 39.2567 3.73C39.3167 3.79 39.3734 3.87 39.4267 3.97L43.7567 12C43.8701 12.2133 43.9734 12.4333 44.0667 12.66C44.1667 12.8867 44.2634 13.12 44.3567 13.36C44.4501 13.1133 44.5467 12.8767 44.6467 12.65C44.7467 12.4167 44.8534 12.1933 44.9667 11.98L49.2367 3.97C49.2901 3.87 49.3467 3.79 49.4067 3.73C49.4667 3.67 49.5301 3.62667 49.5967 3.6C49.6701 3.57333 49.7501 3.55667 49.8367 3.55C49.9234 3.54333 50.0267 3.54 50.1467 3.54H52.1767ZM61.063 17.27C61.743 17.27 62.3496 17.1533 62.883 16.92C63.423 16.68 63.8796 16.35 64.253 15.93C64.6263 15.51 64.9096 15.0167 65.103 14.45C65.303 13.8767 65.403 13.26 65.403 12.6V3.85H66.423V12.6C66.423 13.38 66.2996 14.11 66.053 14.79C65.8063 15.4633 65.4496 16.0533 64.983 16.56C64.523 17.06 63.9596 17.4533 63.293 17.74C62.633 18.0267 61.8896 18.17 61.063 18.17C60.2363 18.17 59.4896 18.0267 58.823 17.74C58.163 17.4533 57.5996 17.06 57.133 16.56C56.673 16.0533 56.3196 15.4633 56.073 14.79C55.8263 14.11 55.703 13.38 55.703 12.6V3.85H56.733V12.59C56.733 13.25 56.8296 13.8667 57.023 14.44C57.223 15.0067 57.5063 15.5 57.873 15.92C58.2463 16.34 58.6996 16.67 59.233 16.91C59.773 17.15 60.383 17.27 61.063 17.27ZM71.4442 18H70.4142V3.85H71.4442V18Z",fill:"currentColor"})]})},ri=function(){return fr("svg",{viewBox:"0 0 24 24",fill:"currentColor",children:fr("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"})})},ii=function(){return fr("svg",{viewBox:"0 0 24 24",fill:"currentColor",children:fr("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"})})},oi=function(){return fr("svg",{viewBox:"0 0 24 24",fill:"currentColor",children:fr("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"})})},ai=function(){return fr("svg",{viewBox:"0 0 24 24",fill:"currentColor",children:fr("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"})})},ui=function(){return fr("svg",{viewBox:"0 0 24 24",fill:"currentColor",children:fr("path",{d:"M1 21h22L12 2 1 21zm12-3h-2v-2h2v2zm0-4h-2v-4h2v4z"})})},li=function(){return fr("svg",{viewBox:"0 0 24 24",fill:"currentColor",children:fr("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"})})},ci=function(){return fr("svg",{viewBox:"0 0 24 24",fill:"currentColor",children:fr("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"})})},si=function(){return fr("svg",{viewBox:"0 0 24 24",fill:"currentColor",children:fr("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"})})},fi=function(){return fr("svg",{viewBox:"0 0 24 24",fill:"currentColor",children:fr("path",{d:"M7.41 8.59 12 13.17l4.59-4.58L18 10l-6 6-6-6 1.41-1.41z"})})},di=function(){return fr("svg",{viewBox:"0 0 24 24",fill:"currentColor",children:fr("path",{d:"m12 8-6 6 1.41 1.41L12 10.83l4.59 4.58L18 14z"})})},hi=function(){return fr("svg",{viewBox:"0 0 24 24",fill:"currentColor",children:fr("path",{d:"m7 10 5 5 5-5z"})})},pi=function(){return fr("svg",{viewBox:"0 0 24 24",fill:"currentColor",children:[fr("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"}),fr("path",{d:"M12.5 7H11v6l5.25 3.15.75-1.23-4.5-2.67z"})]})},vi=function(){return fr("svg",{viewBox:"0 0 24 24",fill:"currentColor",children:fr("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"})})},mi=function(){return fr("svg",{viewBox:"0 0 24 24",fill:"currentColor",children:fr("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"})})},yi=function(){return fr("svg",{viewBox:"0 0 24 24",fill:"currentColor",children:fr("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"})})},gi=function(){return fr("svg",{viewBox:"0 0 24 24",fill:"currentColor",children:fr("path",{d:"M8 5v14l11-7z"})})},_i=function(){return fr("svg",{viewBox:"0 0 24 24",fill:"currentColor",children:fr("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"})})},bi=function(){return fr("svg",{viewBox:"0 0 24 24",fill:"currentColor",children:fr("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"})})},Di=function(){return fr("svg",{viewBox:"0 0 24 24",fill:"currentColor",children:fr("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"})})},wi=function(){return fr("svg",{viewBox:"0 0 24 24",fill:"currentColor",children:fr("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"})})},xi=function(){return fr("svg",{viewBox:"0 0 24 24",fill:"currentColor",children:fr("path",{d:"M6 19c0 1.1.9 2 2 2h8c1.1 0 2-.9 2-2V7H6v12zM19 4h-3.5l-1-1h-5l-1 1H5v2h14V4z"})})},ki=function(){return fr("svg",{viewBox:"0 0 24 24",fill:"currentColor",children:fr("path",{d:"M19 13h-6v6h-2v-6H5v-2h6V5h2v6h6v2z"})})},Ci=function(){return fr("svg",{viewBox:"0 0 24 24",fill:"currentColor",children:fr("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"})})},Ei=function(){return fr("svg",{viewBox:"0 0 24 24",fill:"currentColor",children:fr("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"})})},Si=function(){return fr("svg",{viewBox:"0 0 24 24",fill:"currentColor",children:fr("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"})})},Ai=function(){return fr("svg",{viewBox:"0 0 24 24",fill:"currentColor",children:fr("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"})})},Fi=function(){return fr("svg",{viewBox:"0 0 24 24",fill:"currentColor",children:fr("path",{d:"M20 9H4v2h16V9zM4 15h16v-2H4v2z"})})},Ni=n(123),Oi=n.n(Ni),Ti=function(e){return getComputedStyle(document.documentElement).getPropertyValue("--".concat(e))},Bi=function(e,t){document.documentElement.style.setProperty("--".concat(e),t)},Mi=function(e){var t=e.activeItem,n=e.items,r=e.color,i=void 0===r?Ti("color-primary"):r,o=e.onChange,a=e.indicatorPlacement,u=void 0===a?"bottom":a,l=re(null),c=_t(X({left:0,width:0,bottom:0}),2),s=c[0],f=c[1];return te((function(){if(l.current){var e=l.current,t=e.offsetLeft,n=e.offsetWidth,r=e.offsetHeight;f({left:t,width:n,bottom:"top"===u?r-2:0})}}),[t,l,n]),fr("div",{className:"vm-tabs",children:[n.map((function(e){return fr("div",{className:Oi()(qn({"vm-tabs-item":!0,"vm-tabs-item_active":t===e.value},e.className||"",e.className)),ref:t===e.value?l:void 0,style:{color:i},onClick:(n=e.value,function(){o(n)}),children:[e.icon&&fr("div",{className:Oi()({"vm-tabs-item__icon":!0,"vm-tabs-item__icon_single":!e.label}),children:e.icon}),e.label]},e.value);var n})),fr("div",{className:"vm-tabs__indicator",style:Kn(Kn({},s),{},{borderColor:i})})]})},Li=[{value:"chart",icon:fr(bi,{}),label:"Graph",prometheusCode:0},{value:"code",icon:fr(wi,{}),label:"JSON",prometheusCode:3},{value:"table",icon:fr(Di,{}),label:"Table",prometheusCode:1}],Pi=function(){var e=Ui().displayType,t=Hi();return fr(Mi,{activeItem:e,items:Li,onChange:function(n){var r;t({type:"SET_DISPLAY_TYPE",payload:null!==(r=n)&&void 0!==r?r:e})}})},$i=ur("g0.tab",0),Ii=Li.find((function(e){return e.prometheusCode===+$i||e.value===$i})),Ri={displayType:(null===Ii||void 0===Ii?void 0:Ii.value)||"chart",nocache:!1,isTracingEnabled:!1};function ji(e,t){switch(t.type){case"SET_DISPLAY_TYPE":return Kn(Kn({},e),{},{displayType:t.payload});case"TOGGLE_QUERY_TRACING":return Kn(Kn({},e),{},{isTracingEnabled:!e.isTracingEnabled});case"TOGGLE_NO_CACHE":return Kn(Kn({},e),{},{nocache:!e.nocache});default:throw new Error}}var zi=R({}),Ui=function(){return ue(zi).state},Hi=function(){return ue(zi).dispatch},Vi={customStep:parseFloat(ur("g0.step_input","0")),yaxis:{limits:{enable:!1,range:{1:[0,0]}}}};function Yi(e,t){switch(t.type){case"TOGGLE_ENABLE_YAXIS_LIMITS":return Kn(Kn({},e),{},{yaxis:Kn(Kn({},e.yaxis),{},{limits:Kn(Kn({},e.yaxis.limits),{},{enable:!e.yaxis.limits.enable})})});case"SET_CUSTOM_STEP":return Kn(Kn({},e),{},{customStep:t.payload});case"SET_YAXIS_LIMITS":return Kn(Kn({},e),{},{yaxis:Kn(Kn({},e.yaxis),{},{limits:Kn(Kn({},e.yaxis.limits),{},{range:t.payload})})});default:throw new Error}}var qi=R({}),Wi=function(){return ue(qi).dispatch},Qi={runQuery:0,topN:ur("topN",10),date:ur("date",yr()(new Date).format(wr)),focusLabel:ur("focusLabel",""),match:ur("match",""),extraLabel:ur("extra_label","")};function Gi(e,t){switch(t.type){case"SET_TOP_N":return Kn(Kn({},e),{},{topN:t.payload});case"SET_DATE":return Kn(Kn({},e),{},{date:t.payload});case"SET_MATCH":return Kn(Kn({},e),{},{match:t.payload});case"SET_EXTRA_LABEL":return Kn(Kn({},e),{},{extraLabel:t.payload});case"SET_FOCUS_LABEL":return Kn(Kn({},e),{},{focusLabel:t.payload});case"RUN_QUERY":return Kn(Kn({},e),{},{runQuery:e.runQuery+1});default:throw new Error}}var Ji=R({}),Zi=function(){return ue(Ji).state},Ki=function(){return ue(Ji).dispatch},Xi={topN:ur("topN",null),maxLifetime:ur("maxLifetime",""),runQuery:0};function eo(e,t){switch(t.type){case"SET_TOP_N":return Kn(Kn({},e),{},{topN:t.payload});case"SET_MAX_LIFE_TIME":return Kn(Kn({},e),{},{maxLifetime:t.payload});case"SET_RUN_QUERY":return Kn(Kn({},e),{},{runQuery:e.runQuery+1});default:throw new Error}}var to,no=R({}),ro=function(){return ue(no).state},io={success:fr(ci,{}),error:fr(li,{}),warning:fr(ui,{}),info:fr(ai,{})},oo=function(e){var t=e.variant,n=e.children;return fr("div",{className:Oi()(qn({"vm-alert":!0},"vm-alert_".concat(t),t)),children:[fr("div",{className:"vm-alert__icon",children:io[t||"info"]}),fr("div",{className:"vm-alert__content",children:n})]})},ao=R({showInfoMessage:function(){}}),uo=function(){return ue(ao)},lo=function(){for(var e=arguments.length,t=new Array(e),n=0;nd,v=r.top-20<0,m=r.left+g.width+20>f,y=r.left-20<0;return h&&(r.top=t.top-g.height-u),v&&(r.top=t.height+t.top+u),m&&(r.left=t.right-g.width-l),y&&(r.left=t.left+l),r}),[n,i,p,t]);d&&so(b,(function(){return v(!1)}),n);var x=Oi()(qn({"vm-popper":!0,"vm-popper_open":p},"vm-popper_open_".concat(l),l));return fr(m,{children:p&&mt.createPortal(fr("div",{className:x,ref:b,style:w,children:t}),document.body)})},ho=function(e){var t=e.children,n=e.title,r=e.open,i=e.placement,o=void 0===i?"bottom-center":i,a=e.offset,u=void 0===a?{top:6,left:0}:a,l=_t(X(!1),2),c=l[0],s=l[1],f=_t(X({width:0,height:0}),2),d=f[0],h=f[1],p=re(null),v=re(null),y=function(){return s(!1)};te((function(){return window.addEventListener("scroll",y),function(){window.removeEventListener("scroll",y)}}),[]),te((function(){v.current&&c&&h({width:v.current.clientWidth,height:v.current.clientHeight})}),[c]);var g=oe((function(){var e,t=null===p||void 0===p||null===(e=p.current)||void 0===e?void 0:e.base;if(!t||!c)return{};var n=t.getBoundingClientRect(),r={top:0,left:0},i="bottom-right"===o||"top-right"===o,a="bottom-left"===o||"top-left"===o,l=null===o||void 0===o?void 0:o.includes("top"),s=(null===u||void 0===u?void 0:u.top)||0,f=(null===u||void 0===u?void 0:u.left)||0;r.left=n.left-(d.width-n.width)/2+f,r.top=n.height+n.top+s,i&&(r.left=n.right-d.width),a&&(r.left=n.left+f),l&&(r.top=n.top-d.height-s);var h=window,v=h.innerWidth,m=h.innerHeight,y=r.top+d.height+20>m,g=r.top-20<0,_=r.left+d.width+20>v,b=r.left-20<0;return y&&(r.top=n.top-d.height-s),g&&(r.top=n.height+n.top+s),_&&(r.left=n.right-d.width-f),b&&(r.left=n.left+f),r.top<0&&(r.top=20),r.left<0&&(r.left=20),r}),[p,o,c,d]),_=function(){"boolean"!==typeof r&&s(!0)},b=function(){s(!1)};return te((function(){"boolean"===typeof r&&s(r)}),[r]),te((function(){var e,t=null===p||void 0===p||null===(e=p.current)||void 0===e?void 0:e.base;if(t)return t.addEventListener("mouseenter",_),t.addEventListener("mouseleave",b),function(){t.removeEventListener("mouseenter",_),t.removeEventListener("mouseleave",b)}}),[p]),fr(m,{children:[fr(m,{ref:p,children:t}),c&&mt.createPortal(fr("div",{className:"vm-tooltip",ref:v,style:g,children:n}),document.body)]})},po=[{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"}],vo=function(){var e=Qr(),t=er(),n=_t(X(!1),2),r=n[0],i=n[1],o=_t(X(po[0]),2),a=o[0],u=o[1];te((function(){var t,n=a.seconds;return r?t=setInterval((function(){e({type:"RUN_QUERY"})}),1e3*n):u(po[0]),function(){t&&clearInterval(t)}}),[a,r]);var l=_t(X(!1),2),c=l[0],s=l[1],f=re(null),d=function(e){return function(){!function(e){(r&&!e.seconds||!r&&e.seconds)&&i((function(e){return!e})),u(e),s(!1)}(e)}};return fr(m,{children:[fr("div",{className:"vm-execution-controls",children:fr("div",{className:Oi()({"vm-execution-controls-buttons":!0,"vm-header-button":!t}),children:[fr(ho,{title:"Refresh dashboard",children:fr(co,{variant:"contained",color:"primary",onClick:function(){e({type:"RUN_QUERY"})},startIcon:fr(si,{})})}),fr(ho,{title:"Auto-refresh control",children:fr("div",{ref:f,children:fr(co,{variant:"contained",color:"primary",fullWidth:!0,endIcon:fr("div",{className:Oi()({"vm-execution-controls-buttons__arrow":!0,"vm-execution-controls-buttons__arrow_open":c}),children:fr(fi,{})}),onClick:function(){s((function(e){return!e}))},children:a.title})})})]})}),fr(fo,{open:c,placement:"bottom-right",onClose:function(){s(!1)},buttonRef:f,children:fr("div",{className:"vm-execution-controls-list",children:po.map((function(e){return fr("div",{className:Oi()({"vm-list__item":!0,"vm-list__item_active":e.seconds===a.seconds}),onClick:d(e),children:e.title},e.seconds)}))})})]})},mo=function(e){var t=e.relativeTime,n=e.setDuration;return fr("div",{className:"vm-time-duration",children:$r.map((function(e){var r,i=e.id,o=e.duration,a=e.until,u=e.title;return fr("div",{className:Oi()({"vm-list__item":!0,"vm-list__item_active":i===t}),onClick:(r={duration:o,until:a(),id:i},function(){n(r)}),children:u||o},i)}))})},yo=function(e){var t=_t(X({width:0,height:0}),2),n=t[0],r=t[1];return te((function(){var t=new ResizeObserver((function(e){var t=e[0].contentRect,n=t.width,i=t.height;r({width:n,height:i})}));return e&&t.observe(e),function(){e&&t.unobserve(e)}}),[]),n},go=function(e){var t=e.viewDate,n=e.displayYears,r=e.onChangeViewDate;return fr("div",{className:"vm-calendar-header",children:[fr("div",{className:"vm-calendar-header-left",onClick:e.toggleDisplayYears,children:[fr("span",{className:"vm-calendar-header-left__date",children:t.format("MMMM YYYY")}),fr("div",{className:"vm-calendar-header-left__select-year",children:fr(hi,{})})]}),!n&&fr("div",{className:"vm-calendar-header-right",children:[fr("div",{className:"vm-calendar-header-right__prev",onClick:function(){r(t.subtract(1,"month"))},children:fr(fi,{})}),fr("div",{className:"vm-calendar-header-right__next",onClick:function(){r(t.add(1,"month"))},children:fr(fi,{})})]})]})},_o=["Sunday","Monday","Tuesday","Wednesday","Thursday","Friday","Saturday"],bo=function(e){var t=e.viewDate,n=e.selectDate,r=e.onChangeSelectDate,i=yr()().startOf("day"),o=oe((function(){var e=new Array(42).fill(null),n=t.startOf("month"),r=t.endOf("month").diff(n,"day")+1,i=new Array(r).fill(n).map((function(e,t){return e.add(t,"day")})),o=n.day();return e.splice.apply(e,[o,r].concat(bt(i))),e}),[t]),a=function(e){return function(){e&&r(e)}};return fr("div",{className:"vm-calendar-body",children:[_o.map((function(e){return fr("div",{className:"vm-calendar-body-cell vm-calendar-body-cell_weekday",children:e[0]},e)})),o.map((function(e,t){return fr("div",{className:Oi()({"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.toISOString())===n.startOf("day").toISOString(),"vm-calendar-body-cell_day_today":(e&&e.toISOString())===i.toISOString()}),onClick:a(e),children:e&&e.format("D")},e?e.toISOString():t)}))]})},Do=function(e){var t=e.viewDate,n=e.onChangeViewDate,r=oe((function(){return t.format("YYYY")}),[t]),i=oe((function(){var e=yr()().subtract(103,"year");return new Array(206).fill(e).map((function(e,t){return e.add(t,"year")}))}),[t]);te((function(){var e=document.getElementById("vm-calendar-year-".concat(r));e&&e.scrollIntoView({block:"center"})}),[]);return fr("div",{className:"vm-calendar-years",children:i.map((function(e){return fr("div",{className:Oi()({"vm-calendar-years__year":!0,"vm-calendar-years__year_selected":e.format("YYYY")===r}),id:"vm-calendar-year-".concat(e.format("YYYY")),onClick:(t=e,function(){n(t)}),children:e.format("YYYY")},e.format("YYYY"));var t}))})};!function(e){e[e.hour=0]="hour",e[e.minutes=1]="minutes",e[e.seconds=2]="seconds"}(to||(to={}));var wo,xo=function(e){var t=e.selectDate,n=e.onChangeTime,r=e.onClose,i=_t(X(to.hour),2),o=i[0],a=i[1],u=_t(X(t.format("HH")),2),l=u[0],c=u[1],s=_t(X(t.format("mm")),2),f=s[0],d=s[1],h=_t(X(t.format("ss")),2),p=h[0],v=h[1],m=oe((function(){return o===to.hour?new Array(24).fill("00").map((function(e,t){return{value:t,degrees:t/12*360,offset:0===t||t>12,title:t?"".concat(t):e}})):new Array(60).fill("00").map((function(e,t){return{value:t,degrees:t/60*360,offset:!1,title:t?"".concat(t):e}}))}),[o,l,f,p]),y=oe((function(){switch(o){case to.hour:return+l/12*360;case to.minutes:return+f/60*360;case to.seconds:return+p/60*360}}),[o,l,f,p]),g=re(null),_=re(null),b=re(null),D=function(e){return function(t){!function(e,t){t.target.select(),a(e)}(e,t)}};return te((function(){n("".concat(l,":").concat(f,":").concat(p))}),[l,f,p]),te((function(){c(t.format("HH")),d(t.format("mm")),v(t.format("ss"))}),[t]),te((function(){g.current&&g.current.focus()}),[]),fr("div",{className:"vm-calendar-time-picker",children:[fr("div",{className:"vm-calendar-time-picker-clock",children:[fr("div",{className:Oi()({"vm-calendar-time-picker-clock__arrow":!0,"vm-calendar-time-picker-clock__arrow_offset":o===to.hour&&("00"===l||+l>12)}),style:{transform:"rotate(".concat(y,"deg)")}}),m.map((function(e){return fr("div",{className:Oi()({"vm-calendar-time-picker-clock__time":!0,"vm-calendar-time-picker-clock__time_offset":e.offset,"vm-calendar-time-picker-clock__time_hide":m.length>24&&e.value%5}),style:{transform:"rotate(".concat(e.degrees,"deg)")},onClick:(t=e.value,function(){var e=String(t);switch(o){case to.hour:c(e),_.current&&_.current.focus();break;case to.minutes:d(e),b.current&&b.current.focus();break;case to.seconds:v(e),r()}}),children:fr("span",{style:{transform:"rotate(-".concat(e.degrees,"deg)")},children:e.title})},e.value);var t}))]}),fr("div",{className:"vm-calendar-time-picker-fields",children:[fr("input",{className:"vm-calendar-time-picker-fields__input",value:l,onChange:function(e){var t=e.target,n=t.value,r=+n>23?"23":n;t.value=r,c(r),n.length>1&&_.current&&_.current.focus()},onFocus:D(to.hour),ref:g,type:"number",min:0,max:24}),fr("span",{children:":"}),fr("input",{className:"vm-calendar-time-picker-fields__input",value:f,onChange:function(e){var t=e.target,n=t.value,r=+n>59?"59":n;t.value=r,d(r),n.length>1&&b.current&&b.current.focus()},onFocus:D(to.minutes),ref:_,type:"number",min:0,max:60}),fr("span",{children:":"}),fr("input",{className:"vm-calendar-time-picker-fields__input",value:p,onChange:function(e){var t=e.target,n=t.value,i=+n>59?"59":n;t.value=i,v(i),n.length>1&&b.current&&r()},onFocus:D(to.seconds),ref:b,type:"number",min:0,max:60})]})]})},ko=[{value:"date",icon:fr(vi,{})},{value:"time",icon:fr(pi,{})}],Co=function(e){var t=e.date,n=e.timepicker,r=void 0!==n&&n,i=e.format,o=void 0===i?xr:i,a=e.onChange,u=e.onClose,l=_t(X(!1),2),c=l[0],s=l[1],f=_t(X(yr()(t)),2),d=f[0],h=f[1],p=_t(X(yr()(t)),2),v=p[0],y=p[1],g=_t(X(ko[0].value),2),_=g[0],b=g[1],D=function(e){h(e),s(!1)};return te((function(){v.format()!==yr()(t).format()&&a(v.format(o))}),[v]),fr("div",{className:"vm-calendar",children:["date"===_&&fr(go,{viewDate:d,onChangeViewDate:D,toggleDisplayYears:function(){s((function(e){return!e}))},displayYears:c}),"date"===_&&fr(m,{children:[!c&&fr(bo,{viewDate:d,selectDate:v,onChangeSelectDate:function(e){y(e),r&&b("time")}}),c&&fr(Do,{viewDate:d,onChangeViewDate:D})]}),"time"===_&&fr(xo,{selectDate:v,onChangeTime:function(e){var t=_t(e.split(":"),3),n=t[0],r=t[1],i=t[2];y((function(e){return e.set("hour",+n).set("minute",+r).set("second",+i)}))},onClose:function(){u&&u()}}),r&&fr("div",{className:"vm-calendar__tabs",children:fr(Mi,{activeItem:_,items:ko,onChange:function(e){b(e)},indicatorPlacement:"top"})})]})},Eo=Ce((function(e,t){var n=e.date,r=e.targetRef,i=e.format,o=void 0===i?xr:i,a=e.timepicker,u=e.onChange,l=_t(X(!1),2),c=l[0],s=l[1],f=oe((function(){return n?yr()(n):yr()()}),[n]),d=function(){s((function(e){return!e}))},h=function(){s(!1)},p=function(e){"Escape"!==e.key&&"Enter"!==e.key||h()};return te((function(){var e;return null===(e=r.current)||void 0===e||e.addEventListener("click",d),function(){var e;null===(e=r.current)||void 0===e||e.removeEventListener("click",d)}}),[r]),te((function(){return window.addEventListener("keyup",p),function(){window.removeEventListener("keyup",p)}}),[]),fr(m,{children:fr(fo,{open:c,buttonRef:r,placement:"bottom-right",onClose:h,children:fr("div",{ref:t,children:fr(Co,{date:f,format:o,timepicker:a,onChange:function(e){a||h(),u(e)},onClose:h})})})})})),So=Eo,Ao=function(){var e=re(null),t=yo(document.body),n=oe((function(){return t.width>1120}),[t]),r=_t(X(),2),i=r[0],o=r[1],a=_t(X(),2),u=a[0],l=a[1],c=oe((function(){return yr()(u).format(xr)}),[u]),s=oe((function(){return yr()(i).format(xr)}),[i]),f=Wr(),d=f.period,h=d.end,p=d.start,v=f.relativeTime,y=Qr(),g=er();te((function(){o(Mr(Pr(h)))}),[h]),te((function(){l(Mr(Pr(p)))}),[p]);var _=oe((function(){return{start:yr()(Pr(p)).format(xr),end:yr()(Pr(h)).format(xr)}}),[p,h]),b=oe((function(){return v&&"none"!==v?v.replace(/_/g," "):"".concat(_.start," - ").concat(_.end)}),[v,_]),D=re(null),w=re(null),x=re(null),k=re(null),C=_t(X(!1),2),E=C[0],S=C[1],A=re(null),F=function(){S(!1)};return so(e,(function(e){var t,n,r=e.target,i=(null===D||void 0===D?void 0:D.current)&&D.current.contains(r),o=(null===w||void 0===w?void 0:w.current)&&w.current.contains(r),a=(null===x||void 0===x?void 0:x.current)&&(null===x||void 0===x||null===(t=x.current)||void 0===t?void 0:t.contains(r)),u=(null===k||void 0===k?void 0:k.current)&&(null===k||void 0===k||null===(n=k.current)||void 0===n?void 0:n.contains(r));i||o||a||u||F()})),fr(m,{children:[fr("div",{ref:A,children:fr(ho,{title:"Time range controls",children:fr(co,{className:g?"":"vm-header-button",variant:"contained",color:"primary",startIcon:fr(pi,{}),onClick:function(){S((function(e){return!e}))},children:n&&fr("span",{children:b})})})}),fr(fo,{open:E,buttonRef:A,placement:"bottom-right",onClose:F,clickOutside:!1,children:fr("div",{className:"vm-time-selector",ref:e,children:[fr("div",{className:"vm-time-selector-left",children:[fr("div",{className:"vm-time-selector-left-inputs",children:[fr("div",{className:"vm-time-selector-left-inputs__date",ref:D,children:[fr("label",{children:"From:"}),fr("span",{children:c}),fr(vi,{}),fr(So,{ref:x,date:u||"",onChange:function(e){return l(e)},targetRef:D,timepicker:!0})]}),fr("div",{className:"vm-time-selector-left-inputs__date",ref:w,children:[fr("label",{children:"To:"}),fr("span",{children:s}),fr(vi,{}),fr(So,{ref:k,date:i||"",onChange:function(e){return o(e)},targetRef:w,timepicker:!0})]})]}),fr(co,{variant:"text",startIcon:fr(mi,{}),onClick:function(){return y({type:"RUN_QUERY_TO_NOW"})},children:"switch to now"}),fr("div",{className:"vm-time-selector-left__controls",children:[fr(co,{color:"error",variant:"outlined",onClick:function(){o(Mr(Pr(h))),l(Mr(Pr(p))),S(!1)},children:"Cancel"}),fr(co,{color:"primary",onClick:function(){return u&&i&&y({type:"SET_PERIOD",payload:{from:new Date(u),to:new Date(i)}}),void S(!1)},children:"Apply"})]})]}),fr(mo,{relativeTime:v||"",setDuration:function(e){var t=e.duration,n=e.until,r=e.id;y({type:"SET_RELATIVE_TIME",payload:{duration:t,until:n,id:r}}),S(!1)}})]})})]})};!function(e){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"}(wo||(wo={}));var Fo=function(e){var t=e.label,n=e.value,r=e.type,i=void 0===r?"text":r,o=e.error,a=void 0===o?"":o,u=e.endIcon,l=e.startIcon,c=e.disabled,s=void 0!==c&&c,f=e.autofocus,d=void 0!==f&&f,h=e.helperText,p=e.onChange,v=e.onEnter,m=e.onKeyDown,y=re(null),g=re(null),_=oe((function(){return"textarea"===i?g:y}),[i]),b=Oi()({"vm-text-field__input":!0,"vm-text-field__input_error":a,"vm-text-field__input_icon-start":l,"vm-text-field__input_disabled":s,"vm-text-field__input_textarea":"textarea"===i}),D=function(e){m&&m(e),"Enter"!==e.key||e.shiftKey||(e.preventDefault(),v&&v())},w=function(e){s||p&&p(e.target.value)};return te((function(){var e;d&&(null===_||void 0===_||null===(e=_.current)||void 0===e?void 0:e.focus)&&_.current.focus()}),[_,d]),fr("label",{className:Oi()({"vm-text-field":!0,"vm-text-field_textarea":"textarea"===i}),"data-replicated-value":n,children:[l&&fr("div",{className:"vm-text-field__icon-start",children:l}),u&&fr("div",{className:"vm-text-field__icon-end",children:u}),"textarea"===i?fr("textarea",{className:b,disabled:s,ref:g,value:n,onInput:w,onKeyDown:D,rows:1}):fr("input",{className:b,disabled:s,ref:y,value:n,onInput:w,onKeyDown:D,type:i}),t&&fr("span",{className:"vm-text-field__label",children:t}),fr("span",{className:"vm-text-field__error","data-show":!!a,children:a}),h&&!a&&fr("span",{className:"vm-text-field__helper-text",children:h})]})},No=function(e){var t;try{t=new URL(e)}catch(g){return!1}return"http:"===t.protocol||"https:"===t.protocol},Oo=function(e){var t=e.setServer,n=e.onEnter,r=hr().serverUrl,i=_t(X(""),2),o=i[0],a=i[1],u=_t(X(r),2),l=u[0],c=u[1];return fr(Fo,{autofocus:!0,label:"Server URL",value:l,error:o,onChange:function(e){var n=e||"";c(n),t(n),a(""),n||a(wo.emptyServer),No(n)||a(wo.validServer)},onEnter:function(){n(l)}})},To=function(e){var t=e.title,n=e.children,r=e.onClose,i=function(e){"Escape"===e.key&&r()};return te((function(){return window.addEventListener("keyup",i),function(){window.removeEventListener("keyup",i)}}),[]),mt.createPortal(fr("div",{className:"vm-modal",onMouseDown:r,children:fr("div",{className:"vm-modal-content",children:[fr("div",{className:"vm-modal-content-header",children:[t&&fr("div",{className:"vm-modal-content-header__title",children:t}),fr("div",{className:"vm-modal-header__close",children:fr(co,{variant:"text",size:"small",onClick:r,children:fr(ii,{})})})]}),fr("div",{className:"vm-modal-content-body",onMouseDown:function(e){e.stopPropagation()},children:n})]})}),document.body)},Bo="Setting Server URL",Mo=function(){var e=hr().serverUrl,t=pr(),n=_t(X(e),2),r=n[0],i=n[1],o=function(e){t({type:"SET_SERVER",payload:e||r}),c()},a=_t(X(!1),2),u=a[0],l=a[1],c=function(){return l(!1)};return fr(m,{children:[fr(ho,{title:Bo,children:fr(co,{className:"vm-header-button",variant:"contained",color:"primary",startIcon:fr(ri,{}),onClick:function(){return l(!0)}})}),u&&fr(To,{title:Bo,onClose:c,children:fr("div",{className:"vm-server-configurator",children:[fr("div",{className:"vm-server-configurator__input",children:fr(Oo,{setServer:i,onEnter:o})}),fr("div",{className:"vm-server-configurator__footer",children:[fr(co,{variant:"outlined",color:"error",onClick:c,children:"Cancel"}),fr(co,{variant:"contained",onClick:function(){o()},children:"apply"})]})]})})]})},Lo={windows:"Windows",mac:"Mac OS",linux:"Linux"},Po=(Object.values(Lo).find((function(e){return navigator.userAgent.indexOf(e)>=0}))||"unknown")===Lo.mac?"Cmd":"Ctrl",$o=[{title:"Query",list:[{keys:["Enter"],description:"Run"},{keys:["Shift","Enter"],description:"Multi-line queries"},{keys:[Po,"Arrow Up"],description:"Previous command from the Query history"},{keys:[Po,"Arrow Down"],description:"Next command from the Query history"}]},{title:"Graph",list:[{keys:[Po,"Scroll Up"],description:"Zoom in"},{keys:[Po,"Scroll Down"],description:"Zoom out"},{keys:[Po,"Click and Drag"],description:"Move the graph left/right"}]},{title:"Legend",list:[{keys:["Mouse Click"],description:"Select series"},{keys:[Po,"Mouse Click"],description:"Toggle multiple series"}]}],Io=function(){var e=_t(X(!1),2),t=e[0],n=e[1],r=er();return fr(m,{children:[fr(ho,{title:"Shortcut keys",placement:"bottom-center",children:fr(co,{className:r?"":"vm-header-button",variant:"contained",color:"primary",startIcon:fr(yi,{}),onClick:function(){n(!0)}})}),t&&fr(To,{title:"Shortcut keys",onClose:function(){n(!1)},children:fr("div",{className:"vm-shortcuts",children:$o.map((function(e){return fr("div",{className:"vm-shortcuts-section",children:[fr("h3",{className:"vm-shortcuts-section__title",children:e.title}),fr("div",{className:"vm-shortcuts-section-list",children:e.list.map((function(e){return fr("div",{className:"vm-shortcuts-section-list-item",children:[fr("div",{className:"vm-shortcuts-section-list-item__key",children:e.keys.map((function(t,n){return fr(m,{children:[fr("code",{children:t},t),n!==e.keys.length-1?"+":""]})}))}),fr("p",{className:"vm-shortcuts-section-list-item__description",children:e.description})]},e.keys.join("+"))}))})]},e.title)}))})})]})},Ro=function(){var e=er(),t=re(null),n=Zi().date,r=Ki(),i=oe((function(){return yr()(n).format(wr)}),[n]);return fr("div",{children:[fr("div",{ref:t,children:fr(ho,{title:"Date control",children:fr(co,{className:e?"":"vm-header-button",variant:"contained",color:"primary",startIcon:fr(vi,{}),children:i})})}),fr(So,{date:n||"",format:wr,onChange:function(e){r({type:"SET_DATE",payload:e})},targetRef:t})]})},jo=function(){var e=Ti("color-primary"),t=er(),n=Xn().headerStyles,r=(n=void 0===n?{}:n).background,i=void 0===r?t?"#FFF":e:r,o=n.color,a=void 0===o?t?e:"#FFF":o,u=Sn(),l=En(),c=l.search,s=l.pathname,f=oe((function(){return[{label:"Custom panel",value:Jn.home},{label:"Dashboards",value:Jn.dashboards,hide:t},{label:"Cardinality",value:Jn.cardinality},{label:"Top queries",value:Jn.topQueries},{label:"Trace analyzer",value:Jn.trace}]}),[t]),d=_t(X(s),2),h=d[0],p=d[1],v=oe((function(){return(Gn[s]||{}).header||{}}),[s]),m=function(e){u({pathname:e,search:c})};return te((function(){p(s)}),[s]),fr("header",{className:Oi()({"vm-header":!0,"vm-header_app":t}),style:{background:i,color:a},children:[!t&&fr("div",{className:"vm-header-logo",style:{color:a},children:[fr("div",{className:"vm-header-logo__icon",onClick:function(){m(Jn.home),ar({}),window.location.reload()},children:fr(ni,{})}),fr("a",{className:"vm-header-logo__issue",target:"_blank",href:"https://github.com/VictoriaMetrics/VictoriaMetrics/issues/new",rel:"noreferrer",children:"create an issue"})]}),fr("div",{className:"vm-header-nav",children:fr(Mi,{activeItem:h,items:f.filter((function(e){return!e.hide})),color:a,onChange:function(e){p(e),u(e)}})}),fr("div",{className:"vm-header__settings",children:[(null===v||void 0===v?void 0:v.timeSelector)&&fr(Ao,{}),(null===v||void 0===v?void 0:v.cardinalityDatePicker)&&fr(Ro,{}),(null===v||void 0===v?void 0:v.executionControls)&&fr(vo,{}),(null===v||void 0===v?void 0:v.globalSettings)&&!t&&fr(Mo,{}),fr(Io,{})]})]})},zo=function(){var e=er();return fr("section",{className:"vm-container",children:[fr(jo,{}),fr("div",{className:Oi()({"vm-container-body":!0,"vm-container-body_app":e}),children:fr($n,{})})]})};function Uo(e,t){var n="undefined"!==typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(!n){if(Array.isArray(e)||(n=gt(e))||t&&e&&"number"===typeof e.length){n&&(e=n);var r=0,i=function(){};return{s:i,n:function(){return r>=e.length?{done:!0}:{done:!1,value:e[r++]}},e:function(e){throw e},f:i}}throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}var o,a=!0,u=!1;return{s:function(){n=n.call(e)},n:function(){var e=n.next();return a=e.done,e},e:function(e){u=!0,o=e},f:function(){try{a||null==n.return||n.return()}finally{if(u)throw o}}}}var Ho,Vo,Yo="u-off",qo="u-label",Wo="width",Qo="height",Go="top",Jo="bottom",Zo="left",Ko="right",Xo="#000",ea="#0000",ta="mousemove",na="mousedown",ra="mouseup",ia="mouseenter",oa="mouseleave",aa="dblclick",ua="change",la="dppxchange",ca="undefined"!=typeof window,sa=ca?document:null,fa=ca?window:null,da=ca?navigator:null;function ha(e,t){if(null!=t){var n=e.classList;!n.contains(t)&&n.add(t)}}function pa(e,t){var n=e.classList;n.contains(t)&&n.remove(t)}function va(e,t,n){e.style[t]=n+"px"}function ma(e,t,n,r){var i=sa.createElement(e);return null!=t&&ha(i,t),null!=n&&n.insertBefore(i,r),i}function ya(e,t){return ma("div",e,t)}var ga=new WeakMap;function _a(e,t,n,r,i){var o="translate("+t+"px,"+n+"px)";o!=ga.get(e)&&(e.style.transform=o,ga.set(e,o),t<0||n<0||t>r||n>i?ha(e,Yo):pa(e,Yo))}var ba=new WeakMap;function Da(e,t,n){var r=t+n;r!=ba.get(e)&&(ba.set(e,r),e.style.background=t,e.style.borderColor=n)}var wa=new WeakMap;function xa(e,t,n,r){var i=t+""+n;i!=wa.get(e)&&(wa.set(e,i),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)}var ka={passive:!0},Ca=Kn(Kn({},ka),{},{capture:!0});function Ea(e,t,n,r){t.addEventListener(e,n,r?Ca:ka)}function Sa(e,t,n,r){t.removeEventListener(e,n,r?Ca:ka)}function Aa(e,t,n,r){var i;n=n||0;for(var o=(r=r||t.length-1)<=2147483647;r-n>1;)t[i=o?n+r>>1:Wa((n+r)/2)]=t&&i<=n;i+=r)if(null!=e[i])return i;return-1}function Na(e,t,n,r){var i=ru,o=-ru;if(1==r)i=e[t],o=e[n];else if(-1==r)i=e[n],o=e[t];else for(var a=t;a<=n;a++)null!=e[a]&&(i=Ja(i,e[a]),o=Za(o,e[a]));return[i,o]}function Oa(e,t,n){for(var r=ru,i=-ru,o=t;o<=n;o++)e[o]>0&&(r=Ja(r,e[o]),i=Za(i,e[o]));return[r==ru?1:r,i==-ru?10:i]}ca&&function e(){var t=devicePixelRatio;Ho!=t&&(Ho=t,Vo&&Sa(ua,Vo,e),Vo=matchMedia("(min-resolution: ".concat(Ho-.001,"dppx) and (max-resolution: ").concat(Ho+.001,"dppx)")),Ea(ua,Vo,e),fa.dispatchEvent(new CustomEvent(la)))}();var Ta=[0,0];function Ba(e,t,n,r){return Ta[0]=n<0?vu(e,-n):e,Ta[1]=r<0?vu(t,-r):t,Ta}function Ma(e,t,n,r){var i,o,a,u=Xa(e),l=10==n?eu:tu;return e==t&&(-1==u?(e*=n,t/=n):(e/=n,t*=n)),r?(i=Wa(l(e)),o=Ga(l(t)),e=(a=Ba(Ka(n,i),Ka(n,o),i,o))[0],t=a[1]):(i=Wa(l(qa(e))),o=Wa(l(qa(t))),e=pu(e,(a=Ba(Ka(n,i),Ka(n,o),i,o))[0]),t=hu(t,a[1])),[e,t]}function La(e,t,n,r){var i=Ma(e,t,n,r);return 0==e&&(i[0]=0),0==t&&(i[1]=0),i}var Pa={mode:3,pad:.1},$a={pad:0,soft:null,mode:0},Ia={min:$a,max:$a};function Ra(e,t,n,r){return ku(n)?za(e,t,n):($a.pad=n,$a.soft=r?0:null,$a.mode=r?3:0,za(e,t,Ia))}function ja(e,t){return null==e?t:e}function za(e,t,n){var r=n.min,i=n.max,o=ja(r.pad,0),a=ja(i.pad,0),u=ja(r.hard,-ru),l=ja(i.hard,ru),c=ja(r.soft,ru),s=ja(i.soft,-ru),f=ja(r.mode,0),d=ja(i.mode,0),h=t-e;h<1e-9&&(h=0,0!=e&&0!=t||(h=1e-9,2==f&&c!=ru&&(o=0),2==d&&s!=-ru&&(a=0)));var p=h||qa(t)||1e3,v=eu(p),m=Ka(10,Wa(v)),y=vu(pu(e-p*(0==h?0==e?.1:1:o),m/10),9),g=e>=c&&(1==f||3==f&&y<=c||2==f&&y>=c)?c:ru,_=Za(u,y=g?g:Ja(g,y)),b=vu(hu(t+p*(0==h?0==t?.1:1:a),m/10),9),D=t<=s&&(1==d||3==d&&b>=s||2==d&&b<=s)?s:-ru,w=Ja(l,b>D&&t<=D?D:Za(D,b));return _==w&&0==_&&(w=100),[_,w]}var Ua=new Intl.NumberFormat(ca?da.language:"en-US"),Ha=function(e){return Ua.format(e)},Va=Math,Ya=Va.PI,qa=Va.abs,Wa=Va.floor,Qa=Va.round,Ga=Va.ceil,Ja=Va.min,Za=Va.max,Ka=Va.pow,Xa=Va.sign,eu=Va.log10,tu=Va.log2,nu=function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:1;return Va.asinh(e/t)},ru=1/0;function iu(e){return 1+(0|eu((e^e>>31)-(e>>31)))}function ou(e,t){return Qa(e/t)*t}function au(e,t,n){return Ja(Za(e,t),n)}function uu(e){return"function"==typeof e?e:function(){return e}}var lu=function(e){return e},cu=function(e,t){return t},su=function(e){return null},fu=function(e){return!0},du=function(e,t){return e==t};function hu(e,t){return Ga(e/t)*t}function pu(e,t){return Wa(e/t)*t}function vu(e,t){return Qa(e*(t=Math.pow(10,t)))/t}var mu=new Map;function yu(e){return((""+e).split(".")[1]||"").length}function gu(e,t,n,r){for(var i=[],o=r.map(yu),a=t;a=0&&a>=0?0:u)+(a>=o[c]?0:o[c]),d=vu(s,f);i.push(d),mu.set(d,f)}return i}var _u={},bu=[],Du=[null,null],wu=Array.isArray;function xu(e){return"string"==typeof e}function ku(e){var t=!1;if(null!=e){var n=e.constructor;t=null==n||n==Object}return t}function Cu(e){return null!=e&&"object"==typeof e}var Eu=Object.getPrototypeOf(Uint8Array);function Su(e){var t,n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:ku;if(wu(e)){var r=e.find((function(e){return null!=e}));if(wu(r)||n(r)){t=Array(e.length);for(var i=0;io){for(r=a-1;r>=0&&null==e[r];)e[r--]=null;for(r=a+1;r12?t-12:t},AA:function(e){return e.getHours()>=12?"PM":"AM"},aa:function(e){return e.getHours()>=12?"pm":"am"},a:function(e){return e.getHours()>=12?"p":"a"},mm:function(e){return $u(e.getMinutes())},m:function(e){return e.getMinutes()},ss:function(e){return $u(e.getSeconds())},s:function(e){return e.getSeconds()},fff:function(e){return((t=e.getMilliseconds())<10?"00":t<100?"0":"")+t;var t}};function Ru(e,t){t=t||Pu;for(var n,r=[],i=/\{([a-z]+)\}|[^{]+/gi;n=i.exec(e);)r.push("{"==n[0][0]?Iu[n[1]]:n[0]);return function(e){for(var n="",i=0;i=a,v=f>=o&&f=i?i:f,N=_+(Wa(c)-Wa(y))+hu(y-_,F);h.push(N);for(var O=t(N),T=O.getHours()+O.getMinutes()/n+O.getSeconds()/r,B=f/r,M=d/u.axes[l]._space;!((N=vu(N+f,1==e?0:3))>s);)if(B>1){var L=Wa(vu(T+B,6))%24,P=t(N).getHours()-L;P>1&&(P=-1),T=(T+B)%24,vu(((N-=P*r)-h[h.length-1])/f,3)*M>=.7&&h.push(N)}else h.push(N)}return h}}]}var il=_t(rl(1),3),ol=il[0],al=il[1],ul=il[2],ll=_t(rl(.001),3),cl=ll[0],sl=ll[1],fl=ll[2];function dl(e,t){return e.map((function(e){return e.map((function(n,r){return 0==r||8==r||null==n?n:t(1==r||0==e[8]?n:e[1]+n)}))}))}function hl(e,t){return function(n,r,i,o,a){var u,l,c,s,f,d,h=t.find((function(e){return a>=e[0]}))||t[t.length-1];return r.map((function(t){var n=e(t),r=n.getFullYear(),i=n.getMonth(),o=n.getDate(),a=n.getHours(),p=n.getMinutes(),v=n.getSeconds(),m=r!=u&&h[2]||i!=l&&h[3]||o!=c&&h[4]||a!=s&&h[5]||p!=f&&h[6]||v!=d&&h[7]||h[1];return u=r,l=i,c=o,s=a,f=p,d=v,m(n)}))}}function pl(e,t,n){return new Date(e,t,n)}function vl(e,t){return t(e)}gu(2,-53,53,[1]);function ml(e,t){return function(n,r){return t(e(r))}}var yl={show:!0,live:!0,isolate:!1,markers:{show:!0,width:2,stroke:function(e,t){var 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:[]};var gl=[0,0];function _l(e,t,n){return function(e){0==e.button&&n(e)}}function bl(e,t,n){return n}var Dl={show:!0,x:!0,y:!0,lock:!1,move:function(e,t,n){return gl[0]=t,gl[1]=n,gl},points:{show:function(e,t){var n=e.cursor.points,r=ya(),i=n.size(e,t);va(r,Wo,i),va(r,Qo,i);var o=i/-2;va(r,"marginLeft",o),va(r,"marginTop",o);var a=n.width(e,t,i);return a&&va(r,"borderWidth",a),r},size:function(e,t){return zl(e.series[t].points.width,1)},width:0,stroke:function(e,t){var n=e.series[t].points;return n._stroke||n._fill},fill:function(e,t){var n=e.series[t].points;return n._fill||n._stroke}},bind:{mousedown:_l,mouseup:_l,click:_l,dblclick:_l,mousemove:bl,mouseleave:bl,mouseenter:bl},drag:{setScale:!0,x:!0,y:!1,dist:0,uni:null,_x:!1,_y:!1},focus:{prox:-1},left:-10,top:-10,idx:null,dataIdx:function(e,t,n){return n},idxs:null},wl={show:!0,stroke:"rgba(0,0,0,0.07)",width:2},xl=Au({},wl,{filter:cu}),kl=Au({},xl,{size:10}),Cl=Au({},wl,{show:!1}),El='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"',Sl="bold "+El,Al={show:!0,scale:"x",stroke:Xo,space:50,gap:5,size:50,labelGap:0,labelSize:30,labelFont:Sl,side:2,grid:xl,ticks:kl,border:Cl,font:El,rotate:0},Fl={show:!0,scale:"x",auto:!1,sorted:1,min:ru,max:-ru,idxs:[]};function Nl(e,t,n,r,i){return t.map((function(e){return null==e?"":Ha(e)}))}function Ol(e,t,n,r,i,o,a){for(var u=[],l=mu.get(i)||0,c=n=a?n:vu(hu(n,i),l);c<=r;c=vu(c+i,l))u.push(Object.is(c,-0)?0:c);return u}function Tl(e,t,n,r,i,o,a){var u=[],l=e.scales[e.axes[t].scale].log,c=Wa((10==l?eu:tu)(n));i=Ka(l,c),c<0&&(i=vu(i,-c));var s=n;do{u.push(s),(s=vu(s+i,mu.get(i)))>=i*l&&(i=s)}while(s<=r);return u}function Bl(e,t,n,r,i,o,a){var u=e.scales[e.axes[t].scale].asinh,l=r>u?Tl(e,t,Za(u,n),r,i):[u],c=r>=0&&n<=0?[0]:[];return(n<-u?Tl(e,t,Za(u,-r),-n,i):[u]).reverse().map((function(e){return-e})).concat(c,l)}var Ml=/./,Ll=/[12357]/,Pl=/[125]/,$l=/1/;function Il(e,t,n,r,i){var o=e.axes[n],a=o.scale,u=e.scales[a];if(3==u.distr&&2==u.log)return t;var l=e.valToPos,c=o._space,s=l(10,a),f=l(9,a)-s>=c?Ml:l(7,a)-s>=c?Ll:l(5,a)-s>=c?Pl:$l;return t.map((function(e){return 4==u.distr&&0==e||f.test(e)?e:null}))}function Rl(e,t){return null==t?"":Ha(t)}var jl={show:!0,scale:"y",stroke:Xo,space:30,gap:5,size:50,labelGap:0,labelSize:30,labelFont:Sl,side:3,grid:xl,ticks:kl,border:Cl,font:El,rotate:0};function zl(e,t){return vu((3+2*(e||1))*t,3)}var Ul={scale:null,auto:!0,sorted:0,min:ru,max:-ru},Hl={show:!0,auto:!0,sorted:0,alpha:1,facets:[Au({},Ul,{scale:"x"}),Au({},Ul,{scale:"y"})]},Vl={scale:"y",auto:!0,sorted:0,show:!0,spanGaps:!1,gaps:function(e,t,n,r,i){return i},alpha:1,points:{show:function(e,t){var n=e.series[0],r=n.scale,i=n.idxs,o=e._data[0],a=e.valToPos(o[i[0]],r,!0),u=e.valToPos(o[i[1]],r,!0),l=qa(u-a)/(e.series[t].points.space*Ho);return i[1]-i[0]<=l},filter:null},values:null,min:ru,max:-ru,idxs:[],path:null,clip:null};function Yl(e,t,n,r,i){return n/10}var ql={time:!0,auto:!0,distr:1,log:10,asinh:1,min:null,max:null,dir:1,ori:0},Wl=Au({},ql,{time:!1,ori:1}),Ql={};function Gl(e,t){var n=Ql[e];return n||(n={key:e,plots:[],sub:function(e){n.plots.push(e)},unsub:function(e){n.plots=n.plots.filter((function(t){return t!=e}))},pub:function(e,t,r,i,o,a,u){for(var l=0;l0){a=new Path2D;for(var u=0==t?lc:cc,l=n,c=0;cs[0]){var f=s[0]-l;f>0&&u(a,l,r,f,r+o),l=s[1]}}var d=n+i-l;d>0&&u(a,l,r,d,r+o)}return a}function tc(e,t,n,r,i,o,a){for(var u=[],l=1==i?n:r;l>=n&&l<=r;l+=i){if(null===t[l]){var c=l,s=l;if(1==i)for(;++l<=r&&null===t[l];)s=l;else for(;--l>=n&&null===t[l];)s=l;var f=o(e[c]),d=s==c?f:o(e[s]);f=a<=0?o(e[c-i]):f,(d=a>=0?o(e[s+i]):d)>=f&&u.push([f,d])}}return u}function nc(e){return 0==e?lu:1==e?Qa:function(t){return ou(t,e)}}function rc(e){var t=0==e?ic:oc,n=0==e?function(e,t,n,r,i,o){e.arcTo(t,n,r,i,o)}:function(e,t,n,r,i,o){e.arcTo(n,t,i,r,o)},r=0==e?function(e,t,n,r,i){e.rect(t,n,r,i)}:function(e,t,n,r,i){e.rect(n,t,i,r)};return function(e,i,o,a,u){var l=arguments.length>5&&void 0!==arguments[5]?arguments[5]:0;0==l?r(e,i,o,a,u):(l=Ja(l,a/2,u/2),t(e,i+l,o),n(e,i+a,o,i+a,o+u,l),n(e,i+a,o+u,i,o+u,l),n(e,i,o+u,i,o,l),n(e,i,o,i+a,o,l),e.closePath())}}var ic=function(e,t,n){e.moveTo(t,n)},oc=function(e,t,n){e.moveTo(n,t)},ac=function(e,t,n){e.lineTo(t,n)},uc=function(e,t,n){e.lineTo(n,t)},lc=rc(0),cc=rc(1),sc=function(e,t,n,r,i,o){e.arc(t,n,r,i,o)},fc=function(e,t,n,r,i,o){e.arc(n,t,r,i,o)},dc=function(e,t,n,r,i,o,a){e.bezierCurveTo(t,n,r,i,o,a)},hc=function(e,t,n,r,i,o,a){e.bezierCurveTo(n,t,i,r,a,o)};function pc(e){return function(e,t,n,r,i){return Jl(e,t,(function(t,o,a,u,l,c,s,f,d,h,p){var v,m,y=t.pxRound,g=t.points;0==u.ori?(v=ic,m=sc):(v=oc,m=fc);var _=vu(g.width*Ho,3),b=(g.size-g.width)/2*Ho,D=vu(2*b,3),w=new Path2D,x=new Path2D,k=e.bbox,C=k.left,E=k.top,S=k.width,A=k.height;lc(x,C-D,E-D,S+2*D,A+2*D);var F=function(e){if(null!=a[e]){var t=y(c(o[e],u,h,f)),n=y(s(a[e],l,p,d));v(w,t+b,n),m(w,t,n,b,0,2*Ya)}};if(i)i.forEach(F);else for(var N=n;N<=r;N++)F(N);return{stroke:_>0?w:null,fill:w,clip:x,flags:3}}))}}function vc(e){return function(t,n,r,i,o,a){r!=i&&(o!=r&&a!=r&&e(t,n,r),o!=i&&a!=i&&e(t,n,i),e(t,n,a))}}var mc=vc(ac),yc=vc(uc);function gc(e){var t=ja(null===e||void 0===e?void 0:e.alignGaps,0);return function(e,n,r,i){return Jl(e,n,(function(o,a,u,l,c,s,f,d,h,p,v){var m,y,g=o.pxRound,_=function(e){return g(s(e,l,p,d))},b=function(e){return g(f(e,c,v,h))};0==l.ori?(m=ac,y=mc):(m=uc,y=yc);for(var D,w,x,k=l.dir*(0==l.ori?1:-1),C={stroke:new Path2D,fill:null,clip:null,band:null,gaps:null,flags:1},E=C.stroke,S=ru,A=-ru,F=_(a[1==k?r:i]),N=Fa(u,r,i,1*k),O=Fa(u,r,i,-1*k),T=_(a[N]),B=_(a[O]),M=1==k?r:i;M>=r&&M<=i;M+=k){var L=_(a[M]);L==F?null!=u[M]&&(w=b(u[M]),S==ru&&(m(E,L,w),D=w),S=Ja(w,S),A=Za(w,A)):(S!=ru&&(y(E,F,S,A,D,w),x=F),null!=u[M]?(m(E,L,w=b(u[M])),S=A=D=w):(S=ru,A=-ru),F=L)}S!=ru&&S!=A&&x!=F&&y(E,F,S,A,D,w);var P=_t(Zl(e,n),2),$=P[0],I=P[1];if(null!=o.fill||0!=$){var R=C.fill=new Path2D(E),j=b(o.fillTo(e,n,o.min,o.max,$));m(R,B,j),m(R,T,j)}if(!o.spanGaps){var z,U=[];(z=U).push.apply(z,bt(tc(a,u,r,i,k,_,t))),C.gaps=U=o.gaps(e,n,r,i,U),C.clip=ec(U,l.ori,d,h,p,v)}return 0!=I&&(C.band=2==I?[Xl(e,n,r,i,E,-1),Xl(e,n,r,i,E,1)]:Xl(e,n,r,i,E,I)),C}))}}function _c(e,t,n,r,i,o){var a=e.length;if(a<2)return null;var u=new Path2D;if(n(u,e[0],t[0]),2==a)r(u,e[1],t[1]);else{for(var l=Array(a),c=Array(a-1),s=Array(a-1),f=Array(a-1),d=0;d0!==c[h]>0?l[h]=0:(l[h]=3*(f[h-1]+f[h])/((2*f[h]+f[h-1])/c[h-1]+(f[h]+2*f[h-1])/c[h]),isFinite(l[h])||(l[h]=0));l[a-1]=c[a-2];for(var p=0;p=i&&o+(l<5?mu.get(l):0)<=17)return[l,c]}while(++u0?e:t.clamp(r,e,t.min,t.max,t.key)):4==t.distr?nu(e,t.asinh):e)-t._min)/(t._max-t._min)}function a(e,t,n,r){var i=o(e,t);return r+n*(-1==t.dir?1-i:i)}function u(e,t,n,r){var i=o(e,t);return r+n*(-1==t.dir?i:1-i)}function l(e,t,n,r){return 0==t.ori?a(e,t,n,r):u(e,t,n,r)}r.valToPosH=a,r.valToPosV=u;var c=!1;r.status=0;var s=r.root=ya("uplot");(null!=e.id&&(s.id=e.id),ha(s,e.class),e.title)&&(ya("u-title",s).textContent=e.title);var f=ma("canvas"),d=r.ctx=f.getContext("2d"),h=ya("u-wrap",s),p=r.under=ya("u-under",h);h.appendChild(f);var v=r.over=ya("u-over",h),m=+ja((e=Su(e)).pxAlign,1),y=nc(m);(e.plugins||[]).forEach((function(t){t.opts&&(e=t.opts(r,e)||e)}));var g=e.ms||.001,_=r.series=1==i?kc(e.series||[],Fl,Vl,!1):function(e,t){return e.map((function(e,n){return 0==n?null:Au({},t,e)}))}(e.series||[null],Hl),b=r.axes=kc(e.axes||[],Al,jl,!0),D=r.scales={},w=r.bands=e.bands||[];w.forEach((function(e){e.fill=uu(e.fill||null),e.dir=ja(e.dir,-1)}));var x=2==i?_[1].facets[0].scale:_[0].scale,k={axes:function(){for(var e=function(e){var t=b[e];if(!t.show||!t._show)return"continue";var n=t.side,i=n%2,o=void 0,a=void 0,u=t.stroke(r,e),c=0==n||3==n?-1:1;if(t.label){var s=t.labelGap*c,f=Qa((t._lpos+s)*Ho);Ze(t.labelFont[0],u,"center",2==n?Go:Jo),d.save(),1==i?(o=a=0,d.translate(f,Qa(de+pe/2)),d.rotate((3==n?-Ya:Ya)/2)):(o=Qa(fe+he/2),a=f),d.fillText(t.label,o,a),d.restore()}var h=_t(t._found,2),p=h[0],v=h[1];if(0==v)return"continue";var m=D[t.scale],g=0==i?he:pe,_=0==i?fe:de,w=Qa(t.gap*Ho),x=t._splits,k=2==m.distr?x.map((function(e){return qe[e]})):x,C=2==m.distr?qe[x[1]]-qe[x[0]]:p,E=t.ticks,S=t.border,A=E.show?Qa(E.size*Ho):0,F=t._rotate*-Ya/180,N=y(t._pos*Ho),O=N+(A+w)*c;a=0==i?O:0,o=1==i?O:0,Ze(t.font[0],u,1==t.align?Zo:2==t.align?Ko:F>0?Zo:F<0?Ko:0==i?"center":3==n?Ko:Zo,F||1==i?"middle":2==n?Go:Jo);for(var T=1.5*t.font[1],B=x.map((function(e){return y(l(e,m,g,_))})),M=t._values,L=0;L0&&(_.forEach((function(e,n){if(n>0&&e.show&&null==e._paths){var i=function(e){var t=au(He-1,0,Ne-1),n=au(Ve+1,0,Ne-1);for(;null==e[t]&&t>0;)t--;for(;null==e[n]&&n0&&e.show){je!=e.alpha&&(d.globalAlpha=je=e.alpha),Xe(t,!1),e._paths&&et(t,!1),Xe(t,!0);var n=e.points.show(r,t,He,Ve),i=e.points.filter(r,t,n,e._paths?e._paths.gaps:null);(n||i)&&(e.points._paths=e.points.paths(r,t,He,Ve,i),et(t,!0)),1!=je&&(d.globalAlpha=je=1),on("drawSeries",t)}})))}},C=(e.drawOrder||["axes","series"]).map((function(e){return k[e]}));function E(t){var n=D[t];if(null==n){var r=(e.scales||_u)[t]||_u;if(null!=r.from)E(r.from),D[t]=Au({},D[r.from],r,{key:t});else{(n=D[t]=Au({},t==x?ql:Wl,r)).key=t;var o=n.time,a=n.range,u=wu(a);if((t!=x||2==i&&!o)&&(!u||null!=a[0]&&null!=a[1]||(a={min:null==a[0]?Pa:{mode:1,hard:a[0],soft:a[0]},max:null==a[1]?Pa:{mode:1,hard:a[1],soft:a[1]}},u=!1),!u&&ku(a))){var l=a;a=function(e,t,n){return null==t?Du:Ra(t,n,l)}}n.range=uu(a||(o?Sc:t==x?3==n.distr?Nc:4==n.distr?Tc:Ec:3==n.distr?Fc:4==n.distr?Oc:Ac)),n.auto=uu(!u&&n.auto),n.clamp=uu(n.clamp||Yl),n._min=n._max=null}}}for(var S in E("x"),E("y"),1==i&&_.forEach((function(e){E(e.scale)})),b.forEach((function(e){E(e.scale)})),e.scales)E(S);var A,F,N=D[x],O=N.distr;0==N.ori?(ha(s,"u-hz"),A=a,F=u):(ha(s,"u-vt"),A=u,F=a);var T={};for(var B in D){var M=D[B];null==M.min&&null==M.max||(T[B]={min:M.min,max:M.max},M.min=M.max=null)}var L,P=e.tzDate||function(e){return new Date(Qa(e/g))},$=e.fmtDate||Ru,I=1==g?ul(P):fl(P),R=hl(P,dl(1==g?al:sl,$)),j=ml(P,vl("{YYYY}-{MM}-{DD} {h}:{mm}{aa}",$)),z=[],U=r.legend=Au({},yl,e.legend),H=U.show,V=U.markers;U.idxs=z,V.width=uu(V.width),V.dash=uu(V.dash),V.stroke=uu(V.stroke),V.fill=uu(V.fill);var Y,q=[],W=[],Q=!1,G={};if(U.live){var J=_[1]?_[1].values:null;for(var Z in Y=(Q=null!=J)?J(r,1,0):{_:0})G[Z]="--"}if(H)if(L=ma("table","u-legend",s),Q){var K=ma("tr","u-thead",L);for(var X in ma("th",null,K),Y)ma("th",qo,K).textContent=X}else ha(L,"u-inline"),U.live&&ha(L,"u-live");var ee={show:!0},te={show:!1};var ne=new Map;function re(e,t,n){var i=ne.get(t)||{},o=we.bind[e](r,t,n);o&&(Ea(e,t,i[e]=o),ne.set(t,i))}function ie(e,t,n){var r=ne.get(t)||{};for(var i in r)null!=e&&i!=e||(Sa(i,t,r[i]),delete r[i]);null==e&&ne.delete(t)}var oe=0,ae=0,ue=0,le=0,ce=0,se=0,fe=0,de=0,he=0,pe=0;r.bbox={};var ve=!1,me=!1,ye=!1,ge=!1,_e=!1;function be(e,t,n){(n||e!=r.width||t!=r.height)&&De(e,t),ut(!1),ye=!0,me=!0,ge=_e=we.left>=0,wt()}function De(e,t){r.width=oe=ue=e,r.height=ae=le=t,ce=se=0,function(){var e=!1,t=!1,n=!1,r=!1;b.forEach((function(i,o){if(i.show&&i._show){var a=i.side,u=a%2,l=i._size+(null!=i.label?i.labelSize:0);l>0&&(u?(ue-=l,3==a?(ce+=l,r=!0):n=!0):(le-=l,0==a?(se+=l,e=!0):t=!0))}})),Ae[0]=e,Ae[1]=n,Ae[2]=t,Ae[3]=r,ue-=Ue[1]+Ue[3],ce+=Ue[3],le-=Ue[2]+Ue[0],se+=Ue[0]}(),function(){var e=ce+ue,t=se+le,n=ce,r=se;function i(i,o){switch(i){case 1:return(e+=o)-o;case 2:return(t+=o)-o;case 3:return(n-=o)+o;case 0:return(r-=o)+o}}b.forEach((function(e,t){if(e.show&&e._show){var n=e.side;e._pos=i(n,e._size),null!=e.label&&(e._lpos=i(n,e.labelSize))}}))}();var n=r.bbox;fe=n.left=ou(ce*Ho,.5),de=n.top=ou(se*Ho,.5),he=n.width=ou(ue*Ho,.5),pe=n.height=ou(le*Ho,.5)}r.setSize=function(e){be(e.width,e.height)};var we=r.cursor=Au({},Dl,{drag:{y:2==i}},e.cursor);we.idxs=z,we._lock=!1;var xe=we.points;xe.show=uu(xe.show),xe.size=uu(xe.size),xe.stroke=uu(xe.stroke),xe.width=uu(xe.width),xe.fill=uu(xe.fill);var ke=r.focus=Au({},e.focus||{alpha:.3},we.focus),Ce=ke.prox>=0,Ee=[null];function Se(e,t){if(1==i||t>0){var n=1==i&&D[e.scale].time,o=e.value;e.value=n?xu(o)?ml(P,vl(o,$)):o||j:o||Rl,e.label=e.label||(n?"Time":"Value")}if(t>0){e.width=null==e.width?1:e.width,e.paths=e.paths||wc||su,e.fillTo=uu(e.fillTo||Kl),e.pxAlign=+ja(e.pxAlign,m),e.pxRound=nc(e.pxAlign),e.stroke=uu(e.stroke||null),e.fill=uu(e.fill||null),e._stroke=e._fill=e._paths=e._focus=null;var a=zl(e.width,1),u=e.points=Au({},{size:a,width:Za(1,.2*a),stroke:e.stroke,space:2*a,paths:xc,_stroke:null,_fill:null},e.points);u.show=uu(u.show),u.filter=uu(u.filter),u.fill=uu(u.fill),u.stroke=uu(u.stroke),u.paths=uu(u.paths),u.pxAlign=e.pxAlign}if(H){var l=function(e,t){if(0==t&&(Q||!U.live||2==i))return Du;var n=[],o=ma("tr","u-series",L,L.childNodes[t]);ha(o,e.class),e.show||ha(o,Yo);var a=ma("th",null,o);if(V.show){var u=ya("u-marker",a);if(t>0){var l=V.width(r,t);l&&(u.style.border=l+"px "+V.dash(r,t)+" "+V.stroke(r,t)),u.style.background=V.fill(r,t)}}var c=ya(qo,a);for(var s in c.textContent=e.label,t>0&&(V.show||(c.style.color=e.width>0?V.stroke(r,t):V.fill(r,t)),re("click",a,(function(t){if(!we._lock){var n=_.indexOf(e);if((t.ctrlKey||t.metaKey)!=U.isolate){var r=_.some((function(e,t){return t>0&&t!=n&&e.show}));_.forEach((function(e,t){t>0&&Pt(t,r?t==n?ee:te:ee,!0,an.setSeries)}))}else Pt(n,{show:!e.show},!0,an.setSeries)}})),Ce&&re(ia,a,(function(t){we._lock||Pt(_.indexOf(e),$t,!0,an.setSeries)}))),Y){var f=ma("td","u-value",o);f.textContent="--",n.push(f)}return[o,n]}(e,t);q.splice(t,0,l[0]),W.splice(t,0,l[1]),U.values.push(null)}if(we.show){z.splice(t,0,null);var c=function(e,t){if(t>0){var n=we.points.show(r,t);if(n)return ha(n,"u-cursor-pt"),ha(n,e.class),_a(n,-10,-10,ue,le),v.insertBefore(n,Ee[t]),n}}(e,t);c&&Ee.splice(t,0,c)}on("addSeries",t)}r.addSeries=function(e,t){e=Cc(e,t=null==t?_.length:t,Fl,Vl),_.splice(t,0,e),Se(_[t],t)},r.delSeries=function(e){if(_.splice(e,1),H){U.values.splice(e,1),W.splice(e,1);var t=q.splice(e,1)[0];ie(null,t.firstChild),t.remove()}we.show&&(z.splice(e,1),Ee.length>1&&Ee.splice(e,1)[0].remove()),on("delSeries",e)};var Ae=[!1,!1,!1,!1];function Fe(e,t,n,r){var i=_t(n,4),o=i[0],a=i[1],u=i[2],l=i[3],c=t%2,s=0;return 0==c&&(l||a)&&(s=0==t&&!o||2==t&&!u?Qa(Al.size/3):0),1==c&&(o||u)&&(s=1==t&&!a||3==t&&!l?Qa(jl.size/2):0),s}var Ne,Oe,Te,Be,Me,Le,Pe,$e,Ie,Re,je,ze=r.padding=(e.padding||[Fe,Fe,Fe,Fe]).map((function(e){return uu(ja(e,Fe))})),Ue=r._padding=ze.map((function(e,t){return e(r,t,Ae,0)})),He=null,Ve=null,Ye=1==i?_[0].idxs:null,qe=null,We=!1;function Qe(e,n){if(t=null==e?[]:Su(e,Cu),2==i){Ne=0;for(var o=1;o<_.length;o++)Ne+=t[o][0].length;r.data=t=e}else if(null==t[0]&&(t[0]=[]),r.data=t.slice(),qe=t[0],Ne=qe.length,2==O){t[0]=Array(Ne);for(var a=0;a=0,_e=!0,wt()}}function Ge(){var e,n;if(We=!0,1==i)if(Ne>0){if(He=Ye[0]=0,Ve=Ye[1]=Ne-1,e=t[0][He],n=t[0][Ve],2==O)e=He,n=Ve;else if(1==Ne)if(3==O){var r=_t(Ma(e,e,N.log,!1),2);e=r[0],n=r[1]}else if(4==O){var o=_t(La(e,e,N.log,!1),2);e=o[0],n=o[1]}else if(N.time)n=e+Qa(86400/g);else{var a=_t(Ra(e,n,.1,!0),2);e=a[0],n=a[1]}}else He=Ye[0]=e=null,Ve=Ye[1]=n=null;Lt(x,e,n)}function Je(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:ea,t=arguments.length>1?arguments[1]:void 0,n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:bu,r=arguments.length>3&&void 0!==arguments[3]?arguments[3]:"butt",i=arguments.length>4&&void 0!==arguments[4]?arguments[4]:ea,o=arguments.length>5&&void 0!==arguments[5]?arguments[5]:"round";e!=Oe&&(d.strokeStyle=Oe=e),i!=Te&&(d.fillStyle=Te=i),t!=Be&&(d.lineWidth=Be=t),o!=Le&&(d.lineJoin=Le=o),r!=Pe&&(d.lineCap=Pe=r),n!=Me&&d.setLineDash(Me=n)}function Ze(e,t,n,r){t!=Te&&(d.fillStyle=Te=t),e!=$e&&(d.font=$e=e),n!=Ie&&(d.textAlign=Ie=n),r!=Re&&(d.textBaseline=Re=r)}function Ke(e,t,n,i){var o=arguments.length>4&&void 0!==arguments[4]?arguments[4]:0;if(i.length>0&&e.auto(r,We)&&(null==t||null==t.min)){var a=ja(He,0),u=ja(Ve,i.length-1),l=null==n.min?3==e.distr?Oa(i,a,u):Na(i,a,u,o):[n.min,n.max];e.min=Ja(e.min,n.min=l[0]),e.max=Za(e.max,n.max=l[1])}}function Xe(e,t){var n=t?_[e].points:_[e];n._stroke=n.stroke(r,e),n._fill=n.fill(r,e)}function et(e,n){var i=n?_[e].points:_[e],o=i._stroke,a=i._fill,u=i._paths,l=u.stroke,c=u.fill,s=u.clip,f=u.flags,h=null,p=vu(i.width*Ho,3),v=p%2/2;n&&null==a&&(a=p>0?"#fff":o);var m=1==i.pxAlign;if(m&&d.translate(v,v),!n){var y=fe,g=de,b=he,D=pe,x=p*Ho/2;0==i.min&&(D+=x),0==i.max&&(g-=x,D+=x),(h=new Path2D).rect(y,g,b,D)}n?tt(o,p,i.dash,i.cap,a,l,c,f,s):function(e,n,i,o,a,u,l,c,s,f,d){var h=!1;w.forEach((function(p,v){if(p.series[0]==e){var m,y=_[p.series[1]],g=t[p.series[1]],b=(y._paths||_u).band;wu(b)&&(b=1==p.dir?b[0]:b[1]);var D=null;y.show&&b&&function(e,t,n){for(t=ja(t,0),n=ja(n,e.length-1);t<=n;){if(null!=e[t])return!0;t++}return!1}(g,He,Ve)?(D=p.fill(r,v)||u,m=y._paths.clip):b=null,tt(n,i,o,a,D,l,c,s,f,d,m,b),h=!0}})),h||tt(n,i,o,a,u,l,c,s,f,d)}(e,o,p,i.dash,i.cap,a,l,c,f,h,s),m&&d.translate(-v,-v)}r.setData=Qe;function tt(e,t,n,r,i,o,a,u,l,c,s,f){Je(e,t,n,r,i),(l||c||f)&&(d.save(),l&&d.clip(l),c&&d.clip(c)),f?3==(3&u)?(d.clip(f),s&&d.clip(s),rt(i,a),nt(e,o,t)):2&u?(rt(i,a),d.clip(f),nt(e,o,t)):1&u&&(d.save(),d.clip(f),s&&d.clip(s),rt(i,a),d.restore(),nt(e,o,t)):(rt(i,a),nt(e,o,t)),(l||c||f)&&d.restore()}function nt(e,t,n){n>0&&(t instanceof Map?t.forEach((function(e,t){d.strokeStyle=Oe=t,d.stroke(e)})):null!=t&&e&&d.stroke(t))}function rt(e,t){t instanceof Map?t.forEach((function(e,t){d.fillStyle=Te=t,d.fill(e)})):null!=t&&e&&d.fill(t)}function it(e,t,n,r,i,o,a,u,l,c){var s=a%2/2;1==m&&d.translate(s,s),Je(u,a,l,c,u),d.beginPath();var f,h,p,v,y=i+(0==r||3==r?-o:o);0==n?(h=i,v=y):(f=i,p=y);for(var g=0;g0&&(t._paths=null,e&&(1==i?(t.min=null,t.max=null):t.facets.forEach((function(e){e.min=null,e.max=null}))))}))}var lt,ct,st,ft,dt,ht,pt,vt,mt,yt,gt,bt,Dt=!1;function wt(){Dt||(Nu(xt),Dt=!0)}function xt(){ve&&(!function(){var e=Su(D,Cu);for(var n in e){var o=e[n],a=T[n];if(null!=a&&null!=a.min)Au(o,a),n==x&&ut(!0);else if(n!=x||2==i)if(0==Ne&&null==o.from){var u=o.range(r,null,null,n);o.min=u[0],o.max=u[1]}else o.min=ru,o.max=-ru}if(Ne>0)for(var l in _.forEach((function(n,o){if(1==i){var a=n.scale,u=e[a],l=T[a];if(0==o){var c=u.range(r,u.min,u.max,a);u.min=c[0],u.max=c[1],He=Aa(u.min,t[0]),Ve=Aa(u.max,t[0]),t[0][He]u.max&&Ve--,n.min=qe[He],n.max=qe[Ve]}else n.show&&n.auto&&Ke(u,l,n,t[o],n.sorted);n.idxs[0]=He,n.idxs[1]=Ve}else if(o>0&&n.show&&n.auto){var s=_t(n.facets,2),f=s[0],d=s[1],h=f.scale,p=d.scale,v=_t(t[o],2),m=v[0],y=v[1];Ke(e[h],T[h],f,m,f.sorted),Ke(e[p],T[p],d,y,d.sorted),n.min=d.min,n.max=d.max}})),e){var c=e[l],s=T[l];if(null==c.from&&(null==s||null==s.min)){var f=c.range(r,c.min==ru?null:c.min,c.max==-ru?null:c.max,l);c.min=f[0],c.max=f[1]}}for(var d in e){var h=e[d];if(null!=h.from){var p=e[h.from];if(null==p.min)h.min=h.max=null;else{var v=h.range(r,p.min,p.max,d);h.min=v[0],h.max=v[1]}}}var m={},y=!1;for(var g in e){var b=e[g],w=D[g];if(w.min!=b.min||w.max!=b.max){w.min=b.min,w.max=b.max;var k=w.distr;w._min=3==k?eu(w.min):4==k?nu(w.min,w.asinh):w.min,w._max=3==k?eu(w.max):4==k?nu(w.max,w.asinh):w.max,m[g]=y=!0}}if(y){for(var C in _.forEach((function(e,t){2==i?t>0&&m.y&&(e._paths=null):m[e.scale]&&(e._paths=null)})),m)ye=!0,on("setScale",C);we.show&&(ge=_e=we.left>=0)}for(var E in T)T[E]=null}(),ve=!1),ye&&(!function(){for(var e=!1,t=0;!e;){var n=ot(++t),i=at(t);(e=3==t||n&&i)||(De(r.width,r.height),me=!0)}}(),ye=!1),me&&(va(p,Zo,ce),va(p,Go,se),va(p,Wo,ue),va(p,Qo,le),va(v,Zo,ce),va(v,Go,se),va(v,Wo,ue),va(v,Qo,le),va(h,Wo,oe),va(h,Qo,ae),f.width=Qa(oe*Ho),f.height=Qa(ae*Ho),b.forEach((function(e){var t=e._el,n=e._show,r=e._size,i=e._pos,o=e.side;if(null!=t)if(n){var a=o%2==1;va(t,a?"left":"top",i-(3===o||0===o?r:0)),va(t,a?"width":"height",r),va(t,a?"top":"left",a?se:ce),va(t,a?"height":"width",a?le:ue),pa(t,Yo)}else ha(t,Yo)})),Oe=Te=Be=Le=Pe=$e=Ie=Re=Me=null,je=1,Wt(!0),on("setSize"),me=!1),oe>0&&ae>0&&(d.clearRect(0,0,f.width,f.height),on("drawClear"),C.forEach((function(e){return e()})),on("draw")),we.show&&ge&&(Yt(null,!0,!1),ge=!1),c||(c=!0,r.status=1,on("ready")),We=!1,Dt=!1}function kt(e,n){var i=D[e];if(null==i.from){if(0==Ne){var o=i.range(r,n.min,n.max,e);n.min=o[0],n.max=o[1]}if(n.min>n.max){var a=n.min;n.min=n.max,n.max=a}if(Ne>1&&null!=n.min&&null!=n.max&&n.max-n.min<1e-16)return;e==x&&2==i.distr&&Ne>0&&(n.min=Aa(n.min,t[0]),n.max=Aa(n.max,t[0]),n.min==n.max&&n.max++),T[e]=n,ve=!0,wt()}}r.redraw=function(e,t){ye=t||!1,!1!==e?Lt(x,N.min,N.max):wt()},r.setScale=kt;var Ct=!1,Et=we.drag,St=Et.x,At=Et.y;we.show&&(we.x&&(lt=ya("u-cursor-x",v)),we.y&&(ct=ya("u-cursor-y",v)),0==N.ori?(st=lt,ft=ct):(st=ct,ft=lt),gt=we.left,bt=we.top);var Ft,Nt,Ot,Tt=r.select=Au({show:!0,over:!0,left:0,width:0,top:0,height:0},e.select),Bt=Tt.show?ya("u-select",Tt.over?v:p):null;function Mt(e,t){if(Tt.show){for(var n in e)va(Bt,n,Tt[n]=e[n]);!1!==t&&on("setSelect")}}function Lt(e,t,n){kt(e,{min:t,max:n})}function Pt(e,t,n,o){null!=t.focus&&function(e){if(e!=Ot){var t=null==e,n=1!=ke.alpha;_.forEach((function(r,i){var o=t||0==i||i==e;r._focus=t?null:o,n&&function(e,t){_[e].alpha=t,we.show&&Ee[e]&&(Ee[e].style.opacity=t);H&&q[e]&&(q[e].style.opacity=t)}(i,o?1:ke.alpha)})),Ot=e,n&&wt()}}(e),null!=t.show&&_.forEach((function(n,r){r>0&&(e==r||null==e)&&(n.show=t.show,function(e,t){var n=_[e],r=H?q[e]:null;n.show?r&&pa(r,Yo):(r&&ha(r,Yo),Ee.length>1&&_a(Ee[e],-10,-10,ue,le))}(r,t.show),Lt(2==i?n.facets[1].scale:n.scale,null,null),wt())})),!1!==n&&on("setSeries",e,t),o&&cn("setSeries",r,e,t)}r.setSelect=Mt,r.setSeries=Pt,r.addBand=function(e,t){e.fill=uu(e.fill||null),e.dir=ja(e.dir,-1),t=null==t?w.length:t,w.splice(t,0,e)},r.setBand=function(e,t){Au(w[e],t)},r.delBand=function(e){null==e?w.length=0:w.splice(e,1)};var $t={focus:!0};function It(e,t,n){var r=D[t];n&&(e=e/Ho-(1==r.ori?se:ce));var i=ue;1==r.ori&&(e=(i=le)-e),-1==r.dir&&(e=i-e);var o=r._min,a=o+(r._max-o)*(e/i),u=r.distr;return 3==u?Ka(10,a):4==u?function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:1;return Va.sinh(e)*t}(a,r.asinh):a}function Rt(e,t){va(Bt,Zo,Tt.left=e),va(Bt,Wo,Tt.width=t)}function jt(e,t){va(Bt,Go,Tt.top=e),va(Bt,Qo,Tt.height=t)}H&&Ce&&Ea(oa,L,(function(e){we._lock||null!=Ot&&Pt(null,$t,!0,an.setSeries)})),r.valToIdx=function(e){return Aa(e,t[0])},r.posToIdx=function(e,n){return Aa(It(e,x,n),t[0],He,Ve)},r.posToVal=It,r.valToPos=function(e,t,n){return 0==D[t].ori?a(e,D[t],n?he:ue,n?fe:0):u(e,D[t],n?pe:le,n?de:0)},r.batch=function(e){e(r),wt()},r.setCursor=function(e,t,n){gt=e.left,bt=e.top,Yt(null,t,n)};var zt=0==N.ori?Rt:jt,Ut=1==N.ori?Rt:jt;function Ht(e,t){if(null!=e){var n=e.idx;U.idx=n,_.forEach((function(e,t){(t>0||!Q)&&Vt(t,n)}))}H&&U.live&&function(){if(H&&U.live)for(var e=2==i?1:0;e<_.length;e++)if(0!=e||!Q){var t=U.values[e],n=0;for(var r in t)W[e][n++].firstChild.nodeValue=t[r]}}(),_e=!1,!1!==t&&on("setLegend")}function Vt(e,n){var i;if(null==n)i=G;else{var o=_[e],a=0==e&&2==O?qe:t[e];i=Q?o.values(r,e,n):{_:o.value(r,a[n],e,n)}}U.values[e]=i}function Yt(e,n,o){mt=gt,yt=bt;var a,u=_t(we.move(r,gt,bt),2);gt=u[0],bt=u[1],we.show&&(st&&_a(st,Qa(gt),0,ue,le),ft&&_a(ft,0,Qa(bt),ue,le));var l=He>Ve;Ft=ru;var s=0==N.ori?ue:le,f=1==N.ori?ue:le;if(gt<0||0==Ne||l){a=null;for(var d=0;d<_.length;d++)d>0&&Ee.length>1&&_a(Ee[d],-10,-10,ue,le);if(Ce&&Pt(null,$t,!0,null==e&&an.setSeries),U.live){z.fill(null),_e=!0;for(var h=0;h<_.length;h++)U.values[h]=G}}else{var p,v;1==i&&(a=Aa(p=It(0==N.ori?gt:bt,x),t[0],He,Ve),v=hu(A(t[0][a],N,s,0),.5));for(var m=2==i?1:0;m<_.length;m++){var y=_[m],g=z[m],b=1==i?t[m][g]:t[m][1][g],w=we.dataIdx(r,m,a,p),k=1==i?t[m][w]:t[m][1][w];_e=_e||k!=b||w!=g,z[m]=w;var C=w==a?v:hu(A(1==i?t[0][w]:t[m][0][w],N,s,0),.5);if(m>0&&y.show){var E=null==k?-10:hu(F(k,1==i?D[y.scale]:D[y.facets[1].scale],f,0),.5);if(E>0&&1==i){var S=qa(E-bt);S<=Ft&&(Ft=S,Nt=m)}var O=void 0,T=void 0;if(0==N.ori?(O=C,T=E):(O=E,T=C),_e&&Ee.length>1){Da(Ee[m],we.points.fill(r,m),we.points.stroke(r,m));var B=void 0,M=void 0,L=void 0,P=void 0,$=!0,I=we.points.bbox;if(null!=I){$=!1;var R=I(r,m);L=R.left,P=R.top,B=R.width,M=R.height}else L=O,P=T,B=M=we.points.size(r,m);xa(Ee[m],B,M,$),_a(Ee[m],L,P,ue,le)}}if(U.live){if(!_e||0==m&&Q)continue;Vt(m,w)}}}if(we.idx=a,we.left=gt,we.top=bt,_e&&(U.idx=a,Ht()),Tt.show&&Ct)if(null!=e){var j=_t(an.scales,2),H=j[0],V=j[1],Y=_t(an.match,2),q=Y[0],W=Y[1],J=_t(e.cursor.sync.scales,2),Z=J[0],K=J[1],X=e.cursor.drag;if(St=X._x,At=X._y,St||At){var ee,te,ne,re,ie,oe=e.select,ae=oe.left,ce=oe.top,se=oe.width,fe=oe.height,de=e.scales[H].ori,he=e.posToVal,pe=null!=H&&q(H,Z),ve=null!=V&&W(V,K);pe&&St?(0==de?(ee=ae,te=se):(ee=ce,te=fe),ne=D[H],re=A(he(ee,Z),ne,s,0),ie=A(he(ee+te,Z),ne,s,0),zt(Ja(re,ie),qa(ie-re))):zt(0,s),ve&&At?(1==de?(ee=ae,te=se):(ee=ce,te=fe),ne=D[V],re=F(he(ee,K),ne,f,0),ie=F(he(ee+te,K),ne,f,0),Ut(Ja(re,ie),qa(ie-re))):Ut(0,f)}else Zt()}else{var me=qa(mt-dt),ye=qa(yt-ht);if(1==N.ori){var ge=me;me=ye,ye=ge}St=Et.x&&me>=Et.dist,At=Et.y&&ye>=Et.dist;var be,De,xe=Et.uni;null!=xe?St&&At&&(At=ye>=xe,(St=me>=xe)||At||(ye>me?At=!0:St=!0)):Et.x&&Et.y&&(St||At)&&(St=At=!0),St&&(0==N.ori?(be=pt,De=gt):(be=vt,De=bt),zt(Ja(be,De),qa(De-be)),At||Ut(0,f)),At&&(1==N.ori?(be=pt,De=gt):(be=vt,De=bt),Ut(Ja(be,De),qa(De-be)),St||zt(0,s)),St||At||(zt(0,0),Ut(0,0))}if(Et._x=St,Et._y=At,null==e){if(o){if(null!=un){var Se=_t(an.scales,2),Ae=Se[0],Fe=Se[1];an.values[0]=null!=Ae?It(0==N.ori?gt:bt,Ae):null,an.values[1]=null!=Fe?It(1==N.ori?gt:bt,Fe):null}cn(ta,r,gt,bt,ue,le,a)}if(Ce){var Oe=o&&an.setSeries,Te=ke.prox;null==Ot?Ft<=Te&&Pt(Nt,$t,!0,Oe):Ft>Te?Pt(null,$t,!0,Oe):Nt!=Ot&&Pt(Nt,$t,!0,Oe)}}c&&!1!==n&&on("setCursor")}r.setLegend=Ht;var qt=null;function Wt(e){!0===e?qt=null:on("syncRect",qt=v.getBoundingClientRect())}function Qt(e,t,n,r,i,o,a){we._lock||(Gt(e,t,n,r,i,o,a,!1,null!=e),null!=e?Yt(null,!0,!0):Yt(t,!0,!1))}function Gt(e,t,n,i,o,a,u,c,s){if(null==qt&&Wt(!1),null!=e)n=e.clientX-qt.left,i=e.clientY-qt.top;else{if(n<0||i<0)return gt=-10,void(bt=-10);var f=_t(an.scales,2),d=f[0],h=f[1],p=t.cursor.sync,v=_t(p.values,2),m=v[0],y=v[1],g=_t(p.scales,2),_=g[0],b=g[1],w=_t(an.match,2),x=w[0],k=w[1],C=t.axes[0].side%2==1,E=0==N.ori?ue:le,S=1==N.ori?ue:le,A=C?a:o,F=C?o:a,O=C?i:n,T=C?n:i;if(n=null!=_?x(d,_)?l(m,D[d],E,0):-10:E*(O/A),i=null!=b?k(h,b)?l(y,D[h],S,0):-10:S*(T/F),1==N.ori){var B=n;n=i,i=B}}if(s&&((n<=1||n>=ue-1)&&(n=ou(n,ue)),(i<=1||i>=le-1)&&(i=ou(i,le))),c){dt=n,ht=i;var M=_t(we.move(r,n,i),2);pt=M[0],vt=M[1]}else gt=n,bt=i}var Jt={width:0,height:0};function Zt(){Mt(Jt,!1)}function Kt(e,t,n,i,o,a,u){Ct=!0,St=At=Et._x=Et._y=!1,Gt(e,t,n,i,o,a,0,!0,!1),null!=e&&(re(ra,sa,Xt),cn(na,r,pt,vt,ue,le,null))}function Xt(e,t,n,i,o,a,u){Ct=Et._x=Et._y=!1,Gt(e,t,n,i,o,a,0,!1,!0);var l=Tt.left,c=Tt.top,s=Tt.width,f=Tt.height,d=s>0||f>0;if(d&&Mt(Tt),Et.setScale&&d){var h=l,p=s,v=c,m=f;if(1==N.ori&&(h=c,p=f,v=l,m=s),St&&Lt(x,It(h,x),It(h+p,x)),At)for(var y in D){var g=D[y];y!=x&&null==g.from&&g.min!=ru&&Lt(y,It(v+m,y),It(v,y))}Zt()}else we.lock&&(we._lock=!we._lock,we._lock||Yt(null,!0,!1));null!=e&&(ie(ra,sa),cn(ra,r,gt,bt,ue,le,null))}function en(e,t,n,i,o,a,u){Ge(),Zt(),null!=e&&cn(aa,r,gt,bt,ue,le,null)}function tn(){b.forEach(Lc),be(r.width,r.height,!0)}Ea(la,fa,tn);var nn={};nn.mousedown=Kt,nn.mousemove=Qt,nn.mouseup=Xt,nn.dblclick=en,nn.setSeries=function(e,t,n,r){Pt(n,r,!0,!1)},we.show&&(re(na,v,Kt),re(ta,v,Qt),re(ia,v,Wt),re(oa,v,(function(e,t,n,r,i,o,a){if(!we._lock){var u=Ct;if(Ct){var l,c,s=!0,f=!0;0==N.ori?(l=St,c=At):(l=At,c=St),l&&c&&(s=gt<=10||gt>=ue-10,f=bt<=10||bt>=le-10),l&&s&&(gt=gt=3?Il:cu)),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&&(Ae[t]=!0,e._el=ya("u-axis",h))}})),n?n instanceof HTMLElement?(n.appendChild(s),sn()):n(r,sn):sn(),r}Pc.assign=Au,Pc.fmtNum=Ha,Pc.rangeNum=Ra,Pc.rangeLog=Ma,Pc.rangeAsinh=La,Pc.orient=Jl,Pc.pxRatio=Ho,Pc.join=function(e,t){for(var n=new Set,r=0;r=o&&A<=a;A+=k){var F=c[A];if(null!=F){var N=_(l[A]),O=b(F);1==t?D(x,N,C):D(x,S,O),D(x,N,O),C=O,S=N}}var T=_t(Zl(e,i),2),B=T[0],M=T[1];if(null!=u.fill||0!=B){var L=w.fill=new Path2D(x),P=b(u.fillTo(e,i,u.min,u.max,B));D(L,S,P),D(L,E,P)}if(!u.spanGaps){var $,I=[];($=I).push.apply($,bt(tc(l,c,o,a,k,_,r)));var R=u.width*Ho/2,j=n||1==t?R:-R,z=n||-1==t?-R:R;I.forEach((function(e){e[0]+=j,e[1]+=z})),w.gaps=I=u.gaps(e,i,o,a,I),w.clip=ec(I,s.ori,p,v,m,y)}return 0!=M&&(w.band=2==M?[Xl(e,i,o,a,x,-1),Xl(e,i,o,a,x,1)]:Xl(e,i,o,a,x,M)),w}))}},$c.bars=function(e){var t=ja((e=e||_u).size,[.6,ru,1]),n=e.align||0,r=(e.gap||0)*Ho,i=ja(e.radius,0),o=1-t[0],a=ja(t[1],ru)*Ho,u=ja(t[2],1)*Ho,l=ja(e.disp,_u),c=ja(e.each,(function(e){})),s=l.fill,f=l.stroke;return function(e,t,d,h){return Jl(e,t,(function(p,v,m,y,g,_,b,D,w,x,k){var C,E,S=p.pxRound,A=y.dir*(0==y.ori?1:-1),F=g.dir*(1==g.ori?1:-1),N=0==y.ori?lc:cc,O=0==y.ori?c:function(e,t,n,r,i,o,a){c(e,t,n,i,r,a,o)},T=_t(Zl(e,t),2),B=T[0],M=T[1],L=3==g.distr?1==B?g.max:g.min:0,P=b(L,g,k,w),$=S(p.width*Ho),I=!1,R=null,j=null,z=null,U=null;null==s||0!=$&&null==f||(I=!0,R=s.values(e,t,d,h),j=new Map,new Set(R).forEach((function(e){null!=e&&j.set(e,new Path2D)})),$>0&&(z=f.values(e,t,d,h),U=new Map,new Set(z).forEach((function(e){null!=e&&U.set(e,new Path2D)}))));var H=l.x0,V=l.size;if(null!=H&&null!=V){v=H.values(e,t,d,h),2==H.unit&&(v=v.map((function(t){return e.posToVal(D+t*x,y.key,!0)})));var Y=V.values(e,t,d,h);E=S((E=2==V.unit?Y[0]*x:_(Y[0],y,x,D)-_(0,y,x,D))-$),C=1==A?-$/2:E+$/2}else{var q=x;if(v.length>1)for(var W=null,Q=0,G=1/0;Q=d&&Q<=h;Q+=A){var ie=m[Q];if(void 0!==ie){var oe=_(2!=y.distr||null!=l?v[Q]:Q,y,x,D),ae=b(ja(ie,L),g,k,w);null!=re&&null!=ie&&(P=b(re[Q],g,k,w));var ue=S(oe-C),le=S(Za(ae,P)),ce=S(Ja(ae,P)),se=le-ce,fe=i*E;null!=ie&&(I?($>0&&null!=z[Q]&&N(U.get(z[Q]),ue,ce+Wa($/2),E,Za(0,se-$),fe),null!=R[Q]&&N(j.get(R[Q]),ue,ce+Wa($/2),E,Za(0,se-$),fe)):N(X,ue,ce+Wa($/2),E,Za(0,se-$),fe),O(e,t,Q,ue-$/2,ce,E+$,se)),0!=M&&(F*M==1?(le=ce,ce=Z):(ce=le,le=Z),N(ee,ue-$/2,ce,E+$,Za(0,se=le-ce),0))}}return $>0&&(K.stroke=I?U:X),K.fill=I?j:X,K}))}},$c.spline=function(e){return function(e,t){var n=ja(null===t||void 0===t?void 0:t.alignGaps,0);return function(t,r,i,o){return Jl(t,r,(function(a,u,l,c,s,f,d,h,p,v,m){var y,g,_,b=a.pxRound,D=function(e){return b(f(e,c,v,h))},w=function(e){return b(d(e,s,m,p))};0==c.ori?(y=ic,_=ac,g=dc):(y=oc,_=uc,g=hc);var x=c.dir*(0==c.ori?1:-1);i=Fa(l,i,o,1),o=Fa(l,i,o,-1);for(var k=D(u[1==x?i:o]),C=k,E=[],S=[],A=1==x?i:o;A>=i&&A<=o;A+=x)if(null!=l[A]){var F=D(u[A]);E.push(C=F),S.push(w(l[A]))}var N={stroke:e(E,S,y,_,g,b),fill:null,clip:null,band:null,gaps:null,flags:1},O=N.stroke,T=_t(Zl(t,r),2),B=T[0],M=T[1];if(null!=a.fill||0!=B){var L=N.fill=new Path2D(O),P=w(a.fillTo(t,r,a.min,a.max,B));_(L,C,P),_(L,k,P)}if(!a.spanGaps){var $,I=[];($=I).push.apply($,bt(tc(u,l,i,o,x,D,n))),N.gaps=I=a.gaps(t,r,i,o,I),N.clip=ec(I,c.ori,h,p,v,m)}return 0!=M&&(N.band=2==M?[Xl(t,r,i,o,O,-1),Xl(t,r,i,o,O,1)]:Xl(t,r,i,o,O,M)),N}))}}(_c,e)};var Ic,Rc={height:500,legend:{show:!1},cursor:{drag:{x:!0,y:!1},focus:{prox:30},points:{size:5.6,width:1.4},bind:{click:function(){return null},dblclick:function(){return null}}}},jc=function(e){return void 0===e||null===e?"":e.toLocaleString("en-US",{maximumSignificantDigits:20})},zc=function(e,t,n,r){var i,o=e.axes[n];if(r>1)return o._size||60;var a=6+((null===o||void 0===o||null===(i=o.ticks)||void 0===i?void 0:i.size)||0)+(o.gap||0),u=(null!==t&&void 0!==t?t:[]).reduce((function(e,t){return t.length>e.length?t:e}),"");return""!=u&&(a+=function(e,t){var n=document.createElement("span");n.innerText=e,n.style.cssText="position: absolute; z-index: -1; pointer-events: none; opacity: 0; font: ".concat(t),document.body.appendChild(n);var r=n.offsetWidth;return n.remove(),r}(u,e.ctx.font)),Math.ceil(a)},Uc=function(e){return function(e){for(var t=0,n=0;n>8*i&255).toString(16)).substr(-2);return r}(e)},Hc=function(e){return e.replace(/^\[\d+]/,"").replace(/{.+}/gim,"")},Vc=function(e){for(var t=e.length,n=-1/0;t--;){var r=e[t];Number.isFinite(r)&&r>n&&(n=r)}return Number.isFinite(n)?n:null},Yc=function(e){for(var t=e.length,n=1/0;t--;){var r=e[t];Number.isFinite(r)&&r2&&void 0!==arguments[2]?arguments[2]:"";return t.map((function(e){return"".concat(jc(e)," ").concat(n)}))}(e,n,t)}};return e?Number(e)%2?n:Kn(Kn({},n),{},{side:1}):{space:80}}))},Wc=function(e,t){if(null==e||null==t)return[-1,1];var n=.02*(Math.abs(t-e)||Math.abs(e)||1);return[e-n,t+n]},Qc=n(61),Gc=n.n(Qc),Jc=function(e){var t=e.u,n=e.id,r=e.unit,i=void 0===r?"":r,o=e.metrics,a=e.series,u=e.tooltipIdx,l=e.tooltipOffset,c=e.isSticky,s=e.onClose,f=re(null),d=_t(X({top:-999,left:-999}),2),h=d[0],p=d[1],v=_t(X(!1),2),y=v[0],g=v[1],_=_t(X(!1),2),b=_[0],D=_[1],w=_t(X(u.seriesIdx),2),x=w[0],k=w[1],C=_t(X(u.dataIdx),2),E=C[0],S=C[1],A=oe((function(){return t.root.querySelector(".u-wrap")}),[t]),F=oe((function(){return ir()(t,["data",x,E],0)}),[t,x,E]),N=oe((function(){return jc(F)}),[F]),O=oe((function(){return t.data[0][E]}),[t,E]),T=oe((function(){return yr()(new Date(1e3*O)).format("YYYY-MM-DD HH:mm:ss:SSS (Z)")}),[O]),B=oe((function(){var e;return Uc((null===(e=a[x])||void 0===e?void 0:e.label)||"")}),[a,x]),M=oe((function(){var e,t=((null===(e=a[x])||void 0===e?void 0:e.label)||"").replace(/{.+}/gim,"").trim();return Hc(t)}),[]),L=oe((function(){var e,t=(null===(e=o[x-1])||void 0===e?void 0:e.metric)||{},n=Object.keys(t).filter((function(e){return"__name__"!==e}));return n.map((function(e){return"".concat(e,'="').concat(t[e],'"')}))}),[o,x]),P=function(e){if(y){var t=e.clientX,n=e.clientY;p({top:n,left:t})}},$=function(){g(!1)};return te((function(){var e;if(f.current){var n=t.valToPos(F||0,(null===(e=a[x])||void 0===e?void 0:e.scale)||"1"),r=t.valToPos(O,"x"),i=f.current.getBoundingClientRect(),o=i.width,u=i.height,c=t.over.getBoundingClientRect(),s=r+o>=c.width?o+20:0,d=n+u>=c.height?u+20:0;p({top:n+l.top+10-d,left:r+l.left+10-s})}}),[t,F,O,x,l,f]),te((function(){k(u.seriesIdx),S(u.dataIdx)}),[u]),te((function(){return y&&(document.addEventListener("mousemove",P),document.addEventListener("mouseup",$)),function(){document.removeEventListener("mousemove",P),document.removeEventListener("mouseup",$)}}),[y]),!A||u.seriesIdx<0||u.dataIdx<0?null:mt.createPortal(fr("div",{className:Oi()({"vm-chart-tooltip":!0,"vm-chart-tooltip_sticky":c,"vm-chart-tooltip_moved":b}),ref:f,style:h,children:[fr("div",{className:"vm-chart-tooltip-header",children:[fr("div",{className:"vm-chart-tooltip-header__date",children:T}),c&&fr(m,{children:[fr(co,{className:"vm-chart-tooltip-header__drag",variant:"text",size:"small",startIcon:fr(Fi,{}),onMouseDown:function(e){D(!0),g(!0);var t=e.clientX,n=e.clientY;p({top:n,left:t})}}),fr(co,{className:"vm-chart-tooltip-header__close",variant:"text",size:"small",startIcon:fr(ii,{}),onClick:function(){s&&s(n)}})]})]}),fr("div",{className:"vm-chart-tooltip-data",children:[fr("div",{className:"vm-chart-tooltip-data__marker",style:{background:B}}),fr("p",{children:[M,":",fr("b",{className:"vm-chart-tooltip-data__value",children:N}),i]})]}),!!L.length&&fr("div",{className:"vm-chart-tooltip-info",children:L.map((function(e,t){return fr("div",{children:e},"".concat(e,"_").concat(t))}))})]}),A)};!function(e){e.xRange="xRange",e.yRange="yRange",e.data="data"}(Ic||(Ic={}));var Zc=function(e){var t=e.data,n=e.series,r=e.metrics,i=void 0===r?[]:r,o=e.period,a=e.yaxis,u=e.unit,l=e.setPeriod,c=e.container,s=re(null),f=_t(X(!1),2),d=f[0],p=f[1],v=_t(X({min:o.start,max:o.end}),2),m=v[0],y=v[1],g=_t(X(),2),_=g[0],b=g[1],D=yo(c),w=_t(X(!1),2),x=w[0],k=w[1],C=_t(X({seriesIdx:-1,dataIdx:-1}),2),E=C[0],S=C[1],A=_t(X({left:0,top:0}),2),F=A[0],N=A[1],O=_t(X([]),2),T=O[0],B=O[1],M=oe((function(){return"".concat(E.seriesIdx,"_").concat(E.dataIdx)}),[E]),L=ae(Gc()((function(e){var t=e.min,n=e.max;l({from:new Date(1e3*t),to:new Date(1e3*n)})}),500),[]),P=function(e){var t=e.u,n=e.min,r=e.max,i=1e3*(r-n);iAr||(t.setScale("x",{min:n,max:r}),y({min:n,max:r}),L({min:n,max:r}))},$=function(e){var t=e.target,n=e.ctrlKey,r=e.metaKey,i=e.key,o=t instanceof HTMLInputElement||t instanceof HTMLTextAreaElement;if(_&&!o){var a="+"===i||"="===i;if(("-"===i||a)&&!n&&!r){e.preventDefault();var u=(m.max-m.min)/10*(a?1:-1);P({u:_,min:m.min+u,max:m.max-u})}}},I=function(){var e="".concat(E.seriesIdx,"_").concat(E.dataIdx),t={id:e,unit:u,series:n,metrics:i,tooltipIdx:E,tooltipOffset:F};if(!T.find((function(t){return t.id===e}))){var r=JSON.parse(JSON.stringify(t));B((function(e){return[].concat(bt(e),[r])}))}},R=function(e){B((function(t){return t.filter((function(t){return t.id!==e}))}))},j=function(){return[m.min,m.max]},z=function(e){var 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;return a.limits.enable?a.limits.range[r]:Wc(t,n)},U=Kn(Kn({},Rc),{},{series:n,axes:qc([{},{scale:"1"}],u),scales:Kn({},function(){var e={x:{range:j}},t=Object.keys(a.limits.range);return(t.length?t:["1"]).forEach((function(t){e[t]={range:function(e){var n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:0,r=arguments.length>2&&void 0!==arguments[2]?arguments[2]:1;return z(e,n,r,t)}}})),e}()),width:D.width||400,plugins:[{hooks:{ready:function(e){N({left:parseFloat(e.over.style.left),top:parseFloat(e.over.style.top)}),e.over.addEventListener("mousedown",(function(t){var n=t.ctrlKey,r=t.metaKey;0===t.button&&(n||r)&&function(e){var t=e.e,n=e.factor,r=void 0===n?.85:n,i=e.u,o=e.setPanning,a=e.setPlotScale;t.preventDefault(),o(!0);var u=t.clientX,l=i.posToVal(1,"x")-i.posToVal(0,"x"),c=i.scales.x.min||0,s=i.scales.x.max||0,f=function(e){e.preventDefault();var t=l*((e.clientX-u)*r);a({u:i,min:c-t,max:s-t})};document.addEventListener("mousemove",f),document.addEventListener("mouseup",(function e(){o(!1),document.removeEventListener("mousemove",f),document.removeEventListener("mouseup",e)}))}({u:e,e:t,setPanning:p,setPlotScale:P,factor:.9})})),e.over.addEventListener("wheel",(function(t){if(t.ctrlKey||t.metaKey){t.preventDefault();var n=e.over.getBoundingClientRect().width,r=e.cursor.left&&e.cursor.left>0?e.cursor.left:0,i=e.posToVal(r,"x"),o=(e.scales.x.max||0)-(e.scales.x.min||0),a=t.deltaY<0?.9*o:o/.9,u=i-r/n*a,l=u+a;e.batch((function(){return P({u:e,min:u,max:l})}))}}))},setCursor:function(e){var t,n=null!==(t=e.cursor.idx)&&void 0!==t?t:-1;S((function(e){return Kn(Kn({},e),{},{dataIdx:n})}))},setSeries:function(e,t){var n=null!==t&&void 0!==t?t:-1;S((function(e){return Kn(Kn({},e),{},{seriesIdx:n})}))}}}],hooks:{setSelect:[function(e){var t=e.posToVal(e.select.left,"x"),n=e.posToVal(e.select.left+e.select.width,"x");P({u:e,min:t,max:n})}]}}),H=function(e){if(_){switch(e){case Ic.xRange:_.scales.x.range=j;break;case Ic.yRange:Object.keys(a.limits.range).forEach((function(e){_.scales[e]&&(_.scales[e].range=function(t){var n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:0,r=arguments.length>2&&void 0!==arguments[2]?arguments[2]:1;return z(t,n,r,e)})}));break;case Ic.data:_.setData(t)}d||_.redraw()}};return te((function(){return y({min:o.start,max:o.end})}),[o]),te((function(){if(B([]),S({seriesIdx:-1,dataIdx:-1}),s.current){var e=new Pc(U,t,s.current);return b(e),y({min:o.start,max:o.end}),e.destroy}}),[s.current,n,D]),te((function(){return window.addEventListener("keydown",$),function(){window.removeEventListener("keydown",$)}}),[m]),te((function(){return H(Ic.data)}),[t]),te((function(){return H(Ic.xRange)}),[m]),te((function(){return H(Ic.yRange)}),[a]),te((function(){var e=-1!==E.dataIdx&&-1!==E.seriesIdx;return k(e),e&&window.addEventListener("click",I),function(){window.removeEventListener("click",I)}}),[E,T]),fr("div",{className:Oi()({"vm-line-chart":!0,"vm-line-chart_panning":d}),children:[fr("div",{className:"vm-line-chart__u-plot",ref:s}),_&&x&&fr(Jc,{unit:u,u:_,series:n,metrics:i,tooltipIdx:E,tooltipOffset:F,id:M}),_&&T.map((function(e){return h(Jc,Kn(Kn({},e),{},{isSticky:!0,u:_,key:e.id,onClose:R}))}))]})};function Kc(){Kc=function(){return e};var e={},t=Object.prototype,n=t.hasOwnProperty,r=Object.defineProperty||function(e,t,n){e[t]=n.value},i="function"==typeof Symbol?Symbol:{},o=i.iterator||"@@iterator",a=i.asyncIterator||"@@asyncIterator",u=i.toStringTag||"@@toStringTag";function l(e,t,n){return Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}),e[t]}try{l({},"")}catch(A){l=function(e,t,n){return e[t]=n}}function c(e,t,n,i){var o=t&&t.prototype instanceof d?t:d,a=Object.create(o.prototype),u=new C(i||[]);return r(a,"_invoke",{value:D(e,n,u)}),a}function s(e,t,n){try{return{type:"normal",arg:e.call(t,n)}}catch(A){return{type:"throw",arg:A}}}e.wrap=c;var f={};function d(){}function h(){}function p(){}var v={};l(v,o,(function(){return this}));var m=Object.getPrototypeOf,y=m&&m(m(E([])));y&&y!==t&&n.call(y,o)&&(v=y);var g=p.prototype=d.prototype=Object.create(v);function _(e){["next","throw","return"].forEach((function(t){l(e,t,(function(e){return this._invoke(t,e)}))}))}function b(e,t){function i(r,o,a,u){var l=s(e[r],e,o);if("throw"!==l.type){var c=l.arg,f=c.value;return f&&"object"==At(f)&&n.call(f,"__await")?t.resolve(f.__await).then((function(e){i("next",e,a,u)}),(function(e){i("throw",e,a,u)})):t.resolve(f).then((function(e){c.value=e,a(c)}),(function(e){return i("throw",e,a,u)}))}u(l.arg)}var o;r(this,"_invoke",{value:function(e,n){function r(){return new t((function(t,r){i(e,n,t,r)}))}return o=o?o.then(r,r):r()}})}function D(e,t,n){var r="suspendedStart";return function(i,o){if("executing"===r)throw new Error("Generator is already running");if("completed"===r){if("throw"===i)throw o;return S()}for(n.method=i,n.arg=o;;){var a=n.delegate;if(a){var u=w(a,n);if(u){if(u===f)continue;return u}}if("next"===n.method)n.sent=n._sent=n.arg;else if("throw"===n.method){if("suspendedStart"===r)throw r="completed",n.arg;n.dispatchException(n.arg)}else"return"===n.method&&n.abrupt("return",n.arg);r="executing";var l=s(e,t,n);if("normal"===l.type){if(r=n.done?"completed":"suspendedYield",l.arg===f)continue;return{value:l.arg,done:n.done}}"throw"===l.type&&(r="completed",n.method="throw",n.arg=l.arg)}}}function w(e,t){var n=e.iterator[t.method];if(void 0===n){if(t.delegate=null,"throw"===t.method){if(e.iterator.return&&(t.method="return",t.arg=void 0,w(e,t),"throw"===t.method))return f;t.method="throw",t.arg=new TypeError("The iterator does not provide a 'throw' method")}return f}var r=s(n,e.iterator,t.arg);if("throw"===r.type)return t.method="throw",t.arg=r.arg,t.delegate=null,f;var i=r.arg;return i?i.done?(t[e.resultName]=i.value,t.next=e.nextLoc,"return"!==t.method&&(t.method="next",t.arg=void 0),t.delegate=null,f):i:(t.method="throw",t.arg=new TypeError("iterator result is not an object"),t.delegate=null,f)}function x(e){var t={tryLoc:e[0]};1 in e&&(t.catchLoc=e[1]),2 in e&&(t.finallyLoc=e[2],t.afterLoc=e[3]),this.tryEntries.push(t)}function k(e){var t=e.completion||{};t.type="normal",delete t.arg,e.completion=t}function C(e){this.tryEntries=[{tryLoc:"root"}],e.forEach(x,this),this.reset(!0)}function E(e){if(e){var t=e[o];if(t)return t.call(e);if("function"==typeof e.next)return e;if(!isNaN(e.length)){var r=-1,i=function t(){for(;++r=0;--i){var o=this.tryEntries[i],a=o.completion;if("root"===o.tryLoc)return r("end");if(o.tryLoc<=this.prev){var u=n.call(o,"catchLoc"),l=n.call(o,"finallyLoc");if(u&&l){if(this.prev=0;--r){var i=this.tryEntries[r];if(i.tryLoc<=this.prev&&n.call(i,"finallyLoc")&&this.prev=0;--t){var n=this.tryEntries[t];if(n.finallyLoc===e)return this.complete(n.completion,n.afterLoc),k(n),f}},catch:function(e){for(var t=this.tryEntries.length-1;t>=0;--t){var n=this.tryEntries[t];if(n.tryLoc===e){var r=n.completion;if("throw"===r.type){var i=r.arg;k(n)}return i}}throw new Error("illegal catch attempt")},delegateYield:function(e,t,n){return this.delegate={iterator:E(e),resultName:t,nextLoc:n},"next"===this.method&&(this.arg=void 0),f}},e}function Xc(e,t,n,r,i,o,a){try{var u=e[o](a),l=u.value}catch(c){return void n(c)}u.done?t(l):Promise.resolve(l).then(r,i)}function es(e){return function(){var t=this,n=arguments;return new Promise((function(r,i){var o=e.apply(t,n);function a(e){Xc(o,r,i,a,u,"next",e)}function u(e){Xc(o,r,i,a,u,"throw",e)}a(void 0)}))}}var ts=function(e){var t=e.legend,n=e.onChange,r=_t(X(""),2),i=r[0],o=r[1],a=oe((function(){return function(e){var t=Object.keys(e.freeFormFields).filter((function(e){return"__name__"!==e}));return t.map((function(t){var n="".concat(t,'="').concat(e.freeFormFields[t],'"');return{id:"".concat(e.label,".").concat(n),freeField:n,key:t}}))}(t)}),[t]),u=function(){var e=es(Kc().mark((function e(t,n){return Kc().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,navigator.clipboard.writeText(t);case 2:o(n),setTimeout((function(){return o("")}),2e3);case 4:case"end":return e.stop()}}),e)})));return function(t,n){return e.apply(this,arguments)}}();return fr("div",{className:Oi()({"vm-legend-item":!0,"vm-legend-item_hide":!t.checked}),onClick:function(e){return function(t){n(e,t.ctrlKey||t.metaKey)}}(t),children:[fr("div",{className:"vm-legend-item__marker",style:{backgroundColor:t.color}}),fr("div",{className:"vm-legend-item-info",children:[fr("span",{className:"vm-legend-item-info__label",children:Hc(t.label)}),"\xa0{",a.map((function(e){return fr(ho,{open:i===e.id,title:"Copied!",placement:"top-center",children:fr("span",{className:"vm-legend-item-info__free-fields",onClick:(t=e.freeField,n=e.id,function(e){e.stopPropagation(),u(t,n)}),children:e.freeField},e.key)},e.id);var t,n})),"}"]})]})},ns=function(e){var t=e.labels,n=e.query,r=e.onChange,i=oe((function(){return Array.from(new Set(t.map((function(e){return e.group}))))}),[t]);return fr(m,{children:fr("div",{className:"vm-legend",children:i.map((function(e){return fr("div",{className:"vm-legend-group",children:[fr("div",{className:"vm-legend-group-title",children:[fr("span",{className:"vm-legend-group-title__count",children:["Query ",e,": "]}),fr("span",{className:"vm-legend-group-title__query",children:n[e-1]})]}),fr("div",{children:t.filter((function(t){return t.group===e})).map((function(e){return fr(ts,{legend:e,onChange:r},e.label)}))})]},e)}))})})};function rs(e,t){if(null==e)return{};var n,r,i=function(e,t){if(null==e)return{};var n,r,i={},o=Object.keys(e);for(r=0;r=0||(i[n]=e[n]);return i}(e,t);if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(e);for(r=0;r=0||Object.prototype.propertyIsEnumerable.call(e,n)&&(i[n]=e[n])}return i}var is=["__name__"],os=function(e,t,n){var r=function(e,t){var n=e.metric,r=n.__name__,i=rs(n,is),o=t||r||"";return 0===Object.keys(e.metric).length?o||"Result ".concat(e.group):"".concat(o," {").concat(Object.entries(i).map((function(e){return"".concat(e[0],": ").concat(e[1])})).join(", "),"}")}(e,n[e.group-1]),i="[".concat(e.group,"]").concat(r);return{label:i,freeFormFields:e.metric,width:1.4,stroke:Uc(i),show:!us(i,t),scale:"1",points:{size:4.2,width:1.4}}},as=function(e,t){return{group:t,label:e.label||"",color:e.stroke,checked:e.show||!1,freeFormFields:e.freeFormFields}},us=function(e,t){return t.includes("".concat(e))},ls=function(e){switch(e){case"NaN":return NaN;case"Inf":case"+Inf":return 1/0;case"-Inf":return-1/0;default:return parseFloat(e)}},cs=function(e){var t=e.data,n=void 0===t?[]:t,r=e.period,i=e.customStep,o=e.query,a=e.yaxis,u=e.unit,l=e.showLegend,c=void 0===l||l,s=e.setYaxisLimits,f=e.setPeriod,d=e.alias,h=void 0===d?[]:d,p=e.fullWidth,v=void 0===p||p,m=oe((function(){return i||r.step||1}),[r.step,i]),y=_t(X([[]]),2),g=y[0],_=y[1],b=_t(X([]),2),D=b[0],w=b[1],x=_t(X([]),2),k=x[0],C=x[1],E=_t(X([]),2),S=E[0],A=E[1],F=function(e){var t=function(e){var t={},n=Object.values(e).flat(),r=Yc(n),i=Vc(n);return t[1]=Wc(r,i),t}(e);s(t)};te((function(){var e=[],t={},i=[],o=[{}];null===n||void 0===n||n.forEach((function(n){var r=os(n,S,h);o.push(r),i.push(as(r,n.group));var a,u=t[n.group]||[],l=Uo(n.values);try{for(l.s();!(a=l.n()).done;){var c=a.value;e.push(c[0]),u.push(ls(c[1]))}}catch(s){l.e(s)}finally{l.f()}t[n.group]=u}));var a=function(e,t,n){for(var r=Array.from(new Set(e)).sort((function(e,t){return e-t})),i=n.start,o=Nr(n.end+t),a=0,u=[];i<=o;){for(;a=r.length||r[a]>i)&&u.push(i)}for(;u.length<2;)u.push(i),i=Nr(i+t);return u}(e,m,r),u=n.map((function(e){var t,n=[],r=e.values,i=r.length,o=0,u=Uo(a);try{for(u.s();!(t=u.n()).done;){for(var l=t.value;o1e10*h?n.map((function(){return f})):n}));u.unshift(a),F(t),_(u),w(o),C(i)}),[n]),te((function(){var e=[],t=[{}];null===n||void 0===n||n.forEach((function(n){var r=os(n,S,h);t.push(r),e.push(as(r,n.group))})),w(t),C(e)}),[S]);var N=re(null);return fr("div",{className:Oi()({"vm-graph-view":!0,"vm-graph-view_full-width":v}),ref:N,children:[(null===N||void 0===N?void 0:N.current)&&fr(Zc,{data:g,series:D,metrics:n,period:r,yaxis:a,unit:u,setPeriod:f,container:null===N||void 0===N?void 0:N.current}),c&&fr(ns,{labels:k,query:o,onChange:function(e,t){A(function(e){var t=e.hideSeries,n=e.legend,r=e.metaKey,i=e.series,o=n.label,a=us(o,t),u=i.map((function(e){return e.label||""}));return r?a?t.filter((function(e){return e!==o})):[].concat(bt(t),[o]):t.length?a?bt(u.filter((function(e){return e!==o}))):[]:bt(u.filter((function(e){return e!==o})))}({hideSeries:S,legend:e,metaKey:t,series:D}))}})]})},ss=function(e){var t=e.value,n=e.onChange,r=e.onEnter,i=e.onArrowUp,o=e.onArrowDown,a=e.autocomplete,u=e.error,l=e.options,s=e.label,f=e.disabled,d=void 0!==f&&f,h=_t(X(-1),2),p=h[0],v=h[1],m=_t(X(!1),2),y=m[0],g=m[1],_=re(null),b=re(null),D=oe((function(){if(!y)return[];try{var e=new RegExp(String(t),"i");return l.filter((function(n){return e.test(n)&&n!==t})).sort((function(t,n){var r,i;return((null===(r=t.match(e))||void 0===r?void 0:r.index)||0)-((null===(i=n.match(e))||void 0===i?void 0:i.index)||0)}))}catch(c){return[]}}),[y,l,t]),w=function(){g(!1)},x=function(e){return function(){d||(n(e),w())}};return te((function(){if(a&&D.length){v(-1);var e=(t.match(/[a-zA-Z_:.][a-zA-Z0-9_:.]*/gm)||[]).length;g(a&&t.length>2&&e<=1)}}),[a,t,D]),te((function(){if(b.current){var e=b.current.childNodes[p];null!==e&&void 0!==e&&e.scrollIntoView&&e.scrollIntoView({block:"center"})}}),[p]),so(_,w,b),fr("div",{className:"vm-query-editor",ref:_,children:[fr(Fo,{value:t,label:s,type:"textarea",autofocus:!!t,error:u,onKeyDown:function(e){var t=e.key,a=e.ctrlKey,u=e.metaKey,l=e.shiftKey,c=a||u,s="ArrowUp"===t,f="ArrowDown"===t,h="Enter"===t,m="Escape"===t,g=y&&D.length,_=D[p],b=s||f;if((b&&g||b&&c||h&&g)&&e.preventDefault(),s&&g&&!c?v((function(e){return 0===e?0:e-1})):s&&c&&i(),f&&g&&!c?v((function(e){return e>=D.length-1?D.length-1:e+1})):f&&c&&o(),_&&h&&g&&!l&&!c){if(d)return;n(_),w()}else h&&!l&&(r(),w());m&&y&&w()},onChange:n,disabled:d}),fr(fo,{open:y,buttonRef:_,placement:"bottom-left",onClose:w,children:fr("div",{className:"vm-query-editor-autocomplete",ref:b,children:D.map((function(e,t){return fr("div",{className:Oi()({"vm-list__item":!0,"vm-list__item_active":t===p}),id:"$autocomplete$".concat(e),onClick:x(e),children:e},e)}))})})]})},fs=n(936),ds=n.n(fs),hs=function(e){var t=e.defaultStep,n=e.setStep,r=_t(X(t),2),i=r[0],o=r[1],a=_t(X(""),2),u=a[0],l=a[1],c=ae(ds()((function(e){return n(e||1)}),700),[]),s=function(e){e>0?(o(e),c(e),l("")):l("step is out of allowed range")};return te((function(){t&&s(t)}),[t]),fr(Fo,{label:"Step value",type:"number",value:i,error:u,onChange:function(e){var t=+e;t&&s(t)},endIcon:fr(ho,{title:"Reset step to default",children:fr(co,{variant:"text",size:"small",startIcon:fr(oi,{}),onClick:function(){s(t||1)}})})})},ps=function(){var e=Xn().serverURL,t=hr().tenantId,n=pr(),r=Qr(),i=_t(X(t||0),2),o=i[0],a=i[1],u=ae(ds()((function(t){var i=Number(t);if(n({type:"SET_TENANT_ID",payload:i}),e){var o=e.replace(/(\/select\/)([\d]+)(\/prometheus)/gim,"$1".concat(i,"$3"));n({type:"SET_SERVER",payload:o}),r({type:"RUN_QUERY"})}}),700),[]);return te((function(){o!==t&&a(t)}),[t]),fr(Fo,{label:"Tenant ID",type:"number",value:o,onChange:function(e){a(e),u(e)},endIcon:fr(ho,{title:"Define tenant id if you need request to another storage",children:fr(co,{variant:"text",size:"small",startIcon:fr(ai,{})})})})},vs=function(e){var t,n=e.value,r=void 0!==n&&n,i=e.disabled,o=void 0!==i&&i,a=e.label,u=e.color,l=void 0===u?"secondary":u,c=e.onChange;return fr("div",{className:Oi()((qn(t={"vm-switch":!0,"vm-switch_disabled":o,"vm-switch_active":r},"vm-switch_".concat(l,"_active"),r),qn(t,"vm-switch_".concat(l),l),t)),onClick:function(){o||c(!r)},children:[fr("div",{className:"vm-switch-track",children:fr("div",{className:"vm-switch-track__thumb"})}),a&&fr("span",{className:"vm-switch__label",children:a})]})},ms=function(){var e=Wi(),t=Xn().inputTenantID,n=ei().autocomplete,r=ti(),i=Ui(),o=i.nocache,a=i.isTracingEnabled,u=Hi(),l=Wr().period.step;return fr("div",{className:"vm-additional-settings",children:[fr(vs,{label:"Autocomplete",value:n,onChange:function(){r({type:"TOGGLE_AUTOCOMPLETE"})}}),fr(vs,{label:"Disable cache",value:o,onChange:function(){u({type:"TOGGLE_NO_CACHE"})}}),fr(vs,{label:"Trace query",value:a,onChange:function(){u({type:"TOGGLE_QUERY_TRACING"})}}),fr("div",{className:"vm-additional-settings__input",children:fr(hs,{defaultStep:l,setStep:function(t){e({type:"SET_CUSTOM_STEP",payload:t})}})}),!!t&&fr("div",{className:"vm-additional-settings__input",children:fr(ps,{})})]})};var ys=function(e){var t=re();return te((function(){t.current=e}),[e]),t.current},gs=function(e){var t=e.error,n=e.queryOptions,r=e.onHideQuery,i=ei(),o=i.query,a=i.queryHistory,u=i.autocomplete,l=ti(),c=Qr(),s=_t(X(o||[]),2),f=s[0],d=s[1],h=_t(X([]),2),p=h[0],v=h[1],m=ys(f),y=function(){l({type:"SET_QUERY_HISTORY",payload:f.map((function(e,t){var n=a[t]||{values:[]},r=e===n.values[n.values.length-1];return{index:n.values.length-Number(r),values:!r&&e?[].concat(bt(n.values),[e]):n.values}}))}),l({type:"SET_QUERY",payload:f}),c({type:"RUN_QUERY"})},g=function(e,t){d((function(n){return n.map((function(n,r){return r===t?e:n}))}))},_=function(e,t){return function(){!function(e,t){var n=a[t],r=n.index,i=n.values,o=r+e;o<0||o>=i.length||(g(i[o]||"",t),l({type:"SET_QUERY_HISTORY_BY_INDEX",payload:{value:{values:i,index:o},queryNumber:t}}))}(e,t)}},b=function(e){return function(t){g(t,e)}},D=function(e){return function(){var t;t=e,d((function(e){return e.filter((function(e,n){return n!==t}))})),v((function(t){return t.map((function(t){return t>e?t-1:t}))}))}},w=function(e){return function(){var t;t=e,v((function(e){return e.includes(t)?e.filter((function(e){return e!==t})):[].concat(bt(e),[t])}))}};return te((function(){m&&f.length1&&fr(ho,{title:"Remove Query",children:fr("div",{className:"vm-query-configurator-list-row__button",children:fr(co,{variant:"text",color:"error",startIcon:fr(xi,{}),onClick:D(r)})})})]},r)}))}),fr("div",{className:"vm-query-configurator-settings",children:[fr(ms,{}),fr("div",{className:"vm-query-configurator-settings__buttons",children:[f.length<4&&fr(co,{variant:"outlined",onClick:function(){d((function(e){return[].concat(bt(e),[""])}))},startIcon:fr(ki,{}),children:"Add Query"}),fr(co,{variant:"contained",onClick:y,startIcon:fr(gi,{}),children:"Execute Query"})]})]})]})};function _s(e){var t,n,r,i=2;for("undefined"!=typeof Symbol&&(n=Symbol.asyncIterator,r=Symbol.iterator);i--;){if(n&&null!=(t=e[n]))return t.call(e);if(r&&null!=(t=e[r]))return new bs(t.call(e));n="@@asyncIterator",r="@@iterator"}throw new TypeError("Object is not async iterable")}function bs(e){function t(e){if(Object(e)!==e)return Promise.reject(new TypeError(e+" is not an object."));var t=e.done;return Promise.resolve(e.value).then((function(e){return{value:e,done:t}}))}return bs=function(e){this.s=e,this.n=e.next},bs.prototype={s:null,n:null,next:function(){return t(this.n.apply(this.s,arguments))},return:function(e){var n=this.s.return;return void 0===n?Promise.resolve({value:e,done:!0}):t(n.apply(this.s,arguments))},throw:function(e){var n=this.s.return;return void 0===n?Promise.reject(e):t(n.apply(this.s,arguments))}},new bs(e)}var Ds=0,ws=function(){function e(t,n){Dt(this,e),this.tracing=void 0,this.query=void 0,this.tracingChildren=void 0,this.originalTracing=void 0,this.id=void 0,this.tracing=t,this.originalTracing=JSON.parse(JSON.stringify(t)),this.query=n,this.id=Ds++;var r=t.children||[];this.tracingChildren=r.map((function(t){return new e(t,n)}))}return xt(e,[{key:"queryValue",get:function(){return this.query}},{key:"idValue",get:function(){return this.id}},{key:"children",get:function(){return this.tracingChildren}},{key:"message",get:function(){return this.tracing.message}},{key:"duration",get:function(){return this.tracing.duration_msec}},{key:"JSON",get:function(){return JSON.stringify(this.tracing,null,2)}},{key:"originalJSON",get:function(){return JSON.stringify(this.originalTracing,null,2)}},{key:"setTracing",value:function(t){var n=this;this.tracing=t;var r=t.children||[];this.tracingChildren=r.map((function(t){return new e(t,n.query)}))}},{key:"setQuery",value:function(e){this.query=e}},{key:"resetTracing",value:function(){this.tracing=this.originalTracing}}]),e}(),xs=function(e){var t=e.predefinedQuery,n=e.visible,r=e.display,i=e.customStep,o=e.hideQuery,a=ei().query,u=Wr().period,l=Ui(),c=l.displayType,s=l.nocache,f=l.isTracingEnabled,d=hr().serverUrl,h=_t(X(!1),2),p=h[0],v=h[1],m=_t(X(),2),y=m[0],g=m[1],_=_t(X(),2),b=_[0],D=_[1],w=_t(X(),2),x=w[0],k=w[1],C=_t(X(),2),E=C[0],S=C[1],A=_t(X(),2),F=A[0],N=A[1],O=_t(X([]),2),T=O[0],B=O[1];te((function(){E&&(g(void 0),D(void 0),k(void 0))}),[E]);var M=function(){var e=es(Kc().mark((function e(t,n,r,i){var o,a,u,l,c,s;return Kc().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return o=new AbortController,B([].concat(bt(n),[o])),e.prev=2,e.delegateYield(Kc().mark((function e(){var n,f,d,h,p,v,m,y,_,b,w,x;return Kc().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:n="chart"===r,f=or[r],d=[],h=[],p=1,v=0,a=!1,u=!1,e.prev=8,c=_s(t);case 10:return e.next=12,c.next();case 12:if(!(a=!(s=e.sent).done)){e.next=24;break}return m=s.value,e.next=16,fetch(m,{signal:o.signal});case 16:return y=e.sent,e.next=19,y.json();case 19:_=e.sent,y.ok?(S(void 0),_.trace&&(b=new ws(_.trace,i[p-1]),h.push(b)),w=f-d.length,_.data.result.slice(0,w).forEach((function(e){e.group=p,d.push(e)})),v+=_.data.result.length,p++):S("".concat(_.errorType,"\r\n").concat(null===_||void 0===_?void 0:_.error));case 21:a=!1,e.next=10;break;case 24:e.next=30;break;case 26:e.prev=26,e.t0=e.catch(8),u=!0,l=e.t0;case 30:if(e.prev=30,e.prev=31,!a||null==c.return){e.next=35;break}return e.next=35,c.return();case 35:if(e.prev=35,!u){e.next=38;break}throw l;case 38:return e.finish(35);case 39:return e.finish(30);case 40:x="Showing ".concat(f," series out of ").concat(v," series due to performance reasons. Please narrow down the query, so it returns less series"),N(v>f?x:""),n?g(d):D(d),k(h);case 44:case"end":return e.stop()}}),e,null,[[8,26,30,40],[31,,35,39]])}))(),"t0",4);case 4:e.next=9;break;case 6:e.prev=6,e.t1=e.catch(2),e.t1 instanceof Error&&"AbortError"!==e.t1.name&&S("".concat(e.t1.name,": ").concat(e.t1.message));case 9:v(!1);case 10:case"end":return e.stop()}}),e,null,[[2,6]])})));return function(t,n,r,i){return e.apply(this,arguments)}}(),L=ae(ds()(M,800),[]),P=function(e,t){var n=e.trim(),r=!o||!o.includes(t);return n&&r},$=oe((function(){var e=null!==t&&void 0!==t?t:a,n="chart"===(r||c);if(u)if(d)if(e.every((function(e){return!e.trim()})))S(wo.validQuery);else{if(No(d)){var o=Kn({},u);return o.step=i,e.filter(P).map((function(e){return n?function(e,t,n,r,i){return"".concat(e,"/api/v1/query_range?query=").concat(encodeURIComponent(t),"&start=").concat(n.start,"&end=").concat(n.end,"&step=").concat(n.step).concat(r?"&nocache=1":"").concat(i?"&trace=1":"")}(d,e,o,s,f):function(e,t,n,r){return"".concat(e,"/api/v1/query?query=").concat(encodeURIComponent(t),"&time=").concat(n.end,"&step=").concat(n.step).concat(r?"&trace=1":"")}(d,e,o,f)}))}S(wo.validServer)}else S(wo.emptyServer)}),[d,u,c,i,o]);return te((function(){n&&null!==$&&void 0!==$&&$.length&&(v(!0),L($,T,r||c,null!==t&&void 0!==t?t:a))}),[$,n]),te((function(){var e=T.slice(0,-1);e.length&&(e.map((function(e){return e.abort()})),B(T.filter((function(e){return!e.signal.aborted}))))}),[T]),{fetchUrl:$,isLoading:p,graphData:y,liveData:b,error:E,warning:F,traces:x}},ks=function(e){var t=e.data,n=uo().showInfoMessage,r=oe((function(){return JSON.stringify(t,null,2)}),[t]);return fr("div",{className:"vm-json-view",children:[fr("div",{className:"vm-json-view__copy",children:fr(co,{variant:"outlined",onClick:function(){navigator.clipboard.writeText(r),n({text:"Formatted JSON has been copied",type:"success"})},children:"Copy JSON"})}),fr("pre",{className:"vm-json-view__code",children:fr("code",{children:r})})]})},Cs=function(e){var t=e.yaxis,n=e.setYaxisLimits,r=e.toggleEnableLimits,i=oe((function(){return Object.keys(t.limits.range)}),[t.limits.range]),o=ae(ds()((function(e,r,i){var o=t.limits.range;o[r][i]=+e,o[r][0]===o[r][1]||o[r][0]>o[r][1]||n(o)}),500),[t.limits.range]),a=function(e,t){return function(n){o(n,e,t)}};return fr("div",{className:"vm-axes-limits",children:[fr(vs,{value:t.limits.enable,onChange:r,label:"Fix the limits for y-axis"}),fr("div",{className:"vm-axes-limits-list",children:i.map((function(e){return fr("div",{className:"vm-axes-limits-list__inputs",children:[fr(Fo,{label:"Min ".concat(e),type:"number",disabled:!t.limits.enable,value:t.limits.range[e][0],onChange:a(e,0)}),fr(Fo,{label:"Max ".concat(e),type:"number",disabled:!t.limits.enable,value:t.limits.range[e][1],onChange:a(e,1)})]},e)}))})]})},Es="Axes settings",Ss=function(e){var t=e.yaxis,n=e.setYaxisLimits,r=e.toggleEnableLimits,i=re(null),o=_t(X(!1),2),a=o[0],u=o[1],l=re(null);so(i,(function(){return u(!1)}),l);var c=function(){u(!1)};return fr("div",{className:"vm-graph-settings",children:[fr(ho,{title:Es,children:fr("div",{ref:l,children:fr(co,{variant:"text",startIcon:fr(ri,{}),onClick:function(){u((function(e){return!e}))}})})}),fr(fo,{open:a,buttonRef:l,placement:"bottom-right",onClose:c,children:fr("div",{className:"vm-graph-settings-popper",ref:i,children:[fr("div",{className:"vm-popper-header",children:[fr("h3",{className:"vm-popper-header__title",children:Es}),fr(co,{size:"small",startIcon:fr(ii,{}),onClick:c})]}),fr("div",{className:"vm-graph-settings-popper__body",children:fr(Cs,{yaxis:t,setYaxisLimits:n,toggleEnableLimits:r})})]})})]})},As=function(e){var t=e.containerStyles,n=void 0===t?{}:t,r=e.message;return fr("div",{className:"vm-spinner",style:n&&{},children:[fr("div",{className:"half-circle-spinner",children:[fr("div",{className:"circle circle-1"}),fr("div",{className:"circle circle-2"})]}),r&&fr("div",{className:"vm-spinner__message",children:r})]})},Fs=function(){var e=hr().serverUrl,t=_t(X([]),2),n=t[0],r=t[1],i=function(){var t=es(Kc().mark((function t(){var n,i,o;return Kc().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:if(e){t.next=2;break}return t.abrupt("return");case 2:return n="".concat(e,"/api/v1/label/__name__/values"),t.prev=3,t.next=6,fetch(n);case 6:return i=t.sent,t.next=9,i.json();case 9:o=t.sent,i.ok&&r(o.data),t.next=16;break;case 13:t.prev=13,t.t0=t.catch(3),console.error(t.t0);case 16:case"end":return t.stop()}}),t,null,[[3,13]])})));return function(){return t.apply(this,arguments)}}();return te((function(){i()}),[e]),{queryOptions:n}},Ns=function(e){var t=e.value;return fr("div",{className:"vm-line-progress",children:[fr("div",{className:"vm-line-progress-track",children:fr("div",{className:"vm-line-progress-track__thumb",style:{width:"".concat(t,"%")}})}),fr("span",{children:[t.toFixed(2),"%"]})]})},Os=function e(t){var n,r=t.trace,i=t.totalMsec,o=_t(X({}),2),a=o[0],u=o[1],l=r.children&&!!r.children.length,c=r.duration/i*100;return fr("div",{className:"vm-nested-nav",children:[fr("div",{className:"vm-nested-nav-header",onClick:(n=r.idValue,function(){u((function(e){return Kn(Kn({},e),{},qn({},n,!e[n]))}))}),children:[l&&fr("div",{className:Oi()({"vm-nested-nav-header__icon":!0,"vm-nested-nav-header__icon_open":a[r.idValue]}),children:fr(di,{})}),fr("div",{className:"vm-nested-nav-header__progress",children:fr(Ns,{value:c})}),fr("div",{className:"vm-nested-nav-header__message",children:r.message}),fr("div",{className:"vm-nested-nav-header__duration",children:"duration: ".concat(r.duration," ms")})]}),a[r.idValue]&&fr("div",{children:l&&r.children.map((function(t){return fr(e,{trace:t,totalMsec:i},t.duration)}))})]})},Ts=function(e){var t=e.editable,n=void 0!==t&&t,r=e.defaultTile,i=void 0===r?"JSON":r,o=e.displayTitle,a=void 0===o||o,u=e.defaultJson,l=void 0===u?"":u,s=e.resetValue,f=void 0===s?"":s,d=e.onClose,h=e.onUpload,p=uo().showInfoMessage,v=_t(X(l),2),m=v[0],y=v[1],g=_t(X(i),2),_=g[0],b=g[1],D=_t(X(""),2),w=D[0],x=D[1],k=_t(X(""),2),C=k[0],E=k[1],S=oe((function(){try{var e=JSON.parse(m),t=e.trace||e;return t.duration_msec?(new ws(t,""),""):wo.traceNotFound}catch(c){return c instanceof Error?c.message:"Unknown error"}}),[m]),A=function(){var e=es(Kc().mark((function e(){return Kc().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,navigator.clipboard.writeText(m);case 2:p({text:"Formatted JSON has been copied",type:"success"});case 3:case"end":return e.stop()}}),e)})));return function(){return e.apply(this,arguments)}}(),F=function(){E(S),_.trim()||x(wo.emptyTitle),S||w||(h(m,_),d())};return fr("div",{className:Oi()({"vm-json-form":!0,"vm-json-form_one-field":!a}),children:[a&&fr(Fo,{value:_,label:"Title",error:w,onEnter:F,onChange:function(e){b(e)}}),fr(Fo,{value:m,label:"JSON",type:"textarea",error:C,autofocus:!0,onChange:function(e){E(""),y(e)},disabled:!n}),fr("div",{className:"vm-json-form-footer",children:[fr("div",{className:"vm-json-form-footer__controls",children:[fr(co,{variant:"outlined",startIcon:fr(Ai,{}),onClick:A,children:"Copy JSON"}),f&&fr(co,{variant:"text",startIcon:fr(oi,{}),onClick:function(){y(f)},children:"Reset JSON"})]}),fr("div",{className:"vm-json-form-footer__controls vm-json-form-footer__controls_right",children:[fr(co,{variant:"outlined",color:"error",onClick:d,children:"Cancel"}),fr(co,{variant:"contained",onClick:F,children:"apply"})]})]})]})},Bs=function(e){var t=e.traces,n=e.jsonEditor,r=void 0!==n&&n,i=e.onDeleteClick,o=_t(X(null),2),a=o[0],u=o[1],l=function(){u(null)};if(!t.length)return fr(oo,{variant:"info",children:"Please re-run the query to see results of the tracing"});var s=function(e){return function(){i(e)}};return fr(m,{children:[fr("div",{className:"vm-tracings-view",children:t.map((function(e){return fr("div",{className:"vm-tracings-view-trace vm-block vm-block_empty-padding",children:[fr("div",{className:"vm-tracings-view-trace-header",children:[fr("h3",{className:"vm-tracings-view-trace-header-title",children:["Trace for ",fr("b",{className:"vm-tracings-view-trace-header-title__query",children:e.queryValue})]}),fr(ho,{title:"Open JSON",children:fr(co,{variant:"text",startIcon:fr(wi,{}),onClick:(t=e,function(){u(t)})})}),fr(ho,{title:"Remove trace",children:fr(co,{variant:"text",color:"error",startIcon:fr(xi,{}),onClick:s(e)})})]}),fr("nav",{className:"vm-tracings-view-trace__nav",children:fr(Os,{trace:e,totalMsec:e.duration})})]},e.idValue);var t}))}),a&&fr(To,{title:a.queryValue,onClose:l,children:fr(Ts,{editable:r,displayTitle:r,defaultTile:a.queryValue,defaultJson:a.JSON,resetValue:a.originalJSON,onClose:l,onUpload:function(e,t){if(r&&a)try{a.setTracing(JSON.parse(e)),a.setQuery(t),u(null)}catch(c){console.error(c)}}})})]})},Ms=function(e,t){return oe((function(){var n={};e.forEach((function(e){return Object.entries(e.metric).forEach((function(e){return n[e[0]]?n[e[0]].options.add(e[1]):n[e[0]]={options:new Set([e[1]])}}))}));var r=Object.entries(n).map((function(e){return{key:e[0],variations:e[1].options.size}})).sort((function(e,t){return e.variations-t.variations}));return t?r.filter((function(e){return t.includes(e.key)})):r}),[e,t])},Ls=function(e){var t,n=e.checked,r=void 0!==n&&n,i=e.disabled,o=void 0!==i&&i,a=e.label,u=e.color,l=void 0===u?"secondary":u,c=e.onChange;return fr("div",{className:Oi()((qn(t={"vm-checkbox":!0,"vm-checkbox_disabled":o,"vm-checkbox_active":r},"vm-checkbox_".concat(l,"_active"),r),qn(t,"vm-checkbox_".concat(l),l),t)),onClick:function(){o||c(!r)},children:[fr("div",{className:"vm-checkbox-track",children:fr("div",{className:"vm-checkbox-track__thumb",children:fr(Ci,{})})}),a&&fr("span",{className:"vm-checkbox__label",children:a})]})},Ps="Display columns",$s=function(e){var t=e.data,n=e.defaultColumns,r=e.onChange,i=re(null),o=_t(X(!1),2),a=o[0],u=o[1],l=Ms(t),c=oe((function(){return!l.length}),[l]),s=_t(X(l.map((function(e){return e.key}))),2),f=s[0],d=s[1],h=function(){u(!1),d(n||l.map((function(e){return e.key})))},p=function(e){return function(){!function(e){d((function(t){return f.includes(e)?t.filter((function(t){return t!==e})):[].concat(bt(t),[e])}))}(e)}};return te((function(){d(l.map((function(e){return e.key})))}),[l]),fr("div",{className:"vm-table-settings",children:[fr(ho,{title:Ps,children:fr("div",{ref:i,children:fr(co,{variant:"text",startIcon:fr(ri,{}),onClick:function(){u((function(e){return!e}))},disabled:c})})}),fr(fo,{open:a,onClose:h,placement:"bottom-right",buttonRef:i,children:fr("div",{className:"vm-table-settings-popper",children:[fr("div",{className:"vm-popper-header",children:[fr("h3",{className:"vm-popper-header__title",children:Ps}),fr(co,{onClick:h,startIcon:fr(ii,{}),size:"small"})]}),fr("div",{className:"vm-table-settings-popper-list",children:l.map((function(e){return fr("div",{className:"vm-table-settings-popper-list__item",children:fr(Ls,{checked:f.includes(e.key),onChange:p(e.key),label:e.key})},e.key)}))}),fr("div",{className:"vm-table-settings-popper__footer",children:[fr(co,{color:"error",variant:"outlined",size:"small",onClick:function(){u(!1);var e=l.map((function(e){return e.key}));d(e),r(e)},children:"Reset"}),fr(co,{variant:"contained",size:"small",onClick:function(){u(!1),r(f)},children:"apply"})]})]})})]})};function Is(e){return function(e,t){return Object.fromEntries(Object.entries(e).filter(t))}(e,(function(e){return!!e[1]}))}var Rs=["__name__"],js=function(e){var t=e.data,n=e.displayColumns,r=uo().showInfoMessage,i=Ms(t,n),o=_t(X(""),2),a=o[0],u=o[1],l=_t(X("asc"),2),c=l[0],s=l[1],f=function(e){var t=e.__name__,n=rs(e,Rs);return t||Object.keys(n).length?"".concat(t," ").concat(JSON.stringify(n)):""},d=oe((function(){var e=null===t||void 0===t?void 0:t.map((function(e){return{metadata:i.map((function(t){return e.metric[t.key]||"-"})),value:e.value?e.value[1]:"-",copyValue:f(e.metric)}})),n="Value"===a,r=i.findIndex((function(e){return e.key===a}));return n||-1!==r?e.sort((function(e,t){var i=n?Number(e.value):e.metadata[r],o=n?Number(t.value):t.metadata[r];return("asc"===c?io)?-1:1})):e}),[i,t,a,c]),h=oe((function(){return d.some((function(e){return e.copyValue}))}),[d]),p=function(){var e=es(Kc().mark((function e(t){return Kc().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,navigator.clipboard.writeText(t);case 2:r({text:"Row has been copied",type:"success"});case 3:case"end":return e.stop()}}),e)})));return function(t){return e.apply(this,arguments)}}(),v=function(e){return function(){!function(e){s((function(t){return"asc"===t&&a===e?"desc":"asc"})),u(e)}(e)}};return d.length?fr("table",{className:"vm-table",children:[fr("thead",{className:"vm-table-header",children:fr("tr",{className:"vm-table__row vm-table__row_header",children:[i.map((function(e,t){return fr("td",{className:"vm-table-cell vm-table-cell_header vm-table-cell_sort",onClick:v(e.key),children:fr("div",{className:"vm-table-cell__content",children:[e.key,fr("div",{className:Oi()({"vm-table__sort-icon":!0,"vm-table__sort-icon_active":a===e.key,"vm-table__sort-icon_desc":"desc"===c&&a===e.key}),children:fr(hi,{})})]})},t)})),fr("td",{className:"vm-table-cell vm-table-cell_header vm-table-cell_right vm-table-cell_sort",onClick:v("Value"),children:fr("div",{className:"vm-table-cell__content",children:[fr("div",{className:Oi()({"vm-table__sort-icon":!0,"vm-table__sort-icon_active":"Value"===a,"vm-table__sort-icon_desc":"desc"===c}),children:fr(hi,{})}),"Value"]})}),h&&fr("td",{className:"vm-table-cell vm-table-cell_header"})]})}),fr("tbody",{className:"vm-table-body",children:d.map((function(e,t){return fr("tr",{className:"vm-table__row",children:[e.metadata.map((function(e,n){return fr("td",{className:Oi()({"vm-table-cell vm-table-cell_no-wrap":!0,"vm-table-cell_gray":d[t-1]&&d[t-1].metadata[n]===e}),children:e},n)})),fr("td",{className:"vm-table-cell vm-table-cell_right",children:e.value}),h&&fr("td",{className:"vm-table-cell vm-table-cell_right",children:e.copyValue&&fr("div",{className:"vm-table-cell__content",children:fr(ho,{title:"Copy row",children:fr(co,{variant:"text",color:"gray",size:"small",startIcon:fr(Ai,{}),onClick:(n=e.copyValue,function(){p(n)})})})})})]},t);var n}))})]}):fr(oo,{variant:"warning",children:"No data to show"})},zs=function(){var e=Ui(),t=e.displayType,n=e.isTracingEnabled,r=ei().query,i=Wr().period,o=Qr();!function(){var e=hr().tenantId,t=Ui().displayType,n=ei().query,r=Wr(),i=r.duration,o=r.relativeTime,a=r.period,u=a.date,l=a.step,c=function(){var r={};n.forEach((function(n,a){var c,s="g".concat(a);r["".concat(s,".expr")]=n,r["".concat(s,".range_input")]=i,r["".concat(s,".end_input")]=u,r["".concat(s,".step_input")]=l,r["".concat(s,".tab")]=(null===(c=Li.find((function(e){return e.value===t})))||void 0===c?void 0:c.prometheusCode)||0,r["".concat(s,".relative_time")]=o,r["".concat(s,".tenantID")]=e})),ar(Is(r))};te(c,[e,t,n,i,o,u,l]),te(c,[])}();var a=_t(X(),2),u=a[0],l=a[1],c=_t(X([]),2),s=c[0],f=c[1],d=_t(X([]),2),h=d[0],p=d[1],v=ue(qi).state,m=v.customStep,y=v.yaxis,g=Wi(),_=Fs().queryOptions,b=xs({visible:!0,customStep:m,hideQuery:h}),D=b.isLoading,w=b.liveData,x=b.graphData,k=b.error,C=b.warning,E=b.traces,S=function(e){g({type:"SET_YAXIS_LIMITS",payload:e})};return te((function(){E&&f([].concat(bt(s),bt(E)))}),[E]),te((function(){f([])}),[t]),fr("div",{className:"vm-custom-panel",children:[fr(gs,{error:k,queryOptions:_,onHideQuery:function(e){p(e)}}),n&&fr("div",{className:"vm-custom-panel__trace",children:fr(Bs,{traces:s,onDeleteClick:function(e){var t=s.filter((function(t){return t.idValue!==e.idValue}));f(bt(t))}})}),D&&fr(As,{}),k&&fr(oo,{variant:"error",children:k}),C&&fr(oo,{variant:"warning",children:C}),fr("div",{className:"vm-custom-panel-body vm-block",children:[fr("div",{className:"vm-custom-panel-body-header",children:[fr(Pi,{}),"chart"===t&&fr(Ss,{yaxis:y,setYaxisLimits:S,toggleEnableLimits:function(){g({type:"TOGGLE_ENABLE_YAXIS_LIMITS"})}}),"table"===t&&fr($s,{data:w||[],defaultColumns:u,onChange:l})]}),x&&i&&"chart"===t&&fr(cs,{data:x,period:i,customStep:m,query:r,yaxis:y,setYaxisLimits:S,setPeriod:function(e){var t=e.from,n=e.to;o({type:"SET_PERIOD",payload:{from:t,to:n}})}}),w&&"code"===t&&fr(ks,{data:w}),w&&"table"===t&&fr(js,{data:w,displayColumns:u})]})]})},Us=function(){var e=es(Kc().mark((function e(t){var n,r;return Kc().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,fetch("./dashboards/".concat(t));case 2:return n=e.sent,e.next=5,n.json();case 5:return r=e.sent,e.abrupt("return",r);case 7:case"end":return e.stop()}}),e)})));return function(t){return e.apply(this,arguments)}}(),Hs=es(Kc().mark((function e(){var t;return Kc().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return t=window.__VMUI_PREDEFINED_DASHBOARDS__,e.next=3,Promise.all(t.map(function(){var e=es(Kc().mark((function e(t){return Kc().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.abrupt("return",Us(t));case 1:case"end":return e.stop()}}),e)})));return function(t){return e.apply(this,arguments)}}()));case 3:return e.abrupt("return",e.sent);case 4:case"end":return e.stop()}}),e)})));function Vs(){return{async:!1,baseUrl:null,breaks:!1,extensions:null,gfm:!0,headerIds:!0,headerPrefix:"",highlight:null,langPrefix:"language-",mangle:!0,pedantic:!1,renderer:null,sanitize:!1,sanitizer:null,silent:!1,smartypants:!1,tokenizer:null,walkTokens:null,xhtml:!1}}var Ys={async:!1,baseUrl:null,breaks:!1,extensions:null,gfm:!0,headerIds:!0,headerPrefix:"",highlight:null,langPrefix:"language-",mangle:!0,pedantic:!1,renderer:null,sanitize:!1,sanitizer:null,silent:!1,smartypants:!1,tokenizer:null,walkTokens:null,xhtml:!1};var qs=/[&<>"']/,Ws=/[&<>"']/g,Qs=/[<>"']|&(?!#?\w+;)/,Gs=/[<>"']|&(?!#?\w+;)/g,Js={"&":"&","<":"<",">":">",'"':""","'":"'"},Zs=function(e){return Js[e]};function Ks(e,t){if(t){if(qs.test(e))return e.replace(Ws,Zs)}else if(Qs.test(e))return e.replace(Gs,Zs);return e}var Xs=/&(#(?:\d+)|(?:#x[0-9A-Fa-f]+)|(?:\w+));?/gi;function ef(e){return e.replace(Xs,(function(e,t){return"colon"===(t=t.toLowerCase())?":":"#"===t.charAt(0)?"x"===t.charAt(1)?String.fromCharCode(parseInt(t.substring(2),16)):String.fromCharCode(+t.substring(1)):""}))}var tf=/(^|[^\[])\^/g;function nf(e,t){e="string"===typeof e?e:e.source,t=t||"";var n={replace:function(t,r){return r=(r=r.source||r).replace(tf,"$1"),e=e.replace(t,r),n},getRegex:function(){return new RegExp(e,t)}};return n}var rf=/[^\w:]/g,of=/^$|^[a-z][a-z0-9+.-]*:|^[?#]/i;function af(e,t,n){if(e){var r;try{r=decodeURIComponent(ef(n)).replace(rf,"").toLowerCase()}catch(c){return null}if(0===r.indexOf("javascript:")||0===r.indexOf("vbscript:")||0===r.indexOf("data:"))return null}t&&!of.test(n)&&(n=function(e,t){uf[" "+e]||(lf.test(e)?uf[" "+e]=e+"/":uf[" "+e]=pf(e,"/",!0));var n=-1===(e=uf[" "+e]).indexOf(":");return"//"===t.substring(0,2)?n?t:e.replace(cf,"$1")+t:"/"===t.charAt(0)?n?t:e.replace(sf,"$1")+t:e+t}(t,n));try{n=encodeURI(n).replace(/%25/g,"%")}catch(c){return null}return n}var uf={},lf=/^[^:]+:\/*[^/]*$/,cf=/^([^:]+:)[\s\S]*$/,sf=/^([^:]+:\/*[^/]*)[\s\S]*$/;var ff={exec:function(){}};function df(e){for(var t,n,r=1;r=0&&"\\"===n[i];)r=!r;return r?"|":" |"})).split(/ \|/),r=0;if(n[0].trim()||n.shift(),n.length>0&&!n[n.length-1].trim()&&n.pop(),n.length>t)n.splice(t);else for(;n.length1;)1&t&&(n+=e),t>>=1,e+=e;return n+e}function yf(e,t,n,r){var i=t.href,o=t.title?Ks(t.title):null,a=e[1].replace(/\\([\[\]])/g,"$1");if("!"!==e[0].charAt(0)){r.state.inLink=!0;var u={type:"link",raw:n,href:i,title:o,text:a,tokens:r.inlineTokens(a)};return r.state.inLink=!1,u}return{type:"image",raw:n,href:i,title:o,text:Ks(a)}}var gf=function(){function e(t){Dt(this,e),this.options=t||Ys}return xt(e,[{key:"space",value:function(e){var t=this.rules.block.newline.exec(e);if(t&&t[0].length>0)return{type:"space",raw:t[0]}}},{key:"code",value:function(e){var t=this.rules.block.code.exec(e);if(t){var n=t[0].replace(/^ {1,4}/gm,"");return{type:"code",raw:t[0],codeBlockStyle:"indented",text:this.options.pedantic?n:pf(n,"\n")}}}},{key:"fences",value:function(e){var t=this.rules.block.fences.exec(e);if(t){var n=t[0],r=function(e,t){var n=e.match(/^(\s+)(?:```)/);if(null===n)return t;var r=n[1];return t.split("\n").map((function(e){var t=e.match(/^\s+/);return null===t?e:_t(t,1)[0].length>=r.length?e.slice(r.length):e})).join("\n")}(n,t[3]||"");return{type:"code",raw:n,lang:t[2]?t[2].trim().replace(this.rules.inline._escapes,"$1"):t[2],text:r}}}},{key:"heading",value:function(e){var t=this.rules.block.heading.exec(e);if(t){var n=t[2].trim();if(/#$/.test(n)){var r=pf(n,"#");this.options.pedantic?n=r.trim():r&&!/ $/.test(r)||(n=r.trim())}return{type:"heading",raw:t[0],depth:t[1].length,text:n,tokens:this.lexer.inline(n)}}}},{key:"hr",value:function(e){var t=this.rules.block.hr.exec(e);if(t)return{type:"hr",raw:t[0]}}},{key:"blockquote",value:function(e){var t=this.rules.block.blockquote.exec(e);if(t){var n=t[0].replace(/^ *>[ \t]?/gm,"");return{type:"blockquote",raw:t[0],tokens:this.lexer.blockTokens(n,[]),text:n}}}},{key:"list",value:function(e){var t=this.rules.block.list.exec(e);if(t){var n,r,i,o,a,u,l,c,s,f,d,h,p=t[1].trim(),v=p.length>1,m={type:"list",raw:"",ordered:v,start:v?+p.slice(0,-1):"",loose:!1,items:[]};p=v?"\\d{1,9}\\".concat(p.slice(-1)):"\\".concat(p),this.options.pedantic&&(p=v?p:"[*+-]");for(var y=new RegExp("^( {0,3}".concat(p,")((?:[\t ][^\\n]*)?(?:\\n|$))"));e&&(h=!1,t=y.exec(e))&&!this.rules.block.hr.test(e);){if(n=t[0],e=e.substring(n.length),c=t[2].split("\n",1)[0],s=e.split("\n",1)[0],this.options.pedantic?(o=2,d=c.trimLeft()):(o=(o=t[2].search(/[^ ]/))>4?1:o,d=c.slice(o),o+=t[1].length),u=!1,!c&&/^ *$/.test(s)&&(n+=s+"\n",e=e.substring(s.length+1),h=!0),!h)for(var g=new RegExp("^ {0,".concat(Math.min(3,o-1),"}(?:[*+-]|\\d{1,9}[.)])((?: [^\\n]*)?(?:\\n|$))")),_=new RegExp("^ {0,".concat(Math.min(3,o-1),"}((?:- *){3,}|(?:_ *){3,}|(?:\\* *){3,})(?:\\n+|$)")),b=new RegExp("^ {0,".concat(Math.min(3,o-1),"}(?:```|~~~)")),D=new RegExp("^ {0,".concat(Math.min(3,o-1),"}#"));e&&(c=f=e.split("\n",1)[0],this.options.pedantic&&(c=c.replace(/^ {1,4}(?=( {4})*[^ ])/g," ")),!b.test(c))&&!D.test(c)&&!g.test(c)&&!_.test(e);){if(c.search(/[^ ]/)>=o||!c.trim())d+="\n"+c.slice(o);else{if(u)break;d+="\n"+c}u||c.trim()||(u=!0),n+=f+"\n",e=e.substring(f.length+1)}m.loose||(l?m.loose=!0:/\n *\n *$/.test(n)&&(l=!0)),this.options.gfm&&(r=/^\[[ xX]\] /.exec(d))&&(i="[ ] "!==r[0],d=d.replace(/^\[[ xX]\] +/,"")),m.items.push({type:"list_item",raw:n,task:!!r,checked:i,loose:!1,text:d}),m.raw+=n}m.items[m.items.length-1].raw=n.trimRight(),m.items[m.items.length-1].text=d.trimRight(),m.raw=m.raw.trimRight();var w=m.items.length;for(a=0;a1)return!0}}catch(i){r.e(i)}finally{r.f()}return!1}));!m.loose&&x.length&&k&&(m.loose=!0,m.items[a].loose=!0)}return m}}},{key:"html",value:function(e){var t=this.rules.block.html.exec(e);if(t){var n={type:"html",raw:t[0],pre:!this.options.sanitizer&&("pre"===t[1]||"script"===t[1]||"style"===t[1]),text:t[0]};if(this.options.sanitize){var r=this.options.sanitizer?this.options.sanitizer(t[0]):Ks(t[0]);n.type="paragraph",n.text=r,n.tokens=this.lexer.inline(r)}return n}}},{key:"def",value:function(e){var t=this.rules.block.def.exec(e);if(t)return t[3]&&(t[3]=t[3].substring(1,t[3].length-1)),{type:"def",tag:t[1].toLowerCase().replace(/\s+/g," "),raw:t[0],href:t[2]?t[2].replace(this.rules.inline._escapes,"$1"):t[2],title:t[3]?t[3].replace(this.rules.inline._escapes,"$1"):t[3]}}},{key:"table",value:function(e){var t=this.rules.block.table.exec(e);if(t){var n={type:"table",header:hf(t[1]).map((function(e){return{text:e}})),align:t[2].replace(/^ *|\| *$/g,"").split(/ *\| */),rows:t[3]&&t[3].trim()?t[3].replace(/\n[ \t]*$/,"").split("\n"):[]};if(n.header.length===n.align.length){n.raw=t[0];var r,i,o,a,u=n.align.length;for(r=0;r/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:this.options.sanitize?"text":"html",raw:t[0],inLink:this.lexer.state.inLink,inRawBlock:this.lexer.state.inRawBlock,text:this.options.sanitize?this.options.sanitizer?this.options.sanitizer(t[0]):Ks(t[0]):t[0]}}},{key:"link",value:function(e){var t=this.rules.inline.link.exec(e);if(t){var n=t[2].trim();if(!this.options.pedantic&&/^$/.test(n))return;var r=pf(n.slice(0,-1),"\\");if((n.length-r.length)%2===0)return}else{var i=function(e,t){if(-1===e.indexOf(t[1]))return-1;for(var n=e.length,r=0,i=0;i-1){var o=(0===t[0].indexOf("!")?5:4)+t[1].length+i;t[2]=t[2].substring(0,i),t[0]=t[0].substring(0,o).trim(),t[3]=""}}var a=t[2],u="";if(this.options.pedantic){var l=/^([^'"]*[^\s])\s+(['"])(.*)\2/.exec(a);l&&(a=l[1],u=l[3])}else u=t[3]?t[3].slice(1,-1):"";return a=a.trim(),/^$/.test(n)?a.slice(1):a.slice(1,-1)),yf(t,{href:a?a.replace(this.rules.inline._escapes,"$1"):a,title:u?u.replace(this.rules.inline._escapes,"$1"):u},t[0],this.lexer)}}},{key:"reflink",value:function(e,t){var n;if((n=this.rules.inline.reflink.exec(e))||(n=this.rules.inline.nolink.exec(e))){var r=(n[2]||n[1]).replace(/\s+/g," ");if(!(r=t[r.toLowerCase()])||!r.href){var i=n[0].charAt(0);return{type:"text",raw:i,text:i}}return yf(n,r,n[0],this.lexer)}}},{key:"emStrong",value:function(e,t){var n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:"",r=this.rules.inline.emStrong.lDelim.exec(e);if(r&&(!r[3]||!n.match(/(?:[0-9A-Za-z\xAA\xB2\xB3\xB5\xB9\xBA\xBC-\xBE\xC0-\xD6\xD8-\xF6\xF8-\u02C1\u02C6-\u02D1\u02E0-\u02E4\u02EC\u02EE\u0370-\u0374\u0376\u0377\u037A-\u037D\u037F\u0386\u0388-\u038A\u038C\u038E-\u03A1\u03A3-\u03F5\u03F7-\u0481\u048A-\u052F\u0531-\u0556\u0559\u0560-\u0588\u05D0-\u05EA\u05EF-\u05F2\u0620-\u064A\u0660-\u0669\u066E\u066F\u0671-\u06D3\u06D5\u06E5\u06E6\u06EE-\u06FC\u06FF\u0710\u0712-\u072F\u074D-\u07A5\u07B1\u07C0-\u07EA\u07F4\u07F5\u07FA\u0800-\u0815\u081A\u0824\u0828\u0840-\u0858\u0860-\u086A\u0870-\u0887\u0889-\u088E\u08A0-\u08C9\u0904-\u0939\u093D\u0950\u0958-\u0961\u0966-\u096F\u0971-\u0980\u0985-\u098C\u098F\u0990\u0993-\u09A8\u09AA-\u09B0\u09B2\u09B6-\u09B9\u09BD\u09CE\u09DC\u09DD\u09DF-\u09E1\u09E6-\u09F1\u09F4-\u09F9\u09FC\u0A05-\u0A0A\u0A0F\u0A10\u0A13-\u0A28\u0A2A-\u0A30\u0A32\u0A33\u0A35\u0A36\u0A38\u0A39\u0A59-\u0A5C\u0A5E\u0A66-\u0A6F\u0A72-\u0A74\u0A85-\u0A8D\u0A8F-\u0A91\u0A93-\u0AA8\u0AAA-\u0AB0\u0AB2\u0AB3\u0AB5-\u0AB9\u0ABD\u0AD0\u0AE0\u0AE1\u0AE6-\u0AEF\u0AF9\u0B05-\u0B0C\u0B0F\u0B10\u0B13-\u0B28\u0B2A-\u0B30\u0B32\u0B33\u0B35-\u0B39\u0B3D\u0B5C\u0B5D\u0B5F-\u0B61\u0B66-\u0B6F\u0B71-\u0B77\u0B83\u0B85-\u0B8A\u0B8E-\u0B90\u0B92-\u0B95\u0B99\u0B9A\u0B9C\u0B9E\u0B9F\u0BA3\u0BA4\u0BA8-\u0BAA\u0BAE-\u0BB9\u0BD0\u0BE6-\u0BF2\u0C05-\u0C0C\u0C0E-\u0C10\u0C12-\u0C28\u0C2A-\u0C39\u0C3D\u0C58-\u0C5A\u0C5D\u0C60\u0C61\u0C66-\u0C6F\u0C78-\u0C7E\u0C80\u0C85-\u0C8C\u0C8E-\u0C90\u0C92-\u0CA8\u0CAA-\u0CB3\u0CB5-\u0CB9\u0CBD\u0CDD\u0CDE\u0CE0\u0CE1\u0CE6-\u0CEF\u0CF1\u0CF2\u0D04-\u0D0C\u0D0E-\u0D10\u0D12-\u0D3A\u0D3D\u0D4E\u0D54-\u0D56\u0D58-\u0D61\u0D66-\u0D78\u0D7A-\u0D7F\u0D85-\u0D96\u0D9A-\u0DB1\u0DB3-\u0DBB\u0DBD\u0DC0-\u0DC6\u0DE6-\u0DEF\u0E01-\u0E30\u0E32\u0E33\u0E40-\u0E46\u0E50-\u0E59\u0E81\u0E82\u0E84\u0E86-\u0E8A\u0E8C-\u0EA3\u0EA5\u0EA7-\u0EB0\u0EB2\u0EB3\u0EBD\u0EC0-\u0EC4\u0EC6\u0ED0-\u0ED9\u0EDC-\u0EDF\u0F00\u0F20-\u0F33\u0F40-\u0F47\u0F49-\u0F6C\u0F88-\u0F8C\u1000-\u102A\u103F-\u1049\u1050-\u1055\u105A-\u105D\u1061\u1065\u1066\u106E-\u1070\u1075-\u1081\u108E\u1090-\u1099\u10A0-\u10C5\u10C7\u10CD\u10D0-\u10FA\u10FC-\u1248\u124A-\u124D\u1250-\u1256\u1258\u125A-\u125D\u1260-\u1288\u128A-\u128D\u1290-\u12B0\u12B2-\u12B5\u12B8-\u12BE\u12C0\u12C2-\u12C5\u12C8-\u12D6\u12D8-\u1310\u1312-\u1315\u1318-\u135A\u1369-\u137C\u1380-\u138F\u13A0-\u13F5\u13F8-\u13FD\u1401-\u166C\u166F-\u167F\u1681-\u169A\u16A0-\u16EA\u16EE-\u16F8\u1700-\u1711\u171F-\u1731\u1740-\u1751\u1760-\u176C\u176E-\u1770\u1780-\u17B3\u17D7\u17DC\u17E0-\u17E9\u17F0-\u17F9\u1810-\u1819\u1820-\u1878\u1880-\u1884\u1887-\u18A8\u18AA\u18B0-\u18F5\u1900-\u191E\u1946-\u196D\u1970-\u1974\u1980-\u19AB\u19B0-\u19C9\u19D0-\u19DA\u1A00-\u1A16\u1A20-\u1A54\u1A80-\u1A89\u1A90-\u1A99\u1AA7\u1B05-\u1B33\u1B45-\u1B4C\u1B50-\u1B59\u1B83-\u1BA0\u1BAE-\u1BE5\u1C00-\u1C23\u1C40-\u1C49\u1C4D-\u1C7D\u1C80-\u1C88\u1C90-\u1CBA\u1CBD-\u1CBF\u1CE9-\u1CEC\u1CEE-\u1CF3\u1CF5\u1CF6\u1CFA\u1D00-\u1DBF\u1E00-\u1F15\u1F18-\u1F1D\u1F20-\u1F45\u1F48-\u1F4D\u1F50-\u1F57\u1F59\u1F5B\u1F5D\u1F5F-\u1F7D\u1F80-\u1FB4\u1FB6-\u1FBC\u1FBE\u1FC2-\u1FC4\u1FC6-\u1FCC\u1FD0-\u1FD3\u1FD6-\u1FDB\u1FE0-\u1FEC\u1FF2-\u1FF4\u1FF6-\u1FFC\u2070\u2071\u2074-\u2079\u207F-\u2089\u2090-\u209C\u2102\u2107\u210A-\u2113\u2115\u2119-\u211D\u2124\u2126\u2128\u212A-\u212D\u212F-\u2139\u213C-\u213F\u2145-\u2149\u214E\u2150-\u2189\u2460-\u249B\u24EA-\u24FF\u2776-\u2793\u2C00-\u2CE4\u2CEB-\u2CEE\u2CF2\u2CF3\u2CFD\u2D00-\u2D25\u2D27\u2D2D\u2D30-\u2D67\u2D6F\u2D80-\u2D96\u2DA0-\u2DA6\u2DA8-\u2DAE\u2DB0-\u2DB6\u2DB8-\u2DBE\u2DC0-\u2DC6\u2DC8-\u2DCE\u2DD0-\u2DD6\u2DD8-\u2DDE\u2E2F\u3005-\u3007\u3021-\u3029\u3031-\u3035\u3038-\u303C\u3041-\u3096\u309D-\u309F\u30A1-\u30FA\u30FC-\u30FF\u3105-\u312F\u3131-\u318E\u3192-\u3195\u31A0-\u31BF\u31F0-\u31FF\u3220-\u3229\u3248-\u324F\u3251-\u325F\u3280-\u3289\u32B1-\u32BF\u3400-\u4DBF\u4E00-\uA48C\uA4D0-\uA4FD\uA500-\uA60C\uA610-\uA62B\uA640-\uA66E\uA67F-\uA69D\uA6A0-\uA6EF\uA717-\uA71F\uA722-\uA788\uA78B-\uA7CA\uA7D0\uA7D1\uA7D3\uA7D5-\uA7D9\uA7F2-\uA801\uA803-\uA805\uA807-\uA80A\uA80C-\uA822\uA830-\uA835\uA840-\uA873\uA882-\uA8B3\uA8D0-\uA8D9\uA8F2-\uA8F7\uA8FB\uA8FD\uA8FE\uA900-\uA925\uA930-\uA946\uA960-\uA97C\uA984-\uA9B2\uA9CF-\uA9D9\uA9E0-\uA9E4\uA9E6-\uA9FE\uAA00-\uAA28\uAA40-\uAA42\uAA44-\uAA4B\uAA50-\uAA59\uAA60-\uAA76\uAA7A\uAA7E-\uAAAF\uAAB1\uAAB5\uAAB6\uAAB9-\uAABD\uAAC0\uAAC2\uAADB-\uAADD\uAAE0-\uAAEA\uAAF2-\uAAF4\uAB01-\uAB06\uAB09-\uAB0E\uAB11-\uAB16\uAB20-\uAB26\uAB28-\uAB2E\uAB30-\uAB5A\uAB5C-\uAB69\uAB70-\uABE2\uABF0-\uABF9\uAC00-\uD7A3\uD7B0-\uD7C6\uD7CB-\uD7FB\uF900-\uFA6D\uFA70-\uFAD9\uFB00-\uFB06\uFB13-\uFB17\uFB1D\uFB1F-\uFB28\uFB2A-\uFB36\uFB38-\uFB3C\uFB3E\uFB40\uFB41\uFB43\uFB44\uFB46-\uFBB1\uFBD3-\uFD3D\uFD50-\uFD8F\uFD92-\uFDC7\uFDF0-\uFDFB\uFE70-\uFE74\uFE76-\uFEFC\uFF10-\uFF19\uFF21-\uFF3A\uFF41-\uFF5A\uFF66-\uFFBE\uFFC2-\uFFC7\uFFCA-\uFFCF\uFFD2-\uFFD7\uFFDA-\uFFDC]|\uD800[\uDC00-\uDC0B\uDC0D-\uDC26\uDC28-\uDC3A\uDC3C\uDC3D\uDC3F-\uDC4D\uDC50-\uDC5D\uDC80-\uDCFA\uDD07-\uDD33\uDD40-\uDD78\uDD8A\uDD8B\uDE80-\uDE9C\uDEA0-\uDED0\uDEE1-\uDEFB\uDF00-\uDF23\uDF2D-\uDF4A\uDF50-\uDF75\uDF80-\uDF9D\uDFA0-\uDFC3\uDFC8-\uDFCF\uDFD1-\uDFD5]|\uD801[\uDC00-\uDC9D\uDCA0-\uDCA9\uDCB0-\uDCD3\uDCD8-\uDCFB\uDD00-\uDD27\uDD30-\uDD63\uDD70-\uDD7A\uDD7C-\uDD8A\uDD8C-\uDD92\uDD94\uDD95\uDD97-\uDDA1\uDDA3-\uDDB1\uDDB3-\uDDB9\uDDBB\uDDBC\uDE00-\uDF36\uDF40-\uDF55\uDF60-\uDF67\uDF80-\uDF85\uDF87-\uDFB0\uDFB2-\uDFBA]|\uD802[\uDC00-\uDC05\uDC08\uDC0A-\uDC35\uDC37\uDC38\uDC3C\uDC3F-\uDC55\uDC58-\uDC76\uDC79-\uDC9E\uDCA7-\uDCAF\uDCE0-\uDCF2\uDCF4\uDCF5\uDCFB-\uDD1B\uDD20-\uDD39\uDD80-\uDDB7\uDDBC-\uDDCF\uDDD2-\uDE00\uDE10-\uDE13\uDE15-\uDE17\uDE19-\uDE35\uDE40-\uDE48\uDE60-\uDE7E\uDE80-\uDE9F\uDEC0-\uDEC7\uDEC9-\uDEE4\uDEEB-\uDEEF\uDF00-\uDF35\uDF40-\uDF55\uDF58-\uDF72\uDF78-\uDF91\uDFA9-\uDFAF]|\uD803[\uDC00-\uDC48\uDC80-\uDCB2\uDCC0-\uDCF2\uDCFA-\uDD23\uDD30-\uDD39\uDE60-\uDE7E\uDE80-\uDEA9\uDEB0\uDEB1\uDF00-\uDF27\uDF30-\uDF45\uDF51-\uDF54\uDF70-\uDF81\uDFB0-\uDFCB\uDFE0-\uDFF6]|\uD804[\uDC03-\uDC37\uDC52-\uDC6F\uDC71\uDC72\uDC75\uDC83-\uDCAF\uDCD0-\uDCE8\uDCF0-\uDCF9\uDD03-\uDD26\uDD36-\uDD3F\uDD44\uDD47\uDD50-\uDD72\uDD76\uDD83-\uDDB2\uDDC1-\uDDC4\uDDD0-\uDDDA\uDDDC\uDDE1-\uDDF4\uDE00-\uDE11\uDE13-\uDE2B\uDE3F\uDE40\uDE80-\uDE86\uDE88\uDE8A-\uDE8D\uDE8F-\uDE9D\uDE9F-\uDEA8\uDEB0-\uDEDE\uDEF0-\uDEF9\uDF05-\uDF0C\uDF0F\uDF10\uDF13-\uDF28\uDF2A-\uDF30\uDF32\uDF33\uDF35-\uDF39\uDF3D\uDF50\uDF5D-\uDF61]|\uD805[\uDC00-\uDC34\uDC47-\uDC4A\uDC50-\uDC59\uDC5F-\uDC61\uDC80-\uDCAF\uDCC4\uDCC5\uDCC7\uDCD0-\uDCD9\uDD80-\uDDAE\uDDD8-\uDDDB\uDE00-\uDE2F\uDE44\uDE50-\uDE59\uDE80-\uDEAA\uDEB8\uDEC0-\uDEC9\uDF00-\uDF1A\uDF30-\uDF3B\uDF40-\uDF46]|\uD806[\uDC00-\uDC2B\uDCA0-\uDCF2\uDCFF-\uDD06\uDD09\uDD0C-\uDD13\uDD15\uDD16\uDD18-\uDD2F\uDD3F\uDD41\uDD50-\uDD59\uDDA0-\uDDA7\uDDAA-\uDDD0\uDDE1\uDDE3\uDE00\uDE0B-\uDE32\uDE3A\uDE50\uDE5C-\uDE89\uDE9D\uDEB0-\uDEF8]|\uD807[\uDC00-\uDC08\uDC0A-\uDC2E\uDC40\uDC50-\uDC6C\uDC72-\uDC8F\uDD00-\uDD06\uDD08\uDD09\uDD0B-\uDD30\uDD46\uDD50-\uDD59\uDD60-\uDD65\uDD67\uDD68\uDD6A-\uDD89\uDD98\uDDA0-\uDDA9\uDEE0-\uDEF2\uDF02\uDF04-\uDF10\uDF12-\uDF33\uDF50-\uDF59\uDFB0\uDFC0-\uDFD4]|\uD808[\uDC00-\uDF99]|\uD809[\uDC00-\uDC6E\uDC80-\uDD43]|\uD80B[\uDF90-\uDFF0]|[\uD80C\uD81C-\uD820\uD822\uD840-\uD868\uD86A-\uD86C\uD86F-\uD872\uD874-\uD879\uD880-\uD883\uD885-\uD887][\uDC00-\uDFFF]|\uD80D[\uDC00-\uDC2F\uDC41-\uDC46]|\uD811[\uDC00-\uDE46]|\uD81A[\uDC00-\uDE38\uDE40-\uDE5E\uDE60-\uDE69\uDE70-\uDEBE\uDEC0-\uDEC9\uDED0-\uDEED\uDF00-\uDF2F\uDF40-\uDF43\uDF50-\uDF59\uDF5B-\uDF61\uDF63-\uDF77\uDF7D-\uDF8F]|\uD81B[\uDE40-\uDE96\uDF00-\uDF4A\uDF50\uDF93-\uDF9F\uDFE0\uDFE1\uDFE3]|\uD821[\uDC00-\uDFF7]|\uD823[\uDC00-\uDCD5\uDD00-\uDD08]|\uD82B[\uDFF0-\uDFF3\uDFF5-\uDFFB\uDFFD\uDFFE]|\uD82C[\uDC00-\uDD22\uDD32\uDD50-\uDD52\uDD55\uDD64-\uDD67\uDD70-\uDEFB]|\uD82F[\uDC00-\uDC6A\uDC70-\uDC7C\uDC80-\uDC88\uDC90-\uDC99]|\uD834[\uDEC0-\uDED3\uDEE0-\uDEF3\uDF60-\uDF78]|\uD835[\uDC00-\uDC54\uDC56-\uDC9C\uDC9E\uDC9F\uDCA2\uDCA5\uDCA6\uDCA9-\uDCAC\uDCAE-\uDCB9\uDCBB\uDCBD-\uDCC3\uDCC5-\uDD05\uDD07-\uDD0A\uDD0D-\uDD14\uDD16-\uDD1C\uDD1E-\uDD39\uDD3B-\uDD3E\uDD40-\uDD44\uDD46\uDD4A-\uDD50\uDD52-\uDEA5\uDEA8-\uDEC0\uDEC2-\uDEDA\uDEDC-\uDEFA\uDEFC-\uDF14\uDF16-\uDF34\uDF36-\uDF4E\uDF50-\uDF6E\uDF70-\uDF88\uDF8A-\uDFA8\uDFAA-\uDFC2\uDFC4-\uDFCB\uDFCE-\uDFFF]|\uD837[\uDF00-\uDF1E\uDF25-\uDF2A]|\uD838[\uDC30-\uDC6D\uDD00-\uDD2C\uDD37-\uDD3D\uDD40-\uDD49\uDD4E\uDE90-\uDEAD\uDEC0-\uDEEB\uDEF0-\uDEF9]|\uD839[\uDCD0-\uDCEB\uDCF0-\uDCF9\uDFE0-\uDFE6\uDFE8-\uDFEB\uDFED\uDFEE\uDFF0-\uDFFE]|\uD83A[\uDC00-\uDCC4\uDCC7-\uDCCF\uDD00-\uDD43\uDD4B\uDD50-\uDD59]|\uD83B[\uDC71-\uDCAB\uDCAD-\uDCAF\uDCB1-\uDCB4\uDD01-\uDD2D\uDD2F-\uDD3D\uDE00-\uDE03\uDE05-\uDE1F\uDE21\uDE22\uDE24\uDE27\uDE29-\uDE32\uDE34-\uDE37\uDE39\uDE3B\uDE42\uDE47\uDE49\uDE4B\uDE4D-\uDE4F\uDE51\uDE52\uDE54\uDE57\uDE59\uDE5B\uDE5D\uDE5F\uDE61\uDE62\uDE64\uDE67-\uDE6A\uDE6C-\uDE72\uDE74-\uDE77\uDE79-\uDE7C\uDE7E\uDE80-\uDE89\uDE8B-\uDE9B\uDEA1-\uDEA3\uDEA5-\uDEA9\uDEAB-\uDEBB]|\uD83C[\uDD00-\uDD0C]|\uD83E[\uDFF0-\uDFF9]|\uD869[\uDC00-\uDEDF\uDF00-\uDFFF]|\uD86D[\uDC00-\uDF39\uDF40-\uDFFF]|\uD86E[\uDC00-\uDC1D\uDC20-\uDFFF]|\uD873[\uDC00-\uDEA1\uDEB0-\uDFFF]|\uD87A[\uDC00-\uDFE0]|\uD87E[\uDC00-\uDE1D]|\uD884[\uDC00-\uDF4A\uDF50-\uDFFF]|\uD888[\uDC00-\uDFAF])/))){var i=r[1]||r[2]||"";if(!i||i&&(""===n||this.rules.inline.punctuation.exec(n))){var o,a,u=r[0].length-1,l=u,c=0,s="*"===r[0][0]?this.rules.inline.emStrong.rDelimAst:this.rules.inline.emStrong.rDelimUnd;for(s.lastIndex=0,t=t.slice(-1*e.length+u);null!=(r=s.exec(t));)if(o=r[1]||r[2]||r[3]||r[4]||r[5]||r[6])if(a=o.length,r[3]||r[4])l+=a;else if(!((r[5]||r[6])&&u%3)||(u+a)%3){if(!((l-=a)>0)){a=Math.min(a,a+l+c);var f=e.slice(0,u+r.index+(r[0].length-o.length)+a);if(Math.min(u,a)%2){var d=f.slice(1,-1);return{type:"em",raw:f,text:d,tokens:this.lexer.inlineTokens(d)}}var h=f.slice(2,-2);return{type:"strong",raw:f,text:h,tokens:this.lexer.inlineTokens(h)}}}else c+=a}}}},{key:"codespan",value:function(e){var t=this.rules.inline.code.exec(e);if(t){var n=t[2].replace(/\n/g," "),r=/[^ ]/.test(n),i=/^ /.test(n)&&/ $/.test(n);return r&&i&&(n=n.substring(1,n.length-1)),n=Ks(n,!0),{type:"codespan",raw:t[0],text:n}}}},{key:"br",value:function(e){var t=this.rules.inline.br.exec(e);if(t)return{type:"br",raw:t[0]}}},{key:"del",value:function(e){var t=this.rules.inline.del.exec(e);if(t)return{type:"del",raw:t[0],text:t[2],tokens:this.lexer.inlineTokens(t[2])}}},{key:"autolink",value:function(e,t){var n,r,i=this.rules.inline.autolink.exec(e);if(i)return r="@"===i[2]?"mailto:"+(n=Ks(this.options.mangle?t(i[1]):i[1])):n=Ks(i[1]),{type:"link",raw:i[0],text:n,href:r,tokens:[{type:"text",raw:n,text:n}]}}},{key:"url",value:function(e,t){var n;if(n=this.rules.inline.url.exec(e)){var r,i;if("@"===n[2])i="mailto:"+(r=Ks(this.options.mangle?t(n[0]):n[0]));else{var o;do{o=n[0],n[0]=this.rules.inline._backpedal.exec(n[0])[0]}while(o!==n[0]);r=Ks(n[0]),i="www."===n[1]?"http://"+r:r}return{type:"link",raw:n[0],text:r,href:i,tokens:[{type:"text",raw:r,text:r}]}}}},{key:"inlineText",value:function(e,t){var n,r=this.rules.inline.text.exec(e);if(r)return n=this.lexer.state.inRawBlock?this.options.sanitize?this.options.sanitizer?this.options.sanitizer(r[0]):Ks(r[0]):r[0]:Ks(this.options.smartypants?t(r[0]):r[0]),{type:"text",raw:r[0],text:n}}}]),e}(),_f={newline:/^(?: *(?:\n|$))+/,code:/^( {4}[^\n]+(?:\n(?: *(?:\n|$))*)?)+/,fences:/^ {0,3}(`{3,}(?=[^`\n]*\n)|~{3,})([^\n]*)\n(?:|([\s\S]*?)\n)(?: {0,3}\1[~`]* *(?=\n|$)|$)/,hr:/^ {0,3}((?:-[\t ]*){3,}|(?:_[ \t]*){3,}|(?:\*[ \t]*){3,})(?:\n+|$)/,heading:/^ {0,3}(#{1,6})(?=\s|$)(.*)(?:\n+|$)/,blockquote:/^( {0,3}> ?(paragraph|[^\n]*)(?:\n|$))+/,list:/^( {0,3}bull)([ \t][^\n]+?)?(?:\n|$)/,html:"^ {0,3}(?:<(script|pre|style|textarea)[\\s>][\\s\\S]*?(?:[^\\n]*\\n+|$)|comment[^\\n]*(\\n+|$)|<\\?[\\s\\S]*?(?:\\?>\\n*|$)|\\n*|$)|\\n*|$)|)[\\s\\S]*?(?:(?:\\n *)+\\n|$)|<(?!script|pre|style|textarea)([a-z][\\w-]*)(?:attribute)*? */?>(?=[ \\t]*(?:\\n|$))[\\s\\S]*?(?:(?:\\n *)+\\n|$)|(?=[ \\t]*(?:\\n|$))[\\s\\S]*?(?:(?:\\n *)+\\n|$))",def:/^ {0,3}\[(label)\]: *(?:\n *)?]+)>?(?:(?: +(?:\n *)?| *\n *)(title))? *(?:\n+|$)/,table:ff,lheading:/^([^\n]+)\n {0,3}(=+|-+) *(?:\n+|$)/,_paragraph:/^([^\n]+(?:\n(?!hr|heading|lheading|blockquote|fences|list|html|table| +\n)[^\n]+)*)/,text:/^[^\n]+/,_label:/(?!\s*\])(?:\\.|[^\[\]\\])+/,_title:/(?:"(?:\\"?|[^"\\])*"|'[^'\n]*(?:\n[^'\n]+)*\n?'|\([^()]*\))/};_f.def=nf(_f.def).replace("label",_f._label).replace("title",_f._title).getRegex(),_f.bullet=/(?:[*+-]|\d{1,9}[.)])/,_f.listItemStart=nf(/^( *)(bull) */).replace("bull",_f.bullet).getRegex(),_f.list=nf(_f.list).replace(/bull/g,_f.bullet).replace("hr","\\n+(?=\\1?(?:(?:- *){3,}|(?:_ *){3,}|(?:\\* *){3,})(?:\\n+|$))").replace("def","\\n+(?="+_f.def.source+")").getRegex(),_f._tag="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|section|source|summary|table|tbody|td|tfoot|th|thead|title|tr|track|ul",_f._comment=/|$)/,_f.html=nf(_f.html,"i").replace("comment",_f._comment).replace("tag",_f._tag).replace("attribute",/ +[a-zA-Z:_][\w.:-]*(?: *= *"[^"\n]*"| *= *'[^'\n]*'| *= *[^\s"'=<>`]+)?/).getRegex(),_f.paragraph=nf(_f._paragraph).replace("hr",_f.hr).replace("heading"," {0,3}#{1,6} ").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",_f._tag).getRegex(),_f.blockquote=nf(_f.blockquote).replace("paragraph",_f.paragraph).getRegex(),_f.normal=df({},_f),_f.gfm=df({},_f.normal,{table:"^ *([^\\n ].*\\|.*)\\n {0,3}(?:\\| *)?(:?-+:? *(?:\\| *:?-+:? *)*)(?:\\| *)?(?:\\n((?:(?! *\\n|hr|heading|blockquote|code|fences|list|html).*(?:\\n|$))*)\\n*|$)"}),_f.gfm.table=nf(_f.gfm.table).replace("hr",_f.hr).replace("heading"," {0,3}#{1,6} ").replace("blockquote"," {0,3}>").replace("code"," {4}[^\\n]").replace("fences"," {0,3}(?:`{3,}(?=[^`\\n]*\\n)|~{3,})[^\\n]*\\n").replace("list"," {0,3}(?:[*+-]|1[.)]) ").replace("html",")|<(?:script|pre|style|textarea|!--)").replace("tag",_f._tag).getRegex(),_f.gfm.paragraph=nf(_f._paragraph).replace("hr",_f.hr).replace("heading"," {0,3}#{1,6} ").replace("|lheading","").replace("table",_f.gfm.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",_f._tag).getRegex(),_f.pedantic=df({},_f.normal,{html:nf("^ *(?:comment *(?:\\n|\\s*$)|<(tag)[\\s\\S]+? *(?:\\n{2,}|\\s*$)|\\s]*)*?/?> *(?:\\n{2,}|\\s*$))").replace("comment",_f._comment).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:ff,paragraph:nf(_f.normal._paragraph).replace("hr",_f.hr).replace("heading"," *#{1,6} *[^\n]").replace("lheading",_f.lheading).replace("blockquote"," {0,3}>").replace("|fences","").replace("|list","").replace("|html","").getRegex()});var bf={escape:/^\\([!"#$%&'()*+,\-./:;<=>?@\[\]\\^_`{|}~])/,autolink:/^<(scheme:[^\s\x00-\x1f<>]*|email)>/,url:ff,tag:"^comment|^|^<[a-zA-Z][\\w-]*(?:attribute)*?\\s*/?>|^<\\?[\\s\\S]*?\\?>|^|^",link:/^!?\[(label)\]\(\s*(href)(?:\s+(title))?\s*\)/,reflink:/^!?\[(label)\]\[(ref)\]/,nolink:/^!?\[(ref)\](?:\[\])?/,reflinkSearch:"reflink|nolink(?!\\()",emStrong:{lDelim:/^(?:\*+(?:([punct_])|[^\s*]))|^_+(?:([punct*])|([^\s_]))/,rDelimAst:/^(?:[^_*\\]|\\.)*?\_\_(?:[^_*\\]|\\.)*?\*(?:[^_*\\]|\\.)*?(?=\_\_)|(?:[^*\\]|\\.)+(?=[^*])|[punct_](\*+)(?=[\s]|$)|(?:[^punct*_\s\\]|\\.)(\*+)(?=[punct_\s]|$)|[punct_\s](\*+)(?=[^punct*_\s])|[\s](\*+)(?=[punct_])|[punct_](\*+)(?=[punct_])|(?:[^punct*_\s\\]|\\.)(\*+)(?=[^punct*_\s])/,rDelimUnd:/^(?:[^_*\\]|\\.)*?\*\*(?:[^_*\\]|\\.)*?\_(?:[^_*\\]|\\.)*?(?=\*\*)|(?:[^_\\]|\\.)+(?=[^_])|[punct*](\_+)(?=[\s]|$)|(?:[^punct*_\s\\]|\\.)(\_+)(?=[punct*\s]|$)|[punct*\s](\_+)(?=[^punct*_\s])|[\s](\_+)(?=[punct*])|[punct*](\_+)(?=[punct*])/},code:/^(`+)([^`]|[^`][\s\S]*?[^`])\1(?!`)/,br:/^( {2,}|\\)\n(?!\s*$)/,del:ff,text:/^(`+|[^`])(?:(?= {2,}\n)|[\s\S]*?(?:(?=[\\.5&&(n="x"+n.toString(16)),r+="&#"+n+";";return r}bf._punctuation="!\"#$%&'()+\\-.,/:;<=>?@\\[\\]`^{|}~",bf.punctuation=nf(bf.punctuation).replace(/punctuation/g,bf._punctuation).getRegex(),bf.blockSkip=/\[[^\]]*?\]\([^\)]*?\)|`[^`]*?`|<[^>]*?>/g,bf.escapedEmSt=/(?:^|[^\\])(?:\\\\)*\\[*_]/g,bf._comment=nf(_f._comment).replace("(?:--\x3e|$)","--\x3e").getRegex(),bf.emStrong.lDelim=nf(bf.emStrong.lDelim).replace(/punct/g,bf._punctuation).getRegex(),bf.emStrong.rDelimAst=nf(bf.emStrong.rDelimAst,"g").replace(/punct/g,bf._punctuation).getRegex(),bf.emStrong.rDelimUnd=nf(bf.emStrong.rDelimUnd,"g").replace(/punct/g,bf._punctuation).getRegex(),bf._escapes=/\\([!"#$%&'()*+,\-./:;<=>?@\[\]\\^_`{|}~])/g,bf._scheme=/[a-zA-Z][a-zA-Z0-9+.-]{1,31}/,bf._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])?)+(?![-_])/,bf.autolink=nf(bf.autolink).replace("scheme",bf._scheme).replace("email",bf._email).getRegex(),bf._attribute=/\s+[a-zA-Z:_][\w.:-]*(?:\s*=\s*"[^"]*"|\s*=\s*'[^']*'|\s*=\s*[^\s"'=<>`]+)?/,bf.tag=nf(bf.tag).replace("comment",bf._comment).replace("attribute",bf._attribute).getRegex(),bf._label=/(?:\[(?:\\.|[^\[\]\\])*\]|\\.|`[^`]*`|[^\[\]\\`])*?/,bf._href=/<(?:\\.|[^\n<>\\])+>|[^\s\x00-\x1f]*/,bf._title=/"(?:\\"?|[^"\\])*"|'(?:\\'?|[^'\\])*'|\((?:\\\)?|[^)\\])*\)/,bf.link=nf(bf.link).replace("label",bf._label).replace("href",bf._href).replace("title",bf._title).getRegex(),bf.reflink=nf(bf.reflink).replace("label",bf._label).replace("ref",_f._label).getRegex(),bf.nolink=nf(bf.nolink).replace("ref",_f._label).getRegex(),bf.reflinkSearch=nf(bf.reflinkSearch,"g").replace("reflink",bf.reflink).replace("nolink",bf.nolink).getRegex(),bf.normal=df({},bf),bf.pedantic=df({},bf.normal,{strong:{start:/^__|\*\*/,middle:/^__(?=\S)([\s\S]*?\S)__(?!_)|^\*\*(?=\S)([\s\S]*?\S)\*\*(?!\*)/,endAst:/\*\*(?!\*)/g,endUnd:/__(?!_)/g},em:{start:/^_|\*/,middle:/^()\*(?=\S)([\s\S]*?\S)\*(?!\*)|^_(?=\S)([\s\S]*?\S)_(?!_)/,endAst:/\*(?!\*)/g,endUnd:/_(?!_)/g},link:nf(/^!?\[(label)\]\((.*?)\)/).replace("label",bf._label).getRegex(),reflink:nf(/^!?\[(label)\]\s*\[([^\]]*)\]/).replace("label",bf._label).getRegex()}),bf.gfm=df({},bf.normal,{escape:nf(bf.escape).replace("])","~|])").getRegex(),_extended_email:/[A-Za-z0-9._+-]+(@)[a-zA-Z0-9-_]+(?:\.[a-zA-Z0-9-_]*[a-zA-Z0-9])+(?![-_])/,url:/^((?:ftp|https?):\/\/|www\.)(?:[a-zA-Z0-9\-]+\.?)+[^\s<]*|^email/,_backpedal:/(?:[^?!.,:;*_~()&]+|\([^)]*\)|&(?![a-zA-Z0-9]+;$)|[?!.,:;*_~)]+(?!$))+/,del:/^(~~?)(?=[^\s~])([\s\S]*?[^\s~])\1(?=[^~]|$)/,text:/^([`~]+|[^`~])(?:(?= {2,}\n)|(?=[a-zA-Z0-9.!#$%&'*+\/=?_`{\|}~-]+@)|[\s\S]*?(?:(?=[\\1&&void 0!==arguments[1]?arguments[1]:[];for(e=this.options.pedantic?e.replace(/\t/g," ").replace(/^ +$/gm,""):e.replace(/^( *)(\t+)/gm,(function(e,t,n){return t+" ".repeat(n.length)}));e;)if(!(this.options.extensions&&this.options.extensions.block&&this.options.extensions.block.some((function(n){return!!(t=n.call({lexer:o},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])||"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])||"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&&function(){var t=1/0,n=e.slice(1),i=void 0;o.options.extensions.startBlock.forEach((function(e){"number"===typeof(i=e.call({lexer:this},n))&&i>=0&&(t=Math.min(t,i))})),t<1/0&&t>=0&&(r=e.substring(0,t+1))}(),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])&&"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){var u="Infinite loop on byte: "+e.charCodeAt(0);if(this.options.silent){console.error(u);break}throw new Error(u)}return this.state.top=!0,a}},{key:"inline",value:function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:[];return this.inlineQueue.push({src:e,tokens:t}),t}},{key:"inlineTokens",value:function(e){var t,n,r,i,o,a,u=this,l=arguments.length>1&&void 0!==arguments[1]?arguments[1]:[],c=e;if(this.tokens.links){var s=Object.keys(this.tokens.links);if(s.length>0)for(;null!=(i=this.tokenizer.rules.inline.reflinkSearch.exec(c));)s.includes(i[0].slice(i[0].lastIndexOf("[")+1,-1))&&(c=c.slice(0,i.index)+"["+mf("a",i[0].length-2)+"]"+c.slice(this.tokenizer.rules.inline.reflinkSearch.lastIndex))}for(;null!=(i=this.tokenizer.rules.inline.blockSkip.exec(c));)c=c.slice(0,i.index)+"["+mf("a",i[0].length-2)+"]"+c.slice(this.tokenizer.rules.inline.blockSkip.lastIndex);for(;null!=(i=this.tokenizer.rules.inline.escapedEmSt.exec(c));)c=c.slice(0,i.index+i[0].length-2)+"++"+c.slice(this.tokenizer.rules.inline.escapedEmSt.lastIndex),this.tokenizer.rules.inline.escapedEmSt.lastIndex--;for(;e;)if(o||(a=""),o=!1,!(this.options.extensions&&this.options.extensions.inline&&this.options.extensions.inline.some((function(n){return!!(t=n.call({lexer:u},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])&&"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])&&"text"===t.type&&"text"===n.type?(n.raw+=t.raw,n.text+=t.text):l.push(t);else if(t=this.tokenizer.emStrong(e,c,a))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,wf))e=e.substring(t.raw.length),l.push(t);else if(this.state.inLink||!(t=this.tokenizer.url(e,wf))){if(r=e,this.options.extensions&&this.options.extensions.startInline&&function(){var t=1/0,n=e.slice(1),i=void 0;u.options.extensions.startInline.forEach((function(e){"number"===typeof(i=e.call({lexer:this},n))&&i>=0&&(t=Math.min(t,i))})),t<1/0&&t>=0&&(r=e.substring(0,t+1))}(),t=this.tokenizer.inlineText(r,Df))e=e.substring(t.raw.length),"_"!==t.raw.slice(-1)&&(a=t.raw.slice(-1)),o=!0,(n=l[l.length-1])&&"text"===n.type?(n.raw+=t.raw,n.text+=t.text):l.push(t);else if(e){var f="Infinite loop on byte: "+e.charCodeAt(0);if(this.options.silent){console.error(f);break}throw new Error(f)}}else e=e.substring(t.raw.length),l.push(t);return l}}],[{key:"rules",get:function(){return{block:_f,inline:bf}}},{key:"lex",value:function(t,n){return new e(n).lex(t)}},{key:"lexInline",value:function(t,n){return new e(n).inlineTokens(t)}}]),e}(),kf=function(){function e(t){Dt(this,e),this.options=t||Ys}return xt(e,[{key:"code",value:function(e,t,n){var r=(t||"").match(/\S*/)[0];if(this.options.highlight){var i=this.options.highlight(e,r);null!=i&&i!==e&&(n=!0,e=i)}return e=e.replace(/\n$/,"")+"\n",r?'
    '+(n?e:Ks(e,!0))+"
    \n":"
    "+(n?e:Ks(e,!0))+"
    \n"}},{key:"blockquote",value:function(e){return"
    \n".concat(e,"
    \n")}},{key:"html",value:function(e){return e}},{key:"heading",value:function(e,t,n,r){if(this.options.headerIds){var i=this.options.headerPrefix+r.slug(n);return"').concat(e,"\n")}return"").concat(e,"\n")}},{key:"hr",value:function(){return this.options.xhtml?"
    \n":"
    \n"}},{key:"list",value:function(e,t,n){var r=t?"ol":"ul";return"<"+r+(t&&1!==n?' start="'+n+'"':"")+">\n"+e+"\n"}},{key:"listitem",value:function(e){return"
  • ".concat(e,"
  • \n")}},{key:"checkbox",value:function(e){return" "}},{key:"paragraph",value:function(e){return"

    ".concat(e,"

    \n")}},{key:"table",value:function(e,t){return t&&(t="".concat(t,"")),"\n\n"+e+"\n"+t+"
    \n"}},{key:"tablerow",value:function(e){return"\n".concat(e,"\n")}},{key:"tablecell",value:function(e,t){var n=t.header?"th":"td";return(t.align?"<".concat(n,' align="').concat(t.align,'">'):"<".concat(n,">"))+e+"\n")}},{key:"strong",value:function(e){return"".concat(e,"")}},{key:"em",value:function(e){return"".concat(e,"")}},{key:"codespan",value:function(e){return"".concat(e,"")}},{key:"br",value:function(){return this.options.xhtml?"
    ":"
    "}},{key:"del",value:function(e){return"".concat(e,"")}},{key:"link",value:function(e,t,n){if(null===(e=af(this.options.sanitize,this.options.baseUrl,e)))return n;var r='
    "}},{key:"image",value:function(e,t,n){if(null===(e=af(this.options.sanitize,this.options.baseUrl,e)))return n;var r='').concat(n,'":">"}},{key:"text",value:function(e){return e}}]),e}(),Cf=function(){function e(){Dt(this,e)}return xt(e,[{key:"strong",value:function(e){return e}},{key:"em",value:function(e){return e}},{key:"codespan",value:function(e){return e}},{key:"del",value:function(e){return e}},{key:"html",value:function(e){return e}},{key:"text",value:function(e){return e}},{key:"link",value:function(e,t,n){return""+n}},{key:"image",value:function(e,t,n){return""+n}},{key:"br",value:function(){return""}}]),e}(),Ef=function(){function e(){Dt(this,e),this.seen={}}return xt(e,[{key:"serialize",value:function(e){return e.toLowerCase().trim().replace(/<[!\/a-z].*?>/gi,"").replace(/[\u2000-\u206F\u2E00-\u2E7F\\'!"#$%&()*+,./:;<=>?@[\]^`{|}~]/g,"").replace(/\s/g,"-")}},{key:"getNextSafeSlug",value:function(e,t){var n=e,r=0;if(this.seen.hasOwnProperty(n)){r=this.seen[e];do{n=e+"-"+ ++r}while(this.seen.hasOwnProperty(n))}return t||(this.seen[e]=r,this.seen[n]=0),n}},{key:"slug",value:function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},n=this.serialize(e);return this.getNextSafeSlug(n,t.dryrun)}}]),e}(),Sf=function(){function e(t){Dt(this,e),this.options=t||Ys,this.options.renderer=this.options.renderer||new kf,this.renderer=this.options.renderer,this.renderer.options=this.options,this.textRenderer=new Cf,this.slugger=new Ef}return xt(e,[{key:"parse",value:function(e){var t,n,r,i,o,a,u,l,c,s,f,d,h,p,v,m,y,g,_,b=!(arguments.length>1&&void 0!==arguments[1])||arguments[1],D="",w=e.length;for(t=0;t0&&"paragraph"===v.tokens[0].type?(v.tokens[0].text=g+" "+v.tokens[0].text,v.tokens[0].tokens&&v.tokens[0].tokens.length>0&&"text"===v.tokens[0].tokens[0].type&&(v.tokens[0].tokens[0].text=g+" "+v.tokens[0].tokens[0].text)):v.tokens.unshift({type:"text",text:g}):p+=g),p+=this.parse(v.tokens,h),c+=this.renderer.listitem(p,y,m);D+=this.renderer.list(c,f,d);continue;case"html":D+=this.renderer.html(s.text);continue;case"paragraph":D+=this.renderer.paragraph(this.parseInline(s.tokens));continue;case"text":for(c=s.tokens?this.parseInline(s.tokens):s.text;t+1An error occurred:

    "+Ks(e.message+"",!0)+"
    ";throw e}try{var l=xf.lex(e,t);if(t.walkTokens){if(t.async)return Promise.all(Af.walkTokens(l,t.walkTokens)).then((function(){return Sf.parse(l,t)})).catch(u);Af.walkTokens(l,t.walkTokens)}return Sf.parse(l,t)}catch(c){u(c)}}Af.options=Af.setOptions=function(e){var t;return df(Af.defaults,e),t=Af.defaults,Ys=t,Af},Af.getDefaults=Vs,Af.defaults=Ys,Af.use=function(){for(var e=arguments.length,t=new Array(e),n=0;nAn error occurred:

    "+Ks(c.message+"",!0)+"
    ";throw c}},Af.Parser=Sf,Af.parser=Sf.parse,Af.Renderer=kf,Af.TextRenderer=Cf,Af.Lexer=xf,Af.lexer=xf.lex,Af.Tokenizer=gf,Af.Slugger=Ef,Af.parse=Af;Af.options,Af.setOptions,Af.use,Af.walkTokens,Af.parseInline,Sf.parse,xf.lex;var Ff=function(e){var t=e.title,n=e.description,r=e.unit,i=e.expr,o=e.showLegend,a=e.filename,u=e.alias,l=Wr().period,c=Qr(),s=re(null),f=_t(X(!0),2),d=f[0],h=f[1],p=_t(X(l.step||1),2),v=p[0],y=p[1],g=_t(X({limits:{enable:!1,range:{1:[0,0]}}}),2),_=g[0],b=g[1],D=oe((function(){return Array.isArray(i)&&i.every((function(e){return e}))}),[i]),w=xs({predefinedQuery:D?i:[],display:"chart",visible:d,customStep:v}),x=w.isLoading,k=w.graphData,C=w.error,E=w.warning,S=function(e){var t=Kn({},_);t.limits.range=e,b(t)};if(te((function(){var e=new IntersectionObserver((function(e){e.forEach((function(e){return h(e.isIntersecting)}))}),{threshold:.1});return s.current&&e.observe(s.current),function(){s.current&&e.unobserve(s.current)}}),[]),!D)return fr(oo,{variant:"error",children:[fr("code",{children:'"expr"'})," not found. Check the configuration file ",fr("b",{children:a}),"."]});var A=function(){return fr("div",{className:"vm-predefined-panel-header__description vm-default-styles",children:[n&&fr(m,{children:[fr("div",{children:[fr("span",{children:"Description:"}),fr("div",{dangerouslySetInnerHTML:{__html:Af.parse(n)}})]}),fr("hr",{})]}),fr("div",{children:[fr("span",{children:"Queries:"}),fr("div",{children:i.map((function(e,t){return fr("div",{children:e},"".concat(t,"_").concat(e))}))})]})]})};return fr("div",{className:"vm-predefined-panel",ref:s,children:[fr("div",{className:"vm-predefined-panel-header",children:[fr(ho,{title:fr(A,{}),children:fr("div",{className:"vm-predefined-panel-header__info",children:fr(ai,{})})}),fr("h3",{className:"vm-predefined-panel-header__title",children:t||""}),fr("div",{className:"vm-predefined-panel-header__step",children:fr(hs,{defaultStep:l.step,setStep:y})}),fr(Ss,{yaxis:_,setYaxisLimits:S,toggleEnableLimits:function(){var e=Kn({},_);e.limits.enable=!e.limits.enable,b(e)}})]}),fr("div",{className:"vm-predefined-panel-body",children:[x&&fr(As,{}),C&&fr(oo,{variant:"error",children:C}),E&&fr(oo,{variant:"warning",children:E}),k&&fr(cs,{data:k,period:l,customStep:v,query:i,yaxis:_,unit:r,alias:u,showLegend:o,setYaxisLimits:S,setPeriod:function(e){var t=e.from,n=e.to;c({type:"SET_PERIOD",payload:{from:t,to:n}})},fullWidth:!1})]})]})},Nf=function(e){var t=e.defaultExpanded,n=void 0!==t&&t,r=e.onChange,i=e.title,o=e.children,a=_t(X(n),2),u=a[0],l=a[1];return te((function(){r&&r(u)}),[u]),fr(m,{children:[fr("header",{className:"vm-accordion-header ".concat(u&&"vm-accordion-header_open"),onClick:function(){l((function(e){return!e}))},children:[i,fr("div",{className:"vm-accordion-header__arrow ".concat(u&&"vm-accordion-header__arrow_open"),children:fr(fi,{})})]}),u&&fr("section",{className:"vm-accordion-section",children:o},"content")]})},Of=function(e){var t=e.index,n=e.title,r=e.panels,i=e.filename,o=yo(document.body),a=oe((function(){return o.width/12}),[o]),u=_t(X(!t),2),l=u[0],c=u[1],s=_t(X([]),2),f=s[0],d=s[1];te((function(){d(r&&r.map((function(e){return e.width||12})))}),[r]);var h=_t(X({start:0,target:0,enable:!1}),2),p=h[0],v=h[1],m=function(e){if(p.enable){var t=p.start,n=Math.ceil((t-e.clientX)/a);if(!(Math.abs(n)>=12)){var r=f.map((function(e,t){return e-(t===p.target?n:0)}));d(r)}}},y=function(){v(Kn(Kn({},p),{},{enable:!1}))},g=function(e){return function(t){!function(e,t){v({start:e.clientX,target:t,enable:!0})}(t,e)}};return te((function(){return window.addEventListener("mousemove",m),window.addEventListener("mouseup",y),function(){window.removeEventListener("mousemove",m),window.removeEventListener("mouseup",y)}}),[p]),fr("div",{className:"vm-predefined-dashboard",children:fr(Nf,{defaultExpanded:l,onChange:function(e){return c(e)},title:fr((function(){return fr("div",{className:Oi()({"vm-predefined-dashboard-header":!0,"vm-predefined-dashboard-header_open":l}),children:[(n||i)&&fr("span",{className:"vm-predefined-dashboard-header__title",children:n||"".concat(t+1,". ").concat(i)}),r&&fr("span",{className:"vm-predefined-dashboard-header__count",children:["(",r.length," panels)"]})]})}),{}),children:fr("div",{className:"vm-predefined-dashboard-panels",children:Array.isArray(r)&&r.length?r.map((function(e,t){return fr("div",{className:"vm-predefined-dashboard-panels-panel vm-block vm-block_empty-padding",style:{gridColumn:"span ".concat(f[t])},children:[fr(Ff,{title:e.title,description:e.description,unit:e.unit,expr:e.expr,alias:e.alias,filename:i,showLegend:e.showLegend}),fr("button",{className:"vm-predefined-dashboard-panels-panel__resizer",onMouseDown:g(t)})]},t)})):fr("div",{className:"vm-predefined-dashboard-panels-panel__alert",children:fr(oo,{variant:"error",children:[fr("code",{children:'"panels"'})," not found. Check the configuration file ",fr("b",{children:i}),"."]})})})})})},Tf=function(){!function(){var e=Wr(),t=e.duration,n=e.relativeTime,r=e.period,i=r.date,o=r.step,a=function(){var e,r=Is((qn(e={},"g0.range_input",t),qn(e,"g0.end_input",i),qn(e,"g0.step_input",o),qn(e,"g0.relative_time",n),e));ar(r)};te(a,[t,n,i,o]),te(a,[])}();var e=_t(X([]),2),t=e[0],n=e[1],r=_t(X("0"),2),i=r[0],o=r[1],a=oe((function(){return t.map((function(e,t){return{label:e.title||"",value:"".concat(t),className:"vm-predefined-panels-tabs__tab"}}))}),[t]),u=oe((function(){return t[+i]||{}}),[t,i]),l=oe((function(){return null===u||void 0===u?void 0:u.rows}),[u]),c=oe((function(){return u.title||u.filename||""}),[u]),s=oe((function(){return Array.isArray(l)&&!!l.length}),[l]);return te((function(){Hs().then((function(e){return e.length&&n(e)}))}),[]),fr("div",{className:"vm-predefined-panels",children:[!t.length&&fr(oo,{variant:"info",children:"Dashboards not found"}),a.length>1&&fr("div",{className:"vm-predefined-panels-tabs vm-block vm-block_empty-padding",children:fr(Mi,{activeItem:i,items:a,onChange:function(e){o(e)}})}),fr("div",{className:"vm-predefined-panels__dashboards",children:[s&&l.map((function(e,t){return fr(Of,{index:t,filename:c,title:e.title,panels:e.panels},"".concat(i,"_").concat(t))})),!!t.length&&!s&&fr(oo,{variant:"error",children:[fr("code",{children:'"rows"'})," not found. Check the configuration file ",fr("b",{children:c}),"."]})]})]})},Bf=function(e,t){var n=t.match?"&match[]="+encodeURIComponent(t.match):"",r=t.focusLabel?"&focusLabel="+encodeURIComponent(t.focusLabel):"";return"".concat(e,"/api/v1/status/tsdb?topN=").concat(t.topN,"&date=").concat(t.date).concat(n).concat(r)},Mf=function(){function e(){Dt(this,e),this.tsdbStatus=void 0,this.tabsNames=void 0,this.tsdbStatus=this.defaultTSDBStatus,this.tabsNames=["table","graph"]}return xt(e,[{key:"tsdbStatusData",get:function(){return this.tsdbStatus},set:function(e){this.tsdbStatus=e}},{key:"defaultTSDBStatus",get:function(){return{totalSeries:0,totalLabelValuePairs:0,seriesCountByMetricName:[],seriesCountByLabelName:[],seriesCountByFocusLabelValue:[],seriesCountByLabelValuePair:[],labelValueCountByLabelName:[]}}},{key:"keys",value:function(e){var t=[];return e&&(t=t.concat("seriesCountByFocusLabelValue")),t=t.concat("seriesCountByMetricName","seriesCountByLabelName","seriesCountByLabelValuePair","labelValueCountByLabelName"),t}},{key:"defaultState",get:function(){var e=this;return this.keys("job").reduce((function(t,n){return Kn(Kn({},t),{},{tabs:Kn(Kn({},t.tabs),{},qn({},n,e.tabsNames)),containerRefs:Kn(Kn({},t.containerRefs),{},qn({},n,re(null))),defaultActiveTab:Kn(Kn({},t.defaultActiveTab),{},qn({},n,0))})}),{tabs:{},containerRefs:{},defaultActiveTab:{}})}},{key:"sectionsTitles",value:function(e){return{seriesCountByMetricName:"Metric names with the highest number of series",seriesCountByLabelName:"Labels with the highest number of series",seriesCountByFocusLabelValue:'Values for "'.concat(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"}}},{key:"tablesHeaders",get:function(){return{seriesCountByMetricName:Lf,seriesCountByLabelName:Pf,seriesCountByFocusLabelValue:$f,seriesCountByLabelValuePair:If,labelValueCountByLabelName:Rf}}},{key:"totalSeries",value:function(e){return"labelValueCountByLabelName"===e?-1:this.tsdbStatus.totalSeries}}]),e}(),Lf=[{id:"name",label:"Metric name"},{id:"value",label:"Number of series"},{id:"percentage",label:"Percent of series"},{id:"action",label:"Action"}],Pf=[{id:"name",label:"Label name"},{id:"value",label:"Number of series"},{id:"percentage",label:"Percent of series"},{id:"action",label:"Action"}],$f=[{id:"name",label:"Label value"},{id:"value",label:"Number of series"},{id:"percentage",label:"Percent of series"},{disablePadding:!1,id:"action",label:"Action",numeric:!1}],If=[{id:"name",label:"Label=value pair"},{id:"value",label:"Number of series"},{id:"percentage",label:"Percent of series"},{id:"action",label:"Action"}],Rf=[{id:"name",label:"Label name"},{id:"value",label:"Number of unique values"},{id:"action",label:"Action"}],jf={seriesCountByMetricName:function(e,t){return zf("__name__",t)},seriesCountByLabelName:function(e,t){return"{".concat(t,'!=""}')},seriesCountByFocusLabelValue:function(e,t){return zf(e,t)},seriesCountByLabelValuePair:function(e,t){var n=t.split("="),r=n[0],i=n.slice(1).join("=");return zf(r,i)},labelValueCountByLabelName:function(e,t){return"{".concat(t,'!=""}')}},zf=function(e,t){return e?"{"+e+"="+JSON.stringify(t)+"}":""},Uf=function(e){var t=e.topN,n=e.error,r=e.query,i=e.onSetHistory,o=e.onRunQuery,a=e.onSetQuery,u=e.onTopNChange,l=e.onFocusLabelChange,c=e.totalSeries,s=e.totalLabelValuePairs,f=e.date,d=e.match,h=e.focusLabel,p=ei().autocomplete,v=ti(),m=Fs().queryOptions,y=oe((function(){return t<1?"Number must be bigger than zero":""}),[t]);return fr("div",{className:"vm-cardinality-configurator vm-block",children:[fr("div",{className:"vm-cardinality-configurator-controls",children:[fr("div",{className:"vm-cardinality-configurator-controls__query",children:fr(ss,{value:r||d||"",autocomplete:p,options:m,error:n,onArrowUp:function(){i(-1)},onArrowDown:function(){i(1)},onEnter:o,onChange:a,label:"Time series selector"})}),fr("div",{className:"vm-cardinality-configurator-controls__item",children:fr(Fo,{label:"Number of entries per table",type:"number",value:t,error:y,onChange:u})}),fr("div",{className:"vm-cardinality-configurator-controls__item",children:fr(Fo,{label:"Focus label",type:"text",value:h||"",onChange:l})}),fr("div",{className:"vm-cardinality-configurator-controls__item",children:fr(vs,{label:"Autocomplete",value:p,onChange:function(){v({type:"TOGGLE_AUTOCOMPLETE"})}})})]}),fr("div",{className:"vm-cardinality-configurator-bottom",children:[fr("div",{className:"vm-cardinality-configurator-bottom__info",children:["Analyzed ",fr("b",{children:c})," series with ",fr("b",{children:s}),' "label=value" pairs at ',fr("b",{children:f}),d&&fr("span",{children:[" for series selector ",fr("b",{children:d})]}),". Show top ",t," entries per table."]}),fr(co,{startIcon:fr(gi,{}),onClick:o,children:"Execute Query"})]})]})};function Hf(e){var t=e.order,n=e.orderBy,r=e.onRequestSort,i=e.headerCells;return fr("thead",{className:"vm-table-header",children:fr("tr",{className:"vm-table__row vm-table__row_header",children:i.map((function(e){return fr("th",{className:Oi()({"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:(i=e.id,function(e){r(e,i)}),children:fr("div",{className:"vm-table-cell__content",children:[e.label,"action"!==e.id&&"percentage"!==e.id&&fr("div",{className:Oi()({"vm-table__sort-icon":!0,"vm-table__sort-icon_active":n===e.id,"vm-table__sort-icon_desc":"desc"===t&&n===e.id}),children:fr(hi,{})})]})},e.id);var i}))})})}function Vf(e,t,n){return t[n]e[n]?1:0}function Yf(e,t){return"desc"===e?function(e,n){return Vf(e,n,t)}:function(e,n){return-Vf(e,n,t)}}function qf(e,t){var n=e.map((function(e,t){return[e,t]}));return n.sort((function(e,n){var r=t(e[0],n[0]);return 0!==r?r:e[1]-n[1]})),n.map((function(e){return e[0]}))}var Wf=function(e){var t=e.rows,n=e.headerCells,r=e.defaultSortColumn,i=e.tableCells,o=_t(X("desc"),2),a=o[0],u=o[1],l=_t(X(r),2),c=l[0],s=l[1],f=_t(X([]),2),d=f[0],h=f[1],p=function(e){return function(){var t=d.indexOf(e),n=[];-1===t?n=n.concat(d,e):0===t?n=n.concat(d.slice(1)):t===d.length-1?n=n.concat(d.slice(0,-1)):t>0&&(n=n.concat(d.slice(0,t),d.slice(t+1))),h(n)}},v=qf(t,Yf(a,c));return fr("table",{className:"vm-table",children:[fr(Hf,{numSelected:d.length,order:a,orderBy:c,onSelectAllClick:function(e){if(e.target.checked){var n=t.map((function(e){return e.name}));h(n)}else h([])},onRequestSort:function(e,t){u(c===t&&"asc"===a?"desc":"asc"),s(t)},rowCount:t.length,headerCells:n}),fr("tbody",{className:"vm-table-header",children:v.map((function(e){return fr("tr",{className:Oi()({"vm-table__row":!0,"vm-table__row_selected":(t=e.name,-1!==d.indexOf(t))}),onClick:p(e.name),children:i(e)},e.name);var t}))})]})},Qf=function(e){var t=e.row,n=e.totalSeries,r=e.onActionClick,i=n>0?t.value/n*100:-1;return fr(m,{children:[fr("td",{className:"vm-table-cell",children:t.name},t.name),fr("td",{className:"vm-table-cell",children:t.value},t.value),i>0&&fr("td",{className:"vm-table-cell",children:fr(Ns,{value:i})},t.progressValue),fr("td",{className:"vm-table-cell vm-table-cell_right",children:fr("div",{className:"vm-table-cell__content",children:fr(ho,{title:"Filter by ".concat(t.name),children:fr(co,{variant:"text",size:"small",onClick:r,children:fr(_i,{})})})})},"action")]})},Gf=function(e){var t=e.data,n=e.container,r=e.configs,i=re(null),o=_t(X(),2),a=o[0],u=o[1],l=yo(n),c=Kn(Kn({},r),{},{width:l.width||400});return te((function(){if(i.current){var e=new Pc(c,t,i.current);return u(e),e.destroy}}),[i.current,l]),te((function(){a&&a.setData(t)}),[t]),fr("div",{style:{height:"100%"},children:fr("div",{ref:i})})},Jf=function(e,t){return Math.round(e*(t=Math.pow(10,t)))/t},Zf=1,Kf=function(e,t,n,r){return Jf(t+e*(n+r),6)},Xf=function(e,t,n,r,i){var o=1-t,a=n===Zf?o/(e-1):2===n?o/e:3===n?o/(e+1):0;(isNaN(a)||a===1/0)&&(a=0);var u=n===Zf?0:2===n?a/2:3===n?a:0,l=t/e,c=Jf(l,6);if(null==r)for(var s=0;s=n&&e<=i&&t>=r&&t<=o};function td(e,t,n,r,i){var o=this;o.x=e,o.y=t,o.w=n,o.h=r,o.l=i||0,o.o=[],o.q=null}var nd={split:function(){var e=this,t=e.x,n=e.y,r=e.w/2,i=e.h/2,o=e.l+1;e.q=[new td(t+r,n,r,i,o),new td(t,n,r,i,o),new td(t,n+i,r,i,o),new td(t+r,n+i,r,i,o)]},quads:function(e,t,n,r,i){var o=this,a=o.q,u=o.x+o.w/2,l=o.y+o.h/2,c=tu,d=t+r>l;c&&f&&i(a[0]),s&&c&&i(a[1]),s&&d&&i(a[2]),f&&d&&i(a[3])},add:function(e){var t=this;if(null!=t.q)t.quads(e.x,e.y,e.w,e.h,(function(t){t.add(e)}));else{var n=t.o;if(n.push(e),n.length>10&&t.l<4){t.split();for(var r=function(e){var r=n[e];t.quads(r.x,r.y,r.w,r.h,(function(e){e.add(r)}))},i=0;i=0?"left":"right",e.ctx.textBaseline=1===s?"middle":i[n]>=0?"bottom":"top",e.ctx.fillText(i[n],f,g)}}))})),e.ctx.restore()}function b(e,t,n){return[0,Pc.rangeNum(0,n,.05,!0)[1]]}return{hooks:{drawClear:function(t){var n;if((y=y||new td(0,0,t.bbox.width,t.bbox.height)).clear(),t.series.forEach((function(e){e._paths=null})),l=d?[null].concat(m(t.data.length-1-o.length,t.data[0].length)):2===t.series.length?[null].concat(m(t.data[0].length,1)):[null].concat(function(e,t){var n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:h,r=Array.from({length:t},(function(){return{offs:Array(e).fill(0),size:Array(e).fill(0)}}));return Xf(e,n,p,null,(function(e,n,i){Xf(t,1,v,null,(function(t,o,a){r[t].offs[e]=n+i*o,r[t].size[e]=i*a}))})),r}(t.data[0].length,t.data.length-1-o.length,1===t.data[0].length?1:h)),null!=(null===(n=e.disp)||void 0===n?void 0:n.fill)){c=[null];for(var r=1;r0&&!o.includes(t)&&Pc.assign(e,{paths:g,points:{show:_}})}))}}}((rd=[1],id=0,od=1,ad=0,ud=function(e,t){return{stroke:e,fill:t}}({unit:3,values:function(e){return e.data[1].map((function(e,t){return 0!==t?"#33BB55":"#F79420"}))}},{unit:3,values:function(e){return e.data[1].map((function(e,t){return 0!==t?"#33BB55":"#F79420"}))}}),{which:rd,ori:id,dir:od,radius:ad,disp:ud}))]},cd=function(e){var t=e.rows,n=e.activeTab,r=e.onChange,i=e.tabs,o=e.chartContainer,a=e.totalSeries,u=e.tabId,l=e.onActionClick,c=e.sectionTitle,s=e.tableHeaderCells,f=oe((function(){return i.map((function(e,t){return{value:String(t),label:e,icon:fr(0===t?Di:bi,{})}}))}),[i]);return fr("div",{className:"vm-metrics-content vm-block",children:[fr("div",{className:"vm-metrics-content-header vm-section-header",children:[fr("h5",{className:"vm-section-header__title",children:c}),fr("div",{className:"vm-section-header__tabs",children:fr(Mi,{activeItem:String(n),items:f,onChange:function(e){r(e,u)}})})]}),fr("div",{ref:o,children:[0===n&&fr(Wf,{rows:t,headerCells:s,defaultSortColumn:"value",tableCells:function(e){return fr(Qf,{row:e,totalSeries:a,onActionClick:l})}}),1===n&&fr(Gf,{data:[t.map((function(e){return e.name})),t.map((function(e){return e.value})),t.map((function(e,t){return t%12==0?1:t%10==0?2:0}))],container:(null===o||void 0===o?void 0:o.current)||null,configs:ld})]})]})},sd=function(){var e=Zi(),t=e.topN,n=e.match,r=e.date,i=e.focusLabel,o=Ki();!function(){var e=Zi(),t=e.topN,n=e.match,r=e.date,i=e.focusLabel,o=e.extraLabel,a=function(){var e=Is({topN:t,date:r,match:n,extraLabel:o,focusLabel:i});ar(e)};te(a,[t,n,r,i,o]),te(a,[])}();var a=_t(X(n||""),2),u=a[0],l=a[1],c=_t(X(0),2),s=c[0],f=c[1],d=_t(X([]),2),h=d[0],p=d[1],v=function(){var e=new Mf,t=Zi(),n=t.topN,r=t.extraLabel,i=t.match,o=t.date,a=t.runQuery,u=t.focusLabel,l=hr().serverUrl,c=_t(X(!1),2),s=c[0],f=c[1],d=_t(X(),2),h=d[0],p=d[1],v=_t(X(e.defaultTSDBStatus),2),m=v[0],y=v[1];te((function(){h&&(y(e.defaultTSDBStatus),f(!1))}),[h]);var g=function(){var t=es(Kc().mark((function t(n){var r,i,o,a;return Kc().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:if(l){t.next=2;break}return t.abrupt("return");case 2:return p(""),f(!0),y(e.defaultTSDBStatus),r=Bf(l,n),t.prev=6,t.next=9,fetch(r);case 9:return i=t.sent,t.next=12,i.json();case 12:o=t.sent,i.ok?(a=o.data,y(Kn({},a)),f(!1)):(p(o.error),y(e.defaultTSDBStatus),f(!1)),t.next=20;break;case 16:t.prev=16,t.t0=t.catch(6),f(!1),t.t0 instanceof Error&&p("".concat(t.t0.name,": ").concat(t.t0.message));case 20:case"end":return t.stop()}}),t,null,[[6,16]])})));return function(e){return t.apply(this,arguments)}}();return te((function(){g({topN:n,extraLabel:r,match:i,date:o,focusLabel:u})}),[l,a,o]),e.tsdbStatusData=m,{isLoading:s,appConfigurator:e,error:h}}(),m=v.isLoading,y=v.appConfigurator,g=v.error,_=_t(X(y.defaultState.defaultActiveTab),2),b=_[0],D=_[1],w=y.tsdbStatusData,x=y.defaultState,k=y.tablesHeaders,C=function(e,t){D(Kn(Kn({},b),{},qn({},t,+e)))};return fr("div",{className:"vm-cardinality-panel",children:[m&&fr(As,{message:"Please wait while cardinality stats is calculated. \n This may take some time if the db contains big number of time series."}),fr(Uf,{error:"",query:u,topN:t,date:r,match:n,totalSeries:w.totalSeries,totalLabelValuePairs:w.totalLabelValuePairs,focusLabel:i,onRunQuery:function(){p((function(e){return[].concat(bt(e),[u])})),f((function(e){return e+1})),o({type:"SET_MATCH",payload:u}),o({type:"RUN_QUERY"})},onSetQuery:function(e){l(e)},onSetHistory:function(e){var t=s+e;t<0||t>=h.length||(f(t),l(h[t]))},onTopNChange:function(e){o({type:"SET_TOP_N",payload:+e})},onFocusLabelChange:function(e){o({type:"SET_FOCUS_LABEL",payload:e})}}),g&&fr(oo,{variant:"error",children:g}),y.keys(i).map((function(e){return fr(cd,{sectionTitle:y.sectionsTitles(i)[e],activeTab:b[e],rows:w[e],onChange:C,onActionClick:(t=e,function(e){var n=e.currentTarget.id,r=jf[t](i,n);l(r),p((function(e){return[].concat(bt(e),[r])})),f((function(e){return e+1})),o({type:"SET_MATCH",payload:r});var a="";"labelValueCountByLabelName"!==t&&"seriesCountByLabelName"!=t||(a=n),o({type:"SET_FOCUS_LABEL",payload:a}),o({type:"RUN_QUERY"})}),tabs:x.tabs[e],chartContainer:x.containerRefs[e],totalSeries:y.totalSeries(e),tabId:e,tableHeaderCells:k[e]},e);var t}))]})},fd=function(e){var t=e.rows,n=e.columns,r=_t(X(e.defaultOrderBy||"count"),2),i=r[0],o=r[1],a=_t(X("desc"),2),u=a[0],l=a[1],c=oe((function(){return qf(t,Yf(u,i))}),[t,i,u]),s=function(e){return function(){var t;t=e,l((function(e){return"asc"===e&&i===t?"desc":"asc"})),o(t)}};return fr("table",{className:"vm-table",children:[fr("thead",{className:"vm-table-header",children:fr("tr",{className:"vm-table__row vm-table__row_header",children:n.map((function(e){return fr("th",{className:"vm-table-cell vm-table-cell_header vm-table-cell_sort",onClick:s(e.key),children:fr("div",{className:"vm-table-cell__content",children:[e.title||e.key,fr("div",{className:Oi()({"vm-table__sort-icon":!0,"vm-table__sort-icon_active":i===e.key,"vm-table__sort-icon_desc":"desc"===u&&i===e.key}),children:fr(hi,{})})]})},e.key)}))})}),fr("tbody",{className:"vm-table-body",children:c.map((function(e,t){return fr("tr",{className:"vm-table__row",children:n.map((function(t){return fr("td",{className:"vm-table-cell",children:e[t.key]||"-"},t.key)}))},t)}))})]})},dd=["table","JSON"].map((function(e,t){return{value:String(t),label:e,icon:fr(0===t?Di:wi,{})}})),hd=function(e){var t=e.rows,n=e.title,r=e.columns,i=e.defaultOrderBy,o=_t(X(0),2),a=o[0],u=o[1];return fr("div",{className:"vm-top-queries-panel vm-block",children:[fr("div",{className:"vm-top-queries-panel-header vm-section-header",children:[fr("h5",{className:"vm-section-header__title",children:n}),fr("div",{className:"vm-section-header__tabs",children:fr(Mi,{activeItem:String(a),items:dd,onChange:function(e){u(+e)}})})]}),fr("div",{children:[0===a&&fr(fd,{rows:t,columns:r,defaultOrderBy:i}),1===a&&fr(ks,{data:t})]})]})},pd=function(){var e=function(){var e=hr().serverUrl,t=ro(),n=t.topN,r=t.maxLifetime,i=t.runQuery,o=_t(X(null),2),a=o[0],u=o[1],l=_t(X(!1),2),c=l[0],s=l[1],f=_t(X(),2),d=f[0],h=f[1],p=oe((function(){return function(e,t,n){return"".concat(e,"/api/v1/status/top_queries?topN=").concat(t||"","&maxLifetime=").concat(n||"")}(e,n,r)}),[e,n,r]),v=function(){var e=es(Kc().mark((function e(){var t,n;return Kc().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return s(!0),e.prev=1,e.next=4,fetch(p);case 4:return t=e.sent,e.next=7,t.json();case 7:n=e.sent,t.ok&&["topByAvgDuration","topByCount","topBySumDuration"].forEach((function(e){var t=n[e];Array.isArray(t)&&t.forEach((function(e){return e.timeRangeHours=+(e.timeRangeSeconds/3600).toFixed(2)}))})),u(t.ok?n:null),h(String(n.error||"")),e.next=16;break;case 13:e.prev=13,e.t0=e.catch(1),e.t0 instanceof Error&&"AbortError"!==e.t0.name&&h("".concat(e.t0.name,": ").concat(e.t0.message));case 16:s(!1);case 17:case"end":return e.stop()}}),e,null,[[1,13]])})));return function(){return e.apply(this,arguments)}}();return te((function(){v()}),[i]),{data:a,error:d,loading:c}}(),t=e.data,n=e.error,r=e.loading,i=ro(),o=i.topN,a=i.maxLifetime,u=ue(no).dispatch;!function(){var e=ro(),t=e.topN,n=e.maxLifetime,r=function(){var e=Is({topN:String(t),maxLifetime:n});ar(e)};te(r,[t,n]),te(r,[])}();var l=oe((function(){var e=a.trim().split(" ").reduce((function(e,t){var n=Or(t);return n?Kn(Kn({},e),n):Kn({},e)}),{});return!!yr().duration(e).asMilliseconds()}),[a]),c=oe((function(){return!!o&&o<1}),[o]),s=oe((function(){return c?"Number must be bigger than zero":""}),[c]),f=oe((function(){return l?"":"Invalid duration value"}),[l]),d=function(e){if(!t)return e;var n=t[e];return"number"===typeof n?jc(n):n||e},h=function(){u({type:"SET_RUN_QUERY"})},p=function(e){"Enter"===e.key&&h()};return te((function(){t&&(o||u({type:"SET_TOP_N",payload:+t.topN}),a||u({type:"SET_MAX_LIFE_TIME",payload:t.maxLifetime}))}),[t]),fr("div",{className:"vm-top-queries",children:[r&&fr(As,{containerStyles:{height:"500px"}}),fr("div",{className:"vm-top-queries-controls vm-block",children:[fr("div",{className:"vm-top-queries-controls__fields",children:[fr(Fo,{label:"Max lifetime",value:a,error:f,helperText:"For example ".concat("30ms, 15s, 3d4h, 1y2w"),onChange:function(e){u({type:"SET_MAX_LIFE_TIME",payload:e})},onKeyDown:p}),fr(Fo,{label:"Number of returned queries",type:"number",value:o||"",error:s,onChange:function(e){u({type:"SET_TOP_N",payload:+e})},onKeyDown:p})]}),fr("div",{className:"vm-top-queries-controls-bottom",children:[fr("div",{className:"vm-top-queries-controls-bottom__info",children:["VictoriaMetrics tracks the last\xa0",fr(ho,{title:"search.queryStats.lastQueriesCount",children:fr("b",{children:d("search.queryStats.lastQueriesCount")})}),"\xa0queries with durations at least\xa0",fr(ho,{title:"search.queryStats.minQueryDuration",children:fr("b",{children:d("search.queryStats.minQueryDuration")})})]}),fr("div",{className:"vm-top-queries-controls-bottom__button",children:fr(co,{startIcon:fr(gi,{}),onClick:h,children:"Execute"})})]})]}),n&&fr(oo,{variant:"error",children:n}),t&&fr(m,{children:fr("div",{className:"vm-top-queries-panels",children:[fr(hd,{rows:t.topByCount,title:"Most frequently executed queries",columns:[{key:"query"},{key:"timeRangeHours",title:"time range, hours"},{key:"count"}]}),fr(hd,{rows:t.topByAvgDuration,title:"Most heavy queries",columns:[{key:"query"},{key:"avgDurationSeconds",title:"avg duration, seconds"},{key:"timeRangeHours",title:"time range, hours"},{key:"count"}],defaultOrderBy:"avgDurationSeconds"}),fr(hd,{rows:t.topBySumDuration,title:"Queries with most summary time to execute",columns:[{key:"query"},{key:"sumDurationSeconds",title:"sum duration, seconds"},{key:"timeRangeHours",title:"time range, hours"},{key:"count"}],defaultOrderBy:"sumDurationSeconds"})]})})]})},vd=["primary","secondary","error","warning","info","success"],md=function(e){var t=e.setLoadingTheme,n=Xn().palette,r=void 0===n?{}:n,i=function(){vd.forEach((function(e){var t=function(e){var 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"}(Ti("color-".concat(e)));Bi("".concat(e,"-text"),t)}))};return te((function(){vd.forEach((function(e){var t=r[e];t&&Bi("color-".concat(e),t)})),function(){var e=window,t=e.innerWidth,n=e.innerHeight,r=document.documentElement,i=r.clientWidth,o=r.clientHeight;Bi("scrollbar-width","".concat(t-i,"px")),Bi("scrollbar-height","".concat(n-o,"px"))}(),i(),t(!1)}),[]),null},yd=function(){var e=_t(X(!1),2),t=e[0],n=e[1],r=_t(X([]),2),i=r[0],o=r[1],a=_t(X([]),2),u=a[0],l=a[1],s=oe((function(){return!!i.length}),[i]),f=function(){n(!0)},d=function(){n(!1)},h=function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"";l((function(n){return[{filename:t,text:": ".concat(e.message)}].concat(bt(n))}))},p=function(e,t){try{var n=JSON.parse(e),r=n.trace||n;if(!r.duration_msec)return void h(new Error(wo.traceNotFound),t);var i=new ws(r,t);o((function(e){return[i].concat(bt(e))}))}catch(c){c instanceof Error&&h(c,t)}},v=function(e){l([]),Array.from(e.target.files||[]).map((function(e){var t=new FileReader,n=(null===e||void 0===e?void 0:e.name)||"";t.onload=function(e){var t,r=String(null===(t=e.target)||void 0===t?void 0:t.result);p(r,n)},t.readAsText(e)})),e.target.value=""},m=function(e){return function(){!function(e){l((function(t){return t.filter((function(t,n){return n!==e}))}))}(e)}},y=function(){return fr("div",{className:"vm-trace-page-controls",children:[fr(co,{variant:"outlined",onClick:f,children:"Paste JSON"}),fr(ho,{title:"The file must contain tracing information in JSON format",children:fr(co,{children:["Upload Files",fr("input",{id:"json",type:"file",accept:"application/json",multiple:!0,title:" ",onChange:v})]})})]})};return fr("div",{className:"vm-trace-page",children:[fr("div",{className:"vm-trace-page-header",children:[fr("div",{className:"vm-trace-page-header-errors",children:u.map((function(e,t){return fr("div",{className:"vm-trace-page-header-errors-item",children:[fr(oo,{variant:"error",children:[fr("b",{className:"vm-trace-page-header-errors-item__filename",children:e.filename}),fr("span",{children:e.text})]}),fr(co,{className:"vm-trace-page-header-errors-item__close",startIcon:fr(ii,{}),variant:"text",color:"error",onClick:m(t)})]},"".concat(e,"_").concat(t))}))}),fr("div",{children:s&&fr(y,{})})]}),s&&fr("div",{children:fr(Bs,{jsonEditor:!0,traces:i,onDeleteClick:function(e){var t=i.filter((function(t){return t.idValue!==e.idValue}));o(bt(t))}})}),!s&&fr("div",{className:"vm-trace-page-preview",children:[fr("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",fr("a",{href:"https://docs.victoriametrics.com/#query-tracing",target:"_blank",rel:"noreferrer",children:"https://docs.victoriametrics.com/#query-tracing"}),"\n","Tracing graph will be displayed after file upload."]}),fr(y,{})]}),t&&fr(To,{title:"Paste JSON",onClose:d,children:fr(Ts,{editable:!0,displayTitle:!0,defaultTile:"JSON ".concat(i.length+1),onClose:d,onUpload:p})})]})},gd=function(){var e=_t(X(!0),2),t=e[0],n=e[1];return fr(m,t?{children:[fr(As,{}),fr(md,{setLoadingTheme:n}),";"]}:{children:fr(Un,{children:fr(lo,{children:fr(jn,{children:fr(In,{path:"/",element:fr(zo,{}),children:[fr(In,{path:Jn.home,element:fr(zs,{})}),fr(In,{path:Jn.dashboards,element:fr(Tf,{})}),fr(In,{path:Jn.cardinality,element:fr(sd,{})}),fr(In,{path:Jn.topQueries,element:fr(pd,{})}),fr(In,{path:Jn.trace,element:fr(yd,{})})]})})})})})},_d=function(e){e&&n.e(27).then(n.bind(n,27)).then((function(t){var n=t.getCLS,r=t.getFID,i=t.getFCP,o=t.getLCP,a=t.getTTFB;n(e),r(e),i(e),o(e),a(e)}))},bd=document.getElementById("root");bd&&Ve(fr(gd,{}),bd),_d()}()}(); \ No newline at end of file From 04bb2e14dd17527bc0b35cfe8de75370f97efc95 Mon Sep 17 00:00:00 2001 From: Aliaksandr Valialkin Date: Wed, 23 Nov 2022 00:11:31 +0200 Subject: [PATCH 31/46] docs/Articles.md: add a link to "The cost of scale in Prometheus ecosystem" talk --- docs/Articles.md | 1 + 1 file changed, 1 insertion(+) diff --git a/docs/Articles.md b/docs/Articles.md index 7320cbceb..5dfd39f03 100644 --- a/docs/Articles.md +++ b/docs/Articles.md @@ -110,5 +110,6 @@ See also [case studies](https://docs.victoriametrics.com/CaseStudies.html). * [How ClickHouse inspired us to build a high performance time series database](https://www.youtube.com/watch?v=p9qjb_yoBro). See also [slides](https://docs.google.com/presentation/d/1SdFrwsyR-HMXfbzrY8xfDZH_Dg6E7E5NJ84tQozMn3w/edit?usp=sharing) * [OSA Con 2022: Specifics of data analysis in Time Series Databases](https://www.youtube.com/watch?v=_zORxrgLtec) +* [CNCF Paris Meetup 2022-09-15 - VictoriaMetrics - The cost of scale in Prometheus ecosystem](https://www.youtube.com/watch?v=gcZYHpri2Hw). See also [slides](https://docs.google.com/presentation/d/1jhZuKnAXi15M-mdBP5a4ZAiyrMeHhYmzO8xcZ6pMyLc/edit?usp=sharing) * [Comparing Thanos to VictoriaMetrics cluster](https://faun.pub/comparing-thanos-to-victoriametrics-cluster-b193bea1683) * [Evaluation performance and correctness: VictoriaMetrics response](https://valyala.medium.com/evaluating-performance-and-correctness-victoriametrics-response-e27315627e87) From 3407006cdba589f84c145d8c777bbc6cf6918278 Mon Sep 17 00:00:00 2001 From: Roman Khavronenko Date: Thu, 24 Nov 2022 03:03:25 +0100 Subject: [PATCH 32/46] dashboards: cluster dashboard update (#3380) The purpose of the update is to make the dash more usable for large installations with many instances. Panels which showed metrics per-instance (Mem, CPU) now are showing metrics per-job or min/max/avg aggregations in % instead. This supposed to help immediately to identify resource shortage and remain usable for small and big installations. For cases when detailed info is needed, to the bottom of the dashboard a new row `Drilldown` was added. Panels like Mem or CPU now contain a `data-link` named `Drilldown` (cis shown on line click) which takes user to more detailed panel. The change list is the following: * bump Grafana version to 9.1.0; * replace old "Graph" panel with "TimeSeries" panel; * improve Uptime panel to show number of instances per job; * show % usage of Mem and CPU instead of absolute values; * `Caches` row was removed. All needed info for caches is now part of `Troubleshooting`; * add `Drilldown` section for detailed resource usage; * add Annotations for Alert triggers. Not all alerts are supposed to be displayed on the dashboard, but only those with label `show_at: dashboard`. See `alerts-cluster.yml` change. Signed-off-by: hagen1778 Signed-off-by: hagen1778 --- dashboards/victoriametrics-cluster.json | 13098 +++++++++++----------- deployment/docker/alerts-cluster.yml | 5 + 2 files changed, 6671 insertions(+), 6432 deletions(-) diff --git a/dashboards/victoriametrics-cluster.json b/dashboards/victoriametrics-cluster.json index 70e047bed..bef6bc6c4 100644 --- a/dashboards/victoriametrics-cluster.json +++ b/dashboards/victoriametrics-cluster.json @@ -6,13 +6,7 @@ "type": "grafana", "id": "grafana", "name": "Grafana", - "version": "9.0.3" - }, - { - "type": "panel", - "id": "graph", - "name": "Graph (old)", - "version": "" + "version": "9.1.0" }, { "type": "datasource", @@ -31,6 +25,18 @@ "id": "table", "name": "Table", "version": "" + }, + { + "type": "panel", + "id": "text", + "name": "Text", + "version": "" + }, + { + "type": "panel", + "id": "timeseries", + "name": "Time series", + "version": "" } ], "annotations": { @@ -52,15 +58,25 @@ "type": "dashboard" }, "type": "dashboard" + }, + { + "datasource": { + "type": "prometheus", + "uid": "${ds}" + }, + "enable": true, + "expr": "sum(ALERTS{alertgroup=\"vmcluster\",alertstate=\"firing\",show_at=\"dashboard\"}) by(alertname)", + "iconColor": "red", + "name": "alerts", + "titleFormat": "{{alertname}}" } ] }, - "description": "Overview for cluster VictoriaMetrics v1.79.0 or higher", + "description": "Overview for cluster VictoriaMetrics v1.83.0 or higher", "editable": true, "fiscalYearStartMonth": 0, "graphTooltip": 1, "id": null, - "iteration": 1663928613745, "links": [ { "icon": "doc", @@ -90,7 +106,7 @@ "liveNow": false, "panels": [ { - "collapsed": true, + "collapsed": false, "datasource": { "type": "prometheus", "uid": "P4169E866C3094E38" @@ -102,752 +118,767 @@ "y": 0 }, "id": 137, - "panels": [ - { - "datasource": { - "uid": "$ds" + "panels": [], + "title": "Stats", + "type": "row" + }, + { + "datasource": { + "uid": "$ds" + }, + "description": "How many datapoints are in storage", + "fieldConfig": { + "defaults": { + "color": { + "mode": "thresholds" }, - "description": "How many datapoints are in storage", - "fieldConfig": { - "defaults": { - "color": { - "mode": "thresholds" - }, - "mappings": [], - "thresholds": { - "mode": "absolute", - "steps": [ - { - "color": "green", - "value": null - } - ] - }, - "unit": "short" - }, - "overrides": [] - }, - "gridPos": { - "h": 2, - "w": 6, - "x": 0, - "y": 1 - }, - "id": 131, - "links": [], - "maxDataPoints": 100, - "options": { - "colorMode": "value", - "graphMode": "area", - "justifyMode": "auto", - "orientation": "horizontal", - "reduceOptions": { - "calcs": [ - "lastNotNull" - ], - "fields": "", - "values": false - }, - "text": {}, - "textMode": "auto" - }, - "pluginVersion": "9.0.3", - "targets": [ - { - "datasource": { - "type": "prometheus", - "uid": "$ds" - }, - "exemplar": true, - "expr": "sum(vm_rows{job=~\"$job_storage\", type!=\"indexdb\"})", - "format": "time_series", - "instant": true, - "interval": "", - "intervalFactor": 1, - "legendFormat": "", - "refId": "A" - } - ], - "title": "Total datapoints", - "type": "stat" - }, - { - "datasource": { - "uid": "$ds" - }, - "description": "The minimum free disk space left among all storage nodes.", - "fieldConfig": { - "defaults": { - "color": { - "mode": "thresholds" - }, - "mappings": [], - "thresholds": { - "mode": "absolute", - "steps": [ - { - "color": "green", - "value": null - } - ] - }, - "unit": "bytes" - }, - "overrides": [] - }, - "gridPos": { - "h": 2, - "w": 6, - "x": 6, - "y": 1 - }, - "id": 124, - "links": [], - "maxDataPoints": 100, - "options": { - "colorMode": "value", - "graphMode": "area", - "justifyMode": "auto", - "orientation": "horizontal", - "reduceOptions": { - "calcs": [ - "lastNotNull" - ], - "fields": "", - "values": false - }, - "text": {}, - "textMode": "auto" - }, - "pluginVersion": "9.0.3", - "targets": [ - { - "datasource": { - "type": "prometheus", - "uid": "$ds" - }, - "exemplar": true, - "expr": "min(vm_free_disk_space_bytes{job=~\"$job\", instance=~\"$instance\"})", - "format": "time_series", - "instant": true, - "interval": "", - "intervalFactor": 1, - "legendFormat": "", - "refId": "A" - } - ], - "title": "Min free disk space", - "type": "stat" - }, - { - "datasource": { - "uid": "$ds" - }, - "description": "Average disk usage per datapoint.", - "fieldConfig": { - "defaults": { - "color": { - "mode": "thresholds" - }, - "decimals": 2, - "mappings": [], - "thresholds": { - "mode": "absolute", - "steps": [ - { - "color": "green", - "value": null - } - ] - }, - "unit": "bytes" - }, - "overrides": [] - }, - "gridPos": { - "h": 2, - "w": 6, - "x": 12, - "y": 1 - }, - "id": 112, - "links": [], - "maxDataPoints": 100, - "options": { - "colorMode": "value", - "graphMode": "area", - "justifyMode": "auto", - "orientation": "horizontal", - "reduceOptions": { - "calcs": [ - "lastNotNull" - ], - "fields": "", - "values": false - }, - "text": {}, - "textMode": "auto" - }, - "pluginVersion": "9.0.3", - "targets": [ - { - "datasource": { - "type": "prometheus", - "uid": "$ds" - }, - "exemplar": true, - "expr": "sum(vm_data_size_bytes{job=~\"$job_storage\", type!=\"indexdb\"}) / sum(vm_rows{job=~\"$job_storage\", type!=\"indexdb\"})", - "format": "time_series", - "instant": true, - "interval": "", - "intervalFactor": 1, - "legendFormat": "", - "refId": "A" - } - ], - "title": "Bytes per point", - "type": "stat" - }, - { - "datasource": { - "uid": "$ds" - }, - "description": "Total size of allowed memory via flag `-memory.allowedPercent` for all VM components", - "fieldConfig": { - "defaults": { - "color": { - "mode": "thresholds" - }, - "mappings": [], - "thresholds": { - "mode": "absolute", - "steps": [ - { - "color": "green", - "value": null - } - ] - }, - "unit": "bytes" - }, - "overrides": [] - }, - "gridPos": { - "h": 2, - "w": 6, - "x": 18, - "y": 1 - }, - "id": 130, - "links": [], - "maxDataPoints": 100, - "options": { - "colorMode": "value", - "graphMode": "area", - "justifyMode": "auto", - "orientation": "horizontal", - "reduceOptions": { - "calcs": [ - "lastNotNull" - ], - "fields": "", - "values": false - }, - "text": {}, - "textMode": "auto" - }, - "pluginVersion": "9.0.3", - "targets": [ - { - "datasource": { - "type": "prometheus", - "uid": "$ds" - }, - "exemplar": true, - "expr": "sum(vm_allowed_memory_bytes{job=~\"$job\", instance=~\"$instance\"})", - "format": "time_series", - "instant": true, - "interval": "", - "intervalFactor": 1, - "legendFormat": "", - "refId": "A" - } - ], - "title": "Allowed memory", - "type": "stat" - }, - { - "datasource": { - "uid": "$ds" - }, - "description": "Shows the number of active time series with new data points inserted during the last hour. High value may result in ingestion slowdown. \n\nSee more details here https://docs.victoriametrics.com/FAQ.html#what-is-an-active-time-series", - "fieldConfig": { - "defaults": { - "color": { - "mode": "thresholds" - }, - "mappings": [], - "thresholds": { - "mode": "absolute", - "steps": [ - { - "color": "green", - "value": null - } - ] - }, - "unit": "short" - }, - "overrides": [] - }, - "gridPos": { - "h": 2, - "w": 6, - "x": 0, - "y": 3 - }, - "id": 34, - "links": [], - "maxDataPoints": 100, - "options": { - "colorMode": "value", - "graphMode": "area", - "justifyMode": "auto", - "orientation": "horizontal", - "reduceOptions": { - "calcs": [ - "lastNotNull" - ], - "fields": "", - "values": false - }, - "text": {}, - "textMode": "auto" - }, - "pluginVersion": "9.0.3", - "targets": [ - { - "datasource": { - "type": "prometheus", - "uid": "$ds" - }, - "exemplar": true, - "expr": "sum(vm_cache_entries{job=~\"$job\", instance=~\"$instance.*\", type=\"storage/hour_metric_ids\"})", - "format": "time_series", - "instant": true, - "interval": "", - "intervalFactor": 1, - "legendFormat": "", - "refId": "A" - } - ], - "title": "Active series", - "type": "stat" - }, - { - "datasource": { - "type": "prometheus", - "uid": "$ds" - }, - "description": "Total amount of used disk space", - "fieldConfig": { - "defaults": { - "color": { - "mode": "thresholds" - }, - "mappings": [], - "thresholds": { - "mode": "absolute", - "steps": [ - { - "color": "green", - "value": null - } - ] - }, - "unit": "bytes" - }, - "overrides": [] - }, - "gridPos": { - "h": 2, - "w": 6, - "x": 6, - "y": 3 - }, - "id": 35, - "links": [], - "maxDataPoints": 100, - "options": { - "colorMode": "value", - "graphMode": "area", - "justifyMode": "auto", - "orientation": "horizontal", - "reduceOptions": { - "calcs": [ - "lastNotNull" - ], - "fields": "", - "values": false - }, - "text": {}, - "textMode": "auto" - }, - "pluginVersion": "9.0.3", - "targets": [ - { - "datasource": { - "type": "prometheus", - "uid": "$ds" - }, - "exemplar": false, - "expr": "sum(vm_data_size_bytes{job=~\"$job_storage\"})", - "format": "time_series", - "instant": true, - "interval": "", - "intervalFactor": 1, - "legendFormat": "", - "refId": "A" - } - ], - "title": "Disk space usage", - "type": "stat" - }, - { - "datasource": { - "uid": "$ds" - }, - "description": "Total number of available CPUs for all VM components. ", - "fieldConfig": { - "defaults": { - "color": { - "mode": "thresholds" - }, - "mappings": [], - "thresholds": { - "mode": "absolute", - "steps": [ - { - "color": "green", - "value": null - } - ] - }, - "unit": "short" - }, - "overrides": [] - }, - "gridPos": { - "h": 2, - "w": 6, - "x": 12, - "y": 3 - }, - "id": 126, - "links": [], - "maxDataPoints": 100, - "options": { - "colorMode": "value", - "graphMode": "area", - "justifyMode": "auto", - "orientation": "horizontal", - "reduceOptions": { - "calcs": [ - "lastNotNull" - ], - "fields": "", - "values": false - }, - "text": {}, - "textMode": "auto" - }, - "pluginVersion": "9.0.3", - "targets": [ - { - "datasource": { - "type": "prometheus", - "uid": "$ds" - }, - "exemplar": true, - "expr": "sum(vm_available_cpu_cores{job=~\"$job\", instance=~\"$instance\"})", - "format": "time_series", - "instant": true, - "interval": "", - "intervalFactor": 1, - "legendFormat": "", - "refId": "A" - } - ], - "title": "Available CPU", - "type": "stat" - }, - { - "datasource": { - "type": "prometheus", - "uid": "$ds" - }, - "description": "Total size of available memory for all VM components.", - "fieldConfig": { - "defaults": { - "color": { - "mode": "thresholds" - }, - "mappings": [], - "thresholds": { - "mode": "absolute", - "steps": [ - { - "color": "green", - "value": null - } - ] - }, - "unit": "bytes" - }, - "overrides": [] - }, - "gridPos": { - "h": 2, - "w": 6, - "x": 18, - "y": 3 - }, - "id": 128, - "links": [], - "maxDataPoints": 100, - "options": { - "colorMode": "value", - "graphMode": "area", - "justifyMode": "auto", - "orientation": "horizontal", - "reduceOptions": { - "calcs": [ - "lastNotNull" - ], - "fields": "", - "values": false - }, - "text": {}, - "textMode": "auto" - }, - "pluginVersion": "9.0.3", - "targets": [ - { - "datasource": { - "type": "prometheus", - "uid": "$ds" - }, - "exemplar": true, - "expr": "sum(vm_available_memory_bytes{job=~\"$job\", instance=~\"$instance\"})", - "format": "time_series", - "instant": true, - "interval": "", - "intervalFactor": 1, - "legendFormat": "", - "refId": "A" - } - ], - "title": "Available memory", - "type": "stat" - }, - { - "datasource": { - "type": "prometheus", - "uid": "$ds" - }, - "fieldConfig": { - "defaults": { - "color": { - "mode": "thresholds" - }, - "custom": { - "align": "auto", - "displayMode": "auto", - "inspect": false, - "minWidth": 50 - }, - "mappings": [], - "thresholds": { - "mode": "absolute", - "steps": [ - { - "color": "green", - "value": null - }, - { - "color": "red", - "value": 80 - } - ] - } - }, - "overrides": [ + "mappings": [], + "thresholds": { + "mode": "absolute", + "steps": [ { - "matcher": { - "id": "byName", - "options": "Time" - }, - "properties": [ - { - "id": "custom.hidden", - "value": true - } - ] - }, - { - "matcher": { - "id": "byName", - "options": "Value" - }, - "properties": [ - { - "id": "displayName", - "value": "Count" - } - ] + "color": "green", + "value": null } ] }, - "gridPos": { - "h": 5, - "w": 8, - "x": 0, - "y": 5 - }, - "id": 149, - "options": { - "footer": { - "fields": "", - "reducer": [ - "sum" - ], - "show": false - }, - "showHeader": true - }, - "pluginVersion": "9.0.3", - "targets": [ - { - "datasource": { - "type": "prometheus", - "uid": "$ds" - }, - "editorMode": "code", - "exemplar": false, - "expr": "sum(vm_app_version{job=~\"$job\", instance=~\"$instance\"}) by(job, short_version)", - "format": "table", - "instant": true, - "range": false, - "refId": "A" - } - ], - "type": "table" + "unit": "short" }, + "overrides": [] + }, + "gridPos": { + "h": 3, + "w": 6, + "x": 0, + "y": 1 + }, + "id": 131, + "links": [], + "maxDataPoints": 100, + "options": { + "colorMode": "value", + "graphMode": "area", + "justifyMode": "auto", + "orientation": "horizontal", + "reduceOptions": { + "calcs": [ + "lastNotNull" + ], + "fields": "", + "values": false + }, + "text": {}, + "textMode": "auto" + }, + "pluginVersion": "9.1.0", + "targets": [ { - "aliasColors": {}, - "bars": false, - "dashLength": 10, - "dashes": false, "datasource": { + "type": "prometheus", "uid": "$ds" }, - "fieldConfig": { - "defaults": { - "links": [] - }, - "overrides": [] - }, - "fill": 0, - "fillGradient": 0, - "gridPos": { - "h": 5, - "w": 16, - "x": 8, - "y": 5 - }, - "hiddenSeries": false, - "id": 62, - "legend": { - "alignAsTable": true, - "avg": false, - "current": true, - "hideEmpty": false, - "hideZero": false, - "max": false, - "min": false, - "rightSide": true, - "show": true, - "sort": "current", - "sortDesc": false, - "total": false, - "values": true - }, - "lines": true, - "linewidth": 1, - "nullPointMode": "null as zero", - "options": { - "alertThreshold": true - }, - "percentage": false, - "pluginVersion": "9.0.3", - "pointradius": 2, - "points": false, - "renderer": "flot", - "seriesOverrides": [], - "spaceLength": 10, - "stack": false, - "steppedLine": true, - "targets": [ - { - "datasource": { - "type": "prometheus", - "uid": "$ds" - }, - "expr": "sort(sum(up{job=~\"$job\", instance=~\"$instance\"}) by (job, instance))", - "format": "time_series", - "instant": false, - "legendFormat": "{{instance}}({{job}})", - "refId": "A" - } - ], - "thresholds": [], - "timeRegions": [], - "title": "Uptime", - "tooltip": { - "shared": true, - "sort": 1, - "value_type": "individual" - }, - "type": "graph", - "xaxis": { - "mode": "time", - "show": true, - "values": [] - }, - "yaxes": [ - { - "$$hashKey": "object:1177", - "decimals": 0, - "format": "none", - "logBase": 1, - "show": true - }, - { - "$$hashKey": "object:1178", - "format": "short", - "label": "", - "logBase": 1, - "show": true - } - ], - "yaxis": { - "align": false, - "alignLevel": 2 - } + "exemplar": true, + "expr": "sum(vm_rows{job=~\"$job_storage\", type!=\"indexdb\"})", + "format": "time_series", + "instant": true, + "interval": "", + "intervalFactor": 1, + "legendFormat": "", + "refId": "A" } ], - "title": "Stats", - "type": "row" + "title": "Total datapoints", + "type": "stat" + }, + { + "datasource": { + "type": "prometheus", + "uid": "$ds" + }, + "description": "Shows the datapoints ingestion rate, including replication factor.", + "fieldConfig": { + "defaults": { + "color": { + "mode": "thresholds" + }, + "mappings": [], + "thresholds": { + "mode": "absolute", + "steps": [ + { + "color": "green", + "value": null + } + ] + }, + "unit": "short" + }, + "overrides": [] + }, + "gridPos": { + "h": 3, + "w": 6, + "x": 6, + "y": 1 + }, + "id": 124, + "links": [], + "maxDataPoints": 100, + "options": { + "colorMode": "value", + "graphMode": "area", + "justifyMode": "auto", + "orientation": "horizontal", + "reduceOptions": { + "calcs": [ + "lastNotNull" + ], + "fields": "", + "values": false + }, + "text": {}, + "textMode": "auto" + }, + "pluginVersion": "9.1.0", + "targets": [ + { + "datasource": { + "type": "prometheus", + "uid": "$ds" + }, + "editorMode": "code", + "exemplar": false, + "expr": "sum(rate(vm_vminsert_metrics_read_total{job=~\"$job_storage\", instance=~\"$instance\"}[$__rate_interval])) ", + "format": "time_series", + "instant": true, + "interval": "", + "intervalFactor": 1, + "legendFormat": "", + "range": false, + "refId": "A" + } + ], + "title": "Ingestion rate", + "type": "stat" + }, + { + "datasource": { + "type": "prometheus", + "uid": "$ds" + }, + "description": "Shows the rate of HTTP read requests.", + "fieldConfig": { + "defaults": { + "color": { + "mode": "thresholds" + }, + "mappings": [], + "thresholds": { + "mode": "absolute", + "steps": [ + { + "color": "green", + "value": null + } + ] + }, + "unit": "req/s" + }, + "overrides": [] + }, + "gridPos": { + "h": 3, + "w": 6, + "x": 12, + "y": 1 + }, + "id": 130, + "links": [], + "maxDataPoints": 100, + "options": { + "colorMode": "value", + "graphMode": "area", + "justifyMode": "auto", + "orientation": "horizontal", + "reduceOptions": { + "calcs": [ + "lastNotNull" + ], + "fields": "", + "values": false + }, + "text": {}, + "textMode": "auto" + }, + "pluginVersion": "9.1.0", + "targets": [ + { + "datasource": { + "type": "prometheus", + "uid": "$ds" + }, + "editorMode": "code", + "exemplar": true, + "expr": "sum(rate(vm_http_requests_total{job=~\"$job\", instance=~\"$instance.*\", path=~\"/select/.*\"}[$__rate_interval]))", + "format": "time_series", + "instant": true, + "interval": "", + "intervalFactor": 1, + "legendFormat": "", + "refId": "A" + } + ], + "title": "Read requests", + "type": "stat" + }, + { + "datasource": { + "type": "prometheus", + "uid": "$ds" + }, + "description": "Total number of available CPUs for all VM components. ", + "fieldConfig": { + "defaults": { + "color": { + "mode": "thresholds" + }, + "mappings": [], + "thresholds": { + "mode": "absolute", + "steps": [ + { + "color": "green", + "value": null + } + ] + }, + "unit": "short" + }, + "overrides": [] + }, + "gridPos": { + "h": 3, + "w": 6, + "x": 18, + "y": 1 + }, + "id": 126, + "links": [], + "maxDataPoints": 100, + "options": { + "colorMode": "value", + "graphMode": "area", + "justifyMode": "auto", + "orientation": "horizontal", + "reduceOptions": { + "calcs": [ + "lastNotNull" + ], + "fields": "", + "values": false + }, + "text": {}, + "textMode": "auto" + }, + "pluginVersion": "9.1.0", + "targets": [ + { + "datasource": { + "type": "prometheus", + "uid": "$ds" + }, + "editorMode": "code", + "exemplar": true, + "expr": "sum(vm_available_cpu_cores{job=~\"$job\", instance=~\"$instance\"})", + "format": "time_series", + "instant": true, + "interval": "", + "intervalFactor": 1, + "legendFormat": "", + "refId": "A" + } + ], + "title": "Available CPU", + "type": "stat" + }, + { + "datasource": { + "type": "prometheus", + "uid": "$ds" + }, + "description": "Shows the number of active time series with new data points inserted during the last hour. High value may result in ingestion slowdown. \n\nSee more details here https://docs.victoriametrics.com/FAQ.html#what-is-an-active-time-series", + "fieldConfig": { + "defaults": { + "color": { + "mode": "thresholds" + }, + "mappings": [], + "thresholds": { + "mode": "absolute", + "steps": [ + { + "color": "green", + "value": null + } + ] + }, + "unit": "short" + }, + "overrides": [] + }, + "gridPos": { + "h": 3, + "w": 6, + "x": 0, + "y": 4 + }, + "id": 34, + "links": [], + "maxDataPoints": 100, + "options": { + "colorMode": "value", + "graphMode": "area", + "justifyMode": "auto", + "orientation": "horizontal", + "reduceOptions": { + "calcs": [ + "lastNotNull" + ], + "fields": "", + "values": false + }, + "text": {}, + "textMode": "auto" + }, + "pluginVersion": "9.1.0", + "targets": [ + { + "datasource": { + "type": "prometheus", + "uid": "$ds" + }, + "editorMode": "code", + "exemplar": true, + "expr": "sum(max_over_time(vm_cache_entries{job=~\"$job\", instance=~\"$instance.*\", type=\"storage/hour_metric_ids\"}[1h]))", + "format": "time_series", + "instant": true, + "interval": "", + "intervalFactor": 1, + "legendFormat": "", + "refId": "A" + } + ], + "title": "Active series", + "type": "stat" + }, + { + "datasource": { + "type": "prometheus", + "uid": "$ds" + }, + "description": "Total amount of used disk space", + "fieldConfig": { + "defaults": { + "color": { + "mode": "thresholds" + }, + "mappings": [], + "thresholds": { + "mode": "absolute", + "steps": [ + { + "color": "green", + "value": null + } + ] + }, + "unit": "bytes" + }, + "overrides": [] + }, + "gridPos": { + "h": 3, + "w": 6, + "x": 6, + "y": 4 + }, + "id": 35, + "links": [], + "maxDataPoints": 100, + "options": { + "colorMode": "value", + "graphMode": "area", + "justifyMode": "auto", + "orientation": "horizontal", + "reduceOptions": { + "calcs": [ + "lastNotNull" + ], + "fields": "", + "values": false + }, + "text": {}, + "textMode": "auto" + }, + "pluginVersion": "9.1.0", + "targets": [ + { + "datasource": { + "type": "prometheus", + "uid": "$ds" + }, + "exemplar": false, + "expr": "sum(vm_data_size_bytes{job=~\"$job_storage\"})", + "format": "time_series", + "instant": true, + "interval": "", + "intervalFactor": 1, + "legendFormat": "", + "refId": "A" + } + ], + "title": "Disk space usage", + "type": "stat" + }, + { + "datasource": { + "uid": "$ds" + }, + "description": "Average disk usage per datapoint.", + "fieldConfig": { + "defaults": { + "color": { + "mode": "thresholds" + }, + "decimals": 2, + "mappings": [], + "thresholds": { + "mode": "absolute", + "steps": [ + { + "color": "green", + "value": null + } + ] + }, + "unit": "bytes" + }, + "overrides": [] + }, + "gridPos": { + "h": 3, + "w": 6, + "x": 12, + "y": 4 + }, + "id": 112, + "links": [], + "maxDataPoints": 100, + "options": { + "colorMode": "value", + "graphMode": "area", + "justifyMode": "auto", + "orientation": "horizontal", + "reduceOptions": { + "calcs": [ + "lastNotNull" + ], + "fields": "", + "values": false + }, + "text": {}, + "textMode": "auto" + }, + "pluginVersion": "9.1.0", + "targets": [ + { + "datasource": { + "type": "prometheus", + "uid": "$ds" + }, + "exemplar": true, + "expr": "sum(vm_data_size_bytes{job=~\"$job_storage\", type!=\"indexdb\"}) / sum(vm_rows{job=~\"$job_storage\", type!=\"indexdb\"})", + "format": "time_series", + "instant": true, + "interval": "", + "intervalFactor": 1, + "legendFormat": "", + "refId": "A" + } + ], + "title": "Bytes per point", + "type": "stat" + }, + { + "datasource": { + "type": "prometheus", + "uid": "$ds" + }, + "description": "Total size of available memory for all VM components.", + "fieldConfig": { + "defaults": { + "color": { + "mode": "thresholds" + }, + "mappings": [], + "thresholds": { + "mode": "absolute", + "steps": [ + { + "color": "green", + "value": null + } + ] + }, + "unit": "bytes" + }, + "overrides": [] + }, + "gridPos": { + "h": 3, + "w": 6, + "x": 18, + "y": 4 + }, + "id": 128, + "links": [], + "maxDataPoints": 100, + "options": { + "colorMode": "value", + "graphMode": "area", + "justifyMode": "auto", + "orientation": "horizontal", + "reduceOptions": { + "calcs": [ + "lastNotNull" + ], + "fields": "", + "values": false + }, + "text": {}, + "textMode": "auto" + }, + "pluginVersion": "9.1.0", + "targets": [ + { + "datasource": { + "type": "prometheus", + "uid": "$ds" + }, + "editorMode": "code", + "exemplar": true, + "expr": "sum(vm_available_memory_bytes{job=~\"$job\", instance=~\"$instance\"})", + "format": "time_series", + "instant": true, + "interval": "", + "intervalFactor": 1, + "legendFormat": "", + "refId": "A" + } + ], + "title": "Available memory", + "type": "stat" + }, + { + "datasource": { + "type": "prometheus", + "uid": "$ds" + }, + "fieldConfig": { + "defaults": { + "color": { + "mode": "thresholds" + }, + "custom": { + "align": "auto", + "displayMode": "auto", + "inspect": false, + "minWidth": 50 + }, + "mappings": [], + "thresholds": { + "mode": "absolute", + "steps": [ + { + "color": "green", + "value": null + }, + { + "color": "red", + "value": 80 + } + ] + } + }, + "overrides": [ + { + "matcher": { + "id": "byName", + "options": "Time" + }, + "properties": [ + { + "id": "custom.hidden", + "value": true + } + ] + }, + { + "matcher": { + "id": "byName", + "options": "Value" + }, + "properties": [ + { + "id": "displayName", + "value": "Count" + } + ] + } + ] + }, + "gridPos": { + "h": 5, + "w": 8, + "x": 0, + "y": 7 + }, + "id": 149, + "options": { + "footer": { + "fields": "", + "reducer": [ + "sum" + ], + "show": false + }, + "showHeader": true, + "sortBy": [ + { + "desc": true, + "displayName": "Count" + } + ] + }, + "pluginVersion": "9.1.0", + "targets": [ + { + "datasource": { + "type": "prometheus", + "uid": "$ds" + }, + "editorMode": "code", + "exemplar": false, + "expr": "sum(vm_app_version{job=~\"$job\", instance=~\"$instance\"}) by(job, short_version)", + "format": "table", + "instant": true, + "range": false, + "refId": "A" + } + ], + "type": "table" + }, + { + "datasource": { + "type": "prometheus", + "uid": "$ds" + }, + "fieldConfig": { + "defaults": { + "color": { + "mode": "palette-classic" + }, + "custom": { + "axisCenteredZero": false, + "axisColorMode": "text", + "axisLabel": "", + "axisPlacement": "auto", + "axisSoftMin": 0, + "barAlignment": 0, + "drawStyle": "line", + "fillOpacity": 0, + "gradientMode": "none", + "hideFrom": { + "legend": false, + "tooltip": false, + "viz": 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": 5, + "w": 16, + "x": 8, + "y": 7 + }, + "id": 62, + "options": { + "legend": { + "calcs": [ + "lastNotNull" + ], + "displayMode": "table", + "placement": "right", + "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(min_over_time(up{job=~\"$job\", instance=~\"$instance\"}[$__rate_interval])) by (job)", + "format": "time_series", + "instant": false, + "legendFormat": "{{job}}", + "refId": "A" + } + ], + "title": "Uptime ($job)", + "type": "timeseries" }, { "collapsed": false, @@ -858,7 +889,7 @@ "h": 1, "w": 24, "x": 0, - "y": 1 + "y": 12 }, "id": 10, "panels": [], @@ -866,525 +897,538 @@ "type": "row" }, { - "aliasColors": {}, - "bars": false, - "dashLength": 10, - "dashes": false, "datasource": { + "type": "prometheus", "uid": "$ds" }, - "description": "How many datapoints are inserted into storage per second by protocol and accountID", + "description": "How many datapoints are inserted into cluster per second by protocol before the replication.", "fieldConfig": { "defaults": { - "links": [] + "color": { + "mode": "palette-classic" + }, + "custom": { + "axisCenteredZero": false, + "axisColorMode": "text", + "axisLabel": "", + "axisPlacement": "auto", + "barAlignment": 0, + "drawStyle": "line", + "fillOpacity": 10, + "gradientMode": "none", + "hideFrom": { + "legend": false, + "tooltip": false, + "viz": false + }, + "lineInterpolation": "linear", + "lineStyle": { + "fill": "solid" + }, + "lineWidth": 1, + "pointSize": 5, + "scaleDistribution": { + "type": "linear" + }, + "showPoints": "never", + "spanNulls": false, + "stacking": { + "group": "A", + "mode": "normal" + }, + "thresholdsStyle": { + "mode": "off" + } + }, + "links": [], + "mappings": [], + "min": 0, + "thresholds": { + "mode": "absolute", + "steps": [ + { + "color": "green", + "value": null + }, + { + "color": "red", + "value": 80 + } + ] + }, + "unit": "short" }, "overrides": [] }, - "fill": 1, - "fillGradient": 0, "gridPos": { "h": 8, "w": 12, "x": 0, - "y": 2 + "y": 13 }, - "hiddenSeries": false, "id": 2, - "legend": { - "alignAsTable": true, - "avg": true, - "current": true, - "max": true, - "min": false, - "show": true, - "sort": "current", - "sortDesc": true, - "total": false, - "values": true - }, - "lines": true, - "linewidth": 1, - "nullPointMode": "null", "options": { - "alertThreshold": true + "legend": { + "calcs": [ + "mean", + "lastNotNull", + "max" + ], + "displayMode": "table", + "placement": "bottom", + "showLegend": true, + "sortBy": "Last *", + "sortDesc": true + }, + "tooltip": { + "mode": "multi", + "sort": "none" + } }, - "percentage": false, - "pluginVersion": "9.0.3", - "pointradius": 2, - "points": false, - "renderer": "flot", - "seriesOverrides": [], - "spaceLength": 10, - "stack": true, - "steppedLine": false, + "pluginVersion": "9.1.0", "targets": [ { "datasource": { "type": "prometheus", "uid": "$ds" }, + "editorMode": "code", "exemplar": true, - "expr": "sum(rate(vm_rows_inserted_total{job=~\"$job\", instance=~\"$instance\"}[$__rate_interval])) by (type,accountID) > 0 ", + "expr": "sum(rate(vm_rows_inserted_total{job=~\"$job\", instance=~\"$instance\"}[$__rate_interval])) by (type) > 0 ", "interval": "", "legendFormat": "{{type}}", + "range": true, "refId": "A" } ], - "thresholds": [], - "timeRegions": [], "title": "Datapoints ingestion rate ($instance)", - "tooltip": { - "shared": true, - "sort": 0, - "value_type": "individual" - }, - "type": "graph", - "xaxis": { - "mode": "time", - "show": true, - "values": [] - }, - "yaxes": [ - { - "format": "short", - "logBase": 1, - "min": "0", - "show": true - }, - { - "format": "short", - "logBase": 1, - "min": "0", - "show": true - } - ], - "yaxis": { - "align": false - } + "type": "timeseries" }, { - "aliasColors": {}, - "bars": false, - "dashLength": 10, - "dashes": false, "datasource": { + "type": "prometheus", "uid": "$ds" }, "description": "* `*` - unsupported query path\n* `/write` - insert into VM\n* `/metrics` - query VM system metrics\n* `/query` - query instant values\n* `/query_range` - query over a range of time\n* `/series` - match a certain label set\n* `/label/{}/values` - query a list of label values (variables mostly)", "fieldConfig": { "defaults": { - "links": [] + "color": { + "mode": "palette-classic" + }, + "custom": { + "axisCenteredZero": false, + "axisColorMode": "text", + "axisLabel": "", + "axisPlacement": "auto", + "barAlignment": 0, + "drawStyle": "line", + "fillOpacity": 0, + "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" + } + }, + "links": [], + "mappings": [], + "min": 0, + "thresholds": { + "mode": "absolute", + "steps": [ + { + "color": "green", + "value": null + }, + { + "color": "red", + "value": 80 + } + ] + }, + "unit": "short" }, "overrides": [] }, - "fill": 0, - "fillGradient": 0, "gridPos": { "h": 8, "w": 12, "x": 12, - "y": 2 + "y": 13 }, - "hiddenSeries": false, "id": 6, - "legend": { - "alignAsTable": true, - "avg": true, - "current": true, - "max": true, - "min": false, - "show": true, - "sort": "current", - "sortDesc": true, - "total": false, - "values": true - }, - "lines": true, - "linewidth": 1, "links": [], - "nullPointMode": "null as zero", "options": { - "alertThreshold": true + "legend": { + "calcs": [ + "mean", + "lastNotNull", + "max" + ], + "displayMode": "table", + "placement": "bottom", + "showLegend": true, + "sortBy": "Last *", + "sortDesc": true + }, + "tooltip": { + "mode": "multi", + "sort": "desc" + } }, - "percentage": false, - "pluginVersion": "9.0.3", - "pointradius": 2, - "points": false, - "renderer": "flot", - "seriesOverrides": [], - "spaceLength": 10, - "stack": false, - "steppedLine": false, + "pluginVersion": "9.1.0", "targets": [ { "datasource": { "type": "prometheus", "uid": "$ds" }, + "editorMode": "code", "expr": "sum(rate(vm_http_requests_total{job=~\"$job\", instance=~\"$instance.*\", path!~\"/favicon.ico\"}[$__rate_interval])) by (path) > 0", "format": "time_series", "intervalFactor": 1, "legendFormat": "{{path}}", + "range": true, "refId": "A" } ], - "thresholds": [], - "timeRegions": [], "title": "Requests rate ($instance)", - "tooltip": { - "shared": true, - "sort": 2, - "value_type": "individual" - }, - "type": "graph", - "xaxis": { - "mode": "time", - "show": true, - "values": [] - }, - "yaxes": [ - { - "$$hashKey": "object:3307", - "format": "short", - "logBase": 1, - "min": "0", - "show": true - }, - { - "$$hashKey": "object:3308", - "format": "short", - "logBase": 1, - "min": "0", - "show": true - } - ], - "yaxis": { - "align": false - } + "type": "timeseries" }, { - "aliasColors": {}, - "bars": false, - "dashLength": 10, - "dashes": false, "datasource": { "uid": "$ds" }, - "description": "* `*` - unsupported query path\n* `/write` - insert into VM\n* `/metrics` - query VM system metrics\n* `/query` - query instant values\n* `/query_range` - query over a range of time\n* `/series` - match a certain label set\n* `/label/{}/values` - query a list of label values (variables mostly)", + "description": "Shows the number of active time series with new data points inserted during the last hour across all storage nodes. High value may result in ingestion slowdown. \n\nSee following link for details:", "fieldConfig": { "defaults": { - "links": [] + "color": { + "mode": "palette-classic" + }, + "custom": { + "axisCenteredZero": false, + "axisColorMode": "text", + "axisLabel": "", + "axisPlacement": "auto", + "barAlignment": 0, + "drawStyle": "line", + "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" + } + }, + "links": [], + "mappings": [], + "min": 0, + "thresholds": { + "mode": "absolute", + "steps": [ + { + "color": "green" + }, + { + "color": "red", + "value": 80 + } + ] + }, + "unit": "short" }, "overrides": [] }, - "fill": 1, - "fillGradient": 0, "gridPos": { "h": 8, "w": 12, "x": 0, - "y": 10 + "y": 21 }, - "hiddenSeries": false, - "id": 52, - "legend": { - "alignAsTable": true, - "avg": true, - "current": true, - "max": true, - "min": false, - "show": true, - "sort": "current", - "sortDesc": true, - "total": false, - "values": true - }, - "lines": true, - "linewidth": 1, - "links": [], - "nullPointMode": "null as zero", + "id": 12, + "links": [ + { + "targetBlank": true, + "title": "troubleshooting", + "url": "https://github.com/VictoriaMetrics/VictoriaMetrics/blob/master/README.md#troubleshooting" + } + ], "options": { - "alertThreshold": true + "legend": { + "calcs": [ + "mean", + "lastNotNull", + "max" + ], + "displayMode": "table", + "placement": "bottom", + "showLegend": true, + "sortBy": "Last *", + "sortDesc": true + }, + "tooltip": { + "mode": "multi", + "sort": "none" + } }, - "percentage": false, - "pluginVersion": "9.0.3", - "pointradius": 2, - "points": false, - "renderer": "flot", - "seriesOverrides": [], - "spaceLength": 10, - "stack": false, - "steppedLine": false, + "pluginVersion": "9.1.0", "targets": [ { "datasource": { "type": "prometheus", "uid": "$ds" }, - "expr": "sum(rate(vm_http_request_errors_total{job=~\"$job\", instance=~\"$instance.*\"}[$__rate_interval])) by (path) > 0", + "expr": "sum(vm_cache_entries{job=~\"$job\", instance=~\"$instance.*\", type=\"storage/hour_metric_ids\"})", "format": "time_series", "intervalFactor": 1, - "legendFormat": "{{path}}", + "legendFormat": "Active time series", "refId": "A" } ], - "thresholds": [], - "timeRegions": [], - "title": "Requests error rate ($instance)", - "tooltip": { - "shared": true, - "sort": 2, - "value_type": "individual" - }, - "type": "graph", - "xaxis": { - "mode": "time", - "show": true, - "values": [] - }, - "yaxes": [ - { - "format": "short", - "logBase": 1, - "min": "0", - "show": true - }, - { - "format": "short", - "logBase": 1, - "min": "0", - "show": true - } - ], - "yaxis": { - "align": false - } + "title": "Active time series ($instance)", + "type": "timeseries" }, { - "aliasColors": {}, - "bars": false, - "dashLength": 10, - "dashes": false, "datasource": { + "type": "prometheus", "uid": "$ds" }, "description": "The less time it takes is better.\n* `*` - unsupported query path\n* `/write` - insert into VM\n* `/metrics` - query VM system metrics\n* `/query` - query instant values\n* `/query_range` - query over a range of time\n* `/series` - match a certain label set\n* `/label/{}/values` - query a list of label values (variables mostly)", "fieldConfig": { "defaults": { - "links": [] + "color": { + "mode": "palette-classic" + }, + "custom": { + "axisCenteredZero": false, + "axisColorMode": "text", + "axisLabel": "", + "axisPlacement": "auto", + "barAlignment": 0, + "drawStyle": "line", + "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" + } + }, + "links": [], + "mappings": [], + "min": 0, + "thresholds": { + "mode": "absolute", + "steps": [ + { + "color": "green" + }, + { + "color": "red", + "value": 80 + } + ] + }, + "unit": "s" }, "overrides": [] }, - "fill": 1, - "fillGradient": 0, "gridPos": { "h": 8, "w": 12, "x": 12, - "y": 10 + "y": 21 }, - "hiddenSeries": false, "id": 8, - "legend": { - "alignAsTable": true, - "avg": true, - "current": true, - "max": true, - "min": false, - "show": true, - "sort": "current", - "sortDesc": true, - "total": false, - "values": true - }, - "lines": true, - "linewidth": 1, "links": [], - "nullPointMode": "null as zero", "options": { - "alertThreshold": true + "legend": { + "calcs": [ + "mean", + "lastNotNull", + "max" + ], + "displayMode": "table", + "placement": "bottom", + "showLegend": true, + "sortBy": "Last *", + "sortDesc": true + }, + "tooltip": { + "mode": "multi", + "sort": "desc" + } }, - "percentage": false, - "pluginVersion": "9.0.3", - "pointradius": 2, - "points": false, - "renderer": "flot", - "seriesOverrides": [], - "spaceLength": 10, - "stack": false, - "steppedLine": false, + "pluginVersion": "9.1.0", "targets": [ { "datasource": { "type": "prometheus", "uid": "$ds" }, - "expr": "max(vm_request_duration_seconds{job=~\"$job\", instance=~\"$instance\", quantile=~\"(0.5|0.99)\"}) by (path, quantile) > 0", + "editorMode": "code", + "expr": "max(vm_request_duration_seconds{job=~\"$job\", instance=~\"$instance\", quantile=\"0.99\"}) by (path) > 0", "format": "time_series", "intervalFactor": 1, - "legendFormat": "{{quantile}} ({{path}})", + "legendFormat": "{{path}}", + "range": true, "refId": "A" } ], - "thresholds": [], - "timeRegions": [], - "title": "Query duration ($instance)", - "tooltip": { - "shared": true, - "sort": 2, - "value_type": "individual" - }, - "type": "graph", - "xaxis": { - "mode": "time", - "show": true, - "values": [] - }, - "yaxes": [ - { - "$$hashKey": "object:423", - "format": "s", - "logBase": 1, - "min": "0", - "show": true - }, - { - "$$hashKey": "object:424", - "format": "short", - "logBase": 1, - "min": "0", - "show": true - } - ], - "yaxis": { - "align": false - } + "title": "Query duration 0.99 quantile ($instance)", + "type": "timeseries" }, { - "aliasColors": {}, - "bars": false, - "dashLength": 10, - "dashes": false, "datasource": { + "type": "prometheus", "uid": "$ds" }, - "description": "RPC errors are interconnection errors between cluster components. Errors rate should be 0 if network connection is stable and all components are up and operational.", + "description": "* `*` - unsupported query path\n* `/write` - insert into VM\n* `/metrics` - query VM system metrics\n* `/query` - query instant values\n* `/query_range` - query over a range of time\n* `/series` - match a certain label set\n* `/label/{}/values` - query a list of label values (variables mostly)", "fieldConfig": { "defaults": { - "links": [] + "color": { + "mode": "palette-classic" + }, + "custom": { + "axisCenteredZero": false, + "axisColorMode": "text", + "axisLabel": "", + "axisPlacement": "auto", + "barAlignment": 0, + "drawStyle": "line", + "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" + } + }, + "links": [], + "mappings": [], + "min": 0, + "thresholds": { + "mode": "absolute", + "steps": [ + { + "color": "green" + }, + { + "color": "red", + "value": 80 + } + ] + }, + "unit": "short" }, "overrides": [] }, - "fill": 1, - "fillGradient": 0, "gridPos": { "h": 8, "w": 12, "x": 0, - "y": 18 + "y": 29 }, - "hiddenSeries": false, - "id": 44, - "legend": { - "alignAsTable": true, - "avg": true, - "current": true, - "max": true, - "min": false, - "show": true, - "sort": "current", - "sortDesc": true, - "total": false, - "values": true - }, - "lines": true, - "linewidth": 1, + "id": 52, "links": [], - "nullPointMode": "null", "options": { - "alertThreshold": true + "legend": { + "calcs": [ + "mean", + "lastNotNull", + "max" + ], + "displayMode": "table", + "placement": "bottom", + "showLegend": true, + "sortBy": "Last *", + "sortDesc": true + }, + "tooltip": { + "mode": "multi", + "sort": "desc" + } }, - "percentage": false, - "pluginVersion": "9.0.3", - "pointradius": 1, - "points": false, - "renderer": "flot", - "seriesOverrides": [], - "spaceLength": 10, - "stack": false, - "steppedLine": false, + "pluginVersion": "9.1.0", "targets": [ { "datasource": { "type": "prometheus", "uid": "$ds" }, - "expr": "sum(rate(vm_rpc_connection_errors_total{job=~\"$job\",instance=~\"$instance.*\"}[$__rate_interval]))", + "editorMode": "code", + "expr": "sum(rate(vm_http_request_errors_total{job=~\"$job\", instance=~\"$instance.*\"}[$__rate_interval])) by (job, path) > 0", "format": "time_series", "intervalFactor": 1, - "legendFormat": "Connection", + "legendFormat": "{{path}} ({{job}})", + "range": true, "refId": "A" - }, - { - "datasource": { - "type": "prometheus", - "uid": "$ds" - }, - "expr": "sum(rate(vm_rpc_dial_errors_total{job=~\"$job\",instance=~\"$instance.*\"}[$__rate_interval]))", - "format": "time_series", - "intervalFactor": 1, - "legendFormat": "Dial", - "refId": "B" - }, - { - "datasource": { - "type": "prometheus", - "uid": "$ds" - }, - "expr": "sum(rate(vm_rpc_handshake_errors_total{job=~\"$job\",instance=~\"$instance.*\"}[$__rate_interval]))", - "format": "time_series", - "intervalFactor": 1, - "legendFormat": "Handshake", - "refId": "E" } ], - "thresholds": [], - "timeRegions": [], - "title": "RPC errors ($instance)", - "tooltip": { - "shared": true, - "sort": 0, - "value_type": "individual" - }, - "type": "graph", - "xaxis": { - "mode": "time", - "show": true, - "values": [] - }, - "yaxes": [ - { - "format": "rps", - "logBase": 1, - "min": "0", - "show": true - }, - { - "format": "short", - "logBase": 1, - "min": "0", - "show": true - } - ], - "yaxis": { - "align": false - } + "title": "Requests error rate ($instance)", + "type": "timeseries" }, { - "aliasColors": {}, - "bars": true, - "dashLength": 10, - "dashes": false, "datasource": { "type": "prometheus", "uid": "$ds" @@ -1392,48 +1436,85 @@ "description": "Shows the rate of logging the messages by their level. Unexpected spike in rate is a good reason to check logs.", "fieldConfig": { "defaults": { - "links": [] + "color": { + "mode": "palette-classic" + }, + "custom": { + "axisCenteredZero": false, + "axisColorMode": "text", + "axisLabel": "", + "axisPlacement": "auto", + "barAlignment": 0, + "drawStyle": "bars", + "fillOpacity": 100, + "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" + } + }, + "links": [], + "mappings": [], + "min": 0, + "thresholds": { + "mode": "absolute", + "steps": [ + { + "color": "green" + }, + { + "color": "red", + "value": 80 + } + ] + }, + "unit": "short" }, "overrides": [] }, - "fill": 1, - "fillGradient": 0, "gridPos": { "h": 8, "w": 12, "x": 12, - "y": 18 + "y": 29 }, - "hiddenSeries": false, "id": 104, - "legend": { - "alignAsTable": true, - "avg": true, - "current": true, - "max": true, - "min": false, - "show": true, - "sort": "current", - "sortDesc": true, - "total": false, - "values": true - }, - "lines": false, - "linewidth": 1, "links": [], - "nullPointMode": "null", "options": { - "alertThreshold": true + "legend": { + "calcs": [ + "mean", + "lastNotNull", + "max" + ], + "displayMode": "table", + "placement": "bottom", + "showLegend": true, + "sortBy": "Last *", + "sortDesc": true + }, + "tooltip": { + "mode": "multi", + "sort": "desc" + } }, - "percentage": false, - "pluginVersion": "9.0.3", - "pointradius": 2, - "points": false, - "renderer": "flot", - "seriesOverrides": [], - "spaceLength": 10, - "stack": false, - "steppedLine": false, + "pluginVersion": "9.1.0", "targets": [ { "datasource": { @@ -1452,253 +1533,8 @@ "refId": "A" } ], - "thresholds": [], - "timeRegions": [], "title": "Logging rate", - "tooltip": { - "shared": true, - "sort": 2, - "value_type": "individual" - }, - "type": "graph", - "xaxis": { - "mode": "time", - "show": true, - "values": [] - }, - "yaxes": [ - { - "$$hashKey": "object:78", - "format": "short", - "logBase": 1, - "min": "0", - "show": true - }, - { - "$$hashKey": "object:79", - "format": "short", - "logBase": 1, - "show": true - } - ], - "yaxis": { - "align": false - } - }, - { - "aliasColors": {}, - "bars": false, - "dashLength": 10, - "dashes": false, - "datasource": { - "uid": "$ds" - }, - "description": "Shows the percentage of remaining disk space at `-storageDataPath` by instance", - "fieldConfig": { - "defaults": { - "links": [] - }, - "overrides": [] - }, - "fill": 0, - "fillGradient": 0, - "gridPos": { - "h": 8, - "w": 12, - "x": 0, - "y": 26 - }, - "hiddenSeries": false, - "id": 110, - "legend": { - "alignAsTable": true, - "avg": true, - "current": true, - "max": true, - "min": false, - "show": true, - "sort": "current", - "sortDesc": true, - "total": false, - "values": true - }, - "lines": true, - "linewidth": 1, - "links": [], - "nullPointMode": "null", - "options": { - "alertThreshold": true - }, - "percentage": false, - "pluginVersion": "9.0.3", - "pointradius": 2, - "points": false, - "renderer": "flot", - "seriesOverrides": [], - "spaceLength": 10, - "stack": false, - "steppedLine": false, - "targets": [ - { - "datasource": { - "type": "prometheus", - "uid": "$ds" - }, - "exemplar": true, - "expr": "sum(vm_data_size_bytes{job=~\"$job_storage\", instance=~\"$instance\"}) by(instance) /\n(\n sum(vm_free_disk_space_bytes{job=~\"$job_storage\", instance=~\"$instance\"}) by(instance) +\n sum(vm_data_size_bytes{job=~\"$job_storage\", instance=~\"$instance\"}) by(instance)\n)", - "format": "time_series", - "interval": "", - "intervalFactor": 1, - "legendFormat": "{{instance}}", - "refId": "A" - } - ], - "thresholds": [ - { - "$$hashKey": "object:89", - "colorMode": "critical", - "fill": true, - "line": true, - "op": "gt", - "value": 0.8, - "yaxis": "left" - } - ], - "timeRegions": [], - "title": "Disk space used ($instance)", - "tooltip": { - "shared": true, - "sort": 0, - "value_type": "individual" - }, - "type": "graph", - "xaxis": { - "mode": "time", - "show": true, - "values": [] - }, - "yaxes": [ - { - "format": "percentunit", - "logBase": 1, - "min": "0", - "show": true - }, - { - "format": "short", - "logBase": 1, - "show": true - } - ], - "yaxis": { - "align": false - } - }, - { - "aliasColors": {}, - "bars": false, - "dashLength": 10, - "dashes": false, - "datasource": { - "uid": "$ds" - }, - "description": "Shows the number of active time series with new data points inserted during the last hour. High value may result in ingestion slowdown. \n\nSee following link for details:", - "fieldConfig": { - "defaults": { - "links": [] - }, - "overrides": [] - }, - "fill": 1, - "fillGradient": 0, - "gridPos": { - "h": 8, - "w": 12, - "x": 12, - "y": 26 - }, - "hiddenSeries": false, - "id": 12, - "legend": { - "alignAsTable": true, - "avg": true, - "current": true, - "max": true, - "min": false, - "show": true, - "sort": "current", - "sortDesc": true, - "total": false, - "values": true - }, - "lines": true, - "linewidth": 1, - "links": [ - { - "targetBlank": true, - "title": "troubleshooting", - "url": "https://github.com/VictoriaMetrics/VictoriaMetrics/blob/master/README.md#troubleshooting" - } - ], - "nullPointMode": "null", - "options": { - "alertThreshold": true - }, - "percentage": false, - "pluginVersion": "9.0.3", - "pointradius": 2, - "points": false, - "renderer": "flot", - "seriesOverrides": [], - "spaceLength": 10, - "stack": false, - "steppedLine": false, - "targets": [ - { - "datasource": { - "type": "prometheus", - "uid": "$ds" - }, - "expr": "sum(vm_cache_entries{job=~\"$job\", instance=~\"$instance.*\", type=\"storage/hour_metric_ids\"})", - "format": "time_series", - "intervalFactor": 1, - "legendFormat": "Active time series", - "refId": "A" - } - ], - "thresholds": [], - "timeRegions": [], - "title": "Active time series ($instance)", - "tooltip": { - "shared": true, - "sort": 0, - "value_type": "individual" - }, - "type": "graph", - "xaxis": { - "mode": "time", - "show": true, - "values": [] - }, - "yaxes": [ - { - "$$hashKey": "object:253", - "format": "short", - "logBase": 1, - "min": "0", - "show": true - }, - { - "$$hashKey": "object:254", - "format": "short", - "logBase": 1, - "min": "0", - "show": true - } - ], - "yaxis": { - "align": false - } + "type": "timeseries" }, { "collapsed": true, @@ -1709,1128 +1545,1018 @@ "h": 1, "w": 24, "x": 0, - "y": 34 + "y": 37 }, "id": 46, "panels": [ { - "aliasColors": {}, - "bars": false, - "dashLength": 10, - "dashes": false, "datasource": { + "type": "prometheus", "uid": "$ds" }, - "description": "Amount of used memory (resident)\nContains memory share which can be freed by OS when needed.", + "description": "Percentage of used memory (resident).\nThe application's performance will significantly degrade when memory usage is close to 100%.", "fieldConfig": { "defaults": { - "links": [] + "color": { + "mode": "palette-classic" + }, + "custom": { + "axisCenteredZero": false, + "axisColorMode": "text", + "axisLabel": "", + "axisPlacement": "auto", + "barAlignment": 0, + "drawStyle": "line", + "fillOpacity": 0, + "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" + } + }, + "links": [ + { + "targetBlank": true, + "title": "Drilldown", + "url": "/d/oS7Bi_0Wz?viewPanel=189&var-job=${__field.labels.job}&var-ds=$ds&var-instance=$instance&${__url_time_range}" + } + ], + "mappings": [], + "min": 0, + "thresholds": { + "mode": "absolute", + "steps": [ + { + "color": "green" + }, + { + "color": "red", + "value": 80 + } + ] + }, + "unit": "percentunit" }, "overrides": [] }, - "fill": 0, - "fillGradient": 0, "gridPos": { "h": 8, "w": 12, "x": 0, "y": 3 }, - "hiddenSeries": false, "id": 66, - "legend": { - "alignAsTable": true, - "avg": true, - "current": true, - "max": true, - "min": false, - "show": true, - "sort": "current", - "sortDesc": true, - "total": false, - "values": true - }, - "lines": true, - "linewidth": 1, "links": [], - "nullPointMode": "null", "options": { - "alertThreshold": true + "legend": { + "calcs": [ + "mean", + "lastNotNull", + "max" + ], + "displayMode": "table", + "placement": "bottom", + "showLegend": true, + "sortBy": "Last *", + "sortDesc": true + }, + "tooltip": { + "mode": "multi", + "sort": "desc" + } }, - "percentage": false, - "pluginVersion": "9.0.3", - "pointradius": 2, - "points": false, - "renderer": "flot", - "seriesOverrides": [], - "spaceLength": 10, - "stack": false, - "steppedLine": false, + "pluginVersion": "9.1.0", "targets": [ { "datasource": { "type": "prometheus", "uid": "$ds" }, + "editorMode": "code", "exemplar": true, - "expr": "sum(process_resident_memory_bytes{job=~\"$job\", instance=~\"$instance\"}) by (job, instance)", + "expr": "max(\n max_over_time(process_resident_memory_bytes{job=~\"$job\", instance=~\"$instance\"}[$__rate_interval])\n /\n vm_available_memory_bytes{job=~\"$job\", instance=~\"$instance\"}\n) by(job)", "interval": "", - "legendFormat": "{{instance}} ({{job}})", + "legendFormat": "__auto", + "range": true, "refId": "A" } ], - "thresholds": [], - "timeRegions": [], - "title": "RSS memory usage ($instance)", - "tooltip": { - "shared": true, - "sort": 2, - "value_type": "individual" - }, - "type": "graph", - "xaxis": { - "mode": "time", - "show": true, - "values": [] - }, - "yaxes": [ - { - "format": "bytes", - "logBase": 1, - "min": "0", - "show": true - }, - { - "format": "short", - "logBase": 1, - "show": true - } - ], - "yaxis": { - "align": false - } + "title": "RSS memory % usage ($instance)", + "type": "timeseries" }, { - "aliasColors": {}, - "bars": false, - "dashLength": 10, - "dashes": false, "datasource": { "type": "prometheus", "uid": "$ds" }, - "description": "RSS share for memory allocated by the process itself. This share cannot be freed by the OS, so it must be taken into account by OOM killer.", + "description": "Share for memory allocated by the process itself. When memory usage reaches 100% it will be likely OOM-killed.", "fieldConfig": { "defaults": { - "links": [] + "color": { + "mode": "palette-classic" + }, + "custom": { + "axisCenteredZero": false, + "axisColorMode": "text", + "axisLabel": "", + "axisPlacement": "auto", + "barAlignment": 0, + "drawStyle": "line", + "fillOpacity": 0, + "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" + } + }, + "links": [ + { + "targetBlank": true, + "title": "Drilldown", + "url": "/d/oS7Bi_0Wz?viewPanel=190&var-job=${__field.labels.job}&var-ds=$ds&var-instance=$instance&${__url_time_range}" + } + ], + "mappings": [], + "min": 0, + "thresholds": { + "mode": "absolute", + "steps": [ + { + "color": "green" + }, + { + "color": "red", + "value": 80 + } + ] + }, + "unit": "percentunit" }, "overrides": [] }, - "fill": 0, - "fillGradient": 0, "gridPos": { "h": 8, "w": 12, "x": 12, "y": 3 }, - "hiddenSeries": false, "id": 138, - "legend": { - "alignAsTable": true, - "avg": true, - "current": true, - "max": true, - "min": false, - "show": true, - "sort": "current", - "sortDesc": true, - "total": false, - "values": true - }, - "lines": true, - "linewidth": 1, "links": [], - "nullPointMode": "null", "options": { - "alertThreshold": true + "legend": { + "calcs": [ + "mean", + "lastNotNull", + "max" + ], + "displayMode": "table", + "placement": "bottom", + "showLegend": true, + "sortBy": "Last *", + "sortDesc": true + }, + "tooltip": { + "mode": "multi", + "sort": "desc" + } }, - "percentage": false, - "pluginVersion": "9.0.3", - "pointradius": 2, - "points": false, - "renderer": "flot", - "seriesOverrides": [], - "spaceLength": 10, - "stack": false, - "steppedLine": false, + "pluginVersion": "9.1.0", "targets": [ { "datasource": { "type": "prometheus", "uid": "$ds" }, + "editorMode": "code", "exemplar": true, - "expr": "sum(process_resident_memory_anon_bytes{job=~\"$job\", instance=~\"$instance\"}) by (job, instance)", + "expr": "max(\n max_over_time(process_resident_memory_anon_bytes{job=~\"$job\", instance=~\"$instance\"}[$__rate_interval])\n /\n vm_available_memory_bytes{job=~\"$job\", instance=~\"$instance\"}\n) by(job)", "interval": "", - "legendFormat": "{{instance}} ({{job}})", + "legendFormat": "__auto", + "range": true, "refId": "A" } ], - "thresholds": [], - "timeRegions": [], - "title": "RSS anonymous memory usage ($instance)", - "tooltip": { - "shared": true, - "sort": 2, - "value_type": "individual" - }, - "type": "graph", - "xaxis": { - "mode": "time", - "show": true, - "values": [] - }, - "yaxes": [ - { - "$$hashKey": "object:271", - "format": "bytes", - "logBase": 1, - "min": "0", - "show": true - }, - { - "$$hashKey": "object:272", - "format": "short", - "logBase": 1, - "show": true - } - ], - "yaxis": { - "align": false - } + "title": "RSS anonymous memory % usage ($instance)", + "type": "timeseries" }, { - "aliasColors": {}, - "bars": false, - "dashLength": 10, - "dashes": false, - "datasource": { - "uid": "$ds" - }, - "fieldConfig": { - "defaults": { - "links": [] - }, - "overrides": [] - }, - "fill": 0, - "fillGradient": 0, - "gridPos": { - "h": 8, - "w": 12, - "x": 0, - "y": 11 - }, - "hiddenSeries": false, - "id": 64, - "legend": { - "alignAsTable": true, - "avg": true, - "current": true, - "max": true, - "min": false, - "show": true, - "sort": "current", - "sortDesc": true, - "total": false, - "values": true - }, - "lines": true, - "linewidth": 1, - "links": [], - "nullPointMode": "null", - "options": { - "alertThreshold": true - }, - "percentage": false, - "pluginVersion": "9.0.3", - "pointradius": 2, - "points": false, - "renderer": "flot", - "seriesOverrides": [], - "spaceLength": 10, - "stack": false, - "steppedLine": false, - "targets": [ - { - "datasource": { - "type": "prometheus", - "uid": "$ds" - }, - "exemplar": true, - "expr": "sum(rate(process_cpu_seconds_total{job=~\"$job\", instance=~\"$instance\"}[$__rate_interval])) by(job, instance)", - "format": "time_series", - "interval": "", - "intervalFactor": 1, - "legendFormat": "{{instance}} ({{job}})", - "refId": "A" - } - ], - "thresholds": [], - "timeRegions": [], - "title": "CPU ($instance)", - "tooltip": { - "shared": true, - "sort": 0, - "value_type": "individual" - }, - "type": "graph", - "xaxis": { - "mode": "time", - "show": true, - "values": [] - }, - "yaxes": [ - { - "format": "short", - "logBase": 1, - "min": "0", - "show": true - }, - { - "format": "short", - "logBase": 1, - "show": true - } - ], - "yaxis": { - "align": false - } - }, - { - "aliasColors": {}, - "bars": false, - "dashLength": 10, - "dashes": false, "datasource": { "type": "prometheus", "uid": "$ds" }, - "description": "Shows the CPU usage in the percentage from the limit.", "fieldConfig": { "defaults": { - "links": [] + "color": { + "mode": "palette-classic" + }, + "custom": { + "axisCenteredZero": false, + "axisColorMode": "text", + "axisLabel": "", + "axisPlacement": "auto", + "barAlignment": 0, + "drawStyle": "line", + "fillOpacity": 0, + "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" + } + }, + "links": [ + { + "targetBlank": true, + "title": "Drilldown", + "url": "/d/oS7Bi_0Wz?viewPanel=192&var-job=${__field.labels.job}&var-ds=$ds&var-instance=$instance&${__url_time_range}" + } + ], + "mappings": [], + "min": 0, + "thresholds": { + "mode": "absolute", + "steps": [ + { + "color": "green" + }, + { + "color": "red", + "value": 80 + } + ] + }, + "unit": "percentunit" }, "overrides": [] }, - "fill": 0, - "fillGradient": 0, "gridPos": { "h": 8, "w": 12, - "x": 12, + "x": 0, "y": 11 }, - "hiddenSeries": false, - "id": 146, - "legend": { - "alignAsTable": true, - "avg": true, - "current": true, - "max": true, - "min": false, - "show": true, - "sort": "current", - "sortDesc": true, - "total": false, - "values": true - }, - "lines": true, - "linewidth": 1, + "id": 64, "links": [], - "nullPointMode": "null", "options": { - "alertThreshold": true + "legend": { + "calcs": [ + "mean", + "lastNotNull", + "max" + ], + "displayMode": "table", + "placement": "bottom", + "showLegend": true, + "sortBy": "Last *", + "sortDesc": true + }, + "tooltip": { + "mode": "multi", + "sort": "none" + } }, - "percentage": false, - "pluginVersion": "9.0.3", - "pointradius": 2, - "points": false, - "renderer": "flot", - "seriesOverrides": [], - "spaceLength": 10, - "stack": false, - "steppedLine": false, + "pluginVersion": "9.1.0", "targets": [ { "datasource": { "type": "prometheus", "uid": "$ds" }, - "exemplar": false, - "expr": "sum(rate(process_cpu_seconds_total{job=~\"$job\", instance=~\"$instance\"}[$__rate_interval])) by(job, instance) / sum(process_cpu_cores_available{job=~\"$job\", instance=~\"$instance\"}) by(job, instance)", + "editorMode": "code", + "exemplar": true, + "expr": "max(\n rate(process_cpu_seconds_total{job=~\"$job\", instance=~\"$instance\"}[$__rate_interval])\n /\n vm_available_cpu_cores{job=~\"$job\", instance=~\"$instance\"}\n) by(job)", "format": "time_series", "interval": "", "intervalFactor": 1, - "legendFormat": "{{instance}} ({{job}})", + "legendFormat": "__auto", + "range": true, "refId": "A" } ], - "thresholds": [ - { - "$$hashKey": "object:195", - "colorMode": "critical", - "fill": true, - "line": true, - "op": "gt", - "value": 0.9, - "yaxis": "left" - } - ], - "timeRegions": [], - "title": "CPU percentage ($instance)", - "tooltip": { - "shared": true, - "sort": 0, - "value_type": "individual" - }, - "type": "graph", - "xaxis": { - "mode": "time", - "show": true, - "values": [] - }, - "yaxes": [ - { - "$$hashKey": "object:75", - "format": "percentunit", - "logBase": 1, - "min": "0", - "show": true - }, - { - "$$hashKey": "object:76", - "format": "short", - "logBase": 1, - "show": true - } - ], - "yaxis": { - "align": false - } + "title": "CPU ($instance)", + "type": "timeseries" }, { - "aliasColors": {}, - "bars": false, - "dashLength": 10, - "dashes": false, - "datasource": { - "uid": "$ds" - }, - "description": "Panel shows the number of open file descriptors in the OS.\nReaching the limit of open files can cause various issues and must be prevented.\n\nSee how to change limits here https://medium.com/@muhammadtriwibowo/set-permanently-ulimit-n-open-files-in-ubuntu-4d61064429a", - "fieldConfig": { - "defaults": { - "links": [] - }, - "overrides": [] - }, - "fill": 0, - "fillGradient": 0, - "gridPos": { - "h": 8, - "w": 12, - "x": 0, - "y": 19 - }, - "hiddenSeries": false, - "id": 117, - "legend": { - "alignAsTable": true, - "avg": true, - "current": true, - "max": true, - "min": false, - "show": true, - "sort": "current", - "sortDesc": false, - "total": false, - "values": true - }, - "lines": true, - "linewidth": 1, - "links": [], - "nullPointMode": "null", - "options": { - "alertThreshold": true - }, - "percentage": false, - "pluginVersion": "9.0.3", - "pointradius": 2, - "points": false, - "renderer": "flot", - "seriesOverrides": [ - { - "alias": "/max.*/", - "color": "#C4162A" - } - ], - "spaceLength": 10, - "stack": false, - "steppedLine": false, - "targets": [ - { - "datasource": { - "type": "prometheus", - "uid": "$ds" - }, - "exemplar": true, - "expr": "sum(process_open_fds{job=~\"$job\", instance=~\"$instance\"}) by(job, instance)", - "format": "time_series", - "interval": "", - "intervalFactor": 2, - "legendFormat": "{{instance}} ({{job}})", - "refId": "A" - }, - { - "datasource": { - "type": "prometheus", - "uid": "$ds" - }, - "exemplar": true, - "expr": "sum(process_max_fds{job=~\"$job\", instance=~\"$instance\"}) by(job, instance)", - "format": "time_series", - "interval": "", - "intervalFactor": 2, - "legendFormat": "max {{instance}} ({{job}})", - "refId": "B" - } - ], - "thresholds": [], - "timeRegions": [], - "title": "Open FDs ($instance)", - "tooltip": { - "shared": true, - "sort": 2, - "value_type": "individual" - }, - "type": "graph", - "xaxis": { - "mode": "time", - "show": true, - "values": [] - }, - "yaxes": [ - { - "decimals": 0, - "format": "short", - "logBase": 2, - "min": "0", - "show": true - }, - { - "format": "short", - "logBase": 1, - "show": true - } - ], - "yaxis": { - "align": false - } - }, - { - "aliasColors": {}, - "bars": false, - "dashLength": 10, - "dashes": false, - "datasource": { - "uid": "$ds" - }, - "description": "Shows average GC duration by instance", - "fieldConfig": { - "defaults": { - "links": [] - }, - "overrides": [] - }, - "fill": 0, - "fillGradient": 0, - "gridPos": { - "h": 8, - "w": 12, - "x": 12, - "y": 19 - }, - "hiddenSeries": false, - "id": 72, - "legend": { - "alignAsTable": true, - "avg": true, - "current": true, - "max": true, - "min": false, - "show": true, - "sort": "current", - "sortDesc": true, - "total": false, - "values": true - }, - "lines": true, - "linewidth": 1, - "links": [], - "nullPointMode": "null", - "options": { - "alertThreshold": true - }, - "percentage": false, - "pluginVersion": "9.0.3", - "pointradius": 2, - "points": false, - "renderer": "flot", - "seriesOverrides": [], - "spaceLength": 10, - "stack": false, - "steppedLine": false, - "targets": [ - { - "datasource": { - "type": "prometheus", - "uid": "$ds" - }, - "exemplar": true, - "expr": "sum(rate(go_gc_duration_seconds_sum{job=~\"$job\", instance=~\"$instance\"}[$__rate_interval])) by(job, instance)\n/\nsum(rate(go_gc_duration_seconds_count{job=~\"$job\", instance=~\"$instance\"}[$__rate_interval])) by(job, instance)", - "format": "time_series", - "interval": "", - "intervalFactor": 2, - "legendFormat": "{{instance}} ({{job}})", - "refId": "A" - } - ], - "thresholds": [], - "timeRegions": [], - "title": "GC duration ($instance)", - "tooltip": { - "shared": true, - "sort": 0, - "value_type": "individual" - }, - "type": "graph", - "xaxis": { - "mode": "time", - "show": true, - "values": [] - }, - "yaxes": [ - { - "format": "s", - "logBase": 1, - "min": "0", - "show": true - }, - { - "format": "short", - "logBase": 1, - "show": true - } - ], - "yaxis": { - "align": false - } - }, - { - "aliasColors": {}, - "bars": false, - "dashLength": 10, - "dashes": false, - "datasource": { - "uid": "$ds" - }, - "fieldConfig": { - "defaults": { - "links": [] - }, - "overrides": [] - }, - "fill": 0, - "fillGradient": 0, - "gridPos": { - "h": 8, - "w": 12, - "x": 0, - "y": 27 - }, - "hiddenSeries": false, - "id": 68, - "legend": { - "alignAsTable": true, - "avg": true, - "current": true, - "max": true, - "min": false, - "show": true, - "sort": "current", - "sortDesc": true, - "total": false, - "values": true - }, - "lines": true, - "linewidth": 1, - "links": [], - "nullPointMode": "null", - "options": { - "alertThreshold": true - }, - "percentage": false, - "pluginVersion": "9.0.3", - "pointradius": 2, - "points": false, - "renderer": "flot", - "seriesOverrides": [], - "spaceLength": 10, - "stack": false, - "steppedLine": false, - "targets": [ - { - "datasource": { - "type": "prometheus", - "uid": "$ds" - }, - "exemplar": true, - "expr": "sum(go_goroutines{job=~\"$job\", instance=~\"$instance\"}) by(job, instance)", - "format": "time_series", - "interval": "", - "intervalFactor": 2, - "legendFormat": "{{instance}} ({{job}})", - "refId": "A" - } - ], - "thresholds": [], - "timeRegions": [], - "title": "Goroutines ($instance)", - "tooltip": { - "shared": true, - "sort": 2, - "value_type": "individual" - }, - "type": "graph", - "xaxis": { - "mode": "time", - "show": true, - "values": [] - }, - "yaxes": [ - { - "decimals": 0, - "format": "short", - "logBase": 1, - "min": "0", - "show": true - }, - { - "format": "short", - "logBase": 1, - "show": true - } - ], - "yaxis": { - "align": false - } - }, - { - "aliasColors": {}, - "bars": false, - "dashLength": 10, - "dashes": false, "datasource": { + "type": "prometheus", "uid": "$ds" }, "description": "Shows the number of bytes read/write from the storage layer.", "fieldConfig": { "defaults": { - "links": [] + "color": { + "mode": "palette-classic" + }, + "custom": { + "axisCenteredZero": false, + "axisColorMode": "text", + "axisLabel": "", + "axisPlacement": "auto", + "barAlignment": 0, + "drawStyle": "line", + "fillOpacity": 0, + "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" + } + }, + "links": [], + "mappings": [], + "thresholds": { + "mode": "absolute", + "steps": [ + { + "color": "green" + }, + { + "color": "red", + "value": 80 + } + ] + }, + "unit": "Bps" + }, + "overrides": [ + { + "matcher": { + "id": "byRegexp", + "options": "/read .*/" + }, + "properties": [ + { + "id": "custom.transform", + "value": "negative-Y" + } + ] + } + ] + }, + "gridPos": { + "h": 8, + "w": 12, + "x": 12, + "y": 11 + }, + "id": 122, + "links": [], + "options": { + "legend": { + "calcs": [ + "mean", + "lastNotNull", + "max" + ], + "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", + "exemplar": true, + "expr": "sum(rate(process_io_storage_read_bytes_total{job=~\"$job\", instance=~\"$instance\"}[$__rate_interval])) by(job) > 0", + "format": "time_series", + "hide": false, + "interval": "", + "intervalFactor": 1, + "legendFormat": "read {{job}}", + "range": true, + "refId": "A" + }, + { + "datasource": { + "type": "prometheus", + "uid": "$ds" + }, + "editorMode": "code", + "expr": "sum(rate(process_io_storage_written_bytes_total{job=~\"$job\", instance=~\"$instance\"}[$__rate_interval])) by(job) > 0", + "format": "time_series", + "hide": false, + "interval": "", + "intervalFactor": 1, + "legendFormat": "write {{job}}", + "range": true, + "refId": "B" + } + ], + "title": "Disk writes/reads ($instance)", + "type": "timeseries" + }, + { + "datasource": { + "type": "prometheus", + "uid": "$ds" + }, + "description": "Shows the percentage of open file descriptors compared to the limit set in the OS.\nReaching the limit of open files can cause various issues and must be prevented.\n\nSee how to change limits here https://medium.com/@muhammadtriwibowo/set-permanently-ulimit-n-open-files-in-ubuntu-4d61064429a", + "fieldConfig": { + "defaults": { + "color": { + "mode": "palette-classic" + }, + "custom": { + "axisCenteredZero": false, + "axisColorMode": "text", + "axisLabel": "", + "axisPlacement": "auto", + "barAlignment": 0, + "drawStyle": "line", + "fillOpacity": 0, + "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" + } + }, + "decimals": 2, + "links": [], + "mappings": [], + "min": 0, + "thresholds": { + "mode": "absolute", + "steps": [ + { + "color": "green" + }, + { + "color": "red", + "value": 80 + } + ] + }, + "unit": "percentunit" + }, + "overrides": [ + { + "matcher": { + "id": "byRegexp", + "options": "/max.*/" + }, + "properties": [ + { + "id": "color", + "value": { + "fixedColor": "#C4162A", + "mode": "fixed" + } + } + ] + } + ] + }, + "gridPos": { + "h": 8, + "w": 12, + "x": 0, + "y": 19 + }, + "id": 117, + "links": [], + "options": { + "legend": { + "calcs": [ + "mean", + "lastNotNull", + "max" + ], + "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", + "exemplar": true, + "expr": "max(\n max_over_time(process_open_fds{job=~\"$job\", instance=~\"$instance\"}[$__rate_interval])\n /\n process_max_fds{job=~\"$job\", instance=~\"$instance\"}\n) by(job)", + "format": "time_series", + "interval": "", + "intervalFactor": 2, + "legendFormat": "{{job}}", + "range": true, + "refId": "A" + } + ], + "title": "Open FDs usage % ($instance)", + "type": "timeseries" + }, + { + "datasource": { + "type": "prometheus", + "uid": "$ds" + }, + "fieldConfig": { + "defaults": { + "color": { + "mode": "palette-classic" + }, + "custom": { + "axisCenteredZero": false, + "axisColorMode": "text", + "axisLabel": "", + "axisPlacement": "auto", + "barAlignment": 0, + "drawStyle": "line", + "fillOpacity": 0, + "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": 8, + "w": 12, + "x": 12, + "y": 19 + }, + "id": 119, + "options": { + "legend": { + "calcs": [ + "mean", + "lastNotNull", + "max" + ], + "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", + "exemplar": true, + "expr": "sum(max_over_time(vm_tcplistener_conns{job=~\"$job\", instance=~\"$instance\"}[$__interval])) by(job)", + "interval": "", + "legendFormat": "{{job}}", + "range": true, + "refId": "A" + } + ], + "title": "TCP connections ($instance)", + "type": "timeseries" + }, + { + "datasource": { + "type": "prometheus", + "uid": "$ds" + }, + "fieldConfig": { + "defaults": { + "color": { + "mode": "palette-classic" + }, + "custom": { + "axisCenteredZero": false, + "axisColorMode": "text", + "axisLabel": "", + "axisPlacement": "auto", + "barAlignment": 0, + "drawStyle": "line", + "fillOpacity": 0, + "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" + } + }, + "decimals": 0, + "links": [], + "mappings": [], + "min": 0, + "thresholds": { + "mode": "absolute", + "steps": [ + { + "color": "green" + }, + { + "color": "red", + "value": 80 + } + ] + }, + "unit": "short" + }, + "overrides": [] + }, + "gridPos": { + "h": 8, + "w": 12, + "x": 0, + "y": 27 + }, + "id": 68, + "links": [], + "options": { + "legend": { + "calcs": [ + "mean", + "lastNotNull", + "max" + ], + "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", + "exemplar": true, + "expr": "sum(max_over_time(go_goroutines{job=~\"$job\", instance=~\"$instance\"}[$__rate_interval])) by(job)", + "format": "time_series", + "interval": "", + "intervalFactor": 2, + "legendFormat": "__auto", + "range": true, + "refId": "A" + } + ], + "title": "Goroutines ($instance)", + "type": "timeseries" + }, + { + "datasource": { + "type": "prometheus", + "uid": "$ds" + }, + "fieldConfig": { + "defaults": { + "color": { + "mode": "palette-classic" + }, + "custom": { + "axisCenteredZero": false, + "axisColorMode": "text", + "axisLabel": "", + "axisPlacement": "auto", + "barAlignment": 0, + "drawStyle": "line", + "fillOpacity": 0, + "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": [] }, - "fill": 0, - "fillGradient": 0, "gridPos": { "h": 8, "w": 12, "x": 12, "y": 27 }, - "hiddenSeries": false, - "id": 122, - "legend": { - "alignAsTable": true, - "avg": true, - "current": true, - "max": true, - "min": false, - "show": true, - "sort": "current", - "sortDesc": true, - "total": false, - "values": true - }, - "lines": true, - "linewidth": 1, - "links": [], - "nullPointMode": "null", + "id": 120, "options": { - "alertThreshold": true - }, - "percentage": false, - "pluginVersion": "9.0.3", - "pointradius": 2, - "points": false, - "renderer": "flot", - "seriesOverrides": [ - { - "$$hashKey": "object:331", - "alias": "/read .*/", - "transform": "negative-Y" + "legend": { + "calcs": [ + "mean", + "lastNotNull", + "max" + ], + "displayMode": "table", + "placement": "bottom", + "showLegend": true, + "sortBy": "Last *", + "sortDesc": true + }, + "tooltip": { + "mode": "multi", + "sort": "desc" } - ], - "spaceLength": 10, - "stack": false, - "steppedLine": false, + }, + "pluginVersion": "9.1.0", "targets": [ { "datasource": { "type": "prometheus", "uid": "$ds" }, + "editorMode": "code", "exemplar": true, - "expr": "sum(rate(process_io_storage_read_bytes_total{job=~\"$job_storage\", instance=~\"$instance\"}[$__rate_interval])) by(instance)", - "format": "time_series", - "hide": false, + "expr": "sum(rate(vm_tcplistener_accepts_total{job=~\"$job\", instance=~\"$instance\"}[$__rate_interval])) by(job)", "interval": "", - "intervalFactor": 1, - "legendFormat": "read {{instance}}", + "legendFormat": "__auto", + "range": true, "refId": "A" - }, - { - "datasource": { - "type": "prometheus", - "uid": "$ds" - }, - "expr": "sum(rate(process_io_storage_written_bytes_total{job=~\"$job_storage\", instance=~\"$instance\"}[$__rate_interval])) by(instance)", - "format": "time_series", - "hide": false, - "interval": "", - "intervalFactor": 1, - "legendFormat": "write {{instance}}", - "refId": "B" } ], - "thresholds": [], - "timeRegions": [], - "title": "Disk writes/reads ($instance)", - "tooltip": { - "shared": true, - "sort": 0, - "value_type": "individual" - }, - "type": "graph", - "xaxis": { - "mode": "time", - "show": true, - "values": [] - }, - "yaxes": [ - { - "$$hashKey": "object:338", - "format": "bytes", - "logBase": 1, - "show": true - }, - { - "$$hashKey": "object:339", - "format": "short", - "logBase": 1, - "min": "0", - "show": true - } - ], - "yaxis": { - "align": false - } + "title": "TCP connections rate ($instance)", + "type": "timeseries" }, { - "aliasColors": {}, - "bars": false, - "dashLength": 10, - "dashes": false, "datasource": { + "type": "prometheus", "uid": "$ds" }, "fieldConfig": { "defaults": { - "links": [] + "color": { + "mode": "palette-classic" + }, + "custom": { + "axisCenteredZero": false, + "axisColorMode": "text", + "axisLabel": "", + "axisPlacement": "auto", + "barAlignment": 0, + "drawStyle": "line", + "fillOpacity": 0, + "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" + } + }, + "decimals": 0, + "links": [], + "mappings": [], + "min": 0, + "thresholds": { + "mode": "absolute", + "steps": [ + { + "color": "green" + }, + { + "color": "red", + "value": 80 + } + ] + }, + "unit": "short" }, "overrides": [] }, - "fill": 0, - "fillGradient": 0, "gridPos": { "h": 8, "w": 12, "x": 0, "y": 35 }, - "hiddenSeries": false, "id": 70, - "legend": { - "alignAsTable": true, - "avg": true, - "current": true, - "max": true, - "min": false, - "show": true, - "sort": "current", - "sortDesc": true, - "total": false, - "values": true - }, - "lines": true, - "linewidth": 1, "links": [], - "nullPointMode": "null", "options": { - "alertThreshold": true + "legend": { + "calcs": [ + "mean", + "lastNotNull", + "max" + ], + "displayMode": "table", + "placement": "bottom", + "showLegend": true, + "sortBy": "Last *", + "sortDesc": true + }, + "tooltip": { + "mode": "multi", + "sort": "desc" + } }, - "percentage": false, - "pluginVersion": "9.0.3", - "pointradius": 2, - "points": false, - "renderer": "flot", - "seriesOverrides": [], - "spaceLength": 10, - "stack": false, - "steppedLine": false, + "pluginVersion": "9.1.0", "targets": [ { "datasource": { "type": "prometheus", "uid": "$ds" }, + "editorMode": "code", "exemplar": true, - "expr": "sum(process_num_threads{job=~\"$job\", instance=~\"$instance\"}) by(job, instance)", + "expr": "sum(max_over_time(process_num_threads{job=~\"$job\", instance=~\"$instance\"}[$__rate_interval])) by(job)", "format": "time_series", "interval": "", "intervalFactor": 2, - "legendFormat": "{{instance}} ({{job}})", + "legendFormat": "__auto", + "range": true, "refId": "A" } ], - "thresholds": [], - "timeRegions": [], "title": "Threads ($instance)", - "tooltip": { - "shared": true, - "sort": 2, - "value_type": "individual" - }, - "type": "graph", - "xaxis": { - "mode": "time", - "show": true, - "values": [] - }, - "yaxes": [ - { - "decimals": 0, - "format": "short", - "logBase": 1, - "min": "0", - "show": true - }, - { - "format": "short", - "logBase": 1, - "show": true - } - ], - "yaxis": { - "align": false - } - }, - { - "aliasColors": {}, - "bars": false, - "dashLength": 10, - "dashes": false, - "datasource": { - "uid": "$ds" - }, - "fill": 0, - "fillGradient": 0, - "gridPos": { - "h": 8, - "w": 12, - "x": 12, - "y": 35 - }, - "hiddenSeries": false, - "id": 119, - "legend": { - "alignAsTable": true, - "avg": true, - "current": true, - "max": true, - "min": false, - "show": true, - "sort": "current", - "sortDesc": true, - "total": false, - "values": true - }, - "lines": true, - "linewidth": 1, - "nullPointMode": "null", - "options": { - "alertThreshold": true - }, - "percentage": false, - "pluginVersion": "9.0.3", - "pointradius": 2, - "points": false, - "renderer": "flot", - "seriesOverrides": [], - "spaceLength": 10, - "stack": false, - "steppedLine": false, - "targets": [ - { - "datasource": { - "type": "prometheus", - "uid": "$ds" - }, - "exemplar": true, - "expr": "sum(vm_tcplistener_conns{job=~\"$job\", instance=~\"$instance\"}) by(job, instance)", - "interval": "", - "legendFormat": "{{instance}} ({{job}})", - "refId": "A" - } - ], - "thresholds": [], - "timeRegions": [], - "title": "TCP connections ($instance)", - "tooltip": { - "shared": true, - "sort": 2, - "value_type": "individual" - }, - "type": "graph", - "xaxis": { - "mode": "time", - "show": true, - "values": [] - }, - "yaxes": [ - { - "format": "short", - "logBase": 1, - "show": true - }, - { - "format": "short", - "logBase": 1, - "show": true - } - ], - "yaxis": { - "align": false - } - }, - { - "aliasColors": {}, - "bars": false, - "dashLength": 10, - "dashes": false, - "datasource": { - "uid": "$ds" - }, - "fill": 0, - "fillGradient": 0, - "gridPos": { - "h": 8, - "w": 12, - "x": 12, - "y": 43 - }, - "hiddenSeries": false, - "id": 120, - "legend": { - "alignAsTable": true, - "avg": true, - "current": true, - "max": true, - "min": false, - "show": true, - "sort": "current", - "sortDesc": true, - "total": false, - "values": true - }, - "lines": true, - "linewidth": 1, - "nullPointMode": "null", - "options": { - "alertThreshold": true - }, - "percentage": false, - "pluginVersion": "9.0.3", - "pointradius": 2, - "points": false, - "renderer": "flot", - "seriesOverrides": [], - "spaceLength": 10, - "stack": false, - "steppedLine": false, - "targets": [ - { - "datasource": { - "type": "prometheus", - "uid": "$ds" - }, - "exemplar": true, - "expr": "sum(rate(vm_tcplistener_accepts_total{job=~\"$job\", instance=~\"$instance\"}[$__rate_interval])) by(job, instance)", - "interval": "", - "legendFormat": "{{instance}} ({{job}})", - "refId": "A" - } - ], - "thresholds": [], - "timeRegions": [], - "title": "TCP connections rate ($instance)", - "tooltip": { - "shared": true, - "sort": 2, - "value_type": "individual" - }, - "type": "graph", - "xaxis": { - "mode": "time", - "show": true, - "values": [] - }, - "yaxes": [ - { - "format": "short", - "logBase": 1, - "show": true - }, - { - "format": "short", - "logBase": 1, - "show": true - } - ], - "yaxis": { - "align": false - } + "type": "timeseries" } ], "title": "Resource usage ($job)", @@ -2845,67 +2571,112 @@ "h": 1, "w": 24, "x": 0, - "y": 35 + "y": 38 }, "id": 106, "panels": [ { - "aliasColors": {}, - "bars": false, - "dashLength": 10, - "dashes": false, "datasource": { "uid": "$ds" }, "description": "Shows the rate and total number of new series created over last 24h.\n\nHigh churn rate tightly connected with database performance and may result in unexpected OOM's or slow queries. It is recommended to always keep an eye on this metric to avoid unexpected cardinality \"explosions\".\n\nThe higher churn rate is, the more resources required to handle it. Consider to keep the churn rate as low as possible.\n\nTo investigate stats about most expensive series use `api/v1/status/tsdb` handler. More details here https://docs.victoriametrics.com/Cluster-VictoriaMetrics.html#url-format\n\nGood references to read:\n* https://www.robustperception.io/cardinality-is-key\n* https://valyala.medium.com/high-cardinality-tsdb-benchmarks-victoriametrics-vs-timescaledb-vs-influxdb-13e6ee64dd6b", "fieldConfig": { "defaults": { - "links": [] + "color": { + "mode": "palette-classic" + }, + "custom": { + "axisCenteredZero": false, + "axisColorMode": "text", + "axisLabel": "", + "axisPlacement": "auto", + "barAlignment": 0, + "drawStyle": "line", + "fillOpacity": 0, + "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" + } + }, + "links": [], + "mappings": [], + "min": 0, + "thresholds": { + "mode": "absolute", + "steps": [ + { + "color": "green" + }, + { + "color": "red", + "value": 80 + } + ] + }, + "unit": "short" }, - "overrides": [] + "overrides": [ + { + "matcher": { + "id": "byName", + "options": "new series over 24h" + }, + "properties": [ + { + "id": "custom.axisPlacement", + "value": "right" + }, + { + "id": "custom.axisSoftMin", + "value": 0 + } + ] + } + ] }, - "fill": 1, - "fillGradient": 0, "gridPos": { "h": 8, "w": 12, "x": 0, - "y": 4 + "y": 15 }, - "hiddenSeries": false, "id": 102, - "legend": { - "alignAsTable": true, - "avg": true, - "current": true, - "max": true, - "min": false, - "show": true, - "sort": "current", - "sortDesc": true, - "total": false, - "values": true - }, - "lines": true, - "linewidth": 1, - "nullPointMode": "null", "options": { - "alertThreshold": true - }, - "percentage": false, - "pluginVersion": "9.0.3", - "pointradius": 2, - "points": false, - "renderer": "flot", - "seriesOverrides": [ - { - "alias": "new series over 24h", - "yaxis": 2 + "legend": { + "calcs": [ + "mean", + "lastNotNull", + "max" + ], + "displayMode": "table", + "placement": "bottom", + "showLegend": true, + "sortBy": "Last *", + "sortDesc": true + }, + "tooltip": { + "mode": "multi", + "sort": "none" } - ], - "spaceLength": 10, - "stack": false, - "steppedLine": false, + }, + "pluginVersion": "9.1.0", "targets": [ { "datasource": { @@ -2931,295 +2702,304 @@ "refId": "B" } ], - "thresholds": [], - "timeRegions": [], "title": "Churn rate ($instance)", - "tooltip": { - "shared": true, - "sort": 0, - "value_type": "individual" - }, - "type": "graph", - "xaxis": { - "mode": "time", - "show": true, - "values": [] - }, - "yaxes": [ - { - "format": "short", - "logBase": 1, - "min": "0", - "show": true - }, - { - "format": "short", - "logBase": 1, - "show": true - } - ], - "yaxis": { - "align": false - } + "type": "timeseries" }, { - "aliasColors": {}, - "bars": false, - "dashLength": 10, - "dashes": false, "datasource": { "type": "prometheus", "uid": "$ds" }, - "description": "Shows the rate of adding new items to the index. It should correlate with `Slow inserts` and `Churn rate` graphs and could help to determine the pressure on indexdb.", - "fieldConfig": { - "defaults": { - "links": [] - }, - "overrides": [] - }, - "fill": 1, - "fillGradient": 0, - "gridPos": { - "h": 8, - "w": 12, - "x": 12, - "y": 4 - }, - "hiddenSeries": false, - "id": 147, - "legend": { - "alignAsTable": true, - "avg": true, - "current": true, - "max": true, - "min": false, - "show": true, - "sort": "current", - "sortDesc": true, - "total": false, - "values": true - }, - "lines": true, - "linewidth": 1, - "nullPointMode": "null", - "options": { - "alertThreshold": true - }, - "percentage": false, - "pluginVersion": "9.0.3", - "pointradius": 2, - "points": false, - "renderer": "flot", - "seriesOverrides": [], - "spaceLength": 10, - "stack": false, - "steppedLine": false, - "targets": [ - { - "datasource": { - "type": "prometheus", - "uid": "$ds" - }, - "exemplar": true, - "expr": "sum(rate(vm_indexdb_items_added_total{job=~\"$job_storage\", instance=~\"$instance\"}[$__rate_interval]))", - "interval": "", - "legendFormat": "items", - "refId": "A" - } - ], - "thresholds": [], - "timeRegions": [], - "title": "IndexDB items rate ($instance)", - "tooltip": { - "shared": true, - "sort": 0, - "value_type": "individual" - }, - "type": "graph", - "xaxis": { - "mode": "time", - "show": true, - "values": [] - }, - "yaxes": [ - { - "$$hashKey": "object:92", - "format": "short", - "logBase": 1, - "min": "0", - "show": true - }, - { - "$$hashKey": "object:93", - "format": "short", - "logBase": 1, - "show": true - } - ], - "yaxis": { - "align": false - } - }, - { - "aliasColors": {}, - "bars": false, - "dashLength": 10, - "dashes": false, - "datasource": { - "uid": "$ds" - }, "description": "The percentage of slow inserts comparing to total insertion rate during the last 5 minutes. \n\nThe less value is better. If percentage remains high (>10%) during extended periods of time, then it is likely more RAM is needed for optimal handling of the current number of active time series. \n\nIn general, VictoriaMetrics requires ~1KB or RAM per active time series, so it should be easy calculating the required amounts of RAM for the current workload according to capacity planning docs. But the resulting number may be far from the real number because the required amounts of memory depends on may other factors such as the number of labels per time series and the length of label values.", "fieldConfig": { "defaults": { - "links": [] + "color": { + "mode": "palette-classic" + }, + "custom": { + "axisCenteredZero": false, + "axisColorMode": "text", + "axisLabel": "", + "axisPlacement": "auto", + "barAlignment": 0, + "drawStyle": "line", + "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": "line+area" + } + }, + "links": [], + "mappings": [], + "min": 0, + "thresholds": { + "mode": "absolute", + "steps": [ + { + "color": "transparent" + }, + { + "color": "red", + "value": 0.1 + } + ] + }, + "unit": "percentunit" }, "overrides": [] }, - "fill": 1, - "fillGradient": 0, "gridPos": { "h": 8, "w": 12, - "x": 0, - "y": 12 + "x": 12, + "y": 15 }, - "hiddenSeries": false, "id": 108, - "legend": { - "alignAsTable": true, - "avg": true, - "current": true, - "max": true, - "min": false, - "show": true, - "sort": "current", - "sortDesc": true, - "total": false, - "values": true - }, - "lines": true, - "linewidth": 1, - "nullPointMode": "null", "options": { - "alertThreshold": true + "legend": { + "calcs": [ + "mean", + "lastNotNull", + "max" + ], + "displayMode": "table", + "placement": "bottom", + "showLegend": true + }, + "tooltip": { + "mode": "multi", + "sort": "none" + } }, - "percentage": false, - "pluginVersion": "9.0.3", - "pointradius": 2, - "points": false, - "renderer": "flot", - "seriesOverrides": [], - "spaceLength": 10, - "stack": false, - "steppedLine": false, + "pluginVersion": "9.1.0", "targets": [ { "datasource": { "type": "prometheus", "uid": "$ds" }, - "expr": "sum(rate(vm_slow_row_inserts_total{job=~\"$job_storage\"}[$__rate_interval])) / sum(rate(vm_rows_inserted_total{job=~\"$job_insert\"}[$__rate_interval]))", + "editorMode": "code", + "expr": "max(\n rate(vm_slow_row_inserts_total{job=~\"$job_storage\"}[$__rate_interval]) \n / rate(vm_rows_added_to_storage_total{job=~\"$job_storage\"}[$__rate_interval])\n)", "interval": "", "legendFormat": "slow inserts", + "range": true, "refId": "A" } ], - "thresholds": [ - { - "$$hashKey": "object:72", - "colorMode": "critical", - "fill": true, - "line": true, - "op": "gt", - "value": 0.1, - "yaxis": "left" - } - ], - "timeRegions": [], "title": "Slow inserts", - "tooltip": { - "shared": true, - "sort": 0, - "value_type": "individual" - }, - "type": "graph", - "xaxis": { - "mode": "time", - "show": true, - "values": [] - }, - "yaxes": [ - { - "$$hashKey": "object:738", - "format": "percentunit", - "logBase": 1, - "min": "0", - "show": true - }, - { - "$$hashKey": "object:739", - "format": "short", - "logBase": 1, - "show": true - } - ], - "yaxis": { - "align": false - } + "type": "timeseries" + }, + { + "datasource": { + "type": "prometheus", + "uid": "$ds" + }, + "description": "The value is above 0 when the vmstorage at the given `addr` communicates to the given vminsert node that it cannot accept new data because it is in the read-only mode.", + "fieldConfig": { + "defaults": { + "color": { + "mode": "palette-classic" + }, + "custom": { + "axisCenteredZero": false, + "axisColorMode": "text", + "axisLabel": "", + "axisPlacement": "auto", + "barAlignment": 0, + "drawStyle": "line", + "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" + } + }, + "links": [], + "mappings": [], + "min": 0, + "thresholds": { + "mode": "absolute", + "steps": [ + { + "color": "green" + }, + { + "color": "red", + "value": 80 + } + ] + }, + "unit": "short" + }, + "overrides": [] + }, + "gridPos": { + "h": 8, + "w": 12, + "x": 0, + "y": 23 + }, + "id": 142, + "links": [ + { + "targetBlank": true, + "title": "Readonly mode", + "url": "https://docs.victoriametrics.com/Cluster-VictoriaMetrics.html#readonly-mode" + } + ], + "options": { + "legend": { + "calcs": [ + "mean", + "lastNotNull", + "max" + ], + "displayMode": "table", + "placement": "bottom", + "showLegend": true + }, + "tooltip": { + "mode": "multi", + "sort": "none" + } + }, + "pluginVersion": "9.1.0", + "targets": [ + { + "datasource": { + "type": "prometheus", + "uid": "$ds" + }, + "editorMode": "code", + "exemplar": true, + "expr": "sum(vm_rpc_vmstorage_is_read_only{job=~\"$job_insert\", instance=~\"$instance\"}) by(instance, addr) > 0", + "format": "time_series", + "interval": "", + "intervalFactor": 1, + "legendFormat": "{{instance}} => {{addr}}", + "range": true, + "refId": "A" + } + ], + "title": "Storage in readonly status for vminsert ($instance)", + "type": "timeseries" }, { - "aliasColors": {}, - "bars": false, - "dashLength": 10, - "dashes": false, "datasource": { "uid": "$ds" }, "description": "Slow queries according to `search.logSlowQueryDuration` flag, which is `5s` by default.", "fieldConfig": { "defaults": { - "links": [] + "color": { + "mode": "palette-classic" + }, + "custom": { + "axisCenteredZero": false, + "axisColorMode": "text", + "axisLabel": "", + "axisPlacement": "auto", + "barAlignment": 0, + "drawStyle": "line", + "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" + } + }, + "links": [], + "mappings": [], + "min": 0, + "thresholds": { + "mode": "absolute", + "steps": [ + { + "color": "green" + }, + { + "color": "red", + "value": 80 + } + ] + }, + "unit": "short" }, "overrides": [] }, - "fill": 1, - "fillGradient": 0, "gridPos": { "h": 8, "w": 12, "x": 12, - "y": 12 + "y": 23 }, - "hiddenSeries": false, "id": 107, - "legend": { - "alignAsTable": true, - "avg": true, - "current": true, - "max": true, - "min": false, - "show": true, - "sort": "current", - "sortDesc": true, - "total": false, - "values": true - }, - "lines": true, - "linewidth": 1, - "nullPointMode": "null", "options": { - "alertThreshold": true + "legend": { + "calcs": [ + "mean", + "lastNotNull", + "max" + ], + "displayMode": "table", + "placement": "bottom", + "showLegend": true + }, + "tooltip": { + "mode": "multi", + "sort": "none" + } }, - "percentage": false, - "pluginVersion": "9.0.3", - "pointradius": 2, - "points": false, - "renderer": "flot", - "seriesOverrides": [], - "spaceLength": 10, - "stack": false, - "steppedLine": false, + "pluginVersion": "9.1.0", "targets": [ { "datasource": { @@ -3232,201 +3012,199 @@ "refId": "A" } ], - "thresholds": [], - "timeRegions": [], "title": "Slow queries rate ($instance)", - "tooltip": { - "shared": true, - "sort": 0, - "value_type": "individual" - }, - "type": "graph", - "xaxis": { - "mode": "time", - "show": true, - "values": [] - }, - "yaxes": [ - { - "$$hashKey": "object:892", - "format": "short", - "logBase": 1, - "min": "0", - "show": true - }, - { - "$$hashKey": "object:893", - "format": "short", - "logBase": 1, - "show": true - } - ], - "yaxis": { - "align": false - } + "type": "timeseries" }, { - "aliasColors": {}, - "bars": false, - "dashLength": 10, - "dashes": false, "datasource": { "type": "prometheus", "uid": "$ds" }, - "description": "The value is above 0 when the vmstorage at the given `addr` communicates to the given vminsert node that it cannot accept new data because it is in the read-only mode.", + "description": "Merge assist happens when vmstorage can't keep up with merging parts. This is usually a sign of overload for vmstorage.", "fieldConfig": { "defaults": { - "links": [] + "color": { + "mode": "palette-classic" + }, + "custom": { + "axisCenteredZero": false, + "axisColorMode": "text", + "axisLabel": "", + "axisPlacement": "auto", + "barAlignment": 0, + "drawStyle": "bars", + "fillOpacity": 100, + "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" + } + }, + "links": [], + "mappings": [], + "min": 0, + "thresholds": { + "mode": "absolute", + "steps": [ + { + "color": "green" + }, + { + "color": "red", + "value": 80 + } + ] + }, + "unit": "short" }, "overrides": [] }, - "fill": 1, - "fillGradient": 0, "gridPos": { "h": 8, "w": 12, "x": 0, - "y": 20 + "y": 31 }, - "hiddenSeries": false, - "id": 142, - "legend": { - "alignAsTable": true, - "avg": true, - "current": true, - "max": true, - "min": false, - "show": true, - "sort": "current", - "sortDesc": true, - "total": false, - "values": true - }, - "lines": true, - "linewidth": 1, - "links": [ - { - "targetBlank": true, - "title": "Readonly mode", - "url": "https://docs.victoriametrics.com/Cluster-VictoriaMetrics.html#readonly-mode" - } - ], - "nullPointMode": "null", + "id": 170, + "links": [], "options": { - "alertThreshold": true + "legend": { + "calcs": [ + "mean", + "lastNotNull", + "max" + ], + "displayMode": "table", + "placement": "bottom", + "showLegend": true + }, + "tooltip": { + "mode": "multi", + "sort": "desc" + } }, - "percentage": false, - "pluginVersion": "9.0.3", - "pointradius": 1, - "points": false, - "renderer": "flot", - "seriesOverrides": [], - "spaceLength": 10, - "stack": false, - "steppedLine": false, + "pluginVersion": "9.1.0", "targets": [ { "datasource": { "type": "prometheus", "uid": "$ds" }, + "editorMode": "code", "exemplar": true, - "expr": "sum(vm_rpc_vmstorage_is_read_only{job=~\"$job_insert\", instance=~\"$instance\"}) by(instance, addr)", + "expr": "sum(increase(vm_assisted_merges_total{job=~\"$job_storage\", instance=~\"$instance\"}[$__rate_interval])) by(type) > 0", "format": "time_series", - "interval": "", + "interval": "5m", "intervalFactor": 1, - "legendFormat": "{{instance}} => {{addr}}", + "legendFormat": "__auto", + "range": true, "refId": "A" } ], - "thresholds": [], - "timeRegions": [], - "title": "Storage in readonly status for vminsert ($instance)", - "tooltip": { - "shared": true, - "sort": 0, - "value_type": "individual" - }, - "type": "graph", - "xaxis": { - "mode": "time", - "show": true, - "values": [] - }, - "yaxes": [ - { - "$$hashKey": "object:536", - "format": "short", - "logBase": 1, - "min": "0", - "show": true - }, - { - "$$hashKey": "object:537", - "format": "short", - "logBase": 1, - "min": "0", - "show": true - } - ], - "yaxis": { - "align": false - } + "title": "Assisted merges ($instance)", + "type": "timeseries" }, { - "aliasColors": {}, - "bars": false, - "dashLength": 10, - "dashes": false, "datasource": { "uid": "$ds" }, "description": "VictoriaMetrics limits the number of labels per each metric with `-maxLabelsPerTimeseries` command-line flag.\n\nThis prevents from ingesting metrics with too many labels. The value of `maxLabelsPerTimeseries` must be adjusted for your workload.\n\nWhen limit is exceeded (graph is > 0) - extra labels are dropped, which could result in unexpected identical time series.", "fieldConfig": { "defaults": { - "links": [] + "color": { + "mode": "palette-classic" + }, + "custom": { + "axisCenteredZero": false, + "axisColorMode": "text", + "axisLabel": "", + "axisPlacement": "auto", + "barAlignment": 0, + "drawStyle": "line", + "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" + } + }, + "decimals": 2, + "links": [], + "mappings": [], + "min": 0, + "thresholds": { + "mode": "absolute", + "steps": [ + { + "color": "green" + }, + { + "color": "red", + "value": 80 + } + ] + }, + "unit": "short" }, "overrides": [] }, - "fill": 1, - "fillGradient": 0, "gridPos": { "h": 8, "w": 12, "x": 12, - "y": 20 + "y": 31 }, - "hiddenSeries": false, "id": 116, - "legend": { - "alignAsTable": true, - "avg": true, - "current": true, - "max": true, - "min": false, - "show": true, - "sort": "current", - "sortDesc": true, - "total": false, - "values": true - }, - "lines": true, - "linewidth": 1, "links": [], - "nullPointMode": "null", "options": { - "alertThreshold": true + "legend": { + "calcs": [ + "mean", + "lastNotNull", + "max" + ], + "displayMode": "table", + "placement": "bottom", + "showLegend": true + }, + "tooltip": { + "mode": "multi", + "sort": "none" + } }, - "percentage": false, - "pluginVersion": "9.0.3", - "pointradius": 2, - "points": false, - "renderer": "flot", - "seriesOverrides": [], - "spaceLength": 10, - "stack": false, - "steppedLine": false, + "pluginVersion": "9.1.0", "targets": [ { "datasource": { @@ -3443,95 +3221,91 @@ "refId": "A" } ], - "thresholds": [], - "timeRegions": [], "title": "Labels limit exceeded ($instance)", - "tooltip": { - "shared": true, - "sort": 0, - "value_type": "individual" - }, - "type": "graph", - "xaxis": { - "mode": "time", - "show": true, - "values": [] - }, - "yaxes": [ - { - "$$hashKey": "object:1046", - "decimals": 2, - "format": "short", - "logBase": 1, - "min": "0", - "show": true - }, - { - "$$hashKey": "object:1047", - "format": "short", - "logBase": 1, - "min": "0", - "show": true - } - ], - "yaxis": { - "align": false - } + "type": "timeseries" }, { - "aliasColors": {}, - "bars": true, - "dashLength": 10, - "dashes": false, "datasource": { "type": "prometheus", "uid": "$ds" }, - "description": "Merge assist happens when vmstorage can't keep up with merging parts. This is usually a sign of overload for vmstorage.", + "description": "Shows the percentage of used cache size from the allowed size by type. \nValues close to 100% show the maximum potential utilization.\nValues close to 0% show that cache is underutilized.", "fieldConfig": { "defaults": { - "links": [] + "color": { + "mode": "palette-classic" + }, + "custom": { + "axisCenteredZero": false, + "axisColorMode": "text", + "axisLabel": "", + "axisPlacement": "auto", + "barAlignment": 0, + "drawStyle": "line", + "fillOpacity": 0, + "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": "percentunit" }, "overrides": [] }, - "fill": 1, - "fillGradient": 0, "gridPos": { - "h": 8, + "h": 9, "w": 12, "x": 0, - "y": 28 + "y": 39 }, - "hiddenSeries": false, - "id": 170, - "legend": { - "alignAsTable": true, - "avg": true, - "current": true, - "max": true, - "min": false, - "show": true, - "sort": "current", - "sortDesc": true, - "total": false, - "values": true - }, - "lines": false, - "linewidth": 1, - "links": [], - "nullPointMode": "null", + "id": 144, "options": { - "alertThreshold": true + "legend": { + "calcs": [ + "mean", + "lastNotNull", + "max" + ], + "displayMode": "table", + "placement": "bottom", + "showLegend": true + }, + "tooltip": { + "mode": "multi", + "sort": "desc" + } }, - "percentage": false, - "pluginVersion": "9.0.3", - "pointradius": 1, - "points": false, - "renderer": "flot", - "seriesOverrides": [], - "spaceLength": 10, - "stack": false, - "steppedLine": false, + "pluginVersion": "9.1.0", "targets": [ { "datasource": { @@ -3540,142 +3314,250 @@ }, "editorMode": "code", "exemplar": true, - "expr": "sum(increase(vm_assisted_merges_total{job=~\"$job_storage\", instance=~\"$instance\"}[$__rate_interval])) by(type, instance) > 0", + "expr": "max(\n vm_cache_size_bytes{job=~\"$job_storage\", instance=~\"$instance\"} \n /\n vm_cache_size_max_bytes{job=~\"$job\", instance=~\"$instance\"}\n) by(type)", + "interval": "", + "legendFormat": "__auto", + "range": true, + "refId": "A" + } + ], + "title": "Cache usage % by type ($instance)", + "type": "timeseries" + }, + { + "datasource": { + "type": "prometheus", + "uid": "$ds" + }, + "description": "Shows cache miss ratio. Lower is better.", + "fieldConfig": { + "defaults": { + "color": { + "mode": "palette-classic" + }, + "custom": { + "axisCenteredZero": false, + "axisColorMode": "text", + "axisLabel": "", + "axisPlacement": "auto", + "barAlignment": 0, + "drawStyle": "line", + "fillOpacity": 0, + "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" + } + }, + "links": [], + "mappings": [], + "max": 1, + "min": 0, + "thresholds": { + "mode": "absolute", + "steps": [ + { + "color": "green" + }, + { + "color": "red", + "value": 80 + } + ] + }, + "unit": "percentunit" + }, + "overrides": [] + }, + "gridPos": { + "h": 9, + "w": 12, + "x": 12, + "y": 39 + }, + "id": 58, + "links": [], + "options": { + "legend": { + "calcs": [ + "mean", + "lastNotNull", + "max" + ], + "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", + "exemplar": true, + "expr": "max(\n rate(vm_cache_misses_total{job=~\"$job\", instance=~\"$instance\"}[$__rate_interval])\n /\n rate(vm_cache_requests_total{job=~\"$job\", instance=~\"$instance\"}[$__rate_interval])\n) by(type)", "format": "time_series", - "interval": "5m", + "hide": false, + "interval": "", "intervalFactor": 1, "legendFormat": "__auto", "range": true, "refId": "A" } ], - "thresholds": [], - "timeRegions": [], - "title": "Assisted merges ($instance)", - "tooltip": { - "shared": true, - "sort": 2, - "value_type": "individual" - }, - "type": "graph", - "xaxis": { - "mode": "time", - "show": true, - "values": [] - }, - "yaxes": [ - { - "$$hashKey": "object:536", - "format": "short", - "logBase": 1, - "min": "0", - "show": true - }, - { - "$$hashKey": "object:537", - "format": "short", - "logBase": 1, - "min": "0", - "show": true - } - ], - "yaxis": { - "align": false - } + "title": "Cache miss ratio ($instance)", + "type": "timeseries" }, { - "aliasColors": {}, - "bars": false, - "dashLength": 10, - "dashes": false, "datasource": { "type": "prometheus", - "uid": "$ds" + "uid": "${ds}" + }, + "fieldConfig": { + "defaults": { + "color": { + "mode": "thresholds" + }, + "custom": { + "align": "auto", + "displayMode": "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 + } + ] + } + ] }, - "description": "Shows the percentage of used cache size from the allowed size by type. \nValues close to 100% show the maximum potential utilization.\nValues close to 0% show that cache is underutilized.", - "fill": 0, - "fillGradient": 0, "gridPos": { - "h": 8, - "w": 12, - "x": 12, - "y": 28 + "h": 7, + "w": 24, + "x": 0, + "y": 48 }, - "hiddenSeries": false, - "id": 144, - "legend": { - "alignAsTable": true, - "avg": true, - "current": true, - "max": true, - "min": false, - "show": true, - "sort": "current", - "sortDesc": true, - "total": false, - "values": true - }, - "lines": true, - "linewidth": 1, - "nullPointMode": "null", + "id": 183, "options": { - "alertThreshold": true + "footer": { + "fields": "", + "reducer": [ + "sum" + ], + "show": false + }, + "showHeader": true, + "sortBy": [ + { + "desc": true, + "displayName": "job" + } + ] }, - "percentage": false, - "pluginVersion": "9.0.3", - "pointradius": 2, - "points": false, - "renderer": "flot", - "seriesOverrides": [], - "spaceLength": 10, - "stack": false, - "steppedLine": false, + "pluginVersion": "9.1.0", "targets": [ { "datasource": { "type": "prometheus", - "uid": "$ds" + "uid": "${ds}" }, "editorMode": "code", - "exemplar": true, - "expr": "vm_cache_size_bytes{job=~\"$job_storage\", instance=~\"$instance\"} / vm_cache_size_max_bytes{job=~\"$job\", instance=~\"$instance\"}", - "interval": "", - "legendFormat": "{{ instance }} / {{ type }}", - "range": true, + "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" } ], - "thresholds": [], - "timeRegions": [], - "title": "Cache usage % by vmstorage ($instance)", - "tooltip": { - "shared": true, - "sort": 2, - "value_type": "individual" - }, - "type": "graph", - "xaxis": { - "mode": "time", - "show": true, - "values": [] - }, - "yaxes": [ + "title": "Non-default flags", + "transformations": [ { - "$$hashKey": "object:107", - "format": "percentunit", - "logBase": 1, - "show": true - }, - { - "$$hashKey": "object:108", - "format": "short", - "logBase": 1, - "show": true + "id": "groupBy", + "options": { + "fields": { + "instance": { + "aggregations": [ + "uniqueValues" + ], + "operation": "aggregate" + }, + "job": { + "aggregations": [], + "operation": "groupby" + }, + "name": { + "aggregations": [], + "operation": "groupby" + }, + "value": { + "aggregations": [], + "operation": "groupby" + } + } + } } ], - "yaxis": { - "align": false - } + "type": "table" } ], "title": "Troubleshooting", @@ -3690,73 +3572,107 @@ "h": 1, "w": 24, "x": 0, - "y": 36 + "y": 39 }, "id": 48, "panels": [ { - "aliasColors": {}, - "bars": false, - "dashLength": 10, - "dashes": false, "datasource": { + "type": "prometheus", "uid": "$ds" }, "description": "Shows number of pushed and sent rows. \n* `Pushed rows` - rows added to internal inserter buffers before send\n* `Sent rows` - successfully transmitted rows to storage nodes\n\nPlease note, it could be that `Sent > Pushed` because of the replication factor.", "fieldConfig": { "defaults": { - "links": [] + "color": { + "mode": "palette-classic" + }, + "custom": { + "axisCenteredZero": false, + "axisColorMode": "text", + "axisLabel": "", + "axisPlacement": "auto", + "barAlignment": 0, + "drawStyle": "line", + "fillOpacity": 0, + "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" + } + }, + "links": [], + "mappings": [], + "min": 0, + "thresholds": { + "mode": "absolute", + "steps": [ + { + "color": "green" + }, + { + "color": "red", + "value": 80 + } + ] + }, + "unit": "short" }, "overrides": [] }, - "fill": 1, - "fillGradient": 0, "gridPos": { "h": 9, "w": 12, "x": 0, "y": 5 }, - "hiddenSeries": false, "id": 76, - "legend": { - "alignAsTable": true, - "avg": true, - "current": true, - "max": true, - "min": false, - "show": true, - "sort": "current", - "sortDesc": true, - "total": false, - "values": true - }, - "lines": true, - "linewidth": 1, "links": [], - "nullPointMode": "null", "options": { - "alertThreshold": true + "legend": { + "calcs": [ + "mean", + "lastNotNull", + "max" + ], + "displayMode": "table", + "placement": "bottom", + "showLegend": true + }, + "tooltip": { + "mode": "multi", + "sort": "none" + } }, - "percentage": false, - "pluginVersion": "9.0.3", - "pointradius": 1, - "points": false, - "renderer": "flot", - "seriesOverrides": [], - "spaceLength": 10, - "stack": false, - "steppedLine": false, + "pluginVersion": "9.1.0", "targets": [ { "datasource": { "type": "prometheus", "uid": "$ds" }, - "expr": "sum(rate(vm_rpc_rows_pushed_total{job=~\"$job\",instance=~\"$instance\"}[2m]))", + "editorMode": "code", + "expr": "sum(rate(vm_rpc_rows_pushed_total{job=~\"$job\",instance=~\"$instance\"}[$__rate_interval]))", "format": "time_series", "intervalFactor": 1, "legendFormat": "Pushed", + "range": true, "refId": "B" }, { @@ -3764,109 +3680,115 @@ "type": "prometheus", "uid": "$ds" }, - "expr": "sum(rate(vm_rpc_rows_sent_total{job=~\"$job\",instance=~\"$instance\"}[2m]))", + "editorMode": "code", + "expr": "sum(rate(vm_rpc_rows_sent_total{job=~\"$job\",instance=~\"$instance\"}[$__rate_interval]))", "format": "time_series", "intervalFactor": 1, "legendFormat": "Sent", + "range": true, "refId": "E" } ], - "thresholds": [], - "timeRegions": [], "title": "Rows ($instance)", - "tooltip": { - "shared": true, - "sort": 0, - "value_type": "individual" - }, - "type": "graph", - "xaxis": { - "mode": "time", - "show": true, - "values": [] - }, - "yaxes": [ - { - "$$hashKey": "object:1108", - "format": "short", - "logBase": 1, - "min": "0", - "show": true - }, - { - "$$hashKey": "object:1109", - "format": "short", - "logBase": 1, - "show": true - } - ], - "yaxis": { - "align": false - } + "type": "timeseries" }, { - "aliasColors": {}, - "bars": false, - "dashLength": 10, - "dashes": false, "datasource": { + "type": "prometheus", "uid": "$ds" }, "description": "Rate of RPC errors by type:\n* `Connection` - the number of connection errors to vmstorage node\n* `Dial` - the number of dial errors to vmstorage node.\n* `Handshake` - the number of handshake errors to vmstorage node\n* `Rerouted` - errors appeared during rerouting of rows from un-healthy storage node to a healthy one.", "fieldConfig": { "defaults": { - "links": [] + "color": { + "mode": "palette-classic" + }, + "custom": { + "axisCenteredZero": false, + "axisColorMode": "text", + "axisLabel": "", + "axisPlacement": "auto", + "barAlignment": 0, + "drawStyle": "line", + "fillOpacity": 0, + "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" + } + }, + "links": [], + "mappings": [], + "min": 0, + "thresholds": { + "mode": "absolute", + "steps": [ + { + "color": "green" + }, + { + "color": "red", + "value": 80 + } + ] + }, + "unit": "short" }, "overrides": [] }, - "fill": 1, - "fillGradient": 0, "gridPos": { "h": 9, "w": 12, "x": 12, "y": 5 }, - "hiddenSeries": false, "id": 86, - "legend": { - "alignAsTable": true, - "avg": true, - "current": true, - "max": true, - "min": false, - "show": true, - "sort": "current", - "sortDesc": true, - "total": false, - "values": true - }, - "lines": true, - "linewidth": 1, "links": [], - "nullPointMode": "null", "options": { - "alertThreshold": true + "legend": { + "calcs": [ + "mean", + "lastNotNull", + "max" + ], + "displayMode": "table", + "placement": "bottom", + "showLegend": true + }, + "tooltip": { + "mode": "multi", + "sort": "none" + } }, - "percentage": false, - "pluginVersion": "9.0.3", - "pointradius": 1, - "points": false, - "renderer": "flot", - "seriesOverrides": [], - "spaceLength": 10, - "stack": false, - "steppedLine": false, + "pluginVersion": "9.1.0", "targets": [ { "datasource": { "type": "prometheus", "uid": "$ds" }, + "editorMode": "code", "expr": "sum(rate(vm_rpc_connection_errors_total{job=~\"$job\",instance=~\"$instance\"}[$__rate_interval]))", "format": "time_series", "intervalFactor": 1, "legendFormat": "Connection", + "range": true, "refId": "A" }, { @@ -3892,42 +3814,10 @@ "refId": "E" } ], - "thresholds": [], - "timeRegions": [], "title": "RPC errors ($instance)", - "tooltip": { - "shared": true, - "sort": 0, - "value_type": "individual" - }, - "type": "graph", - "xaxis": { - "mode": "time", - "show": true, - "values": [] - }, - "yaxes": [ - { - "format": "short", - "logBase": 1, - "min": "0", - "show": true - }, - { - "format": "short", - "logBase": 1, - "show": true - } - ], - "yaxis": { - "align": false - } + "type": "timeseries" }, { - "aliasColors": {}, - "bars": false, - "dashLength": 10, - "dashes": false, "datasource": { "type": "prometheus", "uid": "$ds" @@ -3935,101 +3825,104 @@ "description": "The number of rows rerouted to the vmstorage node from other nodes when they were unhealthy.", "fieldConfig": { "defaults": { - "links": [] + "color": { + "mode": "palette-classic" + }, + "custom": { + "axisCenteredZero": false, + "axisColorMode": "text", + "axisLabel": "", + "axisPlacement": "auto", + "barAlignment": 0, + "drawStyle": "line", + "fillOpacity": 0, + "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" + } + }, + "links": [], + "mappings": [], + "min": 0, + "thresholds": { + "mode": "absolute", + "steps": [ + { + "color": "green" + }, + { + "color": "red", + "value": 80 + } + ] + }, + "unit": "rps" }, "overrides": [] }, - "fill": 1, - "fillGradient": 0, "gridPos": { "h": 8, "w": 12, "x": 0, "y": 14 }, - "hiddenSeries": false, "id": 80, - "legend": { - "alignAsTable": true, - "avg": true, - "current": true, - "max": true, - "min": false, - "show": true, - "sort": "current", - "sortDesc": true, - "total": false, - "values": true - }, - "lines": true, - "linewidth": 1, "links": [], - "nullPointMode": "null", "options": { - "alertThreshold": true + "legend": { + "calcs": [ + "mean", + "lastNotNull", + "max" + ], + "displayMode": "table", + "placement": "bottom", + "showLegend": true + }, + "tooltip": { + "mode": "multi", + "sort": "none" + } }, - "percentage": false, - "pluginVersion": "9.0.3", - "pointradius": 1, - "points": false, - "renderer": "flot", - "seriesOverrides": [], - "spaceLength": 10, - "stack": false, - "steppedLine": false, + "pluginVersion": "9.1.0", "targets": [ { "datasource": { "type": "prometheus", "uid": "$ds" }, + "editorMode": "code", "exemplar": true, "expr": "sum(rate(vm_rpc_rows_rerouted_to_here_total{job=~\"$job\", instance=~\"$instance\"}[$__rate_interval])) by(addr) > 0", "format": "time_series", "interval": "", "intervalFactor": 1, - "legendFormat": "{{addr}}", + "legendFormat": "__auto", + "range": true, "refId": "A" } ], - "thresholds": [], - "timeRegions": [], "title": "Rows ($instance) rerouted to ", - "tooltip": { - "shared": true, - "sort": 0, - "value_type": "individual" - }, - "type": "graph", - "xaxis": { - "mode": "time", - "show": true, - "values": [] - }, - "yaxes": [ - { - "$$hashKey": "object:701", - "format": "rps", - "logBase": 1, - "min": "0", - "show": true - }, - { - "$$hashKey": "object:702", - "format": "short", - "logBase": 1, - "show": true - } - ], - "yaxis": { - "align": false - } + "type": "timeseries" }, { - "aliasColors": {}, - "bars": false, - "dashLength": 10, - "dashes": false, "datasource": { "type": "prometheus", "uid": "$ds" @@ -4037,48 +3930,83 @@ "description": "The number of rows rerouted from the vmstorage node to healthy nodes when the given node was unhealthy.", "fieldConfig": { "defaults": { - "links": [] + "color": { + "mode": "palette-classic" + }, + "custom": { + "axisCenteredZero": false, + "axisColorMode": "text", + "axisLabel": "", + "axisPlacement": "auto", + "barAlignment": 0, + "drawStyle": "line", + "fillOpacity": 0, + "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" + } + }, + "links": [], + "mappings": [], + "min": 0, + "thresholds": { + "mode": "absolute", + "steps": [ + { + "color": "green" + }, + { + "color": "red", + "value": 80 + } + ] + }, + "unit": "rps" }, "overrides": [] }, - "fill": 1, - "fillGradient": 0, "gridPos": { "h": 8, "w": 12, "x": 12, "y": 14 }, - "hiddenSeries": false, "id": 78, - "legend": { - "alignAsTable": true, - "avg": true, - "current": true, - "max": true, - "min": false, - "show": true, - "sort": "current", - "sortDesc": true, - "total": false, - "values": true - }, - "lines": true, - "linewidth": 1, "links": [], - "nullPointMode": "null", "options": { - "alertThreshold": true + "legend": { + "calcs": [ + "mean", + "lastNotNull", + "max" + ], + "displayMode": "table", + "placement": "bottom", + "showLegend": true + }, + "tooltip": { + "mode": "multi", + "sort": "none" + } }, - "percentage": false, - "pluginVersion": "9.0.3", - "pointradius": 1, - "points": false, - "renderer": "flot", - "seriesOverrides": [], - "spaceLength": 10, - "stack": false, - "steppedLine": false, + "pluginVersion": "9.1.0", "targets": [ { "datasource": { @@ -4094,97 +4022,105 @@ "refId": "A" } ], - "thresholds": [], - "timeRegions": [], "title": "Rows ($instance) rerouted from", - "tooltip": { - "shared": true, - "sort": 0, - "value_type": "individual" - }, - "type": "graph", - "xaxis": { - "mode": "time", - "show": true, - "values": [] - }, - "yaxes": [ - { - "$$hashKey": "object:761", - "format": "rps", - "logBase": 1, - "min": "0", - "show": true - }, - { - "$$hashKey": "object:762", - "format": "short", - "logBase": 1, - "min": "0", - "show": true - } - ], - "yaxis": { - "align": false - } + "type": "timeseries" }, { - "aliasColors": {}, - "bars": false, - "dashLength": 10, - "dashes": false, "datasource": { "uid": "$ds" }, "description": "The number of rows or bytes that vminesrt internal buffer contains at the moment.", "fieldConfig": { "defaults": { - "links": [] + "color": { + "mode": "palette-classic" + }, + "custom": { + "axisCenteredZero": false, + "axisColorMode": "text", + "axisLabel": "", + "axisPlacement": "auto", + "barAlignment": 0, + "drawStyle": "line", + "fillOpacity": 0, + "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" + } + }, + "links": [], + "mappings": [], + "min": 0, + "thresholds": { + "mode": "absolute", + "steps": [ + { + "color": "green" + }, + { + "color": "red", + "value": 80 + } + ] + }, + "unit": "short" }, - "overrides": [] + "overrides": [ + { + "matcher": { + "id": "byName", + "options": "bytes" + }, + "properties": [ + { + "id": "unit", + "value": "bytes" + } + ] + } + ] }, - "fill": 0, - "fillGradient": 0, "gridPos": { "h": 8, "w": 12, "x": 0, "y": 22 }, - "hiddenSeries": false, "id": 82, - "legend": { - "alignAsTable": true, - "avg": true, - "current": true, - "max": true, - "min": false, - "show": true, - "sort": "current", - "sortDesc": true, - "total": false, - "values": true - }, - "lines": true, - "linewidth": 1, - "nullPointMode": "null", "options": { - "alertThreshold": true - }, - "percentage": false, - "pluginVersion": "9.0.3", - "pointradius": 2, - "points": false, - "renderer": "flot", - "seriesOverrides": [ - { - "alias": "bytes", - "yaxis": 2 + "legend": { + "calcs": [ + "mean", + "lastNotNull", + "max" + ], + "displayMode": "table", + "placement": "bottom", + "showLegend": true + }, + "tooltip": { + "mode": "multi", + "sort": "none" } - ], - "spaceLength": 10, - "stack": false, - "steppedLine": false, + }, + "pluginVersion": "9.1.0", "targets": [ { "datasource": { @@ -4205,133 +4141,108 @@ "refId": "B" } ], - "thresholds": [], - "timeRegions": [], "title": "Pending", - "tooltip": { - "shared": true, - "sort": 0, - "value_type": "individual" - }, - "type": "graph", - "xaxis": { - "mode": "time", - "show": true, - "values": [] - }, - "yaxes": [ - { - "$$hashKey": "object:821", - "format": "short", - "logBase": 1, - "min": "0", - "show": true - }, - { - "$$hashKey": "object:822", - "format": "bytes", - "logBase": 1, - "min": "0", - "show": true - } - ], - "yaxis": { - "align": false - } + "type": "timeseries" }, { - "aliasColors": {}, - "bars": false, - "dashLength": 10, - "dashes": false, "datasource": { + "type": "prometheus", "uid": "$ds" }, "description": "Network usage by internal VictoriaMetrics RPC protocol", "fieldConfig": { "defaults": { - "links": [] + "color": { + "mode": "palette-classic" + }, + "custom": { + "axisCenteredZero": false, + "axisColorMode": "text", + "axisLabel": "", + "axisPlacement": "auto", + "barAlignment": 0, + "drawStyle": "line", + "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" + } + }, + "links": [], + "mappings": [], + "min": 0, + "thresholds": { + "mode": "absolute", + "steps": [ + { + "color": "green" + }, + { + "color": "red", + "value": 80 + } + ] + }, + "unit": "bps" }, "overrides": [] }, - "fill": 1, - "fillGradient": 0, "gridPos": { "h": 8, "w": 12, "x": 12, "y": 22 }, - "hiddenSeries": false, "id": 74, - "legend": { - "alignAsTable": true, - "avg": true, - "current": true, - "max": true, - "min": false, - "show": true, - "sort": "current", - "sortDesc": true, - "total": false, - "values": true - }, - "lines": true, - "linewidth": 1, - "nullPointMode": "null", "options": { - "alertThreshold": true + "legend": { + "calcs": [ + "mean", + "lastNotNull", + "max" + ], + "displayMode": "table", + "placement": "bottom", + "showLegend": true + }, + "tooltip": { + "mode": "multi", + "sort": "none" + } }, - "percentage": false, - "pluginVersion": "9.0.3", - "pointradius": 2, - "points": false, - "renderer": "flot", - "seriesOverrides": [], - "spaceLength": 10, - "stack": false, - "steppedLine": false, + "pluginVersion": "9.1.0", "targets": [ { "datasource": { "type": "prometheus", "uid": "$ds" }, + "editorMode": "code", "expr": "sum(rate(vm_tcpdialer_written_bytes_total{job=~\"$job\", instance=~\"$instance\"}[$__rate_interval])) * 8", "legendFormat": "network usage", + "range": true, "refId": "A" } ], - "thresholds": [], - "timeRegions": [], "title": "RPC network usage ($instance)", - "tooltip": { - "shared": true, - "sort": 0, - "value_type": "individual" - }, - "type": "graph", - "xaxis": { - "mode": "time", - "show": true, - "values": [] - }, - "yaxes": [ - { - "format": "bps", - "logBase": 1, - "min": "0", - "show": true - }, - { - "format": "short", - "logBase": 1, - "show": true - } - ], - "yaxis": { - "align": false - } + "type": "timeseries" } ], "title": "Interconnection ($job)", @@ -4346,180 +4257,97 @@ "h": 1, "w": 24, "x": 0, - "y": 37 + "y": 40 }, - "id": 60, + "id": 24, "panels": [ { - "aliasColors": {}, - "bars": false, - "dashLength": 10, - "dashes": false, "datasource": { "type": "prometheus", "uid": "$ds" }, - "description": "VictoriaMetrics stores various caches in RAM. Memory size for these caches may be limited with -`memory.allowedPercent` flag. Line `max allowed` shows max allowed memory size for cache.", + "description": "Shows the number of datapoints ingested into storage nodes per second. This metric doesn't show all stored datapoints since some of them may be dropped because of wrong timestamps or decode errors.", "fieldConfig": { "defaults": { - "links": [] + "color": { + "mode": "palette-classic" + }, + "custom": { + "axisCenteredZero": false, + "axisColorMode": "text", + "axisLabel": "", + "axisPlacement": "auto", + "barAlignment": 0, + "drawStyle": "line", + "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": "normal" + }, + "thresholdsStyle": { + "mode": "off" + } + }, + "links": [], + "mappings": [], + "min": 0, + "thresholds": { + "mode": "absolute", + "steps": [ + { + "color": "green" + }, + { + "color": "red", + "value": 80 + } + ] + }, + "unit": "short" }, "overrides": [] }, - "fill": 0, - "fillGradient": 0, "gridPos": { "h": 8, - "w": 24, + "w": 12, "x": 0, "y": 6 }, - "hiddenSeries": false, - "id": 57, - "legend": { - "alignAsTable": true, - "avg": true, - "current": true, - "max": false, - "min": false, - "rightSide": true, - "show": true, - "sort": "current", - "sortDesc": true, - "total": false, - "values": true - }, - "lines": true, - "linewidth": 1, + "id": 100, "links": [], - "nullPointMode": "null", "options": { - "alertThreshold": true - }, - "percentage": false, - "pluginVersion": "9.0.3", - "pointradius": 2, - "points": false, - "renderer": "flot", - "seriesOverrides": [ - { - "alias": "max allowed", - "color": "#C4162A", - "fill": 0, - "stack": false - } - ], - "spaceLength": 10, - "stack": true, - "steppedLine": false, - "targets": [ - { - "datasource": { - "type": "prometheus", - "uid": "$ds" - }, - "expr": "sum(vm_cache_size_bytes{job=~\"$job\", instance=~\"$instance\"}) by(type)", - "format": "time_series", - "hide": false, - "intervalFactor": 1, - "legendFormat": "{{type}}", - "refId": "A" + "legend": { + "calcs": [ + "mean", + "lastNotNull", + "max" + ], + "displayMode": "table", + "placement": "bottom", + "showLegend": true, + "sortBy": "Last *", + "sortDesc": true }, - { - "datasource": { - "type": "prometheus", - "uid": "$ds" - }, - "expr": "sum(vm_allowed_memory_bytes{job=~\"$job\", instance=~\"$instance\"})", - "format": "time_series", - "hide": false, - "intervalFactor": 1, - "legendFormat": "max allowed", - "refId": "B" + "tooltip": { + "mode": "multi", + "sort": "desc" } - ], - "thresholds": [], - "timeRegions": [], - "title": "Cache size ($instance)", - "tooltip": { - "shared": true, - "sort": 2, - "value_type": "individual" }, - "type": "graph", - "xaxis": { - "mode": "time", - "show": true, - "values": [] - }, - "yaxes": [ - { - "$$hashKey": "object:889", - "format": "bytes", - "logBase": 1, - "min": "0", - "show": true - }, - { - "$$hashKey": "object:890", - "format": "short", - "logBase": 1, - "min": "0", - "show": true - } - ], - "yaxis": { - "align": false - } - }, - { - "aliasColors": {}, - "bars": false, - "dashLength": 10, - "dashes": false, - "datasource": { - "type": "prometheus", - "uid": "$ds" - }, - "description": "Shows the percentage of used cache size from the allowed size by type. \nValues close to 100% show the maximum potential utilization.\nValues close to 0% show that cache is underutilized.", - "fill": 0, - "fillGradient": 0, - "gridPos": { - "h": 9, - "w": 24, - "x": 0, - "y": 14 - }, - "hiddenSeries": false, - "id": 172, - "legend": { - "alignAsTable": true, - "avg": true, - "current": true, - "max": true, - "min": false, - "rightSide": true, - "show": true, - "sort": "current", - "sortDesc": true, - "total": false, - "values": true - }, - "lines": true, - "linewidth": 1, - "nullPointMode": "null", - "options": { - "alertThreshold": true - }, - "percentage": false, - "pluginVersion": "9.0.3", - "pointradius": 2, - "points": false, - "renderer": "flot", - "seriesOverrides": [], - "spaceLength": 10, - "stack": false, - "steppedLine": false, + "pluginVersion": "9.1.0", "targets": [ { "datasource": { @@ -4527,1387 +4355,130 @@ "uid": "$ds" }, "editorMode": "code", - "exemplar": true, - "expr": "sum(vm_cache_size_bytes{job=~\"$job\", instance=~\"$instance\"}) by(type) / \nsum(vm_cache_size_max_bytes{job=~\"$job\", instance=~\"$instance\"}) by(type)", - "interval": "", - "legendFormat": "{{ type }}", + "expr": "sum(rate(vm_vminsert_metrics_read_total{job=~\"$job_storage\", instance=~\"$instance\"}[$__rate_interval])) ", + "format": "time_series", + "intervalFactor": 1, + "legendFormat": "ingestion rate", "range": true, "refId": "A" } ], - "thresholds": [], - "timeRegions": [], - "title": "Cache usage % ($instance)", - "tooltip": { - "shared": true, - "sort": 2, - "value_type": "individual" - }, - "type": "graph", - "xaxis": { - "mode": "time", - "show": true, - "values": [] - }, - "yaxes": [ - { - "$$hashKey": "object:107", - "format": "percentunit", - "logBase": 1, - "show": true - }, - { - "$$hashKey": "object:108", - "format": "short", - "logBase": 1, - "show": true - } - ], - "yaxis": { - "align": false - } - }, - { - "aliasColors": {}, - "bars": false, - "dashLength": 10, - "dashes": false, - "datasource": { - "uid": "$ds" - }, - "description": "VictoriaMetrics stores various caches in RAM. Memory size for these caches may be limited with -`memory.allowedPercent` flag. Line `max allowed` shows max allowed memory size for cache.", - "fieldConfig": { - "defaults": { - "links": [] - }, - "overrides": [] - }, - "fill": 0, - "fillGradient": 0, - "gridPos": { - "h": 8, - "w": 24, - "x": 0, - "y": 23 - }, - "hiddenSeries": false, - "id": 58, - "legend": { - "alignAsTable": true, - "avg": true, - "current": true, - "max": true, - "min": false, - "rightSide": true, - "show": true, - "sort": "current", - "sortDesc": true, - "total": false, - "values": true - }, - "lines": true, - "linewidth": 1, - "links": [], - "nullPointMode": "null", - "options": { - "alertThreshold": true - }, - "percentage": false, - "pluginVersion": "9.0.3", - "pointradius": 2, - "points": false, - "renderer": "flot", - "seriesOverrides": [], - "spaceLength": 10, - "stack": false, - "steppedLine": false, - "targets": [ - { - "datasource": { - "type": "prometheus", - "uid": "$ds" - }, - "exemplar": true, - "expr": "1 - (\n sum(rate(vm_cache_misses_total{job=~\"$job\", instance=~\"$instance\"}[$__rate_interval])) by (type) /\n sum(rate(vm_cache_requests_total{job=~\"$job\", instance=~\"$instance\"}[$__rate_interval])) by (type)\n)", - "format": "time_series", - "hide": false, - "interval": "", - "intervalFactor": 1, - "legendFormat": "{{type}}", - "refId": "A" - } - ], - "thresholds": [], - "timeRegions": [], - "title": "Cache hit ratio ($instance)", - "tooltip": { - "shared": true, - "sort": 2, - "value_type": "individual" - }, - "type": "graph", - "xaxis": { - "mode": "time", - "show": true, - "values": [] - }, - "yaxes": [ - { - "format": "percentunit", - "logBase": 1, - "max": "1", - "min": "0", - "show": true - }, - { - "format": "short", - "logBase": 1, - "min": "0", - "show": true - } - ], - "yaxis": { - "align": false - } - } - ], - "title": "Caches ($job)", - "type": "row" - }, - { - "collapsed": true, - "datasource": { - "uid": "$ds" - }, - "gridPos": { - "h": 1, - "w": 24, - "x": 0, - "y": 38 - }, - "id": 24, - "panels": [ - { - "aliasColors": {}, - "bars": false, - "dashLength": 10, - "dashes": false, - "datasource": { - "uid": "$ds" - }, - "description": "Shows how many rows per second every storage node accepts. This metric doesn't show all stored rows since some of them may be dropped because of wrong timestamps or decode errors.", - "fieldConfig": { - "defaults": { - "links": [] - }, - "overrides": [] - }, - "fill": 1, - "fillGradient": 0, - "gridPos": { - "h": 8, - "w": 12, - "x": 0, - "y": 7 - }, - "hiddenSeries": false, - "id": 100, - "legend": { - "alignAsTable": true, - "avg": true, - "current": true, - "max": true, - "min": false, - "show": true, - "sort": "current", - "sortDesc": true, - "total": false, - "values": true - }, - "lines": true, - "linewidth": 1, - "links": [], - "nullPointMode": "null", - "options": { - "alertThreshold": true - }, - "percentage": false, - "pluginVersion": "9.0.3", - "pointradius": 2, - "points": false, - "renderer": "flot", - "seriesOverrides": [], - "spaceLength": 10, - "stack": true, - "steppedLine": false, - "targets": [ - { - "datasource": { - "type": "prometheus", - "uid": "$ds" - }, - "expr": "sum(rate(vm_vminsert_metrics_read_total{job=~\"$job_storage\", instance=~\"$instance\"}[$__rate_interval])) by(instance)", - "format": "time_series", - "intervalFactor": 1, - "legendFormat": "{{instance}}", - "refId": "A" - } - ], - "thresholds": [], - "timeRegions": [], "title": "Ingestion rate ($instance)", - "tooltip": { - "shared": true, - "sort": 2, - "value_type": "individual" - }, - "type": "graph", - "xaxis": { - "mode": "time", - "show": true, - "values": [] - }, - "yaxes": [ - { - "format": "short", - "logBase": 1, - "min": "0", - "show": true - }, - { - "format": "short", - "logBase": 1, - "min": "0", - "show": true - } - ], - "yaxis": { - "align": false - } + "type": "timeseries" }, { - "aliasColors": {}, - "bars": false, - "dashLength": 10, - "dashes": false, "datasource": { + "type": "prometheus", "uid": "$ds" }, - "description": "Shows the time needed to reach the 100% of disk capacity based on the following params:\n* free disk space;\n* row ingestion rate;\n* dedup rate;\n* compression.\n\nUse this panel for capacity planning in order to estimate the time remaining for running out of the disk space.", + "description": "Shows the approx time needed to reach 100% of disk capacity for at least one vmstorage node based on the following params:\n* free disk space;\n* row ingestion rate;\n* dedup rate;\n* compression.\n\nUse this panel for capacity planning in order to estimate the time remaining for running out of the disk space.", "fieldConfig": { "defaults": { - "links": [] + "color": { + "mode": "palette-classic" + }, + "custom": { + "axisCenteredZero": false, + "axisColorMode": "text", + "axisLabel": "", + "axisPlacement": "auto", + "barAlignment": 0, + "drawStyle": "line", + "fillOpacity": 0, + "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" + } + }, + "links": [ + { + "targetBlank": true, + "title": "Drilldown", + "url": "/d/oS7Bi_0Wz?viewPanel=196&${__url_time_range}&${__all_variables}" + } + ], + "mappings": [], + "min": 0, + "thresholds": { + "mode": "absolute", + "steps": [ + { + "color": "green" + }, + { + "color": "red", + "value": 80 + } + ] + }, + "unit": "s" }, "overrides": [] }, - "fill": 0, - "fillGradient": 0, "gridPos": { "h": 8, "w": 12, "x": 12, - "y": 7 + "y": 6 }, - "hiddenSeries": false, "id": 113, - "legend": { - "alignAsTable": true, - "avg": true, - "current": true, - "max": false, - "min": true, - "show": true, - "sort": "current", - "sortDesc": true, - "total": false, - "values": true - }, - "lines": true, - "linewidth": 1, "links": [], - "nullPointMode": "null", "options": { - "alertThreshold": true + "legend": { + "calcs": [ + "mean", + "lastNotNull", + "min" + ], + "displayMode": "table", + "placement": "bottom", + "showLegend": true, + "sortBy": "Last *", + "sortDesc": true + }, + "tooltip": { + "mode": "multi", + "sort": "none" + } }, - "percentage": false, - "pluginVersion": "9.0.3", - "pointradius": 2, - "points": false, - "renderer": "flot", - "seriesOverrides": [], - "spaceLength": 10, - "stack": false, - "steppedLine": false, + "pluginVersion": "9.1.0", "targets": [ { "datasource": { "type": "prometheus", "uid": "$ds" }, - "expr": "vm_free_disk_space_bytes{job=~\"$job_storage\", instance=~\"$instance\"} / ignoring(path) ((rate(vm_rows_added_to_storage_total{job=~\"$job_storage\", instance=~\"$instance\"}[1d]) - ignoring(type) rate(vm_deduplicated_samples_total{job=~\"$job_storage\", instance=~\"$instance\", type=\"merge\"}[1d])) * scalar(sum(vm_data_size_bytes{job=~\"$job_storage\", instance=~\"$instance\", type!=\"indexdb\"}) / sum(vm_rows{job=~\"$job_storage\", instance=~\"$instance\", type!=\"indexdb\"})))", + "editorMode": "code", + "expr": "min(vm_free_disk_space_bytes{job=~\"$job_storage\", instance=~\"$instance\"} \n/ \nignoring(path) (\n (\n rate(vm_rows_added_to_storage_total{job=~\"$job_storage\", instance=~\"$instance\"}[1d])\n - \n ignoring(type) rate(vm_deduplicated_samples_total{job=~\"$job_storage\", instance=~\"$instance\", type=\"merge\"}[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, - "legendFormat": "{{instance}}", + "legendFormat": "min ETA", + "range": true, "refId": "A" } ], - "thresholds": [], - "timeRegions": [], "title": "Storage full ETA ($instance)", - "tooltip": { - "shared": true, - "sort": 0, - "value_type": "individual" - }, - "type": "graph", - "xaxis": { - "mode": "time", - "show": true, - "values": [] - }, - "yaxes": [ - { - "$$hashKey": "object:87", - "format": "s", - "logBase": 1, - "min": "0", - "show": true - }, - { - "$$hashKey": "object:88", - "format": "short", - "logBase": 1, - "show": true - } - ], - "yaxis": { - "align": false - } + "type": "timeseries" }, { - "aliasColors": {}, - "bars": false, - "dashLength": 10, - "dashes": false, - "datasource": { - "uid": "$ds" - }, - "description": "Shows how many datapoints are in the storage.", - "fieldConfig": { - "defaults": { - "links": [] - }, - "overrides": [] - }, - "fill": 1, - "fillGradient": 0, - "gridPos": { - "h": 8, - "w": 12, - "x": 0, - "y": 15 - }, - "hiddenSeries": false, - "id": 16, - "legend": { - "alignAsTable": true, - "avg": true, - "current": true, - "max": true, - "min": false, - "show": true, - "sort": "current", - "sortDesc": true, - "total": false, - "values": true - }, - "lines": true, - "linewidth": 1, - "links": [], - "nullPointMode": "null", - "options": { - "alertThreshold": true - }, - "percentage": false, - "pluginVersion": "9.0.3", - "pointradius": 2, - "points": false, - "renderer": "flot", - "seriesOverrides": [], - "spaceLength": 10, - "stack": true, - "steppedLine": false, - "targets": [ - { - "datasource": { - "type": "prometheus", - "uid": "$ds" - }, - "expr": "sum(vm_rows{job=~\"$job_storage\", instance=~\"$instance\", type!=\"indexdb\"}) by(instance)", - "format": "time_series", - "interval": "", - "intervalFactor": 1, - "legendFormat": "{{instance}}", - "refId": "A" - } - ], - "thresholds": [], - "timeRegions": [], - "title": "Datapoints ($instance)", - "tooltip": { - "shared": true, - "sort": 2, - "value_type": "individual" - }, - "type": "graph", - "xaxis": { - "mode": "time", - "show": true, - "values": [] - }, - "yaxes": [ - { - "$$hashKey": "object:1330", - "format": "short", - "logBase": 1, - "min": "0", - "show": true - }, - { - "$$hashKey": "object:1331", - "format": "short", - "logBase": 1, - "min": "0", - "show": true - } - ], - "yaxis": { - "align": false - } - }, - { - "aliasColors": {}, - "bars": false, - "dashLength": 10, - "dashes": false, - "datasource": { - "uid": "$ds" - }, - "description": "How many datapoints are in RAM queue waiting to be written into storage. The number of pending data points should be in the range from 0 to `2*`, since VictoriaMetrics pushes pending data to persistent storage every second. The index datapoints value in general is much lower.", - "fieldConfig": { - "defaults": { - "links": [] - }, - "overrides": [] - }, - "fill": 0, - "fillGradient": 0, - "gridPos": { - "h": 8, - "w": 12, - "x": 12, - "y": 15 - }, - "hiddenSeries": false, - "id": 14, - "legend": { - "alignAsTable": true, - "avg": true, - "current": true, - "max": true, - "min": false, - "rightSide": false, - "show": true, - "sort": "current", - "sortDesc": true, - "total": false, - "values": true - }, - "lines": true, - "linewidth": 1, - "links": [], - "nullPointMode": "null", - "options": { - "alertThreshold": true - }, - "percentage": false, - "pluginVersion": "9.0.3", - "pointradius": 2, - "points": false, - "renderer": "flot", - "seriesOverrides": [ - { - "alias": "pending index entries", - "yaxis": 2 - } - ], - "spaceLength": 10, - "stack": false, - "steppedLine": false, - "targets": [ - { - "datasource": { - "type": "prometheus", - "uid": "$ds" - }, - "expr": "sum(vm_pending_rows{job=~\"$job_storage\", instance=~\"$instance\", type=\"storage\"})", - "format": "time_series", - "hide": false, - "intervalFactor": 1, - "legendFormat": "pending datapoints", - "refId": "A" - }, - { - "datasource": { - "type": "prometheus", - "uid": "$ds" - }, - "expr": "sum(vm_pending_rows{job=~\"$job_storage\", instance=~\"$instance\", type=\"indexdb\"})", - "format": "time_series", - "hide": false, - "intervalFactor": 1, - "legendFormat": "pending index entries", - "refId": "B" - } - ], - "thresholds": [], - "timeRegions": [], - "title": "Pending datapoints ($instance)", - "tooltip": { - "shared": true, - "sort": 0, - "value_type": "individual" - }, - "type": "graph", - "xaxis": { - "mode": "time", - "show": true, - "values": [] - }, - "yaxes": [ - { - "$$hashKey": "object:1262", - "format": "short", - "logBase": 1, - "min": "0", - "show": true - }, - { - "$$hashKey": "object:1263", - "decimals": 3, - "format": "none", - "logBase": 1, - "min": "0", - "show": true - } - ], - "yaxis": { - "align": false - } - }, - { - "aliasColors": {}, - "bars": false, - "dashLength": 10, - "dashes": false, - "datasource": { - "uid": "$ds" - }, - "description": "Shows amount of on-disk space occupied by data points.", - "fieldConfig": { - "defaults": { - "links": [] - }, - "overrides": [] - }, - "fill": 1, - "fillGradient": 0, - "gridPos": { - "h": 8, - "w": 12, - "x": 0, - "y": 23 - }, - "hiddenSeries": false, - "id": 18, - "legend": { - "alignAsTable": true, - "avg": true, - "current": true, - "max": true, - "min": false, - "show": true, - "sort": "current", - "sortDesc": true, - "total": false, - "values": true - }, - "lines": true, - "linewidth": 1, - "links": [], - "nullPointMode": "null", - "options": { - "alertThreshold": true - }, - "percentage": false, - "pluginVersion": "9.0.3", - "pointradius": 2, - "points": false, - "renderer": "flot", - "seriesOverrides": [], - "spaceLength": 10, - "stack": true, - "steppedLine": false, - "targets": [ - { - "datasource": { - "type": "prometheus", - "uid": "$ds" - }, - "expr": "sum(vm_data_size_bytes{job=~\"$job_storage\", instance=~\"$instance\", type!=\"indexdb\"}) by(instance)", - "format": "time_series", - "intervalFactor": 1, - "legendFormat": "{{instance}}", - "refId": "A" - } - ], - "thresholds": [], - "timeRegions": [], - "title": "Disk space usage (datapoints) ($instance)", - "tooltip": { - "shared": true, - "sort": 0, - "value_type": "individual" - }, - "type": "graph", - "xaxis": { - "mode": "time", - "show": true, - "values": [] - }, - "yaxes": [ - { - "format": "bytes", - "logBase": 1, - "min": "0", - "show": true - }, - { - "format": "short", - "logBase": 1, - "min": "0", - "show": true - } - ], - "yaxis": { - "align": false - } - }, - { - "aliasColors": {}, - "bars": false, - "dashLength": 10, - "dashes": false, - "datasource": { - "uid": "$ds" - }, - "description": "Shows amount of on-disk space occupied by inverted index.", - "fieldConfig": { - "defaults": { - "links": [] - }, - "overrides": [] - }, - "fill": 1, - "fillGradient": 0, - "gridPos": { - "h": 8, - "w": 12, - "x": 12, - "y": 23 - }, - "hiddenSeries": false, - "id": 20, - "legend": { - "alignAsTable": true, - "avg": true, - "current": true, - "max": true, - "min": false, - "show": true, - "sort": "current", - "sortDesc": true, - "total": false, - "values": true - }, - "lines": true, - "linewidth": 1, - "links": [], - "nullPointMode": "null", - "options": { - "alertThreshold": true - }, - "percentage": false, - "pluginVersion": "9.0.3", - "pointradius": 2, - "points": false, - "renderer": "flot", - "seriesOverrides": [], - "spaceLength": 10, - "stack": true, - "steppedLine": false, - "targets": [ - { - "datasource": { - "type": "prometheus", - "uid": "$ds" - }, - "expr": "sum(vm_data_size_bytes{job=~\"$job_storage\", instance=~\"$instance\", type=\"indexdb\"}) by(instance)", - "format": "time_series", - "intervalFactor": 1, - "legendFormat": "{{instance}}", - "refId": "A" - } - ], - "thresholds": [], - "timeRegions": [], - "title": "Disk space usage (index) ($instance)", - "tooltip": { - "shared": true, - "sort": 0, - "value_type": "individual" - }, - "type": "graph", - "xaxis": { - "mode": "time", - "show": true, - "values": [] - }, - "yaxes": [ - { - "format": "bytes", - "logBase": 1, - "min": "0", - "show": true - }, - { - "format": "short", - "logBase": 1, - "min": "0", - "show": true - } - ], - "yaxis": { - "align": false - } - }, - { - "aliasColors": {}, - "bars": false, - "dashLength": 10, - "dashes": false, - "datasource": { - "uid": "$ds" - }, - "description": "The number of on-going merges in storage nodes. It is expected to have high numbers for `storage/small` metric.", - "fieldConfig": { - "defaults": { - "links": [] - }, - "overrides": [] - }, - "fill": 0, - "fillGradient": 0, - "gridPos": { - "h": 8, - "w": 12, - "x": 0, - "y": 31 - }, - "hiddenSeries": false, - "id": 54, - "legend": { - "alignAsTable": true, - "avg": true, - "current": true, - "max": true, - "min": false, - "show": true, - "sort": "current", - "sortDesc": true, - "total": false, - "values": true - }, - "lines": true, - "linewidth": 1, - "nullPointMode": "null", - "options": { - "alertThreshold": true - }, - "percentage": false, - "pluginVersion": "9.0.3", - "pointradius": 2, - "points": false, - "renderer": "flot", - "seriesOverrides": [], - "spaceLength": 10, - "stack": false, - "steppedLine": false, - "targets": [ - { - "datasource": { - "type": "prometheus", - "uid": "$ds" - }, - "expr": "sum(vm_active_merges{job=~\"$job_storage\", instance=~\"$instance\"}) by(type)", - "legendFormat": "{{type}}", - "refId": "A" - } - ], - "thresholds": [], - "timeRegions": [], - "title": "Active merges ($instance)", - "tooltip": { - "shared": true, - "sort": 2, - "value_type": "individual" - }, - "type": "graph", - "xaxis": { - "mode": "time", - "show": true, - "values": [] - }, - "yaxes": [ - { - "$$hashKey": "object:1399", - "decimals": 0, - "format": "short", - "logBase": 1, - "min": "0", - "show": true - }, - { - "$$hashKey": "object:1400", - "format": "short", - "logBase": 1, - "min": "0", - "show": true - } - ], - "yaxis": { - "align": false - } - }, - { - "aliasColors": {}, - "bars": false, - "dashLength": 10, - "dashes": false, - "datasource": { - "uid": "$ds" - }, - "description": "The number of rows merged per second by storage nodes.", - "fieldConfig": { - "defaults": { - "links": [] - }, - "overrides": [] - }, - "fill": 0, - "fillGradient": 0, - "gridPos": { - "h": 8, - "w": 12, - "x": 12, - "y": 31 - }, - "hiddenSeries": false, - "id": 55, - "legend": { - "alignAsTable": true, - "avg": true, - "current": true, - "max": true, - "min": false, - "show": true, - "sort": "current", - "sortDesc": true, - "total": false, - "values": true - }, - "lines": true, - "linewidth": 1, - "nullPointMode": "null", - "options": { - "alertThreshold": true - }, - "percentage": false, - "pluginVersion": "9.0.3", - "pointradius": 2, - "points": false, - "renderer": "flot", - "seriesOverrides": [], - "spaceLength": 10, - "stack": false, - "steppedLine": false, - "targets": [ - { - "datasource": { - "type": "prometheus", - "uid": "$ds" - }, - "expr": "sum(rate(vm_rows_merged_total{job=~\"$job_storage\", instance=~\"$instance\"}[$__rate_interval])) by(type)", - "legendFormat": "{{type}}", - "refId": "A" - } - ], - "thresholds": [], - "timeRegions": [], - "title": "Merge speed", - "tooltip": { - "shared": true, - "sort": 2, - "value_type": "individual" - }, - "type": "graph", - "xaxis": { - "mode": "time", - "show": true, - "values": [] - }, - "yaxes": [ - { - "$$hashKey": "object:1516", - "decimals": 0, - "format": "short", - "logBase": 1, - "min": "0", - "show": true - }, - { - "$$hashKey": "object:1517", - "format": "short", - "logBase": 1, - "min": "0", - "show": true - } - ], - "yaxis": { - "align": false - } - }, - { - "aliasColors": {}, - "bars": false, - "dashLength": 10, - "dashes": false, - "datasource": { - "uid": "$ds" - }, - "description": "Shows how many rows were ignored on insertion due to corrupted or out of retention timestamps.", - "fill": 0, - "fillGradient": 0, - "gridPos": { - "h": 8, - "w": 12, - "x": 0, - "y": 39 - }, - "hiddenSeries": false, - "id": 135, - "legend": { - "alignAsTable": true, - "avg": true, - "current": true, - "max": true, - "min": false, - "show": true, - "sort": "current", - "sortDesc": true, - "total": false, - "values": true - }, - "lines": true, - "linewidth": 1, - "nullPointMode": "null", - "options": { - "alertThreshold": true - }, - "percentage": false, - "pluginVersion": "9.0.3", - "pointradius": 2, - "points": false, - "renderer": "flot", - "seriesOverrides": [], - "spaceLength": 10, - "stack": false, - "steppedLine": false, - "targets": [ - { - "datasource": { - "type": "prometheus", - "uid": "$ds" - }, - "exemplar": true, - "expr": "sum(vm_rows_ignored_total{job=~\"$job_storage\", instance=~\"$instance\"}) by (reason)", - "interval": "", - "legendFormat": "{{reason}}", - "refId": "A" - } - ], - "thresholds": [], - "timeRegions": [], - "title": "Rows ignored ($instance)", - "tooltip": { - "shared": true, - "sort": 0, - "value_type": "individual" - }, - "type": "graph", - "xaxis": { - "mode": "time", - "show": true, - "values": [] - }, - "yaxes": [ - { - "$$hashKey": "object:1584", - "format": "short", - "logBase": 1, - "show": true - }, - { - "$$hashKey": "object:1585", - "format": "short", - "logBase": 1, - "show": true - } - ], - "yaxis": { - "align": false - } - }, - { - "aliasColors": {}, - "bars": false, - "dashLength": 10, - "dashes": false, - "datasource": { - "type": "prometheus", - "uid": "$ds" - }, - "description": "The max number of data parts of LSM tree across all storage nodes.\nHigh number of parts (the hard limit is 512) is an evidence of slow merge performance - check the resource utilization.\n* `indexdb` - inverted index\n* `storage/small` - recently added parts of data ingested into storage (hot data)\n* `storage/big` - small parts gradually merged into big parts (cold data)", - "fieldConfig": { - "defaults": { - "links": [] - }, - "overrides": [] - }, - "fill": 0, - "fillGradient": 0, - "gridPos": { - "h": 8, - "w": 12, - "x": 12, - "y": 39 - }, - "hiddenSeries": false, - "id": 22, - "legend": { - "alignAsTable": true, - "avg": true, - "current": true, - "max": true, - "min": false, - "show": true, - "sort": "current", - "sortDesc": true, - "total": false, - "values": true - }, - "lines": true, - "linewidth": 1, - "links": [], - "nullPointMode": "null", - "options": { - "alertThreshold": true - }, - "percentage": false, - "pluginVersion": "9.0.3", - "pointradius": 2, - "points": false, - "renderer": "flot", - "seriesOverrides": [], - "spaceLength": 10, - "stack": false, - "steppedLine": false, - "targets": [ - { - "datasource": { - "type": "prometheus", - "uid": "$ds" - }, - "expr": "max(sum(vm_parts{job=~\"$job_storage\", instance=~\"$instance\"}) by (type, instance)) by(type)", - "format": "time_series", - "interval": "", - "intervalFactor": 1, - "legendFormat": "{{type}}", - "refId": "A" - } - ], - "thresholds": [], - "timeRegions": [], - "title": "LSM parts ($instance)", - "tooltip": { - "shared": true, - "sort": 2, - "value_type": "individual" - }, - "type": "graph", - "xaxis": { - "mode": "time", - "show": true, - "values": [] - }, - "yaxes": [ - { - "$$hashKey": "object:1644", - "format": "short", - "logBase": 1, - "min": "0", - "show": true - }, - { - "$$hashKey": "object:1645", - "format": "short", - "logBase": 1, - "min": "0", - "show": true - } - ], - "yaxis": { - "align": false - } - }, - { - "aliasColors": {}, - "bars": false, - "dashLength": 10, - "dashes": false, - "datasource": { - "type": "prometheus", - "uid": "$ds" - }, - "description": "Value > 0 means vmstorage is in readonly mode.", - "fill": 1, - "fillGradient": 0, - "gridPos": { - "h": 8, - "w": 12, - "x": 0, - "y": 47 - }, - "hiddenSeries": false, - "id": 141, - "legend": { - "avg": false, - "current": false, - "max": false, - "min": false, - "show": false, - "total": false, - "values": false - }, - "lines": true, - "linewidth": 1, - "links": [ - { - "targetBlank": true, - "title": "Readonly mode", - "url": "https://docs.victoriametrics.com/Cluster-VictoriaMetrics.html#readonly-mode" - } - ], - "nullPointMode": "null", - "options": { - "alertThreshold": true - }, - "percentage": false, - "pluginVersion": "9.0.3", - "pointradius": 2, - "points": false, - "renderer": "flot", - "seriesOverrides": [], - "spaceLength": 10, - "stack": false, - "steppedLine": false, - "targets": [ - { - "datasource": { - "type": "prometheus", - "uid": "$ds" - }, - "exemplar": true, - "expr": "vm_storage_is_read_only{job=~\"$job_storage\", instance=~\"$instance\"}", - "interval": "", - "legendFormat": "{{ instance }}", - "refId": "A" - } - ], - "thresholds": [], - "timeRegions": [], - "title": "Readonly mode", - "tooltip": { - "shared": true, - "sort": 2, - "value_type": "individual" - }, - "type": "graph", - "xaxis": { - "mode": "time", - "show": true, - "values": [] - }, - "yaxes": [ - { - "$$hashKey": "object:131", - "format": "short", - "logBase": 1, - "show": true - }, - { - "$$hashKey": "object:132", - "format": "short", - "logBase": 1, - "show": true - } - ], - "yaxis": { - "align": false - } - }, - { - "aliasColors": {}, - "bars": false, - "dashLength": 10, - "dashes": false, - "datasource": { - "type": "prometheus", - "uid": "$ds" - }, - "description": "Shows how many ongoing insertions (not API /write calls) on disk are taking place, where:\n* `max` - equal to number of CPUs;\n* `current` - current number of goroutines busy with inserting rows into underlying storage.\n\nEvery successful API /write call results into flush on disk. The `max` is an internal limit and can't be changed. It is always equal to the number of CPUs. \n\nWhen `current` hits `max` constantly, it means storage is overloaded and requires more CPU or faster disk.", - "fill": 0, - "fillGradient": 0, - "gridPos": { - "h": 8, - "w": 12, - "x": 12, - "y": 47 - }, - "hiddenSeries": false, - "id": 133, - "legend": { - "alignAsTable": true, - "avg": true, - "current": true, - "max": true, - "min": false, - "show": true, - "sort": "current", - "sortDesc": true, - "total": false, - "values": true - }, - "lines": true, - "linewidth": 1, - "links": [ - { - "targetBlank": true, - "title": "Related discussion", - "url": "https://github.com/VictoriaMetrics/VictoriaMetrics/issues/632" - } - ], - "nullPointMode": "null", - "options": { - "alertThreshold": true - }, - "percentage": false, - "pluginVersion": "9.0.3", - "pointradius": 2, - "points": false, - "renderer": "flot", - "seriesOverrides": [ - { - "alias": "max", - "color": "#C4162A" - } - ], - "spaceLength": 10, - "stack": false, - "steppedLine": false, - "targets": [ - { - "datasource": { - "type": "prometheus", - "uid": "$ds" - }, - "exemplar": true, - "expr": "max(vm_concurrent_addrows_capacity{job=~\"$job_storage\", instance=~\"$instance\"})", - "interval": "", - "legendFormat": "max", - "refId": "A" - }, - { - "datasource": { - "type": "prometheus", - "uid": "$ds" - }, - "exemplar": true, - "expr": "sum(avg_over_time(vm_concurrent_addrows_current{job=~\"$job_storage\", instance=~\"$instance\"}[1m])) by(instance)", - "hide": false, - "interval": "", - "legendFormat": "{{instance}}", - "refId": "B" - } - ], - "thresholds": [], - "timeRegions": [], - "title": "Concurrent flushes on disk ($instance)", - "tooltip": { - "shared": true, - "sort": 0, - "value_type": "individual" - }, - "type": "graph", - "xaxis": { - "mode": "time", - "show": true, - "values": [] - }, - "yaxes": [ - { - "$$hashKey": "object:1768", - "format": "short", - "logBase": 1, - "show": true - }, - { - "$$hashKey": "object:1769", - "format": "short", - "logBase": 1, - "show": true - } - ], - "yaxis": { - "align": false - } - }, - { - "aliasColors": {}, - "bars": false, - "dashLength": 10, - "dashes": false, "datasource": { "type": "prometheus", "uid": "$ds" @@ -5915,54 +4486,91 @@ "description": "", "fieldConfig": { "defaults": { - "links": [] + "color": { + "mode": "palette-classic" + }, + "custom": { + "axisCenteredZero": false, + "axisColorMode": "text", + "axisLabel": "", + "axisPlacement": "auto", + "barAlignment": 0, + "drawStyle": "line", + "fillOpacity": 0, + "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": "line" + } + }, + "links": [ + { + "targetBlank": true, + "title": "Drilldown", + "url": "/d/oS7Bi_0Wz?viewPanel=192&var-job=$job_storage&var-ds=$ds&var-instance=$instance&${__url_time_range}" + } + ], + "mappings": [], + "min": 0, + "thresholds": { + "mode": "absolute", + "steps": [ + { + "color": "green" + }, + { + "color": "red", + "value": 0.9 + } + ] + }, + "unit": "percentunit" }, "overrides": [] }, - "fill": 0, - "fillGradient": 0, "gridPos": { "h": 7, "w": 12, "x": 0, - "y": 55 + "y": 14 }, - "hiddenSeries": false, "id": 151, - "legend": { - "alignAsTable": true, - "avg": true, - "current": true, - "max": true, - "min": false, - "show": true, - "sort": "current", - "sortDesc": true, - "total": false, - "values": true - }, - "lines": true, - "linewidth": 1, "links": [], - "nullPointMode": "null", "options": { - "alertThreshold": true - }, - "percentage": false, - "pluginVersion": "9.0.3", - "pointradius": 2, - "points": false, - "renderer": "flot", - "seriesOverrides": [ - { - "$$hashKey": "object:186", - "alias": "limit", - "color": "#C4162A" + "legend": { + "calcs": [ + "mean", + "lastNotNull", + "max" + ], + "displayMode": "table", + "placement": "bottom", + "showLegend": true, + "sortBy": "Last *", + "sortDesc": true + }, + "tooltip": { + "mode": "multi", + "sort": "desc" } - ], - "spaceLength": 10, - "stack": false, - "steppedLine": false, + }, + "pluginVersion": "9.1.0", "targets": [ { "datasource": { @@ -5970,12 +4578,12 @@ "uid": "$ds" }, "editorMode": "code", - "exemplar": true, - "expr": "sum(rate(process_cpu_seconds_total{job=~\"$job_storage\", instance=~\"$instance\"}[$__rate_interval])) by(instance)", + "exemplar": false, + "expr": "max(\n rate(process_cpu_seconds_total{job=~\"$job_storage\", instance=~\"$instance\"}[$__rate_interval])\n /\n process_cpu_cores_available{job=~\"$job_storage\", instance=~\"$instance\"}\n)", "format": "time_series", "interval": "", "intervalFactor": 1, - "legendFormat": "{{instance}}", + "legendFormat": "max", "range": true, "refId": "A" }, @@ -5985,105 +4593,129 @@ "uid": "$ds" }, "editorMode": "code", - "expr": "min(process_cpu_cores_available{job=~\"$job_storage\", instance=~\"$instance\"})", + "exemplar": false, + "expr": "min(\n rate(process_cpu_seconds_total{job=~\"$job_storage\", instance=~\"$instance\"}[$__rate_interval])\n /\n process_cpu_cores_available{job=~\"$job_storage\", instance=~\"$instance\"}\n)", + "format": "time_series", "hide": false, - "legendFormat": "limit", + "interval": "", + "intervalFactor": 1, + "legendFormat": "min", "range": true, "refId": "B" - } - ], - "thresholds": [], - "timeRegions": [], - "title": "CPU ($instance)", - "tooltip": { - "shared": true, - "sort": 2, - "value_type": "individual" - }, - "type": "graph", - "xaxis": { - "mode": "time", - "show": true, - "values": [] - }, - "yaxes": [ - { - "$$hashKey": "object:1827", - "format": "short", - "logBase": 1, - "min": "0", - "show": true }, { - "$$hashKey": "object:1828", - "format": "short", - "logBase": 1, - "show": true + "datasource": { + "type": "prometheus", + "uid": "$ds" + }, + "editorMode": "code", + "exemplar": false, + "expr": "avg(\n rate(process_cpu_seconds_total{job=~\"$job_storage\", instance=~\"$instance\"}[$__rate_interval])\n /\n process_cpu_cores_available{job=~\"$job_storage\", instance=~\"$instance\"}\n)", + "format": "time_series", + "hide": false, + "interval": "", + "intervalFactor": 1, + "legendFormat": "avg", + "range": true, + "refId": "C" } ], - "yaxis": { - "align": false - } + "title": "CPU usage % ($instance)", + "type": "timeseries" }, { - "aliasColors": {}, - "bars": false, - "dashLength": 10, - "dashes": false, "datasource": { "type": "prometheus", "uid": "$ds" }, + "description": "Percentage of used memory (resident).\nThe application's performance will significantly degrade when memory usage is close to 100%.", "fieldConfig": { "defaults": { - "links": [] + "color": { + "mode": "palette-classic" + }, + "custom": { + "axisCenteredZero": false, + "axisColorMode": "text", + "axisLabel": "", + "axisPlacement": "auto", + "barAlignment": 0, + "drawStyle": "line", + "fillOpacity": 0, + "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": "line" + } + }, + "links": [ + { + "targetBlank": true, + "title": "Drilldown", + "url": "/d/oS7Bi_0Wz?viewPanel=189&var-job=$job_storage&var-ds=$ds&var-instance=$instance&${__url_time_range}" + } + ], + "mappings": [], + "min": 0, + "thresholds": { + "mode": "absolute", + "steps": [ + { + "color": "green" + }, + { + "color": "red", + "value": 0.9 + } + ] + }, + "unit": "percentunit" }, "overrides": [] }, - "fill": 0, - "fillGradient": 0, "gridPos": { "h": 7, "w": 12, "x": 12, - "y": 55 + "y": 14 }, - "hiddenSeries": false, "id": 167, - "legend": { - "alignAsTable": true, - "avg": true, - "current": true, - "max": true, - "min": false, - "show": true, - "sort": "current", - "sortDesc": true, - "total": false, - "values": true - }, - "lines": true, - "linewidth": 1, "links": [], - "nullPointMode": "null", "options": { - "alertThreshold": true - }, - "percentage": false, - "pluginVersion": "9.0.3", - "pointradius": 2, - "points": false, - "renderer": "flot", - "seriesOverrides": [ - { - "$$hashKey": "object:186", - "alias": "limit", - "color": "#C4162A" + "legend": { + "calcs": [ + "mean", + "lastNotNull", + "max" + ], + "displayMode": "table", + "placement": "bottom", + "showLegend": true, + "sortBy": "Last *", + "sortDesc": true + }, + "tooltip": { + "mode": "multi", + "sort": "desc" } - ], - "spaceLength": 10, - "stack": false, - "steppedLine": false, + }, + "pluginVersion": "9.1.0", "targets": [ { "datasource": { @@ -6092,11 +4724,11 @@ }, "editorMode": "code", "exemplar": true, - "expr": "sum(process_resident_memory_anon_bytes{job=~\"$job_storage\", instance=~\"$instance\"}) by(instance) ", + "expr": "max(\n max_over_time(process_resident_memory_bytes{job=~\"$job_storage\", instance=~\"$instance\"}[$__rate_interval])\n /\n vm_available_memory_bytes{job=~\"$job_storage\", instance=~\"$instance\"}\n)", "format": "time_series", "interval": "", "intervalFactor": 1, - "legendFormat": "{{instance}}", + "legendFormat": "max", "range": true, "refId": "A" }, @@ -6106,45 +4738,1038 @@ "uid": "$ds" }, "editorMode": "code", - "expr": "min(vm_available_memory_bytes{job=~\"$job_storage\", instance=~\"$instance\"})", + "exemplar": true, + "expr": "min(\n max_over_time(process_resident_memory_bytes{job=~\"$job_storage\", instance=~\"$instance\"}[$__rate_interval])\n /\n vm_available_memory_bytes{job=~\"$job_storage\", instance=~\"$instance\"}\n)", + "format": "time_series", "hide": false, - "legendFormat": "limit", + "interval": "", + "intervalFactor": 1, + "legendFormat": "min", + "range": true, + "refId": "B" + }, + { + "datasource": { + "type": "prometheus", + "uid": "$ds" + }, + "editorMode": "code", + "exemplar": true, + "expr": "avg(\n max_over_time(process_resident_memory_bytes{job=~\"$job_storage\", instance=~\"$instance\"}[$__rate_interval])\n /\n vm_available_memory_bytes{job=~\"$job_storage\", instance=~\"$instance\"}\n)", + "format": "time_series", + "hide": false, + "interval": "", + "intervalFactor": 1, + "legendFormat": "avg", + "range": true, + "refId": "C" + } + ], + "title": "Memory usage % ($instance)", + "type": "timeseries" + }, + { + "datasource": { + "type": "prometheus", + "uid": "$ds" + }, + "description": "Value > 0 means vmstorage is in readonly mode.", + "fieldConfig": { + "defaults": { + "color": { + "mode": "palette-classic" + }, + "custom": { + "axisCenteredZero": false, + "axisColorMode": "text", + "axisLabel": "", + "axisPlacement": "auto", + "barAlignment": 0, + "drawStyle": "line", + "fillOpacity": 0, + "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": 8, + "w": 12, + "x": 0, + "y": 21 + }, + "id": 141, + "links": [ + { + "targetBlank": true, + "title": "Readonly mode", + "url": "https://docs.victoriametrics.com/Cluster-VictoriaMetrics.html#readonly-mode" + } + ], + "options": { + "legend": { + "calcs": [], + "displayMode": "list", + "placement": "bottom", + "showLegend": false + }, + "tooltip": { + "mode": "multi", + "sort": "desc" + } + }, + "pluginVersion": "9.1.0", + "targets": [ + { + "datasource": { + "type": "prometheus", + "uid": "$ds" + }, + "editorMode": "code", + "exemplar": true, + "expr": "vm_storage_is_read_only{job=~\"$job_storage\", instance=~\"$instance\"} > 0", + "interval": "", + "legendFormat": "{{ instance }}", + "range": true, + "refId": "A" + } + ], + "title": "Readonly mode", + "type": "timeseries" + }, + { + "datasource": { + "type": "prometheus", + "uid": "$ds" + }, + "description": "Shows how many ongoing insertions (not API /write calls) on disk are taking place, where:\n* `max` - equal to number of CPUs;\n* `current` - current number of goroutines busy with inserting rows into underlying storage.\n\nEvery successful API /write call results into flush on disk. The `max` is an internal limit and can't be changed. It is always equal to the number of CPUs. \n\nWhen `current` hits `max` constantly, it means storage is overloaded and requires more CPU or faster disk.", + "fieldConfig": { + "defaults": { + "color": { + "mode": "palette-classic" + }, + "custom": { + "axisCenteredZero": false, + "axisColorMode": "text", + "axisLabel": "", + "axisPlacement": "auto", + "barAlignment": 0, + "drawStyle": "line", + "fillOpacity": 0, + "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": [ + { + "matcher": { + "id": "byName", + "options": "max" + }, + "properties": [ + { + "id": "color", + "value": { + "fixedColor": "#C4162A", + "mode": "fixed" + } + } + ] + } + ] + }, + "gridPos": { + "h": 8, + "w": 12, + "x": 12, + "y": 21 + }, + "id": 133, + "links": [ + { + "targetBlank": true, + "title": "Related discussion", + "url": "https://github.com/VictoriaMetrics/VictoriaMetrics/issues/632" + } + ], + "options": { + "legend": { + "calcs": [ + "mean", + "lastNotNull", + "max" + ], + "displayMode": "table", + "placement": "bottom", + "showLegend": true, + "sortBy": "Last *", + "sortDesc": true + }, + "tooltip": { + "mode": "multi", + "sort": "none" + } + }, + "pluginVersion": "9.1.0", + "targets": [ + { + "datasource": { + "type": "prometheus", + "uid": "$ds" + }, + "editorMode": "code", + "exemplar": true, + "expr": "max(\n max_over_time(vm_concurrent_addrows_current{job=~\"$job_storage\", \n instance=~\"$instance\"}[$__rate_interval])\n)", + "interval": "", + "legendFormat": "current", + "range": true, + "refId": "A" + }, + { + "datasource": { + "type": "prometheus", + "uid": "$ds" + }, + "editorMode": "code", + "exemplar": true, + "expr": "min(vm_concurrent_addrows_capacity{job=~\"$job_storage\", instance=~\"$instance\"})", + "hide": false, + "interval": "", + "legendFormat": "max", "range": true, "refId": "B" } ], - "thresholds": [], - "timeRegions": [], - "title": "Memory ($instance)", - "tooltip": { - "shared": true, - "sort": 0, - "value_type": "individual" + "title": "Concurrent flushes on disk ($instance)", + "type": "timeseries" + }, + { + "datasource": { + "type": "prometheus", + "uid": "$ds" }, - "type": "graph", - "xaxis": { - "mode": "time", - "show": true, - "values": [] - }, - "yaxes": [ - { - "$$hashKey": "object:164", - "format": "bytes", - "logBase": 1, - "min": "0", - "show": true + "description": "The number of on-going merges in storage nodes. It is expected to have high numbers for `storage/small` metric.", + "fieldConfig": { + "defaults": { + "color": { + "mode": "palette-classic" + }, + "custom": { + "axisCenteredZero": false, + "axisColorMode": "text", + "axisLabel": "", + "axisPlacement": "auto", + "barAlignment": 0, + "drawStyle": "line", + "fillOpacity": 0, + "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" + } + }, + "decimals": 0, + "links": [], + "mappings": [], + "min": 0, + "thresholds": { + "mode": "absolute", + "steps": [ + { + "color": "green" + }, + { + "color": "red", + "value": 80 + } + ] + }, + "unit": "short" }, + "overrides": [] + }, + "gridPos": { + "h": 8, + "w": 12, + "x": 0, + "y": 29 + }, + "id": 54, + "options": { + "legend": { + "calcs": [ + "mean", + "lastNotNull", + "max" + ], + "displayMode": "table", + "placement": "bottom", + "showLegend": true, + "sortBy": "Last *", + "sortDesc": true + }, + "tooltip": { + "mode": "multi", + "sort": "desc" + } + }, + "pluginVersion": "9.1.0", + "targets": [ { - "$$hashKey": "object:165", - "format": "short", - "logBase": 1, - "show": true + "datasource": { + "type": "prometheus", + "uid": "$ds" + }, + "editorMode": "code", + "expr": "sum(max_over_time(vm_active_merges{job=~\"$job_storage\", instance=~\"$instance\"}[$__rate_interval])) by(type)", + "legendFormat": "__auto", + "range": true, + "refId": "A" } ], - "yaxis": { - "align": false - } + "title": "Active merges ($instance)", + "type": "timeseries" + }, + { + "datasource": { + "type": "prometheus", + "uid": "$ds" + }, + "description": "The number of rows merged per second by storage nodes.", + "fieldConfig": { + "defaults": { + "color": { + "mode": "palette-classic" + }, + "custom": { + "axisCenteredZero": false, + "axisColorMode": "text", + "axisLabel": "", + "axisPlacement": "auto", + "barAlignment": 0, + "drawStyle": "line", + "fillOpacity": 0, + "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" + } + }, + "decimals": 0, + "links": [], + "mappings": [], + "min": 0, + "thresholds": { + "mode": "absolute", + "steps": [ + { + "color": "green" + }, + { + "color": "red", + "value": 80 + } + ] + }, + "unit": "short" + }, + "overrides": [] + }, + "gridPos": { + "h": 8, + "w": 12, + "x": 12, + "y": 29 + }, + "id": 55, + "options": { + "legend": { + "calcs": [ + "mean", + "lastNotNull", + "max" + ], + "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(rate(vm_rows_merged_total{job=~\"$job_storage\", instance=~\"$instance\"}[$__rate_interval])) by(type)", + "legendFormat": "__auto", + "range": true, + "refId": "A" + } + ], + "title": "Merge speed", + "type": "timeseries" + }, + { + "datasource": { + "type": "prometheus", + "uid": "$ds" + }, + "description": "Shows amount of on-disk space occupied by data points.", + "fieldConfig": { + "defaults": { + "color": { + "mode": "palette-classic" + }, + "custom": { + "axisCenteredZero": false, + "axisColorMode": "text", + "axisLabel": "", + "axisPlacement": "auto", + "barAlignment": 0, + "drawStyle": "line", + "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": "normal" + }, + "thresholdsStyle": { + "mode": "off" + } + }, + "links": [], + "mappings": [], + "min": 0, + "thresholds": { + "mode": "absolute", + "steps": [ + { + "color": "green" + }, + { + "color": "red", + "value": 80 + } + ] + }, + "unit": "bytes" + }, + "overrides": [] + }, + "gridPos": { + "h": 8, + "w": 12, + "x": 0, + "y": 37 + }, + "id": 18, + "links": [], + "options": { + "legend": { + "calcs": [ + "mean", + "lastNotNull", + "max" + ], + "displayMode": "table", + "placement": "bottom", + "showLegend": true, + "sortBy": "Last *", + "sortDesc": true + }, + "tooltip": { + "mode": "multi", + "sort": "none" + } + }, + "pluginVersion": "9.1.0", + "targets": [ + { + "datasource": { + "type": "prometheus", + "uid": "$ds" + }, + "editorMode": "code", + "expr": "sum(vm_data_size_bytes{job=~\"$job_storage\", instance=~\"$instance\", type!=\"indexdb\"}) ", + "format": "time_series", + "intervalFactor": 1, + "legendFormat": "disk usage", + "range": true, + "refId": "A" + } + ], + "title": "Disk space usage (datapoints) ($instance)", + "type": "timeseries" + }, + { + "datasource": { + "type": "prometheus", + "uid": "$ds" + }, + "description": "The max number of data parts of LSM tree across all storage nodes.\nHigh number of parts (the hard limit is 512) is an evidence of slow merge performance - check the resource utilization.\n* `indexdb` - inverted index\n* `storage/small` - recently added parts of data ingested into storage (hot data)\n* `storage/big` - small parts gradually merged into big parts (cold data)", + "fieldConfig": { + "defaults": { + "color": { + "mode": "palette-classic" + }, + "custom": { + "axisCenteredZero": false, + "axisColorMode": "text", + "axisLabel": "", + "axisPlacement": "auto", + "barAlignment": 0, + "drawStyle": "line", + "fillOpacity": 0, + "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" + } + }, + "links": [], + "mappings": [], + "min": 0, + "thresholds": { + "mode": "absolute", + "steps": [ + { + "color": "green" + }, + { + "color": "red", + "value": 80 + } + ] + }, + "unit": "short" + }, + "overrides": [] + }, + "gridPos": { + "h": 8, + "w": 12, + "x": 12, + "y": 37 + }, + "id": 22, + "links": [], + "options": { + "legend": { + "calcs": [ + "mean", + "lastNotNull", + "max" + ], + "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": "max(vm_parts{job=~\"$job_storage\", instance=~\"$instance\"}) by(type)", + "format": "time_series", + "interval": "", + "intervalFactor": 1, + "legendFormat": "__auto", + "range": true, + "refId": "A" + } + ], + "title": "LSM parts max by type ($instance)", + "type": "timeseries" + }, + { + "datasource": { + "type": "prometheus", + "uid": "$ds" + }, + "description": "Shows amount of on-disk space occupied by inverted index.", + "fieldConfig": { + "defaults": { + "color": { + "mode": "palette-classic" + }, + "custom": { + "axisCenteredZero": false, + "axisColorMode": "text", + "axisLabel": "", + "axisPlacement": "auto", + "barAlignment": 0, + "drawStyle": "line", + "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": "normal" + }, + "thresholdsStyle": { + "mode": "off" + } + }, + "links": [], + "mappings": [], + "min": 0, + "thresholds": { + "mode": "absolute", + "steps": [ + { + "color": "green" + }, + { + "color": "red", + "value": 80 + } + ] + }, + "unit": "bytes" + }, + "overrides": [] + }, + "gridPos": { + "h": 8, + "w": 12, + "x": 0, + "y": 45 + }, + "id": 20, + "links": [], + "options": { + "legend": { + "calcs": [ + "mean", + "lastNotNull", + "max" + ], + "displayMode": "table", + "placement": "bottom", + "showLegend": true, + "sortBy": "Last *", + "sortDesc": true + }, + "tooltip": { + "mode": "multi", + "sort": "none" + } + }, + "pluginVersion": "9.1.0", + "targets": [ + { + "datasource": { + "type": "prometheus", + "uid": "$ds" + }, + "editorMode": "code", + "expr": "sum(vm_data_size_bytes{job=~\"$job_storage\", instance=~\"$instance\", type=\"indexdb\"})", + "format": "time_series", + "intervalFactor": 1, + "legendFormat": "disk usage", + "range": true, + "refId": "A" + } + ], + "title": "Disk space usage (index) ($instance)", + "type": "timeseries" + }, + { + "datasource": { + "type": "prometheus", + "uid": "$ds" + }, + "description": "How many datapoints are in RAM queue waiting to be written into storage. The number of pending data points should be in the range from 0 to `2*`, since VictoriaMetrics pushes pending data to persistent storage every second. The index datapoints value in general is much lower.", + "fieldConfig": { + "defaults": { + "color": { + "mode": "palette-classic" + }, + "custom": { + "axisCenteredZero": false, + "axisColorMode": "text", + "axisLabel": "", + "axisPlacement": "auto", + "barAlignment": 0, + "drawStyle": "line", + "fillOpacity": 0, + "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" + } + }, + "links": [], + "mappings": [], + "min": 0, + "thresholds": { + "mode": "absolute", + "steps": [ + { + "color": "green" + }, + { + "color": "red", + "value": 80 + } + ] + }, + "unit": "short" + }, + "overrides": [ + { + "matcher": { + "id": "byName", + "options": "pending index entries" + }, + "properties": [ + { + "id": "unit", + "value": "none" + }, + { + "id": "decimals", + "value": 3 + } + ] + } + ] + }, + "gridPos": { + "h": 8, + "w": 12, + "x": 12, + "y": 45 + }, + "id": 14, + "links": [], + "options": { + "legend": { + "calcs": [ + "mean", + "lastNotNull", + "max" + ], + "displayMode": "table", + "placement": "bottom", + "showLegend": true, + "sortBy": "Last *", + "sortDesc": true + }, + "tooltip": { + "mode": "multi", + "sort": "none" + } + }, + "pluginVersion": "9.1.0", + "targets": [ + { + "datasource": { + "type": "prometheus", + "uid": "$ds" + }, + "editorMode": "code", + "expr": "sum(max_over_time(vm_pending_rows{job=~\"$job_storage\", instance=~\"$instance\", type=\"storage\"}[$__rate_interval]))", + "format": "time_series", + "hide": false, + "intervalFactor": 1, + "legendFormat": "pending datapoints", + "range": true, + "refId": "A" + }, + { + "datasource": { + "type": "prometheus", + "uid": "$ds" + }, + "editorMode": "code", + "expr": "sum(max_over_time(vm_pending_rows{job=~\"$job_storage\", instance=~\"$instance\", type=\"indexdb\"}[$__rate_interval]))", + "format": "time_series", + "hide": false, + "intervalFactor": 1, + "legendFormat": "pending index entries", + "range": true, + "refId": "B" + } + ], + "title": "Pending datapoints ($instance)", + "type": "timeseries" + }, + { + "datasource": { + "type": "prometheus", + "uid": "$ds" + }, + "description": "Shows how many rows were ignored on insertion due to corrupted or out of retention timestamps.", + "fieldConfig": { + "defaults": { + "color": { + "mode": "palette-classic" + }, + "custom": { + "axisCenteredZero": false, + "axisColorMode": "text", + "axisLabel": "", + "axisPlacement": "auto", + "barAlignment": 0, + "drawStyle": "line", + "fillOpacity": 0, + "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": 8, + "w": 12, + "x": 12, + "y": 53 + }, + "id": 135, + "options": { + "legend": { + "calcs": [ + "mean", + "lastNotNull", + "max" + ], + "displayMode": "table", + "placement": "bottom", + "showLegend": true, + "sortBy": "Last *", + "sortDesc": true + }, + "tooltip": { + "mode": "multi", + "sort": "none" + } + }, + "pluginVersion": "9.1.0", + "targets": [ + { + "datasource": { + "type": "prometheus", + "uid": "$ds" + }, + "editorMode": "code", + "exemplar": true, + "expr": "sum(increase(vm_rows_ignored_total{job=~\"$job_storage\", instance=~\"$instance\"}[1h])) by (reason)", + "interval": "", + "legendFormat": "__auto", + "range": true, + "refId": "A" + } + ], + "title": "Rows ignored for last 1h ($instance)", + "type": "timeseries" } ], "title": "vmstorage ($instance)", @@ -6159,15 +5784,11 @@ "h": 1, "w": 24, "x": 0, - "y": 39 + "y": 41 }, "id": 42, "panels": [ { - "aliasColors": {}, - "bars": false, - "dashLength": 10, - "dashes": false, "datasource": { "type": "prometheus", "uid": "$ds" @@ -6175,100 +5796,104 @@ "description": "Request rate accepted by vmselect nodes", "fieldConfig": { "defaults": { - "links": [] + "color": { + "mode": "palette-classic" + }, + "custom": { + "axisCenteredZero": false, + "axisColorMode": "text", + "axisLabel": "", + "axisPlacement": "auto", + "barAlignment": 0, + "drawStyle": "line", + "fillOpacity": 0, + "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" + } + }, + "links": [], + "mappings": [], + "min": 0, + "thresholds": { + "mode": "absolute", + "steps": [ + { + "color": "green" + }, + { + "color": "red", + "value": 80 + } + ] + }, + "unit": "short" }, "overrides": [] }, - "fill": 0, - "fillGradient": 0, "gridPos": { "h": 8, "w": 12, "x": 0, - "y": 8 + "y": 7 }, - "hiddenSeries": false, "id": 92, - "legend": { - "alignAsTable": true, - "avg": true, - "current": true, - "max": true, - "min": false, - "show": true, - "sort": "current", - "sortDesc": true, - "total": false, - "values": true - }, - "lines": true, - "linewidth": 1, "links": [], - "nullPointMode": "null as zero", "options": { - "alertThreshold": true + "legend": { + "calcs": [ + "mean", + "lastNotNull", + "max" + ], + "displayMode": "table", + "placement": "bottom", + "showLegend": true, + "sortBy": "Last *", + "sortDesc": true + }, + "tooltip": { + "mode": "multi", + "sort": "desc" + } }, - "percentage": false, - "pluginVersion": "9.0.3", - "pointradius": 2, - "points": false, - "renderer": "flot", - "seriesOverrides": [], - "spaceLength": 10, - "stack": false, - "steppedLine": false, + "pluginVersion": "9.1.0", "targets": [ { "datasource": { "type": "prometheus", "uid": "$ds" }, + "editorMode": "code", "expr": "sum(rate(vm_http_requests_total{job=~\"$job_select\", instance=~\"$instance.*\", path!~\"/favicon.ico|/metrics\"}[$__rate_interval])) by (path) > 0", "format": "time_series", "intervalFactor": 1, - "legendFormat": "{{path}}", + "legendFormat": "__auto", + "range": true, "refId": "A" } ], - "thresholds": [], - "timeRegions": [], "title": "Requests rate ($instance)", - "tooltip": { - "shared": true, - "sort": 2, - "value_type": "individual" - }, - "type": "graph", - "xaxis": { - "mode": "time", - "show": true, - "values": [] - }, - "yaxes": [ - { - "$$hashKey": "object:2088", - "format": "short", - "logBase": 1, - "min": "0", - "show": true - }, - { - "$$hashKey": "object:2089", - "format": "short", - "logBase": 1, - "min": "0", - "show": true - } - ], - "yaxis": { - "align": false - } + "type": "timeseries" }, { - "aliasColors": {}, - "bars": false, - "dashLength": 10, - "dashes": false, "datasource": { "type": "prometheus", "uid": "$ds" @@ -6276,68 +5901,119 @@ "description": "Shows the max number of concurrent selects across instances.\n* `max` - equal to number of CPU * 2 by default. May be configured with `search.maxConcurrentRequests` flag\n* `current` - current number of goroutines busy with processing requests\n\nWhen `current` hits `max` constantly, it means one or more vmselect nodes are overloaded and require more CPU or better load balancing. If CPU panel shows there are free resources - try increasing `search.maxConcurrentRequests`.", "fieldConfig": { "defaults": { - "links": [] + "color": { + "mode": "palette-classic" + }, + "custom": { + "axisCenteredZero": false, + "axisColorMode": "text", + "axisLabel": "", + "axisPlacement": "auto", + "barAlignment": 0, + "drawStyle": "line", + "fillOpacity": 0, + "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" + } + }, + "decimals": 0, + "links": [], + "mappings": [], + "min": 0, + "thresholds": { + "mode": "absolute", + "steps": [ + { + "color": "green" + }, + { + "color": "red", + "value": 80 + } + ] + }, + "unit": "short" }, - "overrides": [] + "overrides": [ + { + "matcher": { + "id": "byName", + "options": "max" + }, + "properties": [ + { + "id": "color", + "value": { + "fixedColor": "#C4162A", + "mode": "fixed" + } + }, + { + "id": "custom.fillOpacity", + "value": 0 + } + ] + } + ] }, - "fill": 0, - "fillGradient": 0, "gridPos": { "h": 8, "w": 12, "x": 12, - "y": 8 + "y": 7 }, - "hiddenSeries": false, "id": 95, - "legend": { - "alignAsTable": true, - "avg": true, - "current": true, - "hideEmpty": false, - "hideZero": false, - "max": true, - "min": false, - "show": true, - "sort": "current", - "sortDesc": true, - "total": false, - "values": true - }, - "lines": true, - "linewidth": 1, "links": [], - "nullPointMode": "null", "options": { - "alertThreshold": true - }, - "percentage": false, - "pluginVersion": "9.0.3", - "pointradius": 2, - "points": false, - "renderer": "flot", - "seriesOverrides": [ - { - "$$hashKey": "object:2150", - "alias": "max", - "color": "#C4162A", - "fill": 0 + "legend": { + "calcs": [ + "mean", + "lastNotNull", + "max" + ], + "displayMode": "table", + "placement": "bottom", + "showLegend": true, + "sortBy": "Last *", + "sortDesc": true + }, + "tooltip": { + "mode": "multi", + "sort": "desc" } - ], - "spaceLength": 10, - "stack": false, - "steppedLine": false, + }, + "pluginVersion": "9.1.0", "targets": [ { "datasource": { "type": "prometheus", "uid": "$ds" }, - "expr": "max(max_over_time(vm_concurrent_select_current{job=~\"$job_select\", instance=~\"$instance\"}[1m])) ", + "editorMode": "code", + "expr": "max(max_over_time(vm_concurrent_select_current{job=~\"$job_select\", instance=~\"$instance\"}[$__rate_interval])) ", "format": "time_series", "interval": "", "intervalFactor": 1, "legendFormat": "current", + "range": true, "refId": "A" }, { @@ -6352,523 +6028,835 @@ "refId": "B" } ], - "thresholds": [], - "timeRegions": [], "title": "Concurrent selects ($instance)", - "tooltip": { - "shared": true, - "sort": 2, - "value_type": "individual" - }, - "type": "graph", - "xaxis": { - "mode": "time", - "show": true, - "values": [] - }, - "yaxes": [ - { - "$$hashKey": "object:2159", - "decimals": 0, - "format": "short", - "logBase": 1, - "min": "0", - "show": true - }, - { - "$$hashKey": "object:2160", - "decimals": 0, - "format": "short", - "logBase": 1, - "min": "0", - "show": true - } - ], - "yaxis": { - "align": false - } + "type": "timeseries" }, { - "aliasColors": {}, - "bars": false, - "dashLength": 10, - "dashes": false, "datasource": { "type": "prometheus", "uid": "$ds" }, - "description": "99th percentile of number of series read per query.", "fieldConfig": { "defaults": { - "links": [] + "color": { + "mode": "palette-classic" + }, + "custom": { + "axisCenteredZero": false, + "axisColorMode": "text", + "axisLabel": "", + "axisPlacement": "auto", + "barAlignment": 0, + "drawStyle": "line", + "fillOpacity": 0, + "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": "line" + } + }, + "links": [ + { + "targetBlank": true, + "title": "Drilldown", + "url": "/d/oS7Bi_0Wz?viewPanel=192&var-job=$job_select&var-ds=$ds&var-instance=$instance&${__url_time_range}" + } + ], + "mappings": [], + "min": 0, + "thresholds": { + "mode": "absolute", + "steps": [ + { + "color": "green" + }, + { + "color": "red", + "value": 0.9 + } + ] + }, + "unit": "percentunit" }, "overrides": [] }, - "fill": 0, - "fillGradient": 0, "gridPos": { "h": 8, "w": 12, "x": 0, - "y": 16 + "y": 15 + }, + "id": 163, + "links": [], + "options": { + "legend": { + "calcs": [ + "mean", + "lastNotNull", + "max" + ], + "displayMode": "table", + "placement": "bottom", + "showLegend": true, + "sortBy": "Last *", + "sortDesc": true + }, + "tooltip": { + "mode": "multi", + "sort": "none" + } + }, + "pluginVersion": "9.1.0", + "targets": [ + { + "datasource": { + "type": "prometheus", + "uid": "$ds" + }, + "editorMode": "code", + "exemplar": true, + "expr": "max(\n rate(process_cpu_seconds_total{job=~\"$job_select\", instance=~\"$instance\"}[$__rate_interval])\n /\n process_cpu_cores_available{job=~\"$job_select\", instance=~\"$instance\"}\n)", + "format": "time_series", + "interval": "", + "intervalFactor": 1, + "legendFormat": "max", + "range": true, + "refId": "A" + }, + { + "datasource": { + "type": "prometheus", + "uid": "$ds" + }, + "editorMode": "code", + "exemplar": true, + "expr": "min(\n rate(process_cpu_seconds_total{job=~\"$job_select\", instance=~\"$instance\"}[$__rate_interval])\n /\n process_cpu_cores_available{job=~\"$job_select\", instance=~\"$instance\"}\n)", + "format": "time_series", + "hide": false, + "interval": "", + "intervalFactor": 1, + "legendFormat": "min", + "range": true, + "refId": "B" + }, + { + "datasource": { + "type": "prometheus", + "uid": "$ds" + }, + "editorMode": "code", + "exemplar": true, + "expr": "avg(\n rate(process_cpu_seconds_total{job=~\"$job_select\", instance=~\"$instance\"}[$__rate_interval])\n /\n process_cpu_cores_available{job=~\"$job_select\", instance=~\"$instance\"}\n)", + "format": "time_series", + "hide": false, + "interval": "", + "intervalFactor": 1, + "legendFormat": "avg", + "range": true, + "refId": "C" + } + ], + "title": "CPU usage % ($instance)", + "type": "timeseries" + }, + { + "datasource": { + "type": "prometheus", + "uid": "$ds" + }, + "fieldConfig": { + "defaults": { + "color": { + "mode": "palette-classic" + }, + "custom": { + "axisCenteredZero": false, + "axisColorMode": "text", + "axisLabel": "", + "axisPlacement": "auto", + "barAlignment": 0, + "drawStyle": "line", + "fillOpacity": 0, + "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": "line" + } + }, + "links": [ + { + "targetBlank": true, + "title": "Drilldown", + "url": "/d/oS7Bi_0Wz?viewPanel=189&var-job=$job_select&var-ds=$ds&var-instance=$instance&${__url_time_range}" + } + ], + "mappings": [], + "min": 0, + "thresholds": { + "mode": "absolute", + "steps": [ + { + "color": "green" + }, + { + "color": "red", + "value": 0.9 + } + ] + }, + "unit": "percentunit" + }, + "overrides": [] + }, + "gridPos": { + "h": 8, + "w": 12, + "x": 12, + "y": 15 + }, + "id": 165, + "links": [], + "options": { + "legend": { + "calcs": [ + "mean", + "lastNotNull", + "max" + ], + "displayMode": "table", + "placement": "bottom", + "showLegend": true, + "sortBy": "Last *", + "sortDesc": true + }, + "tooltip": { + "mode": "multi", + "sort": "none" + } + }, + "pluginVersion": "9.1.0", + "targets": [ + { + "datasource": { + "type": "prometheus", + "uid": "$ds" + }, + "editorMode": "code", + "exemplar": true, + "expr": "max(\n max_over_time(process_resident_memory_bytes{job=~\"$job_select\", instance=~\"$instance\"}[$__rate_interval])\n /\n vm_available_memory_bytes{job=~\"$job_select\", instance=~\"$instance\"}\n)", + "format": "time_series", + "interval": "", + "intervalFactor": 1, + "legendFormat": "max", + "range": true, + "refId": "A" + }, + { + "datasource": { + "type": "prometheus", + "uid": "$ds" + }, + "editorMode": "code", + "exemplar": true, + "expr": "min(\n max_over_time(process_resident_memory_bytes{job=~\"$job_select\", instance=~\"$instance\"}[$__rate_interval])\n /\n vm_available_memory_bytes{job=~\"$job_select\", instance=~\"$instance\"}\n)", + "format": "time_series", + "hide": false, + "interval": "", + "intervalFactor": 1, + "legendFormat": "min", + "range": true, + "refId": "B" + }, + { + "datasource": { + "type": "prometheus", + "uid": "$ds" + }, + "editorMode": "code", + "exemplar": true, + "expr": "avg(\n max_over_time(process_resident_memory_bytes{job=~\"$job_select\", instance=~\"$instance\"}[$__rate_interval])\n /\n vm_available_memory_bytes{job=~\"$job_select\", instance=~\"$instance\"}\n)", + "format": "time_series", + "hide": false, + "interval": "", + "intervalFactor": 1, + "legendFormat": "avg", + "range": true, + "refId": "C" + } + ], + "title": "Memory usage % ($instance)", + "type": "timeseries" + }, + { + "datasource": { + "type": "prometheus", + "uid": "$ds" + }, + "description": "99th percentile of the number of time series read per query.", + "fieldConfig": { + "defaults": { + "color": { + "mode": "palette-classic" + }, + "custom": { + "axisCenteredZero": false, + "axisColorMode": "text", + "axisLabel": "", + "axisPlacement": "auto", + "barAlignment": 0, + "drawStyle": "line", + "fillOpacity": 0, + "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" + } + }, + "decimals": 2, + "links": [], + "mappings": [], + "min": 0, + "thresholds": { + "mode": "absolute", + "steps": [ + { + "color": "green" + }, + { + "color": "red", + "value": 80 + } + ] + }, + "unit": "short" + }, + "overrides": [] + }, + "gridPos": { + "h": 8, + "w": 12, + "x": 0, + "y": 23 }, - "hiddenSeries": false, "id": 178, - "legend": { - "alignAsTable": true, - "avg": true, - "current": true, - "max": true, - "min": false, - "show": true, - "sort": "current", - "sortDesc": true, - "total": false, - "values": true - }, - "lines": true, - "linewidth": 1, "links": [], - "nullPointMode": "null as zero", "options": { - "alertThreshold": true + "legend": { + "calcs": [ + "mean", + "lastNotNull", + "max" + ], + "displayMode": "table", + "placement": "bottom", + "showLegend": true, + "sortBy": "Last *", + "sortDesc": true + }, + "tooltip": { + "mode": "multi", + "sort": "desc" + } }, - "percentage": false, - "pluginVersion": "9.0.3", - "pointradius": 2, - "points": false, - "renderer": "flot", - "seriesOverrides": [], - "spaceLength": 10, - "stack": false, - "steppedLine": false, + "pluginVersion": "9.1.0", "targets": [ { "datasource": { "type": "prometheus", "uid": "$ds" }, - "expr": "histogram_quantile(0.99, sum(rate(vm_series_read_per_query_bucket{job=~\"$job_select\", instance=~\"$instance\"}[$__rate_interval])) by (instance, vmrange))", + "editorMode": "code", + "expr": "sum(histogram_quantile(0.99, sum(rate(vm_series_read_per_query_bucket{job=~\"$job_select\", instance=~\"$instance\"}[$__rate_interval])) by (instance, vmrange)))", "format": "time_series", "interval": "", "intervalFactor": 1, - "legendFormat": "{{instance}}", + "legendFormat": "series", + "range": true, "refId": "A" } ], - "thresholds": [], - "timeRegions": [], "title": "Series read per query ($instance)", - "tooltip": { - "shared": true, - "sort": 2, - "value_type": "individual" - }, - "type": "graph", - "xaxis": { - "mode": "time", - "show": true, - "values": [] - }, - "yaxes": [ - { - "$$hashKey": "object:2848", - "decimals": 2, - "format": "short", - "logBase": 1, - "min": "0", - "show": true - }, - { - "$$hashKey": "object:2849", - "format": "short", - "logBase": 1, - "min": "0", - "show": true - } - ], - "yaxis": { - "align": false - } + "type": "timeseries" }, { - "aliasColors": {}, - "bars": false, - "dashLength": 10, - "dashes": false, "datasource": { "type": "prometheus", "uid": "$ds" }, - "description": "99th percentile of number of raw samples read per query.", + "description": "99th percentile of number of raw datapoints read per queried time series.", "fieldConfig": { "defaults": { - "links": [] + "color": { + "mode": "palette-classic" + }, + "custom": { + "axisCenteredZero": false, + "axisColorMode": "text", + "axisLabel": "", + "axisPlacement": "auto", + "barAlignment": 0, + "drawStyle": "line", + "fillOpacity": 0, + "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" + } + }, + "decimals": 2, + "links": [], + "mappings": [], + "min": 0, + "thresholds": { + "mode": "absolute", + "steps": [ + { + "color": "green" + }, + { + "color": "red", + "value": 80 + } + ] + }, + "unit": "short" }, "overrides": [] }, - "fill": 0, - "fillGradient": 0, "gridPos": { "h": 8, "w": 12, "x": 12, - "y": 16 + "y": 23 }, - "hiddenSeries": false, - "id": 179, - "legend": { - "alignAsTable": true, - "avg": true, - "current": true, - "max": true, - "min": false, - "show": true, - "sort": "current", - "sortDesc": true, - "total": false, - "values": true - }, - "lines": true, - "linewidth": 1, + "id": 180, "links": [], - "nullPointMode": "null as zero", "options": { - "alertThreshold": true + "legend": { + "calcs": [ + "mean", + "lastNotNull", + "max" + ], + "displayMode": "table", + "placement": "bottom", + "showLegend": true, + "sortBy": "Last *", + "sortDesc": true + }, + "tooltip": { + "mode": "multi", + "sort": "desc" + } }, - "percentage": false, - "pluginVersion": "9.0.3", - "pointradius": 2, - "points": false, - "renderer": "flot", - "seriesOverrides": [], - "spaceLength": 10, - "stack": false, - "steppedLine": false, + "pluginVersion": "9.1.0", "targets": [ { "datasource": { "type": "prometheus", "uid": "$ds" }, - "expr": "histogram_quantile(0.99, sum(rate(vm_rows_read_per_query_bucket{job=~\"$job_select\", instance=~\"$instance\"}[$__rate_interval])) by (instance, vmrange))", + "editorMode": "code", + "expr": "sum(histogram_quantile(0.99, sum(rate(vm_rows_read_per_series_bucket{job=~\"$job_select\", instance=~\"$instance\"}[$__rate_interval])) by (instance, vmrange)))", "format": "time_series", "interval": "", "intervalFactor": 1, - "legendFormat": "{{instance}}", + "legendFormat": "datapoints", + "range": true, "refId": "A" } ], - "thresholds": [], - "timeRegions": [], - "title": "Rows read per query ($instance)", - "tooltip": { - "shared": true, - "sort": 2, - "value_type": "individual" - }, - "type": "graph", - "xaxis": { - "mode": "time", - "show": true, - "values": [] - }, - "yaxes": [ - { - "$$hashKey": "object:2848", - "decimals": 2, - "format": "short", - "logBase": 1, - "min": "0", - "show": true - }, - { - "$$hashKey": "object:2849", - "format": "short", - "logBase": 1, - "min": "0", - "show": true - } - ], - "yaxis": { - "align": false - } + "title": "Datapoints read per series ($instance)", + "type": "timeseries" }, { - "aliasColors": {}, - "bars": false, - "dashLength": 10, - "dashes": false, "datasource": { "type": "prometheus", "uid": "$ds" }, - "description": "99th percentile of number of raw samples read per queried series.", + "description": "99th percentile of number of raw datapoints read per query.", "fieldConfig": { "defaults": { - "links": [] + "color": { + "mode": "palette-classic" + }, + "custom": { + "axisCenteredZero": false, + "axisColorMode": "text", + "axisLabel": "", + "axisPlacement": "auto", + "barAlignment": 0, + "drawStyle": "line", + "fillOpacity": 0, + "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" + } + }, + "decimals": 2, + "links": [], + "mappings": [], + "min": 0, + "thresholds": { + "mode": "absolute", + "steps": [ + { + "color": "green" + }, + { + "color": "red", + "value": 80 + } + ] + }, + "unit": "short" }, "overrides": [] }, - "fill": 0, - "fillGradient": 0, "gridPos": { "h": 8, "w": 12, "x": 0, - "y": 24 + "y": 31 }, - "hiddenSeries": false, - "id": 180, - "legend": { - "alignAsTable": true, - "avg": true, - "current": true, - "max": true, - "min": false, - "show": true, - "sort": "current", - "sortDesc": true, - "total": false, - "values": true - }, - "lines": true, - "linewidth": 1, + "id": 179, "links": [], - "nullPointMode": "null as zero", "options": { - "alertThreshold": true + "legend": { + "calcs": [ + "mean", + "lastNotNull", + "max" + ], + "displayMode": "table", + "placement": "bottom", + "showLegend": true, + "sortBy": "Last *", + "sortDesc": true + }, + "tooltip": { + "mode": "multi", + "sort": "desc" + } }, - "percentage": false, - "pluginVersion": "9.0.3", - "pointradius": 2, - "points": false, - "renderer": "flot", - "seriesOverrides": [], - "spaceLength": 10, - "stack": false, - "steppedLine": false, + "pluginVersion": "9.1.0", "targets": [ { "datasource": { "type": "prometheus", "uid": "$ds" }, - "expr": "histogram_quantile(0.99, sum(rate(vm_rows_read_per_series_bucket{job=~\"$job_select\", instance=~\"$instance\"}[$__rate_interval])) by (instance, vmrange))", + "editorMode": "code", + "expr": "sum(histogram_quantile(0.99, sum(rate(vm_rows_read_per_query_bucket{job=~\"$job_select\", instance=~\"$instance\"}[$__rate_interval])) by (instance, vmrange)))", "format": "time_series", "interval": "", "intervalFactor": 1, - "legendFormat": "{{instance}}", + "legendFormat": "datapoints", + "range": true, "refId": "A" } ], - "thresholds": [], - "timeRegions": [], - "title": "Rows read per series ($instance)", - "tooltip": { - "shared": true, - "sort": 2, - "value_type": "individual" - }, - "type": "graph", - "xaxis": { - "mode": "time", - "show": true, - "values": [] - }, - "yaxes": [ - { - "$$hashKey": "object:2848", - "decimals": 2, - "format": "short", - "logBase": 1, - "min": "0", - "show": true - }, - { - "$$hashKey": "object:2849", - "format": "short", - "logBase": 1, - "min": "0", - "show": true - } - ], - "yaxis": { - "align": false - } + "title": "Datapoints read per query ($instance)", + "type": "timeseries" }, { - "aliasColors": {}, - "bars": false, - "dashLength": 10, - "dashes": false, "datasource": { "type": "prometheus", "uid": "$ds" }, - "description": "99th percentile of number of raw samples scanner per query.\n\nThis number can exceed number of RowsReadPerQuery if `step` query arg passed to [/api/v1/query_range](https://prometheus.io/docs/prometheus/latest/querying/api/#range-queries) is smaller than the lookbehind window set in square brackets of [rollup function](https://docs.victoriametrics.com/MetricsQL.html#rollup-functions). For example, if `increase(some_metric[1h])` is executed with the `step=5m`, then the same raw samples on a hour time range are scanned `1h/5m=12` times. See [this article](https://valyala.medium.com/how-to-optimize-promql-and-metricsql-queries-85a1b75bf986) for details.", + "description": "99th percentile of number of raw datapoints scanner per query.\n\nThis number can exceed number of DatapointsReadPerQuery if `step` query arg passed to [/api/v1/query_range](https://prometheus.io/docs/prometheus/latest/querying/api/#range-queries) is smaller than the lookbehind window set in square brackets of [rollup function](https://docs.victoriametrics.com/MetricsQL.html#rollup-functions). For example, if `increase(some_metric[1h])` is executed with the `step=5m`, then the same raw samples on a hour time range are scanned `1h/5m=12` times. See [this article](https://valyala.medium.com/how-to-optimize-promql-and-metricsql-queries-85a1b75bf986) for details.", "fieldConfig": { "defaults": { - "links": [] + "color": { + "mode": "palette-classic" + }, + "custom": { + "axisCenteredZero": false, + "axisColorMode": "text", + "axisLabel": "", + "axisPlacement": "auto", + "barAlignment": 0, + "drawStyle": "line", + "fillOpacity": 0, + "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" + } + }, + "decimals": 2, + "links": [], + "mappings": [], + "min": 0, + "thresholds": { + "mode": "absolute", + "steps": [ + { + "color": "green" + }, + { + "color": "red", + "value": 80 + } + ] + }, + "unit": "short" }, "overrides": [] }, - "fill": 0, - "fillGradient": 0, "gridPos": { "h": 8, "w": 12, "x": 12, - "y": 24 + "y": 31 }, - "hiddenSeries": false, "id": 181, - "legend": { - "alignAsTable": true, - "avg": true, - "current": true, - "max": true, - "min": false, - "show": true, - "sort": "current", - "sortDesc": true, - "total": false, - "values": true - }, - "lines": true, - "linewidth": 1, "links": [], - "nullPointMode": "null as zero", "options": { - "alertThreshold": true + "legend": { + "calcs": [ + "mean", + "lastNotNull", + "max" + ], + "displayMode": "table", + "placement": "bottom", + "showLegend": true, + "sortBy": "Last *", + "sortDesc": true + }, + "tooltip": { + "mode": "multi", + "sort": "desc" + } }, - "percentage": false, - "pluginVersion": "9.0.3", - "pointradius": 2, - "points": false, - "renderer": "flot", - "seriesOverrides": [], - "spaceLength": 10, - "stack": false, - "steppedLine": false, + "pluginVersion": "9.1.0", "targets": [ { "datasource": { "type": "prometheus", "uid": "$ds" }, - "expr": "histogram_quantile(0.99, sum(rate(vm_rows_scanned_per_query_bucket{job=~\"$job_select\", instance=~\"$instance\"}[$__rate_interval])) by (instance, vmrange))", + "editorMode": "code", + "expr": "sum(histogram_quantile(0.99, sum(rate(vm_rows_scanned_per_query_bucket{job=~\"$job_select\", instance=~\"$instance\"}[$__rate_interval])) by (instance, vmrange)))", "format": "time_series", "interval": "", "intervalFactor": 1, - "legendFormat": "{{instance}}", + "legendFormat": "datapoints", + "range": true, "refId": "A" } ], - "thresholds": [], - "timeRegions": [], - "title": "Rows scanned per series ($instance)", - "tooltip": { - "shared": true, - "sort": 2, - "value_type": "individual" - }, - "type": "graph", - "xaxis": { - "mode": "time", - "show": true, - "values": [] - }, - "yaxes": [ - { - "$$hashKey": "object:2848", - "decimals": 2, - "format": "short", - "logBase": 1, - "min": "0", - "show": true - }, - { - "$$hashKey": "object:2849", - "format": "short", - "logBase": 1, - "min": "0", - "show": true - } - ], - "yaxis": { - "align": false - } + "title": "Datapoints scanned per series ($instance)", + "type": "timeseries" }, { - "aliasColors": {}, - "bars": false, - "dashLength": 10, - "dashes": false, "datasource": { + "type": "prometheus", "uid": "$ds" }, "description": "", "fieldConfig": { "defaults": { - "links": [] + "color": { + "mode": "palette-classic" + }, + "custom": { + "axisCenteredZero": false, + "axisColorMode": "text", + "axisLabel": "", + "axisPlacement": "auto", + "barAlignment": 0, + "drawStyle": "line", + "fillOpacity": 0, + "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" + } + }, + "links": [], + "mappings": [], + "thresholds": { + "mode": "absolute", + "steps": [ + { + "color": "green" + }, + { + "color": "red", + "value": 80 + } + ] + }, + "unit": "bps" }, - "overrides": [] + "overrides": [ + { + "matcher": { + "id": "byRegexp", + "options": "/read.*/" + }, + "properties": [ + { + "id": "custom.transform", + "value": "negative-Y" + } + ] + } + ] }, - "fill": 0, - "fillGradient": 0, "gridPos": { "h": 8, "w": 24, "x": 0, - "y": 32 + "y": 39 }, - "hiddenSeries": false, "id": 93, - "legend": { - "alignAsTable": true, - "avg": true, - "current": true, - "max": false, - "min": false, - "show": true, - "sort": "current", - "sortDesc": true, - "total": false, - "values": true - }, - "lines": true, - "linewidth": 1, "links": [], - "nullPointMode": "null as zero", "options": { - "alertThreshold": true - }, - "percentage": false, - "pluginVersion": "9.0.3", - "pointradius": 2, - "points": false, - "renderer": "flot", - "seriesOverrides": [ - { - "$$hashKey": "object:2229", - "alias": "/read.*/", - "transform": "negative-Y" + "legend": { + "calcs": [ + "mean", + "lastNotNull" + ], + "displayMode": "table", + "placement": "bottom", + "showLegend": true, + "sortBy": "Last *", + "sortDesc": true + }, + "tooltip": { + "mode": "multi", + "sort": "desc" } - ], - "spaceLength": 10, - "stack": false, - "steppedLine": false, + }, + "pluginVersion": "9.1.0", "targets": [ { "datasource": { "type": "prometheus", "uid": "$ds" }, - "expr": "sum(rate(vm_tcplistener_read_bytes_total{job=~\"$job_select\", instance=~\"$instance\"}[$__rate_interval])) by (instance) * 8 > 0", + "editorMode": "code", + "expr": "sum(rate(vm_tcplistener_read_bytes_total{job=~\"$job_select\", instance=~\"$instance\"}[$__rate_interval])) * 8 > 0", "format": "time_series", "intervalFactor": 1, - "legendFormat": "read - {{instance}}", + "legendFormat": "read", + "range": true, "refId": "A" }, { @@ -6876,287 +6864,18 @@ "type": "prometheus", "uid": "$ds" }, - "expr": "sum(rate(vm_tcplistener_written_bytes_total{job=~\"$job_select\", instance=~\"$instance\"}[$__rate_interval])) by (instance) * 8 > 0", + "editorMode": "code", + "expr": "sum(rate(vm_tcplistener_written_bytes_total{job=~\"$job_select\", instance=~\"$instance\"}[$__rate_interval])) * 8 > 0", "format": "time_series", "hide": false, "intervalFactor": 1, - "legendFormat": "write - {{instance}}", + "legendFormat": "write ", + "range": true, "refId": "B" } ], - "thresholds": [], - "timeRegions": [], "title": "Network usage ($instance)", - "tooltip": { - "shared": true, - "sort": 2, - "value_type": "individual" - }, - "type": "graph", - "xaxis": { - "mode": "time", - "show": true, - "values": [] - }, - "yaxes": [ - { - "$$hashKey": "object:2236", - "format": "bps", - "logBase": 1, - "show": true - }, - { - "$$hashKey": "object:2237", - "format": "short", - "logBase": 1, - "show": true - } - ], - "yaxis": { - "align": false - } - }, - { - "aliasColors": {}, - "bars": false, - "dashLength": 10, - "dashes": false, - "datasource": { - "type": "prometheus", - "uid": "$ds" - }, - "fieldConfig": { - "defaults": { - "links": [] - }, - "overrides": [] - }, - "fill": 0, - "fillGradient": 0, - "gridPos": { - "h": 8, - "w": 12, - "x": 0, - "y": 40 - }, - "hiddenSeries": false, - "id": 163, - "legend": { - "alignAsTable": true, - "avg": true, - "current": true, - "max": true, - "min": false, - "show": true, - "sort": "current", - "sortDesc": true, - "total": false, - "values": true - }, - "lines": true, - "linewidth": 1, - "links": [], - "nullPointMode": "null", - "options": { - "alertThreshold": true - }, - "percentage": false, - "pluginVersion": "9.0.3", - "pointradius": 2, - "points": false, - "renderer": "flot", - "seriesOverrides": [ - { - "$$hashKey": "object:186", - "alias": "limit", - "color": "#C4162A" - } - ], - "spaceLength": 10, - "stack": false, - "steppedLine": false, - "targets": [ - { - "datasource": { - "type": "prometheus", - "uid": "$ds" - }, - "editorMode": "code", - "exemplar": true, - "expr": "sum(rate(process_cpu_seconds_total{job=~\"$job_select\", instance=~\"$instance\"}[$__rate_interval])) by(instance)", - "format": "time_series", - "interval": "", - "intervalFactor": 1, - "legendFormat": "{{instance}}", - "range": true, - "refId": "A" - }, - { - "datasource": { - "type": "prometheus", - "uid": "$ds" - }, - "editorMode": "code", - "expr": "min(process_cpu_cores_available{job=~\"$job_select\", instance=~\"$instance\"})", - "hide": false, - "legendFormat": "limit", - "range": true, - "refId": "B" - } - ], - "thresholds": [], - "timeRegions": [], - "title": "CPU ($instance)", - "tooltip": { - "shared": true, - "sort": 0, - "value_type": "individual" - }, - "type": "graph", - "xaxis": { - "mode": "time", - "show": true, - "values": [] - }, - "yaxes": [ - { - "$$hashKey": "object:2303", - "format": "short", - "logBase": 1, - "min": "0", - "show": true - }, - { - "$$hashKey": "object:2304", - "format": "short", - "logBase": 1, - "show": true - } - ], - "yaxis": { - "align": false - } - }, - { - "aliasColors": {}, - "bars": false, - "dashLength": 10, - "dashes": false, - "datasource": { - "type": "prometheus", - "uid": "$ds" - }, - "fieldConfig": { - "defaults": { - "links": [] - }, - "overrides": [] - }, - "fill": 0, - "fillGradient": 0, - "gridPos": { - "h": 8, - "w": 12, - "x": 12, - "y": 40 - }, - "hiddenSeries": false, - "id": 165, - "legend": { - "alignAsTable": true, - "avg": true, - "current": true, - "max": true, - "min": false, - "show": true, - "sort": "current", - "sortDesc": true, - "total": false, - "values": true - }, - "lines": true, - "linewidth": 1, - "links": [], - "nullPointMode": "null", - "options": { - "alertThreshold": true - }, - "percentage": false, - "pluginVersion": "9.0.3", - "pointradius": 2, - "points": false, - "renderer": "flot", - "seriesOverrides": [ - { - "$$hashKey": "object:186", - "alias": "limit", - "color": "#C4162A" - } - ], - "spaceLength": 10, - "stack": false, - "steppedLine": false, - "targets": [ - { - "datasource": { - "type": "prometheus", - "uid": "$ds" - }, - "editorMode": "code", - "exemplar": true, - "expr": "sum(process_resident_memory_anon_bytes{job=~\"$job_select\", instance=~\"$instance\"}) by(instance) ", - "format": "time_series", - "interval": "", - "intervalFactor": 1, - "legendFormat": "{{instance}}", - "range": true, - "refId": "A" - }, - { - "datasource": { - "type": "prometheus", - "uid": "$ds" - }, - "editorMode": "code", - "expr": "min(vm_available_memory_bytes{job=~\"$job_select\", instance=~\"$instance\"})", - "hide": false, - "legendFormat": "limit", - "range": true, - "refId": "B" - } - ], - "thresholds": [], - "timeRegions": [], - "title": "Memory ($instance)", - "tooltip": { - "shared": true, - "sort": 0, - "value_type": "individual" - }, - "type": "graph", - "xaxis": { - "mode": "time", - "show": true, - "values": [] - }, - "yaxes": [ - { - "$$hashKey": "object:164", - "format": "bytes", - "logBase": 1, - "min": "0", - "show": true - }, - { - "$$hashKey": "object:165", - "format": "short", - "logBase": 1, - "show": true - } - ], - "yaxis": { - "align": false - } + "type": "timeseries" } ], "title": "vmselect ($instance)", @@ -7171,173 +6890,97 @@ "h": 1, "w": 24, "x": 0, - "y": 40 + "y": 42 }, "id": 40, "panels": [ { - "aliasColors": {}, - "bars": false, - "dashLength": 10, - "dashes": false, "datasource": { + "type": "prometheus", "uid": "$ds" }, "description": "* `*` - unsupported query path\n* `/write` - insert into VM\n* `/metrics` - query VM system metrics\n* `/query` - query instant values\n* `/query_range` - query over a range of time\n* `/series` - match a certain label set\n* `/label/{}/values` - query a list of label values (variables mostly)", "fieldConfig": { "defaults": { - "links": [] + "color": { + "mode": "palette-classic" + }, + "custom": { + "axisCenteredZero": false, + "axisColorMode": "text", + "axisLabel": "", + "axisPlacement": "auto", + "barAlignment": 0, + "drawStyle": "line", + "fillOpacity": 0, + "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" + } + }, + "links": [], + "mappings": [], + "min": 0, + "thresholds": { + "mode": "absolute", + "steps": [ + { + "color": "green" + }, + { + "color": "red", + "value": 80 + } + ] + }, + "unit": "short" }, "overrides": [] }, - "fill": 0, - "fillGradient": 0, "gridPos": { "h": 8, "w": 12, "x": 0, - "y": 41 + "y": 8 }, - "hiddenSeries": false, "id": 97, - "legend": { - "alignAsTable": true, - "avg": true, - "current": true, - "max": true, - "min": false, - "show": true, - "sort": "current", - "sortDesc": true, - "total": false, - "values": true - }, - "lines": true, - "linewidth": 1, "links": [], - "nullPointMode": "null as zero", "options": { - "alertThreshold": true - }, - "percentage": false, - "pluginVersion": "9.0.3", - "pointradius": 2, - "points": false, - "renderer": "flot", - "seriesOverrides": [], - "spaceLength": 10, - "stack": false, - "steppedLine": false, - "targets": [ - { - "datasource": { - "type": "prometheus", - "uid": "$ds" - }, - "expr": "sum(rate(vm_http_requests_total{job=~\"$job_insert\", instance=~\"$instance.*\", path!~\"/favicon.ico\"}[$__rate_interval])) by (path) > 0", - "format": "time_series", - "intervalFactor": 1, - "legendFormat": "{{path}}", - "refId": "A" - } - ], - "thresholds": [], - "timeRegions": [], - "title": "Requests rate ($instance)", - "tooltip": { - "shared": true, - "sort": 2, - "value_type": "individual" - }, - "type": "graph", - "xaxis": { - "mode": "time", - "show": true, - "values": [] - }, - "yaxes": [ - { - "$$hashKey": "object:2715", - "format": "short", - "logBase": 1, - "min": "0", - "show": true + "legend": { + "calcs": [ + "mean", + "lastNotNull", + "max" + ], + "displayMode": "table", + "placement": "bottom", + "showLegend": true, + "sortBy": "Last *", + "sortDesc": true }, - { - "$$hashKey": "object:2716", - "format": "short", - "logBase": 1, - "min": "0", - "show": true + "tooltip": { + "mode": "multi", + "sort": "desc" } - ], - "yaxis": { - "align": false - } - }, - { - "aliasColors": {}, - "bars": false, - "dashLength": 10, - "dashes": false, - "datasource": { - "type": "prometheus", - "uid": "$ds" }, - "description": "Shows how many ongoing insertions are taking place.\n* `max` - equal to number of CPU * 4 by default. May be configured with `maxConcurrentInserts` flag;\n* `current` - current number of goroutines busy with processing requests.\n\n`-maxConcurrentInserts` limits the number of insert requests which may be actively processed at any given point in time. All the other insert requests are queued for up to `-insert.maxQueueDuration` in the hope they will get a chance to be processed. This queue is used mostly for absorbing spikes for incoming insert request rate.\n\nWhen `current` hits `max` constantly, it means vminsert node is overloaded and requires more CPU or higher limits.", - "fieldConfig": { - "defaults": { - "links": [] - }, - "overrides": [] - }, - "fill": 1, - "fillGradient": 0, - "gridPos": { - "h": 8, - "w": 12, - "x": 12, - "y": 41 - }, - "hiddenSeries": false, - "id": 99, - "legend": { - "alignAsTable": true, - "avg": true, - "current": true, - "hideEmpty": false, - "hideZero": false, - "max": true, - "min": false, - "show": true, - "sort": "current", - "sortDesc": true, - "total": false, - "values": true - }, - "lines": true, - "linewidth": 1, - "links": [], - "nullPointMode": "null", - "options": { - "alertThreshold": true - }, - "percentage": false, - "pluginVersion": "9.0.3", - "pointradius": 2, - "points": false, - "renderer": "flot", - "seriesOverrides": [ - { - "$$hashKey": "object:2777", - "alias": "max", - "color": "#C4162A", - "fill": 0 - } - ], - "spaceLength": 10, - "stack": false, - "steppedLine": false, + "pluginVersion": "9.1.0", "targets": [ { "datasource": { @@ -7345,11 +6988,137 @@ "uid": "$ds" }, "editorMode": "code", - "expr": "max(vm_concurrent_insert_current{job=~\"$job_insert\", instance=~\"$instance\"}) by(instance)", + "expr": "sum(rate(vm_http_requests_total{job=~\"$job_insert\", instance=~\"$instance.*\", path!~\"/favicon.ico|/metrics\"}[$__rate_interval])) by (path) > 0", + "format": "time_series", + "intervalFactor": 1, + "legendFormat": "__auto", + "range": true, + "refId": "A" + } + ], + "title": "Requests rate ($instance)", + "type": "timeseries" + }, + { + "datasource": { + "type": "prometheus", + "uid": "$ds" + }, + "description": "Shows the max number of ongoing insertions.\n* `max` - equal to number of CPU * 4 by default. May be configured with `maxConcurrentInserts` flag;\n* `current` - current number of goroutines busy with processing requests.\n\n`-maxConcurrentInserts` limits the number of insert requests which may be actively processed at any given point in time. All the other insert requests are queued for up to `-insert.maxQueueDuration` in the hope they will get a chance to be processed. This queue is used mostly for absorbing spikes for incoming insert request rate.\n\nWhen `current` hits `max` constantly, it means vminsert node is overloaded and requires more CPU or higher limits.", + "fieldConfig": { + "defaults": { + "color": { + "mode": "palette-classic" + }, + "custom": { + "axisCenteredZero": false, + "axisColorMode": "text", + "axisLabel": "", + "axisPlacement": "auto", + "barAlignment": 0, + "drawStyle": "line", + "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" + } + }, + "decimals": 0, + "links": [], + "mappings": [], + "min": 0, + "thresholds": { + "mode": "absolute", + "steps": [ + { + "color": "green" + }, + { + "color": "red", + "value": 80 + } + ] + }, + "unit": "short" + }, + "overrides": [ + { + "matcher": { + "id": "byName", + "options": "max" + }, + "properties": [ + { + "id": "color", + "value": { + "fixedColor": "#C4162A", + "mode": "fixed" + } + }, + { + "id": "custom.fillOpacity", + "value": 0 + } + ] + } + ] + }, + "gridPos": { + "h": 8, + "w": 12, + "x": 12, + "y": 8 + }, + "id": 99, + "links": [], + "options": { + "legend": { + "calcs": [ + "mean", + "lastNotNull", + "max" + ], + "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": "max(max_over_time(vm_concurrent_insert_current{job=~\"$job_insert\", instance=~\"$instance\"}[$__rate_interval]))", "format": "time_series", "interval": "", "intervalFactor": 1, - "legendFormat": "{{instance}}", + "legendFormat": "current", "range": true, "refId": "A" }, @@ -7367,47 +7136,298 @@ "refId": "B" } ], - "thresholds": [], - "timeRegions": [], "title": "Concurrent inserts ($instance)", - "tooltip": { - "shared": true, - "sort": 2, - "value_type": "individual" - }, - "type": "graph", - "xaxis": { - "mode": "time", - "show": true, - "values": [] - }, - "yaxes": [ - { - "$$hashKey": "object:2786", - "decimals": 0, - "format": "short", - "logBase": 1, - "min": "0", - "show": true - }, - { - "$$hashKey": "object:2787", - "decimals": 0, - "format": "short", - "logBase": 1, - "min": "0", - "show": true - } - ], - "yaxis": { - "align": false - } + "type": "timeseries" + }, + { + "datasource": { + "type": "prometheus", + "uid": "$ds" + }, + "fieldConfig": { + "defaults": { + "color": { + "mode": "palette-classic" + }, + "custom": { + "axisCenteredZero": false, + "axisColorMode": "text", + "axisLabel": "", + "axisPlacement": "auto", + "barAlignment": 0, + "drawStyle": "line", + "fillOpacity": 0, + "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": "line" + } + }, + "links": [ + { + "targetBlank": true, + "title": "Drilldown", + "url": "/d/oS7Bi_0Wz?viewPanel=192&var-job=$job_insert&var-ds=$ds&var-instance=$instance&${__url_time_range}" + } + ], + "mappings": [], + "min": 0, + "thresholds": { + "mode": "absolute", + "steps": [ + { + "color": "green" + }, + { + "color": "red", + "value": 0.9 + } + ] + }, + "unit": "percentunit" + }, + "overrides": [] + }, + "gridPos": { + "h": 8, + "w": 12, + "x": 0, + "y": 16 + }, + "id": 185, + "links": [], + "options": { + "legend": { + "calcs": [ + "mean", + "lastNotNull", + "max" + ], + "displayMode": "table", + "placement": "bottom", + "showLegend": true, + "sortBy": "Last *", + "sortDesc": true + }, + "tooltip": { + "mode": "multi", + "sort": "none" + } + }, + "pluginVersion": "9.1.0", + "targets": [ + { + "datasource": { + "type": "prometheus", + "uid": "$ds" + }, + "editorMode": "code", + "exemplar": true, + "expr": "max(\n rate(process_cpu_seconds_total{job=~\"$job_insert\", instance=~\"$instance\"}[$__rate_interval])\n /\n process_cpu_cores_available{job=~\"$job_insert\", instance=~\"$instance\"}\n)", + "format": "time_series", + "interval": "", + "intervalFactor": 1, + "legendFormat": "max", + "range": true, + "refId": "A" + }, + { + "datasource": { + "type": "prometheus", + "uid": "$ds" + }, + "editorMode": "code", + "exemplar": true, + "expr": "min(\n rate(process_cpu_seconds_total{job=~\"$job_insert\", instance=~\"$instance\"}[$__rate_interval])\n /\n process_cpu_cores_available{job=~\"$job_insert\", instance=~\"$instance\"}\n)", + "format": "time_series", + "hide": false, + "interval": "", + "intervalFactor": 1, + "legendFormat": "min", + "range": true, + "refId": "B" + }, + { + "datasource": { + "type": "prometheus", + "uid": "$ds" + }, + "editorMode": "code", + "exemplar": true, + "expr": "avg(\n rate(process_cpu_seconds_total{job=~\"$job_insert\", instance=~\"$instance\"}[$__rate_interval])\n /\n process_cpu_cores_available{job=~\"$job_insert\", instance=~\"$instance\"}\n)", + "format": "time_series", + "hide": false, + "interval": "", + "intervalFactor": 1, + "legendFormat": "avg", + "range": true, + "refId": "C" + } + ], + "title": "CPU usage % ($instance)", + "type": "timeseries" + }, + { + "datasource": { + "type": "prometheus", + "uid": "$ds" + }, + "fieldConfig": { + "defaults": { + "color": { + "mode": "palette-classic" + }, + "custom": { + "axisCenteredZero": false, + "axisColorMode": "text", + "axisLabel": "", + "axisPlacement": "auto", + "barAlignment": 0, + "drawStyle": "line", + "fillOpacity": 0, + "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": "line" + } + }, + "links": [ + { + "targetBlank": true, + "title": "Drilldown", + "url": "/d/oS7Bi_0Wz?viewPanel=189&var-job=$job_insert&var-ds=$ds&var-instance=$instance&${__url_time_range}" + } + ], + "mappings": [], + "min": 0, + "thresholds": { + "mode": "absolute", + "steps": [ + { + "color": "green" + }, + { + "color": "red", + "value": 0.9 + } + ] + }, + "unit": "percentunit" + }, + "overrides": [] + }, + "gridPos": { + "h": 8, + "w": 12, + "x": 12, + "y": 16 + }, + "id": 187, + "links": [], + "options": { + "legend": { + "calcs": [ + "mean", + "lastNotNull", + "max" + ], + "displayMode": "table", + "placement": "bottom", + "showLegend": true, + "sortBy": "Last *", + "sortDesc": true + }, + "tooltip": { + "mode": "multi", + "sort": "none" + } + }, + "pluginVersion": "9.1.0", + "targets": [ + { + "datasource": { + "type": "prometheus", + "uid": "$ds" + }, + "editorMode": "code", + "exemplar": true, + "expr": "max(\n max_over_time(process_resident_memory_bytes{job=~\"$job_insert\", instance=~\"$instance\"}[$__rate_interval])\n /\n vm_available_memory_bytes{job=~\"$job_insert\", instance=~\"$instance\"}\n)", + "format": "time_series", + "interval": "", + "intervalFactor": 1, + "legendFormat": "max", + "range": true, + "refId": "A" + }, + { + "datasource": { + "type": "prometheus", + "uid": "$ds" + }, + "editorMode": "code", + "exemplar": true, + "expr": "min(\n max_over_time(process_resident_memory_bytes{job=~\"$job_insert\", instance=~\"$instance\"}[$__rate_interval])\n /\n vm_available_memory_bytes{job=~\"$job_insert\", instance=~\"$instance\"}\n)", + "format": "time_series", + "hide": false, + "interval": "", + "intervalFactor": 1, + "legendFormat": "min", + "range": true, + "refId": "B" + }, + { + "datasource": { + "type": "prometheus", + "uid": "$ds" + }, + "editorMode": "code", + "exemplar": true, + "expr": "avg(\n max_over_time(process_resident_memory_bytes{job=~\"$job_insert\", instance=~\"$instance\"}[$__rate_interval])\n /\n vm_available_memory_bytes{job=~\"$job_insert\", instance=~\"$instance\"}\n)", + "format": "time_series", + "hide": false, + "interval": "", + "intervalFactor": 1, + "legendFormat": "avg", + "range": true, + "refId": "C" + } + ], + "title": "Memory usage % ($instance)", + "type": "timeseries" }, { - "aliasColors": {}, - "bars": false, - "dashLength": 10, - "dashes": false, "datasource": { "type": "prometheus", "uid": "$ds" @@ -7415,660 +7435,874 @@ "description": "", "fieldConfig": { "defaults": { - "links": [] + "color": { + "mode": "palette-classic" + }, + "custom": { + "axisCenteredZero": false, + "axisColorMode": "text", + "axisLabel": "", + "axisPlacement": "auto", + "barAlignment": 0, + "drawStyle": "line", + "fillOpacity": 0, + "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": "normal" + }, + "thresholdsStyle": { + "mode": "off" + } + }, + "links": [], + "mappings": [], + "thresholds": { + "mode": "absolute", + "steps": [ + { + "color": "green" + }, + { + "color": "red", + "value": 80 + } + ] + }, + "unit": "bps" }, "overrides": [] }, - "fill": 0, - "fillGradient": 0, "gridPos": { "h": 8, "w": 12, "x": 0, - "y": 49 + "y": 24 }, - "hiddenSeries": false, "id": 90, - "legend": { - "alignAsTable": true, - "avg": true, - "current": true, - "max": true, - "min": false, - "show": true, - "sort": "current", - "sortDesc": true, - "total": false, - "values": true - }, - "lines": true, - "linewidth": 1, "links": [], - "nullPointMode": "null as zero", "options": { - "alertThreshold": true + "legend": { + "calcs": [ + "mean", + "lastNotNull", + "max" + ], + "displayMode": "table", + "placement": "bottom", + "showLegend": true, + "sortBy": "Last *", + "sortDesc": true + }, + "tooltip": { + "mode": "multi", + "sort": "desc" + } }, - "percentage": false, - "pluginVersion": "9.0.3", - "pointradius": 2, - "points": false, - "renderer": "flot", - "seriesOverrides": [], - "spaceLength": 10, - "stack": true, - "steppedLine": false, + "pluginVersion": "9.1.0", "targets": [ { "datasource": { "type": "prometheus", "uid": "$ds" }, + "editorMode": "code", "exemplar": true, - "expr": "sum(rate(vm_tcplistener_read_bytes_total{job=~\"$job_insert\", instance=~\"$instance\"}[$__rate_interval])) by (instance) * 8 > 0", + "expr": "sum(rate(vm_tcplistener_read_bytes_total{job=~\"$job_insert\", instance=~\"$instance\"}[$__rate_interval])) * 8 > 0", "format": "time_series", "interval": "", "intervalFactor": 1, - "legendFormat": "{{instance}}", + "legendFormat": "read", + "range": true, "refId": "A" } ], - "thresholds": [], - "timeRegions": [], "title": "Network usage ($instance)", - "tooltip": { - "shared": true, - "sort": 2, - "value_type": "individual" - }, - "type": "graph", - "xaxis": { - "mode": "time", - "show": true, - "values": [] - }, - "yaxes": [ - { - "format": "bps", - "logBase": 1, - "show": true - }, - { - "format": "short", - "logBase": 1, - "min": "0", - "show": true - } - ], - "yaxis": { - "align": false - } + "type": "timeseries" }, { - "aliasColors": {}, - "bars": false, - "dashLength": 10, - "dashes": false, "datasource": { + "type": "prometheus", "uid": "$ds" }, "description": "", "fieldConfig": { "defaults": { - "links": [] + "color": { + "mode": "palette-classic" + }, + "custom": { + "axisCenteredZero": false, + "axisColorMode": "text", + "axisLabel": "", + "axisPlacement": "auto", + "barAlignment": 0, + "drawStyle": "line", + "fillOpacity": 0, + "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" + } + }, + "decimals": 2, + "links": [], + "mappings": [], + "min": 0, + "thresholds": { + "mode": "absolute", + "steps": [ + { + "color": "green" + }, + { + "color": "red", + "value": 80 + } + ] + }, + "unit": "short" }, "overrides": [] }, - "fill": 0, - "fillGradient": 0, "gridPos": { "h": 8, "w": 12, "x": 12, - "y": 49 + "y": 24 }, - "hiddenSeries": false, "id": 88, - "legend": { - "alignAsTable": true, - "avg": true, - "current": true, - "max": true, - "min": false, - "show": true, - "sort": "current", - "sortDesc": true, - "total": false, - "values": true - }, - "lines": true, - "linewidth": 1, "links": [], - "nullPointMode": "null as zero", "options": { - "alertThreshold": true + "legend": { + "calcs": [ + "mean", + "lastNotNull", + "max" + ], + "displayMode": "table", + "placement": "bottom", + "showLegend": true, + "sortBy": "Last *", + "sortDesc": true + }, + "tooltip": { + "mode": "multi", + "sort": "desc" + } }, - "percentage": false, - "pluginVersion": "9.0.3", - "pointradius": 2, - "points": false, - "renderer": "flot", - "seriesOverrides": [], - "spaceLength": 10, - "stack": false, - "steppedLine": false, + "pluginVersion": "9.1.0", "targets": [ { "datasource": { "type": "prometheus", "uid": "$ds" }, - "expr": "histogram_quantile(0.99, sum(increase(vm_rows_per_insert_bucket{job=~\"$job\", instance=~\"$instance\"}[$__rate_interval])) by (instance, vmrange))", + "editorMode": "code", + "expr": "max(histogram_quantile(0.99, sum(increase(vm_rows_per_insert_bucket{job=~\"$job\", instance=~\"$instance\"}[$__rate_interval])) by (instance, vmrange)))", "format": "time_series", "interval": "", "intervalFactor": 1, - "legendFormat": "{{instance}}", + "legendFormat": "max", + "range": true, "refId": "A" } ], - "thresholds": [], - "timeRegions": [], "title": "Rows per insert ($instance)", - "tooltip": { - "shared": true, - "sort": 2, - "value_type": "individual" - }, - "type": "graph", - "xaxis": { - "mode": "time", - "show": true, - "values": [] - }, - "yaxes": [ - { - "$$hashKey": "object:2848", - "decimals": 2, - "format": "short", - "logBase": 1, - "min": "0", - "show": true - }, - { - "$$hashKey": "object:2849", - "format": "short", - "logBase": 1, - "min": "0", - "show": true - } - ], - "yaxis": { - "align": false - } + "type": "timeseries" }, { - "aliasColors": {}, - "bars": false, - "dashLength": 10, - "dashes": false, "datasource": { + "type": "prometheus", "uid": "$ds" }, "description": "Shows the saturation level of connection between vminsert and vmstorage components. If the threshold of 0.9sec is reached, then the connection is saturated by more than 90% and vminsert won't be able to keep up. This usually means that more vminsert or vmstorage nodes must be added to the cluster in order to increase the total number of vminsert -> vmstorage links.\n", "fieldConfig": { "defaults": { - "links": [] + "color": { + "mode": "palette-classic" + }, + "custom": { + "axisCenteredZero": false, + "axisColorMode": "text", + "axisLabel": "", + "axisPlacement": "auto", + "barAlignment": 0, + "drawStyle": "line", + "fillOpacity": 0, + "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": "line+area" + } + }, + "decimals": 0, + "links": [], + "mappings": [], + "min": 0, + "thresholds": { + "mode": "absolute", + "steps": [ + { + "color": "transparent" + }, + { + "color": "red", + "value": 0.9 + } + ] + }, + "unit": "s" }, "overrides": [] }, - "fill": 0, - "fillGradient": 0, "gridPos": { "h": 8, "w": 12, "x": 0, - "y": 57 + "y": 32 }, - "hiddenSeries": false, "id": 139, - "legend": { - "alignAsTable": true, - "avg": true, - "current": true, - "max": false, - "min": false, - "show": true, - "sort": "current", - "sortDesc": true, - "total": false, - "values": true - }, - "lines": true, - "linewidth": 1, "links": [], - "nullPointMode": "null as zero", "options": { - "alertThreshold": true + "legend": { + "calcs": [ + "mean", + "lastNotNull" + ], + "displayMode": "table", + "placement": "bottom", + "showLegend": true, + "sortBy": "Last *", + "sortDesc": true + }, + "tooltip": { + "mode": "multi", + "sort": "desc" + } }, - "percentage": false, - "pluginVersion": "9.0.3", - "pointradius": 2, - "points": false, - "renderer": "flot", - "seriesOverrides": [], - "spaceLength": 10, - "stack": false, - "steppedLine": false, + "pluginVersion": "9.1.0", "targets": [ { "datasource": { "type": "prometheus", "uid": "$ds" }, + "editorMode": "code", "exemplar": true, - "expr": "rate(vm_rpc_send_duration_seconds_total{job=~\"$job\", instance=~\"$instance\"}[$__rate_interval])", + "expr": "max(rate(vm_rpc_send_duration_seconds_total{job=~\"$job\", instance=~\"$instance\"}[$__rate_interval])) by(addr)", "format": "time_series", "interval": "", "intervalFactor": 1, - "legendFormat": "{{instance}} => {{addr}}", + "legendFormat": "__auto", + "range": true, "refId": "A" } ], - "thresholds": [ - { - "$$hashKey": "object:234", - "colorMode": "critical", - "fill": true, - "line": true, - "op": "gt", - "value": 0.9, - "yaxis": "left" - } - ], - "timeRegions": [], "title": "Storage connection saturation ($instance)", - "tooltip": { - "shared": true, - "sort": 2, - "value_type": "individual" - }, - "type": "graph", - "xaxis": { - "mode": "time", - "show": true, - "values": [] - }, - "yaxes": [ - { - "$$hashKey": "object:156", - "decimals": 0, - "format": "s", - "logBase": 1, - "min": "0", - "show": true - }, - { - "$$hashKey": "object:157", - "format": "short", - "logBase": 1, - "min": "0", - "show": true - } - ], - "yaxis": { - "align": false - } + "type": "timeseries" }, { - "aliasColors": {}, - "bars": false, - "dashLength": 10, - "dashes": false, "datasource": { + "type": "prometheus", "uid": "$ds" }, - "description": "Shows if vmstorage node is reachable for vminsert. If below 1 means vmstorage is not reachable at this moment of time. ", + "description": "Shows when vmstorage node is unreachable for vminsert.", "fieldConfig": { "defaults": { - "links": [] + "color": { + "mode": "palette-classic" + }, + "custom": { + "axisCenteredZero": false, + "axisColorMode": "text", + "axisLabel": "", + "axisPlacement": "auto", + "barAlignment": 0, + "drawStyle": "line", + "fillOpacity": 0, + "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" + } + }, + "decimals": 0, + "links": [], + "mappings": [], + "min": 0, + "thresholds": { + "mode": "absolute", + "steps": [ + { + "color": "green" + }, + { + "color": "red", + "value": 80 + } + ] + }, + "unit": "short" }, "overrides": [] }, - "fill": 0, - "fillGradient": 0, "gridPos": { "h": 8, "w": 12, "x": 12, - "y": 57 + "y": 32 }, - "hiddenSeries": false, "id": 114, - "legend": { - "alignAsTable": true, - "avg": true, - "current": true, - "max": false, - "min": false, - "show": true, - "sort": "current", - "sortDesc": true, - "total": false, - "values": true - }, - "lines": true, - "linewidth": 1, "links": [], - "nullPointMode": "null as zero", "options": { - "alertThreshold": true + "legend": { + "calcs": [ + "mean", + "lastNotNull" + ], + "displayMode": "table", + "placement": "bottom", + "showLegend": true + }, + "tooltip": { + "mode": "multi", + "sort": "desc" + } }, - "percentage": false, - "pluginVersion": "9.0.3", - "pointradius": 2, - "points": false, - "renderer": "flot", - "seriesOverrides": [], - "spaceLength": 10, - "stack": false, - "steppedLine": false, + "pluginVersion": "9.1.0", "targets": [ { "datasource": { "type": "prometheus", "uid": "$ds" }, - "expr": "vm_rpc_vmstorage_is_reachable{job=~\"$job\", instance=~\"$instance\"}", + "editorMode": "code", + "expr": "vm_rpc_vmstorage_is_reachable{job=~\"$job\", instance=~\"$instance\"} != 1", "format": "time_series", "interval": "", "intervalFactor": 1, "legendFormat": "{{instance}} => {{addr}}", + "range": true, "refId": "A" } ], - "thresholds": [], - "timeRegions": [], "title": "Storage reachability ($instance)", - "tooltip": { - "shared": true, - "sort": 2, - "value_type": "individual" - }, - "type": "graph", - "xaxis": { - "mode": "time", - "show": true, - "values": [] - }, - "yaxes": [ - { - "$$hashKey": "object:1534", - "decimals": 0, - "format": "short", - "logBase": 1, - "min": "0", - "show": true - }, - { - "$$hashKey": "object:1535", - "format": "short", - "logBase": 1, - "min": "0", - "show": true - } - ], - "yaxis": { - "align": false - } - }, - { - "aliasColors": {}, - "bars": false, - "dashLength": 10, - "dashes": false, - "datasource": { - "type": "prometheus", - "uid": "$ds" - }, - "fieldConfig": { - "defaults": { - "links": [] - }, - "overrides": [] - }, - "fill": 0, - "fillGradient": 0, - "gridPos": { - "h": 7, - "w": 12, - "x": 0, - "y": 65 - }, - "hiddenSeries": false, - "id": 164, - "legend": { - "alignAsTable": true, - "avg": true, - "current": true, - "max": true, - "min": false, - "show": true, - "sort": "current", - "sortDesc": true, - "total": false, - "values": true - }, - "lines": true, - "linewidth": 1, - "links": [], - "nullPointMode": "null", - "options": { - "alertThreshold": true - }, - "percentage": false, - "pluginVersion": "9.0.3", - "pointradius": 2, - "points": false, - "renderer": "flot", - "seriesOverrides": [ - { - "$$hashKey": "object:186", - "alias": "limit", - "color": "#C4162A" - } - ], - "spaceLength": 10, - "stack": false, - "steppedLine": false, - "targets": [ - { - "datasource": { - "type": "prometheus", - "uid": "$ds" - }, - "editorMode": "code", - "exemplar": true, - "expr": "sum(rate(process_cpu_seconds_total{job=~\"$job_insert\", instance=~\"$instance\"}[$__rate_interval])) by(instance)", - "format": "time_series", - "interval": "", - "intervalFactor": 1, - "legendFormat": "{{instance}}", - "range": true, - "refId": "A" - }, - { - "datasource": { - "type": "prometheus", - "uid": "$ds" - }, - "editorMode": "code", - "expr": "min(process_cpu_cores_available{job=~\"$job_insert\", instance=~\"$instance\"})", - "hide": false, - "legendFormat": "limit", - "range": true, - "refId": "B" - } - ], - "thresholds": [], - "timeRegions": [], - "title": "CPU ($instance)", - "tooltip": { - "shared": true, - "sort": 0, - "value_type": "individual" - }, - "type": "graph", - "xaxis": { - "mode": "time", - "show": true, - "values": [] - }, - "yaxes": [ - { - "$$hashKey": "object:887", - "format": "short", - "logBase": 1, - "min": "0", - "show": true - }, - { - "$$hashKey": "object:888", - "format": "short", - "logBase": 1, - "show": true - } - ], - "yaxis": { - "align": false - } - }, - { - "aliasColors": {}, - "bars": false, - "dashLength": 10, - "dashes": false, - "datasource": { - "type": "prometheus", - "uid": "$ds" - }, - "fieldConfig": { - "defaults": { - "links": [] - }, - "overrides": [] - }, - "fill": 0, - "fillGradient": 0, - "gridPos": { - "h": 7, - "w": 12, - "x": 12, - "y": 65 - }, - "hiddenSeries": false, - "id": 169, - "legend": { - "alignAsTable": true, - "avg": true, - "current": true, - "max": true, - "min": false, - "show": true, - "sort": "current", - "sortDesc": true, - "total": false, - "values": true - }, - "lines": true, - "linewidth": 1, - "links": [], - "nullPointMode": "null", - "options": { - "alertThreshold": true - }, - "percentage": false, - "pluginVersion": "9.0.3", - "pointradius": 2, - "points": false, - "renderer": "flot", - "seriesOverrides": [ - { - "$$hashKey": "object:186", - "alias": "limit", - "color": "#C4162A" - } - ], - "spaceLength": 10, - "stack": false, - "steppedLine": false, - "targets": [ - { - "datasource": { - "type": "prometheus", - "uid": "$ds" - }, - "editorMode": "code", - "exemplar": true, - "expr": "sum(process_resident_memory_anon_bytes{job=~\"$job_insert\", instance=~\"$instance\"}) by(instance)", - "format": "time_series", - "interval": "", - "intervalFactor": 1, - "legendFormat": "{{instance}}", - "range": true, - "refId": "A" - }, - { - "datasource": { - "type": "prometheus", - "uid": "$ds" - }, - "editorMode": "code", - "expr": "min(vm_available_memory_bytes{job=~\"$job_insert\", instance=~\"$instance\"})", - "hide": false, - "legendFormat": "limit", - "range": true, - "refId": "B" - } - ], - "thresholds": [], - "timeRegions": [], - "title": "Memory ($instance)", - "tooltip": { - "shared": true, - "sort": 0, - "value_type": "individual" - }, - "type": "graph", - "xaxis": { - "mode": "time", - "show": true, - "values": [] - }, - "yaxes": [ - { - "$$hashKey": "object:164", - "format": "bytes", - "logBase": 1, - "min": "0", - "show": true - }, - { - "$$hashKey": "object:165", - "format": "short", - "logBase": 1, - "show": true - } - ], - "yaxis": { - "align": false - } + "type": "timeseries" } ], "title": "vminsert ($instance)", "type": "row" + }, + { + "collapsed": true, + "gridPos": { + "h": 1, + "w": 24, + "x": 0, + "y": 43 + }, + "id": 194, + "panels": [ + { + "datasource": { + "type": "prometheus", + "uid": "${ds}" + }, + "gridPos": { + "h": 2, + "w": 24, + "x": 0, + "y": 9 + }, + "id": 198, + "options": { + "content": "Drilldown row is used by other panels on the dashboard to show more detailed metrics per-instance.", + "mode": "markdown" + }, + "pluginVersion": "9.1.0", + "transparent": true, + "type": "text" + }, + { + "datasource": { + "type": "prometheus", + "uid": "$ds" + }, + "description": "Shows the used memory (resident).\nThe application's performance will significantly degrade when memory usage is close to 100%.", + "fieldConfig": { + "defaults": { + "color": { + "mode": "palette-classic" + }, + "custom": { + "axisCenteredZero": false, + "axisColorMode": "text", + "axisLabel": "", + "axisPlacement": "auto", + "barAlignment": 0, + "drawStyle": "line", + "fillOpacity": 0, + "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" + } + }, + "links": [], + "mappings": [], + "min": 0, + "thresholds": { + "mode": "absolute", + "steps": [ + { + "color": "green" + } + ] + }, + "unit": "decbytes" + }, + "overrides": [] + }, + "gridPos": { + "h": 8, + "w": 12, + "x": 0, + "y": 11 + }, + "id": 189, + "links": [], + "options": { + "legend": { + "calcs": [ + "mean", + "lastNotNull", + "max" + ], + "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", + "exemplar": true, + "expr": "max_over_time(process_resident_memory_bytes{job=~\"$job\", instance=~\"$instance\"}[$__rate_interval])", + "interval": "", + "legendFormat": "{{instance}} ({{job}})", + "range": true, + "refId": "A" + } + ], + "title": "RSS memory usage ($instance)", + "type": "timeseries" + }, + { + "datasource": { + "type": "prometheus", + "uid": "$ds" + }, + "description": "RSS share for memory allocated by the process itself. This share cannot be freed by the OS, so it must be taken into account by OOM killer.", + "fieldConfig": { + "defaults": { + "color": { + "mode": "palette-classic" + }, + "custom": { + "axisCenteredZero": false, + "axisColorMode": "text", + "axisLabel": "", + "axisPlacement": "auto", + "barAlignment": 0, + "drawStyle": "line", + "fillOpacity": 0, + "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" + } + }, + "links": [], + "mappings": [], + "min": 0, + "thresholds": { + "mode": "absolute", + "steps": [ + { + "color": "green" + } + ] + }, + "unit": "decbytes" + }, + "overrides": [] + }, + "gridPos": { + "h": 8, + "w": 12, + "x": 12, + "y": 11 + }, + "id": 190, + "links": [], + "options": { + "legend": { + "calcs": [ + "mean", + "lastNotNull", + "max" + ], + "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", + "exemplar": true, + "expr": "max_over_time(process_resident_memory_anon_bytes{job=~\"$job\", instance=~\"$instance\"}[$__rate_interval])", + "interval": "", + "legendFormat": "{{instance}} ({{job}})", + "range": true, + "refId": "A" + } + ], + "title": "RSS anonymous memory usage ($instance)", + "type": "timeseries" + }, + { + "datasource": { + "type": "prometheus", + "uid": "$ds" + }, + "description": "", + "fieldConfig": { + "defaults": { + "color": { + "mode": "palette-classic" + }, + "custom": { + "axisCenteredZero": false, + "axisColorMode": "text", + "axisLabel": "", + "axisPlacement": "auto", + "barAlignment": 0, + "drawStyle": "line", + "fillOpacity": 0, + "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" + } + }, + "links": [], + "mappings": [], + "min": 0, + "thresholds": { + "mode": "absolute", + "steps": [ + { + "color": "green" + } + ] + }, + "unit": "short" + }, + "overrides": [] + }, + "gridPos": { + "h": 7, + "w": 12, + "x": 0, + "y": 19 + }, + "id": 192, + "links": [], + "options": { + "legend": { + "calcs": [ + "mean", + "lastNotNull", + "max" + ], + "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", + "exemplar": false, + "expr": "sum(rate(process_cpu_seconds_total{job=~\"$job\", instance=~\"$instance\"}[$__rate_interval])) by(job, instance)", + "format": "time_series", + "interval": "", + "intervalFactor": 1, + "legendFormat": "{{instance}} ({{job}})", + "range": true, + "refId": "A" + } + ], + "title": "CPU usage ($instance)", + "type": "timeseries" + }, + { + "datasource": { + "type": "prometheus", + "uid": "$ds" + }, + "description": "Shows the approx time needed to reach 100% of disk capacity based on the following params:\n* free disk space;\n* row ingestion rate;\n* dedup rate;\n* compression.\n\nUse this panel for capacity planning in order to estimate the time remaining for running out of the disk space.", + "fieldConfig": { + "defaults": { + "color": { + "mode": "palette-classic" + }, + "custom": { + "axisCenteredZero": false, + "axisColorMode": "text", + "axisLabel": "", + "axisPlacement": "auto", + "barAlignment": 0, + "drawStyle": "line", + "fillOpacity": 0, + "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" + } + }, + "links": [], + "mappings": [], + "min": 0, + "thresholds": { + "mode": "absolute", + "steps": [ + { + "color": "green" + }, + { + "color": "red", + "value": 80 + } + ] + }, + "unit": "s" + }, + "overrides": [] + }, + "gridPos": { + "h": 7, + "w": 12, + "x": 12, + "y": 19 + }, + "id": 196, + "links": [], + "options": { + "legend": { + "calcs": [ + "mean", + "lastNotNull", + "min" + ], + "displayMode": "table", + "placement": "bottom", + "showLegend": true, + "sortBy": "Last *", + "sortDesc": true + }, + "tooltip": { + "mode": "multi", + "sort": "none" + } + }, + "pluginVersion": "9.1.0", + "targets": [ + { + "datasource": { + "type": "prometheus", + "uid": "$ds" + }, + "editorMode": "code", + "expr": "vm_free_disk_space_bytes{job=~\"$job_storage\", instance=~\"$instance\"} \n/ \nignoring(path) (\n (\n rate(vm_rows_added_to_storage_total{job=~\"$job_storage\", instance=~\"$instance\"}[1d])\n - \n ignoring(type) rate(vm_deduplicated_samples_total{job=~\"$job_storage\", instance=~\"$instance\", type=\"merge\"}[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, + "legendFormat": "{{instance}}", + "range": true, + "refId": "A" + } + ], + "title": "Storage full ETA ($instance)", + "type": "timeseries" + } + ], + "title": "Drilldown", + "type": "row" } ], "refresh": false, - "schemaVersion": 36, + "schemaVersion": 37, "style": "dark", "tags": [], "templating": { diff --git a/deployment/docker/alerts-cluster.yml b/deployment/docker/alerts-cluster.yml index c4918c2a1..1a99a08fb 100644 --- a/deployment/docker/alerts-cluster.yml +++ b/deployment/docker/alerts-cluster.yml @@ -54,6 +54,7 @@ groups: for: 15m labels: severity: warning + show_at: dashboard annotations: dashboard: "http://localhost:3000/d/oS7Bi_0Wz?viewPanel=52&var-instance={{ $labels.instance }}" summary: "Too many errors served for {{ $labels.job }} path {{ $labels.path }} (instance {{ $labels.instance }})" @@ -72,6 +73,7 @@ groups: for: 15m labels: severity: warning + show_at: dashboard annotations: dashboard: "http://localhost:3000/d/oS7Bi_0Wz?viewPanel=44&var-instance={{ $labels.instance }}" summary: "Too many RPC errors for {{ $labels.job }} (instance {{ $labels.instance }})" @@ -83,6 +85,7 @@ groups: for: 15m labels: severity: warning + show_at: dashboard annotations: dashboard: "http://localhost:3000/d/oS7Bi_0Wz?viewPanel=133&var-instance={{ $labels.instance }}" summary: "vmstorage on instance {{ $labels.instance }} is constantly hitting concurrent flushes limit" @@ -179,6 +182,7 @@ groups: for: 15m labels: severity: warning + show_at: dashboard annotations: dashboard: "http://localhost:3000/d/oS7Bi_0Wz?viewPanel=139&var-instance={{ $labels.instance }}" summary: "Connection between vminsert on {{ $labels.instance }} and vmstorage on {{ $labels.addr }} is saturated" @@ -186,3 +190,4 @@ groups: is saturated by more than 90% and vminsert won't be able to keep up.\n This usually means that more vminsert or vmstorage nodes must be added to the cluster in order to increase the total number of vminsert -> vmstorage links." + From 045fec631be0407e4821c4f739892a04c2fb4a97 Mon Sep 17 00:00:00 2001 From: Aliaksandr Valialkin Date: Thu, 24 Nov 2022 17:19:45 -0800 Subject: [PATCH 33/46] docs/vmagent.md: typo fix --- app/vmagent/README.md | 2 +- docs/vmagent.md | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/app/vmagent/README.md b/app/vmagent/README.md index 7514e1167..456bd267b 100644 --- a/app/vmagent/README.md +++ b/app/vmagent/README.md @@ -545,7 +545,7 @@ The following articles contain useful information about Prometheus relabeling: * `keep_metrics`: keeps all the metrics with names matching the given `regex`, while dropping all the other metrics. For example, the following relabeling config keeps metrics - with `fo` and `bar` names, while dropping all the other metrics: + with `foo` and `bar` names, while dropping all the other metrics: ```yaml - action: keep_metrics diff --git a/docs/vmagent.md b/docs/vmagent.md index 60e3faf6d..70b35ba74 100644 --- a/docs/vmagent.md +++ b/docs/vmagent.md @@ -549,7 +549,7 @@ The following articles contain useful information about Prometheus relabeling: * `keep_metrics`: keeps all the metrics with names matching the given `regex`, while dropping all the other metrics. For example, the following relabeling config keeps metrics - with `fo` and `bar` names, while dropping all the other metrics: + with `foo` and `bar` names, while dropping all the other metrics: ```yaml - action: keep_metrics From 399ed9a3b98024e773fdc5387d3d395f8bb4d644 Mon Sep 17 00:00:00 2001 From: Aliaksandr Valialkin Date: Thu, 24 Nov 2022 17:27:30 -0800 Subject: [PATCH 34/46] docs/MetricsQL.md: document that `histogram_share()` accepts optional `boundsLabel` arg --- docs/MetricsQL.md | 2 ++ 1 file changed, 2 insertions(+) diff --git a/docs/MetricsQL.md b/docs/MetricsQL.md index e16949ec1..67bd9aa61 100644 --- a/docs/MetricsQL.md +++ b/docs/MetricsQL.md @@ -1052,6 +1052,8 @@ See also [histogram_quantile](#histogram_quantile). `histogram_share(le, buckets)` is a [transform function](#transform-functions), which calculates the share (in the range `[0...1]`) for `buckets` that fall below `le`. This function is useful for calculating SLI and SLO. This is inverse to [histogram_quantile](#histogram_quantile). +The function accepts optional third arg - `boundsLabel`. In this case it returns `lower` and `upper` bounds for the estimated share with the given `boundsLabel` label. + #### histogram_stddev `histogram_stddev(buckets)` is a [transform function](#transform-functions), which calculates standard deviation for the given `buckets`. From eb772aa50e33f532947e89b59a795bea1f6217a8 Mon Sep 17 00:00:00 2001 From: Yury Molodov Date: Fri, 25 Nov 2022 02:33:07 +0100 Subject: [PATCH 35/46] vmui: improve table view (#3377) * vmui: add compact table view (#3365) * feat: add compact table view * fix: add overflow table * fix: change table styles * vmui: compact table view * Update docs/CHANGELOG.md Co-authored-by: Michal Kralik Co-authored-by: Aliaksandr Valialkin --- .../components/Views/TableView/TableView.tsx | 198 +++++++++++------- .../src/components/Views/TableView/style.scss | 11 + .../Table/TableSettings/TableSettings.tsx | 77 ++++--- .../Table/TableSettings/style.scss | 26 ++- .../vmui/src/pages/CustomPanel/style.scss | 1 + .../vmui/src/state/customPanel/reducer.ts | 13 +- app/vmui/packages/vmui/src/utils/metric.ts | 6 +- app/vmui/packages/vmui/src/utils/storage.ts | 1 + docs/CHANGELOG.md | 1 + 9 files changed, 208 insertions(+), 126 deletions(-) create mode 100644 app/vmui/packages/vmui/src/components/Views/TableView/style.scss diff --git a/app/vmui/packages/vmui/src/components/Views/TableView/TableView.tsx b/app/vmui/packages/vmui/src/components/Views/TableView/TableView.tsx index b11c2e9c6..9c78c3d1e 100644 --- a/app/vmui/packages/vmui/src/components/Views/TableView/TableView.tsx +++ b/app/vmui/packages/vmui/src/components/Views/TableView/TableView.tsx @@ -1,4 +1,4 @@ -import React, { FC, useMemo, useState } from "preact/compat"; +import React, { FC, useEffect, useMemo, useRef, useState } from "preact/compat"; import { InstantMetricResult } from "../../../api/types"; import { InstantDataSeries } from "../../../types"; import { useSortedCategories } from "../../../hooks/useSortedCategories"; @@ -8,6 +8,10 @@ import { ArrowDropDownIcon, CopyIcon } from "../../Main/Icons"; import Tooltip from "../../Main/Tooltip/Tooltip"; import Button from "../../Main/Button/Button"; import { useSnack } from "../../../contexts/Snackbar"; +import { getNameForMetric } from "../../../utils/metric"; +import { useCustomPanelState } from "../../../state/customPanel/CustomPanelStateContext"; +import "./style.scss"; +import useResize from "../../../hooks/useResize"; export interface GraphViewProps { data: InstantMetricResult[]; @@ -17,12 +21,21 @@ export interface GraphViewProps { const TableView: FC = ({ data, displayColumns }) => { const { showInfoMessage } = useSnack(); - const sortedColumns = useSortedCategories(data, displayColumns); + const { tableCompact } = useCustomPanelState(); + const windowSize = useResize(document.body); + const tableRef = useRef(null); + const [tableTop, setTableTop] = useState(0); + const [headTop, setHeadTop] = useState(0); const [orderBy, setOrderBy] = useState(""); const [orderDir, setOrderDir] = useState<"asc" | "desc">("asc"); - const getCopyValue = (metric: {[p: string]: string}) => { + const sortedColumns = (tableCompact + ? useSortedCategories([{ group: 0, metric: { "Data": "Data" } }], ["Data"]) + : useSortedCategories(data, displayColumns) + ); + + const getCopyValue = (metric: { [p: string]: string }) => { const { __name__, ...fields } = metric; if (!__name__ && !Object.keys(fields).length) return ""; return `${__name__} ${JSON.stringify(fields)}`; @@ -30,20 +43,23 @@ const TableView: FC = ({ data, displayColumns }) => { const rows: InstantDataSeries[] = useMemo(() => { const rows = data?.map(d => ({ - metadata: sortedColumns.map(c => d.metric[c.key] || "-"), + metadata: sortedColumns.map(c => (tableCompact + ? getNameForMetric(d, undefined, "=", true) + : (d.metric[c.key] || "-") + )), value: d.value ? d.value[1] : "-", copyValue: getCopyValue(d.metric) })); const orderByValue = orderBy === "Value"; const rowIndex = sortedColumns.findIndex(c => c.key === orderBy); if (!orderByValue && rowIndex === -1) return rows; - return rows.sort((a,b) => { + return rows.sort((a, b) => { const n1 = orderByValue ? Number(a.value) : a.metadata[rowIndex]; const n2 = orderByValue ? Number(b.value) : b.metadata[rowIndex]; const asc = orderDir === "asc" ? n1 < n2 : n1 > n2; return asc ? -1 : 1; }); - }, [sortedColumns, data, orderBy, orderDir]); + }, [sortedColumns, data, orderBy, orderDir, tableCompact]); const hasCopyValue = useMemo(() => rows.some(r => r.copyValue), [rows]); @@ -65,93 +81,121 @@ const TableView: FC = ({ data, displayColumns }) => { copyHandler(copyValue); }; + const handleScroll = () => { + if (!tableRef.current) return; + const { top } = tableRef.current.getBoundingClientRect(); + setHeadTop(top < 0 ? window.scrollY - tableTop : 0); + }; + + useEffect(() => { + window.addEventListener("scroll", handleScroll); + + return () => { + window.removeEventListener("scroll", handleScroll); + }; + }, [tableRef, tableTop, windowSize]); + + useEffect(() => { + if (!tableRef.current) return; + const { top } = tableRef.current.getBoundingClientRect(); + setTableTop(top + window.scrollY); + }, [tableRef, windowSize]); + if (!rows.length) return No data to show; return ( - - - - {sortedColumns.map((col, index) => ( +
    +
    + + + {sortedColumns.map((col, index) => ( + + ))} - ))} - - {hasCopyValue && - - - {rows.map((row, index) => ( - - {row.metadata.map((rowMeta, index2) => ( - - ))} - - {hasCopyValue && ( - - )} + {hasCopyValue && - ))} - -
    +
    + {col.key} +
    + +
    +
    +
    - {col.key}
    + Value
    -
    -
    - -
    - Value -
    -
    } -
    - {rowMeta} - - {row.value} - - {row.copyValue && ( -
    - -
    - )} -
    }
    + + + {rows.map((row, index) => ( + + {row.metadata.map((rowMeta, index2) => ( + + {rowMeta} + + ))} + + {row.value} + + {hasCopyValue && ( + + {row.copyValue && ( +
    + +
    + )} + + )} + + ))} + + +
    ); }; diff --git a/app/vmui/packages/vmui/src/components/Views/TableView/style.scss b/app/vmui/packages/vmui/src/components/Views/TableView/style.scss new file mode 100644 index 000000000..541c7ab2f --- /dev/null +++ b/app/vmui/packages/vmui/src/components/Views/TableView/style.scss @@ -0,0 +1,11 @@ +@use "src/styles/variables" as *; + +.vm-table-view { + margin-top: -$padding-medium; + max-width: 100%; + overflow: auto; + + table { + margin-top: 0; + } +} diff --git a/app/vmui/packages/vmui/src/pages/CardinalityPanel/Table/TableSettings/TableSettings.tsx b/app/vmui/packages/vmui/src/pages/CardinalityPanel/Table/TableSettings/TableSettings.tsx index 73aa0ced2..e60728ee7 100644 --- a/app/vmui/packages/vmui/src/pages/CardinalityPanel/Table/TableSettings/TableSettings.tsx +++ b/app/vmui/packages/vmui/src/pages/CardinalityPanel/Table/TableSettings/TableSettings.tsx @@ -2,13 +2,16 @@ import React, { FC, useEffect, useState, useRef, useMemo } from "preact/compat"; import { useSortedCategories } from "../../../../hooks/useSortedCategories"; import { InstantMetricResult } from "../../../../api/types"; import Button from "../../../../components/Main/Button/Button"; -import { CloseIcon, SettingsIcon } from "../../../../components/Main/Icons"; +import { CloseIcon, RestartIcon, SettingsIcon } from "../../../../components/Main/Icons"; import Popper from "../../../../components/Main/Popper/Popper"; import "./style.scss"; import Checkbox from "../../../../components/Main/Checkbox/Checkbox"; import Tooltip from "../../../../components/Main/Tooltip/Tooltip"; +import { useCustomPanelDispatch, useCustomPanelState } from "../../../../state/customPanel/CustomPanelStateContext"; +import Switch from "../../../../components/Main/Switch/Switch"; +import { arrayEquals } from "../../../../utils/array"; -const title = "Display columns"; +const title = "Table settings"; interface TableSettingsProps { data: InstantMetricResult[]; @@ -16,32 +19,33 @@ interface TableSettingsProps { onChange: (arr: string[]) => void } -const TableSettings: FC = ({ data, defaultColumns, onChange }) => { - const buttonRef = useRef(null); - const [openSettings, setOpenSettings] = useState(false); +const TableSettings: FC = ({ data, defaultColumns = [], onChange }) => { + + const { tableCompact } = useCustomPanelState(); + const customPanelDispatch = useCustomPanelDispatch(); const columns = useSortedCategories(data); + + const buttonRef = useRef(null); + + const [openSettings, setOpenSettings] = useState(false); + const disabledButton = useMemo(() => !columns.length, [columns]); - const [checkedColumns, setCheckedColumns] = useState(columns.map(col => col.key)); const handleChange = (key: string) => { - setCheckedColumns(prev => checkedColumns.includes(key) ? prev.filter(col => col !== key) : [...prev, key]); + onChange(defaultColumns.includes(key) ? defaultColumns.filter(col => col !== key) : [...defaultColumns, key]); }; const handleClose = () => { setOpenSettings(false); - setCheckedColumns(defaultColumns || columns.map(col => col.key)); }; - const handleReset = () => { - setOpenSettings(false); - const value = columns.map(col => col.key); - setCheckedColumns(value); - onChange(value); + const toggleTableCompact = () => { + customPanelDispatch({ type: "TOGGLE_TABLE_COMPACT" }); }; - const handleApply = () => { + const handleResetColumns = () => { setOpenSettings(false); - onChange(checkedColumns); + onChange(columns.map(col => col.key)); }; const createHandlerChange = (key: string) => () => { @@ -53,7 +57,9 @@ const TableSettings: FC = ({ data, defaultColumns, onChange }; useEffect(() => { - setCheckedColumns(columns.map(col => col.key)); + const values = columns.map(col => col.key); + if (arrayEquals(values, defaultColumns)) return; + onChange(values); }, [columns]); return ( @@ -86,36 +92,39 @@ const TableSettings: FC = ({ data, defaultColumns, onChange />
    + +
    +
    +
    +

    Display columns

    + +
    {columns.map(col => (
    ))}
    -
    - - -
    diff --git a/app/vmui/packages/vmui/src/pages/CardinalityPanel/Table/TableSettings/style.scss b/app/vmui/packages/vmui/src/pages/CardinalityPanel/Table/TableSettings/style.scss index fcc9bb0b3..d1b45cb50 100644 --- a/app/vmui/packages/vmui/src/pages/CardinalityPanel/Table/TableSettings/style.scss +++ b/app/vmui/packages/vmui/src/pages/CardinalityPanel/Table/TableSettings/style.scss @@ -2,27 +2,31 @@ .vm-table-settings-popper { display: grid; + min-width: 250px; &-list { display: grid; gap: $padding-small; - padding: $padding-global $padding-global $padding-medium; + padding: $padding-global; max-height: 350px; overflow: auto; + border-bottom: $border-divider; + + &-header { + display: grid; + align-items: center; + justify-content: space-between; + grid-template-columns: 1fr auto; + min-height: 25px; + + &__title { + font-weight: bold; + } + } &__item { font-size: $font-size; text-transform: capitalize; } } - - &__footer { - min-width: 200px; - display: inline-grid; - grid-template-columns: 1fr 1fr; - gap: $padding-small; - align-items: center; - justify-content: center; - padding: 0 $padding-global $padding-global; - } } diff --git a/app/vmui/packages/vmui/src/pages/CustomPanel/style.scss b/app/vmui/packages/vmui/src/pages/CustomPanel/style.scss index a46bbde39..4f3e7792a 100644 --- a/app/vmui/packages/vmui/src/pages/CustomPanel/style.scss +++ b/app/vmui/packages/vmui/src/pages/CustomPanel/style.scss @@ -2,6 +2,7 @@ .vm-custom-panel { display: grid; + grid-template-columns: 100%; align-items: flex-start; gap: $padding-medium; height: 100%; diff --git a/app/vmui/packages/vmui/src/state/customPanel/reducer.ts b/app/vmui/packages/vmui/src/state/customPanel/reducer.ts index 79fe17863..1b7a885ba 100644 --- a/app/vmui/packages/vmui/src/state/customPanel/reducer.ts +++ b/app/vmui/packages/vmui/src/state/customPanel/reducer.ts @@ -1,6 +1,6 @@ import { DisplayType, displayTypeTabs } from "../../pages/CustomPanel/DisplayTypeSwitch"; -import { getFromStorage, saveToStorage } from "../../utils/storage"; import { getQueryStringValue } from "../../utils/query-string"; +import { getFromStorage, saveToStorage } from "../../utils/storage"; import { SeriesLimits } from "../../types"; import { DEFAULT_MAX_SERIES } from "../../constants/graph"; @@ -9,6 +9,7 @@ export interface CustomPanelState { nocache: boolean; isTracingEnabled: boolean; seriesLimits: SeriesLimits + tableCompact: boolean; } export type CustomPanelAction = @@ -16,6 +17,7 @@ export type CustomPanelAction = | { type: "SET_SERIES_LIMITS", payload: SeriesLimits } | { type: "TOGGLE_NO_CACHE"} | { type: "TOGGLE_QUERY_TRACING" } + | { type: "TOGGLE_TABLE_COMPACT" } const queryTab = getQueryStringValue("g0.tab", 0) as string; const displayType = displayTypeTabs.find(t => t.prometheusCode === +queryTab || t.value === queryTab); @@ -25,7 +27,8 @@ export const initialCustomPanelState: CustomPanelState = { displayType: (displayType?.value || "chart") as DisplayType, nocache: false, isTracingEnabled: false, - seriesLimits: limitsStorage ? JSON.parse(getFromStorage("SERIES_LIMITS") as string) : DEFAULT_MAX_SERIES + seriesLimits: limitsStorage ? JSON.parse(getFromStorage("SERIES_LIMITS") as string) : DEFAULT_MAX_SERIES, + tableCompact: getFromStorage("TABLE_COMPACT") as boolean || false, }; export function reducer(state: CustomPanelState, action: CustomPanelAction): CustomPanelState { @@ -52,6 +55,12 @@ export function reducer(state: CustomPanelState, action: CustomPanelAction): Cus ...state, nocache: !state.nocache }; + case "TOGGLE_TABLE_COMPACT": + saveToStorage("TABLE_COMPACT", !state.tableCompact); + return { + ...state, + tableCompact: !state.tableCompact + }; default: throw new Error(); } diff --git a/app/vmui/packages/vmui/src/utils/metric.ts b/app/vmui/packages/vmui/src/utils/metric.ts index f4b145377..bfc4615bb 100644 --- a/app/vmui/packages/vmui/src/utils/metric.ts +++ b/app/vmui/packages/vmui/src/utils/metric.ts @@ -1,6 +1,6 @@ import { MetricBase } from "../api/types"; -export const getNameForMetric = (result: MetricBase, alias?: string): string => { +export const getNameForMetric = (result: MetricBase, alias?: string, connector = ": ", quoteValue = false): string => { const { __name__, ...freeFormFields } = result.metric; const name = alias || __name__ || ""; @@ -8,5 +8,7 @@ export const getNameForMetric = (result: MetricBase, alias?: string): string => return name || `Result ${result.group}`; // a bit better than just {} for case of aggregation functions } - return `${name} {${Object.entries(freeFormFields).map(e => `${e[0]}: ${e[1]}`).join(", ")}}`; + return `${name} {${Object.entries(freeFormFields).map(e => + `${e[0]}${connector}${(quoteValue ? `"${e[1]}"` : e[1])}` + ).join(", ")}}`; }; diff --git a/app/vmui/packages/vmui/src/utils/storage.ts b/app/vmui/packages/vmui/src/utils/storage.ts index 82455ea21..f08833577 100644 --- a/app/vmui/packages/vmui/src/utils/storage.ts +++ b/app/vmui/packages/vmui/src/utils/storage.ts @@ -5,6 +5,7 @@ export type StorageKeys = "BASIC_AUTH_DATA" | "NO_CACHE" | "QUERY_TRACING" | "SERIES_LIMITS" + | "TABLE_COMPACT" export const saveToStorage = (key: StorageKeys, value: string | boolean | Record): void => { if (value) { diff --git a/docs/CHANGELOG.md b/docs/CHANGELOG.md index 361bfaad1..388cad942 100644 --- a/docs/CHANGELOG.md +++ b/docs/CHANGELOG.md @@ -25,6 +25,7 @@ The following tip changes can be tested by building VictoriaMetrics components f * FEATURE: [vmui](https://docs.victoriametrics.com/#vmui): reduce JS bundle size from 200Kb to 100Kb. See [this pull request](https://github.com/VictoriaMetrics/VictoriaMetrics/pull/3298). * FEATURE: [vmui](https://docs.victoriametrics.com/#vmui): add the ability to hide results of a particular query by clicking the `eye` icon. See [this pull request](https://github.com/VictoriaMetrics/VictoriaMetrics/pull/3359). * FEATURE: [vmui](https://docs.victoriametrics.com/#vmui): add copy button to row on Table view. The button copies row in MetricQL format. See [this issue](https://github.com/VictoriaMetrics/VictoriaMetrics/issues/2815). +* 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.html): add default alert list for vmalert's metrics. See [alerts-vmalert.yml](https://github.com/VictoriaMetrics/VictoriaMetrics/blob/master/deployment/docker/alerts-vmalert.yml). From da13d36af92e7d738a8cb3edbc6d566fa3d4b49c Mon Sep 17 00:00:00 2001 From: Aliaksandr Valialkin Date: Thu, 24 Nov 2022 17:37:10 -0800 Subject: [PATCH 36/46] app/vmselect/vmui: `make vmui-update` after eb772aa50e33f532947e89b59a795bea1f6217a8 --- app/vmselect/vmui/asset-manifest.json | 8 ++++---- app/vmselect/vmui/index.html | 2 +- .../static/css/{main.423b74d3.css => main.f29c3c6a.css} | 2 +- app/vmselect/vmui/static/js/main.a09b3097.js | 2 -- app/vmselect/vmui/static/js/main.b76a42a5.js | 2 ++ ...9b3097.js.LICENSE.txt => main.b76a42a5.js.LICENSE.txt} | 0 docs/CHANGELOG.md | 1 + 7 files changed, 9 insertions(+), 8 deletions(-) rename app/vmselect/vmui/static/css/{main.423b74d3.css => main.f29c3c6a.css} (67%) delete mode 100644 app/vmselect/vmui/static/js/main.a09b3097.js create mode 100644 app/vmselect/vmui/static/js/main.b76a42a5.js rename app/vmselect/vmui/static/js/{main.a09b3097.js.LICENSE.txt => main.b76a42a5.js.LICENSE.txt} (100%) diff --git a/app/vmselect/vmui/asset-manifest.json b/app/vmselect/vmui/asset-manifest.json index d1f71e19e..d19b47b15 100644 --- a/app/vmselect/vmui/asset-manifest.json +++ b/app/vmselect/vmui/asset-manifest.json @@ -1,12 +1,12 @@ { "files": { - "main.css": "./static/css/main.423b74d3.css", - "main.js": "./static/js/main.a09b3097.js", + "main.css": "./static/css/main.f29c3c6a.css", + "main.js": "./static/js/main.b76a42a5.js", "static/js/27.c1ccfd29.chunk.js": "./static/js/27.c1ccfd29.chunk.js", "index.html": "./index.html" }, "entrypoints": [ - "static/css/main.423b74d3.css", - "static/js/main.a09b3097.js" + "static/css/main.f29c3c6a.css", + "static/js/main.b76a42a5.js" ] } \ No newline at end of file diff --git a/app/vmselect/vmui/index.html b/app/vmselect/vmui/index.html index 6f4a07027..5e1a1dc3f 100644 --- a/app/vmselect/vmui/index.html +++ b/app/vmselect/vmui/index.html @@ -1 +1 @@ -VM UI
    \ No newline at end of file +VM UI
    \ No newline at end of file diff --git a/app/vmselect/vmui/static/css/main.423b74d3.css b/app/vmselect/vmui/static/css/main.f29c3c6a.css similarity index 67% rename from app/vmselect/vmui/static/css/main.423b74d3.css rename to app/vmselect/vmui/static/css/main.f29c3c6a.css index 737c9b91b..6891b6b1d 100644 --- a/app/vmselect/vmui/static/css/main.423b74d3.css +++ b/app/vmselect/vmui/static/css/main.f29c3c6a.css @@ -1 +1 @@ -.vm-tabs{gap:16px;height:100%;position:relative;-webkit-user-select:none;user-select:none}.vm-tabs,.vm-tabs-item{align-items:center;display:flex;justify-content:center}.vm-tabs-item{color:inherit;cursor:pointer;font-size:inherit;font-weight:inherit;opacity:.6;padding:16px 8px;text-decoration:none;text-transform:uppercase;transition:opacity .2s}.vm-tabs-item_active{opacity:1}.vm-tabs-item__icon{display:grid;margin-right:8px;width:15px}.vm-tabs-item__icon_single{margin-right:0}.vm-tabs__indicator{border-bottom:2px solid;position:absolute;transition:width .2s ease,left .3s cubic-bezier(.28,.84,.42,1)}.vm-alert{grid-gap:8px;align-items:center;background-color:var(--color-background-block);border-radius:8px;box-shadow:1px 2px 12px hsla(0,6%,6%,.08);color:#110f0f;display:grid;font-size:14px;font-weight:500;gap:8px;grid-template-columns:20px 1fr;line-height:20px;padding:16px;position:relative}.vm-alert:after{border-radius:8px;content:"";height:100%;left:0;opacity:.1;position:absolute;top:0;width:100%;z-index:1}.vm-alert__content,.vm-alert__icon{position:relative;z-index:2}.vm-alert__icon{align-items:center;display:flex;justify-content:center}.vm-alert__content{-webkit-filter:brightness(.6);filter:brightness(.6);white-space:pre-line}.vm-alert_success{color:var(--color-success)}.vm-alert_success:after{background-color:var(--color-success)}.vm-alert_error{color:var(--color-error)}.vm-alert_error:after{background-color:var(--color-error)}.vm-alert_info{color:var(--color-info)}.vm-alert_info:after{background-color:var(--color-info)}.vm-alert_warning{color:var(--color-warning)}.vm-alert_warning:after{background-color:var(--color-warning)}.vm-popper{background-color:var(--color-background-block);border-radius:4px;box-shadow:0 2px 8px 0 hsla(0,6%,6%,.2);opacity:0;pointer-events:none;position:fixed;transition:opacity .1s ease-in-out;z-index:-99}.vm-popper_open{-webkit-animation:scale .15s cubic-bezier(.28,.84,.42,1);animation:scale .15s cubic-bezier(.28,.84,.42,1);opacity:1;pointer-events:auto;z-index:101}.vm-popper_open_slider{-webkit-animation:slidePopper .3s cubic-bezier(.28,.84,.42,1.1);animation:slidePopper .3s cubic-bezier(.28,.84,.42,1.1);-webkit-transform-origin:top center;transform-origin:top center}.vm-button{align-items:center;border-radius:6px;color:#fff;cursor:pointer;display:flex;font-size:10px;font-weight:500;justify-content:center;line-height:15px;min-height:31px;padding:6px 14px;position:relative;text-transform:uppercase;-webkit-transform-style:preserve-3d;transform-style:preserve-3d;-webkit-user-select:none;user-select:none;white-space:nowrap}.vm-button:hover:after{background-color:hsla(0,6%,6%,.05)}.vm-button:after,.vm-button:before{border-radius:6px;content:"";height:100%;left:0;position:absolute;top:0;transition:background-color .2s ease;width:100%}.vm-button:before{-webkit-transform:translateZ(-2px);transform:translateZ(-2px)}.vm-button:after{background-color:transparent;-webkit-transform:translateZ(-1px);transform:translateZ(-1px)}.vm-button span{align-items:center;display:grid;justify-content:center}.vm-button span svg{width:15px}.vm-button__start-icon{margin-right:6px}.vm-button__end-icon{margin-left:6px}.vm-button_disabled{cursor:not-allowed;opacity:.3}.vm-button_icon{padding:6px 8px}.vm-button_icon .vm-button__end-icon,.vm-button_icon .vm-button__start-icon{margin:0}.vm-button_small{min-height:25px;padding:4px 6px}.vm-button_small span svg{width:13px}.vm-button_contained_primary{color:var(--color-primary-text)}.vm-button_contained_primary:before{background-color:var(--color-primary)}.vm-button_contained_primary:hover:after{background-color:hsla(0,6%,6%,.2)}.vm-button_contained_secondary{color:var(--color-secondary-text)}.vm-button_contained_secondary:before{background-color:var(--color-secondary)}.vm-button_contained_secondary:hover:after{background-color:hsla(0,6%,6%,.2)}.vm-button_contained_success{color:var(--color-success-text)}.vm-button_contained_success:before{background-color:var(--color-success)}.vm-button_contained_success:hover:after{background-color:hsla(0,6%,6%,.2)}.vm-button_contained_error{color:var(--color-error-text)}.vm-button_contained_error:before{background-color:var(--color-error)}.vm-button_contained_gray{color:hsla(0,6%,6%,.6)}.vm-button_contained_gray:before{background-color:hsla(0,6%,6%,.6)}.vm-button_contained_warning{color:var(--color-warning)}.vm-button_contained_warning:before{background-color:var(--color-warning);opacity:.2}.vm-button_text_primary{color:var(--color-primary)}.vm-button_text_secondary{color:var(--color-secondary)}.vm-button_text_success{color:var(--color-success)}.vm-button_text_error{color:var(--color-error)}.vm-button_text_gray{color:hsla(0,6%,6%,.6)}.vm-button_text_warning{color:var(--color-warning)}.vm-button_outlined_primary{border:1px solid var(--color-primary);color:var(--color-primary)}.vm-button_outlined_error{border:1px solid var(--color-error);color:var(--color-error)}.vm-button_outlined_secondary{border:1px solid var(--color-secondary);color:var(--color-secondary)}.vm-button_outlined_success{border:1px solid var(--color-success);color:var(--color-success)}.vm-button_outlined_gray{border:1px solid hsla(0,6%,6%,.6);color:hsla(0,6%,6%,.6)}.vm-button_outlined_warning{border:1px solid var(--color-warning);color:var(--color-warning)}.vm-execution-controls-buttons{border-radius:7px;display:flex;justify-content:space-between;min-width:107px}.vm-execution-controls-buttons__arrow{align-items:center;display:flex;justify-content:center;-webkit-transform:rotate(0);transform:rotate(0);transition:-webkit-transform .2s ease-in-out;transition:transform .2s ease-in-out;transition:transform .2s ease-in-out,-webkit-transform .2s ease-in-out}.vm-execution-controls-buttons__arrow_open{-webkit-transform:rotate(180deg);transform:rotate(180deg)}.vm-execution-controls-list{font-size:12px;max-height:208px;overflow:auto;padding:8px 0;width:124px}.vm-tooltip{-webkit-animation:vm-scale .15s cubic-bezier(.28,.84,.42,1);animation:vm-scale .15s cubic-bezier(.28,.84,.42,1);background-color:rgba(97,97,97,.92);border-radius:4px;box-shadow:0 2px 8px 0 hsla(0,6%,6%,.2);color:#fff;font-size:10px;line-height:150%;opacity:1;padding:3px 8px;pointer-events:auto;position:fixed;transition:opacity .1s ease-in-out;white-space:nowrap;z-index:101}@-webkit-keyframes vm-scale{0%{-webkit-transform:scale(0);transform:scale(0)}to{-webkit-transform:scale(1);transform:scale(1)}}@keyframes vm-scale{0%{-webkit-transform:scale(0);transform:scale(0)}to{-webkit-transform:scale(1);transform:scale(1)}}.vm-time-duration{font-size:12px;max-height:168px;overflow:auto}.vm-calendar{background-color:var(--color-background-block);border-radius:8px;display:grid;font-size:12px;grid-template-rows:auto 1fr auto;padding:16px;-webkit-user-select:none;user-select:none}.vm-calendar__tabs{border-top:1px solid hsla(0,6%,6%,.15);margin:16px -16px -16px}.vm-calendar-header{grid-gap:24px;align-items:center;display:grid;gap:24px;grid-template-columns:1fr auto;justify-content:center;min-height:36px;padding-bottom:16px}.vm-calendar-header-left{grid-gap:8px;align-items:center;cursor:pointer;display:grid;gap:8px;grid-template-columns:auto auto;justify-content:flex-start;transition:opacity .2s ease-in-out}.vm-calendar-header-left:hover{opacity:.8}.vm-calendar-header-left__date{color:#110f0f;font-size:12px;font-weight:700}.vm-calendar-header-left__select-year{align-items:center;display:grid;height:14px;justify-content:center;width:14px}.vm-calendar-header-left__select-year svg{width:100%}.vm-calendar-header-right{grid-gap:8px;align-items:center;display:grid;gap:8px;grid-template-columns:18px 18px;justify-content:center}.vm-calendar-header-right__next,.vm-calendar-header-right__prev{cursor:pointer;transition:opacity .2s ease-in-out}.vm-calendar-header-right__next:hover,.vm-calendar-header-right__prev:hover{opacity:.8}.vm-calendar-header-right__prev{-webkit-transform:rotate(90deg);transform:rotate(90deg)}.vm-calendar-header-right__next{-webkit-transform:rotate(-90deg);transform:rotate(-90deg)}.vm-calendar-body{grid-gap:2px;display:grid;gap:2px;grid-template-columns:repeat(7,32px);grid-template-rows:repeat(6,32px)}.vm-calendar-body,.vm-calendar-body-cell{align-items:center;justify-content:center}.vm-calendar-body-cell{border-radius:50%;display:flex;height:100%;text-align:center}.vm-calendar-body-cell_weekday{color:hsla(0,6%,6%,.6)}.vm-calendar-body-cell_day{cursor:pointer;transition:color .2s ease,background-color .3s ease-in-out}.vm-calendar-body-cell_day:hover{background-color:hsla(0,6%,6%,.05)}.vm-calendar-body-cell_day_empty{pointer-events:none}.vm-calendar-body-cell_day_active{color:#fff}.vm-calendar-body-cell_day_active,.vm-calendar-body-cell_day_active:hover{background-color:var(--color-primary)}.vm-calendar-body-cell_day_today{border:1px solid var(--color-primary)}.vm-calendar-years{grid-gap:8px;display:grid;gap:8px;grid-template-columns:repeat(3,1fr);overflow:auto}.vm-calendar-years__year{align-items:center;border-radius:8px;cursor:pointer;display:flex;justify-content:center;padding:8px 16px;transition:color .2s ease,background-color .3s ease-in-out}.vm-calendar-years__year:hover{background-color:hsla(0,6%,6%,.05)}.vm-calendar-years__year_selected{color:#fff}.vm-calendar-years__year_selected,.vm-calendar-years__year_selected:hover{background-color:var(--color-primary)}.vm-calendar-time-picker{align-items:center;display:flex;flex-direction:column;justify-content:center}.vm-calendar-time-picker-clock{border:1px solid hsla(0,6%,6%,.15);border-radius:50%;box-shadow:1px 2px 12px hsla(0,6%,6%,.08);box-sizing:initial;height:230px;position:relative;width:230px}.vm-calendar-time-picker-clock:after{background-color:var(--color-primary);border-radius:50%;content:"";height:6px;left:50%;position:absolute;top:50%;-webkit-transform:translate(-50%,-50%);transform:translate(-50%,-50%);width:6px}.vm-calendar-time-picker-clock__arrow{background-color:var(--color-primary);height:107px;left:114px;margin-top:8px;opacity:.8;position:absolute;top:0;-webkit-transform-origin:bottom;transform-origin:bottom;transition:-webkit-transform .2s ease-in-out;transition:transform .2s ease-in-out;transition:transform .2s ease-in-out,-webkit-transform .2s ease-in-out;width:2px;z-index:0}.vm-calendar-time-picker-clock__arrow_offset{height:73px;margin-top:42px;z-index:2}.vm-calendar-time-picker-clock__arrow:after{background-color:var(--color-primary);border-radius:50%;content:"";height:30px;left:50%;position:absolute;top:0;-webkit-transform:translateX(-50%);transform:translateX(-50%);width:30px}.vm-calendar-time-picker-clock__time{align-items:flex-start;cursor:pointer;display:flex;height:115px;justify-content:center;left:100px;padding-top:8px;position:absolute;text-align:center;top:0;-webkit-transform-origin:bottom;transform-origin:bottom;width:30px;z-index:1}.vm-calendar-time-picker-clock__time_hide{display:none}.vm-calendar-time-picker-clock__time_offset{height:73px;margin-top:42px;padding:0;z-index:2}.vm-calendar-time-picker-clock__time:hover span{background-color:hsla(0,6%,6%,.1)}.vm-calendar-time-picker-clock__time span{align-items:center;border-radius:50%;display:grid;justify-content:center;min-height:30px;min-width:30px;position:relative;-webkit-transform-origin:center;transform-origin:center;transition:background-color .3s ease}.vm-calendar-time-picker-fields{align-items:center;display:flex;justify-content:space-between;margin-top:16px}.vm-calendar-time-picker-fields span{margin:0 8px}.vm-calendar-time-picker-fields__input{border:1px solid #d8d8d8;border-radius:4px;font-size:14px;height:32px;padding:2px 8px;text-align:center;width:64px}.vm-calendar-time-picker-fields__input:focus{border-color:var(--color-primary)}.vm-time-selector{display:grid;grid-template-columns:repeat(2,230px);padding:16px 0}.vm-time-selector-left{border-right:1px solid hsla(0,6%,6%,.15);display:flex;flex-direction:column;gap:8px;padding:0 16px}.vm-time-selector-left-inputs{align-items:flex-start;display:grid;flex-grow:1;justify-content:stretch}.vm-time-selector-left-inputs__date{grid-gap:8px;align-items:center;border-bottom:1px solid hsla(0,6%,6%,.15);cursor:pointer;display:grid;gap:8px;grid-template-columns:1fr 14px;justify-content:center;margin-bottom:16px;padding-bottom:8px;transition:color .2s ease-in-out,border-bottom-color .3s ease}.vm-time-selector-left-inputs__date:hover{border-bottom-color:var(--color-primary)}.vm-time-selector-left-inputs__date:hover,.vm-time-selector-left-inputs__date:hover svg{color:var(--color-primary)}.vm-time-selector-left-inputs__date label{color:hsla(0,6%,6%,.6);font-size:10px;grid-column:1/3}.vm-time-selector-left-inputs__date svg{color:hsla(0,6%,6%,.6);transition:color .2s ease-in-out}.vm-time-selector-left__controls{grid-gap:8px;display:grid;gap:8px;grid-template-columns:repeat(2,1fr)}.vm-text-field{display:grid;margin:6px 0;position:relative;width:100%}.vm-text-field_textarea:after{content:attr(data-replicated-value) " ";visibility:hidden;white-space:pre-wrap}.vm-text-field:after,.vm-text-field__input{background-color:transparent;border:1px solid hsla(0,6%,6%,.15);font-size:12px;grid-area:1/1/2/2;line-height:18px;overflow:hidden;padding:8px 16px;width:100%}.vm-text-field__error,.vm-text-field__helper-text,.vm-text-field__label{-webkit-line-clamp:2;line-clamp:2;-webkit-box-orient:vertical;background-color:var(--color-background-block);display:-webkit-box;font-size:10px;left:8px;line-height:10px;max-width:calc(100% - 16px);overflow:hidden;padding:0 3px;pointer-events:none;position:absolute;text-overflow:ellipsis;-webkit-user-select:none;user-select:none;z-index:2}.vm-text-field__label{color:hsla(0,6%,6%,.6);top:-5px}.vm-text-field__error{color:var(--color-error);top:calc(100% - 5px)}.vm-text-field__helper-text{bottom:-5px;color:hsla(0,6%,6%,.6)}.vm-text-field__input{border-radius:4px;display:block;min-height:34px;overflow:hidden;resize:none;transition:border .2s ease}.vm-text-field__input:focus,.vm-text-field__input:hover{border:1px solid var(--color-primary)}.vm-text-field__input_error,.vm-text-field__input_error:focus,.vm-text-field__input_error:hover{border:1px solid var(--color-error)}.vm-text-field__input_icon-start{padding-left:42px}.vm-text-field__input:disabled{background-color:inherit;color:inherit}.vm-text-field__input:disabled:hover{border-color:hsla(0,6%,6%,.4)}.vm-text-field__icon-end,.vm-text-field__icon-start{align-items:center;color:hsla(0,6%,6%,.6);display:flex;height:100%;justify-content:center;left:8px;max-width:15px;position:absolute;top:auto}.vm-text-field__icon-end svg,.vm-text-field__icon-start svg{height:auto;width:100%}.vm-text-field__icon-end{left:auto;right:8px}.vm-modal{align-items:center;background:hsla(0,6%,6%,.55);bottom:0;display:flex;justify-content:center;left:0;position:fixed;right:0;top:0;z-index:100}.vm-modal-content{background:#fff;border-radius:4px;box-shadow:0 0 24px hsla(0,6%,6%,.07);padding:22px}.vm-modal-content-header{align-items:center;display:grid;grid-template-columns:1fr auto;margin-bottom:22px}.vm-modal-content-header__title{font-size:14px;font-weight:700}.vm-modal-content-header__close{align-items:center;box-sizing:initial;color:#fff;cursor:pointer;display:flex;justify-content:center;padding:10px;width:24px}.vm-modal-content-header__close svg{height:auto;width:100%}.vm-server-configurator{grid-gap:24px;align-items:center;display:grid;gap:24px;width:600px}.vm-server-configurator__footer{align-items:center;display:inline-grid;gap:8px;grid-template-columns:repeat(2,1fr);justify-content:flex-end;margin-left:auto;margin-right:0}.vm-limits-configurator-title{align-items:center;display:flex;font-size:12px;font-weight:700;justify-content:flex-start;margin-bottom:16px}.vm-limits-configurator-title__reset{align-items:center;display:flex;flex-grow:1;justify-content:flex-end}.vm-limits-configurator__inputs{grid-gap:16px;align-items:center;display:grid;gap:16px;grid-template-columns:repeat(3,1fr);justify-content:space-between}.vm-shortcuts{min-width:400px}.vm-shortcuts-section{margin-bottom:24px}.vm-shortcuts-section__title{border-bottom:1px solid hsla(0,6%,6%,.15);font-weight:700;margin-bottom:16px;padding:8px 0}.vm-shortcuts-section-list{grid-gap:16px;display:grid;gap:16px}.vm-shortcuts-section-list-item{grid-gap:8px;align-items:center;display:grid;gap:8px;grid-template-columns:180px 1fr}.vm-shortcuts-section-list-item__key{align-items:center;display:flex;gap:4px}.vm-shortcuts-section-list-item__key code{background-color:#fff;background-repeat:repeat-x;border:1px solid hsla(0,6%,6%,.15);border-radius:4px;color:#110f0f;display:inline-block;font-size:10px;line-height:2;padding:2px 8px 0;text-align:center}.vm-shortcuts-section-list-item__description{font-size:12px}.vm-header{align-items:center;display:flex;gap:48px;justify-content:flex-start;padding:8px 24px}.vm-header_app{padding:8px 0}.vm-header-logo{align-items:center;display:grid;justify-content:center}.vm-header-logo__icon{align-items:center;cursor:pointer;display:flex;margin-bottom:2px;position:relative;width:100%}.vm-header-logo__issue{color:inherit;cursor:pointer;font-size:10px;opacity:.4;text-align:center;text-decoration:underline;transition:opacity .2s;white-space:nowrap}.vm-header-logo__issue:hover{opacity:.8}.vm-header-nav{font-size:10px;font-weight:600}.vm-header__settings{align-items:center;display:flex;flex-grow:1;gap:8px;justify-content:flex-end}.vm-container{display:flex;flex-direction:column;min-height:calc(100vh - var(--scrollbar-height))}.vm-container-body{background-color:var(--color-background-body);flex-grow:1;min-height:100%;padding:24px}.vm-container-body_app{background-color:transparent;padding:8px 0}.uplot,.uplot *,.uplot :after,.uplot :before{box-sizing:border-box}.uplot{font-family: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;line-height:1.5;width:-webkit-min-content;width:min-content}.u-title{font-size:18px;font-weight:700;text-align:center}.u-wrap{position:relative;-webkit-user-select:none;user-select:none}.u-over,.u-under{position:absolute}.u-under{overflow:hidden}.uplot canvas{display:block;height:100%;position:relative;width:100%}.u-axis{position:absolute}.u-legend{margin:auto;text-align:center}.u-inline{display:block}.u-inline *{display:inline-block}.u-inline tr{margin-right:16px}.u-legend th{font-weight:600}.u-legend th>*{display:inline-block;vertical-align:middle}.u-legend .u-marker{background-clip:padding-box!important;height:1em;margin-right:4px;width:1em}.u-inline.u-live th:after{content:":";vertical-align:middle}.u-inline:not(.u-live) .u-value{display:none}.u-series>*{padding:4px}.u-series th{cursor:pointer}.u-legend .u-off>*{opacity:.3}.u-select{background:rgba(0,0,0,.07)}.u-cursor-x,.u-cursor-y,.u-select{pointer-events:none;position:absolute}.u-cursor-x,.u-cursor-y{left:0;top:0;will-change:transform;z-index:100}.u-hz .u-cursor-x,.u-vt .u-cursor-y{border-right:1px dashed #607d8b;height:100%}.u-hz .u-cursor-y,.u-vt .u-cursor-x{border-bottom:1px dashed #607d8b;width:100%}.u-cursor-pt{background-clip:padding-box!important;border:0 solid;border-radius:50%;left:0;pointer-events:none;position:absolute;top:0;will-change:transform;z-index:100}.u-axis.u-off,.u-cursor-pt.u-off,.u-cursor-x.u-off,.u-cursor-y.u-off,.u-select.u-off{display:none}.vm-line-chart{height:500px;pointer-events:auto}.vm-line-chart_panning{pointer-events:none}.vm-line-chart__u-plot{position:relative}.vm-chart-tooltip{grid-gap:16px;word-wrap:break-word;background:rgba(97,97,97,.92);border-radius:8px;color:#fff;display:grid;font-family:JetBrains Mono,monospace;font-size:10px;font-weight:400;gap:16px;line-height:150%;padding:8px;pointer-events:none;position:absolute;-webkit-user-select:text;user-select:text;width:300px;z-index:98}.vm-chart-tooltip_sticky{background-color:#616161;pointer-events:auto;z-index:99}.vm-chart-tooltip_moved{margin-left:-246.5px;margin-top:-20.5px;position:fixed}.vm-chart-tooltip-header{grid-gap:8px;align-items:center;display:grid;gap:8px;grid-template-columns:1fr 25px 25px;justify-content:center;min-height:25px}.vm-chart-tooltip-header__close{color:#fff}.vm-chart-tooltip-header__drag{color:#fff;cursor:move}.vm-chart-tooltip-data{grid-gap:8px;align-items:flex-start;display:grid;gap:8px;grid-template-columns:auto 1fr;line-height:12px;word-break:break-all}.vm-chart-tooltip-data__value{font-weight:700;padding:4px}.vm-chart-tooltip-data__marker{height:12px;width:12px}.vm-chart-tooltip-info{grid-gap:4px;display:grid}.vm-legend-item{grid-gap:8px;align-items:start;background-color:var(--color-background-block);cursor:pointer;display:grid;grid-template-columns:auto auto;justify-content:start;padding:8px 48px 8px 8px;transition:.2s ease}.vm-legend-item:hover{background-color:rgba(0,0,0,.1)}.vm-legend-item_hide{opacity:.5;text-decoration:line-through}.vm-legend-item__marker{border-radius:2px;box-sizing:border-box;height:14px;transition:.2s ease;width:14px}.vm-legend-item-info{font-weight:400}.vm-legend-item-info__free-fields{cursor:pointer;padding:3px}.vm-legend-item-info__free-fields:hover{text-decoration:underline}.vm-legend-item-info__free-fields:not(:last-child):after{content:","}.vm-legend{cursor:default;display:flex;flex-wrap:wrap;margin-top:24px;position:relative}.vm-legend-group{margin:0 16px 16px 0;min-width:23%}.vm-legend-group-title{align-items:center;border-bottom:1px solid hsla(0,6%,6%,.15);display:flex;margin-bottom:1px;padding:0 8px 8px}.vm-legend-group-title__count{font-weight:700;margin-right:8px}.vm-graph-view{width:100%}.vm-graph-view_full-width{width:calc(100vw - 96px - var(--scrollbar-width))}.vm-query-editor-autocomplete{max-height:300px;overflow:auto}.vm-additional-settings{align-items:center;display:inline-flex;flex-wrap:wrap;gap:24px;justify-content:flex-start}.vm-additional-settings__input{flex-basis:160px;margin-bottom:-6px}.vm-switch{align-items:center;cursor:pointer;display:flex;justify-content:flex-start}.vm-switch_disabled{cursor:default;opacity:.6}.vm-switch_secondary_active .vm-switch-track{background-color:var(--color-secondary)}.vm-switch_primary_active .vm-switch-track{background-color:var(--color-primary)}.vm-switch_active .vm-switch-track__thumb{left:20px}.vm-switch:hover .vm-switch-track{opacity:.8}.vm-switch-track{align-items:center;background-color:hsla(0,6%,6%,.4);border-radius:17px;display:flex;height:17px;justify-content:flex-start;padding:3px;position:relative;transition:background-color .2s ease,opacity .3s ease-out;width:34px}.vm-switch-track__thumb{background-color:var(--color-background-block);border-radius:50%;left:3px;min-height:11px;min-width:11px;position:absolute;top:auto;-webkit-transform-style:preserve-3d;transform-style:preserve-3d;transition:right .2s ease-out,left .2s ease-out}.vm-switch__label{color:inherit;font-size:inherit;margin-left:8px;transition:color .2s ease;white-space:nowrap}.vm-query-configurator{grid-gap:8px;display:grid;gap:8px}.vm-query-configurator-list{display:grid}.vm-query-configurator-list-row{grid-gap:8px;align-items:center;display:grid;gap:8px;grid-template-columns:1fr auto auto}.vm-query-configurator-list-row_disabled{-webkit-filter:grayscale(100%);filter:grayscale(100%);opacity:.5}.vm-query-configurator-list-row__button{display:grid;min-height:36px;width:36px}.vm-query-configurator-settings{align-items:flex-end;display:flex;gap:24px;justify-content:space-between}.vm-query-configurator-settings__buttons{grid-gap:8px;display:grid;gap:8px;grid-template-columns:repeat(2,auto)}.vm-json-view__copy{display:flex;justify-content:flex-end;position:-webkit-sticky;position:sticky;top:24px;z-index:2}.vm-json-view__code{font-size:12px;line-height:1.4;-webkit-transform:translateY(-32px);transform:translateY(-32px)}.vm-axes-limits{max-width:300px}.vm-axes-limits,.vm-axes-limits-list{grid-gap:16px;align-items:center;display:grid;gap:16px}.vm-axes-limits-list__inputs{grid-gap:8px;display:grid;gap:8px;grid-template-columns:repeat(2,120px)}.vm-graph-settings-popper{grid-gap:16px;display:grid;gap:16px;padding:0 0 16px}.vm-graph-settings-popper__body{grid-gap:8px;display:grid;gap:8px;padding:0 16px}.vm-spinner{align-items:center;-webkit-animation:vm-fade 2s cubic-bezier(.28,.84,.42,1.1);animation:vm-fade 2s cubic-bezier(.28,.84,.42,1.1);background-color:hsla(0,0%,100%,.5);bottom:0;display:flex;flex-direction:column;justify-content:center;left:0;pointer-events:none;position:fixed;right:0;top:0;z-index:99}.vm-spinner__message{color:hsla(0,6%,6%,.9);font-size:14px;line-height:1.3;margin-top:24px;text-align:center;white-space:pre-line}.half-circle-spinner,.half-circle-spinner *{box-sizing:border-box}.half-circle-spinner{border-radius:100%;height:60px;position:relative;width:60px}.half-circle-spinner .circle{border:6px solid transparent;border-radius:100%;content:"";height:100%;position:absolute;width:100%}.half-circle-spinner .circle.circle-1{-webkit-animation:half-circle-spinner-animation 1s infinite;animation:half-circle-spinner-animation 1s infinite;border-top-color:var(--color-primary)}.half-circle-spinner .circle.circle-2{-webkit-animation:half-circle-spinner-animation 1s infinite alternate;animation:half-circle-spinner-animation 1s infinite alternate;border-bottom-color:var(--color-primary)}@-webkit-keyframes half-circle-spinner-animation{0%{-webkit-transform:rotate(0deg);transform:rotate(0deg)}to{-webkit-transform:rotate(1turn);transform:rotate(1turn)}}@keyframes half-circle-spinner-animation{0%{-webkit-transform:rotate(0deg);transform:rotate(0deg)}to{-webkit-transform:rotate(1turn);transform:rotate(1turn)}}@-webkit-keyframes vm-fade{0%{opacity:0}to{opacity:1}}@keyframes vm-fade{0%{opacity:0}to{opacity:1}}.vm-tracings-view{grid-gap:24px;display:grid;gap:24px}.vm-tracings-view-trace-header{align-items:center;border-bottom:1px solid hsla(0,6%,6%,.15);display:flex;justify-content:space-between;padding:8px 8px 8px 24px}.vm-tracings-view-trace-header-title{flex-grow:1;font-size:14px;margin-right:8px}.vm-tracings-view-trace-header-title__query{font-weight:700}.vm-tracings-view-trace__nav{padding:24px 24px 24px 0}.vm-line-progress{grid-gap:8px;align-items:center;color:hsla(0,6%,6%,.6);display:grid;gap:8px;grid-template-columns:1fr auto;justify-content:center}.vm-line-progress-track{background-color:hsla(0,6%,6%,.05);border-radius:4px;height:20px;width:100%}.vm-line-progress-track__thumb{background-color:#1a90ff;border-radius:4px;height:100%}.vm-nested-nav{background-color:rgba(201,227,246,.4);border-radius:4px;margin-left:24px}.vm-nested-nav-header{grid-gap:8px;border-radius:4px;cursor:pointer;display:grid;gap:8px;grid-template-columns:auto 1fr;padding:8px;transition:background-color .2s ease-in-out}.vm-nested-nav-header:hover{background-color:hsla(0,6%,6%,.06)}.vm-nested-nav-header__icon{align-items:center;display:flex;justify-content:center;transition:-webkit-transform .2s ease-in-out;transition:transform .2s ease-in-out;transition:transform .2s ease-in-out,-webkit-transform .2s ease-in-out;width:20px}.vm-nested-nav-header__icon_open{-webkit-transform:rotate(180deg);transform:rotate(180deg)}.vm-nested-nav-header__message,.vm-nested-nav-header__progress{grid-column:2}.vm-nested-nav-header__duration{color:hsla(0,6%,6%,.6);grid-column:2}.vm-json-form{grid-gap:16px;display:grid;gap:16px;grid-template-rows:auto calc(90vh - 150px) auto;max-height:900px;max-width:1000px;width:70vw}.vm-json-form_one-field{grid-template-rows:calc(90vh - 150px) auto}.vm-json-form textarea{height:100%;overflow:auto;width:100%}.vm-json-form-footer{align-items:center;display:flex;gap:8px;justify-content:space-between}.vm-json-form-footer__controls{align-items:center;display:flex;flex-grow:1;gap:8px;justify-content:flex-start}.vm-json-form-footer__controls_right{display:grid;grid-template-columns:repeat(2,90px);justify-content:flex-end}.vm-table-settings-popper{display:grid}.vm-table-settings-popper-list{grid-gap:8px;display:grid;gap:8px;max-height:350px;overflow:auto;padding:16px 16px 24px}.vm-table-settings-popper-list__item{font-size:12px;text-transform:capitalize}.vm-table-settings-popper__footer{align-items:center;display:inline-grid;gap:8px;grid-template-columns:1fr 1fr;justify-content:center;min-width:200px;padding:0 16px 16px}.vm-checkbox{align-items:center;cursor:pointer;display:flex;justify-content:flex-start;-webkit-user-select:none;user-select:none}.vm-checkbox_disabled{cursor:default;opacity:.6}.vm-checkbox_secondary_active .vm-checkbox-track{background-color:var(--color-secondary)}.vm-checkbox_secondary .vm-checkbox-track{border:1px solid var(--color-secondary)}.vm-checkbox_primary_active .vm-checkbox-track{background-color:var(--color-primary)}.vm-checkbox_primary .vm-checkbox-track{border:1px solid var(--color-primary)}.vm-checkbox_active .vm-checkbox-track__thumb{-webkit-transform:scale(1);transform:scale(1)}.vm-checkbox:hover .vm-checkbox-track{opacity:.8}.vm-checkbox-track{align-items:center;background-color:transparent;border-radius:4px;display:flex;height:16px;justify-content:center;padding:2px;position:relative;transition:background-color .2s ease,opacity .3s ease-out;width:16px}.vm-checkbox-track__thumb{align-items:center;color:#fff;display:grid;height:12px;justify-content:center;-webkit-transform:scale(0);transform:scale(0);transition:-webkit-transform .1s ease-in-out;transition:transform .1s ease-in-out;transition:transform .1s ease-in-out,-webkit-transform .1s ease-in-out;width:12px}.vm-checkbox-track__thumb svg{width:100%}.vm-checkbox__label{color:inherit;font-size:inherit;margin-left:8px;transition:color .2s ease;white-space:nowrap}.vm-custom-panel{grid-gap:24px;align-items:flex-start;display:grid;gap:24px;height:100%}.vm-custom-panel__warning{align-items:center;display:grid;grid-template-columns:1fr auto;justify-content:space-between}.vm-custom-panel-body{position:relative}.vm-custom-panel-body-header{display:flex;font-size:10px;justify-content:space-between;margin:-24px -24px 24px;padding:0 24px;position:relative;z-index:1}.vm-custom-panel-body-header,.vm-predefined-panel-header{align-items:center;border-bottom:1px solid hsla(0,6%,6%,.15)}.vm-predefined-panel-header{grid-gap:8px;display:grid;gap:8px;grid-template-columns:auto 1fr 160px auto;justify-content:flex-start;padding:8px 16px}.vm-predefined-panel-header__description{line-height:1.3;white-space:pre-wrap}.vm-predefined-panel-header__description ol,.vm-predefined-panel-header__description ul{list-style-position:inside}.vm-predefined-panel-header__description a{color:#c9e3f6;text-decoration:underline}.vm-predefined-panel-header__info{align-items:center;color:var(--color-primary);display:flex;justify-content:center;width:18px}.vm-predefined-panel-body{padding:8px 16px}.vm-accordion-header{align-items:center;cursor:pointer;display:grid;font-size:inherit;position:relative}.vm-accordion-header__arrow{align-items:center;display:flex;justify-content:center;position:absolute;right:14px;top:auto;-webkit-transform:rotate(0);transform:rotate(0);transition:-webkit-transform .2s ease-in-out;transition:transform .2s ease-in-out;transition:transform .2s ease-in-out,-webkit-transform .2s ease-in-out}.vm-accordion-header__arrow_open{-webkit-transform:rotate(180deg);transform:rotate(180deg)}.vm-accordion-header__arrow svg{height:auto;width:14px}.accordion-section{overflow:hidden}.vm-predefined-dashboard{background-color:transparent}.vm-predefined-dashboard-header{align-items:center;border-radius:4px;box-shadow:1px 2px 12px hsla(0,6%,6%,.08);display:grid;font-weight:700;grid-template-columns:1fr auto;justify-content:space-between;line-height:14px;overflow:hidden;padding:16px;position:relative;-webkit-transform-style:preserve-3d;transform-style:preserve-3d;transition:box-shadow .2s ease-in-out}.vm-predefined-dashboard-header_open{border-radius:4px 4px 0 0;box-shadow:none}.vm-predefined-dashboard-header__title{font-size:12px}.vm-predefined-dashboard-header__count{font-size:10px;grid-column:2;margin-right:30px}.vm-predefined-dashboard-panels{grid-gap:16px;display:grid;gap:16px;grid-template-columns:repeat(12,1fr);padding:0}.vm-predefined-dashboard-panels-panel{border-radius:8px;overflow:hidden;position:relative}.vm-predefined-dashboard-panels-panel:hover .vm-predefined-dashboard-panels-panel__resizer{-webkit-transform:scale(1);transform:scale(1)}.vm-predefined-dashboard-panels-panel__resizer{bottom:0;cursor:se-resize;height:20px;position:absolute;right:0;-webkit-transform:scale(0);transform:scale(0);transition:-webkit-transform .2s ease-in-out;transition:transform .2s ease-in-out;transition:transform .2s ease-in-out,-webkit-transform .2s ease-in-out;width:20px;z-index:1}.vm-predefined-dashboard-panels-panel__resizer:after{border-bottom:2px solid hsla(0,6%,6%,.2);border-right:2px solid hsla(0,6%,6%,.2);bottom:5px;content:"";height:5px;position:absolute;right:5px;width:5px}.vm-predefined-dashboard-panels-panel__alert{grid-column:span 12}.vm-predefined-panels{grid-gap:16px;align-items:flex-start;display:grid;gap:16px}.vm-predefined-panels-tabs{align-items:center;display:flex;font-size:10px;justify-content:flex-start;overflow:hidden}.vm-predefined-panels-tabs__tab{border-right:1px solid hsla(0,6%,6%,.15);cursor:pointer;padding:16px;text-transform:uppercase;transition:opacity .2s ease-in-out,color .15s ease-in}.vm-predefined-panels-tabs__tab:hover{opacity:1}.vm-predefined-panels__dashboards{grid-gap:16px;display:grid;gap:16px}.vm-cardinality-configurator{grid-gap:8px;display:grid;gap:8px}.vm-cardinality-configurator-controls{align-items:center;display:flex;flex-wrap:wrap;gap:0 24px;justify-content:flex-start}.vm-cardinality-configurator-controls__query{flex-grow:1}.vm-cardinality-configurator-bottom{grid-gap:24px;align-items:flex-end;display:grid;gap:24px;grid-template-columns:1fr auto}.vm-cardinality-configurator-bottom__info{font-size:12px}.u-legend{color:#110f0f;font-family:Lato,sans-serif;font-size:14px}.u-legend .u-thead{display:none}.u-legend .u-series{display:flex;gap:8px}.u-legend .u-series th{display:none}.u-legend .u-series td:nth-child(2):after{content:":";margin-left:8px}.u-legend .u-series .u-value{display:block;padding:0;text-align:left}.vm-metrics-content-header{margin:-24px -24px 24px}.vm-cardinality-panel{grid-gap:24px;align-items:flex-start;display:grid;gap:24px}.vm-top-queries-panel-header{margin:-24px -24px 24px}.vm-top-queries{grid-gap:24px;align-items:flex-start;display:grid;gap:24px}.vm-top-queries-controls{grid-gap:8px;display:grid;gap:8px}.vm-top-queries-controls-bottom,.vm-top-queries-controls__fields{grid-gap:24px;display:grid;gap:24px;grid-template-columns:1fr auto}.vm-top-queries-controls-bottom{align-items:flex-end;justify-content:space-between}.vm-top-queries-controls-bottom__button{align-items:center;display:flex;justify-content:flex-end}.vm-top-queries-panels{grid-gap:24px;display:grid;gap:24px}.vm-trace-page{display:flex;flex-direction:column;min-height:100%;padding:16px}.vm-trace-page-controls{grid-gap:16px;align-items:center;display:grid;gap:16px;grid-template-columns:1fr 1fr;justify-content:center}.vm-trace-page-header{grid-gap:16px;align-items:start;display:grid;gap:16px;grid-template-columns:1fr auto;margin-bottom:24px}.vm-trace-page-header-errors{grid-gap:24px;align-items:flex-start;display:grid;gap:24px;grid-template-columns:1fr;justify-content:stretch}.vm-trace-page-header-errors-item{align-items:center;display:grid;justify-content:stretch;position:relative}.vm-trace-page-header-errors-item__filename{min-height:20px}.vm-trace-page-header-errors-item__close{position:absolute;right:8px;top:auto;z-index:2}.vm-trace-page-preview{align-items:center;display:flex;flex-direction:column;flex-grow:1;justify-content:center}.vm-trace-page-preview__text{font-size:14px;line-height:1.8;margin-bottom:8px;text-align:center;white-space:pre-line}#root,body,html{background-attachment:fixed;background-repeat:no-repeat;color:#110f0f;cursor:default;font-family:Lato,sans-serif;font-size:12px;margin:0;min-height:100%}body{overflow:scroll}*{cursor:inherit;font:inherit}code{font-family:JetBrains Mono,monospace}b{font-weight:700}input,textarea{cursor:text}input[type=number]::-webkit-inner-spin-button,input[type=number]::-webkit-outer-spin-button{-webkit-appearance:none;margin:0}.vm-snackbar{bottom:16px;left:16px;position:fixed;z-index:999}a,abbr,acronym,address,applet,article,aside,audio,big,body,canvas,caption,center,cite,code,del,details,dfn,div,em,embed,fieldset,figcaption,figure,footer,form,h1,h2,h3,h4,h5,h6,header,hgroup,html,iframe,img,ins,kbd,label,legend,li,mark,menu,nav,object,ol,output,p,pre,q,ruby,s,samp,section,small,span,strike,strong,sub,summary,sup,table,tbody,td,tfoot,th,thead,time,tr,tt,u,ul,var,video{border:0;margin:0;padding:0;vertical-align:initial}h1,h2,h3,h4,h5,h6{font-weight:400}article,aside,details,figcaption,figure,footer,header,hgroup,menu,nav,section{display:block}body{line-height:1}q:after,q:before{content:""}table{border-collapse:collapse;border-spacing:0}input::-webkit-input-placeholder{opacity:1;-webkit-transition:opacity .3s ease;transition:opacity .3s ease}input::placeholder{opacity:1;transition:opacity .3s ease}input:focus::-webkit-input-placeholder{opacity:0;-webkit-transition:opacity .3s ease;transition:opacity .3s ease}input:focus::placeholder{opacity:0;transition:opacity .3s ease}*{box-sizing:border-box;outline:none}button{background:none;border:none;border-radius:0;padding:0}strong{letter-spacing:1px}input[type=file]{cursor:pointer;font-size:0;height:100%;left:0;opacity:0;position:absolute;top:0;width:100%}input[type=file]:disabled{cursor:not-allowed}a{color:inherit;text-decoration:inherit}input,textarea{-webkit-text-fill-color:inherit;appearance:none;-webkit-appearance:none}input:disabled,textarea:disabled{opacity:1!important}input:placeholder-shown,textarea:placeholder-shown{width:100%}input:-webkit-autofill,input:-webkit-autofill:active,input:-webkit-autofill:focus,input:-webkit-autofill:hover{-webkit-box-shadow:inset 0 0 0 0 #fff!important;width:100%;z-index:2}.vm-header-button{border:1px solid hsla(0,6%,6%,.2)}.vm-list__item{background-color:transparent;cursor:pointer;padding:12px 16px;transition:background-color .2s ease}.vm-list__item:hover,.vm-list__item_active{background-color:hsla(0,6%,6%,.1)}.vm-popper-header{grid-gap:8px;align-items:center;background-color:#3f51b5;background-color:var(--color-primary);border-radius:4px 4px 0 0;color:#fff;display:grid;gap:8px;grid-template-columns:1fr auto;justify-content:space-between;padding:8px 8px 8px 16px}.vm-popper-header__title{font-weight:700}.vm-block{background-color:#fff;background-color:var(--color-background-block);border-radius:8px;box-shadow:1px 2px 12px hsla(0,6%,6%,.08);padding:24px}.vm-block_empty-padding{padding:0}.vm-section-header{align-items:center;border-bottom:1px solid hsla(0,6%,6%,.15);border-radius:8px 8px 0 0;display:grid;grid-template-columns:1fr auto;justify-content:center;padding:0 24px}.vm-section-header__title{font-size:12px;font-weight:700}.vm-section-header__tabs{align-items:center;display:flex;font-size:10px;justify-content:flex-start}.vm-table{border-collapse:initial;border-spacing:0;margin-top:-24px;width:100%}.vm-table,.vm-table__row{background-color:#fff;background-color:var(--color-background-block)}.vm-table__row{transition:background-color .2s ease}.vm-table__row:hover:not(.vm-table__row_header){background-color:hsla(0,6%,6%,.05)}.vm-table__row_header{position:-webkit-sticky;position:sticky;top:0;z-index:2}.vm-table__row_selected{background-color:rgba(26,144,255,.05)}.vm-table-cell{border-bottom:1px solid hsla(0,6%,6%,.15);height:40px;padding:8px;vertical-align:middle}.vm-table-cell__content{align-items:center;display:flex;justify-content:flex-start}.vm-table-cell_sort{cursor:pointer}.vm-table-cell_sort:hover{background-color:hsla(0,6%,6%,.05)}.vm-table-cell_header{font-weight:700;text-align:left;text-transform:capitalize}.vm-table-cell_gray{color:hsla(0,6%,6%,.4)}.vm-table-cell_right{text-align:right}.vm-table-cell_right .vm-table-cell__content{justify-content:flex-end}.vm-table-cell_no-wrap{white-space:nowrap}.vm-table__sort-icon{align-items:center;display:flex;justify-content:center;margin:0 8px;opacity:.4;transition:opacity .2s ease,-webkit-transform .2s ease-in-out;transition:opacity .2s ease,transform .2s ease-in-out;transition:opacity .2s ease,transform .2s ease-in-out,-webkit-transform .2s ease-in-out;width:15px}.vm-table__sort-icon_active{opacity:1}.vm-table__sort-icon_desc{-webkit-transform:rotate(180deg);transform:rotate(180deg)}:root{--color-primary:#3f51b5;--color-secondary:#e91e63;--color-error:#fd080e;--color-warning:#ff8308;--color-info:#03a9f4;--color-success:#4caf50;--color-primary-text:#fff;--color-secondary-text:#fff;--color-error-text:#fff;--color-warning-text:#fff;--color-info-text:#fff;--color-success-text:#fff;--color-background-body:#fefeff;--color-background-block:#fff} \ No newline at end of file +.vm-tabs{gap:16px;height:100%;position:relative;-webkit-user-select:none;user-select:none}.vm-tabs,.vm-tabs-item{align-items:center;display:flex;justify-content:center}.vm-tabs-item{color:inherit;cursor:pointer;font-size:inherit;font-weight:inherit;opacity:.6;padding:16px 8px;text-decoration:none;text-transform:uppercase;transition:opacity .2s}.vm-tabs-item_active{opacity:1}.vm-tabs-item__icon{display:grid;margin-right:8px;width:15px}.vm-tabs-item__icon_single{margin-right:0}.vm-tabs__indicator{border-bottom:2px solid;position:absolute;transition:width .2s ease,left .3s cubic-bezier(.28,.84,.42,1)}.vm-alert{grid-gap:8px;align-items:center;background-color:var(--color-background-block);border-radius:8px;box-shadow:1px 2px 12px hsla(0,6%,6%,.08);color:#110f0f;display:grid;font-size:14px;font-weight:500;gap:8px;grid-template-columns:20px 1fr;line-height:20px;padding:16px;position:relative}.vm-alert:after{border-radius:8px;content:"";height:100%;left:0;opacity:.1;position:absolute;top:0;width:100%;z-index:1}.vm-alert__content,.vm-alert__icon{position:relative;z-index:2}.vm-alert__icon{align-items:center;display:flex;justify-content:center}.vm-alert__content{-webkit-filter:brightness(.6);filter:brightness(.6);white-space:pre-line}.vm-alert_success{color:var(--color-success)}.vm-alert_success:after{background-color:var(--color-success)}.vm-alert_error{color:var(--color-error)}.vm-alert_error:after{background-color:var(--color-error)}.vm-alert_info{color:var(--color-info)}.vm-alert_info:after{background-color:var(--color-info)}.vm-alert_warning{color:var(--color-warning)}.vm-alert_warning:after{background-color:var(--color-warning)}.vm-popper{background-color:var(--color-background-block);border-radius:4px;box-shadow:0 2px 8px 0 hsla(0,6%,6%,.2);opacity:0;pointer-events:none;position:fixed;transition:opacity .1s ease-in-out;z-index:-99}.vm-popper_open{-webkit-animation:scale .15s cubic-bezier(.28,.84,.42,1);animation:scale .15s cubic-bezier(.28,.84,.42,1);opacity:1;pointer-events:auto;z-index:101}.vm-popper_open_slider{-webkit-animation:slidePopper .3s cubic-bezier(.28,.84,.42,1.1);animation:slidePopper .3s cubic-bezier(.28,.84,.42,1.1);-webkit-transform-origin:top center;transform-origin:top center}.vm-button{align-items:center;border-radius:6px;color:#fff;cursor:pointer;display:flex;font-size:10px;font-weight:500;justify-content:center;line-height:15px;min-height:31px;padding:6px 14px;position:relative;text-transform:uppercase;-webkit-transform-style:preserve-3d;transform-style:preserve-3d;-webkit-user-select:none;user-select:none;white-space:nowrap}.vm-button:hover:after{background-color:hsla(0,6%,6%,.05)}.vm-button:after,.vm-button:before{border-radius:6px;content:"";height:100%;left:0;position:absolute;top:0;transition:background-color .2s ease;width:100%}.vm-button:before{-webkit-transform:translateZ(-2px);transform:translateZ(-2px)}.vm-button:after{background-color:transparent;-webkit-transform:translateZ(-1px);transform:translateZ(-1px)}.vm-button span{align-items:center;display:grid;justify-content:center}.vm-button span svg{width:15px}.vm-button__start-icon{margin-right:6px}.vm-button__end-icon{margin-left:6px}.vm-button_disabled{cursor:not-allowed;opacity:.3}.vm-button_icon{padding:6px 8px}.vm-button_icon .vm-button__end-icon,.vm-button_icon .vm-button__start-icon{margin:0}.vm-button_small{min-height:25px;padding:4px 6px}.vm-button_small span svg{width:13px}.vm-button_contained_primary{color:var(--color-primary-text)}.vm-button_contained_primary:before{background-color:var(--color-primary)}.vm-button_contained_primary:hover:after{background-color:hsla(0,6%,6%,.2)}.vm-button_contained_secondary{color:var(--color-secondary-text)}.vm-button_contained_secondary:before{background-color:var(--color-secondary)}.vm-button_contained_secondary:hover:after{background-color:hsla(0,6%,6%,.2)}.vm-button_contained_success{color:var(--color-success-text)}.vm-button_contained_success:before{background-color:var(--color-success)}.vm-button_contained_success:hover:after{background-color:hsla(0,6%,6%,.2)}.vm-button_contained_error{color:var(--color-error-text)}.vm-button_contained_error:before{background-color:var(--color-error)}.vm-button_contained_gray{color:hsla(0,6%,6%,.6)}.vm-button_contained_gray:before{background-color:hsla(0,6%,6%,.6)}.vm-button_contained_warning{color:var(--color-warning)}.vm-button_contained_warning:before{background-color:var(--color-warning);opacity:.2}.vm-button_text_primary{color:var(--color-primary)}.vm-button_text_secondary{color:var(--color-secondary)}.vm-button_text_success{color:var(--color-success)}.vm-button_text_error{color:var(--color-error)}.vm-button_text_gray{color:hsla(0,6%,6%,.6)}.vm-button_text_warning{color:var(--color-warning)}.vm-button_outlined_primary{border:1px solid var(--color-primary);color:var(--color-primary)}.vm-button_outlined_error{border:1px solid var(--color-error);color:var(--color-error)}.vm-button_outlined_secondary{border:1px solid var(--color-secondary);color:var(--color-secondary)}.vm-button_outlined_success{border:1px solid var(--color-success);color:var(--color-success)}.vm-button_outlined_gray{border:1px solid hsla(0,6%,6%,.6);color:hsla(0,6%,6%,.6)}.vm-button_outlined_warning{border:1px solid var(--color-warning);color:var(--color-warning)}.vm-execution-controls-buttons{border-radius:7px;display:flex;justify-content:space-between;min-width:107px}.vm-execution-controls-buttons__arrow{align-items:center;display:flex;justify-content:center;-webkit-transform:rotate(0);transform:rotate(0);transition:-webkit-transform .2s ease-in-out;transition:transform .2s ease-in-out;transition:transform .2s ease-in-out,-webkit-transform .2s ease-in-out}.vm-execution-controls-buttons__arrow_open{-webkit-transform:rotate(180deg);transform:rotate(180deg)}.vm-execution-controls-list{font-size:12px;max-height:208px;overflow:auto;padding:8px 0;width:124px}.vm-tooltip{-webkit-animation:vm-scale .15s cubic-bezier(.28,.84,.42,1);animation:vm-scale .15s cubic-bezier(.28,.84,.42,1);background-color:rgba(97,97,97,.92);border-radius:4px;box-shadow:0 2px 8px 0 hsla(0,6%,6%,.2);color:#fff;font-size:10px;line-height:150%;opacity:1;padding:3px 8px;pointer-events:auto;position:fixed;transition:opacity .1s ease-in-out;white-space:nowrap;z-index:101}@-webkit-keyframes vm-scale{0%{-webkit-transform:scale(0);transform:scale(0)}to{-webkit-transform:scale(1);transform:scale(1)}}@keyframes vm-scale{0%{-webkit-transform:scale(0);transform:scale(0)}to{-webkit-transform:scale(1);transform:scale(1)}}.vm-time-duration{font-size:12px;max-height:168px;overflow:auto}.vm-calendar{background-color:var(--color-background-block);border-radius:8px;display:grid;font-size:12px;grid-template-rows:auto 1fr auto;padding:16px;-webkit-user-select:none;user-select:none}.vm-calendar__tabs{border-top:1px solid hsla(0,6%,6%,.15);margin:16px -16px -16px}.vm-calendar-header{grid-gap:24px;align-items:center;display:grid;gap:24px;grid-template-columns:1fr auto;justify-content:center;min-height:36px;padding-bottom:16px}.vm-calendar-header-left{grid-gap:8px;align-items:center;cursor:pointer;display:grid;gap:8px;grid-template-columns:auto auto;justify-content:flex-start;transition:opacity .2s ease-in-out}.vm-calendar-header-left:hover{opacity:.8}.vm-calendar-header-left__date{color:#110f0f;font-size:12px;font-weight:700}.vm-calendar-header-left__select-year{align-items:center;display:grid;height:14px;justify-content:center;width:14px}.vm-calendar-header-left__select-year svg{width:100%}.vm-calendar-header-right{grid-gap:8px;align-items:center;display:grid;gap:8px;grid-template-columns:18px 18px;justify-content:center}.vm-calendar-header-right__next,.vm-calendar-header-right__prev{cursor:pointer;transition:opacity .2s ease-in-out}.vm-calendar-header-right__next:hover,.vm-calendar-header-right__prev:hover{opacity:.8}.vm-calendar-header-right__prev{-webkit-transform:rotate(90deg);transform:rotate(90deg)}.vm-calendar-header-right__next{-webkit-transform:rotate(-90deg);transform:rotate(-90deg)}.vm-calendar-body{grid-gap:2px;display:grid;gap:2px;grid-template-columns:repeat(7,32px);grid-template-rows:repeat(6,32px)}.vm-calendar-body,.vm-calendar-body-cell{align-items:center;justify-content:center}.vm-calendar-body-cell{border-radius:50%;display:flex;height:100%;text-align:center}.vm-calendar-body-cell_weekday{color:hsla(0,6%,6%,.6)}.vm-calendar-body-cell_day{cursor:pointer;transition:color .2s ease,background-color .3s ease-in-out}.vm-calendar-body-cell_day:hover{background-color:hsla(0,6%,6%,.05)}.vm-calendar-body-cell_day_empty{pointer-events:none}.vm-calendar-body-cell_day_active{color:#fff}.vm-calendar-body-cell_day_active,.vm-calendar-body-cell_day_active:hover{background-color:var(--color-primary)}.vm-calendar-body-cell_day_today{border:1px solid var(--color-primary)}.vm-calendar-years{grid-gap:8px;display:grid;gap:8px;grid-template-columns:repeat(3,1fr);overflow:auto}.vm-calendar-years__year{align-items:center;border-radius:8px;cursor:pointer;display:flex;justify-content:center;padding:8px 16px;transition:color .2s ease,background-color .3s ease-in-out}.vm-calendar-years__year:hover{background-color:hsla(0,6%,6%,.05)}.vm-calendar-years__year_selected{color:#fff}.vm-calendar-years__year_selected,.vm-calendar-years__year_selected:hover{background-color:var(--color-primary)}.vm-calendar-time-picker{align-items:center;display:flex;flex-direction:column;justify-content:center}.vm-calendar-time-picker-clock{border:1px solid hsla(0,6%,6%,.15);border-radius:50%;box-shadow:1px 2px 12px hsla(0,6%,6%,.08);box-sizing:initial;height:230px;position:relative;width:230px}.vm-calendar-time-picker-clock:after{background-color:var(--color-primary);border-radius:50%;content:"";height:6px;left:50%;position:absolute;top:50%;-webkit-transform:translate(-50%,-50%);transform:translate(-50%,-50%);width:6px}.vm-calendar-time-picker-clock__arrow{background-color:var(--color-primary);height:107px;left:114px;margin-top:8px;opacity:.8;position:absolute;top:0;-webkit-transform-origin:bottom;transform-origin:bottom;transition:-webkit-transform .2s ease-in-out;transition:transform .2s ease-in-out;transition:transform .2s ease-in-out,-webkit-transform .2s ease-in-out;width:2px;z-index:0}.vm-calendar-time-picker-clock__arrow_offset{height:73px;margin-top:42px;z-index:2}.vm-calendar-time-picker-clock__arrow:after{background-color:var(--color-primary);border-radius:50%;content:"";height:30px;left:50%;position:absolute;top:0;-webkit-transform:translateX(-50%);transform:translateX(-50%);width:30px}.vm-calendar-time-picker-clock__time{align-items:flex-start;cursor:pointer;display:flex;height:115px;justify-content:center;left:100px;padding-top:8px;position:absolute;text-align:center;top:0;-webkit-transform-origin:bottom;transform-origin:bottom;width:30px;z-index:1}.vm-calendar-time-picker-clock__time_hide{display:none}.vm-calendar-time-picker-clock__time_offset{height:73px;margin-top:42px;padding:0;z-index:2}.vm-calendar-time-picker-clock__time:hover span{background-color:hsla(0,6%,6%,.1)}.vm-calendar-time-picker-clock__time span{align-items:center;border-radius:50%;display:grid;justify-content:center;min-height:30px;min-width:30px;position:relative;-webkit-transform-origin:center;transform-origin:center;transition:background-color .3s ease}.vm-calendar-time-picker-fields{align-items:center;display:flex;justify-content:space-between;margin-top:16px}.vm-calendar-time-picker-fields span{margin:0 8px}.vm-calendar-time-picker-fields__input{border:1px solid #d8d8d8;border-radius:4px;font-size:14px;height:32px;padding:2px 8px;text-align:center;width:64px}.vm-calendar-time-picker-fields__input:focus{border-color:var(--color-primary)}.vm-time-selector{display:grid;grid-template-columns:repeat(2,230px);padding:16px 0}.vm-time-selector-left{border-right:1px solid hsla(0,6%,6%,.15);display:flex;flex-direction:column;gap:8px;padding:0 16px}.vm-time-selector-left-inputs{align-items:flex-start;display:grid;flex-grow:1;justify-content:stretch}.vm-time-selector-left-inputs__date{grid-gap:8px;align-items:center;border-bottom:1px solid hsla(0,6%,6%,.15);cursor:pointer;display:grid;gap:8px;grid-template-columns:1fr 14px;justify-content:center;margin-bottom:16px;padding-bottom:8px;transition:color .2s ease-in-out,border-bottom-color .3s ease}.vm-time-selector-left-inputs__date:hover{border-bottom-color:var(--color-primary)}.vm-time-selector-left-inputs__date:hover,.vm-time-selector-left-inputs__date:hover svg{color:var(--color-primary)}.vm-time-selector-left-inputs__date label{color:hsla(0,6%,6%,.6);font-size:10px;grid-column:1/3}.vm-time-selector-left-inputs__date svg{color:hsla(0,6%,6%,.6);transition:color .2s ease-in-out}.vm-time-selector-left__controls{grid-gap:8px;display:grid;gap:8px;grid-template-columns:repeat(2,1fr)}.vm-text-field{display:grid;margin:6px 0;position:relative;width:100%}.vm-text-field_textarea:after{content:attr(data-replicated-value) " ";visibility:hidden;white-space:pre-wrap}.vm-text-field:after,.vm-text-field__input{background-color:transparent;border:1px solid hsla(0,6%,6%,.15);font-size:12px;grid-area:1/1/2/2;line-height:18px;overflow:hidden;padding:8px 16px;width:100%}.vm-text-field__error,.vm-text-field__helper-text,.vm-text-field__label{-webkit-line-clamp:2;line-clamp:2;-webkit-box-orient:vertical;background-color:var(--color-background-block);display:-webkit-box;font-size:10px;left:8px;line-height:10px;max-width:calc(100% - 16px);overflow:hidden;padding:0 3px;pointer-events:none;position:absolute;text-overflow:ellipsis;-webkit-user-select:none;user-select:none;z-index:2}.vm-text-field__label{color:hsla(0,6%,6%,.6);top:-5px}.vm-text-field__error{color:var(--color-error);top:calc(100% - 5px)}.vm-text-field__helper-text{bottom:-5px;color:hsla(0,6%,6%,.6)}.vm-text-field__input{border-radius:4px;display:block;min-height:34px;overflow:hidden;resize:none;transition:border .2s ease}.vm-text-field__input:focus,.vm-text-field__input:hover{border:1px solid var(--color-primary)}.vm-text-field__input_error,.vm-text-field__input_error:focus,.vm-text-field__input_error:hover{border:1px solid var(--color-error)}.vm-text-field__input_icon-start{padding-left:42px}.vm-text-field__input:disabled{background-color:inherit;color:inherit}.vm-text-field__input:disabled:hover{border-color:hsla(0,6%,6%,.4)}.vm-text-field__icon-end,.vm-text-field__icon-start{align-items:center;color:hsla(0,6%,6%,.6);display:flex;height:100%;justify-content:center;left:8px;max-width:15px;position:absolute;top:auto}.vm-text-field__icon-end svg,.vm-text-field__icon-start svg{height:auto;width:100%}.vm-text-field__icon-end{left:auto;right:8px}.vm-modal{align-items:center;background:hsla(0,6%,6%,.55);bottom:0;display:flex;justify-content:center;left:0;position:fixed;right:0;top:0;z-index:100}.vm-modal-content{background:#fff;border-radius:4px;box-shadow:0 0 24px hsla(0,6%,6%,.07);padding:22px}.vm-modal-content-header{align-items:center;display:grid;grid-template-columns:1fr auto;margin-bottom:22px}.vm-modal-content-header__title{font-size:14px;font-weight:700}.vm-modal-content-header__close{align-items:center;box-sizing:initial;color:#fff;cursor:pointer;display:flex;justify-content:center;padding:10px;width:24px}.vm-modal-content-header__close svg{height:auto;width:100%}.vm-server-configurator{grid-gap:24px;align-items:center;display:grid;gap:24px;width:600px}.vm-server-configurator__footer{align-items:center;display:inline-grid;gap:8px;grid-template-columns:repeat(2,1fr);justify-content:flex-end;margin-left:auto;margin-right:0}.vm-limits-configurator-title{align-items:center;display:flex;font-size:12px;font-weight:700;justify-content:flex-start;margin-bottom:16px}.vm-limits-configurator-title__reset{align-items:center;display:flex;flex-grow:1;justify-content:flex-end}.vm-limits-configurator__inputs{grid-gap:16px;align-items:center;display:grid;gap:16px;grid-template-columns:repeat(3,1fr);justify-content:space-between}.vm-shortcuts{min-width:400px}.vm-shortcuts-section{margin-bottom:24px}.vm-shortcuts-section__title{border-bottom:1px solid hsla(0,6%,6%,.15);font-weight:700;margin-bottom:16px;padding:8px 0}.vm-shortcuts-section-list{grid-gap:16px;display:grid;gap:16px}.vm-shortcuts-section-list-item{grid-gap:8px;align-items:center;display:grid;gap:8px;grid-template-columns:180px 1fr}.vm-shortcuts-section-list-item__key{align-items:center;display:flex;gap:4px}.vm-shortcuts-section-list-item__key code{background-color:#fff;background-repeat:repeat-x;border:1px solid hsla(0,6%,6%,.15);border-radius:4px;color:#110f0f;display:inline-block;font-size:10px;line-height:2;padding:2px 8px 0;text-align:center}.vm-shortcuts-section-list-item__description{font-size:12px}.vm-header{align-items:center;display:flex;gap:48px;justify-content:flex-start;padding:8px 24px}.vm-header_app{padding:8px 0}.vm-header-logo{align-items:center;display:grid;justify-content:center}.vm-header-logo__icon{align-items:center;cursor:pointer;display:flex;margin-bottom:2px;position:relative;width:100%}.vm-header-logo__issue{color:inherit;cursor:pointer;font-size:10px;opacity:.4;text-align:center;text-decoration:underline;transition:opacity .2s;white-space:nowrap}.vm-header-logo__issue:hover{opacity:.8}.vm-header-nav{font-size:10px;font-weight:600}.vm-header__settings{align-items:center;display:flex;flex-grow:1;gap:8px;justify-content:flex-end}.vm-container{display:flex;flex-direction:column;min-height:calc(100vh - var(--scrollbar-height))}.vm-container-body{background-color:var(--color-background-body);flex-grow:1;min-height:100%;padding:24px}.vm-container-body_app{background-color:transparent;padding:8px 0}.uplot,.uplot *,.uplot :after,.uplot :before{box-sizing:border-box}.uplot{font-family: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;line-height:1.5;width:-webkit-min-content;width:min-content}.u-title{font-size:18px;font-weight:700;text-align:center}.u-wrap{position:relative;-webkit-user-select:none;user-select:none}.u-over,.u-under{position:absolute}.u-under{overflow:hidden}.uplot canvas{display:block;height:100%;position:relative;width:100%}.u-axis{position:absolute}.u-legend{margin:auto;text-align:center}.u-inline{display:block}.u-inline *{display:inline-block}.u-inline tr{margin-right:16px}.u-legend th{font-weight:600}.u-legend th>*{display:inline-block;vertical-align:middle}.u-legend .u-marker{background-clip:padding-box!important;height:1em;margin-right:4px;width:1em}.u-inline.u-live th:after{content:":";vertical-align:middle}.u-inline:not(.u-live) .u-value{display:none}.u-series>*{padding:4px}.u-series th{cursor:pointer}.u-legend .u-off>*{opacity:.3}.u-select{background:rgba(0,0,0,.07)}.u-cursor-x,.u-cursor-y,.u-select{pointer-events:none;position:absolute}.u-cursor-x,.u-cursor-y{left:0;top:0;will-change:transform;z-index:100}.u-hz .u-cursor-x,.u-vt .u-cursor-y{border-right:1px dashed #607d8b;height:100%}.u-hz .u-cursor-y,.u-vt .u-cursor-x{border-bottom:1px dashed #607d8b;width:100%}.u-cursor-pt{background-clip:padding-box!important;border:0 solid;border-radius:50%;left:0;pointer-events:none;position:absolute;top:0;will-change:transform;z-index:100}.u-axis.u-off,.u-cursor-pt.u-off,.u-cursor-x.u-off,.u-cursor-y.u-off,.u-select.u-off{display:none}.vm-line-chart{height:500px;pointer-events:auto}.vm-line-chart_panning{pointer-events:none}.vm-line-chart__u-plot{position:relative}.vm-chart-tooltip{grid-gap:16px;word-wrap:break-word;background:rgba(97,97,97,.92);border-radius:8px;color:#fff;display:grid;font-family:JetBrains Mono,monospace;font-size:10px;font-weight:400;gap:16px;line-height:150%;padding:8px;pointer-events:none;position:absolute;-webkit-user-select:text;user-select:text;width:300px;z-index:98}.vm-chart-tooltip_sticky{background-color:#616161;pointer-events:auto;z-index:99}.vm-chart-tooltip_moved{margin-left:-246.5px;margin-top:-20.5px;position:fixed}.vm-chart-tooltip-header{grid-gap:8px;align-items:center;display:grid;gap:8px;grid-template-columns:1fr 25px 25px;justify-content:center;min-height:25px}.vm-chart-tooltip-header__close{color:#fff}.vm-chart-tooltip-header__drag{color:#fff;cursor:move}.vm-chart-tooltip-data{grid-gap:8px;align-items:flex-start;display:grid;gap:8px;grid-template-columns:auto 1fr;line-height:12px;word-break:break-all}.vm-chart-tooltip-data__value{font-weight:700;padding:4px}.vm-chart-tooltip-data__marker{height:12px;width:12px}.vm-chart-tooltip-info{grid-gap:4px;display:grid}.vm-legend-item{grid-gap:8px;align-items:start;background-color:var(--color-background-block);cursor:pointer;display:grid;grid-template-columns:auto auto;justify-content:start;padding:8px 48px 8px 8px;transition:.2s ease}.vm-legend-item:hover{background-color:rgba(0,0,0,.1)}.vm-legend-item_hide{opacity:.5;text-decoration:line-through}.vm-legend-item__marker{border-radius:2px;box-sizing:border-box;height:14px;transition:.2s ease;width:14px}.vm-legend-item-info{font-weight:400}.vm-legend-item-info__free-fields{cursor:pointer;padding:3px}.vm-legend-item-info__free-fields:hover{text-decoration:underline}.vm-legend-item-info__free-fields:not(:last-child):after{content:","}.vm-legend{cursor:default;display:flex;flex-wrap:wrap;margin-top:24px;position:relative}.vm-legend-group{margin:0 16px 16px 0;min-width:23%}.vm-legend-group-title{align-items:center;border-bottom:1px solid hsla(0,6%,6%,.15);display:flex;margin-bottom:1px;padding:0 8px 8px}.vm-legend-group-title__count{font-weight:700;margin-right:8px}.vm-graph-view{width:100%}.vm-graph-view_full-width{width:calc(100vw - 96px - var(--scrollbar-width))}.vm-query-editor-autocomplete{max-height:300px;overflow:auto}.vm-additional-settings{align-items:center;display:inline-flex;flex-wrap:wrap;gap:24px;justify-content:flex-start}.vm-additional-settings__input{flex-basis:160px;margin-bottom:-6px}.vm-switch{align-items:center;cursor:pointer;display:flex;justify-content:flex-start}.vm-switch_disabled{cursor:default;opacity:.6}.vm-switch_secondary_active .vm-switch-track{background-color:var(--color-secondary)}.vm-switch_primary_active .vm-switch-track{background-color:var(--color-primary)}.vm-switch_active .vm-switch-track__thumb{left:20px}.vm-switch:hover .vm-switch-track{opacity:.8}.vm-switch-track{align-items:center;background-color:hsla(0,6%,6%,.4);border-radius:17px;display:flex;height:17px;justify-content:flex-start;padding:3px;position:relative;transition:background-color .2s ease,opacity .3s ease-out;width:34px}.vm-switch-track__thumb{background-color:var(--color-background-block);border-radius:50%;left:3px;min-height:11px;min-width:11px;position:absolute;top:auto;-webkit-transform-style:preserve-3d;transform-style:preserve-3d;transition:right .2s ease-out,left .2s ease-out}.vm-switch__label{color:inherit;font-size:inherit;margin-left:8px;transition:color .2s ease;white-space:nowrap}.vm-query-configurator{grid-gap:8px;display:grid;gap:8px}.vm-query-configurator-list{display:grid}.vm-query-configurator-list-row{grid-gap:8px;align-items:center;display:grid;gap:8px;grid-template-columns:1fr auto auto}.vm-query-configurator-list-row_disabled{-webkit-filter:grayscale(100%);filter:grayscale(100%);opacity:.5}.vm-query-configurator-list-row__button{display:grid;min-height:36px;width:36px}.vm-query-configurator-settings{align-items:flex-end;display:flex;gap:24px;justify-content:space-between}.vm-query-configurator-settings__buttons{grid-gap:8px;display:grid;gap:8px;grid-template-columns:repeat(2,auto)}.vm-json-view__copy{display:flex;justify-content:flex-end;position:-webkit-sticky;position:sticky;top:24px;z-index:2}.vm-json-view__code{font-size:12px;line-height:1.4;-webkit-transform:translateY(-32px);transform:translateY(-32px)}.vm-axes-limits{max-width:300px}.vm-axes-limits,.vm-axes-limits-list{grid-gap:16px;align-items:center;display:grid;gap:16px}.vm-axes-limits-list__inputs{grid-gap:8px;display:grid;gap:8px;grid-template-columns:repeat(2,120px)}.vm-graph-settings-popper{grid-gap:16px;display:grid;gap:16px;padding:0 0 16px}.vm-graph-settings-popper__body{grid-gap:8px;display:grid;gap:8px;padding:0 16px}.vm-spinner{align-items:center;-webkit-animation:vm-fade 2s cubic-bezier(.28,.84,.42,1.1);animation:vm-fade 2s cubic-bezier(.28,.84,.42,1.1);background-color:hsla(0,0%,100%,.5);bottom:0;display:flex;flex-direction:column;justify-content:center;left:0;pointer-events:none;position:fixed;right:0;top:0;z-index:99}.vm-spinner__message{color:hsla(0,6%,6%,.9);font-size:14px;line-height:1.3;margin-top:24px;text-align:center;white-space:pre-line}.half-circle-spinner,.half-circle-spinner *{box-sizing:border-box}.half-circle-spinner{border-radius:100%;height:60px;position:relative;width:60px}.half-circle-spinner .circle{border:6px solid transparent;border-radius:100%;content:"";height:100%;position:absolute;width:100%}.half-circle-spinner .circle.circle-1{-webkit-animation:half-circle-spinner-animation 1s infinite;animation:half-circle-spinner-animation 1s infinite;border-top-color:var(--color-primary)}.half-circle-spinner .circle.circle-2{-webkit-animation:half-circle-spinner-animation 1s infinite alternate;animation:half-circle-spinner-animation 1s infinite alternate;border-bottom-color:var(--color-primary)}@-webkit-keyframes half-circle-spinner-animation{0%{-webkit-transform:rotate(0deg);transform:rotate(0deg)}to{-webkit-transform:rotate(1turn);transform:rotate(1turn)}}@keyframes half-circle-spinner-animation{0%{-webkit-transform:rotate(0deg);transform:rotate(0deg)}to{-webkit-transform:rotate(1turn);transform:rotate(1turn)}}@-webkit-keyframes vm-fade{0%{opacity:0}to{opacity:1}}@keyframes vm-fade{0%{opacity:0}to{opacity:1}}.vm-tracings-view{grid-gap:24px;display:grid;gap:24px}.vm-tracings-view-trace-header{align-items:center;border-bottom:1px solid hsla(0,6%,6%,.15);display:flex;justify-content:space-between;padding:8px 8px 8px 24px}.vm-tracings-view-trace-header-title{flex-grow:1;font-size:14px;margin-right:8px}.vm-tracings-view-trace-header-title__query{font-weight:700}.vm-tracings-view-trace__nav{padding:24px 24px 24px 0}.vm-line-progress{grid-gap:8px;align-items:center;color:hsla(0,6%,6%,.6);display:grid;gap:8px;grid-template-columns:1fr auto;justify-content:center}.vm-line-progress-track{background-color:hsla(0,6%,6%,.05);border-radius:4px;height:20px;width:100%}.vm-line-progress-track__thumb{background-color:#1a90ff;border-radius:4px;height:100%}.vm-nested-nav{background-color:rgba(201,227,246,.4);border-radius:4px;margin-left:24px}.vm-nested-nav-header{grid-gap:8px;border-radius:4px;cursor:pointer;display:grid;gap:8px;grid-template-columns:auto 1fr;padding:8px;transition:background-color .2s ease-in-out}.vm-nested-nav-header:hover{background-color:hsla(0,6%,6%,.06)}.vm-nested-nav-header__icon{align-items:center;display:flex;justify-content:center;transition:-webkit-transform .2s ease-in-out;transition:transform .2s ease-in-out;transition:transform .2s ease-in-out,-webkit-transform .2s ease-in-out;width:20px}.vm-nested-nav-header__icon_open{-webkit-transform:rotate(180deg);transform:rotate(180deg)}.vm-nested-nav-header__message,.vm-nested-nav-header__progress{grid-column:2}.vm-nested-nav-header__duration{color:hsla(0,6%,6%,.6);grid-column:2}.vm-json-form{grid-gap:16px;display:grid;gap:16px;grid-template-rows:auto calc(90vh - 150px) auto;max-height:900px;max-width:1000px;width:70vw}.vm-json-form_one-field{grid-template-rows:calc(90vh - 150px) auto}.vm-json-form textarea{height:100%;overflow:auto;width:100%}.vm-json-form-footer{align-items:center;display:flex;gap:8px;justify-content:space-between}.vm-json-form-footer__controls{align-items:center;display:flex;flex-grow:1;gap:8px;justify-content:flex-start}.vm-json-form-footer__controls_right{display:grid;grid-template-columns:repeat(2,90px);justify-content:flex-end}.vm-table-settings-popper{display:grid;min-width:250px}.vm-table-settings-popper-list{grid-gap:8px;border-bottom:1px solid hsla(0,6%,6%,.15);display:grid;gap:8px;max-height:350px;overflow:auto;padding:16px}.vm-table-settings-popper-list-header{align-items:center;display:grid;grid-template-columns:1fr auto;justify-content:space-between;min-height:25px}.vm-table-settings-popper-list-header__title{font-weight:700}.vm-table-settings-popper-list__item{font-size:12px;text-transform:capitalize}.vm-checkbox{align-items:center;cursor:pointer;display:flex;justify-content:flex-start;-webkit-user-select:none;user-select:none}.vm-checkbox_disabled{cursor:default;opacity:.6}.vm-checkbox_secondary_active .vm-checkbox-track{background-color:var(--color-secondary)}.vm-checkbox_secondary .vm-checkbox-track{border:1px solid var(--color-secondary)}.vm-checkbox_primary_active .vm-checkbox-track{background-color:var(--color-primary)}.vm-checkbox_primary .vm-checkbox-track{border:1px solid var(--color-primary)}.vm-checkbox_active .vm-checkbox-track__thumb{-webkit-transform:scale(1);transform:scale(1)}.vm-checkbox:hover .vm-checkbox-track{opacity:.8}.vm-checkbox-track{align-items:center;background-color:transparent;border-radius:4px;display:flex;height:16px;justify-content:center;padding:2px;position:relative;transition:background-color .2s ease,opacity .3s ease-out;width:16px}.vm-checkbox-track__thumb{align-items:center;color:#fff;display:grid;height:12px;justify-content:center;-webkit-transform:scale(0);transform:scale(0);transition:-webkit-transform .1s ease-in-out;transition:transform .1s ease-in-out;transition:transform .1s ease-in-out,-webkit-transform .1s ease-in-out;width:12px}.vm-checkbox-track__thumb svg{width:100%}.vm-checkbox__label{color:inherit;font-size:inherit;margin-left:8px;transition:color .2s ease;white-space:nowrap}.vm-custom-panel{grid-gap:24px;align-items:flex-start;display:grid;gap:24px;grid-template-columns:100%;height:100%}.vm-custom-panel__warning{align-items:center;display:grid;grid-template-columns:1fr auto;justify-content:space-between}.vm-custom-panel-body{position:relative}.vm-custom-panel-body-header{align-items:center;border-bottom:1px solid hsla(0,6%,6%,.15);display:flex;font-size:10px;justify-content:space-between;margin:-24px -24px 24px;padding:0 24px;position:relative;z-index:1}.vm-table-view{margin-top:-24px;max-width:100%;overflow:auto}.vm-table-view table{margin-top:0}.vm-predefined-panel-header{grid-gap:8px;align-items:center;border-bottom:1px solid hsla(0,6%,6%,.15);display:grid;gap:8px;grid-template-columns:auto 1fr 160px auto;justify-content:flex-start;padding:8px 16px}.vm-predefined-panel-header__description{line-height:1.3;white-space:pre-wrap}.vm-predefined-panel-header__description ol,.vm-predefined-panel-header__description ul{list-style-position:inside}.vm-predefined-panel-header__description a{color:#c9e3f6;text-decoration:underline}.vm-predefined-panel-header__info{align-items:center;color:var(--color-primary);display:flex;justify-content:center;width:18px}.vm-predefined-panel-body{padding:8px 16px}.vm-accordion-header{align-items:center;cursor:pointer;display:grid;font-size:inherit;position:relative}.vm-accordion-header__arrow{align-items:center;display:flex;justify-content:center;position:absolute;right:14px;top:auto;-webkit-transform:rotate(0);transform:rotate(0);transition:-webkit-transform .2s ease-in-out;transition:transform .2s ease-in-out;transition:transform .2s ease-in-out,-webkit-transform .2s ease-in-out}.vm-accordion-header__arrow_open{-webkit-transform:rotate(180deg);transform:rotate(180deg)}.vm-accordion-header__arrow svg{height:auto;width:14px}.accordion-section{overflow:hidden}.vm-predefined-dashboard{background-color:transparent}.vm-predefined-dashboard-header{align-items:center;border-radius:4px;box-shadow:1px 2px 12px hsla(0,6%,6%,.08);display:grid;font-weight:700;grid-template-columns:1fr auto;justify-content:space-between;line-height:14px;overflow:hidden;padding:16px;position:relative;-webkit-transform-style:preserve-3d;transform-style:preserve-3d;transition:box-shadow .2s ease-in-out}.vm-predefined-dashboard-header_open{border-radius:4px 4px 0 0;box-shadow:none}.vm-predefined-dashboard-header__title{font-size:12px}.vm-predefined-dashboard-header__count{font-size:10px;grid-column:2;margin-right:30px}.vm-predefined-dashboard-panels{grid-gap:16px;display:grid;gap:16px;grid-template-columns:repeat(12,1fr);padding:0}.vm-predefined-dashboard-panels-panel{border-radius:8px;overflow:hidden;position:relative}.vm-predefined-dashboard-panels-panel:hover .vm-predefined-dashboard-panels-panel__resizer{-webkit-transform:scale(1);transform:scale(1)}.vm-predefined-dashboard-panels-panel__resizer{bottom:0;cursor:se-resize;height:20px;position:absolute;right:0;-webkit-transform:scale(0);transform:scale(0);transition:-webkit-transform .2s ease-in-out;transition:transform .2s ease-in-out;transition:transform .2s ease-in-out,-webkit-transform .2s ease-in-out;width:20px;z-index:1}.vm-predefined-dashboard-panels-panel__resizer:after{border-bottom:2px solid hsla(0,6%,6%,.2);border-right:2px solid hsla(0,6%,6%,.2);bottom:5px;content:"";height:5px;position:absolute;right:5px;width:5px}.vm-predefined-dashboard-panels-panel__alert{grid-column:span 12}.vm-predefined-panels{grid-gap:16px;align-items:flex-start;display:grid;gap:16px}.vm-predefined-panels-tabs{align-items:center;display:flex;font-size:10px;justify-content:flex-start;overflow:hidden}.vm-predefined-panels-tabs__tab{border-right:1px solid hsla(0,6%,6%,.15);cursor:pointer;padding:16px;text-transform:uppercase;transition:opacity .2s ease-in-out,color .15s ease-in}.vm-predefined-panels-tabs__tab:hover{opacity:1}.vm-predefined-panels__dashboards{grid-gap:16px;display:grid;gap:16px}.vm-cardinality-configurator{grid-gap:8px;display:grid;gap:8px}.vm-cardinality-configurator-controls{align-items:center;display:flex;flex-wrap:wrap;gap:0 24px;justify-content:flex-start}.vm-cardinality-configurator-controls__query{flex-grow:1}.vm-cardinality-configurator-bottom{grid-gap:24px;align-items:flex-end;display:grid;gap:24px;grid-template-columns:1fr auto}.vm-cardinality-configurator-bottom__info{font-size:12px}.u-legend{color:#110f0f;font-family:Lato,sans-serif;font-size:14px}.u-legend .u-thead{display:none}.u-legend .u-series{display:flex;gap:8px}.u-legend .u-series th{display:none}.u-legend .u-series td:nth-child(2):after{content:":";margin-left:8px}.u-legend .u-series .u-value{display:block;padding:0;text-align:left}.vm-metrics-content-header{margin:-24px -24px 24px}.vm-cardinality-panel{grid-gap:24px;align-items:flex-start;display:grid;gap:24px}.vm-top-queries-panel-header{margin:-24px -24px 24px}.vm-top-queries{grid-gap:24px;align-items:flex-start;display:grid;gap:24px}.vm-top-queries-controls{grid-gap:8px;display:grid;gap:8px}.vm-top-queries-controls-bottom,.vm-top-queries-controls__fields{grid-gap:24px;display:grid;gap:24px;grid-template-columns:1fr auto}.vm-top-queries-controls-bottom{align-items:flex-end;justify-content:space-between}.vm-top-queries-controls-bottom__button{align-items:center;display:flex;justify-content:flex-end}.vm-top-queries-panels{grid-gap:24px;display:grid;gap:24px}.vm-trace-page{display:flex;flex-direction:column;min-height:100%;padding:16px}.vm-trace-page-controls{grid-gap:16px;align-items:center;display:grid;gap:16px;grid-template-columns:1fr 1fr;justify-content:center}.vm-trace-page-header{grid-gap:16px;align-items:start;display:grid;gap:16px;grid-template-columns:1fr auto;margin-bottom:24px}.vm-trace-page-header-errors{grid-gap:24px;align-items:flex-start;display:grid;gap:24px;grid-template-columns:1fr;justify-content:stretch}.vm-trace-page-header-errors-item{align-items:center;display:grid;justify-content:stretch;position:relative}.vm-trace-page-header-errors-item__filename{min-height:20px}.vm-trace-page-header-errors-item__close{position:absolute;right:8px;top:auto;z-index:2}.vm-trace-page-preview{align-items:center;display:flex;flex-direction:column;flex-grow:1;justify-content:center}.vm-trace-page-preview__text{font-size:14px;line-height:1.8;margin-bottom:8px;text-align:center;white-space:pre-line}#root,body,html{background-attachment:fixed;background-repeat:no-repeat;color:#110f0f;cursor:default;font-family:Lato,sans-serif;font-size:12px;margin:0;min-height:100%}body{overflow:scroll}*{cursor:inherit;font:inherit}code{font-family:JetBrains Mono,monospace}b{font-weight:700}input,textarea{cursor:text}input[type=number]::-webkit-inner-spin-button,input[type=number]::-webkit-outer-spin-button{-webkit-appearance:none;margin:0}.vm-snackbar{bottom:16px;left:16px;position:fixed;z-index:999}a,abbr,acronym,address,applet,article,aside,audio,big,body,canvas,caption,center,cite,code,del,details,dfn,div,em,embed,fieldset,figcaption,figure,footer,form,h1,h2,h3,h4,h5,h6,header,hgroup,html,iframe,img,ins,kbd,label,legend,li,mark,menu,nav,object,ol,output,p,pre,q,ruby,s,samp,section,small,span,strike,strong,sub,summary,sup,table,tbody,td,tfoot,th,thead,time,tr,tt,u,ul,var,video{border:0;margin:0;padding:0;vertical-align:initial}h1,h2,h3,h4,h5,h6{font-weight:400}article,aside,details,figcaption,figure,footer,header,hgroup,menu,nav,section{display:block}body{line-height:1}q:after,q:before{content:""}table{border-collapse:collapse;border-spacing:0}input::-webkit-input-placeholder{opacity:1;-webkit-transition:opacity .3s ease;transition:opacity .3s ease}input::placeholder{opacity:1;transition:opacity .3s ease}input:focus::-webkit-input-placeholder{opacity:0;-webkit-transition:opacity .3s ease;transition:opacity .3s ease}input:focus::placeholder{opacity:0;transition:opacity .3s ease}*{box-sizing:border-box;outline:none}button{background:none;border:none;border-radius:0;padding:0}strong{letter-spacing:1px}input[type=file]{cursor:pointer;font-size:0;height:100%;left:0;opacity:0;position:absolute;top:0;width:100%}input[type=file]:disabled{cursor:not-allowed}a{color:inherit;text-decoration:inherit}input,textarea{-webkit-text-fill-color:inherit;appearance:none;-webkit-appearance:none}input:disabled,textarea:disabled{opacity:1!important}input:placeholder-shown,textarea:placeholder-shown{width:100%}input:-webkit-autofill,input:-webkit-autofill:active,input:-webkit-autofill:focus,input:-webkit-autofill:hover{-webkit-box-shadow:inset 0 0 0 0 #fff!important;width:100%;z-index:2}.vm-header-button{border:1px solid hsla(0,6%,6%,.2)}.vm-list__item{background-color:transparent;cursor:pointer;padding:12px 16px;transition:background-color .2s ease}.vm-list__item:hover,.vm-list__item_active{background-color:hsla(0,6%,6%,.1)}.vm-popper-header{grid-gap:8px;align-items:center;background-color:#3f51b5;background-color:var(--color-primary);border-radius:4px 4px 0 0;color:#fff;display:grid;gap:8px;grid-template-columns:1fr auto;justify-content:space-between;padding:8px 8px 8px 16px}.vm-popper-header__title{font-weight:700}.vm-block{background-color:#fff;background-color:var(--color-background-block);border-radius:8px;box-shadow:1px 2px 12px hsla(0,6%,6%,.08);padding:24px}.vm-block_empty-padding{padding:0}.vm-section-header{align-items:center;border-bottom:1px solid hsla(0,6%,6%,.15);border-radius:8px 8px 0 0;display:grid;grid-template-columns:1fr auto;justify-content:center;padding:0 24px}.vm-section-header__title{font-size:12px;font-weight:700}.vm-section-header__tabs{align-items:center;display:flex;font-size:10px;justify-content:flex-start}.vm-table{border-collapse:initial;border-spacing:0;margin-top:-24px;width:100%}.vm-table,.vm-table__row{background-color:#fff;background-color:var(--color-background-block)}.vm-table__row{transition:background-color .2s ease}.vm-table__row:hover:not(.vm-table__row_header){background-color:hsla(0,6%,6%,.05)}.vm-table__row_header{position:-webkit-sticky;position:sticky;top:0;z-index:2}.vm-table__row_selected{background-color:rgba(26,144,255,.05)}.vm-table-cell{border-bottom:1px solid hsla(0,6%,6%,.15);height:40px;padding:8px;vertical-align:middle}.vm-table-cell__content{align-items:center;display:flex;justify-content:flex-start}.vm-table-cell_sort{cursor:pointer}.vm-table-cell_sort:hover{background-color:hsla(0,6%,6%,.05)}.vm-table-cell_header{font-weight:700;text-align:left;text-transform:capitalize}.vm-table-cell_gray{color:hsla(0,6%,6%,.4)}.vm-table-cell_right{text-align:right}.vm-table-cell_right .vm-table-cell__content{justify-content:flex-end}.vm-table-cell_no-wrap{white-space:nowrap}.vm-table__sort-icon{align-items:center;display:flex;justify-content:center;margin:0 8px;opacity:.4;transition:opacity .2s ease,-webkit-transform .2s ease-in-out;transition:opacity .2s ease,transform .2s ease-in-out;transition:opacity .2s ease,transform .2s ease-in-out,-webkit-transform .2s ease-in-out;width:15px}.vm-table__sort-icon_active{opacity:1}.vm-table__sort-icon_desc{-webkit-transform:rotate(180deg);transform:rotate(180deg)}:root{--color-primary:#3f51b5;--color-secondary:#e91e63;--color-error:#fd080e;--color-warning:#ff8308;--color-info:#03a9f4;--color-success:#4caf50;--color-primary-text:#fff;--color-secondary-text:#fff;--color-error-text:#fff;--color-warning-text:#fff;--color-info-text:#fff;--color-success-text:#fff;--color-background-body:#fefeff;--color-background-block:#fff} \ No newline at end of file diff --git a/app/vmselect/vmui/static/js/main.a09b3097.js b/app/vmselect/vmui/static/js/main.a09b3097.js deleted file mode 100644 index 9b8792a25..000000000 --- a/app/vmselect/vmui/static/js/main.a09b3097.js +++ /dev/null @@ -1,2 +0,0 @@ -/*! For license information please see main.a09b3097.js.LICENSE.txt */ -!function(){var e={680:function(e,t,n){"use strict";var r=n(476),i=n(962),o=i(r("String.prototype.indexOf"));e.exports=function(e,t){var n=r(e,!!t);return"function"===typeof n&&o(e,".prototype.")>-1?i(n):n}},962:function(e,t,n){"use strict";var r=n(199),i=n(476),o=i("%Function.prototype.apply%"),a=i("%Function.prototype.call%"),u=i("%Reflect.apply%",!0)||r.call(a,o),l=i("%Object.getOwnPropertyDescriptor%",!0),c=i("%Object.defineProperty%",!0),s=i("%Math.max%");if(c)try{c({},"a",{value:1})}catch(d){c=null}e.exports=function(e){var t=u(r,a,arguments);if(l&&c){var n=l(t,"length");n.configurable&&c(t,"length",{value:1+s(0,e.length-(arguments.length-1))})}return t};var f=function(){return u(r,o,arguments)};c?c(e.exports,"apply",{value:f}):e.exports.apply=f},123:function(e,t){var n;!function(){"use strict";var r={}.hasOwnProperty;function i(){for(var e=[],t=0;t=t?e:""+Array(t+1-r.length).join(n)+e},g={s:y,z:function(e){var t=-e.utcOffset(),n=Math.abs(t),r=Math.floor(n/60),i=n%60;return(t<=0?"+":"-")+y(r,2,"0")+":"+y(i,2,"0")},m:function e(t,n){if(t.date()1)return e(a[0])}else{var u=t.name;b[u]=t,i=u}return!r&&i&&(_=i),i||!r&&_},x=function(e,t){if(D(e))return e.clone();var n="object"==typeof t?t:{};return n.date=e,n.args=arguments,new C(n)},k=g;k.l=w,k.i=D,k.w=function(e,t){return x(e,{locale:t.$L,utc:t.$u,x:t.$x,$offset:t.$offset})};var C=function(){function m(e){this.$L=w(e.locale,null,!0),this.parse(e)}var y=m.prototype;return y.parse=function(e){this.$d=function(e){var t=e.date,n=e.utc;if(null===t)return new Date(NaN);if(k.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 i=r[2]-1||0,o=(r[7]||"0").substring(0,3);return n?new Date(Date.UTC(r[1],i,r[3]||1,r[4]||0,r[5]||0,r[6]||0,o)):new Date(r[1],i,r[3]||1,r[4]||0,r[5]||0,r[6]||0,o)}}return new Date(t)}(e),this.$x=e.x||{},this.init()},y.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()},y.$utils=function(){return k},y.isValid=function(){return!(this.$d.toString()===h)},y.isSame=function(e,t){var n=x(e);return this.startOf(t)<=n&&n<=this.endOf(t)},y.isAfter=function(e,t){return x(e)1&&"boolean"!==typeof t)throw new a('"allowMissing" argument must be a boolean');if(null===k(/^%?[^%]*%?$/,e))throw new i("`%` may not be present anywhere but at the beginning and end of the intrinsic name");var n=S(e),r=n.length>0?n[0]:"",o=A("%"+r+"%",t),u=o.name,c=o.value,s=!1,f=o.alias;f&&(r=f[0],D(n,b([0,1],f)));for(var d=1,h=!0;d=n.length){var g=l(c,p);c=(h=!!g)&&"get"in g&&!("originalValue"in g.get)?g.get:c[p]}else h=_(c,p),c=c[p];h&&!s&&(v[u]=c)}}return c}},520:function(e,t,n){"use strict";var r="undefined"!==typeof Symbol&&Symbol,i=n(541);e.exports=function(){return"function"===typeof r&&("function"===typeof Symbol&&("symbol"===typeof r("foo")&&("symbol"===typeof Symbol("bar")&&i())))}},541:function(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 i=Object.getOwnPropertyDescriptor(e,t);if(42!==i.value||!0!==i.enumerable)return!1}return!0}},838:function(e,t,n){"use strict";var r=n(199);e.exports=r.call(Function.call,Object.prototype.hasOwnProperty)},936:function(e,t,n){var r=/^\s+|\s+$/g,i=/^[-+]0x[0-9a-f]+$/i,o=/^0b[01]+$/i,a=/^0o[0-7]+$/i,u=parseInt,l="object"==typeof n.g&&n.g&&n.g.Object===Object&&n.g,c="object"==typeof self&&self&&self.Object===Object&&self,s=l||c||Function("return this")(),f=Object.prototype.toString,d=Math.max,h=Math.min,p=function(){return s.Date.now()};function v(e){var t=typeof e;return!!e&&("object"==t||"function"==t)}function m(e){if("number"==typeof e)return e;if(function(e){return"symbol"==typeof e||function(e){return!!e&&"object"==typeof e}(e)&&"[object Symbol]"==f.call(e)}(e))return NaN;if(v(e)){var t="function"==typeof e.valueOf?e.valueOf():e;e=v(t)?t+"":t}if("string"!=typeof e)return 0===e?e:+e;e=e.replace(r,"");var n=o.test(e);return n||a.test(e)?u(e.slice(2),n?2:8):i.test(e)?NaN:+e}e.exports=function(e,t,n){var r,i,o,a,u,l,c=0,s=!1,f=!1,y=!0;if("function"!=typeof e)throw new TypeError("Expected a function");function g(t){var n=r,o=i;return r=i=void 0,c=t,a=e.apply(o,n)}function _(e){return c=e,u=setTimeout(D,t),s?g(e):a}function b(e){var n=e-l;return void 0===l||n>=t||n<0||f&&e-c>=o}function D(){var e=p();if(b(e))return w(e);u=setTimeout(D,function(e){var n=t-(e-l);return f?h(n,o-(e-c)):n}(e))}function w(e){return u=void 0,y&&r?g(e):(r=i=void 0,a)}function x(){var e=p(),n=b(e);if(r=arguments,i=this,l=e,n){if(void 0===u)return _(l);if(f)return u=setTimeout(D,t),g(l)}return void 0===u&&(u=setTimeout(D,t)),a}return t=m(t)||0,v(n)&&(s=!!n.leading,o=(f="maxWait"in n)?d(m(n.maxWait)||0,t):o,y="trailing"in n?!!n.trailing:y),x.cancel=function(){void 0!==u&&clearTimeout(u),c=0,r=l=i=u=void 0},x.flush=function(){return void 0===u?a:w(p())},x}},7:function(e,t,n){var r="__lodash_hash_undefined__",i="[object Function]",o="[object GeneratorFunction]",a=/\.|\[(?:[^[\]]*|(["'])(?:(?!\1)[^\\]|\\.)*?\1)\]/,u=/^\w*$/,l=/^\./,c=/[^.[\]]+|\[(?:(-?\d+(?:\.\d+)?)|(["'])((?:(?!\2)[^\\]|\\.)*?)\2)\]|(?=(?:\.|\[\])(?:\.|\[\]|$))/g,s=/\\(\\)?/g,f=/^\[object .+?Constructor\]$/,d="object"==typeof n.g&&n.g&&n.g.Object===Object&&n.g,h="object"==typeof self&&self&&self.Object===Object&&self,p=d||h||Function("return this")();var v=Array.prototype,m=Function.prototype,y=Object.prototype,g=p["__core-js_shared__"],_=function(){var e=/[^.]+$/.exec(g&&g.keys&&g.keys.IE_PROTO||"");return e?"Symbol(src)_1."+e:""}(),b=m.toString,D=y.hasOwnProperty,w=y.toString,x=RegExp("^"+b.call(D).replace(/[\\^$.*+?()[\]{}|]/g,"\\$&").replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g,"$1.*?")+"$"),k=p.Symbol,C=v.splice,E=I(p,"Map"),S=I(Object,"create"),A=k?k.prototype:void 0,F=A?A.toString:void 0;function N(e){var t=-1,n=e?e.length:0;for(this.clear();++t-1},O.prototype.set=function(e,t){var n=this.__data__,r=B(n,e);return r<0?n.push([e,t]):n[r][1]=t,this},T.prototype.clear=function(){this.__data__={hash:new N,map:new(E||O),string:new N}},T.prototype.delete=function(e){return P(this,e).delete(e)},T.prototype.get=function(e){return P(this,e).get(e)},T.prototype.has=function(e){return P(this,e).has(e)},T.prototype.set=function(e,t){return P(this,e).set(e,t),this};var $=j((function(e){var t;e=null==(t=e)?"":function(e){if("string"==typeof e)return e;if(H(e))return F?F.call(e):"";var t=e+"";return"0"==t&&1/e==-1/0?"-0":t}(t);var n=[];return l.test(e)&&n.push(""),e.replace(c,(function(e,t,r,i){n.push(r?i.replace(s,"$1"):t||e)})),n}));function R(e){if("string"==typeof e||H(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 n(){var r=arguments,i=t?t.apply(this,r):r[0],o=n.cache;if(o.has(i))return o.get(i);var a=e.apply(this,r);return n.cache=o.set(i,a),a};return n.cache=new(j.Cache||T),n}j.Cache=T;var z=Array.isArray;function U(e){var t=typeof e;return!!e&&("object"==t||"function"==t)}function H(e){return"symbol"==typeof e||function(e){return!!e&&"object"==typeof e}(e)&&"[object Symbol]"==w.call(e)}e.exports=function(e,t,n){var r=null==e?void 0:M(e,t);return void 0===r?n:r}},61:function(e,t,n){var r="Expected a function",i=/^\s+|\s+$/g,o=/^[-+]0x[0-9a-f]+$/i,a=/^0b[01]+$/i,u=/^0o[0-7]+$/i,l=parseInt,c="object"==typeof n.g&&n.g&&n.g.Object===Object&&n.g,s="object"==typeof self&&self&&self.Object===Object&&self,f=c||s||Function("return this")(),d=Object.prototype.toString,h=Math.max,p=Math.min,v=function(){return f.Date.now()};function m(e,t,n){var i,o,a,u,l,c,s=0,f=!1,d=!1,m=!0;if("function"!=typeof e)throw new TypeError(r);function _(t){var n=i,r=o;return i=o=void 0,s=t,u=e.apply(r,n)}function b(e){return s=e,l=setTimeout(w,t),f?_(e):u}function D(e){var n=e-c;return void 0===c||n>=t||n<0||d&&e-s>=a}function w(){var e=v();if(D(e))return x(e);l=setTimeout(w,function(e){var n=t-(e-c);return d?p(n,a-(e-s)):n}(e))}function x(e){return l=void 0,m&&i?_(e):(i=o=void 0,u)}function k(){var e=v(),n=D(e);if(i=arguments,o=this,c=e,n){if(void 0===l)return b(c);if(d)return l=setTimeout(w,t),_(c)}return void 0===l&&(l=setTimeout(w,t)),u}return t=g(t)||0,y(n)&&(f=!!n.leading,a=(d="maxWait"in n)?h(g(n.maxWait)||0,t):a,m="trailing"in n?!!n.trailing:m),k.cancel=function(){void 0!==l&&clearTimeout(l),s=0,i=c=o=l=void 0},k.flush=function(){return void 0===l?u:x(v())},k}function y(e){var t=typeof e;return!!e&&("object"==t||"function"==t)}function g(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(y(e)){var t="function"==typeof e.valueOf?e.valueOf():e;e=y(t)?t+"":t}if("string"!=typeof e)return 0===e?e:+e;e=e.replace(i,"");var n=a.test(e);return n||u.test(e)?l(e.slice(2),n?2:8):o.test(e)?NaN:+e}e.exports=function(e,t,n){var i=!0,o=!0;if("function"!=typeof e)throw new TypeError(r);return y(n)&&(i="leading"in n?!!n.leading:i,o="trailing"in n?!!n.trailing:o),m(e,t,{leading:i,maxWait:t,trailing:o})}},154:function(e,t,n){var r="function"===typeof Map&&Map.prototype,i=Object.getOwnPropertyDescriptor&&r?Object.getOwnPropertyDescriptor(Map.prototype,"size"):null,o=r&&i&&"function"===typeof i.get?i.get:null,a=r&&Map.prototype.forEach,u="function"===typeof Set&&Set.prototype,l=Object.getOwnPropertyDescriptor&&u?Object.getOwnPropertyDescriptor(Set.prototype,"size"):null,c=u&&l&&"function"===typeof l.get?l.get:null,s=u&&Set.prototype.forEach,f="function"===typeof WeakMap&&WeakMap.prototype?WeakMap.prototype.has:null,d="function"===typeof WeakSet&&WeakSet.prototype?WeakSet.prototype.has:null,h="function"===typeof WeakRef&&WeakRef.prototype?WeakRef.prototype.deref:null,p=Boolean.prototype.valueOf,v=Object.prototype.toString,m=Function.prototype.toString,y=String.prototype.match,g=String.prototype.slice,_=String.prototype.replace,b=String.prototype.toUpperCase,D=String.prototype.toLowerCase,w=RegExp.prototype.test,x=Array.prototype.concat,k=Array.prototype.join,C=Array.prototype.slice,E=Math.floor,S="function"===typeof BigInt?BigInt.prototype.valueOf:null,A=Object.getOwnPropertySymbols,F="function"===typeof Symbol&&"symbol"===typeof Symbol.iterator?Symbol.prototype.toString:null,N="function"===typeof Symbol&&"object"===typeof Symbol.iterator,O="function"===typeof Symbol&&Symbol.toStringTag&&(typeof Symbol.toStringTag===N||"symbol")?Symbol.toStringTag:null,T=Object.prototype.propertyIsEnumerable,B=("function"===typeof Reflect?Reflect.getPrototypeOf:Object.getPrototypeOf)||([].__proto__===Array.prototype?function(e){return e.__proto__}:null);function M(e,t){if(e===1/0||e===-1/0||e!==e||e&&e>-1e3&&e<1e3||w.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 i=String(r),o=g.call(t,i.length+1);return _.call(i,n,"$&_")+"."+_.call(_.call(o,/([0-9]{3})/g,"$&_"),/_$/,"")}}return _.call(t,n,"$&_")}var L=n(654),P=L.custom,I=U(P)?P:null;function $(e,t,n){var r="double"===(n.quoteStyle||t)?'"':"'";return r+e+r}function R(e){return _.call(String(e),/"/g,""")}function j(e){return"[object Array]"===Y(e)&&(!O||!("object"===typeof e&&O in e))}function z(e){return"[object RegExp]"===Y(e)&&(!O||!("object"===typeof e&&O in e))}function U(e){if(N)return e&&"object"===typeof e&&e instanceof Symbol;if("symbol"===typeof e)return!0;if(!e||"object"!==typeof e||!F)return!1;try{return F.call(e),!0}catch(t){}return!1}e.exports=function e(t,n,r,i){var u=n||{};if(V(u,"quoteStyle")&&"single"!==u.quoteStyle&&"double"!==u.quoteStyle)throw new TypeError('option "quoteStyle" must be "single" or "double"');if(V(u,"maxStringLength")&&("number"===typeof u.maxStringLength?u.maxStringLength<0&&u.maxStringLength!==1/0:null!==u.maxStringLength))throw new TypeError('option "maxStringLength", if provided, must be a positive integer, Infinity, or `null`');var l=!V(u,"customInspect")||u.customInspect;if("boolean"!==typeof l&&"symbol"!==l)throw new TypeError("option \"customInspect\", if provided, must be `true`, `false`, or `'symbol'`");if(V(u,"indent")&&null!==u.indent&&"\t"!==u.indent&&!(parseInt(u.indent,10)===u.indent&&u.indent>0))throw new TypeError('option "indent" must be "\\t", an integer > 0, or `null`');if(V(u,"numericSeparator")&&"boolean"!==typeof u.numericSeparator)throw new TypeError('option "numericSeparator", if provided, must be `true` or `false`');var v=u.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,u);if("number"===typeof t){if(0===t)return 1/0/t>0?"0":"-0";var b=String(t);return v?M(t,b):b}if("bigint"===typeof t){var w=String(t)+"n";return v?M(t,w):w}var E="undefined"===typeof u.depth?5:u.depth;if("undefined"===typeof r&&(r=0),r>=E&&E>0&&"object"===typeof t)return j(t)?"[Array]":"[Object]";var A=function(e,t){var n;if("\t"===e.indent)n="\t";else{if(!("number"===typeof e.indent&&e.indent>0))return null;n=k.call(Array(e.indent+1)," ")}return{base:n,prev:k.call(Array(t+1),n)}}(u,r);if("undefined"===typeof i)i=[];else if(q(i,t)>=0)return"[Circular]";function P(t,n,o){if(n&&(i=C.call(i)).push(n),o){var a={depth:u.depth};return V(u,"quoteStyle")&&(a.quoteStyle=u.quoteStyle),e(t,a,r+1,i)}return e(t,u,r+1,i)}if("function"===typeof t&&!z(t)){var H=function(e){if(e.name)return e.name;var t=y.call(m.call(e),/^function\s*([\w$]+)/);if(t)return t[1];return null}(t),Q=X(t,P);return"[Function"+(H?": "+H:" (anonymous)")+"]"+(Q.length>0?" { "+k.call(Q,", ")+" }":"")}if(U(t)){var ee=N?_.call(String(t),/^(Symbol\(.*\))_[^)]*$/,"$1"):F.call(t);return"object"!==typeof t||N?ee:G(ee)}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 te="<"+D.call(String(t.nodeName)),ne=t.attributes||[],re=0;re"}if(j(t)){if(0===t.length)return"[]";var ie=X(t,P);return A&&!function(e){for(var t=0;t=0)return!1;return!0}(ie)?"["+K(ie,A)+"]":"[ "+k.call(ie,", ")+" ]"}if(function(e){return"[object Error]"===Y(e)&&(!O||!("object"===typeof e&&O in e))}(t)){var oe=X(t,P);return"cause"in Error.prototype||!("cause"in t)||T.call(t,"cause")?0===oe.length?"["+String(t)+"]":"{ ["+String(t)+"] "+k.call(oe,", ")+" }":"{ ["+String(t)+"] "+k.call(x.call("[cause]: "+P(t.cause),oe),", ")+" }"}if("object"===typeof t&&l){if(I&&"function"===typeof t[I]&&L)return L(t,{depth:E-r});if("symbol"!==l&&"function"===typeof t.inspect)return t.inspect()}if(function(e){if(!o||!e||"object"!==typeof e)return!1;try{o.call(e);try{c.call(e)}catch(te){return!0}return e instanceof Map}catch(t){}return!1}(t)){var ae=[];return a.call(t,(function(e,n){ae.push(P(n,t,!0)+" => "+P(e,t))})),Z("Map",o.call(t),ae,A)}if(function(e){if(!c||!e||"object"!==typeof e)return!1;try{c.call(e);try{o.call(e)}catch(t){return!0}return e instanceof Set}catch(n){}return!1}(t)){var ue=[];return s.call(t,(function(e){ue.push(P(e,t))})),Z("Set",c.call(t),ue,A)}if(function(e){if(!f||!e||"object"!==typeof e)return!1;try{f.call(e,f);try{d.call(e,d)}catch(te){return!0}return e instanceof WeakMap}catch(t){}return!1}(t))return J("WeakMap");if(function(e){if(!d||!e||"object"!==typeof e)return!1;try{d.call(e,d);try{f.call(e,f)}catch(te){return!0}return e instanceof WeakSet}catch(t){}return!1}(t))return J("WeakSet");if(function(e){if(!h||!e||"object"!==typeof e)return!1;try{return h.call(e),!0}catch(t){}return!1}(t))return J("WeakRef");if(function(e){return"[object Number]"===Y(e)&&(!O||!("object"===typeof e&&O in e))}(t))return G(P(Number(t)));if(function(e){if(!e||"object"!==typeof e||!S)return!1;try{return S.call(e),!0}catch(t){}return!1}(t))return G(P(S.call(t)));if(function(e){return"[object Boolean]"===Y(e)&&(!O||!("object"===typeof e&&O in e))}(t))return G(p.call(t));if(function(e){return"[object String]"===Y(e)&&(!O||!("object"===typeof e&&O in e))}(t))return G(P(String(t)));if(!function(e){return"[object Date]"===Y(e)&&(!O||!("object"===typeof e&&O in e))}(t)&&!z(t)){var le=X(t,P),ce=B?B(t)===Object.prototype:t instanceof Object||t.constructor===Object,se=t instanceof Object?"":"null prototype",fe=!ce&&O&&Object(t)===t&&O in t?g.call(Y(t),8,-1):se?"Object":"",de=(ce||"function"!==typeof t.constructor?"":t.constructor.name?t.constructor.name+" ":"")+(fe||se?"["+k.call(x.call([],fe||[],se||[]),": ")+"] ":"");return 0===le.length?de+"{}":A?de+"{"+K(le,A)+"}":de+"{ "+k.call(le,", ")+" }"}return String(t)};var H=Object.prototype.hasOwnProperty||function(e){return e in this};function V(e,t){return H.call(e,t)}function Y(e){return v.call(e)}function q(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(g.call(e,0,t.maxStringLength),t)+r}return $(_.call(_.call(e,/(['\\])/g,"\\$1"),/[\x00-\x1f]/g,Q),"single",t)}function Q(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 G(e){return"Object("+e+")"}function J(e){return e+" { ? }"}function Z(e,t,n,r){return e+" ("+t+") {"+(r?K(n,r):k.call(n,", "))+"}"}function K(e,t){if(0===e.length)return"";var n="\n"+t.prev+t.base;return n+k.call(e,","+n)+"\n"+t.prev}function X(e,t){var n=j(e),r=[];if(n){r.length=e.length;for(var i=0;i-1?e.split(","):e},c=function(e,t,n,r){if(e){var o=n.allowDots?e.replace(/\.([^.[]+)/g,"[$1]"):e,a=/(\[[^[\]]*])/g,u=n.depth>0&&/(\[[^[\]]*])/.exec(o),c=u?o.slice(0,u.index):o,s=[];if(c){if(!n.plainObjects&&i.call(Object.prototype,c)&&!n.allowPrototypes)return;s.push(c)}for(var f=0;n.depth>0&&null!==(u=a.exec(o))&&f=0;--o){var a,u=e[o];if("[]"===u&&n.parseArrays)a=[].concat(i);else{a=n.plainObjects?Object.create(null):{};var c="["===u.charAt(0)&&"]"===u.charAt(u.length-1)?u.slice(1,-1):u,s=parseInt(c,10);n.parseArrays||""!==c?!isNaN(s)&&u!==c&&String(s)===c&&s>=0&&n.parseArrays&&s<=n.arrayLimit?(a=[])[s]=i:"__proto__"!==c&&(a[c]=i):a={0:i}}i=a}return i}(s,t,n,r)}};e.exports=function(e,t){var n=function(e){if(!e)return a;if(null!==e.decoder&&void 0!==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?a.charset:e.charset;return{allowDots:"undefined"===typeof e.allowDots?a.allowDots:!!e.allowDots,allowPrototypes:"boolean"===typeof e.allowPrototypes?e.allowPrototypes:a.allowPrototypes,allowSparse:"boolean"===typeof e.allowSparse?e.allowSparse:a.allowSparse,arrayLimit:"number"===typeof e.arrayLimit?e.arrayLimit:a.arrayLimit,charset:t,charsetSentinel:"boolean"===typeof e.charsetSentinel?e.charsetSentinel:a.charsetSentinel,comma:"boolean"===typeof e.comma?e.comma:a.comma,decoder:"function"===typeof e.decoder?e.decoder:a.decoder,delimiter:"string"===typeof e.delimiter||r.isRegExp(e.delimiter)?e.delimiter:a.delimiter,depth:"number"===typeof e.depth||!1===e.depth?+e.depth:a.depth,ignoreQueryPrefix:!0===e.ignoreQueryPrefix,interpretNumericEntities:"boolean"===typeof e.interpretNumericEntities?e.interpretNumericEntities:a.interpretNumericEntities,parameterLimit:"number"===typeof e.parameterLimit?e.parameterLimit:a.parameterLimit,parseArrays:!1!==e.parseArrays,plainObjects:"boolean"===typeof e.plainObjects?e.plainObjects:a.plainObjects,strictNullHandling:"boolean"===typeof e.strictNullHandling?e.strictNullHandling:a.strictNullHandling}}(t);if(""===e||null===e||"undefined"===typeof e)return n.plainObjects?Object.create(null):{};for(var s="string"===typeof e?function(e,t){var n,c={},s=t.ignoreQueryPrefix?e.replace(/^\?/,""):e,f=t.parameterLimit===1/0?void 0:t.parameterLimit,d=s.split(t.delimiter,f),h=-1,p=t.charset;if(t.charsetSentinel)for(n=0;n-1&&(m=o(m)?[m]:m),i.call(c,v)?c[v]=r.combine(c[v],m):c[v]=m}return c}(e,n):e,f=n.plainObjects?Object.create(null):{},d=Object.keys(s),h=0;h0?C.join(",")||null:void 0}];else if(l(h))M=h;else{var P=Object.keys(C);M=m?P.sort(m):P}for(var I=a&&l(C)&&1===C.length?n+"[]":n,$=0;$0?D+b:""}},837:function(e,t,n){"use strict";var r=n(609),i=Object.prototype.hasOwnProperty,o=Array.isArray,a=function(){for(var e=[],t=0;t<256;++t)e.push("%"+((t<16?"0":"")+t.toString(16)).toUpperCase());return e}(),u=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(o(n)){for(var r=[],i=0;i=48&&s<=57||s>=65&&s<=90||s>=97&&s<=122||o===r.RFC1738&&(40===s||41===s)?l+=u.charAt(c):s<128?l+=a[s]:s<2048?l+=a[192|s>>6]+a[128|63&s]:s<55296||s>=57344?l+=a[224|s>>12]+a[128|s>>6&63]+a[128|63&s]:(c+=1,s=65536+((1023&s)<<10|1023&u.charCodeAt(c)),l+=a[240|s>>18]+a[128|s>>12&63]+a[128|s>>6&63]+a[128|63&s])}return l},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(o(e)){for(var n=[],r=0;r2&&(u.children=arguments.length>3?t.call(arguments,2):r),"function"==typeof e&&null!=e.defaultProps)for(a in e.defaultProps)void 0===u[a]&&(u[a]=e.defaultProps[a]);return p(e,u,i,o,null)}function p(e,t,n,o,a){var u={type:e,props:t,key:n,ref:o,__k:null,__:null,__b:0,__e:null,__d:void 0,__c:null,__h:null,constructor:void 0,__v:null==a?++i:a};return null==a&&null!=r.vnode&&r.vnode(u),u}function v(){return{current:null}}function m(e){return e.children}function y(e,t){this.props=e,this.context=t}function g(e,t){if(null==t)return e.__?g(e.__,e.__.__k.indexOf(e)+1):null;for(var n;t0?p(y.type,y.props,y.key,y.ref?y.ref:null,y.__v):y)){if(y.__=n,y.__b=n.__b+1,null===(v=w[d])||v&&y.key==v.key&&y.type===v.type)w[d]=void 0;else for(h=0;h2&&(u.children=arguments.length>3?t.call(arguments,2):r),p(e.type,u,i||e.key,o||e.ref,null)}function R(e,t){var n={__c:t="__cC"+u++,__: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.shouldComponentUpdate=function(e){this.props.value!==e.value&&n.some(b)},this.sub=function(e){n.push(e);var t=e.componentWillUnmount;e.componentWillUnmount=function(){n.splice(n.indexOf(e),1),t&&t.call(e)}}),e.children}};return n.Provider.__=n.Consumer.contextType=n}t=c.slice,r={__e:function(e,t,n,r){for(var i,o,a;t=t.__;)if((i=t.__c)&&!i.__)try{if((o=i.constructor)&&null!=o.getDerivedStateFromError&&(i.setState(o.getDerivedStateFromError(e)),a=i.__d),null!=i.componentDidCatch&&(i.componentDidCatch(e,r||{}),a=i.__d),a)return i.__E=i}catch(t){e=t}throw e}},i=0,y.prototype.setState=function(e,t){var n;n=null!=this.__s&&this.__s!==this.state?this.__s:this.__s=f({},this.state),"function"==typeof e&&(e=e(f({},n),this.props)),e&&f(n,e),null!=e&&this.__v&&(t&&this._sb.push(t),b(this))},y.prototype.forceUpdate=function(e){this.__v&&(this.__e=!0,e&&this.__h.push(e),b(this))},y.prototype.render=m,o=[],D.__r=0,u=0;var j,z,U,H,V=0,Y=[],q=[],W=r.__b,Q=r.__r,G=r.diffed,J=r.__c,Z=r.unmount;function K(e,t){r.__h&&r.__h(z,e,V||t),V=0;var n=z.__H||(z.__H={__:[],__h:[]});return e>=n.__.length&&n.__.push({__V:q}),n.__[e]}function X(e){return V=1,ee(ye,e)}function ee(e,t,n){var r=K(j++,2);if(r.t=e,!r.__c&&(r.__=[n?n(t):ye(void 0,t),function(e){var t=r.__N?r.__N[0]:r.__[0],n=r.t(t,e);t!==n&&(r.__N=[n,r.__[1]],r.__c.setState({}))}],r.__c=z,!z.u)){z.u=!0;var i=z.shouldComponentUpdate;z.shouldComponentUpdate=function(e,t,n){if(!r.__c.__H)return!0;var o=r.__c.__H.__.filter((function(e){return e.__c}));if(o.every((function(e){return!e.__N})))return!i||i.call(this,e,t,n);var a=!1;return o.forEach((function(e){if(e.__N){var t=e.__[0];e.__=e.__N,e.__N=void 0,t!==e.__[0]&&(a=!0)}})),!(!a&&r.__c.props===e)&&(!i||i.call(this,e,t,n))}}return r.__N||r.__}function te(e,t){var n=K(j++,3);!r.__s&&me(n.__H,t)&&(n.__=e,n.i=t,z.__H.__h.push(n))}function ne(e,t){var n=K(j++,4);!r.__s&&me(n.__H,t)&&(n.__=e,n.i=t,z.__h.push(n))}function re(e){return V=5,oe((function(){return{current:e}}),[])}function ie(e,t,n){V=6,ne((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 oe(e,t){var n=K(j++,7);return me(n.__H,t)?(n.__V=e(),n.i=t,n.__h=e,n.__V):n.__}function ae(e,t){return V=8,oe((function(){return e}),t)}function ue(e){var t=z.context[e.__c],n=K(j++,9);return n.c=e,t?(null==n.__&&(n.__=!0,t.sub(z)),t.props.value):e.__}function le(e,t){r.useDebugValue&&r.useDebugValue(t?t(e):e)}function ce(e){var t=K(j++,10),n=X();return t.__=e,z.componentDidCatch||(z.componentDidCatch=function(e,r){t.__&&t.__(e,r),n[1](e)}),[n[0],function(){n[1](void 0)}]}function se(){var e=K(j++,11);if(!e.__){for(var t=z.__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 fe(){for(var e;e=Y.shift();)if(e.__P&&e.__H)try{e.__H.__h.forEach(pe),e.__H.__h.forEach(ve),e.__H.__h=[]}catch(u){e.__H.__h=[],r.__e(u,e.__v)}}r.__b=function(e){z=null,W&&W(e)},r.__r=function(e){Q&&Q(e),j=0;var t=(z=e.__c).__H;t&&(U===z?(t.__h=[],z.__h=[],t.__.forEach((function(e){e.__N&&(e.__=e.__N),e.__V=q,e.__N=e.i=void 0}))):(t.__h.forEach(pe),t.__h.forEach(ve),t.__h=[])),U=z},r.diffed=function(e){G&&G(e);var t=e.__c;t&&t.__H&&(t.__H.__h.length&&(1!==Y.push(t)&&H===r.requestAnimationFrame||((H=r.requestAnimationFrame)||he)(fe)),t.__H.__.forEach((function(e){e.i&&(e.__H=e.i),e.__V!==q&&(e.__=e.__V),e.i=void 0,e.__V=q}))),U=z=null},r.__c=function(e,t){t.some((function(e){try{e.__h.forEach(pe),e.__h=e.__h.filter((function(e){return!e.__||ve(e)}))}catch(i){t.some((function(e){e.__h&&(e.__h=[])})),t=[],r.__e(i,e.__v)}})),J&&J(e,t)},r.unmount=function(e){Z&&Z(e);var t,n=e.__c;n&&n.__H&&(n.__H.__.forEach((function(e){try{pe(e)}catch(e){t=e}})),n.__H=void 0,t&&r.__e(t,n.__v))};var de="function"==typeof requestAnimationFrame;function he(e){var t,n=function(){clearTimeout(r),de&&cancelAnimationFrame(t),setTimeout(e)},r=setTimeout(n,100);de&&(t=requestAnimationFrame(n))}function pe(e){var t=z,n=e.__c;"function"==typeof n&&(e.__c=void 0,n()),z=t}function ve(e){var t=z;e.__c=e.__(),z=t}function me(e,t){return!e||e.length!==t.length||t.some((function(t,n){return t!==e[n]}))}function ye(e,t){return"function"==typeof t?t(e):t}function ge(e,t){for(var n in t)e[n]=t[n];return e}function _e(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 be(e,t){return e===t&&(0!==e||1/e==1/t)||e!=e&&t!=t}function De(e){this.props=e}function we(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:_e(this.props,e)}function r(t){return this.shouldComponentUpdate=n,h(e,t)}return r.displayName="Memo("+(e.displayName||e.name)+")",r.prototype.isReactComponent=!0,r.__f=!0,r}(De.prototype=new y).isPureReactComponent=!0,De.prototype.shouldComponentUpdate=function(e,t){return _e(this.props,e)||_e(this.state,t)};var xe=r.__b;r.__b=function(e){e.type&&e.type.__f&&e.ref&&(e.props.ref=e.ref,e.ref=null),xe&&xe(e)};var ke="undefined"!=typeof Symbol&&Symbol.for&&Symbol.for("react.forward_ref")||3911;function Ce(e){function t(t){var n=ge({},t);return delete n.ref,e(n,t.ref||null)}return t.$$typeof=ke,t.render=t,t.prototype.isReactComponent=t.__f=!0,t.displayName="ForwardRef("+(e.displayName||e.name)+")",t}var Ee=function(e,t){return null==e?null:k(k(e).map(t))},Se={map:Ee,forEach:Ee,count:function(e){return e?k(e).length:0},only:function(e){var t=k(e);if(1!==t.length)throw"Children.only";return t[0]},toArray:k},Ae=r.__e;r.__e=function(e,t,n,r){if(e.then)for(var i,o=t;o=o.__;)if((i=o.__c)&&i.__c)return null==t.__e&&(t.__e=n.__e,t.__k=n.__k),i.__c(e,t);Ae(e,t,n,r)};var Fe=r.unmount;function Ne(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=ge({},e)).__c&&(e.__c.__P===n&&(e.__c.__P=t),e.__c=null),e.__k=e.__k&&e.__k.map((function(e){return Ne(e,t,n)}))),e}function Oe(e,t,n){return e&&(e.__v=null,e.__k=e.__k&&e.__k.map((function(e){return Oe(e,t,n)})),e.__c&&e.__c.__P===t&&(e.__e&&n.insertBefore(e.__e,e.__d),e.__c.__e=!0,e.__c.__P=n)),e}function Te(){this.__u=0,this.t=null,this.__b=null}function Be(e){var t=e.__.__c;return t&&t.__a&&t.__a(e)}function Me(e){var t,n,r;function i(i){if(t||(t=e()).then((function(e){n=e.default||e}),(function(e){r=e})),r)throw r;if(!n)throw t;return h(n,i)}return i.displayName="Lazy",i.__f=!0,i}function Le(){this.u=null,this.o=null}r.unmount=function(e){var t=e.__c;t&&t.__R&&t.__R(),t&&!0===e.__h&&(e.type=null),Fe&&Fe(e)},(Te.prototype=new y).__c=function(e,t){var n=t.__c,r=this;null==r.t&&(r.t=[]),r.t.push(n);var i=Be(r.__v),o=!1,a=function(){o||(o=!0,n.__R=null,i?i(u):u())};n.__R=a;var u=function(){if(!--r.__u){if(r.state.__a){var e=r.state.__a;r.__v.__k[0]=Oe(e,e.__c.__P,e.__c.__O)}var t;for(r.setState({__a:r.__b=null});t=r.t.pop();)t.forceUpdate()}},l=!0===t.__h;r.__u++||l||r.setState({__a:r.__b=r.__v.__k[0]}),e.then(a,a)},Te.prototype.componentWillUnmount=function(){this.t=[]},Te.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]=Ne(this.__b,n,r.__O=r.__P)}this.__b=null}var i=t.__a&&h(m,null,e.fallback);return i&&(i.__h=null),[h(m,null,t.__a?null:e.children),i]};var Pe=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)}}),P(h(Ie,{context:t.context},e.__v),t.l)):t.l&&t.componentWillUnmount()}function Re(e,t){var n=h($e,{__v:e,i:t});return n.containerInfo=t,n}(Le.prototype=new y).__a=function(e){var t=this,n=Be(t.__v),r=t.o.get(e);return r[0]++,function(i){var o=function(){t.props.revealOrder?(r.push(i),Pe(t,e,r)):i()};n?n(o):o()}},Le.prototype.render=function(e){this.u=null,this.o=new Map;var t=k(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},Le.prototype.componentDidUpdate=Le.prototype.componentDidMount=function(){var e=this;this.o.forEach((function(t,n){Pe(e,n,t)}))};var je="undefined"!=typeof Symbol&&Symbol.for&&Symbol.for("react.element")||60103,ze=/^(?:accent|alignment|arabic|baseline|cap|clip(?!PathU)|color|dominant|fill|flood|font|glyph(?!R)|horiz|image|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]/,Ue="undefined"!=typeof document,He=function(e){return("undefined"!=typeof Symbol&&"symbol"==typeof Symbol()?/fil|che|rad/i:/fil|che|ra/i).test(e)};function Ve(e,t,n){return null==t.__k&&(t.textContent=""),P(e,t),"function"==typeof n&&n(),e?e.__c:null}function Ye(e,t,n){return I(e,t),"function"==typeof n&&n(),e?e.__c:null}y.prototype.isReactComponent={},["componentWillMount","componentWillReceiveProps","componentWillUpdate"].forEach((function(e){Object.defineProperty(y.prototype,e,{configurable:!0,get:function(){return this["UNSAFE_"+e]},set:function(t){Object.defineProperty(this,e,{configurable:!0,writable:!0,value:t})}})}));var qe=r.event;function We(){}function Qe(){return this.cancelBubble}function Ge(){return this.defaultPrevented}r.event=function(e){return qe&&(e=qe(e)),e.persist=We,e.isPropagationStopped=Qe,e.isDefaultPrevented=Ge,e.nativeEvent=e};var Je,Ze={configurable:!0,get:function(){return this.class}},Ke=r.vnode;r.vnode=function(e){var t=e.type,n=e.props,r=n;if("string"==typeof t){var i=-1===t.indexOf("-");for(var o in r={},n){var a=n[o];Ue&&"children"===o&&"noscript"===t||"value"===o&&"defaultValue"in n&&null==a||("defaultValue"===o&&"value"in n&&null==n.value?o="value":"download"===o&&!0===a?a="":/ondoubleclick/i.test(o)?o="ondblclick":/^onchange(textarea|input)/i.test(o+t)&&!He(n.type)?o="oninput":/^onfocus$/i.test(o)?o="onfocusin":/^onblur$/i.test(o)?o="onfocusout":/^on(Ani|Tra|Tou|BeforeInp|Compo)/.test(o)?o=o.toLowerCase():i&&ze.test(o)?o=o.replace(/[A-Z0-9]/g,"-$&").toLowerCase():null===a&&(a=void 0),/^oninput$/i.test(o)&&(o=o.toLowerCase(),r[o]&&(o="oninputCapture")),r[o]=a)}"select"==t&&r.multiple&&Array.isArray(r.value)&&(r.value=k(n.children).forEach((function(e){e.props.selected=-1!=r.value.indexOf(e.props.value)}))),"select"==t&&null!=r.defaultValue&&(r.value=k(n.children).forEach((function(e){e.props.selected=r.multiple?-1!=r.defaultValue.indexOf(e.props.value):r.defaultValue==e.props.value}))),e.props=r,n.class!=n.className&&(Ze.enumerable="className"in n,null!=n.className&&(r.class=n.className),Object.defineProperty(r,"className",Ze))}e.$$typeof=je,Ke&&Ke(e)};var Xe=r.__r;r.__r=function(e){Xe&&Xe(e),Je=e.__c};var et={ReactCurrentDispatcher:{current:{readContext:function(e){return Je.__n[e.__c].props.value}}}},tt="17.0.2";function nt(e){return h.bind(null,e)}function rt(e){return!!e&&e.$$typeof===je}function it(e){return rt(e)?$.apply(null,arguments):e}function ot(e){return!!e.__k&&(P(null,e),!0)}function at(e){return e&&(e.base||1===e.nodeType&&e)||null}var ut=function(e,t){return e(t)},lt=function(e,t){return e(t)},ct=m;function st(e){e()}function ft(e){return e}function dt(){return[!1,st]}var ht=ne;function pt(e,t){var n=t(),r=X({h:{__:n,v:t}}),i=r[0].h,o=r[1];return ne((function(){i.__=n,i.v=t,be(i.__,t())||o({h:i})}),[e,n,t]),te((function(){return be(i.__,i.v())||o({h:i}),e((function(){be(i.__,i.v())||o({h:i})}))}),[e]),n}var vt,mt={useState:X,useId:se,useReducer:ee,useEffect:te,useLayoutEffect:ne,useInsertionEffect:ht,useTransition:dt,useDeferredValue:ft,useSyncExternalStore:pt,startTransition:st,useRef:re,useImperativeHandle:ie,useMemo:oe,useCallback:ae,useContext:ue,useDebugValue:le,version:"17.0.2",Children:Se,render:Ve,hydrate:Ye,unmountComponentAtNode:ot,createPortal:Re,createElement:h,createContext:R,createFactory:nt,cloneElement:it,createRef:v,Fragment:m,isValidElement:rt,findDOMNode:at,Component:y,PureComponent:De,memo:we,forwardRef:Ce,flushSync:lt,unstable_batchedUpdates:ut,StrictMode:ct,Suspense:Te,SuspenseList:Le,lazy:Me,__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED:et};function yt(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n=0&&(t.hash=e.substr(n),e=e.substr(0,n));var r=e.indexOf("?");r>=0&&(t.search=e.substr(r),e=e.substr(0,r)),e&&(t.pathname=e)}return t}function zt(e){var t="undefined"!==typeof window&&"undefined"!==typeof window.location&&"null"!==window.location.origin?window.location.origin:"unknown://unknown",n="string"===typeof e?e:Rt(e);return new URL(n,t)}function Ut(e,t,n,r){void 0===r&&(r={});var i=r,o=i.window,a=void 0===o?document.defaultView:o,u=i.v5Compat,l=void 0!==u&&u,c=a.history,s=vt.Pop,f=null;function d(){s=vt.Pop,f&&f({action:s,location:h.location})}var h={get action(){return s},get location(){return e(a,c)},listen:function(e){if(f)throw new Error("A history only accepts one active listener");return a.addEventListener(Lt,d),f=e,function(){a.removeEventListener(Lt,d),f=null}},createHref:function(e){return t(a,e)},encodeLocation:function(e){var t=zt(Rt(e));return Bt({},e,{pathname:t.pathname,search:t.search,hash:t.hash})},push:function(e,t){s=vt.Push;var r=$t(h.location,e,t);n&&n(r,e);var i=It(r),o=h.createHref(r);try{c.pushState(i,"",o)}catch(u){a.location.assign(o)}l&&f&&f({action:s,location:h.location})},replace:function(e,t){s=vt.Replace;var r=$t(h.location,e,t);n&&n(r,e);var i=It(r),o=h.createHref(r);c.replaceState(i,"",o),l&&f&&f({action:s,location:h.location})},go:function(e){return c.go(e)}};return h}function Ht(e,t,n){void 0===n&&(n="/");var r=Zt(("string"===typeof t?jt(t):t).pathname||"/",n);if(null==r)return null;var i=Vt(e);!function(e){e.sort((function(e,t){return e.score!==t.score?t.score-e.score:function(e,t){var n=e.length===t.length&&e.slice(0,-1).every((function(e,n){return e===t[n]}));return n?e[e.length-1]-t[t.length-1]:0}(e.routesMeta.map((function(e){return e.childrenIndex})),t.routesMeta.map((function(e){return e.childrenIndex})))}))}(i);for(var o=null,a=0;null==o&&a0&&(Kt(!0!==e.index,'Index routes must not have child routes. Please remove all child routes from route path "'+a+'".'),Vt(e.children,t,u,a)),(null!=e.path||e.index)&&t.push({path:a,score:Wt(a,e.index),routesMeta:u})})),t}!function(e){e.data="data",e.deferred="deferred",e.redirect="redirect",e.error="error"}(Mt||(Mt={}));var Yt=/^:\w+$/,qt=function(e){return"*"===e};function Wt(e,t){var n=e.split("/"),r=n.length;return n.some(qt)&&(r+=-2),t&&(r+=2),n.filter((function(e){return!qt(e)})).reduce((function(e,t){return e+(Yt.test(t)?3:""===t?1:10)}),r)}function Qt(e,t){for(var n=e.routesMeta,r={},i="/",o=[],a=0;a and the router will parse it for you.'}function tn(e){return e.filter((function(e,t){return 0===t||e.route.path&&e.route.path.length>0}))}function nn(e,t,n,r){var i;void 0===r&&(r=!1),"string"===typeof e?i=jt(e):(Kt(!(i=Bt({},e)).pathname||!i.pathname.includes("?"),en("?","pathname","search",i)),Kt(!i.pathname||!i.pathname.includes("#"),en("#","pathname","hash",i)),Kt(!i.search||!i.search.includes("#"),en("#","search","hash",i)));var o,a=""===e||""===i.pathname,u=a?"/":i.pathname;if(r||null==u)o=n;else{var l=t.length-1;if(u.startsWith("..")){for(var c=u.split("/");".."===c[0];)c.shift(),l-=1;i.pathname=c.join("/")}o=l>=0?t[l]:"/"}var s=function(e,t){void 0===t&&(t="/");var n="string"===typeof e?jt(e):e,r=n.pathname,i=n.search,o=void 0===i?"":i,a=n.hash,u=void 0===a?"":a,l=r?r.startsWith("/")?r:function(e,t){var n=t.replace(/\/+$/,"").split("/");return e.split("/").forEach((function(e){".."===e?n.length>1&&n.pop():"."!==e&&n.push(e)})),n.length>1?n.join("/"):"/"}(r,t):t;return{pathname:l,search:an(o),hash:un(u)}}(i,o),f=u&&"/"!==u&&u.endsWith("/"),d=(a||"."===u)&&n.endsWith("/");return s.pathname.endsWith("/")||!f&&!d||(s.pathname+="/"),s}var rn=function(e){return e.join("/").replace(/\/\/+/g,"/")},on=function(e){return e.replace(/\/+$/,"").replace(/^\/*/,"/")},an=function(e){return e&&"?"!==e?e.startsWith("?")?e:"?"+e:""},un=function(e){return e&&"#"!==e?e.startsWith("#")?e:"#"+e:""};Error;var ln=xt((function e(t,n,r){Dt(this,e),this.status=t,this.statusText=n||"",this.data=r}));function cn(e){return e instanceof ln}"undefined"!==typeof window&&"undefined"!==typeof window.document&&window.document.createElement;var sn=new Set(["POST","PUT","PATCH","DELETE"]);new Set(["GET","HEAD"].concat(bt(sn)));function fn(){return fn=Object.assign?Object.assign.bind():function(e){for(var t=1;t")))}var Nn,On,Tn=function(e){Ct(n,e);var t=Nt(n);function n(e){var r;return Dt(this,n),(r=t.call(this,e)).state={location:e.location,error:e.error},r}return xt(n,[{key:"componentDidCatch",value:function(e,t){console.error("React Router caught the following error during render",e,t)}},{key:"render",value:function(){return this.state.error?h(kn.Provider,{value:this.state.error,children:this.props.component}):this.props.children}}],[{key:"getDerivedStateFromError",value:function(e){return{error:e}}},{key:"getDerivedStateFromProps",value:function(e,t){return t.location!==e.location?{error:e.error,location:e.location}:{error:e.error||t.error,location:t.location}}}]),n}(y);function Bn(e){var t=e.routeContext,n=e.match,r=e.children,i=ue(gn);return i&&n.route.errorElement&&(i._deepestRenderedBoundaryId=n.route.id),h(xn.Provider,{value:t},r)}function Mn(e,t,n){if(void 0===t&&(t=[]),null==e){if(null==n||!n.errors)return null;e=n.matches}var r=e,i=null==n?void 0:n.errors;if(null!=i){var o=r.findIndex((function(e){return e.route.id&&(null==i?void 0:i[e.route.id])}));o>=0||Kt(!1),r=r.slice(0,Math.min(r.length,o+1))}return r.reduceRight((function(e,o,a){var u=o.route.id?null==i?void 0:i[o.route.id]:null,l=n?o.route.errorElement||h(Fn,null):null,c=function(){return h(Bn,{match:o,routeContext:{outlet:e,matches:t.concat(r.slice(0,a+1))}},u?l:void 0!==o.route.element?o.route.element:e)};return n&&(o.route.errorElement||0===a)?h(Tn,{location:n.location,component:l,error:u,children:c()}):c()}),null)}function Ln(e){var t=ue(bn);return t||Kt(!1),t}!function(e){e.UseRevalidator="useRevalidator"}(Nn||(Nn={})),function(e){e.UseLoaderData="useLoaderData",e.UseActionData="useActionData",e.UseRouteError="useRouteError",e.UseNavigation="useNavigation",e.UseRouteLoaderData="useRouteLoaderData",e.UseMatches="useMatches",e.UseRevalidator="useRevalidator"}(On||(On={}));var Pn;function In(e){return function(e){var t=ue(xn).outlet;return t?h(An.Provider,{value:e},t):t}(e.context)}function $n(e){Kt(!1)}function Rn(e){var t=e.basename,n=void 0===t?"/":t,r=e.children,i=void 0===r?null:r,o=e.location,a=e.navigationType,u=void 0===a?vt.Pop:a,l=e.navigator,c=e.static,s=void 0!==c&&c;Cn()&&Kt(!1);var f=n.replace(/^\/*/,"/"),d=oe((function(){return{basename:f,navigator:l,static:s}}),[f,l,s]);"string"===typeof o&&(o=jt(o));var p=o,v=p.pathname,m=void 0===v?"/":v,y=p.search,g=void 0===y?"":y,_=p.hash,b=void 0===_?"":_,D=p.state,w=void 0===D?null:D,x=p.key,k=void 0===x?"default":x,C=oe((function(){var e=Zt(m,f);return null==e?null:{pathname:e,search:g,hash:b,state:w,key:k}}),[f,m,g,b,w,k]);return null==C?null:h(Dn.Provider,{value:d},h(wn.Provider,{children:i,value:{location:C,navigationType:u}}))}function jn(e){var t=e.children,n=e.location,r=ue(_n);return function(e,t){Cn()||Kt(!1);var n,r=ue(bn),i=ue(xn).matches,o=i[i.length-1],a=o?o.params:{},u=(o&&o.pathname,o?o.pathnameBase:"/"),l=(o&&o.route,En());if(t){var c,s="string"===typeof t?jt(t):t;"/"===u||(null==(c=s.pathname)?void 0:c.startsWith(u))||Kt(!1),n=s}else n=l;var f=n.pathname||"/",d=Ht(e,{pathname:"/"===u?f:f.slice(u.length)||"/"}),p=Mn(d&&d.map((function(e){return Object.assign({},e,{params:Object.assign({},a,e.params),pathname:rn([u,e.pathname]),pathnameBase:"/"===e.pathnameBase?u:rn([u,e.pathnameBase])})})),i,r||void 0);return t&&p?h(wn.Provider,{value:{location:fn({pathname:"/",search:"",hash:"",state:null,key:"default"},n),navigationType:vt.Pop}},p):p}(r&&!t?r.router.routes:zn(t),n)}!function(e){e[e.pending=0]="pending",e[e.success=1]="success",e[e.error=2]="error"}(Pn||(Pn={}));new Promise((function(){}));function zn(e,t){void 0===t&&(t=[]);var n=[];return Se.forEach(e,(function(e,r){if(rt(e))if(e.type!==m){e.type!==$n&&Kt(!1),e.props.index&&e.props.children&&Kt(!1);var i=[].concat(bt(t),[r]),o={id:e.props.id||i.join("-"),caseSensitive:e.props.caseSensitive,element:e.props.element,index:e.props.index,path:e.props.path,loader:e.props.loader,action:e.props.action,errorElement:e.props.errorElement,hasErrorBoundary:null!=e.props.errorElement,shouldRevalidate:e.props.shouldRevalidate,handle:e.props.handle};e.props.children&&(o.children=zn(e.props.children,i)),n.push(o)}else n.push.apply(n,zn(e.props.children,t))})),n}function Un(e){var t=e.basename,n=e.children,r=e.window,i=re();null==i.current&&(i.current=function(e){return void 0===e&&(e={}),Ut((function(e,t){var n=jt(e.location.hash.substr(1)),r=n.pathname,i=void 0===r?"/":r,o=n.search,a=void 0===o?"":o,u=n.hash;return $t("",{pathname:i,search:a,hash:void 0===u?"":u},t.state&&t.state.usr||null,t.state&&t.state.key||"default")}),(function(e,t){var n=e.document.querySelector("base"),r="";if(n&&n.getAttribute("href")){var i=e.location.href,o=i.indexOf("#");r=-1===o?i:i.slice(0,o)}return r+"#"+("string"===typeof t?t:Rt(t))}),(function(e,t){Pt("/"===e.pathname.charAt(0),"relative pathnames are not supported in hash history.push("+JSON.stringify(t)+")")}),e)}({window:r,v5Compat:!0}));var o=i.current,a=_t(X({action:o.action,location:o.location}),2),u=a[0],l=a[1];return ne((function(){return o.listen(l)}),[o]),h(Rn,{basename:t,children:n,location:u.location,navigationType:u.action,navigator:o})}var Hn,Vn;(function(e){e.UseScrollRestoration="useScrollRestoration",e.UseSubmitImpl="useSubmitImpl",e.UseFetcher="useFetcher"})(Hn||(Hn={})),function(e){e.UseFetchers="useFetchers",e.UseScrollRestoration="useScrollRestoration"}(Vn||(Vn={}));var Yn;function qn(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}var Wn={home:"/",dashboards:"/dashboards",cardinality:"/cardinality",topQueries:"/top-queries",trace:"/trace"},Qn={header:{timeSelector:!0,executionControls:!0,globalSettings:!0}},Gn=(qn(Yn={},Wn.home,Qn),qn(Yn,Wn.dashboards,Qn),qn(Yn,Wn.cardinality,{header:{cardinalityDatePicker:!0,globalSettings:!0}}),Yn),Jn=Wn;function Zn(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}function Kn(e){for(var t=1;t2&&void 0!==arguments[2]?arguments[2]:window.location.search,r=nr().parse(n,{ignoreQueryPrefix:!0});return ir()(r,e,t||"")},lr={serverUrl:Xn().serverURL||window.location.href.replace(/\/(?:prometheus\/)?(?:graph|vmui)\/.*/,"/prometheus"),tenantId:Number(ur("g0.tenantID",0))};function cr(e,t){switch(t.type){case"SET_SERVER":return Kn(Kn({},e),{},{serverUrl:t.payload});case"SET_TENANT_ID":return Kn(Kn({},e),{},{tenantId:t.payload});default:throw new Error}}var sr=0;function fr(e,t,n,i,o){var a,u,l={};for(u in t)"ref"==u?a=t[u]:l[u]=t[u];var c={type:e,props:l,key:n,ref:a,__k:null,__:null,__b:0,__e:null,__d:void 0,__c:null,__h:null,constructor:void 0,__v:--sr,__source:o,__self:i};if("function"==typeof e&&(a=e.defaultProps))for(u in a)void 0===l[u]&&(l[u]=a[u]);return r.vnode&&r.vnode(c),c}var dr=R({}),hr=function(){return ue(dr).state},pr=function(){return ue(dr).dispatch},vr=Object.entries(lr).reduce((function(e,t){var n=_t(t,2),r=n[0],i=n[1];return Kn(Kn({},e),{},qn({},r,ur(r)||i))}),{}),mr=n(658),yr=n.n(mr),gr=n(446),_r=n.n(gr),br=n(635),Dr=n.n(br),wr="YYYY-MM-DD",xr="YYYY-MM-DD HH:mm:ss",kr="YYYY-MM-DD[T]HH:mm:ss";yr().extend(_r()),yr().extend(Dr());var Cr,Er=window.innerWidth/4,Sr=1,Ar=1578e8,Fr=[{long:"days",short:"d",possible:"day"},{long:"weeks",short:"w",possible:"week"},{long:"months",short:"M",possible:"mon"},{long:"years",short:"y",possible:"year"},{long:"hours",short:"h",possible:"hour"},{long:"minutes",short:"m",possible:"min"},{long:"seconds",short:"s",possible:"sec"},{long:"milliseconds",short:"ms",possible:"millisecond"}].map((function(e){return e.short})),Nr=function(e){return Math.round(1e3*e)/1e3},Or=function(e){var t=e.match(/\d+/g),n=e.match(/[a-zA-Z]+/g);if(n&&t&&Fr.includes(n[0]))return qn({},n[0],t[0])},Tr=function(e,t){var n=(t||new Date).valueOf()/1e3,r=e.trim().split(" ").reduce((function(e,t){var n=Or(t);return n?Kn(Kn({},e),n):Kn({},e)}),{}),i=yr().duration(r).asSeconds();return{start:n-i,end:n,step:Nr(i/Er)||.001,date:Br(t||new Date)}},Br=function(e){return yr()(e).utc().format(kr)},Mr=function(e){return yr()(e).format(kr)},Lr=function(e){var t=Math.floor(e%1e3),n=Math.floor(e/1e3%60),r=Math.floor(e/1e3/60%60),i=Math.floor(e/1e3/3600%24),o=Math.floor(e/864e5),a=["d","h","m","s","ms"],u=[o,i,r,n,t].map((function(e,t){return e?"".concat(e).concat(a[t]):""}));return u.filter((function(e){return e})).join(" ")},Pr=function(e){return new Date(1e3*e)},Ir=[{title:"Last 5 minutes",duration:"5m"},{title:"Last 15 minutes",duration:"15m"},{title:"Last 30 minutes",duration:"30m",isDefault:!0},{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:function(){return yr()().subtract(1,"day").endOf("day").toDate()}},{title:"Today",duration:"1d",until:function(){return yr()().endOf("day").toDate()}}].map((function(e){return Kn({id:e.title.replace(/\s/g,"_").toLocaleLowerCase(),until:e.until?e.until:function(){return yr()().toDate()}},e)})),$r=function(e){var t,n=e.relativeTimeId,r=e.defaultDuration,i=e.defaultEndInput,o=null===(t=Ir.find((function(e){return e.isDefault})))||void 0===t?void 0:t.id,a=n||ur("g0.relative_time",o),u=Ir.find((function(e){return e.id===a}));return{relativeTimeId:u?a:"none",duration:u?u.duration:r,endInput:u?u.until():i}},Rr=ur("g0.range_input"),jr=$r({defaultDuration:Rr||"1h",defaultEndInput:new Date((Cr=ur("g0.end_input",new Date(yr()().utc().format(kr))),yr()(Cr).utcOffset(0,!0).local().format(kr))),relativeTimeId:Rr?ur("g0.relative_time","none"):void 0}),zr=jr.duration,Ur=jr.endInput,Hr=jr.relativeTimeId,Vr={duration:zr,period:Tr(zr,Ur),relativeTime:Hr};function Yr(e,t){switch(t.type){case"SET_DURATION":return Kn(Kn({},e),{},{duration:t.payload,period:Tr(t.payload,Pr(e.period.end)),relativeTime:"none"});case"SET_RELATIVE_TIME":return Kn(Kn({},e),{},{duration:t.payload.duration,period:Tr(t.payload.duration,new Date(t.payload.until)),relativeTime:t.payload.id});case"SET_PERIOD":var n=function(e){var t=e.to.valueOf()-e.from.valueOf();return Lr(t)}(t.payload);return Kn(Kn({},e),{},{duration:n,period:Tr(n,t.payload.to),relativeTime:"none"});case"RUN_QUERY":var r=$r({relativeTimeId:e.relativeTime,defaultDuration:e.duration,defaultEndInput:Pr(e.period.end)}),i=r.duration,o=r.endInput;return Kn(Kn({},e),{},{period:Tr(i,o)});case"RUN_QUERY_TO_NOW":return Kn(Kn({},e),{},{period:Tr(e.duration)});default:throw new Error}}var qr=R({}),Wr=function(){return ue(qr).state},Qr=function(){return ue(qr).dispatch},Gr=function(e,t){t?window.localStorage.setItem(e,JSON.stringify({value:t})):Zr([e])},Jr=function(e){var 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(c){return t}},Zr=function(e){return e.forEach((function(e){return window.localStorage.removeItem(e)}))},Kr=function(){var e,t=(null===(e=window.location.search.match(/g\d+.expr/gim))||void 0===e?void 0:e.length)||1;return new Array(t>4?4:t).fill(1).map((function(e,t){return ur("g".concat(t,".expr"),"")}))}(),Xr={query:Kr,queryHistory:Kr.map((function(e){return{index:0,values:[e]}})),autocomplete:Jr("AUTOCOMPLETE")||!1};function ei(e,t){switch(t.type){case"SET_QUERY":return Kn(Kn({},e),{},{query:t.payload.map((function(e){return e}))});case"SET_QUERY_HISTORY":return Kn(Kn({},e),{},{queryHistory:t.payload});case"SET_QUERY_HISTORY_BY_INDEX":return e.queryHistory.splice(t.payload.queryNumber,1,t.payload.value),Kn(Kn({},e),{},{queryHistory:e.queryHistory});case"TOGGLE_AUTOCOMPLETE":return Gr("AUTOCOMPLETE",!e.autocomplete),Kn(Kn({},e),{},{autocomplete:!e.autocomplete});default:throw new Error}}var ti=R({}),ni=function(){return ue(ti).state},ri=function(){return ue(ti).dispatch},ii=function(){return fr("svg",{viewBox:"0 0 74 24",fill:"currentColor",children:[fr("path",{d:"M6.11771 9.47563C6.4774 9.7554 6.91935 9.90875 7.37507 9.9119H7.42685C7.9076 9.90451 8.38836 9.71964 8.67681 9.46823C10.1856 8.18898 14.5568 4.18115 14.5568 4.18115C15.7254 3.09415 12.4637 2.00716 7.42685 1.99977H7.36768C2.33084 2.00716 -0.930893 3.09415 0.237711 4.18115C0.237711 4.18115 4.60888 8.18898 6.11771 9.47563ZM8.67681 11.6422C8.31807 11.9246 7.87603 12.0806 7.41945 12.0859H7.37507C6.91849 12.0806 6.47645 11.9246 6.11771 11.6422C5.08224 10.7549 1.38413 7.41995 0.00103198 6.14809V8.07806C0.00103198 8.2925 0.0823905 8.57349 0.222919 8.70659L0.293358 8.77097L0.293386 8.77099C1.33788 9.72556 4.83907 12.9253 6.11771 14.0159C6.47645 14.2983 6.91849 14.4543 7.37507 14.4595H7.41945C7.9076 14.4447 8.38096 14.2599 8.67681 14.0159C9.98594 12.9067 13.6249 9.57175 14.5642 8.70659C14.7121 8.57349 14.7861 8.2925 14.7861 8.07806V6.14809C12.7662 7.99781 10.7297 9.82926 8.67681 11.6422ZM7.41945 16.6261C7.87517 16.623 8.31712 16.4696 8.67681 16.1898C10.7298 14.3744 12.7663 12.5405 14.7861 10.6883V12.6257C14.7861 12.8327 14.7121 13.1137 14.5642 13.2468C13.6249 14.1194 9.98594 17.4469 8.67681 18.5561C8.38096 18.8075 7.9076 18.9924 7.41945 18.9998H7.37507C6.91935 18.9966 6.4774 18.8433 6.11771 18.5635C4.91431 17.5371 1.74223 14.6362 0.502336 13.5023C0.3934 13.4027 0.299379 13.3167 0.222919 13.2468C0.0823905 13.1137 0.00103198 12.8327 0.00103198 12.6257V10.6883C1.38413 11.9528 5.08224 15.2951 6.11771 16.1825C6.47645 16.4649 6.91849 16.6209 7.37507 16.6261H7.41945Z",fill:"currentColor"}),fr("path",{d:"M35 3.54L29.16 18H26.73L20.89 3.54H23.05C23.2833 3.54 23.4733 3.59667 23.62 3.71C23.7667 3.82333 23.8767 3.97 23.95 4.15L27.36 12.97C27.4733 13.2567 27.58 13.5733 27.68 13.92C27.7867 14.26 27.8867 14.6167 27.98 14.99C28.06 14.6167 28.1467 14.26 28.24 13.92C28.3333 13.5733 28.4367 13.2567 28.55 12.97L31.94 4.15C31.9933 3.99667 32.0967 3.85667 32.25 3.73C32.41 3.60333 32.6033 3.54 32.83 3.54H35ZM52.1767 3.54V18H49.8067V8.66C49.8067 8.28667 49.8267 7.88333 49.8667 7.45L45.4967 15.66C45.2901 16.0533 44.9734 16.25 44.5467 16.25H44.1667C43.7401 16.25 43.4234 16.0533 43.2167 15.66L38.7967 7.42C38.8167 7.64 38.8334 7.85667 38.8467 8.07C38.8601 8.28333 38.8667 8.48 38.8667 8.66V18H36.4967V3.54H38.5267C38.6467 3.54 38.7501 3.54333 38.8367 3.55C38.9234 3.55667 39.0001 3.57333 39.0667 3.6C39.1401 3.62667 39.2034 3.67 39.2567 3.73C39.3167 3.79 39.3734 3.87 39.4267 3.97L43.7567 12C43.8701 12.2133 43.9734 12.4333 44.0667 12.66C44.1667 12.8867 44.2634 13.12 44.3567 13.36C44.4501 13.1133 44.5467 12.8767 44.6467 12.65C44.7467 12.4167 44.8534 12.1933 44.9667 11.98L49.2367 3.97C49.2901 3.87 49.3467 3.79 49.4067 3.73C49.4667 3.67 49.5301 3.62667 49.5967 3.6C49.6701 3.57333 49.7501 3.55667 49.8367 3.55C49.9234 3.54333 50.0267 3.54 50.1467 3.54H52.1767ZM61.063 17.27C61.743 17.27 62.3496 17.1533 62.883 16.92C63.423 16.68 63.8796 16.35 64.253 15.93C64.6263 15.51 64.9096 15.0167 65.103 14.45C65.303 13.8767 65.403 13.26 65.403 12.6V3.85H66.423V12.6C66.423 13.38 66.2996 14.11 66.053 14.79C65.8063 15.4633 65.4496 16.0533 64.983 16.56C64.523 17.06 63.9596 17.4533 63.293 17.74C62.633 18.0267 61.8896 18.17 61.063 18.17C60.2363 18.17 59.4896 18.0267 58.823 17.74C58.163 17.4533 57.5996 17.06 57.133 16.56C56.673 16.0533 56.3196 15.4633 56.073 14.79C55.8263 14.11 55.703 13.38 55.703 12.6V3.85H56.733V12.59C56.733 13.25 56.8296 13.8667 57.023 14.44C57.223 15.0067 57.5063 15.5 57.873 15.92C58.2463 16.34 58.6996 16.67 59.233 16.91C59.773 17.15 60.383 17.27 61.063 17.27ZM71.4442 18H70.4142V3.85H71.4442V18Z",fill:"currentColor"})]})},oi=function(){return fr("svg",{viewBox:"0 0 24 24",fill:"currentColor",children:fr("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"})})},ai=function(){return fr("svg",{viewBox:"0 0 24 24",fill:"currentColor",children:fr("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"})})},ui=function(){return fr("svg",{viewBox:"0 0 24 24",fill:"currentColor",children:fr("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"})})},li=function(){return fr("svg",{viewBox:"0 0 24 24",fill:"currentColor",children:fr("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"})})},ci=function(){return fr("svg",{viewBox:"0 0 24 24",fill:"currentColor",children:fr("path",{d:"M1 21h22L12 2 1 21zm12-3h-2v-2h2v2zm0-4h-2v-4h2v4z"})})},si=function(){return fr("svg",{viewBox:"0 0 24 24",fill:"currentColor",children:fr("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"})})},fi=function(){return fr("svg",{viewBox:"0 0 24 24",fill:"currentColor",children:fr("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"})})},di=function(){return fr("svg",{viewBox:"0 0 24 24",fill:"currentColor",children:fr("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"})})},hi=function(){return fr("svg",{viewBox:"0 0 24 24",fill:"currentColor",children:fr("path",{d:"M7.41 8.59 12 13.17l4.59-4.58L18 10l-6 6-6-6 1.41-1.41z"})})},pi=function(){return fr("svg",{viewBox:"0 0 24 24",fill:"currentColor",children:fr("path",{d:"m12 8-6 6 1.41 1.41L12 10.83l4.59 4.58L18 14z"})})},vi=function(){return fr("svg",{viewBox:"0 0 24 24",fill:"currentColor",children:fr("path",{d:"m7 10 5 5 5-5z"})})},mi=function(){return fr("svg",{viewBox:"0 0 24 24",fill:"currentColor",children:[fr("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"}),fr("path",{d:"M12.5 7H11v6l5.25 3.15.75-1.23-4.5-2.67z"})]})},yi=function(){return fr("svg",{viewBox:"0 0 24 24",fill:"currentColor",children:fr("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"})})},gi=function(){return fr("svg",{viewBox:"0 0 24 24",fill:"currentColor",children:fr("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"})})},_i=function(){return fr("svg",{viewBox:"0 0 24 24",fill:"currentColor",children:fr("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"})})},bi=function(){return fr("svg",{viewBox:"0 0 24 24",fill:"currentColor",children:fr("path",{d:"M8 5v14l11-7z"})})},Di=function(){return fr("svg",{viewBox:"0 0 24 24",fill:"currentColor",children:fr("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"})})},wi=function(){return fr("svg",{viewBox:"0 0 24 24",fill:"currentColor",children:fr("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"})})},xi=function(){return fr("svg",{viewBox:"0 0 24 24",fill:"currentColor",children:fr("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"})})},ki=function(){return fr("svg",{viewBox:"0 0 24 24",fill:"currentColor",children:fr("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"})})},Ci=function(){return fr("svg",{viewBox:"0 0 24 24",fill:"currentColor",children:fr("path",{d:"M6 19c0 1.1.9 2 2 2h8c1.1 0 2-.9 2-2V7H6v12zM19 4h-3.5l-1-1h-5l-1 1H5v2h14V4z"})})},Ei=function(){return fr("svg",{viewBox:"0 0 24 24",fill:"currentColor",children:fr("path",{d:"M19 13h-6v6h-2v-6H5v-2h6V5h2v6h6v2z"})})},Si=function(){return fr("svg",{viewBox:"0 0 24 24",fill:"currentColor",children:fr("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"})})},Ai=function(){return fr("svg",{viewBox:"0 0 24 24",fill:"currentColor",children:fr("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"})})},Fi=function(){return fr("svg",{viewBox:"0 0 24 24",fill:"currentColor",children:fr("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"})})},Ni=function(){return fr("svg",{viewBox:"0 0 24 24",fill:"currentColor",children:fr("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"})})},Oi=function(){return fr("svg",{viewBox:"0 0 24 24",fill:"currentColor",children:fr("path",{d:"M20 9H4v2h16V9zM4 15h16v-2H4v2z"})})},Ti=n(123),Bi=n.n(Ti),Mi=function(e){return getComputedStyle(document.documentElement).getPropertyValue("--".concat(e))},Li=function(e,t){document.documentElement.style.setProperty("--".concat(e),t)},Pi=function(e){var t=e.activeItem,n=e.items,r=e.color,i=void 0===r?Mi("color-primary"):r,o=e.onChange,a=e.indicatorPlacement,u=void 0===a?"bottom":a,l=re(null),c=_t(X({left:0,width:0,bottom:0}),2),s=c[0],f=c[1];return te((function(){if(l.current){var e=l.current,t=e.offsetLeft,n=e.offsetWidth,r=e.offsetHeight;f({left:t,width:n,bottom:"top"===u?r-2:0})}}),[t,l,n]),fr("div",{className:"vm-tabs",children:[n.map((function(e){return fr("div",{className:Bi()(qn({"vm-tabs-item":!0,"vm-tabs-item_active":t===e.value},e.className||"",e.className)),ref:t===e.value?l:void 0,style:{color:i},onClick:(n=e.value,function(){o(n)}),children:[e.icon&&fr("div",{className:Bi()({"vm-tabs-item__icon":!0,"vm-tabs-item__icon_single":!e.label}),children:e.icon}),e.label]},e.value);var n})),fr("div",{className:"vm-tabs__indicator",style:Kn(Kn({},s),{},{borderColor:i})})]})},Ii=[{value:"chart",icon:fr(wi,{}),label:"Graph",prometheusCode:0},{value:"code",icon:fr(ki,{}),label:"JSON",prometheusCode:3},{value:"table",icon:fr(xi,{}),label:"Table",prometheusCode:1}],$i=function(){var e=Yi().displayType,t=qi();return fr(Pi,{activeItem:e,items:Ii,onChange:function(n){var r;t({type:"SET_DISPLAY_TYPE",payload:null!==(r=n)&&void 0!==r?r:e})}})},Ri=ur("g0.tab",0),ji=Ii.find((function(e){return e.prometheusCode===+Ri||e.value===Ri})),zi=Jr("SERIES_LIMITS"),Ui={displayType:(null===ji||void 0===ji?void 0:ji.value)||"chart",nocache:!1,isTracingEnabled:!1,seriesLimits:zi?JSON.parse(Jr("SERIES_LIMITS")):or};function Hi(e,t){switch(t.type){case"SET_DISPLAY_TYPE":return Kn(Kn({},e),{},{displayType:t.payload});case"SET_SERIES_LIMITS":return Gr("SERIES_LIMITS",JSON.stringify(t.payload)),Kn(Kn({},e),{},{seriesLimits:t.payload});case"TOGGLE_QUERY_TRACING":return Kn(Kn({},e),{},{isTracingEnabled:!e.isTracingEnabled});case"TOGGLE_NO_CACHE":return Kn(Kn({},e),{},{nocache:!e.nocache});default:throw new Error}}var Vi=R({}),Yi=function(){return ue(Vi).state},qi=function(){return ue(Vi).dispatch},Wi={customStep:parseFloat(ur("g0.step_input","0")),yaxis:{limits:{enable:!1,range:{1:[0,0]}}}};function Qi(e,t){switch(t.type){case"TOGGLE_ENABLE_YAXIS_LIMITS":return Kn(Kn({},e),{},{yaxis:Kn(Kn({},e.yaxis),{},{limits:Kn(Kn({},e.yaxis.limits),{},{enable:!e.yaxis.limits.enable})})});case"SET_CUSTOM_STEP":return Kn(Kn({},e),{},{customStep:t.payload});case"SET_YAXIS_LIMITS":return Kn(Kn({},e),{},{yaxis:Kn(Kn({},e.yaxis),{},{limits:Kn(Kn({},e.yaxis.limits),{},{range:t.payload})})});default:throw new Error}}var Gi=R({}),Ji=function(){return ue(Gi).dispatch},Zi={runQuery:0,topN:ur("topN",10),date:ur("date",yr()(new Date).format(wr)),focusLabel:ur("focusLabel",""),match:ur("match",""),extraLabel:ur("extra_label","")};function Ki(e,t){switch(t.type){case"SET_TOP_N":return Kn(Kn({},e),{},{topN:t.payload});case"SET_DATE":return Kn(Kn({},e),{},{date:t.payload});case"SET_MATCH":return Kn(Kn({},e),{},{match:t.payload});case"SET_EXTRA_LABEL":return Kn(Kn({},e),{},{extraLabel:t.payload});case"SET_FOCUS_LABEL":return Kn(Kn({},e),{},{focusLabel:t.payload});case"RUN_QUERY":return Kn(Kn({},e),{},{runQuery:e.runQuery+1});default:throw new Error}}var Xi=R({}),eo=function(){return ue(Xi).state},to=function(){return ue(Xi).dispatch},no={topN:ur("topN",null),maxLifetime:ur("maxLifetime",""),runQuery:0};function ro(e,t){switch(t.type){case"SET_TOP_N":return Kn(Kn({},e),{},{topN:t.payload});case"SET_MAX_LIFE_TIME":return Kn(Kn({},e),{},{maxLifetime:t.payload});case"SET_RUN_QUERY":return Kn(Kn({},e),{},{runQuery:e.runQuery+1});default:throw new Error}}var io,oo=R({}),ao=function(){return ue(oo).state},uo={success:fr(fi,{}),error:fr(si,{}),warning:fr(ci,{}),info:fr(li,{})},lo=function(e){var t=e.variant,n=e.children;return fr("div",{className:Bi()(qn({"vm-alert":!0},"vm-alert_".concat(t),t)),children:[fr("div",{className:"vm-alert__icon",children:uo[t||"info"]}),fr("div",{className:"vm-alert__content",children:n})]})},co=R({showInfoMessage:function(){}}),so=function(){return ue(co)},fo=function(){for(var e=arguments.length,t=new Array(e),n=0;nd,v=r.top-20<0,m=r.left+g.width+20>f,y=r.left-20<0;return h&&(r.top=t.top-g.height-u),v&&(r.top=t.height+t.top+u),m&&(r.left=t.right-g.width-l),y&&(r.left=t.left+l),r}),[n,i,p,t]);d&&po(b,(function(){return v(!1)}),n);var x=Bi()(qn({"vm-popper":!0,"vm-popper_open":p},"vm-popper_open_".concat(l),l));return fr(m,{children:p&&mt.createPortal(fr("div",{className:x,ref:b,style:w,children:t}),document.body)})},mo=function(e){var t=e.children,n=e.title,r=e.open,i=e.placement,o=void 0===i?"bottom-center":i,a=e.offset,u=void 0===a?{top:6,left:0}:a,l=_t(X(!1),2),c=l[0],s=l[1],f=_t(X({width:0,height:0}),2),d=f[0],h=f[1],p=re(null),v=re(null),y=function(){return s(!1)};te((function(){return window.addEventListener("scroll",y),function(){window.removeEventListener("scroll",y)}}),[]),te((function(){v.current&&c&&h({width:v.current.clientWidth,height:v.current.clientHeight})}),[c]);var g=oe((function(){var e,t=null===p||void 0===p||null===(e=p.current)||void 0===e?void 0:e.base;if(!t||!c)return{};var n=t.getBoundingClientRect(),r={top:0,left:0},i="bottom-right"===o||"top-right"===o,a="bottom-left"===o||"top-left"===o,l=null===o||void 0===o?void 0:o.includes("top"),s=(null===u||void 0===u?void 0:u.top)||0,f=(null===u||void 0===u?void 0:u.left)||0;r.left=n.left-(d.width-n.width)/2+f,r.top=n.height+n.top+s,i&&(r.left=n.right-d.width),a&&(r.left=n.left+f),l&&(r.top=n.top-d.height-s);var h=window,v=h.innerWidth,m=h.innerHeight,y=r.top+d.height+20>m,g=r.top-20<0,_=r.left+d.width+20>v,b=r.left-20<0;return y&&(r.top=n.top-d.height-s),g&&(r.top=n.height+n.top+s),_&&(r.left=n.right-d.width-f),b&&(r.left=n.left+f),r.top<0&&(r.top=20),r.left<0&&(r.left=20),r}),[p,o,c,d]),_=function(){"boolean"!==typeof r&&s(!0)},b=function(){s(!1)};return te((function(){"boolean"===typeof r&&s(r)}),[r]),te((function(){var e,t=null===p||void 0===p||null===(e=p.current)||void 0===e?void 0:e.base;if(t)return t.addEventListener("mouseenter",_),t.addEventListener("mouseleave",b),function(){t.removeEventListener("mouseenter",_),t.removeEventListener("mouseleave",b)}}),[p]),fr(m,{children:[fr(m,{ref:p,children:t}),c&&mt.createPortal(fr("div",{className:"vm-tooltip",ref:v,style:g,children:n}),document.body)]})},yo=[{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"}],go=function(){var e=Qr(),t=er(),n=_t(X(!1),2),r=n[0],i=n[1],o=_t(X(yo[0]),2),a=o[0],u=o[1];te((function(){var t,n=a.seconds;return r?t=setInterval((function(){e({type:"RUN_QUERY"})}),1e3*n):u(yo[0]),function(){t&&clearInterval(t)}}),[a,r]);var l=_t(X(!1),2),c=l[0],s=l[1],f=re(null),d=function(e){return function(){!function(e){(r&&!e.seconds||!r&&e.seconds)&&i((function(e){return!e})),u(e),s(!1)}(e)}};return fr(m,{children:[fr("div",{className:"vm-execution-controls",children:fr("div",{className:Bi()({"vm-execution-controls-buttons":!0,"vm-header-button":!t}),children:[fr(mo,{title:"Refresh dashboard",children:fr(ho,{variant:"contained",color:"primary",onClick:function(){e({type:"RUN_QUERY"})},startIcon:fr(di,{})})}),fr(mo,{title:"Auto-refresh control",children:fr("div",{ref:f,children:fr(ho,{variant:"contained",color:"primary",fullWidth:!0,endIcon:fr("div",{className:Bi()({"vm-execution-controls-buttons__arrow":!0,"vm-execution-controls-buttons__arrow_open":c}),children:fr(hi,{})}),onClick:function(){s((function(e){return!e}))},children:a.title})})})]})}),fr(vo,{open:c,placement:"bottom-right",onClose:function(){s(!1)},buttonRef:f,children:fr("div",{className:"vm-execution-controls-list",children:yo.map((function(e){return fr("div",{className:Bi()({"vm-list__item":!0,"vm-list__item_active":e.seconds===a.seconds}),onClick:d(e),children:e.title},e.seconds)}))})})]})},_o=function(e){var t=e.relativeTime,n=e.setDuration;return fr("div",{className:"vm-time-duration",children:Ir.map((function(e){var r,i=e.id,o=e.duration,a=e.until,u=e.title;return fr("div",{className:Bi()({"vm-list__item":!0,"vm-list__item_active":i===t}),onClick:(r={duration:o,until:a(),id:i},function(){n(r)}),children:u||o},i)}))})},bo=function(e){var t=_t(X({width:0,height:0}),2),n=t[0],r=t[1];return te((function(){var t=new ResizeObserver((function(e){var t=e[0].contentRect,n=t.width,i=t.height;r({width:n,height:i})}));return e&&t.observe(e),function(){e&&t.unobserve(e)}}),[]),n},Do=function(e){var t=e.viewDate,n=e.displayYears,r=e.onChangeViewDate;return fr("div",{className:"vm-calendar-header",children:[fr("div",{className:"vm-calendar-header-left",onClick:e.toggleDisplayYears,children:[fr("span",{className:"vm-calendar-header-left__date",children:t.format("MMMM YYYY")}),fr("div",{className:"vm-calendar-header-left__select-year",children:fr(vi,{})})]}),!n&&fr("div",{className:"vm-calendar-header-right",children:[fr("div",{className:"vm-calendar-header-right__prev",onClick:function(){r(t.subtract(1,"month"))},children:fr(hi,{})}),fr("div",{className:"vm-calendar-header-right__next",onClick:function(){r(t.add(1,"month"))},children:fr(hi,{})})]})]})},wo=["Sunday","Monday","Tuesday","Wednesday","Thursday","Friday","Saturday"],xo=function(e){var t=e.viewDate,n=e.selectDate,r=e.onChangeSelectDate,i=yr()().startOf("day"),o=oe((function(){var e=new Array(42).fill(null),n=t.startOf("month"),r=t.endOf("month").diff(n,"day")+1,i=new Array(r).fill(n).map((function(e,t){return e.add(t,"day")})),o=n.day();return e.splice.apply(e,[o,r].concat(bt(i))),e}),[t]),a=function(e){return function(){e&&r(e)}};return fr("div",{className:"vm-calendar-body",children:[wo.map((function(e){return fr("div",{className:"vm-calendar-body-cell vm-calendar-body-cell_weekday",children:e[0]},e)})),o.map((function(e,t){return fr("div",{className:Bi()({"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.toISOString())===n.startOf("day").toISOString(),"vm-calendar-body-cell_day_today":(e&&e.toISOString())===i.toISOString()}),onClick:a(e),children:e&&e.format("D")},e?e.toISOString():t)}))]})},ko=function(e){var t=e.viewDate,n=e.onChangeViewDate,r=oe((function(){return t.format("YYYY")}),[t]),i=oe((function(){var e=yr()().subtract(103,"year");return new Array(206).fill(e).map((function(e,t){return e.add(t,"year")}))}),[t]);te((function(){var e=document.getElementById("vm-calendar-year-".concat(r));e&&e.scrollIntoView({block:"center"})}),[]);return fr("div",{className:"vm-calendar-years",children:i.map((function(e){return fr("div",{className:Bi()({"vm-calendar-years__year":!0,"vm-calendar-years__year_selected":e.format("YYYY")===r}),id:"vm-calendar-year-".concat(e.format("YYYY")),onClick:(t=e,function(){n(t)}),children:e.format("YYYY")},e.format("YYYY"));var t}))})};!function(e){e[e.hour=0]="hour",e[e.minutes=1]="minutes",e[e.seconds=2]="seconds"}(io||(io={}));var Co,Eo=function(e){var t=e.selectDate,n=e.onChangeTime,r=e.onClose,i=_t(X(io.hour),2),o=i[0],a=i[1],u=_t(X(t.format("HH")),2),l=u[0],c=u[1],s=_t(X(t.format("mm")),2),f=s[0],d=s[1],h=_t(X(t.format("ss")),2),p=h[0],v=h[1],m=oe((function(){return o===io.hour?new Array(24).fill("00").map((function(e,t){return{value:t,degrees:t/12*360,offset:0===t||t>12,title:t?"".concat(t):e}})):new Array(60).fill("00").map((function(e,t){return{value:t,degrees:t/60*360,offset:!1,title:t?"".concat(t):e}}))}),[o,l,f,p]),y=oe((function(){switch(o){case io.hour:return+l/12*360;case io.minutes:return+f/60*360;case io.seconds:return+p/60*360}}),[o,l,f,p]),g=re(null),_=re(null),b=re(null),D=function(e){return function(t){!function(e,t){t.target.select(),a(e)}(e,t)}};return te((function(){n("".concat(l,":").concat(f,":").concat(p))}),[l,f,p]),te((function(){c(t.format("HH")),d(t.format("mm")),v(t.format("ss"))}),[t]),te((function(){g.current&&g.current.focus()}),[]),fr("div",{className:"vm-calendar-time-picker",children:[fr("div",{className:"vm-calendar-time-picker-clock",children:[fr("div",{className:Bi()({"vm-calendar-time-picker-clock__arrow":!0,"vm-calendar-time-picker-clock__arrow_offset":o===io.hour&&("00"===l||+l>12)}),style:{transform:"rotate(".concat(y,"deg)")}}),m.map((function(e){return fr("div",{className:Bi()({"vm-calendar-time-picker-clock__time":!0,"vm-calendar-time-picker-clock__time_offset":e.offset,"vm-calendar-time-picker-clock__time_hide":m.length>24&&e.value%5}),style:{transform:"rotate(".concat(e.degrees,"deg)")},onClick:(t=e.value,function(){var e=String(t);switch(o){case io.hour:c(e),_.current&&_.current.focus();break;case io.minutes:d(e),b.current&&b.current.focus();break;case io.seconds:v(e),r()}}),children:fr("span",{style:{transform:"rotate(-".concat(e.degrees,"deg)")},children:e.title})},e.value);var t}))]}),fr("div",{className:"vm-calendar-time-picker-fields",children:[fr("input",{className:"vm-calendar-time-picker-fields__input",value:l,onChange:function(e){var t=e.target,n=t.value,r=+n>23?"23":n;t.value=r,c(r),n.length>1&&_.current&&_.current.focus()},onFocus:D(io.hour),ref:g,type:"number",min:0,max:24}),fr("span",{children:":"}),fr("input",{className:"vm-calendar-time-picker-fields__input",value:f,onChange:function(e){var t=e.target,n=t.value,r=+n>59?"59":n;t.value=r,d(r),n.length>1&&b.current&&b.current.focus()},onFocus:D(io.minutes),ref:_,type:"number",min:0,max:60}),fr("span",{children:":"}),fr("input",{className:"vm-calendar-time-picker-fields__input",value:p,onChange:function(e){var t=e.target,n=t.value,i=+n>59?"59":n;t.value=i,v(i),n.length>1&&b.current&&r()},onFocus:D(io.seconds),ref:b,type:"number",min:0,max:60})]})]})},So=[{value:"date",icon:fr(yi,{})},{value:"time",icon:fr(mi,{})}],Ao=function(e){var t=e.date,n=e.timepicker,r=void 0!==n&&n,i=e.format,o=void 0===i?xr:i,a=e.onChange,u=e.onClose,l=_t(X(!1),2),c=l[0],s=l[1],f=_t(X(yr()(t)),2),d=f[0],h=f[1],p=_t(X(yr()(t)),2),v=p[0],y=p[1],g=_t(X(So[0].value),2),_=g[0],b=g[1],D=function(e){h(e),s(!1)};return te((function(){v.format()!==yr()(t).format()&&a(v.format(o))}),[v]),fr("div",{className:"vm-calendar",children:["date"===_&&fr(Do,{viewDate:d,onChangeViewDate:D,toggleDisplayYears:function(){s((function(e){return!e}))},displayYears:c}),"date"===_&&fr(m,{children:[!c&&fr(xo,{viewDate:d,selectDate:v,onChangeSelectDate:function(e){y(e),r&&b("time")}}),c&&fr(ko,{viewDate:d,onChangeViewDate:D})]}),"time"===_&&fr(Eo,{selectDate:v,onChangeTime:function(e){var t=_t(e.split(":"),3),n=t[0],r=t[1],i=t[2];y((function(e){return e.set("hour",+n).set("minute",+r).set("second",+i)}))},onClose:function(){u&&u()}}),r&&fr("div",{className:"vm-calendar__tabs",children:fr(Pi,{activeItem:_,items:So,onChange:function(e){b(e)},indicatorPlacement:"top"})})]})},Fo=Ce((function(e,t){var n=e.date,r=e.targetRef,i=e.format,o=void 0===i?xr:i,a=e.timepicker,u=e.onChange,l=_t(X(!1),2),c=l[0],s=l[1],f=oe((function(){return n?yr()(n):yr()()}),[n]),d=function(){s((function(e){return!e}))},h=function(){s(!1)},p=function(e){"Escape"!==e.key&&"Enter"!==e.key||h()};return te((function(){var e;return null===(e=r.current)||void 0===e||e.addEventListener("click",d),function(){var e;null===(e=r.current)||void 0===e||e.removeEventListener("click",d)}}),[r]),te((function(){return window.addEventListener("keyup",p),function(){window.removeEventListener("keyup",p)}}),[]),fr(m,{children:fr(vo,{open:c,buttonRef:r,placement:"bottom-right",onClose:h,children:fr("div",{ref:t,children:fr(Ao,{date:f,format:o,timepicker:a,onChange:function(e){a||h(),u(e)},onClose:h})})})})})),No=Fo,Oo=function(){var e=re(null),t=bo(document.body),n=oe((function(){return t.width>1120}),[t]),r=_t(X(),2),i=r[0],o=r[1],a=_t(X(),2),u=a[0],l=a[1],c=oe((function(){return yr()(u).format(xr)}),[u]),s=oe((function(){return yr()(i).format(xr)}),[i]),f=Wr(),d=f.period,h=d.end,p=d.start,v=f.relativeTime,y=Qr(),g=er();te((function(){o(Mr(Pr(h)))}),[h]),te((function(){l(Mr(Pr(p)))}),[p]);var _=oe((function(){return{start:yr()(Pr(p)).format(xr),end:yr()(Pr(h)).format(xr)}}),[p,h]),b=oe((function(){return v&&"none"!==v?v.replace(/_/g," "):"".concat(_.start," - ").concat(_.end)}),[v,_]),D=re(null),w=re(null),x=re(null),k=re(null),C=_t(X(!1),2),E=C[0],S=C[1],A=re(null),F=function(){S(!1)};return po(e,(function(e){var t,n,r=e.target,i=(null===D||void 0===D?void 0:D.current)&&D.current.contains(r),o=(null===w||void 0===w?void 0:w.current)&&w.current.contains(r),a=(null===x||void 0===x?void 0:x.current)&&(null===x||void 0===x||null===(t=x.current)||void 0===t?void 0:t.contains(r)),u=(null===k||void 0===k?void 0:k.current)&&(null===k||void 0===k||null===(n=k.current)||void 0===n?void 0:n.contains(r));i||o||a||u||F()})),fr(m,{children:[fr("div",{ref:A,children:fr(mo,{title:"Time range controls",children:fr(ho,{className:g?"":"vm-header-button",variant:"contained",color:"primary",startIcon:fr(mi,{}),onClick:function(){S((function(e){return!e}))},children:n&&fr("span",{children:b})})})}),fr(vo,{open:E,buttonRef:A,placement:"bottom-right",onClose:F,clickOutside:!1,children:fr("div",{className:"vm-time-selector",ref:e,children:[fr("div",{className:"vm-time-selector-left",children:[fr("div",{className:"vm-time-selector-left-inputs",children:[fr("div",{className:"vm-time-selector-left-inputs__date",ref:D,children:[fr("label",{children:"From:"}),fr("span",{children:c}),fr(yi,{}),fr(No,{ref:x,date:u||"",onChange:function(e){return l(e)},targetRef:D,timepicker:!0})]}),fr("div",{className:"vm-time-selector-left-inputs__date",ref:w,children:[fr("label",{children:"To:"}),fr("span",{children:s}),fr(yi,{}),fr(No,{ref:k,date:i||"",onChange:function(e){return o(e)},targetRef:w,timepicker:!0})]})]}),fr(ho,{variant:"text",startIcon:fr(gi,{}),onClick:function(){return y({type:"RUN_QUERY_TO_NOW"})},children:"switch to now"}),fr("div",{className:"vm-time-selector-left__controls",children:[fr(ho,{color:"error",variant:"outlined",onClick:function(){o(Mr(Pr(h))),l(Mr(Pr(p))),S(!1)},children:"Cancel"}),fr(ho,{color:"primary",onClick:function(){return u&&i&&y({type:"SET_PERIOD",payload:{from:new Date(u),to:new Date(i)}}),void S(!1)},children:"Apply"})]})]}),fr(_o,{relativeTime:v||"",setDuration:function(e){var t=e.duration,n=e.until,r=e.id;y({type:"SET_RELATIVE_TIME",payload:{duration:t,until:n,id:r}}),S(!1)}})]})})]})};!function(e){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"}(Co||(Co={}));var To=function(e){var t=e.label,n=e.value,r=e.type,i=void 0===r?"text":r,o=e.error,a=void 0===o?"":o,u=e.endIcon,l=e.startIcon,c=e.disabled,s=void 0!==c&&c,f=e.autofocus,d=void 0!==f&&f,h=e.helperText,p=e.onChange,v=e.onEnter,m=e.onKeyDown,y=re(null),g=re(null),_=oe((function(){return"textarea"===i?g:y}),[i]),b=Bi()({"vm-text-field__input":!0,"vm-text-field__input_error":a,"vm-text-field__input_icon-start":l,"vm-text-field__input_disabled":s,"vm-text-field__input_textarea":"textarea"===i}),D=function(e){m&&m(e),"Enter"!==e.key||e.shiftKey||(e.preventDefault(),v&&v())},w=function(e){s||p&&p(e.target.value)};return te((function(){var e;d&&(null===_||void 0===_||null===(e=_.current)||void 0===e?void 0:e.focus)&&_.current.focus()}),[_,d]),fr("label",{className:Bi()({"vm-text-field":!0,"vm-text-field_textarea":"textarea"===i}),"data-replicated-value":n,children:[l&&fr("div",{className:"vm-text-field__icon-start",children:l}),u&&fr("div",{className:"vm-text-field__icon-end",children:u}),"textarea"===i?fr("textarea",{className:b,disabled:s,ref:g,value:n,onInput:w,onKeyDown:D,rows:1}):fr("input",{className:b,disabled:s,ref:y,value:n,onInput:w,onKeyDown:D,type:i}),t&&fr("span",{className:"vm-text-field__label",children:t}),fr("span",{className:"vm-text-field__error","data-show":!!a,children:a}),h&&!a&&fr("span",{className:"vm-text-field__helper-text",children:h})]})},Bo=function(e){var t;try{t=new URL(e)}catch(g){return!1}return"http:"===t.protocol||"https:"===t.protocol},Mo=function(e){var t=e.serverUrl,n=e.onChange,r=e.onEnter,i=_t(X(""),2),o=i[0],a=i[1];return fr(To,{autofocus:!0,label:"Server URL",value:t,error:o,onChange:function(e){var t=e||"";n(t),a(""),t||a(Co.emptyServer),Bo(t)||a(Co.validServer)},onEnter:r})},Lo=function(e){var t=e.title,n=e.children,r=e.onClose,i=function(e){"Escape"===e.key&&r()};return te((function(){return window.addEventListener("keyup",i),function(){window.removeEventListener("keyup",i)}}),[]),mt.createPortal(fr("div",{className:"vm-modal",onMouseDown:r,children:fr("div",{className:"vm-modal-content",children:[fr("div",{className:"vm-modal-content-header",children:[t&&fr("div",{className:"vm-modal-content-header__title",children:t}),fr("div",{className:"vm-modal-header__close",children:fr(ho,{variant:"text",size:"small",onClick:r,children:fr(ai,{})})})]}),fr("div",{className:"vm-modal-content-body",onMouseDown:function(e){e.stopPropagation()},children:n})]})}),document.body)},Po=[{label:"Graph",type:"chart"},{label:"JSON",type:"code"},{label:"Table",type:"table"}],Io=function(e){var t=e.limits,n=e.onChange,r=e.onEnter,i=_t(X({table:"",chart:"",code:""}),2),o=i[0],a=i[1],u=function(e){return function(r){!function(e,r){var i=e||"";a((function(e){return Kn(Kn({},e),{},qn({},r,+i<0?Co.positiveNumber:""))})),n(Kn(Kn({},t),{},qn({},r,i||1/0)))}(r,e)}};return fr("div",{className:"vm-limits-configurator",children:[fr("div",{className:"vm-limits-configurator-title",children:["Series limits by tabs",fr(mo,{title:"To disable limits set to 0",children:fr(ho,{variant:"text",color:"primary",size:"small",startIcon:fr(li,{})})}),fr("div",{className:"vm-limits-configurator-title__reset",children:fr(ho,{variant:"text",color:"primary",size:"small",startIcon:fr(ui,{}),onClick:function(){n(or)},children:"Reset"})})]}),fr("div",{className:"vm-limits-configurator__inputs",children:Po.map((function(e){return fr(To,{label:e.label,value:t[e.type],error:o[e.type],onChange:u(e.type),onEnter:r,type:"number"},e.type)}))})]})},$o="Settings",Ro=function(){var e=hr().serverUrl,t=Yi().seriesLimits,n=pr(),r=qi(),i=_t(X(e),2),o=i[0],a=i[1],u=_t(X(t),2),l=u[0],c=u[1],s=_t(X(!1),2),f=s[0],d=s[1],h=function(){return d(!1)},p=function(){n({type:"SET_SERVER",payload:o}),r({type:"SET_SERIES_LIMITS",payload:l}),h()};return fr(m,{children:[fr(mo,{title:$o,children:fr(ho,{className:"vm-header-button",variant:"contained",color:"primary",startIcon:fr(oi,{}),onClick:function(){return d(!0)}})}),f&&fr(Lo,{title:$o,onClose:h,children:fr("div",{className:"vm-server-configurator",children:[fr("div",{className:"vm-server-configurator__input",children:fr(Mo,{serverUrl:o,onChange:a,onEnter:p})}),fr("div",{className:"vm-server-configurator__input",children:fr(Io,{limits:l,onChange:c,onEnter:p})}),fr("div",{className:"vm-server-configurator__footer",children:[fr(ho,{variant:"outlined",color:"error",onClick:h,children:"Cancel"}),fr(ho,{variant:"contained",onClick:p,children:"apply"})]})]})})]})},jo={windows:"Windows",mac:"Mac OS",linux:"Linux"},zo=(Object.values(jo).find((function(e){return navigator.userAgent.indexOf(e)>=0}))||"unknown")===jo.mac?"Cmd":"Ctrl",Uo=[{title:"Query",list:[{keys:["Enter"],description:"Run"},{keys:["Shift","Enter"],description:"Multi-line queries"},{keys:[zo,"Arrow Up"],description:"Previous command from the Query history"},{keys:[zo,"Arrow Down"],description:"Next command from the Query history"}]},{title:"Graph",list:[{keys:[zo,"Scroll Up"],description:"Zoom in"},{keys:[zo,"Scroll Down"],description:"Zoom out"},{keys:[zo,"Click and Drag"],description:"Move the graph left/right"}]},{title:"Legend",list:[{keys:["Mouse Click"],description:"Select series"},{keys:[zo,"Mouse Click"],description:"Toggle multiple series"}]}],Ho=function(){var e=_t(X(!1),2),t=e[0],n=e[1],r=er();return fr(m,{children:[fr(mo,{title:"Shortcut keys",placement:"bottom-center",children:fr(ho,{className:r?"":"vm-header-button",variant:"contained",color:"primary",startIcon:fr(_i,{}),onClick:function(){n(!0)}})}),t&&fr(Lo,{title:"Shortcut keys",onClose:function(){n(!1)},children:fr("div",{className:"vm-shortcuts",children:Uo.map((function(e){return fr("div",{className:"vm-shortcuts-section",children:[fr("h3",{className:"vm-shortcuts-section__title",children:e.title}),fr("div",{className:"vm-shortcuts-section-list",children:e.list.map((function(e){return fr("div",{className:"vm-shortcuts-section-list-item",children:[fr("div",{className:"vm-shortcuts-section-list-item__key",children:e.keys.map((function(t,n){return fr(m,{children:[fr("code",{children:t},t),n!==e.keys.length-1?"+":""]})}))}),fr("p",{className:"vm-shortcuts-section-list-item__description",children:e.description})]},e.keys.join("+"))}))})]},e.title)}))})})]})},Vo=function(){var e=er(),t=re(null),n=eo().date,r=to(),i=oe((function(){return yr()(n).format(wr)}),[n]);return fr("div",{children:[fr("div",{ref:t,children:fr(mo,{title:"Date control",children:fr(ho,{className:e?"":"vm-header-button",variant:"contained",color:"primary",startIcon:fr(yi,{}),children:i})})}),fr(No,{date:n||"",format:wr,onChange:function(e){r({type:"SET_DATE",payload:e})},targetRef:t})]})},Yo=function(){var e=Mi("color-primary"),t=er(),n=Xn().headerStyles,r=(n=void 0===n?{}:n).background,i=void 0===r?t?"#FFF":e:r,o=n.color,a=void 0===o?t?e:"#FFF":o,u=Sn(),l=En(),c=l.search,s=l.pathname,f=oe((function(){return[{label:"Custom panel",value:Jn.home},{label:"Dashboards",value:Jn.dashboards,hide:t},{label:"Cardinality",value:Jn.cardinality},{label:"Top queries",value:Jn.topQueries},{label:"Trace analyzer",value:Jn.trace}]}),[t]),d=_t(X(s),2),h=d[0],p=d[1],v=oe((function(){return(Gn[s]||{}).header||{}}),[s]),m=function(e){u({pathname:e,search:c})};return te((function(){p(s)}),[s]),fr("header",{className:Bi()({"vm-header":!0,"vm-header_app":t}),style:{background:i,color:a},children:[!t&&fr("div",{className:"vm-header-logo",style:{color:a},children:[fr("div",{className:"vm-header-logo__icon",onClick:function(){m(Jn.home),ar({}),window.location.reload()},children:fr(ii,{})}),fr("a",{className:"vm-header-logo__issue",target:"_blank",href:"https://github.com/VictoriaMetrics/VictoriaMetrics/issues/new",rel:"noreferrer",children:"create an issue"})]}),fr("div",{className:"vm-header-nav",children:fr(Pi,{activeItem:h,items:f.filter((function(e){return!e.hide})),color:a,onChange:function(e){p(e),u(e)}})}),fr("div",{className:"vm-header__settings",children:[(null===v||void 0===v?void 0:v.timeSelector)&&fr(Oo,{}),(null===v||void 0===v?void 0:v.cardinalityDatePicker)&&fr(Vo,{}),(null===v||void 0===v?void 0:v.executionControls)&&fr(go,{}),(null===v||void 0===v?void 0:v.globalSettings)&&!t&&fr(Ro,{}),fr(Ho,{})]})]})},qo=function(){var e=er();return fr("section",{className:"vm-container",children:[fr(Yo,{}),fr("div",{className:Bi()({"vm-container-body":!0,"vm-container-body_app":e}),children:fr(In,{})})]})};function Wo(e,t){var n="undefined"!==typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(!n){if(Array.isArray(e)||(n=gt(e))||t&&e&&"number"===typeof e.length){n&&(e=n);var r=0,i=function(){};return{s:i,n:function(){return r>=e.length?{done:!0}:{done:!1,value:e[r++]}},e:function(e){throw e},f:i}}throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}var o,a=!0,u=!1;return{s:function(){n=n.call(e)},n:function(){var e=n.next();return a=e.done,e},e:function(e){u=!0,o=e},f:function(){try{a||null==n.return||n.return()}finally{if(u)throw o}}}}var Qo,Go,Jo="u-off",Zo="u-label",Ko="width",Xo="height",ea="top",ta="bottom",na="left",ra="right",ia="#000",oa="#0000",aa="mousemove",ua="mousedown",la="mouseup",ca="mouseenter",sa="mouseleave",fa="dblclick",da="change",ha="dppxchange",pa="undefined"!=typeof window,va=pa?document:null,ma=pa?window:null,ya=pa?navigator:null;function ga(e,t){if(null!=t){var n=e.classList;!n.contains(t)&&n.add(t)}}function _a(e,t){var n=e.classList;n.contains(t)&&n.remove(t)}function ba(e,t,n){e.style[t]=n+"px"}function Da(e,t,n,r){var i=va.createElement(e);return null!=t&&ga(i,t),null!=n&&n.insertBefore(i,r),i}function wa(e,t){return Da("div",e,t)}var xa=new WeakMap;function ka(e,t,n,r,i){var o="translate("+t+"px,"+n+"px)";o!=xa.get(e)&&(e.style.transform=o,xa.set(e,o),t<0||n<0||t>r||n>i?ga(e,Jo):_a(e,Jo))}var Ca=new WeakMap;function Ea(e,t,n){var r=t+n;r!=Ca.get(e)&&(Ca.set(e,r),e.style.background=t,e.style.borderColor=n)}var Sa=new WeakMap;function Aa(e,t,n,r){var i=t+""+n;i!=Sa.get(e)&&(Sa.set(e,i),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)}var Fa={passive:!0},Na=Kn(Kn({},Fa),{},{capture:!0});function Oa(e,t,n,r){t.addEventListener(e,n,r?Na:Fa)}function Ta(e,t,n,r){t.removeEventListener(e,n,r?Na:Fa)}function Ba(e,t,n,r){var i;n=n||0;for(var o=(r=r||t.length-1)<=2147483647;r-n>1;)t[i=o?n+r>>1:Ka((n+r)/2)]=t&&i<=n;i+=r)if(null!=e[i])return i;return-1}function La(e,t,n,r){var i=lu,o=-lu;if(1==r)i=e[t],o=e[n];else if(-1==r)i=e[n],o=e[t];else for(var a=t;a<=n;a++)null!=e[a]&&(i=tu(i,e[a]),o=nu(o,e[a]));return[i,o]}function Pa(e,t,n){for(var r=lu,i=-lu,o=t;o<=n;o++)e[o]>0&&(r=tu(r,e[o]),i=nu(i,e[o]));return[r==lu?1:r,i==-lu?10:i]}pa&&function e(){var t=devicePixelRatio;Qo!=t&&(Qo=t,Go&&Ta(da,Go,e),Go=matchMedia("(min-resolution: ".concat(Qo-.001,"dppx) and (max-resolution: ").concat(Qo+.001,"dppx)")),Oa(da,Go,e),ma.dispatchEvent(new CustomEvent(ha)))}();var Ia=[0,0];function $a(e,t,n,r){return Ia[0]=n<0?bu(e,-n):e,Ia[1]=r<0?bu(t,-r):t,Ia}function Ra(e,t,n,r){var i,o,a,u=iu(e),l=10==n?ou:au;return e==t&&(-1==u?(e*=n,t/=n):(e/=n,t*=n)),r?(i=Ka(l(e)),o=eu(l(t)),e=(a=$a(ru(n,i),ru(n,o),i,o))[0],t=a[1]):(i=Ka(l(Za(e))),o=Ka(l(Za(t))),e=_u(e,(a=$a(ru(n,i),ru(n,o),i,o))[0]),t=gu(t,a[1])),[e,t]}function ja(e,t,n,r){var i=Ra(e,t,n,r);return 0==e&&(i[0]=0),0==t&&(i[1]=0),i}var za={mode:3,pad:.1},Ua={pad:0,soft:null,mode:0},Ha={min:Ua,max:Ua};function Va(e,t,n,r){return Fu(n)?qa(e,t,n):(Ua.pad=n,Ua.soft=r?0:null,Ua.mode=r?3:0,qa(e,t,Ha))}function Ya(e,t){return null==e?t:e}function qa(e,t,n){var r=n.min,i=n.max,o=Ya(r.pad,0),a=Ya(i.pad,0),u=Ya(r.hard,-lu),l=Ya(i.hard,lu),c=Ya(r.soft,lu),s=Ya(i.soft,-lu),f=Ya(r.mode,0),d=Ya(i.mode,0),h=t-e;h<1e-9&&(h=0,0!=e&&0!=t||(h=1e-9,2==f&&c!=lu&&(o=0),2==d&&s!=-lu&&(a=0)));var p=h||Za(t)||1e3,v=ou(p),m=ru(10,Ka(v)),y=bu(_u(e-p*(0==h?0==e?.1:1:o),m/10),9),g=e>=c&&(1==f||3==f&&y<=c||2==f&&y>=c)?c:lu,_=nu(u,y=g?g:tu(g,y)),b=bu(gu(t+p*(0==h?0==t?.1:1:a),m/10),9),D=t<=s&&(1==d||3==d&&b>=s||2==d&&b<=s)?s:-lu,w=tu(l,b>D&&t<=D?D:nu(D,b));return _==w&&0==_&&(w=100),[_,w]}var Wa=new Intl.NumberFormat(pa?ya.language:"en-US"),Qa=function(e){return Wa.format(e)},Ga=Math,Ja=Ga.PI,Za=Ga.abs,Ka=Ga.floor,Xa=Ga.round,eu=Ga.ceil,tu=Ga.min,nu=Ga.max,ru=Ga.pow,iu=Ga.sign,ou=Ga.log10,au=Ga.log2,uu=function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:1;return Ga.asinh(e/t)},lu=1/0;function cu(e){return 1+(0|ou((e^e>>31)-(e>>31)))}function su(e,t){return Xa(e/t)*t}function fu(e,t,n){return tu(nu(e,t),n)}function du(e){return"function"==typeof e?e:function(){return e}}var hu=function(e){return e},pu=function(e,t){return t},vu=function(e){return null},mu=function(e){return!0},yu=function(e,t){return e==t};function gu(e,t){return eu(e/t)*t}function _u(e,t){return Ka(e/t)*t}function bu(e,t){return Xa(e*(t=Math.pow(10,t)))/t}var Du=new Map;function wu(e){return((""+e).split(".")[1]||"").length}function xu(e,t,n,r){for(var i=[],o=r.map(wu),a=t;a=0&&a>=0?0:u)+(a>=o[c]?0:o[c]),d=bu(s,f);i.push(d),Du.set(d,f)}return i}var ku={},Cu=[],Eu=[null,null],Su=Array.isArray;function Au(e){return"string"==typeof e}function Fu(e){var t=!1;if(null!=e){var n=e.constructor;t=null==n||n==Object}return t}function Nu(e){return null!=e&&"object"==typeof e}var Ou=Object.getPrototypeOf(Uint8Array);function Tu(e){var t,n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:Fu;if(Su(e)){var r=e.find((function(e){return null!=e}));if(Su(r)||n(r)){t=Array(e.length);for(var i=0;io){for(r=a-1;r>=0&&null==e[r];)e[r--]=null;for(r=a+1;r12?t-12:t},AA:function(e){return e.getHours()>=12?"PM":"AM"},aa:function(e){return e.getHours()>=12?"pm":"am"},a:function(e){return e.getHours()>=12?"p":"a"},mm:function(e){return Uu(e.getMinutes())},m:function(e){return e.getMinutes()},ss:function(e){return Uu(e.getSeconds())},s:function(e){return e.getSeconds()},fff:function(e){return((t=e.getMilliseconds())<10?"00":t<100?"0":"")+t;var t}};function Vu(e,t){t=t||zu;for(var n,r=[],i=/\{([a-z]+)\}|[^{]+/gi;n=i.exec(e);)r.push("{"==n[0][0]?Hu[n[1]]:n[0]);return function(e){for(var n="",i=0;i=a,v=f>=o&&f=i?i:f,N=_+(Ka(c)-Ka(y))+gu(y-_,F);h.push(N);for(var O=t(N),T=O.getHours()+O.getMinutes()/n+O.getSeconds()/r,B=f/r,M=d/u.axes[l]._space;!((N=bu(N+f,1==e?0:3))>s);)if(B>1){var L=Ka(bu(T+B,6))%24,P=t(N).getHours()-L;P>1&&(P=-1),T=(T+B)%24,bu(((N-=P*r)-h[h.length-1])/f,3)*M>=.7&&h.push(N)}else h.push(N)}return h}}]}var cl=_t(ll(1),3),sl=cl[0],fl=cl[1],dl=cl[2],hl=_t(ll(.001),3),pl=hl[0],vl=hl[1],ml=hl[2];function yl(e,t){return e.map((function(e){return e.map((function(n,r){return 0==r||8==r||null==n?n:t(1==r||0==e[8]?n:e[1]+n)}))}))}function gl(e,t){return function(n,r,i,o,a){var u,l,c,s,f,d,h=t.find((function(e){return a>=e[0]}))||t[t.length-1];return r.map((function(t){var n=e(t),r=n.getFullYear(),i=n.getMonth(),o=n.getDate(),a=n.getHours(),p=n.getMinutes(),v=n.getSeconds(),m=r!=u&&h[2]||i!=l&&h[3]||o!=c&&h[4]||a!=s&&h[5]||p!=f&&h[6]||v!=d&&h[7]||h[1];return u=r,l=i,c=o,s=a,f=p,d=v,m(n)}))}}function _l(e,t,n){return new Date(e,t,n)}function bl(e,t){return t(e)}xu(2,-53,53,[1]);function Dl(e,t){return function(n,r){return t(e(r))}}var wl={show:!0,live:!0,isolate:!1,markers:{show:!0,width:2,stroke:function(e,t){var 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:[]};var xl=[0,0];function kl(e,t,n){return function(e){0==e.button&&n(e)}}function Cl(e,t,n){return n}var El={show:!0,x:!0,y:!0,lock:!1,move:function(e,t,n){return xl[0]=t,xl[1]=n,xl},points:{show:function(e,t){var n=e.cursor.points,r=wa(),i=n.size(e,t);ba(r,Ko,i),ba(r,Xo,i);var o=i/-2;ba(r,"marginLeft",o),ba(r,"marginTop",o);var a=n.width(e,t,i);return a&&ba(r,"borderWidth",a),r},size:function(e,t){return ql(e.series[t].points.width,1)},width:0,stroke:function(e,t){var n=e.series[t].points;return n._stroke||n._fill},fill:function(e,t){var n=e.series[t].points;return n._fill||n._stroke}},bind:{mousedown:kl,mouseup:kl,click:kl,dblclick:kl,mousemove:Cl,mouseleave:Cl,mouseenter:Cl},drag:{setScale:!0,x:!0,y:!1,dist:0,uni:null,_x:!1,_y:!1},focus:{prox:-1},left:-10,top:-10,idx:null,dataIdx:function(e,t,n){return n},idxs:null},Sl={show:!0,stroke:"rgba(0,0,0,0.07)",width:2},Al=Bu({},Sl,{filter:pu}),Fl=Bu({},Al,{size:10}),Nl=Bu({},Sl,{show:!1}),Ol='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"',Tl="bold "+Ol,Bl={show:!0,scale:"x",stroke:ia,space:50,gap:5,size:50,labelGap:0,labelSize:30,labelFont:Tl,side:2,grid:Al,ticks:Fl,border:Nl,font:Ol,rotate:0},Ml={show:!0,scale:"x",auto:!1,sorted:1,min:lu,max:-lu,idxs:[]};function Ll(e,t,n,r,i){return t.map((function(e){return null==e?"":Qa(e)}))}function Pl(e,t,n,r,i,o,a){for(var u=[],l=Du.get(i)||0,c=n=a?n:bu(gu(n,i),l);c<=r;c=bu(c+i,l))u.push(Object.is(c,-0)?0:c);return u}function Il(e,t,n,r,i,o,a){var u=[],l=e.scales[e.axes[t].scale].log,c=Ka((10==l?ou:au)(n));i=ru(l,c),c<0&&(i=bu(i,-c));var s=n;do{u.push(s),(s=bu(s+i,Du.get(i)))>=i*l&&(i=s)}while(s<=r);return u}function $l(e,t,n,r,i,o,a){var u=e.scales[e.axes[t].scale].asinh,l=r>u?Il(e,t,nu(u,n),r,i):[u],c=r>=0&&n<=0?[0]:[];return(n<-u?Il(e,t,nu(u,-r),-n,i):[u]).reverse().map((function(e){return-e})).concat(c,l)}var Rl=/./,jl=/[12357]/,zl=/[125]/,Ul=/1/;function Hl(e,t,n,r,i){var o=e.axes[n],a=o.scale,u=e.scales[a];if(3==u.distr&&2==u.log)return t;var l=e.valToPos,c=o._space,s=l(10,a),f=l(9,a)-s>=c?Rl:l(7,a)-s>=c?jl:l(5,a)-s>=c?zl:Ul;return t.map((function(e){return 4==u.distr&&0==e||f.test(e)?e:null}))}function Vl(e,t){return null==t?"":Qa(t)}var Yl={show:!0,scale:"y",stroke:ia,space:30,gap:5,size:50,labelGap:0,labelSize:30,labelFont:Tl,side:3,grid:Al,ticks:Fl,border:Nl,font:Ol,rotate:0};function ql(e,t){return bu((3+2*(e||1))*t,3)}var Wl={scale:null,auto:!0,sorted:0,min:lu,max:-lu},Ql={show:!0,auto:!0,sorted:0,alpha:1,facets:[Bu({},Wl,{scale:"x"}),Bu({},Wl,{scale:"y"})]},Gl={scale:"y",auto:!0,sorted:0,show:!0,spanGaps:!1,gaps:function(e,t,n,r,i){return i},alpha:1,points:{show:function(e,t){var n=e.series[0],r=n.scale,i=n.idxs,o=e._data[0],a=e.valToPos(o[i[0]],r,!0),u=e.valToPos(o[i[1]],r,!0),l=Za(u-a)/(e.series[t].points.space*Qo);return i[1]-i[0]<=l},filter:null},values:null,min:lu,max:-lu,idxs:[],path:null,clip:null};function Jl(e,t,n,r,i){return n/10}var Zl={time:!0,auto:!0,distr:1,log:10,asinh:1,min:null,max:null,dir:1,ori:0},Kl=Bu({},Zl,{time:!1,ori:1}),Xl={};function ec(e,t){var n=Xl[e];return n||(n={key:e,plots:[],sub:function(e){n.plots.push(e)},unsub:function(e){n.plots=n.plots.filter((function(t){return t!=e}))},pub:function(e,t,r,i,o,a,u){for(var l=0;l0){a=new Path2D;for(var u=0==t?hc:pc,l=n,c=0;cs[0]){var f=s[0]-l;f>0&&u(a,l,r,f,r+o),l=s[1]}}var d=n+i-l;d>0&&u(a,l,r,d,r+o)}return a}function ac(e,t,n,r,i,o,a){for(var u=[],l=1==i?n:r;l>=n&&l<=r;l+=i){if(null===t[l]){var c=l,s=l;if(1==i)for(;++l<=r&&null===t[l];)s=l;else for(;--l>=n&&null===t[l];)s=l;var f=o(e[c]),d=s==c?f:o(e[s]);f=a<=0?o(e[c-i]):f,(d=a>=0?o(e[s+i]):d)>=f&&u.push([f,d])}}return u}function uc(e){return 0==e?hu:1==e?Xa:function(t){return su(t,e)}}function lc(e){var t=0==e?cc:sc,n=0==e?function(e,t,n,r,i,o){e.arcTo(t,n,r,i,o)}:function(e,t,n,r,i,o){e.arcTo(n,t,i,r,o)},r=0==e?function(e,t,n,r,i){e.rect(t,n,r,i)}:function(e,t,n,r,i){e.rect(n,t,i,r)};return function(e,i,o,a,u){var l=arguments.length>5&&void 0!==arguments[5]?arguments[5]:0;0==l?r(e,i,o,a,u):(l=tu(l,a/2,u/2),t(e,i+l,o),n(e,i+a,o,i+a,o+u,l),n(e,i+a,o+u,i,o+u,l),n(e,i,o+u,i,o,l),n(e,i,o,i+a,o,l),e.closePath())}}var cc=function(e,t,n){e.moveTo(t,n)},sc=function(e,t,n){e.moveTo(n,t)},fc=function(e,t,n){e.lineTo(t,n)},dc=function(e,t,n){e.lineTo(n,t)},hc=lc(0),pc=lc(1),vc=function(e,t,n,r,i,o){e.arc(t,n,r,i,o)},mc=function(e,t,n,r,i,o){e.arc(n,t,r,i,o)},yc=function(e,t,n,r,i,o,a){e.bezierCurveTo(t,n,r,i,o,a)},gc=function(e,t,n,r,i,o,a){e.bezierCurveTo(n,t,i,r,a,o)};function _c(e){return function(e,t,n,r,i){return tc(e,t,(function(t,o,a,u,l,c,s,f,d,h,p){var v,m,y=t.pxRound,g=t.points;0==u.ori?(v=cc,m=vc):(v=sc,m=mc);var _=bu(g.width*Qo,3),b=(g.size-g.width)/2*Qo,D=bu(2*b,3),w=new Path2D,x=new Path2D,k=e.bbox,C=k.left,E=k.top,S=k.width,A=k.height;hc(x,C-D,E-D,S+2*D,A+2*D);var F=function(e){if(null!=a[e]){var t=y(c(o[e],u,h,f)),n=y(s(a[e],l,p,d));v(w,t+b,n),m(w,t,n,b,0,2*Ja)}};if(i)i.forEach(F);else for(var N=n;N<=r;N++)F(N);return{stroke:_>0?w:null,fill:w,clip:x,flags:3}}))}}function bc(e){return function(t,n,r,i,o,a){r!=i&&(o!=r&&a!=r&&e(t,n,r),o!=i&&a!=i&&e(t,n,i),e(t,n,a))}}var Dc=bc(fc),wc=bc(dc);function xc(e){var t=Ya(null===e||void 0===e?void 0:e.alignGaps,0);return function(e,n,r,i){return tc(e,n,(function(o,a,u,l,c,s,f,d,h,p,v){var m,y,g=o.pxRound,_=function(e){return g(s(e,l,p,d))},b=function(e){return g(f(e,c,v,h))};0==l.ori?(m=fc,y=Dc):(m=dc,y=wc);for(var D,w,x,k=l.dir*(0==l.ori?1:-1),C={stroke:new Path2D,fill:null,clip:null,band:null,gaps:null,flags:1},E=C.stroke,S=lu,A=-lu,F=_(a[1==k?r:i]),N=Ma(u,r,i,1*k),O=Ma(u,r,i,-1*k),T=_(a[N]),B=_(a[O]),M=1==k?r:i;M>=r&&M<=i;M+=k){var L=_(a[M]);L==F?null!=u[M]&&(w=b(u[M]),S==lu&&(m(E,L,w),D=w),S=tu(w,S),A=nu(w,A)):(S!=lu&&(y(E,F,S,A,D,w),x=F),null!=u[M]?(m(E,L,w=b(u[M])),S=A=D=w):(S=lu,A=-lu),F=L)}S!=lu&&S!=A&&x!=F&&y(E,F,S,A,D,w);var P=_t(nc(e,n),2),I=P[0],$=P[1];if(null!=o.fill||0!=I){var R=C.fill=new Path2D(E),j=b(o.fillTo(e,n,o.min,o.max,I));m(R,B,j),m(R,T,j)}if(!o.spanGaps){var z,U=[];(z=U).push.apply(z,bt(ac(a,u,r,i,k,_,t))),C.gaps=U=o.gaps(e,n,r,i,U),C.clip=oc(U,l.ori,d,h,p,v)}return 0!=$&&(C.band=2==$?[ic(e,n,r,i,E,-1),ic(e,n,r,i,E,1)]:ic(e,n,r,i,E,$)),C}))}}function kc(e,t,n,r,i,o){var a=e.length;if(a<2)return null;var u=new Path2D;if(n(u,e[0],t[0]),2==a)r(u,e[1],t[1]);else{for(var l=Array(a),c=Array(a-1),s=Array(a-1),f=Array(a-1),d=0;d0!==c[h]>0?l[h]=0:(l[h]=3*(f[h-1]+f[h])/((2*f[h]+f[h-1])/c[h-1]+(f[h]+2*f[h-1])/c[h]),isFinite(l[h])||(l[h]=0));l[a-1]=c[a-2];for(var p=0;p=i&&o+(l<5?Du.get(l):0)<=17)return[l,c]}while(++u0?e:t.clamp(r,e,t.min,t.max,t.key)):4==t.distr?uu(e,t.asinh):e)-t._min)/(t._max-t._min)}function a(e,t,n,r){var i=o(e,t);return r+n*(-1==t.dir?1-i:i)}function u(e,t,n,r){var i=o(e,t);return r+n*(-1==t.dir?i:1-i)}function l(e,t,n,r){return 0==t.ori?a(e,t,n,r):u(e,t,n,r)}r.valToPosH=a,r.valToPosV=u;var c=!1;r.status=0;var s=r.root=wa("uplot");(null!=e.id&&(s.id=e.id),ga(s,e.class),e.title)&&(wa("u-title",s).textContent=e.title);var f=Da("canvas"),d=r.ctx=f.getContext("2d"),h=wa("u-wrap",s),p=r.under=wa("u-under",h);h.appendChild(f);var v=r.over=wa("u-over",h),m=+Ya((e=Tu(e)).pxAlign,1),y=uc(m);(e.plugins||[]).forEach((function(t){t.opts&&(e=t.opts(r,e)||e)}));var g=e.ms||.001,_=r.series=1==i?Fc(e.series||[],Ml,Gl,!1):function(e,t){return e.map((function(e,n){return 0==n?null:Bu({},t,e)}))}(e.series||[null],Ql),b=r.axes=Fc(e.axes||[],Bl,Yl,!0),D=r.scales={},w=r.bands=e.bands||[];w.forEach((function(e){e.fill=du(e.fill||null),e.dir=Ya(e.dir,-1)}));var x=2==i?_[1].facets[0].scale:_[0].scale,k={axes:function(){for(var e=function(e){var t=b[e];if(!t.show||!t._show)return"continue";var n=t.side,i=n%2,o=void 0,a=void 0,u=t.stroke(r,e),c=0==n||3==n?-1:1;if(t.label){var s=t.labelGap*c,f=Xa((t._lpos+s)*Qo);Ze(t.labelFont[0],u,"center",2==n?ea:ta),d.save(),1==i?(o=a=0,d.translate(f,Xa(de+pe/2)),d.rotate((3==n?-Ja:Ja)/2)):(o=Xa(fe+he/2),a=f),d.fillText(t.label,o,a),d.restore()}var h=_t(t._found,2),p=h[0],v=h[1];if(0==v)return"continue";var m=D[t.scale],g=0==i?he:pe,_=0==i?fe:de,w=Xa(t.gap*Qo),x=t._splits,k=2==m.distr?x.map((function(e){return qe[e]})):x,C=2==m.distr?qe[x[1]]-qe[x[0]]:p,E=t.ticks,S=t.border,A=E.show?Xa(E.size*Qo):0,F=t._rotate*-Ja/180,N=y(t._pos*Qo),O=N+(A+w)*c;a=0==i?O:0,o=1==i?O:0,Ze(t.font[0],u,1==t.align?na:2==t.align?ra:F>0?na:F<0?ra:0==i?"center":3==n?ra:na,F||1==i?"middle":2==n?ea:ta);for(var T=1.5*t.font[1],B=x.map((function(e){return y(l(e,m,g,_))})),M=t._values,L=0;L0&&(_.forEach((function(e,n){if(n>0&&e.show&&null==e._paths){var i=function(e){var t=fu(He-1,0,Ne-1),n=fu(Ve+1,0,Ne-1);for(;null==e[t]&&t>0;)t--;for(;null==e[n]&&n0&&e.show){je!=e.alpha&&(d.globalAlpha=je=e.alpha),Xe(t,!1),e._paths&&et(t,!1),Xe(t,!0);var n=e.points.show(r,t,He,Ve),i=e.points.filter(r,t,n,e._paths?e._paths.gaps:null);(n||i)&&(e.points._paths=e.points.paths(r,t,He,Ve,i),et(t,!0)),1!=je&&(d.globalAlpha=je=1),on("drawSeries",t)}})))}},C=(e.drawOrder||["axes","series"]).map((function(e){return k[e]}));function E(t){var n=D[t];if(null==n){var r=(e.scales||ku)[t]||ku;if(null!=r.from)E(r.from),D[t]=Bu({},D[r.from],r,{key:t});else{(n=D[t]=Bu({},t==x?Zl:Kl,r)).key=t;var o=n.time,a=n.range,u=Su(a);if((t!=x||2==i&&!o)&&(!u||null!=a[0]&&null!=a[1]||(a={min:null==a[0]?za:{mode:1,hard:a[0],soft:a[0]},max:null==a[1]?za:{mode:1,hard:a[1],soft:a[1]}},u=!1),!u&&Fu(a))){var l=a;a=function(e,t,n){return null==t?Eu:Va(t,n,l)}}n.range=du(a||(o?Tc:t==x?3==n.distr?Lc:4==n.distr?Ic:Oc:3==n.distr?Mc:4==n.distr?Pc:Bc)),n.auto=du(!u&&n.auto),n.clamp=du(n.clamp||Jl),n._min=n._max=null}}}for(var S in E("x"),E("y"),1==i&&_.forEach((function(e){E(e.scale)})),b.forEach((function(e){E(e.scale)})),e.scales)E(S);var A,F,N=D[x],O=N.distr;0==N.ori?(ga(s,"u-hz"),A=a,F=u):(ga(s,"u-vt"),A=u,F=a);var T={};for(var B in D){var M=D[B];null==M.min&&null==M.max||(T[B]={min:M.min,max:M.max},M.min=M.max=null)}var L,P=e.tzDate||function(e){return new Date(Xa(e/g))},I=e.fmtDate||Vu,$=1==g?dl(P):ml(P),R=gl(P,yl(1==g?fl:vl,I)),j=Dl(P,bl("{YYYY}-{MM}-{DD} {h}:{mm}{aa}",I)),z=[],U=r.legend=Bu({},wl,e.legend),H=U.show,V=U.markers;U.idxs=z,V.width=du(V.width),V.dash=du(V.dash),V.stroke=du(V.stroke),V.fill=du(V.fill);var Y,q=[],W=[],Q=!1,G={};if(U.live){var J=_[1]?_[1].values:null;for(var Z in Y=(Q=null!=J)?J(r,1,0):{_:0})G[Z]="--"}if(H)if(L=Da("table","u-legend",s),Q){var K=Da("tr","u-thead",L);for(var X in Da("th",null,K),Y)Da("th",Zo,K).textContent=X}else ga(L,"u-inline"),U.live&&ga(L,"u-live");var ee={show:!0},te={show:!1};var ne=new Map;function re(e,t,n){var i=ne.get(t)||{},o=we.bind[e](r,t,n);o&&(Oa(e,t,i[e]=o),ne.set(t,i))}function ie(e,t,n){var r=ne.get(t)||{};for(var i in r)null!=e&&i!=e||(Ta(i,t,r[i]),delete r[i]);null==e&&ne.delete(t)}var oe=0,ae=0,ue=0,le=0,ce=0,se=0,fe=0,de=0,he=0,pe=0;r.bbox={};var ve=!1,me=!1,ye=!1,ge=!1,_e=!1;function be(e,t,n){(n||e!=r.width||t!=r.height)&&De(e,t),ut(!1),ye=!0,me=!0,ge=_e=we.left>=0,wt()}function De(e,t){r.width=oe=ue=e,r.height=ae=le=t,ce=se=0,function(){var e=!1,t=!1,n=!1,r=!1;b.forEach((function(i,o){if(i.show&&i._show){var a=i.side,u=a%2,l=i._size+(null!=i.label?i.labelSize:0);l>0&&(u?(ue-=l,3==a?(ce+=l,r=!0):n=!0):(le-=l,0==a?(se+=l,e=!0):t=!0))}})),Ae[0]=e,Ae[1]=n,Ae[2]=t,Ae[3]=r,ue-=Ue[1]+Ue[3],ce+=Ue[3],le-=Ue[2]+Ue[0],se+=Ue[0]}(),function(){var e=ce+ue,t=se+le,n=ce,r=se;function i(i,o){switch(i){case 1:return(e+=o)-o;case 2:return(t+=o)-o;case 3:return(n-=o)+o;case 0:return(r-=o)+o}}b.forEach((function(e,t){if(e.show&&e._show){var n=e.side;e._pos=i(n,e._size),null!=e.label&&(e._lpos=i(n,e.labelSize))}}))}();var n=r.bbox;fe=n.left=su(ce*Qo,.5),de=n.top=su(se*Qo,.5),he=n.width=su(ue*Qo,.5),pe=n.height=su(le*Qo,.5)}r.setSize=function(e){be(e.width,e.height)};var we=r.cursor=Bu({},El,{drag:{y:2==i}},e.cursor);we.idxs=z,we._lock=!1;var xe=we.points;xe.show=du(xe.show),xe.size=du(xe.size),xe.stroke=du(xe.stroke),xe.width=du(xe.width),xe.fill=du(xe.fill);var ke=r.focus=Bu({},e.focus||{alpha:.3},we.focus),Ce=ke.prox>=0,Ee=[null];function Se(e,t){if(1==i||t>0){var n=1==i&&D[e.scale].time,o=e.value;e.value=n?Au(o)?Dl(P,bl(o,I)):o||j:o||Vl,e.label=e.label||(n?"Time":"Value")}if(t>0){e.width=null==e.width?1:e.width,e.paths=e.paths||Sc||vu,e.fillTo=du(e.fillTo||rc),e.pxAlign=+Ya(e.pxAlign,m),e.pxRound=uc(e.pxAlign),e.stroke=du(e.stroke||null),e.fill=du(e.fill||null),e._stroke=e._fill=e._paths=e._focus=null;var a=ql(e.width,1),u=e.points=Bu({},{size:a,width:nu(1,.2*a),stroke:e.stroke,space:2*a,paths:Ac,_stroke:null,_fill:null},e.points);u.show=du(u.show),u.filter=du(u.filter),u.fill=du(u.fill),u.stroke=du(u.stroke),u.paths=du(u.paths),u.pxAlign=e.pxAlign}if(H){var l=function(e,t){if(0==t&&(Q||!U.live||2==i))return Eu;var n=[],o=Da("tr","u-series",L,L.childNodes[t]);ga(o,e.class),e.show||ga(o,Jo);var a=Da("th",null,o);if(V.show){var u=wa("u-marker",a);if(t>0){var l=V.width(r,t);l&&(u.style.border=l+"px "+V.dash(r,t)+" "+V.stroke(r,t)),u.style.background=V.fill(r,t)}}var c=wa(Zo,a);for(var s in c.textContent=e.label,t>0&&(V.show||(c.style.color=e.width>0?V.stroke(r,t):V.fill(r,t)),re("click",a,(function(t){if(!we._lock){var n=_.indexOf(e);if((t.ctrlKey||t.metaKey)!=U.isolate){var r=_.some((function(e,t){return t>0&&t!=n&&e.show}));_.forEach((function(e,t){t>0&&Pt(t,r?t==n?ee:te:ee,!0,an.setSeries)}))}else Pt(n,{show:!e.show},!0,an.setSeries)}})),Ce&&re(ca,a,(function(t){we._lock||Pt(_.indexOf(e),It,!0,an.setSeries)}))),Y){var f=Da("td","u-value",o);f.textContent="--",n.push(f)}return[o,n]}(e,t);q.splice(t,0,l[0]),W.splice(t,0,l[1]),U.values.push(null)}if(we.show){z.splice(t,0,null);var c=function(e,t){if(t>0){var n=we.points.show(r,t);if(n)return ga(n,"u-cursor-pt"),ga(n,e.class),ka(n,-10,-10,ue,le),v.insertBefore(n,Ee[t]),n}}(e,t);c&&Ee.splice(t,0,c)}on("addSeries",t)}r.addSeries=function(e,t){e=Nc(e,t=null==t?_.length:t,Ml,Gl),_.splice(t,0,e),Se(_[t],t)},r.delSeries=function(e){if(_.splice(e,1),H){U.values.splice(e,1),W.splice(e,1);var t=q.splice(e,1)[0];ie(null,t.firstChild),t.remove()}we.show&&(z.splice(e,1),Ee.length>1&&Ee.splice(e,1)[0].remove()),on("delSeries",e)};var Ae=[!1,!1,!1,!1];function Fe(e,t,n,r){var i=_t(n,4),o=i[0],a=i[1],u=i[2],l=i[3],c=t%2,s=0;return 0==c&&(l||a)&&(s=0==t&&!o||2==t&&!u?Xa(Bl.size/3):0),1==c&&(o||u)&&(s=1==t&&!a||3==t&&!l?Xa(Yl.size/2):0),s}var Ne,Oe,Te,Be,Me,Le,Pe,Ie,$e,Re,je,ze=r.padding=(e.padding||[Fe,Fe,Fe,Fe]).map((function(e){return du(Ya(e,Fe))})),Ue=r._padding=ze.map((function(e,t){return e(r,t,Ae,0)})),He=null,Ve=null,Ye=1==i?_[0].idxs:null,qe=null,We=!1;function Qe(e,n){if(t=null==e?[]:Tu(e,Nu),2==i){Ne=0;for(var o=1;o<_.length;o++)Ne+=t[o][0].length;r.data=t=e}else if(null==t[0]&&(t[0]=[]),r.data=t.slice(),qe=t[0],Ne=qe.length,2==O){t[0]=Array(Ne);for(var a=0;a=0,_e=!0,wt()}}function Ge(){var e,n;if(We=!0,1==i)if(Ne>0){if(He=Ye[0]=0,Ve=Ye[1]=Ne-1,e=t[0][He],n=t[0][Ve],2==O)e=He,n=Ve;else if(1==Ne)if(3==O){var r=_t(Ra(e,e,N.log,!1),2);e=r[0],n=r[1]}else if(4==O){var o=_t(ja(e,e,N.log,!1),2);e=o[0],n=o[1]}else if(N.time)n=e+Xa(86400/g);else{var a=_t(Va(e,n,.1,!0),2);e=a[0],n=a[1]}}else He=Ye[0]=e=null,Ve=Ye[1]=n=null;Lt(x,e,n)}function Je(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:oa,t=arguments.length>1?arguments[1]:void 0,n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:Cu,r=arguments.length>3&&void 0!==arguments[3]?arguments[3]:"butt",i=arguments.length>4&&void 0!==arguments[4]?arguments[4]:oa,o=arguments.length>5&&void 0!==arguments[5]?arguments[5]:"round";e!=Oe&&(d.strokeStyle=Oe=e),i!=Te&&(d.fillStyle=Te=i),t!=Be&&(d.lineWidth=Be=t),o!=Le&&(d.lineJoin=Le=o),r!=Pe&&(d.lineCap=Pe=r),n!=Me&&d.setLineDash(Me=n)}function Ze(e,t,n,r){t!=Te&&(d.fillStyle=Te=t),e!=Ie&&(d.font=Ie=e),n!=$e&&(d.textAlign=$e=n),r!=Re&&(d.textBaseline=Re=r)}function Ke(e,t,n,i){var o=arguments.length>4&&void 0!==arguments[4]?arguments[4]:0;if(i.length>0&&e.auto(r,We)&&(null==t||null==t.min)){var a=Ya(He,0),u=Ya(Ve,i.length-1),l=null==n.min?3==e.distr?Pa(i,a,u):La(i,a,u,o):[n.min,n.max];e.min=tu(e.min,n.min=l[0]),e.max=nu(e.max,n.max=l[1])}}function Xe(e,t){var n=t?_[e].points:_[e];n._stroke=n.stroke(r,e),n._fill=n.fill(r,e)}function et(e,n){var i=n?_[e].points:_[e],o=i._stroke,a=i._fill,u=i._paths,l=u.stroke,c=u.fill,s=u.clip,f=u.flags,h=null,p=bu(i.width*Qo,3),v=p%2/2;n&&null==a&&(a=p>0?"#fff":o);var m=1==i.pxAlign;if(m&&d.translate(v,v),!n){var y=fe,g=de,b=he,D=pe,x=p*Qo/2;0==i.min&&(D+=x),0==i.max&&(g-=x,D+=x),(h=new Path2D).rect(y,g,b,D)}n?tt(o,p,i.dash,i.cap,a,l,c,f,s):function(e,n,i,o,a,u,l,c,s,f,d){var h=!1;w.forEach((function(p,v){if(p.series[0]==e){var m,y=_[p.series[1]],g=t[p.series[1]],b=(y._paths||ku).band;Su(b)&&(b=1==p.dir?b[0]:b[1]);var D=null;y.show&&b&&function(e,t,n){for(t=Ya(t,0),n=Ya(n,e.length-1);t<=n;){if(null!=e[t])return!0;t++}return!1}(g,He,Ve)?(D=p.fill(r,v)||u,m=y._paths.clip):b=null,tt(n,i,o,a,D,l,c,s,f,d,m,b),h=!0}})),h||tt(n,i,o,a,u,l,c,s,f,d)}(e,o,p,i.dash,i.cap,a,l,c,f,h,s),m&&d.translate(-v,-v)}r.setData=Qe;function tt(e,t,n,r,i,o,a,u,l,c,s,f){Je(e,t,n,r,i),(l||c||f)&&(d.save(),l&&d.clip(l),c&&d.clip(c)),f?3==(3&u)?(d.clip(f),s&&d.clip(s),rt(i,a),nt(e,o,t)):2&u?(rt(i,a),d.clip(f),nt(e,o,t)):1&u&&(d.save(),d.clip(f),s&&d.clip(s),rt(i,a),d.restore(),nt(e,o,t)):(rt(i,a),nt(e,o,t)),(l||c||f)&&d.restore()}function nt(e,t,n){n>0&&(t instanceof Map?t.forEach((function(e,t){d.strokeStyle=Oe=t,d.stroke(e)})):null!=t&&e&&d.stroke(t))}function rt(e,t){t instanceof Map?t.forEach((function(e,t){d.fillStyle=Te=t,d.fill(e)})):null!=t&&e&&d.fill(t)}function it(e,t,n,r,i,o,a,u,l,c){var s=a%2/2;1==m&&d.translate(s,s),Je(u,a,l,c,u),d.beginPath();var f,h,p,v,y=i+(0==r||3==r?-o:o);0==n?(h=i,v=y):(f=i,p=y);for(var g=0;g0&&(t._paths=null,e&&(1==i?(t.min=null,t.max=null):t.facets.forEach((function(e){e.min=null,e.max=null}))))}))}var lt,ct,st,ft,dt,ht,pt,vt,mt,yt,gt,bt,Dt=!1;function wt(){Dt||(Lu(xt),Dt=!0)}function xt(){ve&&(!function(){var e=Tu(D,Nu);for(var n in e){var o=e[n],a=T[n];if(null!=a&&null!=a.min)Bu(o,a),n==x&&ut(!0);else if(n!=x||2==i)if(0==Ne&&null==o.from){var u=o.range(r,null,null,n);o.min=u[0],o.max=u[1]}else o.min=lu,o.max=-lu}if(Ne>0)for(var l in _.forEach((function(n,o){if(1==i){var a=n.scale,u=e[a],l=T[a];if(0==o){var c=u.range(r,u.min,u.max,a);u.min=c[0],u.max=c[1],He=Ba(u.min,t[0]),Ve=Ba(u.max,t[0]),t[0][He]u.max&&Ve--,n.min=qe[He],n.max=qe[Ve]}else n.show&&n.auto&&Ke(u,l,n,t[o],n.sorted);n.idxs[0]=He,n.idxs[1]=Ve}else if(o>0&&n.show&&n.auto){var s=_t(n.facets,2),f=s[0],d=s[1],h=f.scale,p=d.scale,v=_t(t[o],2),m=v[0],y=v[1];Ke(e[h],T[h],f,m,f.sorted),Ke(e[p],T[p],d,y,d.sorted),n.min=d.min,n.max=d.max}})),e){var c=e[l],s=T[l];if(null==c.from&&(null==s||null==s.min)){var f=c.range(r,c.min==lu?null:c.min,c.max==-lu?null:c.max,l);c.min=f[0],c.max=f[1]}}for(var d in e){var h=e[d];if(null!=h.from){var p=e[h.from];if(null==p.min)h.min=h.max=null;else{var v=h.range(r,p.min,p.max,d);h.min=v[0],h.max=v[1]}}}var m={},y=!1;for(var g in e){var b=e[g],w=D[g];if(w.min!=b.min||w.max!=b.max){w.min=b.min,w.max=b.max;var k=w.distr;w._min=3==k?ou(w.min):4==k?uu(w.min,w.asinh):w.min,w._max=3==k?ou(w.max):4==k?uu(w.max,w.asinh):w.max,m[g]=y=!0}}if(y){for(var C in _.forEach((function(e,t){2==i?t>0&&m.y&&(e._paths=null):m[e.scale]&&(e._paths=null)})),m)ye=!0,on("setScale",C);we.show&&(ge=_e=we.left>=0)}for(var E in T)T[E]=null}(),ve=!1),ye&&(!function(){for(var e=!1,t=0;!e;){var n=ot(++t),i=at(t);(e=3==t||n&&i)||(De(r.width,r.height),me=!0)}}(),ye=!1),me&&(ba(p,na,ce),ba(p,ea,se),ba(p,Ko,ue),ba(p,Xo,le),ba(v,na,ce),ba(v,ea,se),ba(v,Ko,ue),ba(v,Xo,le),ba(h,Ko,oe),ba(h,Xo,ae),f.width=Xa(oe*Qo),f.height=Xa(ae*Qo),b.forEach((function(e){var t=e._el,n=e._show,r=e._size,i=e._pos,o=e.side;if(null!=t)if(n){var a=o%2==1;ba(t,a?"left":"top",i-(3===o||0===o?r:0)),ba(t,a?"width":"height",r),ba(t,a?"top":"left",a?se:ce),ba(t,a?"height":"width",a?le:ue),_a(t,Jo)}else ga(t,Jo)})),Oe=Te=Be=Le=Pe=Ie=$e=Re=Me=null,je=1,Wt(!0),on("setSize"),me=!1),oe>0&&ae>0&&(d.clearRect(0,0,f.width,f.height),on("drawClear"),C.forEach((function(e){return e()})),on("draw")),we.show&&ge&&(Yt(null,!0,!1),ge=!1),c||(c=!0,r.status=1,on("ready")),We=!1,Dt=!1}function kt(e,n){var i=D[e];if(null==i.from){if(0==Ne){var o=i.range(r,n.min,n.max,e);n.min=o[0],n.max=o[1]}if(n.min>n.max){var a=n.min;n.min=n.max,n.max=a}if(Ne>1&&null!=n.min&&null!=n.max&&n.max-n.min<1e-16)return;e==x&&2==i.distr&&Ne>0&&(n.min=Ba(n.min,t[0]),n.max=Ba(n.max,t[0]),n.min==n.max&&n.max++),T[e]=n,ve=!0,wt()}}r.redraw=function(e,t){ye=t||!1,!1!==e?Lt(x,N.min,N.max):wt()},r.setScale=kt;var Ct=!1,Et=we.drag,St=Et.x,At=Et.y;we.show&&(we.x&&(lt=wa("u-cursor-x",v)),we.y&&(ct=wa("u-cursor-y",v)),0==N.ori?(st=lt,ft=ct):(st=ct,ft=lt),gt=we.left,bt=we.top);var Ft,Nt,Ot,Tt=r.select=Bu({show:!0,over:!0,left:0,width:0,top:0,height:0},e.select),Bt=Tt.show?wa("u-select",Tt.over?v:p):null;function Mt(e,t){if(Tt.show){for(var n in e)ba(Bt,n,Tt[n]=e[n]);!1!==t&&on("setSelect")}}function Lt(e,t,n){kt(e,{min:t,max:n})}function Pt(e,t,n,o){null!=t.focus&&function(e){if(e!=Ot){var t=null==e,n=1!=ke.alpha;_.forEach((function(r,i){var o=t||0==i||i==e;r._focus=t?null:o,n&&function(e,t){_[e].alpha=t,we.show&&Ee[e]&&(Ee[e].style.opacity=t);H&&q[e]&&(q[e].style.opacity=t)}(i,o?1:ke.alpha)})),Ot=e,n&&wt()}}(e),null!=t.show&&_.forEach((function(n,r){r>0&&(e==r||null==e)&&(n.show=t.show,function(e,t){var n=_[e],r=H?q[e]:null;n.show?r&&_a(r,Jo):(r&&ga(r,Jo),Ee.length>1&&ka(Ee[e],-10,-10,ue,le))}(r,t.show),Lt(2==i?n.facets[1].scale:n.scale,null,null),wt())})),!1!==n&&on("setSeries",e,t),o&&cn("setSeries",r,e,t)}r.setSelect=Mt,r.setSeries=Pt,r.addBand=function(e,t){e.fill=du(e.fill||null),e.dir=Ya(e.dir,-1),t=null==t?w.length:t,w.splice(t,0,e)},r.setBand=function(e,t){Bu(w[e],t)},r.delBand=function(e){null==e?w.length=0:w.splice(e,1)};var It={focus:!0};function $t(e,t,n){var r=D[t];n&&(e=e/Qo-(1==r.ori?se:ce));var i=ue;1==r.ori&&(e=(i=le)-e),-1==r.dir&&(e=i-e);var o=r._min,a=o+(r._max-o)*(e/i),u=r.distr;return 3==u?ru(10,a):4==u?function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:1;return Ga.sinh(e)*t}(a,r.asinh):a}function Rt(e,t){ba(Bt,na,Tt.left=e),ba(Bt,Ko,Tt.width=t)}function jt(e,t){ba(Bt,ea,Tt.top=e),ba(Bt,Xo,Tt.height=t)}H&&Ce&&Oa(sa,L,(function(e){we._lock||null!=Ot&&Pt(null,It,!0,an.setSeries)})),r.valToIdx=function(e){return Ba(e,t[0])},r.posToIdx=function(e,n){return Ba($t(e,x,n),t[0],He,Ve)},r.posToVal=$t,r.valToPos=function(e,t,n){return 0==D[t].ori?a(e,D[t],n?he:ue,n?fe:0):u(e,D[t],n?pe:le,n?de:0)},r.batch=function(e){e(r),wt()},r.setCursor=function(e,t,n){gt=e.left,bt=e.top,Yt(null,t,n)};var zt=0==N.ori?Rt:jt,Ut=1==N.ori?Rt:jt;function Ht(e,t){if(null!=e){var n=e.idx;U.idx=n,_.forEach((function(e,t){(t>0||!Q)&&Vt(t,n)}))}H&&U.live&&function(){if(H&&U.live)for(var e=2==i?1:0;e<_.length;e++)if(0!=e||!Q){var t=U.values[e],n=0;for(var r in t)W[e][n++].firstChild.nodeValue=t[r]}}(),_e=!1,!1!==t&&on("setLegend")}function Vt(e,n){var i;if(null==n)i=G;else{var o=_[e],a=0==e&&2==O?qe:t[e];i=Q?o.values(r,e,n):{_:o.value(r,a[n],e,n)}}U.values[e]=i}function Yt(e,n,o){mt=gt,yt=bt;var a,u=_t(we.move(r,gt,bt),2);gt=u[0],bt=u[1],we.show&&(st&&ka(st,Xa(gt),0,ue,le),ft&&ka(ft,0,Xa(bt),ue,le));var l=He>Ve;Ft=lu;var s=0==N.ori?ue:le,f=1==N.ori?ue:le;if(gt<0||0==Ne||l){a=null;for(var d=0;d<_.length;d++)d>0&&Ee.length>1&&ka(Ee[d],-10,-10,ue,le);if(Ce&&Pt(null,It,!0,null==e&&an.setSeries),U.live){z.fill(null),_e=!0;for(var h=0;h<_.length;h++)U.values[h]=G}}else{var p,v;1==i&&(a=Ba(p=$t(0==N.ori?gt:bt,x),t[0],He,Ve),v=gu(A(t[0][a],N,s,0),.5));for(var m=2==i?1:0;m<_.length;m++){var y=_[m],g=z[m],b=1==i?t[m][g]:t[m][1][g],w=we.dataIdx(r,m,a,p),k=1==i?t[m][w]:t[m][1][w];_e=_e||k!=b||w!=g,z[m]=w;var C=w==a?v:gu(A(1==i?t[0][w]:t[m][0][w],N,s,0),.5);if(m>0&&y.show){var E=null==k?-10:gu(F(k,1==i?D[y.scale]:D[y.facets[1].scale],f,0),.5);if(E>0&&1==i){var S=Za(E-bt);S<=Ft&&(Ft=S,Nt=m)}var O=void 0,T=void 0;if(0==N.ori?(O=C,T=E):(O=E,T=C),_e&&Ee.length>1){Ea(Ee[m],we.points.fill(r,m),we.points.stroke(r,m));var B=void 0,M=void 0,L=void 0,P=void 0,I=!0,$=we.points.bbox;if(null!=$){I=!1;var R=$(r,m);L=R.left,P=R.top,B=R.width,M=R.height}else L=O,P=T,B=M=we.points.size(r,m);Aa(Ee[m],B,M,I),ka(Ee[m],L,P,ue,le)}}if(U.live){if(!_e||0==m&&Q)continue;Vt(m,w)}}}if(we.idx=a,we.left=gt,we.top=bt,_e&&(U.idx=a,Ht()),Tt.show&&Ct)if(null!=e){var j=_t(an.scales,2),H=j[0],V=j[1],Y=_t(an.match,2),q=Y[0],W=Y[1],J=_t(e.cursor.sync.scales,2),Z=J[0],K=J[1],X=e.cursor.drag;if(St=X._x,At=X._y,St||At){var ee,te,ne,re,ie,oe=e.select,ae=oe.left,ce=oe.top,se=oe.width,fe=oe.height,de=e.scales[H].ori,he=e.posToVal,pe=null!=H&&q(H,Z),ve=null!=V&&W(V,K);pe&&St?(0==de?(ee=ae,te=se):(ee=ce,te=fe),ne=D[H],re=A(he(ee,Z),ne,s,0),ie=A(he(ee+te,Z),ne,s,0),zt(tu(re,ie),Za(ie-re))):zt(0,s),ve&&At?(1==de?(ee=ae,te=se):(ee=ce,te=fe),ne=D[V],re=F(he(ee,K),ne,f,0),ie=F(he(ee+te,K),ne,f,0),Ut(tu(re,ie),Za(ie-re))):Ut(0,f)}else Zt()}else{var me=Za(mt-dt),ye=Za(yt-ht);if(1==N.ori){var ge=me;me=ye,ye=ge}St=Et.x&&me>=Et.dist,At=Et.y&&ye>=Et.dist;var be,De,xe=Et.uni;null!=xe?St&&At&&(At=ye>=xe,(St=me>=xe)||At||(ye>me?At=!0:St=!0)):Et.x&&Et.y&&(St||At)&&(St=At=!0),St&&(0==N.ori?(be=pt,De=gt):(be=vt,De=bt),zt(tu(be,De),Za(De-be)),At||Ut(0,f)),At&&(1==N.ori?(be=pt,De=gt):(be=vt,De=bt),Ut(tu(be,De),Za(De-be)),St||zt(0,s)),St||At||(zt(0,0),Ut(0,0))}if(Et._x=St,Et._y=At,null==e){if(o){if(null!=un){var Se=_t(an.scales,2),Ae=Se[0],Fe=Se[1];an.values[0]=null!=Ae?$t(0==N.ori?gt:bt,Ae):null,an.values[1]=null!=Fe?$t(1==N.ori?gt:bt,Fe):null}cn(aa,r,gt,bt,ue,le,a)}if(Ce){var Oe=o&&an.setSeries,Te=ke.prox;null==Ot?Ft<=Te&&Pt(Nt,It,!0,Oe):Ft>Te?Pt(null,It,!0,Oe):Nt!=Ot&&Pt(Nt,It,!0,Oe)}}c&&!1!==n&&on("setCursor")}r.setLegend=Ht;var qt=null;function Wt(e){!0===e?qt=null:on("syncRect",qt=v.getBoundingClientRect())}function Qt(e,t,n,r,i,o,a){we._lock||(Gt(e,t,n,r,i,o,a,!1,null!=e),null!=e?Yt(null,!0,!0):Yt(t,!0,!1))}function Gt(e,t,n,i,o,a,u,c,s){if(null==qt&&Wt(!1),null!=e)n=e.clientX-qt.left,i=e.clientY-qt.top;else{if(n<0||i<0)return gt=-10,void(bt=-10);var f=_t(an.scales,2),d=f[0],h=f[1],p=t.cursor.sync,v=_t(p.values,2),m=v[0],y=v[1],g=_t(p.scales,2),_=g[0],b=g[1],w=_t(an.match,2),x=w[0],k=w[1],C=t.axes[0].side%2==1,E=0==N.ori?ue:le,S=1==N.ori?ue:le,A=C?a:o,F=C?o:a,O=C?i:n,T=C?n:i;if(n=null!=_?x(d,_)?l(m,D[d],E,0):-10:E*(O/A),i=null!=b?k(h,b)?l(y,D[h],S,0):-10:S*(T/F),1==N.ori){var B=n;n=i,i=B}}if(s&&((n<=1||n>=ue-1)&&(n=su(n,ue)),(i<=1||i>=le-1)&&(i=su(i,le))),c){dt=n,ht=i;var M=_t(we.move(r,n,i),2);pt=M[0],vt=M[1]}else gt=n,bt=i}var Jt={width:0,height:0};function Zt(){Mt(Jt,!1)}function Kt(e,t,n,i,o,a,u){Ct=!0,St=At=Et._x=Et._y=!1,Gt(e,t,n,i,o,a,0,!0,!1),null!=e&&(re(la,va,Xt),cn(ua,r,pt,vt,ue,le,null))}function Xt(e,t,n,i,o,a,u){Ct=Et._x=Et._y=!1,Gt(e,t,n,i,o,a,0,!1,!0);var l=Tt.left,c=Tt.top,s=Tt.width,f=Tt.height,d=s>0||f>0;if(d&&Mt(Tt),Et.setScale&&d){var h=l,p=s,v=c,m=f;if(1==N.ori&&(h=c,p=f,v=l,m=s),St&&Lt(x,$t(h,x),$t(h+p,x)),At)for(var y in D){var g=D[y];y!=x&&null==g.from&&g.min!=lu&&Lt(y,$t(v+m,y),$t(v,y))}Zt()}else we.lock&&(we._lock=!we._lock,we._lock||Yt(null,!0,!1));null!=e&&(ie(la,va),cn(la,r,gt,bt,ue,le,null))}function en(e,t,n,i,o,a,u){Ge(),Zt(),null!=e&&cn(fa,r,gt,bt,ue,le,null)}function tn(){b.forEach(jc),be(r.width,r.height,!0)}Oa(ha,ma,tn);var nn={};nn.mousedown=Kt,nn.mousemove=Qt,nn.mouseup=Xt,nn.dblclick=en,nn.setSeries=function(e,t,n,r){Pt(n,r,!0,!1)},we.show&&(re(ua,v,Kt),re(aa,v,Qt),re(ca,v,Wt),re(sa,v,(function(e,t,n,r,i,o,a){if(!we._lock){var u=Ct;if(Ct){var l,c,s=!0,f=!0;0==N.ori?(l=St,c=At):(l=At,c=St),l&&c&&(s=gt<=10||gt>=ue-10,f=bt<=10||bt>=le-10),l&&s&&(gt=gt=3?Hl:pu)),e.font=Rc(e.font),e.labelFont=Rc(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&&(Ae[t]=!0,e._el=wa("u-axis",h))}})),n?n instanceof HTMLElement?(n.appendChild(s),sn()):n(r,sn):sn(),r}zc.assign=Bu,zc.fmtNum=Qa,zc.rangeNum=Va,zc.rangeLog=Ra,zc.rangeAsinh=ja,zc.orient=tc,zc.pxRatio=Qo,zc.join=function(e,t){for(var n=new Set,r=0;r=o&&A<=a;A+=k){var F=c[A];if(null!=F){var N=_(l[A]),O=b(F);1==t?D(x,N,C):D(x,S,O),D(x,N,O),C=O,S=N}}var T=_t(nc(e,i),2),B=T[0],M=T[1];if(null!=u.fill||0!=B){var L=w.fill=new Path2D(x),P=b(u.fillTo(e,i,u.min,u.max,B));D(L,S,P),D(L,E,P)}if(!u.spanGaps){var I,$=[];(I=$).push.apply(I,bt(ac(l,c,o,a,k,_,r)));var R=u.width*Qo/2,j=n||1==t?R:-R,z=n||-1==t?-R:R;$.forEach((function(e){e[0]+=j,e[1]+=z})),w.gaps=$=u.gaps(e,i,o,a,$),w.clip=oc($,s.ori,p,v,m,y)}return 0!=M&&(w.band=2==M?[ic(e,i,o,a,x,-1),ic(e,i,o,a,x,1)]:ic(e,i,o,a,x,M)),w}))}},Uc.bars=function(e){var t=Ya((e=e||ku).size,[.6,lu,1]),n=e.align||0,r=(e.gap||0)*Qo,i=Ya(e.radius,0),o=1-t[0],a=Ya(t[1],lu)*Qo,u=Ya(t[2],1)*Qo,l=Ya(e.disp,ku),c=Ya(e.each,(function(e){})),s=l.fill,f=l.stroke;return function(e,t,d,h){return tc(e,t,(function(p,v,m,y,g,_,b,D,w,x,k){var C,E,S=p.pxRound,A=y.dir*(0==y.ori?1:-1),F=g.dir*(1==g.ori?1:-1),N=0==y.ori?hc:pc,O=0==y.ori?c:function(e,t,n,r,i,o,a){c(e,t,n,i,r,a,o)},T=_t(nc(e,t),2),B=T[0],M=T[1],L=3==g.distr?1==B?g.max:g.min:0,P=b(L,g,k,w),I=S(p.width*Qo),$=!1,R=null,j=null,z=null,U=null;null==s||0!=I&&null==f||($=!0,R=s.values(e,t,d,h),j=new Map,new Set(R).forEach((function(e){null!=e&&j.set(e,new Path2D)})),I>0&&(z=f.values(e,t,d,h),U=new Map,new Set(z).forEach((function(e){null!=e&&U.set(e,new Path2D)}))));var H=l.x0,V=l.size;if(null!=H&&null!=V){v=H.values(e,t,d,h),2==H.unit&&(v=v.map((function(t){return e.posToVal(D+t*x,y.key,!0)})));var Y=V.values(e,t,d,h);E=S((E=2==V.unit?Y[0]*x:_(Y[0],y,x,D)-_(0,y,x,D))-I),C=1==A?-I/2:E+I/2}else{var q=x;if(v.length>1)for(var W=null,Q=0,G=1/0;Q=d&&Q<=h;Q+=A){var ie=m[Q];if(void 0!==ie){var oe=_(2!=y.distr||null!=l?v[Q]:Q,y,x,D),ae=b(Ya(ie,L),g,k,w);null!=re&&null!=ie&&(P=b(re[Q],g,k,w));var ue=S(oe-C),le=S(nu(ae,P)),ce=S(tu(ae,P)),se=le-ce,fe=i*E;null!=ie&&($?(I>0&&null!=z[Q]&&N(U.get(z[Q]),ue,ce+Ka(I/2),E,nu(0,se-I),fe),null!=R[Q]&&N(j.get(R[Q]),ue,ce+Ka(I/2),E,nu(0,se-I),fe)):N(X,ue,ce+Ka(I/2),E,nu(0,se-I),fe),O(e,t,Q,ue-I/2,ce,E+I,se)),0!=M&&(F*M==1?(le=ce,ce=Z):(ce=le,le=Z),N(ee,ue-I/2,ce,E+I,nu(0,se=le-ce),0))}}return I>0&&(K.stroke=$?U:X),K.fill=$?j:X,K}))}},Uc.spline=function(e){return function(e,t){var n=Ya(null===t||void 0===t?void 0:t.alignGaps,0);return function(t,r,i,o){return tc(t,r,(function(a,u,l,c,s,f,d,h,p,v,m){var y,g,_,b=a.pxRound,D=function(e){return b(f(e,c,v,h))},w=function(e){return b(d(e,s,m,p))};0==c.ori?(y=cc,_=fc,g=yc):(y=sc,_=dc,g=gc);var x=c.dir*(0==c.ori?1:-1);i=Ma(l,i,o,1),o=Ma(l,i,o,-1);for(var k=D(u[1==x?i:o]),C=k,E=[],S=[],A=1==x?i:o;A>=i&&A<=o;A+=x)if(null!=l[A]){var F=D(u[A]);E.push(C=F),S.push(w(l[A]))}var N={stroke:e(E,S,y,_,g,b),fill:null,clip:null,band:null,gaps:null,flags:1},O=N.stroke,T=_t(nc(t,r),2),B=T[0],M=T[1];if(null!=a.fill||0!=B){var L=N.fill=new Path2D(O),P=w(a.fillTo(t,r,a.min,a.max,B));_(L,C,P),_(L,k,P)}if(!a.spanGaps){var I,$=[];(I=$).push.apply(I,bt(ac(u,l,i,o,x,D,n))),N.gaps=$=a.gaps(t,r,i,o,$),N.clip=oc($,c.ori,h,p,v,m)}return 0!=M&&(N.band=2==M?[ic(t,r,i,o,O,-1),ic(t,r,i,o,O,1)]:ic(t,r,i,o,O,M)),N}))}}(kc,e)};var Hc,Vc={height:500,legend:{show:!1},cursor:{drag:{x:!0,y:!1},focus:{prox:30},points:{size:5.6,width:1.4},bind:{click:function(){return null},dblclick:function(){return null}}}},Yc=function(e){return void 0===e||null===e?"":e.toLocaleString("en-US",{maximumSignificantDigits:20})},qc=function(e,t,n,r){var i,o=e.axes[n];if(r>1)return o._size||60;var a=6+((null===o||void 0===o||null===(i=o.ticks)||void 0===i?void 0:i.size)||0)+(o.gap||0),u=(null!==t&&void 0!==t?t:[]).reduce((function(e,t){return t.length>e.length?t:e}),"");return""!=u&&(a+=function(e,t){var n=document.createElement("span");n.innerText=e,n.style.cssText="position: absolute; z-index: -1; pointer-events: none; opacity: 0; font: ".concat(t),document.body.appendChild(n);var r=n.offsetWidth;return n.remove(),r}(u,e.ctx.font)),Math.ceil(a)},Wc=function(e){return function(e){for(var t=0,n=0;n>8*i&255).toString(16)).substr(-2);return r}(e)},Qc=function(e){return e.replace(/^\[\d+]/,"").replace(/{.+}/gim,"")},Gc=function(e){for(var t=e.length,n=-1/0;t--;){var r=e[t];Number.isFinite(r)&&r>n&&(n=r)}return Number.isFinite(n)?n:null},Jc=function(e){for(var t=e.length,n=1/0;t--;){var r=e[t];Number.isFinite(r)&&r2&&void 0!==arguments[2]?arguments[2]:"";return t.map((function(e){return"".concat(Yc(e)," ").concat(n)}))}(e,n,t)}};return e?Number(e)%2?n:Kn(Kn({},n),{},{side:1}):{space:80}}))},Kc=function(e,t){if(null==e||null==t)return[-1,1];var n=.02*(Math.abs(t-e)||Math.abs(e)||1);return[e-n,t+n]},Xc=n(61),es=n.n(Xc),ts=function(e){var t=e.u,n=e.id,r=e.unit,i=void 0===r?"":r,o=e.metrics,a=e.series,u=e.tooltipIdx,l=e.tooltipOffset,c=e.isSticky,s=e.onClose,f=re(null),d=_t(X({top:-999,left:-999}),2),h=d[0],p=d[1],v=_t(X(!1),2),y=v[0],g=v[1],_=_t(X(!1),2),b=_[0],D=_[1],w=_t(X(u.seriesIdx),2),x=w[0],k=w[1],C=_t(X(u.dataIdx),2),E=C[0],S=C[1],A=oe((function(){return t.root.querySelector(".u-wrap")}),[t]),F=oe((function(){return ir()(t,["data",x,E],0)}),[t,x,E]),N=oe((function(){return Yc(F)}),[F]),O=oe((function(){return t.data[0][E]}),[t,E]),T=oe((function(){return yr()(new Date(1e3*O)).format("YYYY-MM-DD HH:mm:ss:SSS (Z)")}),[O]),B=oe((function(){var e;return Wc((null===(e=a[x])||void 0===e?void 0:e.label)||"")}),[a,x]),M=oe((function(){var e,t=((null===(e=a[x])||void 0===e?void 0:e.label)||"").replace(/{.+}/gim,"").trim();return Qc(t)}),[]),L=oe((function(){var e,t=(null===(e=o[x-1])||void 0===e?void 0:e.metric)||{},n=Object.keys(t).filter((function(e){return"__name__"!==e}));return n.map((function(e){return"".concat(e,'="').concat(t[e],'"')}))}),[o,x]),P=function(e){if(y){var t=e.clientX,n=e.clientY;p({top:n,left:t})}},I=function(){g(!1)};return te((function(){var e;if(f.current){var n=t.valToPos(F||0,(null===(e=a[x])||void 0===e?void 0:e.scale)||"1"),r=t.valToPos(O,"x"),i=f.current.getBoundingClientRect(),o=i.width,u=i.height,c=t.over.getBoundingClientRect(),s=r+o>=c.width?o+20:0,d=n+u>=c.height?u+20:0;p({top:n+l.top+10-d,left:r+l.left+10-s})}}),[t,F,O,x,l,f]),te((function(){k(u.seriesIdx),S(u.dataIdx)}),[u]),te((function(){return y&&(document.addEventListener("mousemove",P),document.addEventListener("mouseup",I)),function(){document.removeEventListener("mousemove",P),document.removeEventListener("mouseup",I)}}),[y]),!A||u.seriesIdx<0||u.dataIdx<0?null:mt.createPortal(fr("div",{className:Bi()({"vm-chart-tooltip":!0,"vm-chart-tooltip_sticky":c,"vm-chart-tooltip_moved":b}),ref:f,style:h,children:[fr("div",{className:"vm-chart-tooltip-header",children:[fr("div",{className:"vm-chart-tooltip-header__date",children:T}),c&&fr(m,{children:[fr(ho,{className:"vm-chart-tooltip-header__drag",variant:"text",size:"small",startIcon:fr(Oi,{}),onMouseDown:function(e){D(!0),g(!0);var t=e.clientX,n=e.clientY;p({top:n,left:t})}}),fr(ho,{className:"vm-chart-tooltip-header__close",variant:"text",size:"small",startIcon:fr(ai,{}),onClick:function(){s&&s(n)}})]})]}),fr("div",{className:"vm-chart-tooltip-data",children:[fr("div",{className:"vm-chart-tooltip-data__marker",style:{background:B}}),fr("p",{children:[M,":",fr("b",{className:"vm-chart-tooltip-data__value",children:N}),i]})]}),!!L.length&&fr("div",{className:"vm-chart-tooltip-info",children:L.map((function(e,t){return fr("div",{children:e},"".concat(e,"_").concat(t))}))})]}),A)};!function(e){e.xRange="xRange",e.yRange="yRange",e.data="data"}(Hc||(Hc={}));var ns=function(e){var t=e.data,n=e.series,r=e.metrics,i=void 0===r?[]:r,o=e.period,a=e.yaxis,u=e.unit,l=e.setPeriod,c=e.container,s=re(null),f=_t(X(!1),2),d=f[0],p=f[1],v=_t(X({min:o.start,max:o.end}),2),m=v[0],y=v[1],g=_t(X(),2),_=g[0],b=g[1],D=bo(c),w=_t(X(!1),2),x=w[0],k=w[1],C=_t(X({seriesIdx:-1,dataIdx:-1}),2),E=C[0],S=C[1],A=_t(X({left:0,top:0}),2),F=A[0],N=A[1],O=_t(X([]),2),T=O[0],B=O[1],M=oe((function(){return"".concat(E.seriesIdx,"_").concat(E.dataIdx)}),[E]),L=ae(es()((function(e){var t=e.min,n=e.max;l({from:new Date(1e3*t),to:new Date(1e3*n)})}),500),[]),P=function(e){var t=e.u,n=e.min,r=e.max,i=1e3*(r-n);iAr||(t.setScale("x",{min:n,max:r}),y({min:n,max:r}),L({min:n,max:r}))},I=function(e){var t=e.target,n=e.ctrlKey,r=e.metaKey,i=e.key,o=t instanceof HTMLInputElement||t instanceof HTMLTextAreaElement;if(_&&!o){var a="+"===i||"="===i;if(("-"===i||a)&&!n&&!r){e.preventDefault();var u=(m.max-m.min)/10*(a?1:-1);P({u:_,min:m.min+u,max:m.max-u})}}},$=function(){var e="".concat(E.seriesIdx,"_").concat(E.dataIdx),t={id:e,unit:u,series:n,metrics:i,tooltipIdx:E,tooltipOffset:F};if(!T.find((function(t){return t.id===e}))){var r=JSON.parse(JSON.stringify(t));B((function(e){return[].concat(bt(e),[r])}))}},R=function(e){B((function(t){return t.filter((function(t){return t.id!==e}))}))},j=function(){return[m.min,m.max]},z=function(e){var 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;return a.limits.enable?a.limits.range[r]:Kc(t,n)},U=Kn(Kn({},Vc),{},{series:n,axes:Zc([{},{scale:"1"}],u),scales:Kn({},function(){var e={x:{range:j}},t=Object.keys(a.limits.range);return(t.length?t:["1"]).forEach((function(t){e[t]={range:function(e){var n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:0,r=arguments.length>2&&void 0!==arguments[2]?arguments[2]:1;return z(e,n,r,t)}}})),e}()),width:D.width||400,plugins:[{hooks:{ready:function(e){N({left:parseFloat(e.over.style.left),top:parseFloat(e.over.style.top)}),e.over.addEventListener("mousedown",(function(t){var n=t.ctrlKey,r=t.metaKey;0===t.button&&(n||r)&&function(e){var t=e.e,n=e.factor,r=void 0===n?.85:n,i=e.u,o=e.setPanning,a=e.setPlotScale;t.preventDefault(),o(!0);var u=t.clientX,l=i.posToVal(1,"x")-i.posToVal(0,"x"),c=i.scales.x.min||0,s=i.scales.x.max||0,f=function(e){e.preventDefault();var t=l*((e.clientX-u)*r);a({u:i,min:c-t,max:s-t})};document.addEventListener("mousemove",f),document.addEventListener("mouseup",(function e(){o(!1),document.removeEventListener("mousemove",f),document.removeEventListener("mouseup",e)}))}({u:e,e:t,setPanning:p,setPlotScale:P,factor:.9})})),e.over.addEventListener("wheel",(function(t){if(t.ctrlKey||t.metaKey){t.preventDefault();var n=e.over.getBoundingClientRect().width,r=e.cursor.left&&e.cursor.left>0?e.cursor.left:0,i=e.posToVal(r,"x"),o=(e.scales.x.max||0)-(e.scales.x.min||0),a=t.deltaY<0?.9*o:o/.9,u=i-r/n*a,l=u+a;e.batch((function(){return P({u:e,min:u,max:l})}))}}))},setCursor:function(e){var t,n=null!==(t=e.cursor.idx)&&void 0!==t?t:-1;S((function(e){return Kn(Kn({},e),{},{dataIdx:n})}))},setSeries:function(e,t){var n=null!==t&&void 0!==t?t:-1;S((function(e){return Kn(Kn({},e),{},{seriesIdx:n})}))}}}],hooks:{setSelect:[function(e){var t=e.posToVal(e.select.left,"x"),n=e.posToVal(e.select.left+e.select.width,"x");P({u:e,min:t,max:n})}]}}),H=function(e){if(_){switch(e){case Hc.xRange:_.scales.x.range=j;break;case Hc.yRange:Object.keys(a.limits.range).forEach((function(e){_.scales[e]&&(_.scales[e].range=function(t){var n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:0,r=arguments.length>2&&void 0!==arguments[2]?arguments[2]:1;return z(t,n,r,e)})}));break;case Hc.data:_.setData(t)}d||_.redraw()}};return te((function(){return y({min:o.start,max:o.end})}),[o]),te((function(){if(B([]),S({seriesIdx:-1,dataIdx:-1}),s.current){var e=new zc(U,t,s.current);return b(e),y({min:o.start,max:o.end}),e.destroy}}),[s.current,n,D]),te((function(){return window.addEventListener("keydown",I),function(){window.removeEventListener("keydown",I)}}),[m]),te((function(){return H(Hc.data)}),[t]),te((function(){return H(Hc.xRange)}),[m]),te((function(){return H(Hc.yRange)}),[a]),te((function(){var e=-1!==E.dataIdx&&-1!==E.seriesIdx;return k(e),e&&window.addEventListener("click",$),function(){window.removeEventListener("click",$)}}),[E,T]),fr("div",{className:Bi()({"vm-line-chart":!0,"vm-line-chart_panning":d}),children:[fr("div",{className:"vm-line-chart__u-plot",ref:s}),_&&x&&fr(ts,{unit:u,u:_,series:n,metrics:i,tooltipIdx:E,tooltipOffset:F,id:M}),_&&T.map((function(e){return h(ts,Kn(Kn({},e),{},{isSticky:!0,u:_,key:e.id,onClose:R}))}))]})};function rs(){rs=function(){return e};var e={},t=Object.prototype,n=t.hasOwnProperty,r=Object.defineProperty||function(e,t,n){e[t]=n.value},i="function"==typeof Symbol?Symbol:{},o=i.iterator||"@@iterator",a=i.asyncIterator||"@@asyncIterator",u=i.toStringTag||"@@toStringTag";function l(e,t,n){return Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}),e[t]}try{l({},"")}catch(A){l=function(e,t,n){return e[t]=n}}function c(e,t,n,i){var o=t&&t.prototype instanceof d?t:d,a=Object.create(o.prototype),u=new C(i||[]);return r(a,"_invoke",{value:D(e,n,u)}),a}function s(e,t,n){try{return{type:"normal",arg:e.call(t,n)}}catch(A){return{type:"throw",arg:A}}}e.wrap=c;var f={};function d(){}function h(){}function p(){}var v={};l(v,o,(function(){return this}));var m=Object.getPrototypeOf,y=m&&m(m(E([])));y&&y!==t&&n.call(y,o)&&(v=y);var g=p.prototype=d.prototype=Object.create(v);function _(e){["next","throw","return"].forEach((function(t){l(e,t,(function(e){return this._invoke(t,e)}))}))}function b(e,t){function i(r,o,a,u){var l=s(e[r],e,o);if("throw"!==l.type){var c=l.arg,f=c.value;return f&&"object"==At(f)&&n.call(f,"__await")?t.resolve(f.__await).then((function(e){i("next",e,a,u)}),(function(e){i("throw",e,a,u)})):t.resolve(f).then((function(e){c.value=e,a(c)}),(function(e){return i("throw",e,a,u)}))}u(l.arg)}var o;r(this,"_invoke",{value:function(e,n){function r(){return new t((function(t,r){i(e,n,t,r)}))}return o=o?o.then(r,r):r()}})}function D(e,t,n){var r="suspendedStart";return function(i,o){if("executing"===r)throw new Error("Generator is already running");if("completed"===r){if("throw"===i)throw o;return S()}for(n.method=i,n.arg=o;;){var a=n.delegate;if(a){var u=w(a,n);if(u){if(u===f)continue;return u}}if("next"===n.method)n.sent=n._sent=n.arg;else if("throw"===n.method){if("suspendedStart"===r)throw r="completed",n.arg;n.dispatchException(n.arg)}else"return"===n.method&&n.abrupt("return",n.arg);r="executing";var l=s(e,t,n);if("normal"===l.type){if(r=n.done?"completed":"suspendedYield",l.arg===f)continue;return{value:l.arg,done:n.done}}"throw"===l.type&&(r="completed",n.method="throw",n.arg=l.arg)}}}function w(e,t){var n=e.iterator[t.method];if(void 0===n){if(t.delegate=null,"throw"===t.method){if(e.iterator.return&&(t.method="return",t.arg=void 0,w(e,t),"throw"===t.method))return f;t.method="throw",t.arg=new TypeError("The iterator does not provide a 'throw' method")}return f}var r=s(n,e.iterator,t.arg);if("throw"===r.type)return t.method="throw",t.arg=r.arg,t.delegate=null,f;var i=r.arg;return i?i.done?(t[e.resultName]=i.value,t.next=e.nextLoc,"return"!==t.method&&(t.method="next",t.arg=void 0),t.delegate=null,f):i:(t.method="throw",t.arg=new TypeError("iterator result is not an object"),t.delegate=null,f)}function x(e){var t={tryLoc:e[0]};1 in e&&(t.catchLoc=e[1]),2 in e&&(t.finallyLoc=e[2],t.afterLoc=e[3]),this.tryEntries.push(t)}function k(e){var t=e.completion||{};t.type="normal",delete t.arg,e.completion=t}function C(e){this.tryEntries=[{tryLoc:"root"}],e.forEach(x,this),this.reset(!0)}function E(e){if(e){var t=e[o];if(t)return t.call(e);if("function"==typeof e.next)return e;if(!isNaN(e.length)){var r=-1,i=function t(){for(;++r=0;--i){var o=this.tryEntries[i],a=o.completion;if("root"===o.tryLoc)return r("end");if(o.tryLoc<=this.prev){var u=n.call(o,"catchLoc"),l=n.call(o,"finallyLoc");if(u&&l){if(this.prev=0;--r){var i=this.tryEntries[r];if(i.tryLoc<=this.prev&&n.call(i,"finallyLoc")&&this.prev=0;--t){var n=this.tryEntries[t];if(n.finallyLoc===e)return this.complete(n.completion,n.afterLoc),k(n),f}},catch:function(e){for(var t=this.tryEntries.length-1;t>=0;--t){var n=this.tryEntries[t];if(n.tryLoc===e){var r=n.completion;if("throw"===r.type){var i=r.arg;k(n)}return i}}throw new Error("illegal catch attempt")},delegateYield:function(e,t,n){return this.delegate={iterator:E(e),resultName:t,nextLoc:n},"next"===this.method&&(this.arg=void 0),f}},e}function is(e,t,n,r,i,o,a){try{var u=e[o](a),l=u.value}catch(c){return void n(c)}u.done?t(l):Promise.resolve(l).then(r,i)}function os(e){return function(){var t=this,n=arguments;return new Promise((function(r,i){var o=e.apply(t,n);function a(e){is(o,r,i,a,u,"next",e)}function u(e){is(o,r,i,a,u,"throw",e)}a(void 0)}))}}var as=function(e){var t=e.legend,n=e.onChange,r=_t(X(""),2),i=r[0],o=r[1],a=oe((function(){return function(e){var t=Object.keys(e.freeFormFields).filter((function(e){return"__name__"!==e}));return t.map((function(t){var n="".concat(t,'="').concat(e.freeFormFields[t],'"');return{id:"".concat(e.label,".").concat(n),freeField:n,key:t}}))}(t)}),[t]),u=function(){var e=os(rs().mark((function e(t,n){return rs().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,navigator.clipboard.writeText(t);case 2:o(n),setTimeout((function(){return o("")}),2e3);case 4:case"end":return e.stop()}}),e)})));return function(t,n){return e.apply(this,arguments)}}();return fr("div",{className:Bi()({"vm-legend-item":!0,"vm-legend-item_hide":!t.checked}),onClick:function(e){return function(t){n(e,t.ctrlKey||t.metaKey)}}(t),children:[fr("div",{className:"vm-legend-item__marker",style:{backgroundColor:t.color}}),fr("div",{className:"vm-legend-item-info",children:[fr("span",{className:"vm-legend-item-info__label",children:Qc(t.label)}),"\xa0{",a.map((function(e){return fr(mo,{open:i===e.id,title:"Copied!",placement:"top-center",children:fr("span",{className:"vm-legend-item-info__free-fields",onClick:(t=e.freeField,n=e.id,function(e){e.stopPropagation(),u(t,n)}),children:e.freeField},e.key)},e.id);var t,n})),"}"]})]})},us=function(e){var t=e.labels,n=e.query,r=e.onChange,i=oe((function(){return Array.from(new Set(t.map((function(e){return e.group}))))}),[t]);return fr(m,{children:fr("div",{className:"vm-legend",children:i.map((function(e){return fr("div",{className:"vm-legend-group",children:[fr("div",{className:"vm-legend-group-title",children:[fr("span",{className:"vm-legend-group-title__count",children:["Query ",e,": "]}),fr("span",{className:"vm-legend-group-title__query",children:n[e-1]})]}),fr("div",{children:t.filter((function(t){return t.group===e})).map((function(e){return fr(as,{legend:e,onChange:r},e.label)}))})]},e)}))})})};function ls(e,t){if(null==e)return{};var n,r,i=function(e,t){if(null==e)return{};var n,r,i={},o=Object.keys(e);for(r=0;r=0||(i[n]=e[n]);return i}(e,t);if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(e);for(r=0;r=0||Object.prototype.propertyIsEnumerable.call(e,n)&&(i[n]=e[n])}return i}var cs=["__name__"],ss=function(e,t,n){var r=function(e,t){var n=e.metric,r=n.__name__,i=ls(n,cs),o=t||r||"";return 0===Object.keys(e.metric).length?o||"Result ".concat(e.group):"".concat(o," {").concat(Object.entries(i).map((function(e){return"".concat(e[0],": ").concat(e[1])})).join(", "),"}")}(e,n[e.group-1]),i="[".concat(e.group,"]").concat(r);return{label:i,freeFormFields:e.metric,width:1.4,stroke:Wc(i),show:!ds(i,t),scale:"1",points:{size:4.2,width:1.4}}},fs=function(e,t){return{group:t,label:e.label||"",color:e.stroke,checked:e.show||!1,freeFormFields:e.freeFormFields}},ds=function(e,t){return t.includes("".concat(e))},hs=function(e){switch(e){case"NaN":return NaN;case"Inf":case"+Inf":return 1/0;case"-Inf":return-1/0;default:return parseFloat(e)}},ps=function(e){var t=e.data,n=void 0===t?[]:t,r=e.period,i=e.customStep,o=e.query,a=e.yaxis,u=e.unit,l=e.showLegend,c=void 0===l||l,s=e.setYaxisLimits,f=e.setPeriod,d=e.alias,h=void 0===d?[]:d,p=e.fullWidth,v=void 0===p||p,m=oe((function(){return i||r.step||1}),[r.step,i]),y=_t(X([[]]),2),g=y[0],_=y[1],b=_t(X([]),2),D=b[0],w=b[1],x=_t(X([]),2),k=x[0],C=x[1],E=_t(X([]),2),S=E[0],A=E[1],F=function(e){var t=function(e){var t={},n=Object.values(e).flat(),r=Jc(n),i=Gc(n);return t[1]=Kc(r,i),t}(e);s(t)};te((function(){var e=[],t={},i=[],o=[{}];null===n||void 0===n||n.forEach((function(n){var r=ss(n,S,h);o.push(r),i.push(fs(r,n.group));var a,u=t[n.group]||[],l=Wo(n.values);try{for(l.s();!(a=l.n()).done;){var c=a.value;e.push(c[0]),u.push(hs(c[1]))}}catch(s){l.e(s)}finally{l.f()}t[n.group]=u}));var a=function(e,t,n){for(var r=Array.from(new Set(e)).sort((function(e,t){return e-t})),i=n.start,o=Nr(n.end+t),a=0,u=[];i<=o;){for(;a=r.length||r[a]>i)&&u.push(i)}for(;u.length<2;)u.push(i),i=Nr(i+t);return u}(e,m,r),u=n.map((function(e){var t,n=[],r=e.values,i=r.length,o=0,u=Wo(a);try{for(u.s();!(t=u.n()).done;){for(var l=t.value;o1e10*h?n.map((function(){return f})):n}));u.unshift(a),F(t),_(u),w(o),C(i)}),[n]),te((function(){var e=[],t=[{}];null===n||void 0===n||n.forEach((function(n){var r=ss(n,S,h);t.push(r),e.push(fs(r,n.group))})),w(t),C(e)}),[S]);var N=re(null);return fr("div",{className:Bi()({"vm-graph-view":!0,"vm-graph-view_full-width":v}),ref:N,children:[(null===N||void 0===N?void 0:N.current)&&fr(ns,{data:g,series:D,metrics:n,period:r,yaxis:a,unit:u,setPeriod:f,container:null===N||void 0===N?void 0:N.current}),c&&fr(us,{labels:k,query:o,onChange:function(e,t){A(function(e){var t=e.hideSeries,n=e.legend,r=e.metaKey,i=e.series,o=n.label,a=ds(o,t),u=i.map((function(e){return e.label||""}));return r?a?t.filter((function(e){return e!==o})):[].concat(bt(t),[o]):t.length?a?bt(u.filter((function(e){return e!==o}))):[]:bt(u.filter((function(e){return e!==o})))}({hideSeries:S,legend:e,metaKey:t,series:D}))}})]})},vs=function(e){var t=e.value,n=e.onChange,r=e.onEnter,i=e.onArrowUp,o=e.onArrowDown,a=e.autocomplete,u=e.error,l=e.options,s=e.label,f=e.disabled,d=void 0!==f&&f,h=_t(X(-1),2),p=h[0],v=h[1],m=_t(X(!1),2),y=m[0],g=m[1],_=re(null),b=re(null),D=oe((function(){if(!y)return[];try{var e=new RegExp(String(t),"i");return l.filter((function(n){return e.test(n)&&n!==t})).sort((function(t,n){var r,i;return((null===(r=t.match(e))||void 0===r?void 0:r.index)||0)-((null===(i=n.match(e))||void 0===i?void 0:i.index)||0)}))}catch(c){return[]}}),[y,l,t]),w=function(){g(!1)},x=function(e){return function(){d||(n(e),w())}};return te((function(){if(a){v(-1);var e=(t.match(/[a-zA-Z_:.][a-zA-Z0-9_:.]*/gm)||[]).length;g(a&&t.length>2&&e<=1)}}),[a,t]),te((function(){if(b.current){var e=b.current.childNodes[p];null!==e&&void 0!==e&&e.scrollIntoView&&e.scrollIntoView({block:"center"})}}),[p]),po(_,w,b),fr("div",{className:"vm-query-editor",ref:_,children:[fr(To,{value:t,label:s,type:"textarea",autofocus:!!t,error:u,onKeyDown:function(e){var t=e.key,a=e.ctrlKey,u=e.metaKey,l=e.shiftKey,c=a||u,s="ArrowUp"===t,f="ArrowDown"===t,h="Enter"===t,m="Escape"===t,g=y&&D.length,_=D[p],b=s||f;if((b&&g||b&&c||h&&g)&&e.preventDefault(),s&&g&&!c?v((function(e){return 0===e?0:e-1})):s&&c&&i(),f&&g&&!c?v((function(e){return e>=D.length-1?D.length-1:e+1})):f&&c&&o(),_&&h&&g&&!l&&!c){if(d)return;n(_),w()}else h&&!l&&(r(),w());m&&y&&w()},onChange:n,disabled:d}),fr(vo,{open:y,buttonRef:_,placement:"bottom-left",onClose:w,children:fr("div",{className:"vm-query-editor-autocomplete",ref:b,children:D.map((function(e,t){return fr("div",{className:Bi()({"vm-list__item":!0,"vm-list__item_active":t===p}),id:"$autocomplete$".concat(e),onClick:x(e),children:e},e)}))})})]})},ms=n(936),ys=n.n(ms),gs=function(e){var t=e.defaultStep,n=e.setStep,r=_t(X(t),2),i=r[0],o=r[1],a=_t(X(""),2),u=a[0],l=a[1],c=ae(ys()((function(e){return n(e||1)}),700),[]),s=function(e){e>0?(o(e),c(e),l("")):l("step is out of allowed range")};return te((function(){t&&s(t)}),[t]),fr(To,{label:"Step value",type:"number",value:i,error:u,onChange:function(e){var t=+e;t&&s(t)},endIcon:fr(mo,{title:"Reset step to default",children:fr(ho,{variant:"text",size:"small",startIcon:fr(ui,{}),onClick:function(){s(t||1)}})})})},_s=function(){var e=Xn().serverURL,t=hr().tenantId,n=pr(),r=Qr(),i=_t(X(t||0),2),o=i[0],a=i[1],u=ae(ys()((function(t){var i=Number(t);if(n({type:"SET_TENANT_ID",payload:i}),e){var o=e.replace(/(\/select\/)([\d]+)(\/prometheus)/gim,"$1".concat(i,"$3"));n({type:"SET_SERVER",payload:o}),r({type:"RUN_QUERY"})}}),700),[]);return te((function(){o!==t&&a(t)}),[t]),fr(To,{label:"Tenant ID",type:"number",value:o,onChange:function(e){a(e),u(e)},endIcon:fr(mo,{title:"Define tenant id if you need request to another storage",children:fr(ho,{variant:"text",size:"small",startIcon:fr(li,{})})})})},bs=function(e){var t,n=e.value,r=void 0!==n&&n,i=e.disabled,o=void 0!==i&&i,a=e.label,u=e.color,l=void 0===u?"secondary":u,c=e.onChange;return fr("div",{className:Bi()((qn(t={"vm-switch":!0,"vm-switch_disabled":o,"vm-switch_active":r},"vm-switch_".concat(l,"_active"),r),qn(t,"vm-switch_".concat(l),l),t)),onClick:function(){o||c(!r)},children:[fr("div",{className:"vm-switch-track",children:fr("div",{className:"vm-switch-track__thumb"})}),a&&fr("span",{className:"vm-switch__label",children:a})]})},Ds=function(){var e=Ji(),t=Xn().inputTenantID,n=ni().autocomplete,r=ri(),i=Yi(),o=i.nocache,a=i.isTracingEnabled,u=qi(),l=Wr().period.step;return fr("div",{className:"vm-additional-settings",children:[fr(bs,{label:"Autocomplete",value:n,onChange:function(){r({type:"TOGGLE_AUTOCOMPLETE"})}}),fr(bs,{label:"Disable cache",value:o,onChange:function(){u({type:"TOGGLE_NO_CACHE"})}}),fr(bs,{label:"Trace query",value:a,onChange:function(){u({type:"TOGGLE_QUERY_TRACING"})}}),fr("div",{className:"vm-additional-settings__input",children:fr(gs,{defaultStep:l,setStep:function(t){e({type:"SET_CUSTOM_STEP",payload:t})}})}),!!t&&fr("div",{className:"vm-additional-settings__input",children:fr(_s,{})})]})};var ws=function(e){var t=re();return te((function(){t.current=e}),[e]),t.current},xs=function(e){var t=e.error,n=e.queryOptions,r=e.onHideQuery,i=ni(),o=i.query,a=i.queryHistory,u=i.autocomplete,l=ri(),c=Qr(),s=_t(X(o||[]),2),f=s[0],d=s[1],h=_t(X([]),2),p=h[0],v=h[1],m=ws(f),y=function(){l({type:"SET_QUERY_HISTORY",payload:f.map((function(e,t){var n=a[t]||{values:[]},r=e===n.values[n.values.length-1];return{index:n.values.length-Number(r),values:!r&&e?[].concat(bt(n.values),[e]):n.values}}))}),l({type:"SET_QUERY",payload:f}),c({type:"RUN_QUERY"})},g=function(e,t){d((function(n){return n.map((function(n,r){return r===t?e:n}))}))},_=function(e,t){return function(){!function(e,t){var n=a[t],r=n.index,i=n.values,o=r+e;o<0||o>=i.length||(g(i[o]||"",t),l({type:"SET_QUERY_HISTORY_BY_INDEX",payload:{value:{values:i,index:o},queryNumber:t}}))}(e,t)}},b=function(e){return function(t){g(t,e)}},D=function(e){return function(){var t;t=e,d((function(e){return e.filter((function(e,n){return n!==t}))})),v((function(t){return t.map((function(t){return t>e?t-1:t}))}))}},w=function(e){return function(){var t;t=e,v((function(e){return e.includes(t)?e.filter((function(e){return e!==t})):[].concat(bt(e),[t])}))}};return te((function(){m&&f.length1&&fr(mo,{title:"Remove Query",children:fr("div",{className:"vm-query-configurator-list-row__button",children:fr(ho,{variant:"text",color:"error",startIcon:fr(Ci,{}),onClick:D(r)})})})]},r)}))}),fr("div",{className:"vm-query-configurator-settings",children:[fr(Ds,{}),fr("div",{className:"vm-query-configurator-settings__buttons",children:[f.length<4&&fr(ho,{variant:"outlined",onClick:function(){d((function(e){return[].concat(bt(e),[""])}))},startIcon:fr(Ei,{}),children:"Add Query"}),fr(ho,{variant:"contained",onClick:y,startIcon:fr(bi,{}),children:"Execute Query"})]})]})]})};function ks(e){var t,n,r,i=2;for("undefined"!=typeof Symbol&&(n=Symbol.asyncIterator,r=Symbol.iterator);i--;){if(n&&null!=(t=e[n]))return t.call(e);if(r&&null!=(t=e[r]))return new Cs(t.call(e));n="@@asyncIterator",r="@@iterator"}throw new TypeError("Object is not async iterable")}function Cs(e){function t(e){if(Object(e)!==e)return Promise.reject(new TypeError(e+" is not an object."));var t=e.done;return Promise.resolve(e.value).then((function(e){return{value:e,done:t}}))}return Cs=function(e){this.s=e,this.n=e.next},Cs.prototype={s:null,n:null,next:function(){return t(this.n.apply(this.s,arguments))},return:function(e){var n=this.s.return;return void 0===n?Promise.resolve({value:e,done:!0}):t(n.apply(this.s,arguments))},throw:function(e){var n=this.s.return;return void 0===n?Promise.reject(e):t(n.apply(this.s,arguments))}},new Cs(e)}var Es=0,Ss=function(){function e(t,n){Dt(this,e),this.tracing=void 0,this.query=void 0,this.tracingChildren=void 0,this.originalTracing=void 0,this.id=void 0,this.tracing=t,this.originalTracing=JSON.parse(JSON.stringify(t)),this.query=n,this.id=Es++;var r=t.children||[];this.tracingChildren=r.map((function(t){return new e(t,n)}))}return xt(e,[{key:"queryValue",get:function(){return this.query}},{key:"idValue",get:function(){return this.id}},{key:"children",get:function(){return this.tracingChildren}},{key:"message",get:function(){return this.tracing.message}},{key:"duration",get:function(){return this.tracing.duration_msec}},{key:"JSON",get:function(){return JSON.stringify(this.tracing,null,2)}},{key:"originalJSON",get:function(){return JSON.stringify(this.originalTracing,null,2)}},{key:"setTracing",value:function(t){var n=this;this.tracing=t;var r=t.children||[];this.tracingChildren=r.map((function(t){return new e(t,n.query)}))}},{key:"setQuery",value:function(e){this.query=e}},{key:"resetTracing",value:function(){this.tracing=this.originalTracing}}]),e}(),As=function(e){var t=e.predefinedQuery,n=e.visible,r=e.display,i=e.customStep,o=e.hideQuery,a=e.showAllSeries,u=ni().query,l=Wr().period,c=Yi(),s=c.displayType,f=c.nocache,d=c.isTracingEnabled,h=c.seriesLimits,p=hr().serverUrl,v=_t(X(!1),2),m=v[0],y=v[1],g=_t(X(),2),_=g[0],b=g[1],D=_t(X(),2),w=D[0],x=D[1],k=_t(X(),2),C=k[0],E=k[1],S=_t(X(),2),A=S[0],F=S[1],N=_t(X(),2),O=N[0],T=N[1],B=_t(X([]),2),M=B[0],L=B[1];te((function(){A&&(b(void 0),x(void 0),E(void 0))}),[A]);var P=function(){var e=os(rs().mark((function e(t){var n,r,i,o,a,u,l,c,s,f,d,h;return rs().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return n=t.fetchUrl,r=t.fetchQueue,i=t.displayType,o=t.query,a=t.stateSeriesLimits,u=t.showAllSeries,l=new AbortController,L([].concat(bt(r),[l])),e.prev=3,e.delegateYield(rs().mark((function e(){var t,r,p,v,m,y,g,_,D,w,k,C;return rs().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:t="chart"===i,r=u?1/0:a[i],p=[],v=[],m=1,y=0,c=!1,s=!1,e.prev=8,d=ks(n);case 10:return e.next=12,d.next();case 12:if(!(c=!(h=e.sent).done)){e.next=24;break}return g=h.value,e.next=16,fetch(g,{signal:l.signal});case 16:return _=e.sent,e.next=19,_.json();case 19:D=e.sent,_.ok?(F(void 0),D.trace&&(w=new Ss(D.trace,o[m-1]),v.push(w)),k=r-p.length,D.data.result.slice(0,k).forEach((function(e){e.group=m,p.push(e)})),y+=D.data.result.length,m++):F("".concat(D.errorType,"\r\n").concat(null===D||void 0===D?void 0:D.error));case 21:c=!1,e.next=10;break;case 24:e.next=30;break;case 26:e.prev=26,e.t0=e.catch(8),s=!0,f=e.t0;case 30:if(e.prev=30,e.prev=31,!c||null==d.return){e.next=35;break}return e.next=35,d.return();case 35:if(e.prev=35,!s){e.next=38;break}throw f;case 38:return e.finish(35);case 39:return e.finish(30);case 40:C="Showing ".concat(r," series out of ").concat(y," series due to performance reasons. Please narrow down the query, so it returns less series"),T(y>r?C:""),t?b(p):x(p),E(v);case 44:case"end":return e.stop()}}),e,null,[[8,26,30,40],[31,,35,39]])}))(),"t0",5);case 5:e.next=10;break;case 7:e.prev=7,e.t1=e.catch(3),e.t1 instanceof Error&&"AbortError"!==e.t1.name&&F("".concat(e.t1.name,": ").concat(e.t1.message));case 10:y(!1);case 11:case"end":return e.stop()}}),e,null,[[3,7]])})));return function(t){return e.apply(this,arguments)}}(),I=ae(ys()(P,800),[]),$=function(e,t){var n=e.trim(),r=!o||!o.includes(t);return n&&r},R=oe((function(){var e=null!==t&&void 0!==t?t:u,n="chart"===(r||s);if(l)if(p)if(e.every((function(e){return!e.trim()})))F(Co.validQuery);else{if(Bo(p)){var o=Kn({},l);return o.step=i,e.filter($).map((function(e){return n?function(e,t,n,r,i){return"".concat(e,"/api/v1/query_range?query=").concat(encodeURIComponent(t),"&start=").concat(n.start,"&end=").concat(n.end,"&step=").concat(n.step).concat(r?"&nocache=1":"").concat(i?"&trace=1":"")}(p,e,o,f,d):function(e,t,n,r){return"".concat(e,"/api/v1/query?query=").concat(encodeURIComponent(t),"&time=").concat(n.end,"&step=").concat(n.step).concat(r?"&trace=1":"")}(p,e,o,d)}))}F(Co.validServer)}else F(Co.emptyServer)}),[p,l,s,i,o]);return te((function(){n&&null!==R&&void 0!==R&&R.length&&(y(!0),I({fetchUrl:R,fetchQueue:M,displayType:r||s,query:null!==t&&void 0!==t?t:u,stateSeriesLimits:h,showAllSeries:a}))}),[R,n,h,a]),te((function(){var e=M.slice(0,-1);e.length&&(e.map((function(e){return e.abort()})),L(M.filter((function(e){return!e.signal.aborted}))))}),[M]),{fetchUrl:R,isLoading:m,graphData:_,liveData:w,error:A,warning:O,traces:C}},Fs=function(e){var t=e.data,n=so().showInfoMessage,r=oe((function(){return JSON.stringify(t,null,2)}),[t]);return fr("div",{className:"vm-json-view",children:[fr("div",{className:"vm-json-view__copy",children:fr(ho,{variant:"outlined",onClick:function(){navigator.clipboard.writeText(r),n({text:"Formatted JSON has been copied",type:"success"})},children:"Copy JSON"})}),fr("pre",{className:"vm-json-view__code",children:fr("code",{children:r})})]})},Ns=function(e){var t=e.yaxis,n=e.setYaxisLimits,r=e.toggleEnableLimits,i=oe((function(){return Object.keys(t.limits.range)}),[t.limits.range]),o=ae(ys()((function(e,r,i){var o=t.limits.range;o[r][i]=+e,o[r][0]===o[r][1]||o[r][0]>o[r][1]||n(o)}),500),[t.limits.range]),a=function(e,t){return function(n){o(n,e,t)}};return fr("div",{className:"vm-axes-limits",children:[fr(bs,{value:t.limits.enable,onChange:r,label:"Fix the limits for y-axis"}),fr("div",{className:"vm-axes-limits-list",children:i.map((function(e){return fr("div",{className:"vm-axes-limits-list__inputs",children:[fr(To,{label:"Min ".concat(e),type:"number",disabled:!t.limits.enable,value:t.limits.range[e][0],onChange:a(e,0)}),fr(To,{label:"Max ".concat(e),type:"number",disabled:!t.limits.enable,value:t.limits.range[e][1],onChange:a(e,1)})]},e)}))})]})},Os="Axes settings",Ts=function(e){var t=e.yaxis,n=e.setYaxisLimits,r=e.toggleEnableLimits,i=re(null),o=_t(X(!1),2),a=o[0],u=o[1],l=re(null);po(i,(function(){return u(!1)}),l);var c=function(){u(!1)};return fr("div",{className:"vm-graph-settings",children:[fr(mo,{title:Os,children:fr("div",{ref:l,children:fr(ho,{variant:"text",startIcon:fr(oi,{}),onClick:function(){u((function(e){return!e}))}})})}),fr(vo,{open:a,buttonRef:l,placement:"bottom-right",onClose:c,children:fr("div",{className:"vm-graph-settings-popper",ref:i,children:[fr("div",{className:"vm-popper-header",children:[fr("h3",{className:"vm-popper-header__title",children:Os}),fr(ho,{size:"small",startIcon:fr(ai,{}),onClick:c})]}),fr("div",{className:"vm-graph-settings-popper__body",children:fr(Ns,{yaxis:t,setYaxisLimits:n,toggleEnableLimits:r})})]})})]})},Bs=function(e){var t=e.containerStyles,n=void 0===t?{}:t,r=e.message;return fr("div",{className:"vm-spinner",style:n&&{},children:[fr("div",{className:"half-circle-spinner",children:[fr("div",{className:"circle circle-1"}),fr("div",{className:"circle circle-2"})]}),r&&fr("div",{className:"vm-spinner__message",children:r})]})},Ms=function(){var e=hr().serverUrl,t=_t(X([]),2),n=t[0],r=t[1],i=function(){var t=os(rs().mark((function t(){var n,i,o;return rs().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:if(e){t.next=2;break}return t.abrupt("return");case 2:return n="".concat(e,"/api/v1/label/__name__/values"),t.prev=3,t.next=6,fetch(n);case 6:return i=t.sent,t.next=9,i.json();case 9:o=t.sent,i.ok&&r(o.data),t.next=16;break;case 13:t.prev=13,t.t0=t.catch(3),console.error(t.t0);case 16:case"end":return t.stop()}}),t,null,[[3,13]])})));return function(){return t.apply(this,arguments)}}();return te((function(){i()}),[e]),{queryOptions:n}},Ls=function(e){var t=e.value;return fr("div",{className:"vm-line-progress",children:[fr("div",{className:"vm-line-progress-track",children:fr("div",{className:"vm-line-progress-track__thumb",style:{width:"".concat(t,"%")}})}),fr("span",{children:[t.toFixed(2),"%"]})]})},Ps=function e(t){var n,r=t.trace,i=t.totalMsec,o=_t(X({}),2),a=o[0],u=o[1],l=r.children&&!!r.children.length,c=r.duration/i*100;return fr("div",{className:"vm-nested-nav",children:[fr("div",{className:"vm-nested-nav-header",onClick:(n=r.idValue,function(){u((function(e){return Kn(Kn({},e),{},qn({},n,!e[n]))}))}),children:[l&&fr("div",{className:Bi()({"vm-nested-nav-header__icon":!0,"vm-nested-nav-header__icon_open":a[r.idValue]}),children:fr(pi,{})}),fr("div",{className:"vm-nested-nav-header__progress",children:fr(Ls,{value:c})}),fr("div",{className:"vm-nested-nav-header__message",children:r.message}),fr("div",{className:"vm-nested-nav-header__duration",children:"duration: ".concat(r.duration," ms")})]}),a[r.idValue]&&fr("div",{children:l&&r.children.map((function(t){return fr(e,{trace:t,totalMsec:i},t.duration)}))})]})},Is=function(e){var t=e.editable,n=void 0!==t&&t,r=e.defaultTile,i=void 0===r?"JSON":r,o=e.displayTitle,a=void 0===o||o,u=e.defaultJson,l=void 0===u?"":u,s=e.resetValue,f=void 0===s?"":s,d=e.onClose,h=e.onUpload,p=so().showInfoMessage,v=_t(X(l),2),m=v[0],y=v[1],g=_t(X(i),2),_=g[0],b=g[1],D=_t(X(""),2),w=D[0],x=D[1],k=_t(X(""),2),C=k[0],E=k[1],S=oe((function(){try{var e=JSON.parse(m),t=e.trace||e;return t.duration_msec?(new Ss(t,""),""):Co.traceNotFound}catch(c){return c instanceof Error?c.message:"Unknown error"}}),[m]),A=function(){var e=os(rs().mark((function e(){return rs().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,navigator.clipboard.writeText(m);case 2:p({text:"Formatted JSON has been copied",type:"success"});case 3:case"end":return e.stop()}}),e)})));return function(){return e.apply(this,arguments)}}(),F=function(){E(S),_.trim()||x(Co.emptyTitle),S||w||(h(m,_),d())};return fr("div",{className:Bi()({"vm-json-form":!0,"vm-json-form_one-field":!a}),children:[a&&fr(To,{value:_,label:"Title",error:w,onEnter:F,onChange:function(e){b(e)}}),fr(To,{value:m,label:"JSON",type:"textarea",error:C,autofocus:!0,onChange:function(e){E(""),y(e)},disabled:!n}),fr("div",{className:"vm-json-form-footer",children:[fr("div",{className:"vm-json-form-footer__controls",children:[fr(ho,{variant:"outlined",startIcon:fr(Ni,{}),onClick:A,children:"Copy JSON"}),f&&fr(ho,{variant:"text",startIcon:fr(ui,{}),onClick:function(){y(f)},children:"Reset JSON"})]}),fr("div",{className:"vm-json-form-footer__controls vm-json-form-footer__controls_right",children:[fr(ho,{variant:"outlined",color:"error",onClick:d,children:"Cancel"}),fr(ho,{variant:"contained",onClick:F,children:"apply"})]})]})]})},$s=function(e){var t=e.traces,n=e.jsonEditor,r=void 0!==n&&n,i=e.onDeleteClick,o=_t(X(null),2),a=o[0],u=o[1],l=function(){u(null)};if(!t.length)return fr(lo,{variant:"info",children:"Please re-run the query to see results of the tracing"});var s=function(e){return function(){i(e)}};return fr(m,{children:[fr("div",{className:"vm-tracings-view",children:t.map((function(e){return fr("div",{className:"vm-tracings-view-trace vm-block vm-block_empty-padding",children:[fr("div",{className:"vm-tracings-view-trace-header",children:[fr("h3",{className:"vm-tracings-view-trace-header-title",children:["Trace for ",fr("b",{className:"vm-tracings-view-trace-header-title__query",children:e.queryValue})]}),fr(mo,{title:"Open JSON",children:fr(ho,{variant:"text",startIcon:fr(ki,{}),onClick:(t=e,function(){u(t)})})}),fr(mo,{title:"Remove trace",children:fr(ho,{variant:"text",color:"error",startIcon:fr(Ci,{}),onClick:s(e)})})]}),fr("nav",{className:"vm-tracings-view-trace__nav",children:fr(Ps,{trace:e,totalMsec:e.duration})})]},e.idValue);var t}))}),a&&fr(Lo,{title:a.queryValue,onClose:l,children:fr(Is,{editable:r,displayTitle:r,defaultTile:a.queryValue,defaultJson:a.JSON,resetValue:a.originalJSON,onClose:l,onUpload:function(e,t){if(r&&a)try{a.setTracing(JSON.parse(e)),a.setQuery(t),u(null)}catch(c){console.error(c)}}})})]})},Rs=function(e,t){return oe((function(){var n={};e.forEach((function(e){return Object.entries(e.metric).forEach((function(e){return n[e[0]]?n[e[0]].options.add(e[1]):n[e[0]]={options:new Set([e[1]])}}))}));var r=Object.entries(n).map((function(e){return{key:e[0],variations:e[1].options.size}})).sort((function(e,t){return e.variations-t.variations}));return t?r.filter((function(e){return t.includes(e.key)})):r}),[e,t])},js=function(e){var t,n=e.checked,r=void 0!==n&&n,i=e.disabled,o=void 0!==i&&i,a=e.label,u=e.color,l=void 0===u?"secondary":u,c=e.onChange;return fr("div",{className:Bi()((qn(t={"vm-checkbox":!0,"vm-checkbox_disabled":o,"vm-checkbox_active":r},"vm-checkbox_".concat(l,"_active"),r),qn(t,"vm-checkbox_".concat(l),l),t)),onClick:function(){o||c(!r)},children:[fr("div",{className:"vm-checkbox-track",children:fr("div",{className:"vm-checkbox-track__thumb",children:fr(Si,{})})}),a&&fr("span",{className:"vm-checkbox__label",children:a})]})},zs="Display columns",Us=function(e){var t=e.data,n=e.defaultColumns,r=e.onChange,i=re(null),o=_t(X(!1),2),a=o[0],u=o[1],l=Rs(t),c=oe((function(){return!l.length}),[l]),s=_t(X(l.map((function(e){return e.key}))),2),f=s[0],d=s[1],h=function(){u(!1),d(n||l.map((function(e){return e.key})))},p=function(e){return function(){!function(e){d((function(t){return f.includes(e)?t.filter((function(t){return t!==e})):[].concat(bt(t),[e])}))}(e)}};return te((function(){d(l.map((function(e){return e.key})))}),[l]),fr("div",{className:"vm-table-settings",children:[fr(mo,{title:zs,children:fr("div",{ref:i,children:fr(ho,{variant:"text",startIcon:fr(oi,{}),onClick:function(){u((function(e){return!e}))},disabled:c})})}),fr(vo,{open:a,onClose:h,placement:"bottom-right",buttonRef:i,children:fr("div",{className:"vm-table-settings-popper",children:[fr("div",{className:"vm-popper-header",children:[fr("h3",{className:"vm-popper-header__title",children:zs}),fr(ho,{onClick:h,startIcon:fr(ai,{}),size:"small"})]}),fr("div",{className:"vm-table-settings-popper-list",children:l.map((function(e){return fr("div",{className:"vm-table-settings-popper-list__item",children:fr(js,{checked:f.includes(e.key),onChange:p(e.key),label:e.key})},e.key)}))}),fr("div",{className:"vm-table-settings-popper__footer",children:[fr(ho,{color:"error",variant:"outlined",size:"small",onClick:function(){u(!1);var e=l.map((function(e){return e.key}));d(e),r(e)},children:"Reset"}),fr(ho,{variant:"contained",size:"small",onClick:function(){u(!1),r(f)},children:"apply"})]})]})})]})};function Hs(e){return function(e,t){return Object.fromEntries(Object.entries(e).filter(t))}(e,(function(e){return!!e[1]}))}var Vs=["__name__"],Ys=function(e){var t=e.data,n=e.displayColumns,r=so().showInfoMessage,i=Rs(t,n),o=_t(X(""),2),a=o[0],u=o[1],l=_t(X("asc"),2),c=l[0],s=l[1],f=function(e){var t=e.__name__,n=ls(e,Vs);return t||Object.keys(n).length?"".concat(t," ").concat(JSON.stringify(n)):""},d=oe((function(){var e=null===t||void 0===t?void 0:t.map((function(e){return{metadata:i.map((function(t){return e.metric[t.key]||"-"})),value:e.value?e.value[1]:"-",copyValue:f(e.metric)}})),n="Value"===a,r=i.findIndex((function(e){return e.key===a}));return n||-1!==r?e.sort((function(e,t){var i=n?Number(e.value):e.metadata[r],o=n?Number(t.value):t.metadata[r];return("asc"===c?io)?-1:1})):e}),[i,t,a,c]),h=oe((function(){return d.some((function(e){return e.copyValue}))}),[d]),p=function(){var e=os(rs().mark((function e(t){return rs().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,navigator.clipboard.writeText(t);case 2:r({text:"Row has been copied",type:"success"});case 3:case"end":return e.stop()}}),e)})));return function(t){return e.apply(this,arguments)}}(),v=function(e){return function(){!function(e){s((function(t){return"asc"===t&&a===e?"desc":"asc"})),u(e)}(e)}};return d.length?fr("table",{className:"vm-table",children:[fr("thead",{className:"vm-table-header",children:fr("tr",{className:"vm-table__row vm-table__row_header",children:[i.map((function(e,t){return fr("td",{className:"vm-table-cell vm-table-cell_header vm-table-cell_sort",onClick:v(e.key),children:fr("div",{className:"vm-table-cell__content",children:[e.key,fr("div",{className:Bi()({"vm-table__sort-icon":!0,"vm-table__sort-icon_active":a===e.key,"vm-table__sort-icon_desc":"desc"===c&&a===e.key}),children:fr(vi,{})})]})},t)})),fr("td",{className:"vm-table-cell vm-table-cell_header vm-table-cell_right vm-table-cell_sort",onClick:v("Value"),children:fr("div",{className:"vm-table-cell__content",children:[fr("div",{className:Bi()({"vm-table__sort-icon":!0,"vm-table__sort-icon_active":"Value"===a,"vm-table__sort-icon_desc":"desc"===c}),children:fr(vi,{})}),"Value"]})}),h&&fr("td",{className:"vm-table-cell vm-table-cell_header"})]})}),fr("tbody",{className:"vm-table-body",children:d.map((function(e,t){return fr("tr",{className:"vm-table__row",children:[e.metadata.map((function(e,n){return fr("td",{className:Bi()({"vm-table-cell vm-table-cell_no-wrap":!0,"vm-table-cell_gray":d[t-1]&&d[t-1].metadata[n]===e}),children:e},n)})),fr("td",{className:"vm-table-cell vm-table-cell_right",children:e.value}),h&&fr("td",{className:"vm-table-cell vm-table-cell_right",children:e.copyValue&&fr("div",{className:"vm-table-cell__content",children:fr(mo,{title:"Copy row",children:fr(ho,{variant:"text",color:"gray",size:"small",startIcon:fr(Ni,{}),onClick:(n=e.copyValue,function(){p(n)})})})})})]},t);var n}))})]}):fr(lo,{variant:"warning",children:"No data to show"})},qs=function(){var e=Yi(),t=e.displayType,n=e.isTracingEnabled,r=ni().query,i=Wr().period,o=Qr();!function(){var e=hr().tenantId,t=Yi().displayType,n=ni().query,r=Wr(),i=r.duration,o=r.relativeTime,a=r.period,u=a.date,l=a.step,c=function(){var r={};n.forEach((function(n,a){var c,s="g".concat(a);r["".concat(s,".expr")]=n,r["".concat(s,".range_input")]=i,r["".concat(s,".end_input")]=u,r["".concat(s,".step_input")]=l,r["".concat(s,".tab")]=(null===(c=Ii.find((function(e){return e.value===t})))||void 0===c?void 0:c.prometheusCode)||0,r["".concat(s,".relative_time")]=o,r["".concat(s,".tenantID")]=e})),ar(Hs(r))};te(c,[e,t,n,i,o,u,l]),te(c,[])}();var a=_t(X(),2),u=a[0],l=a[1],c=_t(X([]),2),s=c[0],f=c[1],d=_t(X([]),2),h=d[0],p=d[1],v=_t(X(!1),2),m=v[0],y=v[1],g=ue(Gi).state,_=g.customStep,b=g.yaxis,D=Ji(),w=Ms().queryOptions,x=As({visible:!0,customStep:_,hideQuery:h,showAllSeries:m}),k=x.isLoading,C=x.liveData,E=x.graphData,S=x.error,A=x.warning,F=x.traces,N=function(e){D({type:"SET_YAXIS_LIMITS",payload:e})};return te((function(){F&&f([].concat(bt(s),bt(F)))}),[F]),te((function(){f([])}),[t]),te((function(){y(!1)}),[r]),fr("div",{className:"vm-custom-panel",children:[fr(xs,{error:S,queryOptions:w,onHideQuery:function(e){p(e)}}),n&&fr("div",{className:"vm-custom-panel__trace",children:fr($s,{traces:s,onDeleteClick:function(e){var t=s.filter((function(t){return t.idValue!==e.idValue}));f(bt(t))}})}),k&&fr(Bs,{}),S&&fr(lo,{variant:"error",children:S}),A&&fr(lo,{variant:"warning",children:fr("div",{className:"vm-custom-panel__warning",children:[fr("p",{children:A}),fr(ho,{color:"warning",variant:"outlined",onClick:function(){y(!0)},children:"Show all"})]})}),fr("div",{className:"vm-custom-panel-body vm-block",children:[fr("div",{className:"vm-custom-panel-body-header",children:[fr($i,{}),"chart"===t&&fr(Ts,{yaxis:b,setYaxisLimits:N,toggleEnableLimits:function(){D({type:"TOGGLE_ENABLE_YAXIS_LIMITS"})}}),"table"===t&&fr(Us,{data:C||[],defaultColumns:u,onChange:l})]}),E&&i&&"chart"===t&&fr(ps,{data:E,period:i,customStep:_,query:r,yaxis:b,setYaxisLimits:N,setPeriod:function(e){var t=e.from,n=e.to;o({type:"SET_PERIOD",payload:{from:t,to:n}})}}),C&&"code"===t&&fr(Fs,{data:C}),C&&"table"===t&&fr(Ys,{data:C,displayColumns:u})]})]})},Ws=function(){var e=os(rs().mark((function e(t){var n,r;return rs().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,fetch("./dashboards/".concat(t));case 2:return n=e.sent,e.next=5,n.json();case 5:return r=e.sent,e.abrupt("return",r);case 7:case"end":return e.stop()}}),e)})));return function(t){return e.apply(this,arguments)}}(),Qs=os(rs().mark((function e(){var t;return rs().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return t=window.__VMUI_PREDEFINED_DASHBOARDS__,e.next=3,Promise.all(t.map(function(){var e=os(rs().mark((function e(t){return rs().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.abrupt("return",Ws(t));case 1:case"end":return e.stop()}}),e)})));return function(t){return e.apply(this,arguments)}}()));case 3:return e.abrupt("return",e.sent);case 4:case"end":return e.stop()}}),e)})));function Gs(){return{async:!1,baseUrl:null,breaks:!1,extensions:null,gfm:!0,headerIds:!0,headerPrefix:"",highlight:null,langPrefix:"language-",mangle:!0,pedantic:!1,renderer:null,sanitize:!1,sanitizer:null,silent:!1,smartypants:!1,tokenizer:null,walkTokens:null,xhtml:!1}}var Js={async:!1,baseUrl:null,breaks:!1,extensions:null,gfm:!0,headerIds:!0,headerPrefix:"",highlight:null,langPrefix:"language-",mangle:!0,pedantic:!1,renderer:null,sanitize:!1,sanitizer:null,silent:!1,smartypants:!1,tokenizer:null,walkTokens:null,xhtml:!1};var Zs=/[&<>"']/,Ks=/[&<>"']/g,Xs=/[<>"']|&(?!#?\w+;)/,ef=/[<>"']|&(?!#?\w+;)/g,tf={"&":"&","<":"<",">":">",'"':""","'":"'"},nf=function(e){return tf[e]};function rf(e,t){if(t){if(Zs.test(e))return e.replace(Ks,nf)}else if(Xs.test(e))return e.replace(ef,nf);return e}var of=/&(#(?:\d+)|(?:#x[0-9A-Fa-f]+)|(?:\w+));?/gi;function af(e){return e.replace(of,(function(e,t){return"colon"===(t=t.toLowerCase())?":":"#"===t.charAt(0)?"x"===t.charAt(1)?String.fromCharCode(parseInt(t.substring(2),16)):String.fromCharCode(+t.substring(1)):""}))}var uf=/(^|[^\[])\^/g;function lf(e,t){e="string"===typeof e?e:e.source,t=t||"";var n={replace:function(t,r){return r=(r=r.source||r).replace(uf,"$1"),e=e.replace(t,r),n},getRegex:function(){return new RegExp(e,t)}};return n}var cf=/[^\w:]/g,sf=/^$|^[a-z][a-z0-9+.-]*:|^[?#]/i;function ff(e,t,n){if(e){var r;try{r=decodeURIComponent(af(n)).replace(cf,"").toLowerCase()}catch(c){return null}if(0===r.indexOf("javascript:")||0===r.indexOf("vbscript:")||0===r.indexOf("data:"))return null}t&&!sf.test(n)&&(n=function(e,t){df[" "+e]||(hf.test(e)?df[" "+e]=e+"/":df[" "+e]=_f(e,"/",!0));var n=-1===(e=df[" "+e]).indexOf(":");return"//"===t.substring(0,2)?n?t:e.replace(pf,"$1")+t:"/"===t.charAt(0)?n?t:e.replace(vf,"$1")+t:e+t}(t,n));try{n=encodeURI(n).replace(/%25/g,"%")}catch(c){return null}return n}var df={},hf=/^[^:]+:\/*[^/]*$/,pf=/^([^:]+:)[\s\S]*$/,vf=/^([^:]+:\/*[^/]*)[\s\S]*$/;var mf={exec:function(){}};function yf(e){for(var t,n,r=1;r=0&&"\\"===n[i];)r=!r;return r?"|":" |"})).split(/ \|/),r=0;if(n[0].trim()||n.shift(),n.length>0&&!n[n.length-1].trim()&&n.pop(),n.length>t)n.splice(t);else for(;n.length1;)1&t&&(n+=e),t>>=1,e+=e;return n+e}function wf(e,t,n,r){var i=t.href,o=t.title?rf(t.title):null,a=e[1].replace(/\\([\[\]])/g,"$1");if("!"!==e[0].charAt(0)){r.state.inLink=!0;var u={type:"link",raw:n,href:i,title:o,text:a,tokens:r.inlineTokens(a)};return r.state.inLink=!1,u}return{type:"image",raw:n,href:i,title:o,text:rf(a)}}var xf=function(){function e(t){Dt(this,e),this.options=t||Js}return xt(e,[{key:"space",value:function(e){var t=this.rules.block.newline.exec(e);if(t&&t[0].length>0)return{type:"space",raw:t[0]}}},{key:"code",value:function(e){var t=this.rules.block.code.exec(e);if(t){var n=t[0].replace(/^ {1,4}/gm,"");return{type:"code",raw:t[0],codeBlockStyle:"indented",text:this.options.pedantic?n:_f(n,"\n")}}}},{key:"fences",value:function(e){var t=this.rules.block.fences.exec(e);if(t){var n=t[0],r=function(e,t){var n=e.match(/^(\s+)(?:```)/);if(null===n)return t;var r=n[1];return t.split("\n").map((function(e){var t=e.match(/^\s+/);return null===t?e:_t(t,1)[0].length>=r.length?e.slice(r.length):e})).join("\n")}(n,t[3]||"");return{type:"code",raw:n,lang:t[2]?t[2].trim().replace(this.rules.inline._escapes,"$1"):t[2],text:r}}}},{key:"heading",value:function(e){var t=this.rules.block.heading.exec(e);if(t){var n=t[2].trim();if(/#$/.test(n)){var r=_f(n,"#");this.options.pedantic?n=r.trim():r&&!/ $/.test(r)||(n=r.trim())}return{type:"heading",raw:t[0],depth:t[1].length,text:n,tokens:this.lexer.inline(n)}}}},{key:"hr",value:function(e){var t=this.rules.block.hr.exec(e);if(t)return{type:"hr",raw:t[0]}}},{key:"blockquote",value:function(e){var t=this.rules.block.blockquote.exec(e);if(t){var n=t[0].replace(/^ *>[ \t]?/gm,"");return{type:"blockquote",raw:t[0],tokens:this.lexer.blockTokens(n,[]),text:n}}}},{key:"list",value:function(e){var t=this.rules.block.list.exec(e);if(t){var n,r,i,o,a,u,l,c,s,f,d,h,p=t[1].trim(),v=p.length>1,m={type:"list",raw:"",ordered:v,start:v?+p.slice(0,-1):"",loose:!1,items:[]};p=v?"\\d{1,9}\\".concat(p.slice(-1)):"\\".concat(p),this.options.pedantic&&(p=v?p:"[*+-]");for(var y=new RegExp("^( {0,3}".concat(p,")((?:[\t ][^\\n]*)?(?:\\n|$))"));e&&(h=!1,t=y.exec(e))&&!this.rules.block.hr.test(e);){if(n=t[0],e=e.substring(n.length),c=t[2].split("\n",1)[0],s=e.split("\n",1)[0],this.options.pedantic?(o=2,d=c.trimLeft()):(o=(o=t[2].search(/[^ ]/))>4?1:o,d=c.slice(o),o+=t[1].length),u=!1,!c&&/^ *$/.test(s)&&(n+=s+"\n",e=e.substring(s.length+1),h=!0),!h)for(var g=new RegExp("^ {0,".concat(Math.min(3,o-1),"}(?:[*+-]|\\d{1,9}[.)])((?: [^\\n]*)?(?:\\n|$))")),_=new RegExp("^ {0,".concat(Math.min(3,o-1),"}((?:- *){3,}|(?:_ *){3,}|(?:\\* *){3,})(?:\\n+|$)")),b=new RegExp("^ {0,".concat(Math.min(3,o-1),"}(?:```|~~~)")),D=new RegExp("^ {0,".concat(Math.min(3,o-1),"}#"));e&&(c=f=e.split("\n",1)[0],this.options.pedantic&&(c=c.replace(/^ {1,4}(?=( {4})*[^ ])/g," ")),!b.test(c))&&!D.test(c)&&!g.test(c)&&!_.test(e);){if(c.search(/[^ ]/)>=o||!c.trim())d+="\n"+c.slice(o);else{if(u)break;d+="\n"+c}u||c.trim()||(u=!0),n+=f+"\n",e=e.substring(f.length+1)}m.loose||(l?m.loose=!0:/\n *\n *$/.test(n)&&(l=!0)),this.options.gfm&&(r=/^\[[ xX]\] /.exec(d))&&(i="[ ] "!==r[0],d=d.replace(/^\[[ xX]\] +/,"")),m.items.push({type:"list_item",raw:n,task:!!r,checked:i,loose:!1,text:d}),m.raw+=n}m.items[m.items.length-1].raw=n.trimRight(),m.items[m.items.length-1].text=d.trimRight(),m.raw=m.raw.trimRight();var w=m.items.length;for(a=0;a1)return!0}}catch(i){r.e(i)}finally{r.f()}return!1}));!m.loose&&x.length&&k&&(m.loose=!0,m.items[a].loose=!0)}return m}}},{key:"html",value:function(e){var t=this.rules.block.html.exec(e);if(t){var n={type:"html",raw:t[0],pre:!this.options.sanitizer&&("pre"===t[1]||"script"===t[1]||"style"===t[1]),text:t[0]};if(this.options.sanitize){var r=this.options.sanitizer?this.options.sanitizer(t[0]):rf(t[0]);n.type="paragraph",n.text=r,n.tokens=this.lexer.inline(r)}return n}}},{key:"def",value:function(e){var t=this.rules.block.def.exec(e);if(t)return t[3]&&(t[3]=t[3].substring(1,t[3].length-1)),{type:"def",tag:t[1].toLowerCase().replace(/\s+/g," "),raw:t[0],href:t[2]?t[2].replace(this.rules.inline._escapes,"$1"):t[2],title:t[3]?t[3].replace(this.rules.inline._escapes,"$1"):t[3]}}},{key:"table",value:function(e){var t=this.rules.block.table.exec(e);if(t){var n={type:"table",header:gf(t[1]).map((function(e){return{text:e}})),align:t[2].replace(/^ *|\| *$/g,"").split(/ *\| */),rows:t[3]&&t[3].trim()?t[3].replace(/\n[ \t]*$/,"").split("\n"):[]};if(n.header.length===n.align.length){n.raw=t[0];var r,i,o,a,u=n.align.length;for(r=0;r/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:this.options.sanitize?"text":"html",raw:t[0],inLink:this.lexer.state.inLink,inRawBlock:this.lexer.state.inRawBlock,text:this.options.sanitize?this.options.sanitizer?this.options.sanitizer(t[0]):rf(t[0]):t[0]}}},{key:"link",value:function(e){var t=this.rules.inline.link.exec(e);if(t){var n=t[2].trim();if(!this.options.pedantic&&/^$/.test(n))return;var r=_f(n.slice(0,-1),"\\");if((n.length-r.length)%2===0)return}else{var i=function(e,t){if(-1===e.indexOf(t[1]))return-1;for(var n=e.length,r=0,i=0;i-1){var o=(0===t[0].indexOf("!")?5:4)+t[1].length+i;t[2]=t[2].substring(0,i),t[0]=t[0].substring(0,o).trim(),t[3]=""}}var a=t[2],u="";if(this.options.pedantic){var l=/^([^'"]*[^\s])\s+(['"])(.*)\2/.exec(a);l&&(a=l[1],u=l[3])}else u=t[3]?t[3].slice(1,-1):"";return a=a.trim(),/^$/.test(n)?a.slice(1):a.slice(1,-1)),wf(t,{href:a?a.replace(this.rules.inline._escapes,"$1"):a,title:u?u.replace(this.rules.inline._escapes,"$1"):u},t[0],this.lexer)}}},{key:"reflink",value:function(e,t){var n;if((n=this.rules.inline.reflink.exec(e))||(n=this.rules.inline.nolink.exec(e))){var r=(n[2]||n[1]).replace(/\s+/g," ");if(!(r=t[r.toLowerCase()])||!r.href){var i=n[0].charAt(0);return{type:"text",raw:i,text:i}}return wf(n,r,n[0],this.lexer)}}},{key:"emStrong",value:function(e,t){var n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:"",r=this.rules.inline.emStrong.lDelim.exec(e);if(r&&(!r[3]||!n.match(/(?:[0-9A-Za-z\xAA\xB2\xB3\xB5\xB9\xBA\xBC-\xBE\xC0-\xD6\xD8-\xF6\xF8-\u02C1\u02C6-\u02D1\u02E0-\u02E4\u02EC\u02EE\u0370-\u0374\u0376\u0377\u037A-\u037D\u037F\u0386\u0388-\u038A\u038C\u038E-\u03A1\u03A3-\u03F5\u03F7-\u0481\u048A-\u052F\u0531-\u0556\u0559\u0560-\u0588\u05D0-\u05EA\u05EF-\u05F2\u0620-\u064A\u0660-\u0669\u066E\u066F\u0671-\u06D3\u06D5\u06E5\u06E6\u06EE-\u06FC\u06FF\u0710\u0712-\u072F\u074D-\u07A5\u07B1\u07C0-\u07EA\u07F4\u07F5\u07FA\u0800-\u0815\u081A\u0824\u0828\u0840-\u0858\u0860-\u086A\u0870-\u0887\u0889-\u088E\u08A0-\u08C9\u0904-\u0939\u093D\u0950\u0958-\u0961\u0966-\u096F\u0971-\u0980\u0985-\u098C\u098F\u0990\u0993-\u09A8\u09AA-\u09B0\u09B2\u09B6-\u09B9\u09BD\u09CE\u09DC\u09DD\u09DF-\u09E1\u09E6-\u09F1\u09F4-\u09F9\u09FC\u0A05-\u0A0A\u0A0F\u0A10\u0A13-\u0A28\u0A2A-\u0A30\u0A32\u0A33\u0A35\u0A36\u0A38\u0A39\u0A59-\u0A5C\u0A5E\u0A66-\u0A6F\u0A72-\u0A74\u0A85-\u0A8D\u0A8F-\u0A91\u0A93-\u0AA8\u0AAA-\u0AB0\u0AB2\u0AB3\u0AB5-\u0AB9\u0ABD\u0AD0\u0AE0\u0AE1\u0AE6-\u0AEF\u0AF9\u0B05-\u0B0C\u0B0F\u0B10\u0B13-\u0B28\u0B2A-\u0B30\u0B32\u0B33\u0B35-\u0B39\u0B3D\u0B5C\u0B5D\u0B5F-\u0B61\u0B66-\u0B6F\u0B71-\u0B77\u0B83\u0B85-\u0B8A\u0B8E-\u0B90\u0B92-\u0B95\u0B99\u0B9A\u0B9C\u0B9E\u0B9F\u0BA3\u0BA4\u0BA8-\u0BAA\u0BAE-\u0BB9\u0BD0\u0BE6-\u0BF2\u0C05-\u0C0C\u0C0E-\u0C10\u0C12-\u0C28\u0C2A-\u0C39\u0C3D\u0C58-\u0C5A\u0C5D\u0C60\u0C61\u0C66-\u0C6F\u0C78-\u0C7E\u0C80\u0C85-\u0C8C\u0C8E-\u0C90\u0C92-\u0CA8\u0CAA-\u0CB3\u0CB5-\u0CB9\u0CBD\u0CDD\u0CDE\u0CE0\u0CE1\u0CE6-\u0CEF\u0CF1\u0CF2\u0D04-\u0D0C\u0D0E-\u0D10\u0D12-\u0D3A\u0D3D\u0D4E\u0D54-\u0D56\u0D58-\u0D61\u0D66-\u0D78\u0D7A-\u0D7F\u0D85-\u0D96\u0D9A-\u0DB1\u0DB3-\u0DBB\u0DBD\u0DC0-\u0DC6\u0DE6-\u0DEF\u0E01-\u0E30\u0E32\u0E33\u0E40-\u0E46\u0E50-\u0E59\u0E81\u0E82\u0E84\u0E86-\u0E8A\u0E8C-\u0EA3\u0EA5\u0EA7-\u0EB0\u0EB2\u0EB3\u0EBD\u0EC0-\u0EC4\u0EC6\u0ED0-\u0ED9\u0EDC-\u0EDF\u0F00\u0F20-\u0F33\u0F40-\u0F47\u0F49-\u0F6C\u0F88-\u0F8C\u1000-\u102A\u103F-\u1049\u1050-\u1055\u105A-\u105D\u1061\u1065\u1066\u106E-\u1070\u1075-\u1081\u108E\u1090-\u1099\u10A0-\u10C5\u10C7\u10CD\u10D0-\u10FA\u10FC-\u1248\u124A-\u124D\u1250-\u1256\u1258\u125A-\u125D\u1260-\u1288\u128A-\u128D\u1290-\u12B0\u12B2-\u12B5\u12B8-\u12BE\u12C0\u12C2-\u12C5\u12C8-\u12D6\u12D8-\u1310\u1312-\u1315\u1318-\u135A\u1369-\u137C\u1380-\u138F\u13A0-\u13F5\u13F8-\u13FD\u1401-\u166C\u166F-\u167F\u1681-\u169A\u16A0-\u16EA\u16EE-\u16F8\u1700-\u1711\u171F-\u1731\u1740-\u1751\u1760-\u176C\u176E-\u1770\u1780-\u17B3\u17D7\u17DC\u17E0-\u17E9\u17F0-\u17F9\u1810-\u1819\u1820-\u1878\u1880-\u1884\u1887-\u18A8\u18AA\u18B0-\u18F5\u1900-\u191E\u1946-\u196D\u1970-\u1974\u1980-\u19AB\u19B0-\u19C9\u19D0-\u19DA\u1A00-\u1A16\u1A20-\u1A54\u1A80-\u1A89\u1A90-\u1A99\u1AA7\u1B05-\u1B33\u1B45-\u1B4C\u1B50-\u1B59\u1B83-\u1BA0\u1BAE-\u1BE5\u1C00-\u1C23\u1C40-\u1C49\u1C4D-\u1C7D\u1C80-\u1C88\u1C90-\u1CBA\u1CBD-\u1CBF\u1CE9-\u1CEC\u1CEE-\u1CF3\u1CF5\u1CF6\u1CFA\u1D00-\u1DBF\u1E00-\u1F15\u1F18-\u1F1D\u1F20-\u1F45\u1F48-\u1F4D\u1F50-\u1F57\u1F59\u1F5B\u1F5D\u1F5F-\u1F7D\u1F80-\u1FB4\u1FB6-\u1FBC\u1FBE\u1FC2-\u1FC4\u1FC6-\u1FCC\u1FD0-\u1FD3\u1FD6-\u1FDB\u1FE0-\u1FEC\u1FF2-\u1FF4\u1FF6-\u1FFC\u2070\u2071\u2074-\u2079\u207F-\u2089\u2090-\u209C\u2102\u2107\u210A-\u2113\u2115\u2119-\u211D\u2124\u2126\u2128\u212A-\u212D\u212F-\u2139\u213C-\u213F\u2145-\u2149\u214E\u2150-\u2189\u2460-\u249B\u24EA-\u24FF\u2776-\u2793\u2C00-\u2CE4\u2CEB-\u2CEE\u2CF2\u2CF3\u2CFD\u2D00-\u2D25\u2D27\u2D2D\u2D30-\u2D67\u2D6F\u2D80-\u2D96\u2DA0-\u2DA6\u2DA8-\u2DAE\u2DB0-\u2DB6\u2DB8-\u2DBE\u2DC0-\u2DC6\u2DC8-\u2DCE\u2DD0-\u2DD6\u2DD8-\u2DDE\u2E2F\u3005-\u3007\u3021-\u3029\u3031-\u3035\u3038-\u303C\u3041-\u3096\u309D-\u309F\u30A1-\u30FA\u30FC-\u30FF\u3105-\u312F\u3131-\u318E\u3192-\u3195\u31A0-\u31BF\u31F0-\u31FF\u3220-\u3229\u3248-\u324F\u3251-\u325F\u3280-\u3289\u32B1-\u32BF\u3400-\u4DBF\u4E00-\uA48C\uA4D0-\uA4FD\uA500-\uA60C\uA610-\uA62B\uA640-\uA66E\uA67F-\uA69D\uA6A0-\uA6EF\uA717-\uA71F\uA722-\uA788\uA78B-\uA7CA\uA7D0\uA7D1\uA7D3\uA7D5-\uA7D9\uA7F2-\uA801\uA803-\uA805\uA807-\uA80A\uA80C-\uA822\uA830-\uA835\uA840-\uA873\uA882-\uA8B3\uA8D0-\uA8D9\uA8F2-\uA8F7\uA8FB\uA8FD\uA8FE\uA900-\uA925\uA930-\uA946\uA960-\uA97C\uA984-\uA9B2\uA9CF-\uA9D9\uA9E0-\uA9E4\uA9E6-\uA9FE\uAA00-\uAA28\uAA40-\uAA42\uAA44-\uAA4B\uAA50-\uAA59\uAA60-\uAA76\uAA7A\uAA7E-\uAAAF\uAAB1\uAAB5\uAAB6\uAAB9-\uAABD\uAAC0\uAAC2\uAADB-\uAADD\uAAE0-\uAAEA\uAAF2-\uAAF4\uAB01-\uAB06\uAB09-\uAB0E\uAB11-\uAB16\uAB20-\uAB26\uAB28-\uAB2E\uAB30-\uAB5A\uAB5C-\uAB69\uAB70-\uABE2\uABF0-\uABF9\uAC00-\uD7A3\uD7B0-\uD7C6\uD7CB-\uD7FB\uF900-\uFA6D\uFA70-\uFAD9\uFB00-\uFB06\uFB13-\uFB17\uFB1D\uFB1F-\uFB28\uFB2A-\uFB36\uFB38-\uFB3C\uFB3E\uFB40\uFB41\uFB43\uFB44\uFB46-\uFBB1\uFBD3-\uFD3D\uFD50-\uFD8F\uFD92-\uFDC7\uFDF0-\uFDFB\uFE70-\uFE74\uFE76-\uFEFC\uFF10-\uFF19\uFF21-\uFF3A\uFF41-\uFF5A\uFF66-\uFFBE\uFFC2-\uFFC7\uFFCA-\uFFCF\uFFD2-\uFFD7\uFFDA-\uFFDC]|\uD800[\uDC00-\uDC0B\uDC0D-\uDC26\uDC28-\uDC3A\uDC3C\uDC3D\uDC3F-\uDC4D\uDC50-\uDC5D\uDC80-\uDCFA\uDD07-\uDD33\uDD40-\uDD78\uDD8A\uDD8B\uDE80-\uDE9C\uDEA0-\uDED0\uDEE1-\uDEFB\uDF00-\uDF23\uDF2D-\uDF4A\uDF50-\uDF75\uDF80-\uDF9D\uDFA0-\uDFC3\uDFC8-\uDFCF\uDFD1-\uDFD5]|\uD801[\uDC00-\uDC9D\uDCA0-\uDCA9\uDCB0-\uDCD3\uDCD8-\uDCFB\uDD00-\uDD27\uDD30-\uDD63\uDD70-\uDD7A\uDD7C-\uDD8A\uDD8C-\uDD92\uDD94\uDD95\uDD97-\uDDA1\uDDA3-\uDDB1\uDDB3-\uDDB9\uDDBB\uDDBC\uDE00-\uDF36\uDF40-\uDF55\uDF60-\uDF67\uDF80-\uDF85\uDF87-\uDFB0\uDFB2-\uDFBA]|\uD802[\uDC00-\uDC05\uDC08\uDC0A-\uDC35\uDC37\uDC38\uDC3C\uDC3F-\uDC55\uDC58-\uDC76\uDC79-\uDC9E\uDCA7-\uDCAF\uDCE0-\uDCF2\uDCF4\uDCF5\uDCFB-\uDD1B\uDD20-\uDD39\uDD80-\uDDB7\uDDBC-\uDDCF\uDDD2-\uDE00\uDE10-\uDE13\uDE15-\uDE17\uDE19-\uDE35\uDE40-\uDE48\uDE60-\uDE7E\uDE80-\uDE9F\uDEC0-\uDEC7\uDEC9-\uDEE4\uDEEB-\uDEEF\uDF00-\uDF35\uDF40-\uDF55\uDF58-\uDF72\uDF78-\uDF91\uDFA9-\uDFAF]|\uD803[\uDC00-\uDC48\uDC80-\uDCB2\uDCC0-\uDCF2\uDCFA-\uDD23\uDD30-\uDD39\uDE60-\uDE7E\uDE80-\uDEA9\uDEB0\uDEB1\uDF00-\uDF27\uDF30-\uDF45\uDF51-\uDF54\uDF70-\uDF81\uDFB0-\uDFCB\uDFE0-\uDFF6]|\uD804[\uDC03-\uDC37\uDC52-\uDC6F\uDC71\uDC72\uDC75\uDC83-\uDCAF\uDCD0-\uDCE8\uDCF0-\uDCF9\uDD03-\uDD26\uDD36-\uDD3F\uDD44\uDD47\uDD50-\uDD72\uDD76\uDD83-\uDDB2\uDDC1-\uDDC4\uDDD0-\uDDDA\uDDDC\uDDE1-\uDDF4\uDE00-\uDE11\uDE13-\uDE2B\uDE3F\uDE40\uDE80-\uDE86\uDE88\uDE8A-\uDE8D\uDE8F-\uDE9D\uDE9F-\uDEA8\uDEB0-\uDEDE\uDEF0-\uDEF9\uDF05-\uDF0C\uDF0F\uDF10\uDF13-\uDF28\uDF2A-\uDF30\uDF32\uDF33\uDF35-\uDF39\uDF3D\uDF50\uDF5D-\uDF61]|\uD805[\uDC00-\uDC34\uDC47-\uDC4A\uDC50-\uDC59\uDC5F-\uDC61\uDC80-\uDCAF\uDCC4\uDCC5\uDCC7\uDCD0-\uDCD9\uDD80-\uDDAE\uDDD8-\uDDDB\uDE00-\uDE2F\uDE44\uDE50-\uDE59\uDE80-\uDEAA\uDEB8\uDEC0-\uDEC9\uDF00-\uDF1A\uDF30-\uDF3B\uDF40-\uDF46]|\uD806[\uDC00-\uDC2B\uDCA0-\uDCF2\uDCFF-\uDD06\uDD09\uDD0C-\uDD13\uDD15\uDD16\uDD18-\uDD2F\uDD3F\uDD41\uDD50-\uDD59\uDDA0-\uDDA7\uDDAA-\uDDD0\uDDE1\uDDE3\uDE00\uDE0B-\uDE32\uDE3A\uDE50\uDE5C-\uDE89\uDE9D\uDEB0-\uDEF8]|\uD807[\uDC00-\uDC08\uDC0A-\uDC2E\uDC40\uDC50-\uDC6C\uDC72-\uDC8F\uDD00-\uDD06\uDD08\uDD09\uDD0B-\uDD30\uDD46\uDD50-\uDD59\uDD60-\uDD65\uDD67\uDD68\uDD6A-\uDD89\uDD98\uDDA0-\uDDA9\uDEE0-\uDEF2\uDF02\uDF04-\uDF10\uDF12-\uDF33\uDF50-\uDF59\uDFB0\uDFC0-\uDFD4]|\uD808[\uDC00-\uDF99]|\uD809[\uDC00-\uDC6E\uDC80-\uDD43]|\uD80B[\uDF90-\uDFF0]|[\uD80C\uD81C-\uD820\uD822\uD840-\uD868\uD86A-\uD86C\uD86F-\uD872\uD874-\uD879\uD880-\uD883\uD885-\uD887][\uDC00-\uDFFF]|\uD80D[\uDC00-\uDC2F\uDC41-\uDC46]|\uD811[\uDC00-\uDE46]|\uD81A[\uDC00-\uDE38\uDE40-\uDE5E\uDE60-\uDE69\uDE70-\uDEBE\uDEC0-\uDEC9\uDED0-\uDEED\uDF00-\uDF2F\uDF40-\uDF43\uDF50-\uDF59\uDF5B-\uDF61\uDF63-\uDF77\uDF7D-\uDF8F]|\uD81B[\uDE40-\uDE96\uDF00-\uDF4A\uDF50\uDF93-\uDF9F\uDFE0\uDFE1\uDFE3]|\uD821[\uDC00-\uDFF7]|\uD823[\uDC00-\uDCD5\uDD00-\uDD08]|\uD82B[\uDFF0-\uDFF3\uDFF5-\uDFFB\uDFFD\uDFFE]|\uD82C[\uDC00-\uDD22\uDD32\uDD50-\uDD52\uDD55\uDD64-\uDD67\uDD70-\uDEFB]|\uD82F[\uDC00-\uDC6A\uDC70-\uDC7C\uDC80-\uDC88\uDC90-\uDC99]|\uD834[\uDEC0-\uDED3\uDEE0-\uDEF3\uDF60-\uDF78]|\uD835[\uDC00-\uDC54\uDC56-\uDC9C\uDC9E\uDC9F\uDCA2\uDCA5\uDCA6\uDCA9-\uDCAC\uDCAE-\uDCB9\uDCBB\uDCBD-\uDCC3\uDCC5-\uDD05\uDD07-\uDD0A\uDD0D-\uDD14\uDD16-\uDD1C\uDD1E-\uDD39\uDD3B-\uDD3E\uDD40-\uDD44\uDD46\uDD4A-\uDD50\uDD52-\uDEA5\uDEA8-\uDEC0\uDEC2-\uDEDA\uDEDC-\uDEFA\uDEFC-\uDF14\uDF16-\uDF34\uDF36-\uDF4E\uDF50-\uDF6E\uDF70-\uDF88\uDF8A-\uDFA8\uDFAA-\uDFC2\uDFC4-\uDFCB\uDFCE-\uDFFF]|\uD837[\uDF00-\uDF1E\uDF25-\uDF2A]|\uD838[\uDC30-\uDC6D\uDD00-\uDD2C\uDD37-\uDD3D\uDD40-\uDD49\uDD4E\uDE90-\uDEAD\uDEC0-\uDEEB\uDEF0-\uDEF9]|\uD839[\uDCD0-\uDCEB\uDCF0-\uDCF9\uDFE0-\uDFE6\uDFE8-\uDFEB\uDFED\uDFEE\uDFF0-\uDFFE]|\uD83A[\uDC00-\uDCC4\uDCC7-\uDCCF\uDD00-\uDD43\uDD4B\uDD50-\uDD59]|\uD83B[\uDC71-\uDCAB\uDCAD-\uDCAF\uDCB1-\uDCB4\uDD01-\uDD2D\uDD2F-\uDD3D\uDE00-\uDE03\uDE05-\uDE1F\uDE21\uDE22\uDE24\uDE27\uDE29-\uDE32\uDE34-\uDE37\uDE39\uDE3B\uDE42\uDE47\uDE49\uDE4B\uDE4D-\uDE4F\uDE51\uDE52\uDE54\uDE57\uDE59\uDE5B\uDE5D\uDE5F\uDE61\uDE62\uDE64\uDE67-\uDE6A\uDE6C-\uDE72\uDE74-\uDE77\uDE79-\uDE7C\uDE7E\uDE80-\uDE89\uDE8B-\uDE9B\uDEA1-\uDEA3\uDEA5-\uDEA9\uDEAB-\uDEBB]|\uD83C[\uDD00-\uDD0C]|\uD83E[\uDFF0-\uDFF9]|\uD869[\uDC00-\uDEDF\uDF00-\uDFFF]|\uD86D[\uDC00-\uDF39\uDF40-\uDFFF]|\uD86E[\uDC00-\uDC1D\uDC20-\uDFFF]|\uD873[\uDC00-\uDEA1\uDEB0-\uDFFF]|\uD87A[\uDC00-\uDFE0]|\uD87E[\uDC00-\uDE1D]|\uD884[\uDC00-\uDF4A\uDF50-\uDFFF]|\uD888[\uDC00-\uDFAF])/))){var i=r[1]||r[2]||"";if(!i||i&&(""===n||this.rules.inline.punctuation.exec(n))){var o,a,u=r[0].length-1,l=u,c=0,s="*"===r[0][0]?this.rules.inline.emStrong.rDelimAst:this.rules.inline.emStrong.rDelimUnd;for(s.lastIndex=0,t=t.slice(-1*e.length+u);null!=(r=s.exec(t));)if(o=r[1]||r[2]||r[3]||r[4]||r[5]||r[6])if(a=o.length,r[3]||r[4])l+=a;else if(!((r[5]||r[6])&&u%3)||(u+a)%3){if(!((l-=a)>0)){a=Math.min(a,a+l+c);var f=e.slice(0,u+r.index+(r[0].length-o.length)+a);if(Math.min(u,a)%2){var d=f.slice(1,-1);return{type:"em",raw:f,text:d,tokens:this.lexer.inlineTokens(d)}}var h=f.slice(2,-2);return{type:"strong",raw:f,text:h,tokens:this.lexer.inlineTokens(h)}}}else c+=a}}}},{key:"codespan",value:function(e){var t=this.rules.inline.code.exec(e);if(t){var n=t[2].replace(/\n/g," "),r=/[^ ]/.test(n),i=/^ /.test(n)&&/ $/.test(n);return r&&i&&(n=n.substring(1,n.length-1)),n=rf(n,!0),{type:"codespan",raw:t[0],text:n}}}},{key:"br",value:function(e){var t=this.rules.inline.br.exec(e);if(t)return{type:"br",raw:t[0]}}},{key:"del",value:function(e){var t=this.rules.inline.del.exec(e);if(t)return{type:"del",raw:t[0],text:t[2],tokens:this.lexer.inlineTokens(t[2])}}},{key:"autolink",value:function(e,t){var n,r,i=this.rules.inline.autolink.exec(e);if(i)return r="@"===i[2]?"mailto:"+(n=rf(this.options.mangle?t(i[1]):i[1])):n=rf(i[1]),{type:"link",raw:i[0],text:n,href:r,tokens:[{type:"text",raw:n,text:n}]}}},{key:"url",value:function(e,t){var n;if(n=this.rules.inline.url.exec(e)){var r,i;if("@"===n[2])i="mailto:"+(r=rf(this.options.mangle?t(n[0]):n[0]));else{var o;do{o=n[0],n[0]=this.rules.inline._backpedal.exec(n[0])[0]}while(o!==n[0]);r=rf(n[0]),i="www."===n[1]?"http://"+r:r}return{type:"link",raw:n[0],text:r,href:i,tokens:[{type:"text",raw:r,text:r}]}}}},{key:"inlineText",value:function(e,t){var n,r=this.rules.inline.text.exec(e);if(r)return n=this.lexer.state.inRawBlock?this.options.sanitize?this.options.sanitizer?this.options.sanitizer(r[0]):rf(r[0]):r[0]:rf(this.options.smartypants?t(r[0]):r[0]),{type:"text",raw:r[0],text:n}}}]),e}(),kf={newline:/^(?: *(?:\n|$))+/,code:/^( {4}[^\n]+(?:\n(?: *(?:\n|$))*)?)+/,fences:/^ {0,3}(`{3,}(?=[^`\n]*\n)|~{3,})([^\n]*)\n(?:|([\s\S]*?)\n)(?: {0,3}\1[~`]* *(?=\n|$)|$)/,hr:/^ {0,3}((?:-[\t ]*){3,}|(?:_[ \t]*){3,}|(?:\*[ \t]*){3,})(?:\n+|$)/,heading:/^ {0,3}(#{1,6})(?=\s|$)(.*)(?:\n+|$)/,blockquote:/^( {0,3}> ?(paragraph|[^\n]*)(?:\n|$))+/,list:/^( {0,3}bull)([ \t][^\n]+?)?(?:\n|$)/,html:"^ {0,3}(?:<(script|pre|style|textarea)[\\s>][\\s\\S]*?(?:[^\\n]*\\n+|$)|comment[^\\n]*(\\n+|$)|<\\?[\\s\\S]*?(?:\\?>\\n*|$)|\\n*|$)|\\n*|$)|)[\\s\\S]*?(?:(?:\\n *)+\\n|$)|<(?!script|pre|style|textarea)([a-z][\\w-]*)(?:attribute)*? */?>(?=[ \\t]*(?:\\n|$))[\\s\\S]*?(?:(?:\\n *)+\\n|$)|(?=[ \\t]*(?:\\n|$))[\\s\\S]*?(?:(?:\\n *)+\\n|$))",def:/^ {0,3}\[(label)\]: *(?:\n *)?]+)>?(?:(?: +(?:\n *)?| *\n *)(title))? *(?:\n+|$)/,table:mf,lheading:/^([^\n]+)\n {0,3}(=+|-+) *(?:\n+|$)/,_paragraph:/^([^\n]+(?:\n(?!hr|heading|lheading|blockquote|fences|list|html|table| +\n)[^\n]+)*)/,text:/^[^\n]+/,_label:/(?!\s*\])(?:\\.|[^\[\]\\])+/,_title:/(?:"(?:\\"?|[^"\\])*"|'[^'\n]*(?:\n[^'\n]+)*\n?'|\([^()]*\))/};kf.def=lf(kf.def).replace("label",kf._label).replace("title",kf._title).getRegex(),kf.bullet=/(?:[*+-]|\d{1,9}[.)])/,kf.listItemStart=lf(/^( *)(bull) */).replace("bull",kf.bullet).getRegex(),kf.list=lf(kf.list).replace(/bull/g,kf.bullet).replace("hr","\\n+(?=\\1?(?:(?:- *){3,}|(?:_ *){3,}|(?:\\* *){3,})(?:\\n+|$))").replace("def","\\n+(?="+kf.def.source+")").getRegex(),kf._tag="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|section|source|summary|table|tbody|td|tfoot|th|thead|title|tr|track|ul",kf._comment=/|$)/,kf.html=lf(kf.html,"i").replace("comment",kf._comment).replace("tag",kf._tag).replace("attribute",/ +[a-zA-Z:_][\w.:-]*(?: *= *"[^"\n]*"| *= *'[^'\n]*'| *= *[^\s"'=<>`]+)?/).getRegex(),kf.paragraph=lf(kf._paragraph).replace("hr",kf.hr).replace("heading"," {0,3}#{1,6} ").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",kf._tag).getRegex(),kf.blockquote=lf(kf.blockquote).replace("paragraph",kf.paragraph).getRegex(),kf.normal=yf({},kf),kf.gfm=yf({},kf.normal,{table:"^ *([^\\n ].*\\|.*)\\n {0,3}(?:\\| *)?(:?-+:? *(?:\\| *:?-+:? *)*)(?:\\| *)?(?:\\n((?:(?! *\\n|hr|heading|blockquote|code|fences|list|html).*(?:\\n|$))*)\\n*|$)"}),kf.gfm.table=lf(kf.gfm.table).replace("hr",kf.hr).replace("heading"," {0,3}#{1,6} ").replace("blockquote"," {0,3}>").replace("code"," {4}[^\\n]").replace("fences"," {0,3}(?:`{3,}(?=[^`\\n]*\\n)|~{3,})[^\\n]*\\n").replace("list"," {0,3}(?:[*+-]|1[.)]) ").replace("html",")|<(?:script|pre|style|textarea|!--)").replace("tag",kf._tag).getRegex(),kf.gfm.paragraph=lf(kf._paragraph).replace("hr",kf.hr).replace("heading"," {0,3}#{1,6} ").replace("|lheading","").replace("table",kf.gfm.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",kf._tag).getRegex(),kf.pedantic=yf({},kf.normal,{html:lf("^ *(?:comment *(?:\\n|\\s*$)|<(tag)[\\s\\S]+? *(?:\\n{2,}|\\s*$)|\\s]*)*?/?> *(?:\\n{2,}|\\s*$))").replace("comment",kf._comment).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:mf,paragraph:lf(kf.normal._paragraph).replace("hr",kf.hr).replace("heading"," *#{1,6} *[^\n]").replace("lheading",kf.lheading).replace("blockquote"," {0,3}>").replace("|fences","").replace("|list","").replace("|html","").getRegex()});var Cf={escape:/^\\([!"#$%&'()*+,\-./:;<=>?@\[\]\\^_`{|}~])/,autolink:/^<(scheme:[^\s\x00-\x1f<>]*|email)>/,url:mf,tag:"^comment|^|^<[a-zA-Z][\\w-]*(?:attribute)*?\\s*/?>|^<\\?[\\s\\S]*?\\?>|^|^",link:/^!?\[(label)\]\(\s*(href)(?:\s+(title))?\s*\)/,reflink:/^!?\[(label)\]\[(ref)\]/,nolink:/^!?\[(ref)\](?:\[\])?/,reflinkSearch:"reflink|nolink(?!\\()",emStrong:{lDelim:/^(?:\*+(?:([punct_])|[^\s*]))|^_+(?:([punct*])|([^\s_]))/,rDelimAst:/^(?:[^_*\\]|\\.)*?\_\_(?:[^_*\\]|\\.)*?\*(?:[^_*\\]|\\.)*?(?=\_\_)|(?:[^*\\]|\\.)+(?=[^*])|[punct_](\*+)(?=[\s]|$)|(?:[^punct*_\s\\]|\\.)(\*+)(?=[punct_\s]|$)|[punct_\s](\*+)(?=[^punct*_\s])|[\s](\*+)(?=[punct_])|[punct_](\*+)(?=[punct_])|(?:[^punct*_\s\\]|\\.)(\*+)(?=[^punct*_\s])/,rDelimUnd:/^(?:[^_*\\]|\\.)*?\*\*(?:[^_*\\]|\\.)*?\_(?:[^_*\\]|\\.)*?(?=\*\*)|(?:[^_\\]|\\.)+(?=[^_])|[punct*](\_+)(?=[\s]|$)|(?:[^punct*_\s\\]|\\.)(\_+)(?=[punct*\s]|$)|[punct*\s](\_+)(?=[^punct*_\s])|[\s](\_+)(?=[punct*])|[punct*](\_+)(?=[punct*])/},code:/^(`+)([^`]|[^`][\s\S]*?[^`])\1(?!`)/,br:/^( {2,}|\\)\n(?!\s*$)/,del:mf,text:/^(`+|[^`])(?:(?= {2,}\n)|[\s\S]*?(?:(?=[\\.5&&(n="x"+n.toString(16)),r+="&#"+n+";";return r}Cf._punctuation="!\"#$%&'()+\\-.,/:;<=>?@\\[\\]`^{|}~",Cf.punctuation=lf(Cf.punctuation).replace(/punctuation/g,Cf._punctuation).getRegex(),Cf.blockSkip=/\[[^\]]*?\]\([^\)]*?\)|`[^`]*?`|<[^>]*?>/g,Cf.escapedEmSt=/(?:^|[^\\])(?:\\\\)*\\[*_]/g,Cf._comment=lf(kf._comment).replace("(?:--\x3e|$)","--\x3e").getRegex(),Cf.emStrong.lDelim=lf(Cf.emStrong.lDelim).replace(/punct/g,Cf._punctuation).getRegex(),Cf.emStrong.rDelimAst=lf(Cf.emStrong.rDelimAst,"g").replace(/punct/g,Cf._punctuation).getRegex(),Cf.emStrong.rDelimUnd=lf(Cf.emStrong.rDelimUnd,"g").replace(/punct/g,Cf._punctuation).getRegex(),Cf._escapes=/\\([!"#$%&'()*+,\-./:;<=>?@\[\]\\^_`{|}~])/g,Cf._scheme=/[a-zA-Z][a-zA-Z0-9+.-]{1,31}/,Cf._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])?)+(?![-_])/,Cf.autolink=lf(Cf.autolink).replace("scheme",Cf._scheme).replace("email",Cf._email).getRegex(),Cf._attribute=/\s+[a-zA-Z:_][\w.:-]*(?:\s*=\s*"[^"]*"|\s*=\s*'[^']*'|\s*=\s*[^\s"'=<>`]+)?/,Cf.tag=lf(Cf.tag).replace("comment",Cf._comment).replace("attribute",Cf._attribute).getRegex(),Cf._label=/(?:\[(?:\\.|[^\[\]\\])*\]|\\.|`[^`]*`|[^\[\]\\`])*?/,Cf._href=/<(?:\\.|[^\n<>\\])+>|[^\s\x00-\x1f]*/,Cf._title=/"(?:\\"?|[^"\\])*"|'(?:\\'?|[^'\\])*'|\((?:\\\)?|[^)\\])*\)/,Cf.link=lf(Cf.link).replace("label",Cf._label).replace("href",Cf._href).replace("title",Cf._title).getRegex(),Cf.reflink=lf(Cf.reflink).replace("label",Cf._label).replace("ref",kf._label).getRegex(),Cf.nolink=lf(Cf.nolink).replace("ref",kf._label).getRegex(),Cf.reflinkSearch=lf(Cf.reflinkSearch,"g").replace("reflink",Cf.reflink).replace("nolink",Cf.nolink).getRegex(),Cf.normal=yf({},Cf),Cf.pedantic=yf({},Cf.normal,{strong:{start:/^__|\*\*/,middle:/^__(?=\S)([\s\S]*?\S)__(?!_)|^\*\*(?=\S)([\s\S]*?\S)\*\*(?!\*)/,endAst:/\*\*(?!\*)/g,endUnd:/__(?!_)/g},em:{start:/^_|\*/,middle:/^()\*(?=\S)([\s\S]*?\S)\*(?!\*)|^_(?=\S)([\s\S]*?\S)_(?!_)/,endAst:/\*(?!\*)/g,endUnd:/_(?!_)/g},link:lf(/^!?\[(label)\]\((.*?)\)/).replace("label",Cf._label).getRegex(),reflink:lf(/^!?\[(label)\]\s*\[([^\]]*)\]/).replace("label",Cf._label).getRegex()}),Cf.gfm=yf({},Cf.normal,{escape:lf(Cf.escape).replace("])","~|])").getRegex(),_extended_email:/[A-Za-z0-9._+-]+(@)[a-zA-Z0-9-_]+(?:\.[a-zA-Z0-9-_]*[a-zA-Z0-9])+(?![-_])/,url:/^((?:ftp|https?):\/\/|www\.)(?:[a-zA-Z0-9\-]+\.?)+[^\s<]*|^email/,_backpedal:/(?:[^?!.,:;*_~()&]+|\([^)]*\)|&(?![a-zA-Z0-9]+;$)|[?!.,:;*_~)]+(?!$))+/,del:/^(~~?)(?=[^\s~])([\s\S]*?[^\s~])\1(?=[^~]|$)/,text:/^([`~]+|[^`~])(?:(?= {2,}\n)|(?=[a-zA-Z0-9.!#$%&'*+\/=?_`{\|}~-]+@)|[\s\S]*?(?:(?=[\\1&&void 0!==arguments[1]?arguments[1]:[];for(e=this.options.pedantic?e.replace(/\t/g," ").replace(/^ +$/gm,""):e.replace(/^( *)(\t+)/gm,(function(e,t,n){return t+" ".repeat(n.length)}));e;)if(!(this.options.extensions&&this.options.extensions.block&&this.options.extensions.block.some((function(n){return!!(t=n.call({lexer:o},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])||"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])||"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&&function(){var t=1/0,n=e.slice(1),i=void 0;o.options.extensions.startBlock.forEach((function(e){"number"===typeof(i=e.call({lexer:this},n))&&i>=0&&(t=Math.min(t,i))})),t<1/0&&t>=0&&(r=e.substring(0,t+1))}(),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])&&"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){var u="Infinite loop on byte: "+e.charCodeAt(0);if(this.options.silent){console.error(u);break}throw new Error(u)}return this.state.top=!0,a}},{key:"inline",value:function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:[];return this.inlineQueue.push({src:e,tokens:t}),t}},{key:"inlineTokens",value:function(e){var t,n,r,i,o,a,u=this,l=arguments.length>1&&void 0!==arguments[1]?arguments[1]:[],c=e;if(this.tokens.links){var s=Object.keys(this.tokens.links);if(s.length>0)for(;null!=(i=this.tokenizer.rules.inline.reflinkSearch.exec(c));)s.includes(i[0].slice(i[0].lastIndexOf("[")+1,-1))&&(c=c.slice(0,i.index)+"["+Df("a",i[0].length-2)+"]"+c.slice(this.tokenizer.rules.inline.reflinkSearch.lastIndex))}for(;null!=(i=this.tokenizer.rules.inline.blockSkip.exec(c));)c=c.slice(0,i.index)+"["+Df("a",i[0].length-2)+"]"+c.slice(this.tokenizer.rules.inline.blockSkip.lastIndex);for(;null!=(i=this.tokenizer.rules.inline.escapedEmSt.exec(c));)c=c.slice(0,i.index+i[0].length-2)+"++"+c.slice(this.tokenizer.rules.inline.escapedEmSt.lastIndex),this.tokenizer.rules.inline.escapedEmSt.lastIndex--;for(;e;)if(o||(a=""),o=!1,!(this.options.extensions&&this.options.extensions.inline&&this.options.extensions.inline.some((function(n){return!!(t=n.call({lexer:u},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])&&"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])&&"text"===t.type&&"text"===n.type?(n.raw+=t.raw,n.text+=t.text):l.push(t);else if(t=this.tokenizer.emStrong(e,c,a))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,Sf))e=e.substring(t.raw.length),l.push(t);else if(this.state.inLink||!(t=this.tokenizer.url(e,Sf))){if(r=e,this.options.extensions&&this.options.extensions.startInline&&function(){var t=1/0,n=e.slice(1),i=void 0;u.options.extensions.startInline.forEach((function(e){"number"===typeof(i=e.call({lexer:this},n))&&i>=0&&(t=Math.min(t,i))})),t<1/0&&t>=0&&(r=e.substring(0,t+1))}(),t=this.tokenizer.inlineText(r,Ef))e=e.substring(t.raw.length),"_"!==t.raw.slice(-1)&&(a=t.raw.slice(-1)),o=!0,(n=l[l.length-1])&&"text"===n.type?(n.raw+=t.raw,n.text+=t.text):l.push(t);else if(e){var f="Infinite loop on byte: "+e.charCodeAt(0);if(this.options.silent){console.error(f);break}throw new Error(f)}}else e=e.substring(t.raw.length),l.push(t);return l}}],[{key:"rules",get:function(){return{block:kf,inline:Cf}}},{key:"lex",value:function(t,n){return new e(n).lex(t)}},{key:"lexInline",value:function(t,n){return new e(n).inlineTokens(t)}}]),e}(),Ff=function(){function e(t){Dt(this,e),this.options=t||Js}return xt(e,[{key:"code",value:function(e,t,n){var r=(t||"").match(/\S*/)[0];if(this.options.highlight){var i=this.options.highlight(e,r);null!=i&&i!==e&&(n=!0,e=i)}return e=e.replace(/\n$/,"")+"\n",r?'
    '+(n?e:rf(e,!0))+"
    \n":"
    "+(n?e:rf(e,!0))+"
    \n"}},{key:"blockquote",value:function(e){return"
    \n".concat(e,"
    \n")}},{key:"html",value:function(e){return e}},{key:"heading",value:function(e,t,n,r){if(this.options.headerIds){var i=this.options.headerPrefix+r.slug(n);return"').concat(e,"\n")}return"").concat(e,"\n")}},{key:"hr",value:function(){return this.options.xhtml?"
    \n":"
    \n"}},{key:"list",value:function(e,t,n){var r=t?"ol":"ul";return"<"+r+(t&&1!==n?' start="'+n+'"':"")+">\n"+e+"\n"}},{key:"listitem",value:function(e){return"
  • ".concat(e,"
  • \n")}},{key:"checkbox",value:function(e){return" "}},{key:"paragraph",value:function(e){return"

    ".concat(e,"

    \n")}},{key:"table",value:function(e,t){return t&&(t="".concat(t,"")),"\n\n"+e+"\n"+t+"
    \n"}},{key:"tablerow",value:function(e){return"\n".concat(e,"\n")}},{key:"tablecell",value:function(e,t){var n=t.header?"th":"td";return(t.align?"<".concat(n,' align="').concat(t.align,'">'):"<".concat(n,">"))+e+"\n")}},{key:"strong",value:function(e){return"".concat(e,"")}},{key:"em",value:function(e){return"".concat(e,"")}},{key:"codespan",value:function(e){return"".concat(e,"")}},{key:"br",value:function(){return this.options.xhtml?"
    ":"
    "}},{key:"del",value:function(e){return"".concat(e,"")}},{key:"link",value:function(e,t,n){if(null===(e=ff(this.options.sanitize,this.options.baseUrl,e)))return n;var r='
    "}},{key:"image",value:function(e,t,n){if(null===(e=ff(this.options.sanitize,this.options.baseUrl,e)))return n;var r='').concat(n,'":">"}},{key:"text",value:function(e){return e}}]),e}(),Nf=function(){function e(){Dt(this,e)}return xt(e,[{key:"strong",value:function(e){return e}},{key:"em",value:function(e){return e}},{key:"codespan",value:function(e){return e}},{key:"del",value:function(e){return e}},{key:"html",value:function(e){return e}},{key:"text",value:function(e){return e}},{key:"link",value:function(e,t,n){return""+n}},{key:"image",value:function(e,t,n){return""+n}},{key:"br",value:function(){return""}}]),e}(),Of=function(){function e(){Dt(this,e),this.seen={}}return xt(e,[{key:"serialize",value:function(e){return e.toLowerCase().trim().replace(/<[!\/a-z].*?>/gi,"").replace(/[\u2000-\u206F\u2E00-\u2E7F\\'!"#$%&()*+,./:;<=>?@[\]^`{|}~]/g,"").replace(/\s/g,"-")}},{key:"getNextSafeSlug",value:function(e,t){var n=e,r=0;if(this.seen.hasOwnProperty(n)){r=this.seen[e];do{n=e+"-"+ ++r}while(this.seen.hasOwnProperty(n))}return t||(this.seen[e]=r,this.seen[n]=0),n}},{key:"slug",value:function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},n=this.serialize(e);return this.getNextSafeSlug(n,t.dryrun)}}]),e}(),Tf=function(){function e(t){Dt(this,e),this.options=t||Js,this.options.renderer=this.options.renderer||new Ff,this.renderer=this.options.renderer,this.renderer.options=this.options,this.textRenderer=new Nf,this.slugger=new Of}return xt(e,[{key:"parse",value:function(e){var t,n,r,i,o,a,u,l,c,s,f,d,h,p,v,m,y,g,_,b=!(arguments.length>1&&void 0!==arguments[1])||arguments[1],D="",w=e.length;for(t=0;t0&&"paragraph"===v.tokens[0].type?(v.tokens[0].text=g+" "+v.tokens[0].text,v.tokens[0].tokens&&v.tokens[0].tokens.length>0&&"text"===v.tokens[0].tokens[0].type&&(v.tokens[0].tokens[0].text=g+" "+v.tokens[0].tokens[0].text)):v.tokens.unshift({type:"text",text:g}):p+=g),p+=this.parse(v.tokens,h),c+=this.renderer.listitem(p,y,m);D+=this.renderer.list(c,f,d);continue;case"html":D+=this.renderer.html(s.text);continue;case"paragraph":D+=this.renderer.paragraph(this.parseInline(s.tokens));continue;case"text":for(c=s.tokens?this.parseInline(s.tokens):s.text;t+1An error occurred:

    "+rf(e.message+"",!0)+"
    ";throw e}try{var l=Af.lex(e,t);if(t.walkTokens){if(t.async)return Promise.all(Bf.walkTokens(l,t.walkTokens)).then((function(){return Tf.parse(l,t)})).catch(u);Bf.walkTokens(l,t.walkTokens)}return Tf.parse(l,t)}catch(c){u(c)}}Bf.options=Bf.setOptions=function(e){var t;return yf(Bf.defaults,e),t=Bf.defaults,Js=t,Bf},Bf.getDefaults=Gs,Bf.defaults=Js,Bf.use=function(){for(var e=arguments.length,t=new Array(e),n=0;nAn error occurred:

    "+rf(c.message+"",!0)+"
    ";throw c}},Bf.Parser=Tf,Bf.parser=Tf.parse,Bf.Renderer=Ff,Bf.TextRenderer=Nf,Bf.Lexer=Af,Bf.lexer=Af.lex,Bf.Tokenizer=xf,Bf.Slugger=Of,Bf.parse=Bf;Bf.options,Bf.setOptions,Bf.use,Bf.walkTokens,Bf.parseInline,Tf.parse,Af.lex;var Mf=function(e){var t=e.title,n=e.description,r=e.unit,i=e.expr,o=e.showLegend,a=e.filename,u=e.alias,l=Wr().period,c=Qr(),s=re(null),f=_t(X(!0),2),d=f[0],h=f[1],p=_t(X(l.step||1),2),v=p[0],y=p[1],g=_t(X({limits:{enable:!1,range:{1:[0,0]}}}),2),_=g[0],b=g[1],D=oe((function(){return Array.isArray(i)&&i.every((function(e){return e}))}),[i]),w=As({predefinedQuery:D?i:[],display:"chart",visible:d,customStep:v}),x=w.isLoading,k=w.graphData,C=w.error,E=w.warning,S=function(e){var t=Kn({},_);t.limits.range=e,b(t)};if(te((function(){var e=new IntersectionObserver((function(e){e.forEach((function(e){return h(e.isIntersecting)}))}),{threshold:.1});return s.current&&e.observe(s.current),function(){s.current&&e.unobserve(s.current)}}),[]),!D)return fr(lo,{variant:"error",children:[fr("code",{children:'"expr"'})," not found. Check the configuration file ",fr("b",{children:a}),"."]});var A=function(){return fr("div",{className:"vm-predefined-panel-header__description vm-default-styles",children:[n&&fr(m,{children:[fr("div",{children:[fr("span",{children:"Description:"}),fr("div",{dangerouslySetInnerHTML:{__html:Bf.parse(n)}})]}),fr("hr",{})]}),fr("div",{children:[fr("span",{children:"Queries:"}),fr("div",{children:i.map((function(e,t){return fr("div",{children:e},"".concat(t,"_").concat(e))}))})]})]})};return fr("div",{className:"vm-predefined-panel",ref:s,children:[fr("div",{className:"vm-predefined-panel-header",children:[fr(mo,{title:fr(A,{}),children:fr("div",{className:"vm-predefined-panel-header__info",children:fr(li,{})})}),fr("h3",{className:"vm-predefined-panel-header__title",children:t||""}),fr("div",{className:"vm-predefined-panel-header__step",children:fr(gs,{defaultStep:l.step,setStep:y})}),fr(Ts,{yaxis:_,setYaxisLimits:S,toggleEnableLimits:function(){var e=Kn({},_);e.limits.enable=!e.limits.enable,b(e)}})]}),fr("div",{className:"vm-predefined-panel-body",children:[x&&fr(Bs,{}),C&&fr(lo,{variant:"error",children:C}),E&&fr(lo,{variant:"warning",children:E}),k&&fr(ps,{data:k,period:l,customStep:v,query:i,yaxis:_,unit:r,alias:u,showLegend:o,setYaxisLimits:S,setPeriod:function(e){var t=e.from,n=e.to;c({type:"SET_PERIOD",payload:{from:t,to:n}})},fullWidth:!1})]})]})},Lf=function(e){var t=e.defaultExpanded,n=void 0!==t&&t,r=e.onChange,i=e.title,o=e.children,a=_t(X(n),2),u=a[0],l=a[1];return te((function(){r&&r(u)}),[u]),fr(m,{children:[fr("header",{className:"vm-accordion-header ".concat(u&&"vm-accordion-header_open"),onClick:function(){l((function(e){return!e}))},children:[i,fr("div",{className:"vm-accordion-header__arrow ".concat(u&&"vm-accordion-header__arrow_open"),children:fr(hi,{})})]}),u&&fr("section",{className:"vm-accordion-section",children:o},"content")]})},Pf=function(e){var t=e.index,n=e.title,r=e.panels,i=e.filename,o=bo(document.body),a=oe((function(){return o.width/12}),[o]),u=_t(X(!t),2),l=u[0],c=u[1],s=_t(X([]),2),f=s[0],d=s[1];te((function(){d(r&&r.map((function(e){return e.width||12})))}),[r]);var h=_t(X({start:0,target:0,enable:!1}),2),p=h[0],v=h[1],m=function(e){if(p.enable){var t=p.start,n=Math.ceil((t-e.clientX)/a);if(!(Math.abs(n)>=12)){var r=f.map((function(e,t){return e-(t===p.target?n:0)}));d(r)}}},y=function(){v(Kn(Kn({},p),{},{enable:!1}))},g=function(e){return function(t){!function(e,t){v({start:e.clientX,target:t,enable:!0})}(t,e)}};return te((function(){return window.addEventListener("mousemove",m),window.addEventListener("mouseup",y),function(){window.removeEventListener("mousemove",m),window.removeEventListener("mouseup",y)}}),[p]),fr("div",{className:"vm-predefined-dashboard",children:fr(Lf,{defaultExpanded:l,onChange:function(e){return c(e)},title:fr((function(){return fr("div",{className:Bi()({"vm-predefined-dashboard-header":!0,"vm-predefined-dashboard-header_open":l}),children:[(n||i)&&fr("span",{className:"vm-predefined-dashboard-header__title",children:n||"".concat(t+1,". ").concat(i)}),r&&fr("span",{className:"vm-predefined-dashboard-header__count",children:["(",r.length," panels)"]})]})}),{}),children:fr("div",{className:"vm-predefined-dashboard-panels",children:Array.isArray(r)&&r.length?r.map((function(e,t){return fr("div",{className:"vm-predefined-dashboard-panels-panel vm-block vm-block_empty-padding",style:{gridColumn:"span ".concat(f[t])},children:[fr(Mf,{title:e.title,description:e.description,unit:e.unit,expr:e.expr,alias:e.alias,filename:i,showLegend:e.showLegend}),fr("button",{className:"vm-predefined-dashboard-panels-panel__resizer",onMouseDown:g(t)})]},t)})):fr("div",{className:"vm-predefined-dashboard-panels-panel__alert",children:fr(lo,{variant:"error",children:[fr("code",{children:'"panels"'})," not found. Check the configuration file ",fr("b",{children:i}),"."]})})})})})},If=function(){!function(){var e=Wr(),t=e.duration,n=e.relativeTime,r=e.period,i=r.date,o=r.step,a=function(){var e,r=Hs((qn(e={},"g0.range_input",t),qn(e,"g0.end_input",i),qn(e,"g0.step_input",o),qn(e,"g0.relative_time",n),e));ar(r)};te(a,[t,n,i,o]),te(a,[])}();var e=_t(X([]),2),t=e[0],n=e[1],r=_t(X("0"),2),i=r[0],o=r[1],a=oe((function(){return t.map((function(e,t){return{label:e.title||"",value:"".concat(t),className:"vm-predefined-panels-tabs__tab"}}))}),[t]),u=oe((function(){return t[+i]||{}}),[t,i]),l=oe((function(){return null===u||void 0===u?void 0:u.rows}),[u]),c=oe((function(){return u.title||u.filename||""}),[u]),s=oe((function(){return Array.isArray(l)&&!!l.length}),[l]);return te((function(){Qs().then((function(e){return e.length&&n(e)}))}),[]),fr("div",{className:"vm-predefined-panels",children:[!t.length&&fr(lo,{variant:"info",children:"Dashboards not found"}),a.length>1&&fr("div",{className:"vm-predefined-panels-tabs vm-block vm-block_empty-padding",children:fr(Pi,{activeItem:i,items:a,onChange:function(e){o(e)}})}),fr("div",{className:"vm-predefined-panels__dashboards",children:[s&&l.map((function(e,t){return fr(Pf,{index:t,filename:c,title:e.title,panels:e.panels},"".concat(i,"_").concat(t))})),!!t.length&&!s&&fr(lo,{variant:"error",children:[fr("code",{children:'"rows"'})," not found. Check the configuration file ",fr("b",{children:c}),"."]})]})]})},$f=function(e,t){var n=t.match?"&match[]="+encodeURIComponent(t.match):"",r=t.focusLabel?"&focusLabel="+encodeURIComponent(t.focusLabel):"";return"".concat(e,"/api/v1/status/tsdb?topN=").concat(t.topN,"&date=").concat(t.date).concat(n).concat(r)},Rf=function(){function e(){Dt(this,e),this.tsdbStatus=void 0,this.tabsNames=void 0,this.tsdbStatus=this.defaultTSDBStatus,this.tabsNames=["table","graph"]}return xt(e,[{key:"tsdbStatusData",get:function(){return this.tsdbStatus},set:function(e){this.tsdbStatus=e}},{key:"defaultTSDBStatus",get:function(){return{totalSeries:0,totalLabelValuePairs:0,seriesCountByMetricName:[],seriesCountByLabelName:[],seriesCountByFocusLabelValue:[],seriesCountByLabelValuePair:[],labelValueCountByLabelName:[]}}},{key:"keys",value:function(e){var t=[];return e&&(t=t.concat("seriesCountByFocusLabelValue")),t=t.concat("seriesCountByMetricName","seriesCountByLabelName","seriesCountByLabelValuePair","labelValueCountByLabelName"),t}},{key:"defaultState",get:function(){var e=this;return this.keys("job").reduce((function(t,n){return Kn(Kn({},t),{},{tabs:Kn(Kn({},t.tabs),{},qn({},n,e.tabsNames)),containerRefs:Kn(Kn({},t.containerRefs),{},qn({},n,re(null))),defaultActiveTab:Kn(Kn({},t.defaultActiveTab),{},qn({},n,0))})}),{tabs:{},containerRefs:{},defaultActiveTab:{}})}},{key:"sectionsTitles",value:function(e){return{seriesCountByMetricName:"Metric names with the highest number of series",seriesCountByLabelName:"Labels with the highest number of series",seriesCountByFocusLabelValue:'Values for "'.concat(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"}}},{key:"tablesHeaders",get:function(){return{seriesCountByMetricName:jf,seriesCountByLabelName:zf,seriesCountByFocusLabelValue:Uf,seriesCountByLabelValuePair:Hf,labelValueCountByLabelName:Vf}}},{key:"totalSeries",value:function(e){return"labelValueCountByLabelName"===e?-1:this.tsdbStatus.totalSeries}}]),e}(),jf=[{id:"name",label:"Metric name"},{id:"value",label:"Number of series"},{id:"percentage",label:"Percent of series"},{id:"action",label:"Action"}],zf=[{id:"name",label:"Label name"},{id:"value",label:"Number of series"},{id:"percentage",label:"Percent of series"},{id:"action",label:"Action"}],Uf=[{id:"name",label:"Label value"},{id:"value",label:"Number of series"},{id:"percentage",label:"Percent of series"},{disablePadding:!1,id:"action",label:"Action",numeric:!1}],Hf=[{id:"name",label:"Label=value pair"},{id:"value",label:"Number of series"},{id:"percentage",label:"Percent of series"},{id:"action",label:"Action"}],Vf=[{id:"name",label:"Label name"},{id:"value",label:"Number of unique values"},{id:"action",label:"Action"}],Yf={seriesCountByMetricName:function(e,t){return qf("__name__",t)},seriesCountByLabelName:function(e,t){return"{".concat(t,'!=""}')},seriesCountByFocusLabelValue:function(e,t){return qf(e,t)},seriesCountByLabelValuePair:function(e,t){var n=t.split("="),r=n[0],i=n.slice(1).join("=");return qf(r,i)},labelValueCountByLabelName:function(e,t){return"{".concat(t,'!=""}')}},qf=function(e,t){return e?"{"+e+"="+JSON.stringify(t)+"}":""},Wf=function(e){var t=e.topN,n=e.error,r=e.query,i=e.onSetHistory,o=e.onRunQuery,a=e.onSetQuery,u=e.onTopNChange,l=e.onFocusLabelChange,c=e.totalSeries,s=e.totalLabelValuePairs,f=e.date,d=e.match,h=e.focusLabel,p=ni().autocomplete,v=ri(),m=Ms().queryOptions,y=oe((function(){return t<1?"Number must be bigger than zero":""}),[t]);return fr("div",{className:"vm-cardinality-configurator vm-block",children:[fr("div",{className:"vm-cardinality-configurator-controls",children:[fr("div",{className:"vm-cardinality-configurator-controls__query",children:fr(vs,{value:r||d||"",autocomplete:p,options:m,error:n,onArrowUp:function(){i(-1)},onArrowDown:function(){i(1)},onEnter:o,onChange:a,label:"Time series selector"})}),fr("div",{className:"vm-cardinality-configurator-controls__item",children:fr(To,{label:"Number of entries per table",type:"number",value:t,error:y,onChange:u})}),fr("div",{className:"vm-cardinality-configurator-controls__item",children:fr(To,{label:"Focus label",type:"text",value:h||"",onChange:l})}),fr("div",{className:"vm-cardinality-configurator-controls__item",children:fr(bs,{label:"Autocomplete",value:p,onChange:function(){v({type:"TOGGLE_AUTOCOMPLETE"})}})})]}),fr("div",{className:"vm-cardinality-configurator-bottom",children:[fr("div",{className:"vm-cardinality-configurator-bottom__info",children:["Analyzed ",fr("b",{children:c})," series with ",fr("b",{children:s}),' "label=value" pairs at ',fr("b",{children:f}),d&&fr("span",{children:[" for series selector ",fr("b",{children:d})]}),". Show top ",t," entries per table."]}),fr(ho,{startIcon:fr(bi,{}),onClick:o,children:"Execute Query"})]})]})};function Qf(e){var t=e.order,n=e.orderBy,r=e.onRequestSort,i=e.headerCells;return fr("thead",{className:"vm-table-header",children:fr("tr",{className:"vm-table__row vm-table__row_header",children:i.map((function(e){return fr("th",{className:Bi()({"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:(i=e.id,function(e){r(e,i)}),children:fr("div",{className:"vm-table-cell__content",children:[e.label,"action"!==e.id&&"percentage"!==e.id&&fr("div",{className:Bi()({"vm-table__sort-icon":!0,"vm-table__sort-icon_active":n===e.id,"vm-table__sort-icon_desc":"desc"===t&&n===e.id}),children:fr(vi,{})})]})},e.id);var i}))})})}function Gf(e,t,n){return t[n]e[n]?1:0}function Jf(e,t){return"desc"===e?function(e,n){return Gf(e,n,t)}:function(e,n){return-Gf(e,n,t)}}function Zf(e,t){var n=e.map((function(e,t){return[e,t]}));return n.sort((function(e,n){var r=t(e[0],n[0]);return 0!==r?r:e[1]-n[1]})),n.map((function(e){return e[0]}))}var Kf=function(e){var t=e.rows,n=e.headerCells,r=e.defaultSortColumn,i=e.tableCells,o=_t(X("desc"),2),a=o[0],u=o[1],l=_t(X(r),2),c=l[0],s=l[1],f=_t(X([]),2),d=f[0],h=f[1],p=function(e){return function(){var t=d.indexOf(e),n=[];-1===t?n=n.concat(d,e):0===t?n=n.concat(d.slice(1)):t===d.length-1?n=n.concat(d.slice(0,-1)):t>0&&(n=n.concat(d.slice(0,t),d.slice(t+1))),h(n)}},v=Zf(t,Jf(a,c));return fr("table",{className:"vm-table",children:[fr(Qf,{numSelected:d.length,order:a,orderBy:c,onSelectAllClick:function(e){if(e.target.checked){var n=t.map((function(e){return e.name}));h(n)}else h([])},onRequestSort:function(e,t){u(c===t&&"asc"===a?"desc":"asc"),s(t)},rowCount:t.length,headerCells:n}),fr("tbody",{className:"vm-table-header",children:v.map((function(e){return fr("tr",{className:Bi()({"vm-table__row":!0,"vm-table__row_selected":(t=e.name,-1!==d.indexOf(t))}),onClick:p(e.name),children:i(e)},e.name);var t}))})]})},Xf=function(e){var t=e.row,n=e.totalSeries,r=e.onActionClick,i=n>0?t.value/n*100:-1;return fr(m,{children:[fr("td",{className:"vm-table-cell",children:t.name},t.name),fr("td",{className:"vm-table-cell",children:t.value},t.value),i>0&&fr("td",{className:"vm-table-cell",children:fr(Ls,{value:i})},t.progressValue),fr("td",{className:"vm-table-cell vm-table-cell_right",children:fr("div",{className:"vm-table-cell__content",children:fr(mo,{title:"Filter by ".concat(t.name),children:fr(ho,{variant:"text",size:"small",onClick:r,children:fr(Di,{})})})})},"action")]})},ed=function(e){var t=e.data,n=e.container,r=e.configs,i=re(null),o=_t(X(),2),a=o[0],u=o[1],l=bo(n),c=Kn(Kn({},r),{},{width:l.width||400});return te((function(){if(i.current){var e=new zc(c,t,i.current);return u(e),e.destroy}}),[i.current,l]),te((function(){a&&a.setData(t)}),[t]),fr("div",{style:{height:"100%"},children:fr("div",{ref:i})})},td=function(e,t){return Math.round(e*(t=Math.pow(10,t)))/t},nd=1,rd=function(e,t,n,r){return td(t+e*(n+r),6)},id=function(e,t,n,r,i){var o=1-t,a=n===nd?o/(e-1):2===n?o/e:3===n?o/(e+1):0;(isNaN(a)||a===1/0)&&(a=0);var u=n===nd?0:2===n?a/2:3===n?a:0,l=t/e,c=td(l,6);if(null==r)for(var s=0;s=n&&e<=i&&t>=r&&t<=o};function ad(e,t,n,r,i){var o=this;o.x=e,o.y=t,o.w=n,o.h=r,o.l=i||0,o.o=[],o.q=null}var ud={split:function(){var e=this,t=e.x,n=e.y,r=e.w/2,i=e.h/2,o=e.l+1;e.q=[new ad(t+r,n,r,i,o),new ad(t,n,r,i,o),new ad(t,n+i,r,i,o),new ad(t+r,n+i,r,i,o)]},quads:function(e,t,n,r,i){var o=this,a=o.q,u=o.x+o.w/2,l=o.y+o.h/2,c=tu,d=t+r>l;c&&f&&i(a[0]),s&&c&&i(a[1]),s&&d&&i(a[2]),f&&d&&i(a[3])},add:function(e){var t=this;if(null!=t.q)t.quads(e.x,e.y,e.w,e.h,(function(t){t.add(e)}));else{var n=t.o;if(n.push(e),n.length>10&&t.l<4){t.split();for(var r=function(e){var r=n[e];t.quads(r.x,r.y,r.w,r.h,(function(e){e.add(r)}))},i=0;i=0?"left":"right",e.ctx.textBaseline=1===s?"middle":i[n]>=0?"bottom":"top",e.ctx.fillText(i[n],f,g)}}))})),e.ctx.restore()}function b(e,t,n){return[0,zc.rangeNum(0,n,.05,!0)[1]]}return{hooks:{drawClear:function(t){var n;if((y=y||new ad(0,0,t.bbox.width,t.bbox.height)).clear(),t.series.forEach((function(e){e._paths=null})),l=d?[null].concat(m(t.data.length-1-o.length,t.data[0].length)):2===t.series.length?[null].concat(m(t.data[0].length,1)):[null].concat(function(e,t){var n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:h,r=Array.from({length:t},(function(){return{offs:Array(e).fill(0),size:Array(e).fill(0)}}));return id(e,n,p,null,(function(e,n,i){id(t,1,v,null,(function(t,o,a){r[t].offs[e]=n+i*o,r[t].size[e]=i*a}))})),r}(t.data[0].length,t.data.length-1-o.length,1===t.data[0].length?1:h)),null!=(null===(n=e.disp)||void 0===n?void 0:n.fill)){c=[null];for(var r=1;r0&&!o.includes(t)&&zc.assign(e,{paths:g,points:{show:_}})}))}}}((ld=[1],cd=0,sd=1,fd=0,dd=function(e,t){return{stroke:e,fill:t}}({unit:3,values:function(e){return e.data[1].map((function(e,t){return 0!==t?"#33BB55":"#F79420"}))}},{unit:3,values:function(e){return e.data[1].map((function(e,t){return 0!==t?"#33BB55":"#F79420"}))}}),{which:ld,ori:cd,dir:sd,radius:fd,disp:dd}))]},pd=function(e){var t=e.rows,n=e.activeTab,r=e.onChange,i=e.tabs,o=e.chartContainer,a=e.totalSeries,u=e.tabId,l=e.onActionClick,c=e.sectionTitle,s=e.tableHeaderCells,f=oe((function(){return i.map((function(e,t){return{value:String(t),label:e,icon:fr(0===t?xi:wi,{})}}))}),[i]);return fr("div",{className:"vm-metrics-content vm-block",children:[fr("div",{className:"vm-metrics-content-header vm-section-header",children:[fr("h5",{className:"vm-section-header__title",children:c}),fr("div",{className:"vm-section-header__tabs",children:fr(Pi,{activeItem:String(n),items:f,onChange:function(e){r(e,u)}})})]}),fr("div",{ref:o,children:[0===n&&fr(Kf,{rows:t,headerCells:s,defaultSortColumn:"value",tableCells:function(e){return fr(Xf,{row:e,totalSeries:a,onActionClick:l})}}),1===n&&fr(ed,{data:[t.map((function(e){return e.name})),t.map((function(e){return e.value})),t.map((function(e,t){return t%12==0?1:t%10==0?2:0}))],container:(null===o||void 0===o?void 0:o.current)||null,configs:hd})]})]})},vd=function(){var e=eo(),t=e.topN,n=e.match,r=e.date,i=e.focusLabel,o=to();!function(){var e=eo(),t=e.topN,n=e.match,r=e.date,i=e.focusLabel,o=e.extraLabel,a=function(){var e=Hs({topN:t,date:r,match:n,extraLabel:o,focusLabel:i});ar(e)};te(a,[t,n,r,i,o]),te(a,[])}();var a=_t(X(n||""),2),u=a[0],l=a[1],c=_t(X(0),2),s=c[0],f=c[1],d=_t(X([]),2),h=d[0],p=d[1],v=function(){var e=new Rf,t=eo(),n=t.topN,r=t.extraLabel,i=t.match,o=t.date,a=t.runQuery,u=t.focusLabel,l=hr().serverUrl,c=_t(X(!1),2),s=c[0],f=c[1],d=_t(X(),2),h=d[0],p=d[1],v=_t(X(e.defaultTSDBStatus),2),m=v[0],y=v[1];te((function(){h&&(y(e.defaultTSDBStatus),f(!1))}),[h]);var g=function(){var t=os(rs().mark((function t(n){var r,i,o,a;return rs().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:if(l){t.next=2;break}return t.abrupt("return");case 2:return p(""),f(!0),y(e.defaultTSDBStatus),r=$f(l,n),t.prev=6,t.next=9,fetch(r);case 9:return i=t.sent,t.next=12,i.json();case 12:o=t.sent,i.ok?(a=o.data,y(Kn({},a)),f(!1)):(p(o.error),y(e.defaultTSDBStatus),f(!1)),t.next=20;break;case 16:t.prev=16,t.t0=t.catch(6),f(!1),t.t0 instanceof Error&&p("".concat(t.t0.name,": ").concat(t.t0.message));case 20:case"end":return t.stop()}}),t,null,[[6,16]])})));return function(e){return t.apply(this,arguments)}}();return te((function(){g({topN:n,extraLabel:r,match:i,date:o,focusLabel:u})}),[l,a,o]),e.tsdbStatusData=m,{isLoading:s,appConfigurator:e,error:h}}(),m=v.isLoading,y=v.appConfigurator,g=v.error,_=_t(X(y.defaultState.defaultActiveTab),2),b=_[0],D=_[1],w=y.tsdbStatusData,x=y.defaultState,k=y.tablesHeaders,C=function(e,t){D(Kn(Kn({},b),{},qn({},t,+e)))};return fr("div",{className:"vm-cardinality-panel",children:[m&&fr(Bs,{message:"Please wait while cardinality stats is calculated. \n This may take some time if the db contains big number of time series."}),fr(Wf,{error:"",query:u,topN:t,date:r,match:n,totalSeries:w.totalSeries,totalLabelValuePairs:w.totalLabelValuePairs,focusLabel:i,onRunQuery:function(){p((function(e){return[].concat(bt(e),[u])})),f((function(e){return e+1})),o({type:"SET_MATCH",payload:u}),o({type:"RUN_QUERY"})},onSetQuery:function(e){l(e)},onSetHistory:function(e){var t=s+e;t<0||t>=h.length||(f(t),l(h[t]))},onTopNChange:function(e){o({type:"SET_TOP_N",payload:+e})},onFocusLabelChange:function(e){o({type:"SET_FOCUS_LABEL",payload:e})}}),g&&fr(lo,{variant:"error",children:g}),y.keys(i).map((function(e){return fr(pd,{sectionTitle:y.sectionsTitles(i)[e],activeTab:b[e],rows:w[e],onChange:C,onActionClick:(t=e,function(e){var n=e.currentTarget.id,r=Yf[t](i,n);l(r),p((function(e){return[].concat(bt(e),[r])})),f((function(e){return e+1})),o({type:"SET_MATCH",payload:r});var a="";"labelValueCountByLabelName"!==t&&"seriesCountByLabelName"!=t||(a=n),o({type:"SET_FOCUS_LABEL",payload:a}),o({type:"RUN_QUERY"})}),tabs:x.tabs[e],chartContainer:x.containerRefs[e],totalSeries:y.totalSeries(e),tabId:e,tableHeaderCells:k[e]},e);var t}))]})},md=function(e){var t=e.rows,n=e.columns,r=_t(X(e.defaultOrderBy||"count"),2),i=r[0],o=r[1],a=_t(X("desc"),2),u=a[0],l=a[1],c=oe((function(){return Zf(t,Jf(u,i))}),[t,i,u]),s=function(e){return function(){var t;t=e,l((function(e){return"asc"===e&&i===t?"desc":"asc"})),o(t)}};return fr("table",{className:"vm-table",children:[fr("thead",{className:"vm-table-header",children:fr("tr",{className:"vm-table__row vm-table__row_header",children:n.map((function(e){return fr("th",{className:"vm-table-cell vm-table-cell_header vm-table-cell_sort",onClick:s(e.key),children:fr("div",{className:"vm-table-cell__content",children:[e.title||e.key,fr("div",{className:Bi()({"vm-table__sort-icon":!0,"vm-table__sort-icon_active":i===e.key,"vm-table__sort-icon_desc":"desc"===u&&i===e.key}),children:fr(vi,{})})]})},e.key)}))})}),fr("tbody",{className:"vm-table-body",children:c.map((function(e,t){return fr("tr",{className:"vm-table__row",children:n.map((function(t){return fr("td",{className:"vm-table-cell",children:e[t.key]||"-"},t.key)}))},t)}))})]})},yd=["table","JSON"].map((function(e,t){return{value:String(t),label:e,icon:fr(0===t?xi:ki,{})}})),gd=function(e){var t=e.rows,n=e.title,r=e.columns,i=e.defaultOrderBy,o=_t(X(0),2),a=o[0],u=o[1];return fr("div",{className:"vm-top-queries-panel vm-block",children:[fr("div",{className:"vm-top-queries-panel-header vm-section-header",children:[fr("h5",{className:"vm-section-header__title",children:n}),fr("div",{className:"vm-section-header__tabs",children:fr(Pi,{activeItem:String(a),items:yd,onChange:function(e){u(+e)}})})]}),fr("div",{children:[0===a&&fr(md,{rows:t,columns:r,defaultOrderBy:i}),1===a&&fr(Fs,{data:t})]})]})},_d=function(){var e=function(){var e=hr().serverUrl,t=ao(),n=t.topN,r=t.maxLifetime,i=t.runQuery,o=_t(X(null),2),a=o[0],u=o[1],l=_t(X(!1),2),c=l[0],s=l[1],f=_t(X(),2),d=f[0],h=f[1],p=oe((function(){return function(e,t,n){return"".concat(e,"/api/v1/status/top_queries?topN=").concat(t||"","&maxLifetime=").concat(n||"")}(e,n,r)}),[e,n,r]),v=function(){var e=os(rs().mark((function e(){var t,n;return rs().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return s(!0),e.prev=1,e.next=4,fetch(p);case 4:return t=e.sent,e.next=7,t.json();case 7:n=e.sent,t.ok&&["topByAvgDuration","topByCount","topBySumDuration"].forEach((function(e){var t=n[e];Array.isArray(t)&&t.forEach((function(e){return e.timeRangeHours=+(e.timeRangeSeconds/3600).toFixed(2)}))})),u(t.ok?n:null),h(String(n.error||"")),e.next=16;break;case 13:e.prev=13,e.t0=e.catch(1),e.t0 instanceof Error&&"AbortError"!==e.t0.name&&h("".concat(e.t0.name,": ").concat(e.t0.message));case 16:s(!1);case 17:case"end":return e.stop()}}),e,null,[[1,13]])})));return function(){return e.apply(this,arguments)}}();return te((function(){v()}),[i]),{data:a,error:d,loading:c}}(),t=e.data,n=e.error,r=e.loading,i=ao(),o=i.topN,a=i.maxLifetime,u=ue(oo).dispatch;!function(){var e=ao(),t=e.topN,n=e.maxLifetime,r=function(){var e=Hs({topN:String(t),maxLifetime:n});ar(e)};te(r,[t,n]),te(r,[])}();var l=oe((function(){var e=a.trim().split(" ").reduce((function(e,t){var n=Or(t);return n?Kn(Kn({},e),n):Kn({},e)}),{});return!!yr().duration(e).asMilliseconds()}),[a]),c=oe((function(){return!!o&&o<1}),[o]),s=oe((function(){return c?"Number must be bigger than zero":""}),[c]),f=oe((function(){return l?"":"Invalid duration value"}),[l]),d=function(e){if(!t)return e;var n=t[e];return"number"===typeof n?Yc(n):n||e},h=function(){u({type:"SET_RUN_QUERY"})},p=function(e){"Enter"===e.key&&h()};return te((function(){t&&(o||u({type:"SET_TOP_N",payload:+t.topN}),a||u({type:"SET_MAX_LIFE_TIME",payload:t.maxLifetime}))}),[t]),fr("div",{className:"vm-top-queries",children:[r&&fr(Bs,{containerStyles:{height:"500px"}}),fr("div",{className:"vm-top-queries-controls vm-block",children:[fr("div",{className:"vm-top-queries-controls__fields",children:[fr(To,{label:"Max lifetime",value:a,error:f,helperText:"For example ".concat("30ms, 15s, 3d4h, 1y2w"),onChange:function(e){u({type:"SET_MAX_LIFE_TIME",payload:e})},onKeyDown:p}),fr(To,{label:"Number of returned queries",type:"number",value:o||"",error:s,onChange:function(e){u({type:"SET_TOP_N",payload:+e})},onKeyDown:p})]}),fr("div",{className:"vm-top-queries-controls-bottom",children:[fr("div",{className:"vm-top-queries-controls-bottom__info",children:["VictoriaMetrics tracks the last\xa0",fr(mo,{title:"search.queryStats.lastQueriesCount",children:fr("b",{children:d("search.queryStats.lastQueriesCount")})}),"\xa0queries with durations at least\xa0",fr(mo,{title:"search.queryStats.minQueryDuration",children:fr("b",{children:d("search.queryStats.minQueryDuration")})})]}),fr("div",{className:"vm-top-queries-controls-bottom__button",children:fr(ho,{startIcon:fr(bi,{}),onClick:h,children:"Execute"})})]})]}),n&&fr(lo,{variant:"error",children:n}),t&&fr(m,{children:fr("div",{className:"vm-top-queries-panels",children:[fr(gd,{rows:t.topByCount,title:"Most frequently executed queries",columns:[{key:"query"},{key:"timeRangeHours",title:"time range, hours"},{key:"count"}]}),fr(gd,{rows:t.topByAvgDuration,title:"Most heavy queries",columns:[{key:"query"},{key:"avgDurationSeconds",title:"avg duration, seconds"},{key:"timeRangeHours",title:"time range, hours"},{key:"count"}],defaultOrderBy:"avgDurationSeconds"}),fr(gd,{rows:t.topBySumDuration,title:"Queries with most summary time to execute",columns:[{key:"query"},{key:"sumDurationSeconds",title:"sum duration, seconds"},{key:"timeRangeHours",title:"time range, hours"},{key:"count"}],defaultOrderBy:"sumDurationSeconds"})]})})]})},bd=["primary","secondary","error","warning","info","success"],Dd=function(e){var t=e.setLoadingTheme,n=Xn().palette,r=void 0===n?{}:n,i=function(){bd.forEach((function(e){var t=function(e){var 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"}(Mi("color-".concat(e)));Li("".concat(e,"-text"),t)}))};return te((function(){bd.forEach((function(e){var t=r[e];t&&Li("color-".concat(e),t)})),function(){var e=window,t=e.innerWidth,n=e.innerHeight,r=document.documentElement,i=r.clientWidth,o=r.clientHeight;Li("scrollbar-width","".concat(t-i,"px")),Li("scrollbar-height","".concat(n-o,"px"))}(),i(),t(!1)}),[]),null},wd=function(){var e=_t(X(!1),2),t=e[0],n=e[1],r=_t(X([]),2),i=r[0],o=r[1],a=_t(X([]),2),u=a[0],l=a[1],s=oe((function(){return!!i.length}),[i]),f=function(){n(!0)},d=function(){n(!1)},h=function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"";l((function(n){return[{filename:t,text:": ".concat(e.message)}].concat(bt(n))}))},p=function(e,t){try{var n=JSON.parse(e),r=n.trace||n;if(!r.duration_msec)return void h(new Error(Co.traceNotFound),t);var i=new Ss(r,t);o((function(e){return[i].concat(bt(e))}))}catch(c){c instanceof Error&&h(c,t)}},v=function(e){l([]),Array.from(e.target.files||[]).map((function(e){var t=new FileReader,n=(null===e||void 0===e?void 0:e.name)||"";t.onload=function(e){var t,r=String(null===(t=e.target)||void 0===t?void 0:t.result);p(r,n)},t.readAsText(e)})),e.target.value=""},m=function(e){return function(){!function(e){l((function(t){return t.filter((function(t,n){return n!==e}))}))}(e)}},y=function(){return fr("div",{className:"vm-trace-page-controls",children:[fr(ho,{variant:"outlined",onClick:f,children:"Paste JSON"}),fr(mo,{title:"The file must contain tracing information in JSON format",children:fr(ho,{children:["Upload Files",fr("input",{id:"json",type:"file",accept:"application/json",multiple:!0,title:" ",onChange:v})]})})]})};return fr("div",{className:"vm-trace-page",children:[fr("div",{className:"vm-trace-page-header",children:[fr("div",{className:"vm-trace-page-header-errors",children:u.map((function(e,t){return fr("div",{className:"vm-trace-page-header-errors-item",children:[fr(lo,{variant:"error",children:[fr("b",{className:"vm-trace-page-header-errors-item__filename",children:e.filename}),fr("span",{children:e.text})]}),fr(ho,{className:"vm-trace-page-header-errors-item__close",startIcon:fr(ai,{}),variant:"text",color:"error",onClick:m(t)})]},"".concat(e,"_").concat(t))}))}),fr("div",{children:s&&fr(y,{})})]}),s&&fr("div",{children:fr($s,{jsonEditor:!0,traces:i,onDeleteClick:function(e){var t=i.filter((function(t){return t.idValue!==e.idValue}));o(bt(t))}})}),!s&&fr("div",{className:"vm-trace-page-preview",children:[fr("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",fr("a",{href:"https://docs.victoriametrics.com/#query-tracing",target:"_blank",rel:"noreferrer",children:"https://docs.victoriametrics.com/#query-tracing"}),"\n","Tracing graph will be displayed after file upload."]}),fr(y,{})]}),t&&fr(Lo,{title:"Paste JSON",onClose:d,children:fr(Is,{editable:!0,displayTitle:!0,defaultTile:"JSON ".concat(i.length+1),onClose:d,onUpload:p})})]})},xd=function(){var e=_t(X(!0),2),t=e[0],n=e[1];return fr(m,t?{children:[fr(Bs,{}),fr(Dd,{setLoadingTheme:n}),";"]}:{children:fr(Un,{children:fr(fo,{children:fr(jn,{children:fr($n,{path:"/",element:fr(qo,{}),children:[fr($n,{path:Jn.home,element:fr(qs,{})}),fr($n,{path:Jn.dashboards,element:fr(If,{})}),fr($n,{path:Jn.cardinality,element:fr(vd,{})}),fr($n,{path:Jn.topQueries,element:fr(_d,{})}),fr($n,{path:Jn.trace,element:fr(wd,{})})]})})})})})},kd=function(e){e&&n.e(27).then(n.bind(n,27)).then((function(t){var n=t.getCLS,r=t.getFID,i=t.getFCP,o=t.getLCP,a=t.getTTFB;n(e),r(e),i(e),o(e),a(e)}))},Cd=document.getElementById("root");Cd&&Ve(fr(xd,{}),Cd),kd()}()}(); \ No newline at end of file diff --git a/app/vmselect/vmui/static/js/main.b76a42a5.js b/app/vmselect/vmui/static/js/main.b76a42a5.js new file mode 100644 index 000000000..2604b99f5 --- /dev/null +++ b/app/vmselect/vmui/static/js/main.b76a42a5.js @@ -0,0 +1,2 @@ +/*! For license information please see main.b76a42a5.js.LICENSE.txt */ +!function(){var e={680:function(e,t,n){"use strict";var r=n(476),i=n(962),o=i(r("String.prototype.indexOf"));e.exports=function(e,t){var n=r(e,!!t);return"function"===typeof n&&o(e,".prototype.")>-1?i(n):n}},962:function(e,t,n){"use strict";var r=n(199),i=n(476),o=i("%Function.prototype.apply%"),a=i("%Function.prototype.call%"),u=i("%Reflect.apply%",!0)||r.call(a,o),l=i("%Object.getOwnPropertyDescriptor%",!0),c=i("%Object.defineProperty%",!0),s=i("%Math.max%");if(c)try{c({},"a",{value:1})}catch(d){c=null}e.exports=function(e){var t=u(r,a,arguments);if(l&&c){var n=l(t,"length");n.configurable&&c(t,"length",{value:1+s(0,e.length-(arguments.length-1))})}return t};var f=function(){return u(r,o,arguments)};c?c(e.exports,"apply",{value:f}):e.exports.apply=f},123:function(e,t){var n;!function(){"use strict";var r={}.hasOwnProperty;function i(){for(var e=[],t=0;t=t?e:""+Array(t+1-r.length).join(n)+e},g={s:y,z:function(e){var t=-e.utcOffset(),n=Math.abs(t),r=Math.floor(n/60),i=n%60;return(t<=0?"+":"-")+y(r,2,"0")+":"+y(i,2,"0")},m:function e(t,n){if(t.date()1)return e(a[0])}else{var u=t.name;b[u]=t,i=u}return!r&&i&&(_=i),i||!r&&_},x=function(e,t){if(D(e))return e.clone();var n="object"==typeof t?t:{};return n.date=e,n.args=arguments,new C(n)},k=g;k.l=w,k.i=D,k.w=function(e,t){return x(e,{locale:t.$L,utc:t.$u,x:t.$x,$offset:t.$offset})};var C=function(){function m(e){this.$L=w(e.locale,null,!0),this.parse(e)}var y=m.prototype;return y.parse=function(e){this.$d=function(e){var t=e.date,n=e.utc;if(null===t)return new Date(NaN);if(k.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 i=r[2]-1||0,o=(r[7]||"0").substring(0,3);return n?new Date(Date.UTC(r[1],i,r[3]||1,r[4]||0,r[5]||0,r[6]||0,o)):new Date(r[1],i,r[3]||1,r[4]||0,r[5]||0,r[6]||0,o)}}return new Date(t)}(e),this.$x=e.x||{},this.init()},y.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()},y.$utils=function(){return k},y.isValid=function(){return!(this.$d.toString()===h)},y.isSame=function(e,t){var n=x(e);return this.startOf(t)<=n&&n<=this.endOf(t)},y.isAfter=function(e,t){return x(e)1&&"boolean"!==typeof t)throw new a('"allowMissing" argument must be a boolean');if(null===k(/^%?[^%]*%?$/,e))throw new i("`%` may not be present anywhere but at the beginning and end of the intrinsic name");var n=S(e),r=n.length>0?n[0]:"",o=A("%"+r+"%",t),u=o.name,c=o.value,s=!1,f=o.alias;f&&(r=f[0],D(n,b([0,1],f)));for(var d=1,h=!0;d=n.length){var g=l(c,p);c=(h=!!g)&&"get"in g&&!("originalValue"in g.get)?g.get:c[p]}else h=_(c,p),c=c[p];h&&!s&&(v[u]=c)}}return c}},520:function(e,t,n){"use strict";var r="undefined"!==typeof Symbol&&Symbol,i=n(541);e.exports=function(){return"function"===typeof r&&("function"===typeof Symbol&&("symbol"===typeof r("foo")&&("symbol"===typeof Symbol("bar")&&i())))}},541:function(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 i=Object.getOwnPropertyDescriptor(e,t);if(42!==i.value||!0!==i.enumerable)return!1}return!0}},838:function(e,t,n){"use strict";var r=n(199);e.exports=r.call(Function.call,Object.prototype.hasOwnProperty)},936:function(e,t,n){var r=/^\s+|\s+$/g,i=/^[-+]0x[0-9a-f]+$/i,o=/^0b[01]+$/i,a=/^0o[0-7]+$/i,u=parseInt,l="object"==typeof n.g&&n.g&&n.g.Object===Object&&n.g,c="object"==typeof self&&self&&self.Object===Object&&self,s=l||c||Function("return this")(),f=Object.prototype.toString,d=Math.max,h=Math.min,p=function(){return s.Date.now()};function v(e){var t=typeof e;return!!e&&("object"==t||"function"==t)}function m(e){if("number"==typeof e)return e;if(function(e){return"symbol"==typeof e||function(e){return!!e&&"object"==typeof e}(e)&&"[object Symbol]"==f.call(e)}(e))return NaN;if(v(e)){var t="function"==typeof e.valueOf?e.valueOf():e;e=v(t)?t+"":t}if("string"!=typeof e)return 0===e?e:+e;e=e.replace(r,"");var n=o.test(e);return n||a.test(e)?u(e.slice(2),n?2:8):i.test(e)?NaN:+e}e.exports=function(e,t,n){var r,i,o,a,u,l,c=0,s=!1,f=!1,y=!0;if("function"!=typeof e)throw new TypeError("Expected a function");function g(t){var n=r,o=i;return r=i=void 0,c=t,a=e.apply(o,n)}function _(e){return c=e,u=setTimeout(D,t),s?g(e):a}function b(e){var n=e-l;return void 0===l||n>=t||n<0||f&&e-c>=o}function D(){var e=p();if(b(e))return w(e);u=setTimeout(D,function(e){var n=t-(e-l);return f?h(n,o-(e-c)):n}(e))}function w(e){return u=void 0,y&&r?g(e):(r=i=void 0,a)}function x(){var e=p(),n=b(e);if(r=arguments,i=this,l=e,n){if(void 0===u)return _(l);if(f)return u=setTimeout(D,t),g(l)}return void 0===u&&(u=setTimeout(D,t)),a}return t=m(t)||0,v(n)&&(s=!!n.leading,o=(f="maxWait"in n)?d(m(n.maxWait)||0,t):o,y="trailing"in n?!!n.trailing:y),x.cancel=function(){void 0!==u&&clearTimeout(u),c=0,r=l=i=u=void 0},x.flush=function(){return void 0===u?a:w(p())},x}},7:function(e,t,n){var r="__lodash_hash_undefined__",i="[object Function]",o="[object GeneratorFunction]",a=/\.|\[(?:[^[\]]*|(["'])(?:(?!\1)[^\\]|\\.)*?\1)\]/,u=/^\w*$/,l=/^\./,c=/[^.[\]]+|\[(?:(-?\d+(?:\.\d+)?)|(["'])((?:(?!\2)[^\\]|\\.)*?)\2)\]|(?=(?:\.|\[\])(?:\.|\[\]|$))/g,s=/\\(\\)?/g,f=/^\[object .+?Constructor\]$/,d="object"==typeof n.g&&n.g&&n.g.Object===Object&&n.g,h="object"==typeof self&&self&&self.Object===Object&&self,p=d||h||Function("return this")();var v=Array.prototype,m=Function.prototype,y=Object.prototype,g=p["__core-js_shared__"],_=function(){var e=/[^.]+$/.exec(g&&g.keys&&g.keys.IE_PROTO||"");return e?"Symbol(src)_1."+e:""}(),b=m.toString,D=y.hasOwnProperty,w=y.toString,x=RegExp("^"+b.call(D).replace(/[\\^$.*+?()[\]{}|]/g,"\\$&").replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g,"$1.*?")+"$"),k=p.Symbol,C=v.splice,E=I(p,"Map"),S=I(Object,"create"),A=k?k.prototype:void 0,F=A?A.toString:void 0;function N(e){var t=-1,n=e?e.length:0;for(this.clear();++t-1},O.prototype.set=function(e,t){var n=this.__data__,r=B(n,e);return r<0?n.push([e,t]):n[r][1]=t,this},T.prototype.clear=function(){this.__data__={hash:new N,map:new(E||O),string:new N}},T.prototype.delete=function(e){return P(this,e).delete(e)},T.prototype.get=function(e){return P(this,e).get(e)},T.prototype.has=function(e){return P(this,e).has(e)},T.prototype.set=function(e,t){return P(this,e).set(e,t),this};var $=j((function(e){var t;e=null==(t=e)?"":function(e){if("string"==typeof e)return e;if(H(e))return F?F.call(e):"";var t=e+"";return"0"==t&&1/e==-1/0?"-0":t}(t);var n=[];return l.test(e)&&n.push(""),e.replace(c,(function(e,t,r,i){n.push(r?i.replace(s,"$1"):t||e)})),n}));function R(e){if("string"==typeof e||H(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 n(){var r=arguments,i=t?t.apply(this,r):r[0],o=n.cache;if(o.has(i))return o.get(i);var a=e.apply(this,r);return n.cache=o.set(i,a),a};return n.cache=new(j.Cache||T),n}j.Cache=T;var z=Array.isArray;function U(e){var t=typeof e;return!!e&&("object"==t||"function"==t)}function H(e){return"symbol"==typeof e||function(e){return!!e&&"object"==typeof e}(e)&&"[object Symbol]"==w.call(e)}e.exports=function(e,t,n){var r=null==e?void 0:M(e,t);return void 0===r?n:r}},61:function(e,t,n){var r="Expected a function",i=/^\s+|\s+$/g,o=/^[-+]0x[0-9a-f]+$/i,a=/^0b[01]+$/i,u=/^0o[0-7]+$/i,l=parseInt,c="object"==typeof n.g&&n.g&&n.g.Object===Object&&n.g,s="object"==typeof self&&self&&self.Object===Object&&self,f=c||s||Function("return this")(),d=Object.prototype.toString,h=Math.max,p=Math.min,v=function(){return f.Date.now()};function m(e,t,n){var i,o,a,u,l,c,s=0,f=!1,d=!1,m=!0;if("function"!=typeof e)throw new TypeError(r);function _(t){var n=i,r=o;return i=o=void 0,s=t,u=e.apply(r,n)}function b(e){return s=e,l=setTimeout(w,t),f?_(e):u}function D(e){var n=e-c;return void 0===c||n>=t||n<0||d&&e-s>=a}function w(){var e=v();if(D(e))return x(e);l=setTimeout(w,function(e){var n=t-(e-c);return d?p(n,a-(e-s)):n}(e))}function x(e){return l=void 0,m&&i?_(e):(i=o=void 0,u)}function k(){var e=v(),n=D(e);if(i=arguments,o=this,c=e,n){if(void 0===l)return b(c);if(d)return l=setTimeout(w,t),_(c)}return void 0===l&&(l=setTimeout(w,t)),u}return t=g(t)||0,y(n)&&(f=!!n.leading,a=(d="maxWait"in n)?h(g(n.maxWait)||0,t):a,m="trailing"in n?!!n.trailing:m),k.cancel=function(){void 0!==l&&clearTimeout(l),s=0,i=c=o=l=void 0},k.flush=function(){return void 0===l?u:x(v())},k}function y(e){var t=typeof e;return!!e&&("object"==t||"function"==t)}function g(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(y(e)){var t="function"==typeof e.valueOf?e.valueOf():e;e=y(t)?t+"":t}if("string"!=typeof e)return 0===e?e:+e;e=e.replace(i,"");var n=a.test(e);return n||u.test(e)?l(e.slice(2),n?2:8):o.test(e)?NaN:+e}e.exports=function(e,t,n){var i=!0,o=!0;if("function"!=typeof e)throw new TypeError(r);return y(n)&&(i="leading"in n?!!n.leading:i,o="trailing"in n?!!n.trailing:o),m(e,t,{leading:i,maxWait:t,trailing:o})}},154:function(e,t,n){var r="function"===typeof Map&&Map.prototype,i=Object.getOwnPropertyDescriptor&&r?Object.getOwnPropertyDescriptor(Map.prototype,"size"):null,o=r&&i&&"function"===typeof i.get?i.get:null,a=r&&Map.prototype.forEach,u="function"===typeof Set&&Set.prototype,l=Object.getOwnPropertyDescriptor&&u?Object.getOwnPropertyDescriptor(Set.prototype,"size"):null,c=u&&l&&"function"===typeof l.get?l.get:null,s=u&&Set.prototype.forEach,f="function"===typeof WeakMap&&WeakMap.prototype?WeakMap.prototype.has:null,d="function"===typeof WeakSet&&WeakSet.prototype?WeakSet.prototype.has:null,h="function"===typeof WeakRef&&WeakRef.prototype?WeakRef.prototype.deref:null,p=Boolean.prototype.valueOf,v=Object.prototype.toString,m=Function.prototype.toString,y=String.prototype.match,g=String.prototype.slice,_=String.prototype.replace,b=String.prototype.toUpperCase,D=String.prototype.toLowerCase,w=RegExp.prototype.test,x=Array.prototype.concat,k=Array.prototype.join,C=Array.prototype.slice,E=Math.floor,S="function"===typeof BigInt?BigInt.prototype.valueOf:null,A=Object.getOwnPropertySymbols,F="function"===typeof Symbol&&"symbol"===typeof Symbol.iterator?Symbol.prototype.toString:null,N="function"===typeof Symbol&&"object"===typeof Symbol.iterator,O="function"===typeof Symbol&&Symbol.toStringTag&&(typeof Symbol.toStringTag===N||"symbol")?Symbol.toStringTag:null,T=Object.prototype.propertyIsEnumerable,B=("function"===typeof Reflect?Reflect.getPrototypeOf:Object.getPrototypeOf)||([].__proto__===Array.prototype?function(e){return e.__proto__}:null);function M(e,t){if(e===1/0||e===-1/0||e!==e||e&&e>-1e3&&e<1e3||w.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 i=String(r),o=g.call(t,i.length+1);return _.call(i,n,"$&_")+"."+_.call(_.call(o,/([0-9]{3})/g,"$&_"),/_$/,"")}}return _.call(t,n,"$&_")}var L=n(654),P=L.custom,I=U(P)?P:null;function $(e,t,n){var r="double"===(n.quoteStyle||t)?'"':"'";return r+e+r}function R(e){return _.call(String(e),/"/g,""")}function j(e){return"[object Array]"===V(e)&&(!O||!("object"===typeof e&&O in e))}function z(e){return"[object RegExp]"===V(e)&&(!O||!("object"===typeof e&&O in e))}function U(e){if(N)return e&&"object"===typeof e&&e instanceof Symbol;if("symbol"===typeof e)return!0;if(!e||"object"!==typeof e||!F)return!1;try{return F.call(e),!0}catch(t){}return!1}e.exports=function e(t,n,r,i){var u=n||{};if(Y(u,"quoteStyle")&&"single"!==u.quoteStyle&&"double"!==u.quoteStyle)throw new TypeError('option "quoteStyle" must be "single" or "double"');if(Y(u,"maxStringLength")&&("number"===typeof u.maxStringLength?u.maxStringLength<0&&u.maxStringLength!==1/0:null!==u.maxStringLength))throw new TypeError('option "maxStringLength", if provided, must be a positive integer, Infinity, or `null`');var l=!Y(u,"customInspect")||u.customInspect;if("boolean"!==typeof l&&"symbol"!==l)throw new TypeError("option \"customInspect\", if provided, must be `true`, `false`, or `'symbol'`");if(Y(u,"indent")&&null!==u.indent&&"\t"!==u.indent&&!(parseInt(u.indent,10)===u.indent&&u.indent>0))throw new TypeError('option "indent" must be "\\t", an integer > 0, or `null`');if(Y(u,"numericSeparator")&&"boolean"!==typeof u.numericSeparator)throw new TypeError('option "numericSeparator", if provided, must be `true` or `false`');var v=u.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,u);if("number"===typeof t){if(0===t)return 1/0/t>0?"0":"-0";var b=String(t);return v?M(t,b):b}if("bigint"===typeof t){var w=String(t)+"n";return v?M(t,w):w}var E="undefined"===typeof u.depth?5:u.depth;if("undefined"===typeof r&&(r=0),r>=E&&E>0&&"object"===typeof t)return j(t)?"[Array]":"[Object]";var A=function(e,t){var n;if("\t"===e.indent)n="\t";else{if(!("number"===typeof e.indent&&e.indent>0))return null;n=k.call(Array(e.indent+1)," ")}return{base:n,prev:k.call(Array(t+1),n)}}(u,r);if("undefined"===typeof i)i=[];else if(q(i,t)>=0)return"[Circular]";function P(t,n,o){if(n&&(i=C.call(i)).push(n),o){var a={depth:u.depth};return Y(u,"quoteStyle")&&(a.quoteStyle=u.quoteStyle),e(t,a,r+1,i)}return e(t,u,r+1,i)}if("function"===typeof t&&!z(t)){var H=function(e){if(e.name)return e.name;var t=y.call(m.call(e),/^function\s*([\w$]+)/);if(t)return t[1];return null}(t),Q=X(t,P);return"[Function"+(H?": "+H:" (anonymous)")+"]"+(Q.length>0?" { "+k.call(Q,", ")+" }":"")}if(U(t)){var ee=N?_.call(String(t),/^(Symbol\(.*\))_[^)]*$/,"$1"):F.call(t);return"object"!==typeof t||N?ee:G(ee)}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 te="<"+D.call(String(t.nodeName)),ne=t.attributes||[],re=0;re"}if(j(t)){if(0===t.length)return"[]";var ie=X(t,P);return A&&!function(e){for(var t=0;t=0)return!1;return!0}(ie)?"["+K(ie,A)+"]":"[ "+k.call(ie,", ")+" ]"}if(function(e){return"[object Error]"===V(e)&&(!O||!("object"===typeof e&&O in e))}(t)){var oe=X(t,P);return"cause"in Error.prototype||!("cause"in t)||T.call(t,"cause")?0===oe.length?"["+String(t)+"]":"{ ["+String(t)+"] "+k.call(oe,", ")+" }":"{ ["+String(t)+"] "+k.call(x.call("[cause]: "+P(t.cause),oe),", ")+" }"}if("object"===typeof t&&l){if(I&&"function"===typeof t[I]&&L)return L(t,{depth:E-r});if("symbol"!==l&&"function"===typeof t.inspect)return t.inspect()}if(function(e){if(!o||!e||"object"!==typeof e)return!1;try{o.call(e);try{c.call(e)}catch(te){return!0}return e instanceof Map}catch(t){}return!1}(t)){var ae=[];return a.call(t,(function(e,n){ae.push(P(n,t,!0)+" => "+P(e,t))})),Z("Map",o.call(t),ae,A)}if(function(e){if(!c||!e||"object"!==typeof e)return!1;try{c.call(e);try{o.call(e)}catch(t){return!0}return e instanceof Set}catch(n){}return!1}(t)){var ue=[];return s.call(t,(function(e){ue.push(P(e,t))})),Z("Set",c.call(t),ue,A)}if(function(e){if(!f||!e||"object"!==typeof e)return!1;try{f.call(e,f);try{d.call(e,d)}catch(te){return!0}return e instanceof WeakMap}catch(t){}return!1}(t))return J("WeakMap");if(function(e){if(!d||!e||"object"!==typeof e)return!1;try{d.call(e,d);try{f.call(e,f)}catch(te){return!0}return e instanceof WeakSet}catch(t){}return!1}(t))return J("WeakSet");if(function(e){if(!h||!e||"object"!==typeof e)return!1;try{return h.call(e),!0}catch(t){}return!1}(t))return J("WeakRef");if(function(e){return"[object Number]"===V(e)&&(!O||!("object"===typeof e&&O in e))}(t))return G(P(Number(t)));if(function(e){if(!e||"object"!==typeof e||!S)return!1;try{return S.call(e),!0}catch(t){}return!1}(t))return G(P(S.call(t)));if(function(e){return"[object Boolean]"===V(e)&&(!O||!("object"===typeof e&&O in e))}(t))return G(p.call(t));if(function(e){return"[object String]"===V(e)&&(!O||!("object"===typeof e&&O in e))}(t))return G(P(String(t)));if(!function(e){return"[object Date]"===V(e)&&(!O||!("object"===typeof e&&O in e))}(t)&&!z(t)){var le=X(t,P),ce=B?B(t)===Object.prototype:t instanceof Object||t.constructor===Object,se=t instanceof Object?"":"null prototype",fe=!ce&&O&&Object(t)===t&&O in t?g.call(V(t),8,-1):se?"Object":"",de=(ce||"function"!==typeof t.constructor?"":t.constructor.name?t.constructor.name+" ":"")+(fe||se?"["+k.call(x.call([],fe||[],se||[]),": ")+"] ":"");return 0===le.length?de+"{}":A?de+"{"+K(le,A)+"}":de+"{ "+k.call(le,", ")+" }"}return String(t)};var H=Object.prototype.hasOwnProperty||function(e){return e in this};function Y(e,t){return H.call(e,t)}function V(e){return v.call(e)}function q(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(g.call(e,0,t.maxStringLength),t)+r}return $(_.call(_.call(e,/(['\\])/g,"\\$1"),/[\x00-\x1f]/g,Q),"single",t)}function Q(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 G(e){return"Object("+e+")"}function J(e){return e+" { ? }"}function Z(e,t,n,r){return e+" ("+t+") {"+(r?K(n,r):k.call(n,", "))+"}"}function K(e,t){if(0===e.length)return"";var n="\n"+t.prev+t.base;return n+k.call(e,","+n)+"\n"+t.prev}function X(e,t){var n=j(e),r=[];if(n){r.length=e.length;for(var i=0;i-1?e.split(","):e},c=function(e,t,n,r){if(e){var o=n.allowDots?e.replace(/\.([^.[]+)/g,"[$1]"):e,a=/(\[[^[\]]*])/g,u=n.depth>0&&/(\[[^[\]]*])/.exec(o),c=u?o.slice(0,u.index):o,s=[];if(c){if(!n.plainObjects&&i.call(Object.prototype,c)&&!n.allowPrototypes)return;s.push(c)}for(var f=0;n.depth>0&&null!==(u=a.exec(o))&&f=0;--o){var a,u=e[o];if("[]"===u&&n.parseArrays)a=[].concat(i);else{a=n.plainObjects?Object.create(null):{};var c="["===u.charAt(0)&&"]"===u.charAt(u.length-1)?u.slice(1,-1):u,s=parseInt(c,10);n.parseArrays||""!==c?!isNaN(s)&&u!==c&&String(s)===c&&s>=0&&n.parseArrays&&s<=n.arrayLimit?(a=[])[s]=i:"__proto__"!==c&&(a[c]=i):a={0:i}}i=a}return i}(s,t,n,r)}};e.exports=function(e,t){var n=function(e){if(!e)return a;if(null!==e.decoder&&void 0!==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?a.charset:e.charset;return{allowDots:"undefined"===typeof e.allowDots?a.allowDots:!!e.allowDots,allowPrototypes:"boolean"===typeof e.allowPrototypes?e.allowPrototypes:a.allowPrototypes,allowSparse:"boolean"===typeof e.allowSparse?e.allowSparse:a.allowSparse,arrayLimit:"number"===typeof e.arrayLimit?e.arrayLimit:a.arrayLimit,charset:t,charsetSentinel:"boolean"===typeof e.charsetSentinel?e.charsetSentinel:a.charsetSentinel,comma:"boolean"===typeof e.comma?e.comma:a.comma,decoder:"function"===typeof e.decoder?e.decoder:a.decoder,delimiter:"string"===typeof e.delimiter||r.isRegExp(e.delimiter)?e.delimiter:a.delimiter,depth:"number"===typeof e.depth||!1===e.depth?+e.depth:a.depth,ignoreQueryPrefix:!0===e.ignoreQueryPrefix,interpretNumericEntities:"boolean"===typeof e.interpretNumericEntities?e.interpretNumericEntities:a.interpretNumericEntities,parameterLimit:"number"===typeof e.parameterLimit?e.parameterLimit:a.parameterLimit,parseArrays:!1!==e.parseArrays,plainObjects:"boolean"===typeof e.plainObjects?e.plainObjects:a.plainObjects,strictNullHandling:"boolean"===typeof e.strictNullHandling?e.strictNullHandling:a.strictNullHandling}}(t);if(""===e||null===e||"undefined"===typeof e)return n.plainObjects?Object.create(null):{};for(var s="string"===typeof e?function(e,t){var n,c={},s=t.ignoreQueryPrefix?e.replace(/^\?/,""):e,f=t.parameterLimit===1/0?void 0:t.parameterLimit,d=s.split(t.delimiter,f),h=-1,p=t.charset;if(t.charsetSentinel)for(n=0;n-1&&(m=o(m)?[m]:m),i.call(c,v)?c[v]=r.combine(c[v],m):c[v]=m}return c}(e,n):e,f=n.plainObjects?Object.create(null):{},d=Object.keys(s),h=0;h0?C.join(",")||null:void 0}];else if(l(h))M=h;else{var P=Object.keys(C);M=m?P.sort(m):P}for(var I=a&&l(C)&&1===C.length?n+"[]":n,$=0;$0?D+b:""}},837:function(e,t,n){"use strict";var r=n(609),i=Object.prototype.hasOwnProperty,o=Array.isArray,a=function(){for(var e=[],t=0;t<256;++t)e.push("%"+((t<16?"0":"")+t.toString(16)).toUpperCase());return e}(),u=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(o(n)){for(var r=[],i=0;i=48&&s<=57||s>=65&&s<=90||s>=97&&s<=122||o===r.RFC1738&&(40===s||41===s)?l+=u.charAt(c):s<128?l+=a[s]:s<2048?l+=a[192|s>>6]+a[128|63&s]:s<55296||s>=57344?l+=a[224|s>>12]+a[128|s>>6&63]+a[128|63&s]:(c+=1,s=65536+((1023&s)<<10|1023&u.charCodeAt(c)),l+=a[240|s>>18]+a[128|s>>12&63]+a[128|s>>6&63]+a[128|63&s])}return l},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(o(e)){for(var n=[],r=0;r2&&(u.children=arguments.length>3?t.call(arguments,2):r),"function"==typeof e&&null!=e.defaultProps)for(a in e.defaultProps)void 0===u[a]&&(u[a]=e.defaultProps[a]);return p(e,u,i,o,null)}function p(e,t,n,o,a){var u={type:e,props:t,key:n,ref:o,__k:null,__:null,__b:0,__e:null,__d:void 0,__c:null,__h:null,constructor:void 0,__v:null==a?++i:a};return null==a&&null!=r.vnode&&r.vnode(u),u}function v(){return{current:null}}function m(e){return e.children}function y(e,t){this.props=e,this.context=t}function g(e,t){if(null==t)return e.__?g(e.__,e.__.__k.indexOf(e)+1):null;for(var n;t0?p(y.type,y.props,y.key,y.ref?y.ref:null,y.__v):y)){if(y.__=n,y.__b=n.__b+1,null===(v=w[d])||v&&y.key==v.key&&y.type===v.type)w[d]=void 0;else for(h=0;h2&&(u.children=arguments.length>3?t.call(arguments,2):r),p(e.type,u,i||e.key,o||e.ref,null)}function R(e,t){var n={__c:t="__cC"+u++,__: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.shouldComponentUpdate=function(e){this.props.value!==e.value&&n.some(b)},this.sub=function(e){n.push(e);var t=e.componentWillUnmount;e.componentWillUnmount=function(){n.splice(n.indexOf(e),1),t&&t.call(e)}}),e.children}};return n.Provider.__=n.Consumer.contextType=n}t=c.slice,r={__e:function(e,t,n,r){for(var i,o,a;t=t.__;)if((i=t.__c)&&!i.__)try{if((o=i.constructor)&&null!=o.getDerivedStateFromError&&(i.setState(o.getDerivedStateFromError(e)),a=i.__d),null!=i.componentDidCatch&&(i.componentDidCatch(e,r||{}),a=i.__d),a)return i.__E=i}catch(t){e=t}throw e}},i=0,y.prototype.setState=function(e,t){var n;n=null!=this.__s&&this.__s!==this.state?this.__s:this.__s=f({},this.state),"function"==typeof e&&(e=e(f({},n),this.props)),e&&f(n,e),null!=e&&this.__v&&(t&&this._sb.push(t),b(this))},y.prototype.forceUpdate=function(e){this.__v&&(this.__e=!0,e&&this.__h.push(e),b(this))},y.prototype.render=m,o=[],D.__r=0,u=0;var j,z,U,H,Y=0,V=[],q=[],W=r.__b,Q=r.__r,G=r.diffed,J=r.__c,Z=r.unmount;function K(e,t){r.__h&&r.__h(z,e,Y||t),Y=0;var n=z.__H||(z.__H={__:[],__h:[]});return e>=n.__.length&&n.__.push({__V:q}),n.__[e]}function X(e){return Y=1,ee(ye,e)}function ee(e,t,n){var r=K(j++,2);if(r.t=e,!r.__c&&(r.__=[n?n(t):ye(void 0,t),function(e){var t=r.__N?r.__N[0]:r.__[0],n=r.t(t,e);t!==n&&(r.__N=[n,r.__[1]],r.__c.setState({}))}],r.__c=z,!z.u)){z.u=!0;var i=z.shouldComponentUpdate;z.shouldComponentUpdate=function(e,t,n){if(!r.__c.__H)return!0;var o=r.__c.__H.__.filter((function(e){return e.__c}));if(o.every((function(e){return!e.__N})))return!i||i.call(this,e,t,n);var a=!1;return o.forEach((function(e){if(e.__N){var t=e.__[0];e.__=e.__N,e.__N=void 0,t!==e.__[0]&&(a=!0)}})),!(!a&&r.__c.props===e)&&(!i||i.call(this,e,t,n))}}return r.__N||r.__}function te(e,t){var n=K(j++,3);!r.__s&&me(n.__H,t)&&(n.__=e,n.i=t,z.__H.__h.push(n))}function ne(e,t){var n=K(j++,4);!r.__s&&me(n.__H,t)&&(n.__=e,n.i=t,z.__h.push(n))}function re(e){return Y=5,oe((function(){return{current:e}}),[])}function ie(e,t,n){Y=6,ne((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 oe(e,t){var n=K(j++,7);return me(n.__H,t)?(n.__V=e(),n.i=t,n.__h=e,n.__V):n.__}function ae(e,t){return Y=8,oe((function(){return e}),t)}function ue(e){var t=z.context[e.__c],n=K(j++,9);return n.c=e,t?(null==n.__&&(n.__=!0,t.sub(z)),t.props.value):e.__}function le(e,t){r.useDebugValue&&r.useDebugValue(t?t(e):e)}function ce(e){var t=K(j++,10),n=X();return t.__=e,z.componentDidCatch||(z.componentDidCatch=function(e,r){t.__&&t.__(e,r),n[1](e)}),[n[0],function(){n[1](void 0)}]}function se(){var e=K(j++,11);if(!e.__){for(var t=z.__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 fe(){for(var e;e=V.shift();)if(e.__P&&e.__H)try{e.__H.__h.forEach(pe),e.__H.__h.forEach(ve),e.__H.__h=[]}catch(u){e.__H.__h=[],r.__e(u,e.__v)}}r.__b=function(e){z=null,W&&W(e)},r.__r=function(e){Q&&Q(e),j=0;var t=(z=e.__c).__H;t&&(U===z?(t.__h=[],z.__h=[],t.__.forEach((function(e){e.__N&&(e.__=e.__N),e.__V=q,e.__N=e.i=void 0}))):(t.__h.forEach(pe),t.__h.forEach(ve),t.__h=[])),U=z},r.diffed=function(e){G&&G(e);var t=e.__c;t&&t.__H&&(t.__H.__h.length&&(1!==V.push(t)&&H===r.requestAnimationFrame||((H=r.requestAnimationFrame)||he)(fe)),t.__H.__.forEach((function(e){e.i&&(e.__H=e.i),e.__V!==q&&(e.__=e.__V),e.i=void 0,e.__V=q}))),U=z=null},r.__c=function(e,t){t.some((function(e){try{e.__h.forEach(pe),e.__h=e.__h.filter((function(e){return!e.__||ve(e)}))}catch(i){t.some((function(e){e.__h&&(e.__h=[])})),t=[],r.__e(i,e.__v)}})),J&&J(e,t)},r.unmount=function(e){Z&&Z(e);var t,n=e.__c;n&&n.__H&&(n.__H.__.forEach((function(e){try{pe(e)}catch(e){t=e}})),n.__H=void 0,t&&r.__e(t,n.__v))};var de="function"==typeof requestAnimationFrame;function he(e){var t,n=function(){clearTimeout(r),de&&cancelAnimationFrame(t),setTimeout(e)},r=setTimeout(n,100);de&&(t=requestAnimationFrame(n))}function pe(e){var t=z,n=e.__c;"function"==typeof n&&(e.__c=void 0,n()),z=t}function ve(e){var t=z;e.__c=e.__(),z=t}function me(e,t){return!e||e.length!==t.length||t.some((function(t,n){return t!==e[n]}))}function ye(e,t){return"function"==typeof t?t(e):t}function ge(e,t){for(var n in t)e[n]=t[n];return e}function _e(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 be(e,t){return e===t&&(0!==e||1/e==1/t)||e!=e&&t!=t}function De(e){this.props=e}function we(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:_e(this.props,e)}function r(t){return this.shouldComponentUpdate=n,h(e,t)}return r.displayName="Memo("+(e.displayName||e.name)+")",r.prototype.isReactComponent=!0,r.__f=!0,r}(De.prototype=new y).isPureReactComponent=!0,De.prototype.shouldComponentUpdate=function(e,t){return _e(this.props,e)||_e(this.state,t)};var xe=r.__b;r.__b=function(e){e.type&&e.type.__f&&e.ref&&(e.props.ref=e.ref,e.ref=null),xe&&xe(e)};var ke="undefined"!=typeof Symbol&&Symbol.for&&Symbol.for("react.forward_ref")||3911;function Ce(e){function t(t){var n=ge({},t);return delete n.ref,e(n,t.ref||null)}return t.$$typeof=ke,t.render=t,t.prototype.isReactComponent=t.__f=!0,t.displayName="ForwardRef("+(e.displayName||e.name)+")",t}var Ee=function(e,t){return null==e?null:k(k(e).map(t))},Se={map:Ee,forEach:Ee,count:function(e){return e?k(e).length:0},only:function(e){var t=k(e);if(1!==t.length)throw"Children.only";return t[0]},toArray:k},Ae=r.__e;r.__e=function(e,t,n,r){if(e.then)for(var i,o=t;o=o.__;)if((i=o.__c)&&i.__c)return null==t.__e&&(t.__e=n.__e,t.__k=n.__k),i.__c(e,t);Ae(e,t,n,r)};var Fe=r.unmount;function Ne(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=ge({},e)).__c&&(e.__c.__P===n&&(e.__c.__P=t),e.__c=null),e.__k=e.__k&&e.__k.map((function(e){return Ne(e,t,n)}))),e}function Oe(e,t,n){return e&&(e.__v=null,e.__k=e.__k&&e.__k.map((function(e){return Oe(e,t,n)})),e.__c&&e.__c.__P===t&&(e.__e&&n.insertBefore(e.__e,e.__d),e.__c.__e=!0,e.__c.__P=n)),e}function Te(){this.__u=0,this.t=null,this.__b=null}function Be(e){var t=e.__.__c;return t&&t.__a&&t.__a(e)}function Me(e){var t,n,r;function i(i){if(t||(t=e()).then((function(e){n=e.default||e}),(function(e){r=e})),r)throw r;if(!n)throw t;return h(n,i)}return i.displayName="Lazy",i.__f=!0,i}function Le(){this.u=null,this.o=null}r.unmount=function(e){var t=e.__c;t&&t.__R&&t.__R(),t&&!0===e.__h&&(e.type=null),Fe&&Fe(e)},(Te.prototype=new y).__c=function(e,t){var n=t.__c,r=this;null==r.t&&(r.t=[]),r.t.push(n);var i=Be(r.__v),o=!1,a=function(){o||(o=!0,n.__R=null,i?i(u):u())};n.__R=a;var u=function(){if(!--r.__u){if(r.state.__a){var e=r.state.__a;r.__v.__k[0]=Oe(e,e.__c.__P,e.__c.__O)}var t;for(r.setState({__a:r.__b=null});t=r.t.pop();)t.forceUpdate()}},l=!0===t.__h;r.__u++||l||r.setState({__a:r.__b=r.__v.__k[0]}),e.then(a,a)},Te.prototype.componentWillUnmount=function(){this.t=[]},Te.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]=Ne(this.__b,n,r.__O=r.__P)}this.__b=null}var i=t.__a&&h(m,null,e.fallback);return i&&(i.__h=null),[h(m,null,t.__a?null:e.children),i]};var Pe=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)}}),P(h(Ie,{context:t.context},e.__v),t.l)):t.l&&t.componentWillUnmount()}function Re(e,t){var n=h($e,{__v:e,i:t});return n.containerInfo=t,n}(Le.prototype=new y).__a=function(e){var t=this,n=Be(t.__v),r=t.o.get(e);return r[0]++,function(i){var o=function(){t.props.revealOrder?(r.push(i),Pe(t,e,r)):i()};n?n(o):o()}},Le.prototype.render=function(e){this.u=null,this.o=new Map;var t=k(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},Le.prototype.componentDidUpdate=Le.prototype.componentDidMount=function(){var e=this;this.o.forEach((function(t,n){Pe(e,n,t)}))};var je="undefined"!=typeof Symbol&&Symbol.for&&Symbol.for("react.element")||60103,ze=/^(?:accent|alignment|arabic|baseline|cap|clip(?!PathU)|color|dominant|fill|flood|font|glyph(?!R)|horiz|image|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]/,Ue="undefined"!=typeof document,He=function(e){return("undefined"!=typeof Symbol&&"symbol"==typeof Symbol()?/fil|che|rad/i:/fil|che|ra/i).test(e)};function Ye(e,t,n){return null==t.__k&&(t.textContent=""),P(e,t),"function"==typeof n&&n(),e?e.__c:null}function Ve(e,t,n){return I(e,t),"function"==typeof n&&n(),e?e.__c:null}y.prototype.isReactComponent={},["componentWillMount","componentWillReceiveProps","componentWillUpdate"].forEach((function(e){Object.defineProperty(y.prototype,e,{configurable:!0,get:function(){return this["UNSAFE_"+e]},set:function(t){Object.defineProperty(this,e,{configurable:!0,writable:!0,value:t})}})}));var qe=r.event;function We(){}function Qe(){return this.cancelBubble}function Ge(){return this.defaultPrevented}r.event=function(e){return qe&&(e=qe(e)),e.persist=We,e.isPropagationStopped=Qe,e.isDefaultPrevented=Ge,e.nativeEvent=e};var Je,Ze={configurable:!0,get:function(){return this.class}},Ke=r.vnode;r.vnode=function(e){var t=e.type,n=e.props,r=n;if("string"==typeof t){var i=-1===t.indexOf("-");for(var o in r={},n){var a=n[o];Ue&&"children"===o&&"noscript"===t||"value"===o&&"defaultValue"in n&&null==a||("defaultValue"===o&&"value"in n&&null==n.value?o="value":"download"===o&&!0===a?a="":/ondoubleclick/i.test(o)?o="ondblclick":/^onchange(textarea|input)/i.test(o+t)&&!He(n.type)?o="oninput":/^onfocus$/i.test(o)?o="onfocusin":/^onblur$/i.test(o)?o="onfocusout":/^on(Ani|Tra|Tou|BeforeInp|Compo)/.test(o)?o=o.toLowerCase():i&&ze.test(o)?o=o.replace(/[A-Z0-9]/g,"-$&").toLowerCase():null===a&&(a=void 0),/^oninput$/i.test(o)&&(o=o.toLowerCase(),r[o]&&(o="oninputCapture")),r[o]=a)}"select"==t&&r.multiple&&Array.isArray(r.value)&&(r.value=k(n.children).forEach((function(e){e.props.selected=-1!=r.value.indexOf(e.props.value)}))),"select"==t&&null!=r.defaultValue&&(r.value=k(n.children).forEach((function(e){e.props.selected=r.multiple?-1!=r.defaultValue.indexOf(e.props.value):r.defaultValue==e.props.value}))),e.props=r,n.class!=n.className&&(Ze.enumerable="className"in n,null!=n.className&&(r.class=n.className),Object.defineProperty(r,"className",Ze))}e.$$typeof=je,Ke&&Ke(e)};var Xe=r.__r;r.__r=function(e){Xe&&Xe(e),Je=e.__c};var et={ReactCurrentDispatcher:{current:{readContext:function(e){return Je.__n[e.__c].props.value}}}},tt="17.0.2";function nt(e){return h.bind(null,e)}function rt(e){return!!e&&e.$$typeof===je}function it(e){return rt(e)?$.apply(null,arguments):e}function ot(e){return!!e.__k&&(P(null,e),!0)}function at(e){return e&&(e.base||1===e.nodeType&&e)||null}var ut=function(e,t){return e(t)},lt=function(e,t){return e(t)},ct=m;function st(e){e()}function ft(e){return e}function dt(){return[!1,st]}var ht=ne;function pt(e,t){var n=t(),r=X({h:{__:n,v:t}}),i=r[0].h,o=r[1];return ne((function(){i.__=n,i.v=t,be(i.__,t())||o({h:i})}),[e,n,t]),te((function(){return be(i.__,i.v())||o({h:i}),e((function(){be(i.__,i.v())||o({h:i})}))}),[e]),n}var vt,mt={useState:X,useId:se,useReducer:ee,useEffect:te,useLayoutEffect:ne,useInsertionEffect:ht,useTransition:dt,useDeferredValue:ft,useSyncExternalStore:pt,startTransition:st,useRef:re,useImperativeHandle:ie,useMemo:oe,useCallback:ae,useContext:ue,useDebugValue:le,version:"17.0.2",Children:Se,render:Ye,hydrate:Ve,unmountComponentAtNode:ot,createPortal:Re,createElement:h,createContext:R,createFactory:nt,cloneElement:it,createRef:v,Fragment:m,isValidElement:rt,findDOMNode:at,Component:y,PureComponent:De,memo:we,forwardRef:Ce,flushSync:lt,unstable_batchedUpdates:ut,StrictMode:ct,Suspense:Te,SuspenseList:Le,lazy:Me,__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED:et};function yt(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n=0&&(t.hash=e.substr(n),e=e.substr(0,n));var r=e.indexOf("?");r>=0&&(t.search=e.substr(r),e=e.substr(0,r)),e&&(t.pathname=e)}return t}function zt(e){var t="undefined"!==typeof window&&"undefined"!==typeof window.location&&"null"!==window.location.origin?window.location.origin:"unknown://unknown",n="string"===typeof e?e:Rt(e);return new URL(n,t)}function Ut(e,t,n,r){void 0===r&&(r={});var i=r,o=i.window,a=void 0===o?document.defaultView:o,u=i.v5Compat,l=void 0!==u&&u,c=a.history,s=vt.Pop,f=null;function d(){s=vt.Pop,f&&f({action:s,location:h.location})}var h={get action(){return s},get location(){return e(a,c)},listen:function(e){if(f)throw new Error("A history only accepts one active listener");return a.addEventListener(Lt,d),f=e,function(){a.removeEventListener(Lt,d),f=null}},createHref:function(e){return t(a,e)},encodeLocation:function(e){var t=zt(Rt(e));return Bt({},e,{pathname:t.pathname,search:t.search,hash:t.hash})},push:function(e,t){s=vt.Push;var r=$t(h.location,e,t);n&&n(r,e);var i=It(r),o=h.createHref(r);try{c.pushState(i,"",o)}catch(u){a.location.assign(o)}l&&f&&f({action:s,location:h.location})},replace:function(e,t){s=vt.Replace;var r=$t(h.location,e,t);n&&n(r,e);var i=It(r),o=h.createHref(r);c.replaceState(i,"",o),l&&f&&f({action:s,location:h.location})},go:function(e){return c.go(e)}};return h}function Ht(e,t,n){void 0===n&&(n="/");var r=Zt(("string"===typeof t?jt(t):t).pathname||"/",n);if(null==r)return null;var i=Yt(e);!function(e){e.sort((function(e,t){return e.score!==t.score?t.score-e.score:function(e,t){var n=e.length===t.length&&e.slice(0,-1).every((function(e,n){return e===t[n]}));return n?e[e.length-1]-t[t.length-1]:0}(e.routesMeta.map((function(e){return e.childrenIndex})),t.routesMeta.map((function(e){return e.childrenIndex})))}))}(i);for(var o=null,a=0;null==o&&a0&&(Kt(!0!==e.index,'Index routes must not have child routes. Please remove all child routes from route path "'+a+'".'),Yt(e.children,t,u,a)),(null!=e.path||e.index)&&t.push({path:a,score:Wt(a,e.index),routesMeta:u})})),t}!function(e){e.data="data",e.deferred="deferred",e.redirect="redirect",e.error="error"}(Mt||(Mt={}));var Vt=/^:\w+$/,qt=function(e){return"*"===e};function Wt(e,t){var n=e.split("/"),r=n.length;return n.some(qt)&&(r+=-2),t&&(r+=2),n.filter((function(e){return!qt(e)})).reduce((function(e,t){return e+(Vt.test(t)?3:""===t?1:10)}),r)}function Qt(e,t){for(var n=e.routesMeta,r={},i="/",o=[],a=0;a and the router will parse it for you.'}function tn(e){return e.filter((function(e,t){return 0===t||e.route.path&&e.route.path.length>0}))}function nn(e,t,n,r){var i;void 0===r&&(r=!1),"string"===typeof e?i=jt(e):(Kt(!(i=Bt({},e)).pathname||!i.pathname.includes("?"),en("?","pathname","search",i)),Kt(!i.pathname||!i.pathname.includes("#"),en("#","pathname","hash",i)),Kt(!i.search||!i.search.includes("#"),en("#","search","hash",i)));var o,a=""===e||""===i.pathname,u=a?"/":i.pathname;if(r||null==u)o=n;else{var l=t.length-1;if(u.startsWith("..")){for(var c=u.split("/");".."===c[0];)c.shift(),l-=1;i.pathname=c.join("/")}o=l>=0?t[l]:"/"}var s=function(e,t){void 0===t&&(t="/");var n="string"===typeof e?jt(e):e,r=n.pathname,i=n.search,o=void 0===i?"":i,a=n.hash,u=void 0===a?"":a,l=r?r.startsWith("/")?r:function(e,t){var n=t.replace(/\/+$/,"").split("/");return e.split("/").forEach((function(e){".."===e?n.length>1&&n.pop():"."!==e&&n.push(e)})),n.length>1?n.join("/"):"/"}(r,t):t;return{pathname:l,search:an(o),hash:un(u)}}(i,o),f=u&&"/"!==u&&u.endsWith("/"),d=(a||"."===u)&&n.endsWith("/");return s.pathname.endsWith("/")||!f&&!d||(s.pathname+="/"),s}var rn=function(e){return e.join("/").replace(/\/\/+/g,"/")},on=function(e){return e.replace(/\/+$/,"").replace(/^\/*/,"/")},an=function(e){return e&&"?"!==e?e.startsWith("?")?e:"?"+e:""},un=function(e){return e&&"#"!==e?e.startsWith("#")?e:"#"+e:""};Error;var ln=xt((function e(t,n,r){Dt(this,e),this.status=t,this.statusText=n||"",this.data=r}));function cn(e){return e instanceof ln}"undefined"!==typeof window&&"undefined"!==typeof window.document&&window.document.createElement;var sn=new Set(["POST","PUT","PATCH","DELETE"]);new Set(["GET","HEAD"].concat(bt(sn)));function fn(){return fn=Object.assign?Object.assign.bind():function(e){for(var t=1;t")))}var Nn,On,Tn=function(e){Ct(n,e);var t=Nt(n);function n(e){var r;return Dt(this,n),(r=t.call(this,e)).state={location:e.location,error:e.error},r}return xt(n,[{key:"componentDidCatch",value:function(e,t){console.error("React Router caught the following error during render",e,t)}},{key:"render",value:function(){return this.state.error?h(kn.Provider,{value:this.state.error,children:this.props.component}):this.props.children}}],[{key:"getDerivedStateFromError",value:function(e){return{error:e}}},{key:"getDerivedStateFromProps",value:function(e,t){return t.location!==e.location?{error:e.error,location:e.location}:{error:e.error||t.error,location:t.location}}}]),n}(y);function Bn(e){var t=e.routeContext,n=e.match,r=e.children,i=ue(gn);return i&&n.route.errorElement&&(i._deepestRenderedBoundaryId=n.route.id),h(xn.Provider,{value:t},r)}function Mn(e,t,n){if(void 0===t&&(t=[]),null==e){if(null==n||!n.errors)return null;e=n.matches}var r=e,i=null==n?void 0:n.errors;if(null!=i){var o=r.findIndex((function(e){return e.route.id&&(null==i?void 0:i[e.route.id])}));o>=0||Kt(!1),r=r.slice(0,Math.min(r.length,o+1))}return r.reduceRight((function(e,o,a){var u=o.route.id?null==i?void 0:i[o.route.id]:null,l=n?o.route.errorElement||h(Fn,null):null,c=function(){return h(Bn,{match:o,routeContext:{outlet:e,matches:t.concat(r.slice(0,a+1))}},u?l:void 0!==o.route.element?o.route.element:e)};return n&&(o.route.errorElement||0===a)?h(Tn,{location:n.location,component:l,error:u,children:c()}):c()}),null)}function Ln(e){var t=ue(bn);return t||Kt(!1),t}!function(e){e.UseRevalidator="useRevalidator"}(Nn||(Nn={})),function(e){e.UseLoaderData="useLoaderData",e.UseActionData="useActionData",e.UseRouteError="useRouteError",e.UseNavigation="useNavigation",e.UseRouteLoaderData="useRouteLoaderData",e.UseMatches="useMatches",e.UseRevalidator="useRevalidator"}(On||(On={}));var Pn;function In(e){return function(e){var t=ue(xn).outlet;return t?h(An.Provider,{value:e},t):t}(e.context)}function $n(e){Kt(!1)}function Rn(e){var t=e.basename,n=void 0===t?"/":t,r=e.children,i=void 0===r?null:r,o=e.location,a=e.navigationType,u=void 0===a?vt.Pop:a,l=e.navigator,c=e.static,s=void 0!==c&&c;Cn()&&Kt(!1);var f=n.replace(/^\/*/,"/"),d=oe((function(){return{basename:f,navigator:l,static:s}}),[f,l,s]);"string"===typeof o&&(o=jt(o));var p=o,v=p.pathname,m=void 0===v?"/":v,y=p.search,g=void 0===y?"":y,_=p.hash,b=void 0===_?"":_,D=p.state,w=void 0===D?null:D,x=p.key,k=void 0===x?"default":x,C=oe((function(){var e=Zt(m,f);return null==e?null:{pathname:e,search:g,hash:b,state:w,key:k}}),[f,m,g,b,w,k]);return null==C?null:h(Dn.Provider,{value:d},h(wn.Provider,{children:i,value:{location:C,navigationType:u}}))}function jn(e){var t=e.children,n=e.location,r=ue(_n);return function(e,t){Cn()||Kt(!1);var n,r=ue(bn),i=ue(xn).matches,o=i[i.length-1],a=o?o.params:{},u=(o&&o.pathname,o?o.pathnameBase:"/"),l=(o&&o.route,En());if(t){var c,s="string"===typeof t?jt(t):t;"/"===u||(null==(c=s.pathname)?void 0:c.startsWith(u))||Kt(!1),n=s}else n=l;var f=n.pathname||"/",d=Ht(e,{pathname:"/"===u?f:f.slice(u.length)||"/"}),p=Mn(d&&d.map((function(e){return Object.assign({},e,{params:Object.assign({},a,e.params),pathname:rn([u,e.pathname]),pathnameBase:"/"===e.pathnameBase?u:rn([u,e.pathnameBase])})})),i,r||void 0);return t&&p?h(wn.Provider,{value:{location:fn({pathname:"/",search:"",hash:"",state:null,key:"default"},n),navigationType:vt.Pop}},p):p}(r&&!t?r.router.routes:zn(t),n)}!function(e){e[e.pending=0]="pending",e[e.success=1]="success",e[e.error=2]="error"}(Pn||(Pn={}));new Promise((function(){}));function zn(e,t){void 0===t&&(t=[]);var n=[];return Se.forEach(e,(function(e,r){if(rt(e))if(e.type!==m){e.type!==$n&&Kt(!1),e.props.index&&e.props.children&&Kt(!1);var i=[].concat(bt(t),[r]),o={id:e.props.id||i.join("-"),caseSensitive:e.props.caseSensitive,element:e.props.element,index:e.props.index,path:e.props.path,loader:e.props.loader,action:e.props.action,errorElement:e.props.errorElement,hasErrorBoundary:null!=e.props.errorElement,shouldRevalidate:e.props.shouldRevalidate,handle:e.props.handle};e.props.children&&(o.children=zn(e.props.children,i)),n.push(o)}else n.push.apply(n,zn(e.props.children,t))})),n}function Un(e){var t=e.basename,n=e.children,r=e.window,i=re();null==i.current&&(i.current=function(e){return void 0===e&&(e={}),Ut((function(e,t){var n=jt(e.location.hash.substr(1)),r=n.pathname,i=void 0===r?"/":r,o=n.search,a=void 0===o?"":o,u=n.hash;return $t("",{pathname:i,search:a,hash:void 0===u?"":u},t.state&&t.state.usr||null,t.state&&t.state.key||"default")}),(function(e,t){var n=e.document.querySelector("base"),r="";if(n&&n.getAttribute("href")){var i=e.location.href,o=i.indexOf("#");r=-1===o?i:i.slice(0,o)}return r+"#"+("string"===typeof t?t:Rt(t))}),(function(e,t){Pt("/"===e.pathname.charAt(0),"relative pathnames are not supported in hash history.push("+JSON.stringify(t)+")")}),e)}({window:r,v5Compat:!0}));var o=i.current,a=_t(X({action:o.action,location:o.location}),2),u=a[0],l=a[1];return ne((function(){return o.listen(l)}),[o]),h(Rn,{basename:t,children:n,location:u.location,navigationType:u.action,navigator:o})}var Hn,Yn;(function(e){e.UseScrollRestoration="useScrollRestoration",e.UseSubmitImpl="useSubmitImpl",e.UseFetcher="useFetcher"})(Hn||(Hn={})),function(e){e.UseFetchers="useFetchers",e.UseScrollRestoration="useScrollRestoration"}(Yn||(Yn={}));var Vn;function qn(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}var Wn={home:"/",dashboards:"/dashboards",cardinality:"/cardinality",topQueries:"/top-queries",trace:"/trace"},Qn={header:{timeSelector:!0,executionControls:!0,globalSettings:!0}},Gn=(qn(Vn={},Wn.home,Qn),qn(Vn,Wn.dashboards,Qn),qn(Vn,Wn.cardinality,{header:{cardinalityDatePicker:!0,globalSettings:!0}}),Vn),Jn=Wn;function Zn(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}function Kn(e){for(var t=1;t2&&void 0!==arguments[2]?arguments[2]:window.location.search,r=nr().parse(n,{ignoreQueryPrefix:!0});return ir()(r,e,t||"")},lr={serverUrl:Xn().serverURL||window.location.href.replace(/\/(?:prometheus\/)?(?:graph|vmui)\/.*/,"/prometheus"),tenantId:Number(ur("g0.tenantID",0))};function cr(e,t){switch(t.type){case"SET_SERVER":return Kn(Kn({},e),{},{serverUrl:t.payload});case"SET_TENANT_ID":return Kn(Kn({},e),{},{tenantId:t.payload});default:throw new Error}}var sr=0;function fr(e,t,n,i,o){var a,u,l={};for(u in t)"ref"==u?a=t[u]:l[u]=t[u];var c={type:e,props:l,key:n,ref:a,__k:null,__:null,__b:0,__e:null,__d:void 0,__c:null,__h:null,constructor:void 0,__v:--sr,__source:o,__self:i};if("function"==typeof e&&(a=e.defaultProps))for(u in a)void 0===l[u]&&(l[u]=a[u]);return r.vnode&&r.vnode(c),c}var dr=R({}),hr=function(){return ue(dr).state},pr=function(){return ue(dr).dispatch},vr=Object.entries(lr).reduce((function(e,t){var n=_t(t,2),r=n[0],i=n[1];return Kn(Kn({},e),{},qn({},r,ur(r)||i))}),{}),mr=n(658),yr=n.n(mr),gr=n(446),_r=n.n(gr),br=n(635),Dr=n.n(br),wr="YYYY-MM-DD",xr="YYYY-MM-DD HH:mm:ss",kr="YYYY-MM-DD[T]HH:mm:ss";yr().extend(_r()),yr().extend(Dr());var Cr,Er=window.innerWidth/4,Sr=1,Ar=1578e8,Fr=[{long:"days",short:"d",possible:"day"},{long:"weeks",short:"w",possible:"week"},{long:"months",short:"M",possible:"mon"},{long:"years",short:"y",possible:"year"},{long:"hours",short:"h",possible:"hour"},{long:"minutes",short:"m",possible:"min"},{long:"seconds",short:"s",possible:"sec"},{long:"milliseconds",short:"ms",possible:"millisecond"}].map((function(e){return e.short})),Nr=function(e){return Math.round(1e3*e)/1e3},Or=function(e){var t=e.match(/\d+/g),n=e.match(/[a-zA-Z]+/g);if(n&&t&&Fr.includes(n[0]))return qn({},n[0],t[0])},Tr=function(e,t){var n=(t||new Date).valueOf()/1e3,r=e.trim().split(" ").reduce((function(e,t){var n=Or(t);return n?Kn(Kn({},e),n):Kn({},e)}),{}),i=yr().duration(r).asSeconds();return{start:n-i,end:n,step:Nr(i/Er)||.001,date:Br(t||new Date)}},Br=function(e){return yr()(e).utc().format(kr)},Mr=function(e){return yr()(e).format(kr)},Lr=function(e){var t=Math.floor(e%1e3),n=Math.floor(e/1e3%60),r=Math.floor(e/1e3/60%60),i=Math.floor(e/1e3/3600%24),o=Math.floor(e/864e5),a=["d","h","m","s","ms"],u=[o,i,r,n,t].map((function(e,t){return e?"".concat(e).concat(a[t]):""}));return u.filter((function(e){return e})).join(" ")},Pr=function(e){return new Date(1e3*e)},Ir=[{title:"Last 5 minutes",duration:"5m"},{title:"Last 15 minutes",duration:"15m"},{title:"Last 30 minutes",duration:"30m",isDefault:!0},{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:function(){return yr()().subtract(1,"day").endOf("day").toDate()}},{title:"Today",duration:"1d",until:function(){return yr()().endOf("day").toDate()}}].map((function(e){return Kn({id:e.title.replace(/\s/g,"_").toLocaleLowerCase(),until:e.until?e.until:function(){return yr()().toDate()}},e)})),$r=function(e){var t,n=e.relativeTimeId,r=e.defaultDuration,i=e.defaultEndInput,o=null===(t=Ir.find((function(e){return e.isDefault})))||void 0===t?void 0:t.id,a=n||ur("g0.relative_time",o),u=Ir.find((function(e){return e.id===a}));return{relativeTimeId:u?a:"none",duration:u?u.duration:r,endInput:u?u.until():i}},Rr=ur("g0.range_input"),jr=$r({defaultDuration:Rr||"1h",defaultEndInput:new Date((Cr=ur("g0.end_input",new Date(yr()().utc().format(kr))),yr()(Cr).utcOffset(0,!0).local().format(kr))),relativeTimeId:Rr?ur("g0.relative_time","none"):void 0}),zr=jr.duration,Ur=jr.endInput,Hr=jr.relativeTimeId,Yr={duration:zr,period:Tr(zr,Ur),relativeTime:Hr};function Vr(e,t){switch(t.type){case"SET_DURATION":return Kn(Kn({},e),{},{duration:t.payload,period:Tr(t.payload,Pr(e.period.end)),relativeTime:"none"});case"SET_RELATIVE_TIME":return Kn(Kn({},e),{},{duration:t.payload.duration,period:Tr(t.payload.duration,new Date(t.payload.until)),relativeTime:t.payload.id});case"SET_PERIOD":var n=function(e){var t=e.to.valueOf()-e.from.valueOf();return Lr(t)}(t.payload);return Kn(Kn({},e),{},{duration:n,period:Tr(n,t.payload.to),relativeTime:"none"});case"RUN_QUERY":var r=$r({relativeTimeId:e.relativeTime,defaultDuration:e.duration,defaultEndInput:Pr(e.period.end)}),i=r.duration,o=r.endInput;return Kn(Kn({},e),{},{period:Tr(i,o)});case"RUN_QUERY_TO_NOW":return Kn(Kn({},e),{},{period:Tr(e.duration)});default:throw new Error}}var qr=R({}),Wr=function(){return ue(qr).state},Qr=function(){return ue(qr).dispatch},Gr=function(e,t){t?window.localStorage.setItem(e,JSON.stringify({value:t})):Zr([e])},Jr=function(e){var 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(c){return t}},Zr=function(e){return e.forEach((function(e){return window.localStorage.removeItem(e)}))},Kr=function(){var e,t=(null===(e=window.location.search.match(/g\d+.expr/gim))||void 0===e?void 0:e.length)||1;return new Array(t>4?4:t).fill(1).map((function(e,t){return ur("g".concat(t,".expr"),"")}))}(),Xr={query:Kr,queryHistory:Kr.map((function(e){return{index:0,values:[e]}})),autocomplete:Jr("AUTOCOMPLETE")||!1};function ei(e,t){switch(t.type){case"SET_QUERY":return Kn(Kn({},e),{},{query:t.payload.map((function(e){return e}))});case"SET_QUERY_HISTORY":return Kn(Kn({},e),{},{queryHistory:t.payload});case"SET_QUERY_HISTORY_BY_INDEX":return e.queryHistory.splice(t.payload.queryNumber,1,t.payload.value),Kn(Kn({},e),{},{queryHistory:e.queryHistory});case"TOGGLE_AUTOCOMPLETE":return Gr("AUTOCOMPLETE",!e.autocomplete),Kn(Kn({},e),{},{autocomplete:!e.autocomplete});default:throw new Error}}var ti=R({}),ni=function(){return ue(ti).state},ri=function(){return ue(ti).dispatch},ii=function(){return fr("svg",{viewBox:"0 0 74 24",fill:"currentColor",children:[fr("path",{d:"M6.11771 9.47563C6.4774 9.7554 6.91935 9.90875 7.37507 9.9119H7.42685C7.9076 9.90451 8.38836 9.71964 8.67681 9.46823C10.1856 8.18898 14.5568 4.18115 14.5568 4.18115C15.7254 3.09415 12.4637 2.00716 7.42685 1.99977H7.36768C2.33084 2.00716 -0.930893 3.09415 0.237711 4.18115C0.237711 4.18115 4.60888 8.18898 6.11771 9.47563ZM8.67681 11.6422C8.31807 11.9246 7.87603 12.0806 7.41945 12.0859H7.37507C6.91849 12.0806 6.47645 11.9246 6.11771 11.6422C5.08224 10.7549 1.38413 7.41995 0.00103198 6.14809V8.07806C0.00103198 8.2925 0.0823905 8.57349 0.222919 8.70659L0.293358 8.77097L0.293386 8.77099C1.33788 9.72556 4.83907 12.9253 6.11771 14.0159C6.47645 14.2983 6.91849 14.4543 7.37507 14.4595H7.41945C7.9076 14.4447 8.38096 14.2599 8.67681 14.0159C9.98594 12.9067 13.6249 9.57175 14.5642 8.70659C14.7121 8.57349 14.7861 8.2925 14.7861 8.07806V6.14809C12.7662 7.99781 10.7297 9.82926 8.67681 11.6422ZM7.41945 16.6261C7.87517 16.623 8.31712 16.4696 8.67681 16.1898C10.7298 14.3744 12.7663 12.5405 14.7861 10.6883V12.6257C14.7861 12.8327 14.7121 13.1137 14.5642 13.2468C13.6249 14.1194 9.98594 17.4469 8.67681 18.5561C8.38096 18.8075 7.9076 18.9924 7.41945 18.9998H7.37507C6.91935 18.9966 6.4774 18.8433 6.11771 18.5635C4.91431 17.5371 1.74223 14.6362 0.502336 13.5023C0.3934 13.4027 0.299379 13.3167 0.222919 13.2468C0.0823905 13.1137 0.00103198 12.8327 0.00103198 12.6257V10.6883C1.38413 11.9528 5.08224 15.2951 6.11771 16.1825C6.47645 16.4649 6.91849 16.6209 7.37507 16.6261H7.41945Z",fill:"currentColor"}),fr("path",{d:"M35 3.54L29.16 18H26.73L20.89 3.54H23.05C23.2833 3.54 23.4733 3.59667 23.62 3.71C23.7667 3.82333 23.8767 3.97 23.95 4.15L27.36 12.97C27.4733 13.2567 27.58 13.5733 27.68 13.92C27.7867 14.26 27.8867 14.6167 27.98 14.99C28.06 14.6167 28.1467 14.26 28.24 13.92C28.3333 13.5733 28.4367 13.2567 28.55 12.97L31.94 4.15C31.9933 3.99667 32.0967 3.85667 32.25 3.73C32.41 3.60333 32.6033 3.54 32.83 3.54H35ZM52.1767 3.54V18H49.8067V8.66C49.8067 8.28667 49.8267 7.88333 49.8667 7.45L45.4967 15.66C45.2901 16.0533 44.9734 16.25 44.5467 16.25H44.1667C43.7401 16.25 43.4234 16.0533 43.2167 15.66L38.7967 7.42C38.8167 7.64 38.8334 7.85667 38.8467 8.07C38.8601 8.28333 38.8667 8.48 38.8667 8.66V18H36.4967V3.54H38.5267C38.6467 3.54 38.7501 3.54333 38.8367 3.55C38.9234 3.55667 39.0001 3.57333 39.0667 3.6C39.1401 3.62667 39.2034 3.67 39.2567 3.73C39.3167 3.79 39.3734 3.87 39.4267 3.97L43.7567 12C43.8701 12.2133 43.9734 12.4333 44.0667 12.66C44.1667 12.8867 44.2634 13.12 44.3567 13.36C44.4501 13.1133 44.5467 12.8767 44.6467 12.65C44.7467 12.4167 44.8534 12.1933 44.9667 11.98L49.2367 3.97C49.2901 3.87 49.3467 3.79 49.4067 3.73C49.4667 3.67 49.5301 3.62667 49.5967 3.6C49.6701 3.57333 49.7501 3.55667 49.8367 3.55C49.9234 3.54333 50.0267 3.54 50.1467 3.54H52.1767ZM61.063 17.27C61.743 17.27 62.3496 17.1533 62.883 16.92C63.423 16.68 63.8796 16.35 64.253 15.93C64.6263 15.51 64.9096 15.0167 65.103 14.45C65.303 13.8767 65.403 13.26 65.403 12.6V3.85H66.423V12.6C66.423 13.38 66.2996 14.11 66.053 14.79C65.8063 15.4633 65.4496 16.0533 64.983 16.56C64.523 17.06 63.9596 17.4533 63.293 17.74C62.633 18.0267 61.8896 18.17 61.063 18.17C60.2363 18.17 59.4896 18.0267 58.823 17.74C58.163 17.4533 57.5996 17.06 57.133 16.56C56.673 16.0533 56.3196 15.4633 56.073 14.79C55.8263 14.11 55.703 13.38 55.703 12.6V3.85H56.733V12.59C56.733 13.25 56.8296 13.8667 57.023 14.44C57.223 15.0067 57.5063 15.5 57.873 15.92C58.2463 16.34 58.6996 16.67 59.233 16.91C59.773 17.15 60.383 17.27 61.063 17.27ZM71.4442 18H70.4142V3.85H71.4442V18Z",fill:"currentColor"})]})},oi=function(){return fr("svg",{viewBox:"0 0 24 24",fill:"currentColor",children:fr("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"})})},ai=function(){return fr("svg",{viewBox:"0 0 24 24",fill:"currentColor",children:fr("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"})})},ui=function(){return fr("svg",{viewBox:"0 0 24 24",fill:"currentColor",children:fr("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"})})},li=function(){return fr("svg",{viewBox:"0 0 24 24",fill:"currentColor",children:fr("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"})})},ci=function(){return fr("svg",{viewBox:"0 0 24 24",fill:"currentColor",children:fr("path",{d:"M1 21h22L12 2 1 21zm12-3h-2v-2h2v2zm0-4h-2v-4h2v4z"})})},si=function(){return fr("svg",{viewBox:"0 0 24 24",fill:"currentColor",children:fr("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"})})},fi=function(){return fr("svg",{viewBox:"0 0 24 24",fill:"currentColor",children:fr("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"})})},di=function(){return fr("svg",{viewBox:"0 0 24 24",fill:"currentColor",children:fr("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"})})},hi=function(){return fr("svg",{viewBox:"0 0 24 24",fill:"currentColor",children:fr("path",{d:"M7.41 8.59 12 13.17l4.59-4.58L18 10l-6 6-6-6 1.41-1.41z"})})},pi=function(){return fr("svg",{viewBox:"0 0 24 24",fill:"currentColor",children:fr("path",{d:"m12 8-6 6 1.41 1.41L12 10.83l4.59 4.58L18 14z"})})},vi=function(){return fr("svg",{viewBox:"0 0 24 24",fill:"currentColor",children:fr("path",{d:"m7 10 5 5 5-5z"})})},mi=function(){return fr("svg",{viewBox:"0 0 24 24",fill:"currentColor",children:[fr("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"}),fr("path",{d:"M12.5 7H11v6l5.25 3.15.75-1.23-4.5-2.67z"})]})},yi=function(){return fr("svg",{viewBox:"0 0 24 24",fill:"currentColor",children:fr("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"})})},gi=function(){return fr("svg",{viewBox:"0 0 24 24",fill:"currentColor",children:fr("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"})})},_i=function(){return fr("svg",{viewBox:"0 0 24 24",fill:"currentColor",children:fr("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"})})},bi=function(){return fr("svg",{viewBox:"0 0 24 24",fill:"currentColor",children:fr("path",{d:"M8 5v14l11-7z"})})},Di=function(){return fr("svg",{viewBox:"0 0 24 24",fill:"currentColor",children:fr("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"})})},wi=function(){return fr("svg",{viewBox:"0 0 24 24",fill:"currentColor",children:fr("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"})})},xi=function(){return fr("svg",{viewBox:"0 0 24 24",fill:"currentColor",children:fr("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"})})},ki=function(){return fr("svg",{viewBox:"0 0 24 24",fill:"currentColor",children:fr("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"})})},Ci=function(){return fr("svg",{viewBox:"0 0 24 24",fill:"currentColor",children:fr("path",{d:"M6 19c0 1.1.9 2 2 2h8c1.1 0 2-.9 2-2V7H6v12zM19 4h-3.5l-1-1h-5l-1 1H5v2h14V4z"})})},Ei=function(){return fr("svg",{viewBox:"0 0 24 24",fill:"currentColor",children:fr("path",{d:"M19 13h-6v6h-2v-6H5v-2h6V5h2v6h6v2z"})})},Si=function(){return fr("svg",{viewBox:"0 0 24 24",fill:"currentColor",children:fr("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"})})},Ai=function(){return fr("svg",{viewBox:"0 0 24 24",fill:"currentColor",children:fr("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"})})},Fi=function(){return fr("svg",{viewBox:"0 0 24 24",fill:"currentColor",children:fr("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"})})},Ni=function(){return fr("svg",{viewBox:"0 0 24 24",fill:"currentColor",children:fr("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"})})},Oi=function(){return fr("svg",{viewBox:"0 0 24 24",fill:"currentColor",children:fr("path",{d:"M20 9H4v2h16V9zM4 15h16v-2H4v2z"})})},Ti=n(123),Bi=n.n(Ti),Mi=function(e){return getComputedStyle(document.documentElement).getPropertyValue("--".concat(e))},Li=function(e,t){document.documentElement.style.setProperty("--".concat(e),t)},Pi=function(e){var t=e.activeItem,n=e.items,r=e.color,i=void 0===r?Mi("color-primary"):r,o=e.onChange,a=e.indicatorPlacement,u=void 0===a?"bottom":a,l=re(null),c=_t(X({left:0,width:0,bottom:0}),2),s=c[0],f=c[1];return te((function(){if(l.current){var e=l.current,t=e.offsetLeft,n=e.offsetWidth,r=e.offsetHeight;f({left:t,width:n,bottom:"top"===u?r-2:0})}}),[t,l,n]),fr("div",{className:"vm-tabs",children:[n.map((function(e){return fr("div",{className:Bi()(qn({"vm-tabs-item":!0,"vm-tabs-item_active":t===e.value},e.className||"",e.className)),ref:t===e.value?l:void 0,style:{color:i},onClick:(n=e.value,function(){o(n)}),children:[e.icon&&fr("div",{className:Bi()({"vm-tabs-item__icon":!0,"vm-tabs-item__icon_single":!e.label}),children:e.icon}),e.label]},e.value);var n})),fr("div",{className:"vm-tabs__indicator",style:Kn(Kn({},s),{},{borderColor:i})})]})},Ii=[{value:"chart",icon:fr(wi,{}),label:"Graph",prometheusCode:0},{value:"code",icon:fr(ki,{}),label:"JSON",prometheusCode:3},{value:"table",icon:fr(xi,{}),label:"Table",prometheusCode:1}],$i=function(){var e=Vi().displayType,t=qi();return fr(Pi,{activeItem:e,items:Ii,onChange:function(n){var r;t({type:"SET_DISPLAY_TYPE",payload:null!==(r=n)&&void 0!==r?r:e})}})},Ri=ur("g0.tab",0),ji=Ii.find((function(e){return e.prometheusCode===+Ri||e.value===Ri})),zi=Jr("SERIES_LIMITS"),Ui={displayType:(null===ji||void 0===ji?void 0:ji.value)||"chart",nocache:!1,isTracingEnabled:!1,seriesLimits:zi?JSON.parse(Jr("SERIES_LIMITS")):or,tableCompact:Jr("TABLE_COMPACT")||!1};function Hi(e,t){switch(t.type){case"SET_DISPLAY_TYPE":return Kn(Kn({},e),{},{displayType:t.payload});case"SET_SERIES_LIMITS":return Gr("SERIES_LIMITS",JSON.stringify(t.payload)),Kn(Kn({},e),{},{seriesLimits:t.payload});case"TOGGLE_QUERY_TRACING":return Kn(Kn({},e),{},{isTracingEnabled:!e.isTracingEnabled});case"TOGGLE_NO_CACHE":return Kn(Kn({},e),{},{nocache:!e.nocache});case"TOGGLE_TABLE_COMPACT":return Gr("TABLE_COMPACT",!e.tableCompact),Kn(Kn({},e),{},{tableCompact:!e.tableCompact});default:throw new Error}}var Yi=R({}),Vi=function(){return ue(Yi).state},qi=function(){return ue(Yi).dispatch},Wi={customStep:parseFloat(ur("g0.step_input","0")),yaxis:{limits:{enable:!1,range:{1:[0,0]}}}};function Qi(e,t){switch(t.type){case"TOGGLE_ENABLE_YAXIS_LIMITS":return Kn(Kn({},e),{},{yaxis:Kn(Kn({},e.yaxis),{},{limits:Kn(Kn({},e.yaxis.limits),{},{enable:!e.yaxis.limits.enable})})});case"SET_CUSTOM_STEP":return Kn(Kn({},e),{},{customStep:t.payload});case"SET_YAXIS_LIMITS":return Kn(Kn({},e),{},{yaxis:Kn(Kn({},e.yaxis),{},{limits:Kn(Kn({},e.yaxis.limits),{},{range:t.payload})})});default:throw new Error}}var Gi=R({}),Ji=function(){return ue(Gi).dispatch},Zi={runQuery:0,topN:ur("topN",10),date:ur("date",yr()(new Date).format(wr)),focusLabel:ur("focusLabel",""),match:ur("match",""),extraLabel:ur("extra_label","")};function Ki(e,t){switch(t.type){case"SET_TOP_N":return Kn(Kn({},e),{},{topN:t.payload});case"SET_DATE":return Kn(Kn({},e),{},{date:t.payload});case"SET_MATCH":return Kn(Kn({},e),{},{match:t.payload});case"SET_EXTRA_LABEL":return Kn(Kn({},e),{},{extraLabel:t.payload});case"SET_FOCUS_LABEL":return Kn(Kn({},e),{},{focusLabel:t.payload});case"RUN_QUERY":return Kn(Kn({},e),{},{runQuery:e.runQuery+1});default:throw new Error}}var Xi=R({}),eo=function(){return ue(Xi).state},to=function(){return ue(Xi).dispatch},no={topN:ur("topN",null),maxLifetime:ur("maxLifetime",""),runQuery:0};function ro(e,t){switch(t.type){case"SET_TOP_N":return Kn(Kn({},e),{},{topN:t.payload});case"SET_MAX_LIFE_TIME":return Kn(Kn({},e),{},{maxLifetime:t.payload});case"SET_RUN_QUERY":return Kn(Kn({},e),{},{runQuery:e.runQuery+1});default:throw new Error}}var io,oo=R({}),ao=function(){return ue(oo).state},uo={success:fr(fi,{}),error:fr(si,{}),warning:fr(ci,{}),info:fr(li,{})},lo=function(e){var t=e.variant,n=e.children;return fr("div",{className:Bi()(qn({"vm-alert":!0},"vm-alert_".concat(t),t)),children:[fr("div",{className:"vm-alert__icon",children:uo[t||"info"]}),fr("div",{className:"vm-alert__content",children:n})]})},co=R({showInfoMessage:function(){}}),so=function(){return ue(co)},fo=function(){for(var e=arguments.length,t=new Array(e),n=0;nd,v=r.top-20<0,m=r.left+g.width+20>f,y=r.left-20<0;return h&&(r.top=t.top-g.height-u),v&&(r.top=t.height+t.top+u),m&&(r.left=t.right-g.width-l),y&&(r.left=t.left+l),r}),[n,i,p,t]);d&&po(b,(function(){return v(!1)}),n);var x=Bi()(qn({"vm-popper":!0,"vm-popper_open":p},"vm-popper_open_".concat(l),l));return fr(m,{children:p&&mt.createPortal(fr("div",{className:x,ref:b,style:w,children:t}),document.body)})},mo=function(e){var t=e.children,n=e.title,r=e.open,i=e.placement,o=void 0===i?"bottom-center":i,a=e.offset,u=void 0===a?{top:6,left:0}:a,l=_t(X(!1),2),c=l[0],s=l[1],f=_t(X({width:0,height:0}),2),d=f[0],h=f[1],p=re(null),v=re(null),y=function(){return s(!1)};te((function(){return window.addEventListener("scroll",y),function(){window.removeEventListener("scroll",y)}}),[]),te((function(){v.current&&c&&h({width:v.current.clientWidth,height:v.current.clientHeight})}),[c]);var g=oe((function(){var e,t=null===p||void 0===p||null===(e=p.current)||void 0===e?void 0:e.base;if(!t||!c)return{};var n=t.getBoundingClientRect(),r={top:0,left:0},i="bottom-right"===o||"top-right"===o,a="bottom-left"===o||"top-left"===o,l=null===o||void 0===o?void 0:o.includes("top"),s=(null===u||void 0===u?void 0:u.top)||0,f=(null===u||void 0===u?void 0:u.left)||0;r.left=n.left-(d.width-n.width)/2+f,r.top=n.height+n.top+s,i&&(r.left=n.right-d.width),a&&(r.left=n.left+f),l&&(r.top=n.top-d.height-s);var h=window,v=h.innerWidth,m=h.innerHeight,y=r.top+d.height+20>m,g=r.top-20<0,_=r.left+d.width+20>v,b=r.left-20<0;return y&&(r.top=n.top-d.height-s),g&&(r.top=n.height+n.top+s),_&&(r.left=n.right-d.width-f),b&&(r.left=n.left+f),r.top<0&&(r.top=20),r.left<0&&(r.left=20),r}),[p,o,c,d]),_=function(){"boolean"!==typeof r&&s(!0)},b=function(){s(!1)};return te((function(){"boolean"===typeof r&&s(r)}),[r]),te((function(){var e,t=null===p||void 0===p||null===(e=p.current)||void 0===e?void 0:e.base;if(t)return t.addEventListener("mouseenter",_),t.addEventListener("mouseleave",b),function(){t.removeEventListener("mouseenter",_),t.removeEventListener("mouseleave",b)}}),[p]),fr(m,{children:[fr(m,{ref:p,children:t}),c&&mt.createPortal(fr("div",{className:"vm-tooltip",ref:v,style:g,children:n}),document.body)]})},yo=[{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"}],go=function(){var e=Qr(),t=er(),n=_t(X(!1),2),r=n[0],i=n[1],o=_t(X(yo[0]),2),a=o[0],u=o[1];te((function(){var t,n=a.seconds;return r?t=setInterval((function(){e({type:"RUN_QUERY"})}),1e3*n):u(yo[0]),function(){t&&clearInterval(t)}}),[a,r]);var l=_t(X(!1),2),c=l[0],s=l[1],f=re(null),d=function(e){return function(){!function(e){(r&&!e.seconds||!r&&e.seconds)&&i((function(e){return!e})),u(e),s(!1)}(e)}};return fr(m,{children:[fr("div",{className:"vm-execution-controls",children:fr("div",{className:Bi()({"vm-execution-controls-buttons":!0,"vm-header-button":!t}),children:[fr(mo,{title:"Refresh dashboard",children:fr(ho,{variant:"contained",color:"primary",onClick:function(){e({type:"RUN_QUERY"})},startIcon:fr(di,{})})}),fr(mo,{title:"Auto-refresh control",children:fr("div",{ref:f,children:fr(ho,{variant:"contained",color:"primary",fullWidth:!0,endIcon:fr("div",{className:Bi()({"vm-execution-controls-buttons__arrow":!0,"vm-execution-controls-buttons__arrow_open":c}),children:fr(hi,{})}),onClick:function(){s((function(e){return!e}))},children:a.title})})})]})}),fr(vo,{open:c,placement:"bottom-right",onClose:function(){s(!1)},buttonRef:f,children:fr("div",{className:"vm-execution-controls-list",children:yo.map((function(e){return fr("div",{className:Bi()({"vm-list__item":!0,"vm-list__item_active":e.seconds===a.seconds}),onClick:d(e),children:e.title},e.seconds)}))})})]})},_o=function(e){var t=e.relativeTime,n=e.setDuration;return fr("div",{className:"vm-time-duration",children:Ir.map((function(e){var r,i=e.id,o=e.duration,a=e.until,u=e.title;return fr("div",{className:Bi()({"vm-list__item":!0,"vm-list__item_active":i===t}),onClick:(r={duration:o,until:a(),id:i},function(){n(r)}),children:u||o},i)}))})},bo=function(e){var t=_t(X({width:0,height:0}),2),n=t[0],r=t[1];return te((function(){var t=new ResizeObserver((function(e){var t=e[0].contentRect,n=t.width,i=t.height;r({width:n,height:i})}));return e&&t.observe(e),function(){e&&t.unobserve(e)}}),[]),n},Do=function(e){var t=e.viewDate,n=e.displayYears,r=e.onChangeViewDate;return fr("div",{className:"vm-calendar-header",children:[fr("div",{className:"vm-calendar-header-left",onClick:e.toggleDisplayYears,children:[fr("span",{className:"vm-calendar-header-left__date",children:t.format("MMMM YYYY")}),fr("div",{className:"vm-calendar-header-left__select-year",children:fr(vi,{})})]}),!n&&fr("div",{className:"vm-calendar-header-right",children:[fr("div",{className:"vm-calendar-header-right__prev",onClick:function(){r(t.subtract(1,"month"))},children:fr(hi,{})}),fr("div",{className:"vm-calendar-header-right__next",onClick:function(){r(t.add(1,"month"))},children:fr(hi,{})})]})]})},wo=["Sunday","Monday","Tuesday","Wednesday","Thursday","Friday","Saturday"],xo=function(e){var t=e.viewDate,n=e.selectDate,r=e.onChangeSelectDate,i=yr()().startOf("day"),o=oe((function(){var e=new Array(42).fill(null),n=t.startOf("month"),r=t.endOf("month").diff(n,"day")+1,i=new Array(r).fill(n).map((function(e,t){return e.add(t,"day")})),o=n.day();return e.splice.apply(e,[o,r].concat(bt(i))),e}),[t]),a=function(e){return function(){e&&r(e)}};return fr("div",{className:"vm-calendar-body",children:[wo.map((function(e){return fr("div",{className:"vm-calendar-body-cell vm-calendar-body-cell_weekday",children:e[0]},e)})),o.map((function(e,t){return fr("div",{className:Bi()({"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.toISOString())===n.startOf("day").toISOString(),"vm-calendar-body-cell_day_today":(e&&e.toISOString())===i.toISOString()}),onClick:a(e),children:e&&e.format("D")},e?e.toISOString():t)}))]})},ko=function(e){var t=e.viewDate,n=e.onChangeViewDate,r=oe((function(){return t.format("YYYY")}),[t]),i=oe((function(){var e=yr()().subtract(103,"year");return new Array(206).fill(e).map((function(e,t){return e.add(t,"year")}))}),[t]);te((function(){var e=document.getElementById("vm-calendar-year-".concat(r));e&&e.scrollIntoView({block:"center"})}),[]);return fr("div",{className:"vm-calendar-years",children:i.map((function(e){return fr("div",{className:Bi()({"vm-calendar-years__year":!0,"vm-calendar-years__year_selected":e.format("YYYY")===r}),id:"vm-calendar-year-".concat(e.format("YYYY")),onClick:(t=e,function(){n(t)}),children:e.format("YYYY")},e.format("YYYY"));var t}))})};!function(e){e[e.hour=0]="hour",e[e.minutes=1]="minutes",e[e.seconds=2]="seconds"}(io||(io={}));var Co,Eo=function(e){var t=e.selectDate,n=e.onChangeTime,r=e.onClose,i=_t(X(io.hour),2),o=i[0],a=i[1],u=_t(X(t.format("HH")),2),l=u[0],c=u[1],s=_t(X(t.format("mm")),2),f=s[0],d=s[1],h=_t(X(t.format("ss")),2),p=h[0],v=h[1],m=oe((function(){return o===io.hour?new Array(24).fill("00").map((function(e,t){return{value:t,degrees:t/12*360,offset:0===t||t>12,title:t?"".concat(t):e}})):new Array(60).fill("00").map((function(e,t){return{value:t,degrees:t/60*360,offset:!1,title:t?"".concat(t):e}}))}),[o,l,f,p]),y=oe((function(){switch(o){case io.hour:return+l/12*360;case io.minutes:return+f/60*360;case io.seconds:return+p/60*360}}),[o,l,f,p]),g=re(null),_=re(null),b=re(null),D=function(e){return function(t){!function(e,t){t.target.select(),a(e)}(e,t)}};return te((function(){n("".concat(l,":").concat(f,":").concat(p))}),[l,f,p]),te((function(){c(t.format("HH")),d(t.format("mm")),v(t.format("ss"))}),[t]),te((function(){g.current&&g.current.focus()}),[]),fr("div",{className:"vm-calendar-time-picker",children:[fr("div",{className:"vm-calendar-time-picker-clock",children:[fr("div",{className:Bi()({"vm-calendar-time-picker-clock__arrow":!0,"vm-calendar-time-picker-clock__arrow_offset":o===io.hour&&("00"===l||+l>12)}),style:{transform:"rotate(".concat(y,"deg)")}}),m.map((function(e){return fr("div",{className:Bi()({"vm-calendar-time-picker-clock__time":!0,"vm-calendar-time-picker-clock__time_offset":e.offset,"vm-calendar-time-picker-clock__time_hide":m.length>24&&e.value%5}),style:{transform:"rotate(".concat(e.degrees,"deg)")},onClick:(t=e.value,function(){var e=String(t);switch(o){case io.hour:c(e),_.current&&_.current.focus();break;case io.minutes:d(e),b.current&&b.current.focus();break;case io.seconds:v(e),r()}}),children:fr("span",{style:{transform:"rotate(-".concat(e.degrees,"deg)")},children:e.title})},e.value);var t}))]}),fr("div",{className:"vm-calendar-time-picker-fields",children:[fr("input",{className:"vm-calendar-time-picker-fields__input",value:l,onChange:function(e){var t=e.target,n=t.value,r=+n>23?"23":n;t.value=r,c(r),n.length>1&&_.current&&_.current.focus()},onFocus:D(io.hour),ref:g,type:"number",min:0,max:24}),fr("span",{children:":"}),fr("input",{className:"vm-calendar-time-picker-fields__input",value:f,onChange:function(e){var t=e.target,n=t.value,r=+n>59?"59":n;t.value=r,d(r),n.length>1&&b.current&&b.current.focus()},onFocus:D(io.minutes),ref:_,type:"number",min:0,max:60}),fr("span",{children:":"}),fr("input",{className:"vm-calendar-time-picker-fields__input",value:p,onChange:function(e){var t=e.target,n=t.value,i=+n>59?"59":n;t.value=i,v(i),n.length>1&&b.current&&r()},onFocus:D(io.seconds),ref:b,type:"number",min:0,max:60})]})]})},So=[{value:"date",icon:fr(yi,{})},{value:"time",icon:fr(mi,{})}],Ao=function(e){var t=e.date,n=e.timepicker,r=void 0!==n&&n,i=e.format,o=void 0===i?xr:i,a=e.onChange,u=e.onClose,l=_t(X(!1),2),c=l[0],s=l[1],f=_t(X(yr()(t)),2),d=f[0],h=f[1],p=_t(X(yr()(t)),2),v=p[0],y=p[1],g=_t(X(So[0].value),2),_=g[0],b=g[1],D=function(e){h(e),s(!1)};return te((function(){v.format()!==yr()(t).format()&&a(v.format(o))}),[v]),fr("div",{className:"vm-calendar",children:["date"===_&&fr(Do,{viewDate:d,onChangeViewDate:D,toggleDisplayYears:function(){s((function(e){return!e}))},displayYears:c}),"date"===_&&fr(m,{children:[!c&&fr(xo,{viewDate:d,selectDate:v,onChangeSelectDate:function(e){y(e),r&&b("time")}}),c&&fr(ko,{viewDate:d,onChangeViewDate:D})]}),"time"===_&&fr(Eo,{selectDate:v,onChangeTime:function(e){var t=_t(e.split(":"),3),n=t[0],r=t[1],i=t[2];y((function(e){return e.set("hour",+n).set("minute",+r).set("second",+i)}))},onClose:function(){u&&u()}}),r&&fr("div",{className:"vm-calendar__tabs",children:fr(Pi,{activeItem:_,items:So,onChange:function(e){b(e)},indicatorPlacement:"top"})})]})},Fo=Ce((function(e,t){var n=e.date,r=e.targetRef,i=e.format,o=void 0===i?xr:i,a=e.timepicker,u=e.onChange,l=_t(X(!1),2),c=l[0],s=l[1],f=oe((function(){return n?yr()(n):yr()()}),[n]),d=function(){s((function(e){return!e}))},h=function(){s(!1)},p=function(e){"Escape"!==e.key&&"Enter"!==e.key||h()};return te((function(){var e;return null===(e=r.current)||void 0===e||e.addEventListener("click",d),function(){var e;null===(e=r.current)||void 0===e||e.removeEventListener("click",d)}}),[r]),te((function(){return window.addEventListener("keyup",p),function(){window.removeEventListener("keyup",p)}}),[]),fr(m,{children:fr(vo,{open:c,buttonRef:r,placement:"bottom-right",onClose:h,children:fr("div",{ref:t,children:fr(Ao,{date:f,format:o,timepicker:a,onChange:function(e){a||h(),u(e)},onClose:h})})})})})),No=Fo,Oo=function(){var e=re(null),t=bo(document.body),n=oe((function(){return t.width>1120}),[t]),r=_t(X(),2),i=r[0],o=r[1],a=_t(X(),2),u=a[0],l=a[1],c=oe((function(){return yr()(u).format(xr)}),[u]),s=oe((function(){return yr()(i).format(xr)}),[i]),f=Wr(),d=f.period,h=d.end,p=d.start,v=f.relativeTime,y=Qr(),g=er();te((function(){o(Mr(Pr(h)))}),[h]),te((function(){l(Mr(Pr(p)))}),[p]);var _=oe((function(){return{start:yr()(Pr(p)).format(xr),end:yr()(Pr(h)).format(xr)}}),[p,h]),b=oe((function(){return v&&"none"!==v?v.replace(/_/g," "):"".concat(_.start," - ").concat(_.end)}),[v,_]),D=re(null),w=re(null),x=re(null),k=re(null),C=_t(X(!1),2),E=C[0],S=C[1],A=re(null),F=function(){S(!1)};return po(e,(function(e){var t,n,r=e.target,i=(null===D||void 0===D?void 0:D.current)&&D.current.contains(r),o=(null===w||void 0===w?void 0:w.current)&&w.current.contains(r),a=(null===x||void 0===x?void 0:x.current)&&(null===x||void 0===x||null===(t=x.current)||void 0===t?void 0:t.contains(r)),u=(null===k||void 0===k?void 0:k.current)&&(null===k||void 0===k||null===(n=k.current)||void 0===n?void 0:n.contains(r));i||o||a||u||F()})),fr(m,{children:[fr("div",{ref:A,children:fr(mo,{title:"Time range controls",children:fr(ho,{className:g?"":"vm-header-button",variant:"contained",color:"primary",startIcon:fr(mi,{}),onClick:function(){S((function(e){return!e}))},children:n&&fr("span",{children:b})})})}),fr(vo,{open:E,buttonRef:A,placement:"bottom-right",onClose:F,clickOutside:!1,children:fr("div",{className:"vm-time-selector",ref:e,children:[fr("div",{className:"vm-time-selector-left",children:[fr("div",{className:"vm-time-selector-left-inputs",children:[fr("div",{className:"vm-time-selector-left-inputs__date",ref:D,children:[fr("label",{children:"From:"}),fr("span",{children:c}),fr(yi,{}),fr(No,{ref:x,date:u||"",onChange:function(e){return l(e)},targetRef:D,timepicker:!0})]}),fr("div",{className:"vm-time-selector-left-inputs__date",ref:w,children:[fr("label",{children:"To:"}),fr("span",{children:s}),fr(yi,{}),fr(No,{ref:k,date:i||"",onChange:function(e){return o(e)},targetRef:w,timepicker:!0})]})]}),fr(ho,{variant:"text",startIcon:fr(gi,{}),onClick:function(){return y({type:"RUN_QUERY_TO_NOW"})},children:"switch to now"}),fr("div",{className:"vm-time-selector-left__controls",children:[fr(ho,{color:"error",variant:"outlined",onClick:function(){o(Mr(Pr(h))),l(Mr(Pr(p))),S(!1)},children:"Cancel"}),fr(ho,{color:"primary",onClick:function(){return u&&i&&y({type:"SET_PERIOD",payload:{from:new Date(u),to:new Date(i)}}),void S(!1)},children:"Apply"})]})]}),fr(_o,{relativeTime:v||"",setDuration:function(e){var t=e.duration,n=e.until,r=e.id;y({type:"SET_RELATIVE_TIME",payload:{duration:t,until:n,id:r}}),S(!1)}})]})})]})};!function(e){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"}(Co||(Co={}));var To=function(e){var t=e.label,n=e.value,r=e.type,i=void 0===r?"text":r,o=e.error,a=void 0===o?"":o,u=e.endIcon,l=e.startIcon,c=e.disabled,s=void 0!==c&&c,f=e.autofocus,d=void 0!==f&&f,h=e.helperText,p=e.onChange,v=e.onEnter,m=e.onKeyDown,y=re(null),g=re(null),_=oe((function(){return"textarea"===i?g:y}),[i]),b=Bi()({"vm-text-field__input":!0,"vm-text-field__input_error":a,"vm-text-field__input_icon-start":l,"vm-text-field__input_disabled":s,"vm-text-field__input_textarea":"textarea"===i}),D=function(e){m&&m(e),"Enter"!==e.key||e.shiftKey||(e.preventDefault(),v&&v())},w=function(e){s||p&&p(e.target.value)};return te((function(){var e;d&&(null===_||void 0===_||null===(e=_.current)||void 0===e?void 0:e.focus)&&_.current.focus()}),[_,d]),fr("label",{className:Bi()({"vm-text-field":!0,"vm-text-field_textarea":"textarea"===i}),"data-replicated-value":n,children:[l&&fr("div",{className:"vm-text-field__icon-start",children:l}),u&&fr("div",{className:"vm-text-field__icon-end",children:u}),"textarea"===i?fr("textarea",{className:b,disabled:s,ref:g,value:n,onInput:w,onKeyDown:D,rows:1}):fr("input",{className:b,disabled:s,ref:y,value:n,onInput:w,onKeyDown:D,type:i}),t&&fr("span",{className:"vm-text-field__label",children:t}),fr("span",{className:"vm-text-field__error","data-show":!!a,children:a}),h&&!a&&fr("span",{className:"vm-text-field__helper-text",children:h})]})},Bo=function(e){var t;try{t=new URL(e)}catch(g){return!1}return"http:"===t.protocol||"https:"===t.protocol},Mo=function(e){var t=e.serverUrl,n=e.onChange,r=e.onEnter,i=_t(X(""),2),o=i[0],a=i[1];return fr(To,{autofocus:!0,label:"Server URL",value:t,error:o,onChange:function(e){var t=e||"";n(t),a(""),t||a(Co.emptyServer),Bo(t)||a(Co.validServer)},onEnter:r})},Lo=function(e){var t=e.title,n=e.children,r=e.onClose,i=function(e){"Escape"===e.key&&r()};return te((function(){return window.addEventListener("keyup",i),function(){window.removeEventListener("keyup",i)}}),[]),mt.createPortal(fr("div",{className:"vm-modal",onMouseDown:r,children:fr("div",{className:"vm-modal-content",children:[fr("div",{className:"vm-modal-content-header",children:[t&&fr("div",{className:"vm-modal-content-header__title",children:t}),fr("div",{className:"vm-modal-header__close",children:fr(ho,{variant:"text",size:"small",onClick:r,children:fr(ai,{})})})]}),fr("div",{className:"vm-modal-content-body",onMouseDown:function(e){e.stopPropagation()},children:n})]})}),document.body)},Po=[{label:"Graph",type:"chart"},{label:"JSON",type:"code"},{label:"Table",type:"table"}],Io=function(e){var t=e.limits,n=e.onChange,r=e.onEnter,i=_t(X({table:"",chart:"",code:""}),2),o=i[0],a=i[1],u=function(e){return function(r){!function(e,r){var i=e||"";a((function(e){return Kn(Kn({},e),{},qn({},r,+i<0?Co.positiveNumber:""))})),n(Kn(Kn({},t),{},qn({},r,i||1/0)))}(r,e)}};return fr("div",{className:"vm-limits-configurator",children:[fr("div",{className:"vm-limits-configurator-title",children:["Series limits by tabs",fr(mo,{title:"To disable limits set to 0",children:fr(ho,{variant:"text",color:"primary",size:"small",startIcon:fr(li,{})})}),fr("div",{className:"vm-limits-configurator-title__reset",children:fr(ho,{variant:"text",color:"primary",size:"small",startIcon:fr(ui,{}),onClick:function(){n(or)},children:"Reset"})})]}),fr("div",{className:"vm-limits-configurator__inputs",children:Po.map((function(e){return fr(To,{label:e.label,value:t[e.type],error:o[e.type],onChange:u(e.type),onEnter:r,type:"number"},e.type)}))})]})},$o="Settings",Ro=function(){var e=hr().serverUrl,t=Vi().seriesLimits,n=pr(),r=qi(),i=_t(X(e),2),o=i[0],a=i[1],u=_t(X(t),2),l=u[0],c=u[1],s=_t(X(!1),2),f=s[0],d=s[1],h=function(){return d(!1)},p=function(){n({type:"SET_SERVER",payload:o}),r({type:"SET_SERIES_LIMITS",payload:l}),h()};return fr(m,{children:[fr(mo,{title:$o,children:fr(ho,{className:"vm-header-button",variant:"contained",color:"primary",startIcon:fr(oi,{}),onClick:function(){return d(!0)}})}),f&&fr(Lo,{title:$o,onClose:h,children:fr("div",{className:"vm-server-configurator",children:[fr("div",{className:"vm-server-configurator__input",children:fr(Mo,{serverUrl:o,onChange:a,onEnter:p})}),fr("div",{className:"vm-server-configurator__input",children:fr(Io,{limits:l,onChange:c,onEnter:p})}),fr("div",{className:"vm-server-configurator__footer",children:[fr(ho,{variant:"outlined",color:"error",onClick:h,children:"Cancel"}),fr(ho,{variant:"contained",onClick:p,children:"apply"})]})]})})]})},jo={windows:"Windows",mac:"Mac OS",linux:"Linux"},zo=(Object.values(jo).find((function(e){return navigator.userAgent.indexOf(e)>=0}))||"unknown")===jo.mac?"Cmd":"Ctrl",Uo=[{title:"Query",list:[{keys:["Enter"],description:"Run"},{keys:["Shift","Enter"],description:"Multi-line queries"},{keys:[zo,"Arrow Up"],description:"Previous command from the Query history"},{keys:[zo,"Arrow Down"],description:"Next command from the Query history"}]},{title:"Graph",list:[{keys:[zo,"Scroll Up"],description:"Zoom in"},{keys:[zo,"Scroll Down"],description:"Zoom out"},{keys:[zo,"Click and Drag"],description:"Move the graph left/right"}]},{title:"Legend",list:[{keys:["Mouse Click"],description:"Select series"},{keys:[zo,"Mouse Click"],description:"Toggle multiple series"}]}],Ho=function(){var e=_t(X(!1),2),t=e[0],n=e[1],r=er();return fr(m,{children:[fr(mo,{title:"Shortcut keys",placement:"bottom-center",children:fr(ho,{className:r?"":"vm-header-button",variant:"contained",color:"primary",startIcon:fr(_i,{}),onClick:function(){n(!0)}})}),t&&fr(Lo,{title:"Shortcut keys",onClose:function(){n(!1)},children:fr("div",{className:"vm-shortcuts",children:Uo.map((function(e){return fr("div",{className:"vm-shortcuts-section",children:[fr("h3",{className:"vm-shortcuts-section__title",children:e.title}),fr("div",{className:"vm-shortcuts-section-list",children:e.list.map((function(e){return fr("div",{className:"vm-shortcuts-section-list-item",children:[fr("div",{className:"vm-shortcuts-section-list-item__key",children:e.keys.map((function(t,n){return fr(m,{children:[fr("code",{children:t},t),n!==e.keys.length-1?"+":""]})}))}),fr("p",{className:"vm-shortcuts-section-list-item__description",children:e.description})]},e.keys.join("+"))}))})]},e.title)}))})})]})},Yo=function(){var e=er(),t=re(null),n=eo().date,r=to(),i=oe((function(){return yr()(n).format(wr)}),[n]);return fr("div",{children:[fr("div",{ref:t,children:fr(mo,{title:"Date control",children:fr(ho,{className:e?"":"vm-header-button",variant:"contained",color:"primary",startIcon:fr(yi,{}),children:i})})}),fr(No,{date:n||"",format:wr,onChange:function(e){r({type:"SET_DATE",payload:e})},targetRef:t})]})},Vo=function(){var e=Mi("color-primary"),t=er(),n=Xn().headerStyles,r=(n=void 0===n?{}:n).background,i=void 0===r?t?"#FFF":e:r,o=n.color,a=void 0===o?t?e:"#FFF":o,u=Sn(),l=En(),c=l.search,s=l.pathname,f=oe((function(){return[{label:"Custom panel",value:Jn.home},{label:"Dashboards",value:Jn.dashboards,hide:t},{label:"Cardinality",value:Jn.cardinality},{label:"Top queries",value:Jn.topQueries},{label:"Trace analyzer",value:Jn.trace}]}),[t]),d=_t(X(s),2),h=d[0],p=d[1],v=oe((function(){return(Gn[s]||{}).header||{}}),[s]),m=function(e){u({pathname:e,search:c})};return te((function(){p(s)}),[s]),fr("header",{className:Bi()({"vm-header":!0,"vm-header_app":t}),style:{background:i,color:a},children:[!t&&fr("div",{className:"vm-header-logo",style:{color:a},children:[fr("div",{className:"vm-header-logo__icon",onClick:function(){m(Jn.home),ar({}),window.location.reload()},children:fr(ii,{})}),fr("a",{className:"vm-header-logo__issue",target:"_blank",href:"https://github.com/VictoriaMetrics/VictoriaMetrics/issues/new",rel:"noreferrer",children:"create an issue"})]}),fr("div",{className:"vm-header-nav",children:fr(Pi,{activeItem:h,items:f.filter((function(e){return!e.hide})),color:a,onChange:function(e){p(e),u(e)}})}),fr("div",{className:"vm-header__settings",children:[(null===v||void 0===v?void 0:v.timeSelector)&&fr(Oo,{}),(null===v||void 0===v?void 0:v.cardinalityDatePicker)&&fr(Yo,{}),(null===v||void 0===v?void 0:v.executionControls)&&fr(go,{}),(null===v||void 0===v?void 0:v.globalSettings)&&!t&&fr(Ro,{}),fr(Ho,{})]})]})},qo=function(){var e=er();return fr("section",{className:"vm-container",children:[fr(Vo,{}),fr("div",{className:Bi()({"vm-container-body":!0,"vm-container-body_app":e}),children:fr(In,{})})]})};function Wo(e,t){var n="undefined"!==typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(!n){if(Array.isArray(e)||(n=gt(e))||t&&e&&"number"===typeof e.length){n&&(e=n);var r=0,i=function(){};return{s:i,n:function(){return r>=e.length?{done:!0}:{done:!1,value:e[r++]}},e:function(e){throw e},f:i}}throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}var o,a=!0,u=!1;return{s:function(){n=n.call(e)},n:function(){var e=n.next();return a=e.done,e},e:function(e){u=!0,o=e},f:function(){try{a||null==n.return||n.return()}finally{if(u)throw o}}}}var Qo,Go,Jo="u-off",Zo="u-label",Ko="width",Xo="height",ea="top",ta="bottom",na="left",ra="right",ia="#000",oa="#0000",aa="mousemove",ua="mousedown",la="mouseup",ca="mouseenter",sa="mouseleave",fa="dblclick",da="change",ha="dppxchange",pa="undefined"!=typeof window,va=pa?document:null,ma=pa?window:null,ya=pa?navigator:null;function ga(e,t){if(null!=t){var n=e.classList;!n.contains(t)&&n.add(t)}}function _a(e,t){var n=e.classList;n.contains(t)&&n.remove(t)}function ba(e,t,n){e.style[t]=n+"px"}function Da(e,t,n,r){var i=va.createElement(e);return null!=t&&ga(i,t),null!=n&&n.insertBefore(i,r),i}function wa(e,t){return Da("div",e,t)}var xa=new WeakMap;function ka(e,t,n,r,i){var o="translate("+t+"px,"+n+"px)";o!=xa.get(e)&&(e.style.transform=o,xa.set(e,o),t<0||n<0||t>r||n>i?ga(e,Jo):_a(e,Jo))}var Ca=new WeakMap;function Ea(e,t,n){var r=t+n;r!=Ca.get(e)&&(Ca.set(e,r),e.style.background=t,e.style.borderColor=n)}var Sa=new WeakMap;function Aa(e,t,n,r){var i=t+""+n;i!=Sa.get(e)&&(Sa.set(e,i),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)}var Fa={passive:!0},Na=Kn(Kn({},Fa),{},{capture:!0});function Oa(e,t,n,r){t.addEventListener(e,n,r?Na:Fa)}function Ta(e,t,n,r){t.removeEventListener(e,n,r?Na:Fa)}function Ba(e,t,n,r){var i;n=n||0;for(var o=(r=r||t.length-1)<=2147483647;r-n>1;)t[i=o?n+r>>1:Ka((n+r)/2)]=t&&i<=n;i+=r)if(null!=e[i])return i;return-1}function La(e,t,n,r){var i=lu,o=-lu;if(1==r)i=e[t],o=e[n];else if(-1==r)i=e[n],o=e[t];else for(var a=t;a<=n;a++)null!=e[a]&&(i=tu(i,e[a]),o=nu(o,e[a]));return[i,o]}function Pa(e,t,n){for(var r=lu,i=-lu,o=t;o<=n;o++)e[o]>0&&(r=tu(r,e[o]),i=nu(i,e[o]));return[r==lu?1:r,i==-lu?10:i]}pa&&function e(){var t=devicePixelRatio;Qo!=t&&(Qo=t,Go&&Ta(da,Go,e),Go=matchMedia("(min-resolution: ".concat(Qo-.001,"dppx) and (max-resolution: ").concat(Qo+.001,"dppx)")),Oa(da,Go,e),ma.dispatchEvent(new CustomEvent(ha)))}();var Ia=[0,0];function $a(e,t,n,r){return Ia[0]=n<0?bu(e,-n):e,Ia[1]=r<0?bu(t,-r):t,Ia}function Ra(e,t,n,r){var i,o,a,u=iu(e),l=10==n?ou:au;return e==t&&(-1==u?(e*=n,t/=n):(e/=n,t*=n)),r?(i=Ka(l(e)),o=eu(l(t)),e=(a=$a(ru(n,i),ru(n,o),i,o))[0],t=a[1]):(i=Ka(l(Za(e))),o=Ka(l(Za(t))),e=_u(e,(a=$a(ru(n,i),ru(n,o),i,o))[0]),t=gu(t,a[1])),[e,t]}function ja(e,t,n,r){var i=Ra(e,t,n,r);return 0==e&&(i[0]=0),0==t&&(i[1]=0),i}var za={mode:3,pad:.1},Ua={pad:0,soft:null,mode:0},Ha={min:Ua,max:Ua};function Ya(e,t,n,r){return Fu(n)?qa(e,t,n):(Ua.pad=n,Ua.soft=r?0:null,Ua.mode=r?3:0,qa(e,t,Ha))}function Va(e,t){return null==e?t:e}function qa(e,t,n){var r=n.min,i=n.max,o=Va(r.pad,0),a=Va(i.pad,0),u=Va(r.hard,-lu),l=Va(i.hard,lu),c=Va(r.soft,lu),s=Va(i.soft,-lu),f=Va(r.mode,0),d=Va(i.mode,0),h=t-e;h<1e-9&&(h=0,0!=e&&0!=t||(h=1e-9,2==f&&c!=lu&&(o=0),2==d&&s!=-lu&&(a=0)));var p=h||Za(t)||1e3,v=ou(p),m=ru(10,Ka(v)),y=bu(_u(e-p*(0==h?0==e?.1:1:o),m/10),9),g=e>=c&&(1==f||3==f&&y<=c||2==f&&y>=c)?c:lu,_=nu(u,y=g?g:tu(g,y)),b=bu(gu(t+p*(0==h?0==t?.1:1:a),m/10),9),D=t<=s&&(1==d||3==d&&b>=s||2==d&&b<=s)?s:-lu,w=tu(l,b>D&&t<=D?D:nu(D,b));return _==w&&0==_&&(w=100),[_,w]}var Wa=new Intl.NumberFormat(pa?ya.language:"en-US"),Qa=function(e){return Wa.format(e)},Ga=Math,Ja=Ga.PI,Za=Ga.abs,Ka=Ga.floor,Xa=Ga.round,eu=Ga.ceil,tu=Ga.min,nu=Ga.max,ru=Ga.pow,iu=Ga.sign,ou=Ga.log10,au=Ga.log2,uu=function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:1;return Ga.asinh(e/t)},lu=1/0;function cu(e){return 1+(0|ou((e^e>>31)-(e>>31)))}function su(e,t){return Xa(e/t)*t}function fu(e,t,n){return tu(nu(e,t),n)}function du(e){return"function"==typeof e?e:function(){return e}}var hu=function(e){return e},pu=function(e,t){return t},vu=function(e){return null},mu=function(e){return!0},yu=function(e,t){return e==t};function gu(e,t){return eu(e/t)*t}function _u(e,t){return Ka(e/t)*t}function bu(e,t){return Xa(e*(t=Math.pow(10,t)))/t}var Du=new Map;function wu(e){return((""+e).split(".")[1]||"").length}function xu(e,t,n,r){for(var i=[],o=r.map(wu),a=t;a=0&&a>=0?0:u)+(a>=o[c]?0:o[c]),d=bu(s,f);i.push(d),Du.set(d,f)}return i}var ku={},Cu=[],Eu=[null,null],Su=Array.isArray;function Au(e){return"string"==typeof e}function Fu(e){var t=!1;if(null!=e){var n=e.constructor;t=null==n||n==Object}return t}function Nu(e){return null!=e&&"object"==typeof e}var Ou=Object.getPrototypeOf(Uint8Array);function Tu(e){var t,n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:Fu;if(Su(e)){var r=e.find((function(e){return null!=e}));if(Su(r)||n(r)){t=Array(e.length);for(var i=0;io){for(r=a-1;r>=0&&null==e[r];)e[r--]=null;for(r=a+1;r12?t-12:t},AA:function(e){return e.getHours()>=12?"PM":"AM"},aa:function(e){return e.getHours()>=12?"pm":"am"},a:function(e){return e.getHours()>=12?"p":"a"},mm:function(e){return Uu(e.getMinutes())},m:function(e){return e.getMinutes()},ss:function(e){return Uu(e.getSeconds())},s:function(e){return e.getSeconds()},fff:function(e){return((t=e.getMilliseconds())<10?"00":t<100?"0":"")+t;var t}};function Yu(e,t){t=t||zu;for(var n,r=[],i=/\{([a-z]+)\}|[^{]+/gi;n=i.exec(e);)r.push("{"==n[0][0]?Hu[n[1]]:n[0]);return function(e){for(var n="",i=0;i=a,v=f>=o&&f=i?i:f,N=_+(Ka(c)-Ka(y))+gu(y-_,F);h.push(N);for(var O=t(N),T=O.getHours()+O.getMinutes()/n+O.getSeconds()/r,B=f/r,M=d/u.axes[l]._space;!((N=bu(N+f,1==e?0:3))>s);)if(B>1){var L=Ka(bu(T+B,6))%24,P=t(N).getHours()-L;P>1&&(P=-1),T=(T+B)%24,bu(((N-=P*r)-h[h.length-1])/f,3)*M>=.7&&h.push(N)}else h.push(N)}return h}}]}var cl=_t(ll(1),3),sl=cl[0],fl=cl[1],dl=cl[2],hl=_t(ll(.001),3),pl=hl[0],vl=hl[1],ml=hl[2];function yl(e,t){return e.map((function(e){return e.map((function(n,r){return 0==r||8==r||null==n?n:t(1==r||0==e[8]?n:e[1]+n)}))}))}function gl(e,t){return function(n,r,i,o,a){var u,l,c,s,f,d,h=t.find((function(e){return a>=e[0]}))||t[t.length-1];return r.map((function(t){var n=e(t),r=n.getFullYear(),i=n.getMonth(),o=n.getDate(),a=n.getHours(),p=n.getMinutes(),v=n.getSeconds(),m=r!=u&&h[2]||i!=l&&h[3]||o!=c&&h[4]||a!=s&&h[5]||p!=f&&h[6]||v!=d&&h[7]||h[1];return u=r,l=i,c=o,s=a,f=p,d=v,m(n)}))}}function _l(e,t,n){return new Date(e,t,n)}function bl(e,t){return t(e)}xu(2,-53,53,[1]);function Dl(e,t){return function(n,r){return t(e(r))}}var wl={show:!0,live:!0,isolate:!1,markers:{show:!0,width:2,stroke:function(e,t){var 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:[]};var xl=[0,0];function kl(e,t,n){return function(e){0==e.button&&n(e)}}function Cl(e,t,n){return n}var El={show:!0,x:!0,y:!0,lock:!1,move:function(e,t,n){return xl[0]=t,xl[1]=n,xl},points:{show:function(e,t){var n=e.cursor.points,r=wa(),i=n.size(e,t);ba(r,Ko,i),ba(r,Xo,i);var o=i/-2;ba(r,"marginLeft",o),ba(r,"marginTop",o);var a=n.width(e,t,i);return a&&ba(r,"borderWidth",a),r},size:function(e,t){return ql(e.series[t].points.width,1)},width:0,stroke:function(e,t){var n=e.series[t].points;return n._stroke||n._fill},fill:function(e,t){var n=e.series[t].points;return n._fill||n._stroke}},bind:{mousedown:kl,mouseup:kl,click:kl,dblclick:kl,mousemove:Cl,mouseleave:Cl,mouseenter:Cl},drag:{setScale:!0,x:!0,y:!1,dist:0,uni:null,_x:!1,_y:!1},focus:{prox:-1},left:-10,top:-10,idx:null,dataIdx:function(e,t,n){return n},idxs:null},Sl={show:!0,stroke:"rgba(0,0,0,0.07)",width:2},Al=Bu({},Sl,{filter:pu}),Fl=Bu({},Al,{size:10}),Nl=Bu({},Sl,{show:!1}),Ol='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"',Tl="bold "+Ol,Bl={show:!0,scale:"x",stroke:ia,space:50,gap:5,size:50,labelGap:0,labelSize:30,labelFont:Tl,side:2,grid:Al,ticks:Fl,border:Nl,font:Ol,rotate:0},Ml={show:!0,scale:"x",auto:!1,sorted:1,min:lu,max:-lu,idxs:[]};function Ll(e,t,n,r,i){return t.map((function(e){return null==e?"":Qa(e)}))}function Pl(e,t,n,r,i,o,a){for(var u=[],l=Du.get(i)||0,c=n=a?n:bu(gu(n,i),l);c<=r;c=bu(c+i,l))u.push(Object.is(c,-0)?0:c);return u}function Il(e,t,n,r,i,o,a){var u=[],l=e.scales[e.axes[t].scale].log,c=Ka((10==l?ou:au)(n));i=ru(l,c),c<0&&(i=bu(i,-c));var s=n;do{u.push(s),(s=bu(s+i,Du.get(i)))>=i*l&&(i=s)}while(s<=r);return u}function $l(e,t,n,r,i,o,a){var u=e.scales[e.axes[t].scale].asinh,l=r>u?Il(e,t,nu(u,n),r,i):[u],c=r>=0&&n<=0?[0]:[];return(n<-u?Il(e,t,nu(u,-r),-n,i):[u]).reverse().map((function(e){return-e})).concat(c,l)}var Rl=/./,jl=/[12357]/,zl=/[125]/,Ul=/1/;function Hl(e,t,n,r,i){var o=e.axes[n],a=o.scale,u=e.scales[a];if(3==u.distr&&2==u.log)return t;var l=e.valToPos,c=o._space,s=l(10,a),f=l(9,a)-s>=c?Rl:l(7,a)-s>=c?jl:l(5,a)-s>=c?zl:Ul;return t.map((function(e){return 4==u.distr&&0==e||f.test(e)?e:null}))}function Yl(e,t){return null==t?"":Qa(t)}var Vl={show:!0,scale:"y",stroke:ia,space:30,gap:5,size:50,labelGap:0,labelSize:30,labelFont:Tl,side:3,grid:Al,ticks:Fl,border:Nl,font:Ol,rotate:0};function ql(e,t){return bu((3+2*(e||1))*t,3)}var Wl={scale:null,auto:!0,sorted:0,min:lu,max:-lu},Ql={show:!0,auto:!0,sorted:0,alpha:1,facets:[Bu({},Wl,{scale:"x"}),Bu({},Wl,{scale:"y"})]},Gl={scale:"y",auto:!0,sorted:0,show:!0,spanGaps:!1,gaps:function(e,t,n,r,i){return i},alpha:1,points:{show:function(e,t){var n=e.series[0],r=n.scale,i=n.idxs,o=e._data[0],a=e.valToPos(o[i[0]],r,!0),u=e.valToPos(o[i[1]],r,!0),l=Za(u-a)/(e.series[t].points.space*Qo);return i[1]-i[0]<=l},filter:null},values:null,min:lu,max:-lu,idxs:[],path:null,clip:null};function Jl(e,t,n,r,i){return n/10}var Zl={time:!0,auto:!0,distr:1,log:10,asinh:1,min:null,max:null,dir:1,ori:0},Kl=Bu({},Zl,{time:!1,ori:1}),Xl={};function ec(e,t){var n=Xl[e];return n||(n={key:e,plots:[],sub:function(e){n.plots.push(e)},unsub:function(e){n.plots=n.plots.filter((function(t){return t!=e}))},pub:function(e,t,r,i,o,a,u){for(var l=0;l0){a=new Path2D;for(var u=0==t?hc:pc,l=n,c=0;cs[0]){var f=s[0]-l;f>0&&u(a,l,r,f,r+o),l=s[1]}}var d=n+i-l;d>0&&u(a,l,r,d,r+o)}return a}function ac(e,t,n,r,i,o,a){for(var u=[],l=1==i?n:r;l>=n&&l<=r;l+=i){if(null===t[l]){var c=l,s=l;if(1==i)for(;++l<=r&&null===t[l];)s=l;else for(;--l>=n&&null===t[l];)s=l;var f=o(e[c]),d=s==c?f:o(e[s]);f=a<=0?o(e[c-i]):f,(d=a>=0?o(e[s+i]):d)>=f&&u.push([f,d])}}return u}function uc(e){return 0==e?hu:1==e?Xa:function(t){return su(t,e)}}function lc(e){var t=0==e?cc:sc,n=0==e?function(e,t,n,r,i,o){e.arcTo(t,n,r,i,o)}:function(e,t,n,r,i,o){e.arcTo(n,t,i,r,o)},r=0==e?function(e,t,n,r,i){e.rect(t,n,r,i)}:function(e,t,n,r,i){e.rect(n,t,i,r)};return function(e,i,o,a,u){var l=arguments.length>5&&void 0!==arguments[5]?arguments[5]:0;0==l?r(e,i,o,a,u):(l=tu(l,a/2,u/2),t(e,i+l,o),n(e,i+a,o,i+a,o+u,l),n(e,i+a,o+u,i,o+u,l),n(e,i,o+u,i,o,l),n(e,i,o,i+a,o,l),e.closePath())}}var cc=function(e,t,n){e.moveTo(t,n)},sc=function(e,t,n){e.moveTo(n,t)},fc=function(e,t,n){e.lineTo(t,n)},dc=function(e,t,n){e.lineTo(n,t)},hc=lc(0),pc=lc(1),vc=function(e,t,n,r,i,o){e.arc(t,n,r,i,o)},mc=function(e,t,n,r,i,o){e.arc(n,t,r,i,o)},yc=function(e,t,n,r,i,o,a){e.bezierCurveTo(t,n,r,i,o,a)},gc=function(e,t,n,r,i,o,a){e.bezierCurveTo(n,t,i,r,a,o)};function _c(e){return function(e,t,n,r,i){return tc(e,t,(function(t,o,a,u,l,c,s,f,d,h,p){var v,m,y=t.pxRound,g=t.points;0==u.ori?(v=cc,m=vc):(v=sc,m=mc);var _=bu(g.width*Qo,3),b=(g.size-g.width)/2*Qo,D=bu(2*b,3),w=new Path2D,x=new Path2D,k=e.bbox,C=k.left,E=k.top,S=k.width,A=k.height;hc(x,C-D,E-D,S+2*D,A+2*D);var F=function(e){if(null!=a[e]){var t=y(c(o[e],u,h,f)),n=y(s(a[e],l,p,d));v(w,t+b,n),m(w,t,n,b,0,2*Ja)}};if(i)i.forEach(F);else for(var N=n;N<=r;N++)F(N);return{stroke:_>0?w:null,fill:w,clip:x,flags:3}}))}}function bc(e){return function(t,n,r,i,o,a){r!=i&&(o!=r&&a!=r&&e(t,n,r),o!=i&&a!=i&&e(t,n,i),e(t,n,a))}}var Dc=bc(fc),wc=bc(dc);function xc(e){var t=Va(null===e||void 0===e?void 0:e.alignGaps,0);return function(e,n,r,i){return tc(e,n,(function(o,a,u,l,c,s,f,d,h,p,v){var m,y,g=o.pxRound,_=function(e){return g(s(e,l,p,d))},b=function(e){return g(f(e,c,v,h))};0==l.ori?(m=fc,y=Dc):(m=dc,y=wc);for(var D,w,x,k=l.dir*(0==l.ori?1:-1),C={stroke:new Path2D,fill:null,clip:null,band:null,gaps:null,flags:1},E=C.stroke,S=lu,A=-lu,F=_(a[1==k?r:i]),N=Ma(u,r,i,1*k),O=Ma(u,r,i,-1*k),T=_(a[N]),B=_(a[O]),M=1==k?r:i;M>=r&&M<=i;M+=k){var L=_(a[M]);L==F?null!=u[M]&&(w=b(u[M]),S==lu&&(m(E,L,w),D=w),S=tu(w,S),A=nu(w,A)):(S!=lu&&(y(E,F,S,A,D,w),x=F),null!=u[M]?(m(E,L,w=b(u[M])),S=A=D=w):(S=lu,A=-lu),F=L)}S!=lu&&S!=A&&x!=F&&y(E,F,S,A,D,w);var P=_t(nc(e,n),2),I=P[0],$=P[1];if(null!=o.fill||0!=I){var R=C.fill=new Path2D(E),j=b(o.fillTo(e,n,o.min,o.max,I));m(R,B,j),m(R,T,j)}if(!o.spanGaps){var z,U=[];(z=U).push.apply(z,bt(ac(a,u,r,i,k,_,t))),C.gaps=U=o.gaps(e,n,r,i,U),C.clip=oc(U,l.ori,d,h,p,v)}return 0!=$&&(C.band=2==$?[ic(e,n,r,i,E,-1),ic(e,n,r,i,E,1)]:ic(e,n,r,i,E,$)),C}))}}function kc(e,t,n,r,i,o){var a=e.length;if(a<2)return null;var u=new Path2D;if(n(u,e[0],t[0]),2==a)r(u,e[1],t[1]);else{for(var l=Array(a),c=Array(a-1),s=Array(a-1),f=Array(a-1),d=0;d0!==c[h]>0?l[h]=0:(l[h]=3*(f[h-1]+f[h])/((2*f[h]+f[h-1])/c[h-1]+(f[h]+2*f[h-1])/c[h]),isFinite(l[h])||(l[h]=0));l[a-1]=c[a-2];for(var p=0;p=i&&o+(l<5?Du.get(l):0)<=17)return[l,c]}while(++u0?e:t.clamp(r,e,t.min,t.max,t.key)):4==t.distr?uu(e,t.asinh):e)-t._min)/(t._max-t._min)}function a(e,t,n,r){var i=o(e,t);return r+n*(-1==t.dir?1-i:i)}function u(e,t,n,r){var i=o(e,t);return r+n*(-1==t.dir?i:1-i)}function l(e,t,n,r){return 0==t.ori?a(e,t,n,r):u(e,t,n,r)}r.valToPosH=a,r.valToPosV=u;var c=!1;r.status=0;var s=r.root=wa("uplot");(null!=e.id&&(s.id=e.id),ga(s,e.class),e.title)&&(wa("u-title",s).textContent=e.title);var f=Da("canvas"),d=r.ctx=f.getContext("2d"),h=wa("u-wrap",s),p=r.under=wa("u-under",h);h.appendChild(f);var v=r.over=wa("u-over",h),m=+Va((e=Tu(e)).pxAlign,1),y=uc(m);(e.plugins||[]).forEach((function(t){t.opts&&(e=t.opts(r,e)||e)}));var g=e.ms||.001,_=r.series=1==i?Fc(e.series||[],Ml,Gl,!1):function(e,t){return e.map((function(e,n){return 0==n?null:Bu({},t,e)}))}(e.series||[null],Ql),b=r.axes=Fc(e.axes||[],Bl,Vl,!0),D=r.scales={},w=r.bands=e.bands||[];w.forEach((function(e){e.fill=du(e.fill||null),e.dir=Va(e.dir,-1)}));var x=2==i?_[1].facets[0].scale:_[0].scale,k={axes:function(){for(var e=function(e){var t=b[e];if(!t.show||!t._show)return"continue";var n=t.side,i=n%2,o=void 0,a=void 0,u=t.stroke(r,e),c=0==n||3==n?-1:1;if(t.label){var s=t.labelGap*c,f=Xa((t._lpos+s)*Qo);Ze(t.labelFont[0],u,"center",2==n?ea:ta),d.save(),1==i?(o=a=0,d.translate(f,Xa(de+pe/2)),d.rotate((3==n?-Ja:Ja)/2)):(o=Xa(fe+he/2),a=f),d.fillText(t.label,o,a),d.restore()}var h=_t(t._found,2),p=h[0],v=h[1];if(0==v)return"continue";var m=D[t.scale],g=0==i?he:pe,_=0==i?fe:de,w=Xa(t.gap*Qo),x=t._splits,k=2==m.distr?x.map((function(e){return qe[e]})):x,C=2==m.distr?qe[x[1]]-qe[x[0]]:p,E=t.ticks,S=t.border,A=E.show?Xa(E.size*Qo):0,F=t._rotate*-Ja/180,N=y(t._pos*Qo),O=N+(A+w)*c;a=0==i?O:0,o=1==i?O:0,Ze(t.font[0],u,1==t.align?na:2==t.align?ra:F>0?na:F<0?ra:0==i?"center":3==n?ra:na,F||1==i?"middle":2==n?ea:ta);for(var T=1.5*t.font[1],B=x.map((function(e){return y(l(e,m,g,_))})),M=t._values,L=0;L0&&(_.forEach((function(e,n){if(n>0&&e.show&&null==e._paths){var i=function(e){var t=fu(He-1,0,Ne-1),n=fu(Ye+1,0,Ne-1);for(;null==e[t]&&t>0;)t--;for(;null==e[n]&&n0&&e.show){je!=e.alpha&&(d.globalAlpha=je=e.alpha),Xe(t,!1),e._paths&&et(t,!1),Xe(t,!0);var n=e.points.show(r,t,He,Ye),i=e.points.filter(r,t,n,e._paths?e._paths.gaps:null);(n||i)&&(e.points._paths=e.points.paths(r,t,He,Ye,i),et(t,!0)),1!=je&&(d.globalAlpha=je=1),on("drawSeries",t)}})))}},C=(e.drawOrder||["axes","series"]).map((function(e){return k[e]}));function E(t){var n=D[t];if(null==n){var r=(e.scales||ku)[t]||ku;if(null!=r.from)E(r.from),D[t]=Bu({},D[r.from],r,{key:t});else{(n=D[t]=Bu({},t==x?Zl:Kl,r)).key=t;var o=n.time,a=n.range,u=Su(a);if((t!=x||2==i&&!o)&&(!u||null!=a[0]&&null!=a[1]||(a={min:null==a[0]?za:{mode:1,hard:a[0],soft:a[0]},max:null==a[1]?za:{mode:1,hard:a[1],soft:a[1]}},u=!1),!u&&Fu(a))){var l=a;a=function(e,t,n){return null==t?Eu:Ya(t,n,l)}}n.range=du(a||(o?Tc:t==x?3==n.distr?Lc:4==n.distr?Ic:Oc:3==n.distr?Mc:4==n.distr?Pc:Bc)),n.auto=du(!u&&n.auto),n.clamp=du(n.clamp||Jl),n._min=n._max=null}}}for(var S in E("x"),E("y"),1==i&&_.forEach((function(e){E(e.scale)})),b.forEach((function(e){E(e.scale)})),e.scales)E(S);var A,F,N=D[x],O=N.distr;0==N.ori?(ga(s,"u-hz"),A=a,F=u):(ga(s,"u-vt"),A=u,F=a);var T={};for(var B in D){var M=D[B];null==M.min&&null==M.max||(T[B]={min:M.min,max:M.max},M.min=M.max=null)}var L,P=e.tzDate||function(e){return new Date(Xa(e/g))},I=e.fmtDate||Yu,$=1==g?dl(P):ml(P),R=gl(P,yl(1==g?fl:vl,I)),j=Dl(P,bl("{YYYY}-{MM}-{DD} {h}:{mm}{aa}",I)),z=[],U=r.legend=Bu({},wl,e.legend),H=U.show,Y=U.markers;U.idxs=z,Y.width=du(Y.width),Y.dash=du(Y.dash),Y.stroke=du(Y.stroke),Y.fill=du(Y.fill);var V,q=[],W=[],Q=!1,G={};if(U.live){var J=_[1]?_[1].values:null;for(var Z in V=(Q=null!=J)?J(r,1,0):{_:0})G[Z]="--"}if(H)if(L=Da("table","u-legend",s),Q){var K=Da("tr","u-thead",L);for(var X in Da("th",null,K),V)Da("th",Zo,K).textContent=X}else ga(L,"u-inline"),U.live&&ga(L,"u-live");var ee={show:!0},te={show:!1};var ne=new Map;function re(e,t,n){var i=ne.get(t)||{},o=we.bind[e](r,t,n);o&&(Oa(e,t,i[e]=o),ne.set(t,i))}function ie(e,t,n){var r=ne.get(t)||{};for(var i in r)null!=e&&i!=e||(Ta(i,t,r[i]),delete r[i]);null==e&&ne.delete(t)}var oe=0,ae=0,ue=0,le=0,ce=0,se=0,fe=0,de=0,he=0,pe=0;r.bbox={};var ve=!1,me=!1,ye=!1,ge=!1,_e=!1;function be(e,t,n){(n||e!=r.width||t!=r.height)&&De(e,t),ut(!1),ye=!0,me=!0,ge=_e=we.left>=0,wt()}function De(e,t){r.width=oe=ue=e,r.height=ae=le=t,ce=se=0,function(){var e=!1,t=!1,n=!1,r=!1;b.forEach((function(i,o){if(i.show&&i._show){var a=i.side,u=a%2,l=i._size+(null!=i.label?i.labelSize:0);l>0&&(u?(ue-=l,3==a?(ce+=l,r=!0):n=!0):(le-=l,0==a?(se+=l,e=!0):t=!0))}})),Ae[0]=e,Ae[1]=n,Ae[2]=t,Ae[3]=r,ue-=Ue[1]+Ue[3],ce+=Ue[3],le-=Ue[2]+Ue[0],se+=Ue[0]}(),function(){var e=ce+ue,t=se+le,n=ce,r=se;function i(i,o){switch(i){case 1:return(e+=o)-o;case 2:return(t+=o)-o;case 3:return(n-=o)+o;case 0:return(r-=o)+o}}b.forEach((function(e,t){if(e.show&&e._show){var n=e.side;e._pos=i(n,e._size),null!=e.label&&(e._lpos=i(n,e.labelSize))}}))}();var n=r.bbox;fe=n.left=su(ce*Qo,.5),de=n.top=su(se*Qo,.5),he=n.width=su(ue*Qo,.5),pe=n.height=su(le*Qo,.5)}r.setSize=function(e){be(e.width,e.height)};var we=r.cursor=Bu({},El,{drag:{y:2==i}},e.cursor);we.idxs=z,we._lock=!1;var xe=we.points;xe.show=du(xe.show),xe.size=du(xe.size),xe.stroke=du(xe.stroke),xe.width=du(xe.width),xe.fill=du(xe.fill);var ke=r.focus=Bu({},e.focus||{alpha:.3},we.focus),Ce=ke.prox>=0,Ee=[null];function Se(e,t){if(1==i||t>0){var n=1==i&&D[e.scale].time,o=e.value;e.value=n?Au(o)?Dl(P,bl(o,I)):o||j:o||Yl,e.label=e.label||(n?"Time":"Value")}if(t>0){e.width=null==e.width?1:e.width,e.paths=e.paths||Sc||vu,e.fillTo=du(e.fillTo||rc),e.pxAlign=+Va(e.pxAlign,m),e.pxRound=uc(e.pxAlign),e.stroke=du(e.stroke||null),e.fill=du(e.fill||null),e._stroke=e._fill=e._paths=e._focus=null;var a=ql(e.width,1),u=e.points=Bu({},{size:a,width:nu(1,.2*a),stroke:e.stroke,space:2*a,paths:Ac,_stroke:null,_fill:null},e.points);u.show=du(u.show),u.filter=du(u.filter),u.fill=du(u.fill),u.stroke=du(u.stroke),u.paths=du(u.paths),u.pxAlign=e.pxAlign}if(H){var l=function(e,t){if(0==t&&(Q||!U.live||2==i))return Eu;var n=[],o=Da("tr","u-series",L,L.childNodes[t]);ga(o,e.class),e.show||ga(o,Jo);var a=Da("th",null,o);if(Y.show){var u=wa("u-marker",a);if(t>0){var l=Y.width(r,t);l&&(u.style.border=l+"px "+Y.dash(r,t)+" "+Y.stroke(r,t)),u.style.background=Y.fill(r,t)}}var c=wa(Zo,a);for(var s in c.textContent=e.label,t>0&&(Y.show||(c.style.color=e.width>0?Y.stroke(r,t):Y.fill(r,t)),re("click",a,(function(t){if(!we._lock){var n=_.indexOf(e);if((t.ctrlKey||t.metaKey)!=U.isolate){var r=_.some((function(e,t){return t>0&&t!=n&&e.show}));_.forEach((function(e,t){t>0&&Pt(t,r?t==n?ee:te:ee,!0,an.setSeries)}))}else Pt(n,{show:!e.show},!0,an.setSeries)}})),Ce&&re(ca,a,(function(t){we._lock||Pt(_.indexOf(e),It,!0,an.setSeries)}))),V){var f=Da("td","u-value",o);f.textContent="--",n.push(f)}return[o,n]}(e,t);q.splice(t,0,l[0]),W.splice(t,0,l[1]),U.values.push(null)}if(we.show){z.splice(t,0,null);var c=function(e,t){if(t>0){var n=we.points.show(r,t);if(n)return ga(n,"u-cursor-pt"),ga(n,e.class),ka(n,-10,-10,ue,le),v.insertBefore(n,Ee[t]),n}}(e,t);c&&Ee.splice(t,0,c)}on("addSeries",t)}r.addSeries=function(e,t){e=Nc(e,t=null==t?_.length:t,Ml,Gl),_.splice(t,0,e),Se(_[t],t)},r.delSeries=function(e){if(_.splice(e,1),H){U.values.splice(e,1),W.splice(e,1);var t=q.splice(e,1)[0];ie(null,t.firstChild),t.remove()}we.show&&(z.splice(e,1),Ee.length>1&&Ee.splice(e,1)[0].remove()),on("delSeries",e)};var Ae=[!1,!1,!1,!1];function Fe(e,t,n,r){var i=_t(n,4),o=i[0],a=i[1],u=i[2],l=i[3],c=t%2,s=0;return 0==c&&(l||a)&&(s=0==t&&!o||2==t&&!u?Xa(Bl.size/3):0),1==c&&(o||u)&&(s=1==t&&!a||3==t&&!l?Xa(Vl.size/2):0),s}var Ne,Oe,Te,Be,Me,Le,Pe,Ie,$e,Re,je,ze=r.padding=(e.padding||[Fe,Fe,Fe,Fe]).map((function(e){return du(Va(e,Fe))})),Ue=r._padding=ze.map((function(e,t){return e(r,t,Ae,0)})),He=null,Ye=null,Ve=1==i?_[0].idxs:null,qe=null,We=!1;function Qe(e,n){if(t=null==e?[]:Tu(e,Nu),2==i){Ne=0;for(var o=1;o<_.length;o++)Ne+=t[o][0].length;r.data=t=e}else if(null==t[0]&&(t[0]=[]),r.data=t.slice(),qe=t[0],Ne=qe.length,2==O){t[0]=Array(Ne);for(var a=0;a=0,_e=!0,wt()}}function Ge(){var e,n;if(We=!0,1==i)if(Ne>0){if(He=Ve[0]=0,Ye=Ve[1]=Ne-1,e=t[0][He],n=t[0][Ye],2==O)e=He,n=Ye;else if(1==Ne)if(3==O){var r=_t(Ra(e,e,N.log,!1),2);e=r[0],n=r[1]}else if(4==O){var o=_t(ja(e,e,N.log,!1),2);e=o[0],n=o[1]}else if(N.time)n=e+Xa(86400/g);else{var a=_t(Ya(e,n,.1,!0),2);e=a[0],n=a[1]}}else He=Ve[0]=e=null,Ye=Ve[1]=n=null;Lt(x,e,n)}function Je(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:oa,t=arguments.length>1?arguments[1]:void 0,n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:Cu,r=arguments.length>3&&void 0!==arguments[3]?arguments[3]:"butt",i=arguments.length>4&&void 0!==arguments[4]?arguments[4]:oa,o=arguments.length>5&&void 0!==arguments[5]?arguments[5]:"round";e!=Oe&&(d.strokeStyle=Oe=e),i!=Te&&(d.fillStyle=Te=i),t!=Be&&(d.lineWidth=Be=t),o!=Le&&(d.lineJoin=Le=o),r!=Pe&&(d.lineCap=Pe=r),n!=Me&&d.setLineDash(Me=n)}function Ze(e,t,n,r){t!=Te&&(d.fillStyle=Te=t),e!=Ie&&(d.font=Ie=e),n!=$e&&(d.textAlign=$e=n),r!=Re&&(d.textBaseline=Re=r)}function Ke(e,t,n,i){var o=arguments.length>4&&void 0!==arguments[4]?arguments[4]:0;if(i.length>0&&e.auto(r,We)&&(null==t||null==t.min)){var a=Va(He,0),u=Va(Ye,i.length-1),l=null==n.min?3==e.distr?Pa(i,a,u):La(i,a,u,o):[n.min,n.max];e.min=tu(e.min,n.min=l[0]),e.max=nu(e.max,n.max=l[1])}}function Xe(e,t){var n=t?_[e].points:_[e];n._stroke=n.stroke(r,e),n._fill=n.fill(r,e)}function et(e,n){var i=n?_[e].points:_[e],o=i._stroke,a=i._fill,u=i._paths,l=u.stroke,c=u.fill,s=u.clip,f=u.flags,h=null,p=bu(i.width*Qo,3),v=p%2/2;n&&null==a&&(a=p>0?"#fff":o);var m=1==i.pxAlign;if(m&&d.translate(v,v),!n){var y=fe,g=de,b=he,D=pe,x=p*Qo/2;0==i.min&&(D+=x),0==i.max&&(g-=x,D+=x),(h=new Path2D).rect(y,g,b,D)}n?tt(o,p,i.dash,i.cap,a,l,c,f,s):function(e,n,i,o,a,u,l,c,s,f,d){var h=!1;w.forEach((function(p,v){if(p.series[0]==e){var m,y=_[p.series[1]],g=t[p.series[1]],b=(y._paths||ku).band;Su(b)&&(b=1==p.dir?b[0]:b[1]);var D=null;y.show&&b&&function(e,t,n){for(t=Va(t,0),n=Va(n,e.length-1);t<=n;){if(null!=e[t])return!0;t++}return!1}(g,He,Ye)?(D=p.fill(r,v)||u,m=y._paths.clip):b=null,tt(n,i,o,a,D,l,c,s,f,d,m,b),h=!0}})),h||tt(n,i,o,a,u,l,c,s,f,d)}(e,o,p,i.dash,i.cap,a,l,c,f,h,s),m&&d.translate(-v,-v)}r.setData=Qe;function tt(e,t,n,r,i,o,a,u,l,c,s,f){Je(e,t,n,r,i),(l||c||f)&&(d.save(),l&&d.clip(l),c&&d.clip(c)),f?3==(3&u)?(d.clip(f),s&&d.clip(s),rt(i,a),nt(e,o,t)):2&u?(rt(i,a),d.clip(f),nt(e,o,t)):1&u&&(d.save(),d.clip(f),s&&d.clip(s),rt(i,a),d.restore(),nt(e,o,t)):(rt(i,a),nt(e,o,t)),(l||c||f)&&d.restore()}function nt(e,t,n){n>0&&(t instanceof Map?t.forEach((function(e,t){d.strokeStyle=Oe=t,d.stroke(e)})):null!=t&&e&&d.stroke(t))}function rt(e,t){t instanceof Map?t.forEach((function(e,t){d.fillStyle=Te=t,d.fill(e)})):null!=t&&e&&d.fill(t)}function it(e,t,n,r,i,o,a,u,l,c){var s=a%2/2;1==m&&d.translate(s,s),Je(u,a,l,c,u),d.beginPath();var f,h,p,v,y=i+(0==r||3==r?-o:o);0==n?(h=i,v=y):(f=i,p=y);for(var g=0;g0&&(t._paths=null,e&&(1==i?(t.min=null,t.max=null):t.facets.forEach((function(e){e.min=null,e.max=null}))))}))}var lt,ct,st,ft,dt,ht,pt,vt,mt,yt,gt,bt,Dt=!1;function wt(){Dt||(Lu(xt),Dt=!0)}function xt(){ve&&(!function(){var e=Tu(D,Nu);for(var n in e){var o=e[n],a=T[n];if(null!=a&&null!=a.min)Bu(o,a),n==x&&ut(!0);else if(n!=x||2==i)if(0==Ne&&null==o.from){var u=o.range(r,null,null,n);o.min=u[0],o.max=u[1]}else o.min=lu,o.max=-lu}if(Ne>0)for(var l in _.forEach((function(n,o){if(1==i){var a=n.scale,u=e[a],l=T[a];if(0==o){var c=u.range(r,u.min,u.max,a);u.min=c[0],u.max=c[1],He=Ba(u.min,t[0]),Ye=Ba(u.max,t[0]),t[0][He]u.max&&Ye--,n.min=qe[He],n.max=qe[Ye]}else n.show&&n.auto&&Ke(u,l,n,t[o],n.sorted);n.idxs[0]=He,n.idxs[1]=Ye}else if(o>0&&n.show&&n.auto){var s=_t(n.facets,2),f=s[0],d=s[1],h=f.scale,p=d.scale,v=_t(t[o],2),m=v[0],y=v[1];Ke(e[h],T[h],f,m,f.sorted),Ke(e[p],T[p],d,y,d.sorted),n.min=d.min,n.max=d.max}})),e){var c=e[l],s=T[l];if(null==c.from&&(null==s||null==s.min)){var f=c.range(r,c.min==lu?null:c.min,c.max==-lu?null:c.max,l);c.min=f[0],c.max=f[1]}}for(var d in e){var h=e[d];if(null!=h.from){var p=e[h.from];if(null==p.min)h.min=h.max=null;else{var v=h.range(r,p.min,p.max,d);h.min=v[0],h.max=v[1]}}}var m={},y=!1;for(var g in e){var b=e[g],w=D[g];if(w.min!=b.min||w.max!=b.max){w.min=b.min,w.max=b.max;var k=w.distr;w._min=3==k?ou(w.min):4==k?uu(w.min,w.asinh):w.min,w._max=3==k?ou(w.max):4==k?uu(w.max,w.asinh):w.max,m[g]=y=!0}}if(y){for(var C in _.forEach((function(e,t){2==i?t>0&&m.y&&(e._paths=null):m[e.scale]&&(e._paths=null)})),m)ye=!0,on("setScale",C);we.show&&(ge=_e=we.left>=0)}for(var E in T)T[E]=null}(),ve=!1),ye&&(!function(){for(var e=!1,t=0;!e;){var n=ot(++t),i=at(t);(e=3==t||n&&i)||(De(r.width,r.height),me=!0)}}(),ye=!1),me&&(ba(p,na,ce),ba(p,ea,se),ba(p,Ko,ue),ba(p,Xo,le),ba(v,na,ce),ba(v,ea,se),ba(v,Ko,ue),ba(v,Xo,le),ba(h,Ko,oe),ba(h,Xo,ae),f.width=Xa(oe*Qo),f.height=Xa(ae*Qo),b.forEach((function(e){var t=e._el,n=e._show,r=e._size,i=e._pos,o=e.side;if(null!=t)if(n){var a=o%2==1;ba(t,a?"left":"top",i-(3===o||0===o?r:0)),ba(t,a?"width":"height",r),ba(t,a?"top":"left",a?se:ce),ba(t,a?"height":"width",a?le:ue),_a(t,Jo)}else ga(t,Jo)})),Oe=Te=Be=Le=Pe=Ie=$e=Re=Me=null,je=1,Wt(!0),on("setSize"),me=!1),oe>0&&ae>0&&(d.clearRect(0,0,f.width,f.height),on("drawClear"),C.forEach((function(e){return e()})),on("draw")),we.show&&ge&&(Vt(null,!0,!1),ge=!1),c||(c=!0,r.status=1,on("ready")),We=!1,Dt=!1}function kt(e,n){var i=D[e];if(null==i.from){if(0==Ne){var o=i.range(r,n.min,n.max,e);n.min=o[0],n.max=o[1]}if(n.min>n.max){var a=n.min;n.min=n.max,n.max=a}if(Ne>1&&null!=n.min&&null!=n.max&&n.max-n.min<1e-16)return;e==x&&2==i.distr&&Ne>0&&(n.min=Ba(n.min,t[0]),n.max=Ba(n.max,t[0]),n.min==n.max&&n.max++),T[e]=n,ve=!0,wt()}}r.redraw=function(e,t){ye=t||!1,!1!==e?Lt(x,N.min,N.max):wt()},r.setScale=kt;var Ct=!1,Et=we.drag,St=Et.x,At=Et.y;we.show&&(we.x&&(lt=wa("u-cursor-x",v)),we.y&&(ct=wa("u-cursor-y",v)),0==N.ori?(st=lt,ft=ct):(st=ct,ft=lt),gt=we.left,bt=we.top);var Ft,Nt,Ot,Tt=r.select=Bu({show:!0,over:!0,left:0,width:0,top:0,height:0},e.select),Bt=Tt.show?wa("u-select",Tt.over?v:p):null;function Mt(e,t){if(Tt.show){for(var n in e)ba(Bt,n,Tt[n]=e[n]);!1!==t&&on("setSelect")}}function Lt(e,t,n){kt(e,{min:t,max:n})}function Pt(e,t,n,o){null!=t.focus&&function(e){if(e!=Ot){var t=null==e,n=1!=ke.alpha;_.forEach((function(r,i){var o=t||0==i||i==e;r._focus=t?null:o,n&&function(e,t){_[e].alpha=t,we.show&&Ee[e]&&(Ee[e].style.opacity=t);H&&q[e]&&(q[e].style.opacity=t)}(i,o?1:ke.alpha)})),Ot=e,n&&wt()}}(e),null!=t.show&&_.forEach((function(n,r){r>0&&(e==r||null==e)&&(n.show=t.show,function(e,t){var n=_[e],r=H?q[e]:null;n.show?r&&_a(r,Jo):(r&&ga(r,Jo),Ee.length>1&&ka(Ee[e],-10,-10,ue,le))}(r,t.show),Lt(2==i?n.facets[1].scale:n.scale,null,null),wt())})),!1!==n&&on("setSeries",e,t),o&&cn("setSeries",r,e,t)}r.setSelect=Mt,r.setSeries=Pt,r.addBand=function(e,t){e.fill=du(e.fill||null),e.dir=Va(e.dir,-1),t=null==t?w.length:t,w.splice(t,0,e)},r.setBand=function(e,t){Bu(w[e],t)},r.delBand=function(e){null==e?w.length=0:w.splice(e,1)};var It={focus:!0};function $t(e,t,n){var r=D[t];n&&(e=e/Qo-(1==r.ori?se:ce));var i=ue;1==r.ori&&(e=(i=le)-e),-1==r.dir&&(e=i-e);var o=r._min,a=o+(r._max-o)*(e/i),u=r.distr;return 3==u?ru(10,a):4==u?function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:1;return Ga.sinh(e)*t}(a,r.asinh):a}function Rt(e,t){ba(Bt,na,Tt.left=e),ba(Bt,Ko,Tt.width=t)}function jt(e,t){ba(Bt,ea,Tt.top=e),ba(Bt,Xo,Tt.height=t)}H&&Ce&&Oa(sa,L,(function(e){we._lock||null!=Ot&&Pt(null,It,!0,an.setSeries)})),r.valToIdx=function(e){return Ba(e,t[0])},r.posToIdx=function(e,n){return Ba($t(e,x,n),t[0],He,Ye)},r.posToVal=$t,r.valToPos=function(e,t,n){return 0==D[t].ori?a(e,D[t],n?he:ue,n?fe:0):u(e,D[t],n?pe:le,n?de:0)},r.batch=function(e){e(r),wt()},r.setCursor=function(e,t,n){gt=e.left,bt=e.top,Vt(null,t,n)};var zt=0==N.ori?Rt:jt,Ut=1==N.ori?Rt:jt;function Ht(e,t){if(null!=e){var n=e.idx;U.idx=n,_.forEach((function(e,t){(t>0||!Q)&&Yt(t,n)}))}H&&U.live&&function(){if(H&&U.live)for(var e=2==i?1:0;e<_.length;e++)if(0!=e||!Q){var t=U.values[e],n=0;for(var r in t)W[e][n++].firstChild.nodeValue=t[r]}}(),_e=!1,!1!==t&&on("setLegend")}function Yt(e,n){var i;if(null==n)i=G;else{var o=_[e],a=0==e&&2==O?qe:t[e];i=Q?o.values(r,e,n):{_:o.value(r,a[n],e,n)}}U.values[e]=i}function Vt(e,n,o){mt=gt,yt=bt;var a,u=_t(we.move(r,gt,bt),2);gt=u[0],bt=u[1],we.show&&(st&&ka(st,Xa(gt),0,ue,le),ft&&ka(ft,0,Xa(bt),ue,le));var l=He>Ye;Ft=lu;var s=0==N.ori?ue:le,f=1==N.ori?ue:le;if(gt<0||0==Ne||l){a=null;for(var d=0;d<_.length;d++)d>0&&Ee.length>1&&ka(Ee[d],-10,-10,ue,le);if(Ce&&Pt(null,It,!0,null==e&&an.setSeries),U.live){z.fill(null),_e=!0;for(var h=0;h<_.length;h++)U.values[h]=G}}else{var p,v;1==i&&(a=Ba(p=$t(0==N.ori?gt:bt,x),t[0],He,Ye),v=gu(A(t[0][a],N,s,0),.5));for(var m=2==i?1:0;m<_.length;m++){var y=_[m],g=z[m],b=1==i?t[m][g]:t[m][1][g],w=we.dataIdx(r,m,a,p),k=1==i?t[m][w]:t[m][1][w];_e=_e||k!=b||w!=g,z[m]=w;var C=w==a?v:gu(A(1==i?t[0][w]:t[m][0][w],N,s,0),.5);if(m>0&&y.show){var E=null==k?-10:gu(F(k,1==i?D[y.scale]:D[y.facets[1].scale],f,0),.5);if(E>0&&1==i){var S=Za(E-bt);S<=Ft&&(Ft=S,Nt=m)}var O=void 0,T=void 0;if(0==N.ori?(O=C,T=E):(O=E,T=C),_e&&Ee.length>1){Ea(Ee[m],we.points.fill(r,m),we.points.stroke(r,m));var B=void 0,M=void 0,L=void 0,P=void 0,I=!0,$=we.points.bbox;if(null!=$){I=!1;var R=$(r,m);L=R.left,P=R.top,B=R.width,M=R.height}else L=O,P=T,B=M=we.points.size(r,m);Aa(Ee[m],B,M,I),ka(Ee[m],L,P,ue,le)}}if(U.live){if(!_e||0==m&&Q)continue;Yt(m,w)}}}if(we.idx=a,we.left=gt,we.top=bt,_e&&(U.idx=a,Ht()),Tt.show&&Ct)if(null!=e){var j=_t(an.scales,2),H=j[0],Y=j[1],V=_t(an.match,2),q=V[0],W=V[1],J=_t(e.cursor.sync.scales,2),Z=J[0],K=J[1],X=e.cursor.drag;if(St=X._x,At=X._y,St||At){var ee,te,ne,re,ie,oe=e.select,ae=oe.left,ce=oe.top,se=oe.width,fe=oe.height,de=e.scales[H].ori,he=e.posToVal,pe=null!=H&&q(H,Z),ve=null!=Y&&W(Y,K);pe&&St?(0==de?(ee=ae,te=se):(ee=ce,te=fe),ne=D[H],re=A(he(ee,Z),ne,s,0),ie=A(he(ee+te,Z),ne,s,0),zt(tu(re,ie),Za(ie-re))):zt(0,s),ve&&At?(1==de?(ee=ae,te=se):(ee=ce,te=fe),ne=D[Y],re=F(he(ee,K),ne,f,0),ie=F(he(ee+te,K),ne,f,0),Ut(tu(re,ie),Za(ie-re))):Ut(0,f)}else Zt()}else{var me=Za(mt-dt),ye=Za(yt-ht);if(1==N.ori){var ge=me;me=ye,ye=ge}St=Et.x&&me>=Et.dist,At=Et.y&&ye>=Et.dist;var be,De,xe=Et.uni;null!=xe?St&&At&&(At=ye>=xe,(St=me>=xe)||At||(ye>me?At=!0:St=!0)):Et.x&&Et.y&&(St||At)&&(St=At=!0),St&&(0==N.ori?(be=pt,De=gt):(be=vt,De=bt),zt(tu(be,De),Za(De-be)),At||Ut(0,f)),At&&(1==N.ori?(be=pt,De=gt):(be=vt,De=bt),Ut(tu(be,De),Za(De-be)),St||zt(0,s)),St||At||(zt(0,0),Ut(0,0))}if(Et._x=St,Et._y=At,null==e){if(o){if(null!=un){var Se=_t(an.scales,2),Ae=Se[0],Fe=Se[1];an.values[0]=null!=Ae?$t(0==N.ori?gt:bt,Ae):null,an.values[1]=null!=Fe?$t(1==N.ori?gt:bt,Fe):null}cn(aa,r,gt,bt,ue,le,a)}if(Ce){var Oe=o&&an.setSeries,Te=ke.prox;null==Ot?Ft<=Te&&Pt(Nt,It,!0,Oe):Ft>Te?Pt(null,It,!0,Oe):Nt!=Ot&&Pt(Nt,It,!0,Oe)}}c&&!1!==n&&on("setCursor")}r.setLegend=Ht;var qt=null;function Wt(e){!0===e?qt=null:on("syncRect",qt=v.getBoundingClientRect())}function Qt(e,t,n,r,i,o,a){we._lock||(Gt(e,t,n,r,i,o,a,!1,null!=e),null!=e?Vt(null,!0,!0):Vt(t,!0,!1))}function Gt(e,t,n,i,o,a,u,c,s){if(null==qt&&Wt(!1),null!=e)n=e.clientX-qt.left,i=e.clientY-qt.top;else{if(n<0||i<0)return gt=-10,void(bt=-10);var f=_t(an.scales,2),d=f[0],h=f[1],p=t.cursor.sync,v=_t(p.values,2),m=v[0],y=v[1],g=_t(p.scales,2),_=g[0],b=g[1],w=_t(an.match,2),x=w[0],k=w[1],C=t.axes[0].side%2==1,E=0==N.ori?ue:le,S=1==N.ori?ue:le,A=C?a:o,F=C?o:a,O=C?i:n,T=C?n:i;if(n=null!=_?x(d,_)?l(m,D[d],E,0):-10:E*(O/A),i=null!=b?k(h,b)?l(y,D[h],S,0):-10:S*(T/F),1==N.ori){var B=n;n=i,i=B}}if(s&&((n<=1||n>=ue-1)&&(n=su(n,ue)),(i<=1||i>=le-1)&&(i=su(i,le))),c){dt=n,ht=i;var M=_t(we.move(r,n,i),2);pt=M[0],vt=M[1]}else gt=n,bt=i}var Jt={width:0,height:0};function Zt(){Mt(Jt,!1)}function Kt(e,t,n,i,o,a,u){Ct=!0,St=At=Et._x=Et._y=!1,Gt(e,t,n,i,o,a,0,!0,!1),null!=e&&(re(la,va,Xt),cn(ua,r,pt,vt,ue,le,null))}function Xt(e,t,n,i,o,a,u){Ct=Et._x=Et._y=!1,Gt(e,t,n,i,o,a,0,!1,!0);var l=Tt.left,c=Tt.top,s=Tt.width,f=Tt.height,d=s>0||f>0;if(d&&Mt(Tt),Et.setScale&&d){var h=l,p=s,v=c,m=f;if(1==N.ori&&(h=c,p=f,v=l,m=s),St&&Lt(x,$t(h,x),$t(h+p,x)),At)for(var y in D){var g=D[y];y!=x&&null==g.from&&g.min!=lu&&Lt(y,$t(v+m,y),$t(v,y))}Zt()}else we.lock&&(we._lock=!we._lock,we._lock||Vt(null,!0,!1));null!=e&&(ie(la,va),cn(la,r,gt,bt,ue,le,null))}function en(e,t,n,i,o,a,u){Ge(),Zt(),null!=e&&cn(fa,r,gt,bt,ue,le,null)}function tn(){b.forEach(jc),be(r.width,r.height,!0)}Oa(ha,ma,tn);var nn={};nn.mousedown=Kt,nn.mousemove=Qt,nn.mouseup=Xt,nn.dblclick=en,nn.setSeries=function(e,t,n,r){Pt(n,r,!0,!1)},we.show&&(re(ua,v,Kt),re(aa,v,Qt),re(ca,v,Wt),re(sa,v,(function(e,t,n,r,i,o,a){if(!we._lock){var u=Ct;if(Ct){var l,c,s=!0,f=!0;0==N.ori?(l=St,c=At):(l=At,c=St),l&&c&&(s=gt<=10||gt>=ue-10,f=bt<=10||bt>=le-10),l&&s&&(gt=gt=3?Hl:pu)),e.font=Rc(e.font),e.labelFont=Rc(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&&(Ae[t]=!0,e._el=wa("u-axis",h))}})),n?n instanceof HTMLElement?(n.appendChild(s),sn()):n(r,sn):sn(),r}zc.assign=Bu,zc.fmtNum=Qa,zc.rangeNum=Ya,zc.rangeLog=Ra,zc.rangeAsinh=ja,zc.orient=tc,zc.pxRatio=Qo,zc.join=function(e,t){for(var n=new Set,r=0;r=o&&A<=a;A+=k){var F=c[A];if(null!=F){var N=_(l[A]),O=b(F);1==t?D(x,N,C):D(x,S,O),D(x,N,O),C=O,S=N}}var T=_t(nc(e,i),2),B=T[0],M=T[1];if(null!=u.fill||0!=B){var L=w.fill=new Path2D(x),P=b(u.fillTo(e,i,u.min,u.max,B));D(L,S,P),D(L,E,P)}if(!u.spanGaps){var I,$=[];(I=$).push.apply(I,bt(ac(l,c,o,a,k,_,r)));var R=u.width*Qo/2,j=n||1==t?R:-R,z=n||-1==t?-R:R;$.forEach((function(e){e[0]+=j,e[1]+=z})),w.gaps=$=u.gaps(e,i,o,a,$),w.clip=oc($,s.ori,p,v,m,y)}return 0!=M&&(w.band=2==M?[ic(e,i,o,a,x,-1),ic(e,i,o,a,x,1)]:ic(e,i,o,a,x,M)),w}))}},Uc.bars=function(e){var t=Va((e=e||ku).size,[.6,lu,1]),n=e.align||0,r=(e.gap||0)*Qo,i=Va(e.radius,0),o=1-t[0],a=Va(t[1],lu)*Qo,u=Va(t[2],1)*Qo,l=Va(e.disp,ku),c=Va(e.each,(function(e){})),s=l.fill,f=l.stroke;return function(e,t,d,h){return tc(e,t,(function(p,v,m,y,g,_,b,D,w,x,k){var C,E,S=p.pxRound,A=y.dir*(0==y.ori?1:-1),F=g.dir*(1==g.ori?1:-1),N=0==y.ori?hc:pc,O=0==y.ori?c:function(e,t,n,r,i,o,a){c(e,t,n,i,r,a,o)},T=_t(nc(e,t),2),B=T[0],M=T[1],L=3==g.distr?1==B?g.max:g.min:0,P=b(L,g,k,w),I=S(p.width*Qo),$=!1,R=null,j=null,z=null,U=null;null==s||0!=I&&null==f||($=!0,R=s.values(e,t,d,h),j=new Map,new Set(R).forEach((function(e){null!=e&&j.set(e,new Path2D)})),I>0&&(z=f.values(e,t,d,h),U=new Map,new Set(z).forEach((function(e){null!=e&&U.set(e,new Path2D)}))));var H=l.x0,Y=l.size;if(null!=H&&null!=Y){v=H.values(e,t,d,h),2==H.unit&&(v=v.map((function(t){return e.posToVal(D+t*x,y.key,!0)})));var V=Y.values(e,t,d,h);E=S((E=2==Y.unit?V[0]*x:_(V[0],y,x,D)-_(0,y,x,D))-I),C=1==A?-I/2:E+I/2}else{var q=x;if(v.length>1)for(var W=null,Q=0,G=1/0;Q=d&&Q<=h;Q+=A){var ie=m[Q];if(void 0!==ie){var oe=_(2!=y.distr||null!=l?v[Q]:Q,y,x,D),ae=b(Va(ie,L),g,k,w);null!=re&&null!=ie&&(P=b(re[Q],g,k,w));var ue=S(oe-C),le=S(nu(ae,P)),ce=S(tu(ae,P)),se=le-ce,fe=i*E;null!=ie&&($?(I>0&&null!=z[Q]&&N(U.get(z[Q]),ue,ce+Ka(I/2),E,nu(0,se-I),fe),null!=R[Q]&&N(j.get(R[Q]),ue,ce+Ka(I/2),E,nu(0,se-I),fe)):N(X,ue,ce+Ka(I/2),E,nu(0,se-I),fe),O(e,t,Q,ue-I/2,ce,E+I,se)),0!=M&&(F*M==1?(le=ce,ce=Z):(ce=le,le=Z),N(ee,ue-I/2,ce,E+I,nu(0,se=le-ce),0))}}return I>0&&(K.stroke=$?U:X),K.fill=$?j:X,K}))}},Uc.spline=function(e){return function(e,t){var n=Va(null===t||void 0===t?void 0:t.alignGaps,0);return function(t,r,i,o){return tc(t,r,(function(a,u,l,c,s,f,d,h,p,v,m){var y,g,_,b=a.pxRound,D=function(e){return b(f(e,c,v,h))},w=function(e){return b(d(e,s,m,p))};0==c.ori?(y=cc,_=fc,g=yc):(y=sc,_=dc,g=gc);var x=c.dir*(0==c.ori?1:-1);i=Ma(l,i,o,1),o=Ma(l,i,o,-1);for(var k=D(u[1==x?i:o]),C=k,E=[],S=[],A=1==x?i:o;A>=i&&A<=o;A+=x)if(null!=l[A]){var F=D(u[A]);E.push(C=F),S.push(w(l[A]))}var N={stroke:e(E,S,y,_,g,b),fill:null,clip:null,band:null,gaps:null,flags:1},O=N.stroke,T=_t(nc(t,r),2),B=T[0],M=T[1];if(null!=a.fill||0!=B){var L=N.fill=new Path2D(O),P=w(a.fillTo(t,r,a.min,a.max,B));_(L,C,P),_(L,k,P)}if(!a.spanGaps){var I,$=[];(I=$).push.apply(I,bt(ac(u,l,i,o,x,D,n))),N.gaps=$=a.gaps(t,r,i,o,$),N.clip=oc($,c.ori,h,p,v,m)}return 0!=M&&(N.band=2==M?[ic(t,r,i,o,O,-1),ic(t,r,i,o,O,1)]:ic(t,r,i,o,O,M)),N}))}}(kc,e)};var Hc,Yc={height:500,legend:{show:!1},cursor:{drag:{x:!0,y:!1},focus:{prox:30},points:{size:5.6,width:1.4},bind:{click:function(){return null},dblclick:function(){return null}}}},Vc=function(e){return void 0===e||null===e?"":e.toLocaleString("en-US",{maximumSignificantDigits:20})},qc=function(e,t,n,r){var i,o=e.axes[n];if(r>1)return o._size||60;var a=6+((null===o||void 0===o||null===(i=o.ticks)||void 0===i?void 0:i.size)||0)+(o.gap||0),u=(null!==t&&void 0!==t?t:[]).reduce((function(e,t){return t.length>e.length?t:e}),"");return""!=u&&(a+=function(e,t){var n=document.createElement("span");n.innerText=e,n.style.cssText="position: absolute; z-index: -1; pointer-events: none; opacity: 0; font: ".concat(t),document.body.appendChild(n);var r=n.offsetWidth;return n.remove(),r}(u,e.ctx.font)),Math.ceil(a)},Wc=function(e){return function(e){for(var t=0,n=0;n>8*i&255).toString(16)).substr(-2);return r}(e)},Qc=function(e){return e.replace(/^\[\d+]/,"").replace(/{.+}/gim,"")},Gc=function(e){for(var t=e.length,n=-1/0;t--;){var r=e[t];Number.isFinite(r)&&r>n&&(n=r)}return Number.isFinite(n)?n:null},Jc=function(e){for(var t=e.length,n=1/0;t--;){var r=e[t];Number.isFinite(r)&&r2&&void 0!==arguments[2]?arguments[2]:"";return t.map((function(e){return"".concat(Vc(e)," ").concat(n)}))}(e,n,t)}};return e?Number(e)%2?n:Kn(Kn({},n),{},{side:1}):{space:80}}))},Kc=function(e,t){if(null==e||null==t)return[-1,1];var n=.02*(Math.abs(t-e)||Math.abs(e)||1);return[e-n,t+n]},Xc=n(61),es=n.n(Xc),ts=function(e){var t=e.u,n=e.id,r=e.unit,i=void 0===r?"":r,o=e.metrics,a=e.series,u=e.tooltipIdx,l=e.tooltipOffset,c=e.isSticky,s=e.onClose,f=re(null),d=_t(X({top:-999,left:-999}),2),h=d[0],p=d[1],v=_t(X(!1),2),y=v[0],g=v[1],_=_t(X(!1),2),b=_[0],D=_[1],w=_t(X(u.seriesIdx),2),x=w[0],k=w[1],C=_t(X(u.dataIdx),2),E=C[0],S=C[1],A=oe((function(){return t.root.querySelector(".u-wrap")}),[t]),F=oe((function(){return ir()(t,["data",x,E],0)}),[t,x,E]),N=oe((function(){return Vc(F)}),[F]),O=oe((function(){return t.data[0][E]}),[t,E]),T=oe((function(){return yr()(new Date(1e3*O)).format("YYYY-MM-DD HH:mm:ss:SSS (Z)")}),[O]),B=oe((function(){var e;return Wc((null===(e=a[x])||void 0===e?void 0:e.label)||"")}),[a,x]),M=oe((function(){var e,t=((null===(e=a[x])||void 0===e?void 0:e.label)||"").replace(/{.+}/gim,"").trim();return Qc(t)}),[]),L=oe((function(){var e,t=(null===(e=o[x-1])||void 0===e?void 0:e.metric)||{},n=Object.keys(t).filter((function(e){return"__name__"!==e}));return n.map((function(e){return"".concat(e,'="').concat(t[e],'"')}))}),[o,x]),P=function(e){if(y){var t=e.clientX,n=e.clientY;p({top:n,left:t})}},I=function(){g(!1)};return te((function(){var e;if(f.current){var n=t.valToPos(F||0,(null===(e=a[x])||void 0===e?void 0:e.scale)||"1"),r=t.valToPos(O,"x"),i=f.current.getBoundingClientRect(),o=i.width,u=i.height,c=t.over.getBoundingClientRect(),s=r+o>=c.width?o+20:0,d=n+u>=c.height?u+20:0;p({top:n+l.top+10-d,left:r+l.left+10-s})}}),[t,F,O,x,l,f]),te((function(){k(u.seriesIdx),S(u.dataIdx)}),[u]),te((function(){return y&&(document.addEventListener("mousemove",P),document.addEventListener("mouseup",I)),function(){document.removeEventListener("mousemove",P),document.removeEventListener("mouseup",I)}}),[y]),!A||u.seriesIdx<0||u.dataIdx<0?null:mt.createPortal(fr("div",{className:Bi()({"vm-chart-tooltip":!0,"vm-chart-tooltip_sticky":c,"vm-chart-tooltip_moved":b}),ref:f,style:h,children:[fr("div",{className:"vm-chart-tooltip-header",children:[fr("div",{className:"vm-chart-tooltip-header__date",children:T}),c&&fr(m,{children:[fr(ho,{className:"vm-chart-tooltip-header__drag",variant:"text",size:"small",startIcon:fr(Oi,{}),onMouseDown:function(e){D(!0),g(!0);var t=e.clientX,n=e.clientY;p({top:n,left:t})}}),fr(ho,{className:"vm-chart-tooltip-header__close",variant:"text",size:"small",startIcon:fr(ai,{}),onClick:function(){s&&s(n)}})]})]}),fr("div",{className:"vm-chart-tooltip-data",children:[fr("div",{className:"vm-chart-tooltip-data__marker",style:{background:B}}),fr("p",{children:[M,":",fr("b",{className:"vm-chart-tooltip-data__value",children:N}),i]})]}),!!L.length&&fr("div",{className:"vm-chart-tooltip-info",children:L.map((function(e,t){return fr("div",{children:e},"".concat(e,"_").concat(t))}))})]}),A)};!function(e){e.xRange="xRange",e.yRange="yRange",e.data="data"}(Hc||(Hc={}));var ns=function(e){var t=e.data,n=e.series,r=e.metrics,i=void 0===r?[]:r,o=e.period,a=e.yaxis,u=e.unit,l=e.setPeriod,c=e.container,s=re(null),f=_t(X(!1),2),d=f[0],p=f[1],v=_t(X({min:o.start,max:o.end}),2),m=v[0],y=v[1],g=_t(X(),2),_=g[0],b=g[1],D=bo(c),w=_t(X(!1),2),x=w[0],k=w[1],C=_t(X({seriesIdx:-1,dataIdx:-1}),2),E=C[0],S=C[1],A=_t(X({left:0,top:0}),2),F=A[0],N=A[1],O=_t(X([]),2),T=O[0],B=O[1],M=oe((function(){return"".concat(E.seriesIdx,"_").concat(E.dataIdx)}),[E]),L=ae(es()((function(e){var t=e.min,n=e.max;l({from:new Date(1e3*t),to:new Date(1e3*n)})}),500),[]),P=function(e){var t=e.u,n=e.min,r=e.max,i=1e3*(r-n);iAr||(t.setScale("x",{min:n,max:r}),y({min:n,max:r}),L({min:n,max:r}))},I=function(e){var t=e.target,n=e.ctrlKey,r=e.metaKey,i=e.key,o=t instanceof HTMLInputElement||t instanceof HTMLTextAreaElement;if(_&&!o){var a="+"===i||"="===i;if(("-"===i||a)&&!n&&!r){e.preventDefault();var u=(m.max-m.min)/10*(a?1:-1);P({u:_,min:m.min+u,max:m.max-u})}}},$=function(){var e="".concat(E.seriesIdx,"_").concat(E.dataIdx),t={id:e,unit:u,series:n,metrics:i,tooltipIdx:E,tooltipOffset:F};if(!T.find((function(t){return t.id===e}))){var r=JSON.parse(JSON.stringify(t));B((function(e){return[].concat(bt(e),[r])}))}},R=function(e){B((function(t){return t.filter((function(t){return t.id!==e}))}))},j=function(){return[m.min,m.max]},z=function(e){var 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;return a.limits.enable?a.limits.range[r]:Kc(t,n)},U=Kn(Kn({},Yc),{},{series:n,axes:Zc([{},{scale:"1"}],u),scales:Kn({},function(){var e={x:{range:j}},t=Object.keys(a.limits.range);return(t.length?t:["1"]).forEach((function(t){e[t]={range:function(e){var n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:0,r=arguments.length>2&&void 0!==arguments[2]?arguments[2]:1;return z(e,n,r,t)}}})),e}()),width:D.width||400,plugins:[{hooks:{ready:function(e){N({left:parseFloat(e.over.style.left),top:parseFloat(e.over.style.top)}),e.over.addEventListener("mousedown",(function(t){var n=t.ctrlKey,r=t.metaKey;0===t.button&&(n||r)&&function(e){var t=e.e,n=e.factor,r=void 0===n?.85:n,i=e.u,o=e.setPanning,a=e.setPlotScale;t.preventDefault(),o(!0);var u=t.clientX,l=i.posToVal(1,"x")-i.posToVal(0,"x"),c=i.scales.x.min||0,s=i.scales.x.max||0,f=function(e){e.preventDefault();var t=l*((e.clientX-u)*r);a({u:i,min:c-t,max:s-t})};document.addEventListener("mousemove",f),document.addEventListener("mouseup",(function e(){o(!1),document.removeEventListener("mousemove",f),document.removeEventListener("mouseup",e)}))}({u:e,e:t,setPanning:p,setPlotScale:P,factor:.9})})),e.over.addEventListener("wheel",(function(t){if(t.ctrlKey||t.metaKey){t.preventDefault();var n=e.over.getBoundingClientRect().width,r=e.cursor.left&&e.cursor.left>0?e.cursor.left:0,i=e.posToVal(r,"x"),o=(e.scales.x.max||0)-(e.scales.x.min||0),a=t.deltaY<0?.9*o:o/.9,u=i-r/n*a,l=u+a;e.batch((function(){return P({u:e,min:u,max:l})}))}}))},setCursor:function(e){var t,n=null!==(t=e.cursor.idx)&&void 0!==t?t:-1;S((function(e){return Kn(Kn({},e),{},{dataIdx:n})}))},setSeries:function(e,t){var n=null!==t&&void 0!==t?t:-1;S((function(e){return Kn(Kn({},e),{},{seriesIdx:n})}))}}}],hooks:{setSelect:[function(e){var t=e.posToVal(e.select.left,"x"),n=e.posToVal(e.select.left+e.select.width,"x");P({u:e,min:t,max:n})}]}}),H=function(e){if(_){switch(e){case Hc.xRange:_.scales.x.range=j;break;case Hc.yRange:Object.keys(a.limits.range).forEach((function(e){_.scales[e]&&(_.scales[e].range=function(t){var n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:0,r=arguments.length>2&&void 0!==arguments[2]?arguments[2]:1;return z(t,n,r,e)})}));break;case Hc.data:_.setData(t)}d||_.redraw()}};return te((function(){return y({min:o.start,max:o.end})}),[o]),te((function(){if(B([]),S({seriesIdx:-1,dataIdx:-1}),s.current){var e=new zc(U,t,s.current);return b(e),y({min:o.start,max:o.end}),e.destroy}}),[s.current,n,D]),te((function(){return window.addEventListener("keydown",I),function(){window.removeEventListener("keydown",I)}}),[m]),te((function(){return H(Hc.data)}),[t]),te((function(){return H(Hc.xRange)}),[m]),te((function(){return H(Hc.yRange)}),[a]),te((function(){var e=-1!==E.dataIdx&&-1!==E.seriesIdx;return k(e),e&&window.addEventListener("click",$),function(){window.removeEventListener("click",$)}}),[E,T]),fr("div",{className:Bi()({"vm-line-chart":!0,"vm-line-chart_panning":d}),children:[fr("div",{className:"vm-line-chart__u-plot",ref:s}),_&&x&&fr(ts,{unit:u,u:_,series:n,metrics:i,tooltipIdx:E,tooltipOffset:F,id:M}),_&&T.map((function(e){return h(ts,Kn(Kn({},e),{},{isSticky:!0,u:_,key:e.id,onClose:R}))}))]})};function rs(){rs=function(){return e};var e={},t=Object.prototype,n=t.hasOwnProperty,r=Object.defineProperty||function(e,t,n){e[t]=n.value},i="function"==typeof Symbol?Symbol:{},o=i.iterator||"@@iterator",a=i.asyncIterator||"@@asyncIterator",u=i.toStringTag||"@@toStringTag";function l(e,t,n){return Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}),e[t]}try{l({},"")}catch(A){l=function(e,t,n){return e[t]=n}}function c(e,t,n,i){var o=t&&t.prototype instanceof d?t:d,a=Object.create(o.prototype),u=new C(i||[]);return r(a,"_invoke",{value:D(e,n,u)}),a}function s(e,t,n){try{return{type:"normal",arg:e.call(t,n)}}catch(A){return{type:"throw",arg:A}}}e.wrap=c;var f={};function d(){}function h(){}function p(){}var v={};l(v,o,(function(){return this}));var m=Object.getPrototypeOf,y=m&&m(m(E([])));y&&y!==t&&n.call(y,o)&&(v=y);var g=p.prototype=d.prototype=Object.create(v);function _(e){["next","throw","return"].forEach((function(t){l(e,t,(function(e){return this._invoke(t,e)}))}))}function b(e,t){function i(r,o,a,u){var l=s(e[r],e,o);if("throw"!==l.type){var c=l.arg,f=c.value;return f&&"object"==At(f)&&n.call(f,"__await")?t.resolve(f.__await).then((function(e){i("next",e,a,u)}),(function(e){i("throw",e,a,u)})):t.resolve(f).then((function(e){c.value=e,a(c)}),(function(e){return i("throw",e,a,u)}))}u(l.arg)}var o;r(this,"_invoke",{value:function(e,n){function r(){return new t((function(t,r){i(e,n,t,r)}))}return o=o?o.then(r,r):r()}})}function D(e,t,n){var r="suspendedStart";return function(i,o){if("executing"===r)throw new Error("Generator is already running");if("completed"===r){if("throw"===i)throw o;return S()}for(n.method=i,n.arg=o;;){var a=n.delegate;if(a){var u=w(a,n);if(u){if(u===f)continue;return u}}if("next"===n.method)n.sent=n._sent=n.arg;else if("throw"===n.method){if("suspendedStart"===r)throw r="completed",n.arg;n.dispatchException(n.arg)}else"return"===n.method&&n.abrupt("return",n.arg);r="executing";var l=s(e,t,n);if("normal"===l.type){if(r=n.done?"completed":"suspendedYield",l.arg===f)continue;return{value:l.arg,done:n.done}}"throw"===l.type&&(r="completed",n.method="throw",n.arg=l.arg)}}}function w(e,t){var n=e.iterator[t.method];if(void 0===n){if(t.delegate=null,"throw"===t.method){if(e.iterator.return&&(t.method="return",t.arg=void 0,w(e,t),"throw"===t.method))return f;t.method="throw",t.arg=new TypeError("The iterator does not provide a 'throw' method")}return f}var r=s(n,e.iterator,t.arg);if("throw"===r.type)return t.method="throw",t.arg=r.arg,t.delegate=null,f;var i=r.arg;return i?i.done?(t[e.resultName]=i.value,t.next=e.nextLoc,"return"!==t.method&&(t.method="next",t.arg=void 0),t.delegate=null,f):i:(t.method="throw",t.arg=new TypeError("iterator result is not an object"),t.delegate=null,f)}function x(e){var t={tryLoc:e[0]};1 in e&&(t.catchLoc=e[1]),2 in e&&(t.finallyLoc=e[2],t.afterLoc=e[3]),this.tryEntries.push(t)}function k(e){var t=e.completion||{};t.type="normal",delete t.arg,e.completion=t}function C(e){this.tryEntries=[{tryLoc:"root"}],e.forEach(x,this),this.reset(!0)}function E(e){if(e){var t=e[o];if(t)return t.call(e);if("function"==typeof e.next)return e;if(!isNaN(e.length)){var r=-1,i=function t(){for(;++r=0;--i){var o=this.tryEntries[i],a=o.completion;if("root"===o.tryLoc)return r("end");if(o.tryLoc<=this.prev){var u=n.call(o,"catchLoc"),l=n.call(o,"finallyLoc");if(u&&l){if(this.prev=0;--r){var i=this.tryEntries[r];if(i.tryLoc<=this.prev&&n.call(i,"finallyLoc")&&this.prev=0;--t){var n=this.tryEntries[t];if(n.finallyLoc===e)return this.complete(n.completion,n.afterLoc),k(n),f}},catch:function(e){for(var t=this.tryEntries.length-1;t>=0;--t){var n=this.tryEntries[t];if(n.tryLoc===e){var r=n.completion;if("throw"===r.type){var i=r.arg;k(n)}return i}}throw new Error("illegal catch attempt")},delegateYield:function(e,t,n){return this.delegate={iterator:E(e),resultName:t,nextLoc:n},"next"===this.method&&(this.arg=void 0),f}},e}function is(e,t,n,r,i,o,a){try{var u=e[o](a),l=u.value}catch(c){return void n(c)}u.done?t(l):Promise.resolve(l).then(r,i)}function os(e){return function(){var t=this,n=arguments;return new Promise((function(r,i){var o=e.apply(t,n);function a(e){is(o,r,i,a,u,"next",e)}function u(e){is(o,r,i,a,u,"throw",e)}a(void 0)}))}}var as=function(e){var t=e.legend,n=e.onChange,r=_t(X(""),2),i=r[0],o=r[1],a=oe((function(){return function(e){var t=Object.keys(e.freeFormFields).filter((function(e){return"__name__"!==e}));return t.map((function(t){var n="".concat(t,'="').concat(e.freeFormFields[t],'"');return{id:"".concat(e.label,".").concat(n),freeField:n,key:t}}))}(t)}),[t]),u=function(){var e=os(rs().mark((function e(t,n){return rs().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,navigator.clipboard.writeText(t);case 2:o(n),setTimeout((function(){return o("")}),2e3);case 4:case"end":return e.stop()}}),e)})));return function(t,n){return e.apply(this,arguments)}}();return fr("div",{className:Bi()({"vm-legend-item":!0,"vm-legend-item_hide":!t.checked}),onClick:function(e){return function(t){n(e,t.ctrlKey||t.metaKey)}}(t),children:[fr("div",{className:"vm-legend-item__marker",style:{backgroundColor:t.color}}),fr("div",{className:"vm-legend-item-info",children:[fr("span",{className:"vm-legend-item-info__label",children:Qc(t.label)}),"\xa0{",a.map((function(e){return fr(mo,{open:i===e.id,title:"Copied!",placement:"top-center",children:fr("span",{className:"vm-legend-item-info__free-fields",onClick:(t=e.freeField,n=e.id,function(e){e.stopPropagation(),u(t,n)}),children:e.freeField},e.key)},e.id);var t,n})),"}"]})]})},us=function(e){var t=e.labels,n=e.query,r=e.onChange,i=oe((function(){return Array.from(new Set(t.map((function(e){return e.group}))))}),[t]);return fr(m,{children:fr("div",{className:"vm-legend",children:i.map((function(e){return fr("div",{className:"vm-legend-group",children:[fr("div",{className:"vm-legend-group-title",children:[fr("span",{className:"vm-legend-group-title__count",children:["Query ",e,": "]}),fr("span",{className:"vm-legend-group-title__query",children:n[e-1]})]}),fr("div",{children:t.filter((function(t){return t.group===e})).map((function(e){return fr(as,{legend:e,onChange:r},e.label)}))})]},e)}))})})};function ls(e,t){if(null==e)return{};var n,r,i=function(e,t){if(null==e)return{};var n,r,i={},o=Object.keys(e);for(r=0;r=0||(i[n]=e[n]);return i}(e,t);if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(e);for(r=0;r=0||Object.prototype.propertyIsEnumerable.call(e,n)&&(i[n]=e[n])}return i}var cs=["__name__"],ss=function(e,t){var n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:": ",r=arguments.length>3&&void 0!==arguments[3]&&arguments[3],i=e.metric,o=i.__name__,a=ls(i,cs),u=t||o||"";return 0===Object.keys(e.metric).length?u||"Result ".concat(e.group):"".concat(u," {").concat(Object.entries(a).map((function(e){return"".concat(e[0]).concat(n).concat(r?'"'.concat(e[1],'"'):e[1])})).join(", "),"}")},fs=function(e,t,n){var r=ss(e,n[e.group-1]),i="[".concat(e.group,"]").concat(r);return{label:i,freeFormFields:e.metric,width:1.4,stroke:Wc(i),show:!hs(i,t),scale:"1",points:{size:4.2,width:1.4}}},ds=function(e,t){return{group:t,label:e.label||"",color:e.stroke,checked:e.show||!1,freeFormFields:e.freeFormFields}},hs=function(e,t){return t.includes("".concat(e))},ps=function(e){switch(e){case"NaN":return NaN;case"Inf":case"+Inf":return 1/0;case"-Inf":return-1/0;default:return parseFloat(e)}},vs=function(e){var t=e.data,n=void 0===t?[]:t,r=e.period,i=e.customStep,o=e.query,a=e.yaxis,u=e.unit,l=e.showLegend,c=void 0===l||l,s=e.setYaxisLimits,f=e.setPeriod,d=e.alias,h=void 0===d?[]:d,p=e.fullWidth,v=void 0===p||p,m=oe((function(){return i||r.step||1}),[r.step,i]),y=_t(X([[]]),2),g=y[0],_=y[1],b=_t(X([]),2),D=b[0],w=b[1],x=_t(X([]),2),k=x[0],C=x[1],E=_t(X([]),2),S=E[0],A=E[1],F=function(e){var t=function(e){var t={},n=Object.values(e).flat(),r=Jc(n),i=Gc(n);return t[1]=Kc(r,i),t}(e);s(t)};te((function(){var e=[],t={},i=[],o=[{}];null===n||void 0===n||n.forEach((function(n){var r=fs(n,S,h);o.push(r),i.push(ds(r,n.group));var a,u=t[n.group]||[],l=Wo(n.values);try{for(l.s();!(a=l.n()).done;){var c=a.value;e.push(c[0]),u.push(ps(c[1]))}}catch(s){l.e(s)}finally{l.f()}t[n.group]=u}));var a=function(e,t,n){for(var r=Array.from(new Set(e)).sort((function(e,t){return e-t})),i=n.start,o=Nr(n.end+t),a=0,u=[];i<=o;){for(;a=r.length||r[a]>i)&&u.push(i)}for(;u.length<2;)u.push(i),i=Nr(i+t);return u}(e,m,r),u=n.map((function(e){var t,n=[],r=e.values,i=r.length,o=0,u=Wo(a);try{for(u.s();!(t=u.n()).done;){for(var l=t.value;o1e10*h?n.map((function(){return f})):n}));u.unshift(a),F(t),_(u),w(o),C(i)}),[n]),te((function(){var e=[],t=[{}];null===n||void 0===n||n.forEach((function(n){var r=fs(n,S,h);t.push(r),e.push(ds(r,n.group))})),w(t),C(e)}),[S]);var N=re(null);return fr("div",{className:Bi()({"vm-graph-view":!0,"vm-graph-view_full-width":v}),ref:N,children:[(null===N||void 0===N?void 0:N.current)&&fr(ns,{data:g,series:D,metrics:n,period:r,yaxis:a,unit:u,setPeriod:f,container:null===N||void 0===N?void 0:N.current}),c&&fr(us,{labels:k,query:o,onChange:function(e,t){A(function(e){var t=e.hideSeries,n=e.legend,r=e.metaKey,i=e.series,o=n.label,a=hs(o,t),u=i.map((function(e){return e.label||""}));return r?a?t.filter((function(e){return e!==o})):[].concat(bt(t),[o]):t.length?a?bt(u.filter((function(e){return e!==o}))):[]:bt(u.filter((function(e){return e!==o})))}({hideSeries:S,legend:e,metaKey:t,series:D}))}})]})},ms=function(e){var t=e.value,n=e.onChange,r=e.onEnter,i=e.onArrowUp,o=e.onArrowDown,a=e.autocomplete,u=e.error,l=e.options,s=e.label,f=e.disabled,d=void 0!==f&&f,h=_t(X(-1),2),p=h[0],v=h[1],m=_t(X(!1),2),y=m[0],g=m[1],_=re(null),b=re(null),D=oe((function(){if(!y)return[];try{var e=new RegExp(String(t),"i");return l.filter((function(n){return e.test(n)&&n!==t})).sort((function(t,n){var r,i;return((null===(r=t.match(e))||void 0===r?void 0:r.index)||0)-((null===(i=n.match(e))||void 0===i?void 0:i.index)||0)}))}catch(c){return[]}}),[y,l,t]),w=function(){g(!1)},x=function(e){return function(){d||(n(e),w())}};return te((function(){if(a){v(-1);var e=(t.match(/[a-zA-Z_:.][a-zA-Z0-9_:.]*/gm)||[]).length;g(a&&t.length>2&&e<=1)}}),[a,t]),te((function(){if(b.current){var e=b.current.childNodes[p];null!==e&&void 0!==e&&e.scrollIntoView&&e.scrollIntoView({block:"center"})}}),[p]),po(_,w,b),fr("div",{className:"vm-query-editor",ref:_,children:[fr(To,{value:t,label:s,type:"textarea",autofocus:!!t,error:u,onKeyDown:function(e){var t=e.key,a=e.ctrlKey,u=e.metaKey,l=e.shiftKey,c=a||u,s="ArrowUp"===t,f="ArrowDown"===t,h="Enter"===t,m="Escape"===t,g=y&&D.length,_=D[p],b=s||f;if((b&&g||b&&c||h&&g)&&e.preventDefault(),s&&g&&!c?v((function(e){return 0===e?0:e-1})):s&&c&&i(),f&&g&&!c?v((function(e){return e>=D.length-1?D.length-1:e+1})):f&&c&&o(),_&&h&&g&&!l&&!c){if(d)return;n(_),w()}else h&&!l&&(r(),w());m&&y&&w()},onChange:n,disabled:d}),fr(vo,{open:y,buttonRef:_,placement:"bottom-left",onClose:w,children:fr("div",{className:"vm-query-editor-autocomplete",ref:b,children:D.map((function(e,t){return fr("div",{className:Bi()({"vm-list__item":!0,"vm-list__item_active":t===p}),id:"$autocomplete$".concat(e),onClick:x(e),children:e},e)}))})})]})},ys=n(936),gs=n.n(ys),_s=function(e){var t=e.defaultStep,n=e.setStep,r=_t(X(t),2),i=r[0],o=r[1],a=_t(X(""),2),u=a[0],l=a[1],c=ae(gs()((function(e){return n(e||1)}),700),[]),s=function(e){e>0?(o(e),c(e),l("")):l("step is out of allowed range")};return te((function(){t&&s(t)}),[t]),fr(To,{label:"Step value",type:"number",value:i,error:u,onChange:function(e){var t=+e;t&&s(t)},endIcon:fr(mo,{title:"Reset step to default",children:fr(ho,{variant:"text",size:"small",startIcon:fr(ui,{}),onClick:function(){s(t||1)}})})})},bs=function(){var e=Xn().serverURL,t=hr().tenantId,n=pr(),r=Qr(),i=_t(X(t||0),2),o=i[0],a=i[1],u=ae(gs()((function(t){var i=Number(t);if(n({type:"SET_TENANT_ID",payload:i}),e){var o=e.replace(/(\/select\/)([\d]+)(\/prometheus)/gim,"$1".concat(i,"$3"));n({type:"SET_SERVER",payload:o}),r({type:"RUN_QUERY"})}}),700),[]);return te((function(){o!==t&&a(t)}),[t]),fr(To,{label:"Tenant ID",type:"number",value:o,onChange:function(e){a(e),u(e)},endIcon:fr(mo,{title:"Define tenant id if you need request to another storage",children:fr(ho,{variant:"text",size:"small",startIcon:fr(li,{})})})})},Ds=function(e){var t,n=e.value,r=void 0!==n&&n,i=e.disabled,o=void 0!==i&&i,a=e.label,u=e.color,l=void 0===u?"secondary":u,c=e.onChange;return fr("div",{className:Bi()((qn(t={"vm-switch":!0,"vm-switch_disabled":o,"vm-switch_active":r},"vm-switch_".concat(l,"_active"),r),qn(t,"vm-switch_".concat(l),l),t)),onClick:function(){o||c(!r)},children:[fr("div",{className:"vm-switch-track",children:fr("div",{className:"vm-switch-track__thumb"})}),a&&fr("span",{className:"vm-switch__label",children:a})]})},ws=function(){var e=Ji(),t=Xn().inputTenantID,n=ni().autocomplete,r=ri(),i=Vi(),o=i.nocache,a=i.isTracingEnabled,u=qi(),l=Wr().period.step;return fr("div",{className:"vm-additional-settings",children:[fr(Ds,{label:"Autocomplete",value:n,onChange:function(){r({type:"TOGGLE_AUTOCOMPLETE"})}}),fr(Ds,{label:"Disable cache",value:o,onChange:function(){u({type:"TOGGLE_NO_CACHE"})}}),fr(Ds,{label:"Trace query",value:a,onChange:function(){u({type:"TOGGLE_QUERY_TRACING"})}}),fr("div",{className:"vm-additional-settings__input",children:fr(_s,{defaultStep:l,setStep:function(t){e({type:"SET_CUSTOM_STEP",payload:t})}})}),!!t&&fr("div",{className:"vm-additional-settings__input",children:fr(bs,{})})]})};var xs=function(e){var t=re();return te((function(){t.current=e}),[e]),t.current},ks=function(e){var t=e.error,n=e.queryOptions,r=e.onHideQuery,i=ni(),o=i.query,a=i.queryHistory,u=i.autocomplete,l=ri(),c=Qr(),s=_t(X(o||[]),2),f=s[0],d=s[1],h=_t(X([]),2),p=h[0],v=h[1],m=xs(f),y=function(){l({type:"SET_QUERY_HISTORY",payload:f.map((function(e,t){var n=a[t]||{values:[]},r=e===n.values[n.values.length-1];return{index:n.values.length-Number(r),values:!r&&e?[].concat(bt(n.values),[e]):n.values}}))}),l({type:"SET_QUERY",payload:f}),c({type:"RUN_QUERY"})},g=function(e,t){d((function(n){return n.map((function(n,r){return r===t?e:n}))}))},_=function(e,t){return function(){!function(e,t){var n=a[t],r=n.index,i=n.values,o=r+e;o<0||o>=i.length||(g(i[o]||"",t),l({type:"SET_QUERY_HISTORY_BY_INDEX",payload:{value:{values:i,index:o},queryNumber:t}}))}(e,t)}},b=function(e){return function(t){g(t,e)}},D=function(e){return function(){var t;t=e,d((function(e){return e.filter((function(e,n){return n!==t}))})),v((function(t){return t.map((function(t){return t>e?t-1:t}))}))}},w=function(e){return function(){var t;t=e,v((function(e){return e.includes(t)?e.filter((function(e){return e!==t})):[].concat(bt(e),[t])}))}};return te((function(){m&&f.length1&&fr(mo,{title:"Remove Query",children:fr("div",{className:"vm-query-configurator-list-row__button",children:fr(ho,{variant:"text",color:"error",startIcon:fr(Ci,{}),onClick:D(r)})})})]},r)}))}),fr("div",{className:"vm-query-configurator-settings",children:[fr(ws,{}),fr("div",{className:"vm-query-configurator-settings__buttons",children:[f.length<4&&fr(ho,{variant:"outlined",onClick:function(){d((function(e){return[].concat(bt(e),[""])}))},startIcon:fr(Ei,{}),children:"Add Query"}),fr(ho,{variant:"contained",onClick:y,startIcon:fr(bi,{}),children:"Execute Query"})]})]})]})};function Cs(e){var t,n,r,i=2;for("undefined"!=typeof Symbol&&(n=Symbol.asyncIterator,r=Symbol.iterator);i--;){if(n&&null!=(t=e[n]))return t.call(e);if(r&&null!=(t=e[r]))return new Es(t.call(e));n="@@asyncIterator",r="@@iterator"}throw new TypeError("Object is not async iterable")}function Es(e){function t(e){if(Object(e)!==e)return Promise.reject(new TypeError(e+" is not an object."));var t=e.done;return Promise.resolve(e.value).then((function(e){return{value:e,done:t}}))}return Es=function(e){this.s=e,this.n=e.next},Es.prototype={s:null,n:null,next:function(){return t(this.n.apply(this.s,arguments))},return:function(e){var n=this.s.return;return void 0===n?Promise.resolve({value:e,done:!0}):t(n.apply(this.s,arguments))},throw:function(e){var n=this.s.return;return void 0===n?Promise.reject(e):t(n.apply(this.s,arguments))}},new Es(e)}var Ss=0,As=function(){function e(t,n){Dt(this,e),this.tracing=void 0,this.query=void 0,this.tracingChildren=void 0,this.originalTracing=void 0,this.id=void 0,this.tracing=t,this.originalTracing=JSON.parse(JSON.stringify(t)),this.query=n,this.id=Ss++;var r=t.children||[];this.tracingChildren=r.map((function(t){return new e(t,n)}))}return xt(e,[{key:"queryValue",get:function(){return this.query}},{key:"idValue",get:function(){return this.id}},{key:"children",get:function(){return this.tracingChildren}},{key:"message",get:function(){return this.tracing.message}},{key:"duration",get:function(){return this.tracing.duration_msec}},{key:"JSON",get:function(){return JSON.stringify(this.tracing,null,2)}},{key:"originalJSON",get:function(){return JSON.stringify(this.originalTracing,null,2)}},{key:"setTracing",value:function(t){var n=this;this.tracing=t;var r=t.children||[];this.tracingChildren=r.map((function(t){return new e(t,n.query)}))}},{key:"setQuery",value:function(e){this.query=e}},{key:"resetTracing",value:function(){this.tracing=this.originalTracing}}]),e}(),Fs=function(e){var t=e.predefinedQuery,n=e.visible,r=e.display,i=e.customStep,o=e.hideQuery,a=e.showAllSeries,u=ni().query,l=Wr().period,c=Vi(),s=c.displayType,f=c.nocache,d=c.isTracingEnabled,h=c.seriesLimits,p=hr().serverUrl,v=_t(X(!1),2),m=v[0],y=v[1],g=_t(X(),2),_=g[0],b=g[1],D=_t(X(),2),w=D[0],x=D[1],k=_t(X(),2),C=k[0],E=k[1],S=_t(X(),2),A=S[0],F=S[1],N=_t(X(),2),O=N[0],T=N[1],B=_t(X([]),2),M=B[0],L=B[1];te((function(){A&&(b(void 0),x(void 0),E(void 0))}),[A]);var P=function(){var e=os(rs().mark((function e(t){var n,r,i,o,a,u,l,c,s,f,d,h;return rs().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return n=t.fetchUrl,r=t.fetchQueue,i=t.displayType,o=t.query,a=t.stateSeriesLimits,u=t.showAllSeries,l=new AbortController,L([].concat(bt(r),[l])),e.prev=3,e.delegateYield(rs().mark((function e(){var t,r,p,v,m,y,g,_,D,w,k,C;return rs().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:t="chart"===i,r=u?1/0:a[i],p=[],v=[],m=1,y=0,c=!1,s=!1,e.prev=8,d=Cs(n);case 10:return e.next=12,d.next();case 12:if(!(c=!(h=e.sent).done)){e.next=24;break}return g=h.value,e.next=16,fetch(g,{signal:l.signal});case 16:return _=e.sent,e.next=19,_.json();case 19:D=e.sent,_.ok?(F(void 0),D.trace&&(w=new As(D.trace,o[m-1]),v.push(w)),k=r-p.length,D.data.result.slice(0,k).forEach((function(e){e.group=m,p.push(e)})),y+=D.data.result.length,m++):F("".concat(D.errorType,"\r\n").concat(null===D||void 0===D?void 0:D.error));case 21:c=!1,e.next=10;break;case 24:e.next=30;break;case 26:e.prev=26,e.t0=e.catch(8),s=!0,f=e.t0;case 30:if(e.prev=30,e.prev=31,!c||null==d.return){e.next=35;break}return e.next=35,d.return();case 35:if(e.prev=35,!s){e.next=38;break}throw f;case 38:return e.finish(35);case 39:return e.finish(30);case 40:C="Showing ".concat(r," series out of ").concat(y," series due to performance reasons. Please narrow down the query, so it returns less series"),T(y>r?C:""),t?b(p):x(p),E(v);case 44:case"end":return e.stop()}}),e,null,[[8,26,30,40],[31,,35,39]])}))(),"t0",5);case 5:e.next=10;break;case 7:e.prev=7,e.t1=e.catch(3),e.t1 instanceof Error&&"AbortError"!==e.t1.name&&F("".concat(e.t1.name,": ").concat(e.t1.message));case 10:y(!1);case 11:case"end":return e.stop()}}),e,null,[[3,7]])})));return function(t){return e.apply(this,arguments)}}(),I=ae(gs()(P,800),[]),$=function(e,t){var n=e.trim(),r=!o||!o.includes(t);return n&&r},R=oe((function(){var e=null!==t&&void 0!==t?t:u,n="chart"===(r||s);if(l)if(p)if(e.every((function(e){return!e.trim()})))F(Co.validQuery);else{if(Bo(p)){var o=Kn({},l);return o.step=i,e.filter($).map((function(e){return n?function(e,t,n,r,i){return"".concat(e,"/api/v1/query_range?query=").concat(encodeURIComponent(t),"&start=").concat(n.start,"&end=").concat(n.end,"&step=").concat(n.step).concat(r?"&nocache=1":"").concat(i?"&trace=1":"")}(p,e,o,f,d):function(e,t,n,r){return"".concat(e,"/api/v1/query?query=").concat(encodeURIComponent(t),"&time=").concat(n.end,"&step=").concat(n.step).concat(r?"&trace=1":"")}(p,e,o,d)}))}F(Co.validServer)}else F(Co.emptyServer)}),[p,l,s,i,o]);return te((function(){n&&null!==R&&void 0!==R&&R.length&&(y(!0),I({fetchUrl:R,fetchQueue:M,displayType:r||s,query:null!==t&&void 0!==t?t:u,stateSeriesLimits:h,showAllSeries:a}))}),[R,n,h,a]),te((function(){var e=M.slice(0,-1);e.length&&(e.map((function(e){return e.abort()})),L(M.filter((function(e){return!e.signal.aborted}))))}),[M]),{fetchUrl:R,isLoading:m,graphData:_,liveData:w,error:A,warning:O,traces:C}},Ns=function(e){var t=e.data,n=so().showInfoMessage,r=oe((function(){return JSON.stringify(t,null,2)}),[t]);return fr("div",{className:"vm-json-view",children:[fr("div",{className:"vm-json-view__copy",children:fr(ho,{variant:"outlined",onClick:function(){navigator.clipboard.writeText(r),n({text:"Formatted JSON has been copied",type:"success"})},children:"Copy JSON"})}),fr("pre",{className:"vm-json-view__code",children:fr("code",{children:r})})]})},Os=function(e){var t=e.yaxis,n=e.setYaxisLimits,r=e.toggleEnableLimits,i=oe((function(){return Object.keys(t.limits.range)}),[t.limits.range]),o=ae(gs()((function(e,r,i){var o=t.limits.range;o[r][i]=+e,o[r][0]===o[r][1]||o[r][0]>o[r][1]||n(o)}),500),[t.limits.range]),a=function(e,t){return function(n){o(n,e,t)}};return fr("div",{className:"vm-axes-limits",children:[fr(Ds,{value:t.limits.enable,onChange:r,label:"Fix the limits for y-axis"}),fr("div",{className:"vm-axes-limits-list",children:i.map((function(e){return fr("div",{className:"vm-axes-limits-list__inputs",children:[fr(To,{label:"Min ".concat(e),type:"number",disabled:!t.limits.enable,value:t.limits.range[e][0],onChange:a(e,0)}),fr(To,{label:"Max ".concat(e),type:"number",disabled:!t.limits.enable,value:t.limits.range[e][1],onChange:a(e,1)})]},e)}))})]})},Ts="Axes settings",Bs=function(e){var t=e.yaxis,n=e.setYaxisLimits,r=e.toggleEnableLimits,i=re(null),o=_t(X(!1),2),a=o[0],u=o[1],l=re(null);po(i,(function(){return u(!1)}),l);var c=function(){u(!1)};return fr("div",{className:"vm-graph-settings",children:[fr(mo,{title:Ts,children:fr("div",{ref:l,children:fr(ho,{variant:"text",startIcon:fr(oi,{}),onClick:function(){u((function(e){return!e}))}})})}),fr(vo,{open:a,buttonRef:l,placement:"bottom-right",onClose:c,children:fr("div",{className:"vm-graph-settings-popper",ref:i,children:[fr("div",{className:"vm-popper-header",children:[fr("h3",{className:"vm-popper-header__title",children:Ts}),fr(ho,{size:"small",startIcon:fr(ai,{}),onClick:c})]}),fr("div",{className:"vm-graph-settings-popper__body",children:fr(Os,{yaxis:t,setYaxisLimits:n,toggleEnableLimits:r})})]})})]})},Ms=function(e){var t=e.containerStyles,n=void 0===t?{}:t,r=e.message;return fr("div",{className:"vm-spinner",style:n&&{},children:[fr("div",{className:"half-circle-spinner",children:[fr("div",{className:"circle circle-1"}),fr("div",{className:"circle circle-2"})]}),r&&fr("div",{className:"vm-spinner__message",children:r})]})},Ls=function(){var e=hr().serverUrl,t=_t(X([]),2),n=t[0],r=t[1],i=function(){var t=os(rs().mark((function t(){var n,i,o;return rs().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:if(e){t.next=2;break}return t.abrupt("return");case 2:return n="".concat(e,"/api/v1/label/__name__/values"),t.prev=3,t.next=6,fetch(n);case 6:return i=t.sent,t.next=9,i.json();case 9:o=t.sent,i.ok&&r(o.data),t.next=16;break;case 13:t.prev=13,t.t0=t.catch(3),console.error(t.t0);case 16:case"end":return t.stop()}}),t,null,[[3,13]])})));return function(){return t.apply(this,arguments)}}();return te((function(){i()}),[e]),{queryOptions:n}},Ps=function(e){var t=e.value;return fr("div",{className:"vm-line-progress",children:[fr("div",{className:"vm-line-progress-track",children:fr("div",{className:"vm-line-progress-track__thumb",style:{width:"".concat(t,"%")}})}),fr("span",{children:[t.toFixed(2),"%"]})]})},Is=function e(t){var n,r=t.trace,i=t.totalMsec,o=_t(X({}),2),a=o[0],u=o[1],l=r.children&&!!r.children.length,c=r.duration/i*100;return fr("div",{className:"vm-nested-nav",children:[fr("div",{className:"vm-nested-nav-header",onClick:(n=r.idValue,function(){u((function(e){return Kn(Kn({},e),{},qn({},n,!e[n]))}))}),children:[l&&fr("div",{className:Bi()({"vm-nested-nav-header__icon":!0,"vm-nested-nav-header__icon_open":a[r.idValue]}),children:fr(pi,{})}),fr("div",{className:"vm-nested-nav-header__progress",children:fr(Ps,{value:c})}),fr("div",{className:"vm-nested-nav-header__message",children:r.message}),fr("div",{className:"vm-nested-nav-header__duration",children:"duration: ".concat(r.duration," ms")})]}),a[r.idValue]&&fr("div",{children:l&&r.children.map((function(t){return fr(e,{trace:t,totalMsec:i},t.duration)}))})]})},$s=function(e){var t=e.editable,n=void 0!==t&&t,r=e.defaultTile,i=void 0===r?"JSON":r,o=e.displayTitle,a=void 0===o||o,u=e.defaultJson,l=void 0===u?"":u,s=e.resetValue,f=void 0===s?"":s,d=e.onClose,h=e.onUpload,p=so().showInfoMessage,v=_t(X(l),2),m=v[0],y=v[1],g=_t(X(i),2),_=g[0],b=g[1],D=_t(X(""),2),w=D[0],x=D[1],k=_t(X(""),2),C=k[0],E=k[1],S=oe((function(){try{var e=JSON.parse(m),t=e.trace||e;return t.duration_msec?(new As(t,""),""):Co.traceNotFound}catch(c){return c instanceof Error?c.message:"Unknown error"}}),[m]),A=function(){var e=os(rs().mark((function e(){return rs().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,navigator.clipboard.writeText(m);case 2:p({text:"Formatted JSON has been copied",type:"success"});case 3:case"end":return e.stop()}}),e)})));return function(){return e.apply(this,arguments)}}(),F=function(){E(S),_.trim()||x(Co.emptyTitle),S||w||(h(m,_),d())};return fr("div",{className:Bi()({"vm-json-form":!0,"vm-json-form_one-field":!a}),children:[a&&fr(To,{value:_,label:"Title",error:w,onEnter:F,onChange:function(e){b(e)}}),fr(To,{value:m,label:"JSON",type:"textarea",error:C,autofocus:!0,onChange:function(e){E(""),y(e)},disabled:!n}),fr("div",{className:"vm-json-form-footer",children:[fr("div",{className:"vm-json-form-footer__controls",children:[fr(ho,{variant:"outlined",startIcon:fr(Ni,{}),onClick:A,children:"Copy JSON"}),f&&fr(ho,{variant:"text",startIcon:fr(ui,{}),onClick:function(){y(f)},children:"Reset JSON"})]}),fr("div",{className:"vm-json-form-footer__controls vm-json-form-footer__controls_right",children:[fr(ho,{variant:"outlined",color:"error",onClick:d,children:"Cancel"}),fr(ho,{variant:"contained",onClick:F,children:"apply"})]})]})]})},Rs=function(e){var t=e.traces,n=e.jsonEditor,r=void 0!==n&&n,i=e.onDeleteClick,o=_t(X(null),2),a=o[0],u=o[1],l=function(){u(null)};if(!t.length)return fr(lo,{variant:"info",children:"Please re-run the query to see results of the tracing"});var s=function(e){return function(){i(e)}};return fr(m,{children:[fr("div",{className:"vm-tracings-view",children:t.map((function(e){return fr("div",{className:"vm-tracings-view-trace vm-block vm-block_empty-padding",children:[fr("div",{className:"vm-tracings-view-trace-header",children:[fr("h3",{className:"vm-tracings-view-trace-header-title",children:["Trace for ",fr("b",{className:"vm-tracings-view-trace-header-title__query",children:e.queryValue})]}),fr(mo,{title:"Open JSON",children:fr(ho,{variant:"text",startIcon:fr(ki,{}),onClick:(t=e,function(){u(t)})})}),fr(mo,{title:"Remove trace",children:fr(ho,{variant:"text",color:"error",startIcon:fr(Ci,{}),onClick:s(e)})})]}),fr("nav",{className:"vm-tracings-view-trace__nav",children:fr(Is,{trace:e,totalMsec:e.duration})})]},e.idValue);var t}))}),a&&fr(Lo,{title:a.queryValue,onClose:l,children:fr($s,{editable:r,displayTitle:r,defaultTile:a.queryValue,defaultJson:a.JSON,resetValue:a.originalJSON,onClose:l,onUpload:function(e,t){if(r&&a)try{a.setTracing(JSON.parse(e)),a.setQuery(t),u(null)}catch(c){console.error(c)}}})})]})},js=function(e,t){return oe((function(){var n={};e.forEach((function(e){return Object.entries(e.metric).forEach((function(e){return n[e[0]]?n[e[0]].options.add(e[1]):n[e[0]]={options:new Set([e[1]])}}))}));var r=Object.entries(n).map((function(e){return{key:e[0],variations:e[1].options.size}})).sort((function(e,t){return e.variations-t.variations}));return t?r.filter((function(e){return t.includes(e.key)})):r}),[e,t])},zs=function(e){var t,n=e.checked,r=void 0!==n&&n,i=e.disabled,o=void 0!==i&&i,a=e.label,u=e.color,l=void 0===u?"secondary":u,c=e.onChange;return fr("div",{className:Bi()((qn(t={"vm-checkbox":!0,"vm-checkbox_disabled":o,"vm-checkbox_active":r},"vm-checkbox_".concat(l,"_active"),r),qn(t,"vm-checkbox_".concat(l),l),t)),onClick:function(){o||c(!r)},children:[fr("div",{className:"vm-checkbox-track",children:fr("div",{className:"vm-checkbox-track__thumb",children:fr(Si,{})})}),a&&fr("span",{className:"vm-checkbox__label",children:a})]})},Us="Table settings",Hs=function(e){var t=e.data,n=e.defaultColumns,r=void 0===n?[]:n,i=e.onChange,o=Vi().tableCompact,a=qi(),u=js(t),l=re(null),c=_t(X(!1),2),s=c[0],f=c[1],d=oe((function(){return!u.length}),[u]),h=function(){f(!1)},p=function(e){return function(){!function(e){i(r.includes(e)?r.filter((function(t){return t!==e})):[].concat(bt(r),[e]))}(e)}};return te((function(){var e=u.map((function(e){return e.key}));(function(e,t){return e.length===t.length&&e.every((function(e,n){return e===t[n]}))})(e,r)||i(e)}),[u]),fr("div",{className:"vm-table-settings",children:[fr(mo,{title:Us,children:fr("div",{ref:l,children:fr(ho,{variant:"text",startIcon:fr(oi,{}),onClick:function(){f((function(e){return!e}))},disabled:d})})}),fr(vo,{open:s,onClose:h,placement:"bottom-right",buttonRef:l,children:fr("div",{className:"vm-table-settings-popper",children:[fr("div",{className:"vm-popper-header",children:[fr("h3",{className:"vm-popper-header__title",children:Us}),fr(ho,{onClick:h,startIcon:fr(ai,{}),size:"small"})]}),fr("div",{className:"vm-table-settings-popper-list",children:fr(Ds,{label:"Compact view",value:o,onChange:function(){a({type:"TOGGLE_TABLE_COMPACT"})}})}),fr("div",{className:"vm-table-settings-popper-list",children:[fr("div",{className:"vm-table-settings-popper-list-header",children:[fr("h3",{className:"vm-table-settings-popper-list-header__title",children:"Display columns"}),fr(mo,{title:"Reset to default",children:fr(ho,{color:"primary",variant:"text",size:"small",onClick:function(){f(!1),i(u.map((function(e){return e.key})))},startIcon:fr(ui,{})})})]}),u.map((function(e){return fr("div",{className:"vm-table-settings-popper-list__item",children:fr(zs,{checked:r.includes(e.key),onChange:p(e.key),label:e.key,disabled:o})},e.key)}))]})]})})]})};function Ys(e){return function(e,t){return Object.fromEntries(Object.entries(e).filter(t))}(e,(function(e){return!!e[1]}))}var Vs=["__name__"],qs=function(e){var t=e.data,n=e.displayColumns,r=so().showInfoMessage,i=Vi().tableCompact,o=bo(document.body),a=re(null),u=_t(X(0),2),l=u[0],c=u[1],s=_t(X(0),2),f=s[0],d=s[1],h=_t(X(""),2),p=h[0],v=h[1],m=_t(X("asc"),2),y=m[0],g=m[1],_=i?js([{group:0,metric:{Data:"Data"}}],["Data"]):js(t,n),b=function(e){var t=e.__name__,n=ls(e,Vs);return t||Object.keys(n).length?"".concat(t," ").concat(JSON.stringify(n)):""},D=oe((function(){var e=null===t||void 0===t?void 0:t.map((function(e){return{metadata:_.map((function(t){return i?ss(e,void 0,"=",!0):e.metric[t.key]||"-"})),value:e.value?e.value[1]:"-",copyValue:b(e.metric)}})),n="Value"===p,r=_.findIndex((function(e){return e.key===p}));return n||-1!==r?e.sort((function(e,t){var i=n?Number(e.value):e.metadata[r],o=n?Number(t.value):t.metadata[r];return("asc"===y?io)?-1:1})):e}),[_,t,p,y,i]),w=oe((function(){return D.some((function(e){return e.copyValue}))}),[D]),x=function(){var e=os(rs().mark((function e(t){return rs().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,navigator.clipboard.writeText(t);case 2:r({text:"Row has been copied",type:"success"});case 3:case"end":return e.stop()}}),e)})));return function(t){return e.apply(this,arguments)}}(),k=function(e){return function(){!function(e){g((function(t){return"asc"===t&&p===e?"desc":"asc"})),v(e)}(e)}},C=function(){if(a.current){var e=a.current.getBoundingClientRect().top;d(e<0?window.scrollY-l:0)}};return te((function(){return window.addEventListener("scroll",C),function(){window.removeEventListener("scroll",C)}}),[a,l,o]),te((function(){if(a.current){var e=a.current.getBoundingClientRect().top;c(e+window.scrollY)}}),[a,o]),D.length?fr("div",{className:"vm-table-view",children:fr("table",{className:"vm-table",ref:a,children:[fr("thead",{className:"vm-table-header",children:fr("tr",{className:"vm-table__row vm-table__row_header",style:{transform:"translateY(".concat(f,"px)")},children:[_.map((function(e,t){return fr("td",{className:"vm-table-cell vm-table-cell_header vm-table-cell_sort",onClick:k(e.key),children:fr("div",{className:"vm-table-cell__content",children:[e.key,fr("div",{className:Bi()({"vm-table__sort-icon":!0,"vm-table__sort-icon_active":p===e.key,"vm-table__sort-icon_desc":"desc"===y&&p===e.key}),children:fr(vi,{})})]})},t)})),fr("td",{className:"vm-table-cell vm-table-cell_header vm-table-cell_right vm-table-cell_sort",onClick:k("Value"),children:fr("div",{className:"vm-table-cell__content",children:[fr("div",{className:Bi()({"vm-table__sort-icon":!0,"vm-table__sort-icon_active":"Value"===p,"vm-table__sort-icon_desc":"desc"===y}),children:fr(vi,{})}),"Value"]})}),w&&fr("td",{className:"vm-table-cell vm-table-cell_header"})]})}),fr("tbody",{className:"vm-table-body",children:D.map((function(e,t){return fr("tr",{className:"vm-table__row",children:[e.metadata.map((function(e,n){return fr("td",{className:Bi()({"vm-table-cell vm-table-cell_no-wrap":!0,"vm-table-cell_gray":D[t-1]&&D[t-1].metadata[n]===e}),children:e},n)})),fr("td",{className:"vm-table-cell vm-table-cell_right",children:e.value}),w&&fr("td",{className:"vm-table-cell vm-table-cell_right",children:e.copyValue&&fr("div",{className:"vm-table-cell__content",children:fr(mo,{title:"Copy row",children:fr(ho,{variant:"text",color:"gray",size:"small",startIcon:fr(Ni,{}),onClick:(n=e.copyValue,function(){x(n)})})})})})]},t);var n}))})]})}):fr(lo,{variant:"warning",children:"No data to show"})},Ws=function(){var e=Vi(),t=e.displayType,n=e.isTracingEnabled,r=ni().query,i=Wr().period,o=Qr();!function(){var e=hr().tenantId,t=Vi().displayType,n=ni().query,r=Wr(),i=r.duration,o=r.relativeTime,a=r.period,u=a.date,l=a.step,c=function(){var r={};n.forEach((function(n,a){var c,s="g".concat(a);r["".concat(s,".expr")]=n,r["".concat(s,".range_input")]=i,r["".concat(s,".end_input")]=u,r["".concat(s,".step_input")]=l,r["".concat(s,".tab")]=(null===(c=Ii.find((function(e){return e.value===t})))||void 0===c?void 0:c.prometheusCode)||0,r["".concat(s,".relative_time")]=o,r["".concat(s,".tenantID")]=e})),ar(Ys(r))};te(c,[e,t,n,i,o,u,l]),te(c,[])}();var a=_t(X(),2),u=a[0],l=a[1],c=_t(X([]),2),s=c[0],f=c[1],d=_t(X([]),2),h=d[0],p=d[1],v=_t(X(!1),2),m=v[0],y=v[1],g=ue(Gi).state,_=g.customStep,b=g.yaxis,D=Ji(),w=Ls().queryOptions,x=Fs({visible:!0,customStep:_,hideQuery:h,showAllSeries:m}),k=x.isLoading,C=x.liveData,E=x.graphData,S=x.error,A=x.warning,F=x.traces,N=function(e){D({type:"SET_YAXIS_LIMITS",payload:e})};return te((function(){F&&f([].concat(bt(s),bt(F)))}),[F]),te((function(){f([])}),[t]),te((function(){y(!1)}),[r]),fr("div",{className:"vm-custom-panel",children:[fr(ks,{error:S,queryOptions:w,onHideQuery:function(e){p(e)}}),n&&fr("div",{className:"vm-custom-panel__trace",children:fr(Rs,{traces:s,onDeleteClick:function(e){var t=s.filter((function(t){return t.idValue!==e.idValue}));f(bt(t))}})}),k&&fr(Ms,{}),S&&fr(lo,{variant:"error",children:S}),A&&fr(lo,{variant:"warning",children:fr("div",{className:"vm-custom-panel__warning",children:[fr("p",{children:A}),fr(ho,{color:"warning",variant:"outlined",onClick:function(){y(!0)},children:"Show all"})]})}),fr("div",{className:"vm-custom-panel-body vm-block",children:[fr("div",{className:"vm-custom-panel-body-header",children:[fr($i,{}),"chart"===t&&fr(Bs,{yaxis:b,setYaxisLimits:N,toggleEnableLimits:function(){D({type:"TOGGLE_ENABLE_YAXIS_LIMITS"})}}),"table"===t&&fr(Hs,{data:C||[],defaultColumns:u,onChange:l})]}),E&&i&&"chart"===t&&fr(vs,{data:E,period:i,customStep:_,query:r,yaxis:b,setYaxisLimits:N,setPeriod:function(e){var t=e.from,n=e.to;o({type:"SET_PERIOD",payload:{from:t,to:n}})}}),C&&"code"===t&&fr(Ns,{data:C}),C&&"table"===t&&fr(qs,{data:C,displayColumns:u})]})]})},Qs=function(){var e=os(rs().mark((function e(t){var n,r;return rs().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,fetch("./dashboards/".concat(t));case 2:return n=e.sent,e.next=5,n.json();case 5:return r=e.sent,e.abrupt("return",r);case 7:case"end":return e.stop()}}),e)})));return function(t){return e.apply(this,arguments)}}(),Gs=os(rs().mark((function e(){var t;return rs().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return t=window.__VMUI_PREDEFINED_DASHBOARDS__,e.next=3,Promise.all(t.map(function(){var e=os(rs().mark((function e(t){return rs().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.abrupt("return",Qs(t));case 1:case"end":return e.stop()}}),e)})));return function(t){return e.apply(this,arguments)}}()));case 3:return e.abrupt("return",e.sent);case 4:case"end":return e.stop()}}),e)})));function Js(){return{async:!1,baseUrl:null,breaks:!1,extensions:null,gfm:!0,headerIds:!0,headerPrefix:"",highlight:null,langPrefix:"language-",mangle:!0,pedantic:!1,renderer:null,sanitize:!1,sanitizer:null,silent:!1,smartypants:!1,tokenizer:null,walkTokens:null,xhtml:!1}}var Zs={async:!1,baseUrl:null,breaks:!1,extensions:null,gfm:!0,headerIds:!0,headerPrefix:"",highlight:null,langPrefix:"language-",mangle:!0,pedantic:!1,renderer:null,sanitize:!1,sanitizer:null,silent:!1,smartypants:!1,tokenizer:null,walkTokens:null,xhtml:!1};var Ks=/[&<>"']/,Xs=/[&<>"']/g,ef=/[<>"']|&(?!#?\w+;)/,tf=/[<>"']|&(?!#?\w+;)/g,nf={"&":"&","<":"<",">":">",'"':""","'":"'"},rf=function(e){return nf[e]};function of(e,t){if(t){if(Ks.test(e))return e.replace(Xs,rf)}else if(ef.test(e))return e.replace(tf,rf);return e}var af=/&(#(?:\d+)|(?:#x[0-9A-Fa-f]+)|(?:\w+));?/gi;function uf(e){return e.replace(af,(function(e,t){return"colon"===(t=t.toLowerCase())?":":"#"===t.charAt(0)?"x"===t.charAt(1)?String.fromCharCode(parseInt(t.substring(2),16)):String.fromCharCode(+t.substring(1)):""}))}var lf=/(^|[^\[])\^/g;function cf(e,t){e="string"===typeof e?e:e.source,t=t||"";var n={replace:function(t,r){return r=(r=r.source||r).replace(lf,"$1"),e=e.replace(t,r),n},getRegex:function(){return new RegExp(e,t)}};return n}var sf=/[^\w:]/g,ff=/^$|^[a-z][a-z0-9+.-]*:|^[?#]/i;function df(e,t,n){if(e){var r;try{r=decodeURIComponent(uf(n)).replace(sf,"").toLowerCase()}catch(c){return null}if(0===r.indexOf("javascript:")||0===r.indexOf("vbscript:")||0===r.indexOf("data:"))return null}t&&!ff.test(n)&&(n=function(e,t){hf[" "+e]||(pf.test(e)?hf[" "+e]=e+"/":hf[" "+e]=bf(e,"/",!0));var n=-1===(e=hf[" "+e]).indexOf(":");return"//"===t.substring(0,2)?n?t:e.replace(vf,"$1")+t:"/"===t.charAt(0)?n?t:e.replace(mf,"$1")+t:e+t}(t,n));try{n=encodeURI(n).replace(/%25/g,"%")}catch(c){return null}return n}var hf={},pf=/^[^:]+:\/*[^/]*$/,vf=/^([^:]+:)[\s\S]*$/,mf=/^([^:]+:\/*[^/]*)[\s\S]*$/;var yf={exec:function(){}};function gf(e){for(var t,n,r=1;r=0&&"\\"===n[i];)r=!r;return r?"|":" |"})).split(/ \|/),r=0;if(n[0].trim()||n.shift(),n.length>0&&!n[n.length-1].trim()&&n.pop(),n.length>t)n.splice(t);else for(;n.length1;)1&t&&(n+=e),t>>=1,e+=e;return n+e}function xf(e,t,n,r){var i=t.href,o=t.title?of(t.title):null,a=e[1].replace(/\\([\[\]])/g,"$1");if("!"!==e[0].charAt(0)){r.state.inLink=!0;var u={type:"link",raw:n,href:i,title:o,text:a,tokens:r.inlineTokens(a)};return r.state.inLink=!1,u}return{type:"image",raw:n,href:i,title:o,text:of(a)}}var kf=function(){function e(t){Dt(this,e),this.options=t||Zs}return xt(e,[{key:"space",value:function(e){var t=this.rules.block.newline.exec(e);if(t&&t[0].length>0)return{type:"space",raw:t[0]}}},{key:"code",value:function(e){var t=this.rules.block.code.exec(e);if(t){var n=t[0].replace(/^ {1,4}/gm,"");return{type:"code",raw:t[0],codeBlockStyle:"indented",text:this.options.pedantic?n:bf(n,"\n")}}}},{key:"fences",value:function(e){var t=this.rules.block.fences.exec(e);if(t){var n=t[0],r=function(e,t){var n=e.match(/^(\s+)(?:```)/);if(null===n)return t;var r=n[1];return t.split("\n").map((function(e){var t=e.match(/^\s+/);return null===t?e:_t(t,1)[0].length>=r.length?e.slice(r.length):e})).join("\n")}(n,t[3]||"");return{type:"code",raw:n,lang:t[2]?t[2].trim().replace(this.rules.inline._escapes,"$1"):t[2],text:r}}}},{key:"heading",value:function(e){var t=this.rules.block.heading.exec(e);if(t){var n=t[2].trim();if(/#$/.test(n)){var r=bf(n,"#");this.options.pedantic?n=r.trim():r&&!/ $/.test(r)||(n=r.trim())}return{type:"heading",raw:t[0],depth:t[1].length,text:n,tokens:this.lexer.inline(n)}}}},{key:"hr",value:function(e){var t=this.rules.block.hr.exec(e);if(t)return{type:"hr",raw:t[0]}}},{key:"blockquote",value:function(e){var t=this.rules.block.blockquote.exec(e);if(t){var n=t[0].replace(/^ *>[ \t]?/gm,"");return{type:"blockquote",raw:t[0],tokens:this.lexer.blockTokens(n,[]),text:n}}}},{key:"list",value:function(e){var t=this.rules.block.list.exec(e);if(t){var n,r,i,o,a,u,l,c,s,f,d,h,p=t[1].trim(),v=p.length>1,m={type:"list",raw:"",ordered:v,start:v?+p.slice(0,-1):"",loose:!1,items:[]};p=v?"\\d{1,9}\\".concat(p.slice(-1)):"\\".concat(p),this.options.pedantic&&(p=v?p:"[*+-]");for(var y=new RegExp("^( {0,3}".concat(p,")((?:[\t ][^\\n]*)?(?:\\n|$))"));e&&(h=!1,t=y.exec(e))&&!this.rules.block.hr.test(e);){if(n=t[0],e=e.substring(n.length),c=t[2].split("\n",1)[0],s=e.split("\n",1)[0],this.options.pedantic?(o=2,d=c.trimLeft()):(o=(o=t[2].search(/[^ ]/))>4?1:o,d=c.slice(o),o+=t[1].length),u=!1,!c&&/^ *$/.test(s)&&(n+=s+"\n",e=e.substring(s.length+1),h=!0),!h)for(var g=new RegExp("^ {0,".concat(Math.min(3,o-1),"}(?:[*+-]|\\d{1,9}[.)])((?: [^\\n]*)?(?:\\n|$))")),_=new RegExp("^ {0,".concat(Math.min(3,o-1),"}((?:- *){3,}|(?:_ *){3,}|(?:\\* *){3,})(?:\\n+|$)")),b=new RegExp("^ {0,".concat(Math.min(3,o-1),"}(?:```|~~~)")),D=new RegExp("^ {0,".concat(Math.min(3,o-1),"}#"));e&&(c=f=e.split("\n",1)[0],this.options.pedantic&&(c=c.replace(/^ {1,4}(?=( {4})*[^ ])/g," ")),!b.test(c))&&!D.test(c)&&!g.test(c)&&!_.test(e);){if(c.search(/[^ ]/)>=o||!c.trim())d+="\n"+c.slice(o);else{if(u)break;d+="\n"+c}u||c.trim()||(u=!0),n+=f+"\n",e=e.substring(f.length+1)}m.loose||(l?m.loose=!0:/\n *\n *$/.test(n)&&(l=!0)),this.options.gfm&&(r=/^\[[ xX]\] /.exec(d))&&(i="[ ] "!==r[0],d=d.replace(/^\[[ xX]\] +/,"")),m.items.push({type:"list_item",raw:n,task:!!r,checked:i,loose:!1,text:d}),m.raw+=n}m.items[m.items.length-1].raw=n.trimRight(),m.items[m.items.length-1].text=d.trimRight(),m.raw=m.raw.trimRight();var w=m.items.length;for(a=0;a1)return!0}}catch(i){r.e(i)}finally{r.f()}return!1}));!m.loose&&x.length&&k&&(m.loose=!0,m.items[a].loose=!0)}return m}}},{key:"html",value:function(e){var t=this.rules.block.html.exec(e);if(t){var n={type:"html",raw:t[0],pre:!this.options.sanitizer&&("pre"===t[1]||"script"===t[1]||"style"===t[1]),text:t[0]};if(this.options.sanitize){var r=this.options.sanitizer?this.options.sanitizer(t[0]):of(t[0]);n.type="paragraph",n.text=r,n.tokens=this.lexer.inline(r)}return n}}},{key:"def",value:function(e){var t=this.rules.block.def.exec(e);if(t)return t[3]&&(t[3]=t[3].substring(1,t[3].length-1)),{type:"def",tag:t[1].toLowerCase().replace(/\s+/g," "),raw:t[0],href:t[2]?t[2].replace(this.rules.inline._escapes,"$1"):t[2],title:t[3]?t[3].replace(this.rules.inline._escapes,"$1"):t[3]}}},{key:"table",value:function(e){var t=this.rules.block.table.exec(e);if(t){var n={type:"table",header:_f(t[1]).map((function(e){return{text:e}})),align:t[2].replace(/^ *|\| *$/g,"").split(/ *\| */),rows:t[3]&&t[3].trim()?t[3].replace(/\n[ \t]*$/,"").split("\n"):[]};if(n.header.length===n.align.length){n.raw=t[0];var r,i,o,a,u=n.align.length;for(r=0;r/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:this.options.sanitize?"text":"html",raw:t[0],inLink:this.lexer.state.inLink,inRawBlock:this.lexer.state.inRawBlock,text:this.options.sanitize?this.options.sanitizer?this.options.sanitizer(t[0]):of(t[0]):t[0]}}},{key:"link",value:function(e){var t=this.rules.inline.link.exec(e);if(t){var n=t[2].trim();if(!this.options.pedantic&&/^$/.test(n))return;var r=bf(n.slice(0,-1),"\\");if((n.length-r.length)%2===0)return}else{var i=function(e,t){if(-1===e.indexOf(t[1]))return-1;for(var n=e.length,r=0,i=0;i-1){var o=(0===t[0].indexOf("!")?5:4)+t[1].length+i;t[2]=t[2].substring(0,i),t[0]=t[0].substring(0,o).trim(),t[3]=""}}var a=t[2],u="";if(this.options.pedantic){var l=/^([^'"]*[^\s])\s+(['"])(.*)\2/.exec(a);l&&(a=l[1],u=l[3])}else u=t[3]?t[3].slice(1,-1):"";return a=a.trim(),/^$/.test(n)?a.slice(1):a.slice(1,-1)),xf(t,{href:a?a.replace(this.rules.inline._escapes,"$1"):a,title:u?u.replace(this.rules.inline._escapes,"$1"):u},t[0],this.lexer)}}},{key:"reflink",value:function(e,t){var n;if((n=this.rules.inline.reflink.exec(e))||(n=this.rules.inline.nolink.exec(e))){var r=(n[2]||n[1]).replace(/\s+/g," ");if(!(r=t[r.toLowerCase()])||!r.href){var i=n[0].charAt(0);return{type:"text",raw:i,text:i}}return xf(n,r,n[0],this.lexer)}}},{key:"emStrong",value:function(e,t){var n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:"",r=this.rules.inline.emStrong.lDelim.exec(e);if(r&&(!r[3]||!n.match(/(?:[0-9A-Za-z\xAA\xB2\xB3\xB5\xB9\xBA\xBC-\xBE\xC0-\xD6\xD8-\xF6\xF8-\u02C1\u02C6-\u02D1\u02E0-\u02E4\u02EC\u02EE\u0370-\u0374\u0376\u0377\u037A-\u037D\u037F\u0386\u0388-\u038A\u038C\u038E-\u03A1\u03A3-\u03F5\u03F7-\u0481\u048A-\u052F\u0531-\u0556\u0559\u0560-\u0588\u05D0-\u05EA\u05EF-\u05F2\u0620-\u064A\u0660-\u0669\u066E\u066F\u0671-\u06D3\u06D5\u06E5\u06E6\u06EE-\u06FC\u06FF\u0710\u0712-\u072F\u074D-\u07A5\u07B1\u07C0-\u07EA\u07F4\u07F5\u07FA\u0800-\u0815\u081A\u0824\u0828\u0840-\u0858\u0860-\u086A\u0870-\u0887\u0889-\u088E\u08A0-\u08C9\u0904-\u0939\u093D\u0950\u0958-\u0961\u0966-\u096F\u0971-\u0980\u0985-\u098C\u098F\u0990\u0993-\u09A8\u09AA-\u09B0\u09B2\u09B6-\u09B9\u09BD\u09CE\u09DC\u09DD\u09DF-\u09E1\u09E6-\u09F1\u09F4-\u09F9\u09FC\u0A05-\u0A0A\u0A0F\u0A10\u0A13-\u0A28\u0A2A-\u0A30\u0A32\u0A33\u0A35\u0A36\u0A38\u0A39\u0A59-\u0A5C\u0A5E\u0A66-\u0A6F\u0A72-\u0A74\u0A85-\u0A8D\u0A8F-\u0A91\u0A93-\u0AA8\u0AAA-\u0AB0\u0AB2\u0AB3\u0AB5-\u0AB9\u0ABD\u0AD0\u0AE0\u0AE1\u0AE6-\u0AEF\u0AF9\u0B05-\u0B0C\u0B0F\u0B10\u0B13-\u0B28\u0B2A-\u0B30\u0B32\u0B33\u0B35-\u0B39\u0B3D\u0B5C\u0B5D\u0B5F-\u0B61\u0B66-\u0B6F\u0B71-\u0B77\u0B83\u0B85-\u0B8A\u0B8E-\u0B90\u0B92-\u0B95\u0B99\u0B9A\u0B9C\u0B9E\u0B9F\u0BA3\u0BA4\u0BA8-\u0BAA\u0BAE-\u0BB9\u0BD0\u0BE6-\u0BF2\u0C05-\u0C0C\u0C0E-\u0C10\u0C12-\u0C28\u0C2A-\u0C39\u0C3D\u0C58-\u0C5A\u0C5D\u0C60\u0C61\u0C66-\u0C6F\u0C78-\u0C7E\u0C80\u0C85-\u0C8C\u0C8E-\u0C90\u0C92-\u0CA8\u0CAA-\u0CB3\u0CB5-\u0CB9\u0CBD\u0CDD\u0CDE\u0CE0\u0CE1\u0CE6-\u0CEF\u0CF1\u0CF2\u0D04-\u0D0C\u0D0E-\u0D10\u0D12-\u0D3A\u0D3D\u0D4E\u0D54-\u0D56\u0D58-\u0D61\u0D66-\u0D78\u0D7A-\u0D7F\u0D85-\u0D96\u0D9A-\u0DB1\u0DB3-\u0DBB\u0DBD\u0DC0-\u0DC6\u0DE6-\u0DEF\u0E01-\u0E30\u0E32\u0E33\u0E40-\u0E46\u0E50-\u0E59\u0E81\u0E82\u0E84\u0E86-\u0E8A\u0E8C-\u0EA3\u0EA5\u0EA7-\u0EB0\u0EB2\u0EB3\u0EBD\u0EC0-\u0EC4\u0EC6\u0ED0-\u0ED9\u0EDC-\u0EDF\u0F00\u0F20-\u0F33\u0F40-\u0F47\u0F49-\u0F6C\u0F88-\u0F8C\u1000-\u102A\u103F-\u1049\u1050-\u1055\u105A-\u105D\u1061\u1065\u1066\u106E-\u1070\u1075-\u1081\u108E\u1090-\u1099\u10A0-\u10C5\u10C7\u10CD\u10D0-\u10FA\u10FC-\u1248\u124A-\u124D\u1250-\u1256\u1258\u125A-\u125D\u1260-\u1288\u128A-\u128D\u1290-\u12B0\u12B2-\u12B5\u12B8-\u12BE\u12C0\u12C2-\u12C5\u12C8-\u12D6\u12D8-\u1310\u1312-\u1315\u1318-\u135A\u1369-\u137C\u1380-\u138F\u13A0-\u13F5\u13F8-\u13FD\u1401-\u166C\u166F-\u167F\u1681-\u169A\u16A0-\u16EA\u16EE-\u16F8\u1700-\u1711\u171F-\u1731\u1740-\u1751\u1760-\u176C\u176E-\u1770\u1780-\u17B3\u17D7\u17DC\u17E0-\u17E9\u17F0-\u17F9\u1810-\u1819\u1820-\u1878\u1880-\u1884\u1887-\u18A8\u18AA\u18B0-\u18F5\u1900-\u191E\u1946-\u196D\u1970-\u1974\u1980-\u19AB\u19B0-\u19C9\u19D0-\u19DA\u1A00-\u1A16\u1A20-\u1A54\u1A80-\u1A89\u1A90-\u1A99\u1AA7\u1B05-\u1B33\u1B45-\u1B4C\u1B50-\u1B59\u1B83-\u1BA0\u1BAE-\u1BE5\u1C00-\u1C23\u1C40-\u1C49\u1C4D-\u1C7D\u1C80-\u1C88\u1C90-\u1CBA\u1CBD-\u1CBF\u1CE9-\u1CEC\u1CEE-\u1CF3\u1CF5\u1CF6\u1CFA\u1D00-\u1DBF\u1E00-\u1F15\u1F18-\u1F1D\u1F20-\u1F45\u1F48-\u1F4D\u1F50-\u1F57\u1F59\u1F5B\u1F5D\u1F5F-\u1F7D\u1F80-\u1FB4\u1FB6-\u1FBC\u1FBE\u1FC2-\u1FC4\u1FC6-\u1FCC\u1FD0-\u1FD3\u1FD6-\u1FDB\u1FE0-\u1FEC\u1FF2-\u1FF4\u1FF6-\u1FFC\u2070\u2071\u2074-\u2079\u207F-\u2089\u2090-\u209C\u2102\u2107\u210A-\u2113\u2115\u2119-\u211D\u2124\u2126\u2128\u212A-\u212D\u212F-\u2139\u213C-\u213F\u2145-\u2149\u214E\u2150-\u2189\u2460-\u249B\u24EA-\u24FF\u2776-\u2793\u2C00-\u2CE4\u2CEB-\u2CEE\u2CF2\u2CF3\u2CFD\u2D00-\u2D25\u2D27\u2D2D\u2D30-\u2D67\u2D6F\u2D80-\u2D96\u2DA0-\u2DA6\u2DA8-\u2DAE\u2DB0-\u2DB6\u2DB8-\u2DBE\u2DC0-\u2DC6\u2DC8-\u2DCE\u2DD0-\u2DD6\u2DD8-\u2DDE\u2E2F\u3005-\u3007\u3021-\u3029\u3031-\u3035\u3038-\u303C\u3041-\u3096\u309D-\u309F\u30A1-\u30FA\u30FC-\u30FF\u3105-\u312F\u3131-\u318E\u3192-\u3195\u31A0-\u31BF\u31F0-\u31FF\u3220-\u3229\u3248-\u324F\u3251-\u325F\u3280-\u3289\u32B1-\u32BF\u3400-\u4DBF\u4E00-\uA48C\uA4D0-\uA4FD\uA500-\uA60C\uA610-\uA62B\uA640-\uA66E\uA67F-\uA69D\uA6A0-\uA6EF\uA717-\uA71F\uA722-\uA788\uA78B-\uA7CA\uA7D0\uA7D1\uA7D3\uA7D5-\uA7D9\uA7F2-\uA801\uA803-\uA805\uA807-\uA80A\uA80C-\uA822\uA830-\uA835\uA840-\uA873\uA882-\uA8B3\uA8D0-\uA8D9\uA8F2-\uA8F7\uA8FB\uA8FD\uA8FE\uA900-\uA925\uA930-\uA946\uA960-\uA97C\uA984-\uA9B2\uA9CF-\uA9D9\uA9E0-\uA9E4\uA9E6-\uA9FE\uAA00-\uAA28\uAA40-\uAA42\uAA44-\uAA4B\uAA50-\uAA59\uAA60-\uAA76\uAA7A\uAA7E-\uAAAF\uAAB1\uAAB5\uAAB6\uAAB9-\uAABD\uAAC0\uAAC2\uAADB-\uAADD\uAAE0-\uAAEA\uAAF2-\uAAF4\uAB01-\uAB06\uAB09-\uAB0E\uAB11-\uAB16\uAB20-\uAB26\uAB28-\uAB2E\uAB30-\uAB5A\uAB5C-\uAB69\uAB70-\uABE2\uABF0-\uABF9\uAC00-\uD7A3\uD7B0-\uD7C6\uD7CB-\uD7FB\uF900-\uFA6D\uFA70-\uFAD9\uFB00-\uFB06\uFB13-\uFB17\uFB1D\uFB1F-\uFB28\uFB2A-\uFB36\uFB38-\uFB3C\uFB3E\uFB40\uFB41\uFB43\uFB44\uFB46-\uFBB1\uFBD3-\uFD3D\uFD50-\uFD8F\uFD92-\uFDC7\uFDF0-\uFDFB\uFE70-\uFE74\uFE76-\uFEFC\uFF10-\uFF19\uFF21-\uFF3A\uFF41-\uFF5A\uFF66-\uFFBE\uFFC2-\uFFC7\uFFCA-\uFFCF\uFFD2-\uFFD7\uFFDA-\uFFDC]|\uD800[\uDC00-\uDC0B\uDC0D-\uDC26\uDC28-\uDC3A\uDC3C\uDC3D\uDC3F-\uDC4D\uDC50-\uDC5D\uDC80-\uDCFA\uDD07-\uDD33\uDD40-\uDD78\uDD8A\uDD8B\uDE80-\uDE9C\uDEA0-\uDED0\uDEE1-\uDEFB\uDF00-\uDF23\uDF2D-\uDF4A\uDF50-\uDF75\uDF80-\uDF9D\uDFA0-\uDFC3\uDFC8-\uDFCF\uDFD1-\uDFD5]|\uD801[\uDC00-\uDC9D\uDCA0-\uDCA9\uDCB0-\uDCD3\uDCD8-\uDCFB\uDD00-\uDD27\uDD30-\uDD63\uDD70-\uDD7A\uDD7C-\uDD8A\uDD8C-\uDD92\uDD94\uDD95\uDD97-\uDDA1\uDDA3-\uDDB1\uDDB3-\uDDB9\uDDBB\uDDBC\uDE00-\uDF36\uDF40-\uDF55\uDF60-\uDF67\uDF80-\uDF85\uDF87-\uDFB0\uDFB2-\uDFBA]|\uD802[\uDC00-\uDC05\uDC08\uDC0A-\uDC35\uDC37\uDC38\uDC3C\uDC3F-\uDC55\uDC58-\uDC76\uDC79-\uDC9E\uDCA7-\uDCAF\uDCE0-\uDCF2\uDCF4\uDCF5\uDCFB-\uDD1B\uDD20-\uDD39\uDD80-\uDDB7\uDDBC-\uDDCF\uDDD2-\uDE00\uDE10-\uDE13\uDE15-\uDE17\uDE19-\uDE35\uDE40-\uDE48\uDE60-\uDE7E\uDE80-\uDE9F\uDEC0-\uDEC7\uDEC9-\uDEE4\uDEEB-\uDEEF\uDF00-\uDF35\uDF40-\uDF55\uDF58-\uDF72\uDF78-\uDF91\uDFA9-\uDFAF]|\uD803[\uDC00-\uDC48\uDC80-\uDCB2\uDCC0-\uDCF2\uDCFA-\uDD23\uDD30-\uDD39\uDE60-\uDE7E\uDE80-\uDEA9\uDEB0\uDEB1\uDF00-\uDF27\uDF30-\uDF45\uDF51-\uDF54\uDF70-\uDF81\uDFB0-\uDFCB\uDFE0-\uDFF6]|\uD804[\uDC03-\uDC37\uDC52-\uDC6F\uDC71\uDC72\uDC75\uDC83-\uDCAF\uDCD0-\uDCE8\uDCF0-\uDCF9\uDD03-\uDD26\uDD36-\uDD3F\uDD44\uDD47\uDD50-\uDD72\uDD76\uDD83-\uDDB2\uDDC1-\uDDC4\uDDD0-\uDDDA\uDDDC\uDDE1-\uDDF4\uDE00-\uDE11\uDE13-\uDE2B\uDE3F\uDE40\uDE80-\uDE86\uDE88\uDE8A-\uDE8D\uDE8F-\uDE9D\uDE9F-\uDEA8\uDEB0-\uDEDE\uDEF0-\uDEF9\uDF05-\uDF0C\uDF0F\uDF10\uDF13-\uDF28\uDF2A-\uDF30\uDF32\uDF33\uDF35-\uDF39\uDF3D\uDF50\uDF5D-\uDF61]|\uD805[\uDC00-\uDC34\uDC47-\uDC4A\uDC50-\uDC59\uDC5F-\uDC61\uDC80-\uDCAF\uDCC4\uDCC5\uDCC7\uDCD0-\uDCD9\uDD80-\uDDAE\uDDD8-\uDDDB\uDE00-\uDE2F\uDE44\uDE50-\uDE59\uDE80-\uDEAA\uDEB8\uDEC0-\uDEC9\uDF00-\uDF1A\uDF30-\uDF3B\uDF40-\uDF46]|\uD806[\uDC00-\uDC2B\uDCA0-\uDCF2\uDCFF-\uDD06\uDD09\uDD0C-\uDD13\uDD15\uDD16\uDD18-\uDD2F\uDD3F\uDD41\uDD50-\uDD59\uDDA0-\uDDA7\uDDAA-\uDDD0\uDDE1\uDDE3\uDE00\uDE0B-\uDE32\uDE3A\uDE50\uDE5C-\uDE89\uDE9D\uDEB0-\uDEF8]|\uD807[\uDC00-\uDC08\uDC0A-\uDC2E\uDC40\uDC50-\uDC6C\uDC72-\uDC8F\uDD00-\uDD06\uDD08\uDD09\uDD0B-\uDD30\uDD46\uDD50-\uDD59\uDD60-\uDD65\uDD67\uDD68\uDD6A-\uDD89\uDD98\uDDA0-\uDDA9\uDEE0-\uDEF2\uDF02\uDF04-\uDF10\uDF12-\uDF33\uDF50-\uDF59\uDFB0\uDFC0-\uDFD4]|\uD808[\uDC00-\uDF99]|\uD809[\uDC00-\uDC6E\uDC80-\uDD43]|\uD80B[\uDF90-\uDFF0]|[\uD80C\uD81C-\uD820\uD822\uD840-\uD868\uD86A-\uD86C\uD86F-\uD872\uD874-\uD879\uD880-\uD883\uD885-\uD887][\uDC00-\uDFFF]|\uD80D[\uDC00-\uDC2F\uDC41-\uDC46]|\uD811[\uDC00-\uDE46]|\uD81A[\uDC00-\uDE38\uDE40-\uDE5E\uDE60-\uDE69\uDE70-\uDEBE\uDEC0-\uDEC9\uDED0-\uDEED\uDF00-\uDF2F\uDF40-\uDF43\uDF50-\uDF59\uDF5B-\uDF61\uDF63-\uDF77\uDF7D-\uDF8F]|\uD81B[\uDE40-\uDE96\uDF00-\uDF4A\uDF50\uDF93-\uDF9F\uDFE0\uDFE1\uDFE3]|\uD821[\uDC00-\uDFF7]|\uD823[\uDC00-\uDCD5\uDD00-\uDD08]|\uD82B[\uDFF0-\uDFF3\uDFF5-\uDFFB\uDFFD\uDFFE]|\uD82C[\uDC00-\uDD22\uDD32\uDD50-\uDD52\uDD55\uDD64-\uDD67\uDD70-\uDEFB]|\uD82F[\uDC00-\uDC6A\uDC70-\uDC7C\uDC80-\uDC88\uDC90-\uDC99]|\uD834[\uDEC0-\uDED3\uDEE0-\uDEF3\uDF60-\uDF78]|\uD835[\uDC00-\uDC54\uDC56-\uDC9C\uDC9E\uDC9F\uDCA2\uDCA5\uDCA6\uDCA9-\uDCAC\uDCAE-\uDCB9\uDCBB\uDCBD-\uDCC3\uDCC5-\uDD05\uDD07-\uDD0A\uDD0D-\uDD14\uDD16-\uDD1C\uDD1E-\uDD39\uDD3B-\uDD3E\uDD40-\uDD44\uDD46\uDD4A-\uDD50\uDD52-\uDEA5\uDEA8-\uDEC0\uDEC2-\uDEDA\uDEDC-\uDEFA\uDEFC-\uDF14\uDF16-\uDF34\uDF36-\uDF4E\uDF50-\uDF6E\uDF70-\uDF88\uDF8A-\uDFA8\uDFAA-\uDFC2\uDFC4-\uDFCB\uDFCE-\uDFFF]|\uD837[\uDF00-\uDF1E\uDF25-\uDF2A]|\uD838[\uDC30-\uDC6D\uDD00-\uDD2C\uDD37-\uDD3D\uDD40-\uDD49\uDD4E\uDE90-\uDEAD\uDEC0-\uDEEB\uDEF0-\uDEF9]|\uD839[\uDCD0-\uDCEB\uDCF0-\uDCF9\uDFE0-\uDFE6\uDFE8-\uDFEB\uDFED\uDFEE\uDFF0-\uDFFE]|\uD83A[\uDC00-\uDCC4\uDCC7-\uDCCF\uDD00-\uDD43\uDD4B\uDD50-\uDD59]|\uD83B[\uDC71-\uDCAB\uDCAD-\uDCAF\uDCB1-\uDCB4\uDD01-\uDD2D\uDD2F-\uDD3D\uDE00-\uDE03\uDE05-\uDE1F\uDE21\uDE22\uDE24\uDE27\uDE29-\uDE32\uDE34-\uDE37\uDE39\uDE3B\uDE42\uDE47\uDE49\uDE4B\uDE4D-\uDE4F\uDE51\uDE52\uDE54\uDE57\uDE59\uDE5B\uDE5D\uDE5F\uDE61\uDE62\uDE64\uDE67-\uDE6A\uDE6C-\uDE72\uDE74-\uDE77\uDE79-\uDE7C\uDE7E\uDE80-\uDE89\uDE8B-\uDE9B\uDEA1-\uDEA3\uDEA5-\uDEA9\uDEAB-\uDEBB]|\uD83C[\uDD00-\uDD0C]|\uD83E[\uDFF0-\uDFF9]|\uD869[\uDC00-\uDEDF\uDF00-\uDFFF]|\uD86D[\uDC00-\uDF39\uDF40-\uDFFF]|\uD86E[\uDC00-\uDC1D\uDC20-\uDFFF]|\uD873[\uDC00-\uDEA1\uDEB0-\uDFFF]|\uD87A[\uDC00-\uDFE0]|\uD87E[\uDC00-\uDE1D]|\uD884[\uDC00-\uDF4A\uDF50-\uDFFF]|\uD888[\uDC00-\uDFAF])/))){var i=r[1]||r[2]||"";if(!i||i&&(""===n||this.rules.inline.punctuation.exec(n))){var o,a,u=r[0].length-1,l=u,c=0,s="*"===r[0][0]?this.rules.inline.emStrong.rDelimAst:this.rules.inline.emStrong.rDelimUnd;for(s.lastIndex=0,t=t.slice(-1*e.length+u);null!=(r=s.exec(t));)if(o=r[1]||r[2]||r[3]||r[4]||r[5]||r[6])if(a=o.length,r[3]||r[4])l+=a;else if(!((r[5]||r[6])&&u%3)||(u+a)%3){if(!((l-=a)>0)){a=Math.min(a,a+l+c);var f=e.slice(0,u+r.index+(r[0].length-o.length)+a);if(Math.min(u,a)%2){var d=f.slice(1,-1);return{type:"em",raw:f,text:d,tokens:this.lexer.inlineTokens(d)}}var h=f.slice(2,-2);return{type:"strong",raw:f,text:h,tokens:this.lexer.inlineTokens(h)}}}else c+=a}}}},{key:"codespan",value:function(e){var t=this.rules.inline.code.exec(e);if(t){var n=t[2].replace(/\n/g," "),r=/[^ ]/.test(n),i=/^ /.test(n)&&/ $/.test(n);return r&&i&&(n=n.substring(1,n.length-1)),n=of(n,!0),{type:"codespan",raw:t[0],text:n}}}},{key:"br",value:function(e){var t=this.rules.inline.br.exec(e);if(t)return{type:"br",raw:t[0]}}},{key:"del",value:function(e){var t=this.rules.inline.del.exec(e);if(t)return{type:"del",raw:t[0],text:t[2],tokens:this.lexer.inlineTokens(t[2])}}},{key:"autolink",value:function(e,t){var n,r,i=this.rules.inline.autolink.exec(e);if(i)return r="@"===i[2]?"mailto:"+(n=of(this.options.mangle?t(i[1]):i[1])):n=of(i[1]),{type:"link",raw:i[0],text:n,href:r,tokens:[{type:"text",raw:n,text:n}]}}},{key:"url",value:function(e,t){var n;if(n=this.rules.inline.url.exec(e)){var r,i;if("@"===n[2])i="mailto:"+(r=of(this.options.mangle?t(n[0]):n[0]));else{var o;do{o=n[0],n[0]=this.rules.inline._backpedal.exec(n[0])[0]}while(o!==n[0]);r=of(n[0]),i="www."===n[1]?"http://"+r:r}return{type:"link",raw:n[0],text:r,href:i,tokens:[{type:"text",raw:r,text:r}]}}}},{key:"inlineText",value:function(e,t){var n,r=this.rules.inline.text.exec(e);if(r)return n=this.lexer.state.inRawBlock?this.options.sanitize?this.options.sanitizer?this.options.sanitizer(r[0]):of(r[0]):r[0]:of(this.options.smartypants?t(r[0]):r[0]),{type:"text",raw:r[0],text:n}}}]),e}(),Cf={newline:/^(?: *(?:\n|$))+/,code:/^( {4}[^\n]+(?:\n(?: *(?:\n|$))*)?)+/,fences:/^ {0,3}(`{3,}(?=[^`\n]*\n)|~{3,})([^\n]*)\n(?:|([\s\S]*?)\n)(?: {0,3}\1[~`]* *(?=\n|$)|$)/,hr:/^ {0,3}((?:-[\t ]*){3,}|(?:_[ \t]*){3,}|(?:\*[ \t]*){3,})(?:\n+|$)/,heading:/^ {0,3}(#{1,6})(?=\s|$)(.*)(?:\n+|$)/,blockquote:/^( {0,3}> ?(paragraph|[^\n]*)(?:\n|$))+/,list:/^( {0,3}bull)([ \t][^\n]+?)?(?:\n|$)/,html:"^ {0,3}(?:<(script|pre|style|textarea)[\\s>][\\s\\S]*?(?:[^\\n]*\\n+|$)|comment[^\\n]*(\\n+|$)|<\\?[\\s\\S]*?(?:\\?>\\n*|$)|\\n*|$)|\\n*|$)|)[\\s\\S]*?(?:(?:\\n *)+\\n|$)|<(?!script|pre|style|textarea)([a-z][\\w-]*)(?:attribute)*? */?>(?=[ \\t]*(?:\\n|$))[\\s\\S]*?(?:(?:\\n *)+\\n|$)|(?=[ \\t]*(?:\\n|$))[\\s\\S]*?(?:(?:\\n *)+\\n|$))",def:/^ {0,3}\[(label)\]: *(?:\n *)?]+)>?(?:(?: +(?:\n *)?| *\n *)(title))? *(?:\n+|$)/,table:yf,lheading:/^([^\n]+)\n {0,3}(=+|-+) *(?:\n+|$)/,_paragraph:/^([^\n]+(?:\n(?!hr|heading|lheading|blockquote|fences|list|html|table| +\n)[^\n]+)*)/,text:/^[^\n]+/,_label:/(?!\s*\])(?:\\.|[^\[\]\\])+/,_title:/(?:"(?:\\"?|[^"\\])*"|'[^'\n]*(?:\n[^'\n]+)*\n?'|\([^()]*\))/};Cf.def=cf(Cf.def).replace("label",Cf._label).replace("title",Cf._title).getRegex(),Cf.bullet=/(?:[*+-]|\d{1,9}[.)])/,Cf.listItemStart=cf(/^( *)(bull) */).replace("bull",Cf.bullet).getRegex(),Cf.list=cf(Cf.list).replace(/bull/g,Cf.bullet).replace("hr","\\n+(?=\\1?(?:(?:- *){3,}|(?:_ *){3,}|(?:\\* *){3,})(?:\\n+|$))").replace("def","\\n+(?="+Cf.def.source+")").getRegex(),Cf._tag="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|section|source|summary|table|tbody|td|tfoot|th|thead|title|tr|track|ul",Cf._comment=/|$)/,Cf.html=cf(Cf.html,"i").replace("comment",Cf._comment).replace("tag",Cf._tag).replace("attribute",/ +[a-zA-Z:_][\w.:-]*(?: *= *"[^"\n]*"| *= *'[^'\n]*'| *= *[^\s"'=<>`]+)?/).getRegex(),Cf.paragraph=cf(Cf._paragraph).replace("hr",Cf.hr).replace("heading"," {0,3}#{1,6} ").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",Cf._tag).getRegex(),Cf.blockquote=cf(Cf.blockquote).replace("paragraph",Cf.paragraph).getRegex(),Cf.normal=gf({},Cf),Cf.gfm=gf({},Cf.normal,{table:"^ *([^\\n ].*\\|.*)\\n {0,3}(?:\\| *)?(:?-+:? *(?:\\| *:?-+:? *)*)(?:\\| *)?(?:\\n((?:(?! *\\n|hr|heading|blockquote|code|fences|list|html).*(?:\\n|$))*)\\n*|$)"}),Cf.gfm.table=cf(Cf.gfm.table).replace("hr",Cf.hr).replace("heading"," {0,3}#{1,6} ").replace("blockquote"," {0,3}>").replace("code"," {4}[^\\n]").replace("fences"," {0,3}(?:`{3,}(?=[^`\\n]*\\n)|~{3,})[^\\n]*\\n").replace("list"," {0,3}(?:[*+-]|1[.)]) ").replace("html",")|<(?:script|pre|style|textarea|!--)").replace("tag",Cf._tag).getRegex(),Cf.gfm.paragraph=cf(Cf._paragraph).replace("hr",Cf.hr).replace("heading"," {0,3}#{1,6} ").replace("|lheading","").replace("table",Cf.gfm.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",Cf._tag).getRegex(),Cf.pedantic=gf({},Cf.normal,{html:cf("^ *(?:comment *(?:\\n|\\s*$)|<(tag)[\\s\\S]+? *(?:\\n{2,}|\\s*$)|\\s]*)*?/?> *(?:\\n{2,}|\\s*$))").replace("comment",Cf._comment).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:yf,paragraph:cf(Cf.normal._paragraph).replace("hr",Cf.hr).replace("heading"," *#{1,6} *[^\n]").replace("lheading",Cf.lheading).replace("blockquote"," {0,3}>").replace("|fences","").replace("|list","").replace("|html","").getRegex()});var Ef={escape:/^\\([!"#$%&'()*+,\-./:;<=>?@\[\]\\^_`{|}~])/,autolink:/^<(scheme:[^\s\x00-\x1f<>]*|email)>/,url:yf,tag:"^comment|^|^<[a-zA-Z][\\w-]*(?:attribute)*?\\s*/?>|^<\\?[\\s\\S]*?\\?>|^|^",link:/^!?\[(label)\]\(\s*(href)(?:\s+(title))?\s*\)/,reflink:/^!?\[(label)\]\[(ref)\]/,nolink:/^!?\[(ref)\](?:\[\])?/,reflinkSearch:"reflink|nolink(?!\\()",emStrong:{lDelim:/^(?:\*+(?:([punct_])|[^\s*]))|^_+(?:([punct*])|([^\s_]))/,rDelimAst:/^(?:[^_*\\]|\\.)*?\_\_(?:[^_*\\]|\\.)*?\*(?:[^_*\\]|\\.)*?(?=\_\_)|(?:[^*\\]|\\.)+(?=[^*])|[punct_](\*+)(?=[\s]|$)|(?:[^punct*_\s\\]|\\.)(\*+)(?=[punct_\s]|$)|[punct_\s](\*+)(?=[^punct*_\s])|[\s](\*+)(?=[punct_])|[punct_](\*+)(?=[punct_])|(?:[^punct*_\s\\]|\\.)(\*+)(?=[^punct*_\s])/,rDelimUnd:/^(?:[^_*\\]|\\.)*?\*\*(?:[^_*\\]|\\.)*?\_(?:[^_*\\]|\\.)*?(?=\*\*)|(?:[^_\\]|\\.)+(?=[^_])|[punct*](\_+)(?=[\s]|$)|(?:[^punct*_\s\\]|\\.)(\_+)(?=[punct*\s]|$)|[punct*\s](\_+)(?=[^punct*_\s])|[\s](\_+)(?=[punct*])|[punct*](\_+)(?=[punct*])/},code:/^(`+)([^`]|[^`][\s\S]*?[^`])\1(?!`)/,br:/^( {2,}|\\)\n(?!\s*$)/,del:yf,text:/^(`+|[^`])(?:(?= {2,}\n)|[\s\S]*?(?:(?=[\\.5&&(n="x"+n.toString(16)),r+="&#"+n+";";return r}Ef._punctuation="!\"#$%&'()+\\-.,/:;<=>?@\\[\\]`^{|}~",Ef.punctuation=cf(Ef.punctuation).replace(/punctuation/g,Ef._punctuation).getRegex(),Ef.blockSkip=/\[[^\]]*?\]\([^\)]*?\)|`[^`]*?`|<[^>]*?>/g,Ef.escapedEmSt=/(?:^|[^\\])(?:\\\\)*\\[*_]/g,Ef._comment=cf(Cf._comment).replace("(?:--\x3e|$)","--\x3e").getRegex(),Ef.emStrong.lDelim=cf(Ef.emStrong.lDelim).replace(/punct/g,Ef._punctuation).getRegex(),Ef.emStrong.rDelimAst=cf(Ef.emStrong.rDelimAst,"g").replace(/punct/g,Ef._punctuation).getRegex(),Ef.emStrong.rDelimUnd=cf(Ef.emStrong.rDelimUnd,"g").replace(/punct/g,Ef._punctuation).getRegex(),Ef._escapes=/\\([!"#$%&'()*+,\-./:;<=>?@\[\]\\^_`{|}~])/g,Ef._scheme=/[a-zA-Z][a-zA-Z0-9+.-]{1,31}/,Ef._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])?)+(?![-_])/,Ef.autolink=cf(Ef.autolink).replace("scheme",Ef._scheme).replace("email",Ef._email).getRegex(),Ef._attribute=/\s+[a-zA-Z:_][\w.:-]*(?:\s*=\s*"[^"]*"|\s*=\s*'[^']*'|\s*=\s*[^\s"'=<>`]+)?/,Ef.tag=cf(Ef.tag).replace("comment",Ef._comment).replace("attribute",Ef._attribute).getRegex(),Ef._label=/(?:\[(?:\\.|[^\[\]\\])*\]|\\.|`[^`]*`|[^\[\]\\`])*?/,Ef._href=/<(?:\\.|[^\n<>\\])+>|[^\s\x00-\x1f]*/,Ef._title=/"(?:\\"?|[^"\\])*"|'(?:\\'?|[^'\\])*'|\((?:\\\)?|[^)\\])*\)/,Ef.link=cf(Ef.link).replace("label",Ef._label).replace("href",Ef._href).replace("title",Ef._title).getRegex(),Ef.reflink=cf(Ef.reflink).replace("label",Ef._label).replace("ref",Cf._label).getRegex(),Ef.nolink=cf(Ef.nolink).replace("ref",Cf._label).getRegex(),Ef.reflinkSearch=cf(Ef.reflinkSearch,"g").replace("reflink",Ef.reflink).replace("nolink",Ef.nolink).getRegex(),Ef.normal=gf({},Ef),Ef.pedantic=gf({},Ef.normal,{strong:{start:/^__|\*\*/,middle:/^__(?=\S)([\s\S]*?\S)__(?!_)|^\*\*(?=\S)([\s\S]*?\S)\*\*(?!\*)/,endAst:/\*\*(?!\*)/g,endUnd:/__(?!_)/g},em:{start:/^_|\*/,middle:/^()\*(?=\S)([\s\S]*?\S)\*(?!\*)|^_(?=\S)([\s\S]*?\S)_(?!_)/,endAst:/\*(?!\*)/g,endUnd:/_(?!_)/g},link:cf(/^!?\[(label)\]\((.*?)\)/).replace("label",Ef._label).getRegex(),reflink:cf(/^!?\[(label)\]\s*\[([^\]]*)\]/).replace("label",Ef._label).getRegex()}),Ef.gfm=gf({},Ef.normal,{escape:cf(Ef.escape).replace("])","~|])").getRegex(),_extended_email:/[A-Za-z0-9._+-]+(@)[a-zA-Z0-9-_]+(?:\.[a-zA-Z0-9-_]*[a-zA-Z0-9])+(?![-_])/,url:/^((?:ftp|https?):\/\/|www\.)(?:[a-zA-Z0-9\-]+\.?)+[^\s<]*|^email/,_backpedal:/(?:[^?!.,:;*_~()&]+|\([^)]*\)|&(?![a-zA-Z0-9]+;$)|[?!.,:;*_~)]+(?!$))+/,del:/^(~~?)(?=[^\s~])([\s\S]*?[^\s~])\1(?=[^~]|$)/,text:/^([`~]+|[^`~])(?:(?= {2,}\n)|(?=[a-zA-Z0-9.!#$%&'*+\/=?_`{\|}~-]+@)|[\s\S]*?(?:(?=[\\1&&void 0!==arguments[1]?arguments[1]:[];for(e=this.options.pedantic?e.replace(/\t/g," ").replace(/^ +$/gm,""):e.replace(/^( *)(\t+)/gm,(function(e,t,n){return t+" ".repeat(n.length)}));e;)if(!(this.options.extensions&&this.options.extensions.block&&this.options.extensions.block.some((function(n){return!!(t=n.call({lexer:o},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])||"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])||"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&&function(){var t=1/0,n=e.slice(1),i=void 0;o.options.extensions.startBlock.forEach((function(e){"number"===typeof(i=e.call({lexer:this},n))&&i>=0&&(t=Math.min(t,i))})),t<1/0&&t>=0&&(r=e.substring(0,t+1))}(),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])&&"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){var u="Infinite loop on byte: "+e.charCodeAt(0);if(this.options.silent){console.error(u);break}throw new Error(u)}return this.state.top=!0,a}},{key:"inline",value:function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:[];return this.inlineQueue.push({src:e,tokens:t}),t}},{key:"inlineTokens",value:function(e){var t,n,r,i,o,a,u=this,l=arguments.length>1&&void 0!==arguments[1]?arguments[1]:[],c=e;if(this.tokens.links){var s=Object.keys(this.tokens.links);if(s.length>0)for(;null!=(i=this.tokenizer.rules.inline.reflinkSearch.exec(c));)s.includes(i[0].slice(i[0].lastIndexOf("[")+1,-1))&&(c=c.slice(0,i.index)+"["+wf("a",i[0].length-2)+"]"+c.slice(this.tokenizer.rules.inline.reflinkSearch.lastIndex))}for(;null!=(i=this.tokenizer.rules.inline.blockSkip.exec(c));)c=c.slice(0,i.index)+"["+wf("a",i[0].length-2)+"]"+c.slice(this.tokenizer.rules.inline.blockSkip.lastIndex);for(;null!=(i=this.tokenizer.rules.inline.escapedEmSt.exec(c));)c=c.slice(0,i.index+i[0].length-2)+"++"+c.slice(this.tokenizer.rules.inline.escapedEmSt.lastIndex),this.tokenizer.rules.inline.escapedEmSt.lastIndex--;for(;e;)if(o||(a=""),o=!1,!(this.options.extensions&&this.options.extensions.inline&&this.options.extensions.inline.some((function(n){return!!(t=n.call({lexer:u},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])&&"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])&&"text"===t.type&&"text"===n.type?(n.raw+=t.raw,n.text+=t.text):l.push(t);else if(t=this.tokenizer.emStrong(e,c,a))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,Af))e=e.substring(t.raw.length),l.push(t);else if(this.state.inLink||!(t=this.tokenizer.url(e,Af))){if(r=e,this.options.extensions&&this.options.extensions.startInline&&function(){var t=1/0,n=e.slice(1),i=void 0;u.options.extensions.startInline.forEach((function(e){"number"===typeof(i=e.call({lexer:this},n))&&i>=0&&(t=Math.min(t,i))})),t<1/0&&t>=0&&(r=e.substring(0,t+1))}(),t=this.tokenizer.inlineText(r,Sf))e=e.substring(t.raw.length),"_"!==t.raw.slice(-1)&&(a=t.raw.slice(-1)),o=!0,(n=l[l.length-1])&&"text"===n.type?(n.raw+=t.raw,n.text+=t.text):l.push(t);else if(e){var f="Infinite loop on byte: "+e.charCodeAt(0);if(this.options.silent){console.error(f);break}throw new Error(f)}}else e=e.substring(t.raw.length),l.push(t);return l}}],[{key:"rules",get:function(){return{block:Cf,inline:Ef}}},{key:"lex",value:function(t,n){return new e(n).lex(t)}},{key:"lexInline",value:function(t,n){return new e(n).inlineTokens(t)}}]),e}(),Nf=function(){function e(t){Dt(this,e),this.options=t||Zs}return xt(e,[{key:"code",value:function(e,t,n){var r=(t||"").match(/\S*/)[0];if(this.options.highlight){var i=this.options.highlight(e,r);null!=i&&i!==e&&(n=!0,e=i)}return e=e.replace(/\n$/,"")+"\n",r?'
    '+(n?e:of(e,!0))+"
    \n":"
    "+(n?e:of(e,!0))+"
    \n"}},{key:"blockquote",value:function(e){return"
    \n".concat(e,"
    \n")}},{key:"html",value:function(e){return e}},{key:"heading",value:function(e,t,n,r){if(this.options.headerIds){var i=this.options.headerPrefix+r.slug(n);return"').concat(e,"\n")}return"").concat(e,"\n")}},{key:"hr",value:function(){return this.options.xhtml?"
    \n":"
    \n"}},{key:"list",value:function(e,t,n){var r=t?"ol":"ul";return"<"+r+(t&&1!==n?' start="'+n+'"':"")+">\n"+e+"\n"}},{key:"listitem",value:function(e){return"
  • ".concat(e,"
  • \n")}},{key:"checkbox",value:function(e){return" "}},{key:"paragraph",value:function(e){return"

    ".concat(e,"

    \n")}},{key:"table",value:function(e,t){return t&&(t="".concat(t,"")),"\n\n"+e+"\n"+t+"
    \n"}},{key:"tablerow",value:function(e){return"\n".concat(e,"\n")}},{key:"tablecell",value:function(e,t){var n=t.header?"th":"td";return(t.align?"<".concat(n,' align="').concat(t.align,'">'):"<".concat(n,">"))+e+"\n")}},{key:"strong",value:function(e){return"".concat(e,"")}},{key:"em",value:function(e){return"".concat(e,"")}},{key:"codespan",value:function(e){return"".concat(e,"")}},{key:"br",value:function(){return this.options.xhtml?"
    ":"
    "}},{key:"del",value:function(e){return"".concat(e,"")}},{key:"link",value:function(e,t,n){if(null===(e=df(this.options.sanitize,this.options.baseUrl,e)))return n;var r='
    "}},{key:"image",value:function(e,t,n){if(null===(e=df(this.options.sanitize,this.options.baseUrl,e)))return n;var r='').concat(n,'":">"}},{key:"text",value:function(e){return e}}]),e}(),Of=function(){function e(){Dt(this,e)}return xt(e,[{key:"strong",value:function(e){return e}},{key:"em",value:function(e){return e}},{key:"codespan",value:function(e){return e}},{key:"del",value:function(e){return e}},{key:"html",value:function(e){return e}},{key:"text",value:function(e){return e}},{key:"link",value:function(e,t,n){return""+n}},{key:"image",value:function(e,t,n){return""+n}},{key:"br",value:function(){return""}}]),e}(),Tf=function(){function e(){Dt(this,e),this.seen={}}return xt(e,[{key:"serialize",value:function(e){return e.toLowerCase().trim().replace(/<[!\/a-z].*?>/gi,"").replace(/[\u2000-\u206F\u2E00-\u2E7F\\'!"#$%&()*+,./:;<=>?@[\]^`{|}~]/g,"").replace(/\s/g,"-")}},{key:"getNextSafeSlug",value:function(e,t){var n=e,r=0;if(this.seen.hasOwnProperty(n)){r=this.seen[e];do{n=e+"-"+ ++r}while(this.seen.hasOwnProperty(n))}return t||(this.seen[e]=r,this.seen[n]=0),n}},{key:"slug",value:function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},n=this.serialize(e);return this.getNextSafeSlug(n,t.dryrun)}}]),e}(),Bf=function(){function e(t){Dt(this,e),this.options=t||Zs,this.options.renderer=this.options.renderer||new Nf,this.renderer=this.options.renderer,this.renderer.options=this.options,this.textRenderer=new Of,this.slugger=new Tf}return xt(e,[{key:"parse",value:function(e){var t,n,r,i,o,a,u,l,c,s,f,d,h,p,v,m,y,g,_,b=!(arguments.length>1&&void 0!==arguments[1])||arguments[1],D="",w=e.length;for(t=0;t0&&"paragraph"===v.tokens[0].type?(v.tokens[0].text=g+" "+v.tokens[0].text,v.tokens[0].tokens&&v.tokens[0].tokens.length>0&&"text"===v.tokens[0].tokens[0].type&&(v.tokens[0].tokens[0].text=g+" "+v.tokens[0].tokens[0].text)):v.tokens.unshift({type:"text",text:g}):p+=g),p+=this.parse(v.tokens,h),c+=this.renderer.listitem(p,y,m);D+=this.renderer.list(c,f,d);continue;case"html":D+=this.renderer.html(s.text);continue;case"paragraph":D+=this.renderer.paragraph(this.parseInline(s.tokens));continue;case"text":for(c=s.tokens?this.parseInline(s.tokens):s.text;t+1An error occurred:

    "+of(e.message+"",!0)+"
    ";throw e}try{var l=Ff.lex(e,t);if(t.walkTokens){if(t.async)return Promise.all(Mf.walkTokens(l,t.walkTokens)).then((function(){return Bf.parse(l,t)})).catch(u);Mf.walkTokens(l,t.walkTokens)}return Bf.parse(l,t)}catch(c){u(c)}}Mf.options=Mf.setOptions=function(e){var t;return gf(Mf.defaults,e),t=Mf.defaults,Zs=t,Mf},Mf.getDefaults=Js,Mf.defaults=Zs,Mf.use=function(){for(var e=arguments.length,t=new Array(e),n=0;nAn error occurred:

    "+of(c.message+"",!0)+"
    ";throw c}},Mf.Parser=Bf,Mf.parser=Bf.parse,Mf.Renderer=Nf,Mf.TextRenderer=Of,Mf.Lexer=Ff,Mf.lexer=Ff.lex,Mf.Tokenizer=kf,Mf.Slugger=Tf,Mf.parse=Mf;Mf.options,Mf.setOptions,Mf.use,Mf.walkTokens,Mf.parseInline,Bf.parse,Ff.lex;var Lf=function(e){var t=e.title,n=e.description,r=e.unit,i=e.expr,o=e.showLegend,a=e.filename,u=e.alias,l=Wr().period,c=Qr(),s=re(null),f=_t(X(!0),2),d=f[0],h=f[1],p=_t(X(l.step||1),2),v=p[0],y=p[1],g=_t(X({limits:{enable:!1,range:{1:[0,0]}}}),2),_=g[0],b=g[1],D=oe((function(){return Array.isArray(i)&&i.every((function(e){return e}))}),[i]),w=Fs({predefinedQuery:D?i:[],display:"chart",visible:d,customStep:v}),x=w.isLoading,k=w.graphData,C=w.error,E=w.warning,S=function(e){var t=Kn({},_);t.limits.range=e,b(t)};if(te((function(){var e=new IntersectionObserver((function(e){e.forEach((function(e){return h(e.isIntersecting)}))}),{threshold:.1});return s.current&&e.observe(s.current),function(){s.current&&e.unobserve(s.current)}}),[]),!D)return fr(lo,{variant:"error",children:[fr("code",{children:'"expr"'})," not found. Check the configuration file ",fr("b",{children:a}),"."]});var A=function(){return fr("div",{className:"vm-predefined-panel-header__description vm-default-styles",children:[n&&fr(m,{children:[fr("div",{children:[fr("span",{children:"Description:"}),fr("div",{dangerouslySetInnerHTML:{__html:Mf.parse(n)}})]}),fr("hr",{})]}),fr("div",{children:[fr("span",{children:"Queries:"}),fr("div",{children:i.map((function(e,t){return fr("div",{children:e},"".concat(t,"_").concat(e))}))})]})]})};return fr("div",{className:"vm-predefined-panel",ref:s,children:[fr("div",{className:"vm-predefined-panel-header",children:[fr(mo,{title:fr(A,{}),children:fr("div",{className:"vm-predefined-panel-header__info",children:fr(li,{})})}),fr("h3",{className:"vm-predefined-panel-header__title",children:t||""}),fr("div",{className:"vm-predefined-panel-header__step",children:fr(_s,{defaultStep:l.step,setStep:y})}),fr(Bs,{yaxis:_,setYaxisLimits:S,toggleEnableLimits:function(){var e=Kn({},_);e.limits.enable=!e.limits.enable,b(e)}})]}),fr("div",{className:"vm-predefined-panel-body",children:[x&&fr(Ms,{}),C&&fr(lo,{variant:"error",children:C}),E&&fr(lo,{variant:"warning",children:E}),k&&fr(vs,{data:k,period:l,customStep:v,query:i,yaxis:_,unit:r,alias:u,showLegend:o,setYaxisLimits:S,setPeriod:function(e){var t=e.from,n=e.to;c({type:"SET_PERIOD",payload:{from:t,to:n}})},fullWidth:!1})]})]})},Pf=function(e){var t=e.defaultExpanded,n=void 0!==t&&t,r=e.onChange,i=e.title,o=e.children,a=_t(X(n),2),u=a[0],l=a[1];return te((function(){r&&r(u)}),[u]),fr(m,{children:[fr("header",{className:"vm-accordion-header ".concat(u&&"vm-accordion-header_open"),onClick:function(){l((function(e){return!e}))},children:[i,fr("div",{className:"vm-accordion-header__arrow ".concat(u&&"vm-accordion-header__arrow_open"),children:fr(hi,{})})]}),u&&fr("section",{className:"vm-accordion-section",children:o},"content")]})},If=function(e){var t=e.index,n=e.title,r=e.panels,i=e.filename,o=bo(document.body),a=oe((function(){return o.width/12}),[o]),u=_t(X(!t),2),l=u[0],c=u[1],s=_t(X([]),2),f=s[0],d=s[1];te((function(){d(r&&r.map((function(e){return e.width||12})))}),[r]);var h=_t(X({start:0,target:0,enable:!1}),2),p=h[0],v=h[1],m=function(e){if(p.enable){var t=p.start,n=Math.ceil((t-e.clientX)/a);if(!(Math.abs(n)>=12)){var r=f.map((function(e,t){return e-(t===p.target?n:0)}));d(r)}}},y=function(){v(Kn(Kn({},p),{},{enable:!1}))},g=function(e){return function(t){!function(e,t){v({start:e.clientX,target:t,enable:!0})}(t,e)}};return te((function(){return window.addEventListener("mousemove",m),window.addEventListener("mouseup",y),function(){window.removeEventListener("mousemove",m),window.removeEventListener("mouseup",y)}}),[p]),fr("div",{className:"vm-predefined-dashboard",children:fr(Pf,{defaultExpanded:l,onChange:function(e){return c(e)},title:fr((function(){return fr("div",{className:Bi()({"vm-predefined-dashboard-header":!0,"vm-predefined-dashboard-header_open":l}),children:[(n||i)&&fr("span",{className:"vm-predefined-dashboard-header__title",children:n||"".concat(t+1,". ").concat(i)}),r&&fr("span",{className:"vm-predefined-dashboard-header__count",children:["(",r.length," panels)"]})]})}),{}),children:fr("div",{className:"vm-predefined-dashboard-panels",children:Array.isArray(r)&&r.length?r.map((function(e,t){return fr("div",{className:"vm-predefined-dashboard-panels-panel vm-block vm-block_empty-padding",style:{gridColumn:"span ".concat(f[t])},children:[fr(Lf,{title:e.title,description:e.description,unit:e.unit,expr:e.expr,alias:e.alias,filename:i,showLegend:e.showLegend}),fr("button",{className:"vm-predefined-dashboard-panels-panel__resizer",onMouseDown:g(t)})]},t)})):fr("div",{className:"vm-predefined-dashboard-panels-panel__alert",children:fr(lo,{variant:"error",children:[fr("code",{children:'"panels"'})," not found. Check the configuration file ",fr("b",{children:i}),"."]})})})})})},$f=function(){!function(){var e=Wr(),t=e.duration,n=e.relativeTime,r=e.period,i=r.date,o=r.step,a=function(){var e,r=Ys((qn(e={},"g0.range_input",t),qn(e,"g0.end_input",i),qn(e,"g0.step_input",o),qn(e,"g0.relative_time",n),e));ar(r)};te(a,[t,n,i,o]),te(a,[])}();var e=_t(X([]),2),t=e[0],n=e[1],r=_t(X("0"),2),i=r[0],o=r[1],a=oe((function(){return t.map((function(e,t){return{label:e.title||"",value:"".concat(t),className:"vm-predefined-panels-tabs__tab"}}))}),[t]),u=oe((function(){return t[+i]||{}}),[t,i]),l=oe((function(){return null===u||void 0===u?void 0:u.rows}),[u]),c=oe((function(){return u.title||u.filename||""}),[u]),s=oe((function(){return Array.isArray(l)&&!!l.length}),[l]);return te((function(){Gs().then((function(e){return e.length&&n(e)}))}),[]),fr("div",{className:"vm-predefined-panels",children:[!t.length&&fr(lo,{variant:"info",children:"Dashboards not found"}),a.length>1&&fr("div",{className:"vm-predefined-panels-tabs vm-block vm-block_empty-padding",children:fr(Pi,{activeItem:i,items:a,onChange:function(e){o(e)}})}),fr("div",{className:"vm-predefined-panels__dashboards",children:[s&&l.map((function(e,t){return fr(If,{index:t,filename:c,title:e.title,panels:e.panels},"".concat(i,"_").concat(t))})),!!t.length&&!s&&fr(lo,{variant:"error",children:[fr("code",{children:'"rows"'})," not found. Check the configuration file ",fr("b",{children:c}),"."]})]})]})},Rf=function(e,t){var n=t.match?"&match[]="+encodeURIComponent(t.match):"",r=t.focusLabel?"&focusLabel="+encodeURIComponent(t.focusLabel):"";return"".concat(e,"/api/v1/status/tsdb?topN=").concat(t.topN,"&date=").concat(t.date).concat(n).concat(r)},jf=function(){function e(){Dt(this,e),this.tsdbStatus=void 0,this.tabsNames=void 0,this.tsdbStatus=this.defaultTSDBStatus,this.tabsNames=["table","graph"]}return xt(e,[{key:"tsdbStatusData",get:function(){return this.tsdbStatus},set:function(e){this.tsdbStatus=e}},{key:"defaultTSDBStatus",get:function(){return{totalSeries:0,totalLabelValuePairs:0,seriesCountByMetricName:[],seriesCountByLabelName:[],seriesCountByFocusLabelValue:[],seriesCountByLabelValuePair:[],labelValueCountByLabelName:[]}}},{key:"keys",value:function(e){var t=[];return e&&(t=t.concat("seriesCountByFocusLabelValue")),t=t.concat("seriesCountByMetricName","seriesCountByLabelName","seriesCountByLabelValuePair","labelValueCountByLabelName"),t}},{key:"defaultState",get:function(){var e=this;return this.keys("job").reduce((function(t,n){return Kn(Kn({},t),{},{tabs:Kn(Kn({},t.tabs),{},qn({},n,e.tabsNames)),containerRefs:Kn(Kn({},t.containerRefs),{},qn({},n,re(null))),defaultActiveTab:Kn(Kn({},t.defaultActiveTab),{},qn({},n,0))})}),{tabs:{},containerRefs:{},defaultActiveTab:{}})}},{key:"sectionsTitles",value:function(e){return{seriesCountByMetricName:"Metric names with the highest number of series",seriesCountByLabelName:"Labels with the highest number of series",seriesCountByFocusLabelValue:'Values for "'.concat(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"}}},{key:"tablesHeaders",get:function(){return{seriesCountByMetricName:zf,seriesCountByLabelName:Uf,seriesCountByFocusLabelValue:Hf,seriesCountByLabelValuePair:Yf,labelValueCountByLabelName:Vf}}},{key:"totalSeries",value:function(e){return"labelValueCountByLabelName"===e?-1:this.tsdbStatus.totalSeries}}]),e}(),zf=[{id:"name",label:"Metric name"},{id:"value",label:"Number of series"},{id:"percentage",label:"Percent of series"},{id:"action",label:"Action"}],Uf=[{id:"name",label:"Label name"},{id:"value",label:"Number of series"},{id:"percentage",label:"Percent of series"},{id:"action",label:"Action"}],Hf=[{id:"name",label:"Label value"},{id:"value",label:"Number of series"},{id:"percentage",label:"Percent of series"},{disablePadding:!1,id:"action",label:"Action",numeric:!1}],Yf=[{id:"name",label:"Label=value pair"},{id:"value",label:"Number of series"},{id:"percentage",label:"Percent of series"},{id:"action",label:"Action"}],Vf=[{id:"name",label:"Label name"},{id:"value",label:"Number of unique values"},{id:"action",label:"Action"}],qf={seriesCountByMetricName:function(e,t){return Wf("__name__",t)},seriesCountByLabelName:function(e,t){return"{".concat(t,'!=""}')},seriesCountByFocusLabelValue:function(e,t){return Wf(e,t)},seriesCountByLabelValuePair:function(e,t){var n=t.split("="),r=n[0],i=n.slice(1).join("=");return Wf(r,i)},labelValueCountByLabelName:function(e,t){return"{".concat(t,'!=""}')}},Wf=function(e,t){return e?"{"+e+"="+JSON.stringify(t)+"}":""},Qf=function(e){var t=e.topN,n=e.error,r=e.query,i=e.onSetHistory,o=e.onRunQuery,a=e.onSetQuery,u=e.onTopNChange,l=e.onFocusLabelChange,c=e.totalSeries,s=e.totalLabelValuePairs,f=e.date,d=e.match,h=e.focusLabel,p=ni().autocomplete,v=ri(),m=Ls().queryOptions,y=oe((function(){return t<1?"Number must be bigger than zero":""}),[t]);return fr("div",{className:"vm-cardinality-configurator vm-block",children:[fr("div",{className:"vm-cardinality-configurator-controls",children:[fr("div",{className:"vm-cardinality-configurator-controls__query",children:fr(ms,{value:r||d||"",autocomplete:p,options:m,error:n,onArrowUp:function(){i(-1)},onArrowDown:function(){i(1)},onEnter:o,onChange:a,label:"Time series selector"})}),fr("div",{className:"vm-cardinality-configurator-controls__item",children:fr(To,{label:"Number of entries per table",type:"number",value:t,error:y,onChange:u})}),fr("div",{className:"vm-cardinality-configurator-controls__item",children:fr(To,{label:"Focus label",type:"text",value:h||"",onChange:l})}),fr("div",{className:"vm-cardinality-configurator-controls__item",children:fr(Ds,{label:"Autocomplete",value:p,onChange:function(){v({type:"TOGGLE_AUTOCOMPLETE"})}})})]}),fr("div",{className:"vm-cardinality-configurator-bottom",children:[fr("div",{className:"vm-cardinality-configurator-bottom__info",children:["Analyzed ",fr("b",{children:c})," series with ",fr("b",{children:s}),' "label=value" pairs at ',fr("b",{children:f}),d&&fr("span",{children:[" for series selector ",fr("b",{children:d})]}),". Show top ",t," entries per table."]}),fr(ho,{startIcon:fr(bi,{}),onClick:o,children:"Execute Query"})]})]})};function Gf(e){var t=e.order,n=e.orderBy,r=e.onRequestSort,i=e.headerCells;return fr("thead",{className:"vm-table-header",children:fr("tr",{className:"vm-table__row vm-table__row_header",children:i.map((function(e){return fr("th",{className:Bi()({"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:(i=e.id,function(e){r(e,i)}),children:fr("div",{className:"vm-table-cell__content",children:[e.label,"action"!==e.id&&"percentage"!==e.id&&fr("div",{className:Bi()({"vm-table__sort-icon":!0,"vm-table__sort-icon_active":n===e.id,"vm-table__sort-icon_desc":"desc"===t&&n===e.id}),children:fr(vi,{})})]})},e.id);var i}))})})}function Jf(e,t,n){return t[n]e[n]?1:0}function Zf(e,t){return"desc"===e?function(e,n){return Jf(e,n,t)}:function(e,n){return-Jf(e,n,t)}}function Kf(e,t){var n=e.map((function(e,t){return[e,t]}));return n.sort((function(e,n){var r=t(e[0],n[0]);return 0!==r?r:e[1]-n[1]})),n.map((function(e){return e[0]}))}var Xf=function(e){var t=e.rows,n=e.headerCells,r=e.defaultSortColumn,i=e.tableCells,o=_t(X("desc"),2),a=o[0],u=o[1],l=_t(X(r),2),c=l[0],s=l[1],f=_t(X([]),2),d=f[0],h=f[1],p=function(e){return function(){var t=d.indexOf(e),n=[];-1===t?n=n.concat(d,e):0===t?n=n.concat(d.slice(1)):t===d.length-1?n=n.concat(d.slice(0,-1)):t>0&&(n=n.concat(d.slice(0,t),d.slice(t+1))),h(n)}},v=Kf(t,Zf(a,c));return fr("table",{className:"vm-table",children:[fr(Gf,{numSelected:d.length,order:a,orderBy:c,onSelectAllClick:function(e){if(e.target.checked){var n=t.map((function(e){return e.name}));h(n)}else h([])},onRequestSort:function(e,t){u(c===t&&"asc"===a?"desc":"asc"),s(t)},rowCount:t.length,headerCells:n}),fr("tbody",{className:"vm-table-header",children:v.map((function(e){return fr("tr",{className:Bi()({"vm-table__row":!0,"vm-table__row_selected":(t=e.name,-1!==d.indexOf(t))}),onClick:p(e.name),children:i(e)},e.name);var t}))})]})},ed=function(e){var t=e.row,n=e.totalSeries,r=e.onActionClick,i=n>0?t.value/n*100:-1;return fr(m,{children:[fr("td",{className:"vm-table-cell",children:t.name},t.name),fr("td",{className:"vm-table-cell",children:t.value},t.value),i>0&&fr("td",{className:"vm-table-cell",children:fr(Ps,{value:i})},t.progressValue),fr("td",{className:"vm-table-cell vm-table-cell_right",children:fr("div",{className:"vm-table-cell__content",children:fr(mo,{title:"Filter by ".concat(t.name),children:fr(ho,{variant:"text",size:"small",onClick:r,children:fr(Di,{})})})})},"action")]})},td=function(e){var t=e.data,n=e.container,r=e.configs,i=re(null),o=_t(X(),2),a=o[0],u=o[1],l=bo(n),c=Kn(Kn({},r),{},{width:l.width||400});return te((function(){if(i.current){var e=new zc(c,t,i.current);return u(e),e.destroy}}),[i.current,l]),te((function(){a&&a.setData(t)}),[t]),fr("div",{style:{height:"100%"},children:fr("div",{ref:i})})},nd=function(e,t){return Math.round(e*(t=Math.pow(10,t)))/t},rd=1,id=function(e,t,n,r){return nd(t+e*(n+r),6)},od=function(e,t,n,r,i){var o=1-t,a=n===rd?o/(e-1):2===n?o/e:3===n?o/(e+1):0;(isNaN(a)||a===1/0)&&(a=0);var u=n===rd?0:2===n?a/2:3===n?a:0,l=t/e,c=nd(l,6);if(null==r)for(var s=0;s=n&&e<=i&&t>=r&&t<=o};function ud(e,t,n,r,i){var o=this;o.x=e,o.y=t,o.w=n,o.h=r,o.l=i||0,o.o=[],o.q=null}var ld={split:function(){var e=this,t=e.x,n=e.y,r=e.w/2,i=e.h/2,o=e.l+1;e.q=[new ud(t+r,n,r,i,o),new ud(t,n,r,i,o),new ud(t,n+i,r,i,o),new ud(t+r,n+i,r,i,o)]},quads:function(e,t,n,r,i){var o=this,a=o.q,u=o.x+o.w/2,l=o.y+o.h/2,c=tu,d=t+r>l;c&&f&&i(a[0]),s&&c&&i(a[1]),s&&d&&i(a[2]),f&&d&&i(a[3])},add:function(e){var t=this;if(null!=t.q)t.quads(e.x,e.y,e.w,e.h,(function(t){t.add(e)}));else{var n=t.o;if(n.push(e),n.length>10&&t.l<4){t.split();for(var r=function(e){var r=n[e];t.quads(r.x,r.y,r.w,r.h,(function(e){e.add(r)}))},i=0;i=0?"left":"right",e.ctx.textBaseline=1===s?"middle":i[n]>=0?"bottom":"top",e.ctx.fillText(i[n],f,g)}}))})),e.ctx.restore()}function b(e,t,n){return[0,zc.rangeNum(0,n,.05,!0)[1]]}return{hooks:{drawClear:function(t){var n;if((y=y||new ud(0,0,t.bbox.width,t.bbox.height)).clear(),t.series.forEach((function(e){e._paths=null})),l=d?[null].concat(m(t.data.length-1-o.length,t.data[0].length)):2===t.series.length?[null].concat(m(t.data[0].length,1)):[null].concat(function(e,t){var n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:h,r=Array.from({length:t},(function(){return{offs:Array(e).fill(0),size:Array(e).fill(0)}}));return od(e,n,p,null,(function(e,n,i){od(t,1,v,null,(function(t,o,a){r[t].offs[e]=n+i*o,r[t].size[e]=i*a}))})),r}(t.data[0].length,t.data.length-1-o.length,1===t.data[0].length?1:h)),null!=(null===(n=e.disp)||void 0===n?void 0:n.fill)){c=[null];for(var r=1;r0&&!o.includes(t)&&zc.assign(e,{paths:g,points:{show:_}})}))}}}((cd=[1],sd=0,fd=1,dd=0,hd=function(e,t){return{stroke:e,fill:t}}({unit:3,values:function(e){return e.data[1].map((function(e,t){return 0!==t?"#33BB55":"#F79420"}))}},{unit:3,values:function(e){return e.data[1].map((function(e,t){return 0!==t?"#33BB55":"#F79420"}))}}),{which:cd,ori:sd,dir:fd,radius:dd,disp:hd}))]},vd=function(e){var t=e.rows,n=e.activeTab,r=e.onChange,i=e.tabs,o=e.chartContainer,a=e.totalSeries,u=e.tabId,l=e.onActionClick,c=e.sectionTitle,s=e.tableHeaderCells,f=oe((function(){return i.map((function(e,t){return{value:String(t),label:e,icon:fr(0===t?xi:wi,{})}}))}),[i]);return fr("div",{className:"vm-metrics-content vm-block",children:[fr("div",{className:"vm-metrics-content-header vm-section-header",children:[fr("h5",{className:"vm-section-header__title",children:c}),fr("div",{className:"vm-section-header__tabs",children:fr(Pi,{activeItem:String(n),items:f,onChange:function(e){r(e,u)}})})]}),fr("div",{ref:o,children:[0===n&&fr(Xf,{rows:t,headerCells:s,defaultSortColumn:"value",tableCells:function(e){return fr(ed,{row:e,totalSeries:a,onActionClick:l})}}),1===n&&fr(td,{data:[t.map((function(e){return e.name})),t.map((function(e){return e.value})),t.map((function(e,t){return t%12==0?1:t%10==0?2:0}))],container:(null===o||void 0===o?void 0:o.current)||null,configs:pd})]})]})},md=function(){var e=eo(),t=e.topN,n=e.match,r=e.date,i=e.focusLabel,o=to();!function(){var e=eo(),t=e.topN,n=e.match,r=e.date,i=e.focusLabel,o=e.extraLabel,a=function(){var e=Ys({topN:t,date:r,match:n,extraLabel:o,focusLabel:i});ar(e)};te(a,[t,n,r,i,o]),te(a,[])}();var a=_t(X(n||""),2),u=a[0],l=a[1],c=_t(X(0),2),s=c[0],f=c[1],d=_t(X([]),2),h=d[0],p=d[1],v=function(){var e=new jf,t=eo(),n=t.topN,r=t.extraLabel,i=t.match,o=t.date,a=t.runQuery,u=t.focusLabel,l=hr().serverUrl,c=_t(X(!1),2),s=c[0],f=c[1],d=_t(X(),2),h=d[0],p=d[1],v=_t(X(e.defaultTSDBStatus),2),m=v[0],y=v[1];te((function(){h&&(y(e.defaultTSDBStatus),f(!1))}),[h]);var g=function(){var t=os(rs().mark((function t(n){var r,i,o,a;return rs().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:if(l){t.next=2;break}return t.abrupt("return");case 2:return p(""),f(!0),y(e.defaultTSDBStatus),r=Rf(l,n),t.prev=6,t.next=9,fetch(r);case 9:return i=t.sent,t.next=12,i.json();case 12:o=t.sent,i.ok?(a=o.data,y(Kn({},a)),f(!1)):(p(o.error),y(e.defaultTSDBStatus),f(!1)),t.next=20;break;case 16:t.prev=16,t.t0=t.catch(6),f(!1),t.t0 instanceof Error&&p("".concat(t.t0.name,": ").concat(t.t0.message));case 20:case"end":return t.stop()}}),t,null,[[6,16]])})));return function(e){return t.apply(this,arguments)}}();return te((function(){g({topN:n,extraLabel:r,match:i,date:o,focusLabel:u})}),[l,a,o]),e.tsdbStatusData=m,{isLoading:s,appConfigurator:e,error:h}}(),m=v.isLoading,y=v.appConfigurator,g=v.error,_=_t(X(y.defaultState.defaultActiveTab),2),b=_[0],D=_[1],w=y.tsdbStatusData,x=y.defaultState,k=y.tablesHeaders,C=function(e,t){D(Kn(Kn({},b),{},qn({},t,+e)))};return fr("div",{className:"vm-cardinality-panel",children:[m&&fr(Ms,{message:"Please wait while cardinality stats is calculated. \n This may take some time if the db contains big number of time series."}),fr(Qf,{error:"",query:u,topN:t,date:r,match:n,totalSeries:w.totalSeries,totalLabelValuePairs:w.totalLabelValuePairs,focusLabel:i,onRunQuery:function(){p((function(e){return[].concat(bt(e),[u])})),f((function(e){return e+1})),o({type:"SET_MATCH",payload:u}),o({type:"RUN_QUERY"})},onSetQuery:function(e){l(e)},onSetHistory:function(e){var t=s+e;t<0||t>=h.length||(f(t),l(h[t]))},onTopNChange:function(e){o({type:"SET_TOP_N",payload:+e})},onFocusLabelChange:function(e){o({type:"SET_FOCUS_LABEL",payload:e})}}),g&&fr(lo,{variant:"error",children:g}),y.keys(i).map((function(e){return fr(vd,{sectionTitle:y.sectionsTitles(i)[e],activeTab:b[e],rows:w[e],onChange:C,onActionClick:(t=e,function(e){var n=e.currentTarget.id,r=qf[t](i,n);l(r),p((function(e){return[].concat(bt(e),[r])})),f((function(e){return e+1})),o({type:"SET_MATCH",payload:r});var a="";"labelValueCountByLabelName"!==t&&"seriesCountByLabelName"!=t||(a=n),o({type:"SET_FOCUS_LABEL",payload:a}),o({type:"RUN_QUERY"})}),tabs:x.tabs[e],chartContainer:x.containerRefs[e],totalSeries:y.totalSeries(e),tabId:e,tableHeaderCells:k[e]},e);var t}))]})},yd=function(e){var t=e.rows,n=e.columns,r=_t(X(e.defaultOrderBy||"count"),2),i=r[0],o=r[1],a=_t(X("desc"),2),u=a[0],l=a[1],c=oe((function(){return Kf(t,Zf(u,i))}),[t,i,u]),s=function(e){return function(){var t;t=e,l((function(e){return"asc"===e&&i===t?"desc":"asc"})),o(t)}};return fr("table",{className:"vm-table",children:[fr("thead",{className:"vm-table-header",children:fr("tr",{className:"vm-table__row vm-table__row_header",children:n.map((function(e){return fr("th",{className:"vm-table-cell vm-table-cell_header vm-table-cell_sort",onClick:s(e.key),children:fr("div",{className:"vm-table-cell__content",children:[e.title||e.key,fr("div",{className:Bi()({"vm-table__sort-icon":!0,"vm-table__sort-icon_active":i===e.key,"vm-table__sort-icon_desc":"desc"===u&&i===e.key}),children:fr(vi,{})})]})},e.key)}))})}),fr("tbody",{className:"vm-table-body",children:c.map((function(e,t){return fr("tr",{className:"vm-table__row",children:n.map((function(t){return fr("td",{className:"vm-table-cell",children:e[t.key]||"-"},t.key)}))},t)}))})]})},gd=["table","JSON"].map((function(e,t){return{value:String(t),label:e,icon:fr(0===t?xi:ki,{})}})),_d=function(e){var t=e.rows,n=e.title,r=e.columns,i=e.defaultOrderBy,o=_t(X(0),2),a=o[0],u=o[1];return fr("div",{className:"vm-top-queries-panel vm-block",children:[fr("div",{className:"vm-top-queries-panel-header vm-section-header",children:[fr("h5",{className:"vm-section-header__title",children:n}),fr("div",{className:"vm-section-header__tabs",children:fr(Pi,{activeItem:String(a),items:gd,onChange:function(e){u(+e)}})})]}),fr("div",{children:[0===a&&fr(yd,{rows:t,columns:r,defaultOrderBy:i}),1===a&&fr(Ns,{data:t})]})]})},bd=function(){var e=function(){var e=hr().serverUrl,t=ao(),n=t.topN,r=t.maxLifetime,i=t.runQuery,o=_t(X(null),2),a=o[0],u=o[1],l=_t(X(!1),2),c=l[0],s=l[1],f=_t(X(),2),d=f[0],h=f[1],p=oe((function(){return function(e,t,n){return"".concat(e,"/api/v1/status/top_queries?topN=").concat(t||"","&maxLifetime=").concat(n||"")}(e,n,r)}),[e,n,r]),v=function(){var e=os(rs().mark((function e(){var t,n;return rs().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return s(!0),e.prev=1,e.next=4,fetch(p);case 4:return t=e.sent,e.next=7,t.json();case 7:n=e.sent,t.ok&&["topByAvgDuration","topByCount","topBySumDuration"].forEach((function(e){var t=n[e];Array.isArray(t)&&t.forEach((function(e){return e.timeRangeHours=+(e.timeRangeSeconds/3600).toFixed(2)}))})),u(t.ok?n:null),h(String(n.error||"")),e.next=16;break;case 13:e.prev=13,e.t0=e.catch(1),e.t0 instanceof Error&&"AbortError"!==e.t0.name&&h("".concat(e.t0.name,": ").concat(e.t0.message));case 16:s(!1);case 17:case"end":return e.stop()}}),e,null,[[1,13]])})));return function(){return e.apply(this,arguments)}}();return te((function(){v()}),[i]),{data:a,error:d,loading:c}}(),t=e.data,n=e.error,r=e.loading,i=ao(),o=i.topN,a=i.maxLifetime,u=ue(oo).dispatch;!function(){var e=ao(),t=e.topN,n=e.maxLifetime,r=function(){var e=Ys({topN:String(t),maxLifetime:n});ar(e)};te(r,[t,n]),te(r,[])}();var l=oe((function(){var e=a.trim().split(" ").reduce((function(e,t){var n=Or(t);return n?Kn(Kn({},e),n):Kn({},e)}),{});return!!yr().duration(e).asMilliseconds()}),[a]),c=oe((function(){return!!o&&o<1}),[o]),s=oe((function(){return c?"Number must be bigger than zero":""}),[c]),f=oe((function(){return l?"":"Invalid duration value"}),[l]),d=function(e){if(!t)return e;var n=t[e];return"number"===typeof n?Vc(n):n||e},h=function(){u({type:"SET_RUN_QUERY"})},p=function(e){"Enter"===e.key&&h()};return te((function(){t&&(o||u({type:"SET_TOP_N",payload:+t.topN}),a||u({type:"SET_MAX_LIFE_TIME",payload:t.maxLifetime}))}),[t]),fr("div",{className:"vm-top-queries",children:[r&&fr(Ms,{containerStyles:{height:"500px"}}),fr("div",{className:"vm-top-queries-controls vm-block",children:[fr("div",{className:"vm-top-queries-controls__fields",children:[fr(To,{label:"Max lifetime",value:a,error:f,helperText:"For example ".concat("30ms, 15s, 3d4h, 1y2w"),onChange:function(e){u({type:"SET_MAX_LIFE_TIME",payload:e})},onKeyDown:p}),fr(To,{label:"Number of returned queries",type:"number",value:o||"",error:s,onChange:function(e){u({type:"SET_TOP_N",payload:+e})},onKeyDown:p})]}),fr("div",{className:"vm-top-queries-controls-bottom",children:[fr("div",{className:"vm-top-queries-controls-bottom__info",children:["VictoriaMetrics tracks the last\xa0",fr(mo,{title:"search.queryStats.lastQueriesCount",children:fr("b",{children:d("search.queryStats.lastQueriesCount")})}),"\xa0queries with durations at least\xa0",fr(mo,{title:"search.queryStats.minQueryDuration",children:fr("b",{children:d("search.queryStats.minQueryDuration")})})]}),fr("div",{className:"vm-top-queries-controls-bottom__button",children:fr(ho,{startIcon:fr(bi,{}),onClick:h,children:"Execute"})})]})]}),n&&fr(lo,{variant:"error",children:n}),t&&fr(m,{children:fr("div",{className:"vm-top-queries-panels",children:[fr(_d,{rows:t.topByCount,title:"Most frequently executed queries",columns:[{key:"query"},{key:"timeRangeHours",title:"time range, hours"},{key:"count"}]}),fr(_d,{rows:t.topByAvgDuration,title:"Most heavy queries",columns:[{key:"query"},{key:"avgDurationSeconds",title:"avg duration, seconds"},{key:"timeRangeHours",title:"time range, hours"},{key:"count"}],defaultOrderBy:"avgDurationSeconds"}),fr(_d,{rows:t.topBySumDuration,title:"Queries with most summary time to execute",columns:[{key:"query"},{key:"sumDurationSeconds",title:"sum duration, seconds"},{key:"timeRangeHours",title:"time range, hours"},{key:"count"}],defaultOrderBy:"sumDurationSeconds"})]})})]})},Dd=["primary","secondary","error","warning","info","success"],wd=function(e){var t=e.setLoadingTheme,n=Xn().palette,r=void 0===n?{}:n,i=function(){Dd.forEach((function(e){var t=function(e){var 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"}(Mi("color-".concat(e)));Li("".concat(e,"-text"),t)}))};return te((function(){Dd.forEach((function(e){var t=r[e];t&&Li("color-".concat(e),t)})),function(){var e=window,t=e.innerWidth,n=e.innerHeight,r=document.documentElement,i=r.clientWidth,o=r.clientHeight;Li("scrollbar-width","".concat(t-i,"px")),Li("scrollbar-height","".concat(n-o,"px"))}(),i(),t(!1)}),[]),null},xd=function(){var e=_t(X(!1),2),t=e[0],n=e[1],r=_t(X([]),2),i=r[0],o=r[1],a=_t(X([]),2),u=a[0],l=a[1],s=oe((function(){return!!i.length}),[i]),f=function(){n(!0)},d=function(){n(!1)},h=function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"";l((function(n){return[{filename:t,text:": ".concat(e.message)}].concat(bt(n))}))},p=function(e,t){try{var n=JSON.parse(e),r=n.trace||n;if(!r.duration_msec)return void h(new Error(Co.traceNotFound),t);var i=new As(r,t);o((function(e){return[i].concat(bt(e))}))}catch(c){c instanceof Error&&h(c,t)}},v=function(e){l([]),Array.from(e.target.files||[]).map((function(e){var t=new FileReader,n=(null===e||void 0===e?void 0:e.name)||"";t.onload=function(e){var t,r=String(null===(t=e.target)||void 0===t?void 0:t.result);p(r,n)},t.readAsText(e)})),e.target.value=""},m=function(e){return function(){!function(e){l((function(t){return t.filter((function(t,n){return n!==e}))}))}(e)}},y=function(){return fr("div",{className:"vm-trace-page-controls",children:[fr(ho,{variant:"outlined",onClick:f,children:"Paste JSON"}),fr(mo,{title:"The file must contain tracing information in JSON format",children:fr(ho,{children:["Upload Files",fr("input",{id:"json",type:"file",accept:"application/json",multiple:!0,title:" ",onChange:v})]})})]})};return fr("div",{className:"vm-trace-page",children:[fr("div",{className:"vm-trace-page-header",children:[fr("div",{className:"vm-trace-page-header-errors",children:u.map((function(e,t){return fr("div",{className:"vm-trace-page-header-errors-item",children:[fr(lo,{variant:"error",children:[fr("b",{className:"vm-trace-page-header-errors-item__filename",children:e.filename}),fr("span",{children:e.text})]}),fr(ho,{className:"vm-trace-page-header-errors-item__close",startIcon:fr(ai,{}),variant:"text",color:"error",onClick:m(t)})]},"".concat(e,"_").concat(t))}))}),fr("div",{children:s&&fr(y,{})})]}),s&&fr("div",{children:fr(Rs,{jsonEditor:!0,traces:i,onDeleteClick:function(e){var t=i.filter((function(t){return t.idValue!==e.idValue}));o(bt(t))}})}),!s&&fr("div",{className:"vm-trace-page-preview",children:[fr("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",fr("a",{href:"https://docs.victoriametrics.com/#query-tracing",target:"_blank",rel:"noreferrer",children:"https://docs.victoriametrics.com/#query-tracing"}),"\n","Tracing graph will be displayed after file upload."]}),fr(y,{})]}),t&&fr(Lo,{title:"Paste JSON",onClose:d,children:fr($s,{editable:!0,displayTitle:!0,defaultTile:"JSON ".concat(i.length+1),onClose:d,onUpload:p})})]})},kd=function(){var e=_t(X(!0),2),t=e[0],n=e[1];return fr(m,t?{children:[fr(Ms,{}),fr(wd,{setLoadingTheme:n}),";"]}:{children:fr(Un,{children:fr(fo,{children:fr(jn,{children:fr($n,{path:"/",element:fr(qo,{}),children:[fr($n,{path:Jn.home,element:fr(Ws,{})}),fr($n,{path:Jn.dashboards,element:fr($f,{})}),fr($n,{path:Jn.cardinality,element:fr(md,{})}),fr($n,{path:Jn.topQueries,element:fr(bd,{})}),fr($n,{path:Jn.trace,element:fr(xd,{})})]})})})})})},Cd=function(e){e&&n.e(27).then(n.bind(n,27)).then((function(t){var n=t.getCLS,r=t.getFID,i=t.getFCP,o=t.getLCP,a=t.getTTFB;n(e),r(e),i(e),o(e),a(e)}))},Ed=document.getElementById("root");Ed&&Ye(fr(kd,{}),Ed),Cd()}()}(); \ No newline at end of file diff --git a/app/vmselect/vmui/static/js/main.a09b3097.js.LICENSE.txt b/app/vmselect/vmui/static/js/main.b76a42a5.js.LICENSE.txt similarity index 100% rename from app/vmselect/vmui/static/js/main.a09b3097.js.LICENSE.txt rename to app/vmselect/vmui/static/js/main.b76a42a5.js.LICENSE.txt diff --git a/docs/CHANGELOG.md b/docs/CHANGELOG.md index 388cad942..873f916ce 100644 --- a/docs/CHANGELOG.md +++ b/docs/CHANGELOG.md @@ -34,6 +34,7 @@ The following tip changes can be tested by building VictoriaMetrics components f * BUGFIX: [MetricsQL](https://docs.victoriametrics.com/MetricsQL.html): properly return an empty result from [limit_offset](https://docs.victoriametrics.com/MetricsQL.html#limit_offset) if the `offset` arg exceeds the number of inner time series. See [this issue](https://github.com/VictoriaMetrics/VictoriaMetrics/issues/3312). * BUGFIX: [vmagent](https://docs.victoriametrics.com/vmagent.html): properly discover GCE zones when `filter` option is set at [gce_sd_configs](https://docs.victoriametrics.com/sd_configs.html#gce_sd_configs). See [this issue](https://github.com/VictoriaMetrics/VictoriaMetrics/issues/3202). * BUGFIX: [vmui](https://docs.victoriametrics.com/#vmui): properly display the requested graph on the requested time range when navigating from Prometheus URL in Grafana. +* BUGFIX: [vmui](https://docs.victoriametrics.com/#vmui): properly display wide tables. See [this issue](https://github.com/VictoriaMetrics/VictoriaMetrics/issues/3153). * BUGFIX: reduce CPU usage spikes and memory usage spikes under high data ingestion rate introduced in [v1.83.0](https://docs.victoriametrics.com/CHANGELOG.html#v1830). See [this issue](https://github.com/VictoriaMetrics/VictoriaMetrics/issues/3343). ## [v1.83.1](https://github.com/VictoriaMetrics/VictoriaMetrics/releases/tag/v1.83.1) From 42e63fe0fd52e20521c0670a190ea4a526ff8bcd Mon Sep 17 00:00:00 2001 From: Roman Khavronenko Date: Fri, 25 Nov 2022 09:28:14 +0100 Subject: [PATCH 37/46] dashboards: cleanup & remove artifacts (#3387) * some unexpected DS UIDs were removed; * replace `$instance.*` filter with `$instance` since we respect the instance port anyway; * remove predefined datasource for `clusterbytenant` in favour of datasource variable `ds`. Signed-off-by: hagen1778 Signed-off-by: hagen1778 --- dashboards/clusterbytenant.json | 21 ++++++--------------- dashboards/operator.json | 4 ++-- dashboards/victoriametrics-cluster.json | 17 ++++++++--------- dashboards/victoriametrics.json | 2 -- 4 files changed, 16 insertions(+), 28 deletions(-) diff --git a/dashboards/clusterbytenant.json b/dashboards/clusterbytenant.json index 4d5e0a597..2c316acf5 100644 --- a/dashboards/clusterbytenant.json +++ b/dashboards/clusterbytenant.json @@ -1,14 +1,5 @@ { - "__inputs": [ - { - "name": "DS_VICTORIAMETRICS", - "label": "VictoriaMetrics", - "description": "", - "type": "datasource", - "pluginId": "prometheus", - "pluginName": "Prometheus" - } - ], + "__inputs": [], "__elements": [], "__requires": [ { @@ -116,7 +107,7 @@ { "datasource": { "type": "prometheus", - "uid": "${DS_VICTORIAMETRICS}" + "uid": "${ds}" }, "expr": "sum(increase(vm_tenant_inserted_rows_total{job=~\"$job\", instance=~\"$instance\",accountID=~\"$account\", projectID=~\"$project\"}[1m])/60) by (accountID,projectID) ", "interval": "", @@ -214,7 +205,7 @@ { "datasource": { "type": "prometheus", - "uid": "${DS_VICTORIAMETRICS}" + "uid": "${ds}" }, "editorMode": "code", "expr": "sum(rate(vm_tenant_select_requests_total{job=~\"$job\", instance=~\"$instance.*\",accountID=~\"$account\", projectID=~\"$project\"}[$__rate_interval])) by (accountID,projectID) ", @@ -320,7 +311,7 @@ { "datasource": { "type": "prometheus", - "uid": "${DS_VICTORIAMETRICS}" + "uid": "${ds}" }, "expr": "sum(vm_tenant_active_timeseries{job=~\"$job\", instance=~\"$instance.*\",accountID=~\"$account\",projectID=~\"$project\"}) by(accountID,projectID)", "format": "time_series", @@ -418,7 +409,7 @@ { "datasource": { "type": "prometheus", - "uid": "${DS_VICTORIAMETRICS}" + "uid": "${ds}" }, "expr": "sum(increase(vm_tenant_timeseries_created_total{job=~\"$job\", instance=~\"$instance\",accountID=~\"$account\", projectID=~\"$project\"}[1m])/60) by(accountID,projectID)", "interval": "", @@ -513,7 +504,7 @@ { "datasource": { "type": "prometheus", - "uid": "${DS_VICTORIAMETRICS}" + "uid": "${ds}" }, "editorMode": "code", "expr": "sum(vm_tenant_used_tenant_bytes{job=~\"$job\", instance=~\"$instance\",accountID=~\"$account\",projectID=~\"$project\"}) by(accountID,projectID)", diff --git a/dashboards/operator.json b/dashboards/operator.json index f75b84965..b7e7fe3d2 100644 --- a/dashboards/operator.json +++ b/dashboards/operator.json @@ -4,8 +4,8 @@ { "builtIn": 1, "datasource": { - "type": "grafana", - "uid": "-- Grafana --" + "type": "datasource", + "uid": "grafana" }, "enable": true, "hide": true, diff --git a/dashboards/victoriametrics-cluster.json b/dashboards/victoriametrics-cluster.json index bef6bc6c4..89ee61be0 100644 --- a/dashboards/victoriametrics-cluster.json +++ b/dashboards/victoriametrics-cluster.json @@ -109,7 +109,6 @@ "collapsed": false, "datasource": { "type": "prometheus", - "uid": "P4169E866C3094E38" }, "gridPos": { "h": 1, @@ -319,7 +318,7 @@ }, "editorMode": "code", "exemplar": true, - "expr": "sum(rate(vm_http_requests_total{job=~\"$job\", instance=~\"$instance.*\", path=~\"/select/.*\"}[$__rate_interval]))", + "expr": "sum(rate(vm_http_requests_total{job=~\"$job\", instance=~\"$instance\", path=~\"/select/.*\"}[$__rate_interval]))", "format": "time_series", "instant": true, "interval": "", @@ -459,7 +458,7 @@ }, "editorMode": "code", "exemplar": true, - "expr": "sum(max_over_time(vm_cache_entries{job=~\"$job\", instance=~\"$instance.*\", type=\"storage/hour_metric_ids\"}[1h]))", + "expr": "sum(max_over_time(vm_cache_entries{job=~\"$job\", instance=~\"$instance\", type=\"storage/hour_metric_ids\"}[1h]))", "format": "time_series", "instant": true, "interval": "", @@ -1099,7 +1098,7 @@ "uid": "$ds" }, "editorMode": "code", - "expr": "sum(rate(vm_http_requests_total{job=~\"$job\", instance=~\"$instance.*\", path!~\"/favicon.ico\"}[$__rate_interval])) by (path) > 0", + "expr": "sum(rate(vm_http_requests_total{job=~\"$job\", instance=~\"$instance\", path!~\"/favicon.ico\"}[$__rate_interval])) by (path) > 0", "format": "time_series", "intervalFactor": 1, "legendFormat": "{{path}}", @@ -1208,7 +1207,7 @@ "type": "prometheus", "uid": "$ds" }, - "expr": "sum(vm_cache_entries{job=~\"$job\", instance=~\"$instance.*\", type=\"storage/hour_metric_ids\"})", + "expr": "sum(vm_cache_entries{job=~\"$job\", instance=~\"$instance\", type=\"storage/hour_metric_ids\"})", "format": "time_series", "intervalFactor": 1, "legendFormat": "Active time series", @@ -1417,7 +1416,7 @@ "uid": "$ds" }, "editorMode": "code", - "expr": "sum(rate(vm_http_request_errors_total{job=~\"$job\", instance=~\"$instance.*\"}[$__rate_interval])) by (job, path) > 0", + "expr": "sum(rate(vm_http_request_errors_total{job=~\"$job\", instance=~\"$instance\"}[$__rate_interval])) by (job, path) > 0", "format": "time_series", "intervalFactor": 1, "legendFormat": "{{path}} ({{job}})", @@ -1523,7 +1522,7 @@ }, "editorMode": "code", "exemplar": true, - "expr": "sum(rate(vm_log_messages_total{job=~\"$job\",instance=~\"$instance.*\", level!=\"info\"}[$__rate_interval])) by (job, level) > 0", + "expr": "sum(rate(vm_log_messages_total{job=~\"$job\",instance=~\"$instance\", level!=\"info\"}[$__rate_interval])) by (job, level) > 0", "format": "time_series", "hide": false, "interval": "5m", @@ -5882,7 +5881,7 @@ "uid": "$ds" }, "editorMode": "code", - "expr": "sum(rate(vm_http_requests_total{job=~\"$job_select\", instance=~\"$instance.*\", path!~\"/favicon.ico|/metrics\"}[$__rate_interval])) by (path) > 0", + "expr": "sum(rate(vm_http_requests_total{job=~\"$job_select\", instance=~\"$instance\", path!~\"/favicon.ico|/metrics\"}[$__rate_interval])) by (path) > 0", "format": "time_series", "intervalFactor": 1, "legendFormat": "__auto", @@ -6988,7 +6987,7 @@ "uid": "$ds" }, "editorMode": "code", - "expr": "sum(rate(vm_http_requests_total{job=~\"$job_insert\", instance=~\"$instance.*\", path!~\"/favicon.ico|/metrics\"}[$__rate_interval])) by (path) > 0", + "expr": "sum(rate(vm_http_requests_total{job=~\"$job_insert\", instance=~\"$instance\", path!~\"/favicon.ico|/metrics\"}[$__rate_interval])) by (path) > 0", "format": "time_series", "intervalFactor": 1, "legendFormat": "__auto", diff --git a/dashboards/victoriametrics.json b/dashboards/victoriametrics.json index 8d4d8de9e..ce74a665a 100644 --- a/dashboards/victoriametrics.json +++ b/dashboards/victoriametrics.json @@ -1713,7 +1713,6 @@ "collapsed": true, "datasource": { "type": "prometheus", - "uid": "P4169E866C3094E38" }, "gridPos": { "h": 1, @@ -2031,7 +2030,6 @@ { "datasource": { "type": "prometheus", - "uid": "P4169E866C3094E38" }, "refId": "A" } From 1ab66186ca59e9b065c6dba5d05afaae4b7dc37b Mon Sep 17 00:00:00 2001 From: Yury Molodov Date: Fri, 25 Nov 2022 16:25:35 +0100 Subject: [PATCH 38/46] refactor: create Autocomplete component (#3390) --- .../Configurators/QueryEditor/QueryEditor.tsx | 117 +++------------- .../Main/Autocomplete/Autocomplete.tsx | 132 ++++++++++++++++++ .../components/Main/Autocomplete/style.scss | 6 + 3 files changed, 157 insertions(+), 98 deletions(-) create mode 100644 app/vmui/packages/vmui/src/components/Main/Autocomplete/Autocomplete.tsx create mode 100644 app/vmui/packages/vmui/src/components/Main/Autocomplete/style.scss diff --git a/app/vmui/packages/vmui/src/components/Configurators/QueryEditor/QueryEditor.tsx b/app/vmui/packages/vmui/src/components/Configurators/QueryEditor/QueryEditor.tsx index 5f5f63587..53ea0a7ad 100644 --- a/app/vmui/packages/vmui/src/components/Configurators/QueryEditor/QueryEditor.tsx +++ b/app/vmui/packages/vmui/src/components/Configurators/QueryEditor/QueryEditor.tsx @@ -1,11 +1,9 @@ -import React, { FC, useEffect, useMemo, useRef, useState } from "preact/compat"; +import React, { FC, useRef } from "preact/compat"; import { KeyboardEvent } from "react"; import { ErrorTypes } from "../../../types"; import TextField from "../../Main/TextField/TextField"; -import Popper from "../../Main/Popper/Popper"; -import useClickOutside from "../../../hooks/useClickOutside"; +import Autocomplete from "../../Main/Autocomplete/Autocomplete"; import "./style.scss"; -import classNames from "classnames"; export interface QueryEditorProps { onChange: (query: string) => void; @@ -34,25 +32,10 @@ const QueryEditor: FC = ({ disabled = false }) => { - const [focusOption, setFocusOption] = useState(-1); - const [openAutocomplete, setOpenAutocomplete] = useState(false); - const autocompleteAnchorEl = useRef(null); - const wrapperEl = useRef(null); - const foundOptions = useMemo(() => { - if (!openAutocomplete) return []; - try { - const regexp = new RegExp(String(value), "i"); - const found = options.filter((item) => regexp.test(item) && (item !== value)); - return found.sort((a,b) => (a.match(regexp)?.index || 0) - (b.match(regexp)?.index || 0)); - } catch (e) { - return []; - } - }, [openAutocomplete, options, value]); - - const handleCloseAutocomplete = () => { - setOpenAutocomplete(false); + const handleSelect = (val: string) => { + onChange(val); }; const handleKeyDown = (e: KeyboardEvent) => { @@ -62,71 +45,25 @@ const QueryEditor: FC = ({ const arrowUp = key === "ArrowUp"; const arrowDown = key === "ArrowDown"; const enter = key === "Enter"; - const escape = key === "Escape"; - const hasAutocomplete = openAutocomplete && foundOptions.length; - const valueAutocomplete = foundOptions[focusOption]; - - const isArrows = arrowUp || arrowDown; - const arrowsByOptions = isArrows && hasAutocomplete; - const arrowsByHistory = isArrows && ctrlMetaKey; - const enterByOptions = enter && hasAutocomplete; - - if (arrowsByOptions || arrowsByHistory || enterByOptions) { + // prev value from history + if (arrowUp && ctrlMetaKey) { e.preventDefault(); - } - - // ArrowUp - if (arrowUp && hasAutocomplete && !ctrlMetaKey) { - setFocusOption((prev) => prev === 0 ? 0 : prev - 1); - } else if (arrowUp && ctrlMetaKey) { onArrowUp(); } - // ArrowDown - if (arrowDown && hasAutocomplete && !ctrlMetaKey) { - setFocusOption((prev) => prev >= foundOptions.length - 1 ? foundOptions.length - 1 : prev + 1); - } else if (arrowDown && ctrlMetaKey) { + // next value from history + if (arrowDown && ctrlMetaKey) { + e.preventDefault(); onArrowDown(); } - // Enter - if (valueAutocomplete && enter && hasAutocomplete && !shiftKey && !ctrlMetaKey) { - if (disabled) return; - onChange(valueAutocomplete); - handleCloseAutocomplete(); - } else if (enter && !shiftKey) { + // execute query + if (enter && !shiftKey) { onEnter(); - handleCloseAutocomplete(); - } - - // Escape - if (escape && openAutocomplete) { - handleCloseAutocomplete(); } }; - const createHandlerOnChangeAutocomplete = (item: string) => () => { - if (disabled) return; - onChange(item); - handleCloseAutocomplete(); - }; - - useEffect(() => { - if (!autocomplete) return; - setFocusOption(-1); - const words = (value.match(/[a-zA-Z_:.][a-zA-Z0-9_:.]*/gm) || []).length; - setOpenAutocomplete(autocomplete && value.length > 2 && words <= 1); - }, [autocomplete, value]); - - useEffect(() => { - if (!wrapperEl.current) return; - const target = wrapperEl.current.childNodes[focusOption] as HTMLElement; - if (target?.scrollIntoView) target.scrollIntoView({ block: "center" }); - }, [focusOption]); - - useClickOutside(autocompleteAnchorEl, handleCloseAutocomplete, wrapperEl); - return
    = ({ onChange={onChange} disabled={disabled} /> - -
    - {foundOptions.map((item, i) => -
    - {item} -
    )} -
    -
    + {autocomplete && ( + + )}
    ; }; diff --git a/app/vmui/packages/vmui/src/components/Main/Autocomplete/Autocomplete.tsx b/app/vmui/packages/vmui/src/components/Main/Autocomplete/Autocomplete.tsx new file mode 100644 index 000000000..021e05797 --- /dev/null +++ b/app/vmui/packages/vmui/src/components/Main/Autocomplete/Autocomplete.tsx @@ -0,0 +1,132 @@ +import React, { FC, Ref, useEffect, useMemo, useRef, useState } from "preact/compat"; +import classNames from "classnames"; +import useClickOutside from "../../../hooks/useClickOutside"; +import Popper from "../Popper/Popper"; +import "./style.scss"; + +interface AutocompleteProps { + value: string + options: string[] + anchor: Ref + disabled?: boolean + maxWords?: number + onSelect: (val: string) => void +} + +const Autocomplete: FC = ({ + value, + options, + anchor, + disabled, + maxWords = 1, + onSelect, +}) => { + const wrapperEl = useRef(null); + + const [openAutocomplete, setOpenAutocomplete] = useState(false); + const [focusOption, setFocusOption] = useState(-1); + + const foundOptions = useMemo(() => { + if (!openAutocomplete) return []; + try { + const regexp = new RegExp(String(value), "i"); + const found = options.filter((item) => regexp.test(item) && (item !== value)); + return found.sort((a,b) => (a.match(regexp)?.index || 0) - (b.match(regexp)?.index || 0)); + } catch (e) { + return []; + } + }, [openAutocomplete, options, value]); + + const handleCloseAutocomplete = () => { + setOpenAutocomplete(false); + }; + + const createHandlerSelect = (item: string) => () => { + if (disabled) return; + onSelect(item); + handleCloseAutocomplete(); + }; + + const scrollToValue = () => { + if (!wrapperEl.current) return; + const target = wrapperEl.current.childNodes[focusOption] as HTMLElement; + if (target?.scrollIntoView) target.scrollIntoView({ block: "center" }); + }; + + const handleKeyDown = (e: KeyboardEvent) => { + const { key, ctrlKey, metaKey, shiftKey } = e; + const modifiers = ctrlKey || metaKey || shiftKey; + + if (key === "ArrowUp" && !modifiers) { + e.preventDefault(); + setFocusOption((prev) => prev <= 0 ? 0 : prev - 1); + } + + if (key === "ArrowDown" && !modifiers) { + e.preventDefault(); + const lastIndex = foundOptions.length - 1; + setFocusOption((prev) => prev >= lastIndex ? lastIndex : prev + 1); + } + + if (key === "Enter") { + const value = foundOptions[focusOption]; + value && onSelect(value); + handleCloseAutocomplete(); + } + + if (key === "Escape") { + handleCloseAutocomplete(); + } + }; + + useEffect(() => { + const words = (value.match(/[a-zA-Z_:.][a-zA-Z0-9_:.]*/gm) || []).length; + setOpenAutocomplete(value.length > 2 && words <= maxWords); + }, [value]); + + useEffect(() => { + scrollToValue(); + + window.addEventListener("keydown", handleKeyDown); + + return () => { + window.removeEventListener("keydown", handleKeyDown); + }; + }, [focusOption, foundOptions]); + + useEffect(() => { + setFocusOption(-1); + }, [foundOptions]); + + useClickOutside(wrapperEl, handleCloseAutocomplete); + + return ( + +
    + {foundOptions.map((option, i) => +
    + {option} +
    + )} +
    +
    + ); +}; + +export default Autocomplete; diff --git a/app/vmui/packages/vmui/src/components/Main/Autocomplete/style.scss b/app/vmui/packages/vmui/src/components/Main/Autocomplete/style.scss new file mode 100644 index 000000000..ad4d07ae6 --- /dev/null +++ b/app/vmui/packages/vmui/src/components/Main/Autocomplete/style.scss @@ -0,0 +1,6 @@ +@use "src/styles/variables" as *; + +.vm-autocomplete { + max-height: 300px; + overflow: auto; +} From 37cda9abd0b836849c7d30c0337a2f6201634f87 Mon Sep 17 00:00:00 2001 From: Yury Molodov Date: Fri, 25 Nov 2022 16:26:35 +0100 Subject: [PATCH 39/46] fix: change header settings (#3391) --- .../GlobalSettings/GlobalSettings.tsx | 23 ++++++++++++------- .../vmui/src/components/Header/Header.tsx | 2 +- app/vmui/packages/vmui/src/router/index.ts | 2 -- 3 files changed, 16 insertions(+), 11 deletions(-) diff --git a/app/vmui/packages/vmui/src/components/Configurators/GlobalSettings/GlobalSettings.tsx b/app/vmui/packages/vmui/src/components/Configurators/GlobalSettings/GlobalSettings.tsx index 32164d807..09e351f67 100644 --- a/app/vmui/packages/vmui/src/components/Configurators/GlobalSettings/GlobalSettings.tsx +++ b/app/vmui/packages/vmui/src/components/Configurators/GlobalSettings/GlobalSettings.tsx @@ -9,11 +9,14 @@ import Tooltip from "../../Main/Tooltip/Tooltip"; import LimitsConfigurator from "./LimitsConfigurator/LimitsConfigurator"; import { SeriesLimits } from "../../../types"; import { useCustomPanelDispatch, useCustomPanelState } from "../../../state/customPanel/CustomPanelStateContext"; +import { getAppModeEnable } from "../../../utils/app-mode"; +import classNames from "classnames"; const title = "Settings"; const GlobalSettings: FC = () => { + const appModeEnable = getAppModeEnable(); const { serverUrl: stateServerUrl } = useAppState(); const { seriesLimits } = useCustomPanelState(); @@ -36,7 +39,9 @@ const GlobalSettings: FC = () => { return <>