From fefc0f149e12461c1ce10334b395f3d0c6f84e4b Mon Sep 17 00:00:00 2001 From: Ron Federman <73110295+RonFed@users.noreply.github.com> Date: Thu, 9 Jan 2025 11:07:26 +0200 Subject: [PATCH 1/6] Update runtime detector to v0.0.6 (#2172) --- instrumentation/go.mod | 2 +- instrumentation/go.sum | 4 ++-- odiglet/go.mod | 2 +- odiglet/go.sum | 4 ++-- odiglet/pkg/ebpf/distribution_matcher.go | 6 +++--- procdiscovery/pkg/inspectors/java/java.go | 5 +++-- procdiscovery/pkg/inspectors/mysql/mysql.go | 2 +- procdiscovery/pkg/inspectors/nginx/nginx.go | 5 +++-- procdiscovery/pkg/inspectors/nodejs/nodejs.go | 5 +++-- procdiscovery/pkg/inspectors/python/python.go | 2 +- procdiscovery/pkg/process/process.go | 12 ++++++------ 11 files changed, 26 insertions(+), 23 deletions(-) diff --git a/instrumentation/go.mod b/instrumentation/go.mod index d9c3ac3b61..fdbed2d7a6 100644 --- a/instrumentation/go.mod +++ b/instrumentation/go.mod @@ -5,7 +5,7 @@ go 1.23.0 require ( github.com/go-logr/logr v1.4.2 github.com/odigos-io/odigos/common v0.0.0 - github.com/odigos-io/runtime-detector v0.0.5 + github.com/odigos-io/runtime-detector v0.0.6 go.opentelemetry.io/otel v1.33.0 golang.org/x/sync v0.10.0 ) diff --git a/instrumentation/go.sum b/instrumentation/go.sum index 228edee567..db21e46805 100644 --- a/instrumentation/go.sum +++ b/instrumentation/go.sum @@ -22,8 +22,8 @@ github.com/mdlayher/netlink v1.7.2 h1:/UtM3ofJap7Vl4QWCPDGXY8d3GIY2UGSDbK+QWmY8/ github.com/mdlayher/netlink v1.7.2/go.mod h1:xraEF7uJbxLhc5fpHL4cPe221LI2bdttWlU+ZGLfQSw= github.com/mdlayher/socket v0.4.1 h1:eM9y2/jlbs1M615oshPQOHZzj6R6wMT7bX5NPiQvn2U= github.com/mdlayher/socket v0.4.1/go.mod h1:cAqeGjoufqdxWkD7DkpyS+wcefOtmu5OQ8KuoJGIReA= -github.com/odigos-io/runtime-detector v0.0.5 h1:CojYfZpYFvub7uVQCAgwryAird5OH/RCTpAo9+bNaP8= -github.com/odigos-io/runtime-detector v0.0.5/go.mod h1:m8GfdG6pET0K/8aoZwnX+MkYz8oVroKs8HzRnkuJWt4= +github.com/odigos-io/runtime-detector v0.0.6 h1:LiX06bUz3IGCXMoEvLFU+re5zHcy4GJ8+3QwD+WacNU= +github.com/odigos-io/runtime-detector v0.0.6/go.mod h1:m8GfdG6pET0K/8aoZwnX+MkYz8oVroKs8HzRnkuJWt4= github.com/pmezard/go-difflib v1.0.0 h1:4DBwDE0NGyQoBHbLQYPwSUPoCMWR5BEzIk/f1lZbAQM= github.com/pmezard/go-difflib v1.0.0/go.mod h1:iKH77koFhYxTK1pcRnkKkqfTogsbg7gZNVY4sRDYZ/4= github.com/rogpeppe/go-internal v1.11.0 h1:cWPaGQEPrBb5/AsnsZesgZZ9yb1OQ+GOISoDNXVBh4M= diff --git a/odiglet/go.mod b/odiglet/go.mod index 129618bafe..b744584d66 100644 --- a/odiglet/go.mod +++ b/odiglet/go.mod @@ -15,7 +15,7 @@ require ( github.com/odigos-io/odigos/opampserver v0.0.0 github.com/odigos-io/odigos/procdiscovery v0.0.0 github.com/odigos-io/opentelemetry-zap-bridge v0.0.5 - github.com/odigos-io/runtime-detector v0.0.5 + github.com/odigos-io/runtime-detector v0.0.6 github.com/stretchr/testify v1.10.0 go.opentelemetry.io/auto v0.19.0-alpha go.opentelemetry.io/otel v1.33.0 diff --git a/odiglet/go.sum b/odiglet/go.sum index 47dd9b2c65..7cb25c2640 100644 --- a/odiglet/go.sum +++ b/odiglet/go.sum @@ -234,8 +234,8 @@ github.com/nxadm/tail v1.4.4 h1:DQuhQpB1tVlglWS2hLQ5OV6B5r8aGxSrPc5Qo6uTN78= github.com/nxadm/tail v1.4.4/go.mod h1:kenIhsEOeOJmVchQTgglprH7qJGnHDVpk1VPCcaMI8A= github.com/odigos-io/opentelemetry-zap-bridge v0.0.5 h1:UDEKtgab42nGVSvA/F3lLKUYFPETtpl7kpxM9BKBlWk= github.com/odigos-io/opentelemetry-zap-bridge v0.0.5/go.mod h1:K98wHhktQ6vCTqeFztcpBDtPTe88vxVgZFlbeGobt24= -github.com/odigos-io/runtime-detector v0.0.5 h1:CojYfZpYFvub7uVQCAgwryAird5OH/RCTpAo9+bNaP8= -github.com/odigos-io/runtime-detector v0.0.5/go.mod h1:m8GfdG6pET0K/8aoZwnX+MkYz8oVroKs8HzRnkuJWt4= +github.com/odigos-io/runtime-detector v0.0.6 h1:LiX06bUz3IGCXMoEvLFU+re5zHcy4GJ8+3QwD+WacNU= +github.com/odigos-io/runtime-detector v0.0.6/go.mod h1:m8GfdG6pET0K/8aoZwnX+MkYz8oVroKs8HzRnkuJWt4= github.com/onsi/ginkgo v0.0.0-20170829012221-11459a886d9c/go.mod h1:lLunBs/Ym6LB5Z9jYTR76FiuTmxDTDusOGeTQH+WWjE= github.com/onsi/ginkgo v1.6.0/go.mod h1:lLunBs/Ym6LB5Z9jYTR76FiuTmxDTDusOGeTQH+WWjE= github.com/onsi/ginkgo v1.11.0/go.mod h1:lLunBs/Ym6LB5Z9jYTR76FiuTmxDTDusOGeTQH+WWjE= diff --git a/odiglet/pkg/ebpf/distribution_matcher.go b/odiglet/pkg/ebpf/distribution_matcher.go index cbc0471a18..fdb345e73a 100644 --- a/odiglet/pkg/ebpf/distribution_matcher.go +++ b/odiglet/pkg/ebpf/distribution_matcher.go @@ -22,15 +22,15 @@ func (dm *podDeviceDistributionMatcher) Distribution(ctx context.Context, e K8sP // verify the language of the process event if ok := inspectors.VerifyLanguage(process.Details{ ProcessID: e.procEvent.PID, - ExeName: e.procEvent.ExecDetails.ExeName, + ExePath: e.procEvent.ExecDetails.ExePath, CmdLine: e.procEvent.ExecDetails.CmdLine, Environments: process.ProcessEnvs{ - DetailedEnvs: e.procEvent.ExecDetails.Environments, + DetailedEnvs: e.procEvent.ExecDetails.Environments, }, }, lang); ok { return instrumentation.OtelDistribution{Language: lang, OtelSdk: sdk}, nil } return instrumentation.OtelDistribution{}, - fmt.Errorf("process language does not match the detected language (%s) for container: %s. exe name: %s", lang, e.containerName, e.procEvent.ExecDetails.ExeName) + fmt.Errorf("process language does not match the detected language (%s) for container: %s. exe path: %s", lang, e.containerName, e.procEvent.ExecDetails.ExePath) } diff --git a/procdiscovery/pkg/inspectors/java/java.go b/procdiscovery/pkg/inspectors/java/java.go index 92e7196fbc..d58541a7f2 100644 --- a/procdiscovery/pkg/inspectors/java/java.go +++ b/procdiscovery/pkg/inspectors/java/java.go @@ -1,10 +1,11 @@ package java import ( - "github.com/hashicorp/go-version" "regexp" "strings" + "github.com/hashicorp/go-version" + "github.com/odigos-io/odigos/common" "github.com/odigos-io/odigos/procdiscovery/pkg/process" ) @@ -17,7 +18,7 @@ const JavaVersionRegex = `\d+\.\d+\.\d+\+\d+` var re = regexp.MustCompile(JavaVersionRegex) func (j *JavaInspector) Inspect(proc *process.Details) (common.ProgrammingLanguage, bool) { - if strings.Contains(proc.ExeName, processName) || strings.Contains(proc.CmdLine, processName) { + if strings.Contains(proc.ExePath, processName) || strings.Contains(proc.CmdLine, processName) { return common.JavaProgrammingLanguage, true } diff --git a/procdiscovery/pkg/inspectors/mysql/mysql.go b/procdiscovery/pkg/inspectors/mysql/mysql.go index 11766e0695..74fc1273c3 100644 --- a/procdiscovery/pkg/inspectors/mysql/mysql.go +++ b/procdiscovery/pkg/inspectors/mysql/mysql.go @@ -14,7 +14,7 @@ type MySQLInspector struct{} const MySQLProcessName = "mysqld" func (j *MySQLInspector) Inspect(p *process.Details) (common.ProgrammingLanguage, bool) { - if strings.HasSuffix(p.ExeName, MySQLProcessName) || strings.HasSuffix(p.CmdLine, MySQLProcessName) { + if strings.HasSuffix(p.ExePath, MySQLProcessName) || strings.HasSuffix(p.CmdLine, MySQLProcessName) { return common.MySQLProgrammingLanguage, true } diff --git a/procdiscovery/pkg/inspectors/nginx/nginx.go b/procdiscovery/pkg/inspectors/nginx/nginx.go index 85b8fdc642..80e7ab2ec4 100644 --- a/procdiscovery/pkg/inspectors/nginx/nginx.go +++ b/procdiscovery/pkg/inspectors/nginx/nginx.go @@ -1,11 +1,12 @@ package nginx import ( - "github.com/hashicorp/go-version" "net/http" "regexp" "strings" + "github.com/hashicorp/go-version" + "github.com/odigos-io/odigos/common" "github.com/odigos-io/odigos/procdiscovery/pkg/process" ) @@ -22,7 +23,7 @@ const ( var re = regexp.MustCompile(NginxVersionRegex) func (j *NginxInspector) Inspect(p *process.Details) (common.ProgrammingLanguage, bool) { - if strings.Contains(p.CmdLine, NginxProcessName) || strings.Contains(p.ExeName, NginxProcessName) { + if strings.Contains(p.CmdLine, NginxProcessName) || strings.Contains(p.ExePath, NginxProcessName) { return common.NginxProgrammingLanguage, true } diff --git a/procdiscovery/pkg/inspectors/nodejs/nodejs.go b/procdiscovery/pkg/inspectors/nodejs/nodejs.go index 7c3d3ac244..49fc8c1e78 100644 --- a/procdiscovery/pkg/inspectors/nodejs/nodejs.go +++ b/procdiscovery/pkg/inspectors/nodejs/nodejs.go @@ -1,9 +1,10 @@ package nodejs import ( - "github.com/hashicorp/go-version" "strings" + "github.com/hashicorp/go-version" + "github.com/odigos-io/odigos/common" "github.com/odigos-io/odigos/procdiscovery/pkg/process" ) @@ -13,7 +14,7 @@ type NodejsInspector struct{} const nodeProcessName = "node" func (n *NodejsInspector) Inspect(proc *process.Details) (common.ProgrammingLanguage, bool) { - if strings.Contains(proc.ExeName, nodeProcessName) || strings.Contains(proc.CmdLine, nodeProcessName) { + if strings.Contains(proc.ExePath, nodeProcessName) || strings.Contains(proc.CmdLine, nodeProcessName) { return common.JavascriptProgrammingLanguage, true } diff --git a/procdiscovery/pkg/inspectors/python/python.go b/procdiscovery/pkg/inspectors/python/python.go index f96f7b6351..34a3a878a7 100644 --- a/procdiscovery/pkg/inspectors/python/python.go +++ b/procdiscovery/pkg/inspectors/python/python.go @@ -20,7 +20,7 @@ const ( ) func (p *PythonInspector) Inspect(proc *process.Details) (common.ProgrammingLanguage, bool) { - if strings.Contains(proc.ExeName, pythonProcessName) || strings.Contains(proc.CmdLine, pythonProcessName) { + if strings.Contains(proc.ExePath, pythonProcessName) || strings.Contains(proc.CmdLine, pythonProcessName) { return common.PythonProgrammingLanguage, true } diff --git a/procdiscovery/pkg/process/process.go b/procdiscovery/pkg/process/process.go index 549bb03c84..dd7bd9f9c1 100644 --- a/procdiscovery/pkg/process/process.go +++ b/procdiscovery/pkg/process/process.go @@ -33,7 +33,7 @@ var OtherAgentCmdSubString = map[string]string{ type Details struct { ProcessID int - ExeName string + ExePath string CmdLine string Environments ProcessEnvs } @@ -91,13 +91,13 @@ func FindAllProcesses(predicate func(string) bool) ([]Details, error) { } func GetPidDetails(pid int) Details { - exeName := getExecName(pid) + exePath := getExePath(pid) cmdLine := getCommandLine(pid) envVars := getRelevantEnvVars(pid) return Details{ ProcessID: pid, - ExeName: exeName, + ExePath: exePath, CmdLine: cmdLine, Environments: envVars, } @@ -108,14 +108,14 @@ func GetPidDetails(pid int) Details { // file that was used to start the process. // For instance, if a process was started from /usr/bin/python, // the exe symbolic link in that process's /proc directory will point to /usr/bin/python. -func getExecName(pid int) string { +func getExePath(pid int) string { exeFileName := fmt.Sprintf("/proc/%d/exe", pid) - exeName, err := os.Readlink(exeFileName) + exePath, err := os.Readlink(exeFileName) if err != nil { // Read link may fail if target process runs not as root return "" } - return exeName + return exePath } // reads the command line arguments of a Linux process from From c5409cd1cd293fc32c04fb64f47b64aa18feac28 Mon Sep 17 00:00:00 2001 From: Alon Braymok <138359965+alonkeyval@users.noreply.github.com> Date: Thu, 9 Jan 2025 15:23:35 +0200 Subject: [PATCH 2/6] [GEN-2202] chore: remove legacy UI (#2166) This pull request includes several changes to remove legacy UI support and clean up the codebase by eliminating unused endpoints and simplifying port forwarding logic. Removal of legacy UI support: * [`cli/cmd/resources/ui.go`](diffhunk://#diff-c286e10d34710a80a59127b2b7951e8a33d9b9554e47d2f2b827fd690f2e53abL294-L297): Removed the `legacy-ui` service port configuration. * [`cli/cmd/ui.go`](diffhunk://#diff-bdc4ded2bf4628241563326d5d7b0443b57d2d37b674014da632b14b78a1c309L30): Removed the `legacyDefaultPort` constant and the `legacy` flag, along with related logic in the `uiCmd` command and `portForwardWithContext` function. [[1]](diffhunk://#diff-bdc4ded2bf4628241563326d5d7b0443b57d2d37b674014da632b14b78a1c309L30) [[2]](diffhunk://#diff-bdc4ded2bf4628241563326d5d7b0443b57d2d37b674014da632b14b78a1c309L53-R68) [[3]](diffhunk://#diff-bdc4ded2bf4628241563326d5d7b0443b57d2d37b674014da632b14b78a1c309L105-R98) [[4]](diffhunk://#diff-bdc4ded2bf4628241563326d5d7b0443b57d2d37b674014da632b14b78a1c309L125-R124) [[5]](diffhunk://#diff-bdc4ded2bf4628241563326d5d7b0443b57d2d37b674014da632b14b78a1c309L166) Codebase cleanup: * [`frontend/endpoints/actions/addclusterinfo.go`](diffhunk://#diff-2511ff6b0207be71c468fe4db60383a73916c601569ffab4a8d8c5fd4239cfe4L1-L100): Removed the entire file, including all related endpoint functions. * [`frontend/endpoints/actions/deleteattribute.go`](diffhunk://#diff-49a0cab95629d2f31106f0c5c680ba1869a869056891fc1ff3ffa38dcfa24b0aL1-L100): Removed the entire file, including all related endpoint functions. * [`frontend/endpoints/actions/errorsampler.go`](diffhunk://#diff-f32702baf96e453e785f64f70b4a45ed7737c02ceafda4040857913346535f7dL1-L100): Removed the entire file, including all related endpoint functions. * [`frontend/endpoints/actions/latencysampler.go`](diffhunk://#diff-2944e5e6b3cef1f8eb014039f84e631d0295261d7a7b58c363853d96f40efd27L1-L100): Removed the entire file, including all related endpoint functions. * [`frontend/endpoints/actions/piimasking.go`](diffhunk://#diff-5237331aa79450347f690543e17d591f6ceed64ba695ee494923a620fe8a8f69L1-L100): Removed the entire file, including all related endpoint functions. * [`frontend/endpoints/actions/probabilisticsampler.go`](diffhunk://#diff-fce0eecf69a969d92d0969a4e573aae16a4e6d6e2068d2cd32842fa08a66b077L1-L100): Removed the entire file, including all related endpoint functions. * [`frontend/endpoints/actions/renameattribute.go`](diffhunk://#diff-6f1323b82e4cc29761964dda9d21d8973f564c77fe9bfb64b2258ab9e425ff8cL1-L100): Removed the entire file, including all related endpoint functions. Dockerfile update: * [`frontend/Dockerfile`](diffhunk://#diff-ea60ef29f6f537c1c83468c00b60de28f86e06edfe4a3d91274723c6f298fdb8L16): Removed the `COPY --from=builder /webapp/dep-out frontend/webapp/dep-out` line. --------- Co-authored-by: alonkeyval --- cli/cmd/resources/ui.go | 4 - cli/cmd/ui.go | 22 +- docs/quickstart/installation.mdx | 11 - frontend/Dockerfile | 1 - frontend/endpoints/actions/addclusterinfo.go | 100 -- frontend/endpoints/actions/deleteattribute.go | 100 -- frontend/endpoints/actions/errorsampler.go | 100 -- frontend/endpoints/actions/latencysampler.go | 100 -- frontend/endpoints/actions/piimasking.go | 100 -- .../endpoints/actions/probabilisticsampler.go | 100 -- frontend/endpoints/actions/renameattribute.go | 100 -- frontend/endpoints/actions/root.go | 133 -- frontend/endpoints/applications.go | 205 --- frontend/endpoints/common.go | 23 - frontend/endpoints/config.go | 105 -- .../destination_finder.go | 78 -- .../destination_recognition/elasticsearch.go | 41 - .../destination_recognition/jaeger.go | 42 - frontend/endpoints/destinations.go | 681 ---------- frontend/endpoints/instrumentationrules.go | 155 --- frontend/endpoints/metrics.go | 137 -- frontend/endpoints/namespaces.go | 213 --- frontend/endpoints/sources.go | 472 ------- .../test_connection/otlp_test_connection.go | 37 - .../otlphttp_test_connection.go | 36 - .../test_connection/test_connection.go | 157 --- frontend/endpoints/test_connection/utils.go | 43 - .../endpoints/test_connection/utils_test.go | 56 - frontend/endpoints/utils.go | 97 -- frontend/graph/resolver.go | 2 +- frontend/kube/watchers/batcher.go | 2 +- frontend/kube/watchers/common.go | 2 +- frontend/kube/watchers/destination_watcher.go | 2 +- .../instrumentation_config_watcher.go | 2 +- .../instrumentation_instance_watcher.go | 2 +- frontend/main.go | 160 +-- .../collector_metrics/README.md | 0 .../collector_metrics/cluster_collector.go | 0 .../collector_metrics/collector_metrics.go | 14 +- .../collector_metrics/node_collector.go | 2 +- .../collector_metrics/utils.go | 0 .../collector_metrics/utils_test.go | 0 .../collector_metrics/watchers.go | 2 +- .../{endpoints => services}/common/source.go | 0 frontend/{endpoints => services}/describe.go | 2 +- frontend/{endpoints => services}/sse/sse.go | 0 frontend/webapp/dep-out/404.html | 1 - .../LwjRuAIxf8wYxMqJQOkbO/_buildManifest.js | 1 - .../LwjRuAIxf8wYxMqJQOkbO/_ssgManifest.js | 1 - .../static/chunks/152-5b688754624c36e9.js | 1 - .../static/chunks/218.4535f94203b4465f.js | 1 - .../static/chunks/267-57acc36961035831.js | 6 - .../static/chunks/32-05f69fa51f26447b.js | 1 - .../static/chunks/320-c874b9c4e3b5f6cc.js | 17 - .../static/chunks/374-debc3f236fbbf19c.js | 9 - .../static/chunks/433-e81cb52d52eafb19.js | 9 - .../static/chunks/585-82bbcbf01c3dfd29.js | 1 - .../static/chunks/650-975aaf0197a949b5.js | 25 - .../static/chunks/785-a83a8c06b8294aa1.js | 1 - .../chunks/7af96b1d-661b23cf9b38f432.js | 1 - .../static/chunks/845-89170f42495c5944.js | 9 - .../static/chunks/992.f0762ec103fbe656.js | 1 - .../chunks/9ccfb3e7-a5cf8b8ce3814083.js | 1139 ----------------- .../actions/page-c88b8d4bf03c17b2.js | 1 - .../choose-action/page-9d2c2a74322e30fa.js | 1 - .../create-action/page-9925ce5e449c4aa0.js | 1 - .../edit-action/page-421d5e831a7b4a6f.js | 1 - .../page-456bd48471b4b7a3.js | 1 - .../destinations/page-6919d35a2eea53be.js | 1 - .../edit-destination/page-cef48ef1b3b0c33f.js | 1 - .../page-a8b34a4a7118de62.js | 1 - .../choose-rule/page-b47c17fdea99760d.js | 1 - .../create-rule/page-f0b192b8eded7b66.js | 1 - .../edit-rule/page-1ef5e1f10295d805.js | 1 - .../page-9859babba926961d.js | 1 - .../edit-source/page-ac30dc7538b65a92.js | 1 - .../select-sources/page-7aee0d475614971c.js | 1 - .../sources/page-a2185e7c3a28f3ba.js | 1 - .../app/(overview)/layout-6a84a7ad7a1e10cf.js | 1 - .../overview/page-83263148b9ae3804.js | 1 - .../page-c026dd87394bfd9d.js | 1 - .../choose-sources/page-83436b0604dba7c3.js | 1 - .../page-b3f4e9ebeba02698.js | 1 - .../app/(setup)/layout-5a7be48b69771665.js | 1 - .../chunks/app/_not-found-ccc443a0a795966e.js | 1 - .../chunks/app/layout-f1bf1bb53a8c1c88.js | 1 - .../chunks/app/page-eb036828d9c2077d.js | 1 - .../chunks/decd49cc-dce671d85655dfc2.js | 1 - .../chunks/fd9d1056-9cea142d2b41eb16.js | 9 - .../chunks/framework-8883d1e9be70c3da.js | 25 - .../static/chunks/main-7f6f49fdc2e8b561.js | 1 - .../chunks/main-app-2f75cbb4ad4c612e.js | 1 - .../chunks/pages/_app-e32070611553ee94.js | 1 - .../chunks/pages/_error-f3b58fe475c0d0d9.js | 1 - .../chunks/polyfills-c67a75d1b6f99dc8.js | 1 - .../static/chunks/webpack-6ff63b03f4023a47.js | 1 - .../_next/static/css/b4846eed11c4725f.css | 1 - frontend/webapp/dep-out/actions.html | 10 - frontend/webapp/dep-out/actions.txt | 11 - frontend/webapp/dep-out/choose-action.html | 11 - frontend/webapp/dep-out/choose-action.txt | 11 - .../webapp/dep-out/choose-destination.html | 42 - .../webapp/dep-out/choose-destination.txt | 11 - frontend/webapp/dep-out/choose-rule.html | 11 - frontend/webapp/dep-out/choose-rule.txt | 11 - frontend/webapp/dep-out/choose-sources.html | 47 - frontend/webapp/dep-out/choose-sources.txt | 11 - .../webapp/dep-out/connect-destination.html | 31 - .../webapp/dep-out/connect-destination.txt | 11 - frontend/webapp/dep-out/create-action.html | 6 - frontend/webapp/dep-out/create-action.txt | 11 - .../webapp/dep-out/create-destination.html | 3 - .../webapp/dep-out/create-destination.txt | 11 - frontend/webapp/dep-out/create-rule.html | 6 - frontend/webapp/dep-out/create-rule.txt | 11 - frontend/webapp/dep-out/destinations.html | 10 - frontend/webapp/dep-out/destinations.txt | 11 - frontend/webapp/dep-out/edit-action.html | 6 - frontend/webapp/dep-out/edit-action.txt | 11 - frontend/webapp/dep-out/edit-destination.html | 3 - frontend/webapp/dep-out/edit-destination.txt | 11 - frontend/webapp/dep-out/edit-rule.html | 6 - frontend/webapp/dep-out/edit-rule.txt | 11 - frontend/webapp/dep-out/edit-source.html | 3 - frontend/webapp/dep-out/edit-source.txt | 11 - frontend/webapp/dep-out/index.html | 6 - frontend/webapp/dep-out/index.txt | 10 - .../webapp/dep-out/instrumentation-rules.html | 10 - .../webapp/dep-out/instrumentation-rules.txt | 11 - frontend/webapp/dep-out/overview.html | 5 - frontend/webapp/dep-out/overview.txt | 11 - .../webapp/dep-out/select-destination.html | 11 - .../webapp/dep-out/select-destination.txt | 11 - frontend/webapp/dep-out/select-sources.html | 16 - frontend/webapp/dep-out/select-sources.txt | 11 - frontend/webapp/dep-out/sources.html | 5 - frontend/webapp/dep-out/sources.txt | 11 - helm/odigos/templates/ui/service.yaml | 2 - tests/common/assert/odigos-installed.yaml | 4 - 139 files changed, 32 insertions(+), 5372 deletions(-) delete mode 100644 frontend/endpoints/actions/addclusterinfo.go delete mode 100644 frontend/endpoints/actions/deleteattribute.go delete mode 100644 frontend/endpoints/actions/errorsampler.go delete mode 100644 frontend/endpoints/actions/latencysampler.go delete mode 100644 frontend/endpoints/actions/piimasking.go delete mode 100644 frontend/endpoints/actions/probabilisticsampler.go delete mode 100644 frontend/endpoints/actions/renameattribute.go delete mode 100644 frontend/endpoints/actions/root.go delete mode 100644 frontend/endpoints/applications.go delete mode 100644 frontend/endpoints/common.go delete mode 100644 frontend/endpoints/config.go delete mode 100644 frontend/endpoints/destination_recognition/destination_finder.go delete mode 100644 frontend/endpoints/destination_recognition/elasticsearch.go delete mode 100644 frontend/endpoints/destination_recognition/jaeger.go delete mode 100644 frontend/endpoints/destinations.go delete mode 100644 frontend/endpoints/instrumentationrules.go delete mode 100644 frontend/endpoints/metrics.go delete mode 100644 frontend/endpoints/namespaces.go delete mode 100644 frontend/endpoints/sources.go delete mode 100644 frontend/endpoints/test_connection/otlp_test_connection.go delete mode 100644 frontend/endpoints/test_connection/otlphttp_test_connection.go delete mode 100644 frontend/endpoints/test_connection/test_connection.go delete mode 100644 frontend/endpoints/test_connection/utils.go delete mode 100644 frontend/endpoints/test_connection/utils_test.go delete mode 100644 frontend/endpoints/utils.go rename frontend/{endpoints => services}/collector_metrics/README.md (100%) rename frontend/{endpoints => services}/collector_metrics/cluster_collector.go (100%) rename frontend/{endpoints => services}/collector_metrics/collector_metrics.go (96%) rename frontend/{endpoints => services}/collector_metrics/node_collector.go (99%) rename frontend/{endpoints => services}/collector_metrics/utils.go (100%) rename frontend/{endpoints => services}/collector_metrics/utils_test.go (100%) rename frontend/{endpoints => services}/collector_metrics/watchers.go (98%) rename frontend/{endpoints => services}/common/source.go (100%) rename frontend/{endpoints => services}/describe.go (99%) rename frontend/{endpoints => services}/sse/sse.go (100%) delete mode 100644 frontend/webapp/dep-out/404.html delete mode 100644 frontend/webapp/dep-out/_next/static/LwjRuAIxf8wYxMqJQOkbO/_buildManifest.js delete mode 100644 frontend/webapp/dep-out/_next/static/LwjRuAIxf8wYxMqJQOkbO/_ssgManifest.js delete mode 100644 frontend/webapp/dep-out/_next/static/chunks/152-5b688754624c36e9.js delete mode 100644 frontend/webapp/dep-out/_next/static/chunks/218.4535f94203b4465f.js delete mode 100644 frontend/webapp/dep-out/_next/static/chunks/267-57acc36961035831.js delete mode 100644 frontend/webapp/dep-out/_next/static/chunks/32-05f69fa51f26447b.js delete mode 100644 frontend/webapp/dep-out/_next/static/chunks/320-c874b9c4e3b5f6cc.js delete mode 100644 frontend/webapp/dep-out/_next/static/chunks/374-debc3f236fbbf19c.js delete mode 100644 frontend/webapp/dep-out/_next/static/chunks/433-e81cb52d52eafb19.js delete mode 100644 frontend/webapp/dep-out/_next/static/chunks/585-82bbcbf01c3dfd29.js delete mode 100644 frontend/webapp/dep-out/_next/static/chunks/650-975aaf0197a949b5.js delete mode 100644 frontend/webapp/dep-out/_next/static/chunks/785-a83a8c06b8294aa1.js delete mode 100644 frontend/webapp/dep-out/_next/static/chunks/7af96b1d-661b23cf9b38f432.js delete mode 100644 frontend/webapp/dep-out/_next/static/chunks/845-89170f42495c5944.js delete mode 100644 frontend/webapp/dep-out/_next/static/chunks/992.f0762ec103fbe656.js delete mode 100644 frontend/webapp/dep-out/_next/static/chunks/9ccfb3e7-a5cf8b8ce3814083.js delete mode 100644 frontend/webapp/dep-out/_next/static/chunks/app/(overview)/(actions)/actions/page-c88b8d4bf03c17b2.js delete mode 100644 frontend/webapp/dep-out/_next/static/chunks/app/(overview)/(actions)/choose-action/page-9d2c2a74322e30fa.js delete mode 100644 frontend/webapp/dep-out/_next/static/chunks/app/(overview)/(actions)/create-action/page-9925ce5e449c4aa0.js delete mode 100644 frontend/webapp/dep-out/_next/static/chunks/app/(overview)/(actions)/edit-action/page-421d5e831a7b4a6f.js delete mode 100644 frontend/webapp/dep-out/_next/static/chunks/app/(overview)/(destinations)/create-destination/page-456bd48471b4b7a3.js delete mode 100644 frontend/webapp/dep-out/_next/static/chunks/app/(overview)/(destinations)/destinations/page-6919d35a2eea53be.js delete mode 100644 frontend/webapp/dep-out/_next/static/chunks/app/(overview)/(destinations)/edit-destination/page-cef48ef1b3b0c33f.js delete mode 100644 frontend/webapp/dep-out/_next/static/chunks/app/(overview)/(destinations)/select-destination/page-a8b34a4a7118de62.js delete mode 100644 frontend/webapp/dep-out/_next/static/chunks/app/(overview)/(instrumentation-rules)/choose-rule/page-b47c17fdea99760d.js delete mode 100644 frontend/webapp/dep-out/_next/static/chunks/app/(overview)/(instrumentation-rules)/create-rule/page-f0b192b8eded7b66.js delete mode 100644 frontend/webapp/dep-out/_next/static/chunks/app/(overview)/(instrumentation-rules)/edit-rule/page-1ef5e1f10295d805.js delete mode 100644 frontend/webapp/dep-out/_next/static/chunks/app/(overview)/(instrumentation-rules)/instrumentation-rules/page-9859babba926961d.js delete mode 100644 frontend/webapp/dep-out/_next/static/chunks/app/(overview)/(sources)/edit-source/page-ac30dc7538b65a92.js delete mode 100644 frontend/webapp/dep-out/_next/static/chunks/app/(overview)/(sources)/select-sources/page-7aee0d475614971c.js delete mode 100644 frontend/webapp/dep-out/_next/static/chunks/app/(overview)/(sources)/sources/page-a2185e7c3a28f3ba.js delete mode 100644 frontend/webapp/dep-out/_next/static/chunks/app/(overview)/layout-6a84a7ad7a1e10cf.js delete mode 100644 frontend/webapp/dep-out/_next/static/chunks/app/(overview)/overview/page-83263148b9ae3804.js delete mode 100644 frontend/webapp/dep-out/_next/static/chunks/app/(setup)/choose-destination/page-c026dd87394bfd9d.js delete mode 100644 frontend/webapp/dep-out/_next/static/chunks/app/(setup)/choose-sources/page-83436b0604dba7c3.js delete mode 100644 frontend/webapp/dep-out/_next/static/chunks/app/(setup)/connect-destination/page-b3f4e9ebeba02698.js delete mode 100644 frontend/webapp/dep-out/_next/static/chunks/app/(setup)/layout-5a7be48b69771665.js delete mode 100644 frontend/webapp/dep-out/_next/static/chunks/app/_not-found-ccc443a0a795966e.js delete mode 100644 frontend/webapp/dep-out/_next/static/chunks/app/layout-f1bf1bb53a8c1c88.js delete mode 100644 frontend/webapp/dep-out/_next/static/chunks/app/page-eb036828d9c2077d.js delete mode 100644 frontend/webapp/dep-out/_next/static/chunks/decd49cc-dce671d85655dfc2.js delete mode 100644 frontend/webapp/dep-out/_next/static/chunks/fd9d1056-9cea142d2b41eb16.js delete mode 100644 frontend/webapp/dep-out/_next/static/chunks/framework-8883d1e9be70c3da.js delete mode 100644 frontend/webapp/dep-out/_next/static/chunks/main-7f6f49fdc2e8b561.js delete mode 100644 frontend/webapp/dep-out/_next/static/chunks/main-app-2f75cbb4ad4c612e.js delete mode 100644 frontend/webapp/dep-out/_next/static/chunks/pages/_app-e32070611553ee94.js delete mode 100644 frontend/webapp/dep-out/_next/static/chunks/pages/_error-f3b58fe475c0d0d9.js delete mode 100644 frontend/webapp/dep-out/_next/static/chunks/polyfills-c67a75d1b6f99dc8.js delete mode 100644 frontend/webapp/dep-out/_next/static/chunks/webpack-6ff63b03f4023a47.js delete mode 100644 frontend/webapp/dep-out/_next/static/css/b4846eed11c4725f.css delete mode 100644 frontend/webapp/dep-out/actions.html delete mode 100644 frontend/webapp/dep-out/actions.txt delete mode 100644 frontend/webapp/dep-out/choose-action.html delete mode 100644 frontend/webapp/dep-out/choose-action.txt delete mode 100644 frontend/webapp/dep-out/choose-destination.html delete mode 100644 frontend/webapp/dep-out/choose-destination.txt delete mode 100644 frontend/webapp/dep-out/choose-rule.html delete mode 100644 frontend/webapp/dep-out/choose-rule.txt delete mode 100644 frontend/webapp/dep-out/choose-sources.html delete mode 100644 frontend/webapp/dep-out/choose-sources.txt delete mode 100644 frontend/webapp/dep-out/connect-destination.html delete mode 100644 frontend/webapp/dep-out/connect-destination.txt delete mode 100644 frontend/webapp/dep-out/create-action.html delete mode 100644 frontend/webapp/dep-out/create-action.txt delete mode 100644 frontend/webapp/dep-out/create-destination.html delete mode 100644 frontend/webapp/dep-out/create-destination.txt delete mode 100644 frontend/webapp/dep-out/create-rule.html delete mode 100644 frontend/webapp/dep-out/create-rule.txt delete mode 100644 frontend/webapp/dep-out/destinations.html delete mode 100644 frontend/webapp/dep-out/destinations.txt delete mode 100644 frontend/webapp/dep-out/edit-action.html delete mode 100644 frontend/webapp/dep-out/edit-action.txt delete mode 100644 frontend/webapp/dep-out/edit-destination.html delete mode 100644 frontend/webapp/dep-out/edit-destination.txt delete mode 100644 frontend/webapp/dep-out/edit-rule.html delete mode 100644 frontend/webapp/dep-out/edit-rule.txt delete mode 100644 frontend/webapp/dep-out/edit-source.html delete mode 100644 frontend/webapp/dep-out/edit-source.txt delete mode 100644 frontend/webapp/dep-out/index.html delete mode 100644 frontend/webapp/dep-out/index.txt delete mode 100644 frontend/webapp/dep-out/instrumentation-rules.html delete mode 100644 frontend/webapp/dep-out/instrumentation-rules.txt delete mode 100644 frontend/webapp/dep-out/overview.html delete mode 100644 frontend/webapp/dep-out/overview.txt delete mode 100644 frontend/webapp/dep-out/select-destination.html delete mode 100644 frontend/webapp/dep-out/select-destination.txt delete mode 100644 frontend/webapp/dep-out/select-sources.html delete mode 100644 frontend/webapp/dep-out/select-sources.txt delete mode 100644 frontend/webapp/dep-out/sources.html delete mode 100644 frontend/webapp/dep-out/sources.txt diff --git a/cli/cmd/resources/ui.go b/cli/cmd/resources/ui.go index 9b64d205f1..4aa0a13a6d 100644 --- a/cli/cmd/resources/ui.go +++ b/cli/cmd/resources/ui.go @@ -291,10 +291,6 @@ func NewUIService(ns string) *corev1.Service { Name: "ui", Port: 3000, }, - { - Name: "legacy-ui", - Port: 3001, - }, { Name: "otlp", Port: consts.OTLPPort, diff --git a/cli/cmd/ui.go b/cli/cmd/ui.go index 917da40c76..0f298b5a17 100644 --- a/cli/cmd/ui.go +++ b/cli/cmd/ui.go @@ -26,8 +26,7 @@ import ( ) const ( - defaultPort = 3000 - legacyDefaultPort = 3001 + defaultPort = 3000 ) // uiCmd represents the ui command @@ -50,29 +49,23 @@ var uiCmd = &cobra.Command{ } } - legacyFlag, _ := cmd.Flags().GetBool("legacy") localPort := cmd.Flag("port").Value.String() - clusterPort := defaultPort - - if legacyFlag { - clusterPort = legacyDefaultPort - } - localAddress := cmd.Flag("address").Value.String() + uiPod, err := findOdigosUIPod(client, ctx, ns) if err != nil { fmt.Printf("\033[31mERROR\033[0m Cannot find odigos-ui pod: %s\n", err) os.Exit(1) } - if err := portForwardWithContext(ctx, uiPod, client, localPort, localAddress, clusterPort); err != nil { + if err := portForwardWithContext(ctx, uiPod, client, localPort, localAddress); err != nil { fmt.Printf("\033[31mERROR\033[0m Cannot start port-forward: %s\n", err) os.Exit(1) } }, } -func portForwardWithContext(ctx context.Context, uiPod *corev1.Pod, client *kube.Client, localPort string, localAddress string, clusterPort int) error { +func portForwardWithContext(ctx context.Context, uiPod *corev1.Pod, client *kube.Client, localPort string, localAddress string) error { stopChannel := make(chan struct{}, 1) readyChannel := make(chan struct{}) signals := make(chan os.Signal, 1) @@ -102,7 +95,7 @@ func portForwardWithContext(ctx context.Context, uiPod *corev1.Pod, client *kube Name(uiPod.Name). SubResource("portforward") - return forwardPorts("POST", req.URL(), client.Config, stopChannel, readyChannel, localPort, localAddress, clusterPort) + return forwardPorts("POST", req.URL(), client.Config, stopChannel, readyChannel, localPort, localAddress) } func createDialer(method string, url *url.URL, cfg *rest.Config) (httpstream.Dialer, error) { @@ -122,13 +115,13 @@ func createDialer(method string, url *url.URL, cfg *rest.Config) (httpstream.Dia return dialer, nil } -func forwardPorts(method string, url *url.URL, cfg *rest.Config, stopCh chan struct{}, readyCh chan struct{}, localPort string, localAddress string, clusterPort int) error { +func forwardPorts(method string, url *url.URL, cfg *rest.Config, stopCh chan struct{}, readyCh chan struct{}, localPort string, localAddress string) error { dialer, err := createDialer(method, url, cfg) if err != nil { return err } - port := fmt.Sprintf("%s:%d", localPort, clusterPort) + port := fmt.Sprintf("%s:%d", localPort, defaultPort) fw, err := portforward.NewOnAddresses(dialer, []string{localAddress}, []string{port}, stopCh, readyCh, nil, os.Stderr) @@ -163,5 +156,4 @@ func init() { rootCmd.AddCommand(uiCmd) uiCmd.Flags().Int("port", defaultPort, "Port to listen on") uiCmd.Flags().String("address", "localhost", "Address to listen on") - uiCmd.Flags().Bool("legacy", false, "Use the legacy UI port") } diff --git a/docs/quickstart/installation.mdx b/docs/quickstart/installation.mdx index 70b347d8ad..4c188eb1f6 100644 --- a/docs/quickstart/installation.mdx +++ b/docs/quickstart/installation.mdx @@ -75,14 +75,3 @@ odigos ui ``` By default, Odigos UI is available at http://localhost:3000. - -## Using the Legacy UI - -```bash -odigos ui --legacy -``` - - - The new UI is the default experience. The legacy UI remains available for - users who prefer the previous version. - diff --git a/frontend/Dockerfile b/frontend/Dockerfile index 20c6d97e12..24ab0d6b4f 100644 --- a/frontend/Dockerfile +++ b/frontend/Dockerfile @@ -13,7 +13,6 @@ FROM --platform=$BUILDPLATFORM golang:1.23 AS backend WORKDIR /app COPY . . COPY --from=builder /webapp/out frontend/webapp/out -COPY --from=builder /webapp/dep-out frontend/webapp/dep-out WORKDIR /app/frontend ARG TARGETARCH RUN CGO_ENABLED=0 GOARCH=$TARGETARCH go build -o odigos-ui diff --git a/frontend/endpoints/actions/addclusterinfo.go b/frontend/endpoints/actions/addclusterinfo.go deleted file mode 100644 index 4b3947ad1b..0000000000 --- a/frontend/endpoints/actions/addclusterinfo.go +++ /dev/null @@ -1,100 +0,0 @@ -package actions - -import ( - "github.com/gin-gonic/gin" - "github.com/odigos-io/odigos/api/actions/v1alpha1" - "github.com/odigos-io/odigos/frontend/kube" - apierrors "k8s.io/apimachinery/pkg/api/errors" - metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" -) - -func GetAddClusterInfo(c *gin.Context, odigosns string, id string) { - action, err := kube.DefaultClient.ActionsClient.AddClusterInfos(odigosns).Get(c, id, metav1.GetOptions{}) - if err != nil { - if apierrors.IsNotFound(err) { - c.JSON(404, gin.H{ - "error": "not found", - }) - return - } else { - c.JSON(500, gin.H{ - "error": err.Error(), - }) - return - } - } - c.JSON(200, action.Spec) -} - -func CreateAddClusterInfo(c *gin.Context, odigosns string) { - var action v1alpha1.AddClusterInfo - if err := c.ShouldBindJSON(&action.Spec); err != nil { - c.JSON(400, gin.H{ - "error": err.Error(), - }) - return - } - action.GenerateName = "aci-" - generatedAction, err := kube.DefaultClient.ActionsClient.AddClusterInfos(odigosns).Create(c, &action, metav1.CreateOptions{}) - if err != nil { - c.JSON(500, gin.H{ - "error": err.Error(), - }) - return - } - c.JSON(201, gin.H{ - "id": generatedAction.Name, - }) -} - -func UpdateAddClusterInfo(c *gin.Context, odigosns string, id string) { - action, err := kube.DefaultClient.ActionsClient.AddClusterInfos(odigosns).Get(c, id, metav1.GetOptions{}) - if err != nil { - if apierrors.IsNotFound(err) { - c.JSON(404, gin.H{ - "error": "not found", - }) - return - } else { - c.JSON(500, gin.H{ - "error": err.Error(), - }) - } - return - } - action.Spec = v1alpha1.AddClusterInfoSpec{} - if err := c.ShouldBindJSON(&action.Spec); err != nil { - c.JSON(400, gin.H{ - "error": err.Error(), - }) - return - } - action.Name = id - - _, err = kube.DefaultClient.ActionsClient.AddClusterInfos(odigosns).Update(c, action, metav1.UpdateOptions{}) - if err != nil { - c.JSON(500, gin.H{ - "error": err.Error(), - }) - return - } - c.JSON(204, nil) -} - -func DeleteAddClusterInfo(c *gin.Context, odigosns string, id string) { - err := kube.DefaultClient.ActionsClient.AddClusterInfos(odigosns).Delete(c, id, metav1.DeleteOptions{}) - if err != nil { - if apierrors.IsNotFound(err) { - c.JSON(404, gin.H{ - "error": "not found", - }) - return - } else { - c.JSON(500, gin.H{ - "error": err.Error(), - }) - return - } - } - c.JSON(204, nil) -} diff --git a/frontend/endpoints/actions/deleteattribute.go b/frontend/endpoints/actions/deleteattribute.go deleted file mode 100644 index 83cc2a4ace..0000000000 --- a/frontend/endpoints/actions/deleteattribute.go +++ /dev/null @@ -1,100 +0,0 @@ -package actions - -import ( - "github.com/gin-gonic/gin" - "github.com/odigos-io/odigos/api/actions/v1alpha1" - "github.com/odigos-io/odigos/frontend/kube" - apierrors "k8s.io/apimachinery/pkg/api/errors" - metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" -) - -func GetDeleteAttribute(c *gin.Context, odigosns string, id string) { - action, err := kube.DefaultClient.ActionsClient.DeleteAttributes(odigosns).Get(c, id, metav1.GetOptions{}) - if err != nil { - if apierrors.IsNotFound(err) { - c.JSON(404, gin.H{ - "error": "not found", - }) - return - } else { - c.JSON(500, gin.H{ - "error": err.Error(), - }) - return - } - } - c.JSON(200, action.Spec) -} - -func CreateDeleteAttribute(c *gin.Context, odigosns string) { - var action v1alpha1.DeleteAttribute - if err := c.ShouldBindJSON(&action.Spec); err != nil { - c.JSON(400, gin.H{ - "error": err.Error(), - }) - return - } - action.GenerateName = "da-" - generatedAction, err := kube.DefaultClient.ActionsClient.DeleteAttributes(odigosns).Create(c, &action, metav1.CreateOptions{}) - if err != nil { - c.JSON(500, gin.H{ - "error": err.Error(), - }) - return - } - c.JSON(201, gin.H{ - "id": generatedAction.Name, - }) -} - -func UpdateDeleteAttribute(c *gin.Context, odigosns string, id string) { - action, err := kube.DefaultClient.ActionsClient.DeleteAttributes(odigosns).Get(c, id, metav1.GetOptions{}) - if err != nil { - if apierrors.IsNotFound(err) { - c.JSON(404, gin.H{ - "error": "not found", - }) - return - } else { - c.JSON(500, gin.H{ - "error": err.Error(), - }) - } - return - } - action.Spec = v1alpha1.DeleteAttributeSpec{} - if err := c.ShouldBindJSON(&action.Spec); err != nil { - c.JSON(400, gin.H{ - "error": err.Error(), - }) - return - } - action.Name = id - - _, err = kube.DefaultClient.ActionsClient.DeleteAttributes(odigosns).Update(c, action, metav1.UpdateOptions{}) - if err != nil { - c.JSON(500, gin.H{ - "error": err.Error(), - }) - return - } - c.JSON(204, nil) -} - -func DeleteDeleteAttribute(c *gin.Context, odigosns string, id string) { - err := kube.DefaultClient.ActionsClient.DeleteAttributes(odigosns).Delete(c, id, metav1.DeleteOptions{}) - if err != nil { - if apierrors.IsNotFound(err) { - c.JSON(404, gin.H{ - "error": "not found", - }) - return - } else { - c.JSON(500, gin.H{ - "error": err.Error(), - }) - return - } - } - c.JSON(204, nil) -} diff --git a/frontend/endpoints/actions/errorsampler.go b/frontend/endpoints/actions/errorsampler.go deleted file mode 100644 index 5d4d032c8f..0000000000 --- a/frontend/endpoints/actions/errorsampler.go +++ /dev/null @@ -1,100 +0,0 @@ -package actions - -import ( - "github.com/gin-gonic/gin" - "github.com/odigos-io/odigos/api/actions/v1alpha1" - "github.com/odigos-io/odigos/frontend/kube" - apierrors "k8s.io/apimachinery/pkg/api/errors" - metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" -) - -func GetErrorSampler(c *gin.Context, odigosns string, id string) { - action, err := kube.DefaultClient.ActionsClient.ErrorSamplers(odigosns).Get(c, id, metav1.GetOptions{}) - if err != nil { - if apierrors.IsNotFound(err) { - c.JSON(404, gin.H{ - "error": "not found", - }) - return - } else { - c.JSON(500, gin.H{ - "error": err.Error(), - }) - return - } - } - c.JSON(200, action.Spec) -} - -func CreateErrorSampler(c *gin.Context, odigosns string) { - var action v1alpha1.ErrorSampler - if err := c.ShouldBindJSON(&action.Spec); err != nil { - c.JSON(400, gin.H{ - "error": err.Error(), - }) - return - } - action.GenerateName = "es-" - generatedAction, err := kube.DefaultClient.ActionsClient.ErrorSamplers(odigosns).Create(c, &action, metav1.CreateOptions{}) - if err != nil { - c.JSON(500, gin.H{ - "error": err.Error(), - }) - return - } - c.JSON(201, gin.H{ - "id": generatedAction.Name, - }) -} - -func UpdateErrorSampler(c *gin.Context, odigosns string, id string) { - action, err := kube.DefaultClient.ActionsClient.ErrorSamplers(odigosns).Get(c, id, metav1.GetOptions{}) - if err != nil { - if apierrors.IsNotFound(err) { - c.JSON(404, gin.H{ - "error": "not found", - }) - return - } else { - c.JSON(500, gin.H{ - "error": err.Error(), - }) - } - return - } - action.Spec = v1alpha1.ErrorSamplerSpec{} - if err := c.ShouldBindJSON(&action.Spec); err != nil { - c.JSON(400, gin.H{ - "error": err.Error(), - }) - return - } - action.Name = id - - _, err = kube.DefaultClient.ActionsClient.ErrorSamplers(odigosns).Update(c, action, metav1.UpdateOptions{}) - if err != nil { - c.JSON(500, gin.H{ - "error": err.Error(), - }) - return - } - c.JSON(204, nil) -} - -func DeleteErrorSampler(c *gin.Context, odigosns string, id string) { - err := kube.DefaultClient.ActionsClient.ErrorSamplers(odigosns).Delete(c, id, metav1.DeleteOptions{}) - if err != nil { - if apierrors.IsNotFound(err) { - c.JSON(404, gin.H{ - "error": "not found", - }) - return - } else { - c.JSON(500, gin.H{ - "error": err.Error(), - }) - return - } - } - c.JSON(204, nil) -} diff --git a/frontend/endpoints/actions/latencysampler.go b/frontend/endpoints/actions/latencysampler.go deleted file mode 100644 index f6ab5ecfd1..0000000000 --- a/frontend/endpoints/actions/latencysampler.go +++ /dev/null @@ -1,100 +0,0 @@ -package actions - -import ( - "github.com/gin-gonic/gin" - "github.com/odigos-io/odigos/api/actions/v1alpha1" - "github.com/odigos-io/odigos/frontend/kube" - apierrors "k8s.io/apimachinery/pkg/api/errors" - metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" -) - -func GetLatencySampler(c *gin.Context, odigosns string, id string) { - action, err := kube.DefaultClient.ActionsClient.LatencySamplers(odigosns).Get(c, id, metav1.GetOptions{}) - if err != nil { - if apierrors.IsNotFound(err) { - c.JSON(404, gin.H{ - "error": "not found", - }) - return - } else { - c.JSON(500, gin.H{ - "error": err.Error(), - }) - return - } - } - c.JSON(200, action.Spec) -} - -func CreateLatencySampler(c *gin.Context, odigosns string) { - var action v1alpha1.LatencySampler - if err := c.ShouldBindJSON(&action.Spec); err != nil { - c.JSON(400, gin.H{ - "error": err.Error(), - }) - return - } - action.GenerateName = "ls-" - generatedAction, err := kube.DefaultClient.ActionsClient.LatencySamplers(odigosns).Create(c, &action, metav1.CreateOptions{}) - if err != nil { - c.JSON(500, gin.H{ - "error": err.Error(), - }) - return - } - c.JSON(201, gin.H{ - "id": generatedAction.Name, - }) -} - -func UpdateLatencySampler(c *gin.Context, odigosns string, id string) { - action, err := kube.DefaultClient.ActionsClient.LatencySamplers(odigosns).Get(c, id, metav1.GetOptions{}) - if err != nil { - if apierrors.IsNotFound(err) { - c.JSON(404, gin.H{ - "error": "not found", - }) - return - } else { - c.JSON(500, gin.H{ - "error": err.Error(), - }) - } - return - } - action.Spec = v1alpha1.LatencySamplerSpec{} - if err := c.ShouldBindJSON(&action.Spec); err != nil { - c.JSON(400, gin.H{ - "error": err.Error(), - }) - return - } - action.Name = id - - _, err = kube.DefaultClient.ActionsClient.LatencySamplers(odigosns).Update(c, action, metav1.UpdateOptions{}) - if err != nil { - c.JSON(500, gin.H{ - "error": err.Error(), - }) - return - } - c.JSON(204, nil) -} - -func DeleteLatencySampler(c *gin.Context, odigosns string, id string) { - err := kube.DefaultClient.ActionsClient.LatencySamplers(odigosns).Delete(c, id, metav1.DeleteOptions{}) - if err != nil { - if apierrors.IsNotFound(err) { - c.JSON(404, gin.H{ - "error": "not found", - }) - return - } else { - c.JSON(500, gin.H{ - "error": err.Error(), - }) - return - } - } - c.JSON(204, nil) -} diff --git a/frontend/endpoints/actions/piimasking.go b/frontend/endpoints/actions/piimasking.go deleted file mode 100644 index 80df7eddd2..0000000000 --- a/frontend/endpoints/actions/piimasking.go +++ /dev/null @@ -1,100 +0,0 @@ -package actions - -import ( - "github.com/gin-gonic/gin" - "github.com/odigos-io/odigos/api/actions/v1alpha1" - "github.com/odigos-io/odigos/frontend/kube" - apierrors "k8s.io/apimachinery/pkg/api/errors" - metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" -) - -func GetPiiMasking(c *gin.Context, odigosns string, id string) { - action, err := kube.DefaultClient.ActionsClient.PiiMaskings(odigosns).Get(c, id, metav1.GetOptions{}) - if err != nil { - if apierrors.IsNotFound(err) { - c.JSON(404, gin.H{ - "error": "not found", - }) - return - } else { - c.JSON(500, gin.H{ - "error": err.Error(), - }) - return - } - } - c.JSON(200, action.Spec) -} - -func CreatePiiMasking(c *gin.Context, odigosns string) { - var action v1alpha1.PiiMasking - if err := c.ShouldBindJSON(&action.Spec); err != nil { - c.JSON(400, gin.H{ - "error": err.Error(), - }) - return - } - action.GenerateName = "pi-" - generatedAction, err := kube.DefaultClient.ActionsClient.PiiMaskings(odigosns).Create(c, &action, metav1.CreateOptions{}) - if err != nil { - c.JSON(500, gin.H{ - "error": err.Error(), - }) - return - } - c.JSON(201, gin.H{ - "id": generatedAction.Name, - }) -} - -func UpdatePiiMasking(c *gin.Context, odigosns string, id string) { - action, err := kube.DefaultClient.ActionsClient.PiiMaskings(odigosns).Get(c, id, metav1.GetOptions{}) - if err != nil { - if apierrors.IsNotFound(err) { - c.JSON(404, gin.H{ - "error": "not found", - }) - return - } else { - c.JSON(500, gin.H{ - "error": err.Error(), - }) - } - return - } - action.Spec = v1alpha1.PiiMaskingSpec{} - if err := c.ShouldBindJSON(&action.Spec); err != nil { - c.JSON(400, gin.H{ - "error": err.Error(), - }) - return - } - action.Name = id - - _, err = kube.DefaultClient.ActionsClient.PiiMaskings(odigosns).Update(c, action, metav1.UpdateOptions{}) - if err != nil { - c.JSON(500, gin.H{ - "error": err.Error(), - }) - return - } - c.JSON(204, nil) -} - -func DeletePiiMasking(c *gin.Context, odigosns string, id string) { - err := kube.DefaultClient.ActionsClient.PiiMaskings(odigosns).Delete(c, id, metav1.DeleteOptions{}) - if err != nil { - if apierrors.IsNotFound(err) { - c.JSON(404, gin.H{ - "error": "not found", - }) - return - } else { - c.JSON(500, gin.H{ - "error": err.Error(), - }) - return - } - } - c.JSON(204, nil) -} diff --git a/frontend/endpoints/actions/probabilisticsampler.go b/frontend/endpoints/actions/probabilisticsampler.go deleted file mode 100644 index 6a1758f545..0000000000 --- a/frontend/endpoints/actions/probabilisticsampler.go +++ /dev/null @@ -1,100 +0,0 @@ -package actions - -import ( - "github.com/gin-gonic/gin" - "github.com/odigos-io/odigos/api/actions/v1alpha1" - "github.com/odigos-io/odigos/frontend/kube" - apierrors "k8s.io/apimachinery/pkg/api/errors" - metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" -) - -func GetProbabilisticSampler(c *gin.Context, odigosns string, id string) { - action, err := kube.DefaultClient.ActionsClient.ProbabilisticSamplers(odigosns).Get(c, id, metav1.GetOptions{}) - if err != nil { - if apierrors.IsNotFound(err) { - c.JSON(404, gin.H{ - "error": "not found", - }) - return - } else { - c.JSON(500, gin.H{ - "error": err.Error(), - }) - return - } - } - c.JSON(200, action.Spec) -} - -func CreateProbabilisticSampler(c *gin.Context, odigosns string) { - var action v1alpha1.ProbabilisticSampler - if err := c.ShouldBindJSON(&action.Spec); err != nil { - c.JSON(400, gin.H{ - "error": err.Error(), - }) - return - } - action.GenerateName = "ps-" - generatedAction, err := kube.DefaultClient.ActionsClient.ProbabilisticSamplers(odigosns).Create(c, &action, metav1.CreateOptions{}) - if err != nil { - c.JSON(500, gin.H{ - "error": err.Error(), - }) - return - } - c.JSON(201, gin.H{ - "id": generatedAction.Name, - }) -} - -func UpdateProbabilisticSampler(c *gin.Context, odigosns string, id string) { - action, err := kube.DefaultClient.ActionsClient.ProbabilisticSamplers(odigosns).Get(c, id, metav1.GetOptions{}) - if err != nil { - if apierrors.IsNotFound(err) { - c.JSON(404, gin.H{ - "error": "not found", - }) - return - } else { - c.JSON(500, gin.H{ - "error": err.Error(), - }) - } - return - } - action.Spec = v1alpha1.ProbabilisticSamplerSpec{} - if err := c.ShouldBindJSON(&action.Spec); err != nil { - c.JSON(400, gin.H{ - "error": err.Error(), - }) - return - } - action.Name = id - - _, err = kube.DefaultClient.ActionsClient.ProbabilisticSamplers(odigosns).Update(c, action, metav1.UpdateOptions{}) - if err != nil { - c.JSON(500, gin.H{ - "error": err.Error(), - }) - return - } - c.JSON(204, nil) -} - -func DeleteProbabilisticSampler(c *gin.Context, odigosns string, id string) { - err := kube.DefaultClient.ActionsClient.ProbabilisticSamplers(odigosns).Delete(c, id, metav1.DeleteOptions{}) - if err != nil { - if apierrors.IsNotFound(err) { - c.JSON(404, gin.H{ - "error": "not found", - }) - return - } else { - c.JSON(500, gin.H{ - "error": err.Error(), - }) - return - } - } - c.JSON(204, nil) -} diff --git a/frontend/endpoints/actions/renameattribute.go b/frontend/endpoints/actions/renameattribute.go deleted file mode 100644 index 4042bc4e3f..0000000000 --- a/frontend/endpoints/actions/renameattribute.go +++ /dev/null @@ -1,100 +0,0 @@ -package actions - -import ( - "github.com/gin-gonic/gin" - "github.com/odigos-io/odigos/api/actions/v1alpha1" - "github.com/odigos-io/odigos/frontend/kube" - apierrors "k8s.io/apimachinery/pkg/api/errors" - metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" -) - -func GetRenameAttribute(c *gin.Context, odigosns string, id string) { - action, err := kube.DefaultClient.ActionsClient.RenameAttributes(odigosns).Get(c, id, metav1.GetOptions{}) - if err != nil { - if apierrors.IsNotFound(err) { - c.JSON(404, gin.H{ - "error": "not found", - }) - return - } else { - c.JSON(500, gin.H{ - "error": err.Error(), - }) - return - } - } - c.JSON(200, action.Spec) -} - -func CreateRenameAttribute(c *gin.Context, odigosns string) { - var action v1alpha1.RenameAttribute - if err := c.ShouldBindJSON(&action.Spec); err != nil { - c.JSON(400, gin.H{ - "error": err.Error(), - }) - return - } - action.GenerateName = "ra-" - generatedAction, err := kube.DefaultClient.ActionsClient.RenameAttributes(odigosns).Create(c, &action, metav1.CreateOptions{}) - if err != nil { - c.JSON(500, gin.H{ - "error": err.Error(), - }) - return - } - c.JSON(201, gin.H{ - "id": generatedAction.Name, - }) -} - -func UpdateRenameAttribute(c *gin.Context, odigosns string, id string) { - action, err := kube.DefaultClient.ActionsClient.RenameAttributes(odigosns).Get(c, id, metav1.GetOptions{}) - if err != nil { - if apierrors.IsNotFound(err) { - c.JSON(404, gin.H{ - "error": "not found", - }) - return - } else { - c.JSON(500, gin.H{ - "error": err.Error(), - }) - } - return - } - action.Spec = v1alpha1.RenameAttributeSpec{} - if err := c.ShouldBindJSON(&action.Spec); err != nil { - c.JSON(400, gin.H{ - "error": err.Error(), - }) - return - } - action.Name = id - - _, err = kube.DefaultClient.ActionsClient.RenameAttributes(odigosns).Update(c, action, metav1.UpdateOptions{}) - if err != nil { - c.JSON(500, gin.H{ - "error": err.Error(), - }) - return - } - c.JSON(204, nil) -} - -func DeleteRenameAttribute(c *gin.Context, odigosns string, id string) { - err := kube.DefaultClient.ActionsClient.RenameAttributes(odigosns).Delete(c, id, metav1.DeleteOptions{}) - if err != nil { - if apierrors.IsNotFound(err) { - c.JSON(404, gin.H{ - "error": "not found", - }) - return - } else { - c.JSON(500, gin.H{ - "error": err.Error(), - }) - return - } - } - c.JSON(204, nil) -} diff --git a/frontend/endpoints/actions/root.go b/frontend/endpoints/actions/root.go deleted file mode 100644 index 5a58b5c339..0000000000 --- a/frontend/endpoints/actions/root.go +++ /dev/null @@ -1,133 +0,0 @@ -package actions - -import ( - "github.com/gin-gonic/gin" - "github.com/odigos-io/odigos/frontend/kube" - metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" -) - -type IcaInstanceResponse struct { - Id string `json:"id"` - Type string `json:"type"` - Spec interface{} `json:"spec"` -} - -func GetActions(c *gin.Context, odigosns string) { - - response := []IcaInstanceResponse{} - - icaActions, err := kube.DefaultClient.ActionsClient.AddClusterInfos(odigosns).List(c, metav1.ListOptions{}) - if err != nil { - c.JSON(500, gin.H{ - "error": err.Error(), - }) - return - } - - for _, action := range icaActions.Items { - response = append(response, IcaInstanceResponse{ - Id: action.Name, - Type: action.Kind, - Spec: action.Spec, - }) - } - - daActions, err := kube.DefaultClient.ActionsClient.DeleteAttributes(odigosns).List(c, metav1.ListOptions{}) - if err != nil { - c.JSON(500, gin.H{ - "error": err.Error(), - }) - return - } - - for _, action := range daActions.Items { - response = append(response, IcaInstanceResponse{ - Id: action.Name, - Type: action.Kind, - Spec: action.Spec, - }) - } - - raActions, err := kube.DefaultClient.ActionsClient.RenameAttributes(odigosns).List(c, metav1.ListOptions{}) - if err != nil { - c.JSON(500, gin.H{ - "error": err.Error(), - }) - return - } - - for _, action := range raActions.Items { - response = append(response, IcaInstanceResponse{ - Id: action.Name, - Type: action.Kind, - Spec: action.Spec, - }) - } - - esActions, err := kube.DefaultClient.ActionsClient.ErrorSamplers(odigosns).List(c, metav1.ListOptions{}) - if err != nil { - c.JSON(500, gin.H{ - "error": err.Error(), - }) - return - } - - for _, action := range esActions.Items { - response = append(response, IcaInstanceResponse{ - Id: action.Name, - Type: action.Kind, - Spec: action.Spec, - }) - } - - lsActions, err := kube.DefaultClient.ActionsClient.LatencySamplers(odigosns).List(c, metav1.ListOptions{}) - - if err != nil { - c.JSON(500, gin.H{ - "error": err.Error(), - }) - return - } - - for _, action := range lsActions.Items { - response = append(response, IcaInstanceResponse{ - Id: action.Name, - Type: action.Kind, - Spec: action.Spec, - }) - } - - psActions, err := kube.DefaultClient.ActionsClient.ProbabilisticSamplers(odigosns).List(c, metav1.ListOptions{}) - if err != nil { - c.JSON(500, gin.H{ - "error": err.Error(), - }) - return - } - - for _, action := range psActions.Items { - response = append(response, IcaInstanceResponse{ - Id: action.Name, - Type: action.Kind, - Spec: action.Spec, - }) - } - - piActions, err := kube.DefaultClient.ActionsClient.PiiMaskings(odigosns).List(c, metav1.ListOptions{}) - if err != nil { - c.JSON(500, gin.H{ - "error": err.Error(), - }) - return - } - - for _, action := range piActions.Items { - response = append(response, IcaInstanceResponse{ - Id: action.Name, - Type: action.Kind, - Spec: action.Spec, - }) - } - - c.JSON(200, response) -} diff --git a/frontend/endpoints/applications.go b/frontend/endpoints/applications.go deleted file mode 100644 index a29346cf09..0000000000 --- a/frontend/endpoints/applications.go +++ /dev/null @@ -1,205 +0,0 @@ -package endpoints - -import ( - "context" - "net/http" - - appsv1 "k8s.io/api/apps/v1" - - "github.com/odigos-io/odigos/k8sutils/pkg/client" - - "github.com/gin-gonic/gin" - "github.com/odigos-io/odigos/frontend/kube" - "golang.org/x/sync/errgroup" - metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" -) - -type GetApplicationsInNamespaceRequest struct { - Namespace string `uri:"namespace" binding:"required"` -} - -type GetApplicationsInNamespaceResponse struct { - Applications []GetApplicationItemInNamespace `json:"applications"` -} - -type WorkloadKind string - -const ( - WorkloadKindDeployment WorkloadKind = "Deployment" - WorkloadKindStatefulSet WorkloadKind = "StatefulSet" - WorkloadKindDaemonSet WorkloadKind = "DaemonSet" -) - -type GetApplicationItemInNamespace struct { - Name string `json:"name"` - Kind WorkloadKind `json:"kind"` - Instances int `json:"instances"` - AppInstrumentationLabeled *bool `json:"app_instrumentation_labeled"` - NsInstrumentationLabeled *bool `json:"ns_instrumentation_labeled"` - InstrumentationEffective bool `json:"instrumentation_effective"` -} - -type GetApplicationItem struct { - // namespace is used when querying all the namespaces, the response can be grouped/filtered by namespace - namespace string - nsItem GetApplicationItemInNamespace -} - -func GetApplicationsInNamespace(c *gin.Context) { - var request GetApplicationsInNamespaceRequest - if err := c.ShouldBindUri(&request); err != nil { - returnError(c, err) - return - } - - ctx := c.Request.Context() - namespace, err := kube.DefaultClient.CoreV1().Namespaces().Get(ctx, request.Namespace, metav1.GetOptions{}) - if err != nil { - returnError(c, err) - return - } - - items, err := getApplicationsInNamespace(ctx, namespace.Name, map[string]*bool{namespace.Name: isObjectLabeledForInstrumentation(namespace.ObjectMeta)}) - if err != nil { - returnError(c, err) - return - } - - apps := make([]GetApplicationItemInNamespace, len(items)) - for i, item := range items { - apps[i] = item.nsItem - } - - c.JSON(http.StatusOK, GetApplicationsInNamespaceResponse{ - Applications: apps, - }) -} - -// getApplicationsInNamespace returns all applications in the namespace and their instrumentation status. -// nsName can be an empty string to get applications in all namespaces. -// nsInstrumentedMap is a map of namespace name to a boolean pointer indicating if the namespace is instrumented. -func getApplicationsInNamespace(ctx context.Context, nsName string, nsInstrumentedMap map[string]*bool) ([]GetApplicationItem, error) { - g, ctx := errgroup.WithContext(ctx) - var ( - deps []GetApplicationItem - ss []GetApplicationItem - dss []GetApplicationItem - ) - - g.Go(func() error { - var err error - deps, err = getDeployments(nsName, ctx) - return err - }) - - g.Go(func() error { - var err error - ss, err = getStatefulSets(nsName, ctx) - return err - }) - - g.Go(func() error { - var err error - dss, err = getDaemonSets(nsName, ctx) - return err - }) - - if err := g.Wait(); err != nil { - return nil, err - } - - items := make([]GetApplicationItem, len(deps)+len(ss)+len(dss)) - copy(items, deps) - copy(items[len(deps):], ss) - copy(items[len(deps)+len(ss):], dss) - - for i := range items { - item := &items[i] - // check if the entire namespace is instrumented - // as it affects the applications in the namespace - // which use this label to determine if they should be instrumented - nsInstrumentationLabeled := nsInstrumentedMap[item.namespace] - item.nsItem.NsInstrumentationLabeled = nsInstrumentationLabeled - appInstrumented := (item.nsItem.AppInstrumentationLabeled != nil && *item.nsItem.AppInstrumentationLabeled) - appInstrumentationInherited := item.nsItem.AppInstrumentationLabeled == nil - nsInstrumented := (nsInstrumentationLabeled != nil && *nsInstrumentationLabeled) - item.nsItem.InstrumentationEffective = appInstrumented || (appInstrumentationInherited && nsInstrumented) - } - - return items, nil -} - -func getDeployments(namespace string, ctx context.Context) ([]GetApplicationItem, error) { - var response []GetApplicationItem - err := client.ListWithPages(client.DefaultPageSize, kube.DefaultClient.AppsV1().Deployments(namespace).List, ctx, metav1.ListOptions{}, func(deps *appsv1.DeploymentList) error { - for _, dep := range deps.Items { - appInstrumentationLabeled := isObjectLabeledForInstrumentation(dep.ObjectMeta) - response = append(response, GetApplicationItem{ - namespace: dep.Namespace, - nsItem: GetApplicationItemInNamespace{ - Name: dep.Name, - Kind: WorkloadKindDeployment, - Instances: int(dep.Status.AvailableReplicas), - AppInstrumentationLabeled: appInstrumentationLabeled, - }, - }) - } - return nil - }) - - if err != nil { - return nil, err - } - - return response, nil -} - -func getStatefulSets(namespace string, ctx context.Context) ([]GetApplicationItem, error) { - var response []GetApplicationItem - err := client.ListWithPages(client.DefaultPageSize, kube.DefaultClient.AppsV1().StatefulSets(namespace).List, ctx, metav1.ListOptions{}, func(sss *appsv1.StatefulSetList) error { - for _, ss := range sss.Items { - appInstrumentationLabeled := isObjectLabeledForInstrumentation(ss.ObjectMeta) - response = append(response, GetApplicationItem{ - namespace: ss.Namespace, - nsItem: GetApplicationItemInNamespace{ - Name: ss.Name, - Kind: WorkloadKindStatefulSet, - Instances: int(ss.Status.ReadyReplicas), - AppInstrumentationLabeled: appInstrumentationLabeled, - }, - }) - } - return nil - }) - - if err != nil { - return nil, err - } - - return response, nil -} - -func getDaemonSets(namespace string, ctx context.Context) ([]GetApplicationItem, error) { - var response []GetApplicationItem - err := client.ListWithPages(client.DefaultPageSize, kube.DefaultClient.AppsV1().DaemonSets(namespace).List, ctx, metav1.ListOptions{}, func(dss *appsv1.DaemonSetList) error { - for _, ds := range dss.Items { - appInstrumentationLabeled := isObjectLabeledForInstrumentation(ds.ObjectMeta) - response = append(response, GetApplicationItem{ - namespace: ds.Namespace, - nsItem: GetApplicationItemInNamespace{ - Name: ds.Name, - Kind: WorkloadKindDaemonSet, - Instances: int(ds.Status.NumberReady), - AppInstrumentationLabeled: appInstrumentationLabeled, - }, - }) - } - return nil - }) - - if err != nil { - return nil, err - } - - return response, nil -} diff --git a/frontend/endpoints/common.go b/frontend/endpoints/common.go deleted file mode 100644 index 4d3256ac8e..0000000000 --- a/frontend/endpoints/common.go +++ /dev/null @@ -1,23 +0,0 @@ -package endpoints - -import ( - "net/http" - - "github.com/gin-gonic/gin" -) - -func returnError(c *gin.Context, err error) { - c.JSON(http.StatusInternalServerError, gin.H{ - "message": err.Error(), - }) -} - -func returnErrors(c *gin.Context, errors []error) { - errorsText := make([]string, len(errors)) - for i, err := range errors { - errorsText[i] = err.Error() - } - c.JSON(http.StatusInternalServerError, gin.H{ - "messages": errorsText, - }) -} diff --git a/frontend/endpoints/config.go b/frontend/endpoints/config.go deleted file mode 100644 index f58e77131b..0000000000 --- a/frontend/endpoints/config.go +++ /dev/null @@ -1,105 +0,0 @@ -package endpoints - -import ( - "context" - "fmt" - "log" - "net/http" - - "github.com/gin-gonic/gin" - "github.com/odigos-io/odigos/common/consts" - "github.com/odigos-io/odigos/frontend/kube" - metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" -) - -type InstallationStatus string - -const ( - NewInstallation InstallationStatus = "NEW" - AppsSelected InstallationStatus = "APPS_SELECTED" - Finished InstallationStatus = "FINISHED" -) - -type GetConfigResponse struct { - Installation InstallationStatus `json:"installation"` -} - -func GetConfig(c *gin.Context) { - var response GetConfigResponse - if !isSomethingLabeled(c.Request.Context()) { - response.Installation = NewInstallation - } else if !isDestinationChosen(c.Request.Context()) { - response.Installation = AppsSelected - } else { - response.Installation = Finished - } - - c.JSON(http.StatusOK, response) -} - -func isDestinationChosen(ctx context.Context) bool { - dests, err := kube.DefaultClient.OdigosClient.Destinations("").List(ctx, metav1.ListOptions{}) - if err != nil { - log.Printf("Error listing destinations: %v\n", err) - return false - } - - return len(dests.Items) > 0 -} - -func isSomethingLabeled(ctx context.Context) bool { - labelSelector := fmt.Sprintf("%s=%s", consts.OdigosInstrumentationLabel, consts.InstrumentationEnabled) - ns, err := kube.DefaultClient.CoreV1().Namespaces().List(ctx, metav1.ListOptions{ - LabelSelector: labelSelector, - }) - - if err != nil { - log.Printf("Error listing namespaces: %v\n", err) - return false - } - - if len(ns.Items) > 0 { - return true - } - - deps, err := kube.DefaultClient.AppsV1().Deployments("").List(ctx, metav1.ListOptions{ - LabelSelector: labelSelector, - }) - - if err != nil { - log.Printf("Error listing deployments: %v\n", err) - return false - } - - if len(deps.Items) > 0 { - return true - } - - ss, err := kube.DefaultClient.AppsV1().StatefulSets("").List(ctx, metav1.ListOptions{ - LabelSelector: labelSelector, - }) - - if err != nil { - log.Printf("Error listing statefulsets: %v\n", err) - return false - } - - if len(ss.Items) > 0 { - return true - } - - ds, err := kube.DefaultClient.AppsV1().DaemonSets("").List(ctx, metav1.ListOptions{ - LabelSelector: labelSelector, - }) - - if err != nil { - log.Printf("Error listing daemonsets: %v\n", err) - return false - } - - if len(ds.Items) > 0 { - return true - } - - return false -} diff --git a/frontend/endpoints/destination_recognition/destination_finder.go b/frontend/endpoints/destination_recognition/destination_finder.go deleted file mode 100644 index e736fadd90..0000000000 --- a/frontend/endpoints/destination_recognition/destination_finder.go +++ /dev/null @@ -1,78 +0,0 @@ -package destination_recognition - -import ( - "github.com/gin-gonic/gin" - odigosv1 "github.com/odigos-io/odigos/api/odigos/v1alpha1" - "github.com/odigos-io/odigos/common" - "github.com/odigos-io/odigos/frontend/kube" - "github.com/odigos-io/odigos/k8sutils/pkg/client" - k8s "k8s.io/api/core/v1" - metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" -) - -var SupportedDestinationType = []common.DestinationType{common.JaegerDestinationType, common.ElasticsearchDestinationType} - -type DestinationDetails struct { - Type common.DestinationType `json:"type"` - UrlString string `json:"urlString"` -} - -type IDestinationFinder interface { - isPotentialService(k8s.Service) bool - fetchDestinationDetails(k8s.Service) DestinationDetails - getServiceURL() string -} - -func GetAllPotentialDestinationDetails(ctx *gin.Context, namespaces []k8s.Namespace, dests *odigosv1.DestinationList) ([]DestinationDetails, error) { - var destinationFinder IDestinationFinder - var destinationDetails []DestinationDetails - var err error - - for _, ns := range namespaces { - err = client.ListWithPages(client.DefaultPageSize, kube.DefaultClient.CoreV1().Services(ns.Name).List, - ctx, metav1.ListOptions{}, func(services *k8s.ServiceList) error { - for _, service := range services.Items { - for _, destinationType := range SupportedDestinationType { - destinationFinder = getDestinationFinder(destinationType) - - if destinationFinder.isPotentialService(service) { - potentialDestination := destinationFinder.fetchDestinationDetails(service) - - if !destinationExist(dests, potentialDestination, destinationFinder) { - destinationDetails = append(destinationDetails, potentialDestination) - } - break - } - } - } - return nil - }) - } - - if err != nil { - return nil, err - } - - return destinationDetails, nil -} - -func getDestinationFinder(destinationType common.DestinationType) IDestinationFinder { - switch destinationType { - case common.JaegerDestinationType: - return &JaegerDestinationFinder{} - case common.ElasticsearchDestinationType: - return &ElasticSearchDestinationFinder{} - } - - return nil -} - -func destinationExist(dests *odigosv1.DestinationList, potentialDestination DestinationDetails, destinationFinder IDestinationFinder) bool { - for _, dest := range dests.Items { - if dest.Spec.Type == potentialDestination.Type && dest.GetConfig()[destinationFinder.getServiceURL()] == potentialDestination.UrlString { - return true - } - } - - return false -} diff --git a/frontend/endpoints/destination_recognition/elasticsearch.go b/frontend/endpoints/destination_recognition/elasticsearch.go deleted file mode 100644 index a5bb792d79..0000000000 --- a/frontend/endpoints/destination_recognition/elasticsearch.go +++ /dev/null @@ -1,41 +0,0 @@ -package destination_recognition - -import ( - "fmt" - "github.com/odigos-io/odigos/common" - "github.com/odigos-io/odigos/common/config" - k8s "k8s.io/api/core/v1" - "strings" -) - -type ElasticSearchDestinationFinder struct{} - -const ElasticSearchHttpPort int32 = 9200 -const ElasticSearchHttpUrlFormat = "https://%s.%s:%d" - -func (j *ElasticSearchDestinationFinder) isPotentialService(service k8s.Service) bool { - for _, port := range service.Spec.Ports { - if isElasticSearchService(port.Port, service.Name) { - return true - } - } - - return false -} - -func isElasticSearchService(portNumber int32, name string) bool { - return portNumber == ElasticSearchHttpPort && strings.Contains(name, string(common.ElasticsearchDestinationType)) -} - -func (j *ElasticSearchDestinationFinder) fetchDestinationDetails(service k8s.Service) DestinationDetails { - urlString := fmt.Sprintf(ElasticSearchHttpUrlFormat, service.Name, service.Namespace, ElasticSearchHttpPort) - - return DestinationDetails{ - Type: common.ElasticsearchDestinationType, - UrlString: urlString, - } -} - -func (j *ElasticSearchDestinationFinder) getServiceURL() string { - return config.ElasticsearchUrlKey -} diff --git a/frontend/endpoints/destination_recognition/jaeger.go b/frontend/endpoints/destination_recognition/jaeger.go deleted file mode 100644 index 7d5ebf3124..0000000000 --- a/frontend/endpoints/destination_recognition/jaeger.go +++ /dev/null @@ -1,42 +0,0 @@ -package destination_recognition - -import ( - "fmt" - "strings" - - "github.com/odigos-io/odigos/common" - "github.com/odigos-io/odigos/common/config" - k8s "k8s.io/api/core/v1" -) - -type JaegerDestinationFinder struct{} - -const JaegerGrpcOtlpPort int32 = 4317 -const JaegerGrpcUrlFormat = "%s.%s:%d" - -func (j *JaegerDestinationFinder) isPotentialService(service k8s.Service) bool { - for _, port := range service.Spec.Ports { - if isJaegerService(port.Port, service.Name) { - return true - } - } - - return false -} - -func isJaegerService(portNumber int32, name string) bool { - return portNumber == JaegerGrpcOtlpPort && strings.Contains(name, string(common.JaegerDestinationType)) -} - -func (j *JaegerDestinationFinder) fetchDestinationDetails(service k8s.Service) DestinationDetails { - urlString := fmt.Sprintf(JaegerGrpcUrlFormat, service.Name, service.Namespace, JaegerGrpcOtlpPort) - - return DestinationDetails{ - Type: common.JaegerDestinationType, - UrlString: urlString, - } -} - -func (j *JaegerDestinationFinder) getServiceURL() string { - return config.JaegerUrlKey -} diff --git a/frontend/endpoints/destinations.go b/frontend/endpoints/destinations.go deleted file mode 100644 index 5bb6d2ebfd..0000000000 --- a/frontend/endpoints/destinations.go +++ /dev/null @@ -1,681 +0,0 @@ -package endpoints - -import ( - "context" - "encoding/json" - "fmt" - "net/http" - - "github.com/odigos-io/odigos/frontend/endpoints/destination_recognition" - "github.com/odigos-io/odigos/k8sutils/pkg/env" - - "github.com/gin-gonic/gin" - "github.com/odigos-io/odigos/api/odigos/v1alpha1" - "github.com/odigos-io/odigos/common" - "github.com/odigos-io/odigos/common/config" - "github.com/odigos-io/odigos/destinations" - testconnection "github.com/odigos-io/odigos/frontend/endpoints/test_connection" - "github.com/odigos-io/odigos/frontend/kube" - k8s "k8s.io/api/core/v1" - metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" - "k8s.io/apimachinery/pkg/types" -) - -type GetDestinationTypesResponse struct { - Categories []DestinationsCategory `json:"categories"` -} - -type DestinationsCategory struct { - Name string `json:"name"` - Items []DestinationTypesCategoryItem `json:"items"` -} - -type DestinationTypesCategoryItem struct { - Type common.DestinationType `json:"type"` - DisplayName string `json:"display_name"` - ImageUrl string `json:"image_url"` - SupportedSignals SupportedSignals `json:"supported_signals"` - TestConnectionSupported bool `json:"test_connection_supported"` -} - -type SupportedSignals struct { - Traces ObservabilitySignalSupport `json:"traces"` - Metrics ObservabilitySignalSupport `json:"metrics"` - Logs ObservabilitySignalSupport `json:"logs"` -} - -type ObservabilitySignalSupport struct { - Supported bool `json:"supported"` -} - -type ExportedSignals struct { - Traces bool `json:"traces"` - Metrics bool `json:"metrics"` - Logs bool `json:"logs"` -} - -type Destination struct { - Id string `json:"id"` - Name string `json:"name"` - Type common.DestinationType `json:"type"` - ExportedSignals ExportedSignals `json:"signals"` - Fields map[string]string `json:"fields"` - DestinationType DestinationTypesCategoryItem `json:"destination_type"` - Conditions []metav1.Condition `json:"conditions,omitempty"` -} - -var _ config.ExporterConfigurer = &Destination{} - -func (dest Destination) GetID() string { - return dest.Name -} -func (dest Destination) GetType() common.DestinationType { - return dest.Type -} -func (dest Destination) GetConfig() map[string]string { - return dest.Fields -} -func (dest Destination) GetSignals() []common.ObservabilitySignal { - return exportedSignalsObjectToSlice(dest.ExportedSignals) -} - -func GetDestinationTypes(c *gin.Context) { - var resp GetDestinationTypesResponse - itemsByCategory := make(map[string][]DestinationTypesCategoryItem) - for _, destConfig := range destinations.Get() { - item := DestinationTypeConfigToCategoryItem(destConfig) - itemsByCategory[destConfig.Metadata.Category] = append(itemsByCategory[destConfig.Metadata.Category], item) - } - - for category, items := range itemsByCategory { - resp.Categories = append(resp.Categories, DestinationsCategory{ - Name: category, - Items: items, - }) - } - - c.JSON(200, resp) -} - -type GetDestinationDetailsResponse struct { - Fields []Field `json:"fields"` -} - -type CustomReadDataLabel struct { - Condition string `json:"condition"` - Title string `json:"title"` - Value string `json:"value"` -} - -type Field struct { - Name string `json:"name"` - DisplayName string `json:"display_name"` - ComponentType string `json:"component_type"` - ComponentProperties map[string]interface{} `json:"component_properties"` - Secret bool `json:"secret,omitempty"` - InitialValue string `json:"initial_value,omitempty"` - RenderCondition []string `json:"render_condition,omitempty"` - HideFromReadData []string `json:"hide_from_read_data,omitempty"` - CustomReadDataLabels []*CustomReadDataLabel `json:"custom_read_data_labels,omitempty"` -} - -func convertCustomReadDataLabels(labels []*destinations.CustomReadDataLabel) []*CustomReadDataLabel { - var result []*CustomReadDataLabel - for _, label := range labels { - result = append(result, &CustomReadDataLabel{ - Condition: label.Condition, - Title: label.Title, - Value: label.Value, - }) - } - return result -} - -func GetDestinationTypeDetails(c *gin.Context) { - destType := common.DestinationType(c.Param("type")) - destTypeConfig, err := getDestinationTypeConfig(destType) - if err != nil { - c.JSON(404, gin.H{ - "error": fmt.Sprintf("destination type %s not found", destType), - }) - return - } - - var resp GetDestinationDetailsResponse - for _, field := range destTypeConfig.Spec.Fields { - resp.Fields = append(resp.Fields, Field{ - Name: field.Name, - DisplayName: field.DisplayName, - ComponentType: field.ComponentType, - ComponentProperties: field.ComponentProps, - Secret: field.Secret, - InitialValue: field.InitialValue, - RenderCondition: field.RenderCondition, - HideFromReadData: field.HideFromReadData, - CustomReadDataLabels: convertCustomReadDataLabels(field.CustomReadDataLabels), - }) - } - - c.JSON(200, resp) -} - -func GetDestinations(c *gin.Context, odigosns string) { - dests, err := kube.DefaultClient.OdigosClient.Destinations(odigosns).List(c, metav1.ListOptions{}) - if err != nil { - returnError(c, err) - return - } - - resp := []Destination{} - for _, dest := range dests.Items { - secretFields, err := getDestinationSecretFields(c, odigosns, &dest) - if err != nil { - returnError(c, err) - return - } - endpointDest := k8sDestinationToEndpointFormat(dest, secretFields) - resp = append(resp, endpointDest) - } - - c.JSON(200, resp) -} - -func GetDestinationById(c *gin.Context, odigosns string) { - destId := c.Param("id") - destination, err := kube.DefaultClient.OdigosClient.Destinations(odigosns).Get(c, destId, metav1.GetOptions{}) - if err != nil { - returnError(c, err) - return - } - - secretFields, err := getDestinationSecretFields(c, odigosns, destination) - if err != nil { - returnError(c, err) - return - } - resp := k8sDestinationToEndpointFormat(*destination, secretFields) - c.JSON(200, resp) -} - -func CreateNewDestination(c *gin.Context, odigosns string) { - request := Destination{} - if err := c.ShouldBindJSON(&request); err != nil { - returnError(c, err) - return - } - - destType := request.Type - destName := request.Name - - destTypeConfig, err := getDestinationTypeConfig(destType) - if err != nil { - returnError(c, err) - return - } - - errors := verifyDestinationDataScheme(destType, destTypeConfig, request.Fields) - if len(errors) > 0 { - returnErrors(c, errors) - return - } - - dataField, secretFields := transformFieldsToDataAndSecrets(destTypeConfig, request.Fields) - generateNamePrefix := "odigos.io.dest." + string(destType) + "-" - - k8sDestination := v1alpha1.Destination{ - ObjectMeta: metav1.ObjectMeta{ - GenerateName: generateNamePrefix, - }, - Spec: v1alpha1.DestinationSpec{ - Type: destType, - DestinationName: destName, - Data: dataField, - Signals: exportedSignalsObjectToSlice(request.ExportedSignals), - }, - } - - createSecret := len(secretFields) > 0 - if createSecret { - secretRef, err := createDestinationSecret(c, destType, secretFields, odigosns) - if err != nil { - returnError(c, err) - return - } - k8sDestination.Spec.SecretRef = secretRef - } - - dest, err := kube.DefaultClient.OdigosClient.Destinations(odigosns).Create(c, &k8sDestination, metav1.CreateOptions{}) - if err != nil { - // if we failed to create the destination, we need to rollback the secret creation - if createSecret { - kube.DefaultClient.CoreV1().Secrets(odigosns).Delete(c, destName, metav1.DeleteOptions{}) - } - returnError(c, err) - return - } - - if dest.Spec.SecretRef != nil { - err = addDestinationOwnerReferenceToSecret(c, odigosns, dest) - if err != nil { - returnError(c, err) - return - } - } - - resp := k8sDestinationToEndpointFormat(*dest, secretFields) - c.JSON(201, resp) -} - -func TestConnectionForDestination(c *gin.Context, odigosns string) { - request := Destination{} - if err := c.ShouldBindJSON(&request); err != nil { - returnError(c, err) - return - } - - destType := request.Type - - destConfig, err := getDestinationTypeConfig(destType) - if err != nil { - returnError(c, err) - return - } - - if !destConfig.Spec.TestConnectionSupported { - returnError(c, fmt.Errorf("destination type %s does not support test connection", request.Type)) - return - } - - res := testconnection.TestConnection(c, request) - if !res.Succeeded { - c.JSON(res.StatusCode, gin.H{ - "type": res.DestinationType, - "message": res.Message, - "reason": res.Reason, - }) - return - } - - c.Status(200) -} - -func UpdateExistingDestination(c *gin.Context, odigosns string) { - destId := c.Param("id") - request := Destination{} - if err := c.ShouldBindJSON(&request); err != nil { - returnError(c, err) - return - } - - destType := request.Type - destName := request.Name - - destTypeConfig, err := getDestinationTypeConfig(destType) - if err != nil { - returnError(c, err) - return - } - - errors := verifyDestinationDataScheme(destType, destTypeConfig, request.Fields) - if len(errors) > 0 { - returnErrors(c, errors) - return - } - - dataFields, secretFields := transformFieldsToDataAndSecrets(destTypeConfig, request.Fields) - - // update destination - dest, err := kube.DefaultClient.OdigosClient.Destinations(odigosns).Get(c, destId, metav1.GetOptions{}) - if err != nil { - returnError(c, err) - return - } - - // handle the secret, based on the updated (which might add or remove optional secret fields), - // we might need to create, delete or update the existing secret - destUpdateHasSecrets := len(secretFields) > 0 - destCurrentlyHasSecrets := dest.Spec.SecretRef != nil - - if !destUpdateHasSecrets && destCurrentlyHasSecrets { - // delete the secret if it's not needed anymore - err := kube.DefaultClient.CoreV1().Secrets(odigosns).Delete(c, dest.Spec.SecretRef.Name, metav1.DeleteOptions{}) - if err != nil { - returnError(c, err) - return - } - dest.Spec.SecretRef = nil - } else if destUpdateHasSecrets && !destCurrentlyHasSecrets { - // create the secret if it was added in this update - secretRef, err := createDestinationSecret(c, destType, secretFields, odigosns) - if err != nil { - returnError(c, err) - return - } - dest.Spec.SecretRef = secretRef - // add owner reference to the secret - err = addDestinationOwnerReferenceToSecret(c, odigosns, dest) - if err != nil { - returnError(c, err) - return - } - } else if destUpdateHasSecrets && destCurrentlyHasSecrets { - // update the secret in case it is modified - secret, err := kube.DefaultClient.CoreV1().Secrets(odigosns).Get(c, dest.Spec.SecretRef.Name, metav1.GetOptions{}) - if err != nil { - returnError(c, err) - return - } - secret.StringData = secretFields - _, err = kube.DefaultClient.CoreV1().Secrets(odigosns).Update(c, secret, metav1.UpdateOptions{}) - if err != nil { - returnError(c, err) - return - } - } - - secretRef := dest.Spec.SecretRef - var origSecret *k8s.Secret - if secretRef != nil { - secret, err := kube.DefaultClient.CoreV1().Secrets(odigosns).Get(c, secretRef.Name, metav1.GetOptions{}) - if err != nil { - returnError(c, err) - return - } - - // keep a copy of the object so we can rollback if needed - origSecret = secret.DeepCopy() - - // use existing object to update the secret in k8s - secret.StringData = secretFields - _, err = kube.DefaultClient.CoreV1().Secrets(odigosns).Update(c, secret, metav1.UpdateOptions{}) - if err != nil { - returnError(c, err) - return - } - } - - dest.Spec.Type = request.Type - dest.Spec.DestinationName = destName - dest.Spec.Data = dataFields - dest.Spec.Signals = exportedSignalsObjectToSlice(request.ExportedSignals) - - updatedDest, err := kube.DefaultClient.OdigosClient.Destinations(odigosns).Update(c, dest, metav1.UpdateOptions{}) - if err != nil { - if origSecret != nil { - // rollback secret, it might fail but we have nothing to do with it - kube.DefaultClient.CoreV1().Secrets(odigosns).Update(c, origSecret, metav1.UpdateOptions{}) - } - returnError(c, err) - return - } - - resp := k8sDestinationToEndpointFormat(*updatedDest, secretFields) - c.JSON(201, resp) -} - -func DeleteDestination(c *gin.Context, odigosns string) { - destId := c.Param("id") - - // delete the destination - errDest := kube.DefaultClient.OdigosClient.Destinations(odigosns).Delete(c, destId, metav1.DeleteOptions{}) - // the secret (if exits) will be deleted by the owner reference - - if errDest != nil { - returnError(c, errDest) - return - } - - c.Status(http.StatusNoContent) -} - -func k8sDestinationToEndpointFormat(k8sDest v1alpha1.Destination, secretFields map[string]string) Destination { - destType := k8sDest.Spec.Type - destName := k8sDest.Spec.DestinationName - mergedFields := mergeDataAndSecrets(k8sDest.Spec.Data, secretFields) - destTypeConfig := DestinationTypeConfigToCategoryItem(destinations.GetDestinationByType(string(destType))) - - var conditions []metav1.Condition - for _, condition := range k8sDest.Status.Conditions { - conditions = append(conditions, metav1.Condition{ - Type: condition.Type, - Status: condition.Status, - Message: condition.Message, - LastTransitionTime: condition.LastTransitionTime, - }) - } - - return Destination{ - Id: k8sDest.Name, - Name: destName, - Type: destType, - ExportedSignals: ExportedSignals{ - Traces: isSignalExported(k8sDest, common.TracesObservabilitySignal), - Metrics: isSignalExported(k8sDest, common.MetricsObservabilitySignal), - Logs: isSignalExported(k8sDest, common.LogsObservabilitySignal), - }, - Fields: mergedFields, - DestinationType: destTypeConfig, - Conditions: conditions, - } -} - -func mergeDataAndSecrets(data map[string]string, secrets map[string]string) map[string]string { - merged := map[string]string{} - - for k, v := range data { - merged[k] = v - } - - for k, v := range secrets { - merged[k] = v - } - - return merged -} - -func isSignalExported(dest v1alpha1.Destination, signal common.ObservabilitySignal) bool { - for _, s := range dest.Spec.Signals { - if s == signal { - return true - } - } - - return false -} - -func exportedSignalsObjectToSlice(signals ExportedSignals) []common.ObservabilitySignal { - var resp []common.ObservabilitySignal - if signals.Traces { - resp = append(resp, common.TracesObservabilitySignal) - } - if signals.Metrics { - resp = append(resp, common.MetricsObservabilitySignal) - } - if signals.Logs { - resp = append(resp, common.LogsObservabilitySignal) - } - - return resp -} - -func verifyDestinationDataScheme(destType common.DestinationType, destTypeConfig *destinations.Destination, data map[string]string) []error { - - errors := []error{} - - // verify all fields in config are present in data (assuming here all fields are required) - for _, field := range destTypeConfig.Spec.Fields { - required, ok := field.ComponentProps["required"].(bool) - if !ok || !required { - continue - } - fieldValue, found := data[field.Name] - if !found || fieldValue == "" { - errors = append(errors, fmt.Errorf("field %s is required", field.Name)) - } - } - - // verify data fields are found in config - for dataField := range data { - found := false - // iterating all fields in config every time, assuming it's a small list - for _, field := range destTypeConfig.Spec.Fields { - if dataField == field.Name { - found = true - break - } - } - if !found { - errors = append(errors, fmt.Errorf("field %s is not found in config for destination type '%s'", dataField, destType)) - } - } - - return errors -} - -func getDestinationTypeConfig(destType common.DestinationType) (*destinations.Destination, error) { - for _, dest := range destinations.Get() { - if dest.Metadata.Type == destType { - return &dest, nil - } - } - - return nil, fmt.Errorf("destination type %s not found", destType) -} - -func transformFieldsToDataAndSecrets(destTypeConfig *destinations.Destination, fields map[string]string) (map[string]string, map[string]string) { - - dataFields := map[string]string{} - secretFields := map[string]string{} - - for fieldName, fieldValue := range fields { - - // it is possible that some fields are not required and are empty. - // we should treat them as empty - if fieldValue == "" { - continue - } - - // for each field in the data, find it's config - // assuming the list is small so it's ok to iterate it - for _, fieldConfig := range destTypeConfig.Spec.Fields { - if fieldName == fieldConfig.Name { - if fieldConfig.Secret { - secretFields[fieldName] = fieldValue - } else { - dataFields[fieldName] = fieldValue - } - } - } - } - - return dataFields, secretFields -} - -func getDestinationSecretFields(c *gin.Context, odigosns string, dest *v1alpha1.Destination) (map[string]string, error) { - - secretFields := map[string]string{} - secretRef := dest.Spec.SecretRef - - if secretRef == nil { - return secretFields, nil - } - - secret, err := kube.DefaultClient.CoreV1().Secrets(odigosns).Get(c, secretRef.Name, metav1.GetOptions{}) - if err != nil { - return nil, err - } - - for k, v := range secret.Data { - secretFields[k] = string(v) - } - - return secretFields, nil -} - -func DestinationTypeConfigToCategoryItem(destConfig destinations.Destination) DestinationTypesCategoryItem { - return DestinationTypesCategoryItem{ - Type: destConfig.Metadata.Type, - DisplayName: destConfig.Metadata.DisplayName, - ImageUrl: GetImageURL(destConfig.Spec.Image), - TestConnectionSupported: destConfig.Spec.TestConnectionSupported, - SupportedSignals: SupportedSignals{ - Traces: ObservabilitySignalSupport{ - Supported: destConfig.Spec.Signals.Traces.Supported, - }, - Metrics: ObservabilitySignalSupport{ - Supported: destConfig.Spec.Signals.Metrics.Supported, - }, - Logs: ObservabilitySignalSupport{ - Supported: destConfig.Spec.Signals.Logs.Supported, - }, - }, - } -} - -func createDestinationSecret(ctx context.Context, destType common.DestinationType, secretFields map[string]string, odigosns string) (*k8s.LocalObjectReference, error) { - generateNamePrefix := "odigos.io.dest." + string(destType) + "-" - secret := k8s.Secret{ - ObjectMeta: metav1.ObjectMeta{ - GenerateName: generateNamePrefix, - }, - StringData: secretFields, - } - newSecret, err := kube.DefaultClient.CoreV1().Secrets(odigosns).Create(ctx, &secret, metav1.CreateOptions{}) - if err != nil { - return nil, err - } - return &k8s.LocalObjectReference{ - Name: newSecret.Name, - }, nil -} - -func addDestinationOwnerReferenceToSecret(ctx context.Context, odigosns string, dest *v1alpha1.Destination) error { - destOwnerRef := metav1.OwnerReference{ - APIVersion: "odigos.io/v1alpha1", - Kind: "Destination", - Name: dest.Name, - UID: dest.UID, - } - - secretPatch := []struct { - Op string `json:"op"` - Path string `json:"path"` - Value []metav1.OwnerReference `json:"value"` - }{{ - Op: "add", - Path: "/metadata/ownerReferences", - Value: []metav1.OwnerReference{destOwnerRef}, - }, - } - - secretPatchBytes, err := json.Marshal(secretPatch) - if err != nil { - return err - } - - _, err = kube.DefaultClient.CoreV1().Secrets(odigosns).Patch(ctx, dest.Spec.SecretRef.Name, types.JSONPatchType, secretPatchBytes, metav1.PatchOptions{}) - if err != nil { - return err - } - return nil -} - -func potentialDestinations(c *gin.Context, odigosns string) []destination_recognition.DestinationDetails { - relevantNamespaces, err := getRelevantNameSpaces(c, env.GetCurrentNamespace()) - if err != nil { - return nil - } - - // Existing Destinations - existingDestination, err := kube.DefaultClient.OdigosClient.Destinations(odigosns).List(c, metav1.ListOptions{}) - if err != nil { - return nil - } - - destinationDetails, err := destination_recognition.GetAllPotentialDestinationDetails(c, relevantNamespaces, existingDestination) - if err != nil { - return nil - } - - return destinationDetails -} diff --git a/frontend/endpoints/instrumentationrules.go b/frontend/endpoints/instrumentationrules.go deleted file mode 100644 index 8e7f76a9a6..0000000000 --- a/frontend/endpoints/instrumentationrules.go +++ /dev/null @@ -1,155 +0,0 @@ -package endpoints - -import ( - "github.com/gin-gonic/gin" - odigosv1alpha1 "github.com/odigos-io/odigos/api/odigos/v1alpha1" - "github.com/odigos-io/odigos/frontend/kube" - apierrors "k8s.io/apimachinery/pkg/api/errors" - metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" -) - -// This type is used to hide the details of the k8s manifest and expose a generic object -type InstrumentationRule struct { - odigosv1alpha1.InstrumentationRuleSpec - - // how the rule can be referenced in the REST api. - // this is the name of the CR in k8s - RuleId string `json:"ruleId"` -} - -func GetInstrumentationRules(c *gin.Context, odigosns string) { - - instrumentationRules, err := kube.DefaultClient.OdigosClient.InstrumentationRules(odigosns).List(c, metav1.ListOptions{}) - if err != nil { - c.JSON(500, gin.H{ - "message": "error getting instrumentation rules", - }) - return - } - - rules := make([]InstrumentationRule, 0, len(instrumentationRules.Items)) - for _, rule := range instrumentationRules.Items { - rules = append(rules, InstrumentationRule{ - InstrumentationRuleSpec: rule.Spec, - RuleId: rule.Name, - }) - } - - // stringify the rules into json and return is - c.JSON(200, rules) -} - -func GetInstrumentationRule(c *gin.Context, odigosns string, ruleId string) { - rule, err := kube.DefaultClient.OdigosClient.InstrumentationRules(odigosns).Get(c, ruleId, metav1.GetOptions{}) - if err != nil { - if apierrors.IsNotFound(err) { - c.JSON(404, gin.H{ - "message": "instrumentation rule not found", - }) - return - } - c.JSON(500, gin.H{ - "message": "error getting instrumentation rule", - }) - return - } - - c.JSON(200, InstrumentationRule{ - InstrumentationRuleSpec: rule.Spec, - RuleId: rule.Name, - }) -} - -func CreateInstrumentationRule(c *gin.Context, odigosns string) { - var rule odigosv1alpha1.InstrumentationRuleSpec - if err := c.BindJSON(&rule); err != nil { - c.JSON(400, gin.H{ - "message": "invalid request body", - }) - return - } - - // create the rule - createdRule, err := kube.DefaultClient.OdigosClient.InstrumentationRules(odigosns).Create(c, &odigosv1alpha1.InstrumentationRule{ - ObjectMeta: metav1.ObjectMeta{ - GenerateName: "ui-instrumentation-rule-", - }, - Spec: rule, - }, metav1.CreateOptions{}) - if err != nil { - c.JSON(500, gin.H{ - "message": "error creating instrumentation rule", - }) - return - } - - c.JSON(201, InstrumentationRule{ - InstrumentationRuleSpec: createdRule.Spec, - RuleId: createdRule.Name, - }) -} - -func DeleteInstrumentationRule(c *gin.Context, odigosns string, ruleId string) { - err := kube.DefaultClient.OdigosClient.InstrumentationRules(odigosns).Delete(c, ruleId, metav1.DeleteOptions{}) - if err != nil { - if apierrors.IsNotFound(err) { - c.JSON(404, gin.H{ - "message": "instrumentation rule not found", - }) - return - } - c.JSON(500, gin.H{ - "message": "error deleting instrumentation rule", - }) - return - } - - c.JSON(204, nil) -} - -func UpdateInstrumentationRule(c *gin.Context, odigosns string, ruleId string) { - var rule odigosv1alpha1.InstrumentationRuleSpec - if err := c.BindJSON(&rule); err != nil { - c.JSON(400, gin.H{ - "message": "invalid request body", - }) - return - } - - // get existing rule - existingRule, err := kube.DefaultClient.OdigosClient.InstrumentationRules(odigosns).Get(c, ruleId, metav1.GetOptions{}) - if err != nil { - if apierrors.IsNotFound(err) { - c.JSON(404, gin.H{ - "message": "instrumentation rule not found", - }) - return - } - c.JSON(500, gin.H{ - "message": err.Error(), - }) - return - } - - existingRule.Spec = rule - - // update the rule - updatedRule, err := kube.DefaultClient.OdigosClient.InstrumentationRules(odigosns).Update(c, existingRule, metav1.UpdateOptions{}) - if err != nil { - if apierrors.IsNotFound(err) { - c.JSON(404, gin.H{ - "message": "instrumentation rule not found", - }) - return - } - c.JSON(500, gin.H{ - "message": err.Error(), - }) - return - } - - c.JSON(200, InstrumentationRule{ - InstrumentationRuleSpec: updatedRule.Spec, - RuleId: updatedRule.Name, - }) -} diff --git a/frontend/endpoints/metrics.go b/frontend/endpoints/metrics.go deleted file mode 100644 index 4a5af0d076..0000000000 --- a/frontend/endpoints/metrics.go +++ /dev/null @@ -1,137 +0,0 @@ -package endpoints - -import ( - "fmt" - "net/http" - - "github.com/gin-gonic/gin" - collectormetrics "github.com/odigos-io/odigos/frontend/endpoints/collector_metrics" - "github.com/odigos-io/odigos/frontend/endpoints/common" - "github.com/odigos-io/odigos/k8sutils/pkg/workload" -) - -type singleSourceMetricsResponse struct { - common.SourceID - TotalDataSent int64 `json:"totalDataSent"` - Throughput int64 `json:"throughput"` -} - -func GetSingleSourceMetrics(c *gin.Context, m *collectormetrics.OdigosMetricsConsumer) { - ns := c.Param("namespace") - kind := c.Param("kind") - name := c.Param("name") - - sID := common.SourceID{ - Namespace: ns, - Kind: workload.WorkloadKind(kind), - Name: name, - } - metric, ok := m.GetSingleSourceMetrics(sID) - if !ok { - returnError(c, fmt.Errorf("source not found %v", sID)) - return - } - - c.JSON(http.StatusOK, - singleSourceMetricsResponse{ - SourceID: sID, - TotalDataSent: metric.TotalDataSent(), - Throughput: metric.TotalThroughput(), - }, - ) -} - -type sourcesMetricsResponse struct { - Sources []singleSourceMetricsResponse `json:"sources"` -} - -func GetSourcesMetrics(c *gin.Context, m *collectormetrics.OdigosMetricsConsumer) { - metrics := m.GetSourcesMetrics() - - var sources []singleSourceMetricsResponse - for sID, metric := range metrics { - sources = append(sources, singleSourceMetricsResponse{ - SourceID: sID, - TotalDataSent: metric.TotalDataSent(), - Throughput: metric.TotalThroughput(), - }) - } - - c.JSON(http.StatusOK, sourcesMetricsResponse{Sources: sources}) -} - -type singleDestinationMetricsResponse struct { - ID string `json:"id"` - TotalDataSent int64 `json:"totalDataSent"` - Throughput int64 `json:"throughput"` -} - -func GetSingleDestinationMetrics(c *gin.Context, m *collectormetrics.OdigosMetricsConsumer) { - destId := c.Param("id") - - metric, ok := m.GetSingleDestinationMetrics(destId) - if !ok { - returnError(c, fmt.Errorf("destination not found %v", destId)) - return - } - - c.JSON(http.StatusOK, - singleDestinationMetricsResponse{ - ID: destId, - TotalDataSent: metric.TotalDataSent(), - Throughput: metric.TotalThroughput(), - }, - ) -} - -type destinationsMetricsResponse struct { - Destinations []singleDestinationMetricsResponse `json:"destinations"` -} - -func GetDestinationsMetrics(c *gin.Context, m *collectormetrics.OdigosMetricsConsumer) { - metrics := m.GetDestinationsMetrics() - - var destinations []singleDestinationMetricsResponse - for destId, metric := range metrics { - destinations = append(destinations, singleDestinationMetricsResponse{ - ID: destId, - TotalDataSent: metric.TotalDataSent(), - Throughput: metric.TotalThroughput(), - }) - } - - c.JSON(http.StatusOK, destinationsMetricsResponse{Destinations: destinations}) -} - -type overviewMetricsResponse struct { - sourcesMetricsResponse - destinationsMetricsResponse -} - -func GetOverviewMetrics(c *gin.Context, m *collectormetrics.OdigosMetricsConsumer) { - sources := m.GetSourcesMetrics() - destinations := m.GetDestinationsMetrics() - - var sourcesResp []singleSourceMetricsResponse - for sID, metric := range sources { - sourcesResp = append(sourcesResp, singleSourceMetricsResponse{ - SourceID: sID, - TotalDataSent: metric.TotalDataSent(), - Throughput: metric.TotalThroughput(), - }) - } - - var destinationsResp []singleDestinationMetricsResponse - for destId, metric := range destinations { - destinationsResp = append(destinationsResp, singleDestinationMetricsResponse{ - ID: destId, - TotalDataSent: metric.TotalDataSent(), - Throughput: metric.TotalThroughput(), - }) - } - - c.JSON(http.StatusOK, overviewMetricsResponse{ - sourcesMetricsResponse{Sources: sourcesResp}, - destinationsMetricsResponse{Destinations: destinationsResp}, - }) -} diff --git a/frontend/endpoints/namespaces.go b/frontend/endpoints/namespaces.go deleted file mode 100644 index 9c88632b9d..0000000000 --- a/frontend/endpoints/namespaces.go +++ /dev/null @@ -1,213 +0,0 @@ -package endpoints - -import ( - "context" - "fmt" - "net/http" - - "github.com/odigos-io/odigos/common" - "github.com/odigos-io/odigos/k8sutils/pkg/client" - "sigs.k8s.io/yaml" - - "k8s.io/apimachinery/pkg/runtime/schema" - - "golang.org/x/sync/errgroup" - - "github.com/odigos-io/odigos/common/consts" - "github.com/odigos-io/odigos/common/utils" - - "github.com/odigos-io/odigos/frontend/kube" - v1 "k8s.io/api/core/v1" - metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" - "k8s.io/apimachinery/pkg/types" - - "github.com/gin-gonic/gin" -) - -type GetNamespacesResponse struct { - Namespaces []GetNamespaceItem `json:"namespaces"` -} - -type GetNamespaceItem struct { - Name string `json:"name"` - Selected bool `json:"selected"` - TotalApps int `json:"totalApps"` -} - -func GetNamespaces(c *gin.Context, odigosns string) { - ctx := c.Request.Context() - var ( - relevantNameSpaces []v1.Namespace - appsPerNamespace map[string]int - ) - - g, ctx := errgroup.WithContext(ctx) - g.Go(func() error { - var err error - relevantNameSpaces, err = getRelevantNameSpaces(ctx, odigosns) - return err - }) - - g.Go(func() error { - var err error - appsPerNamespace, err = CountAppsPerNamespace(ctx) - return err - }) - - if err := g.Wait(); err != nil { - returnError(c, err) - return - } - - var response GetNamespacesResponse - for _, namespace := range relevantNameSpaces { - // check if entire namespace is instrumented - selected := namespace.Labels[consts.OdigosInstrumentationLabel] == consts.InstrumentationEnabled - - response.Namespaces = append(response.Namespaces, GetNamespaceItem{ - Name: namespace.Name, - Selected: selected, - TotalApps: appsPerNamespace[namespace.Name], - }) - } - - c.JSON(http.StatusOK, response) -} - -// getRelevantNameSpaces returns a list of namespaces that are relevant for instrumentation. -// Taking into account the ignored namespaces from the OdigosConfiguration. -func getRelevantNameSpaces(ctx context.Context, odigosns string) ([]v1.Namespace, error) { - var ( - odigosConfig *common.OdigosConfiguration - list *v1.NamespaceList - ) - - g, ctx := errgroup.WithContext(ctx) - g.Go(func() error { - var err error - configMap, err := kube.DefaultClient.CoreV1().ConfigMaps(odigosns).Get(ctx, consts.OdigosConfigurationName, metav1.GetOptions{}) - if err != nil { - return err - } - if err := yaml.Unmarshal([]byte(configMap.Data[consts.OdigosConfigurationFileName]), &odigosConfig); err != nil { - return err - } - return err - }) - - g.Go(func() error { - var err error - list, err = kube.DefaultClient.CoreV1().Namespaces().List(ctx, metav1.ListOptions{}) - return err - }) - - if err := g.Wait(); err != nil { - return []v1.Namespace{}, err - } - - result := []v1.Namespace{} - for _, namespace := range list.Items { - if utils.IsItemIgnored(namespace.Name, odigosConfig.IgnoredNamespaces) { - continue - } - - result = append(result, namespace) - } - - return result, nil -} - -type PersistNamespaceItem struct { - Name string `json:"name"` - SelectedAll bool `json:"selected_all"` - FutureSelected *bool `json:"future_selected,omitempty"` - Objects []PersistNamespaceObject `json:"objects"` -} - -type PersistNamespaceObject struct { - Name string `json:"name"` - Kind WorkloadKind `json:"kind"` - Selected *bool `json:"selected,omitempty"` -} - -func PersistNamespaces(c *gin.Context) { - request := make(map[string]PersistNamespaceItem) - if err := c.ShouldBindJSON(&request); err != nil { - returnError(c, err) - return - } - - for nsName, nsItem := range request { - - jsonMergePayload := getJsonMergePatchForInstrumentationLabel(nsItem.FutureSelected) - _, err := kube.DefaultClient.CoreV1().Namespaces().Patch(c.Request.Context(), nsName, types.MergePatchType, jsonMergePayload, metav1.PatchOptions{}) - if err != nil { - returnError(c, err) - return - } - - err = syncWorkloadsInNamespace(c.Request.Context(), nsName, nsItem.Objects) - if err != nil { - returnError(c, err) - return - } - } -} - -func getJsonMergePatchForInstrumentationLabel(enabled *bool) []byte { - labelJsonMergePatchValue := "null" - if enabled != nil { - if *enabled { - labelJsonMergePatchValue = fmt.Sprintf("\"%s\"", consts.InstrumentationEnabled) - } else { - labelJsonMergePatchValue = fmt.Sprintf("\"%s\"", consts.InstrumentationDisabled) - } - } - - jsonMergePatchContent := fmt.Sprintf(`{"metadata":{"labels":{"%s":%s}}}`, consts.OdigosInstrumentationLabel, labelJsonMergePatchValue) - return []byte(jsonMergePatchContent) -} - -func syncWorkloadsInNamespace(ctx context.Context, nsName string, workloads []PersistNamespaceObject) error { - g, ctx := errgroup.WithContext(ctx) - g.SetLimit(kube.K8sClientDefaultBurst) - - for _, workload := range workloads { - currWorkload := workload - g.Go(func() error { - // Only label selected sources, ignore the rest - if currWorkload.Selected != nil && *currWorkload.Selected { - return setWorkloadInstrumentationLabel(ctx, nsName, currWorkload.Name, currWorkload.Kind, currWorkload.Selected) - } - return nil - }) - } - return g.Wait() -} - -// returns a map, where the key is a namespace name and the value is the -// number of apps in this namespace (not necessarily instrumented) -func CountAppsPerNamespace(ctx context.Context) (map[string]int, error) { - namespaceToAppsCount := make(map[string]int) - - resourceTypes := []string{"deployments", "statefulsets", "daemonsets"} - - for _, resourceType := range resourceTypes { - err := client.ListWithPages(client.DefaultPageSize, kube.DefaultClient.MetadataClient.Resource(schema.GroupVersionResource{ - Group: "apps", - Version: "v1", - Resource: resourceType, - }).List, ctx, metav1.ListOptions{}, func(list *metav1.PartialObjectMetadataList) error { - for _, item := range list.Items { - namespaceToAppsCount[item.Namespace]++ - } - return nil - }) - - if err != nil { - return nil, fmt.Errorf("failed to count %s: %w", resourceType, err) - } - } - - return namespaceToAppsCount, nil -} diff --git a/frontend/endpoints/sources.go b/frontend/endpoints/sources.go deleted file mode 100644 index b0040dcc8f..0000000000 --- a/frontend/endpoints/sources.go +++ /dev/null @@ -1,472 +0,0 @@ -package endpoints - -import ( - "context" - "fmt" - "time" - - "github.com/gin-gonic/gin" - "github.com/odigos-io/odigos/api/odigos/v1alpha1" - odigoscommon "github.com/odigos-io/odigos/common" - "github.com/odigos-io/odigos/common/consts" - "github.com/odigos-io/odigos/frontend/endpoints/common" - "github.com/odigos-io/odigos/frontend/kube" - "github.com/odigos-io/odigos/k8sutils/pkg/workload" - "golang.org/x/sync/errgroup" - apierrors "k8s.io/apimachinery/pkg/api/errors" - metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" -) - -type SourceLanguage struct { - ContainerName string `json:"container_name"` - Language string `json:"language"` - RuntimeVersion string `json:"runtime_version,omitempty"` - OtherAgent *v1alpha1.OtherAgent `json:"other_agent,omitempty"` -} - -type InstrumentedApplicationDetails struct { - Languages []SourceLanguage `json:"languages,omitempty"` - Conditions []metav1.Condition `json:"conditions,omitempty"` -} - -// this object contains only part of the source fields. It is used to display the sources in the frontend -type ThinSource struct { - common.SourceID - NumberOfRunningInstances int `json:"number_of_running_instances"` - IaDetails *InstrumentedApplicationDetails `json:"instrumented_application_details"` -} - -type Source struct { - ThinSource - ReportedName string `json:"reported_name,omitempty"` - InstrumentationConfig []v1alpha1.WorkloadInstrumentationConfig `json:"instrumentation_config,omitempty"` -} - -type PatchSourceRequest struct { - ReportedName *string `json:"reported_name"` - InstrumentationConfig []v1alpha1.WorkloadInstrumentationConfig `json:"instrumentation_config,omitempty"` -} - -func GetSources(c *gin.Context, odigosns string) { - reqCtx := c.Request.Context() - effectiveInstrumentedSources := map[common.SourceID]ThinSource{} - - var ( - items []GetApplicationItem - instrumentedApplications *v1alpha1.InstrumentationConfigList - ) - - g, errCtx := errgroup.WithContext(reqCtx) - g.Go(func() error { - relevantNamespaces, err := getRelevantNameSpaces(errCtx, odigosns) - if err != nil { - return err - } - nsInstrumentedMap := map[string]*bool{} - for _, ns := range relevantNamespaces { - nsInstrumentedMap[ns.Name] = isObjectLabeledForInstrumentation(ns.ObjectMeta) - } - // get all the applications in all the namespaces, - // passing an empty string here is more efficient compared to iterating over the namespaces - // since it will make a single request per workload type to the k8s api server - items, err = getApplicationsInNamespace(errCtx, "", nsInstrumentedMap) - return err - }) - - g.Go(func() error { - var err error - instrumentedApplications, err = kube.DefaultClient.OdigosClient.InstrumentationConfigs("").List(errCtx, metav1.ListOptions{}) - return err - }) - - if err := g.Wait(); err != nil { - returnError(c, err) - return - } - - for _, item := range items { - if item.nsItem.InstrumentationEffective { - id := common.SourceID{Namespace: item.namespace, Kind: workload.WorkloadKind(item.nsItem.Kind), Name: item.nsItem.Name} - effectiveInstrumentedSources[id] = ThinSource{ - NumberOfRunningInstances: item.nsItem.Instances, - SourceID: id, - } - } - } - - sourcesResult := []ThinSource{} - // go over the instrumented applications and update the languages of the effective sources. - // Not all effective sources necessarily have a corresponding instrumented application, - // it may take some time for the instrumented application to be created. In that case the languages - // slice will be empty. - for _, app := range instrumentedApplications.Items { - thinSource := k8sInstrumentedAppToThinSource(&app) - if source, ok := effectiveInstrumentedSources[thinSource.SourceID]; ok { - source.IaDetails = thinSource.IaDetails - err := addHealthyInstrumentationInstancesCondition(reqCtx, &app, &source) - if err != nil { - returnError(c, err) - return - } - effectiveInstrumentedSources[thinSource.SourceID] = source - } - } - - for _, source := range effectiveInstrumentedSources { - sourcesResult = append(sourcesResult, source) - } - - c.JSON(200, sourcesResult) -} - -func GetSource(c *gin.Context) { - ns := c.Param("namespace") - kind := c.Param("kind") - name := c.Param("name") - k8sObjectName := workload.CalculateWorkloadRuntimeObjectName(name, kind) - - owner, numberOfRunningInstances := getWorkloadObject(c, ns, kind, name) - if owner == nil { - c.JSON(500, gin.H{ - "message": "could not find owner of instrumented application", - }) - return - } - ownerAnnotations := owner.GetAnnotations() - var reportedName string - if ownerAnnotations != nil { - reportedName = ownerAnnotations[consts.OdigosReportedNameAnnotation] - } - - ts := ThinSource{ - SourceID: common.SourceID{ - Namespace: ns, - Kind: workload.WorkloadKind(kind), - Name: name, - }, - NumberOfRunningInstances: numberOfRunningInstances, - } - - instrumentedApplication, err := kube.DefaultClient.OdigosClient.InstrumentationConfigs(ns).Get(c, k8sObjectName, metav1.GetOptions{}) - - if err == nil { - // valid instrumented application, grab the runtime details - ts.IaDetails = k8sInstrumentedAppToThinSource(instrumentedApplication).IaDetails - // potentially add a condition for healthy instrumentation instances - err = addHealthyInstrumentationInstancesCondition(c, instrumentedApplication, &ts) - if err != nil { - returnError(c, err) - return - } - } - - instrumentationConfig, err := kube.DefaultClient.OdigosClient.InstrumentationConfigs(ns).Get(context.Background(), instrumentedApplication.Name, metav1.GetOptions{}) - if err != nil { - if !apierrors.IsNotFound(err) { - returnError(c, err) - return - } - } - - c.JSON(200, Source{ - ThinSource: ts, - InstrumentationConfig: instrumentationConfig.Spec.Config, - ReportedName: reportedName, - }) -} - -func PatchSource(c *gin.Context) { - ns := c.Param("namespace") - kind := c.Param("kind") - name := c.Param("name") - - request := PatchSourceRequest{} - if err := c.ShouldBindJSON(&request); err != nil { - returnError(c, err) - return - } - - tier, err := GetCurrentOdigosTier(c.Request.Context(), kube.DefaultClient, consts.DefaultOdigosNamespace) - if err != nil { - returnError(c, err) - return - } - - if request.ReportedName != nil { - - newReportedName := *request.ReportedName - - switch kind { - case "Deployment": - deployment, err := kube.DefaultClient.AppsV1().Deployments(ns).Get(c, name, metav1.GetOptions{}) - if err != nil { - c.JSON(404, gin.H{"error": "could not find a deployment with the given name in the given namespace"}) - return - } - deployment.SetAnnotations(updateReportedName(deployment.GetAnnotations(), newReportedName)) - _, err = kube.DefaultClient.AppsV1().Deployments(ns).Update(c, deployment, metav1.UpdateOptions{}) - if err != nil { - returnError(c, err) - return - } - case "StatefulSet": - statefulset, err := kube.DefaultClient.AppsV1().StatefulSets(ns).Get(c, name, metav1.GetOptions{}) - if err != nil { - c.JSON(404, gin.H{"error": "could not find a statefulset with the given name in the given namespace"}) - return - } - statefulset.SetAnnotations(updateReportedName(statefulset.GetAnnotations(), newReportedName)) - _, err = kube.DefaultClient.AppsV1().StatefulSets(ns).Update(c, statefulset, metav1.UpdateOptions{}) - if err != nil { - returnError(c, err) - return - } - case "DaemonSet": - daemonset, err := kube.DefaultClient.AppsV1().DaemonSets(ns).Get(c, name, metav1.GetOptions{}) - if err != nil { - c.JSON(404, gin.H{"error": "could not find a daemonset with the given name in the given namespace"}) - return - } - daemonset.SetAnnotations(updateReportedName(daemonset.GetAnnotations(), newReportedName)) - _, err = kube.DefaultClient.AppsV1().DaemonSets(ns).Update(c, daemonset, metav1.UpdateOptions{}) - if err != nil { - returnError(c, err) - return - } - default: - c.JSON(400, gin.H{"error": "kind must be one of Deployment, StatefulSet or DaemonSet"}) - return - } - } - - // Run instrumentation config logic only if the tier is "onprem" - if tier == odigoscommon.OnPremOdigosTier && request.InstrumentationConfig != nil { - if err := handleInstrumentationConfigRequest(c, ns, kind, name, request.InstrumentationConfig); err != nil { - returnError(c, err) - return - } - } - - c.Status(200) -} - -func DeleteSource(c *gin.Context) { - // to delete a source, we need to set it's instrumentation label to disable - // afterwards, odigos will detect the change and remove the instrumented application object from k8s - - ns := c.Param("namespace") - kind := c.Param("kind") - name := c.Param("name") - - var kindAsEnum WorkloadKind - switch kind { - case "Deployment": - kindAsEnum = WorkloadKindDeployment - case "StatefulSet": - kindAsEnum = WorkloadKindStatefulSet - case "DaemonSet": - kindAsEnum = WorkloadKindDaemonSet - default: - c.JSON(400, gin.H{"error": "kind must be one of Deployment, StatefulSet or DaemonSet"}) - return - } - - // Fetch the existing InstrumentationConfig - k8sObjectName := workload.CalculateWorkloadRuntimeObjectName(name, kind) - instrumentationConfig, err := kube.DefaultClient.OdigosClient.InstrumentationConfigs(ns).Get(context.Background(), k8sObjectName, metav1.GetOptions{}) - if err != nil && !apierrors.IsNotFound(err) { - returnError(c, err) - return - } - - // Reset the InstrumentationConfig if it exists - if err == nil { - instrumentationConfig.Spec.Config = []v1alpha1.WorkloadInstrumentationConfig{} - _, err = kube.DefaultClient.OdigosClient.InstrumentationConfigs(ns).Update(c.Request.Context(), instrumentationConfig, metav1.UpdateOptions{}) - if err != nil { - returnError(c, err) - return - } - } - - instrumented := false - err = setWorkloadInstrumentationLabel(c, ns, name, kindAsEnum, &instrumented) - if err != nil { - returnError(c, err) - return - } - - c.JSON(200, gin.H{"message": "ok"}) -} - -func handleInstrumentationConfigRequest(c *gin.Context, ns, kind, name string, configs []v1alpha1.WorkloadInstrumentationConfig) error { - k8sObjectName := workload.CalculateWorkloadRuntimeObjectName(name, kind) - - instrumentationConfigResource, err := kube.DefaultClient.OdigosClient.InstrumentationConfigs(ns).Get(c.Request.Context(), k8sObjectName, metav1.GetOptions{}) - if err != nil && !apierrors.IsNotFound(err) { - return err - } - - shouldInsert := apierrors.IsNotFound(err) - - workloadOwner, _ := getWorkloadObject(c, ns, kind, name) - - var workloadConfigs []v1alpha1.WorkloadInstrumentationConfig - for _, config := range configs { - workloadConfig := v1alpha1.WorkloadInstrumentationConfig{ - OptionKey: config.OptionKey, - OptionValueBoolean: config.OptionValueBoolean, - SpanKind: config.SpanKind, - InstrumentationLibraries: config.InstrumentationLibraries, - } - workloadConfigs = append(workloadConfigs, workloadConfig) - } - - newConfig := v1alpha1.InstrumentationConfig{ - ObjectMeta: metav1.ObjectMeta{ - Name: k8sObjectName, - Namespace: ns, - OwnerReferences: []metav1.OwnerReference{ - { - APIVersion: "apps/v1", - Kind: kind, - Name: k8sObjectName, - UID: workloadOwner.GetUID(), - }, - }, - }, - Spec: v1alpha1.InstrumentationConfigSpec{ - Config: workloadConfigs, - }, - } - - if !shouldInsert { - newConfig.ResourceVersion = instrumentationConfigResource.ResourceVersion - } - - if shouldInsert { - _, err = kube.DefaultClient.OdigosClient.InstrumentationConfigs(ns).Create(c.Request.Context(), &newConfig, metav1.CreateOptions{}) - } else { - _, err = kube.DefaultClient.OdigosClient.InstrumentationConfigs(ns).Update(c.Request.Context(), &newConfig, metav1.UpdateOptions{}) - } - - return err -} - -func k8sInstrumentedAppToThinSource(app *v1alpha1.InstrumentationConfig) ThinSource { - var source ThinSource - source.Name = app.OwnerReferences[0].Name - source.Kind = workload.WorkloadKind(app.OwnerReferences[0].Kind) - source.Namespace = app.Namespace - var conditions []metav1.Condition - for _, condition := range app.Status.Conditions { - conditions = append(conditions, metav1.Condition{ - Type: condition.Type, - Status: condition.Status, - Message: condition.Message, - LastTransitionTime: condition.LastTransitionTime, - }) - } - - source.IaDetails = &InstrumentedApplicationDetails{ - Languages: []SourceLanguage{}, - Conditions: conditions, - } - - for _, language := range app.Status.RuntimeDetailsByContainer { - sourceLanguage := SourceLanguage{ - ContainerName: language.ContainerName, - Language: string(language.Language), - RuntimeVersion: language.RuntimeVersion, - OtherAgent: language.OtherAgent, - } - - source.IaDetails.Languages = append(source.IaDetails.Languages, sourceLanguage) - } - return source -} - -func addHealthyInstrumentationInstancesCondition(ctx context.Context, instConfig *v1alpha1.InstrumentationConfig, source *ThinSource) error { - labelSelector := fmt.Sprintf("%s=%s", consts.InstrumentedAppNameLabel, instConfig.Name) - instancesList, err := kube.DefaultClient.OdigosClient.InstrumentationInstances(instConfig.Namespace).List(ctx, metav1.ListOptions{ - LabelSelector: labelSelector, - }) - - if err != nil { - return err - } - - totalInstances := len(instancesList.Items) - if totalInstances == 0 { - // no instances so nothing to report - return nil - } - - healthyInstances := 0 - latestStatusTime := metav1.NewTime(time.Time{}) - for _, instance := range instancesList.Items { - if instance.Status.Healthy != nil && *instance.Status.Healthy { - healthyInstances++ - } - if instance.Status.LastStatusTime.After(latestStatusTime.Time) { - latestStatusTime = instance.Status.LastStatusTime - } - } - - status := metav1.ConditionTrue - if healthyInstances < totalInstances { - status = metav1.ConditionFalse - } - - source.IaDetails.Conditions = append(source.IaDetails.Conditions, metav1.Condition{ - Type: "HealthyInstrumentationInstances", - Status: status, - LastTransitionTime: latestStatusTime, - Message: fmt.Sprintf("%d/%d instances are healthy", healthyInstances, totalInstances), - }) - - return nil -} - -func getWorkloadObject(c *gin.Context, ns string, kind string, name string) (metav1.Object, int) { - switch kind { - case "Deployment": - deployment, err := kube.DefaultClient.AppsV1().Deployments(ns).Get(c, name, metav1.GetOptions{}) - if err != nil { - return nil, 0 - } - return deployment, int(deployment.Status.AvailableReplicas) - case "StatefulSet": - statefulSet, err := kube.DefaultClient.AppsV1().StatefulSets(ns).Get(c, name, metav1.GetOptions{}) - if err != nil { - return nil, 0 - } - return statefulSet, int(statefulSet.Status.ReadyReplicas) - case "DaemonSet": - daemonSet, err := kube.DefaultClient.AppsV1().DaemonSets(ns).Get(c, name, metav1.GetOptions{}) - if err != nil { - return nil, 0 - } - return daemonSet, int(daemonSet.Status.NumberReady) - default: - return nil, 0 - } -} - -func updateReportedName(annotations map[string]string, reportedName string) map[string]string { - if reportedName == "" { - // delete the reported name if it is empty, so we pick up the name from the k8s object - if annotations == nil { - return nil - } else { - delete(annotations, consts.OdigosReportedNameAnnotation) - return annotations - } - } else { - if annotations == nil { - annotations = make(map[string]string) - } - annotations[consts.OdigosReportedNameAnnotation] = reportedName - return annotations - } -} diff --git a/frontend/endpoints/test_connection/otlp_test_connection.go b/frontend/endpoints/test_connection/otlp_test_connection.go deleted file mode 100644 index 6a137e31b7..0000000000 --- a/frontend/endpoints/test_connection/otlp_test_connection.go +++ /dev/null @@ -1,37 +0,0 @@ -package testconnection - -import ( - "go.opentelemetry.io/collector/component" - "go.opentelemetry.io/collector/exporter" - - "go.opentelemetry.io/collector/exporter/otlpexporter" -) - -var _ ExporterConnectionTester = &otlpExporterConnectionTester{} - -type otlpExporterConnectionTester struct { - f exporter.Factory -} - -func NewOTLPTester() *otlpExporterConnectionTester { - return &otlpExporterConnectionTester{ - f: otlpexporter.NewFactory(), - } -} - -func (t *otlpExporterConnectionTester) Factory() exporter.Factory { - return t.f -} - -func (t *otlpExporterConnectionTester) ModifyConfigForConnectionTest(cfg component.Config) component.Config { - otlpConf, ok := cfg.(*otlpexporter.Config) - if !ok { - return nil - } - - // currently using the default timeout config of the collector - 5 seconds - // Avoid batching and retries - otlpConf.QueueConfig.Enabled = false - otlpConf.RetryConfig.Enabled = false - return otlpConf -} diff --git a/frontend/endpoints/test_connection/otlphttp_test_connection.go b/frontend/endpoints/test_connection/otlphttp_test_connection.go deleted file mode 100644 index 42c12c166e..0000000000 --- a/frontend/endpoints/test_connection/otlphttp_test_connection.go +++ /dev/null @@ -1,36 +0,0 @@ -package testconnection - -import ( - "go.opentelemetry.io/collector/component" - "go.opentelemetry.io/collector/exporter" - "go.opentelemetry.io/collector/exporter/otlphttpexporter" -) - -var _ ExporterConnectionTester = &otlphttpExporterConnectionTester{} - -type otlphttpExporterConnectionTester struct { - f exporter.Factory -} - -func NewOTLPHTTPTester() *otlphttpExporterConnectionTester { - return &otlphttpExporterConnectionTester{ - f: otlphttpexporter.NewFactory(), - } -} - -func (t *otlphttpExporterConnectionTester) Factory() exporter.Factory { - return t.f -} - -func (t *otlphttpExporterConnectionTester) ModifyConfigForConnectionTest(cfg component.Config) component.Config { - otlpConf, ok := cfg.(*otlphttpexporter.Config) - if !ok { - return nil - } - - // currently using the default timeout config of the collector - 5 seconds - // Avoid batching and retries - otlpConf.QueueConfig.Enabled = false - otlpConf.RetryConfig.Enabled = false - return otlpConf -} diff --git a/frontend/endpoints/test_connection/test_connection.go b/frontend/endpoints/test_connection/test_connection.go deleted file mode 100644 index 6c078f29a9..0000000000 --- a/frontend/endpoints/test_connection/test_connection.go +++ /dev/null @@ -1,157 +0,0 @@ -package testconnection - -import ( - "context" - "fmt" - "net/http" - "strings" - - "github.com/odigos-io/odigos/common" - "github.com/odigos-io/odigos/common/config" - - "go.opentelemetry.io/collector/component" - "go.opentelemetry.io/collector/confmap" - "go.opentelemetry.io/collector/exporter" - "go.opentelemetry.io/collector/exporter/exportertest" - "go.opentelemetry.io/collector/pdata/ptrace" -) - -var ( - configres map[common.DestinationType]config.Configer - connectionTesters = []ExporterConnectionTester{ - NewOTLPTester(), // "otlp/" prefix - NewOTLPHTTPTester(), // "otlphttp/" prefix - } -) - -func init() { - var err error - configres, err = config.LoadConfigers() - if err != nil { - panic(1) - } -} - -type TestConnectionErrorReason string - -const ( - UnKnownDestination TestConnectionErrorReason = "unknown destination" - InvalidConfig TestConnectionErrorReason = "invalid config" - UnsupportedExporterType TestConnectionErrorReason = "unsupported exporter type" - FailedToConnect TestConnectionErrorReason = "failed to connect" -) - -type TestConnectionResult struct { - Succeeded bool - Message string - Reason TestConnectionErrorReason - StatusCode int - DestinationType common.DestinationType -} - -type ExporterConnectionTester interface { - // Factory returns the exporter factory for the exporter type. - // This is used to create the exporter instance for testing the connection. - Factory() exporter.Factory - // ModifyConfigForConnectionTest modifies the exporter configuration for testing the connection. - // Since the default configuration may have batching, retries, etc. which may not be suitable for testing the connection. - ModifyConfigForConnectionTest(component.Config) component.Config -} - -func getConnectionTester(exporterID string) ExporterConnectionTester { - for _, tester := range connectionTesters { - prefix := fmt.Sprintf("%s/", tester.Factory().Type().String()) - if strings.HasPrefix(exporterID, prefix) { - return tester - } - } - return nil -} - -func TestConnection(ctx context.Context, dest config.ExporterConfigurer) TestConnectionResult { - destType := dest.GetType() - configer, ok := configres[destType] - if !ok { - return TestConnectionResult{Succeeded: false, Reason: UnKnownDestination, DestinationType: destType, StatusCode: http.StatusNotImplemented} - } - - currentConfig := config.Config{ - Exporters: make(config.GenericMap), - Service: config.Service{ - Pipelines: make(map[string]config.Pipeline), - }, - } - err := configer.ModifyConfig(dest, ¤tConfig) - if err != nil { - return TestConnectionResult{Succeeded: false, Message: err.Error(), Reason: InvalidConfig, DestinationType: destType, StatusCode: http.StatusInternalServerError} - } - - exporters := currentConfig.Exporters - if len(exporters) == 0 { - return TestConnectionResult{Message: "no exporters found in config", Reason: InvalidConfig, DestinationType: destType, StatusCode: http.StatusInternalServerError, Succeeded: false} - } - - var exporterRawConfig config.GenericMap - var connectionTester ExporterConnectionTester - foundTester := false - for componentID, cfg := range exporters { - gm, ok := cfg.(config.GenericMap) - if !ok { - continue - } - ct := getConnectionTester(componentID) - if ct != nil { - connectionTester = ct - foundTester = true - exporterRawConfig = gm - break - } - } - - if !foundTester { - return TestConnectionResult{Succeeded: false, Message: "no supported exporter found in config", Reason: UnsupportedExporterType, DestinationType: destType, StatusCode: http.StatusNotFound} - } - - // before testing the connection, replace placeholders (if exists) in the config with actual values - replacePlaceholders(exporterRawConfig, dest.GetConfig()) - defaultConfig := connectionTester.Factory().CreateDefaultConfig() - connectionTester.ModifyConfigForConnectionTest(defaultConfig) - - // convert the user provided fields to a collector config - exportersConf := confmap.NewFromStringMap(exporterRawConfig) - if exportersConf == nil { - return TestConnectionResult{Succeeded: false, Message: "failed to create exporter config", Reason: InvalidConfig, DestinationType: destType, StatusCode: http.StatusInternalServerError} - } - - // unmarshal the user provided configuration into the default one, merging them - err = exportersConf.Unmarshal(&defaultConfig) - if err != nil { - return TestConnectionResult{Succeeded: false, Message: err.Error(), Reason: InvalidConfig, DestinationType: destType, StatusCode: http.StatusInternalServerError} - } - - if validator, ok := defaultConfig.(component.ConfigValidator); ok { - // if the component has a Validate method, call it to validate the configuration - err = validator.Validate() - if err != nil { - return TestConnectionResult{Succeeded: false, Message: err.Error(), Reason: InvalidConfig, DestinationType: destType, StatusCode: http.StatusInternalServerError} - } - } - - exporter, err := connectionTester.Factory().CreateTracesExporter(ctx, exportertest.NewNopSettings(), defaultConfig) - if err != nil { - return TestConnectionResult{Succeeded: false, Message: err.Error(), Reason: InvalidConfig, DestinationType: destType, StatusCode: http.StatusInternalServerError} - } - - err = exporter.Start(ctx, nil) - if err != nil { - return TestConnectionResult{Succeeded: false, Message: err.Error(), Reason: FailedToConnect, DestinationType: destType, StatusCode: http.StatusInternalServerError} - } - - defer exporter.Shutdown(ctx) - err = exporter.ConsumeTraces(ctx, ptrace.NewTraces()) - if err != nil { - return TestConnectionResult{Succeeded: false, Message: err.Error(), Reason: FailedToConnect, DestinationType: destType, StatusCode: http.StatusInternalServerError} - } - - return TestConnectionResult{Succeeded: true, DestinationType: destType, StatusCode: http.StatusOK} -} diff --git a/frontend/endpoints/test_connection/utils.go b/frontend/endpoints/test_connection/utils.go deleted file mode 100644 index aca6708997..0000000000 --- a/frontend/endpoints/test_connection/utils.go +++ /dev/null @@ -1,43 +0,0 @@ -package testconnection - -import ( - "regexp" - "strings" - - "github.com/odigos-io/odigos/common/config" -) - -// replacePlaceholders replaces placeholder values in the given GenericMap with values from the fields map. -// It traverses the GenericMap recursively and processes each string value as a template. -// If a string value contains placeholders in the format {KEY}, it replaces them with corresponding values from the fields map. -// The function supports nested GenericMaps and map[string]interface{} structures. -func replacePlaceholders(gmap config.GenericMap, fields map[string]string) { - // Regular expression to match the ${KEY} pattern - re := regexp.MustCompile(`\$\{([^}]+)\}`) - - for key, value := range gmap { - switch v := value.(type) { - case string: - // Find all matches of the pattern ${KEY} - matches := re.FindAllStringSubmatch(v, -1) - for _, match := range matches { - if len(match) == 2 { - // match[0] is the entire match (${KEY}), match[1] is the key (KEY) - extractedKey := match[1] - if replacement, ok := fields[extractedKey]; ok { - // Replace only the ${KEY} part in the original string - v = strings.Replace(v, match[0], replacement, -1) - // Update the map with the new value - gmap[key] = v - } - } - } - case config.GenericMap: - replacePlaceholders(v, fields) - case map[string]interface{}: - replacePlaceholders(v, fields) - default: - // If the value is not a string or a map, we leave it as it is - } - } -} \ No newline at end of file diff --git a/frontend/endpoints/test_connection/utils_test.go b/frontend/endpoints/test_connection/utils_test.go deleted file mode 100644 index 48787fc9c5..0000000000 --- a/frontend/endpoints/test_connection/utils_test.go +++ /dev/null @@ -1,56 +0,0 @@ -package testconnection - -import ( - "testing" - - "github.com/odigos-io/odigos/common/config" - "github.com/stretchr/testify/assert" -) - -func TestReplacePlaceholders(t *testing.T) { - // Fields map with replacements - fields := map[string]string{ - "MY_KEY1": "MY_VALUE1", - "MY_KEY2": "MY_VALUE2", - } - - gmap := config.GenericMap{ - "key1": "${MY_KEY1}", - "key2": 123, - "key3": config.GenericMap{ - "nestedKey1": "${MY_KEY2}", // replaced with MY_VALUE2 - "nestedKey2": "someValue", // no replacement - "nestedKey3": "${MY_KEY3}", // no replacement - "nestedKey4": "some prefix: ${MY_KEY2}", // replaced with "some prefix: MY_VALUE2" - }, - } - - replacePlaceholders(gmap, fields) - assert.Equal(t, "MY_VALUE1", gmap["key1"]) - assert.Equal(t, config.GenericMap{ - "nestedKey1": "MY_VALUE2", - "nestedKey2": "someValue", - "nestedKey3": "${MY_KEY3}", - "nestedKey4": "some prefix: MY_VALUE2", - }, gmap["key3"]) - assert.Equal(t, 123, gmap["key2"]) - - // don't change the original map if no placeholders are found - gmap = config.GenericMap{ - "key1": "value1", - "key2": 123, - "key3": config.GenericMap{ - "nestedKey1": "value2", - "nestedKey2": "someValue", - }, - } - - replacePlaceholders(gmap, fields) - assert.Equal(t, "value1", gmap["key1"]) - assert.Equal(t, config.GenericMap{ - "nestedKey1": "value2", - "nestedKey2": "someValue", - }, gmap["key3"]) - assert.Equal(t, 123, gmap["key2"]) - -} \ No newline at end of file diff --git a/frontend/endpoints/utils.go b/frontend/endpoints/utils.go deleted file mode 100644 index 59a78ffbea..0000000000 --- a/frontend/endpoints/utils.go +++ /dev/null @@ -1,97 +0,0 @@ -package endpoints - -import ( - "context" - "errors" - "path" - - "github.com/odigos-io/odigos/common" - "github.com/odigos-io/odigos/common/consts" - "github.com/odigos-io/odigos/frontend/kube" - corev1 "k8s.io/api/core/v1" - apierrors "k8s.io/apimachinery/pkg/api/errors" - metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" - "k8s.io/apimachinery/pkg/types" -) - -const cdnUrl = "https://d15jtxgb40qetw.cloudfront.net" -const ( - odigosProSecretName = "odigos-pro" - odigosCloudTokenEnvName = "ODIGOS_CLOUD_TOKEN" - odigosCloudApiKeySecretKey = "odigos-cloud-api-key" - odigosOnpremTokenEnvName = "ODIGOS_ONPREM_TOKEN" - odigosOnpremTokenSecretKey = "odigos-onprem-token" -) - -func GetImageURL(image string) string { - return path.Join(cdnUrl, image) -} - -func setWorkloadInstrumentationLabel(ctx context.Context, nsName string, workloadName string, workloadKind WorkloadKind, enabled *bool) error { - jsonMergePatchData := getJsonMergePatchForInstrumentationLabel(enabled) - - switch workloadKind { - case WorkloadKindDeployment: - _, err := kube.DefaultClient.AppsV1().Deployments(nsName).Patch(ctx, workloadName, types.MergePatchType, jsonMergePatchData, metav1.PatchOptions{}) - return err - case WorkloadKindStatefulSet: - _, err := kube.DefaultClient.AppsV1().StatefulSets(nsName).Patch(ctx, workloadName, types.MergePatchType, jsonMergePatchData, metav1.PatchOptions{}) - return err - case WorkloadKindDaemonSet: - _, err := kube.DefaultClient.AppsV1().DaemonSets(nsName).Patch(ctx, workloadName, types.MergePatchType, jsonMergePatchData, metav1.PatchOptions{}) - return err - default: - return errors.New("unsupported workload kind " + string(workloadKind)) - } -} - -// getNsInstrumentedLabel return the instrumentation label of the object. -// if the object is not labeled, it returns nil -func isObjectLabeledForInstrumentation(metav metav1.ObjectMeta) *bool { - labels := metav.GetLabels() - if labels == nil { - return nil - } - namespaceInstrumented, found := labels[consts.OdigosInstrumentationLabel] - var nsInstrumentationLabeled *bool - if found { - instrumentationLabel := namespaceInstrumented == consts.InstrumentationEnabled - nsInstrumentationLabeled = &instrumentationLabel - } - return nsInstrumentationLabeled -} - -func GetCurrentOdigosTier(ctx context.Context, client *kube.Client, ns string) (common.OdigosTier, error) { - sec, err := getCurrentOdigosProSecret(ctx, client, ns) - if err != nil { - return "", err - } - if sec == nil { - return common.CommunityOdigosTier, nil - } - - if _, exists := sec.Data[odigosCloudApiKeySecretKey]; exists { - return common.CloudOdigosTier, nil - } - if _, exists := sec.Data[odigosOnpremTokenSecretKey]; exists { - return common.OnPremOdigosTier, nil - } - return common.CommunityOdigosTier, nil -} - -func getCurrentOdigosProSecret(ctx context.Context, client *kube.Client, ns string) (*corev1.Secret, error) { - secret, err := client.CoreV1().Secrets(ns).Get(ctx, odigosProSecretName, metav1.GetOptions{}) - if apierrors.IsNotFound(err) { - return nil, nil - } - if err != nil { - return nil, err - } - - // apparently, k8s is not setting the type meta for the object obtained with Get. - secret.TypeMeta = metav1.TypeMeta{ - Kind: "Secret", - APIVersion: "v1", - } - return secret, err -} diff --git a/frontend/graph/resolver.go b/frontend/graph/resolver.go index 9521df8e20..6e4fa9b1a1 100644 --- a/frontend/graph/resolver.go +++ b/frontend/graph/resolver.go @@ -1,7 +1,7 @@ package graph import ( - collectormetrics "github.com/odigos-io/odigos/frontend/endpoints/collector_metrics" + collectormetrics "github.com/odigos-io/odigos/frontend/services/collector_metrics" ) // This file will not be regenerated automatically. diff --git a/frontend/kube/watchers/batcher.go b/frontend/kube/watchers/batcher.go index 18e4dac039..ec3a10a768 100644 --- a/frontend/kube/watchers/batcher.go +++ b/frontend/kube/watchers/batcher.go @@ -7,7 +7,7 @@ import ( "sync/atomic" "time" - "github.com/odigos-io/odigos/frontend/endpoints/sse" + "github.com/odigos-io/odigos/frontend/services/sse" ) var ( diff --git a/frontend/kube/watchers/common.go b/frontend/kube/watchers/common.go index ebc70c4cde..d9462af414 100644 --- a/frontend/kube/watchers/common.go +++ b/frontend/kube/watchers/common.go @@ -1,7 +1,7 @@ package watchers import ( - "github.com/odigos-io/odigos/frontend/endpoints/sse" + "github.com/odigos-io/odigos/frontend/services/sse" ) func genericErrorMessage(event sse.MessageEvent, crd string, data string) { diff --git a/frontend/kube/watchers/destination_watcher.go b/frontend/kube/watchers/destination_watcher.go index 6e22ba84b6..bf42da35e0 100644 --- a/frontend/kube/watchers/destination_watcher.go +++ b/frontend/kube/watchers/destination_watcher.go @@ -7,8 +7,8 @@ import ( "github.com/odigos-io/odigos/api/odigos/v1alpha1" "github.com/odigos-io/odigos/common/consts" - "github.com/odigos-io/odigos/frontend/endpoints/sse" "github.com/odigos-io/odigos/frontend/kube" + "github.com/odigos-io/odigos/frontend/services/sse" metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" "k8s.io/apimachinery/pkg/watch" ) diff --git a/frontend/kube/watchers/instrumentation_config_watcher.go b/frontend/kube/watchers/instrumentation_config_watcher.go index e6a54a150d..f3378f6be1 100644 --- a/frontend/kube/watchers/instrumentation_config_watcher.go +++ b/frontend/kube/watchers/instrumentation_config_watcher.go @@ -7,8 +7,8 @@ import ( "github.com/odigos-io/odigos/api/odigos/v1alpha1" "github.com/odigos-io/odigos/common/consts" - "github.com/odigos-io/odigos/frontend/endpoints/sse" "github.com/odigos-io/odigos/frontend/kube" + "github.com/odigos-io/odigos/frontend/services/sse" commonutils "github.com/odigos-io/odigos/k8sutils/pkg/workload" metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" "k8s.io/apimachinery/pkg/watch" diff --git a/frontend/kube/watchers/instrumentation_instance_watcher.go b/frontend/kube/watchers/instrumentation_instance_watcher.go index f4df83504d..f3e8e2d549 100644 --- a/frontend/kube/watchers/instrumentation_instance_watcher.go +++ b/frontend/kube/watchers/instrumentation_instance_watcher.go @@ -7,8 +7,8 @@ import ( "github.com/odigos-io/odigos/api/odigos/v1alpha1" "github.com/odigos-io/odigos/common/consts" - "github.com/odigos-io/odigos/frontend/endpoints/sse" "github.com/odigos-io/odigos/frontend/kube" + "github.com/odigos-io/odigos/frontend/services/sse" commonutils "github.com/odigos-io/odigos/k8sutils/pkg/workload" metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" "k8s.io/apimachinery/pkg/watch" diff --git a/frontend/main.go b/frontend/main.go index 5b5bb13a47..d89ba23800 100644 --- a/frontend/main.go +++ b/frontend/main.go @@ -23,15 +23,14 @@ import ( "github.com/gin-contrib/cors" - "github.com/odigos-io/odigos/frontend/endpoints/actions" - collectormetrics "github.com/odigos-io/odigos/frontend/endpoints/collector_metrics" - "github.com/odigos-io/odigos/frontend/endpoints/sse" "github.com/odigos-io/odigos/frontend/kube" "github.com/odigos-io/odigos/frontend/kube/watchers" + "github.com/odigos-io/odigos/frontend/services" + collectormetrics "github.com/odigos-io/odigos/frontend/services/collector_metrics" + "github.com/odigos-io/odigos/frontend/services/sse" "github.com/odigos-io/odigos/frontend/version" "github.com/gin-gonic/gin" - "github.com/odigos-io/odigos/frontend/endpoints" _ "net/http/pprof" @@ -42,14 +41,12 @@ import ( const ( defaultPort = 3000 - legacyPort = 3001 ) type Flags struct { Version bool Address string Port int - LegacyPort int Debug bool KubeConfig string KubeContext string @@ -59,9 +56,6 @@ type Flags struct { //go:embed all:webapp/out/* var uiFS embed.FS -//go:embed all:webapp/dep-out/* -var depUIFS embed.FS - func parseFlags() Flags { defaultKubeConfig := env.GetDefaultKubeConfigPath() @@ -69,7 +63,6 @@ func parseFlags() Flags { flag.BoolVar(&flags.Version, "version", false, "Print Odigos UI version.") flag.StringVar(&flags.Address, "address", "localhost", "Address to listen on") flag.IntVar(&flags.Port, "port", defaultPort, "Port to listen on") - flag.IntVar(&flags.LegacyPort, "legacy-port", legacyPort, "Port to listen on for legacy UI") flag.BoolVar(&flags.Debug, "debug", false, "Enable debug mode") flag.StringVar(&flags.KubeConfig, "kubeconfig", defaultKubeConfig, "Path to kubeconfig file") flag.StringVar(&flags.KubeContext, "kube-context", "", "Name of the kubeconfig context to use") @@ -142,131 +135,6 @@ func httpFileServerWith404(fs http.FileSystem) http.Handler { }) } -// dep server -func startHTTPDepServer(flags *Flags, odigosMetrics *collectormetrics.OdigosMetricsConsumer) (*gin.Engine, error) { - var r *gin.Engine - if flags.Debug { - r = gin.Default() - } else { - gin.SetMode(gin.ReleaseMode) - r = gin.New() - r.Use(gin.Recovery()) - } - - // Enable CORS - r.Use(cors.Default()) - - // Serve React app - dist, err := fs.Sub(depUIFS, "webapp/dep-out") - if err != nil { - return nil, fmt.Errorf("error reading webapp/def-out directory: %s", err) - } - - // Serve React app if page not found serve index.html - r.NoRoute(gin.WrapH(httpFileServerWith404(http.FS(dist)))) - - // Serve API - apis := r.Group("/api") - { - apis.GET("/namespaces", func(c *gin.Context) { endpoints.GetNamespaces(c, flags.Namespace) }) - apis.POST("/namespaces", endpoints.PersistNamespaces) - - apis.GET("/sources", func(c *gin.Context) { endpoints.GetSources(c, flags.Namespace) }) - apis.GET("/sources/namespace/:namespace/kind/:kind/name/:name", endpoints.GetSource) - apis.DELETE("/sources/namespace/:namespace/kind/:kind/name/:name", endpoints.DeleteSource) - apis.PATCH("/sources/namespace/:namespace/kind/:kind/name/:name", endpoints.PatchSource) - - apis.GET("/applications/:namespace", endpoints.GetApplicationsInNamespace) - apis.GET("/destination-types", endpoints.GetDestinationTypes) - apis.GET("/destination-types/:type", endpoints.GetDestinationTypeDetails) - apis.GET("/destinations", func(c *gin.Context) { endpoints.GetDestinations(c, flags.Namespace) }) - apis.GET("/destinations/:id", func(c *gin.Context) { endpoints.GetDestinationById(c, flags.Namespace) }) - apis.POST("/destinations", func(c *gin.Context) { endpoints.CreateNewDestination(c, flags.Namespace) }) - apis.POST("/destinations/testConnection", func(c *gin.Context) { endpoints.TestConnectionForDestination(c, flags.Namespace) }) - apis.PUT("/destinations/:id", func(c *gin.Context) { endpoints.UpdateExistingDestination(c, flags.Namespace) }) - apis.DELETE("/destinations/:id", func(c *gin.Context) { endpoints.DeleteDestination(c, flags.Namespace) }) - - // Instrumentation Rules - apis.GET("/instrumentation-rules", func(c *gin.Context) { endpoints.GetInstrumentationRules(c, flags.Namespace) }) - apis.GET("/instrumentation-rules/:id", func(c *gin.Context) { endpoints.GetInstrumentationRule(c, flags.Namespace, c.Param("id")) }) - apis.POST("/instrumentation-rules", func(c *gin.Context) { endpoints.CreateInstrumentationRule(c, flags.Namespace) }) - apis.DELETE("/instrumentation-rules/:id", func(c *gin.Context) { endpoints.DeleteInstrumentationRule(c, flags.Namespace, c.Param("id")) }) - apis.PUT("/instrumentation-rules/:id", func(c *gin.Context) { endpoints.UpdateInstrumentationRule(c, flags.Namespace, c.Param("id")) }) - - // Describe - apis.GET("/describe/odigos", func(c *gin.Context) { - endpoints.DescribeOdigos(c) - }) - apis.GET("/describe/source/namespace/:namespace/kind/:kind/name/:name", func(c *gin.Context) { - endpoints.DescribeSource(c, c.Param("namespace"), c.Param("kind"), c.Param("name")) - }) - - apis.GET("/actions", func(c *gin.Context) { actions.GetActions(c, flags.Namespace) }) - - // AddClusterInfo - apis.GET("/actions/types/AddClusterInfo/:id", func(c *gin.Context) { actions.GetAddClusterInfo(c, flags.Namespace, c.Param("id")) }) - apis.POST("/actions/types/AddClusterInfo", func(c *gin.Context) { actions.CreateAddClusterInfo(c, flags.Namespace) }) - apis.PUT("/actions/types/AddClusterInfo/:id", func(c *gin.Context) { actions.UpdateAddClusterInfo(c, flags.Namespace, c.Param("id")) }) - apis.DELETE("/actions/types/AddClusterInfo/:id", func(c *gin.Context) { actions.DeleteAddClusterInfo(c, flags.Namespace, c.Param("id")) }) - - // DeleteAttribute - apis.GET("/actions/types/DeleteAttribute/:id", func(c *gin.Context) { actions.GetDeleteAttribute(c, flags.Namespace, c.Param("id")) }) - apis.POST("/actions/types/DeleteAttribute", func(c *gin.Context) { actions.CreateDeleteAttribute(c, flags.Namespace) }) - apis.PUT("/actions/types/DeleteAttribute/:id", func(c *gin.Context) { actions.UpdateDeleteAttribute(c, flags.Namespace, c.Param("id")) }) - apis.DELETE("/actions/types/DeleteAttribute/:id", func(c *gin.Context) { actions.DeleteDeleteAttribute(c, flags.Namespace, c.Param("id")) }) - - // RenameAttribute - apis.GET("/actions/types/RenameAttribute/:id", func(c *gin.Context) { actions.GetRenameAttribute(c, flags.Namespace, c.Param("id")) }) - apis.POST("/actions/types/RenameAttribute", func(c *gin.Context) { actions.CreateRenameAttribute(c, flags.Namespace) }) - apis.PUT("/actions/types/RenameAttribute/:id", func(c *gin.Context) { actions.UpdateRenameAttribute(c, flags.Namespace, c.Param("id")) }) - apis.DELETE("/actions/types/RenameAttribute/:id", func(c *gin.Context) { actions.DeleteRenameAttribute(c, flags.Namespace, c.Param("id")) }) - - // Metrics - apis.GET("/metrics/namespace/:namespace/kind/:kind/name/:name", func(c *gin.Context) { endpoints.GetSingleSourceMetrics(c, odigosMetrics) }) - apis.GET("/metrics/destinations/:id", func(c *gin.Context) { endpoints.GetSingleDestinationMetrics(c, odigosMetrics) }) - apis.GET("/metrics/sources", func(c *gin.Context) { endpoints.GetSourcesMetrics(c, odigosMetrics) }) - apis.GET("/metrics/destinations", func(c *gin.Context) { endpoints.GetDestinationsMetrics(c, odigosMetrics) }) - apis.GET("/metrics/overview", func(c *gin.Context) { endpoints.GetOverviewMetrics(c, odigosMetrics) }) - - // ErrorSampler - apis.GET("/actions/types/ErrorSampler/:id", func(c *gin.Context) { actions.GetErrorSampler(c, flags.Namespace, c.Param("id")) }) - apis.POST("/actions/types/ErrorSampler", func(c *gin.Context) { actions.CreateErrorSampler(c, flags.Namespace) }) - apis.PUT("/actions/types/ErrorSampler/:id", func(c *gin.Context) { actions.UpdateErrorSampler(c, flags.Namespace, c.Param("id")) }) - apis.DELETE("/actions/types/ErrorSampler/:id", func(c *gin.Context) { actions.DeleteErrorSampler(c, flags.Namespace, c.Param("id")) }) - // LatencySampler - apis.GET("/actions/types/LatencySampler/:id", func(c *gin.Context) { actions.GetLatencySampler(c, flags.Namespace, c.Param("id")) }) - apis.POST("/actions/types/LatencySampler", func(c *gin.Context) { actions.CreateLatencySampler(c, flags.Namespace) }) - apis.PUT("/actions/types/LatencySampler/:id", func(c *gin.Context) { actions.UpdateLatencySampler(c, flags.Namespace, c.Param("id")) }) - apis.DELETE("/actions/types/LatencySampler/:id", func(c *gin.Context) { actions.DeleteLatencySampler(c, flags.Namespace, c.Param("id")) }) - - //ProbabilisticSampler - apis.GET("/actions/types/ProbabilisticSampler/:id", func(c *gin.Context) { actions.GetProbabilisticSampler(c, flags.Namespace, c.Param("id")) }) - apis.POST("/actions/types/ProbabilisticSampler", func(c *gin.Context) { actions.CreateProbabilisticSampler(c, flags.Namespace) }) - apis.PUT("/actions/types/ProbabilisticSampler/:id", func(c *gin.Context) { actions.UpdateProbabilisticSampler(c, flags.Namespace, c.Param("id")) }) - apis.DELETE("/actions/types/ProbabilisticSampler/:id", func(c *gin.Context) { actions.DeleteProbabilisticSampler(c, flags.Namespace, c.Param("id")) }) - - // PiiMasking - apis.GET("/actions/types/PiiMasking/:id", func(c *gin.Context) { actions.GetPiiMasking(c, flags.Namespace, c.Param("id")) }) - apis.POST("/actions/types/PiiMasking", func(c *gin.Context) { actions.CreatePiiMasking(c, flags.Namespace) }) - apis.PUT("/actions/types/PiiMasking/:id", func(c *gin.Context) { actions.UpdatePiiMasking(c, flags.Namespace, c.Param("id")) }) - apis.DELETE("/actions/types/PiiMasking/:id", func(c *gin.Context) { actions.DeletePiiMasking(c, flags.Namespace, c.Param("id")) }) - } - - // GraphQL handlers - gqlHandler := handler.NewDefaultServer(graph.NewExecutableSchema(graph.Config{ - Resolvers: &graph.Resolver{ - MetricsConsumer: odigosMetrics, - }, - })) - - r.POST("/graphql", func(c *gin.Context) { - gqlHandler.ServeHTTP(c.Writer, c.Request) - }) - r.GET("/playground", gin.WrapH(playground.Handler("GraphQL Playground", "/graphql"))) - - return r, nil -} - func main() { flag.CommandLine = flag.NewFlagSet(os.Args[0], flag.ExitOnError) flags := parseFlags() @@ -312,11 +180,6 @@ func main() { log.Fatalf("Error starting server: %s", err) } - d, err := startHTTPDepServer(&flags, odigosMetrics) - if err != nil { - log.Fatalf("Error starting server: %s", err) - } - // Start watchers err = watchers.StartInstrumentationConfigWatcher(ctx, "") if err != nil { @@ -334,10 +197,13 @@ func main() { } r.GET("/api/events", sse.HandleSSEConnections) - d.GET("/api/events", sse.HandleSSEConnections) - + r.GET("/describe/odigos", func(c *gin.Context) { + services.DescribeOdigos(c) + }) + r.GET("/describe/source/namespace/:namespace/kind/:kind/name/:name", func(c *gin.Context) { + services.DescribeSource(c, c.Param("namespace"), c.Param("kind"), c.Param("name")) + }) log.Printf("Odigos UI is available at: http://%s:%d", flags.Address, flags.Port) - go func() { err = r.Run(fmt.Sprintf("%s:%d", flags.Address, flags.Port)) if err != nil { @@ -345,14 +211,6 @@ func main() { } }() - go func() { - log.Printf("Odigos Legacy UI is available at: http://%s:%d", flags.Address, flags.LegacyPort) - err = d.Run(fmt.Sprintf("%s:%d", flags.Address, flags.LegacyPort)) - if err != nil { - log.Fatalf("Error starting server: %s", err) - } - }() - <-ch log.Println("Shutting down Odigos UI...") cancel() diff --git a/frontend/endpoints/collector_metrics/README.md b/frontend/services/collector_metrics/README.md similarity index 100% rename from frontend/endpoints/collector_metrics/README.md rename to frontend/services/collector_metrics/README.md diff --git a/frontend/endpoints/collector_metrics/cluster_collector.go b/frontend/services/collector_metrics/cluster_collector.go similarity index 100% rename from frontend/endpoints/collector_metrics/cluster_collector.go rename to frontend/services/collector_metrics/cluster_collector.go diff --git a/frontend/endpoints/collector_metrics/collector_metrics.go b/frontend/services/collector_metrics/collector_metrics.go similarity index 96% rename from frontend/endpoints/collector_metrics/collector_metrics.go rename to frontend/services/collector_metrics/collector_metrics.go index 7f5496f888..51da8fcaa1 100644 --- a/frontend/endpoints/collector_metrics/collector_metrics.go +++ b/frontend/services/collector_metrics/collector_metrics.go @@ -10,7 +10,7 @@ import ( "time" "github.com/odigos-io/odigos/common/consts" - "github.com/odigos-io/odigos/frontend/endpoints/common" + "github.com/odigos-io/odigos/frontend/services/common" k8sconsts "github.com/odigos-io/odigos/k8sutils/pkg/consts" "go.opentelemetry.io/collector/component/componenttest" "go.opentelemetry.io/collector/consumer" @@ -27,22 +27,22 @@ const ( ) var ( - errNoSenderPod = errors.New("no sender pod found in the resource attributes") + errNoSenderPod = errors.New("no sender pod found in the resource attributes") errUnKnownSender = errors.New("unknown OTLP sender") ) type trafficMetrics struct { // trace data sent in bytes, cumulative - tracesDataSent int64 + tracesDataSent int64 // log data sent in bytes, cumulative - logsDataSent int64 + logsDataSent int64 // metric data sent in bytes, cumulative metricsDataSent int64 // trace throughput in bytes/sec - tracesThroughput int64 + tracesThroughput int64 // log throughput in bytes/sec - logsThroughput int64 + logsThroughput int64 // metric throughput in bytes/sec metricsThroughput int64 @@ -136,7 +136,7 @@ func (c *OdigosMetricsConsumer) ConsumeMetrics(ctx context.Context, md pmetric.M if err != nil { return err } - + if strings.HasPrefix(senderPod, k8sconsts.OdigosNodeCollectorDaemonSetName) { c.sources.handleNodeCollectorMetrics(senderPod, md) return nil diff --git a/frontend/endpoints/collector_metrics/node_collector.go b/frontend/services/collector_metrics/node_collector.go similarity index 99% rename from frontend/endpoints/collector_metrics/node_collector.go rename to frontend/services/collector_metrics/node_collector.go index 49e6623ee5..4437c23581 100644 --- a/frontend/endpoints/collector_metrics/node_collector.go +++ b/frontend/services/collector_metrics/node_collector.go @@ -4,7 +4,7 @@ import ( "errors" "sync" - "github.com/odigos-io/odigos/frontend/endpoints/common" + "github.com/odigos-io/odigos/frontend/services/common" "github.com/odigos-io/odigos/k8sutils/pkg/workload" "go.opentelemetry.io/collector/pdata/pcommon" "go.opentelemetry.io/collector/pdata/pmetric" diff --git a/frontend/endpoints/collector_metrics/utils.go b/frontend/services/collector_metrics/utils.go similarity index 100% rename from frontend/endpoints/collector_metrics/utils.go rename to frontend/services/collector_metrics/utils.go diff --git a/frontend/endpoints/collector_metrics/utils_test.go b/frontend/services/collector_metrics/utils_test.go similarity index 100% rename from frontend/endpoints/collector_metrics/utils_test.go rename to frontend/services/collector_metrics/utils_test.go diff --git a/frontend/endpoints/collector_metrics/watchers.go b/frontend/services/collector_metrics/watchers.go similarity index 98% rename from frontend/endpoints/collector_metrics/watchers.go rename to frontend/services/collector_metrics/watchers.go index d8ff1bbe85..6d8ecff53e 100644 --- a/frontend/endpoints/collector_metrics/watchers.go +++ b/frontend/services/collector_metrics/watchers.go @@ -6,8 +6,8 @@ import ( "fmt" "github.com/odigos-io/odigos/api/odigos/v1alpha1" - "github.com/odigos-io/odigos/frontend/endpoints/common" "github.com/odigos-io/odigos/frontend/kube" + "github.com/odigos-io/odigos/frontend/services/common" k8sconsts "github.com/odigos-io/odigos/k8sutils/pkg/consts" commonutils "github.com/odigos-io/odigos/k8sutils/pkg/workload" corev1 "k8s.io/api/core/v1" diff --git a/frontend/endpoints/common/source.go b/frontend/services/common/source.go similarity index 100% rename from frontend/endpoints/common/source.go rename to frontend/services/common/source.go diff --git a/frontend/endpoints/describe.go b/frontend/services/describe.go similarity index 99% rename from frontend/endpoints/describe.go rename to frontend/services/describe.go index c57fec891c..0f06d8a740 100644 --- a/frontend/endpoints/describe.go +++ b/frontend/services/describe.go @@ -1,4 +1,4 @@ -package endpoints +package services import ( "github.com/gin-gonic/gin" diff --git a/frontend/endpoints/sse/sse.go b/frontend/services/sse/sse.go similarity index 100% rename from frontend/endpoints/sse/sse.go rename to frontend/services/sse/sse.go diff --git a/frontend/webapp/dep-out/404.html b/frontend/webapp/dep-out/404.html deleted file mode 100644 index 62d4ffb117..0000000000 --- a/frontend/webapp/dep-out/404.html +++ /dev/null @@ -1 +0,0 @@ -404: This page could not be found.

404

This page could not be found.

\ No newline at end of file diff --git a/frontend/webapp/dep-out/_next/static/LwjRuAIxf8wYxMqJQOkbO/_buildManifest.js b/frontend/webapp/dep-out/_next/static/LwjRuAIxf8wYxMqJQOkbO/_buildManifest.js deleted file mode 100644 index d885a331ae..0000000000 --- a/frontend/webapp/dep-out/_next/static/LwjRuAIxf8wYxMqJQOkbO/_buildManifest.js +++ /dev/null @@ -1 +0,0 @@ -self.__BUILD_MANIFEST={__rewrites:{afterFiles:[],beforeFiles:[],fallback:[]},"/_error":["static/chunks/pages/_error-f3b58fe475c0d0d9.js"],sortedPages:["/_app","/_error"]},self.__BUILD_MANIFEST_CB&&self.__BUILD_MANIFEST_CB(); \ No newline at end of file diff --git a/frontend/webapp/dep-out/_next/static/LwjRuAIxf8wYxMqJQOkbO/_ssgManifest.js b/frontend/webapp/dep-out/_next/static/LwjRuAIxf8wYxMqJQOkbO/_ssgManifest.js deleted file mode 100644 index 5b3ff592fd..0000000000 --- a/frontend/webapp/dep-out/_next/static/LwjRuAIxf8wYxMqJQOkbO/_ssgManifest.js +++ /dev/null @@ -1 +0,0 @@ -self.__SSG_MANIFEST=new Set([]);self.__SSG_MANIFEST_CB&&self.__SSG_MANIFEST_CB() \ No newline at end of file diff --git a/frontend/webapp/dep-out/_next/static/chunks/152-5b688754624c36e9.js b/frontend/webapp/dep-out/_next/static/chunks/152-5b688754624c36e9.js deleted file mode 100644 index 570848f580..0000000000 --- a/frontend/webapp/dep-out/_next/static/chunks/152-5b688754624c36e9.js +++ /dev/null @@ -1 +0,0 @@ -(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[152],{8447:function(e,t,n){"use strict";n.d(t,{r:function(){return ConditionCheck},N:function(){return MultiCheckboxComponent}});var i=n(7022),r=n(299),o=n(2265),a=n(3587),c=n(7437);function ownKeys(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);t&&(i=i.filter(function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable})),n.push.apply(n,i)}return n}function _objectSpread(e){for(var t=1;t0?(0,f.jsxs)("div",{ref:o,children:[(0,f.jsxs)(T,{children:[(0,f.jsx)(p.Dk,{style:{cursor:"pointer"},size:20,onClick:function(){return n(!t)}}),d>0&&(0,f.jsx)(P,{children:(0,f.jsx)(y.xJ,{size:10,children:d})})]}),t&&(0,f.jsxs)(A,{children:[(0,f.jsx)(k,{children:(0,f.jsx)(y.xJ,{size:18,weight:600,children:"Notifications"})}),(0,O.Z)(i).reverse().map(function(e){return(0,f.jsx)(notification_list_item,function(e){for(var t=1;t0?c:[""],onValuesChange:function(e){n("actionData",{attributeNamesToDelete:e}),s(e)}})})})}var U=f.ZP.div.withConfig({displayName:"renameattributes__FormWrapper",componentId:"sc-1dg3dox-0"})(["width:375px;"]),H=[{id:0,key:"",value:""}];function RenameAttributesForm(e){var t=e.data,n=e.onChange,i=e.setIsFormValid,r=void 0===i?function(){}:i,o=u.useState([]),a=(0,z.Z)(o,2),c=a[0],s=a[1];return(0,u.useEffect)(function(){(function(){if(!(null!=t&&t.renames)){s(H);return}s(Object.entries(t.renames).map(function(e,t){var n=(0,z.Z)(e,2);return{id:t,key:n[0],value:n[1]}})||H)})()},[t]),(0,u.useEffect)(function(){r(c.every(function(e){return""!==e.key.trim()&&""!==e.value.trim()}))},[c]),(0,x.jsx)(x.Fragment,{children:(0,x.jsx)(U,{children:(0,x.jsx)(h.C1,{title:"Attributes To Rename *",titleKey:"Original Attribute",titleValue:"New Attribute",titleButton:"Add Attribute",keyValues:c,setKeyValues:function(e){var t={};e.forEach(function(e){t[e.key]=e.value}),n("actionData",{renames:t}),s(e)}})})})}var V=f.ZP.div.withConfig({displayName:"error-sampler__FormWrapper",componentId:"sc-1gdkbs0-0"})(["width:375px;"]);function ErrorSamplerForm(e){var t,n=e.data,i=e.onChange,r=e.setIsFormValid,o=void 0===r?function(){}:r;return(0,u.useEffect)(function(){o(!isNaN(null==n?void 0:n.fallback_sampling_ratio)&&(null==n?void 0:n.fallback_sampling_ratio)>=0&&(null==n?void 0:n.fallback_sampling_ratio)<=100)},[null==n?void 0:n.fallback_sampling_ratio]),(0,x.jsx)(x.Fragment,{children:(0,x.jsx)(V,{children:(0,x.jsx)(h.ix,{label:"Fallback Sampling Ratio",value:null==n?void 0:null===(t=n.fallback_sampling_ratio)||void 0===t?void 0:t.toString(),onChange:function(e){i("actionData",{fallback_sampling_ratio:+e})},type:"number",tooltip:"Specifies the ratio of non-error traces you still want to retain",min:0,max:100,error:(null==n?void 0:n.fallback_sampling_ratio)>100?"Value must be less than 100":""})})})}var Y=f.ZP.div.withConfig({displayName:"probabilistic-sampler__FormWrapper",componentId:"sc-ci5zc4-0"})(["width:375px;"]);function ProbabilisticSamplerForm(e){var t=e.data,n=e.onChange,i=e.setIsFormValid,r=void 0===i?function(){}:i;return(0,u.useEffect)(function(){var e;r(!isNaN(e=parseFloat(null==t?void 0:t.sampling_percentage))&&e>=0&&e<=100)},[null==t?void 0:t.sampling_percentage]),(0,x.jsx)(x.Fragment,{children:(0,x.jsx)(Y,{children:(0,x.jsx)(h.ix,{"data-cy":"create-action-sampling-percentage",label:"Fallback Sampling Ratio",value:null==t?void 0:t.sampling_percentage,onChange:function(e){n("actionData",{sampling_percentage:e})},type:"number",tooltip:"Percentage at which items are sampled; = 100 samples all items, 0 rejects all items",min:0,max:100,error:parseFloat(null==t?void 0:t.sampling_percentage)>100?"Value must be less than 100":""})})})}var G=n(941),q=n(3103);function latency_action_ownKeys(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);t&&(i=i.filter(function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable})),n.push.apply(n,i)}return n}function latency_action_objectSpread(e){for(var t=1;t100?o[t]="Fallback sampling ratio must be between 0 and 100":delete o[t]}return latency_action_objectSpread(latency_action_objectSpread({},n),{},{errors:o})}return n});s(r),n(et,{endpoints_filters:r}),checkFormValidity(r)}function checkFormValidity(e){r(e.every(function(e){var t,n,i;return e.service_name&&e.http_route&&!(null!==(t=e.errors)&&void 0!==t&&t.http_route)&&void 0!==e.minimum_latency_threshold&&!(null!==(n=e.errors)&&void 0!==n&&n.minimum_latency_threshold)&&void 0!==e.fallback_sampling_ratio&&!(null!==(i=e.errors)&&void 0!==i&&i.fallback_sampling_ratio)}))}return(0,x.jsxs)(Q,{children:[(0,x.jsx)(h.xJ,{size:14,weight:600,children:"Endpoints Filters"}),(0,x.jsxs)($,{children:[(0,x.jsx)("thead",{children:(0,x.jsxs)("tr",{children:[(0,x.jsx)(X,{children:(0,x.jsx)(h.xJ,{size:12,children:"Service Name"})}),(0,x.jsx)(X,{children:(0,x.jsx)(h.xJ,{size:12,children:"Http Route"})}),(0,x.jsx)(X,{children:(0,x.jsx)(h.xJ,{size:12,children:"Minimum Latency Threshold (ms)"})}),(0,x.jsx)(X,{children:(0,x.jsx)(g.u,{text:"allows you to retain a specified percentage of traces that fall below the threshold",children:(0,x.jsx)(h.xJ,{size:12,children:"Fallback Sampling Ratio "})})}),(0,x.jsx)(X,{})]})}),(0,x.jsx)("tbody",{children:c.map(function(e,t){var i,r,a,d,u,p,f;return(0,x.jsxs)("tr",{children:[(0,x.jsx)(ee,{children:(0,x.jsx)(h.p,{width:198,data:l,value:(p=e.service_name||"",{id:0,label:(null==(f=o.find(function(e){return e.name===p}))?void 0:f.name)||""}),onChange:function(e){return handleOnChange(t,"service_name",e.label)}})}),(0,x.jsx)(ee,{children:(0,x.jsx)(h.ix,{style:{width:192,height:39},value:e.http_route||"",onChange:function(e){return handleOnChange(t,"http_route",e)},onBlur:function(){return handleOnBlur(t,"http_route",e.http_route)},error:null===(i=e.errors)||void 0===i?void 0:i.http_route,placeholder:"e.g. /api/v1/users",type:"text"})}),(0,x.jsx)(ee,{children:(0,x.jsx)(h.ix,{style:{width:192,height:39},value:(null===(r=e.minimum_latency_threshold)||void 0===r?void 0:r.toString())||"",onChange:function(e){return handleOnChange(t,"minimum_latency_threshold",+e)},onBlur:function(){return handleOnBlur(t,"minimum_latency_threshold",e.minimum_latency_threshold)},placeholder:"e.g. 1000",type:"number",min:0,error:null===(a=e.errors)||void 0===a?void 0:a.minimum_latency_threshold})}),(0,x.jsx)(ee,{children:(0,x.jsx)(h.ix,{style:{width:192,height:39},value:(null===(d=e.fallback_sampling_ratio)||void 0===d?void 0:d.toString())||"",onChange:function(e){return handleOnChange(t,"fallback_sampling_ratio",+e)},onBlur:function(){return handleOnBlur(t,"fallback_sampling_ratio",e.fallback_sampling_ratio)},placeholder:"e.g. 20",type:"number",min:0,max:100,error:null===(u=e.errors)||void 0===u?void 0:u.fallback_sampling_ratio})}),(0,x.jsx)(ee,{children:c.length>1&&(0,x.jsx)(h.Rf,{value:"remove",fontSize:12,onClick:function(){var e;s(e=c.filter(function(e,n){return n!==t})),n(et,{endpoints_filters:e}),checkFormValidity(e)}})})]},t)})})]}),(0,x.jsx)(h.ZT,{onClick:function(){s([].concat((0,G.Z)(c),[{}]))},style:{height:32,width:140,marginTop:8},disabled:c.length>=o.length,children:(0,x.jsx)(h.xJ,{size:14,weight:600,color:O.Z.text.dark_button,children:"+ Add Filter"})})]})}var en=[{id:"CREDIT_CARD",label:"Credit Card"}],ei=f.ZP.div.withConfig({displayName:"pii-masking__FormWrapper",componentId:"sc-1pbjj97-0"})(["width:375px;"]),er="actionData";function PiiMaskingForm(e){var t=e.data,n=e.onChange,i=e.setIsFormValid;return(0,u.useEffect)(function(){n(er,{piiCategories:["CREDIT_CARD"]}),i&&i(!0)},[]),(0,x.jsx)(x.Fragment,{children:(0,x.jsx)(ei,{children:en.map(function(e){var i;return(0,x.jsx)(h.Ho,{disabled:!0,value:null==t?void 0:null===(i=t.piiCategories)||void 0===i?void 0:i.includes(null==e?void 0:e.id),onChange:function(){var t,i;return t=null==e?void 0:e.id,void((i=[]).includes(t)?i=i.filter(function(e){return e!==t}):i.push(t),n(er,{piiCategories:i}))},label:null==e?void 0:e.label},null==e?void 0:e.id)})})})}function DynamicActionForm(e){var t,n=e.type,i=e.data,r=e.onChange,o=e.setIsFormValid,a=(t={},(0,D.Z)(t,R.ActionsType.ADD_CLUSTER_INFO,AddClusterInfoForm),(0,D.Z)(t,R.ActionsType.DELETE_ATTRIBUTES,DeleteAttributesForm),(0,D.Z)(t,R.ActionsType.RENAME_ATTRIBUTES,RenameAttributesForm),(0,D.Z)(t,R.ActionsType.ERROR_SAMPLER,ErrorSamplerForm),(0,D.Z)(t,R.ActionsType.PROBABILISTIC_SAMPLER,ProbabilisticSamplerForm),(0,D.Z)(t,R.ActionsType.LATENCY_SAMPLER,LatencySamplerForm),(0,D.Z)(t,R.ActionsType.PII_MASKING,PiiMaskingForm),t),c=n?a[n]:null;return(0,x.jsx)(x.Fragment,{children:c?(0,x.jsx)(c,{data:i,onChange:r,setIsFormValid:void 0===o?function(){}:o}):(0,x.jsx)("div",{children:"No action form available"})})}var eo=f.zo.div.withConfig({displayName:"deleteaction__FieldWrapper",componentId:"sc-gnttsl-0"})(["div{width:354px;}"]);function DeleteAction(e){var t=e.onDelete,n=e.name,i=e.type,r=(0,u.useState)(!1),o=r[0],a=r[1],l={title:p.mD.DELETE_ACTION,showHeader:!0,showOverlay:!0,positionX:c.center,positionY:s.center,padding:"20px",footer:{primaryBtnText:p.mD.CONFIRM_DELETE_ACTION,primaryBtnAction:function(){a(!1),t()}}};return(0,x.jsxs)(x.Fragment,{children:[(0,x.jsx)(eo,{children:(0,x.jsx)(h.cN,{title:p.mD.ACTION_DANGER_ZONE_TITLE,subTitle:p.mD.ACTION_DANGER_ZONE_SUBTITLE,btnText:p.mD.DELETE,onClick:function(){return a(!0)}})}),o&&(0,x.jsxs)(h.V2,{show:o,closeModal:function(){return a(!1)},config:l,children:[(0,x.jsx)("br",{}),(0,x.jsx)(m.A,{style:{width:52,height:52},type:i||""}),(0,x.jsx)("br",{}),(0,x.jsx)(h.xJ,{size:20,weight:600,children:"".concat(p.mD.DELETE," ").concat(n," Action")})]})]})}function ActionRowDynamicContent(e){var t=e.item;return(0,x.jsx)(x.Fragment,{children:function(){var e,n,i,r,o,a;switch(t.type){case R.ActionsType.ADD_CLUSTER_INFO:return(0,x.jsx)(h.xJ,{color:O.Z.text.grey,size:14,weight:400,children:"".concat(null==t?void 0:t.spec.clusterAttributes.length," cluster attributes")});case R.ActionsType.DELETE_ATTRIBUTES:return(0,x.jsx)(h.xJ,{color:O.Z.text.grey,size:14,weight:400,children:"".concat(null==t?void 0:t.spec.attributeNamesToDelete.length," deleted attributes")});case R.ActionsType.RENAME_ATTRIBUTES:return(0,x.jsx)(h.xJ,{color:O.Z.text.grey,size:14,weight:400,children:"".concat(Object.keys(null==t?void 0:null===(e=t.spec)||void 0===e?void 0:e.renames).length," renamed attributes")});case R.ActionsType.ERROR_SAMPLER:return(0,x.jsxs)(h.xJ,{color:O.Z.text.grey,size:14,weight:400,children:["".concat(null==t?void 0:null===(n=t.spec)||void 0===n?void 0:n.fallback_sampling_ratio,"% sampling ratio"),"s"]});case R.ActionsType.PROBABILISTIC_SAMPLER:return(0,x.jsx)(h.xJ,{color:O.Z.text.grey,size:14,weight:400,children:"".concat(null==t?void 0:null===(i=t.spec)||void 0===i?void 0:i.sampling_percentage,"% sampling ratio")});case R.ActionsType.LATENCY_SAMPLER:return(0,x.jsx)(h.xJ,{color:O.Z.text.grey,size:14,weight:400,children:"".concat(null==t?void 0:null===(r=t.spec)||void 0===r?void 0:r.endpoints_filters.length," endpoints")});case R.ActionsType.PII_MASKING:return(0,x.jsx)(h.xJ,{color:O.Z.text.grey,size:14,weight:400,children:"".concat((null==t?void 0:null===(o=t.spec)||void 0===o?void 0:o.piiCategories.length)===1?"1 category":"".concat(null==t?void 0:null===(a=t.spec)||void 0===a?void 0:a.piiCategories.length," categories"))});default:return(0,x.jsx)("div",{children:t.type})}}()})}var ea=n(8265),ec=n(8547);function actions_table_row_ownKeys(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);t&&(i=i.filter(function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable})),n.push.apply(n,i)}return n}function actions_table_row_objectSpread(e){for(var t=1;t0,onChange:function(){return i("select_all")}}),(0,x.jsx)(g.wZ,{size:18}),(0,x.jsx)(h.xJ,{size:14,weight:600,color:O.Z.text.white,children:n.length>0?"".concat(n.length," selected"):"".concat(t.length," ").concat(p.mD.MENU.ACTIONS)}),(0,x.jsx)(e_,{children:(0,x.jsx)(h.BT,{actionGroups:y})})]})})}var ej=n(4490),ActionsTable=function(e){var t=e.data,n=e.onRowClick,i=e.sortActions,r=e.filterActionsBySignal,o=e.toggleActionStatus,a=(0,u.useState)([]),c=a[0],s=a[1],l=(0,u.useState)(1),d=l[0],f=l[1],m=(0,u.useState)(10),g=m[0],y=m[1],v=u.useRef(1);function onSelectedCheckboxChange(e){if("select_all"===e){if(c.length>0)s([]);else{var n=(v.current-1)*10,i=10*v.current;s(t.slice(n,i).map(function(e){return e.id}))}return}c.includes(e)?s(c.filter(function(t){return t!==e})):s([].concat((0,G.Z)(c),[e]))}return(0,x.jsx)(x.Fragment,{children:(0,x.jsx)(h.iA,{data:t,renderTableHeader:function(){return(0,x.jsx)(ActionsTableHeader,{data:t,selectedCheckbox:c,onSelectedCheckboxChange:onSelectedCheckboxChange,sortActions:i,filterActionsBySignal:r,toggleActionStatus:o})},onPaginate:function(e){v.current=e,c.length>0&&s([])},renderEmptyResult:function(){return(0,x.jsx)(ej.rf,{title:p.mD.EMPTY_ACTION})},currentPage:d,itemsPerPage:g,setCurrentPage:f,setItemsPerPage:y,renderTableRows:function(e,i){return(0,x.jsx)(ActionsTableRow,{onRowClick:n,selectedCheckbox:c,onSelectedCheckboxChange:onSelectedCheckboxChange,data:t,item:e,index:i})}})})};f.ZP.p.withConfig({displayName:"actionyaml__CodeBlockWrapper",componentId:"sc-1e6amzh-0"})(["display:flex;align-items:center;font-family:",";color:",";a{color:",";text-decoration:none;cursor:pointer;}"],O.Z.font_family.primary,O.Z.text.light_grey,O.Z.text.secondary);var ew=f.ZP.div.withConfig({displayName:"actionyaml__TitleWrapper",componentId:"sc-1e6amzh-1"})(["display:flex;align-items:center;gap:6px;margin-bottom:8px;max-width:600px;"]);(0,f.ZP)(ew).withConfig({displayName:"actionyaml__DescriptionWrapper",componentId:"sc-1e6amzh-2"})(["line-height:1.3;margin:10px 0 8px 0;"]);var eC=n(2245),eS=n(9704),eO=n(8447),eN=f.ZP.tr.withConfig({displayName:"sourcestablerow__StyledTr",componentId:"sc-1kywn08-0"})(["&:hover{background-color:",";}"],O.Z.colors.light_dark),eI=f.ZP.td.withConfig({displayName:"sourcestablerow__StyledTd",componentId:"sc-1kywn08-1"})(["padding:10px 20px;border-top:1px solid ",";",""],O.Z.colors.blue_grey,function(e){return e.isFirstRow&&(0,f.iv)(["border-top:none;"])}),eE=(0,f.ZP)(eI).withConfig({displayName:"sourcestablerow__StyledMainTd",componentId:"sc-1kywn08-2"})(["cursor:pointer;padding:10px 20px;display:flex;gap:20px;"]),eA=f.ZP.div.withConfig({displayName:"sourcestablerow__SourceIconContainer",componentId:"sc-1kywn08-3"})(["display:flex;align-items:center;gap:8px;"]),eT=f.ZP.div.withConfig({displayName:"sourcestablerow__SourceDetails",componentId:"sc-1kywn08-4"})(["display:flex;flex-direction:column;gap:4px;"]),eP=f.ZP.div.withConfig({displayName:"sourcestablerow__NameContainer",componentId:"sc-1kywn08-5"})(["display:flex;gap:10px;align-items:center;"]),ek=f.ZP.div.withConfig({displayName:"sourcestablerow__FooterContainer",componentId:"sc-1kywn08-6"})(["display:flex;gap:16px;align-items:center;"]),eD=f.ZP.div.withConfig({displayName:"sourcestablerow__FooterItemWrapper",componentId:"sc-1kywn08-7"})(["display:flex;align-items:center;gap:4px;"]),eZ=f.ZP.div.withConfig({displayName:"sourcestablerow__StatusIndicator",componentId:"sc-1kywn08-8"})(["width:6px;height:6px;border-radius:4px;background-color:",";"],function(e){return e.color}),eR=f.ZP.div.withConfig({displayName:"sourcestablerow__TagWrapper",componentId:"sc-1kywn08-9"})(["padding:0 20px;width:300px;display:flex;align-items:center;"]),eL={padding:4,backgroundColor:O.Z.colors.white};function SourcesTableRow(e){var t,n,i=e.item,r=e.index,o=e.selectedCheckbox,a=e.onSelectedCheckboxChange,c=e.onRowClick,s=(0,p.LV)(i),l=function(e){if(!(null!=e&&null!==(t=e.instrumented_application_details)&&void 0!==t&&t.languages))return null;var t,n,i=null==e?void 0:null===(n=e.instrumented_application_details)||void 0===n?void 0:n.languages.find(function(e){return"ignore"!==e.language});return i?i.container_name:null}(i)||"";return(0,x.jsx)(eN,{children:(0,x.jsxs)(eE,{isFirstRow:0===r,children:[(0,x.jsx)(h.Ho,{value:o.includes(JSON.stringify(i)),onChange:function(){return a(JSON.stringify(i))}}),(0,x.jsxs)(eA,{onClick:function(){return c(i)},children:[(0,x.jsx)("div",{children:(0,x.jsx)(h.uR,{src:p.Fs[s],width:32,height:32,style:eL,alt:"source-logo"})}),(0,x.jsxs)(eT,{onClick:function(){return c(i)},children:[(0,x.jsxs)(eP,{children:[(0,x.jsx)(h.xJ,{weight:600,children:"".concat(i.name||"Source"," ")}),(0,x.jsx)(h.xJ,{color:O.Z.text.light_grey,size:14,children:(0,x.jsx)(eO.r,{conditions:(null==i?void 0:null===(t=i.instrumented_application_details)||void 0===t?void 0:t.conditions)||[]})})]}),(0,x.jsxs)(ek,{children:[(0,x.jsx)(eD,{children:"processing"===s?(0,x.jsxs)(x.Fragment,{children:[(0,x.jsx)(h.kQ,{width:6,height:6}),(0,x.jsx)(h.xJ,{color:O.Z.text.light_grey,size:14,children:"detecting language"})]}):(0,x.jsxs)(x.Fragment,{children:[(0,x.jsx)(eZ,{color:p.Fp[s]||O.Z.text.light_grey}),(0,x.jsx)(h.xJ,{color:O.Z.text.light_grey,size:14,children:s})]})}),(0,x.jsxs)(eD,{children:[(0,x.jsx)(eC.lS,{style:{width:16,height:16}}),(0,x.jsx)(h.xJ,{color:O.Z.text.light_grey,size:14,children:i.namespace})]}),(0,x.jsxs)(eD,{children:[(0,x.jsx)(eC.W2,{style:{width:16,height:16}}),(0,x.jsx)(h.xJ,{color:O.Z.text.light_grey,size:14,children:l})]})]})]}),(0,x.jsx)(eR,{children:(0,x.jsx)(h.Io,{title:(null==i?void 0:i.kind)||"",color:eS.t[(null==i?void 0:null===(n=i.kind)||void 0===n?void 0:n.toLowerCase())||"deployment"]})})]})]})},i.kind)}(o=l||(l={})).DEPLOYMENT="deployment",o.STATEFUL_SET="statefulset",o.DAEMON_SET="daemonset",(a=d||(d={})).NAME="name",a.KIND="kind",a.NAMESPACE="namespace",a.LANGUAGE="language";var eM=f.ZP.div.withConfig({displayName:"sourcestableheader__StyledThead",componentId:"sc-1gi1cy2-0"})(["background-color:",";border-top-right-radius:6px;border-top-left-radius:6px;"],O.Z.colors.light_dark),eF=f.ZP.th.withConfig({displayName:"sourcestableheader__StyledTh",componentId:"sc-1gi1cy2-1"})(["padding:10px 20px;text-align:left;border-bottom:1px solid ",";"],O.Z.colors.blue_grey),ez=(0,f.ZP)(eF).withConfig({displayName:"sourcestableheader__StyledMainTh",componentId:"sc-1gi1cy2-2"})(["padding:10px 20px;display:flex;align-items:center;gap:8px;"]),eB=f.ZP.div.withConfig({displayName:"sourcestableheader__ActionGroupContainer",componentId:"sc-1gi1cy2-3"})(["display:flex;justify-content:flex-end;padding-right:20px;gap:24px;flex:1;"]);function SourcesTableHeader(e){var t=e.data,n=e.namespaces,i=e.sortSources,r=e.filterSourcesByKind,o=e.filterSourcesByNamespace,a=e.filterSourcesByLanguage,c=e.deleteSourcesHandler,s=e.selectedCheckbox,f=e.onSelectedCheckboxChange,m=e.filterByConditionStatus,y=e.filterByConditionMessage,v=e.currentItems,b=(0,u.useState)(""),_=b[0],j=b[1],w=(0,u.useState)([]),C=w[0],S=w[1],N=(0,u.useState)(!1),I=N[0],E=N[1],A=(0,u.useState)([]),T=A[0],P=A[1],k=(0,u.useState)(["javascript","python","java","go","dotnet"]),D=k[0],Z=k[1],R=(0,u.useState)([l.DEPLOYMENT,l.STATEFUL_SET,l.DAEMON_SET]),L=R[0],M=R[1],z=(0,q.hi)().groupErrorMessages;function onSortClick(e){j(e),i&&i(e)}function onKindClick(e){var t=[];L.includes(e)?(M(L.filter(function(t){return t!==e})),t=L.filter(function(t){return t!==e})):(M([].concat((0,G.Z)(L),[e])),t=[].concat((0,G.Z)(L),[e])),r&&r(t)}function onLanguageClick(e){var t=[];D.includes(e)?(Z(D.filter(function(t){return t!==e})),t=D.filter(function(t){return t!==e})):(Z([].concat((0,G.Z)(D),[e])),t=[].concat((0,G.Z)(D),[e])),a&&a(t)}(0,u.useEffect)(function(){m&&(P(z()),I?m("False"):m("All"))},[I]),(0,u.useEffect)(function(){n&&S(n.filter(function(e){return e.totalApps>0}).map(function(e){return e.name}))},[n]);var B=(0,u.useMemo)(function(){if(!n)return[];var e,i,r,a,c,s,u,p,f,h,m,g,x,v,b,j,w=n.filter(function(e){return e.totalApps>0}).length,O=null===(e=n.sort(function(e,t){return t.totalApps-e.totalApps}))||void 0===e?void 0:e.map(function(e,t){return{label:"".concat(e.name," (").concat(e.totalApps," apps) "),onClick:function(){var t,n;return t=e.name,n=[],void(C.includes(t)?(S(C.filter(function(e){return e!==t})),n=C.filter(function(e){return e!==t})):(S([].concat((0,G.Z)(C),[t])),n=[].concat((0,G.Z)(C),[t])),o&&o(n))},id:e.name,selected:C.includes(e.name)&&e.totalApps>0,disabled:1===C.length&&C.includes(e.name)||0===e.totalApps||1===w}}),N=[{label:"Language",subTitle:"Filter",condition:!0,items:[{label:"Javascript",onClick:function(){return onLanguageClick("javascript")},id:"javascript",selected:D.includes("javascript"),disabled:1===D.length&&D.includes("javascript")||1===t.length&&(null==t?void 0:null===(i=t[0])||void 0===i?void 0:null===(r=i.instrumented_application_details)||void 0===r?void 0:null===(a=r.languages)||void 0===a?void 0:a[0].language)==="javascript"},{label:"Python",onClick:function(){return onLanguageClick("python")},id:"python",selected:D.includes("python"),disabled:1===D.length&&D.includes("python")||1===t.length&&(null==t?void 0:null===(c=t[0])||void 0===c?void 0:null===(s=c.instrumented_application_details)||void 0===s?void 0:null===(u=s.languages)||void 0===u?void 0:u[0].language)==="python"},{label:"Java",onClick:function(){return onLanguageClick("java")},id:"java",selected:D.includes("java"),disabled:1===D.length&&D.includes("java")||1===t.length&&(null==t?void 0:null===(p=t[0])||void 0===p?void 0:null===(f=p.instrumented_application_details)||void 0===f?void 0:null===(h=f.languages)||void 0===h?void 0:h[0].language)==="java"},{label:"Go",onClick:function(){return onLanguageClick("go")},id:"go",selected:D.includes("go"),disabled:1===D.length&&D.includes("go")||1===t.length&&(null==t?void 0:null===(m=t[0])||void 0===m?void 0:null===(g=m.instrumented_application_details)||void 0===g?void 0:null===(x=g.languages)||void 0===x?void 0:x[0].language)==="go"},{label:".NET",onClick:function(){return onLanguageClick("dotnet")},id:"dotnet",selected:D.includes("dotnet"),disabled:1===D.length&&D.includes("dotnet")||1===t.length&&(null==t?void 0:null===(v=t[0])||void 0===v?void 0:null===(b=v.instrumented_application_details)||void 0===b?void 0:null===(j=b.languages)||void 0===j?void 0:j[0].language)==="dotnet"}]},{label:"Kind",subTitle:"Filter",condition:!0,items:[{label:"Deployment",onClick:function(){return onKindClick(l.DEPLOYMENT)},id:l.DEPLOYMENT,selected:L.includes(l.DEPLOYMENT)&&t.some(function(e){return e.kind.toLowerCase()===l.DEPLOYMENT}),disabled:1===L.length&&L.includes(l.DEPLOYMENT)&&t.some(function(e){return e.kind.toLowerCase()===l.DEPLOYMENT})},{label:"StatefulSet",onClick:function(){return onKindClick(l.STATEFUL_SET)},id:l.STATEFUL_SET,selected:L.includes(l.STATEFUL_SET)&&t.some(function(e){return e.kind.toLowerCase()===l.STATEFUL_SET}),disabled:1===L.length&&L.includes(l.STATEFUL_SET)||t.every(function(e){return e.kind.toLowerCase()!==l.STATEFUL_SET})},{label:"DemonSet",onClick:function(){return onKindClick(l.DAEMON_SET)},id:l.DAEMON_SET,selected:L.includes(l.DAEMON_SET)&&t.some(function(e){return e.kind.toLowerCase()===l.DAEMON_SET}),disabled:1===L.length&&L.includes(l.DAEMON_SET)||t.every(function(e){return e.kind.toLowerCase()!==l.DAEMON_SET})}]},{label:"Namespaces",subTitle:"Display",items:O,condition:!0},{label:"Sort by",subTitle:"Sort by",items:[{label:"Kind",onClick:function(){return onSortClick(d.KIND)},id:d.KIND,selected:_===d.KIND},{label:"Language",onClick:function(){return onSortClick(d.LANGUAGE)},id:d.LANGUAGE,selected:_===d.LANGUAGE},{label:"Name",onClick:function(){return onSortClick(d.NAME)},id:d.NAME,selected:_===d.NAME},{label:"Namespace",onClick:function(){return onSortClick(d.NAMESPACE)},id:d.NAMESPACE,selected:_===d.NAMESPACE}],condition:!0}];return I&&N.unshift({label:"Error",subTitle:"Filter by error message",condition:!0,items:z().map(function(e){return{label:e,onClick:function(){var t;return t=[],void(T.includes(e)?(P(T.filter(function(t){return t!==e})),t=T.filter(function(t){return t!==e})):(P([].concat((0,G.Z)(T),[e])),t=[].concat((0,G.Z)(T),[e])),y(t))},id:e,selected:T.includes(e),disabled:1===T.length&&T.includes(e)}})}),N},[n,C,t]);return(0,x.jsx)(eM,{children:(0,x.jsxs)(ez,{children:[(0,x.jsx)(h.Ho,{value:s.length===v.length&&v.length>0,onChange:function(){return f("select_all")}}),(0,x.jsx)(g.Kl,{size:18}),(0,x.jsx)(h.xJ,{size:14,weight:600,color:O.Z.text.white,children:"".concat(t.length," ").concat(p.mD.MENU.SOURCES)}),T.length>0&&(0,x.jsx)(h.Ju,{toggle:I,handleToggleChange:function(){return E(!I)},label:"Show Sources with Errors"}),s.length>0&&(0,x.jsx)(h.Rf,{onClick:c,value:p.mD.DELETE,fontSize:12}),(0,x.jsx)(eB,{children:(0,x.jsx)(h.BT,{actionGroups:B})})]})})}var ManagedSourcesTable=function(e){var t=e.data,n=e.namespaces,i=e.onRowClick,r=e.sortSources,o=e.filterSourcesByKind,a=e.deleteSourcesHandler,l=e.filterSourcesByNamespace,d=e.filterSourcesByLanguage,f=e.filterByConditionStatus,m=e.filterByConditionMessage,g=(0,u.useState)([]),y=g[0],v=g[1],b=(0,u.useState)(!1),_=b[0],j=b[1],w=(0,u.useState)(1),C=w[0],S=w[1],O=(0,u.useState)(10),N=O[0],I=O[1],E={title:p.mD.DELETE_SOURCE,showHeader:!0,showOverlay:!0,positionX:c.center,positionY:s.center,padding:"20px",footer:{primaryBtnText:p.mD.CONFIRM_SOURCE_DELETE,primaryBtnAction:function(){var e;j(!1),e=y.map(function(e){return JSON.parse(e)}),a&&a(e),v([])}}},A=u.useRef(1);function onSelectedCheckboxChange(e){var n=t.slice((C-1)*N,C*N);if("select_all"===e){y.length===n.length?v([]):v(n.map(function(e){return JSON.stringify(e)}));return}y.includes(e)?v(y.filter(function(t){return t!==e})):v([].concat((0,G.Z)(y),[e]))}var T=C*N,P=T-N,k=t.slice(P,T);return(0,x.jsx)(x.Fragment,{children:(0,x.jsx)(h.iA,{data:t,renderTableHeader:function(){return(0,x.jsxs)(x.Fragment,{children:[(0,x.jsx)(SourcesTableHeader,{data:t,namespaces:n,sortSources:r,filterSourcesByKind:o,filterSourcesByNamespace:l,filterSourcesByLanguage:d,selectedCheckbox:y,onSelectedCheckboxChange:onSelectedCheckboxChange,deleteSourcesHandler:function(){return j(!0)},filterByConditionStatus:f,filterByConditionMessage:m,currentItems:k}),_&&(0,x.jsx)(h.V2,{show:_,closeModal:function(){return j(!1)},config:E,children:(0,x.jsx)(h.xJ,{size:20,weight:600,children:"".concat(p.mD.DELETE," ").concat(y.length," sources")})})]})},onPaginate:function(e){A.current=e},renderEmptyResult:function(){return(0,x.jsx)(ej.rf,{title:p.mD.EMPTY_SOURCE})},renderTableRows:function(e,n){return(0,x.jsx)(SourcesTableRow,{data:t,item:e,index:n,onRowClick:i,selectedCheckbox:y,onSelectedCheckboxChange:onSelectedCheckboxChange})},currentPage:C,itemsPerPage:N,setCurrentPage:S,setItemsPerPage:I})})},eK=f.ZP.div.withConfig({displayName:"detected-containers__Container",componentId:"sc-14sy9oo-0"})(["margin-top:16px;max-width:36vw;margin-bottom:24px;border:1px solid #374a5b;border-radius:8px;padding:24px;"]),eW=f.ZP.ul.withConfig({displayName:"detected-containers__List",componentId:"sc-14sy9oo-1"})(["list-style:disc;"]),eJ=f.ZP.li.withConfig({displayName:"detected-containers__ListItem",componentId:"sc-14sy9oo-2"})(["padding:2px 0;&::marker{color:",";}"],O.Z.colors.white),DetectedContainers=function(e){var t=e.languages,n=e.conditions.some(function(e){return"False"===e.status&&e.message.includes("device not added to any container due to the presence of another agent")});return(0,x.jsxs)(eK,{children:[(0,x.jsx)(h.xJ,{size:18,weight:600,children:"Detected Containers:"}),(0,x.jsx)(eW,{children:t.map(function(e){var t="ignore"!==e.language&&"unknown"!==e.language&&!e.other_agent,i=("python"===e.language||"java"===e.language)&&!n;return(0,x.jsxs)(eJ,{children:[(0,x.jsxs)(h.xJ,{color:t?O.Z.text.light_grey:"#4caf50",children:[e.container_name," (Language: ",e.language,null!=e&&e.runtime_version?", Runtime: ".concat(e.runtime_version):"",")",t&&!n&&" - Instrumented"]}),e.other_agent&&e.other_agent.name&&(0,x.jsx)(h.xJ,{color:O.Z.colors.orange_brown,size:12,style:{marginTop:6},children:n?"By default, we do not operate alongside the ".concat(e.other_agent.name," Agent. Please contact the Odigos team for guidance on enabling this configuration."):i?"We are operating alongside the ".concat(e.other_agent.name," Agent, which is not the recommended configuration. We suggest disabling the ").concat(e.other_agent.name," Agent for optimal performance."):"Concurrent execution with the ".concat(e.other_agent.name," is not supported. Please disable one of the agents to enable proper instrumentation.")})]},e.container_name)})}),(0,x.jsx)(h.xJ,{size:14,color:O.Z.text.light_grey,children:"Note: The system automatically instruments the containers it detects with a supported programming language."})]})},eU=f.ZP.div.withConfig({displayName:"destinationstableheader__StyledThead",componentId:"sc-6l1uup-0"})(["background-color:",";border-top-right-radius:6px;border-top-left-radius:6px;"],O.Z.colors.light_dark),eH=f.ZP.th.withConfig({displayName:"destinationstableheader__StyledTh",componentId:"sc-6l1uup-1"})(["padding:10px 20px;text-align:left;border-bottom:1px solid ",";"],O.Z.colors.blue_grey),eV=(0,f.ZP)(eH).withConfig({displayName:"destinationstableheader__StyledMainTh",componentId:"sc-6l1uup-2"})(["padding:10px 20px;display:flex;align-items:center;gap:8px;"]),eY=f.ZP.div.withConfig({displayName:"destinationstableheader__ActionGroupContainer",componentId:"sc-6l1uup-3"})(["display:flex;justify-content:flex-end;padding-right:20px;gap:24px;flex:1;"]);function DestinationsTableHeader(e){var t=e.data,n=e.sortDestinations,i=e.filterDestinationsBySignal,r=(0,u.useState)(""),o=r[0],a=r[1],c=(0,u.useState)(["traces","logs","metrics"]),s=c[0],l=c[1];function onSortClick(e){a(e),n&&n(e)}function onGroupClick(e){var t=[];s.includes(e)?(l(s.filter(function(t){return t!==e})),t=s.filter(function(t){return t!==e})):(l([].concat((0,G.Z)(s),[e])),t=[].concat((0,G.Z)(s),[e])),i&&i(t)}var d=[{label:"Metrics",subTitle:"Display",items:[{label:p.NK.TRACES,onClick:function(){return onGroupClick(p.NK.TRACES.toLowerCase())},id:p.NK.TRACES.toLowerCase(),selected:s.includes(p.NK.TRACES.toLowerCase()),disabled:1===s.length&&s.includes(p.NK.TRACES.toLowerCase())},{label:p.NK.LOGS,onClick:function(){return onGroupClick(p.NK.LOGS.toLowerCase())},id:p.NK.LOGS.toLowerCase(),selected:s.includes(p.NK.LOGS.toLowerCase()),disabled:1===s.length&&s.includes(p.NK.LOGS.toLowerCase())},{label:p.NK.METRICS,onClick:function(){return onGroupClick(p.NK.METRICS.toLowerCase())},id:p.NK.METRICS.toLowerCase(),selected:s.includes(p.NK.METRICS.toLowerCase()),disabled:1===s.length&&s.includes(p.NK.METRICS.toLowerCase())}],condition:!0},{label:"Sort by",subTitle:"Sort by",items:[{label:"Type",onClick:function(){return onSortClick(R.DestinationsSortType.TYPE)},id:R.DestinationsSortType.TYPE,selected:o===R.DestinationsSortType.TYPE},{label:"Name",onClick:function(){return onSortClick(R.DestinationsSortType.NAME)},id:R.DestinationsSortType.NAME,selected:o===R.DestinationsSortType.NAME}],condition:!0}];return(0,x.jsx)(eU,{children:(0,x.jsxs)(eV,{children:[(0,x.jsx)(g.Qm,{size:18}),(0,x.jsx)(h.xJ,{size:14,weight:600,color:O.Z.text.white,children:"".concat(t.length," ").concat(p.mD.MENU.DESTINATIONS)}),(0,x.jsx)(eY,{children:(0,x.jsx)(h.BT,{actionGroups:d})})]})})}function destinations_table_row_ownKeys(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);t&&(i=i.filter(function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable})),n.push.apply(n,i)}return n}function destinations_table_row_objectSpread(e){for(var t=1;te.length)&&(t=e.length);for(var n=0,i=Array(t);ne.length)&&(t=e.length);for(var n=0,i=Array(t);n=e.length?{done:!0}:{done:!1,value:e[i++]}},e:function(e){throw e},f:F}}throw TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}var r,o=!0,a=!1;return{s:function(){n=n.call(e)},n:function(){var e=n.next();return o=e.done,e},e:function(e){a=!0,r=e},f:function(){try{o||null==n.return||n.return()}finally{if(a)throw r}}}}(n);try{for(i.s();!(e=i.n()).done;){var r=e.value;if(r.component_properties.required){var o=w[r.name];if(void 0===o||""===o.trim()||!O){t=!1;break}}}}catch(e){i.e(e)}finally{i.f()}m(!t)})()},[O,w]),(0,r.useEffect)(function(){p((s?et.map(function(e){return create_connection_form_objectSpread(create_connection_form_objectSpread({},e),{},{checked:s[e.id]})}):et).filter(function(e){var t,n,i=e.id;return null==o?void 0:null===(t=o.supported_signals)||void 0===t?void 0:null===(n=t[i])||void 0===n?void 0:n.supported}))},[o]),(0,V.K7)("Enter",function(e){h||onCreateClick()});var handleCheckboxChange=function(e){p(function(t){var n;return 1===t.filter(function(e){return e.checked}).length&&null!==(n=t.find(function(t){return t.id===e}))&&void 0!==n&&n.checked?t:t.map(function(t){return t.id===e?create_connection_form_objectSpread(create_connection_form_objectSpread({},t),{},{checked:!t.checked}):t})})};function onCreateClick(){var e=u.reduce(function(e,t){var n=t.id,i=t.checked;return create_connection_form_objectSpread(create_connection_form_objectSpread({},e),{},(0,b.Z)({},n,i))},{}),t=(0,ee.RB)(w);i({name:O,signals:e,fields:(0,ee.gs)(t),type:o.type})}function _handleCheckDestinationConnection(){return(_handleCheckDestinationConnection=(0,J.Z)(H().mark(function _callee(){var e,t,n;return H().wrap(function(i){for(;;)switch(i.prev=i.next){case 0:e=u.reduce(function(e,t){var n=t.id,i=t.checked;return create_connection_form_objectSpread(create_connection_form_objectSpread({},e),{},(0,b.Z)({},n,i))},{}),t=(0,ee.RB)(w),n={name:O,signals:e,fields:(0,ee.gs)(t),type:o.type};try{E(n,v)}catch(e){}case 5:case"end":return i.stop()}},_callee)}))).apply(this,arguments)}return(0,y.jsxs)(y.Fragment,{children:[(0,y.jsx)(l.xJ,{size:18,weight:600,children:a?ee.ye.UPDATE_CONNECTION:ee.ye.CREATE_CONNECTION}),(null==u?void 0:u.length)>=1&&(0,y.jsxs)(q,{children:[(0,y.jsx)(l.xJ,{size:14,children:ee.ye.CONNECTION_MONITORS}),(0,y.jsx)(G,{children:u.map(function(e){return(0,y.jsx)(l.Ho,{value:null==e?void 0:e.checked,onChange:function(){return handleCheckboxChange(null==e?void 0:e.id)},label:null==e?void 0:e.label},null==e?void 0:e.id)})})]}),(0,y.jsx)(Q,{children:(0,y.jsx)(l.ix,{"data-cy":"create-destination-input-name",label:ee.ye.DESTINATION_NAME,value:O,onChange:N,required:!0})}),(t=function(e,t){null!==x.enabled&&v({enabled:null,message:""}),C(function(n){return create_connection_form_objectSpread(create_connection_form_objectSpread({},n),{},(0,b.Z)({},e,t))})},null==n?void 0:n.map(function(e){var n=e.name,i=e.component_type,r=e.display_name,o=e.component_properties;switch(i){case Y.Ar.INPUT:return(0,y.jsx)(Q,{children:(0,y.jsx)(l.ix,dynamic_fields_objectSpread({"data-cy":"create-destination-input-"+n,label:r,value:w[n],onChange:function(e){return t(n,e)}},o))},n);case Y.Ar.DROPDOWN:var a=null==o?void 0:o.values.map(function(e){return{label:e,id:e}}),c=w[n]?{id:w[n],label:w[n]}:null;return(0,y.jsx)(Q,{children:(0,y.jsx)(l.p,dynamic_fields_objectSpread({label:r,width:354,data:a,onChange:function(e){return t(n,e.label)},value:c},o))},n);case Y.Ar.MULTI_INPUT:var s=w[n]||e.initial_value;return"string"==typeof s&&(s=(0,k.D6)(s,[])),(0,y.jsx)("div",{style:{marginTop:22},children:(0,y.jsx)(l.oq,dynamic_fields_objectSpread({title:r,values:s,placeholder:"Add value",onValuesChange:function(e){return t(n,0===e.length?[]:e)}},o))},n);case Y.Ar.KEY_VALUE_PAIR:var d=w[n]||X;"string"==typeof d&&(d=(0,k.D6)(d,{}));var u,p=[],f=0,h=function(e,t){var n="undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(!n){if(Array.isArray(e)||(n=function(e,t){if(e){if("string"==typeof e)return _arrayLikeToArray(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);if("Object"===n&&e.constructor&&(n=e.constructor.name),"Map"===n||"Set"===n)return Array.from(e);if("Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n))return _arrayLikeToArray(e,t)}}(e))){n&&(e=n);var i=0,F=function(){};return{s:F,n:function(){return i>=e.length?{done:!0}:{done:!1,value:e[i++]}},e:function(e){throw e},f:F}}throw TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}var r,o=!0,a=!1;return{s:function(){n=n.call(e)},n:function(){var e=n.next();return o=e.done,e},e:function(e){a=!0,r=e},f:function(){try{o||null==n.return||n.return()}finally{if(a)throw r}}}}(d=Object.keys(d).map(function(e){return{key:e,value:d[e]}}));try{for(h.s();!(u=h.n()).done;){var m=u.value,g=m.key,x=m.value;p.push({id:f++,key:g,value:x})}}catch(e){h.e(e)}finally{h.f()}return d=p,(0,y.jsx)("div",{style:{marginTop:22},children:(0,y.jsx)(l.C1,dynamic_fields_objectSpread({title:r,setKeyValues:function(e){t(n,e.map(function(e){return{key:e.key,value:e.value}}).reduce(function(e,t){return e[t.key]=t.value,e},{}))},keyValues:d},o))},n);case Y.Ar.TEXTAREA:return(0,y.jsx)(Q,{style:{width:362},children:(0,y.jsx)(l.Kx,dynamic_fields_objectSpread({label:r,value:w[n],onChange:function(e){return t(n,e.target.value)}},o))},n);default:return null}})),(0,y.jsxs)($,{children:[(null==o?void 0:o.test_connection_supported)&&(0,y.jsx)(l.ZT,{variant:"secondary",disabled:h,onClick:function(){return _handleCheckDestinationConnection.apply(this,arguments)},children:A?(0,y.jsx)(l.kQ,{width:9,height:9}):null===x.enabled?(0,y.jsx)(l.xJ,{color:M.Z.text.secondary,size:14,weight:600,children:"Test Connection"}):x.enabled?(0,y.jsx)(l.xJ,{color:M.Z.colors.success,size:14,weight:600,children:"Connection Successful"}):(0,y.jsx)(l.xJ,{color:M.Z.colors.error,size:14,weight:600,children:x.message})}),(0,y.jsx)(l.ZT,{"data-cy":"create-destination-create-click",disabled:h||!1===x.enabled,onClick:onCreateClick,children:(0,y.jsx)(l.xJ,{color:M.Z.colors.dark_blue,size:14,weight:600,children:a?ee.ye.UPDATE_DESTINATION:ee.ye.CREATE_DESTINATION})})]})]})}n(8727),o.ZP.div.withConfig({displayName:"quickhelpstyled__QuickHelpHeader",componentId:"sc-14uo69z-0"})(["display:flex;gap:8px;margin-bottom:20px;"]),o.ZP.div.withConfig({displayName:"quickhelpstyled__QuickHelpVideoWrapper",componentId:"sc-14uo69z-1"})(["margin-bottom:32px;"]),n(4865)},9628:function(e,t,n){"use strict";n.d(t,{M3:function(){return S.M3},aM:function(){return ChooseDestinationContainer},s0:function(){return S.s0},Ks:function(){return ChooseSourcesContainer},mn:function(){return ConnectDestinationContainer},Pn:function(){return S.Pn},Jg:function(){return S.Jg},F0:function(){return S.F0},Z9:function(){return S.Z9},bI:function(){return S.bI},cA:function(){return S.cA},ZJ:function(){return S.ZJ},aF:function(){return S.aF},mj:function(){return S.mj},Zr:function(){return S.Zr},$G:function(){return S.$G}});var i=n(9891),r=n(7022),o=n(6952),a=n.n(o),c=n(2265),s=n(1032),l=n(9608),d=n(3103),u=n(4033),p=n(299),f=n(4328),h=n(3046),m=n(4865),g=n(7437);function ownKeys(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);t&&(i=i.filter(function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable})),n.push.apply(n,i)}return n}function ChooseSourcesContainer(){var e=(0,u.useRouter)(),t=(0,h.I0)(),n=(0,h.v9)(function(e){return e.app.sources}),o=(0,d.Fi)({}),y=o.sectionData,x=o.setSectionData,v=o.totalSelected;function onNextClick(){return _onNextClick.apply(this,arguments)}function _onNextClick(){return(_onNextClick=(0,i.Z)(a().mark(function _callee(){return a().wrap(function(n){for(;;)switch(n.prev=n.next){case 0:t((0,l.ed)(y)),e.push(s.Z6.CHOOSE_DESTINATION);case 2:case"end":return n.stop()}},_callee)}))).apply(this,arguments)}return(0,c.useEffect)(function(){n&&x(function(e){for(var t=1;te.length)&&(t=e.length);for(var n=0,i=Array(t);n=e.length?{done:!0}:{done:!1,value:e[i++]}},e:function(e){throw e},f:F}}throw TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}var r,o=!0,a=!1;return{s:function(){n=n.call(e)},n:function(){var e=n.next();return o=e.done,e},e:function(e){a=!0,r=e},f:function(){try{o||null==n.return||n.return()}finally{if(a)throw r}}}}(s.categories);try{for(r.s();!(t=r.n()).done;){var a=t.value;if(i)break;var c=a.items.filter(function(t){return t.type===e});c.length&&(i=c[0])}}catch(e){r.e(e)}finally{r.f()}n(i)}},[s]),(0,u.jsxs)(u.Fragment,{children:[(0,u.jsx)(y.rc,{title:g.mD.MENU.DESTINATIONS,onBackClick:function(){a.back()}}),(0,u.jsx)(h,{children:c&&t&&(0,u.jsx)(v,{children:(0,u.jsx)(y.VU,{destinationType:c,selectedDestination:t,onSubmit:function(e){r(_objectSpread(_objectSpread({},e),{},{type:t.type}),{onSuccess:function(){return a.push("".concat(g.Z6.DESTINATIONS,"?status=created"))}})}})})})]})}var b=n(299),_=n(6757);function update_destination_flow_ownKeys(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);t&&(i=i.filter(function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable})),n.push.apply(n,i)}return n}function update_destination_flow_objectSpread(e){for(var t=1;t=5){clearInterval(l.current);return}},[o]),m)?(0,u.jsx)(b.kQ,{}):(0,u.jsx)(u.Fragment,{children:(0,u.jsx)(et,{children:null!=h&&h.length?(0,u.jsxs)(en,{children:[(0,u.jsxs)(ei,{children:[(0,u.jsx)(b.$q,{containerStyle:{padding:"6px 8px"},placeholder:g.mD.SEARCH_SOURCE,value:t,onChange:function(e){return n(e.target.value)}}),(0,u.jsx)(er,{children:(0,u.jsx)(b.ZT,{onClick:handleAddSources,style:{height:32},children:(0,u.jsx)(b.xJ,{size:14,weight:600,color:S.Z.text.dark_button,children:g.mD.ADD_NEW_SOURCE})})})]}),(0,u.jsx)(eo,{children:(0,u.jsx)(y.Np,{sortSources:x,onRowClick:function(e){c.push("".concat(g.Z6.MANAGE_SOURCE,"?name=").concat(null==e?void 0:e.name,"&kind=").concat(null==e?void 0:e.kind,"&namespace=").concat(null==e?void 0:e.namespace))},namespaces:C,filterSourcesByKind:_,filterByConditionStatus:N,deleteSourcesHandler:j,data:t?h.filter(function(e){return e.name.toLowerCase().includes(t.toLowerCase())||e.namespace.toLowerCase().includes(t.toLowerCase())}):h,filterSourcesByLanguage:w,filterSourcesByNamespace:O,filterByConditionMessage:I})})]}):(0,u.jsx)(y.rf,{title:g.mD.EMPTY_SOURCE,btnTitle:g.mD.ADD_NEW_SOURCE,btnAction:handleAddSources})})})}var ea=c.ZP.div.withConfig({displayName:"styled__SourcesSectionWrapper",componentId:"sc-3wq9l8-0"})(["position:relative;height:81%;::-webkit-scrollbar{display:none;}-ms-overflow-style:none;scrollbar-width:none;@media screen and (max-height:650px){height:72%;}@media screen and (max-height:550px){height:65%;}"]),ec=c.ZP.div.withConfig({displayName:"styled__ButtonWrapper",componentId:"sc-3wq9l8-1"})(["position:absolute;display:flex;align-items:center;gap:16px;right:32px;top:40px;"]),es=n(4328);function NewSourcesList(e){var t=e.onSuccess,n=(0,f.Fi)({}),i=n.sectionData,r=n.setSectionData,o=n.totalSelected,a=(0,f.hi)().upsertSources;return(0,u.jsxs)(u.Fragment,{children:[(0,u.jsxs)(ec,{children:[(0,u.jsx)(b.xJ,{children:"".concat(o," ").concat(g.ye.SELECTED)}),(0,u.jsx)(b.ZT,{disabled:0===o,onClick:function(){return a({sectionData:i,onSuccess:t,onError:null})},style:{width:110},children:(0,u.jsx)(b.xJ,{weight:600,color:S.Z.text.dark_button,children:g.mD.CONNECT})})]}),(0,u.jsx)(ea,{children:(0,u.jsx)(es.Y,{sectionData:i,setSectionData:r})})]})}function SelectSourcesContainer(){var e=(0,d.useRouter)();return(0,u.jsxs)("div",{style:{height:"100vh"},children:[(0,u.jsx)(o.rc,{title:g.mD.ADD_NEW_SOURCE,onBackClick:function(){return e.back()}}),(0,u.jsx)(NewSourcesList,{onSuccess:function(){e.push("".concat(g.Z6.SOURCES,"?poll=true"))}})]})}var el=c.ZP.div.withConfig({displayName:"managesourceheader__ManageSourceHeaderWrapper",componentId:"sc-1rsqc7w-0"})(["display:flex;width:100%;min-width:686px;height:104px;align-items:center;border-radius:25px;margin:24px 0;background:radial-gradient( 78.09% 72.18% at 100% -0%,rgba(150,242,255,0.4) 0%,rgba(150,242,255,0) 61.91% ),linear-gradient(180deg,#2e4c55 0%,#303355 100%);"]),ed={backgroundColor:"#fff",padding:4,marginRight:16,marginLeft:16};function ManageSourceHeader(e){var t=e.source,n=(0,g.LV)(t),i=g.Fs[n];return(0,u.jsxs)(el,{children:[(0,u.jsx)(b.uR,{src:i,style:ed}),(0,u.jsxs)("div",{style:{flex:1},children:[(0,u.jsx)(b.xJ,{size:24,weight:600,color:"#fff",children:t.name}),(0,u.jsxs)(b.xJ,{size:16,weight:400,color:"#fff",children:[t.kind,' in namespace "',t.namespace,'"']})]})]})}c.ZP.div.withConfig({displayName:"styled__ButtonWrapper",componentId:"sc-1xkiou7-0"})(["position:absolute;display:flex;align-items:center;gap:16px;right:32px;top:40px;"]);var eu=c.ZP.div.withConfig({displayName:"styled__ManageSourcePageContainer",componentId:"sc-1xkiou7-1"})(["padding:32px;"]),ep=c.ZP.div.withConfig({displayName:"styled__BackButtonWrapper",componentId:"sc-1xkiou7-2"})(["display:flex;width:fit-content;align-items:center;cursor:pointer;p{cursor:pointer !important;}"]),ef=c.ZP.div.withConfig({displayName:"styled__FieldWrapper",componentId:"sc-1xkiou7-3"})(["height:36px;width:348px;margin-bottom:64px;"]),eh=c.ZP.div.withConfig({displayName:"styled__SaveSourceButtonWrapper",componentId:"sc-1xkiou7-4"})(["margin-top:48px;height:36px;width:362px;"]),em=n(8727),eg=n(8660),ey=n(2245);function source_describe_ownKeys(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);t&&(i=i.filter(function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable})),n.push.apply(n,i)}return n}function source_describe_objectSpread(e){for(var t=1;t1&&void 0!==arguments[1]?arguments[1]:"";return Object.entries(e).map(function(e){var i=(0,eg.Z)(e,2),r=i[0],o=i[1],a="".concat(n,".").concat(r,".").concat(JSON.stringify(o));return"object"==typeof o&&null!==o&&o.hasOwnProperty("value")&&o.hasOwnProperty("name")?(0,u.jsxs)("div",{children:[(0,u.jsxs)("p",{onClick:function(){return t(a)},style:{cursor:"pointer"},children:[(0,u.jsxs)("strong",{children:[o.name,":"]})," ",String(o.value)]}),h[a]&&o.explain&&(0,u.jsx)(eO,{children:o.explain})]},a):"object"==typeof o&&null!==o?(0,u.jsx)("div",{style:{marginLeft:"16px"},children:renderObjectProperties(o)},r):Array.isArray(o)?(0,u.jsx)(CollectorSection,{title:r,collector:o},r):null})}(_)]})):"No source details available."})})]})},CollectorSection=function(e){var t=e.title,n=e.collector;return(0,u.jsxs)("section",{style:{marginTop:24},children:[(0,u.jsx)(eb,{children:t}),n.map(function(e,t){return(0,u.jsx)(CollectorItem,{label:e.podName.value,value:e.phase.value,status:e.phase.status},t)})]})},CollectorItem=function(e){var t=e.label,n=e.value,i="error"===e.status?S.Z.colors.error:S.Z.text.light_grey;return(0,u.jsxs)(eS,{color:i,children:["- ",t,": ",String(n)]})},ex=c.ZP.div.withConfig({displayName:"source-describe__VersionHeader",componentId:"sc-bbjjvc-0"})(["display:flex;align-items:center;justify-content:space-between;margin-bottom:10px;"]),ev=(0,c.ZP)(b.xJ).withConfig({displayName:"source-describe__VersionText",componentId:"sc-bbjjvc-1"})(["font-size:24px;"]),eb=(0,c.ZP)(b.xJ).withConfig({displayName:"source-describe__CollectorTitle",componentId:"sc-bbjjvc-2"})(["font-size:20px;margin-bottom:10px;"]),e_=c.ZP.div.withConfig({displayName:"source-describe__NotificationBadge",componentId:"sc-bbjjvc-3"})(["position:absolute;top:-4px;right:-4px;background-color:",";color:white;border-radius:50%;width:16px;height:16px;display:flex;align-items:center;justify-content:center;font-size:12px;"],function(e){var t=e.status;return"error"===t?S.Z.colors.error:"transitioning"===t?S.Z.colors.orange_brown:S.Z.colors.success}),ej=c.ZP.div.withConfig({displayName:"source-describe__IconWrapper",componentId:"sc-bbjjvc-4"})(["position:relative;padding:8px;width:16px;border-radius:8px;border:1px solid ",";display:flex;align-items:center;cursor:pointer;&:hover{background-color:",";}"],S.Z.colors.blue_grey,S.Z.colors.dark),ew=c.ZP.p.withConfig({displayName:"source-describe__LoadingMessage",componentId:"sc-bbjjvc-5"})(["font-size:1rem;color:#555;"]),eC=(0,c.ZP)(b.xJ).withConfig({displayName:"source-describe__DescriptionContent",componentId:"sc-bbjjvc-6"})(["white-space:pre-wrap;line-height:1.6;padding:20px;"]),eS=c.ZP.div.withConfig({displayName:"source-describe__StatusText",componentId:"sc-bbjjvc-7"})(["color:",";font-weight:bold;margin-bottom:8px;padding-left:16px;"],function(e){return e.color}),eO=c.ZP.p.withConfig({displayName:"source-describe__ExplanationText",componentId:"sc-bbjjvc-8"})(["font-size:0.9rem;color:",";margin-top:-5px;margin-bottom:10px;"],S.Z.text.light_grey);function EditSourceForm(){var e,t=(0,i.useState)(""),n=t[0],r=t[1],a=(0,i.useState)(),c=a[0],s=a[1],l=(0,d.useSearchParams)(),p=(0,d.useRouter)(),h=(0,m.useMutation)(function(){return(0,x.JN)((null==c?void 0:c.namespace)||"",(null==c?void 0:c.kind)||"",(null==c?void 0:c.name)||"")}).mutate,y=(0,m.useMutation)(function(){return(0,x.QA)((null==c?void 0:c.namespace)||"",(null==c?void 0:c.kind)||"",(null==c?void 0:c.name)||"",{reported_name:n})}).mutate;function _onPageLoad(){return(_onPageLoad=(0,j.Z)(C().mark(function _callee(){var e,t,n;return C().wrap(function(i){for(;;)switch(i.prev=i.next){case 0:return e=l.get("name")||"",t=l.get("kind")||"",n=l.get("namespace")||"",i.next=5,(0,x.b5)(n,t,e);case 5:s(i.sent);case 7:case"end":return i.stop()}},_callee)}))).apply(this,arguments)}function onSaveClick(){y(void 0,{onSuccess:function(){return p.push("".concat(g.Z6.SOURCES,"??poll=true"))}})}return(0,i.useEffect)(function(){(function(){_onPageLoad.apply(this,arguments)})()},[l]),(0,i.useEffect)(function(){r((null==c?void 0:c.reported_name)||"")},[c]),(0,f.K7)("Enter",function(e){onSaveClick()}),c?(0,u.jsxs)(eu,{children:[(0,u.jsxs)(ep,{onClick:function(){return p.back()},children:[(0,u.jsx)(em.xC,{size:14}),(0,u.jsx)(b.xJ,{size:14,children:g.ye.BACK})]}),(0,u.jsx)(eN,{children:(0,u.jsx)(SourceDescriptionDrawer,{namespace:c.namespace,kind:c.kind,name:c.name})}),c&&(0,u.jsx)(ManageSourceHeader,{source:c}),(0,u.jsxs)("div",{style:{display:"flex",gap:60},children:[(0,u.jsxs)("div",{children:[(0,u.jsx)(o.RB,{languages:c.instrumented_application_details.languages||[],conditions:c.instrumented_application_details.conditions}),(0,u.jsx)(ef,{children:(0,u.jsx)(b.ix,{label:g.mD.REPORTED_NAME,value:n,onChange:function(e){return r(e)}})}),(0,u.jsx)(eh,{children:(0,u.jsx)(b.ZT,{disabled:!n,onClick:onSaveClick,children:(0,u.jsx)(b.xJ,{color:S.Z.colors.dark_blue,size:14,weight:600,children:g.om.SAVE})})}),(0,u.jsx)(o.R6,{onDelete:function(){h(void 0,{onSuccess:function(){return p.push("".concat(g.Z6.SOURCES,"??poll=true"))}})},name:null==c?void 0:c.name,image_url:g.Fs[(0,g.LV)(c)]})]}),(0,u.jsx)(b.G3,{conditions:null===(e=c.instrumented_application_details)||void 0===e?void 0:e.conditions})]})]}):(0,u.jsx)(b.kQ,{})}var eN=c.ZP.div.withConfig({displayName:"editsource__DrawerContainer",componentId:"sc-vygftu-0"})(["position:absolute;right:32px;top:16px;"]),eI=c.ZP.div.withConfig({displayName:"styled__Container",componentId:"sc-izwyro-0"})(["display:flex;justify-content:center;max-height:100%;overflow-y:auto;"]),eE=c.ZP.div.withConfig({displayName:"styled__DestinationsContainer",componentId:"sc-izwyro-1"})(["margin-top:24px;width:100%;max-width:1216px;"]),eA=c.ZP.div.withConfig({displayName:"styled__Header",componentId:"sc-izwyro-2"})(["display:flex;justify-content:space-between;padding:0 24px;align-items:center;"]),eT=c.ZP.div.withConfig({displayName:"styled__HeaderRight",componentId:"sc-izwyro-3"})(["display:flex;gap:8px;align-items:center;"]),eP=c.ZP.div.withConfig({displayName:"styled__Content",componentId:"sc-izwyro-4"})(["padding:20px;min-height:200px;"]);function DestinationContainer(){var e=(0,i.useState)(""),t=e[0],n=e[1],r=(0,f.um)(),o=r.destinationList,a=r.destinationLoading,c=r.sortDestinations,s=r.refetchDestinations,l=r.filterDestinationsBySignal,p=(0,d.useRouter)();function handleAddDestination(){p.push(g.Z6.CREATE_DESTINATION)}return((0,i.useEffect)(function(){s()},[]),a)?(0,u.jsx)(b.kQ,{}):(0,u.jsx)(eI,{children:null!=o&&o.length?(0,u.jsxs)(eE,{children:[(0,u.jsxs)(eA,{children:[(0,u.jsx)(b.$q,{containerStyle:{padding:"6px 8px"},value:t,onChange:function(e){return n(e.target.value)}}),(0,u.jsx)(eT,{children:(0,u.jsx)(b.ZT,{onClick:handleAddDestination,style:{height:32},children:(0,u.jsx)(b.xJ,{size:14,weight:600,color:S.Z.text.dark_button,children:g.mD.ADD_NEW_DESTINATION})})})]}),(0,u.jsx)(eP,{children:(0,u.jsx)(y.bk,{sortDestinations:c,filterDestinationsBySignal:l,data:t?o.filter(function(e){return e.name.toLowerCase().includes(t.toLowerCase())}):o,onRowClick:function(e){var t=e.id;return p.push("".concat(g.Z6.UPDATE_DESTINATION).concat(t))}})})]}):(0,u.jsx)(y.rf,{title:g.mD.EMPTY_DESTINATION,btnTitle:g.mD.ADD_NEW_DESTINATION,btnAction:handleAddDestination})})}var ek=c.ZP.div.withConfig({displayName:"styled__OverviewDataFlowWrapper",componentId:"sc-10vv524-0"})(["width:100%;height:100%;"]);function data_flow_ownKeys(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);t&&(i=i.filter(function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable})),n.push.apply(n,i)}return n}function data_flow_objectSpread(e){for(var t=1;t0?r:[{language:"default",container_name:""}]});var c=formatBytes(null==a?void 0:a.throughput);return data_flow_objectSpread(data_flow_objectSpread({},e),{},{conditions:o,metrics:{data_transfer:c},languages:r.length>0?r:[{language:"default",container_name:""}]})}),i=_.map(function(e){var t,n=null==S?void 0:null===(t=S.destinations)||void 0===t?void 0:t.find(function(t){return t.id===e.id});if(!n)return e;var i=formatBytes(null!=n&&n.throughput||(null==n?void 0:n.throughput)===0?null==n?void 0:n.throughput:0);return data_flow_objectSpread(data_flow_objectSpread({},e),{},{metrics:{data_transfer:i}})}),r=(0,em.xq)(t,i,e),o=r.nodes,c=r.edges;n(o),a(c)}},[h,_,y,S]),(0,i.useEffect)(function(){if(w.get("poll"))return C.current=setInterval(function(){Promise.all([x(),j()]).then(function(){}).catch(console.error),l(function(e){return e+1})},2e3),function(){return clearInterval(C.current)}},[j,x,s,w]),(0,i.useEffect)(function(){if(s>=5){clearInterval(C.current);return}},[s]),t&&o)?(0,u.jsx)(ek,{children:(0,u.jsx)(b.tA,{nodes:t,edges:o,onNodeClick:function(e,t){var n;(null==t?void 0:t.type)==="destination"&&p.push("".concat(g.Z6.UPDATE_DESTINATION).concat(t.data.id)),(null==t?void 0:t.type)==="action"&&p.push("".concat(g.Z6.EDIT_ACTION,"?id=").concat(t.data.id)),null!=t&&null!==(n=t.data)&&void 0!==n&&n.kind&&p.push("".concat(g.Z6.MANAGE_SOURCE,"?name=").concat(t.data.name,"&namespace=").concat(t.data.namespace,"&kind=").concat(t.data.kind))}})}):(0,u.jsx)(b.kQ,{})}function formatBytes(e){if(0===e)return"0 KB/s";var t=Math.floor(Math.log(e)/Math.log(1024));return"".concat((e/Math.pow(1024,t)).toFixed(2)," ").concat(["Bytes","KB/s","MB/s","GB/s","TB/s"][t])}var eD=n(4667),OdigosDescriptionDrawer=function(e){(0,eD.Z)(e);var t=(0,i.useState)(!1),n=t[0],r=t[1],o=(0,i.useState)("success"),a=o[0],c=o[1],s=(0,f.HY)(),l=s.odigosDescription,d=s.isOdigosLoading,p=s.refetchOdigosDescription;return(0,i.useEffect)(function(){if(l){var e,t=(e=[],Object.values(l.clusterCollector).forEach(function(t){t.status&&e.push(t.status)}),Object.values(l.nodeCollector).forEach(function(t){t.status&&e.push(t.status)}),e);t.includes("error")?c("error"):t.includes("transitioning")?c("transitioning"):c("success")}},[l]),(0,i.useEffect)(function(){p()},[p]),(0,u.jsxs)(u.Fragment,{children:[(0,u.jsxs)(eF,{onClick:function(){return r(!n)},children:[(0,u.jsx)(ey.fP,{style:{cursor:"pointer"},size:10}),!d&&(0,u.jsx)(eM,{status:a,children:(0,u.jsx)(b.xJ,{size:10,children:"transitioning"===a?"...":"error"===a?"!":""})})]}),n&&(0,u.jsx)(b.dy,{isOpen:n,onClose:function(){return r(!1)},position:"right",width:"fit-content",children:d?(0,u.jsx)(ez,{children:"Loading description..."}):(0,u.jsx)(eB,{children:l?(0,u.jsxs)("div",{children:[l.odigosVersion&&(0,u.jsxs)(eZ,{children:[(0,u.jsxs)(eR,{children:[l.odigosVersion.name,": ",l.odigosVersion.value]}),(0,u.jsx)(eF,{onClick:p,children:(0,u.jsx)(ey.hY,{size:16})})]}),(0,u.jsxs)("p",{children:["Destinations: ",l.numberOfDestinations]}),(0,u.jsxs)("p",{children:["Sources: ",l.numberOfSources]}),(0,u.jsx)(odigos_describe_CollectorSection,{title:"Cluster Collector",collector:l.clusterCollector}),(0,u.jsx)(odigos_describe_CollectorSection,{title:"Node Collector",collector:l.nodeCollector})]}):"No description available."})})]})},odigos_describe_CollectorSection=function(e){var t=e.title,n=e.collector;return(0,u.jsxs)("section",{style:{marginTop:24},children:[(0,u.jsx)(eL,{children:t}),Object.entries(n).map(function(e){var t=(0,eg.Z)(e,2),n=t[0],i=t[1];return(0,u.jsx)(odigos_describe_CollectorItem,{label:i.name,value:i.value,status:i.status,explain:i.explain},n)})]})},odigos_describe_CollectorItem=function(e){var t=e.label,n=e.value,r=e.status,o=e.explain,a=(0,i.useState)(!1),c=a[0],s=a[1],l="error"===r?S.Z.colors.error:S.Z.text.light_grey;return(0,u.jsxs)("div",{style:{paddingLeft:"16px",marginBottom:"8px"},children:[(0,u.jsxs)(eK,{color:l,onClick:function(){return s(!c)},children:["- ",t,": ",String(n)]}),c&&(0,u.jsx)(eW,{children:o})]})},eZ=c.ZP.div.withConfig({displayName:"odigos-describe__VersionHeader",componentId:"sc-1uxoyp-0"})(["display:flex;align-items:center;justify-content:space-between;margin-bottom:10px;"]),eR=(0,c.ZP)(b.xJ).withConfig({displayName:"odigos-describe__VersionText",componentId:"sc-1uxoyp-1"})(["font-size:24px;"]),eL=(0,c.ZP)(b.xJ).withConfig({displayName:"odigos-describe__CollectorTitle",componentId:"sc-1uxoyp-2"})(["font-size:20px;margin-bottom:10px;"]),eM=c.ZP.div.withConfig({displayName:"odigos-describe__NotificationBadge",componentId:"sc-1uxoyp-3"})(["position:absolute;top:-4px;right:-4px;background-color:",";color:white;border-radius:50%;width:16px;height:16px;display:flex;align-items:center;justify-content:center;font-size:12px;"],function(e){var t=e.status;return"error"===t?S.Z.colors.error:"transitioning"===t?S.Z.colors.orange_brown:S.Z.colors.success}),eF=c.ZP.div.withConfig({displayName:"odigos-describe__IconWrapper",componentId:"sc-1uxoyp-4"})(["position:relative;padding:8px;width:16px;border-radius:8px;border:1px solid ",";display:flex;align-items:center;cursor:pointer;&:hover{background-color:",";}"],S.Z.colors.blue_grey,S.Z.colors.dark),ez=c.ZP.p.withConfig({displayName:"odigos-describe__LoadingMessage",componentId:"sc-1uxoyp-5"})(["font-size:1rem;color:#555;"]),eB=(0,c.ZP)(b.xJ).withConfig({displayName:"odigos-describe__DescriptionContent",componentId:"sc-1uxoyp-6"})(["white-space:pre-wrap;line-height:1.6;padding:20px;max-width:650px;"]),eK=c.ZP.div.withConfig({displayName:"odigos-describe__StatusText",componentId:"sc-1uxoyp-7"})(["color:",";font-weight:bold;cursor:pointer;"],function(e){return e.color}),eW=c.ZP.span.withConfig({displayName:"odigos-describe__StatusBadge",componentId:"sc-1uxoyp-8"})(["font-size:0.8rem;font-weight:normal;margin-left:4px;color:inherit;"]),eJ=n(8078)},8078:function(e,t,n){"use strict";n.d(t,{s0:function(){return ChooseInstrumentationRuleContainer},Jg:function(){return CreateInstrumentationRulesContainer},cA:function(){return EditInstrumentationRuleContainer},Nc:function(){return ManagedInstrumentationRulesContainer}});var i=n(2265),r=n(3672),o=n(3024),a=n(4033),c=n(3103),s=n(299),l=n(3587),d=l.ZP.div.withConfig({displayName:"styled__Container",componentId:"sc-3j75fw-0"})(["display:flex;justify-content:center;max-height:100%;overflow-y:auto;"]),u=l.ZP.div.withConfig({displayName:"styled__InstrumentationRulesContainer",componentId:"sc-3j75fw-1"})(["margin-top:24px;width:100%;max-width:1216px;"]),p=l.ZP.div.withConfig({displayName:"styled__Header",componentId:"sc-3j75fw-2"})(["display:flex;justify-content:space-between;padding:0 24px;align-items:center;"]),f=l.ZP.div.withConfig({displayName:"styled__HeaderRight",componentId:"sc-3j75fw-3"})(["display:flex;gap:8px;align-items:center;"]),h=l.ZP.div.withConfig({displayName:"styled__Content",componentId:"sc-3j75fw-4"})(["padding:20px;min-height:200px;"]),m=n(4490),g=n(1032),y=n(2245),x=n(9353),v=n(7437);function RuleRowDynamicContent(e){return e.item,(0,v.jsx)(v.Fragment,{children:"payload-collection"===x.RulesType.PAYLOAD_COLLECTION?(0,v.jsx)(s.xJ,{color:r.Z.text.grey,size:14,weight:400,children:" "}):(0,v.jsx)("div",{})})}var b=l.ZP.tr.withConfig({displayName:"instrumentationrulestablerow__StyledTr",componentId:"sc-puz92q-0"})(["&:hover{background-color:",";}"],r.Z.colors.light_dark),_=l.ZP.td.withConfig({displayName:"instrumentationrulestablerow__StyledTd",componentId:"sc-puz92q-1"})(["padding:10px 20px;border-top:1px solid ",";display:flex;",""],r.Z.colors.blue_grey,function(e){return e.isFirstRow&&(0,l.iv)(["border-top:none;"])}),j=(0,l.ZP)(_).withConfig({displayName:"instrumentationrulestablerow__StyledMainTd",componentId:"sc-puz92q-2"})(["cursor:pointer;padding:10px 20px;"]),w=l.ZP.div.withConfig({displayName:"instrumentationrulestablerow__RuleIconContainer",componentId:"sc-puz92q-3"})(["display:flex;gap:8px;margin-left:10px;width:100%;"]),C=l.ZP.div.withConfig({displayName:"instrumentationrulestablerow__RuleDetails",componentId:"sc-puz92q-4"})(["display:flex;flex-direction:column;gap:4px;"]),S=l.ZP.div.withConfig({displayName:"instrumentationrulestablerow__ClusterAttributesContainer",componentId:"sc-puz92q-5"})(["display:flex;gap:8px;align-items:center;"]);function InstrumentationRulesTableRow(e){var t=e.item,n=e.index,i=e.onRowClick;return(0,v.jsx)(b,{children:(0,v.jsx)(j,{isFirstRow:0===n,onClick:function(){return i((null==t?void 0:t.ruleId)||"")},children:(0,v.jsxs)(w,{children:[(0,v.jsx)("div",{style:{height:16},children:(0,v.jsx)(y.Kq,{style:{width:16,height:16}})}),(0,v.jsxs)(C,{children:[(0,v.jsx)(s.xJ,{color:r.Z.colors.light_grey,size:12,children:g.Of["payload-collection"].TITLE}),(0,v.jsxs)(S,{children:[(0,v.jsx)(s.xJ,{"data-cy":"rules-rule-name",weight:600,children:"".concat((null==t?void 0:t.ruleName)||"Rule")}),(0,v.jsx)(RuleRowDynamicContent,{item:t})]}),(0,v.jsx)(s.xJ,{color:r.Z.text.light_grey,size:14,children:null==t?void 0:t.notes})]})]})})},null==t?void 0:t.ruleId)}var O=l.ZP.div.withConfig({displayName:"instrumentationrulestableheader__StyledThead",componentId:"sc-11m7g1z-0"})(["background-color:",";border-top-right-radius:6px;border-top-left-radius:6px;"],r.Z.colors.light_dark),N=l.ZP.th.withConfig({displayName:"instrumentationrulestableheader__StyledTh",componentId:"sc-11m7g1z-1"})(["padding:10px 20px;text-align:left;border-bottom:1px solid ",";"],r.Z.colors.blue_grey),I=(0,l.ZP)(N).withConfig({displayName:"instrumentationrulestableheader__StyledMainTh",componentId:"sc-11m7g1z-2"})(["padding:10px 20px;display:flex;align-items:center;gap:8px;"]);function InstrumentationRulesTableHeader(e){var t=e.data;return(0,v.jsx)(O,{children:(0,v.jsxs)(I,{children:[(0,v.jsx)(y.oe,{style:{width:18}}),(0,v.jsx)(s.xJ,{size:14,weight:600,color:r.Z.text.white,children:"".concat(t.length," ").concat(g.mD.MENU.INSTRUMENTATION_RULES)})]})})}var InstrumentationRulesTable=function(e){var t=e.data,n=e.onRowClick,r=(0,i.useState)([]),o=r[0],a=r[1],c=(0,i.useState)(1),l=c[0],d=c[1],u=(0,i.useState)(10),p=u[0],f=u[1],h=i.useRef(1);return(0,v.jsx)(v.Fragment,{children:(0,v.jsx)(s.iA,{data:t,renderTableHeader:function(){return(0,v.jsx)(InstrumentationRulesTableHeader,{data:t})},onPaginate:function(e){h.current=e,o.length>0&&a([])},renderEmptyResult:function(){return(0,v.jsx)(m.rf,{title:"No rules found"})},currentPage:l,itemsPerPage:p,setCurrentPage:d,setItemsPerPage:f,renderTableRows:function(e,t){return(0,v.jsx)(InstrumentationRulesTableRow,{item:e,index:t,onRowClick:n})}})})};function ManagedInstrumentationRulesContainer(){var e=(0,a.useRouter)(),t=(0,c.RP)(),n=t.isLoading,l=t.rules,m=t.refetch;function handleAddRule(){e.push("/choose-rule")}return(t.removeRule,(0,i.useEffect)(function(){m()},[]),n)?(0,v.jsx)(s.kQ,{}):(0,v.jsx)(v.Fragment,{children:(0,v.jsx)(d,{children:null!=l&&l.length?(0,v.jsxs)(u,{children:[!(n||1===l.length)&&(0,v.jsxs)(p,{children:[(0,v.jsx)("div",{}),(0,v.jsx)(f,{children:(0,v.jsx)(s.ZT,{onClick:handleAddRule,style:{height:32},children:(0,v.jsx)(s.xJ,{size:14,weight:600,color:r.Z.text.dark_button,children:"Add Rule"})})})]}),(0,v.jsx)(h,{children:(0,v.jsx)(InstrumentationRulesTable,{data:l,onRowClick:function(t){e.push("edit-rule?id=".concat(t))}})})]}):(0,v.jsx)(o.rf,{title:"No rules found",btnTitle:"Add Rule",btnAction:handleAddRule})})})}var E=l.ZP.div.withConfig({displayName:"styled__ActionsListWrapper",componentId:"sc-ihyi7j-0"})(["display:grid;grid-template-columns:repeat(auto-fill,minmax(220px,1fr));gap:16px;padding:0 24px 24px 24px;overflow-y:auto;align-items:start;max-height:100%;padding-bottom:220px;box-sizing:border-box;"]),A=l.ZP.div.withConfig({displayName:"styled__DescriptionWrapper",componentId:"sc-ihyi7j-1"})(["padding:24px;gap:4px;display:flex;flex-wrap:wrap;align-items:center;"]),T=l.ZP.div.withConfig({displayName:"styled__LinkWrapper",componentId:"sc-ihyi7j-2"})(["width:100px;"]),P=l.ZP.div.withConfig({displayName:"styled__ActionCardWrapper",componentId:"sc-ihyi7j-3"})(["height:100%;max-height:220px;"]),k=[{id:"payload-collection",title:"Payload Collection",description:"Record operation payloads as span attributes where supported.",type:x.InstrumentationRuleType.PAYLOAD_COLLECTION,icon:x.InstrumentationRuleType.PAYLOAD_COLLECTION}];function ChooseInstrumentationRuleContainer(){var e=(0,a.useRouter)();function onItemClick(t){var n=t.item;e.push("/create-rule?type=".concat(n.type))}return(0,v.jsxs)(v.Fragment,{children:[(0,v.jsxs)(A,{children:[(0,v.jsx)(s.xJ,{size:14,children:g.mD.INSTRUMENTATION_RULE_DESCRIPTION}),(0,v.jsx)(T,{children:(0,v.jsx)(s.Rf,{fontSize:14,value:g.om.LINK_TO_DOCS,onClick:function(){return window.open(g.VR,"_blank")}})})]}),(0,v.jsx)(E,{children:k.map(function(e){return(0,v.jsx)(P,{"data-cy":"choose-instrumentation-rule-"+e.type,children:(0,v.jsx)(o.S3,{item:e,onClick:onItemClick})},e.id)})})]})}var D=n(9891),Z=n(7022),R=n(6952),L=n.n(R),M=l.ZP.div.withConfig({displayName:"styled__Container",componentId:"sc-1u0f3i9-0"})(["display:flex;height:100%;padding:24px;.action-yaml-column{display:none;}@media screen and (max-height:700px){height:90%;}@media screen and (max-width:1200px){.action-yaml-row{display:none;}.action-yaml-column{display:block;}width:100%;}"]),z=l.ZP.div.withConfig({displayName:"styled__HeaderText",componentId:"sc-1u0f3i9-1"})(["display:flex;align-items:center;gap:8px;"]),B=l.ZP.div.withConfig({displayName:"styled__CreateActionWrapper",componentId:"sc-1u0f3i9-2"})(["display:flex;flex-direction:column;gap:16px;padding:24px;padding-top:0;box-sizing:border-box;max-height:90%;overflow-y:auto;@media screen and (max-height:450px){max-height:85%;}@media screen and (max-width:1200px){width:100%;}"]);(0,l.ZP)(B).withConfig({displayName:"styled__ActionYamlWrapper",componentId:"sc-1u0f3i9-3"})([""]);var K=l.ZP.div.withConfig({displayName:"styled__KeyvalInputWrapper",componentId:"sc-1u0f3i9-4"})(["width:362px;"]),W=l.ZP.div.withConfig({displayName:"styled__TextareaWrapper",componentId:"sc-1u0f3i9-5"})(["width:375px;"]),J=l.ZP.div.withConfig({displayName:"styled__CreateButtonWrapper",componentId:"sc-1u0f3i9-6"})(["margin-top:32px;width:375px;"]),U=l.ZP.div.withConfig({displayName:"styled__DescriptionWrapper",componentId:"sc-1u0f3i9-7"})(["width:100%;max-width:40vw;min-width:370px;margin-bottom:16px;display:flex;flex-direction:column;gap:6px;"]);l.ZP.div.withConfig({displayName:"styled__LinkWrapper",componentId:"sc-1u0f3i9-8"})(["margin-left:8px;width:100px;"]);var H=l.ZP.div.withConfig({displayName:"styled__LoaderWrapper",componentId:"sc-1u0f3i9-9"})(["display:flex;justify-content:center;align-items:center;height:100%;"]);function ownKeys(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);t&&(i=i.filter(function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable})),n.push.apply(n,i)}return n}function _objectSpread(e){for(var t=1;t0)},[n]);var handleSelectAllChange=function(e,t){o(e,t),l(t)},handleItemChange=function(e){r(e,n.title)};return(0,x.jsxs)("div",{children:[(0,x.jsxs)("div",{style:{marginBottom:8,display:"flex",alignItems:"center"},children:[(0,x.jsx)(d.Ho,{value:c,onChange:function(){return handleSelectAllChange(n.title,!c)},label:""}),(0,x.jsxs)("div",{style:{cursor:"pointer",display:"flex",alignItems:"center"},onClick:function(){i(n),f(!p)},children:[(0,x.jsx)(d.xJ,{style:{marginLeft:8,flex:1,cursor:"pointer"},children:n.title}),(0,x.jsx)(v,{expanded:p,children:(0,x.jsx)(y.Y8,{size:10})})]})]}),p&&(0,x.jsx)("div",{style:{paddingLeft:"20px"},children:null===(t=n.items)||void 0===t?void 0:t.map(function(e,t){return(0,x.jsx)("div",{style:{cursor:"pointer",marginBottom:8},children:(0,x.jsx)(d.Ho,{value:e.selected,onChange:function(){return handleItemChange(e)},label:"".concat(e.name," / ").concat(e.kind.toLowerCase())})},t)})})]})}var b=n(3672),_=n(3103),j=n(4033),w=n(9608),C=n(3046);function ownKeys(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);t&&(i=i.filter(function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable})),n.push.apply(n,i)}return n}function _objectSpread(e){for(var t=1;t=e.length?{done:!0}:{done:!1,value:e[i++]}},e:function(e){throw e},f:F}}throw TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}var r,o=!0,a=!1;return{s:function(){n=n.call(e)},n:function(){var e=n.next();return o=e.done,e},e:function(e){a=!0,r=e},f:function(){try{o||null==n.return||n.return()}finally{if(a)throw r}}}}function _arrayLikeToArray(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,i=Array(t);ne.length)&&(t=e.length);for(var n=0,i=Array(t);n=e.length?{done:!0}:{done:!1,value:e[i++]}},e:function(e){throw e},f:F}}throw TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}var r,o=!0,a=!1;return{s:function(){n=n.call(e)},n:function(){var e=n.next();return o=e.done,e},e:function(e){a=!0,r=e},f:function(){try{o||null==n.return||n.return()}finally{if(a)throw r}}}}(e),u.prev=1,n.s();case 3:if((i=n.n()).done){u.next=20;break}return o=i.value,u.next=7,getActionById(o);case 7:if(!((c=u.sent)&&c.spec.disabled!==t)){u.next=18;break}return s=useActions_objectSpread(useActions_objectSpread({id:c.id},c.spec),{},{disabled:t,type:c.type}),u.prev=10,u.next=13,h(s);case 13:u.next=18;break;case 15:return u.prev=15,u.t0=u.catch(10),u.abrupt("return",Promise.reject(!1));case 18:u.next=3;break;case 20:u.next=25;break;case 22:u.prev=22,u.t1=u.catch(1),n.e(u.t1);case 25:return u.prev=25,n.f(),u.finish(25);case 28:return setTimeout((0,a.Z)(l().mark(function _callee2(){return l().wrap(function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,r();case 2:d(e.sent.data||[]);case 4:case"end":return e.stop()}},_callee2)})),1e3),u.abrupt("return",Promise.resolve(!0));case 30:case"end":return u.stop()}},_callee3,null,[[1,22,25,28],[10,15]])}))).apply(this,arguments)}function _handleActionsRefresh(){return(_handleActionsRefresh=(0,a.Z)(l().mark(function _callee4(){return l().wrap(function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,r();case 2:d(e.sent.data||[]);case 4:case"end":return e.stop()}},_callee4)}))).apply(this,arguments)}return(0,i.useEffect)(function(){d(n||[])},[n]),{isLoading:t,actions:s||[],sortActions:function(e){d((0,o.Z)(n||[]).sort(function(t,n){var i,r,o,a;switch(e){case u.ActionsSortType.TYPE:return t.type.localeCompare(n.type);case u.ActionsSortType.ACTION_NAME:var c=(null===(i=t.spec)||void 0===i?void 0:i.actionName)||"",s=(null===(r=n.spec)||void 0===r?void 0:r.actionName)||"";return c.localeCompare(s);case u.ActionsSortType.STATUS:return(null!==(o=t.spec)&&void 0!==o&&o.disabled?1:-1)-(null!==(a=n.spec)&&void 0!==a&&a.disabled?1:-1);default:return 0}}))},getActionById:getActionById,filterActionsBySignal:function(e){d(null==n?void 0:n.filter(function(t){return e.some(function(e){return t.spec.signals.includes(e.toUpperCase())})}))},toggleActionStatus:function(e,t){return _toggleActionStatus.apply(this,arguments)},refetch:function(){return _handleActionsRefresh.apply(this,arguments)}}}function useActionState_ownKeys(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);t&&(i=i.filter(function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable})),n.push.apply(n,i)}return n}function useActionState_objectSpread(e){for(var t=1;t0)||void 0===f[0]||f[0],n=t.actionName,i=t.actionNote,r=t.actionData,o=t.selectedMonitors,a=t.disabled,p=useActionState_objectSpread(useActionState_objectSpread({actionName:n,notes:i,signals:getSupportedSignals(c=t.type,o).filter(function(e){return e.checked}).map(function(e){return e.label.toUpperCase()})},function(e,t){switch(e){case u.ActionsType.ADD_CLUSTER_INFO:return{clusterAttributes:t.clusterAttributes.filter(function(e){return""!==e.attributeStringValue&&""!==e.attributeName})};case u.ActionsType.DELETE_ATTRIBUTES:return{attributeNamesToDelete:t.attributeNamesToDelete.filter(function(e){return""!==e})};case u.ActionsType.RENAME_ATTRIBUTES:return{renames:Object.fromEntries(Object.entries(t.renames).filter(function(e){var t=(0,x.Z)(e,2),n=t[0],i=t[1];return""!==n&&""!==i}))};default:return t}}(c,r)),{},{disabled:e?a:!a}),l.prev=5,!(null!=t&&t.id)){l.next=11;break}return l.next=9,d(p);case 9:l.next=14;break;case 11:return delete p.disabled,l.next=14,s(p);case 14:e&&onSuccess(),l.next=20;break;case 17:l.prev=17,l.t0=l.catch(5),console.error({error:l.t0});case 20:case"end":return l.stop()}},_callee3,null,[[5,17]])}))).apply(this,arguments)}function getSupportedSignals(e,t){return e===u.ActionsType.ERROR_SAMPLER||e===u.ActionsType.PROBABILISTIC_SAMPLER||e===u.ActionsType.LATENCY_SAMPLER||e===u.ActionsType.PII_MASKING?t.filter(function(e){return"Traces"===e.label}):t}return{actionState:t,upsertAction:upsertAction,onDeleteAction:function(){try{null!=t&&t.id&&(h(t.id),onSuccess())}catch(e){}},buildActionData:function(e){return _buildActionData.apply(this,arguments)},getSupportedSignals:getSupportedSignals,onChangeActionState:function(e,t){n(function(n){return useActionState_objectSpread(useActionState_objectSpread({},n),{},(0,c.Z)({},e,t))}),"disabled"===e&&upsertAction(!1)}}}var b=n(9608),useNotify=function(){var e=b.h.dispatch;return function(t){var n=t.message,i=t.title,r=t.type,o=t.target,a=t.crdType,c=new Date().getTime().toString();e((0,b.wN)({id:c,message:n,title:i,type:r,target:o,crdType:a}))}};function useSSE(){var e=(0,i.useRef)({}),t=(0,i.useState)(0),n=(t[0],t[1]);(0,i.useEffect)(function(){var t=function connect(){var t=new EventSource(m.bl.EVENTS);return t.onmessage=function(t){var i=JSON.parse(t.data),r=t.data,o={id:Date.now(),message:i.data,title:i.event,type:i.type,target:i.target,crdType:i.crdType};if(e.current[r]&&e.current[r].id>Date.now()-2e3){e.current[r]=o;return}e.current[r]=o,b.h.dispatch((0,b.wN)({id:e.current[r].id,message:e.current[r].message,title:e.current[r].title,type:e.current[r].type,target:e.current[r].target,crdType:e.current[r].crdType})),n(0)},t.onerror=function(e){console.error("EventSource failed:",e),t.close(),n(function(e){if(!(e<10))return console.error("Max retries reached. Could not reconnect to EventSource."),b.h.dispatch((0,b.wN)({id:Date.now().toString(),message:"Could not reconnect to EventSource.",title:"Error",type:"error",target:"notification",crdType:"notification"})),e;var t=e+1;return setTimeout(function(){connect()},Math.min(1e4,1e3*Math.pow(2,t))),t})},t}();return function(){t.close()}},[])}var _=n(6140);function getOverviewMetrics(){return _getOverviewMetrics.apply(this,arguments)}function _getOverviewMetrics(){return(_getOverviewMetrics=(0,a.Z)(l().mark(function _callee(){return l().wrap(function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,(0,_.U2)(d.bl.OVERVIEW_METRICS);case 2:return e.abrupt("return",e.sent);case 3:case"end":return e.stop()}},_callee)}))).apply(this,arguments)}function useOverviewMetrics(){return{metrics:(0,p.useQuery)([],getOverviewMetrics,{refetchInterval:5e3}).data}}function useInstrumentationRule_ownKeys(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);t&&(i=i.filter(function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable})),n.push.apply(n,i)}return n}function useInstrumentationRule_objectSpread(e){for(var t=1;te.length)&&(t=e.length);for(var n=0,i=Array(t);n=e.length?{done:!0}:{done:!1,value:e[i++]}},e:function(e){throw e},f:F}}throw TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}var r,o=!0,a=!1;return{s:function(){n=n.call(e)},n:function(){var e=n.next();return o=e.done,e},e:function(e){a=!0,r=e},f:function(){try{o||null==n.return||n.return()}finally{if(a)throw r}}}}(e),d.prev=1,n.s();case 3:if((i=n.n()).done){d.next=20;break}return o=i.value,d.next=7,getRuleById(o);case 7:if(!((c=d.sent)&&c.disabled!==t)){d.next=18;break}return s={id:o,data:useInstrumentationRule_objectSpread(useInstrumentationRule_objectSpread({},c),{},{disabled:t})},d.prev=10,d.next=13,m(s);case 13:d.next=18;break;case 15:return d.prev=15,d.t0=d.catch(10),d.abrupt("return",Promise.reject(!1));case 18:d.next=3;break;case 20:d.next=25;break;case 22:d.prev=22,d.t1=d.catch(1),n.e(d.t1);case 25:return d.prev=25,n.f(),d.finish(25);case 28:return setTimeout((0,a.Z)(l().mark(function _callee2(){return l().wrap(function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,r();case 2:u(e.sent.data||[]);case 4:case"end":return e.stop()}},_callee2)})),1e3),d.abrupt("return",Promise.resolve(!0));case 30:case"end":return d.stop()}},_callee3,null,[[1,22,25,28],[10,15]])}))).apply(this,arguments)}function handleRulesRefresh(){return _handleRulesRefresh.apply(this,arguments)}function _handleRulesRefresh(){return(_handleRulesRefresh=(0,a.Z)(l().mark(function _callee4(){return l().wrap(function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,r();case 2:u(e.sent.data||[]);case 4:case"end":return e.stop()}},_callee4)}))).apply(this,arguments)}function _addRule(){return(_addRule=(0,a.Z)(l().mark(function _callee5(e){return l().wrap(function(t){for(;;)switch(t.prev=t.next){case 0:return t.prev=0,t.next=3,h(e);case 3:return t.next=5,handleRulesRefresh();case 5:t.next=10;break;case 7:t.prev=7,t.t0=t.catch(0),console.error("Error creating rule:",t.t0);case 10:case"end":return t.stop()}},_callee5,null,[[0,7]])}))).apply(this,arguments)}function _removeRule(){return(_removeRule=(0,a.Z)(l().mark(function _callee6(e){return l().wrap(function(t){for(;;)switch(t.prev=t.next){case 0:return t.prev=0,t.next=3,g(e);case 3:return t.next=5,handleRulesRefresh();case 5:t.next=10;break;case 7:t.prev=7,t.t0=t.catch(0),console.error("Error deleting rule:",t.t0);case 10:case"end":return t.stop()}},_callee6,null,[[0,7]])}))).apply(this,arguments)}return(0,i.useEffect)(function(){u(n||[])},[n]),{isLoading:t,rules:d||[],addRule:function(e){return _addRule.apply(this,arguments)},updateRule:m,removeRule:function(e){return _removeRule.apply(this,arguments)},sortRules:function(e){u((0,o.Z)(n||[]).sort(function(t,n){switch(e){case"NAME":return t.ruleName.localeCompare(n.ruleName);case"STATUS":return(t.disabled?1:-1)-(n.disabled?1:-1);default:return 0}}))},getRuleById:getRuleById,toggleRuleStatus:function(e,t){return _toggleRuleStatus.apply(this,arguments)},refetch:handleRulesRefresh}}function useDescribe(){var e=(0,i.useState)(""),t=e[0],n=e[1],r=(0,i.useState)(""),o=r[0],a=r[1],c=(0,i.useState)(""),s=c[0],l=c[1],d=(0,p.useQuery)(["odigosDescription"],f.c6,{enabled:!1}),u=d.data,h=d.isLoading,m=d.refetch,g=(0,p.useQuery)(["sourceDescription"],function(){return(0,f.b9)(t,o.toLowerCase(),s)},{onError:function(e){console.log(e)},enabled:!1}),y=g.data,x=g.isLoading,v=g.refetch;return(0,i.useEffect)(function(){t&&o&&s&&v()},[t,o,s]),(0,i.useEffect)(function(){console.log({sourceDescription:y})},[y]),{odigosDescription:u,sourceDescription:y,isOdigosLoading:h,isSourceLoading:x,refetchOdigosDescription:m,fetchSourceDescription:function(){v()},setNamespaceKindName:function(e,t,i){n(e),a(t),l(i)}}}},9608:function(e,t,n){"use strict";n.d(t,{wN:function(){return d},_A:function(){return p},y5:function(){return u},ed:function(){return o},h:function(){return m}});var i=n(4683),r=(0,i.oM)({name:"app",initialState:{sources:{}},reducers:{setSources:function(e,t){e.sources=t.payload}}}),o=r.actions.setSources,a=r.reducer,c=n(7022);function ownKeys(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);t&&(i=i.filter(function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable})),n.push.apply(n,i)}return n}function _objectSpread(e){for(var t=1;t0?s-4:s;for(r=0;r>16&255,a[c++]=t>>8&255,a[c++]=255&t;return 2===u&&(t=n[e.charCodeAt(r)]<<2|n[e.charCodeAt(r+1)]>>4,a[c++]=255&t),1===u&&(t=n[e.charCodeAt(r)]<<10|n[e.charCodeAt(r+1)]<<4|n[e.charCodeAt(r+2)]>>2,a[c++]=t>>8&255,a[c++]=255&t),a},t.fromByteArray=function(e){for(var t,n=e.length,i=n%3,o=[],s=0,u=n-i;s>18&63]+r[i>>12&63]+r[i>>6&63]+r[63&i]);return o.join("")}(e,s,s+16383>u?u:s+16383));return 1===i?o.push(r[(t=e[n-1])>>2]+r[t<<4&63]+"=="):2===i&&o.push(r[(t=(e[n-2]<<8)+e[n-1])>>10]+r[t>>4&63]+r[t<<2&63]+"="),o.join("")};for(var r=[],n=[],i="undefined"!=typeof Uint8Array?Uint8Array:Array,o="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/",s=0,u=o.length;s0)throw Error("Invalid string. Length must be a multiple of 4");var r=e.indexOf("=");-1===r&&(r=t);var n=r===t?0:4-r%4;return[r,n]}n["-".charCodeAt(0)]=62,n["_".charCodeAt(0)]=63},7133:function(e,t,r){"use strict";/*! - * The buffer module from node.js, for the browser. - * - * @author Feross Aboukhadijeh - * @license MIT - */var n=r(4699),i=r(2305),o="function"==typeof Symbol&&"function"==typeof Symbol.for?Symbol.for("nodejs.util.inspect.custom"):null;function createBuffer(e){if(e>2147483647)throw RangeError('The value "'+e+'" is invalid for option "size"');var t=new Uint8Array(e);return Object.setPrototypeOf(t,Buffer.prototype),t}function Buffer(e,t,r){if("number"==typeof e){if("string"==typeof t)throw TypeError('The "string" argument must be of type string. Received type number');return allocUnsafe(e)}return from(e,t,r)}function from(e,t,r){if("string"==typeof e)return function(e,t){if(("string"!=typeof t||""===t)&&(t="utf8"),!Buffer.isEncoding(t))throw TypeError("Unknown encoding: "+t);var r=0|byteLength(e,t),n=createBuffer(r),i=n.write(e,t);return i!==r&&(n=n.slice(0,i)),n}(e,t);if(ArrayBuffer.isView(e))return function(e){if(isInstance(e,Uint8Array)){var t=new Uint8Array(e);return fromArrayBuffer(t.buffer,t.byteOffset,t.byteLength)}return fromArrayLike(e)}(e);if(null==e)throw TypeError("The first argument must be one of type string, Buffer, ArrayBuffer, Array, or Array-like Object. Received type "+typeof e);if(isInstance(e,ArrayBuffer)||e&&isInstance(e.buffer,ArrayBuffer)||"undefined"!=typeof SharedArrayBuffer&&(isInstance(e,SharedArrayBuffer)||e&&isInstance(e.buffer,SharedArrayBuffer)))return fromArrayBuffer(e,t,r);if("number"==typeof e)throw TypeError('The "value" argument must not be of type number. Received type number');var n=e.valueOf&&e.valueOf();if(null!=n&&n!==e)return Buffer.from(n,t,r);var i=function(e){if(Buffer.isBuffer(e)){var t,r=0|checked(e.length),n=createBuffer(r);return 0===n.length||e.copy(n,0,0,r),n}return void 0!==e.length?"number"!=typeof e.length||(t=e.length)!=t?createBuffer(0):fromArrayLike(e):"Buffer"===e.type&&Array.isArray(e.data)?fromArrayLike(e.data):void 0}(e);if(i)return i;if("undefined"!=typeof Symbol&&null!=Symbol.toPrimitive&&"function"==typeof e[Symbol.toPrimitive])return Buffer.from(e[Symbol.toPrimitive]("string"),t,r);throw TypeError("The first argument must be one of type string, Buffer, ArrayBuffer, Array, or Array-like Object. Received type "+typeof e)}function assertSize(e){if("number"!=typeof e)throw TypeError('"size" argument must be of type number');if(e<0)throw RangeError('The value "'+e+'" is invalid for option "size"')}function allocUnsafe(e){return assertSize(e),createBuffer(e<0?0:0|checked(e))}function fromArrayLike(e){for(var t=e.length<0?0:0|checked(e.length),r=createBuffer(t),n=0;n=2147483647)throw RangeError("Attempt to allocate Buffer larger than maximum size: 0x7fffffff bytes");return 0|e}function byteLength(e,t){if(Buffer.isBuffer(e))return e.length;if(ArrayBuffer.isView(e)||isInstance(e,ArrayBuffer))return e.byteLength;if("string"!=typeof e)throw TypeError('The "string" argument must be one of type string, Buffer, or ArrayBuffer. Received type '+typeof e);var r=e.length,n=arguments.length>2&&!0===arguments[2];if(!n&&0===r)return 0;for(var i=!1;;)switch(t){case"ascii":case"latin1":case"binary":return r;case"utf8":case"utf-8":return utf8ToBytes(e).length;case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return 2*r;case"hex":return r>>>1;case"base64":return base64ToBytes(e).length;default:if(i)return n?-1:utf8ToBytes(e).length;t=(""+t).toLowerCase(),i=!0}}function slowToString(e,t,r){var i,o,s=!1;if((void 0===t||t<0)&&(t=0),t>this.length||((void 0===r||r>this.length)&&(r=this.length),r<=0||(r>>>=0)<=(t>>>=0)))return"";for(e||(e="utf8");;)switch(e){case"hex":return function(e,t,r){var n=e.length;(!t||t<0)&&(t=0),(!r||r<0||r>n)&&(r=n);for(var i="",o=t;o2147483647?r=2147483647:r<-2147483648&&(r=-2147483648),(o=r=+r)!=o&&(r=i?0:e.length-1),r<0&&(r=e.length+r),r>=e.length){if(i)return -1;r=e.length-1}else if(r<0){if(!i)return -1;r=0}if("string"==typeof t&&(t=Buffer.from(t,n)),Buffer.isBuffer(t))return 0===t.length?-1:arrayIndexOf(e,t,r,n,i);if("number"==typeof t)return(t&=255,"function"==typeof Uint8Array.prototype.indexOf)?i?Uint8Array.prototype.indexOf.call(e,t,r):Uint8Array.prototype.lastIndexOf.call(e,t,r):arrayIndexOf(e,[t],r,n,i);throw TypeError("val must be string, number or Buffer")}function arrayIndexOf(e,t,r,n,i){var o,s=1,u=e.length,a=t.length;if(void 0!==n&&("ucs2"===(n=String(n).toLowerCase())||"ucs-2"===n||"utf16le"===n||"utf-16le"===n)){if(e.length<2||t.length<2)return -1;s=2,u/=2,a/=2,r/=2}function read(e,t){return 1===s?e[t]:e.readUInt16BE(t*s)}if(i){var c=-1;for(o=r;ou&&(r=u-a),o=r;o>=0;o--){for(var f=!0,l=0;l239?4:c>223?3:c>191?2:1;if(i+l<=r)switch(l){case 1:c<128&&(f=c);break;case 2:(192&(o=e[i+1]))==128&&(a=(31&c)<<6|63&o)>127&&(f=a);break;case 3:o=e[i+1],s=e[i+2],(192&o)==128&&(192&s)==128&&(a=(15&c)<<12|(63&o)<<6|63&s)>2047&&(a<55296||a>57343)&&(f=a);break;case 4:o=e[i+1],s=e[i+2],u=e[i+3],(192&o)==128&&(192&s)==128&&(192&u)==128&&(a=(15&c)<<18|(63&o)<<12|(63&s)<<6|63&u)>65535&&a<1114112&&(f=a)}null===f?(f=65533,l=1):f>65535&&(f-=65536,n.push(f>>>10&1023|55296),f=56320|1023&f),n.push(f),i+=l}return function(e){var t=e.length;if(t<=4096)return String.fromCharCode.apply(String,e);for(var r="",n=0;nr)throw RangeError("Trying to access beyond buffer length")}function checkInt(e,t,r,n,i,o){if(!Buffer.isBuffer(e))throw TypeError('"buffer" argument must be a Buffer instance');if(t>i||te.length)throw RangeError("Index out of range")}function checkIEEE754(e,t,r,n,i,o){if(r+n>e.length||r<0)throw RangeError("Index out of range")}function writeFloat(e,t,r,n,o){return t=+t,r>>>=0,o||checkIEEE754(e,t,r,4,34028234663852886e22,-34028234663852886e22),i.write(e,t,r,n,23,4),r+4}function writeDouble(e,t,r,n,o){return t=+t,r>>>=0,o||checkIEEE754(e,t,r,8,17976931348623157e292,-17976931348623157e292),i.write(e,t,r,n,52,8),r+8}t.lW=Buffer,t.h2=50,Buffer.TYPED_ARRAY_SUPPORT=function(){try{var e=new Uint8Array(1),t={foo:function(){return 42}};return Object.setPrototypeOf(t,Uint8Array.prototype),Object.setPrototypeOf(e,t),42===e.foo()}catch(e){return!1}}(),Buffer.TYPED_ARRAY_SUPPORT||"undefined"==typeof console||"function"!=typeof console.error||console.error("This browser lacks typed array (Uint8Array) support which is required by `buffer` v5.x. Use `buffer` v4.x if you require old browser support."),Object.defineProperty(Buffer.prototype,"parent",{enumerable:!0,get:function(){if(Buffer.isBuffer(this))return this.buffer}}),Object.defineProperty(Buffer.prototype,"offset",{enumerable:!0,get:function(){if(Buffer.isBuffer(this))return this.byteOffset}}),Buffer.poolSize=8192,Buffer.from=function(e,t,r){return from(e,t,r)},Object.setPrototypeOf(Buffer.prototype,Uint8Array.prototype),Object.setPrototypeOf(Buffer,Uint8Array),Buffer.alloc=function(e,t,r){return(assertSize(e),e<=0)?createBuffer(e):void 0!==t?"string"==typeof r?createBuffer(e).fill(t,r):createBuffer(e).fill(t):createBuffer(e)},Buffer.allocUnsafe=function(e){return allocUnsafe(e)},Buffer.allocUnsafeSlow=function(e){return allocUnsafe(e)},Buffer.isBuffer=function(e){return null!=e&&!0===e._isBuffer&&e!==Buffer.prototype},Buffer.compare=function(e,t){if(isInstance(e,Uint8Array)&&(e=Buffer.from(e,e.offset,e.byteLength)),isInstance(t,Uint8Array)&&(t=Buffer.from(t,t.offset,t.byteLength)),!Buffer.isBuffer(e)||!Buffer.isBuffer(t))throw TypeError('The "buf1", "buf2" arguments must be one of type Buffer or Uint8Array');if(e===t)return 0;for(var r=e.length,n=t.length,i=0,o=Math.min(r,n);in.length?Buffer.from(o).copy(n,i):Uint8Array.prototype.set.call(n,o,i);else if(Buffer.isBuffer(o))o.copy(n,i);else throw TypeError('"list" argument must be an Array of Buffers');i+=o.length}return n},Buffer.byteLength=byteLength,Buffer.prototype._isBuffer=!0,Buffer.prototype.swap16=function(){var e=this.length;if(e%2!=0)throw RangeError("Buffer size must be a multiple of 16-bits");for(var t=0;tr&&(e+=" ... "),""},o&&(Buffer.prototype[o]=Buffer.prototype.inspect),Buffer.prototype.compare=function(e,t,r,n,i){if(isInstance(e,Uint8Array)&&(e=Buffer.from(e,e.offset,e.byteLength)),!Buffer.isBuffer(e))throw TypeError('The "target" argument must be one of type Buffer or Uint8Array. Received type '+typeof e);if(void 0===t&&(t=0),void 0===r&&(r=e?e.length:0),void 0===n&&(n=0),void 0===i&&(i=this.length),t<0||r>e.length||n<0||i>this.length)throw RangeError("out of range index");if(n>=i&&t>=r)return 0;if(n>=i)return -1;if(t>=r)return 1;if(t>>>=0,r>>>=0,n>>>=0,i>>>=0,this===e)return 0;for(var o=i-n,s=r-t,u=Math.min(o,s),a=this.slice(n,i),c=e.slice(t,r),f=0;f>>=0,isFinite(r)?(r>>>=0,void 0===n&&(n="utf8")):(n=r,r=void 0);else throw Error("Buffer.write(string, encoding, offset[, length]) is no longer supported");var i,o,s,u,a,c,f,l,h=this.length-t;if((void 0===r||r>h)&&(r=h),e.length>0&&(r<0||t<0)||t>this.length)throw RangeError("Attempt to write outside buffer bounds");n||(n="utf8");for(var d=!1;;)switch(n){case"hex":return function(e,t,r,n){r=Number(r)||0;var i=e.length-r;n?(n=Number(n))>i&&(n=i):n=i;var o=t.length;n>o/2&&(n=o/2);for(var s=0;s>8,i.push(r%256),i.push(n);return i}(e,this.length-f),this,f,l);default:if(d)throw TypeError("Unknown encoding: "+n);n=(""+n).toLowerCase(),d=!0}},Buffer.prototype.toJSON=function(){return{type:"Buffer",data:Array.prototype.slice.call(this._arr||this,0)}},Buffer.prototype.slice=function(e,t){var r=this.length;e=~~e,t=void 0===t?r:~~t,e<0?(e+=r)<0&&(e=0):e>r&&(e=r),t<0?(t+=r)<0&&(t=0):t>r&&(t=r),t>>=0,t>>>=0,r||checkOffset(e,t,this.length);for(var n=this[e],i=1,o=0;++o>>=0,t>>>=0,r||checkOffset(e,t,this.length);for(var n=this[e+--t],i=1;t>0&&(i*=256);)n+=this[e+--t]*i;return n},Buffer.prototype.readUint8=Buffer.prototype.readUInt8=function(e,t){return e>>>=0,t||checkOffset(e,1,this.length),this[e]},Buffer.prototype.readUint16LE=Buffer.prototype.readUInt16LE=function(e,t){return e>>>=0,t||checkOffset(e,2,this.length),this[e]|this[e+1]<<8},Buffer.prototype.readUint16BE=Buffer.prototype.readUInt16BE=function(e,t){return e>>>=0,t||checkOffset(e,2,this.length),this[e]<<8|this[e+1]},Buffer.prototype.readUint32LE=Buffer.prototype.readUInt32LE=function(e,t){return e>>>=0,t||checkOffset(e,4,this.length),(this[e]|this[e+1]<<8|this[e+2]<<16)+16777216*this[e+3]},Buffer.prototype.readUint32BE=Buffer.prototype.readUInt32BE=function(e,t){return e>>>=0,t||checkOffset(e,4,this.length),16777216*this[e]+(this[e+1]<<16|this[e+2]<<8|this[e+3])},Buffer.prototype.readIntLE=function(e,t,r){e>>>=0,t>>>=0,r||checkOffset(e,t,this.length);for(var n=this[e],i=1,o=0;++o=(i*=128)&&(n-=Math.pow(2,8*t)),n},Buffer.prototype.readIntBE=function(e,t,r){e>>>=0,t>>>=0,r||checkOffset(e,t,this.length);for(var n=t,i=1,o=this[e+--n];n>0&&(i*=256);)o+=this[e+--n]*i;return o>=(i*=128)&&(o-=Math.pow(2,8*t)),o},Buffer.prototype.readInt8=function(e,t){return(e>>>=0,t||checkOffset(e,1,this.length),128&this[e])?-((255-this[e]+1)*1):this[e]},Buffer.prototype.readInt16LE=function(e,t){e>>>=0,t||checkOffset(e,2,this.length);var r=this[e]|this[e+1]<<8;return 32768&r?4294901760|r:r},Buffer.prototype.readInt16BE=function(e,t){e>>>=0,t||checkOffset(e,2,this.length);var r=this[e+1]|this[e]<<8;return 32768&r?4294901760|r:r},Buffer.prototype.readInt32LE=function(e,t){return e>>>=0,t||checkOffset(e,4,this.length),this[e]|this[e+1]<<8|this[e+2]<<16|this[e+3]<<24},Buffer.prototype.readInt32BE=function(e,t){return e>>>=0,t||checkOffset(e,4,this.length),this[e]<<24|this[e+1]<<16|this[e+2]<<8|this[e+3]},Buffer.prototype.readFloatLE=function(e,t){return e>>>=0,t||checkOffset(e,4,this.length),i.read(this,e,!0,23,4)},Buffer.prototype.readFloatBE=function(e,t){return e>>>=0,t||checkOffset(e,4,this.length),i.read(this,e,!1,23,4)},Buffer.prototype.readDoubleLE=function(e,t){return e>>>=0,t||checkOffset(e,8,this.length),i.read(this,e,!0,52,8)},Buffer.prototype.readDoubleBE=function(e,t){return e>>>=0,t||checkOffset(e,8,this.length),i.read(this,e,!1,52,8)},Buffer.prototype.writeUintLE=Buffer.prototype.writeUIntLE=function(e,t,r,n){if(e=+e,t>>>=0,r>>>=0,!n){var i=Math.pow(2,8*r)-1;checkInt(this,e,t,r,i,0)}var o=1,s=0;for(this[t]=255&e;++s>>=0,r>>>=0,!n){var i=Math.pow(2,8*r)-1;checkInt(this,e,t,r,i,0)}var o=r-1,s=1;for(this[t+o]=255&e;--o>=0&&(s*=256);)this[t+o]=e/s&255;return t+r},Buffer.prototype.writeUint8=Buffer.prototype.writeUInt8=function(e,t,r){return e=+e,t>>>=0,r||checkInt(this,e,t,1,255,0),this[t]=255&e,t+1},Buffer.prototype.writeUint16LE=Buffer.prototype.writeUInt16LE=function(e,t,r){return e=+e,t>>>=0,r||checkInt(this,e,t,2,65535,0),this[t]=255&e,this[t+1]=e>>>8,t+2},Buffer.prototype.writeUint16BE=Buffer.prototype.writeUInt16BE=function(e,t,r){return e=+e,t>>>=0,r||checkInt(this,e,t,2,65535,0),this[t]=e>>>8,this[t+1]=255&e,t+2},Buffer.prototype.writeUint32LE=Buffer.prototype.writeUInt32LE=function(e,t,r){return e=+e,t>>>=0,r||checkInt(this,e,t,4,4294967295,0),this[t+3]=e>>>24,this[t+2]=e>>>16,this[t+1]=e>>>8,this[t]=255&e,t+4},Buffer.prototype.writeUint32BE=Buffer.prototype.writeUInt32BE=function(e,t,r){return e=+e,t>>>=0,r||checkInt(this,e,t,4,4294967295,0),this[t]=e>>>24,this[t+1]=e>>>16,this[t+2]=e>>>8,this[t+3]=255&e,t+4},Buffer.prototype.writeIntLE=function(e,t,r,n){if(e=+e,t>>>=0,!n){var i=Math.pow(2,8*r-1);checkInt(this,e,t,r,i-1,-i)}var o=0,s=1,u=0;for(this[t]=255&e;++o>0)-u&255;return t+r},Buffer.prototype.writeIntBE=function(e,t,r,n){if(e=+e,t>>>=0,!n){var i=Math.pow(2,8*r-1);checkInt(this,e,t,r,i-1,-i)}var o=r-1,s=1,u=0;for(this[t+o]=255&e;--o>=0&&(s*=256);)e<0&&0===u&&0!==this[t+o+1]&&(u=1),this[t+o]=(e/s>>0)-u&255;return t+r},Buffer.prototype.writeInt8=function(e,t,r){return e=+e,t>>>=0,r||checkInt(this,e,t,1,127,-128),e<0&&(e=255+e+1),this[t]=255&e,t+1},Buffer.prototype.writeInt16LE=function(e,t,r){return e=+e,t>>>=0,r||checkInt(this,e,t,2,32767,-32768),this[t]=255&e,this[t+1]=e>>>8,t+2},Buffer.prototype.writeInt16BE=function(e,t,r){return e=+e,t>>>=0,r||checkInt(this,e,t,2,32767,-32768),this[t]=e>>>8,this[t+1]=255&e,t+2},Buffer.prototype.writeInt32LE=function(e,t,r){return e=+e,t>>>=0,r||checkInt(this,e,t,4,2147483647,-2147483648),this[t]=255&e,this[t+1]=e>>>8,this[t+2]=e>>>16,this[t+3]=e>>>24,t+4},Buffer.prototype.writeInt32BE=function(e,t,r){return e=+e,t>>>=0,r||checkInt(this,e,t,4,2147483647,-2147483648),e<0&&(e=4294967295+e+1),this[t]=e>>>24,this[t+1]=e>>>16,this[t+2]=e>>>8,this[t+3]=255&e,t+4},Buffer.prototype.writeFloatLE=function(e,t,r){return writeFloat(this,e,t,!0,r)},Buffer.prototype.writeFloatBE=function(e,t,r){return writeFloat(this,e,t,!1,r)},Buffer.prototype.writeDoubleLE=function(e,t,r){return writeDouble(this,e,t,!0,r)},Buffer.prototype.writeDoubleBE=function(e,t,r){return writeDouble(this,e,t,!1,r)},Buffer.prototype.copy=function(e,t,r,n){if(!Buffer.isBuffer(e))throw TypeError("argument should be a Buffer");if(r||(r=0),n||0===n||(n=this.length),t>=e.length&&(t=e.length),t||(t=0),n>0&&n=this.length)throw RangeError("Index out of range");if(n<0)throw RangeError("sourceEnd out of bounds");n>this.length&&(n=this.length),e.length-t>>=0,r=void 0===r?this.length:r>>>0,e||(e=0),"number"==typeof e)for(i=t;i55295&&r<57344){if(!i){if(r>56319||s+1===n){(t-=3)>-1&&o.push(239,191,189);continue}i=r;continue}if(r<56320){(t-=3)>-1&&o.push(239,191,189),i=r;continue}r=(i-55296<<10|r-56320)+65536}else i&&(t-=3)>-1&&o.push(239,191,189);if(i=null,r<128){if((t-=1)<0)break;o.push(r)}else if(r<2048){if((t-=2)<0)break;o.push(r>>6|192,63&r|128)}else if(r<65536){if((t-=3)<0)break;o.push(r>>12|224,r>>6&63|128,63&r|128)}else if(r<1114112){if((t-=4)<0)break;o.push(r>>18|240,r>>12&63|128,r>>6&63|128,63&r|128)}else throw Error("Invalid code point")}return o}function base64ToBytes(e){return n.toByteArray(function(e){if((e=(e=e.split("=")[0]).trim().replace(s,"")).length<2)return"";for(;e.length%4!=0;)e+="=";return e}(e))}function blitBuffer(e,t,r,n){for(var i=0;i=t.length)&&!(i>=e.length);++i)t[i+r]=e[i];return i}function isInstance(e,t){return e instanceof t||null!=e&&null!=e.constructor&&null!=e.constructor.name&&e.constructor.name===t.name}var u=function(){for(var e="0123456789abcdef",t=Array(256),r=0;r<16;++r)for(var n=16*r,i=0;i<16;++i)t[n+i]=e[r]+e[i];return t}()},2305:function(e,t){/*! ieee754. BSD-3-Clause License. Feross Aboukhadijeh */t.read=function(e,t,r,n,i){var o,s,u=8*i-n-1,a=(1<>1,f=-7,l=r?i-1:0,h=r?-1:1,d=e[t+l];for(l+=h,o=d&(1<<-f)-1,d>>=-f,f+=u;f>0;o=256*o+e[t+l],l+=h,f-=8);for(s=o&(1<<-f)-1,o>>=-f,f+=n;f>0;s=256*s+e[t+l],l+=h,f-=8);if(0===o)o=1-c;else{if(o===a)return s?NaN:(d?-1:1)*(1/0);s+=Math.pow(2,n),o-=c}return(d?-1:1)*s*Math.pow(2,o-n)},t.write=function(e,t,r,n,i,o){var s,u,a,c=8*o-i-1,f=(1<>1,h=23===i?5960464477539062e-23:0,d=n?0:o-1,p=n?1:-1,y=t<0||0===t&&1/t<0?1:0;for(isNaN(t=Math.abs(t))||t===1/0?(u=isNaN(t)?1:0,s=f):(s=Math.floor(Math.log(t)/Math.LN2),t*(a=Math.pow(2,-s))<1&&(s--,a*=2),s+l>=1?t+=h/a:t+=h*Math.pow(2,1-l),t*a>=2&&(s++,a/=2),s+l>=f?(u=0,s=f):s+l>=1?(u=(t*a-1)*Math.pow(2,i),s+=l):(u=t*Math.pow(2,l-1)*Math.pow(2,i),s=0));i>=8;e[r+d]=255&u,d+=p,u/=256,i-=8);for(s=s<0;e[r+d]=255&s,d+=p,s/=256,c-=8);e[r+d-p]|=128*y}},8220:function(e,t,r){"use strict";r.d(t,{j:function(){return s}});var n=r(3142),i=r(1761),o=r(8172),s=new(function(e){function FocusManager(){var t;return(t=e.call(this)||this).setup=function(e){var t;if(!o.sk&&(null==(t=window)?void 0:t.addEventListener)){var listener=function(){return e()};return window.addEventListener("visibilitychange",listener,!1),window.addEventListener("focus",listener,!1),function(){window.removeEventListener("visibilitychange",listener),window.removeEventListener("focus",listener)}}},t}(0,n.Z)(FocusManager,e);var t=FocusManager.prototype;return t.onSubscribe=function(){this.cleanup||this.setEventListener(this.setup)},t.onUnsubscribe=function(){if(!this.hasListeners()){var e;null==(e=this.cleanup)||e.call(this),this.cleanup=void 0}},t.setEventListener=function(e){var t,r=this;this.setup=e,null==(t=this.cleanup)||t.call(this),this.cleanup=e(function(e){"boolean"==typeof e?r.setFocused(e):r.onFocus()})},t.setFocused=function(e){this.focused=e,e&&this.onFocus()},t.onFocus=function(){this.listeners.forEach(function(e){e()})},t.isFocused=function(){return"boolean"==typeof this.focused?this.focused:"undefined"==typeof document||[void 0,"visible","prerender"].includes(document.visibilityState)},FocusManager}(i.l))},7086:function(e,t,r){"use strict";r.d(t,{QueryClient:function(){return n.S}});var n=r(216),i=r(6897);r.o(i,"QueryClientProvider")&&r.d(t,{QueryClientProvider:function(){return i.QueryClientProvider}}),r.o(i,"useMutation")&&r.d(t,{useMutation:function(){return i.useMutation}}),r.o(i,"useQuery")&&r.d(t,{useQuery:function(){return i.useQuery}})},1442:function(e,t,r){"use strict";r.d(t,{E:function(){return setLogger},j:function(){return getLogger}});var n=console;function getLogger(){return n}function setLogger(e){n=e}},2578:function(e,t,r){"use strict";r.d(t,{R:function(){return getDefaultState},m:function(){return a}});var n=r(3428),i=r(1442),o=r(4622),s=r(6800),u=r(8172),a=function(){function Mutation(e){this.options=(0,n.Z)({},e.defaultOptions,e.options),this.mutationId=e.mutationId,this.mutationCache=e.mutationCache,this.observers=[],this.state=e.state||getDefaultState(),this.meta=e.meta}var e=Mutation.prototype;return e.setState=function(e){this.dispatch({type:"setState",state:e})},e.addObserver=function(e){-1===this.observers.indexOf(e)&&this.observers.push(e)},e.removeObserver=function(e){this.observers=this.observers.filter(function(t){return t!==e})},e.cancel=function(){return this.retryer?(this.retryer.cancel(),this.retryer.promise.then(u.ZT).catch(u.ZT)):Promise.resolve()},e.continue=function(){return this.retryer?(this.retryer.continue(),this.retryer.promise):this.execute()},e.execute=function(){var e,t=this,r="loading"===this.state.status,n=Promise.resolve();return r||(this.dispatch({type:"loading",variables:this.options.variables}),n=n.then(function(){null==t.mutationCache.config.onMutate||t.mutationCache.config.onMutate(t.state.variables,t)}).then(function(){return null==t.options.onMutate?void 0:t.options.onMutate(t.state.variables)}).then(function(e){e!==t.state.context&&t.dispatch({type:"loading",context:e,variables:t.state.variables})})),n.then(function(){return t.executeMutation()}).then(function(r){e=r,null==t.mutationCache.config.onSuccess||t.mutationCache.config.onSuccess(e,t.state.variables,t.state.context,t)}).then(function(){return null==t.options.onSuccess?void 0:t.options.onSuccess(e,t.state.variables,t.state.context)}).then(function(){return null==t.options.onSettled?void 0:t.options.onSettled(e,null,t.state.variables,t.state.context)}).then(function(){return t.dispatch({type:"success",data:e}),e}).catch(function(e){return null==t.mutationCache.config.onError||t.mutationCache.config.onError(e,t.state.variables,t.state.context,t),(0,i.j)().error(e),Promise.resolve().then(function(){return null==t.options.onError?void 0:t.options.onError(e,t.state.variables,t.state.context)}).then(function(){return null==t.options.onSettled?void 0:t.options.onSettled(void 0,e,t.state.variables,t.state.context)}).then(function(){throw t.dispatch({type:"error",error:e}),e})})},e.executeMutation=function(){var e,t=this;return this.retryer=new s.m4({fn:function(){return t.options.mutationFn?t.options.mutationFn(t.state.variables):Promise.reject("No mutationFn found")},onFail:function(){t.dispatch({type:"failed"})},onPause:function(){t.dispatch({type:"pause"})},onContinue:function(){t.dispatch({type:"continue"})},retry:null!=(e=this.options.retry)?e:0,retryDelay:this.options.retryDelay}),this.retryer.promise},e.dispatch=function(e){var t=this;this.state=function(e,t){switch(t.type){case"failed":return(0,n.Z)({},e,{failureCount:e.failureCount+1});case"pause":return(0,n.Z)({},e,{isPaused:!0});case"continue":return(0,n.Z)({},e,{isPaused:!1});case"loading":return(0,n.Z)({},e,{context:t.context,data:void 0,error:null,isPaused:!1,status:"loading",variables:t.variables});case"success":return(0,n.Z)({},e,{data:t.data,error:null,status:"success",isPaused:!1});case"error":return(0,n.Z)({},e,{data:void 0,error:t.error,failureCount:e.failureCount+1,isPaused:!1,status:"error"});case"setState":return(0,n.Z)({},e,t.state);default:return e}}(this.state,e),o.V.batch(function(){t.observers.forEach(function(t){t.onMutationUpdate(e)}),t.mutationCache.notify(t)})},Mutation}();function getDefaultState(){return{context:void 0,data:void 0,error:null,failureCount:0,isPaused:!1,status:"idle",variables:void 0}}},4622:function(e,t,r){"use strict";r.d(t,{V:function(){return i}});var n=r(8172),i=new(function(){function NotifyManager(){this.queue=[],this.transactions=0,this.notifyFn=function(e){e()},this.batchNotifyFn=function(e){e()}}var e=NotifyManager.prototype;return e.batch=function(e){var t;this.transactions++;try{t=e()}finally{this.transactions--,this.transactions||this.flush()}return t},e.schedule=function(e){var t=this;this.transactions?this.queue.push(e):(0,n.A4)(function(){t.notifyFn(e)})},e.batchCalls=function(e){var t=this;return function(){for(var r=arguments.length,n=Array(r),i=0;i0?this.queries.filter(function(e){return(0,i._x)(r,e)}):this.queries},t.notify=function(e){var t=this;s.V.batch(function(){t.listeners.forEach(function(t){t(e)})})},t.onFocus=function(){var e=this;s.V.batch(function(){e.queries.forEach(function(e){e.onFocus()})})},t.onOnline=function(){var e=this;s.V.batch(function(){e.queries.forEach(function(e){e.onOnline()})})},QueryCache}(f.l),h=r(2578),d=function(e){function MutationCache(t){var r;return(r=e.call(this)||this).config=t||{},r.mutations=[],r.mutationId=0,r}(0,o.Z)(MutationCache,e);var t=MutationCache.prototype;return t.build=function(e,t,r){var n=new h.m({mutationCache:this,mutationId:++this.mutationId,options:e.defaultMutationOptions(t),state:r,defaultOptions:t.mutationKey?e.getMutationDefaults(t.mutationKey):void 0,meta:t.meta});return this.add(n),n},t.add=function(e){this.mutations.push(e),this.notify(e)},t.remove=function(e){this.mutations=this.mutations.filter(function(t){return t!==e}),e.cancel(),this.notify(e)},t.clear=function(){var e=this;s.V.batch(function(){e.mutations.forEach(function(t){e.remove(t)})})},t.getAll=function(){return this.mutations},t.find=function(e){return void 0===e.exact&&(e.exact=!0),this.mutations.find(function(t){return(0,i.X7)(e,t)})},t.findAll=function(e){return this.mutations.filter(function(t){return(0,i.X7)(e,t)})},t.notify=function(e){var t=this;s.V.batch(function(){t.listeners.forEach(function(t){t(e)})})},t.onFocus=function(){this.resumePausedMutations()},t.onOnline=function(){this.resumePausedMutations()},t.resumePausedMutations=function(){var e=this.mutations.filter(function(e){return e.state.isPaused});return s.V.batch(function(){return e.reduce(function(e,t){return e.then(function(){return t.continue().catch(i.ZT)})},Promise.resolve())})},MutationCache}(f.l),p=r(8220),y=r(9977);function getNextPageParam(e,t){return null==e.getNextPageParam?void 0:e.getNextPageParam(t[t.length-1],t)}var v=function(){function QueryClient(e){void 0===e&&(e={}),this.queryCache=e.queryCache||new l,this.mutationCache=e.mutationCache||new d,this.defaultOptions=e.defaultOptions||{},this.queryDefaults=[],this.mutationDefaults=[]}var e=QueryClient.prototype;return e.mount=function(){var e=this;this.unsubscribeFocus=p.j.subscribe(function(){p.j.isFocused()&&y.N.isOnline()&&(e.mutationCache.onFocus(),e.queryCache.onFocus())}),this.unsubscribeOnline=y.N.subscribe(function(){p.j.isFocused()&&y.N.isOnline()&&(e.mutationCache.onOnline(),e.queryCache.onOnline())})},e.unmount=function(){var e,t;null==(e=this.unsubscribeFocus)||e.call(this),null==(t=this.unsubscribeOnline)||t.call(this)},e.isFetching=function(e,t){var r=(0,i.I6)(e,t)[0];return r.fetching=!0,this.queryCache.findAll(r).length},e.isMutating=function(e){return this.mutationCache.findAll((0,n.Z)({},e,{fetching:!0})).length},e.getQueryData=function(e,t){var r;return null==(r=this.queryCache.find(e,t))?void 0:r.state.data},e.getQueriesData=function(e){return this.getQueryCache().findAll(e).map(function(e){return[e.queryKey,e.state.data]})},e.setQueryData=function(e,t,r){var n=(0,i._v)(e),o=this.defaultQueryOptions(n);return this.queryCache.build(this,o).setData(t,r)},e.setQueriesData=function(e,t,r){var n=this;return s.V.batch(function(){return n.getQueryCache().findAll(e).map(function(e){var i=e.queryKey;return[i,n.setQueryData(i,t,r)]})})},e.getQueryState=function(e,t){var r;return null==(r=this.queryCache.find(e,t))?void 0:r.state},e.removeQueries=function(e,t){var r=(0,i.I6)(e,t)[0],n=this.queryCache;s.V.batch(function(){n.findAll(r).forEach(function(e){n.remove(e)})})},e.resetQueries=function(e,t,r){var o=this,u=(0,i.I6)(e,t,r),a=u[0],c=u[1],f=this.queryCache,l=(0,n.Z)({},a,{active:!0});return s.V.batch(function(){return f.findAll(a).forEach(function(e){e.reset()}),o.refetchQueries(l,c)})},e.cancelQueries=function(e,t,r){var n=this,o=(0,i.I6)(e,t,r),u=o[0],a=o[1],c=void 0===a?{}:a;return void 0===c.revert&&(c.revert=!0),Promise.all(s.V.batch(function(){return n.queryCache.findAll(u).map(function(e){return e.cancel(c)})})).then(i.ZT).catch(i.ZT)},e.invalidateQueries=function(e,t,r){var o,u,a,c=this,f=(0,i.I6)(e,t,r),l=f[0],h=f[1],d=(0,n.Z)({},l,{active:null==(o=null!=(u=l.refetchActive)?u:l.active)||o,inactive:null!=(a=l.refetchInactive)&&a});return s.V.batch(function(){return c.queryCache.findAll(l).forEach(function(e){e.invalidate()}),c.refetchQueries(d,h)})},e.refetchQueries=function(e,t,r){var o=this,u=(0,i.I6)(e,t,r),a=u[0],c=u[1],f=Promise.all(s.V.batch(function(){return o.queryCache.findAll(a).map(function(e){return e.fetch(void 0,(0,n.Z)({},c,{meta:{refetchPage:null==a?void 0:a.refetchPage}}))})})).then(i.ZT);return(null==c?void 0:c.throwOnError)||(f=f.catch(i.ZT)),f},e.fetchQuery=function(e,t,r){var n=(0,i._v)(e,t,r),o=this.defaultQueryOptions(n);void 0===o.retry&&(o.retry=!1);var s=this.queryCache.build(this,o);return s.isStaleByTime(o.staleTime)?s.fetch(o):Promise.resolve(s.state.data)},e.prefetchQuery=function(e,t,r){return this.fetchQuery(e,t,r).then(i.ZT).catch(i.ZT)},e.fetchInfiniteQuery=function(e,t,r){var n=(0,i._v)(e,t,r);return n.behavior={onFetch:function(e){e.fetchFn=function(){var t,r,n,o,s,u,c,f=null==(t=e.fetchOptions)?void 0:null==(r=t.meta)?void 0:r.refetchPage,l=null==(n=e.fetchOptions)?void 0:null==(o=n.meta)?void 0:o.fetchMore,h=null==l?void 0:l.pageParam,d=(null==l?void 0:l.direction)==="forward",p=(null==l?void 0:l.direction)==="backward",y=(null==(s=e.state.data)?void 0:s.pages)||[],v=(null==(u=e.state.data)?void 0:u.pageParams)||[],m=(0,i.G9)(),g=null==m?void 0:m.signal,b=v,E=!1,O=e.options.queryFn||function(){return Promise.reject("Missing queryFn")},buildNewPages=function(e,t,r,n){return b=n?[t].concat(b):[].concat(b,[t]),n?[r].concat(e):[].concat(e,[r])},fetchPage=function(t,r,n,i){if(E)return Promise.reject("Cancelled");if(void 0===n&&!r&&t.length)return Promise.resolve(t);var o=O({queryKey:e.queryKey,signal:g,pageParam:n,meta:e.meta}),s=Promise.resolve(o).then(function(e){return buildNewPages(t,n,e,i)});return(0,a.LE)(o)&&(s.cancel=o.cancel),s};if(y.length){if(d){var w=void 0!==h,C=w?h:getNextPageParam(e.options,y);c=fetchPage(y,w,C)}else if(p){var A,R=void 0!==h,S=R?h:null==(A=e.options).getPreviousPageParam?void 0:A.getPreviousPageParam(y[0],y);c=fetchPage(y,R,S,!0)}else!function(){b=[];var t=void 0===e.options.getNextPageParam;c=!f||!y[0]||f(y[0],0,y)?fetchPage([],t,v[0]):Promise.resolve(buildNewPages([],v[0],y[0]));for(var _loop=function(r){c=c.then(function(n){if(!f||!y[r]||f(y[r],r,y)){var i=t?v[r]:getNextPageParam(e.options,n);return fetchPage(n,t,i)}return Promise.resolve(buildNewPages(n,v[r],y[r]))})},r=1;r0},e.onSubscribe=function(){},e.onUnsubscribe=function(){},Subscribable}()},6897:function(){},8172:function(e,t,r){"use strict";r.d(t,{A4:function(){return scheduleMicrotask},G9:function(){return getAbortController},Gh:function(){return sleep},I6:function(){return parseFilterArgs},Kp:function(){return timeUntilStale},PN:function(){return isValidTimeout},Q$:function(){return function replaceEqualDeep(e,t){if(e===t)return e;var r=Array.isArray(e)&&Array.isArray(t);if(r||isPlainObject(e)&&isPlainObject(t)){for(var n=r?e.length:Object.keys(e).length,i=r?t:Object.keys(t),o=i.length,s=r?[]:{},u=0,a=0;a=0&&e!==1/0}function ensureQueryKeyArray(e){return Array.isArray(e)?e:[e]}function timeUntilStale(e,t){return Math.max(e+(t||0)-Date.now(),0)}function parseQueryArgs(e,t,r){return isQueryKey(e)?"function"==typeof t?(0,n.Z)({},r,{queryKey:e,queryFn:t}):(0,n.Z)({},t,{queryKey:e}):e}function parseMutationArgs(e,t,r){return isQueryKey(e)?"function"==typeof t?(0,n.Z)({},r,{mutationKey:e,mutationFn:t}):(0,n.Z)({},t,{mutationKey:e}):"function"==typeof e?(0,n.Z)({},t,{mutationFn:e}):(0,n.Z)({},e)}function parseFilterArgs(e,t,r){return isQueryKey(e)?[(0,n.Z)({},t,{queryKey:e}),r]:[e||{},t]}function matchQuery(e,t){var r=e.active,n=e.exact,i=e.fetching,o=e.inactive,s=e.predicate,u=e.queryKey,a=e.stale;if(isQueryKey(u)){if(n){if(t.queryHash!==hashQueryKeyByOptions(u,t.options))return!1}else if(!partialMatchKey(t.queryKey,u))return!1}var c=!0===r&&!0===o||null==r&&null==o?"all":!1===r&&!1===o?"none":(null!=r?r:!o)?"active":"inactive";if("none"===c)return!1;if("all"!==c){var f=t.isActive();if("active"===c&&!f||"inactive"===c&&f)return!1}return("boolean"!=typeof a||t.isStale()===a)&&("boolean"!=typeof i||t.isFetching()===i)&&(!s||!!s(t))}function matchMutation(e,t){var r=e.exact,n=e.fetching,i=e.predicate,o=e.mutationKey;if(isQueryKey(o)){if(!t.options.mutationKey)return!1;if(r){if(hashQueryKey(t.options.mutationKey)!==hashQueryKey(o))return!1}else if(!partialMatchKey(t.options.mutationKey,o))return!1}return("boolean"!=typeof n||"loading"===t.state.status===n)&&(!i||!!i(t))}function hashQueryKeyByOptions(e,t){return((null==t?void 0:t.queryKeyHashFn)||hashQueryKey)(e)}function hashQueryKey(e){return JSON.stringify(ensureQueryKeyArray(e),function(e,t){return isPlainObject(t)?Object.keys(t).sort().reduce(function(e,r){return e[r]=t[r],e},{}):t})}function partialMatchKey(e,t){return function partialDeepEqual(e,t){return e===t||typeof e==typeof t&&!!e&&!!t&&"object"==typeof e&&"object"==typeof t&&!Object.keys(t).some(function(r){return!partialDeepEqual(e[r],t[r])})}(ensureQueryKeyArray(e),ensureQueryKeyArray(t))}function shallowEqualObjects(e,t){if(e&&!t||t&&!e)return!1;for(var r in e)if(e[r]!==t[r])return!1;return!0}function isPlainObject(e){if(!hasObjectPrototype(e))return!1;var t=e.constructor;if(void 0===t)return!0;var r=t.prototype;return!!(hasObjectPrototype(r)&&r.hasOwnProperty("isPrototypeOf"))}function hasObjectPrototype(e){return"[object Object]"===Object.prototype.toString.call(e)}function isQueryKey(e){return"string"==typeof e||Array.isArray(e)}function sleep(e){return new Promise(function(t){setTimeout(t,e)})}function scheduleMicrotask(e){Promise.resolve().then(e).catch(function(e){return setTimeout(function(){throw e})})}function getAbortController(){if("function"==typeof AbortController)return new AbortController}},9077:function(e,t,r){"use strict";r.d(t,{QueryClient:function(){return n.QueryClient},QueryClientProvider:function(){return i.QueryClientProvider},useMutation:function(){return i.useMutation},useQuery:function(){return i.useQuery}});var n=r(7086);r.o(n,"QueryClientProvider")&&r.d(t,{QueryClientProvider:function(){return n.QueryClientProvider}}),r.o(n,"useMutation")&&r.d(t,{useMutation:function(){return n.useMutation}}),r.o(n,"useQuery")&&r.d(t,{useQuery:function(){return n.useQuery}});var i=r(1327)},1327:function(e,t,r){"use strict";r.d(t,{QueryClientProvider:function(){return QueryClientProvider},useMutation:function(){return useMutation},useQuery:function(){return useQuery}});var n,i=r(4622),o=r(4887).unstable_batchedUpdates;i.V.setBatchNotifyFunction(o);var s=r(1442),u=console;(0,s.E)(u);var a=r(2265),c=a.createContext(void 0),f=a.createContext(!1);function getQueryClientContext(e){return e&&"undefined"!=typeof window?(window.ReactQueryClientContext||(window.ReactQueryClientContext=c),window.ReactQueryClientContext):c}var useQueryClient=function(){var e=a.useContext(getQueryClientContext(a.useContext(f)));if(!e)throw Error("No QueryClient set, use QueryClientProvider to set one");return e},QueryClientProvider=function(e){var t=e.client,r=e.contextSharing,n=void 0!==r&&r,i=e.children;a.useEffect(function(){return t.mount(),function(){t.unmount()}},[t]);var o=getQueryClientContext(n);return a.createElement(f.Provider,{value:n},a.createElement(o.Provider,{value:t},i))},l=r(3428),h=r(8172),d=r(3142),p=r(2578),y=r(1761),v=function(e){function MutationObserver(t,r){var n;return(n=e.call(this)||this).client=t,n.setOptions(r),n.bindMethods(),n.updateResult(),n}(0,d.Z)(MutationObserver,e);var t=MutationObserver.prototype;return t.bindMethods=function(){this.mutate=this.mutate.bind(this),this.reset=this.reset.bind(this)},t.setOptions=function(e){this.options=this.client.defaultMutationOptions(e)},t.onUnsubscribe=function(){if(!this.listeners.length){var e;null==(e=this.currentMutation)||e.removeObserver(this)}},t.onMutationUpdate=function(e){this.updateResult();var t={listeners:!0};"success"===e.type?t.onSuccess=!0:"error"===e.type&&(t.onError=!0),this.notify(t)},t.getCurrentResult=function(){return this.currentResult},t.reset=function(){this.currentMutation=void 0,this.updateResult(),this.notify({listeners:!0})},t.mutate=function(e,t){return this.mutateOptions=t,this.currentMutation&&this.currentMutation.removeObserver(this),this.currentMutation=this.client.getMutationCache().build(this.client,(0,l.Z)({},this.options,{variables:void 0!==e?e:this.options.variables})),this.currentMutation.addObserver(this),this.currentMutation.execute()},t.updateResult=function(){var e=this.currentMutation?this.currentMutation.state:(0,p.R)(),t=(0,l.Z)({},e,{isLoading:"loading"===e.status,isSuccess:"success"===e.status,isError:"error"===e.status,isIdle:"idle"===e.status,mutate:this.mutate,reset:this.reset});this.currentResult=t},t.notify=function(e){var t=this;i.V.batch(function(){t.mutateOptions&&(e.onSuccess?(null==t.mutateOptions.onSuccess||t.mutateOptions.onSuccess(t.currentResult.data,t.currentResult.variables,t.currentResult.context),null==t.mutateOptions.onSettled||t.mutateOptions.onSettled(t.currentResult.data,null,t.currentResult.variables,t.currentResult.context)):e.onError&&(null==t.mutateOptions.onError||t.mutateOptions.onError(t.currentResult.error,t.currentResult.variables,t.currentResult.context),null==t.mutateOptions.onSettled||t.mutateOptions.onSettled(void 0,t.currentResult.error,t.currentResult.variables,t.currentResult.context))),e.listeners&&t.listeners.forEach(function(e){e(t.currentResult)})})},MutationObserver}(y.l);function shouldThrowError(e,t,r){return"function"==typeof t?t.apply(void 0,r):"boolean"==typeof t?t:!!e}function useMutation(e,t,r){var n=a.useRef(!1),o=a.useState(0)[1],s=(0,h.lV)(e,t,r),u=useQueryClient(),c=a.useRef();c.current?c.current.setOptions(s):c.current=new v(u,s);var f=c.current.getCurrentResult();a.useEffect(function(){n.current=!0;var e=c.current.subscribe(i.V.batchCalls(function(){n.current&&o(function(e){return e+1})}));return function(){n.current=!1,e()}},[]);var d=a.useCallback(function(e,t){c.current.mutate(e,t).catch(h.ZT)},[]);if(f.error&&shouldThrowError(void 0,c.current.options.useErrorBoundary,[f.error]))throw f.error;return(0,l.Z)({},f,{mutate:d,mutateAsync:f.mutate})}var m=r(8220),g=r(6800),b=function(e){function QueryObserver(t,r){var n;return(n=e.call(this)||this).client=t,n.options=r,n.trackedProps=[],n.selectError=null,n.bindMethods(),n.setOptions(r),n}(0,d.Z)(QueryObserver,e);var t=QueryObserver.prototype;return t.bindMethods=function(){this.remove=this.remove.bind(this),this.refetch=this.refetch.bind(this)},t.onSubscribe=function(){1===this.listeners.length&&(this.currentQuery.addObserver(this),shouldFetchOnMount(this.currentQuery,this.options)&&this.executeFetch(),this.updateTimers())},t.onUnsubscribe=function(){this.listeners.length||this.destroy()},t.shouldFetchOnReconnect=function(){return shouldFetchOn(this.currentQuery,this.options,this.options.refetchOnReconnect)},t.shouldFetchOnWindowFocus=function(){return shouldFetchOn(this.currentQuery,this.options,this.options.refetchOnWindowFocus)},t.destroy=function(){this.listeners=[],this.clearTimers(),this.currentQuery.removeObserver(this)},t.setOptions=function(e,t){var r=this.options,n=this.currentQuery;if(this.options=this.client.defaultQueryObserverOptions(e),void 0!==this.options.enabled&&"boolean"!=typeof this.options.enabled)throw Error("Expected enabled to be a boolean");this.options.queryKey||(this.options.queryKey=r.queryKey),this.updateQuery();var i=this.hasListeners();i&&shouldFetchOptionally(this.currentQuery,n,this.options,r)&&this.executeFetch(),this.updateResult(t),i&&(this.currentQuery!==n||this.options.enabled!==r.enabled||this.options.staleTime!==r.staleTime)&&this.updateStaleTimeout();var o=this.computeRefetchInterval();i&&(this.currentQuery!==n||this.options.enabled!==r.enabled||o!==this.currentRefetchInterval)&&this.updateRefetchInterval(o)},t.getOptimisticResult=function(e){var t=this.client.defaultQueryObserverOptions(e),r=this.client.getQueryCache().build(this.client,t);return this.createResult(r,t)},t.getCurrentResult=function(){return this.currentResult},t.trackResult=function(e,t){var r=this,n={},trackProp=function(e){r.trackedProps.includes(e)||r.trackedProps.push(e)};return Object.keys(e).forEach(function(t){Object.defineProperty(n,t,{configurable:!1,enumerable:!0,get:function(){return trackProp(t),e[t]}})}),(t.useErrorBoundary||t.suspense)&&trackProp("error"),n},t.getNextResult=function(e){var t=this;return new Promise(function(r,n){var i=t.subscribe(function(t){t.isFetching||(i(),t.isError&&(null==e?void 0:e.throwOnError)?n(t.error):r(t))})})},t.getCurrentQuery=function(){return this.currentQuery},t.remove=function(){this.client.getQueryCache().remove(this.currentQuery)},t.refetch=function(e){return this.fetch((0,l.Z)({},e,{meta:{refetchPage:null==e?void 0:e.refetchPage}}))},t.fetchOptimistic=function(e){var t=this,r=this.client.defaultQueryObserverOptions(e),n=this.client.getQueryCache().build(this.client,r);return n.fetch().then(function(){return t.createResult(n,r)})},t.fetch=function(e){var t=this;return this.executeFetch(e).then(function(){return t.updateResult(),t.currentResult})},t.executeFetch=function(e){this.updateQuery();var t=this.currentQuery.fetch(this.options,e);return(null==e?void 0:e.throwOnError)||(t=t.catch(h.ZT)),t},t.updateStaleTimeout=function(){var e=this;if(this.clearStaleTimeout(),!h.sk&&!this.currentResult.isStale&&(0,h.PN)(this.options.staleTime)){var t=(0,h.Kp)(this.currentResult.dataUpdatedAt,this.options.staleTime);this.staleTimeoutId=setTimeout(function(){e.currentResult.isStale||e.updateResult()},t+1)}},t.computeRefetchInterval=function(){var e;return"function"==typeof this.options.refetchInterval?this.options.refetchInterval(this.currentResult.data,this.currentQuery):null!=(e=this.options.refetchInterval)&&e},t.updateRefetchInterval=function(e){var t=this;this.clearRefetchInterval(),this.currentRefetchInterval=e,!h.sk&&!1!==this.options.enabled&&(0,h.PN)(this.currentRefetchInterval)&&0!==this.currentRefetchInterval&&(this.refetchIntervalId=setInterval(function(){(t.options.refetchIntervalInBackground||m.j.isFocused())&&t.executeFetch()},this.currentRefetchInterval))},t.updateTimers=function(){this.updateStaleTimeout(),this.updateRefetchInterval(this.computeRefetchInterval())},t.clearTimers=function(){this.clearStaleTimeout(),this.clearRefetchInterval()},t.clearStaleTimeout=function(){this.staleTimeoutId&&(clearTimeout(this.staleTimeoutId),this.staleTimeoutId=void 0)},t.clearRefetchInterval=function(){this.refetchIntervalId&&(clearInterval(this.refetchIntervalId),this.refetchIntervalId=void 0)},t.createResult=function(e,t){var r,n,i=this.currentQuery,o=this.options,u=this.currentResult,a=this.currentResultState,c=this.currentResultOptions,f=e!==i,l=f?e.state:this.currentQueryInitialState,d=f?this.currentResult:this.previousQueryResult,p=e.state,y=p.dataUpdatedAt,v=p.error,m=p.errorUpdatedAt,g=p.isFetching,b=p.status,E=!1,O=!1;if(t.optimisticResults){var w=this.hasListeners(),C=!w&&shouldFetchOnMount(e,t),A=w&&shouldFetchOptionally(e,i,t,o);(C||A)&&(g=!0,y||(b="loading"))}if(t.keepPreviousData&&!p.dataUpdateCount&&(null==d?void 0:d.isSuccess)&&"error"!==b)r=d.data,y=d.dataUpdatedAt,b=d.status,E=!0;else if(t.select&&void 0!==p.data){if(u&&p.data===(null==a?void 0:a.data)&&t.select===this.selectFn)r=this.selectResult;else try{this.selectFn=t.select,r=t.select(p.data),!1!==t.structuralSharing&&(r=(0,h.Q$)(null==u?void 0:u.data,r)),this.selectResult=r,this.selectError=null}catch(e){(0,s.j)().error(e),this.selectError=e}}else r=p.data;if(void 0!==t.placeholderData&&void 0===r&&("loading"===b||"idle"===b)){if((null==u?void 0:u.isPlaceholderData)&&t.placeholderData===(null==c?void 0:c.placeholderData))n=u.data;else if(n="function"==typeof t.placeholderData?t.placeholderData():t.placeholderData,t.select&&void 0!==n)try{n=t.select(n),!1!==t.structuralSharing&&(n=(0,h.Q$)(null==u?void 0:u.data,n)),this.selectError=null}catch(e){(0,s.j)().error(e),this.selectError=e}void 0!==n&&(b="success",r=n,O=!0)}return this.selectError&&(v=this.selectError,r=this.selectResult,m=Date.now(),b="error"),{status:b,isLoading:"loading"===b,isSuccess:"success"===b,isError:"error"===b,isIdle:"idle"===b,data:r,dataUpdatedAt:y,error:v,errorUpdatedAt:m,failureCount:p.fetchFailureCount,errorUpdateCount:p.errorUpdateCount,isFetched:p.dataUpdateCount>0||p.errorUpdateCount>0,isFetchedAfterMount:p.dataUpdateCount>l.dataUpdateCount||p.errorUpdateCount>l.errorUpdateCount,isFetching:g,isRefetching:g&&"loading"!==b,isLoadingError:"error"===b&&0===p.dataUpdatedAt,isPlaceholderData:O,isPreviousData:E,isRefetchError:"error"===b&&0!==p.dataUpdatedAt,isStale:isStale(e,t),refetch:this.refetch,remove:this.remove}},t.shouldNotifyListeners=function(e,t){if(!t)return!0;var r=this.options,n=r.notifyOnChangeProps,i=r.notifyOnChangePropsExclusions;if(!n&&!i||"tracked"===n&&!this.trackedProps.length)return!0;var o="tracked"===n?this.trackedProps:n;return Object.keys(e).some(function(r){var n=e[r]!==t[r],s=null==o?void 0:o.some(function(e){return e===r}),u=null==i?void 0:i.some(function(e){return e===r});return n&&!u&&(!o||s)})},t.updateResult=function(e){var t=this.currentResult;if(this.currentResult=this.createResult(this.currentQuery,this.options),this.currentResultState=this.currentQuery.state,this.currentResultOptions=this.options,!(0,h.VS)(this.currentResult,t)){var r={cache:!0};(null==e?void 0:e.listeners)!==!1&&this.shouldNotifyListeners(this.currentResult,t)&&(r.listeners=!0),this.notify((0,l.Z)({},r,e))}},t.updateQuery=function(){var e=this.client.getQueryCache().build(this.client,this.options);if(e!==this.currentQuery){var t=this.currentQuery;this.currentQuery=e,this.currentQueryInitialState=e.state,this.previousQueryResult=this.currentResult,this.hasListeners()&&(null==t||t.removeObserver(this),e.addObserver(this))}},t.onQueryUpdate=function(e){var t={};"success"===e.type?t.onSuccess=!0:"error"!==e.type||(0,g.DV)(e.error)||(t.onError=!0),this.updateResult(t),this.hasListeners()&&this.updateTimers()},t.notify=function(e){var t=this;i.V.batch(function(){e.onSuccess?(null==t.options.onSuccess||t.options.onSuccess(t.currentResult.data),null==t.options.onSettled||t.options.onSettled(t.currentResult.data,null)):e.onError&&(null==t.options.onError||t.options.onError(t.currentResult.error),null==t.options.onSettled||t.options.onSettled(void 0,t.currentResult.error)),e.listeners&&t.listeners.forEach(function(e){e(t.currentResult)}),e.cache&&t.client.getQueryCache().notify({query:t.currentQuery,type:"observerResultsUpdated"})})},QueryObserver}(y.l);function shouldFetchOnMount(e,t){return!1!==t.enabled&&!e.state.dataUpdatedAt&&!("error"===e.state.status&&!1===t.retryOnMount)||e.state.dataUpdatedAt>0&&shouldFetchOn(e,t,t.refetchOnMount)}function shouldFetchOn(e,t,r){if(!1!==t.enabled){var n="function"==typeof r?r(e):r;return"always"===n||!1!==n&&isStale(e,t)}return!1}function shouldFetchOptionally(e,t,r,n){return!1!==r.enabled&&(e!==t||!1===n.enabled)&&(!r.suspense||"error"!==e.state.status)&&isStale(e,r)}function isStale(e,t){return e.isStaleByTime(t.staleTime)}var E=a.createContext((n=!1,{clearReset:function(){n=!1},reset:function(){n=!0},isReset:function(){return n}}));function useQuery(e,t,r){return function(e,t){var r=a.useRef(!1),n=a.useState(0)[1],o=useQueryClient(),s=a.useContext(E),u=o.defaultQueryObserverOptions(e);u.optimisticResults=!0,u.onError&&(u.onError=i.V.batchCalls(u.onError)),u.onSuccess&&(u.onSuccess=i.V.batchCalls(u.onSuccess)),u.onSettled&&(u.onSettled=i.V.batchCalls(u.onSettled)),u.suspense&&("number"!=typeof u.staleTime&&(u.staleTime=1e3),0===u.cacheTime&&(u.cacheTime=1)),(u.suspense||u.useErrorBoundary)&&!s.isReset()&&(u.retryOnMount=!1);var c=a.useState(function(){return new t(o,u)})[0],f=c.getOptimisticResult(u);if(a.useEffect(function(){r.current=!0,s.clearReset();var e=c.subscribe(i.V.batchCalls(function(){r.current&&n(function(e){return e+1})}));return c.updateResult(),function(){r.current=!1,e()}},[s,c]),a.useEffect(function(){c.setOptions(u,{listeners:!1})},[u,c]),u.suspense&&f.isLoading)throw c.fetchOptimistic(u).then(function(e){var t=e.data;null==u.onSuccess||u.onSuccess(t),null==u.onSettled||u.onSettled(t,null)}).catch(function(e){s.clearReset(),null==u.onError||u.onError(e),null==u.onSettled||u.onSettled(void 0,e)});if(f.isError&&!s.isReset()&&!f.isFetching&&shouldThrowError(u.suspense,u.useErrorBoundary,[f.error,c.getCurrentQuery()]))throw f.error;return"tracked"===u.notifyOnChangeProps&&(f=c.trackResult(f,u)),f}((0,h._v)(e,t,r),b)}},3428:function(e,t,r){"use strict";function _extends(){return(_extends=Object.assign?Object.assign.bind():function(e){for(var t=1;t{let t=p.call(e);return u[t]||(u[t]=t.slice(8,-1).toLowerCase())}),kindOfTest=e=>(e=e.toLowerCase(),t=>v(t)===e),typeOfTest=e=>t=>typeof t===e,{isArray:m}=Array,g=typeOfTest("undefined"),b=kindOfTest("ArrayBuffer"),E=typeOfTest("string"),O=typeOfTest("function"),w=typeOfTest("number"),isObject=e=>null!==e&&"object"==typeof e,isPlainObject=e=>{if("object"!==v(e))return!1;let t=y(e);return(null===t||t===Object.prototype||null===Object.getPrototypeOf(t))&&!(Symbol.toStringTag in e)&&!(Symbol.iterator in e)},C=kindOfTest("Date"),A=kindOfTest("File"),R=kindOfTest("Blob"),S=kindOfTest("FileList"),B=kindOfTest("URLSearchParams"),[T,x,P,F]=["ReadableStream","Request","Response","Headers"].map(kindOfTest);function forEach(e,t,{allOwnKeys:r=!1}={}){let n,i;if(null!=e){if("object"!=typeof e&&(e=[e]),m(e))for(n=0,i=e.length;n0;)if(t===(r=n[i]).toLowerCase())return r;return null}let U="undefined"!=typeof globalThis?globalThis:"undefined"!=typeof self?self:"undefined"!=typeof window?window:global,isContextDefined=e=>!g(e)&&e!==U,k=(a="undefined"!=typeof Uint8Array&&y(Uint8Array),e=>a&&e instanceof a),L=kindOfTest("HTMLFormElement"),M=(({hasOwnProperty:e})=>(t,r)=>e.call(t,r))(Object.prototype),I=kindOfTest("RegExp"),reduceDescriptors=(e,t)=>{let r=Object.getOwnPropertyDescriptors(e),n={};forEach(r,(r,i)=>{let o;!1!==(o=t(r,i,e))&&(n[i]=o||r)}),Object.defineProperties(e,n)},D="abcdefghijklmnopqrstuvwxyz",j="0123456789",q={DIGIT:j,ALPHA:D,ALPHA_DIGIT:D+D.toUpperCase()+j},Q=kindOfTest("AsyncFunction"),_=(n="function"==typeof setImmediate,i=O(U.postMessage),n?setImmediate:i?(o=`axios@${Math.random()}`,s=[],U.addEventListener("message",({source:e,data:t})=>{e===U&&t===o&&s.length&&s.shift()()},!1),e=>{s.push(e),U.postMessage(o,"*")}):e=>setTimeout(e)),N="undefined"!=typeof queueMicrotask?queueMicrotask.bind(U):void 0!==d&&d.nextTick||_;var K={isArray:m,isArrayBuffer:b,isBuffer:function(e){return null!==e&&!g(e)&&null!==e.constructor&&!g(e.constructor)&&O(e.constructor.isBuffer)&&e.constructor.isBuffer(e)},isFormData:e=>{let t;return e&&("function"==typeof FormData&&e instanceof FormData||O(e.append)&&("formdata"===(t=v(e))||"object"===t&&O(e.toString)&&"[object FormData]"===e.toString()))},isArrayBufferView:function(e){return"undefined"!=typeof ArrayBuffer&&ArrayBuffer.isView?ArrayBuffer.isView(e):e&&e.buffer&&b(e.buffer)},isString:E,isNumber:w,isBoolean:e=>!0===e||!1===e,isObject,isPlainObject,isReadableStream:T,isRequest:x,isResponse:P,isHeaders:F,isUndefined:g,isDate:C,isFile:A,isBlob:R,isRegExp:I,isFunction:O,isStream:e=>isObject(e)&&O(e.pipe),isURLSearchParams:B,isTypedArray:k,isFileList:S,forEach,merge:function merge(){let{caseless:e}=isContextDefined(this)&&this||{},t={},assignValue=(r,n)=>{let i=e&&findKey(t,n)||n;isPlainObject(t[i])&&isPlainObject(r)?t[i]=merge(t[i],r):isPlainObject(r)?t[i]=merge({},r):m(r)?t[i]=r.slice():t[i]=r};for(let e=0,t=arguments.length;e(forEach(t,(t,n)=>{r&&O(t)?e[n]=bind(t,r):e[n]=t},{allOwnKeys:n}),e),trim:e=>e.trim?e.trim():e.replace(/^[\s\uFEFF\xA0]+|[\s\uFEFF\xA0]+$/g,""),stripBOM:e=>(65279===e.charCodeAt(0)&&(e=e.slice(1)),e),inherits:(e,t,r,n)=>{e.prototype=Object.create(t.prototype,n),e.prototype.constructor=e,Object.defineProperty(e,"super",{value:t.prototype}),r&&Object.assign(e.prototype,r)},toFlatObject:(e,t,r,n)=>{let i,o,s;let u={};if(t=t||{},null==e)return t;do{for(o=(i=Object.getOwnPropertyNames(e)).length;o-- >0;)s=i[o],(!n||n(s,e,t))&&!u[s]&&(t[s]=e[s],u[s]=!0);e=!1!==r&&y(e)}while(e&&(!r||r(e,t))&&e!==Object.prototype);return t},kindOf:v,kindOfTest,endsWith:(e,t,r)=>{e=String(e),(void 0===r||r>e.length)&&(r=e.length),r-=t.length;let n=e.indexOf(t,r);return -1!==n&&n===r},toArray:e=>{if(!e)return null;if(m(e))return e;let t=e.length;if(!w(t))return null;let r=Array(t);for(;t-- >0;)r[t]=e[t];return r},forEachEntry:(e,t)=>{let r;let n=e&&e[Symbol.iterator],i=n.call(e);for(;(r=i.next())&&!r.done;){let n=r.value;t.call(e,n[0],n[1])}},matchAll:(e,t)=>{let r;let n=[];for(;null!==(r=e.exec(t));)n.push(r);return n},isHTMLForm:L,hasOwnProperty:M,hasOwnProp:M,reduceDescriptors,freezeMethods:e=>{reduceDescriptors(e,(t,r)=>{if(O(e)&&-1!==["arguments","caller","callee"].indexOf(r))return!1;let n=e[r];if(O(n)){if(t.enumerable=!1,"writable"in t){t.writable=!1;return}t.set||(t.set=()=>{throw Error("Can not rewrite read-only method '"+r+"'")})}})},toObjectSet:(e,t)=>{let r={};return(e=>{e.forEach(e=>{r[e]=!0})})(m(e)?e:String(e).split(t)),r},toCamelCase:e=>e.toLowerCase().replace(/[-_\s]([a-z\d])(\w*)/g,function(e,t,r){return t.toUpperCase()+r}),noop:()=>{},toFiniteNumber:(e,t)=>null!=e&&Number.isFinite(e=+e)?e:t,findKey,global:U,isContextDefined,ALPHABET:q,generateString:(e=16,t=q.ALPHA_DIGIT)=>{let r="",{length:n}=t;for(;e--;)r+=t[Math.random()*n|0];return r},isSpecCompliantForm:function(e){return!!(e&&O(e.append)&&"FormData"===e[Symbol.toStringTag]&&e[Symbol.iterator])},toJSONObject:e=>{let t=Array(10),visit=(e,r)=>{if(isObject(e)){if(t.indexOf(e)>=0)return;if(!("toJSON"in e)){t[r]=e;let n=m(e)?[]:{};return forEach(e,(e,t)=>{let i=visit(e,r+1);g(i)||(n[t]=i)}),t[r]=void 0,n}}return e};return visit(e,0)},isAsyncFn:Q,isThenable:e=>e&&(isObject(e)||O(e))&&O(e.then)&&O(e.catch),setImmediate:_,asap:N};function AxiosError(e,t,r,n,i){Error.call(this),Error.captureStackTrace?Error.captureStackTrace(this,this.constructor):this.stack=Error().stack,this.message=e,this.name="AxiosError",t&&(this.code=t),r&&(this.config=r),n&&(this.request=n),i&&(this.response=i)}K.inherits(AxiosError,Error,{toJSON:function(){return{message:this.message,name:this.name,description:this.description,number:this.number,fileName:this.fileName,lineNumber:this.lineNumber,columnNumber:this.columnNumber,stack:this.stack,config:K.toJSONObject(this.config),code:this.code,status:this.response&&this.response.status?this.response.status:null}}});let V=AxiosError.prototype,H={};["ERR_BAD_OPTION_VALUE","ERR_BAD_OPTION","ECONNABORTED","ETIMEDOUT","ERR_NETWORK","ERR_FR_TOO_MANY_REDIRECTS","ERR_DEPRECATED","ERR_BAD_RESPONSE","ERR_BAD_REQUEST","ERR_CANCELED","ERR_NOT_SUPPORT","ERR_INVALID_URL"].forEach(e=>{H[e]={value:e}}),Object.defineProperties(AxiosError,H),Object.defineProperty(V,"isAxiosError",{value:!0}),AxiosError.from=(e,t,r,n,i,o)=>{let s=Object.create(V);return K.toFlatObject(e,s,function(e){return e!==Error.prototype},e=>"isAxiosError"!==e),AxiosError.call(s,e.message,t,r,n,i),s.cause=e,s.name=e.name,o&&Object.assign(s,o),s};var Z=r(7133).lW;function isVisitable(e){return K.isPlainObject(e)||K.isArray(e)}function removeBrackets(e){return K.endsWith(e,"[]")?e.slice(0,-2):e}function renderKey(e,t,r){return e?e.concat(t).map(function(e,t){return e=removeBrackets(e),!r&&t?"["+e+"]":e}).join(r?".":""):t}let z=K.toFlatObject(K,{},null,function(e){return/^is[A-Z]/.test(e)});var helpers_toFormData=function(e,t,r){if(!K.isObject(e))throw TypeError("target must be an object");t=t||new FormData,r=K.toFlatObject(r,{metaTokens:!0,dots:!1,indexes:!1},!1,function(e,t){return!K.isUndefined(t[e])});let n=r.metaTokens,i=r.visitor||defaultVisitor,o=r.dots,s=r.indexes,u=r.Blob||"undefined"!=typeof Blob&&Blob,a=u&&K.isSpecCompliantForm(t);if(!K.isFunction(i))throw TypeError("visitor must be a function");function convertValue(e){if(null===e)return"";if(K.isDate(e))return e.toISOString();if(!a&&K.isBlob(e))throw new AxiosError("Blob is not supported. Use a Buffer instead.");return K.isArrayBuffer(e)||K.isTypedArray(e)?a&&"function"==typeof Blob?new Blob([e]):Z.from(e):e}function defaultVisitor(e,r,i){let u=e;if(e&&!i&&"object"==typeof e){if(K.endsWith(r,"{}"))r=n?r:r.slice(0,-2),e=JSON.stringify(e);else{var a;if(K.isArray(e)&&(a=e,K.isArray(a)&&!a.some(isVisitable))||(K.isFileList(e)||K.endsWith(r,"[]"))&&(u=K.toArray(e)))return r=removeBrackets(r),u.forEach(function(e,n){K.isUndefined(e)||null===e||t.append(!0===s?renderKey([r],n,o):null===s?r:r+"[]",convertValue(e))}),!1}}return!!isVisitable(e)||(t.append(renderKey(i,r,o),convertValue(e)),!1)}let c=[],f=Object.assign(z,{defaultVisitor,convertValue,isVisitable});if(!K.isObject(e))throw TypeError("data must be an object");return!function build(e,r){if(!K.isUndefined(e)){if(-1!==c.indexOf(e))throw Error("Circular reference detected in "+r.join("."));c.push(e),K.forEach(e,function(e,n){let o=!(K.isUndefined(e)||null===e)&&i.call(t,e,K.isString(n)?n.trim():n,r,f);!0===o&&build(e,r?r.concat(n):[n])}),c.pop()}}(e),t};function encode(e){let t={"!":"%21","'":"%27","(":"%28",")":"%29","~":"%7E","%20":"+","%00":"\x00"};return encodeURIComponent(e).replace(/[!'()~]|%20|%00/g,function(e){return t[e]})}function AxiosURLSearchParams(e,t){this._pairs=[],e&&helpers_toFormData(e,this,t)}let G=AxiosURLSearchParams.prototype;function buildURL_encode(e){return encodeURIComponent(e).replace(/%3A/gi,":").replace(/%24/g,"$").replace(/%2C/gi,",").replace(/%20/g,"+").replace(/%5B/gi,"[").replace(/%5D/gi,"]")}function buildURL(e,t,r){let n;if(!t)return e;let i=r&&r.encode||buildURL_encode,o=r&&r.serialize;if(n=o?o(t,r):K.isURLSearchParams(t)?t.toString():new AxiosURLSearchParams(t,r).toString(i)){let t=e.indexOf("#");-1!==t&&(e=e.slice(0,t)),e+=(-1===e.indexOf("?")?"?":"&")+n}return e}G.append=function(e,t){this._pairs.push([e,t])},G.toString=function(e){let t=e?function(t){return e.call(this,t,encode)}:encode;return this._pairs.map(function(e){return t(e[0])+"="+t(e[1])},"").join("&")};var J=class{constructor(){this.handlers=[]}use(e,t,r){return this.handlers.push({fulfilled:e,rejected:t,synchronous:!!r&&r.synchronous,runWhen:r?r.runWhen:null}),this.handlers.length-1}eject(e){this.handlers[e]&&(this.handlers[e]=null)}clear(){this.handlers&&(this.handlers=[])}forEach(e){K.forEach(this.handlers,function(t){null!==t&&e(t)})}},W={silentJSONParsing:!0,forcedJSONParsing:!0,clarifyTimeoutError:!1},$="undefined"!=typeof URLSearchParams?URLSearchParams:AxiosURLSearchParams,X="undefined"!=typeof FormData?FormData:null,Y="undefined"!=typeof Blob?Blob:null;let ee="undefined"!=typeof window&&"undefined"!=typeof document,et=(c="undefined"!=typeof navigator&&navigator.product,ee&&0>["ReactNative","NativeScript","NS"].indexOf(c)),er="undefined"!=typeof WorkerGlobalScope&&self instanceof WorkerGlobalScope&&"function"==typeof self.importScripts,en=ee&&window.location.href||"http://localhost";var ei={...h,isBrowser:!0,classes:{URLSearchParams:$,FormData:X,Blob:Y},protocols:["http","https","file","blob","url","data"]},helpers_formDataToJSON=function(e){if(K.isFormData(e)&&K.isFunction(e.entries)){let t={};return K.forEachEntry(e,(e,r)=>{!function buildPath(e,t,r,n){let i=e[n++];if("__proto__"===i)return!0;let o=Number.isFinite(+i),s=n>=e.length;if(i=!i&&K.isArray(r)?r.length:i,s)return K.hasOwnProp(r,i)?r[i]=[r[i],t]:r[i]=t,!o;r[i]&&K.isObject(r[i])||(r[i]=[]);let u=buildPath(e,t,r[i],n);return u&&K.isArray(r[i])&&(r[i]=function(e){let t,r;let n={},i=Object.keys(e),o=i.length;for(t=0;t"[]"===e[0]?"":e[1]||e[0]),r,t,0)}),t}return null};let eo={transitional:W,adapter:["xhr","http","fetch"],transformRequest:[function(e,t){let r;let n=t.getContentType()||"",i=n.indexOf("application/json")>-1,o=K.isObject(e);o&&K.isHTMLForm(e)&&(e=new FormData(e));let s=K.isFormData(e);if(s)return i?JSON.stringify(helpers_formDataToJSON(e)):e;if(K.isArrayBuffer(e)||K.isBuffer(e)||K.isStream(e)||K.isFile(e)||K.isBlob(e)||K.isReadableStream(e))return e;if(K.isArrayBufferView(e))return e.buffer;if(K.isURLSearchParams(e))return t.setContentType("application/x-www-form-urlencoded;charset=utf-8",!1),e.toString();if(o){if(n.indexOf("application/x-www-form-urlencoded")>-1){var u,a;return(u=e,a=this.formSerializer,helpers_toFormData(u,new ei.classes.URLSearchParams,Object.assign({visitor:function(e,t,r,n){return ei.isNode&&K.isBuffer(e)?(this.append(t,e.toString("base64")),!1):n.defaultVisitor.apply(this,arguments)}},a))).toString()}if((r=K.isFileList(e))||n.indexOf("multipart/form-data")>-1){let t=this.env&&this.env.FormData;return helpers_toFormData(r?{"files[]":e}:e,t&&new t,this.formSerializer)}}return o||i?(t.setContentType("application/json",!1),function(e,t,r){if(K.isString(e))try{return(0,JSON.parse)(e),K.trim(e)}catch(e){if("SyntaxError"!==e.name)throw e}return(0,JSON.stringify)(e)}(e)):e}],transformResponse:[function(e){let t=this.transitional||eo.transitional,r=t&&t.forcedJSONParsing,n="json"===this.responseType;if(K.isResponse(e)||K.isReadableStream(e))return e;if(e&&K.isString(e)&&(r&&!this.responseType||n)){let r=t&&t.silentJSONParsing;try{return JSON.parse(e)}catch(e){if(!r&&n){if("SyntaxError"===e.name)throw AxiosError.from(e,AxiosError.ERR_BAD_RESPONSE,this,null,this.response);throw e}}}return e}],timeout:0,xsrfCookieName:"XSRF-TOKEN",xsrfHeaderName:"X-XSRF-TOKEN",maxContentLength:-1,maxBodyLength:-1,env:{FormData:ei.classes.FormData,Blob:ei.classes.Blob},validateStatus:function(e){return e>=200&&e<300},headers:{common:{Accept:"application/json, text/plain, */*","Content-Type":void 0}}};K.forEach(["delete","get","head","post","put","patch"],e=>{eo.headers[e]={}});let es=K.toObjectSet(["age","authorization","content-length","content-type","etag","expires","from","host","if-modified-since","if-unmodified-since","last-modified","location","max-forwards","proxy-authorization","referer","retry-after","user-agent"]);var parseHeaders=e=>{let t,r,n;let i={};return e&&e.split("\n").forEach(function(e){n=e.indexOf(":"),t=e.substring(0,n).trim().toLowerCase(),r=e.substring(n+1).trim(),!t||i[t]&&es[t]||("set-cookie"===t?i[t]?i[t].push(r):i[t]=[r]:i[t]=i[t]?i[t]+", "+r:r)}),i};let eu=Symbol("internals");function normalizeHeader(e){return e&&String(e).trim().toLowerCase()}function normalizeValue(e){return!1===e||null==e?e:K.isArray(e)?e.map(normalizeValue):String(e)}let isValidHeaderName=e=>/^[-_a-zA-Z0-9^`|~,!#$%&'*+.]+$/.test(e.trim());function matchHeaderValue(e,t,r,n,i){if(K.isFunction(n))return n.call(this,t,r);if(i&&(t=r),K.isString(t)){if(K.isString(n))return -1!==t.indexOf(n);if(K.isRegExp(n))return n.test(t)}}let AxiosHeaders=class AxiosHeaders{constructor(e){e&&this.set(e)}set(e,t,r){let n=this;function setHeader(e,t,r){let i=normalizeHeader(t);if(!i)throw Error("header name must be a non-empty string");let o=K.findKey(n,i);o&&void 0!==n[o]&&!0!==r&&(void 0!==r||!1===n[o])||(n[o||t]=normalizeValue(e))}let setHeaders=(e,t)=>K.forEach(e,(e,r)=>setHeader(e,r,t));if(K.isPlainObject(e)||e instanceof this.constructor)setHeaders(e,t);else if(K.isString(e)&&(e=e.trim())&&!isValidHeaderName(e))setHeaders(parseHeaders(e),t);else if(K.isHeaders(e))for(let[t,n]of e.entries())setHeader(n,t,r);else null!=e&&setHeader(t,e,r);return this}get(e,t){if(e=normalizeHeader(e)){let r=K.findKey(this,e);if(r){let e=this[r];if(!t)return e;if(!0===t)return function(e){let t;let r=Object.create(null),n=/([^\s,;=]+)\s*(?:=\s*([^,;]+))?/g;for(;t=n.exec(e);)r[t[1]]=t[2];return r}(e);if(K.isFunction(t))return t.call(this,e,r);if(K.isRegExp(t))return t.exec(e);throw TypeError("parser must be boolean|regexp|function")}}}has(e,t){if(e=normalizeHeader(e)){let r=K.findKey(this,e);return!!(r&&void 0!==this[r]&&(!t||matchHeaderValue(this,this[r],r,t)))}return!1}delete(e,t){let r=this,n=!1;function deleteHeader(e){if(e=normalizeHeader(e)){let i=K.findKey(r,e);i&&(!t||matchHeaderValue(r,r[i],i,t))&&(delete r[i],n=!0)}}return K.isArray(e)?e.forEach(deleteHeader):deleteHeader(e),n}clear(e){let t=Object.keys(this),r=t.length,n=!1;for(;r--;){let i=t[r];(!e||matchHeaderValue(this,this[i],i,e,!0))&&(delete this[i],n=!0)}return n}normalize(e){let t=this,r={};return K.forEach(this,(n,i)=>{let o=K.findKey(r,i);if(o){t[o]=normalizeValue(n),delete t[i];return}let s=e?i.trim().toLowerCase().replace(/([a-z\d])(\w*)/g,(e,t,r)=>t.toUpperCase()+r):String(i).trim();s!==i&&delete t[i],t[s]=normalizeValue(n),r[s]=!0}),this}concat(...e){return this.constructor.concat(this,...e)}toJSON(e){let t=Object.create(null);return K.forEach(this,(r,n)=>{null!=r&&!1!==r&&(t[n]=e&&K.isArray(r)?r.join(", "):r)}),t}[Symbol.iterator](){return Object.entries(this.toJSON())[Symbol.iterator]()}toString(){return Object.entries(this.toJSON()).map(([e,t])=>e+": "+t).join("\n")}get[Symbol.toStringTag](){return"AxiosHeaders"}static from(e){return e instanceof this?e:new this(e)}static concat(e,...t){let r=new this(e);return t.forEach(e=>r.set(e)),r}static accessor(e){let t=this[eu]=this[eu]={accessors:{}},r=t.accessors,n=this.prototype;function defineAccessor(e){let t=normalizeHeader(e);r[t]||(!function(e,t){let r=K.toCamelCase(" "+t);["get","set","has"].forEach(n=>{Object.defineProperty(e,n+r,{value:function(e,r,i){return this[n].call(this,t,e,r,i)},configurable:!0})})}(n,e),r[t]=!0)}return K.isArray(e)?e.forEach(defineAccessor):defineAccessor(e),this}};function transformData(e,t){let r=this||eo,n=t||r,i=AxiosHeaders.from(n.headers),o=n.data;return K.forEach(e,function(e){o=e.call(r,o,i.normalize(),t?t.status:void 0)}),i.normalize(),o}function isCancel(e){return!!(e&&e.__CANCEL__)}function CanceledError(e,t,r){AxiosError.call(this,null==e?"canceled":e,AxiosError.ERR_CANCELED,t,r),this.name="CanceledError"}function settle(e,t,r){let n=r.config.validateStatus;!r.status||!n||n(r.status)?e(r):t(new AxiosError("Request failed with status code "+r.status,[AxiosError.ERR_BAD_REQUEST,AxiosError.ERR_BAD_RESPONSE][Math.floor(r.status/100)-4],r.config,r.request,r))}AxiosHeaders.accessor(["Content-Type","Content-Length","Accept","Accept-Encoding","User-Agent","Authorization"]),K.reduceDescriptors(AxiosHeaders.prototype,({value:e},t)=>{let r=t[0].toUpperCase()+t.slice(1);return{get:()=>e,set(e){this[r]=e}}}),K.freezeMethods(AxiosHeaders),K.inherits(CanceledError,AxiosError,{__CANCEL__:!0});var helpers_speedometer=function(e,t){let r;e=e||10;let n=Array(e),i=Array(e),o=0,s=0;return t=void 0!==t?t:1e3,function(u){let a=Date.now(),c=i[s];r||(r=a),n[o]=u,i[o]=a;let f=s,l=0;for(;f!==o;)l+=n[f++],f%=e;if((o=(o+1)%e)===s&&(s=(s+1)%e),a-r{i=o,r=null,n&&(clearTimeout(n),n=null),e.apply(null,t)};return[(...e)=>{let t=Date.now(),s=t-i;s>=o?invoke(e,t):(r=e,n||(n=setTimeout(()=>{n=null,invoke(r)},o-s)))},()=>r&&invoke(r)]};let progressEventReducer=(e,t,r=3)=>{let n=0,i=helpers_speedometer(50,250);return helpers_throttle(r=>{let o=r.loaded,s=r.lengthComputable?r.total:void 0,u=o-n,a=i(u),c=o<=s;n=o,e({loaded:o,total:s,progress:s?o/s:void 0,bytes:u,rate:a||void 0,estimated:a&&s&&c?(s-o)/a:void 0,event:r,lengthComputable:null!=s,[t?"download":"upload"]:!0})},r)},progressEventDecorator=(e,t)=>{let r=null!=e;return[n=>t[0]({lengthComputable:r,total:e,loaded:n}),t[1]]},asyncDecorator=e=>(...t)=>K.asap(()=>e(...t));var ea=ei.hasStandardBrowserEnv?function(){let e;let t=/(msie|trident)/i.test(navigator.userAgent),r=document.createElement("a");function resolveURL(e){let n=e;return t&&(r.setAttribute("href",n),n=r.href),r.setAttribute("href",n),{href:r.href,protocol:r.protocol?r.protocol.replace(/:$/,""):"",host:r.host,search:r.search?r.search.replace(/^\?/,""):"",hash:r.hash?r.hash.replace(/^#/,""):"",hostname:r.hostname,port:r.port,pathname:"/"===r.pathname.charAt(0)?r.pathname:"/"+r.pathname}}return e=resolveURL(window.location.href),function(t){let r=K.isString(t)?resolveURL(t):t;return r.protocol===e.protocol&&r.host===e.host}}():function(){return!0},ec=ei.hasStandardBrowserEnv?{write(e,t,r,n,i,o){let s=[e+"="+encodeURIComponent(t)];K.isNumber(r)&&s.push("expires="+new Date(r).toGMTString()),K.isString(n)&&s.push("path="+n),K.isString(i)&&s.push("domain="+i),!0===o&&s.push("secure"),document.cookie=s.join("; ")},read(e){let t=document.cookie.match(RegExp("(^|;\\s*)("+e+")=([^;]*)"));return t?decodeURIComponent(t[3]):null},remove(e){this.write(e,"",Date.now()-864e5)}}:{write(){},read:()=>null,remove(){}};function buildFullPath(e,t){return e&&!/^([a-z][a-z\d+\-.]*:)?\/\//i.test(t)?t?e.replace(/\/?\/$/,"")+"/"+t.replace(/^\/+/,""):e:t}let headersToObject=e=>e instanceof AxiosHeaders?{...e}:e;function mergeConfig(e,t){t=t||{};let r={};function getMergedValue(e,t,r){return K.isPlainObject(e)&&K.isPlainObject(t)?K.merge.call({caseless:r},e,t):K.isPlainObject(t)?K.merge({},t):K.isArray(t)?t.slice():t}function mergeDeepProperties(e,t,r){return K.isUndefined(t)?K.isUndefined(e)?void 0:getMergedValue(void 0,e,r):getMergedValue(e,t,r)}function valueFromConfig2(e,t){if(!K.isUndefined(t))return getMergedValue(void 0,t)}function defaultToConfig2(e,t){return K.isUndefined(t)?K.isUndefined(e)?void 0:getMergedValue(void 0,e):getMergedValue(void 0,t)}function mergeDirectKeys(r,n,i){return i in t?getMergedValue(r,n):i in e?getMergedValue(void 0,r):void 0}let n={url:valueFromConfig2,method:valueFromConfig2,data:valueFromConfig2,baseURL:defaultToConfig2,transformRequest:defaultToConfig2,transformResponse:defaultToConfig2,paramsSerializer:defaultToConfig2,timeout:defaultToConfig2,timeoutMessage:defaultToConfig2,withCredentials:defaultToConfig2,withXSRFToken:defaultToConfig2,adapter:defaultToConfig2,responseType:defaultToConfig2,xsrfCookieName:defaultToConfig2,xsrfHeaderName:defaultToConfig2,onUploadProgress:defaultToConfig2,onDownloadProgress:defaultToConfig2,decompress:defaultToConfig2,maxContentLength:defaultToConfig2,maxBodyLength:defaultToConfig2,beforeRedirect:defaultToConfig2,transport:defaultToConfig2,httpAgent:defaultToConfig2,httpsAgent:defaultToConfig2,cancelToken:defaultToConfig2,socketPath:defaultToConfig2,responseEncoding:defaultToConfig2,validateStatus:mergeDirectKeys,headers:(e,t)=>mergeDeepProperties(headersToObject(e),headersToObject(t),!0)};return K.forEach(Object.keys(Object.assign({},e,t)),function(i){let o=n[i]||mergeDeepProperties,s=o(e[i],t[i],i);K.isUndefined(s)&&o!==mergeDirectKeys||(r[i]=s)}),r}var resolveConfig=e=>{let t;let r=mergeConfig({},e),{data:n,withXSRFToken:i,xsrfHeaderName:o,xsrfCookieName:s,headers:u,auth:a}=r;if(r.headers=u=AxiosHeaders.from(u),r.url=buildURL(buildFullPath(r.baseURL,r.url),e.params,e.paramsSerializer),a&&u.set("Authorization","Basic "+btoa((a.username||"")+":"+(a.password?unescape(encodeURIComponent(a.password)):""))),K.isFormData(n)){if(ei.hasStandardBrowserEnv||ei.hasStandardBrowserWebWorkerEnv)u.setContentType(void 0);else if(!1!==(t=u.getContentType())){let[e,...r]=t?t.split(";").map(e=>e.trim()).filter(Boolean):[];u.setContentType([e||"multipart/form-data",...r].join("; "))}}if(ei.hasStandardBrowserEnv&&(i&&K.isFunction(i)&&(i=i(r)),i||!1!==i&&ea(r.url))){let e=o&&s&&ec.read(s);e&&u.set(o,e)}return r};let ef="undefined"!=typeof XMLHttpRequest;var el=ef&&function(e){return new Promise(function(t,r){let n,i,o,s,u;let a=resolveConfig(e),c=a.data,f=AxiosHeaders.from(a.headers).normalize(),{responseType:l,onUploadProgress:h,onDownloadProgress:d}=a;function done(){s&&s(),u&&u(),a.cancelToken&&a.cancelToken.unsubscribe(n),a.signal&&a.signal.removeEventListener("abort",n)}let p=new XMLHttpRequest;function onloadend(){if(!p)return;let n=AxiosHeaders.from("getAllResponseHeaders"in p&&p.getAllResponseHeaders()),i=l&&"text"!==l&&"json"!==l?p.response:p.responseText,o={data:i,status:p.status,statusText:p.statusText,headers:n,config:e,request:p};settle(function(e){t(e),done()},function(e){r(e),done()},o),p=null}p.open(a.method.toUpperCase(),a.url,!0),p.timeout=a.timeout,"onloadend"in p?p.onloadend=onloadend:p.onreadystatechange=function(){p&&4===p.readyState&&(0!==p.status||p.responseURL&&0===p.responseURL.indexOf("file:"))&&setTimeout(onloadend)},p.onabort=function(){p&&(r(new AxiosError("Request aborted",AxiosError.ECONNABORTED,e,p)),p=null)},p.onerror=function(){r(new AxiosError("Network Error",AxiosError.ERR_NETWORK,e,p)),p=null},p.ontimeout=function(){let t=a.timeout?"timeout of "+a.timeout+"ms exceeded":"timeout exceeded",n=a.transitional||W;a.timeoutErrorMessage&&(t=a.timeoutErrorMessage),r(new AxiosError(t,n.clarifyTimeoutError?AxiosError.ETIMEDOUT:AxiosError.ECONNABORTED,e,p)),p=null},void 0===c&&f.setContentType(null),"setRequestHeader"in p&&K.forEach(f.toJSON(),function(e,t){p.setRequestHeader(t,e)}),K.isUndefined(a.withCredentials)||(p.withCredentials=!!a.withCredentials),l&&"json"!==l&&(p.responseType=a.responseType),d&&([o,u]=progressEventReducer(d,!0),p.addEventListener("progress",o)),h&&p.upload&&([i,s]=progressEventReducer(h),p.upload.addEventListener("progress",i),p.upload.addEventListener("loadend",s)),(a.cancelToken||a.signal)&&(n=t=>{p&&(r(!t||t.type?new CanceledError(null,e,p):t),p.abort(),p=null)},a.cancelToken&&a.cancelToken.subscribe(n),a.signal&&(a.signal.aborted?n():a.signal.addEventListener("abort",n)));let y=function(e){let t=/^([-+\w]{1,25})(:?\/\/|:)/.exec(e);return t&&t[1]||""}(a.url);if(y&&-1===ei.protocols.indexOf(y)){r(new AxiosError("Unsupported protocol "+y+":",AxiosError.ERR_BAD_REQUEST,e));return}p.send(c||null)})},helpers_composeSignals=(e,t)=>{let r,n=new AbortController,onabort=function(e){if(!r){r=!0,unsubscribe();let t=e instanceof Error?e:this.reason;n.abort(t instanceof AxiosError?t:new CanceledError(t instanceof Error?t.message:t))}},i=t&&setTimeout(()=>{onabort(new AxiosError(`timeout ${t} of ms exceeded`,AxiosError.ETIMEDOUT))},t),unsubscribe=()=>{e&&(i&&clearTimeout(i),i=null,e.forEach(e=>{e&&(e.removeEventListener?e.removeEventListener("abort",onabort):e.unsubscribe(onabort))}),e=null)};e.forEach(e=>e&&e.addEventListener&&e.addEventListener("abort",onabort));let{signal:o}=n;return o.unsubscribe=unsubscribe,[o,()=>{i&&clearTimeout(i),i=null}]};let streamChunk=function*(e,t){let r,n=e.byteLength;if(!t||n{let o;let s=readBytes(e,t,i),u=0,_onFinish=e=>{!o&&(o=!0,n&&n(e))};return new ReadableStream({async pull(e){try{let{done:t,value:n}=await s.next();if(t){_onFinish(),e.close();return}let i=n.byteLength;if(r){let e=u+=i;r(e)}e.enqueue(new Uint8Array(n))}catch(e){throw _onFinish(e),e}},cancel:e=>(_onFinish(e),s.return())},{highWaterMark:2})},eh="function"==typeof fetch&&"function"==typeof Request&&"function"==typeof Response,ed=eh&&"function"==typeof ReadableStream,ep=eh&&("function"==typeof TextEncoder?(f=new TextEncoder,e=>f.encode(e)):async e=>new Uint8Array(await new Response(e).arrayBuffer())),test=(e,...t)=>{try{return!!e(...t)}catch(e){return!1}},ey=ed&&test(()=>{let e=!1,t=new Request(ei.origin,{body:new ReadableStream,method:"POST",get duplex(){return e=!0,"half"}}).headers.has("Content-Type");return e&&!t}),ev=ed&&test(()=>K.isReadableStream(new Response("").body)),em={stream:ev&&(e=>e.body)};eh&&(l=new Response,["text","arrayBuffer","blob","formData","stream"].forEach(e=>{em[e]||(em[e]=K.isFunction(l[e])?t=>t[e]():(t,r)=>{throw new AxiosError(`Response type '${e}' is not supported`,AxiosError.ERR_NOT_SUPPORT,r)})}));let getBodyLength=async e=>null==e?0:K.isBlob(e)?e.size:K.isSpecCompliantForm(e)?(await new Request(e).arrayBuffer()).byteLength:K.isArrayBufferView(e)||K.isArrayBuffer(e)?e.byteLength:(K.isURLSearchParams(e)&&(e+=""),K.isString(e))?(await ep(e)).byteLength:void 0,resolveBodyLength=async(e,t)=>{let r=K.toFiniteNumber(e.getContentLength());return null==r?getBodyLength(t):r};var eg=eh&&(async e=>{let t,r,n,{url:i,method:o,data:s,signal:u,cancelToken:a,timeout:c,onDownloadProgress:f,onUploadProgress:l,responseType:h,headers:d,withCredentials:p="same-origin",fetchOptions:y}=resolveConfig(e);h=h?(h+"").toLowerCase():"text";let[v,m]=u||a||c?helpers_composeSignals([u,a],c):[],onFinish=()=>{t||setTimeout(()=>{v&&v.unsubscribe()}),t=!0};try{if(l&&ey&&"get"!==o&&"head"!==o&&0!==(n=await resolveBodyLength(d,s))){let e,t=new Request(i,{method:"POST",body:s,duplex:"half"});if(K.isFormData(s)&&(e=t.headers.get("content-type"))&&d.setContentType(e),t.body){let[e,r]=progressEventDecorator(n,progressEventReducer(asyncDecorator(l)));s=trackStream(t.body,65536,e,r,ep)}}K.isString(p)||(p=p?"include":"omit"),r=new Request(i,{...y,signal:v,method:o.toUpperCase(),headers:d.normalize().toJSON(),body:s,duplex:"half",credentials:p});let t=await fetch(r),u=ev&&("stream"===h||"response"===h);if(ev&&(f||u)){let e={};["status","statusText","headers"].forEach(r=>{e[r]=t[r]});let r=K.toFiniteNumber(t.headers.get("content-length")),[n,i]=f&&progressEventDecorator(r,progressEventReducer(asyncDecorator(f),!0))||[];t=new Response(trackStream(t.body,65536,n,()=>{i&&i(),u&&onFinish()},ep),e)}h=h||"text";let a=await em[K.findKey(em,h)||"text"](t,e);return u||onFinish(),m&&m(),await new Promise((n,i)=>{settle(n,i,{data:a,headers:AxiosHeaders.from(t.headers),status:t.status,statusText:t.statusText,config:e,request:r})})}catch(t){if(onFinish(),t&&"TypeError"===t.name&&/fetch/i.test(t.message))throw Object.assign(new AxiosError("Network Error",AxiosError.ERR_NETWORK,e,r),{cause:t.cause||t});throw AxiosError.from(t,t&&t.code,e,r)}});let eb={http:null,xhr:el,fetch:eg};K.forEach(eb,(e,t)=>{if(e){try{Object.defineProperty(e,"name",{value:t})}catch(e){}Object.defineProperty(e,"adapterName",{value:t})}});let renderReason=e=>`- ${e}`,isResolvedHandle=e=>K.isFunction(e)||null===e||!1===e;var eE={getAdapter:e=>{let t,r;e=K.isArray(e)?e:[e];let{length:n}=e,i={};for(let o=0;o`adapter ${e} `+(!1===t?"is not supported by the environment":"is not available in the build")),t=n?e.length>1?"since :\n"+e.map(renderReason).join("\n"):" "+renderReason(e[0]):"as no adapter specified";throw new AxiosError("There is no suitable adapter to dispatch the request "+t,"ERR_NOT_SUPPORT")}return r},adapters:eb};function throwIfCancellationRequested(e){if(e.cancelToken&&e.cancelToken.throwIfRequested(),e.signal&&e.signal.aborted)throw new CanceledError(null,e)}function dispatchRequest(e){throwIfCancellationRequested(e),e.headers=AxiosHeaders.from(e.headers),e.data=transformData.call(e,e.transformRequest),-1!==["post","put","patch"].indexOf(e.method)&&e.headers.setContentType("application/x-www-form-urlencoded",!1);let t=eE.getAdapter(e.adapter||eo.adapter);return t(e).then(function(t){return throwIfCancellationRequested(e),t.data=transformData.call(e,e.transformResponse,t),t.headers=AxiosHeaders.from(t.headers),t},function(t){return!isCancel(t)&&(throwIfCancellationRequested(e),t&&t.response&&(t.response.data=transformData.call(e,e.transformResponse,t.response),t.response.headers=AxiosHeaders.from(t.response.headers))),Promise.reject(t)})}let eO="1.7.3",ew={};["object","boolean","number","function","string","symbol"].forEach((e,t)=>{ew[e]=function(r){return typeof r===e||"a"+(t<1?"n ":" ")+e}});let eC={};ew.transitional=function(e,t,r){function formatMessage(e,t){return"[Axios v"+eO+"] Transitional option '"+e+"'"+t+(r?". "+r:"")}return(r,n,i)=>{if(!1===e)throw new AxiosError(formatMessage(n," has been removed"+(t?" in "+t:"")),AxiosError.ERR_DEPRECATED);return t&&!eC[n]&&(eC[n]=!0,console.warn(formatMessage(n," has been deprecated since v"+t+" and will be removed in the near future"))),!e||e(r,n,i)}};var eA={assertOptions:function(e,t,r){if("object"!=typeof e)throw new AxiosError("options must be an object",AxiosError.ERR_BAD_OPTION_VALUE);let n=Object.keys(e),i=n.length;for(;i-- >0;){let o=n[i],s=t[o];if(s){let t=e[o],r=void 0===t||s(t,o,e);if(!0!==r)throw new AxiosError("option "+o+" must be "+r,AxiosError.ERR_BAD_OPTION_VALUE);continue}if(!0!==r)throw new AxiosError("Unknown option "+o,AxiosError.ERR_BAD_OPTION)}},validators:ew};let eR=eA.validators;let Axios=class Axios{constructor(e){this.defaults=e,this.interceptors={request:new J,response:new J}}async request(e,t){try{return await this._request(e,t)}catch(e){if(e instanceof Error){let t;Error.captureStackTrace?Error.captureStackTrace(t={}):t=Error();let r=t.stack?t.stack.replace(/^.+\n/,""):"";try{e.stack?r&&!String(e.stack).endsWith(r.replace(/^.+\n.+\n/,""))&&(e.stack+="\n"+r):e.stack=r}catch(e){}}throw e}}_request(e,t){let r,n;"string"==typeof e?(t=t||{}).url=e:t=e||{},t=mergeConfig(this.defaults,t);let{transitional:i,paramsSerializer:o,headers:s}=t;void 0!==i&&eA.assertOptions(i,{silentJSONParsing:eR.transitional(eR.boolean),forcedJSONParsing:eR.transitional(eR.boolean),clarifyTimeoutError:eR.transitional(eR.boolean)},!1),null!=o&&(K.isFunction(o)?t.paramsSerializer={serialize:o}:eA.assertOptions(o,{encode:eR.function,serialize:eR.function},!0)),t.method=(t.method||this.defaults.method||"get").toLowerCase();let u=s&&K.merge(s.common,s[t.method]);s&&K.forEach(["delete","get","head","post","put","patch","common"],e=>{delete s[e]}),t.headers=AxiosHeaders.concat(u,s);let a=[],c=!0;this.interceptors.request.forEach(function(e){("function"!=typeof e.runWhen||!1!==e.runWhen(t))&&(c=c&&e.synchronous,a.unshift(e.fulfilled,e.rejected))});let f=[];this.interceptors.response.forEach(function(e){f.push(e.fulfilled,e.rejected)});let l=0;if(!c){let e=[dispatchRequest.bind(this),void 0];for(e.unshift.apply(e,a),e.push.apply(e,f),n=e.length,r=Promise.resolve(t);l{if(!r._listeners)return;let t=r._listeners.length;for(;t-- >0;)r._listeners[t](e);r._listeners=null}),this.promise.then=e=>{let t;let n=new Promise(e=>{r.subscribe(e),t=e}).then(e);return n.cancel=function(){r.unsubscribe(t)},n},e(function(e,n,i){r.reason||(r.reason=new CanceledError(e,n,i),t(r.reason))})}throwIfRequested(){if(this.reason)throw this.reason}subscribe(e){if(this.reason){e(this.reason);return}this._listeners?this._listeners.push(e):this._listeners=[e]}unsubscribe(e){if(!this._listeners)return;let t=this._listeners.indexOf(e);-1!==t&&this._listeners.splice(t,1)}static source(){let e;let t=new CancelToken(function(t){e=t});return{token:t,cancel:e}}};let eS={Continue:100,SwitchingProtocols:101,Processing:102,EarlyHints:103,Ok:200,Created:201,Accepted:202,NonAuthoritativeInformation:203,NoContent:204,ResetContent:205,PartialContent:206,MultiStatus:207,AlreadyReported:208,ImUsed:226,MultipleChoices:300,MovedPermanently:301,Found:302,SeeOther:303,NotModified:304,UseProxy:305,Unused:306,TemporaryRedirect:307,PermanentRedirect:308,BadRequest:400,Unauthorized:401,PaymentRequired:402,Forbidden:403,NotFound:404,MethodNotAllowed:405,NotAcceptable:406,ProxyAuthenticationRequired:407,RequestTimeout:408,Conflict:409,Gone:410,LengthRequired:411,PreconditionFailed:412,PayloadTooLarge:413,UriTooLong:414,UnsupportedMediaType:415,RangeNotSatisfiable:416,ExpectationFailed:417,ImATeapot:418,MisdirectedRequest:421,UnprocessableEntity:422,Locked:423,FailedDependency:424,TooEarly:425,UpgradeRequired:426,PreconditionRequired:428,TooManyRequests:429,RequestHeaderFieldsTooLarge:431,UnavailableForLegalReasons:451,InternalServerError:500,NotImplemented:501,BadGateway:502,ServiceUnavailable:503,GatewayTimeout:504,HttpVersionNotSupported:505,VariantAlsoNegotiates:506,InsufficientStorage:507,LoopDetected:508,NotExtended:510,NetworkAuthenticationRequired:511};Object.entries(eS).forEach(([e,t])=>{eS[t]=e});let eB=function createInstance(e){let t=new Axios(e),r=bind(Axios.prototype.request,t);return K.extend(r,Axios.prototype,t,{allOwnKeys:!0}),K.extend(r,t,null,{allOwnKeys:!0}),r.create=function(t){return createInstance(mergeConfig(e,t))},r}(eo);eB.Axios=Axios,eB.CanceledError=CanceledError,eB.CancelToken=CancelToken,eB.isCancel=isCancel,eB.VERSION=eO,eB.toFormData=helpers_toFormData,eB.AxiosError=AxiosError,eB.Cancel=eB.CanceledError,eB.all=function(e){return Promise.all(e)},eB.spread=function(e){return function(t){return e.apply(null,t)}},eB.isAxiosError=function(e){return K.isObject(e)&&!0===e.isAxiosError},eB.mergeConfig=mergeConfig,eB.AxiosHeaders=AxiosHeaders,eB.formToJSON=e=>helpers_formDataToJSON(K.isHTMLForm(e)?new FormData(e):e),eB.getAdapter=eE.getAdapter,eB.HttpStatusCode=eS,eB.default=eB;var eT=eB},9891:function(e,t,r){"use strict";function asyncGeneratorStep(e,t,r,n,i,o,s){try{var u=e[o](s),a=u.value}catch(e){r(e);return}u.done?t(a):Promise.resolve(a).then(n,i)}function _asyncToGenerator(e){return function(){var t=this,r=arguments;return new Promise(function(n,i){var o=e.apply(t,r);function _next(e){asyncGeneratorStep(o,n,i,_next,_throw,"next",e)}function _throw(e){asyncGeneratorStep(o,n,i,_next,_throw,"throw",e)}_next(void 0)})}}r.d(t,{Z:function(){return _asyncToGenerator}})}}]); \ No newline at end of file diff --git a/frontend/webapp/dep-out/_next/static/chunks/32-05f69fa51f26447b.js b/frontend/webapp/dep-out/_next/static/chunks/32-05f69fa51f26447b.js deleted file mode 100644 index 81ce4f3b56..0000000000 --- a/frontend/webapp/dep-out/_next/static/chunks/32-05f69fa51f26447b.js +++ /dev/null @@ -1 +0,0 @@ -"use strict";(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[32],{3915:function(t,n,e){e.d(n,{om:function(){return u.om},aO:function(){return u.aO},KY:function(){return E.KY},rV:function(){return E.rV},bl:function(){return E.bl},Of:function(){return u.Of},VR:function(){return E.VR},Fp:function(){return S},Fs:function(){return O},IS:function(){return s},NK:function(){return u.NK},mD:function(){return u.mD},vb:function(){return E.vb},Z6:function(){return c},ye:function(){return u.ye},LV:function(){return getMainContainerLanguage}});var o,r,i,a,c={SETUP:"/setup",OVERVIEW:"/overview",SOURCES:"/sources",INSTRUMENTATION_RULES:"/instrumentation-rules",DESTINATIONS:"/destinations",ACTIONS:"/actions",NEW_DESTINATION:"/setup?state=destinations",MANAGE_DESTINATION:"/create-destination?dest=",UPDATE_DESTINATION:"edit-destination?dest=",CREATE_DESTINATION:"/select-destination",CREATE_SOURCE:"/select-sources",MANAGE_SOURCE:"/edit-source",CHOOSE_DESTINATION:"/choose-destination",CHOOSE_SOURCES:"/choose-sources",CHOOSE_ACTIONS:"/choose-action",EDIT_ACTION:"/edit-action"},s={title:"Odigos",icons:"https://d2q89wckrml3k4.cloudfront.net/logo.png"},u=e(385),E=e(7673),T=e(7022),N="https://d1n7d4xz7fr8b4.cloudfront.net/";(o=a||(a={})).JAVA="java",o.GO="go",o.JAVASCRIPT="javascript",o.PYTHON="python",o.DOTNET="dotnet",o.MYSQL="mysql",o.UNKNOWN="unknown",o.PROCESSING="processing",o.NO_CONTAINERS="no containers",o.NO_RUNNING_PODS="no running pods",o.NGINX="nginx";var O=(r={},(0,T.Z)(r,a.JAVA,"".concat(N,"java.svg")),(0,T.Z)(r,a.GO,"".concat(N,"go.svg")),(0,T.Z)(r,a.JAVASCRIPT,"".concat(N,"nodejs.svg")),(0,T.Z)(r,a.PYTHON,"".concat(N,"python.svg")),(0,T.Z)(r,a.DOTNET,"".concat(N,"dotnet.svg")),(0,T.Z)(r,a.MYSQL,"".concat(N,"mysql.svg")),(0,T.Z)(r,a.UNKNOWN,"".concat(N,"default.svg")),(0,T.Z)(r,a.PROCESSING,"".concat(N,"default.svg")),(0,T.Z)(r,a.NO_CONTAINERS,"".concat(N,"default.svg")),(0,T.Z)(r,a.NO_RUNNING_PODS,"".concat(N,"default.svg")),(0,T.Z)(r,a.NGINX,"".concat(N,"nginx.svg")),r),S=(i={},(0,T.Z)(i,a.JAVA,"#B07219"),(0,T.Z)(i,a.GO,"#00ADD8"),(0,T.Z)(i,a.JAVASCRIPT,"#F7DF1E"),(0,T.Z)(i,a.PYTHON,"#306998"),(0,T.Z)(i,a.DOTNET,"#512BD4"),(0,T.Z)(i,a.MYSQL,"#00758F"),(0,T.Z)(i,a.UNKNOWN,"#8b92a6"),(0,T.Z)(i,a.PROCESSING,"#3367d9"),(0,T.Z)(i,a.NO_CONTAINERS,"#111111"),(0,T.Z)(i,a.NO_RUNNING_PODS,"#666666"),(0,T.Z)(i,a.NGINX,"#009237"),i),getMainContainerLanguage=function(t){var n=null==t?void 0:t.instrumented_application_details;if(!n)return(null==t?void 0:t.number_of_running_instances)>0?a.PROCESSING:a.NO_RUNNING_PODS;var e=n.languages;if(!e)return a.PROCESSING;var o=e.filter(function(t){return"ignored"!==t.language});if(0===o.length)return a.NO_CONTAINERS;var r=o.find(function(t){return"unknown"!==t.language});return r?r.language:a.UNKNOWN}},385:function(t,n,e){e.d(n,{Ar:function(){return r},NK:function(){return u},Of:function(){return s},aO:function(){return c},mD:function(){return i},om:function(){return a},ye:function(){return o}});var o={STEPS:{CHOOSE_SOURCE:"Choose Source",CHOOSE_DESTINATION:"Choose Destination",CREATE_CONNECTION:"Create Connection",STATUS:{ACTIVE:"active",DISABLED:"disabled",DONE:"done"},ID:{CHOOSE_SOURCE:"choose-source",CHOOSE_DESTINATION:"choose-destination",CREATE_CONNECTION:"create-connection"}},HEADER:{CHOOSE_SOURCE_TITLE:"Select applications to connect",CHOOSE_DESTINATION_TITLE:"Add new backend destination from the list"},MENU:{NAMESPACES:"Namespaces",SELECT_ALL:"Select All",FUTURE_APPLY:"Apply for any future apps",TOOLTIP:"Automatically connect any future apps in this namespace",SEARCH_PLACEHOLDER:"Search",TYPE:"Type",MONITORING:"I want to monitor"},NEXT:"Next",BACK:"Back",ALL:"All",CLEAR_SELECTION:"Clear Selection",APPLICATIONS:"Applications",RUNNING_INSTANCES:"Running Instances",SELECTED:"Selected",SOURCE_SELECTED:"Source selected",NONE_SOURCE_SELECTED:"No source selected",MANAGED:"Managed",CREATE_CONNECTION:"Create Connection",UPDATE_CONNECTION:"Update Connection",CONNECTION_MONITORS:"This connection will monitor:",MONITORS:{LOGS:"Logs",METRICS:"Metrics",TRACES:"Traces"},DESTINATION_NAME:"Destination Name",CREATE_DESTINATION:"Create Destination",UPDATE_DESTINATION:"Update Destination",QUICK_HELP:"Quick Help",ERROR:"Something went wrong"},r={INPUT:"input",DROPDOWN:"dropdown",MULTI_INPUT:"multiInput",KEY_VALUE_PAIR:"keyValuePairs",TEXTAREA:"textarea"},i={ODIGOS:"Odigos",MENU:{OVERVIEW:"Overview",SOURCES:"Sources",DESTINATIONS:"Destinations",ACTIONS:"Actions",INSTRUMENTATION_RULES:"Instrumentation Rules"},SEARCH_SOURCE:"Search Source",ADD_NEW_SOURCE:"Add New Source",ADD_NEW_DESTINATION:"Add New Destination",ADD_NEW_ACTION:"Add New Action",EMPTY_DESTINATION:"No destinations found",EMPTY_ACTION:"No actions found",EMPTY_SOURCE:"No sources found in this namespace",DESTINATION_UPDATE_SUCCESS:"Destination updated successfully",DESTINATION_CREATED_SUCCESS:"Destination created successfully",DESTINATION_DELETED_SUCCESS:"Destination deleted successfully",SOURCE_UPDATE_SUCCESS:"Source updated successfully",SOURCE_CREATED_SUCCESS:"Source created successfully",SOURCE_DELETED_SUCCESS:"Source deleted successfully",ACTION_UPDATE_SUCCESS:"Action updated successfully",ACTION_UPDATE_ERROR:"Failed to update action",MANAGE:"Manage",DELETE:"Delete",DELETE_DESTINATION:"Delete Destination",DELETE_SOURCE:"Delete Source",DELETE_ACTION:"Delete Action",SOURCE_DANGER_ZONE_TITLE:"Delete this source",ACTION_DANGER_ZONE_TITLE:"Delete this action",SOURCE_DANGER_ZONE_SUBTITLE:"Uninstrument this source, and delete all odigos associated data. You can always re-instrument this source later with odigos.",ACTION_DANGER_ZONE_SUBTITLE:"This action cannot be undone. This will permanently delete the action and all associated data.",DELETE_MODAL_TITLE:"Delete this destination",DELETE_MODAL_SUBTITLE:"This action cannot be undone. This will permanently delete the destination and all associated data.",DELETE_BUTTON:"I want to delete this destination",CONFIRM_SOURCE_DELETE:"I want to delete this source",CONFIRM_DELETE_ACTION:"I want to delete this action",CONNECT:"Connect",REPORTED_NAME:"Override service.name",CREATE_ACTION:"Create Action",EDIT_ACTION:"Edit Action",ACTION_DESCRIPTION:"Actions are a way to modify the OpenTelemetry data recorded by Odigos Sources, before it is exported to your Odigos Destinations.",CREATE_INSTRUMENTATION_RULE:"Create Instrumentation Rule",EDIT_INSTRUMENTATION_RULE:"Edit Instrumentation Rule",INSTRUMENTATION_RULE_DESCRIPTION:"Instrumentation Rules control how telemetry is recorded from your application."},a={SAVE:"Save",CONTACT_US:"Contact Us",LEARN_MORE:"Learn more",LINK_TO_DOCS:"Link to docs",DISABLE:"Disable",RUNNING:"Running",APPLIED:"Applied",ENABLE:"Enable",DELETE_ALL:"Delete All"},c={MONITORS_TITLE:"Monitors",ACTION_NAME:"Action Name",ACTION_NOTE:"Note",NOTE_PLACEHOLDER:"Add a note to describe the use case of this action",CREATE_ACTION:"Create Action",UPDATE_ACTION:"Update Action",AddClusterInfo:{TITLE:"Add Cluster Info",DESCRIPTION:"The “Add Cluster Info” Odigos Action can be used to add resource attributes to telemetry signals originated from the k8s cluster where the Odigos is running."},DeleteAttribute:{TITLE:"Delete Attribute",DESCRIPTION:"The “Delete Attribute” Odigos Action can be used to delete attributes from telemetry signals originated from the k8s cluster where the Odigos is running."},RenameAttribute:{TITLE:"Rename Attribute",DESCRIPTION:"The “Rename Attribute” Odigos Action can be used to rename attributes from telemetry signals originated from the k8s cluster where the Odigos is running."},ErrorSampler:{TITLE:"Error Sampler",DESCRIPTION:"The “Error Sampler” Odigos Action is a Global Action that supports error sampling by filtering out non-error traces."},ProbabilisticSampler:{TITLE:"Probabilistic Sampler",DESCRIPTION:"The “Probabilistic Sampler” Odigos Action supports probabilistic sampling based on a configured sampling percentage applied to the TraceID."},LatencySampler:{TITLE:"Latency Sampler",DESCRIPTION:"The “Latency Sampler” Odigos Action is an Endpoint Action that samples traces based on their duration for a specific service and endpoint (HTTP route) filter."},PiiMasking:{TITLE:"PII Masking",DESCRIPTION:"The “PII Masking” Odigos Action is an Endpoint Action that masks PII (Personally Identifiable Information) attributes from telemetry signals."},SEARCH_ACTION:"Search Action"},s={"payload-collection":{TITLE:"Payload Collection",DESCRIPTION:"Collect span attributes containing payload data to traces."}},u={LOGS:"Logs",METRICS:"Metrics",TRACES:"Traces"}},7673:function(t,n,e){e.d(n,{KY:function(){return c},VR:function(){return u},VZ:function(){return a},bl:function(){return r},rV:function(){return s},vb:function(){return i}});var o="/api",r={EVENTS:"".concat(o,"/events"),CONFIG:"".concat(o,"/config"),NAMESPACES:"".concat(o,"/namespaces"),APPLICATIONS:"".concat(o,"/applications"),DESTINATION_TYPE:"".concat(o,"/destination-types"),DESTINATIONS:"".concat(o,"/destinations"),CHECK_CONNECTION:"".concat(o,"/destinations/testConnection"),SOURCES:"".concat(o,"/sources"),SET_ACTION:function(t){return"".concat(o,"/actions/types/").concat(t)},PUT_ACTION:function(t,n){return"".concat(o,"/actions/types/").concat(t,"/").concat(n)},ACTIONS:"".concat(o,"/actions"),DELETE_ACTION:function(t,n){return"".concat(o,"/actions/types/").concat(t,"/").concat(n)},OVERVIEW_METRICS:"".concat(o,"/metrics/overview"),INSTRUMENTATION_RULES:"".concat(o,"/instrumentation-rules"),INSTRUMENTATION_RULE:function(t){return"".concat(o,"/instrumentation-rules/").concat(t)},DESCRIBE_ODIGOS:"".concat(o,"/describe/odigos"),DESCRIBE_SOURCE:function(t,n,e){return"".concat(o,"/describe/source/namespace/").concat(t,"/kind/").concat(n,"/name/").concat(e)}},i={API_CONFIG:"apiConfig",API_NAMESPACES:"apiNamespaces",API_APPLICATIONS:"apiApplications",API_DESTINATIONS:"apiDestinations",API_SOURCES:"apiSources",API_DESTINATION_TYPE:"apiDestinationType",API_DESTINATION_TYPES:"apiDestinationTypes",API_ACTIONS:"apiActions"},a="https://odigos.slack.com/join/shared_invite/zt-1d7egaz29-Rwv2T8kyzc3mWP8qKobz~A#/shared-invite/email",c="https://docs.odigos.io/pipeline/actions/introduction",s="https://docs.odigos.io/pipeline/actions",u="https://docs.odigos.io/pipeline/rules/overview"},9064:function(t,n,e){e.d(n,{D6:function(){return safeJsonParse},RB:function(){return stringifyNonStringValues},Sy:function(){return timeAgo},fm:function(){return capitalizeFirstLetter},gs:function(){return cleanObjectEmptyStringsValues},p6:function(){return formatDate}});var o=e(8660);function capitalizeFirstLetter(t){return t.charAt(0).toUpperCase()+t.slice(1)}function safeJsonParse(t,n){if(!t)return n;try{return JSON.parse(t)}catch(t){return console.error("Error parsing JSON string:",t),n}}function cleanObjectEmptyStringsValues(t){var cleanArray=function(t){return t.filter(function(t){return"object"==typeof t&&null!==t?""!==t.key&&""!==t.value:""!==t})},cleanObject=function cleanObject(t){return Object.fromEntries(Object.entries(t).filter(function(t){var n=(0,o.Z)(t,2),e=n[0],r=n[1];return""!==e&&""!==r}).map(function(t){var n=(0,o.Z)(t,2),e=n[0],r=n[1];return Array.isArray(r)?[e,cleanArray(r)]:"object"==typeof r&&null!==r?[e,cleanObject(r)]:[e,r]}))};return Object.entries(t).reduce(function(t,n){var e=(0,o.Z)(n,2),r=e[0],i=e[1];try{var a=JSON.parse(i);Array.isArray(a)?t[r]=JSON.stringify(cleanArray(a)):"object"==typeof a&&null!==a?t[r]=JSON.stringify(cleanObject(a)):t[r]=i}catch(n){"object"==typeof i&&null!==i?Array.isArray(i)?t[r]=JSON.stringify(cleanArray(i)):t[r]=JSON.stringify(cleanObject(i)):t[r]=i}return t},{})}function stringifyNonStringValues(t){return Object.entries(t).reduce(function(t,n){var e=(0,o.Z)(n,2),r=e[0],i=e[1];return"string"==typeof i?t[r]=i:t[r]=JSON.stringify(i),t},{})}var timeAgo=function(t){var n=new Date,e=new Date(t);if(isNaN(e.getTime()))return"";var o=Math.floor((n.getTime()-e.getTime())/6e4),r=Math.floor(o/60);return o<60?0===o?"Just now":1===o?"1 minute ago":"".concat(o," minutes ago"):r<24?"".concat(r," hours ago"):"".concat(Math.floor(r/24)," days ago")};function formatDate(t){var n=new Date(t),e=n.getUTCFullYear(),o=n.getUTCMonth(),r=n.getUTCDate(),i=n.getUTCHours(),a=n.getUTCMinutes(),c=n.getUTCSeconds();return"".concat(["January","February","March","April","May","June","July","August","September","October","November","December"][o]," ").concat(r,", ").concat(e," ").concat(i.toString().padStart(2,"0"),":").concat(a.toString().padStart(2,"0"),":").concat(c.toString().padStart(2,"0"))}},1032:function(t,n,e){e.d(n,{om:function(){return o.om},aO:function(){return o.aO},KY:function(){return o.KY},rV:function(){return o.rV},bl:function(){return o.bl},Of:function(){return o.Of},VR:function(){return o.VR},Fp:function(){return o.Fp},Fs:function(){return o.Fs},NK:function(){return o.NK},mD:function(){return o.mD},vb:function(){return o.vb},Z6:function(){return o.Z6},ye:function(){return o.ye},gs:function(){return r.gs},p6:function(){return r.p6},LV:function(){return o.LV},RB:function(){return r.RB},Sy:function(){return r.Sy}});var o=e(3915),r=e(9064)}}]); \ No newline at end of file diff --git a/frontend/webapp/dep-out/_next/static/chunks/320-c874b9c4e3b5f6cc.js b/frontend/webapp/dep-out/_next/static/chunks/320-c874b9c4e3b5f6cc.js deleted file mode 100644 index cfb830adba..0000000000 --- a/frontend/webapp/dep-out/_next/static/chunks/320-c874b9c4e3b5f6cc.js +++ /dev/null @@ -1,17 +0,0 @@ -(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[320],{6012:function(t,n,i){"use strict";var o=i(6314);Object.defineProperty(n,"__esModule",{value:!0}),n.default=void 0;var c=o(i(4634)),u=o(i(2265)),h=o(i(2101)),f=o(i(8041)),d=u.default.createElement,useErrors=function(t){var n=u.default.useState(null),i=(0,c.default)(n,2),o=i[0],h=i[1];return{cleanErrors:function(){return h(null)},errorRanges:o,markError:function(n){h({position:n.position,message:n.message,snippet:n.snippet}),t(!0)},hasErrors:!!o,error:o}},defaultMerge=function(t){var n=t.text,i=t.currentText;return i?{text:i}:{text:n}},getMergedValue=function(t){var n=t.merge,i=t.json,o=t.text,c=t.currentText;if(!o&&!c&&!i)return"";if(!o&&!i)return c;var u=n({json:i,text:o,currentText:c});if(void 0!==u.text&&"string"==typeof u.text)return u.text;if(u.json)return h.default.dump(u.json);throw Error('merge function should return object with "text" or "json" fields')},m=u.default.forwardRef(function(t,n){var i=t.json,o=t.text,c=t.theme,m=t.onError,g=void 0===m?function(){}:m,v=t.onChange,y=void 0===v?function(){}:v,w=t.onSelect,b=void 0===w?function(){}:w,S=t.onSetCursor,x=void 0===S?function(){}:S,C=t.merge,_=void 0===C?defaultMerge:C,E=u.default.useRef(null),T=useErrors(g),P=i?h.default.dump(i):o,L=u.default.useRef(P),replaceValue=function(t){if(t.json||t.text){var n=t.json?h.default.dump(t.json):t.text;E.current.actionNewDoc({text:n})}},I=u.default.useMemo(function(){return getMergedValue({merge:_,json:i,text:o,currentText:L.current})},[i,o,_]);return u.default.useEffect(function(){I!==L.current&&replaceValue({text:I})},[I]),n&&(n.current={replaceValue:replaceValue}),d(f.default,{value:I,onChange:function(t){try{L.current=t;var n,i=h.default.load(t);T.hasErrors&&(T.cleanErrors(),g(null)),y({json:i,text:t})}catch(t){if(g(t),!(null!==(n=t.mark)&&void 0!==n&&n.snippet)){console.error(t);return}console.error(t.mark.snippet),T.markError({position:t.mark.position,message:t.message,snippet:t.mark.snippet})}},onSelect:function(t){b(t)},onSetCursor:function(t){x(t)},error:T.error,getErrorPos:function(t){try{return h.default.load(t),{}}catch(t){var n;if(!(null!==(n=t.mark)&&void 0!==n&&n.snippet))return{};return{position:t.mark.position}}},options:{handleTabs:!0,theme:c},ref:E})});n.default=m},8041:function(t,n,i){"use strict";var o=i(6314);Object.defineProperty(n,"__esModule",{value:!0}),n.default=void 0;var c=o(i(2265)),u=i(3777),h=i(3955),f=i(1272),d=i(1135),m=i(8892),g=i(4350),v=i(8326),y=i(2452),w=i(2822),b=i(4311),S=c.default.createElement;function _arrayLikeToArray(t,n){(null==n||n>t.length)&&(n=t.length);for(var i=0,o=Array(n);i=t.length?{done:!0}:{done:!1,value:t[o++]}},e:function(t){throw t},f:F}}throw TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}var c,u=!0,h=!1;return{s:function(){i=i.call(t)},n:function(){var t=i.next();return u=t.done,t},e:function(t){h=!0,c=t},f:function(){try{u||null==i.return||i.return()}finally{if(h)throw c}}}}(n.effects);try{for(c.s();!(i=c.n()).done;){var u=i.value;u.is(x)&&(o=o.update({add:u.value,sort:!0})),u.is(C)&&(o=o.update({filter:u.value}))}}catch(t){c.e(t)}finally{c.f()}return o},provide:function(t){return f.EditorView.decorations.from(t)}}),T=d.Decoration.mark({attributes:{style:"background-color: rgba(255, 0, 0, 0.5)"}}),P=c.default.forwardRef(function(t,n){var i=t.value,o=void 0===i?"":i,P=t.onChange,L=void 0===P?function(){return null}:P,I=t.onSelect,O=void 0===I?function(){return null}:I,N=t.onSetCursor,B=void 0===N?function(){return null}:N,z=t.error,V=t.options,H=(V=void 0===V?{}:V).theme,U=void 0===H?void 0:H,$=V.handleTabs,q=void 0!==$&&$,G=t.getErrorPos,Z=c.default.useRef(null),Y=c.default.useRef(null),X=c.default.useRef(o),J=c.default.useRef(""),en=c.default.useRef(""),actionReplace=function(t){var n=t.text,i=t.from,o=t.to||i+n.length;Y.current.dispatch({changes:{from:i,to:o,insert:n}})};n.current={actionReplace:actionReplace,actionNewDoc:function(t){var n=t.text,i=Y.current.state.doc.toString(),o=Y.current.state.selection.ranges[0].from,c=i.length;Y.current.dispatch({changes:{from:0,to:c,insert:n},selection:g.EditorSelection.cursor(o)})}};var handleErrors=function(){if(Y.current.dispatch({effects:C.of(function(){return!1})}),null!=z&&z.position){var t=Y.current.state.doc.length,n=(null==z?void 0:z.position)+1<=t-1?z.position:t-1,i=n+1;Y.current.dispatch({effects:x.of([T.range(n,i)])})}},handleChange=function(t){var n,i,o=t.state.doc.toString(),c=(null===(n=t.state)||void 0===n?void 0:null===(i=n.selection)||void 0===i?void 0:i.ranges[0])||{},u=c.from,h=c.to,f=o.slice(u,h),d=u===h?(0,b.getCurrentWord)(o,u):{};f!==J.current&&(J.current=f,O({selected:f,from:u,to:h})),d.word!==en.current&&(en.current=d.word,B(d)),o!==X.current&&(X.current=o,handleErrors(),L(o))},er=(0,v.hoverTooltip)(function(t,n,i){var o;return(null===(o=t.state.field(E))||void 0===o?void 0:o.size)?{pos:n,above:!0,create:function(t){var n=document.createElement("div");return n.style="width: 100px; height: 100px",n.textContent="error",{dom:n}}}:null}),initEditor=function(){var t=[_,f.basicSetup,u.StreamLanguage.define(h.yaml),f.EditorView.updateListener.of(handleChange),q&&d.keymap.of([m.indentWithTab]),E,er,(0,w.errorStripe)(G),(0,y.zebraStripes)(),U].filter(Boolean),n=f.EditorState.create({doc:o,extensions:t});Y.current=new f.EditorView({state:n,parent:null==Z?void 0:Z.current}),window.view=Y.current,window.actionReplace=actionReplace};return c.default.useEffect(function(){if(!Z.current)throw Error("Can't find a mounting point for YamlEditor");return initEditor(),function(){Y.current.destroy()}},[U]),c.default.useEffect(handleErrors),S("div",{ref:Z})});n.default=P},2822:function(t,n,i){"use strict";var o=i(6314);Object.defineProperty(n,"__esModule",{value:!0}),n.errorStripe=function(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:function(){return{}};return[m,f.ViewPlugin.fromClass(function(){function _class2(t){(0,c.default)(this,_class2),(0,h.default)(this,"decorations",f.DecorationSet),this.decorations=stripeDeco(t,0)}return(0,u.default)(_class2,[{key:"update",value:function(n){if(n.docChanged||n.viewportChanged){var i=t(n.state.doc.toString()).position;if(!i){this.decorations=stripeDeco(n.view,0);return}this.decorations=stripeDeco(n.view,i)}}}]),_class2}(),{decorations:function(t){return t.decorations}})]};var c=o(i(6358)),u=o(i(1127)),h=o(i(8104)),f=i(1135),d=i(7495),m=f.EditorView.baseTheme({".cm-errorStripe":{backgroundColor:"#ff390040 !important"}}),g=f.Decoration.line({attributes:{class:"cm-errorStripe"}});function stripeDeco(t,n){var i=t.state.doc.lineAt(n),o=new d.RangeSetBuilder;return n&&o.add(i.from,i.from,g),o.finish()}},2452:function(t,n,i){"use strict";var o=i(6314);Object.defineProperty(n,"__esModule",{value:!0}),n.zebraStripes=function(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};return window.stepSize=v,[g,v.of((null==t?void 0:t.step)||2),w]};var c=o(i(6358)),u=o(i(1127)),h=o(i(8104)),f=i(1135),d=i(4350),m=i(7495);function _arrayLikeToArray(t,n){(null==n||n>t.length)&&(n=t.length);for(var i=0,o=Array(n);i=t.length?{done:!0}:{done:!1,value:t[o++]}},e:function(t){throw t},f:F}}throw TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}var c,u=!0,h=!1;return{s:function(){i=i.call(t)},n:function(){var t=i.next();return u=t.done,t},e:function(t){h=!0,c=t},f:function(){try{u||null==i.return||i.return()}finally{if(h)throw c}}}}(t.visibleRanges);try{for(c.s();!(n=c.n()).done;)for(var u=n.value,h=u.from,f=u.to,d=h;d<=f;){var g=t.state.doc.lineAt(d);g.number%i==0&&o.add(g.from,g.from,y),d=g.to+1}}catch(t){c.e(t)}finally{c.f()}return o.finish()}var w=f.ViewPlugin.fromClass(function(){function _class2(t){(0,c.default)(this,_class2),(0,h.default)(this,"decorations",f.DecorationSet),this.decorations=stripeDeco(t)}return(0,u.default)(_class2,[{key:"update",value:function(t){(t.docChanged||t.viewportChanged)&&(this.decorations=stripeDeco(t.view))}}]),_class2}(),{decorations:function(t){return t.decorations}})},5424:function(t,n,i){"use strict";i(6314)(i(6012))},4311:function(t,n){"use strict";Object.defineProperty(n,"__esModule",{value:!0}),n.getCurrentWord=void 0,n.getCurrentWord=function(t,n){var i=t.slice(0,n).split(/\s|\n/),o=t.slice(n).split(/\s|\n/),c=i[i.length-1],u=o[0],h=n-c.length,f=n+u.length;return{word:"".concat(c).concat(u),from:h,to:f}}},1369:function(t,n,i){"use strict";i.d(n,{qH:function(){return ek},LC:function(){return Me},f6:function(){return Xe},ZP:function(){return ex},F4:function(){return ct},zo:function(){return ex}});var __assign=function(){return(__assign=Object.assign||function(t){for(var n,i=1,o=arguments.length;i?@[\\\]^`{|}~-]+/g,E=/(^-|-$)/g;function A(t){return t.replace(_,"-").replace(E,"")}var T=/(a)(d)/gi,D=function(t){return String.fromCharCode(t+(t>25?39:97))};function R(t){var n,i="";for(n=Math.abs(t);n>52;n=n/52|0)i=D(n%52)+i;return(D(n%52)+i).replace(T,"$1-$2")}var P,k=function(t,n){for(var i=n.length;i;)t=33*t^n.charCodeAt(--i);return t},j=function(t){return k(5381,t)};function M(t){return"string"==typeof t}var L="function"==typeof Symbol&&Symbol.for,I=L?Symbol.for("react.memo"):60115,O=L?Symbol.for("react.forward_ref"):60112,N={childContextTypes:!0,contextType:!0,contextTypes:!0,defaultProps:!0,displayName:!0,getDefaultProps:!0,getDerivedStateFromError:!0,getDerivedStateFromProps:!0,mixins:!0,propTypes:!0,type:!0},B={name:!0,length:!0,prototype:!0,caller:!0,callee:!0,arguments:!0,arity:!0},z={$$typeof:!0,compare:!0,defaultProps:!0,displayName:!0,propTypes:!0,type:!0},V=((P={})[O]={$$typeof:!0,render:!0,defaultProps:!0,displayName:!0,propTypes:!0},P[I]=z,P);function W(t){return("type"in t&&t.type.$$typeof)===I?z:"$$typeof"in t?V[t.$$typeof]:N}var H=Object.defineProperty,U=Object.getOwnPropertyNames,$=Object.getOwnPropertySymbols,q=Object.getOwnPropertyDescriptor,G=Object.getPrototypeOf,Z=Object.prototype;function Q(t){return"function"==typeof t}function ee(t){return"object"==typeof t&&"styledComponentId"in t}function te(t,n){return t&&n?"".concat(t," ").concat(n):t||n||""}function ne(t,n){if(0===t.length)return"";for(var i=t[0],o=1;o0?" Args: ".concat(n.join(", ")):""))}var Y=function(){function e(t){this.groupSizes=new Uint32Array(512),this.length=512,this.tag=t}return e.prototype.indexOfGroup=function(t){for(var n=0,i=0;i=this.groupSizes.length){for(var i=this.groupSizes,o=i.length,c=o;t>=c;)if((c<<=1)<0)throw ce(16,"".concat(t));this.groupSizes=new Uint32Array(c),this.groupSizes.set(i),this.length=c;for(var u=o;u=this.length||0===this.groupSizes[t])return n;for(var i=this.groupSizes[t],o=this.indexOfGroup(t),c=o+i,u=o;u=0){var i=document.createTextNode(n);return this.element.insertBefore(i,this.nodes[t]||null),this.length++,!0}return!1},e.prototype.deleteRule=function(t){this.element.removeChild(this.nodes[t]),this.length--},e.prototype.getRule=function(t){return t0&&(d+="".concat(t,","))}),o+="".concat(h).concat(f,'{content:"').concat(d,'"}').concat("/*!sc*/\n")}}})(c);return o}(o)})}return e.registerId=function(t){return he(t)},e.prototype.reconstructWithOptions=function(t,n){return void 0===n&&(n=!0),new e(__assign(__assign({},this.options),t),this.gs,n&&this.names||void 0)},e.prototype.allocateGSInstance=function(t){return this.gs[t]=(this.gs[t]||0)+1},e.prototype.getTag=function(){var t,n,i,o;return this.tag||(this.tag=(i=(n=this.options).useCSSOMInjection,o=n.target,t=n.isServer?new ea(o):i?new eo(o):new es(o),new Y(t)))},e.prototype.hasNameForId=function(t,n){return this.names.has(t)&&this.names.get(t).has(n)},e.prototype.registerName=function(t,n){if(he(t),this.names.has(t))this.names.get(t).add(n);else{var i=new Set;i.add(n),this.names.set(t,i)}},e.prototype.insertRules=function(t,n,i){this.registerName(t,n),this.getTag().insertRules(he(t),i)},e.prototype.clearNames=function(t){this.names.has(t)&&this.names.get(t).clear()},e.prototype.clearRules=function(t){this.getTag().clearGroup(he(t)),this.clearNames(t)},e.prototype.clearTag=function(){this.tag=void 0},e}(),eh=/&/g,ef=/^\s*\/\/.*$/gm;function De(t){var n,i,o,c=void 0===t?x:t,u=c.options,g=void 0===u?x:u,v=c.plugins,y=void 0===v?S:v,l=function(t,o,c){return c===i||c.startsWith(i)&&c.endsWith(i)&&c.replaceAll(i,"").length>0?".".concat(n):t},w=y.slice();w.push(function(t){t.type===h.Fr&&t.value.includes("&")&&(t.props[0]=t.props[0].replace(eh,i).replace(o,l))}),g.prefix&&w.push(f.Ji),w.push(d.P);var p=function(t,c,u,h){void 0===c&&(c=""),void 0===u&&(u=""),void 0===h&&(h="&"),n=h,i=c,o=RegExp("\\".concat(i,"\\b"),"g");var v=t.replace(ef,""),y=m.MY(u||c?"".concat(u," ").concat(c," { ").concat(v," }"):v);g.namespace&&(y=function Oe(t,n){return t.map(function(t){return"rule"===t.type&&(t.value="".concat(n," ").concat(t.value),t.value=t.value.replaceAll(",",",".concat(n," ")),t.props=t.props.map(function(t){return"".concat(n," ").concat(t)})),Array.isArray(t.children)&&"@keyframes"!==t.type&&(t.children=Oe(t.children,n)),t})}(y,g.namespace));var b=[];return d.q(y,f.qR(w.concat(f.cD(function(t){return b.push(t)})))),b};return p.hash=y.length?y.reduce(function(t,n){return n.name||ce(15),k(t,n.name)},5381).toString():"",p}var ed=new eu,ep=De(),em=o.createContext({shouldForwardProp:void 0,styleSheet:ed,stylis:ep}),eg=(em.Consumer,o.createContext(void 0));function Ve(){return(0,o.useContext)(em)}function Me(t){var n=(0,o.useState)(t.stylisPlugins),i=n[0],c=n[1],h=Ve().styleSheet,f=(0,o.useMemo)(function(){var n=h;return t.sheet?n=t.sheet:t.target&&(n=n.reconstructWithOptions({target:t.target},!1)),t.disableCSSOMInjection&&(n=n.reconstructWithOptions({useCSSOMInjection:!1})),n},[t.disableCSSOMInjection,t.sheet,t.target,h]),d=(0,o.useMemo)(function(){return De({options:{namespace:t.namespace,prefix:t.enableVendorPrefixes},plugins:i})},[t.enableVendorPrefixes,t.namespace,i]);return(0,o.useEffect)(function(){u()(i,t.stylisPlugins)||c(t.stylisPlugins)},[t.stylisPlugins]),o.createElement(em.Provider,{value:{shouldForwardProp:t.shouldForwardProp,styleSheet:f,stylis:d}},o.createElement(eg.Provider,{value:d},t.children))}var ev=function(){function e(t,n){var i=this;this.inject=function(t,n){void 0===n&&(n=ep);var o=i.name+n.hash;t.hasNameForId(i.id,o)||t.insertRules(i.id,o,n(i.rules,o,"@keyframes"))},this.name=t,this.id="sc-keyframes-".concat(t),this.rules=n,se(this,function(){throw ce(12,String(i.name))})}return e.prototype.getName=function(t){return void 0===t&&(t=ep),this.name+t.hash},e}();function ze(t){for(var n="",i=0;i="A"&&o<="Z"?n+="-"+o.toLowerCase():n+=o}return n.startsWith("ms-")?"-"+n:n}var Be=function(t){return null==t||!1===t||""===t},Le=function(t){var n=[];for(var i in t){var o=t[i];t.hasOwnProperty(i)&&!Be(o)&&(Array.isArray(o)&&o.isCss||Q(o)?n.push("".concat(ze(i),":"),o,";"):oe(o)?n.push.apply(n,__spreadArray(__spreadArray(["".concat(i," {")],Le(o),!1),["}"],!1)):n.push("".concat(ze(i),": ").concat(null==o||"boolean"==typeof o||""===o?"":"number"!=typeof o||0===o||i in g.Z||i.startsWith("--")?String(o).trim():"".concat(o,"px"),";")))}return n};function Ge(t,n,i,o){return Be(t)?[]:ee(t)?[".".concat(t.styledComponentId)]:Q(t)?!Q(t)||t.prototype&&t.prototype.isReactComponent||!n?[t]:Ge(t(n),n,i,o):t instanceof ev?i?(t.inject(i,o),[t.getName(o)]):[t]:oe(t)?Le(t):Array.isArray(t)?Array.prototype.concat.apply(S,t.map(function(t){return Ge(t,n,i,o)})):[t.toString()]}function Ye(t){for(var n=0;n>>0);if(!n.hasNameForId(this.componentId,u)){var h=i(c,".".concat(u),void 0,this.componentId);n.insertRules(this.componentId,u,h)}o=te(o,u),this.staticRulesId=u}}else{for(var f=k(this.baseHash,i.hash),d="",m=0;m>>0);n.hasNameForId(this.componentId,y)||n.insertRules(this.componentId,y,i(d,".".concat(y),void 0,this.componentId)),o=te(o,y)}}return o},e}(),eb=o.createContext(void 0);function Xe(t){var n=o.useContext(eb),i=(0,o.useMemo)(function(){return function(t,n){if(!t)throw ce(14);if(Q(t))return t(n);if(Array.isArray(t)||"object"!=typeof t)throw ce(8);return n?__assign(__assign({},n),t):t}(t.theme,n)},[t.theme,n]);return t.children?o.createElement(eb.Provider,{value:i},t.children):null}eb.Consumer;var eS={};function Qe(t,n,i){var c,u,h,f,d=ee(t),m=!M(t),g=n.attrs,v=void 0===g?S:g,y=n.componentId,w=void 0===y?(c=n.displayName,u=n.parentComponentId,eS[h="string"!=typeof c?"sc":A(c)]=(eS[h]||0)+1,f="".concat(h,"-").concat(R(j("6.0.7"+h+eS[h])>>>0)),u?"".concat(u,"-").concat(f):f):y,b=(void 0===n.displayName&&(M(t)||t.displayName||t.name),n.displayName&&n.componentId?"".concat(A(n.displayName),"-").concat(n.componentId):n.componentId||w),_=d&&t.attrs?t.attrs.concat(v).filter(Boolean):v,E=n.shouldForwardProp;if(d&&t.shouldForwardProp){var T=t.shouldForwardProp;if(n.shouldForwardProp){var P=n.shouldForwardProp;E=function(t,n){return T(t,n)&&P(t,n)}}else E=T}var L=new ew(i,b,d?t.componentStyle:void 0),I=o.forwardRef(function(t,n){return function(t,n,i){var c,u,h=t.attrs,f=t.componentStyle,d=t.defaultProps,m=t.foldedComponentIds,g=t.styledComponentId,v=t.target,y=o.useContext(eb),w=Ve(),b=t.shouldForwardProp||w.shouldForwardProp,S=function(t,n,i){for(var o,c=__assign(__assign({},n),{className:void 0,theme:i}),u=0;u>>0);return new ev(c,o)}C.forEach(function(t){ex[t]=rt(t)}),function(){function e(t,n){this.rules=t,this.componentId=n,this.isStatic=Ye(t),eu.registerId(this.componentId+1)}e.prototype.createStyles=function(t,n,i,o){var c=o(ne(Ge(this.rules,n,i,o)),""),u=this.componentId+t;i.insertRules(u,u,c)},e.prototype.removeStyles=function(t,n){n.clearRules(this.componentId+t)},e.prototype.renderStyles=function(t,n,i,o){t>2&&eu.registerId(this.componentId+t),this.removeStyles(t,i),this.createStyles(t,n,i,o)}}();var ek=function(){function e(){var t=this;this._emitSheetCSS=function(){var n=t.instance.toString(),o=i.nc,c=ne([o&&'nonce="'.concat(o,'"'),"".concat(y,'="true"'),"".concat("data-styled-version",'="').concat("6.0.7",'"')].filter(Boolean)," ");return"")},this.getStyleTags=function(){if(t.sealed)throw ce(2);return t._emitSheetCSS()},this.getStyleElement=function(){if(t.sealed)throw ce(2);var n,c=((n={})[y]="",n["data-styled-version"]="6.0.7",n.dangerouslySetInnerHTML={__html:t.instance.toString()},n),u=i.nc;return u&&(c.nonce=u),[o.createElement("style",__assign({},c,{key:"sc-0-0"}))]},this.seal=function(){t.sealed=!0},this.instance=new eu({isServer:!0}),this.sealed=!1}return e.prototype.collectStyles=function(t){if(this.sealed)throw ce(2);return o.createElement(Me,{sheet:this.instance},t)},e.prototype.interleaveWithNodeStream=function(t){throw ce(3)},e}()},9673:function(t,n,i){"use strict";i.d(n,{A:function(){return y}});var o,c,u=i(7437),h=i(2265),f=i(7026),d=i(4867),m=i(5945);function LinePattern({color:t,dimensions:n,lineWidth:i}){return(0,u.jsx)("path",{stroke:t,strokeWidth:i,d:`M${n[0]/2} 0 V${n[1]} M0 ${n[1]/2} H${n[0]}`})}function DotPattern({color:t,radius:n}){return(0,u.jsx)("circle",{cx:n,cy:n,r:n,fill:t})}(o=c||(c={})).Lines="lines",o.Dots="dots",o.Cross="cross";let g={[c.Dots]:"#91919a",[c.Lines]:"#eee",[c.Cross]:"#e2e2e2"},v={[c.Dots]:1,[c.Lines]:1,[c.Cross]:6},selector=t=>({transform:t.transform,patternId:`pattern-${t.rfId}`});function Background({id:t,variant:n=c.Dots,gap:i=20,size:o,lineWidth:y=1,offset:w=2,color:b,style:S,className:x}){let C=(0,h.useRef)(null),{transform:_,patternId:E}=(0,d.oR)(selector,m.X),T=b||g[n],P=o||v[n],L=n===c.Dots,I=n===c.Cross,O=Array.isArray(i)?i:[i,i],N=[O[0]*_[2]||1,O[1]*_[2]||1],B=P*_[2],z=I?[B,B]:N,V=L?[B/w,B/w]:[z[0]/w,z[1]/w];return(0,u.jsxs)("svg",{className:(0,f.Z)(["react-flow__background",x]),style:{...S,position:"absolute",width:"100%",height:"100%",top:0,left:0},ref:C,"data-testid":"rf__background",children:[(0,u.jsx)("pattern",{id:E+t,x:_[0]%N[0],y:_[1]%N[1],width:N[0],height:N[1],patternUnits:"userSpaceOnUse",patternTransform:`translate(-${V[0]},-${V[1]})`,children:L?(0,u.jsx)(DotPattern,{color:T,radius:B/w}):(0,u.jsx)(LinePattern,{dimensions:z,color:T,lineWidth:y})}),(0,u.jsx)("rect",{x:"0",y:"0",width:"100%",height:"100%",fill:`url(#${E+t})`})]})}Background.displayName="Background";var y=(0,h.memo)(Background)},8967:function(t,n,i){"use strict";i.d(n,{Z:function(){return d}});var o=i(7437),c=i(2265),u=i(7026),h=i(5945),f=i(4867);function PlusIcon(){return(0,o.jsx)("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 32 32",children:(0,o.jsx)("path",{d:"M32 18.133H18.133V32h-4.266V18.133H0v-4.266h13.867V0h4.266v13.867H32z"})})}function MinusIcon(){return(0,o.jsx)("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 32 5",children:(0,o.jsx)("path",{d:"M0 0h32v4.2H0z"})})}function FitViewIcon(){return(0,o.jsx)("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 32 30",children:(0,o.jsx)("path",{d:"M3.692 4.63c0-.53.4-.938.939-.938h5.215V0H4.708C2.13 0 0 2.054 0 4.63v5.216h3.692V4.631zM27.354 0h-5.2v3.692h5.17c.53 0 .984.4.984.939v5.215H32V4.631A4.624 4.624 0 0027.354 0zm.954 24.83c0 .532-.4.94-.939.94h-5.215v3.768h5.215c2.577 0 4.631-2.13 4.631-4.707v-5.139h-3.692v5.139zm-23.677.94c-.531 0-.939-.4-.939-.94v-5.138H0v5.139c0 2.577 2.13 4.707 4.708 4.707h5.138V25.77H4.631z"})})}function LockIcon(){return(0,o.jsx)("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 25 32",children:(0,o.jsx)("path",{d:"M21.333 10.667H19.81V7.619C19.81 3.429 16.38 0 12.19 0 8 0 4.571 3.429 4.571 7.619v3.048H3.048A3.056 3.056 0 000 13.714v15.238A3.056 3.056 0 003.048 32h18.285a3.056 3.056 0 003.048-3.048V13.714a3.056 3.056 0 00-3.048-3.047zM12.19 24.533a3.056 3.056 0 01-3.047-3.047 3.056 3.056 0 013.047-3.048 3.056 3.056 0 013.048 3.048 3.056 3.056 0 01-3.048 3.047zm4.724-13.866H7.467V7.619c0-2.59 2.133-4.724 4.723-4.724 2.591 0 4.724 2.133 4.724 4.724v3.048z"})})}function UnlockIcon(){return(0,o.jsx)("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 25 32",children:(0,o.jsx)("path",{d:"M21.333 10.667H19.81V7.619C19.81 3.429 16.38 0 12.19 0c-4.114 1.828-1.37 2.133.305 2.438 1.676.305 4.42 2.59 4.42 5.181v3.048H3.047A3.056 3.056 0 000 13.714v15.238A3.056 3.056 0 003.048 32h18.285a3.056 3.056 0 003.048-3.048V13.714a3.056 3.056 0 00-3.048-3.047zM12.19 24.533a3.056 3.056 0 01-3.047-3.047 3.056 3.056 0 013.047-3.048 3.056 3.056 0 013.048 3.048 3.056 3.056 0 01-3.048 3.047z"})})}let ControlButton=({children:t,className:n,...i})=>(0,o.jsx)("button",{type:"button",className:(0,u.Z)(["react-flow__controls-button",n]),...i,children:t});ControlButton.displayName="ControlButton";let selector=t=>({isInteractive:t.nodesDraggable||t.nodesConnectable||t.elementsSelectable,minZoomReached:t.transform[2]<=t.minZoom,maxZoomReached:t.transform[2]>=t.maxZoom}),Controls=({style:t,showZoom:n=!0,showFitView:i=!0,showInteractive:d=!0,fitViewOptions:m,onZoomIn:g,onZoomOut:v,onFitView:y,onInteractiveChange:w,className:b,children:S,position:x="bottom-left"})=>{let C=(0,f.AC)(),[_,E]=(0,c.useState)(!1),{isInteractive:T,minZoomReached:P,maxZoomReached:L}=(0,f.oR)(selector,h.X),{zoomIn:I,zoomOut:O,fitView:N}=(0,f._K)();return((0,c.useEffect)(()=>{E(!0)},[]),_)?(0,o.jsxs)(f.s_,{className:(0,u.Z)(["react-flow__controls",b]),position:x,style:t,"data-testid":"rf__controls",children:[n&&(0,o.jsxs)(o.Fragment,{children:[(0,o.jsx)(ControlButton,{onClick:()=>{I(),g?.()},className:"react-flow__controls-zoomin",title:"zoom in","aria-label":"zoom in",disabled:L,children:(0,o.jsx)(PlusIcon,{})}),(0,o.jsx)(ControlButton,{onClick:()=>{O(),v?.()},className:"react-flow__controls-zoomout",title:"zoom out","aria-label":"zoom out",disabled:P,children:(0,o.jsx)(MinusIcon,{})})]}),i&&(0,o.jsx)(ControlButton,{className:"react-flow__controls-fitview",onClick:()=>{N(m),y?.()},title:"fit view","aria-label":"fit view",children:(0,o.jsx)(FitViewIcon,{})}),d&&(0,o.jsx)(ControlButton,{className:"react-flow__controls-interactive",onClick:()=>{C.setState({nodesDraggable:!T,nodesConnectable:!T,elementsSelectable:!T}),w?.(!T)},title:"toggle interactivity","aria-label":"toggle interactivity",children:T?(0,o.jsx)(UnlockIcon,{}):(0,o.jsx)(LockIcon,{})}),S]}):null};Controls.displayName="Controls";var d=(0,c.memo)(Controls)},2101:function(t,n,i){"use strict";var o=i(584),c=i(1213);function renamed(t,n){return function(){throw Error("Function yaml."+t+" is removed in js-yaml 4. Use yaml."+n+" instead, which is now safe by default.")}}t.exports.Type=i(1816),t.exports.Schema=i(3021),t.exports.FAILSAFE_SCHEMA=i(3611),t.exports.JSON_SCHEMA=i(2560),t.exports.CORE_SCHEMA=i(2775),t.exports.DEFAULT_SCHEMA=i(4226),t.exports.load=o.load,t.exports.loadAll=o.loadAll,t.exports.dump=c.dump,t.exports.YAMLException=i(7132),t.exports.types={binary:i(9171),float:i(2762),map:i(248),null:i(2741),pairs:i(4318),set:i(1550),timestamp:i(1324),bool:i(833),int:i(9512),merge:i(4648),omap:i(7583),seq:i(6723),str:i(8878)},t.exports.safeLoad=renamed("safeLoad","load"),t.exports.safeLoadAll=renamed("safeLoadAll","loadAll"),t.exports.safeDump=renamed("safeDump","dump")},6381:function(t){"use strict";function isNothing(t){return null==t}t.exports.isNothing=isNothing,t.exports.isObject=function(t){return"object"==typeof t&&null!==t},t.exports.toArray=function(t){return Array.isArray(t)?t:isNothing(t)?[]:[t]},t.exports.repeat=function(t,n){var i,o="";for(i=0;i=55296&&o<=56319&&n+1=56320&&i<=57343?(o-55296)*1024+i-56320+65536:o}function needIndentIndicator(t){return/^\n* /.test(t)}function blockHeader(t,n){var i=needIndentIndicator(t)?String(n):"",o="\n"===t[t.length-1];return i+(o&&("\n"===t[t.length-2]||"\n"===t)?"+":o?"":"-")+"\n"}function dropEndingNewline(t){return"\n"===t[t.length-1]?t.slice(0,-1):t}function foldLine(t,n){if(""===t||" "===t[0])return t;for(var i,o,c=/ [^ ]/g,u=0,h=0,f=0,d="";i=c.exec(t);)(f=i.index)-u>n&&(o=h>u?h:f,d+="\n"+t.slice(u,o),u=o+1),h=f;return d+="\n",t.length-u>n&&h>u?d+=t.slice(u,h)+"\n"+t.slice(h+1):d+=t.slice(u),d.slice(1)}function writeBlockSequence(t,n,i,o){var c,u,h,f="",d=t.tag;for(c=0,u=i.length;c tag resolver accepts not "'+v+'" style');t.dump=o}return!0}return!1}function writeNode(t,n,i,u,f,v,y){t.tag=null,t.dump=i,detectType(t,i,!1)||detectType(t,i,!0);var w,b=h.call(t.dump),S=u;u&&(u=t.flowLevel<0||t.flowLevel>n);var x,C,_,E="[object Object]"===b||"[object Array]"===b;if(E&&(_=-1!==(C=t.duplicates.indexOf(i))),(null!==t.tag&&"?"!==t.tag||_||2!==t.indent&&n>0)&&(f=!1),_&&t.usedDuplicates[C])t.dump="*ref_"+C;else{if(E&&_&&!t.usedDuplicates[C]&&(t.usedDuplicates[C]=!0),"[object Object]"===b)u&&0!==Object.keys(t.dump).length?(!function(t,n,i,o){var u,h,f,d,m,g,v="",y=t.tag,w=Object.keys(i);if(!0===t.sortKeys)w.sort();else if("function"==typeof t.sortKeys)w.sort(t.sortKeys);else if(t.sortKeys)throw new c("sortKeys must be a boolean or a function");for(u=0,h=w.length;u1024)&&(t.dump&&10===t.dump.charCodeAt(0)?g+="?":g+="? "),g+=t.dump,m&&(g+=generateNextLine(t,n)),writeNode(t,n+1,d,!0,m)&&(t.dump&&10===t.dump.charCodeAt(0)?g+=":":g+=": ",g+=t.dump,v+=g));t.tag=y,t.dump=v||"{}"}(t,n,t.dump,f),_&&(t.dump="&ref_"+C+t.dump)):(!function(t,n,i){var o,c,u,h,f,d="",m=t.tag,g=Object.keys(i);for(o=0,c=g.length;o1024&&(f+="? "),f+=t.dump+(t.condenseFlow?'"':"")+":"+(t.condenseFlow?"":" "),writeNode(t,n,h,!1,!1)&&(f+=t.dump,d+=f));t.tag=m,t.dump="{"+d+"}"}(t,n,t.dump),_&&(t.dump="&ref_"+C+" "+t.dump));else if("[object Array]"===b)u&&0!==t.dump.length?(t.noArrayIndent&&!y&&n>0?writeBlockSequence(t,n-1,t.dump,f):writeBlockSequence(t,n,t.dump,f),_&&(t.dump="&ref_"+C+t.dump)):(!function(t,n,i){var o,c,u,h="",f=t.tag;for(o=0,c=i.length;o=65536?g+=2:g++){if(!isPrintable(v=codePointAt(t,g)))return 5;C=C&&isPlainSafe(v,y,f),y=v}else{for(g=0;g=65536?g+=2:g++){if(10===(v=codePointAt(t,g)))w=!0,S&&(b=b||g-x-1>o&&" "!==t[x+1],x=g);else if(!isPrintable(v))return 5;C=C&&isPlainSafe(v,y,f),y=v}b=b||S&&g-x-1>o&&" "!==t[x+1]}return w||b?i>9&&needIndentIndicator(t)?5:h?2===u?5:2:b?4:3:!C||h||c(t)?2===u?5:2:1}(w,v||t.flowLevel>-1&&n>=t.flowLevel,t.indent,u,function(n){return function(t,n){var i,o;for(i=0,o=t.implicitTypes.length;i"+blockHeader(w,t.indent)+dropEndingNewline(indentString(function(t,n){for(var i,o,c,u=/(\n+)([^\n]*)/g,h=(i=-1!==(i=t.indexOf("\n"))?i:t.length,u.lastIndex=i,foldLine(t.slice(0,i),n)),f="\n"===t[0]||" "===t[0];c=u.exec(t);){var d=c[1],m=c[2];o=" "===m[0],h+=d+(f||o||""===m?"":"\n")+foldLine(m,n),f=o}return h}(w,u),i));case 5:return'"'+function(t){for(var n,i="",u=0,h=0;h=65536?h+=2:h++)!(n=d[u=codePointAt(t,h)])&&isPrintable(u)?(i+=t[h],u>=65536&&(i+=t[h+1])):i+=n||function(t){var n,i,u;if(n=t.toString(16).toUpperCase(),t<=255)i="x",u=2;else if(t<=65535)i="u",u=4;else if(t<=4294967295)i="U",u=8;else throw new c("code point within a string may not be greater than 0xFFFFFFFF");return"\\"+i+o.repeat("0",u-n.length)+n}(u);return i}(w,u)+'"';default:throw new c("impossible error: invalid scalar style")}}());else{if("[object Undefined]"===b||t.skipInvalid)return!1;throw new c("unacceptable kind of an object to dump "+b)}null!==t.tag&&"?"!==t.tag&&(x=encodeURI("!"===t.tag[0]?t.tag.slice(1):t.tag).replace(/!/g,"%21"),x="!"===t.tag[0]?"!"+x:"tag:yaml.org,2002:"===x.slice(0,18)?"!!"+x.slice(18):"!<"+x+">",t.dump=x+" "+t.dump)}return!0}t.exports.dump=function(t,n){n=n||{};var i=new State(n);i.noRefs||function(t,n){var i,o,c=[],u=[];for(function inspectNode(t,n,i){var o,c,u;if(null!==t&&"object"==typeof t){if(-1!==(c=n.indexOf(t)))-1===i.indexOf(c)&&i.push(c);else if(n.push(t),Array.isArray(t))for(c=0,u=t.length;c1&&(t.result+=o.repeat("\n",n-1))}function readBlockSequence(t,n){var i,o,c=t.tag,u=t.anchor,h=[],f=!1;if(-1!==t.firstTabInLine)return!1;for(null!==t.anchor&&(t.anchorMap[t.anchor]=h),o=t.input.charCodeAt(t.position);0!==o&&(-1!==t.firstTabInLine&&(t.position=t.firstTabInLine,throwError(t,"tab characters must not be used in indentation")),45===o&&is_WS_OR_EOL(t.input.charCodeAt(t.position+1)));){if(f=!0,t.position++,skipSeparationSpace(t,!0,-1)&&t.lineIndent<=n){h.push(null),o=t.input.charCodeAt(t.position);continue}if(i=t.line,composeNode(t,n,3,!1,!0),h.push(t.result),skipSeparationSpace(t,!0,-1),o=t.input.charCodeAt(t.position),(t.line===i||t.lineIndent>n)&&0!==o)throwError(t,"bad indentation of a sequence entry");else if(t.lineIndentn?P=1:t.lineIndent===n?P=0:t.lineIndentn?P=1:t.lineIndent===n?P=0:t.lineIndentn)&&(C&&(h=t.line,f=t.lineStart,d=t.position),composeNode(t,n,4,!0,c)&&(C?S=t.result:x=t.result),C||(storeMappingPair(t,y,w,b,S,x,h,f,d),b=S=x=null),skipSeparationSpace(t,!0,-1),m=t.input.charCodeAt(t.position)),(t.line===u||t.lineIndent>n)&&0!==m)throwError(t,"bad indentation of a mapping entry");else if(t.lineIndent=0)0===h?throwError(t,"bad explicit indentation width of a block scalar; it cannot be less than one"):g?throwError(t,"repeat of an indentation width identifier"):(v=n+h-1,g=!0);else break;if(is_WHITE_SPACE(f)){do f=t.input.charCodeAt(++t.position);while(is_WHITE_SPACE(f));if(35===f)do f=t.input.charCodeAt(++t.position);while(!is_EOL(f)&&0!==f)}for(;0!==f;){for(readLineBreak(t),t.lineIndent=0,f=t.input.charCodeAt(t.position);(!g||t.lineIndentv&&(v=t.lineIndent),is_EOL(f)){y++;continue}if(t.lineIndent0){for(c=h,u=0;c>0;c--)(h=function(t){var n;return 48<=t&&t<=57?t-48:97<=(n=32|t)&&n<=102?n-97+10:-1}(f=t.input.charCodeAt(++t.position)))>=0?u=(u<<4)+h:throwError(t,"expected hexadecimal character");t.result+=(m=u)<=65535?String.fromCharCode(m):String.fromCharCode((m-65536>>10)+55296,(m-65536&1023)+56320),t.position++}else throwError(t,"unknown escape sequence");i=o=t.position}else is_EOL(f)?(captureSegment(t,i,o,!0),writeFoldedLines(t,skipSeparationSpace(t,!1,n)),i=o=t.position):t.position===t.lineStart&&testDocumentSeparator(t)?throwError(t,"unexpected end of the document within a double quoted scalar"):(t.position++,o=t.position)}throwError(t,"unexpected end of the stream within a double quoted scalar")}(t,E)?I=!0:function(t){var n,i,o;if(42!==(o=t.input.charCodeAt(t.position)))return!1;for(o=t.input.charCodeAt(++t.position),n=t.position;0!==o&&!is_WS_OR_EOL(o)&&!is_FLOW_INDICATOR(o);)o=t.input.charCodeAt(++t.position);return t.position===n&&throwError(t,"name of an alias node must contain at least one character"),i=t.input.slice(n,t.position),f.call(t.anchorMap,i)||throwError(t,'unidentified alias "'+i+'"'),t.result=t.anchorMap[i],skipSeparationSpace(t,!0,-1),!0}(t)?(I=!0,(null!==t.tag||null!==t.anchor)&&throwError(t,"alias node should not have any properties")):function(t,n,i){var o,c,u,h,f,d,m,g,v=t.kind,y=t.result;if(is_WS_OR_EOL(g=t.input.charCodeAt(t.position))||is_FLOW_INDICATOR(g)||35===g||38===g||42===g||33===g||124===g||62===g||39===g||34===g||37===g||64===g||96===g||(63===g||45===g)&&(is_WS_OR_EOL(o=t.input.charCodeAt(t.position+1))||i&&is_FLOW_INDICATOR(o)))return!1;for(t.kind="scalar",t.result="",c=u=t.position,h=!1;0!==g;){if(58===g){if(is_WS_OR_EOL(o=t.input.charCodeAt(t.position+1))||i&&is_FLOW_INDICATOR(o))break}else if(35===g){if(is_WS_OR_EOL(t.input.charCodeAt(t.position-1)))break}else if(t.position===t.lineStart&&testDocumentSeparator(t)||i&&is_FLOW_INDICATOR(g))break;else if(is_EOL(g)){if(f=t.line,d=t.lineStart,m=t.lineIndent,skipSeparationSpace(t,!1,-1),t.lineIndent>=n){h=!0,g=t.input.charCodeAt(t.position);continue}t.position=u,t.line=f,t.lineStart=d,t.lineIndent=m;break}h&&(captureSegment(t,c,u,!1),writeFoldedLines(t,t.line-f),c=u=t.position,h=!1),is_WHITE_SPACE(g)||(u=t.position+1),g=t.input.charCodeAt(++t.position)}return captureSegment(t,c,u,!1),!!t.result||(t.kind=v,t.result=y,!1)}(t,E,1===i)&&(I=!0,null===t.tag&&(t.tag="?")),null!==t.anchor&&(t.anchorMap[t.anchor]=t.result)):0===P&&(I=m&&readBlockSequence(t,T))),null===t.tag)null!==t.anchor&&(t.anchorMap[t.anchor]=t.result);else if("?"===t.tag){for(null!==t.result&&"scalar"!==t.kind&&throwError(t,'unacceptable node kind for ! tag; it should be "scalar", not "'+t.kind+'"'),S=0,x=t.implicitTypes.length;S"),null!==t.result&&_.kind!==t.kind&&throwError(t,"unacceptable node kind for !<"+t.tag+'> tag; it should be "'+_.kind+'", not "'+t.kind+'"'),_.resolve(t.result,t.tag)?(t.result=_.construct(t.result,t.tag),null!==t.anchor&&(t.anchorMap[t.anchor]=t.result)):throwError(t,"cannot resolve a node with !<"+t.tag+"> explicit tag")}return null!==t.listener&&t.listener("close",t),null!==t.tag||null!==t.anchor||I}function loadDocuments(t,n){t=String(t),n=n||{},0!==t.length&&(10!==t.charCodeAt(t.length-1)&&13!==t.charCodeAt(t.length-1)&&(t+="\n"),65279===t.charCodeAt(0)&&(t=t.slice(1)));var i=new State(t,n),o=t.indexOf("\x00");for(-1!==o&&(i.position=o,throwError(i,"null byte is not allowed in input")),i.input+="\x00";32===i.input.charCodeAt(i.position);)i.lineIndent+=1,i.position+=1;for(;i.position0)&&37===c);){for(h=!0,c=t.input.charCodeAt(++t.position),n=t.position;0!==c&&!is_WS_OR_EOL(c);)c=t.input.charCodeAt(++t.position);for(i=t.input.slice(n,t.position),o=[],i.length<1&&throwError(t,"directive name must not be less than one character in length");0!==c;){for(;is_WHITE_SPACE(c);)c=t.input.charCodeAt(++t.position);if(35===c){do c=t.input.charCodeAt(++t.position);while(0!==c&&!is_EOL(c));break}if(is_EOL(c))break;for(n=t.position;0!==c&&!is_WS_OR_EOL(c);)c=t.input.charCodeAt(++t.position);o.push(t.input.slice(n,t.position))}0!==c&&readLineBreak(t),f.call(x,i)?x[i](t,i,o):throwWarning(t,'unknown document directive "'+i+'"')}if(skipSeparationSpace(t,!0,-1),0===t.lineIndent&&45===t.input.charCodeAt(t.position)&&45===t.input.charCodeAt(t.position+1)&&45===t.input.charCodeAt(t.position+2)?(t.position+=3,skipSeparationSpace(t,!0,-1)):h&&throwError(t,"directives end mark is expected"),composeNode(t,t.lineIndent-1,4,!1,!0),skipSeparationSpace(t,!0,-1),t.checkLineBreaks&&m.test(t.input.slice(u,t.position))&&throwWarning(t,"non-ASCII line breaks are interpreted as content"),t.documents.push(t.result),t.position===t.lineStart&&testDocumentSeparator(t)){46===t.input.charCodeAt(t.position)&&(t.position+=3,skipSeparationSpace(t,!0,-1));return}t.positionf&&(n=o-f+(u=" ... ").length),i-o>f&&(i=o+f-(h=" ...").length),{str:u+t.slice(n,i).replace(/\t/g,"→")+h,pos:o-n+u.length}}function padStart(t,n){return o.repeat(" ",n-t.length)+t}t.exports=function(t,n){if(n=Object.create(n||null),!t.buffer)return null;n.maxLength||(n.maxLength=79),"number"!=typeof n.indent&&(n.indent=1),"number"!=typeof n.linesBefore&&(n.linesBefore=3),"number"!=typeof n.linesAfter&&(n.linesAfter=2);for(var i=/\r?\n|\r|\0/g,c=[0],u=[],h=-1;f=i.exec(t.buffer);)u.push(f.index),c.push(f.index+f[0].length),t.position<=f.index&&h<0&&(h=c.length-2);h<0&&(h=c.length-1);var f,d,m,g="",v=Math.min(t.line+n.linesAfter,u.length).toString().length,y=n.maxLength-(n.indent+v+3);for(d=1;d<=n.linesBefore&&!(h-d<0);d++)m=getLine(t.buffer,c[h-d],u[h-d],t.position-(c[h]-c[h-d]),y),g=o.repeat(" ",n.indent)+padStart((t.line-d+1).toString(),v)+" | "+m.str+"\n"+g;for(m=getLine(t.buffer,c[h],u[h],t.position,y),g+=o.repeat(" ",n.indent)+padStart((t.line+1).toString(),v)+" | "+m.str+"\n"+o.repeat("-",n.indent+v+3+m.pos)+"^\n",d=1;d<=n.linesAfter&&!(h+d>=u.length);d++)m=getLine(t.buffer,c[h+d],u[h+d],t.position-(c[h]-c[h+d]),y),g+=o.repeat(" ",n.indent)+padStart((t.line+d+1).toString(),v)+" | "+m.str+"\n";return g.replace(/\n$/,"")}},1816:function(t,n,i){"use strict";var o=i(7132),c=["kind","multi","resolve","construct","instanceOf","predicate","represent","representName","defaultStyle","styleAliases"],u=["scalar","sequence","mapping"];t.exports=function(t,n){var i,h;if(Object.keys(n=n||{}).forEach(function(n){if(-1===c.indexOf(n))throw new o('Unknown option "'+n+'" is met in definition of "'+t+'" YAML type.')}),this.options=n,this.tag=t,this.kind=n.kind||null,this.resolve=n.resolve||function(){return!0},this.construct=n.construct||function(t){return t},this.instanceOf=n.instanceOf||null,this.predicate=n.predicate||null,this.represent=n.represent||null,this.representName=n.representName||null,this.defaultStyle=n.defaultStyle||null,this.multi=n.multi||!1,this.styleAliases=(i=n.styleAliases||null,h={},null!==i&&Object.keys(i).forEach(function(t){i[t].forEach(function(n){h[String(n)]=t})}),h),-1===u.indexOf(this.kind))throw new o('Unknown kind "'+this.kind+'" is specified for "'+t+'" YAML type.')}},9171:function(t,n,i){"use strict";var o=i(1816),c="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/=\n\r";t.exports=new o("tag:yaml.org,2002:binary",{kind:"scalar",resolve:function(t){if(null===t)return!1;var n,i,o=0,u=t.length;for(i=0;i64)){if(n<0)return!1;o+=6}return o%8==0},construct:function(t){var n,i,o=t.replace(/[\r\n=]/g,""),u=o.length,h=0,f=[];for(n=0;n>16&255),f.push(h>>8&255),f.push(255&h)),h=h<<6|c.indexOf(o.charAt(n));return 0==(i=u%4*6)?(f.push(h>>16&255),f.push(h>>8&255),f.push(255&h)):18===i?(f.push(h>>10&255),f.push(h>>2&255)):12===i&&f.push(h>>4&255),new Uint8Array(f)},predicate:function(t){return"[object Uint8Array]"===Object.prototype.toString.call(t)},represent:function(t){var n,i,o="",u=0,h=t.length;for(n=0;n>18&63]+c[u>>12&63]+c[u>>6&63]+c[63&u]),u=(u<<8)+t[n];return 0==(i=h%3)?o+=c[u>>18&63]+c[u>>12&63]+c[u>>6&63]+c[63&u]:2===i?o+=c[u>>10&63]+c[u>>4&63]+c[u<<2&63]+c[64]:1===i&&(o+=c[u>>2&63]+c[u<<4&63]+c[64]+c[64]),o}})},833:function(t,n,i){"use strict";var o=i(1816);t.exports=new o("tag:yaml.org,2002:bool",{kind:"scalar",resolve:function(t){if(null===t)return!1;var n=t.length;return 4===n&&("true"===t||"True"===t||"TRUE"===t)||5===n&&("false"===t||"False"===t||"FALSE"===t)},construct:function(t){return"true"===t||"True"===t||"TRUE"===t},predicate:function(t){return"[object Boolean]"===Object.prototype.toString.call(t)},represent:{lowercase:function(t){return t?"true":"false"},uppercase:function(t){return t?"TRUE":"FALSE"},camelcase:function(t){return t?"True":"False"}},defaultStyle:"lowercase"})},2762:function(t,n,i){"use strict";var o=i(6381),c=i(1816),u=RegExp("^(?:[-+]?(?:[0-9][0-9_]*)(?:\\.[0-9_]*)?(?:[eE][-+]?[0-9]+)?|\\.[0-9_]+(?:[eE][-+]?[0-9]+)?|[-+]?\\.(?:inf|Inf|INF)|\\.(?:nan|NaN|NAN))$"),h=/^[-+]?[0-9]+e/;t.exports=new c("tag:yaml.org,2002:float",{kind:"scalar",resolve:function(t){return!!(null!==t&&u.test(t)&&"_"!==t[t.length-1])},construct:function(t){var n,i;return(i="-"===(n=t.replace(/_/g,"").toLowerCase())[0]?-1:1,"+-".indexOf(n[0])>=0&&(n=n.slice(1)),".inf"===n)?1===i?Number.POSITIVE_INFINITY:Number.NEGATIVE_INFINITY:".nan"===n?NaN:i*parseFloat(n,10)},predicate:function(t){return"[object Number]"===Object.prototype.toString.call(t)&&(t%1!=0||o.isNegativeZero(t))},represent:function(t,n){var i;if(isNaN(t))switch(n){case"lowercase":return".nan";case"uppercase":return".NAN";case"camelcase":return".NaN"}else if(Number.POSITIVE_INFINITY===t)switch(n){case"lowercase":return".inf";case"uppercase":return".INF";case"camelcase":return".Inf"}else if(Number.NEGATIVE_INFINITY===t)switch(n){case"lowercase":return"-.inf";case"uppercase":return"-.INF";case"camelcase":return"-.Inf"}else if(o.isNegativeZero(t))return"-0.0";return i=t.toString(10),h.test(i)?i.replace("e",".e"):i},defaultStyle:"lowercase"})},9512:function(t,n,i){"use strict";var o=i(6381),c=i(1816);t.exports=new c("tag:yaml.org,2002:int",{kind:"scalar",resolve:function(t){if(null===t)return!1;var n,i,o,c,u=t.length,h=0,f=!1;if(!u)return!1;if(("-"===(c=t[h])||"+"===c)&&(c=t[++h]),"0"===c){if(h+1===u)return!0;if("b"===(c=t[++h])){for(h++;h=0?"0b"+t.toString(2):"-0b"+t.toString(2).slice(1)},octal:function(t){return t>=0?"0o"+t.toString(8):"-0o"+t.toString(8).slice(1)},decimal:function(t){return t.toString(10)},hexadecimal:function(t){return t>=0?"0x"+t.toString(16).toUpperCase():"-0x"+t.toString(16).toUpperCase().slice(1)}},defaultStyle:"decimal",styleAliases:{binary:[2,"bin"],octal:[8,"oct"],decimal:[10,"dec"],hexadecimal:[16,"hex"]}})},248:function(t,n,i){"use strict";var o=i(1816);t.exports=new o("tag:yaml.org,2002:map",{kind:"mapping",construct:function(t){return null!==t?t:{}}})},4648:function(t,n,i){"use strict";var o=i(1816);t.exports=new o("tag:yaml.org,2002:merge",{kind:"scalar",resolve:function(t){return"<<"===t||null===t}})},2741:function(t,n,i){"use strict";var o=i(1816);t.exports=new o("tag:yaml.org,2002:null",{kind:"scalar",resolve:function(t){if(null===t)return!0;var n=t.length;return 1===n&&"~"===t||4===n&&("null"===t||"Null"===t||"NULL"===t)},construct:function(){return null},predicate:function(t){return null===t},represent:{canonical:function(){return"~"},lowercase:function(){return"null"},uppercase:function(){return"NULL"},camelcase:function(){return"Null"},empty:function(){return""}},defaultStyle:"lowercase"})},7583:function(t,n,i){"use strict";var o=i(1816),c=Object.prototype.hasOwnProperty,u=Object.prototype.toString;t.exports=new o("tag:yaml.org,2002:omap",{kind:"sequence",resolve:function(t){if(null===t)return!0;var n,i,o,h,f,d=[];for(n=0,i=t.length;n18||18===c&&h>=3?{fetchPriority:t}:{fetchpriority:t}}var _=(0,m.forwardRef)(function(t,n){var i=t.src,o=t.srcSet,u=t.sizes,h=t.height,d=t.width,g=t.decoding,v=t.className,y=t.style,w=t.fetchPriority,b=t.placeholder,S=t.loading,x=t.unoptimized,C=t.fill,_=t.onLoadRef,E=t.onLoadingCompleteRef,T=t.setBlurComplete,P=t.setShowAltText,L=(t.onLoad,t.onError),I=c(t,f);return m.default.createElement("img",_objectSpread(_objectSpread(_objectSpread({},I),getDynamicProps(w)),{},{loading:S,width:d,height:h,decoding:g,"data-nimg":C?"fill":"1",className:v,style:y,sizes:u,srcSet:o,src:i,ref:(0,m.useCallback)(function(t){n&&("function"==typeof n?n(t):"object"==typeof n&&(n.current=t)),t&&(L&&(t.src=t.src),t.complete&&handleLoading(t,b,_,E,T,x))},[i,b,_,E,T,L,x,n]),onLoad:function(t){handleLoading(t.currentTarget,b,_,E,T,x)},onError:function(t){P(!0),"empty"!==b&&T(!0),L&&L(t)}}))});function ImagePreload(t){var n=t.isAppRouter,i=t.imgAttributes,o=_objectSpread({as:"image",imageSrcSet:i.srcSet,imageSizes:i.sizes,crossOrigin:i.crossOrigin,referrerPolicy:i.referrerPolicy},getDynamicProps(i.fetchPriority));return n&&g.default.preload?(g.default.preload(i.src,o),null):m.default.createElement(v.default,null,m.default.createElement("link",_objectSpread({key:"__nimg-"+i.src+i.srcSet+i.sizes,rel:"preload",href:i.srcSet?void 0:i.src},o)))}var E=(0,m.forwardRef)(function(t,n){var i=(0,m.useContext)(S.RouterContext),c=(0,m.useContext)(b.ImageConfigContext),h=(0,m.useMemo)(function(){var t=C||c||w.imageConfigDefault,n=[].concat(o(t.deviceSizes),o(t.imageSizes)).sort(function(t,n){return t-n}),i=t.deviceSizes.sort(function(t,n){return t-n});return _objectSpread(_objectSpread({},t),{},{allSizes:n,deviceSizes:i})},[c]),f=t.onLoad,d=t.onLoadingComplete,g=(0,m.useRef)(f);(0,m.useEffect)(function(){g.current=f},[f]);var v=(0,m.useRef)(d);(0,m.useEffect)(function(){v.current=d},[d]);var E=u((0,m.useState)(!1),2),T=E[0],P=E[1],L=u((0,m.useState)(!1),2),I=L[0],O=L[1],N=(0,y.getImgProps)(t,{defaultLoader:x.default,imgConf:h,blurComplete:T,showAltText:I}),B=N.props,z=N.meta;return m.default.createElement(m.default.Fragment,null,m.default.createElement(_,_objectSpread(_objectSpread({},B),{},{unoptimized:z.unoptimized,placeholder:z.placeholder,fill:z.fill,onLoadRef:g,onLoadingCompleteRef:v,setBlurComplete:P,setShowAltText:O,ref:n})),z.priority?m.default.createElement(ImagePreload,{isAppRouter:!i,imgAttributes:B}):null)});("function"==typeof n.default||"object"==typeof n.default&&null!==n.default)&&void 0===n.default.__esModule&&(Object.defineProperty(n.default,"__esModule",{value:!0}),Object.assign(n.default,n),t.exports=n.default)},9085:function(t,n,i){"use strict";Object.defineProperty(n,"__esModule",{value:!0}),Object.defineProperty(n,"AmpStateContext",{enumerable:!0,get:function(){return o}});var o=i(1024)._(i(2265)).default.createContext({})},9533:function(t,n){"use strict";function isInAmpMode(t){var n=void 0===t?{}:t,i=n.ampFirst,o=n.hybrid,c=n.hasQuery;return void 0!==i&&i||void 0!==o&&o&&void 0!==c&&c}Object.defineProperty(n,"__esModule",{value:!0}),Object.defineProperty(n,"isInAmpMode",{enumerable:!0,get:function(){return isInAmpMode}})},1304:function(t,n,i){"use strict";i(8270);var o=i(8762),c=i(1744),u=i(2688),h=["src","sizes","unoptimized","priority","loading","className","quality","width","height","fill","style","onLoad","onLoadingComplete","placeholder","blurDataURL","fetchPriority","layout","objectFit","objectPosition","lazyBoundary","lazyRoot"],f=["config"];function ownKeys(t,n){var i=Object.keys(t);if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(t);n&&(o=o.filter(function(n){return Object.getOwnPropertyDescriptor(t,n).enumerable})),i.push.apply(i,o)}return i}function _objectSpread(t){for(var n=1;n=o[0]*m}),kind:"w"}}return{widths:c,kind:"w"}}return"number"!=typeof n?{widths:o,kind:"w"}:{widths:u(new Set([n,2*n].map(function(t){return c.find(function(n){return n>=t})||c[c.length-1]}))),kind:"x"}}(n,c,f),g=m.widths,v=m.kind,y=g.length-1;return{sizes:f||"w"!==v?f:"100vw",srcSet:g.map(function(t,o){return d({config:n,src:i,quality:h,width:t})+" "+("w"===v?t:o+1)+v}).join(", "),src:d({config:n,src:i,quality:h,width:g[y]})}}({config:o,src:y,unoptimized:S,width:eh,quality:ev,sizes:w,loader:eo});return{props:_objectSpread(_objectSpread({},G),{},{loading:eg?"lazy":_,fetchPriority:H,width:eh,height:ef,decoding:"async",className:E,style:_objectSpread(_objectSpread({},ey),eb),sizes:eS.sizes,srcSet:eS.srcSet,src:eS.src}),meta:{unoptimized:S,priority:C,placeholder:z,fill:O}}}},4555:function(t,n,i){"use strict";var o=i(8762);function ownKeys(t,n){var i=Object.keys(t);if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(t);n&&(o=o.filter(function(n){return Object.getOwnPropertyDescriptor(t,n).enumerable})),i.push.apply(i,o)}return i}Object.defineProperty(n,"__esModule",{value:!0}),function(t,n){for(var i in n)Object.defineProperty(t,i,{enumerable:!0,get:n[i]})}(n,{defaultHead:function(){return _defaultHead},default:function(){return _default2}});var c=i(1024),u=i(8533)._(i(2265)),h=c._(i(5264)),f=i(9085),d=i(8160),m=i(9533);function _defaultHead(t){void 0===t&&(t=!1);var n=[u.default.createElement("meta",{charSet:"utf-8"})];return t||n.push(u.default.createElement("meta",{name:"viewport",content:"width=device-width"})),n}function onlyReactElement(t,n){return"string"==typeof n||"number"==typeof n?t:n.type===u.default.Fragment?t.concat(u.default.Children.toArray(n.props.children).reduce(function(t,n){return"string"==typeof n||"number"==typeof n?t:t.concat(n)},[])):t.concat(n)}i(2413);var g=["name","httpEquiv","charSet","itemProp"];function reduceComponents(t,n){var i,c,h,f,d=n.inAmpMode;return t.reduce(onlyReactElement,[]).reverse().concat(_defaultHead(d).reverse()).filter((i=new Set,c=new Set,h=new Set,f={},function(t){var n=!0,o=!1;if(t.key&&"number"!=typeof t.key&&t.key.indexOf("$")>0){o=!0;var u=t.key.slice(t.key.indexOf("$")+1);i.has(u)?n=!1:i.add(u)}switch(t.type){case"title":case"base":c.has(t.type)?n=!1:c.add(t.type);break;case"meta":for(var d=0,m=g.length;dt.length)&&(n=t.length);for(var i=0,o=Array(n);it.indexOf(n.name);)n=n.parent;return n?{from:n.from,to:this.pos,text:this.state.sliceDoc(n.from,this.pos),type:n.type}:null}matchBefore(t){let n=this.state.doc.lineAt(this.pos),i=Math.max(n.from,this.pos-250),o=n.text.slice(i-n.from,this.pos-n.from),c=o.search(ensureAnchor(t,!1));return c<0?null:{from:i+c,to:this.pos,text:o.slice(c)}}get aborted(){return null==this.abortListeners}addEventListener(t,n){"abort"==t&&this.abortListeners&&this.abortListeners.push(n)}};function toSet(t){let n=Object.keys(t).join(""),i=/\w/.test(n);return i&&(n=n.replace(/\w/g,"")),`[${i?"\\w":""}${n.replace(/[^\w\s]/g,"\\$&")}]`}function completeFromList(t){let n=t.map(t=>"string"==typeof t?{label:t}:t),[i,o]=n.every(t=>/^\w+$/.test(t.label))?[/\w*$/,/\w+$/]:function(t){let n=Object.create(null),i=Object.create(null);for(let{label:o}of t){n[o[0]]=!0;for(let t=1;t{let c=t.matchBefore(o);return c||t.explicit?{from:c?c.from:t.pos,options:n,span:i}:null}}let Option=class Option{constructor(t,n,i){this.completion=t,this.source=n,this.match=i}};function cur(t){return t.selection.main.head}function ensureAnchor(t,n){var i;let{source:o}=t,c=n&&"^"!=o[0],u="$"!=o[o.length-1];return c||u?RegExp(`${c?"^":""}(?:${o})${u?"$":""}`,null!==(i=t.flags)&&void 0!==i?i:t.ignoreCase?"i":""):t}let d=o.Annotation.define();function applyCompletion(t,n){let i=n.completion.apply||n.completion.label,o=n.source;"string"==typeof i?t.dispatch({changes:{from:o.from,to:o.to,insert:i},selection:{anchor:o.from+i.length},userEvent:"input.complete",annotations:d.of(n.completion)}):i(t,n.completion,o.from,o.to)}let m=new WeakMap;function asSource(t){if(!Array.isArray(t))return t;let n=m.get(t);return n||m.set(t,n=completeFromList(t)),n}let FuzzyMatcher=class FuzzyMatcher{constructor(t){this.pattern=t,this.chars=[],this.folded=[],this.any=[],this.precise=[],this.byWord=[];for(let n=0;n=48&&m<=57||m>=97&&m<=122?2:m>=65&&m<=90?1:0:(E=f.fromCodePoint(m))!=E.toLowerCase()?1:E!=E.toUpperCase()?2:0;(!o||1==T&&x||0==_&&0!=T)&&(n[v]==m||i[v]==m&&(y=!0)?u[v++]=o:u.length&&(C=!1)),_=T,o+=f.codePointSize(m)}return v==d&&0==u[0]&&C?this.result(-100+(y?-200:0),u,t):w==d&&0==b?[-200-t.length,0,S]:h>-1?[-700-t.length,h,h+this.pattern.length]:w==d?[-900-t.length,b,S]:v==d?this.result(-100+(y?-200:0)+-700+(C?0:-1100),u,t):2==n.length?null:this.result((o[0]?-700:0)+-200+-1100,o,t)}result(t,n,i){let o=[t-i.length],c=1;for(let t of n){let n=t+(this.astral?f.codePointSize(f.codePointAt(i,t)):1);c>1&&o[c-1]==t?o[c-1]=n:(o[c++]=t,o[c++]=n)}return o}};let g=o.Facet.define({combine:t=>o.combineConfig(t,{activateOnTyping:!0,override:null,maxRenderedOptions:100,defaultKeymap:!0,optionClass:()=>"",aboveCursor:!1,icons:!0,addToOptions:[]},{defaultKeymap:(t,n)=>t&&n,icons:(t,n)=>t&&n,optionClass:(t,n)=>i=>{var o,c;return o=t(i),c=n(i),o?c?o+" "+c:o:c},addToOptions:(t,n)=>t.concat(n)})});function rangeAroundSelected(t,n,i){if(t<=i)return{from:0,to:t};if(n<=t>>1){let t=Math.floor(n/i);return{from:t*i,to:(t+1)*i}}let o=Math.floor((t-n)/i);return{from:t-(o+1)*i,to:t-o*i}}let CompletionTooltip=class CompletionTooltip{constructor(t,n){let i;this.view=t,this.stateField=n,this.info=null,this.placeInfo={read:()=>this.measureInfo(),write:t=>this.positionInfo(t),key:this};let o=t.state.field(n),{options:c,selected:u}=o.open,h=t.state.facet(g);this.optionContent=(i=h.addToOptions.slice(),h.icons&&i.push({render(t){let n=document.createElement("div");return n.classList.add("cm-completionIcon"),t.type&&n.classList.add(...t.type.split(/\s+/g).map(t=>"cm-completionIcon-"+t)),n.setAttribute("aria-hidden","true"),n},position:20}),i.push({render(t,n,i){let o=document.createElement("span");o.className="cm-completionLabel";let{label:c}=t,u=0;for(let t=1;tu&&o.appendChild(document.createTextNode(c.slice(u,n)));let f=o.appendChild(document.createElement("span"));f.appendChild(document.createTextNode(c.slice(n,h))),f.className="cm-completionMatchedText",u=h}return ut.position-n.position).map(t=>t.render)),this.optionClass=h.optionClass,this.range=rangeAroundSelected(c.length,u,h.maxRenderedOptions),this.dom=document.createElement("div"),this.dom.className="cm-tooltip-autocomplete",this.dom.addEventListener("mousedown",n=>{for(let i=n.target,o;i&&i!=this.dom;i=i.parentNode)if("LI"==i.nodeName&&(o=/-(\d+)$/.exec(i.id))&&+o[1]{this.info&&this.view.requestMeasure(this.placeInfo)})}mount(){this.updateSel()}update(t){t.state.field(this.stateField)!=t.startState.field(this.stateField)&&this.updateSel()}positioned(){this.info&&this.view.requestMeasure(this.placeInfo)}updateSel(){let t=this.view.state.field(this.stateField),n=t.open;if((n.selected=this.range.to)&&(this.range=rangeAroundSelected(n.options.length,n.selected,this.view.state.facet(g).maxRenderedOptions),this.list.remove(),this.list=this.dom.appendChild(this.createListBox(n.options,t.id,this.range)),this.list.addEventListener("scroll",()=>{this.info&&this.view.requestMeasure(this.placeInfo)})),this.updateSelectedOption(n.selected)){this.info&&(this.info.remove(),this.info=null);let{completion:i}=n.options[n.selected],{info:o}=i;if(!o)return;let u="string"==typeof o?document.createTextNode(o):o(i);if(!u)return;"then"in u?u.then(n=>{n&&this.view.state.field(this.stateField,!1)==t&&this.addInfoPane(n)}).catch(t=>c.logException(this.view.state,t,"completion info")):this.addInfoPane(u)}}addInfoPane(t){let n=this.info=document.createElement("div");n.className="cm-tooltip cm-completionInfo",n.appendChild(t),this.dom.appendChild(n),this.view.requestMeasure(this.placeInfo)}updateSelectedOption(t){var n,i;let o,c,u=null;for(let n=this.list.firstChild,i=this.range.from;n;n=n.nextSibling,i++)i==t?n.hasAttribute("aria-selected")||(n.setAttribute("aria-selected","true"),u=n):n.hasAttribute("aria-selected")&&n.removeAttribute("aria-selected");return u&&(n=this.list,i=u,o=n.getBoundingClientRect(),(c=i.getBoundingClientRect()).topo.bottom&&(n.scrollTop+=c.bottom-o.bottom)),u}measureInfo(){let t=this.dom.querySelector("[aria-selected]");if(!t||!this.info)return null;let n=this.dom.getBoundingClientRect(),i=this.info.getBoundingClientRect(),o=t.getBoundingClientRect();if(o.top>Math.min(innerHeight,n.bottom)-10||o.bottom=this.options.length?this:new CompletionDialog(this.options,makeAttrs(n,t),this.tooltip,this.timestamp,t)}static build(t,n,i,o,c){let u=function(t,n){let i=[],o=0;for(let c of t)if(c.hasResult()){if(!1===c.result.filter)for(let t of c.result.options)i.push(new Option(t,c,[1e9-o++]));else{let t=new FuzzyMatcher(n.sliceDoc(c.from,c.to)),o;for(let n of c.result.options)(o=t.match(n.label))&&(null!=n.boost&&(o[0]+=n.boost),i.push(new Option(n,c,o)))}}let c=[],u=null;for(let t of i.sort(cmpOption)){if(300==c.length)break;u&&u.label==t.completion.label&&u.detail==t.completion.detail&&u.type==t.completion.type&&u.apply==t.completion.apply?score(t.completion)>score(u)&&(c[c.length-1]=t):c.push(t),u=t.completion}return c}(t,n);if(!u.length)return null;let h=0;if(o&&o.selected){let t=o.options[o.selected].completion;for(let n=0;nn.hasResult()?Math.min(t,n.from):t,1e8),create:t=>new CompletionTooltip(t,C),above:c.aboveCursor},o?o.timestamp:Date.now(),h)}map(t){return new CompletionDialog(this.options,this.attrs,Object.assign(Object.assign({},this.tooltip),{pos:t.mapPos(this.tooltip.pos)}),this.timestamp,this.selected)}};let CompletionState=class CompletionState{constructor(t,n,i){this.active=t,this.id=n,this.open=i}static start(){return new CompletionState(y,"cm-ac-"+Math.floor(2e6*Math.random()).toString(36),null)}update(t){let{state:n}=t,i=n.facet(g),o=(i.override||n.languageDataAt("autocomplete",cur(n)).map(asSource)).map(n=>(this.active.find(t=>t.source==n)||new ActiveSource(n,this.active.some(t=>0!=t.state)?1:0)).update(t,i));o.length==this.active.length&&o.every((t,n)=>t==this.active[n])&&(o=this.active);let c=t.selection||o.some(n=>n.hasResult()&&t.changes.touchesRange(n.from,n.to))||!function(t,n){if(t==n)return!0;for(let i=0,o=0;;){for(;i1!=t.state)&&o.some(t=>t.hasResult())&&(o=o.map(t=>t.hasResult()?new ActiveSource(t.source,0):t)),t.effects))n.is(x)&&(c=c&&c.setSelected(n.value,this.id));return o==this.active&&c==this.open?this:new CompletionState(o,this.id,c)}get tooltip(){return this.open?this.open.tooltip:null}get attrs(){return this.open?this.open.attrs:v}};let v={"aria-autocomplete":"list"};function makeAttrs(t,n){return{"aria-autocomplete":"list","aria-haspopup":"listbox","aria-activedescendant":t+"-"+n,"aria-controls":t}}let y=[];function cmpOption(t,n){return n.match[0]-t.match[0]||t.completion.label.localeCompare(n.completion.label)}function getUserEvent(t){return t.isUserEvent("input.type")?"input":t.isUserEvent("delete.backward")?"delete":null}let ActiveSource=class ActiveSource{constructor(t,n,i=-1){this.source=t,this.state=n,this.explicitPos=i}hasResult(){return!1}update(t,n){let i=getUserEvent(t),o=this;for(let c of(i?o=o.handleUserEvent(t,i,n):t.docChanged?o=o.handleChange(t):t.selection&&0!=o.state&&(o=new ActiveSource(o.source,0)),t.effects))if(c.is(w))o=new ActiveSource(o.source,1,c.value?cur(t.state):-1);else if(c.is(b))o=new ActiveSource(o.source,0);else if(c.is(S))for(let t of c.value)t.source==o.source&&(o=t);return o}handleUserEvent(t,n,i){return"delete"!=n&&i.activateOnTyping?new ActiveSource(this.source,1):this.map(t.changes)}handleChange(t){return t.changes.touchesRange(cur(t.startState))?new ActiveSource(this.source,0):this.map(t.changes)}map(t){return t.empty||this.explicitPos<0?this:new ActiveSource(this.source,this.state,t.mapPos(this.explicitPos))}};let ActiveResult=class ActiveResult extends ActiveSource{constructor(t,n,i,o,c,u){super(t,2,n),this.result=i,this.from=o,this.to=c,this.span=u}hasResult(){return!0}handleUserEvent(t,n,i){let o=t.changes.mapPos(this.from),c=t.changes.mapPos(this.to,1),u=cur(t.state);if((this.explicitPos<0?u<=o:uc||"delete"==n&&cur(t.startState)==this.from)return new ActiveSource(this.source,"input"==n&&i.activateOnTyping?1:0);let h=this.explicitPos<0?-1:t.changes.mapPos(this.explicitPos);return this.span&&(o==c||this.span.test(t.state.sliceDoc(o,c)))?new ActiveResult(this.source,h,this.result,o,c,this.span):new ActiveSource(this.source,1,h)}handleChange(t){return t.changes.touchesRange(this.from,this.to)?new ActiveSource(this.source,0):this.map(t.changes)}map(t){return t.empty?this:new ActiveResult(this.source,this.explicitPos<0?-1:t.mapPos(this.explicitPos),this.result,t.mapPos(this.from),t.mapPos(this.to,1),this.span)}};let w=o.StateEffect.define(),b=o.StateEffect.define(),S=o.StateEffect.define({map:(t,n)=>t.map(t=>t.map(n))}),x=o.StateEffect.define(),C=o.StateField.define({create:()=>CompletionState.start(),update:(t,n)=>t.update(n),provide:t=>[u.showTooltip.from(t,t=>t.tooltip),c.EditorView.contentAttributes.from(t,t=>t.attrs)]});function moveCompletionSelection(t,n="option"){return i=>{let o=i.state.field(C,!1);if(!o||!o.open||Date.now()-o.open.timestamp<75)return!1;let c=1,h;"page"==n&&(h=u.getTooltip(i,o.open.tooltip))&&(c=Math.max(2,Math.floor(h.dom.offsetHeight/h.dom.querySelector("li").offsetHeight)-1));let f=o.open.selected+c*(t?1:-1),{length:d}=o.open.options;return f<0?f="page"==n?0:d-1:f>=d&&(f="page"==n?d-1:0),i.dispatch({effects:x.of(f)}),!0}}let acceptCompletion=t=>{let n=t.state.field(C,!1);return!(t.state.readOnly||!n||!n.open||Date.now()-n.open.timestamp<75)&&(applyCompletion(t,n.open.options[n.open.selected]),!0)},startCompletion=t=>!!t.state.field(C,!1)&&(t.dispatch({effects:w.of(!0)}),!0),closeCompletion=t=>{let n=t.state.field(C,!1);return!!(n&&n.active.some(t=>0!=t.state))&&(t.dispatch({effects:b.of(null)}),!0)};let RunningQuery=class RunningQuery{constructor(t,n){this.active=t,this.context=n,this.time=Date.now(),this.updates=[],this.done=void 0}};let _=c.ViewPlugin.fromClass(class{constructor(t){for(let n of(this.view=t,this.debounceUpdate=-1,this.running=[],this.debounceAccept=-1,this.composing=0,t.state.field(C).active))1==n.state&&this.startQuery(n)}update(t){let n=t.state.field(C);if(!t.selectionSet&&!t.docChanged&&t.startState.field(C)==n)return;let i=t.transactions.some(t=>(t.selection||t.docChanged)&&!getUserEvent(t));for(let n=0;n50&&Date.now()-o.time>1e3){for(let t of o.context.abortListeners)try{t()}catch(t){c.logException(this.view.state,t)}o.context.abortListeners=null,this.running.splice(n--,1)}else o.updates.push(...t.transactions)}if(this.debounceUpdate>-1&&clearTimeout(this.debounceUpdate),this.debounceUpdate=n.active.some(t=>1==t.state&&!this.running.some(n=>n.active.source==t.source))?setTimeout(()=>this.startUpdate(),50):-1,0!=this.composing)for(let n of t.transactions)"input"==getUserEvent(n)?this.composing=2:2==this.composing&&n.selection&&(this.composing=3)}startUpdate(){this.debounceUpdate=-1;let{state:t}=this.view;for(let n of t.field(C).active)1!=n.state||this.running.some(t=>t.active.source==n.source)||this.startQuery(n)}startQuery(t){let{state:n}=this.view,i=cur(n),o=new CompletionContext(n,i,t.explicitPos==i),u=new RunningQuery(t,o);this.running.push(u),Promise.resolve(t.source(o)).then(t=>{u.context.aborted||(u.done=t||null,this.scheduleAccept())},t=>{this.view.dispatch({effects:b.of(null)}),c.logException(this.view.state,t)})}scheduleAccept(){this.running.every(t=>void 0!==t.done)?this.accept():this.debounceAccept<0&&(this.debounceAccept=setTimeout(()=>this.accept(),50))}accept(){var t;this.debounceAccept>-1&&clearTimeout(this.debounceAccept),this.debounceAccept=-1;let n=[],i=this.view.state.facet(g);for(let o=0;ot.source==c.active.source);if(u&&1==u.state){if(null==c.done){let t=new ActiveSource(c.active.source,0);for(let n of c.updates)t=t.update(n,i);1!=t.state&&n.push(t)}else this.startQuery(u)}}n.length&&this.view.dispatch({effects:S.of(n)})}},{eventHandlers:{compositionstart(){this.composing=1},compositionend(){3==this.composing&&setTimeout(()=>this.view.dispatch({effects:w.of(!1)}),20),this.composing=0}}}),E=c.EditorView.baseTheme({".cm-tooltip.cm-tooltip-autocomplete":{"& > ul":{fontFamily:"monospace",whiteSpace:"nowrap",overflow:"hidden auto",maxWidth_fallback:"700px",maxWidth:"min(700px, 95vw)",minWidth:"250px",maxHeight:"10em",listStyle:"none",margin:0,padding:0,"& > li":{overflowX:"hidden",textOverflow:"ellipsis",cursor:"pointer",padding:"1px 3px",lineHeight:1.2}}},"&light .cm-tooltip-autocomplete ul li[aria-selected]":{background:"#17c",color:"white"},"&dark .cm-tooltip-autocomplete ul li[aria-selected]":{background:"#347",color:"white"},".cm-completionListIncompleteTop:before, .cm-completionListIncompleteBottom:after":{content:'"\xb7\xb7\xb7"',opacity:.5,display:"block",textAlign:"center"},".cm-tooltip.cm-completionInfo":{position:"absolute",padding:"3px 9px",width:"max-content",maxWidth:"300px"},".cm-completionInfo.cm-completionInfo-left":{right:"100%"},".cm-completionInfo.cm-completionInfo-right":{left:"100%"},"&light .cm-snippetField":{backgroundColor:"#00000022"},"&dark .cm-snippetField":{backgroundColor:"#ffffff22"},".cm-snippetFieldPosition":{verticalAlign:"text-top",width:0,height:"1.15em",margin:"0 -0.7px -.7em",borderLeft:"1.4px dotted #888"},".cm-completionMatchedText":{textDecoration:"underline"},".cm-completionDetail":{marginLeft:"0.5em",fontStyle:"italic"},".cm-completionIcon":{fontSize:"90%",width:".8em",display:"inline-block",textAlign:"center",paddingRight:".6em",opacity:"0.6"},".cm-completionIcon-function, .cm-completionIcon-method":{"&:after":{content:"'ƒ'"}},".cm-completionIcon-class":{"&:after":{content:"'○'"}},".cm-completionIcon-interface":{"&:after":{content:"'◌'"}},".cm-completionIcon-variable":{"&:after":{content:"'\uD835\uDC65'"}},".cm-completionIcon-constant":{"&:after":{content:"'\uD835\uDC36'"}},".cm-completionIcon-type":{"&:after":{content:"'\uD835\uDC61'"}},".cm-completionIcon-enum":{"&:after":{content:"'∪'"}},".cm-completionIcon-property":{"&:after":{content:"'□'"}},".cm-completionIcon-keyword":{"&:after":{content:"'\uD83D\uDD11︎'"}},".cm-completionIcon-namespace":{"&:after":{content:"'▢'"}},".cm-completionIcon-text":{"&:after":{content:"'abc'",fontSize:"50%",verticalAlign:"middle"}}});let FieldPos=class FieldPos{constructor(t,n,i,o){this.field=t,this.line=n,this.from=i,this.to=o}};let FieldRange=class FieldRange{constructor(t,n,i){this.field=t,this.from=n,this.to=i}map(t){let n=t.mapPos(this.from,-1,o.MapMode.TrackDel),i=t.mapPos(this.to,1,o.MapMode.TrackDel);return null==n||null==i?null:new FieldRange(this.field,n,i)}};let Snippet=class Snippet{constructor(t,n){this.lines=t,this.fieldPositions=n}instantiate(t,n){let i=[],o=[n],c=t.doc.lineAt(n),u=/^\s*/.exec(c.text)[0];for(let c of this.lines){if(i.length){let i=u,f=/^\t*/.exec(c)[0].length;for(let n=0;nnew FieldRange(t.field,o[t.line]+t.from,o[t.line]+t.to))}}static parse(t){let n=[],i=[],o=[],c;for(let u of t.split(/\r\n?|\n/)){for(;c=/[#$]\{(?:(\d+)(?::([^}]*))?|([^}]*))\}/.exec(u);){let t=c[1]?+c[1]:null,h=c[2]||c[3]||"",f=-1;for(let i=0;i=f&&c.field++}o.push(new FieldPos(f,i.length,c.index,c.index+h.length)),u=u.slice(0,c.index)+h+u.slice(c.index+c[0].length)}i.push(u)}return new Snippet(i,o)}};let T=c.Decoration.widget({widget:new class extends c.WidgetType{toDOM(){let t=document.createElement("span");return t.className="cm-snippetFieldPosition",t}ignoreEvent(){return!1}}}),P=c.Decoration.mark({class:"cm-snippetField"});let ActiveSnippet=class ActiveSnippet{constructor(t,n){this.ranges=t,this.active=n,this.deco=c.Decoration.set(t.map(t=>(t.from==t.to?T:P).range(t.from,t.to)))}map(t){let n=[];for(let i of this.ranges){let o=i.map(t);if(!o)return null;n.push(o)}return new ActiveSnippet(n,this.active)}selectionInsideField(t){return t.ranges.every(t=>this.ranges.some(n=>n.field==this.active&&n.from<=t.from&&n.to>=t.to))}};let L=o.StateEffect.define({map:(t,n)=>t&&t.map(n)}),I=o.StateEffect.define(),O=o.StateField.define({create:()=>null,update(t,n){for(let i of n.effects){if(i.is(L))return i.value;if(i.is(I)&&t)return new ActiveSnippet(t.ranges,i.value)}return t&&n.docChanged&&(t=t.map(n.changes)),t&&n.selection&&!t.selectionInsideField(n.selection)&&(t=null),t},provide:t=>c.EditorView.decorations.from(t,t=>t?t.deco:c.Decoration.none)});function fieldSelection(t,n){return o.EditorSelection.create(t.filter(t=>t.field==n).map(t=>o.EditorSelection.range(t.from,t.to)))}function snippet(t){let n=Snippet.parse(t);return(t,i,c,u)=>{let{text:h,ranges:f}=n.instantiate(t.state,c),d={changes:{from:c,to:u,insert:o.Text.of(h)}};if(f.length&&(d.selection=fieldSelection(f,0)),f.length>1){let n=new ActiveSnippet(f,0),i=d.effects=[L.of(n)];void 0===t.state.field(O,!1)&&i.push(o.StateEffect.appendConfig.of([O,H,U,E]))}t.dispatch(t.state.update(d))}}function moveField(t){return({state:n,dispatch:i})=>{let o=n.field(O,!1);if(!o||t<0&&0==o.active)return!1;let c=o.active+t,u=t>0&&!o.ranges.some(n=>n.field==c+t);return i(n.update({selection:fieldSelection(o.ranges,c),effects:L.of(u?null:new ActiveSnippet(o.ranges,c))})),!0}}let clearSnippet=({state:t,dispatch:n})=>!!t.field(O,!1)&&(n(t.update({effects:L.of(null)})),!0),N=moveField(1),B=moveField(-1),z=[{key:"Tab",run:N,shift:B},{key:"Escape",run:clearSnippet}],V=o.Facet.define({combine:t=>t.length?t[0]:z}),H=o.Prec.highest(c.keymap.compute([V],t=>t.facet(V))),U=c.EditorView.domEventHandlers({mousedown(t,n){let i=n.state.field(O,!1),o;if(!i||null==(o=n.posAtCoords({x:t.clientX,y:t.clientY})))return!1;let c=i.ranges.find(t=>t.from<=o&&t.to>=o);return!!c&&c.field!=i.active&&(n.dispatch({selection:fieldSelection(i.ranges,c.field),effects:L.of(i.ranges.some(t=>t.field>c.field)?new ActiveSnippet(i.ranges,c.field):null)}),!0)}});function mapRE(t,n){return new RegExp(n(t.source),t.unicode?"u":"")}let $=Object.create(null);function storeWords(t,n,i,o,c){for(let u=t.iterLines(),h=0;!u.next().done;){let{value:t}=u,f;for(n.lastIndex=0;f=n.exec(t);)if(!o[f[0]]&&h+f.index!=c&&(i.push({type:"text",label:f[0]}),o[f[0]]=!0,i.length>=2e3))return;h+=t.length+1}}let q=[{key:"Ctrl-Space",run:startCompletion},{key:"Escape",run:closeCompletion},{key:"ArrowDown",run:moveCompletionSelection(!0)},{key:"ArrowUp",run:moveCompletionSelection(!1)},{key:"PageDown",run:moveCompletionSelection(!0,"page")},{key:"PageUp",run:moveCompletionSelection(!1,"page")},{key:"Enter",run:acceptCompletion}],G=o.Prec.highest(c.keymap.computeN([g],t=>t.facet(g).defaultKeymap?[q]:[])),Z=new WeakMap;n.CompletionContext=CompletionContext,n.acceptCompletion=acceptCompletion,n.autocompletion=function(t={}){return[C,g.of(t),_,G,E]},n.clearSnippet=clearSnippet,n.closeCompletion=closeCompletion,n.completeAnyWord=t=>{let n=t.state.languageDataAt("wordChars",t.pos).join(""),i=function(t){let n=t.replace(/[\\[.+*?(){|^$]/g,"\\$&");try{return RegExp(`[\\p{Alphabetic}\\p{Number}_${n}]+`,"ug")}catch(t){return RegExp(`[w${n}]`,"g")}}(n),o=t.matchBefore(mapRE(i,t=>t+"$"));if(!o&&!t.explicit)return null;let c=o?o.from:t.pos;return{from:c,options:function collectWords(t,n,i,o,c){let u=t.length>=1e3,h=u&&n.get(t);if(h)return h;let f=[],d=Object.create(null);if(t.children){let u=0;for(let h of t.children){if(h.length>=1e3)for(let t of collectWords(h,n,i,o-u,c-u))d[t.label]||(d[t.label]=!0,f.push(t));else storeWords(h,i,f,d,c-u);u+=h.length+1}}else storeWords(t,i,f,d,c);return u&&f.length<2e3&&n.set(t,f),f}(t.state.doc,$[n]||($[n]=new WeakMap),i,5e4,c),span:mapRE(i,t=>"^"+t)}},n.completeFromList=completeFromList,n.completionKeymap=q,n.completionStatus=function(t){let n=t.field(C,!1);return n&&n.active.some(t=>1==t.state)?"pending":n&&n.active.some(t=>0!=t.state)?"active":null},n.currentCompletions=function(t){var n;let i=null===(n=t.field(C,!1))||void 0===n?void 0:n.open;if(!i)return[];let o=Z.get(i.options);return o||Z.set(i.options,o=i.options.map(t=>t.completion)),o},n.ifIn=function(t,n){return i=>{for(let o=h.syntaxTree(i.state).resolveInner(i.pos,-1);o;o=o.parent)if(t.indexOf(o.name)>-1)return n(i);return null}},n.ifNotIn=function(t,n){return i=>{for(let n=h.syntaxTree(i.state).resolveInner(i.pos,-1);n;n=n.parent)if(t.indexOf(n.name)>-1)return null;return n(i)}},n.moveCompletionSelection=moveCompletionSelection,n.nextSnippetField=N,n.pickedCompletion=d,n.prevSnippetField=B,n.selectedCompletion=function(t){var n;let i=null===(n=t.field(C,!1))||void 0===n?void 0:n.open;return i?i.options[i.selected].completion:null},n.selectedCompletionIndex=function(t){var n;let i=null===(n=t.field(C,!1))||void 0===n?void 0:n.open;return i?i.selected:null},n.setSelectedCompletion=function(t){return x.of(t)},n.snippet=snippet,n.snippetCompletion=function(t,n){return Object.assign(Object.assign({},n),{apply:snippet(t)})},n.snippetKeymap=V,n.startCompletion=startCompletion},1272:function(t,n,i){"use strict";Object.defineProperty(n,"__esModule",{value:!0});var o=i(1135),c=i(4350),u=i(7260),h=i(6039),f=i(2382),d=i(356),m=i(8892),g=i(8162),v=i(8566),y=i(1411),w=i(1197),b=i(5387),S=i(5247),x=i(7038),C=i(1566);let _=[d.lineNumbers(),d.highlightActiveLineGutter(),o.highlightSpecialChars(),u.history(),h.foldGutter(),o.drawSelection(),o.dropCursor(),c.EditorState.allowMultipleSelections.of(!0),f.indentOnInput(),x.defaultHighlightStyle.fallback,g.bracketMatching(),v.closeBrackets(),w.autocompletion(),S.rectangularSelection(),S.crosshairCursor(),o.highlightActiveLine(),y.highlightSelectionMatches(),o.keymap.of([...v.closeBracketsKeymap,...m.defaultKeymap,...y.searchKeymap,...u.historyKeymap,...h.foldKeymap,...b.commentKeymap,...w.completionKeymap,...C.lintKeymap])];Object.defineProperty(n,"EditorView",{enumerable:!0,get:function(){return o.EditorView}}),Object.defineProperty(n,"EditorState",{enumerable:!0,get:function(){return c.EditorState}}),n.basicSetup=_},8566:function(t,n,i){"use strict";Object.defineProperty(n,"__esModule",{value:!0});var o=i(1135),c=i(4350),u=i(7495),h=i(5627),f=i(2382);let d={brackets:["(","[","{","'",'"'],before:")]}:;>"},m=c.StateEffect.define({map(t,n){let i=n.mapPos(t,-1,c.MapMode.TrackAfter);return null==i?void 0:i}}),g=c.StateEffect.define({map:(t,n)=>n.mapPos(t)}),v=new class extends u.RangeValue{};v.startSide=1,v.endSide=-1;let y=c.StateField.define({create:()=>u.RangeSet.empty,update(t,n){if(n.selection){let i=n.state.doc.lineAt(n.selection.main.head).from,o=n.startState.doc.lineAt(n.startState.selection.main.head).from;i!=n.changes.mapPos(o,-1)&&(t=u.RangeSet.empty)}for(let i of(t=t.map(n.changes),n.effects))i.is(m)?t=t.update({add:[v.range(i.value,i.value+1)]}):i.is(g)&&(t=t.update({filter:t=>t!=i.value}));return t}}),w="()[]{}<>";function closing(t){for(let n=0;n{if((b?t.composing:t.compositionStarted)||t.state.readOnly)return!1;let c=t.state.selection.main;if(o.length>2||2==o.length&&1==h.codePointSize(h.codePointAt(o,0))||n!=c.from||i!=c.to)return!1;let u=insertBracket(t.state,o);return!!u&&(t.dispatch(u),!0)}),deleteBracketPair=({state:t,dispatch:n})=>{if(t.readOnly)return!1;let i=config(t,t.selection.main.head).brackets||d.brackets,o=null,u=t.changeByRange(n=>{if(n.empty){var u,f;let o;let d=(u=t.doc,f=n.head,o=u.sliceString(f-2,f),h.codePointSize(h.codePointAt(o,0))==o.length?o:o.slice(1));for(let o of i)if(o==d&&nextChar(t.doc,n.head)==closing(h.codePointAt(o,0)))return{changes:{from:n.head-o.length,to:n.head+o.length},range:c.EditorSelection.cursor(n.head-o.length),userEvent:"delete.backward"}}return{range:o=n}});return o||n(t.update(u,{scrollIntoView:!0})),!o},x=[{key:"Backspace",run:deleteBracketPair}];function insertBracket(t,n){let i=config(t,t.selection.main.head),o=i.brackets||d.brackets;for(let u of o){let v=closing(h.codePointAt(u,0));if(n==u)return v==u?function(t,n,i){let o=null,u=t.changeByRange(u=>{if(!u.empty)return{changes:[{insert:n,from:u.from},{insert:n,from:u.to}],effects:m.of(u.to+n.length),range:c.EditorSelection.range(u.anchor+n.length,u.head+n.length)};let h=u.head,d=nextChar(t.doc,h);if(d==n){if(nodeStart(t,h))return{changes:{insert:n+n,from:h},effects:m.of(h+n.length),range:c.EditorSelection.cursor(h+n.length)};if(closedBracketAt(t,h)){let o=i&&t.sliceDoc(h,h+3*n.length)==n+n+n;return{range:c.EditorSelection.cursor(h+n.length*(o?3:1)),effects:g.of(h)}}}else if(i&&t.sliceDoc(h-2*n.length,h)==n+n&&nodeStart(t,h-2*n.length))return{changes:{insert:n+n+n+n,from:h},effects:m.of(h+n.length),range:c.EditorSelection.cursor(h+n.length)};else if(t.charCategorizer(h)(d)!=c.CharCategory.Word){let i=t.sliceDoc(h-1,h);if(i!=n&&t.charCategorizer(h)(i)!=c.CharCategory.Word&&!function(t,n,i){let o=f.syntaxTree(t).resolveInner(n,-1);for(let c=0;c<5;c++){if(t.sliceDoc(o.from,o.from+i.length)==i)return!0;let c=o.to==n&&o.parent;if(!c)break;o=c}return!1}(t,h,n))return{changes:{insert:n+n,from:h},effects:m.of(h+n.length),range:c.EditorSelection.cursor(h+n.length)}}return{range:o=u}});return o?null:t.update(u,{scrollIntoView:!0,userEvent:"input.type"})}(t,u,o.indexOf(u+u+u)>-1):function(t,n,i,o){let u=null,h=t.changeByRange(h=>{if(!h.empty)return{changes:[{insert:n,from:h.from},{insert:i,from:h.to}],effects:m.of(h.to+n.length),range:c.EditorSelection.range(h.anchor+n.length,h.head+n.length)};let f=nextChar(t.doc,h.head);return!f||/\s/.test(f)||o.indexOf(f)>-1?{changes:{insert:n+i,from:h.head},effects:m.of(h.head+n.length),range:c.EditorSelection.cursor(h.head+n.length)}:{range:u=h}});return u?null:t.update(h,{scrollIntoView:!0,userEvent:"input.type"})}(t,u,v,i.before||d.before);if(n==v&&closedBracketAt(t,t.selection.main.from))return function(t,n,i){let o=null,u=t.selection.ranges.map(n=>n.empty&&nextChar(t.doc,n.head)==i?c.EditorSelection.cursor(n.head+i.length):o=n);return o?null:t.update({selection:c.EditorSelection.create(u,t.selection.mainIndex),scrollIntoView:!0,effects:t.selection.ranges.map(({from:t})=>g.of(t))})}(t,0,v)}return null}function closedBracketAt(t,n){let i=!1;return t.field(y).between(0,t.doc.length,t=>{t==n&&(i=!0)}),i}function nextChar(t,n){let i=t.sliceString(n,n+2);return i.slice(0,h.codePointSize(h.codePointAt(i,0)))}function nodeStart(t,n){let i=f.syntaxTree(t).resolveInner(n+1);return i.parent&&i.from==n}n.closeBrackets=function(){return[S,y]},n.closeBracketsKeymap=x,n.deleteBracketPair=deleteBracketPair,n.insertBracket=insertBracket},8892:function(t,n,i){"use strict";Object.defineProperty(n,"__esModule",{value:!0});var o=i(4350),c=i(5627),u=i(1135),h=i(8162),f=i(2382),d=i(6393);function updateSel(t,n){return o.EditorSelection.create(t.ranges.map(n),t.mainIndex)}function setSel(t,n){return t.update({selection:n,scrollIntoView:!0,userEvent:"select"})}function moveSel({state:t,dispatch:n},i){let o=updateSel(t.selection,i);return!o.eq(t.selection)&&(n(setSel(t,o)),!0)}function rangeEnd(t,n){return o.EditorSelection.cursor(n?t.to:t.from)}function cursorByChar(t,n){return moveSel(t,i=>i.empty?t.moveByChar(i,n):rangeEnd(i,n))}let cursorCharLeft=t=>cursorByChar(t,t.textDirection!=u.Direction.LTR),cursorCharRight=t=>cursorByChar(t,t.textDirection==u.Direction.LTR);function cursorByGroup(t,n){return moveSel(t,i=>i.empty?t.moveByGroup(i,n):rangeEnd(i,n))}let cursorGroupLeft=t=>cursorByGroup(t,t.textDirection!=u.Direction.LTR),cursorGroupRight=t=>cursorByGroup(t,t.textDirection==u.Direction.LTR);function moveBySubword(t,n,i){let c=t.state.charCategorizer(n.from);return t.moveByChar(n,i,u=>{let h=o.CharCategory.Space,f=n.from,d=!1,m=!1,g=!1,step=n=>{if(d)return!1;f+=i?n.length:-n.length;let u=c(n),v;if(h==o.CharCategory.Space&&(h=u),h!=u)return!1;if(h==o.CharCategory.Word){if(n.toLowerCase()==n){if(!i&&m)return!1;g=!0}else if(g){if(i)return!1;d=!0}else{if(m&&i&&c(v=t.state.sliceDoc(f,f+1))==o.CharCategory.Word&&v.toLowerCase()==v)return!1;m=!0}}return!0};return step(u),step})}function cursorBySubword(t,n){return moveSel(t,i=>i.empty?moveBySubword(t,i,n):rangeEnd(i,n))}function moveBySyntax(t,n,i){let c,u,m=f.syntaxTree(t).resolveInner(n.head),g=i?d.NodeProp.closedBy:d.NodeProp.openedBy;for(let o=n.head;;){let n=i?m.childAfter(o):m.childBefore(o);if(!n)break;!function(t,n,i){if(n.type.prop(i))return!0;let o=n.to-n.from;return o&&(o>2||/[^\s,.;:]/.test(t.sliceDoc(n.from,n.to)))||n.firstChild}(t,n,g)?o=i?n.to:n.from:m=n}return u=m.type.prop(g)&&(c=i?h.matchBrackets(t,m.from,1):h.matchBrackets(t,m.to,-1))&&c.matched?i?c.end.to:c.end.from:i?m.to:m.from,o.EditorSelection.cursor(u,i?-1:1)}let cursorSyntaxLeft=t=>moveSel(t,n=>moveBySyntax(t.state,n,t.textDirection!=u.Direction.LTR)),cursorSyntaxRight=t=>moveSel(t,n=>moveBySyntax(t.state,n,t.textDirection==u.Direction.LTR));function cursorByLine(t,n){return moveSel(t,i=>{if(!i.empty)return rangeEnd(i,n);let o=t.moveVertically(i,n);return o.head!=i.head?o:t.moveToLineBoundary(i,n)})}let cursorLineUp=t=>cursorByLine(t,!1),cursorLineDown=t=>cursorByLine(t,!0);function cursorByPage(t,n){let{state:i}=t,o=updateSel(i.selection,i=>i.empty?t.moveVertically(i,n,t.dom.clientHeight):rangeEnd(i,n));if(o.eq(i.selection))return!1;let c=t.coordsAtPos(i.selection.main.head),h=t.scrollDOM.getBoundingClientRect();return t.dispatch(setSel(i,o),{effects:c&&c.top>h.top&&c.bottomcursorByPage(t,!1),cursorPageDown=t=>cursorByPage(t,!0);function moveByLineBoundary(t,n,i){let c=t.lineBlockAt(n.head),u=t.moveToLineBoundary(n,i);if(u.head==n.head&&u.head!=(i?c.to:c.from)&&(u=t.moveToLineBoundary(n,i,!1)),!i&&u.head==c.from&&c.length){let i=/^\s*/.exec(t.state.sliceDoc(c.from,Math.min(c.from+100,c.to)))[0].length;i&&n.head!=c.from+i&&(u=o.EditorSelection.cursor(c.from+i))}return u}let cursorLineBoundaryForward=t=>moveSel(t,n=>moveByLineBoundary(t,n,!0)),cursorLineBoundaryBackward=t=>moveSel(t,n=>moveByLineBoundary(t,n,!1)),cursorLineStart=t=>moveSel(t,n=>o.EditorSelection.cursor(t.lineBlockAt(n.head).from,1)),cursorLineEnd=t=>moveSel(t,n=>o.EditorSelection.cursor(t.lineBlockAt(n.head).to,-1));function toMatchingBracket(t,n,i){let c=!1,u=updateSel(t.selection,n=>{let u=h.matchBrackets(t,n.head,-1)||h.matchBrackets(t,n.head,1)||n.head>0&&h.matchBrackets(t,n.head-1,1)||n.headtoMatchingBracket(t,n,!1);function extendSel(t,n){let i=updateSel(t.state.selection,t=>{let i=n(t);return o.EditorSelection.range(t.anchor,i.head,i.goalColumn)});return!i.eq(t.state.selection)&&(t.dispatch(setSel(t.state,i)),!0)}function selectByChar(t,n){return extendSel(t,i=>t.moveByChar(i,n))}let selectCharLeft=t=>selectByChar(t,t.textDirection!=u.Direction.LTR),selectCharRight=t=>selectByChar(t,t.textDirection==u.Direction.LTR);function selectByGroup(t,n){return extendSel(t,i=>t.moveByGroup(i,n))}let selectGroupLeft=t=>selectByGroup(t,t.textDirection!=u.Direction.LTR),selectGroupRight=t=>selectByGroup(t,t.textDirection==u.Direction.LTR);function selectBySubword(t,n){return extendSel(t,i=>moveBySubword(t,i,n))}let selectSyntaxLeft=t=>extendSel(t,n=>moveBySyntax(t.state,n,t.textDirection!=u.Direction.LTR)),selectSyntaxRight=t=>extendSel(t,n=>moveBySyntax(t.state,n,t.textDirection==u.Direction.LTR));function selectByLine(t,n){return extendSel(t,i=>t.moveVertically(i,n))}let selectLineUp=t=>selectByLine(t,!1),selectLineDown=t=>selectByLine(t,!0);function selectByPage(t,n){return extendSel(t,i=>t.moveVertically(i,n,t.dom.clientHeight))}let selectPageUp=t=>selectByPage(t,!1),selectPageDown=t=>selectByPage(t,!0),selectLineBoundaryForward=t=>extendSel(t,n=>moveByLineBoundary(t,n,!0)),selectLineBoundaryBackward=t=>extendSel(t,n=>moveByLineBoundary(t,n,!1)),selectLineStart=t=>extendSel(t,n=>o.EditorSelection.cursor(t.lineBlockAt(n.head).from)),selectLineEnd=t=>extendSel(t,n=>o.EditorSelection.cursor(t.lineBlockAt(n.head).to)),cursorDocStart=({state:t,dispatch:n})=>(n(setSel(t,{anchor:0})),!0),cursorDocEnd=({state:t,dispatch:n})=>(n(setSel(t,{anchor:t.doc.length})),!0),selectDocStart=({state:t,dispatch:n})=>(n(setSel(t,{anchor:t.selection.main.anchor,head:0})),!0),selectDocEnd=({state:t,dispatch:n})=>(n(setSel(t,{anchor:t.selection.main.anchor,head:t.doc.length})),!0),selectAll=({state:t,dispatch:n})=>(n(t.update({selection:{anchor:0,head:t.doc.length},userEvent:"select"})),!0),selectLine=({state:t,dispatch:n})=>{let i=selectedLineBlocks(t).map(({from:n,to:i})=>o.EditorSelection.range(n,Math.min(i+1,t.doc.length)));return n(t.update({selection:o.EditorSelection.create(i),userEvent:"select"})),!0},selectParentSyntax=({state:t,dispatch:n})=>{let i=updateSel(t.selection,n=>{var i;let c=f.syntaxTree(t).resolveInner(n.head,1);for(;!(c.from=n.to||c.to>n.to&&c.from<=n.from||!(null===(i=c.parent)||void 0===i?void 0:i.parent));)c=c.parent;return o.EditorSelection.range(c.to,c.from)});return n(setSel(t,i)),!0},simplifySelection=({state:t,dispatch:n})=>{let i=t.selection,c=null;return i.ranges.length>1?c=o.EditorSelection.create([i.main]):i.main.empty||(c=o.EditorSelection.create([o.EditorSelection.cursor(i.main.head)])),!!c&&(n(setSel(t,c)),!0)};function deleteBy({state:t,dispatch:n},i){if(t.readOnly)return!1;let c="delete.selection",u=t.changeByRange(t=>{let{from:n,to:u}=t;if(n==u){let t=i(n);tn&&(c="delete.forward"),n=Math.min(n,t),u=Math.max(u,t)}return n==u?{range:t}:{changes:{from:n,to:u},range:o.EditorSelection.cursor(n)}});return!u.changes.empty&&(n(t.update(u,{scrollIntoView:!0,userEvent:c})),!0)}function skipAtomic(t,n,i){if(t instanceof u.EditorView)for(let o of t.pluginField(u.PluginField.atomicRanges))o.between(n,n,(t,o)=>{tn&&(n=i?o:t)});return n}let deleteByChar=(t,n)=>deleteBy(t,i=>{let{state:o}=t,u=o.doc.lineAt(i),h,d;if(!n&&i>u.from&&ideleteByChar(t,!1),deleteCharForward=t=>deleteByChar(t,!0),deleteByGroup=(t,n)=>deleteBy(t,i=>{let o=i,{state:u}=t,h=u.doc.lineAt(o),f=u.charCategorizer(o);for(let t=null;;){if(o==(n?h.to:h.from)){o==i&&h.number!=(n?u.doc.lines:1)&&(o+=n?1:-1);break}let d=c.findClusterBreak(h.text,o-h.from,n)+h.from,m=h.text.slice(Math.min(o,d)-h.from,Math.max(o,d)-h.from),g=f(m);if(null!=t&&g!=t)break;(" "!=m||o!=i)&&(t=g),o=d}return skipAtomic(t,o,n)}),deleteGroupBackward=t=>deleteByGroup(t,!1),deleteGroupForward=t=>deleteByGroup(t,!0),deleteToLineEnd=t=>deleteBy(t,n=>{let i=t.lineBlockAt(n).to;return skipAtomic(t,ndeleteBy(t,n=>{let i=t.lineBlockAt(n).from;return skipAtomic(t,n>i?i:Math.max(0,n-1),!1)}),splitLine=({state:t,dispatch:n})=>{if(t.readOnly)return!1;let i=t.changeByRange(t=>({changes:{from:t.from,to:t.to,insert:c.Text.of(["",""])},range:o.EditorSelection.cursor(t.from)}));return n(t.update(i,{scrollIntoView:!0,userEvent:"input"})),!0},transposeChars=({state:t,dispatch:n})=>{if(t.readOnly)return!1;let i=t.changeByRange(n=>{if(!n.empty||0==n.from||n.from==t.doc.length)return{range:n};let i=n.from,u=t.doc.lineAt(i),h=i==u.from?i-1:c.findClusterBreak(u.text,i-u.from,!1)+u.from,f=i==u.to?i+1:c.findClusterBreak(u.text,i-u.from,!0)+u.from;return{changes:{from:h,to:f,insert:t.doc.slice(i,f).append(t.doc.slice(h,i))},range:o.EditorSelection.cursor(f)}});return!i.changes.empty&&(n(t.update(i,{scrollIntoView:!0,userEvent:"move.character"})),!0)};function selectedLineBlocks(t){let n=[],i=-1;for(let o of t.selection.ranges){let c=t.doc.lineAt(o.from),u=t.doc.lineAt(o.to);if(o.empty||o.to!=u.from||(u=t.doc.lineAt(o.to-1)),i>=c.number){let t=n[n.length-1];t.to=u.to,t.ranges.push(o)}else n.push({from:c.from,to:u.to,ranges:[o]});i=u.number+1}return n}function moveLine(t,n,i){if(t.readOnly)return!1;let c=[],u=[];for(let n of selectedLineBlocks(t)){if(i?n.to==t.doc.length:0==n.from)continue;let h=t.doc.lineAt(i?n.to+1:n.from-1),f=h.length+1;if(i)for(let i of(c.push({from:n.to,to:h.to},{from:n.from,insert:h.text+t.lineBreak}),n.ranges))u.push(o.EditorSelection.range(Math.min(t.doc.length,i.anchor+f),Math.min(t.doc.length,i.head+f)));else for(let i of(c.push({from:h.from,to:n.from},{from:n.to,insert:t.lineBreak+h.text}),n.ranges))u.push(o.EditorSelection.range(i.anchor-f,i.head-f))}return!!c.length&&(n(t.update({changes:c,scrollIntoView:!0,selection:o.EditorSelection.create(u,t.selection.mainIndex),userEvent:"move.line"})),!0)}let moveLineUp=({state:t,dispatch:n})=>moveLine(t,n,!1),moveLineDown=({state:t,dispatch:n})=>moveLine(t,n,!0);function copyLine(t,n,i){if(t.readOnly)return!1;let o=[];for(let n of selectedLineBlocks(t))i?o.push({from:n.from,insert:t.doc.slice(n.from,n.to)+t.lineBreak}):o.push({from:n.to,insert:t.lineBreak+t.doc.slice(n.from,n.to)});return n(t.update({changes:o,scrollIntoView:!0,userEvent:"input.copyline"})),!0}let copyLineUp=({state:t,dispatch:n})=>copyLine(t,n,!1),copyLineDown=({state:t,dispatch:n})=>copyLine(t,n,!0),deleteLine=t=>{if(t.state.readOnly)return!1;let{state:n}=t,i=n.changes(selectedLineBlocks(n).map(({from:t,to:i})=>(t>0?t--:it.moveVertically(n,!0)).map(i);return t.dispatch({changes:i,selection:o,scrollIntoView:!0,userEvent:"delete.line"}),!0},m=newlineAndIndent(!1),g=newlineAndIndent(!0);function newlineAndIndent(t){return({state:n,dispatch:i})=>{if(n.readOnly)return!1;let u=n.changeByRange(i=>{let{from:u,to:h}=i,m=n.doc.lineAt(u),g=!t&&u==h&&function(t,n){if(/\(\)|\[\]|\{\}/.test(t.sliceDoc(n-1,n+1)))return{from:n,to:n};let i=f.syntaxTree(t).resolveInner(n),o=i.childBefore(n),c=i.childAfter(n),u;return o&&c&&o.to<=n&&c.from>=n&&(u=o.type.prop(d.NodeProp.closedBy))&&u.indexOf(c.name)>-1&&t.doc.lineAt(o.to).from==t.doc.lineAt(c.from).from?{from:o.to,to:c.from}:null}(n,u);t&&(u=h=(h<=m.to?m:n.doc.lineAt(h)).to);let v=new f.IndentContext(n,{simulateBreak:u,simulateDoubleBreak:!!g}),y=f.getIndentation(v,u);for(null==y&&(y=/^\s*/.exec(n.doc.lineAt(u).text)[0].length);hm.from&&u{let u=[];for(let o=c.from;o<=c.to;){let h=t.doc.lineAt(o);h.number>i&&(c.empty||c.to>h.from)&&(n(h,u,c),i=h.number),o=h.to+1}let h=t.changes(u);return{changes:u,range:o.EditorSelection.range(h.mapPos(c.anchor,1),h.mapPos(c.head,1))}})}let indentSelection=({state:t,dispatch:n})=>{if(t.readOnly)return!1;let i=Object.create(null),o=new f.IndentContext(t,{overrideIndentation:t=>{let n=i[t];return null==n?-1:n}}),c=changeBySelectedLine(t,(n,c,u)=>{let h=f.getIndentation(o,n.from);if(null==h)return;/\S/.test(n.text)||(h=0);let d=/^\s*/.exec(n.text)[0],m=f.indentString(t,h);(d!=m||u.from!t.readOnly&&(n(t.update(changeBySelectedLine(t,(n,i)=>{i.push({from:n.from,insert:t.facet(f.indentUnit)})}),{userEvent:"input.indent"})),!0),indentLess=({state:t,dispatch:n})=>!t.readOnly&&(n(t.update(changeBySelectedLine(t,(n,i)=>{let o=/^\s*/.exec(n.text)[0];if(!o)return;let u=c.countColumn(o,t.tabSize),h=0,d=f.indentString(t,Math.max(0,u-f.getIndentUnit(t)));for(;h({mac:t.key,run:t.run,shift:t.shift}))),w=[{key:"Alt-ArrowLeft",mac:"Ctrl-ArrowLeft",run:cursorSyntaxLeft,shift:selectSyntaxLeft},{key:"Alt-ArrowRight",mac:"Ctrl-ArrowRight",run:cursorSyntaxRight,shift:selectSyntaxRight},{key:"Alt-ArrowUp",run:moveLineUp},{key:"Shift-Alt-ArrowUp",run:copyLineUp},{key:"Alt-ArrowDown",run:moveLineDown},{key:"Shift-Alt-ArrowDown",run:copyLineDown},{key:"Escape",run:simplifySelection},{key:"Mod-Enter",run:g},{key:"Alt-l",mac:"Ctrl-l",run:selectLine},{key:"Mod-i",run:selectParentSyntax,preventDefault:!0},{key:"Mod-[",run:indentLess},{key:"Mod-]",run:indentMore},{key:"Mod-Alt-\\",run:indentSelection},{key:"Shift-Mod-k",run:deleteLine},{key:"Shift-Mod-\\",run:cursorMatchingBracket}].concat(y);n.copyLineDown=copyLineDown,n.copyLineUp=copyLineUp,n.cursorCharBackward=t=>cursorByChar(t,!1),n.cursorCharForward=t=>cursorByChar(t,!0),n.cursorCharLeft=cursorCharLeft,n.cursorCharRight=cursorCharRight,n.cursorDocEnd=cursorDocEnd,n.cursorDocStart=cursorDocStart,n.cursorGroupBackward=t=>cursorByGroup(t,!1),n.cursorGroupForward=t=>cursorByGroup(t,!0),n.cursorGroupLeft=cursorGroupLeft,n.cursorGroupRight=cursorGroupRight,n.cursorLineBoundaryBackward=cursorLineBoundaryBackward,n.cursorLineBoundaryForward=cursorLineBoundaryForward,n.cursorLineDown=cursorLineDown,n.cursorLineEnd=cursorLineEnd,n.cursorLineStart=cursorLineStart,n.cursorLineUp=cursorLineUp,n.cursorMatchingBracket=cursorMatchingBracket,n.cursorPageDown=cursorPageDown,n.cursorPageUp=cursorPageUp,n.cursorSubwordBackward=t=>cursorBySubword(t,!1),n.cursorSubwordForward=t=>cursorBySubword(t,!0),n.cursorSyntaxLeft=cursorSyntaxLeft,n.cursorSyntaxRight=cursorSyntaxRight,n.defaultKeymap=w,n.deleteCharBackward=deleteCharBackward,n.deleteCharForward=deleteCharForward,n.deleteGroupBackward=deleteGroupBackward,n.deleteGroupForward=deleteGroupForward,n.deleteLine=deleteLine,n.deleteToLineEnd=deleteToLineEnd,n.deleteToLineStart=deleteToLineStart,n.deleteTrailingWhitespace=({state:t,dispatch:n})=>{if(t.readOnly)return!1;let i=[];for(let n=0,o="",c=t.doc.iter();;){if(c.next(),c.lineBreak||c.done){let t=o.search(/\s+$/);if(t>-1&&i.push({from:n-(o.length-t),to:n}),c.done)break;o=""}else o=c.value;n+=c.value.length}return!!i.length&&(n(t.update({changes:i,userEvent:"delete"})),!0)},n.emacsStyleKeymap=v,n.indentLess=indentLess,n.indentMore=indentMore,n.indentSelection=indentSelection,n.indentWithTab={key:"Tab",run:indentMore,shift:indentLess},n.insertBlankLine=g,n.insertNewline=({state:t,dispatch:n})=>(n(t.update(t.replaceSelection(t.lineBreak),{scrollIntoView:!0,userEvent:"input"})),!0),n.insertNewlineAndIndent=m,n.insertTab=({state:t,dispatch:n})=>t.selection.ranges.some(t=>!t.empty)?indentMore({state:t,dispatch:n}):(n(t.update(t.replaceSelection(" "),{scrollIntoView:!0,userEvent:"input"})),!0),n.moveLineDown=moveLineDown,n.moveLineUp=moveLineUp,n.selectAll=selectAll,n.selectCharBackward=t=>selectByChar(t,!1),n.selectCharForward=t=>selectByChar(t,!0),n.selectCharLeft=selectCharLeft,n.selectCharRight=selectCharRight,n.selectDocEnd=selectDocEnd,n.selectDocStart=selectDocStart,n.selectGroupBackward=t=>selectByGroup(t,!1),n.selectGroupForward=t=>selectByGroup(t,!0),n.selectGroupLeft=selectGroupLeft,n.selectGroupRight=selectGroupRight,n.selectLine=selectLine,n.selectLineBoundaryBackward=selectLineBoundaryBackward,n.selectLineBoundaryForward=selectLineBoundaryForward,n.selectLineDown=selectLineDown,n.selectLineEnd=selectLineEnd,n.selectLineStart=selectLineStart,n.selectLineUp=selectLineUp,n.selectMatchingBracket=({state:t,dispatch:n})=>toMatchingBracket(t,n,!0),n.selectPageDown=selectPageDown,n.selectPageUp=selectPageUp,n.selectParentSyntax=selectParentSyntax,n.selectSubwordBackward=t=>selectBySubword(t,!1),n.selectSubwordForward=t=>selectBySubword(t,!0),n.selectSyntaxLeft=selectSyntaxLeft,n.selectSyntaxRight=selectSyntaxRight,n.simplifySelection=simplifySelection,n.splitLine=splitLine,n.standardKeymap=y,n.transposeChars=transposeChars},5387:function(t,n){"use strict";Object.defineProperty(n,"__esModule",{value:!0});let toggleComment=t=>{let n=getConfig(t.state);return n.line?i(t):!!n.block&&d(t)};function command(t,n){return({state:i,dispatch:o})=>{if(i.readOnly)return!1;let c=t(n,i);return!!c&&(o(i.update(c)),!0)}}let i=command(changeLineComment,0),o=command(changeLineComment,1),c=command(changeLineComment,2),u=command(changeBlockComment,0),h=command(changeBlockComment,1),f=command(changeBlockComment,2),d=command((t,n)=>changeBlockComment(t,n,function(t){let n=[];for(let i of t.selection.ranges){let o=t.doc.lineAt(i.from),c=i.to<=o.to?o:t.doc.lineAt(i.to),u=n.length-1;u>=0&&n[u].to>o.from?n[u].to=c.to:n.push({from:o.from,to:c.to})}return n}(n)),0),m=[{key:"Mod-/",run:toggleComment},{key:"Alt-A",run:u}];function getConfig(t,n=t.selection.main.head){let i=t.languageDataAt("commentTokens",n);return i.length?i[0]:{}}function changeBlockComment(t,n,i=n.selection.ranges){let o=i.map(t=>getConfig(n,t.from).block);if(!o.every(t=>t))return null;let c=i.map((t,i)=>(function(t,{open:n,close:i},o,c){let u,h,f=t.sliceDoc(o-50,o),d=t.sliceDoc(c,c+50),m=/\s*$/.exec(f)[0].length,g=/^\s*/.exec(d)[0].length,v=f.length-m;if(f.slice(v-n.length,v)==n&&d.slice(g,g+i.length)==i)return{open:{pos:o-m,margin:m&&1},close:{pos:c+g,margin:g&&1}};c-o<=100?u=h=t.sliceDoc(o,c):(u=t.sliceDoc(o,o+50),h=t.sliceDoc(c-50,c));let y=/^\s*/.exec(u)[0].length,w=/\s*$/.exec(h)[0].length,b=h.length-w-i.length;return u.slice(y,y+n.length)==n&&h.slice(b,b+i.length)==i?{open:{pos:o+y+n.length,margin:/\s/.test(u.charAt(y+n.length))?1:0},close:{pos:c-w-i.length,margin:/\s/.test(h.charAt(b-1))?1:0}}:null})(n,o[i],t.from,t.to));if(2!=t&&!c.every(t=>t))return{changes:n.changes(i.map((t,n)=>c[n]?[]:[{from:t.from,insert:o[n].open+" "},{from:t.to,insert:" "+o[n].close}]))};if(1!=t&&c.some(t=>t)){let t=[];for(let n=0,i;nc&&(t==u||u>f.from)){c=f.from;let t=getConfig(n,i).line;if(!t)continue;let u=/^\s*/.exec(f.text)[0].length,d=u==f.length,m=f.text.slice(u,u+t.length)==t?u:-1;ut.comment<0&&(!t.empty||t.single))){let t=[];for(let{line:n,token:i,indent:c,empty:u,single:h}of o)(h||!u)&&t.push({from:n.from+c,insert:i+" "});let i=n.changes(t);return{changes:i,selection:n.selection.map(i,1)}}if(1!=t&&o.some(t=>t.comment>=0)){let t=[];for(let{line:n,comment:i,token:c}of o)if(i>=0){let o=n.from+i,u=o+c.length;" "==n.text[u-n.from]&&u++,t.push({from:o,to:u})}return{changes:t}}return null}n.blockComment=h,n.blockUncomment=f,n.commentKeymap=m,n.lineComment=o,n.lineUncomment=c,n.toggleBlockComment=u,n.toggleBlockCommentByLine=d,n.toggleComment=toggleComment,n.toggleLineComment=i},6039:function(t,n,i){"use strict";Object.defineProperty(n,"__esModule",{value:!0});var o=i(4350),c=i(1135),u=i(2382),h=i(356),f=i(7495);function mapRange(t,n){let i=n.mapPos(t.from,1),o=n.mapPos(t.to,-1);return i>=o?void 0:{from:i,to:o}}let d=o.StateEffect.define({map:mapRange}),m=o.StateEffect.define({map:mapRange});function selectedLines(t){let n=[];for(let{head:i}of t.state.selection.ranges)n.some(t=>t.from<=i&&t.to>=i)||n.push(t.lineBlockAt(i));return n}let g=o.StateField.define({create:()=>c.Decoration.none,update(t,n){for(let i of(t=t.map(n.changes),n.effects))i.is(d)&&!function(t,n,i){let o=!1;return t.between(n,n,(t,c)=>{t==n&&c==i&&(o=!0)}),o}(t,i.value.from,i.value.to)?t=t.update({add:[b.range(i.value.from,i.value.to)]}):i.is(m)&&(t=t.update({filter:(t,n)=>i.value.from!=t||i.value.to!=n,filterFrom:i.value.from,filterTo:i.value.to}));if(n.selection){let i=!1,{head:o}=n.selection.main;t.between(o,o,(t,n)=>{to&&(i=!0)}),i&&(t=t.update({filterFrom:o,filterTo:o,filter:(t,n)=>n<=o||t>=o}))}return t},provide:t=>c.EditorView.decorations.from(t)});function foldInside(t,n,i){var o;let c=null;return null===(o=t.field(g,!1))||void 0===o||o.between(n,i,(t,n)=>{(!c||c.from>t)&&(c={from:t,to:n})}),c}function maybeEnable(t,n){return t.field(g,!1)?n:n.concat(o.StateEffect.appendConfig.of(codeFolding()))}let foldCode=t=>{for(let n of selectedLines(t)){let i=u.foldable(t.state,n.from,n.to);if(i)return t.dispatch({effects:maybeEnable(t.state,[d.of(i),announceFold(t,i)])}),!0}return!1},unfoldCode=t=>{if(!t.state.field(g,!1))return!1;let n=[];for(let i of selectedLines(t)){let o=foldInside(t.state,i.from,i.to);o&&n.push(m.of(o),announceFold(t,o,!1))}return n.length&&t.dispatch({effects:n}),n.length>0};function announceFold(t,n,i=!0){let o=t.state.doc.lineAt(n.from).number,u=t.state.doc.lineAt(n.to).number;return c.EditorView.announce.of(`${t.state.phrase(i?"Folded lines":"Unfolded lines")} ${o} ${t.state.phrase("to")} ${u}.`)}let foldAll=t=>{let{state:n}=t,i=[];for(let o=0;o{let n=t.state.field(g,!1);if(!n||!n.size)return!1;let i=[];return n.between(0,t.state.doc.length,(t,n)=>{i.push(m.of({from:t,to:n}))}),t.dispatch({effects:i}),!0},v=[{key:"Ctrl-Shift-[",mac:"Cmd-Alt-[",run:foldCode},{key:"Ctrl-Shift-]",mac:"Cmd-Alt-]",run:unfoldCode},{key:"Ctrl-Alt-[",run:foldAll},{key:"Ctrl-Alt-]",run:unfoldAll}],y={placeholderDOM:null,placeholderText:"…"},w=o.Facet.define({combine:t=>o.combineConfig(t,y)});function codeFolding(t){let n=[g,x];return t&&n.push(w.of(t)),n}let b=c.Decoration.replace({widget:new class extends c.WidgetType{toDOM(t){let{state:n}=t,i=n.facet(w),onclick=n=>{let i=t.lineBlockAt(t.posAtDOM(n.target)),o=foldInside(t.state,i.from,i.to);o&&t.dispatch({effects:m.of(o)}),n.preventDefault()};if(i.placeholderDOM)return i.placeholderDOM(t,onclick);let o=document.createElement("span");return o.textContent=i.placeholderText,o.setAttribute("aria-label",n.phrase("folded code")),o.title=n.phrase("unfold"),o.className="cm-foldPlaceholder",o.onclick=onclick,o}}}),S={openText:"⌄",closedText:"›",markerDOM:null,domEventHandlers:{}};let FoldMarker=class FoldMarker extends h.GutterMarker{constructor(t,n){super(),this.config=t,this.open=n}eq(t){return this.config==t.config&&this.open==t.open}toDOM(t){if(this.config.markerDOM)return this.config.markerDOM(this.open);let n=document.createElement("span");return n.textContent=this.open?this.config.openText:this.config.closedText,n.title=t.state.phrase(this.open?"Fold line":"Unfold line"),n}};let x=c.EditorView.baseTheme({".cm-foldPlaceholder":{backgroundColor:"#eee",border:"1px solid #ddd",color:"#888",borderRadius:".2em",margin:"0 1px",padding:"0 1px",cursor:"pointer"},".cm-foldGutter span":{padding:"0 1px",cursor:"pointer"}});n.codeFolding=codeFolding,n.foldAll=foldAll,n.foldCode=foldCode,n.foldEffect=d,n.foldGutter=function(t={}){let n=Object.assign(Object.assign({},S),t),i=new FoldMarker(n,!0),o=new FoldMarker(n,!1),v=c.ViewPlugin.fromClass(class{constructor(t){this.from=t.viewport.from,this.markers=this.buildMarkers(t)}update(t){(t.docChanged||t.viewportChanged||t.startState.facet(u.language)!=t.state.facet(u.language)||t.startState.field(g,!1)!=t.state.field(g,!1)||u.syntaxTree(t.startState)!=u.syntaxTree(t.state))&&(this.markers=this.buildMarkers(t.view))}buildMarkers(t){let n=new f.RangeSetBuilder;for(let c of t.viewportLineBlocks){let h=foldInside(t.state,c.from,c.to)?o:u.foldable(t.state,c.from,c.to)?i:null;h&&n.add(c.from,c.from,h)}return n.finish()}}),{domEventHandlers:y}=n;return[v,h.gutter({class:"cm-foldGutter",markers(t){var n;return(null===(n=t.plugin(v))||void 0===n?void 0:n.markers)||f.RangeSet.empty},initialSpacer:()=>new FoldMarker(n,!1),domEventHandlers:Object.assign(Object.assign({},y),{click:(t,n,i)=>{if(y.click&&y.click(t,n,i))return!0;let o=foldInside(t.state,n.from,n.to);if(o)return t.dispatch({effects:m.of(o)}),!0;let c=u.foldable(t.state,n.from,n.to);return!!c&&(t.dispatch({effects:d.of(c)}),!0)}})}),codeFolding()]},n.foldKeymap=v,n.foldedRanges=function(t){return t.field(g,!1)||f.RangeSet.empty},n.unfoldAll=unfoldAll,n.unfoldCode=unfoldCode,n.unfoldEffect=m},356:function(t,n,i){"use strict";Object.defineProperty(n,"__esModule",{value:!0});var o=i(1135),c=i(7495),u=i(4350);let GutterMarker=class GutterMarker extends c.RangeValue{compare(t){return this==t||this.constructor==t.constructor&&this.eq(t)}eq(t){return!1}destroy(t){}};GutterMarker.prototype.elementClass="",GutterMarker.prototype.toDOM=void 0,GutterMarker.prototype.mapMode=u.MapMode.TrackBefore,GutterMarker.prototype.startSide=GutterMarker.prototype.endSide=-1,GutterMarker.prototype.point=!0;let h=u.Facet.define(),f={class:"",renderEmptyElements:!1,elementStyle:"",markers:()=>c.RangeSet.empty,lineMarker:()=>null,lineMarkerChange:null,initialSpacer:null,updateSpacer:null,domEventHandlers:{}},d=u.Facet.define(),m=o.EditorView.baseTheme({".cm-gutters":{display:"flex",height:"100%",boxSizing:"border-box",left:0,zIndex:200},"&light .cm-gutters":{backgroundColor:"#f5f5f5",color:"#999",borderRight:"1px solid #ddd"},"&dark .cm-gutters":{backgroundColor:"#333338",color:"#ccc"},".cm-gutter":{display:"flex !important",flexDirection:"column",flexShrink:0,boxSizing:"border-box",minHeight:"100%",overflow:"hidden"},".cm-gutterElement":{boxSizing:"border-box"},".cm-lineNumbers .cm-gutterElement":{padding:"0 3px 0 5px",minWidth:"20px",textAlign:"right",whiteSpace:"nowrap"},"&light .cm-activeLineGutter":{backgroundColor:"#e2f2ff"},"&dark .cm-activeLineGutter":{backgroundColor:"#222227"}}),g=u.Facet.define({combine:t=>t.some(t=>t)});function gutters(t){let n=[v,m];return t&&!1===t.fixed&&n.push(g.of(!0)),n}let v=o.ViewPlugin.fromClass(class{constructor(t){for(let n of(this.view=t,this.prevViewport=t.viewport,this.dom=document.createElement("div"),this.dom.className="cm-gutters",this.dom.setAttribute("aria-hidden","true"),this.dom.style.minHeight=this.view.contentHeight+"px",this.gutters=t.state.facet(d).map(n=>new SingleGutterView(t,n)),this.gutters))this.dom.appendChild(n.dom);this.fixed=!t.state.facet(g),this.fixed&&(this.dom.style.position="sticky"),this.syncGutters(!1),t.scrollDOM.insertBefore(this.dom,t.contentDOM)}update(t){if(this.updateGutters(t)){let n=this.prevViewport,i=t.view.viewport,o=Math.min(n.to,i.to)-Math.max(n.from,i.from);this.syncGutters(o<(i.to-i.from)*.8)}t.geometryChanged&&(this.dom.style.minHeight=this.view.contentHeight+"px"),this.view.state.facet(g)!=!this.fixed&&(this.fixed=!this.fixed,this.dom.style.position=this.fixed?"sticky":""),this.prevViewport=t.view.viewport}syncGutters(t){let n=this.dom.nextSibling;t&&this.dom.remove();let i=c.RangeSet.iter(this.view.state.facet(h),this.view.viewport.from),u=[],f=this.gutters.map(t=>new UpdateContext(t,this.view.viewport,-this.view.documentPadding.top));for(let t of this.view.viewportLineBlocks){let n;if(Array.isArray(t.type)){for(let i of t.type)if(i.type==o.BlockType.Text){n=i;break}}else n=t.type==o.BlockType.Text?t:void 0;if(n)for(let o of(u.length&&(u=[]),advanceCursor(i,u,t.from),f))o.line(this.view,n,u)}for(let t of f)t.finish();t&&this.view.scrollDOM.insertBefore(this.dom,n)}updateGutters(t){let n=t.startState.facet(d),i=t.state.facet(d),o=t.docChanged||t.heightChanged||t.viewportChanged||!c.RangeSet.eq(t.startState.facet(h),t.state.facet(h),t.view.viewport.from,t.view.viewport.to);if(n==i)for(let n of this.gutters)n.update(t)&&(o=!0);else{o=!0;let c=[];for(let o of i){let i=n.indexOf(o);i<0?c.push(new SingleGutterView(this.view,o)):(this.gutters[i].update(t),c.push(this.gutters[i]))}for(let t of this.gutters)t.dom.remove(),0>c.indexOf(t)&&t.destroy();for(let t of c)this.dom.appendChild(t.dom);this.gutters=c}return o}destroy(){for(let t of this.gutters)t.destroy();this.dom.remove()}},{provide:o.PluginField.scrollMargins.from(t=>0!=t.gutters.length&&t.fixed?t.view.textDirection==o.Direction.LTR?{left:t.dom.offsetWidth}:{right:t.dom.offsetWidth}:null)});function asArray(t){return Array.isArray(t)?t:[t]}function advanceCursor(t,n,i){for(;t.value&&t.from<=i;)t.from==i&&n.push(t.value),t.next()}let UpdateContext=class UpdateContext{constructor(t,n,i){this.gutter=t,this.height=i,this.localMarkers=[],this.i=0,this.cursor=c.RangeSet.iter(t.markers,n.from)}line(t,n,i){this.localMarkers.length&&(this.localMarkers=[]),advanceCursor(this.cursor,this.localMarkers,n.from);let o=i.length?this.localMarkers.concat(i):this.localMarkers,c=this.gutter.config.lineMarker(t,n,o);c&&o.unshift(c);let u=this.gutter;if(0==o.length&&!u.config.renderEmptyElements)return;let h=n.top-this.height;if(this.i==u.elements.length){let i=new GutterElement(t,n.height,h,o);u.elements.push(i),u.dom.appendChild(i.dom)}else u.elements[this.i].update(t,n.height,h,o);this.height=n.bottom,this.i++}finish(){let t=this.gutter;for(;t.elements.length>this.i;){let n=t.elements.pop();t.dom.removeChild(n.dom),n.destroy()}}};let SingleGutterView=class SingleGutterView{constructor(t,n){for(let i in this.view=t,this.config=n,this.elements=[],this.spacer=null,this.dom=document.createElement("div"),this.dom.className="cm-gutter"+(this.config.class?" "+this.config.class:""),n.domEventHandlers)this.dom.addEventListener(i,o=>{let c=t.lineBlockAtHeight(o.clientY-t.documentTop);n.domEventHandlers[i](t,c,o)&&o.preventDefault()});this.markers=asArray(n.markers(t)),n.initialSpacer&&(this.spacer=new GutterElement(t,0,0,[n.initialSpacer(t)]),this.dom.appendChild(this.spacer.dom),this.spacer.dom.style.cssText+="visibility: hidden; pointer-events: none")}update(t){let n=this.markers;if(this.markers=asArray(this.config.markers(t.view)),this.spacer&&this.config.updateSpacer){let n=this.config.updateSpacer(this.spacer.markers[0],t);n!=this.spacer.markers[0]&&this.spacer.update(t.view,0,0,[n])}let i=t.view.viewport;return!c.RangeSet.eq(this.markers,n,i.from,i.to)||!!this.config.lineMarkerChange&&this.config.lineMarkerChange(t)}destroy(){for(let t of this.elements)t.destroy()}};let GutterElement=class GutterElement{constructor(t,n,i,o){this.height=-1,this.above=0,this.markers=[],this.dom=document.createElement("div"),this.update(t,n,i,o)}update(t,n,i,o){this.height!=n&&(this.dom.style.height=(this.height=n)+"px"),this.above!=i&&(this.dom.style.marginTop=(this.above=i)?i+"px":""),!function(t,n){if(t.length!=n.length)return!1;for(let i=0;iu.combineConfig(t,{formatNumber:String,domEventHandlers:{}},{domEventHandlers(t,n){let i=Object.assign({},t);for(let t in n){let o=i[t],c=n[t];i[t]=o?(t,n,i)=>o(t,n,i)||c(t,n,i):c}return i}})});let NumberMarker=class NumberMarker extends GutterMarker{constructor(t){super(),this.number=t}eq(t){return this.number==t.number}toDOM(){return document.createTextNode(this.number)}};function formatNumber(t,n){return t.state.facet(w).formatNumber(n,t.state)}let b=d.compute([w],t=>({class:"cm-lineNumbers",renderEmptyElements:!1,markers:t=>t.state.facet(y),lineMarker:(t,n,i)=>i.some(t=>t.toDOM)?null:new NumberMarker(formatNumber(t,t.state.doc.lineAt(n.from).number)),lineMarkerChange:t=>t.startState.facet(w)!=t.state.facet(w),initialSpacer:t=>new NumberMarker(formatNumber(t,maxLineNumber(t.state.doc.lines))),updateSpacer(t,n){let i=formatNumber(n.view,maxLineNumber(n.view.state.doc.lines));return i==t.number?t:new NumberMarker(i)},domEventHandlers:t.facet(w).domEventHandlers}));function maxLineNumber(t){let n=9;for(;n{let n=[],i=-1;for(let o of t.selection.ranges)if(o.empty){let c=t.doc.lineAt(o.head).from;c>i&&(i=c,n.push(S.range(c)))}return c.RangeSet.of(n)});n.GutterMarker=GutterMarker,n.gutter=function(t){return[gutters(),d.of(Object.assign(Object.assign({},f),t))]},n.gutterLineClass=h,n.gutters=gutters,n.highlightActiveLineGutter=function(){return x},n.lineNumberMarkers=y,n.lineNumbers=function(t={}){return[w.of(t),gutters(),b]}},7038:function(t,n,i){"use strict";Object.defineProperty(n,"__esModule",{value:!0});var o=i(6393),c=i(3958),u=i(1135),h=i(4350),f=i(2382),d=i(7495);let m=0;let Tag=class Tag{constructor(t,n,i){this.set=t,this.base=n,this.modified=i,this.id=m++}static define(t){if(null==t?void 0:t.base)throw Error("Can not derive from a modified tag");let n=new Tag([],null,[]);if(n.set.push(n),t)for(let i of t.set)n.set.push(i);return n}static defineModifier(){let t=new Modifier;return n=>n.modified.indexOf(t)>-1?n:Modifier.get(n.base||n,n.modified.concat(t).sort((t,n)=>t.id-n.id))}};let g=0;let Modifier=class Modifier{constructor(){this.instances=[],this.id=g++}static get(t,n){if(!n.length)return t;let i=n[0].instances.find(i=>{var o;return i.base==t&&(o=i.modified,n.length==o.length&&n.every((t,n)=>t==o[n]))});if(i)return i;let o=[],c=new Tag(o,t,n);for(let t of n)t.instances.push(c);let u=function permute(t){let n=[t];for(let i=0;it.length?HighlightStyle.combinedMatch(t):null}),w=h.Facet.define({combine:t=>t.length?t[0].match:null});function getHighlightStyle(t){return t.facet(y)||t.facet(w)}let Rule=class Rule{constructor(t,n,i,o){this.tags=t,this.mode=n,this.context=i,this.next=o}sort(t){return!t||t.deptht.facet(u.EditorView.darkTheme)==("dark"==n.themeType)?[this]:[])),this.fallback=o.concat(w.of(this))}match(t,n){if(this.scope&&n!=this.scope)return null;for(let n of t.set){let i=this.map[n.id];if(void 0!==i)return n!=t&&(this.map[t.id]=i),i}return this.map[t.id]=this.all}static combinedMatch(t){if(1==t.length)return t[0].match;let n=t.some(t=>t.scope)?void 0:Object.create(null);return(i,o)=>{let c=n&&n[i.id];if(void 0!==c)return c;let u=null;for(let n of t){let t=n.match(i,o);t&&(u=u?u+" "+t:t)}return n&&(n[i.id]=u),u}}static define(t,n){return new HighlightStyle(t,n||{})}static get(t,n,i){let c=getHighlightStyle(t);return c&&c(n,i||o.NodeType.none)}};let b=h.Prec.high(u.ViewPlugin.fromClass(class{constructor(t){this.markCache=Object.create(null),this.tree=f.syntaxTree(t.state),this.decorations=this.buildDeco(t,getHighlightStyle(t.state))}update(t){let n=f.syntaxTree(t.state),i=getHighlightStyle(t.state),o=i!=t.startState.facet(y);n.length{i.add(t,n,this.markCache[o]||(this.markCache[o]=u.Decoration.mark({class:o})))});return i.finish()}},{decorations:t=>t.decorations})),S=[""];let HighlightBuilder=class HighlightBuilder{constructor(t,n,i){this.at=t,this.style=n,this.span=i,this.class=""}startSpan(t,n){n!=this.class&&(this.flush(t),t>this.at&&(this.at=t),this.class=n)}flush(t){t>this.at&&this.class&&this.span(this.at,t,this.class)}highlightRange(t,n,i,c,u,h){let{type:f,from:d,to:m}=t;if(d>=i||m<=n)return;S[u]=f.name,f.isTop&&(h=f);let g=c,y=f.prop(v),w=!1;for(;y;){if(!y.context||function(t,n,i){if(t.length>i-1)return!1;for(let o=i-1,c=t.length-1;c>=0;c--,o--){let i=t[c];if(i&&i!=n[o])return!1}return!0}(y.context,S,u)){for(let t of y.tags){let n=this.style(t,h);n&&(g&&(g+=" "),g+=n,1==y.mode?c+=(c?" ":"")+n:0==y.mode&&(w=!0))}break}y=y.next}if(this.startSpan(t.from,g),w)return;let b=t.tree&&t.tree.prop(o.NodeProp.mounted);if(b&&b.overlay){let o=t.node.enter(b.overlay[0].from+d,1),f=t.firstChild();for(let v=0,y=d;;v++){let w=v=S)&&t.nextSibling()););if(!w||S>i)break;(y=w.to+d)>n&&(this.highlightRange(o.cursor,Math.max(n,w.from+d),Math.min(i,y),c,u,b.tree.type),this.startSpan(y,g))}f&&t.parent()}else if(t.firstChild()){do{if(t.to<=n)continue;if(t.from>=i)break;this.highlightRange(t,n,i,c,u+1,h),this.startSpan(Math.min(i,t.to),g)}while(t.nextSibling());t.parent()}}};function highlightTreeRange(t,n,i,o,c){let u=new HighlightBuilder(n,o,c);u.highlightRange(t.cursor(),n,i,"",0,t.type),u.flush(i)}let x=Tag.define,C=x(),_=x(),E=x(_),T=x(_),P=x(),L=x(P),I=x(P),O=x(),N=x(O),B=x(),z=x(),V=x(),H=x(V),U=x(),$={comment:C,lineComment:x(C),blockComment:x(C),docComment:x(C),name:_,variableName:x(_),typeName:E,tagName:x(E),propertyName:T,attributeName:x(T),className:x(_),labelName:x(_),namespace:x(_),macroName:x(_),literal:P,string:L,docString:x(L),character:x(L),attributeValue:x(L),number:I,integer:x(I),float:x(I),bool:x(P),regexp:x(P),escape:x(P),color:x(P),url:x(P),keyword:B,self:x(B),null:x(B),atom:x(B),unit:x(B),modifier:x(B),operatorKeyword:x(B),controlKeyword:x(B),definitionKeyword:x(B),moduleKeyword:x(B),operator:z,derefOperator:x(z),arithmeticOperator:x(z),logicOperator:x(z),bitwiseOperator:x(z),compareOperator:x(z),updateOperator:x(z),definitionOperator:x(z),typeOperator:x(z),controlOperator:x(z),punctuation:V,separator:x(V),bracket:H,angleBracket:x(H),squareBracket:x(H),paren:x(H),brace:x(H),content:O,heading:N,heading1:x(N),heading2:x(N),heading3:x(N),heading4:x(N),heading5:x(N),heading6:x(N),contentSeparator:x(O),list:x(O),quote:x(O),emphasis:x(O),strong:x(O),link:x(O),monospace:x(O),strikethrough:x(O),inserted:x(),deleted:x(),changed:x(),invalid:x(),meta:U,documentMeta:x(U),annotation:x(U),processingInstruction:x(U),definition:Tag.defineModifier(),constant:Tag.defineModifier(),function:Tag.defineModifier(),standard:Tag.defineModifier(),local:Tag.defineModifier(),special:Tag.defineModifier()},q=HighlightStyle.define([{tag:$.link,textDecoration:"underline"},{tag:$.heading,textDecoration:"underline",fontWeight:"bold"},{tag:$.emphasis,fontStyle:"italic"},{tag:$.strong,fontWeight:"bold"},{tag:$.strikethrough,textDecoration:"line-through"},{tag:$.keyword,color:"#708"},{tag:[$.atom,$.bool,$.url,$.contentSeparator,$.labelName],color:"#219"},{tag:[$.literal,$.inserted],color:"#164"},{tag:[$.string,$.deleted],color:"#a11"},{tag:[$.regexp,$.escape,$.special($.string)],color:"#e40"},{tag:$.definition($.variableName),color:"#00f"},{tag:$.local($.variableName),color:"#30a"},{tag:[$.typeName,$.namespace],color:"#085"},{tag:$.className,color:"#167"},{tag:[$.special($.variableName),$.macroName],color:"#256"},{tag:$.definition($.propertyName),color:"#00c"},{tag:$.comment,color:"#940"},{tag:$.meta,color:"#7a757a"},{tag:$.invalid,color:"#f00"}]),G=HighlightStyle.define([{tag:$.link,class:"cmt-link"},{tag:$.heading,class:"cmt-heading"},{tag:$.emphasis,class:"cmt-emphasis"},{tag:$.strong,class:"cmt-strong"},{tag:$.keyword,class:"cmt-keyword"},{tag:$.atom,class:"cmt-atom"},{tag:$.bool,class:"cmt-bool"},{tag:$.url,class:"cmt-url"},{tag:$.labelName,class:"cmt-labelName"},{tag:$.inserted,class:"cmt-inserted"},{tag:$.deleted,class:"cmt-deleted"},{tag:$.literal,class:"cmt-literal"},{tag:$.string,class:"cmt-string"},{tag:$.number,class:"cmt-number"},{tag:[$.regexp,$.escape,$.special($.string)],class:"cmt-string2"},{tag:$.variableName,class:"cmt-variableName"},{tag:$.local($.variableName),class:"cmt-variableName cmt-local"},{tag:$.definition($.variableName),class:"cmt-variableName cmt-definition"},{tag:$.special($.variableName),class:"cmt-variableName2"},{tag:$.definition($.propertyName),class:"cmt-propertyName cmt-definition"},{tag:$.typeName,class:"cmt-typeName"},{tag:$.namespace,class:"cmt-namespace"},{tag:$.className,class:"cmt-className"},{tag:$.macroName,class:"cmt-macroName"},{tag:$.propertyName,class:"cmt-propertyName"},{tag:$.operator,class:"cmt-operator"},{tag:$.comment,class:"cmt-comment"},{tag:$.meta,class:"cmt-meta"},{tag:$.invalid,class:"cmt-invalid"},{tag:$.punctuation,class:"cmt-punctuation"}]);n.HighlightStyle=HighlightStyle,n.Tag=Tag,n.classHighlightStyle=G,n.defaultHighlightStyle=q,n.highlightTree=function(t,n,i,o=0,c=t.length){highlightTreeRange(t,o,c,n,i)},n.styleTags=function(t){let n=Object.create(null);for(let i in t){let o=t[i];for(let t of(Array.isArray(o)||(o=[o]),i.split(" ")))if(t){let i=[],c=2,u=t;for(let n=0;;){if("..."==u&&n>0&&n+3==t.length){c=1;break}let o=/^"(?:[^"\\]|\\.)*?"|[^\/!]+/.exec(u);if(!o)throw RangeError("Invalid path: "+t);if(i.push("*"==o[0]?null:'"'==o[0][0]?JSON.parse(o[0]):o[0]),(n+=o[0].length)==t.length)break;let h=t[n++];if(n==t.length&&"!"==h){c=0;break}if("/"!=h)throw RangeError("Invalid path: "+t);u=t.slice(n)}let h=i.length-1,f=i[h];if(!f)throw RangeError("Invalid path: "+t);let d=new Rule(o,c,h>0?i.slice(0,h):null);n[f]=d.sort(n[f])}}return v.add(n)},n.tags=$},7260:function(t,n,i){"use strict";Object.defineProperty(n,"__esModule",{value:!0});var o=i(4350),c=i(1135);let u=o.Annotation.define(),h=o.Annotation.define(),f=o.Facet.define(),d=o.Facet.define({combine:t=>o.combineConfig(t,{minDepth:100,newGroupDelay:500},{minDepth:Math.max,newGroupDelay:Math.min})}),m=o.StateField.define({create:()=>HistoryState.empty,update(t,n){let i=n.state.facet(d),c=n.annotation(u);if(c){var f;let u;let h=n.docChanged?o.EditorSelection.single((f=n.changes,u=0,f.iterChangedRanges((t,n)=>u=n),u)):void 0,d=HistEvent.fromTransaction(n,h),m=c.side,g=0==m?t.undone:t.done;return g=d?updateBranch(g,g.length,i.minDepth,d):addSelection(g,n.startState.selection),new HistoryState(0==m?c.rest:g,0==m?g:c.rest)}let m=n.annotation(h);if(("full"==m||"before"==m)&&(t=t.isolate()),!1===n.annotation(o.Transaction.addToHistory))return n.changes.empty?t:t.addMapping(n.changes.desc);let g=HistEvent.fromTransaction(n),v=n.annotation(o.Transaction.time),y=n.annotation(o.Transaction.userEvent);return g?t=t.addChanges(g,v,y,i.newGroupDelay,i.minDepth):n.selection&&(t=t.addSelection(n.startState.selection,v,y,i.newGroupDelay)),("full"==m||"after"==m)&&(t=t.isolate()),t},toJSON:t=>({done:t.done.map(t=>t.toJSON()),undone:t.undone.map(t=>t.toJSON())}),fromJSON:t=>new HistoryState(t.done.map(HistEvent.fromJSON),t.undone.map(HistEvent.fromJSON))});function cmd(t,n){return function({state:i,dispatch:o}){if(!n&&i.readOnly)return!1;let c=i.field(m,!1);if(!c)return!1;let u=c.pop(t,i,n);return!!u&&(o(u),!0)}}let g=cmd(0,!1),v=cmd(1,!1),y=cmd(0,!0),w=cmd(1,!0);function depth(t){return function(n){let i=n.field(m,!1);if(!i)return 0;let o=0==t?i.done:i.undone;return o.length-(o.length&&!o[0].changes?1:0)}}let b=depth(0),S=depth(1);let HistEvent=class HistEvent{constructor(t,n,i,o,c){this.changes=t,this.effects=n,this.mapped=i,this.startSelection=o,this.selectionsAfter=c}setSelAfter(t){return new HistEvent(this.changes,this.effects,this.mapped,this.startSelection,t)}toJSON(){var t,n,i;return{changes:null===(t=this.changes)||void 0===t?void 0:t.toJSON(),mapped:null===(n=this.mapped)||void 0===n?void 0:n.toJSON(),startSelection:null===(i=this.startSelection)||void 0===i?void 0:i.toJSON(),selectionsAfter:this.selectionsAfter.map(t=>t.toJSON())}}static fromJSON(t){return new HistEvent(t.changes&&o.ChangeSet.fromJSON(t.changes),[],t.mapped&&o.ChangeDesc.fromJSON(t.mapped),t.startSelection&&o.EditorSelection.fromJSON(t.startSelection),t.selectionsAfter.map(o.EditorSelection.fromJSON))}static fromTransaction(t,n){let i=x;for(let n of t.startState.facet(f)){let o=n(t);o.length&&(i=i.concat(o))}return!i.length&&t.changes.empty?null:new HistEvent(t.changes.invert(t.startState.doc),i,void 0,n||t.startState.selection,x)}static selection(t){return new HistEvent(void 0,x,void 0,void 0,t)}};function updateBranch(t,n,i,o){let c=n+1>i+20?n-i-1:0,u=t.slice(c,n);return u.push(o),u}function conc(t,n){return t.length?n.length?t.concat(n):t:n}let x=[];function addSelection(t,n){if(!t.length)return[HistEvent.selection([n])];{let i=t[t.length-1],o=i.selectionsAfter.slice(Math.max(0,i.selectionsAfter.length-200));return o.length&&o[o.length-1].eq(n)?t:(o.push(n),updateBranch(t,t.length-1,1e9,i.setSelAfter(o)))}}function addMappingToBranch(t,n){if(!t.length)return t;let i=t.length,c=x;for(;i;){let u=function(t,n,i){let c=conc(t.selectionsAfter.length?t.selectionsAfter.map(t=>t.map(n)):x,i);if(!t.changes)return HistEvent.selection(c);let u=t.changes.map(n),h=n.mapDesc(t.changes,!0),f=t.mapped?t.mapped.composeDesc(h):h;return new HistEvent(u,o.StateEffect.mapEffects(t.effects,n),f,t.startSelection.map(h),c)}(t[i-1],n,c);if(u.changes&&!u.changes.empty||u.effects.length){let n=t.slice(0,i);return n[i-1]=u,n}n=u.mapped,i--,c=u.selectionsAfter}return c.length?[HistEvent.selection(c)]:x}let C=/^(input\.type|delete)($|\.)/;let HistoryState=class HistoryState{constructor(t,n,i=0,o){this.done=t,this.undone=n,this.prevTime=i,this.prevUserEvent=o}isolate(){return this.prevTime?new HistoryState(this.done,this.undone):this}addChanges(t,n,i,o,c){var u,h;let f,d,m=this.done,g=m[m.length-1];return m=g&&g.changes&&!g.changes.empty&&t.changes&&(!i||C.test(i))&&(!g.selectionsAfter.length&&n-this.prevTimef.push(t,n)),h.iterChangedRanges((t,n,i,o)=>{for(let t=0;t=n&&i<=c&&(d=!0)}}),d)||"input.type.compose"==i)?updateBranch(m,m.length-1,c,new HistEvent(t.changes.compose(g.changes),conc(t.effects,g.effects),g.mapped,g.startSelection,x)):updateBranch(m,m.length,c,t),new HistoryState(m,x,n,i)}addSelection(t,n,i,o){var c;let u=this.done.length?this.done[this.done.length-1].selectionsAfter:x;return u.length>0&&n-this.prevTimen.empty!=t.ranges[i].empty).length?this:new HistoryState(addSelection(this.done,t),this.undone,n,i)}addMapping(t){return new HistoryState(addMappingToBranch(this.done,t),addMappingToBranch(this.undone,t),this.prevTime,this.prevUserEvent)}pop(t,n,i){let o=0==t?this.done:this.undone;if(0==o.length)return null;let c=o[o.length-1];if(i&&c.selectionsAfter.length){let i,h;return n.update({selection:c.selectionsAfter[c.selectionsAfter.length-1],annotations:u.of({side:t,rest:(i=o[o.length-1],(h=o.slice())[o.length-1]=i.setSelAfter(i.selectionsAfter.slice(0,i.selectionsAfter.length-1)),h)}),userEvent:0==t?"select.undo":"select.redo",scrollIntoView:!0})}if(!c.changes)return null;{let i=1==o.length?x:o.slice(0,o.length-1);return c.mapped&&(i=addMappingToBranch(i,c.mapped)),n.update({changes:c.changes,selection:c.startSelection,effects:c.effects,annotations:u.of({side:t,rest:i}),filter:!1,userEvent:0==t?"undo":"redo",scrollIntoView:!0})}}};HistoryState.empty=new HistoryState(x,x);let _=[{key:"Mod-z",run:g,preventDefault:!0},{key:"Mod-y",mac:"Mod-Shift-z",run:v,preventDefault:!0},{key:"Mod-u",run:y,preventDefault:!0},{key:"Alt-u",mac:"Mod-Shift-u",run:w,preventDefault:!0}];n.history=function(t={}){return[m,d.of(t),c.EditorView.domEventHandlers({beforeinput(t,n){let i="historyUndo"==t.inputType?g:"historyRedo"==t.inputType?v:null;return!!i&&(t.preventDefault(),i(n))}})]},n.historyField=m,n.historyKeymap=_,n.invertedEffects=f,n.isolateHistory=h,n.redo=v,n.redoDepth=S,n.redoSelection=w,n.undo=g,n.undoDepth=b,n.undoSelection=y},2382:function(t,n,i){"use strict";Object.defineProperty(n,"__esModule",{value:!0});var o,c=i(6393),u=i(4350),h=i(1135),f=i(5627);let d=new c.NodeProp;function defineLanguageFacet(t){return u.Facet.define({combine:t?n=>n.concat(t):void 0})}let Language=class Language{constructor(t,n,i,o=[]){this.data=t,this.topNode=i,u.EditorState.prototype.hasOwnProperty("tree")||Object.defineProperty(u.EditorState.prototype,"tree",{get(){return syntaxTree(this)}}),this.parser=n,this.extension=[y.of(this),u.EditorState.languageData.of((t,n,i)=>t.facet(languageDataFacetAt(t,n,i)))].concat(o)}isActiveAt(t,n,i=-1){return languageDataFacetAt(t,n,i)==this.data}findRegions(t){let n=t.facet(y);if((null==n?void 0:n.data)==this.data)return[{from:0,to:t.doc.length}];if(!n||!n.allowsNesting)return[];let i=[],explore=(t,n)=>{if(t.prop(d)==this.data){i.push({from:n,to:n+t.length});return}let o=t.prop(c.NodeProp.mounted);if(o){if(o.tree.prop(d)==this.data){if(o.overlay)for(let t of o.overlay)i.push({from:t.from+n,to:t.to+n});else i.push({from:n,to:n+t.length});return}if(o.overlay){let t=i.length;if(explore(o.tree,o.overlay[0].from+n),i.length>t)return}}for(let i=0;it.isTop?n:void 0)]}))}configure(t){return new LRLanguage(this.data,this.parser.configure(t))}get allowsNesting(){return this.parser.wrappers.length>0}};function syntaxTree(t){let n=t.field(Language.state,!1);return n?n.tree:c.Tree.empty}let DocInput=class DocInput{constructor(t,n=t.length){this.doc=t,this.length=n,this.cursorPos=0,this.string="",this.cursor=t.iter()}syncTo(t){return this.string=this.cursor.next(t-this.cursorPos).value,this.cursorPos=t+this.string.length,this.cursorPos-this.string.length}chunk(t){return this.syncTo(t),this.string}get lineChunks(){return!0}read(t,n){let i=this.cursorPos-this.string.length;return t=this.cursorPos?this.doc.sliceString(t,n):this.string.slice(t-i,n-i)}};let m=null;let ParseContext=class ParseContext{constructor(t,n,i=[],o,c,u,h,f){this.parser=t,this.state=n,this.fragments=i,this.tree=o,this.treeLen=c,this.viewport=u,this.skipped=h,this.scheduleOn=f,this.parse=null,this.tempSkipped=[]}startParse(){return this.parser.startParse(new DocInput(this.state.doc),this.fragments)}work(t,n){return(null!=n&&n>=this.state.doc.length&&(n=void 0),this.tree!=c.Tree.empty&&this.isDone(null!=n?n:this.state.doc.length))?(this.takeTree(),!0):this.withContext(()=>{var i;if("number"==typeof t){let n=Date.now()+t;t=()=>Date.now()>n}for(this.parse||(this.parse=this.startParse()),null!=n&&(null==this.parse.stoppedAt||this.parse.stoppedAt>n)&&n=this.treeLen&&((null==this.parse.stoppedAt||this.parse.stoppedAt>t)&&this.parse.stopAt(t),this.withContext(()=>{for(;!(n=this.parse.advance()););}),this.treeLen=t,this.tree=n,this.fragments=this.withoutTempSkipped(c.TreeFragment.addTree(this.tree,this.fragments,!0)),this.parse=null)}withContext(t){let n=m;m=this;try{return t()}finally{m=n}}withoutTempSkipped(t){for(let n;n=this.tempSkipped.pop();)t=cutFragments(t,n.from,n.to);return t}changes(t,n){let{fragments:i,tree:o,treeLen:u,viewport:h,skipped:f}=this;if(this.takeTree(),!t.empty){let n=[];if(t.iterChangedRanges((t,i,o,c)=>n.push({fromA:t,toA:i,fromB:o,toB:c})),i=c.TreeFragment.applyChanges(i,n),o=c.Tree.empty,u=0,h={from:t.mapPos(h.from,-1),to:t.mapPos(h.to,1)},this.skipped.length)for(let n of(f=[],this.skipped)){let i=t.mapPos(n.from,1),o=t.mapPos(n.to,-1);it.from&&(this.fragments=cutFragments(this.fragments,i,o),this.skipped.splice(n--,1))}return!(this.skipped.length>=n)&&(this.reset(),!0)}reset(){this.parse&&(this.takeTree(),this.parse=null)}skipUntilInView(t,n){this.skipped.push({from:t,to:n})}static getSkippingParser(t){return new class extends c.Parser{createParse(n,i,o){let u=o[0].from,h=o[o.length-1].to;return{parsedPos:u,advance(){let n=m;if(n){for(let t of o)n.tempSkipped.push(t);t&&(n.scheduleOn=n.scheduleOn?Promise.all([n.scheduleOn,t]):t)}return this.parsedPos=h,new c.Tree(c.NodeType.none,[],[],h-u)},stoppedAt:null,stopAt(){}}}}}isDone(t){t=Math.min(t,this.state.doc.length);let n=this.fragments;return this.treeLen>=t&&n.length&&0==n[0].from&&n[0].to>=t}static get(){return m}};function cutFragments(t,n,i){return c.TreeFragment.applyChanges(t,[{fromA:n,toA:i,fromB:n,toB:i}])}let LanguageState=class LanguageState{constructor(t){this.context=t,this.tree=t.tree}apply(t){if(!t.docChanged&&this.tree==this.context.tree)return this;let n=this.context.changes(t.changes,t.state),i=this.context.treeLen==t.startState.doc.length?void 0:Math.max(t.changes.mapPos(this.context.treeLen),n.viewport.to);return n.work(20,i)||n.takeTree(),new LanguageState(n)}static init(t){let n=Math.min(3e3,t.doc.length),i=new ParseContext(t.facet(y).parser,t,[],c.Tree.empty,0,{from:0,to:n},[],null);return i.work(20,n)||i.takeTree(),new LanguageState(i)}};Language.state=u.StateField.define({create:LanguageState.init,update(t,n){for(let t of n.effects)if(t.is(Language.setState))return t.value;return n.startState.facet(y)!=n.state.facet(y)?LanguageState.init(n.state):t.apply(n)}});let requestIdle=t=>{let n=setTimeout(()=>t(),500);return()=>clearTimeout(n)};"undefined"!=typeof requestIdleCallback&&(requestIdle=t=>{let n=-1,i=setTimeout(()=>{n=requestIdleCallback(t,{timeout:400})},100);return()=>n<0?clearTimeout(i):cancelIdleCallback(n)});let g="undefined"!=typeof navigator&&(null===(o=navigator.scheduling)||void 0===o?void 0:o.isInputPending)?()=>navigator.scheduling.isInputPending():null,v=h.ViewPlugin.fromClass(class{constructor(t){this.view=t,this.working=null,this.workScheduled=0,this.chunkEnd=-1,this.chunkBudget=-1,this.work=this.work.bind(this),this.scheduleWork()}update(t){let n=this.view.state.field(Language.state).context;(n.updateViewport(t.view.viewport)||this.view.viewport.to>n.treeLen)&&this.scheduleWork(),t.docChanged&&(this.view.hasFocus&&(this.chunkBudget+=50),this.scheduleWork()),this.checkAsyncSchedule(n)}scheduleWork(){if(this.working)return;let{state:t}=this.view,n=t.field(Language.state);n.tree==n.context.tree&&n.context.isDone(t.doc.length)||(this.working=requestIdle(this.work))}work(t){this.working=null;let n=Date.now();if(this.chunkEndo+1e3,f=c.context.work(()=>g&&g()||Date.now()>u,o+(h?0:1e5));this.chunkBudget-=Date.now()-n,(f||this.chunkBudget<=0)&&(c.context.takeTree(),this.view.dispatch({effects:Language.setState.of(new LanguageState(c.context))})),this.chunkBudget>0&&!(f&&!h)&&this.scheduleWork(),this.checkAsyncSchedule(c.context)}checkAsyncSchedule(t){t.scheduleOn&&(this.workScheduled++,t.scheduleOn.then(()=>this.scheduleWork()).catch(t=>h.logException(this.view.state,t)).then(()=>this.workScheduled--),t.scheduleOn=null)}destroy(){this.working&&this.working()}isWorking(){return!!(this.working||this.workScheduled>0)}},{eventHandlers:{focus(){this.scheduleWork()}}}),y=u.Facet.define({combine:t=>t.length?t[0]:null,enables:[Language.state,v]});let LanguageDescription=class LanguageDescription{constructor(t,n,i,o,c,u){this.name=t,this.alias=n,this.extensions=i,this.filename=o,this.loadFunc=c,this.support=u,this.loading=null}load(){return this.loading||(this.loading=this.loadFunc().then(t=>this.support=t,t=>{throw this.loading=null,t}))}static of(t){let{load:n,support:i}=t;if(!n){if(!i)throw RangeError("Must pass either 'load' or 'support' to LanguageDescription.of");n=()=>Promise.resolve(i)}return new LanguageDescription(t.name,(t.alias||[]).concat(t.name).map(t=>t.toLowerCase()),t.extensions||[],t.filename,n,i)}static matchFilename(t,n){for(let i of t)if(i.filename&&i.filename.test(n))return i;let i=/\.([^.]+)$/.exec(n);if(i){for(let n of t)if(n.extensions.indexOf(i[1])>-1)return n}return null}static matchLanguageName(t,n,i=!0){for(let i of(n=n.toLowerCase(),t))if(i.alias.some(t=>t==n))return i;if(i)for(let i of t)for(let t of i.alias){let o=n.indexOf(t);if(o>-1&&(t.length>2||!/\w/.test(n[o-1])&&!/\w/.test(n[o+t.length])))return i}return null}};let w=u.Facet.define(),b=u.Facet.define({combine:t=>{if(!t.length)return" ";if(!/^(?: +|\t+)$/.test(t[0]))throw Error("Invalid indent unit: "+JSON.stringify(t[0]));return t[0]}});function getIndentUnit(t){let n=t.facet(b);return 9==n.charCodeAt(0)?t.tabSize*n.length:n.length}function indentString(t,n){let i="",o=t.tabSize;if(9==t.facet(b).charCodeAt(0))for(;n>=o;)i+=" ",n-=o;for(let t=0;t=i.from&&o<=i.to?c&&o==t?{text:"",from:t}:(n<0?o-1&&(c+=u-this.countColumn(i,i.search(/\S|$/))),c}countColumn(t,n=t.length){return f.countColumn(t,this.state.tabSize,n)}lineIndent(t,n=1){let{text:i,from:o}=this.lineAt(t,n),c=this.options.overrideIndentation;if(c){let t=c(o);if(t>-1)return t}return this.countColumn(i,i.search(/\S|$/))}get simulatedBreak(){return this.options.simulateBreak||null}};let S=new c.NodeProp;function indentFrom(t,n,i){for(;t;t=t.parent){let o=function(t){let n=t.type.prop(S);if(n)return n;let i=t.firstChild,o;if(i&&(o=i.type.prop(c.NodeProp.closedBy))){let n=t.lastChild,i=n&&o.indexOf(n.name)>-1;return t=>delimitedStrategy(t,!0,1,void 0,i&&!(t.pos==t.options.simulateBreak&&t.options.simulateDoubleBreak)?n.from:void 0)}return null==t.parent?topIndent:null}(t);if(o)return o(new TreeIndentContext(i,n,t))}return null}function topIndent(){return 0}let TreeIndentContext=class TreeIndentContext extends IndentContext{constructor(t,n,i){super(t.state,t.options),this.base=t,this.pos=n,this.node=i}get textAfter(){return this.textAfterPos(this.pos)}get baseIndent(){let t=this.state.doc.lineAt(this.node.from);for(;;){let n=this.node.resolve(t.from);for(;n.parent&&n.parent.from==n.from;)n=n.parent;if(function(t,n){for(let i=n;i;i=i.parent)if(t==i)return!0;return!1}(n,this.node))break;t=this.state.doc.lineAt(n.from)}return this.lineIndent(t.from)}continue(){let t=this.node.parent;return t?indentFrom(t,this.pos,this.base):0}};function delimitedStrategy(t,n,i,o,c){let u=t.textAfter,h=u.match(/^\s*/)[0].length,f=o&&u.slice(h,h+o.length)==o||c==t.pos+h,d=n?function(t){let n=t.node,i=n.childAfter(n.from),o=n.lastChild;if(!i)return null;let c=t.options.simulateBreak,u=t.state.doc.lineAt(i.from),h=null==c||c<=u.from?u.to:Math.min(u.to,c);for(let t=i.to;;){let c=n.childAfter(t);if(!c||c==o)return null;if(!c.type.isSkipped)return c.from{let o=t&&t.test(i.textAfter);return i.baseIndent+(o?0:n*i.unit)}},n.defineLanguageFacet=defineLanguageFacet,n.delimitedIndent=function({closing:t,align:n=!0,units:i=1}){return o=>delimitedStrategy(o,n,i,t)},n.ensureSyntaxTree=function(t,n,i=50){var o;let c=null===(o=t.field(Language.state,!1))||void 0===o?void 0:o.context;return c&&(c.isDone(n)||c.work(i,n))?c.tree:null},n.flatIndent=t=>t.baseIndent,n.foldInside=function(t){let n=t.firstChild,i=t.lastChild;return n&&n.toi)continue;if(u&&h.from=n&&o.to>i&&(u=o)}}return u}(t,n,i)},n.getIndentUnit=getIndentUnit,n.getIndentation=getIndentation,n.indentNodeProp=S,n.indentOnInput=function(){return u.EditorState.transactionFilter.of(t=>{if(!t.docChanged||!t.isUserEvent("input.type")&&!t.isUserEvent("input.complete"))return t;let n=t.startState.languageDataAt("indentOnInput",t.startState.selection.main.head);if(!n.length)return t;let i=t.newDoc,{head:o}=t.newSelection.main,c=i.lineAt(o);if(o>c.from+200)return t;let u=i.sliceString(c.from,o);if(!n.some(t=>t.test(u)))return t;let{state:h}=t,f=-1,d=[];for(let{head:t}of h.selection.ranges){let n=h.doc.lineAt(t);if(n.from==f)continue;f=n.from;let i=getIndentation(h,n.from);if(null==i)continue;let o=/^\s*/.exec(n.text)[0],c=indentString(h,i);o!=c&&d.push({from:n.from,to:n.from+o.length,insert:c})}return d.length?[t,{changes:d,sequential:!0}]:t})},n.indentService=w,n.indentString=indentString,n.indentUnit=b,n.language=y,n.languageDataProp=d,n.syntaxParserRunning=function(t){var n;return(null===(n=t.plugin(v))||void 0===n?void 0:n.isWorking())||!1},n.syntaxTree=syntaxTree,n.syntaxTreeAvailable=function(t,n=t.doc.length){var i;return(null===(i=t.field(Language.state,!1))||void 0===i?void 0:i.context.isDone(n))||!1}},3955:function(t,n){"use strict";Object.defineProperty(n,"__esModule",{value:!0});var i=RegExp("\\b((true)|(false)|(on)|(off)|(yes)|(no))$","i");n.yaml={token:function(t,n){var o=t.peek(),c=n.escaped;if(n.escaped=!1,"#"==o&&(0==t.pos||/\s/.test(t.string.charAt(t.pos-1))))return t.skipToEnd(),"comment";if(t.match(/^('([^']|\\.)*'?|"([^"]|\\.)*"?)/))return"string";if(n.literal&&t.indentation()>n.keyCol)return t.skipToEnd(),"string";if(n.literal&&(n.literal=!1),t.sol()){if(n.keyCol=0,n.pair=!1,n.pairStart=!1,t.match("---")||t.match("..."))return"def";if(t.match(/^\s*-\s+/))return"meta"}if(t.match(/^(\{|\}|\[|\])/))return"{"==o?n.inlinePairs++:"}"==o?n.inlinePairs--:"["==o?n.inlineList++:n.inlineList--,"meta";if(n.inlineList>0&&!c&&","==o)return t.next(),"meta";if(n.inlinePairs>0&&!c&&","==o)return n.keyCol=0,n.pair=!1,n.pairStart=!1,t.next(),"meta";if(n.pairStart){if(t.match(/^\s*(\||\>)\s*/))return n.literal=!0,"meta";if(t.match(/^\s*(\&|\*)[a-z0-9\._-]+\b/i))return"variable";if(0==n.inlinePairs&&t.match(/^\s*-?[0-9\.\,]+\s?$/)||n.inlinePairs>0&&t.match(/^\s*-?[0-9\.\,]+\s?(?=(,|}))/))return"number";if(t.match(i))return"keyword"}return!n.pair&&t.match(/^\s*(?:[,\[\]{}&*!|>'"%@`][^\s'":]|[^,\[\]{}#&*!|>'"%@`])[^#]*?(?=\s*:($|\s))/)?(n.pair=!0,n.keyCol=t.indentation(),"atom"):n.pair&&t.match(/^:\s*/)?(n.pairStart=!0,"meta"):(n.pairStart=!1,n.escaped="\\"==o,t.next(),null)},startState:function(){return{pair:!1,pairStart:!1,keyCol:0,inlinePairs:0,inlineList:0,literal:!1,escaped:!1}},languageData:{commentTokens:{line:"#"}}}},1566:function(t,n,i){"use strict";Object.defineProperty(n,"__esModule",{value:!0});var o=i(1135),c=i(4350),u=i(8326),h=i(2300),f=i(356),d=i(7495),m=i(3842),g=m&&"object"==typeof m&&"default"in m?m:{default:m};let SelectedDiagnostic=class SelectedDiagnostic{constructor(t,n,i){this.from=t,this.to=n,this.diagnostic=i}};let LintState=class LintState{constructor(t,n,i){this.diagnostics=t,this.panel=n,this.selected=i}static init(t,n,i){let c=o.Decoration.set(t.map(t=>t.from==t.to||t.from==t.to-1&&i.doc.lineAt(t.from).to==t.from?o.Decoration.widget({widget:new DiagnosticWidget(t),diagnostic:t}).range(t.from):o.Decoration.mark({attributes:{class:"cm-lintRange cm-lintRange-"+t.severity},diagnostic:t}).range(t.from,t.to)),!0);return new LintState(c,n,findDiagnostic(c))}};function findDiagnostic(t,n=null,i=0){let o=null;return t.between(i,1e9,(t,i,{spec:c})=>{if(!n||c.diagnostic==n)return o=new SelectedDiagnostic(t,i,c.diagnostic),!1}),o}function maybeEnableLint(t,n){return t.field(b,!1)?n:n.concat(c.StateEffect.appendConfig.of([b,o.EditorView.decorations.compute([b],t=>{let{selected:n,panel:i}=t.field(b);return n&&i&&n.from!=n.to?o.Decoration.set([S.range(n.from,n.to)]):o.Decoration.none}),u.hoverTooltip(lintTooltip),E]))}function setDiagnostics(t,n){return{effects:maybeEnableLint(t,[v.of(n)])}}let v=c.StateEffect.define(),y=c.StateEffect.define(),w=c.StateEffect.define(),b=c.StateField.define({create:()=>new LintState(o.Decoration.none,null,null),update(t,n){if(n.docChanged){let i=t.diagnostics.map(n.changes),o=null;if(t.selected){let c=n.changes.mapPos(t.selected.from,1);o=findDiagnostic(i,t.selected.diagnostic,c)||findDiagnostic(i,null,c)}t=new LintState(i,t.panel,o)}for(let i of n.effects)i.is(v)?t=LintState.init(i.value,t.panel,n.state):i.is(y)?t=new LintState(t.diagnostics,i.value?LintPanel.open:null,t.selected):i.is(w)&&(t=new LintState(t.diagnostics,t.panel,i.value));return t},provide:t=>[h.showPanel.from(t,t=>t.panel),o.EditorView.decorations.from(t,t=>t.diagnostics)]}),S=o.Decoration.mark({class:"cm-lintRange cm-lintRange-active"});function lintTooltip(t,n,i){let{diagnostics:o}=t.state.field(b),c=[],u=2e8,h=0;return(o.between(n-(i<0?1:0),n+(i>0?1:0),(t,o,{spec:f})=>{n>=t&&n<=o&&(t==o||(n>t||i>0)&&(n({dom:diagnosticsTooltip(t,c)})}:null}function diagnosticsTooltip(t,n){return g.default("ul",{class:"cm-tooltip-lint"},n.map(n=>renderDiagnostic(t,n,!1)))}let openLintPanel=t=>{let n=t.state.field(b,!1);n&&n.panel||t.dispatch({effects:maybeEnableLint(t.state,[y.of(!0)])});let i=h.getPanel(t,LintPanel.open);return i&&i.dom.querySelector(".cm-panel-lint ul").focus(),!0},closeLintPanel=t=>{let n=t.state.field(b,!1);return!!n&&!!n.panel&&(t.dispatch({effects:y.of(!1)}),!0)},nextDiagnostic=t=>{let n=t.state.field(b,!1);if(!n)return!1;let i=t.state.selection.main,o=n.diagnostics.iter(i.to+1);return(!!o.value||!!(o=n.diagnostics.iter(0)).value&&(o.from!=i.from||o.to!=i.to))&&(t.dispatch({selection:{anchor:o.from,head:o.to},scrollIntoView:!0}),!0)},x=[{key:"Mod-Shift-m",run:openLintPanel},{key:"F8",run:nextDiagnostic}],C=o.ViewPlugin.fromClass(class{constructor(t){this.view=t,this.timeout=-1,this.set=!0;let{delay:n}=t.state.facet(_);this.lintTime=Date.now()+n,this.run=this.run.bind(this),this.timeout=setTimeout(this.run,n)}run(){let t=Date.now();if(tPromise.resolve(t(this.view)))).then(n=>{let i=n.reduce((t,n)=>t.concat(n));this.view.state.doc==t.doc&&this.view.dispatch(setDiagnostics(this.view.state,i))},t=>{o.logException(this.view.state,t)})}}update(t){let n=t.state.facet(_);(t.docChanged||n!=t.startState.facet(_))&&(this.lintTime=Date.now()+n.delay,this.set||(this.set=!0,this.timeout=setTimeout(this.run,n.delay)))}force(){this.set&&(this.lintTime=Date.now(),this.run())}destroy(){clearTimeout(this.timeout)}}),_=c.Facet.define({combine:t=>({sources:t.map(t=>t.source),delay:t.length?Math.max(...t.map(t=>t.delay)):750}),enables:C});function assignKeys(t){let n=[];if(t)e:for(let{name:i}of t){for(let t=0;tt.toLowerCase()==o.toLowerCase())){n.push(o);continue e}}n.push("")}return n}function renderDiagnostic(t,n,i){var o;let c=i?assignKeys(n.actions):[];return g.default("li",{class:"cm-diagnostic cm-diagnostic-"+n.severity},g.default("span",{class:"cm-diagnosticText"},n.message),null===(o=n.actions)||void 0===o?void 0:o.map((i,o)=>{let click=o=>{o.preventDefault();let c=findDiagnostic(t.state.field(b).diagnostics,n);c&&i.apply(t,c.from,c.to)},{name:u}=i,h=c[o]?u.indexOf(c[o]):-1,f=h<0?u:[u.slice(0,h),g.default("u",u.slice(h,h+1)),u.slice(h+1)];return g.default("button",{type:"button",class:"cm-diagnosticAction",onclick:click,onmousedown:click,"aria-label":` Action: ${u}${h<0?"":` (access key "${c[o]})"`}.`},f)}),n.source&&g.default("div",{class:"cm-diagnosticSource"},n.source))}let DiagnosticWidget=class DiagnosticWidget extends o.WidgetType{constructor(t){super(),this.diagnostic=t}eq(t){return t.diagnostic==this.diagnostic}toDOM(){return g.default("span",{class:"cm-lintPoint cm-lintPoint-"+this.diagnostic.severity})}};let PanelItem=class PanelItem{constructor(t,n){this.diagnostic=n,this.id="item_"+Math.floor(4294967295*Math.random()).toString(16),this.dom=renderDiagnostic(t,n,!0),this.dom.id=this.id,this.dom.setAttribute("role","option")}};let LintPanel=class LintPanel{constructor(t){this.view=t,this.items=[],this.list=g.default("ul",{tabIndex:0,role:"listbox","aria-label":this.view.state.phrase("Diagnostics"),onkeydown:n=>{if(27==n.keyCode)closeLintPanel(this.view),this.view.focus();else if(38==n.keyCode||33==n.keyCode)this.moveSelection((this.selectedIndex-1+this.items.length)%this.items.length);else if(40==n.keyCode||34==n.keyCode)this.moveSelection((this.selectedIndex+1)%this.items.length);else if(36==n.keyCode)this.moveSelection(0);else if(35==n.keyCode)this.moveSelection(this.items.length-1);else if(13==n.keyCode)this.view.focus();else{if(!(n.keyCode>=65)||!(n.keyCode<=90)||!(this.selectedIndex>=0))return;let{diagnostic:i}=this.items[this.selectedIndex],o=assignKeys(i.actions);for(let c=0;c{for(let n=0;ncloseLintPanel(this.view)},"\xd7")),this.update()}get selectedIndex(){let t=this.view.state.field(b).selected;if(!t)return -1;for(let n=0;n{let f=-1,d;for(let t=i;ti&&(this.items.splice(i,f-i),o=!0)),n&&d.diagnostic==n.diagnostic?d.dom.hasAttribute("aria-selected")||(d.dom.setAttribute("aria-selected","true"),c=d):d.dom.hasAttribute("aria-selected")&&d.dom.removeAttribute("aria-selected"),i++});i({sel:c.dom.getBoundingClientRect(),panel:this.list.getBoundingClientRect()}),write:({sel:t,panel:n})=>{t.topn.bottom&&(this.list.scrollTop+=t.bottom-n.bottom)}})):this.selectedIndex<0&&this.list.removeAttribute("aria-activedescendant"),o&&this.sync()}sync(){let t=this.list.firstChild;function rm(){let n=t;t=n.nextSibling,n.remove()}for(let n of this.items)if(n.dom.parentNode==this.list){for(;t!=n.dom;)rm();t=n.dom.nextSibling}else this.list.insertBefore(n.dom,t);for(;t;)rm()}moveSelection(t){if(this.selectedIndex<0)return;let n=findDiagnostic(this.view.state.field(b).diagnostics,this.items[t].diagnostic);n&&this.view.dispatch({selection:{anchor:n.from,head:n.to},scrollIntoView:!0,effects:w.of(n)})}static open(t){return new LintPanel(t)}};function svg(t,n='viewBox="0 0 40 40"'){return`url('data:image/svg+xml,${encodeURIComponent(t)}')`}function underline(t){return svg(``,'width="6" height="3"')}let E=o.EditorView.baseTheme({".cm-diagnostic":{padding:"3px 6px 3px 8px",marginLeft:"-1px",display:"block",whiteSpace:"pre-wrap"},".cm-diagnostic-error":{borderLeft:"5px solid #d11"},".cm-diagnostic-warning":{borderLeft:"5px solid orange"},".cm-diagnostic-info":{borderLeft:"5px solid #999"},".cm-diagnosticAction":{font:"inherit",border:"none",padding:"2px 4px",backgroundColor:"#444",color:"white",borderRadius:"3px",marginLeft:"8px"},".cm-diagnosticSource":{fontSize:"70%",opacity:.7},".cm-lintRange":{backgroundPosition:"left bottom",backgroundRepeat:"repeat-x",paddingBottom:"0.7px"},".cm-lintRange-error":{backgroundImage:underline("#d11")},".cm-lintRange-warning":{backgroundImage:underline("orange")},".cm-lintRange-info":{backgroundImage:underline("#999")},".cm-lintRange-active":{backgroundColor:"#ffdd9980"},".cm-tooltip-lint":{padding:0,margin:0},".cm-lintPoint":{position:"relative","&:after":{content:'""',position:"absolute",bottom:0,left:"-2px",borderLeft:"3px solid transparent",borderRight:"3px solid transparent",borderBottom:"4px solid #d11"}},".cm-lintPoint-warning":{"&:after":{borderBottomColor:"orange"}},".cm-lintPoint-info":{"&:after":{borderBottomColor:"#999"}},".cm-panel.cm-panel-lint":{position:"relative","& ul":{maxHeight:"100px",overflowY:"auto","& [aria-selected]":{backgroundColor:"#ddd","& u":{textDecoration:"underline"}},"&:focus [aria-selected]":{background_fallback:"#bdf",backgroundColor:"Highlight",color_fallback:"white",color:"HighlightText"},"& u":{textDecoration:"none"},padding:0,margin:0},"& [name=close]":{position:"absolute",top:"0",right:"2px",background:"inherit",border:"none",font:"inherit",padding:0,margin:0}}});let LintGutterMarker=class LintGutterMarker extends f.GutterMarker{constructor(t){super(),this.diagnostics=t,this.severity=t.reduce((t,n)=>{let i=n.severity;return"error"==i||"warning"==i&&"info"==t?i:t},"info")}toDOM(t){let n=document.createElement("div");return n.className="cm-lint-marker cm-lint-marker-"+this.severity,n.onmouseover=()=>(function(t,n,i){function hovered(){let o,c=t.elementAtHeight(n.getBoundingClientRect().top+5-t.documentTop),u=t.coordsAtPos(c.from);u&&t.dispatch({effects:L.of({pos:c.from,above:!1,create:()=>({dom:diagnosticsTooltip(t,i),getCoords:()=>n.getBoundingClientRect()})})}),n.onmouseout=n.onmousemove=null,o=i=>{let c=n.getBoundingClientRect();if(!(i.clientX>c.left-10)||!(i.clientXc.top-10)||!(i.clientY{clearTimeout(c),n.onmouseout=n.onmousemove=null},n.onmousemove=()=>{clearTimeout(c),c=setTimeout(hovered,o)}})(t,n,this.diagnostics),n}};let T=f.gutter({class:"cm-gutter-lint",markers:t=>t.state.field(P)}),P=c.StateField.define({create:()=>d.RangeSet.empty,update(t,n){for(let i of(t=t.map(n.changes),n.effects))i.is(v)&&(t=function(t,n){let i=Object.create(null);for(let o of n){let n=t.lineAt(o.from);(i[n.from]||(i[n.from]=[])).push(o)}let o=[];for(let t in i)o.push(new LintGutterMarker(i[t]).range(+t));return d.RangeSet.of(o,!0)}(n.state.doc,i.value));return t}}),L=c.StateEffect.define(),I=c.StateField.define({create:()=>null,update:(t,n)=>(t&&n.docChanged&&(t=Object.assign(Object.assign({},t),{pos:n.changes.mapPos(t.pos)})),n.effects.reduce((t,n)=>n.is(L)?n.value:t,t)),provide:t=>u.showTooltip.from(t)}),O=o.EditorView.baseTheme({".cm-gutter-lint":{width:"1.4em","& .cm-gutterElement":{padding:".2em"}},".cm-lint-marker":{width:"1em",height:"1em"},".cm-lint-marker-info":{content:svg('')},".cm-lint-marker-warning":{content:svg('')},".cm-lint-marker-error:before":{content:svg('')}}),N=c.Facet.define({combine:t=>c.combineConfig(t,{hoverTime:300})});n.closeLintPanel=closeLintPanel,n.diagnosticCount=function(t){let n=t.field(b,!1);return n?n.diagnostics.size:0},n.forceLinting=function(t){let n=t.plugin(C);n&&n.force()},n.lintGutter=function(t={}){return[N.of(t),P,T,O,I]},n.lintKeymap=x,n.linter=function(t,n={}){var i;return _.of({source:t,delay:null!==(i=n.delay)&&void 0!==i?i:750})},n.nextDiagnostic=nextDiagnostic,n.openLintPanel=openLintPanel,n.setDiagnostics=setDiagnostics,n.setDiagnosticsEffect=v},8162:function(t,n,i){"use strict";Object.defineProperty(n,"__esModule",{value:!0});var o=i(4350),c=i(2382),u=i(1135),h=i(6393);let f=u.EditorView.baseTheme({"&.cm-focused .cm-matchingBracket":{backgroundColor:"#328c8252"},"&.cm-focused .cm-nonmatchingBracket":{backgroundColor:"#bb555544"}}),d="()[]{}",m=o.Facet.define({combine:t=>o.combineConfig(t,{afterCursor:!0,brackets:d,maxScanDistance:1e4})}),g=u.Decoration.mark({class:"cm-matchingBracket"}),v=u.Decoration.mark({class:"cm-nonmatchingBracket"}),y=o.StateField.define({create:()=>u.Decoration.none,update(t,n){if(!n.docChanged&&!n.selection)return t;let i=[],o=n.state.facet(m);for(let t of n.state.selection.ranges){if(!t.empty)continue;let c=matchBrackets(n.state,t.head,-1,o)||t.head>0&&matchBrackets(n.state,t.head-1,1,o)||o.afterCursor&&(matchBrackets(n.state,t.head,1,o)||t.headu.EditorView.decorations.from(t)}),w=[y,f];function matchingNodes(t,n,i){let o=t.prop(n<0?h.NodeProp.openedBy:h.NodeProp.closedBy);if(o)return o;if(1==t.name.length){let o=i.indexOf(t.name);if(o>-1&&o%2==(n<0?1:0))return[i[o+n]]}return null}function matchBrackets(t,n,i,o={}){let u=o.maxScanDistance||1e4,h=o.brackets||d,f=c.syntaxTree(t),m=f.resolveInner(n,i);for(let t=m;t;t=t.parent){let n=matchingNodes(t.type,i,h);if(n&&t.from=o.to){if(0==d&&c.indexOf(m.type.name)>-1&&m.from0)return null;let m={from:i<0?n-1:n,to:i>0?n+1:n},g=t.doc.iterRange(n,i>0?t.doc.length:0),v=0;for(let t=0;!g.next().done&&t<=u;){let u=g.value;i<0&&(t+=u.length);let f=n+t*i;for(let t=i>0?0:u.length-1,n=i>0?u.length:-1;t!=n;t+=i){let n=h.indexOf(u[t]);if(!(n<0)&&o.resolve(f+t,1).type==c){if(n%2==0==i>0)v++;else{if(1==v)return{start:m,end:{from:f+t,to:f+t+1},matched:n>>1==d>>1};v--}}}i>0&&(t+=u.length)}return g.done?{start:m,matched:!1}:null}(t,n,i,f,m.type,u,h)}n.bracketMatching=function(t={}){return[m.of(t),w]},n.matchBrackets=matchBrackets},2300:function(t,n,i){"use strict";Object.defineProperty(n,"__esModule",{value:!0});var o=i(1135),c=i(4350);let u=c.Facet.define({combine(t){let n,i;for(let o of t)n=n||o.topContainer,i=i||o.bottomContainer;return{topContainer:n,bottomContainer:i}}}),h=o.ViewPlugin.fromClass(class{constructor(t){this.input=t.state.facet(d),this.specs=this.input.filter(t=>t),this.panels=this.specs.map(n=>n(t));let n=t.state.facet(u);for(let i of(this.top=new PanelGroup(t,!0,n.topContainer),this.bottom=new PanelGroup(t,!1,n.bottomContainer),this.top.sync(this.panels.filter(t=>t.top)),this.bottom.sync(this.panels.filter(t=>!t.top)),this.panels))i.dom.classList.add("cm-panel"),i.mount&&i.mount()}update(t){let n=t.state.facet(u);this.top.container!=n.topContainer&&(this.top.sync([]),this.top=new PanelGroup(t.view,!0,n.topContainer)),this.bottom.container!=n.bottomContainer&&(this.bottom.sync([]),this.bottom=new PanelGroup(t.view,!1,n.bottomContainer)),this.top.syncClasses(),this.bottom.syncClasses();let i=t.state.facet(d);if(i!=this.input){let n=i.filter(t=>t),o=[],c=[],u=[],h=[];for(let i of n){let n=this.specs.indexOf(i),f;n<0?(f=i(t.view),h.push(f)):(f=this.panels[n]).update&&f.update(t),o.push(f),(f.top?c:u).push(f)}for(let t of(this.specs=n,this.panels=o,this.top.sync(c),this.bottom.sync(u),h))t.dom.classList.add("cm-panel"),t.mount&&t.mount()}else for(let n of this.panels)n.update&&n.update(t)}destroy(){this.top.sync([]),this.bottom.sync([])}},{provide:o.PluginField.scrollMargins.from(t=>({top:t.top.scrollMargin(),bottom:t.bottom.scrollMargin()}))});let PanelGroup=class PanelGroup{constructor(t,n,i){this.view=t,this.top=n,this.container=i,this.dom=void 0,this.classes="",this.panels=[],this.syncClasses()}sync(t){for(let n of this.panels)n.destroy&&0>t.indexOf(n)&&n.destroy();this.panels=t,this.syncDOM()}syncDOM(){if(0==this.panels.length){this.dom&&(this.dom.remove(),this.dom=void 0);return}if(!this.dom){this.dom=document.createElement("div"),this.dom.className=this.top?"cm-panels cm-panels-top":"cm-panels cm-panels-bottom",this.dom.style[this.top?"top":"bottom"]="0";let t=this.container||this.view.dom;t.insertBefore(this.dom,this.top?t.firstChild:null)}let t=this.dom.firstChild;for(let n of this.panels)if(n.dom.parentNode==this.dom){for(;t!=n.dom;)t=rm(t);t=t.nextSibling}else this.dom.insertBefore(n.dom,t);for(;t;)t=rm(t)}scrollMargin(){return!this.dom||this.container?0:Math.max(0,this.top?this.dom.getBoundingClientRect().bottom-Math.max(0,this.view.scrollDOM.getBoundingClientRect().top):Math.min(innerHeight,this.view.scrollDOM.getBoundingClientRect().bottom)-this.dom.getBoundingClientRect().top)}syncClasses(){if(this.container&&this.classes!=this.view.themeClasses){for(let t of this.classes.split(" "))t&&this.container.classList.remove(t);for(let t of(this.classes=this.view.themeClasses).split(" "))t&&this.container.classList.add(t)}}};function rm(t){let n=t.nextSibling;return t.remove(),n}let f=o.EditorView.baseTheme({".cm-panels":{boxSizing:"border-box",position:"sticky",left:0,right:0},"&light .cm-panels":{backgroundColor:"#f5f5f5",color:"black"},"&light .cm-panels-top":{borderBottom:"1px solid #ddd"},"&light .cm-panels-bottom":{borderTop:"1px solid #ddd"},"&dark .cm-panels":{backgroundColor:"#333338",color:"white"}}),d=c.Facet.define({enables:[h,f]});n.getPanel=function(t,n){let i=t.plugin(h),o=i?i.specs.indexOf(n):-1;return o>-1?i.panels[o]:null},n.panels=function(t){return t?[u.of(t)]:[]},n.showPanel=d},7495:function(t,n,i){"use strict";Object.defineProperty(n,"__esModule",{value:!0});var o=i(4350);let RangeValue=class RangeValue{eq(t){return this==t}range(t,n=t){return new Range(t,n,this)}};RangeValue.prototype.startSide=RangeValue.prototype.endSide=0,RangeValue.prototype.point=!1,RangeValue.prototype.mapMode=o.MapMode.TrackDel;let Range=class Range{constructor(t,n,i){this.from=t,this.to=n,this.value=i}};function cmpRange(t,n){return t.from-n.from||t.value.startSide-n.value.startSide}let Chunk=class Chunk{constructor(t,n,i,o){this.from=t,this.to=n,this.value=i,this.maxPoint=o}get length(){return this.to[this.to.length-1]}findIndex(t,n,i,o=0){let c=i?this.to:this.from;for(let u=o,h=c.length;;){if(u==h)return u;let o=u+h>>1,f=c[o]-t||(i?this.value[o].endSide:this.value[o].startSide)-n;if(o==u)return f>=0?u:h;f>=0?h=o:u=o+1}}between(t,n,i,o){for(let c=this.findIndex(n,-1e9,!0),u=this.findIndex(i,1e9,!1,c);c(y=n.mapPos(g,d.endSide))||v==y&&d.startSide>0&&d.endSide<=0)continue;0>(y-v||d.endSide-d.startSide)||(u<0&&(u=v),d.point&&(h=Math.max(h,y-v)),i.push(d),o.push(v-u),c.push(y-u))}return{mapped:i.length?new Chunk(o,c,i,h):null,pos:u}}};let RangeSet=class RangeSet{constructor(t,n,i=RangeSet.empty,o){this.chunkPos=t,this.chunk=n,this.nextLayer=i,this.maxPoint=o}get length(){let t=this.chunk.length-1;return t<0?0:Math.max(this.chunkEnd(t),this.nextLayer.length)}get size(){if(this.isEmpty)return 0;let t=this.nextLayer.size;for(let n of this.chunk)t+=n.value.length;return t}chunkEnd(t){return this.chunkPos[t]+this.chunk[t].length}update(t){let{add:n=[],sort:i=!1,filterFrom:o=0,filterTo:c=this.length}=t,u=t.filter;if(0==n.length&&!u)return this;if(i&&(n=n.slice().sort(cmpRange)),this.isEmpty)return n.length?RangeSet.of(n):this;let h=new LayerCursor(this,null,-1).goto(0),f=0,d=[],m=new RangeSetBuilder;for(;h.value||f=0){let t=n[f++];m.addInner(t.from,t.to,t.value)||d.push(t)}else 1==h.rangeIndex&&h.chunkIndexthis.chunkEnd(h.chunkIndex)||ch.to||c=c&&t<=c+u.length&&!1===u.between(c,t-c,n-c,i))return}this.nextLayer.between(t,n,i)}}iter(t=0){return HeapCursor.from([this]).goto(t)}get isEmpty(){return this.nextLayer==this}static iter(t,n=0){return HeapCursor.from(t).goto(n)}static compare(t,n,i,o,c=-1){let u=t.filter(t=>t.maxPoint>0||!t.isEmpty&&t.maxPoint>=c),h=n.filter(t=>t.maxPoint>0||!t.isEmpty&&t.maxPoint>=c),f=findSharedChunks(u,h,i),d=new SpanCursor(u,f,c),m=new SpanCursor(h,f,c);i.iterGaps((t,n,i)=>compare(d,t,m,n,i,o)),i.empty&&0==i.length&&compare(d,0,m,0,0,o)}static eq(t,n,i=0,o){null==o&&(o=1e9);let c=t.filter(t=>!t.isEmpty&&0>n.indexOf(t)),u=n.filter(n=>!n.isEmpty&&0>t.indexOf(n));if(c.length!=u.length)return!1;if(!c.length)return!0;let h=findSharedChunks(c,u),f=new SpanCursor(c,h,0).goto(i),d=new SpanCursor(u,h,0).goto(i);for(;;){if(f.to!=d.to||!sameValues(f.active,d.active)||f.point&&(!d.point||!f.point.eq(d.point)))return!1;if(f.to>o)return!0;f.next(),d.next()}}static spans(t,n,i,o,c=-1){var u;let h=new SpanCursor(t,null,c,null===(u=o.filterPoint)||void 0===u?void 0:u.bind(o)).goto(n),f=n,d=h.openStart;for(;;){let t=Math.min(h.to,i);if(h.point?(o.point(f,t,h.point,h.activeForPoint(h.to),d),d=h.openEnd(t)+(h.to>t?1:0)):t>f&&(o.span(f,t,h.active,d),d=h.openEnd(t)),h.to>i)break;f=h.to,h.next()}return d}static of(t,n=!1){let i=new RangeSetBuilder;for(let o of t instanceof Range?[t]:n?function(t){if(t.length>1)for(let n=t[0],i=1;i0)return t.slice().sort(cmpRange);n=o}return t}(t):t)i.add(o.from,o.to,o.value);return i.finish()}};RangeSet.empty=new RangeSet([],[],null,-1),RangeSet.empty.nextLayer=RangeSet.empty;let RangeSetBuilder=class RangeSetBuilder{constructor(){this.chunks=[],this.chunkPos=[],this.chunkStart=-1,this.last=null,this.lastFrom=-1e9,this.lastTo=-1e9,this.from=[],this.to=[],this.value=[],this.maxPoint=-1,this.setMaxPoint=-1,this.nextLayer=null}finishChunk(t){this.chunks.push(new Chunk(this.from,this.to,this.value,this.maxPoint)),this.chunkPos.push(this.chunkStart),this.chunkStart=-1,this.setMaxPoint=Math.max(this.setMaxPoint,this.maxPoint),this.maxPoint=-1,t&&(this.from=[],this.to=[],this.value=[])}add(t,n,i){this.addInner(t,n,i)||(this.nextLayer||(this.nextLayer=new RangeSetBuilder)).add(t,n,i)}addInner(t,n,i){let o=t-this.lastTo||i.startSide-this.last.endSide;if(o<=0&&0>(t-this.lastFrom||i.startSide-this.last.startSide))throw Error("Ranges must be added sorted by `from` position and `startSide`");return!(o<0)&&(250==this.from.length&&this.finishChunk(!0),this.chunkStart<0&&(this.chunkStart=t),this.from.push(t-this.chunkStart),this.to.push(n-this.chunkStart),this.last=i,this.lastFrom=t,this.lastTo=n,this.value.push(i),i.point&&(this.maxPoint=Math.max(this.maxPoint,n-t)),!0)}addChunk(t,n){if(0>(t-this.lastTo||n.value[0].startSide-this.last.endSide))return!1;this.from.length&&this.finishChunk(!0),this.setMaxPoint=Math.max(this.setMaxPoint,n.maxPoint),this.chunks.push(n),this.chunkPos.push(t);let i=n.value.length-1;return this.last=n.value[i],this.lastFrom=n.from[i]+t,this.lastTo=n.to[i]+t,!0}finish(){return this.finishInner(RangeSet.empty)}finishInner(t){if(this.from.length&&this.finishChunk(!1),0==this.chunks.length)return t;let n=new RangeSet(this.chunkPos,this.chunks,this.nextLayer?this.nextLayer.finishInner(t):t,this.setMaxPoint);return this.from=null,n}};function findSharedChunks(t,n,i){let o=new Map;for(let n of t)for(let t=0;t(this.to-t||this.endSide-n)&&this.gotoInner(t,n,!0)}next(){for(;;){if(this.chunkIndex==this.layer.chunk.length){this.from=this.to=1e9,this.value=null;break}{let t=this.layer.chunkPos[this.chunkIndex],n=this.layer.chunk[this.chunkIndex],i=t+n.from[this.rangeIndex];if(this.from=i,this.to=t+n.to[this.rangeIndex],this.value=n.value[this.rangeIndex],this.setRangeIndex(this.rangeIndex+1),this.minPoint<0||this.value.point&&this.to-this.from>=this.minPoint)break}}}setRangeIndex(t){if(t==this.layer.chunk[this.chunkIndex].value.length){if(this.chunkIndex++,this.skip)for(;this.chunkIndex=i&&o.push(new LayerCursor(u,n,i,c));return 1==o.length?o[0]:new HeapCursor(o)}get startSide(){return this.value?this.value.startSide:0}goto(t,n=-1e9){for(let i of this.heap)i.goto(t,n);for(let t=this.heap.length>>1;t>=0;t--)heapBubble(this.heap,t);return this.next(),this}forward(t,n){for(let i of this.heap)i.forward(t,n);for(let t=this.heap.length>>1;t>=0;t--)heapBubble(this.heap,t);0>(this.to-t||this.value.endSide-n)&&this.next()}next(){if(0==this.heap.length)this.from=this.to=1e9,this.value=null,this.rank=-1;else{let t=this.heap[0];this.from=t.from,this.to=t.to,this.value=t.value,this.rank=t.rank,t.value&&t.next(),heapBubble(this.heap,0)}}};function heapBubble(t,n){for(let i=t[n];;){let o=(n<<1)+1;if(o>=t.length)break;let c=t[o];if(o+1=0&&(c=t[o+1],o++),0>i.compare(c))break;t[o]=i,t[n]=c,n=o}}let SpanCursor=class SpanCursor{constructor(t,n,i,o=()=>!0){this.minPoint=i,this.filterPoint=o,this.active=[],this.activeTo=[],this.activeRank=[],this.minActive=-1,this.point=null,this.pointFrom=0,this.pointRank=0,this.to=-1e9,this.endSide=0,this.openStart=-1,this.cursor=HeapCursor.from(t,n,i)}goto(t,n=-1e9){return this.cursor.goto(t,n),this.active.length=this.activeTo.length=this.activeRank.length=0,this.minActive=-1,this.to=t,this.endSide=n,this.openStart=-1,this.next(),this}forward(t,n){for(;this.minActive>-1&&0>(this.activeTo[this.minActive]-t||this.active[this.minActive].endSide-n);)this.removeActive(this.minActive);this.cursor.forward(t,n)}removeActive(t){remove(this.active,t),remove(this.activeTo,t),remove(this.activeRank,t),this.minActive=findMinIndex(this.active,this.activeTo)}addActive(t){let n=0,{value:i,to:o,rank:c}=this.cursor;for(;n-1&&0>(this.activeTo[c]-this.cursor.from||this.active[c].endSide-this.cursor.startSide)){if(this.activeTo[c]>t){this.to=this.activeTo[c],this.endSide=this.active[c].endSide;break}this.removeActive(c),i&&remove(i,c)}else if(this.cursor.value){if(this.cursor.from>t){this.to=this.cursor.from,this.endSide=this.cursor.startSide;break}{let c=this.cursor.value;if(c.point){if(n&&this.cursor.to==this.to&&this.cursor.from=0&&!(this.activeRank[i]t||this.activeTo[i]==t&&this.active[i].endSide>=this.point.endSide)&&n.push(this.active[i]);return n.reverse()}openEnd(t){let n=0;for(let i=this.activeTo.length-1;i>=0&&this.activeTo[i]>t;i--)n++;return n}};function compare(t,n,i,o,c,u){t.goto(n),i.goto(o);let h=o+c,f=o,d=o-n;for(;;){let n=t.to+d-i.to||t.endSide-i.endSide,o=n<0?t.to+d:i.to,c=Math.min(o,h);if(t.point||i.point?t.point&&i.point&&(t.point==i.point||t.point.eq(i.point))&&sameValues(t.activeForPoint(t.to+d),i.activeForPoint(i.to))||u.comparePoint(f,c,t.point,i.point):c>f&&!sameValues(t.active,i.active)&&u.compareRange(f,c,t.active,i.active),o>h)break;f=o,n<=0&&t.next(),n>=0&&i.next()}}function sameValues(t,n){if(t.length!=n.length)return!1;for(let i=0;i=n;i--)t[i+1]=t[i];t[n]=i}function findMinIndex(t,n){let i=-1,o=1e9;for(let c=0;c(n[c]-o||t[c].endSide-t[i].endSide)&&(i=c,o=n[c]);return i}n.Range=Range,n.RangeSet=RangeSet,n.RangeSetBuilder=RangeSetBuilder,n.RangeValue=RangeValue},5247:function(t,n,i){"use strict";Object.defineProperty(n,"__esModule",{value:!0});var o=i(4350),c=i(1135),u=i(5627);function getPos(t,n){var i;let o,c=t.posAtCoords({x:n.clientX,y:n.clientY},!1),h=t.state.doc.lineAt(c),f=c-h.from,d=f>2e3?-1:f==h.length?(i=n.clientX,(o=t.coordsAtPos(t.viewport.from))?Math.round(Math.abs((o.left-i)/t.defaultCharacterWidth)):-1):u.countColumn(h.text,t.state.tabSize,c-h.from);return{line:h.number,col:d,off:f}}let h={Alt:[18,t=>t.altKey],Control:[17,t=>t.ctrlKey],Shift:[16,t=>t.shiftKey],Meta:[91,t=>t.metaKey]},f={style:"cursor: crosshair"};n.crosshairCursor=function(t={}){let[n,i]=h[t.key||"Alt"],o=c.ViewPlugin.fromClass(class{constructor(t){this.view=t,this.isDown=!1}set(t){this.isDown!=t&&(this.isDown=t,this.view.update([]))}},{eventHandlers:{keydown(t){this.set(t.keyCode==n||i(t))},keyup(t){t.keyCode!=n&&i(t)||this.set(!1)}}});return[o,c.EditorView.contentAttributes.of(t=>{var n;return(null===(n=t.plugin(o))||void 0===n?void 0:n.isDown)?f:null})]},n.rectangularSelection=function(t){let n=(null==t?void 0:t.eventFilter)||(t=>t.altKey&&0==t.button);return c.EditorView.mouseSelectionStyle.of((t,i)=>{let c,h;return n(i)?(c=getPos(t,i),h=t.state.selection,c?{update(t){if(t.docChanged){let n=t.changes.mapPos(t.startState.doc.line(c.line).from),i=t.state.doc.lineAt(n);c={line:i.number,col:c.col,off:Math.min(c.off,i.length)},h=h.map(t.changes)}},get(n,i,f){let d=getPos(t,n);if(!d)return h;let m=function(t,n,i){let c=Math.min(n.line,i.line),h=Math.max(n.line,i.line),f=[];if(n.off>2e3||i.off>2e3||n.col<0||i.col<0){let u=Math.min(n.off,i.off),d=Math.max(n.off,i.off);for(let n=c;n<=h;n++){let i=t.doc.line(n);i.length<=d&&f.push(o.EditorSelection.range(i.from+u,i.to+d))}}else{let d=Math.min(n.col,i.col),m=Math.max(n.col,i.col);for(let n=c;n<=h;n++){let i=t.doc.line(n),c=u.findColumn(i.text,d,t.tabSize,!0);if(c>-1){let n=u.findColumn(i.text,m,t.tabSize);f.push(o.EditorSelection.range(i.from+c,i.from+n))}}}return f}(t.state,c,d);return m.length?f?o.EditorSelection.create(m.concat(h.ranges)):o.EditorSelection.create(m):h}}:null):null})}},1411:function(t,n,i){"use strict";Object.defineProperty(n,"__esModule",{value:!0});var o=i(1135),c=i(4350),u=i(2300),h=i(7495),f=i(3842),d=i(5627),m=f&&"object"==typeof f&&"default"in f?f:{default:f};let g="function"==typeof String.prototype.normalize?t=>t.normalize("NFKD"):t=>t;let SearchCursor=class SearchCursor{constructor(t,n,i=0,o=t.length,c){this.value={from:0,to:0},this.done=!1,this.matches=[],this.buffer="",this.bufferPos=0,this.iter=t.iterRange(i,o),this.bufferStart=i,this.normalize=c?t=>c(g(t)):g,this.query=this.normalize(n)}peek(){if(this.bufferPos==this.buffer.length){if(this.bufferStart+=this.buffer.length,this.iter.next(),this.iter.done)return -1;this.bufferPos=0,this.buffer=this.iter.value}return d.codePointAt(this.buffer,this.bufferPos)}next(){for(;this.matches.length;)this.matches.pop();return this.nextOverlapping()}nextOverlapping(){for(;;){let t=this.peek();if(t<0)return this.done=!0,this;let n=d.fromCodePoint(t),i=this.bufferStart+this.bufferPos;this.bufferPos+=d.codePointSize(t);let o=this.normalize(n);for(let t=0,c=i;;t++){let u=o.charCodeAt(t),h=this.match(u,c);if(h)return this.value=h,this;if(t==o.length-1)break;c==i&&tthis.to&&(this.curLine=this.curLine.slice(0,this.to-this.curLineStart)),this.iter.next())}nextLine(){this.curLineStart=this.curLineStart+this.curLine.length+1,this.curLineStart>this.to?this.curLine="":this.getLine(0)}next(){for(let t=this.matchPos-this.curLineStart;;){this.re.lastIndex=t;let n=this.matchPos<=this.to&&this.re.exec(this.curLine);if(n){let i=this.curLineStart+n.index,o=i+n[0].length;if(this.matchPos=o+(i==o?1:0),i==this.curLine.length&&this.nextLine(),ithis.value.to)return this.value={from:i,to:o,match:n},this;t=this.matchPos-this.curLineStart}else{if(!(this.curLineStart+this.curLine.length=i||o.to<=n){let o=new FlattenedDoc(n,t.sliceString(n,i));return w.set(t,o),o}if(o.from==n&&o.to==i)return o;let{text:c,from:u}=o;return u>n&&(c=t.sliceString(n,u)+c,u=n),o.to=this.to?this.to:this.text.lineAt(t).to}next(){for(;;){let t=this.re.lastIndex=this.matchPos-this.flat.from,n=this.re.exec(this.flat.text);if(n&&!n[0]&&n.index==t&&(this.re.lastIndex=t+1,n=this.re.exec(this.flat.text)),n&&this.flat.tothis.flat.text.length-10&&(n=null),n){let t=this.flat.from+n.index,i=t+n[0].length;return this.value={from:t,to:i,match:n},this.matchPos=i+(t==i?1:0),this}if(this.flat.to==this.to)return this.done=!0,this;this.flat=FlattenedDoc.get(this.text,this.flat.from,this.chunkEnd(this.flat.from+2*this.flat.text.length))}}};function createLineDialog(t){let n=m.default("input",{class:"cm-textfield",name:"line"});function go(){let i=/^([+-])?(\d+)?(:\d+)?(%)?$/.exec(n.value);if(!i)return;let{state:o}=t,u=o.doc.lineAt(o.selection.main.head),[,h,f,d,m]=i,g=d?+d.slice(1):0,v=f?+f:u.number;if(f&&m){let t=v/100;h&&(t=t*("-"==h?-1:1)+u.number/o.doc.lines),v=Math.round(o.doc.lines*t)}else f&&h&&(v=v*("-"==h?-1:1)+u.number);let y=o.doc.line(Math.max(1,Math.min(o.doc.lines,v)));t.dispatch({effects:b.of(!1),selection:c.EditorSelection.cursor(y.from+Math.max(0,Math.min(g,y.length))),scrollIntoView:!0}),t.focus()}return{dom:m.default("form",{class:"cm-gotoLine",onkeydown:n=>{27==n.keyCode?(n.preventDefault(),t.dispatch({effects:b.of(!1)}),t.focus()):13==n.keyCode&&(n.preventDefault(),go())},onsubmit:t=>{t.preventDefault(),go()}},m.default("label",t.state.phrase("Go to line"),": ",n)," ",m.default("button",{class:"cm-button",type:"submit"},t.state.phrase("go"))),pos:-10}}"undefined"!=typeof Symbol&&(RegExpCursor.prototype[Symbol.iterator]=MultilineRegExpCursor.prototype[Symbol.iterator]=function(){return this});let b=c.StateEffect.define(),S=c.StateField.define({create:()=>!0,update(t,n){for(let i of n.effects)i.is(b)&&(t=i.value);return t},provide:t=>u.showPanel.from(t,t=>t?createLineDialog:null)}),gotoLine=t=>{let n=u.getPanel(t,createLineDialog);if(!n){let i=[b.of(!0)];null==t.state.field(S,!1)&&i.push(c.StateEffect.appendConfig.of([S,x])),t.dispatch({effects:i}),n=u.getPanel(t,createLineDialog)}return n&&n.dom.querySelector("input").focus(),!0},x=o.EditorView.baseTheme({".cm-panel.cm-gotoLine":{padding:"2px 6px 4px","& label":{fontSize:"80%"}}}),C={highlightWordAroundCursor:!1,minSelectionLength:1,maxMatches:100,wholeWords:!0},_=c.Facet.define({combine:t=>c.combineConfig(t,C,{highlightWordAroundCursor:(t,n)=>t||n,minSelectionLength:Math.min,maxMatches:Math.min})}),E=o.Decoration.mark({class:"cm-selectionMatch"}),T=o.Decoration.mark({class:"cm-selectionMatch cm-selectionMatch-main"});function insideWordBoundaries(t,n,i,o){return(0==i||t(n.sliceDoc(i-1,i))!=c.CharCategory.Word)&&(o==n.doc.length||t(n.sliceDoc(o,o+1))!=c.CharCategory.Word)}let P=o.ViewPlugin.fromClass(class{constructor(t){this.decorations=this.getDeco(t)}update(t){(t.selectionSet||t.docChanged||t.viewportChanged)&&(this.decorations=this.getDeco(t.view))}getDeco(t){let n=t.state.facet(_),{state:i}=t,u=i.selection;if(u.ranges.length>1)return o.Decoration.none;let h=u.main,f,d=null;if(h.empty){if(!n.highlightWordAroundCursor)return o.Decoration.none;let t=i.wordAt(h.head);if(!t)return o.Decoration.none;d=i.charCategorizer(h.head),f=i.sliceDoc(t.from,t.to)}else{let t=h.to-h.from;if(t200)return o.Decoration.none;if(n.wholeWords){var m,g,v;if(f=i.sliceDoc(h.from,h.to),!(insideWordBoundaries(d=i.charCategorizer(h.head),i,h.from,h.to)&&(m=d,g=h.from,v=h.to,m(i.sliceDoc(g,g+1))==c.CharCategory.Word&&m(i.sliceDoc(v-1,v))==c.CharCategory.Word)))return o.Decoration.none}else if(!(f=i.sliceDoc(h.from,h.to).trim()))return o.Decoration.none}let y=[];for(let c of t.visibleRanges){let t=new SearchCursor(i.doc,f,c.from,c.to);for(;!t.next().done;){let{from:c,to:u}=t.value;if((!d||insideWordBoundaries(d,i,c,u))&&(h.empty&&c<=h.from&&u>=h.to?y.push(T.range(c,u)):(c>=h.to||u<=h.from)&&y.push(E.range(c,u)),y.length>n.maxMatches))return o.Decoration.none}}return o.Decoration.set(y)}},{decorations:t=>t.decorations}),L=o.EditorView.baseTheme({".cm-selectionMatch":{backgroundColor:"#99ff7780"},".cm-searchMatch .cm-selectionMatch":{backgroundColor:"transparent"}}),selectWord=({state:t,dispatch:n})=>{let{selection:i}=t,o=c.EditorSelection.create(i.ranges.map(n=>t.wordAt(n.head)||c.EditorSelection.cursor(n.head)),i.mainIndex);return!o.eq(i)&&(n(t.update({selection:o})),!0)},selectNextOccurrence=({state:t,dispatch:n})=>{let{ranges:i}=t.selection;if(i.some(t=>t.from===t.to))return selectWord({state:t,dispatch:n});let u=t.sliceDoc(i[0].from,i[0].to);if(t.selection.ranges.some(n=>t.sliceDoc(n.from,n.to)!=u))return!1;let h=function(t,n){let{main:i,ranges:o}=t.selection,c=t.wordAt(i.head),u=c&&c.from==i.from&&c.to==i.to;for(let i=!1,c=new SearchCursor(t.doc,n,o[o.length-1].to);;)if(c.next(),c.done){if(i)return null;c=new SearchCursor(t.doc,n,0,Math.max(0,o[o.length-1].from-1)),i=!0}else{if(i&&o.some(t=>t.from==c.value.from))continue;if(u){let n=t.wordAt(c.value.from);if(!n||n.from!=c.value.from||n.to!=c.value.to)continue}return c.value}}(t,u);return!!h&&(n(t.update({selection:t.selection.addRange(c.EditorSelection.range(h.from,h.to),!1),effects:o.EditorView.scrollIntoView(h.to)})),!0)},I=c.Facet.define({combine(t){var n;return{top:t.reduce((t,n)=>null!=t?t:n.top,void 0)||!1,caseSensitive:t.reduce((t,n)=>null!=t?t:n.caseSensitive||n.matchCase,void 0)||!1,createPanel:(null===(n=t.find(t=>t.createPanel))||void 0===n?void 0:n.createPanel)||(t=>new SearchPanel(t))}}});function search(t){return t?[I.of(t),en]:en}let SearchQuery=class SearchQuery{constructor(t){this.search=t.search,this.caseSensitive=!!t.caseSensitive,this.regexp=!!t.regexp,this.replace=t.replace||"",this.valid=!!this.search&&(!this.regexp||function(t){try{return new RegExp(t,y),!0}catch(t){return!1}}(this.search)),this.unquoted=this.search.replace(/\\([nrt\\])/g,(t,n)=>"n"==n?"\n":"r"==n?"\r":"t"==n?" ":"\\")}eq(t){return this.search==t.search&&this.replace==t.replace&&this.caseSensitive==t.caseSensitive&&this.regexp==t.regexp}create(){return this.regexp?new RegExpQuery(this):new StringQuery(this)}getCursor(t,n=0,i=t.length){return this.regexp?regexpCursor(this,t,n,i):stringCursor(this,t,n,i)}};let QueryType=class QueryType{constructor(t){this.spec=t}};function stringCursor(t,n,i,o){return new SearchCursor(n,t.unquoted,i,o,t.caseSensitive?void 0:t=>t.toLowerCase())}let StringQuery=class StringQuery extends QueryType{constructor(t){super(t)}nextMatch(t,n,i){let o=stringCursor(this.spec,t,i,t.length).nextOverlapping();return o.done&&(o=stringCursor(this.spec,t,0,n).nextOverlapping()),o.done?null:o.value}prevMatchInRange(t,n,i){for(let o=i;;){let i=Math.max(n,o-1e4-this.spec.unquoted.length),c=stringCursor(this.spec,t,i,o),u=null;for(;!c.nextOverlapping().done;)u=c.value;if(u)return u;if(i==n)return null;o-=1e4}}prevMatch(t,n,i){return this.prevMatchInRange(t,0,n)||this.prevMatchInRange(t,i,t.length)}getReplacement(t){return this.spec.replace}matchAll(t,n){let i=stringCursor(this.spec,t,0,t.length),o=[];for(;!i.next().done;){if(o.length>=n)return null;o.push(i.value)}return o}highlight(t,n,i,o){let c=stringCursor(this.spec,t,Math.max(0,n-this.spec.unquoted.length),Math.min(i+this.spec.unquoted.length,t.length));for(;!c.next().done;)o(c.value.from,c.value.to)}};function regexpCursor(t,n,i,o){return new RegExpCursor(n,t.search,t.caseSensitive?void 0:{ignoreCase:!0},i,o)}let RegExpQuery=class RegExpQuery extends QueryType{nextMatch(t,n,i){let o=regexpCursor(this.spec,t,i,t.length).next();return o.done&&(o=regexpCursor(this.spec,t,0,n).next()),o.done?null:o.value}prevMatchInRange(t,n,i){for(let o=1;;o++){let c=Math.max(n,i-1e4*o),u=regexpCursor(this.spec,t,c,i),h=null;for(;!u.next().done;)h=u.value;if(h&&(c==n||h.from>c+10))return h;if(c==n)return null}}prevMatch(t,n,i){return this.prevMatchInRange(t,0,n)||this.prevMatchInRange(t,i,t.length)}getReplacement(t){return this.spec.replace.replace(/\$([$&\d+])/g,(n,i)=>"$"==i?"$":"&"==i?t.match[0]:"0"!=i&&+i=n)return null;o.push(i.value)}return o}highlight(t,n,i,o){let c=regexpCursor(this.spec,t,Math.max(0,n-250),Math.min(i+250,t.length));for(;!c.next().done;)o(c.value.from,c.value.to)}};let O=c.StateEffect.define(),N=c.StateEffect.define(),B=c.StateField.define({create:t=>new SearchState(defaultQuery(t).create(),null),update(t,n){for(let i of n.effects)i.is(O)?t=new SearchState(i.value.create(),t.panel):i.is(N)&&(t=new SearchState(t.query,i.value?createSearchPanel:null));return t},provide:t=>u.showPanel.from(t,t=>t.panel)});let SearchState=class SearchState{constructor(t,n){this.query=t,this.panel=n}};let z=o.Decoration.mark({class:"cm-searchMatch"}),V=o.Decoration.mark({class:"cm-searchMatch cm-searchMatch-selected"}),H=o.ViewPlugin.fromClass(class{constructor(t){this.view=t,this.decorations=this.highlight(t.state.field(B))}update(t){let n=t.state.field(B);(n!=t.startState.field(B)||t.docChanged||t.selectionSet||t.viewportChanged)&&(this.decorations=this.highlight(n))}highlight({query:t,panel:n}){if(!n||!t.spec.valid)return o.Decoration.none;let{view:i}=this,c=new h.RangeSetBuilder;for(let n=0,o=i.visibleRanges,u=o.length;no[n+1].from-500;)f=o[++n].to;t.highlight(i.state.doc,h,f,(t,n)=>{let o=i.state.selection.ranges.some(i=>i.from==t&&i.to==n);c.add(t,n,o?V:z)})}return c.finish()}},{decorations:t=>t.decorations});function searchCommand(t){return n=>{let i=n.state.field(B,!1);return i&&i.query.spec.valid?t(n,i):openSearchPanel(n)}}let U=searchCommand((t,{query:n})=>{let{from:i,to:o}=t.state.selection.main,c=n.nextMatch(t.state.doc,i,o);return!!c&&(c.from!=i||c.to!=o)&&(t.dispatch({selection:{anchor:c.from,head:c.to},scrollIntoView:!0,effects:announceMatch(t,c),userEvent:"select.search"}),!0)}),$=searchCommand((t,{query:n})=>{let{state:i}=t,{from:o,to:c}=i.selection.main,u=n.prevMatch(i.doc,o,c);return!!u&&(t.dispatch({selection:{anchor:u.from,head:u.to},scrollIntoView:!0,effects:announceMatch(t,u),userEvent:"select.search"}),!0)}),q=searchCommand((t,{query:n})=>{let i=n.matchAll(t.state.doc,1e3);return!!i&&!!i.length&&(t.dispatch({selection:c.EditorSelection.create(i.map(t=>c.EditorSelection.range(t.from,t.to))),userEvent:"select.search.matches"}),!0)}),selectSelectionMatches=({state:t,dispatch:n})=>{let i=t.selection;if(i.ranges.length>1||i.main.empty)return!1;let{from:o,to:u}=i.main,h=[],f=0;for(let n=new SearchCursor(t.doc,t.sliceDoc(o,u));!n.next().done;){if(h.length>1e3)return!1;n.value.from==o&&(f=h.length),h.push(c.EditorSelection.range(n.value.from,n.value.to))}return n(t.update({selection:c.EditorSelection.create(h,f),userEvent:"select.search.matches"})),!0},G=searchCommand((t,{query:n})=>{let{state:i}=t,{from:o,to:c}=i.selection.main;if(i.readOnly)return!1;let u=n.nextMatch(i.doc,o,o);if(!u)return!1;let h=[],f,d;if(u.from==o&&u.to==c&&(d=i.toText(n.getReplacement(u)),h.push({from:u.from,to:u.to,insert:d}),u=n.nextMatch(i.doc,u.from,u.to)),u){let t=0==h.length||h[0].from>=u.to?0:u.to-u.from-d.length;f={anchor:u.from-t,head:u.to-t}}return t.dispatch({changes:h,selection:f,scrollIntoView:!!f,effects:u?announceMatch(t,u):void 0,userEvent:"input.replace"}),!0}),Z=searchCommand((t,{query:n})=>{if(t.state.readOnly)return!1;let i=n.matchAll(t.state.doc,1e9).map(t=>{let{from:i,to:o}=t;return{from:i,to:o,insert:n.getReplacement(t)}});return!!i.length&&(t.dispatch({changes:i,userEvent:"input.replace.all"}),!0)});function createSearchPanel(t){return t.state.facet(I).createPanel(t)}function defaultQuery(t,n){var i;let o=t.selection.main,c=o.empty||o.to>o.from+100?"":t.sliceDoc(o.from,o.to),u=null!==(i=null==n?void 0:n.caseSensitive)&&void 0!==i?i:t.facet(I).caseSensitive;return n&&!c?n:new SearchQuery({search:c.replace(/\n/g,"\\n"),caseSensitive:u})}let openSearchPanel=t=>{let n=t.state.field(B,!1);if(n&&n.panel){let i=u.getPanel(t,createSearchPanel);if(!i)return!1;let o=i.dom.querySelector("[name=search]");if(o!=t.root.activeElement){let i=defaultQuery(t.state,n.query.spec);i.valid&&t.dispatch({effects:O.of(i)}),o.focus(),o.select()}}else t.dispatch({effects:[N.of(!0),n?O.of(defaultQuery(t.state,n.query.spec)):c.StateEffect.appendConfig.of(en)]});return!0},closeSearchPanel=t=>{let n=t.state.field(B,!1);if(!n||!n.panel)return!1;let i=u.getPanel(t,createSearchPanel);return i&&i.dom.contains(t.root.activeElement)&&t.focus(),t.dispatch({effects:N.of(!1)}),!0},Y=[{key:"Mod-f",run:openSearchPanel,scope:"editor search-panel"},{key:"F3",run:U,shift:$,scope:"editor search-panel",preventDefault:!0},{key:"Mod-g",run:U,shift:$,scope:"editor search-panel",preventDefault:!0},{key:"Escape",run:closeSearchPanel,scope:"editor search-panel"},{key:"Mod-Shift-l",run:selectSelectionMatches},{key:"Alt-g",run:gotoLine},{key:"Mod-d",run:selectNextOccurrence,preventDefault:!0}];let SearchPanel=class SearchPanel{constructor(t){this.view=t;let n=this.query=t.state.field(B).query.spec;function button(t,n,i){return m.default("button",{class:"cm-button",name:t,onclick:n,type:"button"},i)}this.commit=this.commit.bind(this),this.searchField=m.default("input",{value:n.search,placeholder:phrase(t,"Find"),"aria-label":phrase(t,"Find"),class:"cm-textfield",name:"search",onchange:this.commit,onkeyup:this.commit}),this.replaceField=m.default("input",{value:n.replace,placeholder:phrase(t,"Replace"),"aria-label":phrase(t,"Replace"),class:"cm-textfield",name:"replace",onchange:this.commit,onkeyup:this.commit}),this.caseField=m.default("input",{type:"checkbox",name:"case",checked:n.caseSensitive,onchange:this.commit}),this.reField=m.default("input",{type:"checkbox",name:"re",checked:n.regexp,onchange:this.commit}),this.dom=m.default("div",{onkeydown:t=>this.keydown(t),class:"cm-search"},[this.searchField,button("next",()=>U(t),[phrase(t,"next")]),button("prev",()=>$(t),[phrase(t,"previous")]),button("select",()=>q(t),[phrase(t,"all")]),m.default("label",null,[this.caseField,phrase(t,"match case")]),m.default("label",null,[this.reField,phrase(t,"regexp")]),...t.state.readOnly?[]:[m.default("br"),this.replaceField,button("replace",()=>G(t),[phrase(t,"replace")]),button("replaceAll",()=>Z(t),[phrase(t,"replace all")]),m.default("button",{name:"close",onclick:()=>closeSearchPanel(t),"aria-label":phrase(t,"close"),type:"button"},["\xd7"])]])}commit(){let t=new SearchQuery({search:this.searchField.value,caseSensitive:this.caseField.checked,regexp:this.reField.checked,replace:this.replaceField.value});t.eq(this.query)||(this.query=t,this.view.dispatch({effects:O.of(t)}))}keydown(t){o.runScopeHandlers(this.view,t,"search-panel")?t.preventDefault():13==t.keyCode&&t.target==this.searchField?(t.preventDefault(),(t.shiftKey?$:U)(this.view)):13==t.keyCode&&t.target==this.replaceField&&(t.preventDefault(),G(this.view))}update(t){for(let n of t.transactions)for(let t of n.effects)t.is(O)&&!t.value.eq(this.query)&&this.setQuery(t.value)}setQuery(t){this.query=t,this.searchField.value=t.search,this.replaceField.value=t.replace,this.caseField.checked=t.caseSensitive,this.reField.checked=t.regexp}mount(){this.searchField.select()}get pos(){return 80}get top(){return this.view.state.facet(I).top}};function phrase(t,n){return t.state.phrase(n)}let X=/[\s\.,:;?!]/;function announceMatch(t,{from:n,to:i}){let c=t.state.doc.lineAt(n).from,u=t.state.doc.lineAt(i).to,h=Math.max(c,n-30),f=Math.min(u,i+30),d=t.state.sliceDoc(h,f);if(h!=c){for(let t=0;t<30;t++)if(!X.test(d[t+1])&&X.test(d[t])){d=d.slice(t);break}}if(f!=u){for(let t=d.length-1;t>d.length-30;t--)if(!X.test(d[t-1])&&X.test(d[t])){d=d.slice(0,t);break}}return o.EditorView.announce.of(`${t.state.phrase("current match")}. ${d} ${t.state.phrase("on line")} ${t.state.doc.lineAt(n).number}`)}let J=o.EditorView.baseTheme({".cm-panel.cm-search":{padding:"2px 6px 4px",position:"relative","& [name=close]":{position:"absolute",top:"0",right:"4px",backgroundColor:"inherit",border:"none",font:"inherit",padding:0,margin:0},"& input, & button, & label":{margin:".2em .6em .2em 0"},"& input[type=checkbox]":{marginRight:".2em"},"& label":{fontSize:"80%",whiteSpace:"pre"}},"&light .cm-searchMatch":{backgroundColor:"#ffff0054"},"&dark .cm-searchMatch":{backgroundColor:"#00ffff8a"},"&light .cm-searchMatch-selected":{backgroundColor:"#ff6a0054"},"&dark .cm-searchMatch-selected":{backgroundColor:"#ff00ff8a"}}),en=[B,c.Prec.lowest(H),J];n.RegExpCursor=RegExpCursor,n.SearchCursor=SearchCursor,n.SearchQuery=SearchQuery,n.closeSearchPanel=closeSearchPanel,n.findNext=U,n.findPrevious=$,n.getSearchQuery=function(t){let n=t.field(B,!1);return n?n.query.spec:defaultQuery(t)},n.gotoLine=gotoLine,n.highlightSelectionMatches=function(t){let n=[L,P];return t&&n.push(_.of(t)),n},n.openSearchPanel=openSearchPanel,n.replaceAll=Z,n.replaceNext=G,n.search=search,n.searchConfig=search,n.searchKeymap=Y,n.selectMatches=q,n.selectNextOccurrence=selectNextOccurrence,n.selectSelectionMatches=selectSelectionMatches,n.setSearchQuery=O},4350:function(t,n,i){"use strict";let o;Object.defineProperty(n,"__esModule",{value:!0});var c,u,h=i(5627);let f=/\r\n?|\n/;n.MapMode=void 0,(c=n.MapMode||(n.MapMode={}))[c.Simple=0]="Simple",c[c.TrackDel=1]="TrackDel",c[c.TrackBefore=2]="TrackBefore",c[c.TrackAfter=3]="TrackAfter";let ChangeDesc=class ChangeDesc{constructor(t){this.sections=t}get length(){let t=0;for(let n=0;nt)return u+(t-c);u+=f}else{if(o!=n.MapMode.Simple&&m>=t&&(o==n.MapMode.TrackDel&&ct||o==n.MapMode.TrackBefore&&ct))return null;if(m>t||m==t&&i<0&&!f)return t==c||i<0?u:u+d;u+=d}c=m}if(t>c)throw RangeError(`Position ${t} is out of range for changeset of length ${c}`);return u}touchesRange(t,n=t){for(let i=0,o=0;i=0&&o<=n&&h>=t)return!(on)||"cover";o=h}return!1}toString(){let t="";for(let n=0;n=0?":"+o:"")}return t}toJSON(){return this.sections}static fromJSON(t){if(!Array.isArray(t)||t.length%2||t.some(t=>"number"!=typeof t))throw RangeError("Invalid JSON representation of ChangeDesc");return new ChangeDesc(t)}};let ChangeSet=class ChangeSet extends ChangeDesc{constructor(t,n){super(t),this.inserted=n}apply(t){if(this.length!=t.length)throw RangeError("Applying change set to a document with the wrong length");return iterChanges(this,(n,i,o,c,u)=>t=t.replace(o,o+(i-n),u),!1),t}mapDesc(t,n=!1){return mapSet(this,t,n,!0)}invert(t){let n=this.sections.slice(),i=[];for(let o=0,c=0;o=0){n[o]=f,n[o+1]=u;let d=o>>1;for(;i.length0&&addInsert(i,n,c.text),c.forward(t),h+=t}let d=t[u++];for(;h>1].toJSON()))}return t}static of(t,n,i){let o=[],c=[],u=0,d=null;function flush(t=!1){if(!t&&!o.length)return;um||d<0||m>n)throw RangeError(`Invalid change range ${d} to ${m} (in doc of length ${n})`);let v=g?"string"==typeof g?h.Text.of(g.split(i||f)):g:h.Text.empty,y=v.length;if(d==m&&0==y)return;du&&addSection(o,d-u,-1),addSection(o,m-d,y),addInsert(c,o,v),u=m}}(t),flush(!d),d}static empty(t){return new ChangeSet(t?[t,-1]:[],[])}static fromJSON(t){if(!Array.isArray(t))throw RangeError("Invalid JSON representation of ChangeSet");let n=[],i=[];for(let o=0;on&&"string"!=typeof t))throw RangeError("Invalid JSON representation of ChangeSet");else if(1==c.length)n.push(c[0],0);else{for(;i.length=0&&i<=0&&i==t[c+1]?t[c]+=n:0==n&&0==t[c]?t[c+1]+=i:o?(t[c]+=n,t[c+1]+=i):t.push(n,i)}function addInsert(t,n,i){if(0==i.length)return;let o=n.length-2>>1;if(o>1])),!i&&f!=t.sections.length&&!(t.sections[f+1]<0);)d=t.sections[f++],m=t.sections[f++];n(c,g,u,v,y),c=g,u=v}}}function mapSet(t,n,i,o=!1){let c=[],u=o?[]:null,h=new SectionIter(t),f=new SectionIter(n);for(let t=0,n=0;;)if(-1==h.ins)t+=h.len,h.next();else if(-1==f.ins&&n=0&&(h.done||nn&&!h.done&&t+h.len=0){let i=0,o=t+h.len;for(;;)if(f.ins>=0&&n>t&&n+f.lenn||h.ins>=0&&h.len>n)&&(t||o.length>i),u.forward2(n),h.forward(n)}}else addSection(o,0,h.ins,t),c&&addInsert(c,o,h.text),h.next()}}let SectionIter=class SectionIter{constructor(t){this.set=t,this.i=0,this.next()}next(){let{sections:t}=this.set;this.i>1;return n>=t.length?h.Text.empty:t[n]}textBit(t){let{inserted:n}=this.set,i=this.i-2>>1;return i>=n.length&&!t?h.Text.empty:n[i].slice(this.off,null==t?void 0:this.off+t)}forward(t){t==this.len?this.next():(this.len-=t,this.off+=t)}forward2(t){-1==this.ins?this.forward(t):t==this.ins?this.next():(this.ins-=t,this.off+=t)}};let SelectionRange=class SelectionRange{constructor(t,n,i){this.from=t,this.to=n,this.flags=i}get anchor(){return 16&this.flags?this.to:this.from}get head(){return 16&this.flags?this.from:this.to}get empty(){return this.from==this.to}get assoc(){return 4&this.flags?-1:8&this.flags?1:0}get bidiLevel(){let t=3&this.flags;return 3==t?null:t}get goalColumn(){let t=this.flags>>5;return 33554431==t?void 0:t}map(t,n=-1){let i,o;return this.empty?i=o=t.mapPos(this.from,n):(i=t.mapPos(this.from,1),o=t.mapPos(this.to,-1)),i==this.from&&o==this.to?this:new SelectionRange(i,o,this.flags)}extend(t,n=t){if(t<=this.anchor&&n>=this.anchor)return EditorSelection.range(t,n);let i=Math.abs(t-this.anchor)>Math.abs(n-this.anchor)?t:n;return EditorSelection.range(this.anchor,i)}eq(t){return this.anchor==t.anchor&&this.head==t.head}toJSON(){return{anchor:this.anchor,head:this.head}}static fromJSON(t){if(!t||"number"!=typeof t.anchor||"number"!=typeof t.head)throw RangeError("Invalid JSON representation for SelectionRange");return EditorSelection.range(t.anchor,t.head)}};let EditorSelection=class EditorSelection{constructor(t,n=0){this.ranges=t,this.mainIndex=n}map(t,n=-1){return t.empty?this:EditorSelection.create(this.ranges.map(i=>i.map(t,n)),this.mainIndex)}eq(t){if(this.ranges.length!=t.ranges.length||this.mainIndex!=t.mainIndex)return!1;for(let n=0;nt.toJSON()),main:this.mainIndex}}static fromJSON(t){if(!t||!Array.isArray(t.ranges)||"number"!=typeof t.main||t.main>=t.ranges.length)throw RangeError("Invalid JSON representation for EditorSelection");return new EditorSelection(t.ranges.map(t=>SelectionRange.fromJSON(t)),t.main)}static single(t,n=t){return new EditorSelection([EditorSelection.range(t,n)],0)}static create(t,n=0){if(0==t.length)throw RangeError("A selection needs at least one range");for(let i=0,o=0;ot.from-n.from),n=t.indexOf(i);for(let i=1;io.head?EditorSelection.range(h,u):EditorSelection.range(u,h))}}return new EditorSelection(t,n)}(t.slice(),n);i=c.to}return new EditorSelection(t,n)}static cursor(t,n=0,i,o){return new SelectionRange(t,t,(0==n?0:n<0?4:8)|(null==i?3:Math.min(2,i))|(null!=o?o:33554431)<<5)}static range(t,n,i){let o=(null!=i?i:33554431)<<5;return nt?4:0))}};function checkSelection(t,n){for(let i of t.ranges)if(i.to>n)throw RangeError("Selection points outside of document")}let d=0;let Facet=class Facet{constructor(t,n,i,o,c){this.combine=t,this.compareInput=n,this.compare=i,this.isStatic=o,this.extensions=c,this.id=d++,this.default=t([])}static define(t={}){return new Facet(t.combine||(t=>t),t.compareInput||((t,n)=>t===n),t.compare||(t.combine?(t,n)=>t===n:sameArray),!!t.static,t.enables)}of(t){return new FacetProvider([],this,0,t)}compute(t,n){if(this.isStatic)throw Error("Can't compute a static facet");return new FacetProvider(t,this,1,n)}computeN(t,n){if(this.isStatic)throw Error("Can't compute a static facet");return new FacetProvider(t,this,2,n)}from(t,n){return n||(n=t=>t),this.compute([t],i=>n(i.field(t)))}};function sameArray(t,n){return t==n||t.length==n.length&&t.every((t,i)=>t===n[i])}let FacetProvider=class FacetProvider{constructor(t,n,i,o){this.dependencies=t,this.facet=n,this.type=i,this.value=o,this.id=d++}dynamicSlot(t){var n;let i=this.value,o=this.facet.compareInput,c=this.id,u=t[c]>>1,h=2==this.type,f=!1,d=!1,m=[];for(let i of this.dependencies)"doc"==i?f=!0:"selection"==i?d=!0:((null!==(n=t[i.id])&&void 0!==n?n:1)&1)==0&&m.push(t[i.id]);return{create:t=>(t.values[u]=i(t),1),update(t,n){if(f&&n.docChanged||d&&(n.docChanged||n.selection)||m.some(n=>(1&ensureAddr(t,n))>0)){let n=i(t);if(h?!compareArray(n,t.values[u],o):!o(n,t.values[u]))return t.values[u]=n,1}return 0},reconfigure(t,n){let f=i(t),d=n.config.address[c];if(null!=d){let i=getAddr(n,d);if(h?compareArray(f,i,o):o(f,i))return t.values[u]=i,0}return t.values[u]=f,1}}}};function compareArray(t,n,i){if(t.length!=n.length)return!1;for(let o=0;ot===n),t);return t.provide&&(n.provides=t.provide(n)),n}create(t){let n=t.facet(m).find(t=>t.field==this);return((null==n?void 0:n.create)||this.createF)(t)}slot(t){let n=t[this.id]>>1;return{create:t=>(t.values[n]=this.create(t),1),update:(t,i)=>{let o=t.values[n],c=this.updateF(o,i);return this.compareF(o,c)?0:(t.values[n]=c,1)},reconfigure:(t,i)=>null!=i.config.address[this.id]?(t.values[n]=i.field(this),0):(t.values[n]=this.create(t),1)}}init(t){return[this,m.of({field:this,create:t})]}get extension(){return this}};let g={lowest:4,low:3,default:2,high:1,highest:0};function prec(t){return n=>new PrecExtension(n,t)}let v={lowest:prec(g.lowest),low:prec(g.low),default:prec(g.default),high:prec(g.high),highest:prec(g.highest),fallback:prec(g.lowest),extend:prec(g.high),override:prec(g.highest)};let PrecExtension=class PrecExtension{constructor(t,n){this.inner=t,this.prec=n}};let Compartment=class Compartment{of(t){return new CompartmentInstance(this,t)}reconfigure(t){return Compartment.reconfigure.of({compartment:this,extension:t})}get(t){return t.config.compartments.get(this)}};let CompartmentInstance=class CompartmentInstance{constructor(t,n){this.compartment=t,this.inner=n}};let Configuration=class Configuration{constructor(t,n,i,o,c,u){for(this.base=t,this.compartments=n,this.dynamicSlots=i,this.address=o,this.staticValues=c,this.facets=u,this.statusTemplate=[];this.statusTemplate.length>1]}static resolve(t,n,i){let o,c,u=[],h=Object.create(null),f=new Map;for(let i of(o=[[],[],[],[],[]],c=new Map,!function inner(t,i){let u=c.get(t);if(null!=u){if(u>=i)return;let n=o[u].indexOf(t);n>-1&&o[u].splice(n,1),t instanceof CompartmentInstance&&f.delete(t.compartment)}if(c.set(t,i),Array.isArray(t))for(let n of t)inner(n,i);else if(t instanceof CompartmentInstance){if(f.has(t.compartment))throw RangeError("Duplicate use of compartment in extensions");let o=n.get(t.compartment)||t.inner;f.set(t.compartment,o),inner(o,i)}else if(t instanceof PrecExtension)inner(t.inner,t.prec);else if(t instanceof StateField)o[i].push(t),t.provides&&inner(t.provides,i);else if(t instanceof FacetProvider)o[i].push(t),t.facet.extensions&&inner(t.facet.extensions,i);else{let n=t.extension;if(!n)throw Error(`Unrecognized extension value in extension set (${t}). This sometimes happens because multiple instances of @codemirror/state are loaded, breaking instanceof checks.`);inner(n,i)}}(t,g.default),o.reduce((t,n)=>t.concat(n))))i instanceof StateField?u.push(i):(h[i.facet.id]||(h[i.facet.id]=[])).push(i);let d=Object.create(null),m=[],v=[];for(let t of u)d[t.id]=v.length<<1,v.push(n=>t.slot(n));let y=null==i?void 0:i.config.facets;for(let t in h){let n=h[t],o=n[0].facet,c=y&&y[t]||[];if(n.every(t=>0==t.type)){if(d[o.id]=m.length<<1|1,sameArray(c,n))m.push(i.facet(o));else{let t=o.combine(n.map(t=>t.value));m.push(i&&o.compare(t,i.facet(o))?i.facet(o):t)}}else{for(let t of n)0==t.type?(d[t.id]=m.length<<1|1,m.push(t.value)):(d[t.id]=v.length<<1,v.push(n=>t.dynamicSlot(n)));d[o.id]=v.length<<1,v.push(t=>(function(t,n,i){let o=i.map(n=>t[n.id]),c=i.map(t=>t.type),u=o.filter(t=>!(1&t)),h=t[n.id]>>1;function get(t){let i=[];for(let n=0;n1&ensureAddr(t,n)))return 0;let o=get(t);return n.compare(o,t.values[h])?0:(t.values[h]=o,1)},reconfigure(t,c){let u=o.some(n=>1&ensureAddr(t,n)),f=c.config.facets[n.id],d=c.facet(n);if(f&&!u&&sameArray(i,f))return t.values[h]=d,0;let m=get(t);return n.compare(m,d)?(t.values[h]=d,0):(t.values[h]=m,1)}}})(t,o,n))}}let w=v.map(t=>t(d));return new Configuration(t,f,w,d,m,h)}};function ensureAddr(t,n){if(1&n)return 2;let i=n>>1,o=t.status[i];if(4==o)throw Error("Cyclic dependency between fields and/or facets");if(2&o)return o;t.status[i]=4;let c=t.computeSlot(t,t.config.dynamicSlots[i]);return t.status[i]=2|c}function getAddr(t,n){return 1&n?t.config.staticValues[n>>1]:t.values[n>>1]}let y=Facet.define(),w=Facet.define({combine:t=>t.some(t=>t),static:!0}),b=Facet.define({combine:t=>t.length?t[0]:void 0,static:!0}),S=Facet.define(),x=Facet.define(),C=Facet.define(),_=Facet.define({combine:t=>!!t.length&&t[0]});let Annotation=class Annotation{constructor(t,n){this.type=t,this.value=n}static define(){return new AnnotationType}};let AnnotationType=class AnnotationType{of(t){return new Annotation(this,t)}};let StateEffectType=class StateEffectType{constructor(t){this.map=t}of(t){return new StateEffect(this,t)}};let StateEffect=class StateEffect{constructor(t,n){this.type=t,this.value=n}map(t){let n=this.type.map(this.value,t);return void 0===n?void 0:n==this.value?this:new StateEffect(this.type,n)}is(t){return this.type==t}static define(t={}){return new StateEffectType(t.map||(t=>t))}static mapEffects(t,n){if(!t.length)return t;let i=[];for(let o of t){let t=o.map(n);t&&i.push(t)}return i}};StateEffect.reconfigure=StateEffect.define(),StateEffect.appendConfig=StateEffect.define();let Transaction=class Transaction{constructor(t,n,i,o,c,u){this.startState=t,this.changes=n,this.selection=i,this.effects=o,this.annotations=c,this.scrollIntoView=u,this._doc=null,this._state=null,i&&checkSelection(i,n.newLength),c.some(t=>t.type==Transaction.time)||(this.annotations=c.concat(Transaction.time.of(Date.now())))}get newDoc(){return this._doc||(this._doc=this.changes.apply(this.startState.doc))}get newSelection(){return this.selection||this.startState.selection.map(this.changes)}get state(){return this._state||this.startState.applyTransaction(this),this._state}annotation(t){for(let n of this.annotations)if(n.type==t)return n.value}get docChanged(){return!this.changes.empty}get reconfigured(){return this.startState.config!=this.state.config}isUserEvent(t){let n=this.annotation(Transaction.userEvent);return!!(n&&(n==t||n.length>t.length&&n.slice(0,t.length)==t&&"."==n[t.length]))}};function mergeTransaction(t,n,i){var o;let c,u,h;return i?(c=n.changes,u=ChangeSet.empty(n.changes.length),h=t.changes.compose(n.changes)):(c=n.changes.map(t.changes),u=t.changes.mapDesc(n.changes,!0),h=t.changes.compose(c)),{changes:h,selection:n.selection?n.selection.map(u):null===(o=t.selection)||void 0===o?void 0:o.map(c),effects:StateEffect.mapEffects(t.effects,c).concat(StateEffect.mapEffects(n.effects,u)),annotations:t.annotations.length?t.annotations.concat(n.annotations):n.annotations,scrollIntoView:t.scrollIntoView||n.scrollIntoView}}function resolveTransactionInner(t,n,i){let o=n.selection,c=asArray(n.annotations);return n.userEvent&&(c=c.concat(Transaction.userEvent.of(n.userEvent))),{changes:n.changes instanceof ChangeSet?n.changes:ChangeSet.of(n.changes||[],i,t.facet(b)),selection:o&&(o instanceof EditorSelection?o:EditorSelection.single(o.anchor,o.head)),effects:asArray(n.effects),annotations:c,scrollIntoView:!!n.scrollIntoView}}Transaction.time=Annotation.define(),Transaction.userEvent=Annotation.define(),Transaction.addToHistory=Annotation.define(),Transaction.remote=Annotation.define();let E=[];function asArray(t){return null==t?E:Array.isArray(t)?t:[t]}n.CharCategory=void 0,(u=n.CharCategory||(n.CharCategory={}))[u.Word=0]="Word",u[u.Space=1]="Space",u[u.Other=2]="Other";let T=/[\u00df\u0587\u0590-\u05f4\u0600-\u06ff\u3040-\u309f\u30a0-\u30ff\u3400-\u4db5\u4e00-\u9fcc\uac00-\ud7af]/;try{o=RegExp("[\\p{Alphabetic}\\p{Number}_]","u")}catch(t){}let EditorState=class EditorState{constructor(t,n,i,o,c,u){this.config=t,this.doc=n,this.selection=i,this.values=o,this.status=t.statusTemplate.slice(),this.computeSlot=c,u&&(u._state=this);for(let t=0;t=0;c--){let u=i[c](t);u&&Object.keys(u).length&&(o=mergeTransaction(t,resolveTransactionInner(n,u,t.changes.newLength),!0))}return o==t?t:new Transaction(n,t.changes,t.selection,o.effects,o.annotations,o.scrollIntoView)}(i?function(t){let n=t.startState,i=!0;for(let o of n.facet(S)){let n=o(t);if(!1===n){i=!1;break}Array.isArray(n)&&(i=!0===i?n:function(t,n){let i=[];for(let o=0,c=0;;){let u,h;if(o=t[o]))u=t[o++],h=t[o++];else{if(!(c=0;i--){let c=o[i](t);t=c instanceof Transaction?c:Array.isArray(c)&&1==c.length&&c[0]instanceof Transaction?c[0]:resolveTransaction(n,asArray(c),!1)}return t}(c):c)}(this,t,!0)}applyTransaction(t){let n,i=this.config,{base:o,compartments:c}=i;for(let n of t.effects)n.is(Compartment.reconfigure)?(i&&(c=new Map,i.compartments.forEach((t,n)=>c.set(n,t)),i=null),c.set(n.value.compartment,n.value.extension)):n.is(StateEffect.reconfigure)?(i=null,o=n.value):n.is(StateEffect.appendConfig)&&(i=null,o=asArray(o).concat(n.value));i?n=t.startState.values.slice():(i=Configuration.resolve(o,c,this),n=new EditorState(i,this.doc,this.selection,i.dynamicSlots.map(()=>null),(t,n)=>n.reconfigure(t,this),null).values),new EditorState(i,t.newDoc,t.newSelection,n,(n,i)=>i.update(n,t),t)}replaceSelection(t){return"string"==typeof t&&(t=this.toText(t)),this.changeByRange(n=>({changes:{from:n.from,to:n.to,insert:t},range:EditorSelection.cursor(n.from+t.length)}))}changeByRange(t){let n=this.selection,i=t(n.ranges[0]),o=this.changes(i.changes),c=[i.range],u=asArray(i.effects);for(let i=1;ic.spec.fromJSON(u,t)))}return EditorState.create({doc:t.doc,selection:EditorSelection.fromJSON(t.selection),extensions:n.extensions?o.concat([n.extensions]):o})}static create(t={}){let n=Configuration.resolve(t.extensions||[],new Map),i=t.doc instanceof h.Text?t.doc:h.Text.of((t.doc||"").split(n.staticFacet(EditorState.lineSeparator)||f)),o=t.selection?t.selection instanceof EditorSelection?t.selection:EditorSelection.single(t.selection.anchor,t.selection.head):EditorSelection.single(0);return checkSelection(o,i.length),n.staticFacet(w)||(o=o.asSingle()),new EditorState(n,i,o,n.dynamicSlots.map(()=>null),(t,n)=>n.create(t),null)}get tabSize(){return this.facet(EditorState.tabSize)}get lineBreak(){return this.facet(EditorState.lineSeparator)||"\n"}get readOnly(){return this.facet(_)}phrase(t){for(let n of this.facet(EditorState.phrases))if(Object.prototype.hasOwnProperty.call(n,t))return n[t];return t}languageDataAt(t,n,i=-1){let o=[];for(let c of this.facet(y))for(let u of c(this,n,i))Object.prototype.hasOwnProperty.call(u,t)&&o.push(u[t]);return o}charCategorizer(t){var i;return i=this.languageDataAt("wordChars",t).join(""),t=>{if(!/\S/.test(t))return n.CharCategory.Space;if(function(t){if(o)return o.test(t);for(let n=0;n"\x80"&&(i.toUpperCase()!=i.toLowerCase()||T.test(i)))return!0}return!1}(t))return n.CharCategory.Word;for(let o=0;o-1)return n.CharCategory.Word;return n.CharCategory.Other}}wordAt(t){let{text:i,from:o,length:c}=this.doc.lineAt(t),u=this.charCategorizer(t),f=t-o,d=t-o;for(;f>0;){let t=h.findClusterBreak(i,f,!1);if(u(i.slice(t,f))!=n.CharCategory.Word)break;f=t}for(;dt.length?t[0]:4}),EditorState.lineSeparator=b,EditorState.readOnly=_,EditorState.phrases=Facet.define(),EditorState.languageData=y,EditorState.changeFilter=S,EditorState.transactionFilter=x,EditorState.transactionExtender=C,Compartment.reconfigure=StateEffect.define(),Object.defineProperty(n,"Text",{enumerable:!0,get:function(){return h.Text}}),n.Annotation=Annotation,n.AnnotationType=AnnotationType,n.ChangeDesc=ChangeDesc,n.ChangeSet=ChangeSet,n.Compartment=Compartment,n.EditorSelection=EditorSelection,n.EditorState=EditorState,n.Facet=Facet,n.Prec=v,n.SelectionRange=SelectionRange,n.StateEffect=StateEffect,n.StateEffectType=StateEffectType,n.StateField=StateField,n.Transaction=Transaction,n.combineConfig=function(t,n,i={}){let o={};for(let n of t)for(let t of Object.keys(n)){let c=n[t],u=o[t];if(void 0===u)o[t]=c;else if(u===c||void 0===c);else if(Object.hasOwnProperty.call(i,t))o[t]=i[t](u,c);else throw Error("Config merge conflict for field "+t)}for(let t in n)void 0===o[t]&&(o[t]=n[t]);return o}},3777:function(t,n,i){"use strict";Object.defineProperty(n,"__esModule",{value:!0});var o=i(6393),c=i(7038),u=i(2382);function countCol(t,n,i,o=0,c=0){null==n&&-1==(n=t.search(/[^\s\u00a0]/))&&(n=t.length);let u=c;for(let c=o;c=this.string.length}sol(){return 0==this.pos}peek(){return this.string.charAt(this.pos)||void 0}next(){if(this.posn}eatSpace(){let t=this.pos;for(;/[\s\u00a0]/.test(this.string.charAt(this.pos));)++this.pos;return this.pos>t}skipToEnd(){this.pos=this.string.length}skipTo(t){let n=this.string.indexOf(t,this.pos);if(n>-1)return this.pos=n,!0}backUp(t){this.pos-=t}column(){return this.lastColumnPosi?t.toLowerCase():t;return cased(this.string.substr(this.pos,t.length))==cased(t)?(!1!==n&&(this.pos+=t.length),!0):null}{let i=this.string.slice(this.pos).match(t);return i&&i.index>0?null:(i&&!1!==n&&(this.pos+=i[0].length),i)}}current(){return this.string.slice(this.start,this.pos)}};function defaultCopyState(t){if("object"!=typeof t)return t;let n={};for(let i in t){let o=t[i];n[i]=o instanceof Array?o.slice():o}return n}let StreamLanguage=class StreamLanguage extends u.Language{constructor(t){let n,i=u.defineLanguageFacet(t.languageData),c={token:t.token,blankLine:t.blankLine||(()=>{}),startState:t.startState||(()=>!0),copyState:t.copyState||defaultCopyState,indent:t.indent||(()=>null),languageData:t.languageData||{},tokenTable:t.tokenTable||h},d;super(i,new class extends o.Parser{createParse(t,n,i){return new Parse(d,t,n,i)}},(n=o.NodeType.define({id:f.length,name:"Document",props:[u.languageDataProp.add(()=>i)]}),f.push(n),n),[u.indentService.of((t,n)=>this.getIndent(t,n))]),d=this,this.streamParser=c,this.stateAfter=new o.NodeProp({perNode:!0}),this.tokenTable=t.tokenTable?new TokenTable(c.tokenTable):v}static define(t){return new StreamLanguage(t)}getIndent(t,n){let i=u.syntaxTree(t.state),o=i.resolve(n);for(;o&&o.type!=this.topNode;)o=o.parent;if(!o)return null;let c=findState(this,i,0,o.from,n),h,f;if(c?(f=c.state,h=c.pos+1):(f=this.streamParser.startState(t.unit),h=0),n-h>1e4)return null;for(;h=c&&i+n.length<=u&&n.prop(t.stateAfter);if(h)return{state:t.streamParser.copyState(h),pos:i+n.length};for(let h=n.children.length-1;h>=0;h--){let f=n.children[h],d=i+n.positions[h],m=f instanceof o.Tree&&di&&findState(t,c.tree,0-c.offset,i,u),f;if(h&&(f=function cutTree(t,n,i,c,u){if(u&&i<=0&&c>=n.length)return n;u||n.type!=t.topNode||(u=!0);for(let h=n.children.length-1;h>=0;h--){let f=n.positions[h],d=n.children[h],m;if(f=n)?this.finish():t&&this.parsedPos>=t.viewport.to?(t.skipUntilInView(this.parsedPos,n),this.finish()):null}stopAt(t){this.stoppedAt=t}lineAfter(t){let n=this.input.chunk(t);if(this.input.lineChunks)"\n"==n&&(n="");else{let t=n.indexOf("\n");t>-1&&(n=n.slice(0,t))}return t+n.length<=this.to?n:n.slice(0,this.to-t)}nextLine(){let t=this.parsedPos,n=this.lineAfter(t),i=t+n.length;for(let t=this.rangeIndex;;){let o=this.ranges[t].to;if(o>=i||(n=n.slice(0,o-(i-n.length)),++t==this.ranges.length))break;let c=this.ranges[t].from,u=this.lineAfter(c);n+=u,i=c+u.length}return{line:n,end:i}}skipGapsTo(t,n,i){for(;;){let o=this.ranges[this.rangeIndex].to,c=t+n;if(i>0?o>c:o>=c)break;let u=this.ranges[++this.rangeIndex].from;n+=u-o}return n}moveRangeIndex(){for(;this.ranges[this.rangeIndex].to1){c=this.skipGapsTo(n,c,1),n+=c;let t=this.chunk.length;c=this.skipGapsTo(i,c,-1),i+=c,o+=this.chunk.length-t}return this.chunk.push(t,n,i,o),c}parseLine(t){let{line:n,end:i}=this.nextLine(),o=0,{streamParser:c}=this.lang,h=new StringStream(n,t?t.state.tabSize:4,t?u.getIndentUnit(t.state):2);if(h.eol())c.blankLine(this.state,h.indentUnit);else for(;!h.eol();){let t=readToken(c.token,h,this.state);if(t&&(o=this.emitToken(this.lang.tokenTable.resolve(t),this.parsedPos+h.start,this.parsedPos+h.pos,4,o)),h.start>1e4)break}this.parsedPos=i,this.moveRangeIndex(),this.parsedPosn.start)return o}throw Error("Stream parser failed to advance stream.")}let h=Object.create(null),f=[o.NodeType.none],d=new o.NodeSet(f),m=[],g=Object.create(null);for(let[t,n]of[["variable","variableName"],["variable-2","variableName.special"],["string-2","string.special"],["def","variableName.definition"],["tag","typeName"],["attribute","propertyName"],["type","typeName"],["builtin","variableName.standard"],["qualifier","modifier"],["error","invalid"],["header","heading"],["property","propertyName"]])g[t]=createTokenType(h,n);let TokenTable=class TokenTable{constructor(t){this.extra=t,this.table=Object.assign(Object.create(null),g)}resolve(t){return t?this.table[t]||(this.table[t]=createTokenType(this.extra,t)):0}};let v=new TokenTable(h);function warnForPart(t,n){m.indexOf(t)>-1||(m.push(t),console.warn(n))}function createTokenType(t,n){let i=null;for(let o of n.split(".")){let n=t[o]||c.tags[o];n?"function"==typeof n?i?i=n(i):warnForPart(o,`Modifier ${o} used at start of tag`):i?warnForPart(o,`Tag ${o} used as modifier`):i=n:warnForPart(o,`Unknown highlighting tag ${o}`)}if(!i)return 0;let u=n.replace(/ /g,"_"),h=o.NodeType.define({id:f.length,name:u,props:[c.styleTags({[u]:i})]});return f.push(h),h.id}n.StreamLanguage=StreamLanguage,n.StringStream=StringStream},5627:function(t,n){"use strict";Object.defineProperty(n,"__esModule",{value:!0});let i="lc,34,7n,7,7b,19,,,,2,,2,,,20,b,1c,l,g,,2t,7,2,6,2,2,,4,z,,u,r,2j,b,1m,9,9,,o,4,,9,,3,,5,17,3,3b,f,,w,1j,,,,4,8,4,,3,7,a,2,t,,1m,,,,2,4,8,,9,,a,2,q,,2,2,1l,,4,2,4,2,2,3,3,,u,2,3,,b,2,1l,,4,5,,2,4,,k,2,m,6,,,1m,,,2,,4,8,,7,3,a,2,u,,1n,,,,c,,9,,14,,3,,1l,3,5,3,,4,7,2,b,2,t,,1m,,2,,2,,3,,5,2,7,2,b,2,s,2,1l,2,,,2,4,8,,9,,a,2,t,,20,,4,,2,3,,,8,,29,,2,7,c,8,2q,,2,9,b,6,22,2,r,,,,,,1j,e,,5,,2,5,b,,10,9,,2u,4,,6,,2,2,2,p,2,4,3,g,4,d,,2,2,6,,f,,jj,3,qa,3,t,3,t,2,u,2,1s,2,,7,8,,2,b,9,,19,3,3b,2,y,,3a,3,4,2,9,,6,3,63,2,2,,1m,,,7,,,,,2,8,6,a,2,,1c,h,1r,4,1c,7,,,5,,14,9,c,2,w,4,2,2,,3,1k,,,2,3,,,3,1m,8,2,2,48,3,,d,,7,4,,6,,3,2,5i,1m,,5,ek,,5f,x,2da,3,3x,,2o,w,fe,6,2x,2,n9w,4,,a,w,2,28,2,7k,,3,,4,,p,2,5,,47,2,q,i,d,,12,8,p,b,1a,3,1c,,2,4,2,2,13,,1v,6,2,2,2,2,c,,8,,1b,,1f,,,3,2,2,5,2,,,16,2,8,,6m,,2,,4,,fn4,,kh,g,g,g,a6,2,gt,,6a,,45,5,1ae,3,,2,5,4,14,3,4,,4l,2,fx,4,ar,2,49,b,4w,,1i,f,1k,3,1d,4,2,2,1x,3,10,5,,8,1q,,c,2,1g,9,a,4,2,,2n,3,2,,,2,6,,4g,,3,8,l,2,1l,2,,,,,m,,e,7,3,5,5f,8,2,3,,,n,,29,,2,6,,,2,,,2,,2,6j,,2,4,6,2,,2,r,2,2d,8,2,,,2,2y,,,,2,6,,,2t,3,2,4,,5,77,9,,2,6t,,a,2,,,4,,40,4,2,2,4,,w,a,14,6,2,4,8,,9,6,2,3,1a,d,,2,ba,7,,6,,,2a,m,2,7,,2,,2,3e,6,3,,,2,,7,,,20,2,3,,,,9n,2,f0b,5,1n,7,t4,,1r,4,29,,f5k,2,43q,,,3,4,5,8,8,2,7,u,4,44,3,1iz,1j,4,1e,8,,e,,m,5,,f,11s,7,,h,2,7,,2,,5,79,7,c5,4,15s,7,31,7,240,5,gx7k,2o,3k,6o".split(",").map(t=>t?parseInt(t,36):1);for(let t=1;t=127462&&t<=127487}function findClusterBreak(t,n,i=!0,o=!0){return(i?nextClusterBreak:function(t,n,i){for(;n>0;){let o=nextClusterBreak(t,n-2,i);if(ot)return i[n-1]<=t;return!1}(u))n+=codePointSize(u),c=u;else if(isRegionalIndicator(u)){let i=0,o=n-2;for(;o>=0&&isRegionalIndicator(codePointAt(t,o));)i++,o-=2;if(i%2==0)break;n+=2}else break}return n}function surrogateLow(t){return t>=56320&&t<57344}function surrogateHigh(t){return t>=55296&&t<56320}function codePointAt(t,n){let i=t.charCodeAt(n);if(!surrogateHigh(i)||n+1==t.length)return i;let o=t.charCodeAt(n+1);return surrogateLow(o)?(i-55296<<10)+(o-56320)+65536:i}function codePointSize(t){return t<65536?1:2}let Text=class Text{constructor(){}lineAt(t){if(t<0||t>this.length)throw RangeError(`Invalid position ${t} in document of length ${this.length}`);return this.lineInner(t,!1,1,0)}line(t){if(t<1||t>this.lines)throw RangeError(`Invalid line number ${t} in ${this.lines}-line document`);return this.lineInner(t,!0,1,0)}replace(t,n,i){let o=[];return this.decompose(0,t,o,2),i.length&&i.decompose(0,i.length,o,3),this.decompose(n,this.length,o,1),TextNode.from(o,this.length-(n-t)+i.length)}append(t){return this.replace(this.length,this.length,t)}slice(t,n=this.length){let i=[];return this.decompose(t,n,i,0),TextNode.from(i,n-t)}eq(t){if(t==this)return!0;if(t.length!=this.length||t.lines!=this.lines)return!1;let n=this.scanIdentical(t,1),i=this.length-this.scanIdentical(t,-1),o=new RawTextCursor(this),c=new RawTextCursor(t);for(let t=n,u=n;;){if(o.next(t),c.next(t),t=0,o.lineBreak!=c.lineBreak||o.done!=c.done||o.value!=c.value)return!1;if(u+=o.value.length,o.done||u>=i)return!0}}iter(t=1){return new RawTextCursor(this,t)}iterRange(t,n=this.length){return new PartialTextCursor(this,t,n)}iterLines(t,n){let i;if(null==t)i=this.iter();else{null==n&&(n=this.lines+1);let o=this.line(t).from;i=this.iterRange(o,Math.max(o,n==this.lines+1?this.length:n<=1?0:this.line(n-1).to))}return new LineCursor(i)}toString(){return this.sliceString(0)}toJSON(){let t=[];return this.flatten(t),t}static of(t){if(0==t.length)throw RangeError("A document must have at least one line");return 1!=t.length||t[0]?t.length<=32?new TextLeaf(t):TextNode.from(TextLeaf.split(t,[])):Text.empty}};let TextLeaf=class TextLeaf extends Text{constructor(t,n=function(t){let n=-1;for(let i of t)n+=i.length+1;return n}(t)){super(),this.text=t,this.length=n}get lines(){return this.text.length}get children(){return null}lineInner(t,n,i,o){for(let c=0;;c++){let u=this.text[c],h=o+u.length;if((n?i:h)>=t)return new Line(o,h,i,u);o=h+1,i++}}decompose(t,n,i,o){let c=t<=0&&n>=this.length?this:new TextLeaf(appendText(this.text,[""],t,n),Math.min(n,this.length)-Math.max(0,t));if(1&o){let t=i.pop(),n=appendText(c.text,t.text.slice(),0,c.length);if(n.length<=32)i.push(new TextLeaf(n,t.length+c.length));else{let t=n.length>>1;i.push(new TextLeaf(n.slice(0,t)),new TextLeaf(n.slice(t)))}}else i.push(c)}replace(t,n,i){if(!(i instanceof TextLeaf))return super.replace(t,n,i);let o=appendText(this.text,appendText(i.text,appendText(this.text,[""],0,t)),n),c=this.length+i.length-(n-t);return o.length<=32?new TextLeaf(o,c):TextNode.from(TextLeaf.split(o,[]),c)}sliceString(t,n=this.length,i="\n"){let o="";for(let c=0,u=0;c<=n&&ut&&u&&(o+=i),tc&&(o+=h.slice(Math.max(0,t-c),n-c)),c=f+1}return o}flatten(t){for(let n of this.text)t.push(n)}scanIdentical(){return 0}static split(t,n){let i=[],o=-1;for(let c of t)i.push(c),o+=c.length+1,32==i.length&&(n.push(new TextLeaf(i,o)),i=[],o=-1);return o>-1&&n.push(new TextLeaf(i,o)),n}};let TextNode=class TextNode extends Text{constructor(t,n){for(let i of(super(),this.children=t,this.length=n,this.lines=0,t))this.lines+=i.lines}lineInner(t,n,i,o){for(let c=0;;c++){let u=this.children[c],h=o+u.length,f=i+u.lines-1;if((n?f:h)>=t)return u.lineInner(t,n,i,o);o=h+1,i=f+1}}decompose(t,n,i,o){for(let c=0,u=0;u<=n&&c=u){let c=o&((u<=t?1:0)|(f>=n?2:0));u>=t&&f<=n&&!c?i.push(h):h.decompose(t-u,n-u,i,c)}u=f+1}}replace(t,n,i){if(i.lines=c&&n<=h){let f=u.replace(t-c,n-c,i),d=this.lines-u.lines+f.lines;if(f.lines>4&&f.lines>d>>6){let c=this.children.slice();return c[o]=f,new TextNode(c,this.length-(n-t)+i.length)}return super.replace(c,h,f)}c=h+1}return super.replace(t,n,i)}sliceString(t,n=this.length,i="\n"){let o="";for(let c=0,u=0;ct&&c&&(o+=i),tu&&(o+=h.sliceString(t-u,n-u,i)),u=f+1}return o}flatten(t){for(let n of this.children)n.flatten(t)}scanIdentical(t,n){if(!(t instanceof TextNode))return 0;let i=0,[o,c,u,h]=n>0?[0,0,this.children.length,t.children.length]:[this.children.length-1,t.children.length-1,-1,-1];for(;;o+=n,c+=n){if(o==u||c==h)return i;let f=this.children[o],d=t.children[c];if(f!=d)return i+f.scanIdentical(d,n);i+=f.length+1}}static from(t,n=t.reduce((t,n)=>t+n.length+1,-1)){let i=0;for(let n of t)i+=n.lines;if(i<32){let i=[];for(let n of t)n.flatten(i);return new TextLeaf(i,n)}let o=Math.max(32,i>>5),c=o<<1,u=o>>1,h=[],f=0,d=-1,m=[];function flush(){0!=f&&(h.push(1==m.length?m[0]:TextNode.from(m,d)),d=-1,f=m.length=0)}for(let n of t)!function add(t){let n;if(t.lines>c&&t instanceof TextNode)for(let n of t.children)add(n);else t.lines>u&&(f>u||!f)?(flush(),h.push(t)):t instanceof TextLeaf&&f&&(n=m[m.length-1])instanceof TextLeaf&&t.lines+n.lines<=32?(f+=t.lines,d+=t.length+1,m[m.length-1]=new TextLeaf(n.text.concat(t.text),n.length+1+t.length)):(f+t.lines>o&&flush(),f+=t.lines,d+=t.length+1,m.push(t))}(n);return flush(),1==h.length?h[0]:new TextNode(h,n)}};function appendText(t,n,i=0,o=1e9){for(let c=0,u=0,h=!0;u=i&&(d>o&&(f=f.slice(0,o-c)),c0?1:(t instanceof TextLeaf?t.text.length:t.children.length)<<1]}nextInner(t,n){for(this.done=this.lineBreak=!1;;){let i=this.nodes.length-1,o=this.nodes[i],c=this.offsets[i],u=c>>1,h=o instanceof TextLeaf?o.text.length:o.children.length;if(u==(n>0?h:0)){if(0==i)return this.done=!0,this.value="",this;n>0&&this.offsets[i-1]++,this.nodes.pop(),this.offsets.pop()}else if((1&c)==(n>0?0:1)){if(this.offsets[i]+=n,0==t)return this.lineBreak=!0,this.value="\n",this;t--}else if(o instanceof TextLeaf){let c=o.text[u+(n<0?-1:0)];if(this.offsets[i]+=n,c.length>Math.max(0,t))return this.value=0==t?c:n>0?c.slice(t):c.slice(0,c.length-t),this;t-=c.length}else{let c=o.children[u+(n<0?-1:0)];t>c.length?(t-=c.length,this.offsets[i]+=n):(n<0&&this.offsets[i]--,this.nodes.push(c),this.offsets.push(n>0?1:(c instanceof TextLeaf?c.text.length:c.children.length)<<1))}}}next(t=0){return t<0&&(this.nextInner(-t,-this.dir),t=this.value.length),this.nextInner(t,this.dir)}};let PartialTextCursor=class PartialTextCursor{constructor(t,n,i){this.value="",this.done=!1,this.cursor=new RawTextCursor(t,n>i?-1:1),this.pos=n>i?t.length:0,this.from=Math.min(n,i),this.to=Math.max(n,i)}nextInner(t,n){if(n<0?this.pos<=this.from:this.pos>=this.to)return this.value="",this.done=!0,this;t+=Math.max(0,n<0?this.pos-this.to:this.from-this.pos);let i=n<0?this.pos-this.from:this.to-this.pos;t>i&&(t=i),i-=t;let{value:o}=this.cursor.next(t);return this.pos+=(o.length+t)*n,this.value=o.length<=i?o:n<0?o.slice(o.length-i):o.slice(0,i),this.done=!this.value,this}next(t=0){return t<0?t=Math.max(t,this.from-this.pos):t>0&&(t=Math.min(t,this.to-this.pos)),this.nextInner(t,this.cursor.dir)}get lineBreak(){return this.cursor.lineBreak&&""!=this.value}};let LineCursor=class LineCursor{constructor(t){this.inner=t,this.afterBreak=!0,this.value="",this.done=!1}next(t=0){let{done:n,lineBreak:i,value:o}=this.inner.next(t);return n?(this.done=!0,this.value=""):i?this.afterBreak?this.value="":(this.afterBreak=!0,this.next()):(this.value=o,this.afterBreak=!1),this}get lineBreak(){return!1}};"undefined"!=typeof Symbol&&(Text.prototype[Symbol.iterator]=function(){return this.iter()},RawTextCursor.prototype[Symbol.iterator]=PartialTextCursor.prototype[Symbol.iterator]=LineCursor.prototype[Symbol.iterator]=function(){return this});let Line=class Line{constructor(t,n,i,o){this.from=t,this.to=n,this.number=i,this.text=o}get length(){return this.to-this.from}};n.Line=Line,n.Text=Text,n.codePointAt=codePointAt,n.codePointSize=codePointSize,n.countColumn=function(t,n,i=t.length){let o=0;for(let c=0;c=n)return o;if(o==t.length)break;c+=9==t.charCodeAt(o)?i-c%i:1,o=findClusterBreak(t,o)}return!0===o?-1:t.length},n.fromCodePoint=function(t){return t<=65535?String.fromCharCode(t):String.fromCharCode(((t-=65536)>>10)+55296,(1023&t)+56320)}},8326:function(t,n,i){"use strict";Object.defineProperty(n,"__esModule",{value:!0});var o=i(1135),c=i(4350);let u="undefined"!=typeof navigator&&!/Edge\/(\d+)/.exec(navigator.userAgent)&&/Apple Computer/.test(navigator.vendor)&&(/Mobile\/\w+/.test(navigator.userAgent)||navigator.maxTouchPoints>2),h="-10000px";let TooltipViewManager=class TooltipViewManager{constructor(t,n,i){this.facet=n,this.createTooltipView=i,this.input=t.state.facet(n),this.tooltips=this.input.filter(t=>t),this.tooltipViews=this.tooltips.map(i)}update(t){let n=t.state.facet(this.facet),i=n.filter(t=>t);if(n===this.input){for(let n of this.tooltipViews)n.update&&n.update(t);return!1}let o=[];for(let n=0;no.indexOf(t)&&t.dom.remove();return this.input=n,this.tooltips=i,this.tooltipViews=o,!0}};function windowSpace(){return{top:0,left:0,bottom:innerHeight,right:innerWidth}}let f=c.Facet.define({combine:t=>{var n,i,o;return{position:u?"absolute":(null===(n=t.find(t=>t.position))||void 0===n?void 0:n.position)||"fixed",parent:(null===(i=t.find(t=>t.parent))||void 0===i?void 0:i.parent)||null,tooltipSpace:(null===(o=t.find(t=>t.tooltipSpace))||void 0===o?void 0:o.tooltipSpace)||windowSpace}}}),d=o.ViewPlugin.fromClass(class{constructor(t){var n;this.view=t,this.inView=!0,this.lastTransaction=0,this.measureTimeout=-1;let i=t.state.facet(f);this.position=i.position,this.parent=i.parent,this.classes=t.themeClasses,this.createContainer(),this.measureReq={read:this.readMeasure.bind(this),write:this.writeMeasure.bind(this),key:this},this.manager=new TooltipViewManager(t,v,t=>this.createTooltip(t)),this.intersectionObserver="function"==typeof IntersectionObserver?new IntersectionObserver(t=>{Date.now()>this.lastTransaction-50&&t.length>0&&t[t.length-1].intersectionRatio<1&&this.measureSoon()},{threshold:[1]}):null,this.observeIntersection(),null===(n=t.dom.ownerDocument.defaultView)||void 0===n||n.addEventListener("resize",this.measureSoon=this.measureSoon.bind(this)),this.maybeMeasure()}createContainer(){this.parent?(this.container=document.createElement("div"),this.container.style.position="relative",this.container.className=this.view.themeClasses,this.parent.appendChild(this.container)):this.container=this.view.dom}observeIntersection(){if(this.intersectionObserver)for(let t of(this.intersectionObserver.disconnect(),this.manager.tooltipViews))this.intersectionObserver.observe(t.dom)}measureSoon(){this.measureTimeout<0&&(this.measureTimeout=setTimeout(()=>{this.measureTimeout=-1,this.maybeMeasure()},50))}update(t){t.transactions.length&&(this.lastTransaction=Date.now());let n=this.manager.update(t);n&&this.observeIntersection();let i=n||t.geometryChanged,o=t.state.facet(f);if(o.position!=this.position){for(let t of(this.position=o.position,this.manager.tooltipViews))t.dom.style.position=this.position;i=!0}if(o.parent!=this.parent){for(let t of(this.parent&&this.container.remove(),this.parent=o.parent,this.createContainer(),this.manager.tooltipViews))this.container.appendChild(t.dom);i=!0}else this.parent&&this.view.themeClasses!=this.classes&&(this.classes=this.container.className=this.view.themeClasses);i&&this.maybeMeasure()}createTooltip(t){let n=t.create(this.view);if(n.dom.classList.add("cm-tooltip"),t.arrow&&!n.dom.querySelector(".cm-tooltip > .cm-tooltip-arrow")){let t=document.createElement("div");t.className="cm-tooltip-arrow",n.dom.appendChild(t)}return n.dom.style.position=this.position,n.dom.style.top=h,this.container.appendChild(n.dom),n.mount&&n.mount(this.view),n}destroy(){var t,n;for(let{dom:n}of(null===(t=this.view.dom.ownerDocument.defaultView)||void 0===t||t.removeEventListener("resize",this.measureSoon),this.manager.tooltipViews))n.remove();null===(n=this.intersectionObserver)||void 0===n||n.disconnect(),clearTimeout(this.measureTimeout)}readMeasure(){let t=this.view.dom.getBoundingClientRect();return{editor:t,parent:this.parent?this.container.getBoundingClientRect():t,pos:this.manager.tooltips.map((t,n)=>{let i=this.manager.tooltipViews[n];return i.getCoords?i.getCoords(t.pos):this.view.coordsAtPos(t.pos)}),size:this.manager.tooltipViews.map(({dom:t})=>t.getBoundingClientRect()),space:this.view.state.facet(f).tooltipSpace(this.view)}}writeMeasure(t){let{editor:n,space:i}=t,c=[];for(let u=0;u=Math.min(n.bottom,i.bottom)||v.rightMath.min(n.right,i.right)+.1){m.style.top=h;continue}let w=f.arrow?d.dom.querySelector(".cm-tooltip-arrow"):null,b=w?7:0,S=y.right-y.left,x=y.bottom-y.top,C=d.offset||g,_=this.view.textDirection==o.Direction.LTR,E=y.width>i.right-i.left?_?i.left:i.right-y.width:_?Math.min(v.left-(w?14:0)+C.x,i.right-S):Math.max(i.left,v.left-S+(w?14:0)-C.x),T=!!f.above;!f.strictSide&&(T?v.top-(y.bottom-y.top)-C.yi.bottom)&&T==i.bottom-v.bottom>v.top-i.top&&(T=!T);let P=T?v.top-x-b-C.y:v.bottom+b+C.y,L=E+S;if(!0!==d.overlap)for(let t of c)t.leftE&&t.topP&&(P=T?t.top-x-2-b:t.bottom+b+2);"absolute"==this.position?(m.style.top=P-t.parent.top+"px",m.style.left=E-t.parent.left+"px"):(m.style.top=P+"px",m.style.left=E+"px"),w&&(w.style.left=`${v.left+(_?C.x:-C.x)-(E+14-7)}px`),!0!==d.overlap&&c.push({left:E,top:P,right:L,bottom:P+x}),m.classList.toggle("cm-tooltip-above",T),m.classList.toggle("cm-tooltip-below",!T),d.positioned&&d.positioned()}}maybeMeasure(){if(this.manager.tooltips.length&&(this.view.inView&&this.view.requestMeasure(this.measureReq),this.inView!=this.view.inView&&(this.inView=this.view.inView,!this.inView)))for(let t of this.manager.tooltipViews)t.dom.style.top=h}},{eventHandlers:{scroll(){this.maybeMeasure()}}}),m=o.EditorView.baseTheme({".cm-tooltip":{zIndex:100},"&light .cm-tooltip":{border:"1px solid #bbb",backgroundColor:"#f5f5f5"},"&light .cm-tooltip-section:not(:first-child)":{borderTop:"1px solid #bbb"},"&dark .cm-tooltip":{backgroundColor:"#333338",color:"white"},".cm-tooltip-arrow":{height:"7px",width:"14px",position:"absolute",zIndex:-1,overflow:"hidden","&:before, &:after":{content:"''",position:"absolute",width:0,height:0,borderLeft:"7px solid transparent",borderRight:"7px solid transparent"},".cm-tooltip-above &":{bottom:"-7px","&:before":{borderTop:"7px solid #bbb"},"&:after":{borderTop:"7px solid #f5f5f5",bottom:"1px"}},".cm-tooltip-below &":{top:"-7px","&:before":{borderBottom:"7px solid #bbb"},"&:after":{borderBottom:"7px solid #f5f5f5",top:"1px"}}},"&dark .cm-tooltip .cm-tooltip-arrow":{"&:before":{borderTopColor:"#333338",borderBottomColor:"#333338"},"&:after":{borderTopColor:"transparent",borderBottomColor:"transparent"}}}),g={x:0,y:0},v=c.Facet.define({enables:[d,m]}),y=c.Facet.define();let HoverTooltipHost=class HoverTooltipHost{constructor(t){this.view=t,this.mounted=!1,this.dom=document.createElement("div"),this.dom.classList.add("cm-tooltip-hover"),this.manager=new TooltipViewManager(t,y,t=>this.createHostedView(t))}static create(t){return new HoverTooltipHost(t)}createHostedView(t){let n=t.create(this.view);return n.dom.classList.add("cm-tooltip-section"),this.dom.appendChild(n.dom),this.mounted&&n.mount&&n.mount(this.view),n}mount(t){for(let n of this.manager.tooltipViews)n.mount&&n.mount(t);this.mounted=!0}positioned(){for(let t of this.manager.tooltipViews)t.positioned&&t.positioned()}update(t){this.manager.update(t)}};let w=v.compute([y],t=>{let n=t.facet(y).filter(t=>t);return 0===n.length?null:{pos:Math.min(...n.map(t=>t.pos)),end:Math.max(...n.filter(t=>null!=t.end).map(t=>t.end)),create:HoverTooltipHost.create,above:n[0].above,arrow:n.some(t=>t.arrow)}});let HoverPlugin=class HoverPlugin{constructor(t,n,i,o,c){this.view=t,this.source=n,this.field=i,this.setHover=o,this.hoverTime=c,this.hoverTimeout=-1,this.restartTimeout=-1,this.pending=null,this.lastMove={x:0,y:0,target:t.dom,time:0},this.checkHover=this.checkHover.bind(this),t.dom.addEventListener("mouseleave",this.mouseleave=this.mouseleave.bind(this)),t.dom.addEventListener("mousemove",this.mousemove=this.mousemove.bind(this))}update(){this.pending&&(this.pending=null,clearTimeout(this.restartTimeout),this.restartTimeout=setTimeout(()=>this.startHover(),20))}get active(){return this.view.state.field(this.field)}checkHover(){if(this.hoverTimeout=-1,this.active)return;let t=Date.now()-this.lastMove.time;ti.bottom||t.xi.right+this.view.defaultCharacterWidth)return;let c=this.view.bidiSpans(this.view.state.doc.lineAt(n)).find(t=>t.from<=n&&t.to>=n),u=c&&c.dir==o.Direction.RTL?-1:1,h=this.source(this.view,n,t.x{this.pending==t&&(this.pending=null,n&&this.view.dispatch({effects:this.setHover.of(n)}))},t=>o.logException(this.view.state,t,"hover tooltip"))}else h&&this.view.dispatch({effects:this.setHover.of(h)})}mousemove(t){var n;this.lastMove={x:t.clientX,y:t.clientY,target:t.target,time:Date.now()},this.hoverTimeout<0&&(this.hoverTimeout=setTimeout(this.checkHover,this.hoverTime));let i=this.active;if(i&&!function(t){for(let n=t;n;n=n.parentNode)if(1==n.nodeType&&n.classList.contains("cm-tooltip"))return!0;return!1}(this.lastMove.target)||this.pending){let{pos:o}=i||this.pending,c=null!==(n=null==i?void 0:i.end)&&void 0!==n?n:o;(o==c?this.view.posAtCoords(this.lastMove)!=o:!function(t,n,i,o,c,u){let h=document.createRange(),f=t.domAtPos(n),d=t.domAtPos(i);h.setEnd(d.node,d.offset),h.setStart(f.node,f.offset);let m=h.getClientRects();h.detach();for(let t=0;t=Math.max(n.top-c,c-n.bottom,n.left-o,o-n.right))return!0}return!1}(this.view,o,c,t.clientX,t.clientY,0))&&(this.view.dispatch({effects:this.setHover.of(null)}),this.pending=null)}}mouseleave(){clearTimeout(this.hoverTimeout),this.hoverTimeout=-1,this.active&&this.view.dispatch({effects:this.setHover.of(null)})}destroy(){clearTimeout(this.hoverTimeout),this.view.dom.removeEventListener("mouseleave",this.mouseleave),this.view.dom.removeEventListener("mousemove",this.mousemove)}};let b=c.StateEffect.define(),S=b.of(null);n.closeHoverTooltips=S,n.getTooltip=function(t,n){let i=t.plugin(d);if(!i)return null;let o=i.manager.tooltips.indexOf(n);return o<0?null:i.manager.tooltipViews[o]},n.hasHoverTooltips=function(t){return t.facet(y).some(t=>t)},n.hoverTooltip=function(t,n={}){let i=c.StateEffect.define(),u=c.StateField.define({create:()=>null,update(t,o){if(t&&n.hideOnChange&&(o.docChanged||o.selection))return null;for(let t of o.effects){if(t.is(i))return t.value;if(t.is(b))return null}if(t&&o.docChanged){let n=o.changes.mapPos(t.pos,-1,c.MapMode.TrackDel);if(null==n)return null;let i=Object.assign(Object.create(null),t);return i.pos=n,null!=t.end&&(i.end=o.changes.mapPos(t.end)),i}return t},provide:t=>y.from(t)});return[u,o.ViewPlugin.define(o=>new HoverPlugin(o,t,u,i,n.hoverTime||300)),w]},n.repositionTooltips=function(t){var n;null===(n=t.plugin(d))||void 0===n||n.maybeMeasure()},n.showTooltip=v,n.tooltips=function(t={}){return f.of(t)}},6393:function(t,n){"use strict";Object.defineProperty(n,"__esModule",{value:!0});let i=0;let Range=class Range{constructor(t,n){this.from=t,this.to=n}};let NodeProp=class NodeProp{constructor(t={}){this.id=i++,this.perNode=!!t.perNode,this.deserialize=t.deserialize||(()=>{throw Error("This node type doesn't define a deserialize function")})}add(t){if(this.perNode)throw RangeError("Can't add per-node props to node types");return"function"!=typeof t&&(t=NodeType.match(t)),n=>{let i=t(n);return void 0===i?null:[this,i]}}};NodeProp.closedBy=new NodeProp({deserialize:t=>t.split(" ")}),NodeProp.openedBy=new NodeProp({deserialize:t=>t.split(" ")}),NodeProp.group=new NodeProp({deserialize:t=>t.split(" ")}),NodeProp.contextHash=new NodeProp({perNode:!0}),NodeProp.lookAhead=new NodeProp({perNode:!0}),NodeProp.mounted=new NodeProp({perNode:!0});let MountedTree=class MountedTree{constructor(t,n,i){this.tree=t,this.overlay=n,this.parser=i}};let o=Object.create(null);let NodeType=class NodeType{constructor(t,n,i,o=0){this.name=t,this.props=n,this.id=i,this.flags=o}static define(t){let n=t.props&&t.props.length?Object.create(null):o,i=(t.top?1:0)|(t.skipped?2:0)|(t.error?4:0)|(null==t.name?8:0),c=new NodeType(t.name||"",n,t.id,i);if(t.props){for(let i of t.props)if(Array.isArray(i)||(i=i(c)),i){if(i[0].perNode)throw RangeError("Can't store a per-node prop on a node type");n[i[0].id]=i[1]}}return c}prop(t){return this.props[t.id]}get isTop(){return(1&this.flags)>0}get isSkipped(){return(2&this.flags)>0}get isError(){return(4&this.flags)>0}get isAnonymous(){return(8&this.flags)>0}is(t){if("string"==typeof t){if(this.name==t)return!0;let n=this.prop(NodeProp.group);return!!n&&n.indexOf(t)>-1}return this.id==t}static match(t){let n=Object.create(null);for(let i in t)for(let o of i.split(" "))n[o]=t[i];return t=>{for(let i=t.prop(NodeProp.group),o=-1;o<(i?i.length:0);o++){let c=n[o<0?t.name:i[o]];if(c)return c}}}};NodeType.none=new NodeType("",Object.create(null),0,8);let NodeSet=class NodeSet{constructor(t){this.types=t;for(let n=0;nt.node;;){let u=!1;if(t.from<=c&&t.to>=o&&(t.type.isAnonymous||!1!==n(t.type,t.from,t.to,get))){if(t.firstChild())continue;t.type.isAnonymous||(u=!0)}for(;u&&i&&i(t.type,t.from,t.to,get),u=t.type.isAnonymous,!t.nextSibling();){if(!t.parent())return;u=!0}}}prop(t){return t.perNode?this.props?this.props[t.id]:void 0:this.type.prop(t)}get propValues(){let t=[];if(this.props)for(let n in this.props)t.push([+n,this.props[n]]);return t}balance(t={}){return this.children.length<=8?this:balanceRange(NodeType.none,this.children,this.positions,0,this.children.length,0,this.length,(t,n,i)=>new Tree(this.type,t,n,i,this.propValues),t.makeTree||((t,n,i)=>new Tree(NodeType.none,t,n,i)))}static build(t){return function(t){var n;let{buffer:i,nodeSet:o,maxBufferLength:c=1024,reused:u=[],minRepeatType:h=o.types.length}=t,f=Array.isArray(i)?new FlatBufferCursor(i,i.length):i,d=o.types,m=0,g=0;function makeRepeatLeaf(t,n,i,c,u,h,f,d){let m=[],g=[];for(;t.length>c;)m.push(t.pop()),g.push(n.pop()+i-u);t.push(makeTree(o.types[f],m,g,h-u,d-h)),n.push(u-i)}function makeTree(t,n,i,o,c=0,u){if(m){let t=[NodeProp.contextHash,m];u=u?[t].concat(u):[t]}if(c>25){let t=[NodeProp.lookAhead,c];u=u?[t].concat(u):[t]}return new Tree(t,n,i,o,u)}let v=[],y=[];for(;f.pos>0;)!function takeNode(t,n,i,v,y){let{id:w,start:b,end:S,size:x}=f,C=g;for(;x<0;){if(f.next(),-1==x){let n=u[w];i.push(n),v.push(b-t);return}if(-3==x){m=w;return}if(-4==x){g=w;return}throw RangeError(`Unrecognized record size: ${x}`)}let _=d[w],E,T,P=b-t;if(S-b<=c&&(T=function(t,n){let i=f.fork(),o=0,u=0,d=0,m=i.end-c,g={size:0,start:0,skip:0};n:for(let c=i.pos-t;i.pos>c;){let t=i.size;if(i.id==n&&t>=0){g.size=o,g.start=u,g.skip=d,d+=4,o+=4,i.next();continue}let f=i.pos-t;if(t<0||f=h?4:0,y=i.start;for(i.next();i.pos>f;){if(i.size<0){if(-3==i.size)v+=4;else break n}else i.id>=h&&(v+=4);i.next()}u=y,o+=t,d+=v}return(n<0||o==t)&&(g.size=o,g.start=u,g.skip=d),g.size>4?g:void 0}(f.pos-n,y))){let n=new Uint16Array(T.size-T.skip),i=f.pos-T.size,c=n.length;for(;f.pos>i;)c=function copyToBuffer(t,n,i){let{id:o,start:c,end:u,size:d}=f;if(f.next(),d>=0&&o4){let o=f.pos-(d-4);for(;f.pos>o;)i=copyToBuffer(t,n,i)}n[--i]=h,n[--i]=u-t,n[--i]=c-t,n[--i]=o}else -3==d?m=o:-4==d&&(g=o);return i}(T.start,n,c);E=new TreeBuffer(n,S-T.start,o),P=T.start-t}else{let t=f.pos-x;f.next();let n=[],i=[],o=w>=h?w:-1,u=0,d=S;for(;f.pos>t;)o>=0&&f.id==o&&f.size>=0?(f.end<=d-c&&(makeRepeatLeaf(n,i,b,u,f.end,d,o,C),u=n.length,d=f.end),f.next()):takeNode(b,t,n,i,o);if(o>=0&&u>0&&u-1&&u>0){let t=function(t){return(n,i,o)=>{let c=0,u=n.length-1,h,f;if(u>=0&&(h=n[u])instanceof Tree){if(!u&&h.type==t&&h.length==o)return h;(f=h.prop(NodeProp.lookAhead))&&(c=i[u]+h.length+f)}return makeTree(t,n,i,o,c)}}(_);E=balanceRange(_,n,i,0,n.length,0,S-b,t,t)}else E=makeTree(_,n,i,S-b,C-S)}i.push(E),v.push(P)}(t.start||0,t.bufferStart||0,v,y,-1);let w=null!==(n=t.length)&&void 0!==n?n:v.length?y[0]+v[0].length:0;return new Tree(d[t.topID],v.reverse(),y.reverse(),w)}(t)}};Tree.empty=new Tree(NodeType.none,[],[],0);let FlatBufferCursor=class FlatBufferCursor{constructor(t,n){this.buffer=t,this.index=n}get id(){return this.buffer[this.index-4]}get start(){return this.buffer[this.index-3]}get end(){return this.buffer[this.index-2]}get size(){return this.buffer[this.index-1]}get pos(){return this.index}next(){this.index-=4}fork(){return new FlatBufferCursor(this.buffer,this.index)}};let TreeBuffer=class TreeBuffer{constructor(t,n,i){this.buffer=t,this.length=n,this.set=i}get type(){return NodeType.none}toString(){let t=[];for(let n=0;n0)));f=u[f+3]);return h}slice(t,n,i,o){let c=this.buffer,u=new Uint16Array(n-t);for(let o=t,h=0;o=n&&in;case 1:return i<=n&&o>n;case 2:return o>n;case 4:return!0}}function enterUnfinishedNodesBefore(t,n){let i=t.childBefore(n);for(;i;){let n=i.lastChild;if(!n||n.to!=i.to)break;n.type.isError&&n.from==n.to?(t=i,i=n.prevSibling):i=n}return t}function resolveNode(t,n,i,o){for(var c;t.from==t.to||(i<1?t.from>=n:t.from>n)||(i>-1?t.to<=n:t.to0?h.length:-1;t!=d;t+=n){let d=h[t],m=f[t]+u._from;if(checkSide(o,i,m,m+d.length)){if(d instanceof TreeBuffer){if(2&c)continue;let h=d.findChild(0,d.buffer.length,n,i-m,o);if(h>-1)return new BufferNode(new BufferContext(u,d,t,m),null,h)}else if(1&c||!d.type.isAnonymous||hasChild(d)){let h;if(!(1&c)&&d.props&&(h=d.prop(NodeProp.mounted))&&!h.overlay)return new TreeNode(h.tree,m,t,u);let f=new TreeNode(d,m,t,u);return 1&c||!f.type.isAnonymous?f:f.nextChild(n<0?d.children.length-1:0,n,i,o)}}}if(1&c||!u.type.isAnonymous||(t=u.index>=0?u.index+n:n<0?-1:u._parent.node.children.length,!(u=u._parent)))return null}}get firstChild(){return this.nextChild(0,1,0,4)}get lastChild(){return this.nextChild(this.node.children.length-1,-1,0,4)}childAfter(t){return this.nextChild(0,1,t,2)}childBefore(t){return this.nextChild(this.node.children.length-1,-1,t,-2)}enter(t,n,i=!0,o=!0){let c;if(i&&(c=this.node.prop(NodeProp.mounted))&&c.overlay){let i=t-this.from;for(let{from:t,to:o}of c.overlay)if((n>0?t<=i:t=i:o>i))return new TreeNode(c.tree,c.overlay[0].from+this.from,-1,this)}return this.nextChild(0,1,t,n,o?0:2)}nextSignificantParent(){let t=this;for(;t.type.isAnonymous&&t._parent;)t=t._parent;return t}get parent(){return this._parent?this._parent.nextSignificantParent():null}get nextSibling(){return this._parent&&this.index>=0?this._parent.nextChild(this.index+1,1,0,4):null}get prevSibling(){return this._parent&&this.index>=0?this._parent.nextChild(this.index-1,-1,0,4):null}get cursor(){return new TreeCursor(this)}get tree(){return this.node}toTree(){return this.node}resolve(t,n=0){return resolveNode(this,t,n,!1)}resolveInner(t,n=0){return resolveNode(this,t,n,!0)}enterUnfinishedNodesBefore(t){return enterUnfinishedNodesBefore(this,t)}getChild(t,n=null,i=null){let o=getChildren(this,t,n,i);return o.length?o[0]:null}getChildren(t,n=null,i=null){return getChildren(this,t,n,i)}toString(){return this.node.toString()}};function getChildren(t,n,i,o){let c=t.cursor,u=[];if(!c.firstChild())return u;if(null!=i){for(;!c.type.is(i);)if(!c.nextSibling())return u}for(;;){if(null!=o&&c.type.is(o))return u;if(c.type.is(n)&&u.push(c.node),!c.nextSibling())return null==o?u:[]}}let BufferContext=class BufferContext{constructor(t,n,i,o){this.parent=t,this.buffer=n,this.index=i,this.start=o}};let BufferNode=class BufferNode{constructor(t,n,i){this.context=t,this._parent=n,this.index=i,this.type=t.buffer.set.types[t.buffer.buffer[i]]}get name(){return this.type.name}get from(){return this.context.start+this.context.buffer.buffer[this.index+1]}get to(){return this.context.start+this.context.buffer.buffer[this.index+2]}child(t,n,i){let{buffer:o}=this.context,c=o.findChild(this.index+4,o.buffer[this.index+3],t,n-this.context.start,i);return c<0?null:new BufferNode(this.context,this,c)}get firstChild(){return this.child(1,0,4)}get lastChild(){return this.child(-1,0,4)}childAfter(t){return this.child(1,t,2)}childBefore(t){return this.child(-1,t,-2)}enter(t,n,i,o=!0){if(!o)return null;let{buffer:c}=this.context,u=c.findChild(this.index+4,c.buffer[this.index+3],n>0?1:-1,t-this.context.start,n);return u<0?null:new BufferNode(this.context,this,u)}get parent(){return this._parent||this.context.parent.nextSignificantParent()}externalSibling(t){return this._parent?null:this.context.parent.nextChild(this.context.index+t,t,0,4)}get nextSibling(){let{buffer:t}=this.context,n=t.buffer[this.index+3];return n<(this._parent?t.buffer[this._parent.index+3]:t.buffer.length)?new BufferNode(this.context,this._parent,n):this.externalSibling(1)}get prevSibling(){let{buffer:t}=this.context,n=this._parent?this._parent.index+4:0;return this.index==n?this.externalSibling(-1):new BufferNode(this.context,this._parent,t.findChild(n,this.index,-1,0,4))}get cursor(){return new TreeCursor(this)}get tree(){return null}toTree(){let t=[],n=[],{buffer:i}=this.context,o=this.index+4,c=i.buffer[this.index+3];if(c>o){let u=i.buffer[this.index+1],h=i.buffer[this.index+2];t.push(i.slice(o,c,u,h)),n.push(0)}return new Tree(this.type,t,n,this.to-this.from)}resolve(t,n=0){return resolveNode(this,t,n,!1)}resolveInner(t,n=0){return resolveNode(this,t,n,!0)}enterUnfinishedNodesBefore(t){return enterUnfinishedNodesBefore(this,t)}toString(){return this.context.buffer.childString(this.index)}getChild(t,n=null,i=null){let o=getChildren(this,t,n,i);return o.length?o[0]:null}getChildren(t,n=null,i=null){return getChildren(this,t,n,i)}};let TreeCursor=class TreeCursor{constructor(t,n=0){if(this.mode=n,this.buffer=null,this.stack=[],this.index=0,this.bufferNode=null,t instanceof TreeNode)this.yieldNode(t);else{this._tree=t.context.parent,this.buffer=t.context;for(let n=t._parent;n;n=n._parent)this.stack.unshift(n.index);this.bufferNode=t,this.yieldBuf(t.index)}}get name(){return this.type.name}yieldNode(t){return!!t&&(this._tree=t,this.type=t.type,this.from=t.from,this.to=t.to,!0)}yieldBuf(t,n){this.index=t;let{start:i,buffer:o}=this.buffer;return this.type=n||o.set.types[o.buffer[t]],this.from=i+o.buffer[t+1],this.to=i+o.buffer[t+2],!0}yield(t){return!!t&&(t instanceof TreeNode?(this.buffer=null,this.yieldNode(t)):(this.buffer=t.context,this.yieldBuf(t.index,t.type)))}toString(){return this.buffer?this.buffer.buffer.childString(this.index):this._tree.toString()}enterChild(t,n,i){if(!this.buffer)return this.yield(this._tree.nextChild(t<0?this._tree.node.children.length-1:0,t,n,i,this.mode));let{buffer:o}=this.buffer,c=o.findChild(this.index+4,o.buffer[this.index+3],t,n-this.buffer.start,i);return!(c<0)&&(this.stack.push(this.index),this.yieldBuf(c))}firstChild(){return this.enterChild(1,0,4)}lastChild(){return this.enterChild(-1,0,4)}childAfter(t){return this.enterChild(1,t,2)}childBefore(t){return this.enterChild(-1,t,-2)}enter(t,n,i=!0,o=!0){return this.buffer?!!o&&this.enterChild(1,t,n):this.yield(this._tree.enter(t,n,i&&!(1&this.mode),o))}parent(){if(!this.buffer)return this.yieldNode(1&this.mode?this._tree._parent:this._tree.parent);if(this.stack.length)return this.yieldBuf(this.stack.pop());let t=1&this.mode?this.buffer.parent:this.buffer.parent.nextSignificantParent();return this.buffer=null,this.yieldNode(t)}sibling(t){if(!this.buffer)return!!this._tree._parent&&this.yield(this._tree.index<0?null:this._tree._parent.nextChild(this._tree.index+t,t,0,4,this.mode));let{buffer:n}=this.buffer,i=this.stack.length-1;if(t<0){let t=i<0?0:this.stack[i]+4;if(this.index!=t)return this.yieldBuf(n.findChild(t,this.index,-1,0,4))}else{let t=n.buffer[this.index+3];if(t<(i<0?n.buffer.length:n.buffer[this.stack[i]+3]))return this.yieldBuf(t)}return i<0&&this.yield(this.buffer.parent.nextChild(this.buffer.index+t,t,0,4,this.mode))}nextSibling(){return this.sibling(1)}prevSibling(){return this.sibling(-1)}atLastNode(t){let n,i,{buffer:o}=this;if(o){if(t>0){if(this.index-1)for(let o=n+t,c=t<0?-1:i.node.children.length;o!=c;o+=t){let t=i.node.children[o];if(1&this.mode||t instanceof TreeBuffer||!t.type.isAnonymous||hasChild(t))return!1}return!0}move(t,n){if(n&&this.enterChild(t,0,4))return!0;for(;;){if(this.sibling(t))return!0;if(this.atLastNode(t)||!this.parent())return!1}}next(t=!0){return this.move(1,t)}prev(t=!0){return this.move(-1,t)}moveTo(t,n=0){for(;(this.from==this.to||(n<1?this.from>=t:this.from>t)||(n>-1?this.to<=t:this.to=0;){for(let u=t;u;u=u._parent)if(u.index==o){if(o==this.index)return u;n=u,i=c+1;break n}o=this.stack[--c]}for(let t=i;tt instanceof TreeBuffer||!t.type.isAnonymous||hasChild(t))}let h=new WeakMap;function nodeSize(t,n){if(!t.isAnonymous||n instanceof TreeBuffer||n.type!=t)return 1;let i=h.get(n);if(null==i){for(let o of(i=1,n.children)){if(o.type!=t||!(o instanceof Tree)){i=1;break}i+=nodeSize(t,o)}h.set(n,i)}return i}function balanceRange(t,n,i,o,c,u,h,f,d){let m=0;for(let i=o;i=g)break;w+=i}if(f==o+1){if(w>g){let t=n[o];divide(t.children,t.positions,0,t.children.length,i[o]+h);continue}v.push(n[o])}else{let c=i[f-1]+n[f-1].length-m;v.push(balanceRange(t,n,i,o,f,m,c,null,d))}y.push(m+h-u)}}(n,i,o,c,0),(f||d)(v,y,h)}let TreeFragment=class TreeFragment{constructor(t,n,i,o,c=!1,u=!1){this.from=t,this.to=n,this.tree=i,this.offset=o,this.open=(c?1:0)|(u?2:0)}get openStart(){return(1&this.open)>0}get openEnd(){return(2&this.open)>0}static addTree(t,n=[],i=!1){let o=[new TreeFragment(0,t.length,t,0,!1,i)];for(let i of n)i.to>t.length&&o.push(i);return o}static applyChanges(t,n,i=128){if(!n.length)return t;let o=[],c=1,u=t.length?t[0]:null;for(let h=0,f=0,d=0;;h++){let m=h=i)for(;u&&u.from=n.from||g<=n.to||d){let t=Math.max(n.from,f)-d,i=Math.min(n.to,g)-d;n=t>=i?null:new TreeFragment(t,i,n.tree,n.offset+d,h>0,!!m)}if(n&&o.push(n),u.to>g)break;u=ct.frag.from<=o.from&&t.frag.to>=o.to&&t.mount.overlay);if(t)for(let i of t.mount.overlay){let c=i.from+t.pos,u=i.to+t.pos;c>=o.from&&u<=o.to&&!n.ranges.some(t=>t.fromc)&&n.ranges.push({from:c,to:u})}}h=!1}else if(i&&(u=function(t,n,i){for(let o of t){if(o.from>=i)break;if(o.to>n)return o.from<=n&&o.to>=i?2:1}return 0}(i.ranges,o.from,o.to)))h=2!=u;else if(!o.type.isAnonymous&&o.from=n.to);o++);let h=c.children[o],f=h.buffer;c.children[o]=function split(t,i,o,c,d){let m=t;for(;f[m+2]+u<=n.from;)m=f[m+3];let g=[],v=[];sliceBuf(h,t,m,g,v,c);let y=f[m+1],w=f[m+2],b=y+u==n.from&&w+u==n.to&&f[m]==n.type.id;return g.push(b?n.toTree():split(m+4,f[m+3],h.set.types[f[m]],y,w-y)),v.push(y-c),sliceBuf(h,f[m+3],i,g,v,c),new Tree(o,g,v,d)}(0,f.length,NodeType.none,0,h.length);for(let o=0;o<=i;o++)t.childAfter(n.from)}(o);let u=t.findMounts(o.from,c.parser);if("function"==typeof c.overlay)n=new ActiveOverlay(c.parser,c.overlay,u,this.inner.length,o.from,o.tree,n);else{let t=punchRanges(this.ranges,c.overlay||[new Range(o.from,o.to)]);t.length&&this.inner.push(new InnerParse(c.parser,c.parser.startParse(this.input,enterFragments(u,t),t),c.overlay?c.overlay.map(t=>new Range(t.from-o.from,t.to-o.from)):null,o.tree,t)),c.overlay?t.length&&(i={ranges:t,depth:0,prev:i}):h=!1}}else n&&(f=n.predicate(o))&&(!0===f&&(f=new Range(o.from,o.to)),f.fromnew Range(t.from-n.start,t.to-n.start)),n.target,t)),n=n.prev}!i||--i.depth||(i=i.prev)}}}};function sliceBuf(t,n,i,o,c,u){if(n=t&&n.enter(i,1,!1,!1)||n.next(!1)||(this.done=!0)}hasNode(t){if(this.moveTo(t.from),!this.done&&this.cursor.from+this.offset==t.from&&this.cursor.tree)for(let n=this.cursor.tree;;){if(n==t.tree)return!0;if(n.children.length&&0==n.positions[0]&&n.children[0]instanceof Tree)n=n.children[0];else break}return!1}};let FragmentCursor=class FragmentCursor{constructor(t){var n;if(this.fragments=t,this.curTo=0,this.fragI=0,t.length){let i=this.curFrag=t[0];this.curTo=null!==(n=i.tree.prop(f))&&void 0!==n?n:i.to,this.inner=new StructureCursor(i.tree,-i.offset)}else this.curFrag=this.inner=null}hasNode(t){for(;this.curFrag&&t.from>=this.curTo;)this.nextFrag();return this.curFrag&&this.curFrag.from<=t.from&&this.curTo>=t.to&&this.inner.hasNode(t)}nextFrag(){var t;if(this.fragI++,this.fragI==this.fragments.length)this.curFrag=this.inner=null;else{let n=this.curFrag=this.fragments[this.fragI];this.curTo=null!==(t=n.tree.prop(f))&&void 0!==t?t:n.to,this.inner=new StructureCursor(n.tree,-n.offset)}}findMounts(t,n){var i;let o=[];if(this.inner){this.inner.cursor.moveTo(t,1);for(let t=this.inner.cursor.node;t;t=t.parent){let c=null===(i=t.tree)||void 0===i?void 0:i.prop(NodeProp.mounted);if(c&&c.parser==n)for(let n=this.fragI;n=t.to)break;i.tree==this.curFrag.tree&&o.push({frag:i,pos:t.from-i.offset,mount:c})}}}return o}};function punchRanges(t,n){let i=null,o=n;for(let c=1,u=0;c=f)break;!(t.to<=h)&&(i||(o=i=n.slice()),t.fromf&&i.splice(u+1,0,new Range(f,t.to))):t.to>f?i[u--]=new Range(f,t.to):i.splice(u--,1))}}return o}function enterFragments(t,n){let i=[];for(let{pos:o,mount:c,frag:u}of t){let t=o+(c.overlay?c.overlay[0].from:0),h=t+c.tree.length,f=Math.max(u.from,t),d=Math.min(u.to,h);if(c.overlay){let h=function(t,n,i,o){let c=0,u=0,h=!1,f=!1,d=-1e9,m=[];for(;;){let g=c==t.length?1e9:h?t[c].to:t[c].from,v=u==n.length?1e9:f?n[u].to:n[u].from;if(h!=f){let t=Math.max(d,i),n=Math.min(g,v,o);tnew Range(t.from+o,t.to+o)),f,d);for(let n=0,o=f;;n++){let f=n==h.length,m=f?d:h[n].from;if(m>o&&i.push(new TreeFragment(o,m,c.tree,-t,u.from>=o,u.to<=m)),f)break;o=h[n].to}}else i.push(new TreeFragment(f,d,c.tree,-t,u.from>=t,u.to<=h))}return i}n.DefaultBufferLength=1024,n.MountedTree=MountedTree,n.NodeProp=NodeProp,n.NodeSet=NodeSet,n.NodeType=NodeType,n.Parser=class{startParse(t,n,i){return"string"==typeof t&&(t=new StringInput(t)),i=i?i.length?i.map(t=>new Range(t.from,t.to)):[new Range(0,0)]:[new Range(0,t.length)],this.createParse(t,n||[],i)}parse(t,n,i){let o=this.startParse(t,n,i);for(;;){let t=o.advance();if(t)return t}}},n.Tree=Tree,n.TreeBuffer=TreeBuffer,n.TreeCursor=TreeCursor,n.TreeFragment=TreeFragment,n.parseMixed=function(t){return(n,i,o,c)=>new MixedParse(n,t,i,o,c)}},3842:function(t){"use strict";t.exports=function(){var t=arguments[0];"string"==typeof t&&(t=document.createElement(t));var n=1,i=arguments[1];if(i&&"object"==typeof i&&null==i.nodeType&&!Array.isArray(i)){for(var o in i)if(Object.prototype.hasOwnProperty.call(i,o)){var c=i[o];"string"==typeof c?t.setAttribute(o,c):null!=c&&(t[o]=c)}n++}for(;n-1&&(this.modules.splice(f,1),c--,f=-1),-1==f){if(this.modules.splice(c++,0,h),i)for(var d=0;dn.adoptedStyleSheets.indexOf(this.sheet)&&(n.adoptedStyleSheets=[this.sheet].concat(n.adoptedStyleSheets));else{for(var m="",g=0;g",191:"?",192:"~",219:"{",220:"|",221:"}",222:'"'},c="undefined"!=typeof navigator&&/Mac/.test(navigator.platform),u="undefined"!=typeof navigator&&/MSIE \d|Trident\/(?:[7-9]|\d{2,})\..*rv:(\d+)/.exec(navigator.userAgent),h=0;h<10;h++)i[48+h]=i[96+h]=String(h);for(var h=1;h<=24;h++)i[h+111]="F"+h;for(var h=65;h<=90;h++)i[h]=String.fromCharCode(h+32),o[h]=String.fromCharCode(h);for(var f in i)o.hasOwnProperty(f)||(o[f]=i[f]);n.base=i,n.keyName=function(t){var n=!(c&&t.metaKey&&t.shiftKey&&!t.ctrlKey&&!t.altKey||u&&t.shiftKey&&t.key&&1==t.key.length||"Unidentified"==t.key)&&t.key||(t.shiftKey?o:i)[t.keyCode]||t.key||"Unidentified";return"Esc"==n&&(n="Escape"),"Del"==n&&(n="Delete"),"Left"==n&&(n="ArrowLeft"),"Up"==n&&(n="ArrowUp"),"Right"==n&&(n="ArrowRight"),"Down"==n&&(n="ArrowDown"),n},n.shift=o},7026:function(t,n,i){"use strict";i.d(n,{Z:function(){return function cc(t){if("string"==typeof t||"number"==typeof t)return""+t;let n="";if(Array.isArray(t))for(let i=0,o;i{}};function dispatch(){for(var t,n=0,i=arguments.length,o={};n=0&&(n=t.slice(i+1),t=t.slice(0,i)),t&&!o.hasOwnProperty(t))throw Error("unknown type: "+t);return{type:t,name:n}}),u=-1,h=c.length;if(arguments.length<2){for(;++u0)for(var i,o,c=Array(i),u=0;u()=>t;function DragEvent(t,{sourceEvent:n,subject:i,target:o,identifier:c,active:u,x:h,y:f,dx:d,dy:m,dispatch:g}){Object.defineProperties(this,{type:{value:t,enumerable:!0,configurable:!0},sourceEvent:{value:n,enumerable:!0,configurable:!0},subject:{value:i,enumerable:!0,configurable:!0},target:{value:o,enumerable:!0,configurable:!0},identifier:{value:c,enumerable:!0,configurable:!0},active:{value:u,enumerable:!0,configurable:!0},x:{value:h,enumerable:!0,configurable:!0},y:{value:f,enumerable:!0,configurable:!0},dx:{value:d,enumerable:!0,configurable:!0},dy:{value:m,enumerable:!0,configurable:!0},_:{value:g}})}function defaultFilter(t){return!t.ctrlKey&&!t.button}function defaultContainer(){return this.parentNode}function defaultSubject(t,n){return null==n?{x:t.x,y:t.y}:n}function defaultTouchable(){return navigator.maxTouchPoints||"ontouchstart"in this}function drag(){var t,n,i,d,m=defaultFilter,g=defaultContainer,v=defaultSubject,y=defaultTouchable,w={},b=(0,o.Z)("start","drag","end"),S=0,x=0;function drag(t){t.on("mousedown.drag",mousedowned).filter(y).on("touchstart.drag",touchstarted).on("touchmove.drag",touchmoved,f.Q7).on("touchend.drag touchcancel.drag",touchended).style("touch-action","none").style("-webkit-tap-highlight-color","rgba(0,0,0,0)")}function mousedowned(o,u){if(!d&&m.call(this,o,u)){var v=beforestart(this,g.call(this,o,u),o,u,"mouse");v&&((0,c.Z)(o.view).on("mousemove.drag",mousemoved,f.Dd).on("mouseup.drag",mouseupped,f.Dd),(0,h.Z)(o.view),(0,f.rG)(o),i=!1,t=o.clientX,n=o.clientY,v("start",o))}}function mousemoved(o){if((0,f.ZP)(o),!i){var c=o.clientX-t,u=o.clientY-n;i=c*c+u*u>x}w.mouse("drag",o)}function mouseupped(t){(0,c.Z)(t.view).on("mousemove.drag mouseup.drag",null),(0,h.D)(t.view,i),(0,f.ZP)(t),w.mouse("end",t)}function touchstarted(t,n){if(m.call(this,t,n)){var i,o,c=t.changedTouches,u=g.call(this,t,n),h=c.length;for(i=0;i=0&&"xmlns"!==(n=t.slice(0,i))&&(t=t.slice(i+1)),o.Z.hasOwnProperty(n)?{space:o.Z[n],local:t}:t}},3246:function(t,n,i){"use strict";i.d(n,{P:function(){return o}});var o="http://www.w3.org/1999/xhtml";n.Z={svg:"http://www.w3.org/2000/svg",xhtml:o,xlink:"http://www.w3.org/1999/xlink",xml:"http://www.w3.org/XML/1998/namespace",xmlns:"http://www.w3.org/2000/xmlns/"}},9398:function(t,n,i){"use strict";function pointer(t,n){if(t=function(t){let n;for(;n=t.sourceEvent;)t=n;return t}(t),void 0===n&&(n=t.currentTarget),n){var i=n.ownerSVGElement||n;if(i.createSVGPoint){var o=i.createSVGPoint();return o.x=t.clientX,o.y=t.clientY,[(o=o.matrixTransform(n.getScreenCTM().inverse())).x,o.y]}if(n.getBoundingClientRect){var c=n.getBoundingClientRect();return[t.clientX-c.left-n.clientLeft,t.clientY-c.top-n.clientTop]}}return[t.pageX,t.pageY]}i.d(n,{Z:function(){return pointer}})},7947:function(t,n,i){"use strict";i.d(n,{Z:function(){return __WEBPACK_DEFAULT_EXPORT__}});var o=i(5333);function __WEBPACK_DEFAULT_EXPORT__(t){return"string"==typeof t?new o.Y1([[document.querySelector(t)]],[document.documentElement]):new o.Y1([[t]],o.Jz)}},5333:function(t,n,i){"use strict";i.d(n,{Y1:function(){return Selection},ZP:function(){return w},Jz:function(){return y}});var o=i(3763),c=i(5236),u=i(5749),h=Array.prototype.find;function childFirst(){return this.firstElementChild}var f=Array.prototype.filter;function children(){return Array.from(this.children)}function sparse(t){return Array(t.length)}function EnterNode(t,n){this.ownerDocument=t.ownerDocument,this.namespaceURI=t.namespaceURI,this._next=null,this._parent=t,this.__data__=n}function bindIndex(t,n,i,o,c,u){for(var h,f=0,d=n.length,m=u.length;fn?1:t>=n?0:NaN}EnterNode.prototype={constructor:EnterNode,appendChild:function(t){return this._parent.insertBefore(t,this._next)},insertBefore:function(t,n){return this._parent.insertBefore(t,n)},querySelector:function(t){return this._parent.querySelector(t)},querySelectorAll:function(t){return this._parent.querySelectorAll(t)}};var d=i(2075),m=i(5816);function classArray(t){return t.trim().split(/^|\s+/)}function classList(t){return t.classList||new ClassList(t)}function ClassList(t){this._node=t,this._names=classArray(t.getAttribute("class")||"")}function classedAdd(t,n){for(var i=classList(t),o=-1,c=n.length;++othis._names.indexOf(t)&&(this._names.push(t),this._node.setAttribute("class",this._names.join(" ")))},remove:function(t){var n=this._names.indexOf(t);n>=0&&(this._names.splice(n,1),this._node.setAttribute("class",this._names.join(" ")))},contains:function(t){return this._names.indexOf(t)>=0}};var g=i(3246);function creator(t){var n=(0,d.Z)(t);return(n.local?function(t){return function(){return this.ownerDocument.createElementNS(t.space,t.local)}}:function(t){return function(){var n=this.ownerDocument,i=this.namespaceURI;return i===g.P&&n.documentElement.namespaceURI===g.P?n.createElement(t):n.createElementNS(i,t)}})(n)}function constantNull(){return null}function remove(){var t=this.parentNode;t&&t.removeChild(this)}function selection_cloneShallow(){var t=this.cloneNode(!1),n=this.parentNode;return n?n.insertBefore(t,this.nextSibling):t}function selection_cloneDeep(){var t=this.cloneNode(!0),n=this.parentNode;return n?n.insertBefore(t,this.nextSibling):t}function onRemove(t){return function(){var n=this.__on;if(n){for(var i,o=0,c=-1,u=n.length;o=L&&(L=P+1);!(T=x[L])&&++L=0;)(o=c[u])&&(h&&4^o.compareDocumentPosition(h)&&h.parentNode.insertBefore(o,h),h=o);return this},sort:function(t){function compareNode(n,i){return n&&i?t(n.__data__,i.__data__):!n-!i}t||(t=ascending);for(var n=this._groups,i=n.length,o=Array(i),c=0;c1?this.each((null==n?function(t){return function(){delete this[t]}}:"function"==typeof n?function(t,n){return function(){var i=n.apply(this,arguments);null==i?delete this[t]:this[t]=i}}:function(t,n){return function(){this[t]=n}})(t,n)):this.node()[t]},classed:function(t,n){var i=classArray(t+"");if(arguments.length<2){for(var o=classList(this.node()),c=-1,u=i.length;++c=0&&(n=t.slice(i+1),t=t.slice(0,i)),{type:t,name:n}}),h=u.length;if(arguments.length<2){var f=this.node().__on;if(f){for(var d,m=0,g=f.length;m1?this.each((null==n?function(t){return function(){this.style.removeProperty(t)}}:"function"==typeof n?function(t,n,i){return function(){var o=n.apply(this,arguments);null==o?this.style.removeProperty(t):this.style.setProperty(t,o,i)}}:function(t,n,i){return function(){this.style.setProperty(t,n,i)}})(t,n,null==i?"":i)):styleValue(this.node(),t)}function styleValue(t,n){return t.style.getPropertyValue(n)||(0,o.Z)(t).getComputedStyle(t,null).getPropertyValue(n)}},3763:function(t,n,i){"use strict";function none(){}function __WEBPACK_DEFAULT_EXPORT__(t){return null==t?none:function(){return this.querySelector(t)}}i.d(n,{Z:function(){return __WEBPACK_DEFAULT_EXPORT__}})},5236:function(t,n,i){"use strict";function empty(){return[]}function __WEBPACK_DEFAULT_EXPORT__(t){return null==t?empty:function(){return this.querySelectorAll(t)}}i.d(n,{Z:function(){return __WEBPACK_DEFAULT_EXPORT__}})},7399:function(t,n,i){"use strict";function __WEBPACK_DEFAULT_EXPORT__(t){return t.ownerDocument&&t.ownerDocument.defaultView||t.document&&t||t.defaultView}i.d(n,{Z:function(){return __WEBPACK_DEFAULT_EXPORT__}})},2198:function(t,n,i){"use strict";i.d(n,{sP:function(){return zoom},CR:function(){return ed}});var o,c=i(1222),u=i(471);function cosh(t){return((t=Math.exp(t))+1/t)/2}var h,f,d=function zoomRho(t,n,i){function zoom(o,c){var u,h,f=o[0],d=o[1],m=o[2],g=c[0],v=c[1],y=c[2],w=g-f,b=v-d,S=w*w+b*b;if(S<1e-12)h=Math.log(y/m)/t,u=function(n){return[f+n*w,d+n*b,m*Math.exp(t*n*h)]};else{var x=Math.sqrt(S),C=(y*y-m*m+i*S)/(2*m*n*x),_=(y*y-m*m-i*S)/(2*y*n*x),E=Math.log(Math.sqrt(C*C+1)-C);h=(Math.log(Math.sqrt(_*_+1)-_)-E)/t,u=function(i){var o,c,u=i*h,g=cosh(E),v=m/(n*x)*(g*(((o=Math.exp(2*(o=t*u+E)))-1)/(o+1))-((c=Math.exp(c=E))-1/c)/2);return[f+v*w,d+v*b,m*g/cosh(t*u+E)]}}return u.duration=1e3*h*t/Math.SQRT2,u}return zoom.rho=function(t){var n=Math.max(.001,+t),i=n*n,o=i*i;return zoomRho(n,i,o)},zoom}(Math.SQRT2,2,4),m=i(7947),g=i(9398),v=i(5333),y=0,w=0,b=0,S=0,x=0,C=0,_="object"==typeof performance&&performance.now?performance:Date,E="object"==typeof window&&window.requestAnimationFrame?window.requestAnimationFrame.bind(window):function(t){setTimeout(t,17)};function now(){return x||(E(clearNow),x=_.now()+C)}function clearNow(){x=0}function Timer(){this._call=this._time=this._next=null}function timer(t,n,i){var o=new Timer;return o.restart(t,n,i),o}function wake(){x=(S=_.now())+C,y=w=0;try{!function(){now(),++y;for(var t,n=h;n;)(t=x-n._time)>=0&&n._call.call(void 0,t),n=n._next;--y}()}finally{y=0,function(){for(var t,n,i=h,o=1/0;i;)i._call?(o>i._time&&(o=i._time),t=i,i=i._next):(n=i._next,i._next=null,i=t?t._next=n:h=n);f=t,sleep(o)}(),x=0}}function poke(){var t=_.now(),n=t-S;n>1e3&&(C-=n,S=t)}function sleep(t){!y&&(w&&(w=clearTimeout(w)),t-x>24?(t<1/0&&(w=setTimeout(wake,t-_.now()-C)),b&&(b=clearInterval(b))):(b||(S=_.now(),b=setInterval(poke,1e3)),y=1,E(wake)))}function src_timeout(t,n,i){var o=new Timer;return n=null==n?0:+n,o.restart(i=>{o.stop(),t(i+n)},n,i),o}Timer.prototype=timer.prototype={constructor:Timer,restart:function(t,n,i){if("function"!=typeof t)throw TypeError("callback is not a function");i=(null==i?now():+i)+(null==n?0:+n),this._next||f===this||(f?f._next=this:h=this,f=this),this._call=t,this._time=i,sleep()},stop:function(){this._call&&(this._call=null,this._time=1/0,sleep())}};var T=(0,c.Z)("start","end","cancel","interrupt"),P=[];function schedule(t,n,i,o,c,u){var h=t.__transition;if(h){if(i in h)return}else t.__transition={};!function(t,n,i){var o,c=t.__transition;function start(u){var h,f,d,m;if(1!==i.state)return stop();for(h in c)if((m=c[h]).name===i.name){if(3===m.state)return src_timeout(start);4===m.state?(m.state=6,m.timer.stop(),m.on.call("interrupt",t,t.__data__,m.index,m.group),delete c[h]):+h0)throw Error("too late; already scheduled");return i}function set(t,n){var i=get(t,n);if(i.state>3)throw Error("too late; already running");return i}function get(t,n){var i=t.__transition;if(!i||!(i=i[n]))throw Error("transition not found");return i}function interrupt(t,n){var i,o,c,u=t.__transition,h=!0;if(u){for(c in n=null==n?null:n+"",u){if((i=u[c]).name!==n){h=!1;continue}o=i.state>2&&i.state<5,i.state=6,i.timer.stop(),i.on.call(o?"interrupt":"cancel",t,t.__data__,i.index,i.group),delete u[c]}h&&delete t.__transition}}function number(t,n){return t=+t,n=+n,function(i){return t*(1-i)+n*i}}var L=180/Math.PI,I={translateX:0,translateY:0,rotate:0,skewX:0,scaleX:1,scaleY:1};function decompose(t,n,i,o,c,u){var h,f,d;return(h=Math.sqrt(t*t+n*n))&&(t/=h,n/=h),(d=t*i+n*o)&&(i-=t*d,o-=n*d),(f=Math.sqrt(i*i+o*o))&&(i/=f,o/=f,d/=f),t*o180?f+=360:f-h>180&&(h+=360),v.push({i:g.push(pop(g)+"rotate(",null,o)-2,x:number(h,f)})):f&&g.push(pop(g)+"rotate("+f+o),(d=c.skewX)!==(m=u.skewX)?v.push({i:g.push(pop(g)+"skewX(",null,o)-2,x:number(d,m)}):m&&g.push(pop(g)+"skewX("+m+o),!function(t,n,i,o,c,u){if(t!==i||n!==o){var h=c.push(pop(c)+"scale(",null,",",null,")");u.push({i:h-4,x:number(t,i)},{i:h-2,x:number(n,o)})}else(1!==i||1!==o)&&c.push(pop(c)+"scale("+i+","+o+")")}(c.scaleX,c.scaleY,u.scaleX,u.scaleY,g,v),c=u=null,function(t){for(var n,i=-1,o=v.length;++i>8&15|n>>4&240,n>>4&15|240&n,(15&n)<<4|15&n,1):8===i?rgba(n>>24&255,n>>16&255,n>>8&255,(255&n)/255):4===i?rgba(n>>12&15|n>>8&240,n>>8&15|n>>4&240,n>>4&15|240&n,((15&n)<<4|15&n)/255):null):(n=$.exec(t))?new Rgb(n[1],n[2],n[3],1):(n=q.exec(t))?new Rgb(255*n[1]/100,255*n[2]/100,255*n[3]/100,1):(n=G.exec(t))?rgba(n[1],n[2],n[3],n[4]):(n=Z.exec(t))?rgba(255*n[1]/100,255*n[2]/100,255*n[3]/100,n[4]):(n=Y.exec(t))?hsla(n[1],n[2]/100,n[3]/100,1):(n=X.exec(t))?hsla(n[1],n[2]/100,n[3]/100,n[4]):J.hasOwnProperty(t)?rgbn(J[t]):"transparent"===t?new Rgb(NaN,NaN,NaN,0):null}function rgbn(t){return new Rgb(t>>16&255,t>>8&255,255&t,1)}function rgba(t,n,i,o){return o<=0&&(t=n=i=NaN),new Rgb(t,n,i,o)}function color_rgb(t,n,i,o){var c;return 1==arguments.length?((c=t)instanceof Color||(c=color(c)),c)?(c=c.rgb(),new Rgb(c.r,c.g,c.b,c.opacity)):new Rgb:new Rgb(t,n,i,null==o?1:o)}function Rgb(t,n,i,o){this.r=+t,this.g=+n,this.b=+i,this.opacity=+o}function rgb_formatHex(){return`#${hex(this.r)}${hex(this.g)}${hex(this.b)}`}function rgb_formatRgb(){let t=clampa(this.opacity);return`${1===t?"rgb(":"rgba("}${clampi(this.r)}, ${clampi(this.g)}, ${clampi(this.b)}${1===t?")":`, ${t})`}`}function clampa(t){return isNaN(t)?1:Math.max(0,Math.min(1,t))}function clampi(t){return Math.max(0,Math.min(255,Math.round(t)||0))}function hex(t){return((t=clampi(t))<16?"0":"")+t.toString(16)}function hsla(t,n,i,o){return o<=0?t=n=i=NaN:i<=0||i>=1?t=n=NaN:n<=0&&(t=NaN),new Hsl(t,n,i,o)}function hslConvert(t){if(t instanceof Hsl)return new Hsl(t.h,t.s,t.l,t.opacity);if(t instanceof Color||(t=color(t)),!t)return new Hsl;if(t instanceof Hsl)return t;var n=(t=t.rgb()).r/255,i=t.g/255,o=t.b/255,c=Math.min(n,i,o),u=Math.max(n,i,o),h=NaN,f=u-c,d=(u+c)/2;return f?(h=n===u?(i-o)/f+(i0&&d<1?0:h,new Hsl(h,f,d,t.opacity)}function Hsl(t,n,i,o){this.h=+t,this.s=+n,this.l=+i,this.opacity=+o}function clamph(t){return(t=(t||0)%360)<0?t+360:t}function clampt(t){return Math.max(0,Math.min(1,t||0))}function hsl2rgb(t,n,i){return(t<60?n+(i-n)*t/60:t<180?i:t<240?n+(i-n)*(240-t)/60:n)*255}function basis(t,n,i,o,c){var u=t*t,h=u*t;return((1-3*t+3*u-h)*n+(4-6*u+3*h)*i+(1+3*t+3*u-3*h)*o+h*c)/6}src_define(Color,color,{copy(t){return Object.assign(new this.constructor,this,t)},displayable(){return this.rgb().displayable()},hex:color_formatHex,formatHex:color_formatHex,formatHex8:function(){return this.rgb().formatHex8()},formatHsl:function(){return hslConvert(this).formatHsl()},formatRgb:color_formatRgb,toString:color_formatRgb}),src_define(Rgb,color_rgb,extend(Color,{brighter(t){return t=null==t?1.4285714285714286:Math.pow(1.4285714285714286,t),new Rgb(this.r*t,this.g*t,this.b*t,this.opacity)},darker(t){return t=null==t?.7:Math.pow(.7,t),new Rgb(this.r*t,this.g*t,this.b*t,this.opacity)},rgb(){return this},clamp(){return new Rgb(clampi(this.r),clampi(this.g),clampi(this.b),clampa(this.opacity))},displayable(){return -.5<=this.r&&this.r<255.5&&-.5<=this.g&&this.g<255.5&&-.5<=this.b&&this.b<255.5&&0<=this.opacity&&this.opacity<=1},hex:rgb_formatHex,formatHex:rgb_formatHex,formatHex8:function(){return`#${hex(this.r)}${hex(this.g)}${hex(this.b)}${hex((isNaN(this.opacity)?1:this.opacity)*255)}`},formatRgb:rgb_formatRgb,toString:rgb_formatRgb})),src_define(Hsl,function(t,n,i,o){return 1==arguments.length?hslConvert(t):new Hsl(t,n,i,null==o?1:o)},extend(Color,{brighter(t){return t=null==t?1.4285714285714286:Math.pow(1.4285714285714286,t),new Hsl(this.h,this.s,this.l*t,this.opacity)},darker(t){return t=null==t?.7:Math.pow(.7,t),new Hsl(this.h,this.s,this.l*t,this.opacity)},rgb(){var t=this.h%360+(this.h<0)*360,n=isNaN(t)||isNaN(this.s)?0:this.s,i=this.l,o=i+(i<.5?i:1-i)*n,c=2*i-o;return new Rgb(hsl2rgb(t>=240?t-240:t+120,c,o),hsl2rgb(t,c,o),hsl2rgb(t<120?t+240:t-120,c,o),this.opacity)},clamp(){return new Hsl(clamph(this.h),clampt(this.s),clampt(this.l),clampa(this.opacity))},displayable(){return(0<=this.s&&this.s<=1||isNaN(this.s))&&0<=this.l&&this.l<=1&&0<=this.opacity&&this.opacity<=1},formatHsl(){let t=clampa(this.opacity);return`${1===t?"hsl(":"hsla("}${clamph(this.h)}, ${100*clampt(this.s)}%, ${100*clampt(this.l)}%${1===t?")":`, ${t})`}`}}));var src_constant=t=>()=>t;function nogamma(t,n){var i=n-t;return i?function(n){return t+n*i}:src_constant(isNaN(t)?n:t)}var en=function rgbGamma(t){var n,i=1==(n=+(n=t))?nogamma:function(t,i){var o,c,u;return i-t?(o=t,c=i,o=Math.pow(o,u=n),c=Math.pow(c,u)-o,u=1/u,function(t){return Math.pow(o+t*c,u)}):src_constant(isNaN(t)?i:t)};function rgb(t,n){var o=i((t=color_rgb(t)).r,(n=color_rgb(n)).r),c=i(t.g,n.g),u=i(t.b,n.b),h=nogamma(t.opacity,n.opacity);return function(n){return t.r=o(n),t.g=c(n),t.b=u(n),t.opacity=h(n),t+""}}return rgb.gamma=rgbGamma,rgb}(1);function rgbSpline(t){return function(n){var i,o,c=n.length,u=Array(c),h=Array(c),f=Array(c);for(i=0;i=1?(i=1,n-1):Math.floor(i*n),c=t[o],u=t[o+1],h=o>0?t[o-1]:2*c-u,f=of&&(h=n.slice(f,h),m[d]?m[d]+=h:m[++d]=h),(c=c[0])===(u=u[0])?m[d]?m[d]+=u:m[++d]=u:(m[++d]=null,g.push({i:d,x:number(c,u)})),f=ei.lastIndex;return f=0&&(t=t.slice(0,n)),!t||"start"===t})?init:set,function(){var h=c(this,u),f=h.on;f!==i&&(o=(i=f).copy()).on(t,n),h.on=o}))},attr:function(t,n){var i=(0,B.Z)(t),o="transform"===i?N:interpolate;return this.attrTween(t,"function"==typeof n?(i.local?function(t,n,i){var o,c,u;return function(){var h,f,d=i(this);return null==d?void this.removeAttributeNS(t.space,t.local):(h=this.getAttributeNS(t.space,t.local))===(f=d+"")?null:h===o&&f===c?u:(c=f,u=n(o=h,d))}}:function(t,n,i){var o,c,u;return function(){var h,f,d=i(this);return null==d?void this.removeAttribute(t):(h=this.getAttribute(t))===(f=d+"")?null:h===o&&f===c?u:(c=f,u=n(o=h,d))}})(i,o,tweenValue(this,"attr."+t,n)):null==n?(i.local?function(t){return function(){this.removeAttributeNS(t.space,t.local)}}:function(t){return function(){this.removeAttribute(t)}})(i):(i.local?function(t,n,i){var o,c,u=i+"";return function(){var h=this.getAttributeNS(t.space,t.local);return h===u?null:h===o?c:c=n(o=h,i)}}:function(t,n,i){var o,c,u=i+"";return function(){var h=this.getAttribute(t);return h===u?null:h===o?c:c=n(o=h,i)}})(i,o,n))},attrTween:function(t,n){var i="attr."+t;if(arguments.length<2)return(i=this.tween(i))&&i._value;if(null==n)return this.tween(i,null);if("function"!=typeof n)throw Error();var o=(0,B.Z)(t);return this.tween(i,(o.local?function(t,n){var i,o;function tween(){var c=n.apply(this,arguments);return c!==o&&(i=(o=c)&&function(n){this.setAttributeNS(t.space,t.local,c.call(this,n))}),i}return tween._value=n,tween}:function(t,n){var i,o;function tween(){var c=n.apply(this,arguments);return c!==o&&(i=(o=c)&&function(n){this.setAttribute(t,c.call(this,n))}),i}return tween._value=n,tween})(o,n))},style:function(t,n,i){var o,c,u,h,f,d,m,g,v,y,w,b,S,x,C,_,E,T,P,L,I,N="transform"==(t+="")?O:interpolate;return null==n?this.styleTween(t,(o=t,function(){var t=(0,ec.S)(this,o),n=(this.style.removeProperty(o),(0,ec.S)(this,o));return t===n?null:t===c&&n===u?h:h=N(c=t,u=n)})).on("end.style."+t,styleRemove(t)):"function"==typeof n?this.styleTween(t,(f=t,d=tweenValue(this,"style."+t,n),function(){var t=(0,ec.S)(this,f),n=d(this),i=n+"";return null==n&&(this.style.removeProperty(f),i=n=(0,ec.S)(this,f)),t===i?null:t===m&&i===g?v:(g=i,v=N(m=t,n))})).each((y=this._id,E="end."+(_="style."+(w=t)),function(){var t=set(this,y),n=t.on,i=null==t.value[_]?C||(C=styleRemove(w)):void 0;(n!==b||x!==i)&&(S=(b=n).copy()).on(E,x=i),t.on=S})):this.styleTween(t,(T=t,I=n+"",function(){var t=(0,ec.S)(this,T);return t===I?null:t===P?L:L=N(P=t,n)}),i).on("end.style."+t,null)},styleTween:function(t,n,i){var o="style."+(t+="");if(arguments.length<2)return(o=this.tween(o))&&o._value;if(null==n)return this.tween(o,null);if("function"!=typeof n)throw Error();return this.tween(o,function(t,n,i){var o,c;function tween(){var u=n.apply(this,arguments);return u!==c&&(o=(c=u)&&function(n){this.style.setProperty(t,u.call(this,n),i)}),o}return tween._value=n,tween}(t,n,null==i?"":i))},text:function(t){var n,i;return this.tween("text","function"==typeof t?(n=tweenValue(this,"text",t),function(){var t=n(this);this.textContent=null==t?"":t}):(i=null==t?"":t+"",function(){this.textContent=i}))},textTween:function(t){var n="text";if(arguments.length<1)return(n=this.tween(n))&&n._value;if(null==t)return this.tween(n,null);if("function"!=typeof t)throw Error();return this.tween(n,function(t){var n,i;function tween(){var o=t.apply(this,arguments);return o!==i&&(n=(i=o)&&function(t){this.textContent=o.call(this,t)}),n}return tween._value=t,tween}(t))},remove:function(){var t;return this.on("end.remove",(t=this._id,function(){var n=this.parentNode;for(var i in this.__transition)if(+i!==t)return;n&&n.removeChild(this)}))},tween:function(t,n){var i=this._id;if(t+="",arguments.length<2){for(var o,c=get(this.node(),i).tween,u=0,h=c.length;u()=>t;function ZoomEvent(t,{sourceEvent:n,target:i,transform:o,dispatch:c}){Object.defineProperties(this,{type:{value:t,enumerable:!0,configurable:!0},sourceEvent:{value:n,enumerable:!0,configurable:!0},target:{value:i,enumerable:!0,configurable:!0},transform:{value:o,enumerable:!0,configurable:!0},_:{value:c}})}function Transform(t,n,i){this.k=t,this.x=n,this.y=i}Transform.prototype={constructor:Transform,scale:function(t){return 1===t?this:new Transform(this.k*t,this.x,this.y)},translate:function(t,n){return 0===t&0===n?this:new Transform(this.k,this.x+this.k*t,this.y+this.k*n)},apply:function(t){return[t[0]*this.k+this.x,t[1]*this.k+this.y]},applyX:function(t){return t*this.k+this.x},applyY:function(t){return t*this.k+this.y},invert:function(t){return[(t[0]-this.x)/this.k,(t[1]-this.y)/this.k]},invertX:function(t){return(t-this.x)/this.k},invertY:function(t){return(t-this.y)/this.k},rescaleX:function(t){return t.copy().domain(t.range().map(this.invertX,this).map(t.invert,t))},rescaleY:function(t){return t.copy().domain(t.range().map(this.invertY,this).map(t.invert,t))},toString:function(){return"translate("+this.x+","+this.y+") scale("+this.k+")"}};var ed=new Transform(1,0,0);function nopropagation(t){t.stopImmediatePropagation()}function noevent(t){t.preventDefault(),t.stopImmediatePropagation()}function defaultFilter(t){return(!t.ctrlKey||"wheel"===t.type)&&!t.button}function defaultExtent(){var t=this;return t instanceof SVGElement?(t=t.ownerSVGElement||t).hasAttribute("viewBox")?[[(t=t.viewBox.baseVal).x,t.y],[t.x+t.width,t.y+t.height]]:[[0,0],[t.width.baseVal.value,t.height.baseVal.value]]:[[0,0],[t.clientWidth,t.clientHeight]]}function defaultTransform(){return this.__zoom||ed}function defaultWheelDelta(t){return-t.deltaY*(1===t.deltaMode?.05:t.deltaMode?1:.002)*(t.ctrlKey?10:1)}function defaultTouchable(){return navigator.maxTouchPoints||"ontouchstart"in this}function defaultConstrain(t,n,i){var o=t.invertX(n[0][0])-i[0][0],c=t.invertX(n[1][0])-i[1][0],u=t.invertY(n[0][1])-i[0][1],h=t.invertY(n[1][1])-i[1][1];return t.translate(c>o?(o+c)/2:Math.min(0,o)||Math.max(0,c),h>u?(u+h)/2:Math.min(0,u)||Math.max(0,h))}function zoom(){var t,n,i,o=defaultFilter,h=defaultExtent,f=defaultConstrain,v=defaultWheelDelta,y=defaultTouchable,w=[0,1/0],b=[[-1/0,-1/0],[1/0,1/0]],S=250,x=d,C=(0,c.Z)("start","zoom","end"),_=0,E=10;function zoom(t){t.property("__zoom",defaultTransform).on("wheel.zoom",wheeled,{passive:!1}).on("mousedown.zoom",mousedowned).on("dblclick.zoom",dblclicked).filter(y).on("touchstart.zoom",touchstarted).on("touchmove.zoom",touchmoved).on("touchend.zoom touchcancel.zoom",touchended).style("-webkit-tap-highlight-color","rgba(0,0,0,0)")}function scale(t,n){return(n=Math.max(w[0],Math.min(w[1],n)))===t.k?t:new Transform(n,t.x,t.y)}function translate(t,n,i){var o=n[0]-i[0]*t.k,c=n[1]-i[1]*t.k;return o===t.x&&c===t.y?t:new Transform(t.k,o,c)}function centroid(t){return[(+t[0][0]+ +t[1][0])/2,(+t[0][1]+ +t[1][1])/2]}function schedule(t,n,i,o){t.on("start.zoom",function(){gesture(this,arguments).event(o).start()}).on("interrupt.zoom end.zoom",function(){gesture(this,arguments).event(o).end()}).tween("zoom",function(){var t=arguments,c=gesture(this,t).event(o),u=h.apply(this,t),f=null==i?centroid(u):"function"==typeof i?i.apply(this,t):i,d=Math.max(u[1][0]-u[0][0],u[1][1]-u[0][1]),m=this.__zoom,g="function"==typeof n?n.apply(this,t):n,v=x(m.invert(f).concat(d/m.k),g.invert(f).concat(d/g.k));return function(t){if(1===t)t=g;else{var n=v(t),i=d/n[2];t=new Transform(i,f[0]-n[0]*i,f[1]-n[1]*i)}c.zoom(null,t)}})}function gesture(t,n,i){return!i&&t.__zooming||new Gesture(t,n)}function Gesture(t,n){this.that=t,this.args=n,this.active=0,this.sourceEvent=null,this.extent=h.apply(t,n),this.taps=0}function wheeled(t,...n){if(o.apply(this,arguments)){var i=gesture(this,n).event(t),c=this.__zoom,u=Math.max(w[0],Math.min(w[1],c.k*Math.pow(2,v.apply(this,arguments)))),h=(0,g.Z)(t);if(i.wheel)(i.mouse[0][0]!==h[0]||i.mouse[0][1]!==h[1])&&(i.mouse[1]=c.invert(i.mouse[0]=h)),clearTimeout(i.wheel);else{if(c.k===u)return;i.mouse=[h,c.invert(h)],interrupt(this),i.start()}noevent(t),i.wheel=setTimeout(function(){i.wheel=null,i.end()},150),i.zoom("mouse",f(translate(scale(c,u),i.mouse[0],i.mouse[1]),i.extent,b))}}function mousedowned(t,...n){if(!i&&o.apply(this,arguments)){var c=t.currentTarget,h=gesture(this,n,!0).event(t),d=(0,m.Z)(t.view).on("mousemove.zoom",function(t){if(noevent(t),!h.moved){var n=t.clientX-y,i=t.clientY-w;h.moved=n*n+i*i>_}h.event(t).zoom("mouse",f(translate(h.that.__zoom,h.mouse[0]=(0,g.Z)(t,c),h.mouse[1]),h.extent,b))},!0).on("mouseup.zoom",function(t){d.on("mousemove.zoom mouseup.zoom",null),(0,u.D)(t.view,h.moved),noevent(t),h.event(t).end()},!0),v=(0,g.Z)(t,c),y=t.clientX,w=t.clientY;(0,u.Z)(t.view),nopropagation(t),h.mouse=[v,this.__zoom.invert(v)],interrupt(this),h.start()}}function dblclicked(t,...n){if(o.apply(this,arguments)){var i=this.__zoom,c=(0,g.Z)(t.changedTouches?t.changedTouches[0]:t,this),u=i.invert(c),d=i.k*(t.shiftKey?.5:2),v=f(translate(scale(i,d),c,u),h.apply(this,n),b);noevent(t),S>0?(0,m.Z)(this).transition().duration(S).call(schedule,v,c,t):(0,m.Z)(this).call(zoom.transform,v,c,t)}}function touchstarted(i,...c){if(o.apply(this,arguments)){var u,h,f,d,m=i.touches,v=m.length,y=gesture(this,c,i.changedTouches.length===v).event(i);for(nopropagation(i),h=0;ht.length)&&(n=t.length);for(var i=0,o=Array(n);it;function useStore(t,n=identity,i){i&&!f&&(console.warn("[DEPRECATED] Use `createWithEqualityFn` instead of `create` or use `useStoreWithEqualityFn` instead of `useStore`. They can be imported from 'zustand/traditional'. https://github.com/pmndrs/zustand/discussions/1937"),f=!0);let o=h(t.subscribe,t.getState,t.getServerState||t.getInitialState,n,i);return u(o),o}},5945:function(t,n,i){"use strict";function shallow$1(t,n){if(Object.is(t,n))return!0;if("object"!=typeof t||null===t||"object"!=typeof n||null===n)return!1;if(t instanceof Map&&n instanceof Map){if(t.size!==n.size)return!1;for(let[i,o]of t)if(!Object.is(o,n.get(i)))return!1;return!0}if(t instanceof Set&&n instanceof Set){if(t.size!==n.size)return!1;for(let i of t)if(!n.has(i))return!1;return!0}let i=Object.keys(t);if(i.length!==Object.keys(n).length)return!1;for(let o of i)if(!Object.prototype.hasOwnProperty.call(n,o)||!Object.is(t[o],n[o]))return!1;return!0}i.d(n,{X:function(){return shallow$1}})},3979:function(t,n,i){"use strict";i.d(n,{M:function(){return createStore}});let createStoreImpl=t=>{let n;let i=new Set,setState=(t,o)=>{let c="function"==typeof t?t(n):t;if(!Object.is(c,n)){let t=n;n=(null!=o?o:"object"!=typeof c||null===c)?c:Object.assign({},n,c),i.forEach(i=>i(n,t))}},getState=()=>n,o={setState,getState,getInitialState:()=>c,subscribe:t=>(i.add(t),()=>i.delete(t)),destroy:()=>{console.warn("[DEPRECATED] The `destroy` method will be unsupported in a future version. Instead use unsubscribe function returned by subscribe. Everything will be garbage-collected if store is garbage-collected."),i.clear()}},c=n=t(setState,getState,o);return o},createStore=t=>t?createStoreImpl(t):createStoreImpl}}]); \ No newline at end of file diff --git a/frontend/webapp/dep-out/_next/static/chunks/374-debc3f236fbbf19c.js b/frontend/webapp/dep-out/_next/static/chunks/374-debc3f236fbbf19c.js deleted file mode 100644 index f441beb846..0000000000 --- a/frontend/webapp/dep-out/_next/static/chunks/374-debc3f236fbbf19c.js +++ /dev/null @@ -1,9 +0,0 @@ -"use strict";(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[374],{109:function(e,t,r){/** - * @license React - * use-sync-external-store-with-selector.production.min.js - * - * Copyright (c) Facebook, Inc. and its affiliates. - * - * This source code is licensed under the MIT license found in the - * LICENSE file in the root directory of this source tree. - */var n=r(2265),o="function"==typeof Object.is?Object.is:function(e,t){return e===t&&(0!==e||1/e==1/t)||e!=e&&t!=t},i=n.useSyncExternalStore,c=n.useRef,u=n.useEffect,s=n.useMemo,l=n.useDebugValue;t.useSyncExternalStoreWithSelector=function(e,t,r,n,f){var d=c(null);if(null===d.current){var p={hasValue:!1,value:null};d.current=p}else p=d.current;var y=i(e,(d=s(function(){function a(t){if(!c){if(c=!0,e=t,t=n(t),void 0!==f&&p.hasValue){var r=p.value;if(f(r,t))return i=r}return i=t}if(r=i,o(e,t))return r;var u=n(t);return void 0!==f&&f(r,u)?r:(e=t,i=u)}var e,i,c=!1,u=void 0===r?null:r;return[function(){return a(t())},null===u?void 0:function(){return a(u())}]},[t,r,n,f]))[0],d[1]);return u(function(){p.hasValue=!0,p.value=y},[y]),l(y),y}},9688:function(e,t,r){e.exports=r(109)},4683:function(e,t,r){r.d(t,{xC:function(){return configureStore},oM:function(){return w}});var n,o,i=r(4483);function createThunkMiddleware(e){return({dispatch:t,getState:r})=>n=>o=>"function"==typeof o?o(t,r,e):n(o)}var c=createThunkMiddleware(),u=Symbol.for("immer-nothing"),s=Symbol.for("immer-draftable"),l=Symbol.for("immer-state");function die(e,...t){throw Error(`[Immer] minified error nr: ${e}. Full error at: https://bit.ly/3cXEKWf`)}var f=Object.getPrototypeOf;function immer_isDraft(e){return!!e&&!!e[l]}function isDraftable(e){return!!e&&(immer_isPlainObject(e)||Array.isArray(e)||!!e[s]||!!e.constructor?.[s]||isMap(e)||isSet(e))}var d=Object.prototype.constructor.toString();function immer_isPlainObject(e){if(!e||"object"!=typeof e)return!1;let t=f(e);if(null===t)return!0;let r=Object.hasOwnProperty.call(t,"constructor")&&t.constructor;return r===Object||"function"==typeof r&&Function.toString.call(r)===d}function each(e,t){0===getArchtype(e)?Reflect.ownKeys(e).forEach(r=>{t(r,e[r],e)}):e.forEach((r,n)=>t(n,r,e))}function getArchtype(e){let t=e[l];return t?t.type_:Array.isArray(e)?1:isMap(e)?2:isSet(e)?3:0}function has(e,t){return 2===getArchtype(e)?e.has(t):Object.prototype.hasOwnProperty.call(e,t)}function set(e,t,r){let n=getArchtype(e);2===n?e.set(t,r):3===n?e.add(r):e[t]=r}function isMap(e){return e instanceof Map}function isSet(e){return e instanceof Set}function latest(e){return e.copy_||e.base_}function shallowCopy(e,t){if(isMap(e))return new Map(e);if(isSet(e))return new Set(e);if(Array.isArray(e))return Array.prototype.slice.call(e);let r=immer_isPlainObject(e);if(!0!==t&&("class_only"!==t||r)){let t=f(e);if(null!==t&&r)return{...e};let n=Object.create(t);return Object.assign(n,e)}{let t=Object.getOwnPropertyDescriptors(e);delete t[l];let r=Reflect.ownKeys(t);for(let n=0;n1&&(e.set=e.add=e.clear=e.delete=dontMutateFrozenCollections),Object.freeze(e),t&&Object.entries(e).forEach(([e,t])=>freeze(t,!0))),e}function dontMutateFrozenCollections(){die(2)}function isFrozen(e){return Object.isFrozen(e)}var p={};function getPlugin(e){let t=p[e];return t||die(0,e),t}function usePatchesInScope(e,t){t&&(getPlugin("Patches"),e.patches_=[],e.inversePatches_=[],e.patchListener_=t)}function revokeScope(e){leaveScope(e),e.drafts_.forEach(revokeDraft),e.drafts_=null}function leaveScope(e){e===o&&(o=e.parent_)}function enterScope(e){return o={drafts_:[],parent_:o,immer_:e,canAutoFreeze_:!0,unfinalizedDrafts_:0}}function revokeDraft(e){let t=e[l];0===t.type_||1===t.type_?t.revoke_():t.revoked_=!0}function processResult(e,t){t.unfinalizedDrafts_=t.drafts_.length;let r=t.drafts_[0],n=void 0!==e&&e!==r;return n?(r[l].modified_&&(revokeScope(t),die(4)),isDraftable(e)&&(e=finalize(t,e),t.parent_||maybeFreeze(t,e)),t.patches_&&getPlugin("Patches").generateReplacementPatches_(r[l].base_,e,t.patches_,t.inversePatches_)):e=finalize(t,r,[]),revokeScope(t),t.patches_&&t.patchListener_(t.patches_,t.inversePatches_),e!==u?e:void 0}function finalize(e,t,r){if(isFrozen(t))return t;let n=t[l];if(!n)return each(t,(o,i)=>finalizeProperty(e,n,t,o,i,r)),t;if(n.scope_!==e)return t;if(!n.modified_)return maybeFreeze(e,n.base_,!0),n.base_;if(!n.finalized_){n.finalized_=!0,n.scope_.unfinalizedDrafts_--;let t=n.copy_,o=t,i=!1;3===n.type_&&(o=new Set(t),t.clear(),i=!0),each(o,(o,c)=>finalizeProperty(e,n,t,o,c,r,i)),maybeFreeze(e,t,!1),r&&e.patches_&&getPlugin("Patches").generatePatches_(n,r,e.patches_,e.inversePatches_)}return n.copy_}function finalizeProperty(e,t,r,n,o,i,c){if(immer_isDraft(o)){let c=i&&t&&3!==t.type_&&!has(t.assigned_,n)?i.concat(n):void 0,u=finalize(e,o,c);if(set(r,n,u),!immer_isDraft(u))return;e.canAutoFreeze_=!1}else c&&r.add(o);if(isDraftable(o)&&!isFrozen(o)){if(!e.immer_.autoFreeze_&&e.unfinalizedDrafts_<1)return;finalize(e,o),(!t||!t.scope_.parent_)&&"symbol"!=typeof n&&Object.prototype.propertyIsEnumerable.call(r,n)&&maybeFreeze(e,o)}}function maybeFreeze(e,t,r=!1){!e.parent_&&e.immer_.autoFreeze_&&e.canAutoFreeze_&&freeze(t,r)}var y={get(e,t){if(t===l)return e;let r=latest(e);if(!has(r,t))return function(e,t,r){let n=getDescriptorFromProto(t,r);return n?"value"in n?n.value:n.get?.call(e.draft_):void 0}(e,r,t);let n=r[t];return e.finalized_||!isDraftable(n)?n:n===peek(e.base_,t)?(prepareCopy(e),e.copy_[t]=createProxy(n,e)):n},has:(e,t)=>t in latest(e),ownKeys:e=>Reflect.ownKeys(latest(e)),set(e,t,r){let n=getDescriptorFromProto(latest(e),t);if(n?.set)return n.set.call(e.draft_,r),!0;if(!e.modified_){let n=peek(latest(e),t),o=n?.[l];if(o&&o.base_===r)return e.copy_[t]=r,e.assigned_[t]=!1,!0;if((r===n?0!==r||1/r==1/n:r!=r&&n!=n)&&(void 0!==r||has(e.base_,t)))return!0;prepareCopy(e),markChanged(e)}return!!(e.copy_[t]===r&&(void 0!==r||t in e.copy_)||Number.isNaN(r)&&Number.isNaN(e.copy_[t]))||(e.copy_[t]=r,e.assigned_[t]=!0,!0)},deleteProperty:(e,t)=>(void 0!==peek(e.base_,t)||t in e.base_?(e.assigned_[t]=!1,prepareCopy(e),markChanged(e)):delete e.assigned_[t],e.copy_&&delete e.copy_[t],!0),getOwnPropertyDescriptor(e,t){let r=latest(e),n=Reflect.getOwnPropertyDescriptor(r,t);return n?{writable:!0,configurable:1!==e.type_||"length"!==t,enumerable:n.enumerable,value:r[t]}:n},defineProperty(){die(11)},getPrototypeOf:e=>f(e.base_),setPrototypeOf(){die(12)}},h={};function peek(e,t){let r=e[l],n=r?latest(r):e;return n[t]}function getDescriptorFromProto(e,t){if(!(t in e))return;let r=f(e);for(;r;){let e=Object.getOwnPropertyDescriptor(r,t);if(e)return e;r=f(r)}}function markChanged(e){!e.modified_&&(e.modified_=!0,e.parent_&&markChanged(e.parent_))}function prepareCopy(e){e.copy_||(e.copy_=shallowCopy(e.base_,e.scope_.immer_.useStrictShallowCopy_))}function createProxy(e,t){let r=isMap(e)?getPlugin("MapSet").proxyMap_(e,t):isSet(e)?getPlugin("MapSet").proxySet_(e,t):function(e,t){let r=Array.isArray(e),n={type_:r?1:0,scope_:t?t.scope_:o,modified_:!1,finalized_:!1,assigned_:{},parent_:t,base_:e,draft_:null,copy_:null,revoke_:null,isManual_:!1},i=n,c=y;r&&(i=[n],c=h);let{revoke:u,proxy:s}=Proxy.revocable(i,c);return n.draft_=s,n.revoke_=u,s}(e,t),n=t?t.scope_:o;return n.drafts_.push(r),r}each(y,(e,t)=>{h[e]=function(){return arguments[0]=arguments[0][0],t.apply(this,arguments)}}),h.deleteProperty=function(e,t){return h.set.call(this,e,t,void 0)},h.set=function(e,t,r){return y.set.call(this,e[0],t,r,e[0])};var b=new class{constructor(e){this.autoFreeze_=!0,this.useStrictShallowCopy_=!1,this.produce=(e,t,r)=>{let n;if("function"==typeof e&&"function"!=typeof t){let r=t;t=e;let n=this;return function(e=r,...o){return n.produce(e,e=>t.call(this,e,...o))}}if("function"!=typeof t&&die(6),void 0!==r&&"function"!=typeof r&&die(7),isDraftable(e)){let o=enterScope(this),i=createProxy(e,void 0),c=!0;try{n=t(i),c=!1}finally{c?revokeScope(o):leaveScope(o)}return usePatchesInScope(o,r),processResult(n,o)}if(e&&"object"==typeof e)die(1,e);else{if(void 0===(n=t(e))&&(n=e),n===u&&(n=void 0),this.autoFreeze_&&freeze(n,!0),r){let t=[],o=[];getPlugin("Patches").generateReplacementPatches_(e,n,t,o),r(t,o)}return n}},this.produceWithPatches=(e,t)=>{let r,n;if("function"==typeof e)return(t,...r)=>this.produceWithPatches(t,t=>e(t,...r));let o=this.produce(e,t,(e,t)=>{r=e,n=t});return[o,r,n]},"boolean"==typeof e?.autoFreeze&&this.setAutoFreeze(e.autoFreeze),"boolean"==typeof e?.useStrictShallowCopy&&this.setUseStrictShallowCopy(e.useStrictShallowCopy)}createDraft(e){var t;isDraftable(e)||die(8),immer_isDraft(e)&&(immer_isDraft(t=e)||die(10,t),e=function currentImpl(e){let t;if(!isDraftable(e)||isFrozen(e))return e;let r=e[l];if(r){if(!r.modified_)return r.base_;r.finalized_=!0,t=shallowCopy(e,r.scope_.immer_.useStrictShallowCopy_)}else t=shallowCopy(e,!0);return each(t,(e,r)=>{set(t,e,currentImpl(r))}),r&&(r.finalized_=!1),t}(t));let r=enterScope(this),n=createProxy(e,void 0);return n[l].isManual_=!0,leaveScope(r),n}finishDraft(e,t){let r=e&&e[l];r&&r.isManual_||die(9);let{scope_:n}=r;return usePatchesInScope(n,t),processResult(void 0,n)}setAutoFreeze(e){this.autoFreeze_=e}setUseStrictShallowCopy(e){this.useStrictShallowCopy_=e}applyPatches(e,t){let r;for(r=t.length-1;r>=0;r--){let n=t[r];if(0===n.path.length&&"replace"===n.op){e=n.value;break}}r>-1&&(t=t.slice(r+1));let n=getPlugin("Patches").applyPatches_;return immer_isDraft(e)?n(e,t):this.produce(e,e=>n(e,t))}},m=b.produce;b.produceWithPatches.bind(b),b.setAutoFreeze.bind(b),b.setUseStrictShallowCopy.bind(b),b.applyPatches.bind(b),b.createDraft.bind(b),b.finishDraft.bind(b),r(5566);var _="undefined"!=typeof window&&window.__REDUX_DEVTOOLS_EXTENSION_COMPOSE__?window.__REDUX_DEVTOOLS_EXTENSION_COMPOSE__:function(){if(0!=arguments.length)return"object"==typeof arguments[0]?i.qC:i.qC.apply(null,arguments)};"undefined"!=typeof window&&window.__REDUX_DEVTOOLS_EXTENSION__&&window.__REDUX_DEVTOOLS_EXTENSION__;function createAction(e,t){function actionCreator(...r){if(t){let n=t(...r);if(!n)throw Error(formatProdErrorMessage(0));return{type:e,payload:n.payload,..."meta"in n&&{meta:n.meta},..."error"in n&&{error:n.error}}}return{type:e,payload:r[0]}}return actionCreator.toString=()=>`${e}`,actionCreator.type=e,actionCreator.match=t=>(0,i.LG)(t)&&t.type===e,actionCreator}var g=class _Tuple extends Array{constructor(...e){super(...e),Object.setPrototypeOf(this,_Tuple.prototype)}static get[Symbol.species](){return _Tuple}concat(...e){return super.concat.apply(this,e)}prepend(...e){return 1===e.length&&Array.isArray(e[0])?new _Tuple(...e[0].concat(this)):new _Tuple(...e.concat(this))}};function freezeDraftable(e){return isDraftable(e)?m(e,()=>{}):e}function emplace(e,t,r){if(e.has(t)){let n=e.get(t);return r.update&&(n=r.update(n,t,e),e.set(t,n)),n}if(!r.insert)throw Error(formatProdErrorMessage(10));let n=r.insert(t,e);return e.set(t,n),n}var buildGetDefaultMiddleware=()=>function(e){let{thunk:t=!0,immutableCheck:r=!0,serializableCheck:n=!0,actionCreatorCheck:o=!0}=e??{},i=new g;return t&&("boolean"==typeof t?i.push(c):i.push(createThunkMiddleware(t.extraArgument))),i},createQueueWithTimer=e=>t=>{setTimeout(t,e)},S="undefined"!=typeof window&&window.requestAnimationFrame?window.requestAnimationFrame:createQueueWithTimer(10),autoBatchEnhancer=(e={type:"raf"})=>t=>(...r)=>{let n=t(...r),o=!0,i=!1,c=!1,u=new Set,s="tick"===e.type?queueMicrotask:"raf"===e.type?S:"callback"===e.type?e.queueNotification:createQueueWithTimer(e.timeout),notifyListeners=()=>{c=!1,i&&(i=!1,u.forEach(e=>e()))};return Object.assign({},n,{subscribe(e){let t=n.subscribe(()=>o&&e());return u.add(e),()=>{t(),u.delete(e)}},dispatch(e){try{return(i=!(o=!e?.meta?.RTK_autoBatch))&&!c&&(c=!0,s(notifyListeners)),n.dispatch(e)}finally{o=!0}}})},buildGetDefaultEnhancers=e=>function(t){let{autoBatch:r=!0}=t??{},n=new g(e);return r&&n.push(autoBatchEnhancer("object"==typeof r?r:void 0)),n};function configureStore(e){let t,r;let n=buildGetDefaultMiddleware(),{reducer:o,middleware:c,devTools:u=!0,preloadedState:s,enhancers:l}=e||{};if("function"==typeof o)t=o;else if((0,i.PO)(o))t=(0,i.UY)(o);else throw Error(formatProdErrorMessage(1));r="function"==typeof c?c(n):n();let f=i.qC;u&&(f=_({trace:!1,..."object"==typeof u&&u}));let d=(0,i.md)(...r),p=buildGetDefaultEnhancers(d),y="function"==typeof l?l(p):p(),h=f(...y);return(0,i.MT)(t,s,h)}function executeReducerBuilderCallback(e){let t;let r={},n=[],o={addCase(e,t){let n="string"==typeof e?e:e.type;if(!n)throw Error(formatProdErrorMessage(28));if(n in r)throw Error(formatProdErrorMessage(29));return r[n]=t,o},addMatcher:(e,t)=>(n.push({matcher:e,reducer:t}),o),addDefaultCase:e=>(t=e,o)};return e(o),[r,n,t]}var nanoid=(e=21)=>{let t="",r=e;for(;r--;)t+="ModuleSymbhasOwnPr-0123456789ABCDEFGHNRVfgctiUvz_KqYTJkLxpZXIjQW"[64*Math.random()|0];return t},E=Symbol.for("rtk-slice-createasyncthunk"),v=((n=v||{}).reducer="reducer",n.reducerWithPrepare="reducerWithPrepare",n.asyncThunk="asyncThunk",n),w=function({creators:e}={}){let t=e?.asyncThunk?.[E];return function(e){let r;let{name:n,reducerPath:o=n}=e;if(!n)throw Error(formatProdErrorMessage(11));let i=("function"==typeof e.reducers?e.reducers(function(){function asyncThunk(e,t){return{_reducerDefinitionType:"asyncThunk",payloadCreator:e,...t}}return asyncThunk.withTypes=()=>asyncThunk,{reducer:e=>Object.assign({[e.name]:(...t)=>e(...t)}[e.name],{_reducerDefinitionType:"reducer"}),preparedReducer:(e,t)=>({_reducerDefinitionType:"reducerWithPrepare",prepare:e,reducer:t}),asyncThunk}}()):e.reducers)||{},c=Object.keys(i),u={sliceCaseReducersByName:{},sliceCaseReducersByType:{},actionCreators:{},sliceMatchers:[]},s={addCase(e,t){let r="string"==typeof e?e:e.type;if(!r)throw Error(formatProdErrorMessage(12));if(r in u.sliceCaseReducersByType)throw Error(formatProdErrorMessage(13));return u.sliceCaseReducersByType[r]=t,s},addMatcher:(e,t)=>(u.sliceMatchers.push({matcher:e,reducer:t}),s),exposeAction:(e,t)=>(u.actionCreators[e]=t,s),exposeCaseReducer:(e,t)=>(u.sliceCaseReducersByName[e]=t,s)};function buildReducer(){let[t={},r=[],n]="function"==typeof e.extraReducers?executeReducerBuilderCallback(e.extraReducers):[e.extraReducers],o={...t,...u.sliceCaseReducersByType};return function(e,t){let r;let[n,o,i]=executeReducerBuilderCallback(t);if("function"==typeof e)r=()=>freezeDraftable(e());else{let t=freezeDraftable(e);r=()=>t}function reducer(e=r(),t){let c=[n[t.type],...o.filter(({matcher:e})=>e(t)).map(({reducer:e})=>e)];return 0===c.filter(e=>!!e).length&&(c=[i]),c.reduce((e,r)=>{if(r){if(immer_isDraft(e)){let n=r(e,t);return void 0===n?e:n}if(isDraftable(e))return m(e,e=>r(e,t));{let n=r(e,t);if(void 0===n){if(null===e)return e;throw Error(formatProdErrorMessage(9))}return n}}return e},e)}return reducer.getInitialState=r,reducer}(e.initialState,e=>{for(let t in o)e.addCase(t,o[t]);for(let t of u.sliceMatchers)e.addMatcher(t.matcher,t.reducer);for(let t of r)e.addMatcher(t.matcher,t.reducer);n&&e.addDefaultCase(n)})}c.forEach(r=>{let o=i[r],c={reducerName:r,type:`${n}/${r}`,createNotation:"function"==typeof e.reducers};"asyncThunk"===o._reducerDefinitionType?function({type:e,reducerName:t},r,n,o){if(!o)throw Error(formatProdErrorMessage(18));let{payloadCreator:i,fulfilled:c,pending:u,rejected:s,settled:l,options:f}=r,d=o(e,i,f);n.exposeAction(t,d),c&&n.addCase(d.fulfilled,c),u&&n.addCase(d.pending,u),s&&n.addCase(d.rejected,s),l&&n.addMatcher(d.settled,l),n.exposeCaseReducer(t,{fulfilled:c||noop,pending:u||noop,rejected:s||noop,settled:l||noop})}(c,o,s,t):function({type:e,reducerName:t,createNotation:r},n,o){let i,c;if("reducer"in n){if(r&&"reducerWithPrepare"!==n._reducerDefinitionType)throw Error(formatProdErrorMessage(17));i=n.reducer,c=n.prepare}else i=n;o.addCase(e,i).exposeCaseReducer(t,i).exposeAction(t,c?createAction(e,c):createAction(e))}(c,o,s)});let selectSelf=e=>e,l=new Map;function reducer(e,t){return r||(r=buildReducer()),r(e,t)}function getInitialState(){return r||(r=buildReducer()),r.getInitialState()}function makeSelectorProps(t,r=!1){function selectSlice(e){let n=e[t];return void 0===n&&r&&(n=getInitialState()),n}function getSelectors(t=selectSelf){let n=emplace(l,r,{insert:()=>new WeakMap});return emplace(n,t,{insert:()=>{let n={};for(let[o,i]of Object.entries(e.selectors??{}))n[o]=function(e,t,r,n){function wrapper(o,...i){let c=t(o);return void 0===c&&n&&(c=r()),e(c,...i)}return wrapper.unwrapped=e,wrapper}(i,t,getInitialState,r);return n}})}return{reducerPath:t,getSelectors,get selectors(){return getSelectors(selectSlice)},selectSlice}}let f={name:n,reducer,actions:u.actionCreators,caseReducers:u.sliceCaseReducersByName,getInitialState,...makeSelectorProps(o),injectInto(e,{reducerPath:t,...r}={}){let n=t??o;return e.inject({reducerPath:n,reducer},r),{...f,...makeSelectorProps(n,!0)}}};return f}}();function noop(){}var assertFunction=(e,t)=>{if("function"!=typeof e)throw Error(formatProdErrorMessage(32))},{assign:P}=Object,C="listenerMiddleware",getListenerEntryPropsFrom=e=>{let{type:t,actionCreator:r,matcher:n,predicate:o,effect:i}=e;if(t)o=createAction(t).match;else if(r)t=r.type,o=r.match;else if(n)o=n;else if(o);else throw Error(formatProdErrorMessage(21));return assertFunction(i,"options.listener"),{predicate:o,type:t,effect:i}},O=P(e=>{let{type:t,predicate:r,effect:n}=getListenerEntryPropsFrom(e),o=nanoid(),i={id:o,effect:n,type:t,predicate:r,pending:new Set,unsubscribe:()=>{throw Error(formatProdErrorMessage(22))}};return i},{withTypes:()=>O}),M=P(createAction(`${C}/add`),{withTypes:()=>M}),x=P(createAction(`${C}/remove`),{withTypes:()=>x});function formatProdErrorMessage(e){return`Minified Redux Toolkit error #${e}; visit https://redux-toolkit.js.org/Errors?code=${e} for the full message or use the non-minified dev environment for full errors. `}Symbol.for("rtk-state-proxy-original")},4667:function(e,t,r){r.d(t,{Z:function(){return _objectDestructuringEmpty}});function _objectDestructuringEmpty(e){if(null==e)throw TypeError("Cannot destructure undefined")}},2184:function(e,t,r){r.d(t,{Z:function(){return _objectWithoutProperties}});function _objectWithoutProperties(e,t){if(null==e)return{};var r,n,o=function(e,t){if(null==e)return{};var r,n,o={},i=Object.keys(e);for(n=0;n=0||(o[r]=e[r]);return o}(e,t);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);for(n=0;n=0)&&Object.prototype.propertyIsEnumerable.call(e,r)&&(o[r]=e[r])}return o}},941:function(e,t,r){r.d(t,{Z:function(){return _toConsumableArray}});var n=r(6015),o=r(909);function _toConsumableArray(e){return function(e){if(Array.isArray(e))return(0,n.Z)(e)}(e)||function(e){if("undefined"!=typeof Symbol&&null!=e[Symbol.iterator]||null!=e["@@iterator"])return Array.from(e)}(e)||(0,o.Z)(e)||function(){throw TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}},3046:function(e,t,r){r.d(t,{I0:function(){return b},v9:function(){return l},zt:function(){return Provider_default}});var n=r(2265),o=r(9688),i=Symbol.for("react-redux-context"),c="undefined"!=typeof globalThis?globalThis:{},u=function(){if(!n.createContext)return{};let e=c[i]??(c[i]=new Map),t=e.get(n.createContext);return t||(t=n.createContext(null),e.set(n.createContext,t)),t}();function createReduxContextHook(e=u){return function(){let t=n.useContext(e);return t}}var s=createReduxContextHook(),useSyncExternalStoreWithSelector=()=>{throw Error("uSES not initialized!")},refEquality=(e,t)=>e===t,l=function(e=u){let t=e===u?s:createReduxContextHook(e),useSelector2=(e,r={})=>{let{equalityFn:o=refEquality,devModeChecks:i={}}="function"==typeof r?{equalityFn:r}:r,{store:c,subscription:u,getServerState:s,stabilityCheck:l,identityFunctionCheck:f}=t();n.useRef(!0);let d=n.useCallback({[e.name](t){let r=e(t);return r}}[e.name],[e,l,i.stabilityCheck]),p=useSyncExternalStoreWithSelector(u.addNestedSub,c.getState,s||c.getState,d,o);return n.useDebugValue(p),p};return Object.assign(useSelector2,{withTypes:()=>useSelector2}),useSelector2}();Symbol.for("react.element"),Symbol.for("react.portal"),Symbol.for("react.fragment"),Symbol.for("react.strict_mode"),Symbol.for("react.profiler"),Symbol.for("react.provider"),Symbol.for("react.context"),Symbol.for("react.server_context"),Symbol.for("react.forward_ref"),Symbol.for("react.suspense"),Symbol.for("react.suspense_list"),Symbol.for("react.memo"),Symbol.for("react.lazy"),Symbol.for("react.offscreen"),Symbol.for("react.client.reference");var f={notify(){},get:()=>[]},d=!!("undefined"!=typeof window&&void 0!==window.document&&void 0!==window.document.createElement),p="undefined"!=typeof navigator&&"ReactNative"===navigator.product,y=d||p?n.useLayoutEffect:n.useEffect,Provider_default=function({store:e,context:t,children:r,serverState:o,stabilityCheck:i="once",identityFunctionCheck:c="once"}){let s=n.useMemo(()=>{let t=function(e,t){let r;let n=f,o=0,i=!1;function handleChangeWrapper(){c.onStateChange&&c.onStateChange()}function trySubscribe(){if(o++,!r){let o,i;r=t?t.addNestedSub(handleChangeWrapper):e.subscribe(handleChangeWrapper),o=null,i=null,n={clear(){o=null,i=null},notify(){(()=>{let e=o;for(;e;)e.callback(),e=e.next})()},get(){let e=[],t=o;for(;t;)e.push(t),t=t.next;return e},subscribe(e){let t=!0,r=i={callback:e,next:null,prev:i};return r.prev?r.prev.next=r:o=r,function(){t&&null!==o&&(t=!1,r.next?r.next.prev=r.prev:i=r.prev,r.prev?r.prev.next=r.next:o=r.next)}}}}}function tryUnsubscribe(){o--,r&&0===o&&(r(),r=void 0,n.clear(),n=f)}let c={addNestedSub:function(e){trySubscribe();let t=n.subscribe(e),r=!1;return()=>{r||(r=!0,t(),tryUnsubscribe())}},notifyNestedSubs:function(){n.notify()},handleChangeWrapper,isSubscribed:function(){return i},trySubscribe:function(){i||(i=!0,trySubscribe())},tryUnsubscribe:function(){i&&(i=!1,tryUnsubscribe())},getListeners:()=>n};return c}(e);return{store:e,subscription:t,getServerState:o?()=>o:void 0,stabilityCheck:i,identityFunctionCheck:c}},[e,o,i,c]),l=n.useMemo(()=>e.getState(),[e]);return y(()=>{let{subscription:t}=s;return t.onStateChange=t.notifyNestedSubs,t.trySubscribe(),l!==e.getState()&&t.notifyNestedSubs(),()=>{t.tryUnsubscribe(),t.onStateChange=void 0}},[s,l]),n.createElement((t||u).Provider,{value:s},r)};function createStoreHook(e=u){let t=e===u?s:createReduxContextHook(e),useStore2=()=>{let{store:e}=t();return e};return Object.assign(useStore2,{withTypes:()=>useStore2}),useStore2}var h=createStoreHook(),b=function(e=u){let t=e===u?h:createStoreHook(e),useDispatch2=()=>{let e=t();return e.dispatch};return Object.assign(useDispatch2,{withTypes:()=>useDispatch2}),useDispatch2}();useSyncExternalStoreWithSelector=o.useSyncExternalStoreWithSelector,n.useSyncExternalStore},4483:function(e,t,r){function formatProdErrorMessage(e){return`Minified Redux error #${e}; visit https://redux.js.org/Errors?code=${e} for the full message or use the non-minified dev environment for full errors. `}r.d(t,{LG:function(){return isAction},MT:function(){return createStore},PO:function(){return isPlainObject},UY:function(){return combineReducers},md:function(){return applyMiddleware},qC:function(){return compose}});var n="function"==typeof Symbol&&Symbol.observable||"@@observable",randomString=()=>Math.random().toString(36).substring(7).split("").join("."),o={INIT:`@@redux/INIT${randomString()}`,REPLACE:`@@redux/REPLACE${randomString()}`,PROBE_UNKNOWN_ACTION:()=>`@@redux/PROBE_UNKNOWN_ACTION${randomString()}`};function isPlainObject(e){if("object"!=typeof e||null===e)return!1;let t=e;for(;null!==Object.getPrototypeOf(t);)t=Object.getPrototypeOf(t);return Object.getPrototypeOf(e)===t||null===Object.getPrototypeOf(e)}function createStore(e,t,r){if("function"!=typeof e)throw Error(formatProdErrorMessage(2));if("function"==typeof t&&"function"==typeof r||"function"==typeof r&&"function"==typeof arguments[3])throw Error(formatProdErrorMessage(0));if("function"==typeof t&&void 0===r&&(r=t,t=void 0),void 0!==r){if("function"!=typeof r)throw Error(formatProdErrorMessage(1));return r(createStore)(e,t)}let i=e,c=t,u=new Map,s=u,l=0,f=!1;function ensureCanMutateNextListeners(){s===u&&(s=new Map,u.forEach((e,t)=>{s.set(t,e)}))}function getState(){if(f)throw Error(formatProdErrorMessage(3));return c}function subscribe(e){if("function"!=typeof e)throw Error(formatProdErrorMessage(4));if(f)throw Error(formatProdErrorMessage(5));let t=!0;ensureCanMutateNextListeners();let r=l++;return s.set(r,e),function(){if(t){if(f)throw Error(formatProdErrorMessage(6));t=!1,ensureCanMutateNextListeners(),s.delete(r),u=null}}}function dispatch(e){if(!isPlainObject(e))throw Error(formatProdErrorMessage(7));if(void 0===e.type)throw Error(formatProdErrorMessage(8));if("string"!=typeof e.type)throw Error(formatProdErrorMessage(17));if(f)throw Error(formatProdErrorMessage(9));try{f=!0,c=i(c,e)}finally{f=!1}let t=u=s;return t.forEach(e=>{e()}),e}return dispatch({type:o.INIT}),{dispatch,subscribe,getState,replaceReducer:function(e){if("function"!=typeof e)throw Error(formatProdErrorMessage(10));i=e,dispatch({type:o.REPLACE})},[n]:function(){return{subscribe(e){if("object"!=typeof e||null===e)throw Error(formatProdErrorMessage(11));function observeState(){e.next&&e.next(getState())}observeState();let t=subscribe(observeState);return{unsubscribe:t}},[n](){return this}}}}}function combineReducers(e){let t;let r=Object.keys(e),n={};for(let t=0;t{let r=e[t],n=r(void 0,{type:o.INIT});if(void 0===n)throw Error(formatProdErrorMessage(12));if(void 0===r(void 0,{type:o.PROBE_UNKNOWN_ACTION()}))throw Error(formatProdErrorMessage(13))})}(n)}catch(e){t=e}return function(e={},r){if(t)throw t;let o=!1,c={};for(let t=0;te:1===e.length?e[0]:e.reduce((e,t)=>(...r)=>e(t(...r)))}function applyMiddleware(...e){return t=>(r,n)=>{let o=t(r,n),dispatch=()=>{throw Error(formatProdErrorMessage(15))},i={getState:o.getState,dispatch:(e,...t)=>dispatch(e,...t)},c=e.map(e=>e(i));return dispatch=compose(...c)(o.dispatch),{...o,dispatch}}}function isAction(e){return isPlainObject(e)&&"type"in e&&"string"==typeof e.type}}}]); \ No newline at end of file diff --git a/frontend/webapp/dep-out/_next/static/chunks/433-e81cb52d52eafb19.js b/frontend/webapp/dep-out/_next/static/chunks/433-e81cb52d52eafb19.js deleted file mode 100644 index d2c95fc761..0000000000 --- a/frontend/webapp/dep-out/_next/static/chunks/433-e81cb52d52eafb19.js +++ /dev/null @@ -1,9 +0,0 @@ -"use strict";(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[433],{9434:function(t,r){/** - * @license React - * react.production.min.js - * - * Copyright (c) Facebook, Inc. and its affiliates. - * - * This source code is licensed under the MIT license found in the - * LICENSE file in the root directory of this source tree. - */var n=Symbol.for("react.element"),o=(Symbol.for("react.portal"),Symbol.for("react.fragment"),Symbol.for("react.strict_mode"),Symbol.for("react.profiler"),Symbol.for("react.provider"),Symbol.for("react.context"),Symbol.for("react.forward_ref"),Symbol.for("react.suspense"),Symbol.for("react.memo"),Symbol.for("react.lazy"),{isMounted:function(){return!1},enqueueForceUpdate:function(){},enqueueReplaceState:function(){},enqueueSetState:function(){}}),i=Object.assign,a={};function E(t,r,n){this.props=t,this.context=r,this.refs=a,this.updater=n||o}function F(){}function G(t,r,n){this.props=t,this.context=r,this.refs=a,this.updater=n||o}E.prototype.isReactComponent={},E.prototype.setState=function(t,r){if("object"!=typeof t&&"function"!=typeof t&&null!=t)throw Error("setState(...): takes an object of state variables to update or a function which returns an object of state variables.");this.updater.enqueueSetState(this,t,r,"setState")},E.prototype.forceUpdate=function(t){this.updater.enqueueForceUpdate(this,t,"forceUpdate")},F.prototype=E.prototype;var c=G.prototype=new F;c.constructor=G,i(c,E.prototype),c.isPureReactComponent=!0;var u=Object.prototype.hasOwnProperty,h={key:!0,ref:!0,__self:!0,__source:!0};r.createElement=function(t,r,o){var i,a={},c=null,f=null;if(null!=r)for(i in void 0!==r.ref&&(f=r.ref),void 0!==r.key&&(c=""+r.key),r)u.call(r,i)&&!h.hasOwnProperty(i)&&(a[i]=r[i]);var d=arguments.length-2;if(1===d)a.children=o;else if(1?@[\\\]^`{|}~-]+/g,N=/(^-|-$)/g;function R(t){return t.replace(C,"-").replace(N,"")}var T=/(a)(d)/gi,j=function(t){return String.fromCharCode(t+(t>25?39:97))};function x(t){var r,n="";for(r=Math.abs(t);r>52;r=r/52|0)n=j(r%52)+n;return(j(r%52)+n).replace(T,"$1-$2")}var D,M=function(t,r){for(var n=r.length;n;)t=33*t^r.charCodeAt(--n);return t},z=function(t){return M(5381,t)};function L(t){return"string"==typeof t}var k="function"==typeof Symbol&&Symbol.for,$=k?Symbol.for("react.memo"):60115,B=k?Symbol.for("react.forward_ref"):60112,Y={childContextTypes:!0,contextType:!0,contextTypes:!0,defaultProps:!0,displayName:!0,getDefaultProps:!0,getDerivedStateFromError:!0,getDerivedStateFromProps:!0,mixins:!0,propTypes:!0,type:!0},q={name:!0,length:!0,prototype:!0,caller:!0,callee:!0,arguments:!0,arity:!0},U={$$typeof:!0,compare:!0,defaultProps:!0,displayName:!0,propTypes:!0,type:!0},H=((D={})[B]={$$typeof:!0,render:!0,defaultProps:!0,displayName:!0,propTypes:!0},D[$]=U,D);function X(t){return("type"in t&&t.type.$$typeof)===$?U:"$$typeof"in t?H[t.$$typeof]:Y}var W=Object.defineProperty,Z=Object.getOwnPropertyNames,J=Object.getOwnPropertySymbols,V=Object.getOwnPropertyDescriptor,K=Object.getPrototypeOf,Q=Object.prototype;function re(t){return"function"==typeof t}function se(t){return"object"==typeof t&&"styledComponentId"in t}function ie(t,r){return t&&r?"".concat(t," ").concat(r):t||r||""}function ae(t,r){if(0===t.length)return"";for(var n=t[0],o=1;o0?" Args: ".concat(r.join(", ")):""))}var ee=function(){function e(t){this.groupSizes=new Uint32Array(512),this.length=512,this.tag=t}return e.prototype.indexOfGroup=function(t){for(var r=0,n=0;n=this.groupSizes.length){for(var n=this.groupSizes,o=n.length,i=o;t>=i;)if((i<<=1)<0)throw he(16,"".concat(t));this.groupSizes=new Uint32Array(i),this.groupSizes.set(n),this.length=i;for(var a=o;a=this.length||0===this.groupSizes[t])return r;for(var n=this.groupSizes[t],o=this.indexOfGroup(t),i=o+n,a=o;a=0){var n=document.createTextNode(r);return this.element.insertBefore(n,this.nodes[t]||null),this.length++,!0}return!1},e.prototype.deleteRule=function(t){this.element.removeChild(this.nodes[t]),this.length--},e.prototype.getRule=function(t){return t0&&(h+="".concat(t,","))}),o+="".concat(c).concat(u,'{content:"').concat(h,'"}').concat(_)}}})(i);return o}(o)})}return e.registerId=function(t){return Se(t)},e.prototype.rehydrate=function(){!this.server&&b&&_e(this)},e.prototype.reconstructWithOptions=function(t,r){return void 0===r&&(r=!0),new e(__assign(__assign({},this.options),t),this.gs,r&&this.names||void 0)},e.prototype.allocateGSInstance=function(t){return this.gs[t]=(this.gs[t]||0)+1},e.prototype.getTag=function(){var t,r,n,o;return this.tag||(this.tag=(n=(r=this.options).useCSSOMInjection,o=r.target,t=r.isServer?new ec(o):n?new es(o):new ea(o),new ee(t)))},e.prototype.hasNameForId=function(t,r){return this.names.has(t)&&this.names.get(t).has(r)},e.prototype.registerName=function(t,r){if(Se(t),this.names.has(t))this.names.get(t).add(r);else{var n=new Set;n.add(r),this.names.set(t,n)}},e.prototype.insertRules=function(t,r,n){this.registerName(t,r),this.getTag().insertRules(Se(t),n)},e.prototype.clearNames=function(t){this.names.has(t)&&this.names.get(t).clear()},e.prototype.clearRules=function(t){this.getTag().clearGroup(Se(t)),this.clearNames(t)},e.prototype.clearTag=function(){this.tag=void 0},e}(),eh=/&/g,ef=/^\s*\/\/.*$/gm;function Fe(t){var r,n,o,i=void 0===t?I:t,a=i.options,d=void 0===a?I:a,y=i.plugins,m=void 0===y?w:y,l=function(t,o,i){return i.startsWith(n)&&i.endsWith(n)&&i.replaceAll(n,"").length>0?".".concat(r):t},v=m.slice();v.push(function(t){t.type===c.Fr&&t.value.includes("&")&&(t.props[0]=t.props[0].replace(eh,n).replace(o,l))}),d.prefix&&v.push(u.Ji),v.push(h.P);var p=function(t,i,a,c){void 0===i&&(i=""),void 0===a&&(a=""),void 0===c&&(c="&"),r=c,n=i,o=RegExp("\\".concat(n,"\\b"),"g");var y=t.replace(ef,""),m=f.MY(a||i?"".concat(a," ").concat(i," { ").concat(y," }"):y);d.namespace&&(m=function Ve(t,r){return t.map(function(t){return"rule"===t.type&&(t.value="".concat(r," ").concat(t.value),t.value=t.value.replaceAll(",",",".concat(r," ")),t.props=t.props.map(function(t){return"".concat(r," ").concat(t)})),Array.isArray(t.children)&&"@keyframes"!==t.type&&(t.children=Ve(t.children,r)),t})}(m,d.namespace));var g=[];return h.q(m,u.qR(v.concat(u.cD(function(t){return g.push(t)})))),g};return p.hash=m.length?m.reduce(function(t,r){return r.name||he(15),M(t,r.name)},5381).toString():"",p}var ed=new ep,ey=Fe(),em=o.createContext({shouldForwardProp:void 0,styleSheet:ed,stylis:ey}),ev=(em.Consumer,o.createContext(void 0));function Ge(){return(0,o.useContext)(em)}function Ye(t){var r=(0,o.useState)(t.stylisPlugins),n=r[0],i=r[1],c=Ge().styleSheet,u=(0,o.useMemo)(function(){var r=c;return t.sheet?r=t.sheet:t.target&&(r=r.reconstructWithOptions({target:t.target},!1)),t.disableCSSOMInjection&&(r=r.reconstructWithOptions({useCSSOMInjection:!1})),r},[t.disableCSSOMInjection,t.sheet,t.target,c]),h=(0,o.useMemo)(function(){return Fe({options:{namespace:t.namespace,prefix:t.enableVendorPrefixes},plugins:n})},[t.enableVendorPrefixes,t.namespace,n]);(0,o.useEffect)(function(){a()(n,t.stylisPlugins)||i(t.stylisPlugins)},[t.stylisPlugins]);var f=(0,o.useMemo)(function(){return{shouldForwardProp:t.shouldForwardProp,styleSheet:u,stylis:h}},[t.shouldForwardProp,u,h]);return o.createElement(em.Provider,{value:f},o.createElement(ev.Provider,{value:h},t.children))}var eg=function(){function e(t,r){var n=this;this.inject=function(t,r){void 0===r&&(r=ey);var o=n.name+r.hash;t.hasNameForId(n.id,o)||t.insertRules(n.id,o,r(n.rules,o,"@keyframes"))},this.name=t,this.id="sc-keyframes-".concat(t),this.rules=r,ue(this,function(){throw he(12,String(n.name))})}return e.prototype.getName=function(t){return void 0===t&&(t=ey),this.name+t.hash},e}();function He(t){for(var r="",n=0;n="A"&&o<="Z"?r+="-"+o.toLowerCase():r+=o}return r.startsWith("ms-")?"-"+r:r}var Ue=function(t){return null==t||!1===t||""===t},Je=function(t){var r=[];for(var n in t){var o=t[n];t.hasOwnProperty(n)&&!Ue(o)&&(Array.isArray(o)&&o.isCss||re(o)?r.push("".concat(He(n),":"),o,";"):ce(o)?r.push.apply(r,__spreadArray(__spreadArray(["".concat(n," {")],Je(o),!1),["}"],!1)):r.push("".concat(He(n),": ").concat(null==o||"boolean"==typeof o||""===o?"":"number"!=typeof o||0===o||n in d.Z||n.startsWith("--")?String(o).trim():"".concat(o,"px"),";")))}return r};function Xe(t,r,n,o){return Ue(t)?[]:se(t)?[".".concat(t.styledComponentId)]:re(t)?!re(t)||t.prototype&&t.prototype.isReactComponent||!r?[t]:Xe(t(r),r,n,o):t instanceof eg?n?(t.inject(n,o),[t.getName(o)]):[t]:ce(t)?Je(t):Array.isArray(t)?Array.prototype.concat.apply(w,t.map(function(t){return Xe(t,r,n,o)})):[t.toString()]}function Ze(t){for(var r=0;r>>0);if(!r.hasNameForId(this.componentId,a)){var c=n(i,".".concat(a),void 0,this.componentId);r.insertRules(this.componentId,a,c)}o=ie(o,a),this.staticRulesId=a}}else{for(var u=M(this.baseHash,n.hash),h="",f=0;f>>0);r.hasNameForId(this.componentId,m)||r.insertRules(this.componentId,m,n(h,".".concat(m),void 0,this.componentId)),o=ie(o,m)}}return o},e}(),eb=o.createContext(void 0);function ot(t){var r=o.useContext(eb),n=(0,o.useMemo)(function(){return function(t,r){if(!t)throw he(14);if(re(t))return t(r);if(Array.isArray(t)||"object"!=typeof t)throw he(8);return r?__assign(__assign({},r),t):t}(t.theme,r)},[t.theme,r]);return t.children?o.createElement(eb.Provider,{value:n},t.children):null}eb.Consumer;var eP={};function it(t,r,n){var i,a,c,u,h=se(t),f=!L(t),d=r.attrs,y=void 0===d?w:d,m=r.componentId,v=void 0===m?(i=r.displayName,a=r.parentComponentId,eP[c="string"!=typeof i?"sc":R(i)]=(eP[c]||0)+1,u="".concat(c,"-").concat(x(z(S+c+eP[c])>>>0)),a?"".concat(a,"-").concat(u):u):m,g=r.displayName,_=void 0===g?L(t)?"styled.".concat(t):"Styled(".concat(t.displayName||t.name||"Component",")"):g,b=r.displayName&&r.componentId?"".concat(R(r.displayName),"-").concat(r.componentId):r.componentId||v,P=h&&t.attrs?t.attrs.concat(y).filter(Boolean):y,C=r.shouldForwardProp;if(h&&t.shouldForwardProp){var N=t.shouldForwardProp;if(r.shouldForwardProp){var T=r.shouldForwardProp;C=function(t,r){return N(t,r)&&T(t,r)}}else C=N}var D=new e_(n,b,h?t.componentStyle:void 0);function O(t,r){return function(t,r,n){var i,a,c=t.attrs,u=t.componentStyle,h=t.defaultProps,f=t.foldedComponentIds,d=t.styledComponentId,y=t.target,m=o.useContext(eb),v=Ge(),g=t.shouldForwardProp||v.shouldForwardProp,S=(void 0===(i=h)&&(i=I),r.theme!==i.theme&&r.theme||m||i.theme||I),_=function(t,r,n){for(var o,i=__assign(__assign({},r),{className:void 0,theme:n}),a=0;a>>0);return new eg(i,o)}A.forEach(function(t){ew[t]=pt(t)}),function(){function e(t,r){this.rules=t,this.componentId=r,this.isStatic=Ze(t),ep.registerId(this.componentId+1)}e.prototype.createStyles=function(t,r,n,o){var i=o(ae(Xe(this.rules,r,n,o)),""),a=this.componentId+t;n.insertRules(a,a,i)},e.prototype.removeStyles=function(t,r){r.clearRules(this.componentId+t)},e.prototype.renderStyles=function(t,r,n,o){t>2&&ep.registerId(this.componentId+t),this.removeStyles(t,n),this.createStyles(t,r,n,o)}}(),function(){function e(){var t=this;this._emitSheetCSS=function(){var r=t.instance.toString();if(!r)return"";var o=n.nc,i=ae([o&&'nonce="'.concat(o,'"'),"".concat(m,'="true"'),"".concat(g,'="').concat(S,'"')].filter(Boolean)," ");return"")},this.getStyleTags=function(){if(t.sealed)throw he(2);return t._emitSheetCSS()},this.getStyleElement=function(){if(t.sealed)throw he(2);var r,i=t.instance.toString();if(!i)return[];var a=((r={})[m]="",r[g]=S,r.dangerouslySetInnerHTML={__html:i},r),c=n.nc;return c&&(a.nonce=c),[o.createElement("style",__assign({},a,{key:"sc-0-0"}))]},this.seal=function(){t.sealed=!0},this.instance=new ep({isServer:!0}),this.sealed=!1}e.prototype.collectStyles=function(t){if(this.sealed)throw he(2);return o.createElement(Ye,{sheet:this.instance},t)},e.prototype.interleaveWithNodeStream=function(t){throw he(3)}}()}}]); \ No newline at end of file diff --git a/frontend/webapp/dep-out/_next/static/chunks/585-82bbcbf01c3dfd29.js b/frontend/webapp/dep-out/_next/static/chunks/585-82bbcbf01c3dfd29.js deleted file mode 100644 index fd822644dc..0000000000 --- a/frontend/webapp/dep-out/_next/static/chunks/585-82bbcbf01c3dfd29.js +++ /dev/null @@ -1 +0,0 @@ -"use strict";(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[585],{2245:function(e,t,r){r.d(t,{W2:function(){return container},fP:function(){return describe},oe:function(){return funnel},al:function(){return funnel_focus},lS:function(){return namespace},Kq:function(){return payload_collection},hY:function(){return refresh}});var n,o,i,c,a,s,p,l,u,f,y,b,O,d,j,g,w,v,h,P,_,m=r(952);function _extends(){return(_extends=Object.assign?Object.assign.bind():function(e){for(var t=1;t1&&t.some(Array.isArray)?t.flat(e-1):t},Array.prototype.flatMap=function(e,t){return this.map(e,t).flat()}),Promise.prototype.finally||(Promise.prototype.finally=function(e){if("function"!=typeof e)return this.then(e,e);var t=this.constructor||Promise;return this.then(function(r){return t.resolve(e()).then(function(){return r})},function(r){return t.resolve(e()).then(function(){throw r})})}),Object.fromEntries||(Object.fromEntries=function(e){return Array.from(e).reduce(function(e,t){return e[t[0]]=t[1],e},{})}),Array.prototype.at||(Array.prototype.at=function(e){var t=Math.trunc(e)||0;if(t<0&&(t+=this.length),!(t<0||t>=this.length))return this[t]})},6382:function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),Object.defineProperty(t,"addBasePath",{enumerable:!0,get:function(){return addBasePath}});var n=r(9791),o=r(6154);function addBasePath(e,t){return(0,o.normalizePathTrailingSlash)((0,n.addPathPrefix)(e,""))}("function"==typeof t.default||"object"==typeof t.default&&null!==t.default)&&void 0===t.default.__esModule&&(Object.defineProperty(t.default,"__esModule",{value:!0}),Object.assign(t.default,t),e.exports=t.default)},4254:function(e,t,r){"use strict";var n=r(8270);function appBootstrap(e){var t,r;t=self.__next_s,r=function(){e()},t&&t.length?t.reduce(function(e,t){var r=n(t,2),o=r[0],a=r[1];return e.then(function(){return new Promise(function(e,t){var r=document.createElement("script");if(a)for(var n in a)"children"!==n&&r.setAttribute(n,a[n]);o?(r.src=o,r.onload=function(){return e()},r.onerror=t):a&&(r.innerHTML=a.children,setTimeout(e)),document.head.appendChild(r)})})},Promise.resolve()).catch(function(e){console.error(e)}).then(function(){r()}):r()}Object.defineProperty(t,"__esModule",{value:!0}),Object.defineProperty(t,"appBootstrap",{enumerable:!0,get:function(){return appBootstrap}}),window.next={version:"13.5.4",appDir:!0},("function"==typeof t.default||"object"==typeof t.default&&null!==t.default)&&void 0===t.default.__esModule&&(Object.defineProperty(t.default,"__esModule",{value:!0}),Object.assign(t.default,t),e.exports=t.default)},1763:function(e,t,r){"use strict";var n=r(6952),o=r(4453);Object.defineProperty(t,"__esModule",{value:!0}),Object.defineProperty(t,"callServer",{enumerable:!0,get:function(){return callServer}});var a=r(3710);function callServer(e,t){return _callServer.apply(this,arguments)}function _callServer(){return(_callServer=o(n.mark(function _callee(e,t){var r;return n.wrap(function(n){for(;;)switch(n.prev=n.next){case 0:if(r=(0,a.getServerActionDispatcher)()){n.next=3;break}throw Error("Invariant: missing action dispatcher.");case 3:return n.abrupt("return",new Promise(function(n,o){r({actionId:e,actionArgs:t,resolve:n,reject:o})}));case 4:case"end":return n.stop()}},_callee)}))).apply(this,arguments)}("function"==typeof t.default||"object"==typeof t.default&&null!==t.default)&&void 0===t.default.__esModule&&(Object.defineProperty(t.default,"__esModule",{value:!0}),Object.assign(t.default,t),e.exports=t.default)},8057:function(e,t,r){"use strict";var n=r(8762);function ownKeys(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter(function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable})),r.push.apply(r,n)}return r}function _objectSpread(e){for(var t=1;t=0&&r.top<=t}var ee=function(e){i(InnerScrollAndFocusHandler,e);var t,r=(t=function(){if("undefined"==typeof Reflect||!Reflect.construct||Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){})),!0}catch(e){return!1}}(),function(){var e,r=s(InnerScrollAndFocusHandler);if(t){var n=s(this).constructor;e=Reflect.construct(r,arguments,n)}else e=r.apply(this,arguments);return l(this,e)});function InnerScrollAndFocusHandler(){var e;o(this,InnerScrollAndFocusHandler);for(var t=arguments.length,n=Array(t),a=0;a0&&void 0!==arguments[0]?arguments[0]:5;a(this,PromiseQueue),Object.defineProperty(this,_,{value:processNext}),Object.defineProperty(this,s,{writable:!0,value:void 0}),Object.defineProperty(this,p,{writable:!0,value:void 0}),Object.defineProperty(this,v,{writable:!0,value:void 0}),i._(this,s)[s]=e,i._(this,p)[p]=0,i._(this,v)[v]=[]}return u(PromiseQueue,[{key:"enqueue",value:function(e){var t,r,a,u=this,l=new Promise(function(e,t){r=e,a=t}),s=(t=o(n.mark(function _callee(){var t;return n.wrap(function(n){for(;;)switch(n.prev=n.next){case 0:return n.prev=0,i._(u,p)[p]++,n.next=4,e();case 4:t=n.sent,r(t),n.next=11;break;case 8:n.prev=8,n.t0=n.catch(0),a(n.t0);case 11:return n.prev=11,i._(u,p)[p]--,i._(u,_)[_](),n.finish(11);case 15:case"end":return n.stop()}},_callee,null,[[0,8,11,15]])})),function(){return t.apply(this,arguments)});return i._(this,v)[v].push({promiseFn:l,task:s}),i._(this,_)[_](),l}},{key:"bump",value:function(e){var t=i._(this,v)[v].findIndex(function(t){return t.promiseFn===e});if(t>-1){var r=i._(this,v)[v].splice(t,1)[0];i._(this,v)[v].unshift(r),i._(this,_)[_](!0)}}}]),PromiseQueue}();function processNext(e){if(void 0===e&&(e=!1),(i._(this,p)[p]0){var t;null==(t=i._(this,v)[v].shift())||t.task()}}("function"==typeof t.default||"object"==typeof t.default&&null!==t.default)&&void 0===t.default.__esModule&&(Object.defineProperty(t.default,"__esModule",{value:!0}),Object.assign(t.default,t),e.exports=t.default)},9599:function(e,t,r){"use strict";var n=r(8432),o=r(4777),a=r(5724),u=r(4200),i=r(4866);Object.defineProperty(t,"__esModule",{value:!0}),function(e,t){for(var r in t)Object.defineProperty(e,r,{enumerable:!0,get:t[r]})}(t,{RedirectErrorBoundary:function(){return v},RedirectBoundary:function(){return _RedirectBoundary}});var l=r(8533)._(r(2265)),s=r(8210),p=r(2900);function HandleRedirect(e){var t=e.redirect,r=e.reset,n=e.redirectType,o=(0,s.useRouter)();return(0,l.useEffect)(function(){l.default.startTransition(function(){n===p.RedirectType.push?o.push(t,{}):o.replace(t,{}),r()})},[t,n,r,o]),null}var v=function(e){a(_RedirectErrorBoundary,e);var t,r=(t=function(){if("undefined"==typeof Reflect||!Reflect.construct||Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){})),!0}catch(e){return!1}}(),function(){var e,r=i(_RedirectErrorBoundary);if(t){var n=i(this).constructor;e=Reflect.construct(r,arguments,n)}else e=r.apply(this,arguments);return u(this,e)});function _RedirectErrorBoundary(e){var t;return n(this,_RedirectErrorBoundary),(t=r.call(this,e)).state={redirect:null,redirectType:null},t}return o(_RedirectErrorBoundary,[{key:"render",value:function(){var e=this,t=this.state,r=t.redirect,n=t.redirectType;return null!==r&&null!==n?l.default.createElement(HandleRedirect,{redirect:r,redirectType:n,reset:function(){return e.setState({redirect:null})}}):this.props.children}}],[{key:"getDerivedStateFromError",value:function(e){if((0,p.isRedirectError)(e))return{redirect:(0,p.getURLFromRedirectError)(e),redirectType:(0,p.getRedirectTypeFromError)(e)};throw e}}]),_RedirectErrorBoundary}(l.default.Component);function _RedirectBoundary(e){var t=e.children,r=(0,s.useRouter)();return l.default.createElement(v,{router:r},t)}("function"==typeof t.default||"object"==typeof t.default&&null!==t.default)&&void 0===t.default.__esModule&&(Object.defineProperty(t.default,"__esModule",{value:!0}),Object.assign(t.default,t),e.exports=t.default)},2900:function(e,t,r){"use strict";var n,o,a=r(8270);Object.defineProperty(t,"__esModule",{value:!0}),function(e,t){for(var r in t)Object.defineProperty(e,r,{enumerable:!0,get:t[r]})}(t,{RedirectType:function(){return o},getRedirectError:function(){return _getRedirectError},redirect:function(){return _redirect},permanentRedirect:function(){return _permanentRedirect},isRedirectError:function(){return _isRedirectError},getURLFromRedirectError:function(){return _getURLFromRedirectError},getRedirectTypeFromError:function(){return _getRedirectTypeFromError}});var u=r(6891),i="NEXT_REDIRECT";function _getRedirectError(e,t,r){void 0===r&&(r=!1);var n=Error(i);n.digest=i+";"+t+";"+e+";"+r;var o=u.requestAsyncStorage.getStore();return o&&(n.mutableCookies=o.mutableCookies),n}function _redirect(e,t){throw void 0===t&&(t="replace"),_getRedirectError(e,t,!1)}function _permanentRedirect(e,t){throw void 0===t&&(t="replace"),_getRedirectError(e,t,!0)}function _isRedirectError(e){if("string"!=typeof(null==e?void 0:e.digest))return!1;var t=a(e.digest.split(";",4),4),r=t[0],n=t[1],o=t[2],u=t[3];return r===i&&("replace"===n||"push"===n)&&"string"==typeof o&&("true"===u||"false"===u)}function _getURLFromRedirectError(e){return _isRedirectError(e)?e.digest.split(";",3)[2]:null}function _getRedirectTypeFromError(e){if(!_isRedirectError(e))throw Error("Not a redirect error");return e.digest.split(";",3)[1]}(n=o||(o={})).push="push",n.replace="replace",("function"==typeof t.default||"object"==typeof t.default&&null!==t.default)&&void 0===t.default.__esModule&&(Object.defineProperty(t.default,"__esModule",{value:!0}),Object.assign(t.default,t),e.exports=t.default)},9347:function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),Object.defineProperty(t,"default",{enumerable:!0,get:function(){return RenderFromTemplateContext}});var n=r(8533)._(r(2265)),o=r(6703);function RenderFromTemplateContext(){var e=(0,n.useContext)(o.TemplateContext);return n.default.createElement(n.default.Fragment,null,e)}("function"==typeof t.default||"object"==typeof t.default&&null!==t.default)&&void 0===t.default.__esModule&&(Object.defineProperty(t.default,"__esModule",{value:!0}),Object.assign(t.default,t),e.exports=t.default)},6891:function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),Object.defineProperty(t,"requestAsyncStorage",{enumerable:!0,get:function(){return n}});var n=(0,r(7195).createAsyncLocalStorage)();("function"==typeof t.default||"object"==typeof t.default&&null!==t.default)&&void 0===t.default.__esModule&&(Object.defineProperty(t.default,"__esModule",{value:!0}),Object.assign(t.default,t),e.exports=t.default)},9015:function(e,t,r){"use strict";var n=r(8270);Object.defineProperty(t,"__esModule",{value:!0}),Object.defineProperty(t,"applyFlightData",{enumerable:!0,get:function(){return applyFlightData}});var o=r(6703),a=r(1189),u=r(9584);function applyFlightData(e,t,r,i){void 0===i&&(i=!1);var l=n(r.slice(-3),3),s=l[0],p=l[1],v=l[2];return null!==p&&(3===r.length?(t.status=o.CacheStates.READY,t.subTreeData=p,(0,a.fillLazyItemsTillLeafWithHead)(t,e,s,v,i)):(t.status=o.CacheStates.READY,t.subTreeData=e.subTreeData,t.parallelRoutes=new Map(e.parallelRoutes),(0,u.fillCacheWithNewSubTreeData)(t,e,r,i)),!0)}("function"==typeof t.default||"object"==typeof t.default&&null!==t.default)&&void 0===t.default.__esModule&&(Object.defineProperty(t.default,"__esModule",{value:!0}),Object.assign(t.default,t),e.exports=t.default)},2574:function(e,t,r){"use strict";var n=r(8762),o=r(8270);function ownKeys(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter(function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable})),r.push.apply(r,n)}return r}function _objectSpread(e){for(var t=1;t1,w=!t||!j||E,C={};null!==i&&j&&(C=l),b||E||(n=createOptimisticTree(e.slice(1),C?C.children:null,r||w));var A=[_,_objectSpread(_objectSpread({},C),n?{children:n}:{})];return s&&(A[2]=s),!r&&w?A[3]="refetch":j&&p&&(A[3]=p),j&&v&&(A[4]=v),A}}});var a=r(2221);("function"==typeof t.default||"object"==typeof t.default&&null!==t.default)&&void 0===t.default.__esModule&&(Object.defineProperty(t.default,"__esModule",{value:!0}),Object.assign(t.default,t),e.exports=t.default)},9090:function(e,t){"use strict";function createRecordFromThenable(e){return e.status="pending",e.then(function(t){"pending"===e.status&&(e.status="fulfilled",e.value=t)},function(t){"pending"===e.status&&(e.status="rejected",e.reason=t)}),e}Object.defineProperty(t,"__esModule",{value:!0}),Object.defineProperty(t,"createRecordFromThenable",{enumerable:!0,get:function(){return createRecordFromThenable}}),("function"==typeof t.default||"object"==typeof t.default&&null!==t.default)&&void 0===t.default.__esModule&&(Object.defineProperty(t.default,"__esModule",{value:!0}),Object.assign(t.default,t),e.exports=t.default)},6659:function(e,t){"use strict";function createRouterCacheKey(e,t){return void 0===t&&(t=!1),Array.isArray(e)?(e[0]+"|"+e[1]+"|"+e[2]).toLowerCase():t&&e.startsWith("__PAGE__")?"__PAGE__":e}Object.defineProperty(t,"__esModule",{value:!0}),Object.defineProperty(t,"createRouterCacheKey",{enumerable:!0,get:function(){return createRouterCacheKey}}),("function"==typeof t.default||"object"==typeof t.default&&null!==t.default)&&void 0===t.default.__esModule&&(Object.defineProperty(t.default,"__esModule",{value:!0}),Object.assign(t.default,t),e.exports=t.default)},201:function(e,t,r){"use strict";var n=r(6952),o=r(8270),a=r(8762),u=r(4453);Object.defineProperty(t,"__esModule",{value:!0}),Object.defineProperty(t,"fetchServerResponse",{enumerable:!0,get:function(){return fetchServerResponse}});var i=r(1201),l=r(3710),s=r(1763),p=r(9364),v=r(420),_=r(6671).createFromFetch;function doMpaNavigation(e){return[(0,l.urlToUrlWithoutFlightMarker)(e).toString(),void 0]}function fetchServerResponse(e,t,r,n,o){return _fetchServerResponse.apply(this,arguments)}function _fetchServerResponse(){return(_fetchServerResponse=u(n.mark(function _callee(e,t,r,u,b){var j,E,w,C,A,D,U,B,$,K,z,q;return n.wrap(function(n){for(;;)switch(n.prev=n.next){case 0:return a(j={},i.RSC,"1"),a(j,i.NEXT_ROUTER_STATE_TREE,encodeURIComponent(JSON.stringify(t))),E=j,b===p.PrefetchKind.AUTO&&(E[i.NEXT_ROUTER_PREFETCH]="1"),r&&(E[i.NEXT_URL]=r),w=(0,v.hexHash)([E[i.NEXT_ROUTER_PREFETCH]||"0",E[i.NEXT_ROUTER_STATE_TREE],E[i.NEXT_URL]].join(",")),n.prev=4,(C=new URL(e)).pathname.endsWith("/")?C.pathname+="index.txt":C.pathname+=".txt",C.searchParams.set(i.NEXT_RSC_UNION_QUERY,w),n.next=10,fetch(C,{credentials:"same-origin",headers:E});case 10:if(A=n.sent,D=(0,l.urlToUrlWithoutFlightMarker)(A.url),U=A.redirected?D:void 0,($=(B=A.headers.get("content-type")||"")===i.RSC_CONTENT_TYPE_HEADER)||($=B.startsWith("text/plain")),!(!$||!A.ok)){n.next=19;break}return e.hash&&(D.hash=e.hash),n.abrupt("return",doMpaNavigation(D.toString()));case 19:return n.next=21,_(Promise.resolve(A),{callServer:s.callServer});case 21:if(z=(K=o(n.sent,2))[0],q=K[1],!(u!==z)){n.next=27;break}return n.abrupt("return",doMpaNavigation(A.url));case 27:return n.abrupt("return",[q,U]);case 30:return n.prev=30,n.t0=n.catch(4),console.error("Failed to fetch RSC payload. Falling back to browser navigation.",n.t0),n.abrupt("return",[e.toString(),void 0]);case 34:case"end":return n.stop()}},_callee,null,[[4,30]])}))).apply(this,arguments)}("function"==typeof t.default||"object"==typeof t.default&&null!==t.default)&&void 0===t.default.__esModule&&(Object.defineProperty(t.default,"__esModule",{value:!0}),Object.assign(t.default,t),e.exports=t.default)},4863:function(e,t,r){"use strict";var n=r(8270);Object.defineProperty(t,"__esModule",{value:!0}),Object.defineProperty(t,"fillCacheWithDataProperty",{enumerable:!0,get:function(){return function fillCacheWithDataProperty(e,t,r,u,i){void 0===i&&(i=!1);var l=r.length<=2,s=n(r,2),p=s[0],v=s[1],_=(0,a.createRouterCacheKey)(v),b=t.parallelRoutes.get(p);if(!b||i&&t.parallelRoutes.size>1)return{bailOptimistic:!0};var j=e.parallelRoutes.get(p);j&&j!==b||(j=new Map(b),e.parallelRoutes.set(p,j));var E=b.get(_),w=j.get(_);if(l){w&&w.data&&w!==E||j.set(_,{status:o.CacheStates.DATA_FETCH,data:u(),subTreeData:null,parallelRoutes:new Map});return}if(!w||!E){w||j.set(_,{status:o.CacheStates.DATA_FETCH,data:u(),subTreeData:null,parallelRoutes:new Map});return}return w===E&&(w={status:w.status,data:w.data,subTreeData:w.subTreeData,parallelRoutes:new Map(w.parallelRoutes)},j.set(_,w)),fillCacheWithDataProperty(w,E,r.slice(2),u)}}});var o=r(6703),a=r(6659);("function"==typeof t.default||"object"==typeof t.default&&null!==t.default)&&void 0===t.default.__esModule&&(Object.defineProperty(t.default,"__esModule",{value:!0}),Object.assign(t.default,t),e.exports=t.default)},9584:function(e,t,r){"use strict";var n=r(8270);Object.defineProperty(t,"__esModule",{value:!0}),Object.defineProperty(t,"fillCacheWithNewSubTreeData",{enumerable:!0,get:function(){return function fillCacheWithNewSubTreeData(e,t,r,l){var s=r.length<=5,p=n(r,2),v=p[0],_=p[1],b=(0,i.createRouterCacheKey)(_),j=t.parallelRoutes.get(v);if(j){var E=e.parallelRoutes.get(v);E&&E!==j||(E=new Map(j),e.parallelRoutes.set(v,E));var w=j.get(b),C=E.get(b);if(s){C&&C.data&&C!==w||(C={status:o.CacheStates.READY,data:null,subTreeData:r[3],parallelRoutes:w?new Map(w.parallelRoutes):new Map},w&&(0,a.invalidateCacheByRouterState)(C,w,r[2]),(0,u.fillLazyItemsTillLeafWithHead)(C,w,r[2],r[4],l),E.set(b,C));return}C&&w&&(C===w&&(C={status:C.status,data:C.data,subTreeData:C.subTreeData,parallelRoutes:new Map(C.parallelRoutes)},E.set(b,C)),fillCacheWithNewSubTreeData(C,w,r.slice(2),l))}}}});var o=r(6703),a=r(961),u=r(1189),i=r(6659);("function"==typeof t.default||"object"==typeof t.default&&null!==t.default)&&void 0===t.default.__esModule&&(Object.defineProperty(t.default,"__esModule",{value:!0}),Object.assign(t.default,t),e.exports=t.default)},1189:function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),Object.defineProperty(t,"fillLazyItemsTillLeafWithHead",{enumerable:!0,get:function(){return function fillLazyItemsTillLeafWithHead(e,t,r,a,u){if(0===Object.keys(r[1]).length){e.head=a;return}for(var i in r[1]){var l=r[1][i],s=l[0],p=(0,o.createRouterCacheKey)(s);if(t){var v=t.parallelRoutes.get(i);if(v){var _=new Map(v),b=_.get(p),j=u&&b?{status:b.status,data:b.data,subTreeData:b.subTreeData,parallelRoutes:new Map(b.parallelRoutes)}:{status:n.CacheStates.LAZY_INITIALIZED,data:null,subTreeData:null,parallelRoutes:new Map(null==b?void 0:b.parallelRoutes)};_.set(p,j),fillLazyItemsTillLeafWithHead(j,b,l,a,u),e.parallelRoutes.set(i,_);continue}}var E={status:n.CacheStates.LAZY_INITIALIZED,data:null,subTreeData:null,parallelRoutes:new Map},w=e.parallelRoutes.get(i);w?w.set(p,E):e.parallelRoutes.set(i,new Map([[p,E]])),fillLazyItemsTillLeafWithHead(E,void 0,l,a,u)}}}});var n=r(6703),o=r(6659);("function"==typeof t.default||"object"==typeof t.default&&null!==t.default)&&void 0===t.default.__esModule&&(Object.defineProperty(t.default,"__esModule",{value:!0}),Object.assign(t.default,t),e.exports=t.default)},8473:function(e,t){"use strict";var r,n;function _getPrefetchEntryCacheStatus(e){var t=e.kind,r=e.prefetchTime,n=e.lastUsedTime;return Date.now()<(null!=n?n:r)+3e4?n?"reusable":"fresh":"auto"===t&&Date.now()=e.length?{done:!0}:{done:!1,value:e[n++]}},e:function(e){throw e},f:F}}throw 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(){r=r.call(e)},n:function(){var e=r.next();return a=e.done,e},e:function(e){u=!0,o=e},f:function(){try{a||null==r.return||r.return()}finally{if(u)throw o}}}}function _arrayLikeToArray(e,t){(null==t||t>e.length)&&(t=e.length);for(var r=0,n=Array(t);re.length)&&(t=e.length);for(var r=0,n=Array(t);r=e.length?{done:!0}:{done:!1,value:e[n++]}},e:function(e){throw e},f:F}}throw 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(){r=r.call(e)},n:function(){var e=r.next();return a=e.done,e},e:function(e){u=!0,o=e},f:function(){try{a||null==r.return||r.return()}finally{if(u)throw o}}}}(e);try{for(r.s();!(t=r.n()).done;){var a=n(t.value,2),u=a[0],i=a[1];(0,o.getPrefetchEntryCacheStatus)(i)===o.PrefetchCacheEntryStatus.expired&&e.delete(u)}}catch(e){r.e(e)}finally{r.f()}}("function"==typeof t.default||"object"==typeof t.default&&null!==t.default)&&void 0===t.default.__esModule&&(Object.defineProperty(t.default,"__esModule",{value:!0}),Object.assign(t.default,t),e.exports=t.default)},3327:function(e,t,r){"use strict";var n=r(8270);function _arrayLikeToArray(e,t){(null==t||t>e.length)&&(t=e.length);for(var r=0,n=Array(t);r=e.length?{done:!0}:{done:!1,value:e[n++]}},e:function(e){throw e},f:F}}throw 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(){r=r.call(e)},n:function(){var e=r.next();return a=e.done,e},e:function(e){u=!0,o=e},f:function(){try{a||null==r.return||r.return()}finally{if(u)throw o}}}}(D);try{for($.s();!(B=$.n()).done;){var K=B.value;if(3!==K.length)return console.log("REFRESH FAILED"),e;var z=n(K,1)[0],q=(0,l.applyRouterStatePatchToTree)([""],C,z);if(null===q)throw Error("SEGMENT MISMATCH");if((0,s.isNavigatingToNewRootLayout)(C,q))return(0,p.handleExternalUrl)(e,j,w,e.pushRef.pendingPush);var Q=U?(0,i.createHrefFromUrl)(U):void 0;U&&(j.canonicalUrl=Q);var ee=K.slice(-2),et=n(ee,2),er=et[0],en=et[1];null!==er&&(r.status=_.CacheStates.READY,r.subTreeData=er,(0,b.fillLazyItemsTillLeafWithHead)(r,void 0,z,en),j.cache=r,j.prefetchCache=new Map),j.previousTree=C,j.patchedTree=q,j.canonicalUrl=w,C=q}}catch(e){$.e(e)}finally{$.f()}return(0,v.handleMutable)(e,j)}("function"==typeof t.default||"object"==typeof t.default&&null!==t.default)&&void 0===t.default.__esModule&&(Object.defineProperty(t.default,"__esModule",{value:!0}),Object.assign(t.default,t),e.exports=t.default)},4521:function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),Object.defineProperty(t,"restoreReducer",{enumerable:!0,get:function(){return restoreReducer}});var n=r(8592);function restoreReducer(e,t){var r=t.url,o=t.tree,a=(0,n.createHrefFromUrl)(r);return{buildId:e.buildId,canonicalUrl:a,pushRef:e.pushRef,focusAndScrollRef:e.focusAndScrollRef,cache:e.cache,prefetchCache:e.prefetchCache,tree:o,nextUrl:r.pathname}}("function"==typeof t.default||"object"==typeof t.default&&null!==t.default)&&void 0===t.default.__esModule&&(Object.defineProperty(t.default,"__esModule",{value:!0}),Object.assign(t.default,t),e.exports=t.default)},6811:function(e,t,r){"use strict";var n=r(6952),o=r(8762),a=r(8270),u=r(4453);function ownKeys(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter(function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable})),r.push.apply(r,n)}return r}function _objectSpread(e){for(var t=1;te.length)&&(t=e.length);for(var r=0,n=Array(t);r=e.length?{done:!0}:{done:!1,value:e[n++]}},e:function(e){throw e},f:F}}throw 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(){r=r.call(e)},n:function(){var e=r.next();return a=e.done,e},e:function(e){u=!0,o=e},f:function(){try{a||null==r.return||r.return()}finally{if(u)throw o}}}}(U);try{for(K.s();!($=K.n()).done;){var z=$.value;if(3!==z.length)return console.log("SERVER ACTION APPLY FAILED"),e;var q=a(z,1)[0],Q=(0,j.applyRouterStatePatchToTree)([""],l,q);if(null===Q)throw Error("SEGMENT MISMATCH");if((0,E.isNavigatingToNewRootLayout)(l,Q))return(0,b.handleExternalUrl)(e,r,i,e.pushRef.pendingPush);var ee=z.slice(-2),et=a(ee,2),er=et[0],en=et[1];null!==er&&(n.status=w.CacheStates.READY,n.subTreeData=er,(0,A.fillLazyItemsTillLeafWithHead)(n,void 0,q,en),r.cache=n,r.prefetchCache=new Map),r.previousTree=l,r.patchedTree=Q,r.canonicalUrl=i,l=Q}}catch(e){K.e(e)}finally{K.f()}if(B){var eo=(0,_.createHrefFromUrl)(B,!1);r.canonicalUrl=eo}return r.actionResultResolved||(o(D),r.actionResultResolved=!0),(0,C.handleMutable)(e,r)}catch(t){if("rejected"===t.status)return r.actionResultResolved||(u(t.reason),r.actionResultResolved=!0),e;throw t}}("function"==typeof t.default||"object"==typeof t.default&&null!==t.default)&&void 0===t.default.__esModule&&(Object.defineProperty(t.default,"__esModule",{value:!0}),Object.assign(t.default,t),e.exports=t.default)},6404:function(e,t,r){"use strict";var n=r(2688),o=r(8270);function _arrayLikeToArray(e,t){(null==t||t>e.length)&&(t=e.length);for(var r=0,n=Array(t);r=e.length?{done:!0}:{done:!1,value:e[n++]}},e:function(e){throw e},f:F}}throw 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(){r=r.call(e)},n:function(){var e=r.next();return a=e.done,e},e:function(e){u=!0,o=e},f:function(){try{a||null==r.return||r.return()}finally{if(u)throw o}}}}(r);try{for(A.s();!(E=A.n()).done;){var D=E.value,U=D.slice(0,-4),B=D.slice(-3,-2),$=o(B,1)[0],K=(0,u.applyRouterStatePatchToTree)([""].concat(n(U)),w,$);if(null===K)throw Error("SEGMENT MISMATCH");if((0,i.isNavigatingToNewRootLayout)(w,K))return(0,l.handleExternalUrl)(e,j,e.canonicalUrl,e.pushRef.pendingPush);var z=_?(0,a.createHrefFromUrl)(_):void 0;z&&(j.canonicalUrl=z),(0,s.applyFlightData)(C,b,D),j.previousTree=w,j.patchedTree=K,j.cache=b,C=b,w=K}}catch(e){A.e(e)}finally{A.f()}return(0,p.handleMutable)(e,j)}("function"==typeof t.default||"object"==typeof t.default&&null!==t.default)&&void 0===t.default.__esModule&&(Object.defineProperty(t.default,"__esModule",{value:!0}),Object.assign(t.default,t),e.exports=t.default)},9364:function(e,t){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),function(e,t){for(var r in t)Object.defineProperty(e,r,{enumerable:!0,get:t[r]})}(t,{PrefetchKind:function(){return n},ACTION_REFRESH:function(){return o},ACTION_NAVIGATE:function(){return a},ACTION_RESTORE:function(){return u},ACTION_SERVER_PATCH:function(){return i},ACTION_PREFETCH:function(){return l},ACTION_FAST_REFRESH:function(){return s},ACTION_SERVER_ACTION:function(){return p}});var r,n,o="refresh",a="navigate",u="restore",i="server-patch",l="prefetch",s="fast-refresh",p="server-action";(r=n||(n={})).AUTO="auto",r.FULL="full",r.TEMPORARY="temporary",("function"==typeof t.default||"object"==typeof t.default&&null!==t.default)&&void 0===t.default.__esModule&&(Object.defineProperty(t.default,"__esModule",{value:!0}),Object.assign(t.default,t),e.exports=t.default)},6088:function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),Object.defineProperty(t,"reducer",{enumerable:!0,get:function(){return reducer}});var n=r(9364),o=r(1930),a=r(6404),u=r(4521),i=r(3327),l=r(8116),s=r(8665),p=r(6811),reducer=function(e,t){switch(t.type){case n.ACTION_NAVIGATE:return(0,o.navigateReducer)(e,t);case n.ACTION_SERVER_PATCH:return(0,a.serverPatchReducer)(e,t);case n.ACTION_RESTORE:return(0,u.restoreReducer)(e,t);case n.ACTION_REFRESH:return(0,i.refreshReducer)(e,t);case n.ACTION_FAST_REFRESH:return(0,s.fastRefreshReducer)(e,t);case n.ACTION_PREFETCH:return(0,l.prefetchReducer)(e,t);case n.ACTION_SERVER_ACTION:return(0,p.serverActionReducer)(e,t);default:throw Error("Unknown action")}};("function"==typeof t.default||"object"==typeof t.default&&null!==t.default)&&void 0===t.default.__esModule&&(Object.defineProperty(t.default,"__esModule",{value:!0}),Object.assign(t.default,t),e.exports=t.default)},1379:function(e,t,r){"use strict";var n=r(8270);Object.defineProperty(t,"__esModule",{value:!0}),Object.defineProperty(t,"shouldHardNavigate",{enumerable:!0,get:function(){return function shouldHardNavigate(e,t){var r=n(t,2),a=r[0],u=r[1],i=n(e,2),l=i[0],s=i[1];return(0,o.matchSegment)(l,a)?!(e.length<=2)&&shouldHardNavigate(e.slice(2),u[s]):!!Array.isArray(l)}}});var o=r(2221);("function"==typeof t.default||"object"==typeof t.default&&null!==t.default)&&void 0===t.default.__esModule&&(Object.defineProperty(t.default,"__esModule",{value:!0}),Object.assign(t.default,t),e.exports=t.default)},450:function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),Object.defineProperty(t,"createSearchParamsBailoutProxy",{enumerable:!0,get:function(){return createSearchParamsBailoutProxy}});var n=r(4459);function createSearchParamsBailoutProxy(){return new Proxy({},{get:function(e,t){"string"==typeof t&&(0,n.staticGenerationBailout)("searchParams."+t)}})}("function"==typeof t.default||"object"==typeof t.default&&null!==t.default)&&void 0===t.default.__esModule&&(Object.defineProperty(t.default,"__esModule",{value:!0}),Object.assign(t.default,t),e.exports=t.default)},7721:function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),Object.defineProperty(t,"staticGenerationAsyncStorage",{enumerable:!0,get:function(){return n}});var n=(0,r(7195).createAsyncLocalStorage)();("function"==typeof t.default||"object"==typeof t.default&&null!==t.default)&&void 0===t.default.__esModule&&(Object.defineProperty(t.default,"__esModule",{value:!0}),Object.assign(t.default,t),e.exports=t.default)},4459:function(e,t,r){"use strict";var n=r(8762),o=r(4777),a=r(8432),u=r(5724),i=r(4200),l=r(4866),s=r(1644);function ownKeys(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter(function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable})),r.push.apply(r,n)}return r}function _objectSpread(e){for(var t=1;te.length)&&(t=e.length);for(var r=0,n=Array(t);r=e.length?{done:!0}:{done:!1,value:e[n++]}},e:function(e){throw e},f:F}}throw 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(){r=r.call(e)},n:function(){var e=r.next();return a=e.done,e},e:function(e){u=!0,o=e},f:function(){try{a||null==r.return||r.return()}finally{if(u)throw o}}}}(e.entries());try{for(o.s();!(t=o.n()).done;){var a=n(t.value,2),u=a[0],i=a[1];if("function"==typeof i){r[u]="fn()";continue}if("object"==typeof i&&null!==i){if(i.$$typeof){r[u]=i.$$typeof.toString();continue}if(i._bundlerConfig){r[u]="FlightData";continue}}r[u]=normalizeRouterState(i)}}catch(e){o.e(e)}finally{o.f()}return r}if("object"==typeof e&&null!==e){var l={};for(var s in e){var p=e[s];if("function"==typeof p){l[s]="fn()";continue}if("object"==typeof p&&null!==p){if(p.$$typeof){l[s]=p.$$typeof.toString();continue}if(p.hasOwnProperty("_bundlerConfig")){l[s]="FlightData";continue}}l[s]=normalizeRouterState(p)}return l}return Array.isArray(e)?e.map(normalizeRouterState):e}var useReducerWithReduxDevtools=function(e,t){var r=(0,o.useRef)(),a=(0,o.useRef)();(0,o.useEffect)(function(){if(!r.current&&!1!==a.current){if(void 0===a.current&&void 0===window.__REDUX_DEVTOOLS_EXTENSION__){a.current=!1;return}return r.current=window.__REDUX_DEVTOOLS_EXTENSION__.connect({instanceId:8e3,name:"next-router"}),r.current&&r.current.init(normalizeRouterState(t)),function(){r.current=void 0}}},[t]);var u=n((0,o.useReducer)(function(t,n){var o=e(t,n);return r.current&&r.current.send(n,normalizeRouterState(o)),o},t),2),i=u[0],l=u[1],s=(0,o.useCallback)(function(){r.current&&r.current.send({type:"RENDER_SYNC"},normalizeRouterState(i))},[i]);return[i,l,s]};("function"==typeof t.default||"object"==typeof t.default&&null!==t.default)&&void 0===t.default.__esModule&&(Object.defineProperty(t.default,"__esModule",{value:!0}),Object.assign(t.default,t),e.exports=t.default)},6364:function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),Object.defineProperty(t,"hasBasePath",{enumerable:!0,get:function(){return hasBasePath}});var n=r(839);function hasBasePath(e){return(0,n.pathHasPrefix)(e,"")}("function"==typeof t.default||"object"==typeof t.default&&null!==t.default)&&void 0===t.default.__esModule&&(Object.defineProperty(t.default,"__esModule",{value:!0}),Object.assign(t.default,t),e.exports=t.default)},6154:function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),Object.defineProperty(t,"normalizePathTrailingSlash",{enumerable:!0,get:function(){return normalizePathTrailingSlash}});var n=r(328),o=r(9915),normalizePathTrailingSlash=function(e){if(!e.startsWith("/"))return e;var t=(0,o.parsePath)(e),r=t.pathname,a=t.query,u=t.hash;return""+(0,n.removeTrailingSlash)(r)+a+u};("function"==typeof t.default||"object"==typeof t.default&&null!==t.default)&&void 0===t.default.__esModule&&(Object.defineProperty(t.default,"__esModule",{value:!0}),Object.assign(t.default,t),e.exports=t.default)},807:function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),Object.defineProperty(t,"default",{enumerable:!0,get:function(){return onRecoverableError}});var n=r(1776);function onRecoverableError(e){var t="function"==typeof reportError?reportError:function(e){window.console.error(e)};e.digest!==n.NEXT_DYNAMIC_NO_SSR_CODE&&t(e)}("function"==typeof t.default||"object"==typeof t.default&&null!==t.default)&&void 0===t.default.__esModule&&(Object.defineProperty(t.default,"__esModule",{value:!0}),Object.assign(t.default,t),e.exports=t.default)},2924:function(e,t,r){"use strict";function removeBasePath(e){return e}Object.defineProperty(t,"__esModule",{value:!0}),Object.defineProperty(t,"removeBasePath",{enumerable:!0,get:function(){return removeBasePath}}),r(6364),("function"==typeof t.default||"object"==typeof t.default&&null!==t.default)&&void 0===t.default.__esModule&&(Object.defineProperty(t.default,"__esModule",{value:!0}),Object.assign(t.default,t),e.exports=t.default)},6703:function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),function(e,t){for(var r in t)Object.defineProperty(e,r,{enumerable:!0,get:t[r]})}(t,{CacheStates:function(){return n},AppRouterContext:function(){return u},LayoutRouterContext:function(){return i},GlobalLayoutRouterContext:function(){return l},TemplateContext:function(){return s}});var n,o,a=r(1024)._(r(2265));(o=n||(n={})).LAZY_INITIALIZED="LAZYINITIALIZED",o.DATA_FETCH="DATAFETCH",o.READY="READY";var u=a.default.createContext(null),i=a.default.createContext(null),l=a.default.createContext(null),s=a.default.createContext(null)},420:function(e,t){"use strict";function _djb2Hash(e){for(var t=5381,r=0;r-1&&(t<0||r-1?{pathname:e.substring(0,n?r:t),query:n?e.substring(r,t>-1?t:void 0):"",hash:t>-1?e.slice(t):""}:{pathname:e,query:"",hash:""}}Object.defineProperty(t,"__esModule",{value:!0}),Object.defineProperty(t,"parsePath",{enumerable:!0,get:function(){return parsePath}})},839:function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),Object.defineProperty(t,"pathHasPrefix",{enumerable:!0,get:function(){return pathHasPrefix}});var n=r(9915);function pathHasPrefix(e,t){if("string"!=typeof e)return!1;var r=(0,n.parsePath)(e).pathname;return r===t||r.startsWith(t+"/")}},328:function(e,t){"use strict";function removeTrailingSlash(e){return e.replace(/\/$/,"")||"/"}Object.defineProperty(t,"__esModule",{value:!0}),Object.defineProperty(t,"removeTrailingSlash",{enumerable:!0,get:function(){return removeTrailingSlash}})},1885:function(e,t){"use strict";function isGroupSegment(e){return"("===e[0]&&e.endsWith(")")}Object.defineProperty(t,"__esModule",{value:!0}),Object.defineProperty(t,"isGroupSegment",{enumerable:!0,get:function(){return isGroupSegment}})},3341:function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),function(e,t){for(var r in t)Object.defineProperty(e,r,{enumerable:!0,get:t[r]})}(t,{ServerInsertedHTMLContext:function(){return o},useServerInsertedHTML:function(){return _useServerInsertedHTML}});var n=r(8533)._(r(2265)),o=n.default.createContext(null);function _useServerInsertedHTML(e){var t=(0,n.useContext)(o);t&&t(e)}},9652:function(e){e.exports=function(e,t){(null==t||t>e.length)&&(t=e.length);for(var r=0,n=Array(t);r=0)&&Object.prototype.propertyIsEnumerable.call(e,r)&&(a[r]=e[r])}return a},e.exports.default=e.exports,e.exports.__esModule=!0},6281:function(e){e.exports=function(e,t){if(null==e)return{};var r,n,o={},a=Object.keys(e);for(n=0;n=0||(o[r]=e[r]);return o},e.exports.default=e.exports,e.exports.__esModule=!0},4200:function(e,t,r){var n=r(9881).default,o=r(9113);e.exports=function(e,t){if(t&&("object"===n(t)||"function"==typeof t))return t;if(void 0!==t)throw TypeError("Derived constructors may only return object or undefined");return o(e)},e.exports.default=e.exports,e.exports.__esModule=!0},7057:function(e){function _setPrototypeOf(t,r){return e.exports=_setPrototypeOf=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e},e.exports.default=e.exports,e.exports.__esModule=!0,_setPrototypeOf(t,r)}e.exports=_setPrototypeOf,e.exports.default=e.exports,e.exports.__esModule=!0},8270:function(e,t,r){var n=r(1314),o=r(2447),a=r(9033),u=r(6464);e.exports=function(e,t){return n(e)||o(e,t)||a(e,t)||u()},e.exports.default=e.exports,e.exports.__esModule=!0},2688:function(e,t,r){var n=r(2845),o=r(9030),a=r(9033),u=r(9893);e.exports=function(e){return n(e)||o(e)||a(e)||u()},e.exports.default=e.exports,e.exports.__esModule=!0},9881:function(e){function _typeof(t){return"function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?e.exports=_typeof=function(e){return typeof e}:e.exports=_typeof=function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},e.exports.default=e.exports,e.exports.__esModule=!0,_typeof(t)}e.exports=_typeof,e.exports.default=e.exports,e.exports.__esModule=!0},9033:function(e,t,r){var n=r(9652);e.exports=function(e,t){if(e){if("string"==typeof e)return n(e,t);var r=Object.prototype.toString.call(e).slice(8,-1);if("Object"===r&&e.constructor&&(r=e.constructor.name),"Map"===r||"Set"===r)return Array.from(e);if("Arguments"===r||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r))return n(e,t)}},e.exports.default=e.exports,e.exports.__esModule=!0},1644:function(e,t,r){var n=r(4866),o=r(7057),a=r(9510),u=r(7301);function _wrapNativeSuper(t){var r="function"==typeof Map?new Map:void 0;return e.exports=_wrapNativeSuper=function(e){if(null===e||!a(e))return e;if("function"!=typeof e)throw TypeError("Super expression must either be null or a function");if(void 0!==r){if(r.has(e))return r.get(e);r.set(e,Wrapper)}function Wrapper(){return u(e,arguments,n(this).constructor)}return Wrapper.prototype=Object.create(e.prototype,{constructor:{value:Wrapper,enumerable:!1,writable:!0,configurable:!0}}),o(Wrapper,e)},e.exports.default=e.exports,e.exports.__esModule=!0,_wrapNativeSuper(t)}e.exports=_wrapNativeSuper,e.exports.default=e.exports,e.exports.__esModule=!0},6952:function(e,t,r){e.exports=r(4094)},4040:function(e,t,r){"use strict";var n=r(4887);t.createRoot=n.createRoot,t.hydrateRoot=n.hydrateRoot},4887:function(e,t,r){"use strict";!function checkDCE(){if("undefined"!=typeof __REACT_DEVTOOLS_GLOBAL_HOOK__&&"function"==typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE)try{__REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE(checkDCE)}catch(e){console.error(e)}}(),e.exports=r(4417)},7950:function(e,t,r){"use strict";/** - * @license React - * react-server-dom-webpack-client.browser.production.min.js - * - * Copyright (c) Meta Platforms, Inc. and affiliates. - * - * This source code is licensed under the MIT license found in the - * LICENSE file in the root directory of this source tree. - */var n=r(4887),o=r(2265),a={stream:!0},u=new Map;function x(e){var t=globalThis.__next_require__(e);return"function"!=typeof t.then||"fulfilled"===t.status?null:(t.then(function(e){t.status="fulfilled",t.value=e},function(e){t.status="rejected",t.reason=e}),t)}function y(){}var i=n.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED.Dispatcher,l=Symbol.for("react.element"),s=Symbol.for("react.lazy"),p=Symbol.for("react.default_value"),v=Symbol.iterator,_=Array.isArray,b=new WeakMap,j=o.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED.ContextRegistry;function L(e,t,r,n){this.status=e,this.value=t,this.reason=r,this._response=n}function da(e){switch(e.status){case"resolved_model":M(e);break;case"resolved_module":N(e)}switch(e.status){case"fulfilled":return e.value;case"pending":case"blocked":throw e;default:throw e.reason}}function O(e,t){for(var r=0;rl?(p=l,l=3,o++):(p=0,l=3);continue;case 2:44===(b=n[o++])?l=4:v=v<<4|(96n.length&&(b=-1)}var j=n.byteOffset+o;if(-1=0;--o){var a=this.tryEntries[o],u=a.completion;if("root"===a.tryLoc)return handle("end");if(a.tryLoc<=this.prev){var i=n.call(a,"catchLoc"),l=n.call(a,"finallyLoc");if(i&&l){if(this.prev=0;--r){var o=this.tryEntries[r];if(o.tryLoc<=this.prev&&n.call(o,"finallyLoc")&&this.prev=0;--t){var r=this.tryEntries[t];if(r.finallyLoc===e)return this.complete(r.completion,r.afterLoc),resetTryEntry(r),v}},catch:function(e){for(var t=this.tryEntries.length-1;t>=0;--t){var r=this.tryEntries[t];if(r.tryLoc===e){var n=r.completion;if("throw"===n.type){var o=n.arg;resetTryEntry(r)}return o}}throw Error("illegal catch attempt")},delegateYield:function(e,r,n){return this.delegate={iterator:values(e),resultName:r,nextLoc:n},"next"===this.method&&(this.arg=t),v}},e}(e.exports);try{regeneratorRuntime=t}catch(e){Function("r","regeneratorRuntime = r")(t)}},1756:function(e,t){"use strict";/** - * @license React - * scheduler.production.min.js - * - * Copyright (c) Meta Platforms, Inc. and affiliates. - * - * This source code is licensed under the MIT license found in the - * LICENSE file in the root directory of this source tree. - */function f(e,t){var r=e.length;for(e.push(t);0>>1,o=e[n];if(0>>1;ng(i,r))lg(s,i)?(e[n]=s,e[l]=r,n=l):(e[n]=i,e[u]=r,n=u);else if(lg(s,r))e[n]=s,e[l]=r,n=l;else break}}return t}function g(e,t){var r=e.sortIndex-t.sortIndex;return 0!==r?r:e.id-t.id}if(t.unstable_now=void 0,"object"==typeof performance&&"function"==typeof performance.now){var r,n=performance;t.unstable_now=function(){return n.now()}}else{var o=Date,a=o.now();t.unstable_now=function(){return o.now()-a}}var u=[],i=[],l=1,s=null,p=3,v=!1,_=!1,b=!1,j="function"==typeof setTimeout?setTimeout:null,E="function"==typeof clearTimeout?clearTimeout:null,w="undefined"!=typeof setImmediate?setImmediate:null;function G(e){for(var t=h(i);null!==t;){if(null===t.callback)k(i);else if(t.startTime<=e)k(i),t.sortIndex=t.expirationTime,f(u,t);else break;t=h(i)}}function H(e){if(b=!1,G(e),!_){if(null!==h(u))_=!0,I();else{var t=h(i);null!==t&&J(H,t.startTime-e)}}}"undefined"!=typeof navigator&&void 0!==navigator.scheduling&&void 0!==navigator.scheduling.isInputPending&&navigator.scheduling.isInputPending.bind(navigator.scheduling);var C=!1,A=-1,D=5,U=-1;function O(){return!(t.unstable_now()-Ue&&O());){var a=s.callback;if("function"==typeof a){s.callback=null,p=s.priorityLevel;var l=a(s.expirationTime<=e);if(e=t.unstable_now(),"function"==typeof l){s.callback=l,G(e),n=!0;break t}s===h(u)&&k(u),G(e)}else k(u);s=h(u)}if(null!==s)n=!0;else{var j=h(i);null!==j&&J(H,j.startTime-e),n=!1}}break e}finally{s=null,p=o,v=!1}n=void 0}}finally{n?r():C=!1}}}if("function"==typeof w)r=function(){w(P)};else if("undefined"!=typeof MessageChannel){var B=new MessageChannel,$=B.port2;B.port1.onmessage=P,r=function(){$.postMessage(null)}}else r=function(){j(P,0)};function I(){C||(C=!0,r())}function J(e,r){A=j(function(){e(t.unstable_now())},r)}t.unstable_IdlePriority=5,t.unstable_ImmediatePriority=1,t.unstable_LowPriority=4,t.unstable_NormalPriority=3,t.unstable_Profiling=null,t.unstable_UserBlockingPriority=2,t.unstable_cancelCallback=function(e){e.callback=null},t.unstable_continueExecution=function(){_||v||(_=!0,I())},t.unstable_forceFrameRate=function(e){0>e||125o?(e.sortIndex=n,f(i,e),null===h(u)&&e===h(i)&&(b?(E(A),A=-1):b=!0,J(H,n-o))):(e.sortIndex=a,f(u,e),_||v||(_=!0,I())),e},t.unstable_shouldYield=O,t.unstable_wrapCallback=function(e){var t=p;return function(){var r=p;p=t;try{return e.apply(this,arguments)}finally{p=r}}}},8261:function(e,t,r){"use strict";e.exports=r(1756)},5682:function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),Object.defineProperty(t,"getSegmentParam",{enumerable:!0,get:function(){return getSegmentParam}});let n=r(4507);function getSegmentParam(e){let t=n.INTERCEPTION_ROUTE_MARKERS.find(t=>e.startsWith(t));return(t&&(e=e.slice(t.length)),e.startsWith("[[...")&&e.endsWith("]]"))?{type:"optional-catchall",param:e.slice(5,-2)}:e.startsWith("[...")&&e.endsWith("]")?{type:"catchall",param:e.slice(4,-1)}:e.startsWith("[")&&e.endsWith("]")?{type:"dynamic",param:e.slice(1,-1)}:null}},4507:function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),function(e,t){for(var r in t)Object.defineProperty(e,r,{enumerable:!0,get:t[r]})}(t,{INTERCEPTION_ROUTE_MARKERS:function(){return o},isInterceptionRouteAppPath:function(){return isInterceptionRouteAppPath},extractInterceptionRouteInformation:function(){return extractInterceptionRouteInformation}});let n=r(8183),o=["(..)(..)","(.)","(..)","(...)"];function isInterceptionRouteAppPath(e){return void 0!==e.split("/").find(e=>o.find(t=>e.startsWith(t)))}function extractInterceptionRouteInformation(e){let t,r,a;for(let n of e.split("/"))if(r=o.find(e=>n.startsWith(e))){[t,a]=e.split(r,2);break}if(!t||!r||!a)throw Error(`Invalid interception route: ${e}. Must be in the format //(..|...|..)(..)/`);switch(t=(0,n.normalizeAppPath)(t),r){case"(.)":a="/"===t?`/${a}`:t+"/"+a;break;case"(..)":if("/"===t)throw Error(`Invalid interception route: ${e}. Cannot use (..) marker at the root level, use (.) instead.`);a=t.split("/").slice(0,-1).concat(a).join("/");break;case"(...)":a="/"+a;break;case"(..)(..)":let u=t.split("/");if(u.length<=2)throw Error(`Invalid interception route: ${e}. Cannot use (..)(..) marker at the root level or one level up.`);a=u.slice(0,-2).concat(a).join("/");break;default:throw Error("Invariant: unexpected marker")}return{interceptingRoute:t,interceptedRoute:a}}},4677:function(e,t,r){"use strict";function _class_private_field_loose_base(e,t){if(!Object.prototype.hasOwnProperty.call(e,t))throw TypeError("attempted to use private field on non-instance");return e}r.r(t),r.d(t,{_:function(){return _class_private_field_loose_base},_class_private_field_loose_base:function(){return _class_private_field_loose_base}})},6249:function(e,t,r){"use strict";r.r(t),r.d(t,{_:function(){return _class_private_field_loose_key},_class_private_field_loose_key:function(){return _class_private_field_loose_key}});var n=0;function _class_private_field_loose_key(e){return"__private_"+n+++"_"+e}},1024:function(e,t,r){"use strict";function _interop_require_default(e){return e&&e.__esModule?e:{default:e}}r.r(t),r.d(t,{_:function(){return _interop_require_default},_interop_require_default:function(){return _interop_require_default}})},8533:function(e,t,r){"use strict";function _getRequireWildcardCache(e){if("function"!=typeof WeakMap)return null;var t=new WeakMap,r=new WeakMap;return(_getRequireWildcardCache=function(e){return e?r:t})(e)}function _interop_require_wildcard(e,t){if(!t&&e&&e.__esModule)return e;if(null===e||"object"!=typeof e&&"function"!=typeof e)return{default:e};var r=_getRequireWildcardCache(t);if(r&&r.has(e))return r.get(e);var n={},o=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var a in e)if("default"!==a&&Object.prototype.hasOwnProperty.call(e,a)){var u=o?Object.getOwnPropertyDescriptor(e,a):null;u&&(u.get||u.set)?Object.defineProperty(n,a,u):n[a]=e[a]}return n.default=e,r&&r.set(e,n),n}r.r(t),r.d(t,{_:function(){return _interop_require_wildcard},_interop_require_wildcard:function(){return _interop_require_wildcard}})}}]); \ No newline at end of file diff --git a/frontend/webapp/dep-out/_next/static/chunks/785-a83a8c06b8294aa1.js b/frontend/webapp/dep-out/_next/static/chunks/785-a83a8c06b8294aa1.js deleted file mode 100644 index d55b8dd6f9..0000000000 --- a/frontend/webapp/dep-out/_next/static/chunks/785-a83a8c06b8294aa1.js +++ /dev/null @@ -1 +0,0 @@ -"use strict";(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[785],{6140:function(t,e,n){n.d(e,{P3:function(){return httpDelete},U2:function(){return get},gz:function(){return put},r$:function(){return patch},v_:function(){return post}});var r=n(7022),c=n(9891),u=n(6952),a=n.n(u),o=n(4829);function ownKeys(t,e){var n=Object.keys(t);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(t);e&&(r=r.filter(function(e){return Object.getOwnPropertyDescriptor(t,e).enumerable})),n.push.apply(n,r)}return n}function _objectSpread(t){for(var e=1;e1&&void 0!==r[1]?r[1]:{},c.next=3,fetch(t,{method:"GET",headers:_objectSpread(_objectSpread({},e),{},{Accept:"application/json"})});case 3:if((n=c.sent).ok){c.next=6;break}throw Error("Failed to fetch data from ".concat(t));case 6:return c.abrupt("return",n.json());case 7:case"end":return c.stop()}},_callee)}))).apply(this,arguments)}function post(t,e){return _post.apply(this,arguments)}function _post(){return(_post=(0,c.Z)(a().mark(function _callee2(t,e){var n;return a().wrap(function(r){for(;;)switch(r.prev=r.next){case 0:return r.prev=0,r.next=3,o.Z.post(t,e);case 3:return n=r.sent,r.abrupt("return",n.data);case 7:throw r.prev=7,r.t0=r.catch(0),r.t0;case 10:case"end":return r.stop()}},_callee2,null,[[0,7]])}))).apply(this,arguments)}function put(t,e){o.Z.put(t,e)}function httpDelete(t){o.Z.delete(t)}function patch(t,e){o.Z.patch(t,e)}},6757:function(t,e,n){n.d(e,{BH:function(){return updateDestination},M:function(){return setDestination},RA:function(){return checkConnection},Y3:function(){return getDestination},c1:function(){return deleteDestination},pw:function(){return getDestinations},rG:function(){return getDestinationsTypes}});var r=n(9891),c=n(6952),u=n.n(c),a=n(3915),o=n(6140);function getDestinationsTypes(){return _getDestinationsTypes.apply(this,arguments)}function _getDestinationsTypes(){return(_getDestinationsTypes=(0,r.Z)(u().mark(function _callee(){return u().wrap(function(t){for(;;)switch(t.prev=t.next){case 0:return t.next=2,(0,o.U2)(a.bl.DESTINATION_TYPE);case 2:return t.abrupt("return",t.sent);case 3:case"end":return t.stop()}},_callee)}))).apply(this,arguments)}function getDestinations(){return _getDestinations.apply(this,arguments)}function _getDestinations(){return(_getDestinations=(0,r.Z)(u().mark(function _callee2(){return u().wrap(function(t){for(;;)switch(t.prev=t.next){case 0:return t.next=2,(0,o.U2)(a.bl.DESTINATIONS);case 2:return t.abrupt("return",t.sent);case 3:case"end":return t.stop()}},_callee2)}))).apply(this,arguments)}function getDestination(t){return _getDestination.apply(this,arguments)}function _getDestination(){return(_getDestination=(0,r.Z)(u().mark(function _callee3(t){return u().wrap(function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,(0,o.U2)("".concat(a.bl.DESTINATION_TYPE,"/").concat(t));case 2:return e.abrupt("return",e.sent);case 3:case"end":return e.stop()}},_callee3)}))).apply(this,arguments)}function setDestination(t){return _setDestination.apply(this,arguments)}function _setDestination(){return(_setDestination=(0,r.Z)(u().mark(function _callee4(t){return u().wrap(function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,(0,o.v_)(a.bl.DESTINATIONS,t);case 2:return e.abrupt("return",e.sent);case 3:case"end":return e.stop()}},_callee4)}))).apply(this,arguments)}function updateDestination(t,e){return _updateDestination.apply(this,arguments)}function _updateDestination(){return(_updateDestination=(0,r.Z)(u().mark(function _callee5(t,e){return u().wrap(function(n){for(;;)switch(n.prev=n.next){case 0:return n.next=2,(0,o.gz)("".concat(a.bl.DESTINATIONS,"/").concat(e),t);case 2:return n.abrupt("return",n.sent);case 3:case"end":return n.stop()}},_callee5)}))).apply(this,arguments)}function deleteDestination(t){return _deleteDestination.apply(this,arguments)}function _deleteDestination(){return(_deleteDestination=(0,r.Z)(u().mark(function _callee6(t){return u().wrap(function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,(0,o.P3)("".concat(a.bl.DESTINATIONS,"/").concat(t));case 2:return e.abrupt("return",e.sent);case 3:case"end":return e.stop()}},_callee6)}))).apply(this,arguments)}function checkConnection(t){return _checkConnection.apply(this,arguments)}function _checkConnection(){return(_checkConnection=(0,r.Z)(u().mark(function _callee7(t){return u().wrap(function(e){for(;;)switch(e.prev=e.next){case 0:return e.abrupt("return",(0,o.v_)(a.bl.CHECK_CONNECTION,t));case 1:case"end":return e.stop()}},_callee7)}))).apply(this,arguments)}},3785:function(t,e,n){n.d(e,{RA:function(){return r.RA},w9:function(){return createInstrumentationRule},mn:function(){return deleteAction},Yx:function(){return deleteInstrumentationRule},JN:function(){return deleteSource},Sv:function(){return getActions},i6:function(){return getApplication},Y3:function(){return r.Y3},pw:function(){return r.pw},rG:function(){return r.rG},m1:function(){return getInstrumentationRules},rY:function(){return getNamespaces},c6:function(){return getOdigosDescription},b5:function(){return getSource},b9:function(){return getSourceDescription},e6:function(){return getSources},QA:function(){return patchSources},Zw:function(){return putAction},mW:function(){return setAction},M:function(){return r.M},rI:function(){return setNamespaces},BH:function(){return r.BH},DX:function(){return updateInstrumentationRule}});var r=n(6757),c=n(9891),u=n(6952),a=n.n(u),o=n(3915),i=n(6140);function getNamespaces(){return _getNamespaces.apply(this,arguments)}function _getNamespaces(){return(_getNamespaces=(0,c.Z)(a().mark(function _callee(){return a().wrap(function(t){for(;;)switch(t.prev=t.next){case 0:return t.next=2,(0,i.U2)(o.bl.NAMESPACES);case 2:return t.abrupt("return",t.sent);case 3:case"end":return t.stop()}},_callee)}))).apply(this,arguments)}function getApplication(t){return _getApplication.apply(this,arguments)}function _getApplication(){return(_getApplication=(0,c.Z)(a().mark(function _callee2(t){return a().wrap(function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,(0,i.U2)("".concat(o.bl.APPLICATIONS,"/").concat(t));case 2:return e.abrupt("return",e.sent);case 3:case"end":return e.stop()}},_callee2)}))).apply(this,arguments)}function setNamespaces(t){return _setNamespaces.apply(this,arguments)}function _setNamespaces(){return(_setNamespaces=(0,c.Z)(a().mark(function _callee3(t){return a().wrap(function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,(0,i.v_)(o.bl.NAMESPACES,t);case 2:return e.abrupt("return",e.sent);case 3:case"end":return e.stop()}},_callee3)}))).apply(this,arguments)}function getSources(){return _getSources.apply(this,arguments)}function _getSources(){return(_getSources=(0,c.Z)(a().mark(function _callee4(){return a().wrap(function(t){for(;;)switch(t.prev=t.next){case 0:return t.next=2,(0,i.U2)(o.bl.SOURCES);case 2:return t.abrupt("return",t.sent);case 3:case"end":return t.stop()}},_callee4)}))).apply(this,arguments)}function getSource(t,e,n){return _getSource.apply(this,arguments)}function _getSource(){return(_getSource=(0,c.Z)(a().mark(function _callee5(t,e,n){return a().wrap(function(r){for(;;)switch(r.prev=r.next){case 0:return r.next=2,(0,i.U2)("".concat(o.bl.SOURCES,"/namespace/").concat(t,"/kind/").concat(e,"/name/").concat(n));case 2:return r.abrupt("return",r.sent);case 3:case"end":return r.stop()}},_callee5)}))).apply(this,arguments)}function deleteSource(t,e,n){return _deleteSource.apply(this,arguments)}function _deleteSource(){return(_deleteSource=(0,c.Z)(a().mark(function _callee6(t,e,n){return a().wrap(function(r){for(;;)switch(r.prev=r.next){case 0:return r.next=2,(0,i.P3)("".concat(o.bl.SOURCES,"/namespace/").concat(t,"/kind/").concat(e,"/name/").concat(n));case 2:return r.abrupt("return",r.sent);case 3:case"end":return r.stop()}},_callee6)}))).apply(this,arguments)}function patchSources(t,e,n,r){return _patchSources.apply(this,arguments)}function _patchSources(){return(_patchSources=(0,c.Z)(a().mark(function _callee7(t,e,n,r){return a().wrap(function(c){for(;;)switch(c.prev=c.next){case 0:(0,i.r$)("".concat(o.bl.SOURCES,"/namespace/").concat(t,"/kind/").concat(e,"/name/").concat(n),r);case 1:case"end":return c.stop()}},_callee7)}))).apply(this,arguments)}var s=n(1032);function setAction(t,e){return _setAction.apply(this,arguments)}function _setAction(){return(_setAction=(0,c.Z)(a().mark(function _callee(t,e){return a().wrap(function(n){for(;;)switch(n.prev=n.next){case 0:return n.abrupt("return",(0,i.v_)(s.bl.SET_ACTION(e),t));case 1:case"end":return n.stop()}},_callee)}))).apply(this,arguments)}function putAction(){return _putAction.apply(this,arguments)}function _putAction(){return(_putAction=(0,c.Z)(a().mark(function _callee2(){var t,e,n,r=arguments;return a().wrap(function(c){for(;;)switch(c.prev=c.next){case 0:return t=r.length>0&&void 0!==r[0]?r[0]:"",e=r.length>1?r[1]:void 0,n=r.length>2?r[2]:void 0,c.abrupt("return",(0,i.gz)(s.bl.PUT_ACTION(n,t),e));case 4:case"end":return c.stop()}},_callee2)}))).apply(this,arguments)}function deleteAction(t){return _deleteAction.apply(this,arguments)}function _deleteAction(){return(_deleteAction=(0,c.Z)(a().mark(function _callee3(t){var e,n=arguments;return a().wrap(function(r){for(;;)switch(r.prev=r.next){case 0:return e=n.length>1&&void 0!==n[1]?n[1]:"AddClusterInfo",r.abrupt("return",(0,i.P3)(s.bl.DELETE_ACTION(e,t)));case 2:case"end":return r.stop()}},_callee3)}))).apply(this,arguments)}function getActions(){return _getActions.apply(this,arguments)}function _getActions(){return(_getActions=(0,c.Z)(a().mark(function _callee4(){return a().wrap(function(t){for(;;)switch(t.prev=t.next){case 0:return t.abrupt("return",(0,i.U2)(s.bl.ACTIONS));case 1:case"end":return t.stop()}},_callee4)}))).apply(this,arguments)}function getInstrumentationRules(){return _getInstrumentationRules.apply(this,arguments)}function _getInstrumentationRules(){return(_getInstrumentationRules=(0,c.Z)(a().mark(function _callee(){return a().wrap(function(t){for(;;)switch(t.prev=t.next){case 0:return t.abrupt("return",(0,i.U2)(s.bl.INSTRUMENTATION_RULES));case 1:case"end":return t.stop()}},_callee)}))).apply(this,arguments)}function createInstrumentationRule(t){return _createInstrumentationRule.apply(this,arguments)}function _createInstrumentationRule(){return(_createInstrumentationRule=(0,c.Z)(a().mark(function _callee3(t){return a().wrap(function(e){for(;;)switch(e.prev=e.next){case 0:return e.abrupt("return",(0,i.v_)(s.bl.INSTRUMENTATION_RULES,t));case 1:case"end":return e.stop()}},_callee3)}))).apply(this,arguments)}function updateInstrumentationRule(t,e){return _updateInstrumentationRule.apply(this,arguments)}function _updateInstrumentationRule(){return(_updateInstrumentationRule=(0,c.Z)(a().mark(function _callee4(t,e){return a().wrap(function(n){for(;;)switch(n.prev=n.next){case 0:return n.abrupt("return",(0,i.gz)(s.bl.INSTRUMENTATION_RULE(t),e));case 1:case"end":return n.stop()}},_callee4)}))).apply(this,arguments)}function deleteInstrumentationRule(t){return _deleteInstrumentationRule.apply(this,arguments)}function _deleteInstrumentationRule(){return(_deleteInstrumentationRule=(0,c.Z)(a().mark(function _callee5(t){return a().wrap(function(e){for(;;)switch(e.prev=e.next){case 0:return e.abrupt("return",(0,i.P3)(s.bl.INSTRUMENTATION_RULE(t)));case 1:case"end":return e.stop()}},_callee5)}))).apply(this,arguments)}function getOdigosDescription(){return _getOdigosDescription.apply(this,arguments)}function _getOdigosDescription(){return(_getOdigosDescription=(0,c.Z)(a().mark(function _callee(){return a().wrap(function(t){for(;;)switch(t.prev=t.next){case 0:return t.abrupt("return",(0,i.U2)(s.bl.DESCRIBE_ODIGOS));case 1:case"end":return t.stop()}},_callee)}))).apply(this,arguments)}function getSourceDescription(t,e,n){return _getSourceDescription.apply(this,arguments)}function _getSourceDescription(){return(_getSourceDescription=(0,c.Z)(a().mark(function _callee2(t,e,n){return a().wrap(function(r){for(;;)switch(r.prev=r.next){case 0:return r.abrupt("return",(0,i.U2)(s.bl.DESCRIBE_SOURCE(t,e,n)));case 1:case"end":return r.stop()}},_callee2)}))).apply(this,arguments)}}}]); \ No newline at end of file diff --git a/frontend/webapp/dep-out/_next/static/chunks/7af96b1d-661b23cf9b38f432.js b/frontend/webapp/dep-out/_next/static/chunks/7af96b1d-661b23cf9b38f432.js deleted file mode 100644 index e65e62b391..0000000000 --- a/frontend/webapp/dep-out/_next/static/chunks/7af96b1d-661b23cf9b38f432.js +++ /dev/null @@ -1 +0,0 @@ -"use strict";(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[573],{1135:function(t,e,i){let o;Object.defineProperty(e,"__esModule",{value:!0});var n,s,r,l,h=i(4350),a=i(3958),c=i(7495),d=i(5627),u=i(7155);function getSelection(t){return(11==t.nodeType?t.getSelection?t:t.ownerDocument:t).getSelection()}function contains(t,e){return!!e&&(t==e||t.contains(1!=e.nodeType?e.parentNode:e))}function hasSelection(t,e){if(!e.anchorNode)return!1;try{return contains(t,e.anchorNode)}catch(t){return!1}}function clientRectsFor(t){return 3==t.nodeType?textRange(t,0,t.nodeValue.length).getClientRects():1==t.nodeType?t.getClientRects():[]}function isEquivalentPosition(t,e,i,o){return!!i&&(scanFor(t,e,i,o,-1)||scanFor(t,e,i,o,1))}function domIndex(t){for(var e=0;;e++)if(!(t=t.previousSibling))return e}function scanFor(t,e,i,o,n){for(;;){if(t==i&&e==o)return!0;if(e==(n<0?0:maxOffset(t))){if("DIV"==t.nodeName)return!1;let i=t.parentNode;if(!i||1!=i.nodeType)return!1;e=domIndex(t)+(n<0?0:1),t=i}else{if(1!=t.nodeType||1==(t=t.childNodes[e+(n<0?-1:0)]).nodeType&&"false"==t.contentEditable)return!1;e=n<0?maxOffset(t):0}}}function maxOffset(t){return 3==t.nodeType?t.nodeValue.length:t.childNodes.length}let f={left:0,right:0,top:0,bottom:0};function flattenRect(t,e){let i=e?t.left:t.right;return{left:i,right:i,top:t.top,bottom:t.bottom}}let DOMSelectionState=class DOMSelectionState{constructor(){this.anchorNode=null,this.anchorOffset=0,this.focusNode=null,this.focusOffset=0}eq(t){return this.anchorNode==t.anchorNode&&this.anchorOffset==t.anchorOffset&&this.focusNode==t.focusNode&&this.focusOffset==t.focusOffset}setRange(t){this.set(t.anchorNode,t.anchorOffset,t.focusNode,t.focusOffset)}set(t,e,i,o){this.anchorNode=t,this.anchorOffset=e,this.focusNode=i,this.focusOffset=o}};let p=null;function focusPreventScroll(t){if(t.setActive)return t.setActive();if(p)return t.focus(p);let e=[];for(let i=t;i&&(e.push(i,i.scrollTop,i.scrollLeft),i!=i.ownerDocument);i=i.parentNode);if(t.focus(null==p?{get preventScroll(){return p={preventScroll:!0},!0}}:void 0),!p){p=!1;for(let t=0;te)return i.domBoundsAround(t,e,h);if(c>=t&&-1==o&&(o=l,n=h),h>e&&i.dom.parentNode==this.dom){s=l,r=a;break}a=c,h=c+i.breakAfter}return{from:n,to:r<0?i+this.length:r,startDOM:(o?this.children[o-1].dom.nextSibling:null)||this.dom.firstChild,endDOM:s=0?this.children[s].dom:null}}markDirty(t=!1){this.dirty|=2,this.markParentsDirty(t)}markParentsDirty(t){for(let e=this.parent;e;e=e.parent){if(t&&(e.dirty|=2),1&e.dirty)return;e.dirty|=1,t=!1}}setParent(t){this.parent!=t&&(this.parent=t,this.dirty&&this.markParentsDirty(!0))}setDOM(t){this.dom&&(this.dom.cmView=null),this.dom=t,t.cmView=this}get rootView(){for(let t=this;;){let e=t.parent;if(!e)return t;t=e}}replaceChildren(t,e,i=g){this.markDirty();for(let i=t;ithis.pos||t==this.pos&&(e>0||0==this.i||this.children[this.i-1].breakAfter))return this.off=t-this.pos,this;let i=this.children[--this.i];this.pos-=i.length+i.breakAfter}}};function replaceRange(t,e,i,o,n,s,r,l,h){let{children:a}=t,c=a.length?a[e]:null,d=s.length?s[s.length-1]:null,u=d?d.breakAfter:r;if(!(e==o&&c&&!r&&!u&&s.length<2&&c.merge(i,n,s.length?d:null,0==i,l,h))){if(o0&&(!r&&s.length&&c.merge(i,c.length,s[0],!1,l,0)?c.breakAfter=s.shift().breakAfter:(i2);var A={mac:D||/Mac/.test(m.platform),windows:/Win/.test(m.platform),linux:/Linux|X11/.test(m.platform),ie:S,ie_version:y?w.documentMode||6:b?+b[1]:v?+v[1]:0,gecko:M,gecko_version:M?+(/Firefox\/(\d+)/.exec(m.userAgent)||[0,0])[1]:0,chrome:!!x,chrome_version:x?+x[1]:0,ios:D,android:/Android\b/.test(m.userAgent),webkit:k,safari:C,webkit_version:k?+(/\bAppleWebKit\/(\d+)/.exec(navigator.userAgent)||[0,0])[1]:0,tabSize:null!=w.documentElement.style.tabSize?"tab-size":"-moz-tab-size"};let TextView=class TextView extends ContentView{constructor(t){super(),this.text=t}get length(){return this.text.length}createDOM(t){this.setDOM(t||document.createTextNode(this.text))}sync(t){this.dom||this.createDOM(),this.dom.nodeValue!=this.text&&(t&&t.node==this.dom&&(t.written=!0),this.dom.nodeValue=this.text)}reuseDOM(t){3==t.nodeType&&this.createDOM(t)}merge(t,e,i){return(!i||i instanceof TextView&&!(this.length-(e-t)+i.length>256))&&(this.text=this.text.slice(0,t)+(i?i.text:"")+this.text.slice(e),this.markDirty(),!0)}split(t){let e=new TextView(this.text.slice(t));return this.text=this.text.slice(0,t),this.markDirty(),e}localPosFromDOM(t,e){return t==this.dom?e:e?this.text.length:0}domAtPos(t){return new DOMPos(this.dom,t)}domBoundsAround(t,e,i){return{from:i,to:i+this.length,startDOM:this.dom,endDOM:this.dom.nextSibling}}coordsAt(t,e){return textCoords(this.dom,t,e)}};let MarkView=class MarkView extends ContentView{constructor(t,e=[],i=0){for(let o of(super(),this.mark=t,this.children=e,this.length=i,e))o.setParent(this)}setAttrs(t){if(clearAttributes(t),this.mark.class&&(t.className=this.mark.class),this.mark.attrs)for(let e in this.mark.attrs)t.setAttribute(e,this.mark.attrs[e]);return t}reuseDOM(t){t.nodeName==this.mark.tagName.toUpperCase()&&(this.setDOM(t),this.dirty|=6)}sync(t){this.dom?4&this.dirty&&this.setAttrs(this.dom):this.setDOM(this.setAttrs(document.createElement(this.mark.tagName))),super.sync(t)}merge(t,e,i,o,n,s){return(!i||!!(i instanceof MarkView&&i.mark.eq(this.mark))&&(!t||!(n<=0))&&(!(et&&e.push(i=t&&(o=n),i=r,n++}let s=this.length-t;return this.length=t,o>-1&&(this.children.length=o,this.markDirty()),new MarkView(this.mark,e,s)}domAtPos(t){return inlineDOMAtPos(this.dom,this.children,t)}coordsAt(t,e){return coordsInChildren(this,t,e)}};function textCoords(t,e,i){let o=t.nodeValue.length;e>o&&(e=o);let n=e,s=e,r=0;0==e&&i<0||e==o&&i>=0?A.chrome||A.gecko||(e?(n--,r=1):(s++,r=-1)):i<0?n--:s++;let l=textRange(t,n,s).getClientRects();if(!l.length)return f;let h=l[(r?r<0:i>=0)?0:l.length-1];return A.safari&&!r&&0==h.width&&(h=Array.prototype.find.call(l,t=>t.width)||h),r?flattenRect(h,r<0):h||null}let WidgetView=class WidgetView extends ContentView{constructor(t,e,i){super(),this.widget=t,this.length=e,this.side=i,this.prevWidget=null}static create(t,e,i){return new(t.customView||WidgetView)(t,e,i)}split(t){let e=WidgetView.create(this.widget,this.length-t,this.side);return this.length-=t,e}sync(){this.dom&&this.widget.updateDOM(this.dom)||(this.dom&&this.prevWidget&&this.prevWidget.destroy(this.dom),this.prevWidget=null,this.setDOM(this.widget.toDOM(this.editorView)),this.dom.contentEditable="false")}getSide(){return this.side}merge(t,e,i,o,n,s){return(!i||i instanceof WidgetView&&!!this.widget.compare(i.widget)&&(!(t>0)||!(n<=0))&&(!(e0?i.length-1:0;o=i[e],t>0?0!=e:e!=i.length-1&&!(o.top0?-1:1);return 0==t&&e>0||t==this.length&&e<=0?o:flattenRect(o,0==t)}get isEditable(){return!1}destroy(){super.destroy(),this.dom&&this.widget.destroy(this.dom)}};let CompositionView=class CompositionView extends WidgetView{domAtPos(t){let{topView:e,text:i}=this.widget;return e?scanCompositionTree(t,0,e,i,(t,e)=>t.domAtPos(e),t=>new DOMPos(i,Math.min(t,i.nodeValue.length))):new DOMPos(i,Math.min(t,i.nodeValue.length))}sync(){this.setDOM(this.widget.toDOM())}localPosFromDOM(t,e){let{topView:i,text:o}=this.widget;return i?function posFromDOMInCompositionTree(t,e,i,o){if(i instanceof MarkView)for(let n of i.children){let i=0,s=contains(n.dom,o);if(contains(n.dom,t))return i+(s?posFromDOMInCompositionTree(t,e,n,o):n.localPosFromDOM(t,e));i+=s?o.nodeValue.length:n.length}else if(i.dom==o)return Math.min(e,o.nodeValue.length);return i.localPosFromDOM(t,e)}(t,e,i,o):Math.min(e,this.length)}ignoreMutation(){return!1}get overrideDOMText(){return null}coordsAt(t,e){let{topView:i,text:o}=this.widget;return i?scanCompositionTree(t,e,i,o,(t,e,i)=>t.coordsAt(e,i),(t,e)=>textCoords(o,t,e)):textCoords(o,t,e)}destroy(){var t;super.destroy(),null===(t=this.widget.topView)||void 0===t||t.destroy()}get isEditable(){return!0}};function scanCompositionTree(t,e,i,o,n,s){if(i instanceof MarkView){for(let r of i.children){let i=contains(r.dom,o),l=i?o.nodeValue.length:r.length;if(t=r.getSide())return i?scanCompositionTree(t,e,r,o,n,s):n(r,t,e);t-=l}return n(i,i.length,-1)}return i.dom==o?s(t,e):n(i,t,e)}let WidgetBufferView=class WidgetBufferView extends ContentView{constructor(t){super(),this.side=t}get length(){return 0}merge(){return!1}become(t){return t instanceof WidgetBufferView&&t.side==this.side}split(){return new WidgetBufferView(this.side)}sync(){if(!this.dom){let t=document.createElement("img");t.className="cm-widgetBuffer",t.setAttribute("aria-hidden","true"),this.setDOM(t)}}getSide(){return this.side}domAtPos(t){return DOMPos.before(this.dom)}localPosFromDOM(){return 0}domBoundsAround(){return null}coordsAt(t){let e=this.dom.getBoundingClientRect(),i=function(t,e){let i=t.parent,o=i?i.children.indexOf(t):-1;for(;i&&o>=0;)if(e<0?o>0:o0?-1:1);return i&&i.tope.top?{left:e.left,right:e.right,top:i.top,bottom:i.bottom}:e}get overrideDOMText(){return d.Text.empty}};function inlineDOMAtPos(t,e,i){let o=0;for(let n=0;o=s.getSide())){if(i>n&&i0;o--){let i=e[o-1].dom;if(i.parentNode==t)return DOMPos.after(i)}return new DOMPos(t,0)}function coordsInChildren(t,e,i){for(let o=0,n=0;n0?r>=e:r>e)&&(e0)){let t=0;if(r==o){if(0>=s.getSide())continue;t=i=-s.getSide()}let n=s.coordsAt(Math.max(0,e-o),i);return t&&n?flattenRect(n,i<0):n}o=r}let o=t.dom.lastChild;if(!o)return t.dom.getBoundingClientRect();let n=clientRectsFor(o);return n[n.length-1]||null}function combineAttrs(t,e){for(let i in t)"class"==i&&e.class?e.class+=" "+t.class:"style"==i&&e.style?e.style+=";"+t.style:e[i]=t[i];return e}function attrsEq(t,e){if(t==e)return!0;if(!t||!e)return!1;let i=Object.keys(t),o=Object.keys(e);if(i.length!=o.length)return!1;for(let n of i)if(-1==o.indexOf(n)||t[n]!==e[n])return!1;return!0}function updateAttrs(t,e,i){if(e)for(let o in e)i&&o in i||t.removeAttribute(o);if(i)for(let o in i)e&&e[o]==i[o]||t.setAttribute(o,i[o])}TextView.prototype.children=WidgetView.prototype.children=WidgetBufferView.prototype.children=g;let WidgetType=class WidgetType{eq(t){return!1}updateDOM(t){return!1}compare(t){return this==t||this.constructor==t.constructor&&this.eq(t)}get estimatedHeight(){return -1}ignoreEvent(t){return!0}get customView(){return null}destroy(t){}};e.BlockType=void 0,(n=e.BlockType||(e.BlockType={}))[n.Text=0]="Text",n[n.WidgetBefore=1]="WidgetBefore",n[n.WidgetAfter=2]="WidgetAfter",n[n.WidgetRange=3]="WidgetRange";let Decoration=class Decoration extends c.RangeValue{constructor(t,e,i,o){super(),this.startSide=t,this.endSide=e,this.widget=i,this.spec=o}get heightRelevant(){return!1}static mark(t){return new MarkDecoration(t)}static widget(t){let e=t.side||0,i=!!t.block;return e+=i?e>0?3e8:-4e8:e>0?1e8:-1e8,new PointDecoration(t,e,e,i,t.widget||null,!1)}static replace(t){let e=!!t.block,i,o;if(t.isBlockGap)i=-5e8,o=4e8;else{let{start:n,end:s}=getInclusive(t,e);i=(n?e?-3e8:-1:5e8)-1,o=(s?e?2e8:1:-6e8)+1}return new PointDecoration(t,i,o,e,t.widget||null,!0)}static line(t){return new LineDecoration(t)}static set(t,e=!1){return c.RangeSet.of(t,e)}hasHeight(){return!!this.widget&&this.widget.estimatedHeight>-1}};Decoration.none=c.RangeSet.empty;let MarkDecoration=class MarkDecoration extends Decoration{constructor(t){let{start:e,end:i}=getInclusive(t);super(e?-1:5e8,i?1:-6e8,null,t),this.tagName=t.tagName||"span",this.class=t.class||"",this.attrs=t.attributes||null}eq(t){return this==t||t instanceof MarkDecoration&&this.tagName==t.tagName&&this.class==t.class&&attrsEq(this.attrs,t.attrs)}range(t,e=t){if(t>=e)throw RangeError("Mark decorations may not be empty");return super.range(t,e)}};MarkDecoration.prototype.point=!1;let LineDecoration=class LineDecoration extends Decoration{constructor(t){super(-2e8,-2e8,null,t)}eq(t){return t instanceof LineDecoration&&attrsEq(this.spec.attributes,t.spec.attributes)}range(t,e=t){if(e!=t)throw RangeError("Line decoration ranges must be zero-length");return super.range(t,e)}};LineDecoration.prototype.mapMode=h.MapMode.TrackBefore,LineDecoration.prototype.point=!0;let PointDecoration=class PointDecoration extends Decoration{constructor(t,e,i,o,n,s){super(e,i,n,t),this.block=o,this.isReplace=s,this.mapMode=o?e<=0?h.MapMode.TrackBefore:h.MapMode.TrackAfter:h.MapMode.TrackDel}get type(){return this.startSide=5}eq(t){var e,i;return t instanceof PointDecoration&&((e=this.widget)==(i=t.widget)||!!(e&&i&&e.compare(i)))&&this.block==t.block&&this.startSide==t.startSide&&this.endSide==t.endSide}range(t,e=t){if(this.isReplace&&(t>e||t==e&&this.startSide>0&&this.endSide<=0))throw RangeError("Invalid range for replacement decoration");if(!this.isReplace&&e!=t)throw RangeError("Widget decorations can only have zero-length ranges");return super.range(t,e)}};function getInclusive(t,e=!1){let{inclusiveStart:i,inclusiveEnd:o}=t;return null==i&&(i=t.inclusive),null==o&&(o=t.inclusive),{start:null!=i?i:e,end:null!=o?o:e}}function addRange(t,e,i,o=0){let n=i.length-1;n>=0&&i[n]+o>=t?i[n]=Math.max(i[n],e):i.push(t,e)}PointDecoration.prototype.point=!0;let LineView=class LineView extends ContentView{constructor(){super(...arguments),this.children=[],this.length=0,this.prevAttrs=void 0,this.attrs=null,this.breakAfter=0}merge(t,e,i,o,n,s){if(i){if(!(i instanceof LineView))return!1;this.dom||i.transferDOM(this)}return o&&this.setDeco(i?i.attrs:null),mergeChildrenInto(this,t,e,i?i.children:[],n,s),!0}split(t){let e=new LineView;if(e.breakAfter=this.breakAfter,0==this.length)return e;let{i,off:o}=this.childPos(t);o&&(e.append(this.children[i].split(o),0),this.children[i].merge(o,this.children[i].length,null,!1,0,0),i++);for(let t=i;t0&&0==this.children[i-1].length;)this.children[--i].destroy();return this.children.length=i,this.markDirty(),this.length=t,e}transferDOM(t){this.dom&&(t.setDOM(this.dom),t.prevAttrs=void 0===this.prevAttrs?this.attrs:this.prevAttrs,this.prevAttrs=void 0,this.dom=null)}setDeco(t){attrsEq(this.attrs,t)||(this.dom&&(this.prevAttrs=this.attrs,this.markDirty()),this.attrs=t)}append(t,e){!function joinInlineInto(t,e,i){let o,{children:n}=t;i>0&&e instanceof MarkView&&n.length&&(o=n[n.length-1])instanceof MarkView&&o.mark.eq(e.mark)?joinInlineInto(o,e.children[0],i-1):(n.push(e),e.setParent(t)),t.length+=e.length}(this,t,e)}addLineDeco(t){let e=t.spec.attributes,i=t.spec.class;e&&(this.attrs=combineAttrs(e,this.attrs||{})),i&&(this.attrs=combineAttrs({class:i},this.attrs||{}))}domAtPos(t){return inlineDOMAtPos(this.dom,this.children,t)}reuseDOM(t){"DIV"==t.nodeName&&(this.setDOM(t),this.dirty|=6)}sync(t){var e;this.dom?4&this.dirty&&(clearAttributes(this.dom),this.dom.className="cm-line",this.prevAttrs=this.attrs?null:void 0):(this.setDOM(document.createElement("div")),this.dom.className="cm-line",this.prevAttrs=this.attrs?null:void 0),void 0!==this.prevAttrs&&(updateAttrs(this.dom,this.prevAttrs,this.attrs),this.dom.classList.add("cm-line"),this.prevAttrs=void 0),super.sync(t);let i=this.dom.lastChild;for(;i&&ContentView.get(i) instanceof MarkView;)i=i.lastChild;if(!i||!this.length||"BR"!=i.nodeName&&(null===(e=ContentView.get(i))||void 0===e?void 0:e.isEditable)==!1&&(!A.ios||!this.children.some(t=>t instanceof TextView))){let t=document.createElement("BR");t.cmIgnore=!0,this.dom.appendChild(t)}}measureTextSize(){if(0==this.children.length||this.length>20)return null;let t=0;for(let e of this.children){if(!(e instanceof TextView))return null;let i=clientRectsFor(e.dom);if(1!=i.length)return null;t+=i[0].width}return{lineHeight:this.dom.getBoundingClientRect().height,charWidth:t/this.length}}coordsAt(t,e){return coordsInChildren(this,t,e)}become(t){return!1}get type(){return e.BlockType.Text}static find(t,e){for(let i=0,o=0;i=e){if(n instanceof LineView)return n;if(s>e)break}o=s+n.breakAfter}return null}};let BlockWidgetView=class BlockWidgetView extends ContentView{constructor(t,e,i){super(),this.widget=t,this.length=e,this.type=i,this.breakAfter=0,this.prevWidget=null}merge(t,e,i,o,n,s){return(!i||i instanceof BlockWidgetView&&!!this.widget.compare(i.widget)&&(!(t>0)||!(n<=0))&&(!(e0;){if(this.textOff==this.text.length){let{value:e,lineBreak:i,done:o}=this.cursor.next(this.skip);if(this.skip=0,o)throw Error("Ran out of text content when drawing inline views");if(i){this.posCovered()||this.getLine(),this.content.length?this.content[this.content.length-1].breakAfter=1:this.breakAtStart=1,this.flushBuffer([]),this.curLine=null,t--;continue}this.text=e,this.textOff=0}let o=Math.min(this.text.length-this.textOff,t,512);this.flushBuffer(e.slice(0,i)),this.getLine().append(wrapMarks(new TextView(this.text.slice(this.textOff,this.textOff+o)),e),i),this.atCursorPos=!0,this.textOff+=o,t-=o,i=0}}span(t,e,i,o){this.buildText(e-t,i,o),this.pos=e,this.openStart<0&&(this.openStart=o)}point(t,i,o,n,s){let r=i-t;if(o instanceof PointDecoration){if(o.block){let{type:t}=o;t!=e.BlockType.WidgetAfter||this.posCovered()||this.getLine(),this.addBlockWidget(new BlockWidgetView(o.widget||new NullWidget("div"),r,t))}else{let e=WidgetView.create(o.widget||new NullWidget("span"),r,o.startSide),l=this.atCursorPos&&!e.isEditable&&s<=n.length&&(t0),h=!e.isEditable&&(tthis.doc.lineAt(this.pos).to)throw RangeError("Decorations that replace line breaks may not be specified via plugins")}return!0}static build(t,e,i,o,n){let s=new ContentBuilder(t,e,i,n);return s.openEnd=c.RangeSet.spans(o,e,i,s),s.openStart<0&&(s.openStart=s.openEnd),s.finish(s.openEnd),s}};function wrapMarks(t,e){for(let i of e)t=new MarkView(i,[t],t.length);return t}let NullWidget=class NullWidget extends WidgetType{constructor(t){super(),this.tag=t}eq(t){return t.tag==this.tag}toDOM(){return document.createElement(this.tag)}updateDOM(t){return t.nodeName.toLowerCase()==this.tag}};let T=[],O=h.Facet.define(),B=h.Facet.define(),E=h.Facet.define(),V=h.Facet.define(),R=h.Facet.define(),P=h.Facet.define(),L=h.StateEffect.define({map:(t,e)=>t.map(e)}),H=h.StateEffect.define({map:(t,e)=>t.map(e)});let ScrollTarget=class ScrollTarget{constructor(t,e="nearest",i="nearest",o=5,n=5){this.range=t,this.y=e,this.x=i,this.yMargin=o,this.xMargin=n}map(t){return t.empty?this:new ScrollTarget(this.range.map(t),this.y,this.x,this.yMargin,this.xMargin)}};let F=h.StateEffect.define({map:(t,e)=>t.map(e)});function logException(t,e,i){let o=t.facet(V);o.length?o[0](e):window.onerror?window.onerror(String(e),i,void 0,void 0,e):i?console.error(i+":",e):console.error(e)}let W=h.Facet.define({combine:t=>!t.length||t[0]});let PluginFieldProvider=class PluginFieldProvider{constructor(t,e){this.field=t,this.get=e}};let PluginField=class PluginField{from(t){return new PluginFieldProvider(this,t)}static define(){return new PluginField}};PluginField.decorations=PluginField.define(),PluginField.atomicRanges=PluginField.define(),PluginField.scrollMargins=PluginField.define();let N=0,I=h.Facet.define();let ViewPlugin=class ViewPlugin{constructor(t,e,i){this.id=t,this.create=e,this.fields=i,this.extension=I.of(this)}static define(t,e){let{eventHandlers:i,provide:o,decorations:n}=e||{},s=[];if(o)for(let t of Array.isArray(o)?o:[o])s.push(t);return i&&s.push(z.from(t=>({plugin:t,handlers:i}))),n&&s.push(PluginField.decorations.from(n)),new ViewPlugin(N++,t,s)}static fromClass(t,e){return ViewPlugin.define(e=>new t(e),e)}};let z=PluginField.define();let PluginInstance=class PluginInstance{constructor(t){this.spec=t,this.mustUpdate=null,this.value=null}takeField(t,e){if(this.spec)for(let{field:i,get:o}of this.spec.fields)i==t&&e.push(o(this.value))}update(t){if(this.value){if(this.mustUpdate){let t=this.mustUpdate;if(this.mustUpdate=null,this.value.update)try{this.value.update(t)}catch(e){if(logException(t.state,e,"CodeMirror plugin crashed"),this.value.destroy)try{this.value.destroy()}catch(t){}this.deactivate()}}}else if(this.spec)try{this.value=this.spec.create(t)}catch(e){logException(t.state,e,"CodeMirror plugin crashed"),this.deactivate()}return this}destroy(t){var e;if(null===(e=this.value)||void 0===e?void 0:e.destroy)try{this.value.destroy()}catch(e){logException(t.state,e,"CodeMirror plugin crashed")}}deactivate(){this.spec=this.value=null}};let q=h.Facet.define(),G=h.Facet.define(),K=h.Facet.define(),j=h.Facet.define();let ChangedRange=class ChangedRange{constructor(t,e,i,o){this.fromA=t,this.toA=e,this.fromB=i,this.toB=o}join(t){return new ChangedRange(Math.min(this.fromA,t.fromA),Math.max(this.toA,t.toA),Math.min(this.fromB,t.fromB),Math.max(this.toB,t.toB))}addToSet(t){let e=t.length,i=this;for(;e>0;e--){let o=t[e-1];if(!(o.fromA>i.toA)){if(o.toAa)break;n+=2}if(!l)return i;new ChangedRange(l.fromA,l.toA,l.fromB,l.toB).addToSet(i),s=l.toA,r=l.toB}}};let ViewUpdate=class ViewUpdate{constructor(t,e,i=T){for(let o of(this.view=t,this.state=e,this.transactions=i,this.flags=0,this.startState=t.state,this.changes=h.ChangeSet.empty(this.startState.doc.length),i))this.changes=this.changes.compose(o.changes);let o=[];this.changes.iterChangedRanges((t,e,i,n)=>o.push(new ChangedRange(t,e,i,n))),this.changedRanges=o;let n=t.hasFocus;n!=t.inputState.notifiedFocused&&(t.inputState.notifiedFocused=n,this.flags|=1)}get viewportChanged(){return(4&this.flags)>0}get heightChanged(){return(2&this.flags)>0}get geometryChanged(){return this.docChanged||(10&this.flags)>0}get focusChanged(){return(1&this.flags)>0}get docChanged(){return!this.changes.empty}get selectionSet(){return this.transactions.some(t=>t.selection)}get empty(){return 0==this.flags&&0==this.transactions.length}};e.Direction=void 0,(s=e.Direction||(e.Direction={}))[s.LTR=0]="LTR",s[s.RTL=1]="RTL";let U=e.Direction.LTR,_=e.Direction.RTL;function dec(t){let e=[];for(let i=0;i=e){if(r.level==i)return s;(n<0||(0!=o?o<0?r.frome:t[n].level>r.level))&&(n=s)}}if(n<0)throw RangeError("Index out of range");return n}};let Z=[];function computeOrder(t,e){let i=t.length,o=e==U?1:2,n=e==U?2:1;if(!t||1==o&&!J.test(t))return trivialOrder(i);for(let e=0,n=o,r=o;e=0;t-=3)if(Q[t+1]==-h){let i=Q[t+2],r=2&i?o:4&i?1&i?n:o:0;r&&(Z[e]=Z[Q[t]]=r),s=t;break}}else if(189==Q.length)break;else Q[s++]=e,Q[s++]=l,Q[s++]=r}else if(2==(a=Z[e])||1==a){let t=a==o;r=t?0:1;for(let e=s-3;e>=0;e-=3){let i=Q[e+2];if(2&i)break;if(t)Q[e+2]|=2;else{if(4&i)break;Q[e+2]|=4}}}for(let t=0;te;){let t=i,o=2!=Z[--i];for(;i>e&&o==(2!=Z[i-1]);)i--;r.push(new BidiSpan(i,t,o?2:1))}else r.push(new BidiSpan(e,t,0))}else for(let t=0;t1)for(let e of this.points)e.node==t&&e.pos>this.text.length&&(e.pos-=s-1);i=n+s}}readNode(t){if(t.cmIgnore)return;let e=ContentView.get(t),i=e&&e.overrideDOMText;if(null!=i){this.findPointInside(t,i.length);for(let t=i.iter();!t.next().done;)t.lineBreak?this.lineBreak():this.append(t.value)}else 3==t.nodeType?this.readTextNode(t):"BR"==t.nodeName?t.nextSibling&&this.lineBreak():1==t.nodeType&&this.readRange(t.firstChild,null)}findPointBefore(t,e){for(let i of this.points)i.node==t&&t.childNodes[i.offset]==e&&(i.pos=this.text.length)}findPointInside(t,e){for(let i of this.points)(3==t.nodeType?i.node==t:t.contains(i.node))&&(i.pos=this.text.length+Math.min(e,i.offset))}};function isBlockElement(t){return 1==t.nodeType&&/^(DIV|P|LI|UL|OL|BLOCKQUOTE|DD|DT|H\d|SECTION|PRE)$/.test(t.nodeName)}let DOMPoint=class DOMPoint{constructor(t,e){this.node=t,this.offset=e,this.pos=-1}};let DocView=class DocView extends ContentView{constructor(t){super(),this.view=t,this.compositionDeco=Decoration.none,this.decorations=[],this.pluginDecorationLength=0,this.minWidth=0,this.minWidthFrom=0,this.minWidthTo=0,this.impreciseAnchor=null,this.impreciseHead=null,this.forceSelection=!1,this.lastUpdate=Date.now(),this.setDOM(t.contentDOM),this.children=[new LineView],this.children[0].setParent(this),this.updateDeco(),this.updateInner([new ChangedRange(0,0,0,t.state.doc.length)],0)}get root(){return this.view.root}get editorView(){return this.view}get length(){return this.view.state.doc.length}update(t){var e,i,o;let n,s=t.changedRanges;this.minWidth>0&&s.length&&(s.every(({fromA:t,toA:e})=>ethis.minWidthTo)?(this.minWidthFrom=t.changes.mapPos(this.minWidthFrom,1),this.minWidthTo=t.changes.mapPos(this.minWidthTo,1)):this.minWidth=this.minWidthFrom=this.minWidthTo=0),this.view.inputState.composing<0?this.compositionDeco=Decoration.none:(t.transactions.length||this.dirty)&&(this.compositionDeco=function(t,e){let i=compositionSurroundingNode(t);if(!i)return Decoration.none;let{from:o,to:n,node:s,text:r}=i,l=e.mapPos(o,1),h=Math.max(l,e.mapPos(n,-1)),{state:a}=t,c=3==s.nodeType?s.nodeValue:new DOMReader([],a).readRange(s.firstChild,null).text;if(h-l{this.dom.style.height=this.view.viewState.contentHeight+"px",this.dom.style.minWidth=this.minWidth?this.minWidth+"px":"";let t=A.chrome||A.ios?{node:i.selectionRange.focusNode,written:!1}:void 0;this.sync(t),this.dirty=0,t&&(t.written||i.selectionRange.focusNode!=t.node)&&(this.forceSelection=!0),this.dom.style.height=""});let o=[];if(this.view.viewport.from||this.view.viewport.to=0?t[e]:null;if(!o)break;let{fromA:n,toA:s,fromB:r,toB:l}=o,{content:h,breakAtStart:a,openStart:c,openEnd:d}=ContentBuilder.build(this.view.state.doc,r,l,this.decorations,this.pluginDecorationLength),{i:u,off:f}=i.findPos(s,1),{i:p,off:g}=i.findPos(n,-1);replaceRange(this,p,g,u,f,h,a,c,d)}}updateSelection(t=!1,e=!1){var i;if(t&&this.view.observer.readSelectionRange(),!(e||this.mayControlSelection())||A.ios&&this.view.inputState.rapidCompositionStart)return;let o=this.forceSelection;this.forceSelection=!1;let n=this.view.state.selection.main,s=this.domAtPos(n.anchor),r=n.empty?s:this.domAtPos(n.head);if(A.gecko&&n.empty&&1==(i=s).node.nodeType&&i.node.firstChild&&(0==i.offset||"false"==i.node.childNodes[i.offset-1].contentEditable)&&(i.offset==i.node.childNodes.length||"false"==i.node.childNodes[i.offset].contentEditable)){let t=document.createTextNode("");this.view.observer.ignore(()=>s.node.insertBefore(t,s.node.childNodes[s.offset]||null)),s=r=new DOMPos(t,0),o=!0}let l=this.view.observer.selectionRange;!o&&l.focusNode&&isEquivalentPosition(s.node,s.offset,l.anchorNode,l.anchorOffset)&&isEquivalentPosition(r.node,r.offset,l.focusNode,l.focusOffset)||(this.view.observer.ignore(()=>{A.android&&A.chrome&&this.dom.contains(l.focusNode)&&function(t,e){for(let i=t;i&&i!=e;i=i.assignedSlot||i.parentNode)if(1==i.nodeType&&"false"==i.contentEditable)return!0;return!1}(l.focusNode,this.dom)&&(this.dom.blur(),this.dom.focus({preventScroll:!0}));let t=getSelection(this.root);if(n.empty){if(A.gecko){var e,i;let t=(e=s.node,i=s.offset,1!=e.nodeType?0:(i&&"false"==e.childNodes[i-1].contentEditable?1:0)|(in.head&&([s,r]=[r,s]),e.setEnd(r.node,r.offset),e.setStart(s.node,s.offset),t.removeAllRanges(),t.addRange(e)}}),this.view.observer.setSelectionRange(s,r)),this.impreciseAnchor=s.precise?null:new DOMPos(l.anchorNode,l.anchorOffset),this.impreciseHead=r.precise?null:new DOMPos(l.focusNode,l.focusOffset)}enforceCursorAssoc(){if(this.compositionDeco.size)return;let t=this.view.state.selection.main,e=getSelection(this.root);if(!t.empty||!t.assoc||!e.modify)return;let i=LineView.find(this,t.head);if(!i)return;let o=i.posAtStart;if(t.head==o||t.head==o+i.length)return;let n=this.coordsAt(t.head,-1),s=this.coordsAt(t.head,1);if(!n||!s||n.bottom>s.top)return;let r=this.domAtPos(t.head+t.assoc);e.collapse(r.node,r.offset),e.modify("move",t.assoc<0?"forward":"backward","lineboundary")}mayControlSelection(){return this.view.state.facet(W)?this.root.activeElement==this.dom:hasSelection(this.dom,this.view.observer.selectionRange)}nearest(t){for(let e=t;e;){let t=ContentView.get(e);if(t&&t.rootView==this)return t;e=e.parentNode}return null}posFromDOM(t,e){let i=this.nearest(t);if(!i)throw RangeError("Trying to find position for a DOM position outside of the document");return i.localPosFromDOM(t,e)+i.posAtStart}domAtPos(t){let{i:e,off:i}=this.childCursor().findPos(t,-1);for(;er||t==r&&s.type!=e.BlockType.WidgetBefore&&s.type!=e.BlockType.WidgetAfter&&(!n||2==i||this.children[n-1].breakAfter||this.children[n-1].type==e.BlockType.WidgetBefore&&i>-2))return s.coordsAt(t-r,i);o=r}}measureVisibleLineHeights(){let t=[],{from:i,to:o}=this.view.viewState.viewport,n=this.view.contentDOM.clientWidth,s=n>Math.max(this.view.scrollDOM.clientWidth,this.minWidth)+1,r=-1;for(let l=0,h=0;ho)break;if(l>=i){let i=a.dom.getBoundingClientRect();if(t.push(i.height),s){let t=a.dom.lastChild,o=t?clientRectsFor(t):[];if(o.length){let t=o[o.length-1],s=this.view.textDirection==e.Direction.LTR?t.right-i.left:i.right-t.left;s>r&&(r=s,this.minWidth=n,this.minWidthFrom=l,this.minWidthTo=c)}}}l=c+a.breakAfter}return t}measureTextSize(){for(let t of this.children)if(t instanceof LineView){let e=t.measureTextSize();if(e)return e}let t=document.createElement("div"),e,i;return t.className="cm-line",t.textContent="abc def ghi jkl mno pqr stu",this.view.observer.ignore(()=>{this.dom.appendChild(t);let o=clientRectsFor(t.firstChild)[0];e=t.getBoundingClientRect().height,i=o?o.width/27:7,t.remove()}),{lineHeight:e,charWidth:i}}childCursor(t=this.length){let e=this.children.length;return e&&(t-=this.children[--e].length),new ChildCursor(this.children,t,e)}computeBlockGapDeco(){let t=[],e=this.view.viewState;for(let i=0,o=0;;o++){let n=o==e.viewports.length?null:e.viewports[o],s=n?n.from-1:this.length;if(s>i){let o=e.lineBlockAt(s).bottom-e.lineBlockAt(i).top;t.push(Decoration.replace({widget:new BlockGapWidget(o),block:!0,inclusive:!0,isBlockGap:!0}).range(i,s))}if(!n)break;i=n.to+1}return Decoration.set(t)}updateDeco(){let t=this.view.pluginField(PluginField.decorations);return this.pluginDecorationLength=t.length,this.decorations=[...t,...this.view.state.facet(K),this.compositionDeco,this.computeBlockGapDeco(),this.view.viewState.lineGapDeco]}scrollIntoView(t){let{range:i}=t,o=this.coordsAt(i.head,i.empty?i.assoc:i.head>i.anchor?-1:1),n;if(!o)return;!i.empty&&(n=this.coordsAt(i.anchor,i.anchor>i.head?-1:1))&&(o={left:Math.min(o.left,n.left),top:Math.min(o.top,n.top),right:Math.max(o.right,n.right),bottom:Math.max(o.bottom,n.bottom)});let s=0,r=0,l=0,h=0;for(let t of this.view.pluginField(PluginField.scrollMargins))if(t){let{left:e,right:i,top:o,bottom:n}=t;null!=e&&(s=Math.max(s,e)),null!=i&&(r=Math.max(r,i)),null!=o&&(l=Math.max(l,o)),null!=n&&(h=Math.max(h,n))}let a={left:o.left-s,top:o.top-l,right:o.right+r,bottom:o.bottom+h};!function(t,e,i,o,n,s,r,l){let h=t.ownerDocument,a=h.defaultView;for(let c=t;c;)if(1==c.nodeType){let t,d=c==h.body;if(d)t={left:0,right:a.innerWidth,top:0,bottom:a.innerHeight};else{if(c.scrollHeight<=c.clientHeight&&c.scrollWidth<=c.clientWidth){c=c.parentNode;continue}let e=c.getBoundingClientRect();t={left:e.left,right:e.left+c.clientWidth,top:e.top,bottom:e.top+c.clientHeight}}let u=0,f=0;if("nearest"==n)e.top0&&e.bottom>t.bottom+f&&(f=e.bottom-t.bottom+f+r)):e.bottom>t.bottom&&(f=e.bottom-t.bottom+r,i<0&&e.top-f0&&e.right>t.right+u&&(u=e.right-t.right+u+s)):e.right>t.right&&(u=e.right-t.right+s,i<0&&e.left0&&i<=0)e=maxOffset(t=t.childNodes[e-1]);else{if(1!=t.nodeType||!(e=0))return null;t=t.childNodes[e],e=0}}}let DecorationComparator$1=class DecorationComparator$1{constructor(){this.changes=[]}compareRange(t,e){addRange(t,e,this.changes)}comparePoint(t,e){addRange(t,e,this.changes)}};function yOverlap(t,e){return t.tope.top+1}function upTop(t,e){return et.bottom?{top:t.top,left:t.left,right:t.right,bottom:e}:t}function domPosInText(t,e,i){let o=t.nodeValue.length,n=-1,s=1e9,r=0;for(let l=0;li?a.top-i:i-a.bottom)-1;if(a.left-1<=e&&a.right+1>=e&&c=(a.left+a.right)/2,o=i;if((A.chrome||A.gecko)&&textRange(t,l).getBoundingClientRect().left==a.right&&(o=!i),c<=0)return{node:t,offset:l+(o?1:0)};n=l+(o?1:0),s=c}}}return{node:t,offset:n>-1?n:r>0?t.nodeValue.length:0}}function posAtCoords(t,{x:i,y:o},n,s=-1){var r;let l=t.contentDOM.getBoundingClientRect(),h=l.top+t.viewState.paddingTop,a,{docHeight:c}=t.viewState,d=o-h;if(d<0)return 0;if(d>c)return t.state.doc.length;for(let i=t.defaultLineHeight/2,o=!1;(a=t.elementAtHeight(d)).type!=e.BlockType.Text;)for(;!((d=s>0?a.bottom+i:a.top-i)>=0)||!(d<=c);){if(o)return n?null:0;o=!0,s=-s}o=h+d;let u=a.from;if(ut.viewport.to)return t.viewport.to==t.state.doc.length?t.state.doc.length:n?null:posAtCoordsImprecise(t,l,a,i,o);let f=t.dom.ownerDocument,p=t.root.elementFromPoint?t.root:f,g=p.elementFromPoint(i,o);g&&!t.contentDOM.contains(g)&&(g=null),!g&&(i=Math.max(l.left+1,Math.min(l.right-1,i)),(g=p.elementFromPoint(i,o))&&!t.contentDOM.contains(g)&&(g=null));let m,w=-1;if(g&&(null===(r=t.docView.nearest(g))||void 0===r?void 0:r.isEditable)!=!1){if(f.caretPositionFromPoint){let t=f.caretPositionFromPoint(i,o);t&&({offsetNode:m,offset:w}=t)}else if(f.caretRangeFromPoint){let t=f.caretRangeFromPoint(i,o);t&&({startContainer:m,startOffset:w}=t,A.safari&&function(t,e,i){let o;if(3!=t.nodeType||e!=(o=t.nodeValue.length))return!1;for(let e=t.nextSibling;e;e=e.nextSibling)if(1!=e.nodeType||"BR"!=e.nodeName)return!1;return textRange(t,o-1,o).getBoundingClientRect().left>i}(m,w,i)&&(m=void 0))}}if(!m||!t.docView.dom.contains(m)){let e=LineView.find(t.docView,u);if(!e)return d>a.top+a.height/2?a.to:a.from;({node:m,offset:w}=function domPosAtCoords(t,e,i){let o,n,s,r,l,h,a,c;for(let f=t.firstChild;f;f=f.nextSibling){let t=clientRectsFor(f);for(let p=0;pe?d.left-e:Math.max(0,e-d.right),w=(u=g).top>i?u.top-i:Math.max(0,i-u.bottom);if(0==m&&0==w)return 3==f.nodeType?domPosInText(f,e,i):domPosAtCoords(f,e,i);(!o||r>w||r==w&&s>m)&&(o=f,n=g,s=m,r=w),0==m?i>g.bottom&&(!a||a.bottomg.top)&&(h=f,c=g):a&&yOverlap(a,g)?a=upBot(a,g.bottom):c&&yOverlap(c,g)&&(c=upTop(c,g.top))}}if(a&&a.bottom>=i?(o=l,n=a):c&&c.top<=i&&(o=h,n=c),!o)return{node:t,offset:0};let f=Math.max(n.left,Math.min(n.right,e));if(3==o.nodeType)return domPosInText(o,f,i);if(!s&&"true"==o.contentEditable)return domPosAtCoords(o,f,i);let p=Array.prototype.indexOf.call(t.childNodes,o)+(e>=(n.left+n.right)/2?1:0);return{node:t,offset:p}}(e.dom,i,o))}return t.docView.posFromDOM(m,w)}function posAtCoordsImprecise(t,e,i,o,n){let s=Math.round((o-e.left)*t.defaultCharacterWidth);t.lineWrapping&&i.height>1.5*t.defaultLineHeight&&(s+=Math.floor((n-i.top)/t.defaultLineHeight)*t.viewState.heightOracle.lineLength);let r=t.state.sliceDoc(i.from,i.to);return i.from+d.findColumn(r,s,t.state.tabSize)}function moveByChar(t,e,i,o){let n=t.state.doc.lineAt(e.head),s=t.bidiSpans(n);for(let r=e,l=null;;){let e=moveVisually(n,s,t.textDirection,r,i),a=tt;if(!e){if(n.number==(i?t.state.doc.lines:1))return r;a="\n",n=t.state.doc.line(n.number+(i?1:-1)),s=t.bidiSpans(n),e=h.EditorSelection.cursor(i?n.from:n.to)}if(l){if(!l(a))return r}else{if(!o)return e;l=o(a)}r=e}}function skipAtoms(t,e,i){let o=t.pluginField(PluginField.atomicRanges);for(;;){let t=!1;for(let n of o)n.between(i.from-1,i.from+1,(o,n,s)=>{i.from>o&&i.fromi.from?h.EditorSelection.cursor(o,1):h.EditorSelection.cursor(n,-1),t=!0)});if(!t)return i}}let InputState=class InputState{constructor(t){for(let e in this.lastKeyCode=0,this.lastKeyTime=0,this.pendingIOSKey=void 0,this.lastSelectionOrigin=null,this.lastSelectionTime=0,this.lastEscPress=0,this.lastContextMenu=0,this.scrollHandlers=[],this.registeredEvents=[],this.customHandlers=[],this.composing=-1,this.compositionFirstChange=null,this.compositionEndedAt=0,this.rapidCompositionStart=!1,this.mouseSelection=null,to){let i=to[e];t.contentDOM.addEventListener(e,o=>{!(!eventBelongsToEditor(t,o)||this.ignoreDuringComposition(o))&&("keydown"==e&&this.keydown(t,o)||(this.mustFlushObserver(o)&&t.observer.forceFlush(),this.runCustomHandlers(e,t,o)?o.preventDefault():i(t,o)))}),this.registeredEvents.push(e)}this.notifiedFocused=t.hasFocus,this.ensureHandlers(t),A.safari&&t.contentDOM.addEventListener("input",()=>null)}setSelectionOrigin(t){this.lastSelectionOrigin=t,this.lastSelectionTime=Date.now()}ensureHandlers(t){for(let e of this.customHandlers=t.pluginField(z))for(let i in e.handlers)0>this.registeredEvents.indexOf(i)&&"scroll"!=i&&(this.registeredEvents.push(i),t.contentDOM.addEventListener(i,e=>{eventBelongsToEditor(t,e)&&this.runCustomHandlers(i,t,e)&&e.preventDefault()}))}runCustomHandlers(t,e,i){for(let o of this.customHandlers){let n=o.handlers[t];if(n)try{if(n.call(o.plugin,i,e)||i.defaultPrevented)return!0}catch(t){logException(e.state,t)}}return!1}runScrollHandlers(t,e){for(let i of this.customHandlers){let o=i.handlers.scroll;if(o)try{o.call(i.plugin,e,t)}catch(e){logException(t.state,e)}}}keydown(t,e){let i;return this.lastKeyCode=e.keyCode,this.lastKeyTime=Date.now(),!!(9==e.keyCode&&Date.now()t.keyCode==e.keyCode)))&&!(e.ctrlKey||e.altKey||e.metaKey)&&!e.synthetic&&(this.pendingIOSKey=i,setTimeout(()=>this.flushIOSKey(t),250),!0))}flushIOSKey(t){let e=this.pendingIOSKey;return!!e&&(this.pendingIOSKey=void 0,dispatchKey(t.contentDOM,e.key,e.keyCode))}ignoreDuringComposition(t){return!!/^key/.test(t.type)&&(this.composing>0||!!(A.safari&&Date.now()-this.compositionEndedAt<500)&&(this.compositionEndedAt=0,!0))}mustFlushObserver(t){return"keydown"==t.type&&229!=t.keyCode||"compositionend"==t.type&&!A.ios}startMouseSelection(t){this.mouseSelection&&this.mouseSelection.destroy(),this.mouseSelection=t}update(t){this.mouseSelection&&this.mouseSelection.update(t),t.transactions.length&&(this.lastKeyCode=this.lastSelectionTime=0)}destroy(){this.mouseSelection&&this.mouseSelection.destroy()}};let te=[{key:"Backspace",keyCode:8,inputType:"deleteContentBackward"},{key:"Enter",keyCode:13,inputType:"insertParagraph"},{key:"Delete",keyCode:46,inputType:"deleteContentForward"}],ti=[16,17,18,20,91,92,224,225];let MouseSelection=class MouseSelection{constructor(t,e,i,o){let n,s;this.view=t,this.style=i,this.mustSelect=o,this.lastEvent=e;let r=t.contentDOM.ownerDocument;r.addEventListener("mousemove",this.move=this.move.bind(this)),r.addEventListener("mouseup",this.up=this.up.bind(this)),this.extend=e.shiftKey,this.multiple=t.state.facet(h.EditorState.allowMultipleSelections)&&((n=t.state.facet(O)).length?n[0](e):A.mac?e.metaKey:e.ctrlKey),this.dragMove=(s=t.state.facet(B)).length?s[0](e):A.mac?!e.altKey:!e.ctrlKey,this.dragging=!!function(t,e){let{main:i}=t.state.selection;if(i.empty)return!1;let o=getSelection(t.root);if(0==o.rangeCount)return!0;let n=o.getRangeAt(0).getClientRects();for(let t=0;t=e.clientX&&i.top<=e.clientY&&i.bottom>=e.clientY)return!0}return!1}(t,e)&&1==getClickType(e)&&null,!1===this.dragging&&(e.preventDefault(),this.select(e))}move(t){if(0==t.buttons)return this.destroy();!1===this.dragging&&this.select(this.lastEvent=t)}up(t){null==this.dragging&&this.select(this.lastEvent),this.dragging||t.preventDefault(),this.destroy()}destroy(){let t=this.view.contentDOM.ownerDocument;t.removeEventListener("mousemove",this.move),t.removeEventListener("mouseup",this.up),this.view.inputState.mouseSelection=null}select(t){let e=this.style.get(t,this.extend,this.multiple);(this.mustSelect||!e.eq(this.view.state.selection)||e.main.assoc!=this.view.state.selection.main.assoc)&&this.view.dispatch({selection:e,userEvent:"select.pointer",scrollIntoView:!0}),this.mustSelect=!1}update(t){t.docChanged&&this.dragging&&(this.dragging=this.dragging.map(t.changes)),this.style.update(t)&&setTimeout(()=>this.select(this.lastEvent),20)}};function eventBelongsToEditor(t,e){if(!e.bubbles)return!0;if(e.defaultPrevented)return!1;for(let i=e.target,o;i!=t.contentDOM;i=i.parentNode)if(!i||11==i.nodeType||(o=ContentView.get(i))&&o.ignoreEvent(e))return!1;return!0}let to=Object.create(null),tn=A.ie&&A.ie_version<15||A.ios&&A.webkit_version<604;function doPaste(t,e){let{state:i}=t,o,n=1,s=i.toText(e),r=s.lines==i.selection.ranges.length;if(null!=tc&&i.selection.ranges.every(t=>t.empty)&&tc==s.toString()){let t=-1;o=i.changeByRange(o=>{let l=i.doc.lineAt(o.from);if(l.from==t)return{range:o};t=l.from;let a=i.toText((r?s.line(n++).text:e)+i.lineBreak);return{changes:{from:l.from,insert:a},range:h.EditorSelection.cursor(o.from+a.length)}})}else o=r?i.changeByRange(t=>{let e=s.line(n++);return{changes:{from:t.from,to:t.to,insert:e.text},range:h.EditorSelection.cursor(t.from+e.length)}}):i.replaceSelection(s);t.dispatch(o,{userEvent:"input.paste",scrollIntoView:!0})}to.keydown=(t,e)=>{t.inputState.setSelectionOrigin("select"),27==e.keyCode?t.inputState.lastEscPress=Date.now():0>ti.indexOf(e.keyCode)&&(t.inputState.lastEscPress=0)};let ts=0;function rangeForClick(t,e,i,o){if(1==o)return h.EditorSelection.cursor(e,i);if(2==o)return function(t,e,i=1){let o=t.charCategorizer(e),n=t.doc.lineAt(e),s=e-n.from;if(0==n.length)return h.EditorSelection.cursor(e);0==s?i=1:s==n.length&&(i=-1);let r=s,l=s;i<0?r=d.findClusterBreak(n.text,s,!1):l=d.findClusterBreak(n.text,s);let a=o(n.text.slice(r,l));for(;r>0;){let t=d.findClusterBreak(n.text,r,!1);if(o(n.text.slice(t,r))!=a)break;r=t}for(;l{ts=Date.now(),t.inputState.setSelectionOrigin("select.pointer")},to.touchmove=t=>{t.inputState.setSelectionOrigin("select.pointer")},to.mousedown=(t,e)=>{let i,o,n,s,r;if(t.observer.flush(),ts>Date.now()-2e3&&1==getClickType(e))return;let l=null;for(let i of t.state.facet(E))if(l=i(t,e))break;if(l||0!=e.button||(i=queryPos(t,e),o=getClickType(e),n=t.state.selection,s=i,r=e,l={update(t){t.docChanged&&(i&&(i.pos=t.changes.mapPos(i.pos)),n=n.map(t.changes),r=null)},get(e,l,a){let c;if(r&&e.clientX==r.clientX&&e.clientY==r.clientY?c=s:(c=s=queryPos(t,e),r=e),!c||!i)return n;let d=rangeForClick(t,c.pos,c.bias,o);if(i.pos!=c.pos&&!l){let e=rangeForClick(t,i.pos,i.bias,o),n=Math.min(e.from,d.from),s=Math.max(e.to,d.to);d=nfocusPreventScroll(t.contentDOM)),t.inputState.startMouseSelection(new MouseSelection(t,e,l,i))}};let insideY=(t,e)=>t>=e.top&&t<=e.bottom,inside=(t,e,i)=>insideY(e,i)&&t>=i.left&&t<=i.right;function queryPos(t,e){let i=t.posAtCoords({x:e.clientX,y:e.clientY},!1);return{pos:i,bias:function(t,e,i,o){let n=LineView.find(t.docView,e);if(!n)return 1;let s=e-n.posAtStart;if(0==s)return 1;if(s==n.length)return -1;let r=n.coordsAt(s,-1);if(r&&inside(i,o,r))return -1;let l=n.coordsAt(s,1);return l&&inside(i,o,l)?1:r&&insideY(o,r)?-1:1}(t,i,e.clientX,e.clientY)}}let tr=A.ie&&A.ie_version<=11,tl=null,th=0,ta=0;function getClickType(t){if(!tr)return t.detail;let e=tl,i=ta;return tl=t,ta=Date.now(),th=!e||i>Date.now()-400&&2>Math.abs(e.clientX-t.clientX)&&2>Math.abs(e.clientY-t.clientY)?(th+1)%3:1}function dropText(t,e,i,o){if(!i)return;let n=t.posAtCoords({x:e.clientX,y:e.clientY},!1);e.preventDefault();let{mouseSelection:s}=t.inputState,r=o&&s&&s.dragging&&s.dragMove?{from:s.dragging.from,to:s.dragging.to}:null,l={from:n,insert:i},h=t.state.changes(r?[r,l]:l);t.focus(),t.dispatch({changes:h,selection:{anchor:h.mapPos(n,-1),head:h.mapPos(n,1)},userEvent:r?"move.drop":"input.drop"})}to.dragstart=(t,e)=>{let{selection:{main:i}}=t.state,{mouseSelection:o}=t.inputState;o&&(o.dragging=i),e.dataTransfer&&(e.dataTransfer.setData("Text",t.state.sliceDoc(i.from,i.to)),e.dataTransfer.effectAllowed="copyMove")},to.drop=(t,e)=>{if(!e.dataTransfer)return;if(t.state.readOnly)return e.preventDefault();let i=e.dataTransfer.files;if(i&&i.length){e.preventDefault();let o=Array(i.length),n=0,finishFile=()=>{++n==i.length&&dropText(t,e,o.filter(t=>null!=t).join(t.state.lineBreak),!1)};for(let t=0;t{/[\x00-\x08\x0e-\x1f]{2}/.test(e.result)||(o[t]=e.result),finishFile()},e.readAsText(i[t])}}else dropText(t,e,e.dataTransfer.getData("Text"),!0)},to.paste=(t,e)=>{if(t.state.readOnly)return e.preventDefault();t.observer.flush();let i=tn?null:e.clipboardData;i?(doPaste(t,i.getData("text/plain")),e.preventDefault()):function(t){let e=t.dom.parentNode;if(!e)return;let i=e.appendChild(document.createElement("textarea"));i.style.cssText="position: fixed; left: -10000px; top: 10px",i.focus(),setTimeout(()=>{t.focus(),i.remove(),doPaste(t,i.value)},50)}(t)};let tc=null;function forceClearComposition(t,e){if(t.docView.compositionDeco.size){t.inputState.rapidCompositionStart=e;try{t.update([])}finally{t.inputState.rapidCompositionStart=!1}}}to.copy=to.cut=(t,e)=>{let{text:i,ranges:o,linewise:n}=function(t){let e=[],i=[],o=!1;for(let o of t.selection.ranges)o.empty||(e.push(t.sliceDoc(o.from,o.to)),i.push(o));if(!e.length){let n=-1;for(let{from:o}of t.selection.ranges){let s=t.doc.lineAt(o);s.number>n&&(e.push(s.text),i.push({from:s.from,to:Math.min(t.doc.length,s.to+1)})),n=s.number}o=!0}return{text:e.join(t.lineBreak),ranges:i,linewise:o}}(t.state);if(!i&&!n)return;tc=n?i:null;let s=tn?null:e.clipboardData;s?(e.preventDefault(),s.clearData(),s.setData("text/plain",i)):function(t,e){let i=t.dom.parentNode;if(!i)return;let o=i.appendChild(document.createElement("textarea"));o.style.cssText="position: fixed; left: -10000px; top: 10px",o.value=e,o.focus(),o.selectionEnd=e.length,o.selectionStart=0,setTimeout(()=>{o.remove(),t.focus()},50)}(t,i),"cut"!=e.type||t.state.readOnly||t.dispatch({changes:o,scrollIntoView:!0,userEvent:"delete.cut"})},to.focus=to.blur=t=>{setTimeout(()=>{t.hasFocus!=t.inputState.notifiedFocused&&t.update([])},10)},to.compositionstart=to.compositionupdate=t=>{null==t.inputState.compositionFirstChange&&(t.inputState.compositionFirstChange=!0),t.inputState.composing<0&&(t.inputState.composing=0,t.docView.compositionDeco.size&&(t.observer.flush(),forceClearComposition(t,!0)))},to.compositionend=t=>{t.inputState.composing=-1,t.inputState.compositionEndedAt=Date.now(),t.inputState.compositionFirstChange=null,setTimeout(()=>{t.inputState.composing<0&&forceClearComposition(t,!1)},50)},to.contextmenu=t=>{t.inputState.lastContextMenu=Date.now()},to.beforeinput=(t,e)=>{var i;let o;if(A.chrome&&A.android&&(o=te.find(t=>t.inputType==e.inputType))&&(t.observer.delayAndroidKey(o.key,o.keyCode),"Backspace"==o.key||"Delete"==o.key)){let e=(null===(i=window.visualViewport)||void 0===i?void 0:i.height)||0;setTimeout(()=>{var i;((null===(i=window.visualViewport)||void 0===i?void 0:i.height)||0)>e+10&&t.hasFocus&&(t.contentDOM.blur(),t.focus())},100)}};let td=["pre-wrap","normal","pre-line","break-spaces"];let HeightOracle=class HeightOracle{constructor(){this.doc=d.Text.empty,this.lineWrapping=!1,this.direction=e.Direction.LTR,this.heightSamples={},this.lineHeight=14,this.charWidth=7,this.lineLength=30,this.heightChanged=!1}heightForGap(t,e){let i=this.doc.lineAt(e).number-this.doc.lineAt(t).number+1;return this.lineWrapping&&(i+=Math.ceil((e-t-i*this.lineLength*.5)/this.lineLength)),this.lineHeight*i}heightForLine(t){return this.lineWrapping?(1+Math.max(0,Math.ceil((t-this.lineLength)/(this.lineLength-5))))*this.lineHeight:this.lineHeight}setDoc(t){return this.doc=t,this}mustRefreshForStyle(t,e){return td.indexOf(t)>-1!=this.lineWrapping||this.direction!=e}mustRefreshForHeights(t){let e=!1;for(let i=0;i-1,l=Math.round(i)!=Math.round(this.lineHeight)||this.lineWrapping!=r||this.direction!=e;if(this.lineWrapping=r,this.direction=e,this.lineHeight=i,this.charWidth=o,this.lineLength=n,l){this.heightSamples={};for(let t=0;te.moveY(t)):this.type):this}};(r=l||(l={}))[r.ByPos=0]="ByPos",r[r.ByHeight=1]="ByHeight",r[r.ByPosNoHeight=2]="ByPosNoHeight";let HeightMap=class HeightMap{constructor(t,e,i=2){this.length=t,this.height=e,this.flags=i}get outdated(){return(2&this.flags)>0}set outdated(t){this.flags=(t?2:0)|-3&this.flags}setHeight(t,e){this.height!=e&&(Math.abs(this.height-e)>.001&&(t.heightChanged=!0),this.height=e)}replace(t,e,i){return HeightMap.of(i)}decomposeLeft(t,e){e.push(this)}decomposeRight(t,e){e.push(this)}applyChanges(t,e,i,o){let n=this;for(let s=o.length-1;s>=0;s--){let{fromA:r,toA:h,fromB:a,toB:c}=o[s],d=n.lineAt(r,l.ByPosNoHeight,e,0,0),u=d.to>=h?d:n.lineAt(h,l.ByPosNoHeight,e,0,0);for(c+=u.to-h,h=u.to;s>0&&d.from<=o[s-1].toA;)r=o[s-1].fromA,a=o[s-1].fromB,s--,r2*n){let n=t[e-1];n.break?t.splice(--e,1,n.left,null,n.right):t.splice(--e,1,n.left,n.right),i+=1+n.break,o-=n.size}else if(n>2*o){let e=t[i];e.break?t.splice(i,1,e.left,null,e.right):t.splice(i,1,e.left,e.right),i+=2+e.break,n-=e.size}else break}else if(oMath.abs(this.length-o.length)?(o instanceof HeightMapGap?o=new HeightMapText(o.length,this.height):o.height=this.height,this.outdated||(o.outdated=!1),o):HeightMap.of(i)}updateHeight(t,e=0,i=!1,o){return o&&o.from<=e&&o.more?this.setHeight(t,o.heights[o.index++]):(i||this.outdated)&&this.setHeight(t,Math.max(this.widgetHeight,t.heightForLine(this.length-this.collapsed))),this.outdated=!1,this}toString(){return`line(${this.length}${this.collapsed?-this.collapsed:""}${this.widgetHeight?":"+this.widgetHeight:""})`}};let HeightMapGap=class HeightMapGap extends HeightMap{constructor(t){super(t,0)}lines(t,e){let i=t.lineAt(e).number,o=t.lineAt(e+this.length).number;return{firstLine:i,lastLine:o,lineHeight:this.height/(o-i+1)}}blockAt(t,i,o,n){let{firstLine:s,lastLine:r,lineHeight:l}=this.lines(i,n),h=Math.max(0,Math.min(r-s,Math.floor((t-o)/l))),{from:a,length:c}=i.line(s+h);return new BlockInfo(a,c,o+l*h,l,e.BlockType.Text)}lineAt(t,i,o,n,s){if(i==l.ByHeight)return this.blockAt(t,o,n,s);if(i==l.ByPosNoHeight){let{from:i,to:n}=o.lineAt(t);return new BlockInfo(i,n-i,0,0,e.BlockType.Text)}let{firstLine:r,lineHeight:h}=this.lines(o,s),{from:a,length:c,number:d}=o.lineAt(t);return new BlockInfo(a,c,n+h*(d-r),h,e.BlockType.Text)}forEachLine(t,i,o,n,s,r){let{firstLine:l,lineHeight:h}=this.lines(o,s);for(let a=Math.max(t,s),c=Math.min(s+this.length,i);a<=c;){let i=o.lineAt(a);a==t&&(n+=h*(i.number-l)),r(new BlockInfo(i.from,i.length,n,h,e.BlockType.Text)),n+=h,a=i.to+1}}replace(t,e,i){let o=this.length-e;if(o>0){let t=i[i.length-1];t instanceof HeightMapGap?i[i.length-1]=new HeightMapGap(t.length+o):i.push(null,new HeightMapGap(o-1))}if(t>0){let e=i[0];e instanceof HeightMapGap?i[0]=new HeightMapGap(t+e.length):i.unshift(new HeightMapGap(t-1),null)}return HeightMap.of(i)}decomposeLeft(t,e){e.push(new HeightMapGap(t-1),null)}decomposeRight(t,e){e.push(null,new HeightMapGap(this.length-t-1))}updateHeight(t,e=0,i=!1,o){let n=e+this.length;if(o&&o.from<=e+this.length&&o.more){let i=[],s=Math.max(e,o.from),r=-1,l=t.heightChanged;for(o.from>e&&i.push(new HeightMapGap(o.from-e-1).updateHeight(t,e));s<=n&&o.more;){let e=t.doc.lineAt(s).length;i.length&&i.push(null);let n=o.heights[o.index++];-1==r?r=n:Math.abs(n-r)>=.001&&(r=-2);let l=new HeightMapText(e,n);l.outdated=!1,i.push(l),s+=e+1}s<=n&&i.push(null,new HeightMapGap(n-s).updateHeight(t,s));let h=HeightMap.of(i);return t.heightChanged=l||r<0||Math.abs(h.height-this.height)>=.001||Math.abs(r-this.lines(t.doc,e).lineHeight)>=.001,h}return(i||this.outdated)&&(this.setHeight(t,t.heightForGap(e,e+this.length)),this.outdated=!1),this}toString(){return`gap(${this.length})`}};let HeightMapBranch=class HeightMapBranch extends HeightMap{constructor(t,e,i){super(t.length+e+i.length,t.height+i.height,e|(t.outdated||i.outdated?2:0)),this.left=t,this.right=i,this.size=t.size+i.size}get break(){return 1&this.flags}blockAt(t,e,i,o){let n=i+this.left.height;return tr))return a;let c=e==l.ByPosNoHeight?l.ByPosNoHeight:l.ByPos;return h?a.join(this.right.lineAt(r,c,i,s,r)):this.left.lineAt(r,c,i,o,n).join(a)}forEachLine(t,e,i,o,n,s){let r=o+this.left.height,h=n+this.left.length+this.break;if(this.break)t=h&&this.right.forEachLine(t,e,i,r,h,s);else{let a=this.lineAt(h,l.ByPos,i,o,n);t=t&&a.from<=e&&s(a),e>a.to&&this.right.forEachLine(a.to+1,e,i,r,h,s)}}replace(t,e,i){let o=this.left.length+this.break;if(ethis.left.length)return this.balanced(this.left,this.right.replace(t-o,e-o,i));let n=[];t>0&&this.decomposeLeft(t,n);let s=n.length;for(let t of i)n.push(t);if(t>0&&mergeGaps(n,s-1),e=++i&&e.push(null),t>i&&this.right.decomposeLeft(t-i,e)}decomposeRight(t,e){let i=this.left.length,o=i+this.break;if(t>=o)return this.right.decomposeRight(t-o,e);t2*e.size||e.size>2*t.size?HeightMap.of(this.break?[t,null,e]:[t,e]):(this.left=t,this.right=e,this.height=t.height+e.height,this.outdated=t.outdated||e.outdated,this.size=t.size+e.size,this.length=t.length+this.break+e.length,this)}updateHeight(t,e=0,i=!1,o){let{left:n,right:s}=this,r=e+n.length+this.break,l=null;return(o&&o.from<=e+n.length&&o.more?l=n=n.updateHeight(t,e,i,o):n.updateHeight(t,e,i),o&&o.from<=r+s.length&&o.more?l=s=s.updateHeight(t,r,i,o):s.updateHeight(t,r,i),l)?this.balanced(n,s):(this.height=this.left.height+this.right.height,this.outdated=!1,this)}toString(){return this.left+(this.break?" ":"-")+this.right}};function mergeGaps(t,e){let i,o;null==t[e]&&(i=t[e-1])instanceof HeightMapGap&&(o=t[e+1])instanceof HeightMapGap&&t.splice(e-1,3,new HeightMapGap(i.length+1+o.length))}let NodeBuilder=class NodeBuilder{constructor(t,e){this.pos=t,this.oracle=e,this.nodes=[],this.lineStart=-1,this.lineEnd=-1,this.covering=null,this.writtenTo=t}get isCovered(){return this.covering&&this.nodes[this.nodes.length-1]==this.covering}span(t,e){if(this.lineStart>-1){let t=Math.min(e,this.lineEnd),i=this.nodes[this.nodes.length-1];i instanceof HeightMapText?i.length+=t-this.pos:(t>this.pos||!this.isCovered)&&this.nodes.push(new HeightMapText(t-this.pos,-1)),this.writtenTo=t,e>t&&(this.nodes.push(null),this.writtenTo++,this.lineStart=-1)}this.pos=e}point(t,e,i){if(t=5)&&this.addLineDeco(o,n)}else e>t&&this.span(t,e);this.lineEnd>-1&&this.lineEnd-1)return;let{from:t,to:e}=this.oracle.doc.lineAt(this.pos);this.lineStart=t,this.lineEnd=e,this.writtenTot&&this.nodes.push(new HeightMapText(this.pos-t,-1)),this.writtenTo=this.pos}blankContent(t,e){let i=new HeightMapGap(e-t);return this.oracle.doc.lineAt(t).to==e&&(i.flags|=4),i}ensureLine(){this.enterLine();let t=this.nodes.length?this.nodes[this.nodes.length-1]:null;if(t instanceof HeightMapText)return t;let e=new HeightMapText(0,-1);return this.nodes.push(e),e}addBlock(t){this.enterLine(),t.type!=e.BlockType.WidgetAfter||this.isCovered||this.ensureLine(),this.nodes.push(t),this.writtenTo=this.pos=this.pos+t.length,t.type!=e.BlockType.WidgetBefore&&(this.covering=t)}addLineDeco(t,e){let i=this.ensureLine();i.length+=e,i.collapsed+=e,i.widgetHeight=Math.max(i.widgetHeight,t),this.writtenTo=this.pos=this.pos+e}finish(t){let e=0==this.nodes.length?null:this.nodes[this.nodes.length-1];!(this.lineStart>-1)||e instanceof HeightMapText||this.isCovered?(this.writtenTot.draw(!1))),this.computeVisibleRanges()}updateForViewport(){let t=[this.viewport],{main:e}=this.state.selection;for(let i=0;i<=1;i++){let o=i?e.head:e.anchor;if(!t.some(({from:t,to:e})=>o>=t&&o<=e)){let{from:e,to:i}=this.lineBlockAt(o);t.push(new Viewport(e,i))}}this.viewports=t.sort((t,e)=>t.from-e.from),this.scaler=this.heightMap.height<=7e6?tu:new BigScaler(this.heightOracle.doc,this.heightMap,this.viewports)}updateViewportLines(){this.viewportLines=[],this.heightMap.forEachLine(this.viewport.from,this.viewport.to,this.state.doc,0,0,t=>{this.viewportLines.push(1==this.scaler.scale?t:scaleBlock(t,this.scaler))})}update(t,e=null){var i,o;let n,s=this.state;this.state=t.state;let r=this.state.facet(K),l=t.changedRanges,a=ChangedRange.extendWithRanges(l,(i=t.startState.facet(K),o=t?t.changes:h.ChangeSet.empty(this.state.doc.length),n=new DecorationComparator,c.RangeSet.compare(i,r,o,n,0),n.changes)),d=this.heightMap.height;this.heightMap=this.heightMap.applyChanges(r,s.doc,this.heightOracle.setDoc(this.state.doc),a),this.heightMap.height!=d&&(t.flags|=2);let u=a.length?this.mapViewport(this.viewport,t.changes):this.viewport;(e&&(e.range.headu.to)||!this.viewportIsAppropriate(u))&&(u=this.getViewport(0,e));let f=!t.changes.empty||2&t.flags||u.from!=this.viewport.from||u.to!=this.viewport.to;this.viewport=u,this.updateForViewport(),f&&this.updateViewportLines(),(this.lineGaps.length||this.viewport.to-this.viewport.from>4e3)&&this.updateLineGaps(this.ensureLineGaps(this.mapLineGaps(this.lineGaps,t.changes))),t.flags|=this.computeVisibleRanges(),e&&(this.scrollTarget=e),!this.mustEnforceCursorAssoc&&t.selectionSet&&t.view.lineWrapping&&t.state.selection.main.empty&&t.state.selection.main.assoc&&(this.mustEnforceCursorAssoc=!0)}measure(t){let i=t.contentDOM,o=window.getComputedStyle(i),n=this.heightOracle,s=o.whiteSpace,r="rtl"==o.direction?e.Direction.RTL:e.Direction.LTR,l=this.heightOracle.mustRefreshForStyle(s,r),h=l||this.mustMeasureContent||this.contentDOMHeight!=i.clientHeight,a=0,c=0;if(this.editorWidth!=t.scrollDOM.clientWidth&&(n.lineWrapping&&(h=!0),this.editorWidth=t.scrollDOM.clientWidth,a|=8),h){this.mustMeasureContent=!1,this.contentDOMHeight=i.clientHeight;let t=parseInt(o.paddingTop)||0,e=parseInt(o.paddingBottom)||0;(this.paddingTop!=t||this.paddingBottom!=e)&&(a|=8,this.paddingTop=t,this.paddingBottom=e)}let d=(this.printing?function(t,e){let i=t.getBoundingClientRect();return{left:0,right:i.right-i.left,top:e,bottom:i.bottom-(i.top+e)}}:function(t,e){let i=t.getBoundingClientRect(),o=Math.max(0,i.left),n=Math.min(innerWidth,i.right),s=Math.max(0,i.top),r=Math.min(innerHeight,i.bottom),l=t.ownerDocument.body;for(let e=t.parentNode;e&&e!=l;)if(1==e.nodeType){let t=e,i=window.getComputedStyle(t);if((t.scrollHeight>t.clientHeight||t.scrollWidth>t.clientWidth)&&"visible"!=i.overflow){let e=t.getBoundingClientRect();o=Math.max(o,e.left),n=Math.min(n,e.right),s=Math.max(s,e.top),r=Math.min(r,e.bottom)}e="absolute"==i.position||"fixed"==i.position?t.offsetParent:t.parentNode}else if(11==e.nodeType)e=e.host;else break;return{left:o-i.left,right:Math.max(o,n)-i.left,top:s-(i.top+e),bottom:Math.max(s,r)-(i.top+e)}})(i,this.paddingTop),u=d.top-this.pixelViewport.top,f=d.bottom-this.pixelViewport.bottom;this.pixelViewport=d;let p=this.pixelViewport.bottom>this.pixelViewport.top&&this.pixelViewport.right>this.pixelViewport.left;if(p!=this.inView&&(this.inView=p,p&&(h=!0)),!this.inView)return 0;let g=i.clientWidth;if((this.contentDOMWidth!=g||this.editorHeight!=t.scrollDOM.clientHeight)&&(this.contentDOMWidth=g,this.editorHeight=t.scrollDOM.clientHeight,a|=8),h){let e=t.docView.measureVisibleLineHeights();if(n.mustRefreshForHeights(e)&&(l=!0),l||n.lineWrapping&&Math.abs(g-this.contentDOMWidth)>n.charWidth){let{lineHeight:i,charWidth:o}=t.docView.measureTextSize();(l=n.refresh(s,r,i,o,g/o,e))&&(t.docView.minWidth=0,a|=8)}u>0&&f>0?c=Math.max(u,f):u<0&&f<0&&(c=Math.min(u,f)),n.heightChanged=!1,this.heightMap=this.heightMap.updateHeight(n,0,l,new MeasuredHeights(this.viewport.from,e)),n.heightChanged&&(a|=2)}let m=!this.viewportIsAppropriate(this.viewport,c)||this.scrollTarget&&(this.scrollTarget.range.headthis.viewport.to);return m&&(this.viewport=this.getViewport(c,this.scrollTarget)),this.updateForViewport(),(2&a||m)&&this.updateViewportLines(),(this.lineGaps.length||this.viewport.to-this.viewport.from>4e3)&&this.updateLineGaps(this.ensureLineGaps(l?[]:this.lineGaps)),a|=this.computeVisibleRanges(),this.mustEnforceCursorAssoc&&(this.mustEnforceCursorAssoc=!1,t.docView.enforceCursorAssoc()),a}get visibleTop(){return this.scaler.fromDOM(this.pixelViewport.top)}get visibleBottom(){return this.scaler.fromDOM(this.pixelViewport.bottom)}getViewport(t,e){let i=.5-Math.max(-.5,Math.min(.5,t/1e3/2)),o=this.heightMap,n=this.state.doc,{visibleTop:s,visibleBottom:r}=this,h=new Viewport(o.lineAt(s-1e3*i,l.ByHeight,n,0,0).from,o.lineAt(r+(1-i)*1e3,l.ByHeight,n,0,0).to);if(e){let{head:t}=e.range;if(th.to){let i=Math.min(this.editorHeight,this.pixelViewport.bottom-this.pixelViewport.top),s=o.lineAt(t,l.ByPos,n,0,0),r;r="center"==e.y?(s.top+s.bottom)/2-i/2:"start"==e.y||"nearest"==e.y&&t=r+Math.max(10,Math.min(i,250)))&&o>s-2e3&&nn&&(o.push({from:n,to:t}),s+=t-n),n=e}},20),ne.from&&r.push({from:e.from,to:o}),n=e.from&&l.from<=e.to&&cutRange(r,l.from-10,l.from+10),!l.empty&&l.to>=e.from&&l.to<=e.to&&cutRange(r,l.to-10,l.to+10),r))n-o>1e3&&i.push(function(t,e){for(let i of t)if(e(i))return i}(t,t=>t.from>=e.from&&t.to<=e.to&&1e3>Math.abs(t.from-o)&&1e3>Math.abs(t.to-n))||new LineGap(o,n,this.gapSize(e,o,n,s)))}return i}gapSize(t,e,i,o){let n=findFraction(o,i)-findFraction(o,e);return this.heightOracle.lineWrapping?t.height*n:o.total*this.heightOracle.charWidth*n}updateLineGaps(t){LineGap.same(t,this.lineGaps)||(this.lineGaps=t,this.lineGapDeco=Decoration.set(t.map(t=>t.draw(this.heightOracle.lineWrapping))))}computeVisibleRanges(){let t=this.state.facet(K);this.lineGaps.length&&(t=t.concat(this.lineGapDeco));let e=[];c.RangeSet.spans(t,this.viewport.from,this.viewport.to,{span(t,i){e.push({from:t,to:i})},point(){}},20);let i=e.length!=this.visibleRanges.length||this.visibleRanges.some((t,i)=>t.from!=e[i].from||t.to!=e[i].to);return this.visibleRanges=e,i?4:0}lineBlockAt(t){return t>=this.viewport.from&&t<=this.viewport.to&&this.viewportLines.find(e=>e.from<=t&&e.to>=t)||scaleBlock(this.heightMap.lineAt(t,l.ByPos,this.state.doc,0,0),this.scaler)}lineBlockAtHeight(t){return scaleBlock(this.heightMap.lineAt(this.scaler.fromDOM(t),l.ByHeight,this.state.doc,0,0),this.scaler)}elementAtHeight(t){return scaleBlock(this.heightMap.blockAt(this.scaler.fromDOM(t),this.state.doc,0,0),this.scaler)}get docHeight(){return this.scaler.toDOM(this.heightMap.height)}get contentHeight(){return this.docHeight+this.paddingTop+this.paddingBottom}};let Viewport=class Viewport{constructor(t,e){this.from=t,this.to=e}};function findPosition({total:t,ranges:e},i){if(i<=0)return e[0].from;if(i>=1)return e[e.length-1].to;let o=Math.floor(t*i);for(let t=0;;t++){let{from:i,to:n}=e[t],s=n-i;if(o<=s)return i+o;o-=s}}function findFraction(t,e){let i=0;for(let{from:o,to:n}of t.ranges){if(e<=n){i+=e-o;break}i+=n-o}return i/t.total}function cutRange(t,e,i){for(let o=0;oe){let s=[];n.fromi&&s.push({from:i,to:n.to}),t.splice(o,1,...s),o+=s.length-1}}}let tu={toDOM:t=>t,fromDOM:t=>t,scale:1};let BigScaler=class BigScaler{constructor(t,e,i){let o=0,n=0,s=0;for(let r of(this.viewports=i.map(({from:i,to:n})=>{let s=e.lineAt(i,l.ByPos,t,0,0).top,r=e.lineAt(n,l.ByPos,t,0,0).bottom;return o+=r-s,{from:i,to:n,top:s,bottom:r,domTop:0,domBottom:0}}),this.scale=(7e6-o)/(e.height-o),this.viewports))r.domTop=s+(r.top-n)*this.scale,s=r.domBottom=r.domTop+(r.bottom-r.top),n=r.bottom}toDOM(t){for(let e=0,i=0,o=0;;e++){let n=escaleBlock(t,e)):t.type)}let tf=h.Facet.define({combine:t=>t.join(" ")}),tp=h.Facet.define({combine:t=>t.indexOf(!0)>-1}),tg=a.StyleModule.newName(),tm=a.StyleModule.newName(),tw=a.StyleModule.newName(),tv={"&light":"."+tm,"&dark":"."+tw};function buildTheme(t,e,i){return new a.StyleModule(e,{finish:e=>/&/.test(e)?e.replace(/&\w*/,e=>{if("&"==e)return t;if(!i||!i[e])throw RangeError(`Unsupported selector: ${e}`);return i[e]}):t+" "+e})}let ty=buildTheme("."+tg,{"&.cm-editor":{position:"relative !important",boxSizing:"border-box","&.cm-focused":{outline:"1px dotted #212121"},display:"flex !important",flexDirection:"column"},".cm-scroller":{display:"flex !important",alignItems:"flex-start !important",fontFamily:"monospace",lineHeight:1.4,height:"100%",overflowX:"auto",position:"relative",zIndex:0},".cm-content":{margin:0,flexGrow:2,minHeight:"100%",display:"block",whiteSpace:"pre",wordWrap:"normal",boxSizing:"border-box",padding:"4px 0",outline:"none","&[contenteditable=true]":{WebkitUserModify:"read-write-plaintext-only"}},".cm-lineWrapping":{whiteSpace_fallback:"pre-wrap",whiteSpace:"break-spaces",wordBreak:"break-word",overflowWrap:"anywhere"},"&light .cm-content":{caretColor:"black"},"&dark .cm-content":{caretColor:"white"},".cm-line":{display:"block",padding:"0 2px 0 4px"},".cm-selectionLayer":{zIndex:-1,contain:"size style"},".cm-selectionBackground":{position:"absolute"},"&light .cm-selectionBackground":{background:"#d9d9d9"},"&dark .cm-selectionBackground":{background:"#222"},"&light.cm-focused .cm-selectionBackground":{background:"#d7d4f0"},"&dark.cm-focused .cm-selectionBackground":{background:"#233"},".cm-cursorLayer":{zIndex:100,contain:"size style",pointerEvents:"none"},"&.cm-focused .cm-cursorLayer":{animation:"steps(1) cm-blink 1.2s infinite"},"@keyframes cm-blink":{"0%":{},"50%":{visibility:"hidden"},"100%":{}},"@keyframes cm-blink2":{"0%":{},"50%":{visibility:"hidden"},"100%":{}},".cm-cursor, .cm-dropCursor":{position:"absolute",borderLeft:"1.2px solid black",marginLeft:"-0.6px",pointerEvents:"none"},".cm-cursor":{display:"none"},"&dark .cm-cursor":{borderLeftColor:"#444"},"&.cm-focused .cm-cursor":{display:"block"},"&light .cm-activeLine":{backgroundColor:"#f3f9ff"},"&dark .cm-activeLine":{backgroundColor:"#223039"},"&light .cm-specialChar":{color:"red"},"&dark .cm-specialChar":{color:"#f78"},".cm-tab":{display:"inline-block",overflow:"hidden",verticalAlign:"bottom"},".cm-widgetBuffer":{verticalAlign:"text-top",height:"1em",display:"inline"},".cm-placeholder":{color:"#888",display:"inline-block",verticalAlign:"top"},".cm-button":{verticalAlign:"middle",color:"inherit",fontSize:"70%",padding:".2em 1em",borderRadius:"1px"},"&light .cm-button":{backgroundImage:"linear-gradient(#eff1f5, #d9d9df)",border:"1px solid #888","&:active":{backgroundImage:"linear-gradient(#b4b4b4, #d0d3d6)"}},"&dark .cm-button":{backgroundImage:"linear-gradient(#393939, #111)",border:"1px solid #888","&:active":{backgroundImage:"linear-gradient(#111, #333)"}},".cm-textfield":{verticalAlign:"middle",color:"inherit",fontSize:"70%",border:"1px solid silver",padding:".2em .5em"},"&light .cm-textfield":{backgroundColor:"white"},"&dark .cm-textfield":{border:"1px solid #555",backgroundColor:"inherit"}},tv),tb={childList:!0,characterData:!0,subtree:!0,attributes:!0,characterDataOldValue:!0},tS=A.ie&&A.ie_version<=11;let DOMObserver=class DOMObserver{constructor(t,e,i){this.view=t,this.onChange=e,this.onScrollChanged=i,this.active=!1,this.selectionRange=new DOMSelectionState,this.selectionChanged=!1,this.delayedFlush=-1,this.resizeTimeout=-1,this.queue=[],this.delayedAndroidKey=null,this.scrollTargets=[],this.intersection=null,this.resize=null,this.intersecting=!1,this.gapIntersection=null,this.gaps=[],this.parentCheck=-1,this.dom=t.contentDOM,this.observer=new MutationObserver(e=>{for(let t of e)this.queue.push(t);(A.ie&&A.ie_version<=11||A.ios&&t.composing)&&e.some(t=>"childList"==t.type&&t.removedNodes.length||"characterData"==t.type&&t.oldValue.length>t.target.nodeValue.length)?this.flushSoon():this.flush()}),tS&&(this.onCharData=t=>{this.queue.push({target:t.target,type:"characterData",oldValue:t.prevValue}),this.flushSoon()}),this.onSelectionChange=this.onSelectionChange.bind(this),window.addEventListener("resize",this.onResize=this.onResize.bind(this)),"function"==typeof ResizeObserver&&(this.resize=new ResizeObserver(()=>{this.view.docView.lastUpdate{this.parentCheck<0&&(this.parentCheck=setTimeout(this.listenForScroll.bind(this),1e3)),t.length>0&&t[t.length-1].intersectionRatio>0!=this.intersecting&&(this.intersecting=!this.intersecting,this.intersecting!=this.view.inView&&this.onScrollChanged(document.createEvent("Event")))},{}),this.intersection.observe(this.dom),this.gapIntersection=new IntersectionObserver(t=>{t.length>0&&t[t.length-1].intersectionRatio>0&&this.onScrollChanged(document.createEvent("Event"))},{})),this.listenForScroll(),this.readSelectionRange(),this.dom.ownerDocument.addEventListener("selectionchange",this.onSelectionChange)}onScroll(t){this.intersecting&&this.flush(!1),this.onScrollChanged(t)}onResize(){this.resizeTimeout<0&&(this.resizeTimeout=setTimeout(()=>{this.resizeTimeout=-1,this.view.requestMeasure()},50))}onPrint(){this.view.viewState.printing=!0,this.view.measure(),setTimeout(()=>{this.view.viewState.printing=!1,this.view.requestMeasure()},500)}updateGaps(t){if(this.gapIntersection&&(t.length!=this.gaps.length||this.gaps.some((e,i)=>e!=t[i]))){for(let e of(this.gapIntersection.disconnect(),t))this.gapIntersection.observe(e);this.gaps=t}}onSelectionChange(t){if(!this.readSelectionRange()||this.delayedAndroidKey)return;let{view:e}=this,i=this.selectionRange;if(e.state.facet(W)?e.root.activeElement!=this.dom:!hasSelection(e.dom,i))return;let o=i.anchorNode&&e.docView.nearest(i.anchorNode);o&&o.ignoreEvent(t)||((A.ie&&A.ie_version<=11||A.android&&A.chrome)&&!e.state.selection.main.empty&&i.focusNode&&isEquivalentPosition(i.focusNode,i.focusOffset,i.anchorNode,i.anchorOffset)?this.flushSoon():this.flush(!1))}readSelectionRange(){let{root:t}=this.view,e=getSelection(t),i=A.safari&&11==t.nodeType&&function(){let t=document.activeElement;for(;t&&t.shadowRoot;)t=t.shadowRoot.activeElement;return t}()==this.view.contentDOM&&function(t){let e=null;function read(t){t.preventDefault(),t.stopImmediatePropagation(),e=t.getTargetRanges()[0]}if(t.contentDOM.addEventListener("beforeinput",read,!0),document.execCommand("indent"),t.contentDOM.removeEventListener("beforeinput",read,!0),!e)return null;let i=e.startContainer,o=e.startOffset,n=e.endContainer,s=e.endOffset,r=t.docView.domAtPos(t.state.selection.main.anchor);return isEquivalentPosition(r.node,r.offset,n,s)&&([i,o,n,s]=[n,s,i,o]),{anchorNode:i,anchorOffset:o,focusNode:n,focusOffset:s}}(this.view)||e;return!this.selectionRange.eq(i)&&(this.selectionRange.setRange(i),this.selectionChanged=!0)}setSelectionRange(t,e){this.selectionRange.set(t.node,t.offset,e.node,e.offset),this.selectionChanged=!1}listenForScroll(){this.parentCheck=-1;let t=0,e=null;for(let i=this.dom;i;)if(1==i.nodeType)!e&&t{let t=this.delayedAndroidKey;this.delayedAndroidKey=null;let e=this.view.state;dispatchKey(this.view.contentDOM,t.key,t.keyCode)?this.processRecords():this.flush(),this.view.state==e&&this.view.update([])}),this.delayedAndroidKey&&"Enter"!=t||(this.delayedAndroidKey={key:t,keyCode:e})}flushSoon(){this.delayedFlush<0&&(this.delayedFlush=window.setTimeout(()=>{this.delayedFlush=-1,this.flush()},20))}forceFlush(){this.delayedFlush>=0&&(window.clearTimeout(this.delayedFlush),this.delayedFlush=-1,this.flush())}processRecords(){let t=this.queue;for(let e of this.observer.takeRecords())t.push(e);t.length&&(this.queue=[]);let e=-1,i=-1,o=!1;for(let n of t){let t=this.readMutation(n);t&&(t.typeOver&&(o=!0),-1==e?{from:e,to:i}=t:(e=Math.min(t.from,e),i=Math.max(t.to,i)))}return{from:e,to:i,typeOver:o}}flush(t=!0){if(this.delayedFlush>=0||this.delayedAndroidKey)return;t&&this.readSelectionRange();let{from:e,to:i,typeOver:o}=this.processRecords(),n=this.selectionChanged&&hasSelection(this.dom,this.selectionRange);if(e<0&&!n)return;this.selectionChanged=!1;let s=this.view.state;this.onChange(e,i,o),this.view.state==s&&this.view.update([])}readMutation(t){let e=this.view.docView.nearest(t.target);if(!e||e.ignoreMutation(t))return null;if(e.markDirty("attributes"==t.type),"attributes"==t.type&&(e.dirty|=4),"childList"==t.type){let i=findChild(e,t.previousSibling||t.target.previousSibling,-1),o=findChild(e,t.nextSibling||t.target.nextSibling,1);return{from:i?e.posAfter(i):e.posAtStart,to:o?e.posBefore(o):e.posAtEnd,typeOver:!1}}return"characterData"==t.type?{from:e.posAtStart,to:e.posAtEnd,typeOver:t.target.nodeValue==t.oldValue}:null}destroy(){var t,e,i;for(let o of(this.stop(),null===(t=this.intersection)||void 0===t||t.disconnect(),null===(e=this.gapIntersection)||void 0===e||e.disconnect(),null===(i=this.resize)||void 0===i||i.disconnect(),this.scrollTargets))o.removeEventListener("scroll",this.onScroll);window.removeEventListener("scroll",this.onScroll),window.removeEventListener("resize",this.onResize),window.removeEventListener("beforeprint",this.onPrint),this.dom.ownerDocument.removeEventListener("selectionchange",this.onSelectionChange),clearTimeout(this.parentCheck),clearTimeout(this.resizeTimeout)}};function findChild(t,e,i){for(;e;){let o=ContentView.get(e);if(o&&o.parent==t)return o;let n=e.parentNode;e=n!=t.dom?n:i>0?e.nextSibling:e.previousSibling}return null}let EditorView=class EditorView{constructor(t={}){for(let e of(this.plugins=[],this.pluginMap=new Map,this.editorAttrs={},this.contentAttrs={},this.bidiCache=[],this.destroyed=!1,this.updateState=2,this.measureScheduled=-1,this.measureRequests=[],this.contentDOM=document.createElement("div"),this.scrollDOM=document.createElement("div"),this.scrollDOM.tabIndex=-1,this.scrollDOM.className="cm-scroller",this.scrollDOM.appendChild(this.contentDOM),this.announceDOM=document.createElement("div"),this.announceDOM.style.cssText="position: absolute; top: -10000px",this.announceDOM.setAttribute("aria-live","polite"),this.dom=document.createElement("div"),this.dom.appendChild(this.announceDOM),this.dom.appendChild(this.scrollDOM),this._dispatch=t.dispatch||(t=>this.update([t])),this.dispatch=this.dispatch.bind(this),this.root=t.root||function(t){for(;t;){if(t&&(9==t.nodeType||11==t.nodeType&&t.host))return t;t=t.assignedSlot||t.parentNode}return null}(t.parent)||document,this.viewState=new ViewState(t.state||h.EditorState.create()),this.plugins=this.state.facet(I).map(t=>new PluginInstance(t)),this.plugins))e.update(this);this.observer=new DOMObserver(this,(t,e,i)=>{!function(t,e,i,o){let n,s;let r=t.state.selection.main;if(e>-1){let o=t.docView.domBoundsAround(e,i,0);if(!o||t.state.readOnly)return;let{from:l,to:a}=o,c=t.docView.impreciseHead||t.docView.impreciseAnchor?[]:function(t){let e=[];if(t.root.activeElement!=t.contentDOM)return e;let{anchorNode:i,anchorOffset:o,focusNode:n,focusOffset:s}=t.observer.selectionRange;return i&&(e.push(new DOMPoint(i,o)),(n!=i||s!=o)&&e.push(new DOMPoint(n,s))),e}(t),d=new DOMReader(c,t.state);d.readRange(o.startDOM,o.endDOM);let u=r.from,f=null;(8===t.inputState.lastKeyCode&&t.inputState.lastKeyTime>Date.now()-100||A.android&&d.text.length0&&l>0&&t.charCodeAt(r-1)==e.charCodeAt(l-1);)r--,l--;if("end"==o){let t=Math.max(0,s-Math.min(r,l));i-=r+t-s}if(r=r?s-i:0;s-=t,l=s+(l-r),r=s}else if(l=l?s-i:0;s-=t,r=s+(r-l),l=s}return{from:s,toA:r,toB:l}}(t.state.doc.sliceString(l,a,"￿"),d.text,u-l,f);p&&(A.chrome&&13==t.inputState.lastKeyCode&&p.toB==p.from+2&&"￿￿"==d.text.slice(p.from,p.toB)&&p.toB--,n={from:l+p.from,to:l+p.toA,insert:h.Text.of(d.text.slice(p.from,p.toB).split("￿"))}),s=function(t,e){if(0==t.length)return null;let i=t[0].pos,o=2==t.length?t[1].pos:i;return i>-1&&o>-1?h.EditorSelection.single(i+e,o+e):null}(c,l)}else if(t.hasFocus||!t.state.facet(W)){let e=t.observer.selectionRange,{impreciseHead:i,impreciseAnchor:o}=t.docView,n=i&&i.node==e.focusNode&&i.offset==e.focusOffset||!contains(t.contentDOM,e.focusNode)?t.state.selection.main.head:t.docView.posFromDOM(e.focusNode,e.focusOffset),l=o&&o.node==e.anchorNode&&o.offset==e.anchorOffset||!contains(t.contentDOM,e.anchorNode)?t.state.selection.main.anchor:t.docView.posFromDOM(e.anchorNode,e.anchorOffset);(n!=r.head||l!=r.anchor)&&(s=h.EditorSelection.single(l,n))}if(n||s){if(!n&&o&&!r.empty&&s&&s.main.empty?n={from:r.from,to:r.to,insert:t.state.doc.slice(r.from,r.to)}:n&&n.from>=r.from&&n.to<=r.to&&(n.from!=r.from||n.to!=r.to)&&r.to-r.from-(n.to-n.from)<=4&&(n={from:r.from,to:r.to,insert:t.state.doc.slice(r.from,n.from).append(n.insert).append(t.state.doc.slice(n.to,r.to))}),n){let e,i=t.state;if(A.ios&&t.inputState.flushIOSKey(t)||A.android&&(n.from==r.from&&n.to==r.to&&1==n.insert.length&&2==n.insert.lines&&dispatchKey(t.contentDOM,"Enter",13)||n.from==r.from-1&&n.to==r.to&&0==n.insert.length&&dispatchKey(t.contentDOM,"Backspace",8)||n.from==r.from&&n.to==r.to+1&&0==n.insert.length&&dispatchKey(t.contentDOM,"Delete",46)))return;let o=n.insert.toString();if(t.state.facet(P).some(e=>e(t,n.from,n.to,o)))return;if(t.inputState.composing>=0&&t.inputState.composing++,n.from>=r.from&&n.to<=r.to&&n.to-n.from>=(r.to-r.from)/3&&(!s||s.main.empty&&s.main.from==n.from+n.insert.length)&&t.inputState.composing<0){let o=r.fromn.to?i.sliceDoc(n.to,r.to):"";e=i.replaceSelection(t.state.toText(o+n.insert.sliceString(0,void 0,t.state.lineBreak)+s))}else{let o=i.changes(n),l=s&&!i.selection.main.eq(s.main)&&s.main.to<=o.newLength?s.main:void 0;if(i.selection.ranges.length>1&&t.inputState.composing>=0&&n.to<=r.to&&n.to>=r.to-10){let s=t.state.sliceDoc(n.from,n.to),a=compositionSurroundingNode(t)||t.state.doc.lineAt(r.head),c=r.to-n.to,d=r.to-r.from;e=i.changeByRange(e=>{if(e.from==r.from&&e.to==r.to)return{changes:o,range:l||e.map(o)};let u=e.to-c,f=u-s.length;if(e.to-e.from!=d||t.state.sliceDoc(f,u)!=s||a&&e.to>=a.from&&e.from<=a.to)return{range:e};let p=i.changes({from:f,to:u,insert:n.insert}),g=e.to-r.to;return{changes:p,range:l?h.EditorSelection.range(Math.max(0,l.anchor+g),Math.max(0,l.head+g)):e.map(p)}})}else e={changes:o,selection:l&&i.selection.replaceRange(l)}}let l="input.type";t.composing&&(l+=".compose",t.inputState.compositionFirstChange&&(l+=".start",t.inputState.compositionFirstChange=!1)),t.dispatch(e,{scrollIntoView:!0,userEvent:l})}else if(s&&!s.main.eq(r)){let e=!1,i="select";t.inputState.lastSelectionTime>Date.now()-50&&("select"==t.inputState.lastSelectionOrigin&&(e=!0),i=t.inputState.lastSelectionOrigin),t.dispatch({selection:s,scrollIntoView:e,userEvent:i})}}}(this,t,e,i)},t=>{this.inputState.runScrollHandlers(this,t),this.observer.intersecting&&this.measure()}),this.inputState=new InputState(this),this.docView=new DocView(this),this.mountStyles(),this.updateAttrs(),this.updateState=0,this.requestMeasure(),t.parent&&t.parent.appendChild(this.dom)}get state(){return this.viewState.state}get viewport(){return this.viewState.viewport}get visibleRanges(){return this.viewState.visibleRanges}get inView(){return this.viewState.inView}get composing(){return this.inputState.composing>0}get compositionStarted(){return this.inputState.composing>=0}dispatch(...t){this._dispatch(1==t.length&&t[0]instanceof h.Transaction?t[0]:this.state.update(...t))}update(t){if(0!=this.updateState)throw Error("Calls to EditorView.update are not allowed while an update is in progress");let e=!1,i,o=this.state;for(let e of t){if(e.startState!=o)throw RangeError("Trying to update state with a transaction that doesn't start from the previous state.");o=e.state}if(this.destroyed){this.viewState.state=o;return}if(o.facet(h.EditorState.phrases)!=this.state.facet(h.EditorState.phrases))return this.setState(o);i=new ViewUpdate(this,o,t);let n=this.viewState.scrollTarget;try{for(let e of(this.updateState=2,t)){if(n&&(n=n.map(e.changes)),e.scrollIntoView){let{main:t}=e.state.selection;n=new ScrollTarget(t.empty?t:h.EditorSelection.cursor(t.head,t.head>t.anchor?-1:1))}for(let t of e.effects)t.is(L)?n=new ScrollTarget(t.value):t.is(H)?n=new ScrollTarget(t.value,"center"):t.is(F)&&(n=t.value)}this.viewState.update(i,n),this.bidiCache=CachedOrder.update(this.bidiCache,i.changes),i.empty||(this.updatePlugins(i),this.inputState.update(i)),e=this.docView.update(i),this.state.facet(j)!=this.styleModules&&this.mountStyles(),this.updateAttrs(),this.showAnnouncements(t),this.docView.updateSelection(e,t.some(t=>t.isUserEvent("select.pointer")))}finally{this.updateState=0}if(i.startState.facet(tf)!=i.state.facet(tf)&&(this.viewState.mustMeasureContent=!0),(e||n||this.viewState.mustEnforceCursorAssoc||this.viewState.mustMeasureContent)&&this.requestMeasure(),!i.empty)for(let t of this.state.facet(R))t(i)}setState(t){if(0!=this.updateState)throw Error("Calls to EditorView.setState are not allowed while an update is in progress");if(this.destroyed){this.viewState.state=t;return}this.updateState=2;let e=this.hasFocus;try{for(let t of this.plugins)t.destroy(this);for(let e of(this.viewState=new ViewState(t),this.plugins=t.facet(I).map(t=>new PluginInstance(t)),this.pluginMap.clear(),this.plugins))e.update(this);this.docView=new DocView(this),this.inputState.ensureHandlers(this),this.mountStyles(),this.updateAttrs(),this.bidiCache=[]}finally{this.updateState=0}e&&this.focus(),this.requestMeasure()}updatePlugins(t){let e=t.startState.facet(I),i=t.state.facet(I);if(e!=i){let o=[];for(let n of i){let i=e.indexOf(n);if(i<0)o.push(new PluginInstance(n));else{let e=this.plugins[i];e.mustUpdate=t,o.push(e)}}for(let e of this.plugins)e.mustUpdate!=t&&e.destroy(this);this.plugins=o,this.pluginMap.clear(),this.inputState.ensureHandlers(this)}else for(let e of this.plugins)e.mustUpdate=t;for(let t=0;t-1&&cancelAnimationFrame(this.measureScheduled),this.measureScheduled=0,t&&this.observer.flush();let e=null;try{for(let t=0;;t++){this.updateState=1;let i=this.viewport,o=this.viewState.measure(this);if(!o&&!this.measureRequests.length&&null==this.viewState.scrollTarget)break;if(t>5){console.warn(this.measureRequests.length?"Measure loop restarted more than 5 times":"Viewport failed to stabilize");break}let n=[];4&o||([this.measureRequests,n]=[n,this.measureRequests]);let s=n.map(t=>{try{return t.read(this)}catch(t){return logException(this.state,t),tx}}),r=new ViewUpdate(this,this.state),l=!1,h=!1;r.flags|=o,e?e.flags|=o:e=r,this.updateState=2,r.empty||(this.updatePlugins(r),this.inputState.update(r),this.updateAttrs(),l=this.docView.update(r));for(let t=0;t{updateAttrs(this.contentDOM,this.contentAttrs,e),updateAttrs(this.dom,this.editorAttrs,t)}),this.editorAttrs=t,this.contentAttrs=e}showAnnouncements(t){let e=!0;for(let i of t)for(let t of i.effects)t.is(EditorView.announce)&&(e&&(this.announceDOM.textContent=""),e=!1,this.announceDOM.appendChild(document.createElement("div")).textContent=t.value)}mountStyles(){this.styleModules=this.state.facet(j),a.StyleModule.mount(this.root,this.styleModules.concat(ty).reverse())}readMeasured(){if(2==this.updateState)throw Error("Reading the editor layout isn't allowed during an update");0==this.updateState&&this.measureScheduled>-1&&this.measure(!1)}requestMeasure(t){if(this.measureScheduled<0&&(this.measureScheduled=requestAnimationFrame(()=>this.measure())),t){if(null!=t.key){for(let e=0;ee.spec==t)||null),e&&e.update(this).value}get documentTop(){return this.contentDOM.getBoundingClientRect().top+this.viewState.paddingTop}get documentPadding(){return{top:this.viewState.paddingTop,bottom:this.viewState.paddingBottom}}blockAtHeight(t,e){let i=ensureTop(e,this);return this.elementAtHeight(t-i).moveY(i)}elementAtHeight(t){return this.readMeasured(),this.viewState.elementAtHeight(t)}visualLineAtHeight(t,e){let i=ensureTop(e,this);return this.lineBlockAtHeight(t-i).moveY(i)}lineBlockAtHeight(t){return this.readMeasured(),this.viewState.lineBlockAtHeight(t)}viewportLines(t,e){let i=ensureTop(e,this);for(let e of this.viewportLineBlocks)t(e.moveY(i))}get viewportLineBlocks(){return this.viewState.viewportLines}visualLineAt(t,e=0){return this.lineBlockAt(t).moveY(e+this.viewState.paddingTop)}lineBlockAt(t){return this.viewState.lineBlockAt(t)}get contentHeight(){return this.viewState.contentHeight}moveByChar(t,e,i){return skipAtoms(this,t,moveByChar(this,t,e,i))}moveByGroup(t,e){return skipAtoms(this,t,moveByChar(this,t,e,e=>{var i;let o,n;return i=t.head,n=(o=this.state.charCategorizer(i))(e),t=>{let e=o(t);return n==h.CharCategory.Space&&(n=e),n==e}}))}moveToLineBoundary(t,i,o=!0){return function(t,i,o,n){let s=t.state.doc.lineAt(i.head),r=n&&t.lineWrapping?t.coordsAtPos(i.assoc<0&&i.head>s.from?i.head-1:i.head):null;if(r){let i=t.dom.getBoundingClientRect(),n=t.posAtCoords({x:o==(t.textDirection==e.Direction.LTR)?i.right-1:i.left+1,y:(r.top+r.bottom)/2});if(null!=n)return h.EditorSelection.cursor(n,o?-1:1)}let l=LineView.find(t.docView,i.head),a=l?o?l.posAtEnd:l.posAtStart:o?s.to:s.from;return h.EditorSelection.cursor(a,o?-1:1)}(this,t,i,o)}moveVertically(t,e,i){return skipAtoms(this,t,function(t,e,i,o){let n=e.head,s=i?1:-1;if(n==(i?t.state.doc.length:0))return h.EditorSelection.cursor(n,e.assoc);let r=e.goalColumn,l,a=t.contentDOM.getBoundingClientRect(),c=t.coordsAtPos(n),d=t.documentTop;if(c)null==r&&(r=c.left-a.left),l=s<0?c.top:c.bottom;else{let e=t.viewState.lineBlockAt(n-d);null==r&&(r=Math.min(a.right-a.left,t.defaultCharacterWidth*(n-e.from))),l=(s<0?e.top:e.bottom)+d}let u=a.left+r,f=null!=o?o:t.defaultLineHeight>>1;for(let i=0;;i+=10){let o=l+(f+i)*s,c=posAtCoords(t,{x:u,y:o},!1,s);if(oa.bottom||(s<0?cn))return h.EditorSelection.cursor(c,e.assoc,void 0,r)}}(this,t,e,i))}scrollPosIntoView(t){this.dispatch({effects:L.of(h.EditorSelection.cursor(t))})}domAtPos(t){return this.docView.domAtPos(t)}posAtDOM(t,e=0){return this.docView.posFromDOM(t,e)}posAtCoords(t,e=!0){return this.readMeasured(),posAtCoords(this,t,e)}coordsAtPos(t,i=1){this.readMeasured();let o=this.docView.coordsAt(t,i);if(!o||o.left==o.right)return o;let n=this.state.doc.lineAt(t),s=this.bidiSpans(n);return flattenRect(o,s[BidiSpan.find(s,t-n.from,-1,i)].dir==e.Direction.LTR==i>0)}get defaultCharacterWidth(){return this.viewState.heightOracle.charWidth}get defaultLineHeight(){return this.viewState.heightOracle.lineHeight}get textDirection(){return this.viewState.heightOracle.direction}get lineWrapping(){return this.viewState.heightOracle.lineWrapping}bidiSpans(t){if(t.length>tM)return trivialOrder(t.length);let e=this.textDirection;for(let i of this.bidiCache)if(i.from==t.from&&i.dir==e)return i.order;let i=computeOrder(t.text,this.textDirection);return this.bidiCache.push(new CachedOrder(t.from,t.to,e,i)),i}get hasFocus(){var t;return(document.hasFocus()||A.safari&&(null===(t=this.inputState)||void 0===t?void 0:t.lastContextMenu)>Date.now()-3e4)&&this.root.activeElement==this.contentDOM}focus(){this.observer.ignore(()=>{focusPreventScroll(this.contentDOM),this.docView.updateSelection()})}destroy(){for(let t of this.plugins)t.destroy(this);this.plugins=[],this.inputState.destroy(),this.dom.remove(),this.observer.destroy(),this.measureScheduled>-1&&cancelAnimationFrame(this.measureScheduled),this.destroyed=!0}static scrollIntoView(t,e={}){return F.of(new ScrollTarget("number"==typeof t?h.EditorSelection.cursor(t):t,e.y,e.x,e.yMargin,e.xMargin))}static domEventHandlers(t){return ViewPlugin.define(()=>({}),{eventHandlers:t})}static theme(t,e){let i=a.StyleModule.newName(),o=[tf.of(i),j.of(buildTheme(`.${i}`,t))];return e&&e.dark&&o.push(tp.of(!0)),o}static baseTheme(t){return h.Prec.lowest(j.of(buildTheme("."+tg,t,tv)))}};EditorView.scrollTo=L,EditorView.centerOn=H,EditorView.styleModule=j,EditorView.inputHandler=P,EditorView.exceptionSink=V,EditorView.updateListener=R,EditorView.editable=W,EditorView.mouseSelectionStyle=E,EditorView.dragMovesSelection=B,EditorView.clickAddsSelectionRange=O,EditorView.decorations=K,EditorView.darkTheme=tp,EditorView.contentAttributes=G,EditorView.editorAttributes=q,EditorView.lineWrapping=EditorView.contentAttributes.of({class:"cm-lineWrapping"}),EditorView.announce=h.StateEffect.define();let tM=4096;function ensureTop(t,e){return(null==t?e.contentDOM.getBoundingClientRect().top:t)+e.viewState.paddingTop}let tx={};let CachedOrder=class CachedOrder{constructor(t,e,i,o){this.from=t,this.to=e,this.dir=i,this.order=o}static update(t,i){if(i.empty)return t;let o=[],n=t.length?t[t.length-1].dir:e.Direction.LTR;for(let e=Math.max(0,t.length-10);e=0;n--){let e=o[n],s="function"==typeof e?e(t):e;s&&combineAttrs(s,i)}return i}let tk=A.mac?"mac":A.windows?"win":A.linux?"linux":"key";function modifiers(t,e,i){return e.altKey&&(t="Alt-"+t),e.ctrlKey&&(t="Ctrl-"+t),e.metaKey&&(t="Meta-"+t),!1!==i&&e.shiftKey&&(t="Shift-"+t),t}let tC=EditorView.domEventHandlers({keydown:(t,e)=>runHandlers(getKeymap(e.state),t,e,"editor")}),tD=h.Facet.define({enables:tC}),tA=new WeakMap;function getKeymap(t){let e=t.facet(tD),i=tA.get(e);return i||tA.set(e,i=function(t,e=tk){let i=Object.create(null),o=Object.create(null),checkPrefix=(t,e)=>{let i=o[t];if(null==i)o[t]=e;else if(i!=e)throw Error("Key binding "+t+" is used both as a regular binding and as a multi-stroke prefix")},add=(t,o,n,s)=>{let r=i[t]||(i[t]=Object.create(null)),l=o.split(/ (?!$)/).map(t=>(function(t,e){let i,o,n,s;let r=t.split(/-(?!$)/),l=r[r.length-1];"Space"==l&&(l=" ");for(let t=0;t{let o=tT={view:e,prefix:i,scope:t};return setTimeout(()=>{tT==o&&(tT=null)},4e3),!0}]})}let h=l.join(" ");checkPrefix(h,!1);let a=r[h]||(r[h]={preventDefault:!1,commands:[]});a.commands.push(n),s&&(a.preventDefault=!0)};for(let i of t){let t=i[e]||i.key;if(t)for(let e of i.scope?i.scope.split(" "):["editor"])add(e,t,i.run,i.preventDefault),i.shift&&add(e,"Shift-"+t,i.shift,i.preventDefault)}return i}(e.reduce((t,e)=>t.concat(e),[]))),i}let tT=null;function runHandlers(t,e,i,o){let n=u.keyName(e),s=1==n.length&&" "!=n,r="",l=!1;tT&&tT.view==i&&tT.scope==o&&(r=tT.prefix+" ",(l=0>ti.indexOf(e.keyCode))&&(tT=null));let runFor=t=>{if(t){for(let e of t.commands)if(e(i))return!0;t.preventDefault&&(l=!0)}return!1},h=t[o],a;if(h){if(runFor(h[r+modifiers(n,e,!s)]))return!0;if(s&&(e.shiftKey||e.altKey||e.metaKey)&&(a=u.base[e.keyCode])&&a!=n){if(runFor(h[r+modifiers(a,e,!0)]))return!0}else if(s&&e.shiftKey&&runFor(h[r+modifiers(n,e,!0)]))return!0}return l}let tO=!A.ios,tB=h.Facet.define({combine:t=>h.combineConfig(t,{cursorBlinkRate:1200,drawRangeCursor:!0},{cursorBlinkRate:(t,e)=>Math.min(t,e),drawRangeCursor:(t,e)=>t||e})});let Piece=class Piece{constructor(t,e,i,o,n){this.left=t,this.top=e,this.width=i,this.height=o,this.className=n}draw(){let t=document.createElement("div");return t.className=this.className,this.adjust(t),t}adjust(t){t.style.left=this.left+"px",t.style.top=this.top+"px",this.width>=0&&(t.style.width=this.width+"px"),t.style.height=this.height+"px"}eq(t){return this.left==t.left&&this.top==t.top&&this.width==t.width&&this.height==t.height&&this.className==t.className}};let tE=ViewPlugin.fromClass(class{constructor(t){this.view=t,this.rangePieces=[],this.cursors=[],this.measureReq={read:this.readPos.bind(this),write:this.drawSel.bind(this)},this.selectionLayer=t.scrollDOM.appendChild(document.createElement("div")),this.selectionLayer.className="cm-selectionLayer",this.selectionLayer.setAttribute("aria-hidden","true"),this.cursorLayer=t.scrollDOM.appendChild(document.createElement("div")),this.cursorLayer.className="cm-cursorLayer",this.cursorLayer.setAttribute("aria-hidden","true"),t.requestMeasure(this.measureReq),this.setBlinkRate()}setBlinkRate(){this.cursorLayer.style.animationDuration=this.view.state.facet(tB).cursorBlinkRate+"ms"}update(t){let e=t.startState.facet(tB)!=t.state.facet(tB);(e||t.selectionSet||t.geometryChanged||t.viewportChanged)&&this.view.requestMeasure(this.measureReq),t.transactions.some(t=>t.scrollIntoView)&&(this.cursorLayer.style.animationName="cm-blink"==this.cursorLayer.style.animationName?"cm-blink2":"cm-blink"),e&&this.setBlinkRate()}readPos(){let{state:t}=this.view,i=t.facet(tB),o=t.selection.ranges.map(t=>t.empty?[]:function(t,i){if(i.to<=t.viewport.from||i.from>=t.viewport.to)return[];let o=Math.max(i.from,t.viewport.from),n=Math.min(i.to,t.viewport.to),s=t.textDirection==e.Direction.LTR,r=t.contentDOM,l=r.getBoundingClientRect(),h=getBase(t),a=window.getComputedStyle(r.firstChild),c=l.left+parseInt(a.paddingLeft)+Math.min(0,parseInt(a.textIndent)),d=l.right-parseInt(a.paddingRight),u=blockAt(t,o),f=blockAt(t,n),p=u.type==e.BlockType.Text?u:null,g=f.type==e.BlockType.Text?f:null;if(t.lineWrapping&&(p&&(p=wrappedLine(t,o,p)),g&&(g=wrappedLine(t,n,g))),p&&g&&p.from==g.from)return pieces(drawForLine(i.from,i.to,p));{let o=p?drawForLine(i.from,null,p):drawForWidget(u,!1),n=g?drawForLine(null,i.to,g):drawForWidget(f,!0),s=[];return(p||u).to<(g||f).from-1?s.push(piece(c,o.bottom,d,n.top)):o.bottoma&&e.from=s)break;l>n&&addSpan(Math.max(t,n),null==i&&t<=a,Math.min(l,s),null==o&&l>=u,r.dir)}if((n=e.to+1)>=s)break}return 0==h.length&&addSpan(a,null==i,u,null==o,t.textDirection),{top:r,bottom:l,horizontal:h}}function drawForWidget(t,e){let i=l.top+(e?t.top:t.bottom);return{top:i,bottom:i,horizontal:[]}}}(this.view,t)).reduce((t,e)=>t.concat(e)),n=[];for(let e of t.selection.ranges){let o=e==t.selection.main;if(e.empty?!o||tO:i.drawRangeCursor){let t=function(t,e,i){let o=t.coordsAtPos(e.head,e.assoc||1);if(!o)return null;let n=getBase(t);return new Piece(o.left-n.left,o.top-n.top,-1,o.bottom-o.top,i?"cm-cursor cm-cursor-primary":"cm-cursor cm-cursor-secondary")}(this.view,e,o);t&&n.push(t)}}return{rangePieces:o,cursors:n}}drawSel({rangePieces:t,cursors:e}){if(t.length!=this.rangePieces.length||t.some((t,e)=>!t.eq(this.rangePieces[e]))){for(let e of(this.selectionLayer.textContent="",t))this.selectionLayer.appendChild(e.draw());this.rangePieces=t}if(e.length!=this.cursors.length||e.some((t,e)=>!t.eq(this.cursors[e]))){let t=this.cursorLayer.children;if(t.length!==e.length)for(let t of(this.cursorLayer.textContent="",e))this.cursorLayer.appendChild(t.draw());else e.forEach((e,i)=>e.adjust(t[i]));this.cursors=e}}destroy(){this.selectionLayer.remove(),this.cursorLayer.remove()}}),tV={".cm-line":{"& ::selection":{backgroundColor:"transparent !important"},"&::selection":{backgroundColor:"transparent !important"}}};tO&&(tV[".cm-line"].caretColor="transparent !important");let tR=h.Prec.highest(EditorView.theme(tV));function getBase(t){let i=t.scrollDOM.getBoundingClientRect();return{left:(t.textDirection==e.Direction.LTR?i.left:i.right-t.scrollDOM.clientWidth)-t.scrollDOM.scrollLeft,top:i.top-t.scrollDOM.scrollTop}}function wrappedLine(t,i,o){let n=h.EditorSelection.cursor(i);return{from:Math.max(o.from,t.moveToLineBoundary(n,!1,!0).from),to:Math.min(o.to,t.moveToLineBoundary(n,!0,!0).from),type:e.BlockType.Text}}function blockAt(t,i){let o=t.lineBlockAt(i);if(Array.isArray(o.type)){for(let t of o.type)if(t.to>i||t.to==i&&(t.to==o.to||t.type==e.BlockType.Text))return t}return o}let tP=h.StateEffect.define({map:(t,e)=>null==t?null:e.mapPos(t)}),tL=h.StateField.define({create:()=>null,update:(t,e)=>(null!=t&&(t=e.changes.mapPos(t)),e.effects.reduce((t,e)=>e.is(tP)?e.value:t,t))}),tH=ViewPlugin.fromClass(class{constructor(t){this.view=t,this.cursor=null,this.measureReq={read:this.readPos.bind(this),write:this.drawCursor.bind(this)}}update(t){var e;let i=t.state.field(tL);null==i?null!=this.cursor&&(null===(e=this.cursor)||void 0===e||e.remove(),this.cursor=null):(this.cursor||(this.cursor=this.view.scrollDOM.appendChild(document.createElement("div")),this.cursor.className="cm-dropCursor"),(t.startState.field(tL)!=i||t.docChanged||t.geometryChanged)&&this.view.requestMeasure(this.measureReq))}readPos(){let t=this.view.state.field(tL),e=null!=t&&this.view.coordsAtPos(t);if(!e)return null;let i=this.view.scrollDOM.getBoundingClientRect();return{left:e.left-i.left+this.view.scrollDOM.scrollLeft,top:e.top-i.top+this.view.scrollDOM.scrollTop,height:e.bottom-e.top}}drawCursor(t){this.cursor&&(t?(this.cursor.style.left=t.left+"px",this.cursor.style.top=t.top+"px",this.cursor.style.height=t.height+"px"):this.cursor.style.left="-100000px")}destroy(){this.cursor&&this.cursor.remove()}setDropPos(t){this.view.state.field(tL)!=t&&this.view.dispatch({effects:tP.of(t)})}},{eventHandlers:{dragover(t){this.setDropPos(this.view.posAtCoords({x:t.clientX,y:t.clientY}))},dragleave(t){t.target!=this.view.contentDOM&&this.view.contentDOM.contains(t.relatedTarget)||this.setDropPos(null)},dragend(){this.setDropPos(null)},drop(){this.setDropPos(null)}}});function iterMatches(t,e,i,o,n){e.lastIndex=0;for(let s=t.iterRange(i,o),r=i,l;!s.next().done;r+=s.value.length)if(!s.lineBreak)for(;l=e.exec(s.value);)n(r+l.index,r+l.index+l[0].length,l)}let MatchDecorator=class MatchDecorator{constructor(t){let{regexp:e,decoration:i,boundary:o,maxLength:n=1e3}=t;if(!e.global)throw RangeError("The regular expression given to MatchDecorator should have its 'g' flag set");this.regexp=e,this.getDeco="function"==typeof i?i:()=>i,this.boundary=o,this.maxLength=n}createDeco(t){let e=new c.RangeSetBuilder;for(let{from:i,to:o}of function(t,e){let i=t.visibleRanges;if(1==i.length&&i[0].from==t.viewport.from&&i[0].to==t.viewport.to)return i;let o=[];for(let{from:n,to:s}of i)n=Math.max(t.state.doc.lineAt(n).from,n-e),s=Math.min(t.state.doc.lineAt(s).to,s+e),o.length&&o[o.length-1].to>=n?o[o.length-1].to=s:o.push({from:n,to:s});return o}(t,this.maxLength))iterMatches(t.state.doc,this.regexp,i,o,(i,o,n)=>e.add(i,o,this.getDeco(n,t,i)));return e.finish()}updateDeco(t,e){let i=1e9,o=-1;return(t.docChanged&&t.changes.iterChanges((e,n,s,r)=>{r>t.view.viewport.from&&s1e3)?this.createDeco(t.view):o>-1?this.updateRange(t.view,e.map(t.changes),i,o):e}updateRange(t,e,i,o){for(let n of t.visibleRanges){let s=Math.max(n.from,i),r=Math.min(n.to,o);if(r>s){let i=t.state.doc.lineAt(s),o=i.toi.from;s--)if(this.boundary.test(i.text[s-1-i.from])){l=s;break}for(;ra.push(this.getDeco(o,t,e).range(e,i)));e=e.update({filterFrom:l,filterTo:h,filter:(t,e)=>th,add:a})}}return e}};let tF=null!=/x/.unicode?"gu":"g",tW=RegExp("[\x00-\b\n-\x1f\x7f-\x9f\xad؜​‎‏\u2028\u2029‭‮\uFEFF-]",tF),tN={0:"null",7:"bell",8:"backspace",10:"newline",11:"vertical tab",13:"carriage return",27:"escape",8203:"zero width space",8204:"zero width non-joiner",8205:"zero width joiner",8206:"left-to-right mark",8207:"right-to-left mark",8232:"line separator",8237:"left-to-right override",8238:"right-to-left override",8233:"paragraph separator",65279:"zero width no-break space",65532:"object replacement"},tI=null,tz=h.Facet.define({combine(t){let e=h.combineConfig(t,{render:null,specialChars:tW,addSpecialChars:null});return(e.replaceTabs=!function(){var t;if(null==tI&&"undefined"!=typeof document&&document.body){let e=document.body.style;tI=(null!==(t=e.tabSize)&&void 0!==t?t:e.MozTabSize)!=null}return tI||!1}())&&(e.specialChars=RegExp(" |"+e.specialChars.source,tF)),e.addSpecialChars&&(e.specialChars=RegExp(e.specialChars.source+"|"+e.addSpecialChars.source,tF)),e}}),tq=null;let SpecialCharWidget=class SpecialCharWidget extends WidgetType{constructor(t,e){super(),this.options=t,this.code=e}eq(t){return t.code==this.code}toDOM(t){var e;let i=(e=this.code)>=32?"•":10==e?"␤":String.fromCharCode(9216+e),o=t.state.phrase("Control character")+" "+(tN[this.code]||"0x"+this.code.toString(16)),n=this.options.render&&this.options.render(this.code,o,i);if(n)return n;let s=document.createElement("span");return s.textContent=i,s.title=o,s.setAttribute("aria-label",o),s.className="cm-specialChar",s}ignoreEvent(){return!1}};let TabWidget=class TabWidget extends WidgetType{constructor(t){super(),this.width=t}eq(t){return t.width==this.width}toDOM(){let t=document.createElement("span");return t.textContent=" ",t.className="cm-tab",t.style.width=this.width+"px",t}ignoreEvent(){return!1}};let tG=ViewPlugin.fromClass(class{constructor(){this.height=1e3,this.attrs={style:"padding-bottom: 1000px"}}update(t){let e=t.view.viewState.editorHeight-t.view.defaultLineHeight;e!=this.height&&(this.height=e,this.attrs={style:`padding-bottom: ${e}px`})}}),tK=Decoration.line({class:"cm-activeLine"}),tj=ViewPlugin.fromClass(class{constructor(t){this.decorations=this.getDeco(t)}update(t){(t.docChanged||t.selectionSet)&&(this.decorations=this.getDeco(t.view))}getDeco(t){let e=-1,i=[];for(let o of t.state.selection.ranges){if(!o.empty)return Decoration.none;let n=t.lineBlockAt(o.head);n.from>e&&(i.push(tK.range(n.from)),e=n.from)}return Decoration.set(i)}},{decorations:t=>t.decorations});let Placeholder=class Placeholder extends WidgetType{constructor(t){super(),this.content=t}toDOM(){let t=document.createElement("span");return t.className="cm-placeholder",t.style.pointerEvents="none",t.appendChild("string"==typeof this.content?document.createTextNode(this.content):this.content),"string"==typeof this.content?t.setAttribute("aria-label","placeholder "+this.content):t.setAttribute("aria-hidden","true"),t}ignoreEvent(){return!1}};let tU={HeightMap,HeightOracle,MeasuredHeights,QueryType:l,ChangedRange,computeOrder,moveVisually};Object.defineProperty(e,"Range",{enumerable:!0,get:function(){return c.Range}}),e.BidiSpan=BidiSpan,e.BlockInfo=BlockInfo,e.Decoration=Decoration,e.EditorView=EditorView,e.MatchDecorator=MatchDecorator,e.PluginField=PluginField,e.PluginFieldProvider=PluginFieldProvider,e.ViewPlugin=ViewPlugin,e.ViewUpdate=ViewUpdate,e.WidgetType=WidgetType,e.__test=tU,e.drawSelection=function(t={}){return[tB.of(t),tE,tR]},e.dropCursor=function(){return[tL,tH]},e.highlightActiveLine=function(){return tj},e.highlightSpecialChars=function(t={}){return[tz.of(t),tq||(tq=ViewPlugin.fromClass(class{constructor(t){this.view=t,this.decorations=Decoration.none,this.decorationCache=Object.create(null),this.decorator=this.makeDecorator(t.state.facet(tz)),this.decorations=this.decorator.createDeco(t)}makeDecorator(t){return new MatchDecorator({regexp:t.specialChars,decoration:(e,i,o)=>{let{doc:n}=i.state,s=d.codePointAt(e[0],0);if(9==s){let t=n.lineAt(o),e=i.state.tabSize,s=d.countColumn(t.text,e,o-t.from);return Decoration.replace({widget:new TabWidget((e-s%e)*this.view.defaultCharacterWidth)})}return this.decorationCache[s]||(this.decorationCache[s]=Decoration.replace({widget:new SpecialCharWidget(t,s)}))},boundary:t.replaceTabs?void 0:/[^]/})}update(t){let e=t.state.facet(tz);t.startState.facet(tz)!=e?(this.decorator=this.makeDecorator(e),this.decorations=this.decorator.createDeco(t.view)):this.decorations=this.decorator.updateDeco(t,this.decorations)}},{decorations:t=>t.decorations}))]},e.keymap=tD,e.logException=logException,e.placeholder=function(t){return ViewPlugin.fromClass(class{constructor(e){this.view=e,this.placeholder=Decoration.set([Decoration.widget({widget:new Placeholder(t),side:1}).range(0)])}get decorations(){return this.view.state.doc.length?Decoration.none:this.placeholder}},{decorations:t=>t.decorations})},e.runScopeHandlers=function(t,e,i){return runHandlers(getKeymap(t.state),e,t,i)},e.scrollPastEnd=function(){return[tG,G.of(t=>{var e;return(null===(e=t.plugin(tG))||void 0===e?void 0:e.attrs)||null})]}}}]); \ No newline at end of file diff --git a/frontend/webapp/dep-out/_next/static/chunks/845-89170f42495c5944.js b/frontend/webapp/dep-out/_next/static/chunks/845-89170f42495c5944.js deleted file mode 100644 index 77ee027bab..0000000000 --- a/frontend/webapp/dep-out/_next/static/chunks/845-89170f42495c5944.js +++ /dev/null @@ -1,9 +0,0 @@ -(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[845],{7015:function(e,r,t){"use strict";t.d(r,{Z:function(){return n}});var n={animationIterationCount:1,aspectRatio:1,borderImageOutset:1,borderImageSlice:1,borderImageWidth:1,boxFlex:1,boxFlexGroup:1,boxOrdinalGroup:1,columnCount:1,columns:1,flex:1,flexGrow:1,flexPositive:1,flexShrink:1,flexNegative:1,flexOrder:1,gridRow:1,gridRowEnd:1,gridRowSpan:1,gridRowStart:1,gridColumn:1,gridColumnEnd:1,gridColumnSpan:1,gridColumnStart:1,msGridRow:1,msGridRowSpan:1,msGridColumn:1,msGridColumnSpan:1,fontWeight:1,lineHeight:1,opacity:1,order:1,orphans:1,tabSize:1,widows:1,zIndex:1,zoom:1,WebkitLineClamp:1,fillOpacity:1,floodOpacity:1,stopOpacity:1,strokeDasharray:1,strokeDashoffset:1,strokeMiterlimit:1,strokeOpacity:1,strokeWidth:1}},622:function(e,r,t){"use strict";/** - * @license React - * react-jsx-runtime.production.min.js - * - * Copyright (c) Meta Platforms, Inc. and affiliates. - * - * This source code is licensed under the MIT license found in the - * LICENSE file in the root directory of this source tree. - */var n=t(2265),c=Symbol.for("react.element"),u=Symbol.for("react.fragment"),i=Object.prototype.hasOwnProperty,a=n.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED.ReactCurrentOwner,o={key:!0,ref:!0,__self:!0,__source:!0};function q(e,r,t){var n,u={},s=null,f=null;for(n in void 0!==t&&(s=""+t),void 0!==r.key&&(s=""+r.key),void 0!==r.ref&&(f=r.ref),r)i.call(r,n)&&!o.hasOwnProperty(n)&&(u[n]=r[n]);if(e&&e.defaultProps)for(n in r=e.defaultProps)void 0===u[n]&&(u[n]=r[n]);return{$$typeof:c,type:e,key:s,ref:f,props:u,_owner:a.current}}r.Fragment=u,r.jsx=q,r.jsxs=q},7437:function(e,r,t){"use strict";e.exports=t(622)},5566:function(e){var r,t,n,c=e.exports={};function defaultSetTimout(){throw Error("setTimeout has not been defined")}function defaultClearTimeout(){throw Error("clearTimeout has not been defined")}function runTimeout(e){if(r===setTimeout)return setTimeout(e,0);if((r===defaultSetTimout||!r)&&setTimeout)return r=setTimeout,setTimeout(e,0);try{return r(e,0)}catch(t){try{return r.call(null,e,0)}catch(t){return r.call(this,e,0)}}}!function(){try{r="function"==typeof setTimeout?setTimeout:defaultSetTimout}catch(e){r=defaultSetTimout}try{t="function"==typeof clearTimeout?clearTimeout:defaultClearTimeout}catch(e){t=defaultClearTimeout}}();var u=[],i=!1,a=-1;function cleanUpNextTick(){i&&n&&(i=!1,n.length?u=n.concat(u):a=-1,u.length&&drainQueue())}function drainQueue(){if(!i){var e=runTimeout(cleanUpNextTick);i=!0;for(var r=u.length;r;){for(n=u,u=[];++a1)for(var t=1;t-1&&!e.return)switch(e.type){case n.h5:e.return=function prefix(e,r,t){switch((0,c.vp)(e,r)){case 5103:return n.G$+"print-"+e+e;case 5737:case 4201:case 3177:case 3433:case 1641:case 4457:case 2921:case 5572:case 6356:case 5844:case 3191:case 6645:case 3005:case 6391:case 5879:case 5623:case 6135:case 4599:case 4855:case 4215:case 6389:case 5109:case 5365:case 5621:case 3829:return n.G$+e+e;case 4789:return n.uj+e+e;case 5349:case 4246:case 4810:case 6968:case 2756:return n.G$+e+n.uj+e+n.MS+e+e;case 5936:switch((0,c.uO)(e,r+11)){case 114:return n.G$+e+n.MS+(0,c.gx)(e,/[svh]\w+-[tblr]{2}/,"tb")+e;case 108:return n.G$+e+n.MS+(0,c.gx)(e,/[svh]\w+-[tblr]{2}/,"tb-rl")+e;case 45:return n.G$+e+n.MS+(0,c.gx)(e,/[svh]\w+-[tblr]{2}/,"lr")+e}case 6828:case 4268:case 2903:return n.G$+e+n.MS+e+e;case 6165:return n.G$+e+n.MS+"flex-"+e+e;case 5187:return n.G$+e+(0,c.gx)(e,/(\w+).+(:[^]+)/,n.G$+"box-$1$2"+n.MS+"flex-$1$2")+e;case 5443:return n.G$+e+n.MS+"flex-item-"+(0,c.gx)(e,/flex-|-self/g,"")+((0,c.EQ)(e,/flex-|baseline/)?"":n.MS+"grid-row-"+(0,c.gx)(e,/flex-|-self/g,""))+e;case 4675:return n.G$+e+n.MS+"flex-line-pack"+(0,c.gx)(e,/align-content|flex-|-self/g,"")+e;case 5548:return n.G$+e+n.MS+(0,c.gx)(e,"shrink","negative")+e;case 5292:return n.G$+e+n.MS+(0,c.gx)(e,"basis","preferred-size")+e;case 6060:return n.G$+"box-"+(0,c.gx)(e,"-grow","")+n.G$+e+n.MS+(0,c.gx)(e,"grow","positive")+e;case 4554:return n.G$+(0,c.gx)(e,/([^-])(transform)/g,"$1"+n.G$+"$2")+e;case 6187:return(0,c.gx)((0,c.gx)((0,c.gx)(e,/(zoom-|grab)/,n.G$+"$1"),/(image-set)/,n.G$+"$1"),e,"")+e;case 5495:case 3959:return(0,c.gx)(e,/(image-set\([^]*)/,n.G$+"$1$`$1");case 4968:return(0,c.gx)((0,c.gx)(e,/(.+:)(flex-)?(.*)/,n.G$+"box-pack:$3"+n.MS+"flex-pack:$3"),/s.+-b[^;]+/,"justify")+n.G$+e+e;case 4200:if(!(0,c.EQ)(e,/flex-|baseline/))return n.MS+"grid-column-align"+(0,c.tb)(e,r)+e;break;case 2592:case 3360:return n.MS+(0,c.gx)(e,"template-","")+e;case 4384:case 3616:if(t&&t.some(function(e,t){return r=t,(0,c.EQ)(e.props,/grid-\w+-end/)}))return~(0,c.Cw)(e+(t=t[r].value),"span",0)?e:n.MS+(0,c.gx)(e,"-start","")+e+n.MS+"grid-row-span:"+(~(0,c.Cw)(t,"span",0)?(0,c.EQ)(t,/\d+/):+(0,c.EQ)(t,/\d+/)-+(0,c.EQ)(e,/\d+/))+";";return n.MS+(0,c.gx)(e,"-start","")+e;case 4896:case 4128:return t&&t.some(function(e){return(0,c.EQ)(e.props,/grid-\w+-start/)})?e:n.MS+(0,c.gx)((0,c.gx)(e,"-end","-span"),"span ","")+e;case 4095:case 3583:case 4068:case 2532:return(0,c.gx)(e,/(.+)-inline(.+)/,n.G$+"$1$2")+e;case 8116:case 7059:case 5753:case 5535:case 5445:case 5701:case 4933:case 4677:case 5533:case 5789:case 5021:case 4765:if((0,c.to)(e)-1-r>6)switch((0,c.uO)(e,r+1)){case 109:if(45!==(0,c.uO)(e,r+4))break;case 102:return(0,c.gx)(e,/(.+:)(.+)-([^]+)/,"$1"+n.G$+"$2-$3$1"+n.uj+(108==(0,c.uO)(e,r+3)?"$3":"$2-$3"))+e;case 115:return~(0,c.Cw)(e,"stretch",0)?prefix((0,c.gx)(e,"stretch","fill-available"),r,t)+e:e}break;case 5152:case 5920:return(0,c.gx)(e,/(.+?):(\d+)(\s*\/\s*(span)?\s*(\d+))?(.*)/,function(r,t,c,u,i,a,o){return n.MS+t+":"+c+o+(u?n.MS+t+"-span:"+(i?a:+a-+c)+o:"")+e});case 4949:if(121===(0,c.uO)(e,r+6))return(0,c.gx)(e,":",":"+n.G$)+e;break;case 6444:switch((0,c.uO)(e,45===(0,c.uO)(e,14)?18:11)){case 120:return(0,c.gx)(e,/(.+:)([^;\s!]+)(;|(\s+)?!.+)?/,"$1"+n.G$+(45===(0,c.uO)(e,14)?"inline-":"")+"box$3$1"+n.G$+"$2$3$1"+n.MS+"$2box$3")+e;case 100:return(0,c.gx)(e,":",":"+n.MS)+e}break;case 5719:case 2647:case 2135:case 3927:case 2391:return(0,c.gx)(e,"scroll-","scroll-snap-")+e}return e}(e.value,e.length,t);return;case n.lK:return(0,i.q)([(0,u.JG)(e,{value:(0,c.gx)(e.value,"@","@"+n.G$)})],a);case n.Fr:if(e.length)return(0,c.$e)(t=e.props,function(r){switch((0,c.EQ)(r,a=/(::plac\w+|:read-\w+)/)){case":read-only":case":read-write":(0,u.xb)((0,u.JG)(e,{props:[(0,c.gx)(r,/:(read-\w+)/,":"+n.uj+"$1")]})),(0,u.xb)((0,u.JG)(e,{props:[r]})),(0,c.f0)(e,{props:(0,c.hX)(t,a)});break;case"::placeholder":(0,u.xb)((0,u.JG)(e,{props:[(0,c.gx)(r,/:(plac\w+)/,":"+n.G$+"input-$1")]})),(0,u.xb)((0,u.JG)(e,{props:[(0,c.gx)(r,/:(plac\w+)/,":"+n.uj+"$1")]})),(0,u.xb)((0,u.JG)(e,{props:[(0,c.gx)(r,/:(plac\w+)/,n.MS+"input-$1")]})),(0,u.xb)((0,u.JG)(e,{props:[r]})),(0,c.f0)(e,{props:(0,c.hX)(t,a)})}return""})}}},6638:function(e,r,t){"use strict";t.d(r,{MY:function(){return compile}});var n=t(6985),c=t(9012),u=t(8416);function compile(e){return(0,u.cE)(function parse(e,r,t,i,a,o,s,f,l){for(var p,d=0,h=0,g=s,x=0,m=0,b=0,$=1,w=1,k=1,v=0,y="",G=a,S=o,O=i,T=y;w;)switch(b=v,v=(0,u.lp)()){case 40:if(108!=b&&58==(0,c.uO)(T,g-1)){-1!=(0,c.Cw)(T+=(0,c.gx)((0,u.iF)(v),"&","&\f"),"&\f",(0,c.Wn)(d?f[d-1]:0))&&(k=-1);break}case 34:case 39:case 91:T+=(0,u.iF)(v);break;case 9:case 10:case 13:case 32:T+=(0,u.Qb)(b);break;case 92:T+=(0,u.kq)((0,u.Ud)()-1,7);continue;case 47:switch((0,u.fj)()){case 42:case 47:(0,c.R3)((p=(0,u.q6)((0,u.lp)(),(0,u.Ud)()),(0,u.dH)(p,r,t,n.Ab,(0,c.Dp)((0,u.Tb)()),(0,c.tb)(p,2,-2),0,l)),l);break;default:T+="/"}break;case 123*$:f[d++]=(0,c.to)(T)*k;case 125*$:case 59:case 0:switch(v){case 0:case 125:w=0;case 59+h:-1==k&&(T=(0,c.gx)(T,/\f/g,"")),m>0&&(0,c.to)(T)-g&&(0,c.R3)(m>32?declaration(T+";",i,t,g-1,l):declaration((0,c.gx)(T," ","")+";",i,t,g-2,l),l);break;case 59:T+=";";default:if((0,c.R3)(O=ruleset(T,r,t,d,h,a,f,y,G=[],S=[],g,o),o),123===v){if(0===h)parse(T,r,O,O,G,o,g,f,S);else switch(99===x&&110===(0,c.uO)(T,3)?100:x){case 100:case 108:case 109:case 115:parse(e,O,O,i&&(0,c.R3)(ruleset(e,O,O,0,0,a,f,y,a,G=[],g,S),S),a,S,g,f,i?G:S);break;default:parse(T,O,O,O,[""],S,0,f,S)}}}d=h=m=0,$=k=1,y=T="",g=s;break;case 58:g=1+(0,c.to)(T),m=b;default:if($<1){if(123==v)--$;else if(125==v&&0==$++&&125==(0,u.mp)())continue}switch(T+=(0,c.Dp)(v),v*$){case 38:k=h>0?1:(T+="\f",-1);break;case 44:f[d++]=((0,c.to)(T)-1)*k,k=1;break;case 64:45===(0,u.fj)()&&(T+=(0,u.iF)((0,u.lp)())),x=(0,u.fj)(),h=g=(0,c.to)(y=T+=(0,u.QU)((0,u.Ud)())),v++;break;case 45:45===b&&2==(0,c.to)(T)&&($=0)}}return o}("",null,null,null,[""],e=(0,u.un)(e),0,[0],e))}function ruleset(e,r,t,i,a,o,s,f,l,p,d,h){for(var g=a-1,x=0===a?o:[""],m=(0,c.Ei)(x),b=0,$=0,w=0;b0?x[k]+" "+v:(0,c.gx)(v,/&\f/g,x[k])))&&(l[w++]=y);return(0,u.dH)(e,r,t,0===a?n.Fr:f,l,p,d,h)}function declaration(e,r,t,i,a){return(0,u.dH)(e,r,t,n.h5,(0,c.tb)(e,0,i),(0,c.tb)(e,i+1,-1),i,a)}},9023:function(e,r,t){"use strict";t.d(r,{P:function(){return stringify},q:function(){return serialize}});var n=t(6985),c=t(9012);function serialize(e,r){for(var t="",n=0;n0?(0,n.uO)(s,--a):0,u--,10===o&&(u=1,c--),o}function next(){return o=a2||token(o)>3?"":" "}function escaping(e,r){for(;--r&&next()&&!(o<48)&&!(o>102)&&(!(o>57)||!(o<65))&&(!(o>70)||!(o<97)););return slice(e,a+(r<6&&32==peek()&&32==next()))}function commenter(e,r){for(;next();)if(e+o===57)break;else if(e+o===84&&47===peek())break;return"/*"+slice(r,a-1)+"*"+(0,n.Dp)(47===e?e:next())}function identifier(e){for(;!token(peek());)next();return slice(e,a)}},9012:function(e,r,t){"use strict";t.d(r,{$e:function(){return combine},Cw:function(){return indexof},Dp:function(){return c},EQ:function(){return match},Ei:function(){return sizeof},R3:function(){return append},Wn:function(){return n},f0:function(){return u},fy:function(){return trim},gx:function(){return replace},hX:function(){return filter},tb:function(){return substr},to:function(){return strlen},uO:function(){return charat},vp:function(){return hash}});var n=Math.abs,c=String.fromCharCode,u=Object.assign;function hash(e,r){return 45^charat(e,0)?(((r<<2^charat(e,0))<<2^charat(e,1))<<2^charat(e,2))<<2^charat(e,3):0}function trim(e){return e.trim()}function match(e,r){return(e=r.exec(e))?e[0]:e}function replace(e,r,t){return e.replace(r,t)}function indexof(e,r,t){return e.indexOf(r,t)}function charat(e,r){return 0|e.charCodeAt(r)}function substr(e,r,t){return e.slice(r,t)}function strlen(e){return e.length}function sizeof(e){return e.length}function append(e,r){return r.push(e),e}function combine(e,r){return e.map(r).join("")}function filter(e,r){return e.filter(function(e){return!match(e,r)})}}}]); \ No newline at end of file diff --git a/frontend/webapp/dep-out/_next/static/chunks/992.f0762ec103fbe656.js b/frontend/webapp/dep-out/_next/static/chunks/992.f0762ec103fbe656.js deleted file mode 100644 index f51bd4e83e..0000000000 --- a/frontend/webapp/dep-out/_next/static/chunks/992.f0762ec103fbe656.js +++ /dev/null @@ -1 +0,0 @@ -(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[992],{3992:function(e,t,r){"use strict";var n=r(3227),o=r(8361),a=r(5971),i=r(2715),u=r(1193);Object.defineProperty(t,"__esModule",{value:!0}),Object.defineProperty(t,"default",{enumerable:!0,get:function(){return p}});var l=r(8754),c=l._(r(7294)),d=l._(r(7820)),f={400:"Bad Request",404:"This page could not be found",405:"Method Not Allowed",500:"Internal Server Error"};function _getInitialProps(e){var t=e.res,r=e.err;return{statusCode:t&&t.statusCode?t.statusCode:r?r.statusCode:404}}var s={error:{fontFamily:'system-ui,"Segoe UI",Roboto,Helvetica,Arial,sans-serif,"Apple Color Emoji","Segoe UI Emoji"',height:"100vh",textAlign:"center",display:"flex",flexDirection:"column",alignItems:"center",justifyContent:"center"},desc:{lineHeight:"48px"},h1:{display:"inline-block",margin:"0 20px 0 0",paddingRight:23,fontSize:24,fontWeight:500,verticalAlign:"top"},h2:{fontSize:14,fontWeight:400,lineHeight:"28px"},wrap:{display:"inline-block"}},p=function(e){a(Error,e);var t,r=(t=function(){if("undefined"==typeof Reflect||!Reflect.construct||Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){})),!0}catch(e){return!1}}(),function(){var e,r=u(Error);if(t){var n=u(this).constructor;e=Reflect.construct(r,arguments,n)}else e=r.apply(this,arguments);return i(this,e)});function Error(){return n(this,Error),r.apply(this,arguments)}return o(Error,[{key:"render",value:function(){var e=this.props,t=e.statusCode,r=e.withDarkMode,n=this.props.title||f[t]||"An unexpected error has occurred";return c.default.createElement("div",{style:s.error},c.default.createElement(d.default,null,c.default.createElement("title",null,t?t+": "+n:"Application error: a client-side exception has occurred")),c.default.createElement("div",{style:s.desc},c.default.createElement("style",{dangerouslySetInnerHTML:{__html:"body{color:#000;background:#fff;margin:0}.next-error-h1{border-right:1px solid rgba(0,0,0,.3)}"+(void 0===r||r?"@media (prefers-color-scheme:dark){body{color:#fff;background:#000}.next-error-h1{border-right:1px solid rgba(255,255,255,.3)}}":"")}}),t?c.default.createElement("h1",{className:"next-error-h1",style:s.h1},t):null,c.default.createElement("div",{style:s.wrap},c.default.createElement("h2",{style:s.h2},this.props.title||t?n:c.default.createElement(c.default.Fragment,null,"Application error: a client-side exception has occurred (see the browser console for more information)"),"."))))}}]),Error}(c.default.Component);p.displayName="ErrorPage",p.getInitialProps=_getInitialProps,p.origGetInitialProps=_getInitialProps,("function"==typeof t.default||"object"==typeof t.default&&null!==t.default)&&void 0===t.default.__esModule&&(Object.defineProperty(t.default,"__esModule",{value:!0}),Object.assign(t.default,t),e.exports=t.default)},3854:function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),Object.defineProperty(t,"AmpStateContext",{enumerable:!0,get:function(){return n}});var n=r(8754)._(r(7294)).default.createContext({})},4764:function(e,t){"use strict";function isInAmpMode(e){var t=void 0===e?{}:e,r=t.ampFirst,n=t.hybrid,o=t.hasQuery;return void 0!==r&&r||void 0!==n&&n&&void 0!==o&&o}Object.defineProperty(t,"__esModule",{value:!0}),Object.defineProperty(t,"isInAmpMode",{enumerable:!0,get:function(){return isInAmpMode}})},7820:function(e,t,r){"use strict";var n=r(930);function ownKeys(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter(function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable})),r.push.apply(r,n)}return r}Object.defineProperty(t,"__esModule",{value:!0}),function(e,t){for(var r in t)Object.defineProperty(e,r,{enumerable:!0,get:t[r]})}(t,{defaultHead:function(){return _defaultHead},default:function(){return _default2}});var o=r(8754),a=r(1757)._(r(7294)),i=o._(r(5453)),u=r(3854),l=r(8055),c=r(4764);function _defaultHead(e){void 0===e&&(e=!1);var t=[a.default.createElement("meta",{charSet:"utf-8"})];return e||t.push(a.default.createElement("meta",{name:"viewport",content:"width=device-width"})),t}function onlyReactElement(e,t){return"string"==typeof t||"number"==typeof t?e:t.type===a.default.Fragment?e.concat(a.default.Children.toArray(t.props.children).reduce(function(e,t){return"string"==typeof t||"number"==typeof t?e:e.concat(t)},[])):e.concat(t)}r(9751);var d=["name","httpEquiv","charSet","itemProp"];function reduceComponents(e,t){var r,o,i,u,l=t.inAmpMode;return e.reduce(onlyReactElement,[]).reverse().concat(_defaultHead(l).reverse()).filter((r=new Set,o=new Set,i=new Set,u={},function(e){var t=!0,n=!1;if(e.key&&"number"!=typeof e.key&&e.key.indexOf("$")>0){n=!0;var a=e.key.slice(e.key.indexOf("$")+1);r.has(a)?t=!1:r.add(a)}switch(e.type){case"title":case"base":o.has(e.type)?t=!1:o.add(e.type);break;case"meta":for(var l=0,c=d.length;l`solid 2px ${e.colors.light_grey}`}; - border-radius: 50%; - display: inline-block; - position: relative; -`,u=l.ZP.p` - color: ${({theme:e})=>e.text.white}; - margin: 0; - font-family: ${({theme:e})=>e.font_family.primary}, sans-serif; - font-size: 16px; - font-weight: 400; -`;function Text({children:e,color:t,style:r,weight:l,size:i,...a}){return n.createElement(u,{style:{fontWeight:l,color:t,fontSize:i,...r},...a},e)}var checked_radio_default=e=>n.createElement("svg",{xmlns:"http://www.w3.org/2000/svg",width:15,height:15,viewBox:"0 0 18 18",fill:"none",...e},n.createElement("rect",{x:.5,y:.5,width:17,height:17,rx:8.5,fill:"#96F2FF",stroke:"#96F2FF"}),n.createElement("path",{d:"M13.7727 6L7.39773 12.375L4.5 9.47727",stroke:"#132330",strokeWidth:2,strokeLinecap:"round",strokeLinejoin:"round"})),RadioButton=({label:e="",onChange:t,value:r,size:l=25,textStyles:i={}})=>n.createElement(d,null,n.createElement("div",{onClick:function(){t&&t({})},style:{display:"flex",alignItems:"center"}},r?n.createElement(checked_radio_default,{width:l,height:l}):n.createElement(p,{style:{width:l,height:l}})),n.createElement(Text,{...i},e)),C=l.ZP.div` - :hover { - background: ${({theme:e,disabled:t,variant:r})=>t?e.colors.blue_grey:"primary"===r?e.colors.torquiz_light:"transparent"}; - } - p { - cursor: ${({disabled:e})=>e?"not-allowed !important":"pointer !important"}; - } -`,m=l.ZP.button` - display: flex; - padding: 8px 16px; - align-items: center; - border-radius: 8px; - border: none; - width: 100%; - height: 100%; - border: 1px solid - ${({theme:e,variant:t})=>"primary"===t?"transparent":e.colors.secondary}; - cursor: ${({disabled:e})=>e?"not-allowed !important":"pointer !important"}; - background: ${({theme:e,disabled:t,variant:r})=>t?"primary"===r?e.colors.blue_grey:"transparent":"primary"===r?e.colors.secondary:"transparent"}; - justify-content: center; - align-items: center; - opacity: ${({disabled:e,variant:t})=>"primary"!==t&&e?.5:1}; -`,Button=({variant:e="primary",children:t,style:r,disabled:l,type:i="button",...a})=>n.createElement(C,{variant:e,disabled:l},n.createElement(m,{type:i,variant:e,disabled:l,style:{...r},...a},t)),g=l.ZP.div` - background: radial-gradient( - circle at 100% 100%, - #ffffff 0, - #ffffff 3px, - transparent 3px - ) - 0% 0%/8px 8px no-repeat, - radial-gradient(circle at 0 100%, #ffffff 0, #ffffff 3px, transparent 3px) - 100% 0%/8px 8px no-repeat, - radial-gradient(circle at 100% 0, #ffffff 0, #ffffff 3px, transparent 3px) - 0% 100%/8px 8px no-repeat, - radial-gradient(circle at 0 0, #ffffff 0, #ffffff 3px, transparent 3px) 100% - 100%/8px 8px no-repeat, - linear-gradient(#ffffff, #ffffff) 50% 50% / calc(100% - 10px) - calc(100% - 16px) no-repeat, - linear-gradient(#ffffff, #ffffff) 50% 50% / calc(100% - 16px) - calc(100% - 10px) no-repeat, - linear-gradient(0deg, transparent 0%, #0ee6f3 100%), - radial-gradient( - 78.09% 72.18% at 100% -0%, - rgba(150, 242, 255, 0.4) 0%, - rgba(150, 242, 255, 0) 61.91% - ), - linear-gradient(180deg, #2e4c55 0%, #303355 100%); - border-radius: 8px; - padding: 1px; - width: 32px; - height: 32px; -`,h=l.ZP.div` - width: 32px; - height: 32px; - border-radius: 8px; - display: flex; - justify-content: center; - align-items: center; - background: radial-gradient( - 78.09% 72.18% at 100% -0%, - rgba(150, 242, 255, 0.4) 0%, - rgba(150, 242, 255, 0) 61.91% - ), - linear-gradient(180deg, #2e4c55 0%, #303355 100%); -`;function FloatBox({children:e,style:t={}}){return n.createElement(g,null,n.createElement(h,{style:{...t}},e))}var trash_default=e=>n.createElement("svg",{width:"14px",height:"14px",viewBox:"0 0 24 24",fill:"none",xmlns:"http://www.w3.org/2000/svg",...e},n.createElement("g",{id:"SVGRepo_bgCarrier",strokeWidth:0}),n.createElement("g",{id:"SVGRepo_tracerCarrier",strokeLinecap:"round",strokeLinejoin:"round"}),n.createElement("g",{id:"SVGRepo_iconCarrier"},n.createElement("path",{d:"M20.5001 6H3.5",stroke:"#0EE6F3",strokeWidth:1.5,strokeLinecap:"round"}),n.createElement("path",{d:"M18.8332 8.5L18.3732 15.3991C18.1962 18.054 18.1077 19.3815 17.2427 20.1907C16.3777 21 15.0473 21 12.3865 21H11.6132C8.95235 21 7.62195 21 6.75694 20.1907C5.89194 19.3815 5.80344 18.054 5.62644 15.3991L5.1665 8.5",stroke:"#0EE6F3",strokeWidth:1.5,strokeLinecap:"round"}),n.createElement("path",{d:"M9.5 11L10 16",stroke:"#0EE6F3",strokeWidth:1.5,strokeLinecap:"round"}),n.createElement("path",{d:"M14.5 11L14 16",stroke:"#0EE6F3",strokeWidth:1.5,strokeLinecap:"round"}),n.createElement("path",{d:"M6.5 6C6.55588 6 6.58382 6 6.60915 5.99936C7.43259 5.97849 8.15902 5.45491 8.43922 4.68032C8.44784 4.65649 8.45667 4.62999 8.47434 4.57697L8.57143 4.28571C8.65431 4.03708 8.69575 3.91276 8.75071 3.8072C8.97001 3.38607 9.37574 3.09364 9.84461 3.01877C9.96213 3 10.0932 3 10.3553 3H13.6447C13.9068 3 14.0379 3 14.1554 3.01877C14.6243 3.09364 15.03 3.38607 15.2493 3.8072C15.3043 3.91276 15.3457 4.03708 15.4286 4.28571L15.5257 4.57697C15.5433 4.62992 15.5522 4.65651 15.5608 4.68032C15.841 5.45491 16.5674 5.97849 17.3909 5.99936C17.4162 6 17.4441 6 17.5 6",stroke:"#0EE6F3",strokeWidth:1.5}))),check_default=e=>n.createElement("svg",{width:10,height:10,viewBox:"0 0 10 10",fill:"none",xmlns:"http://www.w3.org/2000/svg",...e},n.createElement("g",{clipPath:"url(#clip0_48_7283)"},n.createElement("path",{d:"M1.5625 5.625L3.75 7.8125L8.75 2.8125",stroke:"#96F2FF",strokeWidth:2,strokeLinecap:"round",strokeLinejoin:"round"})),n.createElement("defs",null,n.createElement("clipPath",{id:"clip0_48_7283"},n.createElement("rect",{width:10,height:10,fill:"white"})))),expand_arrow_default=e=>n.createElement("svg",{width:12,height:13,viewBox:"0 0 12 13",fill:"none",xmlns:"http://www.w3.org/2000/svg",...e},n.createElement("path",{d:"M10.0155 5.26528L6.26552 9.01528C6.23069 9.05014 6.18934 9.0778 6.14381 9.09667C6.09829 9.11555 6.04949 9.12526 6.00021 9.12526C5.95093 9.12526 5.90213 9.11555 5.85661 9.09667C5.81108 9.0778 5.76972 9.05014 5.7349 9.01528L1.9849 5.26528C1.91453 5.19491 1.875 5.09948 1.875 4.99996C1.875 4.90045 1.91453 4.80502 1.9849 4.73465C2.05526 4.66429 2.1507 4.62476 2.25021 4.62476C2.34972 4.62476 2.44516 4.66429 2.51552 4.73465L6.00021 8.21981L9.4849 4.73465C9.51974 4.69981 9.5611 4.67217 9.60662 4.65332C9.65214 4.63446 9.70094 4.62476 9.75021 4.62476C9.79948 4.62476 9.84827 4.63446 9.8938 4.65332C9.93932 4.67217 9.98068 4.69981 10.0155 4.73465C10.0504 4.76949 10.078 4.81086 10.0969 4.85638C10.1157 4.9019 10.1254 4.95069 10.1254 4.99996C10.1254 5.04924 10.1157 5.09803 10.0969 5.14355C10.078 5.18907 10.0504 5.23044 10.0155 5.26528Z",fill:"#CCD0D2"})),cluster_attr_default=e=>n.createElement("svg",{viewBox:"0 0 24 24",fill:"none",xmlns:"http://www.w3.org/2000/svg",...e},n.createElement("g",{id:"SVGRepo_bgCarrier",strokeWidth:0}),n.createElement("g",{id:"SVGRepo_tracerCarrier",strokeLinecap:"round",strokeLinejoin:"round"}),n.createElement("g",{id:"SVGRepo_iconCarrier"},n.createElement("path",{d:"M4.97883 9.68508C2.99294 8.89073 2 8.49355 2 8C2 7.50645 2.99294 7.10927 4.97883 6.31492L7.7873 5.19153C9.77318 4.39718 10.7661 4 12 4C13.2339 4 14.2268 4.39718 16.2127 5.19153L19.0212 6.31492C21.0071 7.10927 22 7.50645 22 8C22 8.49355 21.0071 8.89073 19.0212 9.68508L16.2127 10.8085C14.2268 11.6028 13.2339 12 12 12C10.7661 12 9.77318 11.6028 7.7873 10.8085L4.97883 9.68508Z",stroke:"#8b92a6",strokeWidth:1.5}),n.createElement("path",{d:"M22 12C22 12 21.0071 12.8907 19.0212 13.6851L16.2127 14.8085C14.2268 15.6028 13.2339 16 12 16C10.7661 16 9.77318 15.6028 7.7873 14.8085L4.97883 13.6851C2.99294 12.8907 2 12 2 12",stroke:"#8b92a6",strokeWidth:1.5,strokeLinecap:"round"}),n.createElement("path",{d:"M22 16C22 16 21.0071 16.8907 19.0212 17.6851L16.2127 18.8085C14.2268 19.6028 13.2339 20 12 20C10.7661 20 9.77318 19.6028 7.7873 18.8085L4.97883 17.6851C2.99294 16.8907 2 16 2 16",stroke:"#8b92a6",strokeWidth:1.5,strokeLinecap:"round"}))),delete_attr_default=e=>n.createElement("svg",{viewBox:"0 0 24 24",fill:"none",xmlns:"http://www.w3.org/2000/svg",...e},n.createElement("g",{id:"SVGRepo_bgCarrier",strokeWidth:0}),n.createElement("g",{id:"SVGRepo_tracerCarrier",strokeLinecap:"round",strokeLinejoin:"round"}),n.createElement("g",{id:"SVGRepo_iconCarrier"},n.createElement("path",{d:"M7 9.5L12 14.5M12 9.5L7 14.5M19.4922 13.9546L16.5608 17.7546C16.2082 18.2115 16.032 18.44 15.8107 18.6047C15.6146 18.7505 15.3935 18.8592 15.1583 18.9253C14.8928 19 14.6042 19 14.0271 19H6.2C5.07989 19 4.51984 19 4.09202 18.782C3.71569 18.5903 3.40973 18.2843 3.21799 17.908C3 17.4802 3 16.9201 3 15.8V8.2C3 7.0799 3 6.51984 3.21799 6.09202C3.40973 5.71569 3.71569 5.40973 4.09202 5.21799C4.51984 5 5.07989 5 6.2 5H14.0271C14.6042 5 14.8928 5 15.1583 5.07467C15.3935 5.14081 15.6146 5.2495 15.8107 5.39534C16.032 5.55998 16.2082 5.78846 16.5608 6.24543L19.4922 10.0454C20.0318 10.7449 20.3016 11.0947 20.4054 11.4804C20.4969 11.8207 20.4969 12.1793 20.4054 12.5196C20.3016 12.9053 20.0318 13.2551 19.4922 13.9546Z",stroke:"#8b92a7",strokeWidth:2,strokeLinecap:"round",strokeLinejoin:"round"}))),rename_attr_default=e=>n.createElement("svg",{viewBox:"0 0 24 24",fill:"none",xmlns:"http://www.w3.org/2000/svg",...e},n.createElement("g",{id:"SVGRepo_bgCarrier",strokeWidth:0}),n.createElement("g",{id:"SVGRepo_tracerCarrier",strokeLinecap:"round",strokeLinejoin:"round"}),n.createElement("g",{id:"SVGRepo_iconCarrier"},n.createElement("path",{d:"M20 7H9.00001C6.23858 7 4 9.23857 4 12C4 14.7614 6.23858 17 9 17H16M20 7L17 4M20 7L17 10",stroke:"#8b92a7",strokeWidth:1.5,strokeLinecap:"round",strokeLinejoin:"round"}))),error_sampler_default=e=>n.createElement("svg",{viewBox:"0 0 24 24",role:"img",xmlns:"http://www.w3.org/2000/svg","aria-labelledby":"errorIconTitle",stroke:"#8b92a7",strokeWidth:2,strokeLinecap:"round",strokeLinejoin:"round",fill:"none",color:"#000000",...e},n.createElement("g",{id:"SVGRepo_bgCarrier",strokeWidth:0}),n.createElement("g",{id:"SVGRepo_tracerCarrier",strokeLinecap:"round",strokeLinejoin:"round"}),n.createElement("g",{id:"SVGRepo_iconCarrier"},n.createElement("title",{id:"errorIconTitle"},"Error"),n.createElement("path",{d:"M12 8L12 13"}),n.createElement("line",{x1:12,y1:16,x2:12,y2:16}),n.createElement("circle",{cx:12,cy:12,r:10}))),pii_masking_default=e=>n.createElement("svg",{viewBox:"0 0 24 24",fill:"none",xmlns:"http://www.w3.org/2000/svg",...e},n.createElement("g",{id:"SVGRepo_bgCarrier",strokeWidth:0}),n.createElement("g",{id:"SVGRepo_tracerCarrier",strokeLinecap:"round",strokeLinejoin:"round"}),n.createElement("g",{id:"SVGRepo_iconCarrier"},n.createElement("path",{d:"M3 7C3 5.11438 3 4.17157 3.58579 3.58579C4.17157 3 5.11438 3 7 3H12H17C18.8856 3 19.8284 3 20.4142 3.58579C21 4.17157 21 5.11438 21 7V15V17C21 18.8856 21 19.8284 20.4142 20.4142C19.8284 21 18.8856 21 17 21H12H7C5.11438 21 4.17157 21 3.58579 20.4142C3 19.8284 3 18.8856 3 17V15V7Z",stroke:"#8b92a7",strokeWidth:2,strokeLinejoin:"round"}),n.createElement("path",{d:"M16 12C16 14.2091 14.2091 16 12 16C9.79086 16 8 14.2091 8 12C8 9.79086 9.79086 8 12 8C14.2091 8 16 9.79086 16 12Z",stroke:"#8b92a7",strokeWidth:2}))),latency_sampler_default=e=>n.createElement("svg",{viewBox:"0 0 24 24",fill:"none",xmlns:"http://www.w3.org/2000/svg",...e},n.createElement("g",{id:"SVGRepo_bgCarrier",strokeWidth:0}),n.createElement("g",{id:"SVGRepo_tracerCarrier",strokeLinecap:"round",strokeLinejoin:"round"}),n.createElement("g",{id:"SVGRepo_iconCarrier"},n.createElement("path",{d:"M23 12C23 18.0751 18.0751 23 12 23C5.92487 23 1 18.0751 1 12C1 5.92487 5.92487 1 12 1C18.0751 1 23 5.92487 23 12ZM3.00683 12C3.00683 16.9668 7.03321 20.9932 12 20.9932C16.9668 20.9932 20.9932 16.9668 20.9932 12C20.9932 7.03321 16.9668 3.00683 12 3.00683C7.03321 3.00683 3.00683 7.03321 3.00683 12Z",fill:"#8b92a7"}),n.createElement("path",{d:"M12 5C11.4477 5 11 5.44771 11 6V12.4667C11 12.4667 11 12.7274 11.1267 12.9235C11.2115 13.0898 11.3437 13.2343 11.5174 13.3346L16.1372 16.0019C16.6155 16.278 17.2271 16.1141 17.5032 15.6358C17.7793 15.1575 17.6155 14.5459 17.1372 14.2698L13 11.8812V6C13 5.44772 12.5523 5 12 5Z",fill:"#8b92a7"}))),probabilistic_sampler_default=e=>n.createElement("svg",{fill:"#8b92a7",id:"Capa_1",xmlns:"http://www.w3.org/2000/svg",xmlnsXlink:"http://www.w3.org/1999/xlink",viewBox:"0 0 320.281 320.281",xmlSpace:"preserve",...e},n.createElement("g",{id:"SVGRepo_bgCarrier",strokeWidth:0}),n.createElement("g",{id:"SVGRepo_tracerCarrier",strokeLinecap:"round",strokeLinejoin:"round"}),n.createElement("g",{id:"SVGRepo_iconCarrier"},n.createElement("g",null,n.createElement("path",{d:"M260.727,115.941l-97.891,53.473V57.89c0-4.971-4.029-9-9-9c-74.823,0-135.695,60.873-135.695,135.695 s60.873,135.696,135.695,135.696s135.696-60.873,135.696-135.696c0-22.735-5.739-45.234-16.596-65.067 C270.551,115.161,265.087,113.561,260.727,115.941z M153.836,302.281c-64.897,0-117.695-52.798-117.695-117.696 c0-61.871,47.984-112.745,108.695-117.354v117.354c0,3.177,1.675,6.119,4.408,7.741c2.733,1.622,6.119,1.682,8.906,0.158 l103.007-56.267c6.807,15.117,10.375,31.667,10.375,48.369C271.531,249.482,218.733,302.281,153.836,302.281z"}),n.createElement("path",{d:"M301.035,70.59c-23.221-42.42-67.63-69.468-115.896-70.588c-4.974-0.1-9.089,3.817-9.207,8.785l-2.995,126.658 c-0.076,3.215,1.569,6.226,4.314,7.898c1.436,0.875,3.058,1.314,4.684,1.314c1.482,0,2.968-0.366,4.314-1.102L297.455,82.81 c2.096-1.145,3.651-3.076,4.322-5.368C302.449,75.15,302.182,72.685,301.035,70.59z M191.3,120.286l2.406-101.733 c35.355,3.565,67.468,23.126,86.91,52.944L191.3,120.286z"})))),f={AddClusterInfo:cluster_attr_default,RenameAttribute:rename_attr_default,DeleteAttribute:delete_attr_default,ErrorSampler:error_sampler_default,PiiMasking:pii_masking_default,LatencySampler:latency_sampler_default,ProbabilisticSampler:probabilistic_sampler_default},x="https://d1n7d4xz7fr8b4.cloudfront.net/",E={java:`${x}java.png`,go:`${x}go.png`,javascript:`${x}nodejs.png`,python:`${x}python.png`,dotnet:`${x}dotnet.png`,default:`${x}default.png`,mysql:`${x}mysql.png`,unknown:`${x}default.svg`,processing:`${x}default.svg`,"no containers":`${x}default.svg`,"no running pods":`${x}default.svg`,nginx:`${x}nginx.svg`,postgres:`${x}postgres.svg`},logs_grey_default=e=>n.createElement("svg",{width:16,height:16,viewBox:"0 0 16 16",fill:"none",xmlns:"http://www.w3.org/2000/svg",...e},n.createElement("path",{d:"M2 4C2 3.86739 2.05268 3.74021 2.14645 3.64645C2.24021 3.55268 2.36739 3.5 2.5 3.5H13.5C13.6326 3.5 13.7598 3.55268 13.8536 3.64645C13.9473 3.74021 14 3.86739 14 4C14 4.13261 13.9473 4.25979 13.8536 4.35355C13.7598 4.44732 13.6326 4.5 13.5 4.5H2.5C2.36739 4.5 2.24021 4.44732 2.14645 4.35355C2.05268 4.25979 2 4.13261 2 4ZM2.5 7H10.5C10.6326 7 10.7598 6.94732 10.8536 6.85355C10.9473 6.75979 11 6.63261 11 6.5C11 6.36739 10.9473 6.24021 10.8536 6.14645C10.7598 6.05268 10.6326 6 10.5 6H2.5C2.36739 6 2.24021 6.05268 2.14645 6.14645C2.05268 6.24021 2 6.36739 2 6.5C2 6.63261 2.05268 6.75979 2.14645 6.85355C2.24021 6.94732 2.36739 7 2.5 7ZM13.5 8.5H2.5C2.36739 8.5 2.24021 8.55268 2.14645 8.64645C2.05268 8.74021 2 8.86739 2 9C2 9.13261 2.05268 9.25979 2.14645 9.35355C2.24021 9.44732 2.36739 9.5 2.5 9.5H13.5C13.6326 9.5 13.7598 9.44732 13.8536 9.35355C13.9473 9.25979 14 9.13261 14 9C14 8.86739 13.9473 8.74021 13.8536 8.64645C13.7598 8.55268 13.6326 8.5 13.5 8.5ZM10.5 11H2.5C2.36739 11 2.24021 11.0527 2.14645 11.1464C2.05268 11.2402 2 11.3674 2 11.5C2 11.6326 2.05268 11.7598 2.14645 11.8536C2.24021 11.9473 2.36739 12 2.5 12H10.5C10.6326 12 10.7598 11.9473 10.8536 11.8536C10.9473 11.7598 11 11.6326 11 11.5C11 11.3674 10.9473 11.2402 10.8536 11.1464C10.7598 11.0527 10.6326 11 10.5 11Z",fill:"#8B92A5"})),logs_blue_default=e=>n.createElement("svg",{width:16,height:16,viewBox:"0 0 16 16",fill:"none",xmlns:"http://www.w3.org/2000/svg",...e},n.createElement("path",{d:"M2 4C2 3.86739 2.05268 3.74021 2.14645 3.64645C2.24021 3.55268 2.36739 3.5 2.5 3.5H13.5C13.6326 3.5 13.7598 3.55268 13.8536 3.64645C13.9473 3.74021 14 3.86739 14 4C14 4.13261 13.9473 4.25979 13.8536 4.35355C13.7598 4.44732 13.6326 4.5 13.5 4.5H2.5C2.36739 4.5 2.24021 4.44732 2.14645 4.35355C2.05268 4.25979 2 4.13261 2 4ZM2.5 7H10.5C10.6326 7 10.7598 6.94732 10.8536 6.85355C10.9473 6.75979 11 6.63261 11 6.5C11 6.36739 10.9473 6.24021 10.8536 6.14645C10.7598 6.05268 10.6326 6 10.5 6H2.5C2.36739 6 2.24021 6.05268 2.14645 6.14645C2.05268 6.24021 2 6.36739 2 6.5C2 6.63261 2.05268 6.75979 2.14645 6.85355C2.24021 6.94732 2.36739 7 2.5 7ZM13.5 8.5H2.5C2.36739 8.5 2.24021 8.55268 2.14645 8.64645C2.05268 8.74021 2 8.86739 2 9C2 9.13261 2.05268 9.25979 2.14645 9.35355C2.24021 9.44732 2.36739 9.5 2.5 9.5H13.5C13.6326 9.5 13.7598 9.44732 13.8536 9.35355C13.9473 9.25979 14 9.13261 14 9C14 8.86739 13.9473 8.74021 13.8536 8.64645C13.7598 8.55268 13.6326 8.5 13.5 8.5ZM10.5 11H2.5C2.36739 11 2.24021 11.0527 2.14645 11.1464C2.05268 11.2402 2 11.3674 2 11.5C2 11.6326 2.05268 11.7598 2.14645 11.8536C2.24021 11.9473 2.36739 12 2.5 12H10.5C10.6326 12 10.7598 11.9473 10.8536 11.8536C10.9473 11.7598 11 11.6326 11 11.5C11 11.3674 10.9473 11.2402 10.8536 11.1464C10.7598 11.0527 10.6326 11 10.5 11Z",fill:"#96F2FF"})),chart_line_grey_default=e=>n.createElement("svg",{width:16,height:16,viewBox:"0 0 16 16",fill:"none",xmlns:"http://www.w3.org/2000/svg",...e},n.createElement("path",{d:"M14.5 13C14.5 13.1326 14.4473 13.2598 14.3536 13.3536C14.2598 13.4473 14.1326 13.5 14 13.5H2C1.86739 13.5 1.74021 13.4473 1.64645 13.3536C1.55268 13.2598 1.5 13.1326 1.5 13V3C1.5 2.86739 1.55268 2.74021 1.64645 2.64645C1.74021 2.55268 1.86739 2.5 2 2.5C2.13261 2.5 2.25979 2.55268 2.35355 2.64645C2.44732 2.74021 2.5 2.86739 2.5 3V8.89812L5.67063 6.125C5.7569 6.04947 5.86652 6.0059 5.9811 6.00157C6.09569 5.99725 6.20828 6.03244 6.3 6.10125L9.97563 8.85812L13.6706 5.625C13.7191 5.57704 13.7768 5.5395 13.8403 5.51467C13.9038 5.48985 13.9717 5.47827 14.0398 5.48065C14.1079 5.48303 14.1749 5.49931 14.2365 5.5285C14.2981 5.55769 14.3531 5.59917 14.398 5.65038C14.443 5.7016 14.4771 5.76148 14.4981 5.82633C14.5191 5.89119 14.5266 5.95965 14.5201 6.02752C14.5137 6.09538 14.4935 6.16122 14.4607 6.22097C14.4279 6.28073 14.3832 6.33314 14.3294 6.375L10.3294 9.875C10.2431 9.95053 10.1335 9.9941 10.0189 9.99843C9.90431 10.0028 9.79172 9.96756 9.7 9.89875L6.02437 7.14313L2.5 10.2269V12.5H14C14.1326 12.5 14.2598 12.5527 14.3536 12.6464C14.4473 12.7402 14.5 12.8674 14.5 13Z",fill:"#8B92A5"})),chart_line_blue_default=e=>n.createElement("svg",{width:16,height:16,viewBox:"0 0 16 16",fill:"none",xmlns:"http://www.w3.org/2000/svg",...e},n.createElement("path",{d:"M14.5 13C14.5 13.1326 14.4473 13.2598 14.3536 13.3536C14.2598 13.4473 14.1326 13.5 14 13.5H2C1.86739 13.5 1.74021 13.4473 1.64645 13.3536C1.55268 13.2598 1.5 13.1326 1.5 13V3C1.5 2.86739 1.55268 2.74021 1.64645 2.64645C1.74021 2.55268 1.86739 2.5 2 2.5C2.13261 2.5 2.25979 2.55268 2.35355 2.64645C2.44732 2.74021 2.5 2.86739 2.5 3V8.89812L5.67063 6.125C5.7569 6.04947 5.86652 6.0059 5.9811 6.00157C6.09569 5.99725 6.20828 6.03244 6.3 6.10125L9.97563 8.85812L13.6706 5.625C13.7191 5.57704 13.7768 5.5395 13.8403 5.51467C13.9038 5.48985 13.9717 5.47827 14.0398 5.48065C14.1079 5.48303 14.1749 5.49931 14.2365 5.5285C14.2981 5.55769 14.3531 5.59917 14.398 5.65038C14.443 5.7016 14.4771 5.76148 14.4981 5.82633C14.5191 5.89119 14.5266 5.95965 14.5201 6.02752C14.5137 6.09538 14.4935 6.16122 14.4607 6.22097C14.4279 6.28073 14.3832 6.33314 14.3294 6.375L10.3294 9.875C10.2431 9.95053 10.1335 9.9941 10.0189 9.99843C9.90431 10.0028 9.79172 9.96756 9.7 9.89875L6.02437 7.14313L2.5 10.2269V12.5H14C14.1326 12.5 14.2598 12.5527 14.3536 12.6464C14.4473 12.7402 14.5 12.8674 14.5 13Z",fill:"#96F2FF"})),tree_structure_grey_default=e=>n.createElement("svg",{width:16,height:16,viewBox:"0 0 16 16",fill:"none",xmlns:"http://www.w3.org/2000/svg",...e},n.createElement("path",{d:"M10.5 7H13.5C13.7652 7 14.0196 6.89464 14.2071 6.70711C14.3946 6.51957 14.5 6.26522 14.5 6V3C14.5 2.73478 14.3946 2.48043 14.2071 2.29289C14.0196 2.10536 13.7652 2 13.5 2H10.5C10.2348 2 9.98043 2.10536 9.79289 2.29289C9.60536 2.48043 9.5 2.73478 9.5 3V4H9C8.46957 4 7.96086 4.21071 7.58579 4.58579C7.21071 4.96086 7 5.46957 7 6V7.5H5V7C5 6.73478 4.89464 6.48043 4.70711 6.29289C4.51957 6.10536 4.26522 6 4 6H2C1.73478 6 1.48043 6.10536 1.29289 6.29289C1.10536 6.48043 1 6.73478 1 7V9C1 9.26522 1.10536 9.51957 1.29289 9.70711C1.48043 9.89464 1.73478 10 2 10H4C4.26522 10 4.51957 9.89464 4.70711 9.70711C4.89464 9.51957 5 9.26522 5 9V8.5H7V10C7 10.5304 7.21071 11.0391 7.58579 11.4142C7.96086 11.7893 8.46957 12 9 12H9.5V13C9.5 13.2652 9.60536 13.5196 9.79289 13.7071C9.98043 13.8946 10.2348 14 10.5 14H13.5C13.7652 14 14.0196 13.8946 14.2071 13.7071C14.3946 13.5196 14.5 13.2652 14.5 13V10C14.5 9.73478 14.3946 9.48043 14.2071 9.29289C14.0196 9.10536 13.7652 9 13.5 9H10.5C10.2348 9 9.98043 9.10536 9.79289 9.29289C9.60536 9.48043 9.5 9.73478 9.5 10V11H9C8.73478 11 8.48043 10.8946 8.29289 10.7071C8.10536 10.5196 8 10.2652 8 10V6C8 5.73478 8.10536 5.48043 8.29289 5.29289C8.48043 5.10536 8.73478 5 9 5H9.5V6C9.5 6.26522 9.60536 6.51957 9.79289 6.70711C9.98043 6.89464 10.2348 7 10.5 7ZM4 9H2V7H4V9ZM10.5 10H13.5V13H10.5V10ZM10.5 3H13.5V6H10.5V3Z",fill:"#8B92A5"})),tree_structure_blue_default=e=>n.createElement("svg",{width:16,height:16,viewBox:"0 0 16 16",fill:"none",xmlns:"http://www.w3.org/2000/svg",...e},n.createElement("path",{d:"M10.5 7H13.5C13.7652 7 14.0196 6.89464 14.2071 6.70711C14.3946 6.51957 14.5 6.26522 14.5 6V3C14.5 2.73478 14.3946 2.48043 14.2071 2.29289C14.0196 2.10536 13.7652 2 13.5 2H10.5C10.2348 2 9.98043 2.10536 9.79289 2.29289C9.60536 2.48043 9.5 2.73478 9.5 3V4H9C8.46957 4 7.96086 4.21071 7.58579 4.58579C7.21071 4.96086 7 5.46957 7 6V7.5H5V7C5 6.73478 4.89464 6.48043 4.70711 6.29289C4.51957 6.10536 4.26522 6 4 6H2C1.73478 6 1.48043 6.10536 1.29289 6.29289C1.10536 6.48043 1 6.73478 1 7V9C1 9.26522 1.10536 9.51957 1.29289 9.70711C1.48043 9.89464 1.73478 10 2 10H4C4.26522 10 4.51957 9.89464 4.70711 9.70711C4.89464 9.51957 5 9.26522 5 9V8.5H7V10C7 10.5304 7.21071 11.0391 7.58579 11.4142C7.96086 11.7893 8.46957 12 9 12H9.5V13C9.5 13.2652 9.60536 13.5196 9.79289 13.7071C9.98043 13.8946 10.2348 14 10.5 14H13.5C13.7652 14 14.0196 13.8946 14.2071 13.7071C14.3946 13.5196 14.5 13.2652 14.5 13V10C14.5 9.73478 14.3946 9.48043 14.2071 9.29289C14.0196 9.10536 13.7652 9 13.5 9H10.5C10.2348 9 9.98043 9.10536 9.79289 9.29289C9.60536 9.48043 9.5 9.73478 9.5 10V11H9C8.73478 11 8.48043 10.8946 8.29289 10.7071C8.10536 10.5196 8 10.2652 8 10V6C8 5.73478 8.10536 5.48043 8.29289 5.29289C8.48043 5.10536 8.73478 5 9 5H9.5V6C9.5 6.26522 9.60536 6.51957 9.79289 6.70711C9.98043 6.89464 10.2348 7 10.5 7ZM4 9H2V7H4V9ZM10.5 10H13.5V13H10.5V10ZM10.5 3H13.5V6H10.5V3Z",fill:"#96F2FF"})),arrow_right_default=e=>n.createElement("svg",{width:32,height:32,viewBox:"0 0 32 32",fill:"none",xmlns:"http://www.w3.org/2000/svg",...e},n.createElement("path",{d:"M27.7075 16.7076L18.7075 25.7076C18.5199 25.8952 18.2654 26.0006 18 26.0006C17.7346 26.0006 17.4801 25.8952 17.2925 25.7076C17.1049 25.5199 16.9994 25.2654 16.9994 25.0001C16.9994 24.7347 17.1049 24.4802 17.2925 24.2926L24.5863 17.0001H5C4.73478 17.0001 4.48043 16.8947 4.29289 16.7072C4.10536 16.5196 4 16.2653 4 16.0001C4 15.7349 4.10536 15.4805 4.29289 15.293C4.48043 15.1054 4.73478 15.0001 5 15.0001H24.5863L17.2925 7.70757C17.1049 7.51993 16.9994 7.26543 16.9994 7.00007C16.9994 6.7347 17.1049 6.48021 17.2925 6.29257C17.4801 6.10493 17.7346 5.99951 18 5.99951C18.2654 5.99951 18.5199 6.10493 18.7075 6.29257L27.7075 15.2926C27.8005 15.3854 27.8742 15.4957 27.9246 15.6171C27.9749 15.7385 28.0008 15.8687 28.0008 16.0001C28.0008 16.1315 27.9749 16.2616 27.9246 16.383C27.8742 16.5044 27.8005 16.6147 27.7075 16.7076Z",fill:"#0A1824"})),charge_rect_default=e=>n.createElement("svg",{width:48,height:48,viewBox:"0 0 48 48",fill:"none",xmlns:"http://www.w3.org/2000/svg",...e},n.createElement("rect",{width:48,height:48,rx:7.5,fill:"url(#paint0_linear_48_4503)"}),n.createElement("rect",{width:48,height:48,rx:7.5,fill:"url(#paint1_radial_48_4503)",fillOpacity:.4}),n.createElement("rect",{x:.375,y:.375,width:47.25,height:47.25,rx:7.125,stroke:"url(#paint2_linear_48_4503)",strokeOpacity:.5,strokeWidth:.75}),n.createElement("path",{d:"M34.6033 19.3484L31.1561 22.7946L33.8004 25.4379C33.875 25.5125 33.9342 25.6011 33.9746 25.6985C34.0149 25.796 34.0357 25.9005 34.0357 26.006C34.0357 26.1114 34.0149 26.2159 33.9746 26.3134C33.9342 26.4108 33.875 26.4994 33.8004 26.574C33.7259 26.6486 33.6373 26.7077 33.5398 26.7481C33.4424 26.7885 33.3379 26.8092 33.2324 26.8092C33.1269 26.8092 33.0225 26.7885 32.925 26.7481C32.8276 26.7077 32.739 26.6486 32.6644 26.574L32.0282 25.9367L26.7094 31.2555C26.3367 31.6283 25.8941 31.924 25.4071 32.1257C24.9201 32.3274 24.3981 32.4313 23.8709 32.4313C23.3437 32.4313 22.8217 32.3274 22.3347 32.1257C21.8476 31.924 21.4051 31.6283 21.0324 31.2555L19.4588 29.6759L14.5324 34.6023C14.4578 34.6769 14.3693 34.7361 14.2718 34.7764C14.1744 34.8168 14.0699 34.8376 13.9644 34.8376C13.8589 34.8376 13.7545 34.8168 13.657 34.7764C13.5596 34.7361 13.471 34.6769 13.3964 34.6023C13.3218 34.5277 13.2626 34.4392 13.2223 34.3417C13.1819 34.2442 13.1611 34.1398 13.1611 34.0343C13.1611 33.9288 13.1819 33.8244 13.2223 33.7269C13.2626 33.6294 13.3218 33.5409 13.3964 33.4663L18.3228 28.5399L16.7462 26.9633C16.3735 26.5906 16.0778 26.1481 15.876 25.661C15.6743 25.174 15.5704 24.652 15.5704 24.1248C15.5704 23.5976 15.6743 23.0756 15.876 22.5886C16.0778 22.1016 16.3735 21.659 16.7462 21.2863L22.065 15.9675L21.4278 15.3313C21.2771 15.1806 21.1925 14.9763 21.1925 14.7633C21.1925 14.5502 21.2771 14.3459 21.4278 14.1953C21.5784 14.0446 21.7827 13.96 21.9958 13.96C22.2088 13.96 22.4131 14.0446 22.5638 14.1953L25.2041 16.8426L28.6503 13.3954C28.8009 13.2448 29.0052 13.1602 29.2183 13.1602C29.4313 13.1602 29.6356 13.2448 29.7863 13.3954C29.9369 13.5461 30.0215 13.7504 30.0215 13.9634C30.0215 14.1765 29.9369 14.3808 29.7863 14.5314L26.3391 17.9776L30.0211 21.6596L33.4673 18.2124C33.6179 18.0618 33.8222 17.9772 34.0353 17.9772C34.2483 17.9772 34.4526 18.0618 34.6033 18.2124C34.7539 18.3631 34.8386 18.5674 34.8386 18.7804C34.8386 18.9935 34.7539 19.1978 34.6033 19.3484Z",fill:"#96F2FF"}),n.createElement("defs",null,n.createElement("linearGradient",{id:"paint0_linear_48_4503",x1:24,y1:0,x2:24,y2:48,gradientUnits:"userSpaceOnUse"},n.createElement("stop",{stopColor:"#2E4C55"}),n.createElement("stop",{offset:1,stopColor:"#303355"})),n.createElement("radialGradient",{id:"paint1_radial_48_4503",cx:0,cy:0,r:1,gradientUnits:"userSpaceOnUse",gradientTransform:"translate(48 -1.78814e-06) rotate(120.009) scale(34.6442 37.2185)"},n.createElement("stop",{stopColor:"#96F2FF"}),n.createElement("stop",{offset:.619146,stopColor:"#96F2FF",stopOpacity:0})),n.createElement("linearGradient",{id:"paint2_linear_48_4503",x1:24,y1:0,x2:24,y2:48,gradientUnits:"userSpaceOnUse"},n.createElement("stop",{stopColor:"#96F2FF"}),n.createElement("stop",{offset:1,stopColor:"#96F2FF",stopOpacity:0})))),connect_default=e=>n.createElement("svg",{width:48,height:48,viewBox:"0 0 48 48",fill:"none",xmlns:"http://www.w3.org/2000/svg",...e},n.createElement("rect",{width:48,height:48,rx:7.5,fill:"url(#paint0_linear_48_6367)"}),n.createElement("rect",{width:48,height:48,rx:7.5,fill:"url(#paint1_radial_48_6367)",fillOpacity:.4}),n.createElement("rect",{x:.375,y:.375,width:47.25,height:47.25,rx:7.125,stroke:"url(#paint2_linear_48_6367)",strokeOpacity:.5,strokeWidth:.75}),n.createElement("path",{d:"M35.5352 22.3778L25.6222 12.4648C25.4748 12.3175 25.2999 12.2006 25.1073 12.1208C24.9148 12.0411 24.7084 12 24.5 12C24.2916 12 24.0852 12.0411 23.8927 12.1208C23.7001 12.2006 23.5252 12.3175 23.3778 12.4648L13.4648 22.3778C13.3175 22.5252 13.2006 22.7001 13.1208 22.8927C13.0411 23.0852 13 23.2916 13 23.5C13 23.7084 13.0411 23.9148 13.1208 24.1073C13.2006 24.2999 13.3175 24.4748 13.4648 24.6222L23.3778 34.5352C23.5252 34.6825 23.7001 34.7994 23.8927 34.8792C24.0852 34.9589 24.2916 35 24.5 35C24.7084 35 24.9148 34.9589 25.1073 34.8792C25.2999 34.7994 25.4748 34.6825 25.6222 34.5352L35.5352 24.6222C35.6825 24.4748 35.7994 24.2999 35.8792 24.1073C35.9589 23.9148 36 23.7084 36 23.5C36 23.2916 35.9589 23.0852 35.8792 22.8927C35.7994 22.7001 35.6825 22.5252 35.5352 22.3778ZM28.8757 23.2758L26.5757 25.5757C26.4319 25.7196 26.2368 25.8004 26.0333 25.8004C25.8299 25.8004 25.6348 25.7196 25.4909 25.5757C25.3471 25.4319 25.2662 25.2368 25.2662 25.0333C25.2662 24.8299 25.3471 24.6348 25.4909 24.4909L26.4828 23.5H22.9667C22.56 23.5 22.17 23.6615 21.8825 23.9491C21.5949 24.2367 21.4333 24.6267 21.4333 25.0333V25.8C21.4333 26.0033 21.3526 26.1983 21.2088 26.3421C21.065 26.4859 20.87 26.5667 20.6667 26.5667C20.4634 26.5667 20.2684 26.4859 20.1246 26.3421C19.9808 26.1983 19.9 26.0033 19.9 25.8V25.0333C19.9 24.22 20.2231 23.44 20.7982 22.8649C21.3733 22.2898 22.1533 21.9667 22.9667 21.9667H26.4828L25.4909 20.9758C25.3471 20.8319 25.2662 20.6368 25.2662 20.4333C25.2662 20.2299 25.3471 20.0348 25.4909 19.8909C25.6348 19.7471 25.8299 19.6663 26.0333 19.6663C26.2368 19.6663 26.4319 19.7471 26.5757 19.8909L28.8757 22.1909C28.947 22.2621 29.0036 22.3467 29.0421 22.4398C29.0807 22.5328 29.1006 22.6326 29.1006 22.7333C29.1006 22.8341 29.0807 22.9339 29.0421 23.0269C29.0036 23.12 28.947 23.2045 28.8757 23.2758Z",fill:"#96F2FF"}),n.createElement("defs",null,n.createElement("linearGradient",{id:"paint0_linear_48_6367",x1:24,y1:0,x2:24,y2:48,gradientUnits:"userSpaceOnUse"},n.createElement("stop",{stopColor:"#2E4C55"}),n.createElement("stop",{offset:1,stopColor:"#303355"})),n.createElement("radialGradient",{id:"paint1_radial_48_6367",cx:0,cy:0,r:1,gradientUnits:"userSpaceOnUse",gradientTransform:"translate(48 -1.78814e-06) rotate(120.009) scale(34.6442 37.2185)"},n.createElement("stop",{stopColor:"#96F2FF"}),n.createElement("stop",{offset:.619146,stopColor:"#96F2FF",stopOpacity:0})),n.createElement("linearGradient",{id:"paint2_linear_48_6367",x1:24,y1:0,x2:24,y2:48,gradientUnits:"userSpaceOnUse"},n.createElement("stop",{stopColor:"#96F2FF"}),n.createElement("stop",{offset:1,stopColor:"#96F2FF",stopOpacity:0})))),white_arrow_right_default=e=>n.createElement("svg",{width:24,height:24,viewBox:"0 0 24 24",fill:"none",xmlns:"http://www.w3.org/2000/svg",...e},n.createElement("path",{d:"M3.21986 11.4694L9.96986 4.71944C10.1106 4.57871 10.3015 4.49965 10.5005 4.49965C10.6995 4.49965 10.8904 4.57871 11.0311 4.71944C11.1718 4.86017 11.2509 5.05105 11.2509 5.25007C11.2509 5.44909 11.1718 5.63996 11.0311 5.7807L5.5608 11.2501L20.2505 11.2501C20.4494 11.2501 20.6402 11.3291 20.7808 11.4697C20.9215 11.6104 21.0005 11.8012 21.0005 12.0001C21.0005 12.199 20.9215 12.3897 20.7808 12.5304C20.6402 12.6711 20.4494 12.7501 20.2505 12.7501L5.5608 12.7501L11.0311 18.2194C11.1718 18.3602 11.2509 18.551 11.2509 18.7501C11.2509 18.9491 11.1718 19.14 11.0311 19.2807C10.8904 19.4214 10.6995 19.5005 10.5005 19.5005C10.3015 19.5005 10.1106 19.4214 9.96986 19.2807L3.21986 12.5307C3.15013 12.461 3.09481 12.3783 3.05707 12.2873C3.01933 12.1962 2.9999 12.0986 2.9999 12.0001C2.9999 11.9015 3.01933 11.8039 3.05707 11.7129C3.09481 11.6218 3.15013 11.5391 3.21986 11.4694Z",fill:"white"})),link_default=e=>n.createElement("svg",{width:24,height:25,viewBox:"0 0 24 25",fill:"none",xmlns:"http://www.w3.org/2000/svg",...e},n.createElement("g",{filter:"url(#filter0_d_48_6611)"},n.createElement("path",{d:"M18 6.92102C18 7.05363 17.9473 7.18081 17.8536 7.27457C17.7598 7.36834 17.6326 7.42102 17.5 7.42102C17.3674 7.42102 17.2402 7.36834 17.1464 7.27457C17.0527 7.18081 17 7.05363 17 6.92102V4.12852L12.8544 8.27477C12.7606 8.36859 12.6333 8.4213 12.5006 8.4213C12.3679 8.4213 12.2407 8.36859 12.1469 8.27477C12.0531 8.18095 12.0003 8.0537 12.0003 7.92102C12.0003 7.78834 12.0531 7.66109 12.1469 7.56727L16.2925 3.42102H13.5C13.3674 3.42102 13.2402 3.36834 13.1464 3.27457C13.0527 3.18081 13 3.05363 13 2.92102C13 2.78841 13.0527 2.66124 13.1464 2.56747C13.2402 2.4737 13.3674 2.42102 13.5 2.42102H17.5C17.6326 2.42102 17.7598 2.4737 17.8536 2.56747C17.9473 2.66124 18 2.78841 18 2.92102V6.92102ZM15.5 8.42102C15.3674 8.42102 15.2402 8.4737 15.1464 8.56747C15.0527 8.66123 15 8.78841 15 8.92102V13.421H7V5.42102H11.5C11.6326 5.42102 11.7598 5.36834 11.8536 5.27457C11.9473 5.18081 12 5.05363 12 4.92102C12 4.78841 11.9473 4.66124 11.8536 4.56747C11.7598 4.4737 11.6326 4.42102 11.5 4.42102H7C6.73478 4.42102 6.48043 4.52638 6.29289 4.71391C6.10536 4.90145 6 5.1558 6 5.42102V13.421C6 13.6862 6.10536 13.9406 6.29289 14.1281C6.48043 14.3157 6.73478 14.421 7 14.421H15C15.2652 14.421 15.5196 14.3157 15.7071 14.1281C15.8946 13.9406 16 13.6862 16 13.421V8.92102C16 8.78841 15.9473 8.66123 15.8536 8.56747C15.7598 8.4737 15.6326 8.42102 15.5 8.42102Z",fill:"#96F2FF"})),n.createElement("defs",null,n.createElement("filter",{id:"filter0_d_48_6611",x:0,y:.421021,width:24,height:24,filterUnits:"userSpaceOnUse",colorInterpolationFilters:"sRGB"},n.createElement("feFlood",{floodOpacity:0,result:"BackgroundImageFix"}),n.createElement("feColorMatrix",{in:"SourceAlpha",type:"matrix",values:"0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 127 0",result:"hardAlpha"}),n.createElement("feOffset",{dy:4}),n.createElement("feGaussianBlur",{stdDeviation:2}),n.createElement("feComposite",{in2:"hardAlpha",operator:"out"}),n.createElement("feColorMatrix",{type:"matrix",values:"0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0.25 0"}),n.createElement("feBlend",{mode:"normal",in2:"BackgroundImageFix",result:"effect1_dropShadow_48_6611"}),n.createElement("feBlend",{mode:"normal",in:"SourceGraphic",in2:"effect1_dropShadow_48_6611",result:"shape"})))),green_check_default=e=>n.createElement("svg",{height:16,viewBox:"0 0 16 16",width:16,className:"octicon octicon-check v-align-middle",...e},n.createElement("path",{fill:"green",d:"M13.78 4.22a.75.75 0 0 1 0 1.06l-7.25 7.25a.75.75 0 0 1-1.06 0L2.22 9.28a.751.751 0 0 1 .018-1.042.751.751 0 0 1 1.042-.018L6 10.94l6.72-6.72a.75.75 0 0 1 1.06 0Z"})),red_error_default=e=>n.createElement("svg",{fill:"#f85249",height:16,viewBox:"0 0 16 16",width:16,className:"octicon octicon-check v-align-middle",...e},n.createElement("path",{className:"icon-path",d:"M11.383 13.644A1.03 1.03 0 0 1 9.928 15.1L6 11.172 2.072 15.1a1.03 1.03 0 1 1-1.455-1.456l3.928-3.928L.617 5.79a1.03 1.03 0 1 1 1.455-1.456L6 8.261l3.928-3.928a1.03 1.03 0 0 1 1.455 1.456L7.455 9.716z"})),blue_info_default=e=>n.createElement("svg",{viewBox:"0 0 24 24",fill:"none",xmlns:"http://www.w3.org/2000/svg",...e},n.createElement("g",{id:"SVGRepo_bgCarrier",strokeWidth:0}),n.createElement("g",{id:"SVGRepo_tracerCarrier",strokeLinecap:"round",strokeLinejoin:"round"}),n.createElement("g",{id:"SVGRepo_iconCarrier"},n.createElement("path",{d:"M12 7.01002L12 7.00003M12 17L12 10",stroke:"#2196F3",strokeWidth:1.5,strokeLinecap:"round",strokeLinejoin:"round"}))),bell_default=e=>n.createElement("svg",{viewBox:"0 0 24 24",fill:"none",xmlns:"http://www.w3.org/2000/svg",...e},n.createElement("g",{id:"SVGRepo_bgCarrier",strokeWidth:0}),n.createElement("g",{id:"SVGRepo_tracerCarrier",strokeLinecap:"round",strokeLinejoin:"round"}),n.createElement("g",{id:"SVGRepo_iconCarrier"},n.createElement("path",{fillRule:"evenodd",clipRule:"evenodd",d:"M12 1.25C7.71983 1.25 4.25004 4.71979 4.25004 9V9.7041C4.25004 10.401 4.04375 11.0824 3.65717 11.6622L2.50856 13.3851C1.17547 15.3848 2.19318 18.1028 4.51177 18.7351C5.26738 18.9412 6.02937 19.1155 6.79578 19.2581L6.79768 19.2632C7.56667 21.3151 9.62198 22.75 12 22.75C14.378 22.75 16.4333 21.3151 17.2023 19.2632L17.2042 19.2581C17.9706 19.1155 18.7327 18.9412 19.4883 18.7351C21.8069 18.1028 22.8246 15.3848 21.4915 13.3851L20.3429 11.6622C19.9563 11.0824 19.75 10.401 19.75 9.7041V9C19.75 4.71979 16.2802 1.25 12 1.25ZM15.3764 19.537C13.1335 19.805 10.8664 19.8049 8.62349 19.5369C9.33444 20.5585 10.571 21.25 12 21.25C13.4289 21.25 14.6655 20.5585 15.3764 19.537ZM5.75004 9C5.75004 5.54822 8.54826 2.75 12 2.75C15.4518 2.75 18.25 5.54822 18.25 9V9.7041C18.25 10.6972 18.544 11.668 19.0948 12.4943L20.2434 14.2172C21.0086 15.3649 20.4245 16.925 19.0936 17.288C14.4494 18.5546 9.5507 18.5546 4.90644 17.288C3.57561 16.925 2.99147 15.3649 3.75664 14.2172L4.90524 12.4943C5.45609 11.668 5.75004 10.6972 5.75004 9.7041V9Z",fill:"#ffffff"}))),plus_default=e=>n.createElement("svg",{width:16,height:16,viewBox:"0 0 16 16",fill:"none",xmlns:"http://www.w3.org/2000/svg",...e},n.createElement("path",{d:"M14 8C14 8.13261 13.9473 8.25979 13.8536 8.35355C13.7598 8.44732 13.6326 8.5 13.5 8.5H8.5V13.5C8.5 13.6326 8.44732 13.7598 8.35355 13.8536C8.25979 13.9473 8.13261 14 8 14C7.86739 14 7.74021 13.9473 7.64645 13.8536C7.55268 13.7598 7.5 13.6326 7.5 13.5V8.5H2.5C2.36739 8.5 2.24021 8.44732 2.14645 8.35355C2.05268 8.25979 2 8.13261 2 8C2 7.86739 2.05268 7.74021 2.14645 7.64645C2.24021 7.55268 2.36739 7.5 2.5 7.5H7.5V2.5C7.5 2.36739 7.55268 2.24021 7.64645 2.14645C7.74021 2.05268 7.86739 2 8 2C8.13261 2 8.25979 2.05268 8.35355 2.14645C8.44732 2.24021 8.5 2.36739 8.5 2.5V7.5H13.5C13.6326 7.5 13.7598 7.55268 13.8536 7.64645C13.9473 7.74021 14 7.86739 14 8Z",fill:"#203548"})),back_default=e=>n.createElement("svg",{width:16,height:17,viewBox:"0 0 16 17",fill:"none",xmlns:"http://www.w3.org/2000/svg",...e},n.createElement("g",{clipPath:"url(#clip0_106_437)"},n.createElement("path",{d:"M10 13.5L5 8.5L10 3.5",stroke:"white",strokeLinecap:"round",strokeLinejoin:"round"})),n.createElement("defs",null,n.createElement("clipPath",{id:"clip0_106_437"},n.createElement("rect",{width:16,height:16,fill:"white",transform:"translate(0 0.5)"})))),focus_overview_default=e=>n.createElement("svg",{width:24,height:24,viewBox:"0 0 24 24",fill:"none",xmlns:"http://www.w3.org/2000/svg",...e},n.createElement("path",{d:"M22.3725 7.37097C22.0941 7.65023 21.7633 7.87169 21.399 8.0226C21.0348 8.17352 20.6443 8.25092 20.25 8.25034C20.0086 8.25021 19.7682 8.22126 19.5337 8.16409L17.0371 12.801C17.0653 12.8272 17.0934 12.8535 17.1206 12.8807C17.5173 13.2774 17.7947 13.7775 17.9215 14.324C18.0482 14.8706 18.0192 15.4417 17.8376 15.9726C17.656 16.5034 17.3292 16.9728 16.8943 17.3272C16.4594 17.6817 15.9338 17.9071 15.3773 17.9778C14.8207 18.0485 14.2554 17.9618 13.7457 17.7274C13.2359 17.493 12.8021 17.1203 12.4936 16.6518C12.185 16.1832 12.014 15.6375 12 15.0766C11.986 14.5157 12.1295 13.9622 12.4143 13.4788L10.5225 11.5869C10.0609 11.8581 9.53526 12.0008 8.99996 12.0003C8.75836 12.0005 8.51759 11.9719 8.28277 11.915L5.78621 16.55C5.81434 16.5763 5.8434 16.6025 5.87059 16.6297C6.29008 17.0493 6.57573 17.5839 6.69143 18.1658C6.80713 18.7477 6.74768 19.3509 6.5206 19.899C6.29351 20.4471 5.909 20.9156 5.41566 21.2453C4.92233 21.5749 4.34234 21.7508 3.74902 21.7508C3.15571 21.7508 2.57572 21.5749 2.08239 21.2453C1.58905 20.9156 1.20453 20.4471 0.977452 19.899C0.750369 19.3509 0.690919 18.7477 0.806619 18.1658C0.922319 17.5839 1.20797 17.0493 1.62746 16.6297C1.99247 16.2649 2.44543 16.0004 2.94255 15.8618C3.43967 15.7231 3.96415 15.7151 4.46527 15.8385L6.96184 11.2016C6.93371 11.1753 6.90559 11.1491 6.8784 11.1219C6.59975 10.8433 6.37871 10.5126 6.2279 10.1486C6.0771 9.78453 5.99948 9.39437 5.99948 9.00034C5.99948 8.60632 6.0771 8.21616 6.2279 7.85213C6.37871 7.48811 6.59975 7.15736 6.8784 6.87878C7.39453 6.3612 8.08186 6.04985 8.81131 6.00321C9.54077 5.95658 10.2622 6.17787 10.84 6.62551C11.4178 7.07316 11.8123 7.71637 11.9495 8.43434C12.0866 9.15231 11.9569 9.89563 11.5847 10.5247L13.4765 12.4166C14.1525 12.0205 14.956 11.9029 15.7171 12.0885L18.2137 7.45159C18.1856 7.42534 18.1565 7.39909 18.1293 7.3719C17.8507 7.09332 17.6297 6.76257 17.4788 6.39855C17.328 6.03453 17.2504 5.64437 17.2504 5.25034C17.2504 4.85632 17.328 4.46616 17.4788 4.10213C17.6297 3.73811 17.8507 3.40736 18.1293 3.12878C18.692 2.56611 19.4552 2.25 20.2509 2.25C21.0466 2.25 21.8098 2.56611 22.3725 3.12878C22.9351 3.69145 23.2512 4.4546 23.2512 5.25034C23.2512 6.04608 22.9351 6.80923 22.3725 7.3719V7.37097Z",fill:"#0EE6F3"})),unfocus_overview_default=e=>n.createElement("svg",{width:24,height:20,viewBox:"0 0 24 20",fill:"none",xmlns:"http://www.w3.org/2000/svg",...e},n.createElement("path",{d:"M22.3725 5.37048C22.0941 5.64974 21.7633 5.8712 21.399 6.02211C21.0348 6.17303 20.6443 6.25043 20.25 6.24985C20.0086 6.24972 19.7682 6.22077 19.5337 6.1636L17.0371 10.8005C17.0653 10.8267 17.0934 10.853 17.1206 10.8802C17.5173 11.2769 17.7947 11.777 17.9215 12.3235C18.0482 12.8701 18.0192 13.4412 17.8376 13.9721C17.656 14.503 17.3292 14.9723 16.8943 15.3267C16.4594 15.6812 15.9338 15.9066 15.3773 15.9773C14.8207 16.048 14.2554 15.9613 13.7457 15.7269C13.2359 15.4925 12.8021 15.1198 12.4936 14.6513C12.185 14.1827 12.014 13.637 12 13.0761C11.986 12.5152 12.1295 11.9617 12.4143 11.4783L10.5225 9.58642C10.0609 9.85759 9.53526 10.0003 8.99996 9.99985C8.75836 10 8.51759 9.9714 8.28277 9.91454L5.78621 14.5495C5.81434 14.5758 5.8434 14.602 5.87059 14.6292C6.29008 15.0488 6.57573 15.5834 6.69143 16.1653C6.80713 16.7472 6.74768 17.3504 6.5206 17.8985C6.29351 18.4467 5.909 18.9151 5.41566 19.2448C4.92233 19.5744 4.34234 19.7503 3.74902 19.7503C3.15571 19.7503 2.57572 19.5744 2.08239 19.2448C1.58905 18.9151 1.20453 18.4467 0.977452 17.8985C0.750369 17.3504 0.690919 16.7472 0.806619 16.1653C0.922319 15.5834 1.20797 15.0488 1.62746 14.6292C1.99247 14.2644 2.44543 13.9999 2.94255 13.8613C3.43967 13.7227 3.96415 13.7146 4.46527 13.838L6.96184 9.20111C6.93371 9.17485 6.90559 9.1486 6.8784 9.12142C6.59975 8.84283 6.37871 8.51208 6.2279 8.14806C6.0771 7.78404 5.99948 7.39388 5.99948 6.99985C5.99948 6.60583 6.0771 6.21567 6.2279 5.85165C6.37871 5.48762 6.59975 5.15688 6.8784 4.87829C7.39453 4.36071 8.08186 4.04936 8.81131 4.00273C9.54077 3.95609 10.2622 4.17738 10.84 4.62503C11.4178 5.07267 11.8123 5.71588 11.9495 6.43385C12.0866 7.15182 11.9569 7.89515 11.5847 8.52423L13.4765 10.4161C14.1525 10.02 14.956 9.90236 15.7171 10.088L18.2137 5.4511C18.1856 5.42485 18.1565 5.3986 18.1293 5.37142C17.8507 5.09283 17.6297 4.76208 17.4788 4.39806C17.328 4.03404 17.2504 3.64388 17.2504 3.24985C17.2504 2.85583 17.328 2.46567 17.4788 2.10165C17.6297 1.73762 17.8507 1.40688 18.1293 1.12829C18.692 0.565618 19.4552 0.249512 20.2509 0.249512C21.0466 0.249512 21.8098 0.565618 22.3725 1.12829C22.9351 1.69096 23.2512 2.45411 23.2512 3.24985C23.2512 4.04559 22.9351 4.80874 22.3725 5.37142V5.37048Z",fill:"#8B92A5"})),sources_focus_default=e=>n.createElement("svg",{width:24,height:24,viewBox:"0 0 24 24",fill:"none",xmlns:"http://www.w3.org/2000/svg",...e},n.createElement("path",{d:"M22.0302 7.7808L18.81 11L21.2802 13.4693C21.3499 13.539 21.4052 13.6217 21.4429 13.7128C21.4806 13.8038 21.5 13.9014 21.5 13.9999C21.5 14.0985 21.4806 14.196 21.4429 14.2871C21.4052 14.3781 21.3499 14.4608 21.2802 14.5305C21.2106 14.6002 21.1278 14.6555 21.0368 14.6932C20.9458 14.7309 20.8482 14.7503 20.7496 14.7503C20.6511 14.7503 20.5535 14.7309 20.4625 14.6932C20.3714 14.6555 20.2887 14.6002 20.219 14.5305L19.6247 13.9352L14.6561 18.9038C14.3079 19.252 13.8945 19.5282 13.4396 19.7167C12.9846 19.9052 12.497 20.0022 12.0045 20.0022C11.5121 20.0022 11.0245 19.9052 10.5695 19.7167C10.1145 19.5282 9.70113 19.252 9.35293 18.9038L7.88299 17.4282L3.28099 22.0302C3.21131 22.0999 3.12859 22.1552 3.03755 22.1929C2.94651 22.2306 2.84893 22.25 2.75039 22.25C2.65184 22.25 2.55427 22.2306 2.46323 22.1929C2.37218 22.1552 2.28946 22.0999 2.21978 22.0302C2.1501 21.9605 2.09483 21.8778 2.05712 21.7868C2.01941 21.6957 2 21.5982 2 21.4996C2 21.4011 2.01941 21.3035 2.05712 21.2125C2.09483 21.1214 2.1501 21.0387 2.21978 20.969L6.82178 16.367L5.34903 14.8943C5.0008 14.5461 4.72457 14.1327 4.53611 13.6777C4.34766 13.2227 4.25066 12.7351 4.25066 12.2427C4.25066 11.7502 4.34766 11.2626 4.53611 10.8076C4.72457 10.3526 5.0008 9.93925 5.34903 9.59104L10.3176 4.6225L9.72229 4.02815C9.58156 3.88742 9.5025 3.69656 9.5025 3.49754C9.5025 3.29853 9.58156 3.10766 9.72229 2.96694C9.86301 2.82621 10.0539 2.74716 10.2529 2.74716C10.4519 2.74716 10.6428 2.82621 10.7835 2.96694L13.25 5.43996L16.4692 2.21978C16.6099 2.07906 16.8008 2 16.9998 2C17.1988 2 17.3897 2.07906 17.5304 2.21978C17.6711 2.36051 17.7502 2.55137 17.7502 2.75039C17.7502 2.9494 17.6711 3.14026 17.5304 3.28099L14.3102 6.50023L17.7498 9.93978L20.969 6.7196C21.1097 6.57887 21.3006 6.49981 21.4996 6.49981C21.6986 6.49981 21.8895 6.57887 22.0302 6.7196C22.1709 6.86032 22.25 7.05119 22.25 7.2502C22.25 7.44922 22.1709 7.64008 22.0302 7.7808Z",fill:"#96F2FF"})),sources_unfocus_default=e=>n.createElement("svg",{width:24,height:24,viewBox:"0 0 24 24",fill:"none",xmlns:"http://www.w3.org/2000/svg",...e},n.createElement("path",{d:"M22.0302 7.7808L18.81 11L21.2802 13.4693C21.3499 13.539 21.4052 13.6217 21.4429 13.7128C21.4806 13.8038 21.5 13.9014 21.5 13.9999C21.5 14.0985 21.4806 14.196 21.4429 14.2871C21.4052 14.3781 21.3499 14.4608 21.2802 14.5305C21.2106 14.6002 21.1278 14.6555 21.0368 14.6932C20.9458 14.7309 20.8482 14.7503 20.7496 14.7503C20.6511 14.7503 20.5535 14.7309 20.4625 14.6932C20.3714 14.6555 20.2887 14.6002 20.219 14.5305L19.6247 13.9352L14.6561 18.9038C14.3079 19.252 13.8945 19.5282 13.4396 19.7167C12.9846 19.9052 12.497 20.0022 12.0045 20.0022C11.5121 20.0022 11.0245 19.9052 10.5695 19.7167C10.1145 19.5282 9.70113 19.252 9.35293 18.9038L7.88299 17.4282L3.28099 22.0302C3.21131 22.0999 3.12859 22.1552 3.03755 22.1929C2.94651 22.2306 2.84893 22.25 2.75039 22.25C2.65184 22.25 2.55427 22.2306 2.46323 22.1929C2.37218 22.1552 2.28946 22.0999 2.21978 22.0302C2.1501 21.9605 2.09483 21.8778 2.05712 21.7868C2.01941 21.6957 2 21.5982 2 21.4996C2 21.4011 2.01941 21.3035 2.05712 21.2125C2.09483 21.1214 2.1501 21.0387 2.21978 20.969L6.82178 16.367L5.34903 14.8943C5.0008 14.5461 4.72457 14.1327 4.53611 13.6777C4.34766 13.2227 4.25066 12.7351 4.25066 12.2427C4.25066 11.7502 4.34766 11.2626 4.53611 10.8076C4.72457 10.3526 5.0008 9.93925 5.34903 9.59104L10.3176 4.6225L9.72229 4.02815C9.58156 3.88742 9.5025 3.69656 9.5025 3.49754C9.5025 3.29853 9.58156 3.10766 9.72229 2.96694C9.86301 2.82621 10.0539 2.74716 10.2529 2.74716C10.4519 2.74716 10.6428 2.82621 10.7835 2.96694L13.25 5.43996L16.4692 2.21978C16.6099 2.07906 16.8008 2 16.9998 2C17.1988 2 17.3897 2.07906 17.5304 2.21978C17.6711 2.36051 17.7502 2.55137 17.7502 2.75039C17.7502 2.9494 17.6711 3.14026 17.5304 3.28099L14.3102 6.50023L17.7498 9.93978L20.969 6.7196C21.1097 6.57887 21.3006 6.49981 21.4996 6.49981C21.6986 6.49981 21.8895 6.57887 22.0302 6.7196C22.1709 6.86032 22.25 7.05119 22.25 7.2502C22.25 7.44922 22.1709 7.64008 22.0302 7.7808Z",fill:"#8B92A5"})),destinations_focus_default=e=>n.createElement("svg",{width:24,height:24,viewBox:"0 0 24 24",fill:"none",xmlns:"http://www.w3.org/2000/svg",...e},n.createElement("path",{d:"M23.0453 11.1522L13.3478 1.45474C13.2036 1.31057 13.0325 1.19621 12.8441 1.11818C12.6558 1.04016 12.4539 1 12.25 1C12.0461 1 11.8442 1.04016 11.6559 1.11818C11.4675 1.19621 11.2964 1.31057 11.1522 1.45474L1.45474 11.1522C1.31057 11.2964 1.19621 11.4675 1.11818 11.6559C1.04016 11.8442 1 12.0461 1 12.25C1 12.4539 1.04016 12.6558 1.11818 12.8441C1.19621 13.0325 1.31057 13.2036 1.45474 13.3478L11.1522 23.0453C11.2964 23.1894 11.4675 23.3038 11.6559 23.3818C11.8442 23.4598 12.0461 23.5 12.25 23.5C12.4539 23.5 12.6558 23.4598 12.8441 23.3818C13.0325 23.3038 13.2036 23.1894 13.3478 23.0453L23.0453 13.3478C23.1894 13.2036 23.3038 13.0325 23.3818 12.8441C23.4598 12.6558 23.5 12.4539 23.5 12.25C23.5 12.0461 23.4598 11.8442 23.3818 11.6559C23.3038 11.4675 23.1894 11.2964 23.0453 11.1522ZM16.5306 12.0306L14.2806 14.2806C14.1399 14.4213 13.949 14.5004 13.75 14.5004C13.551 14.5004 13.3601 14.4213 13.2194 14.2806C13.0786 14.1399 12.9996 13.949 12.9996 13.75C12.9996 13.551 13.0786 13.3601 13.2194 13.2194L14.1897 12.25H10.75C10.3522 12.25 9.97066 12.408 9.68935 12.6893C9.40805 12.9706 9.25002 13.3522 9.25002 13.75V14.5C9.25002 14.6989 9.171 14.8897 9.03035 15.0303C8.8897 15.171 8.69893 15.25 8.50002 15.25C8.30111 15.25 8.11034 15.171 7.96969 15.0303C7.82904 14.8897 7.75002 14.6989 7.75002 14.5V13.75C7.75002 12.9543 8.06609 12.1913 8.6287 11.6287C9.1913 11.0661 9.95436 10.75 10.75 10.75H14.1897L13.2194 9.78064C13.0786 9.63991 12.9996 9.44904 12.9996 9.25002C12.9996 9.05099 13.0786 8.86012 13.2194 8.71939C13.3601 8.57866 13.551 8.4996 13.75 8.4996C13.949 8.4996 14.1399 8.57866 14.2806 8.71939L16.5306 10.9694C16.6003 11.039 16.6557 11.1218 16.6934 11.2128C16.7311 11.3038 16.7506 11.4014 16.7506 11.5C16.7506 11.5986 16.7311 11.6962 16.6934 11.7872C16.6557 11.8783 16.6003 11.961 16.5306 12.0306Z",fill:"#0EE6F3"})),destinations_unfocus_default=e=>n.createElement("svg",{width:24,height:24,viewBox:"0 0 24 24",fill:"none",xmlns:"http://www.w3.org/2000/svg",...e},n.createElement("path",{d:"M23.0453 11.1522L13.3478 1.45474C13.2036 1.31057 13.0325 1.19621 12.8441 1.11818C12.6558 1.04016 12.4539 1 12.25 1C12.0461 1 11.8442 1.04016 11.6559 1.11818C11.4675 1.19621 11.2964 1.31057 11.1522 1.45474L1.45474 11.1522C1.31057 11.2964 1.19621 11.4675 1.11818 11.6559C1.04016 11.8442 1 12.0461 1 12.25C1 12.4539 1.04016 12.6558 1.11818 12.8441C1.19621 13.0325 1.31057 13.2036 1.45474 13.3478L11.1522 23.0453C11.2964 23.1894 11.4675 23.3038 11.6559 23.3818C11.8442 23.4598 12.0461 23.5 12.25 23.5C12.4539 23.5 12.6558 23.4598 12.8441 23.3818C13.0325 23.3038 13.2036 23.1894 13.3478 23.0453L23.0453 13.3478C23.1894 13.2036 23.3038 13.0325 23.3818 12.8441C23.4598 12.6558 23.5 12.4539 23.5 12.25C23.5 12.0461 23.4598 11.8442 23.3818 11.6559C23.3038 11.4675 23.1894 11.2964 23.0453 11.1522ZM16.5306 12.0306L14.2806 14.2806C14.1399 14.4213 13.949 14.5004 13.75 14.5004C13.551 14.5004 13.3601 14.4213 13.2194 14.2806C13.0786 14.1399 12.9996 13.949 12.9996 13.75C12.9996 13.551 13.0786 13.3601 13.2194 13.2194L14.1897 12.25H10.75C10.3522 12.25 9.97066 12.408 9.68935 12.6893C9.40805 12.9706 9.25002 13.3522 9.25002 13.75V14.5C9.25002 14.6989 9.171 14.8897 9.03035 15.0303C8.8897 15.171 8.69893 15.25 8.50002 15.25C8.30111 15.25 8.11034 15.171 7.96969 15.0303C7.82904 14.8897 7.75002 14.6989 7.75002 14.5V13.75C7.75002 12.9543 8.06609 12.1913 8.6287 11.6287C9.1913 11.0661 9.95436 10.75 10.75 10.75H14.1897L13.2194 9.78064C13.0786 9.63991 12.9996 9.44904 12.9996 9.25002C12.9996 9.05099 13.0786 8.86012 13.2194 8.71939C13.3601 8.57866 13.551 8.4996 13.75 8.4996C13.949 8.4996 14.1399 8.57866 14.2806 8.71939L16.5306 10.9694C16.6003 11.039 16.6557 11.1218 16.6934 11.2128C16.7311 11.3038 16.7506 11.4014 16.7506 11.5C16.7506 11.5986 16.7311 11.6962 16.6934 11.7872C16.6557 11.8783 16.6003 11.961 16.5306 12.0306Z",fill:"#8B92A5"})),transform_focus_default=e=>n.createElement("svg",{width:"24px",height:"24px",viewBox:"0 0 24 24",fill:"none",xmlns:"http://www.w3.org/2000/svg",...e},n.createElement("path",{d:"M10.25 4.00003C10.25 3.69074 10.0602 3.41317 9.77191 3.30105C9.48366 3.18892 9.15614 3.26524 8.94715 3.49324L3.44715 9.49324C3.24617 9.71248 3.19374 10.0298 3.3135 10.302C3.43327 10.5743 3.70259 10.75 4.00002 10.75H20C20.4142 10.75 20.75 10.4142 20.75 10C20.75 9.58582 20.4142 9.25003 20 9.25003L10.25 9.25003V4.00003Z",fill:"#0ce6f3"}),n.createElement("path",{d:"M13.75 20L13.75 14.75H4.00002C3.5858 14.75 3.25002 14.4142 3.25002 14C3.25002 13.5858 3.5858 13.25 4.00002 13.25L20 13.25C20.2974 13.25 20.5668 13.4258 20.6865 13.698C20.8063 13.9703 20.7539 14.2876 20.5529 14.5068L15.0529 20.5068C14.8439 20.7348 14.5164 20.8111 14.2281 20.699C13.9399 20.5869 13.75 20.3093 13.75 20Z",fill:"#0ce6f3"})),transform_unfocus_default=e=>n.createElement("svg",{width:"24px",height:"24px",viewBox:"0 0 24 24",fill:"none",xmlns:"http://www.w3.org/2000/svg",...e},n.createElement("path",{d:"M10.25 4.00003C10.25 3.69074 10.0602 3.41317 9.77191 3.30105C9.48366 3.18892 9.15614 3.26524 8.94715 3.49324L3.44715 9.49324C3.24617 9.71248 3.19374 10.0298 3.3135 10.302C3.43327 10.5743 3.70259 10.75 4.00002 10.75H20C20.4142 10.75 20.75 10.4142 20.75 10C20.75 9.58582 20.4142 9.25003 20 9.25003L10.25 9.25003V4.00003Z",fill:"#8b92a6"}),n.createElement("path",{d:"M13.75 20L13.75 14.75H4.00002C3.5858 14.75 3.25002 14.4142 3.25002 14C3.25002 13.5858 3.5858 13.25 4.00002 13.25L20 13.25C20.2974 13.25 20.5668 13.4258 20.6865 13.698C20.8063 13.9703 20.7539 14.2876 20.5529 14.5068L15.0529 20.5068C14.8439 20.7348 14.5164 20.8111 14.2281 20.699C13.9399 20.5869 13.75 20.3093 13.75 20Z",fill:"#8b92a6"}));function useOnClickOutside(e,t){(0,n.useEffect)(()=>{let listener=r=>{let n=e?.current;if(n?.contains(r?.target))return null;t(r)};return document.addEventListener("mousedown",listener),document.addEventListener("touchstart",listener),()=>{document.removeEventListener("mousedown",listener),document.removeEventListener("touchstart",listener)}},[e,t])}var w={colors:{primary:"#07111A",secondary:"#0EE6F3",torquiz_light:"#96F2FF",dark:"#07111A",data_flow_bg:"#0E1C28",light_dark:"#132330",dark_blue:"#203548",light_grey:"#CCD0D2",blue_grey:"#374A5B",white:"#fff",error:"#FD3F3F",traces:"#4CAF50",logs:"#8B4513",metrics:"#FFD700"},text:{primary:"#07111A",secondary:"#0EE6F3",white:"#fff",light_grey:"#CCD0D2",grey:"#8b92a5",dark_button:"#0A1824"},font_family:{primary:"Inter"}};l.zo.div` - border-radius: 12px; - width: 100%; - border: ${({theme:e})=>`1px solid ${e.colors.dark_blue}`}; - background: ${({theme:e})=>e.colors.dark}; - padding: 16px; - text-align: start; - gap: 10px; - position: relative; -`,l.zo.p` - font-family: 'IBM Plex Mono', monospace; - width: 90%; -`,l.zo.span` - position: absolute; - right: 16px; - top: 16px; - cursor: pointer; -`,l.zo.div` - display: flex; - flex-direction: column; - text-align: start; - gap: 6px; - width: 100%; -`;var y=l.ZP.div` - display: inline-flex; - position: relative; - height: fit-content; - flex-direction: column; - border-radius: 24px; - height: 100%; - border: ${({selected:e,theme:t,type:r})=>`1px solid ${e?t.colors.secondary:"primary"===r?t.colors.dark_blue:"#374a5b"}`}; - background: ${({theme:e,type:t})=>"primary"===t?e.colors.dark:"#0E1C28"}; - box-shadow: ${({type:e})=>"primary"===e?"none":"0px -6px 16px 0px rgba(0, 0, 0, 0.25),4px 4px 16px 0px rgba(71, 231, 241, 0.05),-4px 4px 16px 0px rgba(71, 231, 241, 0.05)"}; -`,b=(0,l.ZP)(y)` - display: flex; - flex-direction: column; - justify-content: center; - align-items: center; - height: fit-content; - gap: 16px; - padding: 24px 0px; - box-shadow: none; -`;function Card({children:e,focus:t=!1,type:r="primary",header:l,...i}){return n.createElement(y,{selected:t||void 0,type:r,...i},l&&n.createElement(b,null,l?.body?l?.body():n.createElement(n.Fragment,null,n.createElement(Text,{size:20,weight:600},l?.title),n.createElement(Text,{size:14,color:"#CCD0D2"},l?.subtitle))),e)}var _=l.ZP.div` - display: flex; - padding: 4px 8px; - align-items: flex-start; - gap: 10px; - border-radius: 10px; - width: fit-content; -`;function Tag({title:e="",color:t="#033869"}){return n.createElement(_,{style:{backgroundColor:t}},n.createElement(Text,{weight:500,size:13,color:"#CCD0D2"},e))}var v=l.ZP.div` - display: flex; - padding: 8px 14px; - align-items: flex-end; - gap: 10px; - border-radius: 16px; - border: ${({theme:e,selected:t})=>`1px solid ${t?"transparent":e.colors.dark_blue}`}; - background: ${({theme:e,selected:t})=>t?e.colors.dark_blue:"transparent"}; -`;function Tap({title:e="",tapped:t,children:r,style:l,onClick:i}){return n.createElement(v,{onClick:i,selected:t,style:{...l,cursor:i?"pointer":"auto"}},r,n.createElement(Text,{weight:400,size:14,color:t?"#CCD0D2":"#8B92A5",style:{cursor:i?"pointer":"auto"}},e))}var k=l.ZP.div` - position: relative; - z-index: 999; - width: 100%; - padding: 11px 4px; - border-radius: 8px; - cursor: pointer; - border: ${({selected:e,theme:t})=>`1px solid ${e?t.colors.white:t.colors.blue_grey}`}; - /* background: ${({theme:e})=>e.colors.dark}; */ - - .dropdown-arrow { - transform: rotate(0deg); - transition: all 0.2s ease-in-out; - } - - .dropdown-arrow.open { - transform: rotate(180deg); - } -`,L=l.ZP.div` - padding: 0 12px; - display: flex; - justify-content: space-between; - align-items: center; - color: ${({theme:e})=>e.text.white}; - font-size: 14px; - font-family: ${({theme:e})=>e.font_family.primary}, sans-serif; - font-weight: 400; -`,$=l.ZP.div` - position: relative; - z-index: 1000; - display: flex; - width: 100%; - padding: 11px 4px; - flex-direction: column; - border-radius: 8px; - border: ${({theme:e})=>`1px solid ${e.colors.blue_grey}`}; - background: ${({theme:e})=>e.colors.dark}; - margin-top: 5px; -`,H=l.ZP.div` - position: relative; - - z-index: 1000; - width: 100%; - max-height: 270px; - overflow-y: scroll; - scrollbar-width: none; - :hover { - background: ${({theme:e})=>e.colors.dark_blue}; - } -`,Z=l.ZP.div` - display: flex; - padding: 7px 12px; - justify-content: space-between; - align-items: center; - border-radius: 8px; - cursor: pointer; - p { - cursor: pointer !important; - } -`,V=l.ZP.div` - margin-bottom: 8px; - text-align: start; -`,F=l.ZP.div` - position: relative; - display: flex; - width: 340px; - padding: 9px 13px; - gap: 10px; - border-radius: 8px; - border: ${({active:e,theme:t})=>`1px solid ${e?t.colors.white:t.colors.blue_grey}`}; - background: ${({active:e,theme:t})=>`${e?t.colors.dark:t.colors.light_dark}`}; - &:hover { - border: ${({theme:e})=>`solid 1px ${e.colors.white}`}; - } -`,M=l.ZP.input` - width: 85%; - background: ${({active:e,theme:t})=>`${e?t.colors.dark:"transparent"}`}; - border: none; - outline: none; - color: ${({active:e,theme:t})=>`${e?t.colors.white:t.text.grey}`}; - font-size: 14px; - font-family: ${({theme:e})=>e.font_family.primary}, sans-serif; - font-weight: 400; - &:focus { - color: ${({theme:e})=>`solid 1px ${e.colors.white}`}; - } -`,glass_default=e=>n.createElement("svg",{width:18,height:18,viewBox:"0 0 18 18",fill:"none",xmlns:"http://www.w3.org/2000/svg",...e},n.createElement("path",{d:"M16.1479 15.3519L12.6273 11.8321C13.6477 10.6071 14.1566 9.03577 14.048 7.44512C13.9394 5.85447 13.2217 4.36692 12.0443 3.29193C10.8668 2.21693 9.32029 1.63725 7.72635 1.67348C6.13241 1.7097 4.6138 2.35904 3.48642 3.48642C2.35904 4.6138 1.7097 6.13241 1.67348 7.72635C1.63725 9.32029 2.21693 10.8668 3.29193 12.0443C4.36692 13.2217 5.85447 13.9394 7.44512 14.048C9.03577 14.1566 10.6071 13.6477 11.8321 12.6273L15.3519 16.1479C15.4042 16.2001 15.4663 16.2416 15.5345 16.2699C15.6028 16.2982 15.676 16.3127 15.7499 16.3127C15.8238 16.3127 15.897 16.2982 15.9653 16.2699C16.0336 16.2416 16.0956 16.2001 16.1479 16.1479C16.2001 16.0956 16.2416 16.0336 16.2699 15.9653C16.2982 15.897 16.3127 15.8238 16.3127 15.7499C16.3127 15.676 16.2982 15.6028 16.2699 15.5345C16.2416 15.4663 16.2001 15.4042 16.1479 15.3519ZM2.81242 7.87492C2.81242 6.87365 3.10933 5.89487 3.6656 5.06234C4.22188 4.22982 5.01253 3.58094 5.93758 3.19778C6.86263 2.81461 7.88053 2.71435 8.86256 2.90969C9.84459 3.10503 10.7466 3.58718 11.4546 4.29519C12.1626 5.00319 12.6448 5.90524 12.8401 6.88727C13.0355 7.8693 12.9352 8.8872 12.5521 9.81225C12.1689 10.7373 11.52 11.528 10.6875 12.0842C9.85497 12.6405 8.87618 12.9374 7.87492 12.9374C6.53271 12.9359 5.24591 12.4021 4.29683 11.453C3.34775 10.5039 2.81391 9.21712 2.81242 7.87492Z",fill:"#8B92A5"})),X_default=e=>n.createElement("svg",{width:16,height:16,viewBox:"0 0 16 16",fill:"none",xmlns:"http://www.w3.org/2000/svg",...e},n.createElement("path",{d:"M12.8535 12.146C12.9 12.1925 12.9368 12.2476 12.962 12.3083C12.9871 12.369 13.0001 12.4341 13.0001 12.4998C13.0001 12.5655 12.9871 12.6305 12.962 12.6912C12.9368 12.7519 12.9 12.8071 12.8535 12.8535C12.8071 12.9 12.7519 12.9368 12.6912 12.962C12.6305 12.9871 12.5655 13.0001 12.4998 13.0001C12.4341 13.0001 12.369 12.9871 12.3083 12.962C12.2476 12.9368 12.1925 12.9 12.146 12.8535L7.99979 8.70666L3.85354 12.8535C3.75972 12.9474 3.63247 13.0001 3.49979 13.0001C3.36711 13.0001 3.23986 12.9474 3.14604 12.8535C3.05222 12.7597 2.99951 12.6325 2.99951 12.4998C2.99951 12.3671 3.05222 12.2399 3.14604 12.146L7.29291 7.99979L3.14604 3.85354C3.05222 3.75972 2.99951 3.63247 2.99951 3.49979C2.99951 3.36711 3.05222 3.23986 3.14604 3.14604C3.23986 3.05222 3.36711 2.99951 3.49979 2.99951C3.63247 2.99951 3.75972 3.05222 3.85354 3.14604L7.99979 7.29291L12.146 3.14604C12.2399 3.05222 12.3671 2.99951 12.4998 2.99951C12.6325 2.99951 12.7597 3.05222 12.8535 3.14604C12.9474 3.23986 13.0001 3.36711 13.0001 3.49979C13.0001 3.63247 12.9474 3.75972 12.8535 3.85354L8.70666 7.99979L12.8535 12.146Z",fill:"white"}));function SearchInput({placeholder:e="Search",value:t="",onChange:r=()=>{},loading:l=!1,containerStyle:i={},inputStyle:a={},showClear:o=!0}){let c=t?()=>r({target:{value:""}}):()=>{};return n.createElement(F,{active:!!t||void 0,style:{...i}},n.createElement(glass_default,null),n.createElement(M,{style:{...a},value:t,active:!!t||void 0,placeholder:e,onChange:r}),o&&n.createElement("div",{onClick:c}," ",n.createElement(X_default,{style:{cursor:"pointer"}})))}var question_default=e=>n.createElement("svg",{width:14,height:14,viewBox:"0 0 14 14",fill:"none",xmlns:"http://www.w3.org/2000/svg",...e},n.createElement("path",{d:"M7.65625 9.84375C7.65625 9.97354 7.61776 10.1004 7.54565 10.2083C7.47354 10.3163 7.37105 10.4004 7.25114 10.45C7.13122 10.4997 6.99927 10.5127 6.87197 10.4874C6.74467 10.4621 6.62774 10.3996 6.53596 10.3078C6.44419 10.216 6.38168 10.0991 6.35636 9.97178C6.33104 9.84448 6.34404 9.71253 6.39371 9.59261C6.44338 9.4727 6.52749 9.37021 6.63541 9.2981C6.74333 9.22599 6.87021 9.1875 7 9.1875C7.17405 9.1875 7.34097 9.25664 7.46404 9.37971C7.58711 9.50278 7.65625 9.6697 7.65625 9.84375ZM7 3.9375C5.7936 3.9375 4.8125 4.8207 4.8125 5.90625V6.125C4.8125 6.24103 4.8586 6.35231 4.94064 6.43436C5.02269 6.51641 5.13397 6.5625 5.25 6.5625C5.36603 6.5625 5.47731 6.51641 5.55936 6.43436C5.64141 6.35231 5.6875 6.24103 5.6875 6.125V5.90625C5.6875 5.30469 6.27649 4.8125 7 4.8125C7.72352 4.8125 8.3125 5.30469 8.3125 5.90625C8.3125 6.50781 7.72352 7 7 7C6.88397 7 6.77269 7.04609 6.69064 7.12814C6.6086 7.21019 6.5625 7.32147 6.5625 7.4375V7.875C6.5625 7.99103 6.6086 8.10231 6.69064 8.18436C6.77269 8.26641 6.88397 8.3125 7 8.3125C7.11603 8.3125 7.22731 8.26641 7.30936 8.18436C7.39141 8.10231 7.4375 7.99103 7.4375 7.875V7.83562C8.435 7.65242 9.1875 6.85672 9.1875 5.90625C9.1875 4.8207 8.20641 3.9375 7 3.9375ZM12.6875 7C12.6875 8.12488 12.3539 9.2245 11.729 10.1598C11.104 11.0951 10.2158 11.8241 9.17651 12.2546C8.13726 12.685 6.99369 12.7977 5.89043 12.5782C4.78716 12.3588 3.77374 11.8171 2.97833 11.0217C2.18292 10.2263 1.64124 9.21284 1.42179 8.10958C1.20233 7.00631 1.31496 5.86274 1.74544 4.82349C2.17591 3.78423 2.90489 2.89597 3.8402 2.27102C4.7755 1.64607 5.87512 1.3125 7 1.3125C8.50793 1.31409 9.95365 1.91382 11.0199 2.98009C12.0862 4.04636 12.6859 5.49207 12.6875 7ZM11.8125 7C11.8125 6.04818 11.5303 5.11773 11.0014 4.32632C10.4726 3.53491 9.72104 2.91808 8.84167 2.55383C7.9623 2.18958 6.99466 2.09428 6.06113 2.27997C5.1276 2.46566 4.27009 2.92401 3.59705 3.59705C2.92401 4.27009 2.46566 5.12759 2.27997 6.06113C2.09428 6.99466 2.18959 7.9623 2.55383 8.84166C2.91808 9.72103 3.53491 10.4726 4.32632 11.0014C5.11773 11.5303 6.04818 11.8125 7 11.8125C8.27591 11.8111 9.49915 11.3036 10.4014 10.4014C11.3036 9.49915 11.8111 8.27591 11.8125 7Z",fill:"#96F2FF"})),S=l.ZP.div` - display: inline-flex; - align-items: center; // Align children and icon vertically - position: relative; -`,P=l.ZP.div` - margin-left: 8px; - display: flex; - align-items: center; -`,A=l.ZP.div` - visibility: ${({isVisible:e})=>e?"visible":"hidden"}; - background-color: black; - color: white; - text-align: center; - border-radius: 6px; - padding: 5px 10px; - max-width: 300px; - width: 100%; - text-align: left; - /* Position the tooltip above the icon */ - position: absolute; - z-index: 1; - bottom: 100%; - left: 50%; - transform: translateX(-0%); - margin-bottom: 5px; // Space between the tooltip and the icon - - /* Fade in animation */ - opacity: ${({isVisible:e})=>e?1:0}; - transition: opacity 0.3s; -`,Tooltip=({children:e,text:t,icon:r="?",showIcon:l=!0})=>{let[i,a]=(0,n.useState)(!1);return t?n.createElement(S,{onMouseEnter:()=>a(!0),onMouseLeave:()=>a(!1)},e,n.createElement(A,{isVisible:i},n.createElement(Text,{size:12,weight:600},t)),l&&n.createElement(P,null,n.createElement(question_default,null))):n.createElement(n.Fragment,null,e)},I={width:"90%",border:"none",background:"transparent"},T={background:"transparent"};function DropDown({data:e=[],onChange:t,width:r=260,value:l,label:i,tooltip:a,required:o,...c}){let[s,d]=(0,n.useState)(!1),[p,u]=(0,n.useState)(l||null),[C,m]=(0,n.useState)(!1),[g,h]=(0,n.useState)(""),f=(0,n.useRef)(null);(0,n.useEffect)(()=>{l&&u(l)},[l]),useOnClickOutside(f,()=>d(!1));let handleItemClick=e=>{t(e),u(e),h(""),d(!1)};return n.createElement(n.Fragment,null,i&&n.createElement(V,null,n.createElement(Tooltip,{text:a||""},n.createElement("div",{style:{display:"flex",gap:4}},n.createElement(Text,{size:14,weight:600},i),o&&n.createElement(Text,{size:14,weight:600},"*")))),n.createElement("div",{style:{height:37,width:r},ref:f},n.createElement(k,{selected:C,onMouseEnter:()=>m(!0),onMouseLeave:()=>m(!1),onClick:()=>d(!s),...c},n.createElement(L,null,p?p.label:"Select item",n.createElement(expand_arrow_default,{className:`dropdown-arrow ${s&&"open"}`}))),s&&n.createElement($,null,n.createElement(SearchInput,{value:g,onChange:e=>h(e.target.value),placeholder:"Search",containerStyle:I,inputStyle:T,showClear:!1}),n.createElement(H,null,(g?e?.filter(e=>e?.label.toLowerCase().includes(g.toLowerCase())):e).map(e=>n.createElement(Z,{key:e.id,onClick:t=>handleItemClick(e)},n.createElement(Text,null,e.label)))))))}var B=l.ZP.div` - display: flex; - align-items: center; - gap: 8px; -`,R=l.ZP.div` - position: relative; - width: 30px; - height: 16px; - background-color: ${({active:e,theme:t})=>e?t.colors.secondary:t.text.grey}; - cursor: pointer; - user-select: none; - border-radius: 20px; - padding: 2px; - display: flex; - justify-content: center; - align-items: center; -`,z=l.ZP.span` - display: flex; - justify-content: center; - align-items: center; - box-sizing: border-box; - width: 14px; - height: 14px; - cursor: pointer; - color: #fff; - background-color: ${({disabled:e,theme:t})=>e?t.text.white:t.text.light_grey}; - box-shadow: 0 2px 4px rgb(0, 0, 0, 0.25); - border-radius: 100%; - position: absolute; - transition: all 0.2s ease; - left: ${({disabled:e})=>e?18:2}px; -`;function Switch({toggle:e,handleToggleChange:t,style:r,label:l="Select All"}){return n.createElement(B,null,n.createElement(R,{active:e||void 0,onClick:t},n.createElement(z,{disabled:e||void 0})),l&&n.createElement(Text,{size:14},l))}var j=l.zo.div` - display: flex; - gap: 8px; - align-items: center; - cursor: ${({disabled:e})=>e?"not-allowed":"pointer"}; - pointer-events: ${({disabled:e})=>e?"none":"auto"}; - opacity: ${({disabled:e})=>e?"0.5":"1"}; -`,G=l.zo.span` - width: 16px; - height: 16px; - border: ${({theme:e})=>`solid 1px ${e.colors.light_grey}`}; - border-radius: 4px; -`,checkbox_rect_default=e=>n.createElement("svg",{width:18,height:18,viewBox:"0 0 18 18",fill:"none",xmlns:"http://www.w3.org/2000/svg",...e},n.createElement("rect",{x:.5,y:.5,width:17,height:17,rx:3.5,fill:"#96F2FF",stroke:"#96F2FF"}),n.createElement("path",{d:"M13.7727 6L7.39773 12.375L4.5 9.47727",stroke:"#132330",strokeWidth:2,strokeLinecap:"round",strokeLinejoin:"round"}));function Checkbox({onChange:e,value:t,label:r="",disabled:l=!1,...i}){return n.createElement(j,{disabled:l||void 0,onClick:e,...i},t?n.createElement(checkbox_rect_default,null):n.createElement(G,null),n.createElement(Text,{size:14},r))}l.ZP.div` - display: flex; - padding: 4px; - align-items: center; - gap: 4px; - border-radius: 14px; - background: ${({theme:e})=>e.colors.dark_blue}; -`;var D=l.zo.div` - cursor: pointer; - .p { - cursor: pointer !important; - } -`;function Link({value:e,onClick:t,fontSize:r=16,color:l=w.colors.secondary}){return n.createElement(D,{onClick:t},n.createElement(Text,{size:r,color:l},e))}var O=l.zo.div` - position: relative; - display: flex; - width: 100%; - padding-left: 13px; - height: 100%; - min-height: 37px; - align-items: center; - flex-direction: column; - justify-content: center; - align-items: flex-start; - gap: 10px; - border-radius: 8px; - border: ${({theme:e,error:t,active:r})=>`1px solid ${t?e.colors.error:r?e.text.grey:e.colors.blue_grey}`}; - background: ${({theme:e})=>e.colors.light_dark}; - - &:hover { - border: ${({theme:e})=>`solid 1px ${e.text.grey}`}; - } -`;l.zo.div` - position: relative; - display: flex; - width: 100%; - padding: 0px 12px; - height: 100%; - align-items: center; - justify-content: space-between; - gap: 10px; - border-radius: 4px; - border: ${({theme:e})=>`1px solid ${e.colors.secondary}`}; -`;var U=l.zo.input` - background: transparent; - border: none; - outline: none; - width: 96%; - color: ${({theme:e})=>e.text.white}; -`;(0,l.zo)(U)` - color: var(--dark-mode-white, #fff); - font-family: Inter, sans-serif; - font-size: 24px; -`;var N=l.zo.div` - margin-bottom: 8px; - text-align: start; -`,W=l.zo.div` - margin-top: 4px; -`,K=l.zo.div` - position: absolute; - right: 10px; - cursor: pointer; -`,eye_open_default=e=>n.createElement("svg",{width:"800px",height:"800px",viewBox:"0 0 24 24",fill:"none",xmlns:"http://www.w3.org/2000/svg",...e},n.createElement("g",{id:"SVGRepo_bgCarrier",strokeWidth:0}),n.createElement("g",{id:"SVGRepo_tracerCarrier",strokeLinecap:"round",strokeLinejoin:"round"}),n.createElement("g",{id:"SVGRepo_iconCarrier"},n.createElement("path",{d:"M3 14C3 9.02944 7.02944 5 12 5C16.9706 5 21 9.02944 21 14M17 14C17 16.7614 14.7614 19 12 19C9.23858 19 7 16.7614 7 14C7 11.2386 9.23858 9 12 9C14.7614 9 17 11.2386 17 14Z",stroke:"#fff",strokeWidth:2,strokeLinecap:"round",strokeLinejoin:"round"}))),eye_close_default=e=>n.createElement("svg",{width:"800px",height:"800px",viewBox:"0 0 24 24",fill:"none",xmlns:"http://www.w3.org/2000/svg",...e},n.createElement("g",{id:"SVGRepo_bgCarrier",strokeWidth:0}),n.createElement("g",{id:"SVGRepo_tracerCarrier",strokeLinecap:"round",strokeLinejoin:"round"}),n.createElement("g",{id:"SVGRepo_iconCarrier"},n.createElement("path",{d:"M9.60997 9.60714C8.05503 10.4549 7 12.1043 7 14C7 16.7614 9.23858 19 12 19C13.8966 19 15.5466 17.944 16.3941 16.3878M21 14C21 9.02944 16.9706 5 12 5C11.5582 5 11.1238 5.03184 10.699 5.09334M3 14C3 11.0069 4.46104 8.35513 6.70883 6.71886M3 3L21 21",stroke:"#fff",strokeWidth:2,strokeLinecap:"round",strokeLinejoin:"round"})));function Input({label:e,value:t,onChange:r,type:l="text",error:i="",style:a={},onKeyDown:o,tooltip:c,required:s,autoComplete:d="off",...p}){let[u,C]=(0,n.useState)(!1);return n.createElement("div",{style:{...a}},e&&n.createElement(N,null,n.createElement(Tooltip,{text:c||""},n.createElement("div",{style:{display:"flex",gap:4}},n.createElement(Text,{size:14,weight:600},e),s&&n.createElement(Text,{size:14,weight:600},"*")))),n.createElement(O,{active:!!t||void 0,error:!!i||void 0},n.createElement(U,{type:u?"text":l,value:t,onChange:function(e){r(e.target.value)},autoComplete:d,onKeyDown:o,...p}),"password"===l&&n.createElement(K,{onClick:()=>C(!u)},u?n.createElement(eye_close_default,{width:16,height:16}):n.createElement(eye_open_default,{width:16,height:16}))),i&&n.createElement(W,null,n.createElement(Text,{size:14,color:"#FD3F3F"},i)))}l.zo.div` - position: relative; - margin-top: 8px; - border-radius: 8px; - width: 240px; - height: 140px; - cursor: pointer; - background: ${({url:e})=>`linear-gradient( - 0deg, - rgba(2, 20, 30, 0.2) 0%, - rgba(2, 20, 30, 0.2) 100% - ), - url(${e}), - lightgray 50%`}; - background-size: cover; - background-position: center; - background-repeat: no-repeat; -`;var Q=l.zo.div` - position: absolute; - margin-left: auto; - margin-right: auto; - left: 0; - right: 0; - top: 30px; - text-align: center; -`;(0,l.zo)(Q)` - top: 40%; -`,l.zo.video` - width: 980px; - border-radius: 8px; -`,l.zo.div` - width: 980px; - - display: flex; - justify-content: space-between; - margin-bottom: 21px; -`,l.zo.div` - position: fixed; - top: 0; - left: 0; - width: 100vw; - height: 100vh; - display: flex; - flex-direction: column; - justify-content: center; - align-items: center; - background: rgba(0, 0, 0, 0.65); - z-index: 9999; -`;var q=l.ZP.div` - display: flex; - justify-content: center; - align-items: center; - height: 100%; -`,Y=l.ZP.div` - width: ${({width:e})=>e||48}px; - height: ${({height:e})=>e||48}px; - border: 4px solid; - border-color: ${({theme:e})=>`${e.colors.secondary} ${e.colors.secondary} ${e.colors.secondary} transparent`}; - border-radius: 50%; - animation: spin-anim 1.2s linear infinite; - - @keyframes spin-anim { - 0% { - transform: rotate(0deg); - } - 100% { - transform: rotate(360deg); - } - } -`;function Loader({width:e,height:t}){return n.createElement(q,null,n.createElement(Y,{width:e,height:t}))}l.ZP.div` - position: fixed; - top: 3%; - right: 3%; -`,l.ZP.div` - display: flex; - padding: 6px 16px 6px 8px; - align-items: center; - justify-content: space-between; - gap: 10px; - border-radius: 8px; - border: ${({theme:e})=>`1px solid ${e.colors.secondary}`}; - background: ${({theme:e})=>e.colors.dark_blue}; - svg { - cursor: pointer; - } -`;var X=l.ZP.div` - display: flex; - flex-direction: column; - padding: 8px; - border-radius: 12px; - border: ${({theme:e})=>`solid 1px ${e.colors.blue_grey}`}; - background: ${({theme:e})=>e.colors.dark}; - align-items: center; - gap: 4px; - min-width: 80px; -`,J=l.ZP.div` - max-width: 72px; - text-align: center; - display: flex; - align-items: center; - justify-content: center; -`,ee=l.ZP.span` - background-color: ${({backgroundColor:e})=>e}; - width: 8px; - height: 8px; - border-radius: 8px; -`,et=l.ZP.div` - width: 24px; - height: 24px; -`,er=(0,n.memo)(({data:e,isConnectable:t})=>{let r=f[e.type]?f[e.type]:null;return n.createElement(X,null,n.createElement(i.HH,{type:"target",position:i.Ly.Left,id:"b",isConnectable:t,style:{visibility:"hidden"}}),r&&n.createElement(et,null,n.createElement(r,null)),n.createElement(J,null,n.createElement(Text,{size:14,weight:600},e?.spec?.actionName||"Action")),n.createElement("div",{style:{display:"flex",justifyContent:"center",alignItems:"center",gap:4,width:"100%"}},e.spec?.signals.map(e=>n.createElement(ee,{key:e,backgroundColor:w.colors[e.toLowerCase()]}))),n.createElement(i.HH,{type:"source",position:i.Ly.Right,id:"a",isConnectable:t,style:{visibility:"hidden"}}))}),en=l.F4` - 0% { - opacity: 1; - - } - 100% { - opacity: 0.5; - } -`,el=l.ZP.div` - width: 120px; - height: 120px; - display: flex; - align-items: center; - justify-content: center; - border-radius: 60px; - position: relative; - z-index: 90; - - &::before { - content: ''; - position: absolute; - top: 0; - left: 0; - right: 0; - bottom: 0; - border-radius: 60px; - background: #110c1f55; - z-index: -1; - animation: ${en} 1s infinite alternate; - } -`,ei=l.ZP.div` - width: 100px; - height: 100px; - display: flex; - align-items: center; - justify-content: center; - border-radius: 50px; - border: solid 1px #3a3a3a76; - background: #110c1f7d; -`,ea=l.ZP.div` - width: 80px; - height: 80px; - display: flex; - align-items: center; - justify-content: center; - border-radius: 40px; - border: solid 1px #3a3a3aa9; - background: #110c1f; - position: relative; - z-index: 99; -`,folder_default=e=>n.createElement("svg",{width:32,height:32,viewBox:"0 0 32 32",fill:"none",xmlns:"http://www.w3.org/2000/svg",...e},n.createElement("rect",{width:32,height:32,rx:4,fill:"url(#paint0_linear_280_5350)"}),n.createElement("rect",{width:32,height:32,rx:4,fill:"url(#paint1_radial_280_5350)",fillOpacity:.4}),n.createElement("path",{opacity:.2,d:"M25.75 11.5V19.8334C25.75 20.0102 25.6798 20.1798 25.5548 20.3048C25.4298 20.4298 25.2602 20.5 25.0834 20.5H22.75V14.5C22.75 14.3011 22.671 14.1103 22.5303 13.9697C22.3897 13.829 22.1989 13.75 22 13.75H15.5003C15.338 13.75 15.1801 13.6974 15.0503 13.6L12.4497 11.65C12.3199 11.5526 12.162 11.5 11.9997 11.5H10V9.25C10 9.05109 10.079 8.86032 10.2197 8.71967C10.3603 8.57902 10.5511 8.5 10.75 8.5H14.9997C15.162 8.5 15.3199 8.55263 15.4497 8.65L18.0503 10.6C18.1801 10.6974 18.338 10.75 18.5003 10.75H25C25.1989 10.75 25.3897 10.829 25.5303 10.9697C25.671 11.1103 25.75 11.3011 25.75 11.5Z",fill:"#96F2FF"}),n.createElement("path",{d:"M25 10H18.5003L15.8997 8.05C15.6397 7.85599 15.3241 7.7508 14.9997 7.75H10.75C10.3522 7.75 9.97064 7.90804 9.68934 8.18934C9.40804 8.47064 9.25 8.85218 9.25 9.25V10.75H7.75C7.35218 10.75 6.97064 10.908 6.68934 11.1893C6.40804 11.4706 6.25 11.8522 6.25 12.25V22.75C6.25 23.1478 6.40804 23.5294 6.68934 23.8107C6.97064 24.092 7.35218 24.25 7.75 24.25H22.0834C22.459 24.2495 22.819 24.1001 23.0846 23.8346C23.3501 23.569 23.4995 23.209 23.5 22.8334V21.25H25.0834C25.459 21.2495 25.819 21.1001 26.0846 20.8346C26.3501 20.569 26.4995 20.209 26.5 19.8334V11.5C26.5 11.1022 26.342 10.7206 26.0607 10.4393C25.7794 10.158 25.3978 10 25 10ZM22 22.75H7.75V12.25H11.9997L14.6003 14.2C14.8603 14.394 15.1759 14.4992 15.5003 14.5H22V22.75ZM25 19.75H23.5V14.5C23.5 14.1022 23.342 13.7206 23.0607 13.4393C22.7794 13.158 22.3978 13 22 13H15.5003L12.8997 11.05C12.6397 10.856 12.3241 10.7508 11.9997 10.75H10.75V9.25H14.9997L17.6003 11.2C17.8603 11.394 18.1759 11.4992 18.5003 11.5H25V19.75Z",fill:"#96F2FF"}),n.createElement("rect",{x:.375,y:.375,width:31.25,height:31.25,rx:3.625,stroke:"url(#paint2_linear_280_5350)",strokeOpacity:.5,strokeWidth:.75}),n.createElement("defs",null,n.createElement("linearGradient",{id:"paint0_linear_280_5350",x1:16,y1:0,x2:16,y2:32,gradientUnits:"userSpaceOnUse"},n.createElement("stop",{stopColor:"#2E4C55"}),n.createElement("stop",{offset:1,stopColor:"#303355"})),n.createElement("radialGradient",{id:"paint1_radial_280_5350",cx:0,cy:0,r:1,gradientUnits:"userSpaceOnUse",gradientTransform:"translate(32 -1.19209e-06) rotate(120.009) scale(23.0961 24.8123)"},n.createElement("stop",{stopColor:"#96F2FF"}),n.createElement("stop",{offset:.619146,stopColor:"#96F2FF",stopOpacity:0})),n.createElement("linearGradient",{id:"paint2_linear_280_5350",x1:16,y1:0,x2:16,y2:32,gradientUnits:"userSpaceOnUse"},n.createElement("stop",{stopColor:"#96F2FF"}),n.createElement("stop",{offset:1,stopColor:"#96F2FF",stopOpacity:0})))),eo=l.zo.div` - display: flex; - padding: 16px; - border-radius: 12px; - border: ${({theme:e})=>`solid 1px ${e.colors.blue_grey}`}; - background: ${({theme:e})=>e.colors.dark}; - align-items: center; - width: 272px; - gap: 8px; -`,ec=l.zo.div` - gap: 10px; -`,es=(0,n.memo)(({data:e,isConnectable:t})=>n.createElement(eo,null,n.createElement(folder_default,{width:32}),n.createElement(ec,null,n.createElement(Text,{size:14,weight:600},e?.name),e?.totalAppsInstrumented&&n.createElement(Text,{color:"#8b92a5"},`${e.totalAppsInstrumented} Apps Instrumented`)),n.createElement(i.HH,{type:"source",position:i.Ly.Right,id:"a",isConnectable:t,style:{visibility:"hidden"}}))),logs_grey_default2=e=>n.createElement("svg",{width:16,height:16,viewBox:"0 0 16 16",fill:"none",xmlns:"http://www.w3.org/2000/svg",...e},n.createElement("path",{d:"M2 4C2 3.86739 2.05268 3.74021 2.14645 3.64645C2.24021 3.55268 2.36739 3.5 2.5 3.5H13.5C13.6326 3.5 13.7598 3.55268 13.8536 3.64645C13.9473 3.74021 14 3.86739 14 4C14 4.13261 13.9473 4.25979 13.8536 4.35355C13.7598 4.44732 13.6326 4.5 13.5 4.5H2.5C2.36739 4.5 2.24021 4.44732 2.14645 4.35355C2.05268 4.25979 2 4.13261 2 4ZM2.5 7H10.5C10.6326 7 10.7598 6.94732 10.8536 6.85355C10.9473 6.75979 11 6.63261 11 6.5C11 6.36739 10.9473 6.24021 10.8536 6.14645C10.7598 6.05268 10.6326 6 10.5 6H2.5C2.36739 6 2.24021 6.05268 2.14645 6.14645C2.05268 6.24021 2 6.36739 2 6.5C2 6.63261 2.05268 6.75979 2.14645 6.85355C2.24021 6.94732 2.36739 7 2.5 7ZM13.5 8.5H2.5C2.36739 8.5 2.24021 8.55268 2.14645 8.64645C2.05268 8.74021 2 8.86739 2 9C2 9.13261 2.05268 9.25979 2.14645 9.35355C2.24021 9.44732 2.36739 9.5 2.5 9.5H13.5C13.6326 9.5 13.7598 9.44732 13.8536 9.35355C13.9473 9.25979 14 9.13261 14 9C14 8.86739 13.9473 8.74021 13.8536 8.64645C13.7598 8.55268 13.6326 8.5 13.5 8.5ZM10.5 11H2.5C2.36739 11 2.24021 11.0527 2.14645 11.1464C2.05268 11.2402 2 11.3674 2 11.5C2 11.6326 2.05268 11.7598 2.14645 11.8536C2.24021 11.9473 2.36739 12 2.5 12H10.5C10.6326 12 10.7598 11.9473 10.8536 11.8536C10.9473 11.7598 11 11.6326 11 11.5C11 11.3674 10.9473 11.2402 10.8536 11.1464C10.7598 11.0527 10.6326 11 10.5 11Z",fill:"#8B92A5"})),logs_blue_default2=e=>n.createElement("svg",{width:16,height:16,viewBox:"0 0 16 16",fill:"none",xmlns:"http://www.w3.org/2000/svg",...e},n.createElement("path",{d:"M2 4C2 3.86739 2.05268 3.74021 2.14645 3.64645C2.24021 3.55268 2.36739 3.5 2.5 3.5H13.5C13.6326 3.5 13.7598 3.55268 13.8536 3.64645C13.9473 3.74021 14 3.86739 14 4C14 4.13261 13.9473 4.25979 13.8536 4.35355C13.7598 4.44732 13.6326 4.5 13.5 4.5H2.5C2.36739 4.5 2.24021 4.44732 2.14645 4.35355C2.05268 4.25979 2 4.13261 2 4ZM2.5 7H10.5C10.6326 7 10.7598 6.94732 10.8536 6.85355C10.9473 6.75979 11 6.63261 11 6.5C11 6.36739 10.9473 6.24021 10.8536 6.14645C10.7598 6.05268 10.6326 6 10.5 6H2.5C2.36739 6 2.24021 6.05268 2.14645 6.14645C2.05268 6.24021 2 6.36739 2 6.5C2 6.63261 2.05268 6.75979 2.14645 6.85355C2.24021 6.94732 2.36739 7 2.5 7ZM13.5 8.5H2.5C2.36739 8.5 2.24021 8.55268 2.14645 8.64645C2.05268 8.74021 2 8.86739 2 9C2 9.13261 2.05268 9.25979 2.14645 9.35355C2.24021 9.44732 2.36739 9.5 2.5 9.5H13.5C13.6326 9.5 13.7598 9.44732 13.8536 9.35355C13.9473 9.25979 14 9.13261 14 9C14 8.86739 13.9473 8.74021 13.8536 8.64645C13.7598 8.55268 13.6326 8.5 13.5 8.5ZM10.5 11H2.5C2.36739 11 2.24021 11.0527 2.14645 11.1464C2.05268 11.2402 2 11.3674 2 11.5C2 11.6326 2.05268 11.7598 2.14645 11.8536C2.24021 11.9473 2.36739 12 2.5 12H10.5C10.6326 12 10.7598 11.9473 10.8536 11.8536C10.9473 11.7598 11 11.6326 11 11.5C11 11.3674 10.9473 11.2402 10.8536 11.1464C10.7598 11.0527 10.6326 11 10.5 11Z",fill:"#96F2FF"})),chart_line_grey_default2=e=>n.createElement("svg",{width:16,height:16,viewBox:"0 0 16 16",fill:"none",xmlns:"http://www.w3.org/2000/svg",...e},n.createElement("path",{d:"M14.5 13C14.5 13.1326 14.4473 13.2598 14.3536 13.3536C14.2598 13.4473 14.1326 13.5 14 13.5H2C1.86739 13.5 1.74021 13.4473 1.64645 13.3536C1.55268 13.2598 1.5 13.1326 1.5 13V3C1.5 2.86739 1.55268 2.74021 1.64645 2.64645C1.74021 2.55268 1.86739 2.5 2 2.5C2.13261 2.5 2.25979 2.55268 2.35355 2.64645C2.44732 2.74021 2.5 2.86739 2.5 3V8.89812L5.67063 6.125C5.7569 6.04947 5.86652 6.0059 5.9811 6.00157C6.09569 5.99725 6.20828 6.03244 6.3 6.10125L9.97563 8.85812L13.6706 5.625C13.7191 5.57704 13.7768 5.5395 13.8403 5.51467C13.9038 5.48985 13.9717 5.47827 14.0398 5.48065C14.1079 5.48303 14.1749 5.49931 14.2365 5.5285C14.2981 5.55769 14.3531 5.59917 14.398 5.65038C14.443 5.7016 14.4771 5.76148 14.4981 5.82633C14.5191 5.89119 14.5266 5.95965 14.5201 6.02752C14.5137 6.09538 14.4935 6.16122 14.4607 6.22097C14.4279 6.28073 14.3832 6.33314 14.3294 6.375L10.3294 9.875C10.2431 9.95053 10.1335 9.9941 10.0189 9.99843C9.90431 10.0028 9.79172 9.96756 9.7 9.89875L6.02437 7.14313L2.5 10.2269V12.5H14C14.1326 12.5 14.2598 12.5527 14.3536 12.6464C14.4473 12.7402 14.5 12.8674 14.5 13Z",fill:"#8B92A5"})),chart_line_blue_default2=e=>n.createElement("svg",{width:16,height:16,viewBox:"0 0 16 16",fill:"none",xmlns:"http://www.w3.org/2000/svg",...e},n.createElement("path",{d:"M14.5 13C14.5 13.1326 14.4473 13.2598 14.3536 13.3536C14.2598 13.4473 14.1326 13.5 14 13.5H2C1.86739 13.5 1.74021 13.4473 1.64645 13.3536C1.55268 13.2598 1.5 13.1326 1.5 13V3C1.5 2.86739 1.55268 2.74021 1.64645 2.64645C1.74021 2.55268 1.86739 2.5 2 2.5C2.13261 2.5 2.25979 2.55268 2.35355 2.64645C2.44732 2.74021 2.5 2.86739 2.5 3V8.89812L5.67063 6.125C5.7569 6.04947 5.86652 6.0059 5.9811 6.00157C6.09569 5.99725 6.20828 6.03244 6.3 6.10125L9.97563 8.85812L13.6706 5.625C13.7191 5.57704 13.7768 5.5395 13.8403 5.51467C13.9038 5.48985 13.9717 5.47827 14.0398 5.48065C14.1079 5.48303 14.1749 5.49931 14.2365 5.5285C14.2981 5.55769 14.3531 5.59917 14.398 5.65038C14.443 5.7016 14.4771 5.76148 14.4981 5.82633C14.5191 5.89119 14.5266 5.95965 14.5201 6.02752C14.5137 6.09538 14.4935 6.16122 14.4607 6.22097C14.4279 6.28073 14.3832 6.33314 14.3294 6.375L10.3294 9.875C10.2431 9.95053 10.1335 9.9941 10.0189 9.99843C9.90431 10.0028 9.79172 9.96756 9.7 9.89875L6.02437 7.14313L2.5 10.2269V12.5H14C14.1326 12.5 14.2598 12.5527 14.3536 12.6464C14.4473 12.7402 14.5 12.8674 14.5 13Z",fill:"#96F2FF"})),tree_structure_grey_default2=e=>n.createElement("svg",{width:16,height:16,viewBox:"0 0 16 16",fill:"none",xmlns:"http://www.w3.org/2000/svg",...e},n.createElement("path",{d:"M10.5 7H13.5C13.7652 7 14.0196 6.89464 14.2071 6.70711C14.3946 6.51957 14.5 6.26522 14.5 6V3C14.5 2.73478 14.3946 2.48043 14.2071 2.29289C14.0196 2.10536 13.7652 2 13.5 2H10.5C10.2348 2 9.98043 2.10536 9.79289 2.29289C9.60536 2.48043 9.5 2.73478 9.5 3V4H9C8.46957 4 7.96086 4.21071 7.58579 4.58579C7.21071 4.96086 7 5.46957 7 6V7.5H5V7C5 6.73478 4.89464 6.48043 4.70711 6.29289C4.51957 6.10536 4.26522 6 4 6H2C1.73478 6 1.48043 6.10536 1.29289 6.29289C1.10536 6.48043 1 6.73478 1 7V9C1 9.26522 1.10536 9.51957 1.29289 9.70711C1.48043 9.89464 1.73478 10 2 10H4C4.26522 10 4.51957 9.89464 4.70711 9.70711C4.89464 9.51957 5 9.26522 5 9V8.5H7V10C7 10.5304 7.21071 11.0391 7.58579 11.4142C7.96086 11.7893 8.46957 12 9 12H9.5V13C9.5 13.2652 9.60536 13.5196 9.79289 13.7071C9.98043 13.8946 10.2348 14 10.5 14H13.5C13.7652 14 14.0196 13.8946 14.2071 13.7071C14.3946 13.5196 14.5 13.2652 14.5 13V10C14.5 9.73478 14.3946 9.48043 14.2071 9.29289C14.0196 9.10536 13.7652 9 13.5 9H10.5C10.2348 9 9.98043 9.10536 9.79289 9.29289C9.60536 9.48043 9.5 9.73478 9.5 10V11H9C8.73478 11 8.48043 10.8946 8.29289 10.7071C8.10536 10.5196 8 10.2652 8 10V6C8 5.73478 8.10536 5.48043 8.29289 5.29289C8.48043 5.10536 8.73478 5 9 5H9.5V6C9.5 6.26522 9.60536 6.51957 9.79289 6.70711C9.98043 6.89464 10.2348 7 10.5 7ZM4 9H2V7H4V9ZM10.5 10H13.5V13H10.5V10ZM10.5 3H13.5V6H10.5V3Z",fill:"#8B92A5"})),tree_structure_blue_default2=e=>n.createElement("svg",{width:16,height:16,viewBox:"0 0 16 16",fill:"none",xmlns:"http://www.w3.org/2000/svg",...e},n.createElement("path",{d:"M10.5 7H13.5C13.7652 7 14.0196 6.89464 14.2071 6.70711C14.3946 6.51957 14.5 6.26522 14.5 6V3C14.5 2.73478 14.3946 2.48043 14.2071 2.29289C14.0196 2.10536 13.7652 2 13.5 2H10.5C10.2348 2 9.98043 2.10536 9.79289 2.29289C9.60536 2.48043 9.5 2.73478 9.5 3V4H9C8.46957 4 7.96086 4.21071 7.58579 4.58579C7.21071 4.96086 7 5.46957 7 6V7.5H5V7C5 6.73478 4.89464 6.48043 4.70711 6.29289C4.51957 6.10536 4.26522 6 4 6H2C1.73478 6 1.48043 6.10536 1.29289 6.29289C1.10536 6.48043 1 6.73478 1 7V9C1 9.26522 1.10536 9.51957 1.29289 9.70711C1.48043 9.89464 1.73478 10 2 10H4C4.26522 10 4.51957 9.89464 4.70711 9.70711C4.89464 9.51957 5 9.26522 5 9V8.5H7V10C7 10.5304 7.21071 11.0391 7.58579 11.4142C7.96086 11.7893 8.46957 12 9 12H9.5V13C9.5 13.2652 9.60536 13.5196 9.79289 13.7071C9.98043 13.8946 10.2348 14 10.5 14H13.5C13.7652 14 14.0196 13.8946 14.2071 13.7071C14.3946 13.5196 14.5 13.2652 14.5 13V10C14.5 9.73478 14.3946 9.48043 14.2071 9.29289C14.0196 9.10536 13.7652 9 13.5 9H10.5C10.2348 9 9.98043 9.10536 9.79289 9.29289C9.60536 9.48043 9.5 9.73478 9.5 10V11H9C8.73478 11 8.48043 10.8946 8.29289 10.7071C8.10536 10.5196 8 10.2652 8 10V6C8 5.73478 8.10536 5.48043 8.29289 5.29289C8.48043 5.10536 8.73478 5 9 5H9.5V6C9.5 6.26522 9.60536 6.51957 9.79289 6.70711C9.98043 6.89464 10.2348 7 10.5 7ZM4 9H2V7H4V9ZM10.5 10H13.5V13H10.5V10ZM10.5 3H13.5V6H10.5V3Z",fill:"#96F2FF"})),ed={LOGS:"Logs",METRICS:"Metrics",TRACES:"Traces"},ep=[{id:1,icons:{notFocus:()=>logs_grey_default2(),focus:()=>logs_blue_default2()},title:ed.LOGS,type:"logs",tapped:!0},{id:2,icons:{notFocus:()=>chart_line_grey_default2(),focus:()=>chart_line_blue_default2()},title:ed.METRICS,type:"metrics",tapped:!0},{id:3,icons:{notFocus:()=>tree_structure_grey_default2(),focus:()=>tree_structure_blue_default2()},title:ed.TRACES,type:"traces",tapped:!0}],eu=l.zo.div` - padding: 16px 24px; - display: flex; - border-radius: 12px; - gap: 8px; - border: ${({theme:e})=>`solid 1px ${e.colors.blue_grey}`}; - background: ${({theme:e})=>e.colors.dark}; - align-items: center; - justify-content: space-between; - width: 430px; -`,eC=l.zo.div` - display: flex; - align-items: center; - gap: 8px; -`,em=l.zo.div` - gap: 8px; - display: flex; - flex-direction: column; - width: 100%; -`,eg={backgroundColor:"#fff",padding:4,borderRadius:10},eh=l.zo.div` - padding: 4px; - width: 24px; - height: 24px; - display: flex; - align-items: center; - justify-content: center; - border-radius: 100%; - opacity: ${({tapped:e})=>e?1:.4}; -`,ef=l.zo.div` - display: flex; - gap: 8px; -`,ex=l.ZP.div` - display: flex; - padding: 16px; - border-radius: 12px; - border: ${({theme:e})=>`solid 1px ${e.colors.blue_grey}`}; - background: ${({theme:e})=>e.colors.dark}; - align-items: center; - width: 272px; - gap: 8px; -`,eE=l.ZP.div` - gap: 4px; - display: flex; - flex-direction: column; -`,ew=l.ZP.div` - padding: 4px; - background-color: #fff; - border-radius: 8px; - display: flex; - justify-content: center; - align-items: center; -`,ey=(0,n.memo)(({data:e,isConnectable:t})=>{let r=e?.languages?.[0]?.language||"default",l=E[r];return n.createElement(ex,null,n.createElement(ew,null,n.createElement("img",{src:l,alt:"",width:32,height:32})),n.createElement(eE,null,n.createElement(Text,{color:"#8b92a5"},e.namespace),n.createElement(Text,{size:18,weight:600},e?.name)),n.createElement(i.HH,{type:"source",position:i.Ly.Right,id:"a",isConnectable:t,style:{visibility:"hidden"}}))}),eb=l.ZP.div` - display: inline-flex; - height: 20px; - padding: 4px 8px; - justify-content: center; - align-items: center; - gap: 8px; - border-radius: 32px; - border: ${({theme:e})=>`solid 1px ${e.colors.blue_grey}`}; - background: ${({theme:e})=>e.colors.dark}; -`,e_=l.ZP.div` - text-align: center; - display: flex; - align-items: center; - justify-content: center; -`,ev=(0,n.memo)(({isConnectable:e,data:t})=>n.createElement(eb,null,n.createElement(i.HH,{type:"target",position:i.Ly.Left,id:"b",isConnectable:e,style:{visibility:"hidden"}}),n.createElement(e_,null,n.createElement(Text,{color:w.colors.light_grey},t.metrics?.data_transfer)),n.createElement(i.HH,{type:"source",position:i.Ly.Right,id:"a",isConnectable:e,style:{visibility:"hidden"}}))),ek=l.ZP.div` - width: 100%; - height: 100%; -`,eL=l.ZP.div` - button { - display: flex; - padding: 8px; - align-items: center; - gap: 10px; - border-radius: 8px; - border: ${({theme:e})=>`1px solid ${e.colors.blue_grey}`}; - background: #0e1c28 !important; - margin-bottom: 8px; - } - - .react-flow__controls button path { - fill: #fff; - } -`,e$=l.ZP.div` - position: absolute; - z-index: 999; - top: 15px; - left: 60px; - display: flex; - flex-direction: column; - gap: 14px; - background-color: ${w.colors.dark}; - padding: 10px; - border-radius: 8px; - border: 1px solid ${w.colors.blue_grey}; - button { - display: flex; - padding: 8px; - align-items: center; - gap: 10px; - border-radius: 8px; - border: ${({theme:e})=>`1px solid ${e.colors.blue_grey}`}; - background: #0e1c28 !important; - margin-bottom: 8px; - } - - .react-flow__controls button path { - fill: #fff; - } -`,eH=l.ZP.div` - display: flex; - align-items: center; - justify-content: center; - gap: 14px; -`,eZ=l.ZP.span` - background-color: ${({color:e})=>e}; - width: 10px; - height: 10px; - border-radius: 8px; - margin-right: 6px; -`,eV=l.ZP.div` - display: flex; - gap: 10px; - cursor: pointer; -`;function DataFlowControlPanel(){let[e,t]=(0,n.useState)(!0);(0,n.useEffect)(()=>{setTimeout(()=>{t(!1)},7e3)},[]);let r=[{name:"Traces",color:w.colors.traces},{name:"Logs",color:w.colors.logs},{name:"Metrics",color:w.colors.metrics}];return n.createElement(n.Fragment,null,n.createElement(e$,null,n.createElement(eV,{onClick:()=>t(!e)},n.createElement(Text,{size:14,weight:600},"Supported Signals"),n.createElement(expand_arrow_default,null)),e&&n.createElement(eH,null,r.map(e=>n.createElement("div",{key:e.name,style:{display:"flex",alignItems:"center",justifyContent:"center"}},n.createElement(eZ,{color:e.color}),n.createElement(Text,{size:12,weight:500},e.name))))),n.createElement(eL,null,n.createElement(o.Z,{position:"top-left",showInteractive:!1})))}var eF=w.colors.data_flow_bg,eM={custom:({isConnectable:e})=>n.createElement(el,null,n.createElement(ei,null,n.createElement(ea,null,n.createElement("img",{src:"https://d1n7d4xz7fr8b4.cloudfront.net/logo.png",alt:"logo",style:{borderRadius:"50%",width:64,height:64}}))),n.createElement(i.HH,{type:"target",position:i.Ly.Left,style:{visibility:"hidden"}}),n.createElement(i.HH,{type:"source",position:i.Ly.Right,id:"a",isConnectable:e,style:{visibility:"hidden"}})),namespace:es,destination:function({data:e,isConnectable:t}){return n.createElement(eu,null,n.createElement(eC,null,n.createElement("img",{src:e?.destination_type?.image_url,width:40,height:40,style:eg,alt:""}),n.createElement(em,null,n.createElement(Text,{color:"#8b92a5"},e?.name),n.createElement(Text,{size:18,weight:600},e?.destination_type?.display_name))),n.createElement(ef,null,ep.map(t=>n.createElement(eh,{key:t?.id,tapped:e?.signals?.[t?.type]?"true":void 0,style:{border:`solid 2px ${w.colors[t.type.toLowerCase()]}`}},e?.signals?.[t?.type]?t.icons.focus():t.icons.notFocus()))),n.createElement(i.HH,{type:"target",position:i.Ly.Left,id:"a",isConnectable:t,style:{visibility:"hidden"}}))},action:er,source:ey,metric:ev};function DataFlow({nodes:e,edges:t,...r}){let{fitView:l}=(0,i._K)();return(0,n.useEffect)(()=>{setTimeout(()=>{l()},100)},[l,e,t]),n.createElement(ek,null,n.createElement(i.x$,{nodes:e,edges:t,nodeTypes:eM,nodesDraggable:!1,nodeOrigin:[.4,.4],...r},n.createElement(DataFlowControlPanel,null),n.createElement(a.A,{gap:12,size:1,style:{backgroundColor:eF}})))}function KeyvalDataFlow(e){return n.createElement(i.tV,null,n.createElement(DataFlow,{...e}))}var eS=l.zo.div` - padding: 10px; - border: ${({theme:e})=>`1px solid ${e.colors.blue_grey}`}; - border-radius: 8px; - width: fit-content; - width: 344px; - display: flex; - flex-direction: column; - gap: 8px; -`,eP=l.zo.div` - width: 100%; - display: flex; - justify-content: flex-end; - :hover { - background: ${({theme:e})=>e.colors.error}; - p { - color: #fff !important; - } - } -`,eA=l.zo.button` - padding: 8px 12px; - border-radius: 4px; - background: transparent; - border: ${({theme:e})=>`1px solid ${e.colors.blue_grey}`}; - cursor: pointer !important; -`;function DangerZone({title:e,subTitle:t,btnText:r,onClick:l}){return n.createElement(n.Fragment,null,n.createElement(eS,null,n.createElement(Text,{size:14,weight:600},e),n.createElement(Text,{size:12},t),n.createElement(eP,null,n.createElement(eA,{onClick:l},n.createElement(Text,{weight:500,size:14,color:w.colors.error},r)))))}var portal_modal_default=({children:e,wrapperId:t})=>{let[r,l]=(0,n.useState)(null);(0,n.useLayoutEffect)(()=>{let e=document.getElementById(t),r=!1;return e||(e=createWrapperAndAppendToBody(t),r=!0),l(e),()=>{r&&e.parentNode&&e.parentNode.removeChild(e)}},[t]);let createWrapperAndAppendToBody=e=>{let t=document.createElement("div");return t.setAttribute("id",e),document.body.appendChild(t),t};return r?(0,c.createPortal)(e,r):null},eI=l.F4` - from { - opacity: 0; - } - to { - opacity: 1; - } -`;l.ZP.div` - padding: 40px; - display: flex; - flex-wrap: wrap; - justify-content: center; - gap: 20px; -`,l.ZP.button` - display: block; - padding: 10px 30px; - border-radius: 3px; - color: ${({theme:e})=>e.colors.btnText}; - border: 1px solid ${({theme:e})=>e.colors.main}; - background-color: ${({theme:e})=>e.colors.main}; - font-family: 'Robot', sans-serif; - font-weight: 500; - transition: 0.3s ease all; - - &:hover { - background-color: ${({theme:e})=>e.colors.shadowMain}; - } -`,l.ZP.button` - display: block; - padding: 10px 30px; - border-radius: 3px; - color: ${({theme:e})=>e.colors.main}; - border: 1px solid ${({theme:e})=>e.colors.main}; - background-color: transparent; - font-family: 'Robot', sans-serif; - font-weight: 500; - transition: 0.3s ease all; - - &:hover { - background-color: ${({theme:e})=>e.colors.shadowMain}; - color: ${({theme:e})=>e.colors.btnText}; - } -`;var eT=l.ZP.div` - width: 100vw; - height: 100vh; - z-index: 9999; - position: fixed; - top: 0; - left: 0; - background-color: ${e=>(e.showOverlay,"rgba(255, 255, 255, 0.1)")}; - display: flex; - align-items: center; - justify-content: ${e=>e.positionX?e.positionX:"center"}; - align-items: ${e=>e.positionY?e.positionY:"center"}; - padding: 40px; - - @media (prefers-reduced-motion: no-preference) { - animation-name: ${eI}; - animation-fill-mode: backwards; - } -`,eB=l.ZP.div` - min-width: 500px; - min-height: 50px; - /* background-color: #ffffff; */ - position: relative; - /* border-radius: 8px; */ - border-radius: 12px; - border: 0.95px solid var(--dark-mode-dark-3, #203548); - background: var(--dark-mode-dark-2, #0e1c28); - - padding: ${e=>e.padding?e.padding:"20px"}; -`,eR=l.ZP.header` - display: flex; - align-items: center; - justify-content: space-between; - padding-bottom: 20px; -`,ez=l.ZP.div` - position: absolute; - top: 20px; - right: 15px; - border: none; - background-color: transparent; - transition: 0.3s ease all; - border-radius: 3px; - color: '#d1345b'; - cursor: pointer; - - svg { - width: 24px; - height: 24px; - fill: #fff; - } -`;l.ZP.button` - background-color: #ededed8b; - border: 1px solid #d4d2d2; - width: 100%; - height: 36px; - border-radius: 8px; - cursor: pointer; - - &:hover { - background-color: #ededed; - } -`;var ej=l.ZP.div` - display: flex; - width: 100%; - flex-direction: column; - align-items: center; - color: ${({theme:e})=>e.text}; -`,eG=l.ZP.footer` - width: 100%; - display: flex; - gap: 1rem; - align-items: center; - justify-content: flex-end; - margin-top: 20px; - padding-top: 20px; -`,close_modal_default=e=>n.createElement("svg",{xmlns:"http://www.w3.org/2000/svg",width:16,height:16,viewBox:"0 0 16 16",fill:"none",...e},n.createElement("rect",{width:16,height:16,rx:2,fill:"#0E1C28"}),n.createElement("path",{d:"M12.8538 12.146C12.9002 12.1925 12.9371 12.2476 12.9622 12.3083C12.9874 12.369 13.0003 12.4341 13.0003 12.4998C13.0003 12.5655 12.9874 12.6305 12.9622 12.6912C12.9371 12.7519 12.9002 12.8071 12.8538 12.8535C12.8073 12.9 12.7522 12.9368 12.6915 12.962C12.6308 12.9871 12.5657 13.0001 12.5 13.0001C12.4343 13.0001 12.3693 12.9871 12.3086 12.962C12.2479 12.9368 12.1927 12.9 12.1463 12.8535L8.00003 8.70666L3.85378 12.8535C3.75996 12.9474 3.63272 13.0001 3.50003 13.0001C3.36735 13.0001 3.2401 12.9474 3.14628 12.8535C3.05246 12.7597 2.99976 12.6325 2.99976 12.4998C2.99976 12.3671 3.05246 12.2399 3.14628 12.146L7.29316 7.99979L3.14628 3.85354C3.05246 3.75972 2.99976 3.63247 2.99976 3.49979C2.99976 3.36711 3.05246 3.23986 3.14628 3.14604C3.2401 3.05222 3.36735 2.99951 3.50003 2.99951C3.63272 2.99951 3.75996 3.05222 3.85378 3.14604L8.00003 7.29291L12.1463 3.14604C12.2401 3.05222 12.3674 2.99951 12.5 2.99951C12.6327 2.99951 12.76 3.05222 12.8538 3.14604C12.9476 3.23986 13.0003 3.36711 13.0003 3.49979C13.0003 3.63247 12.9476 3.75972 12.8538 3.85354L8.70691 7.99979L12.8538 12.146Z",fill:"white"}));function Modal({children:e,closeModal:t,config:r}){let l=(0,n.useRef)(null),i=(0,n.useCallback)(e=>{"Escape"===e.key&&t()},[]);return useOnClickOutside(l,()=>t()),(0,n.useEffect)(()=>(document.addEventListener("keydown",i),()=>{document.removeEventListener("keydown",i)}),[i]),n.createElement(n.Fragment,null,n.createElement(portal_modal_default,{wrapperId:"modal-portal"},n.createElement(eT,{showOverlay:r.showOverlay,positionX:r.positionX,positionY:r.positionY,style:{animationDuration:"400ms",animationDelay:"0"}},n.createElement(eB,{padding:r.padding,ref:l},r.showHeader&&n.createElement(eR,null,n.createElement(Text,{size:24,weight:700},r.title)),n.createElement(ez,{onClick:t},n.createElement(close_modal_default,null)),n.createElement(ej,null,e),r?.footer&&n.createElement(eG,{style:{...r.footer.style}},r.footer.link&&n.createElement(Link,{onClick:r.footer.link.onClick,value:r.footer.link.text}),r.footer.secondaryBtnText&&n.createElement(Button,{variant:"secondary",onClick:r.footer.secondaryBtnAction},n.createElement(Text,{size:16,weight:700},r.footer.secondaryBtnText)),n.createElement(Button,{disabled:r.footer.isDisabled,onClick:r.footer.primaryBtnAction},n.createElement(Text,{size:16,weight:700,color:w.text.dark_button},r.footer.primaryBtnText)))))))}function StyledComponentsRegistry({children:e}){let[t]=(0,n.useState)(()=>new l.qH);return((0,s.useServerInsertedHTML)(()=>{let e=t.getStyleElement();return t.instance.clearTag(),n.createElement(n.Fragment,null,e)}),"undefined"!=typeof window)?n.createElement(n.Fragment,null,e):n.createElement(l.LC,{sheet:t.instance},e)}var ThemeProviderWrapper=({children:e})=>n.createElement(l.f6,{theme:w},n.createElement(StyledComponentsRegistry,null,e)),eD=l.ZP.div` - display: flex; -`,eO=l.ZP.div` - display: flex; - align-items: center; -`,eU=l.ZP.div` - opacity: ${({disabled:e})=>e?"0.4":"1"}; -`,eN=(0,l.ZP)(eU)` - margin: 0 8px; -`,eW=l.ZP.div` - width: 54px; - height: 1px; - background-color: #8b92a5; - margin-top: 2px; - margin-right: 8px; -`,checked_default=e=>n.createElement("svg",{width:20,height:14,viewBox:"0 0 20 14",fill:"none",xmlns:"http://www.w3.org/2000/svg",...e},n.createElement("path",{d:"M19.1767 1.88786L7.48781 13.675C7.386 13.778 7.26503 13.8597 7.13183 13.9155C6.99863 13.9713 6.85583 14 6.7116 14C6.56737 14 6.42456 13.9713 6.29136 13.9155C6.15816 13.8597 6.03719 13.778 5.93539 13.675L0.821518 8.51812C0.719584 8.41532 0.638726 8.29329 0.58356 8.15899C0.528394 8.02469 0.5 7.88074 0.5 7.73538C0.5 7.59001 0.528394 7.44606 0.58356 7.31176C0.638726 7.17746 0.719584 7.05543 0.821518 6.95264C0.923451 6.84985 1.04446 6.76831 1.17765 6.71268C1.31083 6.65705 1.45357 6.62842 1.59773 6.62842C1.74189 6.62842 1.88463 6.65705 2.01781 6.71268C2.151 6.76831 2.27201 6.84985 2.37394 6.95264L6.71251 11.3277L17.6261 0.324221C17.8319 0.116626 18.1111 0 18.4023 0C18.6934 0 18.9726 0.116626 19.1785 0.324221C19.3843 0.531816 19.5 0.813376 19.5 1.10696C19.5 1.40054 19.3843 1.6821 19.1785 1.8897L19.1767 1.88786Z",fill:"white"}));function StepItem({title:e,index:t,status:r,isLast:l}){return n.createElement(eO,null,n.createElement(FloatBox,null,"done"===r?n.createElement(checked_default,null):n.createElement(eU,{disabled:"active"!==r},n.createElement(Text,{weight:700},t))),n.createElement(eN,{disabled:"active"!==r},n.createElement(Text,{weight:600},e)),!l&&n.createElement(eW,null))}function Steps({data:e}){return n.createElement(eD,null,e?.map(({title:t,status:r},l)=>n.createElement(StepItem,{key:`${l}_${t}`,title:t,status:r,index:l+1,isLast:l+1===e.length})))}l.ZP.div` - width: 100%; - display: flex; - align-items: center; - gap: 23px; - margin: ${({margin:e})=>e}; -`,l.ZP.div` - width: 100%; - border-top: 1px solid #8b92a5; -`,l.ZP.div` - padding: 16px; - display: flex; - justify-content: flex-start !important; - border: 1px solid ${({theme:e})=>e.colors.dark_blue}; - border-radius: 12px; -`,l.ZP.div` - line-height: 1.6; - code { - background-color: ${({theme:e})=>e.colors.dark_blue}; - padding: 2px 4px; - border-radius: 6px; - } -`,l.ZP.div` - display: inline-flex; - justify-content: space-between; - border-radius: 10px; - margin: auto; - overflow: hidden; - position: relative; -`,l.ZP.div` - color: ${({theme:e})=>e.colors.white}; - padding: 8px 12px; - position: relative; - text-align: center; - display: flex; - gap: 8px; - align-items: center; - justify-content: center; - z-index: 1; - border: ${({theme:e})=>`1px solid ${e.colors.secondary}`}; - background-color: ${({theme:e})=>e.colors.dark}; - filter: brightness(50%); - &.active { - filter: brightness(100%); - } - &:first-child { - border-top-left-radius: 10px; - border-bottom-left-radius: 10px; - padding-left: 16px; - } - &:last-child { - border-top-right-radius: 10px; - border-bottom-right-radius: 10px; - padding-right: 16px; - } - label { - font-family: ${({theme:e})=>e.font_family.primary}; - } -`,l.ZP.input` - opacity: 0; - margin: 0; - top: 0; - right: 0; - bottom: 0; - left: 0; - position: absolute; - width: 100%; - cursor: pointer; - height: 100%; -`,l.ZP.div` - width: 100%; -`,l.ZP.div` - display: flex; - width: 110%; - flex-wrap: wrap; -`,l.ZP.div` - cursor: pointer; - padding: 2px 8px; - margin: 3px; - border-radius: 5px; - background: ${w.colors.light_grey}; - display: flex; - align-items: center; - justify-content: space-between; - gap: 5px; - min-height: 30px; -`,l.ZP.div` - display: flex; - gap: 10px; - width: 100%; - height: 37px; -`,(0,l.ZP)(Input)` - width: 100%; -`,(0,l.ZP)(Button)` - margin-left: 10px; -`,l.ZP.div` - display: flex; - justify-content: space-between; - align-items: center; - margin-bottom: 8px; -`;var eK=l.ZP.div` - width: 100%; -`,eQ=l.ZP.div` - display: flex; - justify-content: space-between; - align-items: center; - margin-bottom: 8px; -`,eq=l.ZP.table` - border: solid 1px ${w.text.grey}; - text-align: center; - border-spacing: 0; - border-radius: 8px; - width: 100%; -`,eY=l.ZP.th` - padding: 4px; -`,eX=l.ZP.td` - padding: 8px 0; - - border-top: solid 1px ${w.text.grey}; - border-right: ${({right:e})=>e?`solid 1px ${w.text.grey}`:"none"}; - border-left: ${({left:e})=>e?`solid 1px ${w.text.grey}`:"none"}; -`,eJ=l.ZP.input` - background: transparent; - border: none; - width: 94%; - - outline: none; - color: ${w.text.white}; -`,e1=l.ZP.td` - text-align: center; - border-top: solid 1px ${w.text.grey}; - padding: 4px; - cursor: pointer; -`,KeyValueTable=({keyValues:e,setKeyValues:t,title:r,titleKey:l,titleValue:i,titleButton:a,tooltip:o,required:c})=>{let[s,d]=(0,n.useState)(1),deleteRow=r=>{let n=e.filter(e=>e.id!==r);t(n)},updateKey=(r,n)=>{let l=e.map(e=>e.id===r?{...e,key:n}:e);t(l)},updateValue=(r,n)=>{let l=e.map(e=>e.id===r?{...e,value:n}:e);t(l)};return n.createElement(eK,null,r&&n.createElement(eQ,null,n.createElement(Tooltip,{text:o||""},n.createElement("div",{style:{display:"flex",gap:4}},n.createElement(Text,{size:14,weight:600},r),c&&n.createElement(Text,{size:14,weight:600},"*")))),n.createElement(eq,null,n.createElement("thead",null,n.createElement("tr",null,n.createElement(eY,null,n.createElement(Text,{color:w.text.grey,size:14,style:{display:"flex"},weight:300},l||"Key")),n.createElement(eY,null,n.createElement(Text,{color:w.text.grey,size:14,style:{display:"flex"},weight:300},i||"Value")))),n.createElement("tbody",null,e.map(e=>n.createElement("tr",{key:e.id},n.createElement(eX,{right:!0},n.createElement(eJ,{type:"text",value:e.key,onChange:t=>updateKey(e.id,t.target.value)})),n.createElement(eX,null,n.createElement(eJ,{type:"text",value:e.value,onChange:t=>updateValue(e.id,t.target.value)})),n.createElement(eX,{style:{cursor:"pointer"},left:!0,onClick:()=>deleteRow(e.id)},n.createElement(trash_default,null))))),n.createElement("tfoot",null,n.createElement("tr",null,n.createElement(e1,{onClick:()=>{t([...e,{id:s,key:"",value:""}]),d(s+1)},colSpan:3},n.createElement(Text,{weight:400,size:14,color:w.colors.torquiz_light},a||"Add Row"))))))},e2=l.ZP.textarea` - width: 100%; - padding: 8px 12px; - border-radius: 8px; - box-sizing: border-box; - resize: vertical; - - outline: none; - color: ${({theme:e})=>e.text.white}; - font-family: ${w.font_family.primary}; - background-color: ${({theme:e})=>e.colors.light_dark}; - border: ${({theme:e,active:t})=>`1px solid ${t?e.text.grey:e.colors.blue_grey}`}; - &:hover { - border: ${({theme:e})=>`solid 1px ${e.text.grey}`}; - } -`,e5=l.ZP.div` - margin-bottom: 8px; - text-align: start; -`,TextArea=({placeholder:e,value:t,onChange:r,rows:l=4,cols:i=50,tooltip:a,label:o,required:c,...s})=>n.createElement(n.Fragment,null,o&&n.createElement(e5,null,n.createElement(Tooltip,{text:a||""},n.createElement("div",{style:{display:"flex",gap:4}},n.createElement(Text,{size:14,weight:600},o),c&&n.createElement(Text,{size:14,weight:600},"*")))),n.createElement(e2,{placeholder:e,value:t,onChange:r,rows:l,cols:i,active:!!t,...s})),e0=l.ZP.div` - width: 100%; -`,e3=l.ZP.div` - display: flex; - justify-content: space-between; - align-items: center; - margin-bottom: 8px; -`,e4=l.ZP.table` - border: solid 1px ${w.text.grey}; - text-align: center; - border-spacing: 0; - border-radius: 8px; - width: 100%; -`;l.ZP.th` - padding: 4px; -`;var e6=l.ZP.td` - padding: 8px 0; - - border-bottom: solid 1px ${w.text.grey}; - border-right: ${({right:e})=>e?`solid 1px ${w.text.grey}`:"none"}; - border-left: ${({left:e})=>e?`solid 1px ${w.text.grey}`:"none"}; -`,e9=l.ZP.input` - background: transparent; - border: none; - width: 94%; - - outline: none; - color: ${w.text.white}; -`,e7=l.ZP.td` - text-align: center; - padding: 4px; - cursor: pointer; -`,MultiInputTable=({values:e,title:t,tooltip:r,onValuesChange:l,required:i,placeholder:a})=>{let deleteRow=t=>{let r=e.filter((e,r)=>r!==t);l(r)},updateValue=(t,r)=>{let n=e.map((e,n)=>n===t?r:e);l(n)};return n.createElement(e0,null,t&&n.createElement(e3,null,n.createElement(Tooltip,{text:r||""},n.createElement("div",{style:{display:"flex",gap:4}},n.createElement(Text,{size:14,weight:600},t),i&&n.createElement(Text,{size:14,weight:600},"*")))),n.createElement(e4,null,n.createElement("tbody",null,e.map((e,t)=>n.createElement("tr",{key:t},n.createElement(e6,{right:!0},n.createElement(e9,{type:"text",value:e,onChange:e=>updateValue(t,e.target.value),placeholder:0===t?a:""})),n.createElement(e6,{onClick:()=>deleteRow(t),style:{cursor:"pointer"}},n.createElement(trash_default,null))))),n.createElement("tfoot",null,n.createElement("tr",null,n.createElement(e7,{onClick:()=>{l([...e,""])},colSpan:2},n.createElement(Text,{weight:400,size:14,color:w.colors.torquiz_light},"Add Row"))))))},e8=l.ZP.label` - cursor: pointer; - display: flex; - gap: 4px; - p { - color: ${({theme:e})=>e.colors.light_grey}; - &:hover { - color: ${({theme:e})=>e.colors.white}; - } - } -`,te=l.ZP.div` - display: ${e=>e.isOpen?"block":"none"}; - position: absolute; - right: 0px; - box-shadow: 0px 8px 16px 0px rgba(0, 0, 0, 0.2); - z-index: 9999; - flex-direction: column; - border-radius: 8px; - border: ${({theme:e})=>`1px solid ${e.colors.blue_grey}`}; - background: ${({theme:e})=>e.colors.dark}; - margin-top: 5px; -`,tt=l.ZP.div` - display: flex; - padding: 7px 12px; - gap: 4px; - border-top: ${({theme:e})=>`1px solid ${e.colors.blue_grey}`}; - align-items: center; - opacity: ${({disabled:e})=>e?.5:1}; - pointer-events: ${({disabled:e})=>e?"none":"auto"}; - cursor: pointer; - p { - cursor: pointer !important; - } - - &:hover { - background: ${({theme:e})=>e.colors.light_dark}; - } -`,ActionItem=({label:e,items:t,subTitle:r})=>{let[l,i]=(0,n.useState)(!1),a=(0,n.useRef)(null);return useOnClickOutside(a,()=>i(!1)),n.createElement("div",{ref:a,style:{position:"relative"}},n.createElement(e8,{onClick:()=>i(!l)},n.createElement(Text,{size:12,weight:600},e),n.createElement(expand_arrow_default,null)),n.createElement(te,{isOpen:l},n.createElement("div",{style:{padding:12,width:120}},n.createElement(Text,{size:12,weight:600},r)),t.map((e,t)=>n.createElement(tt,{key:t,onClick:e.onClick,disabled:!!e.disabled},e.selected?n.createElement(check_default,null):n.createElement("div",{style:{width:10}}),n.createElement(Text,{size:12,weight:600},e.label)))))},ActionsGroup=({actionGroups:e})=>n.createElement(n.Fragment,null,e.map((e,t)=>e.condition&&n.createElement(ActionItem,{key:t,...e}))),tr=l.ZP.div` - display: flex; - justify-content: center; - padding: 20px; - gap: 2px; -`,tn=l.ZP.button` - background-color: ${e=>e.isCurrentPage?w.colors.blue_grey:"transparent"}; - color: ${e=>e.isDisabled?w.text.grey:w.text.white}; - border: none; - border-radius: 4px; - padding: 4px 8px; - cursor: pointer; - display: flex; - align-items: center; - gap: 4px; - - &:disabled { - cursor: default; - } - - &:hover { - background-color: ${w.colors.blue_grey}; - } -`,Pagination=({total:e,itemsPerPage:t,currentPage:r,onPageChange:l})=>{let i=Math.ceil(e/t);return n.createElement(tr,null,n.createElement(tn,{onClick:()=>l(r-1),disabled:1===r,isDisabled:1===r},n.createElement(expand_arrow_default,{style:{transform:"rotate(90deg)"}}),"Previous"),Array(i).fill(0).map((e,t)=>n.createElement(tn,{key:t,onClick:()=>l(t+1),isCurrentPage:r===t+1},t+1)),n.createElement(tn,{onClick:()=>l(r+1),disabled:r===i,isDisabled:r===i},"Next",n.createElement(expand_arrow_default,{style:{transform:"rotate(-90deg)"}})))},tl=l.ZP.table` - width: 100%; - background-color: ${w.colors.dark}; - border: 1px solid ${w.colors.blue_grey}; - border-radius: 6px; - border-collapse: separate; - border-spacing: 0; -`,ti=l.ZP.tbody``,ta=l.ZP.div` - margin: 10px 0; - gap: 8px; - display: flex; - align-items: center; - justify-content: flex-end; -`,to=l.ZP.select` - padding: 5px; - border-radius: 4px; - border: 1px solid ${w.colors.blue_grey}; - background-color: ${w.colors.dark}; - color: ${w.colors.white}; - border-radius: 8px; - cursor: pointer; - border: ${({theme:e})=>`1px solid ${e.colors.blue_grey}`}; -`,tc=l.ZP.option` - background-color: ${w.colors.dark}; - color: ${w.colors.white}; -`,Table3=({data:e,renderTableRows:t,renderTableHeader:r,renderEmptyResult:l,currentPage:i,itemsPerPage:a,setCurrentPage:o,setItemsPerPage:c})=>{let s=i*a,d=s-a,p=e.slice(d,s);return n.createElement(n.Fragment,null,n.createElement(ta,null,n.createElement(Text,{size:12,color:w.text.light_grey},"Showing ",d+1," to"," ",Math.min(s,e.length)," of ",e.length," items"),n.createElement(to,{id:"itemsPerPage",value:a,onChange:e=>{c(Number(e.target.value)),o(1)}},n.createElement(tc,{value:10},"10"),n.createElement(tc,{value:25},"25"),n.createElement(tc,{value:50},"50"),n.createElement(tc,{value:100},"100"))),n.createElement(tl,null,r(),n.createElement(ti,null,p.map((e,r)=>t(e,r)))),0===e.length?l():n.createElement(Pagination,{total:e.length,itemsPerPage:a,currentPage:i,onPageChange:e=>{o(e)}}))};l.ZP.div` - position: relative; - background-color: ${w.colors.blue_grey}; - border-radius: 8px; - padding: 4px; - - div { - color: #f5b175; - } - .ͼb { - color: #64a8fd; - } - .ͼm { - color: ${w.colors.white}; - } - .ͼd { - color: #f5b175; - } - .ͼc { - color: #f5b175; - } - .cm-gutters { - display: none; - border-top-left-radius: 8px; - border-top-right-radius: 8px; - } -`,l.ZP.div` - position: absolute; - top: 0; - left: 0; - right: 0; - bottom: 0; - z-index: 10; // Ensure this is higher than the editor's z-index -`,l.ZP.div` - background-color: ${w.colors.dark}; - z-index: 999; - border-radius: 4px; - padding: 4px; - position: absolute; - top: 5px; - right: 5px; - cursor: pointer; - display: flex; - align-items: center; - justify-content: center; - pointer-events: all; -`;var buildFlowNodesAndEdges=(e,t,r)=>{let n=[],l=[],i="center-1",a=t.length,o=248-100*(a%2==1?Math.floor(a/2):a/2-1),c=e.length,s=248-100*(c%2==1?Math.floor(c/2):c/2-1),d=r?.length>0?r?.length*150+600:600;return n.push({id:i,type:"custom",position:{x:d,y:248},data:{label:"Center Node"}}),e.forEach((e,t)=>{let a=!1;e?.conditions&&(a=e.conditions.some(e=>"False"===e.status));let o=`namespace-${t}`;if(n.push({id:o,type:"source",position:{x:100,y:s+100*t},data:e}),e.metrics){let c=`metric-${t}`;n.push({id:c,type:"metric",position:{x:400,y:s+100*t},data:{metrics:e.metrics}}),l.push({id:`e${o}-${c}`,source:c,target:r?.length>0?"action-0":i,animated:!0,style:{stroke:"#96f3ff8e"},data:null}),l.push({id:`e${o}-${i}`,source:o,target:c,animated:!0,style:{stroke:a?"#ff0000":"#96f3ff8e"},data:null})}else l.push({id:`e${o}-${i}`,source:o,target:r?.length>0?"action-0":i,animated:!0,style:{stroke:a?"#ff0000":"#96f3ff8e"},data:null})}),t.forEach((e,t)=>{let r=!1;e?.conditions&&(r=e.conditions.some(e=>"False"===e.status));let a=`destination-${t}`;if(n.push({id:a,type:"destination",position:{x:d+600,y:o+100*t},data:e}),e.metrics){let r=`metric-dest-${t}`;n.push({id:r,type:"metric",position:{x:d+250,y:o+100*t},data:{metrics:e.metrics}}),l.push({id:`e${a}-${r}`,source:i,target:r,animated:!0,style:{stroke:"#96f3ff8e"},data:null}),l.push({id:`e${a}-${r}`,source:r,target:a,animated:!0,style:{stroke:"#96f3ff8e"},data:null})}else l.push({id:`e${i}-${a}`,source:i,target:a,animated:!0,style:{stroke:r?"#ff0000":"#96f3ff8e"},data:null})}),r.forEach((e,t)=>{let a=`action-${t}`,o=`action-${t+1}`;n.push({id:a,type:"action",position:{x:620+125*t,y:250},data:e}),l.push({id:`e${i}-${a}`,source:a,target:t+1===r.length?i:o,animated:!0,style:{stroke:"#96f3ff8e"},data:null})}),{nodes:n,edges:l}},{nodes:ts,edges:td}=buildFlowNodesAndEdges([{name:"adservice",kind:"Deployment",namespace:"default",metrics:{data_transfer:"3.8 KB/s",cpu_usage:"3.8%",memory_usage:"3.8%"},languages:[{container_name:"server",language:"java"}]},{name:"cartservice",kind:"Deployment",namespace:"default",metrics:{data_transfer:"2.3 KB/s",cpu_usage:"3.8%",memory_usage:"3.8%"},languages:[{container_name:"server",language:"dotnet"}]},{name:"checkoutservice",kind:"Deployment",namespace:"default",metrics:{data_transfer:"0 Byte transfered",cpu_usage:"3.8%",memory_usage:"3.8%"},languages:[{container_name:"server",language:"go"}]},{name:"coupon",kind:"Deployment",namespace:"default",metrics:{data_transfer:"3.8 KB/s",cpu_usage:"3.8%",memory_usage:"3.8%"},languages:[{container_name:"coupon",language:"javascript"}]}],[{id:"odigos.io.dest.elasticsearch-6qklw",name:"Elasticsearch",type:"elasticsearch",metrics:{data_transfer:"3.8 KB/s",cpu_usage:"3.8%",memory_usage:"3.8%"},signals:{traces:!0,metrics:!1,logs:!0},fields:{ELASTICSEARCH_CA_PEM:"-----BEGIN CERTIFICATE-----\nMIIDIjCCAgqgAwIBAgIRANR/chGx5YexmqgwbVphZR8wDQYJKoZIhvcNAQELBQAw\nGzEZMBcGA1UEAxMQZWxhc3RpY3NlYXJjaC1jYTAeFw0yNDAzMDYxMjUwNTFaFw0y\nNTAzMDYxMjUwNTFaMBsxGTAXBgNVBAMTEGVsYXN0aWNzZWFyY2gtY2EwggEiMA0G\nCSqGSIb3DQEBAQUAA4IBDwAwggEKAoIBAQClNK8WB2C2aRC1xPkT9Vx3t2I8D8vE\nz4/XKi5djhqZx56VclUmnTGwwJSB6t+9eODVGM8HUBeZTw5r5VU3wz5KO34LfX/X\nDgeZf7jRE4JvNti+ufhYeXhX6yWt2y1lisTy89BMZA1/4r6UBamhDZ9zjC7++hNy\n21S+mgul4zrjC1fBfjz8O42jjkamNcq3SoQHn9puWPhsOBOc4SowJMFN6YIRf3Vy\nPvOuG8wP5uCU14dICW7X5M1JqHpcOTW0W7S5JLcVkozrqEQhQ3lc5f4OE0/GYQ5S\np5sesAUyv9Koiipx3gGvip2+E2Rf2nlLNNMYeFDKyRVmbxkOmIy6PVQdAgMBAAGj\nYTBfMA4GA1UdDwEB/wQEAwICpDAdBgNVHSUEFjAUBggrBgEFBQcDAQYIKwYBBQUH\nAwIwDwYDVR0TAQH/BAUwAwEB/zAdBgNVHQ4EFgQUUh7RgBmgPOCGeP3hFqoVC689\nm4kwDQYJKoZIhvcNAQELBQADggEBAJCpewxuRV0s6EftuHI7Q1PJDYImDv54D1GI\n57nJwdhCZbvJ69m5hjtOAb7ZCerzJQKvN4sEcvcWPMJs15nBNXW+9fF0zN5RjBqU\nV8HA22bw8h+00lGUiozgG4DmFkd0GG35qjhPe9PyirOumiaSi2aGMUiWtkOgAFE2\nDKGLleYFdjDbfQjva/ViUJTo6I7b283foWEqkbaa58ju5QOtjpo09GOmyBXeXHoU\nbLnUqBAALo7FDSdKyMjWRLKSo2rc7jRn98jXzPqRaVuYhEGn+77GnkA5d3ea3fHP\nIrj44yKh8na1xqPEHEvryj9LnKL+yCpQILj5L+jIHVopTmQWyLQ=\n-----END CERTIFICATE-----",ELASTICSEARCH_PASSWORD:"Elasticsearch",ELASTICSEARCH_URL:"Elasticsearch",ELASTICSEARCH_USERNAME:"Elasticsearch",ES_LOGS_INDEX:"Elasticsearch",ES_TRACES_INDEX:"Elasticsearch"},destination_type:{type:"elasticsearch",display_name:"Elasticsearch",image_url:"https:/d15jtxgb40qetw.cloudfront.net/elasticsearch.svg",supported_signals:{traces:{supported:!0},metrics:{supported:!1},logs:{supported:!0}}}},{id:"odigos.io.dest.grafanacloudprometheus-2mcbr",name:"Prometheus",type:"grafanacloudprometheus",signals:{traces:!1,metrics:!0,logs:!1},fields:{GRAFANA_CLOUD_PROMETHEUS_PASSWORD:"Prometheus",GRAFANA_CLOUD_PROMETHEUS_RW_ENDPOINT:"Prometheus",GRAFANA_CLOUD_PROMETHEUS_USERNAME:"Prometheus",PROMETHEUS_RESOURCE_ATTRIBUTES_LABELS:'["k8s.container.name","k8s.pod.name","k8s.namespace.name","Prometheus"]',PROMETHEUS_RESOURCE_EXTERNAL_LABELS:'{"dsfd":"fdsfs"}'},destination_type:{type:"grafanacloudprometheus",display_name:"Grafana Cloud Prometheus",image_url:"https:/d15jtxgb40qetw.cloudfront.net/grafana.svg",supported_signals:{traces:{supported:!1},metrics:{supported:!0},logs:{supported:!1}}}},{id:"odigos.io.dest.s3-gk7bn",name:"aws",type:"s3",metrics:{data_transfer:"3.8111 KB/s",cpu_usage:"3.8%",memory_usage:"3.8%"},signals:{traces:!0,metrics:!0,logs:!0},fields:{S3_BUCKET:"aws",S3_MARSHALER:"otlp_proto",S3_PARTITION:"minute",S3_REGION:"aws"},destination_type:{type:"s3",display_name:"AWS S3",image_url:"https:/d15jtxgb40qetw.cloudfront.net/s3.svg",supported_signals:{traces:{supported:!0},metrics:{supported:!0},logs:{supported:!0}}}}],[{id:"aci-f6c9f",type:"AddClusterInfo",spec:{actionName:"Cluster Attributes",notes:"Actions are a way to modify the OpenTelemetry data recorded by Odigos Sources, before it is exported to your Odigos Destinations.",signals:["METRICS","TRACES"],clusterAttributes:[{attributeName:"Attributes",attributeStringValue:"Attributes"}]}},{id:"aci-hfgcb",type:"DeleteAttribute",spec:{actionName:"Link",notes:"Link to docs",signals:["LOGS","METRICS","TRACES"],clusterAttributes:[{attributeName:"sadsad",attributeStringValue:"sadsa"},{attributeName:"asdsa",attributeStringValue:"asdasd"}]}},{id:"aci-r67mp",type:"RenameAttribute",spec:{actionName:"Initialize Initialize",notes:"This is the initialization phase of the cluster.",signals:["LOGS","METRICS","TRACES"],clusterAttributes:[{attributeName:"region",attributeStringValue:"us-east-1"},{attributeName:"instanceType",attributeStringValue:"t2.micro"},{attributeName:"availabilityZones",attributeStringValue:"3"}]}}]),tp=l.ZP.div` - width: ${({size:e})=>e||24}px; - height: ${({size:e})=>e||24}px; - display: inline-flex; - align-items: center; - justify-content: center; -`,LogsIcon=({...e})=>n.createElement(tp,{...e},n.createElement(logs_grey_default,null)),LogsFocusIcon=({...e})=>n.createElement(tp,{...e},n.createElement(logs_blue_default,null)),TraceIcon=({...e})=>n.createElement(tp,{...e},n.createElement(tree_structure_grey_default,null)),TraceFocusIcon=({...e})=>n.createElement(tp,{...e},n.createElement(tree_structure_blue_default,null)),MetricsIcon=({...e})=>n.createElement(tp,{...e},n.createElement(chart_line_grey_default,null)),MetricsFocusIcon=({...e})=>n.createElement(tp,{...e},n.createElement(chart_line_blue_default,null)),AddClusterInfoIcon=({...e})=>n.createElement(tp,{...e},n.createElement(cluster_attr_default,null)),DeleteAttributeIcon=({...e})=>n.createElement(tp,{...e},n.createElement(delete_attr_default,null)),RenameAttributeIcon=({...e})=>n.createElement(tp,{...e},n.createElement(rename_attr_default,null)),ErrorSamplerIcon=({...e})=>n.createElement(tp,{...e},n.createElement(error_sampler_default,null)),PiiMaskingIcon=({...e})=>n.createElement(tp,{...e},n.createElement(pii_masking_default,null)),LatencySamplerIcon=({...e})=>n.createElement(tp,{...e},n.createElement(latency_sampler_default,null)),ProbabilisticSamplerIcon=({...e})=>n.createElement(tp,{...e},n.createElement(probabilistic_sampler_default,null)),PlusIcon=({...e})=>n.createElement(tp,{...e},n.createElement(plus_default,null)),BackIcon=({...e})=>n.createElement(tp,{...e},n.createElement(back_default,null)),RightArrowIcon=({size:e,color:t,...r})=>n.createElement(tp,{size:e,color:t,...r},n.createElement(arrow_right_default,null)),ChargeIcon=({size:e,color:t,...r})=>n.createElement(tp,{size:e,color:t,...r},n.createElement(charge_rect_default,null)),ConnectIcon=({size:e,color:t,...r})=>n.createElement(tp,{size:e,color:t,...r},n.createElement(connect_default,null)),WhiteArrowIcon=({size:e,color:t,...r})=>n.createElement(tp,{size:e,color:t,...r},n.createElement(white_arrow_right_default,null)),LinkIcon=({size:e,color:t,...r})=>n.createElement(tp,{size:e,color:t,...r},n.createElement(link_default,null)),GreenCheckIcon=({size:e,color:t,...r})=>n.createElement(tp,{size:e,color:t,...r},n.createElement(green_check_default,null)),RedErrorIcon=({size:e,color:t,...r})=>n.createElement(tp,{size:e,color:t,...r},n.createElement(red_error_default,null)),BlueInfoIcon=({size:e,color:t,...r})=>n.createElement(tp,{size:e,color:t,...r},n.createElement(blue_info_default,null)),BellIcon=({size:e,color:t,...r})=>n.createElement(tp,{size:e,color:t,...r},n.createElement(bell_default,null)),FocusOverviewIcon=({...e})=>n.createElement(tp,{...e},n.createElement(focus_overview_default,null)),UnFocusOverviewIcon=({...e})=>n.createElement(tp,{...e},n.createElement(unfocus_overview_default,null)),FocusSourcesIcon=({...e})=>n.createElement(tp,{...e},n.createElement(sources_focus_default,null)),UnFocusSourcesIcon=({...e})=>n.createElement(tp,{...e},n.createElement(sources_unfocus_default,null)),FocusDestinationsIcon=({...e})=>n.createElement(tp,{...e},n.createElement(destinations_focus_default,null)),UnFocusDestinationsIcon=({...e})=>n.createElement(tp,{...e},n.createElement(destinations_unfocus_default,null)),FocusActionIcon=({...e})=>n.createElement(tp,{...e},n.createElement(transform_focus_default,null)),UnFocusActionIcon=({...e})=>n.createElement(tp,{...e},n.createElement(transform_unfocus_default,null))}}]); \ No newline at end of file diff --git a/frontend/webapp/dep-out/_next/static/chunks/app/(overview)/(actions)/actions/page-c88b8d4bf03c17b2.js b/frontend/webapp/dep-out/_next/static/chunks/app/(overview)/(actions)/actions/page-c88b8d4bf03c17b2.js deleted file mode 100644 index a2295aeae1..0000000000 --- a/frontend/webapp/dep-out/_next/static/chunks/app/(overview)/(actions)/actions/page-c88b8d4bf03c17b2.js +++ /dev/null @@ -1 +0,0 @@ -(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[280],{2906:function(n,e,t){Promise.resolve().then(t.bind(t,3178))},3178:function(n,e,t){"use strict";t.r(e),t.d(e,{default:function(){return ActionsPage}}),t(2265);var r=t(1032),s=t(3024),u=t(9628),c=t(7437);function ActionsPage(){return(0,c.jsxs)(c.Fragment,{children:[(0,c.jsx)(s.rc,{title:r.mD.MENU.ACTIONS}),(0,c.jsx)(u.aF,{})]})}}},function(n){n.O(0,[573,727,28,845,320,433,267,374,32,585,785,152,971,650,744],function(){return n(n.s=2906)}),_N_E=n.O()}]); \ No newline at end of file diff --git a/frontend/webapp/dep-out/_next/static/chunks/app/(overview)/(actions)/choose-action/page-9d2c2a74322e30fa.js b/frontend/webapp/dep-out/_next/static/chunks/app/(overview)/(actions)/choose-action/page-9d2c2a74322e30fa.js deleted file mode 100644 index 9b05aca49e..0000000000 --- a/frontend/webapp/dep-out/_next/static/chunks/app/(overview)/(actions)/choose-action/page-9d2c2a74322e30fa.js +++ /dev/null @@ -1 +0,0 @@ -(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[8],{1715:function(n,e,t){Promise.resolve().then(t.bind(t,464))},464:function(n,e,t){"use strict";t.r(e),t.d(e,{default:function(){return ChooseActionPage}}),t(2265);var c=t(1032),o=t(4033),u=t(3024),r=t(9628),i=t(7437);function ChooseActionPage(){var n=(0,o.useRouter)();return(0,i.jsxs)(i.Fragment,{children:[(0,i.jsx)(u.rc,{onBackClick:function(){n.back()},title:c.mD.MENU.ACTIONS}),(0,i.jsx)(r.M3,{})]})}}},function(n){n.O(0,[573,727,28,845,320,433,267,374,32,585,785,152,971,650,744],function(){return n(n.s=1715)}),_N_E=n.O()}]); \ No newline at end of file diff --git a/frontend/webapp/dep-out/_next/static/chunks/app/(overview)/(actions)/create-action/page-9925ce5e449c4aa0.js b/frontend/webapp/dep-out/_next/static/chunks/app/(overview)/(actions)/create-action/page-9925ce5e449c4aa0.js deleted file mode 100644 index 9383aa7c2c..0000000000 --- a/frontend/webapp/dep-out/_next/static/chunks/app/(overview)/(actions)/create-action/page-9925ce5e449c4aa0.js +++ /dev/null @@ -1 +0,0 @@ -(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[472],{8224:function(n,e,t){Promise.resolve().then(t.bind(t,6678))},6678:function(n,e,t){"use strict";t.r(e),t.d(e,{default:function(){return CreateActionPage}}),t(2265);var r=t(1032),c=t(4033),u=t(3024),i=t(9628),o=t(7437);function CreateActionPage(){var n=(0,c.useRouter)();return(0,o.jsxs)(o.Fragment,{children:[(0,o.jsx)(u.rc,{onBackClick:function(){n.back()},title:r.mD.CREATE_ACTION}),(0,o.jsx)(i.Pn,{})]})}}},function(n){n.O(0,[573,727,28,845,320,433,267,374,32,585,785,152,971,650,744],function(){return n(n.s=8224)}),_N_E=n.O()}]); \ No newline at end of file diff --git a/frontend/webapp/dep-out/_next/static/chunks/app/(overview)/(actions)/edit-action/page-421d5e831a7b4a6f.js b/frontend/webapp/dep-out/_next/static/chunks/app/(overview)/(actions)/edit-action/page-421d5e831a7b4a6f.js deleted file mode 100644 index af9b6f4d1a..0000000000 --- a/frontend/webapp/dep-out/_next/static/chunks/app/(overview)/(actions)/edit-action/page-421d5e831a7b4a6f.js +++ /dev/null @@ -1 +0,0 @@ -(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[832],{1194:function(n,t,e){Promise.resolve().then(e.bind(e,6376))},6376:function(n,t,e){"use strict";e.r(t),e.d(t,{default:function(){return EditActionPage}}),e(2265);var c=e(1032),i=e(4033),u=e(3024),r=e(9628),o=e(7437);function EditActionPage(){var n=(0,i.useRouter)();return(0,o.jsxs)(o.Fragment,{children:[(0,o.jsx)(u.rc,{onBackClick:function(){n.back()},title:c.mD.EDIT_ACTION}),(0,o.jsx)(r.bI,{})]})}}},function(n){n.O(0,[573,727,28,845,320,433,267,374,32,585,785,152,971,650,744],function(){return n(n.s=1194)}),_N_E=n.O()}]); \ No newline at end of file diff --git a/frontend/webapp/dep-out/_next/static/chunks/app/(overview)/(destinations)/create-destination/page-456bd48471b4b7a3.js b/frontend/webapp/dep-out/_next/static/chunks/app/(overview)/(destinations)/create-destination/page-456bd48471b4b7a3.js deleted file mode 100644 index 059c5d394a..0000000000 --- a/frontend/webapp/dep-out/_next/static/chunks/app/(overview)/(destinations)/create-destination/page-456bd48471b4b7a3.js +++ /dev/null @@ -1 +0,0 @@ -(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[814],{4282:function(e,n,t){Promise.resolve().then(t.bind(t,2769))},2769:function(e,n,t){"use strict";t.r(n),t.d(n,{default:function(){return CreateNewDestinationPage}});var u=t(3884),i=t(7437);function CreateNewDestinationPage(){return(0,i.jsx)(u.kt,{})}}},function(e){e.O(0,[573,727,28,845,320,433,267,374,32,585,785,152,971,650,744],function(){return e(e.s=4282)}),_N_E=e.O()}]); \ No newline at end of file diff --git a/frontend/webapp/dep-out/_next/static/chunks/app/(overview)/(destinations)/destinations/page-6919d35a2eea53be.js b/frontend/webapp/dep-out/_next/static/chunks/app/(overview)/(destinations)/destinations/page-6919d35a2eea53be.js deleted file mode 100644 index 9c99b696f9..0000000000 --- a/frontend/webapp/dep-out/_next/static/chunks/app/(overview)/(destinations)/destinations/page-6919d35a2eea53be.js +++ /dev/null @@ -1 +0,0 @@ -(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[668],{2426:function(n,e,t){Promise.resolve().then(t.bind(t,8584))},8584:function(n,e,t){"use strict";t.r(e),t.d(e,{default:function(){return DestinationDashboardPage}});var r=t(1032),s=t(3024),i=t(9628),u=t(7437);function DestinationDashboardPage(){return(0,u.jsxs)(u.Fragment,{children:[(0,u.jsx)(s.rc,{title:r.mD.MENU.DESTINATIONS}),(0,u.jsx)(i.Z9,{})]})}}},function(n){n.O(0,[573,727,28,845,320,433,267,374,32,585,785,152,971,650,744],function(){return n(n.s=2426)}),_N_E=n.O()}]); \ No newline at end of file diff --git a/frontend/webapp/dep-out/_next/static/chunks/app/(overview)/(destinations)/edit-destination/page-cef48ef1b3b0c33f.js b/frontend/webapp/dep-out/_next/static/chunks/app/(overview)/(destinations)/edit-destination/page-cef48ef1b3b0c33f.js deleted file mode 100644 index 54d8a9e3aa..0000000000 --- a/frontend/webapp/dep-out/_next/static/chunks/app/(overview)/(destinations)/edit-destination/page-cef48ef1b3b0c33f.js +++ /dev/null @@ -1 +0,0 @@ -(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[729],{5482:function(n,e,t){Promise.resolve().then(t.bind(t,2427))},2427:function(n,e,t){"use strict";t.r(e),t.d(e,{default:function(){return ManageDestinationPage}});var u=t(3884),i=t(7437);function ManageDestinationPage(){return(0,i.jsx)(u.On,{})}}},function(n){n.O(0,[573,727,28,845,320,433,267,374,32,585,785,152,971,650,744],function(){return n(n.s=5482)}),_N_E=n.O()}]); \ No newline at end of file diff --git a/frontend/webapp/dep-out/_next/static/chunks/app/(overview)/(destinations)/select-destination/page-a8b34a4a7118de62.js b/frontend/webapp/dep-out/_next/static/chunks/app/(overview)/(destinations)/select-destination/page-a8b34a4a7118de62.js deleted file mode 100644 index c95d70331b..0000000000 --- a/frontend/webapp/dep-out/_next/static/chunks/app/(overview)/(destinations)/select-destination/page-a8b34a4a7118de62.js +++ /dev/null @@ -1 +0,0 @@ -(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[117],{1459:function(e,n,t){Promise.resolve().then(t.bind(t,3078))},3078:function(e,n,t){"use strict";t.r(n),t.d(n,{default:function(){return CreateDestinationPage}});var i=t(3884),r=t(7437);function CreateDestinationPage(){return(0,r.jsx)("div",{style:{height:"100vh"},children:(0,r.jsx)(i.HU,{})})}}},function(e){e.O(0,[573,727,28,845,320,433,267,374,32,585,785,152,971,650,744],function(){return e(e.s=1459)}),_N_E=e.O()}]); \ No newline at end of file diff --git a/frontend/webapp/dep-out/_next/static/chunks/app/(overview)/(instrumentation-rules)/choose-rule/page-b47c17fdea99760d.js b/frontend/webapp/dep-out/_next/static/chunks/app/(overview)/(instrumentation-rules)/choose-rule/page-b47c17fdea99760d.js deleted file mode 100644 index b7e0f27b8b..0000000000 --- a/frontend/webapp/dep-out/_next/static/chunks/app/(overview)/(instrumentation-rules)/choose-rule/page-b47c17fdea99760d.js +++ /dev/null @@ -1 +0,0 @@ -(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[626],{1231:function(n,e,t){Promise.resolve().then(t.bind(t,5999))},5999:function(n,e,t){"use strict";t.r(e),t.d(e,{default:function(){return ChooseInstrumentationRulesPage}}),t(2265);var u=t(1032),s=t(4033),r=t(3024),o=t(9628),c=t(7437);function ChooseInstrumentationRulesPage(){var n=(0,s.useRouter)();return(0,c.jsxs)(c.Fragment,{children:[(0,c.jsx)(r.rc,{onBackClick:function(){n.back()},title:u.mD.MENU.INSTRUMENTATION_RULES}),(0,c.jsx)(o.s0,{})]})}}},function(n){n.O(0,[573,727,28,845,320,433,267,374,32,585,785,152,971,650,744],function(){return n(n.s=1231)}),_N_E=n.O()}]); \ No newline at end of file diff --git a/frontend/webapp/dep-out/_next/static/chunks/app/(overview)/(instrumentation-rules)/create-rule/page-f0b192b8eded7b66.js b/frontend/webapp/dep-out/_next/static/chunks/app/(overview)/(instrumentation-rules)/create-rule/page-f0b192b8eded7b66.js deleted file mode 100644 index b369c08ef6..0000000000 --- a/frontend/webapp/dep-out/_next/static/chunks/app/(overview)/(instrumentation-rules)/create-rule/page-f0b192b8eded7b66.js +++ /dev/null @@ -1 +0,0 @@ -(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[741],{5987:function(n,e,t){Promise.resolve().then(t.bind(t,6706))},6706:function(n,e,t){"use strict";t.r(e),t.d(e,{default:function(){return CreateActionPage}}),t(2265);var r=t(1032),c=t(4033),u=t(3024),i=t(9628),o=t(7437);function CreateActionPage(){var n=(0,c.useRouter)();return(0,o.jsxs)(o.Fragment,{children:[(0,o.jsx)(u.rc,{onBackClick:function(){n.back()},title:r.mD.CREATE_INSTRUMENTATION_RULE}),(0,o.jsx)(i.Jg,{})]})}}},function(n){n.O(0,[573,727,28,845,320,433,267,374,32,585,785,152,971,650,744],function(){return n(n.s=5987)}),_N_E=n.O()}]); \ No newline at end of file diff --git a/frontend/webapp/dep-out/_next/static/chunks/app/(overview)/(instrumentation-rules)/edit-rule/page-1ef5e1f10295d805.js b/frontend/webapp/dep-out/_next/static/chunks/app/(overview)/(instrumentation-rules)/edit-rule/page-1ef5e1f10295d805.js deleted file mode 100644 index 8093e308a8..0000000000 --- a/frontend/webapp/dep-out/_next/static/chunks/app/(overview)/(instrumentation-rules)/edit-rule/page-1ef5e1f10295d805.js +++ /dev/null @@ -1 +0,0 @@ -(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[99],{6497:function(n,t,e){Promise.resolve().then(e.bind(e,7461))},7461:function(n,t,e){"use strict";e.r(t),e.d(t,{default:function(){return EditInstrumentationRulePage}}),e(2265);var u=e(4033),i=e(3024),r=e(9628),c=e(7437);function EditInstrumentationRulePage(){var n=(0,u.useRouter)();return(0,c.jsxs)(c.Fragment,{children:[(0,c.jsx)(i.rc,{onBackClick:function(){n.back()},title:"Edit Instrumentation Rule"}),(0,c.jsx)(r.cA,{})]})}}},function(n){n.O(0,[573,727,28,845,320,433,267,374,32,585,785,152,971,650,744],function(){return n(n.s=6497)}),_N_E=n.O()}]); \ No newline at end of file diff --git a/frontend/webapp/dep-out/_next/static/chunks/app/(overview)/(instrumentation-rules)/instrumentation-rules/page-9859babba926961d.js b/frontend/webapp/dep-out/_next/static/chunks/app/(overview)/(instrumentation-rules)/instrumentation-rules/page-9859babba926961d.js deleted file mode 100644 index 73ede3c5f6..0000000000 --- a/frontend/webapp/dep-out/_next/static/chunks/app/(overview)/(instrumentation-rules)/instrumentation-rules/page-9859babba926961d.js +++ /dev/null @@ -1 +0,0 @@ -(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[365],{9788:function(n,e,t){Promise.resolve().then(t.bind(t,3509))},3509:function(n,e,t){"use strict";t.r(e),t.d(e,{default:function(){return InstrumentationRulesPage}}),t(2265);var u=t(1032),r=t(3024),s=t(8078),i=t(7437);function InstrumentationRulesPage(){return(0,i.jsxs)(i.Fragment,{children:[(0,i.jsx)(r.rc,{title:u.mD.MENU.INSTRUMENTATION_RULES}),(0,i.jsx)(s.Nc,{})]})}}},function(n){n.O(0,[573,727,28,845,320,433,267,374,32,585,785,152,971,650,744],function(){return n(n.s=9788)}),_N_E=n.O()}]); \ No newline at end of file diff --git a/frontend/webapp/dep-out/_next/static/chunks/app/(overview)/(sources)/edit-source/page-ac30dc7538b65a92.js b/frontend/webapp/dep-out/_next/static/chunks/app/(overview)/(sources)/edit-source/page-ac30dc7538b65a92.js deleted file mode 100644 index 3ed9f8dfd5..0000000000 --- a/frontend/webapp/dep-out/_next/static/chunks/app/(overview)/(sources)/edit-source/page-ac30dc7538b65a92.js +++ /dev/null @@ -1 +0,0 @@ -(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[761],{5280:function(n,e,u){Promise.resolve().then(u.bind(u,7334))},7334:function(n,e,u){"use strict";u.r(e),u.d(e,{default:function(){return EditSourcePage}}),u(2265);var t=u(9628),r=u(7437);function EditSourcePage(){return(0,r.jsx)(t.ZJ,{})}}},function(n){n.O(0,[573,727,28,845,320,433,267,374,32,585,785,152,971,650,744],function(){return n(n.s=5280)}),_N_E=n.O()}]); \ No newline at end of file diff --git a/frontend/webapp/dep-out/_next/static/chunks/app/(overview)/(sources)/select-sources/page-7aee0d475614971c.js b/frontend/webapp/dep-out/_next/static/chunks/app/(overview)/(sources)/select-sources/page-7aee0d475614971c.js deleted file mode 100644 index 9c988a7566..0000000000 --- a/frontend/webapp/dep-out/_next/static/chunks/app/(overview)/(sources)/select-sources/page-7aee0d475614971c.js +++ /dev/null @@ -1 +0,0 @@ -(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[440],{9127:function(e,n,u){Promise.resolve().then(u.bind(u,8393))},8393:function(e,n,u){"use strict";u.r(n),u.d(n,{default:function(){return CreateNewSourcesPage}});var r=u(9628),t=u(7437);function CreateNewSourcesPage(){return(0,t.jsx)(r.$G,{})}}},function(e){e.O(0,[573,727,28,845,320,433,267,374,32,585,785,152,971,650,744],function(){return e(e.s=9127)}),_N_E=e.O()}]); \ No newline at end of file diff --git a/frontend/webapp/dep-out/_next/static/chunks/app/(overview)/(sources)/sources/page-a2185e7c3a28f3ba.js b/frontend/webapp/dep-out/_next/static/chunks/app/(overview)/(sources)/sources/page-a2185e7c3a28f3ba.js deleted file mode 100644 index 35b33c66ca..0000000000 --- a/frontend/webapp/dep-out/_next/static/chunks/app/(overview)/(sources)/sources/page-a2185e7c3a28f3ba.js +++ /dev/null @@ -1 +0,0 @@ -(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[505],{159:function(n,e,r){Promise.resolve().then(r.bind(r,927))},927:function(n,e,r){"use strict";r.r(e),r.d(e,{default:function(){return SourcesPage}}),r(2265);var t=r(1032),u=r(3024),s=r(9628),c=r(7437);function SourcesPage(){return(0,c.jsxs)(c.Fragment,{children:[(0,c.jsx)(u.rc,{title:t.mD.MENU.SOURCES}),(0,c.jsx)(s.mj,{})]})}}},function(n){n.O(0,[573,727,28,845,320,433,267,374,32,585,785,152,971,650,744],function(){return n(n.s=159)}),_N_E=n.O()}]); \ No newline at end of file diff --git a/frontend/webapp/dep-out/_next/static/chunks/app/(overview)/layout-6a84a7ad7a1e10cf.js b/frontend/webapp/dep-out/_next/static/chunks/app/(overview)/layout-6a84a7ad7a1e10cf.js deleted file mode 100644 index a8d9c7fad3..0000000000 --- a/frontend/webapp/dep-out/_next/static/chunks/app/(overview)/layout-6a84a7ad7a1e10cf.js +++ /dev/null @@ -1 +0,0 @@ -(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[269],{7232:function(e,n,t){Promise.resolve().then(t.bind(t,9156))},9156:function(e,n,t){"use strict";t.r(n),t.d(n,{Menu:function(){return Menu}});var i,o,a,r,c=t(2265),s=t(3587),u=s.ZP.div.withConfig({displayName:"menustyled__MenuContainer",componentId:"sc-1pksxwc-0"})(["transition:width 0.1s;height:100%;border-right:1px solid rgba(255,255,255,0.04);background:",";width:","px;"],function(e){return e.theme.colors.dark_blue},function(e){return e.$isExpanded?234:70}),l=s.ZP.div.withConfig({displayName:"menustyled__LogoWrapper",componentId:"sc-1pksxwc-1"})(["cursor:pointer;padding:24px 16px;height:48px;position:relative;opacity:0;animation:slideInFromLeft 2s forwards;@keyframes slideInFromLeft{to{left:0;opacity:1;}}"]),d=s.ZP.div.withConfig({displayName:"menustyled__MenuItemsWrapper",componentId:"sc-1pksxwc-2"})(["padding:16px 9px;"]),p=(0,s.ZP)(d).withConfig({displayName:"menustyled__ContactUsWrapper",componentId:"sc-1pksxwc-3"})(["position:absolute;bottom:0%;"]),f=t(299),m=t(7437),h=s.zo.div.withConfig({displayName:"menuitem__MenuItemContainer",componentId:"sc-1md7iy9-0"})(["display:flex;cursor:pointer;width:",";border-radius:10px;background:",";margin-bottom:4px;&:hover{background:",";}"],function(e){return e.expand?"100%":"48px"},function(e){var n=e.focused,t=e.theme;return n?t.colors.blue_grey:"transparent"},function(e){return e.theme.colors.blue_grey}),x=s.zo.div.withConfig({displayName:"menuitem__TextWrapper",componentId:"sc-1md7iy9-1"})(["display:flex;align-items:center;justify-content:center;position:relative;left:-5%;opacity:0;animation:slideInFromLeft 0.5s forwards;@keyframes slideInFromLeft{to{left:",";opacity:",";}}"],function(e){return e.expand?"0":"-10%"},function(e){return e.expand?"1":"0"}),g=s.zo.div.withConfig({displayName:"menuitem__IconWrapper",componentId:"sc-1md7iy9-2"})(["height:48px;width:48px;display:flex;align-items:center;justify-content:center;"]);function MenuItem(e){var n,t=e.item,i=e.focused,o=e.onClick,a=e.expand,r=void 0!==a&&a,s=t.name,u=t.icons,l=(0,c.useState)(!1),d=l[0],p=l[1];(0,c.useEffect)(function(){return r?n=setTimeout(function(){p(!0)},20):p(!1),function(){return clearTimeout(n)}},[r]);var v=i?u.focus():u.notFocus();return(0,m.jsxs)(h,{"data-cy":"menu-"+s,onClick:o,focused:i,expand:r,children:[(0,m.jsx)(g,{children:v}),d&&(0,m.jsx)(x,{expand:d,children:(0,m.jsx)(f.xJ,{size:14,weight:600,children:s})})]})}var v=t(4033),w=t(3915),E=t(8727),y=t(2245),_=[{id:1,name:w.mD.MENU.OVERVIEW,icons:{focus:function(){return(0,m.jsx)(E.Pc,{})},notFocus:function(){return(0,m.jsx)(E.If,{})}},navigate:w.Z6.OVERVIEW},{id:2,name:w.mD.MENU.SOURCES,icons:{focus:function(){return(0,m.jsx)(E.uY,{})},notFocus:function(){return(0,m.jsx)(E.Kl,{})}},navigate:w.Z6.SOURCES},{id:3,name:w.mD.MENU.INSTRUMENTATION_RULES,icons:{focus:function(){return(0,m.jsx)(y.al,{style:{width:24}})},notFocus:function(){return(0,m.jsx)(y.oe,{style:{width:24}})}},navigate:w.Z6.INSTRUMENTATION_RULES},{id:4,name:w.mD.MENU.ACTIONS,icons:{focus:function(){return(0,m.jsx)(E.uA,{})},notFocus:function(){return(0,m.jsx)(E.wZ,{})}},navigate:w.Z6.ACTIONS},{id:5,name:w.mD.MENU.DESTINATIONS,icons:{focus:function(){return(0,m.jsx)(E.wM,{})},notFocus:function(){return(0,m.jsx)(E.Qm,{})}},navigate:w.Z6.DESTINATIONS}],k=t(952);function _extends(){return(_extends=Object.assign?Object.assign.bind():function(e){for(var n=1;n0){n.push(s.Z6.OVERVIEW);return}n.push(s.Z6.CHOOSE_SOURCES)}()},[t]),(0,c.jsx)(r.aN,{})}}},function(n){n.O(0,[573,727,28,845,320,267,32,785,971,650,744],function(){return n(n.s=7690)}),_N_E=n.O()}]); \ No newline at end of file diff --git a/frontend/webapp/dep-out/_next/static/chunks/decd49cc-dce671d85655dfc2.js b/frontend/webapp/dep-out/_next/static/chunks/decd49cc-dce671d85655dfc2.js deleted file mode 100644 index 6a78e29c64..0000000000 --- a/frontend/webapp/dep-out/_next/static/chunks/decd49cc-dce671d85655dfc2.js +++ /dev/null @@ -1 +0,0 @@ -"use strict";(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[28],{4867:function(e,t,n){n.d(t,{AC:function(){return useStoreApi},HH:function(){return L},Ly:function(){return h},_K:function(){return useReactFlow},oR:function(){return useStore},s_:function(){return Panel},tV:function(){return ReactFlowProvider},x$:function(){return eb}});var o,r,a,i,l,s,d,c,u,g,p,h,f=n(7437),m=n(2265),y=n(7026),S=n(4738),x=n(3979),b=n(5945),w=n(8461),v=n(7947),E=n(9398),N=n(2198);n(4887);let C=(0,m.createContext)(null),M=C.Provider,P={error001:()=>"[React Flow]: Seems like you have not used zustand provider as an ancestor. Help: https://reactflow.dev/error#001",error002:()=>"It looks like you've created a new nodeTypes or edgeTypes object. If this wasn't on purpose please define the nodeTypes/edgeTypes outside of the component or memoize them.",error003:e=>`Node type "${e}" not found. Using fallback type "default".`,error004:()=>"The React Flow parent container needs a width and a height to render the graph.",error005:()=>"Only child nodes can use a parent extent.",error006:()=>"Can't create edge. An edge needs a source and a target.",error007:e=>`The old edge with id=${e} does not exist.`,error009:e=>`Marker type "${e}" doesn't exist.`,error008:(e,t)=>`Couldn't create edge for ${e?"target":"source"} handle id: "${e?t.targetHandle:t.sourceHandle}", edge id: ${t.id}.`,error010:()=>"Handle: No node id found. Make sure to only use a Handle inside a custom Node.",error011:e=>`Edge type "${e}" not found. Using fallback type "default".`},A=P.error001();function useStore(e,t){let n=(0,m.useContext)(C);if(null===n)throw Error(A);return(0,S.oR)(n,e,t)}let useStoreApi=()=>{let e=(0,m.useContext)(C);if(null===e)throw Error(A);return(0,m.useMemo)(()=>({getState:e.getState,setState:e.setState,subscribe:e.subscribe,destroy:e.destroy}),[e])},selector$g=e=>e.userSelectionActive?"none":"all";function Panel({position:e,children:t,className:n,style:o,...r}){let a=useStore(selector$g),i=`${e}`.split("-");return(0,f.jsx)("div",{className:(0,y.Z)(["react-flow__panel",n,...i]),style:{...o,pointerEvents:a},...r,children:t})}function Attribution({proOptions:e,position:t="bottom-right"}){return e?.hideAttribution?null:(0,f.jsx)(Panel,{position:t,className:"react-flow__attribution","data-message":"Please only hide this attribution when you are subscribed to React Flow Pro: https://pro.reactflow.dev",children:(0,f.jsx)("a",{href:"https://reactflow.dev",target:"_blank",rel:"noopener noreferrer","aria-label":"React Flow attribution",children:"React Flow"})})}var D=(0,m.memo)(({x:e,y:t,label:n,labelStyle:o={},labelShowBg:r=!0,labelBgStyle:a={},labelBgPadding:i=[2,4],labelBgBorderRadius:l=2,children:s,className:d,...c})=>{let u=(0,m.useRef)(null),[g,p]=(0,m.useState)({x:0,y:0,width:0,height:0}),h=(0,y.Z)(["react-flow__edge-textwrapper",d]);return((0,m.useEffect)(()=>{if(u.current){let e=u.current.getBBox();p({x:e.x,y:e.y,width:e.width,height:e.height})}},[n]),void 0!==n&&n)?(0,f.jsxs)("g",{transform:`translate(${e-g.width/2} ${t-g.height/2})`,className:h,visibility:g.width?"visible":"hidden",...c,children:[r&&(0,f.jsx)("rect",{width:g.width+2*i[0],x:-i[0],y:-i[1],height:g.height+2*i[1],className:"react-flow__edge-textbg",style:a,rx:l,ry:l}),(0,f.jsx)("text",{className:"react-flow__edge-text",y:g.height/2,dy:"0.3em",ref:u,style:o,children:n}),s]}):null});let getDimensions=e=>({width:e.offsetWidth,height:e.offsetHeight}),clamp=(e,t=0,n=1)=>Math.min(Math.max(e,t),n),clampPosition=(e={x:0,y:0},t)=>({x:clamp(e.x,t[0][0],t[1][0]),y:clamp(e.y,t[0][1],t[1][1])}),calcAutoPanVelocity=(e,t,n)=>en?-clamp(Math.abs(e-n),1,50)/50:0,calcAutoPan=(e,t)=>{let n=20*calcAutoPanVelocity(e.x,35,t.width-35),o=20*calcAutoPanVelocity(e.y,35,t.height-35);return[n,o]},getHostForElement=e=>e.getRootNode?.()||window?.document,getBoundsOfBoxes=(e,t)=>({x:Math.min(e.x,t.x),y:Math.min(e.y,t.y),x2:Math.max(e.x2,t.x2),y2:Math.max(e.y2,t.y2)}),rectToBox=({x:e,y:t,width:n,height:o})=>({x:e,y:t,x2:e+n,y2:t+o}),boxToRect=({x:e,y:t,x2:n,y2:o})=>({x:e,y:t,width:n-e,height:o-t}),nodeToRect=e=>({...e.positionAbsolute||{x:0,y:0},width:e.width||0,height:e.height||0}),getOverlappingArea=(e,t)=>{let n=Math.max(0,Math.min(e.x+e.width,t.x+t.width)-Math.max(e.x,t.x)),o=Math.max(0,Math.min(e.y+e.height,t.y+t.height)-Math.max(e.y,t.y));return Math.ceil(n*o)},isRectObject=e=>isNumeric(e.width)&&isNumeric(e.height)&&isNumeric(e.x)&&isNumeric(e.y),isNumeric=e=>!isNaN(e)&&isFinite(e),k=Symbol.for("internals"),$=["Enter"," ","Escape"],devWarn=(e,t)=>{},isReactKeyboardEvent=e=>"nativeEvent"in e;function isInputDOMNode(e){let t=isReactKeyboardEvent(e)?e.nativeEvent:e,n=t.composedPath?.()?.[0]||e.target,o=["INPUT","SELECT","TEXTAREA"].includes(n?.nodeName)||n?.hasAttribute("contenteditable");return o||!!n?.closest(".nokey")}let isMouseEvent=e=>"clientX"in e,getEventPosition=(e,t)=>{let n=isMouseEvent(e),o=n?e.clientX:e.touches?.[0].clientX,r=n?e.clientY:e.touches?.[0].clientY;return{x:o-(t?.left??0),y:r-(t?.top??0)}},BaseEdge=({id:e,path:t,labelX:n,labelY:o,label:r,labelStyle:a,labelShowBg:i,labelBgStyle:l,labelBgPadding:s,labelBgBorderRadius:d,style:c,markerEnd:u,markerStart:g,interactionWidth:p=20})=>(0,f.jsxs)(f.Fragment,{children:[(0,f.jsx)("path",{id:e,style:c,d:t,fill:"none",className:"react-flow__edge-path",markerEnd:u,markerStart:g}),p&&(0,f.jsx)("path",{d:t,fill:"none",strokeOpacity:0,strokeWidth:p,className:"react-flow__edge-interaction"}),r&&isNumeric(n)&&isNumeric(o)?(0,f.jsx)(D,{x:n,y:o,label:r,labelStyle:a,labelShowBg:i,labelBgStyle:l,labelBgPadding:s,labelBgBorderRadius:d}):null]});function getMouseHandler$1(e,t,n){return void 0===n?n:o=>{let r=t().edges.find(t=>t.id===e);r&&n(o,{...r})}}function getEdgeCenter({sourceX:e,sourceY:t,targetX:n,targetY:o}){let r=Math.abs(n-e)/2,a=Math.abs(o-t)/2;return[n{let[S,x,b]=getSimpleBezierPath({sourceX:e,sourceY:t,sourcePosition:r,targetX:n,targetY:o,targetPosition:a});return(0,f.jsx)(BaseEdge,{path:S,labelX:x,labelY:b,label:i,labelStyle:l,labelShowBg:s,labelBgStyle:d,labelBgPadding:c,labelBgBorderRadius:u,style:g,markerEnd:p,markerStart:m,interactionWidth:y})});R.displayName="SimpleBezierEdge";let O={[h.Left]:{x:-1,y:0},[h.Right]:{x:1,y:0},[h.Top]:{x:0,y:-1},[h.Bottom]:{x:0,y:1}},getDirection=({source:e,sourcePosition:t=h.Bottom,target:n})=>t===h.Left||t===h.Right?e.xMath.sqrt(Math.pow(t.x-e.x,2)+Math.pow(t.y-e.y,2));function getSmoothStepPath({sourceX:e,sourceY:t,sourcePosition:n=h.Bottom,targetX:o,targetY:r,targetPosition:a=h.Top,borderRadius:i=5,centerX:l,centerY:s,offset:d=20}){let[c,u,g,p,f]=function({source:e,sourcePosition:t=h.Bottom,target:n,targetPosition:o=h.Top,center:r,offset:a}){let i,l;let s=O[t],d=O[o],c={x:e.x+s.x*a,y:e.y+s.y*a},u={x:n.x+d.x*a,y:n.y+d.y*a},g=getDirection({source:c,sourcePosition:t,target:u}),p=0!==g.x?"x":"y",f=g[p],m=[],[y,S,x,b]=getEdgeCenter({sourceX:e.x,sourceY:e.y,targetX:n.x,targetY:n.y});if(s[p]*d[p]==-1){i=r.x||y,l=r.y||S;let e=[{x:i,y:c.y},{x:i,y:u.y}],t=[{x:c.x,y:l},{x:u.x,y:l}];m=s[p]===f?"x"===p?e:t:"x"===p?t:e}else{let e=[{x:c.x,y:u.y}],n=[{x:u.x,y:c.y}];if(m="x"===p?s.x===f?n:e:s.y===f?e:n,t!==o){let t="x"===p?"y":"x",o=s[p]===d[t],r=c[t]>u[t],a=c[t]e+(n>0&&n{let[x,b,w]=getSmoothStepPath({sourceX:e,sourceY:t,sourcePosition:u,targetX:n,targetY:o,targetPosition:g,borderRadius:y?.borderRadius,offset:y?.offset});return(0,f.jsx)(BaseEdge,{path:x,labelX:b,labelY:w,label:r,labelStyle:a,labelShowBg:i,labelBgStyle:l,labelBgPadding:s,labelBgBorderRadius:d,style:c,markerEnd:p,markerStart:m,interactionWidth:S})});I.displayName="SmoothStepEdge";let H=(0,m.memo)(e=>(0,f.jsx)(I,{...e,pathOptions:(0,m.useMemo)(()=>({borderRadius:0,offset:e.pathOptions?.offset}),[e.pathOptions?.offset])}));H.displayName="StepEdge";let B=(0,m.memo)(({sourceX:e,sourceY:t,targetX:n,targetY:o,label:r,labelStyle:a,labelShowBg:i,labelBgStyle:l,labelBgPadding:s,labelBgBorderRadius:d,style:c,markerEnd:u,markerStart:g,interactionWidth:p})=>{let[h,m,y]=function({sourceX:e,sourceY:t,targetX:n,targetY:o}){let[r,a,i,l]=getEdgeCenter({sourceX:e,sourceY:t,targetX:n,targetY:o});return[`M ${e},${t}L ${n},${o}`,r,a,i,l]}({sourceX:e,sourceY:t,targetX:n,targetY:o});return(0,f.jsx)(BaseEdge,{path:h,labelX:m,labelY:y,label:r,labelStyle:a,labelShowBg:i,labelBgStyle:l,labelBgPadding:s,labelBgBorderRadius:d,style:c,markerEnd:u,markerStart:g,interactionWidth:p})});function calculateControlOffset(e,t){return e>=0?.5*e:25*t*Math.sqrt(-e)}function getControlWithCurvature({pos:e,x1:t,y1:n,x2:o,y2:r,c:a}){switch(e){case h.Left:return[t-calculateControlOffset(t-o,a),n];case h.Right:return[t+calculateControlOffset(o-t,a),n];case h.Top:return[t,n-calculateControlOffset(n-r,a)];case h.Bottom:return[t,n+calculateControlOffset(r-n,a)]}}function getBezierPath({sourceX:e,sourceY:t,sourcePosition:n=h.Bottom,targetX:o,targetY:r,targetPosition:a=h.Top,curvature:i=.25}){let[l,s]=getControlWithCurvature({pos:n,x1:e,y1:t,x2:o,y2:r,c:i}),[d,c]=getControlWithCurvature({pos:a,x1:o,y1:r,x2:e,y2:t,c:i}),[u,g,p,f]=getBezierEdgeCenter({sourceX:e,sourceY:t,targetX:o,targetY:r,sourceControlX:l,sourceControlY:s,targetControlX:d,targetControlY:c});return[`M${e},${t} C${l},${s} ${d},${c} ${o},${r}`,u,g,p,f]}B.displayName="StraightEdge";let T=(0,m.memo)(({sourceX:e,sourceY:t,targetX:n,targetY:o,sourcePosition:r=h.Bottom,targetPosition:a=h.Top,label:i,labelStyle:l,labelShowBg:s,labelBgStyle:d,labelBgPadding:c,labelBgBorderRadius:u,style:g,markerEnd:p,markerStart:m,pathOptions:y,interactionWidth:S})=>{let[x,b,w]=getBezierPath({sourceX:e,sourceY:t,sourcePosition:r,targetX:n,targetY:o,targetPosition:a,curvature:y?.curvature});return(0,f.jsx)(BaseEdge,{path:x,labelX:b,labelY:w,label:i,labelStyle:l,labelShowBg:s,labelBgStyle:d,labelBgPadding:c,labelBgBorderRadius:u,style:g,markerEnd:p,markerStart:m,interactionWidth:S})});T.displayName="BezierEdge";let _=(0,m.createContext)(null),U=_.Provider;_.Consumer;let useNodeId=()=>{let e=(0,m.useContext)(_);return e},isEdge=e=>"id"in e&&"source"in e&&"target"in e,getEdgeId=({source:e,sourceHandle:t,target:n,targetHandle:o})=>`reactflow__edge-${e}${t||""}-${n}${o||""}`,getMarkerId=(e,t)=>{if(void 0===e)return"";if("string"==typeof e)return e;let n=t?`${t}__`:"";return`${n}${Object.keys(e).sort().map(t=>`${t}=${e[t]}`).join("&")}`},connectionExists=(e,t)=>t.some(t=>t.source===e.source&&t.target===e.target&&(t.sourceHandle===e.sourceHandle||!t.sourceHandle&&!e.sourceHandle)&&(t.targetHandle===e.targetHandle||!t.targetHandle&&!e.targetHandle)),addEdge=(e,t)=>{let n;return e.source&&e.target?connectionExists(n=isEdge(e)?{...e}:{...e,id:getEdgeId(e)},t)?t:t.concat(n):(devWarn("006",P.error006()),t)},pointToRendererPoint=({x:e,y:t},[n,o,r],a,[i,l])=>{let s={x:(e-n)/r,y:(t-o)/r};return a?{x:i*Math.round(s.x/i),y:l*Math.round(s.y/l)}:s},rendererPointToPoint=({x:e,y:t},[n,o,r])=>({x:e*r+n,y:t*r+o}),getNodePositionWithOrigin=(e,t=[0,0])=>{if(!e)return{x:0,y:0,positionAbsolute:{x:0,y:0}};let n=(e.width??0)*t[0],o=(e.height??0)*t[1],r={x:e.position.x-n,y:e.position.y-o};return{...r,positionAbsolute:e.positionAbsolute?{x:e.positionAbsolute.x-n,y:e.positionAbsolute.y-o}:r}},getRectOfNodes=(e,t=[0,0])=>{if(0===e.length)return{x:0,y:0,width:0,height:0};let n=e.reduce((e,n)=>{let{x:o,y:r}=getNodePositionWithOrigin(n,t).positionAbsolute;return getBoundsOfBoxes(e,rectToBox({x:o,y:r,width:n.width||0,height:n.height||0}))},{x:1/0,y:1/0,x2:-1/0,y2:-1/0});return boxToRect(n)},getNodesInside=(e,t,[n,o,r]=[0,0,1],a=!1,i=!1,l=[0,0])=>{let s={x:(t.x-n)/r,y:(t.y-o)/r,width:t.width/r,height:t.height/r},d=[];return e.forEach(e=>{let{width:t,height:n,selectable:o=!0,hidden:r=!1}=e;if(i&&!o||r)return!1;let{positionAbsolute:c}=getNodePositionWithOrigin(e,l),u={x:c.x,y:c.y,width:t||0,height:n||0},g=getOverlappingArea(s,u);(void 0===t||void 0===n||null===t||null===n||a&&g>0||g>=(t||0)*(n||0)||e.dragging)&&d.push(e)}),d},getConnectedEdges=(e,t)=>{let n=e.map(e=>e.id);return t.filter(e=>n.includes(e.source)||n.includes(e.target))},getTransformForBounds=(e,t,n,o,r,a=.1)=>{let i=t/(e.width*(1+a)),l=n/(e.height*(1+a)),s=clamp(Math.min(i,l),o,r),d=e.x+e.width/2,c=e.y+e.height/2;return[t/2-d*s,n/2-c*s,s]},getD3Transition=(e,t=0)=>e.transition().duration(t);function getHandles(e,t,n,o){return(t[n]||[]).reduce((t,r)=>(`${e.id}-${r.id}-${n}`!==o&&t.push({id:r.id||null,type:n,nodeId:e.id,x:(e.positionAbsolute?.x??0)+r.x+r.width/2,y:(e.positionAbsolute?.y??0)+r.y+r.height/2}),t),[])}let j={source:null,target:null,sourceHandle:null,targetHandle:null},defaultResult=()=>({handleDomNode:null,isValid:!1,connection:j,endHandle:null});function isValidHandle(e,t,n,o,r,a,i){let l="target"===r,s=i.querySelector(`.react-flow__handle[data-id="${e?.nodeId}-${e?.id}-${e?.type}"]`),c={...defaultResult(),handleDomNode:s};if(s){let e=getHandleType(void 0,s),r=s.getAttribute("data-nodeid"),i=s.getAttribute("data-handleid"),u=s.classList.contains("connectable"),g=s.classList.contains("connectableend"),p={source:l?r:n,sourceHandle:l?i:o,target:l?n:r,targetHandle:l?o:i};c.connection=p;let h=u&&g&&(t===d.Strict?l&&"source"===e||!l&&"target"===e:r!==n||i!==o);h&&(c.endHandle={nodeId:r,handleId:i,type:e},c.isValid=a(p))}return c}function getHandleType(e,t){return e||(t?.classList.contains("target")?"target":t?.classList.contains("source")?"source":null)}function resetRecentHandle(e){e?.classList.remove("valid","connecting","react-flow__handle-valid","react-flow__handle-connecting")}function handlePointerDown({event:e,handleId:t,nodeId:n,onConnect:o,isTarget:r,getState:a,setState:i,isValidConnection:l,edgeUpdaterType:s,onEdgeUpdateEnd:d}){let c,u;let g=getHostForElement(e.target),{connectionMode:p,domNode:h,autoPanOnConnect:f,connectionRadius:m,onConnectStart:y,panBy:S,getNodes:x,cancelConnection:b}=a(),w=0,{x:v,y:E}=getEventPosition(e),N=g?.elementFromPoint(v,E),C=getHandleType(s,N),M=h?.getBoundingClientRect();if(!M||!C)return;let P=getEventPosition(e,M),A=!1,D=null,$=!1,R=null,O=function({nodes:e,nodeId:t,handleId:n,handleType:o}){return e.reduce((e,r)=>{if(r[k]){let{handleBounds:a}=r[k],i=[],l=[];a&&(i=getHandles(r,a,"source",`${t}-${n}-${o}`),l=getHandles(r,a,"target",`${t}-${n}-${o}`)),e.push(...i,...l)}return e},[])}({nodes:x(),nodeId:n,handleId:t,handleType:C}),autoPan=()=>{if(!f)return;let[e,t]=calcAutoPan(P,M);S({x:e,y:t}),w=requestAnimationFrame(autoPan)};function onPointerMove(e){var o,s;let d;let{transform:h}=a();P=getEventPosition(e,M);let{handle:f,validHandleResult:y}=function(e,t,n,o,r,a){let{x:i,y:l}=getEventPosition(e),s=t.elementsFromPoint(i,l),d=s.find(e=>e.classList.contains("react-flow__handle"));if(d){let e=d.getAttribute("data-nodeid");if(e){let t=getHandleType(void 0,d),o=d.getAttribute("data-handleid"),r=a({nodeId:e,id:o,type:t});if(r)return{handle:{id:o,type:t,nodeId:e,x:n.x,y:n.y},validHandleResult:r}}}let c=[],u=1/0;if(r.forEach(e=>{let t=Math.sqrt((e.x-n.x)**2+(e.y-n.y)**2);if(t<=o){let n=a(e);t<=u&&(te.isValid),p=c.some(({handle:e})=>"target"===e.type);return c.find(({handle:e,validHandleResult:t})=>p?"target"===e.type:!g||t.isValid)||c[0]}(e,g,pointToRendererPoint(P,h,!1,[1,1]),m,O,e=>isValidHandle(e,p,n,t,r?"target":"source",l,g));if(c=f,A||(autoPan(),A=!0),R=y.handleDomNode,D=y.connection,$=y.isValid,i({connectionPosition:c&&$?rendererPointToPoint({x:c.x,y:c.y},h):P,connectionStatus:(o=!!c,d=null,(s=$)?d="valid":o&&!s&&(d="invalid"),d),connectionEndHandle:y.endHandle}),!c&&!$&&!R)return resetRecentHandle(u);D.source!==D.target&&R&&(resetRecentHandle(u),u=R,R.classList.add("connecting","react-flow__handle-connecting"),R.classList.toggle("valid",$),R.classList.toggle("react-flow__handle-valid",$))}function onPointerUp(e){(c||R)&&D&&$&&o?.(D),a().onConnectEnd?.(e),s&&d?.(e),resetRecentHandle(u),b(),cancelAnimationFrame(w),A=!1,$=!1,D=null,R=null,g.removeEventListener("mousemove",onPointerMove),g.removeEventListener("mouseup",onPointerUp),g.removeEventListener("touchmove",onPointerMove),g.removeEventListener("touchend",onPointerUp)}i({connectionPosition:P,connectionStatus:null,connectionNodeId:n,connectionHandleId:t,connectionHandleType:C,connectionStartHandle:{nodeId:n,handleId:t,type:C},connectionEndHandle:null}),y?.(e,{nodeId:n,handleId:t,handleType:C}),g.addEventListener("mousemove",onPointerMove),g.addEventListener("mouseup",onPointerUp),g.addEventListener("touchmove",onPointerMove),g.addEventListener("touchend",onPointerUp)}let alwaysValid=()=>!0,selector$f=e=>({connectionStartHandle:e.connectionStartHandle,connectOnClick:e.connectOnClick,noPanClassName:e.noPanClassName}),connectingSelector=(e,t,n)=>o=>{let{connectionStartHandle:r,connectionEndHandle:a,connectionClickStartHandle:i}=o;return{connecting:r?.nodeId===e&&r?.handleId===t&&r?.type===n||a?.nodeId===e&&a?.handleId===t&&a?.type===n,clickConnecting:i?.nodeId===e&&i?.handleId===t&&i?.type===n}},z=(0,m.forwardRef)(({type:e="source",position:t=h.Top,isValidConnection:n,isConnectable:o=!0,isConnectableStart:r=!0,isConnectableEnd:a=!0,id:i,onConnect:l,children:s,className:d,onMouseDown:c,onTouchStart:u,...g},p)=>{let m=i||null,S="target"===e,x=useStoreApi(),w=useNodeId(),{connectOnClick:v,noPanClassName:E}=useStore(selector$f,b.X),{connecting:N,clickConnecting:C}=useStore(connectingSelector(w,m,e),b.X);w||x.getState().onError?.("010",P.error010());let onConnectExtended=e=>{let{defaultEdgeOptions:t,onConnect:n,hasDefaultEdges:o}=x.getState(),r={...t,...e};if(o){let{edges:e,setEdges:t}=x.getState();t(addEdge(r,e))}n?.(r),l?.(r)},onPointerDown=e=>{if(!w)return;let t=isMouseEvent(e);r&&(t&&0===e.button||!t)&&handlePointerDown({event:e,handleId:m,nodeId:w,onConnect:onConnectExtended,isTarget:S,getState:x.getState,setState:x.setState,isValidConnection:n||x.getState().isValidConnection||alwaysValid}),t?c?.(e):u?.(e)};return(0,f.jsx)("div",{"data-handleid":m,"data-nodeid":w,"data-handlepos":t,"data-id":`${w}-${m}-${e}`,className:(0,y.Z)(["react-flow__handle",`react-flow__handle-${t}`,"nodrag",E,d,{source:!S,target:S,connectable:o,connectablestart:r,connectableend:a,connecting:C,connectionindicator:o&&(r&&!N||a&&N)}]),onMouseDown:onPointerDown,onTouchStart:onPointerDown,onClick:v?t=>{let{onClickConnectStart:o,onClickConnectEnd:a,connectionClickStartHandle:i,connectionMode:l,isValidConnection:s}=x.getState();if(!w||!i&&!r)return;if(!i){o?.(t,{nodeId:w,handleId:m,handleType:e}),x.setState({connectionClickStartHandle:{nodeId:w,type:e,handleId:m}});return}let d=getHostForElement(t.target),c=n||s||alwaysValid,{connection:u,isValid:g}=isValidHandle({nodeId:w,id:m,type:e},l,i.nodeId,i.handleId||null,i.type,c,d);g&&onConnectExtended(u),a?.(t),x.setState({connectionClickStartHandle:null})}:void 0,ref:p,...g,children:s})});z.displayName="Handle";var L=(0,m.memo)(z);let DefaultNode=({data:e,isConnectable:t,targetPosition:n=h.Top,sourcePosition:o=h.Bottom})=>(0,f.jsxs)(f.Fragment,{children:[(0,f.jsx)(L,{type:"target",position:n,isConnectable:t}),e?.label,(0,f.jsx)(L,{type:"source",position:o,isConnectable:t})]});DefaultNode.displayName="DefaultNode";var F=(0,m.memo)(DefaultNode);let InputNode=({data:e,isConnectable:t,sourcePosition:n=h.Bottom})=>(0,f.jsxs)(f.Fragment,{children:[e?.label,(0,f.jsx)(L,{type:"source",position:n,isConnectable:t})]});InputNode.displayName="InputNode";var W=(0,m.memo)(InputNode);let OutputNode=({data:e,isConnectable:t,targetPosition:n=h.Top})=>(0,f.jsxs)(f.Fragment,{children:[(0,f.jsx)(L,{type:"target",position:n,isConnectable:t}),e?.label]});OutputNode.displayName="OutputNode";var V=(0,m.memo)(OutputNode);let GroupNode=()=>null;GroupNode.displayName="GroupNode";let selector$e=e=>({selectedNodes:e.getNodes().filter(e=>e.selected),selectedEdges:e.edges.filter(e=>e.selected)}),selectId=e=>e.id;function areEqual(e,t){return(0,b.X)(e.selectedNodes.map(selectId),t.selectedNodes.map(selectId))&&(0,b.X)(e.selectedEdges.map(selectId),t.selectedEdges.map(selectId))}let Z=(0,m.memo)(({onSelectionChange:e})=>{let t=useStoreApi(),{selectedNodes:n,selectedEdges:o}=useStore(selector$e,areEqual);return(0,m.useEffect)(()=>{let r={nodes:n,edges:o};e?.(r),t.getState().onSelectionChange?.(r)},[n,o,e]),null});Z.displayName="SelectionListener";let changeSelector=e=>!!e.onSelectionChange;function Wrapper$1({onSelectionChange:e}){let t=useStore(changeSelector);return e||t?(0,f.jsx)(Z,{onSelectionChange:e}):null}let selector$d=e=>({setNodes:e.setNodes,setEdges:e.setEdges,setDefaultNodesAndEdges:e.setDefaultNodesAndEdges,setMinZoom:e.setMinZoom,setMaxZoom:e.setMaxZoom,setTranslateExtent:e.setTranslateExtent,setNodeExtent:e.setNodeExtent,reset:e.reset});function useStoreUpdater(e,t){(0,m.useEffect)(()=>{void 0!==e&&t(e)},[e])}function useDirectStoreUpdater(e,t,n){(0,m.useEffect)(()=>{void 0!==t&&n({[e]:t})},[t])}let StoreUpdater=({nodes:e,edges:t,defaultNodes:n,defaultEdges:o,onConnect:r,onConnectStart:a,onConnectEnd:i,onClickConnectStart:l,onClickConnectEnd:s,nodesDraggable:d,nodesConnectable:c,nodesFocusable:u,edgesFocusable:g,edgesUpdatable:p,elevateNodesOnSelect:h,minZoom:f,maxZoom:y,nodeExtent:S,onNodesChange:x,onEdgesChange:w,elementsSelectable:v,connectionMode:E,snapGrid:N,snapToGrid:C,translateExtent:M,connectOnClick:P,defaultEdgeOptions:A,fitView:D,fitViewOptions:k,onNodesDelete:$,onEdgesDelete:R,onNodeDrag:O,onNodeDragStart:I,onNodeDragStop:H,onSelectionDrag:B,onSelectionDragStart:T,onSelectionDragStop:_,noPanClassName:U,nodeOrigin:j,rfId:z,autoPanOnConnect:L,autoPanOnNodeDrag:F,onError:W,connectionRadius:V,isValidConnection:Z})=>{let{setNodes:K,setEdges:X,setDefaultNodesAndEdges:Y,setMinZoom:G,setMaxZoom:q,setTranslateExtent:Q,setNodeExtent:J,reset:ee}=useStore(selector$d,b.X),et=useStoreApi();return(0,m.useEffect)(()=>{let e=o?.map(e=>({...e,...A}));return Y(n,e),()=>{ee()}},[]),useDirectStoreUpdater("defaultEdgeOptions",A,et.setState),useDirectStoreUpdater("connectionMode",E,et.setState),useDirectStoreUpdater("onConnect",r,et.setState),useDirectStoreUpdater("onConnectStart",a,et.setState),useDirectStoreUpdater("onConnectEnd",i,et.setState),useDirectStoreUpdater("onClickConnectStart",l,et.setState),useDirectStoreUpdater("onClickConnectEnd",s,et.setState),useDirectStoreUpdater("nodesDraggable",d,et.setState),useDirectStoreUpdater("nodesConnectable",c,et.setState),useDirectStoreUpdater("nodesFocusable",u,et.setState),useDirectStoreUpdater("edgesFocusable",g,et.setState),useDirectStoreUpdater("edgesUpdatable",p,et.setState),useDirectStoreUpdater("elementsSelectable",v,et.setState),useDirectStoreUpdater("elevateNodesOnSelect",h,et.setState),useDirectStoreUpdater("snapToGrid",C,et.setState),useDirectStoreUpdater("snapGrid",N,et.setState),useDirectStoreUpdater("onNodesChange",x,et.setState),useDirectStoreUpdater("onEdgesChange",w,et.setState),useDirectStoreUpdater("connectOnClick",P,et.setState),useDirectStoreUpdater("fitViewOnInit",D,et.setState),useDirectStoreUpdater("fitViewOnInitOptions",k,et.setState),useDirectStoreUpdater("onNodesDelete",$,et.setState),useDirectStoreUpdater("onEdgesDelete",R,et.setState),useDirectStoreUpdater("onNodeDrag",O,et.setState),useDirectStoreUpdater("onNodeDragStart",I,et.setState),useDirectStoreUpdater("onNodeDragStop",H,et.setState),useDirectStoreUpdater("onSelectionDrag",B,et.setState),useDirectStoreUpdater("onSelectionDragStart",T,et.setState),useDirectStoreUpdater("onSelectionDragStop",_,et.setState),useDirectStoreUpdater("noPanClassName",U,et.setState),useDirectStoreUpdater("nodeOrigin",j,et.setState),useDirectStoreUpdater("rfId",z,et.setState),useDirectStoreUpdater("autoPanOnConnect",L,et.setState),useDirectStoreUpdater("autoPanOnNodeDrag",F,et.setState),useDirectStoreUpdater("onError",W,et.setState),useDirectStoreUpdater("connectionRadius",V,et.setState),useDirectStoreUpdater("isValidConnection",Z,et.setState),useStoreUpdater(e,K),useStoreUpdater(t,X),useStoreUpdater(f,G),useStoreUpdater(y,q),useStoreUpdater(M,Q),useStoreUpdater(S,J),null},K={display:"none"},X={position:"absolute",width:1,height:1,margin:-1,border:0,padding:0,overflow:"hidden",clip:"rect(0px, 0px, 0px, 0px)",clipPath:"inset(100%)"},Y="react-flow__node-desc",G="react-flow__edge-desc",selector$c=e=>e.ariaLiveMessage;function AriaLiveMessage({rfId:e}){let t=useStore(selector$c);return(0,f.jsx)("div",{id:`react-flow__aria-live-${e}`,"aria-live":"assertive","aria-atomic":"true",style:X,children:t})}function A11yDescriptions({rfId:e,disableKeyboardA11y:t}){return(0,f.jsxs)(f.Fragment,{children:[(0,f.jsxs)("div",{id:`${Y}-${e}`,style:K,children:["Press enter or space to select a node.",!t&&"You can then use the arrow keys to move the node around."," Press delete to remove it and escape to cancel."," "]}),(0,f.jsx)("div",{id:`${G}-${e}`,style:K,children:"Press enter or space to select an edge. You can then press delete to remove it or escape to cancel."}),!t&&(0,f.jsx)(AriaLiveMessage,{rfId:e})]})}let shiftX=(e,t,n)=>n===h.Left?e-t:n===h.Right?e+t:e,shiftY=(e,t,n)=>n===h.Top?e-t:n===h.Bottom?e+t:e,q="react-flow__edgeupdater",EdgeAnchor=({position:e,centerX:t,centerY:n,radius:o=10,onMouseDown:r,onMouseEnter:a,onMouseOut:i,type:l})=>(0,f.jsx)("circle",{onMouseDown:r,onMouseEnter:a,onMouseOut:i,className:(0,y.Z)([q,`${q}-${l}`]),cx:shiftX(t,o,e),cy:shiftY(n,o,e),r:o,stroke:"transparent",fill:"transparent"}),alwaysValidConnection=()=>!0;var wrapEdge=e=>{let EdgeWrapper=({id:t,className:n,type:o,data:r,onClick:a,onEdgeDoubleClick:i,selected:l,animated:s,label:d,labelStyle:c,labelShowBg:u,labelBgStyle:g,labelBgPadding:p,labelBgBorderRadius:h,style:S,source:x,target:b,sourceX:w,sourceY:v,targetX:E,targetY:N,sourcePosition:C,targetPosition:M,elementsSelectable:P,hidden:A,sourceHandleId:D,targetHandleId:k,onContextMenu:R,onMouseEnter:O,onMouseMove:I,onMouseLeave:H,edgeUpdaterRadius:B,onEdgeUpdate:T,onEdgeUpdateStart:_,onEdgeUpdateEnd:U,markerEnd:j,markerStart:z,rfId:L,ariaLabel:F,isFocusable:W,isUpdatable:V,pathOptions:Z,interactionWidth:K})=>{let X=(0,m.useRef)(null),[Y,q]=(0,m.useState)(!1),[Q,J]=(0,m.useState)(!1),ee=useStoreApi(),et=(0,m.useMemo)(()=>`url(#${getMarkerId(z,L)})`,[z,L]),en=(0,m.useMemo)(()=>`url(#${getMarkerId(j,L)})`,[j,L]);if(A)return null;let eo=getMouseHandler$1(t,ee.getState,i),er=getMouseHandler$1(t,ee.getState,R),ea=getMouseHandler$1(t,ee.getState,O),ei=getMouseHandler$1(t,ee.getState,I),el=getMouseHandler$1(t,ee.getState,H),handleEdgeUpdater=(e,n)=>{if(0!==e.button)return;let{edges:o,isValidConnection:r}=ee.getState(),a=n?b:x,i=(n?k:D)||null,l=n?"target":"source",s=r||alwaysValidConnection,d=o.find(e=>e.id===t);J(!0),_?.(e,d,l),handlePointerDown({event:e,handleId:i,nodeId:a,onConnect:e=>T?.(d,e),isTarget:n,getState:ee.getState,setState:ee.setState,isValidConnection:s,edgeUpdaterType:l,onEdgeUpdateEnd:e=>{J(!1),U?.(e,d,l)}})},onEdgeUpdaterMouseEnter=()=>q(!0),onEdgeUpdaterMouseOut=()=>q(!1);return(0,f.jsxs)("g",{className:(0,y.Z)(["react-flow__edge",`react-flow__edge-${o}`,n,{selected:l,animated:s,inactive:!P&&!a,updating:Y}]),onClick:e=>{let{edges:n,addSelectedEdges:o}=ee.getState();if(P&&(ee.setState({nodesSelectionActive:!1}),o([t])),a){let o=n.find(e=>e.id===t);a(e,o)}},onDoubleClick:eo,onContextMenu:er,onMouseEnter:ea,onMouseMove:ei,onMouseLeave:el,onKeyDown:W?e=>{if($.includes(e.key)&&P){let{unselectNodesAndEdges:n,addSelectedEdges:o,edges:r}=ee.getState(),a="Escape"===e.key;a?(X.current?.blur(),n({edges:[r.find(e=>e.id===t)]})):o([t])}}:void 0,tabIndex:W?0:void 0,role:W?"button":void 0,"data-testid":`rf__edge-${t}`,"aria-label":null===F?void 0:F||`Edge from ${x} to ${b}`,"aria-describedby":W?`${G}-${L}`:void 0,ref:X,children:[!Q&&(0,f.jsx)(e,{id:t,source:x,target:b,selected:l,animated:s,label:d,labelStyle:c,labelShowBg:u,labelBgStyle:g,labelBgPadding:p,labelBgBorderRadius:h,data:r,style:S,sourceX:w,sourceY:v,targetX:E,targetY:N,sourcePosition:C,targetPosition:M,sourceHandleId:D,targetHandleId:k,markerStart:et,markerEnd:en,pathOptions:Z,interactionWidth:K}),V&&(0,f.jsxs)(f.Fragment,{children:[("source"===V||!0===V)&&(0,f.jsx)(EdgeAnchor,{position:C,centerX:w,centerY:v,radius:B,onMouseDown:e=>handleEdgeUpdater(e,!0),onMouseEnter:onEdgeUpdaterMouseEnter,onMouseOut:onEdgeUpdaterMouseOut,type:"source"}),("target"===V||!0===V)&&(0,f.jsx)(EdgeAnchor,{position:M,centerX:E,centerY:N,radius:B,onMouseDown:e=>handleEdgeUpdater(e,!1),onMouseEnter:onEdgeUpdaterMouseEnter,onMouseOut:onEdgeUpdaterMouseOut,type:"target"})]})]})};return EdgeWrapper.displayName="EdgeWrapper",(0,m.memo)(EdgeWrapper)};function createEdgeTypes(e){let t={default:wrapEdge(e.default||T),straight:wrapEdge(e.bezier||B),step:wrapEdge(e.step||H),smoothstep:wrapEdge(e.step||I),simplebezier:wrapEdge(e.simplebezier||R)},n=Object.keys(e).filter(e=>!["default","bezier"].includes(e)).reduce((t,n)=>(t[n]=wrapEdge(e[n]||T),t),{});return{...t,...n}}function getHandlePosition(e,t,n=null){let o=(n?.x||0)+t.x,r=(n?.y||0)+t.y,a=n?.width||t.width,i=n?.height||t.height;switch(e){case h.Top:return{x:o+a/2,y:r};case h.Right:return{x:o+a,y:r+i/2};case h.Bottom:return{x:o+a/2,y:r+i};case h.Left:return{x:o,y:r+i/2}}}function getHandle(e,t){return e?1!==e.length&&t?t&&e.find(e=>e.id===t)||null:e[0]:null}let getEdgePositions=(e,t,n,o,r,a)=>{let i=getHandlePosition(n,e,t),l=getHandlePosition(a,o,r);return{sourceX:i.x,sourceY:i.y,targetX:l.x,targetY:l.y}};function getNodeData(e){let t=e?.[k]?.handleBounds||null,n=t&&e?.width&&e?.height&&void 0!==e?.positionAbsolute?.x&&void 0!==e?.positionAbsolute?.y;return[{x:e?.positionAbsolute?.x||0,y:e?.positionAbsolute?.y||0,width:e?.width||0,height:e?.height||0},t,!!n]}function hasSelector(e,t,n){let o=e;do{if(o?.matches(t))return!0;if(o===n.current)break;o=o.parentElement}while(o);return!1}function calcNextPosition(e,t,n,o,r=[0,0],a){var i;let l=(i=e.extent||o)&&"parent"!==i?[i[0],[i[1][0]-(e.width||0),i[1][1]-(e.height||0)]]:i,s=l;if("parent"===e.extent){if(e.parentNode&&e.width&&e.height){let t=n.get(e.parentNode),{x:o,y:a}=getNodePositionWithOrigin(t,r).positionAbsolute;s=t&&isNumeric(o)&&isNumeric(a)&&isNumeric(t.width)&&isNumeric(t.height)?[[o+e.width*r[0],a+e.height*r[1]],[o+t.width-e.width+e.width*r[0],a+t.height-e.height+e.height*r[1]]]:s}else a?.("005",P.error005()),s=l}else if(e.extent&&e.parentNode){let t=n.get(e.parentNode),{x:o,y:a}=getNodePositionWithOrigin(t,r).positionAbsolute;s=[[e.extent[0][0]+o,e.extent[0][1]+a],[e.extent[1][0]+o,e.extent[1][1]+a]]}let d={x:0,y:0};if(e.parentNode){let t=n.get(e.parentNode);d=getNodePositionWithOrigin(t,r).positionAbsolute}let c=s?clampPosition(t,s):t;return{position:{x:c.x-d.x,y:c.y-d.y},positionAbsolute:c}}function getEventHandlerParams({nodeId:e,dragItems:t,nodeInternals:n}){let o=t.map(e=>{let t=n.get(e.id);return{...t,position:e.position,positionAbsolute:e.positionAbsolute}});return[e?o.find(t=>t.id===e):o[0],o]}let getHandleBounds=(e,t,n,o)=>{let r=t.querySelectorAll(e);if(!r||!r.length)return null;let a=Array.from(r),i=t.getBoundingClientRect(),l={x:i.width*o[0],y:i.height*o[1]};return a.map(e=>{let t=e.getBoundingClientRect();return{id:e.getAttribute("data-handleid"),position:e.getAttribute("data-handlepos"),x:(t.left-i.left-l.x)/n,y:(t.top-i.top-l.y)/n,...getDimensions(e)}})};function getMouseHandler(e,t,n){return void 0===n?n:o=>{let r=t().nodeInternals.get(e);n(o,{...r})}}function handleNodeClick({id:e,store:t,unselect:n=!1,nodeRef:o}){let{addSelectedNodes:r,unselectNodesAndEdges:a,multiSelectionActive:i,nodeInternals:l}=t.getState(),s=l.get(e);t.setState({nodesSelectionActive:!1}),s.selected?(n||s.selected&&i)&&(a({nodes:[s]}),requestAnimationFrame(()=>o?.current?.blur())):r([e])}function wrapSelectionDragFunc(e){return(t,n,o)=>e?.(t,o)}function useDrag({nodeRef:e,disabled:t=!1,noDragClassName:n,handleSelector:o,nodeId:r,isSelectable:a,selectNodesOnDrag:i}){let l=useStoreApi(),[s,d]=(0,m.useState)(!1),c=(0,m.useRef)([]),u=(0,m.useRef)({x:null,y:null}),g=(0,m.useRef)(0),p=(0,m.useRef)(null),h=(0,m.useRef)({x:0,y:0}),f=(0,m.useRef)(null),y=(0,m.useRef)(!1),S=function(){let e=useStoreApi(),t=(0,m.useCallback)(({sourceEvent:t})=>{let{transform:n,snapGrid:o,snapToGrid:r}=e.getState(),a=t.touches?t.touches[0].clientX:t.clientX,i=t.touches?t.touches[0].clientY:t.clientY,l={x:(a-n[0])/n[2],y:(i-n[1])/n[2]};return{xSnapped:r?o[0]*Math.round(l.x/o[0]):l.x,ySnapped:r?o[1]*Math.round(l.y/o[1]):l.y,...l}},[]);return t}();return(0,m.useEffect)(()=>{if(e?.current){let s=(0,v.Z)(e.current),updateNodes=({x:e,y:t})=>{let{nodeInternals:n,onNodeDrag:o,onSelectionDrag:a,updateNodePositions:i,nodeExtent:s,snapGrid:g,snapToGrid:p,nodeOrigin:h,onError:m}=l.getState();u.current={x:e,y:t};let y=!1;if(c.current=c.current.map(o=>{let r={x:e-o.distance.x,y:t-o.distance.y};p&&(r.x=g[0]*Math.round(r.x/g[0]),r.y=g[1]*Math.round(r.y/g[1]));let a=calcNextPosition(o,r,n,s,h,m);return y=y||o.position.x!==a.position.x||o.position.y!==a.position.y,o.position=a.position,o.positionAbsolute=a.positionAbsolute,o}),!y)return;i(c.current,!0,!0),d(!0);let S=r?o:wrapSelectionDragFunc(a);if(S&&f.current){let[e,t]=getEventHandlerParams({nodeId:r,dragItems:c.current,nodeInternals:n});S(f.current,e,t)}},autoPan=()=>{if(!p.current)return;let[e,t]=calcAutoPan(h.current,p.current);if(0!==e||0!==t){let{transform:n,panBy:o}=l.getState();u.current.x=(u.current.x??0)-e/n[2],u.current.y=(u.current.y??0)-t/n[2],o({x:e,y:t})&&updateNodes(u.current)}g.current=requestAnimationFrame(autoPan)};if(t)s.on(".drag",null);else{let t=(0,w.Z)().on("start",t=>{let{nodeInternals:n,multiSelectionActive:o,domNode:s,nodesDraggable:d,unselectNodesAndEdges:g,onNodeDragStart:f,onSelectionDragStart:m}=l.getState(),y=r?f:wrapSelectionDragFunc(m);i||o||!r||n.get(r)?.selected||g(),r&&a&&i&&handleNodeClick({id:r,store:l,nodeRef:e});let x=S(t);if(u.current=x,c.current=Array.from(n.values()).filter(e=>(e.selected||e.id===r)&&(!e.parentNode||!function isParentSelected(e,t){if(!e.parentNode)return!1;let n=t.get(e.parentNode);return!!n&&(!!n.selected||isParentSelected(n,t))}(e,n))&&(e.draggable||d&&void 0===e.draggable)).map(e=>({id:e.id,position:e.position||{x:0,y:0},positionAbsolute:e.positionAbsolute||{x:0,y:0},distance:{x:x.x-(e.positionAbsolute?.x??0),y:x.y-(e.positionAbsolute?.y??0)},delta:{x:0,y:0},extent:e.extent,parentNode:e.parentNode,width:e.width,height:e.height})),y&&c.current){let[e,o]=getEventHandlerParams({nodeId:r,dragItems:c.current,nodeInternals:n});y(t.sourceEvent,e,o)}p.current=s?.getBoundingClientRect()||null,h.current=getEventPosition(t.sourceEvent,p.current)}).on("drag",e=>{let t=S(e),{autoPanOnNodeDrag:n}=l.getState();!y.current&&n&&(y.current=!0,autoPan()),(u.current.x!==t.xSnapped||u.current.y!==t.ySnapped)&&c.current&&(f.current=e.sourceEvent,h.current=getEventPosition(e.sourceEvent,p.current),updateNodes(t))}).on("end",e=>{if(d(!1),y.current=!1,cancelAnimationFrame(g.current),c.current){let{updateNodePositions:t,nodeInternals:n,onNodeDragStop:o,onSelectionDragStop:a}=l.getState(),i=r?o:wrapSelectionDragFunc(a);if(t(c.current,!1,!1),i){let[t,o]=getEventHandlerParams({nodeId:r,dragItems:c.current,nodeInternals:n});i(e.sourceEvent,t,o)}}}).filter(t=>{let r=t.target,a=!t.button&&(!n||!hasSelector(r,`.${n}`,e))&&(!o||hasSelector(r,o,e));return a});return s.call(t),()=>{s.on(".drag",null)}}}},[e,t,n,o,a,l,r,i,S]),s}function useUpdateNodePositions(){let e=useStoreApi(),t=(0,m.useCallback)(t=>{let{nodeInternals:n,nodeExtent:o,updateNodePositions:r,getNodes:a,snapToGrid:i,snapGrid:l,onError:s,nodesDraggable:d}=e.getState(),c=a().filter(e=>e.selected&&(e.draggable||d&&void 0===e.draggable)),u=i?l[0]:5,g=i?l[1]:5,p=t.isShiftPressed?4:1,h=t.x*u*p,f=t.y*g*p,m=c.map(e=>{if(e.positionAbsolute){let t={x:e.positionAbsolute.x+h,y:e.positionAbsolute.y+f};i&&(t.x=l[0]*Math.round(t.x/l[0]),t.y=l[1]*Math.round(t.y/l[1]));let{positionAbsolute:r,position:a}=calcNextPosition(e,t,n,o,void 0,s);e.position=a,e.positionAbsolute=r}return e});r(m,!0,!1)},[]);return t}let Q={ArrowUp:{x:0,y:-1},ArrowDown:{x:0,y:1},ArrowLeft:{x:-1,y:0},ArrowRight:{x:1,y:0}};var wrapNode=e=>{let NodeWrapper=({id:t,type:n,data:o,xPos:r,yPos:a,xPosOrigin:i,yPosOrigin:l,selected:s,onClick:d,onMouseEnter:c,onMouseMove:u,onMouseLeave:g,onContextMenu:p,onDoubleClick:h,style:S,className:x,isDraggable:b,isSelectable:w,isConnectable:v,isFocusable:E,selectNodesOnDrag:N,sourcePosition:C,targetPosition:M,hidden:P,resizeObserver:A,dragHandle:D,zIndex:k,isParent:R,noDragClassName:O,noPanClassName:I,initialized:H,disableKeyboardA11y:B,ariaLabel:T,rfId:_})=>{let j=useStoreApi(),z=(0,m.useRef)(null),L=(0,m.useRef)(C),F=(0,m.useRef)(M),W=(0,m.useRef)(n),V=w||b||d||c||u||g,Z=useUpdateNodePositions(),K=getMouseHandler(t,j.getState,c),X=getMouseHandler(t,j.getState,u),G=getMouseHandler(t,j.getState,g),q=getMouseHandler(t,j.getState,p),J=getMouseHandler(t,j.getState,h);(0,m.useEffect)(()=>{if(z.current&&!P){let e=z.current;return A?.observe(e),()=>A?.unobserve(e)}},[P]),(0,m.useEffect)(()=>{let e=W.current!==n,o=L.current!==C,r=F.current!==M;z.current&&(e||o||r)&&(e&&(W.current=n),o&&(L.current=C),r&&(F.current=M),j.getState().updateNodeDimensions([{id:t,nodeElement:z.current,forceUpdate:!0}]))},[t,n,C,M]);let ee=useDrag({nodeRef:z,disabled:P||!b,noDragClassName:O,handleSelector:D,nodeId:t,isSelectable:w,selectNodesOnDrag:N});return P?null:(0,f.jsx)("div",{className:(0,y.Z)(["react-flow__node",`react-flow__node-${n}`,{[I]:b},x,{selected:s,selectable:w,parent:R,dragging:ee}]),ref:z,style:{zIndex:k,transform:`translate(${i}px,${l}px)`,pointerEvents:V?"all":"none",visibility:H?"visible":"hidden",...S},"data-id":t,"data-testid":`rf__node-${t}`,onMouseEnter:K,onMouseMove:X,onMouseLeave:G,onContextMenu:q,onClick:e=>{if(!w||N&&b||handleNodeClick({id:t,store:j,nodeRef:z}),d){let n=j.getState().nodeInternals.get(t);d(e,{...n})}},onDoubleClick:J,onKeyDown:E?e=>{if(!isInputDOMNode(e)){if($.includes(e.key)&&w){let n="Escape"===e.key;handleNodeClick({id:t,store:j,unselect:n,nodeRef:z})}else!B&&b&&s&&Object.prototype.hasOwnProperty.call(Q,e.key)&&(j.setState({ariaLiveMessage:`Moved selected node ${e.key.replace("Arrow","").toLowerCase()}. New position, x: ${~~r}, y: ${~~a}`}),Z({x:Q[e.key].x,y:Q[e.key].y,isShiftPressed:e.shiftKey}))}}:void 0,tabIndex:E?0:void 0,role:E?"button":void 0,"aria-describedby":B?void 0:`${Y}-${_}`,"aria-label":T,children:(0,f.jsx)(U,{value:t,children:(0,f.jsx)(e,{id:t,data:o,type:n,xPos:r,yPos:a,selected:s,isConnectable:v,sourcePosition:C,targetPosition:M,dragging:ee,dragHandle:D,zIndex:k})})})};return NodeWrapper.displayName="NodeWrapper",(0,m.memo)(NodeWrapper)};function createNodeTypes(e){let t={input:wrapNode(e.input||W),default:wrapNode(e.default||F),output:wrapNode(e.output||V),group:wrapNode(e.group||GroupNode)},n=Object.keys(e).filter(e=>!["input","default","output","group"].includes(e)).reduce((t,n)=>(t[n]=wrapNode(e[n]||F),t),{});return{...t,...n}}let getPositionWithOrigin=({x:e,y:t,width:n,height:o,origin:r})=>!n||!o||r[0]<0||r[1]<0||r[0]>1||r[1]>1?{x:e,y:t}:{x:e-n*r[0],y:t-o*r[1]},J="undefined"!=typeof document?document:null;var useKeyPress=(e=null,t={target:J})=>{let[n,o]=(0,m.useState)(!1),r=(0,m.useRef)(!1),a=(0,m.useRef)(new Set([])),[i,l]=(0,m.useMemo)(()=>{if(null!==e){let t=Array.isArray(e)?e:[e],n=t.filter(e=>"string"==typeof e).map(e=>e.split("+")),o=n.reduce((e,t)=>e.concat(...t),[]);return[n,o]}return[[],[]]},[e]);return(0,m.useEffect)(()=>{if(null!==e){let downHandler=e=>{if(r.current=e.ctrlKey||e.metaKey||e.shiftKey,!r.current&&isInputDOMNode(e))return!1;let t=useKeyOrCode(e.code,l);a.current.add(e[t]),isMatchingKey(i,a.current,!1)&&(e.preventDefault(),o(!0))},upHandler=e=>{if(!r.current&&isInputDOMNode(e))return!1;let t=useKeyOrCode(e.code,l);isMatchingKey(i,a.current,!0)?(o(!1),a.current.clear()):a.current.delete(e[t]),r.current=!1},resetHandler=()=>{a.current.clear(),o(!1)};return t?.target?.addEventListener("keydown",downHandler),t?.target?.addEventListener("keyup",upHandler),window.addEventListener("blur",resetHandler),()=>{t?.target?.removeEventListener("keydown",downHandler),t?.target?.removeEventListener("keyup",upHandler),window.removeEventListener("blur",resetHandler)}}},[e,o]),n};function isMatchingKey(e,t,n){return e.filter(e=>n||e.length===t.size).some(e=>e.every(e=>t.has(e)))}function useKeyOrCode(e,t){return t.includes(e)?"code":"key"}function updateAbsoluteNodePositions(e,t,n){e.forEach(o=>{if(o.parentNode&&!e.has(o.parentNode))throw Error(`Parent node ${o.parentNode} not found`);if(o.parentNode||n?.[o.id]){let{x:r,y:a,z:i}=function calculateXYZPosition(e,t,n,o){if(!e.parentNode)return n;let r=t.get(e.parentNode),a=getNodePositionWithOrigin(r,o);return calculateXYZPosition(r,t,{x:(n.x??0)+a.x,y:(n.y??0)+a.y,z:(r[k]?.z??0)>(n.z??0)?r[k]?.z??0:n.z??0},o)}(o,e,{...o.position,z:o[k]?.z??0},t);o.positionAbsolute={x:r,y:a},o[k].z=i,n?.[o.id]&&(o[k].isParent=!0)}})}function createNodeInternals(e,t,n,o){let r=new Map,a={},i=o?1e3:0;return e.forEach(e=>{let n=(isNumeric(e.zIndex)?e.zIndex:0)+(e.selected?i:0),o=t.get(e.id),l={width:o?.width,height:o?.height,...e,positionAbsolute:{x:e.position.x,y:e.position.y}};e.parentNode&&(l.parentNode=e.parentNode,a[e.parentNode]=!0),Object.defineProperty(l,k,{enumerable:!1,value:{handleBounds:o?.[k]?.handleBounds,z:n}}),r.set(e.id,l)}),updateAbsoluteNodePositions(r,n,a),r}function fitView(e,t={}){let{getNodes:n,width:o,height:r,minZoom:a,maxZoom:i,d3Zoom:l,d3Selection:s,fitViewOnInitDone:d,fitViewOnInit:c,nodeOrigin:u}=e(),g=t.initial&&!d&&c,p=l&&s;if(p&&(g||!t.initial)){let e=n().filter(e=>{let n=t.includeHiddenNodes?e.width&&e.height:!e.hidden;return t.nodes?.length?n&&t.nodes.some(t=>t.id===e.id):n}),d=e.every(e=>e.width&&e.height);if(e.length>0&&d){let n=getRectOfNodes(e,u),[d,c,g]=getTransformForBounds(n,o,r,t.minZoom??a,t.maxZoom??i,t.padding??.1),p=N.CR.translate(d,c).scale(g);return"number"==typeof t.duration&&t.duration>0?l.transform(getD3Transition(s,t.duration),p):l.transform(s,p),!0}}return!1}function updateNodesAndEdgesSelections({changedNodes:e,changedEdges:t,get:n,set:o}){let{nodeInternals:r,edges:a,onNodesChange:i,onEdgesChange:l,hasDefaultNodes:s,hasDefaultEdges:d}=n();e?.length&&(s&&o({nodeInternals:(e.forEach(e=>{let t=r.get(e.id);t&&r.set(t.id,{...t,[k]:t[k],selected:e.selected})}),new Map(r))}),i?.(e)),t?.length&&(d&&o({edges:a.map(e=>{let n=t.find(t=>t.id===e.id);return n&&(e.selected=n.selected),e})}),l?.(t))}let noop=()=>{},ee={zoomIn:noop,zoomOut:noop,zoomTo:noop,getZoom:()=>1,setViewport:noop,getViewport:()=>({x:0,y:0,zoom:1}),fitView:()=>!1,setCenter:noop,fitBounds:noop,project:e=>e,viewportInitialized:!1},selector$b=e=>({d3Zoom:e.d3Zoom,d3Selection:e.d3Selection}),useViewportHelper=()=>{let e=useStoreApi(),{d3Zoom:t,d3Selection:n}=useStore(selector$b,b.X),o=(0,m.useMemo)(()=>n&&t?{zoomIn:e=>t.scaleBy(getD3Transition(n,e?.duration),1.2),zoomOut:e=>t.scaleBy(getD3Transition(n,e?.duration),1/1.2),zoomTo:(e,o)=>t.scaleTo(getD3Transition(n,o?.duration),e),getZoom:()=>e.getState().transform[2],setViewport:(o,r)=>{let[a,i,l]=e.getState().transform,s=N.CR.translate(o.x??a,o.y??i).scale(o.zoom??l);t.transform(getD3Transition(n,r?.duration),s)},getViewport:()=>{let[t,n,o]=e.getState().transform;return{x:t,y:n,zoom:o}},fitView:t=>fitView(e.getState,t),setCenter:(o,r,a)=>{let{width:i,height:l,maxZoom:s}=e.getState(),d=void 0!==a?.zoom?a.zoom:s,c=i/2-o*d,u=l/2-r*d,g=N.CR.translate(c,u).scale(d);t.transform(getD3Transition(n,a?.duration),g)},fitBounds:(o,r)=>{let{width:a,height:i,minZoom:l,maxZoom:s}=e.getState(),[d,c,u]=getTransformForBounds(o,a,i,l,s,r?.padding??.1),g=N.CR.translate(d,c).scale(u);t.transform(getD3Transition(n,r?.duration),g)},project:t=>{let{transform:n,snapToGrid:o,snapGrid:r}=e.getState();return pointToRendererPoint(t,n,o,r)},viewportInitialized:!0}:ee,[t,n]);return o};function useReactFlow(){let e=useViewportHelper(),t=useStoreApi(),n=(0,m.useCallback)(()=>t.getState().getNodes().map(e=>({...e})),[]),o=(0,m.useCallback)(e=>t.getState().nodeInternals.get(e),[]),r=(0,m.useCallback)(()=>{let{edges:e=[]}=t.getState();return e.map(e=>({...e}))},[]),a=(0,m.useCallback)(e=>{let{edges:n=[]}=t.getState();return n.find(t=>t.id===e)},[]),i=(0,m.useCallback)(e=>{let{getNodes:n,setNodes:o,hasDefaultNodes:r,onNodesChange:a}=t.getState(),i=n(),l="function"==typeof e?e(i):e;if(r)o(l);else if(a){let e=0===l.length?i.map(e=>({type:"remove",id:e.id})):l.map(e=>({item:e,type:"reset"}));a(e)}},[]),l=(0,m.useCallback)(e=>{let{edges:n=[],setEdges:o,hasDefaultEdges:r,onEdgesChange:a}=t.getState(),i="function"==typeof e?e(n):e;if(r)o(i);else if(a){let e=0===i.length?n.map(e=>({type:"remove",id:e.id})):i.map(e=>({item:e,type:"reset"}));a(e)}},[]),s=(0,m.useCallback)(e=>{let n=Array.isArray(e)?e:[e],{getNodes:o,setNodes:r,hasDefaultNodes:a,onNodesChange:i}=t.getState();if(a){let e=o(),t=[...e,...n];r(t)}else if(i){let e=n.map(e=>({item:e,type:"add"}));i(e)}},[]),d=(0,m.useCallback)(e=>{let n=Array.isArray(e)?e:[e],{edges:o=[],setEdges:r,hasDefaultEdges:a,onEdgesChange:i}=t.getState();if(a)r([...o,...n]);else if(i){let e=n.map(e=>({item:e,type:"add"}));i(e)}},[]),c=(0,m.useCallback)(()=>{let{getNodes:e,edges:n=[],transform:o}=t.getState(),[r,a,i]=o;return{nodes:e().map(e=>({...e})),edges:n.map(e=>({...e})),viewport:{x:r,y:a,zoom:i}}},[]),u=(0,m.useCallback)(({nodes:e,edges:n})=>{let{nodeInternals:o,getNodes:r,edges:a,hasDefaultNodes:i,hasDefaultEdges:l,onNodesDelete:s,onEdgesDelete:d,onNodesChange:c,onEdgesChange:u}=t.getState(),g=(e||[]).map(e=>e.id),p=(n||[]).map(e=>e.id),h=r().reduce((e,t)=>{let n=!g.includes(t.id)&&t.parentNode&&e.find(e=>e.id===t.parentNode),o="boolean"!=typeof t.deletable||t.deletable;return o&&(g.includes(t.id)||n)&&e.push(t),e},[]),f=a.filter(e=>"boolean"!=typeof e.deletable||e.deletable),m=f.filter(e=>p.includes(e.id));if(h||m){let e=getConnectedEdges(h,f),n=[...m,...e],r=n.reduce((e,t)=>(e.includes(t.id)||e.push(t.id),e),[]);if((l||i)&&(l&&t.setState({edges:a.filter(e=>!r.includes(e.id))}),i&&(h.forEach(e=>{o.delete(e.id)}),t.setState({nodeInternals:new Map(o)}))),r.length>0&&(d?.(n),u&&u(r.map(e=>({id:e,type:"remove"})))),h.length>0&&(s?.(h),c)){let e=h.map(e=>({id:e.id,type:"remove"}));c(e)}}},[]),g=(0,m.useCallback)(e=>{let n=isRectObject(e),o=n?null:t.getState().nodeInternals.get(e.id),r=n?e:nodeToRect(o);return[r,o,n]},[]),p=(0,m.useCallback)((e,n=!0,o)=>{let[r,a,i]=g(e);return r?(o||t.getState().getNodes()).filter(t=>{if(!i&&(t.id===a.id||!t.positionAbsolute))return!1;let o=nodeToRect(t),l=getOverlappingArea(o,r);return n&&l>0||l>=e.width*e.height}):[]},[]),h=(0,m.useCallback)((e,t,n=!0)=>{let[o]=g(e);if(!o)return!1;let r=getOverlappingArea(o,t);return n&&r>0||r>=e.width*e.height},[]);return(0,m.useMemo)(()=>({...e,getNodes:n,getNode:o,getEdges:r,getEdge:a,setNodes:i,setEdges:l,addNodes:s,addEdges:d,toObject:c,deleteElements:u,getIntersectingNodes:p,isNodeIntersecting:h}),[e,n,o,r,a,i,l,s,d,c,u,p,h])}var useGlobalKeyHandler=({deleteKeyCode:e,multiSelectionKeyCode:t})=>{let n=useStoreApi(),{deleteElements:o}=useReactFlow(),r=useKeyPress(e),a=useKeyPress(t);(0,m.useEffect)(()=>{if(r){let{edges:e,getNodes:t}=n.getState(),r=t().filter(e=>e.selected),a=e.filter(e=>e.selected);o({nodes:r,edges:a}),n.setState({nodesSelectionActive:!1})}},[r]),(0,m.useEffect)(()=>{n.setState({multiSelectionActive:a})},[a])};let et={position:"absolute",width:"100%",height:"100%",top:0,left:0},viewChanged=(e,t)=>e.x!==t.x||e.y!==t.y||e.zoom!==t.k,eventToFlowTransform=e=>({x:e.x,y:e.y,zoom:e.k}),isWrappedWithClass=(e,t)=>e.target.closest(`.${t}`),isRightClickPan=(e,t)=>2===t&&Array.isArray(e)&&e.includes(2),selector$a=e=>({d3Zoom:e.d3Zoom,d3Selection:e.d3Selection,d3ZoomHandler:e.d3ZoomHandler,userSelectionActive:e.userSelectionActive}),ZoomPane=({onMove:e,onMoveStart:t,onMoveEnd:n,onPaneContextMenu:o,zoomOnScroll:r=!0,zoomOnPinch:a=!0,panOnScroll:i=!1,panOnScrollSpeed:l=.5,panOnScrollMode:s=c.Free,zoomOnDoubleClick:d=!0,elementsSelectable:u,panOnDrag:g=!0,defaultViewport:p,translateExtent:h,minZoom:y,maxZoom:S,zoomActivationKeyCode:x,preventScrolling:w=!0,children:C,noWheelClassName:M,noPanClassName:A})=>{let D=(0,m.useRef)(),k=useStoreApi(),$=(0,m.useRef)(!1),R=(0,m.useRef)(!1),O=(0,m.useRef)(null),I=(0,m.useRef)({x:0,y:0,zoom:0}),{d3Zoom:H,d3Selection:B,d3ZoomHandler:T,userSelectionActive:_}=useStore(selector$a,b.X),U=useKeyPress(x),j=(0,m.useRef)(0);return!function(e){let t=useStoreApi();(0,m.useEffect)(()=>{let n;let updateDimensions=()=>{if(!e.current)return;let n=getDimensions(e.current);(0===n.height||0===n.width)&&t.getState().onError?.("004",P.error004()),t.setState({width:n.width||500,height:n.height||500})};return updateDimensions(),window.addEventListener("resize",updateDimensions),e.current&&(n=new ResizeObserver(()=>updateDimensions())).observe(e.current),()=>{window.removeEventListener("resize",updateDimensions),n&&e.current&&n.unobserve(e.current)}},[])}(O),(0,m.useEffect)(()=>{if(O.current){let e=O.current.getBoundingClientRect(),t=(0,N.sP)().scaleExtent([y,S]).translateExtent(h),n=(0,v.Z)(O.current).call(t),o=N.CR.translate(p.x,p.y).scale(clamp(p.zoom,y,S)),r=[[0,0],[e.width,e.height]],a=t.constrain()(o,r,h);t.transform(n,a),k.setState({d3Zoom:t,d3Selection:n,d3ZoomHandler:n.on("wheel.zoom"),transform:[a.x,a.y,a.k],domNode:O.current.closest(".react-flow")})}},[]),(0,m.useEffect)(()=>{B&&H&&(!i||U||_?void 0!==T&&B.on("wheel.zoom",function(e,t){if(!w||isWrappedWithClass(e,M))return null;e.preventDefault(),T.call(this,e,t)},{passive:!1}):B.on("wheel.zoom",e=>{if(isWrappedWithClass(e,M))return!1;e.preventDefault(),e.stopImmediatePropagation();let t=B.property("__zoom").k||1;if(e.ctrlKey&&a){let n=(0,E.Z)(e),o=-e.deltaY*(1===e.deltaMode?.05:e.deltaMode?1:.002)*10,r=t*Math.pow(2,o);H.scaleTo(B,r,n);return}let n=1===e.deltaMode?20:1,o=s===c.Vertical?0:e.deltaX*n,r=s===c.Horizontal?0:e.deltaY*n;H.translateBy(B,-(o/t)*l,-(r/t)*l)},{passive:!1}))},[_,i,s,B,H,T,U,a,w,M]),(0,m.useEffect)(()=>{H&&H.on("start",e=>{if(!e.sourceEvent)return null;j.current=e.sourceEvent.button;let{onViewportChangeStart:n}=k.getState();if($.current=!0,e.sourceEvent?.type==="mousedown"&&k.setState({paneDragging:!0}),t||n){let o=eventToFlowTransform(e.transform);I.current=o,n?.(o),t?.(e.sourceEvent,o)}})},[H,t]),(0,m.useEffect)(()=>{H&&(_&&!$.current?H.on("zoom",null):_||H.on("zoom",t=>{let{onViewportChange:n}=k.getState();if(k.setState({transform:[t.transform.x,t.transform.y,t.transform.k]}),R.current=!!(o&&isRightClickPan(g,j.current??0)),e||n){let o=eventToFlowTransform(t.transform);n?.(o),e?.(t.sourceEvent,o)}}))},[_,H,e,g,o]),(0,m.useEffect)(()=>{H&&H.on("end",e=>{if(!e.sourceEvent)return null;let{onViewportChangeEnd:t}=k.getState();if($.current=!1,k.setState({paneDragging:!1}),o&&isRightClickPan(g,j.current??0)&&!R.current&&o(e.sourceEvent),R.current=!1,(n||t)&&viewChanged(I.current,e.transform)){let o=eventToFlowTransform(e.transform);I.current=o,clearTimeout(D.current),D.current=setTimeout(()=>{t?.(o),n?.(e.sourceEvent,o)},i?150:0)}})},[H,i,g,n,o]),(0,m.useEffect)(()=>{H&&H.filter(e=>{let t=U||r,n=a&&e.ctrlKey;if(1===e.button&&"mousedown"===e.type&&(isWrappedWithClass(e,"react-flow__node")||isWrappedWithClass(e,"react-flow__edge")))return!0;if(!g&&!t&&!i&&!d&&!a||_||!d&&"dblclick"===e.type||isWrappedWithClass(e,M)&&"wheel"===e.type||isWrappedWithClass(e,A)&&"wheel"!==e.type||!a&&e.ctrlKey&&"wheel"===e.type||!t&&!i&&!n&&"wheel"===e.type||!g&&("mousedown"===e.type||"touchstart"===e.type)||Array.isArray(g)&&!g.includes(e.button)&&("mousedown"===e.type||"touchstart"===e.type))return!1;let o=Array.isArray(g)&&g.includes(e.button)||!e.button||e.button<=1;return(!e.ctrlKey||"wheel"===e.type)&&o})},[_,H,r,a,i,d,g,u,U]),(0,f.jsx)("div",{className:"react-flow__renderer",ref:O,style:et,children:C})},selector$9=e=>({userSelectionActive:e.userSelectionActive,userSelectionRect:e.userSelectionRect});function UserSelection(){let{userSelectionActive:e,userSelectionRect:t}=useStore(selector$9,b.X);return e&&t?(0,f.jsx)("div",{className:"react-flow__selection react-flow__container",style:{width:t.width,height:t.height,transform:`translate(${t.x}px, ${t.y}px)`}}):null}function handleParentExpand(e,t){let n=e.find(e=>e.id===t.parentNode);if(n){let e=t.position.x+t.width-n.width,o=t.position.y+t.height-n.height;if(e>0||o>0||t.position.x<0||t.position.y<0){if(n.style={...n.style},n.style.width=n.style.width??n.width,n.style.height=n.style.height??n.height,e>0&&(n.style.width+=e),o>0&&(n.style.height+=o),t.position.x<0){let e=Math.abs(t.position.x);n.position.x=n.position.x-e,n.style.width+=e,t.position.x=0}if(t.position.y<0){let e=Math.abs(t.position.y);n.position.y=n.position.y-e,n.style.height+=e,t.position.y=0}n.width=n.style.width,n.height=n.style.height}}}function applyChanges(e,t){if(e.some(e=>"reset"===e.type))return e.filter(e=>"reset"===e.type).map(e=>e.item);let n=e.filter(e=>"add"===e.type).map(e=>e.item);return t.reduce((t,n)=>{let o=e.filter(e=>e.id===n.id);if(0===o.length)return t.push(n),t;let r={...n};for(let e of o)if(e)switch(e.type){case"select":r.selected=e.selected;break;case"position":void 0!==e.position&&(r.position=e.position),void 0!==e.positionAbsolute&&(r.positionAbsolute=e.positionAbsolute),void 0!==e.dragging&&(r.dragging=e.dragging),r.expandParent&&handleParentExpand(t,r);break;case"dimensions":void 0!==e.dimensions&&(r.width=e.dimensions.width,r.height=e.dimensions.height),void 0!==e.updateStyle&&(r.style={...r.style||{},...e.dimensions}),"boolean"==typeof e.resizing&&(r.resizing=e.resizing),r.expandParent&&handleParentExpand(t,r);break;case"remove":return t}return t.push(r),t},n)}function applyNodeChanges(e,t){return applyChanges(e,t)}let createSelectionChange=(e,t)=>({id:e,type:"select",selected:t});function getSelectionChanges(e,t){return e.reduce((e,n)=>{let o=t.includes(n.id);return!n.selected&&o?(n.selected=!0,e.push(createSelectionChange(n.id,!0))):n.selected&&!o&&(n.selected=!1,e.push(createSelectionChange(n.id,!1))),e},[])}let wrapHandler=(e,t)=>n=>{n.target===t.current&&e?.(n)},selector$8=e=>({userSelectionActive:e.userSelectionActive,elementsSelectable:e.elementsSelectable,dragging:e.paneDragging}),en=(0,m.memo)(({isSelecting:e,selectionMode:t=u.Full,panOnDrag:n,onSelectionStart:o,onSelectionEnd:r,onPaneClick:a,onPaneContextMenu:i,onPaneScroll:l,onPaneMouseEnter:s,onPaneMouseMove:d,onPaneMouseLeave:c,children:g})=>{let p=(0,m.useRef)(null),h=useStoreApi(),S=(0,m.useRef)(0),x=(0,m.useRef)(0),w=(0,m.useRef)(),{userSelectionActive:v,elementsSelectable:E,dragging:N}=useStore(selector$8,b.X),resetUserSelection=()=>{h.setState({userSelectionActive:!1,userSelectionRect:null}),S.current=0,x.current=0},onClick=e=>{a?.(e),h.getState().resetSelectedElements(),h.setState({nodesSelectionActive:!1})},C=l?e=>l(e):void 0,M=E&&(e||v);return(0,f.jsxs)("div",{className:(0,y.Z)(["react-flow__pane",{dragging:N,selection:e}]),onClick:M?void 0:wrapHandler(onClick,p),onContextMenu:wrapHandler(e=>{if(Array.isArray(n)&&n?.includes(2)){e.preventDefault();return}i?.(e)},p),onWheel:wrapHandler(C,p),onMouseEnter:M?void 0:s,onMouseDown:M?t=>{let{resetSelectedElements:n,domNode:r}=h.getState();if(w.current=r?.getBoundingClientRect(),!E||!e||0!==t.button||t.target!==p.current||!w.current)return;let{x:a,y:i}=getEventPosition(t,w.current);n(),h.setState({userSelectionRect:{width:0,height:0,startX:a,startY:i,x:a,y:i}}),o?.(t)}:void 0,onMouseMove:M?n=>{let{userSelectionRect:o,nodeInternals:r,edges:a,transform:i,onNodesChange:l,onEdgesChange:s,nodeOrigin:d,getNodes:c}=h.getState();if(!e||!w.current||!o)return;h.setState({userSelectionActive:!0,nodesSelectionActive:!1});let g=getEventPosition(n,w.current),p=o.startX??0,f=o.startY??0,m={...o,x:g.xe.id),E=b.map(e=>e.id);if(S.current!==E.length){S.current=E.length;let e=getSelectionChanges(y,E);e.length&&l?.(e)}if(x.current!==v.length){x.current=v.length;let e=getSelectionChanges(a,v);e.length&&s?.(e)}h.setState({userSelectionRect:m})}:d,onMouseUp:M?e=>{if(0!==e.button)return;let{userSelectionRect:t}=h.getState();!v&&t&&e.target===p.current&&onClick?.(e),h.setState({nodesSelectionActive:S.current>0}),resetUserSelection(),r?.(e)}:void 0,onMouseLeave:M?e=>{v&&(h.setState({nodesSelectionActive:S.current>0}),r?.(e)),resetUserSelection()}:c,ref:p,style:et,children:[g,(0,f.jsx)(UserSelection,{})]})});en.displayName="Pane";let selector$7=e=>{let t=e.getNodes().filter(e=>e.selected);return{...getRectOfNodes(t,e.nodeOrigin),transformString:`translate(${e.transform[0]}px,${e.transform[1]}px) scale(${e.transform[2]})`,userSelectionActive:e.userSelectionActive}};var eo=(0,m.memo)(function({onSelectionContextMenu:e,noPanClassName:t,disableKeyboardA11y:n}){let o=useStoreApi(),{width:r,height:a,x:i,y:l,transformString:s,userSelectionActive:d}=useStore(selector$7,b.X),c=useUpdateNodePositions(),u=(0,m.useRef)(null);if((0,m.useEffect)(()=>{n||u.current?.focus({preventScroll:!0})},[n]),useDrag({nodeRef:u}),d||!r||!a)return null;let g=e?t=>{let n=o.getState().getNodes().filter(e=>e.selected);e(t,n)}:void 0;return(0,f.jsx)("div",{className:(0,y.Z)(["react-flow__nodesselection","react-flow__container",t]),style:{transform:s},children:(0,f.jsx)("div",{ref:u,className:"react-flow__nodesselection-rect",onContextMenu:g,tabIndex:n?void 0:-1,onKeyDown:n?void 0:e=>{Object.prototype.hasOwnProperty.call(Q,e.key)&&c({x:Q[e.key].x,y:Q[e.key].y,isShiftPressed:e.shiftKey})},style:{width:r,height:a,top:l,left:i}})})});let selector$6=e=>e.nodesSelectionActive,FlowRenderer=({children:e,onPaneClick:t,onPaneMouseEnter:n,onPaneMouseMove:o,onPaneMouseLeave:r,onPaneContextMenu:a,onPaneScroll:i,deleteKeyCode:l,onMove:s,onMoveStart:d,onMoveEnd:c,selectionKeyCode:u,selectionOnDrag:g,selectionMode:p,onSelectionStart:h,onSelectionEnd:m,multiSelectionKeyCode:y,panActivationKeyCode:S,zoomActivationKeyCode:x,elementsSelectable:b,zoomOnScroll:w,zoomOnPinch:v,panOnScroll:E,panOnScrollSpeed:N,panOnScrollMode:C,zoomOnDoubleClick:M,panOnDrag:P,defaultViewport:A,translateExtent:D,minZoom:k,maxZoom:$,preventScrolling:R,onSelectionContextMenu:O,noWheelClassName:I,noPanClassName:H,disableKeyboardA11y:B})=>{let T=useStore(selector$6),_=useKeyPress(u),U=useKeyPress(S),j=U||P;return useGlobalKeyHandler({deleteKeyCode:l,multiSelectionKeyCode:y}),(0,f.jsx)(ZoomPane,{onMove:s,onMoveStart:d,onMoveEnd:c,onPaneContextMenu:a,elementsSelectable:b,zoomOnScroll:w,zoomOnPinch:v,panOnScroll:E,panOnScrollSpeed:N,panOnScrollMode:C,zoomOnDoubleClick:M,panOnDrag:!_&&j,defaultViewport:A,translateExtent:D,minZoom:k,maxZoom:$,zoomActivationKeyCode:x,preventScrolling:R,noWheelClassName:I,noPanClassName:H,children:(0,f.jsxs)(en,{onSelectionStart:h,onSelectionEnd:m,onPaneClick:t,onPaneMouseEnter:n,onPaneMouseMove:o,onPaneMouseLeave:r,onPaneContextMenu:a,onPaneScroll:i,panOnDrag:j,isSelecting:!!(_||g&&!0!==j),selectionMode:p,children:[e,T&&(0,f.jsx)(eo,{onSelectionContextMenu:O,noPanClassName:H,disableKeyboardA11y:B})]})})};FlowRenderer.displayName="FlowRenderer";var er=(0,m.memo)(FlowRenderer);let selector$5=e=>({nodesDraggable:e.nodesDraggable,nodesConnectable:e.nodesConnectable,nodesFocusable:e.nodesFocusable,elementsSelectable:e.elementsSelectable,updateNodeDimensions:e.updateNodeDimensions,onError:e.onError}),NodeRenderer=e=>{let{nodesDraggable:t,nodesConnectable:n,nodesFocusable:o,elementsSelectable:r,updateNodeDimensions:a,onError:i}=useStore(selector$5,b.X),l=function(e){let t=useStore((0,m.useCallback)(t=>e?getNodesInside(t.nodeInternals,{x:0,y:0,width:t.width,height:t.height},t.transform,!0):t.getNodes(),[e]));return t}(e.onlyRenderVisibleElements),s=(0,m.useRef)(),d=(0,m.useMemo)(()=>{if("undefined"==typeof ResizeObserver)return null;let e=new ResizeObserver(e=>{let t=e.map(e=>({id:e.target.getAttribute("data-id"),nodeElement:e.target,forceUpdate:!0}));a(t)});return s.current=e,e},[]);return(0,m.useEffect)(()=>()=>{s?.current?.disconnect()},[]),(0,f.jsx)("div",{className:"react-flow__nodes",style:et,children:l.map(a=>{let l=a.type||"default";e.nodeTypes[l]||(i?.("003",P.error003(l)),l="default");let s=e.nodeTypes[l]||e.nodeTypes.default,c=!!(a.draggable||t&&void 0===a.draggable),u=!!(a.selectable||r&&void 0===a.selectable),g=!!(a.connectable||n&&void 0===a.connectable),p=!!(a.focusable||o&&void 0===a.focusable),m=e.nodeExtent?clampPosition(a.positionAbsolute,e.nodeExtent):a.positionAbsolute,y=m?.x??0,S=m?.y??0,x=getPositionWithOrigin({x:y,y:S,width:a.width??0,height:a.height??0,origin:e.nodeOrigin});return(0,f.jsx)(s,{id:a.id,className:a.className,style:a.style,type:l,data:a.data,sourcePosition:a.sourcePosition||h.Bottom,targetPosition:a.targetPosition||h.Top,hidden:a.hidden,xPos:y,yPos:S,xPosOrigin:x.x,yPosOrigin:x.y,selectNodesOnDrag:e.selectNodesOnDrag,onClick:e.onNodeClick,onMouseEnter:e.onNodeMouseEnter,onMouseMove:e.onNodeMouseMove,onMouseLeave:e.onNodeMouseLeave,onContextMenu:e.onNodeContextMenu,onDoubleClick:e.onNodeDoubleClick,selected:!!a.selected,isDraggable:c,isSelectable:u,isConnectable:g,isFocusable:p,resizeObserver:d,dragHandle:a.dragHandle,zIndex:a[k]?.z??0,isParent:!!a[k]?.isParent,noDragClassName:e.noDragClassName,noPanClassName:e.noPanClassName,initialized:!!a.width&&!!a.height,rfId:e.rfId,disableKeyboardA11y:e.disableKeyboardA11y,ariaLabel:a.ariaLabel},a.id)})})};NodeRenderer.displayName="NodeRenderer";var ea=(0,m.memo)(NodeRenderer);let ei=[{level:0,isMaxLevel:!0,edges:[]}],el={[p.Arrow]:({color:e="none",strokeWidth:t=1})=>(0,f.jsx)("polyline",{stroke:e,strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:t,fill:"none",points:"-5,-4 0,0 -5,4"}),[p.ArrowClosed]:({color:e="none",strokeWidth:t=1})=>(0,f.jsx)("polyline",{stroke:e,strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:t,fill:e,points:"-5,-4 0,0 -5,4 -5,-4"})},Marker=({id:e,type:t,color:n,width:o=12.5,height:r=12.5,markerUnits:a="strokeWidth",strokeWidth:i,orient:l="auto-start-reverse"})=>{let s=function(e){let t=useStoreApi(),n=(0,m.useMemo)(()=>{let n=Object.prototype.hasOwnProperty.call(el,e);return n?el[e]:(t.getState().onError?.("009",P.error009(e)),null)},[e]);return n}(t);return s?(0,f.jsx)("marker",{className:"react-flow__arrowhead",id:e,markerWidth:`${o}`,markerHeight:`${r}`,viewBox:"-10 -10 20 20",markerUnits:a,orient:l,refX:"0",refY:"0",children:(0,f.jsx)(s,{color:n,strokeWidth:i})}):null},markerSelector=({defaultColor:e,rfId:t})=>n=>{let o=[];return n.edges.reduce((n,r)=>([r.markerStart,r.markerEnd].forEach(r=>{if(r&&"object"==typeof r){let a=getMarkerId(r,t);o.includes(a)||(n.push({id:a,color:r.color||e,...r}),o.push(a))}}),n),[]).sort((e,t)=>e.id.localeCompare(t.id))},MarkerDefinitions=({defaultColor:e,rfId:t})=>{let n=useStore((0,m.useCallback)(markerSelector({defaultColor:e,rfId:t}),[e,t]),(e,t)=>!(e.length!==t.length||e.some((e,n)=>e.id!==t[n].id)));return(0,f.jsx)("defs",{children:n.map(e=>(0,f.jsx)(Marker,{id:e.id,type:e.type,color:e.color,width:e.width,height:e.height,markerUnits:e.markerUnits,strokeWidth:e.strokeWidth,orient:e.orient},e.id))})};MarkerDefinitions.displayName="MarkerDefinitions";var es=(0,m.memo)(MarkerDefinitions);let selector$4=e=>({nodesConnectable:e.nodesConnectable,edgesFocusable:e.edgesFocusable,edgesUpdatable:e.edgesUpdatable,elementsSelectable:e.elementsSelectable,width:e.width,height:e.height,connectionMode:e.connectionMode,nodeInternals:e.nodeInternals,onError:e.onError}),EdgeRenderer=({defaultMarkerColor:e,onlyRenderVisibleElements:t,elevateEdgesOnSelect:n,rfId:o,edgeTypes:r,noPanClassName:a,onEdgeUpdate:i,onEdgeContextMenu:l,onEdgeMouseEnter:s,onEdgeMouseMove:c,onEdgeMouseLeave:u,onEdgeClick:g,edgeUpdaterRadius:p,onEdgeDoubleClick:S,onEdgeUpdateStart:x,onEdgeUpdateEnd:w,children:v})=>{let{edgesFocusable:E,edgesUpdatable:N,elementsSelectable:C,width:M,height:A,connectionMode:D,nodeInternals:$,onError:R}=useStore(selector$4,b.X),O=function(e,t,n){let o=useStore((0,m.useCallback)(n=>e?n.edges.filter(e=>{let o=t.get(e.source),r=t.get(e.target);return o?.width&&o?.height&&r?.width&&r?.height&&function({sourcePos:e,targetPos:t,sourceWidth:n,sourceHeight:o,targetWidth:r,targetHeight:a,width:i,height:l,transform:s}){let d={x:Math.min(e.x,t.x),y:Math.min(e.y,t.y),x2:Math.max(e.x+n,t.x+r),y2:Math.max(e.y+o,t.y+a)};d.x===d.x2&&(d.x2+=1),d.y===d.y2&&(d.y2+=1);let c=rectToBox({x:(0-s[0])/s[2],y:(0-s[1])/s[2],width:i/s[2],height:l/s[2]}),u=Math.max(0,Math.min(c.x2,d.x2)-Math.max(c.x,d.x)),g=Math.max(0,Math.min(c.y2,d.y2)-Math.max(c.y,d.y));return Math.ceil(u*g)>0}({sourcePos:o.positionAbsolute||{x:0,y:0},targetPos:r.positionAbsolute||{x:0,y:0},sourceWidth:o.width,sourceHeight:o.height,targetWidth:r.width,targetHeight:r.height,width:n.width,height:n.height,transform:n.transform})}):n.edges,[e,t]));return function(e,t,n=!1){let o=-1,r=e.reduce((e,r)=>{let a=isNumeric(r.zIndex),i=a?r.zIndex:0;if(n){let e=t.get(r.target),n=t.get(r.source),o=r.selected||e?.selected||n?.selected,l=Math.max(n?.[k]?.z||0,e?.[k]?.z||0,1e3);i=(a?r.zIndex:0)+(o?l:0)}return e[i]?e[i].push(r):e[i]=[r],o=i>o?i:o,e},{}),a=Object.entries(r).map(([e,t])=>{let n=+e;return{edges:t,level:n,isMaxLevel:n===o}});return 0===a.length?ei:a}(o,t,n)}(t,$,n);return M?(0,f.jsxs)(f.Fragment,{children:[O.map(({level:t,edges:n,isMaxLevel:m})=>(0,f.jsxs)("svg",{style:{zIndex:t},width:M,height:A,className:"react-flow__edges react-flow__container",children:[m&&(0,f.jsx)(es,{defaultColor:e,rfId:o}),(0,f.jsx)("g",{children:n.map(e=>{let[t,n,m]=getNodeData($.get(e.source)),[b,v,M]=getNodeData($.get(e.target));if(!m||!M)return null;let A=e.type||"default";r[A]||(R?.("011",P.error011(A)),A="default");let k=r[A]||r.default,O=D===d.Strict?v.target:(v.target??[]).concat(v.source??[]),I=getHandle(n.source,e.sourceHandle),H=getHandle(O,e.targetHandle),B=I?.position||h.Bottom,T=H?.position||h.Top,_=!!(e.focusable||E&&void 0===e.focusable),U=void 0!==i&&(e.updatable||N&&void 0===e.updatable);if(!I||!H)return R?.("008",P.error008(I,e)),null;let{sourceX:j,sourceY:z,targetX:L,targetY:F}=getEdgePositions(t,I,B,b,H,T);return(0,f.jsx)(k,{id:e.id,className:(0,y.Z)([e.className,a]),type:A,data:e.data,selected:!!e.selected,animated:!!e.animated,hidden:!!e.hidden,label:e.label,labelStyle:e.labelStyle,labelShowBg:e.labelShowBg,labelBgStyle:e.labelBgStyle,labelBgPadding:e.labelBgPadding,labelBgBorderRadius:e.labelBgBorderRadius,style:e.style,source:e.source,target:e.target,sourceHandleId:e.sourceHandle,targetHandleId:e.targetHandle,markerEnd:e.markerEnd,markerStart:e.markerStart,sourceX:j,sourceY:z,targetX:L,targetY:F,sourcePosition:B,targetPosition:T,elementsSelectable:C,onEdgeUpdate:i,onContextMenu:l,onMouseEnter:s,onMouseMove:c,onMouseLeave:u,onClick:g,edgeUpdaterRadius:p,onEdgeDoubleClick:S,onEdgeUpdateStart:x,onEdgeUpdateEnd:w,rfId:o,ariaLabel:e.ariaLabel,isFocusable:_,isUpdatable:U,pathOptions:"pathOptions"in e?e.pathOptions:void 0,interactionWidth:e.interactionWidth},e.id)})})]},t)),v]}):null};EdgeRenderer.displayName="EdgeRenderer";var ed=(0,m.memo)(EdgeRenderer);let selector$3=e=>`translate(${e.transform[0]}px,${e.transform[1]}px) scale(${e.transform[2]})`;function Viewport({children:e}){let t=useStore(selector$3);return(0,f.jsx)("div",{className:"react-flow__viewport react-flow__container",style:{transform:t},children:e})}let ec={[h.Left]:h.Right,[h.Right]:h.Left,[h.Top]:h.Bottom,[h.Bottom]:h.Top},ConnectionLine=({nodeId:e,handleType:t,style:n,type:o=g.Bezier,CustomComponent:r,connectionStatus:a})=>{let{fromNode:i,handleId:l,toX:s,toY:c,connectionMode:u}=useStore((0,m.useCallback)(t=>({fromNode:t.nodeInternals.get(e),handleId:t.connectionHandleId,toX:(t.connectionPosition.x-t.transform[0])/t.transform[2],toY:(t.connectionPosition.y-t.transform[1])/t.transform[2],connectionMode:t.connectionMode}),[e]),b.X),p=i?.[k]?.handleBounds,h=p?.[t];if(u===d.Loose&&(h=h||p?.["source"===t?"target":"source"]),!i||!h)return null;let y=l?h.find(e=>e.id===l):h[0],S=y?y.x+y.width/2:(i.width??0)/2,x=y?y.y+y.height/2:i.height??0,w=(i.positionAbsolute?.x??0)+S,v=(i.positionAbsolute?.y??0)+x,E=y?.position,N=E?ec[E]:null;if(!E||!N)return null;if(r)return(0,f.jsx)(r,{connectionLineType:o,connectionLineStyle:n,fromNode:i,fromHandle:y,fromX:w,fromY:v,toX:s,toY:c,fromPosition:E,toPosition:N,connectionStatus:a});let C="",M={sourceX:w,sourceY:v,sourcePosition:E,targetX:s,targetY:c,targetPosition:N};return o===g.Bezier?[C]=getBezierPath(M):o===g.Step?[C]=getSmoothStepPath({...M,borderRadius:0}):o===g.SmoothStep?[C]=getSmoothStepPath(M):o===g.SimpleBezier?[C]=getSimpleBezierPath(M):C=`M${w},${v} ${s},${c}`,(0,f.jsx)("path",{d:C,fill:"none",className:"react-flow__connection-path",style:n})};ConnectionLine.displayName="ConnectionLine";let selector$2=e=>({nodeId:e.connectionNodeId,handleType:e.connectionHandleType,nodesConnectable:e.nodesConnectable,connectionStatus:e.connectionStatus,width:e.width,height:e.height});function ConnectionLineWrapper({containerStyle:e,style:t,type:n,component:o}){let{nodeId:r,handleType:a,nodesConnectable:i,width:l,height:s,connectionStatus:d}=useStore(selector$2,b.X);return r&&a&&l&&i?(0,f.jsx)("svg",{style:e,width:l,height:s,className:"react-flow__edges react-flow__connectionline react-flow__container",children:(0,f.jsx)("g",{className:(0,y.Z)(["react-flow__connection",d]),children:(0,f.jsx)(ConnectionLine,{nodeId:r,handleType:a,style:t,type:n,CustomComponent:o,connectionStatus:d})})}):null}let GraphView=({nodeTypes:e,edgeTypes:t,onMove:n,onMoveStart:o,onMoveEnd:r,onInit:a,onNodeClick:i,onEdgeClick:l,onNodeDoubleClick:s,onEdgeDoubleClick:d,onNodeMouseEnter:c,onNodeMouseMove:u,onNodeMouseLeave:g,onNodeContextMenu:p,onSelectionContextMenu:h,onSelectionStart:y,onSelectionEnd:S,connectionLineType:x,connectionLineStyle:b,connectionLineComponent:w,connectionLineContainerStyle:v,selectionKeyCode:E,selectionOnDrag:N,selectionMode:C,multiSelectionKeyCode:M,panActivationKeyCode:P,zoomActivationKeyCode:A,deleteKeyCode:D,onlyRenderVisibleElements:k,elementsSelectable:$,selectNodesOnDrag:R,defaultViewport:O,translateExtent:I,minZoom:H,maxZoom:B,preventScrolling:T,defaultMarkerColor:_,zoomOnScroll:U,zoomOnPinch:j,panOnScroll:z,panOnScrollSpeed:L,panOnScrollMode:F,zoomOnDoubleClick:W,panOnDrag:V,onPaneClick:Z,onPaneMouseEnter:K,onPaneMouseMove:X,onPaneMouseLeave:Y,onPaneScroll:G,onPaneContextMenu:q,onEdgeUpdate:Q,onEdgeContextMenu:J,onEdgeMouseEnter:ee,onEdgeMouseMove:et,onEdgeMouseLeave:en,edgeUpdaterRadius:eo,onEdgeUpdateStart:ei,onEdgeUpdateEnd:el,noDragClassName:es,noWheelClassName:ec,noPanClassName:eu,elevateEdgesOnSelect:eg,disableKeyboardA11y:ep,nodeOrigin:eh,nodeExtent:ef,rfId:em})=>(!function(e){let t=useReactFlow(),n=(0,m.useRef)(!1);(0,m.useEffect)(()=>{!n.current&&t.viewportInitialized&&e&&(setTimeout(()=>e(t),1),n.current=!0)},[e,t.viewportInitialized])}(a),(0,f.jsx)(er,{onPaneClick:Z,onPaneMouseEnter:K,onPaneMouseMove:X,onPaneMouseLeave:Y,onPaneContextMenu:q,onPaneScroll:G,deleteKeyCode:D,selectionKeyCode:E,selectionOnDrag:N,selectionMode:C,onSelectionStart:y,onSelectionEnd:S,multiSelectionKeyCode:M,panActivationKeyCode:P,zoomActivationKeyCode:A,elementsSelectable:$,onMove:n,onMoveStart:o,onMoveEnd:r,zoomOnScroll:U,zoomOnPinch:j,zoomOnDoubleClick:W,panOnScroll:z,panOnScrollSpeed:L,panOnScrollMode:F,panOnDrag:V,defaultViewport:O,translateExtent:I,minZoom:H,maxZoom:B,onSelectionContextMenu:h,preventScrolling:T,noDragClassName:es,noWheelClassName:ec,noPanClassName:eu,disableKeyboardA11y:ep,children:(0,f.jsxs)(Viewport,{children:[(0,f.jsx)(ed,{edgeTypes:t,onEdgeClick:l,onEdgeDoubleClick:d,onEdgeUpdate:Q,onlyRenderVisibleElements:k,onEdgeContextMenu:J,onEdgeMouseEnter:ee,onEdgeMouseMove:et,onEdgeMouseLeave:en,onEdgeUpdateStart:ei,onEdgeUpdateEnd:el,edgeUpdaterRadius:eo,defaultMarkerColor:_,noPanClassName:eu,elevateEdgesOnSelect:!!eg,disableKeyboardA11y:ep,rfId:em,children:(0,f.jsx)(ConnectionLineWrapper,{style:b,type:x,component:w,containerStyle:v})}),(0,f.jsx)("div",{className:"react-flow__edgelabel-renderer"}),(0,f.jsx)(ea,{nodeTypes:e,onNodeClick:i,onNodeDoubleClick:s,onNodeMouseEnter:c,onNodeMouseMove:u,onNodeMouseLeave:g,onNodeContextMenu:p,selectNodesOnDrag:R,onlyRenderVisibleElements:k,noPanClassName:eu,noDragClassName:es,disableKeyboardA11y:ep,nodeOrigin:eh,nodeExtent:ef,rfId:em})]})}));GraphView.displayName="GraphView";var eu=(0,m.memo)(GraphView);let eg=[[Number.NEGATIVE_INFINITY,Number.NEGATIVE_INFINITY],[Number.POSITIVE_INFINITY,Number.POSITIVE_INFINITY]],ep={rfId:"1",width:0,height:0,transform:[0,0,1],nodeInternals:new Map,edges:[],onNodesChange:null,onEdgesChange:null,hasDefaultNodes:!1,hasDefaultEdges:!1,d3Zoom:null,d3Selection:null,d3ZoomHandler:void 0,minZoom:.5,maxZoom:2,translateExtent:eg,nodeExtent:eg,nodesSelectionActive:!1,userSelectionActive:!1,userSelectionRect:null,connectionNodeId:null,connectionHandleId:null,connectionHandleType:"source",connectionPosition:{x:0,y:0},connectionStatus:null,connectionMode:d.Strict,domNode:null,paneDragging:!1,noPanClassName:"nopan",nodeOrigin:[0,0],snapGrid:[15,15],snapToGrid:!1,nodesDraggable:!0,nodesConnectable:!0,nodesFocusable:!0,edgesFocusable:!0,edgesUpdatable:!0,elementsSelectable:!0,elevateNodesOnSelect:!0,fitViewOnInit:!1,fitViewOnInitDone:!1,fitViewOnInitOptions:void 0,multiSelectionActive:!1,connectionStartHandle:null,connectionEndHandle:null,connectionClickStartHandle:null,connectOnClick:!0,ariaLiveMessage:"",autoPanOnConnect:!0,autoPanOnNodeDrag:!0,connectionRadius:20,onError:devWarn,isValidConnection:void 0},createRFStore=()=>(0,x.M)((e,t)=>({...ep,setNodes:n=>{let{nodeInternals:o,nodeOrigin:r,elevateNodesOnSelect:a}=t();e({nodeInternals:createNodeInternals(n,o,r,a)})},getNodes:()=>Array.from(t().nodeInternals.values()),setEdges:n=>{let{defaultEdgeOptions:o={}}=t();e({edges:n.map(e=>({...o,...e}))})},setDefaultNodesAndEdges:(n,o)=>{let r=void 0!==n,a=void 0!==o,i=r?createNodeInternals(n,new Map,t().nodeOrigin,t().elevateNodesOnSelect):new Map,l=a?o:[];e({nodeInternals:i,edges:l,hasDefaultNodes:r,hasDefaultEdges:a})},updateNodeDimensions:n=>{let{onNodesChange:o,nodeInternals:r,fitViewOnInit:a,fitViewOnInitDone:i,fitViewOnInitOptions:l,domNode:s,nodeOrigin:d}=t(),c=s?.querySelector(".react-flow__viewport");if(!c)return;let u=window.getComputedStyle(c),{m22:g}=new window.DOMMatrixReadOnly(u.transform),p=n.reduce((e,t)=>{let n=r.get(t.id);if(n){let o=getDimensions(t.nodeElement),a=!!(o.width&&o.height&&(n.width!==o.width||n.height!==o.height||t.forceUpdate));a&&(r.set(n.id,{...n,[k]:{...n[k],handleBounds:{source:getHandleBounds(".source",t.nodeElement,g,d),target:getHandleBounds(".target",t.nodeElement,g,d)}},...o}),e.push({id:n.id,type:"dimensions",dimensions:o}))}return e},[]);updateAbsoluteNodePositions(r,d);let h=i||a&&!i&&fitView(t,{initial:!0,...l});e({nodeInternals:new Map(r),fitViewOnInitDone:h}),p?.length>0&&o?.(p)},updateNodePositions:(e,n=!0,o=!1)=>{let{triggerNodeChanges:r}=t(),a=e.map(e=>{let t={id:e.id,type:"position",dragging:o};return n&&(t.positionAbsolute=e.positionAbsolute,t.position=e.position),t});r(a)},triggerNodeChanges:n=>{let{onNodesChange:o,nodeInternals:r,hasDefaultNodes:a,nodeOrigin:i,getNodes:l,elevateNodesOnSelect:s}=t();if(n?.length){if(a){let t=applyNodeChanges(n,l()),o=createNodeInternals(t,r,i,s);e({nodeInternals:o})}o?.(n)}},addSelectedNodes:n=>{let o;let{multiSelectionActive:r,edges:a,getNodes:i}=t(),l=null;r?o=n.map(e=>createSelectionChange(e,!0)):(o=getSelectionChanges(i(),n),l=getSelectionChanges(a,[])),updateNodesAndEdgesSelections({changedNodes:o,changedEdges:l,get:t,set:e})},addSelectedEdges:n=>{let o;let{multiSelectionActive:r,edges:a,getNodes:i}=t(),l=null;r?o=n.map(e=>createSelectionChange(e,!0)):(o=getSelectionChanges(a,n),l=getSelectionChanges(i(),[])),updateNodesAndEdgesSelections({changedNodes:l,changedEdges:o,get:t,set:e})},unselectNodesAndEdges:({nodes:n,edges:o}={})=>{let{edges:r,getNodes:a}=t(),i=n||a(),l=i.map(e=>(e.selected=!1,createSelectionChange(e.id,!1))),s=(o||r).map(e=>createSelectionChange(e.id,!1));updateNodesAndEdgesSelections({changedNodes:l,changedEdges:s,get:t,set:e})},setMinZoom:n=>{let{d3Zoom:o,maxZoom:r}=t();o?.scaleExtent([n,r]),e({minZoom:n})},setMaxZoom:n=>{let{d3Zoom:o,minZoom:r}=t();o?.scaleExtent([r,n]),e({maxZoom:n})},setTranslateExtent:n=>{t().d3Zoom?.translateExtent(n),e({translateExtent:n})},resetSelectedElements:()=>{let{edges:n,getNodes:o}=t(),r=o(),a=r.filter(e=>e.selected).map(e=>createSelectionChange(e.id,!1)),i=n.filter(e=>e.selected).map(e=>createSelectionChange(e.id,!1));updateNodesAndEdgesSelections({changedNodes:a,changedEdges:i,get:t,set:e})},setNodeExtent:n=>{let{nodeInternals:o}=t();o.forEach(e=>{e.positionAbsolute=clampPosition(e.position,n)}),e({nodeExtent:n,nodeInternals:new Map(o)})},panBy:e=>{let{transform:n,width:o,height:r,d3Zoom:a,d3Selection:i,translateExtent:l}=t();if(!a||!i||!e.x&&!e.y)return!1;let s=N.CR.translate(n[0]+e.x,n[1]+e.y).scale(n[2]),d=a?.constrain()(s,[[0,0],[o,r]],l);a.transform(i,d);let c=n[0]!==d.x||n[1]!==d.y||n[2]!==d.k;return c},cancelConnection:()=>e({connectionNodeId:ep.connectionNodeId,connectionHandleId:ep.connectionHandleId,connectionHandleType:ep.connectionHandleType,connectionStatus:ep.connectionStatus,connectionStartHandle:ep.connectionStartHandle,connectionEndHandle:ep.connectionEndHandle}),reset:()=>e({...ep})})),ReactFlowProvider=({children:e})=>{let t=(0,m.useRef)(null);return t.current||(t.current=createRFStore()),(0,f.jsx)(M,{value:t.current,children:e})};ReactFlowProvider.displayName="ReactFlowProvider";let Wrapper=({children:e})=>{let t=(0,m.useContext)(C);return t?(0,f.jsx)(f.Fragment,{children:e}):(0,f.jsx)(ReactFlowProvider,{children:e})};function useNodeOrEdgeTypes(e,t){(0,m.useRef)(null);let n=(0,m.useMemo)(()=>t(e),[e]);return n}Wrapper.displayName="ReactFlowWrapper";let eh={input:W,default:F,output:V,group:GroupNode},ef={default:T,straight:B,step:H,smoothstep:I,simplebezier:R},em=[0,0],ey=[15,15],eS={x:0,y:0,zoom:1},ex={width:"100%",height:"100%",overflow:"hidden",position:"relative",zIndex:0},eb=(0,m.forwardRef)(({nodes:e,edges:t,defaultNodes:n,defaultEdges:o,className:r,nodeTypes:a=eh,edgeTypes:i=ef,onNodeClick:l,onEdgeClick:s,onInit:p,onMove:h,onMoveStart:m,onMoveEnd:S,onConnect:x,onConnectStart:b,onConnectEnd:w,onClickConnectStart:v,onClickConnectEnd:E,onNodeMouseEnter:N,onNodeMouseMove:C,onNodeMouseLeave:M,onNodeContextMenu:P,onNodeDoubleClick:A,onNodeDragStart:D,onNodeDrag:k,onNodeDragStop:$,onNodesDelete:R,onEdgesDelete:O,onSelectionChange:I,onSelectionDragStart:H,onSelectionDrag:B,onSelectionDragStop:T,onSelectionContextMenu:_,onSelectionStart:U,onSelectionEnd:j,connectionMode:z=d.Strict,connectionLineType:L=g.Bezier,connectionLineStyle:F,connectionLineComponent:W,connectionLineContainerStyle:V,deleteKeyCode:Z="Backspace",selectionKeyCode:K="Shift",selectionOnDrag:X=!1,selectionMode:Y=u.Full,panActivationKeyCode:G="Space",multiSelectionKeyCode:q="Meta",zoomActivationKeyCode:Q="Meta",snapToGrid:J=!1,snapGrid:ee=ey,onlyRenderVisibleElements:et=!1,selectNodesOnDrag:en=!0,nodesDraggable:eo,nodesConnectable:er,nodesFocusable:ea,nodeOrigin:ei=em,edgesFocusable:el,edgesUpdatable:es,elementsSelectable:ed,defaultViewport:ec=eS,minZoom:ep=.5,maxZoom:eb=2,translateExtent:ew=eg,preventScrolling:ev=!0,nodeExtent:eE,defaultMarkerColor:eN="#b1b1b7",zoomOnScroll:eC=!0,zoomOnPinch:eM=!0,panOnScroll:eP=!1,panOnScrollSpeed:eA=.5,panOnScrollMode:eD=c.Free,zoomOnDoubleClick:ek=!0,panOnDrag:e$=!0,onPaneClick:eR,onPaneMouseEnter:eO,onPaneMouseMove:eI,onPaneMouseLeave:eH,onPaneScroll:eB,onPaneContextMenu:eT,children:e_,onEdgeUpdate:eU,onEdgeContextMenu:ej,onEdgeDoubleClick:ez,onEdgeMouseEnter:eL,onEdgeMouseMove:eF,onEdgeMouseLeave:eW,onEdgeUpdateStart:eV,onEdgeUpdateEnd:eZ,edgeUpdaterRadius:eK=10,onNodesChange:eX,onEdgesChange:eY,noDragClassName:eG="nodrag",noWheelClassName:eq="nowheel",noPanClassName:eQ="nopan",fitView:eJ=!1,fitViewOptions:e0,connectOnClick:e1=!0,attributionPosition:e2,proOptions:e5,defaultEdgeOptions:e3,elevateNodesOnSelect:e4=!0,elevateEdgesOnSelect:e7=!1,disableKeyboardA11y:e8=!1,autoPanOnConnect:e9=!0,autoPanOnNodeDrag:e6=!0,connectionRadius:te=20,isValidConnection:tt,onError:tn,style:to,id:tr,...ta},ti)=>{let tl=useNodeOrEdgeTypes(a,createNodeTypes),ts=useNodeOrEdgeTypes(i,createEdgeTypes),td=tr||"1";return(0,f.jsx)("div",{...ta,style:{...to,...ex},ref:ti,className:(0,y.Z)(["react-flow",r]),"data-testid":"rf__wrapper",id:tr,children:(0,f.jsxs)(Wrapper,{children:[(0,f.jsx)(eu,{onInit:p,onMove:h,onMoveStart:m,onMoveEnd:S,onNodeClick:l,onEdgeClick:s,onNodeMouseEnter:N,onNodeMouseMove:C,onNodeMouseLeave:M,onNodeContextMenu:P,onNodeDoubleClick:A,nodeTypes:tl,edgeTypes:ts,connectionLineType:L,connectionLineStyle:F,connectionLineComponent:W,connectionLineContainerStyle:V,selectionKeyCode:K,selectionOnDrag:X,selectionMode:Y,deleteKeyCode:Z,multiSelectionKeyCode:q,panActivationKeyCode:G,zoomActivationKeyCode:Q,onlyRenderVisibleElements:et,selectNodesOnDrag:en,defaultViewport:ec,translateExtent:ew,minZoom:ep,maxZoom:eb,preventScrolling:ev,zoomOnScroll:eC,zoomOnPinch:eM,zoomOnDoubleClick:ek,panOnScroll:eP,panOnScrollSpeed:eA,panOnScrollMode:eD,panOnDrag:e$,onPaneClick:eR,onPaneMouseEnter:eO,onPaneMouseMove:eI,onPaneMouseLeave:eH,onPaneScroll:eB,onPaneContextMenu:eT,onSelectionContextMenu:_,onSelectionStart:U,onSelectionEnd:j,onEdgeUpdate:eU,onEdgeContextMenu:ej,onEdgeDoubleClick:ez,onEdgeMouseEnter:eL,onEdgeMouseMove:eF,onEdgeMouseLeave:eW,onEdgeUpdateStart:eV,onEdgeUpdateEnd:eZ,edgeUpdaterRadius:eK,defaultMarkerColor:eN,noDragClassName:eG,noWheelClassName:eq,noPanClassName:eQ,elevateEdgesOnSelect:e7,rfId:td,disableKeyboardA11y:e8,nodeOrigin:ei,nodeExtent:eE}),(0,f.jsx)(StoreUpdater,{nodes:e,edges:t,defaultNodes:n,defaultEdges:o,onConnect:x,onConnectStart:b,onConnectEnd:w,onClickConnectStart:v,onClickConnectEnd:E,nodesDraggable:eo,nodesConnectable:er,nodesFocusable:ea,edgesFocusable:el,edgesUpdatable:es,elementsSelectable:ed,elevateNodesOnSelect:e4,minZoom:ep,maxZoom:eb,nodeExtent:eE,onNodesChange:eX,onEdgesChange:eY,snapToGrid:J,snapGrid:ee,connectionMode:z,translateExtent:ew,connectOnClick:e1,defaultEdgeOptions:e3,fitView:eJ,fitViewOptions:e0,onNodesDelete:R,onEdgesDelete:O,onNodeDragStart:D,onNodeDrag:k,onNodeDragStop:$,onSelectionDrag:B,onSelectionDragStart:H,onSelectionDragStop:T,noPanClassName:eQ,nodeOrigin:ei,rfId:td,autoPanOnConnect:e9,autoPanOnNodeDrag:e6,onError:tn,connectionRadius:te,isValidConnection:tt}),(0,f.jsx)(Wrapper$1,{onSelectionChange:I}),e_,(0,f.jsx)(Attribution,{proOptions:e5,position:e2}),(0,f.jsx)(A11yDescriptions,{rfId:td,disableKeyboardA11y:e8})]})})});function createUseItemsState(e){return t=>{let[n,o]=(0,m.useState)(t),r=(0,m.useCallback)(t=>o(n=>e(t,n)),[]);return[n,o,r]}}eb.displayName="ReactFlow",createUseItemsState(applyNodeChanges),createUseItemsState(function(e,t){return applyChanges(e,t)})}}]); \ No newline at end of file diff --git a/frontend/webapp/dep-out/_next/static/chunks/fd9d1056-9cea142d2b41eb16.js b/frontend/webapp/dep-out/_next/static/chunks/fd9d1056-9cea142d2b41eb16.js deleted file mode 100644 index 1a3ef1d6ea..0000000000 --- a/frontend/webapp/dep-out/_next/static/chunks/fd9d1056-9cea142d2b41eb16.js +++ /dev/null @@ -1,9 +0,0 @@ -"use strict";(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[971],{4417:function(n,a,i){/** - * @license React - * react-dom.production.min.js - * - * Copyright (c) Meta Platforms, Inc. and affiliates. - * - * This source code is licensed under the MIT license found in the - * LICENSE file in the root directory of this source tree. - */var o,s=i(2265),m=i(8261),y={usingClientEntryPoint:!1,Events:null,Dispatcher:{current:null}};function t(n){for(var a="https://reactjs.org/docs/error-decoder.html?invariant="+n,i=1;ix||(n.current=C[x],C[x]=null,x--)}function E(n,a){C[++x]=n.current,n.current=a}var z=Symbol.for("react.element"),P=Symbol.for("react.portal"),N=Symbol.for("react.fragment"),L=Symbol.for("react.strict_mode"),_=Symbol.for("react.profiler"),j=Symbol.for("react.provider"),M=Symbol.for("react.context"),F=Symbol.for("react.server_context"),O=Symbol.for("react.forward_ref"),I=Symbol.for("react.suspense"),R=Symbol.for("react.suspense_list"),A=Symbol.for("react.memo"),U=Symbol.for("react.lazy"),H=Symbol.for("react.scope");Symbol.for("react.debug_trace_mode");var Q=Symbol.for("react.offscreen"),$=Symbol.for("react.legacy_hidden"),B=Symbol.for("react.cache");Symbol.for("react.tracing_marker");var Y=Symbol.for("react.default_value"),G=Symbol.iterator;function Ca(n){return null===n||"object"!=typeof n?null:"function"==typeof(n=G&&n[G]||n["@@iterator"])?n:null}var K=ia(null),J=ia(null),X=ia(null);function Ga(n,a){switch(E(X,a),E(J,n),E(K,null),n=a.nodeType){case 9:case 11:a=(a=a.documentElement)&&(a=a.namespaceURI)?Ha(a):0;break;default:if(a=(n=8===n?a.parentNode:a).tagName,n=n.namespaceURI)a=Ia(n=Ha(n),a);else switch(a){case"svg":a=1;break;case"math":a=2;break;default:a=0}}D(K),E(K,a)}function Ja(){D(K),D(J),D(X)}function Ka(n){var a=K.current,i=Ia(a,n.type);a!==i&&(E(J,n),E(K,i))}function La(n){J.current===n&&(D(K),D(J))}var et=m.unstable_scheduleCallback,en=m.unstable_cancelCallback,er=m.unstable_shouldYield,el=m.unstable_requestPaint,ea=m.unstable_now,eo=m.unstable_getCurrentPriorityLevel,eu=m.unstable_ImmediatePriority,ec=m.unstable_UserBlockingPriority,es=m.unstable_NormalPriority,ed=m.unstable_LowPriority,ep=m.unstable_IdlePriority,em=null,eb=null,ey=Math.clz32?Math.clz32:function(n){return 0==(n>>>=0)?32:31-(ev(n)/ew|0)|0},ev=Math.log,ew=Math.LN2,eS=128,eE=8388608;function fb(n){switch(n&-n){case 1:return 1;case 2:return 2;case 4:return 4;case 8:return 8;case 16:return 16;case 32:return 32;case 64:return 64;case 128:case 256:case 512:case 1024:case 2048:case 4096:case 8192:case 16384:case 32768:case 65536:case 131072:case 262144:case 524288:case 1048576:case 2097152:case 4194304:return 8388480&n;case 8388608:case 16777216:case 33554432:case 67108864:return 125829120&n;case 134217728:return 134217728;case 268435456:return 268435456;case 536870912:return 536870912;case 1073741824:return 1073741824;default:return n}}function gb(n,a){var i=n.pendingLanes;if(0===i)return 0;var o=0,s=n.suspendedLanes,m=n.pingedLanes,y=268435455&i;if(0!==y){var v=y&~s;0!==v?o=fb(v):0!=(m&=y)&&(o=fb(m))}else 0!=(y=i&~s)?o=fb(y):0!==m&&(o=fb(m));if(0===o)return 0;if(0!==a&&a!==o&&0==(a&s)&&((s=o&-o)>=(m=a&-a)||32===s&&0!=(8388480&m)))return a;if(0!=(8&o)&&(o|=32&i),0!==(a=n.entangledLanes))for(n=n.entanglements,a&=o;0i;i++)a.push(n);return a}function mb(n,a){n.pendingLanes|=a,536870912!==a&&(n.suspendedLanes=0,n.pingedLanes=0)}function ob(n,a){var i=n.entangledLanes|=a;for(n=n.entanglements;i;){var o=31-ey(i),s=1<--k||m[v]!==y[k]){var C="\n"+m[v].replace(" at new "," at ");return n.displayName&&C.includes("")&&(C=C.replace("",n.displayName)),C}while(1<=v&&0<=k);break}}}finally{eU=!1,Error.prepareStackTrace=i}return(n=n?n.displayName||n.name:"")?Xb(n):""}function cc(n){switch(typeof n){case"boolean":case"number":case"string":case"undefined":case"object":return n;default:return""}}function dc(n){var a=n.type;return(n=n.nodeName)&&"input"===n.toLowerCase()&&("checkbox"===a||"radio"===a)}function fc(n){n._valueTracker||(n._valueTracker=function(n){var a=dc(n)?"checked":"value",i=Object.getOwnPropertyDescriptor(n.constructor.prototype,a),o=""+n[a];if(!n.hasOwnProperty(a)&&void 0!==i&&"function"==typeof i.get&&"function"==typeof i.set){var s=i.get,m=i.set;return Object.defineProperty(n,a,{configurable:!0,get:function(){return s.call(this)},set:function(n){o=""+n,m.call(this,n)}}),Object.defineProperty(n,a,{enumerable:i.enumerable}),{getValue:function(){return o},setValue:function(n){o=""+n},stopTracking:function(){n._valueTracker=null,delete n[a]}}}}(n))}function gc(n){if(!n)return!1;var a=n._valueTracker;if(!a)return!0;var i=a.getValue(),o="";return n&&(o=dc(n)?n.checked?"true":"false":n.value),(n=o)!==i&&(a.setValue(n),!0)}function hc(n){if(void 0===(n=n||("undefined"!=typeof document?document:void 0)))return null;try{return n.activeElement||n.body}catch(a){return n.body}}var eq=/[\n"\\]/g;function jc(n){return n.replace(eq,function(n){return"\\"+n.charCodeAt(0).toString(16)+" "})}function kc(n,a,i,o,s,m,y,v){n.name="",null!=y&&"function"!=typeof y&&"symbol"!=typeof y&&"boolean"!=typeof y?n.type=y:n.removeAttribute("type"),null!=a?"number"===y?(0===a&&""===n.value||n.value!=a)&&(n.value=""+cc(a)):n.value!==""+cc(a)&&(n.value=""+cc(a)):"submit"!==y&&"reset"!==y||n.removeAttribute("value"),null!=a?lc(n,y,cc(a)):null!=i?lc(n,y,cc(i)):null!=o&&n.removeAttribute("value"),null==s&&null!=m&&(n.defaultChecked=!!m),null!=s&&!!s!==n.checked&&(n.checked=s),null!=v&&"function"!=typeof v&&"symbol"!=typeof v&&"boolean"!=typeof v?n.name=""+cc(v):n.removeAttribute("name")}function mc(n,a,i,o,s,m,y,v){if(null!=m&&"function"!=typeof m&&"symbol"!=typeof m&&"boolean"!=typeof m&&(n.type=m),null!=a||null!=i){if(!("submit"!==m&&"reset"!==m||null!=a))return;i=null!=i?""+cc(i):"",a=null!=a?""+cc(a):i,v||a===n.value||(n.value=a),n.defaultValue=a}o="function"!=typeof(o=null!=o?o:s)&&"symbol"!=typeof o&&!!o,v||(n.checked=!!o),n.defaultChecked=!!o,null!=y&&"function"!=typeof y&&"symbol"!=typeof y&&"boolean"!=typeof y&&(n.name=y)}function lc(n,a,i){"number"===a&&hc(n.ownerDocument)===n||n.defaultValue===""+i||(n.defaultValue=""+i)}var eH=Array.isArray;function oc(n,a,i,o){if(n=n.options,a){a={};for(var s=0;s"+a.valueOf().toString()+"",a=n9.firstChild;n.firstChild;)n.removeChild(n.firstChild);for(;a.firstChild;)n.appendChild(a.firstChild)}}var eQ=sc;"undefined"!=typeof MSApp&&MSApp.execUnsafeLocalFunction&&(eQ=function(n,a){return MSApp.execUnsafeLocalFunction(function(){return sc(n,a)})});var e$=eQ;function vc(n,a){if(a){var i=n.firstChild;if(i&&i===n.lastChild&&3===i.nodeType){i.nodeValue=a;return}}n.textContent=a}var eB=new Set("animationIterationCount aspectRatio borderImageOutset borderImageSlice borderImageWidth boxFlex boxFlexGroup boxOrdinalGroup columnCount columns flex flexGrow flexPositive flexShrink flexNegative flexOrder gridArea gridRow gridRowEnd gridRowSpan gridRowStart gridColumn gridColumnEnd gridColumnSpan gridColumnStart fontWeight lineClamp lineHeight opacity order orphans scale tabSize widows zIndex zoom fillOpacity floodOpacity stopOpacity strokeDasharray strokeDashoffset strokeMiterlimit strokeOpacity strokeWidth MozAnimationIterationCount MozBoxFlex MozBoxFlexGroup MozLineClamp msAnimationIterationCount msFlex msZoom msFlexGrow msFlexNegative msFlexOrder msFlexPositive msFlexShrink msGridColumn msGridColumnSpan msGridRow msGridRowSpan WebkitAnimationIterationCount WebkitBoxFlex WebKitBoxFlexGroup WebkitBoxOrdinalGroup WebkitColumnCount WebkitColumns WebkitFlex WebkitFlexGrow WebkitFlexPositive WebkitFlexShrink WebkitLineClamp".split(" "));function xc(n,a,i){var o=0===a.indexOf("--");null==i||"boolean"==typeof i||""===i?o?n.setProperty(a,""):"float"===a?n.cssFloat="":n[a]="":o?n.setProperty(a,i):"number"!=typeof i||0===i||eB.has(a)?"float"===a?n.cssFloat=i:n[a]=(""+i).trim():n[a]=i+"px"}function yc(n,a,i){if(null!=a&&"object"!=typeof a)throw Error(t(62));if(n=n.style,null!=i){for(var o in i)!i.hasOwnProperty(o)||null!=a&&a.hasOwnProperty(o)||(0===o.indexOf("--")?n.setProperty(o,""):"float"===o?n.cssFloat="":n[o]="");for(var s in a)o=a[s],a.hasOwnProperty(s)&&i[s]!==o&&xc(n,s,o)}else for(var m in a)a.hasOwnProperty(m)&&xc(n,m,a[m])}function zc(n){if(-1===n.indexOf("-"))return!1;switch(n){case"annotation-xml":case"color-profile":case"font-face":case"font-face-src":case"font-face-uri":case"font-face-format":case"font-face-name":case"missing-glyph":return!1;default:return!0}}var eZ=new Map([["acceptCharset","accept-charset"],["htmlFor","for"],["httpEquiv","http-equiv"],["crossOrigin","crossorigin"],["accentHeight","accent-height"],["alignmentBaseline","alignment-baseline"],["arabicForm","arabic-form"],["baselineShift","baseline-shift"],["capHeight","cap-height"],["clipPath","clip-path"],["clipRule","clip-rule"],["colorInterpolation","color-interpolation"],["colorInterpolationFilters","color-interpolation-filters"],["colorProfile","color-profile"],["colorRendering","color-rendering"],["dominantBaseline","dominant-baseline"],["enableBackground","enable-background"],["fillOpacity","fill-opacity"],["fillRule","fill-rule"],["floodColor","flood-color"],["floodOpacity","flood-opacity"],["fontFamily","font-family"],["fontSize","font-size"],["fontSizeAdjust","font-size-adjust"],["fontStretch","font-stretch"],["fontStyle","font-style"],["fontVariant","font-variant"],["fontWeight","font-weight"],["glyphName","glyph-name"],["glyphOrientationHorizontal","glyph-orientation-horizontal"],["glyphOrientationVertical","glyph-orientation-vertical"],["horizAdvX","horiz-adv-x"],["horizOriginX","horiz-origin-x"],["imageRendering","image-rendering"],["letterSpacing","letter-spacing"],["lightingColor","lighting-color"],["markerEnd","marker-end"],["markerMid","marker-mid"],["markerStart","marker-start"],["overlinePosition","overline-position"],["overlineThickness","overline-thickness"],["paintOrder","paint-order"],["panose-1","panose-1"],["pointerEvents","pointer-events"],["renderingIntent","rendering-intent"],["shapeRendering","shape-rendering"],["stopColor","stop-color"],["stopOpacity","stop-opacity"],["strikethroughPosition","strikethrough-position"],["strikethroughThickness","strikethrough-thickness"],["strokeDasharray","stroke-dasharray"],["strokeDashoffset","stroke-dashoffset"],["strokeLinecap","stroke-linecap"],["strokeLinejoin","stroke-linejoin"],["strokeMiterlimit","stroke-miterlimit"],["strokeOpacity","stroke-opacity"],["strokeWidth","stroke-width"],["textAnchor","text-anchor"],["textDecoration","text-decoration"],["textRendering","text-rendering"],["transformOrigin","transform-origin"],["underlinePosition","underline-position"],["underlineThickness","underline-thickness"],["unicodeBidi","unicode-bidi"],["unicodeRange","unicode-range"],["unitsPerEm","units-per-em"],["vAlphabetic","v-alphabetic"],["vHanging","v-hanging"],["vIdeographic","v-ideographic"],["vMathematical","v-mathematical"],["vectorEffect","vector-effect"],["vertAdvY","vert-adv-y"],["vertOriginX","vert-origin-x"],["vertOriginY","vert-origin-y"],["wordSpacing","word-spacing"],["writingMode","writing-mode"],["xmlnsXlink","xmlns:xlink"],["xHeight","x-height"]]),eY=null;function Cc(n){return(n=n.target||n.srcElement||window).correspondingUseElement&&(n=n.correspondingUseElement),3===n.nodeType?n.parentNode:n}var eG=null,eK=null;function Fc(n){var a=Fb(n);if(a&&(n=a.stateNode)){var i=Hb(n);switch(n=a.stateNode,a.type){case"input":if(kc(n,i.value,i.defaultValue,i.defaultValue,i.checked,i.defaultChecked,i.type,i.name),a=i.name,"radio"===i.type&&null!=a){for(i=n;i.parentNode;)i=i.parentNode;for(i=i.querySelectorAll('input[name="'+jc(""+a)+'"][type="radio"]'),a=0;a>=y,s-=y,tt=1<<32-ey(a)+s|i<k?(C=v,v=null):C=v.sibling;var x=r(a,v,o[k],s);if(null===x){null===v&&(v=C);break}n&&v&&null===x.alternate&&b(a,v),i=f(x,i,k),null===y?m=x:y.sibling=x,y=x,v=C}if(k===o.length)return c(a,v),to&&jd(a,k),m;if(null===v){for(;kk?(C=v,v=null):C=v.sibling;var z=r(a,v,x.value,s);if(null===z){null===v&&(v=C);break}n&&v&&null===z.alternate&&b(a,v),i=f(z,i,k),null===y?m=z:y.sibling=z,y=z,v=C}if(x.done)return c(a,v),to&&jd(a,k),m;if(null===v){for(;!x.done;k++,x=o.next())null!==(x=w(a,x.value,s))&&(i=f(x,i,k),null===y?m=x:y.sibling=x,y=x);return to&&jd(a,k),m}for(v=d(a,v);!x.done;k++,x=o.next())null!==(x=u(v,a,k,x.value,s))&&(n&&null!==x.alternate&&v.delete(null===x.key?k:x.key),i=f(x,i,k),null===y?m=x:y.sibling=x,y=x);return n&&v.forEach(function(n){return b(a,n)}),to&&jd(a,k),m}(a,i,o,s);if("function"==typeof o.then)return S(a,i,le(o),s);if(o.$$typeof===M||o.$$typeof===F)return S(a,i,ve(a,o,s),s);ne(a,o)}return"string"==typeof o&&""!==o||"number"==typeof o?(o=""+o,null!==i&&6===i.tag?(c(a,i.sibling),(i=e(i,o)).return=a):(c(a,i),(i=re(o,a.mode,s)).return=a),g(a=i)):c(a,i)}(a,i,o,s),tw=null,a}}var tE=pe(!0),tC=pe(!1),tx=ia(null),tz=ia(0);function Ae(n,a){E(tz,n=nR),E(tx,a),nR=n|a.baseLanes}function Ce(){E(tz,nR),E(tx,tx.current)}function De(){nR=tz.current,D(tx),D(tz)}var tP=ia(null),tN=null;function Ge(n){var a=n.alternate;E(tL,1&tL.current),E(tP,n),null===tN&&(null===a||null!==tx.current?tN=n:null!==a.memoizedState&&(tN=n))}function Ie(n){if(22===n.tag){if(E(tL,tL.current),E(tP,n),null===tN){var a=n.alternate;null!==a&&null!==a.memoizedState&&(tN=n)}}else Je(n)}function Je(){E(tL,tL.current),E(tP,tP.current)}function Ke(n){D(tP),tN===n&&(tN=null),D(tL)}var tL=ia(0);function Le(n){for(var a=n;null!==a;){if(13===a.tag){var i=a.memoizedState;if(null!==i&&(null===(i=i.dehydrated)||"$?"===i.data||"$!"===i.data))return a}else if(19===a.tag&&void 0!==a.memoizedProps.revealOrder){if(0!=(128&a.flags))return a}else if(null!==a.child){a.child.return=a,a=a.child;continue}if(a===n)break;for(;null===a.sibling;){if(null===a.return||a.return===n)return null;a=a.return}a.sibling.return=a.return,a=a.sibling}return null}var tT=null,t_=null,tD=!1,tM=!1,tF=!1,tO=0;function Se(n){n!==t_&&null===n.next&&(null===t_?tT=t_=n:t_=t_.next=n),tM=!0,tD||(tD=!0,Te(Ue))}function Ve(n){if(!tF&&tM){var a=n_,i=nM,o=null;tF=!0;do for(var s=!1,m=tT;null!==m;){if((!n||0===m.tag)&&0!=(3&gb(m,m===a?i:0)))try{s=!0;var y=m;if(0!=(6&nT))throw Error(t(327));We();var v=gb(y,0);if(0!=(3&v)){var k=Xe(y,v);if(0!==y.tag&&2===k){var C=v,x=ib(y,C);0!==x&&(v=x,k=Ye(y,C,x))}if(1===k)throw C=nA,$e(y,0),af(y,v),Se(y),C;6===k?af(y,v):(y.finishedWork=y.current.alternate,y.finishedLanes=v,bf(y,nQ,nZ))}Se(y)}catch(n){null===o?o=[n]:o.push(n)}m=m.next}while(s);if(tF=!1,null!==o){if(1m?m:8;var y=tR.transition;tR.transition=null,mg(n,a,i),tR.transition={};try{mg(n,a,o),s()}catch(n){throw n}finally{eC=m,tR.transition=y}}function ng(){return Hf().memoizedState}function og(){return Hf().memoizedState}function pg(n){for(var a=n.return;null!==a;){switch(a.tag){case 24:case 3:var i=qg(a),o=Ud(a,n=Td(i),i);null!==o&&(Yf(o,a,i),Vd(o,a,i)),a={cache:rg()},n.payload=a;return}a=a.return}}function sg(n,a,i){var o=qg(n);i={lane:o,revertLane:0,action:i,hasEagerState:!1,eagerState:null,next:null},tg(n)?ug(a,i):(Ld(n,a,i,o),null!==(i=Nd(n))&&(Yf(i,n,o),vg(i,a,o)))}function mg(n,a,i){var o=qg(n),s={lane:o,revertLane:0,action:i,hasEagerState:!1,eagerState:null,next:null};if(tg(n))ug(a,s);else{var m=n.alternate;if(0===n.lanes&&(null===m||0===m.lanes)&&null!==(m=a.lastRenderedReducer))try{var y=a.lastRenderedState,v=m(y,i);if(s.hasEagerState=!0,s.eagerState=v,e2(v,y)){Ld(n,a,s,0),null===n_&&Jd();return}}catch(n){}finally{}Ld(n,a,s,o),null!==(i=Nd(n))&&(Yf(i,n,o),vg(i,a,o))}}function tg(n){var a=n.alternate;return n===tA||null!==a&&a===tA}function ug(n,a){tH=tq=!0;var i=n.pending;null===i?a.next=a:(a.next=i.next,i.next=a),n.pending=a}function vg(n,a,i){if(0!=(8388480&i)){var o=a.lanes;o&=n.pendingLanes,i|=o,a.lanes=i,ob(n,i)}}rt=function(){return{lastEffect:null,events:null,stores:null}};var tG={readContext:Lf,use:Kf,useCallback:uf,useContext:uf,useEffect:uf,useImperativeHandle:uf,useInsertionEffect:uf,useLayoutEffect:uf,useMemo:uf,useReducer:uf,useRef:uf,useState:uf,useDebugValue:uf,useDeferredValue:uf,useTransition:uf,useSyncExternalStore:uf,useId:uf};tG.useCacheRefresh=uf;var tK={readContext:Lf,use:Kf,useCallback:function(n,a){return Gf().memoizedState=[n,void 0===a?null:a],n},useContext:Lf,useEffect:cg,useImperativeHandle:function(n,a,i){i=null!=i?i.concat([n]):null,ag(4194308,4,fg.bind(null,a,n),i)},useLayoutEffect:function(n,a){return ag(4194308,4,n,a)},useInsertionEffect:function(n,a){ag(4,2,n,a)},useMemo:function(n,a){var i=Gf();return a=void 0===a?null:a,tQ&&n(),n=n(),i.memoizedState=[n,a],n},useReducer:function(n,a,i){var o=Gf();return a=void 0!==i?i(a):a,o.memoizedState=o.baseState=a,n={pending:null,lanes:0,dispatch:null,lastRenderedReducer:n,lastRenderedState:a},o.queue=n,n=n.dispatch=sg.bind(null,tA,n),[o.memoizedState,n]},useRef:function(n){return n={current:n},Gf().memoizedState=n},useState:function(n){var a=(n=Zf(n)).queue,i=mg.bind(null,tA,a);return a.dispatch=i,[n.memoizedState,i]},useDebugValue:hg,useDeferredValue:function(n){return Gf().memoizedState=n},useTransition:function(){var n=Zf(!1);return n=lg.bind(null,tA,n.queue,!0,!1),Gf().memoizedState=n,[!1,n]},useSyncExternalStore:function(n,a,i){var o=tA,s=Gf();if(to){if(void 0===i)throw Error(t(407));i=i()}else{if(i=a(),null===n_)throw Error(t(349));0!=(60&tV)||Vf(o,a,i)}s.memoizedState=i;var m={value:i,getSnapshot:a};return s.queue=m,cg(Sf.bind(null,o,m,n),[n]),o.flags|=2048,Tf(9,Uf.bind(null,o,m,i,a),{destroy:void 0},null),i},useId:function(){var n=Gf(),a=n_.identifierPrefix;if(to){var i=tr,o=tt;a=":"+a+"R"+(i=(o&~(1<<32-ey(o)-1)).toString(32)+i),0<(i=t$++)&&(a+="H"+i.toString(32)),a+=":"}else a=":"+a+"r"+(i=tY++).toString(32)+":";return n.memoizedState=a},useCacheRefresh:function(){return Gf().memoizedState=pg.bind(null,tA)}},tJ={readContext:Lf,use:Kf,useCallback:ig,useContext:Lf,useEffect:Rf,useImperativeHandle:gg,useInsertionEffect:dg,useLayoutEffect:eg,useMemo:jg,useReducer:Nf,useRef:$f,useState:function(){return Nf(Mf)},useDebugValue:hg,useDeferredValue:function(n){return kg(Hf(),tW.memoizedState,n)},useTransition:function(){var n=Nf(Mf)[0],a=Hf().memoizedState;return["boolean"==typeof n?n:Jf(n),a]},useSyncExternalStore:Qf,useId:ng};tJ.useCacheRefresh=og;var tX={readContext:Lf,use:Kf,useCallback:ig,useContext:Lf,useEffect:Rf,useImperativeHandle:gg,useInsertionEffect:dg,useLayoutEffect:eg,useMemo:jg,useReducer:Pf,useRef:$f,useState:function(){return Pf(Mf)},useDebugValue:hg,useDeferredValue:function(n){var a=Hf();return null===tW?a.memoizedState=n:kg(a,tW.memoizedState,n)},useTransition:function(){var n=Pf(Mf)[0],a=Hf().memoizedState;return["boolean"==typeof n?n:Jf(n),a]},useSyncExternalStore:Qf,useId:ng};function wg(n,a){if(n&&n.defaultProps)for(var i in a=v({},a),n=n.defaultProps)void 0===a[i]&&(a[i]=n[i]);return a}function xg(n,a,i,o){i=null==(i=i(o,a=n.memoizedState))?a:v({},a,i),n.memoizedState=i,0===n.lanes&&(n.updateQueue.baseState=i)}tX.useCacheRefresh=og;var t0={isMounted:function(n){return!!(n=n._reactInternals)&&Ic(n)===n},enqueueSetState:function(n,a,i){var o=qg(n=n._reactInternals),s=Td(o);s.payload=a,null!=i&&(s.callback=i),null!==(a=Ud(n,s,o))&&(Yf(a,n,o),Vd(a,n,o))},enqueueReplaceState:function(n,a,i){var o=qg(n=n._reactInternals),s=Td(o);s.tag=1,s.payload=a,null!=i&&(s.callback=i),null!==(a=Ud(n,s,o))&&(Yf(a,n,o),Vd(a,n,o))},enqueueForceUpdate:function(n,a){var i=qg(n=n._reactInternals),o=Td(i);o.tag=2,null!=a&&(o.callback=a),null!==(a=Ud(n,o,i))&&(Yf(a,n,i),Vd(a,n,i))}};function zg(n,a,i,o,s,m,y){return"function"==typeof(n=n.stateNode).shouldComponentUpdate?n.shouldComponentUpdate(o,m,y):!a.prototype||!a.prototype.isPureReactComponent||!ae(i,o)||!ae(s,m)}function Ag(n,a,i){var o=!1,s=eJ,m=a.contextType;return"object"==typeof m&&null!==m?m=Lf(m):(s=Tc(a)?e1:eX.current,m=(o=null!=(o=a.contextTypes))?Sc(n,s):eJ),a=new a(i,m),n.memoizedState=null!==a.state&&void 0!==a.state?a.state:null,a.updater=t0,n.stateNode=a,a._reactInternals=n,o&&((n=n.stateNode).__reactInternalMemoizedUnmaskedChildContext=s,n.__reactInternalMemoizedMaskedChildContext=m),a}function Bg(n,a,i,o){n=a.state,"function"==typeof a.componentWillReceiveProps&&a.componentWillReceiveProps(i,o),"function"==typeof a.UNSAFE_componentWillReceiveProps&&a.UNSAFE_componentWillReceiveProps(i,o),a.state!==n&&t0.enqueueReplaceState(a,a.state,null)}function Cg(n,a,i,o){var s=n.stateNode;s.props=i,s.state=n.memoizedState,s.refs={},Rd(n);var m=a.contextType;"object"==typeof m&&null!==m?s.context=Lf(m):(m=Tc(a)?e1:eX.current,s.context=Sc(n,m)),s.state=n.memoizedState,"function"==typeof(m=a.getDerivedStateFromProps)&&(xg(n,a,m,i),s.state=n.memoizedState),"function"==typeof a.getDerivedStateFromProps||"function"==typeof s.getSnapshotBeforeUpdate||"function"!=typeof s.UNSAFE_componentWillMount&&"function"!=typeof s.componentWillMount||(a=s.state,"function"==typeof s.componentWillMount&&s.componentWillMount(),"function"==typeof s.UNSAFE_componentWillMount&&s.UNSAFE_componentWillMount(),a!==s.state&&t0.enqueueReplaceState(s,s.state,null),Xd(n,i,s,o),s.state=n.memoizedState),"function"==typeof s.componentDidMount&&(n.flags|=4194308)}function Dg(n,a){try{var i="",o=a;do i+=function(n){switch(n.tag){case 26:case 27:case 5:return Xb(n.type);case 16:return Xb("Lazy");case 13:return Xb("Suspense");case 19:return Xb("SuspenseList");case 0:case 2:case 15:return n=Zb(n.type,!1);case 11:return n=Zb(n.type.render,!1);case 1:return n=Zb(n.type,!0);default:return""}}(o),o=o.return;while(o);var s=i}catch(n){s="\nError generating stack: "+n.message+"\n"+n.stack}return{value:n,source:a,stack:s,digest:null}}function Eg(n,a,i){return{value:n,source:null,stack:null!=i?i:null,digest:null!=a?a:null}}function Fg(n,a){try{console.error(a.value)}catch(n){setTimeout(function(){throw n})}}function Gg(n,a,i){(i=Td(i)).tag=3,i.payload={element:null};var o=a.value;return i.callback=function(){nY||(nY=!0,nG=o),Fg(n,a)},i}function Jg(n,a,i){(i=Td(i)).tag=3;var o=n.type.getDerivedStateFromError;if("function"==typeof o){var s=a.value;i.payload=function(){return o(s)},i.callback=function(){Fg(n,a)}}var m=n.stateNode;return null!==m&&"function"==typeof m.componentDidCatch&&(i.callback=function(){Fg(n,a),"function"!=typeof o&&(null===nK?nK=new Set([this]):nK.add(this));var i=a.stack;this.componentDidCatch(a.value,{componentStack:null!==i?i:""})}),i}function Lg(n,a,i,o,s){return 0==(1&n.mode)?n===a?n.flags|=65536:(n.flags|=128,i.flags|=131072,i.flags&=-52805,1===i.tag&&(null===i.alternate?i.tag=17:((a=Td(2)).tag=2,Ud(i,a,2))),i.lanes|=2):(n.flags|=65536,n.lanes=s),n}var t1=k.ReactCurrentOwner,t2=Error(t(461)),t3=!1;function Tg(n,a,i,o){a.child=null===n?tC(a,null,i,o):tE(a,n.child,i,o)}function Ug(n,a,i,o,s){i=i.render;var m=a.ref;return(Vg(a,s),o=wf(n,a,i,o,m,s),i=Df(),null===n||t3)?(to&&i&&ld(a),a.flags|=1,Tg(n,a,o,s),a.child):(Ef(n,a,s),Wg(n,a,s))}function Xg(n,a,i,o,s){if(null===n){var m=i.type;return"function"!=typeof m||Yg(m)||void 0!==m.defaultProps||null!==i.compare||void 0!==i.defaultProps?((n=se(i.type,null,o,null,a,a.mode,s)).ref=a.ref,n.return=a,a.child=n):(a.tag=15,a.type=m,Zg(n,a,m,o,s))}if(m=n.child,0==(n.lanes&s)){var y=m.memoizedProps;if((i=null!==(i=i.compare)?i:ae)(y,o)&&n.ref===a.ref)return Wg(n,a,s)}return a.flags|=1,(n=qe(m,o)).ref=a.ref,n.return=a,a.child=n}function Zg(n,a,i,o,s){if(null!==n){var m=n.memoizedProps;if(ae(m,o)&&n.ref===a.ref){if(t3=!1,a.pendingProps=o=m,0==(n.lanes&s))return a.lanes=n.lanes,Wg(n,a,s);0!=(131072&n.flags)&&(t3=!0)}}return $g(n,a,i,o,s)}function ah(n,a,i){var o=a.pendingProps,s=o.children,m=0!=(2&a.stateNode._pendingVisibility),y=null!==n?n.memoizedState:null;if(bh(n,a),"hidden"===o.mode||m){if(0!=(128&a.flags)){if(i=null!==y?y.baseLanes|i:i,null!==n){for(s=0,o=a.child=n.child;null!==o;)s=s|o.lanes|o.childLanes,o=o.sibling;a.childLanes=s&~i}else a.childLanes=0,a.child=null;return ch(n,a,i)}if(0==(1&a.mode))a.memoizedState={baseLanes:0,cachePool:null},null!==n&&dh(a,null),Ce(),Ie(a);else{if(0==(1073741824&i))return a.lanes=a.childLanes=1073741824,ch(n,a,null!==y?y.baseLanes|i:i);a.memoizedState={baseLanes:0,cachePool:null},null!==n&&dh(a,null!==y?y.cachePool:null),null!==y?Ae(a,y):Ce(),Ie(a)}}else null!==y?(dh(a,y.cachePool),Ae(a,y),Je(a),a.memoizedState=null):(null!==n&&dh(a,null),Ce(),Je(a));return Tg(n,a,s,i),a.child}function ch(n,a,i){var o=eh();return o=null===o?null:{parent:nr._currentValue,pool:o},a.memoizedState={baseLanes:i,cachePool:o},null!==n&&dh(a,null),Ce(),Ie(a),null}function bh(n,a){var i=a.ref;(null===n&&null!==i||null!==n&&n.ref!==i)&&(a.flags|=512,a.flags|=2097152)}function $g(n,a,i,o,s){var m=Tc(i)?e1:eX.current;return(m=Sc(a,m),Vg(a,s),i=wf(n,a,i,o,m,s),o=Df(),null===n||t3)?(to&&o&&ld(a),a.flags|=1,Tg(n,a,i,s),a.child):(Ef(n,a,s),Wg(n,a,s))}function fh(n,a,i,o,s,m){return(Vg(a,m),i=zf(a,o,i,s),Af(),o=Df(),null===n||t3)?(to&&o&&ld(a),a.flags|=1,Tg(n,a,i,m),a.child):(Ef(n,a,m),Wg(n,a,m))}function gh(n,a,i,o,s){if(Tc(i)){var m=!0;Xc(a)}else m=!1;if(Vg(a,s),null===a.stateNode)hh(n,a),Ag(a,i,o),Cg(a,i,o,s),o=!0;else if(null===n){var y=a.stateNode,v=a.memoizedProps;y.props=v;var k=y.context,C=i.contextType;C="object"==typeof C&&null!==C?Lf(C):Sc(a,C=Tc(i)?e1:eX.current);var x=i.getDerivedStateFromProps,z="function"==typeof x||"function"==typeof y.getSnapshotBeforeUpdate;z||"function"!=typeof y.UNSAFE_componentWillReceiveProps&&"function"!=typeof y.componentWillReceiveProps||(v!==o||k!==C)&&Bg(a,y,o,C),tp=!1;var P=a.memoizedState;y.state=P,Xd(a,o,y,s),k=a.memoizedState,v!==o||P!==k||e0.current||tp?("function"==typeof x&&(xg(a,i,x,o),k=a.memoizedState),(v=tp||zg(a,i,v,o,P,k,C))?(z||"function"!=typeof y.UNSAFE_componentWillMount&&"function"!=typeof y.componentWillMount||("function"==typeof y.componentWillMount&&y.componentWillMount(),"function"==typeof y.UNSAFE_componentWillMount&&y.UNSAFE_componentWillMount()),"function"==typeof y.componentDidMount&&(a.flags|=4194308)):("function"==typeof y.componentDidMount&&(a.flags|=4194308),a.memoizedProps=o,a.memoizedState=k),y.props=o,y.state=k,y.context=C,o=v):("function"==typeof y.componentDidMount&&(a.flags|=4194308),o=!1)}else{y=a.stateNode,Sd(n,a),v=a.memoizedProps,C=a.type===a.elementType?v:wg(a.type,v),y.props=C,z=a.pendingProps,P=y.context,k="object"==typeof(k=i.contextType)&&null!==k?Lf(k):Sc(a,k=Tc(i)?e1:eX.current);var N=i.getDerivedStateFromProps;(x="function"==typeof N||"function"==typeof y.getSnapshotBeforeUpdate)||"function"!=typeof y.UNSAFE_componentWillReceiveProps&&"function"!=typeof y.componentWillReceiveProps||(v!==z||P!==k)&&Bg(a,y,o,k),tp=!1,P=a.memoizedState,y.state=P,Xd(a,o,y,s);var L=a.memoizedState;v!==z||P!==L||e0.current||tp?("function"==typeof N&&(xg(a,i,N,o),L=a.memoizedState),(C=tp||zg(a,i,C,o,P,L,k)||!1)?(x||"function"!=typeof y.UNSAFE_componentWillUpdate&&"function"!=typeof y.componentWillUpdate||("function"==typeof y.componentWillUpdate&&y.componentWillUpdate(o,L,k),"function"==typeof y.UNSAFE_componentWillUpdate&&y.UNSAFE_componentWillUpdate(o,L,k)),"function"==typeof y.componentDidUpdate&&(a.flags|=4),"function"==typeof y.getSnapshotBeforeUpdate&&(a.flags|=1024)):("function"!=typeof y.componentDidUpdate||v===n.memoizedProps&&P===n.memoizedState||(a.flags|=4),"function"!=typeof y.getSnapshotBeforeUpdate||v===n.memoizedProps&&P===n.memoizedState||(a.flags|=1024),a.memoizedProps=o,a.memoizedState=L),y.props=o,y.state=L,y.context=k,o=C):("function"!=typeof y.componentDidUpdate||v===n.memoizedProps&&P===n.memoizedState||(a.flags|=4),"function"!=typeof y.getSnapshotBeforeUpdate||v===n.memoizedProps&&P===n.memoizedState||(a.flags|=1024),o=!1)}return ih(n,a,i,o,m,s)}function ih(n,a,i,o,s,m){bh(n,a);var y=0!=(128&a.flags);if(!o&&!y)return s&&Yc(a,i,!1),Wg(n,a,m);o=a.stateNode,t1.current=a;var v=y&&"function"!=typeof i.getDerivedStateFromError?null:o.render();return a.flags|=1,null!==n&&y?(a.child=tE(a,n.child,null,m),a.child=tE(a,null,v,m)):Tg(n,a,v,m),a.memoizedState=o.state,s&&Yc(a,i,!0),a.child}function jh(n){var a=n.stateNode;a.pendingContext?Vc(n,a.pendingContext,a.pendingContext!==a.context):a.context&&Vc(n,a.context,!1),Ga(n,a.containerInfo)}function kh(n,a,i,o,s){return Ed(),Fd(s),a.flags|=256,Tg(n,a,i,o),a.child}var t4={dehydrated:null,treeContext:null,retryLane:0};function mh(n){return{baseLanes:n,cachePool:nh()}}function oh(n,a,i){var o,s=a.pendingProps,m=!1,y=0!=(128&a.flags);if((o=y)||(o=(null===n||null!==n.memoizedState)&&0!=(2&tL.current)),o&&(m=!0,a.flags&=-129),null===n){if(to){if(m?Ge(a):Je(a),to&&((y=n=ta)?xd(a,y)||(yd(a)&&zd(),ta=ud(y.nextSibling),o=tl,ta&&xd(a,ta)?pd(o,y):(rd(tl,a),to=!1,tl=a,ta=n)):(yd(a)&&zd(),rd(tl,a),to=!1,tl=a,ta=n)),null!==(n=a.memoizedState)&&null!==(n=n.dehydrated))return 0==(1&a.mode)?a.lanes=2:"$!"===n.data?a.lanes=16:a.lanes=1073741824,null;Ke(a)}return(y=s.children,n=s.fallback,m)?(Je(a),s=a.mode,m=a.child,y={mode:"hidden",children:y},0==(1&s)&&null!==m?(m.childLanes=0,m.pendingProps=y):m=ph(y,s,0,null),n=ue(n,s,i,null),m.return=a,n.return=a,m.sibling=n,a.child=m,a.child.memoizedState=mh(i),a.memoizedState=t4,n):(Ge(a),qh(a,y))}if(null!==(o=n.memoizedState)){var v=o.dehydrated;if(null!==v)return function(n,a,i,o,s,m,y){if(i)return 256&a.flags?(Ge(a),a.flags&=-257,sh(n,a,y,s=Eg(Error(t(422))))):null!==a.memoizedState?(Je(a),a.child=n.child,a.flags|=128,null):(Je(a),s=o.fallback,m=a.mode,o=ph({mode:"visible",children:o.children},m,0,null),s=ue(s,m,y,null),s.flags|=2,o.return=a,s.return=a,o.sibling=s,a.child=o,0!=(1&a.mode)&&tE(a,n.child,null,y),a.child.memoizedState=mh(y),a.memoizedState=t4,s);if(Ge(a),0==(1&a.mode))return sh(n,a,y,null);if("$!"===s.data){if(s=s.nextSibling&&s.nextSibling.dataset)var v=s.dgst;return s=v,(o=Error(t(419))).digest=s,sh(n,a,y,s=Eg(o,s,void 0))}if(v=0!=(y&n.childLanes),t3||v){if(null!==(o=n_)){switch(y&-y){case 2:v=1;break;case 8:v=4;break;case 32:v=16;break;case 128:case 256:case 512:case 1024:case 2048:case 4096:case 8192:case 16384:case 32768:case 65536:case 131072:case 262144:case 524288:case 1048576:case 2097152:case 4194304:case 8388608:case 16777216:case 33554432:case 67108864:v=64;break;case 536870912:v=268435456;break;default:v=0}if(0!==(v=0!=(v&(o.suspendedLanes|y))?0:v)&&v!==m.retryLane)throw m.retryLane=v,Md(n,v),Yf(o,n,v),t2}return"$?"!==s.data&&Ng(),sh(n,a,y,null)}return"$?"===s.data?(a.flags|=128,a.child=n.child,a=th.bind(null,n),s._reactRetry=a,null):(n=m.treeContext,ta=ud(s.nextSibling),tl=a,to=!0,tu=null,tc=!1,null!==n&&(e5[e7++]=tt,e5[e7++]=tr,e5[e7++]=e9,tt=n.id,tr=n.overflow,e9=a),a=qh(a,o.children),a.flags|=4096,a)}(n,a,y,s,v,o,i)}if(m){Je(a),m=s.fallback,y=a.mode,v=(o=n.child).sibling;var k={mode:"hidden",children:s.children};return 0==(1&y)&&a.child!==o?((s=a.child).childLanes=0,s.pendingProps=k,a.deletions=null):(s=qe(o,k)).subtreeFlags=31457280&o.subtreeFlags,null!==v?m=qe(v,m):(m=ue(m,y,i,null),m.flags|=2),m.return=a,s.return=a,s.sibling=m,a.child=s,s=m,m=a.child,null===(y=n.child.memoizedState)?y=mh(i):(null!==(o=y.cachePool)?(v=nr._currentValue,o=o.parent!==v?{parent:v,pool:v}:o):o=nh(),y={baseLanes:y.baseLanes|i,cachePool:o}),m.memoizedState=y,m.childLanes=n.childLanes&~i,a.memoizedState=t4,s}return Ge(a),n=(m=n.child).sibling,s=qe(m,{mode:"visible",children:s.children}),0==(1&a.mode)&&(s.lanes=i),s.return=a,s.sibling=null,null!==n&&(null===(i=a.deletions)?(a.deletions=[n],a.flags|=16):i.push(n)),a.child=s,a.memoizedState=null,s}function qh(n,a){return(a=ph({mode:"visible",children:a},n.mode,0,null)).return=n,n.child=a}function sh(n,a,i,o){return null!==o&&Fd(o),tE(a,n.child,null,i),n=qh(a,a.pendingProps.children),n.flags|=2,a.memoizedState=null,n}function uh(n,a,i){n.lanes|=a;var o=n.alternate;null!==o&&(o.lanes|=a),vh(n.return,a,i)}function wh(n,a,i,o,s){var m=n.memoizedState;null===m?n.memoizedState={isBackwards:a,rendering:null,renderingStartTime:0,last:o,tail:i,tailMode:s}:(m.isBackwards=a,m.rendering=null,m.renderingStartTime=0,m.last=o,m.tail=i,m.tailMode=s)}function xh(n,a,i){var o=a.pendingProps,s=o.revealOrder,m=o.tail;if(Tg(n,a,o.children,i),0!=(2&(o=tL.current)))o=1&o|2,a.flags|=128;else{if(null!==n&&0!=(128&n.flags))e:for(n=a.child;null!==n;){if(13===n.tag)null!==n.memoizedState&&uh(n,i,a);else if(19===n.tag)uh(n,i,a);else if(null!==n.child){n.child.return=n,n=n.child;continue}if(n===a)break;for(;null===n.sibling;){if(null===n.return||n.return===a)break e;n=n.return}n.sibling.return=n.return,n=n.sibling}o&=1}if(E(tL,o),0==(1&a.mode))a.memoizedState=null;else switch(s){case"forwards":for(s=null,i=a.child;null!==i;)null!==(n=i.alternate)&&null===Le(n)&&(s=i),i=i.sibling;null===(i=s)?(s=a.child,a.child=null):(s=i.sibling,i.sibling=null),wh(a,!1,s,i,m);break;case"backwards":for(i=null,s=a.child,a.child=null;null!==s;){if(null!==(n=s.alternate)&&null===Le(n)){a.child=s;break}n=s.sibling,s.sibling=i,i=s,s=n}wh(a,!0,i,null,m);break;case"together":wh(a,!1,null,null,void 0);break;default:a.memoizedState=null}return a.child}function hh(n,a){0==(1&a.mode)&&null!==n&&(n.alternate=null,a.alternate=null,a.flags|=2)}function Wg(n,a,i){if(null!==n&&(a.dependencies=n.dependencies),nW|=a.lanes,0==(i&a.childLanes))return null;if(null!==n&&a.child!==n.child)throw Error(t(153));if(null!==a.child){for(i=qe(n=a.child,n.pendingProps),a.child=i,i.return=a;null!==n.sibling;)n=n.sibling,(i=i.sibling=qe(n,n.pendingProps)).return=a;i.sibling=null}return a.child}var t8=ia(null),t6=null,t5=null,t7=null;function Eh(){t7=t5=t6=null}function zh(n,a,i){E(t8,a._currentValue),a._currentValue=i}function Fh(n){var a=t8.current;n._currentValue=a===Y?n._defaultValue:a,D(t8)}function vh(n,a,i){for(;null!==n;){var o=n.alternate;if((n.childLanes&a)!==a?(n.childLanes|=a,null!==o&&(o.childLanes|=a)):null!==o&&(o.childLanes&a)!==a&&(o.childLanes|=a),n===i)break;n=n.return}}function Gh(n,a,i){var o=n.child;for(null!==o&&(o.return=n);null!==o;){var s=o.dependencies;if(null!==s)for(var m=o.child,y=s.firstContext;null!==y;){if(y.context===a){if(1===o.tag){(y=Td(i&-i)).tag=2;var v=o.updateQueue;if(null!==v){var k=(v=v.shared).pending;null===k?y.next=y:(y.next=k.next,k.next=y),v.pending=y}}o.lanes|=i,null!==(y=o.alternate)&&(y.lanes|=i),vh(o.return,i,n),s.lanes|=i;break}y=y.next}else if(10===o.tag)m=o.type===n.type?null:o.child;else if(18===o.tag){if(null===(m=o.return))throw Error(t(341));m.lanes|=i,null!==(s=m.alternate)&&(s.lanes|=i),vh(m,i,n),m=o.sibling}else m=o.child;if(null!==m)m.return=o;else for(m=o;null!==m;){if(m===n){m=null;break}if(null!==(o=m.sibling)){o.return=m.return,m=o;break}m=m.return}o=m}}function Vg(n,a){t6=n,t7=t5=null,null!==(n=n.dependencies)&&null!==n.firstContext&&(0!=(n.lanes&a)&&(t3=!0),n.firstContext=null)}function Lf(n){return Hh(t6,n)}function ve(n,a,i){return null===t6&&Vg(n,i),Hh(n,a)}function Hh(n,a){var i=a._currentValue;if(t7!==a){if(a={context:a,memoizedValue:i,next:null},null===t5){if(null===n)throw Error(t(308));t5=a,n.dependencies={lanes:0,firstContext:a}}else t5=t5.next=a}return i}var t9="undefined"!=typeof AbortController?AbortController:function(){var n=[],a=this.signal={aborted:!1,addEventListener:function(a,i){n.push(i)}};this.abort=function(){a.aborted=!0,n.forEach(function(n){return n()})}},nt=m.unstable_scheduleCallback,nn=m.unstable_NormalPriority,nr={$$typeof:M,Consumer:null,Provider:null,_currentValue:null,_currentValue2:null,_threadCount:0,_defaultValue:null,_globalName:null};function rg(){return{controller:new t9,data:new Map,refCount:0}}function Lh(n){n.refCount--,0===n.refCount&&nt(nn,function(){n.controller.abort()})}var na=k.ReactCurrentBatchConfig,ni=ia(null);function eh(){var n=ni.current;return null!==n?n:n_.pooledCache}function dh(n,a){null===a?E(ni,ni.current):E(ni,a.pool)}function nh(){var n=eh();return null===n?null:{parent:nr._currentValue,pool:n}}function Oh(n){n.flags|=4}function Ph(n){n.flags|=2097664}function Qh(n,a){if("stylesheet"!==a.type||0!=(4&a.state.loading))n.flags&=-16777217;else if(n.flags|=16777216,0==(42&nM)&&!(a="stylesheet"!==a.type||0!=(3&a.state.loading))){if(Rh())n.flags|=8192;else throw tk=tv,ty}}function Sh(n,a){null!==a?n.flags|=4:16384&n.flags&&(a=22!==n.tag?kb():1073741824,n.lanes|=a)}function Th(n,a){if(!to)switch(n.tailMode){case"hidden":a=n.tail;for(var i=null;null!==a;)null!==a.alternate&&(i=a),a=a.sibling;null===i?n.tail=null:i.sibling=null;break;case"collapsed":i=n.tail;for(var o=null;null!==i;)null!==i.alternate&&(o=i),i=i.sibling;null===o?a||null===n.tail?n.tail=null:n.tail.sibling=null:o.sibling=null}}function V(n){var a=null!==n.alternate&&n.alternate.child===n.child,i=0,o=0;if(a)for(var s=n.child;null!==s;)i|=s.lanes|s.childLanes,o|=31457280&s.subtreeFlags,o|=31457280&s.flags,s.return=n,s=s.sibling;else for(s=n.child;null!==s;)i|=s.lanes|s.childLanes,o|=s.subtreeFlags,o|=s.flags,s.return=n,s=s.sibling;return n.subtreeFlags|=o,n.childLanes=i,a}function ei(n,a){switch(md(a),a.tag){case 1:null!=(n=a.type.childContextTypes)&&Uc();break;case 3:Fh(nr),Ja(),D(e0),D(eX);break;case 26:case 27:case 5:La(a);break;case 4:Ja();break;case 13:Ke(a);break;case 19:D(tL);break;case 10:Fh(a.type._context);break;case 22:case 23:Ke(a),De(),null!==n&&D(ni);break;case 24:Fh(nr)}}function fi(n,a,i){var o=Array.prototype.slice.call(arguments,3);try{a.apply(i,o)}catch(n){this.onError(n)}}var no=!1,nu=null,nc=!1,ns=null,nf={onError:function(n){no=!0,nu=n}};function li(n,a,i,o,s,m,y,v,k){no=!1,nu=null,fi.apply(nf,arguments)}var nd=!1,np=!1,nb="function"==typeof WeakSet?WeakSet:Set,ny=null;function ri(n,a){try{var i=n.ref;if(null!==i){var o=n.stateNode;switch(n.tag){case 26:case 27:case 5:var s=o;break;default:s=o}"function"==typeof i?n.refCleanup=i(s):i.current=s}}catch(i){W(n,a,i)}}function si(n,a){var i=n.ref,o=n.refCleanup;if(null!==i){if("function"==typeof o)try{o()}catch(i){W(n,a,i)}finally{n.refCleanup=null,null!=(n=n.alternate)&&(n.refCleanup=null)}else if("function"==typeof i)try{i(null)}catch(i){W(n,a,i)}else i.current=null}}function ti(n,a,i){try{i()}catch(i){W(n,a,i)}}var nv=!1;function Ci(n,a,i){var o=a.updateQueue;if(null!==(o=null!==o?o.lastEffect:null)){var s=o=o.next;do{if((s.tag&n)===n){var m=s.inst,y=m.destroy;void 0!==y&&(m.destroy=void 0,ti(a,i,y))}s=s.next}while(s!==o)}}function Di(n,a){if(null!==(a=null!==(a=a.updateQueue)?a.lastEffect:null)){var i=a=a.next;do{if((i.tag&n)===n){var o=i.create,s=i.inst;o=o(),s.destroy=o}i=i.next}while(i!==a)}}function Ei(n,a){try{Di(a,n)}catch(a){W(n,n.return,a)}}function Fi(n){var a=n.updateQueue;if(null!==a){var i=n.stateNode;try{$d(a,i)}catch(a){W(n,n.return,a)}}}function Gi(n){var a=n.type,i=n.memoizedProps,o=n.stateNode;try{switch(a){case"button":case"input":case"select":case"textarea":i.autoFocus&&o.focus();break;case"img":i.src&&(o.src=i.src)}}catch(a){W(n,n.return,a)}}function Hi(n,a,i){var o=i.flags;switch(i.tag){case 0:case 11:case 15:Ii(n,i),4&o&&Ei(i,5);break;case 1:if(Ii(n,i),4&o){if(n=i.stateNode,null===a)try{n.componentDidMount()}catch(n){W(i,i.return,n)}else{var s=i.elementType===i.type?a.memoizedProps:wg(i.type,a.memoizedProps);a=a.memoizedState;try{n.componentDidUpdate(s,a,n.__reactInternalSnapshotBeforeUpdate)}catch(n){W(i,i.return,n)}}}64&o&&Fi(i),512&o&&ri(i,i.return);break;case 3:if(Ii(n,i),64&o&&null!==(o=i.updateQueue)){if(n=null,null!==i.child)switch(i.child.tag){case 27:case 5:case 1:n=i.child.stateNode}try{$d(o,n)}catch(n){W(i,i.return,n)}}break;case 26:Ii(n,i),512&o&&ri(i,i.return);break;case 27:case 5:Ii(n,i),null===a&&4&o&&Gi(i),512&o&&ri(i,i.return);break;case 12:default:Ii(n,i);break;case 13:Ii(n,i),4&o&&Ji(n,i);break;case 22:if(0!=(1&i.mode)){if(!(s=null!==i.memoizedState||nd)){a=null!==a&&null!==a.memoizedState||np;var m=nd,y=np;nd=s,(np=a)&&!y?function Ki(n,a,i){for(i=i&&0!=(8772&a.subtreeFlags),a=a.child;null!==a;){var o=a.alternate,s=n,m=a,y=m.flags;switch(m.tag){case 0:case 11:case 15:Ki(s,m,i),Ei(m,4);break;case 1:if(Ki(s,m,i),"function"==typeof(s=m.stateNode).componentDidMount)try{s.componentDidMount()}catch(n){W(m,m.return,n)}if(null!==(o=m.updateQueue)){var v=o.shared.hiddenCallbacks;if(null!==v)for(o.shared.hiddenCallbacks=null,o=0;o title"))),Zh(s,i,o),s[eP]=n,Jb(s),i=s;break e;case"link":var m=cj("link","href",a).get(i+(o.href||""));if(m){for(var y=0;y",n=n.removeChild(n.firstChild);break;case"select":n="string"==typeof o.is?s.createElement("select",{is:o.is}):s.createElement("select"),o.multiple?n.multiple=!0:o.size&&(n.size=o.size);break;default:n="string"==typeof o.is?s.createElement(i,{is:o.is}):s.createElement(i)}}n[eP]=a,n[eN]=o;e:for(s=a.child;null!==s;){if(5===s.tag||6===s.tag)n.appendChild(s.stateNode);else if(4!==s.tag&&27!==s.tag&&null!==s.child){s.child.return=s,s=s.child;continue}if(s===a)break;for(;null===s.sibling;){if(null===s.return||s.return===a)break e;s=s.return}s.sibling.return=s.return,s=s.sibling}switch(a.stateNode=n,Zh(n,i,o),i){case"button":case"input":case"select":case"textarea":n=!!o.autoFocus;break;case"img":n=!0;break;default:n=!1}n&&Oh(a)}null!==a.ref&&Ph(a)}return V(a),a.flags&=-16777217,null;case 6:if(n&&null!=a.stateNode)n.memoizedProps!==o&&Oh(a);else{if("string"!=typeof o&&null===a.stateNode)throw Error(t(166));if(n=X.current,Bd(a)){e:{if(n=a.stateNode,i=a.memoizedProps,n[eP]=a,(o=n.nodeValue!==i)&&null!==(s=tl))switch(s.tag){case 3:if(s=0!=(1&s.mode),$h(n.nodeValue,i,s),s){n=!1;break e}break;case 27:case 5:var m=0!=(1&s.mode);if(!0!==s.memoizedProps.suppressHydrationWarning&&$h(n.nodeValue,i,m),m){n=!1;break e}}n=o}n&&Oh(a)}else(n=Yh(n).createTextNode(o))[eP]=a,a.stateNode=n}return V(a),null;case 13:if(Ke(a),o=a.memoizedState,null===n||null!==n.memoizedState&&null!==n.memoizedState.dehydrated){if(to&&null!==ta&&0!=(1&a.mode)&&0==(128&a.flags))Dd(),Ed(),a.flags|=384,s=!1;else if(s=Bd(a),null!==o&&null!==o.dehydrated){if(null===n){if(!s)throw Error(t(318));if(!(s=null!==(s=a.memoizedState)?s.dehydrated:null))throw Error(t(317));s[eP]=a}else Ed(),0==(128&a.flags)&&(a.memoizedState=null),a.flags|=4;V(a),s=!1}else null!==tu&&(Vh(tu),tu=null),s=!0;if(!s)return 256&a.flags?a:null}if(0!=(128&a.flags))return a.lanes=i,a;return i=null!==o,n=null!==n&&null!==n.memoizedState,i&&(o=a.child,s=null,null!==o.alternate&&null!==o.alternate.memoizedState&&null!==o.alternate.memoizedState.cachePool&&(s=o.alternate.memoizedState.cachePool.pool),m=null,null!==o.memoizedState&&null!==o.memoizedState.cachePool&&(m=o.memoizedState.cachePool.pool),m!==s&&(o.flags|=2048)),i!==n&&i&&(a.child.flags|=8192),Sh(a,a.updateQueue),V(a),null;case 4:return Ja(),null===n&&ai(a.stateNode.containerInfo),V(a),null;case 10:return Fh(a.type._context),V(a),null;case 19:if(D(tL),null===(s=a.memoizedState))return V(a),null;if(o=0!=(128&a.flags),null===(m=s.rendering)){if(o)Th(s,!1);else{if(0!==nV||null!==n&&0!=(128&n.flags))for(n=a.child;null!==n;){if(null!==(m=Le(n))){for(a.flags|=128,Th(s,!1),n=m.updateQueue,a.updateQueue=n,Sh(a,n),a.subtreeFlags=0,n=i,i=a.child;null!==i;)bi(i,n),i=i.sibling;return E(tL,1&tL.current|2),a.child}n=n.sibling}null!==s.tail&&ea()>nB&&(a.flags|=128,o=!0,Th(s,!1),a.lanes=8388608)}}else{if(!o){if(null!==(n=Le(m))){if(a.flags|=128,o=!0,n=n.updateQueue,a.updateQueue=n,Sh(a,n),Th(s,!0),null===s.tail&&"hidden"===s.tailMode&&!m.alternate&&!to)return V(a),null}else 2*ea()-s.renderingStartTime>nB&&1073741824!==i&&(a.flags|=128,o=!0,Th(s,!1),a.lanes=8388608)}s.isBackwards?(m.sibling=a.child,a.child=m):(null!==(n=s.last)?n.sibling=m:a.child=m,s.last=m)}if(null!==s.tail)return a=s.tail,s.rendering=a,s.tail=a.sibling,s.renderingStartTime=ea(),a.sibling=null,n=tL.current,E(tL,o?1&n|2:1&n),a;return V(a),null;case 22:case 23:return Ke(a),De(),o=null!==a.memoizedState,null!==n?null!==n.memoizedState!==o&&(a.flags|=8192):o&&(a.flags|=8192),o&&0!=(1&a.mode)?0!=(1073741824&i)&&0==(128&a.flags)&&(V(a),6&a.subtreeFlags&&(a.flags|=8192)):V(a),null!==(i=a.updateQueue)&&Sh(a,i.retryQueue),i=null,null!==n&&null!==n.memoizedState&&null!==n.memoizedState.cachePool&&(i=n.memoizedState.cachePool.pool),o=null,null!==a.memoizedState&&null!==a.memoizedState.cachePool&&(o=a.memoizedState.cachePool.pool),o!==i&&(a.flags|=2048),null!==n&&D(ni),null;case 24:return i=null,null!==n&&(i=n.memoizedState.cache),a.memoizedState.cache!==i&&(a.flags|=2048),Fh(nr),V(a),null;case 25:return null}throw Error(t(156,a.tag))}(a.alternate,a,nR);if(null!==i){nD=i;return}if(null!==(a=a.sibling)){nD=a;return}nD=a=n}while(null!==a);0===nV&&(nV=5)}function bf(n,a,i){var o=eC,s=nL.transition;try{nL.transition=null,eC=2,function(n,a,i,o){do We();while(null!==nX);if(0!=(6&nT))throw Error(t(327));var s=n.finishedWork,m=n.finishedLanes;if(null!==s){if(n.finishedWork=null,n.finishedLanes=0,s===n.current)throw Error(t(177));n.callbackNode=null,n.callbackPriority=0,n.cancelPendingCommit=null;var y=s.lanes|s.childLanes;if(function(n,a){var i=n.pendingLanes&~a;n.pendingLanes=a,n.suspendedLanes=0,n.pingedLanes=0,n.expiredLanes&=a,n.entangledLanes&=a,n.errorRecoveryDisabledLanes&=a,n.shellSuspendCounter=0,a=n.entanglements;var o=n.expirationTimes;for(n=n.hiddenUpdates;0o&&(s=o,o=m,m=s),s=Gm(i,m);var y=Gm(i,o);s&&y&&(1!==n.rangeCount||n.anchorNode!==s.node||n.anchorOffset!==s.offset||n.focusNode!==y.node||n.focusOffset!==y.offset)&&((a=a.createRange()).setStart(s.node,s.offset),n.removeAllRanges(),m>o?(n.addRange(a),n.extend(y.node,y.offset)):(a.setEnd(y.node,y.offset),n.addRange(a)))}}for(a=[],n=i;n=n.parentNode;)1===n.nodeType&&a.push({element:n,left:n.scrollLeft,top:n.scrollTop});for("function"==typeof i.focus&&i.focus(),i=0;ii?32:i;i=nL.transition;var s=eC;try{if(nL.transition=null,eC=o,null===nX)var m=!1;else{o=n2,n2=null;var y=nX,v=n0;if(nX=null,n0=0,0!=(6&nT))throw Error(t(331));var k=nT;if(nT|=4,yj(y.current),oj(y,y.current,v,o),nT=k,Ve(!1),eb&&"function"==typeof eb.onPostCommitFiberRoot)try{eb.onPostCommitFiberRoot(em,y)}catch(n){}m=!0}return m}finally{eC=s,nL.transition=i,ok(n,a)}}return!1}function pk(n,a,i){a=Gg(n,a=Dg(i,a),2),null!==(n=Ud(n,a,2))&&(mb(n,2),Se(n))}function W(n,a,i){if(3===n.tag)pk(n,n,i);else for(;null!==a;){if(3===a.tag){pk(a,n,i);break}if(1===a.tag){var o=a.stateNode;if("function"==typeof a.type.getDerivedStateFromError||"function"==typeof o.componentDidCatch&&(null===nK||!nK.has(o))){n=Jg(a,n=Dg(i,n),2),null!==(a=Ud(a,n,2))&&(mb(a,2),Se(a));break}}a=a.return}}function Pg(n,a,i){var o=n.pingCache;if(null===o){o=n.pingCache=new nx;var s=new Set;o.set(a,s)}else void 0===(s=o.get(a))&&(s=new Set,o.set(a,s));s.has(i)||(nI=!0,s.add(i),n=qk.bind(null,n,a,i),a.then(n,n))}function qk(n,a,i){var o=n.pingCache;null!==o&&o.delete(a),n.pingedLanes|=n.suspendedLanes&i,n_===n&&(nM&i)===i&&(4===nV||3===nV&&(125829120&nM)===nM&&300>ea()-n$?0==(2&nT)&&$e(n,0):nq|=i),Se(n)}function rk(n,a){0===a&&(a=0==(1&n.mode)?2:kb()),null!==(n=Md(n,a))&&(mb(n,a),Se(n))}function th(n){var a=n.memoizedState,i=0;null!==a&&(i=a.retryLane),rk(n,i)}function Yi(n,a){var i=0;switch(n.tag){case 13:var o=n.stateNode,s=n.memoizedState;null!==s&&(i=s.retryLane);break;case 19:o=n.stateNode;break;case 22:o=n.stateNode._retryCache;break;default:throw Error(t(314))}null!==o&&o.delete(a),rk(n,i)}function uk(n,a,i,o){this.tag=n,this.key=i,this.sibling=this.child=this.return=this.stateNode=this.type=this.elementType=null,this.index=0,this.refCleanup=this.ref=null,this.pendingProps=a,this.dependencies=this.memoizedState=this.updateQueue=this.memoizedProps=null,this.mode=o,this.subtreeFlags=this.flags=0,this.deletions=null,this.childLanes=this.lanes=0,this.alternate=null}function qd(n,a,i,o){return new uk(n,a,i,o)}function Yg(n){return!(!(n=n.prototype)||!n.isReactComponent)}function qe(n,a){var i=n.alternate;return null===i?((i=qd(n.tag,a,n.key,n.mode)).elementType=n.elementType,i.type=n.type,i.stateNode=n.stateNode,i.alternate=n,n.alternate=i):(i.pendingProps=a,i.type=n.type,i.flags=0,i.subtreeFlags=0,i.deletions=null),i.flags=31457280&n.flags,i.childLanes=n.childLanes,i.lanes=n.lanes,i.child=n.child,i.memoizedProps=n.memoizedProps,i.memoizedState=n.memoizedState,i.updateQueue=n.updateQueue,a=n.dependencies,i.dependencies=null===a?null:{lanes:a.lanes,firstContext:a.firstContext},i.sibling=n.sibling,i.index=n.index,i.ref=n.ref,i.refCleanup=n.refCleanup,i}function bi(n,a){n.flags&=31457282;var i=n.alternate;return null===i?(n.childLanes=0,n.lanes=a,n.child=null,n.subtreeFlags=0,n.memoizedProps=null,n.memoizedState=null,n.updateQueue=null,n.dependencies=null,n.stateNode=null):(n.childLanes=i.childLanes,n.lanes=i.lanes,n.child=i.child,n.subtreeFlags=0,n.deletions=null,n.memoizedProps=i.memoizedProps,n.memoizedState=i.memoizedState,n.updateQueue=i.updateQueue,n.type=i.type,a=i.dependencies,n.dependencies=null===a?null:{lanes:a.lanes,firstContext:a.firstContext}),n}function se(n,a,i,o,s,m,y){if(s=2,o=n,"function"==typeof n)Yg(n)&&(s=1);else if("string"==typeof n)s=!function(n,a,i){if(1===i||null!=a.itemProp)return!1;switch(n){case"meta":case"title":return!0;case"style":if("string"!=typeof a.precedence||"string"!=typeof a.href||""===a.href)break;return!0;case"link":if("string"!=typeof a.rel||"string"!=typeof a.href||""===a.href||a.onLoad||a.onError)break;if("stylesheet"===a.rel)return n=a.disabled,"string"==typeof a.precedence&&null==n;return!0;case"script":if(!0===a.async&&!a.onLoad&&!a.onError&&"string"==typeof a.src&&a.src)return!0}return!1}(n,i,K.current)?"html"===n||"head"===n||"body"===n?27:5:26;else e:switch(n){case N:return ue(i.children,m,y,a);case L:s=8,0!=(1&(m|=8))&&(m|=16);break;case _:return(n=qd(12,i,a,2|m)).elementType=_,n.lanes=y,n;case I:return(n=qd(13,i,a,m)).elementType=I,n.lanes=y,n;case R:return(n=qd(19,i,a,m)).elementType=R,n.lanes=y,n;case Q:return ph(i,m,y,a);case $:case H:case B:return(n=qd(24,i,a,m)).elementType=B,n.lanes=y,n;default:if("object"==typeof n&&null!==n)switch(n.$$typeof){case j:s=10;break e;case M:s=9;break e;case O:s=11;break e;case A:s=14;break e;case U:s=16,o=null;break e}throw Error(t(130,null==n?n:typeof n,""))}return(a=qd(s,i,a,m)).elementType=n,a.type=o,a.lanes=y,a}function ue(n,a,i,o){return(n=qd(7,n,o,a)).lanes=i,n}function ph(n,a,i,o){(n=qd(22,n,o,a)).elementType=Q,n.lanes=i;var s={_visibility:1,_pendingVisibility:1,_pendingMarkers:null,_retryCache:null,_transitions:null,_current:null,detach:function(){var n=s._current;if(null===n)throw Error(t(456));if(0==(2&s._pendingVisibility)){var a=Md(n,2);null!==a&&(s._pendingVisibility|=2,Yf(a,n,2))}},attach:function(){var n=s._current;if(null===n)throw Error(t(456));if(0!=(2&s._pendingVisibility)){var a=Md(n,2);null!==a&&(s._pendingVisibility&=-3,Yf(a,n,2))}}};return n.stateNode=s,n}function re(n,a,i){return(n=qd(6,n,null,a)).lanes=i,n}function te(n,a,i){return(a=qd(4,null!==n.children?n.children:[],n.key,a)).lanes=i,a.stateNode={containerInfo:n.containerInfo,pendingChildren:null,implementation:n.implementation},a}function wk(n,a,i,o,s,m){this.tag=a,this.containerInfo=n,this.finishedWork=this.pingCache=this.current=this.pendingChildren=null,this.timeoutHandle=-1,this.callbackNode=this.next=this.pendingContext=this.context=this.cancelPendingCommit=null,this.callbackPriority=0,this.expirationTimes=lb(-1),this.entangledLanes=this.shellSuspendCounter=this.errorRecoveryDisabledLanes=this.finishedLanes=this.expiredLanes=this.pingedLanes=this.suspendedLanes=this.pendingLanes=0,this.entanglements=lb(0),this.hiddenUpdates=lb(null),this.identifierPrefix=o,this.onRecoverableError=s,this.pooledCache=null,this.pooledCacheLanes=0,this.formState=m,this.incompleteTransitions=new Map}function xk(n,a,i,o,s,m,y,v,k,C,x){return n=new wk(n,a,i,v,k,x),1===a?(a=1,!0===m&&(a|=24)):a=0,m=qd(3,null,null,a),n.current=m,m.stateNode=n,a=rg(),a.refCount++,n.pooledCache=a,a.refCount++,m.memoizedState={element:o,isDehydrated:i,cache:a},Rd(m),n}function zk(n){if(!n)return eJ;n=n._reactInternals;e:{if(Ic(n)!==n||1!==n.tag)throw Error(t(170));var a=n;do{switch(a.tag){case 3:a=a.stateNode.context;break e;case 1:if(Tc(a.type)){a=a.stateNode.__reactInternalMemoizedMergedChildContext;break e}}a=a.return}while(null!==a);throw Error(t(171))}if(1===n.tag){var i=n.type;if(Tc(i))return Wc(n,i,a)}return a}function Ak(n,a,i,o,s,m,y,v,k,C,x){return(n=xk(i,o,!0,n,s,m,y,v,k,C,x)).context=zk(null),(s=Td(o=qg(i=n.current))).callback=null!=a?a:null,Ud(i,s,o),n.current.lanes=o,mb(n,o),Se(n),n}function Bk(n,a,i,o){var s=a.current,m=qg(s);return i=zk(i),null===a.context?a.context=i:a.pendingContext=i,(a=Td(m)).payload={element:n},null!==(o=void 0===o?null:o)&&(a.callback=o),null!==(n=Ud(s,a,m))&&(Yf(n,s,m),Vd(n,s,m)),m}function Ck(n){return(n=n.current).child?(n.child.tag,n.child.stateNode):null}function Fk(n,a){if(null!==(n=n.memoizedState)&&null!==n.dehydrated){var i=n.retryLane;n.retryLane=0!==i&&i=rB),rG=!1;function fm(n,a){switch(n){case"keyup":return -1!==rQ.indexOf(a.keyCode);case"keydown":return 229!==a.keyCode;case"keypress":case"mousedown":case"focusout":return!0;default:return!1}}function hm(n){return"object"==typeof(n=n.detail)&&"data"in n?n.data:null}var rK=!1,rJ={color:!0,date:!0,datetime:!0,"datetime-local":!0,email:!0,month:!0,number:!0,password:!0,range:!0,search:!0,tel:!0,text:!0,time:!0,url:!0,week:!0};function mm(n){var a=n&&n.nodeName&&n.nodeName.toLowerCase();return"input"===a?!!rJ[n.type]:"textarea"===a}function nm(n,a,i,o){Gc(o),0<(a=om(a,"onChange")).length&&(i=new rc("onChange","change",null,i,o),n.push({event:i,listeners:a}))}var rX=null,r0=null;function rm(n){sm(n,0)}function tm(n){if(gc(Gb(n)))return n}function um(n,a){if("change"===n)return a}var r1=!1;if(eR){if(eR){var r2="oninput"in document;if(!r2){var r3=document.createElement("div");r3.setAttribute("oninput","return;"),r2="function"==typeof r3.oninput}o=r2}else o=!1;r1=o&&(!document.documentMode||9=a)return{node:o,offset:a-n};n=i}e:{for(;o;){if(o.nextSibling){o=o.nextSibling;break e}o=o.parentNode}o=void 0}o=Fm(o)}}function yi(){for(var n=window,a=hc();a instanceof n.HTMLIFrameElement;){try{var i="string"==typeof a.contentWindow.location.href}catch(n){i=!1}if(i)n=a.contentWindow;else break;a=hc(n.document)}return a}function zi(n){var a=n&&n.nodeName&&n.nodeName.toLowerCase();return a&&("input"===a&&("text"===n.type||"search"===n.type||"tel"===n.type||"url"===n.type||"password"===n.type)||"textarea"===a||"true"===n.contentEditable)}var r4=eR&&"documentMode"in document&&11>=document.documentMode,r8=null,r6=null,r5=null,r7=!1;function Nm(n,a,i){var o=i.window===i?i.document:9===i.nodeType?i:i.ownerDocument;r7||null==r8||r8!==hc(o)||(o="selectionStart"in(o=r8)&&zi(o)?{start:o.selectionStart,end:o.selectionEnd}:{anchorNode:(o=(o.ownerDocument&&o.ownerDocument.defaultView||window).getSelection()).anchorNode,anchorOffset:o.anchorOffset,focusNode:o.focusNode,focusOffset:o.focusOffset},r5&&ae(r5,o)||(r5=o,0<(o=om(r6,"onSelect")).length&&(a=new rc("onSelect","select",null,a,i),n.push({event:a,listeners:o}),a.target=r8)))}function Om(n,a){var i={};return i[n.toLowerCase()]=a.toLowerCase(),i["Webkit"+n]="webkit"+a,i["Moz"+n]="moz"+a,i}var r9={animationend:Om("Animation","AnimationEnd"),animationiteration:Om("Animation","AnimationIteration"),animationstart:Om("Animation","AnimationStart"),transitionend:Om("Transition","TransitionEnd")},lt={},lr={};function Sm(n){if(lt[n])return lt[n];if(!r9[n])return n;var a,i=r9[n];for(a in i)if(i.hasOwnProperty(a)&&a in lr)return lt[n]=i[a];return n}eR&&(lr=document.createElement("div").style,"AnimationEvent"in window||(delete r9.animationend.animation,delete r9.animationiteration.animation,delete r9.animationstart.animation),"TransitionEvent"in window||delete r9.transitionend.transition);var ll=Sm("animationend"),la=Sm("animationiteration"),lo=Sm("animationstart"),lu=Sm("transitionend"),ls=new Map,lf="abort auxClick cancel canPlay canPlayThrough click close contextMenu copy cut drag dragEnd dragEnter dragExit dragLeave dragOver dragStart drop durationChange emptied encrypted ended error gotPointerCapture input invalid keyDown keyPress keyUp load loadedData loadedMetadata loadStart lostPointerCapture mouseDown mouseMove mouseOut mouseOver mouseUp paste pause play playing pointerCancel pointerDown pointerMove pointerOut pointerOver pointerUp progress rateChange reset resize seeked seeking stalled submit suspend timeUpdate touchCancel touchEnd touchStart volumeChange scroll toggle touchMove waiting wheel".split(" ");function Zm(n,a){ls.set(n,a),Mb(a,[n])}for(var lp=0;lp title"):null)}var lD=null;function Vj(){}function Pn(){if(this.count--,0===this.count){if(this.stylesheets)Qn(this,this.stylesheets);else if(this.unsuspend){var n=this.unsuspend;this.unsuspend=null,n()}}}var lM=null;function Qn(n,a){n.stylesheets=null,null!==n.unsuspend&&(n.count++,lM=new Map,a.forEach(Sn,n),lM=null,Pn.call(n))}function Sn(n,a){if(!(4&a.state.loading)){var i=lM.get(n);if(i)var o=i.get("last");else{i=new Map,lM.set(n,i);for(var s=n.querySelectorAll("link[data-precedence],style[data-precedence]"),m=0;m