telemetrygodev: restyle, and add charts to the root page

Restyle telemetry.go.dev with the following goals:
- look more like a subpage of go.dev
- display charts on the root page
- improve chart navigation, assuming we'll eventually have many charts

The result is not perfect, but hopefully better than the current style,
and lays the groundwork for additional improvements.

Additionally, fix the following minor issues:
- Fix a misleading 'localhost' message when serving INADDR_ANY.
- Shorten long program/counter names.
- Reduce dependencies of handlers; handleCharts does not need the upload
  bucket.
- Remove an unused base.html.
- Remove misplaced storage.min.js* files.

For golang/go#68204

Change-Id: I5f775740cde17b3b14248a7f8dab6983e510bdbe
Reviewed-on: https://go-review.googlesource.com/c/telemetry/+/599275
LUCI-TryBot-Result: Go LUCI <golang-scoped@luci-project-accounts.iam.gserviceaccount.com>
Auto-Submit: Robert Findley <rfindley@google.com>
Reviewed-by: Hyang-Ah Hana Kim <hyangah@gmail.com>
diff --git a/cmd/gotelemetry/internal/view/view.go b/cmd/gotelemetry/internal/view/view.go
index 4d0881c..38271ed 100644
--- a/cmd/gotelemetry/internal/view/view.go
+++ b/cmd/gotelemetry/internal/view/view.go
@@ -629,7 +629,18 @@
 		return err
 	}
 	patterns = append(patterns, tmplPath)
-	tmpl, err := template.ParseFS(fsys, patterns...)
+	funcs := template.FuncMap{
+		"chartName": func(name string) string {
+			name, _, _ = strings.Cut(name, ":")
+			return name
+		},
+		"programName": func(name string) string {
+			name = strings.TrimPrefix(name, "golang.org/")
+			name = strings.TrimPrefix(name, "github.com/")
+			return name
+		},
+	}
+	tmpl, err := template.New("").Funcs(funcs).ParseFS(fsys, patterns...)
 	if err != nil {
 		return err
 	}
diff --git a/godev/cmd/telemetrygodev/main.go b/godev/cmd/telemetrygodev/main.go
index 0149804..2346fdc 100644
--- a/godev/cmd/telemetrygodev/main.go
+++ b/godev/cmd/telemetrygodev/main.go
@@ -12,12 +12,12 @@
 	"errors"
 	"flag"
 	"fmt"
+	"html/template"
 	"io"
 	"io/fs"
 	"log"
 	"net/http"
 	"os"
-	"path"
 	"strings"
 	"time"
 
@@ -47,10 +47,13 @@
 
 	handler := newHandler(ctx, cfg)
 
-	fmt.Printf("server listening at http://localhost:%s\n", cfg.ServerPort)
+	fmt.Printf("server listening at http://:%s\n", cfg.ServerPort)
 	log.Fatal(http.ListenAndServe(":"+cfg.ServerPort, handler))
 }
 
+// renderer implements shared template rendering for handlers below.
+type renderer func(w http.ResponseWriter, tmpl string, page any) error
+
 func newHandler(ctx context.Context, cfg *config.Config) http.Handler {
 	buckets, err := storage.NewAPI(ctx, cfg)
 	if err != nil {
@@ -63,11 +66,19 @@
 	fsys := fsys(cfg.DevMode)
 	mux := http.NewServeMux()
 
+	render := func(w http.ResponseWriter, tmpl string, page any) error {
+		return content.Template(w, fsys, tmpl, chartFuncs(), page, http.StatusOK)
+	}
+
 	logger := slog.Default()
-	mux.Handle("/", handleRoot(fsys, buckets))
+	// TODO(rfindley): use Go 1.22 routing once 1.23 is released and we can bump
+	// the go directive to 1.22.
+	mux.Handle("/", handleRoot(render, fsys, buckets.Chart, logger))
 	mux.Handle("/config", handleConfig(fsys, ucfg))
-	mux.Handle("/upload/", handleUpload(ucfg, buckets, logger))
-	mux.Handle("/charts/", handleChart(fsys, buckets))
+	// TODO(rfindley): restrict this routing to POST
+	mux.Handle("/upload/", handleUpload(ucfg, buckets.Upload, logger))
+	mux.Handle("/charts/", handleCharts(render, buckets.Chart))
+	mux.Handle("/data/", handleData(render, buckets.Merge))
 
 	mw := middleware.Chain(
 		middleware.Log(logger),
@@ -78,16 +89,39 @@
 	return mw(mux)
 }
 
-type link struct {
-	Text, URL string
+func chartFuncs() template.FuncMap {
+	return template.FuncMap{
+		"chartName": func(name string) string {
+			name, _, _ = strings.Cut(name, ":")
+			return name
+		},
+		"programName": func(name string) string {
+			name = strings.TrimPrefix(name, "golang.org/")
+			name = strings.TrimPrefix(name, "github.com/")
+			return name
+		},
+	}
+}
+
+// breadcrumb holds a breadcrumb nav element.
+//
+// If Link is empty, breadcrumbs are rendered as plain text.
+type breadcrumb struct {
+	Link, Label string
 }
 
 type indexPage struct {
-	Charts  []*link
-	Reports []*link
+	ChartDate  string
+	Charts     map[string]any
+	ChartError string // if set, the error
 }
 
-func handleRoot(fsys fs.FS, buckets *storage.API) content.HandlerFunc {
+func (indexPage) Breadcrumbs() []breadcrumb {
+	return []breadcrumb{{Link: "/", Label: "Go Telemetry"}, {Label: "Home"}}
+}
+
+func handleRoot(render renderer, fsys fs.FS, chartBucket storage.BucketHandle, log *slog.Logger) content.HandlerFunc {
+	// TODO(rfindley): handle static serving with a different route.
 	cserv := content.Server(fsys)
 	return func(w http.ResponseWriter, r *http.Request) error {
 		if r.URL.Path != "/" {
@@ -97,61 +131,143 @@
 		page := indexPage{}
 
 		ctx := r.Context()
-		it := buckets.Chart.Objects(ctx, "")
+		it := chartBucket.Objects(ctx, "")
 		for {
 			obj, err := it.Next()
 			if errors.Is(err, storage.ErrObjectIteratorDone) {
 				break
+			} else if err != nil {
+				return err
 			}
 			date := strings.TrimSuffix(obj, ".json")
-			page.Charts = append(page.Charts, &link{Text: date, URL: "/charts/" + date})
+			if date == obj {
+				// We have discussed eventually have nested subdirectories in the
+				// charts bucket. Defensively check for json files.
+				continue // not a chart object
+			}
+			page.ChartDate = date
 		}
-		it = buckets.Merge.Objects(ctx, "")
+		if page.ChartDate == "" {
+			page.ChartError = "No data."
+		} else {
+			charts, err := loadCharts(ctx, page.ChartDate, chartBucket)
+			if err != nil {
+				log.ErrorContext(ctx, fmt.Sprintf("error loading index charts: %v", err))
+				page.ChartError = "Error loading charts."
+			} else {
+				page.Charts = charts
+			}
+		}
+		return render(w, "index.html", page)
+	}
+}
+
+type chartsPage []string
+
+func (chartsPage) Breadcrumbs() []breadcrumb {
+	return []breadcrumb{{Link: "/", Label: "Go Telemetry"}, {Label: "Charts"}}
+}
+
+func handleCharts(render renderer, chartBucket storage.BucketHandle) content.HandlerFunc {
+	return func(w http.ResponseWriter, r *http.Request) error {
+		ctx := r.Context()
+		if p := strings.TrimPrefix(r.URL.Path, "/charts/"); p != "" {
+			return handleChart(ctx, w, p, render, chartBucket)
+		}
+		it := chartBucket.Objects(ctx, "")
+		var page chartsPage
 		for {
 			obj, err := it.Next()
 			if errors.Is(err, storage.ErrObjectIteratorDone) {
 				break
+			} else if err != nil {
+				return err
 			}
-			page.Reports = append(page.Reports, &link{
-				Text: strings.TrimSuffix(obj, ".json"),
-				URL:  buckets.Merge.URI() + "/" + obj,
-			})
+			date := strings.TrimSuffix(obj, ".json")
+			if date == obj {
+				continue // not a chart object
+			}
+			page = append(page, date)
 		}
-		return content.Template(w, fsys, "index.html", page, http.StatusOK)
+		return render(w, "allcharts.html", page)
 	}
 }
 
 type chartPage struct {
+	Date   string
 	Charts map[string]any
 }
 
-func handleChart(fsys fs.FS, buckets *storage.API) content.HandlerFunc {
-	return func(w http.ResponseWriter, r *http.Request) error {
-		ctx := r.Context()
-		p := strings.TrimPrefix(path.Clean(r.URL.Path), "/charts/")
-		reader, err := buckets.Chart.Object(p + ".json").NewReader(ctx)
-		if errors.Is(err, storage.ErrObjectNotExist) {
-			return content.Status(w, http.StatusNotFound)
-		} else if err != nil {
-			return err
-		}
-		defer reader.Close()
-		data, err := io.ReadAll(reader)
-		if err != nil {
-			return err
-		}
-		var charts map[string]any
-		if err := json.Unmarshal(data, &charts); err != nil {
-			return err
-		}
-		page := chartPage{
-			Charts: charts,
-		}
-		return content.Template(w, fsys, "charts.html", page, http.StatusOK)
+func (p chartPage) Breadcrumbs() []breadcrumb {
+	return []breadcrumb{
+		{Link: "/", Label: "Go Telemetry"},
+		{Link: "/charts/", Label: "Charts"},
+		{Label: p.Date},
 	}
 }
 
-func handleUpload(ucfg *tconfig.Config, buckets *storage.API, log *slog.Logger) content.HandlerFunc {
+func handleChart(ctx context.Context, w http.ResponseWriter, date string, render renderer, chartBucket storage.BucketHandle) error {
+	// TODO(rfindley): refactor to return a content.HandlerFunc once we can use Go 1.22 routing.
+	page := chartPage{Date: date}
+	var err error
+	page.Charts, err = loadCharts(ctx, date, chartBucket)
+	if errors.Is(err, storage.ErrObjectNotExist) {
+		return content.Status(w, http.StatusNotFound)
+	} else if err != nil {
+		return err
+	}
+	return render(w, "charts.html", page)
+}
+
+type dataPage struct {
+	BucketURL string
+	Dates     []string
+}
+
+func (dataPage) Breadcrumbs() []breadcrumb {
+	return []breadcrumb{{Link: "/", Label: "Go Telemetry"}, {Label: "Data"}}
+}
+
+func handleData(render renderer, mergeBucket storage.BucketHandle) content.HandlerFunc {
+	return func(w http.ResponseWriter, r *http.Request) error {
+		it := mergeBucket.Objects(r.Context(), "")
+		var page dataPage
+		page.BucketURL = mergeBucket.URI()
+		for {
+			obj, err := it.Next()
+			if errors.Is(err, storage.ErrObjectIteratorDone) {
+				break
+			} else if err != nil {
+				return err
+			}
+			date := strings.TrimSuffix(obj, ".json")
+			if date == obj {
+				continue // not a data object
+			}
+			page.Dates = append(page.Dates, date)
+		}
+		return render(w, "data.html", page)
+	}
+}
+
+func loadCharts(ctx context.Context, date string, bucket storage.BucketHandle) (map[string]any, error) {
+	reader, err := bucket.Object(date + ".json").NewReader(ctx)
+	if err != nil {
+		return nil, err
+	}
+	defer reader.Close()
+	data, err := io.ReadAll(reader)
+	if err != nil {
+		return nil, err
+	}
+	var charts map[string]any
+	if err := json.Unmarshal(data, &charts); err != nil {
+		return nil, err
+	}
+	return charts, nil
+}
+
+func handleUpload(ucfg *tconfig.Config, uploadBucket storage.BucketHandle, log *slog.Logger) content.HandlerFunc {
 	return func(w http.ResponseWriter, r *http.Request) error {
 		if r.Method == "POST" {
 			ctx := r.Context()
@@ -176,7 +292,7 @@
 			}
 			// TODO: capture metrics for collisions.
 			name := fmt.Sprintf("%s/%g.json", report.Week, report.X)
-			f, err := buckets.Upload.Object(name).NewWriter(ctx)
+			f, err := uploadBucket.Object(name).NewWriter(ctx)
 			if err != nil {
 				return err
 			}
@@ -243,6 +359,16 @@
 	return f
 }
 
+type configPage struct {
+	Version      string
+	ChartConfig  string
+	UploadConfig string
+}
+
+func (configPage) Breadcrumbs() []breadcrumb {
+	return []breadcrumb{{Link: "/", Label: "Go Telemetry"}, {Label: "Upload Configuration"}}
+}
+
 func handleConfig(fsys fs.FS, ucfg *tconfig.Config) content.HandlerFunc {
 	ccfg := chartconfig.Raw()
 	cfg := ucfg.UploadConfig
@@ -253,15 +379,11 @@
 		if err != nil {
 			cfgJSON = []byte("unknown")
 		}
-		data := struct {
-			Version      string
-			ChartConfig  string
-			UploadConfig string
-		}{
+		page := configPage{
 			Version:      version,
 			ChartConfig:  string(ccfg),
 			UploadConfig: string(cfgJSON),
 		}
-		return content.Template(w, fsys, "config.html", data, http.StatusOK)
+		return content.Template(w, fsys, "config.html", chartFuncs(), page, http.StatusOK)
 	}
 }
diff --git a/godev/cmd/telemetrygodev/main_test.go b/godev/cmd/telemetrygodev/main_test.go
index 9a8e900..c49f0d8 100644
--- a/godev/cmd/telemetrygodev/main_test.go
+++ b/godev/cmd/telemetrygodev/main_test.go
@@ -104,7 +104,7 @@
 		code      int
 		fragments []string
 	}{
-		{"GET", "/", "", 200, []string{"Overview"}},
+		{"GET", "/", "", 200, []string{"Go Telemetry"}},
 		{
 			"POST",
 			"/upload/2023-01-01/123.json",
diff --git a/godev/internal/content/content.go b/godev/internal/content/content.go
index fd4f256..36313b6 100644
--- a/godev/internal/content/content.go
+++ b/godev/internal/content/content.go
@@ -137,7 +137,7 @@
 		}
 		switch path.Ext(filepath) {
 		case ".html":
-			err = Template(w, c.fsys, filepath, nil, http.StatusOK)
+			err = Template(w, c.fsys, filepath, nil, nil, http.StatusOK)
 		case ".md":
 			err = markdown(w, c.fsys, filepath, http.StatusOK)
 		default:
@@ -150,13 +150,14 @@
 }
 
 // Template executes a template response.
-func Template(w http.ResponseWriter, fsys fs.FS, tmplPath string, data any, code int) error {
+// TODO(rfindley): this abstraction no longer holds its weight. Refactor.
+func Template(w http.ResponseWriter, fsys fs.FS, tmplPath string, funcs template.FuncMap, data any, code int) error {
 	patterns, err := tmplPatterns(fsys, tmplPath)
 	if err != nil {
 		return err
 	}
 	patterns = append(patterns, tmplPath)
-	tmpl, err := template.ParseFS(fsys, patterns...)
+	tmpl, err := template.New("").Funcs(funcs).ParseFS(fsys, patterns...)
 	if err != nil {
 		return err
 	}
@@ -210,6 +211,8 @@
 	return nil
 }
 
+// TODO(rfindley): this docstring is stale, and Status should be a pure
+// function.
 // Text renders an http status code as a text response.
 func Status(w http.ResponseWriter, code int) error {
 	if code < http.StatusBadRequest {
@@ -232,6 +235,8 @@
 
 // handleErr writes an error as an HTTP response with a status code.
 func handleErr(w http.ResponseWriter, req *http.Request, err error, code int) {
+	// TODO(rfindley): should we log here? Do we need to scrub errors before
+	// logging?
 	if cerr, ok := err.(*contentError); ok {
 		code = cerr.Code
 	}
@@ -277,7 +282,7 @@
 	if !ok {
 		return errors.New("missing layout for template " + tmplPath)
 	}
-	return Template(w, fsys, layout.(string), data, code)
+	return Template(w, fsys, layout.(string), nil, data, code)
 }
 
 // stat trys to coerce a urlPath into an openable file then returns the
diff --git a/godev/internal/content/content_test.go b/godev/internal/content/content_test.go
index 72330ef..fbf2431 100644
--- a/godev/internal/content/content_test.go
+++ b/godev/internal/content/content_test.go
@@ -145,7 +145,7 @@
 
 func handleTemplate(fsys fs.FS) HandlerFunc {
 	return func(w http.ResponseWriter, _ *http.Request) error {
-		return Template(w, fsys, "data.html", "Data from Handler", http.StatusOK)
+		return Template(w, fsys, "data.html", nil, "Data from Handler", http.StatusOK)
 	}
 }
 
diff --git a/internal/content/gotelemetryview/index.css b/internal/content/gotelemetryview/index.css
index 956bf64..cfdc657 100644
--- a/internal/content/gotelemetryview/index.css
+++ b/internal/content/gotelemetryview/index.css
@@ -10,13 +10,14 @@
   scroll-padding-top: 4rem;
 }
 
-.Breadcrumb {
+/* TODO(rfindley): refactor to share breadcrumb logic with telemetry.go.dev */
+.ViewBreadcrumb {
   position: sticky;
   top: 0;
   z-index: 1000;
 }
 
-.Breadcrumb ol {
+.ViewBreadcrumb ol {
   align-items: center;
   border-bottom: var(--border);
   display: inline-flex;
@@ -35,16 +36,16 @@
   transition: top 0.1s ease-in 0.1s;
 }
 
-.Breadcrumb ol:empty {
+.ViewBreadcrumb ol:empty {
   top: -3.0625rem;
 }
 
-.Breadcrumb li:not(:last-child)::after {
+.ViewBreadcrumb li:not(:last-child)::after {
   content: ">";
   margin-left: 1rem;
 }
 
-.Breadcrumb li:last-child a {
+.ViewBreadcrumb li:last-child a {
   color: var(--color-text-subtle);
 }
 
diff --git a/internal/content/gotelemetryview/index.html b/internal/content/gotelemetryview/index.html
index 801eece..52a763c 100644
--- a/internal/content/gotelemetryview/index.html
+++ b/internal/content/gotelemetryview/index.html
@@ -18,7 +18,8 @@
 
 <body>
   <main id="main">
-    <nav class="Breadcrumb js-breadcrumb">
+    <!-- TODO(rfindley): refactor to share breadcrumbs with telemetry.go.dev -->
+    <nav class="ViewBreadcrumb js-breadcrumb">
       <ol></ol>
     </nav>
 
@@ -266,4 +267,4 @@
   <script src="/static/index.min.js"></script>
 </body>
 
-</html>
\ No newline at end of file
+</html>
diff --git a/internal/content/gotelemetryview/index.ts b/internal/content/gotelemetryview/index.ts
index e9ed424..a9d0837 100644
--- a/internal/content/gotelemetryview/index.ts
+++ b/internal/content/gotelemetryview/index.ts
@@ -7,7 +7,7 @@
 
 import * as Plot from "@observablehq/plot";
 
-import "../shared/base";
+import { debounce } from "../shared/treenav";
 
 declare global {
   interface Page {
@@ -17,7 +17,7 @@
   interface ChartData {
     Programs: Program[];
     DateRange: [string, string];
-    UploadDay: Plot.TimeIntervalName
+    UploadDay: Plot.TimeIntervalName;
   }
 
   interface Program {
@@ -181,15 +181,4 @@
   }
 }
 
-function debounce<T extends (...args: unknown[]) => unknown>(
-  callback: T,
-  wait: number
-) {
-  let timeout: number;
-  return (...args: unknown[]) => {
-    clearTimeout(timeout);
-    timeout = setTimeout(() => callback(...args), wait);
-  };
-}
-
-export { };
+export {};
diff --git a/internal/content/gotelemetryview/static/index.min.css b/internal/content/gotelemetryview/static/index.min.css
index 9114d49..364a459 100644
--- a/internal/content/gotelemetryview/static/index.min.css
+++ b/internal/content/gotelemetryview/static/index.min.css
@@ -1,5 +1,5 @@
 /* Code generated by esbuild. DO NOT EDIT. */
-html{line-height:1.15;-webkit-text-size-adjust:100%}body{margin:0}main{display:block}h1{font-size:2em;margin:.67em 0}hr{box-sizing:content-box;height:0;overflow:visible}pre{font-family:monospace,monospace;font-size:1em}a{background-color:transparent}abbr[title]{border-bottom:none;text-decoration:underline;text-decoration:underline dotted}b,strong{font-weight:bolder}code,kbd,samp{font-family:monospace,monospace;font-size:1em}small{font-size:80%}sub,sup{font-size:75%;line-height:0;position:relative;vertical-align:baseline}sub{bottom:-.25em}sup{top:-.5em}img{border-style:none}button,input,optgroup,select,textarea{font-family:inherit;font-size:100%;line-height:1.15;margin:0}button,input{overflow:visible}button,select{text-transform:none}button,[type=button],[type=reset],[type=submit]{-webkit-appearance:button}button::-moz-focus-inner,[type=button]::-moz-focus-inner,[type=reset]::-moz-focus-inner,[type=submit]::-moz-focus-inner{border-style:none;padding:0}button:-moz-focusring,[type=button]:-moz-focusring,[type=reset]:-moz-focusring,[type=submit]:-moz-focusring{outline:1px dotted ButtonText}fieldset{padding:.35em .75em .625em}legend{box-sizing:border-box;color:inherit;display:table;max-width:100%;padding:0;white-space:normal}progress{vertical-align:baseline}textarea{overflow:auto}[type=checkbox],[type=radio]{box-sizing:border-box;padding:0}[type=number]::-webkit-inner-spin-button,[type=number]::-webkit-outer-spin-button{height:auto}[type=search]{-webkit-appearance:textfield;outline-offset:-2px}[type=search]::-webkit-search-decoration{-webkit-appearance:none}::-webkit-file-upload-button{-webkit-appearance:button;font:inherit}details{display:block}summary{display:list-item}template{display:none}[hidden]{display:none}:root{--gray-1: #202224;--gray-2: #3e4042;--gray-3: #555759;--gray-4: #6e7072;--gray-5: #848688;--gray-6: #aaacae;--gray-7: #c6c8ca;--gray-8: #dcdee0;--gray-9: #f0f1f2;--gray-10: #f8f8f8;--turq-light: #5dc9e2;--turq-med: #50b7e0;--turq-dark: #007d9c;--blue: #bfeaf4;--blue-light: #f2fafd;--black: #000;--green: #3a6e11;--green-light: #5fda64;--pink: #c85e7a;--pink-light: #fdecf1;--purple: #542c7d;--slate: #253443;--white: #fff;--yellow: #fceea5;--yellow-light: #fff8cc;--color-brand-primary: var(--turq-dark);--color-background: var(--white);--color-background-inverted: var(--slate);--color-background-accented: var(--gray-10);--color-background-highlighted: var(--blue);--color-background-highlighted-link: var(--blue-light);--color-background-info: var(--gray-9);--color-background-warning: var(--yellow-light);--color-background-alert: var(--pink-light);--color-border: var(--gray-7);--color-text: var(--gray-1);--color-text-subtle: var(--gray-4);--color-text-link: var(--turq-dark);--color-text-inverted: var(--white);--color-code-comment: var(--green);--color-input: var(--color-background);--color-input-text: var(--color-text);--color-button: var(--turq-dark);--color-button-disabled: var(--gray-9);--color-button-text: var(--white);--color-button-text-disabled: var(--gray-3);--color-button-inverted: var(--color-background);--color-button-inverted-disabled: var(--color-background);--color-button-inverted-text: var(--color-brand-primary);--color-button-inverted-text-disabled: var(--color-text-subtle);--color-button-accented: var(--yellow);--color-button-accented-disabled: var(--gray-9);--color-button-accented-text: var(--gray-1);--color-button-accented-text-disabled: var(--gray-3)}@media (prefers-color-scheme: dark){:root:not([data-theme="light"]){--color-brand-primary: var(--turq-med);--color-background: var(--gray-1);--color-background-accented: var(--gray-2);--color-background-highlighted: var(--gray-2);--color-background-highlighted-link: var(--gray-2);--color-background-info: var(--gray-3);--color-background-warning: var(--yellow);--color-background-alert: var(--pink);--color-border: var(--gray-4);--color-text: var(--gray-9);--color-text-link: var(--turq-med);--color-text-subtle: var(--gray-7);--color-code-comment: var(--green-light)}img.go-Icon{filter:invert(1)}}body{background-color:var(--color-background);color:var(--color-text);font-family:-apple-system,BlinkMacSystemFont,Segoe UI,Helvetica,Arial,sans-serif,"Apple Color Emoji","Segoe UI Emoji";font-size:1rem;line-height:normal}p{line-height:1.4375;max-width:75ch}hr{border:none;border-bottom:var(--border);margin:0;width:100%}code,pre,textarea.code{font-family:SFMono-Regular,Consolas,Liberation Mono,Menlo,monospace;font-size:.875rem;line-height:1.5em}pre,textarea.code{background-color:var(--color-background-accented);border:var(--border);border-radius:var(--border-radius);color:var(--color-text);overflow-x:auto;padding:.625rem;tab-size:4;white-space:pre}button,input,select,textarea{font:inherit}a,a:link,a:visited{color:var(--color-brand-primary);text-decoration:none}a:hover{color:var(--color-brand-primary);text-decoration:underline}a:hover>*{text-decoration:underline}.go-Tooltip{border-radius:var(--border-radius);cursor:pointer;display:inline-block;position:relative}.go-Tooltip>summary{list-style:none}.go-Tooltip>summary::-webkit-details-marker,.go-Tooltip>summary::marker{display:none}.go-Tooltip>summary>img{vertical-align:text-bottom}.go-Tooltip p{background:var(--color-background) 80%;border:var(--border);border-radius:var(--border-radius);color:var(--color-text);font-size:.75rem;letter-spacing:.0187rem;line-height:1rem;padding:.5rem;position:absolute;top:1.5rem;white-space:normal;width:12rem;z-index:100}:root{--border: .0625rem solid var(--color-border);--border-radius: .25rem}.Container{margin:2rem 0 5rem}.Content{margin:0 auto;max-width:64rem;padding:0 1rem}html{scroll-padding-top:4rem}.Breadcrumb{position:sticky;top:0;z-index:1000}.Breadcrumb ol{align-items:center;border-bottom:var(--border);display:inline-flex;gap:1rem;list-style:none;margin-block-start:0;margin-block-end:0;padding-inline-start:0;min-height:3rem;width:calc(100% - 2rem);background-color:var(--color-background);padding:0 1rem;font-size:.875rem;position:fixed;top:0;transition:top .1s ease-in .1s}.Breadcrumb ol:empty{top:-3.0625rem}.Breadcrumb li:not(:last-child):after{content:">";margin-left:1rem}.Breadcrumb li:last-child a{color:var(--color-text-subtle)}.Index{line-height:1.5}.Counters{border:var(--border);border-radius:.25rem;display:grid;gap:1rem 2rem;margin-top:1rem;overflow:auto;padding:1rem;grid-template-areas:"meta count count" "stack stack stack" "summary summary summary";grid-auto-columns:1fr 2fr 1fr}.Meta{grid-area:meta;display:grid;grid-auto-rows:min-content;grid-template-columns:repeat(2,max-content);gap:.5rem}.Stack{grid-area:stack;border-top:var(--border);padding-top:1rem;gap:.5rem 1rem;display:flex;flex-direction:column;width:100%}.Stack summary{display:block}.Stack details .Count-entry:first-child:before{content:"\23f5"}.Stack details[open] .Count-entry:first-child:before{content:"\23f7"}.Count{grid-area:count;display:grid;flex-grow:1;grid-auto-rows:min-content;grid-template-columns:repeat(auto-fill,minmax(12.5rem,1fr));gap:.5rem 1rem}.Summary{border-top:var(--border);font-size:.875rem;grid-area:summary;line-height:1.5;padding-top:1rem}.Meta .unknown,.Count .unknown,.Stack .unknown{color:var(--color-text-subtle)}.Count-entry{display:flex;gap:.25rem;justify-content:space-between}.Count-entry>span:nth-child(odd){overflow:hidden;white-space:nowrap}.Count-entry:not(.unknown)>span:nth-child(even){text-align:right;color:var(--color-code-comment)}.Count-entry>span:nth-child(odd):after{content:" ----------------------------------------------------------------------------------------------- ";letter-spacing:.125rem}h2:after{content:"\23f7";padding-left:.5rem}html[data-closed-sections*=index] h2#index:after,html[data-closed-sections*=config] h2#config:after,html[data-closed-sections*=files] h2#files:after,html[data-closed-sections*=charts] h2#charts:after,html[data-closed-sections*=reports] h2#reports:after{content:"\23f5"}html[data-closed-sections*=index] h2#index~*,html[data-closed-sections*=config] h2#config~*,html[data-closed-sections*=files] h2#files~*,html[data-closed-sections*=charts] h2#charts~*,html[data-closed-sections*=reports] h2#reports~*{display:none}div[data-chart-id]{min-height:16rem}svg g[aria-label=tip] g{fill:var(--color-background)}
+html{line-height:1.15;-webkit-text-size-adjust:100%}body{margin:0}main{display:block}h1{font-size:2em;margin:.67em 0}hr{box-sizing:content-box;height:0;overflow:visible}pre{font-family:monospace,monospace;font-size:1em}a{background-color:transparent}abbr[title]{border-bottom:none;text-decoration:underline;text-decoration:underline dotted}b,strong{font-weight:bolder}code,kbd,samp{font-family:monospace,monospace;font-size:1em}small{font-size:80%}sub,sup{font-size:75%;line-height:0;position:relative;vertical-align:baseline}sub{bottom:-.25em}sup{top:-.5em}img{border-style:none}button,input,optgroup,select,textarea{font-family:inherit;font-size:100%;line-height:1.15;margin:0}button,input{overflow:visible}button,select{text-transform:none}button,[type=button],[type=reset],[type=submit]{-webkit-appearance:button}button::-moz-focus-inner,[type=button]::-moz-focus-inner,[type=reset]::-moz-focus-inner,[type=submit]::-moz-focus-inner{border-style:none;padding:0}button:-moz-focusring,[type=button]:-moz-focusring,[type=reset]:-moz-focusring,[type=submit]:-moz-focusring{outline:1px dotted ButtonText}fieldset{padding:.35em .75em .625em}legend{box-sizing:border-box;color:inherit;display:table;max-width:100%;padding:0;white-space:normal}progress{vertical-align:baseline}textarea{overflow:auto}[type=checkbox],[type=radio]{box-sizing:border-box;padding:0}[type=number]::-webkit-inner-spin-button,[type=number]::-webkit-outer-spin-button{height:auto}[type=search]{-webkit-appearance:textfield;outline-offset:-2px}[type=search]::-webkit-search-decoration{-webkit-appearance:none}::-webkit-file-upload-button{-webkit-appearance:button;font:inherit}details{display:block}summary{display:list-item}template{display:none}[hidden]{display:none}:root{--gray-1: #202224;--gray-2: #3e4042;--gray-3: #555759;--gray-4: #6e7072;--gray-5: #848688;--gray-6: #aaacae;--gray-7: #c6c8ca;--gray-8: #dcdee0;--gray-9: #f0f1f2;--gray-10: #f8f8f8;--turq-light: #5dc9e2;--turq-med: #50b7e0;--turq-dark: #007d9c;--blue: #bfeaf4;--blue-light: #f2fafd;--black: #000;--green: #3a6e11;--green-light: #5fda64;--pink: #c85e7a;--pink-light: #fdecf1;--purple: #542c7d;--slate: #253443;--white: #fff;--yellow: #fceea5;--yellow-light: #fff8cc;--color-brand-primary: var(--turq-dark);--color-background: var(--white);--color-background-inverted: var(--slate);--color-background-accented: var(--gray-10);--color-background-highlighted: var(--blue);--color-background-highlighted-link: var(--blue-light);--color-background-info: var(--gray-9);--color-background-warning: var(--yellow-light);--color-background-alert: var(--pink-light);--color-border: var(--gray-7);--color-text: var(--gray-1);--color-text-subtle: var(--gray-4);--color-text-link: var(--turq-dark);--color-text-inverted: var(--white);--color-code-comment: var(--green);--color-input: var(--color-background);--color-input-text: var(--color-text);--color-button: var(--turq-dark);--color-button-disabled: var(--gray-9);--color-button-text: var(--white);--color-button-text-disabled: var(--gray-3);--color-button-inverted: var(--color-background);--color-button-inverted-disabled: var(--color-background);--color-button-inverted-text: var(--color-brand-primary);--color-button-inverted-text-disabled: var(--color-text-subtle);--color-button-accented: var(--yellow);--color-button-accented-disabled: var(--gray-9);--color-button-accented-text: var(--gray-1);--color-button-accented-text-disabled: var(--gray-3)}@media (prefers-color-scheme: dark){:root:not([data-theme="light"]){--color-brand-primary: var(--turq-med);--color-background: var(--gray-1);--color-background-accented: var(--gray-2);--color-background-highlighted: var(--gray-2);--color-background-highlighted-link: var(--gray-2);--color-background-info: var(--gray-3);--color-background-warning: var(--yellow);--color-background-alert: var(--pink);--color-border: var(--gray-4);--color-text: var(--gray-9);--color-text-link: var(--turq-med);--color-text-subtle: var(--gray-7);--color-code-comment: var(--green-light)}img.go-Icon{filter:invert(1)}}body{background-color:var(--color-background);color:var(--color-text);font-family:-apple-system,BlinkMacSystemFont,Segoe UI,Helvetica,Arial,sans-serif,"Apple Color Emoji","Segoe UI Emoji";font-size:1rem;line-height:normal}p{line-height:1.4375;max-width:75ch}hr{border:none;border-bottom:var(--border);margin:0;width:100%}code,pre,textarea.code{font-family:SFMono-Regular,Consolas,Liberation Mono,Menlo,monospace;font-size:.875rem;line-height:1.5em}pre,textarea.code{background-color:var(--color-background-accented);border:var(--border);border-radius:var(--border-radius);color:var(--color-text);overflow-x:auto;padding:.625rem;tab-size:4;white-space:pre}button,input,select,textarea{font:inherit}a,a:link,a:visited{color:var(--color-brand-primary);text-decoration:none}a:hover{color:var(--color-brand-primary);text-decoration:underline}a:hover>*{text-decoration:underline}.go-Tooltip{border-radius:var(--border-radius);cursor:pointer;display:inline-block;position:relative}.go-Tooltip>summary{list-style:none}.go-Tooltip>summary::-webkit-details-marker,.go-Tooltip>summary::marker{display:none}.go-Tooltip>summary>img{vertical-align:text-bottom}.go-Tooltip p{background:var(--color-background) 80%;border:var(--border);border-radius:var(--border-radius);color:var(--color-text);font-size:.75rem;letter-spacing:.0187rem;line-height:1rem;padding:.5rem;position:absolute;top:1.5rem;white-space:normal;width:12rem;z-index:100}:root{--border: .0625rem solid var(--color-border);--border-radius: .25rem}.Breadcrumb{background-color:var(--color-background-accented)}.Breadcrumb ol{list-style:none;align-items:center;padding:0;margin:1.5rem 0;display:inline-flex}.Breadcrumb li{display:flex;font-size:.875rem}.Breadcrumb li:not(:last-child):after{content:">";display:block;height:1rem;margin:0 .8125rem;width:1rem;text-align:center}.Hero{background-color:var(--color-background-accented);padding:1rem 0}.Hero h1{font-size:2.25rem;font-weight:400;margin:0}.Container{margin:0 0 5rem}.Content{margin:0 auto;max-width:64rem;padding:0 1rem}html{scroll-padding-top:4rem}.ViewBreadcrumb{position:sticky;top:0;z-index:1000}.ViewBreadcrumb ol{align-items:center;border-bottom:var(--border);display:inline-flex;gap:1rem;list-style:none;margin-block-start:0;margin-block-end:0;padding-inline-start:0;min-height:3rem;width:calc(100% - 2rem);background-color:var(--color-background);padding:0 1rem;font-size:.875rem;position:fixed;top:0;transition:top .1s ease-in .1s}.ViewBreadcrumb ol:empty{top:-3.0625rem}.ViewBreadcrumb li:not(:last-child):after{content:">";margin-left:1rem}.ViewBreadcrumb li:last-child a{color:var(--color-text-subtle)}.Index{line-height:1.5}.Counters{border:var(--border);border-radius:.25rem;display:grid;gap:1rem 2rem;margin-top:1rem;overflow:auto;padding:1rem;grid-template-areas:"meta count count" "stack stack stack" "summary summary summary";grid-auto-columns:1fr 2fr 1fr}.Meta{grid-area:meta;display:grid;grid-auto-rows:min-content;grid-template-columns:repeat(2,max-content);gap:.5rem}.Stack{grid-area:stack;border-top:var(--border);padding-top:1rem;gap:.5rem 1rem;display:flex;flex-direction:column;width:100%}.Stack summary{display:block}.Stack details .Count-entry:first-child:before{content:"\23f5"}.Stack details[open] .Count-entry:first-child:before{content:"\23f7"}.Count{grid-area:count;display:grid;flex-grow:1;grid-auto-rows:min-content;grid-template-columns:repeat(auto-fill,minmax(12.5rem,1fr));gap:.5rem 1rem}.Summary{border-top:var(--border);font-size:.875rem;grid-area:summary;line-height:1.5;padding-top:1rem}.Meta .unknown,.Count .unknown,.Stack .unknown{color:var(--color-text-subtle)}.Count-entry{display:flex;gap:.25rem;justify-content:space-between}.Count-entry>span:nth-child(odd){overflow:hidden;white-space:nowrap}.Count-entry:not(.unknown)>span:nth-child(even){text-align:right;color:var(--color-code-comment)}.Count-entry>span:nth-child(odd):after{content:" ----------------------------------------------------------------------------------------------- ";letter-spacing:.125rem}h2:after{content:"\23f7";padding-left:.5rem}html[data-closed-sections*=index] h2#index:after,html[data-closed-sections*=config] h2#config:after,html[data-closed-sections*=files] h2#files:after,html[data-closed-sections*=charts] h2#charts:after,html[data-closed-sections*=reports] h2#reports:after{content:"\23f5"}html[data-closed-sections*=index] h2#index~*,html[data-closed-sections*=config] h2#config~*,html[data-closed-sections*=files] h2#files~*,html[data-closed-sections*=charts] h2#charts~*,html[data-closed-sections*=reports] h2#reports~*{display:none}div[data-chart-id]{min-height:16rem}svg g[aria-label=tip] g{fill:var(--color-background)}
 /*! normalize.css v8.0.1 | MIT License | github.com/necolas/normalize.css */
 /*!
  * Copyright 2021 The Go Authors. All rights reserved.
diff --git a/internal/content/gotelemetryview/static/index.min.css.map b/internal/content/gotelemetryview/static/index.min.css.map
index 64fa65b..f3bb393 100644
--- a/internal/content/gotelemetryview/static/index.min.css.map
+++ b/internal/content/gotelemetryview/static/index.min.css.map
@@ -1,7 +1,7 @@
 {
   "version": 3,
   "sources": ["../../shared/_normalize.css", "../../shared/_color.css", "../../shared/_typography.css", "../../shared/_tooltip.css", "../../shared/base.css", "../index.css"],
-  "sourcesContent": ["/* stylelint-disable */\n/*! normalize.css v8.0.1 | MIT License | github.com/necolas/normalize.css */\n\n/* Document\n   ========================================================================== */\n\n/**\n * 1. Correct the line height in all browsers.\n * 2. Prevent adjustments of font size after orientation changes in iOS.\n */\n\nhtml {\n  line-height: 1.15; /* 1 */\n  -webkit-text-size-adjust: 100%; /* 2 */\n}\n\n/* Sections\n   ========================================================================== */\n\n/**\n * Remove the margin in all browsers.\n */\n\nbody {\n  margin: 0;\n}\n\n/**\n * Render the `main` element consistently in IE.\n */\n\nmain {\n  display: block;\n}\n\n/**\n * Correct the font size and margin on `h1` elements within `section` and\n * `article` contexts in Chrome, Firefox, and Safari.\n */\n\nh1 {\n  font-size: 2em;\n  margin: 0.67em 0;\n}\n\n/* Grouping content\n   ========================================================================== */\n\n/**\n * 1. Add the correct box sizing in Firefox.\n * 2. Show the overflow in Edge and IE.\n */\n\nhr {\n  box-sizing: content-box; /* 1 */\n  height: 0; /* 1 */\n  overflow: visible; /* 2 */\n}\n\n/**\n * 1. Correct the inheritance and scaling of font size in all browsers.\n * 2. Correct the odd `em` font sizing in all browsers.\n */\n\npre {\n  font-family: monospace, monospace; /* 1 */\n  font-size: 1em; /* 2 */\n}\n\n/* Text-level semantics\n   ========================================================================== */\n\n/**\n * Remove the gray background on active links in IE 10.\n */\n\na {\n  background-color: transparent;\n}\n\n/**\n * 1. Remove the bottom border in Chrome 57-\n * 2. Add the correct text decoration in Chrome, Edge, IE, Opera, and Safari.\n */\n\nabbr[title] {\n  border-bottom: none; /* 1 */\n  text-decoration: underline; /* 2 */\n  text-decoration: underline dotted; /* 2 */\n}\n\n/**\n * Add the correct font weight in Chrome, Edge, and Safari.\n */\n\nb,\nstrong {\n  font-weight: bolder;\n}\n\n/**\n * 1. Correct the inheritance and scaling of font size in all browsers.\n * 2. Correct the odd `em` font sizing in all browsers.\n */\n\ncode,\nkbd,\nsamp {\n  font-family: monospace, monospace; /* 1 */\n  font-size: 1em; /* 2 */\n}\n\n/**\n * Add the correct font size in all browsers.\n */\n\nsmall {\n  font-size: 80%;\n}\n\n/**\n * Prevent `sub` and `sup` elements from affecting the line height in\n * all browsers.\n */\n\nsub,\nsup {\n  font-size: 75%;\n  line-height: 0;\n  position: relative;\n  vertical-align: baseline;\n}\n\nsub {\n  bottom: -0.25em;\n}\n\nsup {\n  top: -0.5em;\n}\n\n/* Embedded content\n   ========================================================================== */\n\n/**\n * Remove the border on images inside links in IE 10.\n */\n\nimg {\n  border-style: none;\n}\n\n/* Forms\n   ========================================================================== */\n\n/**\n * 1. Change the font styles in all browsers.\n * 2. Remove the margin in Firefox and Safari.\n */\n\nbutton,\ninput,\noptgroup,\nselect,\ntextarea {\n  font-family: inherit; /* 1 */\n  font-size: 100%; /* 1 */\n  line-height: 1.15; /* 1 */\n  margin: 0; /* 2 */\n}\n\n/**\n * Show the overflow in IE.\n * 1. Show the overflow in Edge.\n */\n\nbutton,\ninput {\n  /* 1 */\n  overflow: visible;\n}\n\n/**\n * Remove the inheritance of text transform in Edge, Firefox, and IE.\n * 1. Remove the inheritance of text transform in Firefox.\n */\n\nbutton,\nselect {\n  /* 1 */\n  text-transform: none;\n}\n\n/**\n * Correct the inability to style clickable types in iOS and Safari.\n */\n\nbutton,\n[type=\"button\"],\n[type=\"reset\"],\n[type=\"submit\"] {\n  -webkit-appearance: button;\n}\n\n/**\n * Remove the inner border and padding in Firefox.\n */\n\nbutton::-moz-focus-inner,\n[type=\"button\"]::-moz-focus-inner,\n[type=\"reset\"]::-moz-focus-inner,\n[type=\"submit\"]::-moz-focus-inner {\n  border-style: none;\n  padding: 0;\n}\n\n/**\n * Restore the focus styles unset by the previous rule.\n */\n\nbutton:-moz-focusring,\n[type=\"button\"]:-moz-focusring,\n[type=\"reset\"]:-moz-focusring,\n[type=\"submit\"]:-moz-focusring {\n  outline: 1px dotted ButtonText;\n}\n\n/**\n * Correct the padding in Firefox.\n */\n\nfieldset {\n  padding: 0.35em 0.75em 0.625em;\n}\n\n/**\n * 1. Correct the text wrapping in Edge and IE.\n * 2. Correct the color inheritance from `fieldset` elements in IE.\n * 3. Remove the padding so developers are not caught out when they zero out\n *    `fieldset` elements in all browsers.\n */\n\nlegend {\n  box-sizing: border-box; /* 1 */\n  color: inherit; /* 2 */\n  display: table; /* 1 */\n  max-width: 100%; /* 1 */\n  padding: 0; /* 3 */\n  white-space: normal; /* 1 */\n}\n\n/**\n * Add the correct vertical alignment in Chrome, Firefox, and Opera.\n */\n\nprogress {\n  vertical-align: baseline;\n}\n\n/**\n * Remove the default vertical scrollbar in IE 10+.\n */\n\ntextarea {\n  overflow: auto;\n}\n\n/**\n * 1. Add the correct box sizing in IE 10.\n * 2. Remove the padding in IE 10.\n */\n\n[type=\"checkbox\"],\n[type=\"radio\"] {\n  box-sizing: border-box; /* 1 */\n  padding: 0; /* 2 */\n}\n\n/**\n * Correct the cursor style of increment and decrement buttons in Chrome.\n */\n\n[type=\"number\"]::-webkit-inner-spin-button,\n[type=\"number\"]::-webkit-outer-spin-button {\n  height: auto;\n}\n\n/**\n * 1. Correct the odd appearance in Chrome and Safari.\n * 2. Correct the outline style in Safari.\n */\n\n[type=\"search\"] {\n  -webkit-appearance: textfield; /* 1 */\n  outline-offset: -2px; /* 2 */\n}\n\n/**\n * Remove the inner padding in Chrome and Safari on macOS.\n */\n\n[type=\"search\"]::-webkit-search-decoration {\n  -webkit-appearance: none;\n}\n\n/**\n * 1. Correct the inability to style clickable types in iOS and Safari.\n * 2. Change font properties to `inherit` in Safari.\n */\n\n::-webkit-file-upload-button {\n  -webkit-appearance: button; /* 1 */\n  font: inherit; /* 2 */\n}\n\n/* Interactive\n   ========================================================================== */\n\n/*\n * Add the correct display in Edge, IE 10+, and Firefox.\n */\n\ndetails {\n  display: block;\n}\n\n/*\n * Add the correct display in all browsers.\n */\n\nsummary {\n  display: list-item;\n}\n\n/* Misc\n   ========================================================================== */\n\n/**\n * Add the correct display in IE 10+.\n */\n\ntemplate {\n  display: none;\n}\n\n/**\n * Add the correct display in IE 10.\n */\n\n[hidden] {\n  display: none;\n}\n", "/*!\n * Copyright 2021 The Go Authors. All rights reserved.\n * Use of this source code is governed by a BSD-style\n * license that can be found in the LICENSE file.\n */\n\n:root {\n  /* Colors */\n  --gray-1: #202224;\n  --gray-2: #3e4042;\n  --gray-3: #555759;\n  --gray-4: #6e7072;\n  --gray-5: #848688;\n  --gray-6: #aaacae;\n  --gray-7: #c6c8ca;\n  --gray-8: #dcdee0;\n  --gray-9: #f0f1f2;\n  --gray-10: #f8f8f8;\n  --turq-light: #5dc9e2;\n  --turq-med: #50b7e0;\n  --turq-dark: #007d9c;\n  --blue: #bfeaf4;\n  --blue-light: #f2fafd;\n  --black: #000;\n  --green: #3a6e11;\n  --green-light: #5fda64;\n  --pink: #c85e7a;\n  --pink-light: #fdecf1;\n  --purple: #542c7d;\n  --slate: #253443; /* Footer background. */\n  --white: #fff;\n  --yellow: #fceea5;\n  --yellow-light: #fff8cc;\n\n  /* Color Intents */\n  --color-brand-primary: var(--turq-dark);\n  --color-background: var(--white);\n  --color-background-inverted: var(--slate);\n  --color-background-accented: var(--gray-10);\n  --color-background-highlighted: var(--blue);\n  --color-background-highlighted-link: var(--blue-light);\n  --color-background-info: var(--gray-9);\n  --color-background-warning: var(--yellow-light);\n  --color-background-alert: var(--pink-light);\n  --color-border: var(--gray-7);\n  --color-text: var(--gray-1);\n  --color-text-subtle: var(--gray-4);\n  --color-text-link: var(--turq-dark);\n  --color-text-inverted: var(--white);\n  --color-code-comment: var(--green);\n\n  /* Interactive Colors */\n  --color-input: var(--color-background);\n  --color-input-text: var(--color-text);\n  --color-button: var(--turq-dark);\n  --color-button-disabled: var(--gray-9);\n  --color-button-text: var(--white);\n  --color-button-text-disabled: var(--gray-3);\n  --color-button-inverted: var(--color-background);\n  --color-button-inverted-disabled: var(--color-background);\n  --color-button-inverted-text: var(--color-brand-primary);\n  --color-button-inverted-text-disabled: var(--color-text-subtle);\n  --color-button-accented: var(--yellow);\n  --color-button-accented-disabled: var(--gray-9);\n  --color-button-accented-text: var(--gray-1);\n  --color-button-accented-text-disabled: var(--gray-3);\n}\n\n@media (prefers-color-scheme: dark) {\n  :root:not([data-theme=\"light\"]) {\n    --color-brand-primary: var(--turq-med);\n    --color-background: var(--gray-1);\n    --color-background-accented: var(--gray-2);\n    --color-background-highlighted: var(--gray-2);\n    --color-background-highlighted-link: var(--gray-2);\n    --color-background-info: var(--gray-3);\n    --color-background-warning: var(--yellow);\n    --color-background-alert: var(--pink);\n    --color-border: var(--gray-4);\n    --color-text: var(--gray-9);\n    --color-text-link: var(--turq-med);\n    --color-text-subtle: var(--gray-7);\n    --color-code-comment: var(--green-light);\n  }\n\n  img.go-Icon {\n    filter: invert(1);\n  }\n}\n", "/*!\n * Copyright 2021 The Go Authors. All rights reserved.\n * Use of this source code is governed by a BSD-style\n * license that can be found in the LICENSE file.\n */\n\nbody {\n  background-color: var(--color-background);\n  color: var(--color-text);\n  font-family: -apple-system, BlinkMacSystemFont, \"Segoe UI\", Helvetica, Arial,\n    sans-serif, \"Apple Color Emoji\", \"Segoe UI Emoji\";\n  font-size: 1rem;\n  line-height: normal;\n}\n\np {\n  line-height: 1.4375;\n  max-width: 75ch;\n}\n\nhr {\n  border: none;\n  border-bottom: var(--border);\n  margin: 0;\n  width: 100%;\n}\n\ncode,\npre,\ntextarea.code {\n  font-family: SFMono-Regular, Consolas, \"Liberation Mono\", Menlo, monospace;\n  font-size: 0.875rem;\n  line-height: 1.5em;\n}\n\npre,\ntextarea.code {\n  background-color: var(--color-background-accented);\n  border: var(--border);\n  border-radius: var(--border-radius);\n  color: var(--color-text);\n  overflow-x: auto;\n  padding: 0.625rem;\n  tab-size: 4;\n  white-space: pre;\n}\n\nbutton,\ninput,\nselect,\ntextarea {\n  font: inherit;\n}\n\na,\na:link,\na:visited {\n  color: var(--color-brand-primary);\n  text-decoration: none;\n}\n\na:hover {\n  color: var(--color-brand-primary);\n  text-decoration: underline;\n}\n\na:hover > * {\n  text-decoration: underline;\n}\n", "/*!\n * Copyright 2021 The Go Authors. All rights reserved.\n * Use of this source code is governed by a BSD-style\n * license that can be found in the LICENSE file.\n */\n\n.go-Tooltip {\n  border-radius: var(--border-radius);\n  cursor: pointer;\n  display: inline-block;\n  position: relative;\n}\n\n.go-Tooltip > summary {\n  list-style: none;\n}\n\n.go-Tooltip > summary::-webkit-details-marker,\n.go-Tooltip > summary::marker {\n  display: none;\n}\n\n.go-Tooltip > summary > img {\n  vertical-align: text-bottom;\n}\n\n.go-Tooltip p {\n  background: var(--color-background) 80%;\n  border: var(--border);\n  border-radius: var(--border-radius);\n  color: var(--color-text);\n  font-size: 0.75rem;\n  letter-spacing: 0.0187rem;\n  line-height: 1rem;\n  padding: 0.5rem;\n  position: absolute;\n  top: 1.5rem;\n  white-space: normal;\n  width: 12rem;\n  z-index: 100;\n}\n", "/*!\n * Copyright 2023 The Go Authors. All rights reserved.\n * Use of this source code is governed by a BSD-style\n * license that can be found in the LICENSE file.\n */\n\n@import url(\"./_normalize.css\");\n@import url(\"./_color.css\");\n@import url(\"./_typography.css\");\n@import url(\"./_tooltip.css\");\n\n:root {\n  --border: 0.0625rem solid var(--color-border);\n  --border-radius: 0.25rem;\n}\n\n.Container {\n  margin: 2rem 0 5rem;\n}\n\n.Content {\n  margin: 0 auto;\n  max-width: 64rem;\n  padding: 0 1rem;\n}\n", "/*!\n * Copyright 2023 The Go Authors. All rights reserved.\n * Use of this source code is governed by a BSD-style\n * license that can be found in the LICENSE file.\n */\n\n@import url(\"../shared/base.css\");\n\nhtml {\n  scroll-padding-top: 4rem;\n}\n\n.Breadcrumb {\n  position: sticky;\n  top: 0;\n  z-index: 1000;\n}\n\n.Breadcrumb ol {\n  align-items: center;\n  border-bottom: var(--border);\n  display: inline-flex;\n  gap: 1rem;\n  list-style: none;\n  margin-block-start: 0;\n  margin-block-end: 0;\n  padding-inline-start: 0;\n  min-height: 3rem;\n  width: calc(100% - 2rem);\n  background-color: var(--color-background);\n  padding: 0 1rem;\n  font-size: 0.875rem;\n  position: fixed;\n  top: 0;\n  transition: top 0.1s ease-in 0.1s;\n}\n\n.Breadcrumb ol:empty {\n  top: -3.0625rem;\n}\n\n.Breadcrumb li:not(:last-child)::after {\n  content: \">\";\n  margin-left: 1rem;\n}\n\n.Breadcrumb li:last-child a {\n  color: var(--color-text-subtle);\n}\n\n.Index {\n  line-height: 1.5;\n}\n\n.Counters {\n  border: var(--border);\n  border-radius: 0.25rem;\n  display: grid;\n  gap: 1rem 2rem;\n  margin-top: 1rem;\n  overflow: auto;\n  padding: 1rem;\n  grid-template-areas:\n    \"meta count count\"\n    \"stack stack stack\"\n    \"summary summary summary\";\n  grid-auto-columns: 1fr 2fr 1fr;\n}\n\n.Meta {\n  grid-area: meta;\n  display: grid;\n  grid-auto-rows: min-content;\n  grid-template-columns: repeat(2, max-content);\n  gap: 0.5rem;\n}\n\n.Stack {\n  grid-area: stack;\n  border-top: var(--border);\n  padding-top: 1rem;\n  gap: 0.5rem 1rem;\n  display: flex;\n  flex-direction: column;\n  width: 100%;\n}\n\n.Stack summary {\n  display: block;\n}\n\n.Stack details .Count-entry:first-child::before {\n  content: \"\u23F5\";\n}\n\n.Stack details[open] .Count-entry:first-child::before {\n  content: \"\u23F7\";\n}\n\n.Count {\n  grid-area: count;\n  display: grid;\n  flex-grow: 1;\n  grid-auto-rows: min-content;\n  grid-template-columns: repeat(auto-fill, minmax(12.5rem, 1fr));\n  gap: 0.5rem 1rem;\n}\n\n.Summary {\n  border-top: var(--border);\n  font-size: 0.875rem;\n  grid-area: summary;\n  line-height: 1.5;\n  padding-top: 1rem;\n}\n\n.Meta .unknown,\n.Count .unknown,\n.Stack .unknown {\n  color: var(--color-text-subtle);\n}\n\n.Count-entry {\n  display: flex;\n  gap: 0.25rem;\n  justify-content: space-between;\n}\n\n.Count-entry > span:nth-child(odd) {\n  overflow: hidden;\n  white-space: nowrap;\n}\n\n.Count-entry:not(.unknown) > span:nth-child(even) {\n  text-align: right;\n  color: var(--color-code-comment);\n}\n\n.Count-entry > span:nth-child(odd)::after {\n  content: \" ----------------------------------------------------------------------------------------------- \";\n  letter-spacing: 0.125rem;\n}\n\nh2::after {\n  content: \"\u23F7\";\n  padding-left: 0.5rem;\n}\n\nhtml[data-closed-sections*=\"index\"] h2#index::after,\nhtml[data-closed-sections*=\"config\"] h2#config::after,\nhtml[data-closed-sections*=\"files\"] h2#files::after,\nhtml[data-closed-sections*=\"charts\"] h2#charts::after,\nhtml[data-closed-sections*=\"reports\"] h2#reports::after {\n  content: \"\u23F5\";\n}\n\nhtml[data-closed-sections*=\"index\"] h2#index ~ *,\nhtml[data-closed-sections*=\"config\"] h2#config ~ *,\nhtml[data-closed-sections*=\"files\"] h2#files ~ *,\nhtml[data-closed-sections*=\"charts\"] h2#charts ~ *,\nhtml[data-closed-sections*=\"reports\"] h2#reports ~ * {\n  display: none;\n}\n\ndiv[data-chart-id] {\n  min-height: 16rem;\n}\n\n/* Fix tooltip background for dark theme */\nsvg g[aria-label=\"tip\"] g {\n  fill: var(--color-background);\n}\n"],
-  "mappings": ";AAWA,KACE,iBACA,8BAUF,KAvBA,SA+BA,KACE,cAQF,GACE,cAzCF,eAqDA,GACE,uBACA,SACA,iBAQF,IACE,gCACA,cAUF,EACE,6BAQF,YACE,mBACA,0BACA,iCAOF,SAEE,mBAQF,cAGE,gCACA,cAOF,MACE,cAQF,QAEE,cACA,cACA,kBACA,wBAGF,IACE,cAGF,IACE,UAUF,IACE,kBAWF,sCAKE,oBACA,eACA,iBAvKF,SAgLA,aAGE,iBAQF,cAGE,oBAOF,gDAIE,0BAOF,wHAIE,kBApNF,UA4NA,4GAIE,8BAOF,SAvOA,2BAkPA,OACE,sBACA,cACA,cACA,eAtPF,UAwPE,mBAOF,SACE,wBAOF,SACE,cAQF,6BAEE,sBAlRF,UA0RA,kFAEE,YAQF,cACE,6BACA,oBAOF,yCACE,wBAQF,6BACE,0BACA,aAUF,QACE,cAOF,QACE,kBAUF,SACE,aAOF,SACE,aCxVF,MAEE,kBACA,kBACA,kBACA,kBACA,kBACA,kBACA,kBACA,kBACA,kBACA,mBACA,sBACA,oBACA,qBACA,gBACA,sBACA,cACA,iBACA,uBACA,gBACA,sBACA,kBACA,iBACA,cACA,kBACA,wBAGA,wCACA,iCACA,0CACA,4CACA,4CACA,uDACA,uCACA,gDACA,4CACA,8BACA,4BACA,mCACA,oCACA,oCACA,mCAGA,uCACA,sCACA,iCACA,uCACA,kCACA,4CACA,iDACA,0DACA,yDACA,gEACA,uCACA,gDACA,4CACA,qDAGF,oCACE,gCACE,uCACA,kCACA,2CACA,8CACA,mDACA,uCACA,0CACA,sCACA,8BACA,4BACA,mCACA,mCACA,yCAGF,YACE,kBChFJ,KACE,yCACA,wBACA,sHAEA,eACA,mBAGF,EACE,mBACA,eAGF,GACE,YACA,4BAtBF,SAwBE,WAGF,uBAGE,oEACA,kBACA,kBAGF,kBAEE,kDACA,qBACA,mCACA,wBACA,gBAzCF,gBA2CE,WACA,gBAGF,6BAIE,aAGF,mBAGE,iCACA,qBAGF,QACE,iCACA,0BAGF,UACE,0BC7DF,YACE,mCACA,eACA,qBACA,kBAGF,oBACE,gBAGF,wEAEE,aAGF,wBACE,2BAGF,cACE,uCACA,qBACA,mCACA,wBACA,iBACA,wBACA,iBAjCF,cAmCE,kBACA,WACA,mBACA,YACA,YC5BF,MACE,6CACA,wBAGF,WAhBA,mBAoBA,SApBA,cAsBE,gBAtBF,eCQA,KACE,wBAGF,YACE,gBACA,MACA,aAGF,eACE,mBACA,4BACA,oBACA,SACA,gBACA,qBACA,mBACA,uBACA,gBACA,wBACA,yCA7BF,eA+BE,kBACA,eACA,MACA,+BAGF,qBACE,eAGF,sCACE,YACA,iBAGF,4BACE,+BAGF,OACE,gBAGF,UACE,qBAvDF,qBAyDE,aACA,cACA,gBACA,cA5DF,aA8DE,qFAIA,8BAGF,MACE,eACA,aACA,2BACA,4CACA,UAGF,OACE,gBACA,yBACA,iBACA,eACA,aACA,sBACA,WAGF,eACE,cAGF,+CACE,gBAGF,qDACE,gBAGF,OACE,gBACA,aACA,YACA,2BACA,4DACA,eAGF,SACE,yBACA,kBACA,kBACA,gBACA,iBAGF,+CAGE,+BAGF,aACE,aACA,WACA,8BAGF,iCACE,gBACA,mBAGF,gDACE,iBACA,gCAGF,uCACE,4GACA,uBAGF,SACE,gBACA,mBAGF,6PAKE,gBAGF,yOAKE,aAGF,mBACE,iBAIF,wBACE",
+  "sourcesContent": ["/* stylelint-disable */\n/*! normalize.css v8.0.1 | MIT License | github.com/necolas/normalize.css */\n\n/* Document\n   ========================================================================== */\n\n/**\n * 1. Correct the line height in all browsers.\n * 2. Prevent adjustments of font size after orientation changes in iOS.\n */\n\nhtml {\n  line-height: 1.15; /* 1 */\n  -webkit-text-size-adjust: 100%; /* 2 */\n}\n\n/* Sections\n   ========================================================================== */\n\n/**\n * Remove the margin in all browsers.\n */\n\nbody {\n  margin: 0;\n}\n\n/**\n * Render the `main` element consistently in IE.\n */\n\nmain {\n  display: block;\n}\n\n/**\n * Correct the font size and margin on `h1` elements within `section` and\n * `article` contexts in Chrome, Firefox, and Safari.\n */\n\nh1 {\n  font-size: 2em;\n  margin: 0.67em 0;\n}\n\n/* Grouping content\n   ========================================================================== */\n\n/**\n * 1. Add the correct box sizing in Firefox.\n * 2. Show the overflow in Edge and IE.\n */\n\nhr {\n  box-sizing: content-box; /* 1 */\n  height: 0; /* 1 */\n  overflow: visible; /* 2 */\n}\n\n/**\n * 1. Correct the inheritance and scaling of font size in all browsers.\n * 2. Correct the odd `em` font sizing in all browsers.\n */\n\npre {\n  font-family: monospace, monospace; /* 1 */\n  font-size: 1em; /* 2 */\n}\n\n/* Text-level semantics\n   ========================================================================== */\n\n/**\n * Remove the gray background on active links in IE 10.\n */\n\na {\n  background-color: transparent;\n}\n\n/**\n * 1. Remove the bottom border in Chrome 57-\n * 2. Add the correct text decoration in Chrome, Edge, IE, Opera, and Safari.\n */\n\nabbr[title] {\n  border-bottom: none; /* 1 */\n  text-decoration: underline; /* 2 */\n  text-decoration: underline dotted; /* 2 */\n}\n\n/**\n * Add the correct font weight in Chrome, Edge, and Safari.\n */\n\nb,\nstrong {\n  font-weight: bolder;\n}\n\n/**\n * 1. Correct the inheritance and scaling of font size in all browsers.\n * 2. Correct the odd `em` font sizing in all browsers.\n */\n\ncode,\nkbd,\nsamp {\n  font-family: monospace, monospace; /* 1 */\n  font-size: 1em; /* 2 */\n}\n\n/**\n * Add the correct font size in all browsers.\n */\n\nsmall {\n  font-size: 80%;\n}\n\n/**\n * Prevent `sub` and `sup` elements from affecting the line height in\n * all browsers.\n */\n\nsub,\nsup {\n  font-size: 75%;\n  line-height: 0;\n  position: relative;\n  vertical-align: baseline;\n}\n\nsub {\n  bottom: -0.25em;\n}\n\nsup {\n  top: -0.5em;\n}\n\n/* Embedded content\n   ========================================================================== */\n\n/**\n * Remove the border on images inside links in IE 10.\n */\n\nimg {\n  border-style: none;\n}\n\n/* Forms\n   ========================================================================== */\n\n/**\n * 1. Change the font styles in all browsers.\n * 2. Remove the margin in Firefox and Safari.\n */\n\nbutton,\ninput,\noptgroup,\nselect,\ntextarea {\n  font-family: inherit; /* 1 */\n  font-size: 100%; /* 1 */\n  line-height: 1.15; /* 1 */\n  margin: 0; /* 2 */\n}\n\n/**\n * Show the overflow in IE.\n * 1. Show the overflow in Edge.\n */\n\nbutton,\ninput {\n  /* 1 */\n  overflow: visible;\n}\n\n/**\n * Remove the inheritance of text transform in Edge, Firefox, and IE.\n * 1. Remove the inheritance of text transform in Firefox.\n */\n\nbutton,\nselect {\n  /* 1 */\n  text-transform: none;\n}\n\n/**\n * Correct the inability to style clickable types in iOS and Safari.\n */\n\nbutton,\n[type=\"button\"],\n[type=\"reset\"],\n[type=\"submit\"] {\n  -webkit-appearance: button;\n}\n\n/**\n * Remove the inner border and padding in Firefox.\n */\n\nbutton::-moz-focus-inner,\n[type=\"button\"]::-moz-focus-inner,\n[type=\"reset\"]::-moz-focus-inner,\n[type=\"submit\"]::-moz-focus-inner {\n  border-style: none;\n  padding: 0;\n}\n\n/**\n * Restore the focus styles unset by the previous rule.\n */\n\nbutton:-moz-focusring,\n[type=\"button\"]:-moz-focusring,\n[type=\"reset\"]:-moz-focusring,\n[type=\"submit\"]:-moz-focusring {\n  outline: 1px dotted ButtonText;\n}\n\n/**\n * Correct the padding in Firefox.\n */\n\nfieldset {\n  padding: 0.35em 0.75em 0.625em;\n}\n\n/**\n * 1. Correct the text wrapping in Edge and IE.\n * 2. Correct the color inheritance from `fieldset` elements in IE.\n * 3. Remove the padding so developers are not caught out when they zero out\n *    `fieldset` elements in all browsers.\n */\n\nlegend {\n  box-sizing: border-box; /* 1 */\n  color: inherit; /* 2 */\n  display: table; /* 1 */\n  max-width: 100%; /* 1 */\n  padding: 0; /* 3 */\n  white-space: normal; /* 1 */\n}\n\n/**\n * Add the correct vertical alignment in Chrome, Firefox, and Opera.\n */\n\nprogress {\n  vertical-align: baseline;\n}\n\n/**\n * Remove the default vertical scrollbar in IE 10+.\n */\n\ntextarea {\n  overflow: auto;\n}\n\n/**\n * 1. Add the correct box sizing in IE 10.\n * 2. Remove the padding in IE 10.\n */\n\n[type=\"checkbox\"],\n[type=\"radio\"] {\n  box-sizing: border-box; /* 1 */\n  padding: 0; /* 2 */\n}\n\n/**\n * Correct the cursor style of increment and decrement buttons in Chrome.\n */\n\n[type=\"number\"]::-webkit-inner-spin-button,\n[type=\"number\"]::-webkit-outer-spin-button {\n  height: auto;\n}\n\n/**\n * 1. Correct the odd appearance in Chrome and Safari.\n * 2. Correct the outline style in Safari.\n */\n\n[type=\"search\"] {\n  -webkit-appearance: textfield; /* 1 */\n  outline-offset: -2px; /* 2 */\n}\n\n/**\n * Remove the inner padding in Chrome and Safari on macOS.\n */\n\n[type=\"search\"]::-webkit-search-decoration {\n  -webkit-appearance: none;\n}\n\n/**\n * 1. Correct the inability to style clickable types in iOS and Safari.\n * 2. Change font properties to `inherit` in Safari.\n */\n\n::-webkit-file-upload-button {\n  -webkit-appearance: button; /* 1 */\n  font: inherit; /* 2 */\n}\n\n/* Interactive\n   ========================================================================== */\n\n/*\n * Add the correct display in Edge, IE 10+, and Firefox.\n */\n\ndetails {\n  display: block;\n}\n\n/*\n * Add the correct display in all browsers.\n */\n\nsummary {\n  display: list-item;\n}\n\n/* Misc\n   ========================================================================== */\n\n/**\n * Add the correct display in IE 10+.\n */\n\ntemplate {\n  display: none;\n}\n\n/**\n * Add the correct display in IE 10.\n */\n\n[hidden] {\n  display: none;\n}\n", "/*!\n * Copyright 2021 The Go Authors. All rights reserved.\n * Use of this source code is governed by a BSD-style\n * license that can be found in the LICENSE file.\n */\n\n:root {\n  /* Colors */\n  --gray-1: #202224;\n  --gray-2: #3e4042;\n  --gray-3: #555759;\n  --gray-4: #6e7072;\n  --gray-5: #848688;\n  --gray-6: #aaacae;\n  --gray-7: #c6c8ca;\n  --gray-8: #dcdee0;\n  --gray-9: #f0f1f2;\n  --gray-10: #f8f8f8;\n  --turq-light: #5dc9e2;\n  --turq-med: #50b7e0;\n  --turq-dark: #007d9c;\n  --blue: #bfeaf4;\n  --blue-light: #f2fafd;\n  --black: #000;\n  --green: #3a6e11;\n  --green-light: #5fda64;\n  --pink: #c85e7a;\n  --pink-light: #fdecf1;\n  --purple: #542c7d;\n  --slate: #253443; /* Footer background. */\n  --white: #fff;\n  --yellow: #fceea5;\n  --yellow-light: #fff8cc;\n\n  /* Color Intents */\n  --color-brand-primary: var(--turq-dark);\n  --color-background: var(--white);\n  --color-background-inverted: var(--slate);\n  --color-background-accented: var(--gray-10);\n  --color-background-highlighted: var(--blue);\n  --color-background-highlighted-link: var(--blue-light);\n  --color-background-info: var(--gray-9);\n  --color-background-warning: var(--yellow-light);\n  --color-background-alert: var(--pink-light);\n  --color-border: var(--gray-7);\n  --color-text: var(--gray-1);\n  --color-text-subtle: var(--gray-4);\n  --color-text-link: var(--turq-dark);\n  --color-text-inverted: var(--white);\n  --color-code-comment: var(--green);\n\n  /* Interactive Colors */\n  --color-input: var(--color-background);\n  --color-input-text: var(--color-text);\n  --color-button: var(--turq-dark);\n  --color-button-disabled: var(--gray-9);\n  --color-button-text: var(--white);\n  --color-button-text-disabled: var(--gray-3);\n  --color-button-inverted: var(--color-background);\n  --color-button-inverted-disabled: var(--color-background);\n  --color-button-inverted-text: var(--color-brand-primary);\n  --color-button-inverted-text-disabled: var(--color-text-subtle);\n  --color-button-accented: var(--yellow);\n  --color-button-accented-disabled: var(--gray-9);\n  --color-button-accented-text: var(--gray-1);\n  --color-button-accented-text-disabled: var(--gray-3);\n}\n\n@media (prefers-color-scheme: dark) {\n  :root:not([data-theme=\"light\"]) {\n    --color-brand-primary: var(--turq-med);\n    --color-background: var(--gray-1);\n    --color-background-accented: var(--gray-2);\n    --color-background-highlighted: var(--gray-2);\n    --color-background-highlighted-link: var(--gray-2);\n    --color-background-info: var(--gray-3);\n    --color-background-warning: var(--yellow);\n    --color-background-alert: var(--pink);\n    --color-border: var(--gray-4);\n    --color-text: var(--gray-9);\n    --color-text-link: var(--turq-med);\n    --color-text-subtle: var(--gray-7);\n    --color-code-comment: var(--green-light);\n  }\n\n  img.go-Icon {\n    filter: invert(1);\n  }\n}\n", "/*!\n * Copyright 2021 The Go Authors. All rights reserved.\n * Use of this source code is governed by a BSD-style\n * license that can be found in the LICENSE file.\n */\n\nbody {\n  background-color: var(--color-background);\n  color: var(--color-text);\n  font-family: -apple-system, BlinkMacSystemFont, \"Segoe UI\", Helvetica, Arial,\n    sans-serif, \"Apple Color Emoji\", \"Segoe UI Emoji\";\n  font-size: 1rem;\n  line-height: normal;\n}\n\np {\n  line-height: 1.4375;\n  max-width: 75ch;\n}\n\nhr {\n  border: none;\n  border-bottom: var(--border);\n  margin: 0;\n  width: 100%;\n}\n\ncode,\npre,\ntextarea.code {\n  font-family: SFMono-Regular, Consolas, \"Liberation Mono\", Menlo, monospace;\n  font-size: 0.875rem;\n  line-height: 1.5em;\n}\n\npre,\ntextarea.code {\n  background-color: var(--color-background-accented);\n  border: var(--border);\n  border-radius: var(--border-radius);\n  color: var(--color-text);\n  overflow-x: auto;\n  padding: 0.625rem;\n  tab-size: 4;\n  white-space: pre;\n}\n\nbutton,\ninput,\nselect,\ntextarea {\n  font: inherit;\n}\n\na,\na:link,\na:visited {\n  color: var(--color-brand-primary);\n  text-decoration: none;\n}\n\na:hover {\n  color: var(--color-brand-primary);\n  text-decoration: underline;\n}\n\na:hover > * {\n  text-decoration: underline;\n}\n", "/*!\n * Copyright 2021 The Go Authors. All rights reserved.\n * Use of this source code is governed by a BSD-style\n * license that can be found in the LICENSE file.\n */\n\n.go-Tooltip {\n  border-radius: var(--border-radius);\n  cursor: pointer;\n  display: inline-block;\n  position: relative;\n}\n\n.go-Tooltip > summary {\n  list-style: none;\n}\n\n.go-Tooltip > summary::-webkit-details-marker,\n.go-Tooltip > summary::marker {\n  display: none;\n}\n\n.go-Tooltip > summary > img {\n  vertical-align: text-bottom;\n}\n\n.go-Tooltip p {\n  background: var(--color-background) 80%;\n  border: var(--border);\n  border-radius: var(--border-radius);\n  color: var(--color-text);\n  font-size: 0.75rem;\n  letter-spacing: 0.0187rem;\n  line-height: 1rem;\n  padding: 0.5rem;\n  position: absolute;\n  top: 1.5rem;\n  white-space: normal;\n  width: 12rem;\n  z-index: 100;\n}\n", "/*!\n * Copyright 2023 The Go Authors. All rights reserved.\n * Use of this source code is governed by a BSD-style\n * license that can be found in the LICENSE file.\n */\n\n@import url(\"./_normalize.css\");\n@import url(\"./_color.css\");\n@import url(\"./_typography.css\");\n@import url(\"./_tooltip.css\");\n\n:root {\n  --border: 0.0625rem solid var(--color-border);\n  --border-radius: 0.25rem;\n}\n\n.Breadcrumb {\n  background-color: var(--color-background-accented);\n}\n.Breadcrumb ol {\n  list-style: none;\n  align-items: center;\n  padding: 0;\n  margin: 1.5rem 0;\n  display: inline-flex;\n}\n.Breadcrumb li {\n  display: flex;\n  font-size: 0.875rem;\n}\n.Breadcrumb li:not(:last-child):after {\n  /* TODO(rfindley): use this arrow instead, from go.dev */\n  /* background: url(\"arrow-forward.svg\") no-repeat; */\n  content: '>';\n  display: block;\n  height: 1rem;\n  margin: 0 0.8125rem;\n  width: 1rem;\n  text-align: center;\n}\n\n.Hero {\n  background-color: var(--color-background-accented);\n  padding: 1rem 0;\n}\n.Hero h1 {\n  font-size: 2.25rem;\n  font-weight: normal;\n  margin: 0;\n}\n\n.Container {\n  margin: 0 0 5rem;\n}\n\n.Content {\n  margin: 0 auto;\n  max-width: 64rem;\n  padding: 0 1rem;\n}\n", "/*!\n * Copyright 2023 The Go Authors. All rights reserved.\n * Use of this source code is governed by a BSD-style\n * license that can be found in the LICENSE file.\n */\n\n@import url(\"../shared/base.css\");\n\nhtml {\n  scroll-padding-top: 4rem;\n}\n\n/* TODO(rfindley): refactor to share breadcrumb logic with telemetry.go.dev */\n.ViewBreadcrumb {\n  position: sticky;\n  top: 0;\n  z-index: 1000;\n}\n\n.ViewBreadcrumb ol {\n  align-items: center;\n  border-bottom: var(--border);\n  display: inline-flex;\n  gap: 1rem;\n  list-style: none;\n  margin-block-start: 0;\n  margin-block-end: 0;\n  padding-inline-start: 0;\n  min-height: 3rem;\n  width: calc(100% - 2rem);\n  background-color: var(--color-background);\n  padding: 0 1rem;\n  font-size: 0.875rem;\n  position: fixed;\n  top: 0;\n  transition: top 0.1s ease-in 0.1s;\n}\n\n.ViewBreadcrumb ol:empty {\n  top: -3.0625rem;\n}\n\n.ViewBreadcrumb li:not(:last-child)::after {\n  content: \">\";\n  margin-left: 1rem;\n}\n\n.ViewBreadcrumb li:last-child a {\n  color: var(--color-text-subtle);\n}\n\n.Index {\n  line-height: 1.5;\n}\n\n.Counters {\n  border: var(--border);\n  border-radius: 0.25rem;\n  display: grid;\n  gap: 1rem 2rem;\n  margin-top: 1rem;\n  overflow: auto;\n  padding: 1rem;\n  grid-template-areas:\n    \"meta count count\"\n    \"stack stack stack\"\n    \"summary summary summary\";\n  grid-auto-columns: 1fr 2fr 1fr;\n}\n\n.Meta {\n  grid-area: meta;\n  display: grid;\n  grid-auto-rows: min-content;\n  grid-template-columns: repeat(2, max-content);\n  gap: 0.5rem;\n}\n\n.Stack {\n  grid-area: stack;\n  border-top: var(--border);\n  padding-top: 1rem;\n  gap: 0.5rem 1rem;\n  display: flex;\n  flex-direction: column;\n  width: 100%;\n}\n\n.Stack summary {\n  display: block;\n}\n\n.Stack details .Count-entry:first-child::before {\n  content: \"\u23F5\";\n}\n\n.Stack details[open] .Count-entry:first-child::before {\n  content: \"\u23F7\";\n}\n\n.Count {\n  grid-area: count;\n  display: grid;\n  flex-grow: 1;\n  grid-auto-rows: min-content;\n  grid-template-columns: repeat(auto-fill, minmax(12.5rem, 1fr));\n  gap: 0.5rem 1rem;\n}\n\n.Summary {\n  border-top: var(--border);\n  font-size: 0.875rem;\n  grid-area: summary;\n  line-height: 1.5;\n  padding-top: 1rem;\n}\n\n.Meta .unknown,\n.Count .unknown,\n.Stack .unknown {\n  color: var(--color-text-subtle);\n}\n\n.Count-entry {\n  display: flex;\n  gap: 0.25rem;\n  justify-content: space-between;\n}\n\n.Count-entry > span:nth-child(odd) {\n  overflow: hidden;\n  white-space: nowrap;\n}\n\n.Count-entry:not(.unknown) > span:nth-child(even) {\n  text-align: right;\n  color: var(--color-code-comment);\n}\n\n.Count-entry > span:nth-child(odd)::after {\n  content: \" ----------------------------------------------------------------------------------------------- \";\n  letter-spacing: 0.125rem;\n}\n\nh2::after {\n  content: \"\u23F7\";\n  padding-left: 0.5rem;\n}\n\nhtml[data-closed-sections*=\"index\"] h2#index::after,\nhtml[data-closed-sections*=\"config\"] h2#config::after,\nhtml[data-closed-sections*=\"files\"] h2#files::after,\nhtml[data-closed-sections*=\"charts\"] h2#charts::after,\nhtml[data-closed-sections*=\"reports\"] h2#reports::after {\n  content: \"\u23F5\";\n}\n\nhtml[data-closed-sections*=\"index\"] h2#index ~ *,\nhtml[data-closed-sections*=\"config\"] h2#config ~ *,\nhtml[data-closed-sections*=\"files\"] h2#files ~ *,\nhtml[data-closed-sections*=\"charts\"] h2#charts ~ *,\nhtml[data-closed-sections*=\"reports\"] h2#reports ~ * {\n  display: none;\n}\n\ndiv[data-chart-id] {\n  min-height: 16rem;\n}\n\n/* Fix tooltip background for dark theme */\nsvg g[aria-label=\"tip\"] g {\n  fill: var(--color-background);\n}\n"],
+  "mappings": ";AAWA,KACE,iBACA,8BAUF,KAvBA,SA+BA,KACE,cAQF,GACE,cAzCF,eAqDA,GACE,uBACA,SACA,iBAQF,IACE,gCACA,cAUF,EACE,6BAQF,YACE,mBACA,0BACA,iCAOF,SAEE,mBAQF,cAGE,gCACA,cAOF,MACE,cAQF,QAEE,cACA,cACA,kBACA,wBAGF,IACE,cAGF,IACE,UAUF,IACE,kBAWF,sCAKE,oBACA,eACA,iBAvKF,SAgLA,aAGE,iBAQF,cAGE,oBAOF,gDAIE,0BAOF,wHAIE,kBApNF,UA4NA,4GAIE,8BAOF,SAvOA,2BAkPA,OACE,sBACA,cACA,cACA,eAtPF,UAwPE,mBAOF,SACE,wBAOF,SACE,cAQF,6BAEE,sBAlRF,UA0RA,kFAEE,YAQF,cACE,6BACA,oBAOF,yCACE,wBAQF,6BACE,0BACA,aAUF,QACE,cAOF,QACE,kBAUF,SACE,aAOF,SACE,aCxVF,MAEE,kBACA,kBACA,kBACA,kBACA,kBACA,kBACA,kBACA,kBACA,kBACA,mBACA,sBACA,oBACA,qBACA,gBACA,sBACA,cACA,iBACA,uBACA,gBACA,sBACA,kBACA,iBACA,cACA,kBACA,wBAGA,wCACA,iCACA,0CACA,4CACA,4CACA,uDACA,uCACA,gDACA,4CACA,8BACA,4BACA,mCACA,oCACA,oCACA,mCAGA,uCACA,sCACA,iCACA,uCACA,kCACA,4CACA,iDACA,0DACA,yDACA,gEACA,uCACA,gDACA,4CACA,qDAGF,oCACE,gCACE,uCACA,kCACA,2CACA,8CACA,mDACA,uCACA,0CACA,sCACA,8BACA,4BACA,mCACA,mCACA,yCAGF,YACE,kBChFJ,KACE,yCACA,wBACA,sHAEA,eACA,mBAGF,EACE,mBACA,eAGF,GACE,YACA,4BAtBF,SAwBE,WAGF,uBAGE,oEACA,kBACA,kBAGF,kBAEE,kDACA,qBACA,mCACA,wBACA,gBAzCF,gBA2CE,WACA,gBAGF,6BAIE,aAGF,mBAGE,iCACA,qBAGF,QACE,iCACA,0BAGF,UACE,0BC7DF,YACE,mCACA,eACA,qBACA,kBAGF,oBACE,gBAGF,wEAEE,aAGF,wBACE,2BAGF,cACE,uCACA,qBACA,mCACA,wBACA,iBACA,wBACA,iBAjCF,cAmCE,kBACA,WACA,mBACA,YACA,YC5BF,MACE,6CACA,wBAGF,YACE,kDAEF,eACE,gBACA,mBArBF,0BAwBE,oBAEF,eACE,aACA,kBAEF,sCAGE,YACA,cACA,YAnCF,kBAqCE,WACA,kBAGF,MACE,kDA1CF,eA6CA,SACE,kBACA,gBA/CF,SAmDA,WAnDA,gBAuDA,SAvDA,cAyDE,gBAzDF,eCQA,KACE,wBAIF,gBACE,gBACA,MACA,aAGF,mBACE,mBACA,4BACA,oBACA,SACA,gBACA,qBACA,mBACA,uBACA,gBACA,wBACA,yCA9BF,eAgCE,kBACA,eACA,MACA,+BAGF,yBACE,eAGF,0CACE,YACA,iBAGF,gCACE,+BAGF,OACE,gBAGF,UACE,qBAxDF,qBA0DE,aACA,cACA,gBACA,cA7DF,aA+DE,qFAIA,8BAGF,MACE,eACA,aACA,2BACA,4CACA,UAGF,OACE,gBACA,yBACA,iBACA,eACA,aACA,sBACA,WAGF,eACE,cAGF,+CACE,gBAGF,qDACE,gBAGF,OACE,gBACA,aACA,YACA,2BACA,4DACA,eAGF,SACE,yBACA,kBACA,kBACA,gBACA,iBAGF,+CAGE,+BAGF,aACE,aACA,WACA,8BAGF,iCACE,gBACA,mBAGF,gDACE,iBACA,gCAGF,uCACE,4GACA,uBAGF,SACE,gBACA,mBAGF,6PAKE,gBAGF,yOAKE,aAGF,mBACE,iBAIF,wBACE",
   "names": []
 }
diff --git a/internal/content/gotelemetryview/static/index.min.js b/internal/content/gotelemetryview/static/index.min.js
index cf2170e..d50d346 100644
--- a/internal/content/gotelemetryview/static/index.min.js
+++ b/internal/content/gotelemetryview/static/index.min.js
@@ -1,10 +1,10 @@
 // Code generated by esbuild. DO NOT EDIT.
-"use strict";(()=>{function bt(t,e){return t==null||e==null?NaN:t<e?-1:t>e?1:t>=e?0:NaN}function xe(t,e){return t==null||e==null?NaN:e<t?-1:e>t?1:e>=t?0:NaN}function Fe(t){let e,n,r;t.length!==2?(e=bt,n=(f,u)=>bt(t(f),u),r=(f,u)=>t(f)-u):(e=t===bt||t===xe?t:Fy,n=t,r=t);function o(f,u,c=0,s=f.length){if(c<s){if(e(u,u)!==0)return s;do{let d=c+s>>>1;n(f[d],u)<0?c=d+1:s=d}while(c<s)}return c}function i(f,u,c=0,s=f.length){if(c<s){if(e(u,u)!==0)return s;do{let d=c+s>>>1;n(f[d],u)<=0?c=d+1:s=d}while(c<s)}return c}function a(f,u,c=0,s=f.length){let d=o(f,u,c,s-1);return d>c&&r(f[d-1],u)>-r(f[d],u)?d-1:d}return{left:o,center:a,right:i}}function Fy(){return 0}function Bo(t){return t===null?NaN:+t}function*Ep(t,e){if(e===void 0)for(let n of t)n!=null&&(n=+n)>=n&&(yield n);else{let n=-1;for(let r of t)(r=e(r,++n,t))!=null&&(r=+r)>=r&&(yield r)}}var Ip=Fe(bt),kp=Ip.right,qy=Ip.left,Yy=Fe(Bo).center,un=kp;function Jn(t,e){let n=0;if(e===void 0)for(let r of t)r!=null&&(r=+r)>=r&&++n;else{let r=-1;for(let o of t)(o=e(o,++r,t))!=null&&(o=+o)>=o&&++n}return n}function zy(t){return t.length|0}function By(t){return!(t>0)}function Uy(t){return typeof t!="object"||"length"in t?t:Array.from(t)}function Xy(t){return e=>t(...e)}function La(...t){let e=typeof t[t.length-1]=="function"&&Xy(t.pop());t=t.map(Uy);let n=t.map(zy),r=t.length-1,o=new Array(r+1).fill(0),i=[];if(r<0||n.some(By))return i;for(;;){i.push(o.map((f,u)=>t[u][f]));let a=r;for(;++o[a]===n[a];){if(a===0)return e?i.map(e):i;o[a--]=0}}}function Pa(t,e){var n=0,r=0;return Float64Array.from(t,e===void 0?o=>n+=+o||0:o=>n+=+e(o,r++,t)||0)}function Nr(t,e){let n=0,r,o=0,i=0;if(e===void 0)for(let a of t)a!=null&&(a=+a)>=a&&(r=a-o,o+=r/++n,i+=r*(a-o));else{let a=-1;for(let f of t)(f=e(f,++a,t))!=null&&(f=+f)>=f&&(r=f-o,o+=r/++n,i+=r*(f-o))}if(n>1)return i/(n-1)}function Rr(t,e){let n=Nr(t,e);return n&&Math.sqrt(n)}function Ct(t,e){let n,r;if(e===void 0)for(let o of t)o!=null&&(n===void 0?o>=o&&(n=r=o):(n>o&&(n=o),r<o&&(r=o)));else{let o=-1;for(let i of t)(i=e(i,++o,t))!=null&&(n===void 0?i>=i&&(n=r=i):(n>i&&(n=i),r<i&&(r=i)))}return[n,r]}var ae=class{constructor(){this._partials=new Float64Array(32),this._n=0}add(e){let n=this._partials,r=0;for(let o=0;o<this._n&&o<32;o++){let i=n[o],a=e+i,f=Math.abs(e)<Math.abs(i)?e-(a-i):i-(a-e);f&&(n[r++]=f),e=a}return n[r]=e,this._n=r+1,this}valueOf(){let e=this._partials,n=this._n,r,o,i,a=0;if(n>0){for(a=e[--n];n>0&&(r=a,o=e[--n],a=r+o,i=o-(a-r),!i););n>0&&(i<0&&e[n-1]<0||i>0&&e[n-1]>0)&&(o=i*2,r=a+o,o==r-a&&(a=r))}return a}};var Qt=class extends Map{constructor(e,n=Rp){if(super(),Object.defineProperties(this,{_intern:{value:new Map},_key:{value:n}}),e!=null)for(let[r,o]of e)this.set(r,o)}get(e){return super.get(os(this,e))}has(e){return super.has(os(this,e))}set(e,n){return super.set(Dp(this,e),n)}delete(e){return super.delete(Np(this,e))}},cn=class extends Set{constructor(e,n=Rp){if(super(),Object.defineProperties(this,{_intern:{value:new Map},_key:{value:n}}),e!=null)for(let r of e)this.add(r)}has(e){return super.has(os(this,e))}add(e){return super.add(Dp(this,e))}delete(e){return super.delete(Np(this,e))}};function os({_intern:t,_key:e},n){let r=e(n);return t.has(r)?t.get(r):n}function Dp({_intern:t,_key:e},n){let r=e(n);return t.has(r)?t.get(r):(t.set(r,n),n)}function Np({_intern:t,_key:e},n){let r=e(n);return t.has(r)&&(n=t.get(r),t.delete(r)),n}function Rp(t){return t!==null&&typeof t=="object"?t.valueOf():t}function Uo(t){return t}function sn(t,...e){return as(t,Uo,Uo,e)}function Ce(t,e,...n){return as(t,Uo,e,n)}function is(t,e,...n){return as(t,Array.from,e,n)}function as(t,e,n,r){return function o(i,a){if(a>=r.length)return n(i);let f=new Qt,u=r[a++],c=-1;for(let s of i){let d=u(s,++c,i),l=f.get(d);l?l.push(s):f.set(d,[s])}for(let[s,d]of f)f.set(s,o(d,a));return e(f)}(t,0)}function fs(t,e){return Array.from(e,n=>t[n])}function qe(t,...e){if(typeof t[Symbol.iterator]!="function")throw new TypeError("values is not iterable");t=Array.from(t);let[n]=e;if(n&&n.length!==2||e.length>1){let r=Uint32Array.from(t,(o,i)=>i);return e.length>1?(e=e.map(o=>t.map(o)),r.sort((o,i)=>{for(let a of e){let f=Xo(a[o],a[i]);if(f)return f}})):(n=t.map(n),r.sort((o,i)=>Xo(n[o],n[i]))),fs(t,r)}return t.sort(us(n))}function us(t=bt){if(t===bt)return Xo;if(typeof t!="function")throw new TypeError("compare is not a function");return(e,n)=>{let r=t(e,n);return r||r===0?r:(t(n,n)===0)-(t(e,e)===0)}}function Xo(t,e){return(t==null||!(t>=t))-(e==null||!(e>=e))||(t<e?-1:t>e?1:0)}function Lr(t,e,n){return(e.length!==2?qe(Ce(t,e,n),([r,o],[i,a])=>bt(o,a)||bt(r,i)):qe(sn(t,n),([r,o],[i,a])=>e(o,a)||bt(r,i))).map(([r])=>r)}var Wy=Math.sqrt(50),Hy=Math.sqrt(10),Gy=Math.sqrt(2);function Oa(t,e,n){let r=(e-t)/Math.max(0,n),o=Math.floor(Math.log10(r)),i=r/Math.pow(10,o),a=i>=Wy?10:i>=Hy?5:i>=Gy?2:1,f,u,c;return o<0?(c=Math.pow(10,-o)/a,f=Math.round(t*c),u=Math.round(e*c),f/c<t&&++f,u/c>e&&--u,c=-c):(c=Math.pow(10,o)*a,f=Math.round(t/c),u=Math.round(e/c),f*c<t&&++f,u*c>e&&--u),u<f&&.5<=n&&n<2?Oa(t,e,n*2):[f,u,c]}function Ae(t,e,n){if(e=+e,t=+t,n=+n,!(n>0))return[];if(t===e)return[t];let r=e<t,[o,i,a]=r?Oa(e,t,n):Oa(t,e,n);if(!(i>=o))return[];let f=i-o+1,u=new Array(f);if(r)if(a<0)for(let c=0;c<f;++c)u[c]=(i-c)/-a;else for(let c=0;c<f;++c)u[c]=(i-c)*a;else if(a<0)for(let c=0;c<f;++c)u[c]=(o+c)/-a;else for(let c=0;c<f;++c)u[c]=(o+c)*a;return u}function tr(t,e,n){return e=+e,t=+t,n=+n,Oa(t,e,n)[2]}function Pr(t,e,n){e=+e,t=+t,n=+n;let r=e<t,o=r?tr(e,t,n):tr(t,e,n);return(r?-1:1)*(o<0?1/-o:o)}function Fa(t){return Math.max(1,Math.ceil(Math.log(Jn(t))/Math.LN2)+1)}function Wt(t,e){let n;if(e===void 0)for(let r of t)r!=null&&(n<r||n===void 0&&r>=r)&&(n=r);else{let r=-1;for(let o of t)(o=e(o,++r,t))!=null&&(n<o||n===void 0&&o>=o)&&(n=o)}return n}function qa(t,e){let n,r=-1,o=-1;if(e===void 0)for(let i of t)++o,i!=null&&(n<i||n===void 0&&i>=i)&&(n=i,r=o);else for(let i of t)(i=e(i,++o,t))!=null&&(n<i||n===void 0&&i>=i)&&(n=i,r=o);return r}function Jt(t,e){let n;if(e===void 0)for(let r of t)r!=null&&(n>r||n===void 0&&r>=r)&&(n=r);else{let r=-1;for(let o of t)(o=e(o,++r,t))!=null&&(n>o||n===void 0&&o>=o)&&(n=o)}return n}function Ya(t,e){let n,r=-1,o=-1;if(e===void 0)for(let i of t)++o,i!=null&&(n>i||n===void 0&&i>=i)&&(n=i,r=o);else for(let i of t)(i=e(i,++o,t))!=null&&(n>i||n===void 0&&i>=i)&&(n=i,r=o);return r}function za(t,e,n=0,r=1/0,o){if(e=Math.floor(e),n=Math.floor(Math.max(0,n)),r=Math.floor(Math.min(t.length-1,r)),!(n<=e&&e<=r))return t;for(o=o===void 0?Xo:us(o);r>n;){if(r-n>600){let u=r-n+1,c=e-n+1,s=Math.log(u),d=.5*Math.exp(2*s/3),l=.5*Math.sqrt(s*d*(u-d)/u)*(c-u/2<0?-1:1),p=Math.max(n,Math.floor(e-c*d/u+l)),m=Math.min(r,Math.floor(e+(u-c)*d/u+l));za(t,e,p,m,o)}let i=t[e],a=n,f=r;for(Wo(t,n,e),o(t[r],i)>0&&Wo(t,n,r);a<f;){for(Wo(t,a,f),++a,--f;o(t[a],i)<0;)++a;for(;o(t[f],i)>0;)--f}o(t[n],i)===0?Wo(t,n,f):(++f,Wo(t,f,r)),f<=e&&(n=f+1),e<=f&&(r=f-1)}return t}function Wo(t,e,n){let r=t[e];t[e]=t[n],t[n]=r}function Ho(t,e=bt){let n,r=!1;if(e.length===1){let o;for(let i of t){let a=e(i);(r?bt(a,o)>0:bt(a,a)===0)&&(n=i,o=a,r=!0)}}else for(let o of t)(r?e(o,n)>0:e(o,o)===0)&&(n=o,r=!0);return n}function ye(t,e,n){if(t=Float64Array.from(Ep(t,n)),!(!(r=t.length)||isNaN(e=+e))){if(e<=0||r<2)return Jt(t);if(e>=1)return Wt(t);var r,o=(r-1)*e,i=Math.floor(o),a=Wt(za(t,i).subarray(0,i+1)),f=Jt(t.subarray(i+1));return a+(f-a)*(o-i)}}function cs(t,e,n=Bo){if(!(!(r=t.length)||isNaN(e=+e))){if(e<=0||r<2)return+n(t[0],0,t);if(e>=1)return+n(t[r-1],r-1,t);var r,o=(r-1)*e,i=Math.floor(o),a=+n(t[i],i,t),f=+n(t[i+1],i+1,t);return a+(f-a)*(o-i)}}function Ba(t,e,n){let r=Jn(t),o=ye(t,.75)-ye(t,.25);return r&&o?Math.ceil((n-e)/(2*o*Math.pow(r,-1/3))):1}function Go(t,e,n){let r=Jn(t),o=Rr(t);return r&&o?Math.ceil((n-e)*Math.cbrt(r)/(3.49*o)):1}function Ua(t,e){let n=0,r=0;if(e===void 0)for(let o of t)o!=null&&(o=+o)>=o&&(++n,r+=o);else{let o=-1;for(let i of t)(i=e(i,++o,t))!=null&&(i=+i)>=i&&(++n,r+=i)}if(n)return r/n}function ln(t,e){return ye(t,.5,e)}function*jy(t){for(let e of t)yield*e}function Or(t){return Array.from(jy(t))}function Xa(t,e){let n=new Qt;if(e===void 0)for(let i of t)i!=null&&i>=i&&n.set(i,(n.get(i)||0)+1);else{let i=-1;for(let a of t)(a=e(a,++i,t))!=null&&a>=a&&n.set(a,(n.get(a)||0)+1)}let r,o=0;for(let[i,a]of n)a>o&&(o=a,r=i);return r}function Wa(t,e=Zy){let n=[],r,o=!1;for(let i of t)o&&n.push(e(r,i)),r=i,o=!0;return n}function Zy(t,e){return[t,e]}function er(t,e,n){t=+t,e=+e,n=(o=arguments.length)<2?(e=t,t=0,1):o<3?1:+n;for(var r=-1,o=Math.max(0,Math.ceil((e-t)/n))|0,i=new Array(o);++r<o;)i[r]=t+r*n;return i}function fe(t,e){let n=0;if(e===void 0)for(let r of t)(r=+r)&&(n+=r);else{let r=-1;for(let o of t)(o=+e(o,++r,t))&&(n+=o)}return n}function $n(t){if(typeof t[Symbol.iterator]!="function")throw new TypeError("values is not iterable");return Array.from(t).reverse()}function Lp(t){return t}var ss=1,ls=2,ds=3,Ha=4,Pp=1e-6;function Ky(t){return"translate("+t+",0)"}function Qy(t){return"translate(0,"+t+")"}function Jy(t){return e=>+t(e)}function tb(t,e){return e=Math.max(0,t.bandwidth()-e*2)/2,t.round()&&(e=Math.round(e)),n=>+t(n)+e}function eb(){return!this.__axis}function nb(t,e){var n=[],r=null,o=null,i=6,a=6,f=3,u=typeof window<"u"&&window.devicePixelRatio>1?0:.5,c=t===ss||t===Ha?-1:1,s=t===Ha||t===ls?"x":"y",d=t===ss||t===ds?Ky:Qy;function l(p){var m=r??(e.ticks?e.ticks.apply(e,n):e.domain()),h=o??(e.tickFormat?e.tickFormat.apply(e,n):Lp),g=Math.max(i,0)+f,b=e.range(),x=+b[0]+u,M=+b[b.length-1]+u,y=(e.bandwidth?tb:Jy)(e.copy(),u),w=p.selection?p.selection():p,v=w.selectAll(".domain").data([null]),T=w.selectAll(".tick").data(m,e).order(),E=T.exit(),I=T.enter().append("g").attr("class","tick"),D=T.select("line"),_=T.select("text");v=v.merge(v.enter().insert("path",".tick").attr("class","domain").attr("stroke","currentColor")),T=T.merge(I),D=D.merge(I.append("line").attr("stroke","currentColor").attr(s+"2",c*i)),_=_.merge(I.append("text").attr("fill","currentColor").attr(s,c*g).attr("dy",t===ss?"0em":t===ds?"0.71em":"0.32em")),p!==w&&(v=v.transition(p),T=T.transition(p),D=D.transition(p),_=_.transition(p),E=E.transition(p).attr("opacity",Pp).attr("transform",function(L){return isFinite(L=y(L))?d(L+u):this.getAttribute("transform")}),I.attr("opacity",Pp).attr("transform",function(L){var F=this.parentNode.__axis;return d((F&&isFinite(F=F(L))?F:y(L))+u)})),E.remove(),v.attr("d",t===Ha||t===ls?a?"M"+c*a+","+x+"H"+u+"V"+M+"H"+c*a:"M"+u+","+x+"V"+M:a?"M"+x+","+c*a+"V"+u+"H"+M+"V"+c*a:"M"+x+","+u+"H"+M),T.attr("opacity",1).attr("transform",function(L){return d(y(L)+u)}),D.attr(s+"2",c*i),_.attr(s,c*g).text(h),w.filter(eb).attr("fill","none").attr("font-size",10).attr("font-family","sans-serif").attr("text-anchor",t===ls?"start":t===Ha?"end":"middle"),w.each(function(){this.__axis=y})}return l.scale=function(p){return arguments.length?(e=p,l):e},l.ticks=function(){return n=Array.from(arguments),l},l.tickArguments=function(p){return arguments.length?(n=p==null?[]:Array.from(p),l):n.slice()},l.tickValues=function(p){return arguments.length?(r=p==null?null:Array.from(p),l):r&&r.slice()},l.tickFormat=function(p){return arguments.length?(o=p,l):o},l.tickSize=function(p){return arguments.length?(i=a=+p,l):i},l.tickSizeInner=function(p){return arguments.length?(i=+p,l):i},l.tickSizeOuter=function(p){return arguments.length?(a=+p,l):a},l.tickPadding=function(p){return arguments.length?(f=+p,l):f},l.offset=function(p){return arguments.length?(u=+p,l):u},l}function ps(t){return nb(ds,t)}var rb={value:()=>{}};function Fp(){for(var t=0,e=arguments.length,n={},r;t<e;++t){if(!(r=arguments[t]+"")||r in n||/[\s.]/.test(r))throw new Error("illegal type: "+r);n[r]=[]}return new Ga(n)}function Ga(t){this._=t}function ob(t,e){return t.trim().split(/^|\s+/).map(function(n){var r="",o=n.indexOf(".");if(o>=0&&(r=n.slice(o+1),n=n.slice(0,o)),n&&!e.hasOwnProperty(n))throw new Error("unknown type: "+n);return{type:n,name:r}})}Ga.prototype=Fp.prototype={constructor:Ga,on:function(t,e){var n=this._,r=ob(t+"",n),o,i=-1,a=r.length;if(arguments.length<2){for(;++i<a;)if((o=(t=r[i]).type)&&(o=ib(n[o],t.name)))return o;return}if(e!=null&&typeof e!="function")throw new Error("invalid callback: "+e);for(;++i<a;)if(o=(t=r[i]).type)n[o]=Op(n[o],t.name,e);else if(e==null)for(o in n)n[o]=Op(n[o],t.name,null);return this},copy:function(){var t={},e=this._;for(var n in e)t[n]=e[n].slice();return new Ga(t)},call:function(t,e){if((o=arguments.length-2)>0)for(var n=new Array(o),r=0,o,i;r<o;++r)n[r]=arguments[r+2];if(!this._.hasOwnProperty(t))throw new Error("unknown type: "+t);for(i=this._[t],r=0,o=i.length;r<o;++r)i[r].value.apply(e,n)},apply:function(t,e,n){if(!this._.hasOwnProperty(t))throw new Error("unknown type: "+t);for(var r=this._[t],o=0,i=r.length;o<i;++o)r[o].value.apply(e,n)}};function ib(t,e){for(var n=0,r=t.length,o;n<r;++n)if((o=t[n]).name===e)return o.value}function Op(t,e,n){for(var r=0,o=t.length;r<o;++r)if(t[r].name===e){t[r]=rb,t=t.slice(0,r).concat(t.slice(r+1));break}return n!=null&&t.push({name:e,value:n}),t}var ms=Fp;var Va="http://www.w3.org/1999/xhtml",Ye={svg:"http://www.w3.org/2000/svg",xhtml:Va,xlink:"http://www.w3.org/1999/xlink",xml:"http://www.w3.org/XML/1998/namespace",xmlns:"http://www.w3.org/2000/xmlns/"};function dn(t){var e=t+="",n=e.indexOf(":");return n>=0&&(e=t.slice(0,n))!=="xmlns"&&(t=t.slice(n+1)),Ye.hasOwnProperty(e)?{space:Ye[e],local:t}:t}function ab(t){return function(){var e=this.ownerDocument,n=this.namespaceURI;return n===Va&&e.documentElement.namespaceURI===Va?e.createElement(t):e.createElementNS(n,t)}}function fb(t){return function(){return this.ownerDocument.createElementNS(t.space,t.local)}}function pn(t){var e=dn(t);return(e.local?fb:ab)(e)}function ub(){}function nr(t){return t==null?ub:function(){return this.querySelector(t)}}function qp(t){typeof t!="function"&&(t=nr(t));for(var e=this._groups,n=e.length,r=new Array(n),o=0;o<n;++o)for(var i=e[o],a=i.length,f=r[o]=new Array(a),u,c,s=0;s<a;++s)(u=i[s])&&(c=t.call(u,u.__data__,s,i))&&("__data__"in u&&(c.__data__=u.__data__),f[s]=c);return new vt(r,this._parents)}function hs(t){return t==null?[]:Array.isArray(t)?t:Array.from(t)}function cb(){return[]}function Vo(t){return t==null?cb:function(){return this.querySelectorAll(t)}}function sb(t){return function(){return hs(t.apply(this,arguments))}}function Yp(t){typeof t=="function"?t=sb(t):t=Vo(t);for(var e=this._groups,n=e.length,r=[],o=[],i=0;i<n;++i)for(var a=e[i],f=a.length,u,c=0;c<f;++c)(u=a[c])&&(r.push(t.call(u,u.__data__,c,a)),o.push(u));return new vt(r,o)}function jo(t){return function(){return this.matches(t)}}function ja(t){return function(e){return e.matches(t)}}var lb=Array.prototype.find;function db(t){return function(){return lb.call(this.children,t)}}function pb(){return this.firstElementChild}function zp(t){return this.select(t==null?pb:db(typeof t=="function"?t:ja(t)))}var mb=Array.prototype.filter;function hb(){return Array.from(this.children)}function gb(t){return function(){return mb.call(this.children,t)}}function Bp(t){return this.selectAll(t==null?hb:gb(typeof t=="function"?t:ja(t)))}function Up(t){typeof t!="function"&&(t=jo(t));for(var e=this._groups,n=e.length,r=new Array(n),o=0;o<n;++o)for(var i=e[o],a=i.length,f=r[o]=[],u,c=0;c<a;++c)(u=i[c])&&t.call(u,u.__data__,c,i)&&f.push(u);return new vt(r,this._parents)}function Za(t){return new Array(t.length)}function Xp(){return new vt(this._enter||this._groups.map(Za),this._parents)}function Zo(t,e){this.ownerDocument=t.ownerDocument,this.namespaceURI=t.namespaceURI,this._next=null,this._parent=t,this.__data__=e}Zo.prototype={constructor:Zo,appendChild:function(t){return this._parent.insertBefore(t,this._next)},insertBefore:function(t,e){return this._parent.insertBefore(t,e)},querySelector:function(t){return this._parent.querySelector(t)},querySelectorAll:function(t){return this._parent.querySelectorAll(t)}};function Wp(t){return function(){return t}}function xb(t,e,n,r,o,i){for(var a=0,f,u=e.length,c=i.length;a<c;++a)(f=e[a])?(f.__data__=i[a],r[a]=f):n[a]=new Zo(t,i[a]);for(;a<u;++a)(f=e[a])&&(o[a]=f)}function yb(t,e,n,r,o,i,a){var f,u,c=new Map,s=e.length,d=i.length,l=new Array(s),p;for(f=0;f<s;++f)(u=e[f])&&(l[f]=p=a.call(u,u.__data__,f,e)+"",c.has(p)?o[f]=u:c.set(p,u));for(f=0;f<d;++f)p=a.call(t,i[f],f,i)+"",(u=c.get(p))?(r[f]=u,u.__data__=i[f],c.delete(p)):n[f]=new Zo(t,i[f]);for(f=0;f<s;++f)(u=e[f])&&c.get(l[f])===u&&(o[f]=u)}function bb(t){return t.__data__}function Hp(t,e){if(!arguments.length)return Array.from(this,bb);var n=e?yb:xb,r=this._parents,o=this._groups;typeof t!="function"&&(t=Wp(t));for(var i=o.length,a=new Array(i),f=new Array(i),u=new Array(i),c=0;c<i;++c){var s=r[c],d=o[c],l=d.length,p=wb(t.call(s,s&&s.__data__,c,r)),m=p.length,h=f[c]=new Array(m),g=a[c]=new Array(m),b=u[c]=new Array(l);n(s,d,h,g,b,p,e);for(var x=0,M=0,y,w;x<m;++x)if(y=h[x]){for(x>=M&&(M=x+1);!(w=g[M])&&++M<m;);y._next=w||null}}return a=new vt(a,r),a._enter=f,a._exit=u,a}function wb(t){return typeof t=="object"&&"length"in t?t:Array.from(t)}function Gp(){return new vt(this._exit||this._groups.map(Za),this._parents)}function Vp(t,e,n){var r=this.enter(),o=this,i=this.exit();return typeof t=="function"?(r=t(r),r&&(r=r.selection())):r=r.append(t+""),e!=null&&(o=e(o),o&&(o=o.selection())),n==null?i.remove():n(i),r&&o?r.merge(o).order():o}function jp(t){for(var e=t.selection?t.selection():t,n=this._groups,r=e._groups,o=n.length,i=r.length,a=Math.min(o,i),f=new Array(o),u=0;u<a;++u)for(var c=n[u],s=r[u],d=c.length,l=f[u]=new Array(d),p,m=0;m<d;++m)(p=c[m]||s[m])&&(l[m]=p);for(;u<o;++u)f[u]=n[u];return new vt(f,this._parents)}function Zp(){for(var t=this._groups,e=-1,n=t.length;++e<n;)for(var r=t[e],o=r.length-1,i=r[o],a;--o>=0;)(a=r[o])&&(i&&a.compareDocumentPosition(i)^4&&i.parentNode.insertBefore(a,i),i=a);return this}function Kp(t){t||(t=vb);function e(d,l){return d&&l?t(d.__data__,l.__data__):!d-!l}for(var n=this._groups,r=n.length,o=new Array(r),i=0;i<r;++i){for(var a=n[i],f=a.length,u=o[i]=new Array(f),c,s=0;s<f;++s)(c=a[s])&&(u[s]=c);u.sort(e)}return new vt(o,this._parents).order()}function vb(t,e){return t<e?-1:t>e?1:t>=e?0:NaN}function Qp(){var t=arguments[0];return arguments[0]=this,t.apply(null,arguments),this}function Jp(){return Array.from(this)}function tm(){for(var t=this._groups,e=0,n=t.length;e<n;++e)for(var r=t[e],o=0,i=r.length;o<i;++o){var a=r[o];if(a)return a}return null}function em(){let t=0;for(let e of this)++t;return t}function nm(){return!this.node()}function rm(t){for(var e=this._groups,n=0,r=e.length;n<r;++n)for(var o=e[n],i=0,a=o.length,f;i<a;++i)(f=o[i])&&t.call(f,f.__data__,i,o);return this}function Mb(t){return function(){this.removeAttribute(t)}}function Sb(t){return function(){this.removeAttributeNS(t.space,t.local)}}function Tb(t,e){return function(){this.setAttribute(t,e)}}function _b(t,e){return function(){this.setAttributeNS(t.space,t.local,e)}}function Cb(t,e){return function(){var n=e.apply(this,arguments);n==null?this.removeAttribute(t):this.setAttribute(t,n)}}function Ab(t,e){return function(){var n=e.apply(this,arguments);n==null?this.removeAttributeNS(t.space,t.local):this.setAttributeNS(t.space,t.local,n)}}function om(t,e){var n=dn(t);if(arguments.length<2){var r=this.node();return n.local?r.getAttributeNS(n.space,n.local):r.getAttribute(n)}return this.each((e==null?n.local?Sb:Mb:typeof e=="function"?n.local?Ab:Cb:n.local?_b:Tb)(n,e))}function Ka(t){return t.ownerDocument&&t.ownerDocument.defaultView||t.document&&t||t.defaultView}function $b(t){return function(){this.style.removeProperty(t)}}function Eb(t,e,n){return function(){this.style.setProperty(t,e,n)}}function Ib(t,e,n){return function(){var r=e.apply(this,arguments);r==null?this.style.removeProperty(t):this.style.setProperty(t,r,n)}}function im(t,e,n){return arguments.length>1?this.each((e==null?$b:typeof e=="function"?Ib:Eb)(t,e,n??"")):En(this.node(),t)}function En(t,e){return t.style.getPropertyValue(e)||Ka(t).getComputedStyle(t,null).getPropertyValue(e)}function kb(t){return function(){delete this[t]}}function Db(t,e){return function(){this[t]=e}}function Nb(t,e){return function(){var n=e.apply(this,arguments);n==null?delete this[t]:this[t]=n}}function am(t,e){return arguments.length>1?this.each((e==null?kb:typeof e=="function"?Nb:Db)(t,e)):this.node()[t]}function fm(t){return t.trim().split(/^|\s+/)}function gs(t){return t.classList||new um(t)}function um(t){this._node=t,this._names=fm(t.getAttribute("class")||"")}um.prototype={add:function(t){var e=this._names.indexOf(t);e<0&&(this._names.push(t),this._node.setAttribute("class",this._names.join(" ")))},remove:function(t){var e=this._names.indexOf(t);e>=0&&(this._names.splice(e,1),this._node.setAttribute("class",this._names.join(" ")))},contains:function(t){return this._names.indexOf(t)>=0}};function cm(t,e){for(var n=gs(t),r=-1,o=e.length;++r<o;)n.add(e[r])}function sm(t,e){for(var n=gs(t),r=-1,o=e.length;++r<o;)n.remove(e[r])}function Rb(t){return function(){cm(this,t)}}function Lb(t){return function(){sm(this,t)}}function Pb(t,e){return function(){(e.apply(this,arguments)?cm:sm)(this,t)}}function lm(t,e){var n=fm(t+"");if(arguments.length<2){for(var r=gs(this.node()),o=-1,i=n.length;++o<i;)if(!r.contains(n[o]))return!1;return!0}return this.each((typeof e=="function"?Pb:e?Rb:Lb)(n,e))}function Ob(){this.textContent=""}function Fb(t){return function(){this.textContent=t}}function qb(t){return function(){var e=t.apply(this,arguments);this.textContent=e??""}}function dm(t){return arguments.length?this.each(t==null?Ob:(typeof t=="function"?qb:Fb)(t)):this.node().textContent}function Yb(){this.innerHTML=""}function zb(t){return function(){this.innerHTML=t}}function Bb(t){return function(){var e=t.apply(this,arguments);this.innerHTML=e??""}}function pm(t){return arguments.length?this.each(t==null?Yb:(typeof t=="function"?Bb:zb)(t)):this.node().innerHTML}function Ub(){this.nextSibling&&this.parentNode.appendChild(this)}function mm(){return this.each(Ub)}function Xb(){this.previousSibling&&this.parentNode.insertBefore(this,this.parentNode.firstChild)}function hm(){return this.each(Xb)}function gm(t){var e=typeof t=="function"?t:pn(t);return this.select(function(){return this.appendChild(e.apply(this,arguments))})}function Wb(){return null}function xm(t,e){var n=typeof t=="function"?t:pn(t),r=e==null?Wb:typeof e=="function"?e:nr(e);return this.select(function(){return this.insertBefore(n.apply(this,arguments),r.apply(this,arguments)||null)})}function Hb(){var t=this.parentNode;t&&t.removeChild(this)}function ym(){return this.each(Hb)}function Gb(){var t=this.cloneNode(!1),e=this.parentNode;return e?e.insertBefore(t,this.nextSibling):t}function Vb(){var t=this.cloneNode(!0),e=this.parentNode;return e?e.insertBefore(t,this.nextSibling):t}function bm(t){return this.select(t?Vb:Gb)}function wm(t){return arguments.length?this.property("__data__",t):this.node().__data__}function jb(t){return function(e){t.call(this,e,this.__data__)}}function Zb(t){return t.trim().split(/^|\s+/).map(function(e){var n="",r=e.indexOf(".");return r>=0&&(n=e.slice(r+1),e=e.slice(0,r)),{type:e,name:n}})}function Kb(t){return function(){var e=this.__on;if(e){for(var n=0,r=-1,o=e.length,i;n<o;++n)i=e[n],(!t.type||i.type===t.type)&&i.name===t.name?this.removeEventListener(i.type,i.listener,i.options):e[++r]=i;++r?e.length=r:delete this.__on}}}function Qb(t,e,n){return function(){var r=this.__on,o,i=jb(e);if(r){for(var a=0,f=r.length;a<f;++a)if((o=r[a]).type===t.type&&o.name===t.name){this.removeEventListener(o.type,o.listener,o.options),this.addEventListener(o.type,o.listener=i,o.options=n),o.value=e;return}}this.addEventListener(t.type,i,n),o={type:t.type,name:t.name,value:e,listener:i,options:n},r?r.push(o):this.__on=[o]}}function vm(t,e,n){var r=Zb(t+""),o,i=r.length,a;if(arguments.length<2){var f=this.node().__on;if(f){for(var u=0,c=f.length,s;u<c;++u)for(o=0,s=f[u];o<i;++o)if((a=r[o]).type===s.type&&a.name===s.name)return s.value}return}for(f=e?Qb:Kb,o=0;o<i;++o)this.each(f(r[o],e,n));return this}function Mm(t,e,n){var r=Ka(t),o=r.CustomEvent;typeof o=="function"?o=new o(e,n):(o=r.document.createEvent("Event"),n?(o.initEvent(e,n.bubbles,n.cancelable),o.detail=n.detail):o.initEvent(e,!1,!1)),t.dispatchEvent(o)}function Jb(t,e){return function(){return Mm(this,t,e)}}function t2(t,e){return function(){return Mm(this,t,e.apply(this,arguments))}}function Sm(t,e){return this.each((typeof e=="function"?t2:Jb)(t,e))}function*Tm(){for(var t=this._groups,e=0,n=t.length;e<n;++e)for(var r=t[e],o=0,i=r.length,a;o<i;++o)(a=r[o])&&(yield a)}var xs=[null];function vt(t,e){this._groups=t,this._parents=e}function _m(){return new vt([[document.documentElement]],xs)}function e2(){return this}vt.prototype=_m.prototype={constructor:vt,select:qp,selectAll:Yp,selectChild:zp,selectChildren:Bp,filter:Up,data:Hp,enter:Xp,exit:Gp,join:Vp,merge:jp,selection:e2,order:Zp,sort:Kp,call:Qp,nodes:Jp,node:tm,size:em,empty:nm,each:rm,attr:om,style:im,property:am,classed:lm,text:dm,html:pm,raise:mm,lower:hm,append:gm,insert:xm,remove:ym,clone:bm,datum:wm,on:vm,dispatch:Sm,[Symbol.iterator]:Tm};var mn=_m;function hn(t){return typeof t=="string"?new vt([[document.querySelector(t)]],[document.documentElement]):new vt([[t]],xs)}function Cm(t){let e;for(;e=t.sourceEvent;)t=e;return t}function ys(t,e){if(t=Cm(t),e===void 0&&(e=t.currentTarget),e){var n=e.ownerSVGElement||e;if(n.createSVGPoint){var r=n.createSVGPoint();return r.x=t.clientX,r.y=t.clientY,r=r.matrixTransform(e.getScreenCTM().inverse()),[r.x,r.y]}if(e.getBoundingClientRect){var o=e.getBoundingClientRect();return[t.clientX-o.left-e.clientLeft,t.clientY-o.top-e.clientTop]}}return[t.pageX,t.pageY]}function gn(t,e,n){t.prototype=e.prototype=n,n.constructor=t}function In(t,e){var n=Object.create(t.prototype);for(var r in e)n[r]=e[r];return n}function Be(){}var kn=.7,ir=1/kn,Fr="\\s*([+-]?\\d+)\\s*",Ko="\\s*([+-]?(?:\\d*\\.)?\\d+(?:[eE][+-]?\\d+)?)\\s*",ze="\\s*([+-]?(?:\\d*\\.)?\\d+(?:[eE][+-]?\\d+)?)%\\s*",n2=/^#([0-9a-f]{3,8})$/,r2=new RegExp(`^rgb\\(${Fr},${Fr},${Fr}\\)$`),o2=new RegExp(`^rgb\\(${ze},${ze},${ze}\\)$`),i2=new RegExp(`^rgba\\(${Fr},${Fr},${Fr},${Ko}\\)$`),a2=new RegExp(`^rgba\\(${ze},${ze},${ze},${Ko}\\)$`),f2=new RegExp(`^hsl\\(${Ko},${ze},${ze}\\)$`),u2=new RegExp(`^hsla\\(${Ko},${ze},${ze},${Ko}\\)$`),Am={aliceblue:15792383,antiquewhite:16444375,aqua:65535,aquamarine:8388564,azure:15794175,beige:16119260,bisque:16770244,black:0,blanchedalmond:16772045,blue:255,blueviolet:9055202,brown:10824234,burlywood:14596231,cadetblue:6266528,chartreuse:8388352,chocolate:13789470,coral:16744272,cornflowerblue:6591981,cornsilk:16775388,crimson:14423100,cyan:65535,darkblue:139,darkcyan:35723,darkgoldenrod:12092939,darkgray:11119017,darkgreen:25600,darkgrey:11119017,darkkhaki:12433259,darkmagenta:9109643,darkolivegreen:5597999,darkorange:16747520,darkorchid:10040012,darkred:9109504,darksalmon:15308410,darkseagreen:9419919,darkslateblue:4734347,darkslategray:3100495,darkslategrey:3100495,darkturquoise:52945,darkviolet:9699539,deeppink:16716947,deepskyblue:49151,dimgray:6908265,dimgrey:6908265,dodgerblue:2003199,firebrick:11674146,floralwhite:16775920,forestgreen:2263842,fuchsia:16711935,gainsboro:14474460,ghostwhite:16316671,gold:16766720,goldenrod:14329120,gray:8421504,green:32768,greenyellow:11403055,grey:8421504,honeydew:15794160,hotpink:16738740,indianred:13458524,indigo:4915330,ivory:16777200,khaki:15787660,lavender:15132410,lavenderblush:16773365,lawngreen:8190976,lemonchiffon:16775885,lightblue:11393254,lightcoral:15761536,lightcyan:14745599,lightgoldenrodyellow:16448210,lightgray:13882323,lightgreen:9498256,lightgrey:13882323,lightpink:16758465,lightsalmon:16752762,lightseagreen:2142890,lightskyblue:8900346,lightslategray:7833753,lightslategrey:7833753,lightsteelblue:11584734,lightyellow:16777184,lime:65280,limegreen:3329330,linen:16445670,magenta:16711935,maroon:8388608,mediumaquamarine:6737322,mediumblue:205,mediumorchid:12211667,mediumpurple:9662683,mediumseagreen:3978097,mediumslateblue:8087790,mediumspringgreen:64154,mediumturquoise:4772300,mediumvioletred:13047173,midnightblue:1644912,mintcream:16121850,mistyrose:16770273,moccasin:16770229,navajowhite:16768685,navy:128,oldlace:16643558,olive:8421376,olivedrab:7048739,orange:16753920,orangered:16729344,orchid:14315734,palegoldenrod:15657130,palegreen:10025880,paleturquoise:11529966,palevioletred:14381203,papayawhip:16773077,peachpuff:16767673,peru:13468991,pink:16761035,plum:14524637,powderblue:11591910,purple:8388736,rebeccapurple:6697881,red:16711680,rosybrown:12357519,royalblue:4286945,saddlebrown:9127187,salmon:16416882,sandybrown:16032864,seagreen:3050327,seashell:16774638,sienna:10506797,silver:12632256,skyblue:8900331,slateblue:6970061,slategray:7372944,slategrey:7372944,snow:16775930,springgreen:65407,steelblue:4620980,tan:13808780,teal:32896,thistle:14204888,tomato:16737095,turquoise:4251856,violet:15631086,wheat:16113331,white:16777215,whitesmoke:16119285,yellow:16776960,yellowgreen:10145074};gn(Be,ue,{copy(t){return Object.assign(new this.constructor,this,t)},displayable(){return this.rgb().displayable()},hex:$m,formatHex:$m,formatHex8:c2,formatHsl:s2,formatRgb:Em,toString:Em});function $m(){return this.rgb().formatHex()}function c2(){return this.rgb().formatHex8()}function s2(){return Lm(this).formatHsl()}function Em(){return this.rgb().formatRgb()}function ue(t){var e,n;return t=(t+"").trim().toLowerCase(),(e=n2.exec(t))?(n=e[1].length,e=parseInt(e[1],16),n===6?Im(e):n===3?new Tt(e>>8&15|e>>4&240,e>>4&15|e&240,(e&15)<<4|e&15,1):n===8?Qa(e>>24&255,e>>16&255,e>>8&255,(e&255)/255):n===4?Qa(e>>12&15|e>>8&240,e>>8&15|e>>4&240,e>>4&15|e&240,((e&15)<<4|e&15)/255):null):(e=r2.exec(t))?new Tt(e[1],e[2],e[3],1):(e=o2.exec(t))?new Tt(e[1]*255/100,e[2]*255/100,e[3]*255/100,1):(e=i2.exec(t))?Qa(e[1],e[2],e[3],e[4]):(e=a2.exec(t))?Qa(e[1]*255/100,e[2]*255/100,e[3]*255/100,e[4]):(e=f2.exec(t))?Nm(e[1],e[2]/100,e[3]/100,1):(e=u2.exec(t))?Nm(e[1],e[2]/100,e[3]/100,e[4]):Am.hasOwnProperty(t)?Im(Am[t]):t==="transparent"?new Tt(NaN,NaN,NaN,0):null}function Im(t){return new Tt(t>>16&255,t>>8&255,t&255,1)}function Qa(t,e,n,r){return r<=0&&(t=e=n=NaN),new Tt(t,e,n,r)}function Qo(t){return t instanceof Be||(t=ue(t)),t?(t=t.rgb(),new Tt(t.r,t.g,t.b,t.opacity)):new Tt}function be(t,e,n,r){return arguments.length===1?Qo(t):new Tt(t,e,n,r??1)}function Tt(t,e,n,r){this.r=+t,this.g=+e,this.b=+n,this.opacity=+r}gn(Tt,be,In(Be,{brighter(t){return t=t==null?ir:Math.pow(ir,t),new Tt(this.r*t,this.g*t,this.b*t,this.opacity)},darker(t){return t=t==null?kn:Math.pow(kn,t),new Tt(this.r*t,this.g*t,this.b*t,this.opacity)},rgb(){return this},clamp(){return new Tt(or(this.r),or(this.g),or(this.b),tf(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:km,formatHex:km,formatHex8:l2,formatRgb:Dm,toString:Dm}));function km(){return`#${rr(this.r)}${rr(this.g)}${rr(this.b)}`}function l2(){return`#${rr(this.r)}${rr(this.g)}${rr(this.b)}${rr((isNaN(this.opacity)?1:this.opacity)*255)}`}function Dm(){let t=tf(this.opacity);return`${t===1?"rgb(":"rgba("}${or(this.r)}, ${or(this.g)}, ${or(this.b)}${t===1?")":`, ${t})`}`}function tf(t){return isNaN(t)?1:Math.max(0,Math.min(1,t))}function or(t){return Math.max(0,Math.min(255,Math.round(t)||0))}function rr(t){return t=or(t),(t<16?"0":"")+t.toString(16)}function Nm(t,e,n,r){return r<=0?t=e=n=NaN:n<=0||n>=1?t=e=NaN:e<=0&&(t=NaN),new $e(t,e,n,r)}function Lm(t){if(t instanceof $e)return new $e(t.h,t.s,t.l,t.opacity);if(t instanceof Be||(t=ue(t)),!t)return new $e;if(t instanceof $e)return t;t=t.rgb();var e=t.r/255,n=t.g/255,r=t.b/255,o=Math.min(e,n,r),i=Math.max(e,n,r),a=NaN,f=i-o,u=(i+o)/2;return f?(e===i?a=(n-r)/f+(n<r)*6:n===i?a=(r-e)/f+2:a=(e-n)/f+4,f/=u<.5?i+o:2-i-o,a*=60):f=u>0&&u<1?0:a,new $e(a,f,u,t.opacity)}function Jo(t,e,n,r){return arguments.length===1?Lm(t):new $e(t,e,n,r??1)}function $e(t,e,n,r){this.h=+t,this.s=+e,this.l=+n,this.opacity=+r}gn($e,Jo,In(Be,{brighter(t){return t=t==null?ir:Math.pow(ir,t),new $e(this.h,this.s,this.l*t,this.opacity)},darker(t){return t=t==null?kn:Math.pow(kn,t),new $e(this.h,this.s,this.l*t,this.opacity)},rgb(){var t=this.h%360+(this.h<0)*360,e=isNaN(t)||isNaN(this.s)?0:this.s,n=this.l,r=n+(n<.5?n:1-n)*e,o=2*n-r;return new Tt(bs(t>=240?t-240:t+120,o,r),bs(t,o,r),bs(t<120?t+240:t-120,o,r),this.opacity)},clamp(){return new $e(Rm(this.h),Ja(this.s),Ja(this.l),tf(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=tf(this.opacity);return`${t===1?"hsl(":"hsla("}${Rm(this.h)}, ${Ja(this.s)*100}%, ${Ja(this.l)*100}%${t===1?")":`, ${t})`}`}}));function Rm(t){return t=(t||0)%360,t<0?t+360:t}function Ja(t){return Math.max(0,Math.min(1,t||0))}function bs(t,e,n){return(t<60?e+(n-e)*t/60:t<180?n:t<240?e+(n-e)*(240-t)/60:e)*255}var ef=Math.PI/180,nf=180/Math.PI;var rf=18,Pm=.96422,Om=1,Fm=.82521,qm=4/29,qr=6/29,Ym=3*qr*qr,d2=qr*qr*qr;function zm(t){if(t instanceof Ue)return new Ue(t.l,t.a,t.b,t.opacity);if(t instanceof xn)return Bm(t);t instanceof Tt||(t=Qo(t));var e=Ss(t.r),n=Ss(t.g),r=Ss(t.b),o=ws((.2225045*e+.7168786*n+.0606169*r)/Om),i,a;return e===n&&n===r?i=a=o:(i=ws((.4360747*e+.3850649*n+.1430804*r)/Pm),a=ws((.0139322*e+.0971045*n+.7141733*r)/Fm)),new Ue(116*o-16,500*(i-o),200*(o-a),t.opacity)}function Yr(t,e,n,r){return arguments.length===1?zm(t):new Ue(t,e,n,r??1)}function Ue(t,e,n,r){this.l=+t,this.a=+e,this.b=+n,this.opacity=+r}gn(Ue,Yr,In(Be,{brighter(t){return new Ue(this.l+rf*(t??1),this.a,this.b,this.opacity)},darker(t){return new Ue(this.l-rf*(t??1),this.a,this.b,this.opacity)},rgb(){var t=(this.l+16)/116,e=isNaN(this.a)?t:t+this.a/500,n=isNaN(this.b)?t:t-this.b/200;return e=Pm*vs(e),t=Om*vs(t),n=Fm*vs(n),new Tt(Ms(3.1338561*e-1.6168667*t-.4906146*n),Ms(-.9787684*e+1.9161415*t+.033454*n),Ms(.0719453*e-.2289914*t+1.4052427*n),this.opacity)}}));function ws(t){return t>d2?Math.pow(t,1/3):t/Ym+qm}function vs(t){return t>qr?t*t*t:Ym*(t-qm)}function Ms(t){return 255*(t<=.0031308?12.92*t:1.055*Math.pow(t,1/2.4)-.055)}function Ss(t){return(t/=255)<=.04045?t/12.92:Math.pow((t+.055)/1.055,2.4)}function p2(t){if(t instanceof xn)return new xn(t.h,t.c,t.l,t.opacity);if(t instanceof Ue||(t=zm(t)),t.a===0&&t.b===0)return new xn(NaN,0<t.l&&t.l<100?0:NaN,t.l,t.opacity);var e=Math.atan2(t.b,t.a)*nf;return new xn(e<0?e+360:e,Math.sqrt(t.a*t.a+t.b*t.b),t.l,t.opacity)}function ti(t,e,n,r){return arguments.length===1?p2(t):new xn(t,e,n,r??1)}function xn(t,e,n,r){this.h=+t,this.c=+e,this.l=+n,this.opacity=+r}function Bm(t){if(isNaN(t.h))return new Ue(t.l,0,0,t.opacity);var e=t.h*ef;return new Ue(t.l,Math.cos(e)*t.c,Math.sin(e)*t.c,t.opacity)}gn(xn,ti,In(Be,{brighter(t){return new xn(this.h,this.c,this.l+rf*(t??1),this.opacity)},darker(t){return new xn(this.h,this.c,this.l-rf*(t??1),this.opacity)},rgb(){return Bm(this).rgb()}}));var Hm=-.14861,Ts=1.78277,_s=-.29227,of=-.90649,ei=1.97294,Um=ei*of,Xm=ei*Ts,Wm=Ts*_s-of*Hm;function m2(t){if(t instanceof ar)return new ar(t.h,t.s,t.l,t.opacity);t instanceof Tt||(t=Qo(t));var e=t.r/255,n=t.g/255,r=t.b/255,o=(Wm*r+Um*e-Xm*n)/(Wm+Um-Xm),i=r-o,a=(ei*(n-o)-_s*i)/of,f=Math.sqrt(a*a+i*i)/(ei*o*(1-o)),u=f?Math.atan2(a,i)*nf-120:NaN;return new ar(u<0?u+360:u,f,o,t.opacity)}function te(t,e,n,r){return arguments.length===1?m2(t):new ar(t,e,n,r??1)}function ar(t,e,n,r){this.h=+t,this.s=+e,this.l=+n,this.opacity=+r}gn(ar,te,In(Be,{brighter(t){return t=t==null?ir:Math.pow(ir,t),new ar(this.h,this.s,this.l*t,this.opacity)},darker(t){return t=t==null?kn:Math.pow(kn,t),new ar(this.h,this.s,this.l*t,this.opacity)},rgb(){var t=isNaN(this.h)?0:(this.h+120)*ef,e=+this.l,n=isNaN(this.s)?0:this.s*e*(1-e),r=Math.cos(t),o=Math.sin(t);return new Tt(255*(e+n*(Hm*r+Ts*o)),255*(e+n*(_s*r+of*o)),255*(e+n*(ei*r)),this.opacity)}}));function Cs(t,e,n,r,o){var i=t*t,a=i*t;return((1-3*t+3*i-a)*e+(4-6*i+3*a)*n+(1+3*t+3*i-3*a)*r+a*o)/6}function Gm(t){var e=t.length-1;return function(n){var r=n<=0?n=0:n>=1?(n=1,e-1):Math.floor(n*e),o=t[r],i=t[r+1],a=r>0?t[r-1]:2*o-i,f=r<e-1?t[r+2]:2*i-o;return Cs((n-r/e)*e,a,o,i,f)}}function Vm(t){var e=t.length;return function(n){var r=Math.floor(((n%=1)<0?++n:n)*e),o=t[(r+e-1)%e],i=t[r%e],a=t[(r+1)%e],f=t[(r+2)%e];return Cs((n-r/e)*e,o,i,a,f)}}var zr=t=>()=>t;function jm(t,e){return function(n){return t+n*e}}function h2(t,e,n){return t=Math.pow(t,n),e=Math.pow(e,n)-t,n=1/n,function(r){return Math.pow(t+r*e,n)}}function Br(t,e){var n=e-t;return n?jm(t,n>180||n<-180?n-360*Math.round(n/360):n):zr(isNaN(t)?e:t)}function Zm(t){return(t=+t)==1?xt:function(e,n){return n-e?h2(e,n,t):zr(isNaN(e)?n:e)}}function xt(t,e){var n=e-t;return n?jm(t,n):zr(isNaN(t)?e:t)}var we=function t(e){var n=Zm(e);function r(o,i){var a=n((o=be(o)).r,(i=be(i)).r),f=n(o.g,i.g),u=n(o.b,i.b),c=xt(o.opacity,i.opacity);return function(s){return o.r=a(s),o.g=f(s),o.b=u(s),o.opacity=c(s),o+""}}return r.gamma=t,r}(1);function Km(t){return function(e){var n=e.length,r=new Array(n),o=new Array(n),i=new Array(n),a,f;for(a=0;a<n;++a)f=be(e[a]),r[a]=f.r||0,o[a]=f.g||0,i[a]=f.b||0;return r=t(r),o=t(o),i=t(i),f.opacity=1,function(u){return f.r=r(u),f.g=o(u),f.b=i(u),f+""}}}var As=Km(Gm),g2=Km(Vm);function Qm(t,e){e||(e=[]);var n=t?Math.min(e.length,t.length):0,r=e.slice(),o;return function(i){for(o=0;o<n;++o)r[o]=t[o]*(1-i)+e[o]*i;return r}}function Jm(t){return ArrayBuffer.isView(t)&&!(t instanceof DataView)}function th(t,e){var n=e?e.length:0,r=t?Math.min(n,t.length):0,o=new Array(r),i=new Array(n),a;for(a=0;a<r;++a)o[a]=Ee(t[a],e[a]);for(;a<n;++a)i[a]=e[a];return function(f){for(a=0;a<r;++a)i[a]=o[a](f);return i}}function eh(t,e){var n=new Date;return t=+t,e=+e,function(r){return n.setTime(t*(1-r)+e*r),n}}function ht(t,e){return t=+t,e=+e,function(n){return t*(1-n)+e*n}}function nh(t,e){var n={},r={},o;(t===null||typeof t!="object")&&(t={}),(e===null||typeof e!="object")&&(e={});for(o in e)o in t?n[o]=Ee(t[o],e[o]):r[o]=e[o];return function(i){for(o in n)r[o]=n[o](i);return r}}var Es=/[-+]?(?:\d+\.?\d*|\.?\d+)(?:[eE][-+]?\d+)?/g,$s=new RegExp(Es.source,"g");function x2(t){return function(){return t}}function y2(t){return function(e){return t(e)+""}}function ni(t,e){var n=Es.lastIndex=$s.lastIndex=0,r,o,i,a=-1,f=[],u=[];for(t=t+"",e=e+"";(r=Es.exec(t))&&(o=$s.exec(e));)(i=o.index)>n&&(i=e.slice(n,i),f[a]?f[a]+=i:f[++a]=i),(r=r[0])===(o=o[0])?f[a]?f[a]+=o:f[++a]=o:(f[++a]=null,u.push({i:a,x:ht(r,o)})),n=$s.lastIndex;return n<e.length&&(i=e.slice(n),f[a]?f[a]+=i:f[++a]=i),f.length<2?u[0]?y2(u[0].x):x2(e):(e=u.length,function(c){for(var s=0,d;s<e;++s)f[(d=u[s]).i]=d.x(c);return f.join("")})}function Ee(t,e){var n=typeof e,r;return e==null||n==="boolean"?zr(e):(n==="number"?ht:n==="string"?(r=ue(e))?(e=r,we):ni:e instanceof ue?we:e instanceof Date?eh:Jm(e)?Qm:Array.isArray(e)?th:typeof e.valueOf!="function"&&typeof e.toString!="function"||isNaN(e)?nh:ht)(t,e)}function fr(t,e){return t=+t,e=+e,function(n){return Math.round(t*(1-n)+e*n)}}var rh=180/Math.PI,af={translateX:0,translateY:0,rotate:0,skewX:0,scaleX:1,scaleY:1};function Is(t,e,n,r,o,i){var a,f,u;return(a=Math.sqrt(t*t+e*e))&&(t/=a,e/=a),(u=t*n+e*r)&&(n-=t*u,r-=e*u),(f=Math.sqrt(n*n+r*r))&&(n/=f,r/=f,u/=f),t*r<e*n&&(t=-t,e=-e,u=-u,a=-a),{translateX:o,translateY:i,rotate:Math.atan2(e,t)*rh,skewX:Math.atan(u)*rh,scaleX:a,scaleY:f}}var ff;function oh(t){let e=new(typeof DOMMatrix=="function"?DOMMatrix:WebKitCSSMatrix)(t+"");return e.isIdentity?af:Is(e.a,e.b,e.c,e.d,e.e,e.f)}function ih(t){return t==null?af:(ff||(ff=document.createElementNS("http://www.w3.org/2000/svg","g")),ff.setAttribute("transform",t),(t=ff.transform.baseVal.consolidate())?(t=t.matrix,Is(t.a,t.b,t.c,t.d,t.e,t.f)):af)}function ah(t,e,n,r){function o(c){return c.length?c.pop()+" ":""}function i(c,s,d,l,p,m){if(c!==d||s!==l){var h=p.push("translate(",null,e,null,n);m.push({i:h-4,x:ht(c,d)},{i:h-2,x:ht(s,l)})}else(d||l)&&p.push("translate("+d+e+l+n)}function a(c,s,d,l){c!==s?(c-s>180?s+=360:s-c>180&&(c+=360),l.push({i:d.push(o(d)+"rotate(",null,r)-2,x:ht(c,s)})):s&&d.push(o(d)+"rotate("+s+r)}function f(c,s,d,l){c!==s?l.push({i:d.push(o(d)+"skewX(",null,r)-2,x:ht(c,s)}):s&&d.push(o(d)+"skewX("+s+r)}function u(c,s,d,l,p,m){if(c!==d||s!==l){var h=p.push(o(p)+"scale(",null,",",null,")");m.push({i:h-4,x:ht(c,d)},{i:h-2,x:ht(s,l)})}else(d!==1||l!==1)&&p.push(o(p)+"scale("+d+","+l+")")}return function(c,s){var d=[],l=[];return c=t(c),s=t(s),i(c.translateX,c.translateY,s.translateX,s.translateY,d,l),a(c.rotate,s.rotate,d,l),f(c.skewX,s.skewX,d,l),u(c.scaleX,c.scaleY,s.scaleX,s.scaleY,d,l),c=s=null,function(p){for(var m=-1,h=l.length,g;++m<h;)d[(g=l[m]).i]=g.x(p);return d.join("")}}}var ks=ah(oh,"px, ","px)","deg)"),Ds=ah(ih,", ",")",")");function fh(t){return function(e,n){var r=t((e=Jo(e)).h,(n=Jo(n)).h),o=xt(e.s,n.s),i=xt(e.l,n.l),a=xt(e.opacity,n.opacity);return function(f){return e.h=r(f),e.s=o(f),e.l=i(f),e.opacity=a(f),e+""}}}var Ns=fh(Br),b2=fh(xt);function uf(t,e){var n=xt((t=Yr(t)).l,(e=Yr(e)).l),r=xt(t.a,e.a),o=xt(t.b,e.b),i=xt(t.opacity,e.opacity);return function(a){return t.l=n(a),t.a=r(a),t.b=o(a),t.opacity=i(a),t+""}}function uh(t){return function(e,n){var r=t((e=ti(e)).h,(n=ti(n)).h),o=xt(e.c,n.c),i=xt(e.l,n.l),a=xt(e.opacity,n.opacity);return function(f){return e.h=r(f),e.c=o(f),e.l=i(f),e.opacity=a(f),e+""}}}var Rs=uh(Br),w2=uh(xt);function ch(t){return function e(n){n=+n;function r(o,i){var a=t((o=te(o)).h,(i=te(i)).h),f=xt(o.s,i.s),u=xt(o.l,i.l),c=xt(o.opacity,i.opacity);return function(s){return o.h=a(s),o.s=f(s),o.l=u(Math.pow(s,n)),o.opacity=c(s),o+""}}return r.gamma=e,r}(1)}var v2=ch(Br),Ur=ch(xt);function Xe(t,e){e===void 0&&(e=t,t=Ee);for(var n=0,r=e.length-1,o=e[0],i=new Array(r<0?0:r);n<r;)i[n]=t(o,o=e[++n]);return function(a){var f=Math.max(0,Math.min(r-1,Math.floor(a*=r)));return i[f](a-f)}}function Ht(t,e){for(var n=new Array(e),r=0;r<e;++r)n[r]=t(r/(e-1));return n}var Xr=0,oi=0,ri=0,lh=1e3,cf,ii,sf=0,ur=0,lf=0,ai=typeof performance=="object"&&performance.now?performance:Date,dh=typeof window=="object"&&window.requestAnimationFrame?window.requestAnimationFrame.bind(window):function(t){setTimeout(t,17)};function ui(){return ur||(dh(M2),ur=ai.now()+lf)}function M2(){ur=0}function fi(){this._call=this._time=this._next=null}fi.prototype=df.prototype={constructor:fi,restart:function(t,e,n){if(typeof t!="function")throw new TypeError("callback is not a function");n=(n==null?ui():+n)+(e==null?0:+e),!this._next&&ii!==this&&(ii?ii._next=this:cf=this,ii=this),this._call=t,this._time=n,Ls()},stop:function(){this._call&&(this._call=null,this._time=1/0,Ls())}};function df(t,e,n){var r=new fi;return r.restart(t,e,n),r}function ph(){ui(),++Xr;for(var t=cf,e;t;)(e=ur-t._time)>=0&&t._call.call(void 0,e),t=t._next;--Xr}function sh(){ur=(sf=ai.now())+lf,Xr=oi=0;try{ph()}finally{Xr=0,T2(),ur=0}}function S2(){var t=ai.now(),e=t-sf;e>lh&&(lf-=e,sf=t)}function T2(){for(var t,e=cf,n,r=1/0;e;)e._call?(r>e._time&&(r=e._time),t=e,e=e._next):(n=e._next,e._next=null,e=t?t._next=n:cf=n);ii=t,Ls(r)}function Ls(t){if(!Xr){oi&&(oi=clearTimeout(oi));var e=t-ur;e>24?(t<1/0&&(oi=setTimeout(sh,t-ai.now()-lf)),ri&&(ri=clearInterval(ri))):(ri||(sf=ai.now(),ri=setInterval(S2,lh)),Xr=1,dh(sh))}}function pf(t,e,n){var r=new fi;return e=e==null?0:+e,r.restart(o=>{r.stop(),t(o+e)},e,n),r}var _2=ms("start","end","cancel","interrupt"),C2=[],gh=0,mh=1,hf=2,mf=3,hh=4,gf=5,ci=6;function Dn(t,e,n,r,o,i){var a=t.__transition;if(!a)t.__transition={};else if(n in a)return;A2(t,n,{name:e,index:r,group:o,on:_2,tween:C2,time:i.time,delay:i.delay,duration:i.duration,ease:i.ease,timer:null,state:gh})}function si(t,e){var n=At(t,e);if(n.state>gh)throw new Error("too late; already scheduled");return n}function Ft(t,e){var n=At(t,e);if(n.state>mf)throw new Error("too late; already running");return n}function At(t,e){var n=t.__transition;if(!n||!(n=n[e]))throw new Error("transition not found");return n}function A2(t,e,n){var r=t.__transition,o;r[e]=n,n.timer=df(i,0,n.time);function i(c){n.state=mh,n.timer.restart(a,n.delay,n.time),n.delay<=c&&a(c-n.delay)}function a(c){var s,d,l,p;if(n.state!==mh)return u();for(s in r)if(p=r[s],p.name===n.name){if(p.state===mf)return pf(a);p.state===hh?(p.state=ci,p.timer.stop(),p.on.call("interrupt",t,t.__data__,p.index,p.group),delete r[s]):+s<e&&(p.state=ci,p.timer.stop(),p.on.call("cancel",t,t.__data__,p.index,p.group),delete r[s])}if(pf(function(){n.state===mf&&(n.state=hh,n.timer.restart(f,n.delay,n.time),f(c))}),n.state=hf,n.on.call("start",t,t.__data__,n.index,n.group),n.state===hf){for(n.state=mf,o=new Array(l=n.tween.length),s=0,d=-1;s<l;++s)(p=n.tween[s].value.call(t,t.__data__,n.index,n.group))&&(o[++d]=p);o.length=d+1}}function f(c){for(var s=c<n.duration?n.ease.call(null,c/n.duration):(n.timer.restart(u),n.state=gf,1),d=-1,l=o.length;++d<l;)o[d].call(t,s);n.state===gf&&(n.on.call("end",t,t.__data__,n.index,n.group),u())}function u(){n.state=ci,n.timer.stop(),delete r[e];for(var c in r)return;delete t.__transition}}function xf(t,e){var n=t.__transition,r,o,i=!0,a;if(n){e=e==null?null:e+"";for(a in n){if((r=n[a]).name!==e){i=!1;continue}o=r.state>hf&&r.state<gf,r.state=ci,r.timer.stop(),r.on.call(o?"interrupt":"cancel",t,t.__data__,r.index,r.group),delete n[a]}i&&delete t.__transition}}function xh(t){return this.each(function(){xf(this,t)})}function $2(t,e){var n,r;return function(){var o=Ft(this,t),i=o.tween;if(i!==n){r=n=i;for(var a=0,f=r.length;a<f;++a)if(r[a].name===e){r=r.slice(),r.splice(a,1);break}}o.tween=r}}function E2(t,e,n){var r,o;if(typeof n!="function")throw new Error;return function(){var i=Ft(this,t),a=i.tween;if(a!==r){o=(r=a).slice();for(var f={name:e,value:n},u=0,c=o.length;u<c;++u)if(o[u].name===e){o[u]=f;break}u===c&&o.push(f)}i.tween=o}}function yh(t,e){var n=this._id;if(t+="",arguments.length<2){for(var r=At(this.node(),n).tween,o=0,i=r.length,a;o<i;++o)if((a=r[o]).name===t)return a.value;return null}return this.each((e==null?$2:E2)(n,t,e))}function Wr(t,e,n){var r=t._id;return t.each(function(){var o=Ft(this,r);(o.value||(o.value={}))[e]=n.apply(this,arguments)}),function(o){return At(o,r).value[e]}}function yf(t,e){var n;return(typeof e=="number"?ht:e instanceof ue?we:(n=ue(e))?(e=n,we):ni)(t,e)}function I2(t){return function(){this.removeAttribute(t)}}function k2(t){return function(){this.removeAttributeNS(t.space,t.local)}}function D2(t,e,n){var r,o=n+"",i;return function(){var a=this.getAttribute(t);return a===o?null:a===r?i:i=e(r=a,n)}}function N2(t,e,n){var r,o=n+"",i;return function(){var a=this.getAttributeNS(t.space,t.local);return a===o?null:a===r?i:i=e(r=a,n)}}function R2(t,e,n){var r,o,i;return function(){var a,f=n(this),u;return f==null?void this.removeAttribute(t):(a=this.getAttribute(t),u=f+"",a===u?null:a===r&&u===o?i:(o=u,i=e(r=a,f)))}}function L2(t,e,n){var r,o,i;return function(){var a,f=n(this),u;return f==null?void this.removeAttributeNS(t.space,t.local):(a=this.getAttributeNS(t.space,t.local),u=f+"",a===u?null:a===r&&u===o?i:(o=u,i=e(r=a,f)))}}function bh(t,e){var n=dn(t),r=n==="transform"?Ds:yf;return this.attrTween(t,typeof e=="function"?(n.local?L2:R2)(n,r,Wr(this,"attr."+t,e)):e==null?(n.local?k2:I2)(n):(n.local?N2:D2)(n,r,e))}function P2(t,e){return function(n){this.setAttribute(t,e.call(this,n))}}function O2(t,e){return function(n){this.setAttributeNS(t.space,t.local,e.call(this,n))}}function F2(t,e){var n,r;function o(){var i=e.apply(this,arguments);return i!==r&&(n=(r=i)&&O2(t,i)),n}return o._value=e,o}function q2(t,e){var n,r;function o(){var i=e.apply(this,arguments);return i!==r&&(n=(r=i)&&P2(t,i)),n}return o._value=e,o}function wh(t,e){var n="attr."+t;if(arguments.length<2)return(n=this.tween(n))&&n._value;if(e==null)return this.tween(n,null);if(typeof e!="function")throw new Error;var r=dn(t);return this.tween(n,(r.local?F2:q2)(r,e))}function Y2(t,e){return function(){si(this,t).delay=+e.apply(this,arguments)}}function z2(t,e){return e=+e,function(){si(this,t).delay=e}}function vh(t){var e=this._id;return arguments.length?this.each((typeof t=="function"?Y2:z2)(e,t)):At(this.node(),e).delay}function B2(t,e){return function(){Ft(this,t).duration=+e.apply(this,arguments)}}function U2(t,e){return e=+e,function(){Ft(this,t).duration=e}}function Mh(t){var e=this._id;return arguments.length?this.each((typeof t=="function"?B2:U2)(e,t)):At(this.node(),e).duration}function X2(t,e){if(typeof e!="function")throw new Error;return function(){Ft(this,t).ease=e}}function Sh(t){var e=this._id;return arguments.length?this.each(X2(e,t)):At(this.node(),e).ease}function W2(t,e){return function(){var n=e.apply(this,arguments);if(typeof n!="function")throw new Error;Ft(this,t).ease=n}}function Th(t){if(typeof t!="function")throw new Error;return this.each(W2(this._id,t))}function _h(t){typeof t!="function"&&(t=jo(t));for(var e=this._groups,n=e.length,r=new Array(n),o=0;o<n;++o)for(var i=e[o],a=i.length,f=r[o]=[],u,c=0;c<a;++c)(u=i[c])&&t.call(u,u.__data__,c,i)&&f.push(u);return new ee(r,this._parents,this._name,this._id)}function Ch(t){if(t._id!==this._id)throw new Error;for(var e=this._groups,n=t._groups,r=e.length,o=n.length,i=Math.min(r,o),a=new Array(r),f=0;f<i;++f)for(var u=e[f],c=n[f],s=u.length,d=a[f]=new Array(s),l,p=0;p<s;++p)(l=u[p]||c[p])&&(d[p]=l);for(;f<r;++f)a[f]=e[f];return new ee(a,this._parents,this._name,this._id)}function H2(t){return(t+"").trim().split(/^|\s+/).every(function(e){var n=e.indexOf(".");return n>=0&&(e=e.slice(0,n)),!e||e==="start"})}function G2(t,e,n){var r,o,i=H2(e)?si:Ft;return function(){var a=i(this,t),f=a.on;f!==r&&(o=(r=f).copy()).on(e,n),a.on=o}}function Ah(t,e){var n=this._id;return arguments.length<2?At(this.node(),n).on.on(t):this.each(G2(n,t,e))}function V2(t){return function(){var e=this.parentNode;for(var n in this.__transition)if(+n!==t)return;e&&e.removeChild(this)}}function $h(){return this.on("end.remove",V2(this._id))}function Eh(t){var e=this._name,n=this._id;typeof t!="function"&&(t=nr(t));for(var r=this._groups,o=r.length,i=new Array(o),a=0;a<o;++a)for(var f=r[a],u=f.length,c=i[a]=new Array(u),s,d,l=0;l<u;++l)(s=f[l])&&(d=t.call(s,s.__data__,l,f))&&("__data__"in s&&(d.__data__=s.__data__),c[l]=d,Dn(c[l],e,n,l,c,At(s,n)));return new ee(i,this._parents,e,n)}function Ih(t){var e=this._name,n=this._id;typeof t!="function"&&(t=Vo(t));for(var r=this._groups,o=r.length,i=[],a=[],f=0;f<o;++f)for(var u=r[f],c=u.length,s,d=0;d<c;++d)if(s=u[d]){for(var l=t.call(s,s.__data__,d,u),p,m=At(s,n),h=0,g=l.length;h<g;++h)(p=l[h])&&Dn(p,e,n,h,l,m);i.push(l),a.push(s)}return new ee(i,a,e,n)}var j2=mn.prototype.constructor;function kh(){return new j2(this._groups,this._parents)}function Z2(t,e){var n,r,o;return function(){var i=En(this,t),a=(this.style.removeProperty(t),En(this,t));return i===a?null:i===n&&a===r?o:o=e(n=i,r=a)}}function Dh(t){return function(){this.style.removeProperty(t)}}function K2(t,e,n){var r,o=n+"",i;return function(){var a=En(this,t);return a===o?null:a===r?i:i=e(r=a,n)}}function Q2(t,e,n){var r,o,i;return function(){var a=En(this,t),f=n(this),u=f+"";return f==null&&(u=f=(this.style.removeProperty(t),En(this,t))),a===u?null:a===r&&u===o?i:(o=u,i=e(r=a,f))}}function J2(t,e){var n,r,o,i="style."+e,a="end."+i,f;return function(){var u=Ft(this,t),c=u.on,s=u.value[i]==null?f||(f=Dh(e)):void 0;(c!==n||o!==s)&&(r=(n=c).copy()).on(a,o=s),u.on=r}}function Nh(t,e,n){var r=(t+="")=="transform"?ks:yf;return e==null?this.styleTween(t,Z2(t,r)).on("end.style."+t,Dh(t)):typeof e=="function"?this.styleTween(t,Q2(t,r,Wr(this,"style."+t,e))).each(J2(this._id,t)):this.styleTween(t,K2(t,r,e),n).on("end.style."+t,null)}function tw(t,e,n){return function(r){this.style.setProperty(t,e.call(this,r),n)}}function ew(t,e,n){var r,o;function i(){var a=e.apply(this,arguments);return a!==o&&(r=(o=a)&&tw(t,a,n)),r}return i._value=e,i}function Rh(t,e,n){var r="style."+(t+="");if(arguments.length<2)return(r=this.tween(r))&&r._value;if(e==null)return this.tween(r,null);if(typeof e!="function")throw new Error;return this.tween(r,ew(t,e,n??""))}function nw(t){return function(){this.textContent=t}}function rw(t){return function(){var e=t(this);this.textContent=e??""}}function Lh(t){return this.tween("text",typeof t=="function"?rw(Wr(this,"text",t)):nw(t==null?"":t+""))}function ow(t){return function(e){this.textContent=t.call(this,e)}}function iw(t){var e,n;function r(){var o=t.apply(this,arguments);return o!==n&&(e=(n=o)&&ow(o)),e}return r._value=t,r}function Ph(t){var e="text";if(arguments.length<1)return(e=this.tween(e))&&e._value;if(t==null)return this.tween(e,null);if(typeof t!="function")throw new Error;return this.tween(e,iw(t))}function Oh(){for(var t=this._name,e=this._id,n=bf(),r=this._groups,o=r.length,i=0;i<o;++i)for(var a=r[i],f=a.length,u,c=0;c<f;++c)if(u=a[c]){var s=At(u,e);Dn(u,t,n,c,a,{time:s.time+s.delay+s.duration,delay:0,duration:s.duration,ease:s.ease})}return new ee(r,this._parents,t,n)}function Fh(){var t,e,n=this,r=n._id,o=n.size();return new Promise(function(i,a){var f={value:a},u={value:function(){--o===0&&i()}};n.each(function(){var c=Ft(this,r),s=c.on;s!==t&&(e=(t=s).copy(),e._.cancel.push(f),e._.interrupt.push(f),e._.end.push(u)),c.on=e}),o===0&&i()})}var aw=0;function ee(t,e,n,r){this._groups=t,this._parents=e,this._name=n,this._id=r}function qh(t){return mn().transition(t)}function bf(){return++aw}var yn=mn.prototype;ee.prototype=qh.prototype={constructor:ee,select:Eh,selectAll:Ih,selectChild:yn.selectChild,selectChildren:yn.selectChildren,filter:_h,merge:Ch,selection:kh,transition:Oh,call:yn.call,nodes:yn.nodes,node:yn.node,size:yn.size,empty:yn.empty,each:yn.each,on:Ah,attr:bh,attrTween:wh,style:Nh,styleTween:Rh,text:Lh,textTween:Ph,remove:$h,tween:yh,delay:vh,duration:Mh,ease:Sh,easeVarying:Th,end:Fh,[Symbol.iterator]:yn[Symbol.iterator]};function wf(t){return((t*=2)<=1?t*t*t:(t-=2)*t*t+2)/2}var fw={time:null,delay:0,duration:250,ease:wf};function uw(t,e){for(var n;!(n=t.__transition)||!(n=n[e]);)if(!(t=t.parentNode))throw new Error(`transition ${e} not found`);return n}function Yh(t){var e,n;t instanceof ee?(e=t._id,t=t._name):(e=bf(),(n=fw).time=ui(),t=t==null?null:t+"");for(var r=this._groups,o=r.length,i=0;i<o;++i)for(var a=r[i],f=a.length,u,c=0;c<f;++c)(u=a[c])&&Dn(u,t,e,c,a,n||uw(u,e));return new ee(r,this._parents,t,e)}mn.prototype.interrupt=xh;mn.prototype.transition=Yh;var{abs:DC,max:NC,min:RC}=Math;function zh(t){return[+t[0],+t[1]]}function cw(t){return[zh(t[0]),zh(t[1])]}var LC={name:"x",handles:["w","e"].map(Ps),input:function(t,e){return t==null?null:[[+t[0],e[0][1]],[+t[1],e[1][1]]]},output:function(t){return t&&[t[0][0],t[1][0]]}},PC={name:"y",handles:["n","s"].map(Ps),input:function(t,e){return t==null?null:[[e[0][0],+t[0]],[e[1][0],+t[1]]]},output:function(t){return t&&[t[0][1],t[1][1]]}},OC={name:"xy",handles:["n","w","e","s","nw","ne","sw","se"].map(Ps),input:function(t){return t==null?null:cw(t)},output:function(t){return t}};function Ps(t){return{type:t}}var Os=Math.PI,Fs=2*Os,cr=1e-6,sw=Fs-cr;function Bh(t){this._+=t[0];for(let e=1,n=t.length;e<n;++e)this._+=arguments[e]+t[e]}function lw(t){let e=Math.floor(t);if(!(e>=0))throw new Error(`invalid digits: ${t}`);if(e>15)return Bh;let n=10**e;return function(r){this._+=r[0];for(let o=1,i=r.length;o<i;++o)this._+=Math.round(arguments[o]*n)/n+r[o]}}var Hr=class{constructor(e){this._x0=this._y0=this._x1=this._y1=null,this._="",this._append=e==null?Bh:lw(e)}moveTo(e,n){this._append`M${this._x0=this._x1=+e},${this._y0=this._y1=+n}`}closePath(){this._x1!==null&&(this._x1=this._x0,this._y1=this._y0,this._append`Z`)}lineTo(e,n){this._append`L${this._x1=+e},${this._y1=+n}`}quadraticCurveTo(e,n,r,o){this._append`Q${+e},${+n},${this._x1=+r},${this._y1=+o}`}bezierCurveTo(e,n,r,o,i,a){this._append`C${+e},${+n},${+r},${+o},${this._x1=+i},${this._y1=+a}`}arcTo(e,n,r,o,i){if(e=+e,n=+n,r=+r,o=+o,i=+i,i<0)throw new Error(`negative radius: ${i}`);let a=this._x1,f=this._y1,u=r-e,c=o-n,s=a-e,d=f-n,l=s*s+d*d;if(this._x1===null)this._append`M${this._x1=e},${this._y1=n}`;else if(l>cr)if(!(Math.abs(d*u-c*s)>cr)||!i)this._append`L${this._x1=e},${this._y1=n}`;else{let p=r-a,m=o-f,h=u*u+c*c,g=p*p+m*m,b=Math.sqrt(h),x=Math.sqrt(l),M=i*Math.tan((Os-Math.acos((h+l-g)/(2*b*x)))/2),y=M/x,w=M/b;Math.abs(y-1)>cr&&this._append`L${e+y*s},${n+y*d}`,this._append`A${i},${i},0,0,${+(d*p>s*m)},${this._x1=e+w*u},${this._y1=n+w*c}`}}arc(e,n,r,o,i,a){if(e=+e,n=+n,r=+r,a=!!a,r<0)throw new Error(`negative radius: ${r}`);let f=r*Math.cos(o),u=r*Math.sin(o),c=e+f,s=n+u,d=1^a,l=a?o-i:i-o;this._x1===null?this._append`M${c},${s}`:(Math.abs(this._x1-c)>cr||Math.abs(this._y1-s)>cr)&&this._append`L${c},${s}`,r&&(l<0&&(l=l%Fs+Fs),l>sw?this._append`A${r},${r},0,1,${d},${e-f},${n-u}A${r},${r},0,1,${d},${this._x1=c},${this._y1=s}`:l>cr&&this._append`A${r},${r},0,${+(l>=Os)},${d},${this._x1=e+r*Math.cos(i)},${this._y1=n+r*Math.sin(i)}`)}rect(e,n,r,o){this._append`M${this._x0=this._x1=+e},${this._y0=this._y1=+n}h${r=+r}v${+o}h${-r}Z`}toString(){return this._}};function Uh(){return new Hr}Uh.prototype=Hr.prototype;function Gr(t=3){return new Hr(+t)}function Xh(t){return Math.abs(t=Math.round(t))>=1e21?t.toLocaleString("en").replace(/,/g,""):t.toString(10)}function sr(t,e){if((n=(t=e?t.toExponential(e-1):t.toExponential()).indexOf("e"))<0)return null;var n,r=t.slice(0,n);return[r.length>1?r[0]+r.slice(2):r,+t.slice(n+1)]}function We(t){return t=sr(Math.abs(t)),t?t[1]:NaN}function Wh(t,e){return function(n,r){for(var o=n.length,i=[],a=0,f=t[0],u=0;o>0&&f>0&&(u+f+1>r&&(f=Math.max(1,r-u)),i.push(n.substring(o-=f,o+f)),!((u+=f+1)>r));)f=t[a=(a+1)%t.length];return i.reverse().join(e)}}function Hh(t){return function(e){return e.replace(/[0-9]/g,function(n){return t[+n]})}}var dw=/^(?:(.)?([<>=^]))?([+\-( ])?([$#])?(0)?(\d+)?(,)?(\.\d+)?(~)?([a-z%])?$/i;function He(t){if(!(e=dw.exec(t)))throw new Error("invalid format: "+t);var e;return new vf({fill:e[1],align:e[2],sign:e[3],symbol:e[4],zero:e[5],width:e[6],comma:e[7],precision:e[8]&&e[8].slice(1),trim:e[9],type:e[10]})}He.prototype=vf.prototype;function vf(t){this.fill=t.fill===void 0?" ":t.fill+"",this.align=t.align===void 0?">":t.align+"",this.sign=t.sign===void 0?"-":t.sign+"",this.symbol=t.symbol===void 0?"":t.symbol+"",this.zero=!!t.zero,this.width=t.width===void 0?void 0:+t.width,this.comma=!!t.comma,this.precision=t.precision===void 0?void 0:+t.precision,this.trim=!!t.trim,this.type=t.type===void 0?"":t.type+""}vf.prototype.toString=function(){return this.fill+this.align+this.sign+this.symbol+(this.zero?"0":"")+(this.width===void 0?"":Math.max(1,this.width|0))+(this.comma?",":"")+(this.precision===void 0?"":"."+Math.max(0,this.precision|0))+(this.trim?"~":"")+this.type};function Gh(t){t:for(var e=t.length,n=1,r=-1,o;n<e;++n)switch(t[n]){case".":r=o=n;break;case"0":r===0&&(r=n),o=n;break;default:if(!+t[n])break t;r>0&&(r=0);break}return r>0?t.slice(0,r)+t.slice(o+1):t}var qs;function Vh(t,e){var n=sr(t,e);if(!n)return t+"";var r=n[0],o=n[1],i=o-(qs=Math.max(-8,Math.min(8,Math.floor(o/3)))*3)+1,a=r.length;return i===a?r:i>a?r+new Array(i-a+1).join("0"):i>0?r.slice(0,i)+"."+r.slice(i):"0."+new Array(1-i).join("0")+sr(t,Math.max(0,e+i-1))[0]}function Ys(t,e){var n=sr(t,e);if(!n)return t+"";var r=n[0],o=n[1];return o<0?"0."+new Array(-o).join("0")+r:r.length>o+1?r.slice(0,o+1)+"."+r.slice(o+1):r+new Array(o-r.length+2).join("0")}var zs={"%":(t,e)=>(t*100).toFixed(e),b:t=>Math.round(t).toString(2),c:t=>t+"",d:Xh,e:(t,e)=>t.toExponential(e),f:(t,e)=>t.toFixed(e),g:(t,e)=>t.toPrecision(e),o:t=>Math.round(t).toString(8),p:(t,e)=>Ys(t*100,e),r:Ys,s:Vh,X:t=>Math.round(t).toString(16).toUpperCase(),x:t=>Math.round(t).toString(16)};function Bs(t){return t}var jh=Array.prototype.map,Zh=["y","z","a","f","p","n","\xB5","m","","k","M","G","T","P","E","Z","Y"];function Kh(t){var e=t.grouping===void 0||t.thousands===void 0?Bs:Wh(jh.call(t.grouping,Number),t.thousands+""),n=t.currency===void 0?"":t.currency[0]+"",r=t.currency===void 0?"":t.currency[1]+"",o=t.decimal===void 0?".":t.decimal+"",i=t.numerals===void 0?Bs:Hh(jh.call(t.numerals,String)),a=t.percent===void 0?"%":t.percent+"",f=t.minus===void 0?"\u2212":t.minus+"",u=t.nan===void 0?"NaN":t.nan+"";function c(d){d=He(d);var l=d.fill,p=d.align,m=d.sign,h=d.symbol,g=d.zero,b=d.width,x=d.comma,M=d.precision,y=d.trim,w=d.type;w==="n"?(x=!0,w="g"):zs[w]||(M===void 0&&(M=12),y=!0,w="g"),(g||l==="0"&&p==="=")&&(g=!0,l="0",p="=");var v=h==="$"?n:h==="#"&&/[boxX]/.test(w)?"0"+w.toLowerCase():"",T=h==="$"?r:/[%p]/.test(w)?a:"",E=zs[w],I=/[defgprs%]/.test(w);M=M===void 0?6:/[gprs]/.test(w)?Math.max(1,Math.min(21,M)):Math.max(0,Math.min(20,M));function D(_){var L=v,F=T,P,S,A;if(w==="c")F=E(_)+F,_="";else{_=+_;var N=_<0||1/_<0;if(_=isNaN(_)?u:E(Math.abs(_),M),y&&(_=Gh(_)),N&&+_==0&&m!=="+"&&(N=!1),L=(N?m==="("?m:f:m==="-"||m==="("?"":m)+L,F=(w==="s"?Zh[8+qs/3]:"")+F+(N&&m==="("?")":""),I){for(P=-1,S=_.length;++P<S;)if(A=_.charCodeAt(P),48>A||A>57){F=(A===46?o+_.slice(P+1):_.slice(P))+F,_=_.slice(0,P);break}}}x&&!g&&(_=e(_,1/0));var O=L.length+_.length+F.length,R=O<b?new Array(b-O+1).join(l):"";switch(x&&g&&(_=e(R+_,R.length?b-F.length:1/0),R=""),p){case"<":_=L+_+F+R;break;case"=":_=L+R+_+F;break;case"^":_=R.slice(0,O=R.length>>1)+L+_+F+R.slice(O);break;default:_=R+L+_+F;break}return i(_)}return D.toString=function(){return d+""},D}function s(d,l){var p=c((d=He(d),d.type="f",d)),m=Math.max(-8,Math.min(8,Math.floor(We(l)/3)))*3,h=Math.pow(10,-m),g=Zh[8+m/3];return function(b){return p(h*b)+g}}return{format:c,formatPrefix:s}}var Mf,Ge,Sf;Us({thousands:",",grouping:[3],currency:["$",""]});function Us(t){return Mf=Kh(t),Ge=Mf.format,Sf=Mf.formatPrefix,Mf}function Xs(t){return Math.max(0,-We(Math.abs(t)))}function Ws(t,e){return Math.max(0,Math.max(-8,Math.min(8,Math.floor(We(e)/3)))*3-We(Math.abs(t)))}function Hs(t,e){return t=Math.abs(t),e=Math.abs(e)-t,Math.max(0,We(e)-We(t))+1}var U=1e-6,Tf=1e-12,V=Math.PI,ft=V/2,Gs=V/4,Nt=V*2,$t=180/V,ut=V/180,K=Math.abs,ve=Math.atan,qt=Math.atan2,B=Math.cos;var _f=Math.exp;var lr=Math.log,Cf=Math.pow,z=Math.sin,Gt=Math.sign||function(t){return t>0?1:t<0?-1:0},mt=Math.sqrt,Vr=Math.tan;function Af(t){return t>1?0:t<-1?V:Math.acos(t)}function Mt(t){return t>1?ft:t<-1?-ft:Math.asin(t)}function Rt(){}function $f(t,e){t&&Jh.hasOwnProperty(t.type)&&Jh[t.type](t,e)}var Qh={Feature:function(t,e){$f(t.geometry,e)},FeatureCollection:function(t,e){for(var n=t.features,r=-1,o=n.length;++r<o;)$f(n[r].geometry,e)}},Jh={Sphere:function(t,e){e.sphere()},Point:function(t,e){t=t.coordinates,e.point(t[0],t[1],t[2])},MultiPoint:function(t,e){for(var n=t.coordinates,r=-1,o=n.length;++r<o;)t=n[r],e.point(t[0],t[1],t[2])},LineString:function(t,e){Vs(t.coordinates,e,0)},MultiLineString:function(t,e){for(var n=t.coordinates,r=-1,o=n.length;++r<o;)Vs(n[r],e,0)},Polygon:function(t,e){t0(t.coordinates,e)},MultiPolygon:function(t,e){for(var n=t.coordinates,r=-1,o=n.length;++r<o;)t0(n[r],e)},GeometryCollection:function(t,e){for(var n=t.geometries,r=-1,o=n.length;++r<o;)$f(n[r],e)}};function Vs(t,e,n){var r=-1,o=t.length-n,i;for(e.lineStart();++r<o;)i=t[r],e.point(i[0],i[1],i[2]);e.lineEnd()}function t0(t,e){var n=-1,r=t.length;for(e.polygonStart();++n<r;)Vs(t[n],e,1);e.polygonEnd()}function Ie(t,e){t&&Qh.hasOwnProperty(t.type)?Qh[t.type](t,e):$f(t,e)}function li(t){return[qt(t[1],t[0]),Mt(t[2])]}function Ve(t){var e=t[0],n=t[1],r=B(n);return[r*B(e),r*z(e),z(n)]}function di(t,e){return t[0]*e[0]+t[1]*e[1]+t[2]*e[2]}function jr(t,e){return[t[1]*e[2]-t[2]*e[1],t[2]*e[0]-t[0]*e[2],t[0]*e[1]-t[1]*e[0]]}function Ef(t,e){t[0]+=e[0],t[1]+=e[1],t[2]+=e[2]}function pi(t,e){return[t[0]*e,t[1]*e,t[2]*e]}function mi(t){var e=mt(t[0]*t[0]+t[1]*t[1]+t[2]*t[2]);t[0]/=e,t[1]/=e,t[2]/=e}function hi(t,e){function n(r,o){return r=t(r,o),e(r[0],r[1])}return t.invert&&e.invert&&(n.invert=function(r,o){return r=e.invert(r,o),r&&t.invert(r[0],r[1])}),n}function js(t,e){return K(t)>V&&(t-=Math.round(t/Nt)*Nt),[t,e]}js.invert=js;function Zs(t,e,n){return(t%=Nt)?e||n?hi(n0(t),r0(e,n)):n0(t):e||n?r0(e,n):js}function e0(t){return function(e,n){return e+=t,K(e)>V&&(e-=Math.round(e/Nt)*Nt),[e,n]}}function n0(t){var e=e0(t);return e.invert=e0(-t),e}function r0(t,e){var n=B(t),r=z(t),o=B(e),i=z(e);function a(f,u){var c=B(u),s=B(f)*c,d=z(f)*c,l=z(u),p=l*n+s*r;return[qt(d*o-p*i,s*n-l*r),Mt(p*o+d*i)]}return a.invert=function(f,u){var c=B(u),s=B(f)*c,d=z(f)*c,l=z(u),p=l*o-d*i;return[qt(d*o+l*i,s*n+p*r),Mt(p*n-s*r)]},a}function o0(t){t=Zs(t[0]*ut,t[1]*ut,t.length>2?t[2]*ut:0);function e(n){return n=t(n[0]*ut,n[1]*ut),n[0]*=$t,n[1]*=$t,n}return e.invert=function(n){return n=t.invert(n[0]*ut,n[1]*ut),n[0]*=$t,n[1]*=$t,n},e}function a0(t,e,n,r,o,i){if(n){var a=B(e),f=z(e),u=r*n;o==null?(o=e+r*Nt,i=e-u/2):(o=i0(a,o),i=i0(a,i),(r>0?o<i:o>i)&&(o+=r*Nt));for(var c,s=o;r>0?s>i:s<i;s-=u)c=li([a,-f*B(s),-f*z(s)]),t.point(c[0],c[1])}}function i0(t,e){e=Ve(e),e[0]-=t,mi(e);var n=Af(-e[1]);return((-e[2]<0?-n:n)+Nt-U)%Nt}function If(){var t=[],e;return{point:function(n,r,o){e.push([n,r,o])},lineStart:function(){t.push(e=[])},lineEnd:Rt,rejoin:function(){t.length>1&&t.push(t.pop().concat(t.shift()))},result:function(){var n=t;return t=[],e=null,n}}}function Zr(t,e){return K(t[0]-e[0])<U&&K(t[1]-e[1])<U}function kf(t,e,n,r){this.x=t,this.z=e,this.o=n,this.e=r,this.v=!1,this.n=this.p=null}function Df(t,e,n,r,o){var i=[],a=[],f,u;if(t.forEach(function(m){if(!((h=m.length-1)<=0)){var h,g=m[0],b=m[h],x;if(Zr(g,b)){if(!g[2]&&!b[2]){for(o.lineStart(),f=0;f<h;++f)o.point((g=m[f])[0],g[1]);o.lineEnd();return}b[0]+=2*U}i.push(x=new kf(g,m,null,!0)),a.push(x.o=new kf(g,null,x,!1)),i.push(x=new kf(b,m,null,!1)),a.push(x.o=new kf(b,null,x,!0))}}),!!i.length){for(a.sort(e),f0(i),f0(a),f=0,u=a.length;f<u;++f)a[f].e=n=!n;for(var c=i[0],s,d;;){for(var l=c,p=!0;l.v;)if((l=l.n)===c)return;s=l.z,o.lineStart();do{if(l.v=l.o.v=!0,l.e){if(p)for(f=0,u=s.length;f<u;++f)o.point((d=s[f])[0],d[1]);else r(l.x,l.n.x,1,o);l=l.n}else{if(p)for(s=l.p.z,f=s.length-1;f>=0;--f)o.point((d=s[f])[0],d[1]);else r(l.x,l.p.x,-1,o);l=l.p}l=l.o,s=l.z,p=!p}while(!l.v);o.lineEnd()}}}function f0(t){if(e=t.length){for(var e,n=0,r=t[0],o;++n<e;)r.n=o=t[n],o.p=r,r=o;r.n=o=t[0],o.p=r}}function Ks(t){return K(t[0])<=V?t[0]:Gt(t[0])*((K(t[0])+V)%Nt-V)}function u0(t,e){var n=Ks(e),r=e[1],o=z(r),i=[z(n),-B(n),0],a=0,f=0,u=new ae;o===1?r=ft+U:o===-1&&(r=-ft-U);for(var c=0,s=t.length;c<s;++c)if(l=(d=t[c]).length)for(var d,l,p=d[l-1],m=Ks(p),h=p[1]/2+Gs,g=z(h),b=B(h),x=0;x<l;++x,m=y,g=v,b=T,p=M){var M=d[x],y=Ks(M),w=M[1]/2+Gs,v=z(w),T=B(w),E=y-m,I=E>=0?1:-1,D=I*E,_=D>V,L=g*v;if(u.add(qt(L*I*z(D),b*T+L*B(D))),a+=_?E+I*Nt:E,_^m>=n^y>=n){var F=jr(Ve(p),Ve(M));mi(F);var P=jr(i,F);mi(P);var S=(_^E>=0?-1:1)*Mt(P[2]);(r>S||r===S&&(F[0]||F[1]))&&(f+=_^E>=0?1:-1)}}return(a<-U||a<U&&u<-Tf)^f&1}function Nf(t,e,n,r){return function(o){var i=e(o),a=If(),f=e(a),u=!1,c,s,d,l={point:p,lineStart:h,lineEnd:g,polygonStart:function(){l.point=b,l.lineStart=x,l.lineEnd=M,s=[],c=[]},polygonEnd:function(){l.point=p,l.lineStart=h,l.lineEnd=g,s=Or(s);var y=u0(c,r);s.length?(u||(o.polygonStart(),u=!0),Df(s,mw,y,n,o)):y&&(u||(o.polygonStart(),u=!0),o.lineStart(),n(null,null,1,o),o.lineEnd()),u&&(o.polygonEnd(),u=!1),s=c=null},sphere:function(){o.polygonStart(),o.lineStart(),n(null,null,1,o),o.lineEnd(),o.polygonEnd()}};function p(y,w){t(y,w)&&o.point(y,w)}function m(y,w){i.point(y,w)}function h(){l.point=m,i.lineStart()}function g(){l.point=p,i.lineEnd()}function b(y,w){d.push([y,w]),f.point(y,w)}function x(){f.lineStart(),d=[]}function M(){b(d[0][0],d[0][1]),f.lineEnd();var y=f.clean(),w=a.result(),v,T=w.length,E,I,D;if(d.pop(),c.push(d),d=null,!!T){if(y&1){if(I=w[0],(E=I.length-1)>0){for(u||(o.polygonStart(),u=!0),o.lineStart(),v=0;v<E;++v)o.point((D=I[v])[0],D[1]);o.lineEnd()}return}T>1&&y&2&&w.push(w.pop().concat(w.shift())),s.push(w.filter(pw))}}return l}}function pw(t){return t.length>1}function mw(t,e){return((t=t.x)[0]<0?t[1]-ft-U:ft-t[1])-((e=e.x)[0]<0?e[1]-ft-U:ft-e[1])}var Qs=Nf(function(){return!0},hw,xw,[-V,-ft]);function hw(t){var e=NaN,n=NaN,r=NaN,o;return{lineStart:function(){t.lineStart(),o=1},point:function(i,a){var f=i>0?V:-V,u=K(i-e);K(u-V)<U?(t.point(e,n=(n+a)/2>0?ft:-ft),t.point(r,n),t.lineEnd(),t.lineStart(),t.point(f,n),t.point(i,n),o=0):r!==f&&u>=V&&(K(e-r)<U&&(e-=r*U),K(i-f)<U&&(i-=f*U),n=gw(e,n,i,a),t.point(r,n),t.lineEnd(),t.lineStart(),t.point(f,n),o=0),t.point(e=i,n=a),r=f},lineEnd:function(){t.lineEnd(),e=n=NaN},clean:function(){return 2-o}}}function gw(t,e,n,r){var o,i,a=z(t-n);return K(a)>U?ve((z(e)*(i=B(r))*z(n)-z(r)*(o=B(e))*z(t))/(o*i*a)):(e+r)/2}function xw(t,e,n,r){var o;if(t==null)o=n*ft,r.point(-V,o),r.point(0,o),r.point(V,o),r.point(V,0),r.point(V,-o),r.point(0,-o),r.point(-V,-o),r.point(-V,0),r.point(-V,o);else if(K(t[0]-e[0])>U){var i=t[0]<e[0]?V:-V;o=n*i/2,r.point(-i,o),r.point(0,o),r.point(i,o)}else r.point(e[0],e[1])}function c0(t){var e=B(t),n=6*ut,r=e>0,o=K(e)>U;function i(s,d,l,p){a0(p,t,n,l,s,d)}function a(s,d){return B(s)*B(d)>e}function f(s){var d,l,p,m,h;return{lineStart:function(){m=p=!1,h=1},point:function(g,b){var x=[g,b],M,y=a(g,b),w=r?y?0:c(g,b):y?c(g+(g<0?V:-V),b):0;if(!d&&(m=p=y)&&s.lineStart(),y!==p&&(M=u(d,x),(!M||Zr(d,M)||Zr(x,M))&&(x[2]=1)),y!==p)h=0,y?(s.lineStart(),M=u(x,d),s.point(M[0],M[1])):(M=u(d,x),s.point(M[0],M[1],2),s.lineEnd()),d=M;else if(o&&d&&r^y){var v;!(w&l)&&(v=u(x,d,!0))&&(h=0,r?(s.lineStart(),s.point(v[0][0],v[0][1]),s.point(v[1][0],v[1][1]),s.lineEnd()):(s.point(v[1][0],v[1][1]),s.lineEnd(),s.lineStart(),s.point(v[0][0],v[0][1],3)))}y&&(!d||!Zr(d,x))&&s.point(x[0],x[1]),d=x,p=y,l=w},lineEnd:function(){p&&s.lineEnd(),d=null},clean:function(){return h|(m&&p)<<1}}}function u(s,d,l){var p=Ve(s),m=Ve(d),h=[1,0,0],g=jr(p,m),b=di(g,g),x=g[0],M=b-x*x;if(!M)return!l&&s;var y=e*b/M,w=-e*x/M,v=jr(h,g),T=pi(h,y),E=pi(g,w);Ef(T,E);var I=v,D=di(T,I),_=di(I,I),L=D*D-_*(di(T,T)-1);if(!(L<0)){var F=mt(L),P=pi(I,(-D-F)/_);if(Ef(P,T),P=li(P),!l)return P;var S=s[0],A=d[0],N=s[1],O=d[1],R;A<S&&(R=S,S=A,A=R);var tt=A-S,Z=K(tt-V)<U,H=Z||tt<U;if(!Z&&O<N&&(R=N,N=O,O=R),H?Z?N+O>0^P[1]<(K(P[0]-S)<U?N:O):N<=P[1]&&P[1]<=O:tt>V^(S<=P[0]&&P[0]<=A)){var Q=pi(I,(-D+F)/_);return Ef(Q,T),[P,li(Q)]}}}function c(s,d){var l=r?t:V-t,p=0;return s<-l?p|=1:s>l&&(p|=2),d<-l?p|=4:d>l&&(p|=8),p}return Nf(a,f,i,r?[0,-t]:[-V,t-V])}function s0(t,e,n,r,o,i){var a=t[0],f=t[1],u=e[0],c=e[1],s=0,d=1,l=u-a,p=c-f,m;if(m=n-a,!(!l&&m>0)){if(m/=l,l<0){if(m<s)return;m<d&&(d=m)}else if(l>0){if(m>d)return;m>s&&(s=m)}if(m=o-a,!(!l&&m<0)){if(m/=l,l<0){if(m>d)return;m>s&&(s=m)}else if(l>0){if(m<s)return;m<d&&(d=m)}if(m=r-f,!(!p&&m>0)){if(m/=p,p<0){if(m<s)return;m<d&&(d=m)}else if(p>0){if(m>d)return;m>s&&(s=m)}if(m=i-f,!(!p&&m<0)){if(m/=p,p<0){if(m>d)return;m>s&&(s=m)}else if(p>0){if(m<s)return;m<d&&(d=m)}return s>0&&(t[0]=a+s*l,t[1]=f+s*p),d<1&&(e[0]=a+d*l,e[1]=f+d*p),!0}}}}}var gi=1e9,Rf=-gi;function Kr(t,e,n,r){function o(c,s){return t<=c&&c<=n&&e<=s&&s<=r}function i(c,s,d,l){var p=0,m=0;if(c==null||(p=a(c,d))!==(m=a(s,d))||u(c,s)<0^d>0)do l.point(p===0||p===3?t:n,p>1?r:e);while((p=(p+d+4)%4)!==m);else l.point(s[0],s[1])}function a(c,s){return K(c[0]-t)<U?s>0?0:3:K(c[0]-n)<U?s>0?2:1:K(c[1]-e)<U?s>0?1:0:s>0?3:2}function f(c,s){return u(c.x,s.x)}function u(c,s){var d=a(c,1),l=a(s,1);return d!==l?d-l:d===0?s[1]-c[1]:d===1?c[0]-s[0]:d===2?c[1]-s[1]:s[0]-c[0]}return function(c){var s=c,d=If(),l,p,m,h,g,b,x,M,y,w,v,T={point:E,lineStart:L,lineEnd:F,polygonStart:D,polygonEnd:_};function E(S,A){o(S,A)&&s.point(S,A)}function I(){for(var S=0,A=0,N=p.length;A<N;++A)for(var O=p[A],R=1,tt=O.length,Z=O[0],H,Q,at=Z[0],Ut=Z[1];R<tt;++R)H=at,Q=Ut,Z=O[R],at=Z[0],Ut=Z[1],Q<=r?Ut>r&&(at-H)*(r-Q)>(Ut-Q)*(t-H)&&++S:Ut<=r&&(at-H)*(r-Q)<(Ut-Q)*(t-H)&&--S;return S}function D(){s=d,l=[],p=[],v=!0}function _(){var S=I(),A=v&&S,N=(l=Or(l)).length;(A||N)&&(c.polygonStart(),A&&(c.lineStart(),i(null,null,1,c),c.lineEnd()),N&&Df(l,f,S,i,c),c.polygonEnd()),s=c,l=p=m=null}function L(){T.point=P,p&&p.push(m=[]),w=!0,y=!1,x=M=NaN}function F(){l&&(P(h,g),b&&y&&d.rejoin(),l.push(d.result())),T.point=E,y&&s.lineEnd()}function P(S,A){var N=o(S,A);if(p&&m.push([S,A]),w)h=S,g=A,b=N,w=!1,N&&(s.lineStart(),s.point(S,A));else if(N&&y)s.point(S,A);else{var O=[x=Math.max(Rf,Math.min(gi,x)),M=Math.max(Rf,Math.min(gi,M))],R=[S=Math.max(Rf,Math.min(gi,S)),A=Math.max(Rf,Math.min(gi,A))];s0(O,R,t,e,n,r)?(y||(s.lineStart(),s.point(O[0],O[1])),s.point(R[0],R[1]),N||s.lineEnd(),v=!1):N&&(s.lineStart(),s.point(S,A),v=!1)}x=S,M=A,y=N}return T}}var xi=t=>t;var Js=new ae,tl=new ae,l0,d0,el,nl,Nn={point:Rt,lineStart:Rt,lineEnd:Rt,polygonStart:function(){Nn.lineStart=yw,Nn.lineEnd=ww},polygonEnd:function(){Nn.lineStart=Nn.lineEnd=Nn.point=Rt,Js.add(K(tl)),tl=new ae},result:function(){var t=Js/2;return Js=new ae,t}};function yw(){Nn.point=bw}function bw(t,e){Nn.point=p0,l0=el=t,d0=nl=e}function p0(t,e){tl.add(nl*t-el*e),el=t,nl=e}function ww(){p0(l0,d0)}var rl=Nn;var Qr=1/0,Lf=Qr,yi=-Qr,Pf=yi,vw={point:Mw,lineStart:Rt,lineEnd:Rt,polygonStart:Rt,polygonEnd:Rt,result:function(){var t=[[Qr,Lf],[yi,Pf]];return yi=Pf=-(Lf=Qr=1/0),t}};function Mw(t,e){t<Qr&&(Qr=t),t>yi&&(yi=t),e<Lf&&(Lf=e),e>Pf&&(Pf=e)}var Jr=vw;var ol=0,il=0,bi=0,Of=0,Ff=0,to=0,al=0,fl=0,wi=0,g0,x0,je,Ze,ke={point:dr,lineStart:m0,lineEnd:h0,polygonStart:function(){ke.lineStart=_w,ke.lineEnd=Cw},polygonEnd:function(){ke.point=dr,ke.lineStart=m0,ke.lineEnd=h0},result:function(){var t=wi?[al/wi,fl/wi]:to?[Of/to,Ff/to]:bi?[ol/bi,il/bi]:[NaN,NaN];return ol=il=bi=Of=Ff=to=al=fl=wi=0,t}};function dr(t,e){ol+=t,il+=e,++bi}function m0(){ke.point=Sw}function Sw(t,e){ke.point=Tw,dr(je=t,Ze=e)}function Tw(t,e){var n=t-je,r=e-Ze,o=mt(n*n+r*r);Of+=o*(je+t)/2,Ff+=o*(Ze+e)/2,to+=o,dr(je=t,Ze=e)}function h0(){ke.point=dr}function _w(){ke.point=Aw}function Cw(){y0(g0,x0)}function Aw(t,e){ke.point=y0,dr(g0=je=t,x0=Ze=e)}function y0(t,e){var n=t-je,r=e-Ze,o=mt(n*n+r*r);Of+=o*(je+t)/2,Ff+=o*(Ze+e)/2,to+=o,o=Ze*t-je*e,al+=o*(je+t),fl+=o*(Ze+e),wi+=o*3,dr(je=t,Ze=e)}var ul=ke;function qf(t){this._context=t}qf.prototype={_radius:4.5,pointRadius:function(t){return this._radius=t,this},polygonStart:function(){this._line=0},polygonEnd:function(){this._line=NaN},lineStart:function(){this._point=0},lineEnd:function(){this._line===0&&this._context.closePath(),this._point=NaN},point:function(t,e){switch(this._point){case 0:{this._context.moveTo(t,e),this._point=1;break}case 1:{this._context.lineTo(t,e);break}default:{this._context.moveTo(t+this._radius,e),this._context.arc(t,e,this._radius,0,Nt);break}}},result:Rt};var sl=new ae,cl,b0,w0,vi,Mi,Yf={point:Rt,lineStart:function(){Yf.point=$w},lineEnd:function(){cl&&v0(b0,w0),Yf.point=Rt},polygonStart:function(){cl=!0},polygonEnd:function(){cl=null},result:function(){var t=+sl;return sl=new ae,t}};function $w(t,e){Yf.point=v0,b0=vi=t,w0=Mi=e}function v0(t,e){vi-=t,Mi-=e,sl.add(mt(vi*vi+Mi*Mi)),vi=t,Mi=e}var ll=Yf;var M0,zf,S0,T0,eo=class{constructor(e){this._append=e==null?_0:Ew(e),this._radius=4.5,this._=""}pointRadius(e){return this._radius=+e,this}polygonStart(){this._line=0}polygonEnd(){this._line=NaN}lineStart(){this._point=0}lineEnd(){this._line===0&&(this._+="Z"),this._point=NaN}point(e,n){switch(this._point){case 0:{this._append`M${e},${n}`,this._point=1;break}case 1:{this._append`L${e},${n}`;break}default:{if(this._append`M${e},${n}`,this._radius!==S0||this._append!==zf){let r=this._radius,o=this._;this._="",this._append`m0,${r}a${r},${r} 0 1,1 0,${-2*r}a${r},${r} 0 1,1 0,${2*r}z`,S0=r,zf=this._append,T0=this._,this._=o}this._+=T0;break}}}result(){let e=this._;return this._="",e.length?e:null}};function _0(t){let e=1;this._+=t[0];for(let n=t.length;e<n;++e)this._+=arguments[e]+t[e]}function Ew(t){let e=Math.floor(t);if(!(e>=0))throw new RangeError(`invalid digits: ${t}`);if(e>15)return _0;if(e!==M0){let n=10**e;M0=e,zf=function(o){let i=1;this._+=o[0];for(let a=o.length;i<a;++i)this._+=Math.round(arguments[i]*n)/n+o[i]}}return zf}function Si(t,e){let n=3,r=4.5,o,i;function a(f){return f&&(typeof r=="function"&&i.pointRadius(+r.apply(this,arguments)),Ie(f,o(i))),i.result()}return a.area=function(f){return Ie(f,o(rl)),rl.result()},a.measure=function(f){return Ie(f,o(ll)),ll.result()},a.bounds=function(f){return Ie(f,o(Jr)),Jr.result()},a.centroid=function(f){return Ie(f,o(ul)),ul.result()},a.projection=function(f){return arguments.length?(o=f==null?(t=null,xi):(t=f).stream,a):t},a.context=function(f){return arguments.length?(i=f==null?(e=null,new eo(n)):new qf(e=f),typeof r!="function"&&i.pointRadius(r),a):e},a.pointRadius=function(f){return arguments.length?(r=typeof f=="function"?f:(i.pointRadius(+f),+f),a):r},a.digits=function(f){if(!arguments.length)return n;if(f==null)n=null;else{let u=Math.floor(f);if(!(u>=0))throw new RangeError(`invalid digits: ${f}`);n=u}return e===null&&(i=new eo(n)),a},a.projection(t).digits(n).context(e)}function Ti(t){return{stream:no(t)}}function no(t){return function(e){var n=new dl;for(var r in t)n[r]=t[r];return n.stream=e,n}}function dl(){}dl.prototype={constructor:dl,point:function(t,e){this.stream.point(t,e)},sphere:function(){this.stream.sphere()},lineStart:function(){this.stream.lineStart()},lineEnd:function(){this.stream.lineEnd()},polygonStart:function(){this.stream.polygonStart()},polygonEnd:function(){this.stream.polygonEnd()}};function pl(t,e,n){var r=t.clipExtent&&t.clipExtent();return t.scale(150).translate([0,0]),r!=null&&t.clipExtent(null),Ie(n,t.stream(Jr)),e(Jr.result()),r!=null&&t.clipExtent(r),t}function _i(t,e,n){return pl(t,function(r){var o=e[1][0]-e[0][0],i=e[1][1]-e[0][1],a=Math.min(o/(r[1][0]-r[0][0]),i/(r[1][1]-r[0][1])),f=+e[0][0]+(o-a*(r[1][0]+r[0][0]))/2,u=+e[0][1]+(i-a*(r[1][1]+r[0][1]))/2;t.scale(150*a).translate([f,u])},n)}function Bf(t,e,n){return _i(t,[[0,0],e],n)}function Uf(t,e,n){return pl(t,function(r){var o=+e,i=o/(r[1][0]-r[0][0]),a=(o-i*(r[1][0]+r[0][0]))/2,f=-i*r[0][1];t.scale(150*i).translate([a,f])},n)}function Xf(t,e,n){return pl(t,function(r){var o=+e,i=o/(r[1][1]-r[0][1]),a=-i*r[0][0],f=(o-i*(r[1][1]+r[0][1]))/2;t.scale(150*i).translate([a,f])},n)}var C0=16,Iw=B(30*ut);function ml(t,e){return+e?Dw(t,e):kw(t)}function kw(t){return no({point:function(e,n){e=t(e,n),this.stream.point(e[0],e[1])}})}function Dw(t,e){function n(r,o,i,a,f,u,c,s,d,l,p,m,h,g){var b=c-r,x=s-o,M=b*b+x*x;if(M>4*e&&h--){var y=a+l,w=f+p,v=u+m,T=mt(y*y+w*w+v*v),E=Mt(v/=T),I=K(K(v)-1)<U||K(i-d)<U?(i+d)/2:qt(w,y),D=t(I,E),_=D[0],L=D[1],F=_-r,P=L-o,S=x*F-b*P;(S*S/M>e||K((b*F+x*P)/M-.5)>.3||a*l+f*p+u*m<Iw)&&(n(r,o,i,a,f,u,_,L,I,y/=T,w/=T,v,h,g),g.point(_,L),n(_,L,I,y,w,v,c,s,d,l,p,m,h,g))}}return function(r){var o,i,a,f,u,c,s,d,l,p,m,h,g={point:b,lineStart:x,lineEnd:y,polygonStart:function(){r.polygonStart(),g.lineStart=w},polygonEnd:function(){r.polygonEnd(),g.lineStart=x}};function b(E,I){E=t(E,I),r.point(E[0],E[1])}function x(){d=NaN,g.point=M,r.lineStart()}function M(E,I){var D=Ve([E,I]),_=t(E,I);n(d,l,s,p,m,h,d=_[0],l=_[1],s=E,p=D[0],m=D[1],h=D[2],C0,r),r.point(d,l)}function y(){g.point=b,r.lineEnd()}function w(){x(),g.point=v,g.lineEnd=T}function v(E,I){M(o=E,I),i=d,a=l,f=p,u=m,c=h,g.point=M}function T(){n(d,l,s,p,m,h,i,a,o,f,u,c,C0,r),g.lineEnd=y,y()}return g}}var Nw=no({point:function(t,e){this.stream.point(t*ut,e*ut)}});function Rw(t){return no({point:function(e,n){var r=t(e,n);return this.stream.point(r[0],r[1])}})}function Lw(t,e,n,r,o){function i(a,f){return a*=r,f*=o,[e+t*a,n-t*f]}return i.invert=function(a,f){return[(a-e)/t*r,(n-f)/t*o]},i}function A0(t,e,n,r,o,i){if(!i)return Lw(t,e,n,r,o);var a=B(i),f=z(i),u=a*t,c=f*t,s=a/t,d=f/t,l=(f*n-a*e)/t,p=(f*e+a*n)/t;function m(h,g){return h*=r,g*=o,[u*h-c*g+e,n-c*h-u*g]}return m.invert=function(h,g){return[r*(s*h-d*g+l),o*(p-d*h-s*g)]},m}function Yt(t){return hl(function(){return t})()}function hl(t){var e,n=150,r=480,o=250,i=0,a=0,f=0,u=0,c=0,s,d=0,l=1,p=1,m=null,h=Qs,g=null,b,x,M,y=xi,w=.5,v,T,E,I,D;function _(S){return E(S[0]*ut,S[1]*ut)}function L(S){return S=E.invert(S[0],S[1]),S&&[S[0]*$t,S[1]*$t]}_.stream=function(S){return I&&D===S?I:I=Nw(Rw(s)(h(v(y(D=S)))))},_.preclip=function(S){return arguments.length?(h=S,m=void 0,P()):h},_.postclip=function(S){return arguments.length?(y=S,g=b=x=M=null,P()):y},_.clipAngle=function(S){return arguments.length?(h=+S?c0(m=S*ut):(m=null,Qs),P()):m*$t},_.clipExtent=function(S){return arguments.length?(y=S==null?(g=b=x=M=null,xi):Kr(g=+S[0][0],b=+S[0][1],x=+S[1][0],M=+S[1][1]),P()):g==null?null:[[g,b],[x,M]]},_.scale=function(S){return arguments.length?(n=+S,F()):n},_.translate=function(S){return arguments.length?(r=+S[0],o=+S[1],F()):[r,o]},_.center=function(S){return arguments.length?(i=S[0]%360*ut,a=S[1]%360*ut,F()):[i*$t,a*$t]},_.rotate=function(S){return arguments.length?(f=S[0]%360*ut,u=S[1]%360*ut,c=S.length>2?S[2]%360*ut:0,F()):[f*$t,u*$t,c*$t]},_.angle=function(S){return arguments.length?(d=S%360*ut,F()):d*$t},_.reflectX=function(S){return arguments.length?(l=S?-1:1,F()):l<0},_.reflectY=function(S){return arguments.length?(p=S?-1:1,F()):p<0},_.precision=function(S){return arguments.length?(v=ml(T,w=S*S),P()):mt(w)},_.fitExtent=function(S,A){return _i(_,S,A)},_.fitSize=function(S,A){return Bf(_,S,A)},_.fitWidth=function(S,A){return Uf(_,S,A)},_.fitHeight=function(S,A){return Xf(_,S,A)};function F(){var S=A0(n,0,0,l,p,d).apply(null,e(i,a)),A=A0(n,r-S[0],o-S[1],l,p,d);return s=Zs(f,u,c),T=hi(e,A),E=hi(s,T),v=ml(T,w),P()}function P(){return I=D=null,_}return function(){return e=t.apply(this,arguments),_.invert=e.invert&&L,F()}}function ro(t){var e=0,n=V/3,r=hl(t),o=r(e,n);return o.parallels=function(i){return arguments.length?r(e=i[0]*ut,n=i[1]*ut):[e*$t,n*$t]},o}function $0(t){var e=B(t);function n(r,o){return[r*e,z(o)/e]}return n.invert=function(r,o){return[r/e,Mt(o*e)]},n}function E0(t,e){var n=z(t),r=(n+z(e))/2;if(K(r)<U)return $0(t);var o=1+n*(2*r-n),i=mt(o)/r;function a(f,u){var c=mt(o-2*r*z(u))/r;return[c*z(f*=r),i-c*B(f)]}return a.invert=function(f,u){var c=i-u,s=qt(f,K(c))*Gt(c);return c*r<0&&(s-=V*Gt(f)*Gt(c)),[s/r,Mt((o-(f*f+c*c)*r*r)/(2*r))]},a}function Rn(){return ro(E0).scale(155.424).center([0,33.6442])}function Ci(){return Rn().parallels([29.5,45.5]).scale(1070).translate([480,250]).rotate([96,0]).center([-.6,38.7])}function Pw(t){var e=t.length;return{point:function(n,r){for(var o=-1;++o<e;)t[o].point(n,r)},sphere:function(){for(var n=-1;++n<e;)t[n].sphere()},lineStart:function(){for(var n=-1;++n<e;)t[n].lineStart()},lineEnd:function(){for(var n=-1;++n<e;)t[n].lineEnd()},polygonStart:function(){for(var n=-1;++n<e;)t[n].polygonStart()},polygonEnd:function(){for(var n=-1;++n<e;)t[n].polygonEnd()}}}function gl(){var t,e,n=Ci(),r,o=Rn().rotate([154,0]).center([-2,58.5]).parallels([55,65]),i,a=Rn().rotate([157,0]).center([-3,19.9]).parallels([8,18]),f,u,c={point:function(l,p){u=[l,p]}};function s(l){var p=l[0],m=l[1];return u=null,r.point(p,m),u||(i.point(p,m),u)||(f.point(p,m),u)}s.invert=function(l){var p=n.scale(),m=n.translate(),h=(l[0]-m[0])/p,g=(l[1]-m[1])/p;return(g>=.12&&g<.234&&h>=-.425&&h<-.214?o:g>=.166&&g<.234&&h>=-.214&&h<-.115?a:n).invert(l)},s.stream=function(l){return t&&e===l?t:t=Pw([n.stream(e=l),o.stream(l),a.stream(l)])},s.precision=function(l){return arguments.length?(n.precision(l),o.precision(l),a.precision(l),d()):n.precision()},s.scale=function(l){return arguments.length?(n.scale(l),o.scale(l*.35),a.scale(l),s.translate(n.translate())):n.scale()},s.translate=function(l){if(!arguments.length)return n.translate();var p=n.scale(),m=+l[0],h=+l[1];return r=n.translate(l).clipExtent([[m-.455*p,h-.238*p],[m+.455*p,h+.238*p]]).stream(c),i=o.translate([m-.307*p,h+.201*p]).clipExtent([[m-.425*p+U,h+.12*p+U],[m-.214*p-U,h+.234*p-U]]).stream(c),f=a.translate([m-.205*p,h+.212*p]).clipExtent([[m-.214*p+U,h+.166*p+U],[m-.115*p-U,h+.234*p-U]]).stream(c),d()},s.fitExtent=function(l,p){return _i(s,l,p)},s.fitSize=function(l,p){return Bf(s,l,p)},s.fitWidth=function(l,p){return Uf(s,l,p)},s.fitHeight=function(l,p){return Xf(s,l,p)};function d(){return t=e=null,s}return s.scale(1070)}function Wf(t){return function(e,n){var r=B(e),o=B(n),i=t(r*o);return i===1/0?[2,0]:[i*o*z(e),i*z(n)]}}function Ke(t){return function(e,n){var r=mt(e*e+n*n),o=t(r),i=z(o),a=B(o);return[qt(e*i,r*a),Mt(r&&n*i/r)]}}var xl=Wf(function(t){return mt(2/(1+t))});xl.invert=Ke(function(t){return 2*Mt(t/2)});function yl(){return Yt(xl).scale(124.75).clipAngle(180-.001)}var bl=Wf(function(t){return(t=Af(t))&&t/z(t)});bl.invert=Ke(function(t){return t});function wl(){return Yt(bl).scale(79.4188).clipAngle(180-.001)}function oo(t,e){return[t,lr(Vr((ft+e)/2))]}oo.invert=function(t,e){return[t,2*ve(_f(e))-ft]};function vl(){return Ml(oo).scale(961/Nt)}function Ml(t){var e=Yt(t),n=e.center,r=e.scale,o=e.translate,i=e.clipExtent,a=null,f,u,c;e.scale=function(d){return arguments.length?(r(d),s()):r()},e.translate=function(d){return arguments.length?(o(d),s()):o()},e.center=function(d){return arguments.length?(n(d),s()):n()},e.clipExtent=function(d){return arguments.length?(d==null?a=f=u=c=null:(a=+d[0][0],f=+d[0][1],u=+d[1][0],c=+d[1][1]),s()):a==null?null:[[a,f],[u,c]]};function s(){var d=V*r(),l=e(o0(e.rotate()).invert([0,0]));return i(a==null?[[l[0]-d,l[1]-d],[l[0]+d,l[1]+d]]:t===oo?[[Math.max(l[0]-d,a),f],[Math.min(l[0]+d,u),c]]:[[a,Math.max(l[1]-d,f)],[u,Math.min(l[1]+d,c)]])}return s()}function Hf(t){return Vr((ft+t)/2)}function I0(t,e){var n=B(t),r=t===e?z(t):lr(n/B(e))/lr(Hf(e)/Hf(t)),o=n*Cf(Hf(t),r)/r;if(!r)return oo;function i(a,f){o>0?f<-ft+U&&(f=-ft+U):f>ft-U&&(f=ft-U);var u=o/Cf(Hf(f),r);return[u*z(r*a),o-u*B(r*a)]}return i.invert=function(a,f){var u=o-f,c=Gt(r)*mt(a*a+u*u),s=qt(a,K(u))*Gt(u);return u*r<0&&(s-=V*Gt(a)*Gt(u)),[s/r,2*ve(Cf(o/c,1/r))-ft]},i}function Sl(){return ro(I0).scale(109.5).parallels([30,30])}function io(t,e){return[t,e]}io.invert=io;function Tl(){return Yt(io).scale(152.63)}function k0(t,e){var n=B(t),r=t===e?z(t):(n-B(e))/(e-t),o=n/r+t;if(K(r)<U)return io;function i(a,f){var u=o-f,c=r*a;return[u*z(c),o-u*B(c)]}return i.invert=function(a,f){var u=o-f,c=qt(a,K(u))*Gt(u);return u*r<0&&(c-=V*Gt(a)*Gt(u)),[c/r,o-Gt(r)*mt(a*a+u*u)]},i}function _l(){return ro(k0).scale(131.154).center([0,13.9389])}var Ai=1.340264,$i=-.081106,Ei=893e-6,Ii=.003796,Gf=mt(3)/2,Ow=12;function Cl(t,e){var n=Mt(Gf*z(e)),r=n*n,o=r*r*r;return[t*B(n)/(Gf*(Ai+3*$i*r+o*(7*Ei+9*Ii*r))),n*(Ai+$i*r+o*(Ei+Ii*r))]}Cl.invert=function(t,e){for(var n=e,r=n*n,o=r*r*r,i=0,a,f,u;i<Ow&&(f=n*(Ai+$i*r+o*(Ei+Ii*r))-e,u=Ai+3*$i*r+o*(7*Ei+9*Ii*r),n-=a=f/u,r=n*n,o=r*r*r,!(K(a)<Tf));++i);return[Gf*t*(Ai+3*$i*r+o*(7*Ei+9*Ii*r))/B(n),Mt(z(n)/Gf)]};function Al(){return Yt(Cl).scale(177.158)}function $l(t,e){var n=B(e),r=B(t)*n;return[n*z(t)/r,z(e)/r]}$l.invert=Ke(ve);function El(){return Yt($l).scale(144.049).clipAngle(60)}function Il(t,e){return[B(e)*z(t),z(e)]}Il.invert=Ke(Mt);function kl(){return Yt(Il).scale(249.5).clipAngle(90+U)}function Dl(t,e){var n=B(e),r=1+B(t)*n;return[n*z(t)/r,z(e)/r]}Dl.invert=Ke(function(t){return 2*ve(t)});function Nl(){return Yt(Dl).scale(250).clipAngle(142)}function Rl(t,e){return[lr(Vr((ft+e)/2)),-t]}Rl.invert=function(t,e){return[-e,2*ve(_f(t))-ft]};function Ll(){var t=Ml(Rl),e=t.center,n=t.rotate;return t.center=function(r){return arguments.length?e([-r[1],r[0]]):(r=e(),[r[1],-r[0]])},t.rotate=function(r){return arguments.length?n([r[0],r[1],r.length>2?r[2]+90:90]):(r=n(),[r[0],r[1],r[2]-90])},n([0,0,90]).scale(159.155)}function _t(t,e){switch(arguments.length){case 0:break;case 1:this.range(t);break;default:this.range(e).domain(t);break}return this}function ki(t,e){switch(arguments.length){case 0:break;case 1:{typeof t=="function"?this.interpolator(t):this.range(t);break}default:{this.domain(t),typeof e=="function"?this.interpolator(e):this.range(e);break}}return this}var Di=Symbol("implicit");function pr(){var t=new Qt,e=[],n=[],r=Di;function o(i){let a=t.get(i);if(a===void 0){if(r!==Di)return r;t.set(i,a=e.push(i)-1)}return n[a%n.length]}return o.domain=function(i){if(!arguments.length)return e.slice();e=[],t=new Qt;for(let a of i)t.has(a)||t.set(a,e.push(a)-1);return o},o.range=function(i){return arguments.length?(n=Array.from(i),o):n.slice()},o.unknown=function(i){return arguments.length?(r=i,o):r},o.copy=function(){return pr(e,n).unknown(r)},_t.apply(o,arguments),o}function Ln(){var t=pr().unknown(void 0),e=t.domain,n=t.range,r=0,o=1,i,a,f=!1,u=0,c=0,s=.5;delete t.unknown;function d(){var l=e().length,p=o<r,m=p?o:r,h=p?r:o;i=(h-m)/Math.max(1,l-u+c*2),f&&(i=Math.floor(i)),m+=(h-m-i*(l-u))*s,a=i*(1-u),f&&(m=Math.round(m),a=Math.round(a));var g=er(l).map(function(b){return m+i*b});return n(p?g.reverse():g)}return t.domain=function(l){return arguments.length?(e(l),d()):e()},t.range=function(l){return arguments.length?([r,o]=l,r=+r,o=+o,d()):[r,o]},t.rangeRound=function(l){return[r,o]=l,r=+r,o=+o,f=!0,d()},t.bandwidth=function(){return a},t.step=function(){return i},t.round=function(l){return arguments.length?(f=!!l,d()):f},t.padding=function(l){return arguments.length?(u=Math.min(1,c=+l),d()):u},t.paddingInner=function(l){return arguments.length?(u=Math.min(1,l),d()):u},t.paddingOuter=function(l){return arguments.length?(c=+l,d()):c},t.align=function(l){return arguments.length?(s=Math.max(0,Math.min(1,l)),d()):s},t.copy=function(){return Ln(e(),[r,o]).round(f).paddingInner(u).paddingOuter(c).align(s)},_t.apply(d(),arguments)}function D0(t){var e=t.copy;return t.padding=t.paddingOuter,delete t.paddingInner,delete t.paddingOuter,t.copy=function(){return D0(e())},t}function Pl(){return D0(Ln.apply(null,arguments).paddingInner(1))}function Ol(t){return function(){return t}}function ao(t){return+t}var N0=[0,1];function oe(t){return t}function Fl(t,e){return(e-=t=+t)?function(n){return(n-t)/e}:Ol(isNaN(e)?NaN:.5)}function Fw(t,e){var n;return t>e&&(n=t,t=e,e=n),function(r){return Math.max(t,Math.min(e,r))}}function qw(t,e,n){var r=t[0],o=t[1],i=e[0],a=e[1];return o<r?(r=Fl(o,r),i=n(a,i)):(r=Fl(r,o),i=n(i,a)),function(f){return i(r(f))}}function Yw(t,e,n){var r=Math.min(t.length,e.length)-1,o=new Array(r),i=new Array(r),a=-1;for(t[r]<t[0]&&(t=t.slice().reverse(),e=e.slice().reverse());++a<r;)o[a]=Fl(t[a],t[a+1]),i[a]=n(e[a],e[a+1]);return function(f){var u=un(t,f,1,r)-1;return i[u](o[u](f))}}function Qe(t,e){return e.domain(t.domain()).range(t.range()).interpolate(t.interpolate()).clamp(t.clamp()).unknown(t.unknown())}function mr(){var t=N0,e=N0,n=Ee,r,o,i,a=oe,f,u,c;function s(){var l=Math.min(t.length,e.length);return a!==oe&&(a=Fw(t[0],t[l-1])),f=l>2?Yw:qw,u=c=null,d}function d(l){return l==null||isNaN(l=+l)?i:(u||(u=f(t.map(r),e,n)))(r(a(l)))}return d.invert=function(l){return a(o((c||(c=f(e,t.map(r),ht)))(l)))},d.domain=function(l){return arguments.length?(t=Array.from(l,ao),s()):t.slice()},d.range=function(l){return arguments.length?(e=Array.from(l),s()):e.slice()},d.rangeRound=function(l){return e=Array.from(l),n=fr,s()},d.clamp=function(l){return arguments.length?(a=l?!0:oe,s()):a!==oe},d.interpolate=function(l){return arguments.length?(n=l,s()):n},d.unknown=function(l){return arguments.length?(i=l,d):i},function(l,p){return r=l,o=p,s()}}function Ni(){return mr()(oe,oe)}function ql(t,e,n,r){var o=Pr(t,e,n),i;switch(r=He(r??",f"),r.type){case"s":{var a=Math.max(Math.abs(t),Math.abs(e));return r.precision==null&&!isNaN(i=Ws(o,a))&&(r.precision=i),Sf(r,a)}case"":case"e":case"g":case"p":case"r":{r.precision==null&&!isNaN(i=Hs(o,Math.max(Math.abs(t),Math.abs(e))))&&(r.precision=i-(r.type==="e"));break}case"f":case"%":{r.precision==null&&!isNaN(i=Xs(o))&&(r.precision=i-(r.type==="%")*2);break}}return Ge(r)}function bn(t){var e=t.domain;return t.ticks=function(n){var r=e();return Ae(r[0],r[r.length-1],n??10)},t.tickFormat=function(n,r){var o=e();return ql(o[0],o[o.length-1],n??10,r)},t.nice=function(n){n==null&&(n=10);var r=e(),o=0,i=r.length-1,a=r[o],f=r[i],u,c,s=10;for(f<a&&(c=a,a=f,f=c,c=o,o=i,i=c);s-- >0;){if(c=tr(a,f,n),c===u)return r[o]=a,r[i]=f,e(r);if(c>0)a=Math.floor(a/c)*c,f=Math.ceil(f/c)*c;else if(c<0)a=Math.ceil(a*c)/c,f=Math.floor(f*c)/c;else break;u=c}return t},t}function hr(){var t=Ni();return t.copy=function(){return Qe(t,hr())},_t.apply(t,arguments),bn(t)}function Ri(t){var e;function n(r){return r==null||isNaN(r=+r)?e:r}return n.invert=n,n.domain=n.range=function(r){return arguments.length?(t=Array.from(r,ao),n):t.slice()},n.unknown=function(r){return arguments.length?(e=r,n):e},n.copy=function(){return Ri(t).unknown(e)},t=arguments.length?Array.from(t,ao):[0,1],bn(n)}function Li(t,e){t=t.slice();var n=0,r=t.length-1,o=t[n],i=t[r],a;return i<o&&(a=n,n=r,r=a,a=o,o=i,i=a),t[n]=e.floor(o),t[r]=e.ceil(i),t}function R0(t){return Math.log(t)}function L0(t){return Math.exp(t)}function zw(t){return-Math.log(-t)}function Bw(t){return-Math.exp(-t)}function Uw(t){return isFinite(t)?+("1e"+t):t<0?0:t}function Xw(t){return t===10?Uw:t===Math.E?Math.exp:e=>Math.pow(t,e)}function Ww(t){return t===Math.E?Math.log:t===10&&Math.log10||t===2&&Math.log2||(t=Math.log(t),e=>Math.log(e)/t)}function P0(t){return(e,n)=>-t(-e,n)}function Yl(t){let e=t(R0,L0),n=e.domain,r=10,o,i;function a(){return o=Ww(r),i=Xw(r),n()[0]<0?(o=P0(o),i=P0(i),t(zw,Bw)):t(R0,L0),e}return e.base=function(f){return arguments.length?(r=+f,a()):r},e.domain=function(f){return arguments.length?(n(f),a()):n()},e.ticks=f=>{let u=n(),c=u[0],s=u[u.length-1],d=s<c;d&&([c,s]=[s,c]);let l=o(c),p=o(s),m,h,g=f==null?10:+f,b=[];if(!(r%1)&&p-l<g){if(l=Math.floor(l),p=Math.ceil(p),c>0){for(;l<=p;++l)for(m=1;m<r;++m)if(h=l<0?m/i(-l):m*i(l),!(h<c)){if(h>s)break;b.push(h)}}else for(;l<=p;++l)for(m=r-1;m>=1;--m)if(h=l>0?m/i(-l):m*i(l),!(h<c)){if(h>s)break;b.push(h)}b.length*2<g&&(b=Ae(c,s,g))}else b=Ae(l,p,Math.min(p-l,g)).map(i);return d?b.reverse():b},e.tickFormat=(f,u)=>{if(f==null&&(f=10),u==null&&(u=r===10?"s":","),typeof u!="function"&&(!(r%1)&&(u=He(u)).precision==null&&(u.trim=!0),u=Ge(u)),f===1/0)return u;let c=Math.max(1,r*f/e.ticks().length);return s=>{let d=s/i(Math.round(o(s)));return d*r<r-.5&&(d*=r),d<=c?u(s):""}},e.nice=()=>n(Li(n(),{floor:f=>i(Math.floor(o(f))),ceil:f=>i(Math.ceil(o(f)))})),e}function Pi(){let t=Yl(mr()).domain([1,10]);return t.copy=()=>Qe(t,Pi()).base(t.base()),_t.apply(t,arguments),t}function O0(t){return function(e){return Math.sign(e)*Math.log1p(Math.abs(e/t))}}function F0(t){return function(e){return Math.sign(e)*Math.expm1(Math.abs(e))*t}}function zl(t){var e=1,n=t(O0(e),F0(e));return n.constant=function(r){return arguments.length?t(O0(e=+r),F0(e)):e},bn(n)}function Oi(){var t=zl(mr());return t.copy=function(){return Qe(t,Oi()).constant(t.constant())},_t.apply(t,arguments)}function q0(t){return function(e){return e<0?-Math.pow(-e,t):Math.pow(e,t)}}function Hw(t){return t<0?-Math.sqrt(-t):Math.sqrt(t)}function Gw(t){return t<0?-t*t:t*t}function Bl(t){var e=t(oe,oe),n=1;function r(){return n===1?t(oe,oe):n===.5?t(Hw,Gw):t(q0(n),q0(1/n))}return e.exponent=function(o){return arguments.length?(n=+o,r()):n},bn(e)}function Fi(){var t=Bl(mr());return t.copy=function(){return Qe(t,Fi()).exponent(t.exponent())},_t.apply(t,arguments),t}function qi(){var t=[],e=[],n=[],r;function o(){var a=0,f=Math.max(1,e.length);for(n=new Array(f-1);++a<f;)n[a-1]=cs(t,a/f);return i}function i(a){return a==null||isNaN(a=+a)?r:e[un(n,a)]}return i.invertExtent=function(a){var f=e.indexOf(a);return f<0?[NaN,NaN]:[f>0?n[f-1]:t[0],f<n.length?n[f]:t[t.length-1]]},i.domain=function(a){if(!arguments.length)return t.slice();t=[];for(let f of a)f!=null&&!isNaN(f=+f)&&t.push(f);return t.sort(bt),o()},i.range=function(a){return arguments.length?(e=Array.from(a),o()):e.slice()},i.unknown=function(a){return arguments.length?(r=a,i):r},i.quantiles=function(){return n.slice()},i.copy=function(){return qi().domain(t).range(e).unknown(r)},_t.apply(i,arguments)}function Yi(){var t=[.5],e=[0,1],n,r=1;function o(i){return i!=null&&i<=i?e[un(t,i,0,r)]:n}return o.domain=function(i){return arguments.length?(t=Array.from(i),r=Math.min(t.length,e.length-1),o):t.slice()},o.range=function(i){return arguments.length?(e=Array.from(i),r=Math.min(t.length,e.length-1),o):e.slice()},o.invertExtent=function(i){var a=e.indexOf(i);return[t[a-1],t[a]]},o.unknown=function(i){return arguments.length?(n=i,o):n},o.copy=function(){return Yi().domain(t).range(e).unknown(n)},_t.apply(o,arguments)}var Ul=new Date,Xl=new Date;function dt(t,e,n,r){function o(i){return t(i=arguments.length===0?new Date:new Date(+i)),i}return o.floor=i=>(t(i=new Date(+i)),i),o.ceil=i=>(t(i=new Date(i-1)),e(i,1),t(i),i),o.round=i=>{let a=o(i),f=o.ceil(i);return i-a<f-i?a:f},o.offset=(i,a)=>(e(i=new Date(+i),a==null?1:Math.floor(a)),i),o.range=(i,a,f)=>{let u=[];if(i=o.ceil(i),f=f==null?1:Math.floor(f),!(i<a)||!(f>0))return u;let c;do u.push(c=new Date(+i)),e(i,f),t(i);while(c<i&&i<a);return u},o.filter=i=>dt(a=>{if(a>=a)for(;t(a),!i(a);)a.setTime(a-1)},(a,f)=>{if(a>=a)if(f<0)for(;++f<=0;)for(;e(a,-1),!i(a););else for(;--f>=0;)for(;e(a,1),!i(a););}),n&&(o.count=(i,a)=>(Ul.setTime(+i),Xl.setTime(+a),t(Ul),t(Xl),Math.floor(n(Ul,Xl))),o.every=i=>(i=Math.floor(i),!isFinite(i)||!(i>0)?null:i>1?o.filter(r?a=>r(a)%i===0:a=>o.count(0,a)%i===0):o)),o}var zi=dt(()=>{},(t,e)=>{t.setTime(+t+e)},(t,e)=>e-t);zi.every=t=>(t=Math.floor(t),!isFinite(t)||!(t>0)?null:t>1?dt(e=>{e.setTime(Math.floor(e/t)*t)},(e,n)=>{e.setTime(+e+n*t)},(e,n)=>(n-e)/t):zi);var Nk=zi.range;var Vt=dt(t=>{t.setTime(t-t.getMilliseconds())},(t,e)=>{t.setTime(+t+e*1e3)},(t,e)=>(e-t)/1e3,t=>t.getUTCSeconds()),Y0=Vt.range;var Pn=dt(t=>{t.setTime(t-t.getMilliseconds()-t.getSeconds()*1e3)},(t,e)=>{t.setTime(+t+e*6e4)},(t,e)=>(e-t)/6e4,t=>t.getMinutes()),Vw=Pn.range,On=dt(t=>{t.setUTCSeconds(0,0)},(t,e)=>{t.setTime(+t+e*6e4)},(t,e)=>(e-t)/6e4,t=>t.getUTCMinutes()),jw=On.range;var Fn=dt(t=>{t.setTime(t-t.getMilliseconds()-t.getSeconds()*1e3-t.getMinutes()*6e4)},(t,e)=>{t.setTime(+t+e*36e5)},(t,e)=>(e-t)/36e5,t=>t.getHours()),Zw=Fn.range,qn=dt(t=>{t.setUTCMinutes(0,0,0)},(t,e)=>{t.setTime(+t+e*36e5)},(t,e)=>(e-t)/36e5,t=>t.getUTCHours()),Kw=qn.range;var De=dt(t=>t.setHours(0,0,0,0),(t,e)=>t.setDate(t.getDate()+e),(t,e)=>(e-t-(e.getTimezoneOffset()-t.getTimezoneOffset())*6e4)/864e5,t=>t.getDate()-1),Qw=De.range,yr=dt(t=>{t.setUTCHours(0,0,0,0)},(t,e)=>{t.setUTCDate(t.getUTCDate()+e)},(t,e)=>(e-t)/864e5,t=>t.getUTCDate()-1),Jw=yr.range,fo=dt(t=>{t.setUTCHours(0,0,0,0)},(t,e)=>{t.setUTCDate(t.getUTCDate()+e)},(t,e)=>(e-t)/864e5,t=>Math.floor(t/864e5)),t6=fo.range;function br(t){return dt(e=>{e.setDate(e.getDate()-(e.getDay()+7-t)%7),e.setHours(0,0,0,0)},(e,n)=>{e.setDate(e.getDate()+n*7)},(e,n)=>(n-e-(n.getTimezoneOffset()-e.getTimezoneOffset())*6e4)/6048e5)}var ce=br(0),Yn=br(1),Vf=br(2),jf=br(3),tn=br(4),Zf=br(5),Kf=br(6),B0=ce.range,e6=Yn.range,n6=Vf.range,r6=jf.range,o6=tn.range,i6=Zf.range,a6=Kf.range;function wr(t){return dt(e=>{e.setUTCDate(e.getUTCDate()-(e.getUTCDay()+7-t)%7),e.setUTCHours(0,0,0,0)},(e,n)=>{e.setUTCDate(e.getUTCDate()+n*7)},(e,n)=>(n-e)/6048e5)}var se=wr(0),zn=wr(1),Qf=wr(2),Jf=wr(3),en=wr(4),tu=wr(5),eu=wr(6),U0=se.range,f6=zn.range,u6=Qf.range,c6=Jf.range,s6=en.range,l6=tu.range,d6=eu.range;var Bn=dt(t=>{t.setDate(1),t.setHours(0,0,0,0)},(t,e)=>{t.setMonth(t.getMonth()+e)},(t,e)=>e.getMonth()-t.getMonth()+(e.getFullYear()-t.getFullYear())*12,t=>t.getMonth()),p6=Bn.range,Un=dt(t=>{t.setUTCDate(1),t.setUTCHours(0,0,0,0)},(t,e)=>{t.setUTCMonth(t.getUTCMonth()+e)},(t,e)=>e.getUTCMonth()-t.getUTCMonth()+(e.getUTCFullYear()-t.getUTCFullYear())*12,t=>t.getUTCMonth()),m6=Un.range;var jt=dt(t=>{t.setMonth(0,1),t.setHours(0,0,0,0)},(t,e)=>{t.setFullYear(t.getFullYear()+e)},(t,e)=>e.getFullYear()-t.getFullYear(),t=>t.getFullYear());jt.every=t=>!isFinite(t=Math.floor(t))||!(t>0)?null:dt(e=>{e.setFullYear(Math.floor(e.getFullYear()/t)*t),e.setMonth(0,1),e.setHours(0,0,0,0)},(e,n)=>{e.setFullYear(e.getFullYear()+n*t)});var h6=jt.range,Zt=dt(t=>{t.setUTCMonth(0,1),t.setUTCHours(0,0,0,0)},(t,e)=>{t.setUTCFullYear(t.getUTCFullYear()+e)},(t,e)=>e.getUTCFullYear()-t.getUTCFullYear(),t=>t.getUTCFullYear());Zt.every=t=>!isFinite(t=Math.floor(t))||!(t>0)?null:dt(e=>{e.setUTCFullYear(Math.floor(e.getUTCFullYear()/t)*t),e.setUTCMonth(0,1),e.setUTCHours(0,0,0,0)},(e,n)=>{e.setUTCFullYear(e.getUTCFullYear()+n*t)});var g6=Zt.range;function W0(t,e,n,r,o,i){let a=[[Vt,1,1e3],[Vt,5,5*1e3],[Vt,15,15*1e3],[Vt,30,30*1e3],[i,1,6e4],[i,5,5*6e4],[i,15,15*6e4],[i,30,30*6e4],[o,1,36e5],[o,3,3*36e5],[o,6,6*36e5],[o,12,12*36e5],[r,1,864e5],[r,2,2*864e5],[n,1,6048e5],[e,1,2592e6],[e,3,3*2592e6],[t,1,31536e6]];function f(c,s,d){let l=s<c;l&&([c,s]=[s,c]);let p=d&&typeof d.range=="function"?d:u(c,s,d),m=p?p.range(c,+s+1):[];return l?m.reverse():m}function u(c,s,d){let l=Math.abs(s-c)/d,p=Fe(([,,g])=>g).right(a,l);if(p===a.length)return t.every(Pr(c/31536e6,s/31536e6,d));if(p===0)return zi.every(Math.max(Pr(c,s,d),1));let[m,h]=a[l/a[p-1][2]<a[p][2]/l?p-1:p];return m.every(h)}return[f,u]}var[Wl,Ui]=W0(Zt,Un,se,fo,qn,On),[Hl,Gl]=W0(jt,Bn,ce,De,Fn,Pn);function Vl(t){if(0<=t.y&&t.y<100){var e=new Date(-1,t.m,t.d,t.H,t.M,t.S,t.L);return e.setFullYear(t.y),e}return new Date(t.y,t.m,t.d,t.H,t.M,t.S,t.L)}function jl(t){if(0<=t.y&&t.y<100){var e=new Date(Date.UTC(-1,t.m,t.d,t.H,t.M,t.S,t.L));return e.setUTCFullYear(t.y),e}return new Date(Date.UTC(t.y,t.m,t.d,t.H,t.M,t.S,t.L))}function Xi(t,e,n){return{y:t,m:e,d:n,H:0,M:0,S:0,L:0}}function Zl(t){var e=t.dateTime,n=t.date,r=t.time,o=t.periods,i=t.days,a=t.shortDays,f=t.months,u=t.shortMonths,c=Wi(o),s=Hi(o),d=Wi(i),l=Hi(i),p=Wi(a),m=Hi(a),h=Wi(f),g=Hi(f),b=Wi(u),x=Hi(u),M={a:N,A:O,b:R,B:tt,c:null,d:K0,e:K0,f:Y6,g:Z6,G:Q6,H:O6,I:F6,j:q6,L:ng,m:z6,M:B6,p:Z,q:H,Q:tg,s:eg,S:U6,u:X6,U:W6,V:H6,w:G6,W:V6,x:null,X:null,y:j6,Y:K6,Z:J6,"%":J0},y={a:Q,A:at,b:Ut,B:Oe,c:null,d:Q0,e:Q0,f:rv,g:pv,G:hv,H:tv,I:ev,j:nv,L:og,m:ov,M:iv,p:G,q:X,Q:tg,s:eg,S:av,u:fv,U:uv,V:cv,w:sv,W:lv,x:null,X:null,y:dv,Y:mv,Z:gv,"%":J0},w={a:D,A:_,b:L,B:F,c:P,d:j0,e:j0,f:N6,g:V0,G:G0,H:Z0,I:Z0,j:E6,L:D6,m:$6,M:I6,p:I,q:A6,Q:L6,s:P6,S:k6,u:M6,U:S6,V:T6,w:v6,W:_6,x:S,X:A,y:V0,Y:G0,Z:C6,"%":R6};M.x=v(n,M),M.X=v(r,M),M.c=v(e,M),y.x=v(n,y),y.X=v(r,y),y.c=v(e,y);function v($,q){return function(Y){var C=[],j=-1,J=0,ot=$.length,lt,Xt,Zn;for(Y instanceof Date||(Y=new Date(+Y));++j<ot;)$.charCodeAt(j)===37&&(C.push($.slice(J,j)),(Xt=H0[lt=$.charAt(++j)])!=null?lt=$.charAt(++j):Xt=lt==="e"?" ":"0",(Zn=q[lt])&&(lt=Zn(Y,Xt)),C.push(lt),J=j+1);return C.push($.slice(J,j)),C.join("")}}function T($,q){return function(Y){var C=Xi(1900,void 0,1),j=E(C,$,Y+="",0),J,ot;if(j!=Y.length)return null;if("Q"in C)return new Date(C.Q);if("s"in C)return new Date(C.s*1e3+("L"in C?C.L:0));if(q&&!("Z"in C)&&(C.Z=0),"p"in C&&(C.H=C.H%12+C.p*12),C.m===void 0&&(C.m="q"in C?C.q:0),"V"in C){if(C.V<1||C.V>53)return null;"w"in C||(C.w=1),"Z"in C?(J=jl(Xi(C.y,0,1)),ot=J.getUTCDay(),J=ot>4||ot===0?zn.ceil(J):zn(J),J=yr.offset(J,(C.V-1)*7),C.y=J.getUTCFullYear(),C.m=J.getUTCMonth(),C.d=J.getUTCDate()+(C.w+6)%7):(J=Vl(Xi(C.y,0,1)),ot=J.getDay(),J=ot>4||ot===0?Yn.ceil(J):Yn(J),J=De.offset(J,(C.V-1)*7),C.y=J.getFullYear(),C.m=J.getMonth(),C.d=J.getDate()+(C.w+6)%7)}else("W"in C||"U"in C)&&("w"in C||(C.w="u"in C?C.u%7:"W"in C?1:0),ot="Z"in C?jl(Xi(C.y,0,1)).getUTCDay():Vl(Xi(C.y,0,1)).getDay(),C.m=0,C.d="W"in C?(C.w+6)%7+C.W*7-(ot+5)%7:C.w+C.U*7-(ot+6)%7);return"Z"in C?(C.H+=C.Z/100|0,C.M+=C.Z%100,jl(C)):Vl(C)}}function E($,q,Y,C){for(var j=0,J=q.length,ot=Y.length,lt,Xt;j<J;){if(C>=ot)return-1;if(lt=q.charCodeAt(j++),lt===37){if(lt=q.charAt(j++),Xt=w[lt in H0?q.charAt(j++):lt],!Xt||(C=Xt($,Y,C))<0)return-1}else if(lt!=Y.charCodeAt(C++))return-1}return C}function I($,q,Y){var C=c.exec(q.slice(Y));return C?($.p=s.get(C[0].toLowerCase()),Y+C[0].length):-1}function D($,q,Y){var C=p.exec(q.slice(Y));return C?($.w=m.get(C[0].toLowerCase()),Y+C[0].length):-1}function _($,q,Y){var C=d.exec(q.slice(Y));return C?($.w=l.get(C[0].toLowerCase()),Y+C[0].length):-1}function L($,q,Y){var C=b.exec(q.slice(Y));return C?($.m=x.get(C[0].toLowerCase()),Y+C[0].length):-1}function F($,q,Y){var C=h.exec(q.slice(Y));return C?($.m=g.get(C[0].toLowerCase()),Y+C[0].length):-1}function P($,q,Y){return E($,e,q,Y)}function S($,q,Y){return E($,n,q,Y)}function A($,q,Y){return E($,r,q,Y)}function N($){return a[$.getDay()]}function O($){return i[$.getDay()]}function R($){return u[$.getMonth()]}function tt($){return f[$.getMonth()]}function Z($){return o[+($.getHours()>=12)]}function H($){return 1+~~($.getMonth()/3)}function Q($){return a[$.getUTCDay()]}function at($){return i[$.getUTCDay()]}function Ut($){return u[$.getUTCMonth()]}function Oe($){return f[$.getUTCMonth()]}function G($){return o[+($.getUTCHours()>=12)]}function X($){return 1+~~($.getUTCMonth()/3)}return{format:function($){var q=v($+="",M);return q.toString=function(){return $},q},parse:function($){var q=T($+="",!1);return q.toString=function(){return $},q},utcFormat:function($){var q=v($+="",y);return q.toString=function(){return $},q},utcParse:function($){var q=T($+="",!0);return q.toString=function(){return $},q}}}var H0={"-":"",_:" ",0:"0"},Lt=/^\s*\d+/,y6=/^%/,b6=/[\\^$*+?|[\]().{}]/g;function nt(t,e,n){var r=t<0?"-":"",o=(r?-t:t)+"",i=o.length;return r+(i<n?new Array(n-i+1).join(e)+o:o)}function w6(t){return t.replace(b6,"\\$&")}function Wi(t){return new RegExp("^(?:"+t.map(w6).join("|")+")","i")}function Hi(t){return new Map(t.map((e,n)=>[e.toLowerCase(),n]))}function v6(t,e,n){var r=Lt.exec(e.slice(n,n+1));return r?(t.w=+r[0],n+r[0].length):-1}function M6(t,e,n){var r=Lt.exec(e.slice(n,n+1));return r?(t.u=+r[0],n+r[0].length):-1}function S6(t,e,n){var r=Lt.exec(e.slice(n,n+2));return r?(t.U=+r[0],n+r[0].length):-1}function T6(t,e,n){var r=Lt.exec(e.slice(n,n+2));return r?(t.V=+r[0],n+r[0].length):-1}function _6(t,e,n){var r=Lt.exec(e.slice(n,n+2));return r?(t.W=+r[0],n+r[0].length):-1}function G0(t,e,n){var r=Lt.exec(e.slice(n,n+4));return r?(t.y=+r[0],n+r[0].length):-1}function V0(t,e,n){var r=Lt.exec(e.slice(n,n+2));return r?(t.y=+r[0]+(+r[0]>68?1900:2e3),n+r[0].length):-1}function C6(t,e,n){var r=/^(Z)|([+-]\d\d)(?::?(\d\d))?/.exec(e.slice(n,n+6));return r?(t.Z=r[1]?0:-(r[2]+(r[3]||"00")),n+r[0].length):-1}function A6(t,e,n){var r=Lt.exec(e.slice(n,n+1));return r?(t.q=r[0]*3-3,n+r[0].length):-1}function $6(t,e,n){var r=Lt.exec(e.slice(n,n+2));return r?(t.m=r[0]-1,n+r[0].length):-1}function j0(t,e,n){var r=Lt.exec(e.slice(n,n+2));return r?(t.d=+r[0],n+r[0].length):-1}function E6(t,e,n){var r=Lt.exec(e.slice(n,n+3));return r?(t.m=0,t.d=+r[0],n+r[0].length):-1}function Z0(t,e,n){var r=Lt.exec(e.slice(n,n+2));return r?(t.H=+r[0],n+r[0].length):-1}function I6(t,e,n){var r=Lt.exec(e.slice(n,n+2));return r?(t.M=+r[0],n+r[0].length):-1}function k6(t,e,n){var r=Lt.exec(e.slice(n,n+2));return r?(t.S=+r[0],n+r[0].length):-1}function D6(t,e,n){var r=Lt.exec(e.slice(n,n+3));return r?(t.L=+r[0],n+r[0].length):-1}function N6(t,e,n){var r=Lt.exec(e.slice(n,n+6));return r?(t.L=Math.floor(r[0]/1e3),n+r[0].length):-1}function R6(t,e,n){var r=y6.exec(e.slice(n,n+1));return r?n+r[0].length:-1}function L6(t,e,n){var r=Lt.exec(e.slice(n));return r?(t.Q=+r[0],n+r[0].length):-1}function P6(t,e,n){var r=Lt.exec(e.slice(n));return r?(t.s=+r[0],n+r[0].length):-1}function K0(t,e){return nt(t.getDate(),e,2)}function O6(t,e){return nt(t.getHours(),e,2)}function F6(t,e){return nt(t.getHours()%12||12,e,2)}function q6(t,e){return nt(1+De.count(jt(t),t),e,3)}function ng(t,e){return nt(t.getMilliseconds(),e,3)}function Y6(t,e){return ng(t,e)+"000"}function z6(t,e){return nt(t.getMonth()+1,e,2)}function B6(t,e){return nt(t.getMinutes(),e,2)}function U6(t,e){return nt(t.getSeconds(),e,2)}function X6(t){var e=t.getDay();return e===0?7:e}function W6(t,e){return nt(ce.count(jt(t)-1,t),e,2)}function rg(t){var e=t.getDay();return e>=4||e===0?tn(t):tn.ceil(t)}function H6(t,e){return t=rg(t),nt(tn.count(jt(t),t)+(jt(t).getDay()===4),e,2)}function G6(t){return t.getDay()}function V6(t,e){return nt(Yn.count(jt(t)-1,t),e,2)}function j6(t,e){return nt(t.getFullYear()%100,e,2)}function Z6(t,e){return t=rg(t),nt(t.getFullYear()%100,e,2)}function K6(t,e){return nt(t.getFullYear()%1e4,e,4)}function Q6(t,e){var n=t.getDay();return t=n>=4||n===0?tn(t):tn.ceil(t),nt(t.getFullYear()%1e4,e,4)}function J6(t){var e=t.getTimezoneOffset();return(e>0?"-":(e*=-1,"+"))+nt(e/60|0,"0",2)+nt(e%60,"0",2)}function Q0(t,e){return nt(t.getUTCDate(),e,2)}function tv(t,e){return nt(t.getUTCHours(),e,2)}function ev(t,e){return nt(t.getUTCHours()%12||12,e,2)}function nv(t,e){return nt(1+yr.count(Zt(t),t),e,3)}function og(t,e){return nt(t.getUTCMilliseconds(),e,3)}function rv(t,e){return og(t,e)+"000"}function ov(t,e){return nt(t.getUTCMonth()+1,e,2)}function iv(t,e){return nt(t.getUTCMinutes(),e,2)}function av(t,e){return nt(t.getUTCSeconds(),e,2)}function fv(t){var e=t.getUTCDay();return e===0?7:e}function uv(t,e){return nt(se.count(Zt(t)-1,t),e,2)}function ig(t){var e=t.getUTCDay();return e>=4||e===0?en(t):en.ceil(t)}function cv(t,e){return t=ig(t),nt(en.count(Zt(t),t)+(Zt(t).getUTCDay()===4),e,2)}function sv(t){return t.getUTCDay()}function lv(t,e){return nt(zn.count(Zt(t)-1,t),e,2)}function dv(t,e){return nt(t.getUTCFullYear()%100,e,2)}function pv(t,e){return t=ig(t),nt(t.getUTCFullYear()%100,e,2)}function mv(t,e){return nt(t.getUTCFullYear()%1e4,e,4)}function hv(t,e){var n=t.getUTCDay();return t=n>=4||n===0?en(t):en.ceil(t),nt(t.getUTCFullYear()%1e4,e,4)}function gv(){return"+0000"}function J0(){return"%"}function tg(t){return+t}function eg(t){return Math.floor(+t/1e3)}var uo,Xn,ag,wn,fg;Kl({dateTime:"%x, %X",date:"%-m/%-d/%Y",time:"%-I:%M:%S %p",periods:["AM","PM"],days:["Sunday","Monday","Tuesday","Wednesday","Thursday","Friday","Saturday"],shortDays:["Sun","Mon","Tue","Wed","Thu","Fri","Sat"],months:["January","February","March","April","May","June","July","August","September","October","November","December"],shortMonths:["Jan","Feb","Mar","Apr","May","Jun","Jul","Aug","Sep","Oct","Nov","Dec"]});function Kl(t){return uo=Zl(t),Xn=uo.format,ag=uo.parse,wn=uo.utcFormat,fg=uo.utcParse,uo}function xv(t){return new Date(t)}function yv(t){return t instanceof Date?+t:+new Date(+t)}function nu(t,e,n,r,o,i,a,f,u,c){var s=Ni(),d=s.invert,l=s.domain,p=c(".%L"),m=c(":%S"),h=c("%I:%M"),g=c("%I %p"),b=c("%a %d"),x=c("%b %d"),M=c("%B"),y=c("%Y");function w(v){return(u(v)<v?p:f(v)<v?m:a(v)<v?h:i(v)<v?g:r(v)<v?o(v)<v?b:x:n(v)<v?M:y)(v)}return s.invert=function(v){return new Date(d(v))},s.domain=function(v){return arguments.length?l(Array.from(v,yv)):l().map(xv)},s.ticks=function(v){var T=l();return t(T[0],T[T.length-1],v??10)},s.tickFormat=function(v,T){return T==null?w:c(T)},s.nice=function(v){var T=l();return(!v||typeof v.range!="function")&&(v=e(T[0],T[T.length-1],v??10)),v?l(Li(T,v)):s},s.copy=function(){return Qe(s,nu(t,e,n,r,o,i,a,f,u,c))},s}function ru(){return _t.apply(nu(Hl,Gl,jt,Bn,ce,De,Fn,Pn,Vt,Xn).domain([new Date(2e3,0,1),new Date(2e3,0,2)]),arguments)}function ou(){return _t.apply(nu(Wl,Ui,Zt,Un,se,yr,qn,On,Vt,wn).domain([Date.UTC(2e3,0,1),Date.UTC(2e3,0,2)]),arguments)}function Gi(t,e){return e.domain(t.domain()).interpolator(t.interpolator()).clamp(t.clamp()).unknown(t.unknown())}function iu(){var t=0,e=.5,n=1,r=1,o,i,a,f,u,c=oe,s,d=!1,l;function p(h){return isNaN(h=+h)?l:(h=.5+((h=+s(h))-i)*(r*h<r*i?f:u),c(d?Math.max(0,Math.min(1,h)):h))}p.domain=function(h){return arguments.length?([t,e,n]=h,o=s(t=+t),i=s(e=+e),a=s(n=+n),f=o===i?0:.5/(i-o),u=i===a?0:.5/(a-i),r=i<o?-1:1,p):[t,e,n]},p.clamp=function(h){return arguments.length?(d=!!h,p):d},p.interpolator=function(h){return arguments.length?(c=h,p):c};function m(h){return function(g){var b,x,M;return arguments.length?([b,x,M]=g,c=Xe(h,[b,x,M]),p):[c(0),c(.5),c(1)]}}return p.range=m(Ee),p.rangeRound=m(fr),p.unknown=function(h){return arguments.length?(l=h,p):l},function(h){return s=h,o=h(t),i=h(e),a=h(n),f=o===i?0:.5/(i-o),u=i===a?0:.5/(a-i),r=i<o?-1:1,p}}function Vi(){var t=bn(iu()(oe));return t.copy=function(){return Gi(t,Vi())},ki.apply(t,arguments)}function au(){var t=Yl(iu()).domain([.1,1,10]);return t.copy=function(){return Gi(t,au()).base(t.base())},ki.apply(t,arguments)}function fu(){var t=zl(iu());return t.copy=function(){return Gi(t,fu()).constant(t.constant())},ki.apply(t,arguments)}function uu(){var t=Bl(iu());return t.copy=function(){return Gi(t,uu()).exponent(t.exponent())},ki.apply(t,arguments)}function k(t){for(var e=t.length/6|0,n=new Array(e),r=0;r<e;)n[r]="#"+t.slice(r*6,++r*6);return n}var Ql=k("1f77b4ff7f0e2ca02cd627289467bd8c564be377c27f7f7fbcbd2217becf");var Jl=k("7fc97fbeaed4fdc086ffff99386cb0f0027fbf5b17666666");var td=k("1b9e77d95f027570b3e7298a66a61ee6ab02a6761d666666");var ed=k("a6cee31f78b4b2df8a33a02cfb9a99e31a1cfdbf6fff7f00cab2d66a3d9affff99b15928");var nd=k("fbb4aeb3cde3ccebc5decbe4fed9a6ffffcce5d8bdfddaecf2f2f2");var rd=k("b3e2cdfdcdaccbd5e8f4cae4e6f5c9fff2aef1e2cccccccc");var od=k("e41a1c377eb84daf4a984ea3ff7f00ffff33a65628f781bf999999");var id=k("66c2a5fc8d628da0cbe78ac3a6d854ffd92fe5c494b3b3b3");var ad=k("8dd3c7ffffb3bebadafb807280b1d3fdb462b3de69fccde5d9d9d9bc80bdccebc5ffed6f");var fd=k("4e79a7f28e2ce1575976b7b259a14fedc949af7aa1ff9da79c755fbab0ab");var W=t=>As(t[t.length-1]);var cu=new Array(3).concat("d8b365f5f5f55ab4ac","a6611adfc27d80cdc1018571","a6611adfc27df5f5f580cdc1018571","8c510ad8b365f6e8c3c7eae55ab4ac01665e","8c510ad8b365f6e8c3f5f5f5c7eae55ab4ac01665e","8c510abf812ddfc27df6e8c3c7eae580cdc135978f01665e","8c510abf812ddfc27df6e8c3f5f5f5c7eae580cdc135978f01665e","5430058c510abf812ddfc27df6e8c3c7eae580cdc135978f01665e003c30","5430058c510abf812ddfc27df6e8c3f5f5f5c7eae580cdc135978f01665e003c30").map(k),su=W(cu);var lu=new Array(3).concat("af8dc3f7f7f77fbf7b","7b3294c2a5cfa6dba0008837","7b3294c2a5cff7f7f7a6dba0008837","762a83af8dc3e7d4e8d9f0d37fbf7b1b7837","762a83af8dc3e7d4e8f7f7f7d9f0d37fbf7b1b7837","762a839970abc2a5cfe7d4e8d9f0d3a6dba05aae611b7837","762a839970abc2a5cfe7d4e8f7f7f7d9f0d3a6dba05aae611b7837","40004b762a839970abc2a5cfe7d4e8d9f0d3a6dba05aae611b783700441b","40004b762a839970abc2a5cfe7d4e8f7f7f7d9f0d3a6dba05aae611b783700441b").map(k),du=W(lu);var pu=new Array(3).concat("e9a3c9f7f7f7a1d76a","d01c8bf1b6dab8e1864dac26","d01c8bf1b6daf7f7f7b8e1864dac26","c51b7de9a3c9fde0efe6f5d0a1d76a4d9221","c51b7de9a3c9fde0eff7f7f7e6f5d0a1d76a4d9221","c51b7dde77aef1b6dafde0efe6f5d0b8e1867fbc414d9221","c51b7dde77aef1b6dafde0eff7f7f7e6f5d0b8e1867fbc414d9221","8e0152c51b7dde77aef1b6dafde0efe6f5d0b8e1867fbc414d9221276419","8e0152c51b7dde77aef1b6dafde0eff7f7f7e6f5d0b8e1867fbc414d9221276419").map(k),mu=W(pu);var hu=new Array(3).concat("998ec3f7f7f7f1a340","5e3c99b2abd2fdb863e66101","5e3c99b2abd2f7f7f7fdb863e66101","542788998ec3d8daebfee0b6f1a340b35806","542788998ec3d8daebf7f7f7fee0b6f1a340b35806","5427888073acb2abd2d8daebfee0b6fdb863e08214b35806","5427888073acb2abd2d8daebf7f7f7fee0b6fdb863e08214b35806","2d004b5427888073acb2abd2d8daebfee0b6fdb863e08214b358067f3b08","2d004b5427888073acb2abd2d8daebf7f7f7fee0b6fdb863e08214b358067f3b08").map(k),gu=W(hu);var ji=new Array(3).concat("ef8a62f7f7f767a9cf","ca0020f4a58292c5de0571b0","ca0020f4a582f7f7f792c5de0571b0","b2182bef8a62fddbc7d1e5f067a9cf2166ac","b2182bef8a62fddbc7f7f7f7d1e5f067a9cf2166ac","b2182bd6604df4a582fddbc7d1e5f092c5de4393c32166ac","b2182bd6604df4a582fddbc7f7f7f7d1e5f092c5de4393c32166ac","67001fb2182bd6604df4a582fddbc7d1e5f092c5de4393c32166ac053061","67001fb2182bd6604df4a582fddbc7f7f7f7d1e5f092c5de4393c32166ac053061").map(k),co=W(ji);var xu=new Array(3).concat("ef8a62ffffff999999","ca0020f4a582bababa404040","ca0020f4a582ffffffbababa404040","b2182bef8a62fddbc7e0e0e09999994d4d4d","b2182bef8a62fddbc7ffffffe0e0e09999994d4d4d","b2182bd6604df4a582fddbc7e0e0e0bababa8787874d4d4d","b2182bd6604df4a582fddbc7ffffffe0e0e0bababa8787874d4d4d","67001fb2182bd6604df4a582fddbc7e0e0e0bababa8787874d4d4d1a1a1a","67001fb2182bd6604df4a582fddbc7ffffffe0e0e0bababa8787874d4d4d1a1a1a").map(k),yu=W(xu);var Zi=new Array(3).concat("fc8d59ffffbf91bfdb","d7191cfdae61abd9e92c7bb6","d7191cfdae61ffffbfabd9e92c7bb6","d73027fc8d59fee090e0f3f891bfdb4575b4","d73027fc8d59fee090ffffbfe0f3f891bfdb4575b4","d73027f46d43fdae61fee090e0f3f8abd9e974add14575b4","d73027f46d43fdae61fee090ffffbfe0f3f8abd9e974add14575b4","a50026d73027f46d43fdae61fee090e0f3f8abd9e974add14575b4313695","a50026d73027f46d43fdae61fee090ffffbfe0f3f8abd9e974add14575b4313695").map(k),so=W(Zi);var bu=new Array(3).concat("fc8d59ffffbf91cf60","d7191cfdae61a6d96a1a9641","d7191cfdae61ffffbfa6d96a1a9641","d73027fc8d59fee08bd9ef8b91cf601a9850","d73027fc8d59fee08bffffbfd9ef8b91cf601a9850","d73027f46d43fdae61fee08bd9ef8ba6d96a66bd631a9850","d73027f46d43fdae61fee08bffffbfd9ef8ba6d96a66bd631a9850","a50026d73027f46d43fdae61fee08bd9ef8ba6d96a66bd631a9850006837","a50026d73027f46d43fdae61fee08bffffbfd9ef8ba6d96a66bd631a9850006837").map(k),wu=W(bu);var vu=new Array(3).concat("fc8d59ffffbf99d594","d7191cfdae61abdda42b83ba","d7191cfdae61ffffbfabdda42b83ba","d53e4ffc8d59fee08be6f59899d5943288bd","d53e4ffc8d59fee08bffffbfe6f59899d5943288bd","d53e4ff46d43fdae61fee08be6f598abdda466c2a53288bd","d53e4ff46d43fdae61fee08bffffbfe6f598abdda466c2a53288bd","9e0142d53e4ff46d43fdae61fee08be6f598abdda466c2a53288bd5e4fa2","9e0142d53e4ff46d43fdae61fee08bffffbfe6f598abdda466c2a53288bd5e4fa2").map(k),Mu=W(vu);var Su=new Array(3).concat("e5f5f999d8c92ca25f","edf8fbb2e2e266c2a4238b45","edf8fbb2e2e266c2a42ca25f006d2c","edf8fbccece699d8c966c2a42ca25f006d2c","edf8fbccece699d8c966c2a441ae76238b45005824","f7fcfde5f5f9ccece699d8c966c2a441ae76238b45005824","f7fcfde5f5f9ccece699d8c966c2a441ae76238b45006d2c00441b").map(k),Tu=W(Su);var _u=new Array(3).concat("e0ecf49ebcda8856a7","edf8fbb3cde38c96c688419d","edf8fbb3cde38c96c68856a7810f7c","edf8fbbfd3e69ebcda8c96c68856a7810f7c","edf8fbbfd3e69ebcda8c96c68c6bb188419d6e016b","f7fcfde0ecf4bfd3e69ebcda8c96c68c6bb188419d6e016b","f7fcfde0ecf4bfd3e69ebcda8c96c68c6bb188419d810f7c4d004b").map(k),Cu=W(_u);var Au=new Array(3).concat("e0f3dba8ddb543a2ca","f0f9e8bae4bc7bccc42b8cbe","f0f9e8bae4bc7bccc443a2ca0868ac","f0f9e8ccebc5a8ddb57bccc443a2ca0868ac","f0f9e8ccebc5a8ddb57bccc44eb3d32b8cbe08589e","f7fcf0e0f3dbccebc5a8ddb57bccc44eb3d32b8cbe08589e","f7fcf0e0f3dbccebc5a8ddb57bccc44eb3d32b8cbe0868ac084081").map(k),$u=W(Au);var Eu=new Array(3).concat("fee8c8fdbb84e34a33","fef0d9fdcc8afc8d59d7301f","fef0d9fdcc8afc8d59e34a33b30000","fef0d9fdd49efdbb84fc8d59e34a33b30000","fef0d9fdd49efdbb84fc8d59ef6548d7301f990000","fff7ecfee8c8fdd49efdbb84fc8d59ef6548d7301f990000","fff7ecfee8c8fdd49efdbb84fc8d59ef6548d7301fb300007f0000").map(k),Iu=W(Eu);var ku=new Array(3).concat("ece2f0a6bddb1c9099","f6eff7bdc9e167a9cf02818a","f6eff7bdc9e167a9cf1c9099016c59","f6eff7d0d1e6a6bddb67a9cf1c9099016c59","f6eff7d0d1e6a6bddb67a9cf3690c002818a016450","fff7fbece2f0d0d1e6a6bddb67a9cf3690c002818a016450","fff7fbece2f0d0d1e6a6bddb67a9cf3690c002818a016c59014636").map(k),Du=W(ku);var Nu=new Array(3).concat("ece7f2a6bddb2b8cbe","f1eef6bdc9e174a9cf0570b0","f1eef6bdc9e174a9cf2b8cbe045a8d","f1eef6d0d1e6a6bddb74a9cf2b8cbe045a8d","f1eef6d0d1e6a6bddb74a9cf3690c00570b0034e7b","fff7fbece7f2d0d1e6a6bddb74a9cf3690c00570b0034e7b","fff7fbece7f2d0d1e6a6bddb74a9cf3690c00570b0045a8d023858").map(k),Ru=W(Nu);var Lu=new Array(3).concat("e7e1efc994c7dd1c77","f1eef6d7b5d8df65b0ce1256","f1eef6d7b5d8df65b0dd1c77980043","f1eef6d4b9dac994c7df65b0dd1c77980043","f1eef6d4b9dac994c7df65b0e7298ace125691003f","f7f4f9e7e1efd4b9dac994c7df65b0e7298ace125691003f","f7f4f9e7e1efd4b9dac994c7df65b0e7298ace125698004367001f").map(k),Pu=W(Lu);var Ou=new Array(3).concat("fde0ddfa9fb5c51b8a","feebe2fbb4b9f768a1ae017e","feebe2fbb4b9f768a1c51b8a7a0177","feebe2fcc5c0fa9fb5f768a1c51b8a7a0177","feebe2fcc5c0fa9fb5f768a1dd3497ae017e7a0177","fff7f3fde0ddfcc5c0fa9fb5f768a1dd3497ae017e7a0177","fff7f3fde0ddfcc5c0fa9fb5f768a1dd3497ae017e7a017749006a").map(k),Fu=W(Ou);var qu=new Array(3).concat("edf8b17fcdbb2c7fb8","ffffcca1dab441b6c4225ea8","ffffcca1dab441b6c42c7fb8253494","ffffccc7e9b47fcdbb41b6c42c7fb8253494","ffffccc7e9b47fcdbb41b6c41d91c0225ea80c2c84","ffffd9edf8b1c7e9b47fcdbb41b6c41d91c0225ea80c2c84","ffffd9edf8b1c7e9b47fcdbb41b6c41d91c0225ea8253494081d58").map(k),Yu=W(qu);var zu=new Array(3).concat("f7fcb9addd8e31a354","ffffccc2e69978c679238443","ffffccc2e69978c67931a354006837","ffffccd9f0a3addd8e78c67931a354006837","ffffccd9f0a3addd8e78c67941ab5d238443005a32","ffffe5f7fcb9d9f0a3addd8e78c67941ab5d238443005a32","ffffe5f7fcb9d9f0a3addd8e78c67941ab5d238443006837004529").map(k),Bu=W(zu);var Uu=new Array(3).concat("fff7bcfec44fd95f0e","ffffd4fed98efe9929cc4c02","ffffd4fed98efe9929d95f0e993404","ffffd4fee391fec44ffe9929d95f0e993404","ffffd4fee391fec44ffe9929ec7014cc4c028c2d04","ffffe5fff7bcfee391fec44ffe9929ec7014cc4c028c2d04","ffffe5fff7bcfee391fec44ffe9929ec7014cc4c02993404662506").map(k),Xu=W(Uu);var Wu=new Array(3).concat("ffeda0feb24cf03b20","ffffb2fecc5cfd8d3ce31a1c","ffffb2fecc5cfd8d3cf03b20bd0026","ffffb2fed976feb24cfd8d3cf03b20bd0026","ffffb2fed976feb24cfd8d3cfc4e2ae31a1cb10026","ffffccffeda0fed976feb24cfd8d3cfc4e2ae31a1cb10026","ffffccffeda0fed976feb24cfd8d3cfc4e2ae31a1cbd0026800026").map(k),Hu=W(Wu);var Gu=new Array(3).concat("deebf79ecae13182bd","eff3ffbdd7e76baed62171b5","eff3ffbdd7e76baed63182bd08519c","eff3ffc6dbef9ecae16baed63182bd08519c","eff3ffc6dbef9ecae16baed64292c62171b5084594","f7fbffdeebf7c6dbef9ecae16baed64292c62171b5084594","f7fbffdeebf7c6dbef9ecae16baed64292c62171b508519c08306b").map(k),Vu=W(Gu);var ju=new Array(3).concat("e5f5e0a1d99b31a354","edf8e9bae4b374c476238b45","edf8e9bae4b374c47631a354006d2c","edf8e9c7e9c0a1d99b74c47631a354006d2c","edf8e9c7e9c0a1d99b74c47641ab5d238b45005a32","f7fcf5e5f5e0c7e9c0a1d99b74c47641ab5d238b45005a32","f7fcf5e5f5e0c7e9c0a1d99b74c47641ab5d238b45006d2c00441b").map(k),Zu=W(ju);var Ku=new Array(3).concat("f0f0f0bdbdbd636363","f7f7f7cccccc969696525252","f7f7f7cccccc969696636363252525","f7f7f7d9d9d9bdbdbd969696636363252525","f7f7f7d9d9d9bdbdbd969696737373525252252525","fffffff0f0f0d9d9d9bdbdbd969696737373525252252525","fffffff0f0f0d9d9d9bdbdbd969696737373525252252525000000").map(k),Qu=W(Ku);var Ju=new Array(3).concat("efedf5bcbddc756bb1","f2f0f7cbc9e29e9ac86a51a3","f2f0f7cbc9e29e9ac8756bb154278f","f2f0f7dadaebbcbddc9e9ac8756bb154278f","f2f0f7dadaebbcbddc9e9ac8807dba6a51a34a1486","fcfbfdefedf5dadaebbcbddc9e9ac8807dba6a51a34a1486","fcfbfdefedf5dadaebbcbddc9e9ac8807dba6a51a354278f3f007d").map(k),tc=W(Ju);var ec=new Array(3).concat("fee0d2fc9272de2d26","fee5d9fcae91fb6a4acb181d","fee5d9fcae91fb6a4ade2d26a50f15","fee5d9fcbba1fc9272fb6a4ade2d26a50f15","fee5d9fcbba1fc9272fb6a4aef3b2ccb181d99000d","fff5f0fee0d2fcbba1fc9272fb6a4aef3b2ccb181d99000d","fff5f0fee0d2fcbba1fc9272fb6a4aef3b2ccb181da50f1567000d").map(k),nc=W(ec);var rc=new Array(3).concat("fee6cefdae6be6550d","feeddefdbe85fd8d3cd94701","feeddefdbe85fd8d3ce6550da63603","feeddefdd0a2fdae6bfd8d3ce6550da63603","feeddefdd0a2fdae6bfd8d3cf16913d948018c2d04","fff5ebfee6cefdd0a2fdae6bfd8d3cf16913d948018c2d04","fff5ebfee6cefdd0a2fdae6bfd8d3cf16913d94801a636037f2704").map(k),oc=W(rc);function ic(t){return t=Math.max(0,Math.min(1,t)),"rgb("+Math.max(0,Math.min(255,Math.round(-4.54-t*(35.34-t*(2381.73-t*(6402.7-t*(7024.72-t*2710.57)))))))+", "+Math.max(0,Math.min(255,Math.round(32.49+t*(170.73+t*(52.82-t*(131.46-t*(176.58-t*67.37)))))))+", "+Math.max(0,Math.min(255,Math.round(81.24+t*(442.36-t*(2482.43-t*(6167.24-t*(6614.94-t*2475.67)))))))+")"}var ac=Ur(te(300,.5,0),te(-240,.5,1));var uc=Ur(te(-100,.75,.35),te(80,1.5,.8)),cc=Ur(te(260,.75,.35),te(80,1.5,.8)),fc=te();function sc(t){(t<0||t>1)&&(t-=Math.floor(t));var e=Math.abs(t-.5);return fc.h=360*t-100,fc.s=1.5-1.5*e,fc.l=.8-.9*e,fc+""}var lc=be(),bv=Math.PI/3,wv=Math.PI*2/3;function dc(t){var e;return t=(.5-t)*Math.PI,lc.r=255*(e=Math.sin(t))*e,lc.g=255*(e=Math.sin(t+bv))*e,lc.b=255*(e=Math.sin(t+wv))*e,lc+""}function pc(t){return t=Math.max(0,Math.min(1,t)),"rgb("+Math.max(0,Math.min(255,Math.round(34.61+t*(1172.33-t*(10793.56-t*(33300.12-t*(38394.49-t*14825.05)))))))+", "+Math.max(0,Math.min(255,Math.round(23.31+t*(557.33+t*(1225.33-t*(3574.96-t*(1073.77+t*707.56)))))))+", "+Math.max(0,Math.min(255,Math.round(27.2+t*(3211.1-t*(15327.97-t*(27814-t*(22569.18-t*6838.66)))))))+")"}function mc(t){var e=t.length;return function(n){return t[Math.max(0,Math.min(e-1,Math.floor(n*e)))]}}var hc=mc(k("44015444025645045745055946075a46085c460a5d460b5e470d60470e6147106347116447136548146748166848176948186a481a6c481b6d481c6e481d6f481f70482071482173482374482475482576482677482878482979472a7a472c7a472d7b472e7c472f7d46307e46327e46337f463480453581453781453882443983443a83443b84433d84433e85423f854240864241864142874144874045884046883f47883f48893e49893e4a893e4c8a3d4d8a3d4e8a3c4f8a3c508b3b518b3b528b3a538b3a548c39558c39568c38588c38598c375a8c375b8d365c8d365d8d355e8d355f8d34608d34618d33628d33638d32648e32658e31668e31678e31688e30698e306a8e2f6b8e2f6c8e2e6d8e2e6e8e2e6f8e2d708e2d718e2c718e2c728e2c738e2b748e2b758e2a768e2a778e2a788e29798e297a8e297b8e287c8e287d8e277e8e277f8e27808e26818e26828e26828e25838e25848e25858e24868e24878e23888e23898e238a8d228b8d228c8d228d8d218e8d218f8d21908d21918c20928c20928c20938c1f948c1f958b1f968b1f978b1f988b1f998a1f9a8a1e9b8a1e9c891e9d891f9e891f9f881fa0881fa1881fa1871fa28720a38620a48621a58521a68522a78522a88423a98324aa8325ab8225ac8226ad8127ad8128ae8029af7f2ab07f2cb17e2db27d2eb37c2fb47c31b57b32b67a34b67935b77937b87838b9773aba763bbb753dbc743fbc7340bd7242be7144bf7046c06f48c16e4ac16d4cc26c4ec36b50c46a52c56954c56856c66758c7655ac8645cc8635ec96260ca6063cb5f65cb5e67cc5c69cd5b6ccd5a6ece5870cf5773d05675d05477d1537ad1517cd2507fd34e81d34d84d44b86d54989d5488bd6468ed64590d74393d74195d84098d83e9bd93c9dd93ba0da39a2da37a5db36a8db34aadc32addc30b0dd2fb2dd2db5de2bb8de29bade28bddf26c0df25c2df23c5e021c8e020cae11fcde11dd0e11cd2e21bd5e21ad8e219dae319dde318dfe318e2e418e5e419e7e419eae51aece51befe51cf1e51df4e61ef6e620f8e621fbe723fde725")),gc=mc(k("00000401000501010601010802010902020b02020d03030f03031204041405041606051806051a07061c08071e0907200a08220b09240c09260d0a290e0b2b100b2d110c2f120d31130d34140e36150e38160f3b180f3d19103f1a10421c10441d11471e114920114b21114e22115024125325125527125829115a2a115c2c115f2d11612f116331116533106734106936106b38106c390f6e3b0f703d0f713f0f72400f74420f75440f764510774710784910784a10794c117a4e117b4f127b51127c52137c54137d56147d57157e59157e5a167e5c167f5d177f5f187f601880621980641a80651a80671b80681c816a1c816b1d816d1d816e1e81701f81721f817320817521817621817822817922827b23827c23827e24828025828125818326818426818627818827818928818b29818c29818e2a81902a81912b81932b80942c80962c80982d80992d809b2e7f9c2e7f9e2f7fa02f7fa1307ea3307ea5317ea6317da8327daa337dab337cad347cae347bb0357bb2357bb3367ab5367ab73779b83779ba3878bc3978bd3977bf3a77c03a76c23b75c43c75c53c74c73d73c83e73ca3e72cc3f71cd4071cf4070d0416fd2426fd3436ed5446dd6456cd8456cd9466bdb476adc4869de4968df4a68e04c67e24d66e34e65e44f64e55064e75263e85362e95462ea5661eb5760ec5860ed5a5fee5b5eef5d5ef05f5ef1605df2625df2645cf3655cf4675cf4695cf56b5cf66c5cf66e5cf7705cf7725cf8745cf8765cf9785df9795df97b5dfa7d5efa7f5efa815ffb835ffb8560fb8761fc8961fc8a62fc8c63fc8e64fc9065fd9266fd9467fd9668fd9869fd9a6afd9b6bfe9d6cfe9f6dfea16efea36ffea571fea772fea973feaa74feac76feae77feb078feb27afeb47bfeb67cfeb77efeb97ffebb81febd82febf84fec185fec287fec488fec68afec88cfeca8dfecc8ffecd90fecf92fed194fed395fed597fed799fed89afdda9cfddc9efddea0fde0a1fde2a3fde3a5fde5a7fde7a9fde9aafdebacfcecaefceeb0fcf0b2fcf2b4fcf4b6fcf6b8fcf7b9fcf9bbfcfbbdfcfdbf")),xc=mc(k("00000401000501010601010802010a02020c02020e03021004031204031405041706041907051b08051d09061f0a07220b07240c08260d08290e092b10092d110a30120a32140b34150b37160b39180c3c190c3e1b0c411c0c431e0c451f0c48210c4a230c4c240c4f260c51280b53290b552b0b572d0b592f0a5b310a5c320a5e340a5f3609613809623909633b09643d09653e0966400a67420a68440a68450a69470b6a490b6a4a0c6b4c0c6b4d0d6c4f0d6c510e6c520e6d540f6d550f6d57106e59106e5a116e5c126e5d126e5f136e61136e62146e64156e65156e67166e69166e6a176e6c186e6d186e6f196e71196e721a6e741a6e751b6e771c6d781c6d7a1d6d7c1d6d7d1e6d7f1e6c801f6c82206c84206b85216b87216b88226a8a226a8c23698d23698f24699025689225689326679526679727669827669a28659b29649d29649f2a63a02a63a22b62a32c61a52c60a62d60a82e5fa92e5eab2f5ead305dae305cb0315bb1325ab3325ab43359b63458b73557b93556ba3655bc3754bd3853bf3952c03a51c13a50c33b4fc43c4ec63d4dc73e4cc83f4bca404acb4149cc4248ce4347cf4446d04545d24644d34743d44842d54a41d74b3fd84c3ed94d3dda4e3cdb503bdd513ade5238df5337e05536e15635e25734e35933e45a31e55c30e65d2fe75e2ee8602de9612bea632aeb6429eb6628ec6726ed6925ee6a24ef6c23ef6e21f06f20f1711ff1731df2741cf3761bf37819f47918f57b17f57d15f67e14f68013f78212f78410f8850ff8870ef8890cf98b0bf98c0af98e09fa9008fa9207fa9407fb9606fb9706fb9906fb9b06fb9d07fc9f07fca108fca309fca50afca60cfca80dfcaa0ffcac11fcae12fcb014fcb216fcb418fbb61afbb81dfbba1ffbbc21fbbe23fac026fac228fac42afac62df9c72ff9c932f9cb35f8cd37f8cf3af7d13df7d340f6d543f6d746f5d949f5db4cf4dd4ff4df53f4e156f3e35af3e55df2e661f2e865f2ea69f1ec6df1ed71f1ef75f1f179f2f27df2f482f3f586f3f68af4f88ef5f992f6fa96f8fb9af9fc9dfafda1fcffa4")),yc=mc(k("0d088710078813078916078a19068c1b068d1d068e20068f2206902406912605912805922a05932c05942e05952f059631059733059735049837049938049a3a049a3c049b3e049c3f049c41049d43039e44039e46039f48039f4903a04b03a14c02a14e02a25002a25102a35302a35502a45601a45801a45901a55b01a55c01a65e01a66001a66100a76300a76400a76600a76700a86900a86a00a86c00a86e00a86f00a87100a87201a87401a87501a87701a87801a87a02a87b02a87d03a87e03a88004a88104a78305a78405a78606a68707a68808a68a09a58b0aa58d0ba58e0ca48f0da4910ea3920fa39410a29511a19613a19814a099159f9a169f9c179e9d189d9e199da01a9ca11b9ba21d9aa31e9aa51f99a62098a72197a82296aa2395ab2494ac2694ad2793ae2892b02991b12a90b22b8fb32c8eb42e8db52f8cb6308bb7318ab83289ba3388bb3488bc3587bd3786be3885bf3984c03a83c13b82c23c81c33d80c43e7fc5407ec6417dc7427cc8437bc9447aca457acb4679cc4778cc4977cd4a76ce4b75cf4c74d04d73d14e72d24f71d35171d45270d5536fd5546ed6556dd7566cd8576bd9586ada5a6ada5b69db5c68dc5d67dd5e66de5f65de6164df6263e06363e16462e26561e26660e3685fe4695ee56a5de56b5de66c5ce76e5be76f5ae87059e97158e97257ea7457eb7556eb7655ec7754ed7953ed7a52ee7b51ef7c51ef7e50f07f4ff0804ef1814df1834cf2844bf3854bf3874af48849f48948f58b47f58c46f68d45f68f44f79044f79143f79342f89441f89540f9973ff9983ef99a3efa9b3dfa9c3cfa9e3bfb9f3afba139fba238fca338fca537fca636fca835fca934fdab33fdac33fdae32fdaf31fdb130fdb22ffdb42ffdb52efeb72dfeb82cfeba2cfebb2bfebd2afebe2afec029fdc229fdc328fdc527fdc627fdc827fdca26fdcb26fccd25fcce25fcd025fcd225fbd324fbd524fbd724fad824fada24f9dc24f9dd25f8df25f8e125f7e225f7e425f6e626f6e826f5e926f5eb27f4ed27f3ee27f3f027f2f227f1f426f1f525f0f724f0f921"));var ud=Math.cos;var lo=Math.min,Ki=Math.sin,rt=Math.sqrt;var vr=Math.PI,tP=vr/2,po=2*vr;var vv=rt(3),Qi={draw(t,e){let n=rt(e+lo(e/28,.75))*.59436,r=n/2,o=r*vv;t.moveTo(0,n),t.lineTo(0,-n),t.moveTo(-o,-r),t.lineTo(o,r),t.moveTo(-o,r),t.lineTo(o,-r)}};var mo={draw(t,e){let n=rt(e/vr);t.moveTo(n,0),t.arc(0,0,n,0,po)}};var Ji={draw(t,e){let n=rt(e/5)/2;t.moveTo(-3*n,-n),t.lineTo(-n,-n),t.lineTo(-n,-3*n),t.lineTo(n,-3*n),t.lineTo(n,-n),t.lineTo(3*n,-n),t.lineTo(3*n,n),t.lineTo(n,n),t.lineTo(n,3*n),t.lineTo(-n,3*n),t.lineTo(-n,n),t.lineTo(-3*n,n),t.closePath()}};var ug=rt(1/3),Mv=ug*2,ta={draw(t,e){let n=rt(e/Mv),r=n*ug;t.moveTo(0,-n),t.lineTo(r,0),t.lineTo(0,n),t.lineTo(-r,0),t.closePath()}};var ea={draw(t,e){let n=rt(e)*.62625;t.moveTo(0,-n),t.lineTo(n,0),t.lineTo(0,n),t.lineTo(-n,0),t.closePath()}};var na={draw(t,e){let n=rt(e-lo(e/7,2))*.87559;t.moveTo(-n,0),t.lineTo(n,0),t.moveTo(0,n),t.lineTo(0,-n)}};var ra={draw(t,e){let n=rt(e),r=-n/2;t.rect(r,r,n,n)}};var oa={draw(t,e){let n=rt(e)*.4431;t.moveTo(n,n),t.lineTo(n,-n),t.lineTo(-n,-n),t.lineTo(-n,n),t.closePath()}};var Sv=.8908130915292852,cg=Ki(vr/10)/Ki(7*vr/10),Tv=Ki(po/10)*cg,_v=-ud(po/10)*cg,ia={draw(t,e){let n=rt(e*Sv),r=Tv*n,o=_v*n;t.moveTo(0,-n),t.lineTo(r,o);for(let i=1;i<5;++i){let a=po*i/5,f=ud(a),u=Ki(a);t.lineTo(u*n,-f*n),t.lineTo(f*r-u*o,u*r+f*o)}t.closePath()}};var cd=rt(3),aa={draw(t,e){let n=-rt(e/(cd*3));t.moveTo(0,n*2),t.lineTo(-cd*n,-n),t.lineTo(cd*n,-n),t.closePath()}};var Cv=rt(3),fa={draw(t,e){let n=rt(e)*.6824,r=n/2,o=n*Cv/2;t.moveTo(0,-n),t.lineTo(o,r),t.lineTo(-o,r),t.closePath()}};var Me=-.5,Se=rt(3)/2,sd=1/rt(12),Av=(sd/2+1)*3,ua={draw(t,e){let n=rt(e/Av),r=n/2,o=n*sd,i=r,a=n*sd+n,f=-i,u=a;t.moveTo(r,o),t.lineTo(i,a),t.lineTo(f,u),t.lineTo(Me*r-Se*o,Se*r+Me*o),t.lineTo(Me*i-Se*a,Se*i+Me*a),t.lineTo(Me*f-Se*u,Se*f+Me*u),t.lineTo(Me*r+Se*o,Me*o-Se*r),t.lineTo(Me*i+Se*a,Me*a-Se*i),t.lineTo(Me*f+Se*u,Me*u-Se*f),t.closePath()}};var ho={draw(t,e){let n=rt(e-lo(e/6,1.7))*.6189;t.moveTo(-n,-n),t.lineTo(n,n),t.moveTo(-n,n),t.lineTo(n,-n)}};var bc=[mo,Ji,ta,ra,ia,aa,ua],ld=[mo,na,ho,fa,Qi,oa,ea];function Wn(t,e,n){this.k=t,this.x=e,this.y=n}Wn.prototype={constructor:Wn,scale:function(t){return t===1?this:new Wn(this.k*t,this.x,this.y)},translate:function(t,e){return t===0&e===0?this:new Wn(this.k,this.x+this.k*t,this.y+this.k*e)},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 dd=new Wn(1,0,0);pd.prototype=Wn.prototype;function pd(t){for(;!t.__zoom;)if(!(t=t.parentNode))return dd;return t.__zoom}function Ne(t){return t!=null&&!Number.isNaN(t)}function Kt(t,e){return+Ne(e)-+Ne(t)||bt(t,e)}function Mr(t,e){return+Ne(e)-+Ne(t)||xe(t,e)}function wc(t){return t!=null&&`${t}`!=""}function md(t){return isFinite(t)?t:NaN}function ca(t){return t>0&&isFinite(t)?t:NaN}function vc(t){return t<0&&isFinite(t)?t:NaN}function Mc(t,e){if(t instanceof Date||(t=new Date(+t)),isNaN(t))return typeof e=="function"?e(t):e;let n=t.getUTCHours(),r=t.getUTCMinutes(),o=t.getUTCSeconds(),i=t.getUTCMilliseconds();return`${$v(t.getUTCFullYear(),4)}-${vn(t.getUTCMonth()+1,2)}-${vn(t.getUTCDate(),2)}${n||r||o||i?`T${vn(n,2)}:${vn(r,2)}${o||i?`:${vn(o,2)}${i?`.${vn(i,3)}`:""}`:""}Z`:""}`}function $v(t){return t<0?`-${vn(-t,6)}`:t>9999?`+${vn(t,6)}`:vn(t,4)}function vn(t,e){return`${t}`.padStart(e,"0")}var Ev=/^(?:[-+]\d{2})?\d{4}(?:-\d{2}(?:-\d{2})?)?(?:T\d{2}:\d{2}(?::\d{2}(?:\.\d{3})?)?(?:Z|[-+]\d{2}:?\d{2})?)?$/;function sa(t,e){return Ev.test(t+="")?new Date(t):typeof e=="function"?e(t):e}var Sc=1e3,hd=Sc*60,gd=hd*60,da=gd*24,Iv=da*7,sg=da*30,kv=da*365,la=[["millisecond",.5*Sc],["second",Sc],["second",30*Sc],["minute",hd],["minute",30*hd],["hour",gd],["hour",12*gd],["day",da],["day",2*da],["week",Iv],["month",sg],["month",3*sg],["year",kv]],Dv=new Map([["second",Vt],["minute",Pn],["hour",Fn],["day",De],["week",ce],["month",Bn],["year",jt],["monday",Yn],["tuesday",Vf],["wednesday",jf],["thursday",tn],["friday",Zf],["saturday",Kf],["sunday",ce]]),Nv=new Map([["second",Vt],["minute",On],["hour",qn],["day",fo],["week",se],["month",Un],["year",Zt],["monday",zn],["tuesday",Qf],["wednesday",Jf],["thursday",en],["friday",tu],["saturday",eu],["sunday",se]]);function lg(t,e){let n=`${t}`.toLowerCase();n.endsWith("s")&&(n=n.slice(0,-1));let r=1,o=/^(?:(\d+)\s+)/.exec(n);switch(o&&(n=n.slice(o[0].length),r=+o[1]),n){case"quarter":n="month",r*=3;break;case"half":n="month",r*=6;break}let i=e.get(n);if(!i)throw new Error(`unknown interval: ${t}`);if(!(r>1))return i;if(!i.every)throw new Error(`non-periodic interval: ${n}`);return i.every(r)}function dg(t){return lg(t,Dv)}function Tc(t){return lg(t,Nv)}function pg(t){if(!t)return!1;let e=t.floor(new Date(Date.UTC(2e3,11,31)));return Zt(e)>=e}function mg(t){if(!t)return!1;let e=t.floor(new Date(2e3,11,31));return jt(e)>=e}function hg(t,e,n,r){let o=t.type==="time"?Xn:wn,i=r==="left"||r==="right"?(a,f)=>`
+"use strict";(()=>{function bt(t,e){return t==null||e==null?NaN:t<e?-1:t>e?1:t>=e?0:NaN}function xe(t,e){return t==null||e==null?NaN:e<t?-1:e>t?1:e>=t?0:NaN}function Fe(t){let e,n,r;t.length!==2?(e=bt,n=(f,u)=>bt(t(f),u),r=(f,u)=>t(f)-u):(e=t===bt||t===xe?t:Fy,n=t,r=t);function o(f,u,c=0,s=f.length){if(c<s){if(e(u,u)!==0)return s;do{let d=c+s>>>1;n(f[d],u)<0?c=d+1:s=d}while(c<s)}return c}function i(f,u,c=0,s=f.length){if(c<s){if(e(u,u)!==0)return s;do{let d=c+s>>>1;n(f[d],u)<=0?c=d+1:s=d}while(c<s)}return c}function a(f,u,c=0,s=f.length){let d=o(f,u,c,s-1);return d>c&&r(f[d-1],u)>-r(f[d],u)?d-1:d}return{left:o,center:a,right:i}}function Fy(){return 0}function Bo(t){return t===null?NaN:+t}function*$p(t,e){if(e===void 0)for(let n of t)n!=null&&(n=+n)>=n&&(yield n);else{let n=-1;for(let r of t)(r=e(r,++n,t))!=null&&(r=+r)>=r&&(yield r)}}var Ep=Fe(bt),Ip=Ep.right,qy=Ep.left,Yy=Fe(Bo).center,un=Ip;function Jn(t,e){let n=0;if(e===void 0)for(let r of t)r!=null&&(r=+r)>=r&&++n;else{let r=-1;for(let o of t)(o=e(o,++r,t))!=null&&(o=+o)>=o&&++n}return n}function zy(t){return t.length|0}function By(t){return!(t>0)}function Uy(t){return typeof t!="object"||"length"in t?t:Array.from(t)}function Xy(t){return e=>t(...e)}function La(...t){let e=typeof t[t.length-1]=="function"&&Xy(t.pop());t=t.map(Uy);let n=t.map(zy),r=t.length-1,o=new Array(r+1).fill(0),i=[];if(r<0||n.some(By))return i;for(;;){i.push(o.map((f,u)=>t[u][f]));let a=r;for(;++o[a]===n[a];){if(a===0)return e?i.map(e):i;o[a--]=0}}}function Pa(t,e){var n=0,r=0;return Float64Array.from(t,e===void 0?o=>n+=+o||0:o=>n+=+e(o,r++,t)||0)}function Nr(t,e){let n=0,r,o=0,i=0;if(e===void 0)for(let a of t)a!=null&&(a=+a)>=a&&(r=a-o,o+=r/++n,i+=r*(a-o));else{let a=-1;for(let f of t)(f=e(f,++a,t))!=null&&(f=+f)>=f&&(r=f-o,o+=r/++n,i+=r*(f-o))}if(n>1)return i/(n-1)}function Rr(t,e){let n=Nr(t,e);return n&&Math.sqrt(n)}function Ct(t,e){let n,r;if(e===void 0)for(let o of t)o!=null&&(n===void 0?o>=o&&(n=r=o):(n>o&&(n=o),r<o&&(r=o)));else{let o=-1;for(let i of t)(i=e(i,++o,t))!=null&&(n===void 0?i>=i&&(n=r=i):(n>i&&(n=i),r<i&&(r=i)))}return[n,r]}var ae=class{constructor(){this._partials=new Float64Array(32),this._n=0}add(e){let n=this._partials,r=0;for(let o=0;o<this._n&&o<32;o++){let i=n[o],a=e+i,f=Math.abs(e)<Math.abs(i)?e-(a-i):i-(a-e);f&&(n[r++]=f),e=a}return n[r]=e,this._n=r+1,this}valueOf(){let e=this._partials,n=this._n,r,o,i,a=0;if(n>0){for(a=e[--n];n>0&&(r=a,o=e[--n],a=r+o,i=o-(a-r),!i););n>0&&(i<0&&e[n-1]<0||i>0&&e[n-1]>0)&&(o=i*2,r=a+o,o==r-a&&(a=r))}return a}};var Qt=class extends Map{constructor(e,n=Np){if(super(),Object.defineProperties(this,{_intern:{value:new Map},_key:{value:n}}),e!=null)for(let[r,o]of e)this.set(r,o)}get(e){return super.get(rs(this,e))}has(e){return super.has(rs(this,e))}set(e,n){return super.set(kp(this,e),n)}delete(e){return super.delete(Dp(this,e))}},cn=class extends Set{constructor(e,n=Np){if(super(),Object.defineProperties(this,{_intern:{value:new Map},_key:{value:n}}),e!=null)for(let r of e)this.add(r)}has(e){return super.has(rs(this,e))}add(e){return super.add(kp(this,e))}delete(e){return super.delete(Dp(this,e))}};function rs({_intern:t,_key:e},n){let r=e(n);return t.has(r)?t.get(r):n}function kp({_intern:t,_key:e},n){let r=e(n);return t.has(r)?t.get(r):(t.set(r,n),n)}function Dp({_intern:t,_key:e},n){let r=e(n);return t.has(r)&&(n=t.get(r),t.delete(r)),n}function Np(t){return t!==null&&typeof t=="object"?t.valueOf():t}function Uo(t){return t}function sn(t,...e){return is(t,Uo,Uo,e)}function Ce(t,e,...n){return is(t,Uo,e,n)}function os(t,e,...n){return is(t,Array.from,e,n)}function is(t,e,n,r){return function o(i,a){if(a>=r.length)return n(i);let f=new Qt,u=r[a++],c=-1;for(let s of i){let d=u(s,++c,i),l=f.get(d);l?l.push(s):f.set(d,[s])}for(let[s,d]of f)f.set(s,o(d,a));return e(f)}(t,0)}function as(t,e){return Array.from(e,n=>t[n])}function qe(t,...e){if(typeof t[Symbol.iterator]!="function")throw new TypeError("values is not iterable");t=Array.from(t);let[n]=e;if(n&&n.length!==2||e.length>1){let r=Uint32Array.from(t,(o,i)=>i);return e.length>1?(e=e.map(o=>t.map(o)),r.sort((o,i)=>{for(let a of e){let f=Xo(a[o],a[i]);if(f)return f}})):(n=t.map(n),r.sort((o,i)=>Xo(n[o],n[i]))),as(t,r)}return t.sort(fs(n))}function fs(t=bt){if(t===bt)return Xo;if(typeof t!="function")throw new TypeError("compare is not a function");return(e,n)=>{let r=t(e,n);return r||r===0?r:(t(n,n)===0)-(t(e,e)===0)}}function Xo(t,e){return(t==null||!(t>=t))-(e==null||!(e>=e))||(t<e?-1:t>e?1:0)}function Lr(t,e,n){return(e.length!==2?qe(Ce(t,e,n),([r,o],[i,a])=>bt(o,a)||bt(r,i)):qe(sn(t,n),([r,o],[i,a])=>e(o,a)||bt(r,i))).map(([r])=>r)}var Hy=Math.sqrt(50),Wy=Math.sqrt(10),Gy=Math.sqrt(2);function Oa(t,e,n){let r=(e-t)/Math.max(0,n),o=Math.floor(Math.log10(r)),i=r/Math.pow(10,o),a=i>=Hy?10:i>=Wy?5:i>=Gy?2:1,f,u,c;return o<0?(c=Math.pow(10,-o)/a,f=Math.round(t*c),u=Math.round(e*c),f/c<t&&++f,u/c>e&&--u,c=-c):(c=Math.pow(10,o)*a,f=Math.round(t/c),u=Math.round(e/c),f*c<t&&++f,u*c>e&&--u),u<f&&.5<=n&&n<2?Oa(t,e,n*2):[f,u,c]}function Ae(t,e,n){if(e=+e,t=+t,n=+n,!(n>0))return[];if(t===e)return[t];let r=e<t,[o,i,a]=r?Oa(e,t,n):Oa(t,e,n);if(!(i>=o))return[];let f=i-o+1,u=new Array(f);if(r)if(a<0)for(let c=0;c<f;++c)u[c]=(i-c)/-a;else for(let c=0;c<f;++c)u[c]=(i-c)*a;else if(a<0)for(let c=0;c<f;++c)u[c]=(o+c)/-a;else for(let c=0;c<f;++c)u[c]=(o+c)*a;return u}function tr(t,e,n){return e=+e,t=+t,n=+n,Oa(t,e,n)[2]}function Pr(t,e,n){e=+e,t=+t,n=+n;let r=e<t,o=r?tr(e,t,n):tr(t,e,n);return(r?-1:1)*(o<0?1/-o:o)}function Fa(t){return Math.max(1,Math.ceil(Math.log(Jn(t))/Math.LN2)+1)}function Ht(t,e){let n;if(e===void 0)for(let r of t)r!=null&&(n<r||n===void 0&&r>=r)&&(n=r);else{let r=-1;for(let o of t)(o=e(o,++r,t))!=null&&(n<o||n===void 0&&o>=o)&&(n=o)}return n}function qa(t,e){let n,r=-1,o=-1;if(e===void 0)for(let i of t)++o,i!=null&&(n<i||n===void 0&&i>=i)&&(n=i,r=o);else for(let i of t)(i=e(i,++o,t))!=null&&(n<i||n===void 0&&i>=i)&&(n=i,r=o);return r}function Jt(t,e){let n;if(e===void 0)for(let r of t)r!=null&&(n>r||n===void 0&&r>=r)&&(n=r);else{let r=-1;for(let o of t)(o=e(o,++r,t))!=null&&(n>o||n===void 0&&o>=o)&&(n=o)}return n}function Ya(t,e){let n,r=-1,o=-1;if(e===void 0)for(let i of t)++o,i!=null&&(n>i||n===void 0&&i>=i)&&(n=i,r=o);else for(let i of t)(i=e(i,++o,t))!=null&&(n>i||n===void 0&&i>=i)&&(n=i,r=o);return r}function za(t,e,n=0,r=1/0,o){if(e=Math.floor(e),n=Math.floor(Math.max(0,n)),r=Math.floor(Math.min(t.length-1,r)),!(n<=e&&e<=r))return t;for(o=o===void 0?Xo:fs(o);r>n;){if(r-n>600){let u=r-n+1,c=e-n+1,s=Math.log(u),d=.5*Math.exp(2*s/3),l=.5*Math.sqrt(s*d*(u-d)/u)*(c-u/2<0?-1:1),p=Math.max(n,Math.floor(e-c*d/u+l)),m=Math.min(r,Math.floor(e+(u-c)*d/u+l));za(t,e,p,m,o)}let i=t[e],a=n,f=r;for(Ho(t,n,e),o(t[r],i)>0&&Ho(t,n,r);a<f;){for(Ho(t,a,f),++a,--f;o(t[a],i)<0;)++a;for(;o(t[f],i)>0;)--f}o(t[n],i)===0?Ho(t,n,f):(++f,Ho(t,f,r)),f<=e&&(n=f+1),e<=f&&(r=f-1)}return t}function Ho(t,e,n){let r=t[e];t[e]=t[n],t[n]=r}function Wo(t,e=bt){let n,r=!1;if(e.length===1){let o;for(let i of t){let a=e(i);(r?bt(a,o)>0:bt(a,a)===0)&&(n=i,o=a,r=!0)}}else for(let o of t)(r?e(o,n)>0:e(o,o)===0)&&(n=o,r=!0);return n}function ye(t,e,n){if(t=Float64Array.from($p(t,n)),!(!(r=t.length)||isNaN(e=+e))){if(e<=0||r<2)return Jt(t);if(e>=1)return Ht(t);var r,o=(r-1)*e,i=Math.floor(o),a=Ht(za(t,i).subarray(0,i+1)),f=Jt(t.subarray(i+1));return a+(f-a)*(o-i)}}function us(t,e,n=Bo){if(!(!(r=t.length)||isNaN(e=+e))){if(e<=0||r<2)return+n(t[0],0,t);if(e>=1)return+n(t[r-1],r-1,t);var r,o=(r-1)*e,i=Math.floor(o),a=+n(t[i],i,t),f=+n(t[i+1],i+1,t);return a+(f-a)*(o-i)}}function Ba(t,e,n){let r=Jn(t),o=ye(t,.75)-ye(t,.25);return r&&o?Math.ceil((n-e)/(2*o*Math.pow(r,-1/3))):1}function Go(t,e,n){let r=Jn(t),o=Rr(t);return r&&o?Math.ceil((n-e)*Math.cbrt(r)/(3.49*o)):1}function Ua(t,e){let n=0,r=0;if(e===void 0)for(let o of t)o!=null&&(o=+o)>=o&&(++n,r+=o);else{let o=-1;for(let i of t)(i=e(i,++o,t))!=null&&(i=+i)>=i&&(++n,r+=i)}if(n)return r/n}function ln(t,e){return ye(t,.5,e)}function*jy(t){for(let e of t)yield*e}function Or(t){return Array.from(jy(t))}function Xa(t,e){let n=new Qt;if(e===void 0)for(let i of t)i!=null&&i>=i&&n.set(i,(n.get(i)||0)+1);else{let i=-1;for(let a of t)(a=e(a,++i,t))!=null&&a>=a&&n.set(a,(n.get(a)||0)+1)}let r,o=0;for(let[i,a]of n)a>o&&(o=a,r=i);return r}function Ha(t,e=Zy){let n=[],r,o=!1;for(let i of t)o&&n.push(e(r,i)),r=i,o=!0;return n}function Zy(t,e){return[t,e]}function er(t,e,n){t=+t,e=+e,n=(o=arguments.length)<2?(e=t,t=0,1):o<3?1:+n;for(var r=-1,o=Math.max(0,Math.ceil((e-t)/n))|0,i=new Array(o);++r<o;)i[r]=t+r*n;return i}function fe(t,e){let n=0;if(e===void 0)for(let r of t)(r=+r)&&(n+=r);else{let r=-1;for(let o of t)(o=+e(o,++r,t))&&(n+=o)}return n}function $n(t){if(typeof t[Symbol.iterator]!="function")throw new TypeError("values is not iterable");return Array.from(t).reverse()}function Rp(t){return t}var cs=1,ss=2,ls=3,Wa=4,Lp=1e-6;function Ky(t){return"translate("+t+",0)"}function Qy(t){return"translate(0,"+t+")"}function Jy(t){return e=>+t(e)}function tb(t,e){return e=Math.max(0,t.bandwidth()-e*2)/2,t.round()&&(e=Math.round(e)),n=>+t(n)+e}function eb(){return!this.__axis}function nb(t,e){var n=[],r=null,o=null,i=6,a=6,f=3,u=typeof window<"u"&&window.devicePixelRatio>1?0:.5,c=t===cs||t===Wa?-1:1,s=t===Wa||t===ss?"x":"y",d=t===cs||t===ls?Ky:Qy;function l(p){var m=r??(e.ticks?e.ticks.apply(e,n):e.domain()),h=o??(e.tickFormat?e.tickFormat.apply(e,n):Rp),g=Math.max(i,0)+f,b=e.range(),x=+b[0]+u,M=+b[b.length-1]+u,y=(e.bandwidth?tb:Jy)(e.copy(),u),w=p.selection?p.selection():p,v=w.selectAll(".domain").data([null]),T=w.selectAll(".tick").data(m,e).order(),E=T.exit(),I=T.enter().append("g").attr("class","tick"),D=T.select("line"),_=T.select("text");v=v.merge(v.enter().insert("path",".tick").attr("class","domain").attr("stroke","currentColor")),T=T.merge(I),D=D.merge(I.append("line").attr("stroke","currentColor").attr(s+"2",c*i)),_=_.merge(I.append("text").attr("fill","currentColor").attr(s,c*g).attr("dy",t===cs?"0em":t===ls?"0.71em":"0.32em")),p!==w&&(v=v.transition(p),T=T.transition(p),D=D.transition(p),_=_.transition(p),E=E.transition(p).attr("opacity",Lp).attr("transform",function(L){return isFinite(L=y(L))?d(L+u):this.getAttribute("transform")}),I.attr("opacity",Lp).attr("transform",function(L){var F=this.parentNode.__axis;return d((F&&isFinite(F=F(L))?F:y(L))+u)})),E.remove(),v.attr("d",t===Wa||t===ss?a?"M"+c*a+","+x+"H"+u+"V"+M+"H"+c*a:"M"+u+","+x+"V"+M:a?"M"+x+","+c*a+"V"+u+"H"+M+"V"+c*a:"M"+x+","+u+"H"+M),T.attr("opacity",1).attr("transform",function(L){return d(y(L)+u)}),D.attr(s+"2",c*i),_.attr(s,c*g).text(h),w.filter(eb).attr("fill","none").attr("font-size",10).attr("font-family","sans-serif").attr("text-anchor",t===ss?"start":t===Wa?"end":"middle"),w.each(function(){this.__axis=y})}return l.scale=function(p){return arguments.length?(e=p,l):e},l.ticks=function(){return n=Array.from(arguments),l},l.tickArguments=function(p){return arguments.length?(n=p==null?[]:Array.from(p),l):n.slice()},l.tickValues=function(p){return arguments.length?(r=p==null?null:Array.from(p),l):r&&r.slice()},l.tickFormat=function(p){return arguments.length?(o=p,l):o},l.tickSize=function(p){return arguments.length?(i=a=+p,l):i},l.tickSizeInner=function(p){return arguments.length?(i=+p,l):i},l.tickSizeOuter=function(p){return arguments.length?(a=+p,l):a},l.tickPadding=function(p){return arguments.length?(f=+p,l):f},l.offset=function(p){return arguments.length?(u=+p,l):u},l}function ds(t){return nb(ls,t)}var rb={value:()=>{}};function Op(){for(var t=0,e=arguments.length,n={},r;t<e;++t){if(!(r=arguments[t]+"")||r in n||/[\s.]/.test(r))throw new Error("illegal type: "+r);n[r]=[]}return new Ga(n)}function Ga(t){this._=t}function ob(t,e){return t.trim().split(/^|\s+/).map(function(n){var r="",o=n.indexOf(".");if(o>=0&&(r=n.slice(o+1),n=n.slice(0,o)),n&&!e.hasOwnProperty(n))throw new Error("unknown type: "+n);return{type:n,name:r}})}Ga.prototype=Op.prototype={constructor:Ga,on:function(t,e){var n=this._,r=ob(t+"",n),o,i=-1,a=r.length;if(arguments.length<2){for(;++i<a;)if((o=(t=r[i]).type)&&(o=ib(n[o],t.name)))return o;return}if(e!=null&&typeof e!="function")throw new Error("invalid callback: "+e);for(;++i<a;)if(o=(t=r[i]).type)n[o]=Pp(n[o],t.name,e);else if(e==null)for(o in n)n[o]=Pp(n[o],t.name,null);return this},copy:function(){var t={},e=this._;for(var n in e)t[n]=e[n].slice();return new Ga(t)},call:function(t,e){if((o=arguments.length-2)>0)for(var n=new Array(o),r=0,o,i;r<o;++r)n[r]=arguments[r+2];if(!this._.hasOwnProperty(t))throw new Error("unknown type: "+t);for(i=this._[t],r=0,o=i.length;r<o;++r)i[r].value.apply(e,n)},apply:function(t,e,n){if(!this._.hasOwnProperty(t))throw new Error("unknown type: "+t);for(var r=this._[t],o=0,i=r.length;o<i;++o)r[o].value.apply(e,n)}};function ib(t,e){for(var n=0,r=t.length,o;n<r;++n)if((o=t[n]).name===e)return o.value}function Pp(t,e,n){for(var r=0,o=t.length;r<o;++r)if(t[r].name===e){t[r]=rb,t=t.slice(0,r).concat(t.slice(r+1));break}return n!=null&&t.push({name:e,value:n}),t}var ps=Op;var Va="http://www.w3.org/1999/xhtml",Ye={svg:"http://www.w3.org/2000/svg",xhtml:Va,xlink:"http://www.w3.org/1999/xlink",xml:"http://www.w3.org/XML/1998/namespace",xmlns:"http://www.w3.org/2000/xmlns/"};function dn(t){var e=t+="",n=e.indexOf(":");return n>=0&&(e=t.slice(0,n))!=="xmlns"&&(t=t.slice(n+1)),Ye.hasOwnProperty(e)?{space:Ye[e],local:t}:t}function ab(t){return function(){var e=this.ownerDocument,n=this.namespaceURI;return n===Va&&e.documentElement.namespaceURI===Va?e.createElement(t):e.createElementNS(n,t)}}function fb(t){return function(){return this.ownerDocument.createElementNS(t.space,t.local)}}function pn(t){var e=dn(t);return(e.local?fb:ab)(e)}function ub(){}function nr(t){return t==null?ub:function(){return this.querySelector(t)}}function Fp(t){typeof t!="function"&&(t=nr(t));for(var e=this._groups,n=e.length,r=new Array(n),o=0;o<n;++o)for(var i=e[o],a=i.length,f=r[o]=new Array(a),u,c,s=0;s<a;++s)(u=i[s])&&(c=t.call(u,u.__data__,s,i))&&("__data__"in u&&(c.__data__=u.__data__),f[s]=c);return new vt(r,this._parents)}function ms(t){return t==null?[]:Array.isArray(t)?t:Array.from(t)}function cb(){return[]}function Vo(t){return t==null?cb:function(){return this.querySelectorAll(t)}}function sb(t){return function(){return ms(t.apply(this,arguments))}}function qp(t){typeof t=="function"?t=sb(t):t=Vo(t);for(var e=this._groups,n=e.length,r=[],o=[],i=0;i<n;++i)for(var a=e[i],f=a.length,u,c=0;c<f;++c)(u=a[c])&&(r.push(t.call(u,u.__data__,c,a)),o.push(u));return new vt(r,o)}function jo(t){return function(){return this.matches(t)}}function ja(t){return function(e){return e.matches(t)}}var lb=Array.prototype.find;function db(t){return function(){return lb.call(this.children,t)}}function pb(){return this.firstElementChild}function Yp(t){return this.select(t==null?pb:db(typeof t=="function"?t:ja(t)))}var mb=Array.prototype.filter;function hb(){return Array.from(this.children)}function gb(t){return function(){return mb.call(this.children,t)}}function zp(t){return this.selectAll(t==null?hb:gb(typeof t=="function"?t:ja(t)))}function Bp(t){typeof t!="function"&&(t=jo(t));for(var e=this._groups,n=e.length,r=new Array(n),o=0;o<n;++o)for(var i=e[o],a=i.length,f=r[o]=[],u,c=0;c<a;++c)(u=i[c])&&t.call(u,u.__data__,c,i)&&f.push(u);return new vt(r,this._parents)}function Za(t){return new Array(t.length)}function Up(){return new vt(this._enter||this._groups.map(Za),this._parents)}function Zo(t,e){this.ownerDocument=t.ownerDocument,this.namespaceURI=t.namespaceURI,this._next=null,this._parent=t,this.__data__=e}Zo.prototype={constructor:Zo,appendChild:function(t){return this._parent.insertBefore(t,this._next)},insertBefore:function(t,e){return this._parent.insertBefore(t,e)},querySelector:function(t){return this._parent.querySelector(t)},querySelectorAll:function(t){return this._parent.querySelectorAll(t)}};function Xp(t){return function(){return t}}function xb(t,e,n,r,o,i){for(var a=0,f,u=e.length,c=i.length;a<c;++a)(f=e[a])?(f.__data__=i[a],r[a]=f):n[a]=new Zo(t,i[a]);for(;a<u;++a)(f=e[a])&&(o[a]=f)}function yb(t,e,n,r,o,i,a){var f,u,c=new Map,s=e.length,d=i.length,l=new Array(s),p;for(f=0;f<s;++f)(u=e[f])&&(l[f]=p=a.call(u,u.__data__,f,e)+"",c.has(p)?o[f]=u:c.set(p,u));for(f=0;f<d;++f)p=a.call(t,i[f],f,i)+"",(u=c.get(p))?(r[f]=u,u.__data__=i[f],c.delete(p)):n[f]=new Zo(t,i[f]);for(f=0;f<s;++f)(u=e[f])&&c.get(l[f])===u&&(o[f]=u)}function bb(t){return t.__data__}function Hp(t,e){if(!arguments.length)return Array.from(this,bb);var n=e?yb:xb,r=this._parents,o=this._groups;typeof t!="function"&&(t=Xp(t));for(var i=o.length,a=new Array(i),f=new Array(i),u=new Array(i),c=0;c<i;++c){var s=r[c],d=o[c],l=d.length,p=wb(t.call(s,s&&s.__data__,c,r)),m=p.length,h=f[c]=new Array(m),g=a[c]=new Array(m),b=u[c]=new Array(l);n(s,d,h,g,b,p,e);for(var x=0,M=0,y,w;x<m;++x)if(y=h[x]){for(x>=M&&(M=x+1);!(w=g[M])&&++M<m;);y._next=w||null}}return a=new vt(a,r),a._enter=f,a._exit=u,a}function wb(t){return typeof t=="object"&&"length"in t?t:Array.from(t)}function Wp(){return new vt(this._exit||this._groups.map(Za),this._parents)}function Gp(t,e,n){var r=this.enter(),o=this,i=this.exit();return typeof t=="function"?(r=t(r),r&&(r=r.selection())):r=r.append(t+""),e!=null&&(o=e(o),o&&(o=o.selection())),n==null?i.remove():n(i),r&&o?r.merge(o).order():o}function Vp(t){for(var e=t.selection?t.selection():t,n=this._groups,r=e._groups,o=n.length,i=r.length,a=Math.min(o,i),f=new Array(o),u=0;u<a;++u)for(var c=n[u],s=r[u],d=c.length,l=f[u]=new Array(d),p,m=0;m<d;++m)(p=c[m]||s[m])&&(l[m]=p);for(;u<o;++u)f[u]=n[u];return new vt(f,this._parents)}function jp(){for(var t=this._groups,e=-1,n=t.length;++e<n;)for(var r=t[e],o=r.length-1,i=r[o],a;--o>=0;)(a=r[o])&&(i&&a.compareDocumentPosition(i)^4&&i.parentNode.insertBefore(a,i),i=a);return this}function Zp(t){t||(t=vb);function e(d,l){return d&&l?t(d.__data__,l.__data__):!d-!l}for(var n=this._groups,r=n.length,o=new Array(r),i=0;i<r;++i){for(var a=n[i],f=a.length,u=o[i]=new Array(f),c,s=0;s<f;++s)(c=a[s])&&(u[s]=c);u.sort(e)}return new vt(o,this._parents).order()}function vb(t,e){return t<e?-1:t>e?1:t>=e?0:NaN}function Kp(){var t=arguments[0];return arguments[0]=this,t.apply(null,arguments),this}function Qp(){return Array.from(this)}function Jp(){for(var t=this._groups,e=0,n=t.length;e<n;++e)for(var r=t[e],o=0,i=r.length;o<i;++o){var a=r[o];if(a)return a}return null}function tm(){let t=0;for(let e of this)++t;return t}function em(){return!this.node()}function nm(t){for(var e=this._groups,n=0,r=e.length;n<r;++n)for(var o=e[n],i=0,a=o.length,f;i<a;++i)(f=o[i])&&t.call(f,f.__data__,i,o);return this}function Mb(t){return function(){this.removeAttribute(t)}}function Sb(t){return function(){this.removeAttributeNS(t.space,t.local)}}function Tb(t,e){return function(){this.setAttribute(t,e)}}function _b(t,e){return function(){this.setAttributeNS(t.space,t.local,e)}}function Cb(t,e){return function(){var n=e.apply(this,arguments);n==null?this.removeAttribute(t):this.setAttribute(t,n)}}function Ab(t,e){return function(){var n=e.apply(this,arguments);n==null?this.removeAttributeNS(t.space,t.local):this.setAttributeNS(t.space,t.local,n)}}function rm(t,e){var n=dn(t);if(arguments.length<2){var r=this.node();return n.local?r.getAttributeNS(n.space,n.local):r.getAttribute(n)}return this.each((e==null?n.local?Sb:Mb:typeof e=="function"?n.local?Ab:Cb:n.local?_b:Tb)(n,e))}function Ka(t){return t.ownerDocument&&t.ownerDocument.defaultView||t.document&&t||t.defaultView}function $b(t){return function(){this.style.removeProperty(t)}}function Eb(t,e,n){return function(){this.style.setProperty(t,e,n)}}function Ib(t,e,n){return function(){var r=e.apply(this,arguments);r==null?this.style.removeProperty(t):this.style.setProperty(t,r,n)}}function om(t,e,n){return arguments.length>1?this.each((e==null?$b:typeof e=="function"?Ib:Eb)(t,e,n??"")):En(this.node(),t)}function En(t,e){return t.style.getPropertyValue(e)||Ka(t).getComputedStyle(t,null).getPropertyValue(e)}function kb(t){return function(){delete this[t]}}function Db(t,e){return function(){this[t]=e}}function Nb(t,e){return function(){var n=e.apply(this,arguments);n==null?delete this[t]:this[t]=n}}function im(t,e){return arguments.length>1?this.each((e==null?kb:typeof e=="function"?Nb:Db)(t,e)):this.node()[t]}function am(t){return t.trim().split(/^|\s+/)}function hs(t){return t.classList||new fm(t)}function fm(t){this._node=t,this._names=am(t.getAttribute("class")||"")}fm.prototype={add:function(t){var e=this._names.indexOf(t);e<0&&(this._names.push(t),this._node.setAttribute("class",this._names.join(" ")))},remove:function(t){var e=this._names.indexOf(t);e>=0&&(this._names.splice(e,1),this._node.setAttribute("class",this._names.join(" ")))},contains:function(t){return this._names.indexOf(t)>=0}};function um(t,e){for(var n=hs(t),r=-1,o=e.length;++r<o;)n.add(e[r])}function cm(t,e){for(var n=hs(t),r=-1,o=e.length;++r<o;)n.remove(e[r])}function Rb(t){return function(){um(this,t)}}function Lb(t){return function(){cm(this,t)}}function Pb(t,e){return function(){(e.apply(this,arguments)?um:cm)(this,t)}}function sm(t,e){var n=am(t+"");if(arguments.length<2){for(var r=hs(this.node()),o=-1,i=n.length;++o<i;)if(!r.contains(n[o]))return!1;return!0}return this.each((typeof e=="function"?Pb:e?Rb:Lb)(n,e))}function Ob(){this.textContent=""}function Fb(t){return function(){this.textContent=t}}function qb(t){return function(){var e=t.apply(this,arguments);this.textContent=e??""}}function lm(t){return arguments.length?this.each(t==null?Ob:(typeof t=="function"?qb:Fb)(t)):this.node().textContent}function Yb(){this.innerHTML=""}function zb(t){return function(){this.innerHTML=t}}function Bb(t){return function(){var e=t.apply(this,arguments);this.innerHTML=e??""}}function dm(t){return arguments.length?this.each(t==null?Yb:(typeof t=="function"?Bb:zb)(t)):this.node().innerHTML}function Ub(){this.nextSibling&&this.parentNode.appendChild(this)}function pm(){return this.each(Ub)}function Xb(){this.previousSibling&&this.parentNode.insertBefore(this,this.parentNode.firstChild)}function mm(){return this.each(Xb)}function hm(t){var e=typeof t=="function"?t:pn(t);return this.select(function(){return this.appendChild(e.apply(this,arguments))})}function Hb(){return null}function gm(t,e){var n=typeof t=="function"?t:pn(t),r=e==null?Hb:typeof e=="function"?e:nr(e);return this.select(function(){return this.insertBefore(n.apply(this,arguments),r.apply(this,arguments)||null)})}function Wb(){var t=this.parentNode;t&&t.removeChild(this)}function xm(){return this.each(Wb)}function Gb(){var t=this.cloneNode(!1),e=this.parentNode;return e?e.insertBefore(t,this.nextSibling):t}function Vb(){var t=this.cloneNode(!0),e=this.parentNode;return e?e.insertBefore(t,this.nextSibling):t}function ym(t){return this.select(t?Vb:Gb)}function bm(t){return arguments.length?this.property("__data__",t):this.node().__data__}function jb(t){return function(e){t.call(this,e,this.__data__)}}function Zb(t){return t.trim().split(/^|\s+/).map(function(e){var n="",r=e.indexOf(".");return r>=0&&(n=e.slice(r+1),e=e.slice(0,r)),{type:e,name:n}})}function Kb(t){return function(){var e=this.__on;if(e){for(var n=0,r=-1,o=e.length,i;n<o;++n)i=e[n],(!t.type||i.type===t.type)&&i.name===t.name?this.removeEventListener(i.type,i.listener,i.options):e[++r]=i;++r?e.length=r:delete this.__on}}}function Qb(t,e,n){return function(){var r=this.__on,o,i=jb(e);if(r){for(var a=0,f=r.length;a<f;++a)if((o=r[a]).type===t.type&&o.name===t.name){this.removeEventListener(o.type,o.listener,o.options),this.addEventListener(o.type,o.listener=i,o.options=n),o.value=e;return}}this.addEventListener(t.type,i,n),o={type:t.type,name:t.name,value:e,listener:i,options:n},r?r.push(o):this.__on=[o]}}function wm(t,e,n){var r=Zb(t+""),o,i=r.length,a;if(arguments.length<2){var f=this.node().__on;if(f){for(var u=0,c=f.length,s;u<c;++u)for(o=0,s=f[u];o<i;++o)if((a=r[o]).type===s.type&&a.name===s.name)return s.value}return}for(f=e?Qb:Kb,o=0;o<i;++o)this.each(f(r[o],e,n));return this}function vm(t,e,n){var r=Ka(t),o=r.CustomEvent;typeof o=="function"?o=new o(e,n):(o=r.document.createEvent("Event"),n?(o.initEvent(e,n.bubbles,n.cancelable),o.detail=n.detail):o.initEvent(e,!1,!1)),t.dispatchEvent(o)}function Jb(t,e){return function(){return vm(this,t,e)}}function t2(t,e){return function(){return vm(this,t,e.apply(this,arguments))}}function Mm(t,e){return this.each((typeof e=="function"?t2:Jb)(t,e))}function*Sm(){for(var t=this._groups,e=0,n=t.length;e<n;++e)for(var r=t[e],o=0,i=r.length,a;o<i;++o)(a=r[o])&&(yield a)}var gs=[null];function vt(t,e){this._groups=t,this._parents=e}function Tm(){return new vt([[document.documentElement]],gs)}function e2(){return this}vt.prototype=Tm.prototype={constructor:vt,select:Fp,selectAll:qp,selectChild:Yp,selectChildren:zp,filter:Bp,data:Hp,enter:Up,exit:Wp,join:Gp,merge:Vp,selection:e2,order:jp,sort:Zp,call:Kp,nodes:Qp,node:Jp,size:tm,empty:em,each:nm,attr:rm,style:om,property:im,classed:sm,text:lm,html:dm,raise:pm,lower:mm,append:hm,insert:gm,remove:xm,clone:ym,datum:bm,on:wm,dispatch:Mm,[Symbol.iterator]:Sm};var mn=Tm;function hn(t){return typeof t=="string"?new vt([[document.querySelector(t)]],[document.documentElement]):new vt([[t]],gs)}function _m(t){let e;for(;e=t.sourceEvent;)t=e;return t}function xs(t,e){if(t=_m(t),e===void 0&&(e=t.currentTarget),e){var n=e.ownerSVGElement||e;if(n.createSVGPoint){var r=n.createSVGPoint();return r.x=t.clientX,r.y=t.clientY,r=r.matrixTransform(e.getScreenCTM().inverse()),[r.x,r.y]}if(e.getBoundingClientRect){var o=e.getBoundingClientRect();return[t.clientX-o.left-e.clientLeft,t.clientY-o.top-e.clientTop]}}return[t.pageX,t.pageY]}function gn(t,e,n){t.prototype=e.prototype=n,n.constructor=t}function In(t,e){var n=Object.create(t.prototype);for(var r in e)n[r]=e[r];return n}function Be(){}var kn=.7,ir=1/kn,Fr="\\s*([+-]?\\d+)\\s*",Ko="\\s*([+-]?(?:\\d*\\.)?\\d+(?:[eE][+-]?\\d+)?)\\s*",ze="\\s*([+-]?(?:\\d*\\.)?\\d+(?:[eE][+-]?\\d+)?)%\\s*",n2=/^#([0-9a-f]{3,8})$/,r2=new RegExp(`^rgb\\(${Fr},${Fr},${Fr}\\)$`),o2=new RegExp(`^rgb\\(${ze},${ze},${ze}\\)$`),i2=new RegExp(`^rgba\\(${Fr},${Fr},${Fr},${Ko}\\)$`),a2=new RegExp(`^rgba\\(${ze},${ze},${ze},${Ko}\\)$`),f2=new RegExp(`^hsl\\(${Ko},${ze},${ze}\\)$`),u2=new RegExp(`^hsla\\(${Ko},${ze},${ze},${Ko}\\)$`),Cm={aliceblue:15792383,antiquewhite:16444375,aqua:65535,aquamarine:8388564,azure:15794175,beige:16119260,bisque:16770244,black:0,blanchedalmond:16772045,blue:255,blueviolet:9055202,brown:10824234,burlywood:14596231,cadetblue:6266528,chartreuse:8388352,chocolate:13789470,coral:16744272,cornflowerblue:6591981,cornsilk:16775388,crimson:14423100,cyan:65535,darkblue:139,darkcyan:35723,darkgoldenrod:12092939,darkgray:11119017,darkgreen:25600,darkgrey:11119017,darkkhaki:12433259,darkmagenta:9109643,darkolivegreen:5597999,darkorange:16747520,darkorchid:10040012,darkred:9109504,darksalmon:15308410,darkseagreen:9419919,darkslateblue:4734347,darkslategray:3100495,darkslategrey:3100495,darkturquoise:52945,darkviolet:9699539,deeppink:16716947,deepskyblue:49151,dimgray:6908265,dimgrey:6908265,dodgerblue:2003199,firebrick:11674146,floralwhite:16775920,forestgreen:2263842,fuchsia:16711935,gainsboro:14474460,ghostwhite:16316671,gold:16766720,goldenrod:14329120,gray:8421504,green:32768,greenyellow:11403055,grey:8421504,honeydew:15794160,hotpink:16738740,indianred:13458524,indigo:4915330,ivory:16777200,khaki:15787660,lavender:15132410,lavenderblush:16773365,lawngreen:8190976,lemonchiffon:16775885,lightblue:11393254,lightcoral:15761536,lightcyan:14745599,lightgoldenrodyellow:16448210,lightgray:13882323,lightgreen:9498256,lightgrey:13882323,lightpink:16758465,lightsalmon:16752762,lightseagreen:2142890,lightskyblue:8900346,lightslategray:7833753,lightslategrey:7833753,lightsteelblue:11584734,lightyellow:16777184,lime:65280,limegreen:3329330,linen:16445670,magenta:16711935,maroon:8388608,mediumaquamarine:6737322,mediumblue:205,mediumorchid:12211667,mediumpurple:9662683,mediumseagreen:3978097,mediumslateblue:8087790,mediumspringgreen:64154,mediumturquoise:4772300,mediumvioletred:13047173,midnightblue:1644912,mintcream:16121850,mistyrose:16770273,moccasin:16770229,navajowhite:16768685,navy:128,oldlace:16643558,olive:8421376,olivedrab:7048739,orange:16753920,orangered:16729344,orchid:14315734,palegoldenrod:15657130,palegreen:10025880,paleturquoise:11529966,palevioletred:14381203,papayawhip:16773077,peachpuff:16767673,peru:13468991,pink:16761035,plum:14524637,powderblue:11591910,purple:8388736,rebeccapurple:6697881,red:16711680,rosybrown:12357519,royalblue:4286945,saddlebrown:9127187,salmon:16416882,sandybrown:16032864,seagreen:3050327,seashell:16774638,sienna:10506797,silver:12632256,skyblue:8900331,slateblue:6970061,slategray:7372944,slategrey:7372944,snow:16775930,springgreen:65407,steelblue:4620980,tan:13808780,teal:32896,thistle:14204888,tomato:16737095,turquoise:4251856,violet:15631086,wheat:16113331,white:16777215,whitesmoke:16119285,yellow:16776960,yellowgreen:10145074};gn(Be,ue,{copy(t){return Object.assign(new this.constructor,this,t)},displayable(){return this.rgb().displayable()},hex:Am,formatHex:Am,formatHex8:c2,formatHsl:s2,formatRgb:$m,toString:$m});function Am(){return this.rgb().formatHex()}function c2(){return this.rgb().formatHex8()}function s2(){return Rm(this).formatHsl()}function $m(){return this.rgb().formatRgb()}function ue(t){var e,n;return t=(t+"").trim().toLowerCase(),(e=n2.exec(t))?(n=e[1].length,e=parseInt(e[1],16),n===6?Em(e):n===3?new Tt(e>>8&15|e>>4&240,e>>4&15|e&240,(e&15)<<4|e&15,1):n===8?Qa(e>>24&255,e>>16&255,e>>8&255,(e&255)/255):n===4?Qa(e>>12&15|e>>8&240,e>>8&15|e>>4&240,e>>4&15|e&240,((e&15)<<4|e&15)/255):null):(e=r2.exec(t))?new Tt(e[1],e[2],e[3],1):(e=o2.exec(t))?new Tt(e[1]*255/100,e[2]*255/100,e[3]*255/100,1):(e=i2.exec(t))?Qa(e[1],e[2],e[3],e[4]):(e=a2.exec(t))?Qa(e[1]*255/100,e[2]*255/100,e[3]*255/100,e[4]):(e=f2.exec(t))?Dm(e[1],e[2]/100,e[3]/100,1):(e=u2.exec(t))?Dm(e[1],e[2]/100,e[3]/100,e[4]):Cm.hasOwnProperty(t)?Em(Cm[t]):t==="transparent"?new Tt(NaN,NaN,NaN,0):null}function Em(t){return new Tt(t>>16&255,t>>8&255,t&255,1)}function Qa(t,e,n,r){return r<=0&&(t=e=n=NaN),new Tt(t,e,n,r)}function Qo(t){return t instanceof Be||(t=ue(t)),t?(t=t.rgb(),new Tt(t.r,t.g,t.b,t.opacity)):new Tt}function be(t,e,n,r){return arguments.length===1?Qo(t):new Tt(t,e,n,r??1)}function Tt(t,e,n,r){this.r=+t,this.g=+e,this.b=+n,this.opacity=+r}gn(Tt,be,In(Be,{brighter(t){return t=t==null?ir:Math.pow(ir,t),new Tt(this.r*t,this.g*t,this.b*t,this.opacity)},darker(t){return t=t==null?kn:Math.pow(kn,t),new Tt(this.r*t,this.g*t,this.b*t,this.opacity)},rgb(){return this},clamp(){return new Tt(or(this.r),or(this.g),or(this.b),tf(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:Im,formatHex:Im,formatHex8:l2,formatRgb:km,toString:km}));function Im(){return`#${rr(this.r)}${rr(this.g)}${rr(this.b)}`}function l2(){return`#${rr(this.r)}${rr(this.g)}${rr(this.b)}${rr((isNaN(this.opacity)?1:this.opacity)*255)}`}function km(){let t=tf(this.opacity);return`${t===1?"rgb(":"rgba("}${or(this.r)}, ${or(this.g)}, ${or(this.b)}${t===1?")":`, ${t})`}`}function tf(t){return isNaN(t)?1:Math.max(0,Math.min(1,t))}function or(t){return Math.max(0,Math.min(255,Math.round(t)||0))}function rr(t){return t=or(t),(t<16?"0":"")+t.toString(16)}function Dm(t,e,n,r){return r<=0?t=e=n=NaN:n<=0||n>=1?t=e=NaN:e<=0&&(t=NaN),new $e(t,e,n,r)}function Rm(t){if(t instanceof $e)return new $e(t.h,t.s,t.l,t.opacity);if(t instanceof Be||(t=ue(t)),!t)return new $e;if(t instanceof $e)return t;t=t.rgb();var e=t.r/255,n=t.g/255,r=t.b/255,o=Math.min(e,n,r),i=Math.max(e,n,r),a=NaN,f=i-o,u=(i+o)/2;return f?(e===i?a=(n-r)/f+(n<r)*6:n===i?a=(r-e)/f+2:a=(e-n)/f+4,f/=u<.5?i+o:2-i-o,a*=60):f=u>0&&u<1?0:a,new $e(a,f,u,t.opacity)}function Jo(t,e,n,r){return arguments.length===1?Rm(t):new $e(t,e,n,r??1)}function $e(t,e,n,r){this.h=+t,this.s=+e,this.l=+n,this.opacity=+r}gn($e,Jo,In(Be,{brighter(t){return t=t==null?ir:Math.pow(ir,t),new $e(this.h,this.s,this.l*t,this.opacity)},darker(t){return t=t==null?kn:Math.pow(kn,t),new $e(this.h,this.s,this.l*t,this.opacity)},rgb(){var t=this.h%360+(this.h<0)*360,e=isNaN(t)||isNaN(this.s)?0:this.s,n=this.l,r=n+(n<.5?n:1-n)*e,o=2*n-r;return new Tt(ys(t>=240?t-240:t+120,o,r),ys(t,o,r),ys(t<120?t+240:t-120,o,r),this.opacity)},clamp(){return new $e(Nm(this.h),Ja(this.s),Ja(this.l),tf(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=tf(this.opacity);return`${t===1?"hsl(":"hsla("}${Nm(this.h)}, ${Ja(this.s)*100}%, ${Ja(this.l)*100}%${t===1?")":`, ${t})`}`}}));function Nm(t){return t=(t||0)%360,t<0?t+360:t}function Ja(t){return Math.max(0,Math.min(1,t||0))}function ys(t,e,n){return(t<60?e+(n-e)*t/60:t<180?n:t<240?e+(n-e)*(240-t)/60:e)*255}var ef=Math.PI/180,nf=180/Math.PI;var rf=18,Lm=.96422,Pm=1,Om=.82521,Fm=4/29,qr=6/29,qm=3*qr*qr,d2=qr*qr*qr;function Ym(t){if(t instanceof Ue)return new Ue(t.l,t.a,t.b,t.opacity);if(t instanceof xn)return zm(t);t instanceof Tt||(t=Qo(t));var e=Ms(t.r),n=Ms(t.g),r=Ms(t.b),o=bs((.2225045*e+.7168786*n+.0606169*r)/Pm),i,a;return e===n&&n===r?i=a=o:(i=bs((.4360747*e+.3850649*n+.1430804*r)/Lm),a=bs((.0139322*e+.0971045*n+.7141733*r)/Om)),new Ue(116*o-16,500*(i-o),200*(o-a),t.opacity)}function Yr(t,e,n,r){return arguments.length===1?Ym(t):new Ue(t,e,n,r??1)}function Ue(t,e,n,r){this.l=+t,this.a=+e,this.b=+n,this.opacity=+r}gn(Ue,Yr,In(Be,{brighter(t){return new Ue(this.l+rf*(t??1),this.a,this.b,this.opacity)},darker(t){return new Ue(this.l-rf*(t??1),this.a,this.b,this.opacity)},rgb(){var t=(this.l+16)/116,e=isNaN(this.a)?t:t+this.a/500,n=isNaN(this.b)?t:t-this.b/200;return e=Lm*ws(e),t=Pm*ws(t),n=Om*ws(n),new Tt(vs(3.1338561*e-1.6168667*t-.4906146*n),vs(-.9787684*e+1.9161415*t+.033454*n),vs(.0719453*e-.2289914*t+1.4052427*n),this.opacity)}}));function bs(t){return t>d2?Math.pow(t,1/3):t/qm+Fm}function ws(t){return t>qr?t*t*t:qm*(t-Fm)}function vs(t){return 255*(t<=.0031308?12.92*t:1.055*Math.pow(t,1/2.4)-.055)}function Ms(t){return(t/=255)<=.04045?t/12.92:Math.pow((t+.055)/1.055,2.4)}function p2(t){if(t instanceof xn)return new xn(t.h,t.c,t.l,t.opacity);if(t instanceof Ue||(t=Ym(t)),t.a===0&&t.b===0)return new xn(NaN,0<t.l&&t.l<100?0:NaN,t.l,t.opacity);var e=Math.atan2(t.b,t.a)*nf;return new xn(e<0?e+360:e,Math.sqrt(t.a*t.a+t.b*t.b),t.l,t.opacity)}function ti(t,e,n,r){return arguments.length===1?p2(t):new xn(t,e,n,r??1)}function xn(t,e,n,r){this.h=+t,this.c=+e,this.l=+n,this.opacity=+r}function zm(t){if(isNaN(t.h))return new Ue(t.l,0,0,t.opacity);var e=t.h*ef;return new Ue(t.l,Math.cos(e)*t.c,Math.sin(e)*t.c,t.opacity)}gn(xn,ti,In(Be,{brighter(t){return new xn(this.h,this.c,this.l+rf*(t??1),this.opacity)},darker(t){return new xn(this.h,this.c,this.l-rf*(t??1),this.opacity)},rgb(){return zm(this).rgb()}}));var Hm=-.14861,Ss=1.78277,Ts=-.29227,of=-.90649,ei=1.97294,Bm=ei*of,Um=ei*Ss,Xm=Ss*Ts-of*Hm;function m2(t){if(t instanceof ar)return new ar(t.h,t.s,t.l,t.opacity);t instanceof Tt||(t=Qo(t));var e=t.r/255,n=t.g/255,r=t.b/255,o=(Xm*r+Bm*e-Um*n)/(Xm+Bm-Um),i=r-o,a=(ei*(n-o)-Ts*i)/of,f=Math.sqrt(a*a+i*i)/(ei*o*(1-o)),u=f?Math.atan2(a,i)*nf-120:NaN;return new ar(u<0?u+360:u,f,o,t.opacity)}function te(t,e,n,r){return arguments.length===1?m2(t):new ar(t,e,n,r??1)}function ar(t,e,n,r){this.h=+t,this.s=+e,this.l=+n,this.opacity=+r}gn(ar,te,In(Be,{brighter(t){return t=t==null?ir:Math.pow(ir,t),new ar(this.h,this.s,this.l*t,this.opacity)},darker(t){return t=t==null?kn:Math.pow(kn,t),new ar(this.h,this.s,this.l*t,this.opacity)},rgb(){var t=isNaN(this.h)?0:(this.h+120)*ef,e=+this.l,n=isNaN(this.s)?0:this.s*e*(1-e),r=Math.cos(t),o=Math.sin(t);return new Tt(255*(e+n*(Hm*r+Ss*o)),255*(e+n*(Ts*r+of*o)),255*(e+n*(ei*r)),this.opacity)}}));function _s(t,e,n,r,o){var i=t*t,a=i*t;return((1-3*t+3*i-a)*e+(4-6*i+3*a)*n+(1+3*t+3*i-3*a)*r+a*o)/6}function Wm(t){var e=t.length-1;return function(n){var r=n<=0?n=0:n>=1?(n=1,e-1):Math.floor(n*e),o=t[r],i=t[r+1],a=r>0?t[r-1]:2*o-i,f=r<e-1?t[r+2]:2*i-o;return _s((n-r/e)*e,a,o,i,f)}}function Gm(t){var e=t.length;return function(n){var r=Math.floor(((n%=1)<0?++n:n)*e),o=t[(r+e-1)%e],i=t[r%e],a=t[(r+1)%e],f=t[(r+2)%e];return _s((n-r/e)*e,o,i,a,f)}}var zr=t=>()=>t;function Vm(t,e){return function(n){return t+n*e}}function h2(t,e,n){return t=Math.pow(t,n),e=Math.pow(e,n)-t,n=1/n,function(r){return Math.pow(t+r*e,n)}}function Br(t,e){var n=e-t;return n?Vm(t,n>180||n<-180?n-360*Math.round(n/360):n):zr(isNaN(t)?e:t)}function jm(t){return(t=+t)==1?xt:function(e,n){return n-e?h2(e,n,t):zr(isNaN(e)?n:e)}}function xt(t,e){var n=e-t;return n?Vm(t,n):zr(isNaN(t)?e:t)}var we=function t(e){var n=jm(e);function r(o,i){var a=n((o=be(o)).r,(i=be(i)).r),f=n(o.g,i.g),u=n(o.b,i.b),c=xt(o.opacity,i.opacity);return function(s){return o.r=a(s),o.g=f(s),o.b=u(s),o.opacity=c(s),o+""}}return r.gamma=t,r}(1);function Zm(t){return function(e){var n=e.length,r=new Array(n),o=new Array(n),i=new Array(n),a,f;for(a=0;a<n;++a)f=be(e[a]),r[a]=f.r||0,o[a]=f.g||0,i[a]=f.b||0;return r=t(r),o=t(o),i=t(i),f.opacity=1,function(u){return f.r=r(u),f.g=o(u),f.b=i(u),f+""}}}var Cs=Zm(Wm),g2=Zm(Gm);function Km(t,e){e||(e=[]);var n=t?Math.min(e.length,t.length):0,r=e.slice(),o;return function(i){for(o=0;o<n;++o)r[o]=t[o]*(1-i)+e[o]*i;return r}}function Qm(t){return ArrayBuffer.isView(t)&&!(t instanceof DataView)}function Jm(t,e){var n=e?e.length:0,r=t?Math.min(n,t.length):0,o=new Array(r),i=new Array(n),a;for(a=0;a<r;++a)o[a]=Ee(t[a],e[a]);for(;a<n;++a)i[a]=e[a];return function(f){for(a=0;a<r;++a)i[a]=o[a](f);return i}}function th(t,e){var n=new Date;return t=+t,e=+e,function(r){return n.setTime(t*(1-r)+e*r),n}}function ht(t,e){return t=+t,e=+e,function(n){return t*(1-n)+e*n}}function eh(t,e){var n={},r={},o;(t===null||typeof t!="object")&&(t={}),(e===null||typeof e!="object")&&(e={});for(o in e)o in t?n[o]=Ee(t[o],e[o]):r[o]=e[o];return function(i){for(o in n)r[o]=n[o](i);return r}}var $s=/[-+]?(?:\d+\.?\d*|\.?\d+)(?:[eE][-+]?\d+)?/g,As=new RegExp($s.source,"g");function x2(t){return function(){return t}}function y2(t){return function(e){return t(e)+""}}function ni(t,e){var n=$s.lastIndex=As.lastIndex=0,r,o,i,a=-1,f=[],u=[];for(t=t+"",e=e+"";(r=$s.exec(t))&&(o=As.exec(e));)(i=o.index)>n&&(i=e.slice(n,i),f[a]?f[a]+=i:f[++a]=i),(r=r[0])===(o=o[0])?f[a]?f[a]+=o:f[++a]=o:(f[++a]=null,u.push({i:a,x:ht(r,o)})),n=As.lastIndex;return n<e.length&&(i=e.slice(n),f[a]?f[a]+=i:f[++a]=i),f.length<2?u[0]?y2(u[0].x):x2(e):(e=u.length,function(c){for(var s=0,d;s<e;++s)f[(d=u[s]).i]=d.x(c);return f.join("")})}function Ee(t,e){var n=typeof e,r;return e==null||n==="boolean"?zr(e):(n==="number"?ht:n==="string"?(r=ue(e))?(e=r,we):ni:e instanceof ue?we:e instanceof Date?th:Qm(e)?Km:Array.isArray(e)?Jm:typeof e.valueOf!="function"&&typeof e.toString!="function"||isNaN(e)?eh:ht)(t,e)}function fr(t,e){return t=+t,e=+e,function(n){return Math.round(t*(1-n)+e*n)}}var nh=180/Math.PI,af={translateX:0,translateY:0,rotate:0,skewX:0,scaleX:1,scaleY:1};function Es(t,e,n,r,o,i){var a,f,u;return(a=Math.sqrt(t*t+e*e))&&(t/=a,e/=a),(u=t*n+e*r)&&(n-=t*u,r-=e*u),(f=Math.sqrt(n*n+r*r))&&(n/=f,r/=f,u/=f),t*r<e*n&&(t=-t,e=-e,u=-u,a=-a),{translateX:o,translateY:i,rotate:Math.atan2(e,t)*nh,skewX:Math.atan(u)*nh,scaleX:a,scaleY:f}}var ff;function rh(t){let e=new(typeof DOMMatrix=="function"?DOMMatrix:WebKitCSSMatrix)(t+"");return e.isIdentity?af:Es(e.a,e.b,e.c,e.d,e.e,e.f)}function oh(t){return t==null?af:(ff||(ff=document.createElementNS("http://www.w3.org/2000/svg","g")),ff.setAttribute("transform",t),(t=ff.transform.baseVal.consolidate())?(t=t.matrix,Es(t.a,t.b,t.c,t.d,t.e,t.f)):af)}function ih(t,e,n,r){function o(c){return c.length?c.pop()+" ":""}function i(c,s,d,l,p,m){if(c!==d||s!==l){var h=p.push("translate(",null,e,null,n);m.push({i:h-4,x:ht(c,d)},{i:h-2,x:ht(s,l)})}else(d||l)&&p.push("translate("+d+e+l+n)}function a(c,s,d,l){c!==s?(c-s>180?s+=360:s-c>180&&(c+=360),l.push({i:d.push(o(d)+"rotate(",null,r)-2,x:ht(c,s)})):s&&d.push(o(d)+"rotate("+s+r)}function f(c,s,d,l){c!==s?l.push({i:d.push(o(d)+"skewX(",null,r)-2,x:ht(c,s)}):s&&d.push(o(d)+"skewX("+s+r)}function u(c,s,d,l,p,m){if(c!==d||s!==l){var h=p.push(o(p)+"scale(",null,",",null,")");m.push({i:h-4,x:ht(c,d)},{i:h-2,x:ht(s,l)})}else(d!==1||l!==1)&&p.push(o(p)+"scale("+d+","+l+")")}return function(c,s){var d=[],l=[];return c=t(c),s=t(s),i(c.translateX,c.translateY,s.translateX,s.translateY,d,l),a(c.rotate,s.rotate,d,l),f(c.skewX,s.skewX,d,l),u(c.scaleX,c.scaleY,s.scaleX,s.scaleY,d,l),c=s=null,function(p){for(var m=-1,h=l.length,g;++m<h;)d[(g=l[m]).i]=g.x(p);return d.join("")}}}var Is=ih(rh,"px, ","px)","deg)"),ks=ih(oh,", ",")",")");function ah(t){return function(e,n){var r=t((e=Jo(e)).h,(n=Jo(n)).h),o=xt(e.s,n.s),i=xt(e.l,n.l),a=xt(e.opacity,n.opacity);return function(f){return e.h=r(f),e.s=o(f),e.l=i(f),e.opacity=a(f),e+""}}}var Ds=ah(Br),b2=ah(xt);function uf(t,e){var n=xt((t=Yr(t)).l,(e=Yr(e)).l),r=xt(t.a,e.a),o=xt(t.b,e.b),i=xt(t.opacity,e.opacity);return function(a){return t.l=n(a),t.a=r(a),t.b=o(a),t.opacity=i(a),t+""}}function fh(t){return function(e,n){var r=t((e=ti(e)).h,(n=ti(n)).h),o=xt(e.c,n.c),i=xt(e.l,n.l),a=xt(e.opacity,n.opacity);return function(f){return e.h=r(f),e.c=o(f),e.l=i(f),e.opacity=a(f),e+""}}}var Ns=fh(Br),w2=fh(xt);function uh(t){return function e(n){n=+n;function r(o,i){var a=t((o=te(o)).h,(i=te(i)).h),f=xt(o.s,i.s),u=xt(o.l,i.l),c=xt(o.opacity,i.opacity);return function(s){return o.h=a(s),o.s=f(s),o.l=u(Math.pow(s,n)),o.opacity=c(s),o+""}}return r.gamma=e,r}(1)}var v2=uh(Br),Ur=uh(xt);function Xe(t,e){e===void 0&&(e=t,t=Ee);for(var n=0,r=e.length-1,o=e[0],i=new Array(r<0?0:r);n<r;)i[n]=t(o,o=e[++n]);return function(a){var f=Math.max(0,Math.min(r-1,Math.floor(a*=r)));return i[f](a-f)}}function Wt(t,e){for(var n=new Array(e),r=0;r<e;++r)n[r]=t(r/(e-1));return n}var Xr=0,oi=0,ri=0,sh=1e3,cf,ii,sf=0,ur=0,lf=0,ai=typeof performance=="object"&&performance.now?performance:Date,lh=typeof window=="object"&&window.requestAnimationFrame?window.requestAnimationFrame.bind(window):function(t){setTimeout(t,17)};function ui(){return ur||(lh(M2),ur=ai.now()+lf)}function M2(){ur=0}function fi(){this._call=this._time=this._next=null}fi.prototype=df.prototype={constructor:fi,restart:function(t,e,n){if(typeof t!="function")throw new TypeError("callback is not a function");n=(n==null?ui():+n)+(e==null?0:+e),!this._next&&ii!==this&&(ii?ii._next=this:cf=this,ii=this),this._call=t,this._time=n,Rs()},stop:function(){this._call&&(this._call=null,this._time=1/0,Rs())}};function df(t,e,n){var r=new fi;return r.restart(t,e,n),r}function dh(){ui(),++Xr;for(var t=cf,e;t;)(e=ur-t._time)>=0&&t._call.call(void 0,e),t=t._next;--Xr}function ch(){ur=(sf=ai.now())+lf,Xr=oi=0;try{dh()}finally{Xr=0,T2(),ur=0}}function S2(){var t=ai.now(),e=t-sf;e>sh&&(lf-=e,sf=t)}function T2(){for(var t,e=cf,n,r=1/0;e;)e._call?(r>e._time&&(r=e._time),t=e,e=e._next):(n=e._next,e._next=null,e=t?t._next=n:cf=n);ii=t,Rs(r)}function Rs(t){if(!Xr){oi&&(oi=clearTimeout(oi));var e=t-ur;e>24?(t<1/0&&(oi=setTimeout(ch,t-ai.now()-lf)),ri&&(ri=clearInterval(ri))):(ri||(sf=ai.now(),ri=setInterval(S2,sh)),Xr=1,lh(ch))}}function pf(t,e,n){var r=new fi;return e=e==null?0:+e,r.restart(o=>{r.stop(),t(o+e)},e,n),r}var _2=ps("start","end","cancel","interrupt"),C2=[],hh=0,ph=1,hf=2,mf=3,mh=4,gf=5,ci=6;function Dn(t,e,n,r,o,i){var a=t.__transition;if(!a)t.__transition={};else if(n in a)return;A2(t,n,{name:e,index:r,group:o,on:_2,tween:C2,time:i.time,delay:i.delay,duration:i.duration,ease:i.ease,timer:null,state:hh})}function si(t,e){var n=At(t,e);if(n.state>hh)throw new Error("too late; already scheduled");return n}function Ft(t,e){var n=At(t,e);if(n.state>mf)throw new Error("too late; already running");return n}function At(t,e){var n=t.__transition;if(!n||!(n=n[e]))throw new Error("transition not found");return n}function A2(t,e,n){var r=t.__transition,o;r[e]=n,n.timer=df(i,0,n.time);function i(c){n.state=ph,n.timer.restart(a,n.delay,n.time),n.delay<=c&&a(c-n.delay)}function a(c){var s,d,l,p;if(n.state!==ph)return u();for(s in r)if(p=r[s],p.name===n.name){if(p.state===mf)return pf(a);p.state===mh?(p.state=ci,p.timer.stop(),p.on.call("interrupt",t,t.__data__,p.index,p.group),delete r[s]):+s<e&&(p.state=ci,p.timer.stop(),p.on.call("cancel",t,t.__data__,p.index,p.group),delete r[s])}if(pf(function(){n.state===mf&&(n.state=mh,n.timer.restart(f,n.delay,n.time),f(c))}),n.state=hf,n.on.call("start",t,t.__data__,n.index,n.group),n.state===hf){for(n.state=mf,o=new Array(l=n.tween.length),s=0,d=-1;s<l;++s)(p=n.tween[s].value.call(t,t.__data__,n.index,n.group))&&(o[++d]=p);o.length=d+1}}function f(c){for(var s=c<n.duration?n.ease.call(null,c/n.duration):(n.timer.restart(u),n.state=gf,1),d=-1,l=o.length;++d<l;)o[d].call(t,s);n.state===gf&&(n.on.call("end",t,t.__data__,n.index,n.group),u())}function u(){n.state=ci,n.timer.stop(),delete r[e];for(var c in r)return;delete t.__transition}}function xf(t,e){var n=t.__transition,r,o,i=!0,a;if(n){e=e==null?null:e+"";for(a in n){if((r=n[a]).name!==e){i=!1;continue}o=r.state>hf&&r.state<gf,r.state=ci,r.timer.stop(),r.on.call(o?"interrupt":"cancel",t,t.__data__,r.index,r.group),delete n[a]}i&&delete t.__transition}}function gh(t){return this.each(function(){xf(this,t)})}function $2(t,e){var n,r;return function(){var o=Ft(this,t),i=o.tween;if(i!==n){r=n=i;for(var a=0,f=r.length;a<f;++a)if(r[a].name===e){r=r.slice(),r.splice(a,1);break}}o.tween=r}}function E2(t,e,n){var r,o;if(typeof n!="function")throw new Error;return function(){var i=Ft(this,t),a=i.tween;if(a!==r){o=(r=a).slice();for(var f={name:e,value:n},u=0,c=o.length;u<c;++u)if(o[u].name===e){o[u]=f;break}u===c&&o.push(f)}i.tween=o}}function xh(t,e){var n=this._id;if(t+="",arguments.length<2){for(var r=At(this.node(),n).tween,o=0,i=r.length,a;o<i;++o)if((a=r[o]).name===t)return a.value;return null}return this.each((e==null?$2:E2)(n,t,e))}function Hr(t,e,n){var r=t._id;return t.each(function(){var o=Ft(this,r);(o.value||(o.value={}))[e]=n.apply(this,arguments)}),function(o){return At(o,r).value[e]}}function yf(t,e){var n;return(typeof e=="number"?ht:e instanceof ue?we:(n=ue(e))?(e=n,we):ni)(t,e)}function I2(t){return function(){this.removeAttribute(t)}}function k2(t){return function(){this.removeAttributeNS(t.space,t.local)}}function D2(t,e,n){var r,o=n+"",i;return function(){var a=this.getAttribute(t);return a===o?null:a===r?i:i=e(r=a,n)}}function N2(t,e,n){var r,o=n+"",i;return function(){var a=this.getAttributeNS(t.space,t.local);return a===o?null:a===r?i:i=e(r=a,n)}}function R2(t,e,n){var r,o,i;return function(){var a,f=n(this),u;return f==null?void this.removeAttribute(t):(a=this.getAttribute(t),u=f+"",a===u?null:a===r&&u===o?i:(o=u,i=e(r=a,f)))}}function L2(t,e,n){var r,o,i;return function(){var a,f=n(this),u;return f==null?void this.removeAttributeNS(t.space,t.local):(a=this.getAttributeNS(t.space,t.local),u=f+"",a===u?null:a===r&&u===o?i:(o=u,i=e(r=a,f)))}}function yh(t,e){var n=dn(t),r=n==="transform"?ks:yf;return this.attrTween(t,typeof e=="function"?(n.local?L2:R2)(n,r,Hr(this,"attr."+t,e)):e==null?(n.local?k2:I2)(n):(n.local?N2:D2)(n,r,e))}function P2(t,e){return function(n){this.setAttribute(t,e.call(this,n))}}function O2(t,e){return function(n){this.setAttributeNS(t.space,t.local,e.call(this,n))}}function F2(t,e){var n,r;function o(){var i=e.apply(this,arguments);return i!==r&&(n=(r=i)&&O2(t,i)),n}return o._value=e,o}function q2(t,e){var n,r;function o(){var i=e.apply(this,arguments);return i!==r&&(n=(r=i)&&P2(t,i)),n}return o._value=e,o}function bh(t,e){var n="attr."+t;if(arguments.length<2)return(n=this.tween(n))&&n._value;if(e==null)return this.tween(n,null);if(typeof e!="function")throw new Error;var r=dn(t);return this.tween(n,(r.local?F2:q2)(r,e))}function Y2(t,e){return function(){si(this,t).delay=+e.apply(this,arguments)}}function z2(t,e){return e=+e,function(){si(this,t).delay=e}}function wh(t){var e=this._id;return arguments.length?this.each((typeof t=="function"?Y2:z2)(e,t)):At(this.node(),e).delay}function B2(t,e){return function(){Ft(this,t).duration=+e.apply(this,arguments)}}function U2(t,e){return e=+e,function(){Ft(this,t).duration=e}}function vh(t){var e=this._id;return arguments.length?this.each((typeof t=="function"?B2:U2)(e,t)):At(this.node(),e).duration}function X2(t,e){if(typeof e!="function")throw new Error;return function(){Ft(this,t).ease=e}}function Mh(t){var e=this._id;return arguments.length?this.each(X2(e,t)):At(this.node(),e).ease}function H2(t,e){return function(){var n=e.apply(this,arguments);if(typeof n!="function")throw new Error;Ft(this,t).ease=n}}function Sh(t){if(typeof t!="function")throw new Error;return this.each(H2(this._id,t))}function Th(t){typeof t!="function"&&(t=jo(t));for(var e=this._groups,n=e.length,r=new Array(n),o=0;o<n;++o)for(var i=e[o],a=i.length,f=r[o]=[],u,c=0;c<a;++c)(u=i[c])&&t.call(u,u.__data__,c,i)&&f.push(u);return new ee(r,this._parents,this._name,this._id)}function _h(t){if(t._id!==this._id)throw new Error;for(var e=this._groups,n=t._groups,r=e.length,o=n.length,i=Math.min(r,o),a=new Array(r),f=0;f<i;++f)for(var u=e[f],c=n[f],s=u.length,d=a[f]=new Array(s),l,p=0;p<s;++p)(l=u[p]||c[p])&&(d[p]=l);for(;f<r;++f)a[f]=e[f];return new ee(a,this._parents,this._name,this._id)}function W2(t){return(t+"").trim().split(/^|\s+/).every(function(e){var n=e.indexOf(".");return n>=0&&(e=e.slice(0,n)),!e||e==="start"})}function G2(t,e,n){var r,o,i=W2(e)?si:Ft;return function(){var a=i(this,t),f=a.on;f!==r&&(o=(r=f).copy()).on(e,n),a.on=o}}function Ch(t,e){var n=this._id;return arguments.length<2?At(this.node(),n).on.on(t):this.each(G2(n,t,e))}function V2(t){return function(){var e=this.parentNode;for(var n in this.__transition)if(+n!==t)return;e&&e.removeChild(this)}}function Ah(){return this.on("end.remove",V2(this._id))}function $h(t){var e=this._name,n=this._id;typeof t!="function"&&(t=nr(t));for(var r=this._groups,o=r.length,i=new Array(o),a=0;a<o;++a)for(var f=r[a],u=f.length,c=i[a]=new Array(u),s,d,l=0;l<u;++l)(s=f[l])&&(d=t.call(s,s.__data__,l,f))&&("__data__"in s&&(d.__data__=s.__data__),c[l]=d,Dn(c[l],e,n,l,c,At(s,n)));return new ee(i,this._parents,e,n)}function Eh(t){var e=this._name,n=this._id;typeof t!="function"&&(t=Vo(t));for(var r=this._groups,o=r.length,i=[],a=[],f=0;f<o;++f)for(var u=r[f],c=u.length,s,d=0;d<c;++d)if(s=u[d]){for(var l=t.call(s,s.__data__,d,u),p,m=At(s,n),h=0,g=l.length;h<g;++h)(p=l[h])&&Dn(p,e,n,h,l,m);i.push(l),a.push(s)}return new ee(i,a,e,n)}var j2=mn.prototype.constructor;function Ih(){return new j2(this._groups,this._parents)}function Z2(t,e){var n,r,o;return function(){var i=En(this,t),a=(this.style.removeProperty(t),En(this,t));return i===a?null:i===n&&a===r?o:o=e(n=i,r=a)}}function kh(t){return function(){this.style.removeProperty(t)}}function K2(t,e,n){var r,o=n+"",i;return function(){var a=En(this,t);return a===o?null:a===r?i:i=e(r=a,n)}}function Q2(t,e,n){var r,o,i;return function(){var a=En(this,t),f=n(this),u=f+"";return f==null&&(u=f=(this.style.removeProperty(t),En(this,t))),a===u?null:a===r&&u===o?i:(o=u,i=e(r=a,f))}}function J2(t,e){var n,r,o,i="style."+e,a="end."+i,f;return function(){var u=Ft(this,t),c=u.on,s=u.value[i]==null?f||(f=kh(e)):void 0;(c!==n||o!==s)&&(r=(n=c).copy()).on(a,o=s),u.on=r}}function Dh(t,e,n){var r=(t+="")=="transform"?Is:yf;return e==null?this.styleTween(t,Z2(t,r)).on("end.style."+t,kh(t)):typeof e=="function"?this.styleTween(t,Q2(t,r,Hr(this,"style."+t,e))).each(J2(this._id,t)):this.styleTween(t,K2(t,r,e),n).on("end.style."+t,null)}function tw(t,e,n){return function(r){this.style.setProperty(t,e.call(this,r),n)}}function ew(t,e,n){var r,o;function i(){var a=e.apply(this,arguments);return a!==o&&(r=(o=a)&&tw(t,a,n)),r}return i._value=e,i}function Nh(t,e,n){var r="style."+(t+="");if(arguments.length<2)return(r=this.tween(r))&&r._value;if(e==null)return this.tween(r,null);if(typeof e!="function")throw new Error;return this.tween(r,ew(t,e,n??""))}function nw(t){return function(){this.textContent=t}}function rw(t){return function(){var e=t(this);this.textContent=e??""}}function Rh(t){return this.tween("text",typeof t=="function"?rw(Hr(this,"text",t)):nw(t==null?"":t+""))}function ow(t){return function(e){this.textContent=t.call(this,e)}}function iw(t){var e,n;function r(){var o=t.apply(this,arguments);return o!==n&&(e=(n=o)&&ow(o)),e}return r._value=t,r}function Lh(t){var e="text";if(arguments.length<1)return(e=this.tween(e))&&e._value;if(t==null)return this.tween(e,null);if(typeof t!="function")throw new Error;return this.tween(e,iw(t))}function Ph(){for(var t=this._name,e=this._id,n=bf(),r=this._groups,o=r.length,i=0;i<o;++i)for(var a=r[i],f=a.length,u,c=0;c<f;++c)if(u=a[c]){var s=At(u,e);Dn(u,t,n,c,a,{time:s.time+s.delay+s.duration,delay:0,duration:s.duration,ease:s.ease})}return new ee(r,this._parents,t,n)}function Oh(){var t,e,n=this,r=n._id,o=n.size();return new Promise(function(i,a){var f={value:a},u={value:function(){--o===0&&i()}};n.each(function(){var c=Ft(this,r),s=c.on;s!==t&&(e=(t=s).copy(),e._.cancel.push(f),e._.interrupt.push(f),e._.end.push(u)),c.on=e}),o===0&&i()})}var aw=0;function ee(t,e,n,r){this._groups=t,this._parents=e,this._name=n,this._id=r}function Fh(t){return mn().transition(t)}function bf(){return++aw}var yn=mn.prototype;ee.prototype=Fh.prototype={constructor:ee,select:$h,selectAll:Eh,selectChild:yn.selectChild,selectChildren:yn.selectChildren,filter:Th,merge:_h,selection:Ih,transition:Ph,call:yn.call,nodes:yn.nodes,node:yn.node,size:yn.size,empty:yn.empty,each:yn.each,on:Ch,attr:yh,attrTween:bh,style:Dh,styleTween:Nh,text:Rh,textTween:Lh,remove:Ah,tween:xh,delay:wh,duration:vh,ease:Mh,easeVarying:Sh,end:Oh,[Symbol.iterator]:yn[Symbol.iterator]};function wf(t){return((t*=2)<=1?t*t*t:(t-=2)*t*t+2)/2}var fw={time:null,delay:0,duration:250,ease:wf};function uw(t,e){for(var n;!(n=t.__transition)||!(n=n[e]);)if(!(t=t.parentNode))throw new Error(`transition ${e} not found`);return n}function qh(t){var e,n;t instanceof ee?(e=t._id,t=t._name):(e=bf(),(n=fw).time=ui(),t=t==null?null:t+"");for(var r=this._groups,o=r.length,i=0;i<o;++i)for(var a=r[i],f=a.length,u,c=0;c<f;++c)(u=a[c])&&Dn(u,t,e,c,a,n||uw(u,e));return new ee(r,this._parents,t,e)}mn.prototype.interrupt=gh;mn.prototype.transition=qh;var{abs:kC,max:DC,min:NC}=Math;function Yh(t){return[+t[0],+t[1]]}function cw(t){return[Yh(t[0]),Yh(t[1])]}var RC={name:"x",handles:["w","e"].map(Ls),input:function(t,e){return t==null?null:[[+t[0],e[0][1]],[+t[1],e[1][1]]]},output:function(t){return t&&[t[0][0],t[1][0]]}},LC={name:"y",handles:["n","s"].map(Ls),input:function(t,e){return t==null?null:[[e[0][0],+t[0]],[e[1][0],+t[1]]]},output:function(t){return t&&[t[0][1],t[1][1]]}},PC={name:"xy",handles:["n","w","e","s","nw","ne","sw","se"].map(Ls),input:function(t){return t==null?null:cw(t)},output:function(t){return t}};function Ls(t){return{type:t}}var Ps=Math.PI,Os=2*Ps,cr=1e-6,sw=Os-cr;function zh(t){this._+=t[0];for(let e=1,n=t.length;e<n;++e)this._+=arguments[e]+t[e]}function lw(t){let e=Math.floor(t);if(!(e>=0))throw new Error(`invalid digits: ${t}`);if(e>15)return zh;let n=10**e;return function(r){this._+=r[0];for(let o=1,i=r.length;o<i;++o)this._+=Math.round(arguments[o]*n)/n+r[o]}}var Wr=class{constructor(e){this._x0=this._y0=this._x1=this._y1=null,this._="",this._append=e==null?zh:lw(e)}moveTo(e,n){this._append`M${this._x0=this._x1=+e},${this._y0=this._y1=+n}`}closePath(){this._x1!==null&&(this._x1=this._x0,this._y1=this._y0,this._append`Z`)}lineTo(e,n){this._append`L${this._x1=+e},${this._y1=+n}`}quadraticCurveTo(e,n,r,o){this._append`Q${+e},${+n},${this._x1=+r},${this._y1=+o}`}bezierCurveTo(e,n,r,o,i,a){this._append`C${+e},${+n},${+r},${+o},${this._x1=+i},${this._y1=+a}`}arcTo(e,n,r,o,i){if(e=+e,n=+n,r=+r,o=+o,i=+i,i<0)throw new Error(`negative radius: ${i}`);let a=this._x1,f=this._y1,u=r-e,c=o-n,s=a-e,d=f-n,l=s*s+d*d;if(this._x1===null)this._append`M${this._x1=e},${this._y1=n}`;else if(l>cr)if(!(Math.abs(d*u-c*s)>cr)||!i)this._append`L${this._x1=e},${this._y1=n}`;else{let p=r-a,m=o-f,h=u*u+c*c,g=p*p+m*m,b=Math.sqrt(h),x=Math.sqrt(l),M=i*Math.tan((Ps-Math.acos((h+l-g)/(2*b*x)))/2),y=M/x,w=M/b;Math.abs(y-1)>cr&&this._append`L${e+y*s},${n+y*d}`,this._append`A${i},${i},0,0,${+(d*p>s*m)},${this._x1=e+w*u},${this._y1=n+w*c}`}}arc(e,n,r,o,i,a){if(e=+e,n=+n,r=+r,a=!!a,r<0)throw new Error(`negative radius: ${r}`);let f=r*Math.cos(o),u=r*Math.sin(o),c=e+f,s=n+u,d=1^a,l=a?o-i:i-o;this._x1===null?this._append`M${c},${s}`:(Math.abs(this._x1-c)>cr||Math.abs(this._y1-s)>cr)&&this._append`L${c},${s}`,r&&(l<0&&(l=l%Os+Os),l>sw?this._append`A${r},${r},0,1,${d},${e-f},${n-u}A${r},${r},0,1,${d},${this._x1=c},${this._y1=s}`:l>cr&&this._append`A${r},${r},0,${+(l>=Ps)},${d},${this._x1=e+r*Math.cos(i)},${this._y1=n+r*Math.sin(i)}`)}rect(e,n,r,o){this._append`M${this._x0=this._x1=+e},${this._y0=this._y1=+n}h${r=+r}v${+o}h${-r}Z`}toString(){return this._}};function Bh(){return new Wr}Bh.prototype=Wr.prototype;function Gr(t=3){return new Wr(+t)}function Uh(t){return Math.abs(t=Math.round(t))>=1e21?t.toLocaleString("en").replace(/,/g,""):t.toString(10)}function sr(t,e){if((n=(t=e?t.toExponential(e-1):t.toExponential()).indexOf("e"))<0)return null;var n,r=t.slice(0,n);return[r.length>1?r[0]+r.slice(2):r,+t.slice(n+1)]}function He(t){return t=sr(Math.abs(t)),t?t[1]:NaN}function Xh(t,e){return function(n,r){for(var o=n.length,i=[],a=0,f=t[0],u=0;o>0&&f>0&&(u+f+1>r&&(f=Math.max(1,r-u)),i.push(n.substring(o-=f,o+f)),!((u+=f+1)>r));)f=t[a=(a+1)%t.length];return i.reverse().join(e)}}function Hh(t){return function(e){return e.replace(/[0-9]/g,function(n){return t[+n]})}}var dw=/^(?:(.)?([<>=^]))?([+\-( ])?([$#])?(0)?(\d+)?(,)?(\.\d+)?(~)?([a-z%])?$/i;function We(t){if(!(e=dw.exec(t)))throw new Error("invalid format: "+t);var e;return new vf({fill:e[1],align:e[2],sign:e[3],symbol:e[4],zero:e[5],width:e[6],comma:e[7],precision:e[8]&&e[8].slice(1),trim:e[9],type:e[10]})}We.prototype=vf.prototype;function vf(t){this.fill=t.fill===void 0?" ":t.fill+"",this.align=t.align===void 0?">":t.align+"",this.sign=t.sign===void 0?"-":t.sign+"",this.symbol=t.symbol===void 0?"":t.symbol+"",this.zero=!!t.zero,this.width=t.width===void 0?void 0:+t.width,this.comma=!!t.comma,this.precision=t.precision===void 0?void 0:+t.precision,this.trim=!!t.trim,this.type=t.type===void 0?"":t.type+""}vf.prototype.toString=function(){return this.fill+this.align+this.sign+this.symbol+(this.zero?"0":"")+(this.width===void 0?"":Math.max(1,this.width|0))+(this.comma?",":"")+(this.precision===void 0?"":"."+Math.max(0,this.precision|0))+(this.trim?"~":"")+this.type};function Wh(t){t:for(var e=t.length,n=1,r=-1,o;n<e;++n)switch(t[n]){case".":r=o=n;break;case"0":r===0&&(r=n),o=n;break;default:if(!+t[n])break t;r>0&&(r=0);break}return r>0?t.slice(0,r)+t.slice(o+1):t}var Fs;function Gh(t,e){var n=sr(t,e);if(!n)return t+"";var r=n[0],o=n[1],i=o-(Fs=Math.max(-8,Math.min(8,Math.floor(o/3)))*3)+1,a=r.length;return i===a?r:i>a?r+new Array(i-a+1).join("0"):i>0?r.slice(0,i)+"."+r.slice(i):"0."+new Array(1-i).join("0")+sr(t,Math.max(0,e+i-1))[0]}function qs(t,e){var n=sr(t,e);if(!n)return t+"";var r=n[0],o=n[1];return o<0?"0."+new Array(-o).join("0")+r:r.length>o+1?r.slice(0,o+1)+"."+r.slice(o+1):r+new Array(o-r.length+2).join("0")}var Ys={"%":(t,e)=>(t*100).toFixed(e),b:t=>Math.round(t).toString(2),c:t=>t+"",d:Uh,e:(t,e)=>t.toExponential(e),f:(t,e)=>t.toFixed(e),g:(t,e)=>t.toPrecision(e),o:t=>Math.round(t).toString(8),p:(t,e)=>qs(t*100,e),r:qs,s:Gh,X:t=>Math.round(t).toString(16).toUpperCase(),x:t=>Math.round(t).toString(16)};function zs(t){return t}var Vh=Array.prototype.map,jh=["y","z","a","f","p","n","\xB5","m","","k","M","G","T","P","E","Z","Y"];function Zh(t){var e=t.grouping===void 0||t.thousands===void 0?zs:Xh(Vh.call(t.grouping,Number),t.thousands+""),n=t.currency===void 0?"":t.currency[0]+"",r=t.currency===void 0?"":t.currency[1]+"",o=t.decimal===void 0?".":t.decimal+"",i=t.numerals===void 0?zs:Hh(Vh.call(t.numerals,String)),a=t.percent===void 0?"%":t.percent+"",f=t.minus===void 0?"\u2212":t.minus+"",u=t.nan===void 0?"NaN":t.nan+"";function c(d){d=We(d);var l=d.fill,p=d.align,m=d.sign,h=d.symbol,g=d.zero,b=d.width,x=d.comma,M=d.precision,y=d.trim,w=d.type;w==="n"?(x=!0,w="g"):Ys[w]||(M===void 0&&(M=12),y=!0,w="g"),(g||l==="0"&&p==="=")&&(g=!0,l="0",p="=");var v=h==="$"?n:h==="#"&&/[boxX]/.test(w)?"0"+w.toLowerCase():"",T=h==="$"?r:/[%p]/.test(w)?a:"",E=Ys[w],I=/[defgprs%]/.test(w);M=M===void 0?6:/[gprs]/.test(w)?Math.max(1,Math.min(21,M)):Math.max(0,Math.min(20,M));function D(_){var L=v,F=T,P,S,A;if(w==="c")F=E(_)+F,_="";else{_=+_;var N=_<0||1/_<0;if(_=isNaN(_)?u:E(Math.abs(_),M),y&&(_=Wh(_)),N&&+_==0&&m!=="+"&&(N=!1),L=(N?m==="("?m:f:m==="-"||m==="("?"":m)+L,F=(w==="s"?jh[8+Fs/3]:"")+F+(N&&m==="("?")":""),I){for(P=-1,S=_.length;++P<S;)if(A=_.charCodeAt(P),48>A||A>57){F=(A===46?o+_.slice(P+1):_.slice(P))+F,_=_.slice(0,P);break}}}x&&!g&&(_=e(_,1/0));var O=L.length+_.length+F.length,R=O<b?new Array(b-O+1).join(l):"";switch(x&&g&&(_=e(R+_,R.length?b-F.length:1/0),R=""),p){case"<":_=L+_+F+R;break;case"=":_=L+R+_+F;break;case"^":_=R.slice(0,O=R.length>>1)+L+_+F+R.slice(O);break;default:_=R+L+_+F;break}return i(_)}return D.toString=function(){return d+""},D}function s(d,l){var p=c((d=We(d),d.type="f",d)),m=Math.max(-8,Math.min(8,Math.floor(He(l)/3)))*3,h=Math.pow(10,-m),g=jh[8+m/3];return function(b){return p(h*b)+g}}return{format:c,formatPrefix:s}}var Mf,Ge,Sf;Bs({thousands:",",grouping:[3],currency:["$",""]});function Bs(t){return Mf=Zh(t),Ge=Mf.format,Sf=Mf.formatPrefix,Mf}function Us(t){return Math.max(0,-He(Math.abs(t)))}function Xs(t,e){return Math.max(0,Math.max(-8,Math.min(8,Math.floor(He(e)/3)))*3-He(Math.abs(t)))}function Hs(t,e){return t=Math.abs(t),e=Math.abs(e)-t,Math.max(0,He(e)-He(t))+1}var U=1e-6,Tf=1e-12,V=Math.PI,ft=V/2,Ws=V/4,Nt=V*2,$t=180/V,ut=V/180,K=Math.abs,ve=Math.atan,qt=Math.atan2,B=Math.cos;var _f=Math.exp;var lr=Math.log,Cf=Math.pow,z=Math.sin,Gt=Math.sign||function(t){return t>0?1:t<0?-1:0},mt=Math.sqrt,Vr=Math.tan;function Af(t){return t>1?0:t<-1?V:Math.acos(t)}function Mt(t){return t>1?ft:t<-1?-ft:Math.asin(t)}function Rt(){}function $f(t,e){t&&Qh.hasOwnProperty(t.type)&&Qh[t.type](t,e)}var Kh={Feature:function(t,e){$f(t.geometry,e)},FeatureCollection:function(t,e){for(var n=t.features,r=-1,o=n.length;++r<o;)$f(n[r].geometry,e)}},Qh={Sphere:function(t,e){e.sphere()},Point:function(t,e){t=t.coordinates,e.point(t[0],t[1],t[2])},MultiPoint:function(t,e){for(var n=t.coordinates,r=-1,o=n.length;++r<o;)t=n[r],e.point(t[0],t[1],t[2])},LineString:function(t,e){Gs(t.coordinates,e,0)},MultiLineString:function(t,e){for(var n=t.coordinates,r=-1,o=n.length;++r<o;)Gs(n[r],e,0)},Polygon:function(t,e){Jh(t.coordinates,e)},MultiPolygon:function(t,e){for(var n=t.coordinates,r=-1,o=n.length;++r<o;)Jh(n[r],e)},GeometryCollection:function(t,e){for(var n=t.geometries,r=-1,o=n.length;++r<o;)$f(n[r],e)}};function Gs(t,e,n){var r=-1,o=t.length-n,i;for(e.lineStart();++r<o;)i=t[r],e.point(i[0],i[1],i[2]);e.lineEnd()}function Jh(t,e){var n=-1,r=t.length;for(e.polygonStart();++n<r;)Gs(t[n],e,1);e.polygonEnd()}function Ie(t,e){t&&Kh.hasOwnProperty(t.type)?Kh[t.type](t,e):$f(t,e)}function li(t){return[qt(t[1],t[0]),Mt(t[2])]}function Ve(t){var e=t[0],n=t[1],r=B(n);return[r*B(e),r*z(e),z(n)]}function di(t,e){return t[0]*e[0]+t[1]*e[1]+t[2]*e[2]}function jr(t,e){return[t[1]*e[2]-t[2]*e[1],t[2]*e[0]-t[0]*e[2],t[0]*e[1]-t[1]*e[0]]}function Ef(t,e){t[0]+=e[0],t[1]+=e[1],t[2]+=e[2]}function pi(t,e){return[t[0]*e,t[1]*e,t[2]*e]}function mi(t){var e=mt(t[0]*t[0]+t[1]*t[1]+t[2]*t[2]);t[0]/=e,t[1]/=e,t[2]/=e}function hi(t,e){function n(r,o){return r=t(r,o),e(r[0],r[1])}return t.invert&&e.invert&&(n.invert=function(r,o){return r=e.invert(r,o),r&&t.invert(r[0],r[1])}),n}function Vs(t,e){return K(t)>V&&(t-=Math.round(t/Nt)*Nt),[t,e]}Vs.invert=Vs;function js(t,e,n){return(t%=Nt)?e||n?hi(e0(t),n0(e,n)):e0(t):e||n?n0(e,n):Vs}function t0(t){return function(e,n){return e+=t,K(e)>V&&(e-=Math.round(e/Nt)*Nt),[e,n]}}function e0(t){var e=t0(t);return e.invert=t0(-t),e}function n0(t,e){var n=B(t),r=z(t),o=B(e),i=z(e);function a(f,u){var c=B(u),s=B(f)*c,d=z(f)*c,l=z(u),p=l*n+s*r;return[qt(d*o-p*i,s*n-l*r),Mt(p*o+d*i)]}return a.invert=function(f,u){var c=B(u),s=B(f)*c,d=z(f)*c,l=z(u),p=l*o-d*i;return[qt(d*o+l*i,s*n+p*r),Mt(p*n-s*r)]},a}function r0(t){t=js(t[0]*ut,t[1]*ut,t.length>2?t[2]*ut:0);function e(n){return n=t(n[0]*ut,n[1]*ut),n[0]*=$t,n[1]*=$t,n}return e.invert=function(n){return n=t.invert(n[0]*ut,n[1]*ut),n[0]*=$t,n[1]*=$t,n},e}function i0(t,e,n,r,o,i){if(n){var a=B(e),f=z(e),u=r*n;o==null?(o=e+r*Nt,i=e-u/2):(o=o0(a,o),i=o0(a,i),(r>0?o<i:o>i)&&(o+=r*Nt));for(var c,s=o;r>0?s>i:s<i;s-=u)c=li([a,-f*B(s),-f*z(s)]),t.point(c[0],c[1])}}function o0(t,e){e=Ve(e),e[0]-=t,mi(e);var n=Af(-e[1]);return((-e[2]<0?-n:n)+Nt-U)%Nt}function If(){var t=[],e;return{point:function(n,r,o){e.push([n,r,o])},lineStart:function(){t.push(e=[])},lineEnd:Rt,rejoin:function(){t.length>1&&t.push(t.pop().concat(t.shift()))},result:function(){var n=t;return t=[],e=null,n}}}function Zr(t,e){return K(t[0]-e[0])<U&&K(t[1]-e[1])<U}function kf(t,e,n,r){this.x=t,this.z=e,this.o=n,this.e=r,this.v=!1,this.n=this.p=null}function Df(t,e,n,r,o){var i=[],a=[],f,u;if(t.forEach(function(m){if(!((h=m.length-1)<=0)){var h,g=m[0],b=m[h],x;if(Zr(g,b)){if(!g[2]&&!b[2]){for(o.lineStart(),f=0;f<h;++f)o.point((g=m[f])[0],g[1]);o.lineEnd();return}b[0]+=2*U}i.push(x=new kf(g,m,null,!0)),a.push(x.o=new kf(g,null,x,!1)),i.push(x=new kf(b,m,null,!1)),a.push(x.o=new kf(b,null,x,!0))}}),!!i.length){for(a.sort(e),a0(i),a0(a),f=0,u=a.length;f<u;++f)a[f].e=n=!n;for(var c=i[0],s,d;;){for(var l=c,p=!0;l.v;)if((l=l.n)===c)return;s=l.z,o.lineStart();do{if(l.v=l.o.v=!0,l.e){if(p)for(f=0,u=s.length;f<u;++f)o.point((d=s[f])[0],d[1]);else r(l.x,l.n.x,1,o);l=l.n}else{if(p)for(s=l.p.z,f=s.length-1;f>=0;--f)o.point((d=s[f])[0],d[1]);else r(l.x,l.p.x,-1,o);l=l.p}l=l.o,s=l.z,p=!p}while(!l.v);o.lineEnd()}}}function a0(t){if(e=t.length){for(var e,n=0,r=t[0],o;++n<e;)r.n=o=t[n],o.p=r,r=o;r.n=o=t[0],o.p=r}}function Zs(t){return K(t[0])<=V?t[0]:Gt(t[0])*((K(t[0])+V)%Nt-V)}function f0(t,e){var n=Zs(e),r=e[1],o=z(r),i=[z(n),-B(n),0],a=0,f=0,u=new ae;o===1?r=ft+U:o===-1&&(r=-ft-U);for(var c=0,s=t.length;c<s;++c)if(l=(d=t[c]).length)for(var d,l,p=d[l-1],m=Zs(p),h=p[1]/2+Ws,g=z(h),b=B(h),x=0;x<l;++x,m=y,g=v,b=T,p=M){var M=d[x],y=Zs(M),w=M[1]/2+Ws,v=z(w),T=B(w),E=y-m,I=E>=0?1:-1,D=I*E,_=D>V,L=g*v;if(u.add(qt(L*I*z(D),b*T+L*B(D))),a+=_?E+I*Nt:E,_^m>=n^y>=n){var F=jr(Ve(p),Ve(M));mi(F);var P=jr(i,F);mi(P);var S=(_^E>=0?-1:1)*Mt(P[2]);(r>S||r===S&&(F[0]||F[1]))&&(f+=_^E>=0?1:-1)}}return(a<-U||a<U&&u<-Tf)^f&1}function Nf(t,e,n,r){return function(o){var i=e(o),a=If(),f=e(a),u=!1,c,s,d,l={point:p,lineStart:h,lineEnd:g,polygonStart:function(){l.point=b,l.lineStart=x,l.lineEnd=M,s=[],c=[]},polygonEnd:function(){l.point=p,l.lineStart=h,l.lineEnd=g,s=Or(s);var y=f0(c,r);s.length?(u||(o.polygonStart(),u=!0),Df(s,mw,y,n,o)):y&&(u||(o.polygonStart(),u=!0),o.lineStart(),n(null,null,1,o),o.lineEnd()),u&&(o.polygonEnd(),u=!1),s=c=null},sphere:function(){o.polygonStart(),o.lineStart(),n(null,null,1,o),o.lineEnd(),o.polygonEnd()}};function p(y,w){t(y,w)&&o.point(y,w)}function m(y,w){i.point(y,w)}function h(){l.point=m,i.lineStart()}function g(){l.point=p,i.lineEnd()}function b(y,w){d.push([y,w]),f.point(y,w)}function x(){f.lineStart(),d=[]}function M(){b(d[0][0],d[0][1]),f.lineEnd();var y=f.clean(),w=a.result(),v,T=w.length,E,I,D;if(d.pop(),c.push(d),d=null,!!T){if(y&1){if(I=w[0],(E=I.length-1)>0){for(u||(o.polygonStart(),u=!0),o.lineStart(),v=0;v<E;++v)o.point((D=I[v])[0],D[1]);o.lineEnd()}return}T>1&&y&2&&w.push(w.pop().concat(w.shift())),s.push(w.filter(pw))}}return l}}function pw(t){return t.length>1}function mw(t,e){return((t=t.x)[0]<0?t[1]-ft-U:ft-t[1])-((e=e.x)[0]<0?e[1]-ft-U:ft-e[1])}var Ks=Nf(function(){return!0},hw,xw,[-V,-ft]);function hw(t){var e=NaN,n=NaN,r=NaN,o;return{lineStart:function(){t.lineStart(),o=1},point:function(i,a){var f=i>0?V:-V,u=K(i-e);K(u-V)<U?(t.point(e,n=(n+a)/2>0?ft:-ft),t.point(r,n),t.lineEnd(),t.lineStart(),t.point(f,n),t.point(i,n),o=0):r!==f&&u>=V&&(K(e-r)<U&&(e-=r*U),K(i-f)<U&&(i-=f*U),n=gw(e,n,i,a),t.point(r,n),t.lineEnd(),t.lineStart(),t.point(f,n),o=0),t.point(e=i,n=a),r=f},lineEnd:function(){t.lineEnd(),e=n=NaN},clean:function(){return 2-o}}}function gw(t,e,n,r){var o,i,a=z(t-n);return K(a)>U?ve((z(e)*(i=B(r))*z(n)-z(r)*(o=B(e))*z(t))/(o*i*a)):(e+r)/2}function xw(t,e,n,r){var o;if(t==null)o=n*ft,r.point(-V,o),r.point(0,o),r.point(V,o),r.point(V,0),r.point(V,-o),r.point(0,-o),r.point(-V,-o),r.point(-V,0),r.point(-V,o);else if(K(t[0]-e[0])>U){var i=t[0]<e[0]?V:-V;o=n*i/2,r.point(-i,o),r.point(0,o),r.point(i,o)}else r.point(e[0],e[1])}function u0(t){var e=B(t),n=6*ut,r=e>0,o=K(e)>U;function i(s,d,l,p){i0(p,t,n,l,s,d)}function a(s,d){return B(s)*B(d)>e}function f(s){var d,l,p,m,h;return{lineStart:function(){m=p=!1,h=1},point:function(g,b){var x=[g,b],M,y=a(g,b),w=r?y?0:c(g,b):y?c(g+(g<0?V:-V),b):0;if(!d&&(m=p=y)&&s.lineStart(),y!==p&&(M=u(d,x),(!M||Zr(d,M)||Zr(x,M))&&(x[2]=1)),y!==p)h=0,y?(s.lineStart(),M=u(x,d),s.point(M[0],M[1])):(M=u(d,x),s.point(M[0],M[1],2),s.lineEnd()),d=M;else if(o&&d&&r^y){var v;!(w&l)&&(v=u(x,d,!0))&&(h=0,r?(s.lineStart(),s.point(v[0][0],v[0][1]),s.point(v[1][0],v[1][1]),s.lineEnd()):(s.point(v[1][0],v[1][1]),s.lineEnd(),s.lineStart(),s.point(v[0][0],v[0][1],3)))}y&&(!d||!Zr(d,x))&&s.point(x[0],x[1]),d=x,p=y,l=w},lineEnd:function(){p&&s.lineEnd(),d=null},clean:function(){return h|(m&&p)<<1}}}function u(s,d,l){var p=Ve(s),m=Ve(d),h=[1,0,0],g=jr(p,m),b=di(g,g),x=g[0],M=b-x*x;if(!M)return!l&&s;var y=e*b/M,w=-e*x/M,v=jr(h,g),T=pi(h,y),E=pi(g,w);Ef(T,E);var I=v,D=di(T,I),_=di(I,I),L=D*D-_*(di(T,T)-1);if(!(L<0)){var F=mt(L),P=pi(I,(-D-F)/_);if(Ef(P,T),P=li(P),!l)return P;var S=s[0],A=d[0],N=s[1],O=d[1],R;A<S&&(R=S,S=A,A=R);var tt=A-S,Z=K(tt-V)<U,W=Z||tt<U;if(!Z&&O<N&&(R=N,N=O,O=R),W?Z?N+O>0^P[1]<(K(P[0]-S)<U?N:O):N<=P[1]&&P[1]<=O:tt>V^(S<=P[0]&&P[0]<=A)){var Q=pi(I,(-D+F)/_);return Ef(Q,T),[P,li(Q)]}}}function c(s,d){var l=r?t:V-t,p=0;return s<-l?p|=1:s>l&&(p|=2),d<-l?p|=4:d>l&&(p|=8),p}return Nf(a,f,i,r?[0,-t]:[-V,t-V])}function c0(t,e,n,r,o,i){var a=t[0],f=t[1],u=e[0],c=e[1],s=0,d=1,l=u-a,p=c-f,m;if(m=n-a,!(!l&&m>0)){if(m/=l,l<0){if(m<s)return;m<d&&(d=m)}else if(l>0){if(m>d)return;m>s&&(s=m)}if(m=o-a,!(!l&&m<0)){if(m/=l,l<0){if(m>d)return;m>s&&(s=m)}else if(l>0){if(m<s)return;m<d&&(d=m)}if(m=r-f,!(!p&&m>0)){if(m/=p,p<0){if(m<s)return;m<d&&(d=m)}else if(p>0){if(m>d)return;m>s&&(s=m)}if(m=i-f,!(!p&&m<0)){if(m/=p,p<0){if(m>d)return;m>s&&(s=m)}else if(p>0){if(m<s)return;m<d&&(d=m)}return s>0&&(t[0]=a+s*l,t[1]=f+s*p),d<1&&(e[0]=a+d*l,e[1]=f+d*p),!0}}}}}var gi=1e9,Rf=-gi;function Kr(t,e,n,r){function o(c,s){return t<=c&&c<=n&&e<=s&&s<=r}function i(c,s,d,l){var p=0,m=0;if(c==null||(p=a(c,d))!==(m=a(s,d))||u(c,s)<0^d>0)do l.point(p===0||p===3?t:n,p>1?r:e);while((p=(p+d+4)%4)!==m);else l.point(s[0],s[1])}function a(c,s){return K(c[0]-t)<U?s>0?0:3:K(c[0]-n)<U?s>0?2:1:K(c[1]-e)<U?s>0?1:0:s>0?3:2}function f(c,s){return u(c.x,s.x)}function u(c,s){var d=a(c,1),l=a(s,1);return d!==l?d-l:d===0?s[1]-c[1]:d===1?c[0]-s[0]:d===2?c[1]-s[1]:s[0]-c[0]}return function(c){var s=c,d=If(),l,p,m,h,g,b,x,M,y,w,v,T={point:E,lineStart:L,lineEnd:F,polygonStart:D,polygonEnd:_};function E(S,A){o(S,A)&&s.point(S,A)}function I(){for(var S=0,A=0,N=p.length;A<N;++A)for(var O=p[A],R=1,tt=O.length,Z=O[0],W,Q,at=Z[0],Ut=Z[1];R<tt;++R)W=at,Q=Ut,Z=O[R],at=Z[0],Ut=Z[1],Q<=r?Ut>r&&(at-W)*(r-Q)>(Ut-Q)*(t-W)&&++S:Ut<=r&&(at-W)*(r-Q)<(Ut-Q)*(t-W)&&--S;return S}function D(){s=d,l=[],p=[],v=!0}function _(){var S=I(),A=v&&S,N=(l=Or(l)).length;(A||N)&&(c.polygonStart(),A&&(c.lineStart(),i(null,null,1,c),c.lineEnd()),N&&Df(l,f,S,i,c),c.polygonEnd()),s=c,l=p=m=null}function L(){T.point=P,p&&p.push(m=[]),w=!0,y=!1,x=M=NaN}function F(){l&&(P(h,g),b&&y&&d.rejoin(),l.push(d.result())),T.point=E,y&&s.lineEnd()}function P(S,A){var N=o(S,A);if(p&&m.push([S,A]),w)h=S,g=A,b=N,w=!1,N&&(s.lineStart(),s.point(S,A));else if(N&&y)s.point(S,A);else{var O=[x=Math.max(Rf,Math.min(gi,x)),M=Math.max(Rf,Math.min(gi,M))],R=[S=Math.max(Rf,Math.min(gi,S)),A=Math.max(Rf,Math.min(gi,A))];c0(O,R,t,e,n,r)?(y||(s.lineStart(),s.point(O[0],O[1])),s.point(R[0],R[1]),N||s.lineEnd(),v=!1):N&&(s.lineStart(),s.point(S,A),v=!1)}x=S,M=A,y=N}return T}}var xi=t=>t;var Qs=new ae,Js=new ae,s0,l0,tl,el,Nn={point:Rt,lineStart:Rt,lineEnd:Rt,polygonStart:function(){Nn.lineStart=yw,Nn.lineEnd=ww},polygonEnd:function(){Nn.lineStart=Nn.lineEnd=Nn.point=Rt,Qs.add(K(Js)),Js=new ae},result:function(){var t=Qs/2;return Qs=new ae,t}};function yw(){Nn.point=bw}function bw(t,e){Nn.point=d0,s0=tl=t,l0=el=e}function d0(t,e){Js.add(el*t-tl*e),tl=t,el=e}function ww(){d0(s0,l0)}var nl=Nn;var Qr=1/0,Lf=Qr,yi=-Qr,Pf=yi,vw={point:Mw,lineStart:Rt,lineEnd:Rt,polygonStart:Rt,polygonEnd:Rt,result:function(){var t=[[Qr,Lf],[yi,Pf]];return yi=Pf=-(Lf=Qr=1/0),t}};function Mw(t,e){t<Qr&&(Qr=t),t>yi&&(yi=t),e<Lf&&(Lf=e),e>Pf&&(Pf=e)}var Jr=vw;var rl=0,ol=0,bi=0,Of=0,Ff=0,to=0,il=0,al=0,wi=0,h0,g0,je,Ze,ke={point:dr,lineStart:p0,lineEnd:m0,polygonStart:function(){ke.lineStart=_w,ke.lineEnd=Cw},polygonEnd:function(){ke.point=dr,ke.lineStart=p0,ke.lineEnd=m0},result:function(){var t=wi?[il/wi,al/wi]:to?[Of/to,Ff/to]:bi?[rl/bi,ol/bi]:[NaN,NaN];return rl=ol=bi=Of=Ff=to=il=al=wi=0,t}};function dr(t,e){rl+=t,ol+=e,++bi}function p0(){ke.point=Sw}function Sw(t,e){ke.point=Tw,dr(je=t,Ze=e)}function Tw(t,e){var n=t-je,r=e-Ze,o=mt(n*n+r*r);Of+=o*(je+t)/2,Ff+=o*(Ze+e)/2,to+=o,dr(je=t,Ze=e)}function m0(){ke.point=dr}function _w(){ke.point=Aw}function Cw(){x0(h0,g0)}function Aw(t,e){ke.point=x0,dr(h0=je=t,g0=Ze=e)}function x0(t,e){var n=t-je,r=e-Ze,o=mt(n*n+r*r);Of+=o*(je+t)/2,Ff+=o*(Ze+e)/2,to+=o,o=Ze*t-je*e,il+=o*(je+t),al+=o*(Ze+e),wi+=o*3,dr(je=t,Ze=e)}var fl=ke;function qf(t){this._context=t}qf.prototype={_radius:4.5,pointRadius:function(t){return this._radius=t,this},polygonStart:function(){this._line=0},polygonEnd:function(){this._line=NaN},lineStart:function(){this._point=0},lineEnd:function(){this._line===0&&this._context.closePath(),this._point=NaN},point:function(t,e){switch(this._point){case 0:{this._context.moveTo(t,e),this._point=1;break}case 1:{this._context.lineTo(t,e);break}default:{this._context.moveTo(t+this._radius,e),this._context.arc(t,e,this._radius,0,Nt);break}}},result:Rt};var cl=new ae,ul,y0,b0,vi,Mi,Yf={point:Rt,lineStart:function(){Yf.point=$w},lineEnd:function(){ul&&w0(y0,b0),Yf.point=Rt},polygonStart:function(){ul=!0},polygonEnd:function(){ul=null},result:function(){var t=+cl;return cl=new ae,t}};function $w(t,e){Yf.point=w0,y0=vi=t,b0=Mi=e}function w0(t,e){vi-=t,Mi-=e,cl.add(mt(vi*vi+Mi*Mi)),vi=t,Mi=e}var sl=Yf;var v0,zf,M0,S0,eo=class{constructor(e){this._append=e==null?T0:Ew(e),this._radius=4.5,this._=""}pointRadius(e){return this._radius=+e,this}polygonStart(){this._line=0}polygonEnd(){this._line=NaN}lineStart(){this._point=0}lineEnd(){this._line===0&&(this._+="Z"),this._point=NaN}point(e,n){switch(this._point){case 0:{this._append`M${e},${n}`,this._point=1;break}case 1:{this._append`L${e},${n}`;break}default:{if(this._append`M${e},${n}`,this._radius!==M0||this._append!==zf){let r=this._radius,o=this._;this._="",this._append`m0,${r}a${r},${r} 0 1,1 0,${-2*r}a${r},${r} 0 1,1 0,${2*r}z`,M0=r,zf=this._append,S0=this._,this._=o}this._+=S0;break}}}result(){let e=this._;return this._="",e.length?e:null}};function T0(t){let e=1;this._+=t[0];for(let n=t.length;e<n;++e)this._+=arguments[e]+t[e]}function Ew(t){let e=Math.floor(t);if(!(e>=0))throw new RangeError(`invalid digits: ${t}`);if(e>15)return T0;if(e!==v0){let n=10**e;v0=e,zf=function(o){let i=1;this._+=o[0];for(let a=o.length;i<a;++i)this._+=Math.round(arguments[i]*n)/n+o[i]}}return zf}function Si(t,e){let n=3,r=4.5,o,i;function a(f){return f&&(typeof r=="function"&&i.pointRadius(+r.apply(this,arguments)),Ie(f,o(i))),i.result()}return a.area=function(f){return Ie(f,o(nl)),nl.result()},a.measure=function(f){return Ie(f,o(sl)),sl.result()},a.bounds=function(f){return Ie(f,o(Jr)),Jr.result()},a.centroid=function(f){return Ie(f,o(fl)),fl.result()},a.projection=function(f){return arguments.length?(o=f==null?(t=null,xi):(t=f).stream,a):t},a.context=function(f){return arguments.length?(i=f==null?(e=null,new eo(n)):new qf(e=f),typeof r!="function"&&i.pointRadius(r),a):e},a.pointRadius=function(f){return arguments.length?(r=typeof f=="function"?f:(i.pointRadius(+f),+f),a):r},a.digits=function(f){if(!arguments.length)return n;if(f==null)n=null;else{let u=Math.floor(f);if(!(u>=0))throw new RangeError(`invalid digits: ${f}`);n=u}return e===null&&(i=new eo(n)),a},a.projection(t).digits(n).context(e)}function Ti(t){return{stream:no(t)}}function no(t){return function(e){var n=new ll;for(var r in t)n[r]=t[r];return n.stream=e,n}}function ll(){}ll.prototype={constructor:ll,point:function(t,e){this.stream.point(t,e)},sphere:function(){this.stream.sphere()},lineStart:function(){this.stream.lineStart()},lineEnd:function(){this.stream.lineEnd()},polygonStart:function(){this.stream.polygonStart()},polygonEnd:function(){this.stream.polygonEnd()}};function dl(t,e,n){var r=t.clipExtent&&t.clipExtent();return t.scale(150).translate([0,0]),r!=null&&t.clipExtent(null),Ie(n,t.stream(Jr)),e(Jr.result()),r!=null&&t.clipExtent(r),t}function _i(t,e,n){return dl(t,function(r){var o=e[1][0]-e[0][0],i=e[1][1]-e[0][1],a=Math.min(o/(r[1][0]-r[0][0]),i/(r[1][1]-r[0][1])),f=+e[0][0]+(o-a*(r[1][0]+r[0][0]))/2,u=+e[0][1]+(i-a*(r[1][1]+r[0][1]))/2;t.scale(150*a).translate([f,u])},n)}function Bf(t,e,n){return _i(t,[[0,0],e],n)}function Uf(t,e,n){return dl(t,function(r){var o=+e,i=o/(r[1][0]-r[0][0]),a=(o-i*(r[1][0]+r[0][0]))/2,f=-i*r[0][1];t.scale(150*i).translate([a,f])},n)}function Xf(t,e,n){return dl(t,function(r){var o=+e,i=o/(r[1][1]-r[0][1]),a=-i*r[0][0],f=(o-i*(r[1][1]+r[0][1]))/2;t.scale(150*i).translate([a,f])},n)}var _0=16,Iw=B(30*ut);function pl(t,e){return+e?Dw(t,e):kw(t)}function kw(t){return no({point:function(e,n){e=t(e,n),this.stream.point(e[0],e[1])}})}function Dw(t,e){function n(r,o,i,a,f,u,c,s,d,l,p,m,h,g){var b=c-r,x=s-o,M=b*b+x*x;if(M>4*e&&h--){var y=a+l,w=f+p,v=u+m,T=mt(y*y+w*w+v*v),E=Mt(v/=T),I=K(K(v)-1)<U||K(i-d)<U?(i+d)/2:qt(w,y),D=t(I,E),_=D[0],L=D[1],F=_-r,P=L-o,S=x*F-b*P;(S*S/M>e||K((b*F+x*P)/M-.5)>.3||a*l+f*p+u*m<Iw)&&(n(r,o,i,a,f,u,_,L,I,y/=T,w/=T,v,h,g),g.point(_,L),n(_,L,I,y,w,v,c,s,d,l,p,m,h,g))}}return function(r){var o,i,a,f,u,c,s,d,l,p,m,h,g={point:b,lineStart:x,lineEnd:y,polygonStart:function(){r.polygonStart(),g.lineStart=w},polygonEnd:function(){r.polygonEnd(),g.lineStart=x}};function b(E,I){E=t(E,I),r.point(E[0],E[1])}function x(){d=NaN,g.point=M,r.lineStart()}function M(E,I){var D=Ve([E,I]),_=t(E,I);n(d,l,s,p,m,h,d=_[0],l=_[1],s=E,p=D[0],m=D[1],h=D[2],_0,r),r.point(d,l)}function y(){g.point=b,r.lineEnd()}function w(){x(),g.point=v,g.lineEnd=T}function v(E,I){M(o=E,I),i=d,a=l,f=p,u=m,c=h,g.point=M}function T(){n(d,l,s,p,m,h,i,a,o,f,u,c,_0,r),g.lineEnd=y,y()}return g}}var Nw=no({point:function(t,e){this.stream.point(t*ut,e*ut)}});function Rw(t){return no({point:function(e,n){var r=t(e,n);return this.stream.point(r[0],r[1])}})}function Lw(t,e,n,r,o){function i(a,f){return a*=r,f*=o,[e+t*a,n-t*f]}return i.invert=function(a,f){return[(a-e)/t*r,(n-f)/t*o]},i}function C0(t,e,n,r,o,i){if(!i)return Lw(t,e,n,r,o);var a=B(i),f=z(i),u=a*t,c=f*t,s=a/t,d=f/t,l=(f*n-a*e)/t,p=(f*e+a*n)/t;function m(h,g){return h*=r,g*=o,[u*h-c*g+e,n-c*h-u*g]}return m.invert=function(h,g){return[r*(s*h-d*g+l),o*(p-d*h-s*g)]},m}function Yt(t){return ml(function(){return t})()}function ml(t){var e,n=150,r=480,o=250,i=0,a=0,f=0,u=0,c=0,s,d=0,l=1,p=1,m=null,h=Ks,g=null,b,x,M,y=xi,w=.5,v,T,E,I,D;function _(S){return E(S[0]*ut,S[1]*ut)}function L(S){return S=E.invert(S[0],S[1]),S&&[S[0]*$t,S[1]*$t]}_.stream=function(S){return I&&D===S?I:I=Nw(Rw(s)(h(v(y(D=S)))))},_.preclip=function(S){return arguments.length?(h=S,m=void 0,P()):h},_.postclip=function(S){return arguments.length?(y=S,g=b=x=M=null,P()):y},_.clipAngle=function(S){return arguments.length?(h=+S?u0(m=S*ut):(m=null,Ks),P()):m*$t},_.clipExtent=function(S){return arguments.length?(y=S==null?(g=b=x=M=null,xi):Kr(g=+S[0][0],b=+S[0][1],x=+S[1][0],M=+S[1][1]),P()):g==null?null:[[g,b],[x,M]]},_.scale=function(S){return arguments.length?(n=+S,F()):n},_.translate=function(S){return arguments.length?(r=+S[0],o=+S[1],F()):[r,o]},_.center=function(S){return arguments.length?(i=S[0]%360*ut,a=S[1]%360*ut,F()):[i*$t,a*$t]},_.rotate=function(S){return arguments.length?(f=S[0]%360*ut,u=S[1]%360*ut,c=S.length>2?S[2]%360*ut:0,F()):[f*$t,u*$t,c*$t]},_.angle=function(S){return arguments.length?(d=S%360*ut,F()):d*$t},_.reflectX=function(S){return arguments.length?(l=S?-1:1,F()):l<0},_.reflectY=function(S){return arguments.length?(p=S?-1:1,F()):p<0},_.precision=function(S){return arguments.length?(v=pl(T,w=S*S),P()):mt(w)},_.fitExtent=function(S,A){return _i(_,S,A)},_.fitSize=function(S,A){return Bf(_,S,A)},_.fitWidth=function(S,A){return Uf(_,S,A)},_.fitHeight=function(S,A){return Xf(_,S,A)};function F(){var S=C0(n,0,0,l,p,d).apply(null,e(i,a)),A=C0(n,r-S[0],o-S[1],l,p,d);return s=js(f,u,c),T=hi(e,A),E=hi(s,T),v=pl(T,w),P()}function P(){return I=D=null,_}return function(){return e=t.apply(this,arguments),_.invert=e.invert&&L,F()}}function ro(t){var e=0,n=V/3,r=ml(t),o=r(e,n);return o.parallels=function(i){return arguments.length?r(e=i[0]*ut,n=i[1]*ut):[e*$t,n*$t]},o}function A0(t){var e=B(t);function n(r,o){return[r*e,z(o)/e]}return n.invert=function(r,o){return[r/e,Mt(o*e)]},n}function $0(t,e){var n=z(t),r=(n+z(e))/2;if(K(r)<U)return A0(t);var o=1+n*(2*r-n),i=mt(o)/r;function a(f,u){var c=mt(o-2*r*z(u))/r;return[c*z(f*=r),i-c*B(f)]}return a.invert=function(f,u){var c=i-u,s=qt(f,K(c))*Gt(c);return c*r<0&&(s-=V*Gt(f)*Gt(c)),[s/r,Mt((o-(f*f+c*c)*r*r)/(2*r))]},a}function Rn(){return ro($0).scale(155.424).center([0,33.6442])}function Ci(){return Rn().parallels([29.5,45.5]).scale(1070).translate([480,250]).rotate([96,0]).center([-.6,38.7])}function Pw(t){var e=t.length;return{point:function(n,r){for(var o=-1;++o<e;)t[o].point(n,r)},sphere:function(){for(var n=-1;++n<e;)t[n].sphere()},lineStart:function(){for(var n=-1;++n<e;)t[n].lineStart()},lineEnd:function(){for(var n=-1;++n<e;)t[n].lineEnd()},polygonStart:function(){for(var n=-1;++n<e;)t[n].polygonStart()},polygonEnd:function(){for(var n=-1;++n<e;)t[n].polygonEnd()}}}function hl(){var t,e,n=Ci(),r,o=Rn().rotate([154,0]).center([-2,58.5]).parallels([55,65]),i,a=Rn().rotate([157,0]).center([-3,19.9]).parallels([8,18]),f,u,c={point:function(l,p){u=[l,p]}};function s(l){var p=l[0],m=l[1];return u=null,r.point(p,m),u||(i.point(p,m),u)||(f.point(p,m),u)}s.invert=function(l){var p=n.scale(),m=n.translate(),h=(l[0]-m[0])/p,g=(l[1]-m[1])/p;return(g>=.12&&g<.234&&h>=-.425&&h<-.214?o:g>=.166&&g<.234&&h>=-.214&&h<-.115?a:n).invert(l)},s.stream=function(l){return t&&e===l?t:t=Pw([n.stream(e=l),o.stream(l),a.stream(l)])},s.precision=function(l){return arguments.length?(n.precision(l),o.precision(l),a.precision(l),d()):n.precision()},s.scale=function(l){return arguments.length?(n.scale(l),o.scale(l*.35),a.scale(l),s.translate(n.translate())):n.scale()},s.translate=function(l){if(!arguments.length)return n.translate();var p=n.scale(),m=+l[0],h=+l[1];return r=n.translate(l).clipExtent([[m-.455*p,h-.238*p],[m+.455*p,h+.238*p]]).stream(c),i=o.translate([m-.307*p,h+.201*p]).clipExtent([[m-.425*p+U,h+.12*p+U],[m-.214*p-U,h+.234*p-U]]).stream(c),f=a.translate([m-.205*p,h+.212*p]).clipExtent([[m-.214*p+U,h+.166*p+U],[m-.115*p-U,h+.234*p-U]]).stream(c),d()},s.fitExtent=function(l,p){return _i(s,l,p)},s.fitSize=function(l,p){return Bf(s,l,p)},s.fitWidth=function(l,p){return Uf(s,l,p)},s.fitHeight=function(l,p){return Xf(s,l,p)};function d(){return t=e=null,s}return s.scale(1070)}function Hf(t){return function(e,n){var r=B(e),o=B(n),i=t(r*o);return i===1/0?[2,0]:[i*o*z(e),i*z(n)]}}function Ke(t){return function(e,n){var r=mt(e*e+n*n),o=t(r),i=z(o),a=B(o);return[qt(e*i,r*a),Mt(r&&n*i/r)]}}var gl=Hf(function(t){return mt(2/(1+t))});gl.invert=Ke(function(t){return 2*Mt(t/2)});function xl(){return Yt(gl).scale(124.75).clipAngle(180-.001)}var yl=Hf(function(t){return(t=Af(t))&&t/z(t)});yl.invert=Ke(function(t){return t});function bl(){return Yt(yl).scale(79.4188).clipAngle(180-.001)}function oo(t,e){return[t,lr(Vr((ft+e)/2))]}oo.invert=function(t,e){return[t,2*ve(_f(e))-ft]};function wl(){return vl(oo).scale(961/Nt)}function vl(t){var e=Yt(t),n=e.center,r=e.scale,o=e.translate,i=e.clipExtent,a=null,f,u,c;e.scale=function(d){return arguments.length?(r(d),s()):r()},e.translate=function(d){return arguments.length?(o(d),s()):o()},e.center=function(d){return arguments.length?(n(d),s()):n()},e.clipExtent=function(d){return arguments.length?(d==null?a=f=u=c=null:(a=+d[0][0],f=+d[0][1],u=+d[1][0],c=+d[1][1]),s()):a==null?null:[[a,f],[u,c]]};function s(){var d=V*r(),l=e(r0(e.rotate()).invert([0,0]));return i(a==null?[[l[0]-d,l[1]-d],[l[0]+d,l[1]+d]]:t===oo?[[Math.max(l[0]-d,a),f],[Math.min(l[0]+d,u),c]]:[[a,Math.max(l[1]-d,f)],[u,Math.min(l[1]+d,c)]])}return s()}function Wf(t){return Vr((ft+t)/2)}function E0(t,e){var n=B(t),r=t===e?z(t):lr(n/B(e))/lr(Wf(e)/Wf(t)),o=n*Cf(Wf(t),r)/r;if(!r)return oo;function i(a,f){o>0?f<-ft+U&&(f=-ft+U):f>ft-U&&(f=ft-U);var u=o/Cf(Wf(f),r);return[u*z(r*a),o-u*B(r*a)]}return i.invert=function(a,f){var u=o-f,c=Gt(r)*mt(a*a+u*u),s=qt(a,K(u))*Gt(u);return u*r<0&&(s-=V*Gt(a)*Gt(u)),[s/r,2*ve(Cf(o/c,1/r))-ft]},i}function Ml(){return ro(E0).scale(109.5).parallels([30,30])}function io(t,e){return[t,e]}io.invert=io;function Sl(){return Yt(io).scale(152.63)}function I0(t,e){var n=B(t),r=t===e?z(t):(n-B(e))/(e-t),o=n/r+t;if(K(r)<U)return io;function i(a,f){var u=o-f,c=r*a;return[u*z(c),o-u*B(c)]}return i.invert=function(a,f){var u=o-f,c=qt(a,K(u))*Gt(u);return u*r<0&&(c-=V*Gt(a)*Gt(u)),[c/r,o-Gt(r)*mt(a*a+u*u)]},i}function Tl(){return ro(I0).scale(131.154).center([0,13.9389])}var Ai=1.340264,$i=-.081106,Ei=893e-6,Ii=.003796,Gf=mt(3)/2,Ow=12;function _l(t,e){var n=Mt(Gf*z(e)),r=n*n,o=r*r*r;return[t*B(n)/(Gf*(Ai+3*$i*r+o*(7*Ei+9*Ii*r))),n*(Ai+$i*r+o*(Ei+Ii*r))]}_l.invert=function(t,e){for(var n=e,r=n*n,o=r*r*r,i=0,a,f,u;i<Ow&&(f=n*(Ai+$i*r+o*(Ei+Ii*r))-e,u=Ai+3*$i*r+o*(7*Ei+9*Ii*r),n-=a=f/u,r=n*n,o=r*r*r,!(K(a)<Tf));++i);return[Gf*t*(Ai+3*$i*r+o*(7*Ei+9*Ii*r))/B(n),Mt(z(n)/Gf)]};function Cl(){return Yt(_l).scale(177.158)}function Al(t,e){var n=B(e),r=B(t)*n;return[n*z(t)/r,z(e)/r]}Al.invert=Ke(ve);function $l(){return Yt(Al).scale(144.049).clipAngle(60)}function El(t,e){return[B(e)*z(t),z(e)]}El.invert=Ke(Mt);function Il(){return Yt(El).scale(249.5).clipAngle(90+U)}function kl(t,e){var n=B(e),r=1+B(t)*n;return[n*z(t)/r,z(e)/r]}kl.invert=Ke(function(t){return 2*ve(t)});function Dl(){return Yt(kl).scale(250).clipAngle(142)}function Nl(t,e){return[lr(Vr((ft+e)/2)),-t]}Nl.invert=function(t,e){return[-e,2*ve(_f(t))-ft]};function Rl(){var t=vl(Nl),e=t.center,n=t.rotate;return t.center=function(r){return arguments.length?e([-r[1],r[0]]):(r=e(),[r[1],-r[0]])},t.rotate=function(r){return arguments.length?n([r[0],r[1],r.length>2?r[2]+90:90]):(r=n(),[r[0],r[1],r[2]-90])},n([0,0,90]).scale(159.155)}function _t(t,e){switch(arguments.length){case 0:break;case 1:this.range(t);break;default:this.range(e).domain(t);break}return this}function ki(t,e){switch(arguments.length){case 0:break;case 1:{typeof t=="function"?this.interpolator(t):this.range(t);break}default:{this.domain(t),typeof e=="function"?this.interpolator(e):this.range(e);break}}return this}var Di=Symbol("implicit");function pr(){var t=new Qt,e=[],n=[],r=Di;function o(i){let a=t.get(i);if(a===void 0){if(r!==Di)return r;t.set(i,a=e.push(i)-1)}return n[a%n.length]}return o.domain=function(i){if(!arguments.length)return e.slice();e=[],t=new Qt;for(let a of i)t.has(a)||t.set(a,e.push(a)-1);return o},o.range=function(i){return arguments.length?(n=Array.from(i),o):n.slice()},o.unknown=function(i){return arguments.length?(r=i,o):r},o.copy=function(){return pr(e,n).unknown(r)},_t.apply(o,arguments),o}function Ln(){var t=pr().unknown(void 0),e=t.domain,n=t.range,r=0,o=1,i,a,f=!1,u=0,c=0,s=.5;delete t.unknown;function d(){var l=e().length,p=o<r,m=p?o:r,h=p?r:o;i=(h-m)/Math.max(1,l-u+c*2),f&&(i=Math.floor(i)),m+=(h-m-i*(l-u))*s,a=i*(1-u),f&&(m=Math.round(m),a=Math.round(a));var g=er(l).map(function(b){return m+i*b});return n(p?g.reverse():g)}return t.domain=function(l){return arguments.length?(e(l),d()):e()},t.range=function(l){return arguments.length?([r,o]=l,r=+r,o=+o,d()):[r,o]},t.rangeRound=function(l){return[r,o]=l,r=+r,o=+o,f=!0,d()},t.bandwidth=function(){return a},t.step=function(){return i},t.round=function(l){return arguments.length?(f=!!l,d()):f},t.padding=function(l){return arguments.length?(u=Math.min(1,c=+l),d()):u},t.paddingInner=function(l){return arguments.length?(u=Math.min(1,l),d()):u},t.paddingOuter=function(l){return arguments.length?(c=+l,d()):c},t.align=function(l){return arguments.length?(s=Math.max(0,Math.min(1,l)),d()):s},t.copy=function(){return Ln(e(),[r,o]).round(f).paddingInner(u).paddingOuter(c).align(s)},_t.apply(d(),arguments)}function k0(t){var e=t.copy;return t.padding=t.paddingOuter,delete t.paddingInner,delete t.paddingOuter,t.copy=function(){return k0(e())},t}function Ll(){return k0(Ln.apply(null,arguments).paddingInner(1))}function Pl(t){return function(){return t}}function ao(t){return+t}var D0=[0,1];function oe(t){return t}function Ol(t,e){return(e-=t=+t)?function(n){return(n-t)/e}:Pl(isNaN(e)?NaN:.5)}function Fw(t,e){var n;return t>e&&(n=t,t=e,e=n),function(r){return Math.max(t,Math.min(e,r))}}function qw(t,e,n){var r=t[0],o=t[1],i=e[0],a=e[1];return o<r?(r=Ol(o,r),i=n(a,i)):(r=Ol(r,o),i=n(i,a)),function(f){return i(r(f))}}function Yw(t,e,n){var r=Math.min(t.length,e.length)-1,o=new Array(r),i=new Array(r),a=-1;for(t[r]<t[0]&&(t=t.slice().reverse(),e=e.slice().reverse());++a<r;)o[a]=Ol(t[a],t[a+1]),i[a]=n(e[a],e[a+1]);return function(f){var u=un(t,f,1,r)-1;return i[u](o[u](f))}}function Qe(t,e){return e.domain(t.domain()).range(t.range()).interpolate(t.interpolate()).clamp(t.clamp()).unknown(t.unknown())}function mr(){var t=D0,e=D0,n=Ee,r,o,i,a=oe,f,u,c;function s(){var l=Math.min(t.length,e.length);return a!==oe&&(a=Fw(t[0],t[l-1])),f=l>2?Yw:qw,u=c=null,d}function d(l){return l==null||isNaN(l=+l)?i:(u||(u=f(t.map(r),e,n)))(r(a(l)))}return d.invert=function(l){return a(o((c||(c=f(e,t.map(r),ht)))(l)))},d.domain=function(l){return arguments.length?(t=Array.from(l,ao),s()):t.slice()},d.range=function(l){return arguments.length?(e=Array.from(l),s()):e.slice()},d.rangeRound=function(l){return e=Array.from(l),n=fr,s()},d.clamp=function(l){return arguments.length?(a=l?!0:oe,s()):a!==oe},d.interpolate=function(l){return arguments.length?(n=l,s()):n},d.unknown=function(l){return arguments.length?(i=l,d):i},function(l,p){return r=l,o=p,s()}}function Ni(){return mr()(oe,oe)}function Fl(t,e,n,r){var o=Pr(t,e,n),i;switch(r=We(r??",f"),r.type){case"s":{var a=Math.max(Math.abs(t),Math.abs(e));return r.precision==null&&!isNaN(i=Xs(o,a))&&(r.precision=i),Sf(r,a)}case"":case"e":case"g":case"p":case"r":{r.precision==null&&!isNaN(i=Hs(o,Math.max(Math.abs(t),Math.abs(e))))&&(r.precision=i-(r.type==="e"));break}case"f":case"%":{r.precision==null&&!isNaN(i=Us(o))&&(r.precision=i-(r.type==="%")*2);break}}return Ge(r)}function bn(t){var e=t.domain;return t.ticks=function(n){var r=e();return Ae(r[0],r[r.length-1],n??10)},t.tickFormat=function(n,r){var o=e();return Fl(o[0],o[o.length-1],n??10,r)},t.nice=function(n){n==null&&(n=10);var r=e(),o=0,i=r.length-1,a=r[o],f=r[i],u,c,s=10;for(f<a&&(c=a,a=f,f=c,c=o,o=i,i=c);s-- >0;){if(c=tr(a,f,n),c===u)return r[o]=a,r[i]=f,e(r);if(c>0)a=Math.floor(a/c)*c,f=Math.ceil(f/c)*c;else if(c<0)a=Math.ceil(a*c)/c,f=Math.floor(f*c)/c;else break;u=c}return t},t}function hr(){var t=Ni();return t.copy=function(){return Qe(t,hr())},_t.apply(t,arguments),bn(t)}function Ri(t){var e;function n(r){return r==null||isNaN(r=+r)?e:r}return n.invert=n,n.domain=n.range=function(r){return arguments.length?(t=Array.from(r,ao),n):t.slice()},n.unknown=function(r){return arguments.length?(e=r,n):e},n.copy=function(){return Ri(t).unknown(e)},t=arguments.length?Array.from(t,ao):[0,1],bn(n)}function Li(t,e){t=t.slice();var n=0,r=t.length-1,o=t[n],i=t[r],a;return i<o&&(a=n,n=r,r=a,a=o,o=i,i=a),t[n]=e.floor(o),t[r]=e.ceil(i),t}function N0(t){return Math.log(t)}function R0(t){return Math.exp(t)}function zw(t){return-Math.log(-t)}function Bw(t){return-Math.exp(-t)}function Uw(t){return isFinite(t)?+("1e"+t):t<0?0:t}function Xw(t){return t===10?Uw:t===Math.E?Math.exp:e=>Math.pow(t,e)}function Hw(t){return t===Math.E?Math.log:t===10&&Math.log10||t===2&&Math.log2||(t=Math.log(t),e=>Math.log(e)/t)}function L0(t){return(e,n)=>-t(-e,n)}function ql(t){let e=t(N0,R0),n=e.domain,r=10,o,i;function a(){return o=Hw(r),i=Xw(r),n()[0]<0?(o=L0(o),i=L0(i),t(zw,Bw)):t(N0,R0),e}return e.base=function(f){return arguments.length?(r=+f,a()):r},e.domain=function(f){return arguments.length?(n(f),a()):n()},e.ticks=f=>{let u=n(),c=u[0],s=u[u.length-1],d=s<c;d&&([c,s]=[s,c]);let l=o(c),p=o(s),m,h,g=f==null?10:+f,b=[];if(!(r%1)&&p-l<g){if(l=Math.floor(l),p=Math.ceil(p),c>0){for(;l<=p;++l)for(m=1;m<r;++m)if(h=l<0?m/i(-l):m*i(l),!(h<c)){if(h>s)break;b.push(h)}}else for(;l<=p;++l)for(m=r-1;m>=1;--m)if(h=l>0?m/i(-l):m*i(l),!(h<c)){if(h>s)break;b.push(h)}b.length*2<g&&(b=Ae(c,s,g))}else b=Ae(l,p,Math.min(p-l,g)).map(i);return d?b.reverse():b},e.tickFormat=(f,u)=>{if(f==null&&(f=10),u==null&&(u=r===10?"s":","),typeof u!="function"&&(!(r%1)&&(u=We(u)).precision==null&&(u.trim=!0),u=Ge(u)),f===1/0)return u;let c=Math.max(1,r*f/e.ticks().length);return s=>{let d=s/i(Math.round(o(s)));return d*r<r-.5&&(d*=r),d<=c?u(s):""}},e.nice=()=>n(Li(n(),{floor:f=>i(Math.floor(o(f))),ceil:f=>i(Math.ceil(o(f)))})),e}function Pi(){let t=ql(mr()).domain([1,10]);return t.copy=()=>Qe(t,Pi()).base(t.base()),_t.apply(t,arguments),t}function P0(t){return function(e){return Math.sign(e)*Math.log1p(Math.abs(e/t))}}function O0(t){return function(e){return Math.sign(e)*Math.expm1(Math.abs(e))*t}}function Yl(t){var e=1,n=t(P0(e),O0(e));return n.constant=function(r){return arguments.length?t(P0(e=+r),O0(e)):e},bn(n)}function Oi(){var t=Yl(mr());return t.copy=function(){return Qe(t,Oi()).constant(t.constant())},_t.apply(t,arguments)}function F0(t){return function(e){return e<0?-Math.pow(-e,t):Math.pow(e,t)}}function Ww(t){return t<0?-Math.sqrt(-t):Math.sqrt(t)}function Gw(t){return t<0?-t*t:t*t}function zl(t){var e=t(oe,oe),n=1;function r(){return n===1?t(oe,oe):n===.5?t(Ww,Gw):t(F0(n),F0(1/n))}return e.exponent=function(o){return arguments.length?(n=+o,r()):n},bn(e)}function Fi(){var t=zl(mr());return t.copy=function(){return Qe(t,Fi()).exponent(t.exponent())},_t.apply(t,arguments),t}function qi(){var t=[],e=[],n=[],r;function o(){var a=0,f=Math.max(1,e.length);for(n=new Array(f-1);++a<f;)n[a-1]=us(t,a/f);return i}function i(a){return a==null||isNaN(a=+a)?r:e[un(n,a)]}return i.invertExtent=function(a){var f=e.indexOf(a);return f<0?[NaN,NaN]:[f>0?n[f-1]:t[0],f<n.length?n[f]:t[t.length-1]]},i.domain=function(a){if(!arguments.length)return t.slice();t=[];for(let f of a)f!=null&&!isNaN(f=+f)&&t.push(f);return t.sort(bt),o()},i.range=function(a){return arguments.length?(e=Array.from(a),o()):e.slice()},i.unknown=function(a){return arguments.length?(r=a,i):r},i.quantiles=function(){return n.slice()},i.copy=function(){return qi().domain(t).range(e).unknown(r)},_t.apply(i,arguments)}function Yi(){var t=[.5],e=[0,1],n,r=1;function o(i){return i!=null&&i<=i?e[un(t,i,0,r)]:n}return o.domain=function(i){return arguments.length?(t=Array.from(i),r=Math.min(t.length,e.length-1),o):t.slice()},o.range=function(i){return arguments.length?(e=Array.from(i),r=Math.min(t.length,e.length-1),o):e.slice()},o.invertExtent=function(i){var a=e.indexOf(i);return[t[a-1],t[a]]},o.unknown=function(i){return arguments.length?(n=i,o):n},o.copy=function(){return Yi().domain(t).range(e).unknown(n)},_t.apply(o,arguments)}var Bl=new Date,Ul=new Date;function dt(t,e,n,r){function o(i){return t(i=arguments.length===0?new Date:new Date(+i)),i}return o.floor=i=>(t(i=new Date(+i)),i),o.ceil=i=>(t(i=new Date(i-1)),e(i,1),t(i),i),o.round=i=>{let a=o(i),f=o.ceil(i);return i-a<f-i?a:f},o.offset=(i,a)=>(e(i=new Date(+i),a==null?1:Math.floor(a)),i),o.range=(i,a,f)=>{let u=[];if(i=o.ceil(i),f=f==null?1:Math.floor(f),!(i<a)||!(f>0))return u;let c;do u.push(c=new Date(+i)),e(i,f),t(i);while(c<i&&i<a);return u},o.filter=i=>dt(a=>{if(a>=a)for(;t(a),!i(a);)a.setTime(a-1)},(a,f)=>{if(a>=a)if(f<0)for(;++f<=0;)for(;e(a,-1),!i(a););else for(;--f>=0;)for(;e(a,1),!i(a););}),n&&(o.count=(i,a)=>(Bl.setTime(+i),Ul.setTime(+a),t(Bl),t(Ul),Math.floor(n(Bl,Ul))),o.every=i=>(i=Math.floor(i),!isFinite(i)||!(i>0)?null:i>1?o.filter(r?a=>r(a)%i===0:a=>o.count(0,a)%i===0):o)),o}var zi=dt(()=>{},(t,e)=>{t.setTime(+t+e)},(t,e)=>e-t);zi.every=t=>(t=Math.floor(t),!isFinite(t)||!(t>0)?null:t>1?dt(e=>{e.setTime(Math.floor(e/t)*t)},(e,n)=>{e.setTime(+e+n*t)},(e,n)=>(n-e)/t):zi);var Dk=zi.range;var Vt=dt(t=>{t.setTime(t-t.getMilliseconds())},(t,e)=>{t.setTime(+t+e*1e3)},(t,e)=>(e-t)/1e3,t=>t.getUTCSeconds()),q0=Vt.range;var Pn=dt(t=>{t.setTime(t-t.getMilliseconds()-t.getSeconds()*1e3)},(t,e)=>{t.setTime(+t+e*6e4)},(t,e)=>(e-t)/6e4,t=>t.getMinutes()),Vw=Pn.range,On=dt(t=>{t.setUTCSeconds(0,0)},(t,e)=>{t.setTime(+t+e*6e4)},(t,e)=>(e-t)/6e4,t=>t.getUTCMinutes()),jw=On.range;var Fn=dt(t=>{t.setTime(t-t.getMilliseconds()-t.getSeconds()*1e3-t.getMinutes()*6e4)},(t,e)=>{t.setTime(+t+e*36e5)},(t,e)=>(e-t)/36e5,t=>t.getHours()),Zw=Fn.range,qn=dt(t=>{t.setUTCMinutes(0,0,0)},(t,e)=>{t.setTime(+t+e*36e5)},(t,e)=>(e-t)/36e5,t=>t.getUTCHours()),Kw=qn.range;var De=dt(t=>t.setHours(0,0,0,0),(t,e)=>t.setDate(t.getDate()+e),(t,e)=>(e-t-(e.getTimezoneOffset()-t.getTimezoneOffset())*6e4)/864e5,t=>t.getDate()-1),Qw=De.range,yr=dt(t=>{t.setUTCHours(0,0,0,0)},(t,e)=>{t.setUTCDate(t.getUTCDate()+e)},(t,e)=>(e-t)/864e5,t=>t.getUTCDate()-1),Jw=yr.range,fo=dt(t=>{t.setUTCHours(0,0,0,0)},(t,e)=>{t.setUTCDate(t.getUTCDate()+e)},(t,e)=>(e-t)/864e5,t=>Math.floor(t/864e5)),t6=fo.range;function br(t){return dt(e=>{e.setDate(e.getDate()-(e.getDay()+7-t)%7),e.setHours(0,0,0,0)},(e,n)=>{e.setDate(e.getDate()+n*7)},(e,n)=>(n-e-(n.getTimezoneOffset()-e.getTimezoneOffset())*6e4)/6048e5)}var ce=br(0),Yn=br(1),Vf=br(2),jf=br(3),tn=br(4),Zf=br(5),Kf=br(6),z0=ce.range,e6=Yn.range,n6=Vf.range,r6=jf.range,o6=tn.range,i6=Zf.range,a6=Kf.range;function wr(t){return dt(e=>{e.setUTCDate(e.getUTCDate()-(e.getUTCDay()+7-t)%7),e.setUTCHours(0,0,0,0)},(e,n)=>{e.setUTCDate(e.getUTCDate()+n*7)},(e,n)=>(n-e)/6048e5)}var se=wr(0),zn=wr(1),Qf=wr(2),Jf=wr(3),en=wr(4),tu=wr(5),eu=wr(6),B0=se.range,f6=zn.range,u6=Qf.range,c6=Jf.range,s6=en.range,l6=tu.range,d6=eu.range;var Bn=dt(t=>{t.setDate(1),t.setHours(0,0,0,0)},(t,e)=>{t.setMonth(t.getMonth()+e)},(t,e)=>e.getMonth()-t.getMonth()+(e.getFullYear()-t.getFullYear())*12,t=>t.getMonth()),p6=Bn.range,Un=dt(t=>{t.setUTCDate(1),t.setUTCHours(0,0,0,0)},(t,e)=>{t.setUTCMonth(t.getUTCMonth()+e)},(t,e)=>e.getUTCMonth()-t.getUTCMonth()+(e.getUTCFullYear()-t.getUTCFullYear())*12,t=>t.getUTCMonth()),m6=Un.range;var jt=dt(t=>{t.setMonth(0,1),t.setHours(0,0,0,0)},(t,e)=>{t.setFullYear(t.getFullYear()+e)},(t,e)=>e.getFullYear()-t.getFullYear(),t=>t.getFullYear());jt.every=t=>!isFinite(t=Math.floor(t))||!(t>0)?null:dt(e=>{e.setFullYear(Math.floor(e.getFullYear()/t)*t),e.setMonth(0,1),e.setHours(0,0,0,0)},(e,n)=>{e.setFullYear(e.getFullYear()+n*t)});var h6=jt.range,Zt=dt(t=>{t.setUTCMonth(0,1),t.setUTCHours(0,0,0,0)},(t,e)=>{t.setUTCFullYear(t.getUTCFullYear()+e)},(t,e)=>e.getUTCFullYear()-t.getUTCFullYear(),t=>t.getUTCFullYear());Zt.every=t=>!isFinite(t=Math.floor(t))||!(t>0)?null:dt(e=>{e.setUTCFullYear(Math.floor(e.getUTCFullYear()/t)*t),e.setUTCMonth(0,1),e.setUTCHours(0,0,0,0)},(e,n)=>{e.setUTCFullYear(e.getUTCFullYear()+n*t)});var g6=Zt.range;function X0(t,e,n,r,o,i){let a=[[Vt,1,1e3],[Vt,5,5*1e3],[Vt,15,15*1e3],[Vt,30,30*1e3],[i,1,6e4],[i,5,5*6e4],[i,15,15*6e4],[i,30,30*6e4],[o,1,36e5],[o,3,3*36e5],[o,6,6*36e5],[o,12,12*36e5],[r,1,864e5],[r,2,2*864e5],[n,1,6048e5],[e,1,2592e6],[e,3,3*2592e6],[t,1,31536e6]];function f(c,s,d){let l=s<c;l&&([c,s]=[s,c]);let p=d&&typeof d.range=="function"?d:u(c,s,d),m=p?p.range(c,+s+1):[];return l?m.reverse():m}function u(c,s,d){let l=Math.abs(s-c)/d,p=Fe(([,,g])=>g).right(a,l);if(p===a.length)return t.every(Pr(c/31536e6,s/31536e6,d));if(p===0)return zi.every(Math.max(Pr(c,s,d),1));let[m,h]=a[l/a[p-1][2]<a[p][2]/l?p-1:p];return m.every(h)}return[f,u]}var[Xl,Ui]=X0(Zt,Un,se,fo,qn,On),[Hl,Wl]=X0(jt,Bn,ce,De,Fn,Pn);function Gl(t){if(0<=t.y&&t.y<100){var e=new Date(-1,t.m,t.d,t.H,t.M,t.S,t.L);return e.setFullYear(t.y),e}return new Date(t.y,t.m,t.d,t.H,t.M,t.S,t.L)}function Vl(t){if(0<=t.y&&t.y<100){var e=new Date(Date.UTC(-1,t.m,t.d,t.H,t.M,t.S,t.L));return e.setUTCFullYear(t.y),e}return new Date(Date.UTC(t.y,t.m,t.d,t.H,t.M,t.S,t.L))}function Xi(t,e,n){return{y:t,m:e,d:n,H:0,M:0,S:0,L:0}}function jl(t){var e=t.dateTime,n=t.date,r=t.time,o=t.periods,i=t.days,a=t.shortDays,f=t.months,u=t.shortMonths,c=Hi(o),s=Wi(o),d=Hi(i),l=Wi(i),p=Hi(a),m=Wi(a),h=Hi(f),g=Wi(f),b=Hi(u),x=Wi(u),M={a:N,A:O,b:R,B:tt,c:null,d:Z0,e:Z0,f:Y6,g:Z6,G:Q6,H:O6,I:F6,j:q6,L:eg,m:z6,M:B6,p:Z,q:W,Q:J0,s:tg,S:U6,u:X6,U:H6,V:W6,w:G6,W:V6,x:null,X:null,y:j6,Y:K6,Z:J6,"%":Q0},y={a:Q,A:at,b:Ut,B:Oe,c:null,d:K0,e:K0,f:rv,g:pv,G:hv,H:tv,I:ev,j:nv,L:rg,m:ov,M:iv,p:G,q:X,Q:J0,s:tg,S:av,u:fv,U:uv,V:cv,w:sv,W:lv,x:null,X:null,y:dv,Y:mv,Z:gv,"%":Q0},w={a:D,A:_,b:L,B:F,c:P,d:V0,e:V0,f:N6,g:G0,G:W0,H:j0,I:j0,j:E6,L:D6,m:$6,M:I6,p:I,q:A6,Q:L6,s:P6,S:k6,u:M6,U:S6,V:T6,w:v6,W:_6,x:S,X:A,y:G0,Y:W0,Z:C6,"%":R6};M.x=v(n,M),M.X=v(r,M),M.c=v(e,M),y.x=v(n,y),y.X=v(r,y),y.c=v(e,y);function v($,q){return function(Y){var C=[],j=-1,J=0,ot=$.length,lt,Xt,Zn;for(Y instanceof Date||(Y=new Date(+Y));++j<ot;)$.charCodeAt(j)===37&&(C.push($.slice(J,j)),(Xt=H0[lt=$.charAt(++j)])!=null?lt=$.charAt(++j):Xt=lt==="e"?" ":"0",(Zn=q[lt])&&(lt=Zn(Y,Xt)),C.push(lt),J=j+1);return C.push($.slice(J,j)),C.join("")}}function T($,q){return function(Y){var C=Xi(1900,void 0,1),j=E(C,$,Y+="",0),J,ot;if(j!=Y.length)return null;if("Q"in C)return new Date(C.Q);if("s"in C)return new Date(C.s*1e3+("L"in C?C.L:0));if(q&&!("Z"in C)&&(C.Z=0),"p"in C&&(C.H=C.H%12+C.p*12),C.m===void 0&&(C.m="q"in C?C.q:0),"V"in C){if(C.V<1||C.V>53)return null;"w"in C||(C.w=1),"Z"in C?(J=Vl(Xi(C.y,0,1)),ot=J.getUTCDay(),J=ot>4||ot===0?zn.ceil(J):zn(J),J=yr.offset(J,(C.V-1)*7),C.y=J.getUTCFullYear(),C.m=J.getUTCMonth(),C.d=J.getUTCDate()+(C.w+6)%7):(J=Gl(Xi(C.y,0,1)),ot=J.getDay(),J=ot>4||ot===0?Yn.ceil(J):Yn(J),J=De.offset(J,(C.V-1)*7),C.y=J.getFullYear(),C.m=J.getMonth(),C.d=J.getDate()+(C.w+6)%7)}else("W"in C||"U"in C)&&("w"in C||(C.w="u"in C?C.u%7:"W"in C?1:0),ot="Z"in C?Vl(Xi(C.y,0,1)).getUTCDay():Gl(Xi(C.y,0,1)).getDay(),C.m=0,C.d="W"in C?(C.w+6)%7+C.W*7-(ot+5)%7:C.w+C.U*7-(ot+6)%7);return"Z"in C?(C.H+=C.Z/100|0,C.M+=C.Z%100,Vl(C)):Gl(C)}}function E($,q,Y,C){for(var j=0,J=q.length,ot=Y.length,lt,Xt;j<J;){if(C>=ot)return-1;if(lt=q.charCodeAt(j++),lt===37){if(lt=q.charAt(j++),Xt=w[lt in H0?q.charAt(j++):lt],!Xt||(C=Xt($,Y,C))<0)return-1}else if(lt!=Y.charCodeAt(C++))return-1}return C}function I($,q,Y){var C=c.exec(q.slice(Y));return C?($.p=s.get(C[0].toLowerCase()),Y+C[0].length):-1}function D($,q,Y){var C=p.exec(q.slice(Y));return C?($.w=m.get(C[0].toLowerCase()),Y+C[0].length):-1}function _($,q,Y){var C=d.exec(q.slice(Y));return C?($.w=l.get(C[0].toLowerCase()),Y+C[0].length):-1}function L($,q,Y){var C=b.exec(q.slice(Y));return C?($.m=x.get(C[0].toLowerCase()),Y+C[0].length):-1}function F($,q,Y){var C=h.exec(q.slice(Y));return C?($.m=g.get(C[0].toLowerCase()),Y+C[0].length):-1}function P($,q,Y){return E($,e,q,Y)}function S($,q,Y){return E($,n,q,Y)}function A($,q,Y){return E($,r,q,Y)}function N($){return a[$.getDay()]}function O($){return i[$.getDay()]}function R($){return u[$.getMonth()]}function tt($){return f[$.getMonth()]}function Z($){return o[+($.getHours()>=12)]}function W($){return 1+~~($.getMonth()/3)}function Q($){return a[$.getUTCDay()]}function at($){return i[$.getUTCDay()]}function Ut($){return u[$.getUTCMonth()]}function Oe($){return f[$.getUTCMonth()]}function G($){return o[+($.getUTCHours()>=12)]}function X($){return 1+~~($.getUTCMonth()/3)}return{format:function($){var q=v($+="",M);return q.toString=function(){return $},q},parse:function($){var q=T($+="",!1);return q.toString=function(){return $},q},utcFormat:function($){var q=v($+="",y);return q.toString=function(){return $},q},utcParse:function($){var q=T($+="",!0);return q.toString=function(){return $},q}}}var H0={"-":"",_:" ",0:"0"},Lt=/^\s*\d+/,y6=/^%/,b6=/[\\^$*+?|[\]().{}]/g;function nt(t,e,n){var r=t<0?"-":"",o=(r?-t:t)+"",i=o.length;return r+(i<n?new Array(n-i+1).join(e)+o:o)}function w6(t){return t.replace(b6,"\\$&")}function Hi(t){return new RegExp("^(?:"+t.map(w6).join("|")+")","i")}function Wi(t){return new Map(t.map((e,n)=>[e.toLowerCase(),n]))}function v6(t,e,n){var r=Lt.exec(e.slice(n,n+1));return r?(t.w=+r[0],n+r[0].length):-1}function M6(t,e,n){var r=Lt.exec(e.slice(n,n+1));return r?(t.u=+r[0],n+r[0].length):-1}function S6(t,e,n){var r=Lt.exec(e.slice(n,n+2));return r?(t.U=+r[0],n+r[0].length):-1}function T6(t,e,n){var r=Lt.exec(e.slice(n,n+2));return r?(t.V=+r[0],n+r[0].length):-1}function _6(t,e,n){var r=Lt.exec(e.slice(n,n+2));return r?(t.W=+r[0],n+r[0].length):-1}function W0(t,e,n){var r=Lt.exec(e.slice(n,n+4));return r?(t.y=+r[0],n+r[0].length):-1}function G0(t,e,n){var r=Lt.exec(e.slice(n,n+2));return r?(t.y=+r[0]+(+r[0]>68?1900:2e3),n+r[0].length):-1}function C6(t,e,n){var r=/^(Z)|([+-]\d\d)(?::?(\d\d))?/.exec(e.slice(n,n+6));return r?(t.Z=r[1]?0:-(r[2]+(r[3]||"00")),n+r[0].length):-1}function A6(t,e,n){var r=Lt.exec(e.slice(n,n+1));return r?(t.q=r[0]*3-3,n+r[0].length):-1}function $6(t,e,n){var r=Lt.exec(e.slice(n,n+2));return r?(t.m=r[0]-1,n+r[0].length):-1}function V0(t,e,n){var r=Lt.exec(e.slice(n,n+2));return r?(t.d=+r[0],n+r[0].length):-1}function E6(t,e,n){var r=Lt.exec(e.slice(n,n+3));return r?(t.m=0,t.d=+r[0],n+r[0].length):-1}function j0(t,e,n){var r=Lt.exec(e.slice(n,n+2));return r?(t.H=+r[0],n+r[0].length):-1}function I6(t,e,n){var r=Lt.exec(e.slice(n,n+2));return r?(t.M=+r[0],n+r[0].length):-1}function k6(t,e,n){var r=Lt.exec(e.slice(n,n+2));return r?(t.S=+r[0],n+r[0].length):-1}function D6(t,e,n){var r=Lt.exec(e.slice(n,n+3));return r?(t.L=+r[0],n+r[0].length):-1}function N6(t,e,n){var r=Lt.exec(e.slice(n,n+6));return r?(t.L=Math.floor(r[0]/1e3),n+r[0].length):-1}function R6(t,e,n){var r=y6.exec(e.slice(n,n+1));return r?n+r[0].length:-1}function L6(t,e,n){var r=Lt.exec(e.slice(n));return r?(t.Q=+r[0],n+r[0].length):-1}function P6(t,e,n){var r=Lt.exec(e.slice(n));return r?(t.s=+r[0],n+r[0].length):-1}function Z0(t,e){return nt(t.getDate(),e,2)}function O6(t,e){return nt(t.getHours(),e,2)}function F6(t,e){return nt(t.getHours()%12||12,e,2)}function q6(t,e){return nt(1+De.count(jt(t),t),e,3)}function eg(t,e){return nt(t.getMilliseconds(),e,3)}function Y6(t,e){return eg(t,e)+"000"}function z6(t,e){return nt(t.getMonth()+1,e,2)}function B6(t,e){return nt(t.getMinutes(),e,2)}function U6(t,e){return nt(t.getSeconds(),e,2)}function X6(t){var e=t.getDay();return e===0?7:e}function H6(t,e){return nt(ce.count(jt(t)-1,t),e,2)}function ng(t){var e=t.getDay();return e>=4||e===0?tn(t):tn.ceil(t)}function W6(t,e){return t=ng(t),nt(tn.count(jt(t),t)+(jt(t).getDay()===4),e,2)}function G6(t){return t.getDay()}function V6(t,e){return nt(Yn.count(jt(t)-1,t),e,2)}function j6(t,e){return nt(t.getFullYear()%100,e,2)}function Z6(t,e){return t=ng(t),nt(t.getFullYear()%100,e,2)}function K6(t,e){return nt(t.getFullYear()%1e4,e,4)}function Q6(t,e){var n=t.getDay();return t=n>=4||n===0?tn(t):tn.ceil(t),nt(t.getFullYear()%1e4,e,4)}function J6(t){var e=t.getTimezoneOffset();return(e>0?"-":(e*=-1,"+"))+nt(e/60|0,"0",2)+nt(e%60,"0",2)}function K0(t,e){return nt(t.getUTCDate(),e,2)}function tv(t,e){return nt(t.getUTCHours(),e,2)}function ev(t,e){return nt(t.getUTCHours()%12||12,e,2)}function nv(t,e){return nt(1+yr.count(Zt(t),t),e,3)}function rg(t,e){return nt(t.getUTCMilliseconds(),e,3)}function rv(t,e){return rg(t,e)+"000"}function ov(t,e){return nt(t.getUTCMonth()+1,e,2)}function iv(t,e){return nt(t.getUTCMinutes(),e,2)}function av(t,e){return nt(t.getUTCSeconds(),e,2)}function fv(t){var e=t.getUTCDay();return e===0?7:e}function uv(t,e){return nt(se.count(Zt(t)-1,t),e,2)}function og(t){var e=t.getUTCDay();return e>=4||e===0?en(t):en.ceil(t)}function cv(t,e){return t=og(t),nt(en.count(Zt(t),t)+(Zt(t).getUTCDay()===4),e,2)}function sv(t){return t.getUTCDay()}function lv(t,e){return nt(zn.count(Zt(t)-1,t),e,2)}function dv(t,e){return nt(t.getUTCFullYear()%100,e,2)}function pv(t,e){return t=og(t),nt(t.getUTCFullYear()%100,e,2)}function mv(t,e){return nt(t.getUTCFullYear()%1e4,e,4)}function hv(t,e){var n=t.getUTCDay();return t=n>=4||n===0?en(t):en.ceil(t),nt(t.getUTCFullYear()%1e4,e,4)}function gv(){return"+0000"}function Q0(){return"%"}function J0(t){return+t}function tg(t){return Math.floor(+t/1e3)}var uo,Xn,ig,wn,ag;Zl({dateTime:"%x, %X",date:"%-m/%-d/%Y",time:"%-I:%M:%S %p",periods:["AM","PM"],days:["Sunday","Monday","Tuesday","Wednesday","Thursday","Friday","Saturday"],shortDays:["Sun","Mon","Tue","Wed","Thu","Fri","Sat"],months:["January","February","March","April","May","June","July","August","September","October","November","December"],shortMonths:["Jan","Feb","Mar","Apr","May","Jun","Jul","Aug","Sep","Oct","Nov","Dec"]});function Zl(t){return uo=jl(t),Xn=uo.format,ig=uo.parse,wn=uo.utcFormat,ag=uo.utcParse,uo}function xv(t){return new Date(t)}function yv(t){return t instanceof Date?+t:+new Date(+t)}function nu(t,e,n,r,o,i,a,f,u,c){var s=Ni(),d=s.invert,l=s.domain,p=c(".%L"),m=c(":%S"),h=c("%I:%M"),g=c("%I %p"),b=c("%a %d"),x=c("%b %d"),M=c("%B"),y=c("%Y");function w(v){return(u(v)<v?p:f(v)<v?m:a(v)<v?h:i(v)<v?g:r(v)<v?o(v)<v?b:x:n(v)<v?M:y)(v)}return s.invert=function(v){return new Date(d(v))},s.domain=function(v){return arguments.length?l(Array.from(v,yv)):l().map(xv)},s.ticks=function(v){var T=l();return t(T[0],T[T.length-1],v??10)},s.tickFormat=function(v,T){return T==null?w:c(T)},s.nice=function(v){var T=l();return(!v||typeof v.range!="function")&&(v=e(T[0],T[T.length-1],v??10)),v?l(Li(T,v)):s},s.copy=function(){return Qe(s,nu(t,e,n,r,o,i,a,f,u,c))},s}function ru(){return _t.apply(nu(Hl,Wl,jt,Bn,ce,De,Fn,Pn,Vt,Xn).domain([new Date(2e3,0,1),new Date(2e3,0,2)]),arguments)}function ou(){return _t.apply(nu(Xl,Ui,Zt,Un,se,yr,qn,On,Vt,wn).domain([Date.UTC(2e3,0,1),Date.UTC(2e3,0,2)]),arguments)}function Gi(t,e){return e.domain(t.domain()).interpolator(t.interpolator()).clamp(t.clamp()).unknown(t.unknown())}function iu(){var t=0,e=.5,n=1,r=1,o,i,a,f,u,c=oe,s,d=!1,l;function p(h){return isNaN(h=+h)?l:(h=.5+((h=+s(h))-i)*(r*h<r*i?f:u),c(d?Math.max(0,Math.min(1,h)):h))}p.domain=function(h){return arguments.length?([t,e,n]=h,o=s(t=+t),i=s(e=+e),a=s(n=+n),f=o===i?0:.5/(i-o),u=i===a?0:.5/(a-i),r=i<o?-1:1,p):[t,e,n]},p.clamp=function(h){return arguments.length?(d=!!h,p):d},p.interpolator=function(h){return arguments.length?(c=h,p):c};function m(h){return function(g){var b,x,M;return arguments.length?([b,x,M]=g,c=Xe(h,[b,x,M]),p):[c(0),c(.5),c(1)]}}return p.range=m(Ee),p.rangeRound=m(fr),p.unknown=function(h){return arguments.length?(l=h,p):l},function(h){return s=h,o=h(t),i=h(e),a=h(n),f=o===i?0:.5/(i-o),u=i===a?0:.5/(a-i),r=i<o?-1:1,p}}function Vi(){var t=bn(iu()(oe));return t.copy=function(){return Gi(t,Vi())},ki.apply(t,arguments)}function au(){var t=ql(iu()).domain([.1,1,10]);return t.copy=function(){return Gi(t,au()).base(t.base())},ki.apply(t,arguments)}function fu(){var t=Yl(iu());return t.copy=function(){return Gi(t,fu()).constant(t.constant())},ki.apply(t,arguments)}function uu(){var t=zl(iu());return t.copy=function(){return Gi(t,uu()).exponent(t.exponent())},ki.apply(t,arguments)}function k(t){for(var e=t.length/6|0,n=new Array(e),r=0;r<e;)n[r]="#"+t.slice(r*6,++r*6);return n}var Kl=k("1f77b4ff7f0e2ca02cd627289467bd8c564be377c27f7f7fbcbd2217becf");var Ql=k("7fc97fbeaed4fdc086ffff99386cb0f0027fbf5b17666666");var Jl=k("1b9e77d95f027570b3e7298a66a61ee6ab02a6761d666666");var td=k("a6cee31f78b4b2df8a33a02cfb9a99e31a1cfdbf6fff7f00cab2d66a3d9affff99b15928");var ed=k("fbb4aeb3cde3ccebc5decbe4fed9a6ffffcce5d8bdfddaecf2f2f2");var nd=k("b3e2cdfdcdaccbd5e8f4cae4e6f5c9fff2aef1e2cccccccc");var rd=k("e41a1c377eb84daf4a984ea3ff7f00ffff33a65628f781bf999999");var od=k("66c2a5fc8d628da0cbe78ac3a6d854ffd92fe5c494b3b3b3");var id=k("8dd3c7ffffb3bebadafb807280b1d3fdb462b3de69fccde5d9d9d9bc80bdccebc5ffed6f");var ad=k("4e79a7f28e2ce1575976b7b259a14fedc949af7aa1ff9da79c755fbab0ab");var H=t=>Cs(t[t.length-1]);var cu=new Array(3).concat("d8b365f5f5f55ab4ac","a6611adfc27d80cdc1018571","a6611adfc27df5f5f580cdc1018571","8c510ad8b365f6e8c3c7eae55ab4ac01665e","8c510ad8b365f6e8c3f5f5f5c7eae55ab4ac01665e","8c510abf812ddfc27df6e8c3c7eae580cdc135978f01665e","8c510abf812ddfc27df6e8c3f5f5f5c7eae580cdc135978f01665e","5430058c510abf812ddfc27df6e8c3c7eae580cdc135978f01665e003c30","5430058c510abf812ddfc27df6e8c3f5f5f5c7eae580cdc135978f01665e003c30").map(k),su=H(cu);var lu=new Array(3).concat("af8dc3f7f7f77fbf7b","7b3294c2a5cfa6dba0008837","7b3294c2a5cff7f7f7a6dba0008837","762a83af8dc3e7d4e8d9f0d37fbf7b1b7837","762a83af8dc3e7d4e8f7f7f7d9f0d37fbf7b1b7837","762a839970abc2a5cfe7d4e8d9f0d3a6dba05aae611b7837","762a839970abc2a5cfe7d4e8f7f7f7d9f0d3a6dba05aae611b7837","40004b762a839970abc2a5cfe7d4e8d9f0d3a6dba05aae611b783700441b","40004b762a839970abc2a5cfe7d4e8f7f7f7d9f0d3a6dba05aae611b783700441b").map(k),du=H(lu);var pu=new Array(3).concat("e9a3c9f7f7f7a1d76a","d01c8bf1b6dab8e1864dac26","d01c8bf1b6daf7f7f7b8e1864dac26","c51b7de9a3c9fde0efe6f5d0a1d76a4d9221","c51b7de9a3c9fde0eff7f7f7e6f5d0a1d76a4d9221","c51b7dde77aef1b6dafde0efe6f5d0b8e1867fbc414d9221","c51b7dde77aef1b6dafde0eff7f7f7e6f5d0b8e1867fbc414d9221","8e0152c51b7dde77aef1b6dafde0efe6f5d0b8e1867fbc414d9221276419","8e0152c51b7dde77aef1b6dafde0eff7f7f7e6f5d0b8e1867fbc414d9221276419").map(k),mu=H(pu);var hu=new Array(3).concat("998ec3f7f7f7f1a340","5e3c99b2abd2fdb863e66101","5e3c99b2abd2f7f7f7fdb863e66101","542788998ec3d8daebfee0b6f1a340b35806","542788998ec3d8daebf7f7f7fee0b6f1a340b35806","5427888073acb2abd2d8daebfee0b6fdb863e08214b35806","5427888073acb2abd2d8daebf7f7f7fee0b6fdb863e08214b35806","2d004b5427888073acb2abd2d8daebfee0b6fdb863e08214b358067f3b08","2d004b5427888073acb2abd2d8daebf7f7f7fee0b6fdb863e08214b358067f3b08").map(k),gu=H(hu);var ji=new Array(3).concat("ef8a62f7f7f767a9cf","ca0020f4a58292c5de0571b0","ca0020f4a582f7f7f792c5de0571b0","b2182bef8a62fddbc7d1e5f067a9cf2166ac","b2182bef8a62fddbc7f7f7f7d1e5f067a9cf2166ac","b2182bd6604df4a582fddbc7d1e5f092c5de4393c32166ac","b2182bd6604df4a582fddbc7f7f7f7d1e5f092c5de4393c32166ac","67001fb2182bd6604df4a582fddbc7d1e5f092c5de4393c32166ac053061","67001fb2182bd6604df4a582fddbc7f7f7f7d1e5f092c5de4393c32166ac053061").map(k),co=H(ji);var xu=new Array(3).concat("ef8a62ffffff999999","ca0020f4a582bababa404040","ca0020f4a582ffffffbababa404040","b2182bef8a62fddbc7e0e0e09999994d4d4d","b2182bef8a62fddbc7ffffffe0e0e09999994d4d4d","b2182bd6604df4a582fddbc7e0e0e0bababa8787874d4d4d","b2182bd6604df4a582fddbc7ffffffe0e0e0bababa8787874d4d4d","67001fb2182bd6604df4a582fddbc7e0e0e0bababa8787874d4d4d1a1a1a","67001fb2182bd6604df4a582fddbc7ffffffe0e0e0bababa8787874d4d4d1a1a1a").map(k),yu=H(xu);var Zi=new Array(3).concat("fc8d59ffffbf91bfdb","d7191cfdae61abd9e92c7bb6","d7191cfdae61ffffbfabd9e92c7bb6","d73027fc8d59fee090e0f3f891bfdb4575b4","d73027fc8d59fee090ffffbfe0f3f891bfdb4575b4","d73027f46d43fdae61fee090e0f3f8abd9e974add14575b4","d73027f46d43fdae61fee090ffffbfe0f3f8abd9e974add14575b4","a50026d73027f46d43fdae61fee090e0f3f8abd9e974add14575b4313695","a50026d73027f46d43fdae61fee090ffffbfe0f3f8abd9e974add14575b4313695").map(k),so=H(Zi);var bu=new Array(3).concat("fc8d59ffffbf91cf60","d7191cfdae61a6d96a1a9641","d7191cfdae61ffffbfa6d96a1a9641","d73027fc8d59fee08bd9ef8b91cf601a9850","d73027fc8d59fee08bffffbfd9ef8b91cf601a9850","d73027f46d43fdae61fee08bd9ef8ba6d96a66bd631a9850","d73027f46d43fdae61fee08bffffbfd9ef8ba6d96a66bd631a9850","a50026d73027f46d43fdae61fee08bd9ef8ba6d96a66bd631a9850006837","a50026d73027f46d43fdae61fee08bffffbfd9ef8ba6d96a66bd631a9850006837").map(k),wu=H(bu);var vu=new Array(3).concat("fc8d59ffffbf99d594","d7191cfdae61abdda42b83ba","d7191cfdae61ffffbfabdda42b83ba","d53e4ffc8d59fee08be6f59899d5943288bd","d53e4ffc8d59fee08bffffbfe6f59899d5943288bd","d53e4ff46d43fdae61fee08be6f598abdda466c2a53288bd","d53e4ff46d43fdae61fee08bffffbfe6f598abdda466c2a53288bd","9e0142d53e4ff46d43fdae61fee08be6f598abdda466c2a53288bd5e4fa2","9e0142d53e4ff46d43fdae61fee08bffffbfe6f598abdda466c2a53288bd5e4fa2").map(k),Mu=H(vu);var Su=new Array(3).concat("e5f5f999d8c92ca25f","edf8fbb2e2e266c2a4238b45","edf8fbb2e2e266c2a42ca25f006d2c","edf8fbccece699d8c966c2a42ca25f006d2c","edf8fbccece699d8c966c2a441ae76238b45005824","f7fcfde5f5f9ccece699d8c966c2a441ae76238b45005824","f7fcfde5f5f9ccece699d8c966c2a441ae76238b45006d2c00441b").map(k),Tu=H(Su);var _u=new Array(3).concat("e0ecf49ebcda8856a7","edf8fbb3cde38c96c688419d","edf8fbb3cde38c96c68856a7810f7c","edf8fbbfd3e69ebcda8c96c68856a7810f7c","edf8fbbfd3e69ebcda8c96c68c6bb188419d6e016b","f7fcfde0ecf4bfd3e69ebcda8c96c68c6bb188419d6e016b","f7fcfde0ecf4bfd3e69ebcda8c96c68c6bb188419d810f7c4d004b").map(k),Cu=H(_u);var Au=new Array(3).concat("e0f3dba8ddb543a2ca","f0f9e8bae4bc7bccc42b8cbe","f0f9e8bae4bc7bccc443a2ca0868ac","f0f9e8ccebc5a8ddb57bccc443a2ca0868ac","f0f9e8ccebc5a8ddb57bccc44eb3d32b8cbe08589e","f7fcf0e0f3dbccebc5a8ddb57bccc44eb3d32b8cbe08589e","f7fcf0e0f3dbccebc5a8ddb57bccc44eb3d32b8cbe0868ac084081").map(k),$u=H(Au);var Eu=new Array(3).concat("fee8c8fdbb84e34a33","fef0d9fdcc8afc8d59d7301f","fef0d9fdcc8afc8d59e34a33b30000","fef0d9fdd49efdbb84fc8d59e34a33b30000","fef0d9fdd49efdbb84fc8d59ef6548d7301f990000","fff7ecfee8c8fdd49efdbb84fc8d59ef6548d7301f990000","fff7ecfee8c8fdd49efdbb84fc8d59ef6548d7301fb300007f0000").map(k),Iu=H(Eu);var ku=new Array(3).concat("ece2f0a6bddb1c9099","f6eff7bdc9e167a9cf02818a","f6eff7bdc9e167a9cf1c9099016c59","f6eff7d0d1e6a6bddb67a9cf1c9099016c59","f6eff7d0d1e6a6bddb67a9cf3690c002818a016450","fff7fbece2f0d0d1e6a6bddb67a9cf3690c002818a016450","fff7fbece2f0d0d1e6a6bddb67a9cf3690c002818a016c59014636").map(k),Du=H(ku);var Nu=new Array(3).concat("ece7f2a6bddb2b8cbe","f1eef6bdc9e174a9cf0570b0","f1eef6bdc9e174a9cf2b8cbe045a8d","f1eef6d0d1e6a6bddb74a9cf2b8cbe045a8d","f1eef6d0d1e6a6bddb74a9cf3690c00570b0034e7b","fff7fbece7f2d0d1e6a6bddb74a9cf3690c00570b0034e7b","fff7fbece7f2d0d1e6a6bddb74a9cf3690c00570b0045a8d023858").map(k),Ru=H(Nu);var Lu=new Array(3).concat("e7e1efc994c7dd1c77","f1eef6d7b5d8df65b0ce1256","f1eef6d7b5d8df65b0dd1c77980043","f1eef6d4b9dac994c7df65b0dd1c77980043","f1eef6d4b9dac994c7df65b0e7298ace125691003f","f7f4f9e7e1efd4b9dac994c7df65b0e7298ace125691003f","f7f4f9e7e1efd4b9dac994c7df65b0e7298ace125698004367001f").map(k),Pu=H(Lu);var Ou=new Array(3).concat("fde0ddfa9fb5c51b8a","feebe2fbb4b9f768a1ae017e","feebe2fbb4b9f768a1c51b8a7a0177","feebe2fcc5c0fa9fb5f768a1c51b8a7a0177","feebe2fcc5c0fa9fb5f768a1dd3497ae017e7a0177","fff7f3fde0ddfcc5c0fa9fb5f768a1dd3497ae017e7a0177","fff7f3fde0ddfcc5c0fa9fb5f768a1dd3497ae017e7a017749006a").map(k),Fu=H(Ou);var qu=new Array(3).concat("edf8b17fcdbb2c7fb8","ffffcca1dab441b6c4225ea8","ffffcca1dab441b6c42c7fb8253494","ffffccc7e9b47fcdbb41b6c42c7fb8253494","ffffccc7e9b47fcdbb41b6c41d91c0225ea80c2c84","ffffd9edf8b1c7e9b47fcdbb41b6c41d91c0225ea80c2c84","ffffd9edf8b1c7e9b47fcdbb41b6c41d91c0225ea8253494081d58").map(k),Yu=H(qu);var zu=new Array(3).concat("f7fcb9addd8e31a354","ffffccc2e69978c679238443","ffffccc2e69978c67931a354006837","ffffccd9f0a3addd8e78c67931a354006837","ffffccd9f0a3addd8e78c67941ab5d238443005a32","ffffe5f7fcb9d9f0a3addd8e78c67941ab5d238443005a32","ffffe5f7fcb9d9f0a3addd8e78c67941ab5d238443006837004529").map(k),Bu=H(zu);var Uu=new Array(3).concat("fff7bcfec44fd95f0e","ffffd4fed98efe9929cc4c02","ffffd4fed98efe9929d95f0e993404","ffffd4fee391fec44ffe9929d95f0e993404","ffffd4fee391fec44ffe9929ec7014cc4c028c2d04","ffffe5fff7bcfee391fec44ffe9929ec7014cc4c028c2d04","ffffe5fff7bcfee391fec44ffe9929ec7014cc4c02993404662506").map(k),Xu=H(Uu);var Hu=new Array(3).concat("ffeda0feb24cf03b20","ffffb2fecc5cfd8d3ce31a1c","ffffb2fecc5cfd8d3cf03b20bd0026","ffffb2fed976feb24cfd8d3cf03b20bd0026","ffffb2fed976feb24cfd8d3cfc4e2ae31a1cb10026","ffffccffeda0fed976feb24cfd8d3cfc4e2ae31a1cb10026","ffffccffeda0fed976feb24cfd8d3cfc4e2ae31a1cbd0026800026").map(k),Wu=H(Hu);var Gu=new Array(3).concat("deebf79ecae13182bd","eff3ffbdd7e76baed62171b5","eff3ffbdd7e76baed63182bd08519c","eff3ffc6dbef9ecae16baed63182bd08519c","eff3ffc6dbef9ecae16baed64292c62171b5084594","f7fbffdeebf7c6dbef9ecae16baed64292c62171b5084594","f7fbffdeebf7c6dbef9ecae16baed64292c62171b508519c08306b").map(k),Vu=H(Gu);var ju=new Array(3).concat("e5f5e0a1d99b31a354","edf8e9bae4b374c476238b45","edf8e9bae4b374c47631a354006d2c","edf8e9c7e9c0a1d99b74c47631a354006d2c","edf8e9c7e9c0a1d99b74c47641ab5d238b45005a32","f7fcf5e5f5e0c7e9c0a1d99b74c47641ab5d238b45005a32","f7fcf5e5f5e0c7e9c0a1d99b74c47641ab5d238b45006d2c00441b").map(k),Zu=H(ju);var Ku=new Array(3).concat("f0f0f0bdbdbd636363","f7f7f7cccccc969696525252","f7f7f7cccccc969696636363252525","f7f7f7d9d9d9bdbdbd969696636363252525","f7f7f7d9d9d9bdbdbd969696737373525252252525","fffffff0f0f0d9d9d9bdbdbd969696737373525252252525","fffffff0f0f0d9d9d9bdbdbd969696737373525252252525000000").map(k),Qu=H(Ku);var Ju=new Array(3).concat("efedf5bcbddc756bb1","f2f0f7cbc9e29e9ac86a51a3","f2f0f7cbc9e29e9ac8756bb154278f","f2f0f7dadaebbcbddc9e9ac8756bb154278f","f2f0f7dadaebbcbddc9e9ac8807dba6a51a34a1486","fcfbfdefedf5dadaebbcbddc9e9ac8807dba6a51a34a1486","fcfbfdefedf5dadaebbcbddc9e9ac8807dba6a51a354278f3f007d").map(k),tc=H(Ju);var ec=new Array(3).concat("fee0d2fc9272de2d26","fee5d9fcae91fb6a4acb181d","fee5d9fcae91fb6a4ade2d26a50f15","fee5d9fcbba1fc9272fb6a4ade2d26a50f15","fee5d9fcbba1fc9272fb6a4aef3b2ccb181d99000d","fff5f0fee0d2fcbba1fc9272fb6a4aef3b2ccb181d99000d","fff5f0fee0d2fcbba1fc9272fb6a4aef3b2ccb181da50f1567000d").map(k),nc=H(ec);var rc=new Array(3).concat("fee6cefdae6be6550d","feeddefdbe85fd8d3cd94701","feeddefdbe85fd8d3ce6550da63603","feeddefdd0a2fdae6bfd8d3ce6550da63603","feeddefdd0a2fdae6bfd8d3cf16913d948018c2d04","fff5ebfee6cefdd0a2fdae6bfd8d3cf16913d948018c2d04","fff5ebfee6cefdd0a2fdae6bfd8d3cf16913d94801a636037f2704").map(k),oc=H(rc);function ic(t){return t=Math.max(0,Math.min(1,t)),"rgb("+Math.max(0,Math.min(255,Math.round(-4.54-t*(35.34-t*(2381.73-t*(6402.7-t*(7024.72-t*2710.57)))))))+", "+Math.max(0,Math.min(255,Math.round(32.49+t*(170.73+t*(52.82-t*(131.46-t*(176.58-t*67.37)))))))+", "+Math.max(0,Math.min(255,Math.round(81.24+t*(442.36-t*(2482.43-t*(6167.24-t*(6614.94-t*2475.67)))))))+")"}var ac=Ur(te(300,.5,0),te(-240,.5,1));var uc=Ur(te(-100,.75,.35),te(80,1.5,.8)),cc=Ur(te(260,.75,.35),te(80,1.5,.8)),fc=te();function sc(t){(t<0||t>1)&&(t-=Math.floor(t));var e=Math.abs(t-.5);return fc.h=360*t-100,fc.s=1.5-1.5*e,fc.l=.8-.9*e,fc+""}var lc=be(),bv=Math.PI/3,wv=Math.PI*2/3;function dc(t){var e;return t=(.5-t)*Math.PI,lc.r=255*(e=Math.sin(t))*e,lc.g=255*(e=Math.sin(t+bv))*e,lc.b=255*(e=Math.sin(t+wv))*e,lc+""}function pc(t){return t=Math.max(0,Math.min(1,t)),"rgb("+Math.max(0,Math.min(255,Math.round(34.61+t*(1172.33-t*(10793.56-t*(33300.12-t*(38394.49-t*14825.05)))))))+", "+Math.max(0,Math.min(255,Math.round(23.31+t*(557.33+t*(1225.33-t*(3574.96-t*(1073.77+t*707.56)))))))+", "+Math.max(0,Math.min(255,Math.round(27.2+t*(3211.1-t*(15327.97-t*(27814-t*(22569.18-t*6838.66)))))))+")"}function mc(t){var e=t.length;return function(n){return t[Math.max(0,Math.min(e-1,Math.floor(n*e)))]}}var hc=mc(k("44015444025645045745055946075a46085c460a5d460b5e470d60470e6147106347116447136548146748166848176948186a481a6c481b6d481c6e481d6f481f70482071482173482374482475482576482677482878482979472a7a472c7a472d7b472e7c472f7d46307e46327e46337f463480453581453781453882443983443a83443b84433d84433e85423f854240864241864142874144874045884046883f47883f48893e49893e4a893e4c8a3d4d8a3d4e8a3c4f8a3c508b3b518b3b528b3a538b3a548c39558c39568c38588c38598c375a8c375b8d365c8d365d8d355e8d355f8d34608d34618d33628d33638d32648e32658e31668e31678e31688e30698e306a8e2f6b8e2f6c8e2e6d8e2e6e8e2e6f8e2d708e2d718e2c718e2c728e2c738e2b748e2b758e2a768e2a778e2a788e29798e297a8e297b8e287c8e287d8e277e8e277f8e27808e26818e26828e26828e25838e25848e25858e24868e24878e23888e23898e238a8d228b8d228c8d228d8d218e8d218f8d21908d21918c20928c20928c20938c1f948c1f958b1f968b1f978b1f988b1f998a1f9a8a1e9b8a1e9c891e9d891f9e891f9f881fa0881fa1881fa1871fa28720a38620a48621a58521a68522a78522a88423a98324aa8325ab8225ac8226ad8127ad8128ae8029af7f2ab07f2cb17e2db27d2eb37c2fb47c31b57b32b67a34b67935b77937b87838b9773aba763bbb753dbc743fbc7340bd7242be7144bf7046c06f48c16e4ac16d4cc26c4ec36b50c46a52c56954c56856c66758c7655ac8645cc8635ec96260ca6063cb5f65cb5e67cc5c69cd5b6ccd5a6ece5870cf5773d05675d05477d1537ad1517cd2507fd34e81d34d84d44b86d54989d5488bd6468ed64590d74393d74195d84098d83e9bd93c9dd93ba0da39a2da37a5db36a8db34aadc32addc30b0dd2fb2dd2db5de2bb8de29bade28bddf26c0df25c2df23c5e021c8e020cae11fcde11dd0e11cd2e21bd5e21ad8e219dae319dde318dfe318e2e418e5e419e7e419eae51aece51befe51cf1e51df4e61ef6e620f8e621fbe723fde725")),gc=mc(k("00000401000501010601010802010902020b02020d03030f03031204041405041606051806051a07061c08071e0907200a08220b09240c09260d0a290e0b2b100b2d110c2f120d31130d34140e36150e38160f3b180f3d19103f1a10421c10441d11471e114920114b21114e22115024125325125527125829115a2a115c2c115f2d11612f116331116533106734106936106b38106c390f6e3b0f703d0f713f0f72400f74420f75440f764510774710784910784a10794c117a4e117b4f127b51127c52137c54137d56147d57157e59157e5a167e5c167f5d177f5f187f601880621980641a80651a80671b80681c816a1c816b1d816d1d816e1e81701f81721f817320817521817621817822817922827b23827c23827e24828025828125818326818426818627818827818928818b29818c29818e2a81902a81912b81932b80942c80962c80982d80992d809b2e7f9c2e7f9e2f7fa02f7fa1307ea3307ea5317ea6317da8327daa337dab337cad347cae347bb0357bb2357bb3367ab5367ab73779b83779ba3878bc3978bd3977bf3a77c03a76c23b75c43c75c53c74c73d73c83e73ca3e72cc3f71cd4071cf4070d0416fd2426fd3436ed5446dd6456cd8456cd9466bdb476adc4869de4968df4a68e04c67e24d66e34e65e44f64e55064e75263e85362e95462ea5661eb5760ec5860ed5a5fee5b5eef5d5ef05f5ef1605df2625df2645cf3655cf4675cf4695cf56b5cf66c5cf66e5cf7705cf7725cf8745cf8765cf9785df9795df97b5dfa7d5efa7f5efa815ffb835ffb8560fb8761fc8961fc8a62fc8c63fc8e64fc9065fd9266fd9467fd9668fd9869fd9a6afd9b6bfe9d6cfe9f6dfea16efea36ffea571fea772fea973feaa74feac76feae77feb078feb27afeb47bfeb67cfeb77efeb97ffebb81febd82febf84fec185fec287fec488fec68afec88cfeca8dfecc8ffecd90fecf92fed194fed395fed597fed799fed89afdda9cfddc9efddea0fde0a1fde2a3fde3a5fde5a7fde7a9fde9aafdebacfcecaefceeb0fcf0b2fcf2b4fcf4b6fcf6b8fcf7b9fcf9bbfcfbbdfcfdbf")),xc=mc(k("00000401000501010601010802010a02020c02020e03021004031204031405041706041907051b08051d09061f0a07220b07240c08260d08290e092b10092d110a30120a32140b34150b37160b39180c3c190c3e1b0c411c0c431e0c451f0c48210c4a230c4c240c4f260c51280b53290b552b0b572d0b592f0a5b310a5c320a5e340a5f3609613809623909633b09643d09653e0966400a67420a68440a68450a69470b6a490b6a4a0c6b4c0c6b4d0d6c4f0d6c510e6c520e6d540f6d550f6d57106e59106e5a116e5c126e5d126e5f136e61136e62146e64156e65156e67166e69166e6a176e6c186e6d186e6f196e71196e721a6e741a6e751b6e771c6d781c6d7a1d6d7c1d6d7d1e6d7f1e6c801f6c82206c84206b85216b87216b88226a8a226a8c23698d23698f24699025689225689326679526679727669827669a28659b29649d29649f2a63a02a63a22b62a32c61a52c60a62d60a82e5fa92e5eab2f5ead305dae305cb0315bb1325ab3325ab43359b63458b73557b93556ba3655bc3754bd3853bf3952c03a51c13a50c33b4fc43c4ec63d4dc73e4cc83f4bca404acb4149cc4248ce4347cf4446d04545d24644d34743d44842d54a41d74b3fd84c3ed94d3dda4e3cdb503bdd513ade5238df5337e05536e15635e25734e35933e45a31e55c30e65d2fe75e2ee8602de9612bea632aeb6429eb6628ec6726ed6925ee6a24ef6c23ef6e21f06f20f1711ff1731df2741cf3761bf37819f47918f57b17f57d15f67e14f68013f78212f78410f8850ff8870ef8890cf98b0bf98c0af98e09fa9008fa9207fa9407fb9606fb9706fb9906fb9b06fb9d07fc9f07fca108fca309fca50afca60cfca80dfcaa0ffcac11fcae12fcb014fcb216fcb418fbb61afbb81dfbba1ffbbc21fbbe23fac026fac228fac42afac62df9c72ff9c932f9cb35f8cd37f8cf3af7d13df7d340f6d543f6d746f5d949f5db4cf4dd4ff4df53f4e156f3e35af3e55df2e661f2e865f2ea69f1ec6df1ed71f1ef75f1f179f2f27df2f482f3f586f3f68af4f88ef5f992f6fa96f8fb9af9fc9dfafda1fcffa4")),yc=mc(k("0d088710078813078916078a19068c1b068d1d068e20068f2206902406912605912805922a05932c05942e05952f059631059733059735049837049938049a3a049a3c049b3e049c3f049c41049d43039e44039e46039f48039f4903a04b03a14c02a14e02a25002a25102a35302a35502a45601a45801a45901a55b01a55c01a65e01a66001a66100a76300a76400a76600a76700a86900a86a00a86c00a86e00a86f00a87100a87201a87401a87501a87701a87801a87a02a87b02a87d03a87e03a88004a88104a78305a78405a78606a68707a68808a68a09a58b0aa58d0ba58e0ca48f0da4910ea3920fa39410a29511a19613a19814a099159f9a169f9c179e9d189d9e199da01a9ca11b9ba21d9aa31e9aa51f99a62098a72197a82296aa2395ab2494ac2694ad2793ae2892b02991b12a90b22b8fb32c8eb42e8db52f8cb6308bb7318ab83289ba3388bb3488bc3587bd3786be3885bf3984c03a83c13b82c23c81c33d80c43e7fc5407ec6417dc7427cc8437bc9447aca457acb4679cc4778cc4977cd4a76ce4b75cf4c74d04d73d14e72d24f71d35171d45270d5536fd5546ed6556dd7566cd8576bd9586ada5a6ada5b69db5c68dc5d67dd5e66de5f65de6164df6263e06363e16462e26561e26660e3685fe4695ee56a5de56b5de66c5ce76e5be76f5ae87059e97158e97257ea7457eb7556eb7655ec7754ed7953ed7a52ee7b51ef7c51ef7e50f07f4ff0804ef1814df1834cf2844bf3854bf3874af48849f48948f58b47f58c46f68d45f68f44f79044f79143f79342f89441f89540f9973ff9983ef99a3efa9b3dfa9c3cfa9e3bfb9f3afba139fba238fca338fca537fca636fca835fca934fdab33fdac33fdae32fdaf31fdb130fdb22ffdb42ffdb52efeb72dfeb82cfeba2cfebb2bfebd2afebe2afec029fdc229fdc328fdc527fdc627fdc827fdca26fdcb26fccd25fcce25fcd025fcd225fbd324fbd524fbd724fad824fada24f9dc24f9dd25f8df25f8e125f7e225f7e425f6e626f6e826f5e926f5eb27f4ed27f3ee27f3f027f2f227f1f426f1f525f0f724f0f921"));var fd=Math.cos;var lo=Math.min,Ki=Math.sin,rt=Math.sqrt;var vr=Math.PI,JL=vr/2,po=2*vr;var vv=rt(3),Qi={draw(t,e){let n=rt(e+lo(e/28,.75))*.59436,r=n/2,o=r*vv;t.moveTo(0,n),t.lineTo(0,-n),t.moveTo(-o,-r),t.lineTo(o,r),t.moveTo(-o,r),t.lineTo(o,-r)}};var mo={draw(t,e){let n=rt(e/vr);t.moveTo(n,0),t.arc(0,0,n,0,po)}};var Ji={draw(t,e){let n=rt(e/5)/2;t.moveTo(-3*n,-n),t.lineTo(-n,-n),t.lineTo(-n,-3*n),t.lineTo(n,-3*n),t.lineTo(n,-n),t.lineTo(3*n,-n),t.lineTo(3*n,n),t.lineTo(n,n),t.lineTo(n,3*n),t.lineTo(-n,3*n),t.lineTo(-n,n),t.lineTo(-3*n,n),t.closePath()}};var fg=rt(1/3),Mv=fg*2,ta={draw(t,e){let n=rt(e/Mv),r=n*fg;t.moveTo(0,-n),t.lineTo(r,0),t.lineTo(0,n),t.lineTo(-r,0),t.closePath()}};var ea={draw(t,e){let n=rt(e)*.62625;t.moveTo(0,-n),t.lineTo(n,0),t.lineTo(0,n),t.lineTo(-n,0),t.closePath()}};var na={draw(t,e){let n=rt(e-lo(e/7,2))*.87559;t.moveTo(-n,0),t.lineTo(n,0),t.moveTo(0,n),t.lineTo(0,-n)}};var ra={draw(t,e){let n=rt(e),r=-n/2;t.rect(r,r,n,n)}};var oa={draw(t,e){let n=rt(e)*.4431;t.moveTo(n,n),t.lineTo(n,-n),t.lineTo(-n,-n),t.lineTo(-n,n),t.closePath()}};var Sv=.8908130915292852,ug=Ki(vr/10)/Ki(7*vr/10),Tv=Ki(po/10)*ug,_v=-fd(po/10)*ug,ia={draw(t,e){let n=rt(e*Sv),r=Tv*n,o=_v*n;t.moveTo(0,-n),t.lineTo(r,o);for(let i=1;i<5;++i){let a=po*i/5,f=fd(a),u=Ki(a);t.lineTo(u*n,-f*n),t.lineTo(f*r-u*o,u*r+f*o)}t.closePath()}};var ud=rt(3),aa={draw(t,e){let n=-rt(e/(ud*3));t.moveTo(0,n*2),t.lineTo(-ud*n,-n),t.lineTo(ud*n,-n),t.closePath()}};var Cv=rt(3),fa={draw(t,e){let n=rt(e)*.6824,r=n/2,o=n*Cv/2;t.moveTo(0,-n),t.lineTo(o,r),t.lineTo(-o,r),t.closePath()}};var Me=-.5,Se=rt(3)/2,cd=1/rt(12),Av=(cd/2+1)*3,ua={draw(t,e){let n=rt(e/Av),r=n/2,o=n*cd,i=r,a=n*cd+n,f=-i,u=a;t.moveTo(r,o),t.lineTo(i,a),t.lineTo(f,u),t.lineTo(Me*r-Se*o,Se*r+Me*o),t.lineTo(Me*i-Se*a,Se*i+Me*a),t.lineTo(Me*f-Se*u,Se*f+Me*u),t.lineTo(Me*r+Se*o,Me*o-Se*r),t.lineTo(Me*i+Se*a,Me*a-Se*i),t.lineTo(Me*f+Se*u,Me*u-Se*f),t.closePath()}};var ho={draw(t,e){let n=rt(e-lo(e/6,1.7))*.6189;t.moveTo(-n,-n),t.lineTo(n,n),t.moveTo(-n,n),t.lineTo(n,-n)}};var bc=[mo,Ji,ta,ra,ia,aa,ua],sd=[mo,na,ho,fa,Qi,oa,ea];function Hn(t,e,n){this.k=t,this.x=e,this.y=n}Hn.prototype={constructor:Hn,scale:function(t){return t===1?this:new Hn(this.k*t,this.x,this.y)},translate:function(t,e){return t===0&e===0?this:new Hn(this.k,this.x+this.k*t,this.y+this.k*e)},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 ld=new Hn(1,0,0);dd.prototype=Hn.prototype;function dd(t){for(;!t.__zoom;)if(!(t=t.parentNode))return ld;return t.__zoom}function Ne(t){return t!=null&&!Number.isNaN(t)}function Kt(t,e){return+Ne(e)-+Ne(t)||bt(t,e)}function Mr(t,e){return+Ne(e)-+Ne(t)||xe(t,e)}function wc(t){return t!=null&&`${t}`!=""}function pd(t){return isFinite(t)?t:NaN}function ca(t){return t>0&&isFinite(t)?t:NaN}function vc(t){return t<0&&isFinite(t)?t:NaN}function Mc(t,e){if(t instanceof Date||(t=new Date(+t)),isNaN(t))return typeof e=="function"?e(t):e;let n=t.getUTCHours(),r=t.getUTCMinutes(),o=t.getUTCSeconds(),i=t.getUTCMilliseconds();return`${$v(t.getUTCFullYear(),4)}-${vn(t.getUTCMonth()+1,2)}-${vn(t.getUTCDate(),2)}${n||r||o||i?`T${vn(n,2)}:${vn(r,2)}${o||i?`:${vn(o,2)}${i?`.${vn(i,3)}`:""}`:""}Z`:""}`}function $v(t){return t<0?`-${vn(-t,6)}`:t>9999?`+${vn(t,6)}`:vn(t,4)}function vn(t,e){return`${t}`.padStart(e,"0")}var Ev=/^(?:[-+]\d{2})?\d{4}(?:-\d{2}(?:-\d{2})?)?(?:T\d{2}:\d{2}(?::\d{2}(?:\.\d{3})?)?(?:Z|[-+]\d{2}:?\d{2})?)?$/;function sa(t,e){return Ev.test(t+="")?new Date(t):typeof e=="function"?e(t):e}var Sc=1e3,md=Sc*60,hd=md*60,da=hd*24,Iv=da*7,cg=da*30,kv=da*365,la=[["millisecond",.5*Sc],["second",Sc],["second",30*Sc],["minute",md],["minute",30*md],["hour",hd],["hour",12*hd],["day",da],["day",2*da],["week",Iv],["month",cg],["month",3*cg],["year",kv]],Dv=new Map([["second",Vt],["minute",Pn],["hour",Fn],["day",De],["week",ce],["month",Bn],["year",jt],["monday",Yn],["tuesday",Vf],["wednesday",jf],["thursday",tn],["friday",Zf],["saturday",Kf],["sunday",ce]]),Nv=new Map([["second",Vt],["minute",On],["hour",qn],["day",fo],["week",se],["month",Un],["year",Zt],["monday",zn],["tuesday",Qf],["wednesday",Jf],["thursday",en],["friday",tu],["saturday",eu],["sunday",se]]);function sg(t,e){let n=`${t}`.toLowerCase();n.endsWith("s")&&(n=n.slice(0,-1));let r=1,o=/^(?:(\d+)\s+)/.exec(n);switch(o&&(n=n.slice(o[0].length),r=+o[1]),n){case"quarter":n="month",r*=3;break;case"half":n="month",r*=6;break}let i=e.get(n);if(!i)throw new Error(`unknown interval: ${t}`);if(!(r>1))return i;if(!i.every)throw new Error(`non-periodic interval: ${n}`);return i.every(r)}function lg(t){return sg(t,Dv)}function Tc(t){return sg(t,Nv)}function dg(t){if(!t)return!1;let e=t.floor(new Date(Date.UTC(2e3,11,31)));return Zt(e)>=e}function pg(t){if(!t)return!1;let e=t.floor(new Date(2e3,11,31));return jt(e)>=e}function mg(t,e,n,r){let o=t.type==="time"?Xn:wn,i=r==="left"||r==="right"?(a,f)=>`
 ${a}
 ${f}`:r==="top"?(a,f)=>`${f}
 ${a}`:(a,f)=>`${a}
-${f}`;switch(Rv(t,e,n)){case"millisecond":return Sr(o(".%L"),o(":%M:%S"),i);case"second":return Sr(o(":%S"),o("%-I:%M"),i);case"minute":return Sr(o("%-I:%M"),o("%p"),i);case"hour":return Sr(o("%-I %p"),o("%b %-d"),i);case"day":return Sr(o("%-d"),o("%b"),i);case"week":return Sr(o("%-d"),o("%b"),i);case"month":return Sr(o("%b"),o("%Y"),i);case"year":return o("%Y")}throw new Error("unable to format time ticks")}function Rv(t,e,n){let r=ln(Wa(e,(u,c)=>Math.abs(c-u)||NaN));if(r>0)return la[Fe(([,u])=>u).right(la,r,1,la.length)-1][0];let[o,i]=Ct(t.domain()),a=typeof n=="number"?n:10,f=Math.abs(i-o)/a;return la[Fe(([,u])=>Math.log(u)).center(la,Math.log(f))][0]}function Sr(t,e,n){return(r,o,i)=>{let a=t(r,o),f=e(r,o),u=o-Mn(i);return o!==u&&i[u]!==void 0&&f===e(i[u],u)?a:n(a,f)}}var pa=Object.getPrototypeOf(Uint8Array),Lv=Object.prototype.toString;function gt(t,e,n){let r=typeof e;return r==="string"?gg(t,xd(e),n):r==="function"?gg(t,e,n):r==="number"||e instanceof Date||r==="boolean"?pt(t,Hn(e),n):typeof e?.transform=="function"?xg(e.transform(t),n):xg(e,n)}function gg(t,e,n){return pt(t,n?.prototype instanceof pa?Pv(e):e,n)}function xg(t,e){return e===void 0?kt(t):t instanceof e?t:e.prototype instanceof pa&&!(t instanceof pa)?e.from(t,yd):e.from(t)}function Pv(t){return(e,n)=>yd(t(e,n))}var go=[null],xd=t=>e=>e[t],_c={transform:ne},wt={transform:t=>t};var yg=()=>1,bg=()=>!0,Et=t=>t==null?t:`${t}`,ct=t=>t==null?t:+t;var ma=t=>t?t[0]:void 0,Cc=t=>t?t[1]:void 0;var Hn=t=>()=>t;function wg(t){let e=+`${t}`.slice(1)/100;return(n,r)=>ye(n,e,r)}function Tr(t){return t instanceof pa?t:pt(t,yd,Float64Array)}function yd(t){return t==null?NaN:Number(t)}function vg(t){return pt(t,bd)}function bd(t){return t instanceof Date&&!isNaN(t)?t:typeof t=="string"?sa(t):t==null||isNaN(t=+t)?void 0:new Date(t)}function ie(t,e){return t===void 0&&(t=e),t===null?[void 0,"none"]:wo(t)?[void 0,t]:[t,void 0]}function It(t,e){return t===void 0&&(t=e),t===null||typeof t=="number"?[void 0,t]:[t,void 0]}function _r(t,e,n){if(t!=null)return le(t,e,n)}function le(t,e,n){let r=`${t}`.toLowerCase();if(!n.includes(r))throw new Error(`invalid ${e}: ${t}`);return r}function kt(t){return t==null||t instanceof Array||t instanceof pa?t:Array.from(t)}function pt(t,e,n=Array){return t==null?t:t instanceof n?t.map(e):n.from(t,e)}function ha(t,e=Array){return t instanceof e?t.slice():e.from(t)}function Mg({x:t,x1:e,x2:n}){return t!==void 0||e!==void 0||n!==void 0}function wd({y:t,y1:e,y2:n}){return t!==void 0||e!==void 0||n!==void 0}function Sg(t){return Mg(t)||wd(t)||t.interval!==void 0}function Sn(t){return t?.toString===Lv}function xo(t){return Sn(t)&&(t.type!==void 0||t.domain!==void 0)}function ga(t){return Sn(t)&&typeof t.transform!="function"}function Cr(t){return ga(t)&&t.value===void 0&&t.channel===void 0}function Tg(t,e,n,r=wt){return e===void 0&&n===void 0?(e=0,n=t===void 0?r:t):e===void 0?e=t===void 0?0:t:n===void 0&&(n=t===void 0?0:t),[e,n]}function Ar(t,e){return t===void 0&&e===void 0?[ma,Cc]:[t,e]}function _g({z:t,fill:e,stroke:n}={}){return t===void 0&&([t]=ie(e)),t===void 0&&([t]=ie(n)),t}function ne(t){let e=t.length,n=new Uint32Array(e);for(let r=0;r<e;++r)n[r]=r;return n}function vd(t,e){return pt(e,n=>t[n])}function Cg(t,e,n){return t.subarray?t.subarray(e,n):t.slice(e,n)}function yo(t){return t!==null&&typeof t=="object"?t.valueOf():t}function Ag(t,e){if(e[t]!==void 0)return e[t];switch(t){case"x1":case"x2":t="x";break;case"y1":case"y2":t="y";break}return e[t]}function bo(t){let e;return[{transform:()=>e,label:Re(t)},n=>e=n]}function Te(t){return t==null?[t]:bo(t)}function Re(t,e){return typeof t=="string"?t:t&&t.label!==void 0?t.label:e}function xa(t,e){return{transform(n){let r=t.transform(n),o=e.transform(n);return zt(r)||zt(o)?pt(r,(i,a)=>new Date((+r[a]+ +o[a])/2)):pt(r,(i,a)=>(+r[a]+ +o[a])/2,Float64Array)},label:t.label}}function ya(t,e){let n=Md(e?.interval,e?.type);return n?pt(t,n):t}function Md(t,e){let n=Ac(t,e);return n&&(r=>Ne(r)?n.floor(r):r)}function Ac(t,e){if(t!=null){if(typeof t=="number"){0<t&&t<1&&Number.isInteger(1/t)&&(t=-1/t);let n=Math.abs(t);return t<0?{floor:r=>Math.floor(r*n)/n,offset:r=>(r*n+1)/n,range:(r,o)=>er(Math.ceil(r*n),o*n).map(i=>i/n)}:{floor:r=>Math.floor(r/n)*n,offset:r=>r+n,range:(r,o)=>er(Math.ceil(r/n),o/n).map(i=>i*n)}}if(typeof t=="string")return(e==="time"?dg:Tc)(t);if(typeof t.floor!="function")throw new Error("invalid interval; missing floor method");if(typeof t.offset!="function")throw new Error("invalid interval; missing offset method");return t}}function nn(t,e){if(t=Ac(t,e),t&&typeof t.range!="function")throw new Error("invalid interval: missing range method");return t}function $g(t,e){if(t=nn(t,e),t&&typeof t.ceil!="function")throw new Error("invalid interval: missing ceil method");return t}function rn(t){return t===void 0||ga(t)?t:{value:t}}function Eg(t){return t==null?null:{transform:e=>gt(e,t,Float64Array),label:Re(t)}}function re(t){return t&&typeof t[Symbol.iterator]=="function"}function $c(t){for(let e of t)if(e!=null)return typeof e!="object"||e instanceof Date}function Sd(t){for(let e of t){if(e==null)continue;let n=typeof e;return n==="string"||n==="boolean"}}function zt(t){for(let e of t)if(e!=null)return e instanceof Date}function Ig(t){for(let e of t)if(e!=null)return typeof e=="string"&&isNaN(e)&&sa(e)}function kg(t){for(let e of t)if(e!=null){if(typeof e!="string")return!1;if(e.trim())return!isNaN(e)}}function Dg(t){for(let e of t)if(e!=null)return typeof e=="number"}function Ec(t,e){let n;for(let r of t)if(r!=null){if(!e(r))return!1;n=!0}return n}function wo(t){return typeof t!="string"?!1:(t=t.toLowerCase().trim(),t==="none"||t==="currentcolor"||t.startsWith("url(")&&t.endsWith(")")||t.startsWith("var(")&&t.endsWith(")")||ue(t)!==null)}function Ng(t){return typeof t=="number"&&(0<=t&&t<=1||isNaN(t))}function Pt(t){return t==null||$r(t)}function $r(t){return/^\s*none\s*$/i.test(t)}function Rg(t){return/^\s*round\s*$/i.test(t)}function Td(t,e){return _r(t,e,["middle","top-left","top","top-right","right","bottom-right","bottom","bottom-left","left"])}function vo(t="middle"){return Td(t,"frameAnchor")}function Mn(t){if(t==null)return;let e=t[0],n=t[t.length-1];return xe(e,n)}function Lg(t={},...e){let n=t;for(let r of e)for(let o in r)if(n[o]===void 0){let i=r[o];n===t?n={...n,[o]:i}:n[o]=i}return n}function Ov(t){console.warn("named iterables are deprecated; please use an object instead");let e=new Set;return Object.fromEntries(Array.from(t,n=>{let{name:r}=n;if(r==null)throw new Error("missing name");let o=`${r}`;if(o==="__proto__")throw new Error(`illegal name: ${o}`);if(e.has(o))throw new Error(`duplicate name: ${o}`);return e.add(o),[r,n]}))}function _d(t){return re(t)?Ov(t):t}var de=Symbol("position"),pe=Symbol("color"),Mo=Symbol("radius"),So=Symbol("length"),To=Symbol("opacity"),_o=Symbol("symbol"),Fv=Symbol("projection"),st=new Map([["x",de],["y",de],["fx",de],["fy",de],["r",Mo],["color",pe],["opacity",To],["symbol",_o],["length",So],["projection",Fv]]);var qv=Math.sqrt(3),Yv=2/qv,zv={draw(t,e){let n=Math.sqrt(e/Math.PI),r=n*Yv,o=r/2;t.moveTo(0,r),t.lineTo(n,o),t.lineTo(n,-o),t.lineTo(0,-r),t.lineTo(-n,-o),t.lineTo(-n,o),t.closePath()}},Pg=new Map([["asterisk",Qi],["circle",mo],["cross",Ji],["diamond",ta],["diamond2",ea],["hexagon",zv],["plus",na],["square",ra],["square2",oa],["star",ia],["times",ho],["triangle",aa],["triangle2",fa],["wye",ua]]);function Og(t){return t&&typeof t.draw=="function"}function Fg(t){return Og(t)?!0:typeof t!="string"?!1:Pg.has(t.toLowerCase())}function Co(t){if(t==null||Og(t))return t;let e=Pg.get(`${t}`.toLowerCase());if(e)return e;throw new Error(`invalid symbol: ${t}`)}function Ao({filter:t,sort:e,reverse:n,transform:r,initializer:o,...i}={},a){if(r===void 0&&(t!=null&&(r=qg(t)),e!=null&&!Cr(e)&&(r=Cd(r,zg(e))),n&&(r=Cd(r,Yg))),a!=null&&o!=null)throw new Error("transforms cannot be applied after initializers");return{...i,...(e===null||Cr(e))&&{sort:e},transform:Cd(r,a)}}function Er({filter:t,sort:e,reverse:n,initializer:r,...o}={},i){return r===void 0&&(t!=null&&(r=qg(t)),e!=null&&!Cr(e)&&(r=Ad(r,zg(e))),n&&(r=Ad(r,Yg))),{...o,...(e===null||Cr(e))&&{sort:e},initializer:Ad(r,i)}}function Cd(t,e){return t==null?e===null?void 0:e:e==null?t===null?void 0:t:function(n,r,o){return{data:n,facets:r}=t.call(this,n,r,o),e.call(this,kt(n),r,o)}}function Ad(t,e){return t==null?e===null?void 0:e:e==null?t===null?void 0:t:function(n,r,o,...i){let a,f,u,c,s,d;return{data:f=n,facets:u=r,channels:a}=t.call(this,n,r,o,...i),{data:s=f,facets:d=u,channels:c}=e.call(this,f,u,{...o,...a},...i),{data:s,facets:d,channels:{...a,...c}}}}function qg(t){return(e,n)=>{let r=gt(e,t);return{data:e,facets:n.map(o=>o.filter(i=>r[i]))}}}function Yg(t,e){return{data:t,facets:e.map(n=>n.slice().reverse())}}function zg(t){return(typeof t=="function"&&t.length!==1?Bv:Uv)(t)}function Bv(t){return(e,n)=>{let r=(o,i)=>t(e[o],e[i]);return{data:e,facets:n.map(o=>o.slice().sort(r))}}}function Uv(t){let e,n;({channel:e,value:t,order:n}={...rn(t)});let r=e?.startsWith("-");if(r&&(e=e.slice(1)),n===void 0&&(n=r?Mr:Kt),typeof n!="function")switch(`${n}`.toLowerCase()){case"ascending":n=Kt;break;case"descending":n=Mr;break;default:throw new Error(`invalid order: ${n}`)}return(o,i,a)=>{let f;if(e===void 0)f=gt(o,t);else{if(a===void 0)throw new Error("channel sort requires an initializer");if(f=a[e],!f)return{};f=f.value}let u=(c,s)=>n(f[c],f[s]);return{data:o,facets:i.map(c=>c.slice().sort(u))}}}function wa(t,...e){for(let{name:n}of t)if(e.includes(n))return!0;return!1}function Xg(t,e,n=$d){let r=Object.entries(t);return e.title!=null&&t.title===void 0&&r.push(["title",Vv]),e.href!=null&&t.href===void 0&&r.push(["href",Dd]),r.filter(([,o])=>o!==void 0).map(([o,i])=>i===null?Xv(o):n(o,i,e))}function $d(t,e,n,r=Ed){let o;Sn(e)&&"reduce"in e&&(o=e.scale,e=e.reduce);let i=r(t,e,n),[a,f]=bo(i.label),u;return{name:t,output:o===void 0?a:{value:a,scale:o},initialize(c){i.initialize(c),u=f([])},scope(c,s){i.scope(c,s)},reduce(c,s){u.push(i.reduce(c,s))}}}function Xv(t){return{name:t,initialize(){},scope(){},reduce(){}}}function Ed(t,e,n,r=va){let o=Ag(t,n),i=r(e,o),a,f;return{label:Re(i===ba?null:o,i.label),initialize(u){a=o===void 0?u:gt(u,o),i.scope==="data"&&(f=i.reduceIndex(ne(u),a))},scope(u,c){i.scope===u&&(f=i.reduceIndex(c,a))},reduce(u,c){return i.scope==null?i.reduceIndex(u,a,c):i.reduceIndex(u,a,f,c)}}}function Id(t,e){return e?qe(sn(t,n=>e[n]),ma):[[,t]]}function va(t,e,n=Wv){if(t==null)return n(t);if(typeof t.reduceIndex=="function")return t;if(typeof t.reduce=="function"&&Sn(t))return Hv(t);if(typeof t=="function")return Gv(t);if(/^p\d{2}$/i.test(t))return Tn(wg(t));switch(`${t}`.toLowerCase()){case"first":return Dd;case"last":return jv;case"identity":return kd;case"count":return ba;case"distinct":return Zv;case"sum":return e==null?ba:Kv;case"proportion":return Ug(e,"data");case"proportion-facet":return Ug(e,"facet");case"deviation":return Tn(Rr);case"min":return Tn(Jt);case"min-index":return Tn(Ya);case"max":return Tn(Wt);case"max-index":return Tn(qa);case"mean":return Bg(Ua);case"median":return Bg(ln);case"variance":return Tn(Nr);case"mode":return Tn(Xa)}return n(t)}function Wv(t){throw new Error(`invalid reduce: ${t}`)}function Wg(t,e){for(let n in e){let r=e[n];if(r!==void 0&&!t.some(o=>o.name===n))return r}}function Hg(t,e,n){if(e){let r=e.output.transform(),o=(i,a)=>Kt(r[i],r[a]);t.forEach(i=>i.sort(o))}n&&t.forEach(r=>r.reverse())}function Hv(t){return console.warn("deprecated reduce interface; implement reduceIndex instead."),{...t,reduceIndex:t.reduce.bind(t)}}function Gv(t){return{reduceIndex(e,n,r){return t(vd(n,e),r)}}}function Tn(t){return{reduceIndex(e,n){return t(e,r=>n[r])}}}function Bg(t){return{reduceIndex(e,n){let r=t(e,o=>n[o]);return zt(n)?new Date(r):r}}}var kd={reduceIndex(t,e){return vd(e,t)}},Dd={reduceIndex(t,e){return e[t[0]]}},Vv={reduceIndex(t,e){let r=qe(Ce(t,i=>i.length,i=>e[i]),Cc),o=r.slice(-5).reverse();if(o.length<r.length){let i=r.slice(0,-4);o[5-1]=[`\u2026 ${i.length.toLocaleString("en-US")} more`,fe(i,Cc)]}return o.map(([i,a])=>`${i} (${a.toLocaleString("en-US")})`).join(`
-`)}},jv={reduceIndex(t,e){return e[t[t.length-1]]}},ba={label:"Frequency",reduceIndex(t){return t.length}},Zv={label:"Distinct",reduceIndex(t,e){let n=new cn;for(let r of t)n.add(e[r]);return n.size}},Kv=Tn(fe);function Ug(t,e){return t==null?{scope:e,label:"Frequency",reduceIndex:(n,r,o=1)=>n.length/o}:{scope:e,reduceIndex:(n,r,o=1)=>fe(n,i=>r[i])/o}}function $o(t,{scale:e,type:n,value:r,filter:o,hint:i},a){return i===void 0&&typeof r?.transform=="function"&&(i=r.hint),Rd(a,{scale:e,type:n,value:gt(t,r),label:Re(r),filter:o,hint:i})}function Vg(t,e){return Object.fromEntries(Object.entries(t).map(([n,r])=>[n,$o(e,r,n)]))}function jg(t,e){let n=Object.fromEntries(Object.entries(t).map(([r,{scale:o,value:i}])=>{let a=o==null?null:e[o];return[r,a==null?i:pt(i,a)]}));return n.channels=t,n}function Rd(t,e){let{scale:n,value:r}=e;if(n===!0||n==="auto")switch(t){case"fill":case"stroke":case"color":e.scale=n!==!0&&Ec(r,wo)?null:"color";break;case"fillOpacity":case"strokeOpacity":case"opacity":e.scale=n!==!0&&Ec(r,Ng)?null:"opacity";break;case"symbol":n!==!0&&Ec(r,Fg)?(e.scale=null,e.value=pt(r,Co)):e.scale="symbol";break;default:e.scale=st.has(t)?t:null;break}else if(n===!1)e.scale=null;else if(n!=null&&!st.has(n))throw new Error(`unknown scale: ${n}`);return e}function Zg(t,e,n,r,o){let{order:i,reverse:a,reduce:f=!0,limit:u}=o;for(let c in o){if(!st.has(c))continue;let{value:s,order:d=i,reverse:l=a,reduce:p=f,limit:m=u}=rn(o[c]),h=s?.startsWith("-");if(h&&(s=s.slice(1)),d=d===void 0?h!==(s==="width"||s==="height")?Qg:Kg:t8(d),p==null||p===!1)continue;let g=c==="fx"||c==="fy"?Jv(e,r[c]):Qv(n,c);if(!g)throw new Error(`missing channel for scale: ${c}`);let b=g.value,[x=0,M=1/0]=re(m)?m:m<0?[m]:[0,m];if(s==null)g.domain=()=>{let y=Array.from(new cn(b));return l&&(y=y.reverse()),(x!==0||M!==1/0)&&(y=y.slice(x,M)),y};else{let y=s==="data"?t:s==="height"?Gg(n,"y1","y2"):s==="width"?Gg(n,"x1","x2"):Nd(n,s,s==="y"?"y2":s==="x"?"x2":void 0),w=va(p===!0?"max":p,y);g.domain=()=>{let v=is(ne(b),T=>w.reduceIndex(T,y),T=>b[T]);return d&&v.sort(d),l&&v.reverse(),(x!==0||M!==1/0)&&(v=v.slice(x,M)),v.map(ma)}}}}function Qv(t,e){for(let n in t){let r=t[n];if(r.scale===e)return r}}function Jv(t,e){let n=t.original;if(n===t)return e;let r=e.value,o=e.value=[];for(let i=0;i<n.length;++i){let a=r[n[i][0]];for(let f of t[i])o[f]=a}return e}function Gg(t,e,n){let r=Nd(t,e),o=Nd(t,n);return pt(o,(i,a)=>Math.abs(i-r[a]),Float64Array)}function Nd(t,e,n){let r=t[e];if(!r&&n!==void 0&&(r=t[n]),r)return r.value;throw new Error(`missing channel: ${e}`)}function t8(t){if(t==null||typeof t=="function")return t;switch(`${t}`.toLowerCase()){case"ascending":return Kg;case"descending":return Qg}throw new Error(`invalid order: ${t}`)}function Kg([t,e],[n,r]){return Kt(e,r)||Kt(t,n)}function Qg([t,e],[n,r]){return Mr(e,r)||Kt(t,n)}function Jg(t,e){let n=t[e];if(n){for(;n.source;)n=n.source;return n.source===null?null:n}}function Eo(t={}){let{document:e=typeof window<"u"?window.document:void 0}=t;return{document:e}}function yt(t,{document:e}){return hn(pn(t).call(e.documentElement))}var Ld=0;function t1(){let t=Ld;return Ld=0,t}function on(t){console.warn(t),++Ld}var n1=Math.PI,_n=2*n1,e1=.618;function r1({projection:t,inset:e=0,insetTop:n=e,insetRight:r=e,insetBottom:o=e,insetLeft:i=e}={},a){if(t==null)return;if(typeof t.stream=="function")return t;let f,u,c="frame";if(Sn(t)){let w;if({type:t,domain:u,inset:w,insetTop:n=w!==void 0?w:n,insetRight:r=w!==void 0?w:r,insetBottom:o=w!==void 0?w:o,insetLeft:i=w!==void 0?w:i,clip:c=c,...f}=t,t==null)return}typeof t!="function"&&({type:t}=o1(t));let{width:s,height:d,marginLeft:l,marginRight:p,marginTop:m,marginBottom:h}=a,g=s-l-p-i-r,b=d-m-h-n-o;if(t=t?.({width:g,height:b,clip:c,...f}),t==null)return;c=e8(c,l,m,s-p,d-h);let x=l+i,M=m+n,y;if(u!=null){let[[w,v],[T,E]]=Si(t).bounds(u),I=Math.min(g/(T-w),b/(E-v));I>0?(x-=(I*(w+T)-g)/2,M-=(I*(v+E)-b)/2,y=Ti({point(D,_){this.stream.point(D*I+x,_*I+M)}})):on("Warning: the projection could not be fit to the specified domain; using the default scale.")}return y??=x===0&&M===0?i1():Ti({point(w,v){this.stream.point(w+x,v+M)}}),{stream:w=>t.stream(y.stream(c(w)))}}function o1(t){switch(`${t}`.toLowerCase()){case"albers-usa":return Le(gl,.7463,.4673);case"albers":return Ic(Ci,.7463,.4673);case"azimuthal-equal-area":return Le(yl,4,4);case"azimuthal-equidistant":return Le(wl,_n,_n);case"conic-conformal":return Ic(Sl,_n,_n);case"conic-equal-area":return Ic(Rn,6.1702,2.9781);case"conic-equidistant":return Ic(_l,7.312,3.6282);case"equal-earth":return Le(Al,5.4133,2.6347);case"equirectangular":return Le(Tl,_n,n1);case"gnomonic":return Le(El,3.4641,3.4641);case"identity":return{type:i1};case"reflect-y":return{type:n8};case"mercator":return Le(vl,_n,_n);case"orthographic":return Le(kl,2,2);case"stereographic":return Le(Nl,2,2);case"transverse-mercator":return Le(Ll,_n,_n);default:throw new Error(`unknown projection type: ${t}`)}}function e8(t,e,n,r,o){if(t===!1||t==null||typeof t=="number")return i=>i;switch(t===!0&&(t="frame"),`${t}`.toLowerCase()){case"frame":return Kr(e,n,r,o);default:throw new Error(`unknown projection clip type: ${t}`)}}function Le(t,e,n){return{type:({width:r,height:o,rotate:i,precision:a=.15,clip:f})=>{let u=t();return a!=null&&u.precision?.(a),i!=null&&u.rotate?.(i),typeof f=="number"&&u.clipAngle?.(f),u.scale(Math.min(r/e,o/n)),u.translate([r/2,o/2]),u},aspectRatio:n/e}}function Ic(t,e,n){let{type:r,aspectRatio:o}=Le(t,e,n);return{type:i=>{let{parallels:a,domain:f,width:u,height:c}=i,s=r(i);return a!=null&&(s.parallels(a),f===void 0&&s.fitSize([u,c],{type:"Sphere"})),s},aspectRatio:o}}var i1=Hn({stream:t=>t}),n8=Hn(Ti({point(t,e){this.stream.point(t,-e)}}));function a1(t,e,n,r){let o=n[t],i=n[e],a=o.length,f=n[t]=new Float64Array(a).fill(NaN),u=n[e]=new Float64Array(a).fill(NaN),c,s=r.stream({point(d,l){f[c]=d,u[c]=l}});for(c=0;c<a;++c)s.point(o[c],i[c])}function f1({projection:t}={}){return t==null?!1:typeof t.stream=="function"?!0:(Sn(t)&&(t=t.type),t!=null)}function u1(t){if(typeof t?.stream=="function")return e1;if(Sn(t)&&(t=t.type),t!=null){if(typeof t!="function"){let{aspectRatio:e}=o1(t);if(e)return e}return e1}}function c1(t){let e=[],n=[],r={scale:"x",value:e},o={scale:"y",value:n},i={point(a,f){e.push(a),n.push(f)},lineStart(){},lineEnd(){},polygonStart(){},polygonEnd(){},sphere(){}};for(let a of t.value)Ie(a,i);return[r,o]}var m1=new Map([["accent",Jl],["category10",Ql],["dark2",td],["paired",ed],["pastel1",nd],["pastel2",rd],["set1",od],["set2",id],["set3",ad],["tableau10",fd]]);function h1(t){return t!=null&&m1.has(`${t}`.toLowerCase())}var s1=new Map([...m1,["brbg",Cn(cu,su)],["prgn",Cn(lu,du)],["piyg",Cn(pu,mu)],["puor",Cn(hu,gu)],["rdbu",Cn(ji,co)],["rdgy",Cn(xu,yu)],["rdylbu",Cn(Zi,so)],["rdylgn",Cn(bu,wu)],["spectral",Cn(vu,Mu)],["burd",l1(ji,co)],["buylrd",l1(Zi,so)],["blues",Ot(Gu,Vu)],["greens",Ot(ju,Zu)],["greys",Ot(Ku,Qu)],["oranges",Ot(rc,oc)],["purples",Ot(Ju,tc)],["reds",Ot(ec,nc)],["turbo",An(pc)],["viridis",An(hc)],["magma",An(gc)],["inferno",An(xc)],["plasma",An(yc)],["cividis",An(ic)],["cubehelix",An(ac)],["warm",An(uc)],["cool",An(cc)],["bugn",Ot(Su,Tu)],["bupu",Ot(_u,Cu)],["gnbu",Ot(Au,$u)],["orrd",Ot(Eu,Iu)],["pubu",Ot(Nu,Ru)],["pubugn",Ot(ku,Du)],["purd",Ot(Lu,Pu)],["rdpu",Ot(Ou,Fu)],["ylgn",Ot(zu,Bu)],["ylgnbu",Ot(qu,Yu)],["ylorbr",Ot(Uu,Xu)],["ylorrd",Ot(Wu,Hu)],["rainbow",d1(sc)],["sinebow",d1(dc)]]);function Ot(t,e){return({length:n})=>n===1?[t[3][1]]:n===2?[t[3][1],t[3][2]]:(n=Math.max(3,Math.floor(n)),n>9?Ht(e,n):t[n])}function Cn(t,e){return({length:n})=>n===2?[t[3][0],t[3][2]]:(n=Math.max(3,Math.floor(n)),n>11?Ht(e,n):t[n])}function l1(t,e){return({length:n})=>n===2?[t[3][2],t[3][0]]:(n=Math.max(3,Math.floor(n)),n>11?Ht(r=>e(1-r),n):t[n].slice().reverse())}function An(t){return({length:e})=>Ht(t,Math.max(2,Math.floor(e)))}function d1(t){return({length:e})=>Ht(t,Math.floor(e)+1).slice(0,-1)}function Pd(t){let e=`${t}`.toLowerCase();if(!s1.has(e))throw new Error(`unknown ordinal scheme: ${e}`);return s1.get(e)}function Ma(t,e){let n=Pd(t),r=typeof n=="function"?n({length:e}):n;return r.length!==e?r.slice(0,e):r}function g1(t,e="greys"){let n=new Set,[r,o]=Ma(e,2);for(let i of t)if(i!=null)if(i===!0)n.add(o);else if(i===!1)n.add(r);else return;return[...n]}var p1=new Map([["brbg",su],["prgn",du],["piyg",mu],["puor",gu],["rdbu",co],["rdgy",yu],["rdylbu",so],["rdylgn",wu],["spectral",Mu],["burd",t=>co(1-t)],["buylrd",t=>so(1-t)],["blues",Vu],["greens",Zu],["greys",Qu],["purples",tc],["reds",nc],["oranges",oc],["turbo",pc],["viridis",hc],["magma",gc],["inferno",xc],["plasma",yc],["cividis",ic],["cubehelix",ac],["warm",uc],["cool",cc],["bugn",Tu],["bupu",Cu],["gnbu",$u],["orrd",Iu],["pubugn",Du],["pubu",Ru],["purd",Pu],["rdpu",Fu],["ylgnbu",Yu],["ylgn",Bu],["ylorbr",Xu],["ylorrd",Hu],["rainbow",sc],["sinebow",dc]]);function Io(t){let e=`${t}`.toLowerCase();if(!p1.has(e))throw new Error(`unknown quantitative scheme: ${e}`);return p1.get(e)}var r8=new Set(["brbg","prgn","piyg","puor","rdbu","rdgy","rdylbu","rdylgn","spectral","burd","buylrd"]);function x1(t){return t!=null&&r8.has(`${t}`.toLowerCase())}var Fd=t=>e=>t(1-e),Od=[0,1],y1=new Map([["number",ht],["rgb",we],["hsl",Ns],["hcl",Rs],["lab",uf]]);function qd(t){let e=`${t}`.toLowerCase();if(!y1.has(e))throw new Error(`unknown interpolator: ${e}`);return y1.get(e)}function Do(t,e,n,{type:r,nice:o,clamp:i,zero:a,domain:f=C1(t,n),unknown:u,round:c,scheme:s,interval:d,range:l=st.get(t)===Mo?f8(n,f):st.get(t)===So?u8(n,f):st.get(t)===To?Od:void 0,interpolate:p=st.get(t)===pe?s==null&&l!==void 0?we:Io(s!==void 0?s:r==="cyclical"?"rainbow":"turbo"):c?fr:ht,reverse:m}){if(d=nn(d,r),(r==="cyclical"||r==="sequential")&&(r="linear"),typeof p!="function"&&(p=qd(p)),m=!!m,l!==void 0){let h=(f=kt(f)).length,g=(l=kt(l)).length;if(h!==g){if(p.length===1)throw new Error("invalid piecewise interpolator");p=Xe(p,l),l=void 0}}if(p.length===1?(m&&(p=Fd(p),m=!1),l===void 0&&(l=Float64Array.from(f,(h,g)=>g/(f.length-1)),l.length===2&&(l=Od)),e.interpolate((l===Od?Hn:Sa)(p))):e.interpolate(p),a){let[h,g]=Ct(f);(h>0||g<0)&&(f=ha(f),Mn(f)!==Math.sign(h)?f[f.length-1]=0:f[0]=0)}return m&&(f=$n(f)),e.domain(f).unknown(u),o&&(e.nice(o8(o,r)),f=e.domain()),l!==void 0&&e.range(l),i&&e.clamp(i),{type:r,domain:f,range:l,scale:e,interpolate:p,interval:d}}function o8(t,e){return t===!0?void 0:typeof t=="number"?t:$g(t,e)}function b1(t,e,n){return Do(t,hr(),e,n)}function w1(t,e,n){return Yd(t,e,{...n,exponent:.5})}function Yd(t,e,{exponent:n=1,...r}){return Do(t,Fi().exponent(n),e,{...r,type:"pow"})}function v1(t,e,{base:n=10,domain:r=c8(e),...o}){return Do(t,Pi().base(n),e,{...o,domain:r})}function M1(t,e,{constant:n=1,...r}){return Do(t,Oi().constant(n),e,r)}function S1(t,e,{range:n,quantiles:r=n===void 0?5:(n=[...n]).length,n:o=r,scheme:i="rdylbu",domain:a=s8(e),unknown:f,interpolate:u,reverse:c}){return n===void 0&&(n=u!==void 0?Ht(u,o):st.get(t)===pe?Ma(i,o):void 0),a.length>0&&(a=qi(a,n===void 0?{length:o}:n).quantiles()),kc(t,e,{domain:a,range:n,reverse:c,unknown:f})}function T1(t,e,{range:n,n:r=n===void 0?5:(n=[...n]).length,scheme:o="rdylbu",domain:i=C1(t,e),unknown:a,interpolate:f,reverse:u}){let[c,s]=Ct(i),d;return n===void 0?(d=Ae(c,s,r),d[0]<=c&&d.splice(0,1),d[d.length-1]>=s&&d.pop(),r=d.length+1,n=f!==void 0?Ht(f,r):st.get(t)===pe?Ma(o,r):void 0):(d=Ht(ht(c,s),r+1).slice(1,-1),c instanceof Date&&(d=d.map(l=>new Date(l)))),Mn(kt(i))<0&&d.reverse(),kc(t,e,{domain:d,range:n,reverse:u,unknown:a})}function kc(t,e,{domain:n=[0],unknown:r,scheme:o="rdylbu",interpolate:i,range:a=i!==void 0?Ht(i,n.length+1):st.get(t)===pe?Ma(o,n.length+1):void 0,reverse:f}){n=kt(n);let u=Mn(n);if(!isNaN(u)&&!i8(n,u))throw new Error(`the ${t} scale has a non-monotonic domain`);return f&&(a=$n(a)),{type:"threshold",scale:Yi(u<0?$n(n):n,a===void 0?[]:a).unknown(r),domain:n,range:a}}function i8(t,e){for(let n=1,r=t.length,o=t[0];n<r;++n){let i=xe(o,o=t[n]);if(i!==0&&i!==e)return!1}return!0}function _1(){return{type:"identity",scale:Ri()}}function ko(t,e=md){return t.length?[Jt(t,({value:n})=>n===void 0?n:Jt(n,e)),Wt(t,({value:n})=>n===void 0?n:Wt(n,e))]:[0,1]}function C1(t,e){let n=st.get(t);return(n===Mo||n===To||n===So?a8:ko)(e)}function a8(t){return[0,t.length?Wt(t,({value:e})=>e===void 0?e:Wt(e,md)):1]}function f8(t,e){let n=t.find(({radius:a})=>a!==void 0);if(n!==void 0)return[0,n.radius];let r=ye(t,.5,({value:a})=>a===void 0?NaN:ye(a,.25,ca)),o=e.map(a=>3*Math.sqrt(a/r)),i=30/Wt(o);return i<1?o.map(a=>a*i):o}function u8(t,e){let n=ln(t,({value:i})=>i===void 0?NaN:ln(i,Math.abs)),r=e.map(i=>12*i/n),o=60/Wt(r);return o<1?r.map(i=>i*o):r}function c8(t){for(let{value:e}of t)if(e!==void 0)for(let n of e){if(n>0)return ko(t,ca);if(n<0)return ko(t,vc)}return[1,10]}function s8(t){let e=[];for(let{value:n}of t)if(n!==void 0)for(let r of n)e.push(r);return e}function Sa(t){return(e,n)=>r=>t(e+r*(n-e))}function Dc(t,e,n,r,{type:o,nice:i,clamp:a,domain:f=ko(r),unknown:u,pivot:c=0,scheme:s,range:d,symmetric:l=!0,interpolate:p=st.get(t)===pe?s==null&&d!==void 0?we:Io(s!==void 0?s:"rdbu"):ht,reverse:m}){c=+c,f=kt(f);let[h,g]=f;if(f.length>2&&on(`Warning: the diverging ${t} scale domain contains extra elements.`),xe(h,g)<0&&([h,g]=[g,h],m=!m),h=Math.min(h,c),g=Math.max(g,c),typeof p!="function"&&(p=qd(p)),d!==void 0&&(p=p.length===1?Sa(p)(...d):Xe(p,d)),m&&(p=Fd(p)),l){let b=n.apply(c),x=b-n.apply(h),M=n.apply(g)-b;x<M?h=n.invert(b-M):x>M&&(g=n.invert(b+x))}return e.domain([h,c,g]).unknown(u).interpolator(p),a&&e.clamp(a),i&&e.nice(i),{type:o,domain:[h,g],pivot:c,interpolate:p,scale:e}}function A1(t,e,n){return Dc(t,Vi(),l8,e,n)}function $1(t,e,n){return zd(t,e,{...n,exponent:.5})}function zd(t,e,{exponent:n=1,...r}){return Dc(t,uu().exponent(n=+n),m8(n),e,{...r,type:"diverging-pow"})}function E1(t,e,{base:n=10,pivot:r=1,domain:o=ko(e,r<0?vc:ca),...i}){return Dc(t,au().base(n=+n),d8,e,{domain:o,pivot:r,...i})}function I1(t,e,{constant:n=1,...r}){return Dc(t,fu().constant(n=+n),h8(n),e,r)}var l8={apply(t){return t},invert(t){return t}},d8={apply:Math.log,invert:Math.exp},p8={apply(t){return Math.sign(t)*Math.sqrt(Math.abs(t))},invert(t){return Math.sign(t)*(t*t)}};function m8(t){return t===.5?p8:{apply(e){return Math.sign(e)*Math.pow(Math.abs(e),t)},invert(e){return Math.sign(e)*Math.pow(Math.abs(e),1/t)}}}function h8(t){return{apply(e){return Math.sign(e)*Math.log1p(Math.abs(e/t))},invert(e){return Math.sign(e)*Math.expm1(Math.abs(e))*t}}}function k1(t,e,n,r){return Do(t,e,n,r)}function D1(t,e,n){return k1(t,ru(),e,n)}function N1(t,e,n){return k1(t,ou(),e,n)}var No=Symbol("ordinal");function L1(t,e,n,{type:r,interval:o,domain:i,range:a,reverse:f,hint:u}){return o=nn(o,r),i===void 0&&(i=Y1(n,o,t)),(r==="categorical"||r===No)&&(r="ordinal"),f&&(i=$n(i)),e.domain(i),a!==void 0&&(typeof a=="function"&&(a=a(i)),e.range(a)),{type:r,domain:i,range:a,scale:e,hint:u,interval:o}}function P1(t,e,{type:n,interval:r,domain:o,range:i,scheme:a,unknown:f,...u}){r=nn(r,n),o===void 0&&(o=Y1(e,r,t));let c;if(st.get(t)===_o)c=g8(e),i=i===void 0?x8(c):pt(i,Co);else if(st.get(t)===pe&&(i===void 0&&(n==="ordinal"||n===No)&&(i=g1(o,a),i!==void 0&&(a=void 0)),a===void 0&&i===void 0&&(a=n==="ordinal"?"turbo":"tableau10"),a!==void 0))if(i!==void 0){let s=Io(a),d=i[0],l=i[1]-i[0];i=({length:p})=>Ht(m=>s(d+l*m),p)}else i=Pd(a);if(f===Di)throw new Error(`implicit unknown on ${t} scale is not supported`);return L1(t,pr().unknown(f),e,{...u,type:n,domain:o,range:i,hint:c})}function O1(t,e,{align:n=.5,padding:r=.5,...o}){return q1(Pl().align(n).padding(r),e,o,t)}function F1(t,e,{align:n=.5,padding:r=.1,paddingInner:o=r,paddingOuter:i=t==="fx"||t==="fy"?0:r,...a}){return q1(Ln().align(n).paddingInner(o).paddingOuter(i),e,a,t)}function q1(t,e,n,r){let{round:o}=n;return o!==void 0&&t.round(o=!!o),t=L1(r,t,e,n),t.round=o,t}function Y1(t,e,n){let r=new cn;for(let{value:o,domain:i}of t){if(i!==void 0)return i();if(o!==void 0)for(let a of o)r.add(a)}if(e!==void 0){let[o,i]=Ct(r).map(e.floor,e);return e.range(o,e.offset(i))}if(r.size>1e4&&st.get(n)===de)throw new Error(`implicit ordinal domain of ${n} scale has more than 10,000 values`);return qe(r,Kt)}function R1(t,e){let n;for(let{hint:r}of t){let o=r?.[e];if(o!==void 0){if(n===void 0)n=o;else if(n!==o)return}}return n}function g8(t){return{fill:R1(t,"fill"),stroke:R1(t,"stroke")}}function x8(t){return Pt(t.fill)?ld:bc}function Ta(t,{label:e,inset:n=0,insetTop:r=n,insetRight:o=n,insetBottom:i=n,insetLeft:a=n,round:f,nice:u,clamp:c,zero:s,align:d,padding:l,projection:p,facet:{label:m=e}={},...h}={}){let g={};for(let[b,x]of t){let M=h[b],y=w8(b,x,{round:st.get(b)===de?f:void 0,nice:u,clamp:c,zero:s,align:d,padding:l,projection:p,...M});if(y){let{label:w=b==="fx"||b==="fy"?m:e,percent:v,transform:T,inset:E,insetTop:I=E!==void 0?E:b==="y"?r:0,insetRight:D=E!==void 0?E:b==="x"?o:0,insetBottom:_=E!==void 0?E:b==="y"?i:0,insetLeft:L=E!==void 0?E:b==="x"?a:0}=M||{};if(T==null)T=void 0;else if(typeof T!="function")throw new Error("invalid scale transform; not a function");y.percent=!!v,y.label=w===void 0?y8(x,y):w,y.transform=T,b==="x"||b==="fx"?(y.insetLeft=+L,y.insetRight=+D):(b==="y"||b==="fy")&&(y.insetTop=+I,y.insetBottom=+_),g[b]=y}}return g}function Ud(t){return Object.fromEntries(Object.entries(t).filter(([,{scale:e}])=>e).map(([e,{scale:n,type:r,interval:o,label:i}])=>(n.type=r,o!=null&&(n.interval=o),i!=null&&(n.label=i),[e,n])))}function X1(t,e){let{x:n,y:r,fx:o,fy:i}=t,a=o||i?Rc(e):e;o&&z1(o,a),i&&B1(i,a);let f=o||i?Xd(t,e):e;n&&z1(n,f),r&&B1(r,f)}function y8(t=[],e){let n;for(let{label:r}of t)if(r!==void 0){if(n===void 0)n=r;else if(n!==r)return}if(n!==void 0)return!an(e)&&e.percent&&(n=`${n} (%)`),{inferred:!0,toString:()=>n}}function Rc(t){let{marginTop:e,marginRight:n,marginBottom:r,marginLeft:o,width:i,height:a,facet:{marginTop:f,marginRight:u,marginBottom:c,marginLeft:s}}=t;return{marginTop:Math.max(e,f),marginRight:Math.max(n,u),marginBottom:Math.max(r,c),marginLeft:Math.max(o,s),width:i,height:a}}function Xd({fx:t,fy:e},n){let{marginTop:r,marginRight:o,marginBottom:i,marginLeft:a,width:f,height:u}=Rc(n);return{marginTop:r,marginRight:o,marginBottom:i,marginLeft:a,width:t?t.scale.bandwidth()+a+o:f,height:e?e.scale.bandwidth()+r+i:u,facet:{width:f,height:u}}}function z1(t,e){if(t.range===void 0){let{insetLeft:n,insetRight:r}=t,{width:o,marginLeft:i=0,marginRight:a=0}=e,f=i+n,u=o-a-r;t.range=[f,Math.max(f,u)],an(t)||(t.range=H1(t)),t.scale.range(t.range)}W1(t)}function B1(t,e){if(t.range===void 0){let{insetTop:n,insetBottom:r}=t,{height:o,marginTop:i=0,marginBottom:a=0}=e,f=i+n,u=o-a-r;t.range=[Math.max(f,u),f],an(t)?t.range.reverse():t.range=H1(t),t.scale.range(t.range)}W1(t)}function W1(t){t.round===void 0&&M8(t)&&b8(t)<=30&&t.scale.round(!0)}function b8({scale:t}){let e=t.domain().length,[n,r]=t.range(),o=t.paddingInner?t.paddingInner():1,i=t.paddingOuter?t.paddingOuter():t.padding(),a=e-o,f=Math.abs(r-n)/Math.max(1,a+i*2);return(f-Math.floor(f))*a}function H1(t){let e=t.scale.domain().length+Wd(t);if(!(e>2))return t.range;let[n,r]=t.range;return Array.from({length:e},(o,i)=>n+i/(e-1)*(r-n))}function w8(t,e=[],n={}){let r=v8(t,e,n);if(n.type===void 0&&n.domain===void 0&&n.range===void 0&&n.interval==null&&t!=="fx"&&t!=="fy"&&an({type:r})){let o=e.map(({value:i})=>i).filter(i=>i!==void 0);o.some(zt)?on(`Warning: some data associated with the ${t} scale are dates. Dates are typically associated with a "utc" or "time" scale rather than a "${Ro(r)}" scale. If you are using a bar mark, you probably want a rect mark with the interval option instead; if you are using a group transform, you probably want a bin transform instead. If you want to treat this data as ordinal, you can specify the interval of the ${t} scale (e.g., d3.utcDay), or you can suppress this warning by setting the type of the ${t} scale to "${Ro(r)}".`):o.some(Ig)?on(`Warning: some data associated with the ${t} scale are strings that appear to be dates (e.g., YYYY-MM-DD). If these strings represent dates, you should parse them to Date objects. Dates are typically associated with a "utc" or "time" scale rather than a "${Ro(r)}" scale. If you are using a bar mark, you probably want a rect mark with the interval option instead; if you are using a group transform, you probably want a bin transform instead. If you want to treat this data as ordinal, you can suppress this warning by setting the type of the ${t} scale to "${Ro(r)}".`):o.some(kg)&&on(`Warning: some data associated with the ${t} scale are strings that appear to be numbers. If these strings represent numbers, you should parse or coerce them to numbers. Numbers are typically associated with a "linear" scale rather than a "${Ro(r)}" scale. If you want to treat this data as ordinal, you can specify the interval of the ${t} scale (e.g., 1 for integers), or you can suppress this warning by setting the type of the ${t} scale to "${Ro(r)}".`)}switch(n.type=r,r){case"diverging":case"diverging-sqrt":case"diverging-pow":case"diverging-log":case"diverging-symlog":case"cyclical":case"sequential":case"linear":case"sqrt":case"threshold":case"quantile":case"pow":case"log":case"symlog":n=Nc(e,n,Tr);break;case"identity":switch(st.get(t)){case de:n=Nc(e,n,Tr);break;case _o:n=Nc(e,n,S8);break}break;case"utc":case"time":n=Nc(e,n,vg);break}switch(r){case"diverging":return A1(t,e,n);case"diverging-sqrt":return $1(t,e,n);case"diverging-pow":return zd(t,e,n);case"diverging-log":return E1(t,e,n);case"diverging-symlog":return I1(t,e,n);case"categorical":case"ordinal":case No:return P1(t,e,n);case"cyclical":case"sequential":case"linear":return b1(t,e,n);case"sqrt":return w1(t,e,n);case"threshold":return kc(t,e,n);case"quantile":return S1(t,e,n);case"quantize":return T1(t,e,n);case"pow":return Yd(t,e,n);case"log":return v1(t,e,n);case"symlog":return M1(t,e,n);case"utc":return N1(t,e,n);case"time":return D1(t,e,n);case"point":return O1(t,e,n);case"band":return F1(t,e,n);case"identity":return st.get(t)===de?_1():{type:"identity"};case void 0:return;default:throw new Error(`unknown scale type: ${r}`)}}function Ro(t){return typeof t=="symbol"?t.description:t}var U1={toString:()=>"projection"};function v8(t,e,{type:n,domain:r,range:o,scheme:i,pivot:a,projection:f}){if(t==="fx"||t==="fy")return"band";(t==="x"||t==="y")&&f!=null&&(n=U1);for(let{type:c}of e)if(c!==void 0){if(n===void 0)n=c;else if(n!==c)throw new Error(`scale incompatible with channel: ${n} !== ${c}`)}if(n===U1)return;if(n!==void 0)return n;if(r===void 0&&!e.some(({value:c})=>c!==void 0))return;let u=st.get(t);if(u===Mo)return"sqrt";if(u===To||u===So)return"linear";if(u===_o)return"ordinal";if((r||o||[]).length>2)return Bd(u);if(r!==void 0){if(Sd(r))return Bd(u);if(zt(r))return"utc"}else{let c=e.map(({value:s})=>s).filter(s=>s!==void 0);if(c.some(Sd))return Bd(u);if(c.some(zt))return"utc"}if(u===pe){if(a!=null||x1(i))return"diverging";if(h1(i))return"categorical"}return"linear"}function Bd(t){switch(t){case de:return"point";case pe:return No;default:return"ordinal"}}function Lc({type:t}){return t==="time"||t==="utc"}function an({type:t}){return t==="ordinal"||t==="point"||t==="band"||t===No}function Wd({type:t}){return t==="threshold"}function M8({type:t}){return t==="point"||t==="band"}function fn(t){if(t===void 0)return!0;let e=t.domain(),n=t(e[0]);for(let r=1,o=e.length;r<o;++r)if(t(e[r])-n)return!1;return!0}function Nc(t,{domain:e,...n},r){for(let o of t)o.value!==void 0&&(o.value=r(o.value));return{domain:e===void 0?e:r(e),...n}}function S8(t){return pt(t,Co)}function G1(t){return e=>{if(!st.has(e=`${e}`))throw new Error(`unknown scale: ${e}`);return e in t?T8(t[e]):void 0}}function T8({scale:t,type:e,domain:n,range:r,interpolate:o,interval:i,transform:a,percent:f,pivot:u}){if(e==="identity")return{type:"identity",apply:s=>s,invert:s=>s};let c=t.unknown?t.unknown():void 0;return{type:e,domain:ha(n),...r!==void 0&&{range:ha(r)},...a!==void 0&&{transform:a},...f&&{percent:f},...c!==void 0&&{unknown:c},...i!==void 0&&{interval:i},...o!==void 0&&{interpolate:o},...t.clamp&&{clamp:t.clamp()},...u!==void 0&&{pivot:u,symmetric:!1},...t.base&&{base:t.base()},...t.exponent&&{exponent:t.exponent()},...t.constant&&{constant:t.constant()},...t.align&&{align:t.align(),round:t.round()},...t.padding&&(t.paddingInner?{paddingInner:t.paddingInner(),paddingOuter:t.paddingOuter()}:{padding:t.padding()}),...t.bandwidth&&{bandwidth:t.bandwidth(),step:t.step()},apply:s=>t(s),...t.invert&&{invert:s=>t.invert(s)}}}function Pc(t){let e,n;return(...r)=>((n?.length!==r.length||n.some((o,i)=>o!==r[i]))&&(n=r,e=t(...r)),e)}var _8=Pc(t=>new Intl.NumberFormat(t)),Dq=Pc((t,e)=>new Intl.DateTimeFormat(t,{timeZone:"UTC",...e&&{month:e}})),Nq=Pc((t,e)=>new Intl.DateTimeFormat(t,{timeZone:"UTC",...e&&{weekday:e}}));function C8(t="en-US"){let e=_8(t);return n=>n!=null&&!isNaN(n)?e.format(n):void 0}function A8(t){return Mc(t,"Invalid Date")}function $8(t="en-US"){let e=C8(t);return n=>(n instanceof Date?A8:typeof n=="number"?e:Et)(n)}var _e=$8();var Bt=(typeof window<"u"?window.devicePixelRatio>1:typeof it>"u")?0:.5,E8=0;function V1(){return`plot-clip-${++E8}`}function j1(t,{title:e,href:n,ariaLabel:r,ariaDescription:o,ariaHidden:i,target:a,fill:f,fillOpacity:u,stroke:c,strokeWidth:s,strokeOpacity:d,strokeLinejoin:l,strokeLinecap:p,strokeMiterlimit:m,strokeDasharray:h,strokeDashoffset:g,opacity:b,mixBlendMode:x,imageFilter:M,paintOrder:y,pointerEvents:w,shapeRendering:v,channels:T},{ariaLabel:E,fill:I="currentColor",fillOpacity:D,stroke:_="none",strokeOpacity:L,strokeWidth:F,strokeLinecap:P,strokeLinejoin:S,strokeMiterlimit:A,paintOrder:N}){I===null&&(f=null,u=null),_===null&&(c=null,d=null),Pt(I)?!Pt(_)&&(!Pt(f)||T?.fill)&&(_="none"):Pt(_)&&(!Pt(c)||T?.stroke)&&(I="none");let[O,R]=ie(f,I),[tt,Z]=It(u,D),[H,Q]=ie(c,_),[at,Ut]=It(d,L),[Oe,G]=It(b);$r(Q)||(s===void 0&&(s=F),p===void 0&&(p=P),l===void 0&&(l=S),m===void 0&&!Rg(l)&&(m=A),!$r(R)&&y===void 0&&(y=N));let[X,$]=It(s);return I!==null&&(t.fill=St(R,"currentColor"),t.fillOpacity=_a(Z,1)),_!==null&&(t.stroke=St(Q,"none"),t.strokeWidth=_a($,1),t.strokeOpacity=_a(Ut,1),t.strokeLinejoin=St(l,"miter"),t.strokeLinecap=St(p,"butt"),t.strokeMiterlimit=_a(m,4),t.strokeDasharray=St(h,"none"),t.strokeDashoffset=St(g,"0")),t.target=Et(a),t.ariaLabel=Et(E),t.ariaDescription=Et(o),t.ariaHidden=Et(i),t.opacity=_a(G,1),t.mixBlendMode=St(x,"normal"),t.imageFilter=St(M,"none"),t.paintOrder=St(y,"normal"),t.pointerEvents=St(w,"auto"),t.shapeRendering=St(v,"auto"),{title:{value:e,optional:!0,filter:null},href:{value:n,optional:!0,filter:null},ariaLabel:{value:r,optional:!0,filter:null},fill:{value:O,scale:"auto",optional:!0},fillOpacity:{value:tt,scale:"auto",optional:!0},stroke:{value:H,scale:"auto",optional:!0},strokeOpacity:{value:at,scale:"auto",optional:!0},strokeWidth:{value:X,optional:!0},opacity:{value:Oe,scale:"auto",optional:!0}}}function I8(t,e){e&&t.filter(n=>wc(e[n])).append("title").call(k8,e)}function k8(t,e){e&&t.text(n=>_e(e[n]))}function Pe(t,{target:e,tip:n},{ariaLabel:r,title:o,fill:i,fillOpacity:a,stroke:f,strokeOpacity:u,strokeWidth:c,opacity:s,href:d}){r&&et(t,"aria-label",l=>r[l]),i&&et(t,"fill",l=>i[l]),a&&et(t,"fill-opacity",l=>a[l]),f&&et(t,"stroke",l=>f[l]),u&&et(t,"stroke-opacity",l=>u[l]),c&&et(t,"stroke-width",l=>c[l]),s&&et(t,"opacity",l=>s[l]),d&&N8(t,l=>d[l],e),n||I8(t,o)}function Z1(t){return t===!0?t="frame":t===!1&&(t=null),_r(t,"clip",["frame","sphere"])}function D8(t,e,n,r){let o;switch(e.clip){case"frame":{let{width:i,height:a,marginLeft:f,marginRight:u,marginTop:c,marginBottom:s}=n,d=V1();o=`url(#${d})`,t=yt("svg:g",r).call(l=>l.append("svg:clipPath").attr("id",d).append("rect").attr("x",f).attr("y",c).attr("width",i-u-f).attr("height",a-c-s)).each(function(){this.appendChild(t.node()),t.node=()=>this});break}case"sphere":{let{projection:i}=r;if(!i)throw new Error('the "sphere" clip option requires a projection');let a=V1();o=`url(#${a})`,t.append("clipPath").attr("id",a).append("path").attr("d",Si(i)({type:"Sphere"}));break}}et(t,"aria-label",e.ariaLabel),et(t,"aria-description",e.ariaDescription),et(t,"aria-hidden",e.ariaHidden),et(t,"clip-path",o)}function me(t,e,n,r){D8(t,e,n,r),et(t,"fill",e.fill),et(t,"fill-opacity",e.fillOpacity),et(t,"stroke",e.stroke),et(t,"stroke-width",e.strokeWidth),et(t,"stroke-opacity",e.strokeOpacity),et(t,"stroke-linejoin",e.strokeLinejoin),et(t,"stroke-linecap",e.strokeLinecap),et(t,"stroke-miterlimit",e.strokeMiterlimit),et(t,"stroke-dasharray",e.strokeDasharray),et(t,"stroke-dashoffset",e.strokeDashoffset),et(t,"shape-rendering",e.shapeRendering),et(t,"filter",e.imageFilter),et(t,"paint-order",e.paintOrder);let{pointerEvents:o=r.pointerSticky===!1?"none":void 0}=e;et(t,"pointer-events",o)}function he(t,e){R8(t,"mix-blend-mode",e.mixBlendMode),et(t,"opacity",e.opacity)}function N8(t,e,n){t.each(function(r){let o=e(r);if(o!=null){let i=this.ownerDocument.createElementNS(Ye.svg,"a");i.setAttribute("fill","inherit"),i.setAttributeNS(Ye.xlink,"href",o),n!=null&&i.setAttribute("target",n),this.parentNode.insertBefore(i,this).appendChild(this)}})}function et(t,e,n){n!=null&&t.attr(e,n)}function R8(t,e,n){n!=null&&t.style(e,n)}function ge(t,e,{x:n,y:r},o=Bt,i=Bt){o+=e.dx,i+=e.dy,n?.bandwidth&&(o+=n.bandwidth()/2),r?.bandwidth&&(i+=r.bandwidth()/2),(o||i)&&t.attr("transform",`translate(${o},${i})`)}function St(t,e){if((t=Et(t))!==e)return t}function _a(t,e){if((t=ct(t))!==e)return t}var L8=/^-?([_a-z]|[\240-\377]|\\[0-9a-f]{1,6}(\r\n|[ \t\r\n\f])?|\\[^\r\n\f0-9a-f])([_a-z0-9-]|[\240-\377]|\\[0-9a-f]{1,6}(\r\n|[ \t\r\n\f])?|\\[^\r\n\f0-9a-f])*$/i;function Lo(t){if(t===void 0)return"plot-d6a7b5";if(t=`${t}`,!L8.test(t))throw new Error(`invalid class name: ${t}`);return t}function Po(t,e){if(typeof e=="string")t.property("style",e);else if(e!=null)for(let n of t)Object.assign(n.style,e)}function Gn({frameAnchor:t},{width:e,height:n,marginTop:r,marginRight:o,marginBottom:i,marginLeft:a}){return[/left$/.test(t)?a:/right$/.test(t)?e-o:(a+e-o)/2,/^top/.test(t)?r:/^bottom/.test(t)?n-i:(r+n-i)/2]}function Q1(t,e,n={}){let r=.5-Bt,o=.5+Bt,i=.5+Bt,a=.5-Bt;for(let{marginTop:h,marginRight:g,marginBottom:b,marginLeft:x}of e)h>r&&(r=h),g>o&&(o=g),b>i&&(i=b),x>a&&(a=x);let{margin:f,marginTop:u=f!==void 0?f:r,marginRight:c=f!==void 0?f:o,marginBottom:s=f!==void 0?f:i,marginLeft:d=f!==void 0?f:a}=n;u=+u,c=+c,s=+s,d=+d;let{width:l=640,height:p=P8(t,n,{width:l,marginTopDefault:r,marginRightDefault:o,marginBottomDefault:i,marginLeftDefault:a})+Math.max(0,u-r+s-i)}=n;l=+l,p=+p;let m={width:l,height:p,marginTop:u,marginRight:c,marginBottom:s,marginLeft:d};if(t.fx||t.fy){let{margin:h,marginTop:g=h!==void 0?h:u,marginRight:b=h!==void 0?h:c,marginBottom:x=h!==void 0?h:s,marginLeft:M=h!==void 0?h:d}=n.facet??{};g=+g,b=+b,x=+x,M=+M,m.facet={marginTop:g,marginRight:b,marginBottom:x,marginLeft:M}}return m}function P8({x:t,y:e,fy:n,fx:r},{projection:o,aspectRatio:i},{width:a,marginTopDefault:f,marginRightDefault:u,marginBottomDefault:c,marginLeftDefault:s}){let d=n?n.scale.domain().length:1,l=u1(o);if(l){let m=r?r.scale.domain().length:1,h=(1.1*d-.1)/(1.1*m-.1)*l,g=Math.max(.1,Math.min(10,h));return Math.round((a-s-u)*g+f+c)}let p=e?an(e)?e.scale.domain().length:Math.max(7,17/d):1;if(i!=null){if(i=+i,!(isFinite(i)&&i>0))throw new Error(`invalid aspectRatio: ${i}`);let m=K1("y",e)/(K1("x",t)*i),h=r?r.scale.bandwidth():1,g=n?n.scale.bandwidth():1,b=h*(a-s-u)-t.insetLeft-t.insetRight;return(m*b+e.insetTop+e.insetBottom)/g+f+c}return!!(e||n)*Math.max(1,Math.min(60,p*d))*20+!!r*30+60}function K1(t,e){if(!e)throw new Error(`aspectRatio requires ${t} scale`);let{type:n,domain:r}=e,o;switch(n){case"linear":case"utc":case"time":o=Number;break;case"pow":{let f=e.scale.exponent();o=u=>Math.pow(u,f);break}case"log":o=Math.log;break;case"point":case"band":return r.length;default:throw new Error(`unsupported ${t} scale for aspectRatio: ${n}`)}let[i,a]=Ct(r);return Math.abs(o(a)-o(i))}function tx(t,e){let{fx:n,fy:r}=Ta(t,e),o=n?.scale.domain(),i=r?.scale.domain();return o&&i?La(o,i).map(([a,f],u)=>({x:a,y:f,i:u})):o?o.map((a,f)=>({x:a,i:f})):i?i.map((a,f)=>({y:a,i:f})):void 0}function ex(t,{x:e,y:n}){return e&&=Zd(e),n&&=Zd(n),t.filter(e&&n?r=>e.has(r.x)&&n.has(r.y):e?r=>e.has(r.x):r=>n.has(r.y)).sort(e&&n?(r,o)=>e.get(r.x)-e.get(o.x)||n.get(r.y)-n.get(o.y):e?(r,o)=>e.get(r.x)-e.get(o.x):(r,o)=>n.get(r.y)-n.get(o.y))}function Fc(t,{fx:e,fy:n}){let r=ne(t),o=e?.value,i=n?.value;return e&&n?Ce(r,a=>(a.fx=o[a[0]],a.fy=i[a[0]],a),a=>o[a],a=>i[a]):e?Ce(r,a=>(a.fx=o[a[0]],a),a=>o[a]):Ce(r,a=>(a.fy=i[a[0]],a),a=>i[a])}function nx(t,e,{marginTop:n,marginLeft:r}){return t&&e?({x:o,y:i})=>`translate(${t(o)-r},${e(i)-n})`:t?({x:o})=>`translate(${t(o)-r},0)`:({y:o})=>`translate(0,${e(o)-n})`}function rx(t){let e=[],n=new Uint32Array(fe(t,r=>r.length));for(let r of t){let o=0;for(let i of t)r!==i&&(n.set(i,o),o+=i.length);e.push(n.slice(0,o))}return e}var O8=new Map([["top",Hd],["right",jd],["bottom",Gd],["left",Vd],["top-left",Oc(Hd,Vd)],["top-right",Oc(Hd,jd)],["bottom-left",Oc(Gd,Vd)],["bottom-right",Oc(Gd,jd)],["top-empty",q8],["right-empty",B8],["bottom-empty",Y8],["left-empty",z8],["empty",U8]]);function ox(t){if(t==null)return null;let e=O8.get(`${t}`.toLowerCase());if(e)return e;throw new Error(`invalid facet anchor: ${t}`)}var J1=new WeakMap;function Zd(t){let e=J1.get(t);return e||J1.set(t,e=new Qt(pt(t,(n,r)=>[n,r]))),e}function Vn(t,e){return Zd(t).get(e)}function F8(t,e,n){return e=yo(e),n=yo(n),t.find(r=>Object.is(yo(r.x),e)&&Object.is(yo(r.y),n))}function qc(t,e,n){return F8(t,e,n)?.empty}function Hd(t,{y:e},{y:n}){return e?Vn(e,n)===0:!0}function Gd(t,{y:e},{y:n}){return e?Vn(e,n)===e.length-1:!0}function Vd(t,{x:e},{x:n}){return e?Vn(e,n)===0:!0}function jd(t,{x:e},{x:n}){return e?Vn(e,n)===e.length-1:!0}function q8(t,{y:e},{x:n,y:r,empty:o}){if(o)return!1;if(!e)return;let i=Vn(e,r);if(i>0)return qc(t,n,e[i-1])}function Y8(t,{y:e},{x:n,y:r,empty:o}){if(o)return!1;if(!e)return;let i=Vn(e,r);if(i<e.length-1)return qc(t,n,e[i+1])}function z8(t,{x:e},{x:n,y:r,empty:o}){if(o)return!1;if(!e)return;let i=Vn(e,n);if(i>0)return qc(t,e[i-1],r)}function B8(t,{x:e},{x:n,y:r,empty:o}){if(o)return!1;if(!e)return;let i=Vn(e,n);if(i<e.length-1)return qc(t,e[i+1],r)}function U8(t,e,{empty:n}){return n}function Oc(t,e){return function(){return t.apply(null,arguments)&&e.apply(null,arguments)}}function Yc(t,{channels:{fx:e,fy:n},groups:r}){return e&&n?t.map(({x:o,y:i})=>r.get(o)?.get(i)??[]):e?t.map(({x:o})=>r.get(o)??[]):t.map(({y:o})=>r.get(o)??[])}var Dt=class{constructor(e,n={},r={},o){let{facet:i="auto",facetAnchor:a,fx:f,fy:u,sort:c,dx:s=0,dy:d=0,margin:l=0,marginTop:p=l,marginRight:m=l,marginBottom:h=l,marginLeft:g=l,clip:b,channels:x,tip:M,render:y}=r;if(this.data=e,this.sort=Cr(c)?c:null,this.initializer=Er(r).initializer,this.transform=this.initializer?r.transform:Ao(r).transform,i===null||i===!1?this.facet=null:(this.facet=le(i===!0?"include":i,"facet",["auto","include","exclude","super"]),this.fx=e===go&&typeof f=="string"?[f]:f,this.fy=e===go&&typeof u=="string"?[u]:u),this.facetAnchor=ox(a),n=_d(n),x!==void 0&&(n={...X8(x),...n}),o!==void 0&&(n={...j1(this,r,o),...n}),this.channels=Object.fromEntries(Object.entries(n).map(([w,v])=>{if(ga(v.value)){let{value:T,scale:E=v.scale}=v.value;v={...v,scale:E,value:T}}if(e===go&&typeof v.value=="string"){let{value:T}=v;v={...v,value:[T]}}return[w,v]}).filter(([w,{value:v,optional:T}])=>{if(v!=null)return!0;if(T)return!1;throw new Error(`missing channel value: ${w}`)})),this.dx=+s,this.dy=+d,this.marginTop=+p,this.marginRight=+m,this.marginBottom=+h,this.marginLeft=+g,this.clip=Z1(b),this.tip=W8(M),this.facet==="super"){if(f||u)throw new Error("super-faceting cannot use fx or fy");for(let w in this.channels){let{scale:v}=n[w];if(!(v!=="x"&&v!=="y"))throw new Error("super-faceting cannot use x or y")}}y!=null&&(this.render=Qd(y,this.render))}initialize(e,n,r){let o=kt(this.data);e===void 0&&o!=null&&(e=[ne(o)]);let i=e;this.transform!=null&&({facets:e,data:o}=this.transform(o,e,r),o=kt(o)),e!==void 0&&(e.original=i);let a=Vg(this.channels,o);return this.sort!=null&&Zg(o,e,a,n,this.sort),{data:o,facets:e,channels:a}}filter(e,n,r){for(let o in n){let{filter:i=Ne}=n[o];if(i!==null){let a=r[o];e=e.filter(f=>i(a[f]))}}return e}project(e,n,r){for(let o in e)if(e[o].scale==="x"&&/^x|x$/.test(o)){let i=o.replace(/^x|x$/,"y");i in e&&e[i].scale==="y"&&a1(o,i,n,r.projection)}}scale(e,n,r){let o=jg(e,n);return r.projection&&this.project(e,o,r),o}};function Kd(...t){return t.plot=Dt.prototype.plot,t}function Qd(t,e){if(t==null)return e===null?void 0:e;if(e==null)return t===null?void 0:t;if(typeof t!="function")throw new TypeError(`invalid render transform: ${t}`);if(typeof e!="function")throw new TypeError(`invalid render transform: ${e}`);return function(n,r,o,i,a,f){return t.call(this,n,r,o,i,a,(u,c,s,d,l)=>e.call(this,u,c,s,d,l,f))}}function X8(t){return Object.fromEntries(Object.entries(_d(t)).map(([e,n])=>(n=rn(n),n.filter===void 0&&n.scale==null&&(n={...n,filter:null}),[e,n])))}function W8(t){return t===!0?"xy":t===!1?null:_r(t,"tip",["x","y","xy"])}function Ca(t,e){return t?.tip===!0?{...t,tip:e}:t}var ix=new WeakMap;function Jd(t,e,{x:n,y:r,px:o,py:i,maxRadius:a=40,channels:f,render:u,...c}={}){return a=+a,o!=null&&(n??=null,f={...f,px:{value:o,scale:"x"}}),i!=null&&(r??=null,f={...f,py:{value:i,scale:"y"}}),{x:n,y:r,channels:f,...c,render:Qd(function(s,d,l,p,m,h){m={...m,pointerSticky:!1};let g=m.ownerSVGElement,{data:b}=m.getMarkState(this),x=ix.get(g);x||ix.set(g,x={sticky:!1,roots:[],renders:[]});let M=x.renders.push(Q)-1,{x:y,y:w,fx:v,fy:T}=d,E=v?v(s.fx)-p.marginLeft:0,I=T?T(s.fy)-p.marginTop:0;y?.bandwidth&&(E+=y.bandwidth()/2),w?.bandwidth&&(I+=w.bandwidth()/2);let D=s.fi!=null,_;if(D){let G=x.facetStates;G||(x.facetStates=G=new Map),_=G.get(this),_||G.set(this,_=new Map)}let[L,F]=Gn(this,p),{px:P,py:S}=l,A=P?G=>P[G]:tp(l,L),N=S?G=>S[G]:ep(l,F),O,R,tt,Z;function H(G,X){if(D)if(Z&&(Z=cancelAnimationFrame(Z)),G==null)_.delete(s.fi);else{_.set(s.fi,X),Z=requestAnimationFrame(()=>{Z=null;for(let $ of _.values())if($<X){G=null;break}Q(G)});return}Q(G)}function Q(G){if(O===G&&tt===x.sticky)return;O=G,tt=m.pointerSticky=x.sticky;let X=O==null?[]:[O];D&&(X.fx=s.fx,X.fy=s.fy,X.fi=s.fi);let $=h(X,d,l,p,m);if(R){if(D){let q=R.parentNode,Y=R.getAttribute("transform"),C=$.getAttribute("transform");Y?$.setAttribute("transform",Y):$.removeAttribute("transform"),C?q.setAttribute("transform",C):q.removeAttribute("transform"),$.removeAttribute("aria-label"),$.removeAttribute("aria-description"),$.removeAttribute("aria-hidden")}R.replaceWith($)}return x.roots[M]=R=$,m.dispatchValue(O==null?null:b[O]),$}function at(G){if(x.sticky||G.pointerType==="mouse"&&G.buttons===1)return;let[X,$]=ys(G);X-=E,$-=I;let q=null,Y=a*a;for(let C of s){let j=t*(A(C)-X),J=e*(N(C)-$),ot=j*j+J*J;ot<=Y&&(q=C,Y=ot)}H(q,Y)}function Ut(G){G.pointerType==="mouse"&&O!=null&&(x.sticky&&x.roots.some(X=>X?.contains(G.target))||(x.sticky?(x.sticky=!1,x.renders.forEach(X=>X(null))):(x.sticky=!0,Q(O)),G.stopImmediatePropagation()))}function Oe(G){G.pointerType==="mouse"&&(x.sticky||H(null))}return g.addEventListener("pointerenter",at),g.addEventListener("pointermove",at),g.addEventListener("pointerdown",Ut),g.addEventListener("pointerleave",Oe),Q(null)},u)}}function ax(t){return Jd(1,1,t)}function fx(t){return Jd(1,.01,t)}function ux(t){return Jd(.01,1,t)}function tp({x1:t,x2:e,x:n=t},r){return t&&e?o=>(t[o]+e[o])/2:n?o=>n[o]:()=>r}function ep({y1:t,y2:e,y:n=t},r){return t&&e?o=>(t[o]+e[o])/2:n?o=>n[o]:()=>r}function zc(t){return an(t)&&t.interval===void 0?void 0:"tabular-nums"}function cx(t,e){let{label:n=t.label,tickSize:r=6,width:o=240,height:i=44+r,marginTop:a=18,marginRight:f=0,marginBottom:u=16+r,marginLeft:c=0,style:s,ticks:d=(o-c-f)/64,tickFormat:l,fontVariant:p=zc(t),round:m=!0,opacity:h,className:g}=e,b=Eo(e);g=Lo(g),h=It(h)[1],l===null&&(l=()=>null);let x=yt("svg",b).attr("class",`${g}-ramp`).attr("font-family","system-ui, sans-serif").attr("font-size",10).attr("width",o).attr("height",i).attr("viewBox",`0 0 ${o} ${i}`).call(L=>L.append("style").text(`.${g}-ramp {
+${f}`;switch(Rv(t,e,n)){case"millisecond":return Sr(o(".%L"),o(":%M:%S"),i);case"second":return Sr(o(":%S"),o("%-I:%M"),i);case"minute":return Sr(o("%-I:%M"),o("%p"),i);case"hour":return Sr(o("%-I %p"),o("%b %-d"),i);case"day":return Sr(o("%-d"),o("%b"),i);case"week":return Sr(o("%-d"),o("%b"),i);case"month":return Sr(o("%b"),o("%Y"),i);case"year":return o("%Y")}throw new Error("unable to format time ticks")}function Rv(t,e,n){let r=ln(Ha(e,(u,c)=>Math.abs(c-u)||NaN));if(r>0)return la[Fe(([,u])=>u).right(la,r,1,la.length)-1][0];let[o,i]=Ct(t.domain()),a=typeof n=="number"?n:10,f=Math.abs(i-o)/a;return la[Fe(([,u])=>Math.log(u)).center(la,Math.log(f))][0]}function Sr(t,e,n){return(r,o,i)=>{let a=t(r,o),f=e(r,o),u=o-Mn(i);return o!==u&&i[u]!==void 0&&f===e(i[u],u)?a:n(a,f)}}var pa=Object.getPrototypeOf(Uint8Array),Lv=Object.prototype.toString;function gt(t,e,n){let r=typeof e;return r==="string"?hg(t,gd(e),n):r==="function"?hg(t,e,n):r==="number"||e instanceof Date||r==="boolean"?pt(t,Wn(e),n):typeof e?.transform=="function"?gg(e.transform(t),n):gg(e,n)}function hg(t,e,n){return pt(t,n?.prototype instanceof pa?Pv(e):e,n)}function gg(t,e){return e===void 0?kt(t):t instanceof e?t:e.prototype instanceof pa&&!(t instanceof pa)?e.from(t,xd):e.from(t)}function Pv(t){return(e,n)=>xd(t(e,n))}var go=[null],gd=t=>e=>e[t],_c={transform:ne},wt={transform:t=>t};var xg=()=>1,yg=()=>!0,Et=t=>t==null?t:`${t}`,ct=t=>t==null?t:+t;var ma=t=>t?t[0]:void 0,Cc=t=>t?t[1]:void 0;var Wn=t=>()=>t;function bg(t){let e=+`${t}`.slice(1)/100;return(n,r)=>ye(n,e,r)}function Tr(t){return t instanceof pa?t:pt(t,xd,Float64Array)}function xd(t){return t==null?NaN:Number(t)}function wg(t){return pt(t,yd)}function yd(t){return t instanceof Date&&!isNaN(t)?t:typeof t=="string"?sa(t):t==null||isNaN(t=+t)?void 0:new Date(t)}function ie(t,e){return t===void 0&&(t=e),t===null?[void 0,"none"]:wo(t)?[void 0,t]:[t,void 0]}function It(t,e){return t===void 0&&(t=e),t===null||typeof t=="number"?[void 0,t]:[t,void 0]}function _r(t,e,n){if(t!=null)return le(t,e,n)}function le(t,e,n){let r=`${t}`.toLowerCase();if(!n.includes(r))throw new Error(`invalid ${e}: ${t}`);return r}function kt(t){return t==null||t instanceof Array||t instanceof pa?t:Array.from(t)}function pt(t,e,n=Array){return t==null?t:t instanceof n?t.map(e):n.from(t,e)}function ha(t,e=Array){return t instanceof e?t.slice():e.from(t)}function vg({x:t,x1:e,x2:n}){return t!==void 0||e!==void 0||n!==void 0}function bd({y:t,y1:e,y2:n}){return t!==void 0||e!==void 0||n!==void 0}function Mg(t){return vg(t)||bd(t)||t.interval!==void 0}function Sn(t){return t?.toString===Lv}function xo(t){return Sn(t)&&(t.type!==void 0||t.domain!==void 0)}function ga(t){return Sn(t)&&typeof t.transform!="function"}function Cr(t){return ga(t)&&t.value===void 0&&t.channel===void 0}function Sg(t,e,n,r=wt){return e===void 0&&n===void 0?(e=0,n=t===void 0?r:t):e===void 0?e=t===void 0?0:t:n===void 0&&(n=t===void 0?0:t),[e,n]}function Ar(t,e){return t===void 0&&e===void 0?[ma,Cc]:[t,e]}function Tg({z:t,fill:e,stroke:n}={}){return t===void 0&&([t]=ie(e)),t===void 0&&([t]=ie(n)),t}function ne(t){let e=t.length,n=new Uint32Array(e);for(let r=0;r<e;++r)n[r]=r;return n}function wd(t,e){return pt(e,n=>t[n])}function _g(t,e,n){return t.subarray?t.subarray(e,n):t.slice(e,n)}function yo(t){return t!==null&&typeof t=="object"?t.valueOf():t}function Cg(t,e){if(e[t]!==void 0)return e[t];switch(t){case"x1":case"x2":t="x";break;case"y1":case"y2":t="y";break}return e[t]}function bo(t){let e;return[{transform:()=>e,label:Re(t)},n=>e=n]}function Te(t){return t==null?[t]:bo(t)}function Re(t,e){return typeof t=="string"?t:t&&t.label!==void 0?t.label:e}function xa(t,e){return{transform(n){let r=t.transform(n),o=e.transform(n);return zt(r)||zt(o)?pt(r,(i,a)=>new Date((+r[a]+ +o[a])/2)):pt(r,(i,a)=>(+r[a]+ +o[a])/2,Float64Array)},label:t.label}}function ya(t,e){let n=vd(e?.interval,e?.type);return n?pt(t,n):t}function vd(t,e){let n=Ac(t,e);return n&&(r=>Ne(r)?n.floor(r):r)}function Ac(t,e){if(t!=null){if(typeof t=="number"){0<t&&t<1&&Number.isInteger(1/t)&&(t=-1/t);let n=Math.abs(t);return t<0?{floor:r=>Math.floor(r*n)/n,offset:r=>(r*n+1)/n,range:(r,o)=>er(Math.ceil(r*n),o*n).map(i=>i/n)}:{floor:r=>Math.floor(r/n)*n,offset:r=>r+n,range:(r,o)=>er(Math.ceil(r/n),o/n).map(i=>i*n)}}if(typeof t=="string")return(e==="time"?lg:Tc)(t);if(typeof t.floor!="function")throw new Error("invalid interval; missing floor method");if(typeof t.offset!="function")throw new Error("invalid interval; missing offset method");return t}}function nn(t,e){if(t=Ac(t,e),t&&typeof t.range!="function")throw new Error("invalid interval: missing range method");return t}function Ag(t,e){if(t=nn(t,e),t&&typeof t.ceil!="function")throw new Error("invalid interval: missing ceil method");return t}function rn(t){return t===void 0||ga(t)?t:{value:t}}function $g(t){return t==null?null:{transform:e=>gt(e,t,Float64Array),label:Re(t)}}function re(t){return t&&typeof t[Symbol.iterator]=="function"}function $c(t){for(let e of t)if(e!=null)return typeof e!="object"||e instanceof Date}function Md(t){for(let e of t){if(e==null)continue;let n=typeof e;return n==="string"||n==="boolean"}}function zt(t){for(let e of t)if(e!=null)return e instanceof Date}function Eg(t){for(let e of t)if(e!=null)return typeof e=="string"&&isNaN(e)&&sa(e)}function Ig(t){for(let e of t)if(e!=null){if(typeof e!="string")return!1;if(e.trim())return!isNaN(e)}}function kg(t){for(let e of t)if(e!=null)return typeof e=="number"}function Ec(t,e){let n;for(let r of t)if(r!=null){if(!e(r))return!1;n=!0}return n}function wo(t){return typeof t!="string"?!1:(t=t.toLowerCase().trim(),t==="none"||t==="currentcolor"||t.startsWith("url(")&&t.endsWith(")")||t.startsWith("var(")&&t.endsWith(")")||ue(t)!==null)}function Dg(t){return typeof t=="number"&&(0<=t&&t<=1||isNaN(t))}function Pt(t){return t==null||$r(t)}function $r(t){return/^\s*none\s*$/i.test(t)}function Ng(t){return/^\s*round\s*$/i.test(t)}function Sd(t,e){return _r(t,e,["middle","top-left","top","top-right","right","bottom-right","bottom","bottom-left","left"])}function vo(t="middle"){return Sd(t,"frameAnchor")}function Mn(t){if(t==null)return;let e=t[0],n=t[t.length-1];return xe(e,n)}function Rg(t={},...e){let n=t;for(let r of e)for(let o in r)if(n[o]===void 0){let i=r[o];n===t?n={...n,[o]:i}:n[o]=i}return n}function Ov(t){console.warn("named iterables are deprecated; please use an object instead");let e=new Set;return Object.fromEntries(Array.from(t,n=>{let{name:r}=n;if(r==null)throw new Error("missing name");let o=`${r}`;if(o==="__proto__")throw new Error(`illegal name: ${o}`);if(e.has(o))throw new Error(`duplicate name: ${o}`);return e.add(o),[r,n]}))}function Td(t){return re(t)?Ov(t):t}var de=Symbol("position"),pe=Symbol("color"),Mo=Symbol("radius"),So=Symbol("length"),To=Symbol("opacity"),_o=Symbol("symbol"),Fv=Symbol("projection"),st=new Map([["x",de],["y",de],["fx",de],["fy",de],["r",Mo],["color",pe],["opacity",To],["symbol",_o],["length",So],["projection",Fv]]);var qv=Math.sqrt(3),Yv=2/qv,zv={draw(t,e){let n=Math.sqrt(e/Math.PI),r=n*Yv,o=r/2;t.moveTo(0,r),t.lineTo(n,o),t.lineTo(n,-o),t.lineTo(0,-r),t.lineTo(-n,-o),t.lineTo(-n,o),t.closePath()}},Lg=new Map([["asterisk",Qi],["circle",mo],["cross",Ji],["diamond",ta],["diamond2",ea],["hexagon",zv],["plus",na],["square",ra],["square2",oa],["star",ia],["times",ho],["triangle",aa],["triangle2",fa],["wye",ua]]);function Pg(t){return t&&typeof t.draw=="function"}function Og(t){return Pg(t)?!0:typeof t!="string"?!1:Lg.has(t.toLowerCase())}function Co(t){if(t==null||Pg(t))return t;let e=Lg.get(`${t}`.toLowerCase());if(e)return e;throw new Error(`invalid symbol: ${t}`)}function Ao({filter:t,sort:e,reverse:n,transform:r,initializer:o,...i}={},a){if(r===void 0&&(t!=null&&(r=Fg(t)),e!=null&&!Cr(e)&&(r=_d(r,Yg(e))),n&&(r=_d(r,qg))),a!=null&&o!=null)throw new Error("transforms cannot be applied after initializers");return{...i,...(e===null||Cr(e))&&{sort:e},transform:_d(r,a)}}function Er({filter:t,sort:e,reverse:n,initializer:r,...o}={},i){return r===void 0&&(t!=null&&(r=Fg(t)),e!=null&&!Cr(e)&&(r=Cd(r,Yg(e))),n&&(r=Cd(r,qg))),{...o,...(e===null||Cr(e))&&{sort:e},initializer:Cd(r,i)}}function _d(t,e){return t==null?e===null?void 0:e:e==null?t===null?void 0:t:function(n,r,o){return{data:n,facets:r}=t.call(this,n,r,o),e.call(this,kt(n),r,o)}}function Cd(t,e){return t==null?e===null?void 0:e:e==null?t===null?void 0:t:function(n,r,o,...i){let a,f,u,c,s,d;return{data:f=n,facets:u=r,channels:a}=t.call(this,n,r,o,...i),{data:s=f,facets:d=u,channels:c}=e.call(this,f,u,{...o,...a},...i),{data:s,facets:d,channels:{...a,...c}}}}function Fg(t){return(e,n)=>{let r=gt(e,t);return{data:e,facets:n.map(o=>o.filter(i=>r[i]))}}}function qg(t,e){return{data:t,facets:e.map(n=>n.slice().reverse())}}function Yg(t){return(typeof t=="function"&&t.length!==1?Bv:Uv)(t)}function Bv(t){return(e,n)=>{let r=(o,i)=>t(e[o],e[i]);return{data:e,facets:n.map(o=>o.slice().sort(r))}}}function Uv(t){let e,n;({channel:e,value:t,order:n}={...rn(t)});let r=e?.startsWith("-");if(r&&(e=e.slice(1)),n===void 0&&(n=r?Mr:Kt),typeof n!="function")switch(`${n}`.toLowerCase()){case"ascending":n=Kt;break;case"descending":n=Mr;break;default:throw new Error(`invalid order: ${n}`)}return(o,i,a)=>{let f;if(e===void 0)f=gt(o,t);else{if(a===void 0)throw new Error("channel sort requires an initializer");if(f=a[e],!f)return{};f=f.value}let u=(c,s)=>n(f[c],f[s]);return{data:o,facets:i.map(c=>c.slice().sort(u))}}}function wa(t,...e){for(let{name:n}of t)if(e.includes(n))return!0;return!1}function Ug(t,e,n=Ad){let r=Object.entries(t);return e.title!=null&&t.title===void 0&&r.push(["title",Vv]),e.href!=null&&t.href===void 0&&r.push(["href",kd]),r.filter(([,o])=>o!==void 0).map(([o,i])=>i===null?Xv(o):n(o,i,e))}function Ad(t,e,n,r=$d){let o;Sn(e)&&"reduce"in e&&(o=e.scale,e=e.reduce);let i=r(t,e,n),[a,f]=bo(i.label),u;return{name:t,output:o===void 0?a:{value:a,scale:o},initialize(c){i.initialize(c),u=f([])},scope(c,s){i.scope(c,s)},reduce(c,s){u.push(i.reduce(c,s))}}}function Xv(t){return{name:t,initialize(){},scope(){},reduce(){}}}function $d(t,e,n,r=va){let o=Cg(t,n),i=r(e,o),a,f;return{label:Re(i===ba?null:o,i.label),initialize(u){a=o===void 0?u:gt(u,o),i.scope==="data"&&(f=i.reduceIndex(ne(u),a))},scope(u,c){i.scope===u&&(f=i.reduceIndex(c,a))},reduce(u,c){return i.scope==null?i.reduceIndex(u,a,c):i.reduceIndex(u,a,f,c)}}}function Ed(t,e){return e?qe(sn(t,n=>e[n]),ma):[[,t]]}function va(t,e,n=Hv){if(t==null)return n(t);if(typeof t.reduceIndex=="function")return t;if(typeof t.reduce=="function"&&Sn(t))return Wv(t);if(typeof t=="function")return Gv(t);if(/^p\d{2}$/i.test(t))return Tn(bg(t));switch(`${t}`.toLowerCase()){case"first":return kd;case"last":return jv;case"identity":return Id;case"count":return ba;case"distinct":return Zv;case"sum":return e==null?ba:Kv;case"proportion":return Bg(e,"data");case"proportion-facet":return Bg(e,"facet");case"deviation":return Tn(Rr);case"min":return Tn(Jt);case"min-index":return Tn(Ya);case"max":return Tn(Ht);case"max-index":return Tn(qa);case"mean":return zg(Ua);case"median":return zg(ln);case"variance":return Tn(Nr);case"mode":return Tn(Xa)}return n(t)}function Hv(t){throw new Error(`invalid reduce: ${t}`)}function Xg(t,e){for(let n in e){let r=e[n];if(r!==void 0&&!t.some(o=>o.name===n))return r}}function Hg(t,e,n){if(e){let r=e.output.transform(),o=(i,a)=>Kt(r[i],r[a]);t.forEach(i=>i.sort(o))}n&&t.forEach(r=>r.reverse())}function Wv(t){return console.warn("deprecated reduce interface; implement reduceIndex instead."),{...t,reduceIndex:t.reduce.bind(t)}}function Gv(t){return{reduceIndex(e,n,r){return t(wd(n,e),r)}}}function Tn(t){return{reduceIndex(e,n){return t(e,r=>n[r])}}}function zg(t){return{reduceIndex(e,n){let r=t(e,o=>n[o]);return zt(n)?new Date(r):r}}}var Id={reduceIndex(t,e){return wd(e,t)}},kd={reduceIndex(t,e){return e[t[0]]}},Vv={reduceIndex(t,e){let r=qe(Ce(t,i=>i.length,i=>e[i]),Cc),o=r.slice(-5).reverse();if(o.length<r.length){let i=r.slice(0,-4);o[5-1]=[`\u2026 ${i.length.toLocaleString("en-US")} more`,fe(i,Cc)]}return o.map(([i,a])=>`${i} (${a.toLocaleString("en-US")})`).join(`
+`)}},jv={reduceIndex(t,e){return e[t[t.length-1]]}},ba={label:"Frequency",reduceIndex(t){return t.length}},Zv={label:"Distinct",reduceIndex(t,e){let n=new cn;for(let r of t)n.add(e[r]);return n.size}},Kv=Tn(fe);function Bg(t,e){return t==null?{scope:e,label:"Frequency",reduceIndex:(n,r,o=1)=>n.length/o}:{scope:e,reduceIndex:(n,r,o=1)=>fe(n,i=>r[i])/o}}function $o(t,{scale:e,type:n,value:r,filter:o,hint:i},a){return i===void 0&&typeof r?.transform=="function"&&(i=r.hint),Nd(a,{scale:e,type:n,value:gt(t,r),label:Re(r),filter:o,hint:i})}function Gg(t,e){return Object.fromEntries(Object.entries(t).map(([n,r])=>[n,$o(e,r,n)]))}function Vg(t,e){let n=Object.fromEntries(Object.entries(t).map(([r,{scale:o,value:i}])=>{let a=o==null?null:e[o];return[r,a==null?i:pt(i,a)]}));return n.channels=t,n}function Nd(t,e){let{scale:n,value:r}=e;if(n===!0||n==="auto")switch(t){case"fill":case"stroke":case"color":e.scale=n!==!0&&Ec(r,wo)?null:"color";break;case"fillOpacity":case"strokeOpacity":case"opacity":e.scale=n!==!0&&Ec(r,Dg)?null:"opacity";break;case"symbol":n!==!0&&Ec(r,Og)?(e.scale=null,e.value=pt(r,Co)):e.scale="symbol";break;default:e.scale=st.has(t)?t:null;break}else if(n===!1)e.scale=null;else if(n!=null&&!st.has(n))throw new Error(`unknown scale: ${n}`);return e}function jg(t,e,n,r,o){let{order:i,reverse:a,reduce:f=!0,limit:u}=o;for(let c in o){if(!st.has(c))continue;let{value:s,order:d=i,reverse:l=a,reduce:p=f,limit:m=u}=rn(o[c]),h=s?.startsWith("-");if(h&&(s=s.slice(1)),d=d===void 0?h!==(s==="width"||s==="height")?Kg:Zg:t8(d),p==null||p===!1)continue;let g=c==="fx"||c==="fy"?Jv(e,r[c]):Qv(n,c);if(!g)throw new Error(`missing channel for scale: ${c}`);let b=g.value,[x=0,M=1/0]=re(m)?m:m<0?[m]:[0,m];if(s==null)g.domain=()=>{let y=Array.from(new cn(b));return l&&(y=y.reverse()),(x!==0||M!==1/0)&&(y=y.slice(x,M)),y};else{let y=s==="data"?t:s==="height"?Wg(n,"y1","y2"):s==="width"?Wg(n,"x1","x2"):Dd(n,s,s==="y"?"y2":s==="x"?"x2":void 0),w=va(p===!0?"max":p,y);g.domain=()=>{let v=os(ne(b),T=>w.reduceIndex(T,y),T=>b[T]);return d&&v.sort(d),l&&v.reverse(),(x!==0||M!==1/0)&&(v=v.slice(x,M)),v.map(ma)}}}}function Qv(t,e){for(let n in t){let r=t[n];if(r.scale===e)return r}}function Jv(t,e){let n=t.original;if(n===t)return e;let r=e.value,o=e.value=[];for(let i=0;i<n.length;++i){let a=r[n[i][0]];for(let f of t[i])o[f]=a}return e}function Wg(t,e,n){let r=Dd(t,e),o=Dd(t,n);return pt(o,(i,a)=>Math.abs(i-r[a]),Float64Array)}function Dd(t,e,n){let r=t[e];if(!r&&n!==void 0&&(r=t[n]),r)return r.value;throw new Error(`missing channel: ${e}`)}function t8(t){if(t==null||typeof t=="function")return t;switch(`${t}`.toLowerCase()){case"ascending":return Zg;case"descending":return Kg}throw new Error(`invalid order: ${t}`)}function Zg([t,e],[n,r]){return Kt(e,r)||Kt(t,n)}function Kg([t,e],[n,r]){return Mr(e,r)||Kt(t,n)}function Qg(t,e){let n=t[e];if(n){for(;n.source;)n=n.source;return n.source===null?null:n}}function Eo(t={}){let{document:e=typeof window<"u"?window.document:void 0}=t;return{document:e}}function yt(t,{document:e}){return hn(pn(t).call(e.documentElement))}var Rd=0;function Jg(){let t=Rd;return Rd=0,t}function on(t){console.warn(t),++Rd}var e1=Math.PI,_n=2*e1,t1=.618;function n1({projection:t,inset:e=0,insetTop:n=e,insetRight:r=e,insetBottom:o=e,insetLeft:i=e}={},a){if(t==null)return;if(typeof t.stream=="function")return t;let f,u,c="frame";if(Sn(t)){let w;if({type:t,domain:u,inset:w,insetTop:n=w!==void 0?w:n,insetRight:r=w!==void 0?w:r,insetBottom:o=w!==void 0?w:o,insetLeft:i=w!==void 0?w:i,clip:c=c,...f}=t,t==null)return}typeof t!="function"&&({type:t}=r1(t));let{width:s,height:d,marginLeft:l,marginRight:p,marginTop:m,marginBottom:h}=a,g=s-l-p-i-r,b=d-m-h-n-o;if(t=t?.({width:g,height:b,clip:c,...f}),t==null)return;c=e8(c,l,m,s-p,d-h);let x=l+i,M=m+n,y;if(u!=null){let[[w,v],[T,E]]=Si(t).bounds(u),I=Math.min(g/(T-w),b/(E-v));I>0?(x-=(I*(w+T)-g)/2,M-=(I*(v+E)-b)/2,y=Ti({point(D,_){this.stream.point(D*I+x,_*I+M)}})):on("Warning: the projection could not be fit to the specified domain; using the default scale.")}return y??=x===0&&M===0?o1():Ti({point(w,v){this.stream.point(w+x,v+M)}}),{stream:w=>t.stream(y.stream(c(w)))}}function r1(t){switch(`${t}`.toLowerCase()){case"albers-usa":return Le(hl,.7463,.4673);case"albers":return Ic(Ci,.7463,.4673);case"azimuthal-equal-area":return Le(xl,4,4);case"azimuthal-equidistant":return Le(bl,_n,_n);case"conic-conformal":return Ic(Ml,_n,_n);case"conic-equal-area":return Ic(Rn,6.1702,2.9781);case"conic-equidistant":return Ic(Tl,7.312,3.6282);case"equal-earth":return Le(Cl,5.4133,2.6347);case"equirectangular":return Le(Sl,_n,e1);case"gnomonic":return Le($l,3.4641,3.4641);case"identity":return{type:o1};case"reflect-y":return{type:n8};case"mercator":return Le(wl,_n,_n);case"orthographic":return Le(Il,2,2);case"stereographic":return Le(Dl,2,2);case"transverse-mercator":return Le(Rl,_n,_n);default:throw new Error(`unknown projection type: ${t}`)}}function e8(t,e,n,r,o){if(t===!1||t==null||typeof t=="number")return i=>i;switch(t===!0&&(t="frame"),`${t}`.toLowerCase()){case"frame":return Kr(e,n,r,o);default:throw new Error(`unknown projection clip type: ${t}`)}}function Le(t,e,n){return{type:({width:r,height:o,rotate:i,precision:a=.15,clip:f})=>{let u=t();return a!=null&&u.precision?.(a),i!=null&&u.rotate?.(i),typeof f=="number"&&u.clipAngle?.(f),u.scale(Math.min(r/e,o/n)),u.translate([r/2,o/2]),u},aspectRatio:n/e}}function Ic(t,e,n){let{type:r,aspectRatio:o}=Le(t,e,n);return{type:i=>{let{parallels:a,domain:f,width:u,height:c}=i,s=r(i);return a!=null&&(s.parallels(a),f===void 0&&s.fitSize([u,c],{type:"Sphere"})),s},aspectRatio:o}}var o1=Wn({stream:t=>t}),n8=Wn(Ti({point(t,e){this.stream.point(t,-e)}}));function i1(t,e,n,r){let o=n[t],i=n[e],a=o.length,f=n[t]=new Float64Array(a).fill(NaN),u=n[e]=new Float64Array(a).fill(NaN),c,s=r.stream({point(d,l){f[c]=d,u[c]=l}});for(c=0;c<a;++c)s.point(o[c],i[c])}function a1({projection:t}={}){return t==null?!1:typeof t.stream=="function"?!0:(Sn(t)&&(t=t.type),t!=null)}function f1(t){if(typeof t?.stream=="function")return t1;if(Sn(t)&&(t=t.type),t!=null){if(typeof t!="function"){let{aspectRatio:e}=r1(t);if(e)return e}return t1}}function u1(t){let e=[],n=[],r={scale:"x",value:e},o={scale:"y",value:n},i={point(a,f){e.push(a),n.push(f)},lineStart(){},lineEnd(){},polygonStart(){},polygonEnd(){},sphere(){}};for(let a of t.value)Ie(a,i);return[r,o]}var p1=new Map([["accent",Ql],["category10",Kl],["dark2",Jl],["paired",td],["pastel1",ed],["pastel2",nd],["set1",rd],["set2",od],["set3",id],["tableau10",ad]]);function m1(t){return t!=null&&p1.has(`${t}`.toLowerCase())}var c1=new Map([...p1,["brbg",Cn(cu,su)],["prgn",Cn(lu,du)],["piyg",Cn(pu,mu)],["puor",Cn(hu,gu)],["rdbu",Cn(ji,co)],["rdgy",Cn(xu,yu)],["rdylbu",Cn(Zi,so)],["rdylgn",Cn(bu,wu)],["spectral",Cn(vu,Mu)],["burd",s1(ji,co)],["buylrd",s1(Zi,so)],["blues",Ot(Gu,Vu)],["greens",Ot(ju,Zu)],["greys",Ot(Ku,Qu)],["oranges",Ot(rc,oc)],["purples",Ot(Ju,tc)],["reds",Ot(ec,nc)],["turbo",An(pc)],["viridis",An(hc)],["magma",An(gc)],["inferno",An(xc)],["plasma",An(yc)],["cividis",An(ic)],["cubehelix",An(ac)],["warm",An(uc)],["cool",An(cc)],["bugn",Ot(Su,Tu)],["bupu",Ot(_u,Cu)],["gnbu",Ot(Au,$u)],["orrd",Ot(Eu,Iu)],["pubu",Ot(Nu,Ru)],["pubugn",Ot(ku,Du)],["purd",Ot(Lu,Pu)],["rdpu",Ot(Ou,Fu)],["ylgn",Ot(zu,Bu)],["ylgnbu",Ot(qu,Yu)],["ylorbr",Ot(Uu,Xu)],["ylorrd",Ot(Hu,Wu)],["rainbow",l1(sc)],["sinebow",l1(dc)]]);function Ot(t,e){return({length:n})=>n===1?[t[3][1]]:n===2?[t[3][1],t[3][2]]:(n=Math.max(3,Math.floor(n)),n>9?Wt(e,n):t[n])}function Cn(t,e){return({length:n})=>n===2?[t[3][0],t[3][2]]:(n=Math.max(3,Math.floor(n)),n>11?Wt(e,n):t[n])}function s1(t,e){return({length:n})=>n===2?[t[3][2],t[3][0]]:(n=Math.max(3,Math.floor(n)),n>11?Wt(r=>e(1-r),n):t[n].slice().reverse())}function An(t){return({length:e})=>Wt(t,Math.max(2,Math.floor(e)))}function l1(t){return({length:e})=>Wt(t,Math.floor(e)+1).slice(0,-1)}function Ld(t){let e=`${t}`.toLowerCase();if(!c1.has(e))throw new Error(`unknown ordinal scheme: ${e}`);return c1.get(e)}function Ma(t,e){let n=Ld(t),r=typeof n=="function"?n({length:e}):n;return r.length!==e?r.slice(0,e):r}function h1(t,e="greys"){let n=new Set,[r,o]=Ma(e,2);for(let i of t)if(i!=null)if(i===!0)n.add(o);else if(i===!1)n.add(r);else return;return[...n]}var d1=new Map([["brbg",su],["prgn",du],["piyg",mu],["puor",gu],["rdbu",co],["rdgy",yu],["rdylbu",so],["rdylgn",wu],["spectral",Mu],["burd",t=>co(1-t)],["buylrd",t=>so(1-t)],["blues",Vu],["greens",Zu],["greys",Qu],["purples",tc],["reds",nc],["oranges",oc],["turbo",pc],["viridis",hc],["magma",gc],["inferno",xc],["plasma",yc],["cividis",ic],["cubehelix",ac],["warm",uc],["cool",cc],["bugn",Tu],["bupu",Cu],["gnbu",$u],["orrd",Iu],["pubugn",Du],["pubu",Ru],["purd",Pu],["rdpu",Fu],["ylgnbu",Yu],["ylgn",Bu],["ylorbr",Xu],["ylorrd",Wu],["rainbow",sc],["sinebow",dc]]);function Io(t){let e=`${t}`.toLowerCase();if(!d1.has(e))throw new Error(`unknown quantitative scheme: ${e}`);return d1.get(e)}var r8=new Set(["brbg","prgn","piyg","puor","rdbu","rdgy","rdylbu","rdylgn","spectral","burd","buylrd"]);function g1(t){return t!=null&&r8.has(`${t}`.toLowerCase())}var Od=t=>e=>t(1-e),Pd=[0,1],x1=new Map([["number",ht],["rgb",we],["hsl",Ds],["hcl",Ns],["lab",uf]]);function Fd(t){let e=`${t}`.toLowerCase();if(!x1.has(e))throw new Error(`unknown interpolator: ${e}`);return x1.get(e)}function Do(t,e,n,{type:r,nice:o,clamp:i,zero:a,domain:f=_1(t,n),unknown:u,round:c,scheme:s,interval:d,range:l=st.get(t)===Mo?f8(n,f):st.get(t)===So?u8(n,f):st.get(t)===To?Pd:void 0,interpolate:p=st.get(t)===pe?s==null&&l!==void 0?we:Io(s!==void 0?s:r==="cyclical"?"rainbow":"turbo"):c?fr:ht,reverse:m}){if(d=nn(d,r),(r==="cyclical"||r==="sequential")&&(r="linear"),typeof p!="function"&&(p=Fd(p)),m=!!m,l!==void 0){let h=(f=kt(f)).length,g=(l=kt(l)).length;if(h!==g){if(p.length===1)throw new Error("invalid piecewise interpolator");p=Xe(p,l),l=void 0}}if(p.length===1?(m&&(p=Od(p),m=!1),l===void 0&&(l=Float64Array.from(f,(h,g)=>g/(f.length-1)),l.length===2&&(l=Pd)),e.interpolate((l===Pd?Wn:Sa)(p))):e.interpolate(p),a){let[h,g]=Ct(f);(h>0||g<0)&&(f=ha(f),Mn(f)!==Math.sign(h)?f[f.length-1]=0:f[0]=0)}return m&&(f=$n(f)),e.domain(f).unknown(u),o&&(e.nice(o8(o,r)),f=e.domain()),l!==void 0&&e.range(l),i&&e.clamp(i),{type:r,domain:f,range:l,scale:e,interpolate:p,interval:d}}function o8(t,e){return t===!0?void 0:typeof t=="number"?t:Ag(t,e)}function y1(t,e,n){return Do(t,hr(),e,n)}function b1(t,e,n){return qd(t,e,{...n,exponent:.5})}function qd(t,e,{exponent:n=1,...r}){return Do(t,Fi().exponent(n),e,{...r,type:"pow"})}function w1(t,e,{base:n=10,domain:r=c8(e),...o}){return Do(t,Pi().base(n),e,{...o,domain:r})}function v1(t,e,{constant:n=1,...r}){return Do(t,Oi().constant(n),e,r)}function M1(t,e,{range:n,quantiles:r=n===void 0?5:(n=[...n]).length,n:o=r,scheme:i="rdylbu",domain:a=s8(e),unknown:f,interpolate:u,reverse:c}){return n===void 0&&(n=u!==void 0?Wt(u,o):st.get(t)===pe?Ma(i,o):void 0),a.length>0&&(a=qi(a,n===void 0?{length:o}:n).quantiles()),kc(t,e,{domain:a,range:n,reverse:c,unknown:f})}function S1(t,e,{range:n,n:r=n===void 0?5:(n=[...n]).length,scheme:o="rdylbu",domain:i=_1(t,e),unknown:a,interpolate:f,reverse:u}){let[c,s]=Ct(i),d;return n===void 0?(d=Ae(c,s,r),d[0]<=c&&d.splice(0,1),d[d.length-1]>=s&&d.pop(),r=d.length+1,n=f!==void 0?Wt(f,r):st.get(t)===pe?Ma(o,r):void 0):(d=Wt(ht(c,s),r+1).slice(1,-1),c instanceof Date&&(d=d.map(l=>new Date(l)))),Mn(kt(i))<0&&d.reverse(),kc(t,e,{domain:d,range:n,reverse:u,unknown:a})}function kc(t,e,{domain:n=[0],unknown:r,scheme:o="rdylbu",interpolate:i,range:a=i!==void 0?Wt(i,n.length+1):st.get(t)===pe?Ma(o,n.length+1):void 0,reverse:f}){n=kt(n);let u=Mn(n);if(!isNaN(u)&&!i8(n,u))throw new Error(`the ${t} scale has a non-monotonic domain`);return f&&(a=$n(a)),{type:"threshold",scale:Yi(u<0?$n(n):n,a===void 0?[]:a).unknown(r),domain:n,range:a}}function i8(t,e){for(let n=1,r=t.length,o=t[0];n<r;++n){let i=xe(o,o=t[n]);if(i!==0&&i!==e)return!1}return!0}function T1(){return{type:"identity",scale:Ri()}}function ko(t,e=pd){return t.length?[Jt(t,({value:n})=>n===void 0?n:Jt(n,e)),Ht(t,({value:n})=>n===void 0?n:Ht(n,e))]:[0,1]}function _1(t,e){let n=st.get(t);return(n===Mo||n===To||n===So?a8:ko)(e)}function a8(t){return[0,t.length?Ht(t,({value:e})=>e===void 0?e:Ht(e,pd)):1]}function f8(t,e){let n=t.find(({radius:a})=>a!==void 0);if(n!==void 0)return[0,n.radius];let r=ye(t,.5,({value:a})=>a===void 0?NaN:ye(a,.25,ca)),o=e.map(a=>3*Math.sqrt(a/r)),i=30/Ht(o);return i<1?o.map(a=>a*i):o}function u8(t,e){let n=ln(t,({value:i})=>i===void 0?NaN:ln(i,Math.abs)),r=e.map(i=>12*i/n),o=60/Ht(r);return o<1?r.map(i=>i*o):r}function c8(t){for(let{value:e}of t)if(e!==void 0)for(let n of e){if(n>0)return ko(t,ca);if(n<0)return ko(t,vc)}return[1,10]}function s8(t){let e=[];for(let{value:n}of t)if(n!==void 0)for(let r of n)e.push(r);return e}function Sa(t){return(e,n)=>r=>t(e+r*(n-e))}function Dc(t,e,n,r,{type:o,nice:i,clamp:a,domain:f=ko(r),unknown:u,pivot:c=0,scheme:s,range:d,symmetric:l=!0,interpolate:p=st.get(t)===pe?s==null&&d!==void 0?we:Io(s!==void 0?s:"rdbu"):ht,reverse:m}){c=+c,f=kt(f);let[h,g]=f;if(f.length>2&&on(`Warning: the diverging ${t} scale domain contains extra elements.`),xe(h,g)<0&&([h,g]=[g,h],m=!m),h=Math.min(h,c),g=Math.max(g,c),typeof p!="function"&&(p=Fd(p)),d!==void 0&&(p=p.length===1?Sa(p)(...d):Xe(p,d)),m&&(p=Od(p)),l){let b=n.apply(c),x=b-n.apply(h),M=n.apply(g)-b;x<M?h=n.invert(b-M):x>M&&(g=n.invert(b+x))}return e.domain([h,c,g]).unknown(u).interpolator(p),a&&e.clamp(a),i&&e.nice(i),{type:o,domain:[h,g],pivot:c,interpolate:p,scale:e}}function C1(t,e,n){return Dc(t,Vi(),l8,e,n)}function A1(t,e,n){return Yd(t,e,{...n,exponent:.5})}function Yd(t,e,{exponent:n=1,...r}){return Dc(t,uu().exponent(n=+n),m8(n),e,{...r,type:"diverging-pow"})}function $1(t,e,{base:n=10,pivot:r=1,domain:o=ko(e,r<0?vc:ca),...i}){return Dc(t,au().base(n=+n),d8,e,{domain:o,pivot:r,...i})}function E1(t,e,{constant:n=1,...r}){return Dc(t,fu().constant(n=+n),h8(n),e,r)}var l8={apply(t){return t},invert(t){return t}},d8={apply:Math.log,invert:Math.exp},p8={apply(t){return Math.sign(t)*Math.sqrt(Math.abs(t))},invert(t){return Math.sign(t)*(t*t)}};function m8(t){return t===.5?p8:{apply(e){return Math.sign(e)*Math.pow(Math.abs(e),t)},invert(e){return Math.sign(e)*Math.pow(Math.abs(e),1/t)}}}function h8(t){return{apply(e){return Math.sign(e)*Math.log1p(Math.abs(e/t))},invert(e){return Math.sign(e)*Math.expm1(Math.abs(e))*t}}}function I1(t,e,n,r){return Do(t,e,n,r)}function k1(t,e,n){return I1(t,ru(),e,n)}function D1(t,e,n){return I1(t,ou(),e,n)}var No=Symbol("ordinal");function R1(t,e,n,{type:r,interval:o,domain:i,range:a,reverse:f,hint:u}){return o=nn(o,r),i===void 0&&(i=q1(n,o,t)),(r==="categorical"||r===No)&&(r="ordinal"),f&&(i=$n(i)),e.domain(i),a!==void 0&&(typeof a=="function"&&(a=a(i)),e.range(a)),{type:r,domain:i,range:a,scale:e,hint:u,interval:o}}function L1(t,e,{type:n,interval:r,domain:o,range:i,scheme:a,unknown:f,...u}){r=nn(r,n),o===void 0&&(o=q1(e,r,t));let c;if(st.get(t)===_o)c=g8(e),i=i===void 0?x8(c):pt(i,Co);else if(st.get(t)===pe&&(i===void 0&&(n==="ordinal"||n===No)&&(i=h1(o,a),i!==void 0&&(a=void 0)),a===void 0&&i===void 0&&(a=n==="ordinal"?"turbo":"tableau10"),a!==void 0))if(i!==void 0){let s=Io(a),d=i[0],l=i[1]-i[0];i=({length:p})=>Wt(m=>s(d+l*m),p)}else i=Ld(a);if(f===Di)throw new Error(`implicit unknown on ${t} scale is not supported`);return R1(t,pr().unknown(f),e,{...u,type:n,domain:o,range:i,hint:c})}function P1(t,e,{align:n=.5,padding:r=.5,...o}){return F1(Ll().align(n).padding(r),e,o,t)}function O1(t,e,{align:n=.5,padding:r=.1,paddingInner:o=r,paddingOuter:i=t==="fx"||t==="fy"?0:r,...a}){return F1(Ln().align(n).paddingInner(o).paddingOuter(i),e,a,t)}function F1(t,e,n,r){let{round:o}=n;return o!==void 0&&t.round(o=!!o),t=R1(r,t,e,n),t.round=o,t}function q1(t,e,n){let r=new cn;for(let{value:o,domain:i}of t){if(i!==void 0)return i();if(o!==void 0)for(let a of o)r.add(a)}if(e!==void 0){let[o,i]=Ct(r).map(e.floor,e);return e.range(o,e.offset(i))}if(r.size>1e4&&st.get(n)===de)throw new Error(`implicit ordinal domain of ${n} scale has more than 10,000 values`);return qe(r,Kt)}function N1(t,e){let n;for(let{hint:r}of t){let o=r?.[e];if(o!==void 0){if(n===void 0)n=o;else if(n!==o)return}}return n}function g8(t){return{fill:N1(t,"fill"),stroke:N1(t,"stroke")}}function x8(t){return Pt(t.fill)?sd:bc}function Ta(t,{label:e,inset:n=0,insetTop:r=n,insetRight:o=n,insetBottom:i=n,insetLeft:a=n,round:f,nice:u,clamp:c,zero:s,align:d,padding:l,projection:p,facet:{label:m=e}={},...h}={}){let g={};for(let[b,x]of t){let M=h[b],y=w8(b,x,{round:st.get(b)===de?f:void 0,nice:u,clamp:c,zero:s,align:d,padding:l,projection:p,...M});if(y){let{label:w=b==="fx"||b==="fy"?m:e,percent:v,transform:T,inset:E,insetTop:I=E!==void 0?E:b==="y"?r:0,insetRight:D=E!==void 0?E:b==="x"?o:0,insetBottom:_=E!==void 0?E:b==="y"?i:0,insetLeft:L=E!==void 0?E:b==="x"?a:0}=M||{};if(T==null)T=void 0;else if(typeof T!="function")throw new Error("invalid scale transform; not a function");y.percent=!!v,y.label=w===void 0?y8(x,y):w,y.transform=T,b==="x"||b==="fx"?(y.insetLeft=+L,y.insetRight=+D):(b==="y"||b==="fy")&&(y.insetTop=+I,y.insetBottom=+_),g[b]=y}}return g}function Bd(t){return Object.fromEntries(Object.entries(t).filter(([,{scale:e}])=>e).map(([e,{scale:n,type:r,interval:o,label:i}])=>(n.type=r,o!=null&&(n.interval=o),i!=null&&(n.label=i),[e,n])))}function U1(t,e){let{x:n,y:r,fx:o,fy:i}=t,a=o||i?Rc(e):e;o&&Y1(o,a),i&&z1(i,a);let f=o||i?Ud(t,e):e;n&&Y1(n,f),r&&z1(r,f)}function y8(t=[],e){let n;for(let{label:r}of t)if(r!==void 0){if(n===void 0)n=r;else if(n!==r)return}if(n!==void 0)return!an(e)&&e.percent&&(n=`${n} (%)`),{inferred:!0,toString:()=>n}}function Rc(t){let{marginTop:e,marginRight:n,marginBottom:r,marginLeft:o,width:i,height:a,facet:{marginTop:f,marginRight:u,marginBottom:c,marginLeft:s}}=t;return{marginTop:Math.max(e,f),marginRight:Math.max(n,u),marginBottom:Math.max(r,c),marginLeft:Math.max(o,s),width:i,height:a}}function Ud({fx:t,fy:e},n){let{marginTop:r,marginRight:o,marginBottom:i,marginLeft:a,width:f,height:u}=Rc(n);return{marginTop:r,marginRight:o,marginBottom:i,marginLeft:a,width:t?t.scale.bandwidth()+a+o:f,height:e?e.scale.bandwidth()+r+i:u,facet:{width:f,height:u}}}function Y1(t,e){if(t.range===void 0){let{insetLeft:n,insetRight:r}=t,{width:o,marginLeft:i=0,marginRight:a=0}=e,f=i+n,u=o-a-r;t.range=[f,Math.max(f,u)],an(t)||(t.range=H1(t)),t.scale.range(t.range)}X1(t)}function z1(t,e){if(t.range===void 0){let{insetTop:n,insetBottom:r}=t,{height:o,marginTop:i=0,marginBottom:a=0}=e,f=i+n,u=o-a-r;t.range=[Math.max(f,u),f],an(t)?t.range.reverse():t.range=H1(t),t.scale.range(t.range)}X1(t)}function X1(t){t.round===void 0&&M8(t)&&b8(t)<=30&&t.scale.round(!0)}function b8({scale:t}){let e=t.domain().length,[n,r]=t.range(),o=t.paddingInner?t.paddingInner():1,i=t.paddingOuter?t.paddingOuter():t.padding(),a=e-o,f=Math.abs(r-n)/Math.max(1,a+i*2);return(f-Math.floor(f))*a}function H1(t){let e=t.scale.domain().length+Xd(t);if(!(e>2))return t.range;let[n,r]=t.range;return Array.from({length:e},(o,i)=>n+i/(e-1)*(r-n))}function w8(t,e=[],n={}){let r=v8(t,e,n);if(n.type===void 0&&n.domain===void 0&&n.range===void 0&&n.interval==null&&t!=="fx"&&t!=="fy"&&an({type:r})){let o=e.map(({value:i})=>i).filter(i=>i!==void 0);o.some(zt)?on(`Warning: some data associated with the ${t} scale are dates. Dates are typically associated with a "utc" or "time" scale rather than a "${Ro(r)}" scale. If you are using a bar mark, you probably want a rect mark with the interval option instead; if you are using a group transform, you probably want a bin transform instead. If you want to treat this data as ordinal, you can specify the interval of the ${t} scale (e.g., d3.utcDay), or you can suppress this warning by setting the type of the ${t} scale to "${Ro(r)}".`):o.some(Eg)?on(`Warning: some data associated with the ${t} scale are strings that appear to be dates (e.g., YYYY-MM-DD). If these strings represent dates, you should parse them to Date objects. Dates are typically associated with a "utc" or "time" scale rather than a "${Ro(r)}" scale. If you are using a bar mark, you probably want a rect mark with the interval option instead; if you are using a group transform, you probably want a bin transform instead. If you want to treat this data as ordinal, you can suppress this warning by setting the type of the ${t} scale to "${Ro(r)}".`):o.some(Ig)&&on(`Warning: some data associated with the ${t} scale are strings that appear to be numbers. If these strings represent numbers, you should parse or coerce them to numbers. Numbers are typically associated with a "linear" scale rather than a "${Ro(r)}" scale. If you want to treat this data as ordinal, you can specify the interval of the ${t} scale (e.g., 1 for integers), or you can suppress this warning by setting the type of the ${t} scale to "${Ro(r)}".`)}switch(n.type=r,r){case"diverging":case"diverging-sqrt":case"diverging-pow":case"diverging-log":case"diverging-symlog":case"cyclical":case"sequential":case"linear":case"sqrt":case"threshold":case"quantile":case"pow":case"log":case"symlog":n=Nc(e,n,Tr);break;case"identity":switch(st.get(t)){case de:n=Nc(e,n,Tr);break;case _o:n=Nc(e,n,S8);break}break;case"utc":case"time":n=Nc(e,n,wg);break}switch(r){case"diverging":return C1(t,e,n);case"diverging-sqrt":return A1(t,e,n);case"diverging-pow":return Yd(t,e,n);case"diverging-log":return $1(t,e,n);case"diverging-symlog":return E1(t,e,n);case"categorical":case"ordinal":case No:return L1(t,e,n);case"cyclical":case"sequential":case"linear":return y1(t,e,n);case"sqrt":return b1(t,e,n);case"threshold":return kc(t,e,n);case"quantile":return M1(t,e,n);case"quantize":return S1(t,e,n);case"pow":return qd(t,e,n);case"log":return w1(t,e,n);case"symlog":return v1(t,e,n);case"utc":return D1(t,e,n);case"time":return k1(t,e,n);case"point":return P1(t,e,n);case"band":return O1(t,e,n);case"identity":return st.get(t)===de?T1():{type:"identity"};case void 0:return;default:throw new Error(`unknown scale type: ${r}`)}}function Ro(t){return typeof t=="symbol"?t.description:t}var B1={toString:()=>"projection"};function v8(t,e,{type:n,domain:r,range:o,scheme:i,pivot:a,projection:f}){if(t==="fx"||t==="fy")return"band";(t==="x"||t==="y")&&f!=null&&(n=B1);for(let{type:c}of e)if(c!==void 0){if(n===void 0)n=c;else if(n!==c)throw new Error(`scale incompatible with channel: ${n} !== ${c}`)}if(n===B1)return;if(n!==void 0)return n;if(r===void 0&&!e.some(({value:c})=>c!==void 0))return;let u=st.get(t);if(u===Mo)return"sqrt";if(u===To||u===So)return"linear";if(u===_o)return"ordinal";if((r||o||[]).length>2)return zd(u);if(r!==void 0){if(Md(r))return zd(u);if(zt(r))return"utc"}else{let c=e.map(({value:s})=>s).filter(s=>s!==void 0);if(c.some(Md))return zd(u);if(c.some(zt))return"utc"}if(u===pe){if(a!=null||g1(i))return"diverging";if(m1(i))return"categorical"}return"linear"}function zd(t){switch(t){case de:return"point";case pe:return No;default:return"ordinal"}}function Lc({type:t}){return t==="time"||t==="utc"}function an({type:t}){return t==="ordinal"||t==="point"||t==="band"||t===No}function Xd({type:t}){return t==="threshold"}function M8({type:t}){return t==="point"||t==="band"}function fn(t){if(t===void 0)return!0;let e=t.domain(),n=t(e[0]);for(let r=1,o=e.length;r<o;++r)if(t(e[r])-n)return!1;return!0}function Nc(t,{domain:e,...n},r){for(let o of t)o.value!==void 0&&(o.value=r(o.value));return{domain:e===void 0?e:r(e),...n}}function S8(t){return pt(t,Co)}function W1(t){return e=>{if(!st.has(e=`${e}`))throw new Error(`unknown scale: ${e}`);return e in t?T8(t[e]):void 0}}function T8({scale:t,type:e,domain:n,range:r,interpolate:o,interval:i,transform:a,percent:f,pivot:u}){if(e==="identity")return{type:"identity",apply:s=>s,invert:s=>s};let c=t.unknown?t.unknown():void 0;return{type:e,domain:ha(n),...r!==void 0&&{range:ha(r)},...a!==void 0&&{transform:a},...f&&{percent:f},...c!==void 0&&{unknown:c},...i!==void 0&&{interval:i},...o!==void 0&&{interpolate:o},...t.clamp&&{clamp:t.clamp()},...u!==void 0&&{pivot:u,symmetric:!1},...t.base&&{base:t.base()},...t.exponent&&{exponent:t.exponent()},...t.constant&&{constant:t.constant()},...t.align&&{align:t.align(),round:t.round()},...t.padding&&(t.paddingInner?{paddingInner:t.paddingInner(),paddingOuter:t.paddingOuter()}:{padding:t.padding()}),...t.bandwidth&&{bandwidth:t.bandwidth(),step:t.step()},apply:s=>t(s),...t.invert&&{invert:s=>t.invert(s)}}}function Pc(t){let e,n;return(...r)=>((n?.length!==r.length||n.some((o,i)=>o!==r[i]))&&(n=r,e=t(...r)),e)}var _8=Pc(t=>new Intl.NumberFormat(t)),kq=Pc((t,e)=>new Intl.DateTimeFormat(t,{timeZone:"UTC",...e&&{month:e}})),Dq=Pc((t,e)=>new Intl.DateTimeFormat(t,{timeZone:"UTC",...e&&{weekday:e}}));function C8(t="en-US"){let e=_8(t);return n=>n!=null&&!isNaN(n)?e.format(n):void 0}function A8(t){return Mc(t,"Invalid Date")}function $8(t="en-US"){let e=C8(t);return n=>(n instanceof Date?A8:typeof n=="number"?e:Et)(n)}var _e=$8();var Bt=(typeof window<"u"?window.devicePixelRatio>1:typeof it>"u")?0:.5,E8=0;function G1(){return`plot-clip-${++E8}`}function V1(t,{title:e,href:n,ariaLabel:r,ariaDescription:o,ariaHidden:i,target:a,fill:f,fillOpacity:u,stroke:c,strokeWidth:s,strokeOpacity:d,strokeLinejoin:l,strokeLinecap:p,strokeMiterlimit:m,strokeDasharray:h,strokeDashoffset:g,opacity:b,mixBlendMode:x,imageFilter:M,paintOrder:y,pointerEvents:w,shapeRendering:v,channels:T},{ariaLabel:E,fill:I="currentColor",fillOpacity:D,stroke:_="none",strokeOpacity:L,strokeWidth:F,strokeLinecap:P,strokeLinejoin:S,strokeMiterlimit:A,paintOrder:N}){I===null&&(f=null,u=null),_===null&&(c=null,d=null),Pt(I)?!Pt(_)&&(!Pt(f)||T?.fill)&&(_="none"):Pt(_)&&(!Pt(c)||T?.stroke)&&(I="none");let[O,R]=ie(f,I),[tt,Z]=It(u,D),[W,Q]=ie(c,_),[at,Ut]=It(d,L),[Oe,G]=It(b);$r(Q)||(s===void 0&&(s=F),p===void 0&&(p=P),l===void 0&&(l=S),m===void 0&&!Ng(l)&&(m=A),!$r(R)&&y===void 0&&(y=N));let[X,$]=It(s);return I!==null&&(t.fill=St(R,"currentColor"),t.fillOpacity=_a(Z,1)),_!==null&&(t.stroke=St(Q,"none"),t.strokeWidth=_a($,1),t.strokeOpacity=_a(Ut,1),t.strokeLinejoin=St(l,"miter"),t.strokeLinecap=St(p,"butt"),t.strokeMiterlimit=_a(m,4),t.strokeDasharray=St(h,"none"),t.strokeDashoffset=St(g,"0")),t.target=Et(a),t.ariaLabel=Et(E),t.ariaDescription=Et(o),t.ariaHidden=Et(i),t.opacity=_a(G,1),t.mixBlendMode=St(x,"normal"),t.imageFilter=St(M,"none"),t.paintOrder=St(y,"normal"),t.pointerEvents=St(w,"auto"),t.shapeRendering=St(v,"auto"),{title:{value:e,optional:!0,filter:null},href:{value:n,optional:!0,filter:null},ariaLabel:{value:r,optional:!0,filter:null},fill:{value:O,scale:"auto",optional:!0},fillOpacity:{value:tt,scale:"auto",optional:!0},stroke:{value:W,scale:"auto",optional:!0},strokeOpacity:{value:at,scale:"auto",optional:!0},strokeWidth:{value:X,optional:!0},opacity:{value:Oe,scale:"auto",optional:!0}}}function I8(t,e){e&&t.filter(n=>wc(e[n])).append("title").call(k8,e)}function k8(t,e){e&&t.text(n=>_e(e[n]))}function Pe(t,{target:e,tip:n},{ariaLabel:r,title:o,fill:i,fillOpacity:a,stroke:f,strokeOpacity:u,strokeWidth:c,opacity:s,href:d}){r&&et(t,"aria-label",l=>r[l]),i&&et(t,"fill",l=>i[l]),a&&et(t,"fill-opacity",l=>a[l]),f&&et(t,"stroke",l=>f[l]),u&&et(t,"stroke-opacity",l=>u[l]),c&&et(t,"stroke-width",l=>c[l]),s&&et(t,"opacity",l=>s[l]),d&&N8(t,l=>d[l],e),n||I8(t,o)}function j1(t){return t===!0?t="frame":t===!1&&(t=null),_r(t,"clip",["frame","sphere"])}function D8(t,e,n,r){let o;switch(e.clip){case"frame":{let{width:i,height:a,marginLeft:f,marginRight:u,marginTop:c,marginBottom:s}=n,d=G1();o=`url(#${d})`,t=yt("svg:g",r).call(l=>l.append("svg:clipPath").attr("id",d).append("rect").attr("x",f).attr("y",c).attr("width",i-u-f).attr("height",a-c-s)).each(function(){this.appendChild(t.node()),t.node=()=>this});break}case"sphere":{let{projection:i}=r;if(!i)throw new Error('the "sphere" clip option requires a projection');let a=G1();o=`url(#${a})`,t.append("clipPath").attr("id",a).append("path").attr("d",Si(i)({type:"Sphere"}));break}}et(t,"aria-label",e.ariaLabel),et(t,"aria-description",e.ariaDescription),et(t,"aria-hidden",e.ariaHidden),et(t,"clip-path",o)}function me(t,e,n,r){D8(t,e,n,r),et(t,"fill",e.fill),et(t,"fill-opacity",e.fillOpacity),et(t,"stroke",e.stroke),et(t,"stroke-width",e.strokeWidth),et(t,"stroke-opacity",e.strokeOpacity),et(t,"stroke-linejoin",e.strokeLinejoin),et(t,"stroke-linecap",e.strokeLinecap),et(t,"stroke-miterlimit",e.strokeMiterlimit),et(t,"stroke-dasharray",e.strokeDasharray),et(t,"stroke-dashoffset",e.strokeDashoffset),et(t,"shape-rendering",e.shapeRendering),et(t,"filter",e.imageFilter),et(t,"paint-order",e.paintOrder);let{pointerEvents:o=r.pointerSticky===!1?"none":void 0}=e;et(t,"pointer-events",o)}function he(t,e){R8(t,"mix-blend-mode",e.mixBlendMode),et(t,"opacity",e.opacity)}function N8(t,e,n){t.each(function(r){let o=e(r);if(o!=null){let i=this.ownerDocument.createElementNS(Ye.svg,"a");i.setAttribute("fill","inherit"),i.setAttributeNS(Ye.xlink,"href",o),n!=null&&i.setAttribute("target",n),this.parentNode.insertBefore(i,this).appendChild(this)}})}function et(t,e,n){n!=null&&t.attr(e,n)}function R8(t,e,n){n!=null&&t.style(e,n)}function ge(t,e,{x:n,y:r},o=Bt,i=Bt){o+=e.dx,i+=e.dy,n?.bandwidth&&(o+=n.bandwidth()/2),r?.bandwidth&&(i+=r.bandwidth()/2),(o||i)&&t.attr("transform",`translate(${o},${i})`)}function St(t,e){if((t=Et(t))!==e)return t}function _a(t,e){if((t=ct(t))!==e)return t}var L8=/^-?([_a-z]|[\240-\377]|\\[0-9a-f]{1,6}(\r\n|[ \t\r\n\f])?|\\[^\r\n\f0-9a-f])([_a-z0-9-]|[\240-\377]|\\[0-9a-f]{1,6}(\r\n|[ \t\r\n\f])?|\\[^\r\n\f0-9a-f])*$/i;function Lo(t){if(t===void 0)return"plot-d6a7b5";if(t=`${t}`,!L8.test(t))throw new Error(`invalid class name: ${t}`);return t}function Po(t,e){if(typeof e=="string")t.property("style",e);else if(e!=null)for(let n of t)Object.assign(n.style,e)}function Gn({frameAnchor:t},{width:e,height:n,marginTop:r,marginRight:o,marginBottom:i,marginLeft:a}){return[/left$/.test(t)?a:/right$/.test(t)?e-o:(a+e-o)/2,/^top/.test(t)?r:/^bottom/.test(t)?n-i:(r+n-i)/2]}function K1(t,e,n={}){let r=.5-Bt,o=.5+Bt,i=.5+Bt,a=.5-Bt;for(let{marginTop:h,marginRight:g,marginBottom:b,marginLeft:x}of e)h>r&&(r=h),g>o&&(o=g),b>i&&(i=b),x>a&&(a=x);let{margin:f,marginTop:u=f!==void 0?f:r,marginRight:c=f!==void 0?f:o,marginBottom:s=f!==void 0?f:i,marginLeft:d=f!==void 0?f:a}=n;u=+u,c=+c,s=+s,d=+d;let{width:l=640,height:p=P8(t,n,{width:l,marginTopDefault:r,marginRightDefault:o,marginBottomDefault:i,marginLeftDefault:a})+Math.max(0,u-r+s-i)}=n;l=+l,p=+p;let m={width:l,height:p,marginTop:u,marginRight:c,marginBottom:s,marginLeft:d};if(t.fx||t.fy){let{margin:h,marginTop:g=h!==void 0?h:u,marginRight:b=h!==void 0?h:c,marginBottom:x=h!==void 0?h:s,marginLeft:M=h!==void 0?h:d}=n.facet??{};g=+g,b=+b,x=+x,M=+M,m.facet={marginTop:g,marginRight:b,marginBottom:x,marginLeft:M}}return m}function P8({x:t,y:e,fy:n,fx:r},{projection:o,aspectRatio:i},{width:a,marginTopDefault:f,marginRightDefault:u,marginBottomDefault:c,marginLeftDefault:s}){let d=n?n.scale.domain().length:1,l=f1(o);if(l){let m=r?r.scale.domain().length:1,h=(1.1*d-.1)/(1.1*m-.1)*l,g=Math.max(.1,Math.min(10,h));return Math.round((a-s-u)*g+f+c)}let p=e?an(e)?e.scale.domain().length:Math.max(7,17/d):1;if(i!=null){if(i=+i,!(isFinite(i)&&i>0))throw new Error(`invalid aspectRatio: ${i}`);let m=Z1("y",e)/(Z1("x",t)*i),h=r?r.scale.bandwidth():1,g=n?n.scale.bandwidth():1,b=h*(a-s-u)-t.insetLeft-t.insetRight;return(m*b+e.insetTop+e.insetBottom)/g+f+c}return!!(e||n)*Math.max(1,Math.min(60,p*d))*20+!!r*30+60}function Z1(t,e){if(!e)throw new Error(`aspectRatio requires ${t} scale`);let{type:n,domain:r}=e,o;switch(n){case"linear":case"utc":case"time":o=Number;break;case"pow":{let f=e.scale.exponent();o=u=>Math.pow(u,f);break}case"log":o=Math.log;break;case"point":case"band":return r.length;default:throw new Error(`unsupported ${t} scale for aspectRatio: ${n}`)}let[i,a]=Ct(r);return Math.abs(o(a)-o(i))}function J1(t,e){let{fx:n,fy:r}=Ta(t,e),o=n?.scale.domain(),i=r?.scale.domain();return o&&i?La(o,i).map(([a,f],u)=>({x:a,y:f,i:u})):o?o.map((a,f)=>({x:a,i:f})):i?i.map((a,f)=>({y:a,i:f})):void 0}function tx(t,{x:e,y:n}){return e&&=jd(e),n&&=jd(n),t.filter(e&&n?r=>e.has(r.x)&&n.has(r.y):e?r=>e.has(r.x):r=>n.has(r.y)).sort(e&&n?(r,o)=>e.get(r.x)-e.get(o.x)||n.get(r.y)-n.get(o.y):e?(r,o)=>e.get(r.x)-e.get(o.x):(r,o)=>n.get(r.y)-n.get(o.y))}function Fc(t,{fx:e,fy:n}){let r=ne(t),o=e?.value,i=n?.value;return e&&n?Ce(r,a=>(a.fx=o[a[0]],a.fy=i[a[0]],a),a=>o[a],a=>i[a]):e?Ce(r,a=>(a.fx=o[a[0]],a),a=>o[a]):Ce(r,a=>(a.fy=i[a[0]],a),a=>i[a])}function ex(t,e,{marginTop:n,marginLeft:r}){return t&&e?({x:o,y:i})=>`translate(${t(o)-r},${e(i)-n})`:t?({x:o})=>`translate(${t(o)-r},0)`:({y:o})=>`translate(0,${e(o)-n})`}function nx(t){let e=[],n=new Uint32Array(fe(t,r=>r.length));for(let r of t){let o=0;for(let i of t)r!==i&&(n.set(i,o),o+=i.length);e.push(n.slice(0,o))}return e}var O8=new Map([["top",Hd],["right",Vd],["bottom",Wd],["left",Gd],["top-left",Oc(Hd,Gd)],["top-right",Oc(Hd,Vd)],["bottom-left",Oc(Wd,Gd)],["bottom-right",Oc(Wd,Vd)],["top-empty",q8],["right-empty",B8],["bottom-empty",Y8],["left-empty",z8],["empty",U8]]);function rx(t){if(t==null)return null;let e=O8.get(`${t}`.toLowerCase());if(e)return e;throw new Error(`invalid facet anchor: ${t}`)}var Q1=new WeakMap;function jd(t){let e=Q1.get(t);return e||Q1.set(t,e=new Qt(pt(t,(n,r)=>[n,r]))),e}function Vn(t,e){return jd(t).get(e)}function F8(t,e,n){return e=yo(e),n=yo(n),t.find(r=>Object.is(yo(r.x),e)&&Object.is(yo(r.y),n))}function qc(t,e,n){return F8(t,e,n)?.empty}function Hd(t,{y:e},{y:n}){return e?Vn(e,n)===0:!0}function Wd(t,{y:e},{y:n}){return e?Vn(e,n)===e.length-1:!0}function Gd(t,{x:e},{x:n}){return e?Vn(e,n)===0:!0}function Vd(t,{x:e},{x:n}){return e?Vn(e,n)===e.length-1:!0}function q8(t,{y:e},{x:n,y:r,empty:o}){if(o)return!1;if(!e)return;let i=Vn(e,r);if(i>0)return qc(t,n,e[i-1])}function Y8(t,{y:e},{x:n,y:r,empty:o}){if(o)return!1;if(!e)return;let i=Vn(e,r);if(i<e.length-1)return qc(t,n,e[i+1])}function z8(t,{x:e},{x:n,y:r,empty:o}){if(o)return!1;if(!e)return;let i=Vn(e,n);if(i>0)return qc(t,e[i-1],r)}function B8(t,{x:e},{x:n,y:r,empty:o}){if(o)return!1;if(!e)return;let i=Vn(e,n);if(i<e.length-1)return qc(t,e[i+1],r)}function U8(t,e,{empty:n}){return n}function Oc(t,e){return function(){return t.apply(null,arguments)&&e.apply(null,arguments)}}function Yc(t,{channels:{fx:e,fy:n},groups:r}){return e&&n?t.map(({x:o,y:i})=>r.get(o)?.get(i)??[]):e?t.map(({x:o})=>r.get(o)??[]):t.map(({y:o})=>r.get(o)??[])}var Dt=class{constructor(e,n={},r={},o){let{facet:i="auto",facetAnchor:a,fx:f,fy:u,sort:c,dx:s=0,dy:d=0,margin:l=0,marginTop:p=l,marginRight:m=l,marginBottom:h=l,marginLeft:g=l,clip:b,channels:x,tip:M,render:y}=r;if(this.data=e,this.sort=Cr(c)?c:null,this.initializer=Er(r).initializer,this.transform=this.initializer?r.transform:Ao(r).transform,i===null||i===!1?this.facet=null:(this.facet=le(i===!0?"include":i,"facet",["auto","include","exclude","super"]),this.fx=e===go&&typeof f=="string"?[f]:f,this.fy=e===go&&typeof u=="string"?[u]:u),this.facetAnchor=rx(a),n=Td(n),x!==void 0&&(n={...X8(x),...n}),o!==void 0&&(n={...V1(this,r,o),...n}),this.channels=Object.fromEntries(Object.entries(n).map(([w,v])=>{if(ga(v.value)){let{value:T,scale:E=v.scale}=v.value;v={...v,scale:E,value:T}}if(e===go&&typeof v.value=="string"){let{value:T}=v;v={...v,value:[T]}}return[w,v]}).filter(([w,{value:v,optional:T}])=>{if(v!=null)return!0;if(T)return!1;throw new Error(`missing channel value: ${w}`)})),this.dx=+s,this.dy=+d,this.marginTop=+p,this.marginRight=+m,this.marginBottom=+h,this.marginLeft=+g,this.clip=j1(b),this.tip=H8(M),this.facet==="super"){if(f||u)throw new Error("super-faceting cannot use fx or fy");for(let w in this.channels){let{scale:v}=n[w];if(!(v!=="x"&&v!=="y"))throw new Error("super-faceting cannot use x or y")}}y!=null&&(this.render=Kd(y,this.render))}initialize(e,n,r){let o=kt(this.data);e===void 0&&o!=null&&(e=[ne(o)]);let i=e;this.transform!=null&&({facets:e,data:o}=this.transform(o,e,r),o=kt(o)),e!==void 0&&(e.original=i);let a=Gg(this.channels,o);return this.sort!=null&&jg(o,e,a,n,this.sort),{data:o,facets:e,channels:a}}filter(e,n,r){for(let o in n){let{filter:i=Ne}=n[o];if(i!==null){let a=r[o];e=e.filter(f=>i(a[f]))}}return e}project(e,n,r){for(let o in e)if(e[o].scale==="x"&&/^x|x$/.test(o)){let i=o.replace(/^x|x$/,"y");i in e&&e[i].scale==="y"&&i1(o,i,n,r.projection)}}scale(e,n,r){let o=Vg(e,n);return r.projection&&this.project(e,o,r),o}};function Zd(...t){return t.plot=Dt.prototype.plot,t}function Kd(t,e){if(t==null)return e===null?void 0:e;if(e==null)return t===null?void 0:t;if(typeof t!="function")throw new TypeError(`invalid render transform: ${t}`);if(typeof e!="function")throw new TypeError(`invalid render transform: ${e}`);return function(n,r,o,i,a,f){return t.call(this,n,r,o,i,a,(u,c,s,d,l)=>e.call(this,u,c,s,d,l,f))}}function X8(t){return Object.fromEntries(Object.entries(Td(t)).map(([e,n])=>(n=rn(n),n.filter===void 0&&n.scale==null&&(n={...n,filter:null}),[e,n])))}function H8(t){return t===!0?"xy":t===!1?null:_r(t,"tip",["x","y","xy"])}function Ca(t,e){return t?.tip===!0?{...t,tip:e}:t}var ox=new WeakMap;function Qd(t,e,{x:n,y:r,px:o,py:i,maxRadius:a=40,channels:f,render:u,...c}={}){return a=+a,o!=null&&(n??=null,f={...f,px:{value:o,scale:"x"}}),i!=null&&(r??=null,f={...f,py:{value:i,scale:"y"}}),{x:n,y:r,channels:f,...c,render:Kd(function(s,d,l,p,m,h){m={...m,pointerSticky:!1};let g=m.ownerSVGElement,{data:b}=m.getMarkState(this),x=ox.get(g);x||ox.set(g,x={sticky:!1,roots:[],renders:[]});let M=x.renders.push(Q)-1,{x:y,y:w,fx:v,fy:T}=d,E=v?v(s.fx)-p.marginLeft:0,I=T?T(s.fy)-p.marginTop:0;y?.bandwidth&&(E+=y.bandwidth()/2),w?.bandwidth&&(I+=w.bandwidth()/2);let D=s.fi!=null,_;if(D){let G=x.facetStates;G||(x.facetStates=G=new Map),_=G.get(this),_||G.set(this,_=new Map)}let[L,F]=Gn(this,p),{px:P,py:S}=l,A=P?G=>P[G]:Jd(l,L),N=S?G=>S[G]:tp(l,F),O,R,tt,Z;function W(G,X){if(D)if(Z&&(Z=cancelAnimationFrame(Z)),G==null)_.delete(s.fi);else{_.set(s.fi,X),Z=requestAnimationFrame(()=>{Z=null;for(let $ of _.values())if($<X){G=null;break}Q(G)});return}Q(G)}function Q(G){if(O===G&&tt===x.sticky)return;O=G,tt=m.pointerSticky=x.sticky;let X=O==null?[]:[O];D&&(X.fx=s.fx,X.fy=s.fy,X.fi=s.fi);let $=h(X,d,l,p,m);if(R){if(D){let q=R.parentNode,Y=R.getAttribute("transform"),C=$.getAttribute("transform");Y?$.setAttribute("transform",Y):$.removeAttribute("transform"),C?q.setAttribute("transform",C):q.removeAttribute("transform"),$.removeAttribute("aria-label"),$.removeAttribute("aria-description"),$.removeAttribute("aria-hidden")}R.replaceWith($)}return x.roots[M]=R=$,m.dispatchValue(O==null?null:b[O]),$}function at(G){if(x.sticky||G.pointerType==="mouse"&&G.buttons===1)return;let[X,$]=xs(G);X-=E,$-=I;let q=null,Y=a*a;for(let C of s){let j=t*(A(C)-X),J=e*(N(C)-$),ot=j*j+J*J;ot<=Y&&(q=C,Y=ot)}W(q,Y)}function Ut(G){G.pointerType==="mouse"&&O!=null&&(x.sticky&&x.roots.some(X=>X?.contains(G.target))||(x.sticky?(x.sticky=!1,x.renders.forEach(X=>X(null))):(x.sticky=!0,Q(O)),G.stopImmediatePropagation()))}function Oe(G){G.pointerType==="mouse"&&(x.sticky||W(null))}return g.addEventListener("pointerenter",at),g.addEventListener("pointermove",at),g.addEventListener("pointerdown",Ut),g.addEventListener("pointerleave",Oe),Q(null)},u)}}function ix(t){return Qd(1,1,t)}function ax(t){return Qd(1,.01,t)}function fx(t){return Qd(.01,1,t)}function Jd({x1:t,x2:e,x:n=t},r){return t&&e?o=>(t[o]+e[o])/2:n?o=>n[o]:()=>r}function tp({y1:t,y2:e,y:n=t},r){return t&&e?o=>(t[o]+e[o])/2:n?o=>n[o]:()=>r}function zc(t){return an(t)&&t.interval===void 0?void 0:"tabular-nums"}function ux(t,e){let{label:n=t.label,tickSize:r=6,width:o=240,height:i=44+r,marginTop:a=18,marginRight:f=0,marginBottom:u=16+r,marginLeft:c=0,style:s,ticks:d=(o-c-f)/64,tickFormat:l,fontVariant:p=zc(t),round:m=!0,opacity:h,className:g}=e,b=Eo(e);g=Lo(g),h=It(h)[1],l===null&&(l=()=>null);let x=yt("svg",b).attr("class",`${g}-ramp`).attr("font-family","system-ui, sans-serif").attr("font-size",10).attr("width",o).attr("height",i).attr("viewBox",`0 0 ${o} ${i}`).call(L=>L.append("style").text(`.${g}-ramp {
   display: block;
   background: white;
   height: auto;
@@ -14,9 +14,9 @@
 }
 .${g}-ramp text {
   white-space: pre;
-}`)).call(Po,s),M=L=>L.selectAll(".tick line").attr("y1",a+u-i),y,w=m?(L,F)=>L.rangeRound(F):(L,F)=>L.range(F),{type:v,domain:T,range:E,interpolate:I,scale:D,pivot:_}=t;if(I){let L=E===void 0?I:Xe(I.length===1?Sa(I):I,E);y=w(D.copy(),Ht(ht(c,o-f),Math.min(T.length+(_!==void 0),E===void 0?1/0:E.length)));let F=256,P=b.document.createElement("canvas");P.width=F,P.height=1;let S=P.getContext("2d");for(let A=0,N=F-1;A<F;++A)S.fillStyle=L(A/N),S.fillRect(A,0,1,1);x.append("image").attr("opacity",h).attr("x",c).attr("y",a).attr("width",o-c-f).attr("height",i-a-u).attr("preserveAspectRatio","none").attr("xlink:href",P.toDataURL())}else if(v==="threshold"){let L=T,F=l===void 0?P=>P:typeof l=="string"?Ge(l):l;y=w(hr().domain([-1,E.length-1]),[c,o-f]),x.append("g").attr("fill-opacity",h).selectAll().data(E).enter().append("rect").attr("x",(P,S)=>y(S-1)).attr("y",a).attr("width",(P,S)=>y(S)-y(S-1)).attr("height",i-a-u).attr("fill",P=>P),d=pt(L,(P,S)=>S),l=P=>F(L[P],P)}else y=w(Ln().domain(T),[c,o-f]),x.append("g").attr("fill-opacity",h).selectAll().data(T).enter().append("rect").attr("x",y).attr("y",a).attr("width",Math.max(0,y.bandwidth()-1)).attr("height",i-a-u).attr("fill",D),M=()=>{};return x.append("g").attr("transform",`translate(0,${i-u})`).call(ps(y).ticks(Array.isArray(d)?null:d,typeof l=="string"?l:void 0).tickFormat(typeof l=="function"?l:void 0).tickSize(r).tickValues(Array.isArray(d)?d:null)).attr("font-size",null).attr("font-family",null).attr("font-variant",St(p,"normal")).call(M).call(L=>L.select(".domain").remove()),n!==void 0&&x.append("text").attr("x",c).attr("y",a-6).attr("fill","currentColor").attr("font-weight","bold").text(n),x.node()}var np=Math.PI/180;function op(t,{marker:e,markerStart:n=e,markerMid:r=e,markerEnd:o=e}={}){t.markerStart=rp(n),t.markerMid=rp(r),t.markerEnd=rp(o)}function rp(t){if(t==null||t===!1)return null;if(t===!0)return lx;if(typeof t=="function")return t;switch(`${t}`.toLowerCase()){case"none":return null;case"arrow":return sx("auto");case"arrow-reverse":return sx("auto-start-reverse");case"dot":return H8;case"circle":case"circle-fill":return lx;case"circle-stroke":return G8}throw new Error(`invalid marker: ${t}`)}function sx(t){return(e,n)=>yt("svg:marker",n).attr("viewBox","-5 -5 10 10").attr("markerWidth",6.67).attr("markerHeight",6.67).attr("orient",t).attr("fill","none").attr("stroke",e).attr("stroke-width",1.5).attr("stroke-linecap","round").attr("stroke-linejoin","round").call(r=>r.append("path").attr("d","M-1.5,-3l3,3l-3,3")).node()}function H8(t,e){return yt("svg:marker",e).attr("viewBox","-5 -5 10 10").attr("markerWidth",6.67).attr("markerHeight",6.67).attr("fill",t).attr("stroke","none").call(n=>n.append("circle").attr("r",2.5)).node()}function lx(t,e){return yt("svg:marker",e).attr("viewBox","-5 -5 10 10").attr("markerWidth",6.67).attr("markerHeight",6.67).attr("fill",t).attr("stroke","white").attr("stroke-width",1.5).call(n=>n.append("circle").attr("r",3)).node()}function G8(t,e){return yt("svg:marker",e).attr("viewBox","-5 -5 10 10").attr("markerWidth",6.67).attr("markerHeight",6.67).attr("fill","white").attr("stroke",t).attr("stroke-width",1.5).call(n=>n.append("circle").attr("r",3)).node()}var V8=0;function ip(t,e,{stroke:n},r){return j8(t,e,n&&(o=>n[o]),r)}function j8(t,{markerStart:e,markerMid:n,markerEnd:r,stroke:o},i=()=>o,a){let f=new Map;function u(c){return function(s){let d=i(s),l=f.get(c);l||f.set(c,l=new Map);let p=l.get(d);if(!p){let m=this.parentNode.insertBefore(c(d,a),this),h=`plot-marker-${++V8}`;m.setAttribute("id",h),l.set(d,p=`url(#${h})`)}return p}}e&&t.attr("marker-start",u(e)),n&&t.attr("marker-mid",u(n)),r&&t.attr("marker-end",u(r))}function Oo({inset:t,insetLeft:e,insetRight:n,...r}={}){return[e,n]=dx(t,e,n),{inset:t,insetLeft:e,insetRight:n,...r}}function Bc({inset:t,insetTop:e,insetBottom:n,...r}={}){return[e,n]=dx(t,e,n),{inset:t,insetTop:e,insetBottom:n,...r}}function dx(t,e,n){return t===void 0&&e===void 0&&n===void 0?Bt?[1,0]:[.5,.5]:[e,n]}function px(t,{interval:e}){return t={...rn(t)},t.interval=Ac(t.interval===void 0?e:t.interval),t}function ap(t,e,n,r){let{[t]:o,[`${t}1`]:i,[`${t}2`]:a}=n,{value:f,interval:u}=px(o,n);if(f==null||u==null&&!r)return n;let c=Re(o);if(u==null){let p,m={transform:h=>p||(p=gt(h,f)),label:c};return{...n,[t]:void 0,[`${t}1`]:i===void 0?m:i,[`${t}2`]:a===void 0?m:a}}let s,d;function l(p){return d!==void 0&&p===s?d:d=pt(gt(s=p,f),m=>u.floor(m))}return e({...n,[t]:void 0,[`${t}1`]:i===void 0?{transform:l,label:c}:i,[`${t}2`]:a===void 0?{transform:p=>l(p).map(m=>u.offset(m)),label:c}:a})}function mx(t,e,n){let{[t]:r}=n,{value:o,interval:i}=px(r,n);return o==null||i==null?n:e({...n,[t]:{label:Re(r),transform:a=>{let f=pt(gt(a,o),c=>i.floor(c)),u=f.map(c=>i.offset(c));return f.map(zt(f)?(c,s)=>c==null||isNaN(c=+c)||(s=u[s],s==null)||isNaN(s=+s)?void 0:new Date((c+s)/2):(c,s)=>c==null||(s=u[s],s==null)?NaN:(+c+ +s)/2)}}})}function hx(t={}){return ap("x",Oo,t,!0)}function gx(t={}){return ap("x",Oo,t)}function xx(t={}){return ap("y",Bc,t)}function yx(t={}){return mx("x",Oo,t)}function bx(t={}){return mx("y",Bc,t)}var wx={ariaLabel:"rule",fill:null,stroke:"currentColor"},Uc=class extends Dt{constructor(e,n={}){let{x:r,y1:o,y2:i,inset:a=0,insetTop:f=a,insetBottom:u=a}=n;super(e,{x:{value:r,scale:"x",optional:!0},y1:{value:o,scale:"y",optional:!0},y2:{value:i,scale:"y",optional:!0}},Ca(n,"x"),wx),this.insetTop=ct(f),this.insetBottom=ct(u),op(this,n)}render(e,n,r,o,i){let{x:a,y:f}=n,{x:u,y1:c,y2:s}=r,{width:d,height:l,marginTop:p,marginRight:m,marginLeft:h,marginBottom:g}=o,{insetTop:b,insetBottom:x}=this;return yt("svg:g",i).call(me,this,o,i).call(ge,this,{x:u&&a},Bt,0).call(M=>M.selectAll().data(e).enter().append("line").call(he,this).attr("x1",u?y=>u[y]:(h+d-m)/2).attr("x2",u?y=>u[y]:(h+d-m)/2).attr("y1",c&&!fn(f)?y=>c[y]+b:p+b).attr("y2",s&&!fn(f)?f.bandwidth?y=>s[y]+f.bandwidth()-x:y=>s[y]-x:l-g-x).call(Pe,this,r).call(ip,this,r,i)).node()}},Xc=class extends Dt{constructor(e,n={}){let{x1:r,x2:o,y:i,inset:a=0,insetRight:f=a,insetLeft:u=a}=n;super(e,{y:{value:i,scale:"y",optional:!0},x1:{value:r,scale:"x",optional:!0},x2:{value:o,scale:"x",optional:!0}},Ca(n,"y"),wx),this.insetRight=ct(f),this.insetLeft=ct(u),op(this,n)}render(e,n,r,o,i){let{x:a,y:f}=n,{y:u,x1:c,x2:s}=r,{width:d,height:l,marginTop:p,marginRight:m,marginLeft:h,marginBottom:g}=o,{insetLeft:b,insetRight:x}=this;return yt("svg:g",i).call(me,this,o,i).call(ge,this,{y:u&&f},0,Bt).call(M=>M.selectAll().data(e).enter().append("line").call(he,this).attr("x1",c&&!fn(a)?y=>c[y]+b:h+b).attr("x2",s&&!fn(a)?a.bandwidth?y=>s[y]+a.bandwidth()-x:y=>s[y]-x:d-m-x).attr("y1",u?y=>u[y]:(p+l-g)/2).attr("y2",u?y=>u[y]:(p+l-g)/2).call(Pe,this,r).call(ip,this,r,i)).node()}};function fp(t,e){let{x:n=wt,y:r,y1:o,y2:i,...a}=xx(e);return[o,i]=vx(r,o,i),new Uc(t,{...a,x:n,y1:o,y2:i})}function Aa(t,e){let{y:n=wt,x:r,x1:o,x2:i,...a}=gx(e);return[o,i]=vx(r,o,i),new Xc(t,{...a,y:n,x1:o,x2:i})}function vx(t,e,n){if(t==null){if(e===void 0){if(n!==void 0)return[0,n]}else if(n===void 0)return[0,e]}else{if(e===void 0)return n===void 0?[0,t]:[t,n];if(n===void 0)return[t,e]}return[e,n]}function Wc(t,...e){let n=e.length;for(let r=0,o=!0;r<n;++r)typeof e[r]!="function"&&(o&&(t=t.slice(),o=!1),t.splice(r,2,t[r]+e[r]+t[r+1]),e.splice(r,1),--r,--n);return r=>{let o=t[0];for(let i=0;i<n;++i)o+=e[i](r)+t[i+1];return o}}var Z8={ariaLabel:"text",strokeLinejoin:"round",strokeWidth:3,paintOrder:"stroke"},Cx="\xAD",$a=class extends Dt{constructor(e,n={}){let{x:r,y:o,text:i=re(e)&&$c(e)?wt:_c,frameAnchor:a,textAnchor:f=/right$/i.test(a)?"end":/left$/i.test(a)?"start":"middle",lineAnchor:u=/^top/i.test(a)?"top":/^bottom/i.test(a)?"bottom":"middle",lineHeight:c=1,lineWidth:s=1/0,textOverflow:d,monospace:l,fontFamily:p=l?"ui-monospace, monospace":void 0,fontSize:m,fontStyle:h,fontVariant:g,fontWeight:b,rotate:x}=n,[M,y]=It(x,0),[w,v]=t5(m);if(super(e,{x:{value:r,scale:"x",optional:!0},y:{value:o,scale:"y",optional:!0},fontSize:{value:w,optional:!0},rotate:{value:Eg(M),optional:!0},text:{value:i,filter:wc,optional:!0}},n,Z8),this.rotate=y,this.textAnchor=St(f,"middle"),this.lineAnchor=le(u,"lineAnchor",["top","middle","bottom"]),this.lineHeight=+c,this.lineWidth=+s,this.textOverflow=cp(d),this.monospace=!!l,this.fontFamily=Et(p),this.fontSize=v,this.fontStyle=Et(h),this.fontVariant=Et(g),this.fontWeight=Et(b),this.frameAnchor=vo(a),!(this.lineWidth>=0))throw new Error(`invalid lineWidth: ${s}`);this.splitLines=dp(this),this.clipLine=pp(this)}render(e,n,r,o,i){let{x:a,y:f}=n,{x:u,y:c,rotate:s,text:d,title:l,fontSize:p}=r,{rotate:m}=this,[h,g]=Gn(this,o);return yt("svg:g",i).call(me,this,o,i).call(lp,this,d,o).call(ge,this,{x:u&&a,y:c&&f}).call(b=>b.selectAll().data(e).enter().append("text").call(he,this).call(K8,this,d,l).attr("transform",Wc`translate(${u?x=>u[x]:h},${c?x=>c[x]:g})${s?x=>` rotate(${s[x]})`:m?` rotate(${m})`:""}`).call(et,"font-size",p&&(x=>p[x])).call(Pe,this,r)).node()}};function cp(t){return t==null?null:le(t,"textOverflow",["clip","ellipsis","clip-start","clip-end","ellipsis-start","ellipsis-middle","ellipsis-end"]).replace(/^(clip|ellipsis)$/,"$1-end")}function K8(t,e,n,r){if(!n)return;let{lineAnchor:o,lineHeight:i,textOverflow:a,splitLines:f,clipLine:u}=e;t.each(function(c){let s=f(_e(n[c])??"").map(u),d=s.length,l=o==="top"?.71:o==="bottom"?1-d:(164-d*100)/200;if(d>1){let p=0;for(let m=0;m<d;++m){if(++p,!s[m])continue;let h=this.ownerDocument.createElementNS(Ye.svg,"tspan");h.setAttribute("x",0),m===p-1?h.setAttribute("y",`${(l+m)*i}em`):h.setAttribute("dy",`${p*i}em`),h.textContent=s[m],this.appendChild(h),p=0}}else l&&this.setAttribute("y",`${l*i}em`),this.textContent=s[0];if(a&&!r&&s[0]!==n[c]){let p=this.ownerDocument.createElementNS(Ye.svg,"title");p.textContent=n[c],this.appendChild(p)}})}function sp(t,{x:e,y:n,...r}={}){return r.frameAnchor===void 0&&([e,n]=Ar(e,n)),new $a(t,{...r,x:e,y:n})}function Ax(t,{x:e=wt,...n}={}){return new $a(t,bx({...n,x:e}))}function $x(t,{y:e=wt,...n}={}){return new $a(t,yx({...n,y:e}))}function lp(t,e,n){et(t,"text-anchor",e.textAnchor),et(t,"font-family",e.fontFamily),et(t,"font-size",e.fontSize),et(t,"font-style",e.fontStyle),et(t,"font-variant",e.fontVariant===void 0?Q8(n):e.fontVariant),et(t,"font-weight",e.fontWeight)}function Q8(t){return t&&(Dg(t)||zt(t))?"tabular-nums":void 0}var J8=new Set(["inherit","initial","revert","unset","xx-small","x-small","small","medium","large","x-large","xx-large","xxx-large","larger","smaller"]);function t5(t){return t==null||typeof t=="number"?[void 0,t]:typeof t!="string"?[t,void 0]:(t=t.trim().toLowerCase(),J8.has(t)||/^[+-]?\d*\.?\d+(e[+-]?\d+)?(\w*|%)$/.test(t)?[void 0,t]:[t,void 0])}function e5(t,e,n){let r=[],o,i=0;for(let[a,f,u]of n5(t)){if(o===void 0&&(o=a),i>o&&n(t,o,f)>e&&(r.push(t.slice(o,i)+(t[i-1]===Cx?"-":"")),o=a),u){r.push(t.slice(o,f)),o=void 0;continue}i=f}return r}function*n5(t){let e=0,n=0,r=t.length;for(;n<r;){let o=1;switch(t[n]){case Cx:case"-":++n,yield[e,n,!1],e=n;break;case" ":for(yield[e,n,!1];t[++n]===" ";);e=n;break;case"\r":t[n+1]===`
+}`)).call(Po,s),M=L=>L.selectAll(".tick line").attr("y1",a+u-i),y,w=m?(L,F)=>L.rangeRound(F):(L,F)=>L.range(F),{type:v,domain:T,range:E,interpolate:I,scale:D,pivot:_}=t;if(I){let L=E===void 0?I:Xe(I.length===1?Sa(I):I,E);y=w(D.copy(),Wt(ht(c,o-f),Math.min(T.length+(_!==void 0),E===void 0?1/0:E.length)));let F=256,P=b.document.createElement("canvas");P.width=F,P.height=1;let S=P.getContext("2d");for(let A=0,N=F-1;A<F;++A)S.fillStyle=L(A/N),S.fillRect(A,0,1,1);x.append("image").attr("opacity",h).attr("x",c).attr("y",a).attr("width",o-c-f).attr("height",i-a-u).attr("preserveAspectRatio","none").attr("xlink:href",P.toDataURL())}else if(v==="threshold"){let L=T,F=l===void 0?P=>P:typeof l=="string"?Ge(l):l;y=w(hr().domain([-1,E.length-1]),[c,o-f]),x.append("g").attr("fill-opacity",h).selectAll().data(E).enter().append("rect").attr("x",(P,S)=>y(S-1)).attr("y",a).attr("width",(P,S)=>y(S)-y(S-1)).attr("height",i-a-u).attr("fill",P=>P),d=pt(L,(P,S)=>S),l=P=>F(L[P],P)}else y=w(Ln().domain(T),[c,o-f]),x.append("g").attr("fill-opacity",h).selectAll().data(T).enter().append("rect").attr("x",y).attr("y",a).attr("width",Math.max(0,y.bandwidth()-1)).attr("height",i-a-u).attr("fill",D),M=()=>{};return x.append("g").attr("transform",`translate(0,${i-u})`).call(ds(y).ticks(Array.isArray(d)?null:d,typeof l=="string"?l:void 0).tickFormat(typeof l=="function"?l:void 0).tickSize(r).tickValues(Array.isArray(d)?d:null)).attr("font-size",null).attr("font-family",null).attr("font-variant",St(p,"normal")).call(M).call(L=>L.select(".domain").remove()),n!==void 0&&x.append("text").attr("x",c).attr("y",a-6).attr("fill","currentColor").attr("font-weight","bold").text(n),x.node()}var ep=Math.PI/180;function rp(t,{marker:e,markerStart:n=e,markerMid:r=e,markerEnd:o=e}={}){t.markerStart=np(n),t.markerMid=np(r),t.markerEnd=np(o)}function np(t){if(t==null||t===!1)return null;if(t===!0)return sx;if(typeof t=="function")return t;switch(`${t}`.toLowerCase()){case"none":return null;case"arrow":return cx("auto");case"arrow-reverse":return cx("auto-start-reverse");case"dot":return W8;case"circle":case"circle-fill":return sx;case"circle-stroke":return G8}throw new Error(`invalid marker: ${t}`)}function cx(t){return(e,n)=>yt("svg:marker",n).attr("viewBox","-5 -5 10 10").attr("markerWidth",6.67).attr("markerHeight",6.67).attr("orient",t).attr("fill","none").attr("stroke",e).attr("stroke-width",1.5).attr("stroke-linecap","round").attr("stroke-linejoin","round").call(r=>r.append("path").attr("d","M-1.5,-3l3,3l-3,3")).node()}function W8(t,e){return yt("svg:marker",e).attr("viewBox","-5 -5 10 10").attr("markerWidth",6.67).attr("markerHeight",6.67).attr("fill",t).attr("stroke","none").call(n=>n.append("circle").attr("r",2.5)).node()}function sx(t,e){return yt("svg:marker",e).attr("viewBox","-5 -5 10 10").attr("markerWidth",6.67).attr("markerHeight",6.67).attr("fill",t).attr("stroke","white").attr("stroke-width",1.5).call(n=>n.append("circle").attr("r",3)).node()}function G8(t,e){return yt("svg:marker",e).attr("viewBox","-5 -5 10 10").attr("markerWidth",6.67).attr("markerHeight",6.67).attr("fill","white").attr("stroke",t).attr("stroke-width",1.5).call(n=>n.append("circle").attr("r",3)).node()}var V8=0;function op(t,e,{stroke:n},r){return j8(t,e,n&&(o=>n[o]),r)}function j8(t,{markerStart:e,markerMid:n,markerEnd:r,stroke:o},i=()=>o,a){let f=new Map;function u(c){return function(s){let d=i(s),l=f.get(c);l||f.set(c,l=new Map);let p=l.get(d);if(!p){let m=this.parentNode.insertBefore(c(d,a),this),h=`plot-marker-${++V8}`;m.setAttribute("id",h),l.set(d,p=`url(#${h})`)}return p}}e&&t.attr("marker-start",u(e)),n&&t.attr("marker-mid",u(n)),r&&t.attr("marker-end",u(r))}function Oo({inset:t,insetLeft:e,insetRight:n,...r}={}){return[e,n]=lx(t,e,n),{inset:t,insetLeft:e,insetRight:n,...r}}function Bc({inset:t,insetTop:e,insetBottom:n,...r}={}){return[e,n]=lx(t,e,n),{inset:t,insetTop:e,insetBottom:n,...r}}function lx(t,e,n){return t===void 0&&e===void 0&&n===void 0?Bt?[1,0]:[.5,.5]:[e,n]}function dx(t,{interval:e}){return t={...rn(t)},t.interval=Ac(t.interval===void 0?e:t.interval),t}function ip(t,e,n,r){let{[t]:o,[`${t}1`]:i,[`${t}2`]:a}=n,{value:f,interval:u}=dx(o,n);if(f==null||u==null&&!r)return n;let c=Re(o);if(u==null){let p,m={transform:h=>p||(p=gt(h,f)),label:c};return{...n,[t]:void 0,[`${t}1`]:i===void 0?m:i,[`${t}2`]:a===void 0?m:a}}let s,d;function l(p){return d!==void 0&&p===s?d:d=pt(gt(s=p,f),m=>u.floor(m))}return e({...n,[t]:void 0,[`${t}1`]:i===void 0?{transform:l,label:c}:i,[`${t}2`]:a===void 0?{transform:p=>l(p).map(m=>u.offset(m)),label:c}:a})}function px(t,e,n){let{[t]:r}=n,{value:o,interval:i}=dx(r,n);return o==null||i==null?n:e({...n,[t]:{label:Re(r),transform:a=>{let f=pt(gt(a,o),c=>i.floor(c)),u=f.map(c=>i.offset(c));return f.map(zt(f)?(c,s)=>c==null||isNaN(c=+c)||(s=u[s],s==null)||isNaN(s=+s)?void 0:new Date((c+s)/2):(c,s)=>c==null||(s=u[s],s==null)?NaN:(+c+ +s)/2)}}})}function mx(t={}){return ip("x",Oo,t,!0)}function hx(t={}){return ip("x",Oo,t)}function gx(t={}){return ip("y",Bc,t)}function xx(t={}){return px("x",Oo,t)}function yx(t={}){return px("y",Bc,t)}var bx={ariaLabel:"rule",fill:null,stroke:"currentColor"},Uc=class extends Dt{constructor(e,n={}){let{x:r,y1:o,y2:i,inset:a=0,insetTop:f=a,insetBottom:u=a}=n;super(e,{x:{value:r,scale:"x",optional:!0},y1:{value:o,scale:"y",optional:!0},y2:{value:i,scale:"y",optional:!0}},Ca(n,"x"),bx),this.insetTop=ct(f),this.insetBottom=ct(u),rp(this,n)}render(e,n,r,o,i){let{x:a,y:f}=n,{x:u,y1:c,y2:s}=r,{width:d,height:l,marginTop:p,marginRight:m,marginLeft:h,marginBottom:g}=o,{insetTop:b,insetBottom:x}=this;return yt("svg:g",i).call(me,this,o,i).call(ge,this,{x:u&&a},Bt,0).call(M=>M.selectAll().data(e).enter().append("line").call(he,this).attr("x1",u?y=>u[y]:(h+d-m)/2).attr("x2",u?y=>u[y]:(h+d-m)/2).attr("y1",c&&!fn(f)?y=>c[y]+b:p+b).attr("y2",s&&!fn(f)?f.bandwidth?y=>s[y]+f.bandwidth()-x:y=>s[y]-x:l-g-x).call(Pe,this,r).call(op,this,r,i)).node()}},Xc=class extends Dt{constructor(e,n={}){let{x1:r,x2:o,y:i,inset:a=0,insetRight:f=a,insetLeft:u=a}=n;super(e,{y:{value:i,scale:"y",optional:!0},x1:{value:r,scale:"x",optional:!0},x2:{value:o,scale:"x",optional:!0}},Ca(n,"y"),bx),this.insetRight=ct(f),this.insetLeft=ct(u),rp(this,n)}render(e,n,r,o,i){let{x:a,y:f}=n,{y:u,x1:c,x2:s}=r,{width:d,height:l,marginTop:p,marginRight:m,marginLeft:h,marginBottom:g}=o,{insetLeft:b,insetRight:x}=this;return yt("svg:g",i).call(me,this,o,i).call(ge,this,{y:u&&f},0,Bt).call(M=>M.selectAll().data(e).enter().append("line").call(he,this).attr("x1",c&&!fn(a)?y=>c[y]+b:h+b).attr("x2",s&&!fn(a)?a.bandwidth?y=>s[y]+a.bandwidth()-x:y=>s[y]-x:d-m-x).attr("y1",u?y=>u[y]:(p+l-g)/2).attr("y2",u?y=>u[y]:(p+l-g)/2).call(Pe,this,r).call(op,this,r,i)).node()}};function ap(t,e){let{x:n=wt,y:r,y1:o,y2:i,...a}=gx(e);return[o,i]=wx(r,o,i),new Uc(t,{...a,x:n,y1:o,y2:i})}function Aa(t,e){let{y:n=wt,x:r,x1:o,x2:i,...a}=hx(e);return[o,i]=wx(r,o,i),new Xc(t,{...a,y:n,x1:o,x2:i})}function wx(t,e,n){if(t==null){if(e===void 0){if(n!==void 0)return[0,n]}else if(n===void 0)return[0,e]}else{if(e===void 0)return n===void 0?[0,t]:[t,n];if(n===void 0)return[t,e]}return[e,n]}function Hc(t,...e){let n=e.length;for(let r=0,o=!0;r<n;++r)typeof e[r]!="function"&&(o&&(t=t.slice(),o=!1),t.splice(r,2,t[r]+e[r]+t[r+1]),e.splice(r,1),--r,--n);return r=>{let o=t[0];for(let i=0;i<n;++i)o+=e[i](r)+t[i+1];return o}}var Z8={ariaLabel:"text",strokeLinejoin:"round",strokeWidth:3,paintOrder:"stroke"},_x="\xAD",$a=class extends Dt{constructor(e,n={}){let{x:r,y:o,text:i=re(e)&&$c(e)?wt:_c,frameAnchor:a,textAnchor:f=/right$/i.test(a)?"end":/left$/i.test(a)?"start":"middle",lineAnchor:u=/^top/i.test(a)?"top":/^bottom/i.test(a)?"bottom":"middle",lineHeight:c=1,lineWidth:s=1/0,textOverflow:d,monospace:l,fontFamily:p=l?"ui-monospace, monospace":void 0,fontSize:m,fontStyle:h,fontVariant:g,fontWeight:b,rotate:x}=n,[M,y]=It(x,0),[w,v]=t5(m);if(super(e,{x:{value:r,scale:"x",optional:!0},y:{value:o,scale:"y",optional:!0},fontSize:{value:w,optional:!0},rotate:{value:$g(M),optional:!0},text:{value:i,filter:wc,optional:!0}},n,Z8),this.rotate=y,this.textAnchor=St(f,"middle"),this.lineAnchor=le(u,"lineAnchor",["top","middle","bottom"]),this.lineHeight=+c,this.lineWidth=+s,this.textOverflow=up(d),this.monospace=!!l,this.fontFamily=Et(p),this.fontSize=v,this.fontStyle=Et(h),this.fontVariant=Et(g),this.fontWeight=Et(b),this.frameAnchor=vo(a),!(this.lineWidth>=0))throw new Error(`invalid lineWidth: ${s}`);this.splitLines=lp(this),this.clipLine=dp(this)}render(e,n,r,o,i){let{x:a,y:f}=n,{x:u,y:c,rotate:s,text:d,title:l,fontSize:p}=r,{rotate:m}=this,[h,g]=Gn(this,o);return yt("svg:g",i).call(me,this,o,i).call(sp,this,d,o).call(ge,this,{x:u&&a,y:c&&f}).call(b=>b.selectAll().data(e).enter().append("text").call(he,this).call(K8,this,d,l).attr("transform",Hc`translate(${u?x=>u[x]:h},${c?x=>c[x]:g})${s?x=>` rotate(${s[x]})`:m?` rotate(${m})`:""}`).call(et,"font-size",p&&(x=>p[x])).call(Pe,this,r)).node()}};function up(t){return t==null?null:le(t,"textOverflow",["clip","ellipsis","clip-start","clip-end","ellipsis-start","ellipsis-middle","ellipsis-end"]).replace(/^(clip|ellipsis)$/,"$1-end")}function K8(t,e,n,r){if(!n)return;let{lineAnchor:o,lineHeight:i,textOverflow:a,splitLines:f,clipLine:u}=e;t.each(function(c){let s=f(_e(n[c])??"").map(u),d=s.length,l=o==="top"?.71:o==="bottom"?1-d:(164-d*100)/200;if(d>1){let p=0;for(let m=0;m<d;++m){if(++p,!s[m])continue;let h=this.ownerDocument.createElementNS(Ye.svg,"tspan");h.setAttribute("x",0),m===p-1?h.setAttribute("y",`${(l+m)*i}em`):h.setAttribute("dy",`${p*i}em`),h.textContent=s[m],this.appendChild(h),p=0}}else l&&this.setAttribute("y",`${l*i}em`),this.textContent=s[0];if(a&&!r&&s[0]!==n[c]){let p=this.ownerDocument.createElementNS(Ye.svg,"title");p.textContent=n[c],this.appendChild(p)}})}function cp(t,{x:e,y:n,...r}={}){return r.frameAnchor===void 0&&([e,n]=Ar(e,n)),new $a(t,{...r,x:e,y:n})}function Cx(t,{x:e=wt,...n}={}){return new $a(t,yx({...n,x:e}))}function Ax(t,{y:e=wt,...n}={}){return new $a(t,xx({...n,y:e}))}function sp(t,e,n){et(t,"text-anchor",e.textAnchor),et(t,"font-family",e.fontFamily),et(t,"font-size",e.fontSize),et(t,"font-style",e.fontStyle),et(t,"font-variant",e.fontVariant===void 0?Q8(n):e.fontVariant),et(t,"font-weight",e.fontWeight)}function Q8(t){return t&&(kg(t)||zt(t))?"tabular-nums":void 0}var J8=new Set(["inherit","initial","revert","unset","xx-small","x-small","small","medium","large","x-large","xx-large","xxx-large","larger","smaller"]);function t5(t){return t==null||typeof t=="number"?[void 0,t]:typeof t!="string"?[t,void 0]:(t=t.trim().toLowerCase(),J8.has(t)||/^[+-]?\d*\.?\d+(e[+-]?\d+)?(\w*|%)$/.test(t)?[void 0,t]:[t,void 0])}function e5(t,e,n){let r=[],o,i=0;for(let[a,f,u]of n5(t)){if(o===void 0&&(o=a),i>o&&n(t,o,f)>e&&(r.push(t.slice(o,i)+(t[i-1]===_x?"-":"")),o=a),u){r.push(t.slice(o,f)),o=void 0;continue}i=f}return r}function*n5(t){let e=0,n=0,r=t.length;for(;n<r;){let o=1;switch(t[n]){case _x:case"-":++n,yield[e,n,!1],e=n;break;case" ":for(yield[e,n,!1];t[++n]===" ";);e=n;break;case"\r":t[n+1]===`
 `&&++o;case`
-`:yield[e,n,!0],n+=o,e=n;break;default:++n;break}}yield[e,n,!0]}var Mx={a:56,b:63,c:57,d:63,e:58,f:37,g:62,h:60,i:26,j:26,k:55,l:26,m:88,n:60,o:60,p:62,q:62,r:39,s:54,t:38,u:60,v:55,w:79,x:54,y:55,z:55,A:69,B:67,C:73,D:74,E:61,F:58,G:76,H:75,I:28,J:55,K:67,L:58,M:89,N:75,O:78,P:65,Q:78,R:67,S:65,T:65,U:75,V:69,W:98,X:69,Y:67,Z:67,0:64,1:48,2:62,3:64,4:66,5:63,6:65,7:58,8:65,9:65," ":29,"!":32,'"':49,"'":31,"(":39,")":39,",":31,"-":48,".":31,"/":32,":":31,";":31,"?":52,"\u2018":31,"\u2019":31,"\u201C":47,"\u201D":47,"\u2026":82};function Hc(t,e=0,n=t.length){let r=0;for(let o=e;o<n;o=Fo(t,o))r+=Mx[t[o]]??(Ix(t,o)?120:Mx.e);return r}function Gc(t,e=0,n=t.length){let r=0;for(let o=e;o<n;o=Fo(t,o))r+=Ix(t,o)?200:100;return r}function dp({monospace:t,lineWidth:e,textOverflow:n}){if(n!=null||e==1/0)return i=>i.split(/\r\n?|\n/g);let r=t?Gc:Hc,o=e*100;return i=>e5(i,o,r)}function pp({monospace:t,lineWidth:e,textOverflow:n}){if(n==null||e==1/0)return i=>i;let r=t?Gc:Hc,o=e*100;switch(n){case"clip-start":return i=>Tx(i,o,r,"");case"clip-end":return i=>Sx(i,o,r,"");case"ellipsis-start":return i=>Tx(i,o,r,Ir);case"ellipsis-middle":return i=>r5(i,o,r,Ir);case"ellipsis-end":return i=>Sx(i,o,r,Ir)}}var Ir="\u2026";function kr(t,e,n,r){let o=[],i=0;for(let a=0,f=0,u=t.length;a<u;a=f){f=Fo(t,a);let c=n(t,a,f);if(i+c>e){for(i+=r;i>e&&a>0;)f=a,a=o.pop(),i-=n(t,a,f);return[a,e-i]}i+=c,o.push(a)}return[-1,0]}function Sx(t,e,n,r){t=t.trim();let o=n(r),[i]=kr(t,e,n,o);return i<0?t:t.slice(0,i).trimEnd()+r}function r5(t,e,n,r){t=t.trim();let o=n(t);if(o<=e)return t;let i=n(r)/2,[a,f]=kr(t,e/2,n,i),[u]=kr(t,o-e/2-f+i,n,-i);return u<0?r:t.slice(0,a).trimEnd()+r+t.slice(Fo(t,u)).trimStart()}function Tx(t,e,n,r){t=t.trim();let o=n(t);if(o<=e)return t;let i=n(r),[a]=kr(t,o-e+i,n,-i);return a<0?r:r+t.slice(Fo(t,a)).trimStart()}var up=/[\p{Combining_Mark}\p{Emoji_Modifier}]+/uy,_x=/\p{Extended_Pictographic}/uy;function Fo(t,e){return e+=o5(t,e)?2:1,a5(t,e)&&(e=up.lastIndex),i5(t,e)?Fo(t,e+1):e}function Ex(t,e){return t.charCodeAt(e)<128}function o5(t,e){let n=t.charCodeAt(e);if(n>=55296&&n<56320){let r=t.charCodeAt(e+1);return r>=56320&&r<57344}return!1}function i5(t,e){return t.charCodeAt(e)===8205}function a5(t,e){return Ex(t,e)?!1:(up.lastIndex=e,up.test(t))}function Ix(t,e){return Ex(t,e)?!1:(_x.lastIndex=e,_x.test(t))}var f5={ariaLabel:"vector",fill:"none",stroke:"currentColor",strokeWidth:1.5,strokeLinejoin:"round",strokeLinecap:"round"},kx=3.5,u5=kx*5,Dx={draw(t,e,n){let r=e*n/u5;t.moveTo(0,0),t.lineTo(0,-e),t.moveTo(-r,r-e),t.lineTo(0,-e),t.lineTo(r,r-e)}},c5={draw(t,e,n){t.moveTo(-n,0),t.lineTo(0,-e),t.lineTo(n,0)}},s5=new Map([["arrow",Dx],["spike",c5]]);function l5(t){return t&&typeof t.draw=="function"}function d5(t){if(l5(t))return t;let e=s5.get(`${t}`.toLowerCase());if(e)return e;throw new Error(`invalid shape: ${t}`)}var Vc=class extends Dt{constructor(e,n={}){let{x:r,y:o,r:i=kx,length:a,rotate:f,shape:u=Dx,anchor:c="middle",frameAnchor:s}=n,[d,l]=It(a,12),[p,m]=It(f,0);super(e,{x:{value:r,scale:"x",optional:!0},y:{value:o,scale:"y",optional:!0},length:{value:d,scale:"length",optional:!0},rotate:{value:p,optional:!0}},n,f5),this.r=+i,this.length=l,this.rotate=m,this.shape=d5(u),this.anchor=le(c,"anchor",["start","middle","end"]),this.frameAnchor=vo(s)}render(e,n,r,o,i){let{x:a,y:f}=n,{x:u,y:c,length:s,rotate:d}=r,{length:l,rotate:p,anchor:m,shape:h,r:g}=this,[b,x]=Gn(this,o);return yt("svg:g",i).call(me,this,o,i).call(ge,this,{x:u&&a,y:c&&f}).call(M=>M.selectAll().data(e).enter().append("path").call(he,this).attr("transform",Wc`translate(${u?y=>u[y]:b},${c?y=>c[y]:x})${d?y=>` rotate(${d[y]})`:p?` rotate(${p})`:""}${m==="start"?"":m==="end"?s?y=>` translate(0,${s[y]})`:` translate(0,${l})`:s?y=>` translate(0,${s[y]/2})`:` translate(0,${l/2})`}`).attr("d",s?y=>{let w=Gr();return h.draw(w,s[y],g),w}:(()=>{let y=Gr();return h.draw(y,l,g),y})()).call(Pe,this,r)).node()}};function Nx(t,e={}){let{x:n=wt,...r}=e;return new Vc(t,{...r,x:n})}function Rx(t,e={}){let{y:n=wt,...r}=e;return new Vc(t,{...r,y:n})}function jn(t,e){return arguments.length<2&&!re(t)&&(e=t,t=null),e===void 0&&(e={}),[t,e]}function jc({anchor:t}={},e){return t===void 0?e[0]:le(t,"anchor",e)}function Lx(t){return jc(t,["left","right"])}function Px(t){return jc(t,["right","left"])}function Ox(t){return jc(t,["bottom","top"])}function Fx(t){return jc(t,["top","bottom"])}function mp(){let[t,e]=jn(...arguments);return zx("y",Lx(e),t,e)}function qx(){let[t,e]=jn(...arguments);return zx("fy",Px(e),t,e)}function hp(){let[t,e]=jn(...arguments);return Bx("x",Ox(e),t,e)}function Yx(){let[t,e]=jn(...arguments);return Bx("fx",Fx(e),t,e)}function zx(t,e,n,{color:r="currentColor",opacity:o=1,stroke:i=r,strokeOpacity:a=o,strokeWidth:f=1,fill:u=r,fillOpacity:c=o,textAnchor:s,textStroke:d,textStrokeOpacity:l,textStrokeWidth:p,tickSize:m=t==="y"?6:0,tickPadding:h,tickRotate:g,x:b,margin:x,marginTop:M=x===void 0?20:x,marginRight:y=x===void 0?e==="right"?40:0:x,marginBottom:w=x===void 0?20:x,marginLeft:v=x===void 0?e==="left"?40:0:x,label:T,labelAnchor:E,labelArrow:I,labelOffset:D,..._}){return m=ct(m),h=ct(h),g=ct(g),E!==void 0&&(E=le(E,"labelAnchor",["center","top","bottom"])),I=ty(I),Kd(m&&!Pt(i)?p5(t,e,n,{stroke:i,strokeOpacity:a,strokeWidth:f,tickSize:m,tickPadding:h,tickRotate:g,x:b,..._}):null,Pt(u)?null:h5(t,e,n,{fill:u,fillOpacity:c,stroke:d,strokeOpacity:l,strokeWidth:p,textAnchor:s,tickSize:m,tickPadding:h,tickRotate:g,x:b,marginTop:M,marginRight:y,marginBottom:w,marginLeft:v,..._}),!Pt(u)&&T!==null?sp([],Zx({fill:u,fillOpacity:c,..._},function(L,F,P,S,A){let N=S[t],{marginTop:O,marginRight:R,marginBottom:tt,marginLeft:Z}=t==="y"&&A.inset||A,H=E??(N.bandwidth?"center":"top"),Q=D??(e==="right"?R:Z)-3;return H==="center"?(this.textAnchor=void 0,this.lineAnchor=e==="right"?"bottom":"top",this.frameAnchor=e,this.rotate=-90):(this.textAnchor=e==="right"?"end":"start",this.lineAnchor=H,this.frameAnchor=`${H}-${e}`,this.rotate=0),this.dy=H==="top"?3-O:H==="bottom"?tt-3:0,this.dx=e==="right"?Q:-Q,this.ariaLabel=`${t}-axis label`,{facets:[[0]],channels:{text:{value:[Jx(t,N,{anchor:e,label:T,labelAnchor:H,labelArrow:I})]}}}})):null)}function Bx(t,e,n,{color:r="currentColor",opacity:o=1,stroke:i=r,strokeOpacity:a=o,strokeWidth:f=1,fill:u=r,fillOpacity:c=o,textAnchor:s,textStroke:d,textStrokeOpacity:l,textStrokeWidth:p,tickSize:m=t==="x"?6:0,tickPadding:h,tickRotate:g,y:b,margin:x,marginTop:M=x===void 0?e==="top"?30:0:x,marginRight:y=x===void 0?20:x,marginBottom:w=x===void 0?e==="bottom"?30:0:x,marginLeft:v=x===void 0?20:x,label:T,labelAnchor:E,labelArrow:I,labelOffset:D,..._}){return m=ct(m),h=ct(h),g=ct(g),E!==void 0&&(E=le(E,"labelAnchor",["center","left","right"])),I=ty(I),Kd(m&&!Pt(i)?m5(t,e,n,{stroke:i,strokeOpacity:a,strokeWidth:f,tickSize:m,tickPadding:h,tickRotate:g,y:b,..._}):null,Pt(u)?null:g5(t,e,n,{fill:u,fillOpacity:c,stroke:d,strokeOpacity:l,strokeWidth:p,textAnchor:s,tickSize:m,tickPadding:h,tickRotate:g,y:b,marginTop:M,marginRight:y,marginBottom:w,marginLeft:v,..._}),!Pt(u)&&T!==null?sp([],Zx({fill:u,fillOpacity:c,..._},function(L,F,P,S,A){let N=S[t],{marginTop:O,marginRight:R,marginBottom:tt,marginLeft:Z}=t==="x"&&A.inset||A,H=E??(N.bandwidth?"center":"right"),Q=D??(e==="top"?O:tt)-3;return H==="center"?(this.frameAnchor=e,this.textAnchor=void 0):(this.frameAnchor=`${e}-${H}`,this.textAnchor=H==="right"?"end":"start"),this.lineAnchor=e,this.dy=e==="top"?-Q:Q,this.dx=H==="right"?R-3:H==="left"?3-Z:0,this.ariaLabel=`${t}-axis label`,{facets:[[0]],channels:{text:{value:[Jx(t,N,{anchor:e,label:T,labelAnchor:H,labelArrow:I})]}}}})):null)}function p5(t,e,n,{strokeWidth:r=1,strokeLinecap:o=null,strokeLinejoin:i=null,facetAnchor:a=e+(t==="y"?"-empty":""),frameAnchor:f=e,tickSize:u,inset:c=0,insetLeft:s=c,insetRight:d=c,dx:l=0,y:p=t==="y"?void 0:null,...m}){return qo(Rx,t,`${t}-axis tick`,n,{strokeWidth:r,strokeLinecap:o,strokeLinejoin:i,facetAnchor:a,frameAnchor:f,y:p,...m,dx:e==="left"?+l-Bt+ +s:+l+Bt-d,anchor:"start",length:u,shape:e==="left"?b5:w5})}function m5(t,e,n,{strokeWidth:r=1,strokeLinecap:o=null,strokeLinejoin:i=null,facetAnchor:a=e+(t==="x"?"-empty":""),frameAnchor:f=e,tickSize:u,inset:c=0,insetTop:s=c,insetBottom:d=c,dy:l=0,x:p=t==="x"?void 0:null,...m}){return qo(Nx,t,`${t}-axis tick`,n,{strokeWidth:r,strokeLinejoin:i,strokeLinecap:o,facetAnchor:a,frameAnchor:f,x:p,...m,dy:e==="bottom"?+l-Bt-d:+l+Bt+ +s,anchor:"start",length:u,shape:e==="bottom"?x5:y5})}function h5(t,e,n,{facetAnchor:r=e+(t==="y"?"-empty":""),frameAnchor:o=e,tickSize:i,tickRotate:a=0,tickPadding:f=Math.max(3,9-i)+(Math.abs(a)>60?4*Math.cos(a*np):0),tickFormat:u,text:c=typeof u=="function"?u:void 0,textAnchor:s=Math.abs(a)>60?"middle":e==="left"?"end":"start",lineAnchor:d=a>60?"top":a<-60?"bottom":"middle",fontVariant:l,inset:p=0,insetLeft:m=p,insetRight:h=p,dx:g=0,y:b=t==="y"?void 0:null,...x}){return qo($x,t,`${t}-axis tick label`,n,{facetAnchor:r,frameAnchor:o,text:c===void 0?null:c,textAnchor:s,lineAnchor:d,fontVariant:l,rotate:a,y:b,...x,dx:e==="left"?+g-i-f+ +m:+g+ +i+ +f-h},function(M,y,w,v){l===void 0&&(this.fontVariant=Qx(M)),c===void 0&&(v.text=Kx(M,y,w,u,e))})}function g5(t,e,n,{facetAnchor:r=e+(t==="x"?"-empty":""),frameAnchor:o=e,tickSize:i,tickRotate:a=0,tickPadding:f=Math.max(3,9-i)+(Math.abs(a)>=10?4*Math.cos(a*np):0),tickFormat:u,text:c=typeof u=="function"?u:void 0,textAnchor:s=Math.abs(a)>=10?a<0^e==="bottom"?"start":"end":"middle",lineAnchor:d=Math.abs(a)>=10?"middle":e==="bottom"?"top":"bottom",fontVariant:l,inset:p=0,insetTop:m=p,insetBottom:h=p,dy:g=0,x:b=t==="x"?void 0:null,...x}){return qo(Ax,t,`${t}-axis tick label`,n,{facetAnchor:r,frameAnchor:o,text:c===void 0?null:c,textAnchor:s,lineAnchor:d,fontVariant:l,rotate:a,x:b,...x,dy:e==="bottom"?+g+ +i+ +f-h:+g-i-f+ +m},function(M,y,w,v){l===void 0&&(this.fontVariant=Qx(M)),c===void 0&&(v.text=Kx(M,y,w,u,e))})}function Ux(){let[t,e]=jn(...arguments);return Gx("y",Lx(e),t,e)}function Xx(){let[t,e]=jn(...arguments);return Gx("fy",Px(e),t,e)}function Wx(){let[t,e]=jn(...arguments);return Vx("x",Ox(e),t,e)}function Hx(){let[t,e]=jn(...arguments);return Vx("fx",Fx(e),t,e)}function Gx(t,e,n,{y:r=t==="y"?void 0:null,x:o=null,x1:i=e==="left"?o:null,x2:a=e==="right"?o:null,...f}){return qo(Aa,t,`${t}-grid`,n,{y:r,x1:i,x2:a,...jx(f)})}function Vx(t,e,n,{x:r=t==="x"?void 0:null,y:o=null,y1:i=e==="top"?o:null,y2:a=e==="bottom"?o:null,...f}){return qo(fp,t,`${t}-grid`,n,{x:r,y1:i,y2:a,...jx(f)})}function jx({color:t="currentColor",opacity:e=.1,stroke:n=t,strokeOpacity:r=e,strokeWidth:o=1,...i}){return{stroke:n,strokeOpacity:r,strokeWidth:o,...i}}function Zx({fill:t,fillOpacity:e,fontFamily:n,fontSize:r,fontStyle:o,fontWeight:i,monospace:a,pointerEvents:f,shapeRendering:u},c){return[,t]=ie(t),[,e]=It(e),{facet:"super",x:null,y:null,fill:t,fillOpacity:e,fontFamily:n,fontSize:r,fontStyle:o,fontWeight:i,monospace:a,pointerEvents:f,shapeRendering:u,initializer:c}}function qo(t,e,n,r,o,i){let a;function f(s,d,l,p,m,h){let g=s==null&&(e==="fx"||e==="fy"),{[e]:b}=p;if(!b)throw new Error(`missing scale: ${e}`);let{ticks:x,tickSpacing:M,interval:y}=o;if(Lc(b)&&typeof x=="string"&&(y=x,x=void 0),s==null){if(re(x))s=kt(x);else if(b.ticks)if(x!==void 0)s=b.ticks(x);else if(y=nn(y===void 0?b.interval:y,b.type),y!==void 0){let[v,T]=Ct(b.domain());s=y.range(v,y.offset(y.floor(T)))}else{let[v,T]=Ct(b.range());x=(T-v)/(M===void 0?e==="x"?80:35:M),s=b.ticks(x)}else s=b.domain();e==="y"||e==="x"?d=[ne(s)]:a[e]={scale:e,value:wt}}i?.call(this,b,s,x,a);let w=Object.fromEntries(Object.entries(a).map(([v,T])=>[v,{...T,value:gt(s,T.value)}]));return g&&(d=h.filterFacets(s,w)),{data:s,facets:d,channels:w}}let u=Er(o).initializer,c=t(r,Er({...o,initializer:f},u));return r==null?(a=c.channels,c.channels={}):a={},c.ariaLabel=n,c}function Kx(t,e,n,r,o){return{value:Yo(t,e,n,r,o)}}function Yo(t,e,n,r,o){return r===void 0&&Lc(t)?hg(t,e,n,o):t.tickFormat?t.tickFormat(re(n)?null:n,r):r===void 0?pg(t.interval)?wn("%Y"):mg(t.interval)?Xn("%Y"):_e:typeof r=="string"?(zt(t.domain())?wn:Ge)(r):Hn(r)}var x5={draw(t,e){t.moveTo(0,0),t.lineTo(0,e)}},y5={draw(t,e){t.moveTo(0,0),t.lineTo(0,-e)}},b5={draw(t,e){t.moveTo(0,0),t.lineTo(-e,0)}},w5={draw(t,e){t.moveTo(0,0),t.lineTo(e,0)}};function Qx(t){return t.bandwidth&&!t.interval?void 0:"tabular-nums"}function v5(t){return Math.sign(Mn(t.domain()))*Math.sign(Mn(t.range()))}function Jx(t,e,{anchor:n,label:r=e.label,labelAnchor:o,labelArrow:i}={}){if(!(r==null||r.inferred&&M5(e)&&/^(date|time|year)$/i.test(r))){if(r=String(r),i==="auto"&&(i=(!e.bandwidth||e.interval)&&!/[↑↓→←]/.test(r)),!i)return r;if(i===!0){let a=v5(e);a&&(i=/x$/.test(t)||o==="center"?/x$/.test(t)===a<0?"left":"right":a<0?"up":"down")}switch(i){case"left":return`\u2190 ${r}`;case"right":return`${r} \u2192`;case"up":return n==="right"?`${r} \u2191`:`\u2191 ${r}`;case"down":return n==="right"?`${r} \u2193`:`\u2193 ${r}`}return r}}function ty(t="auto"){return Pt(t)?!1:typeof t=="boolean"?t:le(t,"labelArrow",["auto","up","right","down","left"])}function M5(t){return Lc(t)||t.interval!=null}function ey(t,e){if(e==null)return e;let n=t(e);if(!n)throw new Error(`scale not found: ${e}`);return n}function ny(t,{opacity:e,...n}={}){if(!an(t)&&!Wd(t))throw new Error(`swatches legend requires ordinal or threshold color scale (not ${t.type})`);return oy(t,n,(r,o,i,a)=>r.append("svg").attr("width",i).attr("height",a).attr("fill",o.scale).attr("fill-opacity",It(e)[1]).append("rect").attr("width","100%").attr("height","100%"))}function ry(t,{fill:e=t.hint?.fill!==void 0?t.hint.fill:"none",fillOpacity:n=1,stroke:r=t.hint?.stroke!==void 0?t.hint.stroke:Pt(e)?"currentColor":"none",strokeOpacity:o=1,strokeWidth:i=1.5,r:a=4.5,...f}={},u){let[c,s]=ie(e),[d,l]=ie(r),p=ey(u,c),m=ey(u,d),h=a*a*Math.PI;return n=It(n)[1],o=It(o)[1],i=It(i)[1],oy(t,f,(g,b,x,M)=>g.append("svg").attr("viewBox","-8 -8 16 16").attr("width",x).attr("height",M).attr("fill",c==="color"?y=>p.scale(y):s).attr("fill-opacity",n).attr("stroke",d==="color"?y=>m.scale(y):l).attr("stroke-opacity",o).attr("stroke-width",i).append("path").attr("d",y=>{let w=Gr();return t.scale(y).draw(w,h),w}))}function oy(t,e={},n){let{columns:r,tickFormat:o,fontVariant:i=zc(t),swatchSize:a=15,swatchWidth:f=a,swatchHeight:u=a,marginLeft:c=0,className:s,style:d,width:l}=e,p=Eo(e);s=Lo(s),typeof o!="function"&&(o=Yo(t.scale,t.domain,void 0,o));let m=yt("div",p).attr("class",`${s}-swatches ${s}-swatches-${r!=null?"columns":"wrap"}`),h;return r!=null?(h=`.${s}-swatches-columns .${s}-swatch {
+`:yield[e,n,!0],n+=o,e=n;break;default:++n;break}}yield[e,n,!0]}var vx={a:56,b:63,c:57,d:63,e:58,f:37,g:62,h:60,i:26,j:26,k:55,l:26,m:88,n:60,o:60,p:62,q:62,r:39,s:54,t:38,u:60,v:55,w:79,x:54,y:55,z:55,A:69,B:67,C:73,D:74,E:61,F:58,G:76,H:75,I:28,J:55,K:67,L:58,M:89,N:75,O:78,P:65,Q:78,R:67,S:65,T:65,U:75,V:69,W:98,X:69,Y:67,Z:67,0:64,1:48,2:62,3:64,4:66,5:63,6:65,7:58,8:65,9:65," ":29,"!":32,'"':49,"'":31,"(":39,")":39,",":31,"-":48,".":31,"/":32,":":31,";":31,"?":52,"\u2018":31,"\u2019":31,"\u201C":47,"\u201D":47,"\u2026":82};function Wc(t,e=0,n=t.length){let r=0;for(let o=e;o<n;o=Fo(t,o))r+=vx[t[o]]??(Ex(t,o)?120:vx.e);return r}function Gc(t,e=0,n=t.length){let r=0;for(let o=e;o<n;o=Fo(t,o))r+=Ex(t,o)?200:100;return r}function lp({monospace:t,lineWidth:e,textOverflow:n}){if(n!=null||e==1/0)return i=>i.split(/\r\n?|\n/g);let r=t?Gc:Wc,o=e*100;return i=>e5(i,o,r)}function dp({monospace:t,lineWidth:e,textOverflow:n}){if(n==null||e==1/0)return i=>i;let r=t?Gc:Wc,o=e*100;switch(n){case"clip-start":return i=>Sx(i,o,r,"");case"clip-end":return i=>Mx(i,o,r,"");case"ellipsis-start":return i=>Sx(i,o,r,Ir);case"ellipsis-middle":return i=>r5(i,o,r,Ir);case"ellipsis-end":return i=>Mx(i,o,r,Ir)}}var Ir="\u2026";function kr(t,e,n,r){let o=[],i=0;for(let a=0,f=0,u=t.length;a<u;a=f){f=Fo(t,a);let c=n(t,a,f);if(i+c>e){for(i+=r;i>e&&a>0;)f=a,a=o.pop(),i-=n(t,a,f);return[a,e-i]}i+=c,o.push(a)}return[-1,0]}function Mx(t,e,n,r){t=t.trim();let o=n(r),[i]=kr(t,e,n,o);return i<0?t:t.slice(0,i).trimEnd()+r}function r5(t,e,n,r){t=t.trim();let o=n(t);if(o<=e)return t;let i=n(r)/2,[a,f]=kr(t,e/2,n,i),[u]=kr(t,o-e/2-f+i,n,-i);return u<0?r:t.slice(0,a).trimEnd()+r+t.slice(Fo(t,u)).trimStart()}function Sx(t,e,n,r){t=t.trim();let o=n(t);if(o<=e)return t;let i=n(r),[a]=kr(t,o-e+i,n,-i);return a<0?r:r+t.slice(Fo(t,a)).trimStart()}var fp=/[\p{Combining_Mark}\p{Emoji_Modifier}]+/uy,Tx=/\p{Extended_Pictographic}/uy;function Fo(t,e){return e+=o5(t,e)?2:1,a5(t,e)&&(e=fp.lastIndex),i5(t,e)?Fo(t,e+1):e}function $x(t,e){return t.charCodeAt(e)<128}function o5(t,e){let n=t.charCodeAt(e);if(n>=55296&&n<56320){let r=t.charCodeAt(e+1);return r>=56320&&r<57344}return!1}function i5(t,e){return t.charCodeAt(e)===8205}function a5(t,e){return $x(t,e)?!1:(fp.lastIndex=e,fp.test(t))}function Ex(t,e){return $x(t,e)?!1:(Tx.lastIndex=e,Tx.test(t))}var f5={ariaLabel:"vector",fill:"none",stroke:"currentColor",strokeWidth:1.5,strokeLinejoin:"round",strokeLinecap:"round"},Ix=3.5,u5=Ix*5,kx={draw(t,e,n){let r=e*n/u5;t.moveTo(0,0),t.lineTo(0,-e),t.moveTo(-r,r-e),t.lineTo(0,-e),t.lineTo(r,r-e)}},c5={draw(t,e,n){t.moveTo(-n,0),t.lineTo(0,-e),t.lineTo(n,0)}},s5=new Map([["arrow",kx],["spike",c5]]);function l5(t){return t&&typeof t.draw=="function"}function d5(t){if(l5(t))return t;let e=s5.get(`${t}`.toLowerCase());if(e)return e;throw new Error(`invalid shape: ${t}`)}var Vc=class extends Dt{constructor(e,n={}){let{x:r,y:o,r:i=Ix,length:a,rotate:f,shape:u=kx,anchor:c="middle",frameAnchor:s}=n,[d,l]=It(a,12),[p,m]=It(f,0);super(e,{x:{value:r,scale:"x",optional:!0},y:{value:o,scale:"y",optional:!0},length:{value:d,scale:"length",optional:!0},rotate:{value:p,optional:!0}},n,f5),this.r=+i,this.length=l,this.rotate=m,this.shape=d5(u),this.anchor=le(c,"anchor",["start","middle","end"]),this.frameAnchor=vo(s)}render(e,n,r,o,i){let{x:a,y:f}=n,{x:u,y:c,length:s,rotate:d}=r,{length:l,rotate:p,anchor:m,shape:h,r:g}=this,[b,x]=Gn(this,o);return yt("svg:g",i).call(me,this,o,i).call(ge,this,{x:u&&a,y:c&&f}).call(M=>M.selectAll().data(e).enter().append("path").call(he,this).attr("transform",Hc`translate(${u?y=>u[y]:b},${c?y=>c[y]:x})${d?y=>` rotate(${d[y]})`:p?` rotate(${p})`:""}${m==="start"?"":m==="end"?s?y=>` translate(0,${s[y]})`:` translate(0,${l})`:s?y=>` translate(0,${s[y]/2})`:` translate(0,${l/2})`}`).attr("d",s?y=>{let w=Gr();return h.draw(w,s[y],g),w}:(()=>{let y=Gr();return h.draw(y,l,g),y})()).call(Pe,this,r)).node()}};function Dx(t,e={}){let{x:n=wt,...r}=e;return new Vc(t,{...r,x:n})}function Nx(t,e={}){let{y:n=wt,...r}=e;return new Vc(t,{...r,y:n})}function jn(t,e){return arguments.length<2&&!re(t)&&(e=t,t=null),e===void 0&&(e={}),[t,e]}function jc({anchor:t}={},e){return t===void 0?e[0]:le(t,"anchor",e)}function Rx(t){return jc(t,["left","right"])}function Lx(t){return jc(t,["right","left"])}function Px(t){return jc(t,["bottom","top"])}function Ox(t){return jc(t,["top","bottom"])}function pp(){let[t,e]=jn(...arguments);return Yx("y",Rx(e),t,e)}function Fx(){let[t,e]=jn(...arguments);return Yx("fy",Lx(e),t,e)}function mp(){let[t,e]=jn(...arguments);return zx("x",Px(e),t,e)}function qx(){let[t,e]=jn(...arguments);return zx("fx",Ox(e),t,e)}function Yx(t,e,n,{color:r="currentColor",opacity:o=1,stroke:i=r,strokeOpacity:a=o,strokeWidth:f=1,fill:u=r,fillOpacity:c=o,textAnchor:s,textStroke:d,textStrokeOpacity:l,textStrokeWidth:p,tickSize:m=t==="y"?6:0,tickPadding:h,tickRotate:g,x:b,margin:x,marginTop:M=x===void 0?20:x,marginRight:y=x===void 0?e==="right"?40:0:x,marginBottom:w=x===void 0?20:x,marginLeft:v=x===void 0?e==="left"?40:0:x,label:T,labelAnchor:E,labelArrow:I,labelOffset:D,..._}){return m=ct(m),h=ct(h),g=ct(g),E!==void 0&&(E=le(E,"labelAnchor",["center","top","bottom"])),I=Jx(I),Zd(m&&!Pt(i)?p5(t,e,n,{stroke:i,strokeOpacity:a,strokeWidth:f,tickSize:m,tickPadding:h,tickRotate:g,x:b,..._}):null,Pt(u)?null:h5(t,e,n,{fill:u,fillOpacity:c,stroke:d,strokeOpacity:l,strokeWidth:p,textAnchor:s,tickSize:m,tickPadding:h,tickRotate:g,x:b,marginTop:M,marginRight:y,marginBottom:w,marginLeft:v,..._}),!Pt(u)&&T!==null?cp([],jx({fill:u,fillOpacity:c,..._},function(L,F,P,S,A){let N=S[t],{marginTop:O,marginRight:R,marginBottom:tt,marginLeft:Z}=t==="y"&&A.inset||A,W=E??(N.bandwidth?"center":"top"),Q=D??(e==="right"?R:Z)-3;return W==="center"?(this.textAnchor=void 0,this.lineAnchor=e==="right"?"bottom":"top",this.frameAnchor=e,this.rotate=-90):(this.textAnchor=e==="right"?"end":"start",this.lineAnchor=W,this.frameAnchor=`${W}-${e}`,this.rotate=0),this.dy=W==="top"?3-O:W==="bottom"?tt-3:0,this.dx=e==="right"?Q:-Q,this.ariaLabel=`${t}-axis label`,{facets:[[0]],channels:{text:{value:[Qx(t,N,{anchor:e,label:T,labelAnchor:W,labelArrow:I})]}}}})):null)}function zx(t,e,n,{color:r="currentColor",opacity:o=1,stroke:i=r,strokeOpacity:a=o,strokeWidth:f=1,fill:u=r,fillOpacity:c=o,textAnchor:s,textStroke:d,textStrokeOpacity:l,textStrokeWidth:p,tickSize:m=t==="x"?6:0,tickPadding:h,tickRotate:g,y:b,margin:x,marginTop:M=x===void 0?e==="top"?30:0:x,marginRight:y=x===void 0?20:x,marginBottom:w=x===void 0?e==="bottom"?30:0:x,marginLeft:v=x===void 0?20:x,label:T,labelAnchor:E,labelArrow:I,labelOffset:D,..._}){return m=ct(m),h=ct(h),g=ct(g),E!==void 0&&(E=le(E,"labelAnchor",["center","left","right"])),I=Jx(I),Zd(m&&!Pt(i)?m5(t,e,n,{stroke:i,strokeOpacity:a,strokeWidth:f,tickSize:m,tickPadding:h,tickRotate:g,y:b,..._}):null,Pt(u)?null:g5(t,e,n,{fill:u,fillOpacity:c,stroke:d,strokeOpacity:l,strokeWidth:p,textAnchor:s,tickSize:m,tickPadding:h,tickRotate:g,y:b,marginTop:M,marginRight:y,marginBottom:w,marginLeft:v,..._}),!Pt(u)&&T!==null?cp([],jx({fill:u,fillOpacity:c,..._},function(L,F,P,S,A){let N=S[t],{marginTop:O,marginRight:R,marginBottom:tt,marginLeft:Z}=t==="x"&&A.inset||A,W=E??(N.bandwidth?"center":"right"),Q=D??(e==="top"?O:tt)-3;return W==="center"?(this.frameAnchor=e,this.textAnchor=void 0):(this.frameAnchor=`${e}-${W}`,this.textAnchor=W==="right"?"end":"start"),this.lineAnchor=e,this.dy=e==="top"?-Q:Q,this.dx=W==="right"?R-3:W==="left"?3-Z:0,this.ariaLabel=`${t}-axis label`,{facets:[[0]],channels:{text:{value:[Qx(t,N,{anchor:e,label:T,labelAnchor:W,labelArrow:I})]}}}})):null)}function p5(t,e,n,{strokeWidth:r=1,strokeLinecap:o=null,strokeLinejoin:i=null,facetAnchor:a=e+(t==="y"?"-empty":""),frameAnchor:f=e,tickSize:u,inset:c=0,insetLeft:s=c,insetRight:d=c,dx:l=0,y:p=t==="y"?void 0:null,...m}){return qo(Nx,t,`${t}-axis tick`,n,{strokeWidth:r,strokeLinecap:o,strokeLinejoin:i,facetAnchor:a,frameAnchor:f,y:p,...m,dx:e==="left"?+l-Bt+ +s:+l+Bt-d,anchor:"start",length:u,shape:e==="left"?b5:w5})}function m5(t,e,n,{strokeWidth:r=1,strokeLinecap:o=null,strokeLinejoin:i=null,facetAnchor:a=e+(t==="x"?"-empty":""),frameAnchor:f=e,tickSize:u,inset:c=0,insetTop:s=c,insetBottom:d=c,dy:l=0,x:p=t==="x"?void 0:null,...m}){return qo(Dx,t,`${t}-axis tick`,n,{strokeWidth:r,strokeLinejoin:i,strokeLinecap:o,facetAnchor:a,frameAnchor:f,x:p,...m,dy:e==="bottom"?+l-Bt-d:+l+Bt+ +s,anchor:"start",length:u,shape:e==="bottom"?x5:y5})}function h5(t,e,n,{facetAnchor:r=e+(t==="y"?"-empty":""),frameAnchor:o=e,tickSize:i,tickRotate:a=0,tickPadding:f=Math.max(3,9-i)+(Math.abs(a)>60?4*Math.cos(a*ep):0),tickFormat:u,text:c=typeof u=="function"?u:void 0,textAnchor:s=Math.abs(a)>60?"middle":e==="left"?"end":"start",lineAnchor:d=a>60?"top":a<-60?"bottom":"middle",fontVariant:l,inset:p=0,insetLeft:m=p,insetRight:h=p,dx:g=0,y:b=t==="y"?void 0:null,...x}){return qo(Ax,t,`${t}-axis tick label`,n,{facetAnchor:r,frameAnchor:o,text:c===void 0?null:c,textAnchor:s,lineAnchor:d,fontVariant:l,rotate:a,y:b,...x,dx:e==="left"?+g-i-f+ +m:+g+ +i+ +f-h},function(M,y,w,v){l===void 0&&(this.fontVariant=Kx(M)),c===void 0&&(v.text=Zx(M,y,w,u,e))})}function g5(t,e,n,{facetAnchor:r=e+(t==="x"?"-empty":""),frameAnchor:o=e,tickSize:i,tickRotate:a=0,tickPadding:f=Math.max(3,9-i)+(Math.abs(a)>=10?4*Math.cos(a*ep):0),tickFormat:u,text:c=typeof u=="function"?u:void 0,textAnchor:s=Math.abs(a)>=10?a<0^e==="bottom"?"start":"end":"middle",lineAnchor:d=Math.abs(a)>=10?"middle":e==="bottom"?"top":"bottom",fontVariant:l,inset:p=0,insetTop:m=p,insetBottom:h=p,dy:g=0,x:b=t==="x"?void 0:null,...x}){return qo(Cx,t,`${t}-axis tick label`,n,{facetAnchor:r,frameAnchor:o,text:c===void 0?null:c,textAnchor:s,lineAnchor:d,fontVariant:l,rotate:a,x:b,...x,dy:e==="bottom"?+g+ +i+ +f-h:+g-i-f+ +m},function(M,y,w,v){l===void 0&&(this.fontVariant=Kx(M)),c===void 0&&(v.text=Zx(M,y,w,u,e))})}function Bx(){let[t,e]=jn(...arguments);return Wx("y",Rx(e),t,e)}function Ux(){let[t,e]=jn(...arguments);return Wx("fy",Lx(e),t,e)}function Xx(){let[t,e]=jn(...arguments);return Gx("x",Px(e),t,e)}function Hx(){let[t,e]=jn(...arguments);return Gx("fx",Ox(e),t,e)}function Wx(t,e,n,{y:r=t==="y"?void 0:null,x:o=null,x1:i=e==="left"?o:null,x2:a=e==="right"?o:null,...f}){return qo(Aa,t,`${t}-grid`,n,{y:r,x1:i,x2:a,...Vx(f)})}function Gx(t,e,n,{x:r=t==="x"?void 0:null,y:o=null,y1:i=e==="top"?o:null,y2:a=e==="bottom"?o:null,...f}){return qo(ap,t,`${t}-grid`,n,{x:r,y1:i,y2:a,...Vx(f)})}function Vx({color:t="currentColor",opacity:e=.1,stroke:n=t,strokeOpacity:r=e,strokeWidth:o=1,...i}){return{stroke:n,strokeOpacity:r,strokeWidth:o,...i}}function jx({fill:t,fillOpacity:e,fontFamily:n,fontSize:r,fontStyle:o,fontWeight:i,monospace:a,pointerEvents:f,shapeRendering:u},c){return[,t]=ie(t),[,e]=It(e),{facet:"super",x:null,y:null,fill:t,fillOpacity:e,fontFamily:n,fontSize:r,fontStyle:o,fontWeight:i,monospace:a,pointerEvents:f,shapeRendering:u,initializer:c}}function qo(t,e,n,r,o,i){let a;function f(s,d,l,p,m,h){let g=s==null&&(e==="fx"||e==="fy"),{[e]:b}=p;if(!b)throw new Error(`missing scale: ${e}`);let{ticks:x,tickSpacing:M,interval:y}=o;if(Lc(b)&&typeof x=="string"&&(y=x,x=void 0),s==null){if(re(x))s=kt(x);else if(b.ticks)if(x!==void 0)s=b.ticks(x);else if(y=nn(y===void 0?b.interval:y,b.type),y!==void 0){let[v,T]=Ct(b.domain());s=y.range(v,y.offset(y.floor(T)))}else{let[v,T]=Ct(b.range());x=(T-v)/(M===void 0?e==="x"?80:35:M),s=b.ticks(x)}else s=b.domain();e==="y"||e==="x"?d=[ne(s)]:a[e]={scale:e,value:wt}}i?.call(this,b,s,x,a);let w=Object.fromEntries(Object.entries(a).map(([v,T])=>[v,{...T,value:gt(s,T.value)}]));return g&&(d=h.filterFacets(s,w)),{data:s,facets:d,channels:w}}let u=Er(o).initializer,c=t(r,Er({...o,initializer:f},u));return r==null?(a=c.channels,c.channels={}):a={},c.ariaLabel=n,c}function Zx(t,e,n,r,o){return{value:Yo(t,e,n,r,o)}}function Yo(t,e,n,r,o){return r===void 0&&Lc(t)?mg(t,e,n,o):t.tickFormat?t.tickFormat(re(n)?null:n,r):r===void 0?dg(t.interval)?wn("%Y"):pg(t.interval)?Xn("%Y"):_e:typeof r=="string"?(zt(t.domain())?wn:Ge)(r):Wn(r)}var x5={draw(t,e){t.moveTo(0,0),t.lineTo(0,e)}},y5={draw(t,e){t.moveTo(0,0),t.lineTo(0,-e)}},b5={draw(t,e){t.moveTo(0,0),t.lineTo(-e,0)}},w5={draw(t,e){t.moveTo(0,0),t.lineTo(e,0)}};function Kx(t){return t.bandwidth&&!t.interval?void 0:"tabular-nums"}function v5(t){return Math.sign(Mn(t.domain()))*Math.sign(Mn(t.range()))}function Qx(t,e,{anchor:n,label:r=e.label,labelAnchor:o,labelArrow:i}={}){if(!(r==null||r.inferred&&M5(e)&&/^(date|time|year)$/i.test(r))){if(r=String(r),i==="auto"&&(i=(!e.bandwidth||e.interval)&&!/[↑↓→←]/.test(r)),!i)return r;if(i===!0){let a=v5(e);a&&(i=/x$/.test(t)||o==="center"?/x$/.test(t)===a<0?"left":"right":a<0?"up":"down")}switch(i){case"left":return`\u2190 ${r}`;case"right":return`${r} \u2192`;case"up":return n==="right"?`${r} \u2191`:`\u2191 ${r}`;case"down":return n==="right"?`${r} \u2193`:`\u2193 ${r}`}return r}}function Jx(t="auto"){return Pt(t)?!1:typeof t=="boolean"?t:le(t,"labelArrow",["auto","up","right","down","left"])}function M5(t){return Lc(t)||t.interval!=null}function ty(t,e){if(e==null)return e;let n=t(e);if(!n)throw new Error(`scale not found: ${e}`);return n}function ey(t,{opacity:e,...n}={}){if(!an(t)&&!Xd(t))throw new Error(`swatches legend requires ordinal or threshold color scale (not ${t.type})`);return ry(t,n,(r,o,i,a)=>r.append("svg").attr("width",i).attr("height",a).attr("fill",o.scale).attr("fill-opacity",It(e)[1]).append("rect").attr("width","100%").attr("height","100%"))}function ny(t,{fill:e=t.hint?.fill!==void 0?t.hint.fill:"none",fillOpacity:n=1,stroke:r=t.hint?.stroke!==void 0?t.hint.stroke:Pt(e)?"currentColor":"none",strokeOpacity:o=1,strokeWidth:i=1.5,r:a=4.5,...f}={},u){let[c,s]=ie(e),[d,l]=ie(r),p=ty(u,c),m=ty(u,d),h=a*a*Math.PI;return n=It(n)[1],o=It(o)[1],i=It(i)[1],ry(t,f,(g,b,x,M)=>g.append("svg").attr("viewBox","-8 -8 16 16").attr("width",x).attr("height",M).attr("fill",c==="color"?y=>p.scale(y):s).attr("fill-opacity",n).attr("stroke",d==="color"?y=>m.scale(y):l).attr("stroke-opacity",o).attr("stroke-width",i).append("path").attr("d",y=>{let w=Gr();return t.scale(y).draw(w,h),w}))}function ry(t,e={},n){let{columns:r,tickFormat:o,fontVariant:i=zc(t),swatchSize:a=15,swatchWidth:f=a,swatchHeight:u=a,marginLeft:c=0,className:s,style:d,width:l}=e,p=Eo(e);s=Lo(s),typeof o!="function"&&(o=Yo(t.scale,t.domain,void 0,o));let m=yt("div",p).attr("class",`${s}-swatches ${s}-swatches-${r!=null?"columns":"wrap"}`),h;return r!=null?(h=`.${s}-swatches-columns .${s}-swatch {
   display: flex;
   align-items: center;
   break-inside: avoid;
@@ -48,7 +48,7 @@
   margin-right: 0.5em;
   overflow: visible;
 }
-${h}`)).style("margin-left",c?`${+c}px`:null).style("width",l===void 0?null:`${+l}px`).style("font-variant",St(i,"normal")).call(Po,d).node()}var gp=new Map([["symbol",ry],["color",fy],["opacity",S5]]);function iy(t,e,n={}){return(r,o)=>{if(!gp.has(r))throw new Error(`unknown legend type: ${r}`);if(r in t)return gp.get(r)(t[r],ay(e,n[r],o),i=>t[i])}}function ay({className:t,...e},{label:n,ticks:r,tickFormat:o}={},i){return Lg(i,{className:t,...e},{label:n,ticks:r,tickFormat:o})}function fy(t,{legend:e=!0,...n}){if(e===!0&&(e=t.type==="ordinal"?"swatches":"ramp"),t.domain!==void 0)switch(`${e}`.toLowerCase()){case"swatches":return ny(t,n);case"ramp":return cx(t,n);default:throw new Error(`unknown legend type: ${e}`)}}function S5({type:t,interpolate:e,...n},{legend:r=!0,color:o=be(0,0,0),...i}){if(!e)throw new Error(`${t} opacity scales are not supported`);if(r===!0&&(r="ramp"),`${r}`.toLowerCase()!=="ramp")throw new Error(`${r} opacity legends are not supported`);return fy({type:t,...n,interpolate:T5(o)},{legend:r,...i})}function T5(t){let{r:e,g:n,b:r}=be(t)||be(0,0,0);return o=>`rgba(${e},${n},${r},${o})`}function uy(t,e,n){let r=[];for(let[o,i]of gp){let a=n[o];if(a?.legend&&o in t){let f=i(t[o],ay(e,t[o],a),u=>t[u]);f!=null&&r.push(f)}}return r}var _5={ariaLabel:"frame",fill:"none",stroke:"currentColor"},C5={ariaLabel:"frame",fill:null,stroke:"currentColor",strokeLinecap:"square"},xp=class extends Dt{constructor(e={}){let{anchor:n=null,inset:r=0,insetTop:o=r,insetRight:i=r,insetBottom:a=r,insetLeft:f=r,rx:u,ry:c}=e;super(go,void 0,e,n==null?_5:C5),this.anchor=_r(n,"anchor",["top","right","bottom","left"]),this.insetTop=ct(o),this.insetRight=ct(i),this.insetBottom=ct(a),this.insetLeft=ct(f),this.rx=ct(u),this.ry=ct(c)}render(e,n,r,o,i){let{marginTop:a,marginRight:f,marginBottom:u,marginLeft:c,width:s,height:d}=o,{anchor:l,insetTop:p,insetRight:m,insetBottom:h,insetLeft:g,rx:b,ry:x}=this,M=c+g,y=s-f-m,w=a+p,v=d-u-h;return yt(l?"svg:line":"svg:rect",i).datum(0).call(me,this,o,i).call(he,this).call(Pe,this,r).call(ge,this,{}).call(l==="left"?T=>T.attr("x1",M).attr("x2",M).attr("y1",w).attr("y2",v):l==="right"?T=>T.attr("x1",y).attr("x2",y).attr("y1",w).attr("y2",v):l==="top"?T=>T.attr("x1",M).attr("x2",y).attr("y1",w).attr("y2",w):l==="bottom"?T=>T.attr("x1",M).attr("x2",y).attr("y1",v).attr("y2",v):T=>T.attr("x",M).attr("y",w).attr("width",y-M).attr("height",v-w).attr("rx",b).attr("ry",x)).node()}};function cy(t){return new xp(t)}var yp={ariaLabel:"tip",fill:"white",stroke:"currentColor"},A5=new Set(["geometry","href","src","ariaLabel"]),wp=class extends Dt{constructor(e,n={}){n.tip&&(n={...n,tip:!1}),n.title===void 0&&re(e)&&$c(e)&&(n={...n,title:wt});let{x:r,y:o,x1:i,x2:a,y1:f,y2:u,anchor:c,monospace:s,fontFamily:d=s?"ui-monospace, monospace":void 0,fontSize:l,fontStyle:p,fontVariant:m,fontWeight:h,lineHeight:g=1,lineWidth:b=20,frameAnchor:x,textAnchor:M="start",textOverflow:y,textPadding:w=8,title:v,pointerSize:T=12,pathFilter:E="drop-shadow(0 3px 4px rgba(0,0,0,0.2))"}=n;super(e,{x:{value:i!=null&&a!=null?null:r,scale:"x",optional:!0},y:{value:f!=null&&u!=null?null:o,scale:"y",optional:!0},x1:{value:i,scale:"x",optional:a==null},y1:{value:f,scale:"y",optional:u==null},x2:{value:a,scale:"x",optional:i==null},y2:{value:u,scale:"y",optional:f==null},title:{value:v,optional:!0}},n,yp),this.anchor=Td(c,"anchor"),this.previousAnchor=this.anchor??"top-left",this.frameAnchor=vo(x),this.textAnchor=St(M,"middle"),this.textPadding=+w,this.pointerSize=+T,this.pathFilter=Et(E),this.lineHeight=+g,this.lineWidth=+b,this.textOverflow=cp(y),this.monospace=!!s,this.fontFamily=Et(d),this.fontSize=ct(l),this.fontStyle=Et(p),this.fontVariant=Et(m),this.fontWeight=Et(h);for(let I in yp)I in this.channels&&(this[I]=yp[I]);this.splitLines=dp(this),this.clipLine=pp(this)}render(e,n,r,o,i){let a=this,{x:f,y:u,fx:c,fy:s}=n,{ownerSVGElement:d,document:l}=i,{anchor:p,monospace:m,lineHeight:h,lineWidth:g}=this,{textPadding:b,pointerSize:x,pathFilter:M}=this,{marginTop:y,marginLeft:w}=o,v=k5(r),{x1:T,y1:E,x2:I,y2:D,x:_=T??I,y:L=E??D}=r,F=c?c(e.fx)-w:0,P=s?s(e.fy)-y:0,[S,A]=Gn(this,o),N=tp(r,S),O=ep(r,A),R=m?Gc:Hc,tt=R(Ir),Z=c&&Yo(c),H=s&&Yo(s);function*Q(G,X){if("title"in G){let $=G.title.value[X];for(let q of a.splitLines(_e($)))yield{name:"",value:a.clipLine(q)};return}for(let $ in G){if($==="x1"&&"x2"in G||$==="y1"&&"y2"in G)continue;let q=G[$],Y=q.value[X];if(!(!Ne(Y)&&q.scale==null))if($==="x2"&&"x1"in G)yield{name:bp(n,q,"x"),value:sy(G.x1,q,X)};else if($==="y2"&&"y1"in G)yield{name:bp(n,q,"y"),value:sy(G.y1,q,X)};else{let C=q.scale,j={name:bp(n,q,$),value:_e(Y)};(C==="color"||C==="opacity")&&(j[C]=r[$][X]),yield j}}e.fi!=null&&c&&(yield{name:String(c.label??"fx"),value:Z(e.fx)}),e.fi!=null&&s&&(yield{name:String(s.label??"fy"),value:H(e.fy)})}let at=yt("svg:g",i).call(me,this,o,i).call(lp,this).call(ge,this,{x:_&&f,y:L&&u}).call(G=>G.selectAll().data(e).enter().append("g").attr("transform",X=>`translate(${Math.round(N(X))},${Math.round(O(X))})`).call(he,this).call(X=>X.append("path").attr("filter",M)).call(X=>X.append("text").each(function($){let q=hn(this);this.setAttribute("fill","currentColor"),this.setAttribute("fill-opacity",1),this.setAttribute("stroke","none");let Y=new Set;for(let C of Q(v,$)){let j=C.name;j&&Y.has(j)||(Y.add(j),Ut(q,C))}})));function Ut(G,{name:X,value:$,color:q,opacity:Y}){let C=q!=null||Y!=null,j,J=g*100,[ot]=kr(X,J,R,tt);if(ot>=0)X=X.slice(0,ot).trimEnd()+Ir,j=$.trim(),$="";else{(X||!$&&!C)&&($=" "+$);let[Xt]=kr($,J-R(X),R,tt);Xt>=0&&($=$.slice(0,Xt).trimEnd()+Ir,j=$.trim())}let lt=G.append("tspan").attr("x",0).attr("dy",`${h}em`).text("\u200B");X&&lt.append("tspan").attr("font-weight","bold").text(X),$&&lt.append(()=>l.createTextNode($)),C&&lt.append("tspan").text(" \u25A0").attr("fill",q).attr("fill-opacity",Y).style("user-select","none"),j&&lt.append("title").text(j)}function Oe(){let{width:G,height:X}=o.facet??o;at.selectChildren().each(function($){let{x:q,width:Y,height:C}=this.getBBox();Y=Math.round(Y),C=Math.round(C);let j=p;if(j===void 0){j=a.previousAnchor;let lt=N($)+F,Xt=O($)+P,Zn=lt+Y+b*2<G,ka=lt-Y-b*2>0,Da=Xt+C+x+b*2+7<X,Na=Xt-C-x-b*2>0,Ra=(/-left$/.test(j)?Zn||!ka:Zn&&!ka)?"left":"right",rs=(/^top-/.test(j)?Da||!Na:Da&&!Na)?"top":"bottom";j=a.previousAnchor=`${rs}-${Ra}`}let J=this.firstChild,ot=this.lastChild;if(J.setAttribute("d",I5(j,x,b,Y,C)),q)for(let lt of ot.childNodes)lt.setAttribute("x",-q);ot.setAttribute("y",`${+$5(j,ot.childNodes.length,h).toFixed(6)}em`),ot.setAttribute("transform",`translate(${E5(j,x,b,Y,C)})`)})}return d.isConnected?Promise.resolve().then(Oe):typeof requestAnimationFrame<"u"&&requestAnimationFrame(Oe),at.node()}};function ly(t,{x:e,y:n,...r}={}){return r.frameAnchor===void 0&&([e,n]=Ar(e,n)),new wp(t,{...r,x:e,y:n})}function $5(t,e,n){return/^top(?:-|$)/.test(t)?.94-n:-.29-e*n}function E5(t,e,n,r,o){switch(t){case"middle":return[-r/2,o/2];case"top-left":return[n,e+n];case"top":return[-r/2,e/2+n];case"top-right":return[-r-n,e+n];case"right":return[-e/2-r-n,o/2];case"bottom-left":return[n,-e-n];case"bottom":return[-r/2,-e/2-n];case"bottom-right":return[-r-n,-e-n];case"left":return[n+e/2,o/2]}}function I5(t,e,n,r,o){let i=r+n*2,a=o+n*2;switch(t){case"middle":return`M${-i/2},${-a/2}h${i}v${a}h${-i}z`;case"top-left":return`M0,0l${e},${e}h${i-e}v${a}h${-i}z`;case"top":return`M0,0l${e/2},${e/2}h${(i-e)/2}v${a}h${-i}v${-a}h${(i-e)/2}z`;case"top-right":return`M0,0l${-e},${e}h${e-i}v${a}h${i}z`;case"right":return`M0,0l${-e/2},${-e/2}v${e/2-a/2}h${-i}v${a}h${i}v${e/2-a/2}z`;case"bottom-left":return`M0,0l${e},${-e}h${i-e}v${-a}h${-i}z`;case"bottom":return`M0,0l${e/2},${-e/2}h${(i-e)/2}v${-a}h${-i}v${a}h${(i-e)/2}z`;case"bottom-right":return`M0,0l${-e},${-e}h${e-i}v${-a}h${i}z`;case"left":return`M0,0l${e/2},${-e/2}v${e/2-a/2}h${i}v${a}h${-i}v${e/2-a/2}z`}}function k5({channels:t}){let e={};for(let n in t){if(A5.has(n))continue;let r=Jg(t,n);r&&(e[n]=r)}return e}function sy(t,e,n){return e.hint?.length?`${_e(e.value[n]-t.value[n])}`:`${_e(t.value[n])}\u2013${_e(e.value[n])}`}function bp(t,e,n){return String(t[e.scale]?.label??e?.label??n)}function Jc(t={}){let{facet:e,style:n,caption:r,ariaLabel:o,ariaDescription:i}=t,a=Lo(t.className),f=t.marks===void 0?[]:dy(t.marks);f.push(...O5(f));let u=L5(e,t),c=new Map;for(let A of f){let N=py(A,u,t);N&&c.set(A,N)}let s=new Map;u&&Ea(s,[u],t),Ea(s,c,t);let d=dy(F5(f,s,t));for(let A of d){let N=py(A,u,t);N&&c.set(A,N)}f.unshift(...d);let l=tx(s,t);if(l!==void 0){let A=u?Yc(l,u):void 0;for(let O of f){if(O.facet===null||O.facet==="super")continue;let R=c.get(O);R!==void 0&&(R.facetsIndex=O.fx!=null||O.fy!=null?Yc(l,R):A)}let N=new Set;for(let{facetsIndex:O}of c.values())O?.forEach((R,tt)=>{R?.length>0&&N.add(tt)});l.forEach(0<N.size&&N.size<l.length?(O,R)=>O.empty=!N.has(R):O=>O.empty=!1);for(let O of f)if(O.facet==="exclude"){let R=c.get(O);R!==void 0&&(R.facetsIndex=rx(R.facetsIndex))}}for(let A of st.keys())xo(t[A])&&A!=="fx"&&A!=="fy"&&s.set(A,[]);let p=new Map;for(let A of f){if(p.has(A))throw new Error("duplicate mark; each mark must be unique");let{facetsIndex:N,channels:O}=c.get(A)??{},{data:R,facets:tt,channels:Z}=A.initialize(N,O,t);Sp(Z,t),p.set(A,{data:R,facets:tt,channels:Z})}let m=Ta(Ea(s,p,t),t),h=Ud(m),g=Q1(m,f,t);X1(m,g);let{fx:b,fy:x}=h,M=b||x?Xd(m,g):g,y=b||x?W5(h,g):g,w=Eo(t),v=w.document,T=pn("svg").call(v.documentElement),E=T;w.ownerSVGElement=T,w.className=a,w.projection=r1(t,M),w.filterFacets=(A,N)=>Yc(l,{channels:N,groups:Fc(A,N)}),w.getMarkState=A=>{let N=p.get(A),O=c.get(A);return{...N,channels:{...N.channels,...O?.channels}}},w.dispatchValue=A=>{E.value!==A&&(E.value=A,E.dispatchEvent(new Event("input",{bubbles:!0})))};let I=new Set;for(let[A,N]of p)if(A.initializer!=null){let O=A.facet==="super"?y:M,R=A.initializer(N.data,N.facets,N.channels,h,O,w);if(R.data!==void 0&&(N.data=R.data),R.facets!==void 0&&(N.facets=R.facets),R.channels!==void 0){let{fx:tt,fy:Z,...H}=R.channels;R5(H),Object.assign(N.channels,H);for(let Q of Object.values(H)){let{scale:at}=Q;at!=null&&st.get(at)!==de&&(gy(Q,t),I.add(at))}(tt!=null||Z!=null)&&c.set(A,!0)}}if(I.size){let A=new Map;Ea(A,p,t,R=>I.has(R)),Ea(s,p,t,R=>I.has(R));let N=X5(Ta(A,t),m),O=Ud(N);Object.assign(m,N),Object.assign(h,O)}let D,_;l!==void 0&&(D={x:b?.domain(),y:x?.domain()},l=ex(l,D),_=nx(b,x,g));for(let[A,N]of p)N.values=A.scale(N.channels,h,w);let{width:L,height:F}=g;hn(T).attr("class",a).attr("fill","currentColor").attr("font-family","system-ui, sans-serif").attr("font-size",10).attr("text-anchor","middle").attr("width",L).attr("height",F).attr("viewBox",`0 0 ${L} ${F}`).attr("aria-label",o).attr("aria-description",i).call(A=>A.append("style").text(`.${a} {
+${h}`)).style("margin-left",c?`${+c}px`:null).style("width",l===void 0?null:`${+l}px`).style("font-variant",St(i,"normal")).call(Po,d).node()}var hp=new Map([["symbol",ny],["color",ay],["opacity",S5]]);function oy(t,e,n={}){return(r,o)=>{if(!hp.has(r))throw new Error(`unknown legend type: ${r}`);if(r in t)return hp.get(r)(t[r],iy(e,n[r],o),i=>t[i])}}function iy({className:t,...e},{label:n,ticks:r,tickFormat:o}={},i){return Rg(i,{className:t,...e},{label:n,ticks:r,tickFormat:o})}function ay(t,{legend:e=!0,...n}){if(e===!0&&(e=t.type==="ordinal"?"swatches":"ramp"),t.domain!==void 0)switch(`${e}`.toLowerCase()){case"swatches":return ey(t,n);case"ramp":return ux(t,n);default:throw new Error(`unknown legend type: ${e}`)}}function S5({type:t,interpolate:e,...n},{legend:r=!0,color:o=be(0,0,0),...i}){if(!e)throw new Error(`${t} opacity scales are not supported`);if(r===!0&&(r="ramp"),`${r}`.toLowerCase()!=="ramp")throw new Error(`${r} opacity legends are not supported`);return ay({type:t,...n,interpolate:T5(o)},{legend:r,...i})}function T5(t){let{r:e,g:n,b:r}=be(t)||be(0,0,0);return o=>`rgba(${e},${n},${r},${o})`}function fy(t,e,n){let r=[];for(let[o,i]of hp){let a=n[o];if(a?.legend&&o in t){let f=i(t[o],iy(e,t[o],a),u=>t[u]);f!=null&&r.push(f)}}return r}var _5={ariaLabel:"frame",fill:"none",stroke:"currentColor"},C5={ariaLabel:"frame",fill:null,stroke:"currentColor",strokeLinecap:"square"},gp=class extends Dt{constructor(e={}){let{anchor:n=null,inset:r=0,insetTop:o=r,insetRight:i=r,insetBottom:a=r,insetLeft:f=r,rx:u,ry:c}=e;super(go,void 0,e,n==null?_5:C5),this.anchor=_r(n,"anchor",["top","right","bottom","left"]),this.insetTop=ct(o),this.insetRight=ct(i),this.insetBottom=ct(a),this.insetLeft=ct(f),this.rx=ct(u),this.ry=ct(c)}render(e,n,r,o,i){let{marginTop:a,marginRight:f,marginBottom:u,marginLeft:c,width:s,height:d}=o,{anchor:l,insetTop:p,insetRight:m,insetBottom:h,insetLeft:g,rx:b,ry:x}=this,M=c+g,y=s-f-m,w=a+p,v=d-u-h;return yt(l?"svg:line":"svg:rect",i).datum(0).call(me,this,o,i).call(he,this).call(Pe,this,r).call(ge,this,{}).call(l==="left"?T=>T.attr("x1",M).attr("x2",M).attr("y1",w).attr("y2",v):l==="right"?T=>T.attr("x1",y).attr("x2",y).attr("y1",w).attr("y2",v):l==="top"?T=>T.attr("x1",M).attr("x2",y).attr("y1",w).attr("y2",w):l==="bottom"?T=>T.attr("x1",M).attr("x2",y).attr("y1",v).attr("y2",v):T=>T.attr("x",M).attr("y",w).attr("width",y-M).attr("height",v-w).attr("rx",b).attr("ry",x)).node()}};function uy(t){return new gp(t)}var xp={ariaLabel:"tip",fill:"white",stroke:"currentColor"},A5=new Set(["geometry","href","src","ariaLabel"]),bp=class extends Dt{constructor(e,n={}){n.tip&&(n={...n,tip:!1}),n.title===void 0&&re(e)&&$c(e)&&(n={...n,title:wt});let{x:r,y:o,x1:i,x2:a,y1:f,y2:u,anchor:c,monospace:s,fontFamily:d=s?"ui-monospace, monospace":void 0,fontSize:l,fontStyle:p,fontVariant:m,fontWeight:h,lineHeight:g=1,lineWidth:b=20,frameAnchor:x,textAnchor:M="start",textOverflow:y,textPadding:w=8,title:v,pointerSize:T=12,pathFilter:E="drop-shadow(0 3px 4px rgba(0,0,0,0.2))"}=n;super(e,{x:{value:i!=null&&a!=null?null:r,scale:"x",optional:!0},y:{value:f!=null&&u!=null?null:o,scale:"y",optional:!0},x1:{value:i,scale:"x",optional:a==null},y1:{value:f,scale:"y",optional:u==null},x2:{value:a,scale:"x",optional:i==null},y2:{value:u,scale:"y",optional:f==null},title:{value:v,optional:!0}},n,xp),this.anchor=Sd(c,"anchor"),this.previousAnchor=this.anchor??"top-left",this.frameAnchor=vo(x),this.textAnchor=St(M,"middle"),this.textPadding=+w,this.pointerSize=+T,this.pathFilter=Et(E),this.lineHeight=+g,this.lineWidth=+b,this.textOverflow=up(y),this.monospace=!!s,this.fontFamily=Et(d),this.fontSize=ct(l),this.fontStyle=Et(p),this.fontVariant=Et(m),this.fontWeight=Et(h);for(let I in xp)I in this.channels&&(this[I]=xp[I]);this.splitLines=lp(this),this.clipLine=dp(this)}render(e,n,r,o,i){let a=this,{x:f,y:u,fx:c,fy:s}=n,{ownerSVGElement:d,document:l}=i,{anchor:p,monospace:m,lineHeight:h,lineWidth:g}=this,{textPadding:b,pointerSize:x,pathFilter:M}=this,{marginTop:y,marginLeft:w}=o,v=k5(r),{x1:T,y1:E,x2:I,y2:D,x:_=T??I,y:L=E??D}=r,F=c?c(e.fx)-w:0,P=s?s(e.fy)-y:0,[S,A]=Gn(this,o),N=Jd(r,S),O=tp(r,A),R=m?Gc:Wc,tt=R(Ir),Z=c&&Yo(c),W=s&&Yo(s);function*Q(G,X){if("title"in G){let $=G.title.value[X];for(let q of a.splitLines(_e($)))yield{name:"",value:a.clipLine(q)};return}for(let $ in G){if($==="x1"&&"x2"in G||$==="y1"&&"y2"in G)continue;let q=G[$],Y=q.value[X];if(!(!Ne(Y)&&q.scale==null))if($==="x2"&&"x1"in G)yield{name:yp(n,q,"x"),value:cy(G.x1,q,X)};else if($==="y2"&&"y1"in G)yield{name:yp(n,q,"y"),value:cy(G.y1,q,X)};else{let C=q.scale,j={name:yp(n,q,$),value:_e(Y)};(C==="color"||C==="opacity")&&(j[C]=r[$][X]),yield j}}e.fi!=null&&c&&(yield{name:String(c.label??"fx"),value:Z(e.fx)}),e.fi!=null&&s&&(yield{name:String(s.label??"fy"),value:W(e.fy)})}let at=yt("svg:g",i).call(me,this,o,i).call(sp,this).call(ge,this,{x:_&&f,y:L&&u}).call(G=>G.selectAll().data(e).enter().append("g").attr("transform",X=>`translate(${Math.round(N(X))},${Math.round(O(X))})`).call(he,this).call(X=>X.append("path").attr("filter",M)).call(X=>X.append("text").each(function($){let q=hn(this);this.setAttribute("fill","currentColor"),this.setAttribute("fill-opacity",1),this.setAttribute("stroke","none");let Y=new Set;for(let C of Q(v,$)){let j=C.name;j&&Y.has(j)||(Y.add(j),Ut(q,C))}})));function Ut(G,{name:X,value:$,color:q,opacity:Y}){let C=q!=null||Y!=null,j,J=g*100,[ot]=kr(X,J,R,tt);if(ot>=0)X=X.slice(0,ot).trimEnd()+Ir,j=$.trim(),$="";else{(X||!$&&!C)&&($=" "+$);let[Xt]=kr($,J-R(X),R,tt);Xt>=0&&($=$.slice(0,Xt).trimEnd()+Ir,j=$.trim())}let lt=G.append("tspan").attr("x",0).attr("dy",`${h}em`).text("\u200B");X&&lt.append("tspan").attr("font-weight","bold").text(X),$&&lt.append(()=>l.createTextNode($)),C&&lt.append("tspan").text(" \u25A0").attr("fill",q).attr("fill-opacity",Y).style("user-select","none"),j&&lt.append("title").text(j)}function Oe(){let{width:G,height:X}=o.facet??o;at.selectChildren().each(function($){let{x:q,width:Y,height:C}=this.getBBox();Y=Math.round(Y),C=Math.round(C);let j=p;if(j===void 0){j=a.previousAnchor;let lt=N($)+F,Xt=O($)+P,Zn=lt+Y+b*2<G,ka=lt-Y-b*2>0,Da=Xt+C+x+b*2+7<X,Na=Xt-C-x-b*2>0,Ra=(/-left$/.test(j)?Zn||!ka:Zn&&!ka)?"left":"right",ns=(/^top-/.test(j)?Da||!Na:Da&&!Na)?"top":"bottom";j=a.previousAnchor=`${ns}-${Ra}`}let J=this.firstChild,ot=this.lastChild;if(J.setAttribute("d",I5(j,x,b,Y,C)),q)for(let lt of ot.childNodes)lt.setAttribute("x",-q);ot.setAttribute("y",`${+$5(j,ot.childNodes.length,h).toFixed(6)}em`),ot.setAttribute("transform",`translate(${E5(j,x,b,Y,C)})`)})}return d.isConnected?Promise.resolve().then(Oe):typeof requestAnimationFrame<"u"&&requestAnimationFrame(Oe),at.node()}};function sy(t,{x:e,y:n,...r}={}){return r.frameAnchor===void 0&&([e,n]=Ar(e,n)),new bp(t,{...r,x:e,y:n})}function $5(t,e,n){return/^top(?:-|$)/.test(t)?.94-n:-.29-e*n}function E5(t,e,n,r,o){switch(t){case"middle":return[-r/2,o/2];case"top-left":return[n,e+n];case"top":return[-r/2,e/2+n];case"top-right":return[-r-n,e+n];case"right":return[-e/2-r-n,o/2];case"bottom-left":return[n,-e-n];case"bottom":return[-r/2,-e/2-n];case"bottom-right":return[-r-n,-e-n];case"left":return[n+e/2,o/2]}}function I5(t,e,n,r,o){let i=r+n*2,a=o+n*2;switch(t){case"middle":return`M${-i/2},${-a/2}h${i}v${a}h${-i}z`;case"top-left":return`M0,0l${e},${e}h${i-e}v${a}h${-i}z`;case"top":return`M0,0l${e/2},${e/2}h${(i-e)/2}v${a}h${-i}v${-a}h${(i-e)/2}z`;case"top-right":return`M0,0l${-e},${e}h${e-i}v${a}h${i}z`;case"right":return`M0,0l${-e/2},${-e/2}v${e/2-a/2}h${-i}v${a}h${i}v${e/2-a/2}z`;case"bottom-left":return`M0,0l${e},${-e}h${i-e}v${-a}h${-i}z`;case"bottom":return`M0,0l${e/2},${-e/2}h${(i-e)/2}v${-a}h${-i}v${a}h${(i-e)/2}z`;case"bottom-right":return`M0,0l${-e},${-e}h${e-i}v${-a}h${i}z`;case"left":return`M0,0l${e/2},${-e/2}v${e/2-a/2}h${i}v${a}h${-i}v${e/2-a/2}z`}}function k5({channels:t}){let e={};for(let n in t){if(A5.has(n))continue;let r=Qg(t,n);r&&(e[n]=r)}return e}function cy(t,e,n){return e.hint?.length?`${_e(e.value[n]-t.value[n])}`:`${_e(t.value[n])}\u2013${_e(e.value[n])}`}function yp(t,e,n){return String(t[e.scale]?.label??e?.label??n)}function Jc(t={}){let{facet:e,style:n,caption:r,ariaLabel:o,ariaDescription:i}=t,a=Lo(t.className),f=t.marks===void 0?[]:ly(t.marks);f.push(...O5(f));let u=L5(e,t),c=new Map;for(let A of f){let N=dy(A,u,t);N&&c.set(A,N)}let s=new Map;u&&Ea(s,[u],t),Ea(s,c,t);let d=ly(F5(f,s,t));for(let A of d){let N=dy(A,u,t);N&&c.set(A,N)}f.unshift(...d);let l=J1(s,t);if(l!==void 0){let A=u?Yc(l,u):void 0;for(let O of f){if(O.facet===null||O.facet==="super")continue;let R=c.get(O);R!==void 0&&(R.facetsIndex=O.fx!=null||O.fy!=null?Yc(l,R):A)}let N=new Set;for(let{facetsIndex:O}of c.values())O?.forEach((R,tt)=>{R?.length>0&&N.add(tt)});l.forEach(0<N.size&&N.size<l.length?(O,R)=>O.empty=!N.has(R):O=>O.empty=!1);for(let O of f)if(O.facet==="exclude"){let R=c.get(O);R!==void 0&&(R.facetsIndex=nx(R.facetsIndex))}}for(let A of st.keys())xo(t[A])&&A!=="fx"&&A!=="fy"&&s.set(A,[]);let p=new Map;for(let A of f){if(p.has(A))throw new Error("duplicate mark; each mark must be unique");let{facetsIndex:N,channels:O}=c.get(A)??{},{data:R,facets:tt,channels:Z}=A.initialize(N,O,t);Mp(Z,t),p.set(A,{data:R,facets:tt,channels:Z})}let m=Ta(Ea(s,p,t),t),h=Bd(m),g=K1(m,f,t);U1(m,g);let{fx:b,fy:x}=h,M=b||x?Ud(m,g):g,y=b||x?H5(h,g):g,w=Eo(t),v=w.document,T=pn("svg").call(v.documentElement),E=T;w.ownerSVGElement=T,w.className=a,w.projection=n1(t,M),w.filterFacets=(A,N)=>Yc(l,{channels:N,groups:Fc(A,N)}),w.getMarkState=A=>{let N=p.get(A),O=c.get(A);return{...N,channels:{...N.channels,...O?.channels}}},w.dispatchValue=A=>{E.value!==A&&(E.value=A,E.dispatchEvent(new Event("input",{bubbles:!0})))};let I=new Set;for(let[A,N]of p)if(A.initializer!=null){let O=A.facet==="super"?y:M,R=A.initializer(N.data,N.facets,N.channels,h,O,w);if(R.data!==void 0&&(N.data=R.data),R.facets!==void 0&&(N.facets=R.facets),R.channels!==void 0){let{fx:tt,fy:Z,...W}=R.channels;R5(W),Object.assign(N.channels,W);for(let Q of Object.values(W)){let{scale:at}=Q;at!=null&&st.get(at)!==de&&(hy(Q,t),I.add(at))}(tt!=null||Z!=null)&&c.set(A,!0)}}if(I.size){let A=new Map;Ea(A,p,t,R=>I.has(R)),Ea(s,p,t,R=>I.has(R));let N=X5(Ta(A,t),m),O=Bd(N);Object.assign(m,N),Object.assign(h,O)}let D,_;l!==void 0&&(D={x:b?.domain(),y:x?.domain()},l=tx(l,D),_=ex(b,x,g));for(let[A,N]of p)N.values=A.scale(N.channels,h,w);let{width:L,height:F}=g;hn(T).attr("class",a).attr("fill","currentColor").attr("font-family","system-ui, sans-serif").attr("font-size",10).attr("text-anchor","middle").attr("width",L).attr("height",F).attr("viewBox",`0 0 ${L} ${F}`).attr("aria-label",o).attr("aria-description",i).call(A=>A.append("style").text(`.${a} {
   display: block;
   background: white;
   height: auto;
@@ -58,10 +58,10 @@
 .${a} text,
 .${a} tspan {
   white-space: pre;
-}`)).call(Po,n);for(let A of f){let{channels:N,values:O,facets:R}=p.get(A);if(l===void 0||A.facet==="super"){let tt=null;if(R&&(tt=R[0],tt=A.filter(tt,N,O),tt.length===0))continue;let Z=A.render(tt,h,O,y,w);if(Z==null)continue;T.appendChild(Z)}else{let tt;for(let Z of l){if(!(A.facetAnchor?.(l,D,Z)??!Z.empty))continue;let H=null;if(R){let at=c.has(A);if(H=R[at?Z.i:0],H=A.filter(H,N,O),H.length===0)continue;!at&&H===R[0]&&(H=Cg(H)),H.fx=Z.x,H.fy=Z.y,H.fi=Z.i}let Q=A.render(H,h,O,M,w);if(Q!=null){(tt??=hn(T).append("g")).append(()=>Q).datum(Z);for(let at of["aria-label","aria-description","aria-hidden","transform"])Q.hasAttribute(at)&&(tt.attr(at,Q.getAttribute(at)),Q.removeAttribute(at))}}tt?.selectChildren().attr("transform",_)}}let P=uy(m,w,t);if(r!=null||P.length>0){E=v.createElement("figure"),E.style.maxWidth="initial";for(let A of P)E.appendChild(A);if(E.appendChild(T),r!=null){let A=v.createElement("figcaption");A.appendChild(r?.ownerDocument?r:v.createTextNode(r)),E.appendChild(A)}}E.scale=G1(m),E.legend=iy(m,w,t);let S=t1();return S>0&&hn(T).append("text").attr("x",L).attr("y",20).attr("dy","-1em").attr("text-anchor","end").attr("font-family","initial").text("\u26A0\uFE0F").append("title").text(`${S.toLocaleString("en-US")} warning${S===1?"":"s"}. Please check the console.`),E}function D5({marks:t=[],...e}={}){return Jc({...e,marks:[...t,this]})}Dt.prototype.plot=D5;function dy(t){return t.flat(1/0).filter(e=>e!=null).map(N5)}function N5(t){return typeof t.render=="function"?t:new Mp(t)}var Mp=class extends Dt{constructor(e){if(typeof e!="function")throw new TypeError("invalid mark; missing render function");super(),this.render=e}render(){}};function Sp(t,e){for(let n in t)gy(t[n],e);return t}function gy(t,e){let{scale:n,transform:r=!0}=t;if(n==null||!r)return;let{type:o,percent:i,interval:a,transform:f=i?u=>u*100:Md(a,o)}=e[n]??{};f!=null&&(t.value=pt(t.value,f),t.transform=!1)}function R5(t){for(let e in t)Rd(e,t[e])}function Ea(t,e,n,r=bg){for(let{channels:o}of e.values())for(let i in o){let a=o[i],{scale:f}=a;if(f!=null&&r(f))if(f==="projection"){if(!f1(n)){let u=n.x?.domain===void 0,c=n.y?.domain===void 0;if(u||c){let[s,d]=c1(a);u&&vp(t,"x",s),c&&vp(t,"y",d)}}}else vp(t,f,a)}return t}function vp(t,e,n){let r=t.get(e);r!==void 0?r.push(n):t.set(e,[n])}function L5(t,e){if(t==null)return;let{x:n,y:r}=t;if(n==null&&r==null)return;let o=kt(t.data);if(o==null)throw new Error("missing facet data");let i={};n!=null&&(i.fx=$o(o,{value:n,scale:"fx"})),r!=null&&(i.fy=$o(o,{value:r,scale:"fy"})),Sp(i,e);let a=Fc(o,i);return{channels:i,groups:a,data:t.data}}function py(t,e,n){if(t.facet===null||t.facet==="super")return;let{fx:r,fy:o}=t;if(r!=null||o!=null){let u=kt(t.data??r??o);if(u===void 0)throw new Error(`missing facet data in ${t.ariaLabel}`);if(u===null)return;let c={};return r!=null&&(c.fx=$o(u,{value:r,scale:"fx"})),o!=null&&(c.fy=$o(u,{value:o,scale:"fy"})),Sp(c,n),{channels:c,groups:Fc(u,c)}}if(e===void 0)return;let{channels:i,groups:a,data:f}=e;if(t.facet!=="auto"||t.data===f)return{channels:i,groups:a};f.length>0&&(a.size>1||a.size===1&&i.fx&&i.fy&&[...a][0][1].size>1)&&kt(t.data)?.length===f.length&&on(`Warning: the ${t.ariaLabel} mark appears to use faceted data, but isn\u2019t faceted. The mark data has the same length as the facet data and the mark facet option is "auto", but the mark data and facet data are distinct. If this mark should be faceted, set the mark facet option to true; otherwise, suppress this warning by setting the mark facet option to false.`)}function P5(t,e={}){return Er({...e,x:null,y:null},(n,r,o,i,a,f)=>f.getMarkState(t))}function O5(t){let e=[];for(let n of t){let r=n.tip;if(r){let i=(r==="x"?fx:r==="y"?ux:ax)(P5(n));i.title=null,e.push(ly(n.data,i))}}return e}function F5(t,e,n){let{projection:r,x:o={},y:i={},fx:a={},fy:f={},axis:u,grid:c,facet:s={},facet:{axis:d=u,grid:l}=s,x:{axis:p=u,grid:m=p===null?null:c}=o,y:{axis:h=u,grid:g=h===null?null:c}=i,fx:{axis:b=d,grid:x=b===null?null:l}=a,fy:{axis:M=d,grid:y=M===null?null:l}=f}=n;(r||!xo(o)&&!my("x",t))&&(p=m=null),(r||!xo(i)&&!my("y",t))&&(h=g=null),e.has("fx")||(b=x=null),e.has("fy")||(M=y=null),p===void 0&&(p=!Qc(t,"x")),h===void 0&&(h=!Qc(t,"y")),b===void 0&&(b=!Qc(t,"fx")),M===void 0&&(M=!Qc(t,"fy")),p===!0&&(p="bottom"),h===!0&&(h="left"),b===!0&&(b=p==="top"||p===null?"bottom":"top"),M===!0&&(M=h==="right"||h===null?"left":"right");let w=[];return Kc(w,y,Xx,f),Zc(w,M,qx,"right","left",s,f),Kc(w,x,Hx,a),Zc(w,b,Yx,"top","bottom",s,a),Kc(w,g,Ux,i),Zc(w,h,mp,"left","right",n,i),Kc(w,m,Wx,o),Zc(w,p,hp,"bottom","top",n,o),w}function Zc(t,e,n,r,o,i,a){if(!e)return;let f=q5(e);a=Y5(f?r:e,i,a);let{line:u}=a;(n===mp||n===hp)&&u&&!$r(u)&&t.push(cy(z5(a))),t.push(n(a)),f&&t.push(n({...a,anchor:o,label:null}))}function Kc(t,e,n,r){!e||$r(e)||t.push(n(B5(e,r)))}function q5(t){return/^\s*both\s*$/i.test(t)}function Y5(t,e,{line:n=e.line,ticks:r,tickSize:o,tickSpacing:i,tickPadding:a,tickFormat:f,tickRotate:u,fontVariant:c,ariaLabel:s,ariaDescription:d,label:l=e.label,labelAnchor:p,labelArrow:m=e.labelArrow,labelOffset:h}){return{anchor:t,line:n,ticks:r,tickSize:o,tickSpacing:i,tickPadding:a,tickFormat:f,tickRotate:u,fontVariant:c,ariaLabel:s,ariaDescription:d,label:l,labelAnchor:p,labelArrow:m,labelOffset:h}}function z5(t){let{anchor:e,line:n}=t;return{anchor:e,facetAnchor:e+"-empty",stroke:n===!0?void 0:n}}function B5(t,{stroke:e=wo(t)?t:void 0,ticks:n=U5(t)?t:void 0,tickSpacing:r,ariaLabel:o,ariaDescription:i}){return{stroke:e,ticks:n,tickSpacing:r,ariaLabel:o,ariaDescription:i}}function U5(t){switch(typeof t){case"number":return!0;case"string":return!wo(t)}return re(t)||typeof t?.range=="function"}function Qc(t,e){let n=`${e}-axis `;return t.some(r=>r.ariaLabel?.startsWith(n))}function my(t,e){for(let n of e)for(let r in n.channels){let{scale:o}=n.channels[r];if(o===t||o==="projection")return!0}return!1}function X5(t,e){for(let n in t){let r=t[n],o=e[n];r.label===void 0&&o&&(r.label=o.label)}return t}function W5({fx:t,fy:e},n){let{marginTop:r,marginRight:o,marginBottom:i,marginLeft:a,width:f,height:u}=Rc(n),c=t&&hy(t),s=e&&hy(e);return{marginTop:e?s[0]:r,marginRight:t?f-c[1]:o,marginBottom:e?u-s[1]:i,marginLeft:t?c[0]:a,inset:{marginTop:n.marginTop,marginRight:n.marginRight,marginBottom:n.marginBottom,marginLeft:n.marginLeft},width:f,height:u}}function hy(t){let e=t.domain(),n=t(e[0]),r=t(e[e.length-1]);return r<n&&([n,r]=[r,n]),[n,r+t.bandwidth()]}function Tp(t={y:"count"},e={}){[t,e]=G5(t,e);let{x:n,y:r}=e;return H5(V5(n,e,wt),null,null,r,t,Oo(e))}function H5(t,e,n,r,{data:o=kd,filter:i=ba,sort:a,reverse:f,...u}={},c={}){t=xy(t),e=xy(e),u=Z5(u,c),o=vy(o,wt),a=a==null?void 0:by("sort",a,c),i=i==null?void 0:wy("filter",i,c),n!=null&&wa(u,"x","x1","x2")&&(n=null),r!=null&&wa(u,"y","y1","y2")&&(r=null);let[s,d]=Te(t),[l,p]=Te(t),[m,h]=Te(e),[g,b]=Te(e),[x,M]=n!=null?[n,"x"]:r!=null?[r,"y"]:[],[y,w]=Te(x),{x:v,y:T,z:E,fill:I,stroke:D,x1:_,x2:L,y1:F,y2:P,domain:S,cumulative:A,thresholds:N,interval:O,...R}=c,[tt,Z]=Te(E),[H]=ie(I),[Q]=ie(D),[at,Ut]=Te(H),[Oe,G]=Te(Q);return{..."z"in c&&{z:tt||E},..."fill"in c&&{fill:at||I},..."stroke"in c&&{stroke:Oe||D},...Ao(R,(X,$,q)=>{let Y=ya(gt(X,x),q?.[M]),C=gt(X,E),j=gt(X,H),J=gt(X,Q),ot=Wg(u,{z:C,fill:j,stroke:J}),lt=[],Xt=[],Zn=Y&&w([]),ka=C&&Z([]),Da=j&&Ut([]),Na=J&&G([]),Ra=t&&d([]),rs=t&&p([]),Ap=e&&h([]),ky=e&&b([]),Dy=t3(t?.(X),e?.(X)),Ny=0;for(let Dr of u)Dr.initialize(X);a&&a.initialize(X),i&&i.initialize(X);for(let Dr of $){let $p=[];for(let zo of u)zo.scope("facet",Dr);a&&a.scope("facet",Dr),i&&i.scope("facet",Dr);for(let[zo,Ry]of Id(Dr,ot))for(let[Ly,Py]of Id(Ry,Y))for(let[Kn,Qn]of Dy(Py))if(!(i&&!i.reduce(Kn,Qn))){$p.push(Ny++),Xt.push(o.reduceIndex(Kn,X,Qn)),Y&&Zn.push(Ly),C&&ka.push(ot===C?zo:C[Kn[0]]),j&&Da.push(ot===j?zo:j[Kn[0]]),J&&Na.push(ot===J?zo:J[Kn[0]]),Ra&&(Ra.push(Qn.x1),rs.push(Qn.x2)),Ap&&(Ap.push(Qn.y1),ky.push(Qn.y2));for(let Oy of u)Oy.reduce(Kn,Qn);a&&a.reduce(Kn)}lt.push($p)}return Hg(lt,a,f),{data:Xt,facets:lt}}),...!wa(u,"x")&&(s?{x1:s,x2:l,x:xa(s,l)}:{x:v,x1:_,x2:L}),...!wa(u,"y")&&(m?{y1:m,y2:g,y:xa(m,g)}:{y:T,y1:F,y2:P}),...y&&{[M]:y},...Object.fromEntries(u.map(({name:X,output:$})=>[X,$]))}}function G5({cumulative:t,domain:e,thresholds:n,interval:r,...o},i){return[o,{cumulative:t,domain:e,thresholds:n,interval:r,...i}]}function V5(t,{cumulative:e,domain:n,thresholds:r,interval:o},i){return t={...rn(t)},t.domain===void 0&&(t.domain=n),t.cumulative===void 0&&(t.cumulative=e),t.thresholds===void 0&&(t.thresholds=r),t.interval===void 0&&(t.interval=o),t.value===void 0&&(t.value=i),t.thresholds=j5(t.thresholds,t.interval),t}function xy(t){if(t==null)return;let{value:e,cumulative:n,domain:r=Ct,thresholds:o}=t,i=a=>{let f=gt(a,e),u;if(zt(f)||Q5(o)){f=pt(f,bd,Float64Array);let[s,d]=typeof r=="function"?r(f):r,l=typeof o=="function"&&!Ia(o)?o(f,s,d):o;typeof l=="number"&&(l=Ui(s,d,l)),Ia(l)&&(r===Ct&&(s=l.floor(s),d=l.offset(l.floor(d))),l=l.range(s,l.offset(d))),u=l}else{f=Tr(f);let[s,d]=typeof r=="function"?r(f):r,l=typeof o=="function"&&!Ia(o)?o(f,s,d):o;if(typeof l=="number")if(r===Ct){let p=tr(s,d,l);if(isFinite(p))if(p>0){let m=Math.round(s/p),h=Math.round(d/p);m*p<=s||--m,h*p>d||++h;let g=h-m+1;l=new Float64Array(g);for(let b=0;b<g;++b)l[b]=(m+b)*p}else if(p<0){p=-p;let m=Math.round(s*p),h=Math.round(d*p);m/p<=s||--m,h/p>d||++h;let g=h-m+1;l=new Float64Array(g);for(let b=0;b<g;++b)l[b]=(m+b)/p}else l=[s];else l=[s]}else l=Ae(s,d,l);else Ia(l)&&(r===Ct&&(s=l.floor(s),d=l.offset(l.floor(d))),l=l.range(s,l.offset(d)));u=l}let c=[];if(u.length===1)c.push([u[0],u[0]]);else for(let s=1;s<u.length;++s)c.push([u[s-1],u[s]]);return c.bin=(n<0?n3:n>0?e3:_p)(c,u,f),c};return i.label=Re(e),i}function j5(t,e,n=yy){if(t===void 0)return e===void 0?n:nn(e);if(typeof t=="string"){switch(t.toLowerCase()){case"freedman-diaconis":return Ba;case"scott":return Go;case"sturges":return Fa;case"auto":return yy}return Tc(t)}return t}function Z5(t,e){return Xg(t,e,by)}function by(t,e,n){return $d(t,e,n,wy)}function wy(t,e,n){return Ed(t,e,n,vy)}function vy(t,e){return va(t,e,K5)}function K5(t){switch(`${t}`.toLowerCase()){case"x":return r3;case"x1":return i3;case"x2":return a3;case"y":return o3;case"y1":return f3;case"y2":return u3}throw new Error(`invalid bin reduce: ${t}`)}function yy(t,e,n){return Math.min(200,Go(t,e,n))}function Q5(t){return J5(t)||re(t)&&zt(t)}function J5(t){return Ia(t)&&typeof t=="function"&&t()instanceof Date}function Ia(t){return typeof t?.range=="function"}function t3(t,e){return t&&e?function*(n){let r=t.bin(n);for(let[o,[i,a]]of t.entries()){let f=e.bin(r[o]);for(let[u,[c,s]]of e.entries())yield[f[u],{x1:i,y1:c,x2:a,y2:s}]}}:t?function*(n){let r=t.bin(n);for(let[o,[i,a]]of t.entries())yield[r[o],{x1:i,x2:a}]}:function*(n){let r=e.bin(n);for(let[o,[i,a]]of e.entries())yield[r[o],{y1:i,y2:a}]}}function _p(t,e,n){return e=Tr(e),r=>{let o=t.map(()=>[]);for(let i of r)o[un(e,n[i])-1]?.push(i);return o}}function e3(t,e,n){let r=_p(t,e,n);return o=>{let i=r(o);for(let a=1,f=i.length;a<f;++a){let u=i[a-1],c=i[a];for(let s of u)c.push(s)}return i}}function n3(t,e,n){let r=_p(t,e,n);return o=>{let i=r(o);for(let a=i.length-2;a>=0;--a){let f=i[a+1],u=i[a];for(let c of f)u.push(c)}return i}}function My(t,e){let n=(+t+ +e)/2;return t instanceof Date?new Date(n):n}var r3={reduceIndex(t,e,{x1:n,x2:r}){return My(n,r)}},o3={reduceIndex(t,e,{y1:n,y2:r}){return My(n,r)}},i3={reduceIndex(t,e,{x1:n}){return n}},a3={reduceIndex(t,e,{x2:n}){return n}},f3={reduceIndex(t,e,{y1:n}){return n}},u3={reduceIndex(t,e,{y2:n}){return n}};function Sy(t={}){return wd(t)?t:{...t,y:wt}}function c3(t={},e={}){arguments.length===1&&([t,e]=s3(t));let{x1:n,x:r=n,y:o,...i}=e,[a,f,u,c]=d3(r,o,"x","y",t,i);return{...a,x1:n,x:f,y1:u,y2:c,y:xa(u,c)}}function Cy({y:t,y1:e,y2:n,...r}={}){return r=Ca(r,"x"),e===void 0&&n===void 0?c3({y:t,...r}):([e,n]=Tg(t,e,n),{...r,y1:e,y2:n})}function s3(t){let{offset:e,order:n,reverse:r,...o}=t;return[{offset:e,order:n,reverse:r},o]}var l3={length:!0};function d3(t,e=yg,n,r,{offset:o,order:i,reverse:a},f){let u=_g(f),[c,s]=Te(t),[d,l]=bo(e),[p,m]=bo(e);return d.hint=p.hint=l3,o=p3(o),i=g3(i,o,r),[Ao(f,(h,g,b)=>{let x=t==null?void 0:s(ya(gt(h,t),b?.[n])),M=gt(h,e,Float64Array),y=gt(h,u),w=i&&i(h,x,M,y),v=h.length,T=l(new Float64Array(v)),E=m(new Float64Array(v)),I=[];for(let D of g){let _=x?Array.from(sn(D,L=>x[L]).values()):[D];if(w)for(let L of _)L.sort(w);for(let L of _){let F=0,P=0;a&&L.reverse();for(let S of L){let A=M[S];A<0?F=E[S]=(T[S]=F)+A:A>0?P=E[S]=(T[S]=P)+A:E[S]=T[S]=P}}I.push(_)}return o&&o(I,T,E,y),{data:h,facets:g}}),c,d,p]}function p3(t){if(t!=null){if(typeof t=="function")return t;switch(`${t}`.toLowerCase()){case"expand":case"normalize":return m3;case"center":case"silhouette":return h3;case"wiggle":return $y}throw new Error(`unknown offset: ${t}`)}}function Ay(t,e){let n=0,r=0;for(let o of t){let i=e[o];i<n&&(n=i),i>r&&(r=i)}return[n,r]}function m3(t,e,n){for(let r of t)for(let o of r){let[i,a]=Ay(o,n);for(let f of o){let u=1/(a-i||1);e[f]=u*(e[f]-i),n[f]=u*(n[f]-i)}}}function h3(t,e,n){for(let r of t){for(let o of r){let[i,a]=Ay(o,n);for(let f of o){let u=(a+i)/2;e[f]-=u,n[f]-=u}}Ey(r,e,n)}Iy(t,e,n)}function $y(t,e,n,r){for(let o of t){let i=new Qt,a=0;for(let f of o){let u=-1,c=f.map(p=>Math.abs(n[p]-e[p])),s=f.map(p=>{u=r?r[p]:++u;let m=n[p]-e[p],h=i.has(u)?m-i.get(u):0;return i.set(u,m),h}),d=[0,...Pa(s)];for(let p of f)e[p]+=a,n[p]+=a;let l=fe(c);l&&(a-=fe(c,(p,m)=>(s[m]/2+d[m])*p)/l)}Ey(o,e,n)}Iy(t,e,n)}function Ey(t,e,n){let r=Jt(t,o=>Jt(o,i=>e[i]));for(let o of t)for(let i of o)e[i]-=r,n[i]-=r}function Iy(t,e,n){let r=t.length;if(r===1)return;let o=t.map(f=>f.flat()),i=o.map(f=>(Jt(f,u=>e[u])+Wt(f,u=>n[u]))/2),a=Jt(i);for(let f=0;f<r;f++){let u=a-i[f];for(let c of o[f])e[c]+=u,n[c]+=u}}function g3(t,e,n){if(t===void 0&&e===$y)return Ty(Kt);if(t!=null){if(typeof t=="string"){let r=t.startsWith("-"),o=r?Mr:Kt;switch((r?t.slice(1):t).toLowerCase()){case"value":case n:return x3(o);case"z":return y3(o);case"sum":return b3(o);case"appearance":return w3(o);case"inside-out":return Ty(o)}return _y(xd(t))}if(typeof t=="function")return(t.length===1?_y:v3)(t);if(Array.isArray(t))return M3(t);throw new Error(`invalid order: ${t}`)}}function x3(t){return(e,n,r)=>(o,i)=>t(r[o],r[i])}function y3(t){return(e,n,r,o)=>(i,a)=>t(o[i],o[a])}function b3(t){return ts(t,(e,n,r,o)=>Lr(ne(e),i=>fe(i,a=>r[a]),i=>o[i]))}function w3(t){return ts(t,(e,n,r,o)=>Lr(ne(e),i=>n[Ho(i,a=>r[a])],i=>o[i]))}function Ty(t){return ts(t,(e,n,r,o)=>{let i=ne(e),a=Lr(i,d=>n[Ho(d,l=>r[l])],d=>o[d]),f=Ce(i,d=>fe(d,l=>r[l]),d=>o[d]),u=[],c=[],s=0;for(let d of a)s<0?(s+=f.get(d),u.push(d)):(s-=f.get(d),c.push(d));return c.reverse().concat(u)})}function _y(t){return e=>{let n=gt(e,t);return(r,o)=>Kt(n[r],n[o])}}function v3(t){return e=>(n,r)=>t(e[n],e[r])}function M3(t){return ts(Kt,()=>t)}function ts(t,e){return(n,r,o,i)=>{if(!i)throw new Error("missing channel: z");let a=new Qt(e(n,r,o,i).map((f,u)=>[f,u]));return(f,u)=>t(a.get(i[f]),a.get(i[u]))}}var S3={ariaLabel:"rect"},es=class extends Dt{constructor(e,n={}){let{x1:r,y1:o,x2:i,y2:a,inset:f=0,insetTop:u=f,insetRight:c=f,insetBottom:s=f,insetLeft:d=f,rx:l,ry:p}=n;super(e,{x1:{value:r,scale:"x",optional:!0},y1:{value:o,scale:"y",optional:!0},x2:{value:i,scale:"x",optional:!0},y2:{value:a,scale:"y",optional:!0}},n,S3),this.insetTop=ct(u),this.insetRight=ct(c),this.insetBottom=ct(s),this.insetLeft=ct(d),this.rx=St(l,"auto"),this.ry=St(p,"auto")}render(e,n,r,o,i){let{x:a,y:f}=n,{x1:u,y1:c,x2:s,y2:d}=r,{marginTop:l,marginRight:p,marginBottom:m,marginLeft:h,width:g,height:b}=o,{projection:x}=i,{insetTop:M,insetRight:y,insetBottom:w,insetLeft:v,rx:T,ry:E}=this;return yt("svg:g",i).call(me,this,o,i).call(ge,this,{x:u&&s&&a,y:c&&d&&f},0,0).call(I=>I.selectAll().data(e).enter().append("rect").call(he,this).attr("x",u&&s&&(x||!fn(a))?D=>Math.min(u[D],s[D])+v:h+v).attr("y",c&&d&&(x||!fn(f))?D=>Math.min(c[D],d[D])+M:l+M).attr("width",u&&s&&(x||!fn(a))?D=>Math.max(0,Math.abs(s[D]-u[D])-v-y):g-p-h-y-v).attr("height",c&&d&&(x||!fn(f))?D=>Math.max(0,Math.abs(c[D]-d[D])-M-w):b-l-m-M-w).call(et,"rx",T).call(et,"ry",E).call(Pe,this,r)).node()}};function Cp(t,e={}){return Sg(e)||(e={...e,x:_c,y2:wt,interval:1}),new es(t,Cy(hx(Sy(e))))}var ns=class{constructor(e){this.el=e;document.addEventListener("click",n=>{this.el.contains(n.target)||this.el.removeAttribute("open")})}};for(let t of document.querySelectorAll(".js-tooltip"))new ns(t);window.onload=function(){C3(),A3(),$3(),_3()};function _3(){let t=document.querySelector("html");for(let e of document.querySelectorAll("h2"))e.addEventListener("click",function(){let n=localStorage.getItem("closed-sections")?.split(",");if(n?.includes(this.id)){n=n.filter(o=>o!==this.id);let r=n.join(",");localStorage.setItem("closed-sections",r),t.setAttribute("data-closed-sections",r)}else{n=[this.id].concat(n??[]);let r=n.join(",");localStorage.setItem("closed-sections",r),t.setAttribute("data-closed-sections",r)}})}function C3(){for(let t of Page.Charts.Programs??[])for(let e of t.Counters??[]){let n={tip:!0,x:o=>new Date(o.Week),y:o=>o.Value,interval:Page.Charts.UploadDay,fill:o=>{let i=Number(o.Key);return isNaN(i)?o.Key:i}},r=Jc({nice:!0,x:{type:"utc",domain:Page.Charts.DateRange.map(o=>new Date(o)),label:"Week"},y:{label:"Value"},color:{type:"ordinal",legend:!0,scheme:"Spectral",reverse:!0,label:"Counter"},height:256,style:"overflow:visible;width:100%;background:transparent",marks:[Cp(e.Data,Tp({y:"sum"},n)),Aa([0])]});document.querySelector(`[data-chart-id="${e.ID}"]`)?.replaceChildren(r)}}function A3(){let t=document.querySelector(".js-selectConfig");t?.addEventListener("change",()=>{let e=new URLSearchParams(location.search);e.set(t.name,t.value),history.replaceState(null,"","?"+e.toString()),location.reload()})}function $3(){let t=document.querySelectorAll("h1, h2, h3, h4"),e=E3(()=>{let r=[];for(let u of t){let c=u.getBoundingClientRect();c.height&&c.top<80&&r.unshift(u)}r.length<2&&(r=[]);let o=1/0,i=[];for(let u of r){let c=Number(u.tagName[1]);c<o&&(o=c,i.unshift(u))}let a=document.querySelector(".js-breadcrumb ol"),f=[];for(let u of i){a?.replaceChildren;let c=document.createElement("li"),s=document.createElement("a");s.href=`#${u.id}`,s.innerText=u.getAttribute("data-label")??u.innerText,c.appendChild(s),f.push(c)}a?.replaceChildren(...f)},100),n=new IntersectionObserver(e);for(let r of t)n.observe(r)}function E3(t,e){let n;return(...r)=>{clearTimeout(n),n=setTimeout(()=>t(...r),e)}}})();
+}`)).call(Po,n);for(let A of f){let{channels:N,values:O,facets:R}=p.get(A);if(l===void 0||A.facet==="super"){let tt=null;if(R&&(tt=R[0],tt=A.filter(tt,N,O),tt.length===0))continue;let Z=A.render(tt,h,O,y,w);if(Z==null)continue;T.appendChild(Z)}else{let tt;for(let Z of l){if(!(A.facetAnchor?.(l,D,Z)??!Z.empty))continue;let W=null;if(R){let at=c.has(A);if(W=R[at?Z.i:0],W=A.filter(W,N,O),W.length===0)continue;!at&&W===R[0]&&(W=_g(W)),W.fx=Z.x,W.fy=Z.y,W.fi=Z.i}let Q=A.render(W,h,O,M,w);if(Q!=null){(tt??=hn(T).append("g")).append(()=>Q).datum(Z);for(let at of["aria-label","aria-description","aria-hidden","transform"])Q.hasAttribute(at)&&(tt.attr(at,Q.getAttribute(at)),Q.removeAttribute(at))}}tt?.selectChildren().attr("transform",_)}}let P=fy(m,w,t);if(r!=null||P.length>0){E=v.createElement("figure"),E.style.maxWidth="initial";for(let A of P)E.appendChild(A);if(E.appendChild(T),r!=null){let A=v.createElement("figcaption");A.appendChild(r?.ownerDocument?r:v.createTextNode(r)),E.appendChild(A)}}E.scale=W1(m),E.legend=oy(m,w,t);let S=Jg();return S>0&&hn(T).append("text").attr("x",L).attr("y",20).attr("dy","-1em").attr("text-anchor","end").attr("font-family","initial").text("\u26A0\uFE0F").append("title").text(`${S.toLocaleString("en-US")} warning${S===1?"":"s"}. Please check the console.`),E}function D5({marks:t=[],...e}={}){return Jc({...e,marks:[...t,this]})}Dt.prototype.plot=D5;function ly(t){return t.flat(1/0).filter(e=>e!=null).map(N5)}function N5(t){return typeof t.render=="function"?t:new vp(t)}var vp=class extends Dt{constructor(e){if(typeof e!="function")throw new TypeError("invalid mark; missing render function");super(),this.render=e}render(){}};function Mp(t,e){for(let n in t)hy(t[n],e);return t}function hy(t,e){let{scale:n,transform:r=!0}=t;if(n==null||!r)return;let{type:o,percent:i,interval:a,transform:f=i?u=>u*100:vd(a,o)}=e[n]??{};f!=null&&(t.value=pt(t.value,f),t.transform=!1)}function R5(t){for(let e in t)Nd(e,t[e])}function Ea(t,e,n,r=yg){for(let{channels:o}of e.values())for(let i in o){let a=o[i],{scale:f}=a;if(f!=null&&r(f))if(f==="projection"){if(!a1(n)){let u=n.x?.domain===void 0,c=n.y?.domain===void 0;if(u||c){let[s,d]=u1(a);u&&wp(t,"x",s),c&&wp(t,"y",d)}}}else wp(t,f,a)}return t}function wp(t,e,n){let r=t.get(e);r!==void 0?r.push(n):t.set(e,[n])}function L5(t,e){if(t==null)return;let{x:n,y:r}=t;if(n==null&&r==null)return;let o=kt(t.data);if(o==null)throw new Error("missing facet data");let i={};n!=null&&(i.fx=$o(o,{value:n,scale:"fx"})),r!=null&&(i.fy=$o(o,{value:r,scale:"fy"})),Mp(i,e);let a=Fc(o,i);return{channels:i,groups:a,data:t.data}}function dy(t,e,n){if(t.facet===null||t.facet==="super")return;let{fx:r,fy:o}=t;if(r!=null||o!=null){let u=kt(t.data??r??o);if(u===void 0)throw new Error(`missing facet data in ${t.ariaLabel}`);if(u===null)return;let c={};return r!=null&&(c.fx=$o(u,{value:r,scale:"fx"})),o!=null&&(c.fy=$o(u,{value:o,scale:"fy"})),Mp(c,n),{channels:c,groups:Fc(u,c)}}if(e===void 0)return;let{channels:i,groups:a,data:f}=e;if(t.facet!=="auto"||t.data===f)return{channels:i,groups:a};f.length>0&&(a.size>1||a.size===1&&i.fx&&i.fy&&[...a][0][1].size>1)&&kt(t.data)?.length===f.length&&on(`Warning: the ${t.ariaLabel} mark appears to use faceted data, but isn\u2019t faceted. The mark data has the same length as the facet data and the mark facet option is "auto", but the mark data and facet data are distinct. If this mark should be faceted, set the mark facet option to true; otherwise, suppress this warning by setting the mark facet option to false.`)}function P5(t,e={}){return Er({...e,x:null,y:null},(n,r,o,i,a,f)=>f.getMarkState(t))}function O5(t){let e=[];for(let n of t){let r=n.tip;if(r){let i=(r==="x"?ax:r==="y"?fx:ix)(P5(n));i.title=null,e.push(sy(n.data,i))}}return e}function F5(t,e,n){let{projection:r,x:o={},y:i={},fx:a={},fy:f={},axis:u,grid:c,facet:s={},facet:{axis:d=u,grid:l}=s,x:{axis:p=u,grid:m=p===null?null:c}=o,y:{axis:h=u,grid:g=h===null?null:c}=i,fx:{axis:b=d,grid:x=b===null?null:l}=a,fy:{axis:M=d,grid:y=M===null?null:l}=f}=n;(r||!xo(o)&&!py("x",t))&&(p=m=null),(r||!xo(i)&&!py("y",t))&&(h=g=null),e.has("fx")||(b=x=null),e.has("fy")||(M=y=null),p===void 0&&(p=!Qc(t,"x")),h===void 0&&(h=!Qc(t,"y")),b===void 0&&(b=!Qc(t,"fx")),M===void 0&&(M=!Qc(t,"fy")),p===!0&&(p="bottom"),h===!0&&(h="left"),b===!0&&(b=p==="top"||p===null?"bottom":"top"),M===!0&&(M=h==="right"||h===null?"left":"right");let w=[];return Kc(w,y,Ux,f),Zc(w,M,Fx,"right","left",s,f),Kc(w,x,Hx,a),Zc(w,b,qx,"top","bottom",s,a),Kc(w,g,Bx,i),Zc(w,h,pp,"left","right",n,i),Kc(w,m,Xx,o),Zc(w,p,mp,"bottom","top",n,o),w}function Zc(t,e,n,r,o,i,a){if(!e)return;let f=q5(e);a=Y5(f?r:e,i,a);let{line:u}=a;(n===pp||n===mp)&&u&&!$r(u)&&t.push(uy(z5(a))),t.push(n(a)),f&&t.push(n({...a,anchor:o,label:null}))}function Kc(t,e,n,r){!e||$r(e)||t.push(n(B5(e,r)))}function q5(t){return/^\s*both\s*$/i.test(t)}function Y5(t,e,{line:n=e.line,ticks:r,tickSize:o,tickSpacing:i,tickPadding:a,tickFormat:f,tickRotate:u,fontVariant:c,ariaLabel:s,ariaDescription:d,label:l=e.label,labelAnchor:p,labelArrow:m=e.labelArrow,labelOffset:h}){return{anchor:t,line:n,ticks:r,tickSize:o,tickSpacing:i,tickPadding:a,tickFormat:f,tickRotate:u,fontVariant:c,ariaLabel:s,ariaDescription:d,label:l,labelAnchor:p,labelArrow:m,labelOffset:h}}function z5(t){let{anchor:e,line:n}=t;return{anchor:e,facetAnchor:e+"-empty",stroke:n===!0?void 0:n}}function B5(t,{stroke:e=wo(t)?t:void 0,ticks:n=U5(t)?t:void 0,tickSpacing:r,ariaLabel:o,ariaDescription:i}){return{stroke:e,ticks:n,tickSpacing:r,ariaLabel:o,ariaDescription:i}}function U5(t){switch(typeof t){case"number":return!0;case"string":return!wo(t)}return re(t)||typeof t?.range=="function"}function Qc(t,e){let n=`${e}-axis `;return t.some(r=>r.ariaLabel?.startsWith(n))}function py(t,e){for(let n of e)for(let r in n.channels){let{scale:o}=n.channels[r];if(o===t||o==="projection")return!0}return!1}function X5(t,e){for(let n in t){let r=t[n],o=e[n];r.label===void 0&&o&&(r.label=o.label)}return t}function H5({fx:t,fy:e},n){let{marginTop:r,marginRight:o,marginBottom:i,marginLeft:a,width:f,height:u}=Rc(n),c=t&&my(t),s=e&&my(e);return{marginTop:e?s[0]:r,marginRight:t?f-c[1]:o,marginBottom:e?u-s[1]:i,marginLeft:t?c[0]:a,inset:{marginTop:n.marginTop,marginRight:n.marginRight,marginBottom:n.marginBottom,marginLeft:n.marginLeft},width:f,height:u}}function my(t){let e=t.domain(),n=t(e[0]),r=t(e[e.length-1]);return r<n&&([n,r]=[r,n]),[n,r+t.bandwidth()]}function Sp(t={y:"count"},e={}){[t,e]=G5(t,e);let{x:n,y:r}=e;return W5(V5(n,e,wt),null,null,r,t,Oo(e))}function W5(t,e,n,r,{data:o=Id,filter:i=ba,sort:a,reverse:f,...u}={},c={}){t=gy(t),e=gy(e),u=Z5(u,c),o=wy(o,wt),a=a==null?void 0:yy("sort",a,c),i=i==null?void 0:by("filter",i,c),n!=null&&wa(u,"x","x1","x2")&&(n=null),r!=null&&wa(u,"y","y1","y2")&&(r=null);let[s,d]=Te(t),[l,p]=Te(t),[m,h]=Te(e),[g,b]=Te(e),[x,M]=n!=null?[n,"x"]:r!=null?[r,"y"]:[],[y,w]=Te(x),{x:v,y:T,z:E,fill:I,stroke:D,x1:_,x2:L,y1:F,y2:P,domain:S,cumulative:A,thresholds:N,interval:O,...R}=c,[tt,Z]=Te(E),[W]=ie(I),[Q]=ie(D),[at,Ut]=Te(W),[Oe,G]=Te(Q);return{..."z"in c&&{z:tt||E},..."fill"in c&&{fill:at||I},..."stroke"in c&&{stroke:Oe||D},...Ao(R,(X,$,q)=>{let Y=ya(gt(X,x),q?.[M]),C=gt(X,E),j=gt(X,W),J=gt(X,Q),ot=Xg(u,{z:C,fill:j,stroke:J}),lt=[],Xt=[],Zn=Y&&w([]),ka=C&&Z([]),Da=j&&Ut([]),Na=J&&G([]),Ra=t&&d([]),ns=t&&p([]),Cp=e&&h([]),ky=e&&b([]),Dy=t3(t?.(X),e?.(X)),Ny=0;for(let Dr of u)Dr.initialize(X);a&&a.initialize(X),i&&i.initialize(X);for(let Dr of $){let Ap=[];for(let zo of u)zo.scope("facet",Dr);a&&a.scope("facet",Dr),i&&i.scope("facet",Dr);for(let[zo,Ry]of Ed(Dr,ot))for(let[Ly,Py]of Ed(Ry,Y))for(let[Kn,Qn]of Dy(Py))if(!(i&&!i.reduce(Kn,Qn))){Ap.push(Ny++),Xt.push(o.reduceIndex(Kn,X,Qn)),Y&&Zn.push(Ly),C&&ka.push(ot===C?zo:C[Kn[0]]),j&&Da.push(ot===j?zo:j[Kn[0]]),J&&Na.push(ot===J?zo:J[Kn[0]]),Ra&&(Ra.push(Qn.x1),ns.push(Qn.x2)),Cp&&(Cp.push(Qn.y1),ky.push(Qn.y2));for(let Oy of u)Oy.reduce(Kn,Qn);a&&a.reduce(Kn)}lt.push(Ap)}return Hg(lt,a,f),{data:Xt,facets:lt}}),...!wa(u,"x")&&(s?{x1:s,x2:l,x:xa(s,l)}:{x:v,x1:_,x2:L}),...!wa(u,"y")&&(m?{y1:m,y2:g,y:xa(m,g)}:{y:T,y1:F,y2:P}),...y&&{[M]:y},...Object.fromEntries(u.map(({name:X,output:$})=>[X,$]))}}function G5({cumulative:t,domain:e,thresholds:n,interval:r,...o},i){return[o,{cumulative:t,domain:e,thresholds:n,interval:r,...i}]}function V5(t,{cumulative:e,domain:n,thresholds:r,interval:o},i){return t={...rn(t)},t.domain===void 0&&(t.domain=n),t.cumulative===void 0&&(t.cumulative=e),t.thresholds===void 0&&(t.thresholds=r),t.interval===void 0&&(t.interval=o),t.value===void 0&&(t.value=i),t.thresholds=j5(t.thresholds,t.interval),t}function gy(t){if(t==null)return;let{value:e,cumulative:n,domain:r=Ct,thresholds:o}=t,i=a=>{let f=gt(a,e),u;if(zt(f)||Q5(o)){f=pt(f,yd,Float64Array);let[s,d]=typeof r=="function"?r(f):r,l=typeof o=="function"&&!Ia(o)?o(f,s,d):o;typeof l=="number"&&(l=Ui(s,d,l)),Ia(l)&&(r===Ct&&(s=l.floor(s),d=l.offset(l.floor(d))),l=l.range(s,l.offset(d))),u=l}else{f=Tr(f);let[s,d]=typeof r=="function"?r(f):r,l=typeof o=="function"&&!Ia(o)?o(f,s,d):o;if(typeof l=="number")if(r===Ct){let p=tr(s,d,l);if(isFinite(p))if(p>0){let m=Math.round(s/p),h=Math.round(d/p);m*p<=s||--m,h*p>d||++h;let g=h-m+1;l=new Float64Array(g);for(let b=0;b<g;++b)l[b]=(m+b)*p}else if(p<0){p=-p;let m=Math.round(s*p),h=Math.round(d*p);m/p<=s||--m,h/p>d||++h;let g=h-m+1;l=new Float64Array(g);for(let b=0;b<g;++b)l[b]=(m+b)/p}else l=[s];else l=[s]}else l=Ae(s,d,l);else Ia(l)&&(r===Ct&&(s=l.floor(s),d=l.offset(l.floor(d))),l=l.range(s,l.offset(d)));u=l}let c=[];if(u.length===1)c.push([u[0],u[0]]);else for(let s=1;s<u.length;++s)c.push([u[s-1],u[s]]);return c.bin=(n<0?n3:n>0?e3:Tp)(c,u,f),c};return i.label=Re(e),i}function j5(t,e,n=xy){if(t===void 0)return e===void 0?n:nn(e);if(typeof t=="string"){switch(t.toLowerCase()){case"freedman-diaconis":return Ba;case"scott":return Go;case"sturges":return Fa;case"auto":return xy}return Tc(t)}return t}function Z5(t,e){return Ug(t,e,yy)}function yy(t,e,n){return Ad(t,e,n,by)}function by(t,e,n){return $d(t,e,n,wy)}function wy(t,e){return va(t,e,K5)}function K5(t){switch(`${t}`.toLowerCase()){case"x":return r3;case"x1":return i3;case"x2":return a3;case"y":return o3;case"y1":return f3;case"y2":return u3}throw new Error(`invalid bin reduce: ${t}`)}function xy(t,e,n){return Math.min(200,Go(t,e,n))}function Q5(t){return J5(t)||re(t)&&zt(t)}function J5(t){return Ia(t)&&typeof t=="function"&&t()instanceof Date}function Ia(t){return typeof t?.range=="function"}function t3(t,e){return t&&e?function*(n){let r=t.bin(n);for(let[o,[i,a]]of t.entries()){let f=e.bin(r[o]);for(let[u,[c,s]]of e.entries())yield[f[u],{x1:i,y1:c,x2:a,y2:s}]}}:t?function*(n){let r=t.bin(n);for(let[o,[i,a]]of t.entries())yield[r[o],{x1:i,x2:a}]}:function*(n){let r=e.bin(n);for(let[o,[i,a]]of e.entries())yield[r[o],{y1:i,y2:a}]}}function Tp(t,e,n){return e=Tr(e),r=>{let o=t.map(()=>[]);for(let i of r)o[un(e,n[i])-1]?.push(i);return o}}function e3(t,e,n){let r=Tp(t,e,n);return o=>{let i=r(o);for(let a=1,f=i.length;a<f;++a){let u=i[a-1],c=i[a];for(let s of u)c.push(s)}return i}}function n3(t,e,n){let r=Tp(t,e,n);return o=>{let i=r(o);for(let a=i.length-2;a>=0;--a){let f=i[a+1],u=i[a];for(let c of f)u.push(c)}return i}}function vy(t,e){let n=(+t+ +e)/2;return t instanceof Date?new Date(n):n}var r3={reduceIndex(t,e,{x1:n,x2:r}){return vy(n,r)}},o3={reduceIndex(t,e,{y1:n,y2:r}){return vy(n,r)}},i3={reduceIndex(t,e,{x1:n}){return n}},a3={reduceIndex(t,e,{x2:n}){return n}},f3={reduceIndex(t,e,{y1:n}){return n}},u3={reduceIndex(t,e,{y2:n}){return n}};function My(t={}){return bd(t)?t:{...t,y:wt}}function c3(t={},e={}){arguments.length===1&&([t,e]=s3(t));let{x1:n,x:r=n,y:o,...i}=e,[a,f,u,c]=d3(r,o,"x","y",t,i);return{...a,x1:n,x:f,y1:u,y2:c,y:xa(u,c)}}function _y({y:t,y1:e,y2:n,...r}={}){return r=Ca(r,"x"),e===void 0&&n===void 0?c3({y:t,...r}):([e,n]=Sg(t,e,n),{...r,y1:e,y2:n})}function s3(t){let{offset:e,order:n,reverse:r,...o}=t;return[{offset:e,order:n,reverse:r},o]}var l3={length:!0};function d3(t,e=xg,n,r,{offset:o,order:i,reverse:a},f){let u=Tg(f),[c,s]=Te(t),[d,l]=bo(e),[p,m]=bo(e);return d.hint=p.hint=l3,o=p3(o),i=g3(i,o,r),[Ao(f,(h,g,b)=>{let x=t==null?void 0:s(ya(gt(h,t),b?.[n])),M=gt(h,e,Float64Array),y=gt(h,u),w=i&&i(h,x,M,y),v=h.length,T=l(new Float64Array(v)),E=m(new Float64Array(v)),I=[];for(let D of g){let _=x?Array.from(sn(D,L=>x[L]).values()):[D];if(w)for(let L of _)L.sort(w);for(let L of _){let F=0,P=0;a&&L.reverse();for(let S of L){let A=M[S];A<0?F=E[S]=(T[S]=F)+A:A>0?P=E[S]=(T[S]=P)+A:E[S]=T[S]=P}}I.push(_)}return o&&o(I,T,E,y),{data:h,facets:g}}),c,d,p]}function p3(t){if(t!=null){if(typeof t=="function")return t;switch(`${t}`.toLowerCase()){case"expand":case"normalize":return m3;case"center":case"silhouette":return h3;case"wiggle":return Ay}throw new Error(`unknown offset: ${t}`)}}function Cy(t,e){let n=0,r=0;for(let o of t){let i=e[o];i<n&&(n=i),i>r&&(r=i)}return[n,r]}function m3(t,e,n){for(let r of t)for(let o of r){let[i,a]=Cy(o,n);for(let f of o){let u=1/(a-i||1);e[f]=u*(e[f]-i),n[f]=u*(n[f]-i)}}}function h3(t,e,n){for(let r of t){for(let o of r){let[i,a]=Cy(o,n);for(let f of o){let u=(a+i)/2;e[f]-=u,n[f]-=u}}$y(r,e,n)}Ey(t,e,n)}function Ay(t,e,n,r){for(let o of t){let i=new Qt,a=0;for(let f of o){let u=-1,c=f.map(p=>Math.abs(n[p]-e[p])),s=f.map(p=>{u=r?r[p]:++u;let m=n[p]-e[p],h=i.has(u)?m-i.get(u):0;return i.set(u,m),h}),d=[0,...Pa(s)];for(let p of f)e[p]+=a,n[p]+=a;let l=fe(c);l&&(a-=fe(c,(p,m)=>(s[m]/2+d[m])*p)/l)}$y(o,e,n)}Ey(t,e,n)}function $y(t,e,n){let r=Jt(t,o=>Jt(o,i=>e[i]));for(let o of t)for(let i of o)e[i]-=r,n[i]-=r}function Ey(t,e,n){let r=t.length;if(r===1)return;let o=t.map(f=>f.flat()),i=o.map(f=>(Jt(f,u=>e[u])+Ht(f,u=>n[u]))/2),a=Jt(i);for(let f=0;f<r;f++){let u=a-i[f];for(let c of o[f])e[c]+=u,n[c]+=u}}function g3(t,e,n){if(t===void 0&&e===Ay)return Sy(Kt);if(t!=null){if(typeof t=="string"){let r=t.startsWith("-"),o=r?Mr:Kt;switch((r?t.slice(1):t).toLowerCase()){case"value":case n:return x3(o);case"z":return y3(o);case"sum":return b3(o);case"appearance":return w3(o);case"inside-out":return Sy(o)}return Ty(gd(t))}if(typeof t=="function")return(t.length===1?Ty:v3)(t);if(Array.isArray(t))return M3(t);throw new Error(`invalid order: ${t}`)}}function x3(t){return(e,n,r)=>(o,i)=>t(r[o],r[i])}function y3(t){return(e,n,r,o)=>(i,a)=>t(o[i],o[a])}function b3(t){return ts(t,(e,n,r,o)=>Lr(ne(e),i=>fe(i,a=>r[a]),i=>o[i]))}function w3(t){return ts(t,(e,n,r,o)=>Lr(ne(e),i=>n[Wo(i,a=>r[a])],i=>o[i]))}function Sy(t){return ts(t,(e,n,r,o)=>{let i=ne(e),a=Lr(i,d=>n[Wo(d,l=>r[l])],d=>o[d]),f=Ce(i,d=>fe(d,l=>r[l]),d=>o[d]),u=[],c=[],s=0;for(let d of a)s<0?(s+=f.get(d),u.push(d)):(s-=f.get(d),c.push(d));return c.reverse().concat(u)})}function Ty(t){return e=>{let n=gt(e,t);return(r,o)=>Kt(n[r],n[o])}}function v3(t){return e=>(n,r)=>t(e[n],e[r])}function M3(t){return ts(Kt,()=>t)}function ts(t,e){return(n,r,o,i)=>{if(!i)throw new Error("missing channel: z");let a=new Qt(e(n,r,o,i).map((f,u)=>[f,u]));return(f,u)=>t(a.get(i[f]),a.get(i[u]))}}var S3={ariaLabel:"rect"},es=class extends Dt{constructor(e,n={}){let{x1:r,y1:o,x2:i,y2:a,inset:f=0,insetTop:u=f,insetRight:c=f,insetBottom:s=f,insetLeft:d=f,rx:l,ry:p}=n;super(e,{x1:{value:r,scale:"x",optional:!0},y1:{value:o,scale:"y",optional:!0},x2:{value:i,scale:"x",optional:!0},y2:{value:a,scale:"y",optional:!0}},n,S3),this.insetTop=ct(u),this.insetRight=ct(c),this.insetBottom=ct(s),this.insetLeft=ct(d),this.rx=St(l,"auto"),this.ry=St(p,"auto")}render(e,n,r,o,i){let{x:a,y:f}=n,{x1:u,y1:c,x2:s,y2:d}=r,{marginTop:l,marginRight:p,marginBottom:m,marginLeft:h,width:g,height:b}=o,{projection:x}=i,{insetTop:M,insetRight:y,insetBottom:w,insetLeft:v,rx:T,ry:E}=this;return yt("svg:g",i).call(me,this,o,i).call(ge,this,{x:u&&s&&a,y:c&&d&&f},0,0).call(I=>I.selectAll().data(e).enter().append("rect").call(he,this).attr("x",u&&s&&(x||!fn(a))?D=>Math.min(u[D],s[D])+v:h+v).attr("y",c&&d&&(x||!fn(f))?D=>Math.min(c[D],d[D])+M:l+M).attr("width",u&&s&&(x||!fn(a))?D=>Math.max(0,Math.abs(s[D]-u[D])-v-y):g-p-h-y-v).attr("height",c&&d&&(x||!fn(f))?D=>Math.max(0,Math.abs(c[D]-d[D])-M-w):b-l-m-M-w).call(et,"rx",T).call(et,"ry",E).call(Pe,this,r)).node()}};function _p(t,e={}){return Mg(e)||(e={...e,x:_c,y2:wt,interval:1}),new es(t,_y(mx(My(e))))}function Iy(t,e){let n;return(...r)=>{clearTimeout(n),n=setTimeout(()=>t(...r),e)}}window.onload=function(){C3(),A3(),$3(),_3()};function _3(){let t=document.querySelector("html");for(let e of document.querySelectorAll("h2"))e.addEventListener("click",function(){let n=localStorage.getItem("closed-sections")?.split(",");if(n?.includes(this.id)){n=n.filter(o=>o!==this.id);let r=n.join(",");localStorage.setItem("closed-sections",r),t.setAttribute("data-closed-sections",r)}else{n=[this.id].concat(n??[]);let r=n.join(",");localStorage.setItem("closed-sections",r),t.setAttribute("data-closed-sections",r)}})}function C3(){for(let t of Page.Charts.Programs??[])for(let e of t.Counters??[]){let n={tip:!0,x:o=>new Date(o.Week),y:o=>o.Value,interval:Page.Charts.UploadDay,fill:o=>{let i=Number(o.Key);return isNaN(i)?o.Key:i}},r=Jc({nice:!0,x:{type:"utc",domain:Page.Charts.DateRange.map(o=>new Date(o)),label:"Week"},y:{label:"Value"},color:{type:"ordinal",legend:!0,scheme:"Spectral",reverse:!0,label:"Counter"},height:256,style:"overflow:visible;width:100%;background:transparent",marks:[_p(e.Data,Sp({y:"sum"},n)),Aa([0])]});document.querySelector(`[data-chart-id="${e.ID}"]`)?.replaceChildren(r)}}function A3(){let t=document.querySelector(".js-selectConfig");t?.addEventListener("change",()=>{let e=new URLSearchParams(location.search);e.set(t.name,t.value),history.replaceState(null,"","?"+e.toString()),location.reload()})}function $3(){let t=document.querySelectorAll("h1, h2, h3, h4"),e=Iy(()=>{let r=[];for(let u of t){let c=u.getBoundingClientRect();c.height&&c.top<80&&r.unshift(u)}r.length<2&&(r=[]);let o=1/0,i=[];for(let u of r){let c=Number(u.tagName[1]);c<o&&(o=c,i.unshift(u))}let a=document.querySelector(".js-breadcrumb ol"),f=[];for(let u of i){a?.replaceChildren;let c=document.createElement("li"),s=document.createElement("a");s.href=`#${u.id}`,s.innerText=u.getAttribute("data-label")??u.innerText,c.appendChild(s),f.push(c)}a?.replaceChildren(...f)},100),n=new IntersectionObserver(e);for(let r of t)n.observe(r)}})();
 /**
  * @license
- * Copyright 2021 The Go Authors. All rights reserved.
+ * Copyright 2024 The Go Authors. All rights reserved.
  * Use of this source code is governed by a BSD-style
  * license that can be found in the LICENSE file.
  */
diff --git a/internal/content/gotelemetryview/static/index.min.js.map b/internal/content/gotelemetryview/static/index.min.js.map
index adf182a..f190054 100644
--- a/internal/content/gotelemetryview/static/index.min.js.map
+++ b/internal/content/gotelemetryview/static/index.min.js.map
@@ -1,7 +1,7 @@
 {
   "version": 3,
-  "sources": ["../../../../node_modules/d3-array/src/ascending.js", "../../../../node_modules/d3-array/src/descending.js", "../../../../node_modules/d3-array/src/bisector.js", "../../../../node_modules/d3-array/src/number.js", "../../../../node_modules/d3-array/src/bisect.js", "../../../../node_modules/d3-array/src/count.js", "../../../../node_modules/d3-array/src/cross.js", "../../../../node_modules/d3-array/src/cumsum.js", "../../../../node_modules/d3-array/src/variance.js", "../../../../node_modules/d3-array/src/deviation.js", "../../../../node_modules/d3-array/src/extent.js", "../../../../node_modules/d3-array/src/fsum.js", "../../../../node_modules/internmap/src/index.js", "../../../../node_modules/d3-array/src/identity.js", "../../../../node_modules/d3-array/src/group.js", "../../../../node_modules/d3-array/src/permute.js", "../../../../node_modules/d3-array/src/sort.js", "../../../../node_modules/d3-array/src/groupSort.js", "../../../../node_modules/d3-array/src/ticks.js", "../../../../node_modules/d3-array/src/threshold/sturges.js", "../../../../node_modules/d3-array/src/max.js", "../../../../node_modules/d3-array/src/maxIndex.js", "../../../../node_modules/d3-array/src/min.js", "../../../../node_modules/d3-array/src/minIndex.js", "../../../../node_modules/d3-array/src/quickselect.js", "../../../../node_modules/d3-array/src/greatest.js", "../../../../node_modules/d3-array/src/quantile.js", "../../../../node_modules/d3-array/src/threshold/freedmanDiaconis.js", "../../../../node_modules/d3-array/src/threshold/scott.js", "../../../../node_modules/d3-array/src/mean.js", "../../../../node_modules/d3-array/src/median.js", "../../../../node_modules/d3-array/src/merge.js", "../../../../node_modules/d3-array/src/mode.js", "../../../../node_modules/d3-array/src/pairs.js", "../../../../node_modules/d3-array/src/range.js", "../../../../node_modules/d3-array/src/sum.js", "../../../../node_modules/d3-array/src/reverse.js", "../../../../node_modules/d3-axis/src/identity.js", "../../../../node_modules/d3-axis/src/axis.js", "../../../../node_modules/d3-dispatch/src/dispatch.js", "../../../../node_modules/d3-selection/src/namespaces.js", "../../../../node_modules/d3-selection/src/namespace.js", "../../../../node_modules/d3-selection/src/creator.js", "../../../../node_modules/d3-selection/src/selector.js", "../../../../node_modules/d3-selection/src/selection/select.js", "../../../../node_modules/d3-selection/src/array.js", "../../../../node_modules/d3-selection/src/selectorAll.js", "../../../../node_modules/d3-selection/src/selection/selectAll.js", "../../../../node_modules/d3-selection/src/matcher.js", "../../../../node_modules/d3-selection/src/selection/selectChild.js", "../../../../node_modules/d3-selection/src/selection/selectChildren.js", "../../../../node_modules/d3-selection/src/selection/filter.js", "../../../../node_modules/d3-selection/src/selection/sparse.js", "../../../../node_modules/d3-selection/src/selection/enter.js", "../../../../node_modules/d3-selection/src/constant.js", "../../../../node_modules/d3-selection/src/selection/data.js", "../../../../node_modules/d3-selection/src/selection/exit.js", "../../../../node_modules/d3-selection/src/selection/join.js", "../../../../node_modules/d3-selection/src/selection/merge.js", "../../../../node_modules/d3-selection/src/selection/order.js", "../../../../node_modules/d3-selection/src/selection/sort.js", "../../../../node_modules/d3-selection/src/selection/call.js", "../../../../node_modules/d3-selection/src/selection/nodes.js", "../../../../node_modules/d3-selection/src/selection/node.js", "../../../../node_modules/d3-selection/src/selection/size.js", "../../../../node_modules/d3-selection/src/selection/empty.js", "../../../../node_modules/d3-selection/src/selection/each.js", "../../../../node_modules/d3-selection/src/selection/attr.js", "../../../../node_modules/d3-selection/src/window.js", "../../../../node_modules/d3-selection/src/selection/style.js", "../../../../node_modules/d3-selection/src/selection/property.js", "../../../../node_modules/d3-selection/src/selection/classed.js", "../../../../node_modules/d3-selection/src/selection/text.js", "../../../../node_modules/d3-selection/src/selection/html.js", "../../../../node_modules/d3-selection/src/selection/raise.js", "../../../../node_modules/d3-selection/src/selection/lower.js", "../../../../node_modules/d3-selection/src/selection/append.js", "../../../../node_modules/d3-selection/src/selection/insert.js", "../../../../node_modules/d3-selection/src/selection/remove.js", "../../../../node_modules/d3-selection/src/selection/clone.js", "../../../../node_modules/d3-selection/src/selection/datum.js", "../../../../node_modules/d3-selection/src/selection/on.js", "../../../../node_modules/d3-selection/src/selection/dispatch.js", "../../../../node_modules/d3-selection/src/selection/iterator.js", "../../../../node_modules/d3-selection/src/selection/index.js", "../../../../node_modules/d3-selection/src/select.js", "../../../../node_modules/d3-selection/src/sourceEvent.js", "../../../../node_modules/d3-selection/src/pointer.js", "../../../../node_modules/d3-color/src/define.js", "../../../../node_modules/d3-color/src/color.js", "../../../../node_modules/d3-color/src/math.js", "../../../../node_modules/d3-color/src/lab.js", "../../../../node_modules/d3-color/src/cubehelix.js", "../../../../node_modules/d3-interpolate/src/basis.js", "../../../../node_modules/d3-interpolate/src/basisClosed.js", "../../../../node_modules/d3-interpolate/src/constant.js", "../../../../node_modules/d3-interpolate/src/color.js", "../../../../node_modules/d3-interpolate/src/rgb.js", "../../../../node_modules/d3-interpolate/src/numberArray.js", "../../../../node_modules/d3-interpolate/src/array.js", "../../../../node_modules/d3-interpolate/src/date.js", "../../../../node_modules/d3-interpolate/src/number.js", "../../../../node_modules/d3-interpolate/src/object.js", "../../../../node_modules/d3-interpolate/src/string.js", "../../../../node_modules/d3-interpolate/src/value.js", "../../../../node_modules/d3-interpolate/src/round.js", "../../../../node_modules/d3-interpolate/src/transform/decompose.js", "../../../../node_modules/d3-interpolate/src/transform/parse.js", "../../../../node_modules/d3-interpolate/src/transform/index.js", "../../../../node_modules/d3-interpolate/src/hsl.js", "../../../../node_modules/d3-interpolate/src/lab.js", "../../../../node_modules/d3-interpolate/src/hcl.js", "../../../../node_modules/d3-interpolate/src/cubehelix.js", "../../../../node_modules/d3-interpolate/src/piecewise.js", "../../../../node_modules/d3-interpolate/src/quantize.js", "../../../../node_modules/d3-timer/src/timer.js", "../../../../node_modules/d3-timer/src/timeout.js", "../../../../node_modules/d3-transition/src/transition/schedule.js", "../../../../node_modules/d3-transition/src/interrupt.js", "../../../../node_modules/d3-transition/src/selection/interrupt.js", "../../../../node_modules/d3-transition/src/transition/tween.js", "../../../../node_modules/d3-transition/src/transition/interpolate.js", "../../../../node_modules/d3-transition/src/transition/attr.js", "../../../../node_modules/d3-transition/src/transition/attrTween.js", "../../../../node_modules/d3-transition/src/transition/delay.js", "../../../../node_modules/d3-transition/src/transition/duration.js", "../../../../node_modules/d3-transition/src/transition/ease.js", "../../../../node_modules/d3-transition/src/transition/easeVarying.js", "../../../../node_modules/d3-transition/src/transition/filter.js", "../../../../node_modules/d3-transition/src/transition/merge.js", "../../../../node_modules/d3-transition/src/transition/on.js", "../../../../node_modules/d3-transition/src/transition/remove.js", "../../../../node_modules/d3-transition/src/transition/select.js", "../../../../node_modules/d3-transition/src/transition/selectAll.js", "../../../../node_modules/d3-transition/src/transition/selection.js", "../../../../node_modules/d3-transition/src/transition/style.js", "../../../../node_modules/d3-transition/src/transition/styleTween.js", "../../../../node_modules/d3-transition/src/transition/text.js", "../../../../node_modules/d3-transition/src/transition/textTween.js", "../../../../node_modules/d3-transition/src/transition/transition.js", "../../../../node_modules/d3-transition/src/transition/end.js", "../../../../node_modules/d3-transition/src/transition/index.js", "../../../../node_modules/d3-ease/src/cubic.js", "../../../../node_modules/d3-transition/src/selection/transition.js", "../../../../node_modules/d3-transition/src/selection/index.js", "../../../../node_modules/d3-brush/src/brush.js", "../../../../node_modules/d3-path/src/path.js", "../../../../node_modules/d3-format/src/formatDecimal.js", "../../../../node_modules/d3-format/src/exponent.js", "../../../../node_modules/d3-format/src/formatGroup.js", "../../../../node_modules/d3-format/src/formatNumerals.js", "../../../../node_modules/d3-format/src/formatSpecifier.js", "../../../../node_modules/d3-format/src/formatTrim.js", "../../../../node_modules/d3-format/src/formatPrefixAuto.js", "../../../../node_modules/d3-format/src/formatRounded.js", "../../../../node_modules/d3-format/src/formatTypes.js", "../../../../node_modules/d3-format/src/identity.js", "../../../../node_modules/d3-format/src/locale.js", "../../../../node_modules/d3-format/src/defaultLocale.js", "../../../../node_modules/d3-format/src/precisionFixed.js", "../../../../node_modules/d3-format/src/precisionPrefix.js", "../../../../node_modules/d3-format/src/precisionRound.js", "../../../../node_modules/d3-geo/src/math.js", "../../../../node_modules/d3-geo/src/noop.js", "../../../../node_modules/d3-geo/src/stream.js", "../../../../node_modules/d3-geo/src/cartesian.js", "../../../../node_modules/d3-geo/src/compose.js", "../../../../node_modules/d3-geo/src/rotation.js", "../../../../node_modules/d3-geo/src/circle.js", "../../../../node_modules/d3-geo/src/clip/buffer.js", "../../../../node_modules/d3-geo/src/pointEqual.js", "../../../../node_modules/d3-geo/src/clip/rejoin.js", "../../../../node_modules/d3-geo/src/polygonContains.js", "../../../../node_modules/d3-geo/src/clip/index.js", "../../../../node_modules/d3-geo/src/clip/antimeridian.js", "../../../../node_modules/d3-geo/src/clip/circle.js", "../../../../node_modules/d3-geo/src/clip/line.js", "../../../../node_modules/d3-geo/src/clip/rectangle.js", "../../../../node_modules/d3-geo/src/identity.js", "../../../../node_modules/d3-geo/src/path/area.js", "../../../../node_modules/d3-geo/src/path/bounds.js", "../../../../node_modules/d3-geo/src/path/centroid.js", "../../../../node_modules/d3-geo/src/path/context.js", "../../../../node_modules/d3-geo/src/path/measure.js", "../../../../node_modules/d3-geo/src/path/string.js", "../../../../node_modules/d3-geo/src/path/index.js", "../../../../node_modules/d3-geo/src/transform.js", "../../../../node_modules/d3-geo/src/projection/fit.js", "../../../../node_modules/d3-geo/src/projection/resample.js", "../../../../node_modules/d3-geo/src/projection/index.js", "../../../../node_modules/d3-geo/src/projection/conic.js", "../../../../node_modules/d3-geo/src/projection/cylindricalEqualArea.js", "../../../../node_modules/d3-geo/src/projection/conicEqualArea.js", "../../../../node_modules/d3-geo/src/projection/albers.js", "../../../../node_modules/d3-geo/src/projection/albersUsa.js", "../../../../node_modules/d3-geo/src/projection/azimuthal.js", "../../../../node_modules/d3-geo/src/projection/azimuthalEqualArea.js", "../../../../node_modules/d3-geo/src/projection/azimuthalEquidistant.js", "../../../../node_modules/d3-geo/src/projection/mercator.js", "../../../../node_modules/d3-geo/src/projection/conicConformal.js", "../../../../node_modules/d3-geo/src/projection/equirectangular.js", "../../../../node_modules/d3-geo/src/projection/conicEquidistant.js", "../../../../node_modules/d3-geo/src/projection/equalEarth.js", "../../../../node_modules/d3-geo/src/projection/gnomonic.js", "../../../../node_modules/d3-geo/src/projection/orthographic.js", "../../../../node_modules/d3-geo/src/projection/stereographic.js", "../../../../node_modules/d3-geo/src/projection/transverseMercator.js", "../../../../node_modules/d3-scale/src/init.js", "../../../../node_modules/d3-scale/src/ordinal.js", "../../../../node_modules/d3-scale/src/band.js", "../../../../node_modules/d3-scale/src/constant.js", "../../../../node_modules/d3-scale/src/number.js", "../../../../node_modules/d3-scale/src/continuous.js", "../../../../node_modules/d3-scale/src/tickFormat.js", "../../../../node_modules/d3-scale/src/linear.js", "../../../../node_modules/d3-scale/src/identity.js", "../../../../node_modules/d3-scale/src/nice.js", "../../../../node_modules/d3-scale/src/log.js", "../../../../node_modules/d3-scale/src/symlog.js", "../../../../node_modules/d3-scale/src/pow.js", "../../../../node_modules/d3-scale/src/quantile.js", "../../../../node_modules/d3-scale/src/threshold.js", "../../../../node_modules/d3-time/src/interval.js", "../../../../node_modules/d3-time/src/millisecond.js", "../../../../node_modules/d3-time/src/second.js", "../../../../node_modules/d3-time/src/minute.js", "../../../../node_modules/d3-time/src/hour.js", "../../../../node_modules/d3-time/src/day.js", "../../../../node_modules/d3-time/src/week.js", "../../../../node_modules/d3-time/src/month.js", "../../../../node_modules/d3-time/src/year.js", "../../../../node_modules/d3-time/src/ticks.js", "../../../../node_modules/d3-time-format/src/locale.js", "../../../../node_modules/d3-time-format/src/defaultLocale.js", "../../../../node_modules/d3-scale/src/time.js", "../../../../node_modules/d3-scale/src/utcTime.js", "../../../../node_modules/d3-scale/src/sequential.js", "../../../../node_modules/d3-scale/src/diverging.js", "../../../../node_modules/d3-scale-chromatic/src/colors.js", "../../../../node_modules/d3-scale-chromatic/src/categorical/category10.js", "../../../../node_modules/d3-scale-chromatic/src/categorical/Accent.js", "../../../../node_modules/d3-scale-chromatic/src/categorical/Dark2.js", "../../../../node_modules/d3-scale-chromatic/src/categorical/Paired.js", "../../../../node_modules/d3-scale-chromatic/src/categorical/Pastel1.js", "../../../../node_modules/d3-scale-chromatic/src/categorical/Pastel2.js", "../../../../node_modules/d3-scale-chromatic/src/categorical/Set1.js", "../../../../node_modules/d3-scale-chromatic/src/categorical/Set2.js", "../../../../node_modules/d3-scale-chromatic/src/categorical/Set3.js", "../../../../node_modules/d3-scale-chromatic/src/categorical/Tableau10.js", "../../../../node_modules/d3-scale-chromatic/src/ramp.js", "../../../../node_modules/d3-scale-chromatic/src/diverging/BrBG.js", "../../../../node_modules/d3-scale-chromatic/src/diverging/PRGn.js", "../../../../node_modules/d3-scale-chromatic/src/diverging/PiYG.js", "../../../../node_modules/d3-scale-chromatic/src/diverging/PuOr.js", "../../../../node_modules/d3-scale-chromatic/src/diverging/RdBu.js", "../../../../node_modules/d3-scale-chromatic/src/diverging/RdGy.js", "../../../../node_modules/d3-scale-chromatic/src/diverging/RdYlBu.js", "../../../../node_modules/d3-scale-chromatic/src/diverging/RdYlGn.js", "../../../../node_modules/d3-scale-chromatic/src/diverging/Spectral.js", "../../../../node_modules/d3-scale-chromatic/src/sequential-multi/BuGn.js", "../../../../node_modules/d3-scale-chromatic/src/sequential-multi/BuPu.js", "../../../../node_modules/d3-scale-chromatic/src/sequential-multi/GnBu.js", "../../../../node_modules/d3-scale-chromatic/src/sequential-multi/OrRd.js", "../../../../node_modules/d3-scale-chromatic/src/sequential-multi/PuBuGn.js", "../../../../node_modules/d3-scale-chromatic/src/sequential-multi/PuBu.js", "../../../../node_modules/d3-scale-chromatic/src/sequential-multi/PuRd.js", "../../../../node_modules/d3-scale-chromatic/src/sequential-multi/RdPu.js", "../../../../node_modules/d3-scale-chromatic/src/sequential-multi/YlGnBu.js", "../../../../node_modules/d3-scale-chromatic/src/sequential-multi/YlGn.js", "../../../../node_modules/d3-scale-chromatic/src/sequential-multi/YlOrBr.js", "../../../../node_modules/d3-scale-chromatic/src/sequential-multi/YlOrRd.js", "../../../../node_modules/d3-scale-chromatic/src/sequential-single/Blues.js", "../../../../node_modules/d3-scale-chromatic/src/sequential-single/Greens.js", "../../../../node_modules/d3-scale-chromatic/src/sequential-single/Greys.js", "../../../../node_modules/d3-scale-chromatic/src/sequential-single/Purples.js", "../../../../node_modules/d3-scale-chromatic/src/sequential-single/Reds.js", "../../../../node_modules/d3-scale-chromatic/src/sequential-single/Oranges.js", "../../../../node_modules/d3-scale-chromatic/src/sequential-multi/cividis.js", "../../../../node_modules/d3-scale-chromatic/src/sequential-multi/cubehelix.js", "../../../../node_modules/d3-scale-chromatic/src/sequential-multi/rainbow.js", "../../../../node_modules/d3-scale-chromatic/src/sequential-multi/sinebow.js", "../../../../node_modules/d3-scale-chromatic/src/sequential-multi/turbo.js", "../../../../node_modules/d3-scale-chromatic/src/sequential-multi/viridis.js", "../../../../node_modules/d3-shape/src/math.js", "../../../../node_modules/d3-shape/src/symbol/asterisk.js", "../../../../node_modules/d3-shape/src/symbol/circle.js", "../../../../node_modules/d3-shape/src/symbol/cross.js", "../../../../node_modules/d3-shape/src/symbol/diamond.js", "../../../../node_modules/d3-shape/src/symbol/diamond2.js", "../../../../node_modules/d3-shape/src/symbol/plus.js", "../../../../node_modules/d3-shape/src/symbol/square.js", "../../../../node_modules/d3-shape/src/symbol/square2.js", "../../../../node_modules/d3-shape/src/symbol/star.js", "../../../../node_modules/d3-shape/src/symbol/triangle.js", "../../../../node_modules/d3-shape/src/symbol/triangle2.js", "../../../../node_modules/d3-shape/src/symbol/wye.js", "../../../../node_modules/d3-shape/src/symbol/times.js", "../../../../node_modules/d3-shape/src/symbol.js", "../../../../node_modules/d3-zoom/src/transform.js", "../../../../node_modules/@observablehq/plot/src/defined.js", "../../../../node_modules/isoformat/src/format.js", "../../../../node_modules/isoformat/src/parse.js", "../../../../node_modules/@observablehq/plot/src/time.js", "../../../../node_modules/@observablehq/plot/src/options.js", "../../../../node_modules/@observablehq/plot/src/scales/index.js", "../../../../node_modules/@observablehq/plot/src/symbol.js", "../../../../node_modules/@observablehq/plot/src/transforms/basic.js", "../../../../node_modules/@observablehq/plot/src/transforms/group.js", "../../../../node_modules/@observablehq/plot/src/channel.js", "../../../../node_modules/@observablehq/plot/src/context.js", "../../../../node_modules/@observablehq/plot/src/warnings.js", "../../../../node_modules/@observablehq/plot/src/projection.js", "../../../../node_modules/@observablehq/plot/src/scales/schemes.js", "../../../../node_modules/@observablehq/plot/src/scales/quantitative.js", "../../../../node_modules/@observablehq/plot/src/scales/diverging.js", "../../../../node_modules/@observablehq/plot/src/scales/temporal.js", "../../../../node_modules/@observablehq/plot/src/scales/ordinal.js", "../../../../node_modules/@observablehq/plot/src/scales.js", "../../../../node_modules/@observablehq/plot/src/memoize.js", "../../../../node_modules/@observablehq/plot/src/format.js", "../../../../node_modules/@observablehq/plot/src/style.js", "../../../../node_modules/@observablehq/plot/src/dimensions.js", "../../../../node_modules/@observablehq/plot/src/facet.js", "../../../../node_modules/@observablehq/plot/src/mark.js", "../../../../node_modules/@observablehq/plot/src/interactions/pointer.js", "../../../../node_modules/@observablehq/plot/src/axes.js", "../../../../node_modules/@observablehq/plot/src/legends/ramp.js", "../../../../node_modules/@observablehq/plot/src/math.js", "../../../../node_modules/@observablehq/plot/src/marker.js", "../../../../node_modules/@observablehq/plot/src/transforms/inset.js", "../../../../node_modules/@observablehq/plot/src/transforms/interval.js", "../../../../node_modules/@observablehq/plot/src/marks/rule.js", "../../../../node_modules/@observablehq/plot/src/template.js", "../../../../node_modules/@observablehq/plot/src/marks/text.js", "../../../../node_modules/@observablehq/plot/src/marks/vector.js", "../../../../node_modules/@observablehq/plot/src/marks/axis.js", "../../../../node_modules/@observablehq/plot/src/legends/swatches.js", "../../../../node_modules/@observablehq/plot/src/legends.js", "../../../../node_modules/@observablehq/plot/src/marks/frame.js", "../../../../node_modules/@observablehq/plot/src/marks/tip.js", "../../../../node_modules/@observablehq/plot/src/plot.js", "../../../../node_modules/@observablehq/plot/src/transforms/bin.js", "../../../../node_modules/@observablehq/plot/src/transforms/identity.js", "../../../../node_modules/@observablehq/plot/src/transforms/stack.js", "../../../../node_modules/@observablehq/plot/src/marks/rect.js", "../../shared/_tooltip.ts", "../../shared/base.ts", "../index.ts"],
-  "sourcesContent": ["export default function ascending(a, b) {\n  return a == null || b == null ? NaN : a < b ? -1 : a > b ? 1 : a >= b ? 0 : NaN;\n}\n", "export default function descending(a, b) {\n  return a == null || b == null ? NaN\n    : b < a ? -1\n    : b > a ? 1\n    : b >= a ? 0\n    : NaN;\n}\n", "import ascending from \"./ascending.js\";\nimport descending from \"./descending.js\";\n\nexport default function bisector(f) {\n  let compare1, compare2, delta;\n\n  // If an accessor is specified, promote it to a comparator. In this case we\n  // can test whether the search value is (self-) comparable. We can\u2019t do this\n  // for a comparator (except for specific, known comparators) because we can\u2019t\n  // tell if the comparator is symmetric, and an asymmetric comparator can\u2019t be\n  // used to test whether a single value is comparable.\n  if (f.length !== 2) {\n    compare1 = ascending;\n    compare2 = (d, x) => ascending(f(d), x);\n    delta = (d, x) => f(d) - x;\n  } else {\n    compare1 = f === ascending || f === descending ? f : zero;\n    compare2 = f;\n    delta = f;\n  }\n\n  function left(a, x, lo = 0, hi = a.length) {\n    if (lo < hi) {\n      if (compare1(x, x) !== 0) return hi;\n      do {\n        const mid = (lo + hi) >>> 1;\n        if (compare2(a[mid], x) < 0) lo = mid + 1;\n        else hi = mid;\n      } while (lo < hi);\n    }\n    return lo;\n  }\n\n  function right(a, x, lo = 0, hi = a.length) {\n    if (lo < hi) {\n      if (compare1(x, x) !== 0) return hi;\n      do {\n        const mid = (lo + hi) >>> 1;\n        if (compare2(a[mid], x) <= 0) lo = mid + 1;\n        else hi = mid;\n      } while (lo < hi);\n    }\n    return lo;\n  }\n\n  function center(a, x, lo = 0, hi = a.length) {\n    const i = left(a, x, lo, hi - 1);\n    return i > lo && delta(a[i - 1], x) > -delta(a[i], x) ? i - 1 : i;\n  }\n\n  return {left, center, right};\n}\n\nfunction zero() {\n  return 0;\n}\n", "export default function number(x) {\n  return x === null ? NaN : +x;\n}\n\nexport function* numbers(values, valueof) {\n  if (valueof === undefined) {\n    for (let value of values) {\n      if (value != null && (value = +value) >= value) {\n        yield value;\n      }\n    }\n  } else {\n    let index = -1;\n    for (let value of values) {\n      if ((value = valueof(value, ++index, values)) != null && (value = +value) >= value) {\n        yield value;\n      }\n    }\n  }\n}\n", "import ascending from \"./ascending.js\";\nimport bisector from \"./bisector.js\";\nimport number from \"./number.js\";\n\nconst ascendingBisect = bisector(ascending);\nexport const bisectRight = ascendingBisect.right;\nexport const bisectLeft = ascendingBisect.left;\nexport const bisectCenter = bisector(number).center;\nexport default bisectRight;\n", "export default function count(values, valueof) {\n  let count = 0;\n  if (valueof === undefined) {\n    for (let value of values) {\n      if (value != null && (value = +value) >= value) {\n        ++count;\n      }\n    }\n  } else {\n    let index = -1;\n    for (let value of values) {\n      if ((value = valueof(value, ++index, values)) != null && (value = +value) >= value) {\n        ++count;\n      }\n    }\n  }\n  return count;\n}\n", "function length(array) {\n  return array.length | 0;\n}\n\nfunction empty(length) {\n  return !(length > 0);\n}\n\nfunction arrayify(values) {\n  return typeof values !== \"object\" || \"length\" in values ? values : Array.from(values);\n}\n\nfunction reducer(reduce) {\n  return values => reduce(...values);\n}\n\nexport default function cross(...values) {\n  const reduce = typeof values[values.length - 1] === \"function\" && reducer(values.pop());\n  values = values.map(arrayify);\n  const lengths = values.map(length);\n  const j = values.length - 1;\n  const index = new Array(j + 1).fill(0);\n  const product = [];\n  if (j < 0 || lengths.some(empty)) return product;\n  while (true) {\n    product.push(index.map((j, i) => values[i][j]));\n    let i = j;\n    while (++index[i] === lengths[i]) {\n      if (i === 0) return reduce ? product.map(reduce) : product;\n      index[i--] = 0;\n    }\n  }\n}\n", "export default function cumsum(values, valueof) {\n  var sum = 0, index = 0;\n  return Float64Array.from(values, valueof === undefined\n    ? v => (sum += +v || 0)\n    : v => (sum += +valueof(v, index++, values) || 0));\n}", "export default function variance(values, valueof) {\n  let count = 0;\n  let delta;\n  let mean = 0;\n  let sum = 0;\n  if (valueof === undefined) {\n    for (let value of values) {\n      if (value != null && (value = +value) >= value) {\n        delta = value - mean;\n        mean += delta / ++count;\n        sum += delta * (value - mean);\n      }\n    }\n  } else {\n    let index = -1;\n    for (let value of values) {\n      if ((value = valueof(value, ++index, values)) != null && (value = +value) >= value) {\n        delta = value - mean;\n        mean += delta / ++count;\n        sum += delta * (value - mean);\n      }\n    }\n  }\n  if (count > 1) return sum / (count - 1);\n}\n", "import variance from \"./variance.js\";\n\nexport default function deviation(values, valueof) {\n  const v = variance(values, valueof);\n  return v ? Math.sqrt(v) : v;\n}\n", "export default function extent(values, valueof) {\n  let min;\n  let max;\n  if (valueof === undefined) {\n    for (const value of values) {\n      if (value != null) {\n        if (min === undefined) {\n          if (value >= value) min = max = value;\n        } else {\n          if (min > value) min = value;\n          if (max < value) max = value;\n        }\n      }\n    }\n  } else {\n    let index = -1;\n    for (let value of values) {\n      if ((value = valueof(value, ++index, values)) != null) {\n        if (min === undefined) {\n          if (value >= value) min = max = value;\n        } else {\n          if (min > value) min = value;\n          if (max < value) max = value;\n        }\n      }\n    }\n  }\n  return [min, max];\n}\n", "// https://github.com/python/cpython/blob/a74eea238f5baba15797e2e8b570d153bc8690a7/Modules/mathmodule.c#L1423\nexport class Adder {\n  constructor() {\n    this._partials = new Float64Array(32);\n    this._n = 0;\n  }\n  add(x) {\n    const p = this._partials;\n    let i = 0;\n    for (let j = 0; j < this._n && j < 32; j++) {\n      const y = p[j],\n        hi = x + y,\n        lo = Math.abs(x) < Math.abs(y) ? x - (hi - y) : y - (hi - x);\n      if (lo) p[i++] = lo;\n      x = hi;\n    }\n    p[i] = x;\n    this._n = i + 1;\n    return this;\n  }\n  valueOf() {\n    const p = this._partials;\n    let n = this._n, x, y, lo, hi = 0;\n    if (n > 0) {\n      hi = p[--n];\n      while (n > 0) {\n        x = hi;\n        y = p[--n];\n        hi = x + y;\n        lo = y - (hi - x);\n        if (lo) break;\n      }\n      if (n > 0 && ((lo < 0 && p[n - 1] < 0) || (lo > 0 && p[n - 1] > 0))) {\n        y = lo * 2;\n        x = hi + y;\n        if (y == x - hi) hi = x;\n      }\n    }\n    return hi;\n  }\n}\n\nexport function fsum(values, valueof) {\n  const adder = new Adder();\n  if (valueof === undefined) {\n    for (let value of values) {\n      if (value = +value) {\n        adder.add(value);\n      }\n    }\n  } else {\n    let index = -1;\n    for (let value of values) {\n      if (value = +valueof(value, ++index, values)) {\n        adder.add(value);\n      }\n    }\n  }\n  return +adder;\n}\n\nexport function fcumsum(values, valueof) {\n  const adder = new Adder();\n  let index = -1;\n  return Float64Array.from(values, valueof === undefined\n      ? v => adder.add(+v || 0)\n      : v => adder.add(+valueof(v, ++index, values) || 0)\n  );\n}\n", "export class InternMap extends Map {\n  constructor(entries, key = keyof) {\n    super();\n    Object.defineProperties(this, {_intern: {value: new Map()}, _key: {value: key}});\n    if (entries != null) for (const [key, value] of entries) this.set(key, value);\n  }\n  get(key) {\n    return super.get(intern_get(this, key));\n  }\n  has(key) {\n    return super.has(intern_get(this, key));\n  }\n  set(key, value) {\n    return super.set(intern_set(this, key), value);\n  }\n  delete(key) {\n    return super.delete(intern_delete(this, key));\n  }\n}\n\nexport class InternSet extends Set {\n  constructor(values, key = keyof) {\n    super();\n    Object.defineProperties(this, {_intern: {value: new Map()}, _key: {value: key}});\n    if (values != null) for (const value of values) this.add(value);\n  }\n  has(value) {\n    return super.has(intern_get(this, value));\n  }\n  add(value) {\n    return super.add(intern_set(this, value));\n  }\n  delete(value) {\n    return super.delete(intern_delete(this, value));\n  }\n}\n\nfunction intern_get({_intern, _key}, value) {\n  const key = _key(value);\n  return _intern.has(key) ? _intern.get(key) : value;\n}\n\nfunction intern_set({_intern, _key}, value) {\n  const key = _key(value);\n  if (_intern.has(key)) return _intern.get(key);\n  _intern.set(key, value);\n  return value;\n}\n\nfunction intern_delete({_intern, _key}, value) {\n  const key = _key(value);\n  if (_intern.has(key)) {\n    value = _intern.get(key);\n    _intern.delete(key);\n  }\n  return value;\n}\n\nfunction keyof(value) {\n  return value !== null && typeof value === \"object\" ? value.valueOf() : value;\n}\n", "export default function identity(x) {\n  return x;\n}\n", "import {InternMap} from \"internmap\";\nimport identity from \"./identity.js\";\n\nexport default function group(values, ...keys) {\n  return nest(values, identity, identity, keys);\n}\n\nexport function groups(values, ...keys) {\n  return nest(values, Array.from, identity, keys);\n}\n\nfunction flatten(groups, keys) {\n  for (let i = 1, n = keys.length; i < n; ++i) {\n    groups = groups.flatMap(g => g.pop().map(([key, value]) => [...g, key, value]));\n  }\n  return groups;\n}\n\nexport function flatGroup(values, ...keys) {\n  return flatten(groups(values, ...keys), keys);\n}\n\nexport function flatRollup(values, reduce, ...keys) {\n  return flatten(rollups(values, reduce, ...keys), keys);\n}\n\nexport function rollup(values, reduce, ...keys) {\n  return nest(values, identity, reduce, keys);\n}\n\nexport function rollups(values, reduce, ...keys) {\n  return nest(values, Array.from, reduce, keys);\n}\n\nexport function index(values, ...keys) {\n  return nest(values, identity, unique, keys);\n}\n\nexport function indexes(values, ...keys) {\n  return nest(values, Array.from, unique, keys);\n}\n\nfunction unique(values) {\n  if (values.length !== 1) throw new Error(\"duplicate key\");\n  return values[0];\n}\n\nfunction nest(values, map, reduce, keys) {\n  return (function regroup(values, i) {\n    if (i >= keys.length) return reduce(values);\n    const groups = new InternMap();\n    const keyof = keys[i++];\n    let index = -1;\n    for (const value of values) {\n      const key = keyof(value, ++index, values);\n      const group = groups.get(key);\n      if (group) group.push(value);\n      else groups.set(key, [value]);\n    }\n    for (const [key, values] of groups) {\n      groups.set(key, regroup(values, i));\n    }\n    return map(groups);\n  })(values, 0);\n}\n", "export default function permute(source, keys) {\n  return Array.from(keys, key => source[key]);\n}\n", "import ascending from \"./ascending.js\";\nimport permute from \"./permute.js\";\n\nexport default function sort(values, ...F) {\n  if (typeof values[Symbol.iterator] !== \"function\") throw new TypeError(\"values is not iterable\");\n  values = Array.from(values);\n  let [f] = F;\n  if ((f && f.length !== 2) || F.length > 1) {\n    const index = Uint32Array.from(values, (d, i) => i);\n    if (F.length > 1) {\n      F = F.map(f => values.map(f));\n      index.sort((i, j) => {\n        for (const f of F) {\n          const c = ascendingDefined(f[i], f[j]);\n          if (c) return c;\n        }\n      });\n    } else {\n      f = values.map(f);\n      index.sort((i, j) => ascendingDefined(f[i], f[j]));\n    }\n    return permute(values, index);\n  }\n  return values.sort(compareDefined(f));\n}\n\nexport function compareDefined(compare = ascending) {\n  if (compare === ascending) return ascendingDefined;\n  if (typeof compare !== \"function\") throw new TypeError(\"compare is not a function\");\n  return (a, b) => {\n    const x = compare(a, b);\n    if (x || x === 0) return x;\n    return (compare(b, b) === 0) - (compare(a, a) === 0);\n  };\n}\n\nexport function ascendingDefined(a, b) {\n  return (a == null || !(a >= a)) - (b == null || !(b >= b)) || (a < b ? -1 : a > b ? 1 : 0);\n}\n", "import ascending from \"./ascending.js\";\nimport group, {rollup} from \"./group.js\";\nimport sort from \"./sort.js\";\n\nexport default function groupSort(values, reduce, key) {\n  return (reduce.length !== 2\n    ? sort(rollup(values, reduce, key), (([ak, av], [bk, bv]) => ascending(av, bv) || ascending(ak, bk)))\n    : sort(group(values, key), (([ak, av], [bk, bv]) => reduce(av, bv) || ascending(ak, bk))))\n    .map(([key]) => key);\n}\n", "const e10 = Math.sqrt(50),\n    e5 = Math.sqrt(10),\n    e2 = Math.sqrt(2);\n\nfunction tickSpec(start, stop, count) {\n  const step = (stop - start) / Math.max(0, count),\n      power = Math.floor(Math.log10(step)),\n      error = step / Math.pow(10, power),\n      factor = error >= e10 ? 10 : error >= e5 ? 5 : error >= e2 ? 2 : 1;\n  let i1, i2, inc;\n  if (power < 0) {\n    inc = Math.pow(10, -power) / factor;\n    i1 = Math.round(start * inc);\n    i2 = Math.round(stop * inc);\n    if (i1 / inc < start) ++i1;\n    if (i2 / inc > stop) --i2;\n    inc = -inc;\n  } else {\n    inc = Math.pow(10, power) * factor;\n    i1 = Math.round(start / inc);\n    i2 = Math.round(stop / inc);\n    if (i1 * inc < start) ++i1;\n    if (i2 * inc > stop) --i2;\n  }\n  if (i2 < i1 && 0.5 <= count && count < 2) return tickSpec(start, stop, count * 2);\n  return [i1, i2, inc];\n}\n\nexport default function ticks(start, stop, count) {\n  stop = +stop, start = +start, count = +count;\n  if (!(count > 0)) return [];\n  if (start === stop) return [start];\n  const reverse = stop < start, [i1, i2, inc] = reverse ? tickSpec(stop, start, count) : tickSpec(start, stop, count);\n  if (!(i2 >= i1)) return [];\n  const n = i2 - i1 + 1, ticks = new Array(n);\n  if (reverse) {\n    if (inc < 0) for (let i = 0; i < n; ++i) ticks[i] = (i2 - i) / -inc;\n    else for (let i = 0; i < n; ++i) ticks[i] = (i2 - i) * inc;\n  } else {\n    if (inc < 0) for (let i = 0; i < n; ++i) ticks[i] = (i1 + i) / -inc;\n    else for (let i = 0; i < n; ++i) ticks[i] = (i1 + i) * inc;\n  }\n  return ticks;\n}\n\nexport function tickIncrement(start, stop, count) {\n  stop = +stop, start = +start, count = +count;\n  return tickSpec(start, stop, count)[2];\n}\n\nexport function tickStep(start, stop, count) {\n  stop = +stop, start = +start, count = +count;\n  const reverse = stop < start, inc = reverse ? tickIncrement(stop, start, count) : tickIncrement(start, stop, count);\n  return (reverse ? -1 : 1) * (inc < 0 ? 1 / -inc : inc);\n}\n", "import count from \"../count.js\";\n\nexport default function thresholdSturges(values) {\n  return Math.max(1, Math.ceil(Math.log(count(values)) / Math.LN2) + 1);\n}\n", "export default function max(values, valueof) {\n  let max;\n  if (valueof === undefined) {\n    for (const value of values) {\n      if (value != null\n          && (max < value || (max === undefined && value >= value))) {\n        max = value;\n      }\n    }\n  } else {\n    let index = -1;\n    for (let value of values) {\n      if ((value = valueof(value, ++index, values)) != null\n          && (max < value || (max === undefined && value >= value))) {\n        max = value;\n      }\n    }\n  }\n  return max;\n}\n", "export default function maxIndex(values, valueof) {\n  let max;\n  let maxIndex = -1;\n  let index = -1;\n  if (valueof === undefined) {\n    for (const value of values) {\n      ++index;\n      if (value != null\n          && (max < value || (max === undefined && value >= value))) {\n        max = value, maxIndex = index;\n      }\n    }\n  } else {\n    for (let value of values) {\n      if ((value = valueof(value, ++index, values)) != null\n          && (max < value || (max === undefined && value >= value))) {\n        max = value, maxIndex = index;\n      }\n    }\n  }\n  return maxIndex;\n}\n", "export default function min(values, valueof) {\n  let min;\n  if (valueof === undefined) {\n    for (const value of values) {\n      if (value != null\n          && (min > value || (min === undefined && value >= value))) {\n        min = value;\n      }\n    }\n  } else {\n    let index = -1;\n    for (let value of values) {\n      if ((value = valueof(value, ++index, values)) != null\n          && (min > value || (min === undefined && value >= value))) {\n        min = value;\n      }\n    }\n  }\n  return min;\n}\n", "export default function minIndex(values, valueof) {\n  let min;\n  let minIndex = -1;\n  let index = -1;\n  if (valueof === undefined) {\n    for (const value of values) {\n      ++index;\n      if (value != null\n          && (min > value || (min === undefined && value >= value))) {\n        min = value, minIndex = index;\n      }\n    }\n  } else {\n    for (let value of values) {\n      if ((value = valueof(value, ++index, values)) != null\n          && (min > value || (min === undefined && value >= value))) {\n        min = value, minIndex = index;\n      }\n    }\n  }\n  return minIndex;\n}\n", "import {ascendingDefined, compareDefined} from \"./sort.js\";\n\n// Based on https://github.com/mourner/quickselect\n// ISC license, Copyright 2018 Vladimir Agafonkin.\nexport default function quickselect(array, k, left = 0, right = Infinity, compare) {\n  k = Math.floor(k);\n  left = Math.floor(Math.max(0, left));\n  right = Math.floor(Math.min(array.length - 1, right));\n\n  if (!(left <= k && k <= right)) return array;\n\n  compare = compare === undefined ? ascendingDefined : compareDefined(compare);\n\n  while (right > left) {\n    if (right - left > 600) {\n      const n = right - left + 1;\n      const m = k - left + 1;\n      const z = Math.log(n);\n      const s = 0.5 * Math.exp(2 * z / 3);\n      const sd = 0.5 * Math.sqrt(z * s * (n - s) / n) * (m - n / 2 < 0 ? -1 : 1);\n      const newLeft = Math.max(left, Math.floor(k - m * s / n + sd));\n      const newRight = Math.min(right, Math.floor(k + (n - m) * s / n + sd));\n      quickselect(array, k, newLeft, newRight, compare);\n    }\n\n    const t = array[k];\n    let i = left;\n    let j = right;\n\n    swap(array, left, k);\n    if (compare(array[right], t) > 0) swap(array, left, right);\n\n    while (i < j) {\n      swap(array, i, j), ++i, --j;\n      while (compare(array[i], t) < 0) ++i;\n      while (compare(array[j], t) > 0) --j;\n    }\n\n    if (compare(array[left], t) === 0) swap(array, left, j);\n    else ++j, swap(array, j, right);\n\n    if (j <= k) left = j + 1;\n    if (k <= j) right = j - 1;\n  }\n\n  return array;\n}\n\nfunction swap(array, i, j) {\n  const t = array[i];\n  array[i] = array[j];\n  array[j] = t;\n}\n", "import ascending from \"./ascending.js\";\n\nexport default function greatest(values, compare = ascending) {\n  let max;\n  let defined = false;\n  if (compare.length === 1) {\n    let maxValue;\n    for (const element of values) {\n      const value = compare(element);\n      if (defined\n          ? ascending(value, maxValue) > 0\n          : ascending(value, value) === 0) {\n        max = element;\n        maxValue = value;\n        defined = true;\n      }\n    }\n  } else {\n    for (const value of values) {\n      if (defined\n          ? compare(value, max) > 0\n          : compare(value, value) === 0) {\n        max = value;\n        defined = true;\n      }\n    }\n  }\n  return max;\n}\n", "import max from \"./max.js\";\nimport maxIndex from \"./maxIndex.js\";\nimport min from \"./min.js\";\nimport minIndex from \"./minIndex.js\";\nimport quickselect from \"./quickselect.js\";\nimport number, {numbers} from \"./number.js\";\nimport {ascendingDefined} from \"./sort.js\";\nimport greatest from \"./greatest.js\";\n\nexport default function quantile(values, p, valueof) {\n  values = Float64Array.from(numbers(values, valueof));\n  if (!(n = values.length) || isNaN(p = +p)) return;\n  if (p <= 0 || n < 2) return min(values);\n  if (p >= 1) return max(values);\n  var n,\n      i = (n - 1) * p,\n      i0 = Math.floor(i),\n      value0 = max(quickselect(values, i0).subarray(0, i0 + 1)),\n      value1 = min(values.subarray(i0 + 1));\n  return value0 + (value1 - value0) * (i - i0);\n}\n\nexport function quantileSorted(values, p, valueof = number) {\n  if (!(n = values.length) || isNaN(p = +p)) return;\n  if (p <= 0 || n < 2) return +valueof(values[0], 0, values);\n  if (p >= 1) return +valueof(values[n - 1], n - 1, values);\n  var n,\n      i = (n - 1) * p,\n      i0 = Math.floor(i),\n      value0 = +valueof(values[i0], i0, values),\n      value1 = +valueof(values[i0 + 1], i0 + 1, values);\n  return value0 + (value1 - value0) * (i - i0);\n}\n\nexport function quantileIndex(values, p, valueof) {\n  values = Float64Array.from(numbers(values, valueof));\n  if (!(n = values.length) || isNaN(p = +p)) return;\n  if (p <= 0 || n < 2) return minIndex(values);\n  if (p >= 1) return maxIndex(values);\n  var n,\n      i = Math.floor((n - 1) * p),\n      order = (i, j) => ascendingDefined(values[i], values[j]),\n      index = quickselect(Uint32Array.from(values, (_, i) => i), i, 0, n - 1, order);\n  return greatest(index.subarray(0, i + 1), i => values[i]);\n}\n", "import count from \"../count.js\";\nimport quantile from \"../quantile.js\";\n\nexport default function thresholdFreedmanDiaconis(values, min, max) {\n  const c = count(values), d = quantile(values, 0.75) - quantile(values, 0.25);\n  return c && d ? Math.ceil((max - min) / (2 * d * Math.pow(c, -1 / 3))) : 1;\n}\n", "import count from \"../count.js\";\nimport deviation from \"../deviation.js\";\n\nexport default function thresholdScott(values, min, max) {\n  const c = count(values), d = deviation(values);\n  return c && d ? Math.ceil((max - min) * Math.cbrt(c) / (3.49 * d)) : 1;\n}\n", "export default function mean(values, valueof) {\n  let count = 0;\n  let sum = 0;\n  if (valueof === undefined) {\n    for (let value of values) {\n      if (value != null && (value = +value) >= value) {\n        ++count, sum += value;\n      }\n    }\n  } else {\n    let index = -1;\n    for (let value of values) {\n      if ((value = valueof(value, ++index, values)) != null && (value = +value) >= value) {\n        ++count, sum += value;\n      }\n    }\n  }\n  if (count) return sum / count;\n}\n", "import quantile, {quantileIndex} from \"./quantile.js\";\n\nexport default function median(values, valueof) {\n  return quantile(values, 0.5, valueof);\n}\n\nexport function medianIndex(values, valueof) {\n  return quantileIndex(values, 0.5, valueof);\n}\n", "function* flatten(arrays) {\n  for (const array of arrays) {\n    yield* array;\n  }\n}\n\nexport default function merge(arrays) {\n  return Array.from(flatten(arrays));\n}\n", "import {InternMap} from \"internmap\";\n\nexport default function mode(values, valueof) {\n  const counts = new InternMap();\n  if (valueof === undefined) {\n    for (let value of values) {\n      if (value != null && value >= value) {\n        counts.set(value, (counts.get(value) || 0) + 1);\n      }\n    }\n  } else {\n    let index = -1;\n    for (let value of values) {\n      if ((value = valueof(value, ++index, values)) != null && value >= value) {\n        counts.set(value, (counts.get(value) || 0) + 1);\n      }\n    }\n  }\n  let modeValue;\n  let modeCount = 0;\n  for (const [value, count] of counts) {\n    if (count > modeCount) {\n      modeCount = count;\n      modeValue = value;\n    }\n  }\n  return modeValue;\n}\n", "export default function pairs(values, pairof = pair) {\n  const pairs = [];\n  let previous;\n  let first = false;\n  for (const value of values) {\n    if (first) pairs.push(pairof(previous, value));\n    previous = value;\n    first = true;\n  }\n  return pairs;\n}\n\nexport function pair(a, b) {\n  return [a, b];\n}\n", "export default function range(start, stop, step) {\n  start = +start, stop = +stop, step = (n = arguments.length) < 2 ? (stop = start, start = 0, 1) : n < 3 ? 1 : +step;\n\n  var i = -1,\n      n = Math.max(0, Math.ceil((stop - start) / step)) | 0,\n      range = new Array(n);\n\n  while (++i < n) {\n    range[i] = start + i * step;\n  }\n\n  return range;\n}\n", "export default function sum(values, valueof) {\n  let sum = 0;\n  if (valueof === undefined) {\n    for (let value of values) {\n      if (value = +value) {\n        sum += value;\n      }\n    }\n  } else {\n    let index = -1;\n    for (let value of values) {\n      if (value = +valueof(value, ++index, values)) {\n        sum += value;\n      }\n    }\n  }\n  return sum;\n}\n", "export default function reverse(values) {\n  if (typeof values[Symbol.iterator] !== \"function\") throw new TypeError(\"values is not iterable\");\n  return Array.from(values).reverse();\n}\n", "export default function(x) {\n  return x;\n}\n", "import identity from \"./identity.js\";\n\nvar top = 1,\n    right = 2,\n    bottom = 3,\n    left = 4,\n    epsilon = 1e-6;\n\nfunction translateX(x) {\n  return \"translate(\" + x + \",0)\";\n}\n\nfunction translateY(y) {\n  return \"translate(0,\" + y + \")\";\n}\n\nfunction number(scale) {\n  return d => +scale(d);\n}\n\nfunction center(scale, offset) {\n  offset = Math.max(0, scale.bandwidth() - offset * 2) / 2;\n  if (scale.round()) offset = Math.round(offset);\n  return d => +scale(d) + offset;\n}\n\nfunction entering() {\n  return !this.__axis;\n}\n\nfunction axis(orient, scale) {\n  var tickArguments = [],\n      tickValues = null,\n      tickFormat = null,\n      tickSizeInner = 6,\n      tickSizeOuter = 6,\n      tickPadding = 3,\n      offset = typeof window !== \"undefined\" && window.devicePixelRatio > 1 ? 0 : 0.5,\n      k = orient === top || orient === left ? -1 : 1,\n      x = orient === left || orient === right ? \"x\" : \"y\",\n      transform = orient === top || orient === bottom ? translateX : translateY;\n\n  function axis(context) {\n    var values = tickValues == null ? (scale.ticks ? scale.ticks.apply(scale, tickArguments) : scale.domain()) : tickValues,\n        format = tickFormat == null ? (scale.tickFormat ? scale.tickFormat.apply(scale, tickArguments) : identity) : tickFormat,\n        spacing = Math.max(tickSizeInner, 0) + tickPadding,\n        range = scale.range(),\n        range0 = +range[0] + offset,\n        range1 = +range[range.length - 1] + offset,\n        position = (scale.bandwidth ? center : number)(scale.copy(), offset),\n        selection = context.selection ? context.selection() : context,\n        path = selection.selectAll(\".domain\").data([null]),\n        tick = selection.selectAll(\".tick\").data(values, scale).order(),\n        tickExit = tick.exit(),\n        tickEnter = tick.enter().append(\"g\").attr(\"class\", \"tick\"),\n        line = tick.select(\"line\"),\n        text = tick.select(\"text\");\n\n    path = path.merge(path.enter().insert(\"path\", \".tick\")\n        .attr(\"class\", \"domain\")\n        .attr(\"stroke\", \"currentColor\"));\n\n    tick = tick.merge(tickEnter);\n\n    line = line.merge(tickEnter.append(\"line\")\n        .attr(\"stroke\", \"currentColor\")\n        .attr(x + \"2\", k * tickSizeInner));\n\n    text = text.merge(tickEnter.append(\"text\")\n        .attr(\"fill\", \"currentColor\")\n        .attr(x, k * spacing)\n        .attr(\"dy\", orient === top ? \"0em\" : orient === bottom ? \"0.71em\" : \"0.32em\"));\n\n    if (context !== selection) {\n      path = path.transition(context);\n      tick = tick.transition(context);\n      line = line.transition(context);\n      text = text.transition(context);\n\n      tickExit = tickExit.transition(context)\n          .attr(\"opacity\", epsilon)\n          .attr(\"transform\", function(d) { return isFinite(d = position(d)) ? transform(d + offset) : this.getAttribute(\"transform\"); });\n\n      tickEnter\n          .attr(\"opacity\", epsilon)\n          .attr(\"transform\", function(d) { var p = this.parentNode.__axis; return transform((p && isFinite(p = p(d)) ? p : position(d)) + offset); });\n    }\n\n    tickExit.remove();\n\n    path\n        .attr(\"d\", orient === left || orient === right\n            ? (tickSizeOuter ? \"M\" + k * tickSizeOuter + \",\" + range0 + \"H\" + offset + \"V\" + range1 + \"H\" + k * tickSizeOuter : \"M\" + offset + \",\" + range0 + \"V\" + range1)\n            : (tickSizeOuter ? \"M\" + range0 + \",\" + k * tickSizeOuter + \"V\" + offset + \"H\" + range1 + \"V\" + k * tickSizeOuter : \"M\" + range0 + \",\" + offset + \"H\" + range1));\n\n    tick\n        .attr(\"opacity\", 1)\n        .attr(\"transform\", function(d) { return transform(position(d) + offset); });\n\n    line\n        .attr(x + \"2\", k * tickSizeInner);\n\n    text\n        .attr(x, k * spacing)\n        .text(format);\n\n    selection.filter(entering)\n        .attr(\"fill\", \"none\")\n        .attr(\"font-size\", 10)\n        .attr(\"font-family\", \"sans-serif\")\n        .attr(\"text-anchor\", orient === right ? \"start\" : orient === left ? \"end\" : \"middle\");\n\n    selection\n        .each(function() { this.__axis = position; });\n  }\n\n  axis.scale = function(_) {\n    return arguments.length ? (scale = _, axis) : scale;\n  };\n\n  axis.ticks = function() {\n    return tickArguments = Array.from(arguments), axis;\n  };\n\n  axis.tickArguments = function(_) {\n    return arguments.length ? (tickArguments = _ == null ? [] : Array.from(_), axis) : tickArguments.slice();\n  };\n\n  axis.tickValues = function(_) {\n    return arguments.length ? (tickValues = _ == null ? null : Array.from(_), axis) : tickValues && tickValues.slice();\n  };\n\n  axis.tickFormat = function(_) {\n    return arguments.length ? (tickFormat = _, axis) : tickFormat;\n  };\n\n  axis.tickSize = function(_) {\n    return arguments.length ? (tickSizeInner = tickSizeOuter = +_, axis) : tickSizeInner;\n  };\n\n  axis.tickSizeInner = function(_) {\n    return arguments.length ? (tickSizeInner = +_, axis) : tickSizeInner;\n  };\n\n  axis.tickSizeOuter = function(_) {\n    return arguments.length ? (tickSizeOuter = +_, axis) : tickSizeOuter;\n  };\n\n  axis.tickPadding = function(_) {\n    return arguments.length ? (tickPadding = +_, axis) : tickPadding;\n  };\n\n  axis.offset = function(_) {\n    return arguments.length ? (offset = +_, axis) : offset;\n  };\n\n  return axis;\n}\n\nexport function axisTop(scale) {\n  return axis(top, scale);\n}\n\nexport function axisRight(scale) {\n  return axis(right, scale);\n}\n\nexport function axisBottom(scale) {\n  return axis(bottom, scale);\n}\n\nexport function axisLeft(scale) {\n  return axis(left, scale);\n}\n", "var noop = {value: () => {}};\n\nfunction dispatch() {\n  for (var i = 0, n = arguments.length, _ = {}, t; i < n; ++i) {\n    if (!(t = arguments[i] + \"\") || (t in _) || /[\\s.]/.test(t)) throw new Error(\"illegal type: \" + t);\n    _[t] = [];\n  }\n  return new Dispatch(_);\n}\n\nfunction Dispatch(_) {\n  this._ = _;\n}\n\nfunction parseTypenames(typenames, types) {\n  return typenames.trim().split(/^|\\s+/).map(function(t) {\n    var name = \"\", i = t.indexOf(\".\");\n    if (i >= 0) name = t.slice(i + 1), t = t.slice(0, i);\n    if (t && !types.hasOwnProperty(t)) throw new Error(\"unknown type: \" + t);\n    return {type: t, name: name};\n  });\n}\n\nDispatch.prototype = dispatch.prototype = {\n  constructor: Dispatch,\n  on: function(typename, callback) {\n    var _ = this._,\n        T = parseTypenames(typename + \"\", _),\n        t,\n        i = -1,\n        n = T.length;\n\n    // If no callback was specified, return the callback of the given type and name.\n    if (arguments.length < 2) {\n      while (++i < n) if ((t = (typename = T[i]).type) && (t = get(_[t], typename.name))) return t;\n      return;\n    }\n\n    // If a type was specified, set the callback for the given type and name.\n    // Otherwise, if a null callback was specified, remove callbacks of the given name.\n    if (callback != null && typeof callback !== \"function\") throw new Error(\"invalid callback: \" + callback);\n    while (++i < n) {\n      if (t = (typename = T[i]).type) _[t] = set(_[t], typename.name, callback);\n      else if (callback == null) for (t in _) _[t] = set(_[t], typename.name, null);\n    }\n\n    return this;\n  },\n  copy: function() {\n    var copy = {}, _ = this._;\n    for (var t in _) copy[t] = _[t].slice();\n    return new Dispatch(copy);\n  },\n  call: function(type, that) {\n    if ((n = arguments.length - 2) > 0) for (var args = new Array(n), i = 0, n, t; i < n; ++i) args[i] = arguments[i + 2];\n    if (!this._.hasOwnProperty(type)) throw new Error(\"unknown type: \" + type);\n    for (t = this._[type], i = 0, n = t.length; i < n; ++i) t[i].value.apply(that, args);\n  },\n  apply: function(type, that, args) {\n    if (!this._.hasOwnProperty(type)) throw new Error(\"unknown type: \" + type);\n    for (var t = this._[type], i = 0, n = t.length; i < n; ++i) t[i].value.apply(that, args);\n  }\n};\n\nfunction get(type, name) {\n  for (var i = 0, n = type.length, c; i < n; ++i) {\n    if ((c = type[i]).name === name) {\n      return c.value;\n    }\n  }\n}\n\nfunction set(type, name, callback) {\n  for (var i = 0, n = type.length; i < n; ++i) {\n    if (type[i].name === name) {\n      type[i] = noop, type = type.slice(0, i).concat(type.slice(i + 1));\n      break;\n    }\n  }\n  if (callback != null) type.push({name: name, value: callback});\n  return type;\n}\n\nexport default dispatch;\n", "export var xhtml = \"http://www.w3.org/1999/xhtml\";\n\nexport default {\n  svg: \"http://www.w3.org/2000/svg\",\n  xhtml: xhtml,\n  xlink: \"http://www.w3.org/1999/xlink\",\n  xml: \"http://www.w3.org/XML/1998/namespace\",\n  xmlns: \"http://www.w3.org/2000/xmlns/\"\n};\n", "import namespaces from \"./namespaces.js\";\n\nexport default function(name) {\n  var prefix = name += \"\", i = prefix.indexOf(\":\");\n  if (i >= 0 && (prefix = name.slice(0, i)) !== \"xmlns\") name = name.slice(i + 1);\n  return namespaces.hasOwnProperty(prefix) ? {space: namespaces[prefix], local: name} : name; // eslint-disable-line no-prototype-builtins\n}\n", "import namespace from \"./namespace.js\";\nimport {xhtml} from \"./namespaces.js\";\n\nfunction creatorInherit(name) {\n  return function() {\n    var document = this.ownerDocument,\n        uri = this.namespaceURI;\n    return uri === xhtml && document.documentElement.namespaceURI === xhtml\n        ? document.createElement(name)\n        : document.createElementNS(uri, name);\n  };\n}\n\nfunction creatorFixed(fullname) {\n  return function() {\n    return this.ownerDocument.createElementNS(fullname.space, fullname.local);\n  };\n}\n\nexport default function(name) {\n  var fullname = namespace(name);\n  return (fullname.local\n      ? creatorFixed\n      : creatorInherit)(fullname);\n}\n", "function none() {}\n\nexport default function(selector) {\n  return selector == null ? none : function() {\n    return this.querySelector(selector);\n  };\n}\n", "import {Selection} from \"./index.js\";\nimport selector from \"../selector.js\";\n\nexport default function(select) {\n  if (typeof select !== \"function\") select = selector(select);\n\n  for (var groups = this._groups, m = groups.length, subgroups = new Array(m), j = 0; j < m; ++j) {\n    for (var group = groups[j], n = group.length, subgroup = subgroups[j] = new Array(n), node, subnode, i = 0; i < n; ++i) {\n      if ((node = group[i]) && (subnode = select.call(node, node.__data__, i, group))) {\n        if (\"__data__\" in node) subnode.__data__ = node.__data__;\n        subgroup[i] = subnode;\n      }\n    }\n  }\n\n  return new Selection(subgroups, this._parents);\n}\n", "// Given something array like (or null), returns something that is strictly an\n// array. This is used to ensure that array-like objects passed to d3.selectAll\n// or selection.selectAll are converted into proper arrays when creating a\n// selection; we don\u2019t ever want to create a selection backed by a live\n// HTMLCollection or NodeList. However, note that selection.selectAll will use a\n// static NodeList as a group, since it safely derived from querySelectorAll.\nexport default function array(x) {\n  return x == null ? [] : Array.isArray(x) ? x : Array.from(x);\n}\n", "function empty() {\n  return [];\n}\n\nexport default function(selector) {\n  return selector == null ? empty : function() {\n    return this.querySelectorAll(selector);\n  };\n}\n", "import {Selection} from \"./index.js\";\nimport array from \"../array.js\";\nimport selectorAll from \"../selectorAll.js\";\n\nfunction arrayAll(select) {\n  return function() {\n    return array(select.apply(this, arguments));\n  };\n}\n\nexport default function(select) {\n  if (typeof select === \"function\") select = arrayAll(select);\n  else select = selectorAll(select);\n\n  for (var groups = this._groups, m = groups.length, subgroups = [], parents = [], j = 0; j < m; ++j) {\n    for (var group = groups[j], n = group.length, node, i = 0; i < n; ++i) {\n      if (node = group[i]) {\n        subgroups.push(select.call(node, node.__data__, i, group));\n        parents.push(node);\n      }\n    }\n  }\n\n  return new Selection(subgroups, parents);\n}\n", "export default function(selector) {\n  return function() {\n    return this.matches(selector);\n  };\n}\n\nexport function childMatcher(selector) {\n  return function(node) {\n    return node.matches(selector);\n  };\n}\n\n", "import {childMatcher} from \"../matcher.js\";\n\nvar find = Array.prototype.find;\n\nfunction childFind(match) {\n  return function() {\n    return find.call(this.children, match);\n  };\n}\n\nfunction childFirst() {\n  return this.firstElementChild;\n}\n\nexport default function(match) {\n  return this.select(match == null ? childFirst\n      : childFind(typeof match === \"function\" ? match : childMatcher(match)));\n}\n", "import {childMatcher} from \"../matcher.js\";\n\nvar filter = Array.prototype.filter;\n\nfunction children() {\n  return Array.from(this.children);\n}\n\nfunction childrenFilter(match) {\n  return function() {\n    return filter.call(this.children, match);\n  };\n}\n\nexport default function(match) {\n  return this.selectAll(match == null ? children\n      : childrenFilter(typeof match === \"function\" ? match : childMatcher(match)));\n}\n", "import {Selection} from \"./index.js\";\nimport matcher from \"../matcher.js\";\n\nexport default function(match) {\n  if (typeof match !== \"function\") match = matcher(match);\n\n  for (var groups = this._groups, m = groups.length, subgroups = new Array(m), j = 0; j < m; ++j) {\n    for (var group = groups[j], n = group.length, subgroup = subgroups[j] = [], node, i = 0; i < n; ++i) {\n      if ((node = group[i]) && match.call(node, node.__data__, i, group)) {\n        subgroup.push(node);\n      }\n    }\n  }\n\n  return new Selection(subgroups, this._parents);\n}\n", "export default function(update) {\n  return new Array(update.length);\n}\n", "import sparse from \"./sparse.js\";\nimport {Selection} from \"./index.js\";\n\nexport default function() {\n  return new Selection(this._enter || this._groups.map(sparse), this._parents);\n}\n\nexport function EnterNode(parent, datum) {\n  this.ownerDocument = parent.ownerDocument;\n  this.namespaceURI = parent.namespaceURI;\n  this._next = null;\n  this._parent = parent;\n  this.__data__ = datum;\n}\n\nEnterNode.prototype = {\n  constructor: EnterNode,\n  appendChild: function(child) { return this._parent.insertBefore(child, this._next); },\n  insertBefore: function(child, next) { return this._parent.insertBefore(child, next); },\n  querySelector: function(selector) { return this._parent.querySelector(selector); },\n  querySelectorAll: function(selector) { return this._parent.querySelectorAll(selector); }\n};\n", "export default function(x) {\n  return function() {\n    return x;\n  };\n}\n", "import {Selection} from \"./index.js\";\nimport {EnterNode} from \"./enter.js\";\nimport constant from \"../constant.js\";\n\nfunction bindIndex(parent, group, enter, update, exit, data) {\n  var i = 0,\n      node,\n      groupLength = group.length,\n      dataLength = data.length;\n\n  // Put any non-null nodes that fit into update.\n  // Put any null nodes into enter.\n  // Put any remaining data into enter.\n  for (; i < dataLength; ++i) {\n    if (node = group[i]) {\n      node.__data__ = data[i];\n      update[i] = node;\n    } else {\n      enter[i] = new EnterNode(parent, data[i]);\n    }\n  }\n\n  // Put any non-null nodes that don\u2019t fit into exit.\n  for (; i < groupLength; ++i) {\n    if (node = group[i]) {\n      exit[i] = node;\n    }\n  }\n}\n\nfunction bindKey(parent, group, enter, update, exit, data, key) {\n  var i,\n      node,\n      nodeByKeyValue = new Map,\n      groupLength = group.length,\n      dataLength = data.length,\n      keyValues = new Array(groupLength),\n      keyValue;\n\n  // Compute the key for each node.\n  // If multiple nodes have the same key, the duplicates are added to exit.\n  for (i = 0; i < groupLength; ++i) {\n    if (node = group[i]) {\n      keyValues[i] = keyValue = key.call(node, node.__data__, i, group) + \"\";\n      if (nodeByKeyValue.has(keyValue)) {\n        exit[i] = node;\n      } else {\n        nodeByKeyValue.set(keyValue, node);\n      }\n    }\n  }\n\n  // Compute the key for each datum.\n  // If there a node associated with this key, join and add it to update.\n  // If there is not (or the key is a duplicate), add it to enter.\n  for (i = 0; i < dataLength; ++i) {\n    keyValue = key.call(parent, data[i], i, data) + \"\";\n    if (node = nodeByKeyValue.get(keyValue)) {\n      update[i] = node;\n      node.__data__ = data[i];\n      nodeByKeyValue.delete(keyValue);\n    } else {\n      enter[i] = new EnterNode(parent, data[i]);\n    }\n  }\n\n  // Add any remaining nodes that were not bound to data to exit.\n  for (i = 0; i < groupLength; ++i) {\n    if ((node = group[i]) && (nodeByKeyValue.get(keyValues[i]) === node)) {\n      exit[i] = node;\n    }\n  }\n}\n\nfunction datum(node) {\n  return node.__data__;\n}\n\nexport default function(value, key) {\n  if (!arguments.length) return Array.from(this, datum);\n\n  var bind = key ? bindKey : bindIndex,\n      parents = this._parents,\n      groups = this._groups;\n\n  if (typeof value !== \"function\") value = constant(value);\n\n  for (var m = groups.length, update = new Array(m), enter = new Array(m), exit = new Array(m), j = 0; j < m; ++j) {\n    var parent = parents[j],\n        group = groups[j],\n        groupLength = group.length,\n        data = arraylike(value.call(parent, parent && parent.__data__, j, parents)),\n        dataLength = data.length,\n        enterGroup = enter[j] = new Array(dataLength),\n        updateGroup = update[j] = new Array(dataLength),\n        exitGroup = exit[j] = new Array(groupLength);\n\n    bind(parent, group, enterGroup, updateGroup, exitGroup, data, key);\n\n    // Now connect the enter nodes to their following update node, such that\n    // appendChild can insert the materialized enter node before this node,\n    // rather than at the end of the parent node.\n    for (var i0 = 0, i1 = 0, previous, next; i0 < dataLength; ++i0) {\n      if (previous = enterGroup[i0]) {\n        if (i0 >= i1) i1 = i0 + 1;\n        while (!(next = updateGroup[i1]) && ++i1 < dataLength);\n        previous._next = next || null;\n      }\n    }\n  }\n\n  update = new Selection(update, parents);\n  update._enter = enter;\n  update._exit = exit;\n  return update;\n}\n\n// Given some data, this returns an array-like view of it: an object that\n// exposes a length property and allows numeric indexing. Note that unlike\n// selectAll, this isn\u2019t worried about \u201Clive\u201D collections because the resulting\n// array will only be used briefly while data is being bound. (It is possible to\n// cause the data to change while iterating by using a key function, but please\n// don\u2019t; we\u2019d rather avoid a gratuitous copy.)\nfunction arraylike(data) {\n  return typeof data === \"object\" && \"length\" in data\n    ? data // Array, TypedArray, NodeList, array-like\n    : Array.from(data); // Map, Set, iterable, string, or anything else\n}\n", "import sparse from \"./sparse.js\";\nimport {Selection} from \"./index.js\";\n\nexport default function() {\n  return new Selection(this._exit || this._groups.map(sparse), this._parents);\n}\n", "export default function(onenter, onupdate, onexit) {\n  var enter = this.enter(), update = this, exit = this.exit();\n  if (typeof onenter === \"function\") {\n    enter = onenter(enter);\n    if (enter) enter = enter.selection();\n  } else {\n    enter = enter.append(onenter + \"\");\n  }\n  if (onupdate != null) {\n    update = onupdate(update);\n    if (update) update = update.selection();\n  }\n  if (onexit == null) exit.remove(); else onexit(exit);\n  return enter && update ? enter.merge(update).order() : update;\n}\n", "import {Selection} from \"./index.js\";\n\nexport default function(context) {\n  var selection = context.selection ? context.selection() : context;\n\n  for (var groups0 = this._groups, groups1 = selection._groups, m0 = groups0.length, m1 = groups1.length, m = Math.min(m0, m1), merges = new Array(m0), j = 0; j < m; ++j) {\n    for (var group0 = groups0[j], group1 = groups1[j], n = group0.length, merge = merges[j] = new Array(n), node, i = 0; i < n; ++i) {\n      if (node = group0[i] || group1[i]) {\n        merge[i] = node;\n      }\n    }\n  }\n\n  for (; j < m0; ++j) {\n    merges[j] = groups0[j];\n  }\n\n  return new Selection(merges, this._parents);\n}\n", "export default function() {\n\n  for (var groups = this._groups, j = -1, m = groups.length; ++j < m;) {\n    for (var group = groups[j], i = group.length - 1, next = group[i], node; --i >= 0;) {\n      if (node = group[i]) {\n        if (next && node.compareDocumentPosition(next) ^ 4) next.parentNode.insertBefore(node, next);\n        next = node;\n      }\n    }\n  }\n\n  return this;\n}\n", "import {Selection} from \"./index.js\";\n\nexport default function(compare) {\n  if (!compare) compare = ascending;\n\n  function compareNode(a, b) {\n    return a && b ? compare(a.__data__, b.__data__) : !a - !b;\n  }\n\n  for (var groups = this._groups, m = groups.length, sortgroups = new Array(m), j = 0; j < m; ++j) {\n    for (var group = groups[j], n = group.length, sortgroup = sortgroups[j] = new Array(n), node, i = 0; i < n; ++i) {\n      if (node = group[i]) {\n        sortgroup[i] = node;\n      }\n    }\n    sortgroup.sort(compareNode);\n  }\n\n  return new Selection(sortgroups, this._parents).order();\n}\n\nfunction ascending(a, b) {\n  return a < b ? -1 : a > b ? 1 : a >= b ? 0 : NaN;\n}\n", "export default function() {\n  var callback = arguments[0];\n  arguments[0] = this;\n  callback.apply(null, arguments);\n  return this;\n}\n", "export default function() {\n  return Array.from(this);\n}\n", "export default function() {\n\n  for (var groups = this._groups, j = 0, m = groups.length; j < m; ++j) {\n    for (var group = groups[j], i = 0, n = group.length; i < n; ++i) {\n      var node = group[i];\n      if (node) return node;\n    }\n  }\n\n  return null;\n}\n", "export default function() {\n  let size = 0;\n  for (const node of this) ++size; // eslint-disable-line no-unused-vars\n  return size;\n}\n", "export default function() {\n  return !this.node();\n}\n", "export default function(callback) {\n\n  for (var groups = this._groups, j = 0, m = groups.length; j < m; ++j) {\n    for (var group = groups[j], i = 0, n = group.length, node; i < n; ++i) {\n      if (node = group[i]) callback.call(node, node.__data__, i, group);\n    }\n  }\n\n  return this;\n}\n", "import namespace from \"../namespace.js\";\n\nfunction attrRemove(name) {\n  return function() {\n    this.removeAttribute(name);\n  };\n}\n\nfunction attrRemoveNS(fullname) {\n  return function() {\n    this.removeAttributeNS(fullname.space, fullname.local);\n  };\n}\n\nfunction attrConstant(name, value) {\n  return function() {\n    this.setAttribute(name, value);\n  };\n}\n\nfunction attrConstantNS(fullname, value) {\n  return function() {\n    this.setAttributeNS(fullname.space, fullname.local, value);\n  };\n}\n\nfunction attrFunction(name, value) {\n  return function() {\n    var v = value.apply(this, arguments);\n    if (v == null) this.removeAttribute(name);\n    else this.setAttribute(name, v);\n  };\n}\n\nfunction attrFunctionNS(fullname, value) {\n  return function() {\n    var v = value.apply(this, arguments);\n    if (v == null) this.removeAttributeNS(fullname.space, fullname.local);\n    else this.setAttributeNS(fullname.space, fullname.local, v);\n  };\n}\n\nexport default function(name, value) {\n  var fullname = namespace(name);\n\n  if (arguments.length < 2) {\n    var node = this.node();\n    return fullname.local\n        ? node.getAttributeNS(fullname.space, fullname.local)\n        : node.getAttribute(fullname);\n  }\n\n  return this.each((value == null\n      ? (fullname.local ? attrRemoveNS : attrRemove) : (typeof value === \"function\"\n      ? (fullname.local ? attrFunctionNS : attrFunction)\n      : (fullname.local ? attrConstantNS : attrConstant)))(fullname, value));\n}\n", "export default function(node) {\n  return (node.ownerDocument && node.ownerDocument.defaultView) // node is a Node\n      || (node.document && node) // node is a Window\n      || node.defaultView; // node is a Document\n}\n", "import defaultView from \"../window.js\";\n\nfunction styleRemove(name) {\n  return function() {\n    this.style.removeProperty(name);\n  };\n}\n\nfunction styleConstant(name, value, priority) {\n  return function() {\n    this.style.setProperty(name, value, priority);\n  };\n}\n\nfunction styleFunction(name, value, priority) {\n  return function() {\n    var v = value.apply(this, arguments);\n    if (v == null) this.style.removeProperty(name);\n    else this.style.setProperty(name, v, priority);\n  };\n}\n\nexport default function(name, value, priority) {\n  return arguments.length > 1\n      ? this.each((value == null\n            ? styleRemove : typeof value === \"function\"\n            ? styleFunction\n            : styleConstant)(name, value, priority == null ? \"\" : priority))\n      : styleValue(this.node(), name);\n}\n\nexport function styleValue(node, name) {\n  return node.style.getPropertyValue(name)\n      || defaultView(node).getComputedStyle(node, null).getPropertyValue(name);\n}\n", "function propertyRemove(name) {\n  return function() {\n    delete this[name];\n  };\n}\n\nfunction propertyConstant(name, value) {\n  return function() {\n    this[name] = value;\n  };\n}\n\nfunction propertyFunction(name, value) {\n  return function() {\n    var v = value.apply(this, arguments);\n    if (v == null) delete this[name];\n    else this[name] = v;\n  };\n}\n\nexport default function(name, value) {\n  return arguments.length > 1\n      ? this.each((value == null\n          ? propertyRemove : typeof value === \"function\"\n          ? propertyFunction\n          : propertyConstant)(name, value))\n      : this.node()[name];\n}\n", "function classArray(string) {\n  return string.trim().split(/^|\\s+/);\n}\n\nfunction classList(node) {\n  return node.classList || new ClassList(node);\n}\n\nfunction ClassList(node) {\n  this._node = node;\n  this._names = classArray(node.getAttribute(\"class\") || \"\");\n}\n\nClassList.prototype = {\n  add: function(name) {\n    var i = this._names.indexOf(name);\n    if (i < 0) {\n      this._names.push(name);\n      this._node.setAttribute(\"class\", this._names.join(\" \"));\n    }\n  },\n  remove: function(name) {\n    var i = this._names.indexOf(name);\n    if (i >= 0) {\n      this._names.splice(i, 1);\n      this._node.setAttribute(\"class\", this._names.join(\" \"));\n    }\n  },\n  contains: function(name) {\n    return this._names.indexOf(name) >= 0;\n  }\n};\n\nfunction classedAdd(node, names) {\n  var list = classList(node), i = -1, n = names.length;\n  while (++i < n) list.add(names[i]);\n}\n\nfunction classedRemove(node, names) {\n  var list = classList(node), i = -1, n = names.length;\n  while (++i < n) list.remove(names[i]);\n}\n\nfunction classedTrue(names) {\n  return function() {\n    classedAdd(this, names);\n  };\n}\n\nfunction classedFalse(names) {\n  return function() {\n    classedRemove(this, names);\n  };\n}\n\nfunction classedFunction(names, value) {\n  return function() {\n    (value.apply(this, arguments) ? classedAdd : classedRemove)(this, names);\n  };\n}\n\nexport default function(name, value) {\n  var names = classArray(name + \"\");\n\n  if (arguments.length < 2) {\n    var list = classList(this.node()), i = -1, n = names.length;\n    while (++i < n) if (!list.contains(names[i])) return false;\n    return true;\n  }\n\n  return this.each((typeof value === \"function\"\n      ? classedFunction : value\n      ? classedTrue\n      : classedFalse)(names, value));\n}\n", "function textRemove() {\n  this.textContent = \"\";\n}\n\nfunction textConstant(value) {\n  return function() {\n    this.textContent = value;\n  };\n}\n\nfunction textFunction(value) {\n  return function() {\n    var v = value.apply(this, arguments);\n    this.textContent = v == null ? \"\" : v;\n  };\n}\n\nexport default function(value) {\n  return arguments.length\n      ? this.each(value == null\n          ? textRemove : (typeof value === \"function\"\n          ? textFunction\n          : textConstant)(value))\n      : this.node().textContent;\n}\n", "function htmlRemove() {\n  this.innerHTML = \"\";\n}\n\nfunction htmlConstant(value) {\n  return function() {\n    this.innerHTML = value;\n  };\n}\n\nfunction htmlFunction(value) {\n  return function() {\n    var v = value.apply(this, arguments);\n    this.innerHTML = v == null ? \"\" : v;\n  };\n}\n\nexport default function(value) {\n  return arguments.length\n      ? this.each(value == null\n          ? htmlRemove : (typeof value === \"function\"\n          ? htmlFunction\n          : htmlConstant)(value))\n      : this.node().innerHTML;\n}\n", "function raise() {\n  if (this.nextSibling) this.parentNode.appendChild(this);\n}\n\nexport default function() {\n  return this.each(raise);\n}\n", "function lower() {\n  if (this.previousSibling) this.parentNode.insertBefore(this, this.parentNode.firstChild);\n}\n\nexport default function() {\n  return this.each(lower);\n}\n", "import creator from \"../creator.js\";\n\nexport default function(name) {\n  var create = typeof name === \"function\" ? name : creator(name);\n  return this.select(function() {\n    return this.appendChild(create.apply(this, arguments));\n  });\n}\n", "import creator from \"../creator.js\";\nimport selector from \"../selector.js\";\n\nfunction constantNull() {\n  return null;\n}\n\nexport default function(name, before) {\n  var create = typeof name === \"function\" ? name : creator(name),\n      select = before == null ? constantNull : typeof before === \"function\" ? before : selector(before);\n  return this.select(function() {\n    return this.insertBefore(create.apply(this, arguments), select.apply(this, arguments) || null);\n  });\n}\n", "function remove() {\n  var parent = this.parentNode;\n  if (parent) parent.removeChild(this);\n}\n\nexport default function() {\n  return this.each(remove);\n}\n", "function selection_cloneShallow() {\n  var clone = this.cloneNode(false), parent = this.parentNode;\n  return parent ? parent.insertBefore(clone, this.nextSibling) : clone;\n}\n\nfunction selection_cloneDeep() {\n  var clone = this.cloneNode(true), parent = this.parentNode;\n  return parent ? parent.insertBefore(clone, this.nextSibling) : clone;\n}\n\nexport default function(deep) {\n  return this.select(deep ? selection_cloneDeep : selection_cloneShallow);\n}\n", "export default function(value) {\n  return arguments.length\n      ? this.property(\"__data__\", value)\n      : this.node().__data__;\n}\n", "function contextListener(listener) {\n  return function(event) {\n    listener.call(this, event, this.__data__);\n  };\n}\n\nfunction parseTypenames(typenames) {\n  return typenames.trim().split(/^|\\s+/).map(function(t) {\n    var name = \"\", i = t.indexOf(\".\");\n    if (i >= 0) name = t.slice(i + 1), t = t.slice(0, i);\n    return {type: t, name: name};\n  });\n}\n\nfunction onRemove(typename) {\n  return function() {\n    var on = this.__on;\n    if (!on) return;\n    for (var j = 0, i = -1, m = on.length, o; j < m; ++j) {\n      if (o = on[j], (!typename.type || o.type === typename.type) && o.name === typename.name) {\n        this.removeEventListener(o.type, o.listener, o.options);\n      } else {\n        on[++i] = o;\n      }\n    }\n    if (++i) on.length = i;\n    else delete this.__on;\n  };\n}\n\nfunction onAdd(typename, value, options) {\n  return function() {\n    var on = this.__on, o, listener = contextListener(value);\n    if (on) for (var j = 0, m = on.length; j < m; ++j) {\n      if ((o = on[j]).type === typename.type && o.name === typename.name) {\n        this.removeEventListener(o.type, o.listener, o.options);\n        this.addEventListener(o.type, o.listener = listener, o.options = options);\n        o.value = value;\n        return;\n      }\n    }\n    this.addEventListener(typename.type, listener, options);\n    o = {type: typename.type, name: typename.name, value: value, listener: listener, options: options};\n    if (!on) this.__on = [o];\n    else on.push(o);\n  };\n}\n\nexport default function(typename, value, options) {\n  var typenames = parseTypenames(typename + \"\"), i, n = typenames.length, t;\n\n  if (arguments.length < 2) {\n    var on = this.node().__on;\n    if (on) for (var j = 0, m = on.length, o; j < m; ++j) {\n      for (i = 0, o = on[j]; i < n; ++i) {\n        if ((t = typenames[i]).type === o.type && t.name === o.name) {\n          return o.value;\n        }\n      }\n    }\n    return;\n  }\n\n  on = value ? onAdd : onRemove;\n  for (i = 0; i < n; ++i) this.each(on(typenames[i], value, options));\n  return this;\n}\n", "import defaultView from \"../window.js\";\n\nfunction dispatchEvent(node, type, params) {\n  var window = defaultView(node),\n      event = window.CustomEvent;\n\n  if (typeof event === \"function\") {\n    event = new event(type, params);\n  } else {\n    event = window.document.createEvent(\"Event\");\n    if (params) event.initEvent(type, params.bubbles, params.cancelable), event.detail = params.detail;\n    else event.initEvent(type, false, false);\n  }\n\n  node.dispatchEvent(event);\n}\n\nfunction dispatchConstant(type, params) {\n  return function() {\n    return dispatchEvent(this, type, params);\n  };\n}\n\nfunction dispatchFunction(type, params) {\n  return function() {\n    return dispatchEvent(this, type, params.apply(this, arguments));\n  };\n}\n\nexport default function(type, params) {\n  return this.each((typeof params === \"function\"\n      ? dispatchFunction\n      : dispatchConstant)(type, params));\n}\n", "export default function*() {\n  for (var groups = this._groups, j = 0, m = groups.length; j < m; ++j) {\n    for (var group = groups[j], i = 0, n = group.length, node; i < n; ++i) {\n      if (node = group[i]) yield node;\n    }\n  }\n}\n", "import selection_select from \"./select.js\";\nimport selection_selectAll from \"./selectAll.js\";\nimport selection_selectChild from \"./selectChild.js\";\nimport selection_selectChildren from \"./selectChildren.js\";\nimport selection_filter from \"./filter.js\";\nimport selection_data from \"./data.js\";\nimport selection_enter from \"./enter.js\";\nimport selection_exit from \"./exit.js\";\nimport selection_join from \"./join.js\";\nimport selection_merge from \"./merge.js\";\nimport selection_order from \"./order.js\";\nimport selection_sort from \"./sort.js\";\nimport selection_call from \"./call.js\";\nimport selection_nodes from \"./nodes.js\";\nimport selection_node from \"./node.js\";\nimport selection_size from \"./size.js\";\nimport selection_empty from \"./empty.js\";\nimport selection_each from \"./each.js\";\nimport selection_attr from \"./attr.js\";\nimport selection_style from \"./style.js\";\nimport selection_property from \"./property.js\";\nimport selection_classed from \"./classed.js\";\nimport selection_text from \"./text.js\";\nimport selection_html from \"./html.js\";\nimport selection_raise from \"./raise.js\";\nimport selection_lower from \"./lower.js\";\nimport selection_append from \"./append.js\";\nimport selection_insert from \"./insert.js\";\nimport selection_remove from \"./remove.js\";\nimport selection_clone from \"./clone.js\";\nimport selection_datum from \"./datum.js\";\nimport selection_on from \"./on.js\";\nimport selection_dispatch from \"./dispatch.js\";\nimport selection_iterator from \"./iterator.js\";\n\nexport var root = [null];\n\nexport function Selection(groups, parents) {\n  this._groups = groups;\n  this._parents = parents;\n}\n\nfunction selection() {\n  return new Selection([[document.documentElement]], root);\n}\n\nfunction selection_selection() {\n  return this;\n}\n\nSelection.prototype = selection.prototype = {\n  constructor: Selection,\n  select: selection_select,\n  selectAll: selection_selectAll,\n  selectChild: selection_selectChild,\n  selectChildren: selection_selectChildren,\n  filter: selection_filter,\n  data: selection_data,\n  enter: selection_enter,\n  exit: selection_exit,\n  join: selection_join,\n  merge: selection_merge,\n  selection: selection_selection,\n  order: selection_order,\n  sort: selection_sort,\n  call: selection_call,\n  nodes: selection_nodes,\n  node: selection_node,\n  size: selection_size,\n  empty: selection_empty,\n  each: selection_each,\n  attr: selection_attr,\n  style: selection_style,\n  property: selection_property,\n  classed: selection_classed,\n  text: selection_text,\n  html: selection_html,\n  raise: selection_raise,\n  lower: selection_lower,\n  append: selection_append,\n  insert: selection_insert,\n  remove: selection_remove,\n  clone: selection_clone,\n  datum: selection_datum,\n  on: selection_on,\n  dispatch: selection_dispatch,\n  [Symbol.iterator]: selection_iterator\n};\n\nexport default selection;\n", "import {Selection, root} from \"./selection/index.js\";\n\nexport default function(selector) {\n  return typeof selector === \"string\"\n      ? new Selection([[document.querySelector(selector)]], [document.documentElement])\n      : new Selection([[selector]], root);\n}\n", "export default function(event) {\n  let sourceEvent;\n  while (sourceEvent = event.sourceEvent) event = sourceEvent;\n  return event;\n}\n", "import sourceEvent from \"./sourceEvent.js\";\n\nexport default function(event, node) {\n  event = sourceEvent(event);\n  if (node === undefined) node = event.currentTarget;\n  if (node) {\n    var svg = node.ownerSVGElement || node;\n    if (svg.createSVGPoint) {\n      var point = svg.createSVGPoint();\n      point.x = event.clientX, point.y = event.clientY;\n      point = point.matrixTransform(node.getScreenCTM().inverse());\n      return [point.x, point.y];\n    }\n    if (node.getBoundingClientRect) {\n      var rect = node.getBoundingClientRect();\n      return [event.clientX - rect.left - node.clientLeft, event.clientY - rect.top - node.clientTop];\n    }\n  }\n  return [event.pageX, event.pageY];\n}\n", "export default function(constructor, factory, prototype) {\n  constructor.prototype = factory.prototype = prototype;\n  prototype.constructor = constructor;\n}\n\nexport function extend(parent, definition) {\n  var prototype = Object.create(parent.prototype);\n  for (var key in definition) prototype[key] = definition[key];\n  return prototype;\n}\n", "import define, {extend} from \"./define.js\";\n\nexport function Color() {}\n\nexport var darker = 0.7;\nexport var brighter = 1 / darker;\n\nvar reI = \"\\\\s*([+-]?\\\\d+)\\\\s*\",\n    reN = \"\\\\s*([+-]?(?:\\\\d*\\\\.)?\\\\d+(?:[eE][+-]?\\\\d+)?)\\\\s*\",\n    reP = \"\\\\s*([+-]?(?:\\\\d*\\\\.)?\\\\d+(?:[eE][+-]?\\\\d+)?)%\\\\s*\",\n    reHex = /^#([0-9a-f]{3,8})$/,\n    reRgbInteger = new RegExp(`^rgb\\\\(${reI},${reI},${reI}\\\\)$`),\n    reRgbPercent = new RegExp(`^rgb\\\\(${reP},${reP},${reP}\\\\)$`),\n    reRgbaInteger = new RegExp(`^rgba\\\\(${reI},${reI},${reI},${reN}\\\\)$`),\n    reRgbaPercent = new RegExp(`^rgba\\\\(${reP},${reP},${reP},${reN}\\\\)$`),\n    reHslPercent = new RegExp(`^hsl\\\\(${reN},${reP},${reP}\\\\)$`),\n    reHslaPercent = new RegExp(`^hsla\\\\(${reN},${reP},${reP},${reN}\\\\)$`);\n\nvar named = {\n  aliceblue: 0xf0f8ff,\n  antiquewhite: 0xfaebd7,\n  aqua: 0x00ffff,\n  aquamarine: 0x7fffd4,\n  azure: 0xf0ffff,\n  beige: 0xf5f5dc,\n  bisque: 0xffe4c4,\n  black: 0x000000,\n  blanchedalmond: 0xffebcd,\n  blue: 0x0000ff,\n  blueviolet: 0x8a2be2,\n  brown: 0xa52a2a,\n  burlywood: 0xdeb887,\n  cadetblue: 0x5f9ea0,\n  chartreuse: 0x7fff00,\n  chocolate: 0xd2691e,\n  coral: 0xff7f50,\n  cornflowerblue: 0x6495ed,\n  cornsilk: 0xfff8dc,\n  crimson: 0xdc143c,\n  cyan: 0x00ffff,\n  darkblue: 0x00008b,\n  darkcyan: 0x008b8b,\n  darkgoldenrod: 0xb8860b,\n  darkgray: 0xa9a9a9,\n  darkgreen: 0x006400,\n  darkgrey: 0xa9a9a9,\n  darkkhaki: 0xbdb76b,\n  darkmagenta: 0x8b008b,\n  darkolivegreen: 0x556b2f,\n  darkorange: 0xff8c00,\n  darkorchid: 0x9932cc,\n  darkred: 0x8b0000,\n  darksalmon: 0xe9967a,\n  darkseagreen: 0x8fbc8f,\n  darkslateblue: 0x483d8b,\n  darkslategray: 0x2f4f4f,\n  darkslategrey: 0x2f4f4f,\n  darkturquoise: 0x00ced1,\n  darkviolet: 0x9400d3,\n  deeppink: 0xff1493,\n  deepskyblue: 0x00bfff,\n  dimgray: 0x696969,\n  dimgrey: 0x696969,\n  dodgerblue: 0x1e90ff,\n  firebrick: 0xb22222,\n  floralwhite: 0xfffaf0,\n  forestgreen: 0x228b22,\n  fuchsia: 0xff00ff,\n  gainsboro: 0xdcdcdc,\n  ghostwhite: 0xf8f8ff,\n  gold: 0xffd700,\n  goldenrod: 0xdaa520,\n  gray: 0x808080,\n  green: 0x008000,\n  greenyellow: 0xadff2f,\n  grey: 0x808080,\n  honeydew: 0xf0fff0,\n  hotpink: 0xff69b4,\n  indianred: 0xcd5c5c,\n  indigo: 0x4b0082,\n  ivory: 0xfffff0,\n  khaki: 0xf0e68c,\n  lavender: 0xe6e6fa,\n  lavenderblush: 0xfff0f5,\n  lawngreen: 0x7cfc00,\n  lemonchiffon: 0xfffacd,\n  lightblue: 0xadd8e6,\n  lightcoral: 0xf08080,\n  lightcyan: 0xe0ffff,\n  lightgoldenrodyellow: 0xfafad2,\n  lightgray: 0xd3d3d3,\n  lightgreen: 0x90ee90,\n  lightgrey: 0xd3d3d3,\n  lightpink: 0xffb6c1,\n  lightsalmon: 0xffa07a,\n  lightseagreen: 0x20b2aa,\n  lightskyblue: 0x87cefa,\n  lightslategray: 0x778899,\n  lightslategrey: 0x778899,\n  lightsteelblue: 0xb0c4de,\n  lightyellow: 0xffffe0,\n  lime: 0x00ff00,\n  limegreen: 0x32cd32,\n  linen: 0xfaf0e6,\n  magenta: 0xff00ff,\n  maroon: 0x800000,\n  mediumaquamarine: 0x66cdaa,\n  mediumblue: 0x0000cd,\n  mediumorchid: 0xba55d3,\n  mediumpurple: 0x9370db,\n  mediumseagreen: 0x3cb371,\n  mediumslateblue: 0x7b68ee,\n  mediumspringgreen: 0x00fa9a,\n  mediumturquoise: 0x48d1cc,\n  mediumvioletred: 0xc71585,\n  midnightblue: 0x191970,\n  mintcream: 0xf5fffa,\n  mistyrose: 0xffe4e1,\n  moccasin: 0xffe4b5,\n  navajowhite: 0xffdead,\n  navy: 0x000080,\n  oldlace: 0xfdf5e6,\n  olive: 0x808000,\n  olivedrab: 0x6b8e23,\n  orange: 0xffa500,\n  orangered: 0xff4500,\n  orchid: 0xda70d6,\n  palegoldenrod: 0xeee8aa,\n  palegreen: 0x98fb98,\n  paleturquoise: 0xafeeee,\n  palevioletred: 0xdb7093,\n  papayawhip: 0xffefd5,\n  peachpuff: 0xffdab9,\n  peru: 0xcd853f,\n  pink: 0xffc0cb,\n  plum: 0xdda0dd,\n  powderblue: 0xb0e0e6,\n  purple: 0x800080,\n  rebeccapurple: 0x663399,\n  red: 0xff0000,\n  rosybrown: 0xbc8f8f,\n  royalblue: 0x4169e1,\n  saddlebrown: 0x8b4513,\n  salmon: 0xfa8072,\n  sandybrown: 0xf4a460,\n  seagreen: 0x2e8b57,\n  seashell: 0xfff5ee,\n  sienna: 0xa0522d,\n  silver: 0xc0c0c0,\n  skyblue: 0x87ceeb,\n  slateblue: 0x6a5acd,\n  slategray: 0x708090,\n  slategrey: 0x708090,\n  snow: 0xfffafa,\n  springgreen: 0x00ff7f,\n  steelblue: 0x4682b4,\n  tan: 0xd2b48c,\n  teal: 0x008080,\n  thistle: 0xd8bfd8,\n  tomato: 0xff6347,\n  turquoise: 0x40e0d0,\n  violet: 0xee82ee,\n  wheat: 0xf5deb3,\n  white: 0xffffff,\n  whitesmoke: 0xf5f5f5,\n  yellow: 0xffff00,\n  yellowgreen: 0x9acd32\n};\n\ndefine(Color, color, {\n  copy(channels) {\n    return Object.assign(new this.constructor, this, channels);\n  },\n  displayable() {\n    return this.rgb().displayable();\n  },\n  hex: color_formatHex, // Deprecated! Use color.formatHex.\n  formatHex: color_formatHex,\n  formatHex8: color_formatHex8,\n  formatHsl: color_formatHsl,\n  formatRgb: color_formatRgb,\n  toString: color_formatRgb\n});\n\nfunction color_formatHex() {\n  return this.rgb().formatHex();\n}\n\nfunction color_formatHex8() {\n  return this.rgb().formatHex8();\n}\n\nfunction color_formatHsl() {\n  return hslConvert(this).formatHsl();\n}\n\nfunction color_formatRgb() {\n  return this.rgb().formatRgb();\n}\n\nexport default function color(format) {\n  var m, l;\n  format = (format + \"\").trim().toLowerCase();\n  return (m = reHex.exec(format)) ? (l = m[1].length, m = parseInt(m[1], 16), l === 6 ? rgbn(m) // #ff0000\n      : l === 3 ? new Rgb((m >> 8 & 0xf) | (m >> 4 & 0xf0), (m >> 4 & 0xf) | (m & 0xf0), ((m & 0xf) << 4) | (m & 0xf), 1) // #f00\n      : l === 8 ? rgba(m >> 24 & 0xff, m >> 16 & 0xff, m >> 8 & 0xff, (m & 0xff) / 0xff) // #ff000000\n      : l === 4 ? rgba((m >> 12 & 0xf) | (m >> 8 & 0xf0), (m >> 8 & 0xf) | (m >> 4 & 0xf0), (m >> 4 & 0xf) | (m & 0xf0), (((m & 0xf) << 4) | (m & 0xf)) / 0xff) // #f000\n      : null) // invalid hex\n      : (m = reRgbInteger.exec(format)) ? new Rgb(m[1], m[2], m[3], 1) // rgb(255, 0, 0)\n      : (m = reRgbPercent.exec(format)) ? new Rgb(m[1] * 255 / 100, m[2] * 255 / 100, m[3] * 255 / 100, 1) // rgb(100%, 0%, 0%)\n      : (m = reRgbaInteger.exec(format)) ? rgba(m[1], m[2], m[3], m[4]) // rgba(255, 0, 0, 1)\n      : (m = reRgbaPercent.exec(format)) ? rgba(m[1] * 255 / 100, m[2] * 255 / 100, m[3] * 255 / 100, m[4]) // rgb(100%, 0%, 0%, 1)\n      : (m = reHslPercent.exec(format)) ? hsla(m[1], m[2] / 100, m[3] / 100, 1) // hsl(120, 50%, 50%)\n      : (m = reHslaPercent.exec(format)) ? hsla(m[1], m[2] / 100, m[3] / 100, m[4]) // hsla(120, 50%, 50%, 1)\n      : named.hasOwnProperty(format) ? rgbn(named[format]) // eslint-disable-line no-prototype-builtins\n      : format === \"transparent\" ? new Rgb(NaN, NaN, NaN, 0)\n      : null;\n}\n\nfunction rgbn(n) {\n  return new Rgb(n >> 16 & 0xff, n >> 8 & 0xff, n & 0xff, 1);\n}\n\nfunction rgba(r, g, b, a) {\n  if (a <= 0) r = g = b = NaN;\n  return new Rgb(r, g, b, a);\n}\n\nexport function rgbConvert(o) {\n  if (!(o instanceof Color)) o = color(o);\n  if (!o) return new Rgb;\n  o = o.rgb();\n  return new Rgb(o.r, o.g, o.b, o.opacity);\n}\n\nexport function rgb(r, g, b, opacity) {\n  return arguments.length === 1 ? rgbConvert(r) : new Rgb(r, g, b, opacity == null ? 1 : opacity);\n}\n\nexport function Rgb(r, g, b, opacity) {\n  this.r = +r;\n  this.g = +g;\n  this.b = +b;\n  this.opacity = +opacity;\n}\n\ndefine(Rgb, rgb, extend(Color, {\n  brighter(k) {\n    k = k == null ? brighter : Math.pow(brighter, k);\n    return new Rgb(this.r * k, this.g * k, this.b * k, this.opacity);\n  },\n  darker(k) {\n    k = k == null ? darker : Math.pow(darker, k);\n    return new Rgb(this.r * k, this.g * k, this.b * k, this.opacity);\n  },\n  rgb() {\n    return this;\n  },\n  clamp() {\n    return new Rgb(clampi(this.r), clampi(this.g), clampi(this.b), clampa(this.opacity));\n  },\n  displayable() {\n    return (-0.5 <= this.r && this.r < 255.5)\n        && (-0.5 <= this.g && this.g < 255.5)\n        && (-0.5 <= this.b && this.b < 255.5)\n        && (0 <= this.opacity && this.opacity <= 1);\n  },\n  hex: rgb_formatHex, // Deprecated! Use color.formatHex.\n  formatHex: rgb_formatHex,\n  formatHex8: rgb_formatHex8,\n  formatRgb: rgb_formatRgb,\n  toString: rgb_formatRgb\n}));\n\nfunction rgb_formatHex() {\n  return `#${hex(this.r)}${hex(this.g)}${hex(this.b)}`;\n}\n\nfunction rgb_formatHex8() {\n  return `#${hex(this.r)}${hex(this.g)}${hex(this.b)}${hex((isNaN(this.opacity) ? 1 : this.opacity) * 255)}`;\n}\n\nfunction rgb_formatRgb() {\n  const a = clampa(this.opacity);\n  return `${a === 1 ? \"rgb(\" : \"rgba(\"}${clampi(this.r)}, ${clampi(this.g)}, ${clampi(this.b)}${a === 1 ? \")\" : `, ${a})`}`;\n}\n\nfunction clampa(opacity) {\n  return isNaN(opacity) ? 1 : Math.max(0, Math.min(1, opacity));\n}\n\nfunction clampi(value) {\n  return Math.max(0, Math.min(255, Math.round(value) || 0));\n}\n\nfunction hex(value) {\n  value = clampi(value);\n  return (value < 16 ? \"0\" : \"\") + value.toString(16);\n}\n\nfunction hsla(h, s, l, a) {\n  if (a <= 0) h = s = l = NaN;\n  else if (l <= 0 || l >= 1) h = s = NaN;\n  else if (s <= 0) h = NaN;\n  return new Hsl(h, s, l, a);\n}\n\nexport function hslConvert(o) {\n  if (o instanceof Hsl) return new Hsl(o.h, o.s, o.l, o.opacity);\n  if (!(o instanceof Color)) o = color(o);\n  if (!o) return new Hsl;\n  if (o instanceof Hsl) return o;\n  o = o.rgb();\n  var r = o.r / 255,\n      g = o.g / 255,\n      b = o.b / 255,\n      min = Math.min(r, g, b),\n      max = Math.max(r, g, b),\n      h = NaN,\n      s = max - min,\n      l = (max + min) / 2;\n  if (s) {\n    if (r === max) h = (g - b) / s + (g < b) * 6;\n    else if (g === max) h = (b - r) / s + 2;\n    else h = (r - g) / s + 4;\n    s /= l < 0.5 ? max + min : 2 - max - min;\n    h *= 60;\n  } else {\n    s = l > 0 && l < 1 ? 0 : h;\n  }\n  return new Hsl(h, s, l, o.opacity);\n}\n\nexport function hsl(h, s, l, opacity) {\n  return arguments.length === 1 ? hslConvert(h) : new Hsl(h, s, l, opacity == null ? 1 : opacity);\n}\n\nfunction Hsl(h, s, l, opacity) {\n  this.h = +h;\n  this.s = +s;\n  this.l = +l;\n  this.opacity = +opacity;\n}\n\ndefine(Hsl, hsl, extend(Color, {\n  brighter(k) {\n    k = k == null ? brighter : Math.pow(brighter, k);\n    return new Hsl(this.h, this.s, this.l * k, this.opacity);\n  },\n  darker(k) {\n    k = k == null ? darker : Math.pow(darker, k);\n    return new Hsl(this.h, this.s, this.l * k, this.opacity);\n  },\n  rgb() {\n    var h = this.h % 360 + (this.h < 0) * 360,\n        s = isNaN(h) || isNaN(this.s) ? 0 : this.s,\n        l = this.l,\n        m2 = l + (l < 0.5 ? l : 1 - l) * s,\n        m1 = 2 * l - m2;\n    return new Rgb(\n      hsl2rgb(h >= 240 ? h - 240 : h + 120, m1, m2),\n      hsl2rgb(h, m1, m2),\n      hsl2rgb(h < 120 ? h + 240 : h - 120, m1, m2),\n      this.opacity\n    );\n  },\n  clamp() {\n    return new Hsl(clamph(this.h), clampt(this.s), clampt(this.l), clampa(this.opacity));\n  },\n  displayable() {\n    return (0 <= this.s && this.s <= 1 || isNaN(this.s))\n        && (0 <= this.l && this.l <= 1)\n        && (0 <= this.opacity && this.opacity <= 1);\n  },\n  formatHsl() {\n    const a = clampa(this.opacity);\n    return `${a === 1 ? \"hsl(\" : \"hsla(\"}${clamph(this.h)}, ${clampt(this.s) * 100}%, ${clampt(this.l) * 100}%${a === 1 ? \")\" : `, ${a})`}`;\n  }\n}));\n\nfunction clamph(value) {\n  value = (value || 0) % 360;\n  return value < 0 ? value + 360 : value;\n}\n\nfunction clampt(value) {\n  return Math.max(0, Math.min(1, value || 0));\n}\n\n/* From FvD 13.37, CSS Color Module Level 3 */\nfunction hsl2rgb(h, m1, m2) {\n  return (h < 60 ? m1 + (m2 - m1) * h / 60\n      : h < 180 ? m2\n      : h < 240 ? m1 + (m2 - m1) * (240 - h) / 60\n      : m1) * 255;\n}\n", "export const radians = Math.PI / 180;\nexport const degrees = 180 / Math.PI;\n", "import define, {extend} from \"./define.js\";\nimport {Color, rgbConvert, Rgb} from \"./color.js\";\nimport {degrees, radians} from \"./math.js\";\n\n// https://observablehq.com/@mbostock/lab-and-rgb\nconst K = 18,\n    Xn = 0.96422,\n    Yn = 1,\n    Zn = 0.82521,\n    t0 = 4 / 29,\n    t1 = 6 / 29,\n    t2 = 3 * t1 * t1,\n    t3 = t1 * t1 * t1;\n\nfunction labConvert(o) {\n  if (o instanceof Lab) return new Lab(o.l, o.a, o.b, o.opacity);\n  if (o instanceof Hcl) return hcl2lab(o);\n  if (!(o instanceof Rgb)) o = rgbConvert(o);\n  var r = rgb2lrgb(o.r),\n      g = rgb2lrgb(o.g),\n      b = rgb2lrgb(o.b),\n      y = xyz2lab((0.2225045 * r + 0.7168786 * g + 0.0606169 * b) / Yn), x, z;\n  if (r === g && g === b) x = z = y; else {\n    x = xyz2lab((0.4360747 * r + 0.3850649 * g + 0.1430804 * b) / Xn);\n    z = xyz2lab((0.0139322 * r + 0.0971045 * g + 0.7141733 * b) / Zn);\n  }\n  return new Lab(116 * y - 16, 500 * (x - y), 200 * (y - z), o.opacity);\n}\n\nexport function gray(l, opacity) {\n  return new Lab(l, 0, 0, opacity == null ? 1 : opacity);\n}\n\nexport default function lab(l, a, b, opacity) {\n  return arguments.length === 1 ? labConvert(l) : new Lab(l, a, b, opacity == null ? 1 : opacity);\n}\n\nexport function Lab(l, a, b, opacity) {\n  this.l = +l;\n  this.a = +a;\n  this.b = +b;\n  this.opacity = +opacity;\n}\n\ndefine(Lab, lab, extend(Color, {\n  brighter(k) {\n    return new Lab(this.l + K * (k == null ? 1 : k), this.a, this.b, this.opacity);\n  },\n  darker(k) {\n    return new Lab(this.l - K * (k == null ? 1 : k), this.a, this.b, this.opacity);\n  },\n  rgb() {\n    var y = (this.l + 16) / 116,\n        x = isNaN(this.a) ? y : y + this.a / 500,\n        z = isNaN(this.b) ? y : y - this.b / 200;\n    x = Xn * lab2xyz(x);\n    y = Yn * lab2xyz(y);\n    z = Zn * lab2xyz(z);\n    return new Rgb(\n      lrgb2rgb( 3.1338561 * x - 1.6168667 * y - 0.4906146 * z),\n      lrgb2rgb(-0.9787684 * x + 1.9161415 * y + 0.0334540 * z),\n      lrgb2rgb( 0.0719453 * x - 0.2289914 * y + 1.4052427 * z),\n      this.opacity\n    );\n  }\n}));\n\nfunction xyz2lab(t) {\n  return t > t3 ? Math.pow(t, 1 / 3) : t / t2 + t0;\n}\n\nfunction lab2xyz(t) {\n  return t > t1 ? t * t * t : t2 * (t - t0);\n}\n\nfunction lrgb2rgb(x) {\n  return 255 * (x <= 0.0031308 ? 12.92 * x : 1.055 * Math.pow(x, 1 / 2.4) - 0.055);\n}\n\nfunction rgb2lrgb(x) {\n  return (x /= 255) <= 0.04045 ? x / 12.92 : Math.pow((x + 0.055) / 1.055, 2.4);\n}\n\nfunction hclConvert(o) {\n  if (o instanceof Hcl) return new Hcl(o.h, o.c, o.l, o.opacity);\n  if (!(o instanceof Lab)) o = labConvert(o);\n  if (o.a === 0 && o.b === 0) return new Hcl(NaN, 0 < o.l && o.l < 100 ? 0 : NaN, o.l, o.opacity);\n  var h = Math.atan2(o.b, o.a) * degrees;\n  return new Hcl(h < 0 ? h + 360 : h, Math.sqrt(o.a * o.a + o.b * o.b), o.l, o.opacity);\n}\n\nexport function lch(l, c, h, opacity) {\n  return arguments.length === 1 ? hclConvert(l) : new Hcl(h, c, l, opacity == null ? 1 : opacity);\n}\n\nexport function hcl(h, c, l, opacity) {\n  return arguments.length === 1 ? hclConvert(h) : new Hcl(h, c, l, opacity == null ? 1 : opacity);\n}\n\nexport function Hcl(h, c, l, opacity) {\n  this.h = +h;\n  this.c = +c;\n  this.l = +l;\n  this.opacity = +opacity;\n}\n\nfunction hcl2lab(o) {\n  if (isNaN(o.h)) return new Lab(o.l, 0, 0, o.opacity);\n  var h = o.h * radians;\n  return new Lab(o.l, Math.cos(h) * o.c, Math.sin(h) * o.c, o.opacity);\n}\n\ndefine(Hcl, hcl, extend(Color, {\n  brighter(k) {\n    return new Hcl(this.h, this.c, this.l + K * (k == null ? 1 : k), this.opacity);\n  },\n  darker(k) {\n    return new Hcl(this.h, this.c, this.l - K * (k == null ? 1 : k), this.opacity);\n  },\n  rgb() {\n    return hcl2lab(this).rgb();\n  }\n}));\n", "import define, {extend} from \"./define.js\";\nimport {Color, rgbConvert, Rgb, darker, brighter} from \"./color.js\";\nimport {degrees, radians} from \"./math.js\";\n\nvar A = -0.14861,\n    B = +1.78277,\n    C = -0.29227,\n    D = -0.90649,\n    E = +1.97294,\n    ED = E * D,\n    EB = E * B,\n    BC_DA = B * C - D * A;\n\nfunction cubehelixConvert(o) {\n  if (o instanceof Cubehelix) return new Cubehelix(o.h, o.s, o.l, o.opacity);\n  if (!(o instanceof Rgb)) o = rgbConvert(o);\n  var r = o.r / 255,\n      g = o.g / 255,\n      b = o.b / 255,\n      l = (BC_DA * b + ED * r - EB * g) / (BC_DA + ED - EB),\n      bl = b - l,\n      k = (E * (g - l) - C * bl) / D,\n      s = Math.sqrt(k * k + bl * bl) / (E * l * (1 - l)), // NaN if l=0 or l=1\n      h = s ? Math.atan2(k, bl) * degrees - 120 : NaN;\n  return new Cubehelix(h < 0 ? h + 360 : h, s, l, o.opacity);\n}\n\nexport default function cubehelix(h, s, l, opacity) {\n  return arguments.length === 1 ? cubehelixConvert(h) : new Cubehelix(h, s, l, opacity == null ? 1 : opacity);\n}\n\nexport function Cubehelix(h, s, l, opacity) {\n  this.h = +h;\n  this.s = +s;\n  this.l = +l;\n  this.opacity = +opacity;\n}\n\ndefine(Cubehelix, cubehelix, extend(Color, {\n  brighter(k) {\n    k = k == null ? brighter : Math.pow(brighter, k);\n    return new Cubehelix(this.h, this.s, this.l * k, this.opacity);\n  },\n  darker(k) {\n    k = k == null ? darker : Math.pow(darker, k);\n    return new Cubehelix(this.h, this.s, this.l * k, this.opacity);\n  },\n  rgb() {\n    var h = isNaN(this.h) ? 0 : (this.h + 120) * radians,\n        l = +this.l,\n        a = isNaN(this.s) ? 0 : this.s * l * (1 - l),\n        cosh = Math.cos(h),\n        sinh = Math.sin(h);\n    return new Rgb(\n      255 * (l + a * (A * cosh + B * sinh)),\n      255 * (l + a * (C * cosh + D * sinh)),\n      255 * (l + a * (E * cosh)),\n      this.opacity\n    );\n  }\n}));\n", "export function basis(t1, v0, v1, v2, v3) {\n  var t2 = t1 * t1, t3 = t2 * t1;\n  return ((1 - 3 * t1 + 3 * t2 - t3) * v0\n      + (4 - 6 * t2 + 3 * t3) * v1\n      + (1 + 3 * t1 + 3 * t2 - 3 * t3) * v2\n      + t3 * v3) / 6;\n}\n\nexport default function(values) {\n  var n = values.length - 1;\n  return function(t) {\n    var i = t <= 0 ? (t = 0) : t >= 1 ? (t = 1, n - 1) : Math.floor(t * n),\n        v1 = values[i],\n        v2 = values[i + 1],\n        v0 = i > 0 ? values[i - 1] : 2 * v1 - v2,\n        v3 = i < n - 1 ? values[i + 2] : 2 * v2 - v1;\n    return basis((t - i / n) * n, v0, v1, v2, v3);\n  };\n}\n", "import {basis} from \"./basis.js\";\n\nexport default function(values) {\n  var n = values.length;\n  return function(t) {\n    var i = Math.floor(((t %= 1) < 0 ? ++t : t) * n),\n        v0 = values[(i + n - 1) % n],\n        v1 = values[i % n],\n        v2 = values[(i + 1) % n],\n        v3 = values[(i + 2) % n];\n    return basis((t - i / n) * n, v0, v1, v2, v3);\n  };\n}\n", "export default x => () => x;\n", "import constant from \"./constant.js\";\n\nfunction linear(a, d) {\n  return function(t) {\n    return a + t * d;\n  };\n}\n\nfunction exponential(a, b, y) {\n  return a = Math.pow(a, y), b = Math.pow(b, y) - a, y = 1 / y, function(t) {\n    return Math.pow(a + t * b, y);\n  };\n}\n\nexport function hue(a, b) {\n  var d = b - a;\n  return d ? linear(a, d > 180 || d < -180 ? d - 360 * Math.round(d / 360) : d) : constant(isNaN(a) ? b : a);\n}\n\nexport function gamma(y) {\n  return (y = +y) === 1 ? nogamma : function(a, b) {\n    return b - a ? exponential(a, b, y) : constant(isNaN(a) ? b : a);\n  };\n}\n\nexport default function nogamma(a, b) {\n  var d = b - a;\n  return d ? linear(a, d) : constant(isNaN(a) ? b : a);\n}\n", "import {rgb as colorRgb} from \"d3-color\";\nimport basis from \"./basis.js\";\nimport basisClosed from \"./basisClosed.js\";\nimport nogamma, {gamma} from \"./color.js\";\n\nexport default (function rgbGamma(y) {\n  var color = gamma(y);\n\n  function rgb(start, end) {\n    var r = color((start = colorRgb(start)).r, (end = colorRgb(end)).r),\n        g = color(start.g, end.g),\n        b = color(start.b, end.b),\n        opacity = nogamma(start.opacity, end.opacity);\n    return function(t) {\n      start.r = r(t);\n      start.g = g(t);\n      start.b = b(t);\n      start.opacity = opacity(t);\n      return start + \"\";\n    };\n  }\n\n  rgb.gamma = rgbGamma;\n\n  return rgb;\n})(1);\n\nfunction rgbSpline(spline) {\n  return function(colors) {\n    var n = colors.length,\n        r = new Array(n),\n        g = new Array(n),\n        b = new Array(n),\n        i, color;\n    for (i = 0; i < n; ++i) {\n      color = colorRgb(colors[i]);\n      r[i] = color.r || 0;\n      g[i] = color.g || 0;\n      b[i] = color.b || 0;\n    }\n    r = spline(r);\n    g = spline(g);\n    b = spline(b);\n    color.opacity = 1;\n    return function(t) {\n      color.r = r(t);\n      color.g = g(t);\n      color.b = b(t);\n      return color + \"\";\n    };\n  };\n}\n\nexport var rgbBasis = rgbSpline(basis);\nexport var rgbBasisClosed = rgbSpline(basisClosed);\n", "export default function(a, b) {\n  if (!b) b = [];\n  var n = a ? Math.min(b.length, a.length) : 0,\n      c = b.slice(),\n      i;\n  return function(t) {\n    for (i = 0; i < n; ++i) c[i] = a[i] * (1 - t) + b[i] * t;\n    return c;\n  };\n}\n\nexport function isNumberArray(x) {\n  return ArrayBuffer.isView(x) && !(x instanceof DataView);\n}\n", "import value from \"./value.js\";\nimport numberArray, {isNumberArray} from \"./numberArray.js\";\n\nexport default function(a, b) {\n  return (isNumberArray(b) ? numberArray : genericArray)(a, b);\n}\n\nexport function genericArray(a, b) {\n  var nb = b ? b.length : 0,\n      na = a ? Math.min(nb, a.length) : 0,\n      x = new Array(na),\n      c = new Array(nb),\n      i;\n\n  for (i = 0; i < na; ++i) x[i] = value(a[i], b[i]);\n  for (; i < nb; ++i) c[i] = b[i];\n\n  return function(t) {\n    for (i = 0; i < na; ++i) c[i] = x[i](t);\n    return c;\n  };\n}\n", "export default function(a, b) {\n  var d = new Date;\n  return a = +a, b = +b, function(t) {\n    return d.setTime(a * (1 - t) + b * t), d;\n  };\n}\n", "export default function(a, b) {\n  return a = +a, b = +b, function(t) {\n    return a * (1 - t) + b * t;\n  };\n}\n", "import value from \"./value.js\";\n\nexport default function(a, b) {\n  var i = {},\n      c = {},\n      k;\n\n  if (a === null || typeof a !== \"object\") a = {};\n  if (b === null || typeof b !== \"object\") b = {};\n\n  for (k in b) {\n    if (k in a) {\n      i[k] = value(a[k], b[k]);\n    } else {\n      c[k] = b[k];\n    }\n  }\n\n  return function(t) {\n    for (k in i) c[k] = i[k](t);\n    return c;\n  };\n}\n", "import number from \"./number.js\";\n\nvar reA = /[-+]?(?:\\d+\\.?\\d*|\\.?\\d+)(?:[eE][-+]?\\d+)?/g,\n    reB = new RegExp(reA.source, \"g\");\n\nfunction zero(b) {\n  return function() {\n    return b;\n  };\n}\n\nfunction one(b) {\n  return function(t) {\n    return b(t) + \"\";\n  };\n}\n\nexport default function(a, b) {\n  var bi = reA.lastIndex = reB.lastIndex = 0, // scan index for next number in b\n      am, // current match in a\n      bm, // current match in b\n      bs, // string preceding current number in b, if any\n      i = -1, // index in s\n      s = [], // string constants and placeholders\n      q = []; // number interpolators\n\n  // Coerce inputs to strings.\n  a = a + \"\", b = b + \"\";\n\n  // Interpolate pairs of numbers in a & b.\n  while ((am = reA.exec(a))\n      && (bm = reB.exec(b))) {\n    if ((bs = bm.index) > bi) { // a string precedes the next number in b\n      bs = b.slice(bi, bs);\n      if (s[i]) s[i] += bs; // coalesce with previous string\n      else s[++i] = bs;\n    }\n    if ((am = am[0]) === (bm = bm[0])) { // numbers in a & b match\n      if (s[i]) s[i] += bm; // coalesce with previous string\n      else s[++i] = bm;\n    } else { // interpolate non-matching numbers\n      s[++i] = null;\n      q.push({i: i, x: number(am, bm)});\n    }\n    bi = reB.lastIndex;\n  }\n\n  // Add remains of b.\n  if (bi < b.length) {\n    bs = b.slice(bi);\n    if (s[i]) s[i] += bs; // coalesce with previous string\n    else s[++i] = bs;\n  }\n\n  // Special optimization for only a single match.\n  // Otherwise, interpolate each of the numbers and rejoin the string.\n  return s.length < 2 ? (q[0]\n      ? one(q[0].x)\n      : zero(b))\n      : (b = q.length, function(t) {\n          for (var i = 0, o; i < b; ++i) s[(o = q[i]).i] = o.x(t);\n          return s.join(\"\");\n        });\n}\n", "import {color} from \"d3-color\";\nimport rgb from \"./rgb.js\";\nimport {genericArray} from \"./array.js\";\nimport date from \"./date.js\";\nimport number from \"./number.js\";\nimport object from \"./object.js\";\nimport string from \"./string.js\";\nimport constant from \"./constant.js\";\nimport numberArray, {isNumberArray} from \"./numberArray.js\";\n\nexport default function(a, b) {\n  var t = typeof b, c;\n  return b == null || t === \"boolean\" ? constant(b)\n      : (t === \"number\" ? number\n      : t === \"string\" ? ((c = color(b)) ? (b = c, rgb) : string)\n      : b instanceof color ? rgb\n      : b instanceof Date ? date\n      : isNumberArray(b) ? numberArray\n      : Array.isArray(b) ? genericArray\n      : typeof b.valueOf !== \"function\" && typeof b.toString !== \"function\" || isNaN(b) ? object\n      : number)(a, b);\n}\n", "export default function(a, b) {\n  return a = +a, b = +b, function(t) {\n    return Math.round(a * (1 - t) + b * t);\n  };\n}\n", "var degrees = 180 / Math.PI;\n\nexport var identity = {\n  translateX: 0,\n  translateY: 0,\n  rotate: 0,\n  skewX: 0,\n  scaleX: 1,\n  scaleY: 1\n};\n\nexport default function(a, b, c, d, e, f) {\n  var scaleX, scaleY, skewX;\n  if (scaleX = Math.sqrt(a * a + b * b)) a /= scaleX, b /= scaleX;\n  if (skewX = a * c + b * d) c -= a * skewX, d -= b * skewX;\n  if (scaleY = Math.sqrt(c * c + d * d)) c /= scaleY, d /= scaleY, skewX /= scaleY;\n  if (a * d < b * c) a = -a, b = -b, skewX = -skewX, scaleX = -scaleX;\n  return {\n    translateX: e,\n    translateY: f,\n    rotate: Math.atan2(b, a) * degrees,\n    skewX: Math.atan(skewX) * degrees,\n    scaleX: scaleX,\n    scaleY: scaleY\n  };\n}\n", "import decompose, {identity} from \"./decompose.js\";\n\nvar svgNode;\n\n/* eslint-disable no-undef */\nexport function parseCss(value) {\n  const m = new (typeof DOMMatrix === \"function\" ? DOMMatrix : WebKitCSSMatrix)(value + \"\");\n  return m.isIdentity ? identity : decompose(m.a, m.b, m.c, m.d, m.e, m.f);\n}\n\nexport function parseSvg(value) {\n  if (value == null) return identity;\n  if (!svgNode) svgNode = document.createElementNS(\"http://www.w3.org/2000/svg\", \"g\");\n  svgNode.setAttribute(\"transform\", value);\n  if (!(value = svgNode.transform.baseVal.consolidate())) return identity;\n  value = value.matrix;\n  return decompose(value.a, value.b, value.c, value.d, value.e, value.f);\n}\n", "import number from \"../number.js\";\nimport {parseCss, parseSvg} from \"./parse.js\";\n\nfunction interpolateTransform(parse, pxComma, pxParen, degParen) {\n\n  function pop(s) {\n    return s.length ? s.pop() + \" \" : \"\";\n  }\n\n  function translate(xa, ya, xb, yb, s, q) {\n    if (xa !== xb || ya !== yb) {\n      var i = s.push(\"translate(\", null, pxComma, null, pxParen);\n      q.push({i: i - 4, x: number(xa, xb)}, {i: i - 2, x: number(ya, yb)});\n    } else if (xb || yb) {\n      s.push(\"translate(\" + xb + pxComma + yb + pxParen);\n    }\n  }\n\n  function rotate(a, b, s, q) {\n    if (a !== b) {\n      if (a - b > 180) b += 360; else if (b - a > 180) a += 360; // shortest path\n      q.push({i: s.push(pop(s) + \"rotate(\", null, degParen) - 2, x: number(a, b)});\n    } else if (b) {\n      s.push(pop(s) + \"rotate(\" + b + degParen);\n    }\n  }\n\n  function skewX(a, b, s, q) {\n    if (a !== b) {\n      q.push({i: s.push(pop(s) + \"skewX(\", null, degParen) - 2, x: number(a, b)});\n    } else if (b) {\n      s.push(pop(s) + \"skewX(\" + b + degParen);\n    }\n  }\n\n  function scale(xa, ya, xb, yb, s, q) {\n    if (xa !== xb || ya !== yb) {\n      var i = s.push(pop(s) + \"scale(\", null, \",\", null, \")\");\n      q.push({i: i - 4, x: number(xa, xb)}, {i: i - 2, x: number(ya, yb)});\n    } else if (xb !== 1 || yb !== 1) {\n      s.push(pop(s) + \"scale(\" + xb + \",\" + yb + \")\");\n    }\n  }\n\n  return function(a, b) {\n    var s = [], // string constants and placeholders\n        q = []; // number interpolators\n    a = parse(a), b = parse(b);\n    translate(a.translateX, a.translateY, b.translateX, b.translateY, s, q);\n    rotate(a.rotate, b.rotate, s, q);\n    skewX(a.skewX, b.skewX, s, q);\n    scale(a.scaleX, a.scaleY, b.scaleX, b.scaleY, s, q);\n    a = b = null; // gc\n    return function(t) {\n      var i = -1, n = q.length, o;\n      while (++i < n) s[(o = q[i]).i] = o.x(t);\n      return s.join(\"\");\n    };\n  };\n}\n\nexport var interpolateTransformCss = interpolateTransform(parseCss, \"px, \", \"px)\", \"deg)\");\nexport var interpolateTransformSvg = interpolateTransform(parseSvg, \", \", \")\", \")\");\n", "import {hsl as colorHsl} from \"d3-color\";\nimport color, {hue} from \"./color.js\";\n\nfunction hsl(hue) {\n  return function(start, end) {\n    var h = hue((start = colorHsl(start)).h, (end = colorHsl(end)).h),\n        s = color(start.s, end.s),\n        l = color(start.l, end.l),\n        opacity = color(start.opacity, end.opacity);\n    return function(t) {\n      start.h = h(t);\n      start.s = s(t);\n      start.l = l(t);\n      start.opacity = opacity(t);\n      return start + \"\";\n    };\n  }\n}\n\nexport default hsl(hue);\nexport var hslLong = hsl(color);\n", "import {lab as colorLab} from \"d3-color\";\nimport color from \"./color.js\";\n\nexport default function lab(start, end) {\n  var l = color((start = colorLab(start)).l, (end = colorLab(end)).l),\n      a = color(start.a, end.a),\n      b = color(start.b, end.b),\n      opacity = color(start.opacity, end.opacity);\n  return function(t) {\n    start.l = l(t);\n    start.a = a(t);\n    start.b = b(t);\n    start.opacity = opacity(t);\n    return start + \"\";\n  };\n}\n", "import {hcl as colorHcl} from \"d3-color\";\nimport color, {hue} from \"./color.js\";\n\nfunction hcl(hue) {\n  return function(start, end) {\n    var h = hue((start = colorHcl(start)).h, (end = colorHcl(end)).h),\n        c = color(start.c, end.c),\n        l = color(start.l, end.l),\n        opacity = color(start.opacity, end.opacity);\n    return function(t) {\n      start.h = h(t);\n      start.c = c(t);\n      start.l = l(t);\n      start.opacity = opacity(t);\n      return start + \"\";\n    };\n  }\n}\n\nexport default hcl(hue);\nexport var hclLong = hcl(color);\n", "import {cubehelix as colorCubehelix} from \"d3-color\";\nimport color, {hue} from \"./color.js\";\n\nfunction cubehelix(hue) {\n  return (function cubehelixGamma(y) {\n    y = +y;\n\n    function cubehelix(start, end) {\n      var h = hue((start = colorCubehelix(start)).h, (end = colorCubehelix(end)).h),\n          s = color(start.s, end.s),\n          l = color(start.l, end.l),\n          opacity = color(start.opacity, end.opacity);\n      return function(t) {\n        start.h = h(t);\n        start.s = s(t);\n        start.l = l(Math.pow(t, y));\n        start.opacity = opacity(t);\n        return start + \"\";\n      };\n    }\n\n    cubehelix.gamma = cubehelixGamma;\n\n    return cubehelix;\n  })(1);\n}\n\nexport default cubehelix(hue);\nexport var cubehelixLong = cubehelix(color);\n", "import {default as value} from \"./value.js\";\n\nexport default function piecewise(interpolate, values) {\n  if (values === undefined) values = interpolate, interpolate = value;\n  var i = 0, n = values.length - 1, v = values[0], I = new Array(n < 0 ? 0 : n);\n  while (i < n) I[i] = interpolate(v, v = values[++i]);\n  return function(t) {\n    var i = Math.max(0, Math.min(n - 1, Math.floor(t *= n)));\n    return I[i](t - i);\n  };\n}\n", "export default function(interpolator, n) {\n  var samples = new Array(n);\n  for (var i = 0; i < n; ++i) samples[i] = interpolator(i / (n - 1));\n  return samples;\n}\n", "var frame = 0, // is an animation frame pending?\n    timeout = 0, // is a timeout pending?\n    interval = 0, // are any timers active?\n    pokeDelay = 1000, // how frequently we check for clock skew\n    taskHead,\n    taskTail,\n    clockLast = 0,\n    clockNow = 0,\n    clockSkew = 0,\n    clock = typeof performance === \"object\" && performance.now ? performance : Date,\n    setFrame = typeof window === \"object\" && window.requestAnimationFrame ? window.requestAnimationFrame.bind(window) : function(f) { setTimeout(f, 17); };\n\nexport function now() {\n  return clockNow || (setFrame(clearNow), clockNow = clock.now() + clockSkew);\n}\n\nfunction clearNow() {\n  clockNow = 0;\n}\n\nexport function Timer() {\n  this._call =\n  this._time =\n  this._next = null;\n}\n\nTimer.prototype = timer.prototype = {\n  constructor: Timer,\n  restart: function(callback, delay, time) {\n    if (typeof callback !== \"function\") throw new TypeError(\"callback is not a function\");\n    time = (time == null ? now() : +time) + (delay == null ? 0 : +delay);\n    if (!this._next && taskTail !== this) {\n      if (taskTail) taskTail._next = this;\n      else taskHead = this;\n      taskTail = this;\n    }\n    this._call = callback;\n    this._time = time;\n    sleep();\n  },\n  stop: function() {\n    if (this._call) {\n      this._call = null;\n      this._time = Infinity;\n      sleep();\n    }\n  }\n};\n\nexport function timer(callback, delay, time) {\n  var t = new Timer;\n  t.restart(callback, delay, time);\n  return t;\n}\n\nexport function timerFlush() {\n  now(); // Get the current time, if not already set.\n  ++frame; // Pretend we\u2019ve set an alarm, if we haven\u2019t already.\n  var t = taskHead, e;\n  while (t) {\n    if ((e = clockNow - t._time) >= 0) t._call.call(undefined, e);\n    t = t._next;\n  }\n  --frame;\n}\n\nfunction wake() {\n  clockNow = (clockLast = clock.now()) + clockSkew;\n  frame = timeout = 0;\n  try {\n    timerFlush();\n  } finally {\n    frame = 0;\n    nap();\n    clockNow = 0;\n  }\n}\n\nfunction poke() {\n  var now = clock.now(), delay = now - clockLast;\n  if (delay > pokeDelay) clockSkew -= delay, clockLast = now;\n}\n\nfunction nap() {\n  var t0, t1 = taskHead, t2, time = Infinity;\n  while (t1) {\n    if (t1._call) {\n      if (time > t1._time) time = t1._time;\n      t0 = t1, t1 = t1._next;\n    } else {\n      t2 = t1._next, t1._next = null;\n      t1 = t0 ? t0._next = t2 : taskHead = t2;\n    }\n  }\n  taskTail = t0;\n  sleep(time);\n}\n\nfunction sleep(time) {\n  if (frame) return; // Soonest alarm already set, or will be.\n  if (timeout) timeout = clearTimeout(timeout);\n  var delay = time - clockNow; // Strictly less than if we recomputed clockNow.\n  if (delay > 24) {\n    if (time < Infinity) timeout = setTimeout(wake, time - clock.now() - clockSkew);\n    if (interval) interval = clearInterval(interval);\n  } else {\n    if (!interval) clockLast = clock.now(), interval = setInterval(poke, pokeDelay);\n    frame = 1, setFrame(wake);\n  }\n}\n", "import {Timer} from \"./timer.js\";\n\nexport default function(callback, delay, time) {\n  var t = new Timer;\n  delay = delay == null ? 0 : +delay;\n  t.restart(elapsed => {\n    t.stop();\n    callback(elapsed + delay);\n  }, delay, time);\n  return t;\n}\n", "import {dispatch} from \"d3-dispatch\";\nimport {timer, timeout} from \"d3-timer\";\n\nvar emptyOn = dispatch(\"start\", \"end\", \"cancel\", \"interrupt\");\nvar emptyTween = [];\n\nexport var CREATED = 0;\nexport var SCHEDULED = 1;\nexport var STARTING = 2;\nexport var STARTED = 3;\nexport var RUNNING = 4;\nexport var ENDING = 5;\nexport var ENDED = 6;\n\nexport default function(node, name, id, index, group, timing) {\n  var schedules = node.__transition;\n  if (!schedules) node.__transition = {};\n  else if (id in schedules) return;\n  create(node, id, {\n    name: name,\n    index: index, // For context during callback.\n    group: group, // For context during callback.\n    on: emptyOn,\n    tween: emptyTween,\n    time: timing.time,\n    delay: timing.delay,\n    duration: timing.duration,\n    ease: timing.ease,\n    timer: null,\n    state: CREATED\n  });\n}\n\nexport function init(node, id) {\n  var schedule = get(node, id);\n  if (schedule.state > CREATED) throw new Error(\"too late; already scheduled\");\n  return schedule;\n}\n\nexport function set(node, id) {\n  var schedule = get(node, id);\n  if (schedule.state > STARTED) throw new Error(\"too late; already running\");\n  return schedule;\n}\n\nexport function get(node, id) {\n  var schedule = node.__transition;\n  if (!schedule || !(schedule = schedule[id])) throw new Error(\"transition not found\");\n  return schedule;\n}\n\nfunction create(node, id, self) {\n  var schedules = node.__transition,\n      tween;\n\n  // Initialize the self timer when the transition is created.\n  // Note the actual delay is not known until the first callback!\n  schedules[id] = self;\n  self.timer = timer(schedule, 0, self.time);\n\n  function schedule(elapsed) {\n    self.state = SCHEDULED;\n    self.timer.restart(start, self.delay, self.time);\n\n    // If the elapsed delay is less than our first sleep, start immediately.\n    if (self.delay <= elapsed) start(elapsed - self.delay);\n  }\n\n  function start(elapsed) {\n    var i, j, n, o;\n\n    // If the state is not SCHEDULED, then we previously errored on start.\n    if (self.state !== SCHEDULED) return stop();\n\n    for (i in schedules) {\n      o = schedules[i];\n      if (o.name !== self.name) continue;\n\n      // While this element already has a starting transition during this frame,\n      // defer starting an interrupting transition until that transition has a\n      // chance to tick (and possibly end); see d3/d3-transition#54!\n      if (o.state === STARTED) return timeout(start);\n\n      // Interrupt the active transition, if any.\n      if (o.state === RUNNING) {\n        o.state = ENDED;\n        o.timer.stop();\n        o.on.call(\"interrupt\", node, node.__data__, o.index, o.group);\n        delete schedules[i];\n      }\n\n      // Cancel any pre-empted transitions.\n      else if (+i < id) {\n        o.state = ENDED;\n        o.timer.stop();\n        o.on.call(\"cancel\", node, node.__data__, o.index, o.group);\n        delete schedules[i];\n      }\n    }\n\n    // Defer the first tick to end of the current frame; see d3/d3#1576.\n    // Note the transition may be canceled after start and before the first tick!\n    // Note this must be scheduled before the start event; see d3/d3-transition#16!\n    // Assuming this is successful, subsequent callbacks go straight to tick.\n    timeout(function() {\n      if (self.state === STARTED) {\n        self.state = RUNNING;\n        self.timer.restart(tick, self.delay, self.time);\n        tick(elapsed);\n      }\n    });\n\n    // Dispatch the start event.\n    // Note this must be done before the tween are initialized.\n    self.state = STARTING;\n    self.on.call(\"start\", node, node.__data__, self.index, self.group);\n    if (self.state !== STARTING) return; // interrupted\n    self.state = STARTED;\n\n    // Initialize the tween, deleting null tween.\n    tween = new Array(n = self.tween.length);\n    for (i = 0, j = -1; i < n; ++i) {\n      if (o = self.tween[i].value.call(node, node.__data__, self.index, self.group)) {\n        tween[++j] = o;\n      }\n    }\n    tween.length = j + 1;\n  }\n\n  function tick(elapsed) {\n    var t = elapsed < self.duration ? self.ease.call(null, elapsed / self.duration) : (self.timer.restart(stop), self.state = ENDING, 1),\n        i = -1,\n        n = tween.length;\n\n    while (++i < n) {\n      tween[i].call(node, t);\n    }\n\n    // Dispatch the end event.\n    if (self.state === ENDING) {\n      self.on.call(\"end\", node, node.__data__, self.index, self.group);\n      stop();\n    }\n  }\n\n  function stop() {\n    self.state = ENDED;\n    self.timer.stop();\n    delete schedules[id];\n    for (var i in schedules) return; // eslint-disable-line no-unused-vars\n    delete node.__transition;\n  }\n}\n", "import {STARTING, ENDING, ENDED} from \"./transition/schedule.js\";\n\nexport default function(node, name) {\n  var schedules = node.__transition,\n      schedule,\n      active,\n      empty = true,\n      i;\n\n  if (!schedules) return;\n\n  name = name == null ? null : name + \"\";\n\n  for (i in schedules) {\n    if ((schedule = schedules[i]).name !== name) { empty = false; continue; }\n    active = schedule.state > STARTING && schedule.state < ENDING;\n    schedule.state = ENDED;\n    schedule.timer.stop();\n    schedule.on.call(active ? \"interrupt\" : \"cancel\", node, node.__data__, schedule.index, schedule.group);\n    delete schedules[i];\n  }\n\n  if (empty) delete node.__transition;\n}\n", "import interrupt from \"../interrupt.js\";\n\nexport default function(name) {\n  return this.each(function() {\n    interrupt(this, name);\n  });\n}\n", "import {get, set} from \"./schedule.js\";\n\nfunction tweenRemove(id, name) {\n  var tween0, tween1;\n  return function() {\n    var schedule = set(this, id),\n        tween = schedule.tween;\n\n    // If this node shared tween with the previous node,\n    // just assign the updated shared tween and we\u2019re done!\n    // Otherwise, copy-on-write.\n    if (tween !== tween0) {\n      tween1 = tween0 = tween;\n      for (var i = 0, n = tween1.length; i < n; ++i) {\n        if (tween1[i].name === name) {\n          tween1 = tween1.slice();\n          tween1.splice(i, 1);\n          break;\n        }\n      }\n    }\n\n    schedule.tween = tween1;\n  };\n}\n\nfunction tweenFunction(id, name, value) {\n  var tween0, tween1;\n  if (typeof value !== \"function\") throw new Error;\n  return function() {\n    var schedule = set(this, id),\n        tween = schedule.tween;\n\n    // If this node shared tween with the previous node,\n    // just assign the updated shared tween and we\u2019re done!\n    // Otherwise, copy-on-write.\n    if (tween !== tween0) {\n      tween1 = (tween0 = tween).slice();\n      for (var t = {name: name, value: value}, i = 0, n = tween1.length; i < n; ++i) {\n        if (tween1[i].name === name) {\n          tween1[i] = t;\n          break;\n        }\n      }\n      if (i === n) tween1.push(t);\n    }\n\n    schedule.tween = tween1;\n  };\n}\n\nexport default function(name, value) {\n  var id = this._id;\n\n  name += \"\";\n\n  if (arguments.length < 2) {\n    var tween = get(this.node(), id).tween;\n    for (var i = 0, n = tween.length, t; i < n; ++i) {\n      if ((t = tween[i]).name === name) {\n        return t.value;\n      }\n    }\n    return null;\n  }\n\n  return this.each((value == null ? tweenRemove : tweenFunction)(id, name, value));\n}\n\nexport function tweenValue(transition, name, value) {\n  var id = transition._id;\n\n  transition.each(function() {\n    var schedule = set(this, id);\n    (schedule.value || (schedule.value = {}))[name] = value.apply(this, arguments);\n  });\n\n  return function(node) {\n    return get(node, id).value[name];\n  };\n}\n", "import {color} from \"d3-color\";\nimport {interpolateNumber, interpolateRgb, interpolateString} from \"d3-interpolate\";\n\nexport default function(a, b) {\n  var c;\n  return (typeof b === \"number\" ? interpolateNumber\n      : b instanceof color ? interpolateRgb\n      : (c = color(b)) ? (b = c, interpolateRgb)\n      : interpolateString)(a, b);\n}\n", "import {interpolateTransformSvg as interpolateTransform} from \"d3-interpolate\";\nimport {namespace} from \"d3-selection\";\nimport {tweenValue} from \"./tween.js\";\nimport interpolate from \"./interpolate.js\";\n\nfunction attrRemove(name) {\n  return function() {\n    this.removeAttribute(name);\n  };\n}\n\nfunction attrRemoveNS(fullname) {\n  return function() {\n    this.removeAttributeNS(fullname.space, fullname.local);\n  };\n}\n\nfunction attrConstant(name, interpolate, value1) {\n  var string00,\n      string1 = value1 + \"\",\n      interpolate0;\n  return function() {\n    var string0 = this.getAttribute(name);\n    return string0 === string1 ? null\n        : string0 === string00 ? interpolate0\n        : interpolate0 = interpolate(string00 = string0, value1);\n  };\n}\n\nfunction attrConstantNS(fullname, interpolate, value1) {\n  var string00,\n      string1 = value1 + \"\",\n      interpolate0;\n  return function() {\n    var string0 = this.getAttributeNS(fullname.space, fullname.local);\n    return string0 === string1 ? null\n        : string0 === string00 ? interpolate0\n        : interpolate0 = interpolate(string00 = string0, value1);\n  };\n}\n\nfunction attrFunction(name, interpolate, value) {\n  var string00,\n      string10,\n      interpolate0;\n  return function() {\n    var string0, value1 = value(this), string1;\n    if (value1 == null) return void this.removeAttribute(name);\n    string0 = this.getAttribute(name);\n    string1 = value1 + \"\";\n    return string0 === string1 ? null\n        : string0 === string00 && string1 === string10 ? interpolate0\n        : (string10 = string1, interpolate0 = interpolate(string00 = string0, value1));\n  };\n}\n\nfunction attrFunctionNS(fullname, interpolate, value) {\n  var string00,\n      string10,\n      interpolate0;\n  return function() {\n    var string0, value1 = value(this), string1;\n    if (value1 == null) return void this.removeAttributeNS(fullname.space, fullname.local);\n    string0 = this.getAttributeNS(fullname.space, fullname.local);\n    string1 = value1 + \"\";\n    return string0 === string1 ? null\n        : string0 === string00 && string1 === string10 ? interpolate0\n        : (string10 = string1, interpolate0 = interpolate(string00 = string0, value1));\n  };\n}\n\nexport default function(name, value) {\n  var fullname = namespace(name), i = fullname === \"transform\" ? interpolateTransform : interpolate;\n  return this.attrTween(name, typeof value === \"function\"\n      ? (fullname.local ? attrFunctionNS : attrFunction)(fullname, i, tweenValue(this, \"attr.\" + name, value))\n      : value == null ? (fullname.local ? attrRemoveNS : attrRemove)(fullname)\n      : (fullname.local ? attrConstantNS : attrConstant)(fullname, i, value));\n}\n", "import {namespace} from \"d3-selection\";\n\nfunction attrInterpolate(name, i) {\n  return function(t) {\n    this.setAttribute(name, i.call(this, t));\n  };\n}\n\nfunction attrInterpolateNS(fullname, i) {\n  return function(t) {\n    this.setAttributeNS(fullname.space, fullname.local, i.call(this, t));\n  };\n}\n\nfunction attrTweenNS(fullname, value) {\n  var t0, i0;\n  function tween() {\n    var i = value.apply(this, arguments);\n    if (i !== i0) t0 = (i0 = i) && attrInterpolateNS(fullname, i);\n    return t0;\n  }\n  tween._value = value;\n  return tween;\n}\n\nfunction attrTween(name, value) {\n  var t0, i0;\n  function tween() {\n    var i = value.apply(this, arguments);\n    if (i !== i0) t0 = (i0 = i) && attrInterpolate(name, i);\n    return t0;\n  }\n  tween._value = value;\n  return tween;\n}\n\nexport default function(name, value) {\n  var key = \"attr.\" + name;\n  if (arguments.length < 2) return (key = this.tween(key)) && key._value;\n  if (value == null) return this.tween(key, null);\n  if (typeof value !== \"function\") throw new Error;\n  var fullname = namespace(name);\n  return this.tween(key, (fullname.local ? attrTweenNS : attrTween)(fullname, value));\n}\n", "import {get, init} from \"./schedule.js\";\n\nfunction delayFunction(id, value) {\n  return function() {\n    init(this, id).delay = +value.apply(this, arguments);\n  };\n}\n\nfunction delayConstant(id, value) {\n  return value = +value, function() {\n    init(this, id).delay = value;\n  };\n}\n\nexport default function(value) {\n  var id = this._id;\n\n  return arguments.length\n      ? this.each((typeof value === \"function\"\n          ? delayFunction\n          : delayConstant)(id, value))\n      : get(this.node(), id).delay;\n}\n", "import {get, set} from \"./schedule.js\";\n\nfunction durationFunction(id, value) {\n  return function() {\n    set(this, id).duration = +value.apply(this, arguments);\n  };\n}\n\nfunction durationConstant(id, value) {\n  return value = +value, function() {\n    set(this, id).duration = value;\n  };\n}\n\nexport default function(value) {\n  var id = this._id;\n\n  return arguments.length\n      ? this.each((typeof value === \"function\"\n          ? durationFunction\n          : durationConstant)(id, value))\n      : get(this.node(), id).duration;\n}\n", "import {get, set} from \"./schedule.js\";\n\nfunction easeConstant(id, value) {\n  if (typeof value !== \"function\") throw new Error;\n  return function() {\n    set(this, id).ease = value;\n  };\n}\n\nexport default function(value) {\n  var id = this._id;\n\n  return arguments.length\n      ? this.each(easeConstant(id, value))\n      : get(this.node(), id).ease;\n}\n", "import {set} from \"./schedule.js\";\n\nfunction easeVarying(id, value) {\n  return function() {\n    var v = value.apply(this, arguments);\n    if (typeof v !== \"function\") throw new Error;\n    set(this, id).ease = v;\n  };\n}\n\nexport default function(value) {\n  if (typeof value !== \"function\") throw new Error;\n  return this.each(easeVarying(this._id, value));\n}\n", "import {matcher} from \"d3-selection\";\nimport {Transition} from \"./index.js\";\n\nexport default function(match) {\n  if (typeof match !== \"function\") match = matcher(match);\n\n  for (var groups = this._groups, m = groups.length, subgroups = new Array(m), j = 0; j < m; ++j) {\n    for (var group = groups[j], n = group.length, subgroup = subgroups[j] = [], node, i = 0; i < n; ++i) {\n      if ((node = group[i]) && match.call(node, node.__data__, i, group)) {\n        subgroup.push(node);\n      }\n    }\n  }\n\n  return new Transition(subgroups, this._parents, this._name, this._id);\n}\n", "import {Transition} from \"./index.js\";\n\nexport default function(transition) {\n  if (transition._id !== this._id) throw new Error;\n\n  for (var groups0 = this._groups, groups1 = transition._groups, m0 = groups0.length, m1 = groups1.length, m = Math.min(m0, m1), merges = new Array(m0), j = 0; j < m; ++j) {\n    for (var group0 = groups0[j], group1 = groups1[j], n = group0.length, merge = merges[j] = new Array(n), node, i = 0; i < n; ++i) {\n      if (node = group0[i] || group1[i]) {\n        merge[i] = node;\n      }\n    }\n  }\n\n  for (; j < m0; ++j) {\n    merges[j] = groups0[j];\n  }\n\n  return new Transition(merges, this._parents, this._name, this._id);\n}\n", "import {get, set, init} from \"./schedule.js\";\n\nfunction start(name) {\n  return (name + \"\").trim().split(/^|\\s+/).every(function(t) {\n    var i = t.indexOf(\".\");\n    if (i >= 0) t = t.slice(0, i);\n    return !t || t === \"start\";\n  });\n}\n\nfunction onFunction(id, name, listener) {\n  var on0, on1, sit = start(name) ? init : set;\n  return function() {\n    var schedule = sit(this, id),\n        on = schedule.on;\n\n    // If this node shared a dispatch with the previous node,\n    // just assign the updated shared dispatch and we\u2019re done!\n    // Otherwise, copy-on-write.\n    if (on !== on0) (on1 = (on0 = on).copy()).on(name, listener);\n\n    schedule.on = on1;\n  };\n}\n\nexport default function(name, listener) {\n  var id = this._id;\n\n  return arguments.length < 2\n      ? get(this.node(), id).on.on(name)\n      : this.each(onFunction(id, name, listener));\n}\n", "function removeFunction(id) {\n  return function() {\n    var parent = this.parentNode;\n    for (var i in this.__transition) if (+i !== id) return;\n    if (parent) parent.removeChild(this);\n  };\n}\n\nexport default function() {\n  return this.on(\"end.remove\", removeFunction(this._id));\n}\n", "import {selector} from \"d3-selection\";\nimport {Transition} from \"./index.js\";\nimport schedule, {get} from \"./schedule.js\";\n\nexport default function(select) {\n  var name = this._name,\n      id = this._id;\n\n  if (typeof select !== \"function\") select = selector(select);\n\n  for (var groups = this._groups, m = groups.length, subgroups = new Array(m), j = 0; j < m; ++j) {\n    for (var group = groups[j], n = group.length, subgroup = subgroups[j] = new Array(n), node, subnode, i = 0; i < n; ++i) {\n      if ((node = group[i]) && (subnode = select.call(node, node.__data__, i, group))) {\n        if (\"__data__\" in node) subnode.__data__ = node.__data__;\n        subgroup[i] = subnode;\n        schedule(subgroup[i], name, id, i, subgroup, get(node, id));\n      }\n    }\n  }\n\n  return new Transition(subgroups, this._parents, name, id);\n}\n", "import {selectorAll} from \"d3-selection\";\nimport {Transition} from \"./index.js\";\nimport schedule, {get} from \"./schedule.js\";\n\nexport default function(select) {\n  var name = this._name,\n      id = this._id;\n\n  if (typeof select !== \"function\") select = selectorAll(select);\n\n  for (var groups = this._groups, m = groups.length, subgroups = [], parents = [], j = 0; j < m; ++j) {\n    for (var group = groups[j], n = group.length, node, i = 0; i < n; ++i) {\n      if (node = group[i]) {\n        for (var children = select.call(node, node.__data__, i, group), child, inherit = get(node, id), k = 0, l = children.length; k < l; ++k) {\n          if (child = children[k]) {\n            schedule(child, name, id, k, children, inherit);\n          }\n        }\n        subgroups.push(children);\n        parents.push(node);\n      }\n    }\n  }\n\n  return new Transition(subgroups, parents, name, id);\n}\n", "import {selection} from \"d3-selection\";\n\nvar Selection = selection.prototype.constructor;\n\nexport default function() {\n  return new Selection(this._groups, this._parents);\n}\n", "import {interpolateTransformCss as interpolateTransform} from \"d3-interpolate\";\nimport {style} from \"d3-selection\";\nimport {set} from \"./schedule.js\";\nimport {tweenValue} from \"./tween.js\";\nimport interpolate from \"./interpolate.js\";\n\nfunction styleNull(name, interpolate) {\n  var string00,\n      string10,\n      interpolate0;\n  return function() {\n    var string0 = style(this, name),\n        string1 = (this.style.removeProperty(name), style(this, name));\n    return string0 === string1 ? null\n        : string0 === string00 && string1 === string10 ? interpolate0\n        : interpolate0 = interpolate(string00 = string0, string10 = string1);\n  };\n}\n\nfunction styleRemove(name) {\n  return function() {\n    this.style.removeProperty(name);\n  };\n}\n\nfunction styleConstant(name, interpolate, value1) {\n  var string00,\n      string1 = value1 + \"\",\n      interpolate0;\n  return function() {\n    var string0 = style(this, name);\n    return string0 === string1 ? null\n        : string0 === string00 ? interpolate0\n        : interpolate0 = interpolate(string00 = string0, value1);\n  };\n}\n\nfunction styleFunction(name, interpolate, value) {\n  var string00,\n      string10,\n      interpolate0;\n  return function() {\n    var string0 = style(this, name),\n        value1 = value(this),\n        string1 = value1 + \"\";\n    if (value1 == null) string1 = value1 = (this.style.removeProperty(name), style(this, name));\n    return string0 === string1 ? null\n        : string0 === string00 && string1 === string10 ? interpolate0\n        : (string10 = string1, interpolate0 = interpolate(string00 = string0, value1));\n  };\n}\n\nfunction styleMaybeRemove(id, name) {\n  var on0, on1, listener0, key = \"style.\" + name, event = \"end.\" + key, remove;\n  return function() {\n    var schedule = set(this, id),\n        on = schedule.on,\n        listener = schedule.value[key] == null ? remove || (remove = styleRemove(name)) : undefined;\n\n    // If this node shared a dispatch with the previous node,\n    // just assign the updated shared dispatch and we\u2019re done!\n    // Otherwise, copy-on-write.\n    if (on !== on0 || listener0 !== listener) (on1 = (on0 = on).copy()).on(event, listener0 = listener);\n\n    schedule.on = on1;\n  };\n}\n\nexport default function(name, value, priority) {\n  var i = (name += \"\") === \"transform\" ? interpolateTransform : interpolate;\n  return value == null ? this\n      .styleTween(name, styleNull(name, i))\n      .on(\"end.style.\" + name, styleRemove(name))\n    : typeof value === \"function\" ? this\n      .styleTween(name, styleFunction(name, i, tweenValue(this, \"style.\" + name, value)))\n      .each(styleMaybeRemove(this._id, name))\n    : this\n      .styleTween(name, styleConstant(name, i, value), priority)\n      .on(\"end.style.\" + name, null);\n}\n", "function styleInterpolate(name, i, priority) {\n  return function(t) {\n    this.style.setProperty(name, i.call(this, t), priority);\n  };\n}\n\nfunction styleTween(name, value, priority) {\n  var t, i0;\n  function tween() {\n    var i = value.apply(this, arguments);\n    if (i !== i0) t = (i0 = i) && styleInterpolate(name, i, priority);\n    return t;\n  }\n  tween._value = value;\n  return tween;\n}\n\nexport default function(name, value, priority) {\n  var key = \"style.\" + (name += \"\");\n  if (arguments.length < 2) return (key = this.tween(key)) && key._value;\n  if (value == null) return this.tween(key, null);\n  if (typeof value !== \"function\") throw new Error;\n  return this.tween(key, styleTween(name, value, priority == null ? \"\" : priority));\n}\n", "import {tweenValue} from \"./tween.js\";\n\nfunction textConstant(value) {\n  return function() {\n    this.textContent = value;\n  };\n}\n\nfunction textFunction(value) {\n  return function() {\n    var value1 = value(this);\n    this.textContent = value1 == null ? \"\" : value1;\n  };\n}\n\nexport default function(value) {\n  return this.tween(\"text\", typeof value === \"function\"\n      ? textFunction(tweenValue(this, \"text\", value))\n      : textConstant(value == null ? \"\" : value + \"\"));\n}\n", "function textInterpolate(i) {\n  return function(t) {\n    this.textContent = i.call(this, t);\n  };\n}\n\nfunction textTween(value) {\n  var t0, i0;\n  function tween() {\n    var i = value.apply(this, arguments);\n    if (i !== i0) t0 = (i0 = i) && textInterpolate(i);\n    return t0;\n  }\n  tween._value = value;\n  return tween;\n}\n\nexport default function(value) {\n  var key = \"text\";\n  if (arguments.length < 1) return (key = this.tween(key)) && key._value;\n  if (value == null) return this.tween(key, null);\n  if (typeof value !== \"function\") throw new Error;\n  return this.tween(key, textTween(value));\n}\n", "import {Transition, newId} from \"./index.js\";\nimport schedule, {get} from \"./schedule.js\";\n\nexport default function() {\n  var name = this._name,\n      id0 = this._id,\n      id1 = newId();\n\n  for (var groups = this._groups, m = groups.length, j = 0; j < m; ++j) {\n    for (var group = groups[j], n = group.length, node, i = 0; i < n; ++i) {\n      if (node = group[i]) {\n        var inherit = get(node, id0);\n        schedule(node, name, id1, i, group, {\n          time: inherit.time + inherit.delay + inherit.duration,\n          delay: 0,\n          duration: inherit.duration,\n          ease: inherit.ease\n        });\n      }\n    }\n  }\n\n  return new Transition(groups, this._parents, name, id1);\n}\n", "import {set} from \"./schedule.js\";\n\nexport default function() {\n  var on0, on1, that = this, id = that._id, size = that.size();\n  return new Promise(function(resolve, reject) {\n    var cancel = {value: reject},\n        end = {value: function() { if (--size === 0) resolve(); }};\n\n    that.each(function() {\n      var schedule = set(this, id),\n          on = schedule.on;\n\n      // If this node shared a dispatch with the previous node,\n      // just assign the updated shared dispatch and we\u2019re done!\n      // Otherwise, copy-on-write.\n      if (on !== on0) {\n        on1 = (on0 = on).copy();\n        on1._.cancel.push(cancel);\n        on1._.interrupt.push(cancel);\n        on1._.end.push(end);\n      }\n\n      schedule.on = on1;\n    });\n\n    // The selection was empty, resolve end immediately\n    if (size === 0) resolve();\n  });\n}\n", "import {selection} from \"d3-selection\";\nimport transition_attr from \"./attr.js\";\nimport transition_attrTween from \"./attrTween.js\";\nimport transition_delay from \"./delay.js\";\nimport transition_duration from \"./duration.js\";\nimport transition_ease from \"./ease.js\";\nimport transition_easeVarying from \"./easeVarying.js\";\nimport transition_filter from \"./filter.js\";\nimport transition_merge from \"./merge.js\";\nimport transition_on from \"./on.js\";\nimport transition_remove from \"./remove.js\";\nimport transition_select from \"./select.js\";\nimport transition_selectAll from \"./selectAll.js\";\nimport transition_selection from \"./selection.js\";\nimport transition_style from \"./style.js\";\nimport transition_styleTween from \"./styleTween.js\";\nimport transition_text from \"./text.js\";\nimport transition_textTween from \"./textTween.js\";\nimport transition_transition from \"./transition.js\";\nimport transition_tween from \"./tween.js\";\nimport transition_end from \"./end.js\";\n\nvar id = 0;\n\nexport function Transition(groups, parents, name, id) {\n  this._groups = groups;\n  this._parents = parents;\n  this._name = name;\n  this._id = id;\n}\n\nexport default function transition(name) {\n  return selection().transition(name);\n}\n\nexport function newId() {\n  return ++id;\n}\n\nvar selection_prototype = selection.prototype;\n\nTransition.prototype = transition.prototype = {\n  constructor: Transition,\n  select: transition_select,\n  selectAll: transition_selectAll,\n  selectChild: selection_prototype.selectChild,\n  selectChildren: selection_prototype.selectChildren,\n  filter: transition_filter,\n  merge: transition_merge,\n  selection: transition_selection,\n  transition: transition_transition,\n  call: selection_prototype.call,\n  nodes: selection_prototype.nodes,\n  node: selection_prototype.node,\n  size: selection_prototype.size,\n  empty: selection_prototype.empty,\n  each: selection_prototype.each,\n  on: transition_on,\n  attr: transition_attr,\n  attrTween: transition_attrTween,\n  style: transition_style,\n  styleTween: transition_styleTween,\n  text: transition_text,\n  textTween: transition_textTween,\n  remove: transition_remove,\n  tween: transition_tween,\n  delay: transition_delay,\n  duration: transition_duration,\n  ease: transition_ease,\n  easeVarying: transition_easeVarying,\n  end: transition_end,\n  [Symbol.iterator]: selection_prototype[Symbol.iterator]\n};\n", "export function cubicIn(t) {\n  return t * t * t;\n}\n\nexport function cubicOut(t) {\n  return --t * t * t + 1;\n}\n\nexport function cubicInOut(t) {\n  return ((t *= 2) <= 1 ? t * t * t : (t -= 2) * t * t + 2) / 2;\n}\n", "import {Transition, newId} from \"../transition/index.js\";\nimport schedule from \"../transition/schedule.js\";\nimport {easeCubicInOut} from \"d3-ease\";\nimport {now} from \"d3-timer\";\n\nvar defaultTiming = {\n  time: null, // Set on use.\n  delay: 0,\n  duration: 250,\n  ease: easeCubicInOut\n};\n\nfunction inherit(node, id) {\n  var timing;\n  while (!(timing = node.__transition) || !(timing = timing[id])) {\n    if (!(node = node.parentNode)) {\n      throw new Error(`transition ${id} not found`);\n    }\n  }\n  return timing;\n}\n\nexport default function(name) {\n  var id,\n      timing;\n\n  if (name instanceof Transition) {\n    id = name._id, name = name._name;\n  } else {\n    id = newId(), (timing = defaultTiming).time = now(), name = name == null ? null : name + \"\";\n  }\n\n  for (var groups = this._groups, m = groups.length, j = 0; j < m; ++j) {\n    for (var group = groups[j], n = group.length, node, i = 0; i < n; ++i) {\n      if (node = group[i]) {\n        schedule(node, name, id, i, group, timing || inherit(node, id));\n      }\n    }\n  }\n\n  return new Transition(groups, this._parents, name, id);\n}\n", "import {selection} from \"d3-selection\";\nimport selection_interrupt from \"./interrupt.js\";\nimport selection_transition from \"./transition.js\";\n\nselection.prototype.interrupt = selection_interrupt;\nselection.prototype.transition = selection_transition;\n", "import {dispatch} from \"d3-dispatch\";\nimport {dragDisable, dragEnable} from \"d3-drag\";\nimport {interpolate} from \"d3-interpolate\";\nimport {pointer, select} from \"d3-selection\";\nimport {interrupt} from \"d3-transition\";\nimport constant from \"./constant.js\";\nimport BrushEvent from \"./event.js\";\nimport noevent, {nopropagation} from \"./noevent.js\";\n\nvar MODE_DRAG = {name: \"drag\"},\n    MODE_SPACE = {name: \"space\"},\n    MODE_HANDLE = {name: \"handle\"},\n    MODE_CENTER = {name: \"center\"};\n\nconst {abs, max, min} = Math;\n\nfunction number1(e) {\n  return [+e[0], +e[1]];\n}\n\nfunction number2(e) {\n  return [number1(e[0]), number1(e[1])];\n}\n\nvar X = {\n  name: \"x\",\n  handles: [\"w\", \"e\"].map(type),\n  input: function(x, e) { return x == null ? null : [[+x[0], e[0][1]], [+x[1], e[1][1]]]; },\n  output: function(xy) { return xy && [xy[0][0], xy[1][0]]; }\n};\n\nvar Y = {\n  name: \"y\",\n  handles: [\"n\", \"s\"].map(type),\n  input: function(y, e) { return y == null ? null : [[e[0][0], +y[0]], [e[1][0], +y[1]]]; },\n  output: function(xy) { return xy && [xy[0][1], xy[1][1]]; }\n};\n\nvar XY = {\n  name: \"xy\",\n  handles: [\"n\", \"w\", \"e\", \"s\", \"nw\", \"ne\", \"sw\", \"se\"].map(type),\n  input: function(xy) { return xy == null ? null : number2(xy); },\n  output: function(xy) { return xy; }\n};\n\nvar cursors = {\n  overlay: \"crosshair\",\n  selection: \"move\",\n  n: \"ns-resize\",\n  e: \"ew-resize\",\n  s: \"ns-resize\",\n  w: \"ew-resize\",\n  nw: \"nwse-resize\",\n  ne: \"nesw-resize\",\n  se: \"nwse-resize\",\n  sw: \"nesw-resize\"\n};\n\nvar flipX = {\n  e: \"w\",\n  w: \"e\",\n  nw: \"ne\",\n  ne: \"nw\",\n  se: \"sw\",\n  sw: \"se\"\n};\n\nvar flipY = {\n  n: \"s\",\n  s: \"n\",\n  nw: \"sw\",\n  ne: \"se\",\n  se: \"ne\",\n  sw: \"nw\"\n};\n\nvar signsX = {\n  overlay: +1,\n  selection: +1,\n  n: null,\n  e: +1,\n  s: null,\n  w: -1,\n  nw: -1,\n  ne: +1,\n  se: +1,\n  sw: -1\n};\n\nvar signsY = {\n  overlay: +1,\n  selection: +1,\n  n: -1,\n  e: null,\n  s: +1,\n  w: null,\n  nw: -1,\n  ne: -1,\n  se: +1,\n  sw: +1\n};\n\nfunction type(t) {\n  return {type: t};\n}\n\n// Ignore right-click, since that should open the context menu.\nfunction defaultFilter(event) {\n  return !event.ctrlKey && !event.button;\n}\n\nfunction defaultExtent() {\n  var svg = this.ownerSVGElement || this;\n  if (svg.hasAttribute(\"viewBox\")) {\n    svg = svg.viewBox.baseVal;\n    return [[svg.x, svg.y], [svg.x + svg.width, svg.y + svg.height]];\n  }\n  return [[0, 0], [svg.width.baseVal.value, svg.height.baseVal.value]];\n}\n\nfunction defaultTouchable() {\n  return navigator.maxTouchPoints || (\"ontouchstart\" in this);\n}\n\n// Like d3.local, but with the name \u201C__brush\u201D rather than auto-generated.\nfunction local(node) {\n  while (!node.__brush) if (!(node = node.parentNode)) return;\n  return node.__brush;\n}\n\nfunction empty(extent) {\n  return extent[0][0] === extent[1][0]\n      || extent[0][1] === extent[1][1];\n}\n\nexport function brushSelection(node) {\n  var state = node.__brush;\n  return state ? state.dim.output(state.selection) : null;\n}\n\nexport function brushX() {\n  return brush(X);\n}\n\nexport function brushY() {\n  return brush(Y);\n}\n\nexport default function() {\n  return brush(XY);\n}\n\nfunction brush(dim) {\n  var extent = defaultExtent,\n      filter = defaultFilter,\n      touchable = defaultTouchable,\n      keys = true,\n      listeners = dispatch(\"start\", \"brush\", \"end\"),\n      handleSize = 6,\n      touchending;\n\n  function brush(group) {\n    var overlay = group\n        .property(\"__brush\", initialize)\n      .selectAll(\".overlay\")\n      .data([type(\"overlay\")]);\n\n    overlay.enter().append(\"rect\")\n        .attr(\"class\", \"overlay\")\n        .attr(\"pointer-events\", \"all\")\n        .attr(\"cursor\", cursors.overlay)\n      .merge(overlay)\n        .each(function() {\n          var extent = local(this).extent;\n          select(this)\n              .attr(\"x\", extent[0][0])\n              .attr(\"y\", extent[0][1])\n              .attr(\"width\", extent[1][0] - extent[0][0])\n              .attr(\"height\", extent[1][1] - extent[0][1]);\n        });\n\n    group.selectAll(\".selection\")\n      .data([type(\"selection\")])\n      .enter().append(\"rect\")\n        .attr(\"class\", \"selection\")\n        .attr(\"cursor\", cursors.selection)\n        .attr(\"fill\", \"#777\")\n        .attr(\"fill-opacity\", 0.3)\n        .attr(\"stroke\", \"#fff\")\n        .attr(\"shape-rendering\", \"crispEdges\");\n\n    var handle = group.selectAll(\".handle\")\n      .data(dim.handles, function(d) { return d.type; });\n\n    handle.exit().remove();\n\n    handle.enter().append(\"rect\")\n        .attr(\"class\", function(d) { return \"handle handle--\" + d.type; })\n        .attr(\"cursor\", function(d) { return cursors[d.type]; });\n\n    group\n        .each(redraw)\n        .attr(\"fill\", \"none\")\n        .attr(\"pointer-events\", \"all\")\n        .on(\"mousedown.brush\", started)\n      .filter(touchable)\n        .on(\"touchstart.brush\", started)\n        .on(\"touchmove.brush\", touchmoved)\n        .on(\"touchend.brush touchcancel.brush\", touchended)\n        .style(\"touch-action\", \"none\")\n        .style(\"-webkit-tap-highlight-color\", \"rgba(0,0,0,0)\");\n  }\n\n  brush.move = function(group, selection, event) {\n    if (group.tween) {\n      group\n          .on(\"start.brush\", function(event) { emitter(this, arguments).beforestart().start(event); })\n          .on(\"interrupt.brush end.brush\", function(event) { emitter(this, arguments).end(event); })\n          .tween(\"brush\", function() {\n            var that = this,\n                state = that.__brush,\n                emit = emitter(that, arguments),\n                selection0 = state.selection,\n                selection1 = dim.input(typeof selection === \"function\" ? selection.apply(this, arguments) : selection, state.extent),\n                i = interpolate(selection0, selection1);\n\n            function tween(t) {\n              state.selection = t === 1 && selection1 === null ? null : i(t);\n              redraw.call(that);\n              emit.brush();\n            }\n\n            return selection0 !== null && selection1 !== null ? tween : tween(1);\n          });\n    } else {\n      group\n          .each(function() {\n            var that = this,\n                args = arguments,\n                state = that.__brush,\n                selection1 = dim.input(typeof selection === \"function\" ? selection.apply(that, args) : selection, state.extent),\n                emit = emitter(that, args).beforestart();\n\n            interrupt(that);\n            state.selection = selection1 === null ? null : selection1;\n            redraw.call(that);\n            emit.start(event).brush(event).end(event);\n          });\n    }\n  };\n\n  brush.clear = function(group, event) {\n    brush.move(group, null, event);\n  };\n\n  function redraw() {\n    var group = select(this),\n        selection = local(this).selection;\n\n    if (selection) {\n      group.selectAll(\".selection\")\n          .style(\"display\", null)\n          .attr(\"x\", selection[0][0])\n          .attr(\"y\", selection[0][1])\n          .attr(\"width\", selection[1][0] - selection[0][0])\n          .attr(\"height\", selection[1][1] - selection[0][1]);\n\n      group.selectAll(\".handle\")\n          .style(\"display\", null)\n          .attr(\"x\", function(d) { return d.type[d.type.length - 1] === \"e\" ? selection[1][0] - handleSize / 2 : selection[0][0] - handleSize / 2; })\n          .attr(\"y\", function(d) { return d.type[0] === \"s\" ? selection[1][1] - handleSize / 2 : selection[0][1] - handleSize / 2; })\n          .attr(\"width\", function(d) { return d.type === \"n\" || d.type === \"s\" ? selection[1][0] - selection[0][0] + handleSize : handleSize; })\n          .attr(\"height\", function(d) { return d.type === \"e\" || d.type === \"w\" ? selection[1][1] - selection[0][1] + handleSize : handleSize; });\n    }\n\n    else {\n      group.selectAll(\".selection,.handle\")\n          .style(\"display\", \"none\")\n          .attr(\"x\", null)\n          .attr(\"y\", null)\n          .attr(\"width\", null)\n          .attr(\"height\", null);\n    }\n  }\n\n  function emitter(that, args, clean) {\n    var emit = that.__brush.emitter;\n    return emit && (!clean || !emit.clean) ? emit : new Emitter(that, args, clean);\n  }\n\n  function Emitter(that, args, clean) {\n    this.that = that;\n    this.args = args;\n    this.state = that.__brush;\n    this.active = 0;\n    this.clean = clean;\n  }\n\n  Emitter.prototype = {\n    beforestart: function() {\n      if (++this.active === 1) this.state.emitter = this, this.starting = true;\n      return this;\n    },\n    start: function(event, mode) {\n      if (this.starting) this.starting = false, this.emit(\"start\", event, mode);\n      else this.emit(\"brush\", event);\n      return this;\n    },\n    brush: function(event, mode) {\n      this.emit(\"brush\", event, mode);\n      return this;\n    },\n    end: function(event, mode) {\n      if (--this.active === 0) delete this.state.emitter, this.emit(\"end\", event, mode);\n      return this;\n    },\n    emit: function(type, event, mode) {\n      var d = select(this.that).datum();\n      listeners.call(\n        type,\n        this.that,\n        new BrushEvent(type, {\n          sourceEvent: event,\n          target: brush,\n          selection: dim.output(this.state.selection),\n          mode,\n          dispatch: listeners\n        }),\n        d\n      );\n    }\n  };\n\n  function started(event) {\n    if (touchending && !event.touches) return;\n    if (!filter.apply(this, arguments)) return;\n\n    var that = this,\n        type = event.target.__data__.type,\n        mode = (keys && event.metaKey ? type = \"overlay\" : type) === \"selection\" ? MODE_DRAG : (keys && event.altKey ? MODE_CENTER : MODE_HANDLE),\n        signX = dim === Y ? null : signsX[type],\n        signY = dim === X ? null : signsY[type],\n        state = local(that),\n        extent = state.extent,\n        selection = state.selection,\n        W = extent[0][0], w0, w1,\n        N = extent[0][1], n0, n1,\n        E = extent[1][0], e0, e1,\n        S = extent[1][1], s0, s1,\n        dx = 0,\n        dy = 0,\n        moving,\n        shifting = signX && signY && keys && event.shiftKey,\n        lockX,\n        lockY,\n        points = Array.from(event.touches || [event], t => {\n          const i = t.identifier;\n          t = pointer(t, that);\n          t.point0 = t.slice();\n          t.identifier = i;\n          return t;\n        });\n\n    interrupt(that);\n    var emit = emitter(that, arguments, true).beforestart();\n\n    if (type === \"overlay\") {\n      if (selection) moving = true;\n      const pts = [points[0], points[1] || points[0]];\n      state.selection = selection = [[\n          w0 = dim === Y ? W : min(pts[0][0], pts[1][0]),\n          n0 = dim === X ? N : min(pts[0][1], pts[1][1])\n        ], [\n          e0 = dim === Y ? E : max(pts[0][0], pts[1][0]),\n          s0 = dim === X ? S : max(pts[0][1], pts[1][1])\n        ]];\n      if (points.length > 1) move(event);\n    } else {\n      w0 = selection[0][0];\n      n0 = selection[0][1];\n      e0 = selection[1][0];\n      s0 = selection[1][1];\n    }\n\n    w1 = w0;\n    n1 = n0;\n    e1 = e0;\n    s1 = s0;\n\n    var group = select(that)\n        .attr(\"pointer-events\", \"none\");\n\n    var overlay = group.selectAll(\".overlay\")\n        .attr(\"cursor\", cursors[type]);\n\n    if (event.touches) {\n      emit.moved = moved;\n      emit.ended = ended;\n    } else {\n      var view = select(event.view)\n          .on(\"mousemove.brush\", moved, true)\n          .on(\"mouseup.brush\", ended, true);\n      if (keys) view\n          .on(\"keydown.brush\", keydowned, true)\n          .on(\"keyup.brush\", keyupped, true)\n\n      dragDisable(event.view);\n    }\n\n    redraw.call(that);\n    emit.start(event, mode.name);\n\n    function moved(event) {\n      for (const p of event.changedTouches || [event]) {\n        for (const d of points)\n          if (d.identifier === p.identifier) d.cur = pointer(p, that);\n      }\n      if (shifting && !lockX && !lockY && points.length === 1) {\n        const point = points[0];\n        if (abs(point.cur[0] - point[0]) > abs(point.cur[1] - point[1]))\n          lockY = true;\n        else\n          lockX = true;\n      }\n      for (const point of points)\n        if (point.cur) point[0] = point.cur[0], point[1] = point.cur[1];\n      moving = true;\n      noevent(event);\n      move(event);\n    }\n\n    function move(event) {\n      const point = points[0], point0 = point.point0;\n      var t;\n\n      dx = point[0] - point0[0];\n      dy = point[1] - point0[1];\n\n      switch (mode) {\n        case MODE_SPACE:\n        case MODE_DRAG: {\n          if (signX) dx = max(W - w0, min(E - e0, dx)), w1 = w0 + dx, e1 = e0 + dx;\n          if (signY) dy = max(N - n0, min(S - s0, dy)), n1 = n0 + dy, s1 = s0 + dy;\n          break;\n        }\n        case MODE_HANDLE: {\n          if (points[1]) {\n            if (signX) w1 = max(W, min(E, points[0][0])), e1 = max(W, min(E, points[1][0])), signX = 1;\n            if (signY) n1 = max(N, min(S, points[0][1])), s1 = max(N, min(S, points[1][1])), signY = 1;\n          } else {\n            if (signX < 0) dx = max(W - w0, min(E - w0, dx)), w1 = w0 + dx, e1 = e0;\n            else if (signX > 0) dx = max(W - e0, min(E - e0, dx)), w1 = w0, e1 = e0 + dx;\n            if (signY < 0) dy = max(N - n0, min(S - n0, dy)), n1 = n0 + dy, s1 = s0;\n            else if (signY > 0) dy = max(N - s0, min(S - s0, dy)), n1 = n0, s1 = s0 + dy;\n          }\n          break;\n        }\n        case MODE_CENTER: {\n          if (signX) w1 = max(W, min(E, w0 - dx * signX)), e1 = max(W, min(E, e0 + dx * signX));\n          if (signY) n1 = max(N, min(S, n0 - dy * signY)), s1 = max(N, min(S, s0 + dy * signY));\n          break;\n        }\n      }\n\n      if (e1 < w1) {\n        signX *= -1;\n        t = w0, w0 = e0, e0 = t;\n        t = w1, w1 = e1, e1 = t;\n        if (type in flipX) overlay.attr(\"cursor\", cursors[type = flipX[type]]);\n      }\n\n      if (s1 < n1) {\n        signY *= -1;\n        t = n0, n0 = s0, s0 = t;\n        t = n1, n1 = s1, s1 = t;\n        if (type in flipY) overlay.attr(\"cursor\", cursors[type = flipY[type]]);\n      }\n\n      if (state.selection) selection = state.selection; // May be set by brush.move!\n      if (lockX) w1 = selection[0][0], e1 = selection[1][0];\n      if (lockY) n1 = selection[0][1], s1 = selection[1][1];\n\n      if (selection[0][0] !== w1\n          || selection[0][1] !== n1\n          || selection[1][0] !== e1\n          || selection[1][1] !== s1) {\n        state.selection = [[w1, n1], [e1, s1]];\n        redraw.call(that);\n        emit.brush(event, mode.name);\n      }\n    }\n\n    function ended(event) {\n      nopropagation(event);\n      if (event.touches) {\n        if (event.touches.length) return;\n        if (touchending) clearTimeout(touchending);\n        touchending = setTimeout(function() { touchending = null; }, 500); // Ghost clicks are delayed!\n      } else {\n        dragEnable(event.view, moving);\n        view.on(\"keydown.brush keyup.brush mousemove.brush mouseup.brush\", null);\n      }\n      group.attr(\"pointer-events\", \"all\");\n      overlay.attr(\"cursor\", cursors.overlay);\n      if (state.selection) selection = state.selection; // May be set by brush.move (on start)!\n      if (empty(selection)) state.selection = null, redraw.call(that);\n      emit.end(event, mode.name);\n    }\n\n    function keydowned(event) {\n      switch (event.keyCode) {\n        case 16: { // SHIFT\n          shifting = signX && signY;\n          break;\n        }\n        case 18: { // ALT\n          if (mode === MODE_HANDLE) {\n            if (signX) e0 = e1 - dx * signX, w0 = w1 + dx * signX;\n            if (signY) s0 = s1 - dy * signY, n0 = n1 + dy * signY;\n            mode = MODE_CENTER;\n            move(event);\n          }\n          break;\n        }\n        case 32: { // SPACE; takes priority over ALT\n          if (mode === MODE_HANDLE || mode === MODE_CENTER) {\n            if (signX < 0) e0 = e1 - dx; else if (signX > 0) w0 = w1 - dx;\n            if (signY < 0) s0 = s1 - dy; else if (signY > 0) n0 = n1 - dy;\n            mode = MODE_SPACE;\n            overlay.attr(\"cursor\", cursors.selection);\n            move(event);\n          }\n          break;\n        }\n        default: return;\n      }\n      noevent(event);\n    }\n\n    function keyupped(event) {\n      switch (event.keyCode) {\n        case 16: { // SHIFT\n          if (shifting) {\n            lockX = lockY = shifting = false;\n            move(event);\n          }\n          break;\n        }\n        case 18: { // ALT\n          if (mode === MODE_CENTER) {\n            if (signX < 0) e0 = e1; else if (signX > 0) w0 = w1;\n            if (signY < 0) s0 = s1; else if (signY > 0) n0 = n1;\n            mode = MODE_HANDLE;\n            move(event);\n          }\n          break;\n        }\n        case 32: { // SPACE\n          if (mode === MODE_SPACE) {\n            if (event.altKey) {\n              if (signX) e0 = e1 - dx * signX, w0 = w1 + dx * signX;\n              if (signY) s0 = s1 - dy * signY, n0 = n1 + dy * signY;\n              mode = MODE_CENTER;\n            } else {\n              if (signX < 0) e0 = e1; else if (signX > 0) w0 = w1;\n              if (signY < 0) s0 = s1; else if (signY > 0) n0 = n1;\n              mode = MODE_HANDLE;\n            }\n            overlay.attr(\"cursor\", cursors[type]);\n            move(event);\n          }\n          break;\n        }\n        default: return;\n      }\n      noevent(event);\n    }\n  }\n\n  function touchmoved(event) {\n    emitter(this, arguments).moved(event);\n  }\n\n  function touchended(event) {\n    emitter(this, arguments).ended(event);\n  }\n\n  function initialize() {\n    var state = this.__brush || {selection: null};\n    state.extent = number2(extent.apply(this, arguments));\n    state.dim = dim;\n    return state;\n  }\n\n  brush.extent = function(_) {\n    return arguments.length ? (extent = typeof _ === \"function\" ? _ : constant(number2(_)), brush) : extent;\n  };\n\n  brush.filter = function(_) {\n    return arguments.length ? (filter = typeof _ === \"function\" ? _ : constant(!!_), brush) : filter;\n  };\n\n  brush.touchable = function(_) {\n    return arguments.length ? (touchable = typeof _ === \"function\" ? _ : constant(!!_), brush) : touchable;\n  };\n\n  brush.handleSize = function(_) {\n    return arguments.length ? (handleSize = +_, brush) : handleSize;\n  };\n\n  brush.keyModifiers = function(_) {\n    return arguments.length ? (keys = !!_, brush) : keys;\n  };\n\n  brush.on = function() {\n    var value = listeners.on.apply(listeners, arguments);\n    return value === listeners ? brush : value;\n  };\n\n  return brush;\n}\n", "const pi = Math.PI,\n    tau = 2 * pi,\n    epsilon = 1e-6,\n    tauEpsilon = tau - epsilon;\n\nfunction append(strings) {\n  this._ += strings[0];\n  for (let i = 1, n = strings.length; i < n; ++i) {\n    this._ += arguments[i] + strings[i];\n  }\n}\n\nfunction appendRound(digits) {\n  let d = Math.floor(digits);\n  if (!(d >= 0)) throw new Error(`invalid digits: ${digits}`);\n  if (d > 15) return append;\n  const k = 10 ** d;\n  return function(strings) {\n    this._ += strings[0];\n    for (let i = 1, n = strings.length; i < n; ++i) {\n      this._ += Math.round(arguments[i] * k) / k + strings[i];\n    }\n  };\n}\n\nexport class Path {\n  constructor(digits) {\n    this._x0 = this._y0 = // start of current subpath\n    this._x1 = this._y1 = null; // end of current subpath\n    this._ = \"\";\n    this._append = digits == null ? append : appendRound(digits);\n  }\n  moveTo(x, y) {\n    this._append`M${this._x0 = this._x1 = +x},${this._y0 = this._y1 = +y}`;\n  }\n  closePath() {\n    if (this._x1 !== null) {\n      this._x1 = this._x0, this._y1 = this._y0;\n      this._append`Z`;\n    }\n  }\n  lineTo(x, y) {\n    this._append`L${this._x1 = +x},${this._y1 = +y}`;\n  }\n  quadraticCurveTo(x1, y1, x, y) {\n    this._append`Q${+x1},${+y1},${this._x1 = +x},${this._y1 = +y}`;\n  }\n  bezierCurveTo(x1, y1, x2, y2, x, y) {\n    this._append`C${+x1},${+y1},${+x2},${+y2},${this._x1 = +x},${this._y1 = +y}`;\n  }\n  arcTo(x1, y1, x2, y2, r) {\n    x1 = +x1, y1 = +y1, x2 = +x2, y2 = +y2, r = +r;\n\n    // Is the radius negative? Error.\n    if (r < 0) throw new Error(`negative radius: ${r}`);\n\n    let x0 = this._x1,\n        y0 = this._y1,\n        x21 = x2 - x1,\n        y21 = y2 - y1,\n        x01 = x0 - x1,\n        y01 = y0 - y1,\n        l01_2 = x01 * x01 + y01 * y01;\n\n    // Is this path empty? Move to (x1,y1).\n    if (this._x1 === null) {\n      this._append`M${this._x1 = x1},${this._y1 = y1}`;\n    }\n\n    // Or, is (x1,y1) coincident with (x0,y0)? Do nothing.\n    else if (!(l01_2 > epsilon));\n\n    // Or, are (x0,y0), (x1,y1) and (x2,y2) collinear?\n    // Equivalently, is (x1,y1) coincident with (x2,y2)?\n    // Or, is the radius zero? Line to (x1,y1).\n    else if (!(Math.abs(y01 * x21 - y21 * x01) > epsilon) || !r) {\n      this._append`L${this._x1 = x1},${this._y1 = y1}`;\n    }\n\n    // Otherwise, draw an arc!\n    else {\n      let x20 = x2 - x0,\n          y20 = y2 - y0,\n          l21_2 = x21 * x21 + y21 * y21,\n          l20_2 = x20 * x20 + y20 * y20,\n          l21 = Math.sqrt(l21_2),\n          l01 = Math.sqrt(l01_2),\n          l = r * Math.tan((pi - Math.acos((l21_2 + l01_2 - l20_2) / (2 * l21 * l01))) / 2),\n          t01 = l / l01,\n          t21 = l / l21;\n\n      // If the start tangent is not coincident with (x0,y0), line to.\n      if (Math.abs(t01 - 1) > epsilon) {\n        this._append`L${x1 + t01 * x01},${y1 + t01 * y01}`;\n      }\n\n      this._append`A${r},${r},0,0,${+(y01 * x20 > x01 * y20)},${this._x1 = x1 + t21 * x21},${this._y1 = y1 + t21 * y21}`;\n    }\n  }\n  arc(x, y, r, a0, a1, ccw) {\n    x = +x, y = +y, r = +r, ccw = !!ccw;\n\n    // Is the radius negative? Error.\n    if (r < 0) throw new Error(`negative radius: ${r}`);\n\n    let dx = r * Math.cos(a0),\n        dy = r * Math.sin(a0),\n        x0 = x + dx,\n        y0 = y + dy,\n        cw = 1 ^ ccw,\n        da = ccw ? a0 - a1 : a1 - a0;\n\n    // Is this path empty? Move to (x0,y0).\n    if (this._x1 === null) {\n      this._append`M${x0},${y0}`;\n    }\n\n    // Or, is (x0,y0) not coincident with the previous point? Line to (x0,y0).\n    else if (Math.abs(this._x1 - x0) > epsilon || Math.abs(this._y1 - y0) > epsilon) {\n      this._append`L${x0},${y0}`;\n    }\n\n    // Is this arc empty? We\u2019re done.\n    if (!r) return;\n\n    // Does the angle go the wrong way? Flip the direction.\n    if (da < 0) da = da % tau + tau;\n\n    // Is this a complete circle? Draw two arcs to complete the circle.\n    if (da > tauEpsilon) {\n      this._append`A${r},${r},0,1,${cw},${x - dx},${y - dy}A${r},${r},0,1,${cw},${this._x1 = x0},${this._y1 = y0}`;\n    }\n\n    // Is this arc non-empty? Draw an arc!\n    else if (da > epsilon) {\n      this._append`A${r},${r},0,${+(da >= pi)},${cw},${this._x1 = x + r * Math.cos(a1)},${this._y1 = y + r * Math.sin(a1)}`;\n    }\n  }\n  rect(x, y, w, h) {\n    this._append`M${this._x0 = this._x1 = +x},${this._y0 = this._y1 = +y}h${w = +w}v${+h}h${-w}Z`;\n  }\n  toString() {\n    return this._;\n  }\n}\n\nexport function path() {\n  return new Path;\n}\n\n// Allow instanceof d3.path\npath.prototype = Path.prototype;\n\nexport function pathRound(digits = 3) {\n  return new Path(+digits);\n}\n", "export default function(x) {\n  return Math.abs(x = Math.round(x)) >= 1e21\n      ? x.toLocaleString(\"en\").replace(/,/g, \"\")\n      : x.toString(10);\n}\n\n// Computes the decimal coefficient and exponent of the specified number x with\n// significant digits p, where x is positive and p is in [1, 21] or undefined.\n// For example, formatDecimalParts(1.23) returns [\"123\", 0].\nexport function formatDecimalParts(x, p) {\n  if ((i = (x = p ? x.toExponential(p - 1) : x.toExponential()).indexOf(\"e\")) < 0) return null; // NaN, \u00B1Infinity\n  var i, coefficient = x.slice(0, i);\n\n  // The string returned by toExponential either has the form \\d\\.\\d+e[-+]\\d+\n  // (e.g., 1.2e+3) or the form \\de[-+]\\d+ (e.g., 1e+3).\n  return [\n    coefficient.length > 1 ? coefficient[0] + coefficient.slice(2) : coefficient,\n    +x.slice(i + 1)\n  ];\n}\n", "import {formatDecimalParts} from \"./formatDecimal.js\";\n\nexport default function(x) {\n  return x = formatDecimalParts(Math.abs(x)), x ? x[1] : NaN;\n}\n", "export default function(grouping, thousands) {\n  return function(value, width) {\n    var i = value.length,\n        t = [],\n        j = 0,\n        g = grouping[0],\n        length = 0;\n\n    while (i > 0 && g > 0) {\n      if (length + g + 1 > width) g = Math.max(1, width - length);\n      t.push(value.substring(i -= g, i + g));\n      if ((length += g + 1) > width) break;\n      g = grouping[j = (j + 1) % grouping.length];\n    }\n\n    return t.reverse().join(thousands);\n  };\n}\n", "export default function(numerals) {\n  return function(value) {\n    return value.replace(/[0-9]/g, function(i) {\n      return numerals[+i];\n    });\n  };\n}\n", "// [[fill]align][sign][symbol][0][width][,][.precision][~][type]\nvar re = /^(?:(.)?([<>=^]))?([+\\-( ])?([$#])?(0)?(\\d+)?(,)?(\\.\\d+)?(~)?([a-z%])?$/i;\n\nexport default function formatSpecifier(specifier) {\n  if (!(match = re.exec(specifier))) throw new Error(\"invalid format: \" + specifier);\n  var match;\n  return new FormatSpecifier({\n    fill: match[1],\n    align: match[2],\n    sign: match[3],\n    symbol: match[4],\n    zero: match[5],\n    width: match[6],\n    comma: match[7],\n    precision: match[8] && match[8].slice(1),\n    trim: match[9],\n    type: match[10]\n  });\n}\n\nformatSpecifier.prototype = FormatSpecifier.prototype; // instanceof\n\nexport function FormatSpecifier(specifier) {\n  this.fill = specifier.fill === undefined ? \" \" : specifier.fill + \"\";\n  this.align = specifier.align === undefined ? \">\" : specifier.align + \"\";\n  this.sign = specifier.sign === undefined ? \"-\" : specifier.sign + \"\";\n  this.symbol = specifier.symbol === undefined ? \"\" : specifier.symbol + \"\";\n  this.zero = !!specifier.zero;\n  this.width = specifier.width === undefined ? undefined : +specifier.width;\n  this.comma = !!specifier.comma;\n  this.precision = specifier.precision === undefined ? undefined : +specifier.precision;\n  this.trim = !!specifier.trim;\n  this.type = specifier.type === undefined ? \"\" : specifier.type + \"\";\n}\n\nFormatSpecifier.prototype.toString = function() {\n  return this.fill\n      + this.align\n      + this.sign\n      + this.symbol\n      + (this.zero ? \"0\" : \"\")\n      + (this.width === undefined ? \"\" : Math.max(1, this.width | 0))\n      + (this.comma ? \",\" : \"\")\n      + (this.precision === undefined ? \"\" : \".\" + Math.max(0, this.precision | 0))\n      + (this.trim ? \"~\" : \"\")\n      + this.type;\n};\n", "// Trims insignificant zeros, e.g., replaces 1.2000k with 1.2k.\nexport default function(s) {\n  out: for (var n = s.length, i = 1, i0 = -1, i1; i < n; ++i) {\n    switch (s[i]) {\n      case \".\": i0 = i1 = i; break;\n      case \"0\": if (i0 === 0) i0 = i; i1 = i; break;\n      default: if (!+s[i]) break out; if (i0 > 0) i0 = 0; break;\n    }\n  }\n  return i0 > 0 ? s.slice(0, i0) + s.slice(i1 + 1) : s;\n}\n", "import {formatDecimalParts} from \"./formatDecimal.js\";\n\nexport var prefixExponent;\n\nexport default function(x, p) {\n  var d = formatDecimalParts(x, p);\n  if (!d) return x + \"\";\n  var coefficient = d[0],\n      exponent = d[1],\n      i = exponent - (prefixExponent = Math.max(-8, Math.min(8, Math.floor(exponent / 3))) * 3) + 1,\n      n = coefficient.length;\n  return i === n ? coefficient\n      : i > n ? coefficient + new Array(i - n + 1).join(\"0\")\n      : i > 0 ? coefficient.slice(0, i) + \".\" + coefficient.slice(i)\n      : \"0.\" + new Array(1 - i).join(\"0\") + formatDecimalParts(x, Math.max(0, p + i - 1))[0]; // less than 1y!\n}\n", "import {formatDecimalParts} from \"./formatDecimal.js\";\n\nexport default function(x, p) {\n  var d = formatDecimalParts(x, p);\n  if (!d) return x + \"\";\n  var coefficient = d[0],\n      exponent = d[1];\n  return exponent < 0 ? \"0.\" + new Array(-exponent).join(\"0\") + coefficient\n      : coefficient.length > exponent + 1 ? coefficient.slice(0, exponent + 1) + \".\" + coefficient.slice(exponent + 1)\n      : coefficient + new Array(exponent - coefficient.length + 2).join(\"0\");\n}\n", "import formatDecimal from \"./formatDecimal.js\";\nimport formatPrefixAuto from \"./formatPrefixAuto.js\";\nimport formatRounded from \"./formatRounded.js\";\n\nexport default {\n  \"%\": (x, p) => (x * 100).toFixed(p),\n  \"b\": (x) => Math.round(x).toString(2),\n  \"c\": (x) => x + \"\",\n  \"d\": formatDecimal,\n  \"e\": (x, p) => x.toExponential(p),\n  \"f\": (x, p) => x.toFixed(p),\n  \"g\": (x, p) => x.toPrecision(p),\n  \"o\": (x) => Math.round(x).toString(8),\n  \"p\": (x, p) => formatRounded(x * 100, p),\n  \"r\": formatRounded,\n  \"s\": formatPrefixAuto,\n  \"X\": (x) => Math.round(x).toString(16).toUpperCase(),\n  \"x\": (x) => Math.round(x).toString(16)\n};\n", "export default function(x) {\n  return x;\n}\n", "import exponent from \"./exponent.js\";\nimport formatGroup from \"./formatGroup.js\";\nimport formatNumerals from \"./formatNumerals.js\";\nimport formatSpecifier from \"./formatSpecifier.js\";\nimport formatTrim from \"./formatTrim.js\";\nimport formatTypes from \"./formatTypes.js\";\nimport {prefixExponent} from \"./formatPrefixAuto.js\";\nimport identity from \"./identity.js\";\n\nvar map = Array.prototype.map,\n    prefixes = [\"y\",\"z\",\"a\",\"f\",\"p\",\"n\",\"\u00B5\",\"m\",\"\",\"k\",\"M\",\"G\",\"T\",\"P\",\"E\",\"Z\",\"Y\"];\n\nexport default function(locale) {\n  var group = locale.grouping === undefined || locale.thousands === undefined ? identity : formatGroup(map.call(locale.grouping, Number), locale.thousands + \"\"),\n      currencyPrefix = locale.currency === undefined ? \"\" : locale.currency[0] + \"\",\n      currencySuffix = locale.currency === undefined ? \"\" : locale.currency[1] + \"\",\n      decimal = locale.decimal === undefined ? \".\" : locale.decimal + \"\",\n      numerals = locale.numerals === undefined ? identity : formatNumerals(map.call(locale.numerals, String)),\n      percent = locale.percent === undefined ? \"%\" : locale.percent + \"\",\n      minus = locale.minus === undefined ? \"\u2212\" : locale.minus + \"\",\n      nan = locale.nan === undefined ? \"NaN\" : locale.nan + \"\";\n\n  function newFormat(specifier) {\n    specifier = formatSpecifier(specifier);\n\n    var fill = specifier.fill,\n        align = specifier.align,\n        sign = specifier.sign,\n        symbol = specifier.symbol,\n        zero = specifier.zero,\n        width = specifier.width,\n        comma = specifier.comma,\n        precision = specifier.precision,\n        trim = specifier.trim,\n        type = specifier.type;\n\n    // The \"n\" type is an alias for \",g\".\n    if (type === \"n\") comma = true, type = \"g\";\n\n    // The \"\" type, and any invalid type, is an alias for \".12~g\".\n    else if (!formatTypes[type]) precision === undefined && (precision = 12), trim = true, type = \"g\";\n\n    // If zero fill is specified, padding goes after sign and before digits.\n    if (zero || (fill === \"0\" && align === \"=\")) zero = true, fill = \"0\", align = \"=\";\n\n    // Compute the prefix and suffix.\n    // For SI-prefix, the suffix is lazily computed.\n    var prefix = symbol === \"$\" ? currencyPrefix : symbol === \"#\" && /[boxX]/.test(type) ? \"0\" + type.toLowerCase() : \"\",\n        suffix = symbol === \"$\" ? currencySuffix : /[%p]/.test(type) ? percent : \"\";\n\n    // What format function should we use?\n    // Is this an integer type?\n    // Can this type generate exponential notation?\n    var formatType = formatTypes[type],\n        maybeSuffix = /[defgprs%]/.test(type);\n\n    // Set the default precision if not specified,\n    // or clamp the specified precision to the supported range.\n    // For significant precision, it must be in [1, 21].\n    // For fixed precision, it must be in [0, 20].\n    precision = precision === undefined ? 6\n        : /[gprs]/.test(type) ? Math.max(1, Math.min(21, precision))\n        : Math.max(0, Math.min(20, precision));\n\n    function format(value) {\n      var valuePrefix = prefix,\n          valueSuffix = suffix,\n          i, n, c;\n\n      if (type === \"c\") {\n        valueSuffix = formatType(value) + valueSuffix;\n        value = \"\";\n      } else {\n        value = +value;\n\n        // Determine the sign. -0 is not less than 0, but 1 / -0 is!\n        var valueNegative = value < 0 || 1 / value < 0;\n\n        // Perform the initial formatting.\n        value = isNaN(value) ? nan : formatType(Math.abs(value), precision);\n\n        // Trim insignificant zeros.\n        if (trim) value = formatTrim(value);\n\n        // If a negative value rounds to zero after formatting, and no explicit positive sign is requested, hide the sign.\n        if (valueNegative && +value === 0 && sign !== \"+\") valueNegative = false;\n\n        // Compute the prefix and suffix.\n        valuePrefix = (valueNegative ? (sign === \"(\" ? sign : minus) : sign === \"-\" || sign === \"(\" ? \"\" : sign) + valuePrefix;\n        valueSuffix = (type === \"s\" ? prefixes[8 + prefixExponent / 3] : \"\") + valueSuffix + (valueNegative && sign === \"(\" ? \")\" : \"\");\n\n        // Break the formatted value into the integer \u201Cvalue\u201D part that can be\n        // grouped, and fractional or exponential \u201Csuffix\u201D part that is not.\n        if (maybeSuffix) {\n          i = -1, n = value.length;\n          while (++i < n) {\n            if (c = value.charCodeAt(i), 48 > c || c > 57) {\n              valueSuffix = (c === 46 ? decimal + value.slice(i + 1) : value.slice(i)) + valueSuffix;\n              value = value.slice(0, i);\n              break;\n            }\n          }\n        }\n      }\n\n      // If the fill character is not \"0\", grouping is applied before padding.\n      if (comma && !zero) value = group(value, Infinity);\n\n      // Compute the padding.\n      var length = valuePrefix.length + value.length + valueSuffix.length,\n          padding = length < width ? new Array(width - length + 1).join(fill) : \"\";\n\n      // If the fill character is \"0\", grouping is applied after padding.\n      if (comma && zero) value = group(padding + value, padding.length ? width - valueSuffix.length : Infinity), padding = \"\";\n\n      // Reconstruct the final output based on the desired alignment.\n      switch (align) {\n        case \"<\": value = valuePrefix + value + valueSuffix + padding; break;\n        case \"=\": value = valuePrefix + padding + value + valueSuffix; break;\n        case \"^\": value = padding.slice(0, length = padding.length >> 1) + valuePrefix + value + valueSuffix + padding.slice(length); break;\n        default: value = padding + valuePrefix + value + valueSuffix; break;\n      }\n\n      return numerals(value);\n    }\n\n    format.toString = function() {\n      return specifier + \"\";\n    };\n\n    return format;\n  }\n\n  function formatPrefix(specifier, value) {\n    var f = newFormat((specifier = formatSpecifier(specifier), specifier.type = \"f\", specifier)),\n        e = Math.max(-8, Math.min(8, Math.floor(exponent(value) / 3))) * 3,\n        k = Math.pow(10, -e),\n        prefix = prefixes[8 + e / 3];\n    return function(value) {\n      return f(k * value) + prefix;\n    };\n  }\n\n  return {\n    format: newFormat,\n    formatPrefix: formatPrefix\n  };\n}\n", "import formatLocale from \"./locale.js\";\n\nvar locale;\nexport var format;\nexport var formatPrefix;\n\ndefaultLocale({\n  thousands: \",\",\n  grouping: [3],\n  currency: [\"$\", \"\"]\n});\n\nexport default function defaultLocale(definition) {\n  locale = formatLocale(definition);\n  format = locale.format;\n  formatPrefix = locale.formatPrefix;\n  return locale;\n}\n", "import exponent from \"./exponent.js\";\n\nexport default function(step) {\n  return Math.max(0, -exponent(Math.abs(step)));\n}\n", "import exponent from \"./exponent.js\";\n\nexport default function(step, value) {\n  return Math.max(0, Math.max(-8, Math.min(8, Math.floor(exponent(value) / 3))) * 3 - exponent(Math.abs(step)));\n}\n", "import exponent from \"./exponent.js\";\n\nexport default function(step, max) {\n  step = Math.abs(step), max = Math.abs(max) - step;\n  return Math.max(0, exponent(max) - exponent(step)) + 1;\n}\n", "export var epsilon = 1e-6;\nexport var epsilon2 = 1e-12;\nexport var pi = Math.PI;\nexport var halfPi = pi / 2;\nexport var quarterPi = pi / 4;\nexport var tau = pi * 2;\n\nexport var degrees = 180 / pi;\nexport var radians = pi / 180;\n\nexport var abs = Math.abs;\nexport var atan = Math.atan;\nexport var atan2 = Math.atan2;\nexport var cos = Math.cos;\nexport var ceil = Math.ceil;\nexport var exp = Math.exp;\nexport var floor = Math.floor;\nexport var hypot = Math.hypot;\nexport var log = Math.log;\nexport var pow = Math.pow;\nexport var sin = Math.sin;\nexport var sign = Math.sign || function(x) { return x > 0 ? 1 : x < 0 ? -1 : 0; };\nexport var sqrt = Math.sqrt;\nexport var tan = Math.tan;\n\nexport function acos(x) {\n  return x > 1 ? 0 : x < -1 ? pi : Math.acos(x);\n}\n\nexport function asin(x) {\n  return x > 1 ? halfPi : x < -1 ? -halfPi : Math.asin(x);\n}\n\nexport function haversin(x) {\n  return (x = sin(x / 2)) * x;\n}\n", "export default function noop() {}\n", "function streamGeometry(geometry, stream) {\n  if (geometry && streamGeometryType.hasOwnProperty(geometry.type)) {\n    streamGeometryType[geometry.type](geometry, stream);\n  }\n}\n\nvar streamObjectType = {\n  Feature: function(object, stream) {\n    streamGeometry(object.geometry, stream);\n  },\n  FeatureCollection: function(object, stream) {\n    var features = object.features, i = -1, n = features.length;\n    while (++i < n) streamGeometry(features[i].geometry, stream);\n  }\n};\n\nvar streamGeometryType = {\n  Sphere: function(object, stream) {\n    stream.sphere();\n  },\n  Point: function(object, stream) {\n    object = object.coordinates;\n    stream.point(object[0], object[1], object[2]);\n  },\n  MultiPoint: function(object, stream) {\n    var coordinates = object.coordinates, i = -1, n = coordinates.length;\n    while (++i < n) object = coordinates[i], stream.point(object[0], object[1], object[2]);\n  },\n  LineString: function(object, stream) {\n    streamLine(object.coordinates, stream, 0);\n  },\n  MultiLineString: function(object, stream) {\n    var coordinates = object.coordinates, i = -1, n = coordinates.length;\n    while (++i < n) streamLine(coordinates[i], stream, 0);\n  },\n  Polygon: function(object, stream) {\n    streamPolygon(object.coordinates, stream);\n  },\n  MultiPolygon: function(object, stream) {\n    var coordinates = object.coordinates, i = -1, n = coordinates.length;\n    while (++i < n) streamPolygon(coordinates[i], stream);\n  },\n  GeometryCollection: function(object, stream) {\n    var geometries = object.geometries, i = -1, n = geometries.length;\n    while (++i < n) streamGeometry(geometries[i], stream);\n  }\n};\n\nfunction streamLine(coordinates, stream, closed) {\n  var i = -1, n = coordinates.length - closed, coordinate;\n  stream.lineStart();\n  while (++i < n) coordinate = coordinates[i], stream.point(coordinate[0], coordinate[1], coordinate[2]);\n  stream.lineEnd();\n}\n\nfunction streamPolygon(coordinates, stream) {\n  var i = -1, n = coordinates.length;\n  stream.polygonStart();\n  while (++i < n) streamLine(coordinates[i], stream, 1);\n  stream.polygonEnd();\n}\n\nexport default function(object, stream) {\n  if (object && streamObjectType.hasOwnProperty(object.type)) {\n    streamObjectType[object.type](object, stream);\n  } else {\n    streamGeometry(object, stream);\n  }\n}\n", "import {asin, atan2, cos, sin, sqrt} from \"./math.js\";\n\nexport function spherical(cartesian) {\n  return [atan2(cartesian[1], cartesian[0]), asin(cartesian[2])];\n}\n\nexport function cartesian(spherical) {\n  var lambda = spherical[0], phi = spherical[1], cosPhi = cos(phi);\n  return [cosPhi * cos(lambda), cosPhi * sin(lambda), sin(phi)];\n}\n\nexport function cartesianDot(a, b) {\n  return a[0] * b[0] + a[1] * b[1] + a[2] * b[2];\n}\n\nexport function cartesianCross(a, b) {\n  return [a[1] * b[2] - a[2] * b[1], a[2] * b[0] - a[0] * b[2], a[0] * b[1] - a[1] * b[0]];\n}\n\n// TODO return a\nexport function cartesianAddInPlace(a, b) {\n  a[0] += b[0], a[1] += b[1], a[2] += b[2];\n}\n\nexport function cartesianScale(vector, k) {\n  return [vector[0] * k, vector[1] * k, vector[2] * k];\n}\n\n// TODO return d\nexport function cartesianNormalizeInPlace(d) {\n  var l = sqrt(d[0] * d[0] + d[1] * d[1] + d[2] * d[2]);\n  d[0] /= l, d[1] /= l, d[2] /= l;\n}\n", "export default function(a, b) {\n\n  function compose(x, y) {\n    return x = a(x, y), b(x[0], x[1]);\n  }\n\n  if (a.invert && b.invert) compose.invert = function(x, y) {\n    return x = b.invert(x, y), x && a.invert(x[0], x[1]);\n  };\n\n  return compose;\n}\n", "import compose from \"./compose.js\";\nimport {abs, asin, atan2, cos, degrees, pi, radians, sin, tau} from \"./math.js\";\n\nfunction rotationIdentity(lambda, phi) {\n  if (abs(lambda) > pi) lambda -= Math.round(lambda / tau) * tau;\n  return [lambda, phi];\n}\n\nrotationIdentity.invert = rotationIdentity;\n\nexport function rotateRadians(deltaLambda, deltaPhi, deltaGamma) {\n  return (deltaLambda %= tau) ? (deltaPhi || deltaGamma ? compose(rotationLambda(deltaLambda), rotationPhiGamma(deltaPhi, deltaGamma))\n    : rotationLambda(deltaLambda))\n    : (deltaPhi || deltaGamma ? rotationPhiGamma(deltaPhi, deltaGamma)\n    : rotationIdentity);\n}\n\nfunction forwardRotationLambda(deltaLambda) {\n  return function(lambda, phi) {\n    lambda += deltaLambda;\n    if (abs(lambda) > pi) lambda -= Math.round(lambda / tau) * tau;\n    return [lambda, phi];\n  };\n}\n\nfunction rotationLambda(deltaLambda) {\n  var rotation = forwardRotationLambda(deltaLambda);\n  rotation.invert = forwardRotationLambda(-deltaLambda);\n  return rotation;\n}\n\nfunction rotationPhiGamma(deltaPhi, deltaGamma) {\n  var cosDeltaPhi = cos(deltaPhi),\n      sinDeltaPhi = sin(deltaPhi),\n      cosDeltaGamma = cos(deltaGamma),\n      sinDeltaGamma = sin(deltaGamma);\n\n  function rotation(lambda, phi) {\n    var cosPhi = cos(phi),\n        x = cos(lambda) * cosPhi,\n        y = sin(lambda) * cosPhi,\n        z = sin(phi),\n        k = z * cosDeltaPhi + x * sinDeltaPhi;\n    return [\n      atan2(y * cosDeltaGamma - k * sinDeltaGamma, x * cosDeltaPhi - z * sinDeltaPhi),\n      asin(k * cosDeltaGamma + y * sinDeltaGamma)\n    ];\n  }\n\n  rotation.invert = function(lambda, phi) {\n    var cosPhi = cos(phi),\n        x = cos(lambda) * cosPhi,\n        y = sin(lambda) * cosPhi,\n        z = sin(phi),\n        k = z * cosDeltaGamma - y * sinDeltaGamma;\n    return [\n      atan2(y * cosDeltaGamma + z * sinDeltaGamma, x * cosDeltaPhi + k * sinDeltaPhi),\n      asin(k * cosDeltaPhi - x * sinDeltaPhi)\n    ];\n  };\n\n  return rotation;\n}\n\nexport default function(rotate) {\n  rotate = rotateRadians(rotate[0] * radians, rotate[1] * radians, rotate.length > 2 ? rotate[2] * radians : 0);\n\n  function forward(coordinates) {\n    coordinates = rotate(coordinates[0] * radians, coordinates[1] * radians);\n    return coordinates[0] *= degrees, coordinates[1] *= degrees, coordinates;\n  }\n\n  forward.invert = function(coordinates) {\n    coordinates = rotate.invert(coordinates[0] * radians, coordinates[1] * radians);\n    return coordinates[0] *= degrees, coordinates[1] *= degrees, coordinates;\n  };\n\n  return forward;\n}\n", "import {cartesian, cartesianNormalizeInPlace, spherical} from \"./cartesian.js\";\nimport constant from \"./constant.js\";\nimport {acos, cos, degrees, epsilon, radians, sin, tau} from \"./math.js\";\nimport {rotateRadians} from \"./rotation.js\";\n\n// Generates a circle centered at [0\u00B0, 0\u00B0], with a given radius and precision.\nexport function circleStream(stream, radius, delta, direction, t0, t1) {\n  if (!delta) return;\n  var cosRadius = cos(radius),\n      sinRadius = sin(radius),\n      step = direction * delta;\n  if (t0 == null) {\n    t0 = radius + direction * tau;\n    t1 = radius - step / 2;\n  } else {\n    t0 = circleRadius(cosRadius, t0);\n    t1 = circleRadius(cosRadius, t1);\n    if (direction > 0 ? t0 < t1 : t0 > t1) t0 += direction * tau;\n  }\n  for (var point, t = t0; direction > 0 ? t > t1 : t < t1; t -= step) {\n    point = spherical([cosRadius, -sinRadius * cos(t), -sinRadius * sin(t)]);\n    stream.point(point[0], point[1]);\n  }\n}\n\n// Returns the signed angle of a cartesian point relative to [cosRadius, 0, 0].\nfunction circleRadius(cosRadius, point) {\n  point = cartesian(point), point[0] -= cosRadius;\n  cartesianNormalizeInPlace(point);\n  var radius = acos(-point[1]);\n  return ((-point[2] < 0 ? -radius : radius) + tau - epsilon) % tau;\n}\n\nexport default function() {\n  var center = constant([0, 0]),\n      radius = constant(90),\n      precision = constant(6),\n      ring,\n      rotate,\n      stream = {point: point};\n\n  function point(x, y) {\n    ring.push(x = rotate(x, y));\n    x[0] *= degrees, x[1] *= degrees;\n  }\n\n  function circle() {\n    var c = center.apply(this, arguments),\n        r = radius.apply(this, arguments) * radians,\n        p = precision.apply(this, arguments) * radians;\n    ring = [];\n    rotate = rotateRadians(-c[0] * radians, -c[1] * radians, 0).invert;\n    circleStream(stream, r, p, 1);\n    c = {type: \"Polygon\", coordinates: [ring]};\n    ring = rotate = null;\n    return c;\n  }\n\n  circle.center = function(_) {\n    return arguments.length ? (center = typeof _ === \"function\" ? _ : constant([+_[0], +_[1]]), circle) : center;\n  };\n\n  circle.radius = function(_) {\n    return arguments.length ? (radius = typeof _ === \"function\" ? _ : constant(+_), circle) : radius;\n  };\n\n  circle.precision = function(_) {\n    return arguments.length ? (precision = typeof _ === \"function\" ? _ : constant(+_), circle) : precision;\n  };\n\n  return circle;\n}\n", "import noop from \"../noop.js\";\n\nexport default function() {\n  var lines = [],\n      line;\n  return {\n    point: function(x, y, m) {\n      line.push([x, y, m]);\n    },\n    lineStart: function() {\n      lines.push(line = []);\n    },\n    lineEnd: noop,\n    rejoin: function() {\n      if (lines.length > 1) lines.push(lines.pop().concat(lines.shift()));\n    },\n    result: function() {\n      var result = lines;\n      lines = [];\n      line = null;\n      return result;\n    }\n  };\n}\n", "import {abs, epsilon} from \"./math.js\";\n\nexport default function(a, b) {\n  return abs(a[0] - b[0]) < epsilon && abs(a[1] - b[1]) < epsilon;\n}\n", "import pointEqual from \"../pointEqual.js\";\nimport {epsilon} from \"../math.js\";\n\nfunction Intersection(point, points, other, entry) {\n  this.x = point;\n  this.z = points;\n  this.o = other; // another intersection\n  this.e = entry; // is an entry?\n  this.v = false; // visited\n  this.n = this.p = null; // next & previous\n}\n\n// A generalized polygon clipping algorithm: given a polygon that has been cut\n// into its visible line segments, and rejoins the segments by interpolating\n// along the clip edge.\nexport default function(segments, compareIntersection, startInside, interpolate, stream) {\n  var subject = [],\n      clip = [],\n      i,\n      n;\n\n  segments.forEach(function(segment) {\n    if ((n = segment.length - 1) <= 0) return;\n    var n, p0 = segment[0], p1 = segment[n], x;\n\n    if (pointEqual(p0, p1)) {\n      if (!p0[2] && !p1[2]) {\n        stream.lineStart();\n        for (i = 0; i < n; ++i) stream.point((p0 = segment[i])[0], p0[1]);\n        stream.lineEnd();\n        return;\n      }\n      // handle degenerate cases by moving the point\n      p1[0] += 2 * epsilon;\n    }\n\n    subject.push(x = new Intersection(p0, segment, null, true));\n    clip.push(x.o = new Intersection(p0, null, x, false));\n    subject.push(x = new Intersection(p1, segment, null, false));\n    clip.push(x.o = new Intersection(p1, null, x, true));\n  });\n\n  if (!subject.length) return;\n\n  clip.sort(compareIntersection);\n  link(subject);\n  link(clip);\n\n  for (i = 0, n = clip.length; i < n; ++i) {\n    clip[i].e = startInside = !startInside;\n  }\n\n  var start = subject[0],\n      points,\n      point;\n\n  while (1) {\n    // Find first unvisited intersection.\n    var current = start,\n        isSubject = true;\n    while (current.v) if ((current = current.n) === start) return;\n    points = current.z;\n    stream.lineStart();\n    do {\n      current.v = current.o.v = true;\n      if (current.e) {\n        if (isSubject) {\n          for (i = 0, n = points.length; i < n; ++i) stream.point((point = points[i])[0], point[1]);\n        } else {\n          interpolate(current.x, current.n.x, 1, stream);\n        }\n        current = current.n;\n      } else {\n        if (isSubject) {\n          points = current.p.z;\n          for (i = points.length - 1; i >= 0; --i) stream.point((point = points[i])[0], point[1]);\n        } else {\n          interpolate(current.x, current.p.x, -1, stream);\n        }\n        current = current.p;\n      }\n      current = current.o;\n      points = current.z;\n      isSubject = !isSubject;\n    } while (!current.v);\n    stream.lineEnd();\n  }\n}\n\nfunction link(array) {\n  if (!(n = array.length)) return;\n  var n,\n      i = 0,\n      a = array[0],\n      b;\n  while (++i < n) {\n    a.n = b = array[i];\n    b.p = a;\n    a = b;\n  }\n  a.n = b = array[0];\n  b.p = a;\n}\n", "import {Adder} from \"d3-array\";\nimport {cartesian, cartesianCross, cartesianNormalizeInPlace} from \"./cartesian.js\";\nimport {abs, asin, atan2, cos, epsilon, epsilon2, halfPi, pi, quarterPi, sign, sin, tau} from \"./math.js\";\n\nfunction longitude(point) {\n  return abs(point[0]) <= pi ? point[0] : sign(point[0]) * ((abs(point[0]) + pi) % tau - pi);\n}\n\nexport default function(polygon, point) {\n  var lambda = longitude(point),\n      phi = point[1],\n      sinPhi = sin(phi),\n      normal = [sin(lambda), -cos(lambda), 0],\n      angle = 0,\n      winding = 0;\n\n  var sum = new Adder();\n\n  if (sinPhi === 1) phi = halfPi + epsilon;\n  else if (sinPhi === -1) phi = -halfPi - epsilon;\n\n  for (var i = 0, n = polygon.length; i < n; ++i) {\n    if (!(m = (ring = polygon[i]).length)) continue;\n    var ring,\n        m,\n        point0 = ring[m - 1],\n        lambda0 = longitude(point0),\n        phi0 = point0[1] / 2 + quarterPi,\n        sinPhi0 = sin(phi0),\n        cosPhi0 = cos(phi0);\n\n    for (var j = 0; j < m; ++j, lambda0 = lambda1, sinPhi0 = sinPhi1, cosPhi0 = cosPhi1, point0 = point1) {\n      var point1 = ring[j],\n          lambda1 = longitude(point1),\n          phi1 = point1[1] / 2 + quarterPi,\n          sinPhi1 = sin(phi1),\n          cosPhi1 = cos(phi1),\n          delta = lambda1 - lambda0,\n          sign = delta >= 0 ? 1 : -1,\n          absDelta = sign * delta,\n          antimeridian = absDelta > pi,\n          k = sinPhi0 * sinPhi1;\n\n      sum.add(atan2(k * sign * sin(absDelta), cosPhi0 * cosPhi1 + k * cos(absDelta)));\n      angle += antimeridian ? delta + sign * tau : delta;\n\n      // Are the longitudes either side of the point\u2019s meridian (lambda),\n      // and are the latitudes smaller than the parallel (phi)?\n      if (antimeridian ^ lambda0 >= lambda ^ lambda1 >= lambda) {\n        var arc = cartesianCross(cartesian(point0), cartesian(point1));\n        cartesianNormalizeInPlace(arc);\n        var intersection = cartesianCross(normal, arc);\n        cartesianNormalizeInPlace(intersection);\n        var phiArc = (antimeridian ^ delta >= 0 ? -1 : 1) * asin(intersection[2]);\n        if (phi > phiArc || phi === phiArc && (arc[0] || arc[1])) {\n          winding += antimeridian ^ delta >= 0 ? 1 : -1;\n        }\n      }\n    }\n  }\n\n  // First, determine whether the South pole is inside or outside:\n  //\n  // It is inside if:\n  // * the polygon winds around it in a clockwise direction.\n  // * the polygon does not (cumulatively) wind around it, but has a negative\n  //   (counter-clockwise) area.\n  //\n  // Second, count the (signed) number of times a segment crosses a lambda\n  // from the point to the South pole.  If it is zero, then the point is the\n  // same side as the South pole.\n\n  return (angle < -epsilon || angle < epsilon && sum < -epsilon2) ^ (winding & 1);\n}\n", "import clipBuffer from \"./buffer.js\";\nimport clipRejoin from \"./rejoin.js\";\nimport {epsilon, halfPi} from \"../math.js\";\nimport polygonContains from \"../polygonContains.js\";\nimport {merge} from \"d3-array\";\n\nexport default function(pointVisible, clipLine, interpolate, start) {\n  return function(sink) {\n    var line = clipLine(sink),\n        ringBuffer = clipBuffer(),\n        ringSink = clipLine(ringBuffer),\n        polygonStarted = false,\n        polygon,\n        segments,\n        ring;\n\n    var clip = {\n      point: point,\n      lineStart: lineStart,\n      lineEnd: lineEnd,\n      polygonStart: function() {\n        clip.point = pointRing;\n        clip.lineStart = ringStart;\n        clip.lineEnd = ringEnd;\n        segments = [];\n        polygon = [];\n      },\n      polygonEnd: function() {\n        clip.point = point;\n        clip.lineStart = lineStart;\n        clip.lineEnd = lineEnd;\n        segments = merge(segments);\n        var startInside = polygonContains(polygon, start);\n        if (segments.length) {\n          if (!polygonStarted) sink.polygonStart(), polygonStarted = true;\n          clipRejoin(segments, compareIntersection, startInside, interpolate, sink);\n        } else if (startInside) {\n          if (!polygonStarted) sink.polygonStart(), polygonStarted = true;\n          sink.lineStart();\n          interpolate(null, null, 1, sink);\n          sink.lineEnd();\n        }\n        if (polygonStarted) sink.polygonEnd(), polygonStarted = false;\n        segments = polygon = null;\n      },\n      sphere: function() {\n        sink.polygonStart();\n        sink.lineStart();\n        interpolate(null, null, 1, sink);\n        sink.lineEnd();\n        sink.polygonEnd();\n      }\n    };\n\n    function point(lambda, phi) {\n      if (pointVisible(lambda, phi)) sink.point(lambda, phi);\n    }\n\n    function pointLine(lambda, phi) {\n      line.point(lambda, phi);\n    }\n\n    function lineStart() {\n      clip.point = pointLine;\n      line.lineStart();\n    }\n\n    function lineEnd() {\n      clip.point = point;\n      line.lineEnd();\n    }\n\n    function pointRing(lambda, phi) {\n      ring.push([lambda, phi]);\n      ringSink.point(lambda, phi);\n    }\n\n    function ringStart() {\n      ringSink.lineStart();\n      ring = [];\n    }\n\n    function ringEnd() {\n      pointRing(ring[0][0], ring[0][1]);\n      ringSink.lineEnd();\n\n      var clean = ringSink.clean(),\n          ringSegments = ringBuffer.result(),\n          i, n = ringSegments.length, m,\n          segment,\n          point;\n\n      ring.pop();\n      polygon.push(ring);\n      ring = null;\n\n      if (!n) return;\n\n      // No intersections.\n      if (clean & 1) {\n        segment = ringSegments[0];\n        if ((m = segment.length - 1) > 0) {\n          if (!polygonStarted) sink.polygonStart(), polygonStarted = true;\n          sink.lineStart();\n          for (i = 0; i < m; ++i) sink.point((point = segment[i])[0], point[1]);\n          sink.lineEnd();\n        }\n        return;\n      }\n\n      // Rejoin connected segments.\n      // TODO reuse ringBuffer.rejoin()?\n      if (n > 1 && clean & 2) ringSegments.push(ringSegments.pop().concat(ringSegments.shift()));\n\n      segments.push(ringSegments.filter(validSegment));\n    }\n\n    return clip;\n  };\n}\n\nfunction validSegment(segment) {\n  return segment.length > 1;\n}\n\n// Intersections are sorted along the clip edge. For both antimeridian cutting\n// and circle clipping, the same comparison is used.\nfunction compareIntersection(a, b) {\n  return ((a = a.x)[0] < 0 ? a[1] - halfPi - epsilon : halfPi - a[1])\n       - ((b = b.x)[0] < 0 ? b[1] - halfPi - epsilon : halfPi - b[1]);\n}\n", "import clip from \"./index.js\";\nimport {abs, atan, cos, epsilon, halfPi, pi, sin} from \"../math.js\";\n\nexport default clip(\n  function() { return true; },\n  clipAntimeridianLine,\n  clipAntimeridianInterpolate,\n  [-pi, -halfPi]\n);\n\n// Takes a line and cuts into visible segments. Return values: 0 - there were\n// intersections or the line was empty; 1 - no intersections; 2 - there were\n// intersections, and the first and last segments should be rejoined.\nfunction clipAntimeridianLine(stream) {\n  var lambda0 = NaN,\n      phi0 = NaN,\n      sign0 = NaN,\n      clean; // no intersections\n\n  return {\n    lineStart: function() {\n      stream.lineStart();\n      clean = 1;\n    },\n    point: function(lambda1, phi1) {\n      var sign1 = lambda1 > 0 ? pi : -pi,\n          delta = abs(lambda1 - lambda0);\n      if (abs(delta - pi) < epsilon) { // line crosses a pole\n        stream.point(lambda0, phi0 = (phi0 + phi1) / 2 > 0 ? halfPi : -halfPi);\n        stream.point(sign0, phi0);\n        stream.lineEnd();\n        stream.lineStart();\n        stream.point(sign1, phi0);\n        stream.point(lambda1, phi0);\n        clean = 0;\n      } else if (sign0 !== sign1 && delta >= pi) { // line crosses antimeridian\n        if (abs(lambda0 - sign0) < epsilon) lambda0 -= sign0 * epsilon; // handle degeneracies\n        if (abs(lambda1 - sign1) < epsilon) lambda1 -= sign1 * epsilon;\n        phi0 = clipAntimeridianIntersect(lambda0, phi0, lambda1, phi1);\n        stream.point(sign0, phi0);\n        stream.lineEnd();\n        stream.lineStart();\n        stream.point(sign1, phi0);\n        clean = 0;\n      }\n      stream.point(lambda0 = lambda1, phi0 = phi1);\n      sign0 = sign1;\n    },\n    lineEnd: function() {\n      stream.lineEnd();\n      lambda0 = phi0 = NaN;\n    },\n    clean: function() {\n      return 2 - clean; // if intersections, rejoin first and last segments\n    }\n  };\n}\n\nfunction clipAntimeridianIntersect(lambda0, phi0, lambda1, phi1) {\n  var cosPhi0,\n      cosPhi1,\n      sinLambda0Lambda1 = sin(lambda0 - lambda1);\n  return abs(sinLambda0Lambda1) > epsilon\n      ? atan((sin(phi0) * (cosPhi1 = cos(phi1)) * sin(lambda1)\n          - sin(phi1) * (cosPhi0 = cos(phi0)) * sin(lambda0))\n          / (cosPhi0 * cosPhi1 * sinLambda0Lambda1))\n      : (phi0 + phi1) / 2;\n}\n\nfunction clipAntimeridianInterpolate(from, to, direction, stream) {\n  var phi;\n  if (from == null) {\n    phi = direction * halfPi;\n    stream.point(-pi, phi);\n    stream.point(0, phi);\n    stream.point(pi, phi);\n    stream.point(pi, 0);\n    stream.point(pi, -phi);\n    stream.point(0, -phi);\n    stream.point(-pi, -phi);\n    stream.point(-pi, 0);\n    stream.point(-pi, phi);\n  } else if (abs(from[0] - to[0]) > epsilon) {\n    var lambda = from[0] < to[0] ? pi : -pi;\n    phi = direction * lambda / 2;\n    stream.point(-lambda, phi);\n    stream.point(0, phi);\n    stream.point(lambda, phi);\n  } else {\n    stream.point(to[0], to[1]);\n  }\n}\n", "import {cartesian, cartesianAddInPlace, cartesianCross, cartesianDot, cartesianScale, spherical} from \"../cartesian.js\";\nimport {circleStream} from \"../circle.js\";\nimport {abs, cos, epsilon, pi, radians, sqrt} from \"../math.js\";\nimport pointEqual from \"../pointEqual.js\";\nimport clip from \"./index.js\";\n\nexport default function(radius) {\n  var cr = cos(radius),\n      delta = 6 * radians,\n      smallRadius = cr > 0,\n      notHemisphere = abs(cr) > epsilon; // TODO optimise for this common case\n\n  function interpolate(from, to, direction, stream) {\n    circleStream(stream, radius, delta, direction, from, to);\n  }\n\n  function visible(lambda, phi) {\n    return cos(lambda) * cos(phi) > cr;\n  }\n\n  // Takes a line and cuts into visible segments. Return values used for polygon\n  // clipping: 0 - there were intersections or the line was empty; 1 - no\n  // intersections 2 - there were intersections, and the first and last segments\n  // should be rejoined.\n  function clipLine(stream) {\n    var point0, // previous point\n        c0, // code for previous point\n        v0, // visibility of previous point\n        v00, // visibility of first point\n        clean; // no intersections\n    return {\n      lineStart: function() {\n        v00 = v0 = false;\n        clean = 1;\n      },\n      point: function(lambda, phi) {\n        var point1 = [lambda, phi],\n            point2,\n            v = visible(lambda, phi),\n            c = smallRadius\n              ? v ? 0 : code(lambda, phi)\n              : v ? code(lambda + (lambda < 0 ? pi : -pi), phi) : 0;\n        if (!point0 && (v00 = v0 = v)) stream.lineStart();\n        if (v !== v0) {\n          point2 = intersect(point0, point1);\n          if (!point2 || pointEqual(point0, point2) || pointEqual(point1, point2))\n            point1[2] = 1;\n        }\n        if (v !== v0) {\n          clean = 0;\n          if (v) {\n            // outside going in\n            stream.lineStart();\n            point2 = intersect(point1, point0);\n            stream.point(point2[0], point2[1]);\n          } else {\n            // inside going out\n            point2 = intersect(point0, point1);\n            stream.point(point2[0], point2[1], 2);\n            stream.lineEnd();\n          }\n          point0 = point2;\n        } else if (notHemisphere && point0 && smallRadius ^ v) {\n          var t;\n          // If the codes for two points are different, or are both zero,\n          // and there this segment intersects with the small circle.\n          if (!(c & c0) && (t = intersect(point1, point0, true))) {\n            clean = 0;\n            if (smallRadius) {\n              stream.lineStart();\n              stream.point(t[0][0], t[0][1]);\n              stream.point(t[1][0], t[1][1]);\n              stream.lineEnd();\n            } else {\n              stream.point(t[1][0], t[1][1]);\n              stream.lineEnd();\n              stream.lineStart();\n              stream.point(t[0][0], t[0][1], 3);\n            }\n          }\n        }\n        if (v && (!point0 || !pointEqual(point0, point1))) {\n          stream.point(point1[0], point1[1]);\n        }\n        point0 = point1, v0 = v, c0 = c;\n      },\n      lineEnd: function() {\n        if (v0) stream.lineEnd();\n        point0 = null;\n      },\n      // Rejoin first and last segments if there were intersections and the first\n      // and last points were visible.\n      clean: function() {\n        return clean | ((v00 && v0) << 1);\n      }\n    };\n  }\n\n  // Intersects the great circle between a and b with the clip circle.\n  function intersect(a, b, two) {\n    var pa = cartesian(a),\n        pb = cartesian(b);\n\n    // We have two planes, n1.p = d1 and n2.p = d2.\n    // Find intersection line p(t) = c1 n1 + c2 n2 + t (n1 \u2A2F n2).\n    var n1 = [1, 0, 0], // normal\n        n2 = cartesianCross(pa, pb),\n        n2n2 = cartesianDot(n2, n2),\n        n1n2 = n2[0], // cartesianDot(n1, n2),\n        determinant = n2n2 - n1n2 * n1n2;\n\n    // Two polar points.\n    if (!determinant) return !two && a;\n\n    var c1 =  cr * n2n2 / determinant,\n        c2 = -cr * n1n2 / determinant,\n        n1xn2 = cartesianCross(n1, n2),\n        A = cartesianScale(n1, c1),\n        B = cartesianScale(n2, c2);\n    cartesianAddInPlace(A, B);\n\n    // Solve |p(t)|^2 = 1.\n    var u = n1xn2,\n        w = cartesianDot(A, u),\n        uu = cartesianDot(u, u),\n        t2 = w * w - uu * (cartesianDot(A, A) - 1);\n\n    if (t2 < 0) return;\n\n    var t = sqrt(t2),\n        q = cartesianScale(u, (-w - t) / uu);\n    cartesianAddInPlace(q, A);\n    q = spherical(q);\n\n    if (!two) return q;\n\n    // Two intersection points.\n    var lambda0 = a[0],\n        lambda1 = b[0],\n        phi0 = a[1],\n        phi1 = b[1],\n        z;\n\n    if (lambda1 < lambda0) z = lambda0, lambda0 = lambda1, lambda1 = z;\n\n    var delta = lambda1 - lambda0,\n        polar = abs(delta - pi) < epsilon,\n        meridian = polar || delta < epsilon;\n\n    if (!polar && phi1 < phi0) z = phi0, phi0 = phi1, phi1 = z;\n\n    // Check that the first point is between a and b.\n    if (meridian\n        ? polar\n          ? phi0 + phi1 > 0 ^ q[1] < (abs(q[0] - lambda0) < epsilon ? phi0 : phi1)\n          : phi0 <= q[1] && q[1] <= phi1\n        : delta > pi ^ (lambda0 <= q[0] && q[0] <= lambda1)) {\n      var q1 = cartesianScale(u, (-w + t) / uu);\n      cartesianAddInPlace(q1, A);\n      return [q, spherical(q1)];\n    }\n  }\n\n  // Generates a 4-bit vector representing the location of a point relative to\n  // the small circle's bounding box.\n  function code(lambda, phi) {\n    var r = smallRadius ? radius : pi - radius,\n        code = 0;\n    if (lambda < -r) code |= 1; // left\n    else if (lambda > r) code |= 2; // right\n    if (phi < -r) code |= 4; // below\n    else if (phi > r) code |= 8; // above\n    return code;\n  }\n\n  return clip(visible, clipLine, interpolate, smallRadius ? [0, -radius] : [-pi, radius - pi]);\n}\n", "export default function(a, b, x0, y0, x1, y1) {\n  var ax = a[0],\n      ay = a[1],\n      bx = b[0],\n      by = b[1],\n      t0 = 0,\n      t1 = 1,\n      dx = bx - ax,\n      dy = by - ay,\n      r;\n\n  r = x0 - ax;\n  if (!dx && r > 0) return;\n  r /= dx;\n  if (dx < 0) {\n    if (r < t0) return;\n    if (r < t1) t1 = r;\n  } else if (dx > 0) {\n    if (r > t1) return;\n    if (r > t0) t0 = r;\n  }\n\n  r = x1 - ax;\n  if (!dx && r < 0) return;\n  r /= dx;\n  if (dx < 0) {\n    if (r > t1) return;\n    if (r > t0) t0 = r;\n  } else if (dx > 0) {\n    if (r < t0) return;\n    if (r < t1) t1 = r;\n  }\n\n  r = y0 - ay;\n  if (!dy && r > 0) return;\n  r /= dy;\n  if (dy < 0) {\n    if (r < t0) return;\n    if (r < t1) t1 = r;\n  } else if (dy > 0) {\n    if (r > t1) return;\n    if (r > t0) t0 = r;\n  }\n\n  r = y1 - ay;\n  if (!dy && r < 0) return;\n  r /= dy;\n  if (dy < 0) {\n    if (r > t1) return;\n    if (r > t0) t0 = r;\n  } else if (dy > 0) {\n    if (r < t0) return;\n    if (r < t1) t1 = r;\n  }\n\n  if (t0 > 0) a[0] = ax + t0 * dx, a[1] = ay + t0 * dy;\n  if (t1 < 1) b[0] = ax + t1 * dx, b[1] = ay + t1 * dy;\n  return true;\n}\n", "import {abs, epsilon} from \"../math.js\";\nimport clipBuffer from \"./buffer.js\";\nimport clipLine from \"./line.js\";\nimport clipRejoin from \"./rejoin.js\";\nimport {merge} from \"d3-array\";\n\nvar clipMax = 1e9, clipMin = -clipMax;\n\n// TODO Use d3-polygon\u2019s polygonContains here for the ring check?\n// TODO Eliminate duplicate buffering in clipBuffer and polygon.push?\n\nexport default function clipRectangle(x0, y0, x1, y1) {\n\n  function visible(x, y) {\n    return x0 <= x && x <= x1 && y0 <= y && y <= y1;\n  }\n\n  function interpolate(from, to, direction, stream) {\n    var a = 0, a1 = 0;\n    if (from == null\n        || (a = corner(from, direction)) !== (a1 = corner(to, direction))\n        || comparePoint(from, to) < 0 ^ direction > 0) {\n      do stream.point(a === 0 || a === 3 ? x0 : x1, a > 1 ? y1 : y0);\n      while ((a = (a + direction + 4) % 4) !== a1);\n    } else {\n      stream.point(to[0], to[1]);\n    }\n  }\n\n  function corner(p, direction) {\n    return abs(p[0] - x0) < epsilon ? direction > 0 ? 0 : 3\n        : abs(p[0] - x1) < epsilon ? direction > 0 ? 2 : 1\n        : abs(p[1] - y0) < epsilon ? direction > 0 ? 1 : 0\n        : direction > 0 ? 3 : 2; // abs(p[1] - y1) < epsilon\n  }\n\n  function compareIntersection(a, b) {\n    return comparePoint(a.x, b.x);\n  }\n\n  function comparePoint(a, b) {\n    var ca = corner(a, 1),\n        cb = corner(b, 1);\n    return ca !== cb ? ca - cb\n        : ca === 0 ? b[1] - a[1]\n        : ca === 1 ? a[0] - b[0]\n        : ca === 2 ? a[1] - b[1]\n        : b[0] - a[0];\n  }\n\n  return function(stream) {\n    var activeStream = stream,\n        bufferStream = clipBuffer(),\n        segments,\n        polygon,\n        ring,\n        x__, y__, v__, // first point\n        x_, y_, v_, // previous point\n        first,\n        clean;\n\n    var clipStream = {\n      point: point,\n      lineStart: lineStart,\n      lineEnd: lineEnd,\n      polygonStart: polygonStart,\n      polygonEnd: polygonEnd\n    };\n\n    function point(x, y) {\n      if (visible(x, y)) activeStream.point(x, y);\n    }\n\n    function polygonInside() {\n      var winding = 0;\n\n      for (var i = 0, n = polygon.length; i < n; ++i) {\n        for (var ring = polygon[i], j = 1, m = ring.length, point = ring[0], a0, a1, b0 = point[0], b1 = point[1]; j < m; ++j) {\n          a0 = b0, a1 = b1, point = ring[j], b0 = point[0], b1 = point[1];\n          if (a1 <= y1) { if (b1 > y1 && (b0 - a0) * (y1 - a1) > (b1 - a1) * (x0 - a0)) ++winding; }\n          else { if (b1 <= y1 && (b0 - a0) * (y1 - a1) < (b1 - a1) * (x0 - a0)) --winding; }\n        }\n      }\n\n      return winding;\n    }\n\n    // Buffer geometry within a polygon and then clip it en masse.\n    function polygonStart() {\n      activeStream = bufferStream, segments = [], polygon = [], clean = true;\n    }\n\n    function polygonEnd() {\n      var startInside = polygonInside(),\n          cleanInside = clean && startInside,\n          visible = (segments = merge(segments)).length;\n      if (cleanInside || visible) {\n        stream.polygonStart();\n        if (cleanInside) {\n          stream.lineStart();\n          interpolate(null, null, 1, stream);\n          stream.lineEnd();\n        }\n        if (visible) {\n          clipRejoin(segments, compareIntersection, startInside, interpolate, stream);\n        }\n        stream.polygonEnd();\n      }\n      activeStream = stream, segments = polygon = ring = null;\n    }\n\n    function lineStart() {\n      clipStream.point = linePoint;\n      if (polygon) polygon.push(ring = []);\n      first = true;\n      v_ = false;\n      x_ = y_ = NaN;\n    }\n\n    // TODO rather than special-case polygons, simply handle them separately.\n    // Ideally, coincident intersection points should be jittered to avoid\n    // clipping issues.\n    function lineEnd() {\n      if (segments) {\n        linePoint(x__, y__);\n        if (v__ && v_) bufferStream.rejoin();\n        segments.push(bufferStream.result());\n      }\n      clipStream.point = point;\n      if (v_) activeStream.lineEnd();\n    }\n\n    function linePoint(x, y) {\n      var v = visible(x, y);\n      if (polygon) ring.push([x, y]);\n      if (first) {\n        x__ = x, y__ = y, v__ = v;\n        first = false;\n        if (v) {\n          activeStream.lineStart();\n          activeStream.point(x, y);\n        }\n      } else {\n        if (v && v_) activeStream.point(x, y);\n        else {\n          var a = [x_ = Math.max(clipMin, Math.min(clipMax, x_)), y_ = Math.max(clipMin, Math.min(clipMax, y_))],\n              b = [x = Math.max(clipMin, Math.min(clipMax, x)), y = Math.max(clipMin, Math.min(clipMax, y))];\n          if (clipLine(a, b, x0, y0, x1, y1)) {\n            if (!v_) {\n              activeStream.lineStart();\n              activeStream.point(a[0], a[1]);\n            }\n            activeStream.point(b[0], b[1]);\n            if (!v) activeStream.lineEnd();\n            clean = false;\n          } else if (v) {\n            activeStream.lineStart();\n            activeStream.point(x, y);\n            clean = false;\n          }\n        }\n      }\n      x_ = x, y_ = y, v_ = v;\n    }\n\n    return clipStream;\n  };\n}\n", "export default x => x;\n", "import {Adder} from \"d3-array\";\nimport {abs} from \"../math.js\";\nimport noop from \"../noop.js\";\n\nvar areaSum = new Adder(),\n    areaRingSum = new Adder(),\n    x00,\n    y00,\n    x0,\n    y0;\n\nvar areaStream = {\n  point: noop,\n  lineStart: noop,\n  lineEnd: noop,\n  polygonStart: function() {\n    areaStream.lineStart = areaRingStart;\n    areaStream.lineEnd = areaRingEnd;\n  },\n  polygonEnd: function() {\n    areaStream.lineStart = areaStream.lineEnd = areaStream.point = noop;\n    areaSum.add(abs(areaRingSum));\n    areaRingSum = new Adder();\n  },\n  result: function() {\n    var area = areaSum / 2;\n    areaSum = new Adder();\n    return area;\n  }\n};\n\nfunction areaRingStart() {\n  areaStream.point = areaPointFirst;\n}\n\nfunction areaPointFirst(x, y) {\n  areaStream.point = areaPoint;\n  x00 = x0 = x, y00 = y0 = y;\n}\n\nfunction areaPoint(x, y) {\n  areaRingSum.add(y0 * x - x0 * y);\n  x0 = x, y0 = y;\n}\n\nfunction areaRingEnd() {\n  areaPoint(x00, y00);\n}\n\nexport default areaStream;\n", "import noop from \"../noop.js\";\n\nvar x0 = Infinity,\n    y0 = x0,\n    x1 = -x0,\n    y1 = x1;\n\nvar boundsStream = {\n  point: boundsPoint,\n  lineStart: noop,\n  lineEnd: noop,\n  polygonStart: noop,\n  polygonEnd: noop,\n  result: function() {\n    var bounds = [[x0, y0], [x1, y1]];\n    x1 = y1 = -(y0 = x0 = Infinity);\n    return bounds;\n  }\n};\n\nfunction boundsPoint(x, y) {\n  if (x < x0) x0 = x;\n  if (x > x1) x1 = x;\n  if (y < y0) y0 = y;\n  if (y > y1) y1 = y;\n}\n\nexport default boundsStream;\n", "import {sqrt} from \"../math.js\";\n\n// TODO Enforce positive area for exterior, negative area for interior?\n\nvar X0 = 0,\n    Y0 = 0,\n    Z0 = 0,\n    X1 = 0,\n    Y1 = 0,\n    Z1 = 0,\n    X2 = 0,\n    Y2 = 0,\n    Z2 = 0,\n    x00,\n    y00,\n    x0,\n    y0;\n\nvar centroidStream = {\n  point: centroidPoint,\n  lineStart: centroidLineStart,\n  lineEnd: centroidLineEnd,\n  polygonStart: function() {\n    centroidStream.lineStart = centroidRingStart;\n    centroidStream.lineEnd = centroidRingEnd;\n  },\n  polygonEnd: function() {\n    centroidStream.point = centroidPoint;\n    centroidStream.lineStart = centroidLineStart;\n    centroidStream.lineEnd = centroidLineEnd;\n  },\n  result: function() {\n    var centroid = Z2 ? [X2 / Z2, Y2 / Z2]\n        : Z1 ? [X1 / Z1, Y1 / Z1]\n        : Z0 ? [X0 / Z0, Y0 / Z0]\n        : [NaN, NaN];\n    X0 = Y0 = Z0 =\n    X1 = Y1 = Z1 =\n    X2 = Y2 = Z2 = 0;\n    return centroid;\n  }\n};\n\nfunction centroidPoint(x, y) {\n  X0 += x;\n  Y0 += y;\n  ++Z0;\n}\n\nfunction centroidLineStart() {\n  centroidStream.point = centroidPointFirstLine;\n}\n\nfunction centroidPointFirstLine(x, y) {\n  centroidStream.point = centroidPointLine;\n  centroidPoint(x0 = x, y0 = y);\n}\n\nfunction centroidPointLine(x, y) {\n  var dx = x - x0, dy = y - y0, z = sqrt(dx * dx + dy * dy);\n  X1 += z * (x0 + x) / 2;\n  Y1 += z * (y0 + y) / 2;\n  Z1 += z;\n  centroidPoint(x0 = x, y0 = y);\n}\n\nfunction centroidLineEnd() {\n  centroidStream.point = centroidPoint;\n}\n\nfunction centroidRingStart() {\n  centroidStream.point = centroidPointFirstRing;\n}\n\nfunction centroidRingEnd() {\n  centroidPointRing(x00, y00);\n}\n\nfunction centroidPointFirstRing(x, y) {\n  centroidStream.point = centroidPointRing;\n  centroidPoint(x00 = x0 = x, y00 = y0 = y);\n}\n\nfunction centroidPointRing(x, y) {\n  var dx = x - x0,\n      dy = y - y0,\n      z = sqrt(dx * dx + dy * dy);\n\n  X1 += z * (x0 + x) / 2;\n  Y1 += z * (y0 + y) / 2;\n  Z1 += z;\n\n  z = y0 * x - x0 * y;\n  X2 += z * (x0 + x);\n  Y2 += z * (y0 + y);\n  Z2 += z * 3;\n  centroidPoint(x0 = x, y0 = y);\n}\n\nexport default centroidStream;\n", "import {tau} from \"../math.js\";\nimport noop from \"../noop.js\";\n\nexport default function PathContext(context) {\n  this._context = context;\n}\n\nPathContext.prototype = {\n  _radius: 4.5,\n  pointRadius: function(_) {\n    return this._radius = _, this;\n  },\n  polygonStart: function() {\n    this._line = 0;\n  },\n  polygonEnd: function() {\n    this._line = NaN;\n  },\n  lineStart: function() {\n    this._point = 0;\n  },\n  lineEnd: function() {\n    if (this._line === 0) this._context.closePath();\n    this._point = NaN;\n  },\n  point: function(x, y) {\n    switch (this._point) {\n      case 0: {\n        this._context.moveTo(x, y);\n        this._point = 1;\n        break;\n      }\n      case 1: {\n        this._context.lineTo(x, y);\n        break;\n      }\n      default: {\n        this._context.moveTo(x + this._radius, y);\n        this._context.arc(x, y, this._radius, 0, tau);\n        break;\n      }\n    }\n  },\n  result: noop\n};\n", "import {Adder} from \"d3-array\";\nimport {sqrt} from \"../math.js\";\nimport noop from \"../noop.js\";\n\nvar lengthSum = new Adder(),\n    lengthRing,\n    x00,\n    y00,\n    x0,\n    y0;\n\nvar lengthStream = {\n  point: noop,\n  lineStart: function() {\n    lengthStream.point = lengthPointFirst;\n  },\n  lineEnd: function() {\n    if (lengthRing) lengthPoint(x00, y00);\n    lengthStream.point = noop;\n  },\n  polygonStart: function() {\n    lengthRing = true;\n  },\n  polygonEnd: function() {\n    lengthRing = null;\n  },\n  result: function() {\n    var length = +lengthSum;\n    lengthSum = new Adder();\n    return length;\n  }\n};\n\nfunction lengthPointFirst(x, y) {\n  lengthStream.point = lengthPoint;\n  x00 = x0 = x, y00 = y0 = y;\n}\n\nfunction lengthPoint(x, y) {\n  x0 -= x, y0 -= y;\n  lengthSum.add(sqrt(x0 * x0 + y0 * y0));\n  x0 = x, y0 = y;\n}\n\nexport default lengthStream;\n", "// Simple caching for constant-radius points.\nlet cacheDigits, cacheAppend, cacheRadius, cacheCircle;\n\nexport default class PathString {\n  constructor(digits) {\n    this._append = digits == null ? append : appendRound(digits);\n    this._radius = 4.5;\n    this._ = \"\";\n  }\n  pointRadius(_) {\n    this._radius = +_;\n    return this;\n  }\n  polygonStart() {\n    this._line = 0;\n  }\n  polygonEnd() {\n    this._line = NaN;\n  }\n  lineStart() {\n    this._point = 0;\n  }\n  lineEnd() {\n    if (this._line === 0) this._ += \"Z\";\n    this._point = NaN;\n  }\n  point(x, y) {\n    switch (this._point) {\n      case 0: {\n        this._append`M${x},${y}`;\n        this._point = 1;\n        break;\n      }\n      case 1: {\n        this._append`L${x},${y}`;\n        break;\n      }\n      default: {\n        this._append`M${x},${y}`;\n        if (this._radius !== cacheRadius || this._append !== cacheAppend) {\n          const r = this._radius;\n          const s = this._;\n          this._ = \"\"; // stash the old string so we can cache the circle path fragment\n          this._append`m0,${r}a${r},${r} 0 1,1 0,${-2 * r}a${r},${r} 0 1,1 0,${2 * r}z`;\n          cacheRadius = r;\n          cacheAppend = this._append;\n          cacheCircle = this._;\n          this._ = s;\n        }\n        this._ += cacheCircle;\n        break;\n      }\n    }\n  }\n  result() {\n    const result = this._;\n    this._ = \"\";\n    return result.length ? result : null;\n  }\n}\n\nfunction append(strings) {\n  let i = 1;\n  this._ += strings[0];\n  for (const j = strings.length; i < j; ++i) {\n    this._ += arguments[i] + strings[i];\n  }\n}\n\nfunction appendRound(digits) {\n  const d = Math.floor(digits);\n  if (!(d >= 0)) throw new RangeError(`invalid digits: ${digits}`);\n  if (d > 15) return append;\n  if (d !== cacheDigits) {\n    const k = 10 ** d;\n    cacheDigits = d;\n    cacheAppend = function append(strings) {\n      let i = 1;\n      this._ += strings[0];\n      for (const j = strings.length; i < j; ++i) {\n        this._ += Math.round(arguments[i] * k) / k + strings[i];\n      }\n    };\n  }\n  return cacheAppend;\n}\n", "import identity from \"../identity.js\";\nimport stream from \"../stream.js\";\nimport pathArea from \"./area.js\";\nimport pathBounds from \"./bounds.js\";\nimport pathCentroid from \"./centroid.js\";\nimport PathContext from \"./context.js\";\nimport pathMeasure from \"./measure.js\";\nimport PathString from \"./string.js\";\n\nexport default function(projection, context) {\n  let digits = 3,\n      pointRadius = 4.5,\n      projectionStream,\n      contextStream;\n\n  function path(object) {\n    if (object) {\n      if (typeof pointRadius === \"function\") contextStream.pointRadius(+pointRadius.apply(this, arguments));\n      stream(object, projectionStream(contextStream));\n    }\n    return contextStream.result();\n  }\n\n  path.area = function(object) {\n    stream(object, projectionStream(pathArea));\n    return pathArea.result();\n  };\n\n  path.measure = function(object) {\n    stream(object, projectionStream(pathMeasure));\n    return pathMeasure.result();\n  };\n\n  path.bounds = function(object) {\n    stream(object, projectionStream(pathBounds));\n    return pathBounds.result();\n  };\n\n  path.centroid = function(object) {\n    stream(object, projectionStream(pathCentroid));\n    return pathCentroid.result();\n  };\n\n  path.projection = function(_) {\n    if (!arguments.length) return projection;\n    projectionStream = _ == null ? (projection = null, identity) : (projection = _).stream;\n    return path;\n  };\n\n  path.context = function(_) {\n    if (!arguments.length) return context;\n    contextStream = _ == null ? (context = null, new PathString(digits)) : new PathContext(context = _);\n    if (typeof pointRadius !== \"function\") contextStream.pointRadius(pointRadius);\n    return path;\n  };\n\n  path.pointRadius = function(_) {\n    if (!arguments.length) return pointRadius;\n    pointRadius = typeof _ === \"function\" ? _ : (contextStream.pointRadius(+_), +_);\n    return path;\n  };\n\n  path.digits = function(_) {\n    if (!arguments.length) return digits;\n    if (_ == null) digits = null;\n    else {\n      const d = Math.floor(_);\n      if (!(d >= 0)) throw new RangeError(`invalid digits: ${_}`);\n      digits = d;\n    }\n    if (context === null) contextStream = new PathString(digits);\n    return path;\n  };\n\n  return path.projection(projection).digits(digits).context(context);\n}\n", "export default function(methods) {\n  return {\n    stream: transformer(methods)\n  };\n}\n\nexport function transformer(methods) {\n  return function(stream) {\n    var s = new TransformStream;\n    for (var key in methods) s[key] = methods[key];\n    s.stream = stream;\n    return s;\n  };\n}\n\nfunction TransformStream() {}\n\nTransformStream.prototype = {\n  constructor: TransformStream,\n  point: function(x, y) { this.stream.point(x, y); },\n  sphere: function() { this.stream.sphere(); },\n  lineStart: function() { this.stream.lineStart(); },\n  lineEnd: function() { this.stream.lineEnd(); },\n  polygonStart: function() { this.stream.polygonStart(); },\n  polygonEnd: function() { this.stream.polygonEnd(); }\n};\n", "import {default as geoStream} from \"../stream.js\";\nimport boundsStream from \"../path/bounds.js\";\n\nfunction fit(projection, fitBounds, object) {\n  var clip = projection.clipExtent && projection.clipExtent();\n  projection.scale(150).translate([0, 0]);\n  if (clip != null) projection.clipExtent(null);\n  geoStream(object, projection.stream(boundsStream));\n  fitBounds(boundsStream.result());\n  if (clip != null) projection.clipExtent(clip);\n  return projection;\n}\n\nexport function fitExtent(projection, extent, object) {\n  return fit(projection, function(b) {\n    var w = extent[1][0] - extent[0][0],\n        h = extent[1][1] - extent[0][1],\n        k = Math.min(w / (b[1][0] - b[0][0]), h / (b[1][1] - b[0][1])),\n        x = +extent[0][0] + (w - k * (b[1][0] + b[0][0])) / 2,\n        y = +extent[0][1] + (h - k * (b[1][1] + b[0][1])) / 2;\n    projection.scale(150 * k).translate([x, y]);\n  }, object);\n}\n\nexport function fitSize(projection, size, object) {\n  return fitExtent(projection, [[0, 0], size], object);\n}\n\nexport function fitWidth(projection, width, object) {\n  return fit(projection, function(b) {\n    var w = +width,\n        k = w / (b[1][0] - b[0][0]),\n        x = (w - k * (b[1][0] + b[0][0])) / 2,\n        y = -k * b[0][1];\n    projection.scale(150 * k).translate([x, y]);\n  }, object);\n}\n\nexport function fitHeight(projection, height, object) {\n  return fit(projection, function(b) {\n    var h = +height,\n        k = h / (b[1][1] - b[0][1]),\n        x = -k * b[0][0],\n        y = (h - k * (b[1][1] + b[0][1])) / 2;\n    projection.scale(150 * k).translate([x, y]);\n  }, object);\n}\n", "import {cartesian} from \"../cartesian.js\";\nimport {abs, asin, atan2, cos, epsilon, radians, sqrt} from \"../math.js\";\nimport {transformer} from \"../transform.js\";\n\nvar maxDepth = 16, // maximum depth of subdivision\n    cosMinDistance = cos(30 * radians); // cos(minimum angular distance)\n\nexport default function(project, delta2) {\n  return +delta2 ? resample(project, delta2) : resampleNone(project);\n}\n\nfunction resampleNone(project) {\n  return transformer({\n    point: function(x, y) {\n      x = project(x, y);\n      this.stream.point(x[0], x[1]);\n    }\n  });\n}\n\nfunction resample(project, delta2) {\n\n  function resampleLineTo(x0, y0, lambda0, a0, b0, c0, x1, y1, lambda1, a1, b1, c1, depth, stream) {\n    var dx = x1 - x0,\n        dy = y1 - y0,\n        d2 = dx * dx + dy * dy;\n    if (d2 > 4 * delta2 && depth--) {\n      var a = a0 + a1,\n          b = b0 + b1,\n          c = c0 + c1,\n          m = sqrt(a * a + b * b + c * c),\n          phi2 = asin(c /= m),\n          lambda2 = abs(abs(c) - 1) < epsilon || abs(lambda0 - lambda1) < epsilon ? (lambda0 + lambda1) / 2 : atan2(b, a),\n          p = project(lambda2, phi2),\n          x2 = p[0],\n          y2 = p[1],\n          dx2 = x2 - x0,\n          dy2 = y2 - y0,\n          dz = dy * dx2 - dx * dy2;\n      if (dz * dz / d2 > delta2 // perpendicular projected distance\n          || abs((dx * dx2 + dy * dy2) / d2 - 0.5) > 0.3 // midpoint close to an end\n          || a0 * a1 + b0 * b1 + c0 * c1 < cosMinDistance) { // angular distance\n        resampleLineTo(x0, y0, lambda0, a0, b0, c0, x2, y2, lambda2, a /= m, b /= m, c, depth, stream);\n        stream.point(x2, y2);\n        resampleLineTo(x2, y2, lambda2, a, b, c, x1, y1, lambda1, a1, b1, c1, depth, stream);\n      }\n    }\n  }\n  return function(stream) {\n    var lambda00, x00, y00, a00, b00, c00, // first point\n        lambda0, x0, y0, a0, b0, c0; // previous point\n\n    var resampleStream = {\n      point: point,\n      lineStart: lineStart,\n      lineEnd: lineEnd,\n      polygonStart: function() { stream.polygonStart(); resampleStream.lineStart = ringStart; },\n      polygonEnd: function() { stream.polygonEnd(); resampleStream.lineStart = lineStart; }\n    };\n\n    function point(x, y) {\n      x = project(x, y);\n      stream.point(x[0], x[1]);\n    }\n\n    function lineStart() {\n      x0 = NaN;\n      resampleStream.point = linePoint;\n      stream.lineStart();\n    }\n\n    function linePoint(lambda, phi) {\n      var c = cartesian([lambda, phi]), p = project(lambda, phi);\n      resampleLineTo(x0, y0, lambda0, a0, b0, c0, x0 = p[0], y0 = p[1], lambda0 = lambda, a0 = c[0], b0 = c[1], c0 = c[2], maxDepth, stream);\n      stream.point(x0, y0);\n    }\n\n    function lineEnd() {\n      resampleStream.point = point;\n      stream.lineEnd();\n    }\n\n    function ringStart() {\n      lineStart();\n      resampleStream.point = ringPoint;\n      resampleStream.lineEnd = ringEnd;\n    }\n\n    function ringPoint(lambda, phi) {\n      linePoint(lambda00 = lambda, phi), x00 = x0, y00 = y0, a00 = a0, b00 = b0, c00 = c0;\n      resampleStream.point = linePoint;\n    }\n\n    function ringEnd() {\n      resampleLineTo(x0, y0, lambda0, a0, b0, c0, x00, y00, lambda00, a00, b00, c00, maxDepth, stream);\n      resampleStream.lineEnd = lineEnd;\n      lineEnd();\n    }\n\n    return resampleStream;\n  };\n}\n", "import clipAntimeridian from \"../clip/antimeridian.js\";\nimport clipCircle from \"../clip/circle.js\";\nimport clipRectangle from \"../clip/rectangle.js\";\nimport compose from \"../compose.js\";\nimport identity from \"../identity.js\";\nimport {cos, degrees, radians, sin, sqrt} from \"../math.js\";\nimport {rotateRadians} from \"../rotation.js\";\nimport {transformer} from \"../transform.js\";\nimport {fitExtent, fitSize, fitWidth, fitHeight} from \"./fit.js\";\nimport resample from \"./resample.js\";\n\nvar transformRadians = transformer({\n  point: function(x, y) {\n    this.stream.point(x * radians, y * radians);\n  }\n});\n\nfunction transformRotate(rotate) {\n  return transformer({\n    point: function(x, y) {\n      var r = rotate(x, y);\n      return this.stream.point(r[0], r[1]);\n    }\n  });\n}\n\nfunction scaleTranslate(k, dx, dy, sx, sy) {\n  function transform(x, y) {\n    x *= sx; y *= sy;\n    return [dx + k * x, dy - k * y];\n  }\n  transform.invert = function(x, y) {\n    return [(x - dx) / k * sx, (dy - y) / k * sy];\n  };\n  return transform;\n}\n\nfunction scaleTranslateRotate(k, dx, dy, sx, sy, alpha) {\n  if (!alpha) return scaleTranslate(k, dx, dy, sx, sy);\n  var cosAlpha = cos(alpha),\n      sinAlpha = sin(alpha),\n      a = cosAlpha * k,\n      b = sinAlpha * k,\n      ai = cosAlpha / k,\n      bi = sinAlpha / k,\n      ci = (sinAlpha * dy - cosAlpha * dx) / k,\n      fi = (sinAlpha * dx + cosAlpha * dy) / k;\n  function transform(x, y) {\n    x *= sx; y *= sy;\n    return [a * x - b * y + dx, dy - b * x - a * y];\n  }\n  transform.invert = function(x, y) {\n    return [sx * (ai * x - bi * y + ci), sy * (fi - bi * x - ai * y)];\n  };\n  return transform;\n}\n\nexport default function projection(project) {\n  return projectionMutator(function() { return project; })();\n}\n\nexport function projectionMutator(projectAt) {\n  var project,\n      k = 150, // scale\n      x = 480, y = 250, // translate\n      lambda = 0, phi = 0, // center\n      deltaLambda = 0, deltaPhi = 0, deltaGamma = 0, rotate, // pre-rotate\n      alpha = 0, // post-rotate angle\n      sx = 1, // reflectX\n      sy = 1, // reflectX\n      theta = null, preclip = clipAntimeridian, // pre-clip angle\n      x0 = null, y0, x1, y1, postclip = identity, // post-clip extent\n      delta2 = 0.5, // precision\n      projectResample,\n      projectTransform,\n      projectRotateTransform,\n      cache,\n      cacheStream;\n\n  function projection(point) {\n    return projectRotateTransform(point[0] * radians, point[1] * radians);\n  }\n\n  function invert(point) {\n    point = projectRotateTransform.invert(point[0], point[1]);\n    return point && [point[0] * degrees, point[1] * degrees];\n  }\n\n  projection.stream = function(stream) {\n    return cache && cacheStream === stream ? cache : cache = transformRadians(transformRotate(rotate)(preclip(projectResample(postclip(cacheStream = stream)))));\n  };\n\n  projection.preclip = function(_) {\n    return arguments.length ? (preclip = _, theta = undefined, reset()) : preclip;\n  };\n\n  projection.postclip = function(_) {\n    return arguments.length ? (postclip = _, x0 = y0 = x1 = y1 = null, reset()) : postclip;\n  };\n\n  projection.clipAngle = function(_) {\n    return arguments.length ? (preclip = +_ ? clipCircle(theta = _ * radians) : (theta = null, clipAntimeridian), reset()) : theta * degrees;\n  };\n\n  projection.clipExtent = function(_) {\n    return arguments.length ? (postclip = _ == null ? (x0 = y0 = x1 = y1 = null, identity) : clipRectangle(x0 = +_[0][0], y0 = +_[0][1], x1 = +_[1][0], y1 = +_[1][1]), reset()) : x0 == null ? null : [[x0, y0], [x1, y1]];\n  };\n\n  projection.scale = function(_) {\n    return arguments.length ? (k = +_, recenter()) : k;\n  };\n\n  projection.translate = function(_) {\n    return arguments.length ? (x = +_[0], y = +_[1], recenter()) : [x, y];\n  };\n\n  projection.center = function(_) {\n    return arguments.length ? (lambda = _[0] % 360 * radians, phi = _[1] % 360 * radians, recenter()) : [lambda * degrees, phi * degrees];\n  };\n\n  projection.rotate = function(_) {\n    return arguments.length ? (deltaLambda = _[0] % 360 * radians, deltaPhi = _[1] % 360 * radians, deltaGamma = _.length > 2 ? _[2] % 360 * radians : 0, recenter()) : [deltaLambda * degrees, deltaPhi * degrees, deltaGamma * degrees];\n  };\n\n  projection.angle = function(_) {\n    return arguments.length ? (alpha = _ % 360 * radians, recenter()) : alpha * degrees;\n  };\n\n  projection.reflectX = function(_) {\n    return arguments.length ? (sx = _ ? -1 : 1, recenter()) : sx < 0;\n  };\n\n  projection.reflectY = function(_) {\n    return arguments.length ? (sy = _ ? -1 : 1, recenter()) : sy < 0;\n  };\n\n  projection.precision = function(_) {\n    return arguments.length ? (projectResample = resample(projectTransform, delta2 = _ * _), reset()) : sqrt(delta2);\n  };\n\n  projection.fitExtent = function(extent, object) {\n    return fitExtent(projection, extent, object);\n  };\n\n  projection.fitSize = function(size, object) {\n    return fitSize(projection, size, object);\n  };\n\n  projection.fitWidth = function(width, object) {\n    return fitWidth(projection, width, object);\n  };\n\n  projection.fitHeight = function(height, object) {\n    return fitHeight(projection, height, object);\n  };\n\n  function recenter() {\n    var center = scaleTranslateRotate(k, 0, 0, sx, sy, alpha).apply(null, project(lambda, phi)),\n        transform = scaleTranslateRotate(k, x - center[0], y - center[1], sx, sy, alpha);\n    rotate = rotateRadians(deltaLambda, deltaPhi, deltaGamma);\n    projectTransform = compose(project, transform);\n    projectRotateTransform = compose(rotate, projectTransform);\n    projectResample = resample(projectTransform, delta2);\n    return reset();\n  }\n\n  function reset() {\n    cache = cacheStream = null;\n    return projection;\n  }\n\n  return function() {\n    project = projectAt.apply(this, arguments);\n    projection.invert = project.invert && invert;\n    return recenter();\n  };\n}\n", "import {degrees, pi, radians} from \"../math.js\";\nimport {projectionMutator} from \"./index.js\";\n\nexport function conicProjection(projectAt) {\n  var phi0 = 0,\n      phi1 = pi / 3,\n      m = projectionMutator(projectAt),\n      p = m(phi0, phi1);\n\n  p.parallels = function(_) {\n    return arguments.length ? m(phi0 = _[0] * radians, phi1 = _[1] * radians) : [phi0 * degrees, phi1 * degrees];\n  };\n\n  return p;\n}\n", "import {asin, cos, sin} from \"../math.js\";\n\nexport function cylindricalEqualAreaRaw(phi0) {\n  var cosPhi0 = cos(phi0);\n\n  function forward(lambda, phi) {\n    return [lambda * cosPhi0, sin(phi) / cosPhi0];\n  }\n\n  forward.invert = function(x, y) {\n    return [x / cosPhi0, asin(y * cosPhi0)];\n  };\n\n  return forward;\n}\n", "import {abs, asin, atan2, cos, epsilon, pi, sign, sin, sqrt} from \"../math.js\";\nimport {conicProjection} from \"./conic.js\";\nimport {cylindricalEqualAreaRaw} from \"./cylindricalEqualArea.js\";\n\nexport function conicEqualAreaRaw(y0, y1) {\n  var sy0 = sin(y0), n = (sy0 + sin(y1)) / 2;\n\n  // Are the parallels symmetrical around the Equator?\n  if (abs(n) < epsilon) return cylindricalEqualAreaRaw(y0);\n\n  var c = 1 + sy0 * (2 * n - sy0), r0 = sqrt(c) / n;\n\n  function project(x, y) {\n    var r = sqrt(c - 2 * n * sin(y)) / n;\n    return [r * sin(x *= n), r0 - r * cos(x)];\n  }\n\n  project.invert = function(x, y) {\n    var r0y = r0 - y,\n        l = atan2(x, abs(r0y)) * sign(r0y);\n    if (r0y * n < 0)\n      l -= pi * sign(x) * sign(r0y);\n    return [l / n, asin((c - (x * x + r0y * r0y) * n * n) / (2 * n))];\n  };\n\n  return project;\n}\n\nexport default function() {\n  return conicProjection(conicEqualAreaRaw)\n      .scale(155.424)\n      .center([0, 33.6442]);\n}\n", "import conicEqualArea from \"./conicEqualArea.js\";\n\nexport default function() {\n  return conicEqualArea()\n      .parallels([29.5, 45.5])\n      .scale(1070)\n      .translate([480, 250])\n      .rotate([96, 0])\n      .center([-0.6, 38.7]);\n}\n", "import {epsilon} from \"../math.js\";\nimport albers from \"./albers.js\";\nimport conicEqualArea from \"./conicEqualArea.js\";\nimport {fitExtent, fitSize, fitWidth, fitHeight} from \"./fit.js\";\n\n// The projections must have mutually exclusive clip regions on the sphere,\n// as this will avoid emitting interleaving lines and polygons.\nfunction multiplex(streams) {\n  var n = streams.length;\n  return {\n    point: function(x, y) { var i = -1; while (++i < n) streams[i].point(x, y); },\n    sphere: function() { var i = -1; while (++i < n) streams[i].sphere(); },\n    lineStart: function() { var i = -1; while (++i < n) streams[i].lineStart(); },\n    lineEnd: function() { var i = -1; while (++i < n) streams[i].lineEnd(); },\n    polygonStart: function() { var i = -1; while (++i < n) streams[i].polygonStart(); },\n    polygonEnd: function() { var i = -1; while (++i < n) streams[i].polygonEnd(); }\n  };\n}\n\n// A composite projection for the United States, configured by default for\n// 960\u00D7500. The projection also works quite well at 960\u00D7600 if you change the\n// scale to 1285 and adjust the translate accordingly. The set of standard\n// parallels for each region comes from USGS, which is published here:\n// http://egsc.usgs.gov/isb/pubs/MapProjections/projections.html#albers\nexport default function() {\n  var cache,\n      cacheStream,\n      lower48 = albers(), lower48Point,\n      alaska = conicEqualArea().rotate([154, 0]).center([-2, 58.5]).parallels([55, 65]), alaskaPoint, // EPSG:3338\n      hawaii = conicEqualArea().rotate([157, 0]).center([-3, 19.9]).parallels([8, 18]), hawaiiPoint, // ESRI:102007\n      point, pointStream = {point: function(x, y) { point = [x, y]; }};\n\n  function albersUsa(coordinates) {\n    var x = coordinates[0], y = coordinates[1];\n    return point = null,\n        (lower48Point.point(x, y), point)\n        || (alaskaPoint.point(x, y), point)\n        || (hawaiiPoint.point(x, y), point);\n  }\n\n  albersUsa.invert = function(coordinates) {\n    var k = lower48.scale(),\n        t = lower48.translate(),\n        x = (coordinates[0] - t[0]) / k,\n        y = (coordinates[1] - t[1]) / k;\n    return (y >= 0.120 && y < 0.234 && x >= -0.425 && x < -0.214 ? alaska\n        : y >= 0.166 && y < 0.234 && x >= -0.214 && x < -0.115 ? hawaii\n        : lower48).invert(coordinates);\n  };\n\n  albersUsa.stream = function(stream) {\n    return cache && cacheStream === stream ? cache : cache = multiplex([lower48.stream(cacheStream = stream), alaska.stream(stream), hawaii.stream(stream)]);\n  };\n\n  albersUsa.precision = function(_) {\n    if (!arguments.length) return lower48.precision();\n    lower48.precision(_), alaska.precision(_), hawaii.precision(_);\n    return reset();\n  };\n\n  albersUsa.scale = function(_) {\n    if (!arguments.length) return lower48.scale();\n    lower48.scale(_), alaska.scale(_ * 0.35), hawaii.scale(_);\n    return albersUsa.translate(lower48.translate());\n  };\n\n  albersUsa.translate = function(_) {\n    if (!arguments.length) return lower48.translate();\n    var k = lower48.scale(), x = +_[0], y = +_[1];\n\n    lower48Point = lower48\n        .translate(_)\n        .clipExtent([[x - 0.455 * k, y - 0.238 * k], [x + 0.455 * k, y + 0.238 * k]])\n        .stream(pointStream);\n\n    alaskaPoint = alaska\n        .translate([x - 0.307 * k, y + 0.201 * k])\n        .clipExtent([[x - 0.425 * k + epsilon, y + 0.120 * k + epsilon], [x - 0.214 * k - epsilon, y + 0.234 * k - epsilon]])\n        .stream(pointStream);\n\n    hawaiiPoint = hawaii\n        .translate([x - 0.205 * k, y + 0.212 * k])\n        .clipExtent([[x - 0.214 * k + epsilon, y + 0.166 * k + epsilon], [x - 0.115 * k - epsilon, y + 0.234 * k - epsilon]])\n        .stream(pointStream);\n\n    return reset();\n  };\n\n  albersUsa.fitExtent = function(extent, object) {\n    return fitExtent(albersUsa, extent, object);\n  };\n\n  albersUsa.fitSize = function(size, object) {\n    return fitSize(albersUsa, size, object);\n  };\n\n  albersUsa.fitWidth = function(width, object) {\n    return fitWidth(albersUsa, width, object);\n  };\n\n  albersUsa.fitHeight = function(height, object) {\n    return fitHeight(albersUsa, height, object);\n  };\n\n  function reset() {\n    cache = cacheStream = null;\n    return albersUsa;\n  }\n\n  return albersUsa.scale(1070);\n}\n", "import {asin, atan2, cos, sin, sqrt} from \"../math.js\";\n\nexport function azimuthalRaw(scale) {\n  return function(x, y) {\n    var cx = cos(x),\n        cy = cos(y),\n        k = scale(cx * cy);\n        if (k === Infinity) return [2, 0];\n    return [\n      k * cy * sin(x),\n      k * sin(y)\n    ];\n  }\n}\n\nexport function azimuthalInvert(angle) {\n  return function(x, y) {\n    var z = sqrt(x * x + y * y),\n        c = angle(z),\n        sc = sin(c),\n        cc = cos(c);\n    return [\n      atan2(x * sc, z * cc),\n      asin(z && y * sc / z)\n    ];\n  }\n}\n", "import {asin, sqrt} from \"../math.js\";\nimport {azimuthalRaw, azimuthalInvert} from \"./azimuthal.js\";\nimport projection from \"./index.js\";\n\nexport var azimuthalEqualAreaRaw = azimuthalRaw(function(cxcy) {\n  return sqrt(2 / (1 + cxcy));\n});\n\nazimuthalEqualAreaRaw.invert = azimuthalInvert(function(z) {\n  return 2 * asin(z / 2);\n});\n\nexport default function() {\n  return projection(azimuthalEqualAreaRaw)\n      .scale(124.75)\n      .clipAngle(180 - 1e-3);\n}\n", "import {acos, sin} from \"../math.js\";\nimport {azimuthalRaw, azimuthalInvert} from \"./azimuthal.js\";\nimport projection from \"./index.js\";\n\nexport var azimuthalEquidistantRaw = azimuthalRaw(function(c) {\n  return (c = acos(c)) && c / sin(c);\n});\n\nazimuthalEquidistantRaw.invert = azimuthalInvert(function(z) {\n  return z;\n});\n\nexport default function() {\n  return projection(azimuthalEquidistantRaw)\n      .scale(79.4188)\n      .clipAngle(180 - 1e-3);\n}\n", "import {atan, exp, halfPi, log, pi, tan, tau} from \"../math.js\";\nimport rotation from \"../rotation.js\";\nimport projection from \"./index.js\";\n\nexport function mercatorRaw(lambda, phi) {\n  return [lambda, log(tan((halfPi + phi) / 2))];\n}\n\nmercatorRaw.invert = function(x, y) {\n  return [x, 2 * atan(exp(y)) - halfPi];\n};\n\nexport default function() {\n  return mercatorProjection(mercatorRaw)\n      .scale(961 / tau);\n}\n\nexport function mercatorProjection(project) {\n  var m = projection(project),\n      center = m.center,\n      scale = m.scale,\n      translate = m.translate,\n      clipExtent = m.clipExtent,\n      x0 = null, y0, x1, y1; // clip extent\n\n  m.scale = function(_) {\n    return arguments.length ? (scale(_), reclip()) : scale();\n  };\n\n  m.translate = function(_) {\n    return arguments.length ? (translate(_), reclip()) : translate();\n  };\n\n  m.center = function(_) {\n    return arguments.length ? (center(_), reclip()) : center();\n  };\n\n  m.clipExtent = function(_) {\n    return arguments.length ? ((_ == null ? x0 = y0 = x1 = y1 = null : (x0 = +_[0][0], y0 = +_[0][1], x1 = +_[1][0], y1 = +_[1][1])), reclip()) : x0 == null ? null : [[x0, y0], [x1, y1]];\n  };\n\n  function reclip() {\n    var k = pi * scale(),\n        t = m(rotation(m.rotate()).invert([0, 0]));\n    return clipExtent(x0 == null\n        ? [[t[0] - k, t[1] - k], [t[0] + k, t[1] + k]] : project === mercatorRaw\n        ? [[Math.max(t[0] - k, x0), y0], [Math.min(t[0] + k, x1), y1]]\n        : [[x0, Math.max(t[1] - k, y0)], [x1, Math.min(t[1] + k, y1)]]);\n  }\n\n  return reclip();\n}\n", "import {abs, atan, atan2, cos, epsilon, halfPi, log, pi, pow, sign, sin, sqrt, tan} from \"../math.js\";\nimport {conicProjection} from \"./conic.js\";\nimport {mercatorRaw} from \"./mercator.js\";\n\nfunction tany(y) {\n  return tan((halfPi + y) / 2);\n}\n\nexport function conicConformalRaw(y0, y1) {\n  var cy0 = cos(y0),\n      n = y0 === y1 ? sin(y0) : log(cy0 / cos(y1)) / log(tany(y1) / tany(y0)),\n      f = cy0 * pow(tany(y0), n) / n;\n\n  if (!n) return mercatorRaw;\n\n  function project(x, y) {\n    if (f > 0) { if (y < -halfPi + epsilon) y = -halfPi + epsilon; }\n    else { if (y > halfPi - epsilon) y = halfPi - epsilon; }\n    var r = f / pow(tany(y), n);\n    return [r * sin(n * x), f - r * cos(n * x)];\n  }\n\n  project.invert = function(x, y) {\n    var fy = f - y, r = sign(n) * sqrt(x * x + fy * fy),\n      l = atan2(x, abs(fy)) * sign(fy);\n    if (fy * n < 0)\n      l -= pi * sign(x) * sign(fy);\n    return [l / n, 2 * atan(pow(f / r, 1 / n)) - halfPi];\n  };\n\n  return project;\n}\n\nexport default function() {\n  return conicProjection(conicConformalRaw)\n      .scale(109.5)\n      .parallels([30, 30]);\n}\n", "import projection from \"./index.js\";\n\nexport function equirectangularRaw(lambda, phi) {\n  return [lambda, phi];\n}\n\nequirectangularRaw.invert = equirectangularRaw;\n\nexport default function() {\n  return projection(equirectangularRaw)\n      .scale(152.63);\n}\n", "import {abs, atan2, cos, epsilon, pi, sign, sin, sqrt} from \"../math.js\";\nimport {conicProjection} from \"./conic.js\";\nimport {equirectangularRaw} from \"./equirectangular.js\";\n\nexport function conicEquidistantRaw(y0, y1) {\n  var cy0 = cos(y0),\n      n = y0 === y1 ? sin(y0) : (cy0 - cos(y1)) / (y1 - y0),\n      g = cy0 / n + y0;\n\n  if (abs(n) < epsilon) return equirectangularRaw;\n\n  function project(x, y) {\n    var gy = g - y, nx = n * x;\n    return [gy * sin(nx), g - gy * cos(nx)];\n  }\n\n  project.invert = function(x, y) {\n    var gy = g - y,\n        l = atan2(x, abs(gy)) * sign(gy);\n    if (gy * n < 0)\n      l -= pi * sign(x) * sign(gy);\n    return [l / n, g - sign(n) * sqrt(x * x + gy * gy)];\n  };\n\n  return project;\n}\n\nexport default function() {\n  return conicProjection(conicEquidistantRaw)\n      .scale(131.154)\n      .center([0, 13.9389]);\n}\n", "import projection from \"./index.js\";\nimport {abs, asin, cos, epsilon2, sin, sqrt} from \"../math.js\";\n\nvar A1 = 1.340264,\n    A2 = -0.081106,\n    A3 = 0.000893,\n    A4 = 0.003796,\n    M = sqrt(3) / 2,\n    iterations = 12;\n\nexport function equalEarthRaw(lambda, phi) {\n  var l = asin(M * sin(phi)), l2 = l * l, l6 = l2 * l2 * l2;\n  return [\n    lambda * cos(l) / (M * (A1 + 3 * A2 * l2 + l6 * (7 * A3 + 9 * A4 * l2))),\n    l * (A1 + A2 * l2 + l6 * (A3 + A4 * l2))\n  ];\n}\n\nequalEarthRaw.invert = function(x, y) {\n  var l = y, l2 = l * l, l6 = l2 * l2 * l2;\n  for (var i = 0, delta, fy, fpy; i < iterations; ++i) {\n    fy = l * (A1 + A2 * l2 + l6 * (A3 + A4 * l2)) - y;\n    fpy = A1 + 3 * A2 * l2 + l6 * (7 * A3 + 9 * A4 * l2);\n    l -= delta = fy / fpy, l2 = l * l, l6 = l2 * l2 * l2;\n    if (abs(delta) < epsilon2) break;\n  }\n  return [\n    M * x * (A1 + 3 * A2 * l2 + l6 * (7 * A3 + 9 * A4 * l2)) / cos(l),\n    asin(sin(l) / M)\n  ];\n};\n\nexport default function() {\n  return projection(equalEarthRaw)\n      .scale(177.158);\n}\n", "import {atan, cos, sin} from \"../math.js\";\nimport {azimuthalInvert} from \"./azimuthal.js\";\nimport projection from \"./index.js\";\n\nexport function gnomonicRaw(x, y) {\n  var cy = cos(y), k = cos(x) * cy;\n  return [cy * sin(x) / k, sin(y) / k];\n}\n\ngnomonicRaw.invert = azimuthalInvert(atan);\n\nexport default function() {\n  return projection(gnomonicRaw)\n      .scale(144.049)\n      .clipAngle(60);\n}\n", "import {asin, cos, epsilon, sin} from \"../math.js\";\nimport {azimuthalInvert} from \"./azimuthal.js\";\nimport projection from \"./index.js\";\n\nexport function orthographicRaw(x, y) {\n  return [cos(y) * sin(x), sin(y)];\n}\n\northographicRaw.invert = azimuthalInvert(asin);\n\nexport default function() {\n  return projection(orthographicRaw)\n      .scale(249.5)\n      .clipAngle(90 + epsilon);\n}\n", "import {atan, cos, sin} from \"../math.js\";\nimport {azimuthalInvert} from \"./azimuthal.js\";\nimport projection from \"./index.js\";\n\nexport function stereographicRaw(x, y) {\n  var cy = cos(y), k = 1 + cos(x) * cy;\n  return [cy * sin(x) / k, sin(y) / k];\n}\n\nstereographicRaw.invert = azimuthalInvert(function(z) {\n  return 2 * atan(z);\n});\n\nexport default function() {\n  return projection(stereographicRaw)\n      .scale(250)\n      .clipAngle(142);\n}\n", "import {atan, exp, halfPi, log, tan} from \"../math.js\";\nimport {mercatorProjection} from \"./mercator.js\";\n\nexport function transverseMercatorRaw(lambda, phi) {\n  return [log(tan((halfPi + phi) / 2)), -lambda];\n}\n\ntransverseMercatorRaw.invert = function(x, y) {\n  return [-y, 2 * atan(exp(x)) - halfPi];\n};\n\nexport default function() {\n  var m = mercatorProjection(transverseMercatorRaw),\n      center = m.center,\n      rotate = m.rotate;\n\n  m.center = function(_) {\n    return arguments.length ? center([-_[1], _[0]]) : (_ = center(), [_[1], -_[0]]);\n  };\n\n  m.rotate = function(_) {\n    return arguments.length ? rotate([_[0], _[1], _.length > 2 ? _[2] + 90 : 90]) : (_ = rotate(), [_[0], _[1], _[2] - 90]);\n  };\n\n  return rotate([0, 0, 90])\n      .scale(159.155);\n}\n", "export function initRange(domain, range) {\n  switch (arguments.length) {\n    case 0: break;\n    case 1: this.range(domain); break;\n    default: this.range(range).domain(domain); break;\n  }\n  return this;\n}\n\nexport function initInterpolator(domain, interpolator) {\n  switch (arguments.length) {\n    case 0: break;\n    case 1: {\n      if (typeof domain === \"function\") this.interpolator(domain);\n      else this.range(domain);\n      break;\n    }\n    default: {\n      this.domain(domain);\n      if (typeof interpolator === \"function\") this.interpolator(interpolator);\n      else this.range(interpolator);\n      break;\n    }\n  }\n  return this;\n}\n", "import {InternMap} from \"d3-array\";\nimport {initRange} from \"./init.js\";\n\nexport const implicit = Symbol(\"implicit\");\n\nexport default function ordinal() {\n  var index = new InternMap(),\n      domain = [],\n      range = [],\n      unknown = implicit;\n\n  function scale(d) {\n    let i = index.get(d);\n    if (i === undefined) {\n      if (unknown !== implicit) return unknown;\n      index.set(d, i = domain.push(d) - 1);\n    }\n    return range[i % range.length];\n  }\n\n  scale.domain = function(_) {\n    if (!arguments.length) return domain.slice();\n    domain = [], index = new InternMap();\n    for (const value of _) {\n      if (index.has(value)) continue;\n      index.set(value, domain.push(value) - 1);\n    }\n    return scale;\n  };\n\n  scale.range = function(_) {\n    return arguments.length ? (range = Array.from(_), scale) : range.slice();\n  };\n\n  scale.unknown = function(_) {\n    return arguments.length ? (unknown = _, scale) : unknown;\n  };\n\n  scale.copy = function() {\n    return ordinal(domain, range).unknown(unknown);\n  };\n\n  initRange.apply(scale, arguments);\n\n  return scale;\n}\n", "import {range as sequence} from \"d3-array\";\nimport {initRange} from \"./init.js\";\nimport ordinal from \"./ordinal.js\";\n\nexport default function band() {\n  var scale = ordinal().unknown(undefined),\n      domain = scale.domain,\n      ordinalRange = scale.range,\n      r0 = 0,\n      r1 = 1,\n      step,\n      bandwidth,\n      round = false,\n      paddingInner = 0,\n      paddingOuter = 0,\n      align = 0.5;\n\n  delete scale.unknown;\n\n  function rescale() {\n    var n = domain().length,\n        reverse = r1 < r0,\n        start = reverse ? r1 : r0,\n        stop = reverse ? r0 : r1;\n    step = (stop - start) / Math.max(1, n - paddingInner + paddingOuter * 2);\n    if (round) step = Math.floor(step);\n    start += (stop - start - step * (n - paddingInner)) * align;\n    bandwidth = step * (1 - paddingInner);\n    if (round) start = Math.round(start), bandwidth = Math.round(bandwidth);\n    var values = sequence(n).map(function(i) { return start + step * i; });\n    return ordinalRange(reverse ? values.reverse() : values);\n  }\n\n  scale.domain = function(_) {\n    return arguments.length ? (domain(_), rescale()) : domain();\n  };\n\n  scale.range = function(_) {\n    return arguments.length ? ([r0, r1] = _, r0 = +r0, r1 = +r1, rescale()) : [r0, r1];\n  };\n\n  scale.rangeRound = function(_) {\n    return [r0, r1] = _, r0 = +r0, r1 = +r1, round = true, rescale();\n  };\n\n  scale.bandwidth = function() {\n    return bandwidth;\n  };\n\n  scale.step = function() {\n    return step;\n  };\n\n  scale.round = function(_) {\n    return arguments.length ? (round = !!_, rescale()) : round;\n  };\n\n  scale.padding = function(_) {\n    return arguments.length ? (paddingInner = Math.min(1, paddingOuter = +_), rescale()) : paddingInner;\n  };\n\n  scale.paddingInner = function(_) {\n    return arguments.length ? (paddingInner = Math.min(1, _), rescale()) : paddingInner;\n  };\n\n  scale.paddingOuter = function(_) {\n    return arguments.length ? (paddingOuter = +_, rescale()) : paddingOuter;\n  };\n\n  scale.align = function(_) {\n    return arguments.length ? (align = Math.max(0, Math.min(1, _)), rescale()) : align;\n  };\n\n  scale.copy = function() {\n    return band(domain(), [r0, r1])\n        .round(round)\n        .paddingInner(paddingInner)\n        .paddingOuter(paddingOuter)\n        .align(align);\n  };\n\n  return initRange.apply(rescale(), arguments);\n}\n\nfunction pointish(scale) {\n  var copy = scale.copy;\n\n  scale.padding = scale.paddingOuter;\n  delete scale.paddingInner;\n  delete scale.paddingOuter;\n\n  scale.copy = function() {\n    return pointish(copy());\n  };\n\n  return scale;\n}\n\nexport function point() {\n  return pointish(band.apply(null, arguments).paddingInner(1));\n}\n", "export default function constants(x) {\n  return function() {\n    return x;\n  };\n}\n", "export default function number(x) {\n  return +x;\n}\n", "import {bisect} from \"d3-array\";\nimport {interpolate as interpolateValue, interpolateNumber, interpolateRound} from \"d3-interpolate\";\nimport constant from \"./constant.js\";\nimport number from \"./number.js\";\n\nvar unit = [0, 1];\n\nexport function identity(x) {\n  return x;\n}\n\nfunction normalize(a, b) {\n  return (b -= (a = +a))\n      ? function(x) { return (x - a) / b; }\n      : constant(isNaN(b) ? NaN : 0.5);\n}\n\nfunction clamper(a, b) {\n  var t;\n  if (a > b) t = a, a = b, b = t;\n  return function(x) { return Math.max(a, Math.min(b, x)); };\n}\n\n// normalize(a, b)(x) takes a domain value x in [a,b] and returns the corresponding parameter t in [0,1].\n// interpolate(a, b)(t) takes a parameter t in [0,1] and returns the corresponding range value x in [a,b].\nfunction bimap(domain, range, interpolate) {\n  var d0 = domain[0], d1 = domain[1], r0 = range[0], r1 = range[1];\n  if (d1 < d0) d0 = normalize(d1, d0), r0 = interpolate(r1, r0);\n  else d0 = normalize(d0, d1), r0 = interpolate(r0, r1);\n  return function(x) { return r0(d0(x)); };\n}\n\nfunction polymap(domain, range, interpolate) {\n  var j = Math.min(domain.length, range.length) - 1,\n      d = new Array(j),\n      r = new Array(j),\n      i = -1;\n\n  // Reverse descending domains.\n  if (domain[j] < domain[0]) {\n    domain = domain.slice().reverse();\n    range = range.slice().reverse();\n  }\n\n  while (++i < j) {\n    d[i] = normalize(domain[i], domain[i + 1]);\n    r[i] = interpolate(range[i], range[i + 1]);\n  }\n\n  return function(x) {\n    var i = bisect(domain, x, 1, j) - 1;\n    return r[i](d[i](x));\n  };\n}\n\nexport function copy(source, target) {\n  return target\n      .domain(source.domain())\n      .range(source.range())\n      .interpolate(source.interpolate())\n      .clamp(source.clamp())\n      .unknown(source.unknown());\n}\n\nexport function transformer() {\n  var domain = unit,\n      range = unit,\n      interpolate = interpolateValue,\n      transform,\n      untransform,\n      unknown,\n      clamp = identity,\n      piecewise,\n      output,\n      input;\n\n  function rescale() {\n    var n = Math.min(domain.length, range.length);\n    if (clamp !== identity) clamp = clamper(domain[0], domain[n - 1]);\n    piecewise = n > 2 ? polymap : bimap;\n    output = input = null;\n    return scale;\n  }\n\n  function scale(x) {\n    return x == null || isNaN(x = +x) ? unknown : (output || (output = piecewise(domain.map(transform), range, interpolate)))(transform(clamp(x)));\n  }\n\n  scale.invert = function(y) {\n    return clamp(untransform((input || (input = piecewise(range, domain.map(transform), interpolateNumber)))(y)));\n  };\n\n  scale.domain = function(_) {\n    return arguments.length ? (domain = Array.from(_, number), rescale()) : domain.slice();\n  };\n\n  scale.range = function(_) {\n    return arguments.length ? (range = Array.from(_), rescale()) : range.slice();\n  };\n\n  scale.rangeRound = function(_) {\n    return range = Array.from(_), interpolate = interpolateRound, rescale();\n  };\n\n  scale.clamp = function(_) {\n    return arguments.length ? (clamp = _ ? true : identity, rescale()) : clamp !== identity;\n  };\n\n  scale.interpolate = function(_) {\n    return arguments.length ? (interpolate = _, rescale()) : interpolate;\n  };\n\n  scale.unknown = function(_) {\n    return arguments.length ? (unknown = _, scale) : unknown;\n  };\n\n  return function(t, u) {\n    transform = t, untransform = u;\n    return rescale();\n  };\n}\n\nexport default function continuous() {\n  return transformer()(identity, identity);\n}\n", "import {tickStep} from \"d3-array\";\nimport {format, formatPrefix, formatSpecifier, precisionFixed, precisionPrefix, precisionRound} from \"d3-format\";\n\nexport default function tickFormat(start, stop, count, specifier) {\n  var step = tickStep(start, stop, count),\n      precision;\n  specifier = formatSpecifier(specifier == null ? \",f\" : specifier);\n  switch (specifier.type) {\n    case \"s\": {\n      var value = Math.max(Math.abs(start), Math.abs(stop));\n      if (specifier.precision == null && !isNaN(precision = precisionPrefix(step, value))) specifier.precision = precision;\n      return formatPrefix(specifier, value);\n    }\n    case \"\":\n    case \"e\":\n    case \"g\":\n    case \"p\":\n    case \"r\": {\n      if (specifier.precision == null && !isNaN(precision = precisionRound(step, Math.max(Math.abs(start), Math.abs(stop))))) specifier.precision = precision - (specifier.type === \"e\");\n      break;\n    }\n    case \"f\":\n    case \"%\": {\n      if (specifier.precision == null && !isNaN(precision = precisionFixed(step))) specifier.precision = precision - (specifier.type === \"%\") * 2;\n      break;\n    }\n  }\n  return format(specifier);\n}\n", "import {ticks, tickIncrement} from \"d3-array\";\nimport continuous, {copy} from \"./continuous.js\";\nimport {initRange} from \"./init.js\";\nimport tickFormat from \"./tickFormat.js\";\n\nexport function linearish(scale) {\n  var domain = scale.domain;\n\n  scale.ticks = function(count) {\n    var d = domain();\n    return ticks(d[0], d[d.length - 1], count == null ? 10 : count);\n  };\n\n  scale.tickFormat = function(count, specifier) {\n    var d = domain();\n    return tickFormat(d[0], d[d.length - 1], count == null ? 10 : count, specifier);\n  };\n\n  scale.nice = function(count) {\n    if (count == null) count = 10;\n\n    var d = domain();\n    var i0 = 0;\n    var i1 = d.length - 1;\n    var start = d[i0];\n    var stop = d[i1];\n    var prestep;\n    var step;\n    var maxIter = 10;\n\n    if (stop < start) {\n      step = start, start = stop, stop = step;\n      step = i0, i0 = i1, i1 = step;\n    }\n    \n    while (maxIter-- > 0) {\n      step = tickIncrement(start, stop, count);\n      if (step === prestep) {\n        d[i0] = start\n        d[i1] = stop\n        return domain(d);\n      } else if (step > 0) {\n        start = Math.floor(start / step) * step;\n        stop = Math.ceil(stop / step) * step;\n      } else if (step < 0) {\n        start = Math.ceil(start * step) / step;\n        stop = Math.floor(stop * step) / step;\n      } else {\n        break;\n      }\n      prestep = step;\n    }\n\n    return scale;\n  };\n\n  return scale;\n}\n\nexport default function linear() {\n  var scale = continuous();\n\n  scale.copy = function() {\n    return copy(scale, linear());\n  };\n\n  initRange.apply(scale, arguments);\n\n  return linearish(scale);\n}\n", "import {linearish} from \"./linear.js\";\nimport number from \"./number.js\";\n\nexport default function identity(domain) {\n  var unknown;\n\n  function scale(x) {\n    return x == null || isNaN(x = +x) ? unknown : x;\n  }\n\n  scale.invert = scale;\n\n  scale.domain = scale.range = function(_) {\n    return arguments.length ? (domain = Array.from(_, number), scale) : domain.slice();\n  };\n\n  scale.unknown = function(_) {\n    return arguments.length ? (unknown = _, scale) : unknown;\n  };\n\n  scale.copy = function() {\n    return identity(domain).unknown(unknown);\n  };\n\n  domain = arguments.length ? Array.from(domain, number) : [0, 1];\n\n  return linearish(scale);\n}\n", "export default function nice(domain, interval) {\n  domain = domain.slice();\n\n  var i0 = 0,\n      i1 = domain.length - 1,\n      x0 = domain[i0],\n      x1 = domain[i1],\n      t;\n\n  if (x1 < x0) {\n    t = i0, i0 = i1, i1 = t;\n    t = x0, x0 = x1, x1 = t;\n  }\n\n  domain[i0] = interval.floor(x0);\n  domain[i1] = interval.ceil(x1);\n  return domain;\n}\n", "import {ticks} from \"d3-array\";\nimport {format, formatSpecifier} from \"d3-format\";\nimport nice from \"./nice.js\";\nimport {copy, transformer} from \"./continuous.js\";\nimport {initRange} from \"./init.js\";\n\nfunction transformLog(x) {\n  return Math.log(x);\n}\n\nfunction transformExp(x) {\n  return Math.exp(x);\n}\n\nfunction transformLogn(x) {\n  return -Math.log(-x);\n}\n\nfunction transformExpn(x) {\n  return -Math.exp(-x);\n}\n\nfunction pow10(x) {\n  return isFinite(x) ? +(\"1e\" + x) : x < 0 ? 0 : x;\n}\n\nfunction powp(base) {\n  return base === 10 ? pow10\n      : base === Math.E ? Math.exp\n      : x => Math.pow(base, x);\n}\n\nfunction logp(base) {\n  return base === Math.E ? Math.log\n      : base === 10 && Math.log10\n      || base === 2 && Math.log2\n      || (base = Math.log(base), x => Math.log(x) / base);\n}\n\nfunction reflect(f) {\n  return (x, k) => -f(-x, k);\n}\n\nexport function loggish(transform) {\n  const scale = transform(transformLog, transformExp);\n  const domain = scale.domain;\n  let base = 10;\n  let logs;\n  let pows;\n\n  function rescale() {\n    logs = logp(base), pows = powp(base);\n    if (domain()[0] < 0) {\n      logs = reflect(logs), pows = reflect(pows);\n      transform(transformLogn, transformExpn);\n    } else {\n      transform(transformLog, transformExp);\n    }\n    return scale;\n  }\n\n  scale.base = function(_) {\n    return arguments.length ? (base = +_, rescale()) : base;\n  };\n\n  scale.domain = function(_) {\n    return arguments.length ? (domain(_), rescale()) : domain();\n  };\n\n  scale.ticks = count => {\n    const d = domain();\n    let u = d[0];\n    let v = d[d.length - 1];\n    const r = v < u;\n\n    if (r) ([u, v] = [v, u]);\n\n    let i = logs(u);\n    let j = logs(v);\n    let k;\n    let t;\n    const n = count == null ? 10 : +count;\n    let z = [];\n\n    if (!(base % 1) && j - i < n) {\n      i = Math.floor(i), j = Math.ceil(j);\n      if (u > 0) for (; i <= j; ++i) {\n        for (k = 1; k < base; ++k) {\n          t = i < 0 ? k / pows(-i) : k * pows(i);\n          if (t < u) continue;\n          if (t > v) break;\n          z.push(t);\n        }\n      } else for (; i <= j; ++i) {\n        for (k = base - 1; k >= 1; --k) {\n          t = i > 0 ? k / pows(-i) : k * pows(i);\n          if (t < u) continue;\n          if (t > v) break;\n          z.push(t);\n        }\n      }\n      if (z.length * 2 < n) z = ticks(u, v, n);\n    } else {\n      z = ticks(i, j, Math.min(j - i, n)).map(pows);\n    }\n    return r ? z.reverse() : z;\n  };\n\n  scale.tickFormat = (count, specifier) => {\n    if (count == null) count = 10;\n    if (specifier == null) specifier = base === 10 ? \"s\" : \",\";\n    if (typeof specifier !== \"function\") {\n      if (!(base % 1) && (specifier = formatSpecifier(specifier)).precision == null) specifier.trim = true;\n      specifier = format(specifier);\n    }\n    if (count === Infinity) return specifier;\n    const k = Math.max(1, base * count / scale.ticks().length); // TODO fast estimate?\n    return d => {\n      let i = d / pows(Math.round(logs(d)));\n      if (i * base < base - 0.5) i *= base;\n      return i <= k ? specifier(d) : \"\";\n    };\n  };\n\n  scale.nice = () => {\n    return domain(nice(domain(), {\n      floor: x => pows(Math.floor(logs(x))),\n      ceil: x => pows(Math.ceil(logs(x)))\n    }));\n  };\n\n  return scale;\n}\n\nexport default function log() {\n  const scale = loggish(transformer()).domain([1, 10]);\n  scale.copy = () => copy(scale, log()).base(scale.base());\n  initRange.apply(scale, arguments);\n  return scale;\n}\n", "import {linearish} from \"./linear.js\";\nimport {copy, transformer} from \"./continuous.js\";\nimport {initRange} from \"./init.js\";\n\nfunction transformSymlog(c) {\n  return function(x) {\n    return Math.sign(x) * Math.log1p(Math.abs(x / c));\n  };\n}\n\nfunction transformSymexp(c) {\n  return function(x) {\n    return Math.sign(x) * Math.expm1(Math.abs(x)) * c;\n  };\n}\n\nexport function symlogish(transform) {\n  var c = 1, scale = transform(transformSymlog(c), transformSymexp(c));\n\n  scale.constant = function(_) {\n    return arguments.length ? transform(transformSymlog(c = +_), transformSymexp(c)) : c;\n  };\n\n  return linearish(scale);\n}\n\nexport default function symlog() {\n  var scale = symlogish(transformer());\n\n  scale.copy = function() {\n    return copy(scale, symlog()).constant(scale.constant());\n  };\n\n  return initRange.apply(scale, arguments);\n}\n", "import {linearish} from \"./linear.js\";\nimport {copy, identity, transformer} from \"./continuous.js\";\nimport {initRange} from \"./init.js\";\n\nfunction transformPow(exponent) {\n  return function(x) {\n    return x < 0 ? -Math.pow(-x, exponent) : Math.pow(x, exponent);\n  };\n}\n\nfunction transformSqrt(x) {\n  return x < 0 ? -Math.sqrt(-x) : Math.sqrt(x);\n}\n\nfunction transformSquare(x) {\n  return x < 0 ? -x * x : x * x;\n}\n\nexport function powish(transform) {\n  var scale = transform(identity, identity),\n      exponent = 1;\n\n  function rescale() {\n    return exponent === 1 ? transform(identity, identity)\n        : exponent === 0.5 ? transform(transformSqrt, transformSquare)\n        : transform(transformPow(exponent), transformPow(1 / exponent));\n  }\n\n  scale.exponent = function(_) {\n    return arguments.length ? (exponent = +_, rescale()) : exponent;\n  };\n\n  return linearish(scale);\n}\n\nexport default function pow() {\n  var scale = powish(transformer());\n\n  scale.copy = function() {\n    return copy(scale, pow()).exponent(scale.exponent());\n  };\n\n  initRange.apply(scale, arguments);\n\n  return scale;\n}\n\nexport function sqrt() {\n  return pow.apply(null, arguments).exponent(0.5);\n}\n", "import {ascending, bisect, quantileSorted as threshold} from \"d3-array\";\nimport {initRange} from \"./init.js\";\n\nexport default function quantile() {\n  var domain = [],\n      range = [],\n      thresholds = [],\n      unknown;\n\n  function rescale() {\n    var i = 0, n = Math.max(1, range.length);\n    thresholds = new Array(n - 1);\n    while (++i < n) thresholds[i - 1] = threshold(domain, i / n);\n    return scale;\n  }\n\n  function scale(x) {\n    return x == null || isNaN(x = +x) ? unknown : range[bisect(thresholds, x)];\n  }\n\n  scale.invertExtent = function(y) {\n    var i = range.indexOf(y);\n    return i < 0 ? [NaN, NaN] : [\n      i > 0 ? thresholds[i - 1] : domain[0],\n      i < thresholds.length ? thresholds[i] : domain[domain.length - 1]\n    ];\n  };\n\n  scale.domain = function(_) {\n    if (!arguments.length) return domain.slice();\n    domain = [];\n    for (let d of _) if (d != null && !isNaN(d = +d)) domain.push(d);\n    domain.sort(ascending);\n    return rescale();\n  };\n\n  scale.range = function(_) {\n    return arguments.length ? (range = Array.from(_), rescale()) : range.slice();\n  };\n\n  scale.unknown = function(_) {\n    return arguments.length ? (unknown = _, scale) : unknown;\n  };\n\n  scale.quantiles = function() {\n    return thresholds.slice();\n  };\n\n  scale.copy = function() {\n    return quantile()\n        .domain(domain)\n        .range(range)\n        .unknown(unknown);\n  };\n\n  return initRange.apply(scale, arguments);\n}\n", "import {bisect} from \"d3-array\";\nimport {initRange} from \"./init.js\";\n\nexport default function threshold() {\n  var domain = [0.5],\n      range = [0, 1],\n      unknown,\n      n = 1;\n\n  function scale(x) {\n    return x != null && x <= x ? range[bisect(domain, x, 0, n)] : unknown;\n  }\n\n  scale.domain = function(_) {\n    return arguments.length ? (domain = Array.from(_), n = Math.min(domain.length, range.length - 1), scale) : domain.slice();\n  };\n\n  scale.range = function(_) {\n    return arguments.length ? (range = Array.from(_), n = Math.min(domain.length, range.length - 1), scale) : range.slice();\n  };\n\n  scale.invertExtent = function(y) {\n    var i = range.indexOf(y);\n    return [domain[i - 1], domain[i]];\n  };\n\n  scale.unknown = function(_) {\n    return arguments.length ? (unknown = _, scale) : unknown;\n  };\n\n  scale.copy = function() {\n    return threshold()\n        .domain(domain)\n        .range(range)\n        .unknown(unknown);\n  };\n\n  return initRange.apply(scale, arguments);\n}\n", "const t0 = new Date, t1 = new Date;\n\nexport function timeInterval(floori, offseti, count, field) {\n\n  function interval(date) {\n    return floori(date = arguments.length === 0 ? new Date : new Date(+date)), date;\n  }\n\n  interval.floor = (date) => {\n    return floori(date = new Date(+date)), date;\n  };\n\n  interval.ceil = (date) => {\n    return floori(date = new Date(date - 1)), offseti(date, 1), floori(date), date;\n  };\n\n  interval.round = (date) => {\n    const d0 = interval(date), d1 = interval.ceil(date);\n    return date - d0 < d1 - date ? d0 : d1;\n  };\n\n  interval.offset = (date, step) => {\n    return offseti(date = new Date(+date), step == null ? 1 : Math.floor(step)), date;\n  };\n\n  interval.range = (start, stop, step) => {\n    const range = [];\n    start = interval.ceil(start);\n    step = step == null ? 1 : Math.floor(step);\n    if (!(start < stop) || !(step > 0)) return range; // also handles Invalid Date\n    let previous;\n    do range.push(previous = new Date(+start)), offseti(start, step), floori(start);\n    while (previous < start && start < stop);\n    return range;\n  };\n\n  interval.filter = (test) => {\n    return timeInterval((date) => {\n      if (date >= date) while (floori(date), !test(date)) date.setTime(date - 1);\n    }, (date, step) => {\n      if (date >= date) {\n        if (step < 0) while (++step <= 0) {\n          while (offseti(date, -1), !test(date)) {} // eslint-disable-line no-empty\n        } else while (--step >= 0) {\n          while (offseti(date, +1), !test(date)) {} // eslint-disable-line no-empty\n        }\n      }\n    });\n  };\n\n  if (count) {\n    interval.count = (start, end) => {\n      t0.setTime(+start), t1.setTime(+end);\n      floori(t0), floori(t1);\n      return Math.floor(count(t0, t1));\n    };\n\n    interval.every = (step) => {\n      step = Math.floor(step);\n      return !isFinite(step) || !(step > 0) ? null\n          : !(step > 1) ? interval\n          : interval.filter(field\n              ? (d) => field(d) % step === 0\n              : (d) => interval.count(0, d) % step === 0);\n    };\n  }\n\n  return interval;\n}\n", "import {timeInterval} from \"./interval.js\";\n\nexport const millisecond = timeInterval(() => {\n  // noop\n}, (date, step) => {\n  date.setTime(+date + step);\n}, (start, end) => {\n  return end - start;\n});\n\n// An optimized implementation for this simple case.\nmillisecond.every = (k) => {\n  k = Math.floor(k);\n  if (!isFinite(k) || !(k > 0)) return null;\n  if (!(k > 1)) return millisecond;\n  return timeInterval((date) => {\n    date.setTime(Math.floor(date / k) * k);\n  }, (date, step) => {\n    date.setTime(+date + step * k);\n  }, (start, end) => {\n    return (end - start) / k;\n  });\n};\n\nexport const milliseconds = millisecond.range;\n", "import {timeInterval} from \"./interval.js\";\nimport {durationSecond} from \"./duration.js\";\n\nexport const second = timeInterval((date) => {\n  date.setTime(date - date.getMilliseconds());\n}, (date, step) => {\n  date.setTime(+date + step * durationSecond);\n}, (start, end) => {\n  return (end - start) / durationSecond;\n}, (date) => {\n  return date.getUTCSeconds();\n});\n\nexport const seconds = second.range;\n", "import {timeInterval} from \"./interval.js\";\nimport {durationMinute, durationSecond} from \"./duration.js\";\n\nexport const timeMinute = timeInterval((date) => {\n  date.setTime(date - date.getMilliseconds() - date.getSeconds() * durationSecond);\n}, (date, step) => {\n  date.setTime(+date + step * durationMinute);\n}, (start, end) => {\n  return (end - start) / durationMinute;\n}, (date) => {\n  return date.getMinutes();\n});\n\nexport const timeMinutes = timeMinute.range;\n\nexport const utcMinute = timeInterval((date) => {\n  date.setUTCSeconds(0, 0);\n}, (date, step) => {\n  date.setTime(+date + step * durationMinute);\n}, (start, end) => {\n  return (end - start) / durationMinute;\n}, (date) => {\n  return date.getUTCMinutes();\n});\n\nexport const utcMinutes = utcMinute.range;\n", "import {timeInterval} from \"./interval.js\";\nimport {durationHour, durationMinute, durationSecond} from \"./duration.js\";\n\nexport const timeHour = timeInterval((date) => {\n  date.setTime(date - date.getMilliseconds() - date.getSeconds() * durationSecond - date.getMinutes() * durationMinute);\n}, (date, step) => {\n  date.setTime(+date + step * durationHour);\n}, (start, end) => {\n  return (end - start) / durationHour;\n}, (date) => {\n  return date.getHours();\n});\n\nexport const timeHours = timeHour.range;\n\nexport const utcHour = timeInterval((date) => {\n  date.setUTCMinutes(0, 0, 0);\n}, (date, step) => {\n  date.setTime(+date + step * durationHour);\n}, (start, end) => {\n  return (end - start) / durationHour;\n}, (date) => {\n  return date.getUTCHours();\n});\n\nexport const utcHours = utcHour.range;\n", "import {timeInterval} from \"./interval.js\";\nimport {durationDay, durationMinute} from \"./duration.js\";\n\nexport const timeDay = timeInterval(\n  date => date.setHours(0, 0, 0, 0),\n  (date, step) => date.setDate(date.getDate() + step),\n  (start, end) => (end - start - (end.getTimezoneOffset() - start.getTimezoneOffset()) * durationMinute) / durationDay,\n  date => date.getDate() - 1\n);\n\nexport const timeDays = timeDay.range;\n\nexport const utcDay = timeInterval((date) => {\n  date.setUTCHours(0, 0, 0, 0);\n}, (date, step) => {\n  date.setUTCDate(date.getUTCDate() + step);\n}, (start, end) => {\n  return (end - start) / durationDay;\n}, (date) => {\n  return date.getUTCDate() - 1;\n});\n\nexport const utcDays = utcDay.range;\n\nexport const unixDay = timeInterval((date) => {\n  date.setUTCHours(0, 0, 0, 0);\n}, (date, step) => {\n  date.setUTCDate(date.getUTCDate() + step);\n}, (start, end) => {\n  return (end - start) / durationDay;\n}, (date) => {\n  return Math.floor(date / durationDay);\n});\n\nexport const unixDays = unixDay.range;\n", "import {timeInterval} from \"./interval.js\";\nimport {durationMinute, durationWeek} from \"./duration.js\";\n\nfunction timeWeekday(i) {\n  return timeInterval((date) => {\n    date.setDate(date.getDate() - (date.getDay() + 7 - i) % 7);\n    date.setHours(0, 0, 0, 0);\n  }, (date, step) => {\n    date.setDate(date.getDate() + step * 7);\n  }, (start, end) => {\n    return (end - start - (end.getTimezoneOffset() - start.getTimezoneOffset()) * durationMinute) / durationWeek;\n  });\n}\n\nexport const timeSunday = timeWeekday(0);\nexport const timeMonday = timeWeekday(1);\nexport const timeTuesday = timeWeekday(2);\nexport const timeWednesday = timeWeekday(3);\nexport const timeThursday = timeWeekday(4);\nexport const timeFriday = timeWeekday(5);\nexport const timeSaturday = timeWeekday(6);\n\nexport const timeSundays = timeSunday.range;\nexport const timeMondays = timeMonday.range;\nexport const timeTuesdays = timeTuesday.range;\nexport const timeWednesdays = timeWednesday.range;\nexport const timeThursdays = timeThursday.range;\nexport const timeFridays = timeFriday.range;\nexport const timeSaturdays = timeSaturday.range;\n\nfunction utcWeekday(i) {\n  return timeInterval((date) => {\n    date.setUTCDate(date.getUTCDate() - (date.getUTCDay() + 7 - i) % 7);\n    date.setUTCHours(0, 0, 0, 0);\n  }, (date, step) => {\n    date.setUTCDate(date.getUTCDate() + step * 7);\n  }, (start, end) => {\n    return (end - start) / durationWeek;\n  });\n}\n\nexport const utcSunday = utcWeekday(0);\nexport const utcMonday = utcWeekday(1);\nexport const utcTuesday = utcWeekday(2);\nexport const utcWednesday = utcWeekday(3);\nexport const utcThursday = utcWeekday(4);\nexport const utcFriday = utcWeekday(5);\nexport const utcSaturday = utcWeekday(6);\n\nexport const utcSundays = utcSunday.range;\nexport const utcMondays = utcMonday.range;\nexport const utcTuesdays = utcTuesday.range;\nexport const utcWednesdays = utcWednesday.range;\nexport const utcThursdays = utcThursday.range;\nexport const utcFridays = utcFriday.range;\nexport const utcSaturdays = utcSaturday.range;\n", "import {timeInterval} from \"./interval.js\";\n\nexport const timeMonth = timeInterval((date) => {\n  date.setDate(1);\n  date.setHours(0, 0, 0, 0);\n}, (date, step) => {\n  date.setMonth(date.getMonth() + step);\n}, (start, end) => {\n  return end.getMonth() - start.getMonth() + (end.getFullYear() - start.getFullYear()) * 12;\n}, (date) => {\n  return date.getMonth();\n});\n\nexport const timeMonths = timeMonth.range;\n\nexport const utcMonth = timeInterval((date) => {\n  date.setUTCDate(1);\n  date.setUTCHours(0, 0, 0, 0);\n}, (date, step) => {\n  date.setUTCMonth(date.getUTCMonth() + step);\n}, (start, end) => {\n  return end.getUTCMonth() - start.getUTCMonth() + (end.getUTCFullYear() - start.getUTCFullYear()) * 12;\n}, (date) => {\n  return date.getUTCMonth();\n});\n\nexport const utcMonths = utcMonth.range;\n", "import {timeInterval} from \"./interval.js\";\n\nexport const timeYear = timeInterval((date) => {\n  date.setMonth(0, 1);\n  date.setHours(0, 0, 0, 0);\n}, (date, step) => {\n  date.setFullYear(date.getFullYear() + step);\n}, (start, end) => {\n  return end.getFullYear() - start.getFullYear();\n}, (date) => {\n  return date.getFullYear();\n});\n\n// An optimized implementation for this simple case.\ntimeYear.every = (k) => {\n  return !isFinite(k = Math.floor(k)) || !(k > 0) ? null : timeInterval((date) => {\n    date.setFullYear(Math.floor(date.getFullYear() / k) * k);\n    date.setMonth(0, 1);\n    date.setHours(0, 0, 0, 0);\n  }, (date, step) => {\n    date.setFullYear(date.getFullYear() + step * k);\n  });\n};\n\nexport const timeYears = timeYear.range;\n\nexport const utcYear = timeInterval((date) => {\n  date.setUTCMonth(0, 1);\n  date.setUTCHours(0, 0, 0, 0);\n}, (date, step) => {\n  date.setUTCFullYear(date.getUTCFullYear() + step);\n}, (start, end) => {\n  return end.getUTCFullYear() - start.getUTCFullYear();\n}, (date) => {\n  return date.getUTCFullYear();\n});\n\n// An optimized implementation for this simple case.\nutcYear.every = (k) => {\n  return !isFinite(k = Math.floor(k)) || !(k > 0) ? null : timeInterval((date) => {\n    date.setUTCFullYear(Math.floor(date.getUTCFullYear() / k) * k);\n    date.setUTCMonth(0, 1);\n    date.setUTCHours(0, 0, 0, 0);\n  }, (date, step) => {\n    date.setUTCFullYear(date.getUTCFullYear() + step * k);\n  });\n};\n\nexport const utcYears = utcYear.range;\n", "import {bisector, tickStep} from \"d3-array\";\nimport {durationDay, durationHour, durationMinute, durationMonth, durationSecond, durationWeek, durationYear} from \"./duration.js\";\nimport {millisecond} from \"./millisecond.js\";\nimport {second} from \"./second.js\";\nimport {timeMinute, utcMinute} from \"./minute.js\";\nimport {timeHour, utcHour} from \"./hour.js\";\nimport {timeDay, unixDay} from \"./day.js\";\nimport {timeSunday, utcSunday} from \"./week.js\";\nimport {timeMonth, utcMonth} from \"./month.js\";\nimport {timeYear, utcYear} from \"./year.js\";\n\nfunction ticker(year, month, week, day, hour, minute) {\n\n  const tickIntervals = [\n    [second,  1,      durationSecond],\n    [second,  5,  5 * durationSecond],\n    [second, 15, 15 * durationSecond],\n    [second, 30, 30 * durationSecond],\n    [minute,  1,      durationMinute],\n    [minute,  5,  5 * durationMinute],\n    [minute, 15, 15 * durationMinute],\n    [minute, 30, 30 * durationMinute],\n    [  hour,  1,      durationHour  ],\n    [  hour,  3,  3 * durationHour  ],\n    [  hour,  6,  6 * durationHour  ],\n    [  hour, 12, 12 * durationHour  ],\n    [   day,  1,      durationDay   ],\n    [   day,  2,  2 * durationDay   ],\n    [  week,  1,      durationWeek  ],\n    [ month,  1,      durationMonth ],\n    [ month,  3,  3 * durationMonth ],\n    [  year,  1,      durationYear  ]\n  ];\n\n  function ticks(start, stop, count) {\n    const reverse = stop < start;\n    if (reverse) [start, stop] = [stop, start];\n    const interval = count && typeof count.range === \"function\" ? count : tickInterval(start, stop, count);\n    const ticks = interval ? interval.range(start, +stop + 1) : []; // inclusive stop\n    return reverse ? ticks.reverse() : ticks;\n  }\n\n  function tickInterval(start, stop, count) {\n    const target = Math.abs(stop - start) / count;\n    const i = bisector(([,, step]) => step).right(tickIntervals, target);\n    if (i === tickIntervals.length) return year.every(tickStep(start / durationYear, stop / durationYear, count));\n    if (i === 0) return millisecond.every(Math.max(tickStep(start, stop, count), 1));\n    const [t, step] = tickIntervals[target / tickIntervals[i - 1][2] < tickIntervals[i][2] / target ? i - 1 : i];\n    return t.every(step);\n  }\n\n  return [ticks, tickInterval];\n}\n\nconst [utcTicks, utcTickInterval] = ticker(utcYear, utcMonth, utcSunday, unixDay, utcHour, utcMinute);\nconst [timeTicks, timeTickInterval] = ticker(timeYear, timeMonth, timeSunday, timeDay, timeHour, timeMinute);\n\nexport {utcTicks, utcTickInterval, timeTicks, timeTickInterval};\n", "import {\n  timeDay,\n  timeSunday,\n  timeMonday,\n  timeThursday,\n  timeYear,\n  utcDay,\n  utcSunday,\n  utcMonday,\n  utcThursday,\n  utcYear\n} from \"d3-time\";\n\nfunction localDate(d) {\n  if (0 <= d.y && d.y < 100) {\n    var date = new Date(-1, d.m, d.d, d.H, d.M, d.S, d.L);\n    date.setFullYear(d.y);\n    return date;\n  }\n  return new Date(d.y, d.m, d.d, d.H, d.M, d.S, d.L);\n}\n\nfunction utcDate(d) {\n  if (0 <= d.y && d.y < 100) {\n    var date = new Date(Date.UTC(-1, d.m, d.d, d.H, d.M, d.S, d.L));\n    date.setUTCFullYear(d.y);\n    return date;\n  }\n  return new Date(Date.UTC(d.y, d.m, d.d, d.H, d.M, d.S, d.L));\n}\n\nfunction newDate(y, m, d) {\n  return {y: y, m: m, d: d, H: 0, M: 0, S: 0, L: 0};\n}\n\nexport default function formatLocale(locale) {\n  var locale_dateTime = locale.dateTime,\n      locale_date = locale.date,\n      locale_time = locale.time,\n      locale_periods = locale.periods,\n      locale_weekdays = locale.days,\n      locale_shortWeekdays = locale.shortDays,\n      locale_months = locale.months,\n      locale_shortMonths = locale.shortMonths;\n\n  var periodRe = formatRe(locale_periods),\n      periodLookup = formatLookup(locale_periods),\n      weekdayRe = formatRe(locale_weekdays),\n      weekdayLookup = formatLookup(locale_weekdays),\n      shortWeekdayRe = formatRe(locale_shortWeekdays),\n      shortWeekdayLookup = formatLookup(locale_shortWeekdays),\n      monthRe = formatRe(locale_months),\n      monthLookup = formatLookup(locale_months),\n      shortMonthRe = formatRe(locale_shortMonths),\n      shortMonthLookup = formatLookup(locale_shortMonths);\n\n  var formats = {\n    \"a\": formatShortWeekday,\n    \"A\": formatWeekday,\n    \"b\": formatShortMonth,\n    \"B\": formatMonth,\n    \"c\": null,\n    \"d\": formatDayOfMonth,\n    \"e\": formatDayOfMonth,\n    \"f\": formatMicroseconds,\n    \"g\": formatYearISO,\n    \"G\": formatFullYearISO,\n    \"H\": formatHour24,\n    \"I\": formatHour12,\n    \"j\": formatDayOfYear,\n    \"L\": formatMilliseconds,\n    \"m\": formatMonthNumber,\n    \"M\": formatMinutes,\n    \"p\": formatPeriod,\n    \"q\": formatQuarter,\n    \"Q\": formatUnixTimestamp,\n    \"s\": formatUnixTimestampSeconds,\n    \"S\": formatSeconds,\n    \"u\": formatWeekdayNumberMonday,\n    \"U\": formatWeekNumberSunday,\n    \"V\": formatWeekNumberISO,\n    \"w\": formatWeekdayNumberSunday,\n    \"W\": formatWeekNumberMonday,\n    \"x\": null,\n    \"X\": null,\n    \"y\": formatYear,\n    \"Y\": formatFullYear,\n    \"Z\": formatZone,\n    \"%\": formatLiteralPercent\n  };\n\n  var utcFormats = {\n    \"a\": formatUTCShortWeekday,\n    \"A\": formatUTCWeekday,\n    \"b\": formatUTCShortMonth,\n    \"B\": formatUTCMonth,\n    \"c\": null,\n    \"d\": formatUTCDayOfMonth,\n    \"e\": formatUTCDayOfMonth,\n    \"f\": formatUTCMicroseconds,\n    \"g\": formatUTCYearISO,\n    \"G\": formatUTCFullYearISO,\n    \"H\": formatUTCHour24,\n    \"I\": formatUTCHour12,\n    \"j\": formatUTCDayOfYear,\n    \"L\": formatUTCMilliseconds,\n    \"m\": formatUTCMonthNumber,\n    \"M\": formatUTCMinutes,\n    \"p\": formatUTCPeriod,\n    \"q\": formatUTCQuarter,\n    \"Q\": formatUnixTimestamp,\n    \"s\": formatUnixTimestampSeconds,\n    \"S\": formatUTCSeconds,\n    \"u\": formatUTCWeekdayNumberMonday,\n    \"U\": formatUTCWeekNumberSunday,\n    \"V\": formatUTCWeekNumberISO,\n    \"w\": formatUTCWeekdayNumberSunday,\n    \"W\": formatUTCWeekNumberMonday,\n    \"x\": null,\n    \"X\": null,\n    \"y\": formatUTCYear,\n    \"Y\": formatUTCFullYear,\n    \"Z\": formatUTCZone,\n    \"%\": formatLiteralPercent\n  };\n\n  var parses = {\n    \"a\": parseShortWeekday,\n    \"A\": parseWeekday,\n    \"b\": parseShortMonth,\n    \"B\": parseMonth,\n    \"c\": parseLocaleDateTime,\n    \"d\": parseDayOfMonth,\n    \"e\": parseDayOfMonth,\n    \"f\": parseMicroseconds,\n    \"g\": parseYear,\n    \"G\": parseFullYear,\n    \"H\": parseHour24,\n    \"I\": parseHour24,\n    \"j\": parseDayOfYear,\n    \"L\": parseMilliseconds,\n    \"m\": parseMonthNumber,\n    \"M\": parseMinutes,\n    \"p\": parsePeriod,\n    \"q\": parseQuarter,\n    \"Q\": parseUnixTimestamp,\n    \"s\": parseUnixTimestampSeconds,\n    \"S\": parseSeconds,\n    \"u\": parseWeekdayNumberMonday,\n    \"U\": parseWeekNumberSunday,\n    \"V\": parseWeekNumberISO,\n    \"w\": parseWeekdayNumberSunday,\n    \"W\": parseWeekNumberMonday,\n    \"x\": parseLocaleDate,\n    \"X\": parseLocaleTime,\n    \"y\": parseYear,\n    \"Y\": parseFullYear,\n    \"Z\": parseZone,\n    \"%\": parseLiteralPercent\n  };\n\n  // These recursive directive definitions must be deferred.\n  formats.x = newFormat(locale_date, formats);\n  formats.X = newFormat(locale_time, formats);\n  formats.c = newFormat(locale_dateTime, formats);\n  utcFormats.x = newFormat(locale_date, utcFormats);\n  utcFormats.X = newFormat(locale_time, utcFormats);\n  utcFormats.c = newFormat(locale_dateTime, utcFormats);\n\n  function newFormat(specifier, formats) {\n    return function(date) {\n      var string = [],\n          i = -1,\n          j = 0,\n          n = specifier.length,\n          c,\n          pad,\n          format;\n\n      if (!(date instanceof Date)) date = new Date(+date);\n\n      while (++i < n) {\n        if (specifier.charCodeAt(i) === 37) {\n          string.push(specifier.slice(j, i));\n          if ((pad = pads[c = specifier.charAt(++i)]) != null) c = specifier.charAt(++i);\n          else pad = c === \"e\" ? \" \" : \"0\";\n          if (format = formats[c]) c = format(date, pad);\n          string.push(c);\n          j = i + 1;\n        }\n      }\n\n      string.push(specifier.slice(j, i));\n      return string.join(\"\");\n    };\n  }\n\n  function newParse(specifier, Z) {\n    return function(string) {\n      var d = newDate(1900, undefined, 1),\n          i = parseSpecifier(d, specifier, string += \"\", 0),\n          week, day;\n      if (i != string.length) return null;\n\n      // If a UNIX timestamp is specified, return it.\n      if (\"Q\" in d) return new Date(d.Q);\n      if (\"s\" in d) return new Date(d.s * 1000 + (\"L\" in d ? d.L : 0));\n\n      // If this is utcParse, never use the local timezone.\n      if (Z && !(\"Z\" in d)) d.Z = 0;\n\n      // The am-pm flag is 0 for AM, and 1 for PM.\n      if (\"p\" in d) d.H = d.H % 12 + d.p * 12;\n\n      // If the month was not specified, inherit from the quarter.\n      if (d.m === undefined) d.m = \"q\" in d ? d.q : 0;\n\n      // Convert day-of-week and week-of-year to day-of-year.\n      if (\"V\" in d) {\n        if (d.V < 1 || d.V > 53) return null;\n        if (!(\"w\" in d)) d.w = 1;\n        if (\"Z\" in d) {\n          week = utcDate(newDate(d.y, 0, 1)), day = week.getUTCDay();\n          week = day > 4 || day === 0 ? utcMonday.ceil(week) : utcMonday(week);\n          week = utcDay.offset(week, (d.V - 1) * 7);\n          d.y = week.getUTCFullYear();\n          d.m = week.getUTCMonth();\n          d.d = week.getUTCDate() + (d.w + 6) % 7;\n        } else {\n          week = localDate(newDate(d.y, 0, 1)), day = week.getDay();\n          week = day > 4 || day === 0 ? timeMonday.ceil(week) : timeMonday(week);\n          week = timeDay.offset(week, (d.V - 1) * 7);\n          d.y = week.getFullYear();\n          d.m = week.getMonth();\n          d.d = week.getDate() + (d.w + 6) % 7;\n        }\n      } else if (\"W\" in d || \"U\" in d) {\n        if (!(\"w\" in d)) d.w = \"u\" in d ? d.u % 7 : \"W\" in d ? 1 : 0;\n        day = \"Z\" in d ? utcDate(newDate(d.y, 0, 1)).getUTCDay() : localDate(newDate(d.y, 0, 1)).getDay();\n        d.m = 0;\n        d.d = \"W\" in d ? (d.w + 6) % 7 + d.W * 7 - (day + 5) % 7 : d.w + d.U * 7 - (day + 6) % 7;\n      }\n\n      // If a time zone is specified, all fields are interpreted as UTC and then\n      // offset according to the specified time zone.\n      if (\"Z\" in d) {\n        d.H += d.Z / 100 | 0;\n        d.M += d.Z % 100;\n        return utcDate(d);\n      }\n\n      // Otherwise, all fields are in local time.\n      return localDate(d);\n    };\n  }\n\n  function parseSpecifier(d, specifier, string, j) {\n    var i = 0,\n        n = specifier.length,\n        m = string.length,\n        c,\n        parse;\n\n    while (i < n) {\n      if (j >= m) return -1;\n      c = specifier.charCodeAt(i++);\n      if (c === 37) {\n        c = specifier.charAt(i++);\n        parse = parses[c in pads ? specifier.charAt(i++) : c];\n        if (!parse || ((j = parse(d, string, j)) < 0)) return -1;\n      } else if (c != string.charCodeAt(j++)) {\n        return -1;\n      }\n    }\n\n    return j;\n  }\n\n  function parsePeriod(d, string, i) {\n    var n = periodRe.exec(string.slice(i));\n    return n ? (d.p = periodLookup.get(n[0].toLowerCase()), i + n[0].length) : -1;\n  }\n\n  function parseShortWeekday(d, string, i) {\n    var n = shortWeekdayRe.exec(string.slice(i));\n    return n ? (d.w = shortWeekdayLookup.get(n[0].toLowerCase()), i + n[0].length) : -1;\n  }\n\n  function parseWeekday(d, string, i) {\n    var n = weekdayRe.exec(string.slice(i));\n    return n ? (d.w = weekdayLookup.get(n[0].toLowerCase()), i + n[0].length) : -1;\n  }\n\n  function parseShortMonth(d, string, i) {\n    var n = shortMonthRe.exec(string.slice(i));\n    return n ? (d.m = shortMonthLookup.get(n[0].toLowerCase()), i + n[0].length) : -1;\n  }\n\n  function parseMonth(d, string, i) {\n    var n = monthRe.exec(string.slice(i));\n    return n ? (d.m = monthLookup.get(n[0].toLowerCase()), i + n[0].length) : -1;\n  }\n\n  function parseLocaleDateTime(d, string, i) {\n    return parseSpecifier(d, locale_dateTime, string, i);\n  }\n\n  function parseLocaleDate(d, string, i) {\n    return parseSpecifier(d, locale_date, string, i);\n  }\n\n  function parseLocaleTime(d, string, i) {\n    return parseSpecifier(d, locale_time, string, i);\n  }\n\n  function formatShortWeekday(d) {\n    return locale_shortWeekdays[d.getDay()];\n  }\n\n  function formatWeekday(d) {\n    return locale_weekdays[d.getDay()];\n  }\n\n  function formatShortMonth(d) {\n    return locale_shortMonths[d.getMonth()];\n  }\n\n  function formatMonth(d) {\n    return locale_months[d.getMonth()];\n  }\n\n  function formatPeriod(d) {\n    return locale_periods[+(d.getHours() >= 12)];\n  }\n\n  function formatQuarter(d) {\n    return 1 + ~~(d.getMonth() / 3);\n  }\n\n  function formatUTCShortWeekday(d) {\n    return locale_shortWeekdays[d.getUTCDay()];\n  }\n\n  function formatUTCWeekday(d) {\n    return locale_weekdays[d.getUTCDay()];\n  }\n\n  function formatUTCShortMonth(d) {\n    return locale_shortMonths[d.getUTCMonth()];\n  }\n\n  function formatUTCMonth(d) {\n    return locale_months[d.getUTCMonth()];\n  }\n\n  function formatUTCPeriod(d) {\n    return locale_periods[+(d.getUTCHours() >= 12)];\n  }\n\n  function formatUTCQuarter(d) {\n    return 1 + ~~(d.getUTCMonth() / 3);\n  }\n\n  return {\n    format: function(specifier) {\n      var f = newFormat(specifier += \"\", formats);\n      f.toString = function() { return specifier; };\n      return f;\n    },\n    parse: function(specifier) {\n      var p = newParse(specifier += \"\", false);\n      p.toString = function() { return specifier; };\n      return p;\n    },\n    utcFormat: function(specifier) {\n      var f = newFormat(specifier += \"\", utcFormats);\n      f.toString = function() { return specifier; };\n      return f;\n    },\n    utcParse: function(specifier) {\n      var p = newParse(specifier += \"\", true);\n      p.toString = function() { return specifier; };\n      return p;\n    }\n  };\n}\n\nvar pads = {\"-\": \"\", \"_\": \" \", \"0\": \"0\"},\n    numberRe = /^\\s*\\d+/, // note: ignores next directive\n    percentRe = /^%/,\n    requoteRe = /[\\\\^$*+?|[\\]().{}]/g;\n\nfunction pad(value, fill, width) {\n  var sign = value < 0 ? \"-\" : \"\",\n      string = (sign ? -value : value) + \"\",\n      length = string.length;\n  return sign + (length < width ? new Array(width - length + 1).join(fill) + string : string);\n}\n\nfunction requote(s) {\n  return s.replace(requoteRe, \"\\\\$&\");\n}\n\nfunction formatRe(names) {\n  return new RegExp(\"^(?:\" + names.map(requote).join(\"|\") + \")\", \"i\");\n}\n\nfunction formatLookup(names) {\n  return new Map(names.map((name, i) => [name.toLowerCase(), i]));\n}\n\nfunction parseWeekdayNumberSunday(d, string, i) {\n  var n = numberRe.exec(string.slice(i, i + 1));\n  return n ? (d.w = +n[0], i + n[0].length) : -1;\n}\n\nfunction parseWeekdayNumberMonday(d, string, i) {\n  var n = numberRe.exec(string.slice(i, i + 1));\n  return n ? (d.u = +n[0], i + n[0].length) : -1;\n}\n\nfunction parseWeekNumberSunday(d, string, i) {\n  var n = numberRe.exec(string.slice(i, i + 2));\n  return n ? (d.U = +n[0], i + n[0].length) : -1;\n}\n\nfunction parseWeekNumberISO(d, string, i) {\n  var n = numberRe.exec(string.slice(i, i + 2));\n  return n ? (d.V = +n[0], i + n[0].length) : -1;\n}\n\nfunction parseWeekNumberMonday(d, string, i) {\n  var n = numberRe.exec(string.slice(i, i + 2));\n  return n ? (d.W = +n[0], i + n[0].length) : -1;\n}\n\nfunction parseFullYear(d, string, i) {\n  var n = numberRe.exec(string.slice(i, i + 4));\n  return n ? (d.y = +n[0], i + n[0].length) : -1;\n}\n\nfunction parseYear(d, string, i) {\n  var n = numberRe.exec(string.slice(i, i + 2));\n  return n ? (d.y = +n[0] + (+n[0] > 68 ? 1900 : 2000), i + n[0].length) : -1;\n}\n\nfunction parseZone(d, string, i) {\n  var n = /^(Z)|([+-]\\d\\d)(?::?(\\d\\d))?/.exec(string.slice(i, i + 6));\n  return n ? (d.Z = n[1] ? 0 : -(n[2] + (n[3] || \"00\")), i + n[0].length) : -1;\n}\n\nfunction parseQuarter(d, string, i) {\n  var n = numberRe.exec(string.slice(i, i + 1));\n  return n ? (d.q = n[0] * 3 - 3, i + n[0].length) : -1;\n}\n\nfunction parseMonthNumber(d, string, i) {\n  var n = numberRe.exec(string.slice(i, i + 2));\n  return n ? (d.m = n[0] - 1, i + n[0].length) : -1;\n}\n\nfunction parseDayOfMonth(d, string, i) {\n  var n = numberRe.exec(string.slice(i, i + 2));\n  return n ? (d.d = +n[0], i + n[0].length) : -1;\n}\n\nfunction parseDayOfYear(d, string, i) {\n  var n = numberRe.exec(string.slice(i, i + 3));\n  return n ? (d.m = 0, d.d = +n[0], i + n[0].length) : -1;\n}\n\nfunction parseHour24(d, string, i) {\n  var n = numberRe.exec(string.slice(i, i + 2));\n  return n ? (d.H = +n[0], i + n[0].length) : -1;\n}\n\nfunction parseMinutes(d, string, i) {\n  var n = numberRe.exec(string.slice(i, i + 2));\n  return n ? (d.M = +n[0], i + n[0].length) : -1;\n}\n\nfunction parseSeconds(d, string, i) {\n  var n = numberRe.exec(string.slice(i, i + 2));\n  return n ? (d.S = +n[0], i + n[0].length) : -1;\n}\n\nfunction parseMilliseconds(d, string, i) {\n  var n = numberRe.exec(string.slice(i, i + 3));\n  return n ? (d.L = +n[0], i + n[0].length) : -1;\n}\n\nfunction parseMicroseconds(d, string, i) {\n  var n = numberRe.exec(string.slice(i, i + 6));\n  return n ? (d.L = Math.floor(n[0] / 1000), i + n[0].length) : -1;\n}\n\nfunction parseLiteralPercent(d, string, i) {\n  var n = percentRe.exec(string.slice(i, i + 1));\n  return n ? i + n[0].length : -1;\n}\n\nfunction parseUnixTimestamp(d, string, i) {\n  var n = numberRe.exec(string.slice(i));\n  return n ? (d.Q = +n[0], i + n[0].length) : -1;\n}\n\nfunction parseUnixTimestampSeconds(d, string, i) {\n  var n = numberRe.exec(string.slice(i));\n  return n ? (d.s = +n[0], i + n[0].length) : -1;\n}\n\nfunction formatDayOfMonth(d, p) {\n  return pad(d.getDate(), p, 2);\n}\n\nfunction formatHour24(d, p) {\n  return pad(d.getHours(), p, 2);\n}\n\nfunction formatHour12(d, p) {\n  return pad(d.getHours() % 12 || 12, p, 2);\n}\n\nfunction formatDayOfYear(d, p) {\n  return pad(1 + timeDay.count(timeYear(d), d), p, 3);\n}\n\nfunction formatMilliseconds(d, p) {\n  return pad(d.getMilliseconds(), p, 3);\n}\n\nfunction formatMicroseconds(d, p) {\n  return formatMilliseconds(d, p) + \"000\";\n}\n\nfunction formatMonthNumber(d, p) {\n  return pad(d.getMonth() + 1, p, 2);\n}\n\nfunction formatMinutes(d, p) {\n  return pad(d.getMinutes(), p, 2);\n}\n\nfunction formatSeconds(d, p) {\n  return pad(d.getSeconds(), p, 2);\n}\n\nfunction formatWeekdayNumberMonday(d) {\n  var day = d.getDay();\n  return day === 0 ? 7 : day;\n}\n\nfunction formatWeekNumberSunday(d, p) {\n  return pad(timeSunday.count(timeYear(d) - 1, d), p, 2);\n}\n\nfunction dISO(d) {\n  var day = d.getDay();\n  return (day >= 4 || day === 0) ? timeThursday(d) : timeThursday.ceil(d);\n}\n\nfunction formatWeekNumberISO(d, p) {\n  d = dISO(d);\n  return pad(timeThursday.count(timeYear(d), d) + (timeYear(d).getDay() === 4), p, 2);\n}\n\nfunction formatWeekdayNumberSunday(d) {\n  return d.getDay();\n}\n\nfunction formatWeekNumberMonday(d, p) {\n  return pad(timeMonday.count(timeYear(d) - 1, d), p, 2);\n}\n\nfunction formatYear(d, p) {\n  return pad(d.getFullYear() % 100, p, 2);\n}\n\nfunction formatYearISO(d, p) {\n  d = dISO(d);\n  return pad(d.getFullYear() % 100, p, 2);\n}\n\nfunction formatFullYear(d, p) {\n  return pad(d.getFullYear() % 10000, p, 4);\n}\n\nfunction formatFullYearISO(d, p) {\n  var day = d.getDay();\n  d = (day >= 4 || day === 0) ? timeThursday(d) : timeThursday.ceil(d);\n  return pad(d.getFullYear() % 10000, p, 4);\n}\n\nfunction formatZone(d) {\n  var z = d.getTimezoneOffset();\n  return (z > 0 ? \"-\" : (z *= -1, \"+\"))\n      + pad(z / 60 | 0, \"0\", 2)\n      + pad(z % 60, \"0\", 2);\n}\n\nfunction formatUTCDayOfMonth(d, p) {\n  return pad(d.getUTCDate(), p, 2);\n}\n\nfunction formatUTCHour24(d, p) {\n  return pad(d.getUTCHours(), p, 2);\n}\n\nfunction formatUTCHour12(d, p) {\n  return pad(d.getUTCHours() % 12 || 12, p, 2);\n}\n\nfunction formatUTCDayOfYear(d, p) {\n  return pad(1 + utcDay.count(utcYear(d), d), p, 3);\n}\n\nfunction formatUTCMilliseconds(d, p) {\n  return pad(d.getUTCMilliseconds(), p, 3);\n}\n\nfunction formatUTCMicroseconds(d, p) {\n  return formatUTCMilliseconds(d, p) + \"000\";\n}\n\nfunction formatUTCMonthNumber(d, p) {\n  return pad(d.getUTCMonth() + 1, p, 2);\n}\n\nfunction formatUTCMinutes(d, p) {\n  return pad(d.getUTCMinutes(), p, 2);\n}\n\nfunction formatUTCSeconds(d, p) {\n  return pad(d.getUTCSeconds(), p, 2);\n}\n\nfunction formatUTCWeekdayNumberMonday(d) {\n  var dow = d.getUTCDay();\n  return dow === 0 ? 7 : dow;\n}\n\nfunction formatUTCWeekNumberSunday(d, p) {\n  return pad(utcSunday.count(utcYear(d) - 1, d), p, 2);\n}\n\nfunction UTCdISO(d) {\n  var day = d.getUTCDay();\n  return (day >= 4 || day === 0) ? utcThursday(d) : utcThursday.ceil(d);\n}\n\nfunction formatUTCWeekNumberISO(d, p) {\n  d = UTCdISO(d);\n  return pad(utcThursday.count(utcYear(d), d) + (utcYear(d).getUTCDay() === 4), p, 2);\n}\n\nfunction formatUTCWeekdayNumberSunday(d) {\n  return d.getUTCDay();\n}\n\nfunction formatUTCWeekNumberMonday(d, p) {\n  return pad(utcMonday.count(utcYear(d) - 1, d), p, 2);\n}\n\nfunction formatUTCYear(d, p) {\n  return pad(d.getUTCFullYear() % 100, p, 2);\n}\n\nfunction formatUTCYearISO(d, p) {\n  d = UTCdISO(d);\n  return pad(d.getUTCFullYear() % 100, p, 2);\n}\n\nfunction formatUTCFullYear(d, p) {\n  return pad(d.getUTCFullYear() % 10000, p, 4);\n}\n\nfunction formatUTCFullYearISO(d, p) {\n  var day = d.getUTCDay();\n  d = (day >= 4 || day === 0) ? utcThursday(d) : utcThursday.ceil(d);\n  return pad(d.getUTCFullYear() % 10000, p, 4);\n}\n\nfunction formatUTCZone() {\n  return \"+0000\";\n}\n\nfunction formatLiteralPercent() {\n  return \"%\";\n}\n\nfunction formatUnixTimestamp(d) {\n  return +d;\n}\n\nfunction formatUnixTimestampSeconds(d) {\n  return Math.floor(+d / 1000);\n}\n", "import formatLocale from \"./locale.js\";\n\nvar locale;\nexport var timeFormat;\nexport var timeParse;\nexport var utcFormat;\nexport var utcParse;\n\ndefaultLocale({\n  dateTime: \"%x, %X\",\n  date: \"%-m/%-d/%Y\",\n  time: \"%-I:%M:%S %p\",\n  periods: [\"AM\", \"PM\"],\n  days: [\"Sunday\", \"Monday\", \"Tuesday\", \"Wednesday\", \"Thursday\", \"Friday\", \"Saturday\"],\n  shortDays: [\"Sun\", \"Mon\", \"Tue\", \"Wed\", \"Thu\", \"Fri\", \"Sat\"],\n  months: [\"January\", \"February\", \"March\", \"April\", \"May\", \"June\", \"July\", \"August\", \"September\", \"October\", \"November\", \"December\"],\n  shortMonths: [\"Jan\", \"Feb\", \"Mar\", \"Apr\", \"May\", \"Jun\", \"Jul\", \"Aug\", \"Sep\", \"Oct\", \"Nov\", \"Dec\"]\n});\n\nexport default function defaultLocale(definition) {\n  locale = formatLocale(definition);\n  timeFormat = locale.format;\n  timeParse = locale.parse;\n  utcFormat = locale.utcFormat;\n  utcParse = locale.utcParse;\n  return locale;\n}\n", "import {timeYear, timeMonth, timeWeek, timeDay, timeHour, timeMinute, timeSecond, timeTicks, timeTickInterval} from \"d3-time\";\nimport {timeFormat} from \"d3-time-format\";\nimport continuous, {copy} from \"./continuous.js\";\nimport {initRange} from \"./init.js\";\nimport nice from \"./nice.js\";\n\nfunction date(t) {\n  return new Date(t);\n}\n\nfunction number(t) {\n  return t instanceof Date ? +t : +new Date(+t);\n}\n\nexport function calendar(ticks, tickInterval, year, month, week, day, hour, minute, second, format) {\n  var scale = continuous(),\n      invert = scale.invert,\n      domain = scale.domain;\n\n  var formatMillisecond = format(\".%L\"),\n      formatSecond = format(\":%S\"),\n      formatMinute = format(\"%I:%M\"),\n      formatHour = format(\"%I %p\"),\n      formatDay = format(\"%a %d\"),\n      formatWeek = format(\"%b %d\"),\n      formatMonth = format(\"%B\"),\n      formatYear = format(\"%Y\");\n\n  function tickFormat(date) {\n    return (second(date) < date ? formatMillisecond\n        : minute(date) < date ? formatSecond\n        : hour(date) < date ? formatMinute\n        : day(date) < date ? formatHour\n        : month(date) < date ? (week(date) < date ? formatDay : formatWeek)\n        : year(date) < date ? formatMonth\n        : formatYear)(date);\n  }\n\n  scale.invert = function(y) {\n    return new Date(invert(y));\n  };\n\n  scale.domain = function(_) {\n    return arguments.length ? domain(Array.from(_, number)) : domain().map(date);\n  };\n\n  scale.ticks = function(interval) {\n    var d = domain();\n    return ticks(d[0], d[d.length - 1], interval == null ? 10 : interval);\n  };\n\n  scale.tickFormat = function(count, specifier) {\n    return specifier == null ? tickFormat : format(specifier);\n  };\n\n  scale.nice = function(interval) {\n    var d = domain();\n    if (!interval || typeof interval.range !== \"function\") interval = tickInterval(d[0], d[d.length - 1], interval == null ? 10 : interval);\n    return interval ? domain(nice(d, interval)) : scale;\n  };\n\n  scale.copy = function() {\n    return copy(scale, calendar(ticks, tickInterval, year, month, week, day, hour, minute, second, format));\n  };\n\n  return scale;\n}\n\nexport default function time() {\n  return initRange.apply(calendar(timeTicks, timeTickInterval, timeYear, timeMonth, timeWeek, timeDay, timeHour, timeMinute, timeSecond, timeFormat).domain([new Date(2000, 0, 1), new Date(2000, 0, 2)]), arguments);\n}\n", "import {utcYear, utcMonth, utcWeek, utcDay, utcHour, utcMinute, utcSecond, utcTicks, utcTickInterval} from \"d3-time\";\nimport {utcFormat} from \"d3-time-format\";\nimport {calendar} from \"./time.js\";\nimport {initRange} from \"./init.js\";\n\nexport default function utcTime() {\n  return initRange.apply(calendar(utcTicks, utcTickInterval, utcYear, utcMonth, utcWeek, utcDay, utcHour, utcMinute, utcSecond, utcFormat).domain([Date.UTC(2000, 0, 1), Date.UTC(2000, 0, 2)]), arguments);\n}\n", "import {interpolate, interpolateRound} from \"d3-interpolate\";\nimport {identity} from \"./continuous.js\";\nimport {initInterpolator} from \"./init.js\";\nimport {linearish} from \"./linear.js\";\nimport {loggish} from \"./log.js\";\nimport {symlogish} from \"./symlog.js\";\nimport {powish} from \"./pow.js\";\n\nfunction transformer() {\n  var x0 = 0,\n      x1 = 1,\n      t0,\n      t1,\n      k10,\n      transform,\n      interpolator = identity,\n      clamp = false,\n      unknown;\n\n  function scale(x) {\n    return x == null || isNaN(x = +x) ? unknown : interpolator(k10 === 0 ? 0.5 : (x = (transform(x) - t0) * k10, clamp ? Math.max(0, Math.min(1, x)) : x));\n  }\n\n  scale.domain = function(_) {\n    return arguments.length ? ([x0, x1] = _, t0 = transform(x0 = +x0), t1 = transform(x1 = +x1), k10 = t0 === t1 ? 0 : 1 / (t1 - t0), scale) : [x0, x1];\n  };\n\n  scale.clamp = function(_) {\n    return arguments.length ? (clamp = !!_, scale) : clamp;\n  };\n\n  scale.interpolator = function(_) {\n    return arguments.length ? (interpolator = _, scale) : interpolator;\n  };\n\n  function range(interpolate) {\n    return function(_) {\n      var r0, r1;\n      return arguments.length ? ([r0, r1] = _, interpolator = interpolate(r0, r1), scale) : [interpolator(0), interpolator(1)];\n    };\n  }\n\n  scale.range = range(interpolate);\n\n  scale.rangeRound = range(interpolateRound);\n\n  scale.unknown = function(_) {\n    return arguments.length ? (unknown = _, scale) : unknown;\n  };\n\n  return function(t) {\n    transform = t, t0 = t(x0), t1 = t(x1), k10 = t0 === t1 ? 0 : 1 / (t1 - t0);\n    return scale;\n  };\n}\n\nexport function copy(source, target) {\n  return target\n      .domain(source.domain())\n      .interpolator(source.interpolator())\n      .clamp(source.clamp())\n      .unknown(source.unknown());\n}\n\nexport default function sequential() {\n  var scale = linearish(transformer()(identity));\n\n  scale.copy = function() {\n    return copy(scale, sequential());\n  };\n\n  return initInterpolator.apply(scale, arguments);\n}\n\nexport function sequentialLog() {\n  var scale = loggish(transformer()).domain([1, 10]);\n\n  scale.copy = function() {\n    return copy(scale, sequentialLog()).base(scale.base());\n  };\n\n  return initInterpolator.apply(scale, arguments);\n}\n\nexport function sequentialSymlog() {\n  var scale = symlogish(transformer());\n\n  scale.copy = function() {\n    return copy(scale, sequentialSymlog()).constant(scale.constant());\n  };\n\n  return initInterpolator.apply(scale, arguments);\n}\n\nexport function sequentialPow() {\n  var scale = powish(transformer());\n\n  scale.copy = function() {\n    return copy(scale, sequentialPow()).exponent(scale.exponent());\n  };\n\n  return initInterpolator.apply(scale, arguments);\n}\n\nexport function sequentialSqrt() {\n  return sequentialPow.apply(null, arguments).exponent(0.5);\n}\n", "import {interpolate, interpolateRound, piecewise} from \"d3-interpolate\";\nimport {identity} from \"./continuous.js\";\nimport {initInterpolator} from \"./init.js\";\nimport {linearish} from \"./linear.js\";\nimport {loggish} from \"./log.js\";\nimport {copy} from \"./sequential.js\";\nimport {symlogish} from \"./symlog.js\";\nimport {powish} from \"./pow.js\";\n\nfunction transformer() {\n  var x0 = 0,\n      x1 = 0.5,\n      x2 = 1,\n      s = 1,\n      t0,\n      t1,\n      t2,\n      k10,\n      k21,\n      interpolator = identity,\n      transform,\n      clamp = false,\n      unknown;\n\n  function scale(x) {\n    return isNaN(x = +x) ? unknown : (x = 0.5 + ((x = +transform(x)) - t1) * (s * x < s * t1 ? k10 : k21), interpolator(clamp ? Math.max(0, Math.min(1, x)) : x));\n  }\n\n  scale.domain = function(_) {\n    return arguments.length ? ([x0, x1, x2] = _, t0 = transform(x0 = +x0), t1 = transform(x1 = +x1), t2 = transform(x2 = +x2), k10 = t0 === t1 ? 0 : 0.5 / (t1 - t0), k21 = t1 === t2 ? 0 : 0.5 / (t2 - t1), s = t1 < t0 ? -1 : 1, scale) : [x0, x1, x2];\n  };\n\n  scale.clamp = function(_) {\n    return arguments.length ? (clamp = !!_, scale) : clamp;\n  };\n\n  scale.interpolator = function(_) {\n    return arguments.length ? (interpolator = _, scale) : interpolator;\n  };\n\n  function range(interpolate) {\n    return function(_) {\n      var r0, r1, r2;\n      return arguments.length ? ([r0, r1, r2] = _, interpolator = piecewise(interpolate, [r0, r1, r2]), scale) : [interpolator(0), interpolator(0.5), interpolator(1)];\n    };\n  }\n\n  scale.range = range(interpolate);\n\n  scale.rangeRound = range(interpolateRound);\n\n  scale.unknown = function(_) {\n    return arguments.length ? (unknown = _, scale) : unknown;\n  };\n\n  return function(t) {\n    transform = t, t0 = t(x0), t1 = t(x1), t2 = t(x2), k10 = t0 === t1 ? 0 : 0.5 / (t1 - t0), k21 = t1 === t2 ? 0 : 0.5 / (t2 - t1), s = t1 < t0 ? -1 : 1;\n    return scale;\n  };\n}\n\nexport default function diverging() {\n  var scale = linearish(transformer()(identity));\n\n  scale.copy = function() {\n    return copy(scale, diverging());\n  };\n\n  return initInterpolator.apply(scale, arguments);\n}\n\nexport function divergingLog() {\n  var scale = loggish(transformer()).domain([0.1, 1, 10]);\n\n  scale.copy = function() {\n    return copy(scale, divergingLog()).base(scale.base());\n  };\n\n  return initInterpolator.apply(scale, arguments);\n}\n\nexport function divergingSymlog() {\n  var scale = symlogish(transformer());\n\n  scale.copy = function() {\n    return copy(scale, divergingSymlog()).constant(scale.constant());\n  };\n\n  return initInterpolator.apply(scale, arguments);\n}\n\nexport function divergingPow() {\n  var scale = powish(transformer());\n\n  scale.copy = function() {\n    return copy(scale, divergingPow()).exponent(scale.exponent());\n  };\n\n  return initInterpolator.apply(scale, arguments);\n}\n\nexport function divergingSqrt() {\n  return divergingPow.apply(null, arguments).exponent(0.5);\n}\n", "export default function(specifier) {\n  var n = specifier.length / 6 | 0, colors = new Array(n), i = 0;\n  while (i < n) colors[i] = \"#\" + specifier.slice(i * 6, ++i * 6);\n  return colors;\n}\n", "import colors from \"../colors.js\";\n\nexport default colors(\"1f77b4ff7f0e2ca02cd627289467bd8c564be377c27f7f7fbcbd2217becf\");\n", "import colors from \"../colors.js\";\n\nexport default colors(\"7fc97fbeaed4fdc086ffff99386cb0f0027fbf5b17666666\");\n", "import colors from \"../colors.js\";\n\nexport default colors(\"1b9e77d95f027570b3e7298a66a61ee6ab02a6761d666666\");\n", "import colors from \"../colors.js\";\n\nexport default colors(\"a6cee31f78b4b2df8a33a02cfb9a99e31a1cfdbf6fff7f00cab2d66a3d9affff99b15928\");\n", "import colors from \"../colors.js\";\n\nexport default colors(\"fbb4aeb3cde3ccebc5decbe4fed9a6ffffcce5d8bdfddaecf2f2f2\");\n", "import colors from \"../colors.js\";\n\nexport default colors(\"b3e2cdfdcdaccbd5e8f4cae4e6f5c9fff2aef1e2cccccccc\");\n", "import colors from \"../colors.js\";\n\nexport default colors(\"e41a1c377eb84daf4a984ea3ff7f00ffff33a65628f781bf999999\");\n", "import colors from \"../colors.js\";\n\nexport default colors(\"66c2a5fc8d628da0cbe78ac3a6d854ffd92fe5c494b3b3b3\");\n", "import colors from \"../colors.js\";\n\nexport default colors(\"8dd3c7ffffb3bebadafb807280b1d3fdb462b3de69fccde5d9d9d9bc80bdccebc5ffed6f\");\n", "import colors from \"../colors.js\";\n\nexport default colors(\"4e79a7f28e2ce1575976b7b259a14fedc949af7aa1ff9da79c755fbab0ab\");\n", "import {interpolateRgbBasis} from \"d3-interpolate\";\n\nexport default scheme => interpolateRgbBasis(scheme[scheme.length - 1]);\n", "import colors from \"../colors.js\";\nimport ramp from \"../ramp.js\";\n\nexport var scheme = new Array(3).concat(\n  \"d8b365f5f5f55ab4ac\",\n  \"a6611adfc27d80cdc1018571\",\n  \"a6611adfc27df5f5f580cdc1018571\",\n  \"8c510ad8b365f6e8c3c7eae55ab4ac01665e\",\n  \"8c510ad8b365f6e8c3f5f5f5c7eae55ab4ac01665e\",\n  \"8c510abf812ddfc27df6e8c3c7eae580cdc135978f01665e\",\n  \"8c510abf812ddfc27df6e8c3f5f5f5c7eae580cdc135978f01665e\",\n  \"5430058c510abf812ddfc27df6e8c3c7eae580cdc135978f01665e003c30\",\n  \"5430058c510abf812ddfc27df6e8c3f5f5f5c7eae580cdc135978f01665e003c30\"\n).map(colors);\n\nexport default ramp(scheme);\n", "import colors from \"../colors.js\";\nimport ramp from \"../ramp.js\";\n\nexport var scheme = new Array(3).concat(\n  \"af8dc3f7f7f77fbf7b\",\n  \"7b3294c2a5cfa6dba0008837\",\n  \"7b3294c2a5cff7f7f7a6dba0008837\",\n  \"762a83af8dc3e7d4e8d9f0d37fbf7b1b7837\",\n  \"762a83af8dc3e7d4e8f7f7f7d9f0d37fbf7b1b7837\",\n  \"762a839970abc2a5cfe7d4e8d9f0d3a6dba05aae611b7837\",\n  \"762a839970abc2a5cfe7d4e8f7f7f7d9f0d3a6dba05aae611b7837\",\n  \"40004b762a839970abc2a5cfe7d4e8d9f0d3a6dba05aae611b783700441b\",\n  \"40004b762a839970abc2a5cfe7d4e8f7f7f7d9f0d3a6dba05aae611b783700441b\"\n).map(colors);\n\nexport default ramp(scheme);\n", "import colors from \"../colors.js\";\nimport ramp from \"../ramp.js\";\n\nexport var scheme = new Array(3).concat(\n  \"e9a3c9f7f7f7a1d76a\",\n  \"d01c8bf1b6dab8e1864dac26\",\n  \"d01c8bf1b6daf7f7f7b8e1864dac26\",\n  \"c51b7de9a3c9fde0efe6f5d0a1d76a4d9221\",\n  \"c51b7de9a3c9fde0eff7f7f7e6f5d0a1d76a4d9221\",\n  \"c51b7dde77aef1b6dafde0efe6f5d0b8e1867fbc414d9221\",\n  \"c51b7dde77aef1b6dafde0eff7f7f7e6f5d0b8e1867fbc414d9221\",\n  \"8e0152c51b7dde77aef1b6dafde0efe6f5d0b8e1867fbc414d9221276419\",\n  \"8e0152c51b7dde77aef1b6dafde0eff7f7f7e6f5d0b8e1867fbc414d9221276419\"\n).map(colors);\n\nexport default ramp(scheme);\n", "import colors from \"../colors.js\";\nimport ramp from \"../ramp.js\";\n\nexport var scheme = new Array(3).concat(\n  \"998ec3f7f7f7f1a340\",\n  \"5e3c99b2abd2fdb863e66101\",\n  \"5e3c99b2abd2f7f7f7fdb863e66101\",\n  \"542788998ec3d8daebfee0b6f1a340b35806\",\n  \"542788998ec3d8daebf7f7f7fee0b6f1a340b35806\",\n  \"5427888073acb2abd2d8daebfee0b6fdb863e08214b35806\",\n  \"5427888073acb2abd2d8daebf7f7f7fee0b6fdb863e08214b35806\",\n  \"2d004b5427888073acb2abd2d8daebfee0b6fdb863e08214b358067f3b08\",\n  \"2d004b5427888073acb2abd2d8daebf7f7f7fee0b6fdb863e08214b358067f3b08\"\n).map(colors);\n\nexport default ramp(scheme);\n", "import colors from \"../colors.js\";\nimport ramp from \"../ramp.js\";\n\nexport var scheme = new Array(3).concat(\n  \"ef8a62f7f7f767a9cf\",\n  \"ca0020f4a58292c5de0571b0\",\n  \"ca0020f4a582f7f7f792c5de0571b0\",\n  \"b2182bef8a62fddbc7d1e5f067a9cf2166ac\",\n  \"b2182bef8a62fddbc7f7f7f7d1e5f067a9cf2166ac\",\n  \"b2182bd6604df4a582fddbc7d1e5f092c5de4393c32166ac\",\n  \"b2182bd6604df4a582fddbc7f7f7f7d1e5f092c5de4393c32166ac\",\n  \"67001fb2182bd6604df4a582fddbc7d1e5f092c5de4393c32166ac053061\",\n  \"67001fb2182bd6604df4a582fddbc7f7f7f7d1e5f092c5de4393c32166ac053061\"\n).map(colors);\n\nexport default ramp(scheme);\n", "import colors from \"../colors.js\";\nimport ramp from \"../ramp.js\";\n\nexport var scheme = new Array(3).concat(\n  \"ef8a62ffffff999999\",\n  \"ca0020f4a582bababa404040\",\n  \"ca0020f4a582ffffffbababa404040\",\n  \"b2182bef8a62fddbc7e0e0e09999994d4d4d\",\n  \"b2182bef8a62fddbc7ffffffe0e0e09999994d4d4d\",\n  \"b2182bd6604df4a582fddbc7e0e0e0bababa8787874d4d4d\",\n  \"b2182bd6604df4a582fddbc7ffffffe0e0e0bababa8787874d4d4d\",\n  \"67001fb2182bd6604df4a582fddbc7e0e0e0bababa8787874d4d4d1a1a1a\",\n  \"67001fb2182bd6604df4a582fddbc7ffffffe0e0e0bababa8787874d4d4d1a1a1a\"\n).map(colors);\n\nexport default ramp(scheme);\n", "import colors from \"../colors.js\";\nimport ramp from \"../ramp.js\";\n\nexport var scheme = new Array(3).concat(\n  \"fc8d59ffffbf91bfdb\",\n  \"d7191cfdae61abd9e92c7bb6\",\n  \"d7191cfdae61ffffbfabd9e92c7bb6\",\n  \"d73027fc8d59fee090e0f3f891bfdb4575b4\",\n  \"d73027fc8d59fee090ffffbfe0f3f891bfdb4575b4\",\n  \"d73027f46d43fdae61fee090e0f3f8abd9e974add14575b4\",\n  \"d73027f46d43fdae61fee090ffffbfe0f3f8abd9e974add14575b4\",\n  \"a50026d73027f46d43fdae61fee090e0f3f8abd9e974add14575b4313695\",\n  \"a50026d73027f46d43fdae61fee090ffffbfe0f3f8abd9e974add14575b4313695\"\n).map(colors);\n\nexport default ramp(scheme);\n", "import colors from \"../colors.js\";\nimport ramp from \"../ramp.js\";\n\nexport var scheme = new Array(3).concat(\n  \"fc8d59ffffbf91cf60\",\n  \"d7191cfdae61a6d96a1a9641\",\n  \"d7191cfdae61ffffbfa6d96a1a9641\",\n  \"d73027fc8d59fee08bd9ef8b91cf601a9850\",\n  \"d73027fc8d59fee08bffffbfd9ef8b91cf601a9850\",\n  \"d73027f46d43fdae61fee08bd9ef8ba6d96a66bd631a9850\",\n  \"d73027f46d43fdae61fee08bffffbfd9ef8ba6d96a66bd631a9850\",\n  \"a50026d73027f46d43fdae61fee08bd9ef8ba6d96a66bd631a9850006837\",\n  \"a50026d73027f46d43fdae61fee08bffffbfd9ef8ba6d96a66bd631a9850006837\"\n).map(colors);\n\nexport default ramp(scheme);\n", "import colors from \"../colors.js\";\nimport ramp from \"../ramp.js\";\n\nexport var scheme = new Array(3).concat(\n  \"fc8d59ffffbf99d594\",\n  \"d7191cfdae61abdda42b83ba\",\n  \"d7191cfdae61ffffbfabdda42b83ba\",\n  \"d53e4ffc8d59fee08be6f59899d5943288bd\",\n  \"d53e4ffc8d59fee08bffffbfe6f59899d5943288bd\",\n  \"d53e4ff46d43fdae61fee08be6f598abdda466c2a53288bd\",\n  \"d53e4ff46d43fdae61fee08bffffbfe6f598abdda466c2a53288bd\",\n  \"9e0142d53e4ff46d43fdae61fee08be6f598abdda466c2a53288bd5e4fa2\",\n  \"9e0142d53e4ff46d43fdae61fee08bffffbfe6f598abdda466c2a53288bd5e4fa2\"\n).map(colors);\n\nexport default ramp(scheme);\n", "import colors from \"../colors.js\";\nimport ramp from \"../ramp.js\";\n\nexport var scheme = new Array(3).concat(\n  \"e5f5f999d8c92ca25f\",\n  \"edf8fbb2e2e266c2a4238b45\",\n  \"edf8fbb2e2e266c2a42ca25f006d2c\",\n  \"edf8fbccece699d8c966c2a42ca25f006d2c\",\n  \"edf8fbccece699d8c966c2a441ae76238b45005824\",\n  \"f7fcfde5f5f9ccece699d8c966c2a441ae76238b45005824\",\n  \"f7fcfde5f5f9ccece699d8c966c2a441ae76238b45006d2c00441b\"\n).map(colors);\n\nexport default ramp(scheme);\n", "import colors from \"../colors.js\";\nimport ramp from \"../ramp.js\";\n\nexport var scheme = new Array(3).concat(\n  \"e0ecf49ebcda8856a7\",\n  \"edf8fbb3cde38c96c688419d\",\n  \"edf8fbb3cde38c96c68856a7810f7c\",\n  \"edf8fbbfd3e69ebcda8c96c68856a7810f7c\",\n  \"edf8fbbfd3e69ebcda8c96c68c6bb188419d6e016b\",\n  \"f7fcfde0ecf4bfd3e69ebcda8c96c68c6bb188419d6e016b\",\n  \"f7fcfde0ecf4bfd3e69ebcda8c96c68c6bb188419d810f7c4d004b\"\n).map(colors);\n\nexport default ramp(scheme);\n", "import colors from \"../colors.js\";\nimport ramp from \"../ramp.js\";\n\nexport var scheme = new Array(3).concat(\n  \"e0f3dba8ddb543a2ca\",\n  \"f0f9e8bae4bc7bccc42b8cbe\",\n  \"f0f9e8bae4bc7bccc443a2ca0868ac\",\n  \"f0f9e8ccebc5a8ddb57bccc443a2ca0868ac\",\n  \"f0f9e8ccebc5a8ddb57bccc44eb3d32b8cbe08589e\",\n  \"f7fcf0e0f3dbccebc5a8ddb57bccc44eb3d32b8cbe08589e\",\n  \"f7fcf0e0f3dbccebc5a8ddb57bccc44eb3d32b8cbe0868ac084081\"\n).map(colors);\n\nexport default ramp(scheme);\n", "import colors from \"../colors.js\";\nimport ramp from \"../ramp.js\";\n\nexport var scheme = new Array(3).concat(\n  \"fee8c8fdbb84e34a33\",\n  \"fef0d9fdcc8afc8d59d7301f\",\n  \"fef0d9fdcc8afc8d59e34a33b30000\",\n  \"fef0d9fdd49efdbb84fc8d59e34a33b30000\",\n  \"fef0d9fdd49efdbb84fc8d59ef6548d7301f990000\",\n  \"fff7ecfee8c8fdd49efdbb84fc8d59ef6548d7301f990000\",\n  \"fff7ecfee8c8fdd49efdbb84fc8d59ef6548d7301fb300007f0000\"\n).map(colors);\n\nexport default ramp(scheme);\n", "import colors from \"../colors.js\";\nimport ramp from \"../ramp.js\";\n\nexport var scheme = new Array(3).concat(\n  \"ece2f0a6bddb1c9099\",\n  \"f6eff7bdc9e167a9cf02818a\",\n  \"f6eff7bdc9e167a9cf1c9099016c59\",\n  \"f6eff7d0d1e6a6bddb67a9cf1c9099016c59\",\n  \"f6eff7d0d1e6a6bddb67a9cf3690c002818a016450\",\n  \"fff7fbece2f0d0d1e6a6bddb67a9cf3690c002818a016450\",\n  \"fff7fbece2f0d0d1e6a6bddb67a9cf3690c002818a016c59014636\"\n).map(colors);\n\nexport default ramp(scheme);\n", "import colors from \"../colors.js\";\nimport ramp from \"../ramp.js\";\n\nexport var scheme = new Array(3).concat(\n  \"ece7f2a6bddb2b8cbe\",\n  \"f1eef6bdc9e174a9cf0570b0\",\n  \"f1eef6bdc9e174a9cf2b8cbe045a8d\",\n  \"f1eef6d0d1e6a6bddb74a9cf2b8cbe045a8d\",\n  \"f1eef6d0d1e6a6bddb74a9cf3690c00570b0034e7b\",\n  \"fff7fbece7f2d0d1e6a6bddb74a9cf3690c00570b0034e7b\",\n  \"fff7fbece7f2d0d1e6a6bddb74a9cf3690c00570b0045a8d023858\"\n).map(colors);\n\nexport default ramp(scheme);\n", "import colors from \"../colors.js\";\nimport ramp from \"../ramp.js\";\n\nexport var scheme = new Array(3).concat(\n  \"e7e1efc994c7dd1c77\",\n  \"f1eef6d7b5d8df65b0ce1256\",\n  \"f1eef6d7b5d8df65b0dd1c77980043\",\n  \"f1eef6d4b9dac994c7df65b0dd1c77980043\",\n  \"f1eef6d4b9dac994c7df65b0e7298ace125691003f\",\n  \"f7f4f9e7e1efd4b9dac994c7df65b0e7298ace125691003f\",\n  \"f7f4f9e7e1efd4b9dac994c7df65b0e7298ace125698004367001f\"\n).map(colors);\n\nexport default ramp(scheme);\n", "import colors from \"../colors.js\";\nimport ramp from \"../ramp.js\";\n\nexport var scheme = new Array(3).concat(\n  \"fde0ddfa9fb5c51b8a\",\n  \"feebe2fbb4b9f768a1ae017e\",\n  \"feebe2fbb4b9f768a1c51b8a7a0177\",\n  \"feebe2fcc5c0fa9fb5f768a1c51b8a7a0177\",\n  \"feebe2fcc5c0fa9fb5f768a1dd3497ae017e7a0177\",\n  \"fff7f3fde0ddfcc5c0fa9fb5f768a1dd3497ae017e7a0177\",\n  \"fff7f3fde0ddfcc5c0fa9fb5f768a1dd3497ae017e7a017749006a\"\n).map(colors);\n\nexport default ramp(scheme);\n", "import colors from \"../colors.js\";\nimport ramp from \"../ramp.js\";\n\nexport var scheme = new Array(3).concat(\n  \"edf8b17fcdbb2c7fb8\",\n  \"ffffcca1dab441b6c4225ea8\",\n  \"ffffcca1dab441b6c42c7fb8253494\",\n  \"ffffccc7e9b47fcdbb41b6c42c7fb8253494\",\n  \"ffffccc7e9b47fcdbb41b6c41d91c0225ea80c2c84\",\n  \"ffffd9edf8b1c7e9b47fcdbb41b6c41d91c0225ea80c2c84\",\n  \"ffffd9edf8b1c7e9b47fcdbb41b6c41d91c0225ea8253494081d58\"\n).map(colors);\n\nexport default ramp(scheme);\n", "import colors from \"../colors.js\";\nimport ramp from \"../ramp.js\";\n\nexport var scheme = new Array(3).concat(\n  \"f7fcb9addd8e31a354\",\n  \"ffffccc2e69978c679238443\",\n  \"ffffccc2e69978c67931a354006837\",\n  \"ffffccd9f0a3addd8e78c67931a354006837\",\n  \"ffffccd9f0a3addd8e78c67941ab5d238443005a32\",\n  \"ffffe5f7fcb9d9f0a3addd8e78c67941ab5d238443005a32\",\n  \"ffffe5f7fcb9d9f0a3addd8e78c67941ab5d238443006837004529\"\n).map(colors);\n\nexport default ramp(scheme);\n", "import colors from \"../colors.js\";\nimport ramp from \"../ramp.js\";\n\nexport var scheme = new Array(3).concat(\n  \"fff7bcfec44fd95f0e\",\n  \"ffffd4fed98efe9929cc4c02\",\n  \"ffffd4fed98efe9929d95f0e993404\",\n  \"ffffd4fee391fec44ffe9929d95f0e993404\",\n  \"ffffd4fee391fec44ffe9929ec7014cc4c028c2d04\",\n  \"ffffe5fff7bcfee391fec44ffe9929ec7014cc4c028c2d04\",\n  \"ffffe5fff7bcfee391fec44ffe9929ec7014cc4c02993404662506\"\n).map(colors);\n\nexport default ramp(scheme);\n", "import colors from \"../colors.js\";\nimport ramp from \"../ramp.js\";\n\nexport var scheme = new Array(3).concat(\n  \"ffeda0feb24cf03b20\",\n  \"ffffb2fecc5cfd8d3ce31a1c\",\n  \"ffffb2fecc5cfd8d3cf03b20bd0026\",\n  \"ffffb2fed976feb24cfd8d3cf03b20bd0026\",\n  \"ffffb2fed976feb24cfd8d3cfc4e2ae31a1cb10026\",\n  \"ffffccffeda0fed976feb24cfd8d3cfc4e2ae31a1cb10026\",\n  \"ffffccffeda0fed976feb24cfd8d3cfc4e2ae31a1cbd0026800026\"\n).map(colors);\n\nexport default ramp(scheme);\n", "import colors from \"../colors.js\";\nimport ramp from \"../ramp.js\";\n\nexport var scheme = new Array(3).concat(\n  \"deebf79ecae13182bd\",\n  \"eff3ffbdd7e76baed62171b5\",\n  \"eff3ffbdd7e76baed63182bd08519c\",\n  \"eff3ffc6dbef9ecae16baed63182bd08519c\",\n  \"eff3ffc6dbef9ecae16baed64292c62171b5084594\",\n  \"f7fbffdeebf7c6dbef9ecae16baed64292c62171b5084594\",\n  \"f7fbffdeebf7c6dbef9ecae16baed64292c62171b508519c08306b\"\n).map(colors);\n\nexport default ramp(scheme);\n", "import colors from \"../colors.js\";\nimport ramp from \"../ramp.js\";\n\nexport var scheme = new Array(3).concat(\n  \"e5f5e0a1d99b31a354\",\n  \"edf8e9bae4b374c476238b45\",\n  \"edf8e9bae4b374c47631a354006d2c\",\n  \"edf8e9c7e9c0a1d99b74c47631a354006d2c\",\n  \"edf8e9c7e9c0a1d99b74c47641ab5d238b45005a32\",\n  \"f7fcf5e5f5e0c7e9c0a1d99b74c47641ab5d238b45005a32\",\n  \"f7fcf5e5f5e0c7e9c0a1d99b74c47641ab5d238b45006d2c00441b\"\n).map(colors);\n\nexport default ramp(scheme);\n", "import colors from \"../colors.js\";\nimport ramp from \"../ramp.js\";\n\nexport var scheme = new Array(3).concat(\n  \"f0f0f0bdbdbd636363\",\n  \"f7f7f7cccccc969696525252\",\n  \"f7f7f7cccccc969696636363252525\",\n  \"f7f7f7d9d9d9bdbdbd969696636363252525\",\n  \"f7f7f7d9d9d9bdbdbd969696737373525252252525\",\n  \"fffffff0f0f0d9d9d9bdbdbd969696737373525252252525\",\n  \"fffffff0f0f0d9d9d9bdbdbd969696737373525252252525000000\"\n).map(colors);\n\nexport default ramp(scheme);\n", "import colors from \"../colors.js\";\nimport ramp from \"../ramp.js\";\n\nexport var scheme = new Array(3).concat(\n  \"efedf5bcbddc756bb1\",\n  \"f2f0f7cbc9e29e9ac86a51a3\",\n  \"f2f0f7cbc9e29e9ac8756bb154278f\",\n  \"f2f0f7dadaebbcbddc9e9ac8756bb154278f\",\n  \"f2f0f7dadaebbcbddc9e9ac8807dba6a51a34a1486\",\n  \"fcfbfdefedf5dadaebbcbddc9e9ac8807dba6a51a34a1486\",\n  \"fcfbfdefedf5dadaebbcbddc9e9ac8807dba6a51a354278f3f007d\"\n).map(colors);\n\nexport default ramp(scheme);\n", "import colors from \"../colors.js\";\nimport ramp from \"../ramp.js\";\n\nexport var scheme = new Array(3).concat(\n  \"fee0d2fc9272de2d26\",\n  \"fee5d9fcae91fb6a4acb181d\",\n  \"fee5d9fcae91fb6a4ade2d26a50f15\",\n  \"fee5d9fcbba1fc9272fb6a4ade2d26a50f15\",\n  \"fee5d9fcbba1fc9272fb6a4aef3b2ccb181d99000d\",\n  \"fff5f0fee0d2fcbba1fc9272fb6a4aef3b2ccb181d99000d\",\n  \"fff5f0fee0d2fcbba1fc9272fb6a4aef3b2ccb181da50f1567000d\"\n).map(colors);\n\nexport default ramp(scheme);\n", "import colors from \"../colors.js\";\nimport ramp from \"../ramp.js\";\n\nexport var scheme = new Array(3).concat(\n  \"fee6cefdae6be6550d\",\n  \"feeddefdbe85fd8d3cd94701\",\n  \"feeddefdbe85fd8d3ce6550da63603\",\n  \"feeddefdd0a2fdae6bfd8d3ce6550da63603\",\n  \"feeddefdd0a2fdae6bfd8d3cf16913d948018c2d04\",\n  \"fff5ebfee6cefdd0a2fdae6bfd8d3cf16913d948018c2d04\",\n  \"fff5ebfee6cefdd0a2fdae6bfd8d3cf16913d94801a636037f2704\"\n).map(colors);\n\nexport default ramp(scheme);\n", "export default function(t) {\n  t = Math.max(0, Math.min(1, t));\n  return \"rgb(\"\n      + Math.max(0, Math.min(255, Math.round(-4.54 - t * (35.34 - t * (2381.73 - t * (6402.7 - t * (7024.72 - t * 2710.57))))))) + \", \"\n      + Math.max(0, Math.min(255, Math.round(32.49 + t * (170.73 + t * (52.82 - t * (131.46 - t * (176.58 - t * 67.37))))))) + \", \"\n      + Math.max(0, Math.min(255, Math.round(81.24 + t * (442.36 - t * (2482.43 - t * (6167.24 - t * (6614.94 - t * 2475.67)))))))\n      + \")\";\n}\n", "import {cubehelix} from \"d3-color\";\nimport {interpolateCubehelixLong} from \"d3-interpolate\";\n\nexport default interpolateCubehelixLong(cubehelix(300, 0.5, 0.0), cubehelix(-240, 0.5, 1.0));\n", "import {cubehelix} from \"d3-color\";\nimport {interpolateCubehelixLong} from \"d3-interpolate\";\n\nexport var warm = interpolateCubehelixLong(cubehelix(-100, 0.75, 0.35), cubehelix(80, 1.50, 0.8));\n\nexport var cool = interpolateCubehelixLong(cubehelix(260, 0.75, 0.35), cubehelix(80, 1.50, 0.8));\n\nvar c = cubehelix();\n\nexport default function(t) {\n  if (t < 0 || t > 1) t -= Math.floor(t);\n  var ts = Math.abs(t - 0.5);\n  c.h = 360 * t - 100;\n  c.s = 1.5 - 1.5 * ts;\n  c.l = 0.8 - 0.9 * ts;\n  return c + \"\";\n}\n", "import {rgb} from \"d3-color\";\n\nvar c = rgb(),\n    pi_1_3 = Math.PI / 3,\n    pi_2_3 = Math.PI * 2 / 3;\n\nexport default function(t) {\n  var x;\n  t = (0.5 - t) * Math.PI;\n  c.r = 255 * (x = Math.sin(t)) * x;\n  c.g = 255 * (x = Math.sin(t + pi_1_3)) * x;\n  c.b = 255 * (x = Math.sin(t + pi_2_3)) * x;\n  return c + \"\";\n}\n", "export default function(t) {\n  t = Math.max(0, Math.min(1, t));\n  return \"rgb(\"\n      + Math.max(0, Math.min(255, Math.round(34.61 + t * (1172.33 - t * (10793.56 - t * (33300.12 - t * (38394.49 - t * 14825.05))))))) + \", \"\n      + Math.max(0, Math.min(255, Math.round(23.31 + t * (557.33 + t * (1225.33 - t * (3574.96 - t * (1073.77 + t * 707.56))))))) + \", \"\n      + Math.max(0, Math.min(255, Math.round(27.2 + t * (3211.1 - t * (15327.97 - t * (27814 - t * (22569.18 - t * 6838.66)))))))\n      + \")\";\n}\n", "import colors from \"../colors.js\";\n\nfunction ramp(range) {\n  var n = range.length;\n  return function(t) {\n    return range[Math.max(0, Math.min(n - 1, Math.floor(t * n)))];\n  };\n}\n\nexport default ramp(colors(\"44015444025645045745055946075a46085c460a5d460b5e470d60470e6147106347116447136548146748166848176948186a481a6c481b6d481c6e481d6f481f70482071482173482374482475482576482677482878482979472a7a472c7a472d7b472e7c472f7d46307e46327e46337f463480453581453781453882443983443a83443b84433d84433e85423f854240864241864142874144874045884046883f47883f48893e49893e4a893e4c8a3d4d8a3d4e8a3c4f8a3c508b3b518b3b528b3a538b3a548c39558c39568c38588c38598c375a8c375b8d365c8d365d8d355e8d355f8d34608d34618d33628d33638d32648e32658e31668e31678e31688e30698e306a8e2f6b8e2f6c8e2e6d8e2e6e8e2e6f8e2d708e2d718e2c718e2c728e2c738e2b748e2b758e2a768e2a778e2a788e29798e297a8e297b8e287c8e287d8e277e8e277f8e27808e26818e26828e26828e25838e25848e25858e24868e24878e23888e23898e238a8d228b8d228c8d228d8d218e8d218f8d21908d21918c20928c20928c20938c1f948c1f958b1f968b1f978b1f988b1f998a1f9a8a1e9b8a1e9c891e9d891f9e891f9f881fa0881fa1881fa1871fa28720a38620a48621a58521a68522a78522a88423a98324aa8325ab8225ac8226ad8127ad8128ae8029af7f2ab07f2cb17e2db27d2eb37c2fb47c31b57b32b67a34b67935b77937b87838b9773aba763bbb753dbc743fbc7340bd7242be7144bf7046c06f48c16e4ac16d4cc26c4ec36b50c46a52c56954c56856c66758c7655ac8645cc8635ec96260ca6063cb5f65cb5e67cc5c69cd5b6ccd5a6ece5870cf5773d05675d05477d1537ad1517cd2507fd34e81d34d84d44b86d54989d5488bd6468ed64590d74393d74195d84098d83e9bd93c9dd93ba0da39a2da37a5db36a8db34aadc32addc30b0dd2fb2dd2db5de2bb8de29bade28bddf26c0df25c2df23c5e021c8e020cae11fcde11dd0e11cd2e21bd5e21ad8e219dae319dde318dfe318e2e418e5e419e7e419eae51aece51befe51cf1e51df4e61ef6e620f8e621fbe723fde725\"));\n\nexport var magma = ramp(colors(\"00000401000501010601010802010902020b02020d03030f03031204041405041606051806051a07061c08071e0907200a08220b09240c09260d0a290e0b2b100b2d110c2f120d31130d34140e36150e38160f3b180f3d19103f1a10421c10441d11471e114920114b21114e22115024125325125527125829115a2a115c2c115f2d11612f116331116533106734106936106b38106c390f6e3b0f703d0f713f0f72400f74420f75440f764510774710784910784a10794c117a4e117b4f127b51127c52137c54137d56147d57157e59157e5a167e5c167f5d177f5f187f601880621980641a80651a80671b80681c816a1c816b1d816d1d816e1e81701f81721f817320817521817621817822817922827b23827c23827e24828025828125818326818426818627818827818928818b29818c29818e2a81902a81912b81932b80942c80962c80982d80992d809b2e7f9c2e7f9e2f7fa02f7fa1307ea3307ea5317ea6317da8327daa337dab337cad347cae347bb0357bb2357bb3367ab5367ab73779b83779ba3878bc3978bd3977bf3a77c03a76c23b75c43c75c53c74c73d73c83e73ca3e72cc3f71cd4071cf4070d0416fd2426fd3436ed5446dd6456cd8456cd9466bdb476adc4869de4968df4a68e04c67e24d66e34e65e44f64e55064e75263e85362e95462ea5661eb5760ec5860ed5a5fee5b5eef5d5ef05f5ef1605df2625df2645cf3655cf4675cf4695cf56b5cf66c5cf66e5cf7705cf7725cf8745cf8765cf9785df9795df97b5dfa7d5efa7f5efa815ffb835ffb8560fb8761fc8961fc8a62fc8c63fc8e64fc9065fd9266fd9467fd9668fd9869fd9a6afd9b6bfe9d6cfe9f6dfea16efea36ffea571fea772fea973feaa74feac76feae77feb078feb27afeb47bfeb67cfeb77efeb97ffebb81febd82febf84fec185fec287fec488fec68afec88cfeca8dfecc8ffecd90fecf92fed194fed395fed597fed799fed89afdda9cfddc9efddea0fde0a1fde2a3fde3a5fde5a7fde7a9fde9aafdebacfcecaefceeb0fcf0b2fcf2b4fcf4b6fcf6b8fcf7b9fcf9bbfcfbbdfcfdbf\"));\n\nexport var inferno = ramp(colors(\"00000401000501010601010802010a02020c02020e03021004031204031405041706041907051b08051d09061f0a07220b07240c08260d08290e092b10092d110a30120a32140b34150b37160b39180c3c190c3e1b0c411c0c431e0c451f0c48210c4a230c4c240c4f260c51280b53290b552b0b572d0b592f0a5b310a5c320a5e340a5f3609613809623909633b09643d09653e0966400a67420a68440a68450a69470b6a490b6a4a0c6b4c0c6b4d0d6c4f0d6c510e6c520e6d540f6d550f6d57106e59106e5a116e5c126e5d126e5f136e61136e62146e64156e65156e67166e69166e6a176e6c186e6d186e6f196e71196e721a6e741a6e751b6e771c6d781c6d7a1d6d7c1d6d7d1e6d7f1e6c801f6c82206c84206b85216b87216b88226a8a226a8c23698d23698f24699025689225689326679526679727669827669a28659b29649d29649f2a63a02a63a22b62a32c61a52c60a62d60a82e5fa92e5eab2f5ead305dae305cb0315bb1325ab3325ab43359b63458b73557b93556ba3655bc3754bd3853bf3952c03a51c13a50c33b4fc43c4ec63d4dc73e4cc83f4bca404acb4149cc4248ce4347cf4446d04545d24644d34743d44842d54a41d74b3fd84c3ed94d3dda4e3cdb503bdd513ade5238df5337e05536e15635e25734e35933e45a31e55c30e65d2fe75e2ee8602de9612bea632aeb6429eb6628ec6726ed6925ee6a24ef6c23ef6e21f06f20f1711ff1731df2741cf3761bf37819f47918f57b17f57d15f67e14f68013f78212f78410f8850ff8870ef8890cf98b0bf98c0af98e09fa9008fa9207fa9407fb9606fb9706fb9906fb9b06fb9d07fc9f07fca108fca309fca50afca60cfca80dfcaa0ffcac11fcae12fcb014fcb216fcb418fbb61afbb81dfbba1ffbbc21fbbe23fac026fac228fac42afac62df9c72ff9c932f9cb35f8cd37f8cf3af7d13df7d340f6d543f6d746f5d949f5db4cf4dd4ff4df53f4e156f3e35af3e55df2e661f2e865f2ea69f1ec6df1ed71f1ef75f1f179f2f27df2f482f3f586f3f68af4f88ef5f992f6fa96f8fb9af9fc9dfafda1fcffa4\"));\n\nexport var plasma = ramp(colors(\"0d088710078813078916078a19068c1b068d1d068e20068f2206902406912605912805922a05932c05942e05952f059631059733059735049837049938049a3a049a3c049b3e049c3f049c41049d43039e44039e46039f48039f4903a04b03a14c02a14e02a25002a25102a35302a35502a45601a45801a45901a55b01a55c01a65e01a66001a66100a76300a76400a76600a76700a86900a86a00a86c00a86e00a86f00a87100a87201a87401a87501a87701a87801a87a02a87b02a87d03a87e03a88004a88104a78305a78405a78606a68707a68808a68a09a58b0aa58d0ba58e0ca48f0da4910ea3920fa39410a29511a19613a19814a099159f9a169f9c179e9d189d9e199da01a9ca11b9ba21d9aa31e9aa51f99a62098a72197a82296aa2395ab2494ac2694ad2793ae2892b02991b12a90b22b8fb32c8eb42e8db52f8cb6308bb7318ab83289ba3388bb3488bc3587bd3786be3885bf3984c03a83c13b82c23c81c33d80c43e7fc5407ec6417dc7427cc8437bc9447aca457acb4679cc4778cc4977cd4a76ce4b75cf4c74d04d73d14e72d24f71d35171d45270d5536fd5546ed6556dd7566cd8576bd9586ada5a6ada5b69db5c68dc5d67dd5e66de5f65de6164df6263e06363e16462e26561e26660e3685fe4695ee56a5de56b5de66c5ce76e5be76f5ae87059e97158e97257ea7457eb7556eb7655ec7754ed7953ed7a52ee7b51ef7c51ef7e50f07f4ff0804ef1814df1834cf2844bf3854bf3874af48849f48948f58b47f58c46f68d45f68f44f79044f79143f79342f89441f89540f9973ff9983ef99a3efa9b3dfa9c3cfa9e3bfb9f3afba139fba238fca338fca537fca636fca835fca934fdab33fdac33fdae32fdaf31fdb130fdb22ffdb42ffdb52efeb72dfeb82cfeba2cfebb2bfebd2afebe2afec029fdc229fdc328fdc527fdc627fdc827fdca26fdcb26fccd25fcce25fcd025fcd225fbd324fbd524fbd724fad824fada24f9dc24f9dd25f8df25f8e125f7e225f7e425f6e626f6e826f5e926f5eb27f4ed27f3ee27f3f027f2f227f1f426f1f525f0f724f0f921\"));\n", "export const abs = Math.abs;\nexport const atan2 = Math.atan2;\nexport const cos = Math.cos;\nexport const max = Math.max;\nexport const min = Math.min;\nexport const sin = Math.sin;\nexport const sqrt = Math.sqrt;\n\nexport const epsilon = 1e-12;\nexport const pi = Math.PI;\nexport const halfPi = pi / 2;\nexport const tau = 2 * pi;\n\nexport function acos(x) {\n  return x > 1 ? 0 : x < -1 ? pi : Math.acos(x);\n}\n\nexport function asin(x) {\n  return x >= 1 ? halfPi : x <= -1 ? -halfPi : Math.asin(x);\n}\n", "import {min, sqrt} from \"../math.js\";\n\nconst sqrt3 = sqrt(3);\n\nexport default {\n  draw(context, size) {\n    const r = sqrt(size + min(size / 28, 0.75)) * 0.59436;\n    const t = r / 2;\n    const u = t * sqrt3;\n    context.moveTo(0, r);\n    context.lineTo(0, -r);\n    context.moveTo(-u, -t);\n    context.lineTo(u, t);\n    context.moveTo(-u, t);\n    context.lineTo(u, -t);\n  }\n};\n", "import {pi, sqrt, tau} from \"../math.js\";\n\nexport default {\n  draw(context, size) {\n    const r = sqrt(size / pi);\n    context.moveTo(r, 0);\n    context.arc(0, 0, r, 0, tau);\n  }\n};\n", "import {sqrt} from \"../math.js\";\n\nexport default {\n  draw(context, size) {\n    const r = sqrt(size / 5) / 2;\n    context.moveTo(-3 * r, -r);\n    context.lineTo(-r, -r);\n    context.lineTo(-r, -3 * r);\n    context.lineTo(r, -3 * r);\n    context.lineTo(r, -r);\n    context.lineTo(3 * r, -r);\n    context.lineTo(3 * r, r);\n    context.lineTo(r, r);\n    context.lineTo(r, 3 * r);\n    context.lineTo(-r, 3 * r);\n    context.lineTo(-r, r);\n    context.lineTo(-3 * r, r);\n    context.closePath();\n  }\n};\n", "import {sqrt} from \"../math.js\";\n\nconst tan30 = sqrt(1 / 3);\nconst tan30_2 = tan30 * 2;\n\nexport default {\n  draw(context, size) {\n    const y = sqrt(size / tan30_2);\n    const x = y * tan30;\n    context.moveTo(0, -y);\n    context.lineTo(x, 0);\n    context.lineTo(0, y);\n    context.lineTo(-x, 0);\n    context.closePath();\n  }\n};\n", "import {sqrt} from \"../math.js\";\n\nexport default {\n  draw(context, size) {\n    const r = sqrt(size) * 0.62625;\n    context.moveTo(0, -r);\n    context.lineTo(r, 0);\n    context.lineTo(0, r);\n    context.lineTo(-r, 0);\n    context.closePath();\n  }\n};\n", "import {min, sqrt} from \"../math.js\";\n\nexport default {\n  draw(context, size) {\n    const r = sqrt(size - min(size / 7, 2)) * 0.87559;\n    context.moveTo(-r, 0);\n    context.lineTo(r, 0);\n    context.moveTo(0, r);\n    context.lineTo(0, -r);\n  }\n};\n", "import {sqrt} from \"../math.js\";\n\nexport default {\n  draw(context, size) {\n    const w = sqrt(size);\n    const x = -w / 2;\n    context.rect(x, x, w, w);\n  }\n};\n", "import {sqrt} from \"../math.js\";\n\nexport default {\n  draw(context, size) {\n    const r = sqrt(size) * 0.4431;\n    context.moveTo(r, r);\n    context.lineTo(r, -r);\n    context.lineTo(-r, -r);\n    context.lineTo(-r, r);\n    context.closePath();\n  }\n};\n", "import {sin, cos, sqrt, pi, tau} from \"../math.js\";\n\nconst ka = 0.89081309152928522810;\nconst kr = sin(pi / 10) / sin(7 * pi / 10);\nconst kx = sin(tau / 10) * kr;\nconst ky = -cos(tau / 10) * kr;\n\nexport default {\n  draw(context, size) {\n    const r = sqrt(size * ka);\n    const x = kx * r;\n    const y = ky * r;\n    context.moveTo(0, -r);\n    context.lineTo(x, y);\n    for (let i = 1; i < 5; ++i) {\n      const a = tau * i / 5;\n      const c = cos(a);\n      const s = sin(a);\n      context.lineTo(s * r, -c * r);\n      context.lineTo(c * x - s * y, s * x + c * y);\n    }\n    context.closePath();\n  }\n};\n", "import {sqrt} from \"../math.js\";\n\nconst sqrt3 = sqrt(3);\n\nexport default {\n  draw(context, size) {\n    const y = -sqrt(size / (sqrt3 * 3));\n    context.moveTo(0, y * 2);\n    context.lineTo(-sqrt3 * y, -y);\n    context.lineTo(sqrt3 * y, -y);\n    context.closePath();\n  }\n};\n", "import {sqrt} from \"../math.js\";\n\nconst sqrt3 = sqrt(3);\n\nexport default {\n  draw(context, size) {\n    const s = sqrt(size) * 0.6824;\n    const t = s  / 2;\n    const u = (s * sqrt3) / 2; // cos(Math.PI / 6)\n    context.moveTo(0, -s);\n    context.lineTo(u, t);\n    context.lineTo(-u, t);\n    context.closePath();\n  }\n};\n", "import {sqrt} from \"../math.js\";\n\nconst c = -0.5;\nconst s = sqrt(3) / 2;\nconst k = 1 / sqrt(12);\nconst a = (k / 2 + 1) * 3;\n\nexport default {\n  draw(context, size) {\n    const r = sqrt(size / a);\n    const x0 = r / 2, y0 = r * k;\n    const x1 = x0, y1 = r * k + r;\n    const x2 = -x1, y2 = y1;\n    context.moveTo(x0, y0);\n    context.lineTo(x1, y1);\n    context.lineTo(x2, y2);\n    context.lineTo(c * x0 - s * y0, s * x0 + c * y0);\n    context.lineTo(c * x1 - s * y1, s * x1 + c * y1);\n    context.lineTo(c * x2 - s * y2, s * x2 + c * y2);\n    context.lineTo(c * x0 + s * y0, c * y0 - s * x0);\n    context.lineTo(c * x1 + s * y1, c * y1 - s * x1);\n    context.lineTo(c * x2 + s * y2, c * y2 - s * x2);\n    context.closePath();\n  }\n};\n", "import {min, sqrt} from \"../math.js\";\n\nexport default {\n  draw(context, size) {\n    const r = sqrt(size - min(size / 6, 1.7)) * 0.6189;\n    context.moveTo(-r, -r);\n    context.lineTo(r, r);\n    context.moveTo(-r, r);\n    context.lineTo(r, -r);\n  }\n};\n", "import constant from \"./constant.js\";\nimport {withPath} from \"./path.js\";\nimport asterisk from \"./symbol/asterisk.js\";\nimport circle from \"./symbol/circle.js\";\nimport cross from \"./symbol/cross.js\";\nimport diamond from \"./symbol/diamond.js\";\nimport diamond2 from \"./symbol/diamond2.js\";\nimport plus from \"./symbol/plus.js\";\nimport square from \"./symbol/square.js\";\nimport square2 from \"./symbol/square2.js\";\nimport star from \"./symbol/star.js\";\nimport triangle from \"./symbol/triangle.js\";\nimport triangle2 from \"./symbol/triangle2.js\";\nimport wye from \"./symbol/wye.js\";\nimport times from \"./symbol/times.js\";\n\n// These symbols are designed to be filled.\nexport const symbolsFill = [\n  circle,\n  cross,\n  diamond,\n  square,\n  star,\n  triangle,\n  wye\n];\n\n// These symbols are designed to be stroked (with a width of 1.5px and round caps).\nexport const symbolsStroke = [\n  circle,\n  plus,\n  times,\n  triangle2,\n  asterisk,\n  square2,\n  diamond2\n];\n\nexport default function Symbol(type, size) {\n  let context = null,\n      path = withPath(symbol);\n\n  type = typeof type === \"function\" ? type : constant(type || circle);\n  size = typeof size === \"function\" ? size : constant(size === undefined ? 64 : +size);\n\n  function symbol() {\n    let buffer;\n    if (!context) context = buffer = path();\n    type.apply(this, arguments).draw(context, +size.apply(this, arguments));\n    if (buffer) return context = null, buffer + \"\" || null;\n  }\n\n  symbol.type = function(_) {\n    return arguments.length ? (type = typeof _ === \"function\" ? _ : constant(_), symbol) : type;\n  };\n\n  symbol.size = function(_) {\n    return arguments.length ? (size = typeof _ === \"function\" ? _ : constant(+_), symbol) : size;\n  };\n\n  symbol.context = function(_) {\n    return arguments.length ? (context = _ == null ? null : _, symbol) : context;\n  };\n\n  return symbol;\n}\n", "export function Transform(k, x, y) {\n  this.k = k;\n  this.x = x;\n  this.y = y;\n}\n\nTransform.prototype = {\n  constructor: Transform,\n  scale: function(k) {\n    return k === 1 ? this : new Transform(this.k * k, this.x, this.y);\n  },\n  translate: function(x, y) {\n    return x === 0 & y === 0 ? this : new Transform(this.k, this.x + this.k * x, this.y + this.k * y);\n  },\n  apply: function(point) {\n    return [point[0] * this.k + this.x, point[1] * this.k + this.y];\n  },\n  applyX: function(x) {\n    return x * this.k + this.x;\n  },\n  applyY: function(y) {\n    return y * this.k + this.y;\n  },\n  invert: function(location) {\n    return [(location[0] - this.x) / this.k, (location[1] - this.y) / this.k];\n  },\n  invertX: function(x) {\n    return (x - this.x) / this.k;\n  },\n  invertY: function(y) {\n    return (y - this.y) / this.k;\n  },\n  rescaleX: function(x) {\n    return x.copy().domain(x.range().map(this.invertX, this).map(x.invert, x));\n  },\n  rescaleY: function(y) {\n    return y.copy().domain(y.range().map(this.invertY, this).map(y.invert, y));\n  },\n  toString: function() {\n    return \"translate(\" + this.x + \",\" + this.y + \") scale(\" + this.k + \")\";\n  }\n};\n\nexport var identity = new Transform(1, 0, 0);\n\ntransform.prototype = Transform.prototype;\n\nexport default function transform(node) {\n  while (!node.__zoom) if (!(node = node.parentNode)) return identity;\n  return node.__zoom;\n}\n", "import {ascending, descending} from \"d3\";\n\nexport function defined(x) {\n  return x != null && !Number.isNaN(x);\n}\n\nexport function ascendingDefined(a, b) {\n  return +defined(b) - +defined(a) || ascending(a, b);\n}\n\nexport function descendingDefined(a, b) {\n  return +defined(b) - +defined(a) || descending(a, b);\n}\n\nexport function nonempty(x) {\n  return x != null && `${x}` !== \"\";\n}\n\nexport function finite(x) {\n  return isFinite(x) ? x : NaN;\n}\n\nexport function positive(x) {\n  return x > 0 && isFinite(x) ? x : NaN;\n}\n\nexport function negative(x) {\n  return x < 0 && isFinite(x) ? x : NaN;\n}\n", "export default function format(date, fallback) {\n  if (!(date instanceof Date)) date = new Date(+date);\n  if (isNaN(date)) return typeof fallback === \"function\" ? fallback(date) : fallback;\n  const hours = date.getUTCHours();\n  const minutes = date.getUTCMinutes();\n  const seconds = date.getUTCSeconds();\n  const milliseconds = date.getUTCMilliseconds();\n  return `${formatYear(date.getUTCFullYear(), 4)}-${pad(date.getUTCMonth() + 1, 2)}-${pad(date.getUTCDate(), 2)}${\n    hours || minutes || seconds || milliseconds ? `T${pad(hours, 2)}:${pad(minutes, 2)}${\n      seconds || milliseconds ? `:${pad(seconds, 2)}${\n        milliseconds ? `.${pad(milliseconds, 3)}` : ``\n      }` : ``\n    }Z` : ``\n  }`;\n}\n\nfunction formatYear(year) {\n  return year < 0 ? `-${pad(-year, 6)}`\n    : year > 9999 ? `+${pad(year, 6)}`\n    : pad(year, 4);\n}\n\nfunction pad(value, width) {\n  return `${value}`.padStart(width, \"0\");\n}\n", "const re = /^(?:[-+]\\d{2})?\\d{4}(?:-\\d{2}(?:-\\d{2})?)?(?:T\\d{2}:\\d{2}(?::\\d{2}(?:\\.\\d{3})?)?(?:Z|[-+]\\d{2}:?\\d{2})?)?$/;\n\nexport default function parse(string, fallback) {\n  if (!re.test(string += \"\")) return typeof fallback === \"function\" ? fallback(string) : fallback;\n  return new Date(string);\n}\n", "import {bisector, extent, median, pairs, timeFormat, utcFormat} from \"d3\";\nimport {utcSecond, utcMinute, utcHour, unixDay, utcWeek, utcMonth, utcYear} from \"d3\";\nimport {utcMonday, utcTuesday, utcWednesday, utcThursday, utcFriday, utcSaturday, utcSunday} from \"d3\";\nimport {timeSecond, timeMinute, timeHour, timeDay, timeWeek, timeMonth, timeYear} from \"d3\";\nimport {timeMonday, timeTuesday, timeWednesday, timeThursday, timeFriday, timeSaturday, timeSunday} from \"d3\";\nimport {orderof} from \"./options.js\";\n\nconst durationSecond = 1000;\nconst durationMinute = durationSecond * 60;\nconst durationHour = durationMinute * 60;\nconst durationDay = durationHour * 24;\nconst durationWeek = durationDay * 7;\nconst durationMonth = durationDay * 30;\nconst durationYear = durationDay * 365;\n\n// See https://github.com/d3/d3-time/blob/9e8dc940f38f78d7588aad68a54a25b1f0c2d97b/src/ticks.js#L14-L33\nconst formats = [\n  [\"millisecond\", 0.5 * durationSecond],\n  [\"second\", durationSecond],\n  [\"second\", 30 * durationSecond],\n  [\"minute\", durationMinute],\n  [\"minute\", 30 * durationMinute],\n  [\"hour\", durationHour],\n  [\"hour\", 12 * durationHour],\n  [\"day\", durationDay],\n  [\"day\", 2 * durationDay],\n  [\"week\", durationWeek],\n  [\"month\", durationMonth],\n  [\"month\", 3 * durationMonth],\n  [\"year\", durationYear]\n];\n\nconst timeIntervals = new Map([\n  [\"second\", timeSecond],\n  [\"minute\", timeMinute],\n  [\"hour\", timeHour],\n  [\"day\", timeDay], // TODO local time equivalent of unixDay?\n  [\"week\", timeWeek],\n  [\"month\", timeMonth],\n  [\"year\", timeYear],\n  [\"monday\", timeMonday],\n  [\"tuesday\", timeTuesday],\n  [\"wednesday\", timeWednesday],\n  [\"thursday\", timeThursday],\n  [\"friday\", timeFriday],\n  [\"saturday\", timeSaturday],\n  [\"sunday\", timeSunday]\n]);\n\nconst utcIntervals = new Map([\n  [\"second\", utcSecond],\n  [\"minute\", utcMinute],\n  [\"hour\", utcHour],\n  [\"day\", unixDay],\n  [\"week\", utcWeek],\n  [\"month\", utcMonth],\n  [\"year\", utcYear],\n  [\"monday\", utcMonday],\n  [\"tuesday\", utcTuesday],\n  [\"wednesday\", utcWednesday],\n  [\"thursday\", utcThursday],\n  [\"friday\", utcFriday],\n  [\"saturday\", utcSaturday],\n  [\"sunday\", utcSunday]\n]);\n\nfunction parseInterval(input, intervals) {\n  let name = `${input}`.toLowerCase();\n  if (name.endsWith(\"s\")) name = name.slice(0, -1); // drop plural\n  let period = 1;\n  const match = /^(?:(\\d+)\\s+)/.exec(name);\n  if (match) {\n    name = name.slice(match[0].length);\n    period = +match[1];\n  }\n  switch (name) {\n    case \"quarter\":\n      name = \"month\";\n      period *= 3;\n      break;\n    case \"half\":\n      name = \"month\";\n      period *= 6;\n      break;\n  }\n  let interval = intervals.get(name);\n  if (!interval) throw new Error(`unknown interval: ${input}`);\n  if (!(period > 1)) return interval;\n  if (!interval.every) throw new Error(`non-periodic interval: ${name}`);\n  return interval.every(period);\n}\n\nexport function maybeTimeInterval(interval) {\n  return parseInterval(interval, timeIntervals);\n}\n\nexport function maybeUtcInterval(interval) {\n  return parseInterval(interval, utcIntervals);\n}\n\nexport function isUtcYear(i) {\n  if (!i) return false;\n  const date = i.floor(new Date(Date.UTC(2000, 11, 31)));\n  return utcYear(date) >= date; // coercing equality\n}\n\nexport function isTimeYear(i) {\n  if (!i) return false;\n  const date = i.floor(new Date(2000, 11, 31));\n  return timeYear(date) >= date; // coercing equality\n}\n\nexport function formatTimeTicks(scale, data, ticks, anchor) {\n  const format = scale.type === \"time\" ? timeFormat : utcFormat;\n  const template =\n    anchor === \"left\" || anchor === \"right\"\n      ? (f1, f2) => `\\n${f1}\\n${f2}` // extra newline to keep f1 centered\n      : anchor === \"top\"\n      ? (f1, f2) => `${f2}\\n${f1}`\n      : (f1, f2) => `${f1}\\n${f2}`;\n  switch (getTimeTicksInterval(scale, data, ticks)) {\n    case \"millisecond\":\n      return formatConditional(format(\".%L\"), format(\":%M:%S\"), template);\n    case \"second\":\n      return formatConditional(format(\":%S\"), format(\"%-I:%M\"), template);\n    case \"minute\":\n      return formatConditional(format(\"%-I:%M\"), format(\"%p\"), template);\n    case \"hour\":\n      return formatConditional(format(\"%-I %p\"), format(\"%b %-d\"), template);\n    case \"day\":\n      return formatConditional(format(\"%-d\"), format(\"%b\"), template);\n    case \"week\":\n      return formatConditional(format(\"%-d\"), format(\"%b\"), template);\n    case \"month\":\n      return formatConditional(format(\"%b\"), format(\"%Y\"), template);\n    case \"year\":\n      return format(\"%Y\");\n  }\n  throw new Error(\"unable to format time ticks\");\n}\n\n// Compute the median difference between adjacent ticks, ignoring repeated\n// ticks; this implies an effective time interval, assuming that ticks are\n// regularly spaced; choose the largest format less than this interval so that\n// the ticks show the field that is changing. If the ticks are not available,\n// fallback to an approximation based on the desired number of ticks.\nfunction getTimeTicksInterval(scale, data, ticks) {\n  const medianStep = median(pairs(data, (a, b) => Math.abs(b - a) || NaN));\n  if (medianStep > 0) return formats[bisector(([, step]) => step).right(formats, medianStep, 1, formats.length) - 1][0];\n  const [start, stop] = extent(scale.domain());\n  const count = typeof ticks === \"number\" ? ticks : 10;\n  const step = Math.abs(stop - start) / count;\n  return formats[bisector(([, step]) => Math.log(step)).center(formats, Math.log(step))][0];\n}\n\nfunction formatConditional(format1, format2, template) {\n  return (x, i, X) => {\n    const f1 = format1(x, i); // always shown\n    const f2 = format2(x, i); // only shown if different\n    const j = i - orderof(X); // detect reversed domains\n    return i !== j && X[j] !== undefined && f2 === format2(X[j], j) ? f1 : template(f1, f2);\n  };\n}\n", "import {color, descending, quantile, range as rangei} from \"d3\";\nimport {parse as isoParse} from \"isoformat\";\nimport {defined} from \"./defined.js\";\nimport {maybeTimeInterval, maybeUtcInterval} from \"./time.js\";\n\n// https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/TypedArray\nexport const TypedArray = Object.getPrototypeOf(Uint8Array);\nconst objectToString = Object.prototype.toString;\n\nexport function valueof(data, value, type) {\n  const valueType = typeof value;\n  return valueType === \"string\"\n    ? maybeTypedMap(data, field(value), type)\n    : valueType === \"function\"\n    ? maybeTypedMap(data, value, type)\n    : valueType === \"number\" || value instanceof Date || valueType === \"boolean\"\n    ? map(data, constant(value), type)\n    : typeof value?.transform === \"function\"\n    ? maybeTypedArrayify(value.transform(data), type)\n    : maybeTypedArrayify(value, type);\n}\n\nfunction maybeTypedMap(data, f, type) {\n  return map(data, type?.prototype instanceof TypedArray ? floater(f) : f, type);\n}\n\nfunction maybeTypedArrayify(data, type) {\n  return type === undefined\n    ? arrayify(data) // preserve undefined type\n    : data instanceof type\n    ? data\n    : type.prototype instanceof TypedArray && !(data instanceof TypedArray)\n    ? type.from(data, coerceNumber)\n    : type.from(data);\n}\n\nfunction floater(f) {\n  return (d, i) => coerceNumber(f(d, i));\n}\n\nexport const singleton = [null]; // for data-less decoration marks, e.g. frame\nexport const field = (name) => (d) => d[name];\nexport const indexOf = {transform: range};\nexport const identity = {transform: (d) => d};\nexport const zero = () => 0;\nexport const one = () => 1;\nexport const yes = () => true;\nexport const string = (x) => (x == null ? x : `${x}`);\nexport const number = (x) => (x == null ? x : +x);\nexport const boolean = (x) => (x == null ? x : !!x);\nexport const first = (x) => (x ? x[0] : undefined);\nexport const second = (x) => (x ? x[1] : undefined);\nexport const third = (x) => (x ? x[2] : undefined);\nexport const constant = (x) => () => x;\n\n// Converts a string like \u201Cp25\u201D into a function that takes an index I and an\n// accessor function f, returning the corresponding percentile value.\nexport function percentile(reduce) {\n  const p = +`${reduce}`.slice(1) / 100;\n  return (I, f) => quantile(I, p, f);\n}\n\n// If the values are specified as a typed array, no coercion is required.\nexport function coerceNumbers(values) {\n  return values instanceof TypedArray ? values : map(values, coerceNumber, Float64Array);\n}\n\n// Unlike Mark\u2019s number, here we want to convert null and undefined to NaN since\n// the result will be stored in a Float64Array and we don\u2019t want null to be\n// coerced to zero. We use Number instead of unary + to allow BigInt coercion.\nfunction coerceNumber(x) {\n  return x == null ? NaN : Number(x);\n}\n\nexport function coerceDates(values) {\n  return map(values, coerceDate);\n}\n\n// When coercing strings to dates, we only want to allow the ISO 8601 format\n// since the built-in string parsing of the Date constructor varies across\n// browsers. (In the future, this could be made more liberal if desired, though\n// it is still generally preferable to do date parsing yourself explicitly,\n// rather than rely on Plot.) Any non-string values are coerced to number first\n// and treated as milliseconds since UNIX epoch.\nexport function coerceDate(x) {\n  return x instanceof Date && !isNaN(x)\n    ? x\n    : typeof x === \"string\"\n    ? isoParse(x)\n    : x == null || isNaN((x = +x))\n    ? undefined\n    : new Date(x);\n}\n\n// Some channels may allow a string constant to be specified; to differentiate\n// string constants (e.g., \"red\") from named fields (e.g., \"date\"), this\n// function tests whether the given value is a CSS color string and returns a\n// tuple [channel, constant] where one of the two is undefined, and the other is\n// the given value. If you wish to reference a named field that is also a valid\n// CSS color, use an accessor (d => d.red) instead.\nexport function maybeColorChannel(value, defaultValue) {\n  if (value === undefined) value = defaultValue;\n  return value === null ? [undefined, \"none\"] : isColor(value) ? [undefined, value] : [value, undefined];\n}\n\n// Similar to maybeColorChannel, this tests whether the given value is a number\n// indicating a constant, and otherwise assumes that it\u2019s a channel value.\nexport function maybeNumberChannel(value, defaultValue) {\n  if (value === undefined) value = defaultValue;\n  return value === null || typeof value === \"number\" ? [undefined, value] : [value, undefined];\n}\n\n// Validates the specified optional string against the allowed list of keywords.\nexport function maybeKeyword(input, name, allowed) {\n  if (input != null) return keyword(input, name, allowed);\n}\n\n// Validates the specified required string against the allowed list of keywords.\nexport function keyword(input, name, allowed) {\n  const i = `${input}`.toLowerCase();\n  if (!allowed.includes(i)) throw new Error(`invalid ${name}: ${input}`);\n  return i;\n}\n\n// Promotes the specified data to an array as needed.\nexport function arrayify(data) {\n  return data == null || data instanceof Array || data instanceof TypedArray ? data : Array.from(data);\n}\n\n// An optimization of type.from(values, f): if the given values are already an\n// instanceof the desired array type, the faster values.map method is used.\nexport function map(values, f, type = Array) {\n  return values == null ? values : values instanceof type ? values.map(f) : type.from(values, f);\n}\n\n// An optimization of type.from(values): if the given values are already an\n// instanceof the desired array type, the faster values.slice method is used.\nexport function slice(values, type = Array) {\n  return values instanceof type ? values.slice() : type.from(values);\n}\n\n// Returns true if any of x, x1, or x2 is not (strictly) undefined.\nexport function hasX({x, x1, x2}) {\n  return x !== undefined || x1 !== undefined || x2 !== undefined;\n}\n\n// Returns true if any of y, y1, or y2 is not (strictly) undefined.\nexport function hasY({y, y1, y2}) {\n  return y !== undefined || y1 !== undefined || y2 !== undefined;\n}\n\n// Returns true if has x or y, or if interval is not (strictly) undefined.\nexport function hasXY(options) {\n  return hasX(options) || hasY(options) || options.interval !== undefined;\n}\n\n// Disambiguates an options object (e.g., {y: \"x2\"}) from a primitive value.\nexport function isObject(option) {\n  return option?.toString === objectToString;\n}\n\n// Disambiguates a scale options object (e.g., {color: {type: \"linear\"}}) from\n// some other option (e.g., {color: \"red\"}). When creating standalone legends,\n// this is used to test whether a scale is defined; this should be consistent\n// with inferScaleType when there are no channels associated with the scale, and\n// if this returns true, then normalizeScale must return non-null.\nexport function isScaleOptions(option) {\n  return isObject(option) && (option.type !== undefined || option.domain !== undefined);\n}\n\n// Disambiguates an options object (e.g., {y: \"x2\"}) from a channel value\n// definition expressed as a channel transform (e.g., {transform: \u2026}).\nexport function isOptions(option) {\n  return isObject(option) && typeof option.transform !== \"function\";\n}\n\n// Disambiguates a sort transform (e.g., {sort: \"date\"}) from a channel domain\n// sort definition (e.g., {sort: {y: \"x\"}}).\nexport function isDomainSort(sort) {\n  return isOptions(sort) && sort.value === undefined && sort.channel === undefined;\n}\n\n// For marks specified either as [0, x] or [x1, x2], such as areas and bars.\nexport function maybeZero(x, x1, x2, x3 = identity) {\n  if (x1 === undefined && x2 === undefined) {\n    // {x} or {}\n    (x1 = 0), (x2 = x === undefined ? x3 : x);\n  } else if (x1 === undefined) {\n    // {x, x2} or {x2}\n    x1 = x === undefined ? 0 : x;\n  } else if (x2 === undefined) {\n    // {x, x1} or {x1}\n    x2 = x === undefined ? 0 : x;\n  }\n  return [x1, x2];\n}\n\n// For marks that have x and y channels (e.g., cell, dot, line, text).\nexport function maybeTuple(x, y) {\n  return x === undefined && y === undefined ? [first, second] : [x, y];\n}\n\n// A helper for extracting the z channel, if it is variable. Used by transforms\n// that require series, such as moving average and normalize.\nexport function maybeZ({z, fill, stroke} = {}) {\n  if (z === undefined) [z] = maybeColorChannel(fill);\n  if (z === undefined) [z] = maybeColorChannel(stroke);\n  return z;\n}\n\n// Returns a Uint32Array with elements [0, 1, 2, \u2026 data.length - 1].\nexport function range(data) {\n  const n = data.length;\n  const r = new Uint32Array(n);\n  for (let i = 0; i < n; ++i) r[i] = i;\n  return r;\n}\n\n// Returns a filtered range of data given the test function.\nexport function where(data, test) {\n  return range(data).filter((i) => test(data[i], i, data));\n}\n\n// Returns an array [values[index[0]], values[index[1]], \u2026].\nexport function take(values, index) {\n  return map(index, (i) => values[i]);\n}\n\n// If f does not take exactly one argument, wraps it in a function that uses take.\nexport function taker(f) {\n  return f.length === 1 ? (index, values) => f(take(values, index)) : f;\n}\n\n// Uses subarray if available, and otherwise slice.\nexport function subarray(I, i, j) {\n  return I.subarray ? I.subarray(i, j) : I.slice(i, j);\n}\n\n// Based on InternMap (d3.group).\nexport function keyof(value) {\n  return value !== null && typeof value === \"object\" ? value.valueOf() : value;\n}\n\nexport function maybeInput(key, options) {\n  if (options[key] !== undefined) return options[key];\n  switch (key) {\n    case \"x1\":\n    case \"x2\":\n      key = \"x\";\n      break;\n    case \"y1\":\n    case \"y2\":\n      key = \"y\";\n      break;\n  }\n  return options[key];\n}\n\nexport function column(source) {\n  // Defines a column whose values are lazily populated by calling the returned\n  // setter. If the given source is labeled, the label is propagated to the\n  // returned column definition.\n  let value;\n  return [\n    {\n      transform: () => value,\n      label: labelof(source)\n    },\n    (v) => (value = v)\n  ];\n}\n\n// Like column, but allows the source to be null.\nexport function maybeColumn(source) {\n  return source == null ? [source] : column(source);\n}\n\nexport function labelof(value, defaultValue) {\n  return typeof value === \"string\" ? value : value && value.label !== undefined ? value.label : defaultValue;\n}\n\n// Assuming that both x1 and x2 and lazy columns (per above), this derives a new\n// a column that\u2019s the average of the two, and which inherits the column label\n// (if any). Both input columns are assumed to be quantitative. If either column\n// is temporal, the returned column is also temporal.\nexport function mid(x1, x2) {\n  return {\n    transform(data) {\n      const X1 = x1.transform(data);\n      const X2 = x2.transform(data);\n      return isTemporal(X1) || isTemporal(X2)\n        ? map(X1, (_, i) => new Date((+X1[i] + +X2[i]) / 2))\n        : map(X1, (_, i) => (+X1[i] + +X2[i]) / 2, Float64Array);\n    },\n    label: x1.label\n  };\n}\n\n// If the scale options declare an interval, applies it to the values V.\nexport function maybeApplyInterval(V, scale) {\n  const t = maybeIntervalTransform(scale?.interval, scale?.type);\n  return t ? map(V, t) : V;\n}\n\n// Returns the equivalent scale transform for the specified interval option.\nexport function maybeIntervalTransform(interval, type) {\n  const i = maybeInterval(interval, type);\n  return i && ((v) => (defined(v) ? i.floor(v) : v));\n}\n\n// If interval is not nullish, converts interval shorthand such as a number (for\n// multiples) or a time interval name (such as \u201Cday\u201D) to a {floor, offset,\n// range} object similar to a D3 time interval.\nexport function maybeInterval(interval, type) {\n  if (interval == null) return;\n  if (typeof interval === \"number\") {\n    if (0 < interval && interval < 1 && Number.isInteger(1 / interval)) interval = -1 / interval;\n    const n = Math.abs(interval);\n    return interval < 0\n      ? {\n          floor: (d) => Math.floor(d * n) / n,\n          offset: (d) => (d * n + 1) / n, // note: no optional step for simplicity\n          range: (lo, hi) => rangei(Math.ceil(lo * n), hi * n).map((x) => x / n)\n        }\n      : {\n          floor: (d) => Math.floor(d / n) * n,\n          offset: (d) => d + n, // note: no optional step for simplicity\n          range: (lo, hi) => rangei(Math.ceil(lo / n), hi / n).map((x) => x * n)\n        };\n  }\n  if (typeof interval === \"string\") return (type === \"time\" ? maybeTimeInterval : maybeUtcInterval)(interval);\n  if (typeof interval.floor !== \"function\") throw new Error(\"invalid interval; missing floor method\");\n  if (typeof interval.offset !== \"function\") throw new Error(\"invalid interval; missing offset method\");\n  return interval;\n}\n\n// Like maybeInterval, but requires a range method too.\nexport function maybeRangeInterval(interval, type) {\n  interval = maybeInterval(interval, type);\n  if (interval && typeof interval.range !== \"function\") throw new Error(\"invalid interval: missing range method\");\n  return interval;\n}\n\n// Like maybeRangeInterval, but requires a ceil method too.\nexport function maybeNiceInterval(interval, type) {\n  interval = maybeRangeInterval(interval, type);\n  if (interval && typeof interval.ceil !== \"function\") throw new Error(\"invalid interval: missing ceil method\");\n  return interval;\n}\n\n// This distinguishes between per-dimension options and a standalone value.\nexport function maybeValue(value) {\n  return value === undefined || isOptions(value) ? value : {value};\n}\n\n// Coerces the given channel values (if any) to numbers. This is useful when\n// values will be interpolated into other code, such as an SVG transform, and\n// where we don\u2019t wish to allow unexpected behavior for weird input.\nexport function numberChannel(source) {\n  return source == null\n    ? null\n    : {\n        transform: (data) => valueof(data, source, Float64Array),\n        label: labelof(source)\n      };\n}\n\nexport function isTuples(data) {\n  if (!isIterable(data)) return false;\n  for (const d of data) {\n    if (d == null) continue;\n    return typeof d === \"object\" && \"0\" in d && \"1\" in d;\n  }\n}\n\nexport function isIterable(value) {\n  return value && typeof value[Symbol.iterator] === \"function\";\n}\n\nexport function isTextual(values) {\n  for (const value of values) {\n    if (value == null) continue;\n    return typeof value !== \"object\" || value instanceof Date;\n  }\n}\n\nexport function isOrdinal(values) {\n  for (const value of values) {\n    if (value == null) continue;\n    const type = typeof value;\n    return type === \"string\" || type === \"boolean\";\n  }\n}\n\nexport function isTemporal(values) {\n  for (const value of values) {\n    if (value == null) continue;\n    return value instanceof Date;\n  }\n}\n\n// Are these strings that might represent dates? This is stricter than ISO 8601\n// because we want to ignore false positives on numbers; for example, the string\n// \"1192\" is more likely to represent a number than a date even though it is\n// valid ISO 8601 representing 1192-01-01.\nexport function isTemporalString(values) {\n  for (const value of values) {\n    if (value == null) continue;\n    return typeof value === \"string\" && isNaN(value) && isoParse(value);\n  }\n}\n\n// Are these strings that might represent numbers? This is stricter than\n// coercion because we want to ignore false positives on e.g. empty strings.\nexport function isNumericString(values) {\n  for (const value of values) {\n    if (value == null) continue;\n    if (typeof value !== \"string\") return false;\n    if (!value.trim()) continue;\n    return !isNaN(value);\n  }\n}\n\nexport function isNumeric(values) {\n  for (const value of values) {\n    if (value == null) continue;\n    return typeof value === \"number\";\n  }\n}\n\n// Returns true if every non-null value in the specified iterable of values\n// passes the specified predicate, and there is at least one non-null value;\n// returns false if at least one non-null value does not pass the specified\n// predicate; otherwise returns undefined (as if all values are null).\nexport function isEvery(values, is) {\n  let every;\n  for (const value of values) {\n    if (value == null) continue;\n    if (!is(value)) return false;\n    every = true;\n  }\n  return every;\n}\n\n// Mostly relies on d3-color, with a few extra color keywords. Currently this\n// strictly requires that the value be a string; we might want to apply string\n// coercion here, though note that d3-color instances would need to support\n// valueOf to work correctly with InternMap.\n// https://www.w3.org/TR/SVG11/painting.html#SpecifyingPaint\nexport function isColor(value) {\n  if (typeof value !== \"string\") return false;\n  value = value.toLowerCase().trim();\n  return (\n    value === \"none\" ||\n    value === \"currentcolor\" ||\n    (value.startsWith(\"url(\") && value.endsWith(\")\")) || // <funciri>, e.g. pattern or gradient\n    (value.startsWith(\"var(\") && value.endsWith(\")\")) || // CSS variable\n    color(value) !== null\n  );\n}\n\nexport function isOpacity(value) {\n  return typeof value === \"number\" && ((0 <= value && value <= 1) || isNaN(value));\n}\n\nexport function isNoneish(value) {\n  return value == null || isNone(value);\n}\n\nexport function isNone(value) {\n  return /^\\s*none\\s*$/i.test(value);\n}\n\nexport function isRound(value) {\n  return /^\\s*round\\s*$/i.test(value);\n}\n\nexport function maybeAnchor(value, name) {\n  return maybeKeyword(value, name, [\n    \"middle\",\n    \"top-left\",\n    \"top\",\n    \"top-right\",\n    \"right\",\n    \"bottom-right\",\n    \"bottom\",\n    \"bottom-left\",\n    \"left\"\n  ]);\n}\n\nexport function maybeFrameAnchor(value = \"middle\") {\n  return maybeAnchor(value, \"frameAnchor\");\n}\n\n// Like a sort comparator, returns a positive value if the given array of values\n// is in ascending order, a negative value if the values are in descending\n// order. Assumes monotonicity; only tests the first and last values.\nexport function orderof(values) {\n  if (values == null) return;\n  const first = values[0];\n  const last = values[values.length - 1];\n  return descending(first, last);\n}\n\n// Unlike {...defaults, ...options}, this ensures that any undefined (but\n// present) properties in options inherit the given default value.\nexport function inherit(options = {}, ...rest) {\n  let o = options;\n  for (const defaults of rest) {\n    for (const key in defaults) {\n      if (o[key] === undefined) {\n        const value = defaults[key];\n        if (o === options) o = {...o, [key]: value};\n        else o[key] = value;\n      }\n    }\n  }\n  return o;\n}\n\n// Given an iterable of named things (objects with a name property), returns a\n// corresponding object with properties associated with the given name.\nexport function named(things) {\n  console.warn(\"named iterables are deprecated; please use an object instead\");\n  const names = new Set();\n  return Object.fromEntries(\n    Array.from(things, (thing) => {\n      const {name} = thing;\n      if (name == null) throw new Error(\"missing name\");\n      const key = `${name}`;\n      if (key === \"__proto__\") throw new Error(`illegal name: ${key}`);\n      if (names.has(key)) throw new Error(`duplicate name: ${key}`);\n      names.add(key);\n      return [name, thing];\n    })\n  );\n}\n\nexport function maybeNamed(things) {\n  return isIterable(things) ? named(things) : things;\n}\n", "// Positional scales have associated axes, and for ordinal data, a point or band\n// scale is used instead of an ordinal scale.\nexport const position = Symbol(\"position\");\n\n// Color scales default to the turbo interpolator for quantitative data, and to\n// the Tableau10 scheme for ordinal data. Color scales may also have an\n// associated legend.\nexport const color = Symbol(\"color\");\n\n// Radius scales default to the sqrt type, have a default range of [0, 3], and a\n// default domain from 0 to the median first quartile of associated channels.\nexport const radius = Symbol(\"radius\");\n\n// Length scales default to the linear type, have a default range of [0, 12],\n// and a default domain from 0 to the median median of associated channels.\nexport const length = Symbol(\"length\");\n\n// Opacity scales have a default range of [0, 1], and a default domain from 0 to\n// the maximum value of associated channels.\nexport const opacity = Symbol(\"opacity\");\n\n// Symbol scales have a default range of categorical symbols.\nexport const symbol = Symbol(\"symbol\");\n\n// There isn\u2019t really a projection scale; this represents x and y for geometry.\nexport const projection = Symbol(\"projection\");\n\n// TODO Rather than hard-coding the list of known scale names, collect the names\n// and categories for each plot specification, so that custom marks can register\n// custom scales.\nexport const registry = new Map([\n  [\"x\", position],\n  [\"y\", position],\n  [\"fx\", position],\n  [\"fy\", position],\n  [\"r\", radius],\n  [\"color\", color],\n  [\"opacity\", opacity],\n  [\"symbol\", symbol],\n  [\"length\", length],\n  [\"projection\", projection]\n]);\n", "import {symbolAsterisk, symbolDiamond2, symbolPlus, symbolSquare2, symbolTriangle2, symbolTimes} from \"d3\";\nimport {symbolCircle, symbolCross, symbolDiamond, symbolSquare, symbolStar, symbolTriangle, symbolWye} from \"d3\";\n\nexport const sqrt3 = Math.sqrt(3);\nexport const sqrt4_3 = 2 / sqrt3;\n\nconst symbolHexagon = {\n  draw(context, size) {\n    const rx = Math.sqrt(size / Math.PI),\n      ry = rx * sqrt4_3,\n      hy = ry / 2;\n    context.moveTo(0, ry);\n    context.lineTo(rx, hy);\n    context.lineTo(rx, -hy);\n    context.lineTo(0, -ry);\n    context.lineTo(-rx, -hy);\n    context.lineTo(-rx, hy);\n    context.closePath();\n  }\n};\n\nconst symbols = new Map([\n  [\"asterisk\", symbolAsterisk],\n  [\"circle\", symbolCircle],\n  [\"cross\", symbolCross],\n  [\"diamond\", symbolDiamond],\n  [\"diamond2\", symbolDiamond2],\n  [\"hexagon\", symbolHexagon],\n  [\"plus\", symbolPlus],\n  [\"square\", symbolSquare],\n  [\"square2\", symbolSquare2],\n  [\"star\", symbolStar],\n  [\"times\", symbolTimes],\n  [\"triangle\", symbolTriangle],\n  [\"triangle2\", symbolTriangle2],\n  [\"wye\", symbolWye]\n]);\n\nfunction isSymbolObject(value) {\n  return value && typeof value.draw === \"function\";\n}\n\nexport function isSymbol(value) {\n  if (isSymbolObject(value)) return true;\n  if (typeof value !== \"string\") return false;\n  return symbols.has(value.toLowerCase());\n}\n\nexport function maybeSymbol(symbol) {\n  if (symbol == null || isSymbolObject(symbol)) return symbol;\n  const value = symbols.get(`${symbol}`.toLowerCase());\n  if (value) return value;\n  throw new Error(`invalid symbol: ${symbol}`);\n}\n\nexport function maybeSymbolChannel(symbol) {\n  if (symbol == null || isSymbolObject(symbol)) return [undefined, symbol];\n  if (typeof symbol === \"string\") {\n    const value = symbols.get(`${symbol}`.toLowerCase());\n    if (value) return [undefined, value];\n  }\n  return [symbol, undefined];\n}\n", "import {randomLcg} from \"d3\";\nimport {ascendingDefined, descendingDefined} from \"../defined.js\";\nimport {arrayify, isDomainSort, isOptions, maybeValue, valueof} from \"../options.js\";\n\nexport function basic({filter: f1, sort: s1, reverse: r1, transform: t1, initializer: i1, ...options} = {}, transform) {\n  // If both t1 and t2 are defined, returns a composite transform that first\n  // applies t1 and then applies t2.\n  if (t1 === undefined) {\n    // explicit transform overrides filter, sort, and reverse\n    if (f1 != null) t1 = filterTransform(f1);\n    if (s1 != null && !isDomainSort(s1)) t1 = composeTransform(t1, sortTransform(s1));\n    if (r1) t1 = composeTransform(t1, reverseTransform);\n  }\n  if (transform != null && i1 != null) throw new Error(\"transforms cannot be applied after initializers\");\n  return {\n    ...options,\n    ...((s1 === null || isDomainSort(s1)) && {sort: s1}),\n    transform: composeTransform(t1, transform)\n  };\n}\n\nexport function initializer({filter: f1, sort: s1, reverse: r1, initializer: i1, ...options} = {}, initializer) {\n  // If both i1 and i2 are defined, returns a composite initializer that first\n  // applies i1 and then applies i2.\n  if (i1 === undefined) {\n    // explicit initializer overrides filter, sort, and reverse\n    if (f1 != null) i1 = filterTransform(f1);\n    if (s1 != null && !isDomainSort(s1)) i1 = composeInitializer(i1, sortTransform(s1));\n    if (r1) i1 = composeInitializer(i1, reverseTransform);\n  }\n  return {\n    ...options,\n    ...((s1 === null || isDomainSort(s1)) && {sort: s1}),\n    initializer: composeInitializer(i1, initializer)\n  };\n}\n\nfunction composeTransform(t1, t2) {\n  if (t1 == null) return t2 === null ? undefined : t2;\n  if (t2 == null) return t1 === null ? undefined : t1;\n  return function (data, facets, plotOptions) {\n    ({data, facets} = t1.call(this, data, facets, plotOptions));\n    return t2.call(this, arrayify(data), facets, plotOptions);\n  };\n}\n\nfunction composeInitializer(i1, i2) {\n  if (i1 == null) return i2 === null ? undefined : i2;\n  if (i2 == null) return i1 === null ? undefined : i1;\n  return function (data, facets, channels, ...args) {\n    let c1, d1, f1, c2, d2, f2;\n    ({data: d1 = data, facets: f1 = facets, channels: c1} = i1.call(this, data, facets, channels, ...args));\n    ({data: d2 = d1, facets: f2 = f1, channels: c2} = i2.call(this, d1, f1, {...channels, ...c1}, ...args));\n    return {data: d2, facets: f2, channels: {...c1, ...c2}};\n  };\n}\n\nfunction apply(options, t) {\n  return (options.initializer != null ? initializer : basic)(options, t);\n}\n\nexport function filter(test, options) {\n  return apply(options, filterTransform(test));\n}\n\nfunction filterTransform(value) {\n  return (data, facets) => {\n    const V = valueof(data, value);\n    return {data, facets: facets.map((I) => I.filter((i) => V[i]))};\n  };\n}\n\nexport function reverse({sort, ...options} = {}) {\n  return {\n    ...apply(options, reverseTransform),\n    sort: isDomainSort(sort) ? sort : null\n  };\n}\n\nfunction reverseTransform(data, facets) {\n  return {data, facets: facets.map((I) => I.slice().reverse())};\n}\n\nexport function shuffle({seed, sort, ...options} = {}) {\n  return {\n    ...apply(options, sortValue(seed == null ? Math.random : randomLcg(seed))),\n    sort: isDomainSort(sort) ? sort : null\n  };\n}\n\nexport function sort(order, {sort, ...options} = {}) {\n  return {\n    ...(isOptions(order) && order.channel !== undefined ? initializer : apply)(options, sortTransform(order)),\n    sort: isDomainSort(sort) ? sort : null\n  };\n}\n\nfunction sortTransform(value) {\n  return (typeof value === \"function\" && value.length !== 1 ? sortData : sortValue)(value);\n}\n\nfunction sortData(compare) {\n  return (data, facets) => {\n    const compareData = (i, j) => compare(data[i], data[j]);\n    return {data, facets: facets.map((I) => I.slice().sort(compareData))};\n  };\n}\n\nfunction sortValue(value) {\n  let channel, order;\n  ({channel, value, order} = {...maybeValue(value)});\n  const negate = channel?.startsWith(\"-\");\n  if (negate) channel = channel.slice(1);\n  if (order === undefined) order = negate ? descendingDefined : ascendingDefined;\n  if (typeof order !== \"function\") {\n    switch (`${order}`.toLowerCase()) {\n      case \"ascending\":\n        order = ascendingDefined;\n        break;\n      case \"descending\":\n        order = descendingDefined;\n        break;\n      default:\n        throw new Error(`invalid order: ${order}`);\n    }\n  }\n  return (data, facets, channels) => {\n    let V;\n    if (channel === undefined) {\n      V = valueof(data, value);\n    } else {\n      if (channels === undefined) throw new Error(\"channel sort requires an initializer\");\n      V = channels[channel];\n      if (!V) return {}; // ignore missing channel\n      V = V.value;\n    }\n    const compareValue = (i, j) => order(V[i], V[j]);\n    return {data, facets: facets.map((I) => I.slice().sort(compareValue))};\n  };\n}\n", "import {\n  InternSet,\n  deviation,\n  group as grouper,\n  max,\n  maxIndex,\n  mean,\n  median,\n  min,\n  minIndex,\n  mode,\n  rollup,\n  sort,\n  sum,\n  variance\n} from \"d3\";\nimport {ascendingDefined} from \"../defined.js\";\nimport {\n  column,\n  first,\n  identity,\n  isObject,\n  isTemporal,\n  labelof,\n  maybeApplyInterval,\n  maybeColorChannel,\n  maybeColumn,\n  maybeInput,\n  maybeTuple,\n  percentile,\n  range,\n  second,\n  take,\n  valueof\n} from \"../options.js\";\nimport {basic} from \"./basic.js\";\n\n// Group on {z, fill, stroke}.\nexport function groupZ(outputs, options) {\n  return groupn(null, null, outputs, options);\n}\n\n// Group on {z, fill, stroke}, then on x.\nexport function groupX(outputs = {y: \"count\"}, options = {}) {\n  const {x = identity} = options;\n  if (x == null) throw new Error(\"missing channel: x\");\n  return groupn(x, null, outputs, options);\n}\n\n// Group on {z, fill, stroke}, then on y.\nexport function groupY(outputs = {x: \"count\"}, options = {}) {\n  const {y = identity} = options;\n  if (y == null) throw new Error(\"missing channel: y\");\n  return groupn(null, y, outputs, options);\n}\n\n// Group on {z, fill, stroke}, then on x and y.\nexport function group(outputs = {fill: \"count\"}, options = {}) {\n  let {x, y} = options;\n  [x, y] = maybeTuple(x, y);\n  if (x == null) throw new Error(\"missing channel: x\");\n  if (y == null) throw new Error(\"missing channel: y\");\n  return groupn(x, y, outputs, options);\n}\n\nfunction groupn(\n  x, // optionally group on x\n  y, // optionally group on y\n  {\n    data: reduceData = reduceIdentity,\n    filter,\n    sort,\n    reverse,\n    ...outputs // output channel definitions\n  } = {},\n  inputs = {} // input channels and options\n) {\n  // Compute the outputs.\n  outputs = maybeOutputs(outputs, inputs);\n  reduceData = maybeReduce(reduceData, identity);\n  sort = sort == null ? undefined : maybeOutput(\"sort\", sort, inputs);\n  filter = filter == null ? undefined : maybeEvaluator(\"filter\", filter, inputs);\n\n  // Produce x and y output channels as appropriate.\n  const [GX, setGX] = maybeColumn(x);\n  const [GY, setGY] = maybeColumn(y);\n\n  // Greedily materialize the z, fill, and stroke channels (if channels and not\n  // constants) so that we can reference them for subdividing groups without\n  // computing them more than once.\n  const {\n    z,\n    fill,\n    stroke,\n    x1,\n    x2, // consumed if x is an output\n    y1,\n    y2, // consumed if y is an output\n    ...options\n  } = inputs;\n  const [GZ, setGZ] = maybeColumn(z);\n  const [vfill] = maybeColorChannel(fill);\n  const [vstroke] = maybeColorChannel(stroke);\n  const [GF, setGF] = maybeColumn(vfill);\n  const [GS, setGS] = maybeColumn(vstroke);\n\n  return {\n    ...(\"z\" in inputs && {z: GZ || z}),\n    ...(\"fill\" in inputs && {fill: GF || fill}),\n    ...(\"stroke\" in inputs && {stroke: GS || stroke}),\n    ...basic(options, (data, facets, plotOptions) => {\n      const X = maybeApplyInterval(valueof(data, x), plotOptions?.x);\n      const Y = maybeApplyInterval(valueof(data, y), plotOptions?.y);\n      const Z = valueof(data, z);\n      const F = valueof(data, vfill);\n      const S = valueof(data, vstroke);\n      const G = maybeSubgroup(outputs, {z: Z, fill: F, stroke: S});\n      const groupFacets = [];\n      const groupData = [];\n      const GX = X && setGX([]);\n      const GY = Y && setGY([]);\n      const GZ = Z && setGZ([]);\n      const GF = F && setGF([]);\n      const GS = S && setGS([]);\n      let i = 0;\n      for (const o of outputs) o.initialize(data);\n      if (sort) sort.initialize(data);\n      if (filter) filter.initialize(data);\n      for (const facet of facets) {\n        const groupFacet = [];\n        for (const o of outputs) o.scope(\"facet\", facet);\n        if (sort) sort.scope(\"facet\", facet);\n        if (filter) filter.scope(\"facet\", facet);\n        for (const [f, I] of maybeGroup(facet, G)) {\n          for (const [y, gg] of maybeGroup(I, Y)) {\n            for (const [x, g] of maybeGroup(gg, X)) {\n              if (filter && !filter.reduce(g)) continue;\n              groupFacet.push(i++);\n              groupData.push(reduceData.reduceIndex(g, data));\n              if (X) GX.push(x);\n              if (Y) GY.push(y);\n              if (Z) GZ.push(G === Z ? f : Z[g[0]]);\n              if (F) GF.push(G === F ? f : F[g[0]]);\n              if (S) GS.push(G === S ? f : S[g[0]]);\n              for (const o of outputs) o.reduce(g);\n              if (sort) sort.reduce(g);\n            }\n          }\n        }\n        groupFacets.push(groupFacet);\n      }\n      maybeSort(groupFacets, sort, reverse);\n      return {data: groupData, facets: groupFacets};\n    }),\n    ...(!hasOutput(outputs, \"x\") && (GX ? {x: GX} : {x1, x2})),\n    ...(!hasOutput(outputs, \"y\") && (GY ? {y: GY} : {y1, y2})),\n    ...Object.fromEntries(outputs.map(({name, output}) => [name, output]))\n  };\n}\n\nexport function hasOutput(outputs, ...names) {\n  for (const {name} of outputs) {\n    if (names.includes(name)) {\n      return true;\n    }\n  }\n  return false;\n}\n\nexport function maybeOutputs(outputs, inputs, asOutput = maybeOutput) {\n  const entries = Object.entries(outputs);\n  // Propagate standard mark channels by default.\n  if (inputs.title != null && outputs.title === undefined) entries.push([\"title\", reduceTitle]);\n  if (inputs.href != null && outputs.href === undefined) entries.push([\"href\", reduceFirst]);\n  return entries\n    .filter(([, reduce]) => reduce !== undefined)\n    .map(([name, reduce]) => (reduce === null ? nullOutput(name) : asOutput(name, reduce, inputs)));\n}\n\nexport function maybeOutput(name, reduce, inputs, asEvaluator = maybeEvaluator) {\n  let scale; // optional per-channel scale override\n  if (isObject(reduce) && \"reduce\" in reduce) (scale = reduce.scale), (reduce = reduce.reduce); // N.B. array.reduce\n  const evaluator = asEvaluator(name, reduce, inputs);\n  const [output, setOutput] = column(evaluator.label);\n  let O;\n  return {\n    name,\n    output: scale === undefined ? output : {value: output, scale},\n    initialize(data) {\n      evaluator.initialize(data);\n      O = setOutput([]);\n    },\n    scope(scope, I) {\n      evaluator.scope(scope, I);\n    },\n    reduce(I, extent) {\n      O.push(evaluator.reduce(I, extent));\n    }\n  };\n}\n\nfunction nullOutput(name) {\n  return {name, initialize() {}, scope() {}, reduce() {}};\n}\n\nexport function maybeEvaluator(name, reduce, inputs, asReduce = maybeReduce) {\n  const input = maybeInput(name, inputs);\n  const reducer = asReduce(reduce, input);\n  let V, context;\n  return {\n    label: labelof(reducer === reduceCount ? null : input, reducer.label),\n    initialize(data) {\n      V = input === undefined ? data : valueof(data, input);\n      if (reducer.scope === \"data\") {\n        context = reducer.reduceIndex(range(data), V);\n      }\n    },\n    scope(scope, I) {\n      if (reducer.scope === scope) {\n        context = reducer.reduceIndex(I, V);\n      }\n    },\n    reduce(I, extent) {\n      return reducer.scope == null ? reducer.reduceIndex(I, V, extent) : reducer.reduceIndex(I, V, context, extent);\n    }\n  };\n}\n\nexport function maybeGroup(I, X) {\n  return X\n    ? sort(\n        grouper(I, (i) => X[i]),\n        first\n      )\n    : [[, I]];\n}\n\nexport function maybeReduce(reduce, value, fallback = invalidReduce) {\n  if (reduce == null) return fallback(reduce);\n  if (typeof reduce.reduceIndex === \"function\") return reduce;\n  if (typeof reduce.reduce === \"function\" && isObject(reduce)) return reduceReduce(reduce); // N.B. array.reduce\n  if (typeof reduce === \"function\") return reduceFunction(reduce);\n  if (/^p\\d{2}$/i.test(reduce)) return reduceAccessor(percentile(reduce));\n  switch (`${reduce}`.toLowerCase()) {\n    case \"first\":\n      return reduceFirst;\n    case \"last\":\n      return reduceLast;\n    case \"identity\":\n      return reduceIdentity;\n    case \"count\":\n      return reduceCount;\n    case \"distinct\":\n      return reduceDistinct;\n    case \"sum\":\n      return value == null ? reduceCount : reduceSum;\n    case \"proportion\":\n      return reduceProportion(value, \"data\");\n    case \"proportion-facet\":\n      return reduceProportion(value, \"facet\");\n    case \"deviation\":\n      return reduceAccessor(deviation);\n    case \"min\":\n      return reduceAccessor(min);\n    case \"min-index\":\n      return reduceAccessor(minIndex);\n    case \"max\":\n      return reduceAccessor(max);\n    case \"max-index\":\n      return reduceAccessor(maxIndex);\n    case \"mean\":\n      return reduceMaybeTemporalAccessor(mean);\n    case \"median\":\n      return reduceMaybeTemporalAccessor(median);\n    case \"variance\":\n      return reduceAccessor(variance);\n    case \"mode\":\n      return reduceAccessor(mode);\n  }\n  return fallback(reduce);\n}\n\nfunction invalidReduce(reduce) {\n  throw new Error(`invalid reduce: ${reduce}`);\n}\n\nexport function maybeSubgroup(outputs, inputs) {\n  for (const name in inputs) {\n    const value = inputs[name];\n    if (value !== undefined && !outputs.some((o) => o.name === name)) {\n      return value;\n    }\n  }\n}\n\nexport function maybeSort(facets, sort, reverse) {\n  if (sort) {\n    const S = sort.output.transform();\n    const compare = (i, j) => ascendingDefined(S[i], S[j]);\n    facets.forEach((f) => f.sort(compare));\n  }\n  if (reverse) {\n    facets.forEach((f) => f.reverse());\n  }\n}\n\nfunction reduceReduce(reduce) {\n  console.warn(\"deprecated reduce interface; implement reduceIndex instead.\");\n  return {...reduce, reduceIndex: reduce.reduce.bind(reduce)};\n}\n\nfunction reduceFunction(f) {\n  return {\n    reduceIndex(I, X, extent) {\n      return f(take(X, I), extent);\n    }\n  };\n}\n\nfunction reduceAccessor(f) {\n  return {\n    reduceIndex(I, X) {\n      return f(I, (i) => X[i]);\n    }\n  };\n}\n\nfunction reduceMaybeTemporalAccessor(f) {\n  return {\n    reduceIndex(I, X) {\n      const x = f(I, (i) => X[i]);\n      return isTemporal(X) ? new Date(x) : x;\n    }\n  };\n}\n\nexport const reduceIdentity = {\n  reduceIndex(I, X) {\n    return take(X, I);\n  }\n};\n\nexport const reduceFirst = {\n  reduceIndex(I, X) {\n    return X[I[0]];\n  }\n};\n\nconst reduceTitle = {\n  reduceIndex(I, X) {\n    const n = 5;\n    const groups = sort(\n      rollup(\n        I,\n        (V) => V.length,\n        (i) => X[i]\n      ),\n      second\n    );\n    const top = groups.slice(-n).reverse();\n    if (top.length < groups.length) {\n      const bottom = groups.slice(0, 1 - n);\n      top[n - 1] = [`\u2026 ${bottom.length.toLocaleString(\"en-US\")} more`, sum(bottom, second)];\n    }\n    return top.map(([key, value]) => `${key} (${value.toLocaleString(\"en-US\")})`).join(\"\\n\");\n  }\n};\n\nconst reduceLast = {\n  reduceIndex(I, X) {\n    return X[I[I.length - 1]];\n  }\n};\n\nexport const reduceCount = {\n  label: \"Frequency\",\n  reduceIndex(I) {\n    return I.length;\n  }\n};\n\nconst reduceDistinct = {\n  label: \"Distinct\",\n  reduceIndex(I, X) {\n    const s = new InternSet();\n    for (const i of I) s.add(X[i]);\n    return s.size;\n  }\n};\n\nconst reduceSum = reduceAccessor(sum);\n\nfunction reduceProportion(value, scope) {\n  return value == null\n    ? {scope, label: \"Frequency\", reduceIndex: (I, V, basis = 1) => I.length / basis}\n    : {scope, reduceIndex: (I, V, basis = 1) => sum(I, (i) => V[i]) / basis};\n}\n", "import {InternSet, rollups} from \"d3\";\nimport {ascendingDefined, descendingDefined} from \"./defined.js\";\nimport {first, isColor, isEvery, isIterable, isOpacity, labelof, map, maybeValue, range, valueof} from \"./options.js\";\nimport {registry} from \"./scales/index.js\";\nimport {isSymbol, maybeSymbol} from \"./symbol.js\";\nimport {maybeReduce} from \"./transforms/group.js\";\n\nexport function createChannel(data, {scale, type, value, filter, hint}, name) {\n  if (hint === undefined && typeof value?.transform === \"function\") hint = value.hint;\n  return inferChannelScale(name, {\n    scale,\n    type,\n    value: valueof(data, value),\n    label: labelof(value),\n    filter,\n    hint\n  });\n}\n\nexport function createChannels(channels, data) {\n  return Object.fromEntries(\n    Object.entries(channels).map(([name, channel]) => [name, createChannel(data, channel, name)])\n  );\n}\n\n// TODO Use Float64Array for scales with numeric ranges, e.g. position?\nexport function valueObject(channels, scales) {\n  const values = Object.fromEntries(\n    Object.entries(channels).map(([name, {scale: scaleName, value}]) => {\n      const scale = scaleName == null ? null : scales[scaleName];\n      return [name, scale == null ? value : map(value, scale)];\n    })\n  );\n  values.channels = channels; // expose channel state for advanced usage\n  return values;\n}\n\n// If the channel uses the \"auto\" scale (or equivalently true), infer the scale\n// from the channel name and the provided values. For color and symbol channels,\n// no scale is applied if the values are literal; however for symbols, we must\n// promote symbol names (e.g., \"plus\") to symbol implementations (symbolPlus).\n// Note: mutates channel!\nexport function inferChannelScale(name, channel) {\n  const {scale, value} = channel;\n  if (scale === true || scale === \"auto\") {\n    switch (name) {\n      case \"fill\":\n      case \"stroke\":\n      case \"color\":\n        channel.scale = scale !== true && isEvery(value, isColor) ? null : \"color\";\n        break;\n      case \"fillOpacity\":\n      case \"strokeOpacity\":\n      case \"opacity\":\n        channel.scale = scale !== true && isEvery(value, isOpacity) ? null : \"opacity\";\n        break;\n      case \"symbol\":\n        if (scale !== true && isEvery(value, isSymbol)) {\n          channel.scale = null;\n          channel.value = map(value, maybeSymbol);\n        } else {\n          channel.scale = \"symbol\";\n        }\n        break;\n      default:\n        channel.scale = registry.has(name) ? name : null;\n        break;\n    }\n  } else if (scale === false) {\n    channel.scale = null;\n  } else if (scale != null && !registry.has(scale)) {\n    throw new Error(`unknown scale: ${scale}`);\n  }\n  return channel;\n}\n\n// Note: mutates channel.domain! This is set to a function so that it is lazily\n// computed; i.e., if the scale\u2019s domain is set explicitly, that takes priority\n// over the sort option, and we don\u2019t need to do additional work.\nexport function channelDomain(data, facets, channels, facetChannels, options) {\n  const {order: defaultOrder, reverse: defaultReverse, reduce: defaultReduce = true, limit: defaultLimit} = options;\n  for (const x in options) {\n    if (!registry.has(x)) continue; // ignore unknown scale keys (including generic options)\n    let {value: y, order = defaultOrder, reverse = defaultReverse, reduce = defaultReduce, limit = defaultLimit} = maybeValue(options[x]); // prettier-ignore\n    const negate = y?.startsWith(\"-\");\n    if (negate) y = y.slice(1);\n    order = order === undefined ? negate !== (y === \"width\" || y === \"height\") ? descendingGroup : ascendingGroup : maybeOrder(order); // prettier-ignore\n    if (reduce == null || reduce === false) continue; // disabled reducer\n    const X = x === \"fx\" || x === \"fy\" ? reindexFacetChannel(facets, facetChannels[x]) : findScaleChannel(channels, x);\n    if (!X) throw new Error(`missing channel for scale: ${x}`);\n    const XV = X.value;\n    const [lo = 0, hi = Infinity] = isIterable(limit) ? limit : limit < 0 ? [limit] : [0, limit];\n    if (y == null) {\n      X.domain = () => {\n        let domain = Array.from(new InternSet(XV)); // remove any duplicates\n        if (reverse) domain = domain.reverse();\n        if (lo !== 0 || hi !== Infinity) domain = domain.slice(lo, hi);\n        return domain;\n      };\n    } else {\n      const YV =\n        y === \"data\"\n          ? data\n          : y === \"height\"\n          ? difference(channels, \"y1\", \"y2\")\n          : y === \"width\"\n          ? difference(channels, \"x1\", \"x2\")\n          : values(channels, y, y === \"y\" ? \"y2\" : y === \"x\" ? \"x2\" : undefined);\n      const reducer = maybeReduce(reduce === true ? \"max\" : reduce, YV);\n      X.domain = () => {\n        let domain = rollups(\n          range(XV),\n          (I) => reducer.reduceIndex(I, YV),\n          (i) => XV[i]\n        );\n        if (order) domain.sort(order);\n        if (reverse) domain.reverse();\n        if (lo !== 0 || hi !== Infinity) domain = domain.slice(lo, hi);\n        return domain.map(first);\n      };\n    }\n  }\n}\n\nfunction findScaleChannel(channels, scale) {\n  for (const name in channels) {\n    const channel = channels[name];\n    if (channel.scale === scale) return channel;\n  }\n}\n\n// Facet channels are not affected by transforms; so, to compute the domain of a\n// facet scale, we must first re-index the facet channel according to the\n// transformed mark index. Note: mutates channel, but that should be safe here?\nfunction reindexFacetChannel(facets, channel) {\n  const originalFacets = facets.original;\n  if (originalFacets === facets) return channel; // not transformed\n  const V1 = channel.value;\n  const V2 = (channel.value = []); // mutates channel!\n  for (let i = 0; i < originalFacets.length; ++i) {\n    const vi = V1[originalFacets[i][0]];\n    for (const j of facets[i]) V2[j] = vi;\n  }\n  return channel;\n}\n\nfunction difference(channels, k1, k2) {\n  const X1 = values(channels, k1);\n  const X2 = values(channels, k2);\n  return map(X2, (x2, i) => Math.abs(x2 - X1[i]), Float64Array);\n}\n\nfunction values(channels, name, alias) {\n  let channel = channels[name];\n  if (!channel && alias !== undefined) channel = channels[alias];\n  if (channel) return channel.value;\n  throw new Error(`missing channel: ${name}`);\n}\n\nfunction maybeOrder(order) {\n  if (order == null || typeof order === \"function\") return order;\n  switch (`${order}`.toLowerCase()) {\n    case \"ascending\":\n      return ascendingGroup;\n    case \"descending\":\n      return descendingGroup;\n  }\n  throw new Error(`invalid order: ${order}`);\n}\n\nfunction ascendingGroup([ak, av], [bk, bv]) {\n  return ascendingDefined(av, bv) || ascendingDefined(ak, bk);\n}\n\nfunction descendingGroup([ak, av], [bk, bv]) {\n  return descendingDefined(av, bv) || ascendingDefined(ak, bk);\n}\n\nexport function getSource(channels, key) {\n  let channel = channels[key];\n  if (!channel) return;\n  while (channel.source) channel = channel.source;\n  return channel.source === null ? null : channel;\n}\n", "import {creator, select} from \"d3\";\n\nexport function createContext(options = {}) {\n  const {document = typeof window !== \"undefined\" ? window.document : undefined} = options;\n  return {document};\n}\n\nexport function create(name, {document}) {\n  return select(creator(name).call(document.documentElement));\n}\n", "let warnings = 0;\n\nexport function consumeWarnings() {\n  const w = warnings;\n  warnings = 0;\n  return w;\n}\n\nexport function warn(message) {\n  console.warn(message);\n  ++warnings;\n}\n", "import {\n  geoAlbers,\n  geoAlbersUsa,\n  geoAzimuthalEqualArea,\n  geoAzimuthalEquidistant,\n  geoClipRectangle,\n  geoConicConformal,\n  geoConicEqualArea,\n  geoConicEquidistant,\n  geoEqualEarth,\n  geoEquirectangular,\n  geoGnomonic,\n  geoMercator,\n  geoOrthographic,\n  geoPath,\n  geoStereographic,\n  geoStream,\n  geoTransform,\n  geoTransverseMercator\n} from \"d3\";\nimport {valueObject} from \"./channel.js\";\nimport {coerceNumbers, constant, isObject} from \"./options.js\";\nimport {warn} from \"./warnings.js\";\n\nconst pi = Math.PI;\nconst tau = 2 * pi;\nconst defaultAspectRatio = 0.618;\n\nexport function createProjection(\n  {\n    projection,\n    inset: globalInset = 0,\n    insetTop = globalInset,\n    insetRight = globalInset,\n    insetBottom = globalInset,\n    insetLeft = globalInset\n  } = {},\n  dimensions\n) {\n  if (projection == null) return;\n  if (typeof projection.stream === \"function\") return projection; // d3 projection\n  let options;\n  let domain;\n  let clip = \"frame\";\n\n  // If the projection was specified as an object with additional options,\n  // extract those. The order of precedence for insetTop (and other insets) is:\n  // projection.insetTop, projection.inset, (global) insetTop, (global) inset.\n  // Any other options on this object will be passed through to the initializer.\n  if (isObject(projection)) {\n    let inset;\n    ({\n      type: projection,\n      domain,\n      inset,\n      insetTop = inset !== undefined ? inset : insetTop,\n      insetRight = inset !== undefined ? inset : insetRight,\n      insetBottom = inset !== undefined ? inset : insetBottom,\n      insetLeft = inset !== undefined ? inset : insetLeft,\n      clip = clip,\n      ...options\n    } = projection);\n    if (projection == null) return;\n  }\n\n  // For named projections, retrieve the corresponding projection initializer.\n  if (typeof projection !== \"function\") ({type: projection} = namedProjection(projection));\n\n  // Compute the frame dimensions and invoke the projection initializer.\n  const {width, height, marginLeft, marginRight, marginTop, marginBottom} = dimensions;\n  const dx = width - marginLeft - marginRight - insetLeft - insetRight;\n  const dy = height - marginTop - marginBottom - insetTop - insetBottom;\n  projection = projection?.({width: dx, height: dy, clip, ...options});\n\n  // The projection initializer might decide to not use a projection.\n  if (projection == null) return;\n  clip = maybePostClip(clip, marginLeft, marginTop, width - marginRight, height - marginBottom);\n\n  // Translate the origin to the top-left corner, respecting margins and insets.\n  let tx = marginLeft + insetLeft;\n  let ty = marginTop + insetTop;\n  let transform;\n\n  // If a domain is specified, fit the projection to the frame.\n  if (domain != null) {\n    const [[x0, y0], [x1, y1]] = geoPath(projection).bounds(domain);\n    const k = Math.min(dx / (x1 - x0), dy / (y1 - y0));\n    if (k > 0) {\n      tx -= (k * (x0 + x1) - dx) / 2;\n      ty -= (k * (y0 + y1) - dy) / 2;\n      transform = geoTransform({\n        point(x, y) {\n          this.stream.point(x * k + tx, y * k + ty);\n        }\n      });\n    } else {\n      warn(`Warning: the projection could not be fit to the specified domain; using the default scale.`);\n    }\n  }\n\n  transform ??=\n    tx === 0 && ty === 0\n      ? identity()\n      : geoTransform({\n          point(x, y) {\n            this.stream.point(x + tx, y + ty);\n          }\n        });\n\n  return {stream: (s) => projection.stream(transform.stream(clip(s)))};\n}\n\nfunction namedProjection(projection) {\n  switch (`${projection}`.toLowerCase()) {\n    case \"albers-usa\":\n      return scaleProjection(geoAlbersUsa, 0.7463, 0.4673);\n    case \"albers\":\n      return conicProjection(geoAlbers, 0.7463, 0.4673);\n    case \"azimuthal-equal-area\":\n      return scaleProjection(geoAzimuthalEqualArea, 4, 4);\n    case \"azimuthal-equidistant\":\n      return scaleProjection(geoAzimuthalEquidistant, tau, tau);\n    case \"conic-conformal\":\n      return conicProjection(geoConicConformal, tau, tau);\n    case \"conic-equal-area\":\n      return conicProjection(geoConicEqualArea, 6.1702, 2.9781);\n    case \"conic-equidistant\":\n      return conicProjection(geoConicEquidistant, 7.312, 3.6282);\n    case \"equal-earth\":\n      return scaleProjection(geoEqualEarth, 5.4133, 2.6347);\n    case \"equirectangular\":\n      return scaleProjection(geoEquirectangular, tau, pi);\n    case \"gnomonic\":\n      return scaleProjection(geoGnomonic, 3.4641, 3.4641);\n    case \"identity\":\n      return {type: identity};\n    case \"reflect-y\":\n      return {type: reflectY};\n    case \"mercator\":\n      return scaleProjection(geoMercator, tau, tau);\n    case \"orthographic\":\n      return scaleProjection(geoOrthographic, 2, 2);\n    case \"stereographic\":\n      return scaleProjection(geoStereographic, 2, 2);\n    case \"transverse-mercator\":\n      return scaleProjection(geoTransverseMercator, tau, tau);\n    default:\n      throw new Error(`unknown projection type: ${projection}`);\n  }\n}\n\nfunction maybePostClip(clip, x1, y1, x2, y2) {\n  if (clip === false || clip == null || typeof clip === \"number\") return (s) => s;\n  if (clip === true) clip = \"frame\";\n  switch (`${clip}`.toLowerCase()) {\n    case \"frame\":\n      return geoClipRectangle(x1, y1, x2, y2);\n    default:\n      throw new Error(`unknown projection clip type: ${clip}`);\n  }\n}\n\nfunction scaleProjection(createProjection, kx, ky) {\n  return {\n    type: ({width, height, rotate, precision = 0.15, clip}) => {\n      const projection = createProjection();\n      if (precision != null) projection.precision?.(precision);\n      if (rotate != null) projection.rotate?.(rotate);\n      if (typeof clip === \"number\") projection.clipAngle?.(clip);\n      projection.scale(Math.min(width / kx, height / ky));\n      projection.translate([width / 2, height / 2]);\n      return projection;\n    },\n    aspectRatio: ky / kx\n  };\n}\n\nfunction conicProjection(createProjection, kx, ky) {\n  const {type, aspectRatio} = scaleProjection(createProjection, kx, ky);\n  return {\n    type: (options) => {\n      const {parallels, domain, width, height} = options;\n      const projection = type(options);\n      if (parallels != null) {\n        projection.parallels(parallels);\n        if (domain === undefined) {\n          projection.fitSize([width, height], {type: \"Sphere\"});\n        }\n      }\n      return projection;\n    },\n    aspectRatio\n  };\n}\n\nconst identity = constant({stream: (stream) => stream});\n\nconst reflectY = constant(\n  geoTransform({\n    point(x, y) {\n      this.stream.point(x, -y);\n    }\n  })\n);\n\n// Applies a point-wise projection to the given paired x and y channels.\n// Note: mutates values!\nexport function project(cx, cy, values, projection) {\n  const x = values[cx];\n  const y = values[cy];\n  const n = x.length;\n  const X = (values[cx] = new Float64Array(n).fill(NaN));\n  const Y = (values[cy] = new Float64Array(n).fill(NaN));\n  let i;\n  const stream = projection.stream({\n    point(x, y) {\n      X[i] = x;\n      Y[i] = y;\n    }\n  });\n  for (i = 0; i < n; ++i) {\n    stream.point(x[i], y[i]);\n  }\n}\n\n// Returns true if a projection was specified. This should match the logic of\n// createProjection above, and is called before we construct the projection.\n// (Though note that we ignore the edge case where the projection initializer\n// may return null.)\nexport function hasProjection({projection} = {}) {\n  if (projection == null) return false;\n  if (typeof projection.stream === \"function\") return true;\n  if (isObject(projection)) projection = projection.type;\n  return projection != null;\n}\n\n// When a named projection is specified, we can use its natural aspect ratio to\n// determine a good value for the projection\u2019s height based on the desired\n// width. When we don\u2019t have a way to know, the golden ratio is our best guess.\n// Due to a circular dependency (we need to know the height before we can\n// construct the projection), we have to test the raw projection option rather\n// than the materialized projection; therefore we must be extremely careful that\n// the logic of this function exactly matches createProjection above!\nexport function projectionAspectRatio(projection) {\n  if (typeof projection?.stream === \"function\") return defaultAspectRatio;\n  if (isObject(projection)) projection = projection.type;\n  if (projection == null) return;\n  if (typeof projection !== \"function\") {\n    const {aspectRatio} = namedProjection(projection);\n    if (aspectRatio) return aspectRatio;\n  }\n  return defaultAspectRatio;\n}\n\n// Extract the (possibly) scaled values for the x and y channels, and apply the\n// projection if any.\nexport function applyPosition(channels, scales, {projection}) {\n  const {x, y} = channels;\n  let position = {};\n  if (x) position.x = x;\n  if (y) position.y = y;\n  position = valueObject(position, scales);\n  if (projection && x?.scale === \"x\" && y?.scale === \"y\") project(\"x\", \"y\", position, projection);\n  if (x) position.x = coerceNumbers(position.x);\n  if (y) position.y = coerceNumbers(position.y);\n  return position;\n}\n\nexport function getGeometryChannels(channel) {\n  const X = [];\n  const Y = [];\n  const x = {scale: \"x\", value: X};\n  const y = {scale: \"y\", value: Y};\n  const sink = {\n    point(x, y) {\n      X.push(x);\n      Y.push(y);\n    },\n    lineStart() {},\n    lineEnd() {},\n    polygonStart() {},\n    polygonEnd() {},\n    sphere() {}\n  };\n  for (const object of channel.value) geoStream(object, sink);\n  return [x, y];\n}\n", "import {\n  interpolateBlues,\n  interpolateBrBG,\n  interpolateBuGn,\n  interpolateBuPu,\n  interpolateGnBu,\n  interpolateGreens,\n  interpolateGreys,\n  interpolateOranges,\n  interpolateOrRd,\n  interpolatePiYG,\n  interpolatePRGn,\n  interpolatePuBu,\n  interpolatePuBuGn,\n  interpolatePuOr,\n  interpolatePuRd,\n  interpolatePurples,\n  interpolateRdBu,\n  interpolateRdGy,\n  interpolateRdPu,\n  interpolateRdYlBu,\n  interpolateRdYlGn,\n  interpolateReds,\n  interpolateSpectral,\n  interpolateYlGn,\n  interpolateYlGnBu,\n  interpolateYlOrBr,\n  interpolateYlOrRd,\n  interpolateTurbo,\n  interpolateViridis,\n  interpolateMagma,\n  interpolateInferno,\n  interpolatePlasma,\n  interpolateCividis,\n  interpolateCubehelixDefault,\n  interpolateWarm,\n  interpolateCool,\n  interpolateRainbow,\n  interpolateSinebow,\n  quantize,\n  schemeAccent,\n  schemeBlues,\n  schemeBrBG,\n  schemeBuGn,\n  schemeBuPu,\n  schemeCategory10,\n  schemeDark2,\n  schemeGnBu,\n  schemeGreens,\n  schemeGreys,\n  schemeOranges,\n  schemeOrRd,\n  schemePaired,\n  schemePastel1,\n  schemePastel2,\n  schemePiYG,\n  schemePRGn,\n  schemePuBu,\n  schemePuBuGn,\n  schemePuOr,\n  schemePuRd,\n  schemePurples,\n  schemeRdBu,\n  schemeRdGy,\n  schemeRdPu,\n  schemeRdYlBu,\n  schemeRdYlGn,\n  schemeReds,\n  schemeSet1,\n  schemeSet2,\n  schemeSet3,\n  schemeSpectral,\n  schemeTableau10,\n  schemeYlGn,\n  schemeYlGnBu,\n  schemeYlOrBr,\n  schemeYlOrRd\n} from \"d3\";\n\nconst categoricalSchemes = new Map([\n  [\"accent\", schemeAccent],\n  [\"category10\", schemeCategory10],\n  [\"dark2\", schemeDark2],\n  [\"paired\", schemePaired],\n  [\"pastel1\", schemePastel1],\n  [\"pastel2\", schemePastel2],\n  [\"set1\", schemeSet1],\n  [\"set2\", schemeSet2],\n  [\"set3\", schemeSet3],\n  [\"tableau10\", schemeTableau10]\n]);\n\nexport function isCategoricalScheme(scheme) {\n  return scheme != null && categoricalSchemes.has(`${scheme}`.toLowerCase());\n}\n\nconst ordinalSchemes = new Map([\n  ...categoricalSchemes,\n\n  // diverging\n  [\"brbg\", scheme11(schemeBrBG, interpolateBrBG)],\n  [\"prgn\", scheme11(schemePRGn, interpolatePRGn)],\n  [\"piyg\", scheme11(schemePiYG, interpolatePiYG)],\n  [\"puor\", scheme11(schemePuOr, interpolatePuOr)],\n  [\"rdbu\", scheme11(schemeRdBu, interpolateRdBu)],\n  [\"rdgy\", scheme11(schemeRdGy, interpolateRdGy)],\n  [\"rdylbu\", scheme11(schemeRdYlBu, interpolateRdYlBu)],\n  [\"rdylgn\", scheme11(schemeRdYlGn, interpolateRdYlGn)],\n  [\"spectral\", scheme11(schemeSpectral, interpolateSpectral)],\n\n  // reversed diverging (for temperature data)\n  [\"burd\", scheme11r(schemeRdBu, interpolateRdBu)],\n  [\"buylrd\", scheme11r(schemeRdYlBu, interpolateRdYlBu)],\n\n  // sequential (single-hue)\n  [\"blues\", scheme9(schemeBlues, interpolateBlues)],\n  [\"greens\", scheme9(schemeGreens, interpolateGreens)],\n  [\"greys\", scheme9(schemeGreys, interpolateGreys)],\n  [\"oranges\", scheme9(schemeOranges, interpolateOranges)],\n  [\"purples\", scheme9(schemePurples, interpolatePurples)],\n  [\"reds\", scheme9(schemeReds, interpolateReds)],\n\n  // sequential (multi-hue)\n  [\"turbo\", schemei(interpolateTurbo)],\n  [\"viridis\", schemei(interpolateViridis)],\n  [\"magma\", schemei(interpolateMagma)],\n  [\"inferno\", schemei(interpolateInferno)],\n  [\"plasma\", schemei(interpolatePlasma)],\n  [\"cividis\", schemei(interpolateCividis)],\n  [\"cubehelix\", schemei(interpolateCubehelixDefault)],\n  [\"warm\", schemei(interpolateWarm)],\n  [\"cool\", schemei(interpolateCool)],\n  [\"bugn\", scheme9(schemeBuGn, interpolateBuGn)],\n  [\"bupu\", scheme9(schemeBuPu, interpolateBuPu)],\n  [\"gnbu\", scheme9(schemeGnBu, interpolateGnBu)],\n  [\"orrd\", scheme9(schemeOrRd, interpolateOrRd)],\n  [\"pubu\", scheme9(schemePuBu, interpolatePuBu)],\n  [\"pubugn\", scheme9(schemePuBuGn, interpolatePuBuGn)],\n  [\"purd\", scheme9(schemePuRd, interpolatePuRd)],\n  [\"rdpu\", scheme9(schemeRdPu, interpolateRdPu)],\n  [\"ylgn\", scheme9(schemeYlGn, interpolateYlGn)],\n  [\"ylgnbu\", scheme9(schemeYlGnBu, interpolateYlGnBu)],\n  [\"ylorbr\", scheme9(schemeYlOrBr, interpolateYlOrBr)],\n  [\"ylorrd\", scheme9(schemeYlOrRd, interpolateYlOrRd)],\n\n  // cyclical\n  [\"rainbow\", schemeicyclical(interpolateRainbow)],\n  [\"sinebow\", schemeicyclical(interpolateSinebow)]\n]);\n\nfunction scheme9(scheme, interpolate) {\n  return ({length: n}) => {\n    if (n === 1) return [scheme[3][1]]; // favor midpoint\n    if (n === 2) return [scheme[3][1], scheme[3][2]]; // favor darker\n    n = Math.max(3, Math.floor(n));\n    return n > 9 ? quantize(interpolate, n) : scheme[n];\n  };\n}\n\nfunction scheme11(scheme, interpolate) {\n  return ({length: n}) => {\n    if (n === 2) return [scheme[3][0], scheme[3][2]]; // favor diverging extrema\n    n = Math.max(3, Math.floor(n));\n    return n > 11 ? quantize(interpolate, n) : scheme[n];\n  };\n}\n\nfunction scheme11r(scheme, interpolate) {\n  return ({length: n}) => {\n    if (n === 2) return [scheme[3][2], scheme[3][0]]; // favor diverging extrema\n    n = Math.max(3, Math.floor(n));\n    return n > 11 ? quantize((t) => interpolate(1 - t), n) : scheme[n].slice().reverse();\n  };\n}\n\nfunction schemei(interpolate) {\n  return ({length: n}) => quantize(interpolate, Math.max(2, Math.floor(n)));\n}\n\nfunction schemeicyclical(interpolate) {\n  return ({length: n}) => quantize(interpolate, Math.floor(n) + 1).slice(0, -1);\n}\n\nexport function ordinalScheme(scheme) {\n  const s = `${scheme}`.toLowerCase();\n  if (!ordinalSchemes.has(s)) throw new Error(`unknown ordinal scheme: ${s}`);\n  return ordinalSchemes.get(s);\n}\n\nexport function ordinalRange(scheme, length) {\n  const s = ordinalScheme(scheme);\n  const r = typeof s === \"function\" ? s({length}) : s;\n  return r.length !== length ? r.slice(0, length) : r;\n}\n\n// If the specified domain contains only booleans (ignoring null and undefined),\n// returns a corresponding range where false is mapped to the low color and true\n// is mapped to the high color of the specified scheme.\nexport function maybeBooleanRange(domain, scheme = \"greys\") {\n  const range = new Set();\n  const [f, t] = ordinalRange(scheme, 2);\n  for (const value of domain) {\n    if (value == null) continue;\n    if (value === true) range.add(t);\n    else if (value === false) range.add(f);\n    else return;\n  }\n  return [...range];\n}\n\nconst quantitativeSchemes = new Map([\n  // diverging\n  [\"brbg\", interpolateBrBG],\n  [\"prgn\", interpolatePRGn],\n  [\"piyg\", interpolatePiYG],\n  [\"puor\", interpolatePuOr],\n  [\"rdbu\", interpolateRdBu],\n  [\"rdgy\", interpolateRdGy],\n  [\"rdylbu\", interpolateRdYlBu],\n  [\"rdylgn\", interpolateRdYlGn],\n  [\"spectral\", interpolateSpectral],\n\n  // reversed diverging (for temperature data)\n  [\"burd\", (t) => interpolateRdBu(1 - t)],\n  [\"buylrd\", (t) => interpolateRdYlBu(1 - t)],\n\n  // sequential (single-hue)\n  [\"blues\", interpolateBlues],\n  [\"greens\", interpolateGreens],\n  [\"greys\", interpolateGreys],\n  [\"purples\", interpolatePurples],\n  [\"reds\", interpolateReds],\n  [\"oranges\", interpolateOranges],\n\n  // sequential (multi-hue)\n  [\"turbo\", interpolateTurbo],\n  [\"viridis\", interpolateViridis],\n  [\"magma\", interpolateMagma],\n  [\"inferno\", interpolateInferno],\n  [\"plasma\", interpolatePlasma],\n  [\"cividis\", interpolateCividis],\n  [\"cubehelix\", interpolateCubehelixDefault],\n  [\"warm\", interpolateWarm],\n  [\"cool\", interpolateCool],\n  [\"bugn\", interpolateBuGn],\n  [\"bupu\", interpolateBuPu],\n  [\"gnbu\", interpolateGnBu],\n  [\"orrd\", interpolateOrRd],\n  [\"pubugn\", interpolatePuBuGn],\n  [\"pubu\", interpolatePuBu],\n  [\"purd\", interpolatePuRd],\n  [\"rdpu\", interpolateRdPu],\n  [\"ylgnbu\", interpolateYlGnBu],\n  [\"ylgn\", interpolateYlGn],\n  [\"ylorbr\", interpolateYlOrBr],\n  [\"ylorrd\", interpolateYlOrRd],\n\n  // cyclical\n  [\"rainbow\", interpolateRainbow],\n  [\"sinebow\", interpolateSinebow]\n]);\n\nexport function quantitativeScheme(scheme) {\n  const s = `${scheme}`.toLowerCase();\n  if (!quantitativeSchemes.has(s)) throw new Error(`unknown quantitative scheme: ${s}`);\n  return quantitativeSchemes.get(s);\n}\n\nconst divergingSchemes = new Set([\n  \"brbg\",\n  \"prgn\",\n  \"piyg\",\n  \"puor\",\n  \"rdbu\",\n  \"rdgy\",\n  \"rdylbu\",\n  \"rdylgn\",\n  \"spectral\",\n  \"burd\",\n  \"buylrd\"\n]);\n\nexport function isDivergingScheme(scheme) {\n  return scheme != null && divergingSchemes.has(`${scheme}`.toLowerCase());\n}\n", "import {\n  descending,\n  extent,\n  interpolateHcl,\n  interpolateHsl,\n  interpolateLab,\n  interpolateNumber,\n  interpolateRgb,\n  interpolateRound,\n  max,\n  median,\n  min,\n  piecewise,\n  quantile,\n  quantize,\n  reverse as reverseof,\n  scaleIdentity,\n  scaleLinear,\n  scaleLog,\n  scalePow,\n  scaleQuantile,\n  scaleSymlog,\n  scaleThreshold,\n  ticks\n} from \"d3\";\nimport {finite, negative, positive} from \"../defined.js\";\nimport {arrayify, constant, maybeNiceInterval, maybeRangeInterval, orderof, slice} from \"../options.js\";\nimport {color, length, opacity, radius, registry} from \"./index.js\";\nimport {ordinalRange, quantitativeScheme} from \"./schemes.js\";\n\nexport const flip = (i) => (t) => i(1 - t);\nconst unit = [0, 1];\n\nconst interpolators = new Map([\n  // numbers\n  [\"number\", interpolateNumber],\n\n  // color spaces\n  [\"rgb\", interpolateRgb],\n  [\"hsl\", interpolateHsl],\n  [\"hcl\", interpolateHcl],\n  [\"lab\", interpolateLab]\n]);\n\nexport function maybeInterpolator(interpolate) {\n  const i = `${interpolate}`.toLowerCase();\n  if (!interpolators.has(i)) throw new Error(`unknown interpolator: ${i}`);\n  return interpolators.get(i);\n}\n\nexport function createScaleQ(\n  key,\n  scale,\n  channels,\n  {\n    type,\n    nice,\n    clamp,\n    zero,\n    domain = inferAutoDomain(key, channels),\n    unknown,\n    round,\n    scheme,\n    interval,\n    range = registry.get(key) === radius\n      ? inferRadialRange(channels, domain)\n      : registry.get(key) === length\n      ? inferLengthRange(channels, domain)\n      : registry.get(key) === opacity\n      ? unit\n      : undefined,\n    interpolate = registry.get(key) === color\n      ? scheme == null && range !== undefined\n        ? interpolateRgb\n        : quantitativeScheme(scheme !== undefined ? scheme : type === \"cyclical\" ? \"rainbow\" : \"turbo\")\n      : round\n      ? interpolateRound\n      : interpolateNumber,\n    reverse\n  }\n) {\n  interval = maybeRangeInterval(interval, type);\n  if (type === \"cyclical\" || type === \"sequential\") type = \"linear\"; // shorthand for color schemes\n  if (typeof interpolate !== \"function\") interpolate = maybeInterpolator(interpolate); // named interpolator\n  reverse = !!reverse;\n\n  // If an explicit range is specified, and it has a different length than the\n  // domain, then redistribute the range using a piecewise interpolator.\n  if (range !== undefined) {\n    const n = (domain = arrayify(domain)).length;\n    const m = (range = arrayify(range)).length;\n    if (n !== m) {\n      if (interpolate.length === 1) throw new Error(\"invalid piecewise interpolator\"); // e.g., turbo\n      interpolate = piecewise(interpolate, range);\n      range = undefined;\n    }\n  }\n\n  // Disambiguate between a two-argument interpolator that is used in\n  // conjunction with the range, and a one-argument \u201Cfixed\u201D interpolator on the\n  // [0, 1] interval as with the RdBu color scheme.\n  if (interpolate.length === 1) {\n    if (reverse) {\n      interpolate = flip(interpolate);\n      reverse = false;\n    }\n    if (range === undefined) {\n      range = Float64Array.from(domain, (_, i) => i / (domain.length - 1));\n      if (range.length === 2) range = unit; // optimize common case of [0, 1]\n    }\n    scale.interpolate((range === unit ? constant : interpolatePiecewise)(interpolate));\n  } else {\n    scale.interpolate(interpolate);\n  }\n\n  // If a zero option is specified, we assume that the domain is numeric, and we\n  // want to ensure that the domain crosses zero. However, note that the domain\n  // may be reversed (descending) so we shouldn\u2019t assume that the first value is\n  // smaller than the last; and also it\u2019s possible that the domain has more than\n  // two values for a \u201Cpoly\u201D scale. And lastly be careful not to mutate input!\n  if (zero) {\n    const [min, max] = extent(domain);\n    if (min > 0 || max < 0) {\n      domain = slice(domain);\n      if (orderof(domain) !== Math.sign(min)) domain[domain.length - 1] = 0; // [2, 1] or [-2, -1]\n      else domain[0] = 0; // [1, 2] or [-1, -2]\n    }\n  }\n\n  if (reverse) domain = reverseof(domain);\n  scale.domain(domain).unknown(unknown);\n  if (nice) scale.nice(maybeNice(nice, type)), (domain = scale.domain());\n  if (range !== undefined) scale.range(range);\n  if (clamp) scale.clamp(clamp);\n  return {type, domain, range, scale, interpolate, interval};\n}\n\nfunction maybeNice(nice, type) {\n  return nice === true ? undefined : typeof nice === \"number\" ? nice : maybeNiceInterval(nice, type);\n}\n\nexport function createScaleLinear(key, channels, options) {\n  return createScaleQ(key, scaleLinear(), channels, options);\n}\n\nexport function createScaleSqrt(key, channels, options) {\n  return createScalePow(key, channels, {...options, exponent: 0.5});\n}\n\nexport function createScalePow(key, channels, {exponent = 1, ...options}) {\n  return createScaleQ(key, scalePow().exponent(exponent), channels, {...options, type: \"pow\"});\n}\n\nexport function createScaleLog(key, channels, {base = 10, domain = inferLogDomain(channels), ...options}) {\n  return createScaleQ(key, scaleLog().base(base), channels, {...options, domain});\n}\n\nexport function createScaleSymlog(key, channels, {constant = 1, ...options}) {\n  return createScaleQ(key, scaleSymlog().constant(constant), channels, options);\n}\n\nexport function createScaleQuantile(\n  key,\n  channels,\n  {\n    range,\n    quantiles = range === undefined ? 5 : (range = [...range]).length, // deprecated; use n instead\n    n = quantiles,\n    scheme = \"rdylbu\",\n    domain = inferQuantileDomain(channels),\n    unknown,\n    interpolate,\n    reverse\n  }\n) {\n  if (range === undefined) {\n    range =\n      interpolate !== undefined\n        ? quantize(interpolate, n)\n        : registry.get(key) === color\n        ? ordinalRange(scheme, n)\n        : undefined;\n  }\n  if (domain.length > 0) {\n    domain = scaleQuantile(domain, range === undefined ? {length: n} : range).quantiles();\n  }\n  return createScaleThreshold(key, channels, {domain, range, reverse, unknown});\n}\n\nexport function createScaleQuantize(\n  key,\n  channels,\n  {\n    range,\n    n = range === undefined ? 5 : (range = [...range]).length,\n    scheme = \"rdylbu\",\n    domain = inferAutoDomain(key, channels),\n    unknown,\n    interpolate,\n    reverse\n  }\n) {\n  const [min, max] = extent(domain);\n  let thresholds;\n  if (range === undefined) {\n    thresholds = ticks(min, max, n); // approximate number of nice, round thresholds\n    if (thresholds[0] <= min) thresholds.splice(0, 1); // drop exact lower bound\n    if (thresholds[thresholds.length - 1] >= max) thresholds.pop(); // drop exact upper bound\n    n = thresholds.length + 1;\n    range =\n      interpolate !== undefined\n        ? quantize(interpolate, n)\n        : registry.get(key) === color\n        ? ordinalRange(scheme, n)\n        : undefined;\n  } else {\n    thresholds = quantize(interpolateNumber(min, max), n + 1).slice(1, -1); // exactly n - 1 thresholds to match range\n    if (min instanceof Date) thresholds = thresholds.map((x) => new Date(x)); // preserve date types\n  }\n  if (orderof(arrayify(domain)) < 0) thresholds.reverse(); // preserve descending domain\n  return createScaleThreshold(key, channels, {domain: thresholds, range, reverse, unknown});\n}\n\nexport function createScaleThreshold(\n  key,\n  channels,\n  {\n    domain = [0], // explicit thresholds in ascending order\n    unknown,\n    scheme = \"rdylbu\",\n    interpolate,\n    range = interpolate !== undefined\n      ? quantize(interpolate, domain.length + 1)\n      : registry.get(key) === color\n      ? ordinalRange(scheme, domain.length + 1)\n      : undefined,\n    reverse\n  }\n) {\n  domain = arrayify(domain);\n  const sign = orderof(domain); // preserve descending domain\n  if (!isNaN(sign) && !isOrdered(domain, sign)) throw new Error(`the ${key} scale has a non-monotonic domain`);\n  if (reverse) range = reverseof(range); // domain ascending, so reverse range\n  return {\n    type: \"threshold\",\n    scale: scaleThreshold(sign < 0 ? reverseof(domain) : domain, range === undefined ? [] : range).unknown(unknown),\n    domain,\n    range\n  };\n}\n\nfunction isOrdered(domain, sign) {\n  for (let i = 1, n = domain.length, d = domain[0]; i < n; ++i) {\n    const s = descending(d, (d = domain[i]));\n    if (s !== 0 && s !== sign) return false;\n  }\n  return true;\n}\n\nexport function createScaleIdentity() {\n  return {type: \"identity\", scale: scaleIdentity()};\n}\n\nexport function inferDomain(channels, f = finite) {\n  return channels.length\n    ? [\n        min(channels, ({value}) => (value === undefined ? value : min(value, f))),\n        max(channels, ({value}) => (value === undefined ? value : max(value, f)))\n      ]\n    : [0, 1];\n}\n\nfunction inferAutoDomain(key, channels) {\n  const type = registry.get(key);\n  return (type === radius || type === opacity || type === length ? inferZeroDomain : inferDomain)(channels);\n}\n\nfunction inferZeroDomain(channels) {\n  return [0, channels.length ? max(channels, ({value}) => (value === undefined ? value : max(value, finite))) : 1];\n}\n\n// We don\u2019t want the upper bound of the radial domain to be zero, as this would\n// be degenerate, so we ignore nonpositive values. We also don\u2019t want the\n// maximum default radius to exceed 30px.\nfunction inferRadialRange(channels, domain) {\n  const hint = channels.find(({radius}) => radius !== undefined);\n  if (hint !== undefined) return [0, hint.radius]; // a natural maximum radius, e.g. hexbins\n  const h25 = quantile(channels, 0.5, ({value}) => (value === undefined ? NaN : quantile(value, 0.25, positive)));\n  const range = domain.map((d) => 3 * Math.sqrt(d / h25));\n  const k = 30 / max(range);\n  return k < 1 ? range.map((r) => r * k) : range;\n}\n\n// We want a length scale\u2019s domain to go from zero to a positive value, and to\n// treat negative lengths if any as inverted vectors of equivalent magnitude. We\n// also don\u2019t want the maximum default length to exceed 60px.\nfunction inferLengthRange(channels, domain) {\n  const h50 = median(channels, ({value}) => (value === undefined ? NaN : median(value, Math.abs)));\n  const range = domain.map((d) => (12 * d) / h50);\n  const k = 60 / max(range);\n  return k < 1 ? range.map((r) => r * k) : range;\n}\n\nfunction inferLogDomain(channels) {\n  for (const {value} of channels) {\n    if (value !== undefined) {\n      for (let v of value) {\n        if (v > 0) return inferDomain(channels, positive);\n        if (v < 0) return inferDomain(channels, negative);\n      }\n    }\n  }\n  return [1, 10];\n}\n\nfunction inferQuantileDomain(channels) {\n  const domain = [];\n  for (const {value} of channels) {\n    if (value === undefined) continue;\n    for (const v of value) domain.push(v);\n  }\n  return domain;\n}\n\nexport function interpolatePiecewise(interpolate) {\n  return (i, j) => (t) => interpolate(i + t * (j - i));\n}\n", "import {\n  descending,\n  interpolateNumber,\n  interpolateRgb,\n  piecewise,\n  scaleDiverging,\n  scaleDivergingLog,\n  scaleDivergingPow,\n  scaleDivergingSymlog\n} from \"d3\";\nimport {negative, positive} from \"../defined.js\";\nimport {arrayify} from \"../options.js\";\nimport {warn} from \"../warnings.js\";\nimport {color, registry} from \"./index.js\";\nimport {flip, inferDomain, interpolatePiecewise, maybeInterpolator} from \"./quantitative.js\";\nimport {quantitativeScheme} from \"./schemes.js\";\n\nfunction createScaleD(\n  key,\n  scale,\n  transform,\n  channels,\n  {\n    type,\n    nice,\n    clamp,\n    domain = inferDomain(channels),\n    unknown,\n    pivot = 0,\n    scheme,\n    range,\n    symmetric = true,\n    interpolate = registry.get(key) === color\n      ? scheme == null && range !== undefined\n        ? interpolateRgb\n        : quantitativeScheme(scheme !== undefined ? scheme : \"rdbu\")\n      : interpolateNumber,\n    reverse\n  }\n) {\n  pivot = +pivot;\n  domain = arrayify(domain);\n  let [min, max] = domain;\n  if (domain.length > 2) warn(`Warning: the diverging ${key} scale domain contains extra elements.`);\n\n  if (descending(min, max) < 0) ([min, max] = [max, min]), (reverse = !reverse);\n  min = Math.min(min, pivot);\n  max = Math.max(max, pivot);\n\n  // Sometimes interpolate is a named interpolator, such as \"lab\" for Lab color\n  // space. Other times interpolate is a function that takes two arguments and\n  // is used in conjunction with the range. And other times the interpolate\n  // function is a \u201Cfixed\u201D interpolator on the [0, 1] interval, as when a\n  // color scheme such as interpolateRdBu is used.\n  if (typeof interpolate !== \"function\") {\n    interpolate = maybeInterpolator(interpolate);\n  }\n\n  // If an explicit range is specified, promote it to a piecewise interpolator.\n  if (range !== undefined) {\n    interpolate =\n      interpolate.length === 1 ? interpolatePiecewise(interpolate)(...range) : piecewise(interpolate, range);\n  }\n\n  // Reverse before normalization.\n  if (reverse) interpolate = flip(interpolate);\n\n  // Normalize the interpolator for symmetric difference around the pivot.\n  if (symmetric) {\n    const mid = transform.apply(pivot);\n    const mindelta = mid - transform.apply(min);\n    const maxdelta = transform.apply(max) - mid;\n    if (mindelta < maxdelta) min = transform.invert(mid - maxdelta);\n    else if (mindelta > maxdelta) max = transform.invert(mid + mindelta);\n  }\n\n  scale.domain([min, pivot, max]).unknown(unknown).interpolator(interpolate);\n  if (clamp) scale.clamp(clamp);\n  if (nice) scale.nice(nice);\n  return {type, domain: [min, max], pivot, interpolate, scale};\n}\n\nexport function createScaleDiverging(key, channels, options) {\n  return createScaleD(key, scaleDiverging(), transformIdentity, channels, options);\n}\n\nexport function createScaleDivergingSqrt(key, channels, options) {\n  return createScaleDivergingPow(key, channels, {...options, exponent: 0.5});\n}\n\nexport function createScaleDivergingPow(key, channels, {exponent = 1, ...options}) {\n  return createScaleD(key, scaleDivergingPow().exponent((exponent = +exponent)), transformPow(exponent), channels, {\n    ...options,\n    type: \"diverging-pow\"\n  });\n}\n\nexport function createScaleDivergingLog(\n  key,\n  channels,\n  {base = 10, pivot = 1, domain = inferDomain(channels, pivot < 0 ? negative : positive), ...options}\n) {\n  return createScaleD(key, scaleDivergingLog().base((base = +base)), transformLog, channels, {\n    domain,\n    pivot,\n    ...options\n  });\n}\n\nexport function createScaleDivergingSymlog(key, channels, {constant = 1, ...options}) {\n  return createScaleD(\n    key,\n    scaleDivergingSymlog().constant((constant = +constant)),\n    transformSymlog(constant),\n    channels,\n    options\n  );\n}\n\nconst transformIdentity = {\n  apply(x) {\n    return x;\n  },\n  invert(x) {\n    return x;\n  }\n};\n\nconst transformLog = {\n  apply: Math.log,\n  invert: Math.exp\n};\n\nconst transformSqrt = {\n  apply(x) {\n    return Math.sign(x) * Math.sqrt(Math.abs(x));\n  },\n  invert(x) {\n    return Math.sign(x) * (x * x);\n  }\n};\n\nfunction transformPow(exponent) {\n  return exponent === 0.5\n    ? transformSqrt\n    : {\n        apply(x) {\n          return Math.sign(x) * Math.pow(Math.abs(x), exponent);\n        },\n        invert(x) {\n          return Math.sign(x) * Math.pow(Math.abs(x), 1 / exponent);\n        }\n      };\n}\n\nfunction transformSymlog(constant) {\n  return {\n    apply(x) {\n      return Math.sign(x) * Math.log1p(Math.abs(x / constant));\n    },\n    invert(x) {\n      return Math.sign(x) * Math.expm1(Math.abs(x)) * constant;\n    }\n  };\n}\n", "import {scaleTime, scaleUtc} from \"d3\";\nimport {createScaleQ} from \"./quantitative.js\";\n\nfunction createScaleT(key, scale, channels, options) {\n  return createScaleQ(key, scale, channels, options);\n}\n\nexport function createScaleTime(key, channels, options) {\n  return createScaleT(key, scaleTime(), channels, options);\n}\n\nexport function createScaleUtc(key, channels, options) {\n  return createScaleT(key, scaleUtc(), channels, options);\n}\n", "import {InternSet, extent, quantize, reverse as reverseof, sort, symbolsFill, symbolsStroke} from \"d3\";\nimport {scaleBand, scaleOrdinal, scalePoint, scaleImplicit} from \"d3\";\nimport {ascendingDefined} from \"../defined.js\";\nimport {isNoneish, map, maybeRangeInterval} from \"../options.js\";\nimport {maybeSymbol} from \"../symbol.js\";\nimport {registry, color, position, symbol} from \"./index.js\";\nimport {maybeBooleanRange, ordinalScheme, quantitativeScheme} from \"./schemes.js\";\n\n// This denotes an implicitly ordinal color scale: the scale type was not set,\n// but the associated values are strings or booleans. If the associated defined\n// values are entirely boolean, the range will default to greys. You can opt out\n// of this by setting the type explicitly.\nexport const ordinalImplicit = Symbol(\"ordinal\");\n\nfunction createScaleO(key, scale, channels, {type, interval, domain, range, reverse, hint}) {\n  interval = maybeRangeInterval(interval, type);\n  if (domain === undefined) domain = inferDomain(channels, interval, key);\n  if (type === \"categorical\" || type === ordinalImplicit) type = \"ordinal\"; // shorthand for color schemes\n  if (reverse) domain = reverseof(domain);\n  scale.domain(domain);\n  if (range !== undefined) {\n    // If the range is specified as a function, pass it the domain.\n    if (typeof range === \"function\") range = range(domain);\n    scale.range(range);\n  }\n  return {type, domain, range, scale, hint, interval};\n}\n\nexport function createScaleOrdinal(key, channels, {type, interval, domain, range, scheme, unknown, ...options}) {\n  interval = maybeRangeInterval(interval, type);\n  if (domain === undefined) domain = inferDomain(channels, interval, key);\n  let hint;\n  if (registry.get(key) === symbol) {\n    hint = inferSymbolHint(channels);\n    range = range === undefined ? inferSymbolRange(hint) : map(range, maybeSymbol);\n  } else if (registry.get(key) === color) {\n    if (range === undefined && (type === \"ordinal\" || type === ordinalImplicit)) {\n      range = maybeBooleanRange(domain, scheme);\n      if (range !== undefined) scheme = undefined; // Don\u2019t re-apply scheme.\n    }\n    if (scheme === undefined && range === undefined) {\n      scheme = type === \"ordinal\" ? \"turbo\" : \"tableau10\";\n    }\n    if (scheme !== undefined) {\n      if (range !== undefined) {\n        const interpolate = quantitativeScheme(scheme);\n        const t0 = range[0],\n          d = range[1] - range[0];\n        range = ({length: n}) => quantize((t) => interpolate(t0 + d * t), n);\n      } else {\n        range = ordinalScheme(scheme);\n      }\n    }\n  }\n  if (unknown === scaleImplicit) {\n    throw new Error(`implicit unknown on ${key} scale is not supported`);\n  }\n  return createScaleO(key, scaleOrdinal().unknown(unknown), channels, {...options, type, domain, range, hint});\n}\n\nexport function createScalePoint(key, channels, {align = 0.5, padding = 0.5, ...options}) {\n  return maybeRound(scalePoint().align(align).padding(padding), channels, options, key);\n}\n\nexport function createScaleBand(\n  key,\n  channels,\n  {\n    align = 0.5,\n    padding = 0.1,\n    paddingInner = padding,\n    paddingOuter = key === \"fx\" || key === \"fy\" ? 0 : padding,\n    ...options\n  }\n) {\n  return maybeRound(\n    scaleBand().align(align).paddingInner(paddingInner).paddingOuter(paddingOuter),\n    channels,\n    options,\n    key\n  );\n}\n\nfunction maybeRound(scale, channels, options, key) {\n  let {round} = options;\n  if (round !== undefined) scale.round((round = !!round));\n  scale = createScaleO(key, scale, channels, options);\n  scale.round = round; // preserve for autoScaleRound\n  return scale;\n}\n\nfunction inferDomain(channels, interval, key) {\n  const values = new InternSet();\n  for (const {value, domain} of channels) {\n    if (domain !== undefined) return domain(); // see channelDomain\n    if (value === undefined) continue;\n    for (const v of value) values.add(v);\n  }\n  if (interval !== undefined) {\n    const [min, max] = extent(values).map(interval.floor, interval);\n    return interval.range(min, interval.offset(max));\n  }\n  if (values.size > 10e3 && registry.get(key) === position) {\n    throw new Error(`implicit ordinal domain of ${key} scale has more than 10,000 values`);\n  }\n  return sort(values, ascendingDefined);\n}\n\n// If all channels provide a consistent hint, propagate it to the scale.\nfunction inferHint(channels, key) {\n  let value;\n  for (const {hint} of channels) {\n    const candidate = hint?.[key];\n    if (candidate === undefined) continue; // no hint here\n    if (value === undefined) value = candidate;\n    // first hint\n    else if (value !== candidate) return; // inconsistent hint\n  }\n  return value;\n}\n\nfunction inferSymbolHint(channels) {\n  return {\n    fill: inferHint(channels, \"fill\"),\n    stroke: inferHint(channels, \"stroke\")\n  };\n}\n\nfunction inferSymbolRange(hint) {\n  return isNoneish(hint.fill) ? symbolsStroke : symbolsFill;\n}\n", "import {\n  isOrdinal,\n  isTemporal,\n  isTemporalString,\n  isNumericString,\n  isScaleOptions,\n  map,\n  slice,\n  coerceNumbers,\n  coerceDates\n} from \"./options.js\";\nimport {registry, color, position, radius, opacity, symbol, length} from \"./scales/index.js\";\nimport {\n  createScaleLinear,\n  createScaleSqrt,\n  createScalePow,\n  createScaleLog,\n  createScaleSymlog,\n  createScaleQuantile,\n  createScaleQuantize,\n  createScaleThreshold,\n  createScaleIdentity\n} from \"./scales/quantitative.js\";\nimport {\n  createScaleDiverging,\n  createScaleDivergingSqrt,\n  createScaleDivergingPow,\n  createScaleDivergingLog,\n  createScaleDivergingSymlog\n} from \"./scales/diverging.js\";\nimport {isCategoricalScheme, isDivergingScheme} from \"./scales/schemes.js\";\nimport {createScaleTime, createScaleUtc} from \"./scales/temporal.js\";\nimport {createScaleOrdinal, createScalePoint, createScaleBand, ordinalImplicit} from \"./scales/ordinal.js\";\nimport {maybeSymbol} from \"./symbol.js\";\nimport {warn} from \"./warnings.js\";\n\nexport function createScales(\n  channelsByScale,\n  {\n    label: globalLabel,\n    inset: globalInset = 0,\n    insetTop: globalInsetTop = globalInset,\n    insetRight: globalInsetRight = globalInset,\n    insetBottom: globalInsetBottom = globalInset,\n    insetLeft: globalInsetLeft = globalInset,\n    round,\n    nice,\n    clamp,\n    zero,\n    align,\n    padding,\n    projection,\n    facet: {label: facetLabel = globalLabel} = {},\n    ...options\n  } = {}\n) {\n  const scales = {};\n  for (const [key, channels] of channelsByScale) {\n    const scaleOptions = options[key];\n    const scale = createScale(key, channels, {\n      round: registry.get(key) === position ? round : undefined, // only for position\n      nice,\n      clamp,\n      zero,\n      align,\n      padding,\n      projection,\n      ...scaleOptions\n    });\n    if (scale) {\n      // populate generic scale options (percent, transform, insets)\n      let {\n        label = key === \"fx\" || key === \"fy\" ? facetLabel : globalLabel,\n        percent,\n        transform,\n        inset,\n        insetTop = inset !== undefined ? inset : key === \"y\" ? globalInsetTop : 0, // not fy\n        insetRight = inset !== undefined ? inset : key === \"x\" ? globalInsetRight : 0, // not fx\n        insetBottom = inset !== undefined ? inset : key === \"y\" ? globalInsetBottom : 0, // not fy\n        insetLeft = inset !== undefined ? inset : key === \"x\" ? globalInsetLeft : 0 // not fx\n      } = scaleOptions || {};\n      if (transform == null) transform = undefined;\n      else if (typeof transform !== \"function\") throw new Error(\"invalid scale transform; not a function\");\n      scale.percent = !!percent;\n      scale.label = label === undefined ? inferScaleLabel(channels, scale) : label;\n      scale.transform = transform;\n      if (key === \"x\" || key === \"fx\") {\n        scale.insetLeft = +insetLeft;\n        scale.insetRight = +insetRight;\n      } else if (key === \"y\" || key === \"fy\") {\n        scale.insetTop = +insetTop;\n        scale.insetBottom = +insetBottom;\n      }\n      scales[key] = scale;\n    }\n  }\n  return scales;\n}\n\nexport function createScaleFunctions(scales) {\n  return Object.fromEntries(\n    Object.entries(scales)\n      .filter(([, {scale}]) => scale) // drop identity scales\n      .map(([name, {scale, type, interval, label}]) => {\n        scale.type = type; // for axis\n        if (interval != null) scale.interval = interval; // for axis\n        if (label != null) scale.label = label; // for axis\n        return [name, scale];\n      })\n  );\n}\n\n// Mutates scale.range!\nexport function autoScaleRange(scales, dimensions) {\n  const {x, y, fx, fy} = scales;\n  const superdimensions = fx || fy ? outerDimensions(dimensions) : dimensions;\n  if (fx) autoScaleRangeX(fx, superdimensions);\n  if (fy) autoScaleRangeY(fy, superdimensions);\n  const subdimensions = fx || fy ? innerDimensions(scales, dimensions) : dimensions;\n  if (x) autoScaleRangeX(x, subdimensions);\n  if (y) autoScaleRangeY(y, subdimensions);\n}\n\n// Channels can have labels; if all the channels for a given scale are\n// consistently labeled (i.e., have the same value if not undefined), and the\n// corresponding scale doesn\u2019t already have an explicit label, then the\n// channels\u2019 label is promoted to the scale. This inferred label should have an\n// orientation-appropriate arrow added when used as an axis, but we don\u2019t want\n// to add the arrow when the label is set explicitly as an option; so, the\n// inferred label is distinguished as an object with an \u201Cinferred\u201D property.\nfunction inferScaleLabel(channels = [], scale) {\n  let label;\n  for (const {label: l} of channels) {\n    if (l === undefined) continue;\n    if (label === undefined) label = l;\n    else if (label !== l) return;\n  }\n  if (label === undefined) return;\n  if (!isOrdinalScale(scale) && scale.percent) label = `${label} (%)`;\n  return {inferred: true, toString: () => label};\n}\n\n// Returns the dimensions of the outer frame; this is subdivided into facets\n// with the margins of each facet collapsing into the outer margins.\nexport function outerDimensions(dimensions) {\n  const {\n    marginTop,\n    marginRight,\n    marginBottom,\n    marginLeft,\n    width,\n    height,\n    facet: {\n      marginTop: facetMarginTop,\n      marginRight: facetMarginRight,\n      marginBottom: facetMarginBottom,\n      marginLeft: facetMarginLeft\n    }\n  } = dimensions;\n  return {\n    marginTop: Math.max(marginTop, facetMarginTop),\n    marginRight: Math.max(marginRight, facetMarginRight),\n    marginBottom: Math.max(marginBottom, facetMarginBottom),\n    marginLeft: Math.max(marginLeft, facetMarginLeft),\n    width,\n    height\n  };\n}\n\n// Returns the dimensions of each facet.\nexport function innerDimensions({fx, fy}, dimensions) {\n  const {marginTop, marginRight, marginBottom, marginLeft, width, height} = outerDimensions(dimensions);\n  return {\n    marginTop,\n    marginRight,\n    marginBottom,\n    marginLeft,\n    width: fx ? fx.scale.bandwidth() + marginLeft + marginRight : width,\n    height: fy ? fy.scale.bandwidth() + marginTop + marginBottom : height,\n    facet: {width, height}\n  };\n}\n\nfunction autoScaleRangeX(scale, dimensions) {\n  if (scale.range === undefined) {\n    const {insetLeft, insetRight} = scale;\n    const {width, marginLeft = 0, marginRight = 0} = dimensions;\n    const left = marginLeft + insetLeft;\n    const right = width - marginRight - insetRight;\n    scale.range = [left, Math.max(left, right)];\n    if (!isOrdinalScale(scale)) scale.range = piecewiseRange(scale);\n    scale.scale.range(scale.range);\n  }\n  autoScaleRound(scale);\n}\n\nfunction autoScaleRangeY(scale, dimensions) {\n  if (scale.range === undefined) {\n    const {insetTop, insetBottom} = scale;\n    const {height, marginTop = 0, marginBottom = 0} = dimensions;\n    const top = marginTop + insetTop;\n    const bottom = height - marginBottom - insetBottom;\n    scale.range = [Math.max(top, bottom), top];\n    if (!isOrdinalScale(scale)) scale.range = piecewiseRange(scale);\n    else scale.range.reverse();\n    scale.scale.range(scale.range);\n  }\n  autoScaleRound(scale);\n}\n\nfunction autoScaleRound(scale) {\n  if (scale.round === undefined && isBandScale(scale) && roundError(scale) <= 30) {\n    scale.scale.round(true);\n  }\n}\n\n// If we were to turn on rounding for this band or point scale, how much wasted\n// space would it introduce (on both ends of the range)? This must match\n// d3.scaleBand\u2019s rounding behavior:\n// https://github.com/d3/d3-scale/blob/83555bd759c7314420bd4240642beda5e258db9e/src/band.js#L20-L32\nfunction roundError({scale}) {\n  const n = scale.domain().length;\n  const [start, stop] = scale.range();\n  const paddingInner = scale.paddingInner ? scale.paddingInner() : 1;\n  const paddingOuter = scale.paddingOuter ? scale.paddingOuter() : scale.padding();\n  const m = n - paddingInner;\n  const step = Math.abs(stop - start) / Math.max(1, m + paddingOuter * 2);\n  return (step - Math.floor(step)) * m;\n}\n\nfunction piecewiseRange(scale) {\n  const length = scale.scale.domain().length + isThresholdScale(scale);\n  if (!(length > 2)) return scale.range;\n  const [start, end] = scale.range;\n  return Array.from({length}, (_, i) => start + (i / (length - 1)) * (end - start));\n}\n\nexport function normalizeScale(key, scale, hint) {\n  return createScale(key, hint === undefined ? undefined : [{hint}], {...scale});\n}\n\nfunction createScale(key, channels = [], options = {}) {\n  const type = inferScaleType(key, channels, options);\n\n  // Warn for common misuses of implicit ordinal scales. We disable this test if\n  // you specify a scale interval or if you set the domain or range explicitly,\n  // since setting the domain or range (typically with a cardinality of more than\n  // two) is another indication that you intended for the scale to be ordinal; we\n  // also disable it for facet scales since these are always band scales.\n  if (\n    options.type === undefined &&\n    options.domain === undefined &&\n    options.range === undefined &&\n    options.interval == null &&\n    key !== \"fx\" &&\n    key !== \"fy\" &&\n    isOrdinalScale({type})\n  ) {\n    const values = channels.map(({value}) => value).filter((value) => value !== undefined);\n    if (values.some(isTemporal))\n      warn(\n        `Warning: some data associated with the ${key} scale are dates. Dates are typically associated with a \"utc\" or \"time\" scale rather than a \"${formatScaleType(\n          type\n        )}\" scale. If you are using a bar mark, you probably want a rect mark with the interval option instead; if you are using a group transform, you probably want a bin transform instead. If you want to treat this data as ordinal, you can specify the interval of the ${key} scale (e.g., d3.utcDay), or you can suppress this warning by setting the type of the ${key} scale to \"${formatScaleType(\n          type\n        )}\".`\n      );\n    else if (values.some(isTemporalString))\n      warn(\n        `Warning: some data associated with the ${key} scale are strings that appear to be dates (e.g., YYYY-MM-DD). If these strings represent dates, you should parse them to Date objects. Dates are typically associated with a \"utc\" or \"time\" scale rather than a \"${formatScaleType(\n          type\n        )}\" scale. If you are using a bar mark, you probably want a rect mark with the interval option instead; if you are using a group transform, you probably want a bin transform instead. If you want to treat this data as ordinal, you can suppress this warning by setting the type of the ${key} scale to \"${formatScaleType(\n          type\n        )}\".`\n      );\n    else if (values.some(isNumericString))\n      warn(\n        `Warning: some data associated with the ${key} scale are strings that appear to be numbers. If these strings represent numbers, you should parse or coerce them to numbers. Numbers are typically associated with a \"linear\" scale rather than a \"${formatScaleType(\n          type\n        )}\" scale. If you want to treat this data as ordinal, you can specify the interval of the ${key} scale (e.g., 1 for integers), or you can suppress this warning by setting the type of the ${key} scale to \"${formatScaleType(\n          type\n        )}\".`\n      );\n  }\n\n  options.type = type; // Mutates input!\n\n  // Once the scale type is known, coerce the associated channel values and any\n  // explicitly-specified domain to the expected type.\n  switch (type) {\n    case \"diverging\":\n    case \"diverging-sqrt\":\n    case \"diverging-pow\":\n    case \"diverging-log\":\n    case \"diverging-symlog\":\n    case \"cyclical\":\n    case \"sequential\":\n    case \"linear\":\n    case \"sqrt\":\n    case \"threshold\":\n    case \"quantile\":\n    case \"pow\":\n    case \"log\":\n    case \"symlog\":\n      options = coerceType(channels, options, coerceNumbers);\n      break;\n    case \"identity\":\n      switch (registry.get(key)) {\n        case position:\n          options = coerceType(channels, options, coerceNumbers);\n          break;\n        case symbol:\n          options = coerceType(channels, options, coerceSymbols);\n          break;\n      }\n      break;\n    case \"utc\":\n    case \"time\":\n      options = coerceType(channels, options, coerceDates);\n      break;\n  }\n\n  switch (type) {\n    case \"diverging\":\n      return createScaleDiverging(key, channels, options);\n    case \"diverging-sqrt\":\n      return createScaleDivergingSqrt(key, channels, options);\n    case \"diverging-pow\":\n      return createScaleDivergingPow(key, channels, options);\n    case \"diverging-log\":\n      return createScaleDivergingLog(key, channels, options);\n    case \"diverging-symlog\":\n      return createScaleDivergingSymlog(key, channels, options);\n    case \"categorical\":\n    case \"ordinal\":\n    case ordinalImplicit:\n      return createScaleOrdinal(key, channels, options);\n    case \"cyclical\":\n    case \"sequential\":\n    case \"linear\":\n      return createScaleLinear(key, channels, options);\n    case \"sqrt\":\n      return createScaleSqrt(key, channels, options);\n    case \"threshold\":\n      return createScaleThreshold(key, channels, options);\n    case \"quantile\":\n      return createScaleQuantile(key, channels, options);\n    case \"quantize\":\n      return createScaleQuantize(key, channels, options);\n    case \"pow\":\n      return createScalePow(key, channels, options);\n    case \"log\":\n      return createScaleLog(key, channels, options);\n    case \"symlog\":\n      return createScaleSymlog(key, channels, options);\n    case \"utc\":\n      return createScaleUtc(key, channels, options);\n    case \"time\":\n      return createScaleTime(key, channels, options);\n    case \"point\":\n      return createScalePoint(key, channels, options);\n    case \"band\":\n      return createScaleBand(key, channels, options);\n    case \"identity\":\n      return registry.get(key) === position ? createScaleIdentity() : {type: \"identity\"};\n    case undefined:\n      return;\n    default:\n      throw new Error(`unknown scale type: ${type}`);\n  }\n}\n\nfunction formatScaleType(type) {\n  return typeof type === \"symbol\" ? type.description : type;\n}\n\n// A special type symbol when the x and y scales are replaced with a projection.\nconst typeProjection = {toString: () => \"projection\"};\n\nfunction inferScaleType(key, channels, {type, domain, range, scheme, pivot, projection}) {\n  // The facet scales are always band scales; this cannot be changed.\n  if (key === \"fx\" || key === \"fy\") return \"band\";\n\n  // If a projection is specified, the x- and y-scales are disabled; these\n  // channels will be projected rather than scaled. (But still check that none\n  // of the associated channels are incompatible with a projection.)\n  if ((key === \"x\" || key === \"y\") && projection != null) type = typeProjection;\n\n  // If a channel dictates a scale type, make sure that it is consistent with\n  // the user-specified scale type (if any) and all other channels. For example,\n  // barY requires x to be a band scale and disallows any other scale type.\n  for (const {type: t} of channels) {\n    if (t === undefined) continue;\n    else if (type === undefined) type = t;\n    else if (type !== t) throw new Error(`scale incompatible with channel: ${type} !== ${t}`);\n  }\n\n  // If the scale, a channel, or user specified a (consistent) type, return it.\n  if (type === typeProjection) return;\n  if (type !== undefined) return type;\n\n  // If there\u2019s no data (and no type) associated with this scale, don\u2019t create a scale.\n  if (domain === undefined && !channels.some(({value}) => value !== undefined)) return;\n\n  // Some scales have default types.\n  const kind = registry.get(key);\n  if (kind === radius) return \"sqrt\";\n  if (kind === opacity || kind === length) return \"linear\";\n  if (kind === symbol) return \"ordinal\";\n\n  // If the domain or range has more than two values, assume it\u2019s ordinal. You\n  // can still use a \u201Cpiecewise\u201D (or \u201Cpolylinear\u201D) scale, but you must set the\n  // type explicitly.\n  if ((domain || range || []).length > 2) return asOrdinalType(kind);\n\n  // Otherwise, infer the scale type from the data! Prefer the domain, if\n  // present, over channels. (The domain and channels should be consistently\n  // typed, and the domain is more explicit and typically much smaller.) We only\n  // check the first defined value for expedience and simplicity; we expect\n  // that the types are consistent.\n  if (domain !== undefined) {\n    if (isOrdinal(domain)) return asOrdinalType(kind);\n    if (isTemporal(domain)) return \"utc\";\n  } else {\n    const values = channels.map(({value}) => value).filter((value) => value !== undefined);\n    if (values.some(isOrdinal)) return asOrdinalType(kind);\n    if (values.some(isTemporal)) return \"utc\";\n  }\n\n  // For color scales, take a hint from the color scheme and pivot option.\n  if (kind === color) {\n    if (pivot != null || isDivergingScheme(scheme)) return \"diverging\";\n    if (isCategoricalScheme(scheme)) return \"categorical\";\n  }\n\n  return \"linear\";\n}\n\n// Positional scales default to a point scale instead of an ordinal scale.\nfunction asOrdinalType(kind) {\n  switch (kind) {\n    case position:\n      return \"point\";\n    case color:\n      return ordinalImplicit;\n    default:\n      return \"ordinal\";\n  }\n}\n\nexport function isTemporalScale({type}) {\n  return type === \"time\" || type === \"utc\";\n}\n\nexport function isOrdinalScale({type}) {\n  return type === \"ordinal\" || type === \"point\" || type === \"band\" || type === ordinalImplicit;\n}\n\nexport function isThresholdScale({type}) {\n  return type === \"threshold\";\n}\n\nfunction isBandScale({type}) {\n  return type === \"point\" || type === \"band\";\n}\n\nexport function isDivergingScale({type}) {\n  return /^diverging($|-)/.test(type);\n}\n\n// Certain marks have special behavior if a scale is collapsed, i.e. if the\n// domain is degenerate and represents only a single value such as [3, 3]; for\n// example, a rect will span the full extent of the chart along a collapsed\n// dimension (whereas a dot will simply be drawn in the center).\nexport function isCollapsed(scale) {\n  if (scale === undefined) return true; // treat missing scale as collapsed\n  const domain = scale.domain();\n  const value = scale(domain[0]);\n  for (let i = 1, n = domain.length; i < n; ++i) {\n    if (scale(domain[i]) - value) {\n      return false;\n    }\n  }\n  return true;\n}\n\n// Mutates channel.value!\nfunction coerceType(channels, {domain, ...options}, coerceValues) {\n  for (const c of channels) {\n    if (c.value !== undefined) {\n      c.value = coerceValues(c.value);\n    }\n  }\n  return {\n    domain: domain === undefined ? domain : coerceValues(domain),\n    ...options\n  };\n}\n\nfunction coerceSymbols(values) {\n  return map(values, maybeSymbol);\n}\n\nexport function scale(options = {}) {\n  let scale;\n  for (const key in options) {\n    if (!registry.has(key)) continue; // ignore unknown properties\n    if (!isScaleOptions(options[key])) continue; // e.g., ignore {color: \"red\"}\n    if (scale !== undefined) throw new Error(\"ambiguous scale definition; multiple scales found\");\n    scale = exposeScale(normalizeScale(key, options[key]));\n  }\n  if (scale === undefined) throw new Error(\"invalid scale definition; no scale found\");\n  return scale;\n}\n\nexport function exposeScales(scaleDescriptors) {\n  return (key) => {\n    if (!registry.has((key = `${key}`))) throw new Error(`unknown scale: ${key}`);\n    return key in scaleDescriptors ? exposeScale(scaleDescriptors[key]) : undefined;\n  };\n}\n\n// Note: axis- and legend-related properties (such as label, ticks and\n// tickFormat) are not included here as they do not affect the scale\u2019s behavior.\nfunction exposeScale({scale, type, domain, range, interpolate, interval, transform, percent, pivot}) {\n  if (type === \"identity\") return {type: \"identity\", apply: (d) => d, invert: (d) => d};\n  const unknown = scale.unknown ? scale.unknown() : undefined;\n  return {\n    type,\n    domain: slice(domain), // defensive copy\n    ...(range !== undefined && {range: slice(range)}), // defensive copy\n    ...(transform !== undefined && {transform}),\n    ...(percent && {percent}), // only exposed if truthy\n    ...(unknown !== undefined && {unknown}),\n    ...(interval !== undefined && {interval}),\n\n    // quantitative\n    ...(interpolate !== undefined && {interpolate}),\n    ...(scale.clamp && {clamp: scale.clamp()}),\n\n    // diverging (always asymmetric; we never want to apply the symmetric transform twice)\n    ...(pivot !== undefined && {pivot, symmetric: false}),\n\n    // log, diverging-log\n    ...(scale.base && {base: scale.base()}),\n\n    // pow, diverging-pow\n    ...(scale.exponent && {exponent: scale.exponent()}),\n\n    // symlog, diverging-symlog\n    ...(scale.constant && {constant: scale.constant()}),\n\n    // band, point\n    ...(scale.align && {align: scale.align(), round: scale.round()}),\n    ...(scale.padding &&\n      (scale.paddingInner\n        ? {paddingInner: scale.paddingInner(), paddingOuter: scale.paddingOuter()}\n        : {padding: scale.padding()})),\n    ...(scale.bandwidth && {bandwidth: scale.bandwidth(), step: scale.step()}),\n\n    // utilities\n    apply: (t) => scale(t),\n    ...(scale.invert && {invert: (t) => scale.invert(t)})\n  };\n}\n", "export function memoize1(compute) {\n  let cacheValue, cacheKeys;\n  return (...keys) => {\n    if (cacheKeys?.length !== keys.length || cacheKeys.some((k, i) => k !== keys[i])) {\n      cacheKeys = keys;\n      cacheValue = compute(...keys);\n    }\n    return cacheValue;\n  };\n}\n", "import {format as isoFormat} from \"isoformat\";\nimport {string} from \"./options.js\";\nimport {memoize1} from \"./memoize.js\";\n\nconst numberFormat = memoize1((locale) => {\n  return new Intl.NumberFormat(locale);\n});\n\nconst monthFormat = memoize1((locale, month) => {\n  return new Intl.DateTimeFormat(locale, {timeZone: \"UTC\", ...(month && {month})});\n});\n\nconst weekdayFormat = memoize1((locale, weekday) => {\n  return new Intl.DateTimeFormat(locale, {timeZone: \"UTC\", ...(weekday && {weekday})});\n});\n\nexport function formatNumber(locale = \"en-US\") {\n  const format = numberFormat(locale);\n  return (i) => (i != null && !isNaN(i) ? format.format(i) : undefined);\n}\n\nexport function formatMonth(locale = \"en-US\", format = \"short\") {\n  const fmt = monthFormat(locale, format);\n  return (i) => (i != null && !isNaN((i = +new Date(Date.UTC(2000, +i)))) ? fmt.format(i) : undefined);\n}\n\nexport function formatWeekday(locale = \"en-US\", format = \"short\") {\n  const fmt = weekdayFormat(locale, format);\n  return (i) => (i != null && !isNaN((i = +new Date(Date.UTC(2001, 0, +i)))) ? fmt.format(i) : undefined);\n}\n\nexport function formatIsoDate(date) {\n  return isoFormat(date, \"Invalid Date\");\n}\n\nexport function formatAuto(locale = \"en-US\") {\n  const number = formatNumber(locale);\n  return (v) => (v instanceof Date ? formatIsoDate : typeof v === \"number\" ? number : string)(v);\n}\n\n// TODO When Plot supports a top-level locale option, this should be removed\n// because it lacks context to know which locale to use; formatAuto should be\n// used instead whenever possible.\nexport const formatDefault = formatAuto();\n", "import {geoPath, group, namespaces} from \"d3\";\nimport {create} from \"./context.js\";\nimport {defined, nonempty} from \"./defined.js\";\nimport {formatDefault} from \"./format.js\";\nimport {\n  string,\n  number,\n  maybeColorChannel,\n  maybeNumberChannel,\n  maybeKeyword,\n  isNoneish,\n  isNone,\n  isRound,\n  keyof\n} from \"./options.js\";\nimport {warn} from \"./warnings.js\";\n\nexport const offset = (typeof window !== \"undefined\" ? window.devicePixelRatio > 1 : typeof it === \"undefined\") ? 0 : 0.5; // prettier-ignore\n\nlet nextClipId = 0;\n\nfunction getClipId() {\n  return `plot-clip-${++nextClipId}`;\n}\n\nexport function styles(\n  mark,\n  {\n    title,\n    href,\n    ariaLabel: variaLabel,\n    ariaDescription,\n    ariaHidden,\n    target,\n    fill,\n    fillOpacity,\n    stroke,\n    strokeWidth,\n    strokeOpacity,\n    strokeLinejoin,\n    strokeLinecap,\n    strokeMiterlimit,\n    strokeDasharray,\n    strokeDashoffset,\n    opacity,\n    mixBlendMode,\n    imageFilter,\n    paintOrder,\n    pointerEvents,\n    shapeRendering,\n    channels\n  },\n  {\n    ariaLabel: cariaLabel,\n    fill: defaultFill = \"currentColor\",\n    fillOpacity: defaultFillOpacity,\n    stroke: defaultStroke = \"none\",\n    strokeOpacity: defaultStrokeOpacity,\n    strokeWidth: defaultStrokeWidth,\n    strokeLinecap: defaultStrokeLinecap,\n    strokeLinejoin: defaultStrokeLinejoin,\n    strokeMiterlimit: defaultStrokeMiterlimit,\n    paintOrder: defaultPaintOrder\n  }\n) {\n  // Some marks don\u2019t support fill (e.g., tick and rule).\n  if (defaultFill === null) {\n    fill = null;\n    fillOpacity = null;\n  }\n\n  // Some marks don\u2019t support stroke (e.g., image).\n  if (defaultStroke === null) {\n    stroke = null;\n    strokeOpacity = null;\n  }\n\n  // Some marks default to fill with no stroke, while others default to stroke\n  // with no fill. For example, bar and area default to fill, while dot and line\n  // default to stroke. For marks that fill by default, the default fill only\n  // applies if the stroke is (constant) none; if you set a stroke, then the\n  // default fill becomes none. Similarly for marks that stroke by stroke, the\n  // default stroke only applies if the fill is (constant) none.\n  if (isNoneish(defaultFill)) {\n    if (!isNoneish(defaultStroke) && (!isNoneish(fill) || channels?.fill)) defaultStroke = \"none\";\n  } else {\n    if (isNoneish(defaultStroke) && (!isNoneish(stroke) || channels?.stroke)) defaultFill = \"none\";\n  }\n\n  const [vfill, cfill] = maybeColorChannel(fill, defaultFill);\n  const [vfillOpacity, cfillOpacity] = maybeNumberChannel(fillOpacity, defaultFillOpacity);\n  const [vstroke, cstroke] = maybeColorChannel(stroke, defaultStroke);\n  const [vstrokeOpacity, cstrokeOpacity] = maybeNumberChannel(strokeOpacity, defaultStrokeOpacity);\n  const [vopacity, copacity] = maybeNumberChannel(opacity);\n\n  // For styles that have no effect if there is no stroke, only apply the\n  // defaults if the stroke is not the constant none. (If stroke is a channel,\n  // then cstroke will be undefined, but there\u2019s still a stroke; hence we don\u2019t\n  // use isNoneish here.)\n  if (!isNone(cstroke)) {\n    if (strokeWidth === undefined) strokeWidth = defaultStrokeWidth;\n    if (strokeLinecap === undefined) strokeLinecap = defaultStrokeLinecap;\n    if (strokeLinejoin === undefined) strokeLinejoin = defaultStrokeLinejoin;\n\n    // The default stroke miterlimit need not be applied if the current stroke\n    // is the constant round; this only has effect on miter joins.\n    if (strokeMiterlimit === undefined && !isRound(strokeLinejoin)) strokeMiterlimit = defaultStrokeMiterlimit;\n\n    // The paint order only takes effect if there is both a fill and a stroke\n    // (at least if we ignore markers, which no built-in marks currently use).\n    if (!isNone(cfill) && paintOrder === undefined) paintOrder = defaultPaintOrder;\n  }\n\n  const [vstrokeWidth, cstrokeWidth] = maybeNumberChannel(strokeWidth);\n\n  // Some marks don\u2019t support fill (e.g., tick and rule).\n  if (defaultFill !== null) {\n    mark.fill = impliedString(cfill, \"currentColor\");\n    mark.fillOpacity = impliedNumber(cfillOpacity, 1);\n  }\n\n  // Some marks don\u2019t support stroke (e.g., image).\n  if (defaultStroke !== null) {\n    mark.stroke = impliedString(cstroke, \"none\");\n    mark.strokeWidth = impliedNumber(cstrokeWidth, 1);\n    mark.strokeOpacity = impliedNumber(cstrokeOpacity, 1);\n    mark.strokeLinejoin = impliedString(strokeLinejoin, \"miter\");\n    mark.strokeLinecap = impliedString(strokeLinecap, \"butt\");\n    mark.strokeMiterlimit = impliedNumber(strokeMiterlimit, 4);\n    mark.strokeDasharray = impliedString(strokeDasharray, \"none\");\n    mark.strokeDashoffset = impliedString(strokeDashoffset, \"0\");\n  }\n\n  mark.target = string(target);\n  mark.ariaLabel = string(cariaLabel);\n  mark.ariaDescription = string(ariaDescription);\n  mark.ariaHidden = string(ariaHidden);\n  mark.opacity = impliedNumber(copacity, 1);\n  mark.mixBlendMode = impliedString(mixBlendMode, \"normal\");\n  mark.imageFilter = impliedString(imageFilter, \"none\");\n  mark.paintOrder = impliedString(paintOrder, \"normal\");\n  mark.pointerEvents = impliedString(pointerEvents, \"auto\");\n  mark.shapeRendering = impliedString(shapeRendering, \"auto\");\n\n  return {\n    title: {value: title, optional: true, filter: null},\n    href: {value: href, optional: true, filter: null},\n    ariaLabel: {value: variaLabel, optional: true, filter: null},\n    fill: {value: vfill, scale: \"auto\", optional: true},\n    fillOpacity: {value: vfillOpacity, scale: \"auto\", optional: true},\n    stroke: {value: vstroke, scale: \"auto\", optional: true},\n    strokeOpacity: {value: vstrokeOpacity, scale: \"auto\", optional: true},\n    strokeWidth: {value: vstrokeWidth, optional: true},\n    opacity: {value: vopacity, scale: \"auto\", optional: true}\n  };\n}\n\n// Applies the specified titles via selection.call.\nexport function applyTitle(selection, L) {\n  if (L)\n    selection\n      .filter((i) => nonempty(L[i]))\n      .append(\"title\")\n      .call(applyText, L);\n}\n\n// Like applyTitle, but for grouped data (lines, areas).\nexport function applyTitleGroup(selection, L) {\n  if (L)\n    selection\n      .filter(([i]) => nonempty(L[i]))\n      .append(\"title\")\n      .call(applyTextGroup, L);\n}\n\nexport function applyText(selection, T) {\n  if (T) selection.text((i) => formatDefault(T[i]));\n}\n\nexport function applyTextGroup(selection, T) {\n  if (T) selection.text(([i]) => formatDefault(T[i]));\n}\n\nexport function applyChannelStyles(\n  selection,\n  {target, tip},\n  {\n    ariaLabel: AL,\n    title: T,\n    fill: F,\n    fillOpacity: FO,\n    stroke: S,\n    strokeOpacity: SO,\n    strokeWidth: SW,\n    opacity: O,\n    href: H\n  }\n) {\n  if (AL) applyAttr(selection, \"aria-label\", (i) => AL[i]);\n  if (F) applyAttr(selection, \"fill\", (i) => F[i]);\n  if (FO) applyAttr(selection, \"fill-opacity\", (i) => FO[i]);\n  if (S) applyAttr(selection, \"stroke\", (i) => S[i]);\n  if (SO) applyAttr(selection, \"stroke-opacity\", (i) => SO[i]);\n  if (SW) applyAttr(selection, \"stroke-width\", (i) => SW[i]);\n  if (O) applyAttr(selection, \"opacity\", (i) => O[i]);\n  if (H) applyHref(selection, (i) => H[i], target);\n  if (!tip) applyTitle(selection, T);\n}\n\nexport function applyGroupedChannelStyles(\n  selection,\n  {target, tip},\n  {\n    ariaLabel: AL,\n    title: T,\n    fill: F,\n    fillOpacity: FO,\n    stroke: S,\n    strokeOpacity: SO,\n    strokeWidth: SW,\n    opacity: O,\n    href: H\n  }\n) {\n  if (AL) applyAttr(selection, \"aria-label\", ([i]) => AL[i]);\n  if (F) applyAttr(selection, \"fill\", ([i]) => F[i]);\n  if (FO) applyAttr(selection, \"fill-opacity\", ([i]) => FO[i]);\n  if (S) applyAttr(selection, \"stroke\", ([i]) => S[i]);\n  if (SO) applyAttr(selection, \"stroke-opacity\", ([i]) => SO[i]);\n  if (SW) applyAttr(selection, \"stroke-width\", ([i]) => SW[i]);\n  if (O) applyAttr(selection, \"opacity\", ([i]) => O[i]);\n  if (H) applyHref(selection, ([i]) => H[i], target);\n  if (!tip) applyTitleGroup(selection, T);\n}\n\nfunction groupAesthetics(\n  {\n    ariaLabel: AL,\n    title: T,\n    fill: F,\n    fillOpacity: FO,\n    stroke: S,\n    strokeOpacity: SO,\n    strokeWidth: SW,\n    opacity: O,\n    href: H\n  },\n  {tip}\n) {\n  return [AL, tip ? undefined : T, F, FO, S, SO, SW, O, H].filter((c) => c !== undefined);\n}\n\nexport function groupZ(I, Z, z) {\n  const G = group(I, (i) => Z[i]);\n  if (z === undefined && G.size > (1 + I.length) >> 1) {\n    warn(\n      `Warning: the implicit z channel has high cardinality. This may occur when the fill or stroke channel is associated with quantitative data rather than ordinal or categorical data. You can suppress this warning by setting the z option explicitly; if this data represents a single series, set z to null.`\n    );\n  }\n  return G.values();\n}\n\nexport function* groupIndex(I, position, mark, channels) {\n  const {z} = mark;\n  const {z: Z} = channels; // group channel\n  const A = groupAesthetics(channels, mark); // aesthetic channels\n  const C = [...position, ...A]; // all channels\n\n  // Group the current index by Z (if any).\n  for (const G of Z ? groupZ(I, Z, z) : [I]) {\n    let Ag; // the A-values (aesthetics) of the current group, if any\n    let Gg; // the current group index (a subset of G, and I), if any\n    out: for (const i of G) {\n      // If any channel has an undefined value for this index, skip it.\n      for (const c of C) {\n        if (!defined(c[i])) {\n          if (Gg) Gg.push(-1);\n          continue out;\n        }\n      }\n\n      // Otherwise, if this is a new group, record the aesthetics for this\n      // group. Yield the current group and start a new one.\n      if (Ag === undefined) {\n        if (Gg) yield Gg;\n        (Ag = A.map((c) => keyof(c[i]))), (Gg = [i]);\n        continue;\n      }\n\n      // Otherwise, add the current index to the current group. Then, if any of\n      // the aesthetics don\u2019t match the current group, yield the current group\n      // and start a new group of the current index.\n      Gg.push(i);\n      for (let j = 0; j < A.length; ++j) {\n        const k = keyof(A[j][i]);\n        if (k !== Ag[j]) {\n          yield Gg;\n          (Ag = A.map((c) => keyof(c[i]))), (Gg = [i]);\n          continue out;\n        }\n      }\n    }\n\n    // Yield the current group, if any.\n    if (Gg) yield Gg;\n  }\n}\n\n// TODO Accept other types of clips (paths, urls, x, y, other marks\u2026)?\n// https://github.com/observablehq/plot/issues/181\nexport function maybeClip(clip) {\n  if (clip === true) clip = \"frame\";\n  else if (clip === false) clip = null;\n  return maybeKeyword(clip, \"clip\", [\"frame\", \"sphere\"]);\n}\n\n// Note: may mutate selection.node!\nfunction applyClip(selection, mark, dimensions, context) {\n  let clipUrl;\n  switch (mark.clip) {\n    case \"frame\": {\n      const {width, height, marginLeft, marginRight, marginTop, marginBottom} = dimensions;\n      const id = getClipId();\n      clipUrl = `url(#${id})`;\n      selection = create(\"svg:g\", context)\n        .call((g) =>\n          g\n            .append(\"svg:clipPath\")\n            .attr(\"id\", id)\n            .append(\"rect\")\n            .attr(\"x\", marginLeft)\n            .attr(\"y\", marginTop)\n            .attr(\"width\", width - marginRight - marginLeft)\n            .attr(\"height\", height - marginTop - marginBottom)\n        )\n        .each(function () {\n          this.appendChild(selection.node());\n          selection.node = () => this; // Note: mutation!\n        });\n      break;\n    }\n    case \"sphere\": {\n      const {projection} = context;\n      if (!projection) throw new Error(`the \"sphere\" clip option requires a projection`);\n      const id = getClipId();\n      clipUrl = `url(#${id})`;\n      selection\n        .append(\"clipPath\")\n        .attr(\"id\", id)\n        .append(\"path\")\n        .attr(\"d\", geoPath(projection)({type: \"Sphere\"}));\n      break;\n    }\n  }\n  // Here we\u2019re careful to apply the ARIA attributes to the outer G element when\n  // clipping is applied, and to apply the ARIA attributes before any other\n  // attributes (for readability).\n  applyAttr(selection, \"aria-label\", mark.ariaLabel);\n  applyAttr(selection, \"aria-description\", mark.ariaDescription);\n  applyAttr(selection, \"aria-hidden\", mark.ariaHidden);\n  applyAttr(selection, \"clip-path\", clipUrl);\n}\n\n// Note: may mutate selection.node!\nexport function applyIndirectStyles(selection, mark, dimensions, context) {\n  applyClip(selection, mark, dimensions, context);\n  applyAttr(selection, \"fill\", mark.fill);\n  applyAttr(selection, \"fill-opacity\", mark.fillOpacity);\n  applyAttr(selection, \"stroke\", mark.stroke);\n  applyAttr(selection, \"stroke-width\", mark.strokeWidth);\n  applyAttr(selection, \"stroke-opacity\", mark.strokeOpacity);\n  applyAttr(selection, \"stroke-linejoin\", mark.strokeLinejoin);\n  applyAttr(selection, \"stroke-linecap\", mark.strokeLinecap);\n  applyAttr(selection, \"stroke-miterlimit\", mark.strokeMiterlimit);\n  applyAttr(selection, \"stroke-dasharray\", mark.strokeDasharray);\n  applyAttr(selection, \"stroke-dashoffset\", mark.strokeDashoffset);\n  applyAttr(selection, \"shape-rendering\", mark.shapeRendering);\n  applyAttr(selection, \"filter\", mark.imageFilter);\n  applyAttr(selection, \"paint-order\", mark.paintOrder);\n  const {pointerEvents = context.pointerSticky === false ? \"none\" : undefined} = mark;\n  applyAttr(selection, \"pointer-events\", pointerEvents);\n}\n\nexport function applyDirectStyles(selection, mark) {\n  applyStyle(selection, \"mix-blend-mode\", mark.mixBlendMode);\n  applyAttr(selection, \"opacity\", mark.opacity);\n}\n\nfunction applyHref(selection, href, target) {\n  selection.each(function (i) {\n    const h = href(i);\n    if (h != null) {\n      const a = this.ownerDocument.createElementNS(namespaces.svg, \"a\");\n      a.setAttribute(\"fill\", \"inherit\");\n      a.setAttributeNS(namespaces.xlink, \"href\", h);\n      if (target != null) a.setAttribute(\"target\", target);\n      this.parentNode.insertBefore(a, this).appendChild(this);\n    }\n  });\n}\n\nexport function applyAttr(selection, name, value) {\n  if (value != null) selection.attr(name, value);\n}\n\nexport function applyStyle(selection, name, value) {\n  if (value != null) selection.style(name, value);\n}\n\nexport function applyTransform(selection, mark, {x, y}, tx = offset, ty = offset) {\n  tx += mark.dx;\n  ty += mark.dy;\n  if (x?.bandwidth) tx += x.bandwidth() / 2;\n  if (y?.bandwidth) ty += y.bandwidth() / 2;\n  if (tx || ty) selection.attr(\"transform\", `translate(${tx},${ty})`);\n}\n\nexport function impliedString(value, impliedValue) {\n  if ((value = string(value)) !== impliedValue) return value;\n}\n\nexport function impliedNumber(value, impliedValue) {\n  if ((value = number(value)) !== impliedValue) return value;\n}\n\n// https://www.w3.org/TR/CSS21/grammar.html\nconst validClassName =\n  /^-?([_a-z]|[\\240-\\377]|\\\\[0-9a-f]{1,6}(\\r\\n|[ \\t\\r\\n\\f])?|\\\\[^\\r\\n\\f0-9a-f])([_a-z0-9-]|[\\240-\\377]|\\\\[0-9a-f]{1,6}(\\r\\n|[ \\t\\r\\n\\f])?|\\\\[^\\r\\n\\f0-9a-f])*$/i;\n\nexport function maybeClassName(name) {\n  // The default should be changed whenever the default styles are changed, so\n  // as to avoid conflict when multiple versions of Plot are on the page.\n  if (name === undefined) return \"plot-d6a7b5\";\n  name = `${name}`;\n  if (!validClassName.test(name)) throw new Error(`invalid class name: ${name}`);\n  return name;\n}\n\nexport function applyInlineStyles(selection, style) {\n  if (typeof style === \"string\") {\n    selection.property(\"style\", style);\n  } else if (style != null) {\n    for (const element of selection) {\n      Object.assign(element.style, style);\n    }\n  }\n}\n\nexport function applyFrameAnchor({frameAnchor}, {width, height, marginTop, marginRight, marginBottom, marginLeft}) {\n  return [\n    /left$/.test(frameAnchor)\n      ? marginLeft\n      : /right$/.test(frameAnchor)\n      ? width - marginRight\n      : (marginLeft + width - marginRight) / 2,\n    /^top/.test(frameAnchor)\n      ? marginTop\n      : /^bottom/.test(frameAnchor)\n      ? height - marginBottom\n      : (marginTop + height - marginBottom) / 2\n  ];\n}\n", "import {extent} from \"d3\";\nimport {projectionAspectRatio} from \"./projection.js\";\nimport {isOrdinalScale} from \"./scales.js\";\nimport {offset} from \"./style.js\";\n\nexport function createDimensions(scales, marks, options = {}) {\n  // Compute the default margins: the maximum of the marks\u2019 margins. While not\n  // always used, they may be needed to compute the default height of the plot.\n  let marginTopDefault = 0.5 - offset,\n    marginRightDefault = 0.5 + offset,\n    marginBottomDefault = 0.5 + offset,\n    marginLeftDefault = 0.5 - offset;\n\n  for (const {marginTop, marginRight, marginBottom, marginLeft} of marks) {\n    if (marginTop > marginTopDefault) marginTopDefault = marginTop;\n    if (marginRight > marginRightDefault) marginRightDefault = marginRight;\n    if (marginBottom > marginBottomDefault) marginBottomDefault = marginBottom;\n    if (marginLeft > marginLeftDefault) marginLeftDefault = marginLeft;\n  }\n\n  // Compute the actual margins. The order of precedence is: the side-specific\n  // margin options, then the global margin option, then the defaults.\n  let {\n    margin,\n    marginTop = margin !== undefined ? margin : marginTopDefault,\n    marginRight = margin !== undefined ? margin : marginRightDefault,\n    marginBottom = margin !== undefined ? margin : marginBottomDefault,\n    marginLeft = margin !== undefined ? margin : marginLeftDefault\n  } = options;\n\n  // Coerce the margin options to numbers.\n  marginTop = +marginTop;\n  marginRight = +marginRight;\n  marginBottom = +marginBottom;\n  marginLeft = +marginLeft;\n\n  // Compute the outer dimensions of the plot. If the top and bottom margins are\n  // specified explicitly, adjust the automatic height accordingly.\n  let {\n    width = 640,\n    height = autoHeight(scales, options, {\n      width,\n      marginTopDefault,\n      marginRightDefault,\n      marginBottomDefault,\n      marginLeftDefault\n    }) + Math.max(0, marginTop - marginTopDefault + marginBottom - marginBottomDefault)\n  } = options;\n\n  // Coerce the width and height.\n  width = +width;\n  height = +height;\n\n  const dimensions = {\n    width,\n    height,\n    marginTop,\n    marginRight,\n    marginBottom,\n    marginLeft\n  };\n\n  // Compute the facet margins.\n  if (scales.fx || scales.fy) {\n    let {\n      margin: facetMargin,\n      marginTop: facetMarginTop = facetMargin !== undefined ? facetMargin : marginTop,\n      marginRight: facetMarginRight = facetMargin !== undefined ? facetMargin : marginRight,\n      marginBottom: facetMarginBottom = facetMargin !== undefined ? facetMargin : marginBottom,\n      marginLeft: facetMarginLeft = facetMargin !== undefined ? facetMargin : marginLeft\n    } = options.facet ?? {};\n\n    // Coerce the facet margin options to numbers.\n    facetMarginTop = +facetMarginTop;\n    facetMarginRight = +facetMarginRight;\n    facetMarginBottom = +facetMarginBottom;\n    facetMarginLeft = +facetMarginLeft;\n\n    dimensions.facet = {\n      marginTop: facetMarginTop,\n      marginRight: facetMarginRight,\n      marginBottom: facetMarginBottom,\n      marginLeft: facetMarginLeft\n    };\n  }\n\n  return dimensions;\n}\n\nfunction autoHeight(\n  {x, y, fy, fx},\n  {projection, aspectRatio},\n  {width, marginTopDefault, marginRightDefault, marginBottomDefault, marginLeftDefault}\n) {\n  const nfy = fy ? fy.scale.domain().length : 1;\n\n  // If a projection is specified, use its natural aspect ratio (if known).\n  const ar = projectionAspectRatio(projection);\n  if (ar) {\n    const nfx = fx ? fx.scale.domain().length : 1;\n    const far = ((1.1 * nfy - 0.1) / (1.1 * nfx - 0.1)) * ar; // 0.1 is default facet padding\n    const lar = Math.max(0.1, Math.min(10, far)); // clamp the aspect ratio to a \u201Creasonable\u201D value\n    return Math.round((width - marginLeftDefault - marginRightDefault) * lar + marginTopDefault + marginBottomDefault);\n  }\n\n  const ny = y ? (isOrdinalScale(y) ? y.scale.domain().length : Math.max(7, 17 / nfy)) : 1;\n\n  // If a desired aspect ratio is given, compute a default height to match.\n  if (aspectRatio != null) {\n    aspectRatio = +aspectRatio;\n    if (!(isFinite(aspectRatio) && aspectRatio > 0)) throw new Error(`invalid aspectRatio: ${aspectRatio}`);\n    const ratio = aspectRatioLength(\"y\", y) / (aspectRatioLength(\"x\", x) * aspectRatio);\n    const fxb = fx ? fx.scale.bandwidth() : 1;\n    const fyb = fy ? fy.scale.bandwidth() : 1;\n    const w = fxb * (width - marginLeftDefault - marginRightDefault) - x.insetLeft - x.insetRight;\n    return (ratio * w + y.insetTop + y.insetBottom) / fyb + marginTopDefault + marginBottomDefault;\n  }\n\n  return !!(y || fy) * Math.max(1, Math.min(60, ny * nfy)) * 20 + !!fx * 30 + 60;\n}\n\nfunction aspectRatioLength(k, scale) {\n  if (!scale) throw new Error(`aspectRatio requires ${k} scale`);\n  const {type, domain} = scale;\n  let transform;\n  switch (type) {\n    case \"linear\":\n    case \"utc\":\n    case \"time\":\n      transform = Number;\n      break;\n    case \"pow\": {\n      const exponent = scale.scale.exponent();\n      transform = (x) => Math.pow(x, exponent);\n      break;\n    }\n    case \"log\":\n      transform = Math.log;\n      break;\n    case \"point\":\n    case \"band\":\n      return domain.length;\n    default:\n      throw new Error(`unsupported ${k} scale for aspectRatio: ${type}`);\n  }\n  const [min, max] = extent(domain);\n  return Math.abs(transform(max) - transform(min));\n}\n", "import {InternMap, cross, rollup, sum} from \"d3\";\nimport {keyof, map, range} from \"./options.js\";\nimport {createScales} from \"./scales.js\";\n\n// Returns an array of {x?, y?, i} objects representing the facet domain.\nexport function createFacets(channelsByScale, options) {\n  const {fx, fy} = createScales(channelsByScale, options);\n  const fxDomain = fx?.scale.domain();\n  const fyDomain = fy?.scale.domain();\n  return fxDomain && fyDomain\n    ? cross(fxDomain, fyDomain).map(([x, y], i) => ({x, y, i}))\n    : fxDomain\n    ? fxDomain.map((x, i) => ({x, i}))\n    : fyDomain\n    ? fyDomain.map((y, i) => ({y, i}))\n    : undefined;\n}\n\nexport function recreateFacets(facets, {x: X, y: Y}) {\n  X &&= facetIndex(X);\n  Y &&= facetIndex(Y);\n  return facets\n    .filter(\n      X && Y // remove any facets no longer present in the domain\n        ? (f) => X.has(f.x) && Y.has(f.y)\n        : X\n        ? (f) => X.has(f.x)\n        : (f) => Y.has(f.y)\n    )\n    .sort(\n      X && Y // reorder facets to match the new scale domains\n        ? (a, b) => X.get(a.x) - X.get(b.x) || Y.get(a.y) - Y.get(b.y)\n        : X\n        ? (a, b) => X.get(a.x) - X.get(b.x)\n        : (a, b) => Y.get(a.y) - Y.get(b.y)\n    );\n}\n\n// Returns a (possibly nested) Map of [[key1, index1], [key2, index2], \u2026]\n// representing the data indexes associated with each facet.\nexport function facetGroups(data, {fx, fy}) {\n  const I = range(data);\n  const FX = fx?.value;\n  const FY = fy?.value;\n  return fx && fy\n    ? rollup(\n        I,\n        (G) => ((G.fx = FX[G[0]]), (G.fy = FY[G[0]]), G),\n        (i) => FX[i],\n        (i) => FY[i]\n      )\n    : fx\n    ? rollup(\n        I,\n        (G) => ((G.fx = FX[G[0]]), G),\n        (i) => FX[i]\n      )\n    : rollup(\n        I,\n        (G) => ((G.fy = FY[G[0]]), G),\n        (i) => FY[i]\n      );\n}\n\nexport function facetTranslator(fx, fy, {marginTop, marginLeft}) {\n  return fx && fy\n    ? ({x, y}) => `translate(${fx(x) - marginLeft},${fy(y) - marginTop})`\n    : fx\n    ? ({x}) => `translate(${fx(x) - marginLeft},0)`\n    : ({y}) => `translate(0,${fy(y) - marginTop})`;\n}\n\n// Returns an index that for each facet lists all the elements present in other\n// facets in the original index. TODO Memoize to avoid repeated work?\nexport function facetExclude(index) {\n  const ex = [];\n  const e = new Uint32Array(sum(index, (d) => d.length));\n  for (const i of index) {\n    let n = 0;\n    for (const j of index) {\n      if (i === j) continue;\n      e.set(j, n);\n      n += j.length;\n    }\n    ex.push(e.slice(0, n));\n  }\n  return ex;\n}\n\nconst facetAnchors = new Map([\n  [\"top\", facetAnchorTop],\n  [\"right\", facetAnchorRight],\n  [\"bottom\", facetAnchorBottom],\n  [\"left\", facetAnchorLeft],\n  [\"top-left\", and(facetAnchorTop, facetAnchorLeft)],\n  [\"top-right\", and(facetAnchorTop, facetAnchorRight)],\n  [\"bottom-left\", and(facetAnchorBottom, facetAnchorLeft)],\n  [\"bottom-right\", and(facetAnchorBottom, facetAnchorRight)],\n  [\"top-empty\", facetAnchorTopEmpty],\n  [\"right-empty\", facetAnchorRightEmpty],\n  [\"bottom-empty\", facetAnchorBottomEmpty],\n  [\"left-empty\", facetAnchorLeftEmpty],\n  [\"empty\", facetAnchorEmpty]\n]);\n\nexport function maybeFacetAnchor(facetAnchor) {\n  if (facetAnchor == null) return null;\n  const anchor = facetAnchors.get(`${facetAnchor}`.toLowerCase());\n  if (anchor) return anchor;\n  throw new Error(`invalid facet anchor: ${facetAnchor}`);\n}\n\nconst indexCache = new WeakMap();\n\nfunction facetIndex(V) {\n  let I = indexCache.get(V);\n  if (!I) indexCache.set(V, (I = new InternMap(map(V, (v, i) => [v, i]))));\n  return I;\n}\n\n// Like V.indexOf(v), but with the same semantics as InternMap.\nfunction facetIndexOf(V, v) {\n  return facetIndex(V).get(v);\n}\n\n// Like facets.find, but with the same semantics as InternMap.\nfunction facetFind(facets, x, y) {\n  x = keyof(x);\n  y = keyof(y);\n  return facets.find((f) => Object.is(keyof(f.x), x) && Object.is(keyof(f.y), y));\n}\n\nfunction facetEmpty(facets, x, y) {\n  return facetFind(facets, x, y)?.empty;\n}\n\nfunction facetAnchorTop(facets, {y: Y}, {y}) {\n  return Y ? facetIndexOf(Y, y) === 0 : true;\n}\n\nfunction facetAnchorBottom(facets, {y: Y}, {y}) {\n  return Y ? facetIndexOf(Y, y) === Y.length - 1 : true;\n}\n\nfunction facetAnchorLeft(facets, {x: X}, {x}) {\n  return X ? facetIndexOf(X, x) === 0 : true;\n}\n\nfunction facetAnchorRight(facets, {x: X}, {x}) {\n  return X ? facetIndexOf(X, x) === X.length - 1 : true;\n}\n\nfunction facetAnchorTopEmpty(facets, {y: Y}, {x, y, empty}) {\n  if (empty) return false;\n  if (!Y) return;\n  const i = facetIndexOf(Y, y);\n  if (i > 0) return facetEmpty(facets, x, Y[i - 1]);\n}\n\nfunction facetAnchorBottomEmpty(facets, {y: Y}, {x, y, empty}) {\n  if (empty) return false;\n  if (!Y) return;\n  const i = facetIndexOf(Y, y);\n  if (i < Y.length - 1) return facetEmpty(facets, x, Y[i + 1]);\n}\n\nfunction facetAnchorLeftEmpty(facets, {x: X}, {x, y, empty}) {\n  if (empty) return false;\n  if (!X) return;\n  const i = facetIndexOf(X, x);\n  if (i > 0) return facetEmpty(facets, X[i - 1], y);\n}\n\nfunction facetAnchorRightEmpty(facets, {x: X}, {x, y, empty}) {\n  if (empty) return false;\n  if (!X) return;\n  const i = facetIndexOf(X, x);\n  if (i < X.length - 1) return facetEmpty(facets, X[i + 1], y);\n}\n\nfunction facetAnchorEmpty(facets, channels, {empty}) {\n  return empty;\n}\n\nfunction and(a, b) {\n  return function () {\n    return a.apply(null, arguments) && b.apply(null, arguments);\n  };\n}\n\n// Facet filter, by mark; for now only the \"eq\" filter is provided.\nexport function facetFilter(facets, {channels: {fx, fy}, groups}) {\n  return fx && fy\n    ? facets.map(({x, y}) => groups.get(x)?.get(y) ?? [])\n    : fx\n    ? facets.map(({x}) => groups.get(x) ?? [])\n    : facets.map(({y}) => groups.get(y) ?? []);\n}\n", "import {channelDomain, createChannels, valueObject} from \"./channel.js\";\nimport {defined} from \"./defined.js\";\nimport {maybeFacetAnchor} from \"./facet.js\";\nimport {maybeKeyword, maybeNamed, maybeValue} from \"./options.js\";\nimport {arrayify, isDomainSort, isOptions, keyword, range, singleton} from \"./options.js\";\nimport {project} from \"./projection.js\";\nimport {maybeClip, styles} from \"./style.js\";\nimport {basic, initializer} from \"./transforms/basic.js\";\n\nexport class Mark {\n  constructor(data, channels = {}, options = {}, defaults) {\n    const {\n      facet = \"auto\",\n      facetAnchor,\n      fx,\n      fy,\n      sort,\n      dx = 0,\n      dy = 0,\n      margin = 0,\n      marginTop = margin,\n      marginRight = margin,\n      marginBottom = margin,\n      marginLeft = margin,\n      clip,\n      channels: extraChannels,\n      tip,\n      render\n    } = options;\n    this.data = data;\n    this.sort = isDomainSort(sort) ? sort : null;\n    this.initializer = initializer(options).initializer;\n    this.transform = this.initializer ? options.transform : basic(options).transform;\n    if (facet === null || facet === false) {\n      this.facet = null;\n    } else {\n      this.facet = keyword(facet === true ? \"include\" : facet, \"facet\", [\"auto\", \"include\", \"exclude\", \"super\"]);\n      this.fx = data === singleton && typeof fx === \"string\" ? [fx] : fx;\n      this.fy = data === singleton && typeof fy === \"string\" ? [fy] : fy;\n    }\n    this.facetAnchor = maybeFacetAnchor(facetAnchor);\n    channels = maybeNamed(channels);\n    if (extraChannels !== undefined) channels = {...maybeChannels(extraChannels), ...channels};\n    if (defaults !== undefined) channels = {...styles(this, options, defaults), ...channels};\n    this.channels = Object.fromEntries(\n      Object.entries(channels)\n        .map(([name, channel]) => {\n          if (isOptions(channel.value)) {\n            // apply scale overrides\n            const {value, scale = channel.scale} = channel.value;\n            channel = {...channel, scale, value};\n          }\n          if (data === singleton && typeof channel.value === \"string\") {\n            // convert field names to singleton values for decoration marks (e.g., frame)\n            const {value} = channel;\n            channel = {...channel, value: [value]};\n          }\n          return [name, channel];\n        })\n        .filter(([name, {value, optional}]) => {\n          if (value != null) return true;\n          if (optional) return false;\n          throw new Error(`missing channel value: ${name}`);\n        })\n    );\n    this.dx = +dx;\n    this.dy = +dy;\n    this.marginTop = +marginTop;\n    this.marginRight = +marginRight;\n    this.marginBottom = +marginBottom;\n    this.marginLeft = +marginLeft;\n    this.clip = maybeClip(clip);\n    this.tip = maybeTip(tip);\n    // Super-faceting currently disallow position channels; in the future, we\n    // could allow position to be specified in fx and fy in addition to (or\n    // instead of) x and y.\n    if (this.facet === \"super\") {\n      if (fx || fy) throw new Error(`super-faceting cannot use fx or fy`);\n      for (const name in this.channels) {\n        const {scale} = channels[name];\n        if (scale !== \"x\" && scale !== \"y\") continue;\n        throw new Error(`super-faceting cannot use x or y`);\n      }\n    }\n    if (render != null) {\n      this.render = composeRender(render, this.render);\n    }\n  }\n  initialize(facets, facetChannels, plotOptions) {\n    let data = arrayify(this.data);\n    if (facets === undefined && data != null) facets = [range(data)];\n    const originalFacets = facets;\n    if (this.transform != null) ({facets, data} = this.transform(data, facets, plotOptions)), (data = arrayify(data));\n    if (facets !== undefined) facets.original = originalFacets; // needed to read facetChannels\n    const channels = createChannels(this.channels, data);\n    if (this.sort != null) channelDomain(data, facets, channels, facetChannels, this.sort); // mutates facetChannels!\n    return {data, facets, channels};\n  }\n  filter(index, channels, values) {\n    for (const name in channels) {\n      const {filter = defined} = channels[name];\n      if (filter !== null) {\n        const value = values[name];\n        index = index.filter((i) => filter(value[i]));\n      }\n    }\n    return index;\n  }\n  // If there is a projection, and there are paired x and y channels associated\n  // with the x and y scale respectively (and not already in screen coordinates\n  // as with an initializer), then apply the projection, replacing the x and y\n  // values. Note that the x and y scales themselves don\u2019t exist if there is a\n  // projection, but whether the channels are associated with scales still\n  // determines whether the projection should apply; think of the projection as\n  // a combination xy-scale.\n  project(channels, values, context) {\n    for (const cx in channels) {\n      if (channels[cx].scale === \"x\" && /^x|x$/.test(cx)) {\n        const cy = cx.replace(/^x|x$/, \"y\");\n        if (cy in channels && channels[cy].scale === \"y\") {\n          project(cx, cy, values, context.projection);\n        }\n      }\n    }\n  }\n  scale(channels, scales, context) {\n    const values = valueObject(channels, scales);\n    if (context.projection) this.project(channels, values, context);\n    return values;\n  }\n}\n\nexport function marks(...marks) {\n  marks.plot = Mark.prototype.plot; // Note: depends on side-effect in plot!\n  return marks;\n}\n\nexport function composeRender(r1, r2) {\n  if (r1 == null) return r2 === null ? undefined : r2;\n  if (r2 == null) return r1 === null ? undefined : r1;\n  if (typeof r1 !== \"function\") throw new TypeError(`invalid render transform: ${r1}`);\n  if (typeof r2 !== \"function\") throw new TypeError(`invalid render transform: ${r2}`);\n  return function (i, s, v, d, c, next) {\n    return r1.call(this, i, s, v, d, c, (i, s, v, d, c) => {\n      return r2.call(this, i, s, v, d, c, next); // preserve this\n    });\n  };\n}\n\nfunction maybeChannels(channels) {\n  return Object.fromEntries(\n    Object.entries(maybeNamed(channels)).map(([name, channel]) => {\n      channel = maybeValue(channel);\n      if (channel.filter === undefined && channel.scale == null) channel = {...channel, filter: null};\n      return [name, channel];\n    })\n  );\n}\n\nfunction maybeTip(tip) {\n  return tip === true ? \"xy\" : tip === false ? null : maybeKeyword(tip, \"tip\", [\"x\", \"y\", \"xy\"]);\n}\n\nexport function withTip(options, tip) {\n  return options?.tip === true ? {...options, tip} : options;\n}\n", "import {pointer as pointof} from \"d3\";\nimport {composeRender} from \"../mark.js\";\nimport {applyFrameAnchor} from \"../style.js\";\n\nconst states = new WeakMap();\n\nfunction pointerK(kx, ky, {x, y, px, py, maxRadius = 40, channels, render, ...options} = {}) {\n  maxRadius = +maxRadius;\n  // When px or py is used, register an extra channel that the pointer\n  // interaction can use to control which point is focused; this allows pointing\n  // to function independently of where the downstream mark (e.g., a tip) is\n  // displayed. Also default x or y to null to disable maybeTuple etc.\n  if (px != null) (x ??= null), (channels = {...channels, px: {value: px, scale: \"x\"}});\n  if (py != null) (y ??= null), (channels = {...channels, py: {value: py, scale: \"y\"}});\n  return {\n    x,\n    y,\n    channels,\n    ...options,\n    // Unlike other composed transforms, the render transform must be the\n    // outermost render function because it will re-render dynamically in\n    // response to pointer events.\n    render: composeRender(function (index, scales, values, dimensions, context, next) {\n      context = {...context, pointerSticky: false};\n      const svg = context.ownerSVGElement;\n      const {data} = context.getMarkState(this);\n\n      // Isolate state per-pointer, per-plot; if the pointer is reused by\n      // multiple marks, they will share the same state (e.g., sticky modality).\n      let state = states.get(svg);\n      if (!state) states.set(svg, (state = {sticky: false, roots: [], renders: []}));\n\n      // This serves as a unique identifier of the rendered mark per-plot; it is\n      // used to record the currently-rendered elements (state.roots) so that we\n      // can tell when a rendered element is clicked on.\n      let renderIndex = state.renders.push(render) - 1;\n\n      // For faceting, we want to compute the local coordinates of each point,\n      // which means subtracting out the facet translation, if any. (It\u2019s\n      // tempting to do this using the local coordinates in SVG, but that\u2019s\n      // complicated by mark-specific transforms such as dx and dy.) Also, since\n      // band scales return the upper bound of the band, we have to offset by\n      // half the bandwidth.\n      const {x, y, fx, fy} = scales;\n      let tx = fx ? fx(index.fx) - dimensions.marginLeft : 0;\n      let ty = fy ? fy(index.fy) - dimensions.marginTop : 0;\n      if (x?.bandwidth) tx += x.bandwidth() / 2;\n      if (y?.bandwidth) ty += y.bandwidth() / 2;\n\n      // For faceting, we also need to record the closest point per facet per\n      // mark (!), since each facet has its own pointer event listeners; we only\n      // want the closest point across facets to be visible.\n      const faceted = index.fi != null;\n      let facetState;\n      if (faceted) {\n        let facetStates = state.facetStates;\n        if (!facetStates) state.facetStates = facetStates = new Map();\n        facetState = facetStates.get(this);\n        if (!facetState) facetStates.set(this, (facetState = new Map()));\n      }\n\n      // The order of precedence for the pointer position is: px & py; the\n      // middle of x1 & y1 and x2 & y2; or x1 & y1 (e.g., area); or lastly x &\n      // y. If a dimension is unspecified, the frame anchor is used.\n      const [cx, cy] = applyFrameAnchor(this, dimensions);\n      const {px: PX, py: PY} = values;\n      const px = PX ? (i) => PX[i] : anchorX(values, cx);\n      const py = PY ? (i) => PY[i] : anchorY(values, cy);\n\n      let i; // currently focused index\n      let g; // currently rendered mark\n      let s; // currently rendered stickiness\n      let f; // current animation frame\n\n      // When faceting, if more than one pointer would be visible, only show\n      // this one if it is the closest. We defer rendering using an animation\n      // frame to allow all pointer events to be received before deciding which\n      // mark to render; although when hiding, we render immediately.\n      function update(ii, ri) {\n        if (faceted) {\n          if (f) f = cancelAnimationFrame(f);\n          if (ii == null) facetState.delete(index.fi);\n          else {\n            facetState.set(index.fi, ri);\n            f = requestAnimationFrame(() => {\n              f = null;\n              for (const r of facetState.values()) {\n                if (r < ri) {\n                  ii = null;\n                  break;\n                }\n              }\n              render(ii);\n            });\n            return;\n          }\n        }\n        render(ii);\n      }\n\n      function render(ii) {\n        if (i === ii && s === state.sticky) return; // the tooltip hasn\u2019t moved\n        i = ii;\n        s = context.pointerSticky = state.sticky;\n        const I = i == null ? [] : [i];\n        if (faceted) (I.fx = index.fx), (I.fy = index.fy), (I.fi = index.fi);\n        const r = next(I, scales, values, dimensions, context);\n        if (g) {\n          // When faceting, preserve swapped mark and facet transforms; also\n          // remove ARIA attributes since these are promoted to the parent. This\n          // is perhaps brittle in that it depends on how Plot renders facets,\n          // but it produces a cleaner and more accessible SVG structure.\n          if (faceted) {\n            const p = g.parentNode;\n            const ft = g.getAttribute(\"transform\");\n            const mt = r.getAttribute(\"transform\");\n            ft ? r.setAttribute(\"transform\", ft) : r.removeAttribute(\"transform\");\n            mt ? p.setAttribute(\"transform\", mt) : p.removeAttribute(\"transform\");\n            r.removeAttribute(\"aria-label\");\n            r.removeAttribute(\"aria-description\");\n            r.removeAttribute(\"aria-hidden\");\n          }\n          g.replaceWith(r);\n        }\n        state.roots[renderIndex] = g = r;\n        context.dispatchValue(i == null ? null : data[i]);\n        return r;\n      }\n\n      function pointermove(event) {\n        if (state.sticky || (event.pointerType === \"mouse\" && event.buttons === 1)) return; // dragging\n        let [xp, yp] = pointof(event);\n        (xp -= tx), (yp -= ty); // correct for facets and band scales\n        let ii = null;\n        let ri = maxRadius * maxRadius;\n        for (const j of index) {\n          const dx = kx * (px(j) - xp);\n          const dy = ky * (py(j) - yp);\n          const rj = dx * dx + dy * dy;\n          if (rj <= ri) (ii = j), (ri = rj);\n        }\n        update(ii, ri);\n      }\n\n      function pointerdown(event) {\n        if (event.pointerType !== \"mouse\") return;\n        if (i == null) return; // not pointing\n        if (state.sticky && state.roots.some((r) => r?.contains(event.target))) return; // stay sticky\n        if (state.sticky) (state.sticky = false), state.renders.forEach((r) => r(null)); // clear all pointers\n        else (state.sticky = true), render(i);\n        event.stopImmediatePropagation(); // suppress other pointers\n      }\n\n      function pointerleave(event) {\n        if (event.pointerType !== \"mouse\") return;\n        if (!state.sticky) update(null);\n      }\n\n      // We listen to the svg element; listening to the window instead would let\n      // us receive pointer events from farther away, but would also make it\n      // hard to know when to remove the listeners. (Using a mutation observer\n      // to watch the entire document is likely too expensive.)\n      svg.addEventListener(\"pointerenter\", pointermove);\n      svg.addEventListener(\"pointermove\", pointermove);\n      svg.addEventListener(\"pointerdown\", pointerdown);\n      svg.addEventListener(\"pointerleave\", pointerleave);\n\n      return render(null);\n    }, render)\n  };\n}\n\nexport function pointer(options) {\n  return pointerK(1, 1, options);\n}\n\nexport function pointerX(options) {\n  return pointerK(1, 0.01, options);\n}\n\nexport function pointerY(options) {\n  return pointerK(0.01, 1, options);\n}\n\nexport function anchorX({x1: X1, x2: X2, x: X = X1}, cx) {\n  return X1 && X2 ? (i) => (X1[i] + X2[i]) / 2 : X ? (i) => X[i] : () => cx;\n}\n\nexport function anchorY({y1: Y1, y2: Y2, y: Y = Y1}, cy) {\n  return Y1 && Y2 ? (i) => (Y1[i] + Y2[i]) / 2 : Y ? (i) => Y[i] : () => cy;\n}\n", "import {isOrdinalScale} from \"./scales.js\";\n\nexport function inferFontVariant(scale) {\n  return isOrdinalScale(scale) && scale.interval === undefined ? undefined : \"tabular-nums\";\n}\n", "import {quantize, interpolateNumber, piecewise, format, scaleBand, scaleLinear, axisBottom} from \"d3\";\nimport {inferFontVariant} from \"../axes.js\";\nimport {createContext, create} from \"../context.js\";\nimport {map, maybeNumberChannel} from \"../options.js\";\nimport {interpolatePiecewise} from \"../scales/quantitative.js\";\nimport {applyInlineStyles, impliedString, maybeClassName} from \"../style.js\";\n\nexport function legendRamp(color, options) {\n  let {\n    label = color.label,\n    tickSize = 6,\n    width = 240,\n    height = 44 + tickSize,\n    marginTop = 18,\n    marginRight = 0,\n    marginBottom = 16 + tickSize,\n    marginLeft = 0,\n    style,\n    ticks = (width - marginLeft - marginRight) / 64,\n    tickFormat,\n    fontVariant = inferFontVariant(color),\n    round = true,\n    opacity,\n    className\n  } = options;\n  const context = createContext(options);\n  className = maybeClassName(className);\n  opacity = maybeNumberChannel(opacity)[1];\n  if (tickFormat === null) tickFormat = () => null;\n\n  const svg = create(\"svg\", context)\n    .attr(\"class\", `${className}-ramp`)\n    .attr(\"font-family\", \"system-ui, sans-serif\")\n    .attr(\"font-size\", 10)\n    .attr(\"width\", width)\n    .attr(\"height\", height)\n    .attr(\"viewBox\", `0 0 ${width} ${height}`)\n    .call((svg) =>\n      // Warning: if you edit this, change defaultClassName.\n      svg.append(\"style\").text(\n        `.${className}-ramp {\n  display: block;\n  background: white;\n  height: auto;\n  height: intrinsic;\n  max-width: 100%;\n  overflow: visible;\n}\n.${className}-ramp text {\n  white-space: pre;\n}`\n      )\n    )\n    .call(applyInlineStyles, style);\n\n  let tickAdjust = (g) => g.selectAll(\".tick line\").attr(\"y1\", marginTop + marginBottom - height);\n\n  let x;\n\n  // Some D3 scales use scale.interpolate, some scale.interpolator, and some\n  // scale.round; this normalizes the API so it works with all scale types.\n  const applyRange = round ? (x, range) => x.rangeRound(range) : (x, range) => x.range(range);\n\n  const {type, domain, range, interpolate, scale, pivot} = color;\n\n  // Continuous\n  if (interpolate) {\n    // Often interpolate is a \u201Cfixed\u201D interpolator on the [0, 1] interval, as\n    // with a built-in color scheme, but sometimes it is a function that takes\n    // two arguments and is used in conjunction with the range.\n    const interpolator =\n      range === undefined\n        ? interpolate\n        : piecewise(interpolate.length === 1 ? interpolatePiecewise(interpolate) : interpolate, range);\n\n    // Construct a D3 scale of the same type, but with a range that evenly\n    // divides the horizontal extent of the legend. (In the common case, the\n    // domain.length is two, and so the range is simply the extent.) For a\n    // diverging scale, we need an extra point in the range for the pivot such\n    // that the pivot is always drawn in the middle.\n    x = applyRange(\n      scale.copy(),\n      quantize(\n        interpolateNumber(marginLeft, width - marginRight),\n        Math.min(domain.length + (pivot !== undefined), range === undefined ? Infinity : range.length)\n      )\n    );\n\n    // Construct a 256\u00D71 canvas, filling each pixel using the interpolator.\n    const n = 256;\n    const canvas = context.document.createElement(\"canvas\");\n    canvas.width = n;\n    canvas.height = 1;\n    const context2 = canvas.getContext(\"2d\");\n    for (let i = 0, j = n - 1; i < n; ++i) {\n      context2.fillStyle = interpolator(i / j);\n      context2.fillRect(i, 0, 1, 1);\n    }\n\n    svg\n      .append(\"image\")\n      .attr(\"opacity\", opacity)\n      .attr(\"x\", marginLeft)\n      .attr(\"y\", marginTop)\n      .attr(\"width\", width - marginLeft - marginRight)\n      .attr(\"height\", height - marginTop - marginBottom)\n      .attr(\"preserveAspectRatio\", \"none\")\n      .attr(\"xlink:href\", canvas.toDataURL());\n  }\n\n  // Threshold\n  else if (type === \"threshold\") {\n    const thresholds = domain;\n\n    const thresholdFormat =\n      tickFormat === undefined ? (d) => d : typeof tickFormat === \"string\" ? format(tickFormat) : tickFormat;\n\n    // Construct a linear scale with evenly-spaced ticks for each of the\n    // thresholds; the domain extends one beyond the threshold extent.\n    x = applyRange(scaleLinear().domain([-1, range.length - 1]), [marginLeft, width - marginRight]);\n\n    svg\n      .append(\"g\")\n      .attr(\"fill-opacity\", opacity)\n      .selectAll()\n      .data(range)\n      .enter()\n      .append(\"rect\")\n      .attr(\"x\", (d, i) => x(i - 1))\n      .attr(\"y\", marginTop)\n      .attr(\"width\", (d, i) => x(i) - x(i - 1))\n      .attr(\"height\", height - marginTop - marginBottom)\n      .attr(\"fill\", (d) => d);\n\n    ticks = map(thresholds, (_, i) => i);\n    tickFormat = (i) => thresholdFormat(thresholds[i], i);\n  }\n\n  // Ordinal (hopefully!)\n  else {\n    x = applyRange(scaleBand().domain(domain), [marginLeft, width - marginRight]);\n\n    svg\n      .append(\"g\")\n      .attr(\"fill-opacity\", opacity)\n      .selectAll()\n      .data(domain)\n      .enter()\n      .append(\"rect\")\n      .attr(\"x\", x)\n      .attr(\"y\", marginTop)\n      .attr(\"width\", Math.max(0, x.bandwidth() - 1))\n      .attr(\"height\", height - marginTop - marginBottom)\n      .attr(\"fill\", scale);\n\n    tickAdjust = () => {};\n  }\n\n  svg\n    .append(\"g\")\n    .attr(\"transform\", `translate(0,${height - marginBottom})`)\n    .call(\n      axisBottom(x)\n        .ticks(Array.isArray(ticks) ? null : ticks, typeof tickFormat === \"string\" ? tickFormat : undefined)\n        .tickFormat(typeof tickFormat === \"function\" ? tickFormat : undefined)\n        .tickSize(tickSize)\n        .tickValues(Array.isArray(ticks) ? ticks : null)\n    )\n    .attr(\"font-size\", null)\n    .attr(\"font-family\", null)\n    .attr(\"font-variant\", impliedString(fontVariant, \"normal\"))\n    .call(tickAdjust)\n    .call((g) => g.select(\".domain\").remove());\n\n  if (label !== undefined) {\n    svg\n      .append(\"text\")\n      .attr(\"x\", marginLeft)\n      .attr(\"y\", marginTop - 6)\n      .attr(\"fill\", \"currentColor\") // TODO move to stylesheet?\n      .attr(\"font-weight\", \"bold\")\n      .text(label);\n  }\n\n  return svg.node();\n}\n", "export const radians = Math.PI / 180;\n", "import {create} from \"./context.js\";\n\nexport function markers(mark, {marker, markerStart = marker, markerMid = marker, markerEnd = marker} = {}) {\n  mark.markerStart = maybeMarker(markerStart);\n  mark.markerMid = maybeMarker(markerMid);\n  mark.markerEnd = maybeMarker(markerEnd);\n}\n\nfunction maybeMarker(marker) {\n  if (marker == null || marker === false) return null;\n  if (marker === true) return markerCircleFill;\n  if (typeof marker === \"function\") return marker;\n  switch (`${marker}`.toLowerCase()) {\n    case \"none\":\n      return null;\n    case \"arrow\":\n      return markerArrow(\"auto\");\n    case \"arrow-reverse\":\n      return markerArrow(\"auto-start-reverse\");\n    case \"dot\":\n      return markerDot;\n    case \"circle\":\n    case \"circle-fill\":\n      return markerCircleFill;\n    case \"circle-stroke\":\n      return markerCircleStroke;\n  }\n  throw new Error(`invalid marker: ${marker}`);\n}\n\nfunction markerArrow(orient) {\n  return (color, context) =>\n    create(\"svg:marker\", context)\n      .attr(\"viewBox\", \"-5 -5 10 10\")\n      .attr(\"markerWidth\", 6.67)\n      .attr(\"markerHeight\", 6.67)\n      .attr(\"orient\", orient)\n      .attr(\"fill\", \"none\")\n      .attr(\"stroke\", color)\n      .attr(\"stroke-width\", 1.5)\n      .attr(\"stroke-linecap\", \"round\")\n      .attr(\"stroke-linejoin\", \"round\")\n      .call((marker) => marker.append(\"path\").attr(\"d\", \"M-1.5,-3l3,3l-3,3\"))\n      .node();\n}\n\nfunction markerDot(color, context) {\n  return create(\"svg:marker\", context)\n    .attr(\"viewBox\", \"-5 -5 10 10\")\n    .attr(\"markerWidth\", 6.67)\n    .attr(\"markerHeight\", 6.67)\n    .attr(\"fill\", color)\n    .attr(\"stroke\", \"none\")\n    .call((marker) => marker.append(\"circle\").attr(\"r\", 2.5))\n    .node();\n}\n\nfunction markerCircleFill(color, context) {\n  return create(\"svg:marker\", context)\n    .attr(\"viewBox\", \"-5 -5 10 10\")\n    .attr(\"markerWidth\", 6.67)\n    .attr(\"markerHeight\", 6.67)\n    .attr(\"fill\", color)\n    .attr(\"stroke\", \"white\")\n    .attr(\"stroke-width\", 1.5)\n    .call((marker) => marker.append(\"circle\").attr(\"r\", 3))\n    .node();\n}\n\nfunction markerCircleStroke(color, context) {\n  return create(\"svg:marker\", context)\n    .attr(\"viewBox\", \"-5 -5 10 10\")\n    .attr(\"markerWidth\", 6.67)\n    .attr(\"markerHeight\", 6.67)\n    .attr(\"fill\", \"white\")\n    .attr(\"stroke\", color)\n    .attr(\"stroke-width\", 1.5)\n    .call((marker) => marker.append(\"circle\").attr(\"r\", 3))\n    .node();\n}\n\nlet nextMarkerId = 0;\n\nexport function applyMarkers(path, mark, {stroke: S}, context) {\n  return applyMarkersColor(path, mark, S && ((i) => S[i]), context);\n}\n\nexport function applyGroupedMarkers(path, mark, {stroke: S}, context) {\n  return applyMarkersColor(path, mark, S && (([i]) => S[i]), context);\n}\n\nfunction applyMarkersColor(path, {markerStart, markerMid, markerEnd, stroke}, strokeof = () => stroke, context) {\n  const iriByMarkerColor = new Map();\n\n  function applyMarker(marker) {\n    return function (i) {\n      const color = strokeof(i);\n      let iriByColor = iriByMarkerColor.get(marker);\n      if (!iriByColor) iriByMarkerColor.set(marker, (iriByColor = new Map()));\n      let iri = iriByColor.get(color);\n      if (!iri) {\n        const node = this.parentNode.insertBefore(marker(color, context), this);\n        const id = `plot-marker-${++nextMarkerId}`;\n        node.setAttribute(\"id\", id);\n        iriByColor.set(color, (iri = `url(#${id})`));\n      }\n      return iri;\n    };\n  }\n\n  if (markerStart) path.attr(\"marker-start\", applyMarker(markerStart));\n  if (markerMid) path.attr(\"marker-mid\", applyMarker(markerMid));\n  if (markerEnd) path.attr(\"marker-end\", applyMarker(markerEnd));\n}\n", "import {offset} from \"../style.js\";\n\nexport function maybeInsetX({inset, insetLeft, insetRight, ...options} = {}) {\n  [insetLeft, insetRight] = maybeInset(inset, insetLeft, insetRight);\n  return {inset, insetLeft, insetRight, ...options};\n}\n\nexport function maybeInsetY({inset, insetTop, insetBottom, ...options} = {}) {\n  [insetTop, insetBottom] = maybeInset(inset, insetTop, insetBottom);\n  return {inset, insetTop, insetBottom, ...options};\n}\n\nfunction maybeInset(inset, inset1, inset2) {\n  return inset === undefined && inset1 === undefined && inset2 === undefined\n    ? offset\n      ? [1, 0]\n      : [0.5, 0.5]\n    : [inset1, inset2];\n}\n", "import {isTemporal, labelof, map, maybeInterval, maybeValue, valueof} from \"../options.js\";\nimport {maybeInsetX, maybeInsetY} from \"./inset.js\";\n\n// The interval may be specified either as x: {value, interval} or as {x,\n// interval}. The former can be used to specify separate intervals for x and y,\n// for example with Plot.rect.\nfunction maybeIntervalValue(value, {interval}) {\n  value = {...maybeValue(value)};\n  value.interval = maybeInterval(value.interval === undefined ? interval : value.interval);\n  return value;\n}\n\nfunction maybeIntervalK(k, maybeInsetK, options, trivial) {\n  const {[k]: v, [`${k}1`]: v1, [`${k}2`]: v2} = options;\n  const {value, interval} = maybeIntervalValue(v, options);\n  if (value == null || (interval == null && !trivial)) return options;\n  const label = labelof(v);\n  if (interval == null) {\n    let V;\n    const kv = {transform: (data) => V || (V = valueof(data, value)), label};\n    return {\n      ...options,\n      [k]: undefined,\n      [`${k}1`]: v1 === undefined ? kv : v1,\n      [`${k}2`]: v2 === undefined ? kv : v2\n    };\n  }\n  let D1, V1;\n  function transform(data) {\n    if (V1 !== undefined && data === D1) return V1; // memoize\n    return (V1 = map(valueof((D1 = data), value), (v) => interval.floor(v)));\n  }\n  return maybeInsetK({\n    ...options,\n    [k]: undefined,\n    [`${k}1`]: v1 === undefined ? {transform, label} : v1,\n    [`${k}2`]: v2 === undefined ? {transform: (data) => transform(data).map((v) => interval.offset(v)), label} : v2\n  });\n}\n\nfunction maybeIntervalMidK(k, maybeInsetK, options) {\n  const {[k]: v} = options;\n  const {value, interval} = maybeIntervalValue(v, options);\n  if (value == null || interval == null) return options;\n  return maybeInsetK({\n    ...options,\n    [k]: {\n      label: labelof(v),\n      transform: (data) => {\n        const V1 = map(valueof(data, value), (v) => interval.floor(v));\n        const V2 = V1.map((v) => interval.offset(v));\n        return V1.map(\n          isTemporal(V1)\n            ? (v1, v2) =>\n                v1 == null || isNaN((v1 = +v1)) || ((v2 = V2[v2]), v2 == null) || isNaN((v2 = +v2))\n                  ? undefined\n                  : new Date((v1 + v2) / 2)\n            : (v1, v2) => (v1 == null || ((v2 = V2[v2]), v2 == null) ? NaN : (+v1 + +v2) / 2)\n        );\n      }\n    }\n  });\n}\n\nexport function maybeTrivialIntervalX(options = {}) {\n  return maybeIntervalK(\"x\", maybeInsetX, options, true);\n}\n\nexport function maybeTrivialIntervalY(options = {}) {\n  return maybeIntervalK(\"y\", maybeInsetY, options, true);\n}\n\nexport function maybeIntervalX(options = {}) {\n  return maybeIntervalK(\"x\", maybeInsetX, options);\n}\n\nexport function maybeIntervalY(options = {}) {\n  return maybeIntervalK(\"y\", maybeInsetY, options);\n}\n\nexport function maybeIntervalMidX(options = {}) {\n  return maybeIntervalMidK(\"x\", maybeInsetX, options);\n}\n\nexport function maybeIntervalMidY(options = {}) {\n  return maybeIntervalMidK(\"y\", maybeInsetY, options);\n}\n", "import {create} from \"../context.js\";\nimport {Mark, withTip} from \"../mark.js\";\nimport {applyMarkers, markers} from \"../marker.js\";\nimport {identity, number} from \"../options.js\";\nimport {isCollapsed} from \"../scales.js\";\nimport {applyChannelStyles, applyDirectStyles, applyIndirectStyles, applyTransform, offset} from \"../style.js\";\nimport {maybeIntervalX, maybeIntervalY} from \"../transforms/interval.js\";\n\nconst defaults = {\n  ariaLabel: \"rule\",\n  fill: null,\n  stroke: \"currentColor\"\n};\n\nexport class RuleX extends Mark {\n  constructor(data, options = {}) {\n    const {x, y1, y2, inset = 0, insetTop = inset, insetBottom = inset} = options;\n    super(\n      data,\n      {\n        x: {value: x, scale: \"x\", optional: true},\n        y1: {value: y1, scale: \"y\", optional: true},\n        y2: {value: y2, scale: \"y\", optional: true}\n      },\n      withTip(options, \"x\"),\n      defaults\n    );\n    this.insetTop = number(insetTop);\n    this.insetBottom = number(insetBottom);\n    markers(this, options);\n  }\n  render(index, scales, channels, dimensions, context) {\n    const {x, y} = scales;\n    const {x: X, y1: Y1, y2: Y2} = channels;\n    const {width, height, marginTop, marginRight, marginLeft, marginBottom} = dimensions;\n    const {insetTop, insetBottom} = this;\n    return create(\"svg:g\", context)\n      .call(applyIndirectStyles, this, dimensions, context)\n      .call(applyTransform, this, {x: X && x}, offset, 0)\n      .call((g) =>\n        g\n          .selectAll()\n          .data(index)\n          .enter()\n          .append(\"line\")\n          .call(applyDirectStyles, this)\n          .attr(\"x1\", X ? (i) => X[i] : (marginLeft + width - marginRight) / 2)\n          .attr(\"x2\", X ? (i) => X[i] : (marginLeft + width - marginRight) / 2)\n          .attr(\"y1\", Y1 && !isCollapsed(y) ? (i) => Y1[i] + insetTop : marginTop + insetTop)\n          .attr(\n            \"y2\",\n            Y2 && !isCollapsed(y)\n              ? y.bandwidth\n                ? (i) => Y2[i] + y.bandwidth() - insetBottom\n                : (i) => Y2[i] - insetBottom\n              : height - marginBottom - insetBottom\n          )\n          .call(applyChannelStyles, this, channels)\n          .call(applyMarkers, this, channels, context)\n      )\n      .node();\n  }\n}\n\nexport class RuleY extends Mark {\n  constructor(data, options = {}) {\n    const {x1, x2, y, inset = 0, insetRight = inset, insetLeft = inset} = options;\n    super(\n      data,\n      {\n        y: {value: y, scale: \"y\", optional: true},\n        x1: {value: x1, scale: \"x\", optional: true},\n        x2: {value: x2, scale: \"x\", optional: true}\n      },\n      withTip(options, \"y\"),\n      defaults\n    );\n    this.insetRight = number(insetRight);\n    this.insetLeft = number(insetLeft);\n    markers(this, options);\n  }\n  render(index, scales, channels, dimensions, context) {\n    const {x, y} = scales;\n    const {y: Y, x1: X1, x2: X2} = channels;\n    const {width, height, marginTop, marginRight, marginLeft, marginBottom} = dimensions;\n    const {insetLeft, insetRight} = this;\n    return create(\"svg:g\", context)\n      .call(applyIndirectStyles, this, dimensions, context)\n      .call(applyTransform, this, {y: Y && y}, 0, offset)\n      .call((g) =>\n        g\n          .selectAll()\n          .data(index)\n          .enter()\n          .append(\"line\")\n          .call(applyDirectStyles, this)\n          .attr(\"x1\", X1 && !isCollapsed(x) ? (i) => X1[i] + insetLeft : marginLeft + insetLeft)\n          .attr(\n            \"x2\",\n            X2 && !isCollapsed(x)\n              ? x.bandwidth\n                ? (i) => X2[i] + x.bandwidth() - insetRight\n                : (i) => X2[i] - insetRight\n              : width - marginRight - insetRight\n          )\n          .attr(\"y1\", Y ? (i) => Y[i] : (marginTop + height - marginBottom) / 2)\n          .attr(\"y2\", Y ? (i) => Y[i] : (marginTop + height - marginBottom) / 2)\n          .call(applyChannelStyles, this, channels)\n          .call(applyMarkers, this, channels, context)\n      )\n      .node();\n  }\n}\n\nexport function ruleX(data, options) {\n  let {x = identity, y, y1, y2, ...rest} = maybeIntervalY(options);\n  [y1, y2] = maybeOptionalZero(y, y1, y2);\n  return new RuleX(data, {...rest, x, y1, y2});\n}\n\nexport function ruleY(data, options) {\n  let {y = identity, x, x1, x2, ...rest} = maybeIntervalX(options);\n  [x1, x2] = maybeOptionalZero(x, x1, x2);\n  return new RuleY(data, {...rest, y, x1, x2});\n}\n\n// For marks specified either as [0, x] or [x1, x2], or nothing.\nfunction maybeOptionalZero(x, x1, x2) {\n  if (x == null) {\n    if (x1 === undefined) {\n      if (x2 !== undefined) return [0, x2];\n    } else {\n      if (x2 === undefined) return [0, x1];\n    }\n  } else if (x1 === undefined) {\n    return x2 === undefined ? [0, x] : [x, x2];\n  } else if (x2 === undefined) {\n    return [x, x1];\n  }\n  return [x1, x2];\n}\n", "export function template(strings, ...parts) {\n  let n = parts.length;\n\n  // If any of the interpolated parameters are strings rather than functions,\n  // bake them into the template to optimize performance during render.\n  for (let j = 0, copy = true; j < n; ++j) {\n    if (typeof parts[j] !== \"function\") {\n      if (copy) {\n        strings = strings.slice(); // copy before mutate\n        copy = false;\n      }\n      strings.splice(j, 2, strings[j] + parts[j] + strings[j + 1]);\n      parts.splice(j, 1);\n      --j, --n;\n    }\n  }\n\n  return (i) => {\n    let s = strings[0];\n    for (let j = 0; j < n; ++j) {\n      s += parts[j](i) + strings[j + 1];\n    }\n    return s;\n  };\n}\n", "import {namespaces} from \"d3\";\nimport {create} from \"../context.js\";\nimport {nonempty} from \"../defined.js\";\nimport {formatDefault} from \"../format.js\";\nimport {Mark} from \"../mark.js\";\nimport {\n  indexOf,\n  identity,\n  string,\n  maybeNumberChannel,\n  maybeTuple,\n  numberChannel,\n  isNumeric,\n  isTemporal,\n  keyword,\n  maybeFrameAnchor,\n  isTextual,\n  isIterable\n} from \"../options.js\";\nimport {\n  applyChannelStyles,\n  applyDirectStyles,\n  applyIndirectStyles,\n  applyAttr,\n  applyTransform,\n  impliedString,\n  applyFrameAnchor\n} from \"../style.js\";\nimport {template} from \"../template.js\";\nimport {maybeIntervalMidX, maybeIntervalMidY} from \"../transforms/interval.js\";\n\nconst defaults = {\n  ariaLabel: \"text\",\n  strokeLinejoin: \"round\",\n  strokeWidth: 3,\n  paintOrder: \"stroke\"\n};\n\nconst softHyphen = \"\\u00ad\";\n\nexport class Text extends Mark {\n  constructor(data, options = {}) {\n    const {\n      x,\n      y,\n      text = isIterable(data) && isTextual(data) ? identity : indexOf,\n      frameAnchor,\n      textAnchor = /right$/i.test(frameAnchor) ? \"end\" : /left$/i.test(frameAnchor) ? \"start\" : \"middle\",\n      lineAnchor = /^top/i.test(frameAnchor) ? \"top\" : /^bottom/i.test(frameAnchor) ? \"bottom\" : \"middle\",\n      lineHeight = 1,\n      lineWidth = Infinity,\n      textOverflow,\n      monospace,\n      fontFamily = monospace ? \"ui-monospace, monospace\" : undefined,\n      fontSize,\n      fontStyle,\n      fontVariant,\n      fontWeight,\n      rotate\n    } = options;\n    const [vrotate, crotate] = maybeNumberChannel(rotate, 0);\n    const [vfontSize, cfontSize] = maybeFontSizeChannel(fontSize);\n    super(\n      data,\n      {\n        x: {value: x, scale: \"x\", optional: true},\n        y: {value: y, scale: \"y\", optional: true},\n        fontSize: {value: vfontSize, optional: true},\n        rotate: {value: numberChannel(vrotate), optional: true},\n        text: {value: text, filter: nonempty, optional: true}\n      },\n      options,\n      defaults\n    );\n    this.rotate = crotate;\n    this.textAnchor = impliedString(textAnchor, \"middle\");\n    this.lineAnchor = keyword(lineAnchor, \"lineAnchor\", [\"top\", \"middle\", \"bottom\"]);\n    this.lineHeight = +lineHeight;\n    this.lineWidth = +lineWidth;\n    this.textOverflow = maybeTextOverflow(textOverflow);\n    this.monospace = !!monospace;\n    this.fontFamily = string(fontFamily);\n    this.fontSize = cfontSize;\n    this.fontStyle = string(fontStyle);\n    this.fontVariant = string(fontVariant);\n    this.fontWeight = string(fontWeight);\n    this.frameAnchor = maybeFrameAnchor(frameAnchor);\n    if (!(this.lineWidth >= 0)) throw new Error(`invalid lineWidth: ${lineWidth}`);\n    this.splitLines = splitter(this);\n    this.clipLine = clipper(this);\n  }\n  render(index, scales, channels, dimensions, context) {\n    const {x, y} = scales;\n    const {x: X, y: Y, rotate: R, text: T, title: TL, fontSize: FS} = channels;\n    const {rotate} = this;\n    const [cx, cy] = applyFrameAnchor(this, dimensions);\n    return create(\"svg:g\", context)\n      .call(applyIndirectStyles, this, dimensions, context)\n      .call(applyIndirectTextStyles, this, T, dimensions)\n      .call(applyTransform, this, {x: X && x, y: Y && y})\n      .call((g) =>\n        g\n          .selectAll()\n          .data(index)\n          .enter()\n          .append(\"text\")\n          .call(applyDirectStyles, this)\n          .call(applyMultilineText, this, T, TL)\n          .attr(\n            \"transform\",\n            template`translate(${X ? (i) => X[i] : cx},${Y ? (i) => Y[i] : cy})${\n              R ? (i) => ` rotate(${R[i]})` : rotate ? ` rotate(${rotate})` : ``\n            }`\n          )\n          .call(applyAttr, \"font-size\", FS && ((i) => FS[i]))\n          .call(applyChannelStyles, this, channels)\n      )\n      .node();\n  }\n}\n\nexport function maybeTextOverflow(textOverflow) {\n  return textOverflow == null\n    ? null\n    : keyword(textOverflow, \"textOverflow\", [\n        \"clip\", // shorthand for clip-end\n        \"ellipsis\", // \u2026 ellipsis-end\n        \"clip-start\",\n        \"clip-end\",\n        \"ellipsis-start\",\n        \"ellipsis-middle\",\n        \"ellipsis-end\"\n      ]).replace(/^(clip|ellipsis)$/, \"$1-end\");\n}\n\nfunction applyMultilineText(selection, mark, T, TL) {\n  if (!T) return;\n  const {lineAnchor, lineHeight, textOverflow, splitLines, clipLine} = mark;\n  selection.each(function (i) {\n    const lines = splitLines(formatDefault(T[i]) ?? \"\").map(clipLine);\n    const n = lines.length;\n    const y = lineAnchor === \"top\" ? 0.71 : lineAnchor === \"bottom\" ? 1 - n : (164 - n * 100) / 200;\n    if (n > 1) {\n      let m = 0;\n      for (let i = 0; i < n; ++i) {\n        ++m;\n        if (!lines[i]) continue;\n        const tspan = this.ownerDocument.createElementNS(namespaces.svg, \"tspan\");\n        tspan.setAttribute(\"x\", 0);\n        if (i === m - 1) tspan.setAttribute(\"y\", `${(y + i) * lineHeight}em`);\n        else tspan.setAttribute(\"dy\", `${m * lineHeight}em`);\n        tspan.textContent = lines[i];\n        this.appendChild(tspan);\n        m = 0;\n      }\n    } else {\n      if (y) this.setAttribute(\"y\", `${y * lineHeight}em`);\n      this.textContent = lines[0];\n    }\n    if (textOverflow && !TL && lines[0] !== T[i]) {\n      const title = this.ownerDocument.createElementNS(namespaces.svg, \"title\");\n      title.textContent = T[i];\n      this.appendChild(title);\n    }\n  });\n}\n\nexport function text(data, {x, y, ...options} = {}) {\n  if (options.frameAnchor === undefined) [x, y] = maybeTuple(x, y);\n  return new Text(data, {...options, x, y});\n}\n\nexport function textX(data, {x = identity, ...options} = {}) {\n  return new Text(data, maybeIntervalMidY({...options, x}));\n}\n\nexport function textY(data, {y = identity, ...options} = {}) {\n  return new Text(data, maybeIntervalMidX({...options, y}));\n}\n\nexport function applyIndirectTextStyles(selection, mark, T) {\n  applyAttr(selection, \"text-anchor\", mark.textAnchor);\n  applyAttr(selection, \"font-family\", mark.fontFamily);\n  applyAttr(selection, \"font-size\", mark.fontSize);\n  applyAttr(selection, \"font-style\", mark.fontStyle);\n  applyAttr(selection, \"font-variant\", mark.fontVariant === undefined ? inferFontVariant(T) : mark.fontVariant);\n  applyAttr(selection, \"font-weight\", mark.fontWeight);\n}\n\nfunction inferFontVariant(T) {\n  return T && (isNumeric(T) || isTemporal(T)) ? \"tabular-nums\" : undefined;\n}\n\n// https://developer.mozilla.org/en-US/docs/Web/CSS/font-size\nconst fontSizes = new Set([\n  // global keywords\n  \"inherit\",\n  \"initial\",\n  \"revert\",\n  \"unset\",\n  // absolute keywords\n  \"xx-small\",\n  \"x-small\",\n  \"small\",\n  \"medium\",\n  \"large\",\n  \"x-large\",\n  \"xx-large\",\n  \"xxx-large\",\n  // relative keywords\n  \"larger\",\n  \"smaller\"\n]);\n\n// The font size may be expressed as a constant in the following forms:\n// - number in pixels\n// - string keyword: see above\n// - string <length>: e.g., \"12px\"\n// - string <percentage>: e.g., \"80%\"\n// Anything else is assumed to be a channel definition.\nfunction maybeFontSizeChannel(fontSize) {\n  if (fontSize == null || typeof fontSize === \"number\") return [undefined, fontSize];\n  if (typeof fontSize !== \"string\") return [fontSize, undefined];\n  fontSize = fontSize.trim().toLowerCase();\n  return fontSizes.has(fontSize) || /^[+-]?\\d*\\.?\\d+(e[+-]?\\d+)?(\\w*|%)$/.test(fontSize)\n    ? [undefined, fontSize]\n    : [fontSize, undefined];\n}\n\n// This is a greedy algorithm for line wrapping. It would be better to use the\n// Knuth\u2013Plass line breaking algorithm (but that would be much more complex).\n// https://en.wikipedia.org/wiki/Line_wrap_and_word_wrap\nfunction lineWrap(input, maxWidth, widthof) {\n  const lines = [];\n  let lineStart,\n    lineEnd = 0;\n  for (const [wordStart, wordEnd, required] of lineBreaks(input)) {\n    // Record the start of a line. This isn\u2019t the same as the previous line\u2019s\n    // end because we often skip spaces between lines.\n    if (lineStart === undefined) lineStart = wordStart;\n\n    // If the current line is not empty, and if adding the current word would\n    // make the line longer than the allowed width, then break the line at the\n    // previous word end.\n    if (lineEnd > lineStart && widthof(input, lineStart, wordEnd) > maxWidth) {\n      lines.push(input.slice(lineStart, lineEnd) + (input[lineEnd - 1] === softHyphen ? \"-\" : \"\"));\n      lineStart = wordStart;\n    }\n\n    // If this is a required break (a newline), emit the line and reset.\n    if (required) {\n      lines.push(input.slice(lineStart, wordEnd));\n      lineStart = undefined;\n      continue;\n    }\n\n    // Extend the current line to include the new word.\n    lineEnd = wordEnd;\n  }\n  return lines;\n}\n\n// This is a rudimentary (and U.S.-centric) algorithm for finding opportunities\n// to break lines between words. A better and far more comprehensive approach\n// would be to use the official Unicode Line Breaking Algorithm.\n// https://unicode.org/reports/tr14/\nfunction* lineBreaks(input) {\n  let i = 0,\n    j = 0;\n  const n = input.length;\n  while (j < n) {\n    let k = 1;\n    switch (input[j]) {\n      case softHyphen:\n      case \"-\": // hyphen\n        ++j;\n        yield [i, j, false];\n        i = j;\n        break;\n      case \" \":\n        yield [i, j, false];\n        while (input[++j] === \" \"); // skip multiple spaces\n        i = j;\n        break;\n      case \"\\r\":\n        if (input[j + 1] === \"\\n\") ++k; // falls through\n      case \"\\n\":\n        yield [i, j, true];\n        j += k;\n        i = j;\n        break;\n      default:\n        ++j;\n        break;\n    }\n  }\n  yield [i, j, true];\n}\n\n// Computed as round(measureText(text).width * 10) at 10px system-ui. For\n// characters that are not represented in this map, we\u2019d ideally want to use a\n// weighted average of what we expect to see. But since we don\u2019t really know\n// what that is, using \u201Ce\u201D seems reasonable.\nconst defaultWidthMap = {\n  a: 56,\n  b: 63,\n  c: 57,\n  d: 63,\n  e: 58,\n  f: 37,\n  g: 62,\n  h: 60,\n  i: 26,\n  j: 26,\n  k: 55,\n  l: 26,\n  m: 88,\n  n: 60,\n  o: 60,\n  p: 62,\n  q: 62,\n  r: 39,\n  s: 54,\n  t: 38,\n  u: 60,\n  v: 55,\n  w: 79,\n  x: 54,\n  y: 55,\n  z: 55,\n  A: 69,\n  B: 67,\n  C: 73,\n  D: 74,\n  E: 61,\n  F: 58,\n  G: 76,\n  H: 75,\n  I: 28,\n  J: 55,\n  K: 67,\n  L: 58,\n  M: 89,\n  N: 75,\n  O: 78,\n  P: 65,\n  Q: 78,\n  R: 67,\n  S: 65,\n  T: 65,\n  U: 75,\n  V: 69,\n  W: 98,\n  X: 69,\n  Y: 67,\n  Z: 67,\n  0: 64,\n  1: 48,\n  2: 62,\n  3: 64,\n  4: 66,\n  5: 63,\n  6: 65,\n  7: 58,\n  8: 65,\n  9: 65,\n  \" \": 29,\n  \"!\": 32,\n  '\"': 49,\n  \"'\": 31,\n  \"(\": 39,\n  \")\": 39,\n  \",\": 31,\n  \"-\": 48,\n  \".\": 31,\n  \"/\": 32,\n  \":\": 31,\n  \";\": 31,\n  \"?\": 52,\n  \"\u2018\": 31,\n  \"\u2019\": 31,\n  \"\u201C\": 47,\n  \"\u201D\": 47,\n  \"\u2026\": 82\n};\n\n// This is a rudimentary (and U.S.-centric) algorithm for measuring the width of\n// a string based on a technique of Gregor Aisch; it assumes that individual\n// characters are laid out independently and does not implement the Unicode\n// grapheme cluster breaking algorithm. It does understand code points, though,\n// and so treats things like emoji as having the width of a lowercase e (and\n// should be equivalent to using for-of to iterate over code points, while also\n// being fast). TODO Optimize this by noting that we often re-measure characters\n// that were previously measured?\n// http://www.unicode.org/reports/tr29/#Grapheme_Cluster_Boundaries\n// https://exploringjs.com/impatient-js/ch_strings.html#atoms-of-text\nexport function defaultWidth(text, start = 0, end = text.length) {\n  let sum = 0;\n  for (let i = start; i < end; i = readCharacter(text, i)) {\n    sum += defaultWidthMap[text[i]] ?? (isPictographic(text, i) ? 120 : defaultWidthMap.e);\n  }\n  return sum;\n}\n\n// Even for monospaced text, we can\u2019t assume that the number of UTF-16 code\n// points (i.e., the length of a string) corresponds to the number of visible\n// characters; we still have to count graphemes. And note that pictographic\n// characters such as emojis are typically not monospaced!\nexport function monospaceWidth(text, start = 0, end = text.length) {\n  let sum = 0;\n  for (let i = start; i < end; i = readCharacter(text, i)) {\n    sum += isPictographic(text, i) ? 200 : 100;\n  }\n  return sum;\n}\n\nexport function splitter({monospace, lineWidth, textOverflow}) {\n  if (textOverflow != null || lineWidth == Infinity) return (text) => text.split(/\\r\\n?|\\n/g);\n  const widthof = monospace ? monospaceWidth : defaultWidth;\n  const maxWidth = lineWidth * 100;\n  return (text) => lineWrap(text, maxWidth, widthof);\n}\n\nexport function clipper({monospace, lineWidth, textOverflow}) {\n  if (textOverflow == null || lineWidth == Infinity) return (text) => text;\n  const widthof = monospace ? monospaceWidth : defaultWidth;\n  const maxWidth = lineWidth * 100;\n  switch (textOverflow) {\n    case \"clip-start\":\n      return (text) => clipStart(text, maxWidth, widthof, \"\");\n    case \"clip-end\":\n      return (text) => clipEnd(text, maxWidth, widthof, \"\");\n    case \"ellipsis-start\":\n      return (text) => clipStart(text, maxWidth, widthof, ellipsis);\n    case \"ellipsis-middle\":\n      return (text) => clipMiddle(text, maxWidth, widthof, ellipsis);\n    case \"ellipsis-end\":\n      return (text) => clipEnd(text, maxWidth, widthof, ellipsis);\n  }\n}\n\nexport const ellipsis = \"\u2026\";\n\n// Cuts the given text to the given width, using the specified widthof function;\n// the returned [index, error] guarantees text.slice(0, index) fits within the\n// specified width with the given error. If the text fits naturally within the\n// given width, returns [-1, 0]. If the text needs cutting, the given inset\n// specifies how much space (in the same units as width and widthof) to reserve\n// for a possible ellipsis character.\nexport function cut(text, width, widthof, inset) {\n  const I = []; // indexes of read character boundaries\n  let w = 0; // current line width\n  for (let i = 0, j = 0, n = text.length; i < n; i = j) {\n    j = readCharacter(text, i); // read the next character\n    const l = widthof(text, i, j); // current character width\n    if (w + l > width) {\n      w += inset;\n      while (w > width && i > 0) (j = i), (i = I.pop()), (w -= widthof(text, i, j)); // remove excess\n      return [i, width - w];\n    }\n    w += l;\n    I.push(i);\n  }\n  return [-1, 0];\n}\n\nexport function clipEnd(text, width, widthof, ellipsis) {\n  text = text.trim(); // ignore leading and trailing whitespace\n  const e = widthof(ellipsis);\n  const [i] = cut(text, width, widthof, e);\n  return i < 0 ? text : text.slice(0, i).trimEnd() + ellipsis;\n}\n\nexport function clipMiddle(text, width, widthof, ellipsis) {\n  text = text.trim(); // ignore leading and trailing whitespace\n  const w = widthof(text);\n  if (w <= width) return text;\n  const e = widthof(ellipsis) / 2;\n  const [i, ei] = cut(text, width / 2, widthof, e);\n  const [j] = cut(text, w - width / 2 - ei + e, widthof, -e); // TODO read spaces?\n  return j < 0 ? ellipsis : text.slice(0, i).trimEnd() + ellipsis + text.slice(readCharacter(text, j)).trimStart();\n}\n\nexport function clipStart(text, width, widthof, ellipsis) {\n  text = text.trim(); // ignore leading and trailing whitespace\n  const w = widthof(text);\n  if (w <= width) return text;\n  const e = widthof(ellipsis);\n  const [j] = cut(text, w - width + e, widthof, -e); // TODO read spaces?\n  return j < 0 ? ellipsis : ellipsis + text.slice(readCharacter(text, j)).trimStart();\n}\n\nconst reCombiner = /[\\p{Combining_Mark}\\p{Emoji_Modifier}]+/uy;\nconst rePictographic = /\\p{Extended_Pictographic}/uy;\n\n// Reads a single \u201Ccharacter\u201D element from the given text starting at the given\n// index, returning the index after the read character. Ideally, this implements\n// the Unicode text segmentation algorithm and understands grapheme cluster\n// boundaries, etc., but in practice this is only smart enough to detect UTF-16\n// surrogate pairs, combining marks, and zero-width joiner (zwj) sequences such\n// as emoji skin color modifiers. https://unicode.org/reports/tr29/\nexport function readCharacter(text, i) {\n  i += isSurrogatePair(text, i) ? 2 : 1;\n  if (isCombiner(text, i)) i = reCombiner.lastIndex;\n  if (isZeroWidthJoiner(text, i)) return readCharacter(text, i + 1);\n  return i;\n}\n\n// We avoid more expensive regex tests involving Unicode property classes by\n// first checking for the common case of 7-bit ASCII characters.\nfunction isAscii(text, i) {\n  return text.charCodeAt(i) < 0x80;\n}\n\nfunction isSurrogatePair(text, i) {\n  const hi = text.charCodeAt(i);\n  if (hi >= 0xd800 && hi < 0xdc00) {\n    const lo = text.charCodeAt(i + 1);\n    return lo >= 0xdc00 && lo < 0xe000;\n  }\n  return false;\n}\n\nfunction isZeroWidthJoiner(text, i) {\n  return text.charCodeAt(i) === 0x200d;\n}\n\nfunction isCombiner(text, i) {\n  return isAscii(text, i) ? false : ((reCombiner.lastIndex = i), reCombiner.test(text));\n}\n\nfunction isPictographic(text, i) {\n  return isAscii(text, i) ? false : ((rePictographic.lastIndex = i), rePictographic.test(text));\n}\n", "import {pathRound as path} from \"d3\";\nimport {create} from \"../context.js\";\nimport {Mark} from \"../mark.js\";\nimport {maybeFrameAnchor, maybeNumberChannel, maybeTuple, keyword, identity} from \"../options.js\";\nimport {\n  applyChannelStyles,\n  applyDirectStyles,\n  applyFrameAnchor,\n  applyIndirectStyles,\n  applyTransform\n} from \"../style.js\";\nimport {template} from \"../template.js\";\n\nconst defaults = {\n  ariaLabel: \"vector\",\n  fill: \"none\",\n  stroke: \"currentColor\",\n  strokeWidth: 1.5,\n  strokeLinejoin: \"round\",\n  strokeLinecap: \"round\"\n};\n\nconst defaultRadius = 3.5;\n\n// The size of the arrowhead is proportional to its length, but we still allow\n// the relative size of the head to be controlled via the mark\u2019s width option;\n// doubling the default radius will produce an arrowhead that is twice as big.\n// That said, we\u2019ll probably want a arrow with a fixed head size, too.\nconst wingRatio = defaultRadius * 5;\n\nconst shapeArrow = {\n  draw(context, l, r) {\n    const wing = (l * r) / wingRatio;\n    context.moveTo(0, 0);\n    context.lineTo(0, -l);\n    context.moveTo(-wing, wing - l);\n    context.lineTo(0, -l);\n    context.lineTo(wing, wing - l);\n  }\n};\n\nconst shapeSpike = {\n  draw(context, l, r) {\n    context.moveTo(-r, 0);\n    context.lineTo(0, -l);\n    context.lineTo(r, 0);\n  }\n};\n\nconst shapes = new Map([\n  [\"arrow\", shapeArrow],\n  [\"spike\", shapeSpike]\n]);\n\nfunction isShapeObject(value) {\n  return value && typeof value.draw === \"function\";\n}\n\nfunction maybeShape(shape) {\n  if (isShapeObject(shape)) return shape;\n  const value = shapes.get(`${shape}`.toLowerCase());\n  if (value) return value;\n  throw new Error(`invalid shape: ${shape}`);\n}\n\nexport class Vector extends Mark {\n  constructor(data, options = {}) {\n    const {x, y, r = defaultRadius, length, rotate, shape = shapeArrow, anchor = \"middle\", frameAnchor} = options;\n    const [vl, cl] = maybeNumberChannel(length, 12);\n    const [vr, cr] = maybeNumberChannel(rotate, 0);\n    super(\n      data,\n      {\n        x: {value: x, scale: \"x\", optional: true},\n        y: {value: y, scale: \"y\", optional: true},\n        length: {value: vl, scale: \"length\", optional: true},\n        rotate: {value: vr, optional: true}\n      },\n      options,\n      defaults\n    );\n    this.r = +r;\n    this.length = cl;\n    this.rotate = cr;\n    this.shape = maybeShape(shape);\n    this.anchor = keyword(anchor, \"anchor\", [\"start\", \"middle\", \"end\"]);\n    this.frameAnchor = maybeFrameAnchor(frameAnchor);\n  }\n  render(index, scales, channels, dimensions, context) {\n    const {x, y} = scales;\n    const {x: X, y: Y, length: L, rotate: A} = channels;\n    const {length, rotate, anchor, shape, r} = this;\n    const [cx, cy] = applyFrameAnchor(this, dimensions);\n    return create(\"svg:g\", context)\n      .call(applyIndirectStyles, this, dimensions, context)\n      .call(applyTransform, this, {x: X && x, y: Y && y})\n      .call((g) =>\n        g\n          .selectAll()\n          .data(index)\n          .enter()\n          .append(\"path\")\n          .call(applyDirectStyles, this)\n          .attr(\n            \"transform\",\n            template`translate(${X ? (i) => X[i] : cx},${Y ? (i) => Y[i] : cy})${\n              A ? (i) => ` rotate(${A[i]})` : rotate ? ` rotate(${rotate})` : ``\n            }${\n              anchor === \"start\"\n                ? ``\n                : anchor === \"end\"\n                ? L\n                  ? (i) => ` translate(0,${L[i]})`\n                  : ` translate(0,${length})`\n                : L\n                ? (i) => ` translate(0,${L[i] / 2})`\n                : ` translate(0,${length / 2})`\n            }`\n          )\n          .attr(\n            \"d\",\n            L\n              ? (i) => {\n                  const p = path();\n                  shape.draw(p, L[i], r);\n                  return p;\n                }\n              : (() => {\n                  const p = path();\n                  shape.draw(p, length, r);\n                  return p;\n                })()\n          )\n          .call(applyChannelStyles, this, channels)\n      )\n      .node();\n  }\n}\n\nexport function vector(data, options = {}) {\n  let {x, y, ...rest} = options;\n  if (options.frameAnchor === undefined) [x, y] = maybeTuple(x, y);\n  return new Vector(data, {...rest, x, y});\n}\n\nexport function vectorX(data, options = {}) {\n  const {x = identity, ...rest} = options;\n  return new Vector(data, {...rest, x});\n}\n\nexport function vectorY(data, options = {}) {\n  const {y = identity, ...rest} = options;\n  return new Vector(data, {...rest, y});\n}\n\nexport function spike(data, options = {}) {\n  const {\n    shape = shapeSpike,\n    stroke = defaults.stroke,\n    strokeWidth = 1,\n    fill = stroke,\n    fillOpacity = 0.3,\n    anchor = \"start\",\n    ...rest\n  } = options;\n  return vector(data, {...rest, shape, stroke, strokeWidth, fill, fillOpacity, anchor});\n}\n", "import {extent, format, timeFormat, utcFormat} from \"d3\";\nimport {formatDefault} from \"../format.js\";\nimport {marks} from \"../mark.js\";\nimport {radians} from \"../math.js\";\nimport {arrayify, constant, identity, keyword, number, range, valueof} from \"../options.js\";\nimport {isIterable, isNoneish, isTemporal, orderof} from \"../options.js\";\nimport {maybeColorChannel, maybeNumberChannel, maybeRangeInterval} from \"../options.js\";\nimport {isTemporalScale} from \"../scales.js\";\nimport {offset} from \"../style.js\";\nimport {formatTimeTicks, isTimeYear, isUtcYear} from \"../time.js\";\nimport {initializer} from \"../transforms/basic.js\";\nimport {ruleX, ruleY} from \"./rule.js\";\nimport {text, textX, textY} from \"./text.js\";\nimport {vectorX, vectorY} from \"./vector.js\";\n\nfunction maybeData(data, options) {\n  if (arguments.length < 2 && !isIterable(data)) (options = data), (data = null);\n  if (options === undefined) options = {};\n  return [data, options];\n}\n\nfunction maybeAnchor({anchor} = {}, anchors) {\n  return anchor === undefined ? anchors[0] : keyword(anchor, \"anchor\", anchors);\n}\n\nfunction anchorY(options) {\n  return maybeAnchor(options, [\"left\", \"right\"]);\n}\n\nfunction anchorFy(options) {\n  return maybeAnchor(options, [\"right\", \"left\"]);\n}\n\nfunction anchorX(options) {\n  return maybeAnchor(options, [\"bottom\", \"top\"]);\n}\n\nfunction anchorFx(options) {\n  return maybeAnchor(options, [\"top\", \"bottom\"]);\n}\n\nexport function axisY() {\n  const [data, options] = maybeData(...arguments);\n  return axisKy(\"y\", anchorY(options), data, options);\n}\n\nexport function axisFy() {\n  const [data, options] = maybeData(...arguments);\n  return axisKy(\"fy\", anchorFy(options), data, options);\n}\n\nexport function axisX() {\n  const [data, options] = maybeData(...arguments);\n  return axisKx(\"x\", anchorX(options), data, options);\n}\n\nexport function axisFx() {\n  const [data, options] = maybeData(...arguments);\n  return axisKx(\"fx\", anchorFx(options), data, options);\n}\n\nfunction axisKy(\n  k,\n  anchor,\n  data,\n  {\n    color = \"currentColor\",\n    opacity = 1,\n    stroke = color,\n    strokeOpacity = opacity,\n    strokeWidth = 1,\n    fill = color,\n    fillOpacity = opacity,\n    textAnchor,\n    textStroke,\n    textStrokeOpacity,\n    textStrokeWidth,\n    tickSize = k === \"y\" ? 6 : 0,\n    tickPadding,\n    tickRotate,\n    x,\n    margin,\n    marginTop = margin === undefined ? 20 : margin,\n    marginRight = margin === undefined ? (anchor === \"right\" ? 40 : 0) : margin,\n    marginBottom = margin === undefined ? 20 : margin,\n    marginLeft = margin === undefined ? (anchor === \"left\" ? 40 : 0) : margin,\n    label,\n    labelAnchor,\n    labelArrow,\n    labelOffset,\n    ...options\n  }\n) {\n  tickSize = number(tickSize);\n  tickPadding = number(tickPadding);\n  tickRotate = number(tickRotate);\n  if (labelAnchor !== undefined) labelAnchor = keyword(labelAnchor, \"labelAnchor\", [\"center\", \"top\", \"bottom\"]);\n  labelArrow = maybeLabelArrow(labelArrow);\n  return marks(\n    tickSize && !isNoneish(stroke)\n      ? axisTickKy(k, anchor, data, {\n          stroke,\n          strokeOpacity,\n          strokeWidth,\n          tickSize,\n          tickPadding,\n          tickRotate,\n          x,\n          ...options\n        })\n      : null,\n    !isNoneish(fill)\n      ? axisTextKy(k, anchor, data, {\n          fill,\n          fillOpacity,\n          stroke: textStroke,\n          strokeOpacity: textStrokeOpacity,\n          strokeWidth: textStrokeWidth,\n          textAnchor,\n          tickSize,\n          tickPadding,\n          tickRotate,\n          x,\n          marginTop,\n          marginRight,\n          marginBottom,\n          marginLeft,\n          ...options\n        })\n      : null,\n    !isNoneish(fill) && label !== null\n      ? text(\n          [],\n          labelOptions({fill, fillOpacity, ...options}, function (data, facets, channels, scales, dimensions) {\n            const scale = scales[k];\n            const {marginTop, marginRight, marginBottom, marginLeft} = (k === \"y\" && dimensions.inset) || dimensions;\n            const cla = labelAnchor ?? (scale.bandwidth ? \"center\" : \"top\");\n            const clo = labelOffset ?? (anchor === \"right\" ? marginRight : marginLeft) - 3;\n            if (cla === \"center\") {\n              this.textAnchor = undefined; // middle\n              this.lineAnchor = anchor === \"right\" ? \"bottom\" : \"top\";\n              this.frameAnchor = anchor;\n              this.rotate = -90;\n            } else {\n              this.textAnchor = anchor === \"right\" ? \"end\" : \"start\";\n              this.lineAnchor = cla;\n              this.frameAnchor = `${cla}-${anchor}`;\n              this.rotate = 0;\n            }\n            this.dy = cla === \"top\" ? 3 - marginTop : cla === \"bottom\" ? marginBottom - 3 : 0;\n            this.dx = anchor === \"right\" ? clo : -clo;\n            this.ariaLabel = `${k}-axis label`;\n            return {\n              facets: [[0]],\n              channels: {text: {value: [formatAxisLabel(k, scale, {anchor, label, labelAnchor: cla, labelArrow})]}}\n            };\n          })\n        )\n      : null\n  );\n}\n\nfunction axisKx(\n  k,\n  anchor,\n  data,\n  {\n    color = \"currentColor\",\n    opacity = 1,\n    stroke = color,\n    strokeOpacity = opacity,\n    strokeWidth = 1,\n    fill = color,\n    fillOpacity = opacity,\n    textAnchor,\n    textStroke,\n    textStrokeOpacity,\n    textStrokeWidth,\n    tickSize = k === \"x\" ? 6 : 0,\n    tickPadding,\n    tickRotate,\n    y,\n    margin,\n    marginTop = margin === undefined ? (anchor === \"top\" ? 30 : 0) : margin,\n    marginRight = margin === undefined ? 20 : margin,\n    marginBottom = margin === undefined ? (anchor === \"bottom\" ? 30 : 0) : margin,\n    marginLeft = margin === undefined ? 20 : margin,\n    label,\n    labelAnchor,\n    labelArrow,\n    labelOffset,\n    ...options\n  }\n) {\n  tickSize = number(tickSize);\n  tickPadding = number(tickPadding);\n  tickRotate = number(tickRotate);\n  if (labelAnchor !== undefined) labelAnchor = keyword(labelAnchor, \"labelAnchor\", [\"center\", \"left\", \"right\"]);\n  labelArrow = maybeLabelArrow(labelArrow);\n  return marks(\n    tickSize && !isNoneish(stroke)\n      ? axisTickKx(k, anchor, data, {\n          stroke,\n          strokeOpacity,\n          strokeWidth,\n          tickSize,\n          tickPadding,\n          tickRotate,\n          y,\n          ...options\n        })\n      : null,\n    !isNoneish(fill)\n      ? axisTextKx(k, anchor, data, {\n          fill,\n          fillOpacity,\n          stroke: textStroke,\n          strokeOpacity: textStrokeOpacity,\n          strokeWidth: textStrokeWidth,\n          textAnchor,\n          tickSize,\n          tickPadding,\n          tickRotate,\n          y,\n          marginTop,\n          marginRight,\n          marginBottom,\n          marginLeft,\n          ...options\n        })\n      : null,\n    !isNoneish(fill) && label !== null\n      ? text(\n          [],\n          labelOptions({fill, fillOpacity, ...options}, function (data, facets, channels, scales, dimensions) {\n            const scale = scales[k];\n            const {marginTop, marginRight, marginBottom, marginLeft} = (k === \"x\" && dimensions.inset) || dimensions;\n            const cla = labelAnchor ?? (scale.bandwidth ? \"center\" : \"right\");\n            const clo = labelOffset ?? (anchor === \"top\" ? marginTop : marginBottom) - 3;\n            if (cla === \"center\") {\n              this.frameAnchor = anchor;\n              this.textAnchor = undefined; // middle\n            } else {\n              this.frameAnchor = `${anchor}-${cla}`;\n              this.textAnchor = cla === \"right\" ? \"end\" : \"start\";\n            }\n            this.lineAnchor = anchor;\n            this.dy = anchor === \"top\" ? -clo : clo;\n            this.dx = cla === \"right\" ? marginRight - 3 : cla === \"left\" ? 3 - marginLeft : 0;\n            this.ariaLabel = `${k}-axis label`;\n            return {\n              facets: [[0]],\n              channels: {text: {value: [formatAxisLabel(k, scale, {anchor, label, labelAnchor: cla, labelArrow})]}}\n            };\n          })\n        )\n      : null\n  );\n}\n\nfunction axisTickKy(\n  k,\n  anchor,\n  data,\n  {\n    strokeWidth = 1,\n    strokeLinecap = null,\n    strokeLinejoin = null,\n    facetAnchor = anchor + (k === \"y\" ? \"-empty\" : \"\"),\n    frameAnchor = anchor,\n    tickSize,\n    inset = 0,\n    insetLeft = inset,\n    insetRight = inset,\n    dx = 0,\n    y = k === \"y\" ? undefined : null,\n    ...options\n  }\n) {\n  return axisMark(vectorY, k, `${k}-axis tick`, data, {\n    strokeWidth,\n    strokeLinecap,\n    strokeLinejoin,\n    facetAnchor,\n    frameAnchor,\n    y,\n    ...options,\n    dx: anchor === \"left\" ? +dx - offset + +insetLeft : +dx + offset - insetRight,\n    anchor: \"start\",\n    length: tickSize,\n    shape: anchor === \"left\" ? shapeTickLeft : shapeTickRight\n  });\n}\n\nfunction axisTickKx(\n  k,\n  anchor,\n  data,\n  {\n    strokeWidth = 1,\n    strokeLinecap = null,\n    strokeLinejoin = null,\n    facetAnchor = anchor + (k === \"x\" ? \"-empty\" : \"\"),\n    frameAnchor = anchor,\n    tickSize,\n    inset = 0,\n    insetTop = inset,\n    insetBottom = inset,\n    dy = 0,\n    x = k === \"x\" ? undefined : null,\n    ...options\n  }\n) {\n  return axisMark(vectorX, k, `${k}-axis tick`, data, {\n    strokeWidth,\n    strokeLinejoin,\n    strokeLinecap,\n    facetAnchor,\n    frameAnchor,\n    x,\n    ...options,\n    dy: anchor === \"bottom\" ? +dy - offset - insetBottom : +dy + offset + +insetTop,\n    anchor: \"start\",\n    length: tickSize,\n    shape: anchor === \"bottom\" ? shapeTickBottom : shapeTickTop\n  });\n}\n\nfunction axisTextKy(\n  k,\n  anchor,\n  data,\n  {\n    facetAnchor = anchor + (k === \"y\" ? \"-empty\" : \"\"),\n    frameAnchor = anchor,\n    tickSize,\n    tickRotate = 0,\n    tickPadding = Math.max(3, 9 - tickSize) + (Math.abs(tickRotate) > 60 ? 4 * Math.cos(tickRotate * radians) : 0),\n    tickFormat,\n    text = typeof tickFormat === \"function\" ? tickFormat : undefined,\n    textAnchor = Math.abs(tickRotate) > 60 ? \"middle\" : anchor === \"left\" ? \"end\" : \"start\",\n    lineAnchor = tickRotate > 60 ? \"top\" : tickRotate < -60 ? \"bottom\" : \"middle\",\n    fontVariant,\n    inset = 0,\n    insetLeft = inset,\n    insetRight = inset,\n    dx = 0,\n    y = k === \"y\" ? undefined : null,\n    ...options\n  }\n) {\n  return axisMark(\n    textY,\n    k,\n    `${k}-axis tick label`,\n    data,\n    {\n      facetAnchor,\n      frameAnchor,\n      text: text === undefined ? null : text,\n      textAnchor,\n      lineAnchor,\n      fontVariant,\n      rotate: tickRotate,\n      y,\n      ...options,\n      dx: anchor === \"left\" ? +dx - tickSize - tickPadding + +insetLeft : +dx + +tickSize + +tickPadding - insetRight\n    },\n    function (scale, data, ticks, channels) {\n      if (fontVariant === undefined) this.fontVariant = inferFontVariant(scale);\n      if (text === undefined) channels.text = inferTextChannel(scale, data, ticks, tickFormat, anchor);\n    }\n  );\n}\n\nfunction axisTextKx(\n  k,\n  anchor,\n  data,\n  {\n    facetAnchor = anchor + (k === \"x\" ? \"-empty\" : \"\"),\n    frameAnchor = anchor,\n    tickSize,\n    tickRotate = 0,\n    tickPadding = Math.max(3, 9 - tickSize) + (Math.abs(tickRotate) >= 10 ? 4 * Math.cos(tickRotate * radians) : 0),\n    tickFormat,\n    text = typeof tickFormat === \"function\" ? tickFormat : undefined,\n    textAnchor = Math.abs(tickRotate) >= 10 ? ((tickRotate < 0) ^ (anchor === \"bottom\") ? \"start\" : \"end\") : \"middle\",\n    lineAnchor = Math.abs(tickRotate) >= 10 ? \"middle\" : anchor === \"bottom\" ? \"top\" : \"bottom\",\n    fontVariant,\n    inset = 0,\n    insetTop = inset,\n    insetBottom = inset,\n    dy = 0,\n    x = k === \"x\" ? undefined : null,\n    ...options\n  }\n) {\n  return axisMark(\n    textX,\n    k,\n    `${k}-axis tick label`,\n    data,\n    {\n      facetAnchor,\n      frameAnchor,\n      text: text === undefined ? null : text,\n      textAnchor,\n      lineAnchor,\n      fontVariant,\n      rotate: tickRotate,\n      x,\n      ...options,\n      dy: anchor === \"bottom\" ? +dy + +tickSize + +tickPadding - insetBottom : +dy - tickSize - tickPadding + +insetTop\n    },\n    function (scale, data, ticks, channels) {\n      if (fontVariant === undefined) this.fontVariant = inferFontVariant(scale);\n      if (text === undefined) channels.text = inferTextChannel(scale, data, ticks, tickFormat, anchor);\n    }\n  );\n}\n\nexport function gridY() {\n  const [data, options] = maybeData(...arguments);\n  return gridKy(\"y\", anchorY(options), data, options);\n}\n\nexport function gridFy() {\n  const [data, options] = maybeData(...arguments);\n  return gridKy(\"fy\", anchorFy(options), data, options);\n}\n\nexport function gridX() {\n  const [data, options] = maybeData(...arguments);\n  return gridKx(\"x\", anchorX(options), data, options);\n}\n\nexport function gridFx() {\n  const [data, options] = maybeData(...arguments);\n  return gridKx(\"fx\", anchorFx(options), data, options);\n}\n\nfunction gridKy(\n  k,\n  anchor,\n  data,\n  {\n    y = k === \"y\" ? undefined : null,\n    x = null,\n    x1 = anchor === \"left\" ? x : null,\n    x2 = anchor === \"right\" ? x : null,\n    ...options\n  }\n) {\n  return axisMark(ruleY, k, `${k}-grid`, data, {y, x1, x2, ...gridDefaults(options)});\n}\n\nfunction gridKx(\n  k,\n  anchor,\n  data,\n  {\n    x = k === \"x\" ? undefined : null,\n    y = null,\n    y1 = anchor === \"top\" ? y : null,\n    y2 = anchor === \"bottom\" ? y : null,\n    ...options\n  }\n) {\n  return axisMark(ruleX, k, `${k}-grid`, data, {x, y1, y2, ...gridDefaults(options)});\n}\n\nfunction gridDefaults({\n  color = \"currentColor\",\n  opacity = 0.1,\n  stroke = color,\n  strokeOpacity = opacity,\n  strokeWidth = 1,\n  ...options\n}) {\n  return {stroke, strokeOpacity, strokeWidth, ...options};\n}\n\nfunction labelOptions(\n  {fill, fillOpacity, fontFamily, fontSize, fontStyle, fontWeight, monospace, pointerEvents, shapeRendering},\n  initializer\n) {\n  // Only propagate these options if constant.\n  [, fill] = maybeColorChannel(fill);\n  [, fillOpacity] = maybeNumberChannel(fillOpacity);\n  return {\n    facet: \"super\",\n    x: null,\n    y: null,\n    fill,\n    fillOpacity,\n    fontFamily,\n    fontSize,\n    fontStyle,\n    fontWeight,\n    monospace,\n    pointerEvents,\n    shapeRendering,\n    initializer\n  };\n}\n\nfunction axisMark(mark, k, ariaLabel, data, options, initialize) {\n  let channels;\n\n  function axisInitializer(data, facets, _channels, scales, dimensions, context) {\n    const initializeFacets = data == null && (k === \"fx\" || k === \"fy\");\n    const {[k]: scale} = scales;\n    if (!scale) throw new Error(`missing scale: ${k}`);\n    let {ticks, tickSpacing, interval} = options;\n    if (isTemporalScale(scale) && typeof ticks === \"string\") (interval = ticks), (ticks = undefined);\n    if (data == null) {\n      if (isIterable(ticks)) {\n        data = arrayify(ticks);\n      } else if (scale.ticks) {\n        if (ticks !== undefined) {\n          data = scale.ticks(ticks);\n        } else {\n          interval = maybeRangeInterval(interval === undefined ? scale.interval : interval, scale.type);\n          if (interval !== undefined) {\n            // For time scales, we could pass the interval directly to\n            // scale.ticks because it\u2019s supported by d3.utcTicks; but\n            // quantitative scales and d3.ticks do not support numeric\n            // intervals for scale.ticks, so we compute them here.\n            const [min, max] = extent(scale.domain());\n            data = interval.range(min, interval.offset(interval.floor(max))); // inclusive max\n          } else {\n            const [min, max] = extent(scale.range());\n            ticks = (max - min) / (tickSpacing === undefined ? (k === \"x\" ? 80 : 35) : tickSpacing);\n            data = scale.ticks(ticks);\n          }\n        }\n      } else {\n        data = scale.domain();\n      }\n      if (k === \"y\" || k === \"x\") {\n        facets = [range(data)];\n      } else {\n        channels[k] = {scale: k, value: identity};\n      }\n    }\n    initialize?.call(this, scale, data, ticks, channels);\n    const initializedChannels = Object.fromEntries(\n      Object.entries(channels).map(([name, channel]) => {\n        return [name, {...channel, value: valueof(data, channel.value)}];\n      })\n    );\n    if (initializeFacets) facets = context.filterFacets(data, initializedChannels);\n    return {data, facets, channels: initializedChannels};\n  }\n\n  // Apply any basic initializers after the axis initializer computes the ticks.\n  const basicInitializer = initializer(options).initializer;\n  const m = mark(data, initializer({...options, initializer: axisInitializer}, basicInitializer));\n  if (data == null) {\n    channels = m.channels;\n    m.channels = {};\n  } else {\n    channels = {};\n  }\n  m.ariaLabel = ariaLabel;\n  return m;\n}\n\nfunction inferTextChannel(scale, data, ticks, tickFormat, anchor) {\n  return {value: inferTickFormat(scale, data, ticks, tickFormat, anchor)};\n}\n\n// D3\u2019s ordinal scales simply use toString by default, but if the ordinal scale\n// domain (or ticks) are numbers or dates (say because we\u2019re applying a time\n// interval to the ordinal scale), we want Plot\u2019s default formatter.\nexport function inferTickFormat(scale, data, ticks, tickFormat, anchor) {\n  return tickFormat === undefined && isTemporalScale(scale)\n    ? formatTimeTicks(scale, data, ticks, anchor)\n    : scale.tickFormat\n    ? scale.tickFormat(isIterable(ticks) ? null : ticks, tickFormat)\n    : tickFormat === undefined\n    ? isUtcYear(scale.interval)\n      ? utcFormat(\"%Y\")\n      : isTimeYear(scale.interval)\n      ? timeFormat(\"%Y\")\n      : formatDefault\n    : typeof tickFormat === \"string\"\n    ? (isTemporal(scale.domain()) ? utcFormat : format)(tickFormat)\n    : constant(tickFormat);\n}\n\nconst shapeTickBottom = {\n  draw(context, l) {\n    context.moveTo(0, 0);\n    context.lineTo(0, l);\n  }\n};\n\nconst shapeTickTop = {\n  draw(context, l) {\n    context.moveTo(0, 0);\n    context.lineTo(0, -l);\n  }\n};\n\nconst shapeTickLeft = {\n  draw(context, l) {\n    context.moveTo(0, 0);\n    context.lineTo(-l, 0);\n  }\n};\n\nconst shapeTickRight = {\n  draw(context, l) {\n    context.moveTo(0, 0);\n    context.lineTo(l, 0);\n  }\n};\n\n// TODO Unify this with the other inferFontVariant; here we only have a scale\n// function rather than a scale descriptor.\nfunction inferFontVariant(scale) {\n  return scale.bandwidth && !scale.interval ? undefined : \"tabular-nums\";\n}\n\n// Determines whether the scale points in the \u201Cpositive\u201D (right or down) or\n// \u201Cnegative\u201D (left or up) direction; if the scale order cannot be determined,\n// returns NaN; used to assign an appropriate label arrow.\nfunction inferScaleOrder(scale) {\n  return Math.sign(orderof(scale.domain())) * Math.sign(orderof(scale.range()));\n}\n\n// Takes the scale label, and if this is not an ordinal scale and the label was\n// inferred from an associated channel, adds an orientation-appropriate arrow.\nfunction formatAxisLabel(k, scale, {anchor, label = scale.label, labelAnchor, labelArrow} = {}) {\n  if (label == null || (label.inferred && isTemporalish(scale) && /^(date|time|year)$/i.test(label))) return;\n  label = String(label); // coerce to a string after checking if inferred\n  if (labelArrow === \"auto\") labelArrow = (!scale.bandwidth || scale.interval) && !/[\u2191\u2193\u2192\u2190]/.test(label);\n  if (!labelArrow) return label;\n  if (labelArrow === true) {\n    const order = inferScaleOrder(scale);\n    if (order)\n      labelArrow =\n        /x$/.test(k) || labelAnchor === \"center\"\n          ? /x$/.test(k) === order < 0\n            ? \"left\"\n            : \"right\"\n          : order < 0\n          ? \"up\"\n          : \"down\";\n  }\n  switch (labelArrow) {\n    case \"left\":\n      return `\u2190 ${label}`;\n    case \"right\":\n      return `${label} \u2192`;\n    case \"up\":\n      return anchor === \"right\" ? `${label} \u2191` : `\u2191 ${label}`;\n    case \"down\":\n      return anchor === \"right\" ? `${label} \u2193` : `\u2193 ${label}`;\n  }\n  return label;\n}\n\nfunction maybeLabelArrow(labelArrow = \"auto\") {\n  return isNoneish(labelArrow)\n    ? false\n    : typeof labelArrow === \"boolean\"\n    ? labelArrow\n    : keyword(labelArrow, \"labelArrow\", [\"auto\", \"up\", \"right\", \"down\", \"left\"]);\n}\n\nfunction isTemporalish(scale) {\n  return isTemporalScale(scale) || scale.interval != null;\n}\n", "import {pathRound as path} from \"d3\";\nimport {inferFontVariant} from \"../axes.js\";\nimport {create, createContext} from \"../context.js\";\nimport {isNoneish, maybeColorChannel, maybeNumberChannel} from \"../options.js\";\nimport {isOrdinalScale, isThresholdScale} from \"../scales.js\";\nimport {applyInlineStyles, impliedString, maybeClassName} from \"../style.js\";\nimport {inferTickFormat} from \"../marks/axis.js\";\n\nfunction maybeScale(scale, key) {\n  if (key == null) return key;\n  const s = scale(key);\n  if (!s) throw new Error(`scale not found: ${key}`);\n  return s;\n}\n\nexport function legendSwatches(color, {opacity, ...options} = {}) {\n  if (!isOrdinalScale(color) && !isThresholdScale(color))\n    throw new Error(`swatches legend requires ordinal or threshold color scale (not ${color.type})`);\n  return legendItems(color, options, (selection, scale, width, height) =>\n    selection\n      .append(\"svg\")\n      .attr(\"width\", width)\n      .attr(\"height\", height)\n      .attr(\"fill\", scale.scale)\n      .attr(\"fill-opacity\", maybeNumberChannel(opacity)[1])\n      .append(\"rect\")\n      .attr(\"width\", \"100%\")\n      .attr(\"height\", \"100%\")\n  );\n}\n\nexport function legendSymbols(\n  symbol,\n  {\n    fill = symbol.hint?.fill !== undefined ? symbol.hint.fill : \"none\",\n    fillOpacity = 1,\n    stroke = symbol.hint?.stroke !== undefined ? symbol.hint.stroke : isNoneish(fill) ? \"currentColor\" : \"none\",\n    strokeOpacity = 1,\n    strokeWidth = 1.5,\n    r = 4.5,\n    ...options\n  } = {},\n  scale\n) {\n  const [vf, cf] = maybeColorChannel(fill);\n  const [vs, cs] = maybeColorChannel(stroke);\n  const sf = maybeScale(scale, vf);\n  const ss = maybeScale(scale, vs);\n  const size = r * r * Math.PI;\n  fillOpacity = maybeNumberChannel(fillOpacity)[1];\n  strokeOpacity = maybeNumberChannel(strokeOpacity)[1];\n  strokeWidth = maybeNumberChannel(strokeWidth)[1];\n  return legendItems(symbol, options, (selection, scale, width, height) =>\n    selection\n      .append(\"svg\")\n      .attr(\"viewBox\", \"-8 -8 16 16\")\n      .attr(\"width\", width)\n      .attr(\"height\", height)\n      .attr(\"fill\", vf === \"color\" ? (d) => sf.scale(d) : cf)\n      .attr(\"fill-opacity\", fillOpacity)\n      .attr(\"stroke\", vs === \"color\" ? (d) => ss.scale(d) : cs)\n      .attr(\"stroke-opacity\", strokeOpacity)\n      .attr(\"stroke-width\", strokeWidth)\n      .append(\"path\")\n      .attr(\"d\", (d) => {\n        const p = path();\n        symbol.scale(d).draw(p, size);\n        return p;\n      })\n  );\n}\n\nfunction legendItems(scale, options = {}, swatch) {\n  let {\n    columns,\n    tickFormat,\n    fontVariant = inferFontVariant(scale),\n    // TODO label,\n    swatchSize = 15,\n    swatchWidth = swatchSize,\n    swatchHeight = swatchSize,\n    marginLeft = 0,\n    className,\n    style,\n    width\n  } = options;\n  const context = createContext(options);\n  className = maybeClassName(className);\n  if (typeof tickFormat !== \"function\") tickFormat = inferTickFormat(scale.scale, scale.domain, undefined, tickFormat);\n\n  const swatches = create(\"div\", context).attr(\n    \"class\",\n    `${className}-swatches ${className}-swatches-${columns != null ? \"columns\" : \"wrap\"}`\n  );\n\n  let extraStyle;\n\n  if (columns != null) {\n    extraStyle = `.${className}-swatches-columns .${className}-swatch {\n  display: flex;\n  align-items: center;\n  break-inside: avoid;\n  padding-bottom: 1px;\n}\n.${className}-swatches-columns .${className}-swatch::before {\n  flex-shrink: 0;\n}\n.${className}-swatches-columns .${className}-swatch-label {\n  white-space: nowrap;\n  overflow: hidden;\n  text-overflow: ellipsis;\n}`;\n\n    swatches\n      .style(\"columns\", columns)\n      .selectAll()\n      .data(scale.domain)\n      .enter()\n      .append(\"div\")\n      .attr(\"class\", `${className}-swatch`)\n      .call(swatch, scale, swatchWidth, swatchHeight)\n      .call((item) =>\n        item.append(\"div\").attr(\"class\", `${className}-swatch-label`).attr(\"title\", tickFormat).text(tickFormat)\n      );\n  } else {\n    extraStyle = `.${className}-swatches-wrap {\n  display: flex;\n  align-items: center;\n  min-height: 33px;\n  flex-wrap: wrap;\n}\n.${className}-swatches-wrap .${className}-swatch {\n  display: inline-flex;\n  align-items: center;\n  margin-right: 1em;\n}`;\n\n    swatches\n      .selectAll()\n      .data(scale.domain)\n      .enter()\n      .append(\"span\")\n      .attr(\"class\", `${className}-swatch`)\n      .call(swatch, scale, swatchWidth, swatchHeight)\n      .append(function () {\n        return this.ownerDocument.createTextNode(tickFormat.apply(this, arguments));\n      });\n  }\n\n  return swatches\n    .call((div) =>\n      div.insert(\"style\", \"*\").text(\n        `.${className}-swatches {\n  font-family: system-ui, sans-serif;\n  font-size: 10px;\n  margin-bottom: 0.5em;\n}\n.${className}-swatch > svg {\n  margin-right: 0.5em;\n  overflow: visible;\n}\n${extraStyle}`\n      )\n    )\n    .style(\"margin-left\", marginLeft ? `${+marginLeft}px` : null)\n    .style(\"width\", width === undefined ? null : `${+width}px`)\n    .style(\"font-variant\", impliedString(fontVariant, \"normal\"))\n    .call(applyInlineStyles, style)\n    .node();\n}\n", "import {rgb} from \"d3\";\nimport {createContext} from \"./context.js\";\nimport {legendRamp} from \"./legends/ramp.js\";\nimport {legendSwatches, legendSymbols} from \"./legends/swatches.js\";\nimport {inherit, isScaleOptions} from \"./options.js\";\nimport {normalizeScale} from \"./scales.js\";\n\nconst legendRegistry = new Map([\n  [\"symbol\", legendSymbols],\n  [\"color\", legendColor],\n  [\"opacity\", legendOpacity]\n]);\n\nexport function legend(options = {}) {\n  for (const [key, value] of legendRegistry) {\n    const scale = options[key];\n    if (isScaleOptions(scale)) {\n      // e.g., ignore {color: \"red\"}\n      const context = createContext(options);\n      let hint;\n      // For symbol legends, pass a hint to the symbol scale.\n      if (key === \"symbol\") {\n        const {fill, stroke = fill === undefined && isScaleOptions(options.color) ? \"color\" : undefined} = options;\n        hint = {fill, stroke};\n      }\n      return value(normalizeScale(key, scale, hint), legendOptions(context, scale, options), (key) =>\n        isScaleOptions(options[key]) ? normalizeScale(key, options[key]) : null\n      );\n    }\n  }\n  throw new Error(\"unknown legend type; no scale found\");\n}\n\nexport function exposeLegends(scales, context, defaults = {}) {\n  return (key, options) => {\n    if (!legendRegistry.has(key)) throw new Error(`unknown legend type: ${key}`);\n    if (!(key in scales)) return;\n    return legendRegistry.get(key)(scales[key], legendOptions(context, defaults[key], options), (key) => scales[key]);\n  };\n}\n\nfunction legendOptions({className, ...context}, {label, ticks, tickFormat} = {}, options) {\n  return inherit(options, {className, ...context}, {label, ticks, tickFormat});\n}\n\nfunction legendColor(color, {legend = true, ...options}) {\n  if (legend === true) legend = color.type === \"ordinal\" ? \"swatches\" : \"ramp\";\n  if (color.domain === undefined) return;\n  switch (`${legend}`.toLowerCase()) {\n    case \"swatches\":\n      return legendSwatches(color, options);\n    case \"ramp\":\n      return legendRamp(color, options);\n    default:\n      throw new Error(`unknown legend type: ${legend}`);\n  }\n}\n\nfunction legendOpacity({type, interpolate, ...scale}, {legend = true, color = rgb(0, 0, 0), ...options}) {\n  if (!interpolate) throw new Error(`${type} opacity scales are not supported`);\n  if (legend === true) legend = \"ramp\";\n  if (`${legend}`.toLowerCase() !== \"ramp\") throw new Error(`${legend} opacity legends are not supported`);\n  return legendColor({type, ...scale, interpolate: interpolateOpacity(color)}, {legend, ...options});\n}\n\nfunction interpolateOpacity(color) {\n  const {r, g, b} = rgb(color) || rgb(0, 0, 0); // treat invalid color as black\n  return (t) => `rgba(${r},${g},${b},${t})`;\n}\n\nexport function createLegends(scales, context, options) {\n  const legends = [];\n  for (const [key, value] of legendRegistry) {\n    const o = options[key];\n    if (o?.legend && key in scales) {\n      const legend = value(scales[key], legendOptions(context, scales[key], o), (key) => scales[key]);\n      if (legend != null) legends.push(legend);\n    }\n  }\n  return legends;\n}\n", "import {create} from \"../context.js\";\nimport {Mark} from \"../mark.js\";\nimport {maybeKeyword, number, singleton} from \"../options.js\";\nimport {applyChannelStyles, applyDirectStyles, applyIndirectStyles, applyTransform} from \"../style.js\";\n\nconst defaults = {\n  ariaLabel: \"frame\",\n  fill: \"none\",\n  stroke: \"currentColor\"\n};\n\nconst lineDefaults = {\n  ariaLabel: \"frame\",\n  fill: null,\n  stroke: \"currentColor\",\n  strokeLinecap: \"square\"\n};\n\nexport class Frame extends Mark {\n  constructor(options = {}) {\n    const {\n      anchor = null,\n      inset = 0,\n      insetTop = inset,\n      insetRight = inset,\n      insetBottom = inset,\n      insetLeft = inset,\n      rx,\n      ry\n    } = options;\n    super(singleton, undefined, options, anchor == null ? defaults : lineDefaults);\n    this.anchor = maybeKeyword(anchor, \"anchor\", [\"top\", \"right\", \"bottom\", \"left\"]);\n    this.insetTop = number(insetTop);\n    this.insetRight = number(insetRight);\n    this.insetBottom = number(insetBottom);\n    this.insetLeft = number(insetLeft);\n    this.rx = number(rx);\n    this.ry = number(ry);\n  }\n  render(index, scales, channels, dimensions, context) {\n    const {marginTop, marginRight, marginBottom, marginLeft, width, height} = dimensions;\n    const {anchor, insetTop, insetRight, insetBottom, insetLeft, rx, ry} = this;\n    const x1 = marginLeft + insetLeft;\n    const x2 = width - marginRight - insetRight;\n    const y1 = marginTop + insetTop;\n    const y2 = height - marginBottom - insetBottom;\n    return create(anchor ? \"svg:line\" : \"svg:rect\", context)\n      .datum(0)\n      .call(applyIndirectStyles, this, dimensions, context)\n      .call(applyDirectStyles, this)\n      .call(applyChannelStyles, this, channels)\n      .call(applyTransform, this, {})\n      .call(\n        anchor === \"left\"\n          ? (line) => line.attr(\"x1\", x1).attr(\"x2\", x1).attr(\"y1\", y1).attr(\"y2\", y2)\n          : anchor === \"right\"\n          ? (line) => line.attr(\"x1\", x2).attr(\"x2\", x2).attr(\"y1\", y1).attr(\"y2\", y2)\n          : anchor === \"top\"\n          ? (line) => line.attr(\"x1\", x1).attr(\"x2\", x2).attr(\"y1\", y1).attr(\"y2\", y1)\n          : anchor === \"bottom\"\n          ? (line) => line.attr(\"x1\", x1).attr(\"x2\", x2).attr(\"y1\", y2).attr(\"y2\", y2)\n          : (rect) =>\n              rect\n                .attr(\"x\", x1)\n                .attr(\"y\", y1)\n                .attr(\"width\", x2 - x1)\n                .attr(\"height\", y2 - y1)\n                .attr(\"rx\", rx)\n                .attr(\"ry\", ry)\n      )\n      .node();\n  }\n}\n\nexport function frame(options) {\n  return new Frame(options);\n}\n", "import {select} from \"d3\";\nimport {getSource} from \"../channel.js\";\nimport {create} from \"../context.js\";\nimport {defined} from \"../defined.js\";\nimport {formatDefault} from \"../format.js\";\nimport {anchorX, anchorY} from \"../interactions/pointer.js\";\nimport {Mark} from \"../mark.js\";\nimport {maybeAnchor, maybeFrameAnchor, maybeTuple, number, string} from \"../options.js\";\nimport {applyDirectStyles, applyFrameAnchor, applyIndirectStyles, applyTransform, impliedString} from \"../style.js\";\nimport {identity, isIterable, isTextual} from \"../options.js\";\nimport {inferTickFormat} from \"./axis.js\";\nimport {applyIndirectTextStyles, defaultWidth, ellipsis, monospaceWidth} from \"./text.js\";\nimport {cut, clipper, splitter, maybeTextOverflow} from \"./text.js\";\n\nconst defaults = {\n  ariaLabel: \"tip\",\n  fill: \"white\",\n  stroke: \"currentColor\"\n};\n\n// These channels are not displayed in the tip; TODO allow customization.\nconst ignoreChannels = new Set([\"geometry\", \"href\", \"src\", \"ariaLabel\"]);\n\nexport class Tip extends Mark {\n  constructor(data, options = {}) {\n    if (options.tip) options = {...options, tip: false};\n    if (options.title === undefined && isIterable(data) && isTextual(data)) options = {...options, title: identity};\n    const {\n      x,\n      y,\n      x1,\n      x2,\n      y1,\n      y2,\n      anchor,\n      monospace,\n      fontFamily = monospace ? \"ui-monospace, monospace\" : undefined,\n      fontSize,\n      fontStyle,\n      fontVariant,\n      fontWeight,\n      lineHeight = 1,\n      lineWidth = 20,\n      frameAnchor,\n      textAnchor = \"start\",\n      textOverflow,\n      textPadding = 8,\n      title,\n      pointerSize = 12,\n      pathFilter = \"drop-shadow(0 3px 4px rgba(0,0,0,0.2))\"\n    } = options;\n    super(\n      data,\n      {\n        x: {value: x1 != null && x2 != null ? null : x, scale: \"x\", optional: true}, // ignore midpoint\n        y: {value: y1 != null && y2 != null ? null : y, scale: \"y\", optional: true}, // ignore midpoint\n        x1: {value: x1, scale: \"x\", optional: x2 == null},\n        y1: {value: y1, scale: \"y\", optional: y2 == null},\n        x2: {value: x2, scale: \"x\", optional: x1 == null},\n        y2: {value: y2, scale: \"y\", optional: y1 == null},\n        title: {value: title, optional: true} // filter: defined\n      },\n      options,\n      defaults\n    );\n    this.anchor = maybeAnchor(anchor, \"anchor\");\n    this.previousAnchor = this.anchor ?? \"top-left\";\n    this.frameAnchor = maybeFrameAnchor(frameAnchor);\n    this.textAnchor = impliedString(textAnchor, \"middle\");\n    this.textPadding = +textPadding;\n    this.pointerSize = +pointerSize;\n    this.pathFilter = string(pathFilter);\n    this.lineHeight = +lineHeight;\n    this.lineWidth = +lineWidth;\n    this.textOverflow = maybeTextOverflow(textOverflow);\n    this.monospace = !!monospace;\n    this.fontFamily = string(fontFamily);\n    this.fontSize = number(fontSize);\n    this.fontStyle = string(fontStyle);\n    this.fontVariant = string(fontVariant);\n    this.fontWeight = string(fontWeight);\n    for (const key in defaults) if (key in this.channels) this[key] = defaults[key]; // apply default even if channel\n    this.splitLines = splitter(this);\n    this.clipLine = clipper(this);\n  }\n  render(index, scales, values, dimensions, context) {\n    const mark = this;\n    const {x, y, fx, fy} = scales;\n    const {ownerSVGElement: svg, document} = context;\n    const {anchor, monospace, lineHeight, lineWidth} = this;\n    const {textPadding: r, pointerSize: m, pathFilter} = this;\n    const {marginTop, marginLeft} = dimensions;\n    const sources = getSources(values);\n\n    // The anchor position is the middle of x1 & y1 and x2 & y2, if available,\n    // or x & y; the former is considered more specific because it\u2019s how we\n    // disable the implicit stack and interval transforms. If any dimension is\n    // unspecified, we fallback to the frame anchor. We also need to know the\n    // facet offsets to detect when the tip would draw outside the plot, and\n    // thus we need to change the orientation.\n    const {x1: X1, y1: Y1, x2: X2, y2: Y2, x: X = X1 ?? X2, y: Y = Y1 ?? Y2} = values;\n    const ox = fx ? fx(index.fx) - marginLeft : 0;\n    const oy = fy ? fy(index.fy) - marginTop : 0;\n\n    // The order of precedence for the anchor position is: the middle of x1 & y1\n    // and x2 & y2; or x1 & y1 (e.g., area); or lastly x & y. If a dimension is\n    // unspecified, the frame anchor is used.\n    const [cx, cy] = applyFrameAnchor(this, dimensions);\n    const px = anchorX(values, cx);\n    const py = anchorY(values, cy);\n\n    // Resolve the text metric implementation. We may need an ellipsis for text\n    // truncation, so we optimistically compute the ellipsis width.\n    const widthof = monospace ? monospaceWidth : defaultWidth;\n    const ee = widthof(ellipsis);\n\n    // We borrow the scale\u2019s tick format for facet channels; this is safe for\n    // ordinal scales (but not continuous scales where the display value may\n    // need higher precision), and generally better than the default format.\n    const formatFx = fx && inferTickFormat(fx);\n    const formatFy = fy && inferTickFormat(fy);\n\n    function* format(sources, i) {\n      if (\"title\" in sources) {\n        const text = sources.title.value[i];\n        for (const line of mark.splitLines(formatDefault(text))) {\n          yield {name: \"\", value: mark.clipLine(line)};\n        }\n        return;\n      }\n      for (const key in sources) {\n        if (key === \"x1\" && \"x2\" in sources) continue;\n        if (key === \"y1\" && \"y2\" in sources) continue;\n        const channel = sources[key];\n        const value = channel.value[i];\n        if (!defined(value) && channel.scale == null) continue;\n        if (key === \"x2\" && \"x1\" in sources) {\n          yield {name: formatLabel(scales, channel, \"x\"), value: formatPair(sources.x1, channel, i)};\n        } else if (key === \"y2\" && \"y1\" in sources) {\n          yield {name: formatLabel(scales, channel, \"y\"), value: formatPair(sources.y1, channel, i)};\n        } else {\n          const scale = channel.scale;\n          const line = {name: formatLabel(scales, channel, key), value: formatDefault(value)};\n          if (scale === \"color\" || scale === \"opacity\") line[scale] = values[key][i];\n          yield line;\n        }\n      }\n      if (index.fi != null && fx) yield {name: String(fx.label ?? \"fx\"), value: formatFx(index.fx)};\n      if (index.fi != null && fy) yield {name: String(fy.label ?? \"fy\"), value: formatFy(index.fy)};\n    }\n\n    // We don\u2019t call applyChannelStyles because we only use the channels to\n    // derive the content of the tip, not its aesthetics.\n    const g = create(\"svg:g\", context)\n      .call(applyIndirectStyles, this, dimensions, context)\n      .call(applyIndirectTextStyles, this)\n      .call(applyTransform, this, {x: X && x, y: Y && y})\n      .call((g) =>\n        g\n          .selectAll()\n          .data(index)\n          .enter()\n          .append(\"g\")\n          .attr(\"transform\", (i) => `translate(${Math.round(px(i))},${Math.round(py(i))})`) // crisp edges\n          .call(applyDirectStyles, this)\n          .call((g) => g.append(\"path\").attr(\"filter\", pathFilter))\n          .call((g) =>\n            g.append(\"text\").each(function (i) {\n              const that = select(this);\n              // prevent style inheritance (from path)\n              this.setAttribute(\"fill\", \"currentColor\");\n              this.setAttribute(\"fill-opacity\", 1);\n              this.setAttribute(\"stroke\", \"none\");\n              // iteratively render each channel value\n              const names = new Set();\n              for (const line of format(sources, i)) {\n                const name = line.name;\n                if (name && names.has(name)) continue;\n                else names.add(name);\n                renderLine(that, line);\n              }\n            })\n          )\n      );\n\n    // Renders a single line (a name-value pair) to the tip, truncating the text\n    // as needed, and adding a title if the text is truncated. Note that this is\n    // just the initial layout of the text; in postrender we will compute the\n    // exact text metrics and translate the text as needed once we know the\n    // tip\u2019s orientation (anchor).\n    function renderLine(selection, {name, value, color, opacity}) {\n      const swatch = color != null || opacity != null;\n      let title;\n      let w = lineWidth * 100;\n      const [j] = cut(name, w, widthof, ee);\n      if (j >= 0) {\n        // name is truncated\n        name = name.slice(0, j).trimEnd() + ellipsis;\n        title = value.trim();\n        value = \"\";\n      } else {\n        if (name || (!value && !swatch)) value = \" \" + value;\n        const [k] = cut(value, w - widthof(name), widthof, ee);\n        if (k >= 0) {\n          // value is truncated\n          value = value.slice(0, k).trimEnd() + ellipsis;\n          title = value.trim();\n        }\n      }\n      const line = selection.append(\"tspan\").attr(\"x\", 0).attr(\"dy\", `${lineHeight}em`).text(\"\\u200b\"); // zwsp for double-click\n      if (name) line.append(\"tspan\").attr(\"font-weight\", \"bold\").text(name);\n      if (value) line.append(() => document.createTextNode(value));\n      if (swatch) line.append(\"tspan\").text(\" \u25A0\").attr(\"fill\", color).attr(\"fill-opacity\", opacity).style(\"user-select\", \"none\"); // prettier-ignore\n      if (title) line.append(\"title\").text(title);\n    }\n\n    // Only after the plot is attached to the page can we compute the exact text\n    // metrics needed to determine the tip size and orientation (anchor).\n    function postrender() {\n      const {width, height} = dimensions.facet ?? dimensions;\n      g.selectChildren().each(function (i) {\n        let {x: tx, width: w, height: h} = this.getBBox();\n        (w = Math.round(w)), (h = Math.round(h)); // crisp edges\n        let a = anchor; // use the specified anchor, if any\n        if (a === undefined) {\n          a = mark.previousAnchor; // favor the previous anchor, if it fits\n          const x = px(i) + ox;\n          const y = py(i) + oy;\n          const fitLeft = x + w + r * 2 < width;\n          const fitRight = x - w - r * 2 > 0;\n          const fitTop = y + h + m + r * 2 + 7 < height;\n          const fitBottom = y - h - m - r * 2 > 0;\n          const ax = (/-left$/.test(a) ? fitLeft || !fitRight : fitLeft && !fitRight) ? \"left\" : \"right\";\n          const ay = (/^top-/.test(a) ? fitTop || !fitBottom : fitTop && !fitBottom) ? \"top\" : \"bottom\";\n          a = mark.previousAnchor = `${ay}-${ax}`;\n        }\n        const path = this.firstChild; // note: assumes exactly two children!\n        const text = this.lastChild; // note: assumes exactly two children!\n        path.setAttribute(\"d\", getPath(a, m, r, w, h));\n        if (tx) for (const t of text.childNodes) t.setAttribute(\"x\", -tx);\n        text.setAttribute(\"y\", `${+getLineOffset(a, text.childNodes.length, lineHeight).toFixed(6)}em`);\n        text.setAttribute(\"transform\", `translate(${getTextTranslate(a, m, r, w, h)})`);\n      });\n    }\n\n    // Wait until the plot is inserted into the page so that we can use getBBox\n    // to compute the exact text dimensions. If the SVG is already connected, as\n    // when the pointer interaction triggers the re-render, use a faster\n    // microtask instead of an animation frame; if this SSR (e.g., JSDOM), skip\n    // this step. Perhaps this could be done synchronously; getting the\n    // dimensions of the SVG is easy, and although accurate text metrics are\n    // hard, we could use approximate heuristics.\n    if (svg.isConnected) Promise.resolve().then(postrender);\n    else if (typeof requestAnimationFrame !== \"undefined\") requestAnimationFrame(postrender);\n\n    return g.node();\n  }\n}\n\nexport function tip(data, {x, y, ...options} = {}) {\n  if (options.frameAnchor === undefined) [x, y] = maybeTuple(x, y);\n  return new Tip(data, {...options, x, y});\n}\n\nfunction getLineOffset(anchor, length, lineHeight) {\n  return /^top(?:-|$)/.test(anchor)\n    ? 0.94 - lineHeight\n    : /^bottom(?:-|$)/\n    ? -0.29 - length * lineHeight\n    : (length / 2) * lineHeight;\n}\n\nfunction getTextTranslate(anchor, m, r, width, height) {\n  switch (anchor) {\n    case \"middle\":\n      return [-width / 2, height / 2];\n    case \"top-left\":\n      return [r, m + r];\n    case \"top\":\n      return [-width / 2, m / 2 + r];\n    case \"top-right\":\n      return [-width - r, m + r];\n    case \"right\":\n      return [-m / 2 - width - r, height / 2];\n    case \"bottom-left\":\n      return [r, -m - r];\n    case \"bottom\":\n      return [-width / 2, -m / 2 - r];\n    case \"bottom-right\":\n      return [-width - r, -m - r];\n    case \"left\":\n      return [r + m / 2, height / 2];\n  }\n}\n\nfunction getPath(anchor, m, r, width, height) {\n  const w = width + r * 2;\n  const h = height + r * 2;\n  switch (anchor) {\n    case \"middle\":\n      return `M${-w / 2},${-h / 2}h${w}v${h}h${-w}z`;\n    case \"top-left\":\n      return `M0,0l${m},${m}h${w - m}v${h}h${-w}z`;\n    case \"top\":\n      return `M0,0l${m / 2},${m / 2}h${(w - m) / 2}v${h}h${-w}v${-h}h${(w - m) / 2}z`;\n    case \"top-right\":\n      return `M0,0l${-m},${m}h${m - w}v${h}h${w}z`;\n    case \"right\":\n      return `M0,0l${-m / 2},${-m / 2}v${m / 2 - h / 2}h${-w}v${h}h${w}v${m / 2 - h / 2}z`;\n    case \"bottom-left\":\n      return `M0,0l${m},${-m}h${w - m}v${-h}h${-w}z`;\n    case \"bottom\":\n      return `M0,0l${m / 2},${-m / 2}h${(w - m) / 2}v${-h}h${-w}v${h}h${(w - m) / 2}z`;\n    case \"bottom-right\":\n      return `M0,0l${-m},${-m}h${m - w}v${-h}h${w}z`;\n    case \"left\":\n      return `M0,0l${m / 2},${-m / 2}v${m / 2 - h / 2}h${w}v${h}h${-w}v${m / 2 - h / 2}z`;\n  }\n}\n\nfunction getSources({channels}) {\n  const sources = {};\n  for (const key in channels) {\n    if (ignoreChannels.has(key)) continue;\n    const source = getSource(channels, key);\n    if (source) sources[key] = source;\n  }\n  return sources;\n}\n\nfunction formatPair(c1, c2, i) {\n  return c2.hint?.length // e.g., stackY\u2019s y1 and y2\n    ? `${formatDefault(c2.value[i] - c1.value[i])}`\n    : `${formatDefault(c1.value[i])}\u2013${formatDefault(c2.value[i])}`;\n}\n\nfunction formatLabel(scales, c, defaultLabel) {\n  return String(scales[c.scale]?.label ?? c?.label ?? defaultLabel);\n}\n", "import {creator, select} from \"d3\";\nimport {createChannel, inferChannelScale} from \"./channel.js\";\nimport {createContext} from \"./context.js\";\nimport {createDimensions} from \"./dimensions.js\";\nimport {createFacets, recreateFacets, facetExclude, facetGroups, facetTranslator, facetFilter} from \"./facet.js\";\nimport {pointer, pointerX, pointerY} from \"./interactions/pointer.js\";\nimport {createLegends, exposeLegends} from \"./legends.js\";\nimport {Mark} from \"./mark.js\";\nimport {axisFx, axisFy, axisX, axisY, gridFx, gridFy, gridX, gridY} from \"./marks/axis.js\";\nimport {frame} from \"./marks/frame.js\";\nimport {tip} from \"./marks/tip.js\";\nimport {isColor, isIterable, isNone, isScaleOptions} from \"./options.js\";\nimport {arrayify, map, yes, maybeIntervalTransform, subarray} from \"./options.js\";\nimport {createProjection, getGeometryChannels, hasProjection} from \"./projection.js\";\nimport {createScales, createScaleFunctions, autoScaleRange, exposeScales} from \"./scales.js\";\nimport {innerDimensions, outerDimensions} from \"./scales.js\";\nimport {position, registry as scaleRegistry} from \"./scales/index.js\";\nimport {applyInlineStyles, maybeClassName} from \"./style.js\";\nimport {initializer} from \"./transforms/basic.js\";\nimport {consumeWarnings, warn} from \"./warnings.js\";\n\nexport function plot(options = {}) {\n  const {facet, style, caption, ariaLabel, ariaDescription} = options;\n\n  // className for inline styles\n  const className = maybeClassName(options.className);\n\n  // Flatten any nested marks.\n  const marks = options.marks === undefined ? [] : flatMarks(options.marks);\n\n  // Add implicit tips.\n  marks.push(...inferTips(marks));\n\n  // Compute the top-level facet state. This has roughly the same structure as\n  // mark-specific facet state, except there isn\u2019t a facetsIndex, and there\u2019s a\n  // data and dataLength so we can warn the user if a different data of the same\n  // length is used in a mark.\n  const topFacetState = maybeTopFacet(facet, options);\n\n  // Construct a map from (faceted) Mark instance to facet state, including:\n  // channels - an {fx?, fy?} object to add to the fx and fy scale\n  // groups - a possibly-nested map from facet values to indexes in the data array\n  // facetsIndex - a sparse nested array of indices corresponding to the valid facets\n  const facetStateByMark = new Map();\n  for (const mark of marks) {\n    const facetState = maybeMarkFacet(mark, topFacetState, options);\n    if (facetState) facetStateByMark.set(mark, facetState);\n  }\n\n  // Compute a Map from scale name to an array of associated channels.\n  const channelsByScale = new Map();\n  if (topFacetState) addScaleChannels(channelsByScale, [topFacetState], options);\n  addScaleChannels(channelsByScale, facetStateByMark, options);\n\n  // Add implicit axis marks. Because this happens after faceting (because it\n  // depends on whether faceting is present), we must initialize the facet state\n  // of any implicit axes, too.\n  const axes = flatMarks(inferAxes(marks, channelsByScale, options));\n  for (const mark of axes) {\n    const facetState = maybeMarkFacet(mark, topFacetState, options);\n    if (facetState) facetStateByMark.set(mark, facetState);\n  }\n  marks.unshift(...axes);\n\n  // All the possible facets are given by the domains of the fx or fy scales, or\n  // the cross-product of these domains if we facet by both x and y. We sort\n  // them in order to apply the facet filters afterwards.\n  let facets = createFacets(channelsByScale, options);\n\n  if (facets !== undefined) {\n    const topFacetsIndex = topFacetState ? facetFilter(facets, topFacetState) : undefined;\n\n    // Compute a facet index for each mark, parallel to the facets array. For\n    // mark-level facets, compute an index for that mark\u2019s data and options.\n    // Otherwise, use the top-level facet index.\n    for (const mark of marks) {\n      if (mark.facet === null || mark.facet === \"super\") continue;\n      const facetState = facetStateByMark.get(mark);\n      if (facetState === undefined) continue;\n      facetState.facetsIndex = mark.fx != null || mark.fy != null ? facetFilter(facets, facetState) : topFacetsIndex;\n    }\n\n    // The cross product of the domains of fx and fy can include fx-fy\n    // combinations for which no mark has an instance associated with that\n    // combination, and therefore we don\u2019t want to render this facet (not even\n    // the frame). The same can occur if you specify the domain of fx and fy\n    // explicitly, but there is no mark instance associated with some values in\n    // the domain. Expunge empty facets, and clear the corresponding elements\n    // from the nested index in each mark.\n    const nonEmpty = new Set();\n    for (const {facetsIndex} of facetStateByMark.values()) {\n      facetsIndex?.forEach((index, i) => {\n        if (index?.length > 0) {\n          nonEmpty.add(i);\n        }\n      });\n    }\n\n    // If all the facets are empty (as when none of the marks are actually\n    // faceted), none of them are empty.\n    facets.forEach(\n      0 < nonEmpty.size && nonEmpty.size < facets.length\n        ? (f, i) => (f.empty = !nonEmpty.has(i))\n        : (f) => (f.empty = false)\n    );\n\n    // For any mark using the \u201Cexclude\u201D facet mode, invert the index.\n    for (const mark of marks) {\n      if (mark.facet === \"exclude\") {\n        const facetState = facetStateByMark.get(mark);\n        if (facetState !== undefined) facetState.facetsIndex = facetExclude(facetState.facetsIndex);\n      }\n    }\n  }\n\n  // If a scale is explicitly declared in options, initialize its associated\n  // channels to the empty array; this will guarantee that a corresponding scale\n  // will be created later (even if there are no other channels). Ignore facet\n  // scale declarations, which are handled above.\n  for (const key of scaleRegistry.keys()) {\n    if (isScaleOptions(options[key]) && key !== \"fx\" && key !== \"fy\") {\n      channelsByScale.set(key, []);\n    }\n  }\n\n  // A Map from Mark instance to its render state, including:\n  // index - the data index e.g. [0, 1, 2, 3, \u2026]\n  // channels - an array of materialized channels e.g. [[\"x\", {value}], \u2026]\n  // faceted - a boolean indicating whether this mark is faceted\n  // values - an object of scaled values e.g. {x: [40, 32, \u2026], \u2026}\n  const stateByMark = new Map();\n\n  // Initialize the marks\u2019 state.\n  for (const mark of marks) {\n    if (stateByMark.has(mark)) throw new Error(\"duplicate mark; each mark must be unique\");\n    const {facetsIndex, channels: facetChannels} = facetStateByMark.get(mark) ?? {};\n    const {data, facets, channels} = mark.initialize(facetsIndex, facetChannels, options);\n    applyScaleTransforms(channels, options);\n    stateByMark.set(mark, {data, facets, channels});\n  }\n\n  // Initalize the scales and dimensions.\n  const scaleDescriptors = createScales(addScaleChannels(channelsByScale, stateByMark, options), options);\n  const scales = createScaleFunctions(scaleDescriptors);\n  const dimensions = createDimensions(scaleDescriptors, marks, options);\n\n  autoScaleRange(scaleDescriptors, dimensions);\n\n  const {fx, fy} = scales;\n  const subdimensions = fx || fy ? innerDimensions(scaleDescriptors, dimensions) : dimensions;\n  const superdimensions = fx || fy ? actualDimensions(scales, dimensions) : dimensions;\n\n  // Initialize the context.\n  const context = createContext(options);\n  const document = context.document;\n  const svg = creator(\"svg\").call(document.documentElement);\n  let figure = svg; // replaced with the figure element, if any\n  context.ownerSVGElement = svg;\n  context.className = className;\n  context.projection = createProjection(options, subdimensions);\n\n  // Allows e.g. the axis mark to determine faceting lazily.\n  context.filterFacets = (data, channels) => {\n    return facetFilter(facets, {channels, groups: facetGroups(data, channels)});\n  };\n\n  // Allows e.g. the tip mark to reference channels and data on other marks.\n  context.getMarkState = (mark) => {\n    const state = stateByMark.get(mark);\n    const facetState = facetStateByMark.get(mark);\n    return {...state, channels: {...state.channels, ...facetState?.channels}};\n  };\n\n  // Allows e.g. the pointer transform to support viewof.\n  context.dispatchValue = (value) => {\n    if (figure.value === value) return;\n    figure.value = value;\n    figure.dispatchEvent(new Event(\"input\", {bubbles: true}));\n  };\n\n  // Reinitialize; for deriving channels dependent on other channels.\n  const newByScale = new Set();\n  for (const [mark, state] of stateByMark) {\n    if (mark.initializer != null) {\n      const dimensions = mark.facet === \"super\" ? superdimensions : subdimensions;\n      const update = mark.initializer(state.data, state.facets, state.channels, scales, dimensions, context);\n      if (update.data !== undefined) {\n        state.data = update.data;\n      }\n      if (update.facets !== undefined) {\n        state.facets = update.facets;\n      }\n      if (update.channels !== undefined) {\n        const {fx, fy, ...channels} = update.channels; // separate facet channels\n        inferChannelScales(channels);\n        Object.assign(state.channels, channels);\n        for (const channel of Object.values(channels)) {\n          const {scale} = channel;\n          // Initializers aren\u2019t allowed to redefine position scales as this\n          // would introduce a circular dependency; so simply scale these\n          // channels as-is rather than creating new scales, and assume that\n          // they already have the scale\u2019s transform applied, if any (e.g., when\n          // generating ticks for the axis mark).\n          if (scale != null && scaleRegistry.get(scale) !== position) {\n            applyScaleTransform(channel, options);\n            newByScale.add(scale);\n          }\n        }\n        // If the initializer returns new mark-level facet channels, we must\n        // record that the mark is now faceted. Note: we aren\u2019t actually\n        // populating the facet state, but subsequently we won\u2019t need it.\n        if (fx != null || fy != null) facetStateByMark.set(mark, true);\n      }\n    }\n  }\n\n  // Reconstruct scales if new scaled channels were created during\n  // reinitialization. Preserve existing scale labels, if any.\n  if (newByScale.size) {\n    const newChannelsByScale = new Map();\n    addScaleChannels(newChannelsByScale, stateByMark, options, (key) => newByScale.has(key));\n    addScaleChannels(channelsByScale, stateByMark, options, (key) => newByScale.has(key));\n    const newScaleDescriptors = inheritScaleLabels(createScales(newChannelsByScale, options), scaleDescriptors);\n    const newScales = createScaleFunctions(newScaleDescriptors);\n    Object.assign(scaleDescriptors, newScaleDescriptors);\n    Object.assign(scales, newScales);\n  }\n\n  // Sort and filter the facets to match the fx and fy domains; this is needed\n  // because the facets were constructed prior to the fx and fy scales.\n  let facetDomains, facetTranslate;\n  if (facets !== undefined) {\n    facetDomains = {x: fx?.domain(), y: fy?.domain()};\n    facets = recreateFacets(facets, facetDomains);\n    facetTranslate = facetTranslator(fx, fy, dimensions);\n  }\n\n  // Compute value objects, applying scales and projection as needed.\n  for (const [mark, state] of stateByMark) {\n    state.values = mark.scale(state.channels, scales, context);\n  }\n\n  const {width, height} = dimensions;\n\n  select(svg)\n    .attr(\"class\", className)\n    .attr(\"fill\", \"currentColor\")\n    .attr(\"font-family\", \"system-ui, sans-serif\")\n    .attr(\"font-size\", 10)\n    .attr(\"text-anchor\", \"middle\")\n    .attr(\"width\", width)\n    .attr(\"height\", height)\n    .attr(\"viewBox\", `0 0 ${width} ${height}`)\n    .attr(\"aria-label\", ariaLabel)\n    .attr(\"aria-description\", ariaDescription)\n    .call((svg) =>\n      // Warning: if you edit this, change defaultClassName.\n      svg.append(\"style\").text(\n        `.${className} {\n  display: block;\n  background: white;\n  height: auto;\n  height: intrinsic;\n  max-width: 100%;\n}\n.${className} text,\n.${className} tspan {\n  white-space: pre;\n}`\n      )\n    )\n    .call(applyInlineStyles, style);\n\n  // Render marks.\n  for (const mark of marks) {\n    const {channels, values, facets: indexes} = stateByMark.get(mark);\n\n    // Render a non-faceted mark.\n    if (facets === undefined || mark.facet === \"super\") {\n      let index = null;\n      if (indexes) {\n        index = indexes[0];\n        index = mark.filter(index, channels, values);\n        if (index.length === 0) continue;\n      }\n      const node = mark.render(index, scales, values, superdimensions, context);\n      if (node == null) continue;\n      svg.appendChild(node);\n    }\n\n    // Render a faceted mark.\n    else {\n      let g;\n      for (const f of facets) {\n        if (!(mark.facetAnchor?.(facets, facetDomains, f) ?? !f.empty)) continue;\n        let index = null;\n        if (indexes) {\n          const faceted = facetStateByMark.has(mark);\n          index = indexes[faceted ? f.i : 0];\n          index = mark.filter(index, channels, values);\n          if (index.length === 0) continue;\n          if (!faceted && index === indexes[0]) index = subarray(index); // copy before assigning fx, fy, fi\n          (index.fx = f.x), (index.fy = f.y), (index.fi = f.i);\n        }\n        const node = mark.render(index, scales, values, subdimensions, context);\n        if (node == null) continue;\n        // Lazily construct the shared group (to drop empty marks).\n        (g ??= select(svg).append(\"g\")).append(() => node).datum(f);\n        // Promote ARIA attributes and mark transform to avoid repetition on\n        // each facet; this assumes that these attributes are consistent across\n        // facets, but that should be the case!\n        for (const name of [\"aria-label\", \"aria-description\", \"aria-hidden\", \"transform\"]) {\n          if (node.hasAttribute(name)) {\n            g.attr(name, node.getAttribute(name));\n            node.removeAttribute(name);\n          }\n        }\n      }\n      g?.selectChildren().attr(\"transform\", facetTranslate);\n    }\n  }\n\n  // Wrap the plot in a figure with a caption, if desired.\n  const legends = createLegends(scaleDescriptors, context, options);\n  if (caption != null || legends.length > 0) {\n    figure = document.createElement(\"figure\");\n    figure.style.maxWidth = \"initial\";\n    for (const legend of legends) figure.appendChild(legend);\n    figure.appendChild(svg);\n    if (caption != null) {\n      const figcaption = document.createElement(\"figcaption\");\n      figcaption.appendChild(caption?.ownerDocument ? caption : document.createTextNode(caption));\n      figure.appendChild(figcaption);\n    }\n  }\n\n  figure.scale = exposeScales(scaleDescriptors);\n  figure.legend = exposeLegends(scaleDescriptors, context, options);\n\n  const w = consumeWarnings();\n  if (w > 0) {\n    select(svg)\n      .append(\"text\")\n      .attr(\"x\", width)\n      .attr(\"y\", 20)\n      .attr(\"dy\", \"-1em\")\n      .attr(\"text-anchor\", \"end\")\n      .attr(\"font-family\", \"initial\") // fix emoji rendering in Chrome\n      .text(\"\\u26a0\\ufe0f\") // emoji variation selector\n      .append(\"title\")\n      .text(`${w.toLocaleString(\"en-US\")} warning${w === 1 ? \"\" : \"s\"}. Please check the console.`);\n  }\n\n  return figure;\n}\n\nfunction plotThis({marks = [], ...options} = {}) {\n  return plot({...options, marks: [...marks, this]});\n}\n\n// Note: This side-effect avoids a circular dependency.\nMark.prototype.plot = plotThis;\n\nfunction flatMarks(marks) {\n  return marks\n    .flat(Infinity)\n    .filter((mark) => mark != null)\n    .map(markify);\n}\n\nfunction markify(mark) {\n  return typeof mark.render === \"function\" ? mark : new Render(mark);\n}\n\nclass Render extends Mark {\n  constructor(render) {\n    if (typeof render !== \"function\") throw new TypeError(\"invalid mark; missing render function\");\n    super();\n    this.render = render;\n  }\n  render() {}\n}\n\n// Note: mutates channel.value to apply the scale transform, if any.\nfunction applyScaleTransforms(channels, options) {\n  for (const name in channels) applyScaleTransform(channels[name], options);\n  return channels;\n}\n\n// Note: mutates channel.value to apply the scale transform, if any. Also sets\n// channel.transform to false to prevent duplicate transform application.\nfunction applyScaleTransform(channel, options) {\n  const {scale, transform: t = true} = channel;\n  if (scale == null || !t) return;\n  const {\n    type,\n    percent,\n    interval,\n    transform = percent ? (x) => x * 100 : maybeIntervalTransform(interval, type)\n  } = options[scale] ?? {};\n  if (transform == null) return;\n  channel.value = map(channel.value, transform);\n  channel.transform = false;\n}\n\n// An initializer may generate channels without knowing how the downstream mark\n// will use them. Marks are typically responsible associated scales with\n// channels, but here we assume common behavior across marks.\nfunction inferChannelScales(channels) {\n  for (const name in channels) {\n    inferChannelScale(name, channels[name]);\n  }\n}\n\nfunction addScaleChannels(channelsByScale, stateByMark, options, filter = yes) {\n  for (const {channels} of stateByMark.values()) {\n    for (const name in channels) {\n      const channel = channels[name];\n      const {scale} = channel;\n      if (scale != null && filter(scale)) {\n        // Geo marks affect the default x and y domains if there is no\n        // projection. Skip this (as an optimization) when a projection is\n        // specified, or when the domains for x and y are specified.\n        if (scale === \"projection\") {\n          if (!hasProjection(options)) {\n            const gx = options.x?.domain === undefined;\n            const gy = options.y?.domain === undefined;\n            if (gx || gy) {\n              const [x, y] = getGeometryChannels(channel);\n              if (gx) addScaleChannel(channelsByScale, \"x\", x);\n              if (gy) addScaleChannel(channelsByScale, \"y\", y);\n            }\n          }\n        } else {\n          addScaleChannel(channelsByScale, scale, channel);\n        }\n      }\n    }\n  }\n  return channelsByScale;\n}\n\nfunction addScaleChannel(channelsByScale, scale, channel) {\n  const scaleChannels = channelsByScale.get(scale);\n  if (scaleChannels !== undefined) scaleChannels.push(channel);\n  else channelsByScale.set(scale, [channel]);\n}\n\n// Returns the facet groups, and possibly fx and fy channels, associated with\n// the top-level facet option {data, x, y}.\nfunction maybeTopFacet(facet, options) {\n  if (facet == null) return;\n  const {x, y} = facet;\n  if (x == null && y == null) return;\n  const data = arrayify(facet.data);\n  if (data == null) throw new Error(\"missing facet data\");\n  const channels = {};\n  if (x != null) channels.fx = createChannel(data, {value: x, scale: \"fx\"});\n  if (y != null) channels.fy = createChannel(data, {value: y, scale: \"fy\"});\n  applyScaleTransforms(channels, options);\n  const groups = facetGroups(data, channels);\n  return {channels, groups, data: facet.data};\n}\n\n// Returns the facet groups, and possibly fx and fy channels, associated with a\n// mark, either through top-level faceting or mark-level facet options {fx, fy}.\nfunction maybeMarkFacet(mark, topFacetState, options) {\n  if (mark.facet === null || mark.facet === \"super\") return;\n\n  // This mark defines a mark-level facet. TODO There\u2019s some code duplication\n  // here with maybeTopFacet that we could reduce.\n  const {fx, fy} = mark;\n  if (fx != null || fy != null) {\n    const data = arrayify(mark.data ?? fx ?? fy);\n    if (data === undefined) throw new Error(`missing facet data in ${mark.ariaLabel}`);\n    if (data === null) return; // ignore channel definitions if no data is provided TODO this right?\n    const channels = {};\n    if (fx != null) channels.fx = createChannel(data, {value: fx, scale: \"fx\"});\n    if (fy != null) channels.fy = createChannel(data, {value: fy, scale: \"fy\"});\n    applyScaleTransforms(channels, options);\n    return {channels, groups: facetGroups(data, channels)};\n  }\n\n  // This mark links to a top-level facet, if present.\n  if (topFacetState === undefined) return;\n\n  // TODO Can we link the top-level facet channels here?\n  const {channels, groups, data} = topFacetState;\n  if (mark.facet !== \"auto\" || mark.data === data) return {channels, groups};\n\n  // Warn for the common pitfall of wanting to facet mapped data with the\n  // top-level facet option.\n  if (\n    data.length > 0 &&\n    (groups.size > 1 || (groups.size === 1 && channels.fx && channels.fy && [...groups][0][1].size > 1)) &&\n    arrayify(mark.data)?.length === data.length\n  ) {\n    warn(\n      `Warning: the ${mark.ariaLabel} mark appears to use faceted data, but isn\u2019t faceted. The mark data has the same length as the facet data and the mark facet option is \"auto\", but the mark data and facet data are distinct. If this mark should be faceted, set the mark facet option to true; otherwise, suppress this warning by setting the mark facet option to false.`\n    );\n  }\n}\n\nfunction derive(mark, options = {}) {\n  return initializer({...options, x: null, y: null}, (data, facets, channels, scales, dimensions, context) => {\n    return context.getMarkState(mark);\n  });\n}\n\nfunction inferTips(marks) {\n  const tips = [];\n  for (const mark of marks) {\n    const t = mark.tip;\n    if (t) {\n      const p = t === \"x\" ? pointerX : t === \"y\" ? pointerY : pointer;\n      const options = p(derive(mark)); // TODO tip options?\n      options.title = null; // prevent implicit title for primitive data\n      tips.push(tip(mark.data, options));\n    }\n  }\n  return tips;\n}\n\nfunction inferAxes(marks, channelsByScale, options) {\n  let {\n    projection,\n    x = {},\n    y = {},\n    fx = {},\n    fy = {},\n    axis,\n    grid,\n    facet = {},\n    facet: {axis: facetAxis = axis, grid: facetGrid} = facet,\n    x: {axis: xAxis = axis, grid: xGrid = xAxis === null ? null : grid} = x,\n    y: {axis: yAxis = axis, grid: yGrid = yAxis === null ? null : grid} = y,\n    fx: {axis: fxAxis = facetAxis, grid: fxGrid = fxAxis === null ? null : facetGrid} = fx,\n    fy: {axis: fyAxis = facetAxis, grid: fyGrid = fyAxis === null ? null : facetGrid} = fy\n  } = options;\n\n  // Disable axes if the corresponding scale is not present.\n  if (projection || (!isScaleOptions(x) && !hasPositionChannel(\"x\", marks))) xAxis = xGrid = null;\n  if (projection || (!isScaleOptions(y) && !hasPositionChannel(\"y\", marks))) yAxis = yGrid = null;\n  if (!channelsByScale.has(\"fx\")) fxAxis = fxGrid = null;\n  if (!channelsByScale.has(\"fy\")) fyAxis = fyGrid = null;\n\n  // Resolve the default implicit axes by checking for explicit ones.\n  if (xAxis === undefined) xAxis = !hasAxis(marks, \"x\");\n  if (yAxis === undefined) yAxis = !hasAxis(marks, \"y\");\n  if (fxAxis === undefined) fxAxis = !hasAxis(marks, \"fx\");\n  if (fyAxis === undefined) fyAxis = !hasAxis(marks, \"fy\");\n\n  // Resolve the default orientation of axes.\n  if (xAxis === true) xAxis = \"bottom\";\n  if (yAxis === true) yAxis = \"left\";\n  if (fxAxis === true) fxAxis = xAxis === \"top\" || xAxis === null ? \"bottom\" : \"top\";\n  if (fyAxis === true) fyAxis = yAxis === \"right\" || yAxis === null ? \"left\" : \"right\";\n\n  const axes = [];\n  maybeGrid(axes, fyGrid, gridFy, fy);\n  maybeAxis(axes, fyAxis, axisFy, \"right\", \"left\", facet, fy);\n  maybeGrid(axes, fxGrid, gridFx, fx);\n  maybeAxis(axes, fxAxis, axisFx, \"top\", \"bottom\", facet, fx);\n  maybeGrid(axes, yGrid, gridY, y);\n  maybeAxis(axes, yAxis, axisY, \"left\", \"right\", options, y);\n  maybeGrid(axes, xGrid, gridX, x);\n  maybeAxis(axes, xAxis, axisX, \"bottom\", \"top\", options, x);\n  return axes;\n}\n\nfunction maybeAxis(axes, axis, axisType, primary, secondary, defaults, options) {\n  if (!axis) return;\n  const both = isBoth(axis);\n  options = axisOptions(both ? primary : axis, defaults, options);\n  const {line} = options;\n  if ((axisType === axisY || axisType === axisX) && line && !isNone(line)) axes.push(frame(lineOptions(options)));\n  axes.push(axisType(options));\n  if (both) axes.push(axisType({...options, anchor: secondary, label: null}));\n}\n\nfunction maybeGrid(axes, grid, gridType, options) {\n  if (!grid || isNone(grid)) return;\n  axes.push(gridType(gridOptions(grid, options)));\n}\n\nfunction isBoth(value) {\n  return /^\\s*both\\s*$/i.test(value);\n}\n\nfunction axisOptions(\n  anchor,\n  defaults,\n  {\n    line = defaults.line,\n    ticks,\n    tickSize,\n    tickSpacing,\n    tickPadding,\n    tickFormat,\n    tickRotate,\n    fontVariant,\n    ariaLabel,\n    ariaDescription,\n    label = defaults.label,\n    labelAnchor,\n    labelArrow = defaults.labelArrow,\n    labelOffset\n  }\n) {\n  return {\n    anchor,\n    line,\n    ticks,\n    tickSize,\n    tickSpacing,\n    tickPadding,\n    tickFormat,\n    tickRotate,\n    fontVariant,\n    ariaLabel,\n    ariaDescription,\n    label,\n    labelAnchor,\n    labelArrow,\n    labelOffset\n  };\n}\n\nfunction lineOptions(options) {\n  const {anchor, line} = options;\n  return {anchor, facetAnchor: anchor + \"-empty\", stroke: line === true ? undefined : line};\n}\n\nfunction gridOptions(\n  grid,\n  {\n    stroke = isColor(grid) ? grid : undefined,\n    ticks = isGridTicks(grid) ? grid : undefined,\n    tickSpacing,\n    ariaLabel,\n    ariaDescription\n  }\n) {\n  return {\n    stroke,\n    ticks,\n    tickSpacing,\n    ariaLabel,\n    ariaDescription\n  };\n}\n\nfunction isGridTicks(grid) {\n  switch (typeof grid) {\n    case \"number\":\n      return true;\n    case \"string\":\n      return !isColor(grid);\n  }\n  return isIterable(grid) || typeof grid?.range === \"function\";\n}\n\n// Is there an explicit axis already present? TODO We probably want a more\n// explicit test than looking for the ARIA label, but it does afford some\n// flexibility in axis implementation which is nice.\nfunction hasAxis(marks, k) {\n  const prefix = `${k}-axis `;\n  return marks.some((m) => m.ariaLabel?.startsWith(prefix));\n}\n\nfunction hasPositionChannel(k, marks) {\n  for (const mark of marks) {\n    for (const key in mark.channels) {\n      const {scale} = mark.channels[key];\n      if (scale === k || scale === \"projection\") {\n        return true;\n      }\n    }\n  }\n  return false;\n}\n\nfunction inheritScaleLabels(newScales, scales) {\n  for (const key in newScales) {\n    const newScale = newScales[key];\n    const scale = scales[key];\n    if (newScale.label === undefined && scale) {\n      newScale.label = scale.label;\n    }\n  }\n  return newScales;\n}\n\n// This differs from the other outerDimensions in that it accounts for rounding\n// and outer padding in the fact scales; we want the frame to align exactly with\n// the actual range, not the desired range.\nfunction actualDimensions({fx, fy}, dimensions) {\n  const {marginTop, marginRight, marginBottom, marginLeft, width, height} = outerDimensions(dimensions);\n  const fxr = fx && outerRange(fx);\n  const fyr = fy && outerRange(fy);\n  return {\n    marginTop: fy ? fyr[0] : marginTop,\n    marginRight: fx ? width - fxr[1] : marginRight,\n    marginBottom: fy ? height - fyr[1] : marginBottom,\n    marginLeft: fx ? fxr[0] : marginLeft,\n    // Some marks, namely the x- and y-axis labels, want to know what the\n    // desired (rather than actual) margins are for positioning.\n    inset: {\n      marginTop: dimensions.marginTop,\n      marginRight: dimensions.marginRight,\n      marginBottom: dimensions.marginBottom,\n      marginLeft: dimensions.marginLeft\n    },\n    width,\n    height\n  };\n}\n\nfunction outerRange(scale) {\n  const domain = scale.domain();\n  let x1 = scale(domain[0]);\n  let x2 = scale(domain[domain.length - 1]);\n  if (x2 < x1) [x1, x2] = [x2, x1];\n  return [x1, x2 + scale.bandwidth()];\n}\n", "import {\n  bisect,\n  extent,\n  thresholdFreedmanDiaconis,\n  thresholdScott,\n  thresholdSturges,\n  tickIncrement,\n  ticks,\n  utcTickInterval\n} from \"d3\";\nimport {withTip} from \"../mark.js\";\nimport {\n  coerceDate,\n  coerceNumbers,\n  identity,\n  isIterable,\n  isTemporal,\n  labelof,\n  map,\n  maybeApplyInterval,\n  maybeColorChannel,\n  maybeColumn,\n  maybeRangeInterval,\n  maybeTuple,\n  maybeValue,\n  mid,\n  valueof\n} from \"../options.js\";\nimport {maybeUtcInterval} from \"../time.js\";\nimport {basic} from \"./basic.js\";\nimport {\n  hasOutput,\n  maybeEvaluator,\n  maybeGroup,\n  maybeOutput,\n  maybeOutputs,\n  maybeReduce,\n  maybeSort,\n  maybeSubgroup,\n  reduceCount,\n  reduceFirst,\n  reduceIdentity\n} from \"./group.js\";\nimport {maybeInsetX, maybeInsetY} from \"./inset.js\";\n\n// Group on {z, fill, stroke}, then optionally on y, then bin x.\nexport function binX(outputs = {y: \"count\"}, options = {}) {\n  [outputs, options] = mergeOptions(outputs, options);\n  const {x, y} = options;\n  return binn(maybeBinValue(x, options, identity), null, null, y, outputs, maybeInsetX(options));\n}\n\n// Group on {z, fill, stroke}, then optionally on x, then bin y.\nexport function binY(outputs = {x: \"count\"}, options = {}) {\n  [outputs, options] = mergeOptions(outputs, options);\n  const {x, y} = options;\n  return binn(null, maybeBinValue(y, options, identity), x, null, outputs, maybeInsetY(options));\n}\n\n// Group on {z, fill, stroke}, then bin on x and y.\nexport function bin(outputs = {fill: \"count\"}, options = {}) {\n  [outputs, options] = mergeOptions(outputs, options);\n  const {x, y} = maybeBinValueTuple(options);\n  return binn(x, y, null, null, outputs, maybeInsetX(maybeInsetY(options)));\n}\n\nfunction maybeDenseInterval(bin, k, options = {}) {\n  return options?.interval == null\n    ? options\n    : bin({[k]: options?.reduce === undefined ? reduceFirst : options.reduce, filter: null}, options);\n}\n\nexport function maybeDenseIntervalX(options = {}) {\n  return maybeDenseInterval(binX, \"y\", withTip(options, \"x\"));\n}\n\nexport function maybeDenseIntervalY(options = {}) {\n  return maybeDenseInterval(binY, \"x\", withTip(options, \"y\"));\n}\n\nfunction binn(\n  bx, // optionally bin on x (exclusive with gx)\n  by, // optionally bin on y (exclusive with gy)\n  gx, // optionally group on x (exclusive with bx and gy)\n  gy, // optionally group on y (exclusive with by and gx)\n  {\n    data: reduceData = reduceIdentity, // TODO avoid materializing when unused?\n    filter = reduceCount, // return only non-empty bins by default\n    sort,\n    reverse,\n    ...outputs // output channel definitions\n  } = {},\n  inputs = {} // input channels and options\n) {\n  bx = maybeBin(bx);\n  by = maybeBin(by);\n\n  // Compute the outputs.\n  outputs = maybeBinOutputs(outputs, inputs);\n  reduceData = maybeBinReduce(reduceData, identity);\n  sort = sort == null ? undefined : maybeBinOutput(\"sort\", sort, inputs);\n  filter = filter == null ? undefined : maybeBinEvaluator(\"filter\", filter, inputs);\n\n  // Don\u2019t group on a channel if an output requires it as an input!\n  if (gx != null && hasOutput(outputs, \"x\", \"x1\", \"x2\")) gx = null;\n  if (gy != null && hasOutput(outputs, \"y\", \"y1\", \"y2\")) gy = null;\n\n  // Produce x1, x2, y1, and y2 output channels as appropriate (when binning).\n  const [BX1, setBX1] = maybeColumn(bx);\n  const [BX2, setBX2] = maybeColumn(bx);\n  const [BY1, setBY1] = maybeColumn(by);\n  const [BY2, setBY2] = maybeColumn(by);\n\n  // Produce x or y output channels as appropriate (when grouping).\n  const [k, gk] = gx != null ? [gx, \"x\"] : gy != null ? [gy, \"y\"] : [];\n  const [GK, setGK] = maybeColumn(k);\n\n  // Greedily materialize the z, fill, and stroke channels (if channels and not\n  // constants) so that we can reference them for subdividing groups without\n  // computing them more than once. We also want to consume options that should\n  // only apply to this transform rather than passing them through to the next.\n  const {\n    x,\n    y,\n    z,\n    fill,\n    stroke,\n    x1,\n    x2, // consumed if x is an output\n    y1,\n    y2, // consumed if y is an output\n    domain,\n    cumulative,\n    thresholds,\n    interval,\n    ...options\n  } = inputs;\n  const [GZ, setGZ] = maybeColumn(z);\n  const [vfill] = maybeColorChannel(fill);\n  const [vstroke] = maybeColorChannel(stroke);\n  const [GF, setGF] = maybeColumn(vfill);\n  const [GS, setGS] = maybeColumn(vstroke);\n\n  return {\n    ...(\"z\" in inputs && {z: GZ || z}),\n    ...(\"fill\" in inputs && {fill: GF || fill}),\n    ...(\"stroke\" in inputs && {stroke: GS || stroke}),\n    ...basic(options, (data, facets, plotOptions) => {\n      const K = maybeApplyInterval(valueof(data, k), plotOptions?.[gk]);\n      const Z = valueof(data, z);\n      const F = valueof(data, vfill);\n      const S = valueof(data, vstroke);\n      const G = maybeSubgroup(outputs, {z: Z, fill: F, stroke: S});\n      const groupFacets = [];\n      const groupData = [];\n      const GK = K && setGK([]);\n      const GZ = Z && setGZ([]);\n      const GF = F && setGF([]);\n      const GS = S && setGS([]);\n      const BX1 = bx && setBX1([]);\n      const BX2 = bx && setBX2([]);\n      const BY1 = by && setBY1([]);\n      const BY2 = by && setBY2([]);\n      const bin = bing(bx?.(data), by?.(data));\n      let i = 0;\n      for (const o of outputs) o.initialize(data);\n      if (sort) sort.initialize(data);\n      if (filter) filter.initialize(data);\n      for (const facet of facets) {\n        const groupFacet = [];\n        for (const o of outputs) o.scope(\"facet\", facet);\n        if (sort) sort.scope(\"facet\", facet);\n        if (filter) filter.scope(\"facet\", facet);\n        for (const [f, I] of maybeGroup(facet, G)) {\n          for (const [k, g] of maybeGroup(I, K)) {\n            for (const [b, extent] of bin(g)) {\n              if (filter && !filter.reduce(b, extent)) continue;\n              groupFacet.push(i++);\n              groupData.push(reduceData.reduceIndex(b, data, extent));\n              if (K) GK.push(k);\n              if (Z) GZ.push(G === Z ? f : Z[b[0]]);\n              if (F) GF.push(G === F ? f : F[b[0]]);\n              if (S) GS.push(G === S ? f : S[b[0]]);\n              if (BX1) BX1.push(extent.x1), BX2.push(extent.x2);\n              if (BY1) BY1.push(extent.y1), BY2.push(extent.y2);\n              for (const o of outputs) o.reduce(b, extent);\n              if (sort) sort.reduce(b);\n            }\n          }\n        }\n        groupFacets.push(groupFacet);\n      }\n      maybeSort(groupFacets, sort, reverse);\n      return {data: groupData, facets: groupFacets};\n    }),\n    ...(!hasOutput(outputs, \"x\") && (BX1 ? {x1: BX1, x2: BX2, x: mid(BX1, BX2)} : {x, x1, x2})),\n    ...(!hasOutput(outputs, \"y\") && (BY1 ? {y1: BY1, y2: BY2, y: mid(BY1, BY2)} : {y, y1, y2})),\n    ...(GK && {[gk]: GK}),\n    ...Object.fromEntries(outputs.map(({name, output}) => [name, output]))\n  };\n}\n\n// Allow bin options to be specified as part of outputs; merge them into options.\nfunction mergeOptions({cumulative, domain, thresholds, interval, ...outputs}, options) {\n  return [outputs, {cumulative, domain, thresholds, interval, ...options}];\n}\n\nfunction maybeBinValue(value, {cumulative, domain, thresholds, interval}, defaultValue) {\n  value = {...maybeValue(value)};\n  if (value.domain === undefined) value.domain = domain;\n  if (value.cumulative === undefined) value.cumulative = cumulative;\n  if (value.thresholds === undefined) value.thresholds = thresholds;\n  if (value.interval === undefined) value.interval = interval;\n  if (value.value === undefined) value.value = defaultValue;\n  value.thresholds = maybeThresholds(value.thresholds, value.interval);\n  return value;\n}\n\nfunction maybeBinValueTuple(options) {\n  let {x, y} = options;\n  x = maybeBinValue(x, options);\n  y = maybeBinValue(y, options);\n  [x.value, y.value] = maybeTuple(x.value, y.value);\n  return {x, y};\n}\n\nfunction maybeBin(options) {\n  if (options == null) return;\n  const {value, cumulative, domain = extent, thresholds} = options;\n  const bin = (data) => {\n    let V = valueof(data, value);\n    let T; // bin thresholds\n    if (isTemporal(V) || isTimeThresholds(thresholds)) {\n      V = map(V, coerceDate, Float64Array); // like coerceDates, but faster\n      let [min, max] = typeof domain === \"function\" ? domain(V) : domain;\n      let t = typeof thresholds === \"function\" && !isInterval(thresholds) ? thresholds(V, min, max) : thresholds;\n      if (typeof t === \"number\") t = utcTickInterval(min, max, t);\n      if (isInterval(t)) {\n        if (domain === extent) {\n          min = t.floor(min);\n          max = t.offset(t.floor(max));\n        }\n        t = t.range(min, t.offset(max));\n      }\n      T = t;\n    } else {\n      V = coerceNumbers(V);\n      let [min, max] = typeof domain === \"function\" ? domain(V) : domain;\n      let t = typeof thresholds === \"function\" && !isInterval(thresholds) ? thresholds(V, min, max) : thresholds;\n      if (typeof t === \"number\") {\n        // This differs from d3.ticks with regard to exclusive bounds: we want a\n        // first threshold less than or equal to the minimum, and a last\n        // threshold (strictly) greater than the maximum.\n        if (domain === extent) {\n          let step = tickIncrement(min, max, t);\n          if (isFinite(step)) {\n            if (step > 0) {\n              let r0 = Math.round(min / step);\n              let r1 = Math.round(max / step);\n              if (!(r0 * step <= min)) --r0;\n              if (!(r1 * step > max)) ++r1;\n              let n = r1 - r0 + 1;\n              t = new Float64Array(n);\n              for (let i = 0; i < n; ++i) t[i] = (r0 + i) * step;\n            } else if (step < 0) {\n              step = -step;\n              let r0 = Math.round(min * step);\n              let r1 = Math.round(max * step);\n              if (!(r0 / step <= min)) --r0;\n              if (!(r1 / step > max)) ++r1;\n              let n = r1 - r0 + 1;\n              t = new Float64Array(n);\n              for (let i = 0; i < n; ++i) t[i] = (r0 + i) / step;\n            } else {\n              t = [min];\n            }\n          } else {\n            t = [min];\n          }\n        } else {\n          t = ticks(min, max, t);\n        }\n      } else if (isInterval(t)) {\n        if (domain === extent) {\n          min = t.floor(min);\n          max = t.offset(t.floor(max));\n        }\n        t = t.range(min, t.offset(max));\n      }\n      T = t;\n    }\n    const E = [];\n    if (T.length === 1) E.push([T[0], T[0]]); // collapsed domain\n    else for (let i = 1; i < T.length; ++i) E.push([T[i - 1], T[i]]);\n    E.bin = (cumulative < 0 ? bin1cn : cumulative > 0 ? bin1cp : bin1)(E, T, V);\n    return E;\n  };\n  bin.label = labelof(value);\n  return bin;\n}\n\nexport function maybeThresholds(thresholds, interval, defaultThresholds = thresholdAuto) {\n  if (thresholds === undefined) {\n    return interval === undefined ? defaultThresholds : maybeRangeInterval(interval);\n  }\n  if (typeof thresholds === \"string\") {\n    switch (thresholds.toLowerCase()) {\n      case \"freedman-diaconis\":\n        return thresholdFreedmanDiaconis;\n      case \"scott\":\n        return thresholdScott;\n      case \"sturges\":\n        return thresholdSturges;\n      case \"auto\":\n        return thresholdAuto;\n    }\n    return maybeUtcInterval(thresholds);\n  }\n  return thresholds; // pass array, count, or function to bin.thresholds\n}\n\nfunction maybeBinOutputs(outputs, inputs) {\n  return maybeOutputs(outputs, inputs, maybeBinOutput);\n}\n\nfunction maybeBinOutput(name, reduce, inputs) {\n  return maybeOutput(name, reduce, inputs, maybeBinEvaluator);\n}\n\nfunction maybeBinEvaluator(name, reduce, inputs) {\n  return maybeEvaluator(name, reduce, inputs, maybeBinReduce);\n}\n\nfunction maybeBinReduce(reduce, value) {\n  return maybeReduce(reduce, value, maybeBinReduceFallback);\n}\n\nfunction maybeBinReduceFallback(reduce) {\n  switch (`${reduce}`.toLowerCase()) {\n    case \"x\":\n      return reduceX;\n    case \"x1\":\n      return reduceX1;\n    case \"x2\":\n      return reduceX2;\n    case \"y\":\n      return reduceY;\n    case \"y1\":\n      return reduceY1;\n    case \"y2\":\n      return reduceY2;\n  }\n  throw new Error(`invalid bin reduce: ${reduce}`);\n}\n\nfunction thresholdAuto(values, min, max) {\n  return Math.min(200, thresholdScott(values, min, max));\n}\n\nfunction isTimeThresholds(t) {\n  return isTimeInterval(t) || (isIterable(t) && isTemporal(t));\n}\n\nfunction isTimeInterval(t) {\n  return isInterval(t) && typeof t === \"function\" && t() instanceof Date;\n}\n\nfunction isInterval(t) {\n  return typeof t?.range === \"function\";\n}\n\nfunction bing(EX, EY) {\n  return EX && EY\n    ? function* (I) {\n        const X = EX.bin(I); // first bin on x\n        for (const [ix, [x1, x2]] of EX.entries()) {\n          const Y = EY.bin(X[ix]); // then bin on y\n          for (const [iy, [y1, y2]] of EY.entries()) {\n            yield [Y[iy], {x1, y1, x2, y2}];\n          }\n        }\n      }\n    : EX\n    ? function* (I) {\n        const X = EX.bin(I);\n        for (const [i, [x1, x2]] of EX.entries()) {\n          yield [X[i], {x1, x2}];\n        }\n      }\n    : function* (I) {\n        const Y = EY.bin(I);\n        for (const [i, [y1, y2]] of EY.entries()) {\n          yield [Y[i], {y1, y2}];\n        }\n      };\n}\n\n// non-cumulative distribution\nfunction bin1(E, T, V) {\n  T = coerceNumbers(T); // for faster bisection\n  return (I) => {\n    const B = E.map(() => []);\n    for (const i of I) B[bisect(T, V[i]) - 1]?.push(i); // TODO quantization?\n    return B;\n  };\n}\n\n// cumulative distribution\nfunction bin1cp(E, T, V) {\n  const bin = bin1(E, T, V);\n  return (I) => {\n    const B = bin(I);\n    for (let i = 1, n = B.length; i < n; ++i) {\n      const C = B[i - 1];\n      const b = B[i];\n      for (const j of C) b.push(j);\n    }\n    return B;\n  };\n}\n\n// complementary cumulative distribution\nfunction bin1cn(E, T, V) {\n  const bin = bin1(E, T, V);\n  return (I) => {\n    const B = bin(I);\n    for (let i = B.length - 2; i >= 0; --i) {\n      const C = B[i + 1];\n      const b = B[i];\n      for (const j of C) b.push(j);\n    }\n    return B;\n  };\n}\n\nfunction mid1(x1, x2) {\n  const m = (+x1 + +x2) / 2;\n  return x1 instanceof Date ? new Date(m) : m;\n}\n\nconst reduceX = {\n  reduceIndex(I, X, {x1, x2}) {\n    return mid1(x1, x2);\n  }\n};\n\nconst reduceY = {\n  reduceIndex(I, X, {y1, y2}) {\n    return mid1(y1, y2);\n  }\n};\n\nconst reduceX1 = {\n  reduceIndex(I, X, {x1}) {\n    return x1;\n  }\n};\n\nconst reduceX2 = {\n  reduceIndex(I, X, {x2}) {\n    return x2;\n  }\n};\n\nconst reduceY1 = {\n  reduceIndex(I, X, {y1}) {\n    return y1;\n  }\n};\n\nconst reduceY2 = {\n  reduceIndex(I, X, {y2}) {\n    return y2;\n  }\n};\n", "import {hasX, hasY, identity} from \"../options.js\";\n\nexport function maybeIdentityX(options = {}) {\n  return hasX(options) ? options : {...options, x: identity};\n}\n\nexport function maybeIdentityY(options = {}) {\n  return hasY(options) ? options : {...options, y: identity};\n}\n", "import {InternMap, cumsum, greatest, group, groupSort, max, min, rollup, sum} from \"d3\";\nimport {ascendingDefined, descendingDefined} from \"../defined.js\";\nimport {withTip} from \"../mark.js\";\nimport {maybeApplyInterval, maybeColumn, maybeZ, maybeZero} from \"../options.js\";\nimport {column, field, mid, one, range, valueof} from \"../options.js\";\nimport {basic} from \"./basic.js\";\n\nexport function stackX(stackOptions = {}, options = {}) {\n  if (arguments.length === 1) [stackOptions, options] = mergeOptions(stackOptions);\n  const {y1, y = y1, x, ...rest} = options; // note: consumes x!\n  const [transform, Y, x1, x2] = stack(y, x, \"y\", \"x\", stackOptions, rest);\n  return {...transform, y1, y: Y, x1, x2, x: mid(x1, x2)};\n}\n\nexport function stackX1(stackOptions = {}, options = {}) {\n  if (arguments.length === 1) [stackOptions, options] = mergeOptions(stackOptions);\n  const {y1, y = y1, x} = options;\n  const [transform, Y, X] = stack(y, x, \"y\", \"x\", stackOptions, options);\n  return {...transform, y1, y: Y, x: X};\n}\n\nexport function stackX2(stackOptions = {}, options = {}) {\n  if (arguments.length === 1) [stackOptions, options] = mergeOptions(stackOptions);\n  const {y1, y = y1, x} = options;\n  const [transform, Y, , X] = stack(y, x, \"y\", \"x\", stackOptions, options);\n  return {...transform, y1, y: Y, x: X};\n}\n\nexport function stackY(stackOptions = {}, options = {}) {\n  if (arguments.length === 1) [stackOptions, options] = mergeOptions(stackOptions);\n  const {x1, x = x1, y, ...rest} = options; // note: consumes y!\n  const [transform, X, y1, y2] = stack(x, y, \"x\", \"y\", stackOptions, rest);\n  return {...transform, x1, x: X, y1, y2, y: mid(y1, y2)};\n}\n\nexport function stackY1(stackOptions = {}, options = {}) {\n  if (arguments.length === 1) [stackOptions, options] = mergeOptions(stackOptions);\n  const {x1, x = x1, y} = options;\n  const [transform, X, Y] = stack(x, y, \"x\", \"y\", stackOptions, options);\n  return {...transform, x1, x: X, y: Y};\n}\n\nexport function stackY2(stackOptions = {}, options = {}) {\n  if (arguments.length === 1) [stackOptions, options] = mergeOptions(stackOptions);\n  const {x1, x = x1, y} = options;\n  const [transform, X, , Y] = stack(x, y, \"x\", \"y\", stackOptions, options);\n  return {...transform, x1, x: X, y: Y};\n}\n\nexport function maybeStackX({x, x1, x2, ...options} = {}) {\n  options = withTip(options, \"y\");\n  if (x1 === undefined && x2 === undefined) return stackX({x, ...options});\n  [x1, x2] = maybeZero(x, x1, x2);\n  return {...options, x1, x2};\n}\n\nexport function maybeStackY({y, y1, y2, ...options} = {}) {\n  options = withTip(options, \"x\");\n  if (y1 === undefined && y2 === undefined) return stackY({y, ...options});\n  [y1, y2] = maybeZero(y, y1, y2);\n  return {...options, y1, y2};\n}\n\n// The reverse option is ambiguous: it is both a stack option and a basic\n// transform. If only one options object is specified, we interpret it as a\n// stack option, and therefore must remove it from the propagated options.\nfunction mergeOptions(options) {\n  const {offset, order, reverse, ...rest} = options;\n  return [{offset, order, reverse}, rest];\n}\n\n// This is a hint to the tooltip mark that the y1 and y2 channels (for stackY,\n// or conversely x1 and x2 for stackX) represent a stacked length, and that the\n// tooltip should therefore show y2-y1 instead of an extent.\nconst lengthy = {length: true};\n\nfunction stack(x, y = one, kx, ky, {offset, order, reverse}, options) {\n  const z = maybeZ(options);\n  const [X, setX] = maybeColumn(x);\n  const [Y1, setY1] = column(y);\n  const [Y2, setY2] = column(y);\n  Y1.hint = Y2.hint = lengthy;\n  offset = maybeOffset(offset);\n  order = maybeOrder(order, offset, ky);\n  return [\n    basic(options, (data, facets, plotOptions) => {\n      const X = x == null ? undefined : setX(maybeApplyInterval(valueof(data, x), plotOptions?.[kx]));\n      const Y = valueof(data, y, Float64Array);\n      const Z = valueof(data, z);\n      const compare = order && order(data, X, Y, Z);\n      const n = data.length;\n      const Y1 = setY1(new Float64Array(n));\n      const Y2 = setY2(new Float64Array(n));\n      const facetstacks = [];\n      for (const facet of facets) {\n        const stacks = X ? Array.from(group(facet, (i) => X[i]).values()) : [facet];\n        if (compare) for (const stack of stacks) stack.sort(compare);\n        for (const stack of stacks) {\n          let yn = 0;\n          let yp = 0;\n          if (reverse) stack.reverse();\n          for (const i of stack) {\n            const y = Y[i];\n            if (y < 0) yn = Y2[i] = (Y1[i] = yn) + y;\n            else if (y > 0) yp = Y2[i] = (Y1[i] = yp) + y;\n            else Y2[i] = Y1[i] = yp; // NaN or zero\n          }\n        }\n        facetstacks.push(stacks);\n      }\n      if (offset) offset(facetstacks, Y1, Y2, Z);\n      return {data, facets};\n    }),\n    X,\n    Y1,\n    Y2\n  ];\n}\n\nfunction maybeOffset(offset) {\n  if (offset == null) return;\n  if (typeof offset === \"function\") return offset;\n  switch (`${offset}`.toLowerCase()) {\n    case \"expand\":\n    case \"normalize\":\n      return offsetExpand;\n    case \"center\":\n    case \"silhouette\":\n      return offsetCenter;\n    case \"wiggle\":\n      return offsetWiggle;\n  }\n  throw new Error(`unknown offset: ${offset}`);\n}\n\n// Given a single stack, returns the minimum and maximum values from the given\n// Y2 column. Note that this relies on Y2 always being the outer column for\n// diverging values.\nfunction extent(stack, Y2) {\n  let min = 0,\n    max = 0;\n  for (const i of stack) {\n    const y = Y2[i];\n    if (y < min) min = y;\n    if (y > max) max = y;\n  }\n  return [min, max];\n}\n\nfunction offsetExpand(facetstacks, Y1, Y2) {\n  for (const stacks of facetstacks) {\n    for (const stack of stacks) {\n      const [yn, yp] = extent(stack, Y2);\n      for (const i of stack) {\n        const m = 1 / (yp - yn || 1);\n        Y1[i] = m * (Y1[i] - yn);\n        Y2[i] = m * (Y2[i] - yn);\n      }\n    }\n  }\n}\n\nfunction offsetCenter(facetstacks, Y1, Y2) {\n  for (const stacks of facetstacks) {\n    for (const stack of stacks) {\n      const [yn, yp] = extent(stack, Y2);\n      for (const i of stack) {\n        const m = (yp + yn) / 2;\n        Y1[i] -= m;\n        Y2[i] -= m;\n      }\n    }\n    offsetZero(stacks, Y1, Y2);\n  }\n  offsetCenterFacets(facetstacks, Y1, Y2);\n}\n\nfunction offsetWiggle(facetstacks, Y1, Y2, Z) {\n  for (const stacks of facetstacks) {\n    const prev = new InternMap();\n    let y = 0;\n    for (const stack of stacks) {\n      let j = -1;\n      const Fi = stack.map((i) => Math.abs(Y2[i] - Y1[i]));\n      const Df = stack.map((i) => {\n        j = Z ? Z[i] : ++j;\n        const value = Y2[i] - Y1[i];\n        const diff = prev.has(j) ? value - prev.get(j) : 0;\n        prev.set(j, value);\n        return diff;\n      });\n      const Cf1 = [0, ...cumsum(Df)];\n      for (const i of stack) {\n        Y1[i] += y;\n        Y2[i] += y;\n      }\n      const s1 = sum(Fi);\n      if (s1) y -= sum(Fi, (d, i) => (Df[i] / 2 + Cf1[i]) * d) / s1;\n    }\n    offsetZero(stacks, Y1, Y2);\n  }\n  offsetCenterFacets(facetstacks, Y1, Y2);\n}\n\nfunction offsetZero(stacks, Y1, Y2) {\n  const m = min(stacks, (stack) => min(stack, (i) => Y1[i]));\n  for (const stack of stacks) {\n    for (const i of stack) {\n      Y1[i] -= m;\n      Y2[i] -= m;\n    }\n  }\n}\n\nfunction offsetCenterFacets(facetstacks, Y1, Y2) {\n  const n = facetstacks.length;\n  if (n === 1) return;\n  const facets = facetstacks.map((stacks) => stacks.flat());\n  const m = facets.map((I) => (min(I, (i) => Y1[i]) + max(I, (i) => Y2[i])) / 2);\n  const m0 = min(m);\n  for (let j = 0; j < n; j++) {\n    const p = m0 - m[j];\n    for (const i of facets[j]) {\n      Y1[i] += p;\n      Y2[i] += p;\n    }\n  }\n}\n\nfunction maybeOrder(order, offset, ky) {\n  if (order === undefined && offset === offsetWiggle) return orderInsideOut(ascendingDefined);\n  if (order == null) return;\n  if (typeof order === \"string\") {\n    const negate = order.startsWith(\"-\");\n    const compare = negate ? descendingDefined : ascendingDefined;\n    switch ((negate ? order.slice(1) : order).toLowerCase()) {\n      case \"value\":\n      case ky:\n        return orderY(compare);\n      case \"z\":\n        return orderZ(compare);\n      case \"sum\":\n        return orderSum(compare);\n      case \"appearance\":\n        return orderAppearance(compare);\n      case \"inside-out\":\n        return orderInsideOut(compare);\n    }\n    return orderAccessor(field(order));\n  }\n  if (typeof order === \"function\") return (order.length === 1 ? orderAccessor : orderComparator)(order);\n  if (Array.isArray(order)) return orderGiven(order);\n  throw new Error(`invalid order: ${order}`);\n}\n\n// by value\nfunction orderY(compare) {\n  return (data, X, Y) => (i, j) => compare(Y[i], Y[j]);\n}\n\n// by location\nfunction orderZ(compare) {\n  return (data, X, Y, Z) => (i, j) => compare(Z[i], Z[j]);\n}\n\n// by sum of value (a.k.a. \u201Cascending\u201D)\nfunction orderSum(compare) {\n  return orderZDomain(compare, (data, X, Y, Z) =>\n    groupSort(\n      range(data),\n      (I) => sum(I, (i) => Y[i]),\n      (i) => Z[i]\n    )\n  );\n}\n\n// by x = argmax of value\nfunction orderAppearance(compare) {\n  return orderZDomain(compare, (data, X, Y, Z) =>\n    groupSort(\n      range(data),\n      (I) => X[greatest(I, (i) => Y[i])],\n      (i) => Z[i]\n    )\n  );\n}\n\n// by x = argmax of value, but rearranged inside-out by alternating series\n// according to the sign of a running divergence of sums\nfunction orderInsideOut(compare) {\n  return orderZDomain(compare, (data, X, Y, Z) => {\n    const I = range(data);\n    const K = groupSort(\n      I,\n      (I) => X[greatest(I, (i) => Y[i])],\n      (i) => Z[i]\n    );\n    const sums = rollup(\n      I,\n      (I) => sum(I, (i) => Y[i]),\n      (i) => Z[i]\n    );\n    const Kp = [],\n      Kn = [];\n    let s = 0;\n    for (const k of K) {\n      if (s < 0) {\n        s += sums.get(k);\n        Kp.push(k);\n      } else {\n        s -= sums.get(k);\n        Kn.push(k);\n      }\n    }\n    return Kn.reverse().concat(Kp);\n  });\n}\n\nfunction orderAccessor(f) {\n  return (data) => {\n    const O = valueof(data, f);\n    return (i, j) => ascendingDefined(O[i], O[j]);\n  };\n}\n\nfunction orderComparator(f) {\n  return (data) => (i, j) => f(data[i], data[j]);\n}\n\nfunction orderGiven(domain) {\n  return orderZDomain(ascendingDefined, () => domain);\n}\n\n// Given an ordering (domain) of distinct values in z that can be derived from\n// the data, returns a comparator that can be used to sort stacks. Note that\n// this is a series order: it will be consistent across stacks.\nfunction orderZDomain(compare, domain) {\n  return (data, X, Y, Z) => {\n    if (!Z) throw new Error(\"missing channel: z\");\n    const map = new InternMap(domain(data, X, Y, Z).map((d, i) => [d, i]));\n    return (i, j) => compare(map.get(Z[i]), map.get(Z[j]));\n  };\n}\n", "import {create} from \"../context.js\";\nimport {Mark} from \"../mark.js\";\nimport {hasXY, identity, indexOf, number} from \"../options.js\";\nimport {isCollapsed} from \"../scales.js\";\nimport {applyAttr, applyChannelStyles, applyDirectStyles, applyIndirectStyles, applyTransform} from \"../style.js\";\nimport {impliedString} from \"../style.js\";\nimport {maybeIdentityX, maybeIdentityY} from \"../transforms/identity.js\";\nimport {maybeTrivialIntervalX, maybeTrivialIntervalY} from \"../transforms/interval.js\";\nimport {maybeStackX, maybeStackY} from \"../transforms/stack.js\";\n\nconst defaults = {\n  ariaLabel: \"rect\"\n};\n\nexport class Rect extends Mark {\n  constructor(data, options = {}) {\n    const {\n      x1,\n      y1,\n      x2,\n      y2,\n      inset = 0,\n      insetTop = inset,\n      insetRight = inset,\n      insetBottom = inset,\n      insetLeft = inset,\n      rx,\n      ry\n    } = options;\n    super(\n      data,\n      {\n        x1: {value: x1, scale: \"x\", optional: true},\n        y1: {value: y1, scale: \"y\", optional: true},\n        x2: {value: x2, scale: \"x\", optional: true},\n        y2: {value: y2, scale: \"y\", optional: true}\n      },\n      options,\n      defaults\n    );\n    this.insetTop = number(insetTop);\n    this.insetRight = number(insetRight);\n    this.insetBottom = number(insetBottom);\n    this.insetLeft = number(insetLeft);\n    this.rx = impliedString(rx, \"auto\"); // number or percentage\n    this.ry = impliedString(ry, \"auto\");\n  }\n  render(index, scales, channels, dimensions, context) {\n    const {x, y} = scales;\n    const {x1: X1, y1: Y1, x2: X2, y2: Y2} = channels;\n    const {marginTop, marginRight, marginBottom, marginLeft, width, height} = dimensions;\n    const {projection} = context;\n    const {insetTop, insetRight, insetBottom, insetLeft, rx, ry} = this;\n    return create(\"svg:g\", context)\n      .call(applyIndirectStyles, this, dimensions, context)\n      .call(applyTransform, this, {x: X1 && X2 && x, y: Y1 && Y2 && y}, 0, 0)\n      .call((g) =>\n        g\n          .selectAll()\n          .data(index)\n          .enter()\n          .append(\"rect\")\n          .call(applyDirectStyles, this)\n          .attr(\n            \"x\",\n            X1 && X2 && (projection || !isCollapsed(x))\n              ? (i) => Math.min(X1[i], X2[i]) + insetLeft\n              : marginLeft + insetLeft\n          )\n          .attr(\n            \"y\",\n            Y1 && Y2 && (projection || !isCollapsed(y))\n              ? (i) => Math.min(Y1[i], Y2[i]) + insetTop\n              : marginTop + insetTop\n          )\n          .attr(\n            \"width\",\n            X1 && X2 && (projection || !isCollapsed(x))\n              ? (i) => Math.max(0, Math.abs(X2[i] - X1[i]) - insetLeft - insetRight)\n              : width - marginRight - marginLeft - insetRight - insetLeft\n          )\n          .attr(\n            \"height\",\n            Y1 && Y2 && (projection || !isCollapsed(y))\n              ? (i) => Math.max(0, Math.abs(Y1[i] - Y2[i]) - insetTop - insetBottom)\n              : height - marginTop - marginBottom - insetTop - insetBottom\n          )\n          .call(applyAttr, \"rx\", rx)\n          .call(applyAttr, \"ry\", ry)\n          .call(applyChannelStyles, this, channels)\n      )\n      .node();\n  }\n}\n\nexport function rect(data, options) {\n  return new Rect(data, maybeTrivialIntervalX(maybeTrivialIntervalY(options)));\n}\n\nexport function rectX(data, options = {}) {\n  if (!hasXY(options)) options = {...options, y: indexOf, x2: identity, interval: 1};\n  return new Rect(data, maybeStackX(maybeTrivialIntervalY(maybeIdentityX(options))));\n}\n\nexport function rectY(data, options = {}) {\n  if (!hasXY(options)) options = {...options, x: indexOf, y2: identity, interval: 1};\n  return new Rect(data, maybeStackY(maybeTrivialIntervalX(maybeIdentityY(options))));\n}\n", "/**\n * @license\n * Copyright 2021 The Go Authors. All rights reserved.\n * Use of this source code is governed by a BSD-style\n * license that can be found in the LICENSE file.\n */\n\n/**\n * ToolTipController handles closing tooltips on external clicks.\n */\nexport class ToolTipController {\n  constructor(private el: HTMLDetailsElement) {\n    document.addEventListener(\"click\", (e) => {\n      const insideTooltip = this.el.contains(e.target as Element);\n      if (!insideTooltip) {\n        this.el.removeAttribute(\"open\");\n      }\n    });\n  }\n}\n", "/**\n * @license\n * Copyright 2023 The Go Authors. All rights reserved.\n * Use of this source code is governed by a BSD-style\n * license that can be found in the LICENSE file.\n */\n\nimport { ToolTipController } from \"./_tooltip\";\n\nfor (const el of document.querySelectorAll<HTMLDetailsElement>(\".js-tooltip\")) {\n  new ToolTipController(el);\n}\n", "/**\n * @license\n * Copyright 2023 The Go Authors. All rights reserved.\n * Use of this source code is governed by a BSD-style\n * license that can be found in the LICENSE file.\n */\n\nimport * as Plot from \"@observablehq/plot\";\n\nimport \"../shared/base\";\n\ndeclare global {\n  interface Page {\n    Charts: ChartData;\n  }\n\n  interface ChartData {\n    Programs: Program[];\n    DateRange: [string, string];\n    UploadDay: Plot.TimeIntervalName\n  }\n\n  interface Program {\n    ID: string;\n    Name: string;\n    Counters: Counter[];\n    Active: boolean;\n  }\n\n  interface Counter {\n    ID: string;\n    Name: string;\n    Data: Datum[];\n  }\n\n  interface Datum {\n    [key: string]: any;\n    Week: string;\n    Program: string;\n    Version: string;\n    GOARCH: string;\n    GOOS: string;\n    GoVersion: string;\n    Key: string;\n    Value: number;\n  }\n  const Page: Page;\n}\n\nwindow.onload = function () {\n  drawCharts();\n  configSelector();\n  breadcrumbController();\n  sectionController();\n};\n\n// sectionController adds event listeners to the section headers\n// to toggle them open and closed.\nfunction sectionController() {\n  const html = document.querySelector(\"html\")!;\n  for (const e of document.querySelectorAll(\"h2\")) {\n    e.addEventListener(\"click\", function () {\n      let closed = localStorage.getItem(\"closed-sections\")?.split(\",\");\n      if (closed?.includes(this.id)) {\n        closed = closed.filter((v) => v !== this.id);\n        const str = closed.join(\",\");\n        localStorage.setItem(\"closed-sections\", str);\n        html.setAttribute(\"data-closed-sections\", str);\n      } else {\n        closed = [this.id].concat(closed ?? []);\n        const str = closed.join(\",\");\n        localStorage.setItem(\"closed-sections\", str);\n        html.setAttribute(\"data-closed-sections\", str);\n      }\n    });\n  }\n}\n\n// drawCharts draws the charts using @observable/plot. It is called when\n// the page is first rendered and when a facet is selected.\nfunction drawCharts() {\n  for (const program of Page.Charts.Programs ?? []) {\n    for (const counter of program.Counters ?? []) {\n      const rectYOpts: Plot.BinXInputs<Plot.RectYOptions> = {\n        tip: true,\n        x: (d: Datum) => new Date(d.Week),\n        y: (d: Datum) => d.Value,\n        interval: Page.Charts.UploadDay,\n        fill: (d: Datum) => {\n          const n = Number(d.Key);\n          return isNaN(n) ? d.Key : n;\n        },\n      };\n\n      const chart = Plot.plot({\n        nice: true,\n        x: {\n          type: \"utc\",\n          domain: Page.Charts.DateRange.map((d) => new Date(d)),\n          label: \"Week\",\n        },\n        y: {\n          label: \"Value\",\n        },\n        color: {\n          type: \"ordinal\",\n          legend: true,\n          scheme: \"Spectral\",\n          reverse: true,\n          label: \"Counter\",\n        },\n        height: 256,\n        style: \"overflow:visible;width:100%;background:transparent\",\n        marks: [\n          Plot.rectY(counter.Data, Plot.binX({ y: \"sum\" }, rectYOpts)),\n          Plot.ruleY([0]),\n        ],\n      });\n      document\n        .querySelector(`[data-chart-id=\"${counter.ID}\"]`)\n        ?.replaceChildren(chart);\n    }\n  }\n}\n\n// configSelector adds an event listener that reloads the page when a config\n// version is selected.\nfunction configSelector() {\n  const el = document.querySelector<HTMLButtonElement>(\".js-selectConfig\");\n  el?.addEventListener(\"change\", () => {\n    const params = new URLSearchParams(location.search);\n    params.set(el.name, el.value);\n    history.replaceState(null, \"\", \"?\" + params.toString());\n    location.reload();\n  });\n}\n\n// breadcrumbController updates the navigation header as the user scrolls\n// that page displaying information about the content currently in the\n// viewport.\nfunction breadcrumbController() {\n  const headings =\n    document.querySelectorAll<HTMLHeadingElement>(\"h1, h2, h3, h4\");\n  const callback = debounce(() => {\n    let above: HTMLHeadingElement[] = [];\n    for (const h of headings) {\n      const rect = h.getBoundingClientRect();\n      if (rect.height && rect.top < 80) {\n        above.unshift(h);\n      }\n    }\n    if (above.length < 2) {\n      above = [];\n    }\n    let threshold = Infinity;\n    const els: HTMLHeadingElement[] = [];\n    for (const h of above) {\n      const level = Number(h.tagName[1]);\n      if (level < threshold) {\n        threshold = level;\n        els.unshift(h);\n      }\n    }\n    const breadcrumb = document.querySelector(\".js-breadcrumb ol\");\n    const items = [];\n    for (const h of els) {\n      breadcrumb?.replaceChildren;\n      const li = document.createElement(\"li\");\n      const a = document.createElement(\"a\");\n      a.href = `#${h.id}`;\n      a.innerText = h.getAttribute(\"data-label\") ?? h.innerText;\n      li.appendChild(a);\n      items.push(li);\n    }\n    breadcrumb?.replaceChildren(...items);\n  }, 100);\n\n  const observer = new IntersectionObserver(callback);\n  for (const h of headings) {\n    observer.observe(h);\n  }\n}\n\nfunction debounce<T extends (...args: unknown[]) => unknown>(\n  callback: T,\n  wait: number\n) {\n  let timeout: number;\n  return (...args: unknown[]) => {\n    clearTimeout(timeout);\n    timeout = setTimeout(() => callback(...args), wait);\n  };\n}\n\nexport { };\n"],
-  "mappings": ";mBAAe,SAARA,GAA2BC,EAAGC,EAAG,CACtC,OAAOD,GAAK,MAAQC,GAAK,KAAO,IAAMD,EAAIC,EAAI,GAAKD,EAAIC,EAAI,EAAID,GAAKC,EAAI,EAAI,GAC9E,CCFe,SAARC,GAA4BC,EAAGC,EAAG,CACvC,OAAOD,GAAK,MAAQC,GAAK,KAAO,IAC5BA,EAAID,EAAI,GACRC,EAAID,EAAI,EACRC,GAAKD,EAAI,EACT,GACN,CCHe,SAARE,GAA0BC,EAAG,CAClC,IAAIC,EAAUC,EAAUC,EAOpBH,EAAE,SAAW,GACfC,EAAWG,GACXF,EAAW,CAACG,EAAGC,IAAMF,GAAUJ,EAAEK,CAAC,EAAGC,CAAC,EACtCH,EAAQ,CAACE,EAAGC,IAAMN,EAAEK,CAAC,EAAIC,IAEzBL,EAAWD,IAAMI,IAAaJ,IAAMO,GAAaP,EAAIQ,GACrDN,EAAWF,EACXG,EAAQH,GAGV,SAASS,EAAKC,EAAGJ,EAAGK,EAAK,EAAGC,EAAKF,EAAE,OAAQ,CACzC,GAAIC,EAAKC,EAAI,CACX,GAAIX,EAASK,EAAGA,CAAC,IAAM,EAAG,OAAOM,EACjC,EAAG,CACD,IAAMC,EAAOF,EAAKC,IAAQ,EACtBV,EAASQ,EAAEG,CAAG,EAAGP,CAAC,EAAI,EAAGK,EAAKE,EAAM,EACnCD,EAAKC,QACHF,EAAKC,GAEhB,OAAOD,CACT,CAEA,SAASG,EAAMJ,EAAGJ,EAAGK,EAAK,EAAGC,EAAKF,EAAE,OAAQ,CAC1C,GAAIC,EAAKC,EAAI,CACX,GAAIX,EAASK,EAAGA,CAAC,IAAM,EAAG,OAAOM,EACjC,EAAG,CACD,I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PD,EACAa,EACA,CACA,IAAIC,EACJ,MAAO,IAAIC,IAAoB,CAC7B,aAAaD,CAAO,EACpBA,EAAU,WAAW,IAAMd,EAAS,GAAGe,CAAI,EAAGF,CAAI,CACpD,CACF",
-  "names": ["ascending", "a", "b", "descending", "a", "b", "bisector", "f", "compare1", "compare2", "delta", "ascending", "d", "x", "descending", "zero", "left", "a", "lo", "hi", "mid", "right", "center", "i", "number", "x", "numbers", "values", "valueof", "value", "index", "ascendingBisect", "bisector", "ascending", "bisectRight", "bisectLeft", "bisectCenter", "number", "bisect_default", "count", "values", "valueof", "value", "index", "length", "array", "empty", "arrayify", "values", "reducer", "reduce", "cross", "lengths", "j", "index", "product", "i", "cumsum", "values", "valueof", "sum", "index", "v", "variance", "values", "valueof", "count", "delta", "mean", "sum", "value", "index", "deviation", "values", "valueof", "v", "variance", "extent", "values", "valueof", "min", "max", "value", "index", "Adder", "x", "p", "i", "j", "y", "hi", "lo", "InternMap", "entries", "key", "keyof", "value", "intern_get", "intern_set", "intern_delete", "InternSet", "values", "_intern", "_key", "identity", "x", "group", "values", "keys", "nest", "identity", "rollup", "values", "reduce", "keys", "nest", "identity", "rollups", "nest", "values", "map", "reduce", "keys", "regroup", "i", "groups", "InternMap", "keyof", "index", "value", "key", "group", "permute", "source", "keys", "key", "sort", "values", "F", "f", "index", "d", "i", "j", "c", "ascendingDefined", "permute", "compareDefined", "compare", "ascending", "a", "b", "x", "groupSort", "values", "reduce", "key", "sort", "rollup", "ak", "av", "bk", "bv", "ascending", "group", "e10", "e5", "e2", "tickSpec", "start", "stop", "count", "step", "power", "error", "factor", "i1", "i2", "inc", "ticks", "reverse", "n", "i", "tickIncrement", "tickStep", "thresholdSturges", "values", "count", "max", "values", "valueof", "value", "index", "maxIndex", "values", "valueof", "max", "index", "value", "min", "values", "valueof", "value", "index", "minIndex", "values", "valueof", "min", "index", "value", "quickselect", "array", "k", "left", "right", "compare", "ascendingDefined", "compareDefined", "n", "m", "z", "s", "sd", "newLeft", "newRight", "t", "i", "j", "swap", "greatest", "values", "compare", "ascending", "max", "defined", "maxValue", "element", "value", "quantile", "values", "p", "valueof", "numbers", "n", "min", "max", "i", "i0", "value0", "quickselect", "value1", "quantileSorted", "number", "thresholdFreedmanDiaconis", "values", "min", "max", "c", "count", "d", "quantile", "thresholdScott", "values", "min", "max", "c", "count", "d", "deviation", "mean", "values", "valueof", "count", "sum", "value", "index", "median", "values", "valueof", "quantile", "flatten", "arrays", "array", "merge", "mode", "values", "valueof", "counts", "InternMap", "value", "index", "modeValue", "modeCount", "count", "pairs", "values", "pairof", "pair", "previous", "first", "value", "a", "b", "range", "start", "stop", "step", "n", "i", "sum", "values", "valueof", "value", "index", "reverse", "values", "identity_default", "x", "top", "right", "bottom", "left", "epsilon", "translateX", "x", "translateY", "y", "number", "scale", "d", "center", "offset", "entering", "axis", "orient", "tickArguments", "tickValues", "tickFormat", "tickSizeInner", "tickSizeOuter", "tickPadding", "k", "transform", "context", "values", "format", "identity_default", "spacing", "range", "range0", "range1", "position", "selection", "path", "tick", "tickExit", "tickEnter", "line", "text", "p", "_", "axisBottom", "scale", "axis", "bottom", "noop", "dispatch", "i", "n", "_", "t", "Dispatch", "parseTypenames", "typenames", "types", "name", "typename", "callback", "T", "get", "set", "copy", "type", "that", "args", "c", "dispatch_default", "xhtml", "namespaces_default", "namespace_default", "name", "prefix", "i", "namespaces_default", "creatorInherit", "name", "document", "uri", "xhtml", "creatorFixed", "fullname", "creator_default", "namespace_default", "none", "selector_default", "selector", "select_default", "select", "selector_default", "groups", "m", "subgroups", "j", "group", "n", "subgroup", "node", "subnode", "i", "Selection", "array", "x", "empty", "selectorAll_default", "selector", "arrayAll", "select", "array", "selectAll_default", "selectorAll_default", "groups", "m", "subgroups", "parents", "j", "group", "n", "node", "i", "Selection", "matcher_default", "selector", "childMatcher", "node", "find", "childFind", "match", "childFirst", "selectChild_default", "childMatcher", "filter", "children", "childrenFilter", "match", "selectChildren_default", "childMatcher", "filter_default", "match", "matcher_default", "groups", "m", "subgroups", "j", "group", "n", "subgroup", "node", "i", "Selection", "sparse_default", "update", "enter_default", "Selection", "sparse_default", "EnterNode", "parent", "datum", "child", "next", "selector", "constant_default", "x", "bindIndex", "parent", "group", "enter", "update", "exit", "data", "i", "node", "groupLength", "dataLength", "EnterNode", "bindKey", "key", "nodeByKeyValue", "keyValues", "keyValue", "datum", "data_default", "value", "bind", "parents", "groups", "constant_default", "m", "j", "arraylike", "enterGroup", "updateGroup", "exitGroup", "i0", "i1", "previous", "next", "Selection", "exit_default", "Selection", "sparse_default", "join_default", "onenter", "onupdate", "onexit", "enter", "update", "exit", "merge_default", "context", "selection", "groups0", "groups1", "m0", "m1", "m", "merges", "j", "group0", "group1", "n", "merge", "node", "i", "Selection", "order_default", "groups", "j", "m", "group", "i", "next", "node", "sort_default", "compare", "ascending", "compareNode", "a", "b", "groups", "m", "sortgroups", "j", "group", "n", "sortgroup", "node", "i", "Selection", "call_default", "callback", "nodes_default", "node_default", "groups", "j", "m", "group", "i", "n", "node", "size_default", "size", "node", "empty_default", "each_default", "callback", "groups", "j", "m", "group", "n", "node", "attrRemove", "name", "attrRemoveNS", "fullname", "attrConstant", "value", "attrConstantNS", "attrFunction", "v", "attrFunctionNS", "attr_default", "namespace_default", "node", "window_default", "node", "styleRemove", "name", "styleConstant", "value", "priority", "styleFunction", "v", "style_default", "styleValue", "node", "window_default", "propertyRemove", "name", "propertyConstant", "value", "propertyFunction", "v", "property_default", "classArray", "string", "classList", "node", "ClassList", "name", "i", "classedAdd", "names", "list", "n", "classedRemove", "classedTrue", "classedFalse", "classedFunction", "value", "classed_default", "textRemove", "textConstant", "value", "textFunction", "v", "text_default", "htmlRemove", "htmlConstant", "value", "htmlFunction", "v", "html_default", "raise", "raise_default", "lower", "lower_default", "append_default", "name", "create", "creator_default", "constantNull", "insert_default", "name", "before", "create", "creator_default", "select", "selector_default", "remove", "parent", "remove_default", "selection_cloneShallow", "clone", "parent", "selection_cloneDeep", "clone_default", "deep", "datum_default", "value", "contextListener", "listener", "event", "parseTypenames", "typenames", "t", "name", "i", "onRemove", "typename", "on", "j", "m", "o", "onAdd", "value", "options", "on_default", "n", "dispatchEvent", "node", "type", "params", "window", "window_default", "event", "dispatchConstant", "dispatchFunction", "dispatch_default", "iterator_default", "groups", "j", "m", "group", "i", "n", "node", "root", "Selection", "groups", "parents", "selection", "selection_selection", "select_default", "selectAll_default", "selectChild_default", "selectChildren_default", "filter_default", "data_default", "enter_default", "exit_default", "join_default", "merge_default", "order_default", "sort_default", "call_default", "nodes_default", "node_default", "size_default", "empty_default", "each_default", "attr_default", "style_default", "property_default", "classed_default", "text_default", "html_default", "raise_default", "lower_default", "append_default", "insert_default", "remove_default", "clone_default", "datum_default", "on_default", "dispatch_default", "iterator_default", "selection_default", "select_default", "selector", "Selection", "root", "sourceEvent_default", "event", "sourceEvent", "pointer_default", "event", "node", "sourceEvent_default", "svg", "point", "rect", "define_default", "constructor", "factory", "prototype", "extend", "parent", "definition", "key", "Color", "darker", "brighter", "reI", "reN", "reP", "reHex", "reRgbInteger", "reRgbPercent", "reRgbaInteger", "reRgbaPercent", "reHslPercent", "reHslaPercent", "named", "define_default", "color", "channels", "color_formatHex", "color_formatHex8", "color_formatHsl", "color_formatRgb", "hslConvert", "format", "m", "l", "rgbn", "Rgb", "rgba", "hsla", "n", "r", "g", "b", "a", "rgbConvert", "o", "rgb", "opacity", "extend", "k", "clampi", "clampa", "rgb_formatHex", "rgb_formatHex8", "rgb_formatRgb", "hex", "value", "h", "s", "Hsl", "min", "max", "hsl", "m2", "m1", "hsl2rgb", "clamph", "clampt", "radians", "degrees", "K", "Xn", "Yn", "Zn", "t0", "t1", "t2", "t3", "labConvert", "o", "Lab", "Hcl", "hcl2lab", "Rgb", "rgbConvert", "r", "rgb2lrgb", "g", "b", "y", "xyz2lab", "x", "z", "lab", "l", "a", "b", "opacity", "labConvert", "Lab", "define_default", "extend", "Color", "k", "K", "y", "x", "z", "Xn", "lab2xyz", "Yn", "Zn", "Rgb", "lrgb2rgb", "xyz2lab", "t3", "t2", "t0", "t1", "rgb2lrgb", "hclConvert", "o", "Hcl", "h", "degrees", "hcl", "h", "c", "l", "opacity", "hclConvert", "Hcl", "hcl2lab", "o", "Lab", "radians", "define_default", "extend", "Color", "k", "K", "A", "B", "C", "D", "E", "ED", "EB", "BC_DA", "cubehelixConvert", "o", "Cubehelix", "Rgb", "rgbConvert", "r", "g", "b", "l", "bl", "k", "s", "h", "degrees", "cubehelix", "opacity", "define_default", "extend", "Color", "brighter", "darker", "radians", "a", "cosh", "sinh", "basis", "t1", "v0", "v1", "v2", "v3", "t2", "t3", "basis_default", "values", "n", "t", "i", "basisClosed_default", "values", "n", "t", "i", "v0", "v1", "v2", "v3", "basis", "constant_default", "x", "linear", "a", "d", "t", "exponential", "b", "y", "hue", "constant_default", "gamma", "nogamma", "rgb_default", "rgbGamma", "y", "color", "gamma", "rgb", "start", "end", "r", "g", "b", "opacity", "nogamma", "t", "rgbSpline", "spline", "colors", "i", "rgbBasis", "basis_default", "rgbBasisClosed", "basisClosed_default", "numberArray_default", "a", "b", "c", "i", "t", "isNumberArray", "x", "genericArray", "a", "b", "nb", "na", "x", "c", "i", "value_default", "t", "date_default", "a", "b", "d", "t", "number_default", "a", "b", "t", "object_default", "a", "b", "i", "c", "k", "value_default", "t", "reA", "reB", "zero", "b", "one", "t", "string_default", "a", "bi", "am", "bm", "bs", "i", "s", "q", "number_default", "o", "value_default", "a", "b", "t", "c", "constant_default", "number_default", "color", "rgb_default", "string_default", "date_default", "isNumberArray", "numberArray_default", "genericArray", "object_default", "round_default", "a", "b", "t", "degrees", "identity", "decompose_default", "a", "b", "c", "d", "e", "f", "scaleX", "scaleY", "skewX", "svgNode", "parseCss", "value", "m", "identity", "decompose_default", "parseSvg", "interpolateTransform", "parse", "pxComma", "pxParen", "degParen", "pop", "s", "translate", "xa", "ya", "xb", "yb", "q", "i", "number_default", "rotate", "a", "b", "skewX", "scale", "t", "n", "o", "interpolateTransformCss", "parseCss", "interpolateTransformSvg", "parseSvg", "hsl", "hue", "start", "end", "h", "s", "nogamma", "l", "opacity", "t", "hsl_default", "hslLong", "lab", "start", "end", "l", "nogamma", "a", "b", "opacity", "t", "hcl", "hue", "start", "end", "h", "c", "nogamma", "l", "opacity", "t", "hcl_default", "hclLong", "cubehelix", "hue", "cubehelixGamma", "y", "start", "end", "h", "s", "nogamma", "l", "opacity", "t", "cubehelix_default", "cubehelixLong", "piecewise", "interpolate", "values", "value_default", "i", "n", "v", "I", "t", "quantize_default", "interpolator", "n", "samples", "i", "frame", "timeout", "interval", "pokeDelay", "taskHead", "taskTail", "clockLast", "clockNow", "clockSkew", "clock", "setFrame", "f", "now", "clearNow", "Timer", "timer", "callback", "delay", "time", "sleep", "t", "timerFlush", "wake", "nap", "poke", "t0", "t1", "t2", "timeout_default", "callback", "delay", "time", "t", "Timer", "elapsed", "emptyOn", "dispatch_default", "emptyTween", "CREATED", "SCHEDULED", "STARTING", "STARTED", "RUNNING", "ENDING", "ENDED", "schedule_default", "node", "name", "id", "index", "group", "timing", "schedules", "create", "init", "schedule", "get", "set", "self", "tween", "timer", "elapsed", "start", "i", "j", "n", "o", "stop", "timeout_default", "tick", "t", "interrupt_default", "node", "name", "schedules", "schedule", "active", "empty", "i", "STARTING", "ENDING", "ENDED", "interrupt_default", "name", "tweenRemove", "id", "name", "tween0", "tween1", "schedule", "set", "tween", "i", "n", "tweenFunction", "value", "t", "tween_default", "get", "tweenValue", "transition", "node", "interpolate_default", "a", "b", "c", "number_default", "color", "rgb_default", "string_default", "attrRemove", "name", "attrRemoveNS", "fullname", "attrConstant", "interpolate", "value1", "string00", "string1", "interpolate0", "string0", "attrConstantNS", "attrFunction", "value", "string10", "attrFunctionNS", "attr_default", "namespace_default", "i", "interpolateTransformSvg", "interpolate_default", "tweenValue", "attrInterpolate", "name", "i", "t", "attrInterpolateNS", "fullname", "attrTweenNS", "value", "t0", "i0", "tween", "attrTween", "attrTween_default", "key", "namespace_default", "delayFunction", "id", "value", "init", "delayConstant", "delay_default", "get", "durationFunction", "id", "value", "set", "durationConstant", "duration_default", "get", "easeConstant", "id", "value", "set", "ease_default", "get", "easeVarying", "id", "value", "v", "set", "easeVarying_default", "filter_default", "match", "matcher_default", "groups", "m", "subgroups", "j", "group", "n", "subgroup", "node", "i", "Transition", "merge_default", "transition", "groups0", "groups1", "m0", "m1", "m", "merges", "j", "group0", "group1", "n", "merge", "node", "i", "Transition", "start", "name", "t", "i", "onFunction", "id", "listener", "on0", "on1", "sit", "init", "set", "schedule", "on", "on_default", "get", "removeFunction", "id", "parent", "i", "remove_default", "select_default", "select", "name", "id", "selector_default", "groups", "m", "subgroups", "j", "group", "n", "subgroup", "node", "subnode", "i", "schedule_default", "get", "Transition", "selectAll_default", "select", "name", "id", "selectorAll_default", "groups", "m", "subgroups", "parents", "j", "group", "n", "node", "i", "children", "child", "inherit", "get", "k", "l", "schedule_default", "Transition", "Selection", "selection_default", "styleNull", "name", "interpolate", "string00", "string10", "interpolate0", "string0", "styleValue", "string1", "styleRemove", "styleConstant", "value1", "styleFunction", "value", "styleMaybeRemove", "id", "on0", "on1", "listener0", "key", "event", "remove", "schedule", "set", "on", "listener", "style_default", "priority", "i", "interpolateTransformCss", "interpolate_default", "tweenValue", "styleInterpolate", "name", "i", "priority", "t", "styleTween", "value", "i0", "tween", "styleTween_default", "key", "textConstant", "value", "textFunction", "value1", "text_default", "tweenValue", "textInterpolate", "i", "t", "textTween", "value", "t0", "i0", "tween", "textTween_default", "key", "transition_default", "name", "id0", "id1", "newId", "groups", "m", "j", "group", "n", "node", "i", "inherit", "get", "schedule_default", "Transition", "end_default", "on0", "on1", "that", "id", "size", "resolve", "reject", "cancel", "end", "schedule", "set", "on", "id", "Transition", "groups", "parents", "name", "transition", "selection_default", "newId", "selection_prototype", "select_default", "selectAll_default", "filter_default", "merge_default", "transition_default", "on_default", "attr_default", "attrTween_default", "style_default", "styleTween_default", "text_default", "textTween_default", "remove_default", "tween_default", "delay_default", "duration_default", "ease_default", "easeVarying_default", "end_default", "cubicInOut", "defaultTiming", "cubicInOut", "inherit", "node", "id", "timing", "transition_default", "name", "Transition", "newId", "now", "groups", "m", "j", "group", "n", "i", "schedule_default", "selection_default", "interrupt_default", "transition_default", "abs", "max", "min", "number1", "e", "number2", "X", "type", "x", "xy", "Y", "y", "XY", "type", "pi", "tau", "epsilon", "tauEpsilon", "append", "strings", "i", "appendRound", "digits", "d", "k", "n", "Path", "x", "y", "x1", "y1", "x2", "y2", "r", "x0", "y0", "x21", "y21", "x01", "y01", "l01_2", "x20", "y20", "l21_2", "l20_2", "l21", "l01", "l", "t01", "t21", "a0", "a1", "ccw", "dx", "dy", "cw", "da", "w", "h", "path", "pathRound", "formatDecimal_default", "x", "formatDecimalParts", "p", "i", "coefficient", "exponent_default", "x", "formatDecimalParts", "formatGroup_default", "grouping", "thousands", "value", "width", "i", "t", "j", "g", "length", "formatNumerals_default", "numerals", "value", "i", "re", "formatSpecifier", "specifier", "match", "FormatSpecifier", "formatTrim_default", "s", "out", "n", "i", "i0", "i1", "prefixExponent", "formatPrefixAuto_default", "x", "p", "d", "formatDecimalParts", "coefficient", "exponent", "n", "formatRounded_default", "x", "p", "d", "formatDecimalParts", "coefficient", "exponent", "formatTypes_default", "x", "p", "formatDecimal_default", "formatRounded_default", "formatPrefixAuto_default", "identity_default", "x", "map", "prefixes", "locale_default", "locale", "group", "identity_default", "formatGroup_default", "currencyPrefix", "currencySuffix", "decimal", "numerals", "formatNumerals_default", "percent", "minus", "nan", "newFormat", "specifier", "formatSpecifier", "fill", "align", "sign", "symbol", "zero", "width", "comma", "precision", "trim", "type", "formatTypes_default", "prefix", "suffix", "formatType", "maybeSuffix", "format", "value", "valuePrefix", "valueSuffix", "i", "n", "c", "valueNegative", "formatTrim_default", "prefixExponent", "length", "padding", "formatPrefix", "f", "e", "exponent_default", "k", "locale", "format", "formatPrefix", "defaultLocale", "definition", "locale_default", "precisionFixed_default", "step", "exponent_default", "precisionPrefix_default", "step", "value", "exponent_default", "precisionRound_default", "step", "max", "exponent_default", "epsilon", "epsilon2", "pi", "halfPi", "quarterPi", "tau", "degrees", "radians", "abs", "atan", "atan2", "cos", "exp", "log", "pow", "sin", "sign", "x", "sqrt", "tan", "acos", "pi", "asin", "halfPi", "noop", "streamGeometry", "geometry", "stream", "streamGeometryType", "streamObjectType", "object", "features", "i", "n", "coordinates", "streamLine", "streamPolygon", "geometries", "closed", "coordinate", "stream_default", "spherical", "cartesian", "atan2", "asin", "lambda", "phi", "cosPhi", "cos", "sin", "cartesianDot", "a", "b", "cartesianCross", "cartesianAddInPlace", "cartesianScale", "vector", "k", "cartesianNormalizeInPlace", "d", "l", "sqrt", "compose_default", "a", "b", "compose", "x", "y", "rotationIdentity", "lambda", "phi", "abs", "pi", "tau", "rotateRadians", "deltaLambda", "deltaPhi", "deltaGamma", "compose_default", "rotationLambda", "rotationPhiGamma", "forwardRotationLambda", "rotation", "cosDeltaPhi", "cos", "sinDeltaPhi", "sin", "cosDeltaGamma", "sinDeltaGamma", "cosPhi", "x", "y", "z", "k", "atan2", "asin", "rotation_default", "rotate", "radians", "forward", "coordinates", "degrees", "circleStream", "stream", "radius", "delta", "direction", "t0", "t1", "cosRadius", "cos", "sinRadius", "sin", "step", "tau", "circleRadius", "point", "t", "spherical", "cartesian", "cartesianNormalizeInPlace", "acos", "epsilon", "buffer_default", "lines", "line", "x", "y", "m", "noop", "result", "pointEqual_default", "a", "b", "abs", "epsilon", "Intersection", "point", "points", "other", "entry", "rejoin_default", "segments", "compareIntersection", "startInside", "interpolate", "stream", "subject", "clip", "i", "n", "segment", "p0", "p1", "pointEqual_default", "epsilon", "link", "start", "current", "isSubject", "array", "a", "b", "longitude", "point", "abs", "pi", "sign", "tau", "polygonContains_default", "polygon", "lambda", "phi", "sinPhi", "sin", "normal", "cos", "angle", "winding", "sum", "Adder", "halfPi", "epsilon", "i", "n", "m", "ring", "point0", "lambda0", "phi0", "quarterPi", "sinPhi0", "cosPhi0", "j", "lambda1", "sinPhi1", "cosPhi1", "point1", "phi1", "delta", "absDelta", "antimeridian", "k", "atan2", "arc", "cartesianCross", "cartesian", "cartesianNormalizeInPlace", "intersection", "phiArc", "asin", "epsilon2", "clip_default", "pointVisible", "clipLine", "interpolate", "start", "sink", "line", "ringBuffer", "buffer_default", "ringSink", "polygonStarted", "polygon", "segments", "ring", "clip", "point", "lineStart", "lineEnd", "pointRing", "ringStart", "ringEnd", "merge", "startInside", "polygonContains_default", "rejoin_default", "compareIntersection", "lambda", "phi", "pointLine", "clean", "ringSegments", "i", "n", "m", "segment", "validSegment", "a", "b", "halfPi", "epsilon", "antimeridian_default", "clip_default", "clipAntimeridianLine", "clipAntimeridianInterpolate", "pi", "halfPi", "stream", "lambda0", "phi0", "sign0", "clean", "lambda1", "phi1", "sign1", "delta", "abs", "epsilon", "clipAntimeridianIntersect", "cosPhi0", "cosPhi1", "sinLambda0Lambda1", "sin", "atan", "cos", "from", "to", "direction", "phi", "lambda", "circle_default", "radius", "cr", "cos", "delta", "radians", "smallRadius", "notHemisphere", "abs", "epsilon", "interpolate", "from", "to", "direction", "stream", "circleStream", "visible", "lambda", "phi", "clipLine", "point0", "c0", "v0", "v00", "clean", "point1", "point2", "v", "c", "code", "pi", "intersect", "pointEqual_default", "t", "a", "b", "two", "pa", "cartesian", "pb", "n1", "n2", "cartesianCross", "n2n2", "cartesianDot", "n1n2", "determinant", "c1", "c2", "n1xn2", "A", "cartesianScale", "B", "cartesianAddInPlace", "u", "w", "uu", "t2", "sqrt", "q", "spherical", "lambda0", "lambda1", "phi0", "phi1", "z", "polar", "meridian", "q1", "r", "clip_default", "line_default", "a", "b", "x0", "y0", "x1", "y1", "ax", "ay", "bx", "by", "t0", "t1", "dx", "dy", "r", "clipMax", "clipMin", "clipRectangle", "x0", "y0", "x1", "y1", "visible", "x", "y", "interpolate", "from", "to", "direction", "stream", "a", "a1", "corner", "comparePoint", "p", "abs", "epsilon", "compareIntersection", "b", "ca", "cb", "activeStream", "bufferStream", "buffer_default", "segments", "polygon", "ring", "x__", "y__", "v__", "x_", "y_", "v_", "first", "clean", "clipStream", "point", "lineStart", "lineEnd", "polygonStart", "polygonEnd", "polygonInside", "winding", "i", "n", "j", "m", "a0", "b0", "b1", "startInside", "cleanInside", "merge", "rejoin_default", "linePoint", "v", "line_default", "identity_default", "x", "areaSum", "Adder", "areaRingSum", "x00", "y00", "x0", "y0", "areaStream", "noop", "areaRingStart", "areaRingEnd", "abs", "area", "areaPointFirst", "x", "y", "areaPoint", "area_default", "x0", "y0", "x1", "y1", "boundsStream", "boundsPoint", "noop", "bounds", "x", "y", "bounds_default", "X0", "Y0", "Z0", "X1", "Y1", "Z1", "X2", "Y2", "Z2", "x00", "y00", "x0", "y0", "centroidStream", "centroidPoint", "centroidLineStart", "centroidLineEnd", "centroidRingStart", "centroidRingEnd", "centroid", "x", "y", "centroidPointFirstLine", "centroidPointLine", "dx", "dy", "z", "sqrt", "centroidPointFirstRing", "centroidPointRing", "centroid_default", "PathContext", "context", "_", "x", "y", "tau", "noop", "lengthSum", "Adder", "lengthRing", "x00", "y00", "x0", "y0", "lengthStream", "noop", "lengthPointFirst", "lengthPoint", "length", "x", "y", "sqrt", "measure_default", "cacheDigits", "cacheAppend", "cacheRadius", "cacheCircle", "PathString", "digits", "append", "appendRound", "_", "x", "y", "s", "result", "strings", "i", "j", "d", "k", "path_default", "projection", "context", "digits", "pointRadius", "projectionStream", "contextStream", "path", "object", "stream_default", "area_default", "measure_default", "bounds_default", "centroid_default", "_", "identity_default", "PathString", "PathContext", "d", "transform_default", "methods", "transformer", "stream", "s", "TransformStream", "key", "x", "y", "fit", "projection", "fitBounds", "object", "clip", "stream_default", "bounds_default", "fitExtent", "extent", "b", "w", "h", "k", "x", "y", "fitSize", "size", "fitWidth", "width", "fitHeight", "height", "maxDepth", "cosMinDistance", "cos", "radians", "resample_default", "project", "delta2", "resample", "resampleNone", "transformer", "x", "y", "resampleLineTo", "x0", "y0", "lambda0", "a0", "b0", "c0", "x1", "y1", "lambda1", "a1", "b1", "c1", "depth", "stream", "dx", "dy", "d2", "a", "b", "c", "m", "sqrt", "phi2", "asin", "lambda2", "abs", "epsilon", "atan2", "p", "x2", "y2", "dx2", "dy2", "dz", "lambda00", "x00", "y00", "a00", "b00", "c00", "resampleStream", "point", "lineStart", "lineEnd", "ringStart", "linePoint", "lambda", "phi", "cartesian", "ringPoint", "ringEnd", "transformRadians", "transformer", "x", "y", "radians", "transformRotate", "rotate", "scaleTranslate", "k", "dx", "dy", "sx", "sy", "transform", "scaleTranslateRotate", "alpha", "cosAlpha", "cos", "sinAlpha", "sin", "a", "b", "ai", "bi", "ci", "fi", "projection", "project", "projectionMutator", "projectAt", "lambda", "phi", "deltaLambda", "deltaPhi", "deltaGamma", "theta", "preclip", "antimeridian_default", "x0", "y0", "x1", "y1", "postclip", "identity_default", "delta2", "projectResample", "projectTransform", "projectRotateTransform", "cache", "cacheStream", "point", "invert", "degrees", "stream", "_", "reset", "circle_default", "clipRectangle", "recenter", "resample_default", "sqrt", "extent", "object", "fitExtent", "size", "fitSize", "width", "fitWidth", "height", "fitHeight", "center", "rotateRadians", "compose_default", "conicProjection", "projectAt", "phi0", "phi1", "pi", "m", "projectionMutator", "p", "_", "radians", "degrees", "cylindricalEqualAreaRaw", "phi0", "cosPhi0", "cos", "forward", "lambda", "phi", "sin", "x", "y", "asin", "conicEqualAreaRaw", "y0", "y1", "sy0", "sin", "n", "abs", "epsilon", "cylindricalEqualAreaRaw", "c", "r0", "sqrt", "project", "x", "y", "r", "cos", "r0y", "l", "atan2", "sign", "pi", "asin", "conicEqualArea_default", "conicProjection", "albers_default", "conicEqualArea_default", "multiplex", "streams", "n", "x", "y", "i", "albersUsa_default", "cache", "cacheStream", "lower48", "albers_default", "lower48Point", "alaska", "conicEqualArea_default", "alaskaPoint", "hawaii", "hawaiiPoint", "point", "pointStream", "albersUsa", "coordinates", "k", "t", "stream", "_", "reset", "epsilon", "extent", "object", "fitExtent", "size", "fitSize", "width", "fitWidth", "height", "fitHeight", "azimuthalRaw", "scale", "x", "y", "cx", "cos", "cy", "k", "sin", "azimuthalInvert", "angle", "z", "sqrt", "c", "sc", "cc", "atan2", "asin", "azimuthalEqualAreaRaw", "azimuthalRaw", "cxcy", "sqrt", "azimuthalInvert", "z", "asin", "azimuthalEqualArea_default", "projection", "azimuthalEquidistantRaw", "azimuthalRaw", "c", "acos", "sin", "azimuthalInvert", "z", "azimuthalEquidistant_default", "projection", "mercatorRaw", "lambda", "phi", "log", "tan", "halfPi", "x", "y", "atan", "exp", "mercator_default", "mercatorProjection", "tau", "project", "m", "projection", "center", "scale", "translate", "clipExtent", "x0", "y0", "x1", "y1", "_", "reclip", "k", "pi", "t", "rotation_default", "tany", "y", "tan", "halfPi", "conicConformalRaw", "y0", "y1", "cy0", "cos", "n", "sin", "log", "f", "pow", "mercatorRaw", "project", "x", "epsilon", "r", "fy", "sign", "sqrt", "l", "atan2", "abs", "pi", "atan", "conicConformal_default", "conicProjection", "equirectangularRaw", "lambda", "phi", "equirectangular_default", "projection", "conicEquidistantRaw", "y0", "y1", "cy0", "cos", "n", "sin", "g", "abs", "epsilon", "equirectangularRaw", "project", "x", "y", "gy", "nx", "l", "atan2", "sign", "pi", "sqrt", "conicEquidistant_default", "conicProjection", "A1", "A2", "A3", "A4", "M", "sqrt", "iterations", "equalEarthRaw", "lambda", "phi", "l", "asin", "sin", "l2", "l6", "cos", "x", "y", "delta", "fy", "fpy", "abs", "epsilon2", "equalEarth_default", "projection", "gnomonicRaw", "x", "y", "cy", "cos", "k", "sin", "azimuthalInvert", "atan", "gnomonic_default", "projection", "orthographicRaw", "x", "y", "cos", "sin", "azimuthalInvert", "asin", "orthographic_default", "projection", "epsilon", "stereographicRaw", "x", "y", "cy", "cos", "k", "sin", "azimuthalInvert", "z", "atan", "stereographic_default", "projection", "transverseMercatorRaw", "lambda", "phi", "log", "tan", "halfPi", "x", "y", "atan", "exp", "transverseMercator_default", "m", "mercatorProjection", "center", "rotate", "_", "initRange", "domain", "range", "initInterpolator", "interpolator", "implicit", "ordinal", "index", "InternMap", "domain", "range", "unknown", "scale", "d", "i", "_", "value", "initRange", "band", "scale", "ordinal", "domain", "ordinalRange", "r0", "r1", "step", "bandwidth", "round", "paddingInner", "paddingOuter", "align", "rescale", "n", "reverse", "start", "stop", "values", "range", "i", "_", "initRange", "pointish", "copy", "point", "constants", "x", "number", "x", "unit", "identity", "x", "normalize", "a", "b", "constants", "clamper", "t", "bimap", "domain", "range", "interpolate", "d0", "d1", "r0", "r1", "polymap", "j", "d", "r", "i", "bisect_default", "copy", "source", "target", "transformer", "value_default", "transform", "untransform", "unknown", "clamp", "piecewise", "output", "input", "rescale", "n", "scale", "y", "number_default", "_", "number", "round_default", "u", "continuous", "tickFormat", "start", "stop", "count", "specifier", "step", "tickStep", "precision", "formatSpecifier", "value", "precisionPrefix_default", "formatPrefix", "precisionRound_default", "precisionFixed_default", "format", "linearish", "scale", "domain", "count", "d", "ticks", "specifier", "tickFormat", "i0", "i1", "start", "stop", "prestep", "step", "maxIter", "tickIncrement", "linear", "continuous", "copy", "initRange", "identity", "domain", "unknown", "scale", "x", "_", "number", "linearish", "nice", "domain", "interval", "i0", "i1", "x0", "x1", "t", "transformLog", "x", "transformExp", "transformLogn", "transformExpn", "pow10", "powp", "base", "logp", "reflect", "f", "k", "loggish", "transform", "scale", "domain", "logs", "pows", "rescale", "_", "count", "d", "u", "v", "r", "i", "j", "t", "n", "z", "ticks", "specifier", "formatSpecifier", "format", "nice", "log", "transformer", "copy", "initRange", "transformSymlog", "c", "x", "transformSymexp", "symlogish", "transform", "scale", "_", "linearish", "symlog", "transformer", "copy", "initRange", "transformPow", "exponent", "x", "transformSqrt", "transformSquare", "powish", "transform", "scale", "identity", "rescale", "_", "linearish", "pow", "transformer", "copy", "initRange", "quantile", "domain", "range", "thresholds", "unknown", "rescale", "i", "n", "quantileSorted", "scale", "x", "bisect_default", "y", "_", "d", "ascending", "initRange", "threshold", "domain", "range", "unknown", "n", "scale", "x", "bisect_default", "_", "y", "i", "initRange", "t0", "t1", "timeInterval", "floori", "offseti", "count", "field", "interval", "date", "d0", "d1", "step", "start", "stop", "range", "previous", "test", "end", "d", "millisecond", "timeInterval", "date", "step", "start", "end", "k", "milliseconds", "second", "timeInterval", "date", "step", "start", "end", "seconds", "timeMinute", "timeInterval", "date", "step", "start", "end", "timeMinutes", "utcMinute", "utcMinutes", "timeHour", "timeInterval", "date", "step", "start", "end", "timeHours", "utcHour", "utcHours", "timeDay", "timeInterval", "date", "step", "start", "end", "timeDays", "utcDay", "utcDays", "unixDay", "unixDays", "timeWeekday", "i", "timeInterval", "date", "step", "start", "end", "timeSunday", "timeMonday", "timeTuesday", "timeWednesday", "timeThursday", "timeFriday", "timeSaturday", "timeSundays", "timeMondays", "timeTuesdays", "timeWednesdays", "timeThursdays", "timeFridays", "timeSaturdays", "utcWeekday", "utcSunday", "utcMonday", "utcTuesday", "utcWednesday", "utcThursday", "utcFriday", "utcSaturday", "utcSundays", "utcMondays", "utcTuesdays", "utcWednesdays", "utcThursdays", "utcFridays", "utcSaturdays", "timeMonth", "timeInterval", "date", "step", "start", "end", "timeMonths", "utcMonth", "utcMonths", "timeYear", "timeInterval", "date", "step", "start", "end", "k", "timeYears", "utcYear", "utcYears", "ticker", "year", "month", "week", "day", "hour", "minute", "tickIntervals", "second", "ticks", "start", "stop", "count", "reverse", "interval", "tickInterval", "target", "i", "bisector", "step", "tickStep", "millisecond", "t", "utcTicks", "utcTickInterval", "utcYear", "utcMonth", "utcSunday", "unixDay", "utcHour", "utcMinute", "timeTicks", "timeTickInterval", "timeYear", "timeMonth", "timeSunday", "timeDay", "timeHour", "timeMinute", "localDate", "d", "date", "utcDate", "newDate", "y", "m", "formatLocale", "locale", "locale_dateTime", "locale_date", "locale_time", "locale_periods", "locale_weekdays", "locale_shortWeekdays", "locale_months", "locale_shortMonths", "periodRe", "formatRe", "periodLookup", "formatLookup", "weekdayRe", "weekdayLookup", "shortWeekdayRe", "shortWeekdayLookup", "monthRe", "monthLookup", "shortMonthRe", "shortMonthLookup", "formats", "formatShortWeekday", "formatWeekday", "formatShortMonth", "formatMonth", "formatDayOfMonth", "formatMicroseconds", "formatYearISO", "formatFullYearISO", "formatHour24", "formatHour12", "formatDayOfYear", "formatMilliseconds", "formatMonthNumber", "formatMinutes", "formatPeriod", "formatQuarter", "formatUnixTimestamp", "formatUnixTimestampSeconds", "formatSeconds", "formatWeekdayNumberMonday", "formatWeekNumberSunday", "formatWeekNumberISO", "formatWeekdayNumberSunday", "formatWeekNumberMonday", "formatYear", "formatFullYear", "formatZone", "formatLiteralPercent", "utcFormats", "formatUTCShortWeekday", "formatUTCWeekday", "formatUTCShortMonth", "formatUTCMonth", "formatUTCDayOfMonth", "formatUTCMicroseconds", "formatUTCYearISO", "formatUTCFullYearISO", "formatUTCHour24", "formatUTCHour12", "formatUTCDayOfYear", "formatUTCMilliseconds", "formatUTCMonthNumber", "formatUTCMinutes", "formatUTCPeriod", "formatUTCQuarter", "formatUTCSeconds", "formatUTCWeekdayNumberMonday", "formatUTCWeekNumberSunday", "formatUTCWeekNumberISO", "formatUTCWeekdayNumberSunday", "formatUTCWeekNumberMonday", "formatUTCYear", "formatUTCFullYear", "formatUTCZone", "parses", "parseShortWeekday", "parseWeekday", "parseShortMonth", "parseMonth", "parseLocaleDateTime", "parseDayOfMonth", "parseMicroseconds", "parseYear", "parseFullYear", "parseHour24", "parseDayOfYear", "parseMilliseconds", "parseMonthNumber", "parseMinutes", "parsePeriod", "parseQuarter", "parseUnixTimestamp", "parseUnixTimestampSeconds", "parseSeconds", "parseWeekdayNumberMonday", "parseWeekNumberSunday", "parseWeekNumberISO", "parseWeekdayNumberSunday", "parseWeekNumberMonday", "parseLocaleDate", "parseLocaleTime", "parseZone", "parseLiteralPercent", "newFormat", "specifier", "string", "i", "j", "n", "c", "pad", "format", "pads", "newParse", "Z", "parseSpecifier", "week", "day", "utcMonday", "utcDay", "timeMonday", "timeDay", "parse", "f", "p", "numberRe", "percentRe", "requoteRe", "value", "fill", "width", "sign", "length", "requote", "s", "names", "name", "timeYear", "timeSunday", "dISO", "timeThursday", "z", "utcYear", "dow", "utcSunday", "UTCdISO", "utcThursday", "locale", "timeFormat", "timeParse", "utcFormat", "utcParse", "defaultLocale", "definition", "formatLocale", "date", "number", "calendar", "ticks", "tickInterval", "year", "month", "week", "day", "hour", "minute", "second", "format", "scale", "continuous", "invert", "domain", "formatMillisecond", "formatSecond", "formatMinute", "formatHour", "formatDay", "formatWeek", "formatMonth", "formatYear", "tickFormat", "y", "_", "interval", "d", "count", "specifier", "nice", "copy", "time", "initRange", "timeTicks", "timeTickInterval", "timeYear", "timeMonth", "timeSunday", "timeDay", "timeHour", "timeMinute", "timeFormat", "utcTime", "initRange", "calendar", "utcTicks", "utcTickInterval", "utcYear", "utcMonth", "utcSunday", "utcDay", "utcHour", "utcMinute", "second", "utcFormat", "copy", "source", "target", "transformer", "x0", "x1", "x2", "s", "t0", "t1", "t2", "k10", "k21", "interpolator", "identity", "transform", "clamp", "unknown", "scale", "x", "_", "range", "interpolate", "r0", "r1", "r2", "piecewise", "value_default", "round_default", "t", "diverging", "linearish", "copy", "initInterpolator", "divergingLog", "loggish", "divergingSymlog", "symlogish", "divergingPow", "powish", "colors_default", "specifier", "n", "colors", "i", "category10_default", "colors_default", "Accent_default", "colors_default", "Dark2_default", "colors_default", "Paired_default", "colors_default", "Pastel1_default", "colors_default", "Pastel2_default", "colors_default", "Set1_default", "colors_default", "Set2_default", "colors_default", "Set3_default", "colors_default", "Tableau10_default", "colors_default", "ramp_default", "scheme", "rgbBasis", "scheme", "colors_default", "BrBG_default", "ramp_default", "scheme", "colors_default", "PRGn_default", "ramp_default", "scheme", "colors_default", "PiYG_default", "ramp_default", "scheme", "colors_default", "PuOr_default", "ramp_default", "scheme", "colors_default", "RdBu_default", "ramp_default", "scheme", "colors_default", "RdGy_default", "ramp_default", "scheme", "colors_default", "RdYlBu_default", "ramp_default", "scheme", "colors_default", "RdYlGn_default", "ramp_default", "scheme", "colors_default", "Spectral_default", "ramp_default", "scheme", "colors_default", "BuGn_default", "ramp_default", "scheme", "colors_default", "BuPu_default", "ramp_default", "scheme", "colors_default", "GnBu_default", "ramp_default", "scheme", "colors_default", "OrRd_default", "ramp_default", "scheme", "colors_default", "PuBuGn_default", "ramp_default", "scheme", "colors_default", "PuBu_default", "ramp_default", "scheme", "colors_default", "PuRd_default", "ramp_default", "scheme", "colors_default", "RdPu_default", "ramp_default", "scheme", "colors_default", "YlGnBu_default", "ramp_default", "scheme", "colors_default", "YlGn_default", "ramp_default", "scheme", "colors_default", "YlOrBr_default", "ramp_default", "scheme", "colors_default", "YlOrRd_default", "ramp_default", "scheme", "colors_default", "Blues_default", "ramp_default", "scheme", "colors_default", "Greens_default", "ramp_default", "scheme", "colors_default", "Greys_default", "ramp_default", "scheme", "colors_default", "Purples_default", "ramp_default", "scheme", "colors_default", "Reds_default", "ramp_default", "scheme", "colors_default", "Oranges_default", "ramp_default", "cividis_default", "cubehelix_default", "cubehelixLong", "cubehelix", "warm", "cubehelixLong", "cubehelix", "cool", "c", "rainbow_default", "ts", "c", "rgb", "pi_1_3", "pi_2_3", "sinebow_default", "x", "turbo_default", "ramp", "range", "n", "t", "viridis_default", "colors_default", "magma", "inferno", "plasma", "cos", "min", "sin", "sqrt", "pi", "halfPi", "tau", "sqrt3", "sqrt", "asterisk_default", "context", "size", "r", "min", "t", "u", "circle_default", "context", "size", "r", "sqrt", "pi", "tau", "cross_default", "context", "size", "r", "sqrt", "tan30", "sqrt", "tan30_2", "diamond_default", "context", "size", "y", "x", "diamond2_default", "context", "size", "r", "sqrt", "plus_default", "context", "size", "r", "sqrt", "min", "square_default", "context", "size", "w", "sqrt", "x", "square2_default", "context", "size", "r", "sqrt", "ka", "kr", "sin", "pi", "kx", "tau", "ky", "cos", "star_default", "context", "size", "r", "sqrt", "x", "y", "c", "s", "sqrt3", "sqrt", "triangle_default", "context", "size", "y", "sqrt3", "sqrt", "triangle2_default", "context", "size", "s", "t", "u", "c", "s", "sqrt", "k", "a", "wye_default", "context", "size", "r", "x0", "y0", "x1", "y1", "x2", "y2", "times_default", "context", "size", "r", "sqrt", "min", "symbolsFill", "circle_default", "cross_default", "diamond_default", "square_default", "star_default", "triangle_default", "wye_default", "symbolsStroke", "plus_default", "times_default", "triangle2_default", "asterisk_default", "square2_default", "diamond2_default", "Transform", "k", "x", "y", "point", "location", "identity", "transform", "node", "defined", "x", "ascendingDefined", "a", "b", "ascending", "descendingDefined", "descending", "nonempty", "finite", "positive", "negative", "format", "date", "fallback", "hours", "minutes", "seconds", "milliseconds", "formatYear", "pad", "year", "value", "width", "re", "parse", "string", "fallback", "durationSecond", "durationMinute", "durationHour", "durationDay", "durationWeek", "durationMonth", "durationYear", "formats", "timeIntervals", "second", "timeMinute", "timeHour", "timeDay", "timeSunday", "timeMonth", "timeYear", "timeMonday", "timeTuesday", "timeWednesday", "timeThursday", "timeFriday", "timeSaturday", "utcIntervals", "utcMinute", "utcHour", "unixDay", "utcSunday", "utcMonth", "utcYear", "utcMonday", "utcTuesday", "utcWednesday", "utcThursday", "utcFriday", "utcSaturday", "parseInterval", "input", "intervals", "name", "period", "match", "interval", "maybeTimeInterval", "maybeUtcInterval", "isUtcYear", "i", "date", "isTimeYear", "formatTimeTicks", "scale", "data", "ticks", "anchor", "format", "timeFormat", "utcFormat", "template", "f1", "f2", "getTimeTicksInterval", "formatConditional", "medianStep", "median", "pairs", "a", "b", "bisector", "step", "start", "stop", "extent", "count", "format1", "format2", "x", "X", "j", "orderof", "TypedArray", "objectToString", "valueof", "data", "value", "type", "valueType", "maybeTypedMap", "field", "map", "constant", "maybeTypedArrayify", "f", "floater", "arrayify", "coerceNumber", "d", "i", "singleton", "name", "indexOf", "range", "identity", "one", "yes", "string", "x", "number", "first", "x", "second", "constant", "x", "percentile", "reduce", "p", "I", "f", "quantile", "coerceNumbers", "values", "TypedArray", "map", "coerceNumber", "coerceDates", "coerceDate", "parse", "maybeColorChannel", "value", "defaultValue", "isColor", "maybeNumberChannel", "maybeKeyword", "input", "name", "allowed", "keyword", "i", "arrayify", "data", "type", "slice", "hasX", "x1", "x2", "hasY", "y", "y1", "y2", "hasXY", "options", "isObject", "option", "objectToString", "isScaleOptions", "isOptions", "isDomainSort", "sort", "maybeZero", "x3", "identity", "maybeTuple", "first", "second", "maybeZ", "z", "fill", "stroke", "range", "n", "r", "take", "values", "index", "map", "i", "subarray", "I", "i", "j", "keyof", "value", "maybeInput", "key", "options", "column", "source", "labelof", "v", "maybeColumn", "defaultValue", "mid", "x1", "x2", "data", "X1", "X2", "isTemporal", "map", "_", "maybeApplyInterval", "V", "scale", "t", "maybeIntervalTransform", "interval", "type", "maybeInterval", "defined", "d", "lo", "hi", "range", "x", "maybeTimeInterval", "maybeUtcInterval", "maybeRangeInterval", "maybeNiceInterval", "maybeValue", "isOptions", "numberChannel", "valueof", "isIterable", "value", "isTextual", "values", "isOrdinal", "type", "isTemporal", "isTemporalString", "parse", "isNumericString", "isNumeric", "isEvery", "is", "every", "isColor", "color", "isOpacity", "isNoneish", "isNone", "isRound", "maybeAnchor", "name", "maybeKeyword", "maybeFrameAnchor", "orderof", "first", "last", "descending", "inherit", "options", "rest", "o", "defaults", "key", "named", "things", "names", "thing", "maybeNamed", "position", "color", "radius", "length", "opacity", "symbol", "projection", "registry", "sqrt3", "sqrt4_3", "symbolHexagon", "context", "size", "rx", "ry", "hy", "symbols", "asterisk_default", "circle_default", "cross_default", "diamond_default", "diamond2_default", "plus_default", "square_default", "square2_default", "star_default", "times_default", "triangle_default", "triangle2_default", "wye_default", "isSymbolObject", "value", "isSymbol", "maybeSymbol", "symbol", "basic", "f1", "s1", "r1", "t1", "i1", "options", "transform", "filterTransform", "isDomainSort", "composeTransform", "sortTransform", "reverseTransform", "initializer", "composeInitializer", "t2", "data", "facets", "plotOptions", "arrayify", "i2", "channels", "args", "c1", "d1", "c2", "d2", "f2", "filterTransform", "value", "data", "facets", "V", "valueof", "I", "reverseTransform", "data", "facets", "I", "sortTransform", "value", "sortData", "sortValue", "compare", "data", "facets", "compareData", "i", "j", "I", "channel", "order", "maybeValue", "negate", "descendingDefined", "ascendingDefined", "channels", "V", "valueof", "compareValue", "hasOutput", "outputs", "names", "name", "maybeOutputs", "inputs", "asOutput", "maybeOutput", "entries", "reduceTitle", "reduceFirst", "reduce", "nullOutput", "asEvaluator", "maybeEvaluator", "scale", "isObject", "evaluator", "output", "setOutput", "column", "O", "data", "scope", "I", "extent", "asReduce", "maybeReduce", "input", "maybeInput", "reducer", "V", "context", "labelof", "reduceCount", "valueof", "range", "maybeGroup", "X", "sort", "group", "i", "first", "value", "fallback", "invalidReduce", "reduceReduce", "reduceFunction", "reduceAccessor", "percentile", "reduceLast", "reduceIdentity", "reduceDistinct", "reduceSum", "reduceProportion", "deviation", "min", "minIndex", "max", "maxIndex", "reduceMaybeTemporalAccessor", "mean", "median", "variance", "mode", "maybeSubgroup", "maybeSort", "facets", "reverse", "S", "compare", "j", "ascendingDefined", "f", "take", "x", "isTemporal", "groups", "rollup", "second", "top", "bottom", "sum", "key", "s", "InternSet", "basis", "createChannel", "data", "scale", "type", "value", "filter", "hint", "name", "inferChannelScale", "valueof", "labelof", "createChannels", "channels", "channel", "valueObject", "scales", "values", "scaleName", "map", "isEvery", "isColor", "isOpacity", "isSymbol", "maybeSymbol", "registry", "channelDomain", "facets", "facetChannels", "options", "defaultOrder", "defaultReverse", "defaultReduce", "defaultLimit", "x", "y", "order", "reverse", "reduce", "limit", "maybeValue", "negate", "descendingGroup", "ascendingGroup", "maybeOrder", "X", "reindexFacetChannel", "findScaleChannel", "XV", "lo", "hi", "isIterable", "domain", "InternSet", "YV", "difference", "reducer", "maybeReduce", "rollups", "range", "I", "i", "first", "originalFacets", "V1", "V2", "vi", "j", "k1", "k2", "X1", "X2", "x2", "alias", "ak", "av", "bk", "bv", "ascendingDefined", "descendingDefined", "getSource", "key", "createContext", "options", "document", "create", "name", "select_default", "creator_default", "warnings", "consumeWarnings", "w", "warn", "message", "pi", "tau", "defaultAspectRatio", "createProjection", "projection", "globalInset", "insetTop", "insetRight", "insetBottom", "insetLeft", "dimensions", "options", "domain", "clip", "isObject", "inset", "namedProjection", "width", "height", "marginLeft", "marginRight", "marginTop", "marginBottom", "dx", "dy", "maybePostClip", "tx", "ty", "transform", "x0", "y0", "x1", "y1", "path_default", "k", "transform_default", "x", "y", "warn", "identity", "s", "scaleProjection", "albersUsa_default", "conicProjection", "albers_default", "azimuthalEqualArea_default", "azimuthalEquidistant_default", "conicConformal_default", "conicEqualArea_default", "conicEquidistant_default", "equalEarth_default", "equirectangular_default", "gnomonic_default", "reflectY", "mercator_default", "orthographic_default", "stereographic_default", "transverseMercator_default", "x2", "y2", "clipRectangle", "kx", "ky", "rotate", "precision", "type", "aspectRatio", "parallels", "constant", "stream", "project", "cx", "cy", "values", "n", "X", "Y", "i", "hasProjection", "projectionAspectRatio", "getGeometryChannels", "channel", "X", "Y", "x", "y", "sink", "object", "stream_default", "categoricalSchemes", "Accent_default", "category10_default", "Dark2_default", "Paired_default", "Pastel1_default", "Pastel2_default", "Set1_default", "Set2_default", "Set3_default", "Tableau10_default", "isCategoricalScheme", "scheme", "ordinalSchemes", "scheme11", "BrBG_default", "PRGn_default", "PiYG_default", "PuOr_default", "RdBu_default", "RdGy_default", "RdYlBu_default", "RdYlGn_default", "Spectral_default", "scheme11r", "scheme9", "Blues_default", "Greens_default", "Greys_default", "Oranges_default", "Purples_default", "Reds_default", "schemei", "turbo_default", "viridis_default", "magma", "inferno", "plasma", "cividis_default", "cubehelix_default", "warm", "cool", "BuGn_default", "BuPu_default", "GnBu_default", "OrRd_default", "PuBu_default", "PuBuGn_default", "PuRd_default", "RdPu_default", "YlGn_default", "YlGnBu_default", "YlOrBr_default", "YlOrRd_default", "schemeicyclical", "rainbow_default", "sinebow_default", "interpolate", "quantize_default", "t", "n", "ordinalScheme", "s", "ordinalRange", "length", "maybeBooleanRange", "domain", "range", "f", "value", "quantitativeSchemes", "quantitativeScheme", "divergingSchemes", "isDivergingScheme", "flip", "i", "t", "unit", "interpolators", "number_default", "rgb_default", "hsl_default", "hcl_default", "lab", "maybeInterpolator", "interpolate", "createScaleQ", "key", "scale", "channels", "type", "nice", "clamp", "zero", "domain", "inferAutoDomain", "unknown", "round", "scheme", "interval", "range", "registry", "radius", "inferRadialRange", "length", "inferLengthRange", "opacity", "color", "quantitativeScheme", "round_default", "reverse", "maybeRangeInterval", "n", "arrayify", "m", "piecewise", "_", "constant", "interpolatePiecewise", "min", "max", "extent", "slice", "orderof", "maybeNice", "maybeNiceInterval", "createScaleLinear", "options", "linear", "createScaleSqrt", "createScalePow", "exponent", "pow", "createScaleLog", "base", "inferLogDomain", "log", "createScaleSymlog", "symlog", "createScaleQuantile", "quantiles", "inferQuantileDomain", "quantize_default", "ordinalRange", "quantile", "createScaleThreshold", "createScaleQuantize", "thresholds", "ticks", "x", "sign", "isOrdered", "threshold", "d", "s", "descending", "createScaleIdentity", "identity", "inferDomain", "f", "finite", "value", "inferZeroDomain", "hint", "h25", "positive", "k", "r", "h50", "median", "v", "negative", "j", "createScaleD", "key", "scale", "transform", "channels", "type", "nice", "clamp", "domain", "inferDomain", "unknown", "pivot", "scheme", "range", "symmetric", "interpolate", "registry", "color", "rgb_default", "quantitativeScheme", "number_default", "reverse", "arrayify", "min", "max", "warn", "descending", "maybeInterpolator", "interpolatePiecewise", "piecewise", "flip", "mid", "mindelta", "maxdelta", "createScaleDiverging", "options", "diverging", "transformIdentity", "createScaleDivergingSqrt", "createScaleDivergingPow", "exponent", "divergingPow", "transformPow", "createScaleDivergingLog", "base", "negative", "positive", "divergingLog", "transformLog", "createScaleDivergingSymlog", "constant", "divergingSymlog", "transformSymlog", "x", "transformSqrt", "createScaleT", "key", "scale", "channels", "options", "createScaleQ", "createScaleTime", "time", "createScaleUtc", "utcTime", "ordinalImplicit", "createScaleO", "key", "scale", "channels", "type", "interval", "domain", "range", "reverse", "hint", "maybeRangeInterval", "inferDomain", "createScaleOrdinal", "scheme", "unknown", "options", "registry", "symbol", "inferSymbolHint", "inferSymbolRange", "map", "maybeSymbol", "color", "maybeBooleanRange", "interpolate", "quantitativeScheme", "t0", "d", "n", "quantize_default", "t", "ordinalScheme", "implicit", "ordinal", "createScalePoint", "align", "padding", "maybeRound", "point", "createScaleBand", "paddingInner", "paddingOuter", "band", "round", "values", "InternSet", "value", "v", "min", "max", "extent", "position", "sort", "ascendingDefined", "inferHint", "candidate", "isNoneish", "symbolsStroke", "symbolsFill", "createScales", "channelsByScale", "globalLabel", "globalInset", "globalInsetTop", "globalInsetRight", "globalInsetBottom", "globalInsetLeft", "round", "nice", "clamp", "zero", "align", "padding", "projection", "facetLabel", "options", "scales", "key", "channels", "scaleOptions", "scale", "createScale", "registry", "position", "label", "percent", "transform", "inset", "insetTop", "insetRight", "insetBottom", "insetLeft", "inferScaleLabel", "createScaleFunctions", "name", "type", "interval", "autoScaleRange", "dimensions", "x", "y", "fx", "fy", "superdimensions", "outerDimensions", "autoScaleRangeX", "autoScaleRangeY", "subdimensions", "innerDimensions", "l", "isOrdinalScale", "marginTop", "marginRight", "marginBottom", "marginLeft", "width", "height", "facetMarginTop", "facetMarginRight", "facetMarginBottom", "facetMarginLeft", "left", "right", "piecewiseRange", "autoScaleRound", "top", "bottom", "isBandScale", "roundError", "n", "start", "stop", "paddingInner", "paddingOuter", "m", "step", "length", "isThresholdScale", "end", "_", "createScale", "key", "channels", "options", "type", "inferScaleType", "isOrdinalScale", "values", "value", "isTemporal", "warn", "formatScaleType", "isTemporalString", "isNumericString", "coerceType", "coerceNumbers", "registry", "position", "symbol", "coerceSymbols", "coerceDates", "createScaleDiverging", "createScaleDivergingSqrt", "createScaleDivergingPow", "createScaleDivergingLog", "createScaleDivergingSymlog", "ordinalImplicit", "createScaleOrdinal", "createScaleLinear", "createScaleSqrt", "createScaleThreshold", "createScaleQuantile", "createScaleQuantize", "createScalePow", "createScaleLog", "createScaleSymlog", "createScaleUtc", "createScaleTime", "createScalePoint", "createScaleBand", "createScaleIdentity", "typeProjection", "domain", "range", "scheme", "pivot", "projection", "t", "kind", "radius", "opacity", "length", "asOrdinalType", "isOrdinal", "color", "isDivergingScheme", "isCategoricalScheme", "isTemporalScale", "isThresholdScale", "isBandScale", "isCollapsed", "scale", "domain", "value", "i", "n", "coerceType", "channels", "options", "coerceValues", "c", "coerceSymbols", "values", "map", "maybeSymbol", "exposeScales", "scaleDescriptors", "key", "registry", "exposeScale", "scale", "type", "domain", "range", "interpolate", "interval", "transform", "percent", "pivot", "d", "unknown", "slice", "t", "memoize1", "compute", "cacheValue", "cacheKeys", "keys", "k", "numberFormat", "memoize1", "locale", "monthFormat", "month", "weekdayFormat", "weekday", "formatNumber", "format", "i", "formatIsoDate", "date", "format", "formatAuto", "locale", "number", "formatNumber", "v", "string", "formatDefault", "offset", "nextClipId", "getClipId", "styles", "mark", "title", "href", "variaLabel", "ariaDescription", "ariaHidden", "target", "fill", "fillOpacity", "stroke", "strokeWidth", "strokeOpacity", "strokeLinejoin", "strokeLinecap", "strokeMiterlimit", "strokeDasharray", "strokeDashoffset", "opacity", "mixBlendMode", "imageFilter", "paintOrder", "pointerEvents", "shapeRendering", "channels", "cariaLabel", "defaultFill", "defaultFillOpacity", "defaultStroke", "defaultStrokeOpacity", "defaultStrokeWidth", "defaultStrokeLinecap", "defaultStrokeLinejoin", "defaultStrokeMiterlimit", "defaultPaintOrder", "isNoneish", "vfill", "cfill", "maybeColorChannel", "vfillOpacity", "cfillOpacity", "maybeNumberChannel", "vstroke", "cstroke", "vstrokeOpacity", "cstrokeOpacity", "vopacity", "copacity", "isNone", "isRound", "vstrokeWidth", "cstrokeWidth", "impliedString", "impliedNumber", "string", "applyTitle", "selection", "L", "i", "nonempty", "applyText", "applyText", "selection", "T", "i", "formatDefault", "applyChannelStyles", "selection", "target", "tip", "AL", "T", "F", "FO", "S", "SO", "SW", "O", "H", "applyAttr", "i", "applyHref", "applyTitle", "maybeClip", "clip", "maybeKeyword", "applyClip", "selection", "mark", "dimensions", "context", "clipUrl", "width", "height", "marginLeft", "marginRight", "marginTop", "marginBottom", "id", "getClipId", "create", "g", "projection", "path_default", "applyAttr", "applyIndirectStyles", "pointerEvents", "applyDirectStyles", "applyStyle", "applyHref", "href", "target", "i", "h", "a", "namespaces_default", "name", "value", "applyTransform", "x", "y", "tx", "offset", "ty", "impliedString", "impliedValue", "string", "impliedNumber", "number", "validClassName", "maybeClassName", "applyInlineStyles", "style", "element", "applyFrameAnchor", "frameAnchor", "createDimensions", "scales", "marks", "options", "marginTopDefault", "offset", "marginRightDefault", "marginBottomDefault", "marginLeftDefault", "marginTop", "marginRight", "marginBottom", "marginLeft", "margin", "width", "height", "autoHeight", "dimensions", "facetMargin", "facetMarginTop", "facetMarginRight", "facetMarginBottom", "facetMarginLeft", "x", "y", "fy", "fx", "projection", "aspectRatio", "nfy", "ar", "projectionAspectRatio", "nfx", "far", "lar", "ny", "isOrdinalScale", "ratio", "aspectRatioLength", "fxb", "fyb", "w", "k", "scale", "type", "domain", "transform", "exponent", "min", "max", "extent", "createFacets", "channelsByScale", "options", "fx", "fy", "createScales", "fxDomain", "fyDomain", "cross", "x", "y", "i", "recreateFacets", "facets", "X", "Y", "facetIndex", "f", "a", "b", "facetGroups", "data", "I", "range", "FX", "FY", "rollup", "G", "facetTranslator", "marginTop", "marginLeft", "facetExclude", "index", "ex", "e", "sum", "d", "n", "j", "facetAnchors", "facetAnchorTop", "facetAnchorRight", "facetAnchorBottom", "facetAnchorLeft", "and", "facetAnchorTopEmpty", "facetAnchorRightEmpty", "facetAnchorBottomEmpty", "facetAnchorLeftEmpty", "facetAnchorEmpty", "maybeFacetAnchor", "facetAnchor", "anchor", "indexCache", "V", "InternMap", "map", "v", "facetIndexOf", "facetFind", "keyof", "facetEmpty", "empty", "channels", "facetFilter", "groups", "Mark", "data", "channels", "options", "defaults", "facet", "facetAnchor", "fx", "fy", "sort", "dx", "dy", "margin", "marginTop", "marginRight", "marginBottom", "marginLeft", "clip", "extraChannels", "tip", "render", "isDomainSort", "initializer", "basic", "keyword", "singleton", "maybeFacetAnchor", "maybeNamed", "maybeChannels", "styles", "name", "channel", "isOptions", "value", "scale", "optional", "maybeClip", "maybeTip", "composeRender", "facets", "facetChannels", "plotOptions", "arrayify", "range", "originalFacets", "createChannels", "channelDomain", "index", "values", "filter", "defined", "i", "context", "cx", "cy", "project", "scales", "valueObject", "marks", "r1", "r2", "s", "v", "d", "c", "next", "maybeValue", "maybeKeyword", "withTip", "states", "pointerK", "kx", "ky", "x", "y", "px", "py", "maxRadius", "channels", "render", "options", "composeRender", "index", "scales", "values", "dimensions", "context", "next", "svg", "data", "state", "renderIndex", "fx", "fy", "tx", "ty", "faceted", "facetState", "facetStates", "cx", "cy", "applyFrameAnchor", "PX", "PY", "i", "anchorX", "anchorY", "g", "s", "f", "update", "ii", "ri", "r", "I", "p", "ft", "mt", "pointermove", "event", "xp", "yp", "pointer_default", "j", "dx", "dy", "rj", "pointerdown", "pointerleave", "pointer", "pointerX", "pointerY", "X1", "X2", "X", "Y1", "Y2", "Y", "inferFontVariant", "scale", "isOrdinalScale", "legendRamp", "color", "options", "label", "tickSize", "width", "height", "marginTop", "marginRight", "marginBottom", "marginLeft", "style", "ticks", "tickFormat", "fontVariant", "inferFontVariant", "round", "opacity", "className", "context", "createContext", "maybeClassName", "maybeNumberChannel", "svg", "create", "applyInlineStyles", "tickAdjust", "g", "x", "applyRange", "range", "type", "domain", "interpolate", "scale", "pivot", "interpolator", "piecewise", "interpolatePiecewise", "quantize_default", "number_default", "n", "canvas", "context2", "i", "j", "thresholds", "thresholdFormat", "d", "format", "linear", "map", "_", "band", "axisBottom", "impliedString", "radians", "markers", "mark", "marker", "markerStart", "markerMid", "markerEnd", "maybeMarker", "markerCircleFill", "markerArrow", "markerDot", "markerCircleStroke", "orient", "color", "context", "create", "nextMarkerId", "applyMarkers", "path", "S", "applyMarkersColor", "i", "applyMarkersColor", "path", "markerStart", "markerMid", "markerEnd", "stroke", "strokeof", "context", "iriByMarkerColor", "applyMarker", "marker", "i", "color", "iriByColor", "iri", "node", "id", "nextMarkerId", "maybeInsetX", "inset", "insetLeft", "insetRight", "options", "maybeInset", "maybeInsetY", "insetTop", "insetBottom", "inset1", "inset2", "offset", "maybeIntervalValue", "value", "interval", "maybeValue", "maybeInterval", "maybeIntervalK", "k", "maybeInsetK", "options", "trivial", "v", "v1", "v2", "label", "labelof", "V", "kv", "data", "valueof", "D1", "V1", "transform", "map", "maybeIntervalMidK", "V2", "isTemporal", "maybeTrivialIntervalX", "maybeInsetX", "maybeIntervalX", "options", "maybeIntervalK", "maybeInsetX", "maybeIntervalY", "maybeInsetY", "maybeIntervalMidX", "maybeIntervalMidK", "maybeIntervalMidY", "defaults", "RuleX", "Mark", "data", "options", "x", "y1", "y2", "inset", "insetTop", "insetBottom", "withTip", "number", "markers", "index", "scales", "channels", "dimensions", "context", "y", "X", "Y1", "Y2", "width", "height", "marginTop", "marginRight", "marginLeft", "marginBottom", "create", "applyIndirectStyles", "applyTransform", "offset", "g", "applyDirectStyles", "i", "isCollapsed", "applyChannelStyles", "applyMarkers", "RuleY", "x1", "x2", "insetRight", "insetLeft", "Y", "X1", "X2", "ruleX", "identity", "rest", "maybeIntervalY", "maybeOptionalZero", "ruleY", "maybeIntervalX", "template", "strings", "parts", "j", "copy", "i", "s", "defaults", "softHyphen", "Text", "Mark", "data", "options", "x", "y", "text", "isIterable", "isTextual", "identity", "indexOf", "frameAnchor", "textAnchor", "lineAnchor", "lineHeight", "lineWidth", "textOverflow", "monospace", "fontFamily", "fontSize", "fontStyle", "fontVariant", "fontWeight", "rotate", "vrotate", "crotate", "maybeNumberChannel", "vfontSize", "cfontSize", "maybeFontSizeChannel", "numberChannel", "nonempty", "impliedString", "keyword", "maybeTextOverflow", "string", "maybeFrameAnchor", "splitter", "clipper", "index", "scales", "channels", "dimensions", "context", "X", "Y", "R", "T", "TL", "FS", "cx", "cy", "applyFrameAnchor", "create", "applyIndirectStyles", "applyIndirectTextStyles", "applyTransform", "g", "applyDirectStyles", "applyMultilineText", "template", "i", "applyAttr", "applyChannelStyles", "selection", "mark", "splitLines", "clipLine", "lines", "formatDefault", "n", "m", "tspan", "namespaces_default", "title", "maybeTuple", "textX", "maybeIntervalMidY", "textY", "maybeIntervalMidX", "inferFontVariant", "isNumeric", "isTemporal", "fontSizes", "lineWrap", "input", "maxWidth", "widthof", "lineStart", "lineEnd", "wordStart", "wordEnd", "required", "lineBreaks", "j", "k", "defaultWidthMap", "defaultWidth", "start", "end", "sum", "readCharacter", "isPictographic", "monospaceWidth", "clipStart", "clipEnd", "ellipsis", "clipMiddle", "cut", "width", "inset", "I", "w", "l", "e", "ei", "reCombiner", "rePictographic", "isSurrogatePair", "isCombiner", "isZeroWidthJoiner", "isAscii", "hi", "lo", "defaults", "defaultRadius", "wingRatio", "shapeArrow", "context", "l", "r", "wing", "shapeSpike", "shapes", "isShapeObject", "value", "maybeShape", "shape", "Vector", "Mark", "data", "options", "x", "y", "length", "rotate", "anchor", "frameAnchor", "vl", "cl", "maybeNumberChannel", "vr", "cr", "keyword", "maybeFrameAnchor", "index", "scales", "channels", "dimensions", "X", "Y", "L", "A", "cx", "cy", "applyFrameAnchor", "create", "applyIndirectStyles", "applyTransform", "g", "applyDirectStyles", "template", "i", "p", "pathRound", "applyChannelStyles", "vectorX", "data", "options", "x", "identity", "rest", "Vector", "vectorY", "y", "maybeData", "data", "options", "isIterable", "maybeAnchor", "anchor", "anchors", "keyword", "anchorY", "anchorFy", "anchorX", "anchorFx", "axisY", "axisKy", "axisFy", "axisX", "axisKx", "axisFx", "k", "color", "opacity", "stroke", "strokeOpacity", "strokeWidth", "fill", "fillOpacity", "textAnchor", "textStroke", "textStrokeOpacity", "textStrokeWidth", "tickSize", "tickPadding", "tickRotate", "x", "margin", "marginTop", "marginRight", "marginBottom", "marginLeft", "label", "labelAnchor", "labelArrow", "labelOffset", "number", "maybeLabelArrow", "marks", "isNoneish", "axisTickKy", "axisTextKy", "text", "labelOptions", "facets", "channels", "scales", "dimensions", "scale", "cla", "clo", "formatAxisLabel", "y", "axisTickKx", "axisTextKx", "strokeLinecap", "strokeLinejoin", "facetAnchor", "frameAnchor", "inset", "insetLeft", "insetRight", "dx", "axisMark", "vectorY", "offset", "shapeTickLeft", "shapeTickRight", "insetTop", "insetBottom", "dy", "vectorX", "shapeTickBottom", "shapeTickTop", "radians", "tickFormat", "lineAnchor", "fontVariant", "textY", "ticks", "inferFontVariant", "inferTextChannel", "textX", "gridY", "gridKy", "gridFy", "gridX", "gridKx", "gridFx", "x1", "x2", "ruleY", "gridDefaults", "y1", "y2", "ruleX", "fontFamily", "fontSize", "fontStyle", "fontWeight", "monospace", "pointerEvents", "shapeRendering", "initializer", "maybeColorChannel", "maybeNumberChannel", "mark", "ariaLabel", "initialize", "axisInitializer", "_channels", "context", "initializeFacets", "tickSpacing", "interval", "isTemporalScale", "arrayify", "maybeRangeInterval", "min", "max", "extent", "range", "identity", "initializedChannels", "name", "channel", "valueof", "basicInitializer", "m", "inferTickFormat", "formatTimeTicks", "isUtcYear", "utcFormat", "isTimeYear", "timeFormat", "formatDefault", "isTemporal", "format", "constant", "l", "inferScaleOrder", "orderof", "isTemporalish", "order", "maybeScale", "scale", "key", "s", "legendSwatches", "color", "opacity", "options", "isOrdinalScale", "isThresholdScale", "legendItems", "selection", "width", "height", "maybeNumberChannel", "legendSymbols", "symbol", "fill", "fillOpacity", "stroke", "isNoneish", "strokeOpacity", "strokeWidth", "r", "vf", "cf", "maybeColorChannel", "vs", "cs", "sf", "ss", "size", "d", "p", "pathRound", "swatch", "columns", "tickFormat", "fontVariant", "inferFontVariant", "swatchSize", "swatchWidth", "swatchHeight", "marginLeft", "className", "style", "context", "createContext", "maybeClassName", "inferTickFormat", "swatches", "create", "extraStyle", "item", "div", "impliedString", "applyInlineStyles", "legendRegistry", "legendSymbols", "legendColor", "legendOpacity", "exposeLegends", "scales", "context", "defaults", "key", "options", "legendRegistry", "legendOptions", "className", "label", "ticks", "tickFormat", "inherit", "legendColor", "color", "legend", "legendSwatches", "legendRamp", "legendOpacity", "type", "interpolate", "scale", "rgb", "interpolateOpacity", "r", "g", "b", "t", "createLegends", "legends", "value", "o", "defaults", "lineDefaults", "Frame", "Mark", "options", "anchor", "inset", "insetTop", "insetRight", "insetBottom", "insetLeft", "rx", "ry", "singleton", "maybeKeyword", "number", "index", "scales", "channels", "dimensions", "context", "marginTop", "marginRight", "marginBottom", "marginLeft", "width", "height", "x1", "x2", "y1", "y2", "create", "applyIndirectStyles", "applyDirectStyles", "applyChannelStyles", "applyTransform", "line", "rect", "frame", "defaults", "ignoreChannels", "Tip", "Mark", "data", "options", "isIterable", "isTextual", "identity", "x", "y", "x1", "x2", "y1", "y2", "anchor", "monospace", "fontFamily", "fontSize", "fontStyle", "fontVariant", "fontWeight", "lineHeight", "lineWidth", "frameAnchor", "textAnchor", "textOverflow", "textPadding", "title", "pointerSize", "pathFilter", "maybeAnchor", "maybeFrameAnchor", "impliedString", "string", "maybeTextOverflow", "number", "key", "splitter", "clipper", "index", "scales", "values", "dimensions", "context", "mark", "fx", "fy", "svg", "document", "r", "m", "marginTop", "marginLeft", "sources", "getSources", "X1", "Y1", "X2", "Y2", "X", "Y", "ox", "oy", "cx", "cy", "applyFrameAnchor", "px", "anchorX", "py", "anchorY", "widthof", "monospaceWidth", "defaultWidth", "ee", "ellipsis", "formatFx", "inferTickFormat", "formatFy", "format", "i", "text", "line", "formatDefault", "channel", "value", "defined", "formatLabel", "formatPair", "scale", "g", "create", "applyIndirectStyles", "applyIndirectTextStyles", "applyTransform", "applyDirectStyles", "that", "select_default", "names", "name", "renderLine", "selection", "color", "opacity", "swatch", "w", "j", "cut", "k", "postrender", "width", "height", "tx", "h", "a", "fitLeft", "fitRight", "fitTop", "fitBottom", "ax", "ay", "path", "getPath", "t", "getLineOffset", "getTextTranslate", "tip", "maybeTuple", "length", "channels", "source", "getSource", "c1", "c2", "c", "defaultLabel", "plot", "options", "facet", "style", "caption", "ariaLabel", "ariaDescription", "className", "maybeClassName", "marks", "flatMarks", "inferTips", "topFacetState", "maybeTopFacet", "facetStateByMark", "mark", "facetState", "maybeMarkFacet", "channelsByScale", "addScaleChannels", "axes", "inferAxes", "facets", "createFacets", "topFacetsIndex", "facetFilter", "nonEmpty", "facetsIndex", "index", "i", "f", "facetExclude", "key", "registry", "isScaleOptions", "stateByMark", "facetChannels", "data", "channels", "applyScaleTransforms", "scaleDescriptors", "createScales", "scales", "createScaleFunctions", "dimensions", "createDimensions", "autoScaleRange", "fx", "fy", "subdimensions", "innerDimensions", "superdimensions", "actualDimensions", "context", "createContext", "document", "svg", "creator_default", "figure", "createProjection", "facetGroups", "state", "value", "newByScale", "update", "inferChannelScales", "channel", "scale", "position", "applyScaleTransform", "newChannelsByScale", "newScaleDescriptors", "inheritScaleLabels", "newScales", "facetDomains", "facetTranslate", "recreateFacets", "facetTranslator", "width", "height", "select_default", "applyInlineStyles", "values", "indexes", "node", "g", "faceted", "subarray", "name", "legends", "createLegends", "legend", "figcaption", "exposeScales", "exposeLegends", "w", "consumeWarnings", "plotThis", "Mark", "markify", "Render", "render", "t", "type", "percent", "interval", "transform", "x", "maybeIntervalTransform", "map", "inferChannelScale", "filter", "yes", "hasProjection", "gx", "gy", "y", "getGeometryChannels", "addScaleChannel", "scaleChannels", "arrayify", "createChannel", "groups", "warn", "derive", "initializer", "tips", "pointerX", "pointerY", "pointer", "tip", "projection", "axis", "grid", "facetAxis", "facetGrid", "xAxis", "xGrid", "yAxis", "yGrid", "fxAxis", "fxGrid", "fyAxis", "fyGrid", "hasPositionChannel", "hasAxis", "maybeGrid", "gridFy", "maybeAxis", "axisFy", "gridFx", "axisFx", "gridY", "axisY", "gridX", "axisX", "axisType", "primary", "secondary", "defaults", "both", "isBoth", "axisOptions", "line", "isNone", "frame", "lineOptions", "gridType", "gridOptions", "anchor", "ticks", "tickSize", "tickSpacing", "tickPadding", "tickFormat", "tickRotate", "fontVariant", "label", "labelAnchor", "labelArrow", "labelOffset", "stroke", "isColor", "isGridTicks", "isIterable", "k", "prefix", "m", "newScale", "marginTop", "marginRight", "marginBottom", "marginLeft", "outerDimensions", "fxr", "outerRange", "fyr", "domain", "x1", "x2", "binX", "outputs", "options", "mergeOptions", "x", "y", "binn", "maybeBinValue", "identity", "maybeInsetX", "binn", "bx", "by", "gx", "gy", "reduceData", "reduceIdentity", "filter", "reduceCount", "sort", "reverse", "outputs", "inputs", "maybeBin", "maybeBinOutputs", "maybeBinReduce", "identity", "maybeBinOutput", "maybeBinEvaluator", "hasOutput", "BX1", "setBX1", "maybeColumn", "BX2", "setBX2", "BY1", "setBY1", "BY2", "setBY2", "k", "gk", "GK", "setGK", "x", "y", "z", "fill", "stroke", "x1", "x2", "y1", "y2", "domain", "cumulative", "thresholds", "interval", "options", "GZ", "setGZ", "vfill", "maybeColorChannel", "vstroke", "GF", "setGF", "GS", "setGS", "basic", "data", "facets", "plotOptions", "K", "maybeApplyInterval", "valueof", "Z", "F", "S", "G", "maybeSubgroup", "groupFacets", "groupData", "bin", "bing", "i", "o", "facet", "groupFacet", "f", "I", "maybeGroup", "g", "b", "extent", "maybeSort", "mid", "name", "output", "mergeOptions", "maybeBinValue", "value", "defaultValue", "maybeValue", "maybeThresholds", "maybeBin", "options", "value", "cumulative", "domain", "extent", "thresholds", "bin", "data", "V", "valueof", "T", "isTemporal", "isTimeThresholds", "map", "coerceDate", "min", "max", "t", "isInterval", "utcTickInterval", "coerceNumbers", "step", "tickIncrement", "r0", "r1", "n", "i", "ticks", "E", "bin1cn", "bin1cp", "bin1", "labelof", "maybeThresholds", "interval", "defaultThresholds", "thresholdAuto", "maybeRangeInterval", "thresholdFreedmanDiaconis", "thresholdScott", "thresholdSturges", "maybeUtcInterval", "maybeBinOutputs", "outputs", "inputs", "maybeOutputs", "maybeBinOutput", "name", "reduce", "maybeOutput", "maybeBinEvaluator", "maybeEvaluator", "maybeBinReduce", "maybeReduce", "maybeBinReduceFallback", "reduceX", "reduceX1", "reduceX2", "reduceY", "reduceY1", "reduceY2", "values", "isTimeInterval", "isIterable", "bing", "EX", "EY", "I", "X", "ix", "x1", "x2", "Y", "iy", "y1", "y2", "B", "bisect_default", "C", "b", "j", "mid1", "m", "maybeIdentityY", "options", "hasY", "identity", "stackY", "stackOptions", "options", "mergeOptions", "x1", "x", "y", "rest", "transform", "X", "y1", "y2", "stack", "mid", "maybeStackY", "y", "y1", "y2", "options", "withTip", "stackY", "maybeZero", "mergeOptions", "offset", "order", "reverse", "rest", "lengthy", "stack", "x", "one", "kx", "ky", "z", "maybeZ", "X", "setX", "maybeColumn", "Y1", "setY1", "column", "Y2", "setY2", "maybeOffset", "maybeOrder", "basic", "data", "facets", "plotOptions", "maybeApplyInterval", "valueof", "Y", "Z", "compare", "n", "facetstacks", "facet", "stacks", "group", "i", "yn", "yp", "offsetExpand", "offsetCenter", "offsetWiggle", "extent", "min", "max", "m", "offsetZero", "offsetCenterFacets", "prev", "InternMap", "j", "Fi", "Df", "value", "diff", "Cf1", "cumsum", "s1", "sum", "d", "I", "m0", "p", "orderInsideOut", "ascendingDefined", "negate", "descendingDefined", "orderY", "orderZ", "orderSum", "orderAppearance", "orderAccessor", "field", "orderComparator", "orderGiven", "orderZDomain", "groupSort", "range", "greatest", "K", "sums", "rollup", "Kp", "Kn", "k", "f", "O", "domain", "map", "defaults", "Rect", "Mark", "data", "options", "x1", "y1", "x2", "y2", "inset", "insetTop", "insetRight", "insetBottom", "insetLeft", "rx", "ry", "number", "impliedString", "index", "scales", "channels", "dimensions", "context", "x", "y", "X1", "Y1", "X2", "Y2", "marginTop", "marginRight", "marginBottom", "marginLeft", "width", "height", "projection", "create", "applyIndirectStyles", "applyTransform", "g", "applyDirectStyles", "isCollapsed", "i", "applyAttr", "applyChannelStyles", "rectY", "data", "options", "hasXY", "indexOf", "identity", "Rect", "maybeStackY", "maybeTrivialIntervalX", "maybeIdentityY", "ToolTipController", "el", "e", "el", "ToolTipController", "drawCharts", "configSelector", "breadcrumbController", "sectionController", "html", "closed", "v", "str", "program", "counter", "rectYOpts", "d", "n", "chart", "plot", "rectY", "binX", "ruleY", "el", "params", "headings", "callback", "debounce", "above", "h", "rect", "threshold", "els", "level", "breadcrumb", "items", "li", "a", "observer", "wait", "timeout", "args"]
+  "sources": ["../../../../node_modules/d3-array/src/ascending.js", "../../../../node_modules/d3-array/src/descending.js", "../../../../node_modules/d3-array/src/bisector.js", "../../../../node_modules/d3-array/src/number.js", "../../../../node_modules/d3-array/src/bisect.js", "../../../../node_modules/d3-array/src/count.js", "../../../../node_modules/d3-array/src/cross.js", "../../../../node_modules/d3-array/src/cumsum.js", "../../../../node_modules/d3-array/src/variance.js", "../../../../node_modules/d3-array/src/deviation.js", "../../../../node_modules/d3-array/src/extent.js", "../../../../node_modules/d3-array/src/fsum.js", "../../../../node_modules/internmap/src/index.js", "../../../../node_modules/d3-array/src/identity.js", "../../../../node_modules/d3-array/src/group.js", "../../../../node_modules/d3-array/src/permute.js", "../../../../node_modules/d3-array/src/sort.js", "../../../../node_modules/d3-array/src/groupSort.js", "../../../../node_modules/d3-array/src/ticks.js", "../../../../node_modules/d3-array/src/threshold/sturges.js", "../../../../node_modules/d3-array/src/max.js", "../../../../node_modules/d3-array/src/maxIndex.js", "../../../../node_modules/d3-array/src/min.js", "../../../../node_modules/d3-array/src/minIndex.js", "../../../../node_modules/d3-array/src/quickselect.js", "../../../../node_modules/d3-array/src/greatest.js", "../../../../node_modules/d3-array/src/quantile.js", "../../../../node_modules/d3-array/src/threshold/freedmanDiaconis.js", "../../../../node_modules/d3-array/src/threshold/scott.js", "../../../../node_modules/d3-array/src/mean.js", "../../../../node_modules/d3-array/src/median.js", "../../../../node_modules/d3-array/src/merge.js", "../../../../node_modules/d3-array/src/mode.js", "../../../../node_modules/d3-array/src/pairs.js", "../../../../node_modules/d3-array/src/range.js", "../../../../node_modules/d3-array/src/sum.js", "../../../../node_modules/d3-array/src/reverse.js", "../../../../node_modules/d3-axis/src/identity.js", "../../../../node_modules/d3-axis/src/axis.js", "../../../../node_modules/d3-dispatch/src/dispatch.js", "../../../../node_modules/d3-selection/src/namespaces.js", "../../../../node_modules/d3-selection/src/namespace.js", "../../../../node_modules/d3-selection/src/creator.js", "../../../../node_modules/d3-selection/src/selector.js", "../../../../node_modules/d3-selection/src/selection/select.js", "../../../../node_modules/d3-selection/src/array.js", "../../../../node_modules/d3-selection/src/selectorAll.js", "../../../../node_modules/d3-selection/src/selection/selectAll.js", "../../../../node_modules/d3-selection/src/matcher.js", "../../../../node_modules/d3-selection/src/selection/selectChild.js", "../../../../node_modules/d3-selection/src/selection/selectChildren.js", "../../../../node_modules/d3-selection/src/selection/filter.js", "../../../../node_modules/d3-selection/src/selection/sparse.js", "../../../../node_modules/d3-selection/src/selection/enter.js", "../../../../node_modules/d3-selection/src/constant.js", "../../../../node_modules/d3-selection/src/selection/data.js", "../../../../node_modules/d3-selection/src/selection/exit.js", "../../../../node_modules/d3-selection/src/selection/join.js", "../../../../node_modules/d3-selection/src/selection/merge.js", "../../../../node_modules/d3-selection/src/selection/order.js", "../../../../node_modules/d3-selection/src/selection/sort.js", "../../../../node_modules/d3-selection/src/selection/call.js", "../../../../node_modules/d3-selection/src/selection/nodes.js", "../../../../node_modules/d3-selection/src/selection/node.js", "../../../../node_modules/d3-selection/src/selection/size.js", "../../../../node_modules/d3-selection/src/selection/empty.js", "../../../../node_modules/d3-selection/src/selection/each.js", "../../../../node_modules/d3-selection/src/selection/attr.js", "../../../../node_modules/d3-selection/src/window.js", "../../../../node_modules/d3-selection/src/selection/style.js", "../../../../node_modules/d3-selection/src/selection/property.js", "../../../../node_modules/d3-selection/src/selection/classed.js", "../../../../node_modules/d3-selection/src/selection/text.js", "../../../../node_modules/d3-selection/src/selection/html.js", "../../../../node_modules/d3-selection/src/selection/raise.js", "../../../../node_modules/d3-selection/src/selection/lower.js", "../../../../node_modules/d3-selection/src/selection/append.js", "../../../../node_modules/d3-selection/src/selection/insert.js", "../../../../node_modules/d3-selection/src/selection/remove.js", "../../../../node_modules/d3-selection/src/selection/clone.js", "../../../../node_modules/d3-selection/src/selection/datum.js", "../../../../node_modules/d3-selection/src/selection/on.js", "../../../../node_modules/d3-selection/src/selection/dispatch.js", "../../../../node_modules/d3-selection/src/selection/iterator.js", "../../../../node_modules/d3-selection/src/selection/index.js", "../../../../node_modules/d3-selection/src/select.js", "../../../../node_modules/d3-selection/src/sourceEvent.js", "../../../../node_modules/d3-selection/src/pointer.js", "../../../../node_modules/d3-color/src/define.js", "../../../../node_modules/d3-color/src/color.js", "../../../../node_modules/d3-color/src/math.js", "../../../../node_modules/d3-color/src/lab.js", "../../../../node_modules/d3-color/src/cubehelix.js", "../../../../node_modules/d3-interpolate/src/basis.js", "../../../../node_modules/d3-interpolate/src/basisClosed.js", "../../../../node_modules/d3-interpolate/src/constant.js", "../../../../node_modules/d3-interpolate/src/color.js", "../../../../node_modules/d3-interpolate/src/rgb.js", "../../../../node_modules/d3-interpolate/src/numberArray.js", "../../../../node_modules/d3-interpolate/src/array.js", "../../../../node_modules/d3-interpolate/src/date.js", "../../../../node_modules/d3-interpolate/src/number.js", "../../../../node_modules/d3-interpolate/src/object.js", "../../../../node_modules/d3-interpolate/src/string.js", "../../../../node_modules/d3-interpolate/src/value.js", "../../../../node_modules/d3-interpolate/src/round.js", "../../../../node_modules/d3-interpolate/src/transform/decompose.js", "../../../../node_modules/d3-interpolate/src/transform/parse.js", "../../../../node_modules/d3-interpolate/src/transform/index.js", "../../../../node_modules/d3-interpolate/src/hsl.js", "../../../../node_modules/d3-interpolate/src/lab.js", "../../../../node_modules/d3-interpolate/src/hcl.js", "../../../../node_modules/d3-interpolate/src/cubehelix.js", "../../../../node_modules/d3-interpolate/src/piecewise.js", "../../../../node_modules/d3-interpolate/src/quantize.js", "../../../../node_modules/d3-timer/src/timer.js", "../../../../node_modules/d3-timer/src/timeout.js", "../../../../node_modules/d3-transition/src/transition/schedule.js", "../../../../node_modules/d3-transition/src/interrupt.js", "../../../../node_modules/d3-transition/src/selection/interrupt.js", "../../../../node_modules/d3-transition/src/transition/tween.js", "../../../../node_modules/d3-transition/src/transition/interpolate.js", "../../../../node_modules/d3-transition/src/transition/attr.js", "../../../../node_modules/d3-transition/src/transition/attrTween.js", "../../../../node_modules/d3-transition/src/transition/delay.js", "../../../../node_modules/d3-transition/src/transition/duration.js", "../../../../node_modules/d3-transition/src/transition/ease.js", "../../../../node_modules/d3-transition/src/transition/easeVarying.js", "../../../../node_modules/d3-transition/src/transition/filter.js", "../../../../node_modules/d3-transition/src/transition/merge.js", "../../../../node_modules/d3-transition/src/transition/on.js", "../../../../node_modules/d3-transition/src/transition/remove.js", "../../../../node_modules/d3-transition/src/transition/select.js", "../../../../node_modules/d3-transition/src/transition/selectAll.js", "../../../../node_modules/d3-transition/src/transition/selection.js", "../../../../node_modules/d3-transition/src/transition/style.js", "../../../../node_modules/d3-transition/src/transition/styleTween.js", "../../../../node_modules/d3-transition/src/transition/text.js", "../../../../node_modules/d3-transition/src/transition/textTween.js", "../../../../node_modules/d3-transition/src/transition/transition.js", "../../../../node_modules/d3-transition/src/transition/end.js", "../../../../node_modules/d3-transition/src/transition/index.js", "../../../../node_modules/d3-ease/src/cubic.js", "../../../../node_modules/d3-transition/src/selection/transition.js", "../../../../node_modules/d3-transition/src/selection/index.js", "../../../../node_modules/d3-brush/src/brush.js", "../../../../node_modules/d3-path/src/path.js", "../../../../node_modules/d3-format/src/formatDecimal.js", "../../../../node_modules/d3-format/src/exponent.js", "../../../../node_modules/d3-format/src/formatGroup.js", "../../../../node_modules/d3-format/src/formatNumerals.js", "../../../../node_modules/d3-format/src/formatSpecifier.js", "../../../../node_modules/d3-format/src/formatTrim.js", "../../../../node_modules/d3-format/src/formatPrefixAuto.js", "../../../../node_modules/d3-format/src/formatRounded.js", "../../../../node_modules/d3-format/src/formatTypes.js", "../../../../node_modules/d3-format/src/identity.js", "../../../../node_modules/d3-format/src/locale.js", "../../../../node_modules/d3-format/src/defaultLocale.js", "../../../../node_modules/d3-format/src/precisionFixed.js", "../../../../node_modules/d3-format/src/precisionPrefix.js", "../../../../node_modules/d3-format/src/precisionRound.js", "../../../../node_modules/d3-geo/src/math.js", "../../../../node_modules/d3-geo/src/noop.js", "../../../../node_modules/d3-geo/src/stream.js", "../../../../node_modules/d3-geo/src/cartesian.js", "../../../../node_modules/d3-geo/src/compose.js", "../../../../node_modules/d3-geo/src/rotation.js", "../../../../node_modules/d3-geo/src/circle.js", "../../../../node_modules/d3-geo/src/clip/buffer.js", "../../../../node_modules/d3-geo/src/pointEqual.js", "../../../../node_modules/d3-geo/src/clip/rejoin.js", "../../../../node_modules/d3-geo/src/polygonContains.js", "../../../../node_modules/d3-geo/src/clip/index.js", "../../../../node_modules/d3-geo/src/clip/antimeridian.js", "../../../../node_modules/d3-geo/src/clip/circle.js", "../../../../node_modules/d3-geo/src/clip/line.js", "../../../../node_modules/d3-geo/src/clip/rectangle.js", "../../../../node_modules/d3-geo/src/identity.js", "../../../../node_modules/d3-geo/src/path/area.js", "../../../../node_modules/d3-geo/src/path/bounds.js", "../../../../node_modules/d3-geo/src/path/centroid.js", "../../../../node_modules/d3-geo/src/path/context.js", "../../../../node_modules/d3-geo/src/path/measure.js", "../../../../node_modules/d3-geo/src/path/string.js", "../../../../node_modules/d3-geo/src/path/index.js", "../../../../node_modules/d3-geo/src/transform.js", "../../../../node_modules/d3-geo/src/projection/fit.js", "../../../../node_modules/d3-geo/src/projection/resample.js", "../../../../node_modules/d3-geo/src/projection/index.js", "../../../../node_modules/d3-geo/src/projection/conic.js", "../../../../node_modules/d3-geo/src/projection/cylindricalEqualArea.js", "../../../../node_modules/d3-geo/src/projection/conicEqualArea.js", "../../../../node_modules/d3-geo/src/projection/albers.js", "../../../../node_modules/d3-geo/src/projection/albersUsa.js", "../../../../node_modules/d3-geo/src/projection/azimuthal.js", "../../../../node_modules/d3-geo/src/projection/azimuthalEqualArea.js", "../../../../node_modules/d3-geo/src/projection/azimuthalEquidistant.js", "../../../../node_modules/d3-geo/src/projection/mercator.js", "../../../../node_modules/d3-geo/src/projection/conicConformal.js", "../../../../node_modules/d3-geo/src/projection/equirectangular.js", "../../../../node_modules/d3-geo/src/projection/conicEquidistant.js", "../../../../node_modules/d3-geo/src/projection/equalEarth.js", "../../../../node_modules/d3-geo/src/projection/gnomonic.js", "../../../../node_modules/d3-geo/src/projection/orthographic.js", "../../../../node_modules/d3-geo/src/projection/stereographic.js", "../../../../node_modules/d3-geo/src/projection/transverseMercator.js", "../../../../node_modules/d3-scale/src/init.js", "../../../../node_modules/d3-scale/src/ordinal.js", "../../../../node_modules/d3-scale/src/band.js", "../../../../node_modules/d3-scale/src/constant.js", "../../../../node_modules/d3-scale/src/number.js", "../../../../node_modules/d3-scale/src/continuous.js", "../../../../node_modules/d3-scale/src/tickFormat.js", "../../../../node_modules/d3-scale/src/linear.js", "../../../../node_modules/d3-scale/src/identity.js", "../../../../node_modules/d3-scale/src/nice.js", "../../../../node_modules/d3-scale/src/log.js", "../../../../node_modules/d3-scale/src/symlog.js", "../../../../node_modules/d3-scale/src/pow.js", "../../../../node_modules/d3-scale/src/quantile.js", "../../../../node_modules/d3-scale/src/threshold.js", "../../../../node_modules/d3-time/src/interval.js", "../../../../node_modules/d3-time/src/millisecond.js", "../../../../node_modules/d3-time/src/second.js", "../../../../node_modules/d3-time/src/minute.js", "../../../../node_modules/d3-time/src/hour.js", "../../../../node_modules/d3-time/src/day.js", "../../../../node_modules/d3-time/src/week.js", "../../../../node_modules/d3-time/src/month.js", "../../../../node_modules/d3-time/src/year.js", "../../../../node_modules/d3-time/src/ticks.js", "../../../../node_modules/d3-time-format/src/locale.js", "../../../../node_modules/d3-time-format/src/defaultLocale.js", "../../../../node_modules/d3-scale/src/time.js", "../../../../node_modules/d3-scale/src/utcTime.js", "../../../../node_modules/d3-scale/src/sequential.js", "../../../../node_modules/d3-scale/src/diverging.js", "../../../../node_modules/d3-scale-chromatic/src/colors.js", "../../../../node_modules/d3-scale-chromatic/src/categorical/category10.js", "../../../../node_modules/d3-scale-chromatic/src/categorical/Accent.js", "../../../../node_modules/d3-scale-chromatic/src/categorical/Dark2.js", "../../../../node_modules/d3-scale-chromatic/src/categorical/Paired.js", "../../../../node_modules/d3-scale-chromatic/src/categorical/Pastel1.js", "../../../../node_modules/d3-scale-chromatic/src/categorical/Pastel2.js", "../../../../node_modules/d3-scale-chromatic/src/categorical/Set1.js", "../../../../node_modules/d3-scale-chromatic/src/categorical/Set2.js", "../../../../node_modules/d3-scale-chromatic/src/categorical/Set3.js", "../../../../node_modules/d3-scale-chromatic/src/categorical/Tableau10.js", "../../../../node_modules/d3-scale-chromatic/src/ramp.js", "../../../../node_modules/d3-scale-chromatic/src/diverging/BrBG.js", "../../../../node_modules/d3-scale-chromatic/src/diverging/PRGn.js", "../../../../node_modules/d3-scale-chromatic/src/diverging/PiYG.js", "../../../../node_modules/d3-scale-chromatic/src/diverging/PuOr.js", "../../../../node_modules/d3-scale-chromatic/src/diverging/RdBu.js", "../../../../node_modules/d3-scale-chromatic/src/diverging/RdGy.js", "../../../../node_modules/d3-scale-chromatic/src/diverging/RdYlBu.js", "../../../../node_modules/d3-scale-chromatic/src/diverging/RdYlGn.js", "../../../../node_modules/d3-scale-chromatic/src/diverging/Spectral.js", "../../../../node_modules/d3-scale-chromatic/src/sequential-multi/BuGn.js", "../../../../node_modules/d3-scale-chromatic/src/sequential-multi/BuPu.js", "../../../../node_modules/d3-scale-chromatic/src/sequential-multi/GnBu.js", "../../../../node_modules/d3-scale-chromatic/src/sequential-multi/OrRd.js", "../../../../node_modules/d3-scale-chromatic/src/sequential-multi/PuBuGn.js", "../../../../node_modules/d3-scale-chromatic/src/sequential-multi/PuBu.js", "../../../../node_modules/d3-scale-chromatic/src/sequential-multi/PuRd.js", "../../../../node_modules/d3-scale-chromatic/src/sequential-multi/RdPu.js", "../../../../node_modules/d3-scale-chromatic/src/sequential-multi/YlGnBu.js", "../../../../node_modules/d3-scale-chromatic/src/sequential-multi/YlGn.js", "../../../../node_modules/d3-scale-chromatic/src/sequential-multi/YlOrBr.js", "../../../../node_modules/d3-scale-chromatic/src/sequential-multi/YlOrRd.js", "../../../../node_modules/d3-scale-chromatic/src/sequential-single/Blues.js", "../../../../node_modules/d3-scale-chromatic/src/sequential-single/Greens.js", "../../../../node_modules/d3-scale-chromatic/src/sequential-single/Greys.js", "../../../../node_modules/d3-scale-chromatic/src/sequential-single/Purples.js", "../../../../node_modules/d3-scale-chromatic/src/sequential-single/Reds.js", "../../../../node_modules/d3-scale-chromatic/src/sequential-single/Oranges.js", "../../../../node_modules/d3-scale-chromatic/src/sequential-multi/cividis.js", "../../../../node_modules/d3-scale-chromatic/src/sequential-multi/cubehelix.js", "../../../../node_modules/d3-scale-chromatic/src/sequential-multi/rainbow.js", "../../../../node_modules/d3-scale-chromatic/src/sequential-multi/sinebow.js", "../../../../node_modules/d3-scale-chromatic/src/sequential-multi/turbo.js", "../../../../node_modules/d3-scale-chromatic/src/sequential-multi/viridis.js", "../../../../node_modules/d3-shape/src/math.js", "../../../../node_modules/d3-shape/src/symbol/asterisk.js", "../../../../node_modules/d3-shape/src/symbol/circle.js", "../../../../node_modules/d3-shape/src/symbol/cross.js", "../../../../node_modules/d3-shape/src/symbol/diamond.js", "../../../../node_modules/d3-shape/src/symbol/diamond2.js", "../../../../node_modules/d3-shape/src/symbol/plus.js", "../../../../node_modules/d3-shape/src/symbol/square.js", "../../../../node_modules/d3-shape/src/symbol/square2.js", "../../../../node_modules/d3-shape/src/symbol/star.js", "../../../../node_modules/d3-shape/src/symbol/triangle.js", "../../../../node_modules/d3-shape/src/symbol/triangle2.js", "../../../../node_modules/d3-shape/src/symbol/wye.js", "../../../../node_modules/d3-shape/src/symbol/times.js", "../../../../node_modules/d3-shape/src/symbol.js", "../../../../node_modules/d3-zoom/src/transform.js", "../../../../node_modules/@observablehq/plot/src/defined.js", "../../../../node_modules/isoformat/src/format.js", "../../../../node_modules/isoformat/src/parse.js", "../../../../node_modules/@observablehq/plot/src/time.js", "../../../../node_modules/@observablehq/plot/src/options.js", "../../../../node_modules/@observablehq/plot/src/scales/index.js", "../../../../node_modules/@observablehq/plot/src/symbol.js", "../../../../node_modules/@observablehq/plot/src/transforms/basic.js", "../../../../node_modules/@observablehq/plot/src/transforms/group.js", "../../../../node_modules/@observablehq/plot/src/channel.js", "../../../../node_modules/@observablehq/plot/src/context.js", "../../../../node_modules/@observablehq/plot/src/warnings.js", "../../../../node_modules/@observablehq/plot/src/projection.js", "../../../../node_modules/@observablehq/plot/src/scales/schemes.js", "../../../../node_modules/@observablehq/plot/src/scales/quantitative.js", "../../../../node_modules/@observablehq/plot/src/scales/diverging.js", "../../../../node_modules/@observablehq/plot/src/scales/temporal.js", "../../../../node_modules/@observablehq/plot/src/scales/ordinal.js", "../../../../node_modules/@observablehq/plot/src/scales.js", "../../../../node_modules/@observablehq/plot/src/memoize.js", "../../../../node_modules/@observablehq/plot/src/format.js", "../../../../node_modules/@observablehq/plot/src/style.js", "../../../../node_modules/@observablehq/plot/src/dimensions.js", "../../../../node_modules/@observablehq/plot/src/facet.js", "../../../../node_modules/@observablehq/plot/src/mark.js", "../../../../node_modules/@observablehq/plot/src/interactions/pointer.js", "../../../../node_modules/@observablehq/plot/src/axes.js", "../../../../node_modules/@observablehq/plot/src/legends/ramp.js", "../../../../node_modules/@observablehq/plot/src/math.js", "../../../../node_modules/@observablehq/plot/src/marker.js", "../../../../node_modules/@observablehq/plot/src/transforms/inset.js", "../../../../node_modules/@observablehq/plot/src/transforms/interval.js", "../../../../node_modules/@observablehq/plot/src/marks/rule.js", "../../../../node_modules/@observablehq/plot/src/template.js", "../../../../node_modules/@observablehq/plot/src/marks/text.js", "../../../../node_modules/@observablehq/plot/src/marks/vector.js", "../../../../node_modules/@observablehq/plot/src/marks/axis.js", "../../../../node_modules/@observablehq/plot/src/legends/swatches.js", "../../../../node_modules/@observablehq/plot/src/legends.js", "../../../../node_modules/@observablehq/plot/src/marks/frame.js", "../../../../node_modules/@observablehq/plot/src/marks/tip.js", "../../../../node_modules/@observablehq/plot/src/plot.js", "../../../../node_modules/@observablehq/plot/src/transforms/bin.js", "../../../../node_modules/@observablehq/plot/src/transforms/identity.js", "../../../../node_modules/@observablehq/plot/src/transforms/stack.js", "../../../../node_modules/@observablehq/plot/src/marks/rect.js", "../../shared/treenav.ts", "../index.ts"],
+  "sourcesContent": ["export default function ascending(a, b) {\n  return a == null || b == null ? NaN : a < b ? -1 : a > b ? 1 : a >= b ? 0 : NaN;\n}\n", "export default function descending(a, b) {\n  return a == null || b == null ? NaN\n    : b < a ? -1\n    : b > a ? 1\n    : b >= a ? 0\n    : NaN;\n}\n", "import ascending from \"./ascending.js\";\nimport descending from \"./descending.js\";\n\nexport default function bisector(f) {\n  let compare1, compare2, delta;\n\n  // If an accessor is specified, promote it to a comparator. In this case we\n  // can test whether the search value is (self-) comparable. We can\u2019t do this\n  // for a comparator (except for specific, known comparators) because we can\u2019t\n  // tell if the comparator is symmetric, and an asymmetric comparator can\u2019t be\n  // used to test whether a single value is comparable.\n  if (f.length !== 2) {\n    compare1 = ascending;\n    compare2 = (d, x) => ascending(f(d), x);\n    delta = (d, x) => f(d) - x;\n  } else {\n    compare1 = f === ascending || f === descending ? f : zero;\n    compare2 = f;\n    delta = f;\n  }\n\n  function left(a, x, lo = 0, hi = a.length) {\n    if (lo < hi) {\n      if (compare1(x, x) !== 0) return hi;\n      do {\n        const mid = (lo + hi) >>> 1;\n        if (compare2(a[mid], x) < 0) lo = mid + 1;\n        else hi = mid;\n      } while (lo < hi);\n    }\n    return lo;\n  }\n\n  function right(a, x, lo = 0, hi = a.length) {\n    if (lo < hi) {\n      if (compare1(x, x) !== 0) return hi;\n      do {\n        const mid = (lo + hi) >>> 1;\n        if (compare2(a[mid], x) <= 0) lo = mid + 1;\n        else hi = mid;\n      } while (lo < hi);\n    }\n    return lo;\n  }\n\n  function center(a, x, lo = 0, hi = a.length) {\n    const i = left(a, x, lo, hi - 1);\n    return i > lo && delta(a[i - 1], x) > -delta(a[i], x) ? i - 1 : i;\n  }\n\n  return {left, center, right};\n}\n\nfunction zero() {\n  return 0;\n}\n", "export default function number(x) {\n  return x === null ? NaN : +x;\n}\n\nexport function* numbers(values, valueof) {\n  if (valueof === undefined) {\n    for (let value of values) {\n      if (value != null && (value = +value) >= value) {\n        yield value;\n      }\n    }\n  } else {\n    let index = -1;\n    for (let value of values) {\n      if ((value = valueof(value, ++index, values)) != null && (value = +value) >= value) {\n        yield value;\n      }\n    }\n  }\n}\n", "import ascending from \"./ascending.js\";\nimport bisector from \"./bisector.js\";\nimport number from \"./number.js\";\n\nconst ascendingBisect = bisector(ascending);\nexport const bisectRight = ascendingBisect.right;\nexport const bisectLeft = ascendingBisect.left;\nexport const bisectCenter = bisector(number).center;\nexport default bisectRight;\n", "export default function count(values, valueof) {\n  let count = 0;\n  if (valueof === undefined) {\n    for (let value of values) {\n      if (value != null && (value = +value) >= value) {\n        ++count;\n      }\n    }\n  } else {\n    let index = -1;\n    for (let value of values) {\n      if ((value = valueof(value, ++index, values)) != null && (value = +value) >= value) {\n        ++count;\n      }\n    }\n  }\n  return count;\n}\n", "function length(array) {\n  return array.length | 0;\n}\n\nfunction empty(length) {\n  return !(length > 0);\n}\n\nfunction arrayify(values) {\n  return typeof values !== \"object\" || \"length\" in values ? values : Array.from(values);\n}\n\nfunction reducer(reduce) {\n  return values => reduce(...values);\n}\n\nexport default function cross(...values) {\n  const reduce = typeof values[values.length - 1] === \"function\" && reducer(values.pop());\n  values = values.map(arrayify);\n  const lengths = values.map(length);\n  const j = values.length - 1;\n  const index = new Array(j + 1).fill(0);\n  const product = [];\n  if (j < 0 || lengths.some(empty)) return product;\n  while (true) {\n    product.push(index.map((j, i) => values[i][j]));\n    let i = j;\n    while (++index[i] === lengths[i]) {\n      if (i === 0) return reduce ? product.map(reduce) : product;\n      index[i--] = 0;\n    }\n  }\n}\n", "export default function cumsum(values, valueof) {\n  var sum = 0, index = 0;\n  return Float64Array.from(values, valueof === undefined\n    ? v => (sum += +v || 0)\n    : v => (sum += +valueof(v, index++, values) || 0));\n}", "export default function variance(values, valueof) {\n  let count = 0;\n  let delta;\n  let mean = 0;\n  let sum = 0;\n  if (valueof === undefined) {\n    for (let value of values) {\n      if (value != null && (value = +value) >= value) {\n        delta = value - mean;\n        mean += delta / ++count;\n        sum += delta * (value - mean);\n      }\n    }\n  } else {\n    let index = -1;\n    for (let value of values) {\n      if ((value = valueof(value, ++index, values)) != null && (value = +value) >= value) {\n        delta = value - mean;\n        mean += delta / ++count;\n        sum += delta * (value - mean);\n      }\n    }\n  }\n  if (count > 1) return sum / (count - 1);\n}\n", "import variance from \"./variance.js\";\n\nexport default function deviation(values, valueof) {\n  const v = variance(values, valueof);\n  return v ? Math.sqrt(v) : v;\n}\n", "export default function extent(values, valueof) {\n  let min;\n  let max;\n  if (valueof === undefined) {\n    for (const value of values) {\n      if (value != null) {\n        if (min === undefined) {\n          if (value >= value) min = max = value;\n        } else {\n          if (min > value) min = value;\n          if (max < value) max = value;\n        }\n      }\n    }\n  } else {\n    let index = -1;\n    for (let value of values) {\n      if ((value = valueof(value, ++index, values)) != null) {\n        if (min === undefined) {\n          if (value >= value) min = max = value;\n        } else {\n          if (min > value) min = value;\n          if (max < value) max = value;\n        }\n      }\n    }\n  }\n  return [min, max];\n}\n", "// https://github.com/python/cpython/blob/a74eea238f5baba15797e2e8b570d153bc8690a7/Modules/mathmodule.c#L1423\nexport class Adder {\n  constructor() {\n    this._partials = new Float64Array(32);\n    this._n = 0;\n  }\n  add(x) {\n    const p = this._partials;\n    let i = 0;\n    for (let j = 0; j < this._n && j < 32; j++) {\n      const y = p[j],\n        hi = x + y,\n        lo = Math.abs(x) < Math.abs(y) ? x - (hi - y) : y - (hi - x);\n      if (lo) p[i++] = lo;\n      x = hi;\n    }\n    p[i] = x;\n    this._n = i + 1;\n    return this;\n  }\n  valueOf() {\n    const p = this._partials;\n    let n = this._n, x, y, lo, hi = 0;\n    if (n > 0) {\n      hi = p[--n];\n      while (n > 0) {\n        x = hi;\n        y = p[--n];\n        hi = x + y;\n        lo = y - (hi - x);\n        if (lo) break;\n      }\n      if (n > 0 && ((lo < 0 && p[n - 1] < 0) || (lo > 0 && p[n - 1] > 0))) {\n        y = lo * 2;\n        x = hi + y;\n        if (y == x - hi) hi = x;\n      }\n    }\n    return hi;\n  }\n}\n\nexport function fsum(values, valueof) {\n  const adder = new Adder();\n  if (valueof === undefined) {\n    for (let value of values) {\n      if (value = +value) {\n        adder.add(value);\n      }\n    }\n  } else {\n    let index = -1;\n    for (let value of values) {\n      if (value = +valueof(value, ++index, values)) {\n        adder.add(value);\n      }\n    }\n  }\n  return +adder;\n}\n\nexport function fcumsum(values, valueof) {\n  const adder = new Adder();\n  let index = -1;\n  return Float64Array.from(values, valueof === undefined\n      ? v => adder.add(+v || 0)\n      : v => adder.add(+valueof(v, ++index, values) || 0)\n  );\n}\n", "export class InternMap extends Map {\n  constructor(entries, key = keyof) {\n    super();\n    Object.defineProperties(this, {_intern: {value: new Map()}, _key: {value: key}});\n    if (entries != null) for (const [key, value] of entries) this.set(key, value);\n  }\n  get(key) {\n    return super.get(intern_get(this, key));\n  }\n  has(key) {\n    return super.has(intern_get(this, key));\n  }\n  set(key, value) {\n    return super.set(intern_set(this, key), value);\n  }\n  delete(key) {\n    return super.delete(intern_delete(this, key));\n  }\n}\n\nexport class InternSet extends Set {\n  constructor(values, key = keyof) {\n    super();\n    Object.defineProperties(this, {_intern: {value: new Map()}, _key: {value: key}});\n    if (values != null) for (const value of values) this.add(value);\n  }\n  has(value) {\n    return super.has(intern_get(this, value));\n  }\n  add(value) {\n    return super.add(intern_set(this, value));\n  }\n  delete(value) {\n    return super.delete(intern_delete(this, value));\n  }\n}\n\nfunction intern_get({_intern, _key}, value) {\n  const key = _key(value);\n  return _intern.has(key) ? _intern.get(key) : value;\n}\n\nfunction intern_set({_intern, _key}, value) {\n  const key = _key(value);\n  if (_intern.has(key)) return _intern.get(key);\n  _intern.set(key, value);\n  return value;\n}\n\nfunction intern_delete({_intern, _key}, value) {\n  const key = _key(value);\n  if (_intern.has(key)) {\n    value = _intern.get(key);\n    _intern.delete(key);\n  }\n  return value;\n}\n\nfunction keyof(value) {\n  return value !== null && typeof value === \"object\" ? value.valueOf() : value;\n}\n", "export default function identity(x) {\n  return x;\n}\n", "import {InternMap} from \"internmap\";\nimport identity from \"./identity.js\";\n\nexport default function group(values, ...keys) {\n  return nest(values, identity, identity, keys);\n}\n\nexport function groups(values, ...keys) {\n  return nest(values, Array.from, identity, keys);\n}\n\nfunction flatten(groups, keys) {\n  for (let i = 1, n = keys.length; i < n; ++i) {\n    groups = groups.flatMap(g => g.pop().map(([key, value]) => [...g, key, value]));\n  }\n  return groups;\n}\n\nexport function flatGroup(values, ...keys) {\n  return flatten(groups(values, ...keys), keys);\n}\n\nexport function flatRollup(values, reduce, ...keys) {\n  return flatten(rollups(values, reduce, ...keys), keys);\n}\n\nexport function rollup(values, reduce, ...keys) {\n  return nest(values, identity, reduce, keys);\n}\n\nexport function rollups(values, reduce, ...keys) {\n  return nest(values, Array.from, reduce, keys);\n}\n\nexport function index(values, ...keys) {\n  return nest(values, identity, unique, keys);\n}\n\nexport function indexes(values, ...keys) {\n  return nest(values, Array.from, unique, keys);\n}\n\nfunction unique(values) {\n  if (values.length !== 1) throw new Error(\"duplicate key\");\n  return values[0];\n}\n\nfunction nest(values, map, reduce, keys) {\n  return (function regroup(values, i) {\n    if (i >= keys.length) return reduce(values);\n    const groups = new InternMap();\n    const keyof = keys[i++];\n    let index = -1;\n    for (const value of values) {\n      const key = keyof(value, ++index, values);\n      const group = groups.get(key);\n      if (group) group.push(value);\n      else groups.set(key, [value]);\n    }\n    for (const [key, values] of groups) {\n      groups.set(key, regroup(values, i));\n    }\n    return map(groups);\n  })(values, 0);\n}\n", "export default function permute(source, keys) {\n  return Array.from(keys, key => source[key]);\n}\n", "import ascending from \"./ascending.js\";\nimport permute from \"./permute.js\";\n\nexport default function sort(values, ...F) {\n  if (typeof values[Symbol.iterator] !== \"function\") throw new TypeError(\"values is not iterable\");\n  values = Array.from(values);\n  let [f] = F;\n  if ((f && f.length !== 2) || F.length > 1) {\n    const index = Uint32Array.from(values, (d, i) => i);\n    if (F.length > 1) {\n      F = F.map(f => values.map(f));\n      index.sort((i, j) => {\n        for (const f of F) {\n          const c = ascendingDefined(f[i], f[j]);\n          if (c) return c;\n        }\n      });\n    } else {\n      f = values.map(f);\n      index.sort((i, j) => ascendingDefined(f[i], f[j]));\n    }\n    return permute(values, index);\n  }\n  return values.sort(compareDefined(f));\n}\n\nexport function compareDefined(compare = ascending) {\n  if (compare === ascending) return ascendingDefined;\n  if (typeof compare !== \"function\") throw new TypeError(\"compare is not a function\");\n  return (a, b) => {\n    const x = compare(a, b);\n    if (x || x === 0) return x;\n    return (compare(b, b) === 0) - (compare(a, a) === 0);\n  };\n}\n\nexport function ascendingDefined(a, b) {\n  return (a == null || !(a >= a)) - (b == null || !(b >= b)) || (a < b ? -1 : a > b ? 1 : 0);\n}\n", "import ascending from \"./ascending.js\";\nimport group, {rollup} from \"./group.js\";\nimport sort from \"./sort.js\";\n\nexport default function groupSort(values, reduce, key) {\n  return (reduce.length !== 2\n    ? sort(rollup(values, reduce, key), (([ak, av], [bk, bv]) => ascending(av, bv) || ascending(ak, bk)))\n    : sort(group(values, key), (([ak, av], [bk, bv]) => reduce(av, bv) || ascending(ak, bk))))\n    .map(([key]) => key);\n}\n", "const e10 = Math.sqrt(50),\n    e5 = Math.sqrt(10),\n    e2 = Math.sqrt(2);\n\nfunction tickSpec(start, stop, count) {\n  const step = (stop - start) / Math.max(0, count),\n      power = Math.floor(Math.log10(step)),\n      error = step / Math.pow(10, power),\n      factor = error >= e10 ? 10 : error >= e5 ? 5 : error >= e2 ? 2 : 1;\n  let i1, i2, inc;\n  if (power < 0) {\n    inc = Math.pow(10, -power) / factor;\n    i1 = Math.round(start * inc);\n    i2 = Math.round(stop * inc);\n    if (i1 / inc < start) ++i1;\n    if (i2 / inc > stop) --i2;\n    inc = -inc;\n  } else {\n    inc = Math.pow(10, power) * factor;\n    i1 = Math.round(start / inc);\n    i2 = Math.round(stop / inc);\n    if (i1 * inc < start) ++i1;\n    if (i2 * inc > stop) --i2;\n  }\n  if (i2 < i1 && 0.5 <= count && count < 2) return tickSpec(start, stop, count * 2);\n  return [i1, i2, inc];\n}\n\nexport default function ticks(start, stop, count) {\n  stop = +stop, start = +start, count = +count;\n  if (!(count > 0)) return [];\n  if (start === stop) return [start];\n  const reverse = stop < start, [i1, i2, inc] = reverse ? tickSpec(stop, start, count) : tickSpec(start, stop, count);\n  if (!(i2 >= i1)) return [];\n  const n = i2 - i1 + 1, ticks = new Array(n);\n  if (reverse) {\n    if (inc < 0) for (let i = 0; i < n; ++i) ticks[i] = (i2 - i) / -inc;\n    else for (let i = 0; i < n; ++i) ticks[i] = (i2 - i) * inc;\n  } else {\n    if (inc < 0) for (let i = 0; i < n; ++i) ticks[i] = (i1 + i) / -inc;\n    else for (let i = 0; i < n; ++i) ticks[i] = (i1 + i) * inc;\n  }\n  return ticks;\n}\n\nexport function tickIncrement(start, stop, count) {\n  stop = +stop, start = +start, count = +count;\n  return tickSpec(start, stop, count)[2];\n}\n\nexport function tickStep(start, stop, count) {\n  stop = +stop, start = +start, count = +count;\n  const reverse = stop < start, inc = reverse ? tickIncrement(stop, start, count) : tickIncrement(start, stop, count);\n  return (reverse ? -1 : 1) * (inc < 0 ? 1 / -inc : inc);\n}\n", "import count from \"../count.js\";\n\nexport default function thresholdSturges(values) {\n  return Math.max(1, Math.ceil(Math.log(count(values)) / Math.LN2) + 1);\n}\n", "export default function max(values, valueof) {\n  let max;\n  if (valueof === undefined) {\n    for (const value of values) {\n      if (value != null\n          && (max < value || (max === undefined && value >= value))) {\n        max = value;\n      }\n    }\n  } else {\n    let index = -1;\n    for (let value of values) {\n      if ((value = valueof(value, ++index, values)) != null\n          && (max < value || (max === undefined && value >= value))) {\n        max = value;\n      }\n    }\n  }\n  return max;\n}\n", "export default function maxIndex(values, valueof) {\n  let max;\n  let maxIndex = -1;\n  let index = -1;\n  if (valueof === undefined) {\n    for (const value of values) {\n      ++index;\n      if (value != null\n          && (max < value || (max === undefined && value >= value))) {\n        max = value, maxIndex = index;\n      }\n    }\n  } else {\n    for (let value of values) {\n      if ((value = valueof(value, ++index, values)) != null\n          && (max < value || (max === undefined && value >= value))) {\n        max = value, maxIndex = index;\n      }\n    }\n  }\n  return maxIndex;\n}\n", "export default function min(values, valueof) {\n  let min;\n  if (valueof === undefined) {\n    for (const value of values) {\n      if (value != null\n          && (min > value || (min === undefined && value >= value))) {\n        min = value;\n      }\n    }\n  } else {\n    let index = -1;\n    for (let value of values) {\n      if ((value = valueof(value, ++index, values)) != null\n          && (min > value || (min === undefined && value >= value))) {\n        min = value;\n      }\n    }\n  }\n  return min;\n}\n", "export default function minIndex(values, valueof) {\n  let min;\n  let minIndex = -1;\n  let index = -1;\n  if (valueof === undefined) {\n    for (const value of values) {\n      ++index;\n      if (value != null\n          && (min > value || (min === undefined && value >= value))) {\n        min = value, minIndex = index;\n      }\n    }\n  } else {\n    for (let value of values) {\n      if ((value = valueof(value, ++index, values)) != null\n          && (min > value || (min === undefined && value >= value))) {\n        min = value, minIndex = index;\n      }\n    }\n  }\n  return minIndex;\n}\n", "import {ascendingDefined, compareDefined} from \"./sort.js\";\n\n// Based on https://github.com/mourner/quickselect\n// ISC license, Copyright 2018 Vladimir Agafonkin.\nexport default function quickselect(array, k, left = 0, right = Infinity, compare) {\n  k = Math.floor(k);\n  left = Math.floor(Math.max(0, left));\n  right = Math.floor(Math.min(array.length - 1, right));\n\n  if (!(left <= k && k <= right)) return array;\n\n  compare = compare === undefined ? ascendingDefined : compareDefined(compare);\n\n  while (right > left) {\n    if (right - left > 600) {\n      const n = right - left + 1;\n      const m = k - left + 1;\n      const z = Math.log(n);\n      const s = 0.5 * Math.exp(2 * z / 3);\n      const sd = 0.5 * Math.sqrt(z * s * (n - s) / n) * (m - n / 2 < 0 ? -1 : 1);\n      const newLeft = Math.max(left, Math.floor(k - m * s / n + sd));\n      const newRight = Math.min(right, Math.floor(k + (n - m) * s / n + sd));\n      quickselect(array, k, newLeft, newRight, compare);\n    }\n\n    const t = array[k];\n    let i = left;\n    let j = right;\n\n    swap(array, left, k);\n    if (compare(array[right], t) > 0) swap(array, left, right);\n\n    while (i < j) {\n      swap(array, i, j), ++i, --j;\n      while (compare(array[i], t) < 0) ++i;\n      while (compare(array[j], t) > 0) --j;\n    }\n\n    if (compare(array[left], t) === 0) swap(array, left, j);\n    else ++j, swap(array, j, right);\n\n    if (j <= k) left = j + 1;\n    if (k <= j) right = j - 1;\n  }\n\n  return array;\n}\n\nfunction swap(array, i, j) {\n  const t = array[i];\n  array[i] = array[j];\n  array[j] = t;\n}\n", "import ascending from \"./ascending.js\";\n\nexport default function greatest(values, compare = ascending) {\n  let max;\n  let defined = false;\n  if (compare.length === 1) {\n    let maxValue;\n    for (const element of values) {\n      const value = compare(element);\n      if (defined\n          ? ascending(value, maxValue) > 0\n          : ascending(value, value) === 0) {\n        max = element;\n        maxValue = value;\n        defined = true;\n      }\n    }\n  } else {\n    for (const value of values) {\n      if (defined\n          ? compare(value, max) > 0\n          : compare(value, value) === 0) {\n        max = value;\n        defined = true;\n      }\n    }\n  }\n  return max;\n}\n", "import max from \"./max.js\";\nimport maxIndex from \"./maxIndex.js\";\nimport min from \"./min.js\";\nimport minIndex from \"./minIndex.js\";\nimport quickselect from \"./quickselect.js\";\nimport number, {numbers} from \"./number.js\";\nimport {ascendingDefined} from \"./sort.js\";\nimport greatest from \"./greatest.js\";\n\nexport default function quantile(values, p, valueof) {\n  values = Float64Array.from(numbers(values, valueof));\n  if (!(n = values.length) || isNaN(p = +p)) return;\n  if (p <= 0 || n < 2) return min(values);\n  if (p >= 1) return max(values);\n  var n,\n      i = (n - 1) * p,\n      i0 = Math.floor(i),\n      value0 = max(quickselect(values, i0).subarray(0, i0 + 1)),\n      value1 = min(values.subarray(i0 + 1));\n  return value0 + (value1 - value0) * (i - i0);\n}\n\nexport function quantileSorted(values, p, valueof = number) {\n  if (!(n = values.length) || isNaN(p = +p)) return;\n  if (p <= 0 || n < 2) return +valueof(values[0], 0, values);\n  if (p >= 1) return +valueof(values[n - 1], n - 1, values);\n  var n,\n      i = (n - 1) * p,\n      i0 = Math.floor(i),\n      value0 = +valueof(values[i0], i0, values),\n      value1 = +valueof(values[i0 + 1], i0 + 1, values);\n  return value0 + (value1 - value0) * (i - i0);\n}\n\nexport function quantileIndex(values, p, valueof) {\n  values = Float64Array.from(numbers(values, valueof));\n  if (!(n = values.length) || isNaN(p = +p)) return;\n  if (p <= 0 || n < 2) return minIndex(values);\n  if (p >= 1) return maxIndex(values);\n  var n,\n      i = Math.floor((n - 1) * p),\n      order = (i, j) => ascendingDefined(values[i], values[j]),\n      index = quickselect(Uint32Array.from(values, (_, i) => i), i, 0, n - 1, order);\n  return greatest(index.subarray(0, i + 1), i => values[i]);\n}\n", "import count from \"../count.js\";\nimport quantile from \"../quantile.js\";\n\nexport default function thresholdFreedmanDiaconis(values, min, max) {\n  const c = count(values), d = quantile(values, 0.75) - quantile(values, 0.25);\n  return c && d ? Math.ceil((max - min) / (2 * d * Math.pow(c, -1 / 3))) : 1;\n}\n", "import count from \"../count.js\";\nimport deviation from \"../deviation.js\";\n\nexport default function thresholdScott(values, min, max) {\n  const c = count(values), d = deviation(values);\n  return c && d ? Math.ceil((max - min) * Math.cbrt(c) / (3.49 * d)) : 1;\n}\n", "export default function mean(values, valueof) {\n  let count = 0;\n  let sum = 0;\n  if (valueof === undefined) {\n    for (let value of values) {\n      if (value != null && (value = +value) >= value) {\n        ++count, sum += value;\n      }\n    }\n  } else {\n    let index = -1;\n    for (let value of values) {\n      if ((value = valueof(value, ++index, values)) != null && (value = +value) >= value) {\n        ++count, sum += value;\n      }\n    }\n  }\n  if (count) return sum / count;\n}\n", "import quantile, {quantileIndex} from \"./quantile.js\";\n\nexport default function median(values, valueof) {\n  return quantile(values, 0.5, valueof);\n}\n\nexport function medianIndex(values, valueof) {\n  return quantileIndex(values, 0.5, valueof);\n}\n", "function* flatten(arrays) {\n  for (const array of arrays) {\n    yield* array;\n  }\n}\n\nexport default function merge(arrays) {\n  return Array.from(flatten(arrays));\n}\n", "import {InternMap} from \"internmap\";\n\nexport default function mode(values, valueof) {\n  const counts = new InternMap();\n  if (valueof === undefined) {\n    for (let value of values) {\n      if (value != null && value >= value) {\n        counts.set(value, (counts.get(value) || 0) + 1);\n      }\n    }\n  } else {\n    let index = -1;\n    for (let value of values) {\n      if ((value = valueof(value, ++index, values)) != null && value >= value) {\n        counts.set(value, (counts.get(value) || 0) + 1);\n      }\n    }\n  }\n  let modeValue;\n  let modeCount = 0;\n  for (const [value, count] of counts) {\n    if (count > modeCount) {\n      modeCount = count;\n      modeValue = value;\n    }\n  }\n  return modeValue;\n}\n", "export default function pairs(values, pairof = pair) {\n  const pairs = [];\n  let previous;\n  let first = false;\n  for (const value of values) {\n    if (first) pairs.push(pairof(previous, value));\n    previous = value;\n    first = true;\n  }\n  return pairs;\n}\n\nexport function pair(a, b) {\n  return [a, b];\n}\n", "export default function range(start, stop, step) {\n  start = +start, stop = +stop, step = (n = arguments.length) < 2 ? (stop = start, start = 0, 1) : n < 3 ? 1 : +step;\n\n  var i = -1,\n      n = Math.max(0, Math.ceil((stop - start) / step)) | 0,\n      range = new Array(n);\n\n  while (++i < n) {\n    range[i] = start + i * step;\n  }\n\n  return range;\n}\n", "export default function sum(values, valueof) {\n  let sum = 0;\n  if (valueof === undefined) {\n    for (let value of values) {\n      if (value = +value) {\n        sum += value;\n      }\n    }\n  } else {\n    let index = -1;\n    for (let value of values) {\n      if (value = +valueof(value, ++index, values)) {\n        sum += value;\n      }\n    }\n  }\n  return sum;\n}\n", "export default function reverse(values) {\n  if (typeof values[Symbol.iterator] !== \"function\") throw new TypeError(\"values is not iterable\");\n  return Array.from(values).reverse();\n}\n", "export default function(x) {\n  return x;\n}\n", "import identity from \"./identity.js\";\n\nvar top = 1,\n    right = 2,\n    bottom = 3,\n    left = 4,\n    epsilon = 1e-6;\n\nfunction translateX(x) {\n  return \"translate(\" + x + \",0)\";\n}\n\nfunction translateY(y) {\n  return \"translate(0,\" + y + \")\";\n}\n\nfunction number(scale) {\n  return d => +scale(d);\n}\n\nfunction center(scale, offset) {\n  offset = Math.max(0, scale.bandwidth() - offset * 2) / 2;\n  if (scale.round()) offset = Math.round(offset);\n  return d => +scale(d) + offset;\n}\n\nfunction entering() {\n  return !this.__axis;\n}\n\nfunction axis(orient, scale) {\n  var tickArguments = [],\n      tickValues = null,\n      tickFormat = null,\n      tickSizeInner = 6,\n      tickSizeOuter = 6,\n      tickPadding = 3,\n      offset = typeof window !== \"undefined\" && window.devicePixelRatio > 1 ? 0 : 0.5,\n      k = orient === top || orient === left ? -1 : 1,\n      x = orient === left || orient === right ? \"x\" : \"y\",\n      transform = orient === top || orient === bottom ? translateX : translateY;\n\n  function axis(context) {\n    var values = tickValues == null ? (scale.ticks ? scale.ticks.apply(scale, tickArguments) : scale.domain()) : tickValues,\n        format = tickFormat == null ? (scale.tickFormat ? scale.tickFormat.apply(scale, tickArguments) : identity) : tickFormat,\n        spacing = Math.max(tickSizeInner, 0) + tickPadding,\n        range = scale.range(),\n        range0 = +range[0] + offset,\n        range1 = +range[range.length - 1] + offset,\n        position = (scale.bandwidth ? center : number)(scale.copy(), offset),\n        selection = context.selection ? context.selection() : context,\n        path = selection.selectAll(\".domain\").data([null]),\n        tick = selection.selectAll(\".tick\").data(values, scale).order(),\n        tickExit = tick.exit(),\n        tickEnter = tick.enter().append(\"g\").attr(\"class\", \"tick\"),\n        line = tick.select(\"line\"),\n        text = tick.select(\"text\");\n\n    path = path.merge(path.enter().insert(\"path\", \".tick\")\n        .attr(\"class\", \"domain\")\n        .attr(\"stroke\", \"currentColor\"));\n\n    tick = tick.merge(tickEnter);\n\n    line = line.merge(tickEnter.append(\"line\")\n        .attr(\"stroke\", \"currentColor\")\n        .attr(x + \"2\", k * tickSizeInner));\n\n    text = text.merge(tickEnter.append(\"text\")\n        .attr(\"fill\", \"currentColor\")\n        .attr(x, k * spacing)\n        .attr(\"dy\", orient === top ? \"0em\" : orient === bottom ? \"0.71em\" : \"0.32em\"));\n\n    if (context !== selection) {\n      path = path.transition(context);\n      tick = tick.transition(context);\n      line = line.transition(context);\n      text = text.transition(context);\n\n      tickExit = tickExit.transition(context)\n          .attr(\"opacity\", epsilon)\n          .attr(\"transform\", function(d) { return isFinite(d = position(d)) ? transform(d + offset) : this.getAttribute(\"transform\"); });\n\n      tickEnter\n          .attr(\"opacity\", epsilon)\n          .attr(\"transform\", function(d) { var p = this.parentNode.__axis; return transform((p && isFinite(p = p(d)) ? p : position(d)) + offset); });\n    }\n\n    tickExit.remove();\n\n    path\n        .attr(\"d\", orient === left || orient === right\n            ? (tickSizeOuter ? \"M\" + k * tickSizeOuter + \",\" + range0 + \"H\" + offset + \"V\" + range1 + \"H\" + k * tickSizeOuter : \"M\" + offset + \",\" + range0 + \"V\" + range1)\n            : (tickSizeOuter ? \"M\" + range0 + \",\" + k * tickSizeOuter + \"V\" + offset + \"H\" + range1 + \"V\" + k * tickSizeOuter : \"M\" + range0 + \",\" + offset + \"H\" + range1));\n\n    tick\n        .attr(\"opacity\", 1)\n        .attr(\"transform\", function(d) { return transform(position(d) + offset); });\n\n    line\n        .attr(x + \"2\", k * tickSizeInner);\n\n    text\n        .attr(x, k * spacing)\n        .text(format);\n\n    selection.filter(entering)\n        .attr(\"fill\", \"none\")\n        .attr(\"font-size\", 10)\n        .attr(\"font-family\", \"sans-serif\")\n        .attr(\"text-anchor\", orient === right ? \"start\" : orient === left ? \"end\" : \"middle\");\n\n    selection\n        .each(function() { this.__axis = position; });\n  }\n\n  axis.scale = function(_) {\n    return arguments.length ? (scale = _, axis) : scale;\n  };\n\n  axis.ticks = function() {\n    return tickArguments = Array.from(arguments), axis;\n  };\n\n  axis.tickArguments = function(_) {\n    return arguments.length ? (tickArguments = _ == null ? [] : Array.from(_), axis) : tickArguments.slice();\n  };\n\n  axis.tickValues = function(_) {\n    return arguments.length ? (tickValues = _ == null ? null : Array.from(_), axis) : tickValues && tickValues.slice();\n  };\n\n  axis.tickFormat = function(_) {\n    return arguments.length ? (tickFormat = _, axis) : tickFormat;\n  };\n\n  axis.tickSize = function(_) {\n    return arguments.length ? (tickSizeInner = tickSizeOuter = +_, axis) : tickSizeInner;\n  };\n\n  axis.tickSizeInner = function(_) {\n    return arguments.length ? (tickSizeInner = +_, axis) : tickSizeInner;\n  };\n\n  axis.tickSizeOuter = function(_) {\n    return arguments.length ? (tickSizeOuter = +_, axis) : tickSizeOuter;\n  };\n\n  axis.tickPadding = function(_) {\n    return arguments.length ? (tickPadding = +_, axis) : tickPadding;\n  };\n\n  axis.offset = function(_) {\n    return arguments.length ? (offset = +_, axis) : offset;\n  };\n\n  return axis;\n}\n\nexport function axisTop(scale) {\n  return axis(top, scale);\n}\n\nexport function axisRight(scale) {\n  return axis(right, scale);\n}\n\nexport function axisBottom(scale) {\n  return axis(bottom, scale);\n}\n\nexport function axisLeft(scale) {\n  return axis(left, scale);\n}\n", "var noop = {value: () => {}};\n\nfunction dispatch() {\n  for (var i = 0, n = arguments.length, _ = {}, t; i < n; ++i) {\n    if (!(t = arguments[i] + \"\") || (t in _) || /[\\s.]/.test(t)) throw new Error(\"illegal type: \" + t);\n    _[t] = [];\n  }\n  return new Dispatch(_);\n}\n\nfunction Dispatch(_) {\n  this._ = _;\n}\n\nfunction parseTypenames(typenames, types) {\n  return typenames.trim().split(/^|\\s+/).map(function(t) {\n    var name = \"\", i = t.indexOf(\".\");\n    if (i >= 0) name = t.slice(i + 1), t = t.slice(0, i);\n    if (t && !types.hasOwnProperty(t)) throw new Error(\"unknown type: \" + t);\n    return {type: t, name: name};\n  });\n}\n\nDispatch.prototype = dispatch.prototype = {\n  constructor: Dispatch,\n  on: function(typename, callback) {\n    var _ = this._,\n        T = parseTypenames(typename + \"\", _),\n        t,\n        i = -1,\n        n = T.length;\n\n    // If no callback was specified, return the callback of the given type and name.\n    if (arguments.length < 2) {\n      while (++i < n) if ((t = (typename = T[i]).type) && (t = get(_[t], typename.name))) return t;\n      return;\n    }\n\n    // If a type was specified, set the callback for the given type and name.\n    // Otherwise, if a null callback was specified, remove callbacks of the given name.\n    if (callback != null && typeof callback !== \"function\") throw new Error(\"invalid callback: \" + callback);\n    while (++i < n) {\n      if (t = (typename = T[i]).type) _[t] = set(_[t], typename.name, callback);\n      else if (callback == null) for (t in _) _[t] = set(_[t], typename.name, null);\n    }\n\n    return this;\n  },\n  copy: function() {\n    var copy = {}, _ = this._;\n    for (var t in _) copy[t] = _[t].slice();\n    return new Dispatch(copy);\n  },\n  call: function(type, that) {\n    if ((n = arguments.length - 2) > 0) for (var args = new Array(n), i = 0, n, t; i < n; ++i) args[i] = arguments[i + 2];\n    if (!this._.hasOwnProperty(type)) throw new Error(\"unknown type: \" + type);\n    for (t = this._[type], i = 0, n = t.length; i < n; ++i) t[i].value.apply(that, args);\n  },\n  apply: function(type, that, args) {\n    if (!this._.hasOwnProperty(type)) throw new Error(\"unknown type: \" + type);\n    for (var t = this._[type], i = 0, n = t.length; i < n; ++i) t[i].value.apply(that, args);\n  }\n};\n\nfunction get(type, name) {\n  for (var i = 0, n = type.length, c; i < n; ++i) {\n    if ((c = type[i]).name === name) {\n      return c.value;\n    }\n  }\n}\n\nfunction set(type, name, callback) {\n  for (var i = 0, n = type.length; i < n; ++i) {\n    if (type[i].name === name) {\n      type[i] = noop, type = type.slice(0, i).concat(type.slice(i + 1));\n      break;\n    }\n  }\n  if (callback != null) type.push({name: name, value: callback});\n  return type;\n}\n\nexport default dispatch;\n", "export var xhtml = \"http://www.w3.org/1999/xhtml\";\n\nexport default {\n  svg: \"http://www.w3.org/2000/svg\",\n  xhtml: xhtml,\n  xlink: \"http://www.w3.org/1999/xlink\",\n  xml: \"http://www.w3.org/XML/1998/namespace\",\n  xmlns: \"http://www.w3.org/2000/xmlns/\"\n};\n", "import namespaces from \"./namespaces.js\";\n\nexport default function(name) {\n  var prefix = name += \"\", i = prefix.indexOf(\":\");\n  if (i >= 0 && (prefix = name.slice(0, i)) !== \"xmlns\") name = name.slice(i + 1);\n  return namespaces.hasOwnProperty(prefix) ? {space: namespaces[prefix], local: name} : name; // eslint-disable-line no-prototype-builtins\n}\n", "import namespace from \"./namespace.js\";\nimport {xhtml} from \"./namespaces.js\";\n\nfunction creatorInherit(name) {\n  return function() {\n    var document = this.ownerDocument,\n        uri = this.namespaceURI;\n    return uri === xhtml && document.documentElement.namespaceURI === xhtml\n        ? document.createElement(name)\n        : document.createElementNS(uri, name);\n  };\n}\n\nfunction creatorFixed(fullname) {\n  return function() {\n    return this.ownerDocument.createElementNS(fullname.space, fullname.local);\n  };\n}\n\nexport default function(name) {\n  var fullname = namespace(name);\n  return (fullname.local\n      ? creatorFixed\n      : creatorInherit)(fullname);\n}\n", "function none() {}\n\nexport default function(selector) {\n  return selector == null ? none : function() {\n    return this.querySelector(selector);\n  };\n}\n", "import {Selection} from \"./index.js\";\nimport selector from \"../selector.js\";\n\nexport default function(select) {\n  if (typeof select !== \"function\") select = selector(select);\n\n  for (var groups = this._groups, m = groups.length, subgroups = new Array(m), j = 0; j < m; ++j) {\n    for (var group = groups[j], n = group.length, subgroup = subgroups[j] = new Array(n), node, subnode, i = 0; i < n; ++i) {\n      if ((node = group[i]) && (subnode = select.call(node, node.__data__, i, group))) {\n        if (\"__data__\" in node) subnode.__data__ = node.__data__;\n        subgroup[i] = subnode;\n      }\n    }\n  }\n\n  return new Selection(subgroups, this._parents);\n}\n", "// Given something array like (or null), returns something that is strictly an\n// array. This is used to ensure that array-like objects passed to d3.selectAll\n// or selection.selectAll are converted into proper arrays when creating a\n// selection; we don\u2019t ever want to create a selection backed by a live\n// HTMLCollection or NodeList. However, note that selection.selectAll will use a\n// static NodeList as a group, since it safely derived from querySelectorAll.\nexport default function array(x) {\n  return x == null ? [] : Array.isArray(x) ? x : Array.from(x);\n}\n", "function empty() {\n  return [];\n}\n\nexport default function(selector) {\n  return selector == null ? empty : function() {\n    return this.querySelectorAll(selector);\n  };\n}\n", "import {Selection} from \"./index.js\";\nimport array from \"../array.js\";\nimport selectorAll from \"../selectorAll.js\";\n\nfunction arrayAll(select) {\n  return function() {\n    return array(select.apply(this, arguments));\n  };\n}\n\nexport default function(select) {\n  if (typeof select === \"function\") select = arrayAll(select);\n  else select = selectorAll(select);\n\n  for (var groups = this._groups, m = groups.length, subgroups = [], parents = [], j = 0; j < m; ++j) {\n    for (var group = groups[j], n = group.length, node, i = 0; i < n; ++i) {\n      if (node = group[i]) {\n        subgroups.push(select.call(node, node.__data__, i, group));\n        parents.push(node);\n      }\n    }\n  }\n\n  return new Selection(subgroups, parents);\n}\n", "export default function(selector) {\n  return function() {\n    return this.matches(selector);\n  };\n}\n\nexport function childMatcher(selector) {\n  return function(node) {\n    return node.matches(selector);\n  };\n}\n\n", "import {childMatcher} from \"../matcher.js\";\n\nvar find = Array.prototype.find;\n\nfunction childFind(match) {\n  return function() {\n    return find.call(this.children, match);\n  };\n}\n\nfunction childFirst() {\n  return this.firstElementChild;\n}\n\nexport default function(match) {\n  return this.select(match == null ? childFirst\n      : childFind(typeof match === \"function\" ? match : childMatcher(match)));\n}\n", "import {childMatcher} from \"../matcher.js\";\n\nvar filter = Array.prototype.filter;\n\nfunction children() {\n  return Array.from(this.children);\n}\n\nfunction childrenFilter(match) {\n  return function() {\n    return filter.call(this.children, match);\n  };\n}\n\nexport default function(match) {\n  return this.selectAll(match == null ? children\n      : childrenFilter(typeof match === \"function\" ? match : childMatcher(match)));\n}\n", "import {Selection} from \"./index.js\";\nimport matcher from \"../matcher.js\";\n\nexport default function(match) {\n  if (typeof match !== \"function\") match = matcher(match);\n\n  for (var groups = this._groups, m = groups.length, subgroups = new Array(m), j = 0; j < m; ++j) {\n    for (var group = groups[j], n = group.length, subgroup = subgroups[j] = [], node, i = 0; i < n; ++i) {\n      if ((node = group[i]) && match.call(node, node.__data__, i, group)) {\n        subgroup.push(node);\n      }\n    }\n  }\n\n  return new Selection(subgroups, this._parents);\n}\n", "export default function(update) {\n  return new Array(update.length);\n}\n", "import sparse from \"./sparse.js\";\nimport {Selection} from \"./index.js\";\n\nexport default function() {\n  return new Selection(this._enter || this._groups.map(sparse), this._parents);\n}\n\nexport function EnterNode(parent, datum) {\n  this.ownerDocument = parent.ownerDocument;\n  this.namespaceURI = parent.namespaceURI;\n  this._next = null;\n  this._parent = parent;\n  this.__data__ = datum;\n}\n\nEnterNode.prototype = {\n  constructor: EnterNode,\n  appendChild: function(child) { return this._parent.insertBefore(child, this._next); },\n  insertBefore: function(child, next) { return this._parent.insertBefore(child, next); },\n  querySelector: function(selector) { return this._parent.querySelector(selector); },\n  querySelectorAll: function(selector) { return this._parent.querySelectorAll(selector); }\n};\n", "export default function(x) {\n  return function() {\n    return x;\n  };\n}\n", "import {Selection} from \"./index.js\";\nimport {EnterNode} from \"./enter.js\";\nimport constant from \"../constant.js\";\n\nfunction bindIndex(parent, group, enter, update, exit, data) {\n  var i = 0,\n      node,\n      groupLength = group.length,\n      dataLength = data.length;\n\n  // Put any non-null nodes that fit into update.\n  // Put any null nodes into enter.\n  // Put any remaining data into enter.\n  for (; i < dataLength; ++i) {\n    if (node = group[i]) {\n      node.__data__ = data[i];\n      update[i] = node;\n    } else {\n      enter[i] = new EnterNode(parent, data[i]);\n    }\n  }\n\n  // Put any non-null nodes that don\u2019t fit into exit.\n  for (; i < groupLength; ++i) {\n    if (node = group[i]) {\n      exit[i] = node;\n    }\n  }\n}\n\nfunction bindKey(parent, group, enter, update, exit, data, key) {\n  var i,\n      node,\n      nodeByKeyValue = new Map,\n      groupLength = group.length,\n      dataLength = data.length,\n      keyValues = new Array(groupLength),\n      keyValue;\n\n  // Compute the key for each node.\n  // If multiple nodes have the same key, the duplicates are added to exit.\n  for (i = 0; i < groupLength; ++i) {\n    if (node = group[i]) {\n      keyValues[i] = keyValue = key.call(node, node.__data__, i, group) + \"\";\n      if (nodeByKeyValue.has(keyValue)) {\n        exit[i] = node;\n      } else {\n        nodeByKeyValue.set(keyValue, node);\n      }\n    }\n  }\n\n  // Compute the key for each datum.\n  // If there a node associated with this key, join and add it to update.\n  // If there is not (or the key is a duplicate), add it to enter.\n  for (i = 0; i < dataLength; ++i) {\n    keyValue = key.call(parent, data[i], i, data) + \"\";\n    if (node = nodeByKeyValue.get(keyValue)) {\n      update[i] = node;\n      node.__data__ = data[i];\n      nodeByKeyValue.delete(keyValue);\n    } else {\n      enter[i] = new EnterNode(parent, data[i]);\n    }\n  }\n\n  // Add any remaining nodes that were not bound to data to exit.\n  for (i = 0; i < groupLength; ++i) {\n    if ((node = group[i]) && (nodeByKeyValue.get(keyValues[i]) === node)) {\n      exit[i] = node;\n    }\n  }\n}\n\nfunction datum(node) {\n  return node.__data__;\n}\n\nexport default function(value, key) {\n  if (!arguments.length) return Array.from(this, datum);\n\n  var bind = key ? bindKey : bindIndex,\n      parents = this._parents,\n      groups = this._groups;\n\n  if (typeof value !== \"function\") value = constant(value);\n\n  for (var m = groups.length, update = new Array(m), enter = new Array(m), exit = new Array(m), j = 0; j < m; ++j) {\n    var parent = parents[j],\n        group = groups[j],\n        groupLength = group.length,\n        data = arraylike(value.call(parent, parent && parent.__data__, j, parents)),\n        dataLength = data.length,\n        enterGroup = enter[j] = new Array(dataLength),\n        updateGroup = update[j] = new Array(dataLength),\n        exitGroup = exit[j] = new Array(groupLength);\n\n    bind(parent, group, enterGroup, updateGroup, exitGroup, data, key);\n\n    // Now connect the enter nodes to their following update node, such that\n    // appendChild can insert the materialized enter node before this node,\n    // rather than at the end of the parent node.\n    for (var i0 = 0, i1 = 0, previous, next; i0 < dataLength; ++i0) {\n      if (previous = enterGroup[i0]) {\n        if (i0 >= i1) i1 = i0 + 1;\n        while (!(next = updateGroup[i1]) && ++i1 < dataLength);\n        previous._next = next || null;\n      }\n    }\n  }\n\n  update = new Selection(update, parents);\n  update._enter = enter;\n  update._exit = exit;\n  return update;\n}\n\n// Given some data, this returns an array-like view of it: an object that\n// exposes a length property and allows numeric indexing. Note that unlike\n// selectAll, this isn\u2019t worried about \u201Clive\u201D collections because the resulting\n// array will only be used briefly while data is being bound. (It is possible to\n// cause the data to change while iterating by using a key function, but please\n// don\u2019t; we\u2019d rather avoid a gratuitous copy.)\nfunction arraylike(data) {\n  return typeof data === \"object\" && \"length\" in data\n    ? data // Array, TypedArray, NodeList, array-like\n    : Array.from(data); // Map, Set, iterable, string, or anything else\n}\n", "import sparse from \"./sparse.js\";\nimport {Selection} from \"./index.js\";\n\nexport default function() {\n  return new Selection(this._exit || this._groups.map(sparse), this._parents);\n}\n", "export default function(onenter, onupdate, onexit) {\n  var enter = this.enter(), update = this, exit = this.exit();\n  if (typeof onenter === \"function\") {\n    enter = onenter(enter);\n    if (enter) enter = enter.selection();\n  } else {\n    enter = enter.append(onenter + \"\");\n  }\n  if (onupdate != null) {\n    update = onupdate(update);\n    if (update) update = update.selection();\n  }\n  if (onexit == null) exit.remove(); else onexit(exit);\n  return enter && update ? enter.merge(update).order() : update;\n}\n", "import {Selection} from \"./index.js\";\n\nexport default function(context) {\n  var selection = context.selection ? context.selection() : context;\n\n  for (var groups0 = this._groups, groups1 = selection._groups, m0 = groups0.length, m1 = groups1.length, m = Math.min(m0, m1), merges = new Array(m0), j = 0; j < m; ++j) {\n    for (var group0 = groups0[j], group1 = groups1[j], n = group0.length, merge = merges[j] = new Array(n), node, i = 0; i < n; ++i) {\n      if (node = group0[i] || group1[i]) {\n        merge[i] = node;\n      }\n    }\n  }\n\n  for (; j < m0; ++j) {\n    merges[j] = groups0[j];\n  }\n\n  return new Selection(merges, this._parents);\n}\n", "export default function() {\n\n  for (var groups = this._groups, j = -1, m = groups.length; ++j < m;) {\n    for (var group = groups[j], i = group.length - 1, next = group[i], node; --i >= 0;) {\n      if (node = group[i]) {\n        if (next && node.compareDocumentPosition(next) ^ 4) next.parentNode.insertBefore(node, next);\n        next = node;\n      }\n    }\n  }\n\n  return this;\n}\n", "import {Selection} from \"./index.js\";\n\nexport default function(compare) {\n  if (!compare) compare = ascending;\n\n  function compareNode(a, b) {\n    return a && b ? compare(a.__data__, b.__data__) : !a - !b;\n  }\n\n  for (var groups = this._groups, m = groups.length, sortgroups = new Array(m), j = 0; j < m; ++j) {\n    for (var group = groups[j], n = group.length, sortgroup = sortgroups[j] = new Array(n), node, i = 0; i < n; ++i) {\n      if (node = group[i]) {\n        sortgroup[i] = node;\n      }\n    }\n    sortgroup.sort(compareNode);\n  }\n\n  return new Selection(sortgroups, this._parents).order();\n}\n\nfunction ascending(a, b) {\n  return a < b ? -1 : a > b ? 1 : a >= b ? 0 : NaN;\n}\n", "export default function() {\n  var callback = arguments[0];\n  arguments[0] = this;\n  callback.apply(null, arguments);\n  return this;\n}\n", "export default function() {\n  return Array.from(this);\n}\n", "export default function() {\n\n  for (var groups = this._groups, j = 0, m = groups.length; j < m; ++j) {\n    for (var group = groups[j], i = 0, n = group.length; i < n; ++i) {\n      var node = group[i];\n      if (node) return node;\n    }\n  }\n\n  return null;\n}\n", "export default function() {\n  let size = 0;\n  for (const node of this) ++size; // eslint-disable-line no-unused-vars\n  return size;\n}\n", "export default function() {\n  return !this.node();\n}\n", "export default function(callback) {\n\n  for (var groups = this._groups, j = 0, m = groups.length; j < m; ++j) {\n    for (var group = groups[j], i = 0, n = group.length, node; i < n; ++i) {\n      if (node = group[i]) callback.call(node, node.__data__, i, group);\n    }\n  }\n\n  return this;\n}\n", "import namespace from \"../namespace.js\";\n\nfunction attrRemove(name) {\n  return function() {\n    this.removeAttribute(name);\n  };\n}\n\nfunction attrRemoveNS(fullname) {\n  return function() {\n    this.removeAttributeNS(fullname.space, fullname.local);\n  };\n}\n\nfunction attrConstant(name, value) {\n  return function() {\n    this.setAttribute(name, value);\n  };\n}\n\nfunction attrConstantNS(fullname, value) {\n  return function() {\n    this.setAttributeNS(fullname.space, fullname.local, value);\n  };\n}\n\nfunction attrFunction(name, value) {\n  return function() {\n    var v = value.apply(this, arguments);\n    if (v == null) this.removeAttribute(name);\n    else this.setAttribute(name, v);\n  };\n}\n\nfunction attrFunctionNS(fullname, value) {\n  return function() {\n    var v = value.apply(this, arguments);\n    if (v == null) this.removeAttributeNS(fullname.space, fullname.local);\n    else this.setAttributeNS(fullname.space, fullname.local, v);\n  };\n}\n\nexport default function(name, value) {\n  var fullname = namespace(name);\n\n  if (arguments.length < 2) {\n    var node = this.node();\n    return fullname.local\n        ? node.getAttributeNS(fullname.space, fullname.local)\n        : node.getAttribute(fullname);\n  }\n\n  return this.each((value == null\n      ? (fullname.local ? attrRemoveNS : attrRemove) : (typeof value === \"function\"\n      ? (fullname.local ? attrFunctionNS : attrFunction)\n      : (fullname.local ? attrConstantNS : attrConstant)))(fullname, value));\n}\n", "export default function(node) {\n  return (node.ownerDocument && node.ownerDocument.defaultView) // node is a Node\n      || (node.document && node) // node is a Window\n      || node.defaultView; // node is a Document\n}\n", "import defaultView from \"../window.js\";\n\nfunction styleRemove(name) {\n  return function() {\n    this.style.removeProperty(name);\n  };\n}\n\nfunction styleConstant(name, value, priority) {\n  return function() {\n    this.style.setProperty(name, value, priority);\n  };\n}\n\nfunction styleFunction(name, value, priority) {\n  return function() {\n    var v = value.apply(this, arguments);\n    if (v == null) this.style.removeProperty(name);\n    else this.style.setProperty(name, v, priority);\n  };\n}\n\nexport default function(name, value, priority) {\n  return arguments.length > 1\n      ? this.each((value == null\n            ? styleRemove : typeof value === \"function\"\n            ? styleFunction\n            : styleConstant)(name, value, priority == null ? \"\" : priority))\n      : styleValue(this.node(), name);\n}\n\nexport function styleValue(node, name) {\n  return node.style.getPropertyValue(name)\n      || defaultView(node).getComputedStyle(node, null).getPropertyValue(name);\n}\n", "function propertyRemove(name) {\n  return function() {\n    delete this[name];\n  };\n}\n\nfunction propertyConstant(name, value) {\n  return function() {\n    this[name] = value;\n  };\n}\n\nfunction propertyFunction(name, value) {\n  return function() {\n    var v = value.apply(this, arguments);\n    if (v == null) delete this[name];\n    else this[name] = v;\n  };\n}\n\nexport default function(name, value) {\n  return arguments.length > 1\n      ? this.each((value == null\n          ? propertyRemove : typeof value === \"function\"\n          ? propertyFunction\n          : propertyConstant)(name, value))\n      : this.node()[name];\n}\n", "function classArray(string) {\n  return string.trim().split(/^|\\s+/);\n}\n\nfunction classList(node) {\n  return node.classList || new ClassList(node);\n}\n\nfunction ClassList(node) {\n  this._node = node;\n  this._names = classArray(node.getAttribute(\"class\") || \"\");\n}\n\nClassList.prototype = {\n  add: function(name) {\n    var i = this._names.indexOf(name);\n    if (i < 0) {\n      this._names.push(name);\n      this._node.setAttribute(\"class\", this._names.join(\" \"));\n    }\n  },\n  remove: function(name) {\n    var i = this._names.indexOf(name);\n    if (i >= 0) {\n      this._names.splice(i, 1);\n      this._node.setAttribute(\"class\", this._names.join(\" \"));\n    }\n  },\n  contains: function(name) {\n    return this._names.indexOf(name) >= 0;\n  }\n};\n\nfunction classedAdd(node, names) {\n  var list = classList(node), i = -1, n = names.length;\n  while (++i < n) list.add(names[i]);\n}\n\nfunction classedRemove(node, names) {\n  var list = classList(node), i = -1, n = names.length;\n  while (++i < n) list.remove(names[i]);\n}\n\nfunction classedTrue(names) {\n  return function() {\n    classedAdd(this, names);\n  };\n}\n\nfunction classedFalse(names) {\n  return function() {\n    classedRemove(this, names);\n  };\n}\n\nfunction classedFunction(names, value) {\n  return function() {\n    (value.apply(this, arguments) ? classedAdd : classedRemove)(this, names);\n  };\n}\n\nexport default function(name, value) {\n  var names = classArray(name + \"\");\n\n  if (arguments.length < 2) {\n    var list = classList(this.node()), i = -1, n = names.length;\n    while (++i < n) if (!list.contains(names[i])) return false;\n    return true;\n  }\n\n  return this.each((typeof value === \"function\"\n      ? classedFunction : value\n      ? classedTrue\n      : classedFalse)(names, value));\n}\n", "function textRemove() {\n  this.textContent = \"\";\n}\n\nfunction textConstant(value) {\n  return function() {\n    this.textContent = value;\n  };\n}\n\nfunction textFunction(value) {\n  return function() {\n    var v = value.apply(this, arguments);\n    this.textContent = v == null ? \"\" : v;\n  };\n}\n\nexport default function(value) {\n  return arguments.length\n      ? this.each(value == null\n          ? textRemove : (typeof value === \"function\"\n          ? textFunction\n          : textConstant)(value))\n      : this.node().textContent;\n}\n", "function htmlRemove() {\n  this.innerHTML = \"\";\n}\n\nfunction htmlConstant(value) {\n  return function() {\n    this.innerHTML = value;\n  };\n}\n\nfunction htmlFunction(value) {\n  return function() {\n    var v = value.apply(this, arguments);\n    this.innerHTML = v == null ? \"\" : v;\n  };\n}\n\nexport default function(value) {\n  return arguments.length\n      ? this.each(value == null\n          ? htmlRemove : (typeof value === \"function\"\n          ? htmlFunction\n          : htmlConstant)(value))\n      : this.node().innerHTML;\n}\n", "function raise() {\n  if (this.nextSibling) this.parentNode.appendChild(this);\n}\n\nexport default function() {\n  return this.each(raise);\n}\n", "function lower() {\n  if (this.previousSibling) this.parentNode.insertBefore(this, this.parentNode.firstChild);\n}\n\nexport default function() {\n  return this.each(lower);\n}\n", "import creator from \"../creator.js\";\n\nexport default function(name) {\n  var create = typeof name === \"function\" ? name : creator(name);\n  return this.select(function() {\n    return this.appendChild(create.apply(this, arguments));\n  });\n}\n", "import creator from \"../creator.js\";\nimport selector from \"../selector.js\";\n\nfunction constantNull() {\n  return null;\n}\n\nexport default function(name, before) {\n  var create = typeof name === \"function\" ? name : creator(name),\n      select = before == null ? constantNull : typeof before === \"function\" ? before : selector(before);\n  return this.select(function() {\n    return this.insertBefore(create.apply(this, arguments), select.apply(this, arguments) || null);\n  });\n}\n", "function remove() {\n  var parent = this.parentNode;\n  if (parent) parent.removeChild(this);\n}\n\nexport default function() {\n  return this.each(remove);\n}\n", "function selection_cloneShallow() {\n  var clone = this.cloneNode(false), parent = this.parentNode;\n  return parent ? parent.insertBefore(clone, this.nextSibling) : clone;\n}\n\nfunction selection_cloneDeep() {\n  var clone = this.cloneNode(true), parent = this.parentNode;\n  return parent ? parent.insertBefore(clone, this.nextSibling) : clone;\n}\n\nexport default function(deep) {\n  return this.select(deep ? selection_cloneDeep : selection_cloneShallow);\n}\n", "export default function(value) {\n  return arguments.length\n      ? this.property(\"__data__\", value)\n      : this.node().__data__;\n}\n", "function contextListener(listener) {\n  return function(event) {\n    listener.call(this, event, this.__data__);\n  };\n}\n\nfunction parseTypenames(typenames) {\n  return typenames.trim().split(/^|\\s+/).map(function(t) {\n    var name = \"\", i = t.indexOf(\".\");\n    if (i >= 0) name = t.slice(i + 1), t = t.slice(0, i);\n    return {type: t, name: name};\n  });\n}\n\nfunction onRemove(typename) {\n  return function() {\n    var on = this.__on;\n    if (!on) return;\n    for (var j = 0, i = -1, m = on.length, o; j < m; ++j) {\n      if (o = on[j], (!typename.type || o.type === typename.type) && o.name === typename.name) {\n        this.removeEventListener(o.type, o.listener, o.options);\n      } else {\n        on[++i] = o;\n      }\n    }\n    if (++i) on.length = i;\n    else delete this.__on;\n  };\n}\n\nfunction onAdd(typename, value, options) {\n  return function() {\n    var on = this.__on, o, listener = contextListener(value);\n    if (on) for (var j = 0, m = on.length; j < m; ++j) {\n      if ((o = on[j]).type === typename.type && o.name === typename.name) {\n        this.removeEventListener(o.type, o.listener, o.options);\n        this.addEventListener(o.type, o.listener = listener, o.options = options);\n        o.value = value;\n        return;\n      }\n    }\n    this.addEventListener(typename.type, listener, options);\n    o = {type: typename.type, name: typename.name, value: value, listener: listener, options: options};\n    if (!on) this.__on = [o];\n    else on.push(o);\n  };\n}\n\nexport default function(typename, value, options) {\n  var typenames = parseTypenames(typename + \"\"), i, n = typenames.length, t;\n\n  if (arguments.length < 2) {\n    var on = this.node().__on;\n    if (on) for (var j = 0, m = on.length, o; j < m; ++j) {\n      for (i = 0, o = on[j]; i < n; ++i) {\n        if ((t = typenames[i]).type === o.type && t.name === o.name) {\n          return o.value;\n        }\n      }\n    }\n    return;\n  }\n\n  on = value ? onAdd : onRemove;\n  for (i = 0; i < n; ++i) this.each(on(typenames[i], value, options));\n  return this;\n}\n", "import defaultView from \"../window.js\";\n\nfunction dispatchEvent(node, type, params) {\n  var window = defaultView(node),\n      event = window.CustomEvent;\n\n  if (typeof event === \"function\") {\n    event = new event(type, params);\n  } else {\n    event = window.document.createEvent(\"Event\");\n    if (params) event.initEvent(type, params.bubbles, params.cancelable), event.detail = params.detail;\n    else event.initEvent(type, false, false);\n  }\n\n  node.dispatchEvent(event);\n}\n\nfunction dispatchConstant(type, params) {\n  return function() {\n    return dispatchEvent(this, type, params);\n  };\n}\n\nfunction dispatchFunction(type, params) {\n  return function() {\n    return dispatchEvent(this, type, params.apply(this, arguments));\n  };\n}\n\nexport default function(type, params) {\n  return this.each((typeof params === \"function\"\n      ? dispatchFunction\n      : dispatchConstant)(type, params));\n}\n", "export default function*() {\n  for (var groups = this._groups, j = 0, m = groups.length; j < m; ++j) {\n    for (var group = groups[j], i = 0, n = group.length, node; i < n; ++i) {\n      if (node = group[i]) yield node;\n    }\n  }\n}\n", "import selection_select from \"./select.js\";\nimport selection_selectAll from \"./selectAll.js\";\nimport selection_selectChild from \"./selectChild.js\";\nimport selection_selectChildren from \"./selectChildren.js\";\nimport selection_filter from \"./filter.js\";\nimport selection_data from \"./data.js\";\nimport selection_enter from \"./enter.js\";\nimport selection_exit from \"./exit.js\";\nimport selection_join from \"./join.js\";\nimport selection_merge from \"./merge.js\";\nimport selection_order from \"./order.js\";\nimport selection_sort from \"./sort.js\";\nimport selection_call from \"./call.js\";\nimport selection_nodes from \"./nodes.js\";\nimport selection_node from \"./node.js\";\nimport selection_size from \"./size.js\";\nimport selection_empty from \"./empty.js\";\nimport selection_each from \"./each.js\";\nimport selection_attr from \"./attr.js\";\nimport selection_style from \"./style.js\";\nimport selection_property from \"./property.js\";\nimport selection_classed from \"./classed.js\";\nimport selection_text from \"./text.js\";\nimport selection_html from \"./html.js\";\nimport selection_raise from \"./raise.js\";\nimport selection_lower from \"./lower.js\";\nimport selection_append from \"./append.js\";\nimport selection_insert from \"./insert.js\";\nimport selection_remove from \"./remove.js\";\nimport selection_clone from \"./clone.js\";\nimport selection_datum from \"./datum.js\";\nimport selection_on from \"./on.js\";\nimport selection_dispatch from \"./dispatch.js\";\nimport selection_iterator from \"./iterator.js\";\n\nexport var root = [null];\n\nexport function Selection(groups, parents) {\n  this._groups = groups;\n  this._parents = parents;\n}\n\nfunction selection() {\n  return new Selection([[document.documentElement]], root);\n}\n\nfunction selection_selection() {\n  return this;\n}\n\nSelection.prototype = selection.prototype = {\n  constructor: Selection,\n  select: selection_select,\n  selectAll: selection_selectAll,\n  selectChild: selection_selectChild,\n  selectChildren: selection_selectChildren,\n  filter: selection_filter,\n  data: selection_data,\n  enter: selection_enter,\n  exit: selection_exit,\n  join: selection_join,\n  merge: selection_merge,\n  selection: selection_selection,\n  order: selection_order,\n  sort: selection_sort,\n  call: selection_call,\n  nodes: selection_nodes,\n  node: selection_node,\n  size: selection_size,\n  empty: selection_empty,\n  each: selection_each,\n  attr: selection_attr,\n  style: selection_style,\n  property: selection_property,\n  classed: selection_classed,\n  text: selection_text,\n  html: selection_html,\n  raise: selection_raise,\n  lower: selection_lower,\n  append: selection_append,\n  insert: selection_insert,\n  remove: selection_remove,\n  clone: selection_clone,\n  datum: selection_datum,\n  on: selection_on,\n  dispatch: selection_dispatch,\n  [Symbol.iterator]: selection_iterator\n};\n\nexport default selection;\n", "import {Selection, root} from \"./selection/index.js\";\n\nexport default function(selector) {\n  return typeof selector === \"string\"\n      ? new Selection([[document.querySelector(selector)]], [document.documentElement])\n      : new Selection([[selector]], root);\n}\n", "export default function(event) {\n  let sourceEvent;\n  while (sourceEvent = event.sourceEvent) event = sourceEvent;\n  return event;\n}\n", "import sourceEvent from \"./sourceEvent.js\";\n\nexport default function(event, node) {\n  event = sourceEvent(event);\n  if (node === undefined) node = event.currentTarget;\n  if (node) {\n    var svg = node.ownerSVGElement || node;\n    if (svg.createSVGPoint) {\n      var point = svg.createSVGPoint();\n      point.x = event.clientX, point.y = event.clientY;\n      point = point.matrixTransform(node.getScreenCTM().inverse());\n      return [point.x, point.y];\n    }\n    if (node.getBoundingClientRect) {\n      var rect = node.getBoundingClientRect();\n      return [event.clientX - rect.left - node.clientLeft, event.clientY - rect.top - node.clientTop];\n    }\n  }\n  return [event.pageX, event.pageY];\n}\n", "export default function(constructor, factory, prototype) {\n  constructor.prototype = factory.prototype = prototype;\n  prototype.constructor = constructor;\n}\n\nexport function extend(parent, definition) {\n  var prototype = Object.create(parent.prototype);\n  for (var key in definition) prototype[key] = definition[key];\n  return prototype;\n}\n", "import define, {extend} from \"./define.js\";\n\nexport function Color() {}\n\nexport var darker = 0.7;\nexport var brighter = 1 / darker;\n\nvar reI = \"\\\\s*([+-]?\\\\d+)\\\\s*\",\n    reN = \"\\\\s*([+-]?(?:\\\\d*\\\\.)?\\\\d+(?:[eE][+-]?\\\\d+)?)\\\\s*\",\n    reP = \"\\\\s*([+-]?(?:\\\\d*\\\\.)?\\\\d+(?:[eE][+-]?\\\\d+)?)%\\\\s*\",\n    reHex = /^#([0-9a-f]{3,8})$/,\n    reRgbInteger = new RegExp(`^rgb\\\\(${reI},${reI},${reI}\\\\)$`),\n    reRgbPercent = new RegExp(`^rgb\\\\(${reP},${reP},${reP}\\\\)$`),\n    reRgbaInteger = new RegExp(`^rgba\\\\(${reI},${reI},${reI},${reN}\\\\)$`),\n    reRgbaPercent = new RegExp(`^rgba\\\\(${reP},${reP},${reP},${reN}\\\\)$`),\n    reHslPercent = new RegExp(`^hsl\\\\(${reN},${reP},${reP}\\\\)$`),\n    reHslaPercent = new RegExp(`^hsla\\\\(${reN},${reP},${reP},${reN}\\\\)$`);\n\nvar named = {\n  aliceblue: 0xf0f8ff,\n  antiquewhite: 0xfaebd7,\n  aqua: 0x00ffff,\n  aquamarine: 0x7fffd4,\n  azure: 0xf0ffff,\n  beige: 0xf5f5dc,\n  bisque: 0xffe4c4,\n  black: 0x000000,\n  blanchedalmond: 0xffebcd,\n  blue: 0x0000ff,\n  blueviolet: 0x8a2be2,\n  brown: 0xa52a2a,\n  burlywood: 0xdeb887,\n  cadetblue: 0x5f9ea0,\n  chartreuse: 0x7fff00,\n  chocolate: 0xd2691e,\n  coral: 0xff7f50,\n  cornflowerblue: 0x6495ed,\n  cornsilk: 0xfff8dc,\n  crimson: 0xdc143c,\n  cyan: 0x00ffff,\n  darkblue: 0x00008b,\n  darkcyan: 0x008b8b,\n  darkgoldenrod: 0xb8860b,\n  darkgray: 0xa9a9a9,\n  darkgreen: 0x006400,\n  darkgrey: 0xa9a9a9,\n  darkkhaki: 0xbdb76b,\n  darkmagenta: 0x8b008b,\n  darkolivegreen: 0x556b2f,\n  darkorange: 0xff8c00,\n  darkorchid: 0x9932cc,\n  darkred: 0x8b0000,\n  darksalmon: 0xe9967a,\n  darkseagreen: 0x8fbc8f,\n  darkslateblue: 0x483d8b,\n  darkslategray: 0x2f4f4f,\n  darkslategrey: 0x2f4f4f,\n  darkturquoise: 0x00ced1,\n  darkviolet: 0x9400d3,\n  deeppink: 0xff1493,\n  deepskyblue: 0x00bfff,\n  dimgray: 0x696969,\n  dimgrey: 0x696969,\n  dodgerblue: 0x1e90ff,\n  firebrick: 0xb22222,\n  floralwhite: 0xfffaf0,\n  forestgreen: 0x228b22,\n  fuchsia: 0xff00ff,\n  gainsboro: 0xdcdcdc,\n  ghostwhite: 0xf8f8ff,\n  gold: 0xffd700,\n  goldenrod: 0xdaa520,\n  gray: 0x808080,\n  green: 0x008000,\n  greenyellow: 0xadff2f,\n  grey: 0x808080,\n  honeydew: 0xf0fff0,\n  hotpink: 0xff69b4,\n  indianred: 0xcd5c5c,\n  indigo: 0x4b0082,\n  ivory: 0xfffff0,\n  khaki: 0xf0e68c,\n  lavender: 0xe6e6fa,\n  lavenderblush: 0xfff0f5,\n  lawngreen: 0x7cfc00,\n  lemonchiffon: 0xfffacd,\n  lightblue: 0xadd8e6,\n  lightcoral: 0xf08080,\n  lightcyan: 0xe0ffff,\n  lightgoldenrodyellow: 0xfafad2,\n  lightgray: 0xd3d3d3,\n  lightgreen: 0x90ee90,\n  lightgrey: 0xd3d3d3,\n  lightpink: 0xffb6c1,\n  lightsalmon: 0xffa07a,\n  lightseagreen: 0x20b2aa,\n  lightskyblue: 0x87cefa,\n  lightslategray: 0x778899,\n  lightslategrey: 0x778899,\n  lightsteelblue: 0xb0c4de,\n  lightyellow: 0xffffe0,\n  lime: 0x00ff00,\n  limegreen: 0x32cd32,\n  linen: 0xfaf0e6,\n  magenta: 0xff00ff,\n  maroon: 0x800000,\n  mediumaquamarine: 0x66cdaa,\n  mediumblue: 0x0000cd,\n  mediumorchid: 0xba55d3,\n  mediumpurple: 0x9370db,\n  mediumseagreen: 0x3cb371,\n  mediumslateblue: 0x7b68ee,\n  mediumspringgreen: 0x00fa9a,\n  mediumturquoise: 0x48d1cc,\n  mediumvioletred: 0xc71585,\n  midnightblue: 0x191970,\n  mintcream: 0xf5fffa,\n  mistyrose: 0xffe4e1,\n  moccasin: 0xffe4b5,\n  navajowhite: 0xffdead,\n  navy: 0x000080,\n  oldlace: 0xfdf5e6,\n  olive: 0x808000,\n  olivedrab: 0x6b8e23,\n  orange: 0xffa500,\n  orangered: 0xff4500,\n  orchid: 0xda70d6,\n  palegoldenrod: 0xeee8aa,\n  palegreen: 0x98fb98,\n  paleturquoise: 0xafeeee,\n  palevioletred: 0xdb7093,\n  papayawhip: 0xffefd5,\n  peachpuff: 0xffdab9,\n  peru: 0xcd853f,\n  pink: 0xffc0cb,\n  plum: 0xdda0dd,\n  powderblue: 0xb0e0e6,\n  purple: 0x800080,\n  rebeccapurple: 0x663399,\n  red: 0xff0000,\n  rosybrown: 0xbc8f8f,\n  royalblue: 0x4169e1,\n  saddlebrown: 0x8b4513,\n  salmon: 0xfa8072,\n  sandybrown: 0xf4a460,\n  seagreen: 0x2e8b57,\n  seashell: 0xfff5ee,\n  sienna: 0xa0522d,\n  silver: 0xc0c0c0,\n  skyblue: 0x87ceeb,\n  slateblue: 0x6a5acd,\n  slategray: 0x708090,\n  slategrey: 0x708090,\n  snow: 0xfffafa,\n  springgreen: 0x00ff7f,\n  steelblue: 0x4682b4,\n  tan: 0xd2b48c,\n  teal: 0x008080,\n  thistle: 0xd8bfd8,\n  tomato: 0xff6347,\n  turquoise: 0x40e0d0,\n  violet: 0xee82ee,\n  wheat: 0xf5deb3,\n  white: 0xffffff,\n  whitesmoke: 0xf5f5f5,\n  yellow: 0xffff00,\n  yellowgreen: 0x9acd32\n};\n\ndefine(Color, color, {\n  copy(channels) {\n    return Object.assign(new this.constructor, this, channels);\n  },\n  displayable() {\n    return this.rgb().displayable();\n  },\n  hex: color_formatHex, // Deprecated! Use color.formatHex.\n  formatHex: color_formatHex,\n  formatHex8: color_formatHex8,\n  formatHsl: color_formatHsl,\n  formatRgb: color_formatRgb,\n  toString: color_formatRgb\n});\n\nfunction color_formatHex() {\n  return this.rgb().formatHex();\n}\n\nfunction color_formatHex8() {\n  return this.rgb().formatHex8();\n}\n\nfunction color_formatHsl() {\n  return hslConvert(this).formatHsl();\n}\n\nfunction color_formatRgb() {\n  return this.rgb().formatRgb();\n}\n\nexport default function color(format) {\n  var m, l;\n  format = (format + \"\").trim().toLowerCase();\n  return (m = reHex.exec(format)) ? (l = m[1].length, m = parseInt(m[1], 16), l === 6 ? rgbn(m) // #ff0000\n      : l === 3 ? new Rgb((m >> 8 & 0xf) | (m >> 4 & 0xf0), (m >> 4 & 0xf) | (m & 0xf0), ((m & 0xf) << 4) | (m & 0xf), 1) // #f00\n      : l === 8 ? rgba(m >> 24 & 0xff, m >> 16 & 0xff, m >> 8 & 0xff, (m & 0xff) / 0xff) // #ff000000\n      : l === 4 ? rgba((m >> 12 & 0xf) | (m >> 8 & 0xf0), (m >> 8 & 0xf) | (m >> 4 & 0xf0), (m >> 4 & 0xf) | (m & 0xf0), (((m & 0xf) << 4) | (m & 0xf)) / 0xff) // #f000\n      : null) // invalid hex\n      : (m = reRgbInteger.exec(format)) ? new Rgb(m[1], m[2], m[3], 1) // rgb(255, 0, 0)\n      : (m = reRgbPercent.exec(format)) ? new Rgb(m[1] * 255 / 100, m[2] * 255 / 100, m[3] * 255 / 100, 1) // rgb(100%, 0%, 0%)\n      : (m = reRgbaInteger.exec(format)) ? rgba(m[1], m[2], m[3], m[4]) // rgba(255, 0, 0, 1)\n      : (m = reRgbaPercent.exec(format)) ? rgba(m[1] * 255 / 100, m[2] * 255 / 100, m[3] * 255 / 100, m[4]) // rgb(100%, 0%, 0%, 1)\n      : (m = reHslPercent.exec(format)) ? hsla(m[1], m[2] / 100, m[3] / 100, 1) // hsl(120, 50%, 50%)\n      : (m = reHslaPercent.exec(format)) ? hsla(m[1], m[2] / 100, m[3] / 100, m[4]) // hsla(120, 50%, 50%, 1)\n      : named.hasOwnProperty(format) ? rgbn(named[format]) // eslint-disable-line no-prototype-builtins\n      : format === \"transparent\" ? new Rgb(NaN, NaN, NaN, 0)\n      : null;\n}\n\nfunction rgbn(n) {\n  return new Rgb(n >> 16 & 0xff, n >> 8 & 0xff, n & 0xff, 1);\n}\n\nfunction rgba(r, g, b, a) {\n  if (a <= 0) r = g = b = NaN;\n  return new Rgb(r, g, b, a);\n}\n\nexport function rgbConvert(o) {\n  if (!(o instanceof Color)) o = color(o);\n  if (!o) return new Rgb;\n  o = o.rgb();\n  return new Rgb(o.r, o.g, o.b, o.opacity);\n}\n\nexport function rgb(r, g, b, opacity) {\n  return arguments.length === 1 ? rgbConvert(r) : new Rgb(r, g, b, opacity == null ? 1 : opacity);\n}\n\nexport function Rgb(r, g, b, opacity) {\n  this.r = +r;\n  this.g = +g;\n  this.b = +b;\n  this.opacity = +opacity;\n}\n\ndefine(Rgb, rgb, extend(Color, {\n  brighter(k) {\n    k = k == null ? brighter : Math.pow(brighter, k);\n    return new Rgb(this.r * k, this.g * k, this.b * k, this.opacity);\n  },\n  darker(k) {\n    k = k == null ? darker : Math.pow(darker, k);\n    return new Rgb(this.r * k, this.g * k, this.b * k, this.opacity);\n  },\n  rgb() {\n    return this;\n  },\n  clamp() {\n    return new Rgb(clampi(this.r), clampi(this.g), clampi(this.b), clampa(this.opacity));\n  },\n  displayable() {\n    return (-0.5 <= this.r && this.r < 255.5)\n        && (-0.5 <= this.g && this.g < 255.5)\n        && (-0.5 <= this.b && this.b < 255.5)\n        && (0 <= this.opacity && this.opacity <= 1);\n  },\n  hex: rgb_formatHex, // Deprecated! Use color.formatHex.\n  formatHex: rgb_formatHex,\n  formatHex8: rgb_formatHex8,\n  formatRgb: rgb_formatRgb,\n  toString: rgb_formatRgb\n}));\n\nfunction rgb_formatHex() {\n  return `#${hex(this.r)}${hex(this.g)}${hex(this.b)}`;\n}\n\nfunction rgb_formatHex8() {\n  return `#${hex(this.r)}${hex(this.g)}${hex(this.b)}${hex((isNaN(this.opacity) ? 1 : this.opacity) * 255)}`;\n}\n\nfunction rgb_formatRgb() {\n  const a = clampa(this.opacity);\n  return `${a === 1 ? \"rgb(\" : \"rgba(\"}${clampi(this.r)}, ${clampi(this.g)}, ${clampi(this.b)}${a === 1 ? \")\" : `, ${a})`}`;\n}\n\nfunction clampa(opacity) {\n  return isNaN(opacity) ? 1 : Math.max(0, Math.min(1, opacity));\n}\n\nfunction clampi(value) {\n  return Math.max(0, Math.min(255, Math.round(value) || 0));\n}\n\nfunction hex(value) {\n  value = clampi(value);\n  return (value < 16 ? \"0\" : \"\") + value.toString(16);\n}\n\nfunction hsla(h, s, l, a) {\n  if (a <= 0) h = s = l = NaN;\n  else if (l <= 0 || l >= 1) h = s = NaN;\n  else if (s <= 0) h = NaN;\n  return new Hsl(h, s, l, a);\n}\n\nexport function hslConvert(o) {\n  if (o instanceof Hsl) return new Hsl(o.h, o.s, o.l, o.opacity);\n  if (!(o instanceof Color)) o = color(o);\n  if (!o) return new Hsl;\n  if (o instanceof Hsl) return o;\n  o = o.rgb();\n  var r = o.r / 255,\n      g = o.g / 255,\n      b = o.b / 255,\n      min = Math.min(r, g, b),\n      max = Math.max(r, g, b),\n      h = NaN,\n      s = max - min,\n      l = (max + min) / 2;\n  if (s) {\n    if (r === max) h = (g - b) / s + (g < b) * 6;\n    else if (g === max) h = (b - r) / s + 2;\n    else h = (r - g) / s + 4;\n    s /= l < 0.5 ? max + min : 2 - max - min;\n    h *= 60;\n  } else {\n    s = l > 0 && l < 1 ? 0 : h;\n  }\n  return new Hsl(h, s, l, o.opacity);\n}\n\nexport function hsl(h, s, l, opacity) {\n  return arguments.length === 1 ? hslConvert(h) : new Hsl(h, s, l, opacity == null ? 1 : opacity);\n}\n\nfunction Hsl(h, s, l, opacity) {\n  this.h = +h;\n  this.s = +s;\n  this.l = +l;\n  this.opacity = +opacity;\n}\n\ndefine(Hsl, hsl, extend(Color, {\n  brighter(k) {\n    k = k == null ? brighter : Math.pow(brighter, k);\n    return new Hsl(this.h, this.s, this.l * k, this.opacity);\n  },\n  darker(k) {\n    k = k == null ? darker : Math.pow(darker, k);\n    return new Hsl(this.h, this.s, this.l * k, this.opacity);\n  },\n  rgb() {\n    var h = this.h % 360 + (this.h < 0) * 360,\n        s = isNaN(h) || isNaN(this.s) ? 0 : this.s,\n        l = this.l,\n        m2 = l + (l < 0.5 ? l : 1 - l) * s,\n        m1 = 2 * l - m2;\n    return new Rgb(\n      hsl2rgb(h >= 240 ? h - 240 : h + 120, m1, m2),\n      hsl2rgb(h, m1, m2),\n      hsl2rgb(h < 120 ? h + 240 : h - 120, m1, m2),\n      this.opacity\n    );\n  },\n  clamp() {\n    return new Hsl(clamph(this.h), clampt(this.s), clampt(this.l), clampa(this.opacity));\n  },\n  displayable() {\n    return (0 <= this.s && this.s <= 1 || isNaN(this.s))\n        && (0 <= this.l && this.l <= 1)\n        && (0 <= this.opacity && this.opacity <= 1);\n  },\n  formatHsl() {\n    const a = clampa(this.opacity);\n    return `${a === 1 ? \"hsl(\" : \"hsla(\"}${clamph(this.h)}, ${clampt(this.s) * 100}%, ${clampt(this.l) * 100}%${a === 1 ? \")\" : `, ${a})`}`;\n  }\n}));\n\nfunction clamph(value) {\n  value = (value || 0) % 360;\n  return value < 0 ? value + 360 : value;\n}\n\nfunction clampt(value) {\n  return Math.max(0, Math.min(1, value || 0));\n}\n\n/* From FvD 13.37, CSS Color Module Level 3 */\nfunction hsl2rgb(h, m1, m2) {\n  return (h < 60 ? m1 + (m2 - m1) * h / 60\n      : h < 180 ? m2\n      : h < 240 ? m1 + (m2 - m1) * (240 - h) / 60\n      : m1) * 255;\n}\n", "export const radians = Math.PI / 180;\nexport const degrees = 180 / Math.PI;\n", "import define, {extend} from \"./define.js\";\nimport {Color, rgbConvert, Rgb} from \"./color.js\";\nimport {degrees, radians} from \"./math.js\";\n\n// https://observablehq.com/@mbostock/lab-and-rgb\nconst K = 18,\n    Xn = 0.96422,\n    Yn = 1,\n    Zn = 0.82521,\n    t0 = 4 / 29,\n    t1 = 6 / 29,\n    t2 = 3 * t1 * t1,\n    t3 = t1 * t1 * t1;\n\nfunction labConvert(o) {\n  if (o instanceof Lab) return new Lab(o.l, o.a, o.b, o.opacity);\n  if (o instanceof Hcl) return hcl2lab(o);\n  if (!(o instanceof Rgb)) o = rgbConvert(o);\n  var r = rgb2lrgb(o.r),\n      g = rgb2lrgb(o.g),\n      b = rgb2lrgb(o.b),\n      y = xyz2lab((0.2225045 * r + 0.7168786 * g + 0.0606169 * b) / Yn), x, z;\n  if (r === g && g === b) x = z = y; else {\n    x = xyz2lab((0.4360747 * r + 0.3850649 * g + 0.1430804 * b) / Xn);\n    z = xyz2lab((0.0139322 * r + 0.0971045 * g + 0.7141733 * b) / Zn);\n  }\n  return new Lab(116 * y - 16, 500 * (x - y), 200 * (y - z), o.opacity);\n}\n\nexport function gray(l, opacity) {\n  return new Lab(l, 0, 0, opacity == null ? 1 : opacity);\n}\n\nexport default function lab(l, a, b, opacity) {\n  return arguments.length === 1 ? labConvert(l) : new Lab(l, a, b, opacity == null ? 1 : opacity);\n}\n\nexport function Lab(l, a, b, opacity) {\n  this.l = +l;\n  this.a = +a;\n  this.b = +b;\n  this.opacity = +opacity;\n}\n\ndefine(Lab, lab, extend(Color, {\n  brighter(k) {\n    return new Lab(this.l + K * (k == null ? 1 : k), this.a, this.b, this.opacity);\n  },\n  darker(k) {\n    return new Lab(this.l - K * (k == null ? 1 : k), this.a, this.b, this.opacity);\n  },\n  rgb() {\n    var y = (this.l + 16) / 116,\n        x = isNaN(this.a) ? y : y + this.a / 500,\n        z = isNaN(this.b) ? y : y - this.b / 200;\n    x = Xn * lab2xyz(x);\n    y = Yn * lab2xyz(y);\n    z = Zn * lab2xyz(z);\n    return new Rgb(\n      lrgb2rgb( 3.1338561 * x - 1.6168667 * y - 0.4906146 * z),\n      lrgb2rgb(-0.9787684 * x + 1.9161415 * y + 0.0334540 * z),\n      lrgb2rgb( 0.0719453 * x - 0.2289914 * y + 1.4052427 * z),\n      this.opacity\n    );\n  }\n}));\n\nfunction xyz2lab(t) {\n  return t > t3 ? Math.pow(t, 1 / 3) : t / t2 + t0;\n}\n\nfunction lab2xyz(t) {\n  return t > t1 ? t * t * t : t2 * (t - t0);\n}\n\nfunction lrgb2rgb(x) {\n  return 255 * (x <= 0.0031308 ? 12.92 * x : 1.055 * Math.pow(x, 1 / 2.4) - 0.055);\n}\n\nfunction rgb2lrgb(x) {\n  return (x /= 255) <= 0.04045 ? x / 12.92 : Math.pow((x + 0.055) / 1.055, 2.4);\n}\n\nfunction hclConvert(o) {\n  if (o instanceof Hcl) return new Hcl(o.h, o.c, o.l, o.opacity);\n  if (!(o instanceof Lab)) o = labConvert(o);\n  if (o.a === 0 && o.b === 0) return new Hcl(NaN, 0 < o.l && o.l < 100 ? 0 : NaN, o.l, o.opacity);\n  var h = Math.atan2(o.b, o.a) * degrees;\n  return new Hcl(h < 0 ? h + 360 : h, Math.sqrt(o.a * o.a + o.b * o.b), o.l, o.opacity);\n}\n\nexport function lch(l, c, h, opacity) {\n  return arguments.length === 1 ? hclConvert(l) : new Hcl(h, c, l, opacity == null ? 1 : opacity);\n}\n\nexport function hcl(h, c, l, opacity) {\n  return arguments.length === 1 ? hclConvert(h) : new Hcl(h, c, l, opacity == null ? 1 : opacity);\n}\n\nexport function Hcl(h, c, l, opacity) {\n  this.h = +h;\n  this.c = +c;\n  this.l = +l;\n  this.opacity = +opacity;\n}\n\nfunction hcl2lab(o) {\n  if (isNaN(o.h)) return new Lab(o.l, 0, 0, o.opacity);\n  var h = o.h * radians;\n  return new Lab(o.l, Math.cos(h) * o.c, Math.sin(h) * o.c, o.opacity);\n}\n\ndefine(Hcl, hcl, extend(Color, {\n  brighter(k) {\n    return new Hcl(this.h, this.c, this.l + K * (k == null ? 1 : k), this.opacity);\n  },\n  darker(k) {\n    return new Hcl(this.h, this.c, this.l - K * (k == null ? 1 : k), this.opacity);\n  },\n  rgb() {\n    return hcl2lab(this).rgb();\n  }\n}));\n", "import define, {extend} from \"./define.js\";\nimport {Color, rgbConvert, Rgb, darker, brighter} from \"./color.js\";\nimport {degrees, radians} from \"./math.js\";\n\nvar A = -0.14861,\n    B = +1.78277,\n    C = -0.29227,\n    D = -0.90649,\n    E = +1.97294,\n    ED = E * D,\n    EB = E * B,\n    BC_DA = B * C - D * A;\n\nfunction cubehelixConvert(o) {\n  if (o instanceof Cubehelix) return new Cubehelix(o.h, o.s, o.l, o.opacity);\n  if (!(o instanceof Rgb)) o = rgbConvert(o);\n  var r = o.r / 255,\n      g = o.g / 255,\n      b = o.b / 255,\n      l = (BC_DA * b + ED * r - EB * g) / (BC_DA + ED - EB),\n      bl = b - l,\n      k = (E * (g - l) - C * bl) / D,\n      s = Math.sqrt(k * k + bl * bl) / (E * l * (1 - l)), // NaN if l=0 or l=1\n      h = s ? Math.atan2(k, bl) * degrees - 120 : NaN;\n  return new Cubehelix(h < 0 ? h + 360 : h, s, l, o.opacity);\n}\n\nexport default function cubehelix(h, s, l, opacity) {\n  return arguments.length === 1 ? cubehelixConvert(h) : new Cubehelix(h, s, l, opacity == null ? 1 : opacity);\n}\n\nexport function Cubehelix(h, s, l, opacity) {\n  this.h = +h;\n  this.s = +s;\n  this.l = +l;\n  this.opacity = +opacity;\n}\n\ndefine(Cubehelix, cubehelix, extend(Color, {\n  brighter(k) {\n    k = k == null ? brighter : Math.pow(brighter, k);\n    return new Cubehelix(this.h, this.s, this.l * k, this.opacity);\n  },\n  darker(k) {\n    k = k == null ? darker : Math.pow(darker, k);\n    return new Cubehelix(this.h, this.s, this.l * k, this.opacity);\n  },\n  rgb() {\n    var h = isNaN(this.h) ? 0 : (this.h + 120) * radians,\n        l = +this.l,\n        a = isNaN(this.s) ? 0 : this.s * l * (1 - l),\n        cosh = Math.cos(h),\n        sinh = Math.sin(h);\n    return new Rgb(\n      255 * (l + a * (A * cosh + B * sinh)),\n      255 * (l + a * (C * cosh + D * sinh)),\n      255 * (l + a * (E * cosh)),\n      this.opacity\n    );\n  }\n}));\n", "export function basis(t1, v0, v1, v2, v3) {\n  var t2 = t1 * t1, t3 = t2 * t1;\n  return ((1 - 3 * t1 + 3 * t2 - t3) * v0\n      + (4 - 6 * t2 + 3 * t3) * v1\n      + (1 + 3 * t1 + 3 * t2 - 3 * t3) * v2\n      + t3 * v3) / 6;\n}\n\nexport default function(values) {\n  var n = values.length - 1;\n  return function(t) {\n    var i = t <= 0 ? (t = 0) : t >= 1 ? (t = 1, n - 1) : Math.floor(t * n),\n        v1 = values[i],\n        v2 = values[i + 1],\n        v0 = i > 0 ? values[i - 1] : 2 * v1 - v2,\n        v3 = i < n - 1 ? values[i + 2] : 2 * v2 - v1;\n    return basis((t - i / n) * n, v0, v1, v2, v3);\n  };\n}\n", "import {basis} from \"./basis.js\";\n\nexport default function(values) {\n  var n = values.length;\n  return function(t) {\n    var i = Math.floor(((t %= 1) < 0 ? ++t : t) * n),\n        v0 = values[(i + n - 1) % n],\n        v1 = values[i % n],\n        v2 = values[(i + 1) % n],\n        v3 = values[(i + 2) % n];\n    return basis((t - i / n) * n, v0, v1, v2, v3);\n  };\n}\n", "export default x => () => x;\n", "import constant from \"./constant.js\";\n\nfunction linear(a, d) {\n  return function(t) {\n    return a + t * d;\n  };\n}\n\nfunction exponential(a, b, y) {\n  return a = Math.pow(a, y), b = Math.pow(b, y) - a, y = 1 / y, function(t) {\n    return Math.pow(a + t * b, y);\n  };\n}\n\nexport function hue(a, b) {\n  var d = b - a;\n  return d ? linear(a, d > 180 || d < -180 ? d - 360 * Math.round(d / 360) : d) : constant(isNaN(a) ? b : a);\n}\n\nexport function gamma(y) {\n  return (y = +y) === 1 ? nogamma : function(a, b) {\n    return b - a ? exponential(a, b, y) : constant(isNaN(a) ? b : a);\n  };\n}\n\nexport default function nogamma(a, b) {\n  var d = b - a;\n  return d ? linear(a, d) : constant(isNaN(a) ? b : a);\n}\n", "import {rgb as colorRgb} from \"d3-color\";\nimport basis from \"./basis.js\";\nimport basisClosed from \"./basisClosed.js\";\nimport nogamma, {gamma} from \"./color.js\";\n\nexport default (function rgbGamma(y) {\n  var color = gamma(y);\n\n  function rgb(start, end) {\n    var r = color((start = colorRgb(start)).r, (end = colorRgb(end)).r),\n        g = color(start.g, end.g),\n        b = color(start.b, end.b),\n        opacity = nogamma(start.opacity, end.opacity);\n    return function(t) {\n      start.r = r(t);\n      start.g = g(t);\n      start.b = b(t);\n      start.opacity = opacity(t);\n      return start + \"\";\n    };\n  }\n\n  rgb.gamma = rgbGamma;\n\n  return rgb;\n})(1);\n\nfunction rgbSpline(spline) {\n  return function(colors) {\n    var n = colors.length,\n        r = new Array(n),\n        g = new Array(n),\n        b = new Array(n),\n        i, color;\n    for (i = 0; i < n; ++i) {\n      color = colorRgb(colors[i]);\n      r[i] = color.r || 0;\n      g[i] = color.g || 0;\n      b[i] = color.b || 0;\n    }\n    r = spline(r);\n    g = spline(g);\n    b = spline(b);\n    color.opacity = 1;\n    return function(t) {\n      color.r = r(t);\n      color.g = g(t);\n      color.b = b(t);\n      return color + \"\";\n    };\n  };\n}\n\nexport var rgbBasis = rgbSpline(basis);\nexport var rgbBasisClosed = rgbSpline(basisClosed);\n", "export default function(a, b) {\n  if (!b) b = [];\n  var n = a ? Math.min(b.length, a.length) : 0,\n      c = b.slice(),\n      i;\n  return function(t) {\n    for (i = 0; i < n; ++i) c[i] = a[i] * (1 - t) + b[i] * t;\n    return c;\n  };\n}\n\nexport function isNumberArray(x) {\n  return ArrayBuffer.isView(x) && !(x instanceof DataView);\n}\n", "import value from \"./value.js\";\nimport numberArray, {isNumberArray} from \"./numberArray.js\";\n\nexport default function(a, b) {\n  return (isNumberArray(b) ? numberArray : genericArray)(a, b);\n}\n\nexport function genericArray(a, b) {\n  var nb = b ? b.length : 0,\n      na = a ? Math.min(nb, a.length) : 0,\n      x = new Array(na),\n      c = new Array(nb),\n      i;\n\n  for (i = 0; i < na; ++i) x[i] = value(a[i], b[i]);\n  for (; i < nb; ++i) c[i] = b[i];\n\n  return function(t) {\n    for (i = 0; i < na; ++i) c[i] = x[i](t);\n    return c;\n  };\n}\n", "export default function(a, b) {\n  var d = new Date;\n  return a = +a, b = +b, function(t) {\n    return d.setTime(a * (1 - t) + b * t), d;\n  };\n}\n", "export default function(a, b) {\n  return a = +a, b = +b, function(t) {\n    return a * (1 - t) + b * t;\n  };\n}\n", "import value from \"./value.js\";\n\nexport default function(a, b) {\n  var i = {},\n      c = {},\n      k;\n\n  if (a === null || typeof a !== \"object\") a = {};\n  if (b === null || typeof b !== \"object\") b = {};\n\n  for (k in b) {\n    if (k in a) {\n      i[k] = value(a[k], b[k]);\n    } else {\n      c[k] = b[k];\n    }\n  }\n\n  return function(t) {\n    for (k in i) c[k] = i[k](t);\n    return c;\n  };\n}\n", "import number from \"./number.js\";\n\nvar reA = /[-+]?(?:\\d+\\.?\\d*|\\.?\\d+)(?:[eE][-+]?\\d+)?/g,\n    reB = new RegExp(reA.source, \"g\");\n\nfunction zero(b) {\n  return function() {\n    return b;\n  };\n}\n\nfunction one(b) {\n  return function(t) {\n    return b(t) + \"\";\n  };\n}\n\nexport default function(a, b) {\n  var bi = reA.lastIndex = reB.lastIndex = 0, // scan index for next number in b\n      am, // current match in a\n      bm, // current match in b\n      bs, // string preceding current number in b, if any\n      i = -1, // index in s\n      s = [], // string constants and placeholders\n      q = []; // number interpolators\n\n  // Coerce inputs to strings.\n  a = a + \"\", b = b + \"\";\n\n  // Interpolate pairs of numbers in a & b.\n  while ((am = reA.exec(a))\n      && (bm = reB.exec(b))) {\n    if ((bs = bm.index) > bi) { // a string precedes the next number in b\n      bs = b.slice(bi, bs);\n      if (s[i]) s[i] += bs; // coalesce with previous string\n      else s[++i] = bs;\n    }\n    if ((am = am[0]) === (bm = bm[0])) { // numbers in a & b match\n      if (s[i]) s[i] += bm; // coalesce with previous string\n      else s[++i] = bm;\n    } else { // interpolate non-matching numbers\n      s[++i] = null;\n      q.push({i: i, x: number(am, bm)});\n    }\n    bi = reB.lastIndex;\n  }\n\n  // Add remains of b.\n  if (bi < b.length) {\n    bs = b.slice(bi);\n    if (s[i]) s[i] += bs; // coalesce with previous string\n    else s[++i] = bs;\n  }\n\n  // Special optimization for only a single match.\n  // Otherwise, interpolate each of the numbers and rejoin the string.\n  return s.length < 2 ? (q[0]\n      ? one(q[0].x)\n      : zero(b))\n      : (b = q.length, function(t) {\n          for (var i = 0, o; i < b; ++i) s[(o = q[i]).i] = o.x(t);\n          return s.join(\"\");\n        });\n}\n", "import {color} from \"d3-color\";\nimport rgb from \"./rgb.js\";\nimport {genericArray} from \"./array.js\";\nimport date from \"./date.js\";\nimport number from \"./number.js\";\nimport object from \"./object.js\";\nimport string from \"./string.js\";\nimport constant from \"./constant.js\";\nimport numberArray, {isNumberArray} from \"./numberArray.js\";\n\nexport default function(a, b) {\n  var t = typeof b, c;\n  return b == null || t === \"boolean\" ? constant(b)\n      : (t === \"number\" ? number\n      : t === \"string\" ? ((c = color(b)) ? (b = c, rgb) : string)\n      : b instanceof color ? rgb\n      : b instanceof Date ? date\n      : isNumberArray(b) ? numberArray\n      : Array.isArray(b) ? genericArray\n      : typeof b.valueOf !== \"function\" && typeof b.toString !== \"function\" || isNaN(b) ? object\n      : number)(a, b);\n}\n", "export default function(a, b) {\n  return a = +a, b = +b, function(t) {\n    return Math.round(a * (1 - t) + b * t);\n  };\n}\n", "var degrees = 180 / Math.PI;\n\nexport var identity = {\n  translateX: 0,\n  translateY: 0,\n  rotate: 0,\n  skewX: 0,\n  scaleX: 1,\n  scaleY: 1\n};\n\nexport default function(a, b, c, d, e, f) {\n  var scaleX, scaleY, skewX;\n  if (scaleX = Math.sqrt(a * a + b * b)) a /= scaleX, b /= scaleX;\n  if (skewX = a * c + b * d) c -= a * skewX, d -= b * skewX;\n  if (scaleY = Math.sqrt(c * c + d * d)) c /= scaleY, d /= scaleY, skewX /= scaleY;\n  if (a * d < b * c) a = -a, b = -b, skewX = -skewX, scaleX = -scaleX;\n  return {\n    translateX: e,\n    translateY: f,\n    rotate: Math.atan2(b, a) * degrees,\n    skewX: Math.atan(skewX) * degrees,\n    scaleX: scaleX,\n    scaleY: scaleY\n  };\n}\n", "import decompose, {identity} from \"./decompose.js\";\n\nvar svgNode;\n\n/* eslint-disable no-undef */\nexport function parseCss(value) {\n  const m = new (typeof DOMMatrix === \"function\" ? DOMMatrix : WebKitCSSMatrix)(value + \"\");\n  return m.isIdentity ? identity : decompose(m.a, m.b, m.c, m.d, m.e, m.f);\n}\n\nexport function parseSvg(value) {\n  if (value == null) return identity;\n  if (!svgNode) svgNode = document.createElementNS(\"http://www.w3.org/2000/svg\", \"g\");\n  svgNode.setAttribute(\"transform\", value);\n  if (!(value = svgNode.transform.baseVal.consolidate())) return identity;\n  value = value.matrix;\n  return decompose(value.a, value.b, value.c, value.d, value.e, value.f);\n}\n", "import number from \"../number.js\";\nimport {parseCss, parseSvg} from \"./parse.js\";\n\nfunction interpolateTransform(parse, pxComma, pxParen, degParen) {\n\n  function pop(s) {\n    return s.length ? s.pop() + \" \" : \"\";\n  }\n\n  function translate(xa, ya, xb, yb, s, q) {\n    if (xa !== xb || ya !== yb) {\n      var i = s.push(\"translate(\", null, pxComma, null, pxParen);\n      q.push({i: i - 4, x: number(xa, xb)}, {i: i - 2, x: number(ya, yb)});\n    } else if (xb || yb) {\n      s.push(\"translate(\" + xb + pxComma + yb + pxParen);\n    }\n  }\n\n  function rotate(a, b, s, q) {\n    if (a !== b) {\n      if (a - b > 180) b += 360; else if (b - a > 180) a += 360; // shortest path\n      q.push({i: s.push(pop(s) + \"rotate(\", null, degParen) - 2, x: number(a, b)});\n    } else if (b) {\n      s.push(pop(s) + \"rotate(\" + b + degParen);\n    }\n  }\n\n  function skewX(a, b, s, q) {\n    if (a !== b) {\n      q.push({i: s.push(pop(s) + \"skewX(\", null, degParen) - 2, x: number(a, b)});\n    } else if (b) {\n      s.push(pop(s) + \"skewX(\" + b + degParen);\n    }\n  }\n\n  function scale(xa, ya, xb, yb, s, q) {\n    if (xa !== xb || ya !== yb) {\n      var i = s.push(pop(s) + \"scale(\", null, \",\", null, \")\");\n      q.push({i: i - 4, x: number(xa, xb)}, {i: i - 2, x: number(ya, yb)});\n    } else if (xb !== 1 || yb !== 1) {\n      s.push(pop(s) + \"scale(\" + xb + \",\" + yb + \")\");\n    }\n  }\n\n  return function(a, b) {\n    var s = [], // string constants and placeholders\n        q = []; // number interpolators\n    a = parse(a), b = parse(b);\n    translate(a.translateX, a.translateY, b.translateX, b.translateY, s, q);\n    rotate(a.rotate, b.rotate, s, q);\n    skewX(a.skewX, b.skewX, s, q);\n    scale(a.scaleX, a.scaleY, b.scaleX, b.scaleY, s, q);\n    a = b = null; // gc\n    return function(t) {\n      var i = -1, n = q.length, o;\n      while (++i < n) s[(o = q[i]).i] = o.x(t);\n      return s.join(\"\");\n    };\n  };\n}\n\nexport var interpolateTransformCss = interpolateTransform(parseCss, \"px, \", \"px)\", \"deg)\");\nexport var interpolateTransformSvg = interpolateTransform(parseSvg, \", \", \")\", \")\");\n", "import {hsl as colorHsl} from \"d3-color\";\nimport color, {hue} from \"./color.js\";\n\nfunction hsl(hue) {\n  return function(start, end) {\n    var h = hue((start = colorHsl(start)).h, (end = colorHsl(end)).h),\n        s = color(start.s, end.s),\n        l = color(start.l, end.l),\n        opacity = color(start.opacity, end.opacity);\n    return function(t) {\n      start.h = h(t);\n      start.s = s(t);\n      start.l = l(t);\n      start.opacity = opacity(t);\n      return start + \"\";\n    };\n  }\n}\n\nexport default hsl(hue);\nexport var hslLong = hsl(color);\n", "import {lab as colorLab} from \"d3-color\";\nimport color from \"./color.js\";\n\nexport default function lab(start, end) {\n  var l = color((start = colorLab(start)).l, (end = colorLab(end)).l),\n      a = color(start.a, end.a),\n      b = color(start.b, end.b),\n      opacity = color(start.opacity, end.opacity);\n  return function(t) {\n    start.l = l(t);\n    start.a = a(t);\n    start.b = b(t);\n    start.opacity = opacity(t);\n    return start + \"\";\n  };\n}\n", "import {hcl as colorHcl} from \"d3-color\";\nimport color, {hue} from \"./color.js\";\n\nfunction hcl(hue) {\n  return function(start, end) {\n    var h = hue((start = colorHcl(start)).h, (end = colorHcl(end)).h),\n        c = color(start.c, end.c),\n        l = color(start.l, end.l),\n        opacity = color(start.opacity, end.opacity);\n    return function(t) {\n      start.h = h(t);\n      start.c = c(t);\n      start.l = l(t);\n      start.opacity = opacity(t);\n      return start + \"\";\n    };\n  }\n}\n\nexport default hcl(hue);\nexport var hclLong = hcl(color);\n", "import {cubehelix as colorCubehelix} from \"d3-color\";\nimport color, {hue} from \"./color.js\";\n\nfunction cubehelix(hue) {\n  return (function cubehelixGamma(y) {\n    y = +y;\n\n    function cubehelix(start, end) {\n      var h = hue((start = colorCubehelix(start)).h, (end = colorCubehelix(end)).h),\n          s = color(start.s, end.s),\n          l = color(start.l, end.l),\n          opacity = color(start.opacity, end.opacity);\n      return function(t) {\n        start.h = h(t);\n        start.s = s(t);\n        start.l = l(Math.pow(t, y));\n        start.opacity = opacity(t);\n        return start + \"\";\n      };\n    }\n\n    cubehelix.gamma = cubehelixGamma;\n\n    return cubehelix;\n  })(1);\n}\n\nexport default cubehelix(hue);\nexport var cubehelixLong = cubehelix(color);\n", "import {default as value} from \"./value.js\";\n\nexport default function piecewise(interpolate, values) {\n  if (values === undefined) values = interpolate, interpolate = value;\n  var i = 0, n = values.length - 1, v = values[0], I = new Array(n < 0 ? 0 : n);\n  while (i < n) I[i] = interpolate(v, v = values[++i]);\n  return function(t) {\n    var i = Math.max(0, Math.min(n - 1, Math.floor(t *= n)));\n    return I[i](t - i);\n  };\n}\n", "export default function(interpolator, n) {\n  var samples = new Array(n);\n  for (var i = 0; i < n; ++i) samples[i] = interpolator(i / (n - 1));\n  return samples;\n}\n", "var frame = 0, // is an animation frame pending?\n    timeout = 0, // is a timeout pending?\n    interval = 0, // are any timers active?\n    pokeDelay = 1000, // how frequently we check for clock skew\n    taskHead,\n    taskTail,\n    clockLast = 0,\n    clockNow = 0,\n    clockSkew = 0,\n    clock = typeof performance === \"object\" && performance.now ? performance : Date,\n    setFrame = typeof window === \"object\" && window.requestAnimationFrame ? window.requestAnimationFrame.bind(window) : function(f) { setTimeout(f, 17); };\n\nexport function now() {\n  return clockNow || (setFrame(clearNow), clockNow = clock.now() + clockSkew);\n}\n\nfunction clearNow() {\n  clockNow = 0;\n}\n\nexport function Timer() {\n  this._call =\n  this._time =\n  this._next = null;\n}\n\nTimer.prototype = timer.prototype = {\n  constructor: Timer,\n  restart: function(callback, delay, time) {\n    if (typeof callback !== \"function\") throw new TypeError(\"callback is not a function\");\n    time = (time == null ? now() : +time) + (delay == null ? 0 : +delay);\n    if (!this._next && taskTail !== this) {\n      if (taskTail) taskTail._next = this;\n      else taskHead = this;\n      taskTail = this;\n    }\n    this._call = callback;\n    this._time = time;\n    sleep();\n  },\n  stop: function() {\n    if (this._call) {\n      this._call = null;\n      this._time = Infinity;\n      sleep();\n    }\n  }\n};\n\nexport function timer(callback, delay, time) {\n  var t = new Timer;\n  t.restart(callback, delay, time);\n  return t;\n}\n\nexport function timerFlush() {\n  now(); // Get the current time, if not already set.\n  ++frame; // Pretend we\u2019ve set an alarm, if we haven\u2019t already.\n  var t = taskHead, e;\n  while (t) {\n    if ((e = clockNow - t._time) >= 0) t._call.call(undefined, e);\n    t = t._next;\n  }\n  --frame;\n}\n\nfunction wake() {\n  clockNow = (clockLast = clock.now()) + clockSkew;\n  frame = timeout = 0;\n  try {\n    timerFlush();\n  } finally {\n    frame = 0;\n    nap();\n    clockNow = 0;\n  }\n}\n\nfunction poke() {\n  var now = clock.now(), delay = now - clockLast;\n  if (delay > pokeDelay) clockSkew -= delay, clockLast = now;\n}\n\nfunction nap() {\n  var t0, t1 = taskHead, t2, time = Infinity;\n  while (t1) {\n    if (t1._call) {\n      if (time > t1._time) time = t1._time;\n      t0 = t1, t1 = t1._next;\n    } else {\n      t2 = t1._next, t1._next = null;\n      t1 = t0 ? t0._next = t2 : taskHead = t2;\n    }\n  }\n  taskTail = t0;\n  sleep(time);\n}\n\nfunction sleep(time) {\n  if (frame) return; // Soonest alarm already set, or will be.\n  if (timeout) timeout = clearTimeout(timeout);\n  var delay = time - clockNow; // Strictly less than if we recomputed clockNow.\n  if (delay > 24) {\n    if (time < Infinity) timeout = setTimeout(wake, time - clock.now() - clockSkew);\n    if (interval) interval = clearInterval(interval);\n  } else {\n    if (!interval) clockLast = clock.now(), interval = setInterval(poke, pokeDelay);\n    frame = 1, setFrame(wake);\n  }\n}\n", "import {Timer} from \"./timer.js\";\n\nexport default function(callback, delay, time) {\n  var t = new Timer;\n  delay = delay == null ? 0 : +delay;\n  t.restart(elapsed => {\n    t.stop();\n    callback(elapsed + delay);\n  }, delay, time);\n  return t;\n}\n", "import {dispatch} from \"d3-dispatch\";\nimport {timer, timeout} from \"d3-timer\";\n\nvar emptyOn = dispatch(\"start\", \"end\", \"cancel\", \"interrupt\");\nvar emptyTween = [];\n\nexport var CREATED = 0;\nexport var SCHEDULED = 1;\nexport var STARTING = 2;\nexport var STARTED = 3;\nexport var RUNNING = 4;\nexport var ENDING = 5;\nexport var ENDED = 6;\n\nexport default function(node, name, id, index, group, timing) {\n  var schedules = node.__transition;\n  if (!schedules) node.__transition = {};\n  else if (id in schedules) return;\n  create(node, id, {\n    name: name,\n    index: index, // For context during callback.\n    group: group, // For context during callback.\n    on: emptyOn,\n    tween: emptyTween,\n    time: timing.time,\n    delay: timing.delay,\n    duration: timing.duration,\n    ease: timing.ease,\n    timer: null,\n    state: CREATED\n  });\n}\n\nexport function init(node, id) {\n  var schedule = get(node, id);\n  if (schedule.state > CREATED) throw new Error(\"too late; already scheduled\");\n  return schedule;\n}\n\nexport function set(node, id) {\n  var schedule = get(node, id);\n  if (schedule.state > STARTED) throw new Error(\"too late; already running\");\n  return schedule;\n}\n\nexport function get(node, id) {\n  var schedule = node.__transition;\n  if (!schedule || !(schedule = schedule[id])) throw new Error(\"transition not found\");\n  return schedule;\n}\n\nfunction create(node, id, self) {\n  var schedules = node.__transition,\n      tween;\n\n  // Initialize the self timer when the transition is created.\n  // Note the actual delay is not known until the first callback!\n  schedules[id] = self;\n  self.timer = timer(schedule, 0, self.time);\n\n  function schedule(elapsed) {\n    self.state = SCHEDULED;\n    self.timer.restart(start, self.delay, self.time);\n\n    // If the elapsed delay is less than our first sleep, start immediately.\n    if (self.delay <= elapsed) start(elapsed - self.delay);\n  }\n\n  function start(elapsed) {\n    var i, j, n, o;\n\n    // If the state is not SCHEDULED, then we previously errored on start.\n    if (self.state !== SCHEDULED) return stop();\n\n    for (i in schedules) {\n      o = schedules[i];\n      if (o.name !== self.name) continue;\n\n      // While this element already has a starting transition during this frame,\n      // defer starting an interrupting transition until that transition has a\n      // chance to tick (and possibly end); see d3/d3-transition#54!\n      if (o.state === STARTED) return timeout(start);\n\n      // Interrupt the active transition, if any.\n      if (o.state === RUNNING) {\n        o.state = ENDED;\n        o.timer.stop();\n        o.on.call(\"interrupt\", node, node.__data__, o.index, o.group);\n        delete schedules[i];\n      }\n\n      // Cancel any pre-empted transitions.\n      else if (+i < id) {\n        o.state = ENDED;\n        o.timer.stop();\n        o.on.call(\"cancel\", node, node.__data__, o.index, o.group);\n        delete schedules[i];\n      }\n    }\n\n    // Defer the first tick to end of the current frame; see d3/d3#1576.\n    // Note the transition may be canceled after start and before the first tick!\n    // Note this must be scheduled before the start event; see d3/d3-transition#16!\n    // Assuming this is successful, subsequent callbacks go straight to tick.\n    timeout(function() {\n      if (self.state === STARTED) {\n        self.state = RUNNING;\n        self.timer.restart(tick, self.delay, self.time);\n        tick(elapsed);\n      }\n    });\n\n    // Dispatch the start event.\n    // Note this must be done before the tween are initialized.\n    self.state = STARTING;\n    self.on.call(\"start\", node, node.__data__, self.index, self.group);\n    if (self.state !== STARTING) return; // interrupted\n    self.state = STARTED;\n\n    // Initialize the tween, deleting null tween.\n    tween = new Array(n = self.tween.length);\n    for (i = 0, j = -1; i < n; ++i) {\n      if (o = self.tween[i].value.call(node, node.__data__, self.index, self.group)) {\n        tween[++j] = o;\n      }\n    }\n    tween.length = j + 1;\n  }\n\n  function tick(elapsed) {\n    var t = elapsed < self.duration ? self.ease.call(null, elapsed / self.duration) : (self.timer.restart(stop), self.state = ENDING, 1),\n        i = -1,\n        n = tween.length;\n\n    while (++i < n) {\n      tween[i].call(node, t);\n    }\n\n    // Dispatch the end event.\n    if (self.state === ENDING) {\n      self.on.call(\"end\", node, node.__data__, self.index, self.group);\n      stop();\n    }\n  }\n\n  function stop() {\n    self.state = ENDED;\n    self.timer.stop();\n    delete schedules[id];\n    for (var i in schedules) return; // eslint-disable-line no-unused-vars\n    delete node.__transition;\n  }\n}\n", "import {STARTING, ENDING, ENDED} from \"./transition/schedule.js\";\n\nexport default function(node, name) {\n  var schedules = node.__transition,\n      schedule,\n      active,\n      empty = true,\n      i;\n\n  if (!schedules) return;\n\n  name = name == null ? null : name + \"\";\n\n  for (i in schedules) {\n    if ((schedule = schedules[i]).name !== name) { empty = false; continue; }\n    active = schedule.state > STARTING && schedule.state < ENDING;\n    schedule.state = ENDED;\n    schedule.timer.stop();\n    schedule.on.call(active ? \"interrupt\" : \"cancel\", node, node.__data__, schedule.index, schedule.group);\n    delete schedules[i];\n  }\n\n  if (empty) delete node.__transition;\n}\n", "import interrupt from \"../interrupt.js\";\n\nexport default function(name) {\n  return this.each(function() {\n    interrupt(this, name);\n  });\n}\n", "import {get, set} from \"./schedule.js\";\n\nfunction tweenRemove(id, name) {\n  var tween0, tween1;\n  return function() {\n    var schedule = set(this, id),\n        tween = schedule.tween;\n\n    // If this node shared tween with the previous node,\n    // just assign the updated shared tween and we\u2019re done!\n    // Otherwise, copy-on-write.\n    if (tween !== tween0) {\n      tween1 = tween0 = tween;\n      for (var i = 0, n = tween1.length; i < n; ++i) {\n        if (tween1[i].name === name) {\n          tween1 = tween1.slice();\n          tween1.splice(i, 1);\n          break;\n        }\n      }\n    }\n\n    schedule.tween = tween1;\n  };\n}\n\nfunction tweenFunction(id, name, value) {\n  var tween0, tween1;\n  if (typeof value !== \"function\") throw new Error;\n  return function() {\n    var schedule = set(this, id),\n        tween = schedule.tween;\n\n    // If this node shared tween with the previous node,\n    // just assign the updated shared tween and we\u2019re done!\n    // Otherwise, copy-on-write.\n    if (tween !== tween0) {\n      tween1 = (tween0 = tween).slice();\n      for (var t = {name: name, value: value}, i = 0, n = tween1.length; i < n; ++i) {\n        if (tween1[i].name === name) {\n          tween1[i] = t;\n          break;\n        }\n      }\n      if (i === n) tween1.push(t);\n    }\n\n    schedule.tween = tween1;\n  };\n}\n\nexport default function(name, value) {\n  var id = this._id;\n\n  name += \"\";\n\n  if (arguments.length < 2) {\n    var tween = get(this.node(), id).tween;\n    for (var i = 0, n = tween.length, t; i < n; ++i) {\n      if ((t = tween[i]).name === name) {\n        return t.value;\n      }\n    }\n    return null;\n  }\n\n  return this.each((value == null ? tweenRemove : tweenFunction)(id, name, value));\n}\n\nexport function tweenValue(transition, name, value) {\n  var id = transition._id;\n\n  transition.each(function() {\n    var schedule = set(this, id);\n    (schedule.value || (schedule.value = {}))[name] = value.apply(this, arguments);\n  });\n\n  return function(node) {\n    return get(node, id).value[name];\n  };\n}\n", "import {color} from \"d3-color\";\nimport {interpolateNumber, interpolateRgb, interpolateString} from \"d3-interpolate\";\n\nexport default function(a, b) {\n  var c;\n  return (typeof b === \"number\" ? interpolateNumber\n      : b instanceof color ? interpolateRgb\n      : (c = color(b)) ? (b = c, interpolateRgb)\n      : interpolateString)(a, b);\n}\n", "import {interpolateTransformSvg as interpolateTransform} from \"d3-interpolate\";\nimport {namespace} from \"d3-selection\";\nimport {tweenValue} from \"./tween.js\";\nimport interpolate from \"./interpolate.js\";\n\nfunction attrRemove(name) {\n  return function() {\n    this.removeAttribute(name);\n  };\n}\n\nfunction attrRemoveNS(fullname) {\n  return function() {\n    this.removeAttributeNS(fullname.space, fullname.local);\n  };\n}\n\nfunction attrConstant(name, interpolate, value1) {\n  var string00,\n      string1 = value1 + \"\",\n      interpolate0;\n  return function() {\n    var string0 = this.getAttribute(name);\n    return string0 === string1 ? null\n        : string0 === string00 ? interpolate0\n        : interpolate0 = interpolate(string00 = string0, value1);\n  };\n}\n\nfunction attrConstantNS(fullname, interpolate, value1) {\n  var string00,\n      string1 = value1 + \"\",\n      interpolate0;\n  return function() {\n    var string0 = this.getAttributeNS(fullname.space, fullname.local);\n    return string0 === string1 ? null\n        : string0 === string00 ? interpolate0\n        : interpolate0 = interpolate(string00 = string0, value1);\n  };\n}\n\nfunction attrFunction(name, interpolate, value) {\n  var string00,\n      string10,\n      interpolate0;\n  return function() {\n    var string0, value1 = value(this), string1;\n    if (value1 == null) return void this.removeAttribute(name);\n    string0 = this.getAttribute(name);\n    string1 = value1 + \"\";\n    return string0 === string1 ? null\n        : string0 === string00 && string1 === string10 ? interpolate0\n        : (string10 = string1, interpolate0 = interpolate(string00 = string0, value1));\n  };\n}\n\nfunction attrFunctionNS(fullname, interpolate, value) {\n  var string00,\n      string10,\n      interpolate0;\n  return function() {\n    var string0, value1 = value(this), string1;\n    if (value1 == null) return void this.removeAttributeNS(fullname.space, fullname.local);\n    string0 = this.getAttributeNS(fullname.space, fullname.local);\n    string1 = value1 + \"\";\n    return string0 === string1 ? null\n        : string0 === string00 && string1 === string10 ? interpolate0\n        : (string10 = string1, interpolate0 = interpolate(string00 = string0, value1));\n  };\n}\n\nexport default function(name, value) {\n  var fullname = namespace(name), i = fullname === \"transform\" ? interpolateTransform : interpolate;\n  return this.attrTween(name, typeof value === \"function\"\n      ? (fullname.local ? attrFunctionNS : attrFunction)(fullname, i, tweenValue(this, \"attr.\" + name, value))\n      : value == null ? (fullname.local ? attrRemoveNS : attrRemove)(fullname)\n      : (fullname.local ? attrConstantNS : attrConstant)(fullname, i, value));\n}\n", "import {namespace} from \"d3-selection\";\n\nfunction attrInterpolate(name, i) {\n  return function(t) {\n    this.setAttribute(name, i.call(this, t));\n  };\n}\n\nfunction attrInterpolateNS(fullname, i) {\n  return function(t) {\n    this.setAttributeNS(fullname.space, fullname.local, i.call(this, t));\n  };\n}\n\nfunction attrTweenNS(fullname, value) {\n  var t0, i0;\n  function tween() {\n    var i = value.apply(this, arguments);\n    if (i !== i0) t0 = (i0 = i) && attrInterpolateNS(fullname, i);\n    return t0;\n  }\n  tween._value = value;\n  return tween;\n}\n\nfunction attrTween(name, value) {\n  var t0, i0;\n  function tween() {\n    var i = value.apply(this, arguments);\n    if (i !== i0) t0 = (i0 = i) && attrInterpolate(name, i);\n    return t0;\n  }\n  tween._value = value;\n  return tween;\n}\n\nexport default function(name, value) {\n  var key = \"attr.\" + name;\n  if (arguments.length < 2) return (key = this.tween(key)) && key._value;\n  if (value == null) return this.tween(key, null);\n  if (typeof value !== \"function\") throw new Error;\n  var fullname = namespace(name);\n  return this.tween(key, (fullname.local ? attrTweenNS : attrTween)(fullname, value));\n}\n", "import {get, init} from \"./schedule.js\";\n\nfunction delayFunction(id, value) {\n  return function() {\n    init(this, id).delay = +value.apply(this, arguments);\n  };\n}\n\nfunction delayConstant(id, value) {\n  return value = +value, function() {\n    init(this, id).delay = value;\n  };\n}\n\nexport default function(value) {\n  var id = this._id;\n\n  return arguments.length\n      ? this.each((typeof value === \"function\"\n          ? delayFunction\n          : delayConstant)(id, value))\n      : get(this.node(), id).delay;\n}\n", "import {get, set} from \"./schedule.js\";\n\nfunction durationFunction(id, value) {\n  return function() {\n    set(this, id).duration = +value.apply(this, arguments);\n  };\n}\n\nfunction durationConstant(id, value) {\n  return value = +value, function() {\n    set(this, id).duration = value;\n  };\n}\n\nexport default function(value) {\n  var id = this._id;\n\n  return arguments.length\n      ? this.each((typeof value === \"function\"\n          ? durationFunction\n          : durationConstant)(id, value))\n      : get(this.node(), id).duration;\n}\n", "import {get, set} from \"./schedule.js\";\n\nfunction easeConstant(id, value) {\n  if (typeof value !== \"function\") throw new Error;\n  return function() {\n    set(this, id).ease = value;\n  };\n}\n\nexport default function(value) {\n  var id = this._id;\n\n  return arguments.length\n      ? this.each(easeConstant(id, value))\n      : get(this.node(), id).ease;\n}\n", "import {set} from \"./schedule.js\";\n\nfunction easeVarying(id, value) {\n  return function() {\n    var v = value.apply(this, arguments);\n    if (typeof v !== \"function\") throw new Error;\n    set(this, id).ease = v;\n  };\n}\n\nexport default function(value) {\n  if (typeof value !== \"function\") throw new Error;\n  return this.each(easeVarying(this._id, value));\n}\n", "import {matcher} from \"d3-selection\";\nimport {Transition} from \"./index.js\";\n\nexport default function(match) {\n  if (typeof match !== \"function\") match = matcher(match);\n\n  for (var groups = this._groups, m = groups.length, subgroups = new Array(m), j = 0; j < m; ++j) {\n    for (var group = groups[j], n = group.length, subgroup = subgroups[j] = [], node, i = 0; i < n; ++i) {\n      if ((node = group[i]) && match.call(node, node.__data__, i, group)) {\n        subgroup.push(node);\n      }\n    }\n  }\n\n  return new Transition(subgroups, this._parents, this._name, this._id);\n}\n", "import {Transition} from \"./index.js\";\n\nexport default function(transition) {\n  if (transition._id !== this._id) throw new Error;\n\n  for (var groups0 = this._groups, groups1 = transition._groups, m0 = groups0.length, m1 = groups1.length, m = Math.min(m0, m1), merges = new Array(m0), j = 0; j < m; ++j) {\n    for (var group0 = groups0[j], group1 = groups1[j], n = group0.length, merge = merges[j] = new Array(n), node, i = 0; i < n; ++i) {\n      if (node = group0[i] || group1[i]) {\n        merge[i] = node;\n      }\n    }\n  }\n\n  for (; j < m0; ++j) {\n    merges[j] = groups0[j];\n  }\n\n  return new Transition(merges, this._parents, this._name, this._id);\n}\n", "import {get, set, init} from \"./schedule.js\";\n\nfunction start(name) {\n  return (name + \"\").trim().split(/^|\\s+/).every(function(t) {\n    var i = t.indexOf(\".\");\n    if (i >= 0) t = t.slice(0, i);\n    return !t || t === \"start\";\n  });\n}\n\nfunction onFunction(id, name, listener) {\n  var on0, on1, sit = start(name) ? init : set;\n  return function() {\n    var schedule = sit(this, id),\n        on = schedule.on;\n\n    // If this node shared a dispatch with the previous node,\n    // just assign the updated shared dispatch and we\u2019re done!\n    // Otherwise, copy-on-write.\n    if (on !== on0) (on1 = (on0 = on).copy()).on(name, listener);\n\n    schedule.on = on1;\n  };\n}\n\nexport default function(name, listener) {\n  var id = this._id;\n\n  return arguments.length < 2\n      ? get(this.node(), id).on.on(name)\n      : this.each(onFunction(id, name, listener));\n}\n", "function removeFunction(id) {\n  return function() {\n    var parent = this.parentNode;\n    for (var i in this.__transition) if (+i !== id) return;\n    if (parent) parent.removeChild(this);\n  };\n}\n\nexport default function() {\n  return this.on(\"end.remove\", removeFunction(this._id));\n}\n", "import {selector} from \"d3-selection\";\nimport {Transition} from \"./index.js\";\nimport schedule, {get} from \"./schedule.js\";\n\nexport default function(select) {\n  var name = this._name,\n      id = this._id;\n\n  if (typeof select !== \"function\") select = selector(select);\n\n  for (var groups = this._groups, m = groups.length, subgroups = new Array(m), j = 0; j < m; ++j) {\n    for (var group = groups[j], n = group.length, subgroup = subgroups[j] = new Array(n), node, subnode, i = 0; i < n; ++i) {\n      if ((node = group[i]) && (subnode = select.call(node, node.__data__, i, group))) {\n        if (\"__data__\" in node) subnode.__data__ = node.__data__;\n        subgroup[i] = subnode;\n        schedule(subgroup[i], name, id, i, subgroup, get(node, id));\n      }\n    }\n  }\n\n  return new Transition(subgroups, this._parents, name, id);\n}\n", "import {selectorAll} from \"d3-selection\";\nimport {Transition} from \"./index.js\";\nimport schedule, {get} from \"./schedule.js\";\n\nexport default function(select) {\n  var name = this._name,\n      id = this._id;\n\n  if (typeof select !== \"function\") select = selectorAll(select);\n\n  for (var groups = this._groups, m = groups.length, subgroups = [], parents = [], j = 0; j < m; ++j) {\n    for (var group = groups[j], n = group.length, node, i = 0; i < n; ++i) {\n      if (node = group[i]) {\n        for (var children = select.call(node, node.__data__, i, group), child, inherit = get(node, id), k = 0, l = children.length; k < l; ++k) {\n          if (child = children[k]) {\n            schedule(child, name, id, k, children, inherit);\n          }\n        }\n        subgroups.push(children);\n        parents.push(node);\n      }\n    }\n  }\n\n  return new Transition(subgroups, parents, name, id);\n}\n", "import {selection} from \"d3-selection\";\n\nvar Selection = selection.prototype.constructor;\n\nexport default function() {\n  return new Selection(this._groups, this._parents);\n}\n", "import {interpolateTransformCss as interpolateTransform} from \"d3-interpolate\";\nimport {style} from \"d3-selection\";\nimport {set} from \"./schedule.js\";\nimport {tweenValue} from \"./tween.js\";\nimport interpolate from \"./interpolate.js\";\n\nfunction styleNull(name, interpolate) {\n  var string00,\n      string10,\n      interpolate0;\n  return function() {\n    var string0 = style(this, name),\n        string1 = (this.style.removeProperty(name), style(this, name));\n    return string0 === string1 ? null\n        : string0 === string00 && string1 === string10 ? interpolate0\n        : interpolate0 = interpolate(string00 = string0, string10 = string1);\n  };\n}\n\nfunction styleRemove(name) {\n  return function() {\n    this.style.removeProperty(name);\n  };\n}\n\nfunction styleConstant(name, interpolate, value1) {\n  var string00,\n      string1 = value1 + \"\",\n      interpolate0;\n  return function() {\n    var string0 = style(this, name);\n    return string0 === string1 ? null\n        : string0 === string00 ? interpolate0\n        : interpolate0 = interpolate(string00 = string0, value1);\n  };\n}\n\nfunction styleFunction(name, interpolate, value) {\n  var string00,\n      string10,\n      interpolate0;\n  return function() {\n    var string0 = style(this, name),\n        value1 = value(this),\n        string1 = value1 + \"\";\n    if (value1 == null) string1 = value1 = (this.style.removeProperty(name), style(this, name));\n    return string0 === string1 ? null\n        : string0 === string00 && string1 === string10 ? interpolate0\n        : (string10 = string1, interpolate0 = interpolate(string00 = string0, value1));\n  };\n}\n\nfunction styleMaybeRemove(id, name) {\n  var on0, on1, listener0, key = \"style.\" + name, event = \"end.\" + key, remove;\n  return function() {\n    var schedule = set(this, id),\n        on = schedule.on,\n        listener = schedule.value[key] == null ? remove || (remove = styleRemove(name)) : undefined;\n\n    // If this node shared a dispatch with the previous node,\n    // just assign the updated shared dispatch and we\u2019re done!\n    // Otherwise, copy-on-write.\n    if (on !== on0 || listener0 !== listener) (on1 = (on0 = on).copy()).on(event, listener0 = listener);\n\n    schedule.on = on1;\n  };\n}\n\nexport default function(name, value, priority) {\n  var i = (name += \"\") === \"transform\" ? interpolateTransform : interpolate;\n  return value == null ? this\n      .styleTween(name, styleNull(name, i))\n      .on(\"end.style.\" + name, styleRemove(name))\n    : typeof value === \"function\" ? this\n      .styleTween(name, styleFunction(name, i, tweenValue(this, \"style.\" + name, value)))\n      .each(styleMaybeRemove(this._id, name))\n    : this\n      .styleTween(name, styleConstant(name, i, value), priority)\n      .on(\"end.style.\" + name, null);\n}\n", "function styleInterpolate(name, i, priority) {\n  return function(t) {\n    this.style.setProperty(name, i.call(this, t), priority);\n  };\n}\n\nfunction styleTween(name, value, priority) {\n  var t, i0;\n  function tween() {\n    var i = value.apply(this, arguments);\n    if (i !== i0) t = (i0 = i) && styleInterpolate(name, i, priority);\n    return t;\n  }\n  tween._value = value;\n  return tween;\n}\n\nexport default function(name, value, priority) {\n  var key = \"style.\" + (name += \"\");\n  if (arguments.length < 2) return (key = this.tween(key)) && key._value;\n  if (value == null) return this.tween(key, null);\n  if (typeof value !== \"function\") throw new Error;\n  return this.tween(key, styleTween(name, value, priority == null ? \"\" : priority));\n}\n", "import {tweenValue} from \"./tween.js\";\n\nfunction textConstant(value) {\n  return function() {\n    this.textContent = value;\n  };\n}\n\nfunction textFunction(value) {\n  return function() {\n    var value1 = value(this);\n    this.textContent = value1 == null ? \"\" : value1;\n  };\n}\n\nexport default function(value) {\n  return this.tween(\"text\", typeof value === \"function\"\n      ? textFunction(tweenValue(this, \"text\", value))\n      : textConstant(value == null ? \"\" : value + \"\"));\n}\n", "function textInterpolate(i) {\n  return function(t) {\n    this.textContent = i.call(this, t);\n  };\n}\n\nfunction textTween(value) {\n  var t0, i0;\n  function tween() {\n    var i = value.apply(this, arguments);\n    if (i !== i0) t0 = (i0 = i) && textInterpolate(i);\n    return t0;\n  }\n  tween._value = value;\n  return tween;\n}\n\nexport default function(value) {\n  var key = \"text\";\n  if (arguments.length < 1) return (key = this.tween(key)) && key._value;\n  if (value == null) return this.tween(key, null);\n  if (typeof value !== \"function\") throw new Error;\n  return this.tween(key, textTween(value));\n}\n", "import {Transition, newId} from \"./index.js\";\nimport schedule, {get} from \"./schedule.js\";\n\nexport default function() {\n  var name = this._name,\n      id0 = this._id,\n      id1 = newId();\n\n  for (var groups = this._groups, m = groups.length, j = 0; j < m; ++j) {\n    for (var group = groups[j], n = group.length, node, i = 0; i < n; ++i) {\n      if (node = group[i]) {\n        var inherit = get(node, id0);\n        schedule(node, name, id1, i, group, {\n          time: inherit.time + inherit.delay + inherit.duration,\n          delay: 0,\n          duration: inherit.duration,\n          ease: inherit.ease\n        });\n      }\n    }\n  }\n\n  return new Transition(groups, this._parents, name, id1);\n}\n", "import {set} from \"./schedule.js\";\n\nexport default function() {\n  var on0, on1, that = this, id = that._id, size = that.size();\n  return new Promise(function(resolve, reject) {\n    var cancel = {value: reject},\n        end = {value: function() { if (--size === 0) resolve(); }};\n\n    that.each(function() {\n      var schedule = set(this, id),\n          on = schedule.on;\n\n      // If this node shared a dispatch with the previous node,\n      // just assign the updated shared dispatch and we\u2019re done!\n      // Otherwise, copy-on-write.\n      if (on !== on0) {\n        on1 = (on0 = on).copy();\n        on1._.cancel.push(cancel);\n        on1._.interrupt.push(cancel);\n        on1._.end.push(end);\n      }\n\n      schedule.on = on1;\n    });\n\n    // The selection was empty, resolve end immediately\n    if (size === 0) resolve();\n  });\n}\n", "import {selection} from \"d3-selection\";\nimport transition_attr from \"./attr.js\";\nimport transition_attrTween from \"./attrTween.js\";\nimport transition_delay from \"./delay.js\";\nimport transition_duration from \"./duration.js\";\nimport transition_ease from \"./ease.js\";\nimport transition_easeVarying from \"./easeVarying.js\";\nimport transition_filter from \"./filter.js\";\nimport transition_merge from \"./merge.js\";\nimport transition_on from \"./on.js\";\nimport transition_remove from \"./remove.js\";\nimport transition_select from \"./select.js\";\nimport transition_selectAll from \"./selectAll.js\";\nimport transition_selection from \"./selection.js\";\nimport transition_style from \"./style.js\";\nimport transition_styleTween from \"./styleTween.js\";\nimport transition_text from \"./text.js\";\nimport transition_textTween from \"./textTween.js\";\nimport transition_transition from \"./transition.js\";\nimport transition_tween from \"./tween.js\";\nimport transition_end from \"./end.js\";\n\nvar id = 0;\n\nexport function Transition(groups, parents, name, id) {\n  this._groups = groups;\n  this._parents = parents;\n  this._name = name;\n  this._id = id;\n}\n\nexport default function transition(name) {\n  return selection().transition(name);\n}\n\nexport function newId() {\n  return ++id;\n}\n\nvar selection_prototype = selection.prototype;\n\nTransition.prototype = transition.prototype = {\n  constructor: Transition,\n  select: transition_select,\n  selectAll: transition_selectAll,\n  selectChild: selection_prototype.selectChild,\n  selectChildren: selection_prototype.selectChildren,\n  filter: transition_filter,\n  merge: transition_merge,\n  selection: transition_selection,\n  transition: transition_transition,\n  call: selection_prototype.call,\n  nodes: selection_prototype.nodes,\n  node: selection_prototype.node,\n  size: selection_prototype.size,\n  empty: selection_prototype.empty,\n  each: selection_prototype.each,\n  on: transition_on,\n  attr: transition_attr,\n  attrTween: transition_attrTween,\n  style: transition_style,\n  styleTween: transition_styleTween,\n  text: transition_text,\n  textTween: transition_textTween,\n  remove: transition_remove,\n  tween: transition_tween,\n  delay: transition_delay,\n  duration: transition_duration,\n  ease: transition_ease,\n  easeVarying: transition_easeVarying,\n  end: transition_end,\n  [Symbol.iterator]: selection_prototype[Symbol.iterator]\n};\n", "export function cubicIn(t) {\n  return t * t * t;\n}\n\nexport function cubicOut(t) {\n  return --t * t * t + 1;\n}\n\nexport function cubicInOut(t) {\n  return ((t *= 2) <= 1 ? t * t * t : (t -= 2) * t * t + 2) / 2;\n}\n", "import {Transition, newId} from \"../transition/index.js\";\nimport schedule from \"../transition/schedule.js\";\nimport {easeCubicInOut} from \"d3-ease\";\nimport {now} from \"d3-timer\";\n\nvar defaultTiming = {\n  time: null, // Set on use.\n  delay: 0,\n  duration: 250,\n  ease: easeCubicInOut\n};\n\nfunction inherit(node, id) {\n  var timing;\n  while (!(timing = node.__transition) || !(timing = timing[id])) {\n    if (!(node = node.parentNode)) {\n      throw new Error(`transition ${id} not found`);\n    }\n  }\n  return timing;\n}\n\nexport default function(name) {\n  var id,\n      timing;\n\n  if (name instanceof Transition) {\n    id = name._id, name = name._name;\n  } else {\n    id = newId(), (timing = defaultTiming).time = now(), name = name == null ? null : name + \"\";\n  }\n\n  for (var groups = this._groups, m = groups.length, j = 0; j < m; ++j) {\n    for (var group = groups[j], n = group.length, node, i = 0; i < n; ++i) {\n      if (node = group[i]) {\n        schedule(node, name, id, i, group, timing || inherit(node, id));\n      }\n    }\n  }\n\n  return new Transition(groups, this._parents, name, id);\n}\n", "import {selection} from \"d3-selection\";\nimport selection_interrupt from \"./interrupt.js\";\nimport selection_transition from \"./transition.js\";\n\nselection.prototype.interrupt = selection_interrupt;\nselection.prototype.transition = selection_transition;\n", "import {dispatch} from \"d3-dispatch\";\nimport {dragDisable, dragEnable} from \"d3-drag\";\nimport {interpolate} from \"d3-interpolate\";\nimport {pointer, select} from \"d3-selection\";\nimport {interrupt} from \"d3-transition\";\nimport constant from \"./constant.js\";\nimport BrushEvent from \"./event.js\";\nimport noevent, {nopropagation} from \"./noevent.js\";\n\nvar MODE_DRAG = {name: \"drag\"},\n    MODE_SPACE = {name: \"space\"},\n    MODE_HANDLE = {name: \"handle\"},\n    MODE_CENTER = {name: \"center\"};\n\nconst {abs, max, min} = Math;\n\nfunction number1(e) {\n  return [+e[0], +e[1]];\n}\n\nfunction number2(e) {\n  return [number1(e[0]), number1(e[1])];\n}\n\nvar X = {\n  name: \"x\",\n  handles: [\"w\", \"e\"].map(type),\n  input: function(x, e) { return x == null ? null : [[+x[0], e[0][1]], [+x[1], e[1][1]]]; },\n  output: function(xy) { return xy && [xy[0][0], xy[1][0]]; }\n};\n\nvar Y = {\n  name: \"y\",\n  handles: [\"n\", \"s\"].map(type),\n  input: function(y, e) { return y == null ? null : [[e[0][0], +y[0]], [e[1][0], +y[1]]]; },\n  output: function(xy) { return xy && [xy[0][1], xy[1][1]]; }\n};\n\nvar XY = {\n  name: \"xy\",\n  handles: [\"n\", \"w\", \"e\", \"s\", \"nw\", \"ne\", \"sw\", \"se\"].map(type),\n  input: function(xy) { return xy == null ? null : number2(xy); },\n  output: function(xy) { return xy; }\n};\n\nvar cursors = {\n  overlay: \"crosshair\",\n  selection: \"move\",\n  n: \"ns-resize\",\n  e: \"ew-resize\",\n  s: \"ns-resize\",\n  w: \"ew-resize\",\n  nw: \"nwse-resize\",\n  ne: \"nesw-resize\",\n  se: \"nwse-resize\",\n  sw: \"nesw-resize\"\n};\n\nvar flipX = {\n  e: \"w\",\n  w: \"e\",\n  nw: \"ne\",\n  ne: \"nw\",\n  se: \"sw\",\n  sw: \"se\"\n};\n\nvar flipY = {\n  n: \"s\",\n  s: \"n\",\n  nw: \"sw\",\n  ne: \"se\",\n  se: \"ne\",\n  sw: \"nw\"\n};\n\nvar signsX = {\n  overlay: +1,\n  selection: +1,\n  n: null,\n  e: +1,\n  s: null,\n  w: -1,\n  nw: -1,\n  ne: +1,\n  se: +1,\n  sw: -1\n};\n\nvar signsY = {\n  overlay: +1,\n  selection: +1,\n  n: -1,\n  e: null,\n  s: +1,\n  w: null,\n  nw: -1,\n  ne: -1,\n  se: +1,\n  sw: +1\n};\n\nfunction type(t) {\n  return {type: t};\n}\n\n// Ignore right-click, since that should open the context menu.\nfunction defaultFilter(event) {\n  return !event.ctrlKey && !event.button;\n}\n\nfunction defaultExtent() {\n  var svg = this.ownerSVGElement || this;\n  if (svg.hasAttribute(\"viewBox\")) {\n    svg = svg.viewBox.baseVal;\n    return [[svg.x, svg.y], [svg.x + svg.width, svg.y + svg.height]];\n  }\n  return [[0, 0], [svg.width.baseVal.value, svg.height.baseVal.value]];\n}\n\nfunction defaultTouchable() {\n  return navigator.maxTouchPoints || (\"ontouchstart\" in this);\n}\n\n// Like d3.local, but with the name \u201C__brush\u201D rather than auto-generated.\nfunction local(node) {\n  while (!node.__brush) if (!(node = node.parentNode)) return;\n  return node.__brush;\n}\n\nfunction empty(extent) {\n  return extent[0][0] === extent[1][0]\n      || extent[0][1] === extent[1][1];\n}\n\nexport function brushSelection(node) {\n  var state = node.__brush;\n  return state ? state.dim.output(state.selection) : null;\n}\n\nexport function brushX() {\n  return brush(X);\n}\n\nexport function brushY() {\n  return brush(Y);\n}\n\nexport default function() {\n  return brush(XY);\n}\n\nfunction brush(dim) {\n  var extent = defaultExtent,\n      filter = defaultFilter,\n      touchable = defaultTouchable,\n      keys = true,\n      listeners = dispatch(\"start\", \"brush\", \"end\"),\n      handleSize = 6,\n      touchending;\n\n  function brush(group) {\n    var overlay = group\n        .property(\"__brush\", initialize)\n      .selectAll(\".overlay\")\n      .data([type(\"overlay\")]);\n\n    overlay.enter().append(\"rect\")\n        .attr(\"class\", \"overlay\")\n        .attr(\"pointer-events\", \"all\")\n        .attr(\"cursor\", cursors.overlay)\n      .merge(overlay)\n        .each(function() {\n          var extent = local(this).extent;\n          select(this)\n              .attr(\"x\", extent[0][0])\n              .attr(\"y\", extent[0][1])\n              .attr(\"width\", extent[1][0] - extent[0][0])\n              .attr(\"height\", extent[1][1] - extent[0][1]);\n        });\n\n    group.selectAll(\".selection\")\n      .data([type(\"selection\")])\n      .enter().append(\"rect\")\n        .attr(\"class\", \"selection\")\n        .attr(\"cursor\", cursors.selection)\n        .attr(\"fill\", \"#777\")\n        .attr(\"fill-opacity\", 0.3)\n        .attr(\"stroke\", \"#fff\")\n        .attr(\"shape-rendering\", \"crispEdges\");\n\n    var handle = group.selectAll(\".handle\")\n      .data(dim.handles, function(d) { return d.type; });\n\n    handle.exit().remove();\n\n    handle.enter().append(\"rect\")\n        .attr(\"class\", function(d) { return \"handle handle--\" + d.type; })\n        .attr(\"cursor\", function(d) { return cursors[d.type]; });\n\n    group\n        .each(redraw)\n        .attr(\"fill\", \"none\")\n        .attr(\"pointer-events\", \"all\")\n        .on(\"mousedown.brush\", started)\n      .filter(touchable)\n        .on(\"touchstart.brush\", started)\n        .on(\"touchmove.brush\", touchmoved)\n        .on(\"touchend.brush touchcancel.brush\", touchended)\n        .style(\"touch-action\", \"none\")\n        .style(\"-webkit-tap-highlight-color\", \"rgba(0,0,0,0)\");\n  }\n\n  brush.move = function(group, selection, event) {\n    if (group.tween) {\n      group\n          .on(\"start.brush\", function(event) { emitter(this, arguments).beforestart().start(event); })\n          .on(\"interrupt.brush end.brush\", function(event) { emitter(this, arguments).end(event); })\n          .tween(\"brush\", function() {\n            var that = this,\n                state = that.__brush,\n                emit = emitter(that, arguments),\n                selection0 = state.selection,\n                selection1 = dim.input(typeof selection === \"function\" ? selection.apply(this, arguments) : selection, state.extent),\n                i = interpolate(selection0, selection1);\n\n            function tween(t) {\n              state.selection = t === 1 && selection1 === null ? null : i(t);\n              redraw.call(that);\n              emit.brush();\n            }\n\n            return selection0 !== null && selection1 !== null ? tween : tween(1);\n          });\n    } else {\n      group\n          .each(function() {\n            var that = this,\n                args = arguments,\n                state = that.__brush,\n                selection1 = dim.input(typeof selection === \"function\" ? selection.apply(that, args) : selection, state.extent),\n                emit = emitter(that, args).beforestart();\n\n            interrupt(that);\n            state.selection = selection1 === null ? null : selection1;\n            redraw.call(that);\n            emit.start(event).brush(event).end(event);\n          });\n    }\n  };\n\n  brush.clear = function(group, event) {\n    brush.move(group, null, event);\n  };\n\n  function redraw() {\n    var group = select(this),\n        selection = local(this).selection;\n\n    if (selection) {\n      group.selectAll(\".selection\")\n          .style(\"display\", null)\n          .attr(\"x\", selection[0][0])\n          .attr(\"y\", selection[0][1])\n          .attr(\"width\", selection[1][0] - selection[0][0])\n          .attr(\"height\", selection[1][1] - selection[0][1]);\n\n      group.selectAll(\".handle\")\n          .style(\"display\", null)\n          .attr(\"x\", function(d) { return d.type[d.type.length - 1] === \"e\" ? selection[1][0] - handleSize / 2 : selection[0][0] - handleSize / 2; })\n          .attr(\"y\", function(d) { return d.type[0] === \"s\" ? selection[1][1] - handleSize / 2 : selection[0][1] - handleSize / 2; })\n          .attr(\"width\", function(d) { return d.type === \"n\" || d.type === \"s\" ? selection[1][0] - selection[0][0] + handleSize : handleSize; })\n          .attr(\"height\", function(d) { return d.type === \"e\" || d.type === \"w\" ? selection[1][1] - selection[0][1] + handleSize : handleSize; });\n    }\n\n    else {\n      group.selectAll(\".selection,.handle\")\n          .style(\"display\", \"none\")\n          .attr(\"x\", null)\n          .attr(\"y\", null)\n          .attr(\"width\", null)\n          .attr(\"height\", null);\n    }\n  }\n\n  function emitter(that, args, clean) {\n    var emit = that.__brush.emitter;\n    return emit && (!clean || !emit.clean) ? emit : new Emitter(that, args, clean);\n  }\n\n  function Emitter(that, args, clean) {\n    this.that = that;\n    this.args = args;\n    this.state = that.__brush;\n    this.active = 0;\n    this.clean = clean;\n  }\n\n  Emitter.prototype = {\n    beforestart: function() {\n      if (++this.active === 1) this.state.emitter = this, this.starting = true;\n      return this;\n    },\n    start: function(event, mode) {\n      if (this.starting) this.starting = false, this.emit(\"start\", event, mode);\n      else this.emit(\"brush\", event);\n      return this;\n    },\n    brush: function(event, mode) {\n      this.emit(\"brush\", event, mode);\n      return this;\n    },\n    end: function(event, mode) {\n      if (--this.active === 0) delete this.state.emitter, this.emit(\"end\", event, mode);\n      return this;\n    },\n    emit: function(type, event, mode) {\n      var d = select(this.that).datum();\n      listeners.call(\n        type,\n        this.that,\n        new BrushEvent(type, {\n          sourceEvent: event,\n          target: brush,\n          selection: dim.output(this.state.selection),\n          mode,\n          dispatch: listeners\n        }),\n        d\n      );\n    }\n  };\n\n  function started(event) {\n    if (touchending && !event.touches) return;\n    if (!filter.apply(this, arguments)) return;\n\n    var that = this,\n        type = event.target.__data__.type,\n        mode = (keys && event.metaKey ? type = \"overlay\" : type) === \"selection\" ? MODE_DRAG : (keys && event.altKey ? MODE_CENTER : MODE_HANDLE),\n        signX = dim === Y ? null : signsX[type],\n        signY = dim === X ? null : signsY[type],\n        state = local(that),\n        extent = state.extent,\n        selection = state.selection,\n        W = extent[0][0], w0, w1,\n        N = extent[0][1], n0, n1,\n        E = extent[1][0], e0, e1,\n        S = extent[1][1], s0, s1,\n        dx = 0,\n        dy = 0,\n        moving,\n        shifting = signX && signY && keys && event.shiftKey,\n        lockX,\n        lockY,\n        points = Array.from(event.touches || [event], t => {\n          const i = t.identifier;\n          t = pointer(t, that);\n          t.point0 = t.slice();\n          t.identifier = i;\n          return t;\n        });\n\n    interrupt(that);\n    var emit = emitter(that, arguments, true).beforestart();\n\n    if (type === \"overlay\") {\n      if (selection) moving = true;\n      const pts = [points[0], points[1] || points[0]];\n      state.selection = selection = [[\n          w0 = dim === Y ? W : min(pts[0][0], pts[1][0]),\n          n0 = dim === X ? N : min(pts[0][1], pts[1][1])\n        ], [\n          e0 = dim === Y ? E : max(pts[0][0], pts[1][0]),\n          s0 = dim === X ? S : max(pts[0][1], pts[1][1])\n        ]];\n      if (points.length > 1) move(event);\n    } else {\n      w0 = selection[0][0];\n      n0 = selection[0][1];\n      e0 = selection[1][0];\n      s0 = selection[1][1];\n    }\n\n    w1 = w0;\n    n1 = n0;\n    e1 = e0;\n    s1 = s0;\n\n    var group = select(that)\n        .attr(\"pointer-events\", \"none\");\n\n    var overlay = group.selectAll(\".overlay\")\n        .attr(\"cursor\", cursors[type]);\n\n    if (event.touches) {\n      emit.moved = moved;\n      emit.ended = ended;\n    } else {\n      var view = select(event.view)\n          .on(\"mousemove.brush\", moved, true)\n          .on(\"mouseup.brush\", ended, true);\n      if (keys) view\n          .on(\"keydown.brush\", keydowned, true)\n          .on(\"keyup.brush\", keyupped, true)\n\n      dragDisable(event.view);\n    }\n\n    redraw.call(that);\n    emit.start(event, mode.name);\n\n    function moved(event) {\n      for (const p of event.changedTouches || [event]) {\n        for (const d of points)\n          if (d.identifier === p.identifier) d.cur = pointer(p, that);\n      }\n      if (shifting && !lockX && !lockY && points.length === 1) {\n        const point = points[0];\n        if (abs(point.cur[0] - point[0]) > abs(point.cur[1] - point[1]))\n          lockY = true;\n        else\n          lockX = true;\n      }\n      for (const point of points)\n        if (point.cur) point[0] = point.cur[0], point[1] = point.cur[1];\n      moving = true;\n      noevent(event);\n      move(event);\n    }\n\n    function move(event) {\n      const point = points[0], point0 = point.point0;\n      var t;\n\n      dx = point[0] - point0[0];\n      dy = point[1] - point0[1];\n\n      switch (mode) {\n        case MODE_SPACE:\n        case MODE_DRAG: {\n          if (signX) dx = max(W - w0, min(E - e0, dx)), w1 = w0 + dx, e1 = e0 + dx;\n          if (signY) dy = max(N - n0, min(S - s0, dy)), n1 = n0 + dy, s1 = s0 + dy;\n          break;\n        }\n        case MODE_HANDLE: {\n          if (points[1]) {\n            if (signX) w1 = max(W, min(E, points[0][0])), e1 = max(W, min(E, points[1][0])), signX = 1;\n            if (signY) n1 = max(N, min(S, points[0][1])), s1 = max(N, min(S, points[1][1])), signY = 1;\n          } else {\n            if (signX < 0) dx = max(W - w0, min(E - w0, dx)), w1 = w0 + dx, e1 = e0;\n            else if (signX > 0) dx = max(W - e0, min(E - e0, dx)), w1 = w0, e1 = e0 + dx;\n            if (signY < 0) dy = max(N - n0, min(S - n0, dy)), n1 = n0 + dy, s1 = s0;\n            else if (signY > 0) dy = max(N - s0, min(S - s0, dy)), n1 = n0, s1 = s0 + dy;\n          }\n          break;\n        }\n        case MODE_CENTER: {\n          if (signX) w1 = max(W, min(E, w0 - dx * signX)), e1 = max(W, min(E, e0 + dx * signX));\n          if (signY) n1 = max(N, min(S, n0 - dy * signY)), s1 = max(N, min(S, s0 + dy * signY));\n          break;\n        }\n      }\n\n      if (e1 < w1) {\n        signX *= -1;\n        t = w0, w0 = e0, e0 = t;\n        t = w1, w1 = e1, e1 = t;\n        if (type in flipX) overlay.attr(\"cursor\", cursors[type = flipX[type]]);\n      }\n\n      if (s1 < n1) {\n        signY *= -1;\n        t = n0, n0 = s0, s0 = t;\n        t = n1, n1 = s1, s1 = t;\n        if (type in flipY) overlay.attr(\"cursor\", cursors[type = flipY[type]]);\n      }\n\n      if (state.selection) selection = state.selection; // May be set by brush.move!\n      if (lockX) w1 = selection[0][0], e1 = selection[1][0];\n      if (lockY) n1 = selection[0][1], s1 = selection[1][1];\n\n      if (selection[0][0] !== w1\n          || selection[0][1] !== n1\n          || selection[1][0] !== e1\n          || selection[1][1] !== s1) {\n        state.selection = [[w1, n1], [e1, s1]];\n        redraw.call(that);\n        emit.brush(event, mode.name);\n      }\n    }\n\n    function ended(event) {\n      nopropagation(event);\n      if (event.touches) {\n        if (event.touches.length) return;\n        if (touchending) clearTimeout(touchending);\n        touchending = setTimeout(function() { touchending = null; }, 500); // Ghost clicks are delayed!\n      } else {\n        dragEnable(event.view, moving);\n        view.on(\"keydown.brush keyup.brush mousemove.brush mouseup.brush\", null);\n      }\n      group.attr(\"pointer-events\", \"all\");\n      overlay.attr(\"cursor\", cursors.overlay);\n      if (state.selection) selection = state.selection; // May be set by brush.move (on start)!\n      if (empty(selection)) state.selection = null, redraw.call(that);\n      emit.end(event, mode.name);\n    }\n\n    function keydowned(event) {\n      switch (event.keyCode) {\n        case 16: { // SHIFT\n          shifting = signX && signY;\n          break;\n        }\n        case 18: { // ALT\n          if (mode === MODE_HANDLE) {\n            if (signX) e0 = e1 - dx * signX, w0 = w1 + dx * signX;\n            if (signY) s0 = s1 - dy * signY, n0 = n1 + dy * signY;\n            mode = MODE_CENTER;\n            move(event);\n          }\n          break;\n        }\n        case 32: { // SPACE; takes priority over ALT\n          if (mode === MODE_HANDLE || mode === MODE_CENTER) {\n            if (signX < 0) e0 = e1 - dx; else if (signX > 0) w0 = w1 - dx;\n            if (signY < 0) s0 = s1 - dy; else if (signY > 0) n0 = n1 - dy;\n            mode = MODE_SPACE;\n            overlay.attr(\"cursor\", cursors.selection);\n            move(event);\n          }\n          break;\n        }\n        default: return;\n      }\n      noevent(event);\n    }\n\n    function keyupped(event) {\n      switch (event.keyCode) {\n        case 16: { // SHIFT\n          if (shifting) {\n            lockX = lockY = shifting = false;\n            move(event);\n          }\n          break;\n        }\n        case 18: { // ALT\n          if (mode === MODE_CENTER) {\n            if (signX < 0) e0 = e1; else if (signX > 0) w0 = w1;\n            if (signY < 0) s0 = s1; else if (signY > 0) n0 = n1;\n            mode = MODE_HANDLE;\n            move(event);\n          }\n          break;\n        }\n        case 32: { // SPACE\n          if (mode === MODE_SPACE) {\n            if (event.altKey) {\n              if (signX) e0 = e1 - dx * signX, w0 = w1 + dx * signX;\n              if (signY) s0 = s1 - dy * signY, n0 = n1 + dy * signY;\n              mode = MODE_CENTER;\n            } else {\n              if (signX < 0) e0 = e1; else if (signX > 0) w0 = w1;\n              if (signY < 0) s0 = s1; else if (signY > 0) n0 = n1;\n              mode = MODE_HANDLE;\n            }\n            overlay.attr(\"cursor\", cursors[type]);\n            move(event);\n          }\n          break;\n        }\n        default: return;\n      }\n      noevent(event);\n    }\n  }\n\n  function touchmoved(event) {\n    emitter(this, arguments).moved(event);\n  }\n\n  function touchended(event) {\n    emitter(this, arguments).ended(event);\n  }\n\n  function initialize() {\n    var state = this.__brush || {selection: null};\n    state.extent = number2(extent.apply(this, arguments));\n    state.dim = dim;\n    return state;\n  }\n\n  brush.extent = function(_) {\n    return arguments.length ? (extent = typeof _ === \"function\" ? _ : constant(number2(_)), brush) : extent;\n  };\n\n  brush.filter = function(_) {\n    return arguments.length ? (filter = typeof _ === \"function\" ? _ : constant(!!_), brush) : filter;\n  };\n\n  brush.touchable = function(_) {\n    return arguments.length ? (touchable = typeof _ === \"function\" ? _ : constant(!!_), brush) : touchable;\n  };\n\n  brush.handleSize = function(_) {\n    return arguments.length ? (handleSize = +_, brush) : handleSize;\n  };\n\n  brush.keyModifiers = function(_) {\n    return arguments.length ? (keys = !!_, brush) : keys;\n  };\n\n  brush.on = function() {\n    var value = listeners.on.apply(listeners, arguments);\n    return value === listeners ? brush : value;\n  };\n\n  return brush;\n}\n", "const pi = Math.PI,\n    tau = 2 * pi,\n    epsilon = 1e-6,\n    tauEpsilon = tau - epsilon;\n\nfunction append(strings) {\n  this._ += strings[0];\n  for (let i = 1, n = strings.length; i < n; ++i) {\n    this._ += arguments[i] + strings[i];\n  }\n}\n\nfunction appendRound(digits) {\n  let d = Math.floor(digits);\n  if (!(d >= 0)) throw new Error(`invalid digits: ${digits}`);\n  if (d > 15) return append;\n  const k = 10 ** d;\n  return function(strings) {\n    this._ += strings[0];\n    for (let i = 1, n = strings.length; i < n; ++i) {\n      this._ += Math.round(arguments[i] * k) / k + strings[i];\n    }\n  };\n}\n\nexport class Path {\n  constructor(digits) {\n    this._x0 = this._y0 = // start of current subpath\n    this._x1 = this._y1 = null; // end of current subpath\n    this._ = \"\";\n    this._append = digits == null ? append : appendRound(digits);\n  }\n  moveTo(x, y) {\n    this._append`M${this._x0 = this._x1 = +x},${this._y0 = this._y1 = +y}`;\n  }\n  closePath() {\n    if (this._x1 !== null) {\n      this._x1 = this._x0, this._y1 = this._y0;\n      this._append`Z`;\n    }\n  }\n  lineTo(x, y) {\n    this._append`L${this._x1 = +x},${this._y1 = +y}`;\n  }\n  quadraticCurveTo(x1, y1, x, y) {\n    this._append`Q${+x1},${+y1},${this._x1 = +x},${this._y1 = +y}`;\n  }\n  bezierCurveTo(x1, y1, x2, y2, x, y) {\n    this._append`C${+x1},${+y1},${+x2},${+y2},${this._x1 = +x},${this._y1 = +y}`;\n  }\n  arcTo(x1, y1, x2, y2, r) {\n    x1 = +x1, y1 = +y1, x2 = +x2, y2 = +y2, r = +r;\n\n    // Is the radius negative? Error.\n    if (r < 0) throw new Error(`negative radius: ${r}`);\n\n    let x0 = this._x1,\n        y0 = this._y1,\n        x21 = x2 - x1,\n        y21 = y2 - y1,\n        x01 = x0 - x1,\n        y01 = y0 - y1,\n        l01_2 = x01 * x01 + y01 * y01;\n\n    // Is this path empty? Move to (x1,y1).\n    if (this._x1 === null) {\n      this._append`M${this._x1 = x1},${this._y1 = y1}`;\n    }\n\n    // Or, is (x1,y1) coincident with (x0,y0)? Do nothing.\n    else if (!(l01_2 > epsilon));\n\n    // Or, are (x0,y0), (x1,y1) and (x2,y2) collinear?\n    // Equivalently, is (x1,y1) coincident with (x2,y2)?\n    // Or, is the radius zero? Line to (x1,y1).\n    else if (!(Math.abs(y01 * x21 - y21 * x01) > epsilon) || !r) {\n      this._append`L${this._x1 = x1},${this._y1 = y1}`;\n    }\n\n    // Otherwise, draw an arc!\n    else {\n      let x20 = x2 - x0,\n          y20 = y2 - y0,\n          l21_2 = x21 * x21 + y21 * y21,\n          l20_2 = x20 * x20 + y20 * y20,\n          l21 = Math.sqrt(l21_2),\n          l01 = Math.sqrt(l01_2),\n          l = r * Math.tan((pi - Math.acos((l21_2 + l01_2 - l20_2) / (2 * l21 * l01))) / 2),\n          t01 = l / l01,\n          t21 = l / l21;\n\n      // If the start tangent is not coincident with (x0,y0), line to.\n      if (Math.abs(t01 - 1) > epsilon) {\n        this._append`L${x1 + t01 * x01},${y1 + t01 * y01}`;\n      }\n\n      this._append`A${r},${r},0,0,${+(y01 * x20 > x01 * y20)},${this._x1 = x1 + t21 * x21},${this._y1 = y1 + t21 * y21}`;\n    }\n  }\n  arc(x, y, r, a0, a1, ccw) {\n    x = +x, y = +y, r = +r, ccw = !!ccw;\n\n    // Is the radius negative? Error.\n    if (r < 0) throw new Error(`negative radius: ${r}`);\n\n    let dx = r * Math.cos(a0),\n        dy = r * Math.sin(a0),\n        x0 = x + dx,\n        y0 = y + dy,\n        cw = 1 ^ ccw,\n        da = ccw ? a0 - a1 : a1 - a0;\n\n    // Is this path empty? Move to (x0,y0).\n    if (this._x1 === null) {\n      this._append`M${x0},${y0}`;\n    }\n\n    // Or, is (x0,y0) not coincident with the previous point? Line to (x0,y0).\n    else if (Math.abs(this._x1 - x0) > epsilon || Math.abs(this._y1 - y0) > epsilon) {\n      this._append`L${x0},${y0}`;\n    }\n\n    // Is this arc empty? We\u2019re done.\n    if (!r) return;\n\n    // Does the angle go the wrong way? Flip the direction.\n    if (da < 0) da = da % tau + tau;\n\n    // Is this a complete circle? Draw two arcs to complete the circle.\n    if (da > tauEpsilon) {\n      this._append`A${r},${r},0,1,${cw},${x - dx},${y - dy}A${r},${r},0,1,${cw},${this._x1 = x0},${this._y1 = y0}`;\n    }\n\n    // Is this arc non-empty? Draw an arc!\n    else if (da > epsilon) {\n      this._append`A${r},${r},0,${+(da >= pi)},${cw},${this._x1 = x + r * Math.cos(a1)},${this._y1 = y + r * Math.sin(a1)}`;\n    }\n  }\n  rect(x, y, w, h) {\n    this._append`M${this._x0 = this._x1 = +x},${this._y0 = this._y1 = +y}h${w = +w}v${+h}h${-w}Z`;\n  }\n  toString() {\n    return this._;\n  }\n}\n\nexport function path() {\n  return new Path;\n}\n\n// Allow instanceof d3.path\npath.prototype = Path.prototype;\n\nexport function pathRound(digits = 3) {\n  return new Path(+digits);\n}\n", "export default function(x) {\n  return Math.abs(x = Math.round(x)) >= 1e21\n      ? x.toLocaleString(\"en\").replace(/,/g, \"\")\n      : x.toString(10);\n}\n\n// Computes the decimal coefficient and exponent of the specified number x with\n// significant digits p, where x is positive and p is in [1, 21] or undefined.\n// For example, formatDecimalParts(1.23) returns [\"123\", 0].\nexport function formatDecimalParts(x, p) {\n  if ((i = (x = p ? x.toExponential(p - 1) : x.toExponential()).indexOf(\"e\")) < 0) return null; // NaN, \u00B1Infinity\n  var i, coefficient = x.slice(0, i);\n\n  // The string returned by toExponential either has the form \\d\\.\\d+e[-+]\\d+\n  // (e.g., 1.2e+3) or the form \\de[-+]\\d+ (e.g., 1e+3).\n  return [\n    coefficient.length > 1 ? coefficient[0] + coefficient.slice(2) : coefficient,\n    +x.slice(i + 1)\n  ];\n}\n", "import {formatDecimalParts} from \"./formatDecimal.js\";\n\nexport default function(x) {\n  return x = formatDecimalParts(Math.abs(x)), x ? x[1] : NaN;\n}\n", "export default function(grouping, thousands) {\n  return function(value, width) {\n    var i = value.length,\n        t = [],\n        j = 0,\n        g = grouping[0],\n        length = 0;\n\n    while (i > 0 && g > 0) {\n      if (length + g + 1 > width) g = Math.max(1, width - length);\n      t.push(value.substring(i -= g, i + g));\n      if ((length += g + 1) > width) break;\n      g = grouping[j = (j + 1) % grouping.length];\n    }\n\n    return t.reverse().join(thousands);\n  };\n}\n", "export default function(numerals) {\n  return function(value) {\n    return value.replace(/[0-9]/g, function(i) {\n      return numerals[+i];\n    });\n  };\n}\n", "// [[fill]align][sign][symbol][0][width][,][.precision][~][type]\nvar re = /^(?:(.)?([<>=^]))?([+\\-( ])?([$#])?(0)?(\\d+)?(,)?(\\.\\d+)?(~)?([a-z%])?$/i;\n\nexport default function formatSpecifier(specifier) {\n  if (!(match = re.exec(specifier))) throw new Error(\"invalid format: \" + specifier);\n  var match;\n  return new FormatSpecifier({\n    fill: match[1],\n    align: match[2],\n    sign: match[3],\n    symbol: match[4],\n    zero: match[5],\n    width: match[6],\n    comma: match[7],\n    precision: match[8] && match[8].slice(1),\n    trim: match[9],\n    type: match[10]\n  });\n}\n\nformatSpecifier.prototype = FormatSpecifier.prototype; // instanceof\n\nexport function FormatSpecifier(specifier) {\n  this.fill = specifier.fill === undefined ? \" \" : specifier.fill + \"\";\n  this.align = specifier.align === undefined ? \">\" : specifier.align + \"\";\n  this.sign = specifier.sign === undefined ? \"-\" : specifier.sign + \"\";\n  this.symbol = specifier.symbol === undefined ? \"\" : specifier.symbol + \"\";\n  this.zero = !!specifier.zero;\n  this.width = specifier.width === undefined ? undefined : +specifier.width;\n  this.comma = !!specifier.comma;\n  this.precision = specifier.precision === undefined ? undefined : +specifier.precision;\n  this.trim = !!specifier.trim;\n  this.type = specifier.type === undefined ? \"\" : specifier.type + \"\";\n}\n\nFormatSpecifier.prototype.toString = function() {\n  return this.fill\n      + this.align\n      + this.sign\n      + this.symbol\n      + (this.zero ? \"0\" : \"\")\n      + (this.width === undefined ? \"\" : Math.max(1, this.width | 0))\n      + (this.comma ? \",\" : \"\")\n      + (this.precision === undefined ? \"\" : \".\" + Math.max(0, this.precision | 0))\n      + (this.trim ? \"~\" : \"\")\n      + this.type;\n};\n", "// Trims insignificant zeros, e.g., replaces 1.2000k with 1.2k.\nexport default function(s) {\n  out: for (var n = s.length, i = 1, i0 = -1, i1; i < n; ++i) {\n    switch (s[i]) {\n      case \".\": i0 = i1 = i; break;\n      case \"0\": if (i0 === 0) i0 = i; i1 = i; break;\n      default: if (!+s[i]) break out; if (i0 > 0) i0 = 0; break;\n    }\n  }\n  return i0 > 0 ? s.slice(0, i0) + s.slice(i1 + 1) : s;\n}\n", "import {formatDecimalParts} from \"./formatDecimal.js\";\n\nexport var prefixExponent;\n\nexport default function(x, p) {\n  var d = formatDecimalParts(x, p);\n  if (!d) return x + \"\";\n  var coefficient = d[0],\n      exponent = d[1],\n      i = exponent - (prefixExponent = Math.max(-8, Math.min(8, Math.floor(exponent / 3))) * 3) + 1,\n      n = coefficient.length;\n  return i === n ? coefficient\n      : i > n ? coefficient + new Array(i - n + 1).join(\"0\")\n      : i > 0 ? coefficient.slice(0, i) + \".\" + coefficient.slice(i)\n      : \"0.\" + new Array(1 - i).join(\"0\") + formatDecimalParts(x, Math.max(0, p + i - 1))[0]; // less than 1y!\n}\n", "import {formatDecimalParts} from \"./formatDecimal.js\";\n\nexport default function(x, p) {\n  var d = formatDecimalParts(x, p);\n  if (!d) return x + \"\";\n  var coefficient = d[0],\n      exponent = d[1];\n  return exponent < 0 ? \"0.\" + new Array(-exponent).join(\"0\") + coefficient\n      : coefficient.length > exponent + 1 ? coefficient.slice(0, exponent + 1) + \".\" + coefficient.slice(exponent + 1)\n      : coefficient + new Array(exponent - coefficient.length + 2).join(\"0\");\n}\n", "import formatDecimal from \"./formatDecimal.js\";\nimport formatPrefixAuto from \"./formatPrefixAuto.js\";\nimport formatRounded from \"./formatRounded.js\";\n\nexport default {\n  \"%\": (x, p) => (x * 100).toFixed(p),\n  \"b\": (x) => Math.round(x).toString(2),\n  \"c\": (x) => x + \"\",\n  \"d\": formatDecimal,\n  \"e\": (x, p) => x.toExponential(p),\n  \"f\": (x, p) => x.toFixed(p),\n  \"g\": (x, p) => x.toPrecision(p),\n  \"o\": (x) => Math.round(x).toString(8),\n  \"p\": (x, p) => formatRounded(x * 100, p),\n  \"r\": formatRounded,\n  \"s\": formatPrefixAuto,\n  \"X\": (x) => Math.round(x).toString(16).toUpperCase(),\n  \"x\": (x) => Math.round(x).toString(16)\n};\n", "export default function(x) {\n  return x;\n}\n", "import exponent from \"./exponent.js\";\nimport formatGroup from \"./formatGroup.js\";\nimport formatNumerals from \"./formatNumerals.js\";\nimport formatSpecifier from \"./formatSpecifier.js\";\nimport formatTrim from \"./formatTrim.js\";\nimport formatTypes from \"./formatTypes.js\";\nimport {prefixExponent} from \"./formatPrefixAuto.js\";\nimport identity from \"./identity.js\";\n\nvar map = Array.prototype.map,\n    prefixes = [\"y\",\"z\",\"a\",\"f\",\"p\",\"n\",\"\u00B5\",\"m\",\"\",\"k\",\"M\",\"G\",\"T\",\"P\",\"E\",\"Z\",\"Y\"];\n\nexport default function(locale) {\n  var group = locale.grouping === undefined || locale.thousands === undefined ? identity : formatGroup(map.call(locale.grouping, Number), locale.thousands + \"\"),\n      currencyPrefix = locale.currency === undefined ? \"\" : locale.currency[0] + \"\",\n      currencySuffix = locale.currency === undefined ? \"\" : locale.currency[1] + \"\",\n      decimal = locale.decimal === undefined ? \".\" : locale.decimal + \"\",\n      numerals = locale.numerals === undefined ? identity : formatNumerals(map.call(locale.numerals, String)),\n      percent = locale.percent === undefined ? \"%\" : locale.percent + \"\",\n      minus = locale.minus === undefined ? \"\u2212\" : locale.minus + \"\",\n      nan = locale.nan === undefined ? \"NaN\" : locale.nan + \"\";\n\n  function newFormat(specifier) {\n    specifier = formatSpecifier(specifier);\n\n    var fill = specifier.fill,\n        align = specifier.align,\n        sign = specifier.sign,\n        symbol = specifier.symbol,\n        zero = specifier.zero,\n        width = specifier.width,\n        comma = specifier.comma,\n        precision = specifier.precision,\n        trim = specifier.trim,\n        type = specifier.type;\n\n    // The \"n\" type is an alias for \",g\".\n    if (type === \"n\") comma = true, type = \"g\";\n\n    // The \"\" type, and any invalid type, is an alias for \".12~g\".\n    else if (!formatTypes[type]) precision === undefined && (precision = 12), trim = true, type = \"g\";\n\n    // If zero fill is specified, padding goes after sign and before digits.\n    if (zero || (fill === \"0\" && align === \"=\")) zero = true, fill = \"0\", align = \"=\";\n\n    // Compute the prefix and suffix.\n    // For SI-prefix, the suffix is lazily computed.\n    var prefix = symbol === \"$\" ? currencyPrefix : symbol === \"#\" && /[boxX]/.test(type) ? \"0\" + type.toLowerCase() : \"\",\n        suffix = symbol === \"$\" ? currencySuffix : /[%p]/.test(type) ? percent : \"\";\n\n    // What format function should we use?\n    // Is this an integer type?\n    // Can this type generate exponential notation?\n    var formatType = formatTypes[type],\n        maybeSuffix = /[defgprs%]/.test(type);\n\n    // Set the default precision if not specified,\n    // or clamp the specified precision to the supported range.\n    // For significant precision, it must be in [1, 21].\n    // For fixed precision, it must be in [0, 20].\n    precision = precision === undefined ? 6\n        : /[gprs]/.test(type) ? Math.max(1, Math.min(21, precision))\n        : Math.max(0, Math.min(20, precision));\n\n    function format(value) {\n      var valuePrefix = prefix,\n          valueSuffix = suffix,\n          i, n, c;\n\n      if (type === \"c\") {\n        valueSuffix = formatType(value) + valueSuffix;\n        value = \"\";\n      } else {\n        value = +value;\n\n        // Determine the sign. -0 is not less than 0, but 1 / -0 is!\n        var valueNegative = value < 0 || 1 / value < 0;\n\n        // Perform the initial formatting.\n        value = isNaN(value) ? nan : formatType(Math.abs(value), precision);\n\n        // Trim insignificant zeros.\n        if (trim) value = formatTrim(value);\n\n        // If a negative value rounds to zero after formatting, and no explicit positive sign is requested, hide the sign.\n        if (valueNegative && +value === 0 && sign !== \"+\") valueNegative = false;\n\n        // Compute the prefix and suffix.\n        valuePrefix = (valueNegative ? (sign === \"(\" ? sign : minus) : sign === \"-\" || sign === \"(\" ? \"\" : sign) + valuePrefix;\n        valueSuffix = (type === \"s\" ? prefixes[8 + prefixExponent / 3] : \"\") + valueSuffix + (valueNegative && sign === \"(\" ? \")\" : \"\");\n\n        // Break the formatted value into the integer \u201Cvalue\u201D part that can be\n        // grouped, and fractional or exponential \u201Csuffix\u201D part that is not.\n        if (maybeSuffix) {\n          i = -1, n = value.length;\n          while (++i < n) {\n            if (c = value.charCodeAt(i), 48 > c || c > 57) {\n              valueSuffix = (c === 46 ? decimal + value.slice(i + 1) : value.slice(i)) + valueSuffix;\n              value = value.slice(0, i);\n              break;\n            }\n          }\n        }\n      }\n\n      // If the fill character is not \"0\", grouping is applied before padding.\n      if (comma && !zero) value = group(value, Infinity);\n\n      // Compute the padding.\n      var length = valuePrefix.length + value.length + valueSuffix.length,\n          padding = length < width ? new Array(width - length + 1).join(fill) : \"\";\n\n      // If the fill character is \"0\", grouping is applied after padding.\n      if (comma && zero) value = group(padding + value, padding.length ? width - valueSuffix.length : Infinity), padding = \"\";\n\n      // Reconstruct the final output based on the desired alignment.\n      switch (align) {\n        case \"<\": value = valuePrefix + value + valueSuffix + padding; break;\n        case \"=\": value = valuePrefix + padding + value + valueSuffix; break;\n        case \"^\": value = padding.slice(0, length = padding.length >> 1) + valuePrefix + value + valueSuffix + padding.slice(length); break;\n        default: value = padding + valuePrefix + value + valueSuffix; break;\n      }\n\n      return numerals(value);\n    }\n\n    format.toString = function() {\n      return specifier + \"\";\n    };\n\n    return format;\n  }\n\n  function formatPrefix(specifier, value) {\n    var f = newFormat((specifier = formatSpecifier(specifier), specifier.type = \"f\", specifier)),\n        e = Math.max(-8, Math.min(8, Math.floor(exponent(value) / 3))) * 3,\n        k = Math.pow(10, -e),\n        prefix = prefixes[8 + e / 3];\n    return function(value) {\n      return f(k * value) + prefix;\n    };\n  }\n\n  return {\n    format: newFormat,\n    formatPrefix: formatPrefix\n  };\n}\n", "import formatLocale from \"./locale.js\";\n\nvar locale;\nexport var format;\nexport var formatPrefix;\n\ndefaultLocale({\n  thousands: \",\",\n  grouping: [3],\n  currency: [\"$\", \"\"]\n});\n\nexport default function defaultLocale(definition) {\n  locale = formatLocale(definition);\n  format = locale.format;\n  formatPrefix = locale.formatPrefix;\n  return locale;\n}\n", "import exponent from \"./exponent.js\";\n\nexport default function(step) {\n  return Math.max(0, -exponent(Math.abs(step)));\n}\n", "import exponent from \"./exponent.js\";\n\nexport default function(step, value) {\n  return Math.max(0, Math.max(-8, Math.min(8, Math.floor(exponent(value) / 3))) * 3 - exponent(Math.abs(step)));\n}\n", "import exponent from \"./exponent.js\";\n\nexport default function(step, max) {\n  step = Math.abs(step), max = Math.abs(max) - step;\n  return Math.max(0, exponent(max) - exponent(step)) + 1;\n}\n", "export var epsilon = 1e-6;\nexport var epsilon2 = 1e-12;\nexport var pi = Math.PI;\nexport var halfPi = pi / 2;\nexport var quarterPi = pi / 4;\nexport var tau = pi * 2;\n\nexport var degrees = 180 / pi;\nexport var radians = pi / 180;\n\nexport var abs = Math.abs;\nexport var atan = Math.atan;\nexport var atan2 = Math.atan2;\nexport var cos = Math.cos;\nexport var ceil = Math.ceil;\nexport var exp = Math.exp;\nexport var floor = Math.floor;\nexport var hypot = Math.hypot;\nexport var log = Math.log;\nexport var pow = Math.pow;\nexport var sin = Math.sin;\nexport var sign = Math.sign || function(x) { return x > 0 ? 1 : x < 0 ? -1 : 0; };\nexport var sqrt = Math.sqrt;\nexport var tan = Math.tan;\n\nexport function acos(x) {\n  return x > 1 ? 0 : x < -1 ? pi : Math.acos(x);\n}\n\nexport function asin(x) {\n  return x > 1 ? halfPi : x < -1 ? -halfPi : Math.asin(x);\n}\n\nexport function haversin(x) {\n  return (x = sin(x / 2)) * x;\n}\n", "export default function noop() {}\n", "function streamGeometry(geometry, stream) {\n  if (geometry && streamGeometryType.hasOwnProperty(geometry.type)) {\n    streamGeometryType[geometry.type](geometry, stream);\n  }\n}\n\nvar streamObjectType = {\n  Feature: function(object, stream) {\n    streamGeometry(object.geometry, stream);\n  },\n  FeatureCollection: function(object, stream) {\n    var features = object.features, i = -1, n = features.length;\n    while (++i < n) streamGeometry(features[i].geometry, stream);\n  }\n};\n\nvar streamGeometryType = {\n  Sphere: function(object, stream) {\n    stream.sphere();\n  },\n  Point: function(object, stream) {\n    object = object.coordinates;\n    stream.point(object[0], object[1], object[2]);\n  },\n  MultiPoint: function(object, stream) {\n    var coordinates = object.coordinates, i = -1, n = coordinates.length;\n    while (++i < n) object = coordinates[i], stream.point(object[0], object[1], object[2]);\n  },\n  LineString: function(object, stream) {\n    streamLine(object.coordinates, stream, 0);\n  },\n  MultiLineString: function(object, stream) {\n    var coordinates = object.coordinates, i = -1, n = coordinates.length;\n    while (++i < n) streamLine(coordinates[i], stream, 0);\n  },\n  Polygon: function(object, stream) {\n    streamPolygon(object.coordinates, stream);\n  },\n  MultiPolygon: function(object, stream) {\n    var coordinates = object.coordinates, i = -1, n = coordinates.length;\n    while (++i < n) streamPolygon(coordinates[i], stream);\n  },\n  GeometryCollection: function(object, stream) {\n    var geometries = object.geometries, i = -1, n = geometries.length;\n    while (++i < n) streamGeometry(geometries[i], stream);\n  }\n};\n\nfunction streamLine(coordinates, stream, closed) {\n  var i = -1, n = coordinates.length - closed, coordinate;\n  stream.lineStart();\n  while (++i < n) coordinate = coordinates[i], stream.point(coordinate[0], coordinate[1], coordinate[2]);\n  stream.lineEnd();\n}\n\nfunction streamPolygon(coordinates, stream) {\n  var i = -1, n = coordinates.length;\n  stream.polygonStart();\n  while (++i < n) streamLine(coordinates[i], stream, 1);\n  stream.polygonEnd();\n}\n\nexport default function(object, stream) {\n  if (object && streamObjectType.hasOwnProperty(object.type)) {\n    streamObjectType[object.type](object, stream);\n  } else {\n    streamGeometry(object, stream);\n  }\n}\n", "import {asin, atan2, cos, sin, sqrt} from \"./math.js\";\n\nexport function spherical(cartesian) {\n  return [atan2(cartesian[1], cartesian[0]), asin(cartesian[2])];\n}\n\nexport function cartesian(spherical) {\n  var lambda = spherical[0], phi = spherical[1], cosPhi = cos(phi);\n  return [cosPhi * cos(lambda), cosPhi * sin(lambda), sin(phi)];\n}\n\nexport function cartesianDot(a, b) {\n  return a[0] * b[0] + a[1] * b[1] + a[2] * b[2];\n}\n\nexport function cartesianCross(a, b) {\n  return [a[1] * b[2] - a[2] * b[1], a[2] * b[0] - a[0] * b[2], a[0] * b[1] - a[1] * b[0]];\n}\n\n// TODO return a\nexport function cartesianAddInPlace(a, b) {\n  a[0] += b[0], a[1] += b[1], a[2] += b[2];\n}\n\nexport function cartesianScale(vector, k) {\n  return [vector[0] * k, vector[1] * k, vector[2] * k];\n}\n\n// TODO return d\nexport function cartesianNormalizeInPlace(d) {\n  var l = sqrt(d[0] * d[0] + d[1] * d[1] + d[2] * d[2]);\n  d[0] /= l, d[1] /= l, d[2] /= l;\n}\n", "export default function(a, b) {\n\n  function compose(x, y) {\n    return x = a(x, y), b(x[0], x[1]);\n  }\n\n  if (a.invert && b.invert) compose.invert = function(x, y) {\n    return x = b.invert(x, y), x && a.invert(x[0], x[1]);\n  };\n\n  return compose;\n}\n", "import compose from \"./compose.js\";\nimport {abs, asin, atan2, cos, degrees, pi, radians, sin, tau} from \"./math.js\";\n\nfunction rotationIdentity(lambda, phi) {\n  if (abs(lambda) > pi) lambda -= Math.round(lambda / tau) * tau;\n  return [lambda, phi];\n}\n\nrotationIdentity.invert = rotationIdentity;\n\nexport function rotateRadians(deltaLambda, deltaPhi, deltaGamma) {\n  return (deltaLambda %= tau) ? (deltaPhi || deltaGamma ? compose(rotationLambda(deltaLambda), rotationPhiGamma(deltaPhi, deltaGamma))\n    : rotationLambda(deltaLambda))\n    : (deltaPhi || deltaGamma ? rotationPhiGamma(deltaPhi, deltaGamma)\n    : rotationIdentity);\n}\n\nfunction forwardRotationLambda(deltaLambda) {\n  return function(lambda, phi) {\n    lambda += deltaLambda;\n    if (abs(lambda) > pi) lambda -= Math.round(lambda / tau) * tau;\n    return [lambda, phi];\n  };\n}\n\nfunction rotationLambda(deltaLambda) {\n  var rotation = forwardRotationLambda(deltaLambda);\n  rotation.invert = forwardRotationLambda(-deltaLambda);\n  return rotation;\n}\n\nfunction rotationPhiGamma(deltaPhi, deltaGamma) {\n  var cosDeltaPhi = cos(deltaPhi),\n      sinDeltaPhi = sin(deltaPhi),\n      cosDeltaGamma = cos(deltaGamma),\n      sinDeltaGamma = sin(deltaGamma);\n\n  function rotation(lambda, phi) {\n    var cosPhi = cos(phi),\n        x = cos(lambda) * cosPhi,\n        y = sin(lambda) * cosPhi,\n        z = sin(phi),\n        k = z * cosDeltaPhi + x * sinDeltaPhi;\n    return [\n      atan2(y * cosDeltaGamma - k * sinDeltaGamma, x * cosDeltaPhi - z * sinDeltaPhi),\n      asin(k * cosDeltaGamma + y * sinDeltaGamma)\n    ];\n  }\n\n  rotation.invert = function(lambda, phi) {\n    var cosPhi = cos(phi),\n        x = cos(lambda) * cosPhi,\n        y = sin(lambda) * cosPhi,\n        z = sin(phi),\n        k = z * cosDeltaGamma - y * sinDeltaGamma;\n    return [\n      atan2(y * cosDeltaGamma + z * sinDeltaGamma, x * cosDeltaPhi + k * sinDeltaPhi),\n      asin(k * cosDeltaPhi - x * sinDeltaPhi)\n    ];\n  };\n\n  return rotation;\n}\n\nexport default function(rotate) {\n  rotate = rotateRadians(rotate[0] * radians, rotate[1] * radians, rotate.length > 2 ? rotate[2] * radians : 0);\n\n  function forward(coordinates) {\n    coordinates = rotate(coordinates[0] * radians, coordinates[1] * radians);\n    return coordinates[0] *= degrees, coordinates[1] *= degrees, coordinates;\n  }\n\n  forward.invert = function(coordinates) {\n    coordinates = rotate.invert(coordinates[0] * radians, coordinates[1] * radians);\n    return coordinates[0] *= degrees, coordinates[1] *= degrees, coordinates;\n  };\n\n  return forward;\n}\n", "import {cartesian, cartesianNormalizeInPlace, spherical} from \"./cartesian.js\";\nimport constant from \"./constant.js\";\nimport {acos, cos, degrees, epsilon, radians, sin, tau} from \"./math.js\";\nimport {rotateRadians} from \"./rotation.js\";\n\n// Generates a circle centered at [0\u00B0, 0\u00B0], with a given radius and precision.\nexport function circleStream(stream, radius, delta, direction, t0, t1) {\n  if (!delta) return;\n  var cosRadius = cos(radius),\n      sinRadius = sin(radius),\n      step = direction * delta;\n  if (t0 == null) {\n    t0 = radius + direction * tau;\n    t1 = radius - step / 2;\n  } else {\n    t0 = circleRadius(cosRadius, t0);\n    t1 = circleRadius(cosRadius, t1);\n    if (direction > 0 ? t0 < t1 : t0 > t1) t0 += direction * tau;\n  }\n  for (var point, t = t0; direction > 0 ? t > t1 : t < t1; t -= step) {\n    point = spherical([cosRadius, -sinRadius * cos(t), -sinRadius * sin(t)]);\n    stream.point(point[0], point[1]);\n  }\n}\n\n// Returns the signed angle of a cartesian point relative to [cosRadius, 0, 0].\nfunction circleRadius(cosRadius, point) {\n  point = cartesian(point), point[0] -= cosRadius;\n  cartesianNormalizeInPlace(point);\n  var radius = acos(-point[1]);\n  return ((-point[2] < 0 ? -radius : radius) + tau - epsilon) % tau;\n}\n\nexport default function() {\n  var center = constant([0, 0]),\n      radius = constant(90),\n      precision = constant(6),\n      ring,\n      rotate,\n      stream = {point: point};\n\n  function point(x, y) {\n    ring.push(x = rotate(x, y));\n    x[0] *= degrees, x[1] *= degrees;\n  }\n\n  function circle() {\n    var c = center.apply(this, arguments),\n        r = radius.apply(this, arguments) * radians,\n        p = precision.apply(this, arguments) * radians;\n    ring = [];\n    rotate = rotateRadians(-c[0] * radians, -c[1] * radians, 0).invert;\n    circleStream(stream, r, p, 1);\n    c = {type: \"Polygon\", coordinates: [ring]};\n    ring = rotate = null;\n    return c;\n  }\n\n  circle.center = function(_) {\n    return arguments.length ? (center = typeof _ === \"function\" ? _ : constant([+_[0], +_[1]]), circle) : center;\n  };\n\n  circle.radius = function(_) {\n    return arguments.length ? (radius = typeof _ === \"function\" ? _ : constant(+_), circle) : radius;\n  };\n\n  circle.precision = function(_) {\n    return arguments.length ? (precision = typeof _ === \"function\" ? _ : constant(+_), circle) : precision;\n  };\n\n  return circle;\n}\n", "import noop from \"../noop.js\";\n\nexport default function() {\n  var lines = [],\n      line;\n  return {\n    point: function(x, y, m) {\n      line.push([x, y, m]);\n    },\n    lineStart: function() {\n      lines.push(line = []);\n    },\n    lineEnd: noop,\n    rejoin: function() {\n      if (lines.length > 1) lines.push(lines.pop().concat(lines.shift()));\n    },\n    result: function() {\n      var result = lines;\n      lines = [];\n      line = null;\n      return result;\n    }\n  };\n}\n", "import {abs, epsilon} from \"./math.js\";\n\nexport default function(a, b) {\n  return abs(a[0] - b[0]) < epsilon && abs(a[1] - b[1]) < epsilon;\n}\n", "import pointEqual from \"../pointEqual.js\";\nimport {epsilon} from \"../math.js\";\n\nfunction Intersection(point, points, other, entry) {\n  this.x = point;\n  this.z = points;\n  this.o = other; // another intersection\n  this.e = entry; // is an entry?\n  this.v = false; // visited\n  this.n = this.p = null; // next & previous\n}\n\n// A generalized polygon clipping algorithm: given a polygon that has been cut\n// into its visible line segments, and rejoins the segments by interpolating\n// along the clip edge.\nexport default function(segments, compareIntersection, startInside, interpolate, stream) {\n  var subject = [],\n      clip = [],\n      i,\n      n;\n\n  segments.forEach(function(segment) {\n    if ((n = segment.length - 1) <= 0) return;\n    var n, p0 = segment[0], p1 = segment[n], x;\n\n    if (pointEqual(p0, p1)) {\n      if (!p0[2] && !p1[2]) {\n        stream.lineStart();\n        for (i = 0; i < n; ++i) stream.point((p0 = segment[i])[0], p0[1]);\n        stream.lineEnd();\n        return;\n      }\n      // handle degenerate cases by moving the point\n      p1[0] += 2 * epsilon;\n    }\n\n    subject.push(x = new Intersection(p0, segment, null, true));\n    clip.push(x.o = new Intersection(p0, null, x, false));\n    subject.push(x = new Intersection(p1, segment, null, false));\n    clip.push(x.o = new Intersection(p1, null, x, true));\n  });\n\n  if (!subject.length) return;\n\n  clip.sort(compareIntersection);\n  link(subject);\n  link(clip);\n\n  for (i = 0, n = clip.length; i < n; ++i) {\n    clip[i].e = startInside = !startInside;\n  }\n\n  var start = subject[0],\n      points,\n      point;\n\n  while (1) {\n    // Find first unvisited intersection.\n    var current = start,\n        isSubject = true;\n    while (current.v) if ((current = current.n) === start) return;\n    points = current.z;\n    stream.lineStart();\n    do {\n      current.v = current.o.v = true;\n      if (current.e) {\n        if (isSubject) {\n          for (i = 0, n = points.length; i < n; ++i) stream.point((point = points[i])[0], point[1]);\n        } else {\n          interpolate(current.x, current.n.x, 1, stream);\n        }\n        current = current.n;\n      } else {\n        if (isSubject) {\n          points = current.p.z;\n          for (i = points.length - 1; i >= 0; --i) stream.point((point = points[i])[0], point[1]);\n        } else {\n          interpolate(current.x, current.p.x, -1, stream);\n        }\n        current = current.p;\n      }\n      current = current.o;\n      points = current.z;\n      isSubject = !isSubject;\n    } while (!current.v);\n    stream.lineEnd();\n  }\n}\n\nfunction link(array) {\n  if (!(n = array.length)) return;\n  var n,\n      i = 0,\n      a = array[0],\n      b;\n  while (++i < n) {\n    a.n = b = array[i];\n    b.p = a;\n    a = b;\n  }\n  a.n = b = array[0];\n  b.p = a;\n}\n", "import {Adder} from \"d3-array\";\nimport {cartesian, cartesianCross, cartesianNormalizeInPlace} from \"./cartesian.js\";\nimport {abs, asin, atan2, cos, epsilon, epsilon2, halfPi, pi, quarterPi, sign, sin, tau} from \"./math.js\";\n\nfunction longitude(point) {\n  return abs(point[0]) <= pi ? point[0] : sign(point[0]) * ((abs(point[0]) + pi) % tau - pi);\n}\n\nexport default function(polygon, point) {\n  var lambda = longitude(point),\n      phi = point[1],\n      sinPhi = sin(phi),\n      normal = [sin(lambda), -cos(lambda), 0],\n      angle = 0,\n      winding = 0;\n\n  var sum = new Adder();\n\n  if (sinPhi === 1) phi = halfPi + epsilon;\n  else if (sinPhi === -1) phi = -halfPi - epsilon;\n\n  for (var i = 0, n = polygon.length; i < n; ++i) {\n    if (!(m = (ring = polygon[i]).length)) continue;\n    var ring,\n        m,\n        point0 = ring[m - 1],\n        lambda0 = longitude(point0),\n        phi0 = point0[1] / 2 + quarterPi,\n        sinPhi0 = sin(phi0),\n        cosPhi0 = cos(phi0);\n\n    for (var j = 0; j < m; ++j, lambda0 = lambda1, sinPhi0 = sinPhi1, cosPhi0 = cosPhi1, point0 = point1) {\n      var point1 = ring[j],\n          lambda1 = longitude(point1),\n          phi1 = point1[1] / 2 + quarterPi,\n          sinPhi1 = sin(phi1),\n          cosPhi1 = cos(phi1),\n          delta = lambda1 - lambda0,\n          sign = delta >= 0 ? 1 : -1,\n          absDelta = sign * delta,\n          antimeridian = absDelta > pi,\n          k = sinPhi0 * sinPhi1;\n\n      sum.add(atan2(k * sign * sin(absDelta), cosPhi0 * cosPhi1 + k * cos(absDelta)));\n      angle += antimeridian ? delta + sign * tau : delta;\n\n      // Are the longitudes either side of the point\u2019s meridian (lambda),\n      // and are the latitudes smaller than the parallel (phi)?\n      if (antimeridian ^ lambda0 >= lambda ^ lambda1 >= lambda) {\n        var arc = cartesianCross(cartesian(point0), cartesian(point1));\n        cartesianNormalizeInPlace(arc);\n        var intersection = cartesianCross(normal, arc);\n        cartesianNormalizeInPlace(intersection);\n        var phiArc = (antimeridian ^ delta >= 0 ? -1 : 1) * asin(intersection[2]);\n        if (phi > phiArc || phi === phiArc && (arc[0] || arc[1])) {\n          winding += antimeridian ^ delta >= 0 ? 1 : -1;\n        }\n      }\n    }\n  }\n\n  // First, determine whether the South pole is inside or outside:\n  //\n  // It is inside if:\n  // * the polygon winds around it in a clockwise direction.\n  // * the polygon does not (cumulatively) wind around it, but has a negative\n  //   (counter-clockwise) area.\n  //\n  // Second, count the (signed) number of times a segment crosses a lambda\n  // from the point to the South pole.  If it is zero, then the point is the\n  // same side as the South pole.\n\n  return (angle < -epsilon || angle < epsilon && sum < -epsilon2) ^ (winding & 1);\n}\n", "import clipBuffer from \"./buffer.js\";\nimport clipRejoin from \"./rejoin.js\";\nimport {epsilon, halfPi} from \"../math.js\";\nimport polygonContains from \"../polygonContains.js\";\nimport {merge} from \"d3-array\";\n\nexport default function(pointVisible, clipLine, interpolate, start) {\n  return function(sink) {\n    var line = clipLine(sink),\n        ringBuffer = clipBuffer(),\n        ringSink = clipLine(ringBuffer),\n        polygonStarted = false,\n        polygon,\n        segments,\n        ring;\n\n    var clip = {\n      point: point,\n      lineStart: lineStart,\n      lineEnd: lineEnd,\n      polygonStart: function() {\n        clip.point = pointRing;\n        clip.lineStart = ringStart;\n        clip.lineEnd = ringEnd;\n        segments = [];\n        polygon = [];\n      },\n      polygonEnd: function() {\n        clip.point = point;\n        clip.lineStart = lineStart;\n        clip.lineEnd = lineEnd;\n        segments = merge(segments);\n        var startInside = polygonContains(polygon, start);\n        if (segments.length) {\n          if (!polygonStarted) sink.polygonStart(), polygonStarted = true;\n          clipRejoin(segments, compareIntersection, startInside, interpolate, sink);\n        } else if (startInside) {\n          if (!polygonStarted) sink.polygonStart(), polygonStarted = true;\n          sink.lineStart();\n          interpolate(null, null, 1, sink);\n          sink.lineEnd();\n        }\n        if (polygonStarted) sink.polygonEnd(), polygonStarted = false;\n        segments = polygon = null;\n      },\n      sphere: function() {\n        sink.polygonStart();\n        sink.lineStart();\n        interpolate(null, null, 1, sink);\n        sink.lineEnd();\n        sink.polygonEnd();\n      }\n    };\n\n    function point(lambda, phi) {\n      if (pointVisible(lambda, phi)) sink.point(lambda, phi);\n    }\n\n    function pointLine(lambda, phi) {\n      line.point(lambda, phi);\n    }\n\n    function lineStart() {\n      clip.point = pointLine;\n      line.lineStart();\n    }\n\n    function lineEnd() {\n      clip.point = point;\n      line.lineEnd();\n    }\n\n    function pointRing(lambda, phi) {\n      ring.push([lambda, phi]);\n      ringSink.point(lambda, phi);\n    }\n\n    function ringStart() {\n      ringSink.lineStart();\n      ring = [];\n    }\n\n    function ringEnd() {\n      pointRing(ring[0][0], ring[0][1]);\n      ringSink.lineEnd();\n\n      var clean = ringSink.clean(),\n          ringSegments = ringBuffer.result(),\n          i, n = ringSegments.length, m,\n          segment,\n          point;\n\n      ring.pop();\n      polygon.push(ring);\n      ring = null;\n\n      if (!n) return;\n\n      // No intersections.\n      if (clean & 1) {\n        segment = ringSegments[0];\n        if ((m = segment.length - 1) > 0) {\n          if (!polygonStarted) sink.polygonStart(), polygonStarted = true;\n          sink.lineStart();\n          for (i = 0; i < m; ++i) sink.point((point = segment[i])[0], point[1]);\n          sink.lineEnd();\n        }\n        return;\n      }\n\n      // Rejoin connected segments.\n      // TODO reuse ringBuffer.rejoin()?\n      if (n > 1 && clean & 2) ringSegments.push(ringSegments.pop().concat(ringSegments.shift()));\n\n      segments.push(ringSegments.filter(validSegment));\n    }\n\n    return clip;\n  };\n}\n\nfunction validSegment(segment) {\n  return segment.length > 1;\n}\n\n// Intersections are sorted along the clip edge. For both antimeridian cutting\n// and circle clipping, the same comparison is used.\nfunction compareIntersection(a, b) {\n  return ((a = a.x)[0] < 0 ? a[1] - halfPi - epsilon : halfPi - a[1])\n       - ((b = b.x)[0] < 0 ? b[1] - halfPi - epsilon : halfPi - b[1]);\n}\n", "import clip from \"./index.js\";\nimport {abs, atan, cos, epsilon, halfPi, pi, sin} from \"../math.js\";\n\nexport default clip(\n  function() { return true; },\n  clipAntimeridianLine,\n  clipAntimeridianInterpolate,\n  [-pi, -halfPi]\n);\n\n// Takes a line and cuts into visible segments. Return values: 0 - there were\n// intersections or the line was empty; 1 - no intersections; 2 - there were\n// intersections, and the first and last segments should be rejoined.\nfunction clipAntimeridianLine(stream) {\n  var lambda0 = NaN,\n      phi0 = NaN,\n      sign0 = NaN,\n      clean; // no intersections\n\n  return {\n    lineStart: function() {\n      stream.lineStart();\n      clean = 1;\n    },\n    point: function(lambda1, phi1) {\n      var sign1 = lambda1 > 0 ? pi : -pi,\n          delta = abs(lambda1 - lambda0);\n      if (abs(delta - pi) < epsilon) { // line crosses a pole\n        stream.point(lambda0, phi0 = (phi0 + phi1) / 2 > 0 ? halfPi : -halfPi);\n        stream.point(sign0, phi0);\n        stream.lineEnd();\n        stream.lineStart();\n        stream.point(sign1, phi0);\n        stream.point(lambda1, phi0);\n        clean = 0;\n      } else if (sign0 !== sign1 && delta >= pi) { // line crosses antimeridian\n        if (abs(lambda0 - sign0) < epsilon) lambda0 -= sign0 * epsilon; // handle degeneracies\n        if (abs(lambda1 - sign1) < epsilon) lambda1 -= sign1 * epsilon;\n        phi0 = clipAntimeridianIntersect(lambda0, phi0, lambda1, phi1);\n        stream.point(sign0, phi0);\n        stream.lineEnd();\n        stream.lineStart();\n        stream.point(sign1, phi0);\n        clean = 0;\n      }\n      stream.point(lambda0 = lambda1, phi0 = phi1);\n      sign0 = sign1;\n    },\n    lineEnd: function() {\n      stream.lineEnd();\n      lambda0 = phi0 = NaN;\n    },\n    clean: function() {\n      return 2 - clean; // if intersections, rejoin first and last segments\n    }\n  };\n}\n\nfunction clipAntimeridianIntersect(lambda0, phi0, lambda1, phi1) {\n  var cosPhi0,\n      cosPhi1,\n      sinLambda0Lambda1 = sin(lambda0 - lambda1);\n  return abs(sinLambda0Lambda1) > epsilon\n      ? atan((sin(phi0) * (cosPhi1 = cos(phi1)) * sin(lambda1)\n          - sin(phi1) * (cosPhi0 = cos(phi0)) * sin(lambda0))\n          / (cosPhi0 * cosPhi1 * sinLambda0Lambda1))\n      : (phi0 + phi1) / 2;\n}\n\nfunction clipAntimeridianInterpolate(from, to, direction, stream) {\n  var phi;\n  if (from == null) {\n    phi = direction * halfPi;\n    stream.point(-pi, phi);\n    stream.point(0, phi);\n    stream.point(pi, phi);\n    stream.point(pi, 0);\n    stream.point(pi, -phi);\n    stream.point(0, -phi);\n    stream.point(-pi, -phi);\n    stream.point(-pi, 0);\n    stream.point(-pi, phi);\n  } else if (abs(from[0] - to[0]) > epsilon) {\n    var lambda = from[0] < to[0] ? pi : -pi;\n    phi = direction * lambda / 2;\n    stream.point(-lambda, phi);\n    stream.point(0, phi);\n    stream.point(lambda, phi);\n  } else {\n    stream.point(to[0], to[1]);\n  }\n}\n", "import {cartesian, cartesianAddInPlace, cartesianCross, cartesianDot, cartesianScale, spherical} from \"../cartesian.js\";\nimport {circleStream} from \"../circle.js\";\nimport {abs, cos, epsilon, pi, radians, sqrt} from \"../math.js\";\nimport pointEqual from \"../pointEqual.js\";\nimport clip from \"./index.js\";\n\nexport default function(radius) {\n  var cr = cos(radius),\n      delta = 6 * radians,\n      smallRadius = cr > 0,\n      notHemisphere = abs(cr) > epsilon; // TODO optimise for this common case\n\n  function interpolate(from, to, direction, stream) {\n    circleStream(stream, radius, delta, direction, from, to);\n  }\n\n  function visible(lambda, phi) {\n    return cos(lambda) * cos(phi) > cr;\n  }\n\n  // Takes a line and cuts into visible segments. Return values used for polygon\n  // clipping: 0 - there were intersections or the line was empty; 1 - no\n  // intersections 2 - there were intersections, and the first and last segments\n  // should be rejoined.\n  function clipLine(stream) {\n    var point0, // previous point\n        c0, // code for previous point\n        v0, // visibility of previous point\n        v00, // visibility of first point\n        clean; // no intersections\n    return {\n      lineStart: function() {\n        v00 = v0 = false;\n        clean = 1;\n      },\n      point: function(lambda, phi) {\n        var point1 = [lambda, phi],\n            point2,\n            v = visible(lambda, phi),\n            c = smallRadius\n              ? v ? 0 : code(lambda, phi)\n              : v ? code(lambda + (lambda < 0 ? pi : -pi), phi) : 0;\n        if (!point0 && (v00 = v0 = v)) stream.lineStart();\n        if (v !== v0) {\n          point2 = intersect(point0, point1);\n          if (!point2 || pointEqual(point0, point2) || pointEqual(point1, point2))\n            point1[2] = 1;\n        }\n        if (v !== v0) {\n          clean = 0;\n          if (v) {\n            // outside going in\n            stream.lineStart();\n            point2 = intersect(point1, point0);\n            stream.point(point2[0], point2[1]);\n          } else {\n            // inside going out\n            point2 = intersect(point0, point1);\n            stream.point(point2[0], point2[1], 2);\n            stream.lineEnd();\n          }\n          point0 = point2;\n        } else if (notHemisphere && point0 && smallRadius ^ v) {\n          var t;\n          // If the codes for two points are different, or are both zero,\n          // and there this segment intersects with the small circle.\n          if (!(c & c0) && (t = intersect(point1, point0, true))) {\n            clean = 0;\n            if (smallRadius) {\n              stream.lineStart();\n              stream.point(t[0][0], t[0][1]);\n              stream.point(t[1][0], t[1][1]);\n              stream.lineEnd();\n            } else {\n              stream.point(t[1][0], t[1][1]);\n              stream.lineEnd();\n              stream.lineStart();\n              stream.point(t[0][0], t[0][1], 3);\n            }\n          }\n        }\n        if (v && (!point0 || !pointEqual(point0, point1))) {\n          stream.point(point1[0], point1[1]);\n        }\n        point0 = point1, v0 = v, c0 = c;\n      },\n      lineEnd: function() {\n        if (v0) stream.lineEnd();\n        point0 = null;\n      },\n      // Rejoin first and last segments if there were intersections and the first\n      // and last points were visible.\n      clean: function() {\n        return clean | ((v00 && v0) << 1);\n      }\n    };\n  }\n\n  // Intersects the great circle between a and b with the clip circle.\n  function intersect(a, b, two) {\n    var pa = cartesian(a),\n        pb = cartesian(b);\n\n    // We have two planes, n1.p = d1 and n2.p = d2.\n    // Find intersection line p(t) = c1 n1 + c2 n2 + t (n1 \u2A2F n2).\n    var n1 = [1, 0, 0], // normal\n        n2 = cartesianCross(pa, pb),\n        n2n2 = cartesianDot(n2, n2),\n        n1n2 = n2[0], // cartesianDot(n1, n2),\n        determinant = n2n2 - n1n2 * n1n2;\n\n    // Two polar points.\n    if (!determinant) return !two && a;\n\n    var c1 =  cr * n2n2 / determinant,\n        c2 = -cr * n1n2 / determinant,\n        n1xn2 = cartesianCross(n1, n2),\n        A = cartesianScale(n1, c1),\n        B = cartesianScale(n2, c2);\n    cartesianAddInPlace(A, B);\n\n    // Solve |p(t)|^2 = 1.\n    var u = n1xn2,\n        w = cartesianDot(A, u),\n        uu = cartesianDot(u, u),\n        t2 = w * w - uu * (cartesianDot(A, A) - 1);\n\n    if (t2 < 0) return;\n\n    var t = sqrt(t2),\n        q = cartesianScale(u, (-w - t) / uu);\n    cartesianAddInPlace(q, A);\n    q = spherical(q);\n\n    if (!two) return q;\n\n    // Two intersection points.\n    var lambda0 = a[0],\n        lambda1 = b[0],\n        phi0 = a[1],\n        phi1 = b[1],\n        z;\n\n    if (lambda1 < lambda0) z = lambda0, lambda0 = lambda1, lambda1 = z;\n\n    var delta = lambda1 - lambda0,\n        polar = abs(delta - pi) < epsilon,\n        meridian = polar || delta < epsilon;\n\n    if (!polar && phi1 < phi0) z = phi0, phi0 = phi1, phi1 = z;\n\n    // Check that the first point is between a and b.\n    if (meridian\n        ? polar\n          ? phi0 + phi1 > 0 ^ q[1] < (abs(q[0] - lambda0) < epsilon ? phi0 : phi1)\n          : phi0 <= q[1] && q[1] <= phi1\n        : delta > pi ^ (lambda0 <= q[0] && q[0] <= lambda1)) {\n      var q1 = cartesianScale(u, (-w + t) / uu);\n      cartesianAddInPlace(q1, A);\n      return [q, spherical(q1)];\n    }\n  }\n\n  // Generates a 4-bit vector representing the location of a point relative to\n  // the small circle's bounding box.\n  function code(lambda, phi) {\n    var r = smallRadius ? radius : pi - radius,\n        code = 0;\n    if (lambda < -r) code |= 1; // left\n    else if (lambda > r) code |= 2; // right\n    if (phi < -r) code |= 4; // below\n    else if (phi > r) code |= 8; // above\n    return code;\n  }\n\n  return clip(visible, clipLine, interpolate, smallRadius ? [0, -radius] : [-pi, radius - pi]);\n}\n", "export default function(a, b, x0, y0, x1, y1) {\n  var ax = a[0],\n      ay = a[1],\n      bx = b[0],\n      by = b[1],\n      t0 = 0,\n      t1 = 1,\n      dx = bx - ax,\n      dy = by - ay,\n      r;\n\n  r = x0 - ax;\n  if (!dx && r > 0) return;\n  r /= dx;\n  if (dx < 0) {\n    if (r < t0) return;\n    if (r < t1) t1 = r;\n  } else if (dx > 0) {\n    if (r > t1) return;\n    if (r > t0) t0 = r;\n  }\n\n  r = x1 - ax;\n  if (!dx && r < 0) return;\n  r /= dx;\n  if (dx < 0) {\n    if (r > t1) return;\n    if (r > t0) t0 = r;\n  } else if (dx > 0) {\n    if (r < t0) return;\n    if (r < t1) t1 = r;\n  }\n\n  r = y0 - ay;\n  if (!dy && r > 0) return;\n  r /= dy;\n  if (dy < 0) {\n    if (r < t0) return;\n    if (r < t1) t1 = r;\n  } else if (dy > 0) {\n    if (r > t1) return;\n    if (r > t0) t0 = r;\n  }\n\n  r = y1 - ay;\n  if (!dy && r < 0) return;\n  r /= dy;\n  if (dy < 0) {\n    if (r > t1) return;\n    if (r > t0) t0 = r;\n  } else if (dy > 0) {\n    if (r < t0) return;\n    if (r < t1) t1 = r;\n  }\n\n  if (t0 > 0) a[0] = ax + t0 * dx, a[1] = ay + t0 * dy;\n  if (t1 < 1) b[0] = ax + t1 * dx, b[1] = ay + t1 * dy;\n  return true;\n}\n", "import {abs, epsilon} from \"../math.js\";\nimport clipBuffer from \"./buffer.js\";\nimport clipLine from \"./line.js\";\nimport clipRejoin from \"./rejoin.js\";\nimport {merge} from \"d3-array\";\n\nvar clipMax = 1e9, clipMin = -clipMax;\n\n// TODO Use d3-polygon\u2019s polygonContains here for the ring check?\n// TODO Eliminate duplicate buffering in clipBuffer and polygon.push?\n\nexport default function clipRectangle(x0, y0, x1, y1) {\n\n  function visible(x, y) {\n    return x0 <= x && x <= x1 && y0 <= y && y <= y1;\n  }\n\n  function interpolate(from, to, direction, stream) {\n    var a = 0, a1 = 0;\n    if (from == null\n        || (a = corner(from, direction)) !== (a1 = corner(to, direction))\n        || comparePoint(from, to) < 0 ^ direction > 0) {\n      do stream.point(a === 0 || a === 3 ? x0 : x1, a > 1 ? y1 : y0);\n      while ((a = (a + direction + 4) % 4) !== a1);\n    } else {\n      stream.point(to[0], to[1]);\n    }\n  }\n\n  function corner(p, direction) {\n    return abs(p[0] - x0) < epsilon ? direction > 0 ? 0 : 3\n        : abs(p[0] - x1) < epsilon ? direction > 0 ? 2 : 1\n        : abs(p[1] - y0) < epsilon ? direction > 0 ? 1 : 0\n        : direction > 0 ? 3 : 2; // abs(p[1] - y1) < epsilon\n  }\n\n  function compareIntersection(a, b) {\n    return comparePoint(a.x, b.x);\n  }\n\n  function comparePoint(a, b) {\n    var ca = corner(a, 1),\n        cb = corner(b, 1);\n    return ca !== cb ? ca - cb\n        : ca === 0 ? b[1] - a[1]\n        : ca === 1 ? a[0] - b[0]\n        : ca === 2 ? a[1] - b[1]\n        : b[0] - a[0];\n  }\n\n  return function(stream) {\n    var activeStream = stream,\n        bufferStream = clipBuffer(),\n        segments,\n        polygon,\n        ring,\n        x__, y__, v__, // first point\n        x_, y_, v_, // previous point\n        first,\n        clean;\n\n    var clipStream = {\n      point: point,\n      lineStart: lineStart,\n      lineEnd: lineEnd,\n      polygonStart: polygonStart,\n      polygonEnd: polygonEnd\n    };\n\n    function point(x, y) {\n      if (visible(x, y)) activeStream.point(x, y);\n    }\n\n    function polygonInside() {\n      var winding = 0;\n\n      for (var i = 0, n = polygon.length; i < n; ++i) {\n        for (var ring = polygon[i], j = 1, m = ring.length, point = ring[0], a0, a1, b0 = point[0], b1 = point[1]; j < m; ++j) {\n          a0 = b0, a1 = b1, point = ring[j], b0 = point[0], b1 = point[1];\n          if (a1 <= y1) { if (b1 > y1 && (b0 - a0) * (y1 - a1) > (b1 - a1) * (x0 - a0)) ++winding; }\n          else { if (b1 <= y1 && (b0 - a0) * (y1 - a1) < (b1 - a1) * (x0 - a0)) --winding; }\n        }\n      }\n\n      return winding;\n    }\n\n    // Buffer geometry within a polygon and then clip it en masse.\n    function polygonStart() {\n      activeStream = bufferStream, segments = [], polygon = [], clean = true;\n    }\n\n    function polygonEnd() {\n      var startInside = polygonInside(),\n          cleanInside = clean && startInside,\n          visible = (segments = merge(segments)).length;\n      if (cleanInside || visible) {\n        stream.polygonStart();\n        if (cleanInside) {\n          stream.lineStart();\n          interpolate(null, null, 1, stream);\n          stream.lineEnd();\n        }\n        if (visible) {\n          clipRejoin(segments, compareIntersection, startInside, interpolate, stream);\n        }\n        stream.polygonEnd();\n      }\n      activeStream = stream, segments = polygon = ring = null;\n    }\n\n    function lineStart() {\n      clipStream.point = linePoint;\n      if (polygon) polygon.push(ring = []);\n      first = true;\n      v_ = false;\n      x_ = y_ = NaN;\n    }\n\n    // TODO rather than special-case polygons, simply handle them separately.\n    // Ideally, coincident intersection points should be jittered to avoid\n    // clipping issues.\n    function lineEnd() {\n      if (segments) {\n        linePoint(x__, y__);\n        if (v__ && v_) bufferStream.rejoin();\n        segments.push(bufferStream.result());\n      }\n      clipStream.point = point;\n      if (v_) activeStream.lineEnd();\n    }\n\n    function linePoint(x, y) {\n      var v = visible(x, y);\n      if (polygon) ring.push([x, y]);\n      if (first) {\n        x__ = x, y__ = y, v__ = v;\n        first = false;\n        if (v) {\n          activeStream.lineStart();\n          activeStream.point(x, y);\n        }\n      } else {\n        if (v && v_) activeStream.point(x, y);\n        else {\n          var a = [x_ = Math.max(clipMin, Math.min(clipMax, x_)), y_ = Math.max(clipMin, Math.min(clipMax, y_))],\n              b = [x = Math.max(clipMin, Math.min(clipMax, x)), y = Math.max(clipMin, Math.min(clipMax, y))];\n          if (clipLine(a, b, x0, y0, x1, y1)) {\n            if (!v_) {\n              activeStream.lineStart();\n              activeStream.point(a[0], a[1]);\n            }\n            activeStream.point(b[0], b[1]);\n            if (!v) activeStream.lineEnd();\n            clean = false;\n          } else if (v) {\n            activeStream.lineStart();\n            activeStream.point(x, y);\n            clean = false;\n          }\n        }\n      }\n      x_ = x, y_ = y, v_ = v;\n    }\n\n    return clipStream;\n  };\n}\n", "export default x => x;\n", "import {Adder} from \"d3-array\";\nimport {abs} from \"../math.js\";\nimport noop from \"../noop.js\";\n\nvar areaSum = new Adder(),\n    areaRingSum = new Adder(),\n    x00,\n    y00,\n    x0,\n    y0;\n\nvar areaStream = {\n  point: noop,\n  lineStart: noop,\n  lineEnd: noop,\n  polygonStart: function() {\n    areaStream.lineStart = areaRingStart;\n    areaStream.lineEnd = areaRingEnd;\n  },\n  polygonEnd: function() {\n    areaStream.lineStart = areaStream.lineEnd = areaStream.point = noop;\n    areaSum.add(abs(areaRingSum));\n    areaRingSum = new Adder();\n  },\n  result: function() {\n    var area = areaSum / 2;\n    areaSum = new Adder();\n    return area;\n  }\n};\n\nfunction areaRingStart() {\n  areaStream.point = areaPointFirst;\n}\n\nfunction areaPointFirst(x, y) {\n  areaStream.point = areaPoint;\n  x00 = x0 = x, y00 = y0 = y;\n}\n\nfunction areaPoint(x, y) {\n  areaRingSum.add(y0 * x - x0 * y);\n  x0 = x, y0 = y;\n}\n\nfunction areaRingEnd() {\n  areaPoint(x00, y00);\n}\n\nexport default areaStream;\n", "import noop from \"../noop.js\";\n\nvar x0 = Infinity,\n    y0 = x0,\n    x1 = -x0,\n    y1 = x1;\n\nvar boundsStream = {\n  point: boundsPoint,\n  lineStart: noop,\n  lineEnd: noop,\n  polygonStart: noop,\n  polygonEnd: noop,\n  result: function() {\n    var bounds = [[x0, y0], [x1, y1]];\n    x1 = y1 = -(y0 = x0 = Infinity);\n    return bounds;\n  }\n};\n\nfunction boundsPoint(x, y) {\n  if (x < x0) x0 = x;\n  if (x > x1) x1 = x;\n  if (y < y0) y0 = y;\n  if (y > y1) y1 = y;\n}\n\nexport default boundsStream;\n", "import {sqrt} from \"../math.js\";\n\n// TODO Enforce positive area for exterior, negative area for interior?\n\nvar X0 = 0,\n    Y0 = 0,\n    Z0 = 0,\n    X1 = 0,\n    Y1 = 0,\n    Z1 = 0,\n    X2 = 0,\n    Y2 = 0,\n    Z2 = 0,\n    x00,\n    y00,\n    x0,\n    y0;\n\nvar centroidStream = {\n  point: centroidPoint,\n  lineStart: centroidLineStart,\n  lineEnd: centroidLineEnd,\n  polygonStart: function() {\n    centroidStream.lineStart = centroidRingStart;\n    centroidStream.lineEnd = centroidRingEnd;\n  },\n  polygonEnd: function() {\n    centroidStream.point = centroidPoint;\n    centroidStream.lineStart = centroidLineStart;\n    centroidStream.lineEnd = centroidLineEnd;\n  },\n  result: function() {\n    var centroid = Z2 ? [X2 / Z2, Y2 / Z2]\n        : Z1 ? [X1 / Z1, Y1 / Z1]\n        : Z0 ? [X0 / Z0, Y0 / Z0]\n        : [NaN, NaN];\n    X0 = Y0 = Z0 =\n    X1 = Y1 = Z1 =\n    X2 = Y2 = Z2 = 0;\n    return centroid;\n  }\n};\n\nfunction centroidPoint(x, y) {\n  X0 += x;\n  Y0 += y;\n  ++Z0;\n}\n\nfunction centroidLineStart() {\n  centroidStream.point = centroidPointFirstLine;\n}\n\nfunction centroidPointFirstLine(x, y) {\n  centroidStream.point = centroidPointLine;\n  centroidPoint(x0 = x, y0 = y);\n}\n\nfunction centroidPointLine(x, y) {\n  var dx = x - x0, dy = y - y0, z = sqrt(dx * dx + dy * dy);\n  X1 += z * (x0 + x) / 2;\n  Y1 += z * (y0 + y) / 2;\n  Z1 += z;\n  centroidPoint(x0 = x, y0 = y);\n}\n\nfunction centroidLineEnd() {\n  centroidStream.point = centroidPoint;\n}\n\nfunction centroidRingStart() {\n  centroidStream.point = centroidPointFirstRing;\n}\n\nfunction centroidRingEnd() {\n  centroidPointRing(x00, y00);\n}\n\nfunction centroidPointFirstRing(x, y) {\n  centroidStream.point = centroidPointRing;\n  centroidPoint(x00 = x0 = x, y00 = y0 = y);\n}\n\nfunction centroidPointRing(x, y) {\n  var dx = x - x0,\n      dy = y - y0,\n      z = sqrt(dx * dx + dy * dy);\n\n  X1 += z * (x0 + x) / 2;\n  Y1 += z * (y0 + y) / 2;\n  Z1 += z;\n\n  z = y0 * x - x0 * y;\n  X2 += z * (x0 + x);\n  Y2 += z * (y0 + y);\n  Z2 += z * 3;\n  centroidPoint(x0 = x, y0 = y);\n}\n\nexport default centroidStream;\n", "import {tau} from \"../math.js\";\nimport noop from \"../noop.js\";\n\nexport default function PathContext(context) {\n  this._context = context;\n}\n\nPathContext.prototype = {\n  _radius: 4.5,\n  pointRadius: function(_) {\n    return this._radius = _, this;\n  },\n  polygonStart: function() {\n    this._line = 0;\n  },\n  polygonEnd: function() {\n    this._line = NaN;\n  },\n  lineStart: function() {\n    this._point = 0;\n  },\n  lineEnd: function() {\n    if (this._line === 0) this._context.closePath();\n    this._point = NaN;\n  },\n  point: function(x, y) {\n    switch (this._point) {\n      case 0: {\n        this._context.moveTo(x, y);\n        this._point = 1;\n        break;\n      }\n      case 1: {\n        this._context.lineTo(x, y);\n        break;\n      }\n      default: {\n        this._context.moveTo(x + this._radius, y);\n        this._context.arc(x, y, this._radius, 0, tau);\n        break;\n      }\n    }\n  },\n  result: noop\n};\n", "import {Adder} from \"d3-array\";\nimport {sqrt} from \"../math.js\";\nimport noop from \"../noop.js\";\n\nvar lengthSum = new Adder(),\n    lengthRing,\n    x00,\n    y00,\n    x0,\n    y0;\n\nvar lengthStream = {\n  point: noop,\n  lineStart: function() {\n    lengthStream.point = lengthPointFirst;\n  },\n  lineEnd: function() {\n    if (lengthRing) lengthPoint(x00, y00);\n    lengthStream.point = noop;\n  },\n  polygonStart: function() {\n    lengthRing = true;\n  },\n  polygonEnd: function() {\n    lengthRing = null;\n  },\n  result: function() {\n    var length = +lengthSum;\n    lengthSum = new Adder();\n    return length;\n  }\n};\n\nfunction lengthPointFirst(x, y) {\n  lengthStream.point = lengthPoint;\n  x00 = x0 = x, y00 = y0 = y;\n}\n\nfunction lengthPoint(x, y) {\n  x0 -= x, y0 -= y;\n  lengthSum.add(sqrt(x0 * x0 + y0 * y0));\n  x0 = x, y0 = y;\n}\n\nexport default lengthStream;\n", "// Simple caching for constant-radius points.\nlet cacheDigits, cacheAppend, cacheRadius, cacheCircle;\n\nexport default class PathString {\n  constructor(digits) {\n    this._append = digits == null ? append : appendRound(digits);\n    this._radius = 4.5;\n    this._ = \"\";\n  }\n  pointRadius(_) {\n    this._radius = +_;\n    return this;\n  }\n  polygonStart() {\n    this._line = 0;\n  }\n  polygonEnd() {\n    this._line = NaN;\n  }\n  lineStart() {\n    this._point = 0;\n  }\n  lineEnd() {\n    if (this._line === 0) this._ += \"Z\";\n    this._point = NaN;\n  }\n  point(x, y) {\n    switch (this._point) {\n      case 0: {\n        this._append`M${x},${y}`;\n        this._point = 1;\n        break;\n      }\n      case 1: {\n        this._append`L${x},${y}`;\n        break;\n      }\n      default: {\n        this._append`M${x},${y}`;\n        if (this._radius !== cacheRadius || this._append !== cacheAppend) {\n          const r = this._radius;\n          const s = this._;\n          this._ = \"\"; // stash the old string so we can cache the circle path fragment\n          this._append`m0,${r}a${r},${r} 0 1,1 0,${-2 * r}a${r},${r} 0 1,1 0,${2 * r}z`;\n          cacheRadius = r;\n          cacheAppend = this._append;\n          cacheCircle = this._;\n          this._ = s;\n        }\n        this._ += cacheCircle;\n        break;\n      }\n    }\n  }\n  result() {\n    const result = this._;\n    this._ = \"\";\n    return result.length ? result : null;\n  }\n}\n\nfunction append(strings) {\n  let i = 1;\n  this._ += strings[0];\n  for (const j = strings.length; i < j; ++i) {\n    this._ += arguments[i] + strings[i];\n  }\n}\n\nfunction appendRound(digits) {\n  const d = Math.floor(digits);\n  if (!(d >= 0)) throw new RangeError(`invalid digits: ${digits}`);\n  if (d > 15) return append;\n  if (d !== cacheDigits) {\n    const k = 10 ** d;\n    cacheDigits = d;\n    cacheAppend = function append(strings) {\n      let i = 1;\n      this._ += strings[0];\n      for (const j = strings.length; i < j; ++i) {\n        this._ += Math.round(arguments[i] * k) / k + strings[i];\n      }\n    };\n  }\n  return cacheAppend;\n}\n", "import identity from \"../identity.js\";\nimport stream from \"../stream.js\";\nimport pathArea from \"./area.js\";\nimport pathBounds from \"./bounds.js\";\nimport pathCentroid from \"./centroid.js\";\nimport PathContext from \"./context.js\";\nimport pathMeasure from \"./measure.js\";\nimport PathString from \"./string.js\";\n\nexport default function(projection, context) {\n  let digits = 3,\n      pointRadius = 4.5,\n      projectionStream,\n      contextStream;\n\n  function path(object) {\n    if (object) {\n      if (typeof pointRadius === \"function\") contextStream.pointRadius(+pointRadius.apply(this, arguments));\n      stream(object, projectionStream(contextStream));\n    }\n    return contextStream.result();\n  }\n\n  path.area = function(object) {\n    stream(object, projectionStream(pathArea));\n    return pathArea.result();\n  };\n\n  path.measure = function(object) {\n    stream(object, projectionStream(pathMeasure));\n    return pathMeasure.result();\n  };\n\n  path.bounds = function(object) {\n    stream(object, projectionStream(pathBounds));\n    return pathBounds.result();\n  };\n\n  path.centroid = function(object) {\n    stream(object, projectionStream(pathCentroid));\n    return pathCentroid.result();\n  };\n\n  path.projection = function(_) {\n    if (!arguments.length) return projection;\n    projectionStream = _ == null ? (projection = null, identity) : (projection = _).stream;\n    return path;\n  };\n\n  path.context = function(_) {\n    if (!arguments.length) return context;\n    contextStream = _ == null ? (context = null, new PathString(digits)) : new PathContext(context = _);\n    if (typeof pointRadius !== \"function\") contextStream.pointRadius(pointRadius);\n    return path;\n  };\n\n  path.pointRadius = function(_) {\n    if (!arguments.length) return pointRadius;\n    pointRadius = typeof _ === \"function\" ? _ : (contextStream.pointRadius(+_), +_);\n    return path;\n  };\n\n  path.digits = function(_) {\n    if (!arguments.length) return digits;\n    if (_ == null) digits = null;\n    else {\n      const d = Math.floor(_);\n      if (!(d >= 0)) throw new RangeError(`invalid digits: ${_}`);\n      digits = d;\n    }\n    if (context === null) contextStream = new PathString(digits);\n    return path;\n  };\n\n  return path.projection(projection).digits(digits).context(context);\n}\n", "export default function(methods) {\n  return {\n    stream: transformer(methods)\n  };\n}\n\nexport function transformer(methods) {\n  return function(stream) {\n    var s = new TransformStream;\n    for (var key in methods) s[key] = methods[key];\n    s.stream = stream;\n    return s;\n  };\n}\n\nfunction TransformStream() {}\n\nTransformStream.prototype = {\n  constructor: TransformStream,\n  point: function(x, y) { this.stream.point(x, y); },\n  sphere: function() { this.stream.sphere(); },\n  lineStart: function() { this.stream.lineStart(); },\n  lineEnd: function() { this.stream.lineEnd(); },\n  polygonStart: function() { this.stream.polygonStart(); },\n  polygonEnd: function() { this.stream.polygonEnd(); }\n};\n", "import {default as geoStream} from \"../stream.js\";\nimport boundsStream from \"../path/bounds.js\";\n\nfunction fit(projection, fitBounds, object) {\n  var clip = projection.clipExtent && projection.clipExtent();\n  projection.scale(150).translate([0, 0]);\n  if (clip != null) projection.clipExtent(null);\n  geoStream(object, projection.stream(boundsStream));\n  fitBounds(boundsStream.result());\n  if (clip != null) projection.clipExtent(clip);\n  return projection;\n}\n\nexport function fitExtent(projection, extent, object) {\n  return fit(projection, function(b) {\n    var w = extent[1][0] - extent[0][0],\n        h = extent[1][1] - extent[0][1],\n        k = Math.min(w / (b[1][0] - b[0][0]), h / (b[1][1] - b[0][1])),\n        x = +extent[0][0] + (w - k * (b[1][0] + b[0][0])) / 2,\n        y = +extent[0][1] + (h - k * (b[1][1] + b[0][1])) / 2;\n    projection.scale(150 * k).translate([x, y]);\n  }, object);\n}\n\nexport function fitSize(projection, size, object) {\n  return fitExtent(projection, [[0, 0], size], object);\n}\n\nexport function fitWidth(projection, width, object) {\n  return fit(projection, function(b) {\n    var w = +width,\n        k = w / (b[1][0] - b[0][0]),\n        x = (w - k * (b[1][0] + b[0][0])) / 2,\n        y = -k * b[0][1];\n    projection.scale(150 * k).translate([x, y]);\n  }, object);\n}\n\nexport function fitHeight(projection, height, object) {\n  return fit(projection, function(b) {\n    var h = +height,\n        k = h / (b[1][1] - b[0][1]),\n        x = -k * b[0][0],\n        y = (h - k * (b[1][1] + b[0][1])) / 2;\n    projection.scale(150 * k).translate([x, y]);\n  }, object);\n}\n", "import {cartesian} from \"../cartesian.js\";\nimport {abs, asin, atan2, cos, epsilon, radians, sqrt} from \"../math.js\";\nimport {transformer} from \"../transform.js\";\n\nvar maxDepth = 16, // maximum depth of subdivision\n    cosMinDistance = cos(30 * radians); // cos(minimum angular distance)\n\nexport default function(project, delta2) {\n  return +delta2 ? resample(project, delta2) : resampleNone(project);\n}\n\nfunction resampleNone(project) {\n  return transformer({\n    point: function(x, y) {\n      x = project(x, y);\n      this.stream.point(x[0], x[1]);\n    }\n  });\n}\n\nfunction resample(project, delta2) {\n\n  function resampleLineTo(x0, y0, lambda0, a0, b0, c0, x1, y1, lambda1, a1, b1, c1, depth, stream) {\n    var dx = x1 - x0,\n        dy = y1 - y0,\n        d2 = dx * dx + dy * dy;\n    if (d2 > 4 * delta2 && depth--) {\n      var a = a0 + a1,\n          b = b0 + b1,\n          c = c0 + c1,\n          m = sqrt(a * a + b * b + c * c),\n          phi2 = asin(c /= m),\n          lambda2 = abs(abs(c) - 1) < epsilon || abs(lambda0 - lambda1) < epsilon ? (lambda0 + lambda1) / 2 : atan2(b, a),\n          p = project(lambda2, phi2),\n          x2 = p[0],\n          y2 = p[1],\n          dx2 = x2 - x0,\n          dy2 = y2 - y0,\n          dz = dy * dx2 - dx * dy2;\n      if (dz * dz / d2 > delta2 // perpendicular projected distance\n          || abs((dx * dx2 + dy * dy2) / d2 - 0.5) > 0.3 // midpoint close to an end\n          || a0 * a1 + b0 * b1 + c0 * c1 < cosMinDistance) { // angular distance\n        resampleLineTo(x0, y0, lambda0, a0, b0, c0, x2, y2, lambda2, a /= m, b /= m, c, depth, stream);\n        stream.point(x2, y2);\n        resampleLineTo(x2, y2, lambda2, a, b, c, x1, y1, lambda1, a1, b1, c1, depth, stream);\n      }\n    }\n  }\n  return function(stream) {\n    var lambda00, x00, y00, a00, b00, c00, // first point\n        lambda0, x0, y0, a0, b0, c0; // previous point\n\n    var resampleStream = {\n      point: point,\n      lineStart: lineStart,\n      lineEnd: lineEnd,\n      polygonStart: function() { stream.polygonStart(); resampleStream.lineStart = ringStart; },\n      polygonEnd: function() { stream.polygonEnd(); resampleStream.lineStart = lineStart; }\n    };\n\n    function point(x, y) {\n      x = project(x, y);\n      stream.point(x[0], x[1]);\n    }\n\n    function lineStart() {\n      x0 = NaN;\n      resampleStream.point = linePoint;\n      stream.lineStart();\n    }\n\n    function linePoint(lambda, phi) {\n      var c = cartesian([lambda, phi]), p = project(lambda, phi);\n      resampleLineTo(x0, y0, lambda0, a0, b0, c0, x0 = p[0], y0 = p[1], lambda0 = lambda, a0 = c[0], b0 = c[1], c0 = c[2], maxDepth, stream);\n      stream.point(x0, y0);\n    }\n\n    function lineEnd() {\n      resampleStream.point = point;\n      stream.lineEnd();\n    }\n\n    function ringStart() {\n      lineStart();\n      resampleStream.point = ringPoint;\n      resampleStream.lineEnd = ringEnd;\n    }\n\n    function ringPoint(lambda, phi) {\n      linePoint(lambda00 = lambda, phi), x00 = x0, y00 = y0, a00 = a0, b00 = b0, c00 = c0;\n      resampleStream.point = linePoint;\n    }\n\n    function ringEnd() {\n      resampleLineTo(x0, y0, lambda0, a0, b0, c0, x00, y00, lambda00, a00, b00, c00, maxDepth, stream);\n      resampleStream.lineEnd = lineEnd;\n      lineEnd();\n    }\n\n    return resampleStream;\n  };\n}\n", "import clipAntimeridian from \"../clip/antimeridian.js\";\nimport clipCircle from \"../clip/circle.js\";\nimport clipRectangle from \"../clip/rectangle.js\";\nimport compose from \"../compose.js\";\nimport identity from \"../identity.js\";\nimport {cos, degrees, radians, sin, sqrt} from \"../math.js\";\nimport {rotateRadians} from \"../rotation.js\";\nimport {transformer} from \"../transform.js\";\nimport {fitExtent, fitSize, fitWidth, fitHeight} from \"./fit.js\";\nimport resample from \"./resample.js\";\n\nvar transformRadians = transformer({\n  point: function(x, y) {\n    this.stream.point(x * radians, y * radians);\n  }\n});\n\nfunction transformRotate(rotate) {\n  return transformer({\n    point: function(x, y) {\n      var r = rotate(x, y);\n      return this.stream.point(r[0], r[1]);\n    }\n  });\n}\n\nfunction scaleTranslate(k, dx, dy, sx, sy) {\n  function transform(x, y) {\n    x *= sx; y *= sy;\n    return [dx + k * x, dy - k * y];\n  }\n  transform.invert = function(x, y) {\n    return [(x - dx) / k * sx, (dy - y) / k * sy];\n  };\n  return transform;\n}\n\nfunction scaleTranslateRotate(k, dx, dy, sx, sy, alpha) {\n  if (!alpha) return scaleTranslate(k, dx, dy, sx, sy);\n  var cosAlpha = cos(alpha),\n      sinAlpha = sin(alpha),\n      a = cosAlpha * k,\n      b = sinAlpha * k,\n      ai = cosAlpha / k,\n      bi = sinAlpha / k,\n      ci = (sinAlpha * dy - cosAlpha * dx) / k,\n      fi = (sinAlpha * dx + cosAlpha * dy) / k;\n  function transform(x, y) {\n    x *= sx; y *= sy;\n    return [a * x - b * y + dx, dy - b * x - a * y];\n  }\n  transform.invert = function(x, y) {\n    return [sx * (ai * x - bi * y + ci), sy * (fi - bi * x - ai * y)];\n  };\n  return transform;\n}\n\nexport default function projection(project) {\n  return projectionMutator(function() { return project; })();\n}\n\nexport function projectionMutator(projectAt) {\n  var project,\n      k = 150, // scale\n      x = 480, y = 250, // translate\n      lambda = 0, phi = 0, // center\n      deltaLambda = 0, deltaPhi = 0, deltaGamma = 0, rotate, // pre-rotate\n      alpha = 0, // post-rotate angle\n      sx = 1, // reflectX\n      sy = 1, // reflectX\n      theta = null, preclip = clipAntimeridian, // pre-clip angle\n      x0 = null, y0, x1, y1, postclip = identity, // post-clip extent\n      delta2 = 0.5, // precision\n      projectResample,\n      projectTransform,\n      projectRotateTransform,\n      cache,\n      cacheStream;\n\n  function projection(point) {\n    return projectRotateTransform(point[0] * radians, point[1] * radians);\n  }\n\n  function invert(point) {\n    point = projectRotateTransform.invert(point[0], point[1]);\n    return point && [point[0] * degrees, point[1] * degrees];\n  }\n\n  projection.stream = function(stream) {\n    return cache && cacheStream === stream ? cache : cache = transformRadians(transformRotate(rotate)(preclip(projectResample(postclip(cacheStream = stream)))));\n  };\n\n  projection.preclip = function(_) {\n    return arguments.length ? (preclip = _, theta = undefined, reset()) : preclip;\n  };\n\n  projection.postclip = function(_) {\n    return arguments.length ? (postclip = _, x0 = y0 = x1 = y1 = null, reset()) : postclip;\n  };\n\n  projection.clipAngle = function(_) {\n    return arguments.length ? (preclip = +_ ? clipCircle(theta = _ * radians) : (theta = null, clipAntimeridian), reset()) : theta * degrees;\n  };\n\n  projection.clipExtent = function(_) {\n    return arguments.length ? (postclip = _ == null ? (x0 = y0 = x1 = y1 = null, identity) : clipRectangle(x0 = +_[0][0], y0 = +_[0][1], x1 = +_[1][0], y1 = +_[1][1]), reset()) : x0 == null ? null : [[x0, y0], [x1, y1]];\n  };\n\n  projection.scale = function(_) {\n    return arguments.length ? (k = +_, recenter()) : k;\n  };\n\n  projection.translate = function(_) {\n    return arguments.length ? (x = +_[0], y = +_[1], recenter()) : [x, y];\n  };\n\n  projection.center = function(_) {\n    return arguments.length ? (lambda = _[0] % 360 * radians, phi = _[1] % 360 * radians, recenter()) : [lambda * degrees, phi * degrees];\n  };\n\n  projection.rotate = function(_) {\n    return arguments.length ? (deltaLambda = _[0] % 360 * radians, deltaPhi = _[1] % 360 * radians, deltaGamma = _.length > 2 ? _[2] % 360 * radians : 0, recenter()) : [deltaLambda * degrees, deltaPhi * degrees, deltaGamma * degrees];\n  };\n\n  projection.angle = function(_) {\n    return arguments.length ? (alpha = _ % 360 * radians, recenter()) : alpha * degrees;\n  };\n\n  projection.reflectX = function(_) {\n    return arguments.length ? (sx = _ ? -1 : 1, recenter()) : sx < 0;\n  };\n\n  projection.reflectY = function(_) {\n    return arguments.length ? (sy = _ ? -1 : 1, recenter()) : sy < 0;\n  };\n\n  projection.precision = function(_) {\n    return arguments.length ? (projectResample = resample(projectTransform, delta2 = _ * _), reset()) : sqrt(delta2);\n  };\n\n  projection.fitExtent = function(extent, object) {\n    return fitExtent(projection, extent, object);\n  };\n\n  projection.fitSize = function(size, object) {\n    return fitSize(projection, size, object);\n  };\n\n  projection.fitWidth = function(width, object) {\n    return fitWidth(projection, width, object);\n  };\n\n  projection.fitHeight = function(height, object) {\n    return fitHeight(projection, height, object);\n  };\n\n  function recenter() {\n    var center = scaleTranslateRotate(k, 0, 0, sx, sy, alpha).apply(null, project(lambda, phi)),\n        transform = scaleTranslateRotate(k, x - center[0], y - center[1], sx, sy, alpha);\n    rotate = rotateRadians(deltaLambda, deltaPhi, deltaGamma);\n    projectTransform = compose(project, transform);\n    projectRotateTransform = compose(rotate, projectTransform);\n    projectResample = resample(projectTransform, delta2);\n    return reset();\n  }\n\n  function reset() {\n    cache = cacheStream = null;\n    return projection;\n  }\n\n  return function() {\n    project = projectAt.apply(this, arguments);\n    projection.invert = project.invert && invert;\n    return recenter();\n  };\n}\n", "import {degrees, pi, radians} from \"../math.js\";\nimport {projectionMutator} from \"./index.js\";\n\nexport function conicProjection(projectAt) {\n  var phi0 = 0,\n      phi1 = pi / 3,\n      m = projectionMutator(projectAt),\n      p = m(phi0, phi1);\n\n  p.parallels = function(_) {\n    return arguments.length ? m(phi0 = _[0] * radians, phi1 = _[1] * radians) : [phi0 * degrees, phi1 * degrees];\n  };\n\n  return p;\n}\n", "import {asin, cos, sin} from \"../math.js\";\n\nexport function cylindricalEqualAreaRaw(phi0) {\n  var cosPhi0 = cos(phi0);\n\n  function forward(lambda, phi) {\n    return [lambda * cosPhi0, sin(phi) / cosPhi0];\n  }\n\n  forward.invert = function(x, y) {\n    return [x / cosPhi0, asin(y * cosPhi0)];\n  };\n\n  return forward;\n}\n", "import {abs, asin, atan2, cos, epsilon, pi, sign, sin, sqrt} from \"../math.js\";\nimport {conicProjection} from \"./conic.js\";\nimport {cylindricalEqualAreaRaw} from \"./cylindricalEqualArea.js\";\n\nexport function conicEqualAreaRaw(y0, y1) {\n  var sy0 = sin(y0), n = (sy0 + sin(y1)) / 2;\n\n  // Are the parallels symmetrical around the Equator?\n  if (abs(n) < epsilon) return cylindricalEqualAreaRaw(y0);\n\n  var c = 1 + sy0 * (2 * n - sy0), r0 = sqrt(c) / n;\n\n  function project(x, y) {\n    var r = sqrt(c - 2 * n * sin(y)) / n;\n    return [r * sin(x *= n), r0 - r * cos(x)];\n  }\n\n  project.invert = function(x, y) {\n    var r0y = r0 - y,\n        l = atan2(x, abs(r0y)) * sign(r0y);\n    if (r0y * n < 0)\n      l -= pi * sign(x) * sign(r0y);\n    return [l / n, asin((c - (x * x + r0y * r0y) * n * n) / (2 * n))];\n  };\n\n  return project;\n}\n\nexport default function() {\n  return conicProjection(conicEqualAreaRaw)\n      .scale(155.424)\n      .center([0, 33.6442]);\n}\n", "import conicEqualArea from \"./conicEqualArea.js\";\n\nexport default function() {\n  return conicEqualArea()\n      .parallels([29.5, 45.5])\n      .scale(1070)\n      .translate([480, 250])\n      .rotate([96, 0])\n      .center([-0.6, 38.7]);\n}\n", "import {epsilon} from \"../math.js\";\nimport albers from \"./albers.js\";\nimport conicEqualArea from \"./conicEqualArea.js\";\nimport {fitExtent, fitSize, fitWidth, fitHeight} from \"./fit.js\";\n\n// The projections must have mutually exclusive clip regions on the sphere,\n// as this will avoid emitting interleaving lines and polygons.\nfunction multiplex(streams) {\n  var n = streams.length;\n  return {\n    point: function(x, y) { var i = -1; while (++i < n) streams[i].point(x, y); },\n    sphere: function() { var i = -1; while (++i < n) streams[i].sphere(); },\n    lineStart: function() { var i = -1; while (++i < n) streams[i].lineStart(); },\n    lineEnd: function() { var i = -1; while (++i < n) streams[i].lineEnd(); },\n    polygonStart: function() { var i = -1; while (++i < n) streams[i].polygonStart(); },\n    polygonEnd: function() { var i = -1; while (++i < n) streams[i].polygonEnd(); }\n  };\n}\n\n// A composite projection for the United States, configured by default for\n// 960\u00D7500. The projection also works quite well at 960\u00D7600 if you change the\n// scale to 1285 and adjust the translate accordingly. The set of standard\n// parallels for each region comes from USGS, which is published here:\n// http://egsc.usgs.gov/isb/pubs/MapProjections/projections.html#albers\nexport default function() {\n  var cache,\n      cacheStream,\n      lower48 = albers(), lower48Point,\n      alaska = conicEqualArea().rotate([154, 0]).center([-2, 58.5]).parallels([55, 65]), alaskaPoint, // EPSG:3338\n      hawaii = conicEqualArea().rotate([157, 0]).center([-3, 19.9]).parallels([8, 18]), hawaiiPoint, // ESRI:102007\n      point, pointStream = {point: function(x, y) { point = [x, y]; }};\n\n  function albersUsa(coordinates) {\n    var x = coordinates[0], y = coordinates[1];\n    return point = null,\n        (lower48Point.point(x, y), point)\n        || (alaskaPoint.point(x, y), point)\n        || (hawaiiPoint.point(x, y), point);\n  }\n\n  albersUsa.invert = function(coordinates) {\n    var k = lower48.scale(),\n        t = lower48.translate(),\n        x = (coordinates[0] - t[0]) / k,\n        y = (coordinates[1] - t[1]) / k;\n    return (y >= 0.120 && y < 0.234 && x >= -0.425 && x < -0.214 ? alaska\n        : y >= 0.166 && y < 0.234 && x >= -0.214 && x < -0.115 ? hawaii\n        : lower48).invert(coordinates);\n  };\n\n  albersUsa.stream = function(stream) {\n    return cache && cacheStream === stream ? cache : cache = multiplex([lower48.stream(cacheStream = stream), alaska.stream(stream), hawaii.stream(stream)]);\n  };\n\n  albersUsa.precision = function(_) {\n    if (!arguments.length) return lower48.precision();\n    lower48.precision(_), alaska.precision(_), hawaii.precision(_);\n    return reset();\n  };\n\n  albersUsa.scale = function(_) {\n    if (!arguments.length) return lower48.scale();\n    lower48.scale(_), alaska.scale(_ * 0.35), hawaii.scale(_);\n    return albersUsa.translate(lower48.translate());\n  };\n\n  albersUsa.translate = function(_) {\n    if (!arguments.length) return lower48.translate();\n    var k = lower48.scale(), x = +_[0], y = +_[1];\n\n    lower48Point = lower48\n        .translate(_)\n        .clipExtent([[x - 0.455 * k, y - 0.238 * k], [x + 0.455 * k, y + 0.238 * k]])\n        .stream(pointStream);\n\n    alaskaPoint = alaska\n        .translate([x - 0.307 * k, y + 0.201 * k])\n        .clipExtent([[x - 0.425 * k + epsilon, y + 0.120 * k + epsilon], [x - 0.214 * k - epsilon, y + 0.234 * k - epsilon]])\n        .stream(pointStream);\n\n    hawaiiPoint = hawaii\n        .translate([x - 0.205 * k, y + 0.212 * k])\n        .clipExtent([[x - 0.214 * k + epsilon, y + 0.166 * k + epsilon], [x - 0.115 * k - epsilon, y + 0.234 * k - epsilon]])\n        .stream(pointStream);\n\n    return reset();\n  };\n\n  albersUsa.fitExtent = function(extent, object) {\n    return fitExtent(albersUsa, extent, object);\n  };\n\n  albersUsa.fitSize = function(size, object) {\n    return fitSize(albersUsa, size, object);\n  };\n\n  albersUsa.fitWidth = function(width, object) {\n    return fitWidth(albersUsa, width, object);\n  };\n\n  albersUsa.fitHeight = function(height, object) {\n    return fitHeight(albersUsa, height, object);\n  };\n\n  function reset() {\n    cache = cacheStream = null;\n    return albersUsa;\n  }\n\n  return albersUsa.scale(1070);\n}\n", "import {asin, atan2, cos, sin, sqrt} from \"../math.js\";\n\nexport function azimuthalRaw(scale) {\n  return function(x, y) {\n    var cx = cos(x),\n        cy = cos(y),\n        k = scale(cx * cy);\n        if (k === Infinity) return [2, 0];\n    return [\n      k * cy * sin(x),\n      k * sin(y)\n    ];\n  }\n}\n\nexport function azimuthalInvert(angle) {\n  return function(x, y) {\n    var z = sqrt(x * x + y * y),\n        c = angle(z),\n        sc = sin(c),\n        cc = cos(c);\n    return [\n      atan2(x * sc, z * cc),\n      asin(z && y * sc / z)\n    ];\n  }\n}\n", "import {asin, sqrt} from \"../math.js\";\nimport {azimuthalRaw, azimuthalInvert} from \"./azimuthal.js\";\nimport projection from \"./index.js\";\n\nexport var azimuthalEqualAreaRaw = azimuthalRaw(function(cxcy) {\n  return sqrt(2 / (1 + cxcy));\n});\n\nazimuthalEqualAreaRaw.invert = azimuthalInvert(function(z) {\n  return 2 * asin(z / 2);\n});\n\nexport default function() {\n  return projection(azimuthalEqualAreaRaw)\n      .scale(124.75)\n      .clipAngle(180 - 1e-3);\n}\n", "import {acos, sin} from \"../math.js\";\nimport {azimuthalRaw, azimuthalInvert} from \"./azimuthal.js\";\nimport projection from \"./index.js\";\n\nexport var azimuthalEquidistantRaw = azimuthalRaw(function(c) {\n  return (c = acos(c)) && c / sin(c);\n});\n\nazimuthalEquidistantRaw.invert = azimuthalInvert(function(z) {\n  return z;\n});\n\nexport default function() {\n  return projection(azimuthalEquidistantRaw)\n      .scale(79.4188)\n      .clipAngle(180 - 1e-3);\n}\n", "import {atan, exp, halfPi, log, pi, tan, tau} from \"../math.js\";\nimport rotation from \"../rotation.js\";\nimport projection from \"./index.js\";\n\nexport function mercatorRaw(lambda, phi) {\n  return [lambda, log(tan((halfPi + phi) / 2))];\n}\n\nmercatorRaw.invert = function(x, y) {\n  return [x, 2 * atan(exp(y)) - halfPi];\n};\n\nexport default function() {\n  return mercatorProjection(mercatorRaw)\n      .scale(961 / tau);\n}\n\nexport function mercatorProjection(project) {\n  var m = projection(project),\n      center = m.center,\n      scale = m.scale,\n      translate = m.translate,\n      clipExtent = m.clipExtent,\n      x0 = null, y0, x1, y1; // clip extent\n\n  m.scale = function(_) {\n    return arguments.length ? (scale(_), reclip()) : scale();\n  };\n\n  m.translate = function(_) {\n    return arguments.length ? (translate(_), reclip()) : translate();\n  };\n\n  m.center = function(_) {\n    return arguments.length ? (center(_), reclip()) : center();\n  };\n\n  m.clipExtent = function(_) {\n    return arguments.length ? ((_ == null ? x0 = y0 = x1 = y1 = null : (x0 = +_[0][0], y0 = +_[0][1], x1 = +_[1][0], y1 = +_[1][1])), reclip()) : x0 == null ? null : [[x0, y0], [x1, y1]];\n  };\n\n  function reclip() {\n    var k = pi * scale(),\n        t = m(rotation(m.rotate()).invert([0, 0]));\n    return clipExtent(x0 == null\n        ? [[t[0] - k, t[1] - k], [t[0] + k, t[1] + k]] : project === mercatorRaw\n        ? [[Math.max(t[0] - k, x0), y0], [Math.min(t[0] + k, x1), y1]]\n        : [[x0, Math.max(t[1] - k, y0)], [x1, Math.min(t[1] + k, y1)]]);\n  }\n\n  return reclip();\n}\n", "import {abs, atan, atan2, cos, epsilon, halfPi, log, pi, pow, sign, sin, sqrt, tan} from \"../math.js\";\nimport {conicProjection} from \"./conic.js\";\nimport {mercatorRaw} from \"./mercator.js\";\n\nfunction tany(y) {\n  return tan((halfPi + y) / 2);\n}\n\nexport function conicConformalRaw(y0, y1) {\n  var cy0 = cos(y0),\n      n = y0 === y1 ? sin(y0) : log(cy0 / cos(y1)) / log(tany(y1) / tany(y0)),\n      f = cy0 * pow(tany(y0), n) / n;\n\n  if (!n) return mercatorRaw;\n\n  function project(x, y) {\n    if (f > 0) { if (y < -halfPi + epsilon) y = -halfPi + epsilon; }\n    else { if (y > halfPi - epsilon) y = halfPi - epsilon; }\n    var r = f / pow(tany(y), n);\n    return [r * sin(n * x), f - r * cos(n * x)];\n  }\n\n  project.invert = function(x, y) {\n    var fy = f - y, r = sign(n) * sqrt(x * x + fy * fy),\n      l = atan2(x, abs(fy)) * sign(fy);\n    if (fy * n < 0)\n      l -= pi * sign(x) * sign(fy);\n    return [l / n, 2 * atan(pow(f / r, 1 / n)) - halfPi];\n  };\n\n  return project;\n}\n\nexport default function() {\n  return conicProjection(conicConformalRaw)\n      .scale(109.5)\n      .parallels([30, 30]);\n}\n", "import projection from \"./index.js\";\n\nexport function equirectangularRaw(lambda, phi) {\n  return [lambda, phi];\n}\n\nequirectangularRaw.invert = equirectangularRaw;\n\nexport default function() {\n  return projection(equirectangularRaw)\n      .scale(152.63);\n}\n", "import {abs, atan2, cos, epsilon, pi, sign, sin, sqrt} from \"../math.js\";\nimport {conicProjection} from \"./conic.js\";\nimport {equirectangularRaw} from \"./equirectangular.js\";\n\nexport function conicEquidistantRaw(y0, y1) {\n  var cy0 = cos(y0),\n      n = y0 === y1 ? sin(y0) : (cy0 - cos(y1)) / (y1 - y0),\n      g = cy0 / n + y0;\n\n  if (abs(n) < epsilon) return equirectangularRaw;\n\n  function project(x, y) {\n    var gy = g - y, nx = n * x;\n    return [gy * sin(nx), g - gy * cos(nx)];\n  }\n\n  project.invert = function(x, y) {\n    var gy = g - y,\n        l = atan2(x, abs(gy)) * sign(gy);\n    if (gy * n < 0)\n      l -= pi * sign(x) * sign(gy);\n    return [l / n, g - sign(n) * sqrt(x * x + gy * gy)];\n  };\n\n  return project;\n}\n\nexport default function() {\n  return conicProjection(conicEquidistantRaw)\n      .scale(131.154)\n      .center([0, 13.9389]);\n}\n", "import projection from \"./index.js\";\nimport {abs, asin, cos, epsilon2, sin, sqrt} from \"../math.js\";\n\nvar A1 = 1.340264,\n    A2 = -0.081106,\n    A3 = 0.000893,\n    A4 = 0.003796,\n    M = sqrt(3) / 2,\n    iterations = 12;\n\nexport function equalEarthRaw(lambda, phi) {\n  var l = asin(M * sin(phi)), l2 = l * l, l6 = l2 * l2 * l2;\n  return [\n    lambda * cos(l) / (M * (A1 + 3 * A2 * l2 + l6 * (7 * A3 + 9 * A4 * l2))),\n    l * (A1 + A2 * l2 + l6 * (A3 + A4 * l2))\n  ];\n}\n\nequalEarthRaw.invert = function(x, y) {\n  var l = y, l2 = l * l, l6 = l2 * l2 * l2;\n  for (var i = 0, delta, fy, fpy; i < iterations; ++i) {\n    fy = l * (A1 + A2 * l2 + l6 * (A3 + A4 * l2)) - y;\n    fpy = A1 + 3 * A2 * l2 + l6 * (7 * A3 + 9 * A4 * l2);\n    l -= delta = fy / fpy, l2 = l * l, l6 = l2 * l2 * l2;\n    if (abs(delta) < epsilon2) break;\n  }\n  return [\n    M * x * (A1 + 3 * A2 * l2 + l6 * (7 * A3 + 9 * A4 * l2)) / cos(l),\n    asin(sin(l) / M)\n  ];\n};\n\nexport default function() {\n  return projection(equalEarthRaw)\n      .scale(177.158);\n}\n", "import {atan, cos, sin} from \"../math.js\";\nimport {azimuthalInvert} from \"./azimuthal.js\";\nimport projection from \"./index.js\";\n\nexport function gnomonicRaw(x, y) {\n  var cy = cos(y), k = cos(x) * cy;\n  return [cy * sin(x) / k, sin(y) / k];\n}\n\ngnomonicRaw.invert = azimuthalInvert(atan);\n\nexport default function() {\n  return projection(gnomonicRaw)\n      .scale(144.049)\n      .clipAngle(60);\n}\n", "import {asin, cos, epsilon, sin} from \"../math.js\";\nimport {azimuthalInvert} from \"./azimuthal.js\";\nimport projection from \"./index.js\";\n\nexport function orthographicRaw(x, y) {\n  return [cos(y) * sin(x), sin(y)];\n}\n\northographicRaw.invert = azimuthalInvert(asin);\n\nexport default function() {\n  return projection(orthographicRaw)\n      .scale(249.5)\n      .clipAngle(90 + epsilon);\n}\n", "import {atan, cos, sin} from \"../math.js\";\nimport {azimuthalInvert} from \"./azimuthal.js\";\nimport projection from \"./index.js\";\n\nexport function stereographicRaw(x, y) {\n  var cy = cos(y), k = 1 + cos(x) * cy;\n  return [cy * sin(x) / k, sin(y) / k];\n}\n\nstereographicRaw.invert = azimuthalInvert(function(z) {\n  return 2 * atan(z);\n});\n\nexport default function() {\n  return projection(stereographicRaw)\n      .scale(250)\n      .clipAngle(142);\n}\n", "import {atan, exp, halfPi, log, tan} from \"../math.js\";\nimport {mercatorProjection} from \"./mercator.js\";\n\nexport function transverseMercatorRaw(lambda, phi) {\n  return [log(tan((halfPi + phi) / 2)), -lambda];\n}\n\ntransverseMercatorRaw.invert = function(x, y) {\n  return [-y, 2 * atan(exp(x)) - halfPi];\n};\n\nexport default function() {\n  var m = mercatorProjection(transverseMercatorRaw),\n      center = m.center,\n      rotate = m.rotate;\n\n  m.center = function(_) {\n    return arguments.length ? center([-_[1], _[0]]) : (_ = center(), [_[1], -_[0]]);\n  };\n\n  m.rotate = function(_) {\n    return arguments.length ? rotate([_[0], _[1], _.length > 2 ? _[2] + 90 : 90]) : (_ = rotate(), [_[0], _[1], _[2] - 90]);\n  };\n\n  return rotate([0, 0, 90])\n      .scale(159.155);\n}\n", "export function initRange(domain, range) {\n  switch (arguments.length) {\n    case 0: break;\n    case 1: this.range(domain); break;\n    default: this.range(range).domain(domain); break;\n  }\n  return this;\n}\n\nexport function initInterpolator(domain, interpolator) {\n  switch (arguments.length) {\n    case 0: break;\n    case 1: {\n      if (typeof domain === \"function\") this.interpolator(domain);\n      else this.range(domain);\n      break;\n    }\n    default: {\n      this.domain(domain);\n      if (typeof interpolator === \"function\") this.interpolator(interpolator);\n      else this.range(interpolator);\n      break;\n    }\n  }\n  return this;\n}\n", "import {InternMap} from \"d3-array\";\nimport {initRange} from \"./init.js\";\n\nexport const implicit = Symbol(\"implicit\");\n\nexport default function ordinal() {\n  var index = new InternMap(),\n      domain = [],\n      range = [],\n      unknown = implicit;\n\n  function scale(d) {\n    let i = index.get(d);\n    if (i === undefined) {\n      if (unknown !== implicit) return unknown;\n      index.set(d, i = domain.push(d) - 1);\n    }\n    return range[i % range.length];\n  }\n\n  scale.domain = function(_) {\n    if (!arguments.length) return domain.slice();\n    domain = [], index = new InternMap();\n    for (const value of _) {\n      if (index.has(value)) continue;\n      index.set(value, domain.push(value) - 1);\n    }\n    return scale;\n  };\n\n  scale.range = function(_) {\n    return arguments.length ? (range = Array.from(_), scale) : range.slice();\n  };\n\n  scale.unknown = function(_) {\n    return arguments.length ? (unknown = _, scale) : unknown;\n  };\n\n  scale.copy = function() {\n    return ordinal(domain, range).unknown(unknown);\n  };\n\n  initRange.apply(scale, arguments);\n\n  return scale;\n}\n", "import {range as sequence} from \"d3-array\";\nimport {initRange} from \"./init.js\";\nimport ordinal from \"./ordinal.js\";\n\nexport default function band() {\n  var scale = ordinal().unknown(undefined),\n      domain = scale.domain,\n      ordinalRange = scale.range,\n      r0 = 0,\n      r1 = 1,\n      step,\n      bandwidth,\n      round = false,\n      paddingInner = 0,\n      paddingOuter = 0,\n      align = 0.5;\n\n  delete scale.unknown;\n\n  function rescale() {\n    var n = domain().length,\n        reverse = r1 < r0,\n        start = reverse ? r1 : r0,\n        stop = reverse ? r0 : r1;\n    step = (stop - start) / Math.max(1, n - paddingInner + paddingOuter * 2);\n    if (round) step = Math.floor(step);\n    start += (stop - start - step * (n - paddingInner)) * align;\n    bandwidth = step * (1 - paddingInner);\n    if (round) start = Math.round(start), bandwidth = Math.round(bandwidth);\n    var values = sequence(n).map(function(i) { return start + step * i; });\n    return ordinalRange(reverse ? values.reverse() : values);\n  }\n\n  scale.domain = function(_) {\n    return arguments.length ? (domain(_), rescale()) : domain();\n  };\n\n  scale.range = function(_) {\n    return arguments.length ? ([r0, r1] = _, r0 = +r0, r1 = +r1, rescale()) : [r0, r1];\n  };\n\n  scale.rangeRound = function(_) {\n    return [r0, r1] = _, r0 = +r0, r1 = +r1, round = true, rescale();\n  };\n\n  scale.bandwidth = function() {\n    return bandwidth;\n  };\n\n  scale.step = function() {\n    return step;\n  };\n\n  scale.round = function(_) {\n    return arguments.length ? (round = !!_, rescale()) : round;\n  };\n\n  scale.padding = function(_) {\n    return arguments.length ? (paddingInner = Math.min(1, paddingOuter = +_), rescale()) : paddingInner;\n  };\n\n  scale.paddingInner = function(_) {\n    return arguments.length ? (paddingInner = Math.min(1, _), rescale()) : paddingInner;\n  };\n\n  scale.paddingOuter = function(_) {\n    return arguments.length ? (paddingOuter = +_, rescale()) : paddingOuter;\n  };\n\n  scale.align = function(_) {\n    return arguments.length ? (align = Math.max(0, Math.min(1, _)), rescale()) : align;\n  };\n\n  scale.copy = function() {\n    return band(domain(), [r0, r1])\n        .round(round)\n        .paddingInner(paddingInner)\n        .paddingOuter(paddingOuter)\n        .align(align);\n  };\n\n  return initRange.apply(rescale(), arguments);\n}\n\nfunction pointish(scale) {\n  var copy = scale.copy;\n\n  scale.padding = scale.paddingOuter;\n  delete scale.paddingInner;\n  delete scale.paddingOuter;\n\n  scale.copy = function() {\n    return pointish(copy());\n  };\n\n  return scale;\n}\n\nexport function point() {\n  return pointish(band.apply(null, arguments).paddingInner(1));\n}\n", "export default function constants(x) {\n  return function() {\n    return x;\n  };\n}\n", "export default function number(x) {\n  return +x;\n}\n", "import {bisect} from \"d3-array\";\nimport {interpolate as interpolateValue, interpolateNumber, interpolateRound} from \"d3-interpolate\";\nimport constant from \"./constant.js\";\nimport number from \"./number.js\";\n\nvar unit = [0, 1];\n\nexport function identity(x) {\n  return x;\n}\n\nfunction normalize(a, b) {\n  return (b -= (a = +a))\n      ? function(x) { return (x - a) / b; }\n      : constant(isNaN(b) ? NaN : 0.5);\n}\n\nfunction clamper(a, b) {\n  var t;\n  if (a > b) t = a, a = b, b = t;\n  return function(x) { return Math.max(a, Math.min(b, x)); };\n}\n\n// normalize(a, b)(x) takes a domain value x in [a,b] and returns the corresponding parameter t in [0,1].\n// interpolate(a, b)(t) takes a parameter t in [0,1] and returns the corresponding range value x in [a,b].\nfunction bimap(domain, range, interpolate) {\n  var d0 = domain[0], d1 = domain[1], r0 = range[0], r1 = range[1];\n  if (d1 < d0) d0 = normalize(d1, d0), r0 = interpolate(r1, r0);\n  else d0 = normalize(d0, d1), r0 = interpolate(r0, r1);\n  return function(x) { return r0(d0(x)); };\n}\n\nfunction polymap(domain, range, interpolate) {\n  var j = Math.min(domain.length, range.length) - 1,\n      d = new Array(j),\n      r = new Array(j),\n      i = -1;\n\n  // Reverse descending domains.\n  if (domain[j] < domain[0]) {\n    domain = domain.slice().reverse();\n    range = range.slice().reverse();\n  }\n\n  while (++i < j) {\n    d[i] = normalize(domain[i], domain[i + 1]);\n    r[i] = interpolate(range[i], range[i + 1]);\n  }\n\n  return function(x) {\n    var i = bisect(domain, x, 1, j) - 1;\n    return r[i](d[i](x));\n  };\n}\n\nexport function copy(source, target) {\n  return target\n      .domain(source.domain())\n      .range(source.range())\n      .interpolate(source.interpolate())\n      .clamp(source.clamp())\n      .unknown(source.unknown());\n}\n\nexport function transformer() {\n  var domain = unit,\n      range = unit,\n      interpolate = interpolateValue,\n      transform,\n      untransform,\n      unknown,\n      clamp = identity,\n      piecewise,\n      output,\n      input;\n\n  function rescale() {\n    var n = Math.min(domain.length, range.length);\n    if (clamp !== identity) clamp = clamper(domain[0], domain[n - 1]);\n    piecewise = n > 2 ? polymap : bimap;\n    output = input = null;\n    return scale;\n  }\n\n  function scale(x) {\n    return x == null || isNaN(x = +x) ? unknown : (output || (output = piecewise(domain.map(transform), range, interpolate)))(transform(clamp(x)));\n  }\n\n  scale.invert = function(y) {\n    return clamp(untransform((input || (input = piecewise(range, domain.map(transform), interpolateNumber)))(y)));\n  };\n\n  scale.domain = function(_) {\n    return arguments.length ? (domain = Array.from(_, number), rescale()) : domain.slice();\n  };\n\n  scale.range = function(_) {\n    return arguments.length ? (range = Array.from(_), rescale()) : range.slice();\n  };\n\n  scale.rangeRound = function(_) {\n    return range = Array.from(_), interpolate = interpolateRound, rescale();\n  };\n\n  scale.clamp = function(_) {\n    return arguments.length ? (clamp = _ ? true : identity, rescale()) : clamp !== identity;\n  };\n\n  scale.interpolate = function(_) {\n    return arguments.length ? (interpolate = _, rescale()) : interpolate;\n  };\n\n  scale.unknown = function(_) {\n    return arguments.length ? (unknown = _, scale) : unknown;\n  };\n\n  return function(t, u) {\n    transform = t, untransform = u;\n    return rescale();\n  };\n}\n\nexport default function continuous() {\n  return transformer()(identity, identity);\n}\n", "import {tickStep} from \"d3-array\";\nimport {format, formatPrefix, formatSpecifier, precisionFixed, precisionPrefix, precisionRound} from \"d3-format\";\n\nexport default function tickFormat(start, stop, count, specifier) {\n  var step = tickStep(start, stop, count),\n      precision;\n  specifier = formatSpecifier(specifier == null ? \",f\" : specifier);\n  switch (specifier.type) {\n    case \"s\": {\n      var value = Math.max(Math.abs(start), Math.abs(stop));\n      if (specifier.precision == null && !isNaN(precision = precisionPrefix(step, value))) specifier.precision = precision;\n      return formatPrefix(specifier, value);\n    }\n    case \"\":\n    case \"e\":\n    case \"g\":\n    case \"p\":\n    case \"r\": {\n      if (specifier.precision == null && !isNaN(precision = precisionRound(step, Math.max(Math.abs(start), Math.abs(stop))))) specifier.precision = precision - (specifier.type === \"e\");\n      break;\n    }\n    case \"f\":\n    case \"%\": {\n      if (specifier.precision == null && !isNaN(precision = precisionFixed(step))) specifier.precision = precision - (specifier.type === \"%\") * 2;\n      break;\n    }\n  }\n  return format(specifier);\n}\n", "import {ticks, tickIncrement} from \"d3-array\";\nimport continuous, {copy} from \"./continuous.js\";\nimport {initRange} from \"./init.js\";\nimport tickFormat from \"./tickFormat.js\";\n\nexport function linearish(scale) {\n  var domain = scale.domain;\n\n  scale.ticks = function(count) {\n    var d = domain();\n    return ticks(d[0], d[d.length - 1], count == null ? 10 : count);\n  };\n\n  scale.tickFormat = function(count, specifier) {\n    var d = domain();\n    return tickFormat(d[0], d[d.length - 1], count == null ? 10 : count, specifier);\n  };\n\n  scale.nice = function(count) {\n    if (count == null) count = 10;\n\n    var d = domain();\n    var i0 = 0;\n    var i1 = d.length - 1;\n    var start = d[i0];\n    var stop = d[i1];\n    var prestep;\n    var step;\n    var maxIter = 10;\n\n    if (stop < start) {\n      step = start, start = stop, stop = step;\n      step = i0, i0 = i1, i1 = step;\n    }\n    \n    while (maxIter-- > 0) {\n      step = tickIncrement(start, stop, count);\n      if (step === prestep) {\n        d[i0] = start\n        d[i1] = stop\n        return domain(d);\n      } else if (step > 0) {\n        start = Math.floor(start / step) * step;\n        stop = Math.ceil(stop / step) * step;\n      } else if (step < 0) {\n        start = Math.ceil(start * step) / step;\n        stop = Math.floor(stop * step) / step;\n      } else {\n        break;\n      }\n      prestep = step;\n    }\n\n    return scale;\n  };\n\n  return scale;\n}\n\nexport default function linear() {\n  var scale = continuous();\n\n  scale.copy = function() {\n    return copy(scale, linear());\n  };\n\n  initRange.apply(scale, arguments);\n\n  return linearish(scale);\n}\n", "import {linearish} from \"./linear.js\";\nimport number from \"./number.js\";\n\nexport default function identity(domain) {\n  var unknown;\n\n  function scale(x) {\n    return x == null || isNaN(x = +x) ? unknown : x;\n  }\n\n  scale.invert = scale;\n\n  scale.domain = scale.range = function(_) {\n    return arguments.length ? (domain = Array.from(_, number), scale) : domain.slice();\n  };\n\n  scale.unknown = function(_) {\n    return arguments.length ? (unknown = _, scale) : unknown;\n  };\n\n  scale.copy = function() {\n    return identity(domain).unknown(unknown);\n  };\n\n  domain = arguments.length ? Array.from(domain, number) : [0, 1];\n\n  return linearish(scale);\n}\n", "export default function nice(domain, interval) {\n  domain = domain.slice();\n\n  var i0 = 0,\n      i1 = domain.length - 1,\n      x0 = domain[i0],\n      x1 = domain[i1],\n      t;\n\n  if (x1 < x0) {\n    t = i0, i0 = i1, i1 = t;\n    t = x0, x0 = x1, x1 = t;\n  }\n\n  domain[i0] = interval.floor(x0);\n  domain[i1] = interval.ceil(x1);\n  return domain;\n}\n", "import {ticks} from \"d3-array\";\nimport {format, formatSpecifier} from \"d3-format\";\nimport nice from \"./nice.js\";\nimport {copy, transformer} from \"./continuous.js\";\nimport {initRange} from \"./init.js\";\n\nfunction transformLog(x) {\n  return Math.log(x);\n}\n\nfunction transformExp(x) {\n  return Math.exp(x);\n}\n\nfunction transformLogn(x) {\n  return -Math.log(-x);\n}\n\nfunction transformExpn(x) {\n  return -Math.exp(-x);\n}\n\nfunction pow10(x) {\n  return isFinite(x) ? +(\"1e\" + x) : x < 0 ? 0 : x;\n}\n\nfunction powp(base) {\n  return base === 10 ? pow10\n      : base === Math.E ? Math.exp\n      : x => Math.pow(base, x);\n}\n\nfunction logp(base) {\n  return base === Math.E ? Math.log\n      : base === 10 && Math.log10\n      || base === 2 && Math.log2\n      || (base = Math.log(base), x => Math.log(x) / base);\n}\n\nfunction reflect(f) {\n  return (x, k) => -f(-x, k);\n}\n\nexport function loggish(transform) {\n  const scale = transform(transformLog, transformExp);\n  const domain = scale.domain;\n  let base = 10;\n  let logs;\n  let pows;\n\n  function rescale() {\n    logs = logp(base), pows = powp(base);\n    if (domain()[0] < 0) {\n      logs = reflect(logs), pows = reflect(pows);\n      transform(transformLogn, transformExpn);\n    } else {\n      transform(transformLog, transformExp);\n    }\n    return scale;\n  }\n\n  scale.base = function(_) {\n    return arguments.length ? (base = +_, rescale()) : base;\n  };\n\n  scale.domain = function(_) {\n    return arguments.length ? (domain(_), rescale()) : domain();\n  };\n\n  scale.ticks = count => {\n    const d = domain();\n    let u = d[0];\n    let v = d[d.length - 1];\n    const r = v < u;\n\n    if (r) ([u, v] = [v, u]);\n\n    let i = logs(u);\n    let j = logs(v);\n    let k;\n    let t;\n    const n = count == null ? 10 : +count;\n    let z = [];\n\n    if (!(base % 1) && j - i < n) {\n      i = Math.floor(i), j = Math.ceil(j);\n      if (u > 0) for (; i <= j; ++i) {\n        for (k = 1; k < base; ++k) {\n          t = i < 0 ? k / pows(-i) : k * pows(i);\n          if (t < u) continue;\n          if (t > v) break;\n          z.push(t);\n        }\n      } else for (; i <= j; ++i) {\n        for (k = base - 1; k >= 1; --k) {\n          t = i > 0 ? k / pows(-i) : k * pows(i);\n          if (t < u) continue;\n          if (t > v) break;\n          z.push(t);\n        }\n      }\n      if (z.length * 2 < n) z = ticks(u, v, n);\n    } else {\n      z = ticks(i, j, Math.min(j - i, n)).map(pows);\n    }\n    return r ? z.reverse() : z;\n  };\n\n  scale.tickFormat = (count, specifier) => {\n    if (count == null) count = 10;\n    if (specifier == null) specifier = base === 10 ? \"s\" : \",\";\n    if (typeof specifier !== \"function\") {\n      if (!(base % 1) && (specifier = formatSpecifier(specifier)).precision == null) specifier.trim = true;\n      specifier = format(specifier);\n    }\n    if (count === Infinity) return specifier;\n    const k = Math.max(1, base * count / scale.ticks().length); // TODO fast estimate?\n    return d => {\n      let i = d / pows(Math.round(logs(d)));\n      if (i * base < base - 0.5) i *= base;\n      return i <= k ? specifier(d) : \"\";\n    };\n  };\n\n  scale.nice = () => {\n    return domain(nice(domain(), {\n      floor: x => pows(Math.floor(logs(x))),\n      ceil: x => pows(Math.ceil(logs(x)))\n    }));\n  };\n\n  return scale;\n}\n\nexport default function log() {\n  const scale = loggish(transformer()).domain([1, 10]);\n  scale.copy = () => copy(scale, log()).base(scale.base());\n  initRange.apply(scale, arguments);\n  return scale;\n}\n", "import {linearish} from \"./linear.js\";\nimport {copy, transformer} from \"./continuous.js\";\nimport {initRange} from \"./init.js\";\n\nfunction transformSymlog(c) {\n  return function(x) {\n    return Math.sign(x) * Math.log1p(Math.abs(x / c));\n  };\n}\n\nfunction transformSymexp(c) {\n  return function(x) {\n    return Math.sign(x) * Math.expm1(Math.abs(x)) * c;\n  };\n}\n\nexport function symlogish(transform) {\n  var c = 1, scale = transform(transformSymlog(c), transformSymexp(c));\n\n  scale.constant = function(_) {\n    return arguments.length ? transform(transformSymlog(c = +_), transformSymexp(c)) : c;\n  };\n\n  return linearish(scale);\n}\n\nexport default function symlog() {\n  var scale = symlogish(transformer());\n\n  scale.copy = function() {\n    return copy(scale, symlog()).constant(scale.constant());\n  };\n\n  return initRange.apply(scale, arguments);\n}\n", "import {linearish} from \"./linear.js\";\nimport {copy, identity, transformer} from \"./continuous.js\";\nimport {initRange} from \"./init.js\";\n\nfunction transformPow(exponent) {\n  return function(x) {\n    return x < 0 ? -Math.pow(-x, exponent) : Math.pow(x, exponent);\n  };\n}\n\nfunction transformSqrt(x) {\n  return x < 0 ? -Math.sqrt(-x) : Math.sqrt(x);\n}\n\nfunction transformSquare(x) {\n  return x < 0 ? -x * x : x * x;\n}\n\nexport function powish(transform) {\n  var scale = transform(identity, identity),\n      exponent = 1;\n\n  function rescale() {\n    return exponent === 1 ? transform(identity, identity)\n        : exponent === 0.5 ? transform(transformSqrt, transformSquare)\n        : transform(transformPow(exponent), transformPow(1 / exponent));\n  }\n\n  scale.exponent = function(_) {\n    return arguments.length ? (exponent = +_, rescale()) : exponent;\n  };\n\n  return linearish(scale);\n}\n\nexport default function pow() {\n  var scale = powish(transformer());\n\n  scale.copy = function() {\n    return copy(scale, pow()).exponent(scale.exponent());\n  };\n\n  initRange.apply(scale, arguments);\n\n  return scale;\n}\n\nexport function sqrt() {\n  return pow.apply(null, arguments).exponent(0.5);\n}\n", "import {ascending, bisect, quantileSorted as threshold} from \"d3-array\";\nimport {initRange} from \"./init.js\";\n\nexport default function quantile() {\n  var domain = [],\n      range = [],\n      thresholds = [],\n      unknown;\n\n  function rescale() {\n    var i = 0, n = Math.max(1, range.length);\n    thresholds = new Array(n - 1);\n    while (++i < n) thresholds[i - 1] = threshold(domain, i / n);\n    return scale;\n  }\n\n  function scale(x) {\n    return x == null || isNaN(x = +x) ? unknown : range[bisect(thresholds, x)];\n  }\n\n  scale.invertExtent = function(y) {\n    var i = range.indexOf(y);\n    return i < 0 ? [NaN, NaN] : [\n      i > 0 ? thresholds[i - 1] : domain[0],\n      i < thresholds.length ? thresholds[i] : domain[domain.length - 1]\n    ];\n  };\n\n  scale.domain = function(_) {\n    if (!arguments.length) return domain.slice();\n    domain = [];\n    for (let d of _) if (d != null && !isNaN(d = +d)) domain.push(d);\n    domain.sort(ascending);\n    return rescale();\n  };\n\n  scale.range = function(_) {\n    return arguments.length ? (range = Array.from(_), rescale()) : range.slice();\n  };\n\n  scale.unknown = function(_) {\n    return arguments.length ? (unknown = _, scale) : unknown;\n  };\n\n  scale.quantiles = function() {\n    return thresholds.slice();\n  };\n\n  scale.copy = function() {\n    return quantile()\n        .domain(domain)\n        .range(range)\n        .unknown(unknown);\n  };\n\n  return initRange.apply(scale, arguments);\n}\n", "import {bisect} from \"d3-array\";\nimport {initRange} from \"./init.js\";\n\nexport default function threshold() {\n  var domain = [0.5],\n      range = [0, 1],\n      unknown,\n      n = 1;\n\n  function scale(x) {\n    return x != null && x <= x ? range[bisect(domain, x, 0, n)] : unknown;\n  }\n\n  scale.domain = function(_) {\n    return arguments.length ? (domain = Array.from(_), n = Math.min(domain.length, range.length - 1), scale) : domain.slice();\n  };\n\n  scale.range = function(_) {\n    return arguments.length ? (range = Array.from(_), n = Math.min(domain.length, range.length - 1), scale) : range.slice();\n  };\n\n  scale.invertExtent = function(y) {\n    var i = range.indexOf(y);\n    return [domain[i - 1], domain[i]];\n  };\n\n  scale.unknown = function(_) {\n    return arguments.length ? (unknown = _, scale) : unknown;\n  };\n\n  scale.copy = function() {\n    return threshold()\n        .domain(domain)\n        .range(range)\n        .unknown(unknown);\n  };\n\n  return initRange.apply(scale, arguments);\n}\n", "const t0 = new Date, t1 = new Date;\n\nexport function timeInterval(floori, offseti, count, field) {\n\n  function interval(date) {\n    return floori(date = arguments.length === 0 ? new Date : new Date(+date)), date;\n  }\n\n  interval.floor = (date) => {\n    return floori(date = new Date(+date)), date;\n  };\n\n  interval.ceil = (date) => {\n    return floori(date = new Date(date - 1)), offseti(date, 1), floori(date), date;\n  };\n\n  interval.round = (date) => {\n    const d0 = interval(date), d1 = interval.ceil(date);\n    return date - d0 < d1 - date ? d0 : d1;\n  };\n\n  interval.offset = (date, step) => {\n    return offseti(date = new Date(+date), step == null ? 1 : Math.floor(step)), date;\n  };\n\n  interval.range = (start, stop, step) => {\n    const range = [];\n    start = interval.ceil(start);\n    step = step == null ? 1 : Math.floor(step);\n    if (!(start < stop) || !(step > 0)) return range; // also handles Invalid Date\n    let previous;\n    do range.push(previous = new Date(+start)), offseti(start, step), floori(start);\n    while (previous < start && start < stop);\n    return range;\n  };\n\n  interval.filter = (test) => {\n    return timeInterval((date) => {\n      if (date >= date) while (floori(date), !test(date)) date.setTime(date - 1);\n    }, (date, step) => {\n      if (date >= date) {\n        if (step < 0) while (++step <= 0) {\n          while (offseti(date, -1), !test(date)) {} // eslint-disable-line no-empty\n        } else while (--step >= 0) {\n          while (offseti(date, +1), !test(date)) {} // eslint-disable-line no-empty\n        }\n      }\n    });\n  };\n\n  if (count) {\n    interval.count = (start, end) => {\n      t0.setTime(+start), t1.setTime(+end);\n      floori(t0), floori(t1);\n      return Math.floor(count(t0, t1));\n    };\n\n    interval.every = (step) => {\n      step = Math.floor(step);\n      return !isFinite(step) || !(step > 0) ? null\n          : !(step > 1) ? interval\n          : interval.filter(field\n              ? (d) => field(d) % step === 0\n              : (d) => interval.count(0, d) % step === 0);\n    };\n  }\n\n  return interval;\n}\n", "import {timeInterval} from \"./interval.js\";\n\nexport const millisecond = timeInterval(() => {\n  // noop\n}, (date, step) => {\n  date.setTime(+date + step);\n}, (start, end) => {\n  return end - start;\n});\n\n// An optimized implementation for this simple case.\nmillisecond.every = (k) => {\n  k = Math.floor(k);\n  if (!isFinite(k) || !(k > 0)) return null;\n  if (!(k > 1)) return millisecond;\n  return timeInterval((date) => {\n    date.setTime(Math.floor(date / k) * k);\n  }, (date, step) => {\n    date.setTime(+date + step * k);\n  }, (start, end) => {\n    return (end - start) / k;\n  });\n};\n\nexport const milliseconds = millisecond.range;\n", "import {timeInterval} from \"./interval.js\";\nimport {durationSecond} from \"./duration.js\";\n\nexport const second = timeInterval((date) => {\n  date.setTime(date - date.getMilliseconds());\n}, (date, step) => {\n  date.setTime(+date + step * durationSecond);\n}, (start, end) => {\n  return (end - start) / durationSecond;\n}, (date) => {\n  return date.getUTCSeconds();\n});\n\nexport const seconds = second.range;\n", "import {timeInterval} from \"./interval.js\";\nimport {durationMinute, durationSecond} from \"./duration.js\";\n\nexport const timeMinute = timeInterval((date) => {\n  date.setTime(date - date.getMilliseconds() - date.getSeconds() * durationSecond);\n}, (date, step) => {\n  date.setTime(+date + step * durationMinute);\n}, (start, end) => {\n  return (end - start) / durationMinute;\n}, (date) => {\n  return date.getMinutes();\n});\n\nexport const timeMinutes = timeMinute.range;\n\nexport const utcMinute = timeInterval((date) => {\n  date.setUTCSeconds(0, 0);\n}, (date, step) => {\n  date.setTime(+date + step * durationMinute);\n}, (start, end) => {\n  return (end - start) / durationMinute;\n}, (date) => {\n  return date.getUTCMinutes();\n});\n\nexport const utcMinutes = utcMinute.range;\n", "import {timeInterval} from \"./interval.js\";\nimport {durationHour, durationMinute, durationSecond} from \"./duration.js\";\n\nexport const timeHour = timeInterval((date) => {\n  date.setTime(date - date.getMilliseconds() - date.getSeconds() * durationSecond - date.getMinutes() * durationMinute);\n}, (date, step) => {\n  date.setTime(+date + step * durationHour);\n}, (start, end) => {\n  return (end - start) / durationHour;\n}, (date) => {\n  return date.getHours();\n});\n\nexport const timeHours = timeHour.range;\n\nexport const utcHour = timeInterval((date) => {\n  date.setUTCMinutes(0, 0, 0);\n}, (date, step) => {\n  date.setTime(+date + step * durationHour);\n}, (start, end) => {\n  return (end - start) / durationHour;\n}, (date) => {\n  return date.getUTCHours();\n});\n\nexport const utcHours = utcHour.range;\n", "import {timeInterval} from \"./interval.js\";\nimport {durationDay, durationMinute} from \"./duration.js\";\n\nexport const timeDay = timeInterval(\n  date => date.setHours(0, 0, 0, 0),\n  (date, step) => date.setDate(date.getDate() + step),\n  (start, end) => (end - start - (end.getTimezoneOffset() - start.getTimezoneOffset()) * durationMinute) / durationDay,\n  date => date.getDate() - 1\n);\n\nexport const timeDays = timeDay.range;\n\nexport const utcDay = timeInterval((date) => {\n  date.setUTCHours(0, 0, 0, 0);\n}, (date, step) => {\n  date.setUTCDate(date.getUTCDate() + step);\n}, (start, end) => {\n  return (end - start) / durationDay;\n}, (date) => {\n  return date.getUTCDate() - 1;\n});\n\nexport const utcDays = utcDay.range;\n\nexport const unixDay = timeInterval((date) => {\n  date.setUTCHours(0, 0, 0, 0);\n}, (date, step) => {\n  date.setUTCDate(date.getUTCDate() + step);\n}, (start, end) => {\n  return (end - start) / durationDay;\n}, (date) => {\n  return Math.floor(date / durationDay);\n});\n\nexport const unixDays = unixDay.range;\n", "import {timeInterval} from \"./interval.js\";\nimport {durationMinute, durationWeek} from \"./duration.js\";\n\nfunction timeWeekday(i) {\n  return timeInterval((date) => {\n    date.setDate(date.getDate() - (date.getDay() + 7 - i) % 7);\n    date.setHours(0, 0, 0, 0);\n  }, (date, step) => {\n    date.setDate(date.getDate() + step * 7);\n  }, (start, end) => {\n    return (end - start - (end.getTimezoneOffset() - start.getTimezoneOffset()) * durationMinute) / durationWeek;\n  });\n}\n\nexport const timeSunday = timeWeekday(0);\nexport const timeMonday = timeWeekday(1);\nexport const timeTuesday = timeWeekday(2);\nexport const timeWednesday = timeWeekday(3);\nexport const timeThursday = timeWeekday(4);\nexport const timeFriday = timeWeekday(5);\nexport const timeSaturday = timeWeekday(6);\n\nexport const timeSundays = timeSunday.range;\nexport const timeMondays = timeMonday.range;\nexport const timeTuesdays = timeTuesday.range;\nexport const timeWednesdays = timeWednesday.range;\nexport const timeThursdays = timeThursday.range;\nexport const timeFridays = timeFriday.range;\nexport const timeSaturdays = timeSaturday.range;\n\nfunction utcWeekday(i) {\n  return timeInterval((date) => {\n    date.setUTCDate(date.getUTCDate() - (date.getUTCDay() + 7 - i) % 7);\n    date.setUTCHours(0, 0, 0, 0);\n  }, (date, step) => {\n    date.setUTCDate(date.getUTCDate() + step * 7);\n  }, (start, end) => {\n    return (end - start) / durationWeek;\n  });\n}\n\nexport const utcSunday = utcWeekday(0);\nexport const utcMonday = utcWeekday(1);\nexport const utcTuesday = utcWeekday(2);\nexport const utcWednesday = utcWeekday(3);\nexport const utcThursday = utcWeekday(4);\nexport const utcFriday = utcWeekday(5);\nexport const utcSaturday = utcWeekday(6);\n\nexport const utcSundays = utcSunday.range;\nexport const utcMondays = utcMonday.range;\nexport const utcTuesdays = utcTuesday.range;\nexport const utcWednesdays = utcWednesday.range;\nexport const utcThursdays = utcThursday.range;\nexport const utcFridays = utcFriday.range;\nexport const utcSaturdays = utcSaturday.range;\n", "import {timeInterval} from \"./interval.js\";\n\nexport const timeMonth = timeInterval((date) => {\n  date.setDate(1);\n  date.setHours(0, 0, 0, 0);\n}, (date, step) => {\n  date.setMonth(date.getMonth() + step);\n}, (start, end) => {\n  return end.getMonth() - start.getMonth() + (end.getFullYear() - start.getFullYear()) * 12;\n}, (date) => {\n  return date.getMonth();\n});\n\nexport const timeMonths = timeMonth.range;\n\nexport const utcMonth = timeInterval((date) => {\n  date.setUTCDate(1);\n  date.setUTCHours(0, 0, 0, 0);\n}, (date, step) => {\n  date.setUTCMonth(date.getUTCMonth() + step);\n}, (start, end) => {\n  return end.getUTCMonth() - start.getUTCMonth() + (end.getUTCFullYear() - start.getUTCFullYear()) * 12;\n}, (date) => {\n  return date.getUTCMonth();\n});\n\nexport const utcMonths = utcMonth.range;\n", "import {timeInterval} from \"./interval.js\";\n\nexport const timeYear = timeInterval((date) => {\n  date.setMonth(0, 1);\n  date.setHours(0, 0, 0, 0);\n}, (date, step) => {\n  date.setFullYear(date.getFullYear() + step);\n}, (start, end) => {\n  return end.getFullYear() - start.getFullYear();\n}, (date) => {\n  return date.getFullYear();\n});\n\n// An optimized implementation for this simple case.\ntimeYear.every = (k) => {\n  return !isFinite(k = Math.floor(k)) || !(k > 0) ? null : timeInterval((date) => {\n    date.setFullYear(Math.floor(date.getFullYear() / k) * k);\n    date.setMonth(0, 1);\n    date.setHours(0, 0, 0, 0);\n  }, (date, step) => {\n    date.setFullYear(date.getFullYear() + step * k);\n  });\n};\n\nexport const timeYears = timeYear.range;\n\nexport const utcYear = timeInterval((date) => {\n  date.setUTCMonth(0, 1);\n  date.setUTCHours(0, 0, 0, 0);\n}, (date, step) => {\n  date.setUTCFullYear(date.getUTCFullYear() + step);\n}, (start, end) => {\n  return end.getUTCFullYear() - start.getUTCFullYear();\n}, (date) => {\n  return date.getUTCFullYear();\n});\n\n// An optimized implementation for this simple case.\nutcYear.every = (k) => {\n  return !isFinite(k = Math.floor(k)) || !(k > 0) ? null : timeInterval((date) => {\n    date.setUTCFullYear(Math.floor(date.getUTCFullYear() / k) * k);\n    date.setUTCMonth(0, 1);\n    date.setUTCHours(0, 0, 0, 0);\n  }, (date, step) => {\n    date.setUTCFullYear(date.getUTCFullYear() + step * k);\n  });\n};\n\nexport const utcYears = utcYear.range;\n", "import {bisector, tickStep} from \"d3-array\";\nimport {durationDay, durationHour, durationMinute, durationMonth, durationSecond, durationWeek, durationYear} from \"./duration.js\";\nimport {millisecond} from \"./millisecond.js\";\nimport {second} from \"./second.js\";\nimport {timeMinute, utcMinute} from \"./minute.js\";\nimport {timeHour, utcHour} from \"./hour.js\";\nimport {timeDay, unixDay} from \"./day.js\";\nimport {timeSunday, utcSunday} from \"./week.js\";\nimport {timeMonth, utcMonth} from \"./month.js\";\nimport {timeYear, utcYear} from \"./year.js\";\n\nfunction ticker(year, month, week, day, hour, minute) {\n\n  const tickIntervals = [\n    [second,  1,      durationSecond],\n    [second,  5,  5 * durationSecond],\n    [second, 15, 15 * durationSecond],\n    [second, 30, 30 * durationSecond],\n    [minute,  1,      durationMinute],\n    [minute,  5,  5 * durationMinute],\n    [minute, 15, 15 * durationMinute],\n    [minute, 30, 30 * durationMinute],\n    [  hour,  1,      durationHour  ],\n    [  hour,  3,  3 * durationHour  ],\n    [  hour,  6,  6 * durationHour  ],\n    [  hour, 12, 12 * durationHour  ],\n    [   day,  1,      durationDay   ],\n    [   day,  2,  2 * durationDay   ],\n    [  week,  1,      durationWeek  ],\n    [ month,  1,      durationMonth ],\n    [ month,  3,  3 * durationMonth ],\n    [  year,  1,      durationYear  ]\n  ];\n\n  function ticks(start, stop, count) {\n    const reverse = stop < start;\n    if (reverse) [start, stop] = [stop, start];\n    const interval = count && typeof count.range === \"function\" ? count : tickInterval(start, stop, count);\n    const ticks = interval ? interval.range(start, +stop + 1) : []; // inclusive stop\n    return reverse ? ticks.reverse() : ticks;\n  }\n\n  function tickInterval(start, stop, count) {\n    const target = Math.abs(stop - start) / count;\n    const i = bisector(([,, step]) => step).right(tickIntervals, target);\n    if (i === tickIntervals.length) return year.every(tickStep(start / durationYear, stop / durationYear, count));\n    if (i === 0) return millisecond.every(Math.max(tickStep(start, stop, count), 1));\n    const [t, step] = tickIntervals[target / tickIntervals[i - 1][2] < tickIntervals[i][2] / target ? i - 1 : i];\n    return t.every(step);\n  }\n\n  return [ticks, tickInterval];\n}\n\nconst [utcTicks, utcTickInterval] = ticker(utcYear, utcMonth, utcSunday, unixDay, utcHour, utcMinute);\nconst [timeTicks, timeTickInterval] = ticker(timeYear, timeMonth, timeSunday, timeDay, timeHour, timeMinute);\n\nexport {utcTicks, utcTickInterval, timeTicks, timeTickInterval};\n", "import {\n  timeDay,\n  timeSunday,\n  timeMonday,\n  timeThursday,\n  timeYear,\n  utcDay,\n  utcSunday,\n  utcMonday,\n  utcThursday,\n  utcYear\n} from \"d3-time\";\n\nfunction localDate(d) {\n  if (0 <= d.y && d.y < 100) {\n    var date = new Date(-1, d.m, d.d, d.H, d.M, d.S, d.L);\n    date.setFullYear(d.y);\n    return date;\n  }\n  return new Date(d.y, d.m, d.d, d.H, d.M, d.S, d.L);\n}\n\nfunction utcDate(d) {\n  if (0 <= d.y && d.y < 100) {\n    var date = new Date(Date.UTC(-1, d.m, d.d, d.H, d.M, d.S, d.L));\n    date.setUTCFullYear(d.y);\n    return date;\n  }\n  return new Date(Date.UTC(d.y, d.m, d.d, d.H, d.M, d.S, d.L));\n}\n\nfunction newDate(y, m, d) {\n  return {y: y, m: m, d: d, H: 0, M: 0, S: 0, L: 0};\n}\n\nexport default function formatLocale(locale) {\n  var locale_dateTime = locale.dateTime,\n      locale_date = locale.date,\n      locale_time = locale.time,\n      locale_periods = locale.periods,\n      locale_weekdays = locale.days,\n      locale_shortWeekdays = locale.shortDays,\n      locale_months = locale.months,\n      locale_shortMonths = locale.shortMonths;\n\n  var periodRe = formatRe(locale_periods),\n      periodLookup = formatLookup(locale_periods),\n      weekdayRe = formatRe(locale_weekdays),\n      weekdayLookup = formatLookup(locale_weekdays),\n      shortWeekdayRe = formatRe(locale_shortWeekdays),\n      shortWeekdayLookup = formatLookup(locale_shortWeekdays),\n      monthRe = formatRe(locale_months),\n      monthLookup = formatLookup(locale_months),\n      shortMonthRe = formatRe(locale_shortMonths),\n      shortMonthLookup = formatLookup(locale_shortMonths);\n\n  var formats = {\n    \"a\": formatShortWeekday,\n    \"A\": formatWeekday,\n    \"b\": formatShortMonth,\n    \"B\": formatMonth,\n    \"c\": null,\n    \"d\": formatDayOfMonth,\n    \"e\": formatDayOfMonth,\n    \"f\": formatMicroseconds,\n    \"g\": formatYearISO,\n    \"G\": formatFullYearISO,\n    \"H\": formatHour24,\n    \"I\": formatHour12,\n    \"j\": formatDayOfYear,\n    \"L\": formatMilliseconds,\n    \"m\": formatMonthNumber,\n    \"M\": formatMinutes,\n    \"p\": formatPeriod,\n    \"q\": formatQuarter,\n    \"Q\": formatUnixTimestamp,\n    \"s\": formatUnixTimestampSeconds,\n    \"S\": formatSeconds,\n    \"u\": formatWeekdayNumberMonday,\n    \"U\": formatWeekNumberSunday,\n    \"V\": formatWeekNumberISO,\n    \"w\": formatWeekdayNumberSunday,\n    \"W\": formatWeekNumberMonday,\n    \"x\": null,\n    \"X\": null,\n    \"y\": formatYear,\n    \"Y\": formatFullYear,\n    \"Z\": formatZone,\n    \"%\": formatLiteralPercent\n  };\n\n  var utcFormats = {\n    \"a\": formatUTCShortWeekday,\n    \"A\": formatUTCWeekday,\n    \"b\": formatUTCShortMonth,\n    \"B\": formatUTCMonth,\n    \"c\": null,\n    \"d\": formatUTCDayOfMonth,\n    \"e\": formatUTCDayOfMonth,\n    \"f\": formatUTCMicroseconds,\n    \"g\": formatUTCYearISO,\n    \"G\": formatUTCFullYearISO,\n    \"H\": formatUTCHour24,\n    \"I\": formatUTCHour12,\n    \"j\": formatUTCDayOfYear,\n    \"L\": formatUTCMilliseconds,\n    \"m\": formatUTCMonthNumber,\n    \"M\": formatUTCMinutes,\n    \"p\": formatUTCPeriod,\n    \"q\": formatUTCQuarter,\n    \"Q\": formatUnixTimestamp,\n    \"s\": formatUnixTimestampSeconds,\n    \"S\": formatUTCSeconds,\n    \"u\": formatUTCWeekdayNumberMonday,\n    \"U\": formatUTCWeekNumberSunday,\n    \"V\": formatUTCWeekNumberISO,\n    \"w\": formatUTCWeekdayNumberSunday,\n    \"W\": formatUTCWeekNumberMonday,\n    \"x\": null,\n    \"X\": null,\n    \"y\": formatUTCYear,\n    \"Y\": formatUTCFullYear,\n    \"Z\": formatUTCZone,\n    \"%\": formatLiteralPercent\n  };\n\n  var parses = {\n    \"a\": parseShortWeekday,\n    \"A\": parseWeekday,\n    \"b\": parseShortMonth,\n    \"B\": parseMonth,\n    \"c\": parseLocaleDateTime,\n    \"d\": parseDayOfMonth,\n    \"e\": parseDayOfMonth,\n    \"f\": parseMicroseconds,\n    \"g\": parseYear,\n    \"G\": parseFullYear,\n    \"H\": parseHour24,\n    \"I\": parseHour24,\n    \"j\": parseDayOfYear,\n    \"L\": parseMilliseconds,\n    \"m\": parseMonthNumber,\n    \"M\": parseMinutes,\n    \"p\": parsePeriod,\n    \"q\": parseQuarter,\n    \"Q\": parseUnixTimestamp,\n    \"s\": parseUnixTimestampSeconds,\n    \"S\": parseSeconds,\n    \"u\": parseWeekdayNumberMonday,\n    \"U\": parseWeekNumberSunday,\n    \"V\": parseWeekNumberISO,\n    \"w\": parseWeekdayNumberSunday,\n    \"W\": parseWeekNumberMonday,\n    \"x\": parseLocaleDate,\n    \"X\": parseLocaleTime,\n    \"y\": parseYear,\n    \"Y\": parseFullYear,\n    \"Z\": parseZone,\n    \"%\": parseLiteralPercent\n  };\n\n  // These recursive directive definitions must be deferred.\n  formats.x = newFormat(locale_date, formats);\n  formats.X = newFormat(locale_time, formats);\n  formats.c = newFormat(locale_dateTime, formats);\n  utcFormats.x = newFormat(locale_date, utcFormats);\n  utcFormats.X = newFormat(locale_time, utcFormats);\n  utcFormats.c = newFormat(locale_dateTime, utcFormats);\n\n  function newFormat(specifier, formats) {\n    return function(date) {\n      var string = [],\n          i = -1,\n          j = 0,\n          n = specifier.length,\n          c,\n          pad,\n          format;\n\n      if (!(date instanceof Date)) date = new Date(+date);\n\n      while (++i < n) {\n        if (specifier.charCodeAt(i) === 37) {\n          string.push(specifier.slice(j, i));\n          if ((pad = pads[c = specifier.charAt(++i)]) != null) c = specifier.charAt(++i);\n          else pad = c === \"e\" ? \" \" : \"0\";\n          if (format = formats[c]) c = format(date, pad);\n          string.push(c);\n          j = i + 1;\n        }\n      }\n\n      string.push(specifier.slice(j, i));\n      return string.join(\"\");\n    };\n  }\n\n  function newParse(specifier, Z) {\n    return function(string) {\n      var d = newDate(1900, undefined, 1),\n          i = parseSpecifier(d, specifier, string += \"\", 0),\n          week, day;\n      if (i != string.length) return null;\n\n      // If a UNIX timestamp is specified, return it.\n      if (\"Q\" in d) return new Date(d.Q);\n      if (\"s\" in d) return new Date(d.s * 1000 + (\"L\" in d ? d.L : 0));\n\n      // If this is utcParse, never use the local timezone.\n      if (Z && !(\"Z\" in d)) d.Z = 0;\n\n      // The am-pm flag is 0 for AM, and 1 for PM.\n      if (\"p\" in d) d.H = d.H % 12 + d.p * 12;\n\n      // If the month was not specified, inherit from the quarter.\n      if (d.m === undefined) d.m = \"q\" in d ? d.q : 0;\n\n      // Convert day-of-week and week-of-year to day-of-year.\n      if (\"V\" in d) {\n        if (d.V < 1 || d.V > 53) return null;\n        if (!(\"w\" in d)) d.w = 1;\n        if (\"Z\" in d) {\n          week = utcDate(newDate(d.y, 0, 1)), day = week.getUTCDay();\n          week = day > 4 || day === 0 ? utcMonday.ceil(week) : utcMonday(week);\n          week = utcDay.offset(week, (d.V - 1) * 7);\n          d.y = week.getUTCFullYear();\n          d.m = week.getUTCMonth();\n          d.d = week.getUTCDate() + (d.w + 6) % 7;\n        } else {\n          week = localDate(newDate(d.y, 0, 1)), day = week.getDay();\n          week = day > 4 || day === 0 ? timeMonday.ceil(week) : timeMonday(week);\n          week = timeDay.offset(week, (d.V - 1) * 7);\n          d.y = week.getFullYear();\n          d.m = week.getMonth();\n          d.d = week.getDate() + (d.w + 6) % 7;\n        }\n      } else if (\"W\" in d || \"U\" in d) {\n        if (!(\"w\" in d)) d.w = \"u\" in d ? d.u % 7 : \"W\" in d ? 1 : 0;\n        day = \"Z\" in d ? utcDate(newDate(d.y, 0, 1)).getUTCDay() : localDate(newDate(d.y, 0, 1)).getDay();\n        d.m = 0;\n        d.d = \"W\" in d ? (d.w + 6) % 7 + d.W * 7 - (day + 5) % 7 : d.w + d.U * 7 - (day + 6) % 7;\n      }\n\n      // If a time zone is specified, all fields are interpreted as UTC and then\n      // offset according to the specified time zone.\n      if (\"Z\" in d) {\n        d.H += d.Z / 100 | 0;\n        d.M += d.Z % 100;\n        return utcDate(d);\n      }\n\n      // Otherwise, all fields are in local time.\n      return localDate(d);\n    };\n  }\n\n  function parseSpecifier(d, specifier, string, j) {\n    var i = 0,\n        n = specifier.length,\n        m = string.length,\n        c,\n        parse;\n\n    while (i < n) {\n      if (j >= m) return -1;\n      c = specifier.charCodeAt(i++);\n      if (c === 37) {\n        c = specifier.charAt(i++);\n        parse = parses[c in pads ? specifier.charAt(i++) : c];\n        if (!parse || ((j = parse(d, string, j)) < 0)) return -1;\n      } else if (c != string.charCodeAt(j++)) {\n        return -1;\n      }\n    }\n\n    return j;\n  }\n\n  function parsePeriod(d, string, i) {\n    var n = periodRe.exec(string.slice(i));\n    return n ? (d.p = periodLookup.get(n[0].toLowerCase()), i + n[0].length) : -1;\n  }\n\n  function parseShortWeekday(d, string, i) {\n    var n = shortWeekdayRe.exec(string.slice(i));\n    return n ? (d.w = shortWeekdayLookup.get(n[0].toLowerCase()), i + n[0].length) : -1;\n  }\n\n  function parseWeekday(d, string, i) {\n    var n = weekdayRe.exec(string.slice(i));\n    return n ? (d.w = weekdayLookup.get(n[0].toLowerCase()), i + n[0].length) : -1;\n  }\n\n  function parseShortMonth(d, string, i) {\n    var n = shortMonthRe.exec(string.slice(i));\n    return n ? (d.m = shortMonthLookup.get(n[0].toLowerCase()), i + n[0].length) : -1;\n  }\n\n  function parseMonth(d, string, i) {\n    var n = monthRe.exec(string.slice(i));\n    return n ? (d.m = monthLookup.get(n[0].toLowerCase()), i + n[0].length) : -1;\n  }\n\n  function parseLocaleDateTime(d, string, i) {\n    return parseSpecifier(d, locale_dateTime, string, i);\n  }\n\n  function parseLocaleDate(d, string, i) {\n    return parseSpecifier(d, locale_date, string, i);\n  }\n\n  function parseLocaleTime(d, string, i) {\n    return parseSpecifier(d, locale_time, string, i);\n  }\n\n  function formatShortWeekday(d) {\n    return locale_shortWeekdays[d.getDay()];\n  }\n\n  function formatWeekday(d) {\n    return locale_weekdays[d.getDay()];\n  }\n\n  function formatShortMonth(d) {\n    return locale_shortMonths[d.getMonth()];\n  }\n\n  function formatMonth(d) {\n    return locale_months[d.getMonth()];\n  }\n\n  function formatPeriod(d) {\n    return locale_periods[+(d.getHours() >= 12)];\n  }\n\n  function formatQuarter(d) {\n    return 1 + ~~(d.getMonth() / 3);\n  }\n\n  function formatUTCShortWeekday(d) {\n    return locale_shortWeekdays[d.getUTCDay()];\n  }\n\n  function formatUTCWeekday(d) {\n    return locale_weekdays[d.getUTCDay()];\n  }\n\n  function formatUTCShortMonth(d) {\n    return locale_shortMonths[d.getUTCMonth()];\n  }\n\n  function formatUTCMonth(d) {\n    return locale_months[d.getUTCMonth()];\n  }\n\n  function formatUTCPeriod(d) {\n    return locale_periods[+(d.getUTCHours() >= 12)];\n  }\n\n  function formatUTCQuarter(d) {\n    return 1 + ~~(d.getUTCMonth() / 3);\n  }\n\n  return {\n    format: function(specifier) {\n      var f = newFormat(specifier += \"\", formats);\n      f.toString = function() { return specifier; };\n      return f;\n    },\n    parse: function(specifier) {\n      var p = newParse(specifier += \"\", false);\n      p.toString = function() { return specifier; };\n      return p;\n    },\n    utcFormat: function(specifier) {\n      var f = newFormat(specifier += \"\", utcFormats);\n      f.toString = function() { return specifier; };\n      return f;\n    },\n    utcParse: function(specifier) {\n      var p = newParse(specifier += \"\", true);\n      p.toString = function() { return specifier; };\n      return p;\n    }\n  };\n}\n\nvar pads = {\"-\": \"\", \"_\": \" \", \"0\": \"0\"},\n    numberRe = /^\\s*\\d+/, // note: ignores next directive\n    percentRe = /^%/,\n    requoteRe = /[\\\\^$*+?|[\\]().{}]/g;\n\nfunction pad(value, fill, width) {\n  var sign = value < 0 ? \"-\" : \"\",\n      string = (sign ? -value : value) + \"\",\n      length = string.length;\n  return sign + (length < width ? new Array(width - length + 1).join(fill) + string : string);\n}\n\nfunction requote(s) {\n  return s.replace(requoteRe, \"\\\\$&\");\n}\n\nfunction formatRe(names) {\n  return new RegExp(\"^(?:\" + names.map(requote).join(\"|\") + \")\", \"i\");\n}\n\nfunction formatLookup(names) {\n  return new Map(names.map((name, i) => [name.toLowerCase(), i]));\n}\n\nfunction parseWeekdayNumberSunday(d, string, i) {\n  var n = numberRe.exec(string.slice(i, i + 1));\n  return n ? (d.w = +n[0], i + n[0].length) : -1;\n}\n\nfunction parseWeekdayNumberMonday(d, string, i) {\n  var n = numberRe.exec(string.slice(i, i + 1));\n  return n ? (d.u = +n[0], i + n[0].length) : -1;\n}\n\nfunction parseWeekNumberSunday(d, string, i) {\n  var n = numberRe.exec(string.slice(i, i + 2));\n  return n ? (d.U = +n[0], i + n[0].length) : -1;\n}\n\nfunction parseWeekNumberISO(d, string, i) {\n  var n = numberRe.exec(string.slice(i, i + 2));\n  return n ? (d.V = +n[0], i + n[0].length) : -1;\n}\n\nfunction parseWeekNumberMonday(d, string, i) {\n  var n = numberRe.exec(string.slice(i, i + 2));\n  return n ? (d.W = +n[0], i + n[0].length) : -1;\n}\n\nfunction parseFullYear(d, string, i) {\n  var n = numberRe.exec(string.slice(i, i + 4));\n  return n ? (d.y = +n[0], i + n[0].length) : -1;\n}\n\nfunction parseYear(d, string, i) {\n  var n = numberRe.exec(string.slice(i, i + 2));\n  return n ? (d.y = +n[0] + (+n[0] > 68 ? 1900 : 2000), i + n[0].length) : -1;\n}\n\nfunction parseZone(d, string, i) {\n  var n = /^(Z)|([+-]\\d\\d)(?::?(\\d\\d))?/.exec(string.slice(i, i + 6));\n  return n ? (d.Z = n[1] ? 0 : -(n[2] + (n[3] || \"00\")), i + n[0].length) : -1;\n}\n\nfunction parseQuarter(d, string, i) {\n  var n = numberRe.exec(string.slice(i, i + 1));\n  return n ? (d.q = n[0] * 3 - 3, i + n[0].length) : -1;\n}\n\nfunction parseMonthNumber(d, string, i) {\n  var n = numberRe.exec(string.slice(i, i + 2));\n  return n ? (d.m = n[0] - 1, i + n[0].length) : -1;\n}\n\nfunction parseDayOfMonth(d, string, i) {\n  var n = numberRe.exec(string.slice(i, i + 2));\n  return n ? (d.d = +n[0], i + n[0].length) : -1;\n}\n\nfunction parseDayOfYear(d, string, i) {\n  var n = numberRe.exec(string.slice(i, i + 3));\n  return n ? (d.m = 0, d.d = +n[0], i + n[0].length) : -1;\n}\n\nfunction parseHour24(d, string, i) {\n  var n = numberRe.exec(string.slice(i, i + 2));\n  return n ? (d.H = +n[0], i + n[0].length) : -1;\n}\n\nfunction parseMinutes(d, string, i) {\n  var n = numberRe.exec(string.slice(i, i + 2));\n  return n ? (d.M = +n[0], i + n[0].length) : -1;\n}\n\nfunction parseSeconds(d, string, i) {\n  var n = numberRe.exec(string.slice(i, i + 2));\n  return n ? (d.S = +n[0], i + n[0].length) : -1;\n}\n\nfunction parseMilliseconds(d, string, i) {\n  var n = numberRe.exec(string.slice(i, i + 3));\n  return n ? (d.L = +n[0], i + n[0].length) : -1;\n}\n\nfunction parseMicroseconds(d, string, i) {\n  var n = numberRe.exec(string.slice(i, i + 6));\n  return n ? (d.L = Math.floor(n[0] / 1000), i + n[0].length) : -1;\n}\n\nfunction parseLiteralPercent(d, string, i) {\n  var n = percentRe.exec(string.slice(i, i + 1));\n  return n ? i + n[0].length : -1;\n}\n\nfunction parseUnixTimestamp(d, string, i) {\n  var n = numberRe.exec(string.slice(i));\n  return n ? (d.Q = +n[0], i + n[0].length) : -1;\n}\n\nfunction parseUnixTimestampSeconds(d, string, i) {\n  var n = numberRe.exec(string.slice(i));\n  return n ? (d.s = +n[0], i + n[0].length) : -1;\n}\n\nfunction formatDayOfMonth(d, p) {\n  return pad(d.getDate(), p, 2);\n}\n\nfunction formatHour24(d, p) {\n  return pad(d.getHours(), p, 2);\n}\n\nfunction formatHour12(d, p) {\n  return pad(d.getHours() % 12 || 12, p, 2);\n}\n\nfunction formatDayOfYear(d, p) {\n  return pad(1 + timeDay.count(timeYear(d), d), p, 3);\n}\n\nfunction formatMilliseconds(d, p) {\n  return pad(d.getMilliseconds(), p, 3);\n}\n\nfunction formatMicroseconds(d, p) {\n  return formatMilliseconds(d, p) + \"000\";\n}\n\nfunction formatMonthNumber(d, p) {\n  return pad(d.getMonth() + 1, p, 2);\n}\n\nfunction formatMinutes(d, p) {\n  return pad(d.getMinutes(), p, 2);\n}\n\nfunction formatSeconds(d, p) {\n  return pad(d.getSeconds(), p, 2);\n}\n\nfunction formatWeekdayNumberMonday(d) {\n  var day = d.getDay();\n  return day === 0 ? 7 : day;\n}\n\nfunction formatWeekNumberSunday(d, p) {\n  return pad(timeSunday.count(timeYear(d) - 1, d), p, 2);\n}\n\nfunction dISO(d) {\n  var day = d.getDay();\n  return (day >= 4 || day === 0) ? timeThursday(d) : timeThursday.ceil(d);\n}\n\nfunction formatWeekNumberISO(d, p) {\n  d = dISO(d);\n  return pad(timeThursday.count(timeYear(d), d) + (timeYear(d).getDay() === 4), p, 2);\n}\n\nfunction formatWeekdayNumberSunday(d) {\n  return d.getDay();\n}\n\nfunction formatWeekNumberMonday(d, p) {\n  return pad(timeMonday.count(timeYear(d) - 1, d), p, 2);\n}\n\nfunction formatYear(d, p) {\n  return pad(d.getFullYear() % 100, p, 2);\n}\n\nfunction formatYearISO(d, p) {\n  d = dISO(d);\n  return pad(d.getFullYear() % 100, p, 2);\n}\n\nfunction formatFullYear(d, p) {\n  return pad(d.getFullYear() % 10000, p, 4);\n}\n\nfunction formatFullYearISO(d, p) {\n  var day = d.getDay();\n  d = (day >= 4 || day === 0) ? timeThursday(d) : timeThursday.ceil(d);\n  return pad(d.getFullYear() % 10000, p, 4);\n}\n\nfunction formatZone(d) {\n  var z = d.getTimezoneOffset();\n  return (z > 0 ? \"-\" : (z *= -1, \"+\"))\n      + pad(z / 60 | 0, \"0\", 2)\n      + pad(z % 60, \"0\", 2);\n}\n\nfunction formatUTCDayOfMonth(d, p) {\n  return pad(d.getUTCDate(), p, 2);\n}\n\nfunction formatUTCHour24(d, p) {\n  return pad(d.getUTCHours(), p, 2);\n}\n\nfunction formatUTCHour12(d, p) {\n  return pad(d.getUTCHours() % 12 || 12, p, 2);\n}\n\nfunction formatUTCDayOfYear(d, p) {\n  return pad(1 + utcDay.count(utcYear(d), d), p, 3);\n}\n\nfunction formatUTCMilliseconds(d, p) {\n  return pad(d.getUTCMilliseconds(), p, 3);\n}\n\nfunction formatUTCMicroseconds(d, p) {\n  return formatUTCMilliseconds(d, p) + \"000\";\n}\n\nfunction formatUTCMonthNumber(d, p) {\n  return pad(d.getUTCMonth() + 1, p, 2);\n}\n\nfunction formatUTCMinutes(d, p) {\n  return pad(d.getUTCMinutes(), p, 2);\n}\n\nfunction formatUTCSeconds(d, p) {\n  return pad(d.getUTCSeconds(), p, 2);\n}\n\nfunction formatUTCWeekdayNumberMonday(d) {\n  var dow = d.getUTCDay();\n  return dow === 0 ? 7 : dow;\n}\n\nfunction formatUTCWeekNumberSunday(d, p) {\n  return pad(utcSunday.count(utcYear(d) - 1, d), p, 2);\n}\n\nfunction UTCdISO(d) {\n  var day = d.getUTCDay();\n  return (day >= 4 || day === 0) ? utcThursday(d) : utcThursday.ceil(d);\n}\n\nfunction formatUTCWeekNumberISO(d, p) {\n  d = UTCdISO(d);\n  return pad(utcThursday.count(utcYear(d), d) + (utcYear(d).getUTCDay() === 4), p, 2);\n}\n\nfunction formatUTCWeekdayNumberSunday(d) {\n  return d.getUTCDay();\n}\n\nfunction formatUTCWeekNumberMonday(d, p) {\n  return pad(utcMonday.count(utcYear(d) - 1, d), p, 2);\n}\n\nfunction formatUTCYear(d, p) {\n  return pad(d.getUTCFullYear() % 100, p, 2);\n}\n\nfunction formatUTCYearISO(d, p) {\n  d = UTCdISO(d);\n  return pad(d.getUTCFullYear() % 100, p, 2);\n}\n\nfunction formatUTCFullYear(d, p) {\n  return pad(d.getUTCFullYear() % 10000, p, 4);\n}\n\nfunction formatUTCFullYearISO(d, p) {\n  var day = d.getUTCDay();\n  d = (day >= 4 || day === 0) ? utcThursday(d) : utcThursday.ceil(d);\n  return pad(d.getUTCFullYear() % 10000, p, 4);\n}\n\nfunction formatUTCZone() {\n  return \"+0000\";\n}\n\nfunction formatLiteralPercent() {\n  return \"%\";\n}\n\nfunction formatUnixTimestamp(d) {\n  return +d;\n}\n\nfunction formatUnixTimestampSeconds(d) {\n  return Math.floor(+d / 1000);\n}\n", "import formatLocale from \"./locale.js\";\n\nvar locale;\nexport var timeFormat;\nexport var timeParse;\nexport var utcFormat;\nexport var utcParse;\n\ndefaultLocale({\n  dateTime: \"%x, %X\",\n  date: \"%-m/%-d/%Y\",\n  time: \"%-I:%M:%S %p\",\n  periods: [\"AM\", \"PM\"],\n  days: [\"Sunday\", \"Monday\", \"Tuesday\", \"Wednesday\", \"Thursday\", \"Friday\", \"Saturday\"],\n  shortDays: [\"Sun\", \"Mon\", \"Tue\", \"Wed\", \"Thu\", \"Fri\", \"Sat\"],\n  months: [\"January\", \"February\", \"March\", \"April\", \"May\", \"June\", \"July\", \"August\", \"September\", \"October\", \"November\", \"December\"],\n  shortMonths: [\"Jan\", \"Feb\", \"Mar\", \"Apr\", \"May\", \"Jun\", \"Jul\", \"Aug\", \"Sep\", \"Oct\", \"Nov\", \"Dec\"]\n});\n\nexport default function defaultLocale(definition) {\n  locale = formatLocale(definition);\n  timeFormat = locale.format;\n  timeParse = locale.parse;\n  utcFormat = locale.utcFormat;\n  utcParse = locale.utcParse;\n  return locale;\n}\n", "import {timeYear, timeMonth, timeWeek, timeDay, timeHour, timeMinute, timeSecond, timeTicks, timeTickInterval} from \"d3-time\";\nimport {timeFormat} from \"d3-time-format\";\nimport continuous, {copy} from \"./continuous.js\";\nimport {initRange} from \"./init.js\";\nimport nice from \"./nice.js\";\n\nfunction date(t) {\n  return new Date(t);\n}\n\nfunction number(t) {\n  return t instanceof Date ? +t : +new Date(+t);\n}\n\nexport function calendar(ticks, tickInterval, year, month, week, day, hour, minute, second, format) {\n  var scale = continuous(),\n      invert = scale.invert,\n      domain = scale.domain;\n\n  var formatMillisecond = format(\".%L\"),\n      formatSecond = format(\":%S\"),\n      formatMinute = format(\"%I:%M\"),\n      formatHour = format(\"%I %p\"),\n      formatDay = format(\"%a %d\"),\n      formatWeek = format(\"%b %d\"),\n      formatMonth = format(\"%B\"),\n      formatYear = format(\"%Y\");\n\n  function tickFormat(date) {\n    return (second(date) < date ? formatMillisecond\n        : minute(date) < date ? formatSecond\n        : hour(date) < date ? formatMinute\n        : day(date) < date ? formatHour\n        : month(date) < date ? (week(date) < date ? formatDay : formatWeek)\n        : year(date) < date ? formatMonth\n        : formatYear)(date);\n  }\n\n  scale.invert = function(y) {\n    return new Date(invert(y));\n  };\n\n  scale.domain = function(_) {\n    return arguments.length ? domain(Array.from(_, number)) : domain().map(date);\n  };\n\n  scale.ticks = function(interval) {\n    var d = domain();\n    return ticks(d[0], d[d.length - 1], interval == null ? 10 : interval);\n  };\n\n  scale.tickFormat = function(count, specifier) {\n    return specifier == null ? tickFormat : format(specifier);\n  };\n\n  scale.nice = function(interval) {\n    var d = domain();\n    if (!interval || typeof interval.range !== \"function\") interval = tickInterval(d[0], d[d.length - 1], interval == null ? 10 : interval);\n    return interval ? domain(nice(d, interval)) : scale;\n  };\n\n  scale.copy = function() {\n    return copy(scale, calendar(ticks, tickInterval, year, month, week, day, hour, minute, second, format));\n  };\n\n  return scale;\n}\n\nexport default function time() {\n  return initRange.apply(calendar(timeTicks, timeTickInterval, timeYear, timeMonth, timeWeek, timeDay, timeHour, timeMinute, timeSecond, timeFormat).domain([new Date(2000, 0, 1), new Date(2000, 0, 2)]), arguments);\n}\n", "import {utcYear, utcMonth, utcWeek, utcDay, utcHour, utcMinute, utcSecond, utcTicks, utcTickInterval} from \"d3-time\";\nimport {utcFormat} from \"d3-time-format\";\nimport {calendar} from \"./time.js\";\nimport {initRange} from \"./init.js\";\n\nexport default function utcTime() {\n  return initRange.apply(calendar(utcTicks, utcTickInterval, utcYear, utcMonth, utcWeek, utcDay, utcHour, utcMinute, utcSecond, utcFormat).domain([Date.UTC(2000, 0, 1), Date.UTC(2000, 0, 2)]), arguments);\n}\n", "import {interpolate, interpolateRound} from \"d3-interpolate\";\nimport {identity} from \"./continuous.js\";\nimport {initInterpolator} from \"./init.js\";\nimport {linearish} from \"./linear.js\";\nimport {loggish} from \"./log.js\";\nimport {symlogish} from \"./symlog.js\";\nimport {powish} from \"./pow.js\";\n\nfunction transformer() {\n  var x0 = 0,\n      x1 = 1,\n      t0,\n      t1,\n      k10,\n      transform,\n      interpolator = identity,\n      clamp = false,\n      unknown;\n\n  function scale(x) {\n    return x == null || isNaN(x = +x) ? unknown : interpolator(k10 === 0 ? 0.5 : (x = (transform(x) - t0) * k10, clamp ? Math.max(0, Math.min(1, x)) : x));\n  }\n\n  scale.domain = function(_) {\n    return arguments.length ? ([x0, x1] = _, t0 = transform(x0 = +x0), t1 = transform(x1 = +x1), k10 = t0 === t1 ? 0 : 1 / (t1 - t0), scale) : [x0, x1];\n  };\n\n  scale.clamp = function(_) {\n    return arguments.length ? (clamp = !!_, scale) : clamp;\n  };\n\n  scale.interpolator = function(_) {\n    return arguments.length ? (interpolator = _, scale) : interpolator;\n  };\n\n  function range(interpolate) {\n    return function(_) {\n      var r0, r1;\n      return arguments.length ? ([r0, r1] = _, interpolator = interpolate(r0, r1), scale) : [interpolator(0), interpolator(1)];\n    };\n  }\n\n  scale.range = range(interpolate);\n\n  scale.rangeRound = range(interpolateRound);\n\n  scale.unknown = function(_) {\n    return arguments.length ? (unknown = _, scale) : unknown;\n  };\n\n  return function(t) {\n    transform = t, t0 = t(x0), t1 = t(x1), k10 = t0 === t1 ? 0 : 1 / (t1 - t0);\n    return scale;\n  };\n}\n\nexport function copy(source, target) {\n  return target\n      .domain(source.domain())\n      .interpolator(source.interpolator())\n      .clamp(source.clamp())\n      .unknown(source.unknown());\n}\n\nexport default function sequential() {\n  var scale = linearish(transformer()(identity));\n\n  scale.copy = function() {\n    return copy(scale, sequential());\n  };\n\n  return initInterpolator.apply(scale, arguments);\n}\n\nexport function sequentialLog() {\n  var scale = loggish(transformer()).domain([1, 10]);\n\n  scale.copy = function() {\n    return copy(scale, sequentialLog()).base(scale.base());\n  };\n\n  return initInterpolator.apply(scale, arguments);\n}\n\nexport function sequentialSymlog() {\n  var scale = symlogish(transformer());\n\n  scale.copy = function() {\n    return copy(scale, sequentialSymlog()).constant(scale.constant());\n  };\n\n  return initInterpolator.apply(scale, arguments);\n}\n\nexport function sequentialPow() {\n  var scale = powish(transformer());\n\n  scale.copy = function() {\n    return copy(scale, sequentialPow()).exponent(scale.exponent());\n  };\n\n  return initInterpolator.apply(scale, arguments);\n}\n\nexport function sequentialSqrt() {\n  return sequentialPow.apply(null, arguments).exponent(0.5);\n}\n", "import {interpolate, interpolateRound, piecewise} from \"d3-interpolate\";\nimport {identity} from \"./continuous.js\";\nimport {initInterpolator} from \"./init.js\";\nimport {linearish} from \"./linear.js\";\nimport {loggish} from \"./log.js\";\nimport {copy} from \"./sequential.js\";\nimport {symlogish} from \"./symlog.js\";\nimport {powish} from \"./pow.js\";\n\nfunction transformer() {\n  var x0 = 0,\n      x1 = 0.5,\n      x2 = 1,\n      s = 1,\n      t0,\n      t1,\n      t2,\n      k10,\n      k21,\n      interpolator = identity,\n      transform,\n      clamp = false,\n      unknown;\n\n  function scale(x) {\n    return isNaN(x = +x) ? unknown : (x = 0.5 + ((x = +transform(x)) - t1) * (s * x < s * t1 ? k10 : k21), interpolator(clamp ? Math.max(0, Math.min(1, x)) : x));\n  }\n\n  scale.domain = function(_) {\n    return arguments.length ? ([x0, x1, x2] = _, t0 = transform(x0 = +x0), t1 = transform(x1 = +x1), t2 = transform(x2 = +x2), k10 = t0 === t1 ? 0 : 0.5 / (t1 - t0), k21 = t1 === t2 ? 0 : 0.5 / (t2 - t1), s = t1 < t0 ? -1 : 1, scale) : [x0, x1, x2];\n  };\n\n  scale.clamp = function(_) {\n    return arguments.length ? (clamp = !!_, scale) : clamp;\n  };\n\n  scale.interpolator = function(_) {\n    return arguments.length ? (interpolator = _, scale) : interpolator;\n  };\n\n  function range(interpolate) {\n    return function(_) {\n      var r0, r1, r2;\n      return arguments.length ? ([r0, r1, r2] = _, interpolator = piecewise(interpolate, [r0, r1, r2]), scale) : [interpolator(0), interpolator(0.5), interpolator(1)];\n    };\n  }\n\n  scale.range = range(interpolate);\n\n  scale.rangeRound = range(interpolateRound);\n\n  scale.unknown = function(_) {\n    return arguments.length ? (unknown = _, scale) : unknown;\n  };\n\n  return function(t) {\n    transform = t, t0 = t(x0), t1 = t(x1), t2 = t(x2), k10 = t0 === t1 ? 0 : 0.5 / (t1 - t0), k21 = t1 === t2 ? 0 : 0.5 / (t2 - t1), s = t1 < t0 ? -1 : 1;\n    return scale;\n  };\n}\n\nexport default function diverging() {\n  var scale = linearish(transformer()(identity));\n\n  scale.copy = function() {\n    return copy(scale, diverging());\n  };\n\n  return initInterpolator.apply(scale, arguments);\n}\n\nexport function divergingLog() {\n  var scale = loggish(transformer()).domain([0.1, 1, 10]);\n\n  scale.copy = function() {\n    return copy(scale, divergingLog()).base(scale.base());\n  };\n\n  return initInterpolator.apply(scale, arguments);\n}\n\nexport function divergingSymlog() {\n  var scale = symlogish(transformer());\n\n  scale.copy = function() {\n    return copy(scale, divergingSymlog()).constant(scale.constant());\n  };\n\n  return initInterpolator.apply(scale, arguments);\n}\n\nexport function divergingPow() {\n  var scale = powish(transformer());\n\n  scale.copy = function() {\n    return copy(scale, divergingPow()).exponent(scale.exponent());\n  };\n\n  return initInterpolator.apply(scale, arguments);\n}\n\nexport function divergingSqrt() {\n  return divergingPow.apply(null, arguments).exponent(0.5);\n}\n", "export default function(specifier) {\n  var n = specifier.length / 6 | 0, colors = new Array(n), i = 0;\n  while (i < n) colors[i] = \"#\" + specifier.slice(i * 6, ++i * 6);\n  return colors;\n}\n", "import colors from \"../colors.js\";\n\nexport default colors(\"1f77b4ff7f0e2ca02cd627289467bd8c564be377c27f7f7fbcbd2217becf\");\n", "import colors from \"../colors.js\";\n\nexport default colors(\"7fc97fbeaed4fdc086ffff99386cb0f0027fbf5b17666666\");\n", "import colors from \"../colors.js\";\n\nexport default colors(\"1b9e77d95f027570b3e7298a66a61ee6ab02a6761d666666\");\n", "import colors from \"../colors.js\";\n\nexport default colors(\"a6cee31f78b4b2df8a33a02cfb9a99e31a1cfdbf6fff7f00cab2d66a3d9affff99b15928\");\n", "import colors from \"../colors.js\";\n\nexport default colors(\"fbb4aeb3cde3ccebc5decbe4fed9a6ffffcce5d8bdfddaecf2f2f2\");\n", "import colors from \"../colors.js\";\n\nexport default colors(\"b3e2cdfdcdaccbd5e8f4cae4e6f5c9fff2aef1e2cccccccc\");\n", "import colors from \"../colors.js\";\n\nexport default colors(\"e41a1c377eb84daf4a984ea3ff7f00ffff33a65628f781bf999999\");\n", "import colors from \"../colors.js\";\n\nexport default colors(\"66c2a5fc8d628da0cbe78ac3a6d854ffd92fe5c494b3b3b3\");\n", "import colors from \"../colors.js\";\n\nexport default colors(\"8dd3c7ffffb3bebadafb807280b1d3fdb462b3de69fccde5d9d9d9bc80bdccebc5ffed6f\");\n", "import colors from \"../colors.js\";\n\nexport default colors(\"4e79a7f28e2ce1575976b7b259a14fedc949af7aa1ff9da79c755fbab0ab\");\n", "import {interpolateRgbBasis} from \"d3-interpolate\";\n\nexport default scheme => interpolateRgbBasis(scheme[scheme.length - 1]);\n", "import colors from \"../colors.js\";\nimport ramp from \"../ramp.js\";\n\nexport var scheme = new Array(3).concat(\n  \"d8b365f5f5f55ab4ac\",\n  \"a6611adfc27d80cdc1018571\",\n  \"a6611adfc27df5f5f580cdc1018571\",\n  \"8c510ad8b365f6e8c3c7eae55ab4ac01665e\",\n  \"8c510ad8b365f6e8c3f5f5f5c7eae55ab4ac01665e\",\n  \"8c510abf812ddfc27df6e8c3c7eae580cdc135978f01665e\",\n  \"8c510abf812ddfc27df6e8c3f5f5f5c7eae580cdc135978f01665e\",\n  \"5430058c510abf812ddfc27df6e8c3c7eae580cdc135978f01665e003c30\",\n  \"5430058c510abf812ddfc27df6e8c3f5f5f5c7eae580cdc135978f01665e003c30\"\n).map(colors);\n\nexport default ramp(scheme);\n", "import colors from \"../colors.js\";\nimport ramp from \"../ramp.js\";\n\nexport var scheme = new Array(3).concat(\n  \"af8dc3f7f7f77fbf7b\",\n  \"7b3294c2a5cfa6dba0008837\",\n  \"7b3294c2a5cff7f7f7a6dba0008837\",\n  \"762a83af8dc3e7d4e8d9f0d37fbf7b1b7837\",\n  \"762a83af8dc3e7d4e8f7f7f7d9f0d37fbf7b1b7837\",\n  \"762a839970abc2a5cfe7d4e8d9f0d3a6dba05aae611b7837\",\n  \"762a839970abc2a5cfe7d4e8f7f7f7d9f0d3a6dba05aae611b7837\",\n  \"40004b762a839970abc2a5cfe7d4e8d9f0d3a6dba05aae611b783700441b\",\n  \"40004b762a839970abc2a5cfe7d4e8f7f7f7d9f0d3a6dba05aae611b783700441b\"\n).map(colors);\n\nexport default ramp(scheme);\n", "import colors from \"../colors.js\";\nimport ramp from \"../ramp.js\";\n\nexport var scheme = new Array(3).concat(\n  \"e9a3c9f7f7f7a1d76a\",\n  \"d01c8bf1b6dab8e1864dac26\",\n  \"d01c8bf1b6daf7f7f7b8e1864dac26\",\n  \"c51b7de9a3c9fde0efe6f5d0a1d76a4d9221\",\n  \"c51b7de9a3c9fde0eff7f7f7e6f5d0a1d76a4d9221\",\n  \"c51b7dde77aef1b6dafde0efe6f5d0b8e1867fbc414d9221\",\n  \"c51b7dde77aef1b6dafde0eff7f7f7e6f5d0b8e1867fbc414d9221\",\n  \"8e0152c51b7dde77aef1b6dafde0efe6f5d0b8e1867fbc414d9221276419\",\n  \"8e0152c51b7dde77aef1b6dafde0eff7f7f7e6f5d0b8e1867fbc414d9221276419\"\n).map(colors);\n\nexport default ramp(scheme);\n", "import colors from \"../colors.js\";\nimport ramp from \"../ramp.js\";\n\nexport var scheme = new Array(3).concat(\n  \"998ec3f7f7f7f1a340\",\n  \"5e3c99b2abd2fdb863e66101\",\n  \"5e3c99b2abd2f7f7f7fdb863e66101\",\n  \"542788998ec3d8daebfee0b6f1a340b35806\",\n  \"542788998ec3d8daebf7f7f7fee0b6f1a340b35806\",\n  \"5427888073acb2abd2d8daebfee0b6fdb863e08214b35806\",\n  \"5427888073acb2abd2d8daebf7f7f7fee0b6fdb863e08214b35806\",\n  \"2d004b5427888073acb2abd2d8daebfee0b6fdb863e08214b358067f3b08\",\n  \"2d004b5427888073acb2abd2d8daebf7f7f7fee0b6fdb863e08214b358067f3b08\"\n).map(colors);\n\nexport default ramp(scheme);\n", "import colors from \"../colors.js\";\nimport ramp from \"../ramp.js\";\n\nexport var scheme = new Array(3).concat(\n  \"ef8a62f7f7f767a9cf\",\n  \"ca0020f4a58292c5de0571b0\",\n  \"ca0020f4a582f7f7f792c5de0571b0\",\n  \"b2182bef8a62fddbc7d1e5f067a9cf2166ac\",\n  \"b2182bef8a62fddbc7f7f7f7d1e5f067a9cf2166ac\",\n  \"b2182bd6604df4a582fddbc7d1e5f092c5de4393c32166ac\",\n  \"b2182bd6604df4a582fddbc7f7f7f7d1e5f092c5de4393c32166ac\",\n  \"67001fb2182bd6604df4a582fddbc7d1e5f092c5de4393c32166ac053061\",\n  \"67001fb2182bd6604df4a582fddbc7f7f7f7d1e5f092c5de4393c32166ac053061\"\n).map(colors);\n\nexport default ramp(scheme);\n", "import colors from \"../colors.js\";\nimport ramp from \"../ramp.js\";\n\nexport var scheme = new Array(3).concat(\n  \"ef8a62ffffff999999\",\n  \"ca0020f4a582bababa404040\",\n  \"ca0020f4a582ffffffbababa404040\",\n  \"b2182bef8a62fddbc7e0e0e09999994d4d4d\",\n  \"b2182bef8a62fddbc7ffffffe0e0e09999994d4d4d\",\n  \"b2182bd6604df4a582fddbc7e0e0e0bababa8787874d4d4d\",\n  \"b2182bd6604df4a582fddbc7ffffffe0e0e0bababa8787874d4d4d\",\n  \"67001fb2182bd6604df4a582fddbc7e0e0e0bababa8787874d4d4d1a1a1a\",\n  \"67001fb2182bd6604df4a582fddbc7ffffffe0e0e0bababa8787874d4d4d1a1a1a\"\n).map(colors);\n\nexport default ramp(scheme);\n", "import colors from \"../colors.js\";\nimport ramp from \"../ramp.js\";\n\nexport var scheme = new Array(3).concat(\n  \"fc8d59ffffbf91bfdb\",\n  \"d7191cfdae61abd9e92c7bb6\",\n  \"d7191cfdae61ffffbfabd9e92c7bb6\",\n  \"d73027fc8d59fee090e0f3f891bfdb4575b4\",\n  \"d73027fc8d59fee090ffffbfe0f3f891bfdb4575b4\",\n  \"d73027f46d43fdae61fee090e0f3f8abd9e974add14575b4\",\n  \"d73027f46d43fdae61fee090ffffbfe0f3f8abd9e974add14575b4\",\n  \"a50026d73027f46d43fdae61fee090e0f3f8abd9e974add14575b4313695\",\n  \"a50026d73027f46d43fdae61fee090ffffbfe0f3f8abd9e974add14575b4313695\"\n).map(colors);\n\nexport default ramp(scheme);\n", "import colors from \"../colors.js\";\nimport ramp from \"../ramp.js\";\n\nexport var scheme = new Array(3).concat(\n  \"fc8d59ffffbf91cf60\",\n  \"d7191cfdae61a6d96a1a9641\",\n  \"d7191cfdae61ffffbfa6d96a1a9641\",\n  \"d73027fc8d59fee08bd9ef8b91cf601a9850\",\n  \"d73027fc8d59fee08bffffbfd9ef8b91cf601a9850\",\n  \"d73027f46d43fdae61fee08bd9ef8ba6d96a66bd631a9850\",\n  \"d73027f46d43fdae61fee08bffffbfd9ef8ba6d96a66bd631a9850\",\n  \"a50026d73027f46d43fdae61fee08bd9ef8ba6d96a66bd631a9850006837\",\n  \"a50026d73027f46d43fdae61fee08bffffbfd9ef8ba6d96a66bd631a9850006837\"\n).map(colors);\n\nexport default ramp(scheme);\n", "import colors from \"../colors.js\";\nimport ramp from \"../ramp.js\";\n\nexport var scheme = new Array(3).concat(\n  \"fc8d59ffffbf99d594\",\n  \"d7191cfdae61abdda42b83ba\",\n  \"d7191cfdae61ffffbfabdda42b83ba\",\n  \"d53e4ffc8d59fee08be6f59899d5943288bd\",\n  \"d53e4ffc8d59fee08bffffbfe6f59899d5943288bd\",\n  \"d53e4ff46d43fdae61fee08be6f598abdda466c2a53288bd\",\n  \"d53e4ff46d43fdae61fee08bffffbfe6f598abdda466c2a53288bd\",\n  \"9e0142d53e4ff46d43fdae61fee08be6f598abdda466c2a53288bd5e4fa2\",\n  \"9e0142d53e4ff46d43fdae61fee08bffffbfe6f598abdda466c2a53288bd5e4fa2\"\n).map(colors);\n\nexport default ramp(scheme);\n", "import colors from \"../colors.js\";\nimport ramp from \"../ramp.js\";\n\nexport var scheme = new Array(3).concat(\n  \"e5f5f999d8c92ca25f\",\n  \"edf8fbb2e2e266c2a4238b45\",\n  \"edf8fbb2e2e266c2a42ca25f006d2c\",\n  \"edf8fbccece699d8c966c2a42ca25f006d2c\",\n  \"edf8fbccece699d8c966c2a441ae76238b45005824\",\n  \"f7fcfde5f5f9ccece699d8c966c2a441ae76238b45005824\",\n  \"f7fcfde5f5f9ccece699d8c966c2a441ae76238b45006d2c00441b\"\n).map(colors);\n\nexport default ramp(scheme);\n", "import colors from \"../colors.js\";\nimport ramp from \"../ramp.js\";\n\nexport var scheme = new Array(3).concat(\n  \"e0ecf49ebcda8856a7\",\n  \"edf8fbb3cde38c96c688419d\",\n  \"edf8fbb3cde38c96c68856a7810f7c\",\n  \"edf8fbbfd3e69ebcda8c96c68856a7810f7c\",\n  \"edf8fbbfd3e69ebcda8c96c68c6bb188419d6e016b\",\n  \"f7fcfde0ecf4bfd3e69ebcda8c96c68c6bb188419d6e016b\",\n  \"f7fcfde0ecf4bfd3e69ebcda8c96c68c6bb188419d810f7c4d004b\"\n).map(colors);\n\nexport default ramp(scheme);\n", "import colors from \"../colors.js\";\nimport ramp from \"../ramp.js\";\n\nexport var scheme = new Array(3).concat(\n  \"e0f3dba8ddb543a2ca\",\n  \"f0f9e8bae4bc7bccc42b8cbe\",\n  \"f0f9e8bae4bc7bccc443a2ca0868ac\",\n  \"f0f9e8ccebc5a8ddb57bccc443a2ca0868ac\",\n  \"f0f9e8ccebc5a8ddb57bccc44eb3d32b8cbe08589e\",\n  \"f7fcf0e0f3dbccebc5a8ddb57bccc44eb3d32b8cbe08589e\",\n  \"f7fcf0e0f3dbccebc5a8ddb57bccc44eb3d32b8cbe0868ac084081\"\n).map(colors);\n\nexport default ramp(scheme);\n", "import colors from \"../colors.js\";\nimport ramp from \"../ramp.js\";\n\nexport var scheme = new Array(3).concat(\n  \"fee8c8fdbb84e34a33\",\n  \"fef0d9fdcc8afc8d59d7301f\",\n  \"fef0d9fdcc8afc8d59e34a33b30000\",\n  \"fef0d9fdd49efdbb84fc8d59e34a33b30000\",\n  \"fef0d9fdd49efdbb84fc8d59ef6548d7301f990000\",\n  \"fff7ecfee8c8fdd49efdbb84fc8d59ef6548d7301f990000\",\n  \"fff7ecfee8c8fdd49efdbb84fc8d59ef6548d7301fb300007f0000\"\n).map(colors);\n\nexport default ramp(scheme);\n", "import colors from \"../colors.js\";\nimport ramp from \"../ramp.js\";\n\nexport var scheme = new Array(3).concat(\n  \"ece2f0a6bddb1c9099\",\n  \"f6eff7bdc9e167a9cf02818a\",\n  \"f6eff7bdc9e167a9cf1c9099016c59\",\n  \"f6eff7d0d1e6a6bddb67a9cf1c9099016c59\",\n  \"f6eff7d0d1e6a6bddb67a9cf3690c002818a016450\",\n  \"fff7fbece2f0d0d1e6a6bddb67a9cf3690c002818a016450\",\n  \"fff7fbece2f0d0d1e6a6bddb67a9cf3690c002818a016c59014636\"\n).map(colors);\n\nexport default ramp(scheme);\n", "import colors from \"../colors.js\";\nimport ramp from \"../ramp.js\";\n\nexport var scheme = new Array(3).concat(\n  \"ece7f2a6bddb2b8cbe\",\n  \"f1eef6bdc9e174a9cf0570b0\",\n  \"f1eef6bdc9e174a9cf2b8cbe045a8d\",\n  \"f1eef6d0d1e6a6bddb74a9cf2b8cbe045a8d\",\n  \"f1eef6d0d1e6a6bddb74a9cf3690c00570b0034e7b\",\n  \"fff7fbece7f2d0d1e6a6bddb74a9cf3690c00570b0034e7b\",\n  \"fff7fbece7f2d0d1e6a6bddb74a9cf3690c00570b0045a8d023858\"\n).map(colors);\n\nexport default ramp(scheme);\n", "import colors from \"../colors.js\";\nimport ramp from \"../ramp.js\";\n\nexport var scheme = new Array(3).concat(\n  \"e7e1efc994c7dd1c77\",\n  \"f1eef6d7b5d8df65b0ce1256\",\n  \"f1eef6d7b5d8df65b0dd1c77980043\",\n  \"f1eef6d4b9dac994c7df65b0dd1c77980043\",\n  \"f1eef6d4b9dac994c7df65b0e7298ace125691003f\",\n  \"f7f4f9e7e1efd4b9dac994c7df65b0e7298ace125691003f\",\n  \"f7f4f9e7e1efd4b9dac994c7df65b0e7298ace125698004367001f\"\n).map(colors);\n\nexport default ramp(scheme);\n", "import colors from \"../colors.js\";\nimport ramp from \"../ramp.js\";\n\nexport var scheme = new Array(3).concat(\n  \"fde0ddfa9fb5c51b8a\",\n  \"feebe2fbb4b9f768a1ae017e\",\n  \"feebe2fbb4b9f768a1c51b8a7a0177\",\n  \"feebe2fcc5c0fa9fb5f768a1c51b8a7a0177\",\n  \"feebe2fcc5c0fa9fb5f768a1dd3497ae017e7a0177\",\n  \"fff7f3fde0ddfcc5c0fa9fb5f768a1dd3497ae017e7a0177\",\n  \"fff7f3fde0ddfcc5c0fa9fb5f768a1dd3497ae017e7a017749006a\"\n).map(colors);\n\nexport default ramp(scheme);\n", "import colors from \"../colors.js\";\nimport ramp from \"../ramp.js\";\n\nexport var scheme = new Array(3).concat(\n  \"edf8b17fcdbb2c7fb8\",\n  \"ffffcca1dab441b6c4225ea8\",\n  \"ffffcca1dab441b6c42c7fb8253494\",\n  \"ffffccc7e9b47fcdbb41b6c42c7fb8253494\",\n  \"ffffccc7e9b47fcdbb41b6c41d91c0225ea80c2c84\",\n  \"ffffd9edf8b1c7e9b47fcdbb41b6c41d91c0225ea80c2c84\",\n  \"ffffd9edf8b1c7e9b47fcdbb41b6c41d91c0225ea8253494081d58\"\n).map(colors);\n\nexport default ramp(scheme);\n", "import colors from \"../colors.js\";\nimport ramp from \"../ramp.js\";\n\nexport var scheme = new Array(3).concat(\n  \"f7fcb9addd8e31a354\",\n  \"ffffccc2e69978c679238443\",\n  \"ffffccc2e69978c67931a354006837\",\n  \"ffffccd9f0a3addd8e78c67931a354006837\",\n  \"ffffccd9f0a3addd8e78c67941ab5d238443005a32\",\n  \"ffffe5f7fcb9d9f0a3addd8e78c67941ab5d238443005a32\",\n  \"ffffe5f7fcb9d9f0a3addd8e78c67941ab5d238443006837004529\"\n).map(colors);\n\nexport default ramp(scheme);\n", "import colors from \"../colors.js\";\nimport ramp from \"../ramp.js\";\n\nexport var scheme = new Array(3).concat(\n  \"fff7bcfec44fd95f0e\",\n  \"ffffd4fed98efe9929cc4c02\",\n  \"ffffd4fed98efe9929d95f0e993404\",\n  \"ffffd4fee391fec44ffe9929d95f0e993404\",\n  \"ffffd4fee391fec44ffe9929ec7014cc4c028c2d04\",\n  \"ffffe5fff7bcfee391fec44ffe9929ec7014cc4c028c2d04\",\n  \"ffffe5fff7bcfee391fec44ffe9929ec7014cc4c02993404662506\"\n).map(colors);\n\nexport default ramp(scheme);\n", "import colors from \"../colors.js\";\nimport ramp from \"../ramp.js\";\n\nexport var scheme = new Array(3).concat(\n  \"ffeda0feb24cf03b20\",\n  \"ffffb2fecc5cfd8d3ce31a1c\",\n  \"ffffb2fecc5cfd8d3cf03b20bd0026\",\n  \"ffffb2fed976feb24cfd8d3cf03b20bd0026\",\n  \"ffffb2fed976feb24cfd8d3cfc4e2ae31a1cb10026\",\n  \"ffffccffeda0fed976feb24cfd8d3cfc4e2ae31a1cb10026\",\n  \"ffffccffeda0fed976feb24cfd8d3cfc4e2ae31a1cbd0026800026\"\n).map(colors);\n\nexport default ramp(scheme);\n", "import colors from \"../colors.js\";\nimport ramp from \"../ramp.js\";\n\nexport var scheme = new Array(3).concat(\n  \"deebf79ecae13182bd\",\n  \"eff3ffbdd7e76baed62171b5\",\n  \"eff3ffbdd7e76baed63182bd08519c\",\n  \"eff3ffc6dbef9ecae16baed63182bd08519c\",\n  \"eff3ffc6dbef9ecae16baed64292c62171b5084594\",\n  \"f7fbffdeebf7c6dbef9ecae16baed64292c62171b5084594\",\n  \"f7fbffdeebf7c6dbef9ecae16baed64292c62171b508519c08306b\"\n).map(colors);\n\nexport default ramp(scheme);\n", "import colors from \"../colors.js\";\nimport ramp from \"../ramp.js\";\n\nexport var scheme = new Array(3).concat(\n  \"e5f5e0a1d99b31a354\",\n  \"edf8e9bae4b374c476238b45\",\n  \"edf8e9bae4b374c47631a354006d2c\",\n  \"edf8e9c7e9c0a1d99b74c47631a354006d2c\",\n  \"edf8e9c7e9c0a1d99b74c47641ab5d238b45005a32\",\n  \"f7fcf5e5f5e0c7e9c0a1d99b74c47641ab5d238b45005a32\",\n  \"f7fcf5e5f5e0c7e9c0a1d99b74c47641ab5d238b45006d2c00441b\"\n).map(colors);\n\nexport default ramp(scheme);\n", "import colors from \"../colors.js\";\nimport ramp from \"../ramp.js\";\n\nexport var scheme = new Array(3).concat(\n  \"f0f0f0bdbdbd636363\",\n  \"f7f7f7cccccc969696525252\",\n  \"f7f7f7cccccc969696636363252525\",\n  \"f7f7f7d9d9d9bdbdbd969696636363252525\",\n  \"f7f7f7d9d9d9bdbdbd969696737373525252252525\",\n  \"fffffff0f0f0d9d9d9bdbdbd969696737373525252252525\",\n  \"fffffff0f0f0d9d9d9bdbdbd969696737373525252252525000000\"\n).map(colors);\n\nexport default ramp(scheme);\n", "import colors from \"../colors.js\";\nimport ramp from \"../ramp.js\";\n\nexport var scheme = new Array(3).concat(\n  \"efedf5bcbddc756bb1\",\n  \"f2f0f7cbc9e29e9ac86a51a3\",\n  \"f2f0f7cbc9e29e9ac8756bb154278f\",\n  \"f2f0f7dadaebbcbddc9e9ac8756bb154278f\",\n  \"f2f0f7dadaebbcbddc9e9ac8807dba6a51a34a1486\",\n  \"fcfbfdefedf5dadaebbcbddc9e9ac8807dba6a51a34a1486\",\n  \"fcfbfdefedf5dadaebbcbddc9e9ac8807dba6a51a354278f3f007d\"\n).map(colors);\n\nexport default ramp(scheme);\n", "import colors from \"../colors.js\";\nimport ramp from \"../ramp.js\";\n\nexport var scheme = new Array(3).concat(\n  \"fee0d2fc9272de2d26\",\n  \"fee5d9fcae91fb6a4acb181d\",\n  \"fee5d9fcae91fb6a4ade2d26a50f15\",\n  \"fee5d9fcbba1fc9272fb6a4ade2d26a50f15\",\n  \"fee5d9fcbba1fc9272fb6a4aef3b2ccb181d99000d\",\n  \"fff5f0fee0d2fcbba1fc9272fb6a4aef3b2ccb181d99000d\",\n  \"fff5f0fee0d2fcbba1fc9272fb6a4aef3b2ccb181da50f1567000d\"\n).map(colors);\n\nexport default ramp(scheme);\n", "import colors from \"../colors.js\";\nimport ramp from \"../ramp.js\";\n\nexport var scheme = new Array(3).concat(\n  \"fee6cefdae6be6550d\",\n  \"feeddefdbe85fd8d3cd94701\",\n  \"feeddefdbe85fd8d3ce6550da63603\",\n  \"feeddefdd0a2fdae6bfd8d3ce6550da63603\",\n  \"feeddefdd0a2fdae6bfd8d3cf16913d948018c2d04\",\n  \"fff5ebfee6cefdd0a2fdae6bfd8d3cf16913d948018c2d04\",\n  \"fff5ebfee6cefdd0a2fdae6bfd8d3cf16913d94801a636037f2704\"\n).map(colors);\n\nexport default ramp(scheme);\n", "export default function(t) {\n  t = Math.max(0, Math.min(1, t));\n  return \"rgb(\"\n      + Math.max(0, Math.min(255, Math.round(-4.54 - t * (35.34 - t * (2381.73 - t * (6402.7 - t * (7024.72 - t * 2710.57))))))) + \", \"\n      + Math.max(0, Math.min(255, Math.round(32.49 + t * (170.73 + t * (52.82 - t * (131.46 - t * (176.58 - t * 67.37))))))) + \", \"\n      + Math.max(0, Math.min(255, Math.round(81.24 + t * (442.36 - t * (2482.43 - t * (6167.24 - t * (6614.94 - t * 2475.67)))))))\n      + \")\";\n}\n", "import {cubehelix} from \"d3-color\";\nimport {interpolateCubehelixLong} from \"d3-interpolate\";\n\nexport default interpolateCubehelixLong(cubehelix(300, 0.5, 0.0), cubehelix(-240, 0.5, 1.0));\n", "import {cubehelix} from \"d3-color\";\nimport {interpolateCubehelixLong} from \"d3-interpolate\";\n\nexport var warm = interpolateCubehelixLong(cubehelix(-100, 0.75, 0.35), cubehelix(80, 1.50, 0.8));\n\nexport var cool = interpolateCubehelixLong(cubehelix(260, 0.75, 0.35), cubehelix(80, 1.50, 0.8));\n\nvar c = cubehelix();\n\nexport default function(t) {\n  if (t < 0 || t > 1) t -= Math.floor(t);\n  var ts = Math.abs(t - 0.5);\n  c.h = 360 * t - 100;\n  c.s = 1.5 - 1.5 * ts;\n  c.l = 0.8 - 0.9 * ts;\n  return c + \"\";\n}\n", "import {rgb} from \"d3-color\";\n\nvar c = rgb(),\n    pi_1_3 = Math.PI / 3,\n    pi_2_3 = Math.PI * 2 / 3;\n\nexport default function(t) {\n  var x;\n  t = (0.5 - t) * Math.PI;\n  c.r = 255 * (x = Math.sin(t)) * x;\n  c.g = 255 * (x = Math.sin(t + pi_1_3)) * x;\n  c.b = 255 * (x = Math.sin(t + pi_2_3)) * x;\n  return c + \"\";\n}\n", "export default function(t) {\n  t = Math.max(0, Math.min(1, t));\n  return \"rgb(\"\n      + Math.max(0, Math.min(255, Math.round(34.61 + t * (1172.33 - t * (10793.56 - t * (33300.12 - t * (38394.49 - t * 14825.05))))))) + \", \"\n      + Math.max(0, Math.min(255, Math.round(23.31 + t * (557.33 + t * (1225.33 - t * (3574.96 - t * (1073.77 + t * 707.56))))))) + \", \"\n      + Math.max(0, Math.min(255, Math.round(27.2 + t * (3211.1 - t * (15327.97 - t * (27814 - t * (22569.18 - t * 6838.66)))))))\n      + \")\";\n}\n", "import colors from \"../colors.js\";\n\nfunction ramp(range) {\n  var n = range.length;\n  return function(t) {\n    return range[Math.max(0, Math.min(n - 1, Math.floor(t * n)))];\n  };\n}\n\nexport default ramp(colors(\"44015444025645045745055946075a46085c460a5d460b5e470d60470e6147106347116447136548146748166848176948186a481a6c481b6d481c6e481d6f481f70482071482173482374482475482576482677482878482979472a7a472c7a472d7b472e7c472f7d46307e46327e46337f463480453581453781453882443983443a83443b84433d84433e85423f854240864241864142874144874045884046883f47883f48893e49893e4a893e4c8a3d4d8a3d4e8a3c4f8a3c508b3b518b3b528b3a538b3a548c39558c39568c38588c38598c375a8c375b8d365c8d365d8d355e8d355f8d34608d34618d33628d33638d32648e32658e31668e31678e31688e30698e306a8e2f6b8e2f6c8e2e6d8e2e6e8e2e6f8e2d708e2d718e2c718e2c728e2c738e2b748e2b758e2a768e2a778e2a788e29798e297a8e297b8e287c8e287d8e277e8e277f8e27808e26818e26828e26828e25838e25848e25858e24868e24878e23888e23898e238a8d228b8d228c8d228d8d218e8d218f8d21908d21918c20928c20928c20938c1f948c1f958b1f968b1f978b1f988b1f998a1f9a8a1e9b8a1e9c891e9d891f9e891f9f881fa0881fa1881fa1871fa28720a38620a48621a58521a68522a78522a88423a98324aa8325ab8225ac8226ad8127ad8128ae8029af7f2ab07f2cb17e2db27d2eb37c2fb47c31b57b32b67a34b67935b77937b87838b9773aba763bbb753dbc743fbc7340bd7242be7144bf7046c06f48c16e4ac16d4cc26c4ec36b50c46a52c56954c56856c66758c7655ac8645cc8635ec96260ca6063cb5f65cb5e67cc5c69cd5b6ccd5a6ece5870cf5773d05675d05477d1537ad1517cd2507fd34e81d34d84d44b86d54989d5488bd6468ed64590d74393d74195d84098d83e9bd93c9dd93ba0da39a2da37a5db36a8db34aadc32addc30b0dd2fb2dd2db5de2bb8de29bade28bddf26c0df25c2df23c5e021c8e020cae11fcde11dd0e11cd2e21bd5e21ad8e219dae319dde318dfe318e2e418e5e419e7e419eae51aece51befe51cf1e51df4e61ef6e620f8e621fbe723fde725\"));\n\nexport var magma = ramp(colors(\"00000401000501010601010802010902020b02020d03030f03031204041405041606051806051a07061c08071e0907200a08220b09240c09260d0a290e0b2b100b2d110c2f120d31130d34140e36150e38160f3b180f3d19103f1a10421c10441d11471e114920114b21114e22115024125325125527125829115a2a115c2c115f2d11612f116331116533106734106936106b38106c390f6e3b0f703d0f713f0f72400f74420f75440f764510774710784910784a10794c117a4e117b4f127b51127c52137c54137d56147d57157e59157e5a167e5c167f5d177f5f187f601880621980641a80651a80671b80681c816a1c816b1d816d1d816e1e81701f81721f817320817521817621817822817922827b23827c23827e24828025828125818326818426818627818827818928818b29818c29818e2a81902a81912b81932b80942c80962c80982d80992d809b2e7f9c2e7f9e2f7fa02f7fa1307ea3307ea5317ea6317da8327daa337dab337cad347cae347bb0357bb2357bb3367ab5367ab73779b83779ba3878bc3978bd3977bf3a77c03a76c23b75c43c75c53c74c73d73c83e73ca3e72cc3f71cd4071cf4070d0416fd2426fd3436ed5446dd6456cd8456cd9466bdb476adc4869de4968df4a68e04c67e24d66e34e65e44f64e55064e75263e85362e95462ea5661eb5760ec5860ed5a5fee5b5eef5d5ef05f5ef1605df2625df2645cf3655cf4675cf4695cf56b5cf66c5cf66e5cf7705cf7725cf8745cf8765cf9785df9795df97b5dfa7d5efa7f5efa815ffb835ffb8560fb8761fc8961fc8a62fc8c63fc8e64fc9065fd9266fd9467fd9668fd9869fd9a6afd9b6bfe9d6cfe9f6dfea16efea36ffea571fea772fea973feaa74feac76feae77feb078feb27afeb47bfeb67cfeb77efeb97ffebb81febd82febf84fec185fec287fec488fec68afec88cfeca8dfecc8ffecd90fecf92fed194fed395fed597fed799fed89afdda9cfddc9efddea0fde0a1fde2a3fde3a5fde5a7fde7a9fde9aafdebacfcecaefceeb0fcf0b2fcf2b4fcf4b6fcf6b8fcf7b9fcf9bbfcfbbdfcfdbf\"));\n\nexport var inferno = ramp(colors(\"00000401000501010601010802010a02020c02020e03021004031204031405041706041907051b08051d09061f0a07220b07240c08260d08290e092b10092d110a30120a32140b34150b37160b39180c3c190c3e1b0c411c0c431e0c451f0c48210c4a230c4c240c4f260c51280b53290b552b0b572d0b592f0a5b310a5c320a5e340a5f3609613809623909633b09643d09653e0966400a67420a68440a68450a69470b6a490b6a4a0c6b4c0c6b4d0d6c4f0d6c510e6c520e6d540f6d550f6d57106e59106e5a116e5c126e5d126e5f136e61136e62146e64156e65156e67166e69166e6a176e6c186e6d186e6f196e71196e721a6e741a6e751b6e771c6d781c6d7a1d6d7c1d6d7d1e6d7f1e6c801f6c82206c84206b85216b87216b88226a8a226a8c23698d23698f24699025689225689326679526679727669827669a28659b29649d29649f2a63a02a63a22b62a32c61a52c60a62d60a82e5fa92e5eab2f5ead305dae305cb0315bb1325ab3325ab43359b63458b73557b93556ba3655bc3754bd3853bf3952c03a51c13a50c33b4fc43c4ec63d4dc73e4cc83f4bca404acb4149cc4248ce4347cf4446d04545d24644d34743d44842d54a41d74b3fd84c3ed94d3dda4e3cdb503bdd513ade5238df5337e05536e15635e25734e35933e45a31e55c30e65d2fe75e2ee8602de9612bea632aeb6429eb6628ec6726ed6925ee6a24ef6c23ef6e21f06f20f1711ff1731df2741cf3761bf37819f47918f57b17f57d15f67e14f68013f78212f78410f8850ff8870ef8890cf98b0bf98c0af98e09fa9008fa9207fa9407fb9606fb9706fb9906fb9b06fb9d07fc9f07fca108fca309fca50afca60cfca80dfcaa0ffcac11fcae12fcb014fcb216fcb418fbb61afbb81dfbba1ffbbc21fbbe23fac026fac228fac42afac62df9c72ff9c932f9cb35f8cd37f8cf3af7d13df7d340f6d543f6d746f5d949f5db4cf4dd4ff4df53f4e156f3e35af3e55df2e661f2e865f2ea69f1ec6df1ed71f1ef75f1f179f2f27df2f482f3f586f3f68af4f88ef5f992f6fa96f8fb9af9fc9dfafda1fcffa4\"));\n\nexport var plasma = ramp(colors(\"0d088710078813078916078a19068c1b068d1d068e20068f2206902406912605912805922a05932c05942e05952f059631059733059735049837049938049a3a049a3c049b3e049c3f049c41049d43039e44039e46039f48039f4903a04b03a14c02a14e02a25002a25102a35302a35502a45601a45801a45901a55b01a55c01a65e01a66001a66100a76300a76400a76600a76700a86900a86a00a86c00a86e00a86f00a87100a87201a87401a87501a87701a87801a87a02a87b02a87d03a87e03a88004a88104a78305a78405a78606a68707a68808a68a09a58b0aa58d0ba58e0ca48f0da4910ea3920fa39410a29511a19613a19814a099159f9a169f9c179e9d189d9e199da01a9ca11b9ba21d9aa31e9aa51f99a62098a72197a82296aa2395ab2494ac2694ad2793ae2892b02991b12a90b22b8fb32c8eb42e8db52f8cb6308bb7318ab83289ba3388bb3488bc3587bd3786be3885bf3984c03a83c13b82c23c81c33d80c43e7fc5407ec6417dc7427cc8437bc9447aca457acb4679cc4778cc4977cd4a76ce4b75cf4c74d04d73d14e72d24f71d35171d45270d5536fd5546ed6556dd7566cd8576bd9586ada5a6ada5b69db5c68dc5d67dd5e66de5f65de6164df6263e06363e16462e26561e26660e3685fe4695ee56a5de56b5de66c5ce76e5be76f5ae87059e97158e97257ea7457eb7556eb7655ec7754ed7953ed7a52ee7b51ef7c51ef7e50f07f4ff0804ef1814df1834cf2844bf3854bf3874af48849f48948f58b47f58c46f68d45f68f44f79044f79143f79342f89441f89540f9973ff9983ef99a3efa9b3dfa9c3cfa9e3bfb9f3afba139fba238fca338fca537fca636fca835fca934fdab33fdac33fdae32fdaf31fdb130fdb22ffdb42ffdb52efeb72dfeb82cfeba2cfebb2bfebd2afebe2afec029fdc229fdc328fdc527fdc627fdc827fdca26fdcb26fccd25fcce25fcd025fcd225fbd324fbd524fbd724fad824fada24f9dc24f9dd25f8df25f8e125f7e225f7e425f6e626f6e826f5e926f5eb27f4ed27f3ee27f3f027f2f227f1f426f1f525f0f724f0f921\"));\n", "export const abs = Math.abs;\nexport const atan2 = Math.atan2;\nexport const cos = Math.cos;\nexport const max = Math.max;\nexport const min = Math.min;\nexport const sin = Math.sin;\nexport const sqrt = Math.sqrt;\n\nexport const epsilon = 1e-12;\nexport const pi = Math.PI;\nexport const halfPi = pi / 2;\nexport const tau = 2 * pi;\n\nexport function acos(x) {\n  return x > 1 ? 0 : x < -1 ? pi : Math.acos(x);\n}\n\nexport function asin(x) {\n  return x >= 1 ? halfPi : x <= -1 ? -halfPi : Math.asin(x);\n}\n", "import {min, sqrt} from \"../math.js\";\n\nconst sqrt3 = sqrt(3);\n\nexport default {\n  draw(context, size) {\n    const r = sqrt(size + min(size / 28, 0.75)) * 0.59436;\n    const t = r / 2;\n    const u = t * sqrt3;\n    context.moveTo(0, r);\n    context.lineTo(0, -r);\n    context.moveTo(-u, -t);\n    context.lineTo(u, t);\n    context.moveTo(-u, t);\n    context.lineTo(u, -t);\n  }\n};\n", "import {pi, sqrt, tau} from \"../math.js\";\n\nexport default {\n  draw(context, size) {\n    const r = sqrt(size / pi);\n    context.moveTo(r, 0);\n    context.arc(0, 0, r, 0, tau);\n  }\n};\n", "import {sqrt} from \"../math.js\";\n\nexport default {\n  draw(context, size) {\n    const r = sqrt(size / 5) / 2;\n    context.moveTo(-3 * r, -r);\n    context.lineTo(-r, -r);\n    context.lineTo(-r, -3 * r);\n    context.lineTo(r, -3 * r);\n    context.lineTo(r, -r);\n    context.lineTo(3 * r, -r);\n    context.lineTo(3 * r, r);\n    context.lineTo(r, r);\n    context.lineTo(r, 3 * r);\n    context.lineTo(-r, 3 * r);\n    context.lineTo(-r, r);\n    context.lineTo(-3 * r, r);\n    context.closePath();\n  }\n};\n", "import {sqrt} from \"../math.js\";\n\nconst tan30 = sqrt(1 / 3);\nconst tan30_2 = tan30 * 2;\n\nexport default {\n  draw(context, size) {\n    const y = sqrt(size / tan30_2);\n    const x = y * tan30;\n    context.moveTo(0, -y);\n    context.lineTo(x, 0);\n    context.lineTo(0, y);\n    context.lineTo(-x, 0);\n    context.closePath();\n  }\n};\n", "import {sqrt} from \"../math.js\";\n\nexport default {\n  draw(context, size) {\n    const r = sqrt(size) * 0.62625;\n    context.moveTo(0, -r);\n    context.lineTo(r, 0);\n    context.lineTo(0, r);\n    context.lineTo(-r, 0);\n    context.closePath();\n  }\n};\n", "import {min, sqrt} from \"../math.js\";\n\nexport default {\n  draw(context, size) {\n    const r = sqrt(size - min(size / 7, 2)) * 0.87559;\n    context.moveTo(-r, 0);\n    context.lineTo(r, 0);\n    context.moveTo(0, r);\n    context.lineTo(0, -r);\n  }\n};\n", "import {sqrt} from \"../math.js\";\n\nexport default {\n  draw(context, size) {\n    const w = sqrt(size);\n    const x = -w / 2;\n    context.rect(x, x, w, w);\n  }\n};\n", "import {sqrt} from \"../math.js\";\n\nexport default {\n  draw(context, size) {\n    const r = sqrt(size) * 0.4431;\n    context.moveTo(r, r);\n    context.lineTo(r, -r);\n    context.lineTo(-r, -r);\n    context.lineTo(-r, r);\n    context.closePath();\n  }\n};\n", "import {sin, cos, sqrt, pi, tau} from \"../math.js\";\n\nconst ka = 0.89081309152928522810;\nconst kr = sin(pi / 10) / sin(7 * pi / 10);\nconst kx = sin(tau / 10) * kr;\nconst ky = -cos(tau / 10) * kr;\n\nexport default {\n  draw(context, size) {\n    const r = sqrt(size * ka);\n    const x = kx * r;\n    const y = ky * r;\n    context.moveTo(0, -r);\n    context.lineTo(x, y);\n    for (let i = 1; i < 5; ++i) {\n      const a = tau * i / 5;\n      const c = cos(a);\n      const s = sin(a);\n      context.lineTo(s * r, -c * r);\n      context.lineTo(c * x - s * y, s * x + c * y);\n    }\n    context.closePath();\n  }\n};\n", "import {sqrt} from \"../math.js\";\n\nconst sqrt3 = sqrt(3);\n\nexport default {\n  draw(context, size) {\n    const y = -sqrt(size / (sqrt3 * 3));\n    context.moveTo(0, y * 2);\n    context.lineTo(-sqrt3 * y, -y);\n    context.lineTo(sqrt3 * y, -y);\n    context.closePath();\n  }\n};\n", "import {sqrt} from \"../math.js\";\n\nconst sqrt3 = sqrt(3);\n\nexport default {\n  draw(context, size) {\n    const s = sqrt(size) * 0.6824;\n    const t = s  / 2;\n    const u = (s * sqrt3) / 2; // cos(Math.PI / 6)\n    context.moveTo(0, -s);\n    context.lineTo(u, t);\n    context.lineTo(-u, t);\n    context.closePath();\n  }\n};\n", "import {sqrt} from \"../math.js\";\n\nconst c = -0.5;\nconst s = sqrt(3) / 2;\nconst k = 1 / sqrt(12);\nconst a = (k / 2 + 1) * 3;\n\nexport default {\n  draw(context, size) {\n    const r = sqrt(size / a);\n    const x0 = r / 2, y0 = r * k;\n    const x1 = x0, y1 = r * k + r;\n    const x2 = -x1, y2 = y1;\n    context.moveTo(x0, y0);\n    context.lineTo(x1, y1);\n    context.lineTo(x2, y2);\n    context.lineTo(c * x0 - s * y0, s * x0 + c * y0);\n    context.lineTo(c * x1 - s * y1, s * x1 + c * y1);\n    context.lineTo(c * x2 - s * y2, s * x2 + c * y2);\n    context.lineTo(c * x0 + s * y0, c * y0 - s * x0);\n    context.lineTo(c * x1 + s * y1, c * y1 - s * x1);\n    context.lineTo(c * x2 + s * y2, c * y2 - s * x2);\n    context.closePath();\n  }\n};\n", "import {min, sqrt} from \"../math.js\";\n\nexport default {\n  draw(context, size) {\n    const r = sqrt(size - min(size / 6, 1.7)) * 0.6189;\n    context.moveTo(-r, -r);\n    context.lineTo(r, r);\n    context.moveTo(-r, r);\n    context.lineTo(r, -r);\n  }\n};\n", "import constant from \"./constant.js\";\nimport {withPath} from \"./path.js\";\nimport asterisk from \"./symbol/asterisk.js\";\nimport circle from \"./symbol/circle.js\";\nimport cross from \"./symbol/cross.js\";\nimport diamond from \"./symbol/diamond.js\";\nimport diamond2 from \"./symbol/diamond2.js\";\nimport plus from \"./symbol/plus.js\";\nimport square from \"./symbol/square.js\";\nimport square2 from \"./symbol/square2.js\";\nimport star from \"./symbol/star.js\";\nimport triangle from \"./symbol/triangle.js\";\nimport triangle2 from \"./symbol/triangle2.js\";\nimport wye from \"./symbol/wye.js\";\nimport times from \"./symbol/times.js\";\n\n// These symbols are designed to be filled.\nexport const symbolsFill = [\n  circle,\n  cross,\n  diamond,\n  square,\n  star,\n  triangle,\n  wye\n];\n\n// These symbols are designed to be stroked (with a width of 1.5px and round caps).\nexport const symbolsStroke = [\n  circle,\n  plus,\n  times,\n  triangle2,\n  asterisk,\n  square2,\n  diamond2\n];\n\nexport default function Symbol(type, size) {\n  let context = null,\n      path = withPath(symbol);\n\n  type = typeof type === \"function\" ? type : constant(type || circle);\n  size = typeof size === \"function\" ? size : constant(size === undefined ? 64 : +size);\n\n  function symbol() {\n    let buffer;\n    if (!context) context = buffer = path();\n    type.apply(this, arguments).draw(context, +size.apply(this, arguments));\n    if (buffer) return context = null, buffer + \"\" || null;\n  }\n\n  symbol.type = function(_) {\n    return arguments.length ? (type = typeof _ === \"function\" ? _ : constant(_), symbol) : type;\n  };\n\n  symbol.size = function(_) {\n    return arguments.length ? (size = typeof _ === \"function\" ? _ : constant(+_), symbol) : size;\n  };\n\n  symbol.context = function(_) {\n    return arguments.length ? (context = _ == null ? null : _, symbol) : context;\n  };\n\n  return symbol;\n}\n", "export function Transform(k, x, y) {\n  this.k = k;\n  this.x = x;\n  this.y = y;\n}\n\nTransform.prototype = {\n  constructor: Transform,\n  scale: function(k) {\n    return k === 1 ? this : new Transform(this.k * k, this.x, this.y);\n  },\n  translate: function(x, y) {\n    return x === 0 & y === 0 ? this : new Transform(this.k, this.x + this.k * x, this.y + this.k * y);\n  },\n  apply: function(point) {\n    return [point[0] * this.k + this.x, point[1] * this.k + this.y];\n  },\n  applyX: function(x) {\n    return x * this.k + this.x;\n  },\n  applyY: function(y) {\n    return y * this.k + this.y;\n  },\n  invert: function(location) {\n    return [(location[0] - this.x) / this.k, (location[1] - this.y) / this.k];\n  },\n  invertX: function(x) {\n    return (x - this.x) / this.k;\n  },\n  invertY: function(y) {\n    return (y - this.y) / this.k;\n  },\n  rescaleX: function(x) {\n    return x.copy().domain(x.range().map(this.invertX, this).map(x.invert, x));\n  },\n  rescaleY: function(y) {\n    return y.copy().domain(y.range().map(this.invertY, this).map(y.invert, y));\n  },\n  toString: function() {\n    return \"translate(\" + this.x + \",\" + this.y + \") scale(\" + this.k + \")\";\n  }\n};\n\nexport var identity = new Transform(1, 0, 0);\n\ntransform.prototype = Transform.prototype;\n\nexport default function transform(node) {\n  while (!node.__zoom) if (!(node = node.parentNode)) return identity;\n  return node.__zoom;\n}\n", "import {ascending, descending} from \"d3\";\n\nexport function defined(x) {\n  return x != null && !Number.isNaN(x);\n}\n\nexport function ascendingDefined(a, b) {\n  return +defined(b) - +defined(a) || ascending(a, b);\n}\n\nexport function descendingDefined(a, b) {\n  return +defined(b) - +defined(a) || descending(a, b);\n}\n\nexport function nonempty(x) {\n  return x != null && `${x}` !== \"\";\n}\n\nexport function finite(x) {\n  return isFinite(x) ? x : NaN;\n}\n\nexport function positive(x) {\n  return x > 0 && isFinite(x) ? x : NaN;\n}\n\nexport function negative(x) {\n  return x < 0 && isFinite(x) ? x : NaN;\n}\n", "export default function format(date, fallback) {\n  if (!(date instanceof Date)) date = new Date(+date);\n  if (isNaN(date)) return typeof fallback === \"function\" ? fallback(date) : fallback;\n  const hours = date.getUTCHours();\n  const minutes = date.getUTCMinutes();\n  const seconds = date.getUTCSeconds();\n  const milliseconds = date.getUTCMilliseconds();\n  return `${formatYear(date.getUTCFullYear(), 4)}-${pad(date.getUTCMonth() + 1, 2)}-${pad(date.getUTCDate(), 2)}${\n    hours || minutes || seconds || milliseconds ? `T${pad(hours, 2)}:${pad(minutes, 2)}${\n      seconds || milliseconds ? `:${pad(seconds, 2)}${\n        milliseconds ? `.${pad(milliseconds, 3)}` : ``\n      }` : ``\n    }Z` : ``\n  }`;\n}\n\nfunction formatYear(year) {\n  return year < 0 ? `-${pad(-year, 6)}`\n    : year > 9999 ? `+${pad(year, 6)}`\n    : pad(year, 4);\n}\n\nfunction pad(value, width) {\n  return `${value}`.padStart(width, \"0\");\n}\n", "const re = /^(?:[-+]\\d{2})?\\d{4}(?:-\\d{2}(?:-\\d{2})?)?(?:T\\d{2}:\\d{2}(?::\\d{2}(?:\\.\\d{3})?)?(?:Z|[-+]\\d{2}:?\\d{2})?)?$/;\n\nexport default function parse(string, fallback) {\n  if (!re.test(string += \"\")) return typeof fallback === \"function\" ? fallback(string) : fallback;\n  return new Date(string);\n}\n", "import {bisector, extent, median, pairs, timeFormat, utcFormat} from \"d3\";\nimport {utcSecond, utcMinute, utcHour, unixDay, utcWeek, utcMonth, utcYear} from \"d3\";\nimport {utcMonday, utcTuesday, utcWednesday, utcThursday, utcFriday, utcSaturday, utcSunday} from \"d3\";\nimport {timeSecond, timeMinute, timeHour, timeDay, timeWeek, timeMonth, timeYear} from \"d3\";\nimport {timeMonday, timeTuesday, timeWednesday, timeThursday, timeFriday, timeSaturday, timeSunday} from \"d3\";\nimport {orderof} from \"./options.js\";\n\nconst durationSecond = 1000;\nconst durationMinute = durationSecond * 60;\nconst durationHour = durationMinute * 60;\nconst durationDay = durationHour * 24;\nconst durationWeek = durationDay * 7;\nconst durationMonth = durationDay * 30;\nconst durationYear = durationDay * 365;\n\n// See https://github.com/d3/d3-time/blob/9e8dc940f38f78d7588aad68a54a25b1f0c2d97b/src/ticks.js#L14-L33\nconst formats = [\n  [\"millisecond\", 0.5 * durationSecond],\n  [\"second\", durationSecond],\n  [\"second\", 30 * durationSecond],\n  [\"minute\", durationMinute],\n  [\"minute\", 30 * durationMinute],\n  [\"hour\", durationHour],\n  [\"hour\", 12 * durationHour],\n  [\"day\", durationDay],\n  [\"day\", 2 * durationDay],\n  [\"week\", durationWeek],\n  [\"month\", durationMonth],\n  [\"month\", 3 * durationMonth],\n  [\"year\", durationYear]\n];\n\nconst timeIntervals = new Map([\n  [\"second\", timeSecond],\n  [\"minute\", timeMinute],\n  [\"hour\", timeHour],\n  [\"day\", timeDay], // TODO local time equivalent of unixDay?\n  [\"week\", timeWeek],\n  [\"month\", timeMonth],\n  [\"year\", timeYear],\n  [\"monday\", timeMonday],\n  [\"tuesday\", timeTuesday],\n  [\"wednesday\", timeWednesday],\n  [\"thursday\", timeThursday],\n  [\"friday\", timeFriday],\n  [\"saturday\", timeSaturday],\n  [\"sunday\", timeSunday]\n]);\n\nconst utcIntervals = new Map([\n  [\"second\", utcSecond],\n  [\"minute\", utcMinute],\n  [\"hour\", utcHour],\n  [\"day\", unixDay],\n  [\"week\", utcWeek],\n  [\"month\", utcMonth],\n  [\"year\", utcYear],\n  [\"monday\", utcMonday],\n  [\"tuesday\", utcTuesday],\n  [\"wednesday\", utcWednesday],\n  [\"thursday\", utcThursday],\n  [\"friday\", utcFriday],\n  [\"saturday\", utcSaturday],\n  [\"sunday\", utcSunday]\n]);\n\nfunction parseInterval(input, intervals) {\n  let name = `${input}`.toLowerCase();\n  if (name.endsWith(\"s\")) name = name.slice(0, -1); // drop plural\n  let period = 1;\n  const match = /^(?:(\\d+)\\s+)/.exec(name);\n  if (match) {\n    name = name.slice(match[0].length);\n    period = +match[1];\n  }\n  switch (name) {\n    case \"quarter\":\n      name = \"month\";\n      period *= 3;\n      break;\n    case \"half\":\n      name = \"month\";\n      period *= 6;\n      break;\n  }\n  let interval = intervals.get(name);\n  if (!interval) throw new Error(`unknown interval: ${input}`);\n  if (!(period > 1)) return interval;\n  if (!interval.every) throw new Error(`non-periodic interval: ${name}`);\n  return interval.every(period);\n}\n\nexport function maybeTimeInterval(interval) {\n  return parseInterval(interval, timeIntervals);\n}\n\nexport function maybeUtcInterval(interval) {\n  return parseInterval(interval, utcIntervals);\n}\n\nexport function isUtcYear(i) {\n  if (!i) return false;\n  const date = i.floor(new Date(Date.UTC(2000, 11, 31)));\n  return utcYear(date) >= date; // coercing equality\n}\n\nexport function isTimeYear(i) {\n  if (!i) return false;\n  const date = i.floor(new Date(2000, 11, 31));\n  return timeYear(date) >= date; // coercing equality\n}\n\nexport function formatTimeTicks(scale, data, ticks, anchor) {\n  const format = scale.type === \"time\" ? timeFormat : utcFormat;\n  const template =\n    anchor === \"left\" || anchor === \"right\"\n      ? (f1, f2) => `\\n${f1}\\n${f2}` // extra newline to keep f1 centered\n      : anchor === \"top\"\n      ? (f1, f2) => `${f2}\\n${f1}`\n      : (f1, f2) => `${f1}\\n${f2}`;\n  switch (getTimeTicksInterval(scale, data, ticks)) {\n    case \"millisecond\":\n      return formatConditional(format(\".%L\"), format(\":%M:%S\"), template);\n    case \"second\":\n      return formatConditional(format(\":%S\"), format(\"%-I:%M\"), template);\n    case \"minute\":\n      return formatConditional(format(\"%-I:%M\"), format(\"%p\"), template);\n    case \"hour\":\n      return formatConditional(format(\"%-I %p\"), format(\"%b %-d\"), template);\n    case \"day\":\n      return formatConditional(format(\"%-d\"), format(\"%b\"), template);\n    case \"week\":\n      return formatConditional(format(\"%-d\"), format(\"%b\"), template);\n    case \"month\":\n      return formatConditional(format(\"%b\"), format(\"%Y\"), template);\n    case \"year\":\n      return format(\"%Y\");\n  }\n  throw new Error(\"unable to format time ticks\");\n}\n\n// Compute the median difference between adjacent ticks, ignoring repeated\n// ticks; this implies an effective time interval, assuming that ticks are\n// regularly spaced; choose the largest format less than this interval so that\n// the ticks show the field that is changing. If the ticks are not available,\n// fallback to an approximation based on the desired number of ticks.\nfunction getTimeTicksInterval(scale, data, ticks) {\n  const medianStep = median(pairs(data, (a, b) => Math.abs(b - a) || NaN));\n  if (medianStep > 0) return formats[bisector(([, step]) => step).right(formats, medianStep, 1, formats.length) - 1][0];\n  const [start, stop] = extent(scale.domain());\n  const count = typeof ticks === \"number\" ? ticks : 10;\n  const step = Math.abs(stop - start) / count;\n  return formats[bisector(([, step]) => Math.log(step)).center(formats, Math.log(step))][0];\n}\n\nfunction formatConditional(format1, format2, template) {\n  return (x, i, X) => {\n    const f1 = format1(x, i); // always shown\n    const f2 = format2(x, i); // only shown if different\n    const j = i - orderof(X); // detect reversed domains\n    return i !== j && X[j] !== undefined && f2 === format2(X[j], j) ? f1 : template(f1, f2);\n  };\n}\n", "import {color, descending, quantile, range as rangei} from \"d3\";\nimport {parse as isoParse} from \"isoformat\";\nimport {defined} from \"./defined.js\";\nimport {maybeTimeInterval, maybeUtcInterval} from \"./time.js\";\n\n// https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/TypedArray\nexport const TypedArray = Object.getPrototypeOf(Uint8Array);\nconst objectToString = Object.prototype.toString;\n\nexport function valueof(data, value, type) {\n  const valueType = typeof value;\n  return valueType === \"string\"\n    ? maybeTypedMap(data, field(value), type)\n    : valueType === \"function\"\n    ? maybeTypedMap(data, value, type)\n    : valueType === \"number\" || value instanceof Date || valueType === \"boolean\"\n    ? map(data, constant(value), type)\n    : typeof value?.transform === \"function\"\n    ? maybeTypedArrayify(value.transform(data), type)\n    : maybeTypedArrayify(value, type);\n}\n\nfunction maybeTypedMap(data, f, type) {\n  return map(data, type?.prototype instanceof TypedArray ? floater(f) : f, type);\n}\n\nfunction maybeTypedArrayify(data, type) {\n  return type === undefined\n    ? arrayify(data) // preserve undefined type\n    : data instanceof type\n    ? data\n    : type.prototype instanceof TypedArray && !(data instanceof TypedArray)\n    ? type.from(data, coerceNumber)\n    : type.from(data);\n}\n\nfunction floater(f) {\n  return (d, i) => coerceNumber(f(d, i));\n}\n\nexport const singleton = [null]; // for data-less decoration marks, e.g. frame\nexport const field = (name) => (d) => d[name];\nexport const indexOf = {transform: range};\nexport const identity = {transform: (d) => d};\nexport const zero = () => 0;\nexport const one = () => 1;\nexport const yes = () => true;\nexport const string = (x) => (x == null ? x : `${x}`);\nexport const number = (x) => (x == null ? x : +x);\nexport const boolean = (x) => (x == null ? x : !!x);\nexport const first = (x) => (x ? x[0] : undefined);\nexport const second = (x) => (x ? x[1] : undefined);\nexport const third = (x) => (x ? x[2] : undefined);\nexport const constant = (x) => () => x;\n\n// Converts a string like \u201Cp25\u201D into a function that takes an index I and an\n// accessor function f, returning the corresponding percentile value.\nexport function percentile(reduce) {\n  const p = +`${reduce}`.slice(1) / 100;\n  return (I, f) => quantile(I, p, f);\n}\n\n// If the values are specified as a typed array, no coercion is required.\nexport function coerceNumbers(values) {\n  return values instanceof TypedArray ? values : map(values, coerceNumber, Float64Array);\n}\n\n// Unlike Mark\u2019s number, here we want to convert null and undefined to NaN since\n// the result will be stored in a Float64Array and we don\u2019t want null to be\n// coerced to zero. We use Number instead of unary + to allow BigInt coercion.\nfunction coerceNumber(x) {\n  return x == null ? NaN : Number(x);\n}\n\nexport function coerceDates(values) {\n  return map(values, coerceDate);\n}\n\n// When coercing strings to dates, we only want to allow the ISO 8601 format\n// since the built-in string parsing of the Date constructor varies across\n// browsers. (In the future, this could be made more liberal if desired, though\n// it is still generally preferable to do date parsing yourself explicitly,\n// rather than rely on Plot.) Any non-string values are coerced to number first\n// and treated as milliseconds since UNIX epoch.\nexport function coerceDate(x) {\n  return x instanceof Date && !isNaN(x)\n    ? x\n    : typeof x === \"string\"\n    ? isoParse(x)\n    : x == null || isNaN((x = +x))\n    ? undefined\n    : new Date(x);\n}\n\n// Some channels may allow a string constant to be specified; to differentiate\n// string constants (e.g., \"red\") from named fields (e.g., \"date\"), this\n// function tests whether the given value is a CSS color string and returns a\n// tuple [channel, constant] where one of the two is undefined, and the other is\n// the given value. If you wish to reference a named field that is also a valid\n// CSS color, use an accessor (d => d.red) instead.\nexport function maybeColorChannel(value, defaultValue) {\n  if (value === undefined) value = defaultValue;\n  return value === null ? [undefined, \"none\"] : isColor(value) ? [undefined, value] : [value, undefined];\n}\n\n// Similar to maybeColorChannel, this tests whether the given value is a number\n// indicating a constant, and otherwise assumes that it\u2019s a channel value.\nexport function maybeNumberChannel(value, defaultValue) {\n  if (value === undefined) value = defaultValue;\n  return value === null || typeof value === \"number\" ? [undefined, value] : [value, undefined];\n}\n\n// Validates the specified optional string against the allowed list of keywords.\nexport function maybeKeyword(input, name, allowed) {\n  if (input != null) return keyword(input, name, allowed);\n}\n\n// Validates the specified required string against the allowed list of keywords.\nexport function keyword(input, name, allowed) {\n  const i = `${input}`.toLowerCase();\n  if (!allowed.includes(i)) throw new Error(`invalid ${name}: ${input}`);\n  return i;\n}\n\n// Promotes the specified data to an array as needed.\nexport function arrayify(data) {\n  return data == null || data instanceof Array || data instanceof TypedArray ? data : Array.from(data);\n}\n\n// An optimization of type.from(values, f): if the given values are already an\n// instanceof the desired array type, the faster values.map method is used.\nexport function map(values, f, type = Array) {\n  return values == null ? values : values instanceof type ? values.map(f) : type.from(values, f);\n}\n\n// An optimization of type.from(values): if the given values are already an\n// instanceof the desired array type, the faster values.slice method is used.\nexport function slice(values, type = Array) {\n  return values instanceof type ? values.slice() : type.from(values);\n}\n\n// Returns true if any of x, x1, or x2 is not (strictly) undefined.\nexport function hasX({x, x1, x2}) {\n  return x !== undefined || x1 !== undefined || x2 !== undefined;\n}\n\n// Returns true if any of y, y1, or y2 is not (strictly) undefined.\nexport function hasY({y, y1, y2}) {\n  return y !== undefined || y1 !== undefined || y2 !== undefined;\n}\n\n// Returns true if has x or y, or if interval is not (strictly) undefined.\nexport function hasXY(options) {\n  return hasX(options) || hasY(options) || options.interval !== undefined;\n}\n\n// Disambiguates an options object (e.g., {y: \"x2\"}) from a primitive value.\nexport function isObject(option) {\n  return option?.toString === objectToString;\n}\n\n// Disambiguates a scale options object (e.g., {color: {type: \"linear\"}}) from\n// some other option (e.g., {color: \"red\"}). When creating standalone legends,\n// this is used to test whether a scale is defined; this should be consistent\n// with inferScaleType when there are no channels associated with the scale, and\n// if this returns true, then normalizeScale must return non-null.\nexport function isScaleOptions(option) {\n  return isObject(option) && (option.type !== undefined || option.domain !== undefined);\n}\n\n// Disambiguates an options object (e.g., {y: \"x2\"}) from a channel value\n// definition expressed as a channel transform (e.g., {transform: \u2026}).\nexport function isOptions(option) {\n  return isObject(option) && typeof option.transform !== \"function\";\n}\n\n// Disambiguates a sort transform (e.g., {sort: \"date\"}) from a channel domain\n// sort definition (e.g., {sort: {y: \"x\"}}).\nexport function isDomainSort(sort) {\n  return isOptions(sort) && sort.value === undefined && sort.channel === undefined;\n}\n\n// For marks specified either as [0, x] or [x1, x2], such as areas and bars.\nexport function maybeZero(x, x1, x2, x3 = identity) {\n  if (x1 === undefined && x2 === undefined) {\n    // {x} or {}\n    (x1 = 0), (x2 = x === undefined ? x3 : x);\n  } else if (x1 === undefined) {\n    // {x, x2} or {x2}\n    x1 = x === undefined ? 0 : x;\n  } else if (x2 === undefined) {\n    // {x, x1} or {x1}\n    x2 = x === undefined ? 0 : x;\n  }\n  return [x1, x2];\n}\n\n// For marks that have x and y channels (e.g., cell, dot, line, text).\nexport function maybeTuple(x, y) {\n  return x === undefined && y === undefined ? [first, second] : [x, y];\n}\n\n// A helper for extracting the z channel, if it is variable. Used by transforms\n// that require series, such as moving average and normalize.\nexport function maybeZ({z, fill, stroke} = {}) {\n  if (z === undefined) [z] = maybeColorChannel(fill);\n  if (z === undefined) [z] = maybeColorChannel(stroke);\n  return z;\n}\n\n// Returns a Uint32Array with elements [0, 1, 2, \u2026 data.length - 1].\nexport function range(data) {\n  const n = data.length;\n  const r = new Uint32Array(n);\n  for (let i = 0; i < n; ++i) r[i] = i;\n  return r;\n}\n\n// Returns a filtered range of data given the test function.\nexport function where(data, test) {\n  return range(data).filter((i) => test(data[i], i, data));\n}\n\n// Returns an array [values[index[0]], values[index[1]], \u2026].\nexport function take(values, index) {\n  return map(index, (i) => values[i]);\n}\n\n// If f does not take exactly one argument, wraps it in a function that uses take.\nexport function taker(f) {\n  return f.length === 1 ? (index, values) => f(take(values, index)) : f;\n}\n\n// Uses subarray if available, and otherwise slice.\nexport function subarray(I, i, j) {\n  return I.subarray ? I.subarray(i, j) : I.slice(i, j);\n}\n\n// Based on InternMap (d3.group).\nexport function keyof(value) {\n  return value !== null && typeof value === \"object\" ? value.valueOf() : value;\n}\n\nexport function maybeInput(key, options) {\n  if (options[key] !== undefined) return options[key];\n  switch (key) {\n    case \"x1\":\n    case \"x2\":\n      key = \"x\";\n      break;\n    case \"y1\":\n    case \"y2\":\n      key = \"y\";\n      break;\n  }\n  return options[key];\n}\n\nexport function column(source) {\n  // Defines a column whose values are lazily populated by calling the returned\n  // setter. If the given source is labeled, the label is propagated to the\n  // returned column definition.\n  let value;\n  return [\n    {\n      transform: () => value,\n      label: labelof(source)\n    },\n    (v) => (value = v)\n  ];\n}\n\n// Like column, but allows the source to be null.\nexport function maybeColumn(source) {\n  return source == null ? [source] : column(source);\n}\n\nexport function labelof(value, defaultValue) {\n  return typeof value === \"string\" ? value : value && value.label !== undefined ? value.label : defaultValue;\n}\n\n// Assuming that both x1 and x2 and lazy columns (per above), this derives a new\n// a column that\u2019s the average of the two, and which inherits the column label\n// (if any). Both input columns are assumed to be quantitative. If either column\n// is temporal, the returned column is also temporal.\nexport function mid(x1, x2) {\n  return {\n    transform(data) {\n      const X1 = x1.transform(data);\n      const X2 = x2.transform(data);\n      return isTemporal(X1) || isTemporal(X2)\n        ? map(X1, (_, i) => new Date((+X1[i] + +X2[i]) / 2))\n        : map(X1, (_, i) => (+X1[i] + +X2[i]) / 2, Float64Array);\n    },\n    label: x1.label\n  };\n}\n\n// If the scale options declare an interval, applies it to the values V.\nexport function maybeApplyInterval(V, scale) {\n  const t = maybeIntervalTransform(scale?.interval, scale?.type);\n  return t ? map(V, t) : V;\n}\n\n// Returns the equivalent scale transform for the specified interval option.\nexport function maybeIntervalTransform(interval, type) {\n  const i = maybeInterval(interval, type);\n  return i && ((v) => (defined(v) ? i.floor(v) : v));\n}\n\n// If interval is not nullish, converts interval shorthand such as a number (for\n// multiples) or a time interval name (such as \u201Cday\u201D) to a {floor, offset,\n// range} object similar to a D3 time interval.\nexport function maybeInterval(interval, type) {\n  if (interval == null) return;\n  if (typeof interval === \"number\") {\n    if (0 < interval && interval < 1 && Number.isInteger(1 / interval)) interval = -1 / interval;\n    const n = Math.abs(interval);\n    return interval < 0\n      ? {\n          floor: (d) => Math.floor(d * n) / n,\n          offset: (d) => (d * n + 1) / n, // note: no optional step for simplicity\n          range: (lo, hi) => rangei(Math.ceil(lo * n), hi * n).map((x) => x / n)\n        }\n      : {\n          floor: (d) => Math.floor(d / n) * n,\n          offset: (d) => d + n, // note: no optional step for simplicity\n          range: (lo, hi) => rangei(Math.ceil(lo / n), hi / n).map((x) => x * n)\n        };\n  }\n  if (typeof interval === \"string\") return (type === \"time\" ? maybeTimeInterval : maybeUtcInterval)(interval);\n  if (typeof interval.floor !== \"function\") throw new Error(\"invalid interval; missing floor method\");\n  if (typeof interval.offset !== \"function\") throw new Error(\"invalid interval; missing offset method\");\n  return interval;\n}\n\n// Like maybeInterval, but requires a range method too.\nexport function maybeRangeInterval(interval, type) {\n  interval = maybeInterval(interval, type);\n  if (interval && typeof interval.range !== \"function\") throw new Error(\"invalid interval: missing range method\");\n  return interval;\n}\n\n// Like maybeRangeInterval, but requires a ceil method too.\nexport function maybeNiceInterval(interval, type) {\n  interval = maybeRangeInterval(interval, type);\n  if (interval && typeof interval.ceil !== \"function\") throw new Error(\"invalid interval: missing ceil method\");\n  return interval;\n}\n\n// This distinguishes between per-dimension options and a standalone value.\nexport function maybeValue(value) {\n  return value === undefined || isOptions(value) ? value : {value};\n}\n\n// Coerces the given channel values (if any) to numbers. This is useful when\n// values will be interpolated into other code, such as an SVG transform, and\n// where we don\u2019t wish to allow unexpected behavior for weird input.\nexport function numberChannel(source) {\n  return source == null\n    ? null\n    : {\n        transform: (data) => valueof(data, source, Float64Array),\n        label: labelof(source)\n      };\n}\n\nexport function isTuples(data) {\n  if (!isIterable(data)) return false;\n  for (const d of data) {\n    if (d == null) continue;\n    return typeof d === \"object\" && \"0\" in d && \"1\" in d;\n  }\n}\n\nexport function isIterable(value) {\n  return value && typeof value[Symbol.iterator] === \"function\";\n}\n\nexport function isTextual(values) {\n  for (const value of values) {\n    if (value == null) continue;\n    return typeof value !== \"object\" || value instanceof Date;\n  }\n}\n\nexport function isOrdinal(values) {\n  for (const value of values) {\n    if (value == null) continue;\n    const type = typeof value;\n    return type === \"string\" || type === \"boolean\";\n  }\n}\n\nexport function isTemporal(values) {\n  for (const value of values) {\n    if (value == null) continue;\n    return value instanceof Date;\n  }\n}\n\n// Are these strings that might represent dates? This is stricter than ISO 8601\n// because we want to ignore false positives on numbers; for example, the string\n// \"1192\" is more likely to represent a number than a date even though it is\n// valid ISO 8601 representing 1192-01-01.\nexport function isTemporalString(values) {\n  for (const value of values) {\n    if (value == null) continue;\n    return typeof value === \"string\" && isNaN(value) && isoParse(value);\n  }\n}\n\n// Are these strings that might represent numbers? This is stricter than\n// coercion because we want to ignore false positives on e.g. empty strings.\nexport function isNumericString(values) {\n  for (const value of values) {\n    if (value == null) continue;\n    if (typeof value !== \"string\") return false;\n    if (!value.trim()) continue;\n    return !isNaN(value);\n  }\n}\n\nexport function isNumeric(values) {\n  for (const value of values) {\n    if (value == null) continue;\n    return typeof value === \"number\";\n  }\n}\n\n// Returns true if every non-null value in the specified iterable of values\n// passes the specified predicate, and there is at least one non-null value;\n// returns false if at least one non-null value does not pass the specified\n// predicate; otherwise returns undefined (as if all values are null).\nexport function isEvery(values, is) {\n  let every;\n  for (const value of values) {\n    if (value == null) continue;\n    if (!is(value)) return false;\n    every = true;\n  }\n  return every;\n}\n\n// Mostly relies on d3-color, with a few extra color keywords. Currently this\n// strictly requires that the value be a string; we might want to apply string\n// coercion here, though note that d3-color instances would need to support\n// valueOf to work correctly with InternMap.\n// https://www.w3.org/TR/SVG11/painting.html#SpecifyingPaint\nexport function isColor(value) {\n  if (typeof value !== \"string\") return false;\n  value = value.toLowerCase().trim();\n  return (\n    value === \"none\" ||\n    value === \"currentcolor\" ||\n    (value.startsWith(\"url(\") && value.endsWith(\")\")) || // <funciri>, e.g. pattern or gradient\n    (value.startsWith(\"var(\") && value.endsWith(\")\")) || // CSS variable\n    color(value) !== null\n  );\n}\n\nexport function isOpacity(value) {\n  return typeof value === \"number\" && ((0 <= value && value <= 1) || isNaN(value));\n}\n\nexport function isNoneish(value) {\n  return value == null || isNone(value);\n}\n\nexport function isNone(value) {\n  return /^\\s*none\\s*$/i.test(value);\n}\n\nexport function isRound(value) {\n  return /^\\s*round\\s*$/i.test(value);\n}\n\nexport function maybeAnchor(value, name) {\n  return maybeKeyword(value, name, [\n    \"middle\",\n    \"top-left\",\n    \"top\",\n    \"top-right\",\n    \"right\",\n    \"bottom-right\",\n    \"bottom\",\n    \"bottom-left\",\n    \"left\"\n  ]);\n}\n\nexport function maybeFrameAnchor(value = \"middle\") {\n  return maybeAnchor(value, \"frameAnchor\");\n}\n\n// Like a sort comparator, returns a positive value if the given array of values\n// is in ascending order, a negative value if the values are in descending\n// order. Assumes monotonicity; only tests the first and last values.\nexport function orderof(values) {\n  if (values == null) return;\n  const first = values[0];\n  const last = values[values.length - 1];\n  return descending(first, last);\n}\n\n// Unlike {...defaults, ...options}, this ensures that any undefined (but\n// present) properties in options inherit the given default value.\nexport function inherit(options = {}, ...rest) {\n  let o = options;\n  for (const defaults of rest) {\n    for (const key in defaults) {\n      if (o[key] === undefined) {\n        const value = defaults[key];\n        if (o === options) o = {...o, [key]: value};\n        else o[key] = value;\n      }\n    }\n  }\n  return o;\n}\n\n// Given an iterable of named things (objects with a name property), returns a\n// corresponding object with properties associated with the given name.\nexport function named(things) {\n  console.warn(\"named iterables are deprecated; please use an object instead\");\n  const names = new Set();\n  return Object.fromEntries(\n    Array.from(things, (thing) => {\n      const {name} = thing;\n      if (name == null) throw new Error(\"missing name\");\n      const key = `${name}`;\n      if (key === \"__proto__\") throw new Error(`illegal name: ${key}`);\n      if (names.has(key)) throw new Error(`duplicate name: ${key}`);\n      names.add(key);\n      return [name, thing];\n    })\n  );\n}\n\nexport function maybeNamed(things) {\n  return isIterable(things) ? named(things) : things;\n}\n", "// Positional scales have associated axes, and for ordinal data, a point or band\n// scale is used instead of an ordinal scale.\nexport const position = Symbol(\"position\");\n\n// Color scales default to the turbo interpolator for quantitative data, and to\n// the Tableau10 scheme for ordinal data. Color scales may also have an\n// associated legend.\nexport const color = Symbol(\"color\");\n\n// Radius scales default to the sqrt type, have a default range of [0, 3], and a\n// default domain from 0 to the median first quartile of associated channels.\nexport const radius = Symbol(\"radius\");\n\n// Length scales default to the linear type, have a default range of [0, 12],\n// and a default domain from 0 to the median median of associated channels.\nexport const length = Symbol(\"length\");\n\n// Opacity scales have a default range of [0, 1], and a default domain from 0 to\n// the maximum value of associated channels.\nexport const opacity = Symbol(\"opacity\");\n\n// Symbol scales have a default range of categorical symbols.\nexport const symbol = Symbol(\"symbol\");\n\n// There isn\u2019t really a projection scale; this represents x and y for geometry.\nexport const projection = Symbol(\"projection\");\n\n// TODO Rather than hard-coding the list of known scale names, collect the names\n// and categories for each plot specification, so that custom marks can register\n// custom scales.\nexport const registry = new Map([\n  [\"x\", position],\n  [\"y\", position],\n  [\"fx\", position],\n  [\"fy\", position],\n  [\"r\", radius],\n  [\"color\", color],\n  [\"opacity\", opacity],\n  [\"symbol\", symbol],\n  [\"length\", length],\n  [\"projection\", projection]\n]);\n", "import {symbolAsterisk, symbolDiamond2, symbolPlus, symbolSquare2, symbolTriangle2, symbolTimes} from \"d3\";\nimport {symbolCircle, symbolCross, symbolDiamond, symbolSquare, symbolStar, symbolTriangle, symbolWye} from \"d3\";\n\nexport const sqrt3 = Math.sqrt(3);\nexport const sqrt4_3 = 2 / sqrt3;\n\nconst symbolHexagon = {\n  draw(context, size) {\n    const rx = Math.sqrt(size / Math.PI),\n      ry = rx * sqrt4_3,\n      hy = ry / 2;\n    context.moveTo(0, ry);\n    context.lineTo(rx, hy);\n    context.lineTo(rx, -hy);\n    context.lineTo(0, -ry);\n    context.lineTo(-rx, -hy);\n    context.lineTo(-rx, hy);\n    context.closePath();\n  }\n};\n\nconst symbols = new Map([\n  [\"asterisk\", symbolAsterisk],\n  [\"circle\", symbolCircle],\n  [\"cross\", symbolCross],\n  [\"diamond\", symbolDiamond],\n  [\"diamond2\", symbolDiamond2],\n  [\"hexagon\", symbolHexagon],\n  [\"plus\", symbolPlus],\n  [\"square\", symbolSquare],\n  [\"square2\", symbolSquare2],\n  [\"star\", symbolStar],\n  [\"times\", symbolTimes],\n  [\"triangle\", symbolTriangle],\n  [\"triangle2\", symbolTriangle2],\n  [\"wye\", symbolWye]\n]);\n\nfunction isSymbolObject(value) {\n  return value && typeof value.draw === \"function\";\n}\n\nexport function isSymbol(value) {\n  if (isSymbolObject(value)) return true;\n  if (typeof value !== \"string\") return false;\n  return symbols.has(value.toLowerCase());\n}\n\nexport function maybeSymbol(symbol) {\n  if (symbol == null || isSymbolObject(symbol)) return symbol;\n  const value = symbols.get(`${symbol}`.toLowerCase());\n  if (value) return value;\n  throw new Error(`invalid symbol: ${symbol}`);\n}\n\nexport function maybeSymbolChannel(symbol) {\n  if (symbol == null || isSymbolObject(symbol)) return [undefined, symbol];\n  if (typeof symbol === \"string\") {\n    const value = symbols.get(`${symbol}`.toLowerCase());\n    if (value) return [undefined, value];\n  }\n  return [symbol, undefined];\n}\n", "import {randomLcg} from \"d3\";\nimport {ascendingDefined, descendingDefined} from \"../defined.js\";\nimport {arrayify, isDomainSort, isOptions, maybeValue, valueof} from \"../options.js\";\n\nexport function basic({filter: f1, sort: s1, reverse: r1, transform: t1, initializer: i1, ...options} = {}, transform) {\n  // If both t1 and t2 are defined, returns a composite transform that first\n  // applies t1 and then applies t2.\n  if (t1 === undefined) {\n    // explicit transform overrides filter, sort, and reverse\n    if (f1 != null) t1 = filterTransform(f1);\n    if (s1 != null && !isDomainSort(s1)) t1 = composeTransform(t1, sortTransform(s1));\n    if (r1) t1 = composeTransform(t1, reverseTransform);\n  }\n  if (transform != null && i1 != null) throw new Error(\"transforms cannot be applied after initializers\");\n  return {\n    ...options,\n    ...((s1 === null || isDomainSort(s1)) && {sort: s1}),\n    transform: composeTransform(t1, transform)\n  };\n}\n\nexport function initializer({filter: f1, sort: s1, reverse: r1, initializer: i1, ...options} = {}, initializer) {\n  // If both i1 and i2 are defined, returns a composite initializer that first\n  // applies i1 and then applies i2.\n  if (i1 === undefined) {\n    // explicit initializer overrides filter, sort, and reverse\n    if (f1 != null) i1 = filterTransform(f1);\n    if (s1 != null && !isDomainSort(s1)) i1 = composeInitializer(i1, sortTransform(s1));\n    if (r1) i1 = composeInitializer(i1, reverseTransform);\n  }\n  return {\n    ...options,\n    ...((s1 === null || isDomainSort(s1)) && {sort: s1}),\n    initializer: composeInitializer(i1, initializer)\n  };\n}\n\nfunction composeTransform(t1, t2) {\n  if (t1 == null) return t2 === null ? undefined : t2;\n  if (t2 == null) return t1 === null ? undefined : t1;\n  return function (data, facets, plotOptions) {\n    ({data, facets} = t1.call(this, data, facets, plotOptions));\n    return t2.call(this, arrayify(data), facets, plotOptions);\n  };\n}\n\nfunction composeInitializer(i1, i2) {\n  if (i1 == null) return i2 === null ? undefined : i2;\n  if (i2 == null) return i1 === null ? undefined : i1;\n  return function (data, facets, channels, ...args) {\n    let c1, d1, f1, c2, d2, f2;\n    ({data: d1 = data, facets: f1 = facets, channels: c1} = i1.call(this, data, facets, channels, ...args));\n    ({data: d2 = d1, facets: f2 = f1, channels: c2} = i2.call(this, d1, f1, {...channels, ...c1}, ...args));\n    return {data: d2, facets: f2, channels: {...c1, ...c2}};\n  };\n}\n\nfunction apply(options, t) {\n  return (options.initializer != null ? initializer : basic)(options, t);\n}\n\nexport function filter(test, options) {\n  return apply(options, filterTransform(test));\n}\n\nfunction filterTransform(value) {\n  return (data, facets) => {\n    const V = valueof(data, value);\n    return {data, facets: facets.map((I) => I.filter((i) => V[i]))};\n  };\n}\n\nexport function reverse({sort, ...options} = {}) {\n  return {\n    ...apply(options, reverseTransform),\n    sort: isDomainSort(sort) ? sort : null\n  };\n}\n\nfunction reverseTransform(data, facets) {\n  return {data, facets: facets.map((I) => I.slice().reverse())};\n}\n\nexport function shuffle({seed, sort, ...options} = {}) {\n  return {\n    ...apply(options, sortValue(seed == null ? Math.random : randomLcg(seed))),\n    sort: isDomainSort(sort) ? sort : null\n  };\n}\n\nexport function sort(order, {sort, ...options} = {}) {\n  return {\n    ...(isOptions(order) && order.channel !== undefined ? initializer : apply)(options, sortTransform(order)),\n    sort: isDomainSort(sort) ? sort : null\n  };\n}\n\nfunction sortTransform(value) {\n  return (typeof value === \"function\" && value.length !== 1 ? sortData : sortValue)(value);\n}\n\nfunction sortData(compare) {\n  return (data, facets) => {\n    const compareData = (i, j) => compare(data[i], data[j]);\n    return {data, facets: facets.map((I) => I.slice().sort(compareData))};\n  };\n}\n\nfunction sortValue(value) {\n  let channel, order;\n  ({channel, value, order} = {...maybeValue(value)});\n  const negate = channel?.startsWith(\"-\");\n  if (negate) channel = channel.slice(1);\n  if (order === undefined) order = negate ? descendingDefined : ascendingDefined;\n  if (typeof order !== \"function\") {\n    switch (`${order}`.toLowerCase()) {\n      case \"ascending\":\n        order = ascendingDefined;\n        break;\n      case \"descending\":\n        order = descendingDefined;\n        break;\n      default:\n        throw new Error(`invalid order: ${order}`);\n    }\n  }\n  return (data, facets, channels) => {\n    let V;\n    if (channel === undefined) {\n      V = valueof(data, value);\n    } else {\n      if (channels === undefined) throw new Error(\"channel sort requires an initializer\");\n      V = channels[channel];\n      if (!V) return {}; // ignore missing channel\n      V = V.value;\n    }\n    const compareValue = (i, j) => order(V[i], V[j]);\n    return {data, facets: facets.map((I) => I.slice().sort(compareValue))};\n  };\n}\n", "import {\n  InternSet,\n  deviation,\n  group as grouper,\n  max,\n  maxIndex,\n  mean,\n  median,\n  min,\n  minIndex,\n  mode,\n  rollup,\n  sort,\n  sum,\n  variance\n} from \"d3\";\nimport {ascendingDefined} from \"../defined.js\";\nimport {\n  column,\n  first,\n  identity,\n  isObject,\n  isTemporal,\n  labelof,\n  maybeApplyInterval,\n  maybeColorChannel,\n  maybeColumn,\n  maybeInput,\n  maybeTuple,\n  percentile,\n  range,\n  second,\n  take,\n  valueof\n} from \"../options.js\";\nimport {basic} from \"./basic.js\";\n\n// Group on {z, fill, stroke}.\nexport function groupZ(outputs, options) {\n  return groupn(null, null, outputs, options);\n}\n\n// Group on {z, fill, stroke}, then on x.\nexport function groupX(outputs = {y: \"count\"}, options = {}) {\n  const {x = identity} = options;\n  if (x == null) throw new Error(\"missing channel: x\");\n  return groupn(x, null, outputs, options);\n}\n\n// Group on {z, fill, stroke}, then on y.\nexport function groupY(outputs = {x: \"count\"}, options = {}) {\n  const {y = identity} = options;\n  if (y == null) throw new Error(\"missing channel: y\");\n  return groupn(null, y, outputs, options);\n}\n\n// Group on {z, fill, stroke}, then on x and y.\nexport function group(outputs = {fill: \"count\"}, options = {}) {\n  let {x, y} = options;\n  [x, y] = maybeTuple(x, y);\n  if (x == null) throw new Error(\"missing channel: x\");\n  if (y == null) throw new Error(\"missing channel: y\");\n  return groupn(x, y, outputs, options);\n}\n\nfunction groupn(\n  x, // optionally group on x\n  y, // optionally group on y\n  {\n    data: reduceData = reduceIdentity,\n    filter,\n    sort,\n    reverse,\n    ...outputs // output channel definitions\n  } = {},\n  inputs = {} // input channels and options\n) {\n  // Compute the outputs.\n  outputs = maybeOutputs(outputs, inputs);\n  reduceData = maybeReduce(reduceData, identity);\n  sort = sort == null ? undefined : maybeOutput(\"sort\", sort, inputs);\n  filter = filter == null ? undefined : maybeEvaluator(\"filter\", filter, inputs);\n\n  // Produce x and y output channels as appropriate.\n  const [GX, setGX] = maybeColumn(x);\n  const [GY, setGY] = maybeColumn(y);\n\n  // Greedily materialize the z, fill, and stroke channels (if channels and not\n  // constants) so that we can reference them for subdividing groups without\n  // computing them more than once.\n  const {\n    z,\n    fill,\n    stroke,\n    x1,\n    x2, // consumed if x is an output\n    y1,\n    y2, // consumed if y is an output\n    ...options\n  } = inputs;\n  const [GZ, setGZ] = maybeColumn(z);\n  const [vfill] = maybeColorChannel(fill);\n  const [vstroke] = maybeColorChannel(stroke);\n  const [GF, setGF] = maybeColumn(vfill);\n  const [GS, setGS] = maybeColumn(vstroke);\n\n  return {\n    ...(\"z\" in inputs && {z: GZ || z}),\n    ...(\"fill\" in inputs && {fill: GF || fill}),\n    ...(\"stroke\" in inputs && {stroke: GS || stroke}),\n    ...basic(options, (data, facets, plotOptions) => {\n      const X = maybeApplyInterval(valueof(data, x), plotOptions?.x);\n      const Y = maybeApplyInterval(valueof(data, y), plotOptions?.y);\n      const Z = valueof(data, z);\n      const F = valueof(data, vfill);\n      const S = valueof(data, vstroke);\n      const G = maybeSubgroup(outputs, {z: Z, fill: F, stroke: S});\n      const groupFacets = [];\n      const groupData = [];\n      const GX = X && setGX([]);\n      const GY = Y && setGY([]);\n      const GZ = Z && setGZ([]);\n      const GF = F && setGF([]);\n      const GS = S && setGS([]);\n      let i = 0;\n      for (const o of outputs) o.initialize(data);\n      if (sort) sort.initialize(data);\n      if (filter) filter.initialize(data);\n      for (const facet of facets) {\n        const groupFacet = [];\n        for (const o of outputs) o.scope(\"facet\", facet);\n        if (sort) sort.scope(\"facet\", facet);\n        if (filter) filter.scope(\"facet\", facet);\n        for (const [f, I] of maybeGroup(facet, G)) {\n          for (const [y, gg] of maybeGroup(I, Y)) {\n            for (const [x, g] of maybeGroup(gg, X)) {\n              if (filter && !filter.reduce(g)) continue;\n              groupFacet.push(i++);\n              groupData.push(reduceData.reduceIndex(g, data));\n              if (X) GX.push(x);\n              if (Y) GY.push(y);\n              if (Z) GZ.push(G === Z ? f : Z[g[0]]);\n              if (F) GF.push(G === F ? f : F[g[0]]);\n              if (S) GS.push(G === S ? f : S[g[0]]);\n              for (const o of outputs) o.reduce(g);\n              if (sort) sort.reduce(g);\n            }\n          }\n        }\n        groupFacets.push(groupFacet);\n      }\n      maybeSort(groupFacets, sort, reverse);\n      return {data: groupData, facets: groupFacets};\n    }),\n    ...(!hasOutput(outputs, \"x\") && (GX ? {x: GX} : {x1, x2})),\n    ...(!hasOutput(outputs, \"y\") && (GY ? {y: GY} : {y1, y2})),\n    ...Object.fromEntries(outputs.map(({name, output}) => [name, output]))\n  };\n}\n\nexport function hasOutput(outputs, ...names) {\n  for (const {name} of outputs) {\n    if (names.includes(name)) {\n      return true;\n    }\n  }\n  return false;\n}\n\nexport function maybeOutputs(outputs, inputs, asOutput = maybeOutput) {\n  const entries = Object.entries(outputs);\n  // Propagate standard mark channels by default.\n  if (inputs.title != null && outputs.title === undefined) entries.push([\"title\", reduceTitle]);\n  if (inputs.href != null && outputs.href === undefined) entries.push([\"href\", reduceFirst]);\n  return entries\n    .filter(([, reduce]) => reduce !== undefined)\n    .map(([name, reduce]) => (reduce === null ? nullOutput(name) : asOutput(name, reduce, inputs)));\n}\n\nexport function maybeOutput(name, reduce, inputs, asEvaluator = maybeEvaluator) {\n  let scale; // optional per-channel scale override\n  if (isObject(reduce) && \"reduce\" in reduce) (scale = reduce.scale), (reduce = reduce.reduce); // N.B. array.reduce\n  const evaluator = asEvaluator(name, reduce, inputs);\n  const [output, setOutput] = column(evaluator.label);\n  let O;\n  return {\n    name,\n    output: scale === undefined ? output : {value: output, scale},\n    initialize(data) {\n      evaluator.initialize(data);\n      O = setOutput([]);\n    },\n    scope(scope, I) {\n      evaluator.scope(scope, I);\n    },\n    reduce(I, extent) {\n      O.push(evaluator.reduce(I, extent));\n    }\n  };\n}\n\nfunction nullOutput(name) {\n  return {name, initialize() {}, scope() {}, reduce() {}};\n}\n\nexport function maybeEvaluator(name, reduce, inputs, asReduce = maybeReduce) {\n  const input = maybeInput(name, inputs);\n  const reducer = asReduce(reduce, input);\n  let V, context;\n  return {\n    label: labelof(reducer === reduceCount ? null : input, reducer.label),\n    initialize(data) {\n      V = input === undefined ? data : valueof(data, input);\n      if (reducer.scope === \"data\") {\n        context = reducer.reduceIndex(range(data), V);\n      }\n    },\n    scope(scope, I) {\n      if (reducer.scope === scope) {\n        context = reducer.reduceIndex(I, V);\n      }\n    },\n    reduce(I, extent) {\n      return reducer.scope == null ? reducer.reduceIndex(I, V, extent) : reducer.reduceIndex(I, V, context, extent);\n    }\n  };\n}\n\nexport function maybeGroup(I, X) {\n  return X\n    ? sort(\n        grouper(I, (i) => X[i]),\n        first\n      )\n    : [[, I]];\n}\n\nexport function maybeReduce(reduce, value, fallback = invalidReduce) {\n  if (reduce == null) return fallback(reduce);\n  if (typeof reduce.reduceIndex === \"function\") return reduce;\n  if (typeof reduce.reduce === \"function\" && isObject(reduce)) return reduceReduce(reduce); // N.B. array.reduce\n  if (typeof reduce === \"function\") return reduceFunction(reduce);\n  if (/^p\\d{2}$/i.test(reduce)) return reduceAccessor(percentile(reduce));\n  switch (`${reduce}`.toLowerCase()) {\n    case \"first\":\n      return reduceFirst;\n    case \"last\":\n      return reduceLast;\n    case \"identity\":\n      return reduceIdentity;\n    case \"count\":\n      return reduceCount;\n    case \"distinct\":\n      return reduceDistinct;\n    case \"sum\":\n      return value == null ? reduceCount : reduceSum;\n    case \"proportion\":\n      return reduceProportion(value, \"data\");\n    case \"proportion-facet\":\n      return reduceProportion(value, \"facet\");\n    case \"deviation\":\n      return reduceAccessor(deviation);\n    case \"min\":\n      return reduceAccessor(min);\n    case \"min-index\":\n      return reduceAccessor(minIndex);\n    case \"max\":\n      return reduceAccessor(max);\n    case \"max-index\":\n      return reduceAccessor(maxIndex);\n    case \"mean\":\n      return reduceMaybeTemporalAccessor(mean);\n    case \"median\":\n      return reduceMaybeTemporalAccessor(median);\n    case \"variance\":\n      return reduceAccessor(variance);\n    case \"mode\":\n      return reduceAccessor(mode);\n  }\n  return fallback(reduce);\n}\n\nfunction invalidReduce(reduce) {\n  throw new Error(`invalid reduce: ${reduce}`);\n}\n\nexport function maybeSubgroup(outputs, inputs) {\n  for (const name in inputs) {\n    const value = inputs[name];\n    if (value !== undefined && !outputs.some((o) => o.name === name)) {\n      return value;\n    }\n  }\n}\n\nexport function maybeSort(facets, sort, reverse) {\n  if (sort) {\n    const S = sort.output.transform();\n    const compare = (i, j) => ascendingDefined(S[i], S[j]);\n    facets.forEach((f) => f.sort(compare));\n  }\n  if (reverse) {\n    facets.forEach((f) => f.reverse());\n  }\n}\n\nfunction reduceReduce(reduce) {\n  console.warn(\"deprecated reduce interface; implement reduceIndex instead.\");\n  return {...reduce, reduceIndex: reduce.reduce.bind(reduce)};\n}\n\nfunction reduceFunction(f) {\n  return {\n    reduceIndex(I, X, extent) {\n      return f(take(X, I), extent);\n    }\n  };\n}\n\nfunction reduceAccessor(f) {\n  return {\n    reduceIndex(I, X) {\n      return f(I, (i) => X[i]);\n    }\n  };\n}\n\nfunction reduceMaybeTemporalAccessor(f) {\n  return {\n    reduceIndex(I, X) {\n      const x = f(I, (i) => X[i]);\n      return isTemporal(X) ? new Date(x) : x;\n    }\n  };\n}\n\nexport const reduceIdentity = {\n  reduceIndex(I, X) {\n    return take(X, I);\n  }\n};\n\nexport const reduceFirst = {\n  reduceIndex(I, X) {\n    return X[I[0]];\n  }\n};\n\nconst reduceTitle = {\n  reduceIndex(I, X) {\n    const n = 5;\n    const groups = sort(\n      rollup(\n        I,\n        (V) => V.length,\n        (i) => X[i]\n      ),\n      second\n    );\n    const top = groups.slice(-n).reverse();\n    if (top.length < groups.length) {\n      const bottom = groups.slice(0, 1 - n);\n      top[n - 1] = [`\u2026 ${bottom.length.toLocaleString(\"en-US\")} more`, sum(bottom, second)];\n    }\n    return top.map(([key, value]) => `${key} (${value.toLocaleString(\"en-US\")})`).join(\"\\n\");\n  }\n};\n\nconst reduceLast = {\n  reduceIndex(I, X) {\n    return X[I[I.length - 1]];\n  }\n};\n\nexport const reduceCount = {\n  label: \"Frequency\",\n  reduceIndex(I) {\n    return I.length;\n  }\n};\n\nconst reduceDistinct = {\n  label: \"Distinct\",\n  reduceIndex(I, X) {\n    const s = new InternSet();\n    for (const i of I) s.add(X[i]);\n    return s.size;\n  }\n};\n\nconst reduceSum = reduceAccessor(sum);\n\nfunction reduceProportion(value, scope) {\n  return value == null\n    ? {scope, label: \"Frequency\", reduceIndex: (I, V, basis = 1) => I.length / basis}\n    : {scope, reduceIndex: (I, V, basis = 1) => sum(I, (i) => V[i]) / basis};\n}\n", "import {InternSet, rollups} from \"d3\";\nimport {ascendingDefined, descendingDefined} from \"./defined.js\";\nimport {first, isColor, isEvery, isIterable, isOpacity, labelof, map, maybeValue, range, valueof} from \"./options.js\";\nimport {registry} from \"./scales/index.js\";\nimport {isSymbol, maybeSymbol} from \"./symbol.js\";\nimport {maybeReduce} from \"./transforms/group.js\";\n\nexport function createChannel(data, {scale, type, value, filter, hint}, name) {\n  if (hint === undefined && typeof value?.transform === \"function\") hint = value.hint;\n  return inferChannelScale(name, {\n    scale,\n    type,\n    value: valueof(data, value),\n    label: labelof(value),\n    filter,\n    hint\n  });\n}\n\nexport function createChannels(channels, data) {\n  return Object.fromEntries(\n    Object.entries(channels).map(([name, channel]) => [name, createChannel(data, channel, name)])\n  );\n}\n\n// TODO Use Float64Array for scales with numeric ranges, e.g. position?\nexport function valueObject(channels, scales) {\n  const values = Object.fromEntries(\n    Object.entries(channels).map(([name, {scale: scaleName, value}]) => {\n      const scale = scaleName == null ? null : scales[scaleName];\n      return [name, scale == null ? value : map(value, scale)];\n    })\n  );\n  values.channels = channels; // expose channel state for advanced usage\n  return values;\n}\n\n// If the channel uses the \"auto\" scale (or equivalently true), infer the scale\n// from the channel name and the provided values. For color and symbol channels,\n// no scale is applied if the values are literal; however for symbols, we must\n// promote symbol names (e.g., \"plus\") to symbol implementations (symbolPlus).\n// Note: mutates channel!\nexport function inferChannelScale(name, channel) {\n  const {scale, value} = channel;\n  if (scale === true || scale === \"auto\") {\n    switch (name) {\n      case \"fill\":\n      case \"stroke\":\n      case \"color\":\n        channel.scale = scale !== true && isEvery(value, isColor) ? null : \"color\";\n        break;\n      case \"fillOpacity\":\n      case \"strokeOpacity\":\n      case \"opacity\":\n        channel.scale = scale !== true && isEvery(value, isOpacity) ? null : \"opacity\";\n        break;\n      case \"symbol\":\n        if (scale !== true && isEvery(value, isSymbol)) {\n          channel.scale = null;\n          channel.value = map(value, maybeSymbol);\n        } else {\n          channel.scale = \"symbol\";\n        }\n        break;\n      default:\n        channel.scale = registry.has(name) ? name : null;\n        break;\n    }\n  } else if (scale === false) {\n    channel.scale = null;\n  } else if (scale != null && !registry.has(scale)) {\n    throw new Error(`unknown scale: ${scale}`);\n  }\n  return channel;\n}\n\n// Note: mutates channel.domain! This is set to a function so that it is lazily\n// computed; i.e., if the scale\u2019s domain is set explicitly, that takes priority\n// over the sort option, and we don\u2019t need to do additional work.\nexport function channelDomain(data, facets, channels, facetChannels, options) {\n  const {order: defaultOrder, reverse: defaultReverse, reduce: defaultReduce = true, limit: defaultLimit} = options;\n  for (const x in options) {\n    if (!registry.has(x)) continue; // ignore unknown scale keys (including generic options)\n    let {value: y, order = defaultOrder, reverse = defaultReverse, reduce = defaultReduce, limit = defaultLimit} = maybeValue(options[x]); // prettier-ignore\n    const negate = y?.startsWith(\"-\");\n    if (negate) y = y.slice(1);\n    order = order === undefined ? negate !== (y === \"width\" || y === \"height\") ? descendingGroup : ascendingGroup : maybeOrder(order); // prettier-ignore\n    if (reduce == null || reduce === false) continue; // disabled reducer\n    const X = x === \"fx\" || x === \"fy\" ? reindexFacetChannel(facets, facetChannels[x]) : findScaleChannel(channels, x);\n    if (!X) throw new Error(`missing channel for scale: ${x}`);\n    const XV = X.value;\n    const [lo = 0, hi = Infinity] = isIterable(limit) ? limit : limit < 0 ? [limit] : [0, limit];\n    if (y == null) {\n      X.domain = () => {\n        let domain = Array.from(new InternSet(XV)); // remove any duplicates\n        if (reverse) domain = domain.reverse();\n        if (lo !== 0 || hi !== Infinity) domain = domain.slice(lo, hi);\n        return domain;\n      };\n    } else {\n      const YV =\n        y === \"data\"\n          ? data\n          : y === \"height\"\n          ? difference(channels, \"y1\", \"y2\")\n          : y === \"width\"\n          ? difference(channels, \"x1\", \"x2\")\n          : values(channels, y, y === \"y\" ? \"y2\" : y === \"x\" ? \"x2\" : undefined);\n      const reducer = maybeReduce(reduce === true ? \"max\" : reduce, YV);\n      X.domain = () => {\n        let domain = rollups(\n          range(XV),\n          (I) => reducer.reduceIndex(I, YV),\n          (i) => XV[i]\n        );\n        if (order) domain.sort(order);\n        if (reverse) domain.reverse();\n        if (lo !== 0 || hi !== Infinity) domain = domain.slice(lo, hi);\n        return domain.map(first);\n      };\n    }\n  }\n}\n\nfunction findScaleChannel(channels, scale) {\n  for (const name in channels) {\n    const channel = channels[name];\n    if (channel.scale === scale) return channel;\n  }\n}\n\n// Facet channels are not affected by transforms; so, to compute the domain of a\n// facet scale, we must first re-index the facet channel according to the\n// transformed mark index. Note: mutates channel, but that should be safe here?\nfunction reindexFacetChannel(facets, channel) {\n  const originalFacets = facets.original;\n  if (originalFacets === facets) return channel; // not transformed\n  const V1 = channel.value;\n  const V2 = (channel.value = []); // mutates channel!\n  for (let i = 0; i < originalFacets.length; ++i) {\n    const vi = V1[originalFacets[i][0]];\n    for (const j of facets[i]) V2[j] = vi;\n  }\n  return channel;\n}\n\nfunction difference(channels, k1, k2) {\n  const X1 = values(channels, k1);\n  const X2 = values(channels, k2);\n  return map(X2, (x2, i) => Math.abs(x2 - X1[i]), Float64Array);\n}\n\nfunction values(channels, name, alias) {\n  let channel = channels[name];\n  if (!channel && alias !== undefined) channel = channels[alias];\n  if (channel) return channel.value;\n  throw new Error(`missing channel: ${name}`);\n}\n\nfunction maybeOrder(order) {\n  if (order == null || typeof order === \"function\") return order;\n  switch (`${order}`.toLowerCase()) {\n    case \"ascending\":\n      return ascendingGroup;\n    case \"descending\":\n      return descendingGroup;\n  }\n  throw new Error(`invalid order: ${order}`);\n}\n\nfunction ascendingGroup([ak, av], [bk, bv]) {\n  return ascendingDefined(av, bv) || ascendingDefined(ak, bk);\n}\n\nfunction descendingGroup([ak, av], [bk, bv]) {\n  return descendingDefined(av, bv) || ascendingDefined(ak, bk);\n}\n\nexport function getSource(channels, key) {\n  let channel = channels[key];\n  if (!channel) return;\n  while (channel.source) channel = channel.source;\n  return channel.source === null ? null : channel;\n}\n", "import {creator, select} from \"d3\";\n\nexport function createContext(options = {}) {\n  const {document = typeof window !== \"undefined\" ? window.document : undefined} = options;\n  return {document};\n}\n\nexport function create(name, {document}) {\n  return select(creator(name).call(document.documentElement));\n}\n", "let warnings = 0;\n\nexport function consumeWarnings() {\n  const w = warnings;\n  warnings = 0;\n  return w;\n}\n\nexport function warn(message) {\n  console.warn(message);\n  ++warnings;\n}\n", "import {\n  geoAlbers,\n  geoAlbersUsa,\n  geoAzimuthalEqualArea,\n  geoAzimuthalEquidistant,\n  geoClipRectangle,\n  geoConicConformal,\n  geoConicEqualArea,\n  geoConicEquidistant,\n  geoEqualEarth,\n  geoEquirectangular,\n  geoGnomonic,\n  geoMercator,\n  geoOrthographic,\n  geoPath,\n  geoStereographic,\n  geoStream,\n  geoTransform,\n  geoTransverseMercator\n} from \"d3\";\nimport {valueObject} from \"./channel.js\";\nimport {coerceNumbers, constant, isObject} from \"./options.js\";\nimport {warn} from \"./warnings.js\";\n\nconst pi = Math.PI;\nconst tau = 2 * pi;\nconst defaultAspectRatio = 0.618;\n\nexport function createProjection(\n  {\n    projection,\n    inset: globalInset = 0,\n    insetTop = globalInset,\n    insetRight = globalInset,\n    insetBottom = globalInset,\n    insetLeft = globalInset\n  } = {},\n  dimensions\n) {\n  if (projection == null) return;\n  if (typeof projection.stream === \"function\") return projection; // d3 projection\n  let options;\n  let domain;\n  let clip = \"frame\";\n\n  // If the projection was specified as an object with additional options,\n  // extract those. The order of precedence for insetTop (and other insets) is:\n  // projection.insetTop, projection.inset, (global) insetTop, (global) inset.\n  // Any other options on this object will be passed through to the initializer.\n  if (isObject(projection)) {\n    let inset;\n    ({\n      type: projection,\n      domain,\n      inset,\n      insetTop = inset !== undefined ? inset : insetTop,\n      insetRight = inset !== undefined ? inset : insetRight,\n      insetBottom = inset !== undefined ? inset : insetBottom,\n      insetLeft = inset !== undefined ? inset : insetLeft,\n      clip = clip,\n      ...options\n    } = projection);\n    if (projection == null) return;\n  }\n\n  // For named projections, retrieve the corresponding projection initializer.\n  if (typeof projection !== \"function\") ({type: projection} = namedProjection(projection));\n\n  // Compute the frame dimensions and invoke the projection initializer.\n  const {width, height, marginLeft, marginRight, marginTop, marginBottom} = dimensions;\n  const dx = width - marginLeft - marginRight - insetLeft - insetRight;\n  const dy = height - marginTop - marginBottom - insetTop - insetBottom;\n  projection = projection?.({width: dx, height: dy, clip, ...options});\n\n  // The projection initializer might decide to not use a projection.\n  if (projection == null) return;\n  clip = maybePostClip(clip, marginLeft, marginTop, width - marginRight, height - marginBottom);\n\n  // Translate the origin to the top-left corner, respecting margins and insets.\n  let tx = marginLeft + insetLeft;\n  let ty = marginTop + insetTop;\n  let transform;\n\n  // If a domain is specified, fit the projection to the frame.\n  if (domain != null) {\n    const [[x0, y0], [x1, y1]] = geoPath(projection).bounds(domain);\n    const k = Math.min(dx / (x1 - x0), dy / (y1 - y0));\n    if (k > 0) {\n      tx -= (k * (x0 + x1) - dx) / 2;\n      ty -= (k * (y0 + y1) - dy) / 2;\n      transform = geoTransform({\n        point(x, y) {\n          this.stream.point(x * k + tx, y * k + ty);\n        }\n      });\n    } else {\n      warn(`Warning: the projection could not be fit to the specified domain; using the default scale.`);\n    }\n  }\n\n  transform ??=\n    tx === 0 && ty === 0\n      ? identity()\n      : geoTransform({\n          point(x, y) {\n            this.stream.point(x + tx, y + ty);\n          }\n        });\n\n  return {stream: (s) => projection.stream(transform.stream(clip(s)))};\n}\n\nfunction namedProjection(projection) {\n  switch (`${projection}`.toLowerCase()) {\n    case \"albers-usa\":\n      return scaleProjection(geoAlbersUsa, 0.7463, 0.4673);\n    case \"albers\":\n      return conicProjection(geoAlbers, 0.7463, 0.4673);\n    case \"azimuthal-equal-area\":\n      return scaleProjection(geoAzimuthalEqualArea, 4, 4);\n    case \"azimuthal-equidistant\":\n      return scaleProjection(geoAzimuthalEquidistant, tau, tau);\n    case \"conic-conformal\":\n      return conicProjection(geoConicConformal, tau, tau);\n    case \"conic-equal-area\":\n      return conicProjection(geoConicEqualArea, 6.1702, 2.9781);\n    case \"conic-equidistant\":\n      return conicProjection(geoConicEquidistant, 7.312, 3.6282);\n    case \"equal-earth\":\n      return scaleProjection(geoEqualEarth, 5.4133, 2.6347);\n    case \"equirectangular\":\n      return scaleProjection(geoEquirectangular, tau, pi);\n    case \"gnomonic\":\n      return scaleProjection(geoGnomonic, 3.4641, 3.4641);\n    case \"identity\":\n      return {type: identity};\n    case \"reflect-y\":\n      return {type: reflectY};\n    case \"mercator\":\n      return scaleProjection(geoMercator, tau, tau);\n    case \"orthographic\":\n      return scaleProjection(geoOrthographic, 2, 2);\n    case \"stereographic\":\n      return scaleProjection(geoStereographic, 2, 2);\n    case \"transverse-mercator\":\n      return scaleProjection(geoTransverseMercator, tau, tau);\n    default:\n      throw new Error(`unknown projection type: ${projection}`);\n  }\n}\n\nfunction maybePostClip(clip, x1, y1, x2, y2) {\n  if (clip === false || clip == null || typeof clip === \"number\") return (s) => s;\n  if (clip === true) clip = \"frame\";\n  switch (`${clip}`.toLowerCase()) {\n    case \"frame\":\n      return geoClipRectangle(x1, y1, x2, y2);\n    default:\n      throw new Error(`unknown projection clip type: ${clip}`);\n  }\n}\n\nfunction scaleProjection(createProjection, kx, ky) {\n  return {\n    type: ({width, height, rotate, precision = 0.15, clip}) => {\n      const projection = createProjection();\n      if (precision != null) projection.precision?.(precision);\n      if (rotate != null) projection.rotate?.(rotate);\n      if (typeof clip === \"number\") projection.clipAngle?.(clip);\n      projection.scale(Math.min(width / kx, height / ky));\n      projection.translate([width / 2, height / 2]);\n      return projection;\n    },\n    aspectRatio: ky / kx\n  };\n}\n\nfunction conicProjection(createProjection, kx, ky) {\n  const {type, aspectRatio} = scaleProjection(createProjection, kx, ky);\n  return {\n    type: (options) => {\n      const {parallels, domain, width, height} = options;\n      const projection = type(options);\n      if (parallels != null) {\n        projection.parallels(parallels);\n        if (domain === undefined) {\n          projection.fitSize([width, height], {type: \"Sphere\"});\n        }\n      }\n      return projection;\n    },\n    aspectRatio\n  };\n}\n\nconst identity = constant({stream: (stream) => stream});\n\nconst reflectY = constant(\n  geoTransform({\n    point(x, y) {\n      this.stream.point(x, -y);\n    }\n  })\n);\n\n// Applies a point-wise projection to the given paired x and y channels.\n// Note: mutates values!\nexport function project(cx, cy, values, projection) {\n  const x = values[cx];\n  const y = values[cy];\n  const n = x.length;\n  const X = (values[cx] = new Float64Array(n).fill(NaN));\n  const Y = (values[cy] = new Float64Array(n).fill(NaN));\n  let i;\n  const stream = projection.stream({\n    point(x, y) {\n      X[i] = x;\n      Y[i] = y;\n    }\n  });\n  for (i = 0; i < n; ++i) {\n    stream.point(x[i], y[i]);\n  }\n}\n\n// Returns true if a projection was specified. This should match the logic of\n// createProjection above, and is called before we construct the projection.\n// (Though note that we ignore the edge case where the projection initializer\n// may return null.)\nexport function hasProjection({projection} = {}) {\n  if (projection == null) return false;\n  if (typeof projection.stream === \"function\") return true;\n  if (isObject(projection)) projection = projection.type;\n  return projection != null;\n}\n\n// When a named projection is specified, we can use its natural aspect ratio to\n// determine a good value for the projection\u2019s height based on the desired\n// width. When we don\u2019t have a way to know, the golden ratio is our best guess.\n// Due to a circular dependency (we need to know the height before we can\n// construct the projection), we have to test the raw projection option rather\n// than the materialized projection; therefore we must be extremely careful that\n// the logic of this function exactly matches createProjection above!\nexport function projectionAspectRatio(projection) {\n  if (typeof projection?.stream === \"function\") return defaultAspectRatio;\n  if (isObject(projection)) projection = projection.type;\n  if (projection == null) return;\n  if (typeof projection !== \"function\") {\n    const {aspectRatio} = namedProjection(projection);\n    if (aspectRatio) return aspectRatio;\n  }\n  return defaultAspectRatio;\n}\n\n// Extract the (possibly) scaled values for the x and y channels, and apply the\n// projection if any.\nexport function applyPosition(channels, scales, {projection}) {\n  const {x, y} = channels;\n  let position = {};\n  if (x) position.x = x;\n  if (y) position.y = y;\n  position = valueObject(position, scales);\n  if (projection && x?.scale === \"x\" && y?.scale === \"y\") project(\"x\", \"y\", position, projection);\n  if (x) position.x = coerceNumbers(position.x);\n  if (y) position.y = coerceNumbers(position.y);\n  return position;\n}\n\nexport function getGeometryChannels(channel) {\n  const X = [];\n  const Y = [];\n  const x = {scale: \"x\", value: X};\n  const y = {scale: \"y\", value: Y};\n  const sink = {\n    point(x, y) {\n      X.push(x);\n      Y.push(y);\n    },\n    lineStart() {},\n    lineEnd() {},\n    polygonStart() {},\n    polygonEnd() {},\n    sphere() {}\n  };\n  for (const object of channel.value) geoStream(object, sink);\n  return [x, y];\n}\n", "import {\n  interpolateBlues,\n  interpolateBrBG,\n  interpolateBuGn,\n  interpolateBuPu,\n  interpolateGnBu,\n  interpolateGreens,\n  interpolateGreys,\n  interpolateOranges,\n  interpolateOrRd,\n  interpolatePiYG,\n  interpolatePRGn,\n  interpolatePuBu,\n  interpolatePuBuGn,\n  interpolatePuOr,\n  interpolatePuRd,\n  interpolatePurples,\n  interpolateRdBu,\n  interpolateRdGy,\n  interpolateRdPu,\n  interpolateRdYlBu,\n  interpolateRdYlGn,\n  interpolateReds,\n  interpolateSpectral,\n  interpolateYlGn,\n  interpolateYlGnBu,\n  interpolateYlOrBr,\n  interpolateYlOrRd,\n  interpolateTurbo,\n  interpolateViridis,\n  interpolateMagma,\n  interpolateInferno,\n  interpolatePlasma,\n  interpolateCividis,\n  interpolateCubehelixDefault,\n  interpolateWarm,\n  interpolateCool,\n  interpolateRainbow,\n  interpolateSinebow,\n  quantize,\n  schemeAccent,\n  schemeBlues,\n  schemeBrBG,\n  schemeBuGn,\n  schemeBuPu,\n  schemeCategory10,\n  schemeDark2,\n  schemeGnBu,\n  schemeGreens,\n  schemeGreys,\n  schemeOranges,\n  schemeOrRd,\n  schemePaired,\n  schemePastel1,\n  schemePastel2,\n  schemePiYG,\n  schemePRGn,\n  schemePuBu,\n  schemePuBuGn,\n  schemePuOr,\n  schemePuRd,\n  schemePurples,\n  schemeRdBu,\n  schemeRdGy,\n  schemeRdPu,\n  schemeRdYlBu,\n  schemeRdYlGn,\n  schemeReds,\n  schemeSet1,\n  schemeSet2,\n  schemeSet3,\n  schemeSpectral,\n  schemeTableau10,\n  schemeYlGn,\n  schemeYlGnBu,\n  schemeYlOrBr,\n  schemeYlOrRd\n} from \"d3\";\n\nconst categoricalSchemes = new Map([\n  [\"accent\", schemeAccent],\n  [\"category10\", schemeCategory10],\n  [\"dark2\", schemeDark2],\n  [\"paired\", schemePaired],\n  [\"pastel1\", schemePastel1],\n  [\"pastel2\", schemePastel2],\n  [\"set1\", schemeSet1],\n  [\"set2\", schemeSet2],\n  [\"set3\", schemeSet3],\n  [\"tableau10\", schemeTableau10]\n]);\n\nexport function isCategoricalScheme(scheme) {\n  return scheme != null && categoricalSchemes.has(`${scheme}`.toLowerCase());\n}\n\nconst ordinalSchemes = new Map([\n  ...categoricalSchemes,\n\n  // diverging\n  [\"brbg\", scheme11(schemeBrBG, interpolateBrBG)],\n  [\"prgn\", scheme11(schemePRGn, interpolatePRGn)],\n  [\"piyg\", scheme11(schemePiYG, interpolatePiYG)],\n  [\"puor\", scheme11(schemePuOr, interpolatePuOr)],\n  [\"rdbu\", scheme11(schemeRdBu, interpolateRdBu)],\n  [\"rdgy\", scheme11(schemeRdGy, interpolateRdGy)],\n  [\"rdylbu\", scheme11(schemeRdYlBu, interpolateRdYlBu)],\n  [\"rdylgn\", scheme11(schemeRdYlGn, interpolateRdYlGn)],\n  [\"spectral\", scheme11(schemeSpectral, interpolateSpectral)],\n\n  // reversed diverging (for temperature data)\n  [\"burd\", scheme11r(schemeRdBu, interpolateRdBu)],\n  [\"buylrd\", scheme11r(schemeRdYlBu, interpolateRdYlBu)],\n\n  // sequential (single-hue)\n  [\"blues\", scheme9(schemeBlues, interpolateBlues)],\n  [\"greens\", scheme9(schemeGreens, interpolateGreens)],\n  [\"greys\", scheme9(schemeGreys, interpolateGreys)],\n  [\"oranges\", scheme9(schemeOranges, interpolateOranges)],\n  [\"purples\", scheme9(schemePurples, interpolatePurples)],\n  [\"reds\", scheme9(schemeReds, interpolateReds)],\n\n  // sequential (multi-hue)\n  [\"turbo\", schemei(interpolateTurbo)],\n  [\"viridis\", schemei(interpolateViridis)],\n  [\"magma\", schemei(interpolateMagma)],\n  [\"inferno\", schemei(interpolateInferno)],\n  [\"plasma\", schemei(interpolatePlasma)],\n  [\"cividis\", schemei(interpolateCividis)],\n  [\"cubehelix\", schemei(interpolateCubehelixDefault)],\n  [\"warm\", schemei(interpolateWarm)],\n  [\"cool\", schemei(interpolateCool)],\n  [\"bugn\", scheme9(schemeBuGn, interpolateBuGn)],\n  [\"bupu\", scheme9(schemeBuPu, interpolateBuPu)],\n  [\"gnbu\", scheme9(schemeGnBu, interpolateGnBu)],\n  [\"orrd\", scheme9(schemeOrRd, interpolateOrRd)],\n  [\"pubu\", scheme9(schemePuBu, interpolatePuBu)],\n  [\"pubugn\", scheme9(schemePuBuGn, interpolatePuBuGn)],\n  [\"purd\", scheme9(schemePuRd, interpolatePuRd)],\n  [\"rdpu\", scheme9(schemeRdPu, interpolateRdPu)],\n  [\"ylgn\", scheme9(schemeYlGn, interpolateYlGn)],\n  [\"ylgnbu\", scheme9(schemeYlGnBu, interpolateYlGnBu)],\n  [\"ylorbr\", scheme9(schemeYlOrBr, interpolateYlOrBr)],\n  [\"ylorrd\", scheme9(schemeYlOrRd, interpolateYlOrRd)],\n\n  // cyclical\n  [\"rainbow\", schemeicyclical(interpolateRainbow)],\n  [\"sinebow\", schemeicyclical(interpolateSinebow)]\n]);\n\nfunction scheme9(scheme, interpolate) {\n  return ({length: n}) => {\n    if (n === 1) return [scheme[3][1]]; // favor midpoint\n    if (n === 2) return [scheme[3][1], scheme[3][2]]; // favor darker\n    n = Math.max(3, Math.floor(n));\n    return n > 9 ? quantize(interpolate, n) : scheme[n];\n  };\n}\n\nfunction scheme11(scheme, interpolate) {\n  return ({length: n}) => {\n    if (n === 2) return [scheme[3][0], scheme[3][2]]; // favor diverging extrema\n    n = Math.max(3, Math.floor(n));\n    return n > 11 ? quantize(interpolate, n) : scheme[n];\n  };\n}\n\nfunction scheme11r(scheme, interpolate) {\n  return ({length: n}) => {\n    if (n === 2) return [scheme[3][2], scheme[3][0]]; // favor diverging extrema\n    n = Math.max(3, Math.floor(n));\n    return n > 11 ? quantize((t) => interpolate(1 - t), n) : scheme[n].slice().reverse();\n  };\n}\n\nfunction schemei(interpolate) {\n  return ({length: n}) => quantize(interpolate, Math.max(2, Math.floor(n)));\n}\n\nfunction schemeicyclical(interpolate) {\n  return ({length: n}) => quantize(interpolate, Math.floor(n) + 1).slice(0, -1);\n}\n\nexport function ordinalScheme(scheme) {\n  const s = `${scheme}`.toLowerCase();\n  if (!ordinalSchemes.has(s)) throw new Error(`unknown ordinal scheme: ${s}`);\n  return ordinalSchemes.get(s);\n}\n\nexport function ordinalRange(scheme, length) {\n  const s = ordinalScheme(scheme);\n  const r = typeof s === \"function\" ? s({length}) : s;\n  return r.length !== length ? r.slice(0, length) : r;\n}\n\n// If the specified domain contains only booleans (ignoring null and undefined),\n// returns a corresponding range where false is mapped to the low color and true\n// is mapped to the high color of the specified scheme.\nexport function maybeBooleanRange(domain, scheme = \"greys\") {\n  const range = new Set();\n  const [f, t] = ordinalRange(scheme, 2);\n  for (const value of domain) {\n    if (value == null) continue;\n    if (value === true) range.add(t);\n    else if (value === false) range.add(f);\n    else return;\n  }\n  return [...range];\n}\n\nconst quantitativeSchemes = new Map([\n  // diverging\n  [\"brbg\", interpolateBrBG],\n  [\"prgn\", interpolatePRGn],\n  [\"piyg\", interpolatePiYG],\n  [\"puor\", interpolatePuOr],\n  [\"rdbu\", interpolateRdBu],\n  [\"rdgy\", interpolateRdGy],\n  [\"rdylbu\", interpolateRdYlBu],\n  [\"rdylgn\", interpolateRdYlGn],\n  [\"spectral\", interpolateSpectral],\n\n  // reversed diverging (for temperature data)\n  [\"burd\", (t) => interpolateRdBu(1 - t)],\n  [\"buylrd\", (t) => interpolateRdYlBu(1 - t)],\n\n  // sequential (single-hue)\n  [\"blues\", interpolateBlues],\n  [\"greens\", interpolateGreens],\n  [\"greys\", interpolateGreys],\n  [\"purples\", interpolatePurples],\n  [\"reds\", interpolateReds],\n  [\"oranges\", interpolateOranges],\n\n  // sequential (multi-hue)\n  [\"turbo\", interpolateTurbo],\n  [\"viridis\", interpolateViridis],\n  [\"magma\", interpolateMagma],\n  [\"inferno\", interpolateInferno],\n  [\"plasma\", interpolatePlasma],\n  [\"cividis\", interpolateCividis],\n  [\"cubehelix\", interpolateCubehelixDefault],\n  [\"warm\", interpolateWarm],\n  [\"cool\", interpolateCool],\n  [\"bugn\", interpolateBuGn],\n  [\"bupu\", interpolateBuPu],\n  [\"gnbu\", interpolateGnBu],\n  [\"orrd\", interpolateOrRd],\n  [\"pubugn\", interpolatePuBuGn],\n  [\"pubu\", interpolatePuBu],\n  [\"purd\", interpolatePuRd],\n  [\"rdpu\", interpolateRdPu],\n  [\"ylgnbu\", interpolateYlGnBu],\n  [\"ylgn\", interpolateYlGn],\n  [\"ylorbr\", interpolateYlOrBr],\n  [\"ylorrd\", interpolateYlOrRd],\n\n  // cyclical\n  [\"rainbow\", interpolateRainbow],\n  [\"sinebow\", interpolateSinebow]\n]);\n\nexport function quantitativeScheme(scheme) {\n  const s = `${scheme}`.toLowerCase();\n  if (!quantitativeSchemes.has(s)) throw new Error(`unknown quantitative scheme: ${s}`);\n  return quantitativeSchemes.get(s);\n}\n\nconst divergingSchemes = new Set([\n  \"brbg\",\n  \"prgn\",\n  \"piyg\",\n  \"puor\",\n  \"rdbu\",\n  \"rdgy\",\n  \"rdylbu\",\n  \"rdylgn\",\n  \"spectral\",\n  \"burd\",\n  \"buylrd\"\n]);\n\nexport function isDivergingScheme(scheme) {\n  return scheme != null && divergingSchemes.has(`${scheme}`.toLowerCase());\n}\n", "import {\n  descending,\n  extent,\n  interpolateHcl,\n  interpolateHsl,\n  interpolateLab,\n  interpolateNumber,\n  interpolateRgb,\n  interpolateRound,\n  max,\n  median,\n  min,\n  piecewise,\n  quantile,\n  quantize,\n  reverse as reverseof,\n  scaleIdentity,\n  scaleLinear,\n  scaleLog,\n  scalePow,\n  scaleQuantile,\n  scaleSymlog,\n  scaleThreshold,\n  ticks\n} from \"d3\";\nimport {finite, negative, positive} from \"../defined.js\";\nimport {arrayify, constant, maybeNiceInterval, maybeRangeInterval, orderof, slice} from \"../options.js\";\nimport {color, length, opacity, radius, registry} from \"./index.js\";\nimport {ordinalRange, quantitativeScheme} from \"./schemes.js\";\n\nexport const flip = (i) => (t) => i(1 - t);\nconst unit = [0, 1];\n\nconst interpolators = new Map([\n  // numbers\n  [\"number\", interpolateNumber],\n\n  // color spaces\n  [\"rgb\", interpolateRgb],\n  [\"hsl\", interpolateHsl],\n  [\"hcl\", interpolateHcl],\n  [\"lab\", interpolateLab]\n]);\n\nexport function maybeInterpolator(interpolate) {\n  const i = `${interpolate}`.toLowerCase();\n  if (!interpolators.has(i)) throw new Error(`unknown interpolator: ${i}`);\n  return interpolators.get(i);\n}\n\nexport function createScaleQ(\n  key,\n  scale,\n  channels,\n  {\n    type,\n    nice,\n    clamp,\n    zero,\n    domain = inferAutoDomain(key, channels),\n    unknown,\n    round,\n    scheme,\n    interval,\n    range = registry.get(key) === radius\n      ? inferRadialRange(channels, domain)\n      : registry.get(key) === length\n      ? inferLengthRange(channels, domain)\n      : registry.get(key) === opacity\n      ? unit\n      : undefined,\n    interpolate = registry.get(key) === color\n      ? scheme == null && range !== undefined\n        ? interpolateRgb\n        : quantitativeScheme(scheme !== undefined ? scheme : type === \"cyclical\" ? \"rainbow\" : \"turbo\")\n      : round\n      ? interpolateRound\n      : interpolateNumber,\n    reverse\n  }\n) {\n  interval = maybeRangeInterval(interval, type);\n  if (type === \"cyclical\" || type === \"sequential\") type = \"linear\"; // shorthand for color schemes\n  if (typeof interpolate !== \"function\") interpolate = maybeInterpolator(interpolate); // named interpolator\n  reverse = !!reverse;\n\n  // If an explicit range is specified, and it has a different length than the\n  // domain, then redistribute the range using a piecewise interpolator.\n  if (range !== undefined) {\n    const n = (domain = arrayify(domain)).length;\n    const m = (range = arrayify(range)).length;\n    if (n !== m) {\n      if (interpolate.length === 1) throw new Error(\"invalid piecewise interpolator\"); // e.g., turbo\n      interpolate = piecewise(interpolate, range);\n      range = undefined;\n    }\n  }\n\n  // Disambiguate between a two-argument interpolator that is used in\n  // conjunction with the range, and a one-argument \u201Cfixed\u201D interpolator on the\n  // [0, 1] interval as with the RdBu color scheme.\n  if (interpolate.length === 1) {\n    if (reverse) {\n      interpolate = flip(interpolate);\n      reverse = false;\n    }\n    if (range === undefined) {\n      range = Float64Array.from(domain, (_, i) => i / (domain.length - 1));\n      if (range.length === 2) range = unit; // optimize common case of [0, 1]\n    }\n    scale.interpolate((range === unit ? constant : interpolatePiecewise)(interpolate));\n  } else {\n    scale.interpolate(interpolate);\n  }\n\n  // If a zero option is specified, we assume that the domain is numeric, and we\n  // want to ensure that the domain crosses zero. However, note that the domain\n  // may be reversed (descending) so we shouldn\u2019t assume that the first value is\n  // smaller than the last; and also it\u2019s possible that the domain has more than\n  // two values for a \u201Cpoly\u201D scale. And lastly be careful not to mutate input!\n  if (zero) {\n    const [min, max] = extent(domain);\n    if (min > 0 || max < 0) {\n      domain = slice(domain);\n      if (orderof(domain) !== Math.sign(min)) domain[domain.length - 1] = 0; // [2, 1] or [-2, -1]\n      else domain[0] = 0; // [1, 2] or [-1, -2]\n    }\n  }\n\n  if (reverse) domain = reverseof(domain);\n  scale.domain(domain).unknown(unknown);\n  if (nice) scale.nice(maybeNice(nice, type)), (domain = scale.domain());\n  if (range !== undefined) scale.range(range);\n  if (clamp) scale.clamp(clamp);\n  return {type, domain, range, scale, interpolate, interval};\n}\n\nfunction maybeNice(nice, type) {\n  return nice === true ? undefined : typeof nice === \"number\" ? nice : maybeNiceInterval(nice, type);\n}\n\nexport function createScaleLinear(key, channels, options) {\n  return createScaleQ(key, scaleLinear(), channels, options);\n}\n\nexport function createScaleSqrt(key, channels, options) {\n  return createScalePow(key, channels, {...options, exponent: 0.5});\n}\n\nexport function createScalePow(key, channels, {exponent = 1, ...options}) {\n  return createScaleQ(key, scalePow().exponent(exponent), channels, {...options, type: \"pow\"});\n}\n\nexport function createScaleLog(key, channels, {base = 10, domain = inferLogDomain(channels), ...options}) {\n  return createScaleQ(key, scaleLog().base(base), channels, {...options, domain});\n}\n\nexport function createScaleSymlog(key, channels, {constant = 1, ...options}) {\n  return createScaleQ(key, scaleSymlog().constant(constant), channels, options);\n}\n\nexport function createScaleQuantile(\n  key,\n  channels,\n  {\n    range,\n    quantiles = range === undefined ? 5 : (range = [...range]).length, // deprecated; use n instead\n    n = quantiles,\n    scheme = \"rdylbu\",\n    domain = inferQuantileDomain(channels),\n    unknown,\n    interpolate,\n    reverse\n  }\n) {\n  if (range === undefined) {\n    range =\n      interpolate !== undefined\n        ? quantize(interpolate, n)\n        : registry.get(key) === color\n        ? ordinalRange(scheme, n)\n        : undefined;\n  }\n  if (domain.length > 0) {\n    domain = scaleQuantile(domain, range === undefined ? {length: n} : range).quantiles();\n  }\n  return createScaleThreshold(key, channels, {domain, range, reverse, unknown});\n}\n\nexport function createScaleQuantize(\n  key,\n  channels,\n  {\n    range,\n    n = range === undefined ? 5 : (range = [...range]).length,\n    scheme = \"rdylbu\",\n    domain = inferAutoDomain(key, channels),\n    unknown,\n    interpolate,\n    reverse\n  }\n) {\n  const [min, max] = extent(domain);\n  let thresholds;\n  if (range === undefined) {\n    thresholds = ticks(min, max, n); // approximate number of nice, round thresholds\n    if (thresholds[0] <= min) thresholds.splice(0, 1); // drop exact lower bound\n    if (thresholds[thresholds.length - 1] >= max) thresholds.pop(); // drop exact upper bound\n    n = thresholds.length + 1;\n    range =\n      interpolate !== undefined\n        ? quantize(interpolate, n)\n        : registry.get(key) === color\n        ? ordinalRange(scheme, n)\n        : undefined;\n  } else {\n    thresholds = quantize(interpolateNumber(min, max), n + 1).slice(1, -1); // exactly n - 1 thresholds to match range\n    if (min instanceof Date) thresholds = thresholds.map((x) => new Date(x)); // preserve date types\n  }\n  if (orderof(arrayify(domain)) < 0) thresholds.reverse(); // preserve descending domain\n  return createScaleThreshold(key, channels, {domain: thresholds, range, reverse, unknown});\n}\n\nexport function createScaleThreshold(\n  key,\n  channels,\n  {\n    domain = [0], // explicit thresholds in ascending order\n    unknown,\n    scheme = \"rdylbu\",\n    interpolate,\n    range = interpolate !== undefined\n      ? quantize(interpolate, domain.length + 1)\n      : registry.get(key) === color\n      ? ordinalRange(scheme, domain.length + 1)\n      : undefined,\n    reverse\n  }\n) {\n  domain = arrayify(domain);\n  const sign = orderof(domain); // preserve descending domain\n  if (!isNaN(sign) && !isOrdered(domain, sign)) throw new Error(`the ${key} scale has a non-monotonic domain`);\n  if (reverse) range = reverseof(range); // domain ascending, so reverse range\n  return {\n    type: \"threshold\",\n    scale: scaleThreshold(sign < 0 ? reverseof(domain) : domain, range === undefined ? [] : range).unknown(unknown),\n    domain,\n    range\n  };\n}\n\nfunction isOrdered(domain, sign) {\n  for (let i = 1, n = domain.length, d = domain[0]; i < n; ++i) {\n    const s = descending(d, (d = domain[i]));\n    if (s !== 0 && s !== sign) return false;\n  }\n  return true;\n}\n\nexport function createScaleIdentity() {\n  return {type: \"identity\", scale: scaleIdentity()};\n}\n\nexport function inferDomain(channels, f = finite) {\n  return channels.length\n    ? [\n        min(channels, ({value}) => (value === undefined ? value : min(value, f))),\n        max(channels, ({value}) => (value === undefined ? value : max(value, f)))\n      ]\n    : [0, 1];\n}\n\nfunction inferAutoDomain(key, channels) {\n  const type = registry.get(key);\n  return (type === radius || type === opacity || type === length ? inferZeroDomain : inferDomain)(channels);\n}\n\nfunction inferZeroDomain(channels) {\n  return [0, channels.length ? max(channels, ({value}) => (value === undefined ? value : max(value, finite))) : 1];\n}\n\n// We don\u2019t want the upper bound of the radial domain to be zero, as this would\n// be degenerate, so we ignore nonpositive values. We also don\u2019t want the\n// maximum default radius to exceed 30px.\nfunction inferRadialRange(channels, domain) {\n  const hint = channels.find(({radius}) => radius !== undefined);\n  if (hint !== undefined) return [0, hint.radius]; // a natural maximum radius, e.g. hexbins\n  const h25 = quantile(channels, 0.5, ({value}) => (value === undefined ? NaN : quantile(value, 0.25, positive)));\n  const range = domain.map((d) => 3 * Math.sqrt(d / h25));\n  const k = 30 / max(range);\n  return k < 1 ? range.map((r) => r * k) : range;\n}\n\n// We want a length scale\u2019s domain to go from zero to a positive value, and to\n// treat negative lengths if any as inverted vectors of equivalent magnitude. We\n// also don\u2019t want the maximum default length to exceed 60px.\nfunction inferLengthRange(channels, domain) {\n  const h50 = median(channels, ({value}) => (value === undefined ? NaN : median(value, Math.abs)));\n  const range = domain.map((d) => (12 * d) / h50);\n  const k = 60 / max(range);\n  return k < 1 ? range.map((r) => r * k) : range;\n}\n\nfunction inferLogDomain(channels) {\n  for (const {value} of channels) {\n    if (value !== undefined) {\n      for (let v of value) {\n        if (v > 0) return inferDomain(channels, positive);\n        if (v < 0) return inferDomain(channels, negative);\n      }\n    }\n  }\n  return [1, 10];\n}\n\nfunction inferQuantileDomain(channels) {\n  const domain = [];\n  for (const {value} of channels) {\n    if (value === undefined) continue;\n    for (const v of value) domain.push(v);\n  }\n  return domain;\n}\n\nexport function interpolatePiecewise(interpolate) {\n  return (i, j) => (t) => interpolate(i + t * (j - i));\n}\n", "import {\n  descending,\n  interpolateNumber,\n  interpolateRgb,\n  piecewise,\n  scaleDiverging,\n  scaleDivergingLog,\n  scaleDivergingPow,\n  scaleDivergingSymlog\n} from \"d3\";\nimport {negative, positive} from \"../defined.js\";\nimport {arrayify} from \"../options.js\";\nimport {warn} from \"../warnings.js\";\nimport {color, registry} from \"./index.js\";\nimport {flip, inferDomain, interpolatePiecewise, maybeInterpolator} from \"./quantitative.js\";\nimport {quantitativeScheme} from \"./schemes.js\";\n\nfunction createScaleD(\n  key,\n  scale,\n  transform,\n  channels,\n  {\n    type,\n    nice,\n    clamp,\n    domain = inferDomain(channels),\n    unknown,\n    pivot = 0,\n    scheme,\n    range,\n    symmetric = true,\n    interpolate = registry.get(key) === color\n      ? scheme == null && range !== undefined\n        ? interpolateRgb\n        : quantitativeScheme(scheme !== undefined ? scheme : \"rdbu\")\n      : interpolateNumber,\n    reverse\n  }\n) {\n  pivot = +pivot;\n  domain = arrayify(domain);\n  let [min, max] = domain;\n  if (domain.length > 2) warn(`Warning: the diverging ${key} scale domain contains extra elements.`);\n\n  if (descending(min, max) < 0) ([min, max] = [max, min]), (reverse = !reverse);\n  min = Math.min(min, pivot);\n  max = Math.max(max, pivot);\n\n  // Sometimes interpolate is a named interpolator, such as \"lab\" for Lab color\n  // space. Other times interpolate is a function that takes two arguments and\n  // is used in conjunction with the range. And other times the interpolate\n  // function is a \u201Cfixed\u201D interpolator on the [0, 1] interval, as when a\n  // color scheme such as interpolateRdBu is used.\n  if (typeof interpolate !== \"function\") {\n    interpolate = maybeInterpolator(interpolate);\n  }\n\n  // If an explicit range is specified, promote it to a piecewise interpolator.\n  if (range !== undefined) {\n    interpolate =\n      interpolate.length === 1 ? interpolatePiecewise(interpolate)(...range) : piecewise(interpolate, range);\n  }\n\n  // Reverse before normalization.\n  if (reverse) interpolate = flip(interpolate);\n\n  // Normalize the interpolator for symmetric difference around the pivot.\n  if (symmetric) {\n    const mid = transform.apply(pivot);\n    const mindelta = mid - transform.apply(min);\n    const maxdelta = transform.apply(max) - mid;\n    if (mindelta < maxdelta) min = transform.invert(mid - maxdelta);\n    else if (mindelta > maxdelta) max = transform.invert(mid + mindelta);\n  }\n\n  scale.domain([min, pivot, max]).unknown(unknown).interpolator(interpolate);\n  if (clamp) scale.clamp(clamp);\n  if (nice) scale.nice(nice);\n  return {type, domain: [min, max], pivot, interpolate, scale};\n}\n\nexport function createScaleDiverging(key, channels, options) {\n  return createScaleD(key, scaleDiverging(), transformIdentity, channels, options);\n}\n\nexport function createScaleDivergingSqrt(key, channels, options) {\n  return createScaleDivergingPow(key, channels, {...options, exponent: 0.5});\n}\n\nexport function createScaleDivergingPow(key, channels, {exponent = 1, ...options}) {\n  return createScaleD(key, scaleDivergingPow().exponent((exponent = +exponent)), transformPow(exponent), channels, {\n    ...options,\n    type: \"diverging-pow\"\n  });\n}\n\nexport function createScaleDivergingLog(\n  key,\n  channels,\n  {base = 10, pivot = 1, domain = inferDomain(channels, pivot < 0 ? negative : positive), ...options}\n) {\n  return createScaleD(key, scaleDivergingLog().base((base = +base)), transformLog, channels, {\n    domain,\n    pivot,\n    ...options\n  });\n}\n\nexport function createScaleDivergingSymlog(key, channels, {constant = 1, ...options}) {\n  return createScaleD(\n    key,\n    scaleDivergingSymlog().constant((constant = +constant)),\n    transformSymlog(constant),\n    channels,\n    options\n  );\n}\n\nconst transformIdentity = {\n  apply(x) {\n    return x;\n  },\n  invert(x) {\n    return x;\n  }\n};\n\nconst transformLog = {\n  apply: Math.log,\n  invert: Math.exp\n};\n\nconst transformSqrt = {\n  apply(x) {\n    return Math.sign(x) * Math.sqrt(Math.abs(x));\n  },\n  invert(x) {\n    return Math.sign(x) * (x * x);\n  }\n};\n\nfunction transformPow(exponent) {\n  return exponent === 0.5\n    ? transformSqrt\n    : {\n        apply(x) {\n          return Math.sign(x) * Math.pow(Math.abs(x), exponent);\n        },\n        invert(x) {\n          return Math.sign(x) * Math.pow(Math.abs(x), 1 / exponent);\n        }\n      };\n}\n\nfunction transformSymlog(constant) {\n  return {\n    apply(x) {\n      return Math.sign(x) * Math.log1p(Math.abs(x / constant));\n    },\n    invert(x) {\n      return Math.sign(x) * Math.expm1(Math.abs(x)) * constant;\n    }\n  };\n}\n", "import {scaleTime, scaleUtc} from \"d3\";\nimport {createScaleQ} from \"./quantitative.js\";\n\nfunction createScaleT(key, scale, channels, options) {\n  return createScaleQ(key, scale, channels, options);\n}\n\nexport function createScaleTime(key, channels, options) {\n  return createScaleT(key, scaleTime(), channels, options);\n}\n\nexport function createScaleUtc(key, channels, options) {\n  return createScaleT(key, scaleUtc(), channels, options);\n}\n", "import {InternSet, extent, quantize, reverse as reverseof, sort, symbolsFill, symbolsStroke} from \"d3\";\nimport {scaleBand, scaleOrdinal, scalePoint, scaleImplicit} from \"d3\";\nimport {ascendingDefined} from \"../defined.js\";\nimport {isNoneish, map, maybeRangeInterval} from \"../options.js\";\nimport {maybeSymbol} from \"../symbol.js\";\nimport {registry, color, position, symbol} from \"./index.js\";\nimport {maybeBooleanRange, ordinalScheme, quantitativeScheme} from \"./schemes.js\";\n\n// This denotes an implicitly ordinal color scale: the scale type was not set,\n// but the associated values are strings or booleans. If the associated defined\n// values are entirely boolean, the range will default to greys. You can opt out\n// of this by setting the type explicitly.\nexport const ordinalImplicit = Symbol(\"ordinal\");\n\nfunction createScaleO(key, scale, channels, {type, interval, domain, range, reverse, hint}) {\n  interval = maybeRangeInterval(interval, type);\n  if (domain === undefined) domain = inferDomain(channels, interval, key);\n  if (type === \"categorical\" || type === ordinalImplicit) type = \"ordinal\"; // shorthand for color schemes\n  if (reverse) domain = reverseof(domain);\n  scale.domain(domain);\n  if (range !== undefined) {\n    // If the range is specified as a function, pass it the domain.\n    if (typeof range === \"function\") range = range(domain);\n    scale.range(range);\n  }\n  return {type, domain, range, scale, hint, interval};\n}\n\nexport function createScaleOrdinal(key, channels, {type, interval, domain, range, scheme, unknown, ...options}) {\n  interval = maybeRangeInterval(interval, type);\n  if (domain === undefined) domain = inferDomain(channels, interval, key);\n  let hint;\n  if (registry.get(key) === symbol) {\n    hint = inferSymbolHint(channels);\n    range = range === undefined ? inferSymbolRange(hint) : map(range, maybeSymbol);\n  } else if (registry.get(key) === color) {\n    if (range === undefined && (type === \"ordinal\" || type === ordinalImplicit)) {\n      range = maybeBooleanRange(domain, scheme);\n      if (range !== undefined) scheme = undefined; // Don\u2019t re-apply scheme.\n    }\n    if (scheme === undefined && range === undefined) {\n      scheme = type === \"ordinal\" ? \"turbo\" : \"tableau10\";\n    }\n    if (scheme !== undefined) {\n      if (range !== undefined) {\n        const interpolate = quantitativeScheme(scheme);\n        const t0 = range[0],\n          d = range[1] - range[0];\n        range = ({length: n}) => quantize((t) => interpolate(t0 + d * t), n);\n      } else {\n        range = ordinalScheme(scheme);\n      }\n    }\n  }\n  if (unknown === scaleImplicit) {\n    throw new Error(`implicit unknown on ${key} scale is not supported`);\n  }\n  return createScaleO(key, scaleOrdinal().unknown(unknown), channels, {...options, type, domain, range, hint});\n}\n\nexport function createScalePoint(key, channels, {align = 0.5, padding = 0.5, ...options}) {\n  return maybeRound(scalePoint().align(align).padding(padding), channels, options, key);\n}\n\nexport function createScaleBand(\n  key,\n  channels,\n  {\n    align = 0.5,\n    padding = 0.1,\n    paddingInner = padding,\n    paddingOuter = key === \"fx\" || key === \"fy\" ? 0 : padding,\n    ...options\n  }\n) {\n  return maybeRound(\n    scaleBand().align(align).paddingInner(paddingInner).paddingOuter(paddingOuter),\n    channels,\n    options,\n    key\n  );\n}\n\nfunction maybeRound(scale, channels, options, key) {\n  let {round} = options;\n  if (round !== undefined) scale.round((round = !!round));\n  scale = createScaleO(key, scale, channels, options);\n  scale.round = round; // preserve for autoScaleRound\n  return scale;\n}\n\nfunction inferDomain(channels, interval, key) {\n  const values = new InternSet();\n  for (const {value, domain} of channels) {\n    if (domain !== undefined) return domain(); // see channelDomain\n    if (value === undefined) continue;\n    for (const v of value) values.add(v);\n  }\n  if (interval !== undefined) {\n    const [min, max] = extent(values).map(interval.floor, interval);\n    return interval.range(min, interval.offset(max));\n  }\n  if (values.size > 10e3 && registry.get(key) === position) {\n    throw new Error(`implicit ordinal domain of ${key} scale has more than 10,000 values`);\n  }\n  return sort(values, ascendingDefined);\n}\n\n// If all channels provide a consistent hint, propagate it to the scale.\nfunction inferHint(channels, key) {\n  let value;\n  for (const {hint} of channels) {\n    const candidate = hint?.[key];\n    if (candidate === undefined) continue; // no hint here\n    if (value === undefined) value = candidate;\n    // first hint\n    else if (value !== candidate) return; // inconsistent hint\n  }\n  return value;\n}\n\nfunction inferSymbolHint(channels) {\n  return {\n    fill: inferHint(channels, \"fill\"),\n    stroke: inferHint(channels, \"stroke\")\n  };\n}\n\nfunction inferSymbolRange(hint) {\n  return isNoneish(hint.fill) ? symbolsStroke : symbolsFill;\n}\n", "import {\n  isOrdinal,\n  isTemporal,\n  isTemporalString,\n  isNumericString,\n  isScaleOptions,\n  map,\n  slice,\n  coerceNumbers,\n  coerceDates\n} from \"./options.js\";\nimport {registry, color, position, radius, opacity, symbol, length} from \"./scales/index.js\";\nimport {\n  createScaleLinear,\n  createScaleSqrt,\n  createScalePow,\n  createScaleLog,\n  createScaleSymlog,\n  createScaleQuantile,\n  createScaleQuantize,\n  createScaleThreshold,\n  createScaleIdentity\n} from \"./scales/quantitative.js\";\nimport {\n  createScaleDiverging,\n  createScaleDivergingSqrt,\n  createScaleDivergingPow,\n  createScaleDivergingLog,\n  createScaleDivergingSymlog\n} from \"./scales/diverging.js\";\nimport {isCategoricalScheme, isDivergingScheme} from \"./scales/schemes.js\";\nimport {createScaleTime, createScaleUtc} from \"./scales/temporal.js\";\nimport {createScaleOrdinal, createScalePoint, createScaleBand, ordinalImplicit} from \"./scales/ordinal.js\";\nimport {maybeSymbol} from \"./symbol.js\";\nimport {warn} from \"./warnings.js\";\n\nexport function createScales(\n  channelsByScale,\n  {\n    label: globalLabel,\n    inset: globalInset = 0,\n    insetTop: globalInsetTop = globalInset,\n    insetRight: globalInsetRight = globalInset,\n    insetBottom: globalInsetBottom = globalInset,\n    insetLeft: globalInsetLeft = globalInset,\n    round,\n    nice,\n    clamp,\n    zero,\n    align,\n    padding,\n    projection,\n    facet: {label: facetLabel = globalLabel} = {},\n    ...options\n  } = {}\n) {\n  const scales = {};\n  for (const [key, channels] of channelsByScale) {\n    const scaleOptions = options[key];\n    const scale = createScale(key, channels, {\n      round: registry.get(key) === position ? round : undefined, // only for position\n      nice,\n      clamp,\n      zero,\n      align,\n      padding,\n      projection,\n      ...scaleOptions\n    });\n    if (scale) {\n      // populate generic scale options (percent, transform, insets)\n      let {\n        label = key === \"fx\" || key === \"fy\" ? facetLabel : globalLabel,\n        percent,\n        transform,\n        inset,\n        insetTop = inset !== undefined ? inset : key === \"y\" ? globalInsetTop : 0, // not fy\n        insetRight = inset !== undefined ? inset : key === \"x\" ? globalInsetRight : 0, // not fx\n        insetBottom = inset !== undefined ? inset : key === \"y\" ? globalInsetBottom : 0, // not fy\n        insetLeft = inset !== undefined ? inset : key === \"x\" ? globalInsetLeft : 0 // not fx\n      } = scaleOptions || {};\n      if (transform == null) transform = undefined;\n      else if (typeof transform !== \"function\") throw new Error(\"invalid scale transform; not a function\");\n      scale.percent = !!percent;\n      scale.label = label === undefined ? inferScaleLabel(channels, scale) : label;\n      scale.transform = transform;\n      if (key === \"x\" || key === \"fx\") {\n        scale.insetLeft = +insetLeft;\n        scale.insetRight = +insetRight;\n      } else if (key === \"y\" || key === \"fy\") {\n        scale.insetTop = +insetTop;\n        scale.insetBottom = +insetBottom;\n      }\n      scales[key] = scale;\n    }\n  }\n  return scales;\n}\n\nexport function createScaleFunctions(scales) {\n  return Object.fromEntries(\n    Object.entries(scales)\n      .filter(([, {scale}]) => scale) // drop identity scales\n      .map(([name, {scale, type, interval, label}]) => {\n        scale.type = type; // for axis\n        if (interval != null) scale.interval = interval; // for axis\n        if (label != null) scale.label = label; // for axis\n        return [name, scale];\n      })\n  );\n}\n\n// Mutates scale.range!\nexport function autoScaleRange(scales, dimensions) {\n  const {x, y, fx, fy} = scales;\n  const superdimensions = fx || fy ? outerDimensions(dimensions) : dimensions;\n  if (fx) autoScaleRangeX(fx, superdimensions);\n  if (fy) autoScaleRangeY(fy, superdimensions);\n  const subdimensions = fx || fy ? innerDimensions(scales, dimensions) : dimensions;\n  if (x) autoScaleRangeX(x, subdimensions);\n  if (y) autoScaleRangeY(y, subdimensions);\n}\n\n// Channels can have labels; if all the channels for a given scale are\n// consistently labeled (i.e., have the same value if not undefined), and the\n// corresponding scale doesn\u2019t already have an explicit label, then the\n// channels\u2019 label is promoted to the scale. This inferred label should have an\n// orientation-appropriate arrow added when used as an axis, but we don\u2019t want\n// to add the arrow when the label is set explicitly as an option; so, the\n// inferred label is distinguished as an object with an \u201Cinferred\u201D property.\nfunction inferScaleLabel(channels = [], scale) {\n  let label;\n  for (const {label: l} of channels) {\n    if (l === undefined) continue;\n    if (label === undefined) label = l;\n    else if (label !== l) return;\n  }\n  if (label === undefined) return;\n  if (!isOrdinalScale(scale) && scale.percent) label = `${label} (%)`;\n  return {inferred: true, toString: () => label};\n}\n\n// Returns the dimensions of the outer frame; this is subdivided into facets\n// with the margins of each facet collapsing into the outer margins.\nexport function outerDimensions(dimensions) {\n  const {\n    marginTop,\n    marginRight,\n    marginBottom,\n    marginLeft,\n    width,\n    height,\n    facet: {\n      marginTop: facetMarginTop,\n      marginRight: facetMarginRight,\n      marginBottom: facetMarginBottom,\n      marginLeft: facetMarginLeft\n    }\n  } = dimensions;\n  return {\n    marginTop: Math.max(marginTop, facetMarginTop),\n    marginRight: Math.max(marginRight, facetMarginRight),\n    marginBottom: Math.max(marginBottom, facetMarginBottom),\n    marginLeft: Math.max(marginLeft, facetMarginLeft),\n    width,\n    height\n  };\n}\n\n// Returns the dimensions of each facet.\nexport function innerDimensions({fx, fy}, dimensions) {\n  const {marginTop, marginRight, marginBottom, marginLeft, width, height} = outerDimensions(dimensions);\n  return {\n    marginTop,\n    marginRight,\n    marginBottom,\n    marginLeft,\n    width: fx ? fx.scale.bandwidth() + marginLeft + marginRight : width,\n    height: fy ? fy.scale.bandwidth() + marginTop + marginBottom : height,\n    facet: {width, height}\n  };\n}\n\nfunction autoScaleRangeX(scale, dimensions) {\n  if (scale.range === undefined) {\n    const {insetLeft, insetRight} = scale;\n    const {width, marginLeft = 0, marginRight = 0} = dimensions;\n    const left = marginLeft + insetLeft;\n    const right = width - marginRight - insetRight;\n    scale.range = [left, Math.max(left, right)];\n    if (!isOrdinalScale(scale)) scale.range = piecewiseRange(scale);\n    scale.scale.range(scale.range);\n  }\n  autoScaleRound(scale);\n}\n\nfunction autoScaleRangeY(scale, dimensions) {\n  if (scale.range === undefined) {\n    const {insetTop, insetBottom} = scale;\n    const {height, marginTop = 0, marginBottom = 0} = dimensions;\n    const top = marginTop + insetTop;\n    const bottom = height - marginBottom - insetBottom;\n    scale.range = [Math.max(top, bottom), top];\n    if (!isOrdinalScale(scale)) scale.range = piecewiseRange(scale);\n    else scale.range.reverse();\n    scale.scale.range(scale.range);\n  }\n  autoScaleRound(scale);\n}\n\nfunction autoScaleRound(scale) {\n  if (scale.round === undefined && isBandScale(scale) && roundError(scale) <= 30) {\n    scale.scale.round(true);\n  }\n}\n\n// If we were to turn on rounding for this band or point scale, how much wasted\n// space would it introduce (on both ends of the range)? This must match\n// d3.scaleBand\u2019s rounding behavior:\n// https://github.com/d3/d3-scale/blob/83555bd759c7314420bd4240642beda5e258db9e/src/band.js#L20-L32\nfunction roundError({scale}) {\n  const n = scale.domain().length;\n  const [start, stop] = scale.range();\n  const paddingInner = scale.paddingInner ? scale.paddingInner() : 1;\n  const paddingOuter = scale.paddingOuter ? scale.paddingOuter() : scale.padding();\n  const m = n - paddingInner;\n  const step = Math.abs(stop - start) / Math.max(1, m + paddingOuter * 2);\n  return (step - Math.floor(step)) * m;\n}\n\nfunction piecewiseRange(scale) {\n  const length = scale.scale.domain().length + isThresholdScale(scale);\n  if (!(length > 2)) return scale.range;\n  const [start, end] = scale.range;\n  return Array.from({length}, (_, i) => start + (i / (length - 1)) * (end - start));\n}\n\nexport function normalizeScale(key, scale, hint) {\n  return createScale(key, hint === undefined ? undefined : [{hint}], {...scale});\n}\n\nfunction createScale(key, channels = [], options = {}) {\n  const type = inferScaleType(key, channels, options);\n\n  // Warn for common misuses of implicit ordinal scales. We disable this test if\n  // you specify a scale interval or if you set the domain or range explicitly,\n  // since setting the domain or range (typically with a cardinality of more than\n  // two) is another indication that you intended for the scale to be ordinal; we\n  // also disable it for facet scales since these are always band scales.\n  if (\n    options.type === undefined &&\n    options.domain === undefined &&\n    options.range === undefined &&\n    options.interval == null &&\n    key !== \"fx\" &&\n    key !== \"fy\" &&\n    isOrdinalScale({type})\n  ) {\n    const values = channels.map(({value}) => value).filter((value) => value !== undefined);\n    if (values.some(isTemporal))\n      warn(\n        `Warning: some data associated with the ${key} scale are dates. Dates are typically associated with a \"utc\" or \"time\" scale rather than a \"${formatScaleType(\n          type\n        )}\" scale. If you are using a bar mark, you probably want a rect mark with the interval option instead; if you are using a group transform, you probably want a bin transform instead. If you want to treat this data as ordinal, you can specify the interval of the ${key} scale (e.g., d3.utcDay), or you can suppress this warning by setting the type of the ${key} scale to \"${formatScaleType(\n          type\n        )}\".`\n      );\n    else if (values.some(isTemporalString))\n      warn(\n        `Warning: some data associated with the ${key} scale are strings that appear to be dates (e.g., YYYY-MM-DD). If these strings represent dates, you should parse them to Date objects. Dates are typically associated with a \"utc\" or \"time\" scale rather than a \"${formatScaleType(\n          type\n        )}\" scale. If you are using a bar mark, you probably want a rect mark with the interval option instead; if you are using a group transform, you probably want a bin transform instead. If you want to treat this data as ordinal, you can suppress this warning by setting the type of the ${key} scale to \"${formatScaleType(\n          type\n        )}\".`\n      );\n    else if (values.some(isNumericString))\n      warn(\n        `Warning: some data associated with the ${key} scale are strings that appear to be numbers. If these strings represent numbers, you should parse or coerce them to numbers. Numbers are typically associated with a \"linear\" scale rather than a \"${formatScaleType(\n          type\n        )}\" scale. If you want to treat this data as ordinal, you can specify the interval of the ${key} scale (e.g., 1 for integers), or you can suppress this warning by setting the type of the ${key} scale to \"${formatScaleType(\n          type\n        )}\".`\n      );\n  }\n\n  options.type = type; // Mutates input!\n\n  // Once the scale type is known, coerce the associated channel values and any\n  // explicitly-specified domain to the expected type.\n  switch (type) {\n    case \"diverging\":\n    case \"diverging-sqrt\":\n    case \"diverging-pow\":\n    case \"diverging-log\":\n    case \"diverging-symlog\":\n    case \"cyclical\":\n    case \"sequential\":\n    case \"linear\":\n    case \"sqrt\":\n    case \"threshold\":\n    case \"quantile\":\n    case \"pow\":\n    case \"log\":\n    case \"symlog\":\n      options = coerceType(channels, options, coerceNumbers);\n      break;\n    case \"identity\":\n      switch (registry.get(key)) {\n        case position:\n          options = coerceType(channels, options, coerceNumbers);\n          break;\n        case symbol:\n          options = coerceType(channels, options, coerceSymbols);\n          break;\n      }\n      break;\n    case \"utc\":\n    case \"time\":\n      options = coerceType(channels, options, coerceDates);\n      break;\n  }\n\n  switch (type) {\n    case \"diverging\":\n      return createScaleDiverging(key, channels, options);\n    case \"diverging-sqrt\":\n      return createScaleDivergingSqrt(key, channels, options);\n    case \"diverging-pow\":\n      return createScaleDivergingPow(key, channels, options);\n    case \"diverging-log\":\n      return createScaleDivergingLog(key, channels, options);\n    case \"diverging-symlog\":\n      return createScaleDivergingSymlog(key, channels, options);\n    case \"categorical\":\n    case \"ordinal\":\n    case ordinalImplicit:\n      return createScaleOrdinal(key, channels, options);\n    case \"cyclical\":\n    case \"sequential\":\n    case \"linear\":\n      return createScaleLinear(key, channels, options);\n    case \"sqrt\":\n      return createScaleSqrt(key, channels, options);\n    case \"threshold\":\n      return createScaleThreshold(key, channels, options);\n    case \"quantile\":\n      return createScaleQuantile(key, channels, options);\n    case \"quantize\":\n      return createScaleQuantize(key, channels, options);\n    case \"pow\":\n      return createScalePow(key, channels, options);\n    case \"log\":\n      return createScaleLog(key, channels, options);\n    case \"symlog\":\n      return createScaleSymlog(key, channels, options);\n    case \"utc\":\n      return createScaleUtc(key, channels, options);\n    case \"time\":\n      return createScaleTime(key, channels, options);\n    case \"point\":\n      return createScalePoint(key, channels, options);\n    case \"band\":\n      return createScaleBand(key, channels, options);\n    case \"identity\":\n      return registry.get(key) === position ? createScaleIdentity() : {type: \"identity\"};\n    case undefined:\n      return;\n    default:\n      throw new Error(`unknown scale type: ${type}`);\n  }\n}\n\nfunction formatScaleType(type) {\n  return typeof type === \"symbol\" ? type.description : type;\n}\n\n// A special type symbol when the x and y scales are replaced with a projection.\nconst typeProjection = {toString: () => \"projection\"};\n\nfunction inferScaleType(key, channels, {type, domain, range, scheme, pivot, projection}) {\n  // The facet scales are always band scales; this cannot be changed.\n  if (key === \"fx\" || key === \"fy\") return \"band\";\n\n  // If a projection is specified, the x- and y-scales are disabled; these\n  // channels will be projected rather than scaled. (But still check that none\n  // of the associated channels are incompatible with a projection.)\n  if ((key === \"x\" || key === \"y\") && projection != null) type = typeProjection;\n\n  // If a channel dictates a scale type, make sure that it is consistent with\n  // the user-specified scale type (if any) and all other channels. For example,\n  // barY requires x to be a band scale and disallows any other scale type.\n  for (const {type: t} of channels) {\n    if (t === undefined) continue;\n    else if (type === undefined) type = t;\n    else if (type !== t) throw new Error(`scale incompatible with channel: ${type} !== ${t}`);\n  }\n\n  // If the scale, a channel, or user specified a (consistent) type, return it.\n  if (type === typeProjection) return;\n  if (type !== undefined) return type;\n\n  // If there\u2019s no data (and no type) associated with this scale, don\u2019t create a scale.\n  if (domain === undefined && !channels.some(({value}) => value !== undefined)) return;\n\n  // Some scales have default types.\n  const kind = registry.get(key);\n  if (kind === radius) return \"sqrt\";\n  if (kind === opacity || kind === length) return \"linear\";\n  if (kind === symbol) return \"ordinal\";\n\n  // If the domain or range has more than two values, assume it\u2019s ordinal. You\n  // can still use a \u201Cpiecewise\u201D (or \u201Cpolylinear\u201D) scale, but you must set the\n  // type explicitly.\n  if ((domain || range || []).length > 2) return asOrdinalType(kind);\n\n  // Otherwise, infer the scale type from the data! Prefer the domain, if\n  // present, over channels. (The domain and channels should be consistently\n  // typed, and the domain is more explicit and typically much smaller.) We only\n  // check the first defined value for expedience and simplicity; we expect\n  // that the types are consistent.\n  if (domain !== undefined) {\n    if (isOrdinal(domain)) return asOrdinalType(kind);\n    if (isTemporal(domain)) return \"utc\";\n  } else {\n    const values = channels.map(({value}) => value).filter((value) => value !== undefined);\n    if (values.some(isOrdinal)) return asOrdinalType(kind);\n    if (values.some(isTemporal)) return \"utc\";\n  }\n\n  // For color scales, take a hint from the color scheme and pivot option.\n  if (kind === color) {\n    if (pivot != null || isDivergingScheme(scheme)) return \"diverging\";\n    if (isCategoricalScheme(scheme)) return \"categorical\";\n  }\n\n  return \"linear\";\n}\n\n// Positional scales default to a point scale instead of an ordinal scale.\nfunction asOrdinalType(kind) {\n  switch (kind) {\n    case position:\n      return \"point\";\n    case color:\n      return ordinalImplicit;\n    default:\n      return \"ordinal\";\n  }\n}\n\nexport function isTemporalScale({type}) {\n  return type === \"time\" || type === \"utc\";\n}\n\nexport function isOrdinalScale({type}) {\n  return type === \"ordinal\" || type === \"point\" || type === \"band\" || type === ordinalImplicit;\n}\n\nexport function isThresholdScale({type}) {\n  return type === \"threshold\";\n}\n\nfunction isBandScale({type}) {\n  return type === \"point\" || type === \"band\";\n}\n\nexport function isDivergingScale({type}) {\n  return /^diverging($|-)/.test(type);\n}\n\n// Certain marks have special behavior if a scale is collapsed, i.e. if the\n// domain is degenerate and represents only a single value such as [3, 3]; for\n// example, a rect will span the full extent of the chart along a collapsed\n// dimension (whereas a dot will simply be drawn in the center).\nexport function isCollapsed(scale) {\n  if (scale === undefined) return true; // treat missing scale as collapsed\n  const domain = scale.domain();\n  const value = scale(domain[0]);\n  for (let i = 1, n = domain.length; i < n; ++i) {\n    if (scale(domain[i]) - value) {\n      return false;\n    }\n  }\n  return true;\n}\n\n// Mutates channel.value!\nfunction coerceType(channels, {domain, ...options}, coerceValues) {\n  for (const c of channels) {\n    if (c.value !== undefined) {\n      c.value = coerceValues(c.value);\n    }\n  }\n  return {\n    domain: domain === undefined ? domain : coerceValues(domain),\n    ...options\n  };\n}\n\nfunction coerceSymbols(values) {\n  return map(values, maybeSymbol);\n}\n\nexport function scale(options = {}) {\n  let scale;\n  for (const key in options) {\n    if (!registry.has(key)) continue; // ignore unknown properties\n    if (!isScaleOptions(options[key])) continue; // e.g., ignore {color: \"red\"}\n    if (scale !== undefined) throw new Error(\"ambiguous scale definition; multiple scales found\");\n    scale = exposeScale(normalizeScale(key, options[key]));\n  }\n  if (scale === undefined) throw new Error(\"invalid scale definition; no scale found\");\n  return scale;\n}\n\nexport function exposeScales(scaleDescriptors) {\n  return (key) => {\n    if (!registry.has((key = `${key}`))) throw new Error(`unknown scale: ${key}`);\n    return key in scaleDescriptors ? exposeScale(scaleDescriptors[key]) : undefined;\n  };\n}\n\n// Note: axis- and legend-related properties (such as label, ticks and\n// tickFormat) are not included here as they do not affect the scale\u2019s behavior.\nfunction exposeScale({scale, type, domain, range, interpolate, interval, transform, percent, pivot}) {\n  if (type === \"identity\") return {type: \"identity\", apply: (d) => d, invert: (d) => d};\n  const unknown = scale.unknown ? scale.unknown() : undefined;\n  return {\n    type,\n    domain: slice(domain), // defensive copy\n    ...(range !== undefined && {range: slice(range)}), // defensive copy\n    ...(transform !== undefined && {transform}),\n    ...(percent && {percent}), // only exposed if truthy\n    ...(unknown !== undefined && {unknown}),\n    ...(interval !== undefined && {interval}),\n\n    // quantitative\n    ...(interpolate !== undefined && {interpolate}),\n    ...(scale.clamp && {clamp: scale.clamp()}),\n\n    // diverging (always asymmetric; we never want to apply the symmetric transform twice)\n    ...(pivot !== undefined && {pivot, symmetric: false}),\n\n    // log, diverging-log\n    ...(scale.base && {base: scale.base()}),\n\n    // pow, diverging-pow\n    ...(scale.exponent && {exponent: scale.exponent()}),\n\n    // symlog, diverging-symlog\n    ...(scale.constant && {constant: scale.constant()}),\n\n    // band, point\n    ...(scale.align && {align: scale.align(), round: scale.round()}),\n    ...(scale.padding &&\n      (scale.paddingInner\n        ? {paddingInner: scale.paddingInner(), paddingOuter: scale.paddingOuter()}\n        : {padding: scale.padding()})),\n    ...(scale.bandwidth && {bandwidth: scale.bandwidth(), step: scale.step()}),\n\n    // utilities\n    apply: (t) => scale(t),\n    ...(scale.invert && {invert: (t) => scale.invert(t)})\n  };\n}\n", "export function memoize1(compute) {\n  let cacheValue, cacheKeys;\n  return (...keys) => {\n    if (cacheKeys?.length !== keys.length || cacheKeys.some((k, i) => k !== keys[i])) {\n      cacheKeys = keys;\n      cacheValue = compute(...keys);\n    }\n    return cacheValue;\n  };\n}\n", "import {format as isoFormat} from \"isoformat\";\nimport {string} from \"./options.js\";\nimport {memoize1} from \"./memoize.js\";\n\nconst numberFormat = memoize1((locale) => {\n  return new Intl.NumberFormat(locale);\n});\n\nconst monthFormat = memoize1((locale, month) => {\n  return new Intl.DateTimeFormat(locale, {timeZone: \"UTC\", ...(month && {month})});\n});\n\nconst weekdayFormat = memoize1((locale, weekday) => {\n  return new Intl.DateTimeFormat(locale, {timeZone: \"UTC\", ...(weekday && {weekday})});\n});\n\nexport function formatNumber(locale = \"en-US\") {\n  const format = numberFormat(locale);\n  return (i) => (i != null && !isNaN(i) ? format.format(i) : undefined);\n}\n\nexport function formatMonth(locale = \"en-US\", format = \"short\") {\n  const fmt = monthFormat(locale, format);\n  return (i) => (i != null && !isNaN((i = +new Date(Date.UTC(2000, +i)))) ? fmt.format(i) : undefined);\n}\n\nexport function formatWeekday(locale = \"en-US\", format = \"short\") {\n  const fmt = weekdayFormat(locale, format);\n  return (i) => (i != null && !isNaN((i = +new Date(Date.UTC(2001, 0, +i)))) ? fmt.format(i) : undefined);\n}\n\nexport function formatIsoDate(date) {\n  return isoFormat(date, \"Invalid Date\");\n}\n\nexport function formatAuto(locale = \"en-US\") {\n  const number = formatNumber(locale);\n  return (v) => (v instanceof Date ? formatIsoDate : typeof v === \"number\" ? number : string)(v);\n}\n\n// TODO When Plot supports a top-level locale option, this should be removed\n// because it lacks context to know which locale to use; formatAuto should be\n// used instead whenever possible.\nexport const formatDefault = formatAuto();\n", "import {geoPath, group, namespaces} from \"d3\";\nimport {create} from \"./context.js\";\nimport {defined, nonempty} from \"./defined.js\";\nimport {formatDefault} from \"./format.js\";\nimport {\n  string,\n  number,\n  maybeColorChannel,\n  maybeNumberChannel,\n  maybeKeyword,\n  isNoneish,\n  isNone,\n  isRound,\n  keyof\n} from \"./options.js\";\nimport {warn} from \"./warnings.js\";\n\nexport const offset = (typeof window !== \"undefined\" ? window.devicePixelRatio > 1 : typeof it === \"undefined\") ? 0 : 0.5; // prettier-ignore\n\nlet nextClipId = 0;\n\nfunction getClipId() {\n  return `plot-clip-${++nextClipId}`;\n}\n\nexport function styles(\n  mark,\n  {\n    title,\n    href,\n    ariaLabel: variaLabel,\n    ariaDescription,\n    ariaHidden,\n    target,\n    fill,\n    fillOpacity,\n    stroke,\n    strokeWidth,\n    strokeOpacity,\n    strokeLinejoin,\n    strokeLinecap,\n    strokeMiterlimit,\n    strokeDasharray,\n    strokeDashoffset,\n    opacity,\n    mixBlendMode,\n    imageFilter,\n    paintOrder,\n    pointerEvents,\n    shapeRendering,\n    channels\n  },\n  {\n    ariaLabel: cariaLabel,\n    fill: defaultFill = \"currentColor\",\n    fillOpacity: defaultFillOpacity,\n    stroke: defaultStroke = \"none\",\n    strokeOpacity: defaultStrokeOpacity,\n    strokeWidth: defaultStrokeWidth,\n    strokeLinecap: defaultStrokeLinecap,\n    strokeLinejoin: defaultStrokeLinejoin,\n    strokeMiterlimit: defaultStrokeMiterlimit,\n    paintOrder: defaultPaintOrder\n  }\n) {\n  // Some marks don\u2019t support fill (e.g., tick and rule).\n  if (defaultFill === null) {\n    fill = null;\n    fillOpacity = null;\n  }\n\n  // Some marks don\u2019t support stroke (e.g., image).\n  if (defaultStroke === null) {\n    stroke = null;\n    strokeOpacity = null;\n  }\n\n  // Some marks default to fill with no stroke, while others default to stroke\n  // with no fill. For example, bar and area default to fill, while dot and line\n  // default to stroke. For marks that fill by default, the default fill only\n  // applies if the stroke is (constant) none; if you set a stroke, then the\n  // default fill becomes none. Similarly for marks that stroke by stroke, the\n  // default stroke only applies if the fill is (constant) none.\n  if (isNoneish(defaultFill)) {\n    if (!isNoneish(defaultStroke) && (!isNoneish(fill) || channels?.fill)) defaultStroke = \"none\";\n  } else {\n    if (isNoneish(defaultStroke) && (!isNoneish(stroke) || channels?.stroke)) defaultFill = \"none\";\n  }\n\n  const [vfill, cfill] = maybeColorChannel(fill, defaultFill);\n  const [vfillOpacity, cfillOpacity] = maybeNumberChannel(fillOpacity, defaultFillOpacity);\n  const [vstroke, cstroke] = maybeColorChannel(stroke, defaultStroke);\n  const [vstrokeOpacity, cstrokeOpacity] = maybeNumberChannel(strokeOpacity, defaultStrokeOpacity);\n  const [vopacity, copacity] = maybeNumberChannel(opacity);\n\n  // For styles that have no effect if there is no stroke, only apply the\n  // defaults if the stroke is not the constant none. (If stroke is a channel,\n  // then cstroke will be undefined, but there\u2019s still a stroke; hence we don\u2019t\n  // use isNoneish here.)\n  if (!isNone(cstroke)) {\n    if (strokeWidth === undefined) strokeWidth = defaultStrokeWidth;\n    if (strokeLinecap === undefined) strokeLinecap = defaultStrokeLinecap;\n    if (strokeLinejoin === undefined) strokeLinejoin = defaultStrokeLinejoin;\n\n    // The default stroke miterlimit need not be applied if the current stroke\n    // is the constant round; this only has effect on miter joins.\n    if (strokeMiterlimit === undefined && !isRound(strokeLinejoin)) strokeMiterlimit = defaultStrokeMiterlimit;\n\n    // The paint order only takes effect if there is both a fill and a stroke\n    // (at least if we ignore markers, which no built-in marks currently use).\n    if (!isNone(cfill) && paintOrder === undefined) paintOrder = defaultPaintOrder;\n  }\n\n  const [vstrokeWidth, cstrokeWidth] = maybeNumberChannel(strokeWidth);\n\n  // Some marks don\u2019t support fill (e.g., tick and rule).\n  if (defaultFill !== null) {\n    mark.fill = impliedString(cfill, \"currentColor\");\n    mark.fillOpacity = impliedNumber(cfillOpacity, 1);\n  }\n\n  // Some marks don\u2019t support stroke (e.g., image).\n  if (defaultStroke !== null) {\n    mark.stroke = impliedString(cstroke, \"none\");\n    mark.strokeWidth = impliedNumber(cstrokeWidth, 1);\n    mark.strokeOpacity = impliedNumber(cstrokeOpacity, 1);\n    mark.strokeLinejoin = impliedString(strokeLinejoin, \"miter\");\n    mark.strokeLinecap = impliedString(strokeLinecap, \"butt\");\n    mark.strokeMiterlimit = impliedNumber(strokeMiterlimit, 4);\n    mark.strokeDasharray = impliedString(strokeDasharray, \"none\");\n    mark.strokeDashoffset = impliedString(strokeDashoffset, \"0\");\n  }\n\n  mark.target = string(target);\n  mark.ariaLabel = string(cariaLabel);\n  mark.ariaDescription = string(ariaDescription);\n  mark.ariaHidden = string(ariaHidden);\n  mark.opacity = impliedNumber(copacity, 1);\n  mark.mixBlendMode = impliedString(mixBlendMode, \"normal\");\n  mark.imageFilter = impliedString(imageFilter, \"none\");\n  mark.paintOrder = impliedString(paintOrder, \"normal\");\n  mark.pointerEvents = impliedString(pointerEvents, \"auto\");\n  mark.shapeRendering = impliedString(shapeRendering, \"auto\");\n\n  return {\n    title: {value: title, optional: true, filter: null},\n    href: {value: href, optional: true, filter: null},\n    ariaLabel: {value: variaLabel, optional: true, filter: null},\n    fill: {value: vfill, scale: \"auto\", optional: true},\n    fillOpacity: {value: vfillOpacity, scale: \"auto\", optional: true},\n    stroke: {value: vstroke, scale: \"auto\", optional: true},\n    strokeOpacity: {value: vstrokeOpacity, scale: \"auto\", optional: true},\n    strokeWidth: {value: vstrokeWidth, optional: true},\n    opacity: {value: vopacity, scale: \"auto\", optional: true}\n  };\n}\n\n// Applies the specified titles via selection.call.\nexport function applyTitle(selection, L) {\n  if (L)\n    selection\n      .filter((i) => nonempty(L[i]))\n      .append(\"title\")\n      .call(applyText, L);\n}\n\n// Like applyTitle, but for grouped data (lines, areas).\nexport function applyTitleGroup(selection, L) {\n  if (L)\n    selection\n      .filter(([i]) => nonempty(L[i]))\n      .append(\"title\")\n      .call(applyTextGroup, L);\n}\n\nexport function applyText(selection, T) {\n  if (T) selection.text((i) => formatDefault(T[i]));\n}\n\nexport function applyTextGroup(selection, T) {\n  if (T) selection.text(([i]) => formatDefault(T[i]));\n}\n\nexport function applyChannelStyles(\n  selection,\n  {target, tip},\n  {\n    ariaLabel: AL,\n    title: T,\n    fill: F,\n    fillOpacity: FO,\n    stroke: S,\n    strokeOpacity: SO,\n    strokeWidth: SW,\n    opacity: O,\n    href: H\n  }\n) {\n  if (AL) applyAttr(selection, \"aria-label\", (i) => AL[i]);\n  if (F) applyAttr(selection, \"fill\", (i) => F[i]);\n  if (FO) applyAttr(selection, \"fill-opacity\", (i) => FO[i]);\n  if (S) applyAttr(selection, \"stroke\", (i) => S[i]);\n  if (SO) applyAttr(selection, \"stroke-opacity\", (i) => SO[i]);\n  if (SW) applyAttr(selection, \"stroke-width\", (i) => SW[i]);\n  if (O) applyAttr(selection, \"opacity\", (i) => O[i]);\n  if (H) applyHref(selection, (i) => H[i], target);\n  if (!tip) applyTitle(selection, T);\n}\n\nexport function applyGroupedChannelStyles(\n  selection,\n  {target, tip},\n  {\n    ariaLabel: AL,\n    title: T,\n    fill: F,\n    fillOpacity: FO,\n    stroke: S,\n    strokeOpacity: SO,\n    strokeWidth: SW,\n    opacity: O,\n    href: H\n  }\n) {\n  if (AL) applyAttr(selection, \"aria-label\", ([i]) => AL[i]);\n  if (F) applyAttr(selection, \"fill\", ([i]) => F[i]);\n  if (FO) applyAttr(selection, \"fill-opacity\", ([i]) => FO[i]);\n  if (S) applyAttr(selection, \"stroke\", ([i]) => S[i]);\n  if (SO) applyAttr(selection, \"stroke-opacity\", ([i]) => SO[i]);\n  if (SW) applyAttr(selection, \"stroke-width\", ([i]) => SW[i]);\n  if (O) applyAttr(selection, \"opacity\", ([i]) => O[i]);\n  if (H) applyHref(selection, ([i]) => H[i], target);\n  if (!tip) applyTitleGroup(selection, T);\n}\n\nfunction groupAesthetics(\n  {\n    ariaLabel: AL,\n    title: T,\n    fill: F,\n    fillOpacity: FO,\n    stroke: S,\n    strokeOpacity: SO,\n    strokeWidth: SW,\n    opacity: O,\n    href: H\n  },\n  {tip}\n) {\n  return [AL, tip ? undefined : T, F, FO, S, SO, SW, O, H].filter((c) => c !== undefined);\n}\n\nexport function groupZ(I, Z, z) {\n  const G = group(I, (i) => Z[i]);\n  if (z === undefined && G.size > (1 + I.length) >> 1) {\n    warn(\n      `Warning: the implicit z channel has high cardinality. This may occur when the fill or stroke channel is associated with quantitative data rather than ordinal or categorical data. You can suppress this warning by setting the z option explicitly; if this data represents a single series, set z to null.`\n    );\n  }\n  return G.values();\n}\n\nexport function* groupIndex(I, position, mark, channels) {\n  const {z} = mark;\n  const {z: Z} = channels; // group channel\n  const A = groupAesthetics(channels, mark); // aesthetic channels\n  const C = [...position, ...A]; // all channels\n\n  // Group the current index by Z (if any).\n  for (const G of Z ? groupZ(I, Z, z) : [I]) {\n    let Ag; // the A-values (aesthetics) of the current group, if any\n    let Gg; // the current group index (a subset of G, and I), if any\n    out: for (const i of G) {\n      // If any channel has an undefined value for this index, skip it.\n      for (const c of C) {\n        if (!defined(c[i])) {\n          if (Gg) Gg.push(-1);\n          continue out;\n        }\n      }\n\n      // Otherwise, if this is a new group, record the aesthetics for this\n      // group. Yield the current group and start a new one.\n      if (Ag === undefined) {\n        if (Gg) yield Gg;\n        (Ag = A.map((c) => keyof(c[i]))), (Gg = [i]);\n        continue;\n      }\n\n      // Otherwise, add the current index to the current group. Then, if any of\n      // the aesthetics don\u2019t match the current group, yield the current group\n      // and start a new group of the current index.\n      Gg.push(i);\n      for (let j = 0; j < A.length; ++j) {\n        const k = keyof(A[j][i]);\n        if (k !== Ag[j]) {\n          yield Gg;\n          (Ag = A.map((c) => keyof(c[i]))), (Gg = [i]);\n          continue out;\n        }\n      }\n    }\n\n    // Yield the current group, if any.\n    if (Gg) yield Gg;\n  }\n}\n\n// TODO Accept other types of clips (paths, urls, x, y, other marks\u2026)?\n// https://github.com/observablehq/plot/issues/181\nexport function maybeClip(clip) {\n  if (clip === true) clip = \"frame\";\n  else if (clip === false) clip = null;\n  return maybeKeyword(clip, \"clip\", [\"frame\", \"sphere\"]);\n}\n\n// Note: may mutate selection.node!\nfunction applyClip(selection, mark, dimensions, context) {\n  let clipUrl;\n  switch (mark.clip) {\n    case \"frame\": {\n      const {width, height, marginLeft, marginRight, marginTop, marginBottom} = dimensions;\n      const id = getClipId();\n      clipUrl = `url(#${id})`;\n      selection = create(\"svg:g\", context)\n        .call((g) =>\n          g\n            .append(\"svg:clipPath\")\n            .attr(\"id\", id)\n            .append(\"rect\")\n            .attr(\"x\", marginLeft)\n            .attr(\"y\", marginTop)\n            .attr(\"width\", width - marginRight - marginLeft)\n            .attr(\"height\", height - marginTop - marginBottom)\n        )\n        .each(function () {\n          this.appendChild(selection.node());\n          selection.node = () => this; // Note: mutation!\n        });\n      break;\n    }\n    case \"sphere\": {\n      const {projection} = context;\n      if (!projection) throw new Error(`the \"sphere\" clip option requires a projection`);\n      const id = getClipId();\n      clipUrl = `url(#${id})`;\n      selection\n        .append(\"clipPath\")\n        .attr(\"id\", id)\n        .append(\"path\")\n        .attr(\"d\", geoPath(projection)({type: \"Sphere\"}));\n      break;\n    }\n  }\n  // Here we\u2019re careful to apply the ARIA attributes to the outer G element when\n  // clipping is applied, and to apply the ARIA attributes before any other\n  // attributes (for readability).\n  applyAttr(selection, \"aria-label\", mark.ariaLabel);\n  applyAttr(selection, \"aria-description\", mark.ariaDescription);\n  applyAttr(selection, \"aria-hidden\", mark.ariaHidden);\n  applyAttr(selection, \"clip-path\", clipUrl);\n}\n\n// Note: may mutate selection.node!\nexport function applyIndirectStyles(selection, mark, dimensions, context) {\n  applyClip(selection, mark, dimensions, context);\n  applyAttr(selection, \"fill\", mark.fill);\n  applyAttr(selection, \"fill-opacity\", mark.fillOpacity);\n  applyAttr(selection, \"stroke\", mark.stroke);\n  applyAttr(selection, \"stroke-width\", mark.strokeWidth);\n  applyAttr(selection, \"stroke-opacity\", mark.strokeOpacity);\n  applyAttr(selection, \"stroke-linejoin\", mark.strokeLinejoin);\n  applyAttr(selection, \"stroke-linecap\", mark.strokeLinecap);\n  applyAttr(selection, \"stroke-miterlimit\", mark.strokeMiterlimit);\n  applyAttr(selection, \"stroke-dasharray\", mark.strokeDasharray);\n  applyAttr(selection, \"stroke-dashoffset\", mark.strokeDashoffset);\n  applyAttr(selection, \"shape-rendering\", mark.shapeRendering);\n  applyAttr(selection, \"filter\", mark.imageFilter);\n  applyAttr(selection, \"paint-order\", mark.paintOrder);\n  const {pointerEvents = context.pointerSticky === false ? \"none\" : undefined} = mark;\n  applyAttr(selection, \"pointer-events\", pointerEvents);\n}\n\nexport function applyDirectStyles(selection, mark) {\n  applyStyle(selection, \"mix-blend-mode\", mark.mixBlendMode);\n  applyAttr(selection, \"opacity\", mark.opacity);\n}\n\nfunction applyHref(selection, href, target) {\n  selection.each(function (i) {\n    const h = href(i);\n    if (h != null) {\n      const a = this.ownerDocument.createElementNS(namespaces.svg, \"a\");\n      a.setAttribute(\"fill\", \"inherit\");\n      a.setAttributeNS(namespaces.xlink, \"href\", h);\n      if (target != null) a.setAttribute(\"target\", target);\n      this.parentNode.insertBefore(a, this).appendChild(this);\n    }\n  });\n}\n\nexport function applyAttr(selection, name, value) {\n  if (value != null) selection.attr(name, value);\n}\n\nexport function applyStyle(selection, name, value) {\n  if (value != null) selection.style(name, value);\n}\n\nexport function applyTransform(selection, mark, {x, y}, tx = offset, ty = offset) {\n  tx += mark.dx;\n  ty += mark.dy;\n  if (x?.bandwidth) tx += x.bandwidth() / 2;\n  if (y?.bandwidth) ty += y.bandwidth() / 2;\n  if (tx || ty) selection.attr(\"transform\", `translate(${tx},${ty})`);\n}\n\nexport function impliedString(value, impliedValue) {\n  if ((value = string(value)) !== impliedValue) return value;\n}\n\nexport function impliedNumber(value, impliedValue) {\n  if ((value = number(value)) !== impliedValue) return value;\n}\n\n// https://www.w3.org/TR/CSS21/grammar.html\nconst validClassName =\n  /^-?([_a-z]|[\\240-\\377]|\\\\[0-9a-f]{1,6}(\\r\\n|[ \\t\\r\\n\\f])?|\\\\[^\\r\\n\\f0-9a-f])([_a-z0-9-]|[\\240-\\377]|\\\\[0-9a-f]{1,6}(\\r\\n|[ \\t\\r\\n\\f])?|\\\\[^\\r\\n\\f0-9a-f])*$/i;\n\nexport function maybeClassName(name) {\n  // The default should be changed whenever the default styles are changed, so\n  // as to avoid conflict when multiple versions of Plot are on the page.\n  if (name === undefined) return \"plot-d6a7b5\";\n  name = `${name}`;\n  if (!validClassName.test(name)) throw new Error(`invalid class name: ${name}`);\n  return name;\n}\n\nexport function applyInlineStyles(selection, style) {\n  if (typeof style === \"string\") {\n    selection.property(\"style\", style);\n  } else if (style != null) {\n    for (const element of selection) {\n      Object.assign(element.style, style);\n    }\n  }\n}\n\nexport function applyFrameAnchor({frameAnchor}, {width, height, marginTop, marginRight, marginBottom, marginLeft}) {\n  return [\n    /left$/.test(frameAnchor)\n      ? marginLeft\n      : /right$/.test(frameAnchor)\n      ? width - marginRight\n      : (marginLeft + width - marginRight) / 2,\n    /^top/.test(frameAnchor)\n      ? marginTop\n      : /^bottom/.test(frameAnchor)\n      ? height - marginBottom\n      : (marginTop + height - marginBottom) / 2\n  ];\n}\n", "import {extent} from \"d3\";\nimport {projectionAspectRatio} from \"./projection.js\";\nimport {isOrdinalScale} from \"./scales.js\";\nimport {offset} from \"./style.js\";\n\nexport function createDimensions(scales, marks, options = {}) {\n  // Compute the default margins: the maximum of the marks\u2019 margins. While not\n  // always used, they may be needed to compute the default height of the plot.\n  let marginTopDefault = 0.5 - offset,\n    marginRightDefault = 0.5 + offset,\n    marginBottomDefault = 0.5 + offset,\n    marginLeftDefault = 0.5 - offset;\n\n  for (const {marginTop, marginRight, marginBottom, marginLeft} of marks) {\n    if (marginTop > marginTopDefault) marginTopDefault = marginTop;\n    if (marginRight > marginRightDefault) marginRightDefault = marginRight;\n    if (marginBottom > marginBottomDefault) marginBottomDefault = marginBottom;\n    if (marginLeft > marginLeftDefault) marginLeftDefault = marginLeft;\n  }\n\n  // Compute the actual margins. The order of precedence is: the side-specific\n  // margin options, then the global margin option, then the defaults.\n  let {\n    margin,\n    marginTop = margin !== undefined ? margin : marginTopDefault,\n    marginRight = margin !== undefined ? margin : marginRightDefault,\n    marginBottom = margin !== undefined ? margin : marginBottomDefault,\n    marginLeft = margin !== undefined ? margin : marginLeftDefault\n  } = options;\n\n  // Coerce the margin options to numbers.\n  marginTop = +marginTop;\n  marginRight = +marginRight;\n  marginBottom = +marginBottom;\n  marginLeft = +marginLeft;\n\n  // Compute the outer dimensions of the plot. If the top and bottom margins are\n  // specified explicitly, adjust the automatic height accordingly.\n  let {\n    width = 640,\n    height = autoHeight(scales, options, {\n      width,\n      marginTopDefault,\n      marginRightDefault,\n      marginBottomDefault,\n      marginLeftDefault\n    }) + Math.max(0, marginTop - marginTopDefault + marginBottom - marginBottomDefault)\n  } = options;\n\n  // Coerce the width and height.\n  width = +width;\n  height = +height;\n\n  const dimensions = {\n    width,\n    height,\n    marginTop,\n    marginRight,\n    marginBottom,\n    marginLeft\n  };\n\n  // Compute the facet margins.\n  if (scales.fx || scales.fy) {\n    let {\n      margin: facetMargin,\n      marginTop: facetMarginTop = facetMargin !== undefined ? facetMargin : marginTop,\n      marginRight: facetMarginRight = facetMargin !== undefined ? facetMargin : marginRight,\n      marginBottom: facetMarginBottom = facetMargin !== undefined ? facetMargin : marginBottom,\n      marginLeft: facetMarginLeft = facetMargin !== undefined ? facetMargin : marginLeft\n    } = options.facet ?? {};\n\n    // Coerce the facet margin options to numbers.\n    facetMarginTop = +facetMarginTop;\n    facetMarginRight = +facetMarginRight;\n    facetMarginBottom = +facetMarginBottom;\n    facetMarginLeft = +facetMarginLeft;\n\n    dimensions.facet = {\n      marginTop: facetMarginTop,\n      marginRight: facetMarginRight,\n      marginBottom: facetMarginBottom,\n      marginLeft: facetMarginLeft\n    };\n  }\n\n  return dimensions;\n}\n\nfunction autoHeight(\n  {x, y, fy, fx},\n  {projection, aspectRatio},\n  {width, marginTopDefault, marginRightDefault, marginBottomDefault, marginLeftDefault}\n) {\n  const nfy = fy ? fy.scale.domain().length : 1;\n\n  // If a projection is specified, use its natural aspect ratio (if known).\n  const ar = projectionAspectRatio(projection);\n  if (ar) {\n    const nfx = fx ? fx.scale.domain().length : 1;\n    const far = ((1.1 * nfy - 0.1) / (1.1 * nfx - 0.1)) * ar; // 0.1 is default facet padding\n    const lar = Math.max(0.1, Math.min(10, far)); // clamp the aspect ratio to a \u201Creasonable\u201D value\n    return Math.round((width - marginLeftDefault - marginRightDefault) * lar + marginTopDefault + marginBottomDefault);\n  }\n\n  const ny = y ? (isOrdinalScale(y) ? y.scale.domain().length : Math.max(7, 17 / nfy)) : 1;\n\n  // If a desired aspect ratio is given, compute a default height to match.\n  if (aspectRatio != null) {\n    aspectRatio = +aspectRatio;\n    if (!(isFinite(aspectRatio) && aspectRatio > 0)) throw new Error(`invalid aspectRatio: ${aspectRatio}`);\n    const ratio = aspectRatioLength(\"y\", y) / (aspectRatioLength(\"x\", x) * aspectRatio);\n    const fxb = fx ? fx.scale.bandwidth() : 1;\n    const fyb = fy ? fy.scale.bandwidth() : 1;\n    const w = fxb * (width - marginLeftDefault - marginRightDefault) - x.insetLeft - x.insetRight;\n    return (ratio * w + y.insetTop + y.insetBottom) / fyb + marginTopDefault + marginBottomDefault;\n  }\n\n  return !!(y || fy) * Math.max(1, Math.min(60, ny * nfy)) * 20 + !!fx * 30 + 60;\n}\n\nfunction aspectRatioLength(k, scale) {\n  if (!scale) throw new Error(`aspectRatio requires ${k} scale`);\n  const {type, domain} = scale;\n  let transform;\n  switch (type) {\n    case \"linear\":\n    case \"utc\":\n    case \"time\":\n      transform = Number;\n      break;\n    case \"pow\": {\n      const exponent = scale.scale.exponent();\n      transform = (x) => Math.pow(x, exponent);\n      break;\n    }\n    case \"log\":\n      transform = Math.log;\n      break;\n    case \"point\":\n    case \"band\":\n      return domain.length;\n    default:\n      throw new Error(`unsupported ${k} scale for aspectRatio: ${type}`);\n  }\n  const [min, max] = extent(domain);\n  return Math.abs(transform(max) - transform(min));\n}\n", "import {InternMap, cross, rollup, sum} from \"d3\";\nimport {keyof, map, range} from \"./options.js\";\nimport {createScales} from \"./scales.js\";\n\n// Returns an array of {x?, y?, i} objects representing the facet domain.\nexport function createFacets(channelsByScale, options) {\n  const {fx, fy} = createScales(channelsByScale, options);\n  const fxDomain = fx?.scale.domain();\n  const fyDomain = fy?.scale.domain();\n  return fxDomain && fyDomain\n    ? cross(fxDomain, fyDomain).map(([x, y], i) => ({x, y, i}))\n    : fxDomain\n    ? fxDomain.map((x, i) => ({x, i}))\n    : fyDomain\n    ? fyDomain.map((y, i) => ({y, i}))\n    : undefined;\n}\n\nexport function recreateFacets(facets, {x: X, y: Y}) {\n  X &&= facetIndex(X);\n  Y &&= facetIndex(Y);\n  return facets\n    .filter(\n      X && Y // remove any facets no longer present in the domain\n        ? (f) => X.has(f.x) && Y.has(f.y)\n        : X\n        ? (f) => X.has(f.x)\n        : (f) => Y.has(f.y)\n    )\n    .sort(\n      X && Y // reorder facets to match the new scale domains\n        ? (a, b) => X.get(a.x) - X.get(b.x) || Y.get(a.y) - Y.get(b.y)\n        : X\n        ? (a, b) => X.get(a.x) - X.get(b.x)\n        : (a, b) => Y.get(a.y) - Y.get(b.y)\n    );\n}\n\n// Returns a (possibly nested) Map of [[key1, index1], [key2, index2], \u2026]\n// representing the data indexes associated with each facet.\nexport function facetGroups(data, {fx, fy}) {\n  const I = range(data);\n  const FX = fx?.value;\n  const FY = fy?.value;\n  return fx && fy\n    ? rollup(\n        I,\n        (G) => ((G.fx = FX[G[0]]), (G.fy = FY[G[0]]), G),\n        (i) => FX[i],\n        (i) => FY[i]\n      )\n    : fx\n    ? rollup(\n        I,\n        (G) => ((G.fx = FX[G[0]]), G),\n        (i) => FX[i]\n      )\n    : rollup(\n        I,\n        (G) => ((G.fy = FY[G[0]]), G),\n        (i) => FY[i]\n      );\n}\n\nexport function facetTranslator(fx, fy, {marginTop, marginLeft}) {\n  return fx && fy\n    ? ({x, y}) => `translate(${fx(x) - marginLeft},${fy(y) - marginTop})`\n    : fx\n    ? ({x}) => `translate(${fx(x) - marginLeft},0)`\n    : ({y}) => `translate(0,${fy(y) - marginTop})`;\n}\n\n// Returns an index that for each facet lists all the elements present in other\n// facets in the original index. TODO Memoize to avoid repeated work?\nexport function facetExclude(index) {\n  const ex = [];\n  const e = new Uint32Array(sum(index, (d) => d.length));\n  for (const i of index) {\n    let n = 0;\n    for (const j of index) {\n      if (i === j) continue;\n      e.set(j, n);\n      n += j.length;\n    }\n    ex.push(e.slice(0, n));\n  }\n  return ex;\n}\n\nconst facetAnchors = new Map([\n  [\"top\", facetAnchorTop],\n  [\"right\", facetAnchorRight],\n  [\"bottom\", facetAnchorBottom],\n  [\"left\", facetAnchorLeft],\n  [\"top-left\", and(facetAnchorTop, facetAnchorLeft)],\n  [\"top-right\", and(facetAnchorTop, facetAnchorRight)],\n  [\"bottom-left\", and(facetAnchorBottom, facetAnchorLeft)],\n  [\"bottom-right\", and(facetAnchorBottom, facetAnchorRight)],\n  [\"top-empty\", facetAnchorTopEmpty],\n  [\"right-empty\", facetAnchorRightEmpty],\n  [\"bottom-empty\", facetAnchorBottomEmpty],\n  [\"left-empty\", facetAnchorLeftEmpty],\n  [\"empty\", facetAnchorEmpty]\n]);\n\nexport function maybeFacetAnchor(facetAnchor) {\n  if (facetAnchor == null) return null;\n  const anchor = facetAnchors.get(`${facetAnchor}`.toLowerCase());\n  if (anchor) return anchor;\n  throw new Error(`invalid facet anchor: ${facetAnchor}`);\n}\n\nconst indexCache = new WeakMap();\n\nfunction facetIndex(V) {\n  let I = indexCache.get(V);\n  if (!I) indexCache.set(V, (I = new InternMap(map(V, (v, i) => [v, i]))));\n  return I;\n}\n\n// Like V.indexOf(v), but with the same semantics as InternMap.\nfunction facetIndexOf(V, v) {\n  return facetIndex(V).get(v);\n}\n\n// Like facets.find, but with the same semantics as InternMap.\nfunction facetFind(facets, x, y) {\n  x = keyof(x);\n  y = keyof(y);\n  return facets.find((f) => Object.is(keyof(f.x), x) && Object.is(keyof(f.y), y));\n}\n\nfunction facetEmpty(facets, x, y) {\n  return facetFind(facets, x, y)?.empty;\n}\n\nfunction facetAnchorTop(facets, {y: Y}, {y}) {\n  return Y ? facetIndexOf(Y, y) === 0 : true;\n}\n\nfunction facetAnchorBottom(facets, {y: Y}, {y}) {\n  return Y ? facetIndexOf(Y, y) === Y.length - 1 : true;\n}\n\nfunction facetAnchorLeft(facets, {x: X}, {x}) {\n  return X ? facetIndexOf(X, x) === 0 : true;\n}\n\nfunction facetAnchorRight(facets, {x: X}, {x}) {\n  return X ? facetIndexOf(X, x) === X.length - 1 : true;\n}\n\nfunction facetAnchorTopEmpty(facets, {y: Y}, {x, y, empty}) {\n  if (empty) return false;\n  if (!Y) return;\n  const i = facetIndexOf(Y, y);\n  if (i > 0) return facetEmpty(facets, x, Y[i - 1]);\n}\n\nfunction facetAnchorBottomEmpty(facets, {y: Y}, {x, y, empty}) {\n  if (empty) return false;\n  if (!Y) return;\n  const i = facetIndexOf(Y, y);\n  if (i < Y.length - 1) return facetEmpty(facets, x, Y[i + 1]);\n}\n\nfunction facetAnchorLeftEmpty(facets, {x: X}, {x, y, empty}) {\n  if (empty) return false;\n  if (!X) return;\n  const i = facetIndexOf(X, x);\n  if (i > 0) return facetEmpty(facets, X[i - 1], y);\n}\n\nfunction facetAnchorRightEmpty(facets, {x: X}, {x, y, empty}) {\n  if (empty) return false;\n  if (!X) return;\n  const i = facetIndexOf(X, x);\n  if (i < X.length - 1) return facetEmpty(facets, X[i + 1], y);\n}\n\nfunction facetAnchorEmpty(facets, channels, {empty}) {\n  return empty;\n}\n\nfunction and(a, b) {\n  return function () {\n    return a.apply(null, arguments) && b.apply(null, arguments);\n  };\n}\n\n// Facet filter, by mark; for now only the \"eq\" filter is provided.\nexport function facetFilter(facets, {channels: {fx, fy}, groups}) {\n  return fx && fy\n    ? facets.map(({x, y}) => groups.get(x)?.get(y) ?? [])\n    : fx\n    ? facets.map(({x}) => groups.get(x) ?? [])\n    : facets.map(({y}) => groups.get(y) ?? []);\n}\n", "import {channelDomain, createChannels, valueObject} from \"./channel.js\";\nimport {defined} from \"./defined.js\";\nimport {maybeFacetAnchor} from \"./facet.js\";\nimport {maybeKeyword, maybeNamed, maybeValue} from \"./options.js\";\nimport {arrayify, isDomainSort, isOptions, keyword, range, singleton} from \"./options.js\";\nimport {project} from \"./projection.js\";\nimport {maybeClip, styles} from \"./style.js\";\nimport {basic, initializer} from \"./transforms/basic.js\";\n\nexport class Mark {\n  constructor(data, channels = {}, options = {}, defaults) {\n    const {\n      facet = \"auto\",\n      facetAnchor,\n      fx,\n      fy,\n      sort,\n      dx = 0,\n      dy = 0,\n      margin = 0,\n      marginTop = margin,\n      marginRight = margin,\n      marginBottom = margin,\n      marginLeft = margin,\n      clip,\n      channels: extraChannels,\n      tip,\n      render\n    } = options;\n    this.data = data;\n    this.sort = isDomainSort(sort) ? sort : null;\n    this.initializer = initializer(options).initializer;\n    this.transform = this.initializer ? options.transform : basic(options).transform;\n    if (facet === null || facet === false) {\n      this.facet = null;\n    } else {\n      this.facet = keyword(facet === true ? \"include\" : facet, \"facet\", [\"auto\", \"include\", \"exclude\", \"super\"]);\n      this.fx = data === singleton && typeof fx === \"string\" ? [fx] : fx;\n      this.fy = data === singleton && typeof fy === \"string\" ? [fy] : fy;\n    }\n    this.facetAnchor = maybeFacetAnchor(facetAnchor);\n    channels = maybeNamed(channels);\n    if (extraChannels !== undefined) channels = {...maybeChannels(extraChannels), ...channels};\n    if (defaults !== undefined) channels = {...styles(this, options, defaults), ...channels};\n    this.channels = Object.fromEntries(\n      Object.entries(channels)\n        .map(([name, channel]) => {\n          if (isOptions(channel.value)) {\n            // apply scale overrides\n            const {value, scale = channel.scale} = channel.value;\n            channel = {...channel, scale, value};\n          }\n          if (data === singleton && typeof channel.value === \"string\") {\n            // convert field names to singleton values for decoration marks (e.g., frame)\n            const {value} = channel;\n            channel = {...channel, value: [value]};\n          }\n          return [name, channel];\n        })\n        .filter(([name, {value, optional}]) => {\n          if (value != null) return true;\n          if (optional) return false;\n          throw new Error(`missing channel value: ${name}`);\n        })\n    );\n    this.dx = +dx;\n    this.dy = +dy;\n    this.marginTop = +marginTop;\n    this.marginRight = +marginRight;\n    this.marginBottom = +marginBottom;\n    this.marginLeft = +marginLeft;\n    this.clip = maybeClip(clip);\n    this.tip = maybeTip(tip);\n    // Super-faceting currently disallow position channels; in the future, we\n    // could allow position to be specified in fx and fy in addition to (or\n    // instead of) x and y.\n    if (this.facet === \"super\") {\n      if (fx || fy) throw new Error(`super-faceting cannot use fx or fy`);\n      for (const name in this.channels) {\n        const {scale} = channels[name];\n        if (scale !== \"x\" && scale !== \"y\") continue;\n        throw new Error(`super-faceting cannot use x or y`);\n      }\n    }\n    if (render != null) {\n      this.render = composeRender(render, this.render);\n    }\n  }\n  initialize(facets, facetChannels, plotOptions) {\n    let data = arrayify(this.data);\n    if (facets === undefined && data != null) facets = [range(data)];\n    const originalFacets = facets;\n    if (this.transform != null) ({facets, data} = this.transform(data, facets, plotOptions)), (data = arrayify(data));\n    if (facets !== undefined) facets.original = originalFacets; // needed to read facetChannels\n    const channels = createChannels(this.channels, data);\n    if (this.sort != null) channelDomain(data, facets, channels, facetChannels, this.sort); // mutates facetChannels!\n    return {data, facets, channels};\n  }\n  filter(index, channels, values) {\n    for (const name in channels) {\n      const {filter = defined} = channels[name];\n      if (filter !== null) {\n        const value = values[name];\n        index = index.filter((i) => filter(value[i]));\n      }\n    }\n    return index;\n  }\n  // If there is a projection, and there are paired x and y channels associated\n  // with the x and y scale respectively (and not already in screen coordinates\n  // as with an initializer), then apply the projection, replacing the x and y\n  // values. Note that the x and y scales themselves don\u2019t exist if there is a\n  // projection, but whether the channels are associated with scales still\n  // determines whether the projection should apply; think of the projection as\n  // a combination xy-scale.\n  project(channels, values, context) {\n    for (const cx in channels) {\n      if (channels[cx].scale === \"x\" && /^x|x$/.test(cx)) {\n        const cy = cx.replace(/^x|x$/, \"y\");\n        if (cy in channels && channels[cy].scale === \"y\") {\n          project(cx, cy, values, context.projection);\n        }\n      }\n    }\n  }\n  scale(channels, scales, context) {\n    const values = valueObject(channels, scales);\n    if (context.projection) this.project(channels, values, context);\n    return values;\n  }\n}\n\nexport function marks(...marks) {\n  marks.plot = Mark.prototype.plot; // Note: depends on side-effect in plot!\n  return marks;\n}\n\nexport function composeRender(r1, r2) {\n  if (r1 == null) return r2 === null ? undefined : r2;\n  if (r2 == null) return r1 === null ? undefined : r1;\n  if (typeof r1 !== \"function\") throw new TypeError(`invalid render transform: ${r1}`);\n  if (typeof r2 !== \"function\") throw new TypeError(`invalid render transform: ${r2}`);\n  return function (i, s, v, d, c, next) {\n    return r1.call(this, i, s, v, d, c, (i, s, v, d, c) => {\n      return r2.call(this, i, s, v, d, c, next); // preserve this\n    });\n  };\n}\n\nfunction maybeChannels(channels) {\n  return Object.fromEntries(\n    Object.entries(maybeNamed(channels)).map(([name, channel]) => {\n      channel = maybeValue(channel);\n      if (channel.filter === undefined && channel.scale == null) channel = {...channel, filter: null};\n      return [name, channel];\n    })\n  );\n}\n\nfunction maybeTip(tip) {\n  return tip === true ? \"xy\" : tip === false ? null : maybeKeyword(tip, \"tip\", [\"x\", \"y\", \"xy\"]);\n}\n\nexport function withTip(options, tip) {\n  return options?.tip === true ? {...options, tip} : options;\n}\n", "import {pointer as pointof} from \"d3\";\nimport {composeRender} from \"../mark.js\";\nimport {applyFrameAnchor} from \"../style.js\";\n\nconst states = new WeakMap();\n\nfunction pointerK(kx, ky, {x, y, px, py, maxRadius = 40, channels, render, ...options} = {}) {\n  maxRadius = +maxRadius;\n  // When px or py is used, register an extra channel that the pointer\n  // interaction can use to control which point is focused; this allows pointing\n  // to function independently of where the downstream mark (e.g., a tip) is\n  // displayed. Also default x or y to null to disable maybeTuple etc.\n  if (px != null) (x ??= null), (channels = {...channels, px: {value: px, scale: \"x\"}});\n  if (py != null) (y ??= null), (channels = {...channels, py: {value: py, scale: \"y\"}});\n  return {\n    x,\n    y,\n    channels,\n    ...options,\n    // Unlike other composed transforms, the render transform must be the\n    // outermost render function because it will re-render dynamically in\n    // response to pointer events.\n    render: composeRender(function (index, scales, values, dimensions, context, next) {\n      context = {...context, pointerSticky: false};\n      const svg = context.ownerSVGElement;\n      const {data} = context.getMarkState(this);\n\n      // Isolate state per-pointer, per-plot; if the pointer is reused by\n      // multiple marks, they will share the same state (e.g., sticky modality).\n      let state = states.get(svg);\n      if (!state) states.set(svg, (state = {sticky: false, roots: [], renders: []}));\n\n      // This serves as a unique identifier of the rendered mark per-plot; it is\n      // used to record the currently-rendered elements (state.roots) so that we\n      // can tell when a rendered element is clicked on.\n      let renderIndex = state.renders.push(render) - 1;\n\n      // For faceting, we want to compute the local coordinates of each point,\n      // which means subtracting out the facet translation, if any. (It\u2019s\n      // tempting to do this using the local coordinates in SVG, but that\u2019s\n      // complicated by mark-specific transforms such as dx and dy.) Also, since\n      // band scales return the upper bound of the band, we have to offset by\n      // half the bandwidth.\n      const {x, y, fx, fy} = scales;\n      let tx = fx ? fx(index.fx) - dimensions.marginLeft : 0;\n      let ty = fy ? fy(index.fy) - dimensions.marginTop : 0;\n      if (x?.bandwidth) tx += x.bandwidth() / 2;\n      if (y?.bandwidth) ty += y.bandwidth() / 2;\n\n      // For faceting, we also need to record the closest point per facet per\n      // mark (!), since each facet has its own pointer event listeners; we only\n      // want the closest point across facets to be visible.\n      const faceted = index.fi != null;\n      let facetState;\n      if (faceted) {\n        let facetStates = state.facetStates;\n        if (!facetStates) state.facetStates = facetStates = new Map();\n        facetState = facetStates.get(this);\n        if (!facetState) facetStates.set(this, (facetState = new Map()));\n      }\n\n      // The order of precedence for the pointer position is: px & py; the\n      // middle of x1 & y1 and x2 & y2; or x1 & y1 (e.g., area); or lastly x &\n      // y. If a dimension is unspecified, the frame anchor is used.\n      const [cx, cy] = applyFrameAnchor(this, dimensions);\n      const {px: PX, py: PY} = values;\n      const px = PX ? (i) => PX[i] : anchorX(values, cx);\n      const py = PY ? (i) => PY[i] : anchorY(values, cy);\n\n      let i; // currently focused index\n      let g; // currently rendered mark\n      let s; // currently rendered stickiness\n      let f; // current animation frame\n\n      // When faceting, if more than one pointer would be visible, only show\n      // this one if it is the closest. We defer rendering using an animation\n      // frame to allow all pointer events to be received before deciding which\n      // mark to render; although when hiding, we render immediately.\n      function update(ii, ri) {\n        if (faceted) {\n          if (f) f = cancelAnimationFrame(f);\n          if (ii == null) facetState.delete(index.fi);\n          else {\n            facetState.set(index.fi, ri);\n            f = requestAnimationFrame(() => {\n              f = null;\n              for (const r of facetState.values()) {\n                if (r < ri) {\n                  ii = null;\n                  break;\n                }\n              }\n              render(ii);\n            });\n            return;\n          }\n        }\n        render(ii);\n      }\n\n      function render(ii) {\n        if (i === ii && s === state.sticky) return; // the tooltip hasn\u2019t moved\n        i = ii;\n        s = context.pointerSticky = state.sticky;\n        const I = i == null ? [] : [i];\n        if (faceted) (I.fx = index.fx), (I.fy = index.fy), (I.fi = index.fi);\n        const r = next(I, scales, values, dimensions, context);\n        if (g) {\n          // When faceting, preserve swapped mark and facet transforms; also\n          // remove ARIA attributes since these are promoted to the parent. This\n          // is perhaps brittle in that it depends on how Plot renders facets,\n          // but it produces a cleaner and more accessible SVG structure.\n          if (faceted) {\n            const p = g.parentNode;\n            const ft = g.getAttribute(\"transform\");\n            const mt = r.getAttribute(\"transform\");\n            ft ? r.setAttribute(\"transform\", ft) : r.removeAttribute(\"transform\");\n            mt ? p.setAttribute(\"transform\", mt) : p.removeAttribute(\"transform\");\n            r.removeAttribute(\"aria-label\");\n            r.removeAttribute(\"aria-description\");\n            r.removeAttribute(\"aria-hidden\");\n          }\n          g.replaceWith(r);\n        }\n        state.roots[renderIndex] = g = r;\n        context.dispatchValue(i == null ? null : data[i]);\n        return r;\n      }\n\n      function pointermove(event) {\n        if (state.sticky || (event.pointerType === \"mouse\" && event.buttons === 1)) return; // dragging\n        let [xp, yp] = pointof(event);\n        (xp -= tx), (yp -= ty); // correct for facets and band scales\n        let ii = null;\n        let ri = maxRadius * maxRadius;\n        for (const j of index) {\n          const dx = kx * (px(j) - xp);\n          const dy = ky * (py(j) - yp);\n          const rj = dx * dx + dy * dy;\n          if (rj <= ri) (ii = j), (ri = rj);\n        }\n        update(ii, ri);\n      }\n\n      function pointerdown(event) {\n        if (event.pointerType !== \"mouse\") return;\n        if (i == null) return; // not pointing\n        if (state.sticky && state.roots.some((r) => r?.contains(event.target))) return; // stay sticky\n        if (state.sticky) (state.sticky = false), state.renders.forEach((r) => r(null)); // clear all pointers\n        else (state.sticky = true), render(i);\n        event.stopImmediatePropagation(); // suppress other pointers\n      }\n\n      function pointerleave(event) {\n        if (event.pointerType !== \"mouse\") return;\n        if (!state.sticky) update(null);\n      }\n\n      // We listen to the svg element; listening to the window instead would let\n      // us receive pointer events from farther away, but would also make it\n      // hard to know when to remove the listeners. (Using a mutation observer\n      // to watch the entire document is likely too expensive.)\n      svg.addEventListener(\"pointerenter\", pointermove);\n      svg.addEventListener(\"pointermove\", pointermove);\n      svg.addEventListener(\"pointerdown\", pointerdown);\n      svg.addEventListener(\"pointerleave\", pointerleave);\n\n      return render(null);\n    }, render)\n  };\n}\n\nexport function pointer(options) {\n  return pointerK(1, 1, options);\n}\n\nexport function pointerX(options) {\n  return pointerK(1, 0.01, options);\n}\n\nexport function pointerY(options) {\n  return pointerK(0.01, 1, options);\n}\n\nexport function anchorX({x1: X1, x2: X2, x: X = X1}, cx) {\n  return X1 && X2 ? (i) => (X1[i] + X2[i]) / 2 : X ? (i) => X[i] : () => cx;\n}\n\nexport function anchorY({y1: Y1, y2: Y2, y: Y = Y1}, cy) {\n  return Y1 && Y2 ? (i) => (Y1[i] + Y2[i]) / 2 : Y ? (i) => Y[i] : () => cy;\n}\n", "import {isOrdinalScale} from \"./scales.js\";\n\nexport function inferFontVariant(scale) {\n  return isOrdinalScale(scale) && scale.interval === undefined ? undefined : \"tabular-nums\";\n}\n", "import {quantize, interpolateNumber, piecewise, format, scaleBand, scaleLinear, axisBottom} from \"d3\";\nimport {inferFontVariant} from \"../axes.js\";\nimport {createContext, create} from \"../context.js\";\nimport {map, maybeNumberChannel} from \"../options.js\";\nimport {interpolatePiecewise} from \"../scales/quantitative.js\";\nimport {applyInlineStyles, impliedString, maybeClassName} from \"../style.js\";\n\nexport function legendRamp(color, options) {\n  let {\n    label = color.label,\n    tickSize = 6,\n    width = 240,\n    height = 44 + tickSize,\n    marginTop = 18,\n    marginRight = 0,\n    marginBottom = 16 + tickSize,\n    marginLeft = 0,\n    style,\n    ticks = (width - marginLeft - marginRight) / 64,\n    tickFormat,\n    fontVariant = inferFontVariant(color),\n    round = true,\n    opacity,\n    className\n  } = options;\n  const context = createContext(options);\n  className = maybeClassName(className);\n  opacity = maybeNumberChannel(opacity)[1];\n  if (tickFormat === null) tickFormat = () => null;\n\n  const svg = create(\"svg\", context)\n    .attr(\"class\", `${className}-ramp`)\n    .attr(\"font-family\", \"system-ui, sans-serif\")\n    .attr(\"font-size\", 10)\n    .attr(\"width\", width)\n    .attr(\"height\", height)\n    .attr(\"viewBox\", `0 0 ${width} ${height}`)\n    .call((svg) =>\n      // Warning: if you edit this, change defaultClassName.\n      svg.append(\"style\").text(\n        `.${className}-ramp {\n  display: block;\n  background: white;\n  height: auto;\n  height: intrinsic;\n  max-width: 100%;\n  overflow: visible;\n}\n.${className}-ramp text {\n  white-space: pre;\n}`\n      )\n    )\n    .call(applyInlineStyles, style);\n\n  let tickAdjust = (g) => g.selectAll(\".tick line\").attr(\"y1\", marginTop + marginBottom - height);\n\n  let x;\n\n  // Some D3 scales use scale.interpolate, some scale.interpolator, and some\n  // scale.round; this normalizes the API so it works with all scale types.\n  const applyRange = round ? (x, range) => x.rangeRound(range) : (x, range) => x.range(range);\n\n  const {type, domain, range, interpolate, scale, pivot} = color;\n\n  // Continuous\n  if (interpolate) {\n    // Often interpolate is a \u201Cfixed\u201D interpolator on the [0, 1] interval, as\n    // with a built-in color scheme, but sometimes it is a function that takes\n    // two arguments and is used in conjunction with the range.\n    const interpolator =\n      range === undefined\n        ? interpolate\n        : piecewise(interpolate.length === 1 ? interpolatePiecewise(interpolate) : interpolate, range);\n\n    // Construct a D3 scale of the same type, but with a range that evenly\n    // divides the horizontal extent of the legend. (In the common case, the\n    // domain.length is two, and so the range is simply the extent.) For a\n    // diverging scale, we need an extra point in the range for the pivot such\n    // that the pivot is always drawn in the middle.\n    x = applyRange(\n      scale.copy(),\n      quantize(\n        interpolateNumber(marginLeft, width - marginRight),\n        Math.min(domain.length + (pivot !== undefined), range === undefined ? Infinity : range.length)\n      )\n    );\n\n    // Construct a 256\u00D71 canvas, filling each pixel using the interpolator.\n    const n = 256;\n    const canvas = context.document.createElement(\"canvas\");\n    canvas.width = n;\n    canvas.height = 1;\n    const context2 = canvas.getContext(\"2d\");\n    for (let i = 0, j = n - 1; i < n; ++i) {\n      context2.fillStyle = interpolator(i / j);\n      context2.fillRect(i, 0, 1, 1);\n    }\n\n    svg\n      .append(\"image\")\n      .attr(\"opacity\", opacity)\n      .attr(\"x\", marginLeft)\n      .attr(\"y\", marginTop)\n      .attr(\"width\", width - marginLeft - marginRight)\n      .attr(\"height\", height - marginTop - marginBottom)\n      .attr(\"preserveAspectRatio\", \"none\")\n      .attr(\"xlink:href\", canvas.toDataURL());\n  }\n\n  // Threshold\n  else if (type === \"threshold\") {\n    const thresholds = domain;\n\n    const thresholdFormat =\n      tickFormat === undefined ? (d) => d : typeof tickFormat === \"string\" ? format(tickFormat) : tickFormat;\n\n    // Construct a linear scale with evenly-spaced ticks for each of the\n    // thresholds; the domain extends one beyond the threshold extent.\n    x = applyRange(scaleLinear().domain([-1, range.length - 1]), [marginLeft, width - marginRight]);\n\n    svg\n      .append(\"g\")\n      .attr(\"fill-opacity\", opacity)\n      .selectAll()\n      .data(range)\n      .enter()\n      .append(\"rect\")\n      .attr(\"x\", (d, i) => x(i - 1))\n      .attr(\"y\", marginTop)\n      .attr(\"width\", (d, i) => x(i) - x(i - 1))\n      .attr(\"height\", height - marginTop - marginBottom)\n      .attr(\"fill\", (d) => d);\n\n    ticks = map(thresholds, (_, i) => i);\n    tickFormat = (i) => thresholdFormat(thresholds[i], i);\n  }\n\n  // Ordinal (hopefully!)\n  else {\n    x = applyRange(scaleBand().domain(domain), [marginLeft, width - marginRight]);\n\n    svg\n      .append(\"g\")\n      .attr(\"fill-opacity\", opacity)\n      .selectAll()\n      .data(domain)\n      .enter()\n      .append(\"rect\")\n      .attr(\"x\", x)\n      .attr(\"y\", marginTop)\n      .attr(\"width\", Math.max(0, x.bandwidth() - 1))\n      .attr(\"height\", height - marginTop - marginBottom)\n      .attr(\"fill\", scale);\n\n    tickAdjust = () => {};\n  }\n\n  svg\n    .append(\"g\")\n    .attr(\"transform\", `translate(0,${height - marginBottom})`)\n    .call(\n      axisBottom(x)\n        .ticks(Array.isArray(ticks) ? null : ticks, typeof tickFormat === \"string\" ? tickFormat : undefined)\n        .tickFormat(typeof tickFormat === \"function\" ? tickFormat : undefined)\n        .tickSize(tickSize)\n        .tickValues(Array.isArray(ticks) ? ticks : null)\n    )\n    .attr(\"font-size\", null)\n    .attr(\"font-family\", null)\n    .attr(\"font-variant\", impliedString(fontVariant, \"normal\"))\n    .call(tickAdjust)\n    .call((g) => g.select(\".domain\").remove());\n\n  if (label !== undefined) {\n    svg\n      .append(\"text\")\n      .attr(\"x\", marginLeft)\n      .attr(\"y\", marginTop - 6)\n      .attr(\"fill\", \"currentColor\") // TODO move to stylesheet?\n      .attr(\"font-weight\", \"bold\")\n      .text(label);\n  }\n\n  return svg.node();\n}\n", "export const radians = Math.PI / 180;\n", "import {create} from \"./context.js\";\n\nexport function markers(mark, {marker, markerStart = marker, markerMid = marker, markerEnd = marker} = {}) {\n  mark.markerStart = maybeMarker(markerStart);\n  mark.markerMid = maybeMarker(markerMid);\n  mark.markerEnd = maybeMarker(markerEnd);\n}\n\nfunction maybeMarker(marker) {\n  if (marker == null || marker === false) return null;\n  if (marker === true) return markerCircleFill;\n  if (typeof marker === \"function\") return marker;\n  switch (`${marker}`.toLowerCase()) {\n    case \"none\":\n      return null;\n    case \"arrow\":\n      return markerArrow(\"auto\");\n    case \"arrow-reverse\":\n      return markerArrow(\"auto-start-reverse\");\n    case \"dot\":\n      return markerDot;\n    case \"circle\":\n    case \"circle-fill\":\n      return markerCircleFill;\n    case \"circle-stroke\":\n      return markerCircleStroke;\n  }\n  throw new Error(`invalid marker: ${marker}`);\n}\n\nfunction markerArrow(orient) {\n  return (color, context) =>\n    create(\"svg:marker\", context)\n      .attr(\"viewBox\", \"-5 -5 10 10\")\n      .attr(\"markerWidth\", 6.67)\n      .attr(\"markerHeight\", 6.67)\n      .attr(\"orient\", orient)\n      .attr(\"fill\", \"none\")\n      .attr(\"stroke\", color)\n      .attr(\"stroke-width\", 1.5)\n      .attr(\"stroke-linecap\", \"round\")\n      .attr(\"stroke-linejoin\", \"round\")\n      .call((marker) => marker.append(\"path\").attr(\"d\", \"M-1.5,-3l3,3l-3,3\"))\n      .node();\n}\n\nfunction markerDot(color, context) {\n  return create(\"svg:marker\", context)\n    .attr(\"viewBox\", \"-5 -5 10 10\")\n    .attr(\"markerWidth\", 6.67)\n    .attr(\"markerHeight\", 6.67)\n    .attr(\"fill\", color)\n    .attr(\"stroke\", \"none\")\n    .call((marker) => marker.append(\"circle\").attr(\"r\", 2.5))\n    .node();\n}\n\nfunction markerCircleFill(color, context) {\n  return create(\"svg:marker\", context)\n    .attr(\"viewBox\", \"-5 -5 10 10\")\n    .attr(\"markerWidth\", 6.67)\n    .attr(\"markerHeight\", 6.67)\n    .attr(\"fill\", color)\n    .attr(\"stroke\", \"white\")\n    .attr(\"stroke-width\", 1.5)\n    .call((marker) => marker.append(\"circle\").attr(\"r\", 3))\n    .node();\n}\n\nfunction markerCircleStroke(color, context) {\n  return create(\"svg:marker\", context)\n    .attr(\"viewBox\", \"-5 -5 10 10\")\n    .attr(\"markerWidth\", 6.67)\n    .attr(\"markerHeight\", 6.67)\n    .attr(\"fill\", \"white\")\n    .attr(\"stroke\", color)\n    .attr(\"stroke-width\", 1.5)\n    .call((marker) => marker.append(\"circle\").attr(\"r\", 3))\n    .node();\n}\n\nlet nextMarkerId = 0;\n\nexport function applyMarkers(path, mark, {stroke: S}, context) {\n  return applyMarkersColor(path, mark, S && ((i) => S[i]), context);\n}\n\nexport function applyGroupedMarkers(path, mark, {stroke: S}, context) {\n  return applyMarkersColor(path, mark, S && (([i]) => S[i]), context);\n}\n\nfunction applyMarkersColor(path, {markerStart, markerMid, markerEnd, stroke}, strokeof = () => stroke, context) {\n  const iriByMarkerColor = new Map();\n\n  function applyMarker(marker) {\n    return function (i) {\n      const color = strokeof(i);\n      let iriByColor = iriByMarkerColor.get(marker);\n      if (!iriByColor) iriByMarkerColor.set(marker, (iriByColor = new Map()));\n      let iri = iriByColor.get(color);\n      if (!iri) {\n        const node = this.parentNode.insertBefore(marker(color, context), this);\n        const id = `plot-marker-${++nextMarkerId}`;\n        node.setAttribute(\"id\", id);\n        iriByColor.set(color, (iri = `url(#${id})`));\n      }\n      return iri;\n    };\n  }\n\n  if (markerStart) path.attr(\"marker-start\", applyMarker(markerStart));\n  if (markerMid) path.attr(\"marker-mid\", applyMarker(markerMid));\n  if (markerEnd) path.attr(\"marker-end\", applyMarker(markerEnd));\n}\n", "import {offset} from \"../style.js\";\n\nexport function maybeInsetX({inset, insetLeft, insetRight, ...options} = {}) {\n  [insetLeft, insetRight] = maybeInset(inset, insetLeft, insetRight);\n  return {inset, insetLeft, insetRight, ...options};\n}\n\nexport function maybeInsetY({inset, insetTop, insetBottom, ...options} = {}) {\n  [insetTop, insetBottom] = maybeInset(inset, insetTop, insetBottom);\n  return {inset, insetTop, insetBottom, ...options};\n}\n\nfunction maybeInset(inset, inset1, inset2) {\n  return inset === undefined && inset1 === undefined && inset2 === undefined\n    ? offset\n      ? [1, 0]\n      : [0.5, 0.5]\n    : [inset1, inset2];\n}\n", "import {isTemporal, labelof, map, maybeInterval, maybeValue, valueof} from \"../options.js\";\nimport {maybeInsetX, maybeInsetY} from \"./inset.js\";\n\n// The interval may be specified either as x: {value, interval} or as {x,\n// interval}. The former can be used to specify separate intervals for x and y,\n// for example with Plot.rect.\nfunction maybeIntervalValue(value, {interval}) {\n  value = {...maybeValue(value)};\n  value.interval = maybeInterval(value.interval === undefined ? interval : value.interval);\n  return value;\n}\n\nfunction maybeIntervalK(k, maybeInsetK, options, trivial) {\n  const {[k]: v, [`${k}1`]: v1, [`${k}2`]: v2} = options;\n  const {value, interval} = maybeIntervalValue(v, options);\n  if (value == null || (interval == null && !trivial)) return options;\n  const label = labelof(v);\n  if (interval == null) {\n    let V;\n    const kv = {transform: (data) => V || (V = valueof(data, value)), label};\n    return {\n      ...options,\n      [k]: undefined,\n      [`${k}1`]: v1 === undefined ? kv : v1,\n      [`${k}2`]: v2 === undefined ? kv : v2\n    };\n  }\n  let D1, V1;\n  function transform(data) {\n    if (V1 !== undefined && data === D1) return V1; // memoize\n    return (V1 = map(valueof((D1 = data), value), (v) => interval.floor(v)));\n  }\n  return maybeInsetK({\n    ...options,\n    [k]: undefined,\n    [`${k}1`]: v1 === undefined ? {transform, label} : v1,\n    [`${k}2`]: v2 === undefined ? {transform: (data) => transform(data).map((v) => interval.offset(v)), label} : v2\n  });\n}\n\nfunction maybeIntervalMidK(k, maybeInsetK, options) {\n  const {[k]: v} = options;\n  const {value, interval} = maybeIntervalValue(v, options);\n  if (value == null || interval == null) return options;\n  return maybeInsetK({\n    ...options,\n    [k]: {\n      label: labelof(v),\n      transform: (data) => {\n        const V1 = map(valueof(data, value), (v) => interval.floor(v));\n        const V2 = V1.map((v) => interval.offset(v));\n        return V1.map(\n          isTemporal(V1)\n            ? (v1, v2) =>\n                v1 == null || isNaN((v1 = +v1)) || ((v2 = V2[v2]), v2 == null) || isNaN((v2 = +v2))\n                  ? undefined\n                  : new Date((v1 + v2) / 2)\n            : (v1, v2) => (v1 == null || ((v2 = V2[v2]), v2 == null) ? NaN : (+v1 + +v2) / 2)\n        );\n      }\n    }\n  });\n}\n\nexport function maybeTrivialIntervalX(options = {}) {\n  return maybeIntervalK(\"x\", maybeInsetX, options, true);\n}\n\nexport function maybeTrivialIntervalY(options = {}) {\n  return maybeIntervalK(\"y\", maybeInsetY, options, true);\n}\n\nexport function maybeIntervalX(options = {}) {\n  return maybeIntervalK(\"x\", maybeInsetX, options);\n}\n\nexport function maybeIntervalY(options = {}) {\n  return maybeIntervalK(\"y\", maybeInsetY, options);\n}\n\nexport function maybeIntervalMidX(options = {}) {\n  return maybeIntervalMidK(\"x\", maybeInsetX, options);\n}\n\nexport function maybeIntervalMidY(options = {}) {\n  return maybeIntervalMidK(\"y\", maybeInsetY, options);\n}\n", "import {create} from \"../context.js\";\nimport {Mark, withTip} from \"../mark.js\";\nimport {applyMarkers, markers} from \"../marker.js\";\nimport {identity, number} from \"../options.js\";\nimport {isCollapsed} from \"../scales.js\";\nimport {applyChannelStyles, applyDirectStyles, applyIndirectStyles, applyTransform, offset} from \"../style.js\";\nimport {maybeIntervalX, maybeIntervalY} from \"../transforms/interval.js\";\n\nconst defaults = {\n  ariaLabel: \"rule\",\n  fill: null,\n  stroke: \"currentColor\"\n};\n\nexport class RuleX extends Mark {\n  constructor(data, options = {}) {\n    const {x, y1, y2, inset = 0, insetTop = inset, insetBottom = inset} = options;\n    super(\n      data,\n      {\n        x: {value: x, scale: \"x\", optional: true},\n        y1: {value: y1, scale: \"y\", optional: true},\n        y2: {value: y2, scale: \"y\", optional: true}\n      },\n      withTip(options, \"x\"),\n      defaults\n    );\n    this.insetTop = number(insetTop);\n    this.insetBottom = number(insetBottom);\n    markers(this, options);\n  }\n  render(index, scales, channels, dimensions, context) {\n    const {x, y} = scales;\n    const {x: X, y1: Y1, y2: Y2} = channels;\n    const {width, height, marginTop, marginRight, marginLeft, marginBottom} = dimensions;\n    const {insetTop, insetBottom} = this;\n    return create(\"svg:g\", context)\n      .call(applyIndirectStyles, this, dimensions, context)\n      .call(applyTransform, this, {x: X && x}, offset, 0)\n      .call((g) =>\n        g\n          .selectAll()\n          .data(index)\n          .enter()\n          .append(\"line\")\n          .call(applyDirectStyles, this)\n          .attr(\"x1\", X ? (i) => X[i] : (marginLeft + width - marginRight) / 2)\n          .attr(\"x2\", X ? (i) => X[i] : (marginLeft + width - marginRight) / 2)\n          .attr(\"y1\", Y1 && !isCollapsed(y) ? (i) => Y1[i] + insetTop : marginTop + insetTop)\n          .attr(\n            \"y2\",\n            Y2 && !isCollapsed(y)\n              ? y.bandwidth\n                ? (i) => Y2[i] + y.bandwidth() - insetBottom\n                : (i) => Y2[i] - insetBottom\n              : height - marginBottom - insetBottom\n          )\n          .call(applyChannelStyles, this, channels)\n          .call(applyMarkers, this, channels, context)\n      )\n      .node();\n  }\n}\n\nexport class RuleY extends Mark {\n  constructor(data, options = {}) {\n    const {x1, x2, y, inset = 0, insetRight = inset, insetLeft = inset} = options;\n    super(\n      data,\n      {\n        y: {value: y, scale: \"y\", optional: true},\n        x1: {value: x1, scale: \"x\", optional: true},\n        x2: {value: x2, scale: \"x\", optional: true}\n      },\n      withTip(options, \"y\"),\n      defaults\n    );\n    this.insetRight = number(insetRight);\n    this.insetLeft = number(insetLeft);\n    markers(this, options);\n  }\n  render(index, scales, channels, dimensions, context) {\n    const {x, y} = scales;\n    const {y: Y, x1: X1, x2: X2} = channels;\n    const {width, height, marginTop, marginRight, marginLeft, marginBottom} = dimensions;\n    const {insetLeft, insetRight} = this;\n    return create(\"svg:g\", context)\n      .call(applyIndirectStyles, this, dimensions, context)\n      .call(applyTransform, this, {y: Y && y}, 0, offset)\n      .call((g) =>\n        g\n          .selectAll()\n          .data(index)\n          .enter()\n          .append(\"line\")\n          .call(applyDirectStyles, this)\n          .attr(\"x1\", X1 && !isCollapsed(x) ? (i) => X1[i] + insetLeft : marginLeft + insetLeft)\n          .attr(\n            \"x2\",\n            X2 && !isCollapsed(x)\n              ? x.bandwidth\n                ? (i) => X2[i] + x.bandwidth() - insetRight\n                : (i) => X2[i] - insetRight\n              : width - marginRight - insetRight\n          )\n          .attr(\"y1\", Y ? (i) => Y[i] : (marginTop + height - marginBottom) / 2)\n          .attr(\"y2\", Y ? (i) => Y[i] : (marginTop + height - marginBottom) / 2)\n          .call(applyChannelStyles, this, channels)\n          .call(applyMarkers, this, channels, context)\n      )\n      .node();\n  }\n}\n\nexport function ruleX(data, options) {\n  let {x = identity, y, y1, y2, ...rest} = maybeIntervalY(options);\n  [y1, y2] = maybeOptionalZero(y, y1, y2);\n  return new RuleX(data, {...rest, x, y1, y2});\n}\n\nexport function ruleY(data, options) {\n  let {y = identity, x, x1, x2, ...rest} = maybeIntervalX(options);\n  [x1, x2] = maybeOptionalZero(x, x1, x2);\n  return new RuleY(data, {...rest, y, x1, x2});\n}\n\n// For marks specified either as [0, x] or [x1, x2], or nothing.\nfunction maybeOptionalZero(x, x1, x2) {\n  if (x == null) {\n    if (x1 === undefined) {\n      if (x2 !== undefined) return [0, x2];\n    } else {\n      if (x2 === undefined) return [0, x1];\n    }\n  } else if (x1 === undefined) {\n    return x2 === undefined ? [0, x] : [x, x2];\n  } else if (x2 === undefined) {\n    return [x, x1];\n  }\n  return [x1, x2];\n}\n", "export function template(strings, ...parts) {\n  let n = parts.length;\n\n  // If any of the interpolated parameters are strings rather than functions,\n  // bake them into the template to optimize performance during render.\n  for (let j = 0, copy = true; j < n; ++j) {\n    if (typeof parts[j] !== \"function\") {\n      if (copy) {\n        strings = strings.slice(); // copy before mutate\n        copy = false;\n      }\n      strings.splice(j, 2, strings[j] + parts[j] + strings[j + 1]);\n      parts.splice(j, 1);\n      --j, --n;\n    }\n  }\n\n  return (i) => {\n    let s = strings[0];\n    for (let j = 0; j < n; ++j) {\n      s += parts[j](i) + strings[j + 1];\n    }\n    return s;\n  };\n}\n", "import {namespaces} from \"d3\";\nimport {create} from \"../context.js\";\nimport {nonempty} from \"../defined.js\";\nimport {formatDefault} from \"../format.js\";\nimport {Mark} from \"../mark.js\";\nimport {\n  indexOf,\n  identity,\n  string,\n  maybeNumberChannel,\n  maybeTuple,\n  numberChannel,\n  isNumeric,\n  isTemporal,\n  keyword,\n  maybeFrameAnchor,\n  isTextual,\n  isIterable\n} from \"../options.js\";\nimport {\n  applyChannelStyles,\n  applyDirectStyles,\n  applyIndirectStyles,\n  applyAttr,\n  applyTransform,\n  impliedString,\n  applyFrameAnchor\n} from \"../style.js\";\nimport {template} from \"../template.js\";\nimport {maybeIntervalMidX, maybeIntervalMidY} from \"../transforms/interval.js\";\n\nconst defaults = {\n  ariaLabel: \"text\",\n  strokeLinejoin: \"round\",\n  strokeWidth: 3,\n  paintOrder: \"stroke\"\n};\n\nconst softHyphen = \"\\u00ad\";\n\nexport class Text extends Mark {\n  constructor(data, options = {}) {\n    const {\n      x,\n      y,\n      text = isIterable(data) && isTextual(data) ? identity : indexOf,\n      frameAnchor,\n      textAnchor = /right$/i.test(frameAnchor) ? \"end\" : /left$/i.test(frameAnchor) ? \"start\" : \"middle\",\n      lineAnchor = /^top/i.test(frameAnchor) ? \"top\" : /^bottom/i.test(frameAnchor) ? \"bottom\" : \"middle\",\n      lineHeight = 1,\n      lineWidth = Infinity,\n      textOverflow,\n      monospace,\n      fontFamily = monospace ? \"ui-monospace, monospace\" : undefined,\n      fontSize,\n      fontStyle,\n      fontVariant,\n      fontWeight,\n      rotate\n    } = options;\n    const [vrotate, crotate] = maybeNumberChannel(rotate, 0);\n    const [vfontSize, cfontSize] = maybeFontSizeChannel(fontSize);\n    super(\n      data,\n      {\n        x: {value: x, scale: \"x\", optional: true},\n        y: {value: y, scale: \"y\", optional: true},\n        fontSize: {value: vfontSize, optional: true},\n        rotate: {value: numberChannel(vrotate), optional: true},\n        text: {value: text, filter: nonempty, optional: true}\n      },\n      options,\n      defaults\n    );\n    this.rotate = crotate;\n    this.textAnchor = impliedString(textAnchor, \"middle\");\n    this.lineAnchor = keyword(lineAnchor, \"lineAnchor\", [\"top\", \"middle\", \"bottom\"]);\n    this.lineHeight = +lineHeight;\n    this.lineWidth = +lineWidth;\n    this.textOverflow = maybeTextOverflow(textOverflow);\n    this.monospace = !!monospace;\n    this.fontFamily = string(fontFamily);\n    this.fontSize = cfontSize;\n    this.fontStyle = string(fontStyle);\n    this.fontVariant = string(fontVariant);\n    this.fontWeight = string(fontWeight);\n    this.frameAnchor = maybeFrameAnchor(frameAnchor);\n    if (!(this.lineWidth >= 0)) throw new Error(`invalid lineWidth: ${lineWidth}`);\n    this.splitLines = splitter(this);\n    this.clipLine = clipper(this);\n  }\n  render(index, scales, channels, dimensions, context) {\n    const {x, y} = scales;\n    const {x: X, y: Y, rotate: R, text: T, title: TL, fontSize: FS} = channels;\n    const {rotate} = this;\n    const [cx, cy] = applyFrameAnchor(this, dimensions);\n    return create(\"svg:g\", context)\n      .call(applyIndirectStyles, this, dimensions, context)\n      .call(applyIndirectTextStyles, this, T, dimensions)\n      .call(applyTransform, this, {x: X && x, y: Y && y})\n      .call((g) =>\n        g\n          .selectAll()\n          .data(index)\n          .enter()\n          .append(\"text\")\n          .call(applyDirectStyles, this)\n          .call(applyMultilineText, this, T, TL)\n          .attr(\n            \"transform\",\n            template`translate(${X ? (i) => X[i] : cx},${Y ? (i) => Y[i] : cy})${\n              R ? (i) => ` rotate(${R[i]})` : rotate ? ` rotate(${rotate})` : ``\n            }`\n          )\n          .call(applyAttr, \"font-size\", FS && ((i) => FS[i]))\n          .call(applyChannelStyles, this, channels)\n      )\n      .node();\n  }\n}\n\nexport function maybeTextOverflow(textOverflow) {\n  return textOverflow == null\n    ? null\n    : keyword(textOverflow, \"textOverflow\", [\n        \"clip\", // shorthand for clip-end\n        \"ellipsis\", // \u2026 ellipsis-end\n        \"clip-start\",\n        \"clip-end\",\n        \"ellipsis-start\",\n        \"ellipsis-middle\",\n        \"ellipsis-end\"\n      ]).replace(/^(clip|ellipsis)$/, \"$1-end\");\n}\n\nfunction applyMultilineText(selection, mark, T, TL) {\n  if (!T) return;\n  const {lineAnchor, lineHeight, textOverflow, splitLines, clipLine} = mark;\n  selection.each(function (i) {\n    const lines = splitLines(formatDefault(T[i]) ?? \"\").map(clipLine);\n    const n = lines.length;\n    const y = lineAnchor === \"top\" ? 0.71 : lineAnchor === \"bottom\" ? 1 - n : (164 - n * 100) / 200;\n    if (n > 1) {\n      let m = 0;\n      for (let i = 0; i < n; ++i) {\n        ++m;\n        if (!lines[i]) continue;\n        const tspan = this.ownerDocument.createElementNS(namespaces.svg, \"tspan\");\n        tspan.setAttribute(\"x\", 0);\n        if (i === m - 1) tspan.setAttribute(\"y\", `${(y + i) * lineHeight}em`);\n        else tspan.setAttribute(\"dy\", `${m * lineHeight}em`);\n        tspan.textContent = lines[i];\n        this.appendChild(tspan);\n        m = 0;\n      }\n    } else {\n      if (y) this.setAttribute(\"y\", `${y * lineHeight}em`);\n      this.textContent = lines[0];\n    }\n    if (textOverflow && !TL && lines[0] !== T[i]) {\n      const title = this.ownerDocument.createElementNS(namespaces.svg, \"title\");\n      title.textContent = T[i];\n      this.appendChild(title);\n    }\n  });\n}\n\nexport function text(data, {x, y, ...options} = {}) {\n  if (options.frameAnchor === undefined) [x, y] = maybeTuple(x, y);\n  return new Text(data, {...options, x, y});\n}\n\nexport function textX(data, {x = identity, ...options} = {}) {\n  return new Text(data, maybeIntervalMidY({...options, x}));\n}\n\nexport function textY(data, {y = identity, ...options} = {}) {\n  return new Text(data, maybeIntervalMidX({...options, y}));\n}\n\nexport function applyIndirectTextStyles(selection, mark, T) {\n  applyAttr(selection, \"text-anchor\", mark.textAnchor);\n  applyAttr(selection, \"font-family\", mark.fontFamily);\n  applyAttr(selection, \"font-size\", mark.fontSize);\n  applyAttr(selection, \"font-style\", mark.fontStyle);\n  applyAttr(selection, \"font-variant\", mark.fontVariant === undefined ? inferFontVariant(T) : mark.fontVariant);\n  applyAttr(selection, \"font-weight\", mark.fontWeight);\n}\n\nfunction inferFontVariant(T) {\n  return T && (isNumeric(T) || isTemporal(T)) ? \"tabular-nums\" : undefined;\n}\n\n// https://developer.mozilla.org/en-US/docs/Web/CSS/font-size\nconst fontSizes = new Set([\n  // global keywords\n  \"inherit\",\n  \"initial\",\n  \"revert\",\n  \"unset\",\n  // absolute keywords\n  \"xx-small\",\n  \"x-small\",\n  \"small\",\n  \"medium\",\n  \"large\",\n  \"x-large\",\n  \"xx-large\",\n  \"xxx-large\",\n  // relative keywords\n  \"larger\",\n  \"smaller\"\n]);\n\n// The font size may be expressed as a constant in the following forms:\n// - number in pixels\n// - string keyword: see above\n// - string <length>: e.g., \"12px\"\n// - string <percentage>: e.g., \"80%\"\n// Anything else is assumed to be a channel definition.\nfunction maybeFontSizeChannel(fontSize) {\n  if (fontSize == null || typeof fontSize === \"number\") return [undefined, fontSize];\n  if (typeof fontSize !== \"string\") return [fontSize, undefined];\n  fontSize = fontSize.trim().toLowerCase();\n  return fontSizes.has(fontSize) || /^[+-]?\\d*\\.?\\d+(e[+-]?\\d+)?(\\w*|%)$/.test(fontSize)\n    ? [undefined, fontSize]\n    : [fontSize, undefined];\n}\n\n// This is a greedy algorithm for line wrapping. It would be better to use the\n// Knuth\u2013Plass line breaking algorithm (but that would be much more complex).\n// https://en.wikipedia.org/wiki/Line_wrap_and_word_wrap\nfunction lineWrap(input, maxWidth, widthof) {\n  const lines = [];\n  let lineStart,\n    lineEnd = 0;\n  for (const [wordStart, wordEnd, required] of lineBreaks(input)) {\n    // Record the start of a line. This isn\u2019t the same as the previous line\u2019s\n    // end because we often skip spaces between lines.\n    if (lineStart === undefined) lineStart = wordStart;\n\n    // If the current line is not empty, and if adding the current word would\n    // make the line longer than the allowed width, then break the line at the\n    // previous word end.\n    if (lineEnd > lineStart && widthof(input, lineStart, wordEnd) > maxWidth) {\n      lines.push(input.slice(lineStart, lineEnd) + (input[lineEnd - 1] === softHyphen ? \"-\" : \"\"));\n      lineStart = wordStart;\n    }\n\n    // If this is a required break (a newline), emit the line and reset.\n    if (required) {\n      lines.push(input.slice(lineStart, wordEnd));\n      lineStart = undefined;\n      continue;\n    }\n\n    // Extend the current line to include the new word.\n    lineEnd = wordEnd;\n  }\n  return lines;\n}\n\n// This is a rudimentary (and U.S.-centric) algorithm for finding opportunities\n// to break lines between words. A better and far more comprehensive approach\n// would be to use the official Unicode Line Breaking Algorithm.\n// https://unicode.org/reports/tr14/\nfunction* lineBreaks(input) {\n  let i = 0,\n    j = 0;\n  const n = input.length;\n  while (j < n) {\n    let k = 1;\n    switch (input[j]) {\n      case softHyphen:\n      case \"-\": // hyphen\n        ++j;\n        yield [i, j, false];\n        i = j;\n        break;\n      case \" \":\n        yield [i, j, false];\n        while (input[++j] === \" \"); // skip multiple spaces\n        i = j;\n        break;\n      case \"\\r\":\n        if (input[j + 1] === \"\\n\") ++k; // falls through\n      case \"\\n\":\n        yield [i, j, true];\n        j += k;\n        i = j;\n        break;\n      default:\n        ++j;\n        break;\n    }\n  }\n  yield [i, j, true];\n}\n\n// Computed as round(measureText(text).width * 10) at 10px system-ui. For\n// characters that are not represented in this map, we\u2019d ideally want to use a\n// weighted average of what we expect to see. But since we don\u2019t really know\n// what that is, using \u201Ce\u201D seems reasonable.\nconst defaultWidthMap = {\n  a: 56,\n  b: 63,\n  c: 57,\n  d: 63,\n  e: 58,\n  f: 37,\n  g: 62,\n  h: 60,\n  i: 26,\n  j: 26,\n  k: 55,\n  l: 26,\n  m: 88,\n  n: 60,\n  o: 60,\n  p: 62,\n  q: 62,\n  r: 39,\n  s: 54,\n  t: 38,\n  u: 60,\n  v: 55,\n  w: 79,\n  x: 54,\n  y: 55,\n  z: 55,\n  A: 69,\n  B: 67,\n  C: 73,\n  D: 74,\n  E: 61,\n  F: 58,\n  G: 76,\n  H: 75,\n  I: 28,\n  J: 55,\n  K: 67,\n  L: 58,\n  M: 89,\n  N: 75,\n  O: 78,\n  P: 65,\n  Q: 78,\n  R: 67,\n  S: 65,\n  T: 65,\n  U: 75,\n  V: 69,\n  W: 98,\n  X: 69,\n  Y: 67,\n  Z: 67,\n  0: 64,\n  1: 48,\n  2: 62,\n  3: 64,\n  4: 66,\n  5: 63,\n  6: 65,\n  7: 58,\n  8: 65,\n  9: 65,\n  \" \": 29,\n  \"!\": 32,\n  '\"': 49,\n  \"'\": 31,\n  \"(\": 39,\n  \")\": 39,\n  \",\": 31,\n  \"-\": 48,\n  \".\": 31,\n  \"/\": 32,\n  \":\": 31,\n  \";\": 31,\n  \"?\": 52,\n  \"\u2018\": 31,\n  \"\u2019\": 31,\n  \"\u201C\": 47,\n  \"\u201D\": 47,\n  \"\u2026\": 82\n};\n\n// This is a rudimentary (and U.S.-centric) algorithm for measuring the width of\n// a string based on a technique of Gregor Aisch; it assumes that individual\n// characters are laid out independently and does not implement the Unicode\n// grapheme cluster breaking algorithm. It does understand code points, though,\n// and so treats things like emoji as having the width of a lowercase e (and\n// should be equivalent to using for-of to iterate over code points, while also\n// being fast). TODO Optimize this by noting that we often re-measure characters\n// that were previously measured?\n// http://www.unicode.org/reports/tr29/#Grapheme_Cluster_Boundaries\n// https://exploringjs.com/impatient-js/ch_strings.html#atoms-of-text\nexport function defaultWidth(text, start = 0, end = text.length) {\n  let sum = 0;\n  for (let i = start; i < end; i = readCharacter(text, i)) {\n    sum += defaultWidthMap[text[i]] ?? (isPictographic(text, i) ? 120 : defaultWidthMap.e);\n  }\n  return sum;\n}\n\n// Even for monospaced text, we can\u2019t assume that the number of UTF-16 code\n// points (i.e., the length of a string) corresponds to the number of visible\n// characters; we still have to count graphemes. And note that pictographic\n// characters such as emojis are typically not monospaced!\nexport function monospaceWidth(text, start = 0, end = text.length) {\n  let sum = 0;\n  for (let i = start; i < end; i = readCharacter(text, i)) {\n    sum += isPictographic(text, i) ? 200 : 100;\n  }\n  return sum;\n}\n\nexport function splitter({monospace, lineWidth, textOverflow}) {\n  if (textOverflow != null || lineWidth == Infinity) return (text) => text.split(/\\r\\n?|\\n/g);\n  const widthof = monospace ? monospaceWidth : defaultWidth;\n  const maxWidth = lineWidth * 100;\n  return (text) => lineWrap(text, maxWidth, widthof);\n}\n\nexport function clipper({monospace, lineWidth, textOverflow}) {\n  if (textOverflow == null || lineWidth == Infinity) return (text) => text;\n  const widthof = monospace ? monospaceWidth : defaultWidth;\n  const maxWidth = lineWidth * 100;\n  switch (textOverflow) {\n    case \"clip-start\":\n      return (text) => clipStart(text, maxWidth, widthof, \"\");\n    case \"clip-end\":\n      return (text) => clipEnd(text, maxWidth, widthof, \"\");\n    case \"ellipsis-start\":\n      return (text) => clipStart(text, maxWidth, widthof, ellipsis);\n    case \"ellipsis-middle\":\n      return (text) => clipMiddle(text, maxWidth, widthof, ellipsis);\n    case \"ellipsis-end\":\n      return (text) => clipEnd(text, maxWidth, widthof, ellipsis);\n  }\n}\n\nexport const ellipsis = \"\u2026\";\n\n// Cuts the given text to the given width, using the specified widthof function;\n// the returned [index, error] guarantees text.slice(0, index) fits within the\n// specified width with the given error. If the text fits naturally within the\n// given width, returns [-1, 0]. If the text needs cutting, the given inset\n// specifies how much space (in the same units as width and widthof) to reserve\n// for a possible ellipsis character.\nexport function cut(text, width, widthof, inset) {\n  const I = []; // indexes of read character boundaries\n  let w = 0; // current line width\n  for (let i = 0, j = 0, n = text.length; i < n; i = j) {\n    j = readCharacter(text, i); // read the next character\n    const l = widthof(text, i, j); // current character width\n    if (w + l > width) {\n      w += inset;\n      while (w > width && i > 0) (j = i), (i = I.pop()), (w -= widthof(text, i, j)); // remove excess\n      return [i, width - w];\n    }\n    w += l;\n    I.push(i);\n  }\n  return [-1, 0];\n}\n\nexport function clipEnd(text, width, widthof, ellipsis) {\n  text = text.trim(); // ignore leading and trailing whitespace\n  const e = widthof(ellipsis);\n  const [i] = cut(text, width, widthof, e);\n  return i < 0 ? text : text.slice(0, i).trimEnd() + ellipsis;\n}\n\nexport function clipMiddle(text, width, widthof, ellipsis) {\n  text = text.trim(); // ignore leading and trailing whitespace\n  const w = widthof(text);\n  if (w <= width) return text;\n  const e = widthof(ellipsis) / 2;\n  const [i, ei] = cut(text, width / 2, widthof, e);\n  const [j] = cut(text, w - width / 2 - ei + e, widthof, -e); // TODO read spaces?\n  return j < 0 ? ellipsis : text.slice(0, i).trimEnd() + ellipsis + text.slice(readCharacter(text, j)).trimStart();\n}\n\nexport function clipStart(text, width, widthof, ellipsis) {\n  text = text.trim(); // ignore leading and trailing whitespace\n  const w = widthof(text);\n  if (w <= width) return text;\n  const e = widthof(ellipsis);\n  const [j] = cut(text, w - width + e, widthof, -e); // TODO read spaces?\n  return j < 0 ? ellipsis : ellipsis + text.slice(readCharacter(text, j)).trimStart();\n}\n\nconst reCombiner = /[\\p{Combining_Mark}\\p{Emoji_Modifier}]+/uy;\nconst rePictographic = /\\p{Extended_Pictographic}/uy;\n\n// Reads a single \u201Ccharacter\u201D element from the given text starting at the given\n// index, returning the index after the read character. Ideally, this implements\n// the Unicode text segmentation algorithm and understands grapheme cluster\n// boundaries, etc., but in practice this is only smart enough to detect UTF-16\n// surrogate pairs, combining marks, and zero-width joiner (zwj) sequences such\n// as emoji skin color modifiers. https://unicode.org/reports/tr29/\nexport function readCharacter(text, i) {\n  i += isSurrogatePair(text, i) ? 2 : 1;\n  if (isCombiner(text, i)) i = reCombiner.lastIndex;\n  if (isZeroWidthJoiner(text, i)) return readCharacter(text, i + 1);\n  return i;\n}\n\n// We avoid more expensive regex tests involving Unicode property classes by\n// first checking for the common case of 7-bit ASCII characters.\nfunction isAscii(text, i) {\n  return text.charCodeAt(i) < 0x80;\n}\n\nfunction isSurrogatePair(text, i) {\n  const hi = text.charCodeAt(i);\n  if (hi >= 0xd800 && hi < 0xdc00) {\n    const lo = text.charCodeAt(i + 1);\n    return lo >= 0xdc00 && lo < 0xe000;\n  }\n  return false;\n}\n\nfunction isZeroWidthJoiner(text, i) {\n  return text.charCodeAt(i) === 0x200d;\n}\n\nfunction isCombiner(text, i) {\n  return isAscii(text, i) ? false : ((reCombiner.lastIndex = i), reCombiner.test(text));\n}\n\nfunction isPictographic(text, i) {\n  return isAscii(text, i) ? false : ((rePictographic.lastIndex = i), rePictographic.test(text));\n}\n", "import {pathRound as path} from \"d3\";\nimport {create} from \"../context.js\";\nimport {Mark} from \"../mark.js\";\nimport {maybeFrameAnchor, maybeNumberChannel, maybeTuple, keyword, identity} from \"../options.js\";\nimport {\n  applyChannelStyles,\n  applyDirectStyles,\n  applyFrameAnchor,\n  applyIndirectStyles,\n  applyTransform\n} from \"../style.js\";\nimport {template} from \"../template.js\";\n\nconst defaults = {\n  ariaLabel: \"vector\",\n  fill: \"none\",\n  stroke: \"currentColor\",\n  strokeWidth: 1.5,\n  strokeLinejoin: \"round\",\n  strokeLinecap: \"round\"\n};\n\nconst defaultRadius = 3.5;\n\n// The size of the arrowhead is proportional to its length, but we still allow\n// the relative size of the head to be controlled via the mark\u2019s width option;\n// doubling the default radius will produce an arrowhead that is twice as big.\n// That said, we\u2019ll probably want a arrow with a fixed head size, too.\nconst wingRatio = defaultRadius * 5;\n\nconst shapeArrow = {\n  draw(context, l, r) {\n    const wing = (l * r) / wingRatio;\n    context.moveTo(0, 0);\n    context.lineTo(0, -l);\n    context.moveTo(-wing, wing - l);\n    context.lineTo(0, -l);\n    context.lineTo(wing, wing - l);\n  }\n};\n\nconst shapeSpike = {\n  draw(context, l, r) {\n    context.moveTo(-r, 0);\n    context.lineTo(0, -l);\n    context.lineTo(r, 0);\n  }\n};\n\nconst shapes = new Map([\n  [\"arrow\", shapeArrow],\n  [\"spike\", shapeSpike]\n]);\n\nfunction isShapeObject(value) {\n  return value && typeof value.draw === \"function\";\n}\n\nfunction maybeShape(shape) {\n  if (isShapeObject(shape)) return shape;\n  const value = shapes.get(`${shape}`.toLowerCase());\n  if (value) return value;\n  throw new Error(`invalid shape: ${shape}`);\n}\n\nexport class Vector extends Mark {\n  constructor(data, options = {}) {\n    const {x, y, r = defaultRadius, length, rotate, shape = shapeArrow, anchor = \"middle\", frameAnchor} = options;\n    const [vl, cl] = maybeNumberChannel(length, 12);\n    const [vr, cr] = maybeNumberChannel(rotate, 0);\n    super(\n      data,\n      {\n        x: {value: x, scale: \"x\", optional: true},\n        y: {value: y, scale: \"y\", optional: true},\n        length: {value: vl, scale: \"length\", optional: true},\n        rotate: {value: vr, optional: true}\n      },\n      options,\n      defaults\n    );\n    this.r = +r;\n    this.length = cl;\n    this.rotate = cr;\n    this.shape = maybeShape(shape);\n    this.anchor = keyword(anchor, \"anchor\", [\"start\", \"middle\", \"end\"]);\n    this.frameAnchor = maybeFrameAnchor(frameAnchor);\n  }\n  render(index, scales, channels, dimensions, context) {\n    const {x, y} = scales;\n    const {x: X, y: Y, length: L, rotate: A} = channels;\n    const {length, rotate, anchor, shape, r} = this;\n    const [cx, cy] = applyFrameAnchor(this, dimensions);\n    return create(\"svg:g\", context)\n      .call(applyIndirectStyles, this, dimensions, context)\n      .call(applyTransform, this, {x: X && x, y: Y && y})\n      .call((g) =>\n        g\n          .selectAll()\n          .data(index)\n          .enter()\n          .append(\"path\")\n          .call(applyDirectStyles, this)\n          .attr(\n            \"transform\",\n            template`translate(${X ? (i) => X[i] : cx},${Y ? (i) => Y[i] : cy})${\n              A ? (i) => ` rotate(${A[i]})` : rotate ? ` rotate(${rotate})` : ``\n            }${\n              anchor === \"start\"\n                ? ``\n                : anchor === \"end\"\n                ? L\n                  ? (i) => ` translate(0,${L[i]})`\n                  : ` translate(0,${length})`\n                : L\n                ? (i) => ` translate(0,${L[i] / 2})`\n                : ` translate(0,${length / 2})`\n            }`\n          )\n          .attr(\n            \"d\",\n            L\n              ? (i) => {\n                  const p = path();\n                  shape.draw(p, L[i], r);\n                  return p;\n                }\n              : (() => {\n                  const p = path();\n                  shape.draw(p, length, r);\n                  return p;\n                })()\n          )\n          .call(applyChannelStyles, this, channels)\n      )\n      .node();\n  }\n}\n\nexport function vector(data, options = {}) {\n  let {x, y, ...rest} = options;\n  if (options.frameAnchor === undefined) [x, y] = maybeTuple(x, y);\n  return new Vector(data, {...rest, x, y});\n}\n\nexport function vectorX(data, options = {}) {\n  const {x = identity, ...rest} = options;\n  return new Vector(data, {...rest, x});\n}\n\nexport function vectorY(data, options = {}) {\n  const {y = identity, ...rest} = options;\n  return new Vector(data, {...rest, y});\n}\n\nexport function spike(data, options = {}) {\n  const {\n    shape = shapeSpike,\n    stroke = defaults.stroke,\n    strokeWidth = 1,\n    fill = stroke,\n    fillOpacity = 0.3,\n    anchor = \"start\",\n    ...rest\n  } = options;\n  return vector(data, {...rest, shape, stroke, strokeWidth, fill, fillOpacity, anchor});\n}\n", "import {extent, format, timeFormat, utcFormat} from \"d3\";\nimport {formatDefault} from \"../format.js\";\nimport {marks} from \"../mark.js\";\nimport {radians} from \"../math.js\";\nimport {arrayify, constant, identity, keyword, number, range, valueof} from \"../options.js\";\nimport {isIterable, isNoneish, isTemporal, orderof} from \"../options.js\";\nimport {maybeColorChannel, maybeNumberChannel, maybeRangeInterval} from \"../options.js\";\nimport {isTemporalScale} from \"../scales.js\";\nimport {offset} from \"../style.js\";\nimport {formatTimeTicks, isTimeYear, isUtcYear} from \"../time.js\";\nimport {initializer} from \"../transforms/basic.js\";\nimport {ruleX, ruleY} from \"./rule.js\";\nimport {text, textX, textY} from \"./text.js\";\nimport {vectorX, vectorY} from \"./vector.js\";\n\nfunction maybeData(data, options) {\n  if (arguments.length < 2 && !isIterable(data)) (options = data), (data = null);\n  if (options === undefined) options = {};\n  return [data, options];\n}\n\nfunction maybeAnchor({anchor} = {}, anchors) {\n  return anchor === undefined ? anchors[0] : keyword(anchor, \"anchor\", anchors);\n}\n\nfunction anchorY(options) {\n  return maybeAnchor(options, [\"left\", \"right\"]);\n}\n\nfunction anchorFy(options) {\n  return maybeAnchor(options, [\"right\", \"left\"]);\n}\n\nfunction anchorX(options) {\n  return maybeAnchor(options, [\"bottom\", \"top\"]);\n}\n\nfunction anchorFx(options) {\n  return maybeAnchor(options, [\"top\", \"bottom\"]);\n}\n\nexport function axisY() {\n  const [data, options] = maybeData(...arguments);\n  return axisKy(\"y\", anchorY(options), data, options);\n}\n\nexport function axisFy() {\n  const [data, options] = maybeData(...arguments);\n  return axisKy(\"fy\", anchorFy(options), data, options);\n}\n\nexport function axisX() {\n  const [data, options] = maybeData(...arguments);\n  return axisKx(\"x\", anchorX(options), data, options);\n}\n\nexport function axisFx() {\n  const [data, options] = maybeData(...arguments);\n  return axisKx(\"fx\", anchorFx(options), data, options);\n}\n\nfunction axisKy(\n  k,\n  anchor,\n  data,\n  {\n    color = \"currentColor\",\n    opacity = 1,\n    stroke = color,\n    strokeOpacity = opacity,\n    strokeWidth = 1,\n    fill = color,\n    fillOpacity = opacity,\n    textAnchor,\n    textStroke,\n    textStrokeOpacity,\n    textStrokeWidth,\n    tickSize = k === \"y\" ? 6 : 0,\n    tickPadding,\n    tickRotate,\n    x,\n    margin,\n    marginTop = margin === undefined ? 20 : margin,\n    marginRight = margin === undefined ? (anchor === \"right\" ? 40 : 0) : margin,\n    marginBottom = margin === undefined ? 20 : margin,\n    marginLeft = margin === undefined ? (anchor === \"left\" ? 40 : 0) : margin,\n    label,\n    labelAnchor,\n    labelArrow,\n    labelOffset,\n    ...options\n  }\n) {\n  tickSize = number(tickSize);\n  tickPadding = number(tickPadding);\n  tickRotate = number(tickRotate);\n  if (labelAnchor !== undefined) labelAnchor = keyword(labelAnchor, \"labelAnchor\", [\"center\", \"top\", \"bottom\"]);\n  labelArrow = maybeLabelArrow(labelArrow);\n  return marks(\n    tickSize && !isNoneish(stroke)\n      ? axisTickKy(k, anchor, data, {\n          stroke,\n          strokeOpacity,\n          strokeWidth,\n          tickSize,\n          tickPadding,\n          tickRotate,\n          x,\n          ...options\n        })\n      : null,\n    !isNoneish(fill)\n      ? axisTextKy(k, anchor, data, {\n          fill,\n          fillOpacity,\n          stroke: textStroke,\n          strokeOpacity: textStrokeOpacity,\n          strokeWidth: textStrokeWidth,\n          textAnchor,\n          tickSize,\n          tickPadding,\n          tickRotate,\n          x,\n          marginTop,\n          marginRight,\n          marginBottom,\n          marginLeft,\n          ...options\n        })\n      : null,\n    !isNoneish(fill) && label !== null\n      ? text(\n          [],\n          labelOptions({fill, fillOpacity, ...options}, function (data, facets, channels, scales, dimensions) {\n            const scale = scales[k];\n            const {marginTop, marginRight, marginBottom, marginLeft} = (k === \"y\" && dimensions.inset) || dimensions;\n            const cla = labelAnchor ?? (scale.bandwidth ? \"center\" : \"top\");\n            const clo = labelOffset ?? (anchor === \"right\" ? marginRight : marginLeft) - 3;\n            if (cla === \"center\") {\n              this.textAnchor = undefined; // middle\n              this.lineAnchor = anchor === \"right\" ? \"bottom\" : \"top\";\n              this.frameAnchor = anchor;\n              this.rotate = -90;\n            } else {\n              this.textAnchor = anchor === \"right\" ? \"end\" : \"start\";\n              this.lineAnchor = cla;\n              this.frameAnchor = `${cla}-${anchor}`;\n              this.rotate = 0;\n            }\n            this.dy = cla === \"top\" ? 3 - marginTop : cla === \"bottom\" ? marginBottom - 3 : 0;\n            this.dx = anchor === \"right\" ? clo : -clo;\n            this.ariaLabel = `${k}-axis label`;\n            return {\n              facets: [[0]],\n              channels: {text: {value: [formatAxisLabel(k, scale, {anchor, label, labelAnchor: cla, labelArrow})]}}\n            };\n          })\n        )\n      : null\n  );\n}\n\nfunction axisKx(\n  k,\n  anchor,\n  data,\n  {\n    color = \"currentColor\",\n    opacity = 1,\n    stroke = color,\n    strokeOpacity = opacity,\n    strokeWidth = 1,\n    fill = color,\n    fillOpacity = opacity,\n    textAnchor,\n    textStroke,\n    textStrokeOpacity,\n    textStrokeWidth,\n    tickSize = k === \"x\" ? 6 : 0,\n    tickPadding,\n    tickRotate,\n    y,\n    margin,\n    marginTop = margin === undefined ? (anchor === \"top\" ? 30 : 0) : margin,\n    marginRight = margin === undefined ? 20 : margin,\n    marginBottom = margin === undefined ? (anchor === \"bottom\" ? 30 : 0) : margin,\n    marginLeft = margin === undefined ? 20 : margin,\n    label,\n    labelAnchor,\n    labelArrow,\n    labelOffset,\n    ...options\n  }\n) {\n  tickSize = number(tickSize);\n  tickPadding = number(tickPadding);\n  tickRotate = number(tickRotate);\n  if (labelAnchor !== undefined) labelAnchor = keyword(labelAnchor, \"labelAnchor\", [\"center\", \"left\", \"right\"]);\n  labelArrow = maybeLabelArrow(labelArrow);\n  return marks(\n    tickSize && !isNoneish(stroke)\n      ? axisTickKx(k, anchor, data, {\n          stroke,\n          strokeOpacity,\n          strokeWidth,\n          tickSize,\n          tickPadding,\n          tickRotate,\n          y,\n          ...options\n        })\n      : null,\n    !isNoneish(fill)\n      ? axisTextKx(k, anchor, data, {\n          fill,\n          fillOpacity,\n          stroke: textStroke,\n          strokeOpacity: textStrokeOpacity,\n          strokeWidth: textStrokeWidth,\n          textAnchor,\n          tickSize,\n          tickPadding,\n          tickRotate,\n          y,\n          marginTop,\n          marginRight,\n          marginBottom,\n          marginLeft,\n          ...options\n        })\n      : null,\n    !isNoneish(fill) && label !== null\n      ? text(\n          [],\n          labelOptions({fill, fillOpacity, ...options}, function (data, facets, channels, scales, dimensions) {\n            const scale = scales[k];\n            const {marginTop, marginRight, marginBottom, marginLeft} = (k === \"x\" && dimensions.inset) || dimensions;\n            const cla = labelAnchor ?? (scale.bandwidth ? \"center\" : \"right\");\n            const clo = labelOffset ?? (anchor === \"top\" ? marginTop : marginBottom) - 3;\n            if (cla === \"center\") {\n              this.frameAnchor = anchor;\n              this.textAnchor = undefined; // middle\n            } else {\n              this.frameAnchor = `${anchor}-${cla}`;\n              this.textAnchor = cla === \"right\" ? \"end\" : \"start\";\n            }\n            this.lineAnchor = anchor;\n            this.dy = anchor === \"top\" ? -clo : clo;\n            this.dx = cla === \"right\" ? marginRight - 3 : cla === \"left\" ? 3 - marginLeft : 0;\n            this.ariaLabel = `${k}-axis label`;\n            return {\n              facets: [[0]],\n              channels: {text: {value: [formatAxisLabel(k, scale, {anchor, label, labelAnchor: cla, labelArrow})]}}\n            };\n          })\n        )\n      : null\n  );\n}\n\nfunction axisTickKy(\n  k,\n  anchor,\n  data,\n  {\n    strokeWidth = 1,\n    strokeLinecap = null,\n    strokeLinejoin = null,\n    facetAnchor = anchor + (k === \"y\" ? \"-empty\" : \"\"),\n    frameAnchor = anchor,\n    tickSize,\n    inset = 0,\n    insetLeft = inset,\n    insetRight = inset,\n    dx = 0,\n    y = k === \"y\" ? undefined : null,\n    ...options\n  }\n) {\n  return axisMark(vectorY, k, `${k}-axis tick`, data, {\n    strokeWidth,\n    strokeLinecap,\n    strokeLinejoin,\n    facetAnchor,\n    frameAnchor,\n    y,\n    ...options,\n    dx: anchor === \"left\" ? +dx - offset + +insetLeft : +dx + offset - insetRight,\n    anchor: \"start\",\n    length: tickSize,\n    shape: anchor === \"left\" ? shapeTickLeft : shapeTickRight\n  });\n}\n\nfunction axisTickKx(\n  k,\n  anchor,\n  data,\n  {\n    strokeWidth = 1,\n    strokeLinecap = null,\n    strokeLinejoin = null,\n    facetAnchor = anchor + (k === \"x\" ? \"-empty\" : \"\"),\n    frameAnchor = anchor,\n    tickSize,\n    inset = 0,\n    insetTop = inset,\n    insetBottom = inset,\n    dy = 0,\n    x = k === \"x\" ? undefined : null,\n    ...options\n  }\n) {\n  return axisMark(vectorX, k, `${k}-axis tick`, data, {\n    strokeWidth,\n    strokeLinejoin,\n    strokeLinecap,\n    facetAnchor,\n    frameAnchor,\n    x,\n    ...options,\n    dy: anchor === \"bottom\" ? +dy - offset - insetBottom : +dy + offset + +insetTop,\n    anchor: \"start\",\n    length: tickSize,\n    shape: anchor === \"bottom\" ? shapeTickBottom : shapeTickTop\n  });\n}\n\nfunction axisTextKy(\n  k,\n  anchor,\n  data,\n  {\n    facetAnchor = anchor + (k === \"y\" ? \"-empty\" : \"\"),\n    frameAnchor = anchor,\n    tickSize,\n    tickRotate = 0,\n    tickPadding = Math.max(3, 9 - tickSize) + (Math.abs(tickRotate) > 60 ? 4 * Math.cos(tickRotate * radians) : 0),\n    tickFormat,\n    text = typeof tickFormat === \"function\" ? tickFormat : undefined,\n    textAnchor = Math.abs(tickRotate) > 60 ? \"middle\" : anchor === \"left\" ? \"end\" : \"start\",\n    lineAnchor = tickRotate > 60 ? \"top\" : tickRotate < -60 ? \"bottom\" : \"middle\",\n    fontVariant,\n    inset = 0,\n    insetLeft = inset,\n    insetRight = inset,\n    dx = 0,\n    y = k === \"y\" ? undefined : null,\n    ...options\n  }\n) {\n  return axisMark(\n    textY,\n    k,\n    `${k}-axis tick label`,\n    data,\n    {\n      facetAnchor,\n      frameAnchor,\n      text: text === undefined ? null : text,\n      textAnchor,\n      lineAnchor,\n      fontVariant,\n      rotate: tickRotate,\n      y,\n      ...options,\n      dx: anchor === \"left\" ? +dx - tickSize - tickPadding + +insetLeft : +dx + +tickSize + +tickPadding - insetRight\n    },\n    function (scale, data, ticks, channels) {\n      if (fontVariant === undefined) this.fontVariant = inferFontVariant(scale);\n      if (text === undefined) channels.text = inferTextChannel(scale, data, ticks, tickFormat, anchor);\n    }\n  );\n}\n\nfunction axisTextKx(\n  k,\n  anchor,\n  data,\n  {\n    facetAnchor = anchor + (k === \"x\" ? \"-empty\" : \"\"),\n    frameAnchor = anchor,\n    tickSize,\n    tickRotate = 0,\n    tickPadding = Math.max(3, 9 - tickSize) + (Math.abs(tickRotate) >= 10 ? 4 * Math.cos(tickRotate * radians) : 0),\n    tickFormat,\n    text = typeof tickFormat === \"function\" ? tickFormat : undefined,\n    textAnchor = Math.abs(tickRotate) >= 10 ? ((tickRotate < 0) ^ (anchor === \"bottom\") ? \"start\" : \"end\") : \"middle\",\n    lineAnchor = Math.abs(tickRotate) >= 10 ? \"middle\" : anchor === \"bottom\" ? \"top\" : \"bottom\",\n    fontVariant,\n    inset = 0,\n    insetTop = inset,\n    insetBottom = inset,\n    dy = 0,\n    x = k === \"x\" ? undefined : null,\n    ...options\n  }\n) {\n  return axisMark(\n    textX,\n    k,\n    `${k}-axis tick label`,\n    data,\n    {\n      facetAnchor,\n      frameAnchor,\n      text: text === undefined ? null : text,\n      textAnchor,\n      lineAnchor,\n      fontVariant,\n      rotate: tickRotate,\n      x,\n      ...options,\n      dy: anchor === \"bottom\" ? +dy + +tickSize + +tickPadding - insetBottom : +dy - tickSize - tickPadding + +insetTop\n    },\n    function (scale, data, ticks, channels) {\n      if (fontVariant === undefined) this.fontVariant = inferFontVariant(scale);\n      if (text === undefined) channels.text = inferTextChannel(scale, data, ticks, tickFormat, anchor);\n    }\n  );\n}\n\nexport function gridY() {\n  const [data, options] = maybeData(...arguments);\n  return gridKy(\"y\", anchorY(options), data, options);\n}\n\nexport function gridFy() {\n  const [data, options] = maybeData(...arguments);\n  return gridKy(\"fy\", anchorFy(options), data, options);\n}\n\nexport function gridX() {\n  const [data, options] = maybeData(...arguments);\n  return gridKx(\"x\", anchorX(options), data, options);\n}\n\nexport function gridFx() {\n  const [data, options] = maybeData(...arguments);\n  return gridKx(\"fx\", anchorFx(options), data, options);\n}\n\nfunction gridKy(\n  k,\n  anchor,\n  data,\n  {\n    y = k === \"y\" ? undefined : null,\n    x = null,\n    x1 = anchor === \"left\" ? x : null,\n    x2 = anchor === \"right\" ? x : null,\n    ...options\n  }\n) {\n  return axisMark(ruleY, k, `${k}-grid`, data, {y, x1, x2, ...gridDefaults(options)});\n}\n\nfunction gridKx(\n  k,\n  anchor,\n  data,\n  {\n    x = k === \"x\" ? undefined : null,\n    y = null,\n    y1 = anchor === \"top\" ? y : null,\n    y2 = anchor === \"bottom\" ? y : null,\n    ...options\n  }\n) {\n  return axisMark(ruleX, k, `${k}-grid`, data, {x, y1, y2, ...gridDefaults(options)});\n}\n\nfunction gridDefaults({\n  color = \"currentColor\",\n  opacity = 0.1,\n  stroke = color,\n  strokeOpacity = opacity,\n  strokeWidth = 1,\n  ...options\n}) {\n  return {stroke, strokeOpacity, strokeWidth, ...options};\n}\n\nfunction labelOptions(\n  {fill, fillOpacity, fontFamily, fontSize, fontStyle, fontWeight, monospace, pointerEvents, shapeRendering},\n  initializer\n) {\n  // Only propagate these options if constant.\n  [, fill] = maybeColorChannel(fill);\n  [, fillOpacity] = maybeNumberChannel(fillOpacity);\n  return {\n    facet: \"super\",\n    x: null,\n    y: null,\n    fill,\n    fillOpacity,\n    fontFamily,\n    fontSize,\n    fontStyle,\n    fontWeight,\n    monospace,\n    pointerEvents,\n    shapeRendering,\n    initializer\n  };\n}\n\nfunction axisMark(mark, k, ariaLabel, data, options, initialize) {\n  let channels;\n\n  function axisInitializer(data, facets, _channels, scales, dimensions, context) {\n    const initializeFacets = data == null && (k === \"fx\" || k === \"fy\");\n    const {[k]: scale} = scales;\n    if (!scale) throw new Error(`missing scale: ${k}`);\n    let {ticks, tickSpacing, interval} = options;\n    if (isTemporalScale(scale) && typeof ticks === \"string\") (interval = ticks), (ticks = undefined);\n    if (data == null) {\n      if (isIterable(ticks)) {\n        data = arrayify(ticks);\n      } else if (scale.ticks) {\n        if (ticks !== undefined) {\n          data = scale.ticks(ticks);\n        } else {\n          interval = maybeRangeInterval(interval === undefined ? scale.interval : interval, scale.type);\n          if (interval !== undefined) {\n            // For time scales, we could pass the interval directly to\n            // scale.ticks because it\u2019s supported by d3.utcTicks; but\n            // quantitative scales and d3.ticks do not support numeric\n            // intervals for scale.ticks, so we compute them here.\n            const [min, max] = extent(scale.domain());\n            data = interval.range(min, interval.offset(interval.floor(max))); // inclusive max\n          } else {\n            const [min, max] = extent(scale.range());\n            ticks = (max - min) / (tickSpacing === undefined ? (k === \"x\" ? 80 : 35) : tickSpacing);\n            data = scale.ticks(ticks);\n          }\n        }\n      } else {\n        data = scale.domain();\n      }\n      if (k === \"y\" || k === \"x\") {\n        facets = [range(data)];\n      } else {\n        channels[k] = {scale: k, value: identity};\n      }\n    }\n    initialize?.call(this, scale, data, ticks, channels);\n    const initializedChannels = Object.fromEntries(\n      Object.entries(channels).map(([name, channel]) => {\n        return [name, {...channel, value: valueof(data, channel.value)}];\n      })\n    );\n    if (initializeFacets) facets = context.filterFacets(data, initializedChannels);\n    return {data, facets, channels: initializedChannels};\n  }\n\n  // Apply any basic initializers after the axis initializer computes the ticks.\n  const basicInitializer = initializer(options).initializer;\n  const m = mark(data, initializer({...options, initializer: axisInitializer}, basicInitializer));\n  if (data == null) {\n    channels = m.channels;\n    m.channels = {};\n  } else {\n    channels = {};\n  }\n  m.ariaLabel = ariaLabel;\n  return m;\n}\n\nfunction inferTextChannel(scale, data, ticks, tickFormat, anchor) {\n  return {value: inferTickFormat(scale, data, ticks, tickFormat, anchor)};\n}\n\n// D3\u2019s ordinal scales simply use toString by default, but if the ordinal scale\n// domain (or ticks) are numbers or dates (say because we\u2019re applying a time\n// interval to the ordinal scale), we want Plot\u2019s default formatter.\nexport function inferTickFormat(scale, data, ticks, tickFormat, anchor) {\n  return tickFormat === undefined && isTemporalScale(scale)\n    ? formatTimeTicks(scale, data, ticks, anchor)\n    : scale.tickFormat\n    ? scale.tickFormat(isIterable(ticks) ? null : ticks, tickFormat)\n    : tickFormat === undefined\n    ? isUtcYear(scale.interval)\n      ? utcFormat(\"%Y\")\n      : isTimeYear(scale.interval)\n      ? timeFormat(\"%Y\")\n      : formatDefault\n    : typeof tickFormat === \"string\"\n    ? (isTemporal(scale.domain()) ? utcFormat : format)(tickFormat)\n    : constant(tickFormat);\n}\n\nconst shapeTickBottom = {\n  draw(context, l) {\n    context.moveTo(0, 0);\n    context.lineTo(0, l);\n  }\n};\n\nconst shapeTickTop = {\n  draw(context, l) {\n    context.moveTo(0, 0);\n    context.lineTo(0, -l);\n  }\n};\n\nconst shapeTickLeft = {\n  draw(context, l) {\n    context.moveTo(0, 0);\n    context.lineTo(-l, 0);\n  }\n};\n\nconst shapeTickRight = {\n  draw(context, l) {\n    context.moveTo(0, 0);\n    context.lineTo(l, 0);\n  }\n};\n\n// TODO Unify this with the other inferFontVariant; here we only have a scale\n// function rather than a scale descriptor.\nfunction inferFontVariant(scale) {\n  return scale.bandwidth && !scale.interval ? undefined : \"tabular-nums\";\n}\n\n// Determines whether the scale points in the \u201Cpositive\u201D (right or down) or\n// \u201Cnegative\u201D (left or up) direction; if the scale order cannot be determined,\n// returns NaN; used to assign an appropriate label arrow.\nfunction inferScaleOrder(scale) {\n  return Math.sign(orderof(scale.domain())) * Math.sign(orderof(scale.range()));\n}\n\n// Takes the scale label, and if this is not an ordinal scale and the label was\n// inferred from an associated channel, adds an orientation-appropriate arrow.\nfunction formatAxisLabel(k, scale, {anchor, label = scale.label, labelAnchor, labelArrow} = {}) {\n  if (label == null || (label.inferred && isTemporalish(scale) && /^(date|time|year)$/i.test(label))) return;\n  label = String(label); // coerce to a string after checking if inferred\n  if (labelArrow === \"auto\") labelArrow = (!scale.bandwidth || scale.interval) && !/[\u2191\u2193\u2192\u2190]/.test(label);\n  if (!labelArrow) return label;\n  if (labelArrow === true) {\n    const order = inferScaleOrder(scale);\n    if (order)\n      labelArrow =\n        /x$/.test(k) || labelAnchor === \"center\"\n          ? /x$/.test(k) === order < 0\n            ? \"left\"\n            : \"right\"\n          : order < 0\n          ? \"up\"\n          : \"down\";\n  }\n  switch (labelArrow) {\n    case \"left\":\n      return `\u2190 ${label}`;\n    case \"right\":\n      return `${label} \u2192`;\n    case \"up\":\n      return anchor === \"right\" ? `${label} \u2191` : `\u2191 ${label}`;\n    case \"down\":\n      return anchor === \"right\" ? `${label} \u2193` : `\u2193 ${label}`;\n  }\n  return label;\n}\n\nfunction maybeLabelArrow(labelArrow = \"auto\") {\n  return isNoneish(labelArrow)\n    ? false\n    : typeof labelArrow === \"boolean\"\n    ? labelArrow\n    : keyword(labelArrow, \"labelArrow\", [\"auto\", \"up\", \"right\", \"down\", \"left\"]);\n}\n\nfunction isTemporalish(scale) {\n  return isTemporalScale(scale) || scale.interval != null;\n}\n", "import {pathRound as path} from \"d3\";\nimport {inferFontVariant} from \"../axes.js\";\nimport {create, createContext} from \"../context.js\";\nimport {isNoneish, maybeColorChannel, maybeNumberChannel} from \"../options.js\";\nimport {isOrdinalScale, isThresholdScale} from \"../scales.js\";\nimport {applyInlineStyles, impliedString, maybeClassName} from \"../style.js\";\nimport {inferTickFormat} from \"../marks/axis.js\";\n\nfunction maybeScale(scale, key) {\n  if (key == null) return key;\n  const s = scale(key);\n  if (!s) throw new Error(`scale not found: ${key}`);\n  return s;\n}\n\nexport function legendSwatches(color, {opacity, ...options} = {}) {\n  if (!isOrdinalScale(color) && !isThresholdScale(color))\n    throw new Error(`swatches legend requires ordinal or threshold color scale (not ${color.type})`);\n  return legendItems(color, options, (selection, scale, width, height) =>\n    selection\n      .append(\"svg\")\n      .attr(\"width\", width)\n      .attr(\"height\", height)\n      .attr(\"fill\", scale.scale)\n      .attr(\"fill-opacity\", maybeNumberChannel(opacity)[1])\n      .append(\"rect\")\n      .attr(\"width\", \"100%\")\n      .attr(\"height\", \"100%\")\n  );\n}\n\nexport function legendSymbols(\n  symbol,\n  {\n    fill = symbol.hint?.fill !== undefined ? symbol.hint.fill : \"none\",\n    fillOpacity = 1,\n    stroke = symbol.hint?.stroke !== undefined ? symbol.hint.stroke : isNoneish(fill) ? \"currentColor\" : \"none\",\n    strokeOpacity = 1,\n    strokeWidth = 1.5,\n    r = 4.5,\n    ...options\n  } = {},\n  scale\n) {\n  const [vf, cf] = maybeColorChannel(fill);\n  const [vs, cs] = maybeColorChannel(stroke);\n  const sf = maybeScale(scale, vf);\n  const ss = maybeScale(scale, vs);\n  const size = r * r * Math.PI;\n  fillOpacity = maybeNumberChannel(fillOpacity)[1];\n  strokeOpacity = maybeNumberChannel(strokeOpacity)[1];\n  strokeWidth = maybeNumberChannel(strokeWidth)[1];\n  return legendItems(symbol, options, (selection, scale, width, height) =>\n    selection\n      .append(\"svg\")\n      .attr(\"viewBox\", \"-8 -8 16 16\")\n      .attr(\"width\", width)\n      .attr(\"height\", height)\n      .attr(\"fill\", vf === \"color\" ? (d) => sf.scale(d) : cf)\n      .attr(\"fill-opacity\", fillOpacity)\n      .attr(\"stroke\", vs === \"color\" ? (d) => ss.scale(d) : cs)\n      .attr(\"stroke-opacity\", strokeOpacity)\n      .attr(\"stroke-width\", strokeWidth)\n      .append(\"path\")\n      .attr(\"d\", (d) => {\n        const p = path();\n        symbol.scale(d).draw(p, size);\n        return p;\n      })\n  );\n}\n\nfunction legendItems(scale, options = {}, swatch) {\n  let {\n    columns,\n    tickFormat,\n    fontVariant = inferFontVariant(scale),\n    // TODO label,\n    swatchSize = 15,\n    swatchWidth = swatchSize,\n    swatchHeight = swatchSize,\n    marginLeft = 0,\n    className,\n    style,\n    width\n  } = options;\n  const context = createContext(options);\n  className = maybeClassName(className);\n  if (typeof tickFormat !== \"function\") tickFormat = inferTickFormat(scale.scale, scale.domain, undefined, tickFormat);\n\n  const swatches = create(\"div\", context).attr(\n    \"class\",\n    `${className}-swatches ${className}-swatches-${columns != null ? \"columns\" : \"wrap\"}`\n  );\n\n  let extraStyle;\n\n  if (columns != null) {\n    extraStyle = `.${className}-swatches-columns .${className}-swatch {\n  display: flex;\n  align-items: center;\n  break-inside: avoid;\n  padding-bottom: 1px;\n}\n.${className}-swatches-columns .${className}-swatch::before {\n  flex-shrink: 0;\n}\n.${className}-swatches-columns .${className}-swatch-label {\n  white-space: nowrap;\n  overflow: hidden;\n  text-overflow: ellipsis;\n}`;\n\n    swatches\n      .style(\"columns\", columns)\n      .selectAll()\n      .data(scale.domain)\n      .enter()\n      .append(\"div\")\n      .attr(\"class\", `${className}-swatch`)\n      .call(swatch, scale, swatchWidth, swatchHeight)\n      .call((item) =>\n        item.append(\"div\").attr(\"class\", `${className}-swatch-label`).attr(\"title\", tickFormat).text(tickFormat)\n      );\n  } else {\n    extraStyle = `.${className}-swatches-wrap {\n  display: flex;\n  align-items: center;\n  min-height: 33px;\n  flex-wrap: wrap;\n}\n.${className}-swatches-wrap .${className}-swatch {\n  display: inline-flex;\n  align-items: center;\n  margin-right: 1em;\n}`;\n\n    swatches\n      .selectAll()\n      .data(scale.domain)\n      .enter()\n      .append(\"span\")\n      .attr(\"class\", `${className}-swatch`)\n      .call(swatch, scale, swatchWidth, swatchHeight)\n      .append(function () {\n        return this.ownerDocument.createTextNode(tickFormat.apply(this, arguments));\n      });\n  }\n\n  return swatches\n    .call((div) =>\n      div.insert(\"style\", \"*\").text(\n        `.${className}-swatches {\n  font-family: system-ui, sans-serif;\n  font-size: 10px;\n  margin-bottom: 0.5em;\n}\n.${className}-swatch > svg {\n  margin-right: 0.5em;\n  overflow: visible;\n}\n${extraStyle}`\n      )\n    )\n    .style(\"margin-left\", marginLeft ? `${+marginLeft}px` : null)\n    .style(\"width\", width === undefined ? null : `${+width}px`)\n    .style(\"font-variant\", impliedString(fontVariant, \"normal\"))\n    .call(applyInlineStyles, style)\n    .node();\n}\n", "import {rgb} from \"d3\";\nimport {createContext} from \"./context.js\";\nimport {legendRamp} from \"./legends/ramp.js\";\nimport {legendSwatches, legendSymbols} from \"./legends/swatches.js\";\nimport {inherit, isScaleOptions} from \"./options.js\";\nimport {normalizeScale} from \"./scales.js\";\n\nconst legendRegistry = new Map([\n  [\"symbol\", legendSymbols],\n  [\"color\", legendColor],\n  [\"opacity\", legendOpacity]\n]);\n\nexport function legend(options = {}) {\n  for (const [key, value] of legendRegistry) {\n    const scale = options[key];\n    if (isScaleOptions(scale)) {\n      // e.g., ignore {color: \"red\"}\n      const context = createContext(options);\n      let hint;\n      // For symbol legends, pass a hint to the symbol scale.\n      if (key === \"symbol\") {\n        const {fill, stroke = fill === undefined && isScaleOptions(options.color) ? \"color\" : undefined} = options;\n        hint = {fill, stroke};\n      }\n      return value(normalizeScale(key, scale, hint), legendOptions(context, scale, options), (key) =>\n        isScaleOptions(options[key]) ? normalizeScale(key, options[key]) : null\n      );\n    }\n  }\n  throw new Error(\"unknown legend type; no scale found\");\n}\n\nexport function exposeLegends(scales, context, defaults = {}) {\n  return (key, options) => {\n    if (!legendRegistry.has(key)) throw new Error(`unknown legend type: ${key}`);\n    if (!(key in scales)) return;\n    return legendRegistry.get(key)(scales[key], legendOptions(context, defaults[key], options), (key) => scales[key]);\n  };\n}\n\nfunction legendOptions({className, ...context}, {label, ticks, tickFormat} = {}, options) {\n  return inherit(options, {className, ...context}, {label, ticks, tickFormat});\n}\n\nfunction legendColor(color, {legend = true, ...options}) {\n  if (legend === true) legend = color.type === \"ordinal\" ? \"swatches\" : \"ramp\";\n  if (color.domain === undefined) return;\n  switch (`${legend}`.toLowerCase()) {\n    case \"swatches\":\n      return legendSwatches(color, options);\n    case \"ramp\":\n      return legendRamp(color, options);\n    default:\n      throw new Error(`unknown legend type: ${legend}`);\n  }\n}\n\nfunction legendOpacity({type, interpolate, ...scale}, {legend = true, color = rgb(0, 0, 0), ...options}) {\n  if (!interpolate) throw new Error(`${type} opacity scales are not supported`);\n  if (legend === true) legend = \"ramp\";\n  if (`${legend}`.toLowerCase() !== \"ramp\") throw new Error(`${legend} opacity legends are not supported`);\n  return legendColor({type, ...scale, interpolate: interpolateOpacity(color)}, {legend, ...options});\n}\n\nfunction interpolateOpacity(color) {\n  const {r, g, b} = rgb(color) || rgb(0, 0, 0); // treat invalid color as black\n  return (t) => `rgba(${r},${g},${b},${t})`;\n}\n\nexport function createLegends(scales, context, options) {\n  const legends = [];\n  for (const [key, value] of legendRegistry) {\n    const o = options[key];\n    if (o?.legend && key in scales) {\n      const legend = value(scales[key], legendOptions(context, scales[key], o), (key) => scales[key]);\n      if (legend != null) legends.push(legend);\n    }\n  }\n  return legends;\n}\n", "import {create} from \"../context.js\";\nimport {Mark} from \"../mark.js\";\nimport {maybeKeyword, number, singleton} from \"../options.js\";\nimport {applyChannelStyles, applyDirectStyles, applyIndirectStyles, applyTransform} from \"../style.js\";\n\nconst defaults = {\n  ariaLabel: \"frame\",\n  fill: \"none\",\n  stroke: \"currentColor\"\n};\n\nconst lineDefaults = {\n  ariaLabel: \"frame\",\n  fill: null,\n  stroke: \"currentColor\",\n  strokeLinecap: \"square\"\n};\n\nexport class Frame extends Mark {\n  constructor(options = {}) {\n    const {\n      anchor = null,\n      inset = 0,\n      insetTop = inset,\n      insetRight = inset,\n      insetBottom = inset,\n      insetLeft = inset,\n      rx,\n      ry\n    } = options;\n    super(singleton, undefined, options, anchor == null ? defaults : lineDefaults);\n    this.anchor = maybeKeyword(anchor, \"anchor\", [\"top\", \"right\", \"bottom\", \"left\"]);\n    this.insetTop = number(insetTop);\n    this.insetRight = number(insetRight);\n    this.insetBottom = number(insetBottom);\n    this.insetLeft = number(insetLeft);\n    this.rx = number(rx);\n    this.ry = number(ry);\n  }\n  render(index, scales, channels, dimensions, context) {\n    const {marginTop, marginRight, marginBottom, marginLeft, width, height} = dimensions;\n    const {anchor, insetTop, insetRight, insetBottom, insetLeft, rx, ry} = this;\n    const x1 = marginLeft + insetLeft;\n    const x2 = width - marginRight - insetRight;\n    const y1 = marginTop + insetTop;\n    const y2 = height - marginBottom - insetBottom;\n    return create(anchor ? \"svg:line\" : \"svg:rect\", context)\n      .datum(0)\n      .call(applyIndirectStyles, this, dimensions, context)\n      .call(applyDirectStyles, this)\n      .call(applyChannelStyles, this, channels)\n      .call(applyTransform, this, {})\n      .call(\n        anchor === \"left\"\n          ? (line) => line.attr(\"x1\", x1).attr(\"x2\", x1).attr(\"y1\", y1).attr(\"y2\", y2)\n          : anchor === \"right\"\n          ? (line) => line.attr(\"x1\", x2).attr(\"x2\", x2).attr(\"y1\", y1).attr(\"y2\", y2)\n          : anchor === \"top\"\n          ? (line) => line.attr(\"x1\", x1).attr(\"x2\", x2).attr(\"y1\", y1).attr(\"y2\", y1)\n          : anchor === \"bottom\"\n          ? (line) => line.attr(\"x1\", x1).attr(\"x2\", x2).attr(\"y1\", y2).attr(\"y2\", y2)\n          : (rect) =>\n              rect\n                .attr(\"x\", x1)\n                .attr(\"y\", y1)\n                .attr(\"width\", x2 - x1)\n                .attr(\"height\", y2 - y1)\n                .attr(\"rx\", rx)\n                .attr(\"ry\", ry)\n      )\n      .node();\n  }\n}\n\nexport function frame(options) {\n  return new Frame(options);\n}\n", "import {select} from \"d3\";\nimport {getSource} from \"../channel.js\";\nimport {create} from \"../context.js\";\nimport {defined} from \"../defined.js\";\nimport {formatDefault} from \"../format.js\";\nimport {anchorX, anchorY} from \"../interactions/pointer.js\";\nimport {Mark} from \"../mark.js\";\nimport {maybeAnchor, maybeFrameAnchor, maybeTuple, number, string} from \"../options.js\";\nimport {applyDirectStyles, applyFrameAnchor, applyIndirectStyles, applyTransform, impliedString} from \"../style.js\";\nimport {identity, isIterable, isTextual} from \"../options.js\";\nimport {inferTickFormat} from \"./axis.js\";\nimport {applyIndirectTextStyles, defaultWidth, ellipsis, monospaceWidth} from \"./text.js\";\nimport {cut, clipper, splitter, maybeTextOverflow} from \"./text.js\";\n\nconst defaults = {\n  ariaLabel: \"tip\",\n  fill: \"white\",\n  stroke: \"currentColor\"\n};\n\n// These channels are not displayed in the tip; TODO allow customization.\nconst ignoreChannels = new Set([\"geometry\", \"href\", \"src\", \"ariaLabel\"]);\n\nexport class Tip extends Mark {\n  constructor(data, options = {}) {\n    if (options.tip) options = {...options, tip: false};\n    if (options.title === undefined && isIterable(data) && isTextual(data)) options = {...options, title: identity};\n    const {\n      x,\n      y,\n      x1,\n      x2,\n      y1,\n      y2,\n      anchor,\n      monospace,\n      fontFamily = monospace ? \"ui-monospace, monospace\" : undefined,\n      fontSize,\n      fontStyle,\n      fontVariant,\n      fontWeight,\n      lineHeight = 1,\n      lineWidth = 20,\n      frameAnchor,\n      textAnchor = \"start\",\n      textOverflow,\n      textPadding = 8,\n      title,\n      pointerSize = 12,\n      pathFilter = \"drop-shadow(0 3px 4px rgba(0,0,0,0.2))\"\n    } = options;\n    super(\n      data,\n      {\n        x: {value: x1 != null && x2 != null ? null : x, scale: \"x\", optional: true}, // ignore midpoint\n        y: {value: y1 != null && y2 != null ? null : y, scale: \"y\", optional: true}, // ignore midpoint\n        x1: {value: x1, scale: \"x\", optional: x2 == null},\n        y1: {value: y1, scale: \"y\", optional: y2 == null},\n        x2: {value: x2, scale: \"x\", optional: x1 == null},\n        y2: {value: y2, scale: \"y\", optional: y1 == null},\n        title: {value: title, optional: true} // filter: defined\n      },\n      options,\n      defaults\n    );\n    this.anchor = maybeAnchor(anchor, \"anchor\");\n    this.previousAnchor = this.anchor ?? \"top-left\";\n    this.frameAnchor = maybeFrameAnchor(frameAnchor);\n    this.textAnchor = impliedString(textAnchor, \"middle\");\n    this.textPadding = +textPadding;\n    this.pointerSize = +pointerSize;\n    this.pathFilter = string(pathFilter);\n    this.lineHeight = +lineHeight;\n    this.lineWidth = +lineWidth;\n    this.textOverflow = maybeTextOverflow(textOverflow);\n    this.monospace = !!monospace;\n    this.fontFamily = string(fontFamily);\n    this.fontSize = number(fontSize);\n    this.fontStyle = string(fontStyle);\n    this.fontVariant = string(fontVariant);\n    this.fontWeight = string(fontWeight);\n    for (const key in defaults) if (key in this.channels) this[key] = defaults[key]; // apply default even if channel\n    this.splitLines = splitter(this);\n    this.clipLine = clipper(this);\n  }\n  render(index, scales, values, dimensions, context) {\n    const mark = this;\n    const {x, y, fx, fy} = scales;\n    const {ownerSVGElement: svg, document} = context;\n    const {anchor, monospace, lineHeight, lineWidth} = this;\n    const {textPadding: r, pointerSize: m, pathFilter} = this;\n    const {marginTop, marginLeft} = dimensions;\n    const sources = getSources(values);\n\n    // The anchor position is the middle of x1 & y1 and x2 & y2, if available,\n    // or x & y; the former is considered more specific because it\u2019s how we\n    // disable the implicit stack and interval transforms. If any dimension is\n    // unspecified, we fallback to the frame anchor. We also need to know the\n    // facet offsets to detect when the tip would draw outside the plot, and\n    // thus we need to change the orientation.\n    const {x1: X1, y1: Y1, x2: X2, y2: Y2, x: X = X1 ?? X2, y: Y = Y1 ?? Y2} = values;\n    const ox = fx ? fx(index.fx) - marginLeft : 0;\n    const oy = fy ? fy(index.fy) - marginTop : 0;\n\n    // The order of precedence for the anchor position is: the middle of x1 & y1\n    // and x2 & y2; or x1 & y1 (e.g., area); or lastly x & y. If a dimension is\n    // unspecified, the frame anchor is used.\n    const [cx, cy] = applyFrameAnchor(this, dimensions);\n    const px = anchorX(values, cx);\n    const py = anchorY(values, cy);\n\n    // Resolve the text metric implementation. We may need an ellipsis for text\n    // truncation, so we optimistically compute the ellipsis width.\n    const widthof = monospace ? monospaceWidth : defaultWidth;\n    const ee = widthof(ellipsis);\n\n    // We borrow the scale\u2019s tick format for facet channels; this is safe for\n    // ordinal scales (but not continuous scales where the display value may\n    // need higher precision), and generally better than the default format.\n    const formatFx = fx && inferTickFormat(fx);\n    const formatFy = fy && inferTickFormat(fy);\n\n    function* format(sources, i) {\n      if (\"title\" in sources) {\n        const text = sources.title.value[i];\n        for (const line of mark.splitLines(formatDefault(text))) {\n          yield {name: \"\", value: mark.clipLine(line)};\n        }\n        return;\n      }\n      for (const key in sources) {\n        if (key === \"x1\" && \"x2\" in sources) continue;\n        if (key === \"y1\" && \"y2\" in sources) continue;\n        const channel = sources[key];\n        const value = channel.value[i];\n        if (!defined(value) && channel.scale == null) continue;\n        if (key === \"x2\" && \"x1\" in sources) {\n          yield {name: formatLabel(scales, channel, \"x\"), value: formatPair(sources.x1, channel, i)};\n        } else if (key === \"y2\" && \"y1\" in sources) {\n          yield {name: formatLabel(scales, channel, \"y\"), value: formatPair(sources.y1, channel, i)};\n        } else {\n          const scale = channel.scale;\n          const line = {name: formatLabel(scales, channel, key), value: formatDefault(value)};\n          if (scale === \"color\" || scale === \"opacity\") line[scale] = values[key][i];\n          yield line;\n        }\n      }\n      if (index.fi != null && fx) yield {name: String(fx.label ?? \"fx\"), value: formatFx(index.fx)};\n      if (index.fi != null && fy) yield {name: String(fy.label ?? \"fy\"), value: formatFy(index.fy)};\n    }\n\n    // We don\u2019t call applyChannelStyles because we only use the channels to\n    // derive the content of the tip, not its aesthetics.\n    const g = create(\"svg:g\", context)\n      .call(applyIndirectStyles, this, dimensions, context)\n      .call(applyIndirectTextStyles, this)\n      .call(applyTransform, this, {x: X && x, y: Y && y})\n      .call((g) =>\n        g\n          .selectAll()\n          .data(index)\n          .enter()\n          .append(\"g\")\n          .attr(\"transform\", (i) => `translate(${Math.round(px(i))},${Math.round(py(i))})`) // crisp edges\n          .call(applyDirectStyles, this)\n          .call((g) => g.append(\"path\").attr(\"filter\", pathFilter))\n          .call((g) =>\n            g.append(\"text\").each(function (i) {\n              const that = select(this);\n              // prevent style inheritance (from path)\n              this.setAttribute(\"fill\", \"currentColor\");\n              this.setAttribute(\"fill-opacity\", 1);\n              this.setAttribute(\"stroke\", \"none\");\n              // iteratively render each channel value\n              const names = new Set();\n              for (const line of format(sources, i)) {\n                const name = line.name;\n                if (name && names.has(name)) continue;\n                else names.add(name);\n                renderLine(that, line);\n              }\n            })\n          )\n      );\n\n    // Renders a single line (a name-value pair) to the tip, truncating the text\n    // as needed, and adding a title if the text is truncated. Note that this is\n    // just the initial layout of the text; in postrender we will compute the\n    // exact text metrics and translate the text as needed once we know the\n    // tip\u2019s orientation (anchor).\n    function renderLine(selection, {name, value, color, opacity}) {\n      const swatch = color != null || opacity != null;\n      let title;\n      let w = lineWidth * 100;\n      const [j] = cut(name, w, widthof, ee);\n      if (j >= 0) {\n        // name is truncated\n        name = name.slice(0, j).trimEnd() + ellipsis;\n        title = value.trim();\n        value = \"\";\n      } else {\n        if (name || (!value && !swatch)) value = \" \" + value;\n        const [k] = cut(value, w - widthof(name), widthof, ee);\n        if (k >= 0) {\n          // value is truncated\n          value = value.slice(0, k).trimEnd() + ellipsis;\n          title = value.trim();\n        }\n      }\n      const line = selection.append(\"tspan\").attr(\"x\", 0).attr(\"dy\", `${lineHeight}em`).text(\"\\u200b\"); // zwsp for double-click\n      if (name) line.append(\"tspan\").attr(\"font-weight\", \"bold\").text(name);\n      if (value) line.append(() => document.createTextNode(value));\n      if (swatch) line.append(\"tspan\").text(\" \u25A0\").attr(\"fill\", color).attr(\"fill-opacity\", opacity).style(\"user-select\", \"none\"); // prettier-ignore\n      if (title) line.append(\"title\").text(title);\n    }\n\n    // Only after the plot is attached to the page can we compute the exact text\n    // metrics needed to determine the tip size and orientation (anchor).\n    function postrender() {\n      const {width, height} = dimensions.facet ?? dimensions;\n      g.selectChildren().each(function (i) {\n        let {x: tx, width: w, height: h} = this.getBBox();\n        (w = Math.round(w)), (h = Math.round(h)); // crisp edges\n        let a = anchor; // use the specified anchor, if any\n        if (a === undefined) {\n          a = mark.previousAnchor; // favor the previous anchor, if it fits\n          const x = px(i) + ox;\n          const y = py(i) + oy;\n          const fitLeft = x + w + r * 2 < width;\n          const fitRight = x - w - r * 2 > 0;\n          const fitTop = y + h + m + r * 2 + 7 < height;\n          const fitBottom = y - h - m - r * 2 > 0;\n          const ax = (/-left$/.test(a) ? fitLeft || !fitRight : fitLeft && !fitRight) ? \"left\" : \"right\";\n          const ay = (/^top-/.test(a) ? fitTop || !fitBottom : fitTop && !fitBottom) ? \"top\" : \"bottom\";\n          a = mark.previousAnchor = `${ay}-${ax}`;\n        }\n        const path = this.firstChild; // note: assumes exactly two children!\n        const text = this.lastChild; // note: assumes exactly two children!\n        path.setAttribute(\"d\", getPath(a, m, r, w, h));\n        if (tx) for (const t of text.childNodes) t.setAttribute(\"x\", -tx);\n        text.setAttribute(\"y\", `${+getLineOffset(a, text.childNodes.length, lineHeight).toFixed(6)}em`);\n        text.setAttribute(\"transform\", `translate(${getTextTranslate(a, m, r, w, h)})`);\n      });\n    }\n\n    // Wait until the plot is inserted into the page so that we can use getBBox\n    // to compute the exact text dimensions. If the SVG is already connected, as\n    // when the pointer interaction triggers the re-render, use a faster\n    // microtask instead of an animation frame; if this SSR (e.g., JSDOM), skip\n    // this step. Perhaps this could be done synchronously; getting the\n    // dimensions of the SVG is easy, and although accurate text metrics are\n    // hard, we could use approximate heuristics.\n    if (svg.isConnected) Promise.resolve().then(postrender);\n    else if (typeof requestAnimationFrame !== \"undefined\") requestAnimationFrame(postrender);\n\n    return g.node();\n  }\n}\n\nexport function tip(data, {x, y, ...options} = {}) {\n  if (options.frameAnchor === undefined) [x, y] = maybeTuple(x, y);\n  return new Tip(data, {...options, x, y});\n}\n\nfunction getLineOffset(anchor, length, lineHeight) {\n  return /^top(?:-|$)/.test(anchor)\n    ? 0.94 - lineHeight\n    : /^bottom(?:-|$)/\n    ? -0.29 - length * lineHeight\n    : (length / 2) * lineHeight;\n}\n\nfunction getTextTranslate(anchor, m, r, width, height) {\n  switch (anchor) {\n    case \"middle\":\n      return [-width / 2, height / 2];\n    case \"top-left\":\n      return [r, m + r];\n    case \"top\":\n      return [-width / 2, m / 2 + r];\n    case \"top-right\":\n      return [-width - r, m + r];\n    case \"right\":\n      return [-m / 2 - width - r, height / 2];\n    case \"bottom-left\":\n      return [r, -m - r];\n    case \"bottom\":\n      return [-width / 2, -m / 2 - r];\n    case \"bottom-right\":\n      return [-width - r, -m - r];\n    case \"left\":\n      return [r + m / 2, height / 2];\n  }\n}\n\nfunction getPath(anchor, m, r, width, height) {\n  const w = width + r * 2;\n  const h = height + r * 2;\n  switch (anchor) {\n    case \"middle\":\n      return `M${-w / 2},${-h / 2}h${w}v${h}h${-w}z`;\n    case \"top-left\":\n      return `M0,0l${m},${m}h${w - m}v${h}h${-w}z`;\n    case \"top\":\n      return `M0,0l${m / 2},${m / 2}h${(w - m) / 2}v${h}h${-w}v${-h}h${(w - m) / 2}z`;\n    case \"top-right\":\n      return `M0,0l${-m},${m}h${m - w}v${h}h${w}z`;\n    case \"right\":\n      return `M0,0l${-m / 2},${-m / 2}v${m / 2 - h / 2}h${-w}v${h}h${w}v${m / 2 - h / 2}z`;\n    case \"bottom-left\":\n      return `M0,0l${m},${-m}h${w - m}v${-h}h${-w}z`;\n    case \"bottom\":\n      return `M0,0l${m / 2},${-m / 2}h${(w - m) / 2}v${-h}h${-w}v${h}h${(w - m) / 2}z`;\n    case \"bottom-right\":\n      return `M0,0l${-m},${-m}h${m - w}v${-h}h${w}z`;\n    case \"left\":\n      return `M0,0l${m / 2},${-m / 2}v${m / 2 - h / 2}h${w}v${h}h${-w}v${m / 2 - h / 2}z`;\n  }\n}\n\nfunction getSources({channels}) {\n  const sources = {};\n  for (const key in channels) {\n    if (ignoreChannels.has(key)) continue;\n    const source = getSource(channels, key);\n    if (source) sources[key] = source;\n  }\n  return sources;\n}\n\nfunction formatPair(c1, c2, i) {\n  return c2.hint?.length // e.g., stackY\u2019s y1 and y2\n    ? `${formatDefault(c2.value[i] - c1.value[i])}`\n    : `${formatDefault(c1.value[i])}\u2013${formatDefault(c2.value[i])}`;\n}\n\nfunction formatLabel(scales, c, defaultLabel) {\n  return String(scales[c.scale]?.label ?? c?.label ?? defaultLabel);\n}\n", "import {creator, select} from \"d3\";\nimport {createChannel, inferChannelScale} from \"./channel.js\";\nimport {createContext} from \"./context.js\";\nimport {createDimensions} from \"./dimensions.js\";\nimport {createFacets, recreateFacets, facetExclude, facetGroups, facetTranslator, facetFilter} from \"./facet.js\";\nimport {pointer, pointerX, pointerY} from \"./interactions/pointer.js\";\nimport {createLegends, exposeLegends} from \"./legends.js\";\nimport {Mark} from \"./mark.js\";\nimport {axisFx, axisFy, axisX, axisY, gridFx, gridFy, gridX, gridY} from \"./marks/axis.js\";\nimport {frame} from \"./marks/frame.js\";\nimport {tip} from \"./marks/tip.js\";\nimport {isColor, isIterable, isNone, isScaleOptions} from \"./options.js\";\nimport {arrayify, map, yes, maybeIntervalTransform, subarray} from \"./options.js\";\nimport {createProjection, getGeometryChannels, hasProjection} from \"./projection.js\";\nimport {createScales, createScaleFunctions, autoScaleRange, exposeScales} from \"./scales.js\";\nimport {innerDimensions, outerDimensions} from \"./scales.js\";\nimport {position, registry as scaleRegistry} from \"./scales/index.js\";\nimport {applyInlineStyles, maybeClassName} from \"./style.js\";\nimport {initializer} from \"./transforms/basic.js\";\nimport {consumeWarnings, warn} from \"./warnings.js\";\n\nexport function plot(options = {}) {\n  const {facet, style, caption, ariaLabel, ariaDescription} = options;\n\n  // className for inline styles\n  const className = maybeClassName(options.className);\n\n  // Flatten any nested marks.\n  const marks = options.marks === undefined ? [] : flatMarks(options.marks);\n\n  // Add implicit tips.\n  marks.push(...inferTips(marks));\n\n  // Compute the top-level facet state. This has roughly the same structure as\n  // mark-specific facet state, except there isn\u2019t a facetsIndex, and there\u2019s a\n  // data and dataLength so we can warn the user if a different data of the same\n  // length is used in a mark.\n  const topFacetState = maybeTopFacet(facet, options);\n\n  // Construct a map from (faceted) Mark instance to facet state, including:\n  // channels - an {fx?, fy?} object to add to the fx and fy scale\n  // groups - a possibly-nested map from facet values to indexes in the data array\n  // facetsIndex - a sparse nested array of indices corresponding to the valid facets\n  const facetStateByMark = new Map();\n  for (const mark of marks) {\n    const facetState = maybeMarkFacet(mark, topFacetState, options);\n    if (facetState) facetStateByMark.set(mark, facetState);\n  }\n\n  // Compute a Map from scale name to an array of associated channels.\n  const channelsByScale = new Map();\n  if (topFacetState) addScaleChannels(channelsByScale, [topFacetState], options);\n  addScaleChannels(channelsByScale, facetStateByMark, options);\n\n  // Add implicit axis marks. Because this happens after faceting (because it\n  // depends on whether faceting is present), we must initialize the facet state\n  // of any implicit axes, too.\n  const axes = flatMarks(inferAxes(marks, channelsByScale, options));\n  for (const mark of axes) {\n    const facetState = maybeMarkFacet(mark, topFacetState, options);\n    if (facetState) facetStateByMark.set(mark, facetState);\n  }\n  marks.unshift(...axes);\n\n  // All the possible facets are given by the domains of the fx or fy scales, or\n  // the cross-product of these domains if we facet by both x and y. We sort\n  // them in order to apply the facet filters afterwards.\n  let facets = createFacets(channelsByScale, options);\n\n  if (facets !== undefined) {\n    const topFacetsIndex = topFacetState ? facetFilter(facets, topFacetState) : undefined;\n\n    // Compute a facet index for each mark, parallel to the facets array. For\n    // mark-level facets, compute an index for that mark\u2019s data and options.\n    // Otherwise, use the top-level facet index.\n    for (const mark of marks) {\n      if (mark.facet === null || mark.facet === \"super\") continue;\n      const facetState = facetStateByMark.get(mark);\n      if (facetState === undefined) continue;\n      facetState.facetsIndex = mark.fx != null || mark.fy != null ? facetFilter(facets, facetState) : topFacetsIndex;\n    }\n\n    // The cross product of the domains of fx and fy can include fx-fy\n    // combinations for which no mark has an instance associated with that\n    // combination, and therefore we don\u2019t want to render this facet (not even\n    // the frame). The same can occur if you specify the domain of fx and fy\n    // explicitly, but there is no mark instance associated with some values in\n    // the domain. Expunge empty facets, and clear the corresponding elements\n    // from the nested index in each mark.\n    const nonEmpty = new Set();\n    for (const {facetsIndex} of facetStateByMark.values()) {\n      facetsIndex?.forEach((index, i) => {\n        if (index?.length > 0) {\n          nonEmpty.add(i);\n        }\n      });\n    }\n\n    // If all the facets are empty (as when none of the marks are actually\n    // faceted), none of them are empty.\n    facets.forEach(\n      0 < nonEmpty.size && nonEmpty.size < facets.length\n        ? (f, i) => (f.empty = !nonEmpty.has(i))\n        : (f) => (f.empty = false)\n    );\n\n    // For any mark using the \u201Cexclude\u201D facet mode, invert the index.\n    for (const mark of marks) {\n      if (mark.facet === \"exclude\") {\n        const facetState = facetStateByMark.get(mark);\n        if (facetState !== undefined) facetState.facetsIndex = facetExclude(facetState.facetsIndex);\n      }\n    }\n  }\n\n  // If a scale is explicitly declared in options, initialize its associated\n  // channels to the empty array; this will guarantee that a corresponding scale\n  // will be created later (even if there are no other channels). Ignore facet\n  // scale declarations, which are handled above.\n  for (const key of scaleRegistry.keys()) {\n    if (isScaleOptions(options[key]) && key !== \"fx\" && key !== \"fy\") {\n      channelsByScale.set(key, []);\n    }\n  }\n\n  // A Map from Mark instance to its render state, including:\n  // index - the data index e.g. [0, 1, 2, 3, \u2026]\n  // channels - an array of materialized channels e.g. [[\"x\", {value}], \u2026]\n  // faceted - a boolean indicating whether this mark is faceted\n  // values - an object of scaled values e.g. {x: [40, 32, \u2026], \u2026}\n  const stateByMark = new Map();\n\n  // Initialize the marks\u2019 state.\n  for (const mark of marks) {\n    if (stateByMark.has(mark)) throw new Error(\"duplicate mark; each mark must be unique\");\n    const {facetsIndex, channels: facetChannels} = facetStateByMark.get(mark) ?? {};\n    const {data, facets, channels} = mark.initialize(facetsIndex, facetChannels, options);\n    applyScaleTransforms(channels, options);\n    stateByMark.set(mark, {data, facets, channels});\n  }\n\n  // Initalize the scales and dimensions.\n  const scaleDescriptors = createScales(addScaleChannels(channelsByScale, stateByMark, options), options);\n  const scales = createScaleFunctions(scaleDescriptors);\n  const dimensions = createDimensions(scaleDescriptors, marks, options);\n\n  autoScaleRange(scaleDescriptors, dimensions);\n\n  const {fx, fy} = scales;\n  const subdimensions = fx || fy ? innerDimensions(scaleDescriptors, dimensions) : dimensions;\n  const superdimensions = fx || fy ? actualDimensions(scales, dimensions) : dimensions;\n\n  // Initialize the context.\n  const context = createContext(options);\n  const document = context.document;\n  const svg = creator(\"svg\").call(document.documentElement);\n  let figure = svg; // replaced with the figure element, if any\n  context.ownerSVGElement = svg;\n  context.className = className;\n  context.projection = createProjection(options, subdimensions);\n\n  // Allows e.g. the axis mark to determine faceting lazily.\n  context.filterFacets = (data, channels) => {\n    return facetFilter(facets, {channels, groups: facetGroups(data, channels)});\n  };\n\n  // Allows e.g. the tip mark to reference channels and data on other marks.\n  context.getMarkState = (mark) => {\n    const state = stateByMark.get(mark);\n    const facetState = facetStateByMark.get(mark);\n    return {...state, channels: {...state.channels, ...facetState?.channels}};\n  };\n\n  // Allows e.g. the pointer transform to support viewof.\n  context.dispatchValue = (value) => {\n    if (figure.value === value) return;\n    figure.value = value;\n    figure.dispatchEvent(new Event(\"input\", {bubbles: true}));\n  };\n\n  // Reinitialize; for deriving channels dependent on other channels.\n  const newByScale = new Set();\n  for (const [mark, state] of stateByMark) {\n    if (mark.initializer != null) {\n      const dimensions = mark.facet === \"super\" ? superdimensions : subdimensions;\n      const update = mark.initializer(state.data, state.facets, state.channels, scales, dimensions, context);\n      if (update.data !== undefined) {\n        state.data = update.data;\n      }\n      if (update.facets !== undefined) {\n        state.facets = update.facets;\n      }\n      if (update.channels !== undefined) {\n        const {fx, fy, ...channels} = update.channels; // separate facet channels\n        inferChannelScales(channels);\n        Object.assign(state.channels, channels);\n        for (const channel of Object.values(channels)) {\n          const {scale} = channel;\n          // Initializers aren\u2019t allowed to redefine position scales as this\n          // would introduce a circular dependency; so simply scale these\n          // channels as-is rather than creating new scales, and assume that\n          // they already have the scale\u2019s transform applied, if any (e.g., when\n          // generating ticks for the axis mark).\n          if (scale != null && scaleRegistry.get(scale) !== position) {\n            applyScaleTransform(channel, options);\n            newByScale.add(scale);\n          }\n        }\n        // If the initializer returns new mark-level facet channels, we must\n        // record that the mark is now faceted. Note: we aren\u2019t actually\n        // populating the facet state, but subsequently we won\u2019t need it.\n        if (fx != null || fy != null) facetStateByMark.set(mark, true);\n      }\n    }\n  }\n\n  // Reconstruct scales if new scaled channels were created during\n  // reinitialization. Preserve existing scale labels, if any.\n  if (newByScale.size) {\n    const newChannelsByScale = new Map();\n    addScaleChannels(newChannelsByScale, stateByMark, options, (key) => newByScale.has(key));\n    addScaleChannels(channelsByScale, stateByMark, options, (key) => newByScale.has(key));\n    const newScaleDescriptors = inheritScaleLabels(createScales(newChannelsByScale, options), scaleDescriptors);\n    const newScales = createScaleFunctions(newScaleDescriptors);\n    Object.assign(scaleDescriptors, newScaleDescriptors);\n    Object.assign(scales, newScales);\n  }\n\n  // Sort and filter the facets to match the fx and fy domains; this is needed\n  // because the facets were constructed prior to the fx and fy scales.\n  let facetDomains, facetTranslate;\n  if (facets !== undefined) {\n    facetDomains = {x: fx?.domain(), y: fy?.domain()};\n    facets = recreateFacets(facets, facetDomains);\n    facetTranslate = facetTranslator(fx, fy, dimensions);\n  }\n\n  // Compute value objects, applying scales and projection as needed.\n  for (const [mark, state] of stateByMark) {\n    state.values = mark.scale(state.channels, scales, context);\n  }\n\n  const {width, height} = dimensions;\n\n  select(svg)\n    .attr(\"class\", className)\n    .attr(\"fill\", \"currentColor\")\n    .attr(\"font-family\", \"system-ui, sans-serif\")\n    .attr(\"font-size\", 10)\n    .attr(\"text-anchor\", \"middle\")\n    .attr(\"width\", width)\n    .attr(\"height\", height)\n    .attr(\"viewBox\", `0 0 ${width} ${height}`)\n    .attr(\"aria-label\", ariaLabel)\n    .attr(\"aria-description\", ariaDescription)\n    .call((svg) =>\n      // Warning: if you edit this, change defaultClassName.\n      svg.append(\"style\").text(\n        `.${className} {\n  display: block;\n  background: white;\n  height: auto;\n  height: intrinsic;\n  max-width: 100%;\n}\n.${className} text,\n.${className} tspan {\n  white-space: pre;\n}`\n      )\n    )\n    .call(applyInlineStyles, style);\n\n  // Render marks.\n  for (const mark of marks) {\n    const {channels, values, facets: indexes} = stateByMark.get(mark);\n\n    // Render a non-faceted mark.\n    if (facets === undefined || mark.facet === \"super\") {\n      let index = null;\n      if (indexes) {\n        index = indexes[0];\n        index = mark.filter(index, channels, values);\n        if (index.length === 0) continue;\n      }\n      const node = mark.render(index, scales, values, superdimensions, context);\n      if (node == null) continue;\n      svg.appendChild(node);\n    }\n\n    // Render a faceted mark.\n    else {\n      let g;\n      for (const f of facets) {\n        if (!(mark.facetAnchor?.(facets, facetDomains, f) ?? !f.empty)) continue;\n        let index = null;\n        if (indexes) {\n          const faceted = facetStateByMark.has(mark);\n          index = indexes[faceted ? f.i : 0];\n          index = mark.filter(index, channels, values);\n          if (index.length === 0) continue;\n          if (!faceted && index === indexes[0]) index = subarray(index); // copy before assigning fx, fy, fi\n          (index.fx = f.x), (index.fy = f.y), (index.fi = f.i);\n        }\n        const node = mark.render(index, scales, values, subdimensions, context);\n        if (node == null) continue;\n        // Lazily construct the shared group (to drop empty marks).\n        (g ??= select(svg).append(\"g\")).append(() => node).datum(f);\n        // Promote ARIA attributes and mark transform to avoid repetition on\n        // each facet; this assumes that these attributes are consistent across\n        // facets, but that should be the case!\n        for (const name of [\"aria-label\", \"aria-description\", \"aria-hidden\", \"transform\"]) {\n          if (node.hasAttribute(name)) {\n            g.attr(name, node.getAttribute(name));\n            node.removeAttribute(name);\n          }\n        }\n      }\n      g?.selectChildren().attr(\"transform\", facetTranslate);\n    }\n  }\n\n  // Wrap the plot in a figure with a caption, if desired.\n  const legends = createLegends(scaleDescriptors, context, options);\n  if (caption != null || legends.length > 0) {\n    figure = document.createElement(\"figure\");\n    figure.style.maxWidth = \"initial\";\n    for (const legend of legends) figure.appendChild(legend);\n    figure.appendChild(svg);\n    if (caption != null) {\n      const figcaption = document.createElement(\"figcaption\");\n      figcaption.appendChild(caption?.ownerDocument ? caption : document.createTextNode(caption));\n      figure.appendChild(figcaption);\n    }\n  }\n\n  figure.scale = exposeScales(scaleDescriptors);\n  figure.legend = exposeLegends(scaleDescriptors, context, options);\n\n  const w = consumeWarnings();\n  if (w > 0) {\n    select(svg)\n      .append(\"text\")\n      .attr(\"x\", width)\n      .attr(\"y\", 20)\n      .attr(\"dy\", \"-1em\")\n      .attr(\"text-anchor\", \"end\")\n      .attr(\"font-family\", \"initial\") // fix emoji rendering in Chrome\n      .text(\"\\u26a0\\ufe0f\") // emoji variation selector\n      .append(\"title\")\n      .text(`${w.toLocaleString(\"en-US\")} warning${w === 1 ? \"\" : \"s\"}. Please check the console.`);\n  }\n\n  return figure;\n}\n\nfunction plotThis({marks = [], ...options} = {}) {\n  return plot({...options, marks: [...marks, this]});\n}\n\n// Note: This side-effect avoids a circular dependency.\nMark.prototype.plot = plotThis;\n\nfunction flatMarks(marks) {\n  return marks\n    .flat(Infinity)\n    .filter((mark) => mark != null)\n    .map(markify);\n}\n\nfunction markify(mark) {\n  return typeof mark.render === \"function\" ? mark : new Render(mark);\n}\n\nclass Render extends Mark {\n  constructor(render) {\n    if (typeof render !== \"function\") throw new TypeError(\"invalid mark; missing render function\");\n    super();\n    this.render = render;\n  }\n  render() {}\n}\n\n// Note: mutates channel.value to apply the scale transform, if any.\nfunction applyScaleTransforms(channels, options) {\n  for (const name in channels) applyScaleTransform(channels[name], options);\n  return channels;\n}\n\n// Note: mutates channel.value to apply the scale transform, if any. Also sets\n// channel.transform to false to prevent duplicate transform application.\nfunction applyScaleTransform(channel, options) {\n  const {scale, transform: t = true} = channel;\n  if (scale == null || !t) return;\n  const {\n    type,\n    percent,\n    interval,\n    transform = percent ? (x) => x * 100 : maybeIntervalTransform(interval, type)\n  } = options[scale] ?? {};\n  if (transform == null) return;\n  channel.value = map(channel.value, transform);\n  channel.transform = false;\n}\n\n// An initializer may generate channels without knowing how the downstream mark\n// will use them. Marks are typically responsible associated scales with\n// channels, but here we assume common behavior across marks.\nfunction inferChannelScales(channels) {\n  for (const name in channels) {\n    inferChannelScale(name, channels[name]);\n  }\n}\n\nfunction addScaleChannels(channelsByScale, stateByMark, options, filter = yes) {\n  for (const {channels} of stateByMark.values()) {\n    for (const name in channels) {\n      const channel = channels[name];\n      const {scale} = channel;\n      if (scale != null && filter(scale)) {\n        // Geo marks affect the default x and y domains if there is no\n        // projection. Skip this (as an optimization) when a projection is\n        // specified, or when the domains for x and y are specified.\n        if (scale === \"projection\") {\n          if (!hasProjection(options)) {\n            const gx = options.x?.domain === undefined;\n            const gy = options.y?.domain === undefined;\n            if (gx || gy) {\n              const [x, y] = getGeometryChannels(channel);\n              if (gx) addScaleChannel(channelsByScale, \"x\", x);\n              if (gy) addScaleChannel(channelsByScale, \"y\", y);\n            }\n          }\n        } else {\n          addScaleChannel(channelsByScale, scale, channel);\n        }\n      }\n    }\n  }\n  return channelsByScale;\n}\n\nfunction addScaleChannel(channelsByScale, scale, channel) {\n  const scaleChannels = channelsByScale.get(scale);\n  if (scaleChannels !== undefined) scaleChannels.push(channel);\n  else channelsByScale.set(scale, [channel]);\n}\n\n// Returns the facet groups, and possibly fx and fy channels, associated with\n// the top-level facet option {data, x, y}.\nfunction maybeTopFacet(facet, options) {\n  if (facet == null) return;\n  const {x, y} = facet;\n  if (x == null && y == null) return;\n  const data = arrayify(facet.data);\n  if (data == null) throw new Error(\"missing facet data\");\n  const channels = {};\n  if (x != null) channels.fx = createChannel(data, {value: x, scale: \"fx\"});\n  if (y != null) channels.fy = createChannel(data, {value: y, scale: \"fy\"});\n  applyScaleTransforms(channels, options);\n  const groups = facetGroups(data, channels);\n  return {channels, groups, data: facet.data};\n}\n\n// Returns the facet groups, and possibly fx and fy channels, associated with a\n// mark, either through top-level faceting or mark-level facet options {fx, fy}.\nfunction maybeMarkFacet(mark, topFacetState, options) {\n  if (mark.facet === null || mark.facet === \"super\") return;\n\n  // This mark defines a mark-level facet. TODO There\u2019s some code duplication\n  // here with maybeTopFacet that we could reduce.\n  const {fx, fy} = mark;\n  if (fx != null || fy != null) {\n    const data = arrayify(mark.data ?? fx ?? fy);\n    if (data === undefined) throw new Error(`missing facet data in ${mark.ariaLabel}`);\n    if (data === null) return; // ignore channel definitions if no data is provided TODO this right?\n    const channels = {};\n    if (fx != null) channels.fx = createChannel(data, {value: fx, scale: \"fx\"});\n    if (fy != null) channels.fy = createChannel(data, {value: fy, scale: \"fy\"});\n    applyScaleTransforms(channels, options);\n    return {channels, groups: facetGroups(data, channels)};\n  }\n\n  // This mark links to a top-level facet, if present.\n  if (topFacetState === undefined) return;\n\n  // TODO Can we link the top-level facet channels here?\n  const {channels, groups, data} = topFacetState;\n  if (mark.facet !== \"auto\" || mark.data === data) return {channels, groups};\n\n  // Warn for the common pitfall of wanting to facet mapped data with the\n  // top-level facet option.\n  if (\n    data.length > 0 &&\n    (groups.size > 1 || (groups.size === 1 && channels.fx && channels.fy && [...groups][0][1].size > 1)) &&\n    arrayify(mark.data)?.length === data.length\n  ) {\n    warn(\n      `Warning: the ${mark.ariaLabel} mark appears to use faceted data, but isn\u2019t faceted. The mark data has the same length as the facet data and the mark facet option is \"auto\", but the mark data and facet data are distinct. If this mark should be faceted, set the mark facet option to true; otherwise, suppress this warning by setting the mark facet option to false.`\n    );\n  }\n}\n\nfunction derive(mark, options = {}) {\n  return initializer({...options, x: null, y: null}, (data, facets, channels, scales, dimensions, context) => {\n    return context.getMarkState(mark);\n  });\n}\n\nfunction inferTips(marks) {\n  const tips = [];\n  for (const mark of marks) {\n    const t = mark.tip;\n    if (t) {\n      const p = t === \"x\" ? pointerX : t === \"y\" ? pointerY : pointer;\n      const options = p(derive(mark)); // TODO tip options?\n      options.title = null; // prevent implicit title for primitive data\n      tips.push(tip(mark.data, options));\n    }\n  }\n  return tips;\n}\n\nfunction inferAxes(marks, channelsByScale, options) {\n  let {\n    projection,\n    x = {},\n    y = {},\n    fx = {},\n    fy = {},\n    axis,\n    grid,\n    facet = {},\n    facet: {axis: facetAxis = axis, grid: facetGrid} = facet,\n    x: {axis: xAxis = axis, grid: xGrid = xAxis === null ? null : grid} = x,\n    y: {axis: yAxis = axis, grid: yGrid = yAxis === null ? null : grid} = y,\n    fx: {axis: fxAxis = facetAxis, grid: fxGrid = fxAxis === null ? null : facetGrid} = fx,\n    fy: {axis: fyAxis = facetAxis, grid: fyGrid = fyAxis === null ? null : facetGrid} = fy\n  } = options;\n\n  // Disable axes if the corresponding scale is not present.\n  if (projection || (!isScaleOptions(x) && !hasPositionChannel(\"x\", marks))) xAxis = xGrid = null;\n  if (projection || (!isScaleOptions(y) && !hasPositionChannel(\"y\", marks))) yAxis = yGrid = null;\n  if (!channelsByScale.has(\"fx\")) fxAxis = fxGrid = null;\n  if (!channelsByScale.has(\"fy\")) fyAxis = fyGrid = null;\n\n  // Resolve the default implicit axes by checking for explicit ones.\n  if (xAxis === undefined) xAxis = !hasAxis(marks, \"x\");\n  if (yAxis === undefined) yAxis = !hasAxis(marks, \"y\");\n  if (fxAxis === undefined) fxAxis = !hasAxis(marks, \"fx\");\n  if (fyAxis === undefined) fyAxis = !hasAxis(marks, \"fy\");\n\n  // Resolve the default orientation of axes.\n  if (xAxis === true) xAxis = \"bottom\";\n  if (yAxis === true) yAxis = \"left\";\n  if (fxAxis === true) fxAxis = xAxis === \"top\" || xAxis === null ? \"bottom\" : \"top\";\n  if (fyAxis === true) fyAxis = yAxis === \"right\" || yAxis === null ? \"left\" : \"right\";\n\n  const axes = [];\n  maybeGrid(axes, fyGrid, gridFy, fy);\n  maybeAxis(axes, fyAxis, axisFy, \"right\", \"left\", facet, fy);\n  maybeGrid(axes, fxGrid, gridFx, fx);\n  maybeAxis(axes, fxAxis, axisFx, \"top\", \"bottom\", facet, fx);\n  maybeGrid(axes, yGrid, gridY, y);\n  maybeAxis(axes, yAxis, axisY, \"left\", \"right\", options, y);\n  maybeGrid(axes, xGrid, gridX, x);\n  maybeAxis(axes, xAxis, axisX, \"bottom\", \"top\", options, x);\n  return axes;\n}\n\nfunction maybeAxis(axes, axis, axisType, primary, secondary, defaults, options) {\n  if (!axis) return;\n  const both = isBoth(axis);\n  options = axisOptions(both ? primary : axis, defaults, options);\n  const {line} = options;\n  if ((axisType === axisY || axisType === axisX) && line && !isNone(line)) axes.push(frame(lineOptions(options)));\n  axes.push(axisType(options));\n  if (both) axes.push(axisType({...options, anchor: secondary, label: null}));\n}\n\nfunction maybeGrid(axes, grid, gridType, options) {\n  if (!grid || isNone(grid)) return;\n  axes.push(gridType(gridOptions(grid, options)));\n}\n\nfunction isBoth(value) {\n  return /^\\s*both\\s*$/i.test(value);\n}\n\nfunction axisOptions(\n  anchor,\n  defaults,\n  {\n    line = defaults.line,\n    ticks,\n    tickSize,\n    tickSpacing,\n    tickPadding,\n    tickFormat,\n    tickRotate,\n    fontVariant,\n    ariaLabel,\n    ariaDescription,\n    label = defaults.label,\n    labelAnchor,\n    labelArrow = defaults.labelArrow,\n    labelOffset\n  }\n) {\n  return {\n    anchor,\n    line,\n    ticks,\n    tickSize,\n    tickSpacing,\n    tickPadding,\n    tickFormat,\n    tickRotate,\n    fontVariant,\n    ariaLabel,\n    ariaDescription,\n    label,\n    labelAnchor,\n    labelArrow,\n    labelOffset\n  };\n}\n\nfunction lineOptions(options) {\n  const {anchor, line} = options;\n  return {anchor, facetAnchor: anchor + \"-empty\", stroke: line === true ? undefined : line};\n}\n\nfunction gridOptions(\n  grid,\n  {\n    stroke = isColor(grid) ? grid : undefined,\n    ticks = isGridTicks(grid) ? grid : undefined,\n    tickSpacing,\n    ariaLabel,\n    ariaDescription\n  }\n) {\n  return {\n    stroke,\n    ticks,\n    tickSpacing,\n    ariaLabel,\n    ariaDescription\n  };\n}\n\nfunction isGridTicks(grid) {\n  switch (typeof grid) {\n    case \"number\":\n      return true;\n    case \"string\":\n      return !isColor(grid);\n  }\n  return isIterable(grid) || typeof grid?.range === \"function\";\n}\n\n// Is there an explicit axis already present? TODO We probably want a more\n// explicit test than looking for the ARIA label, but it does afford some\n// flexibility in axis implementation which is nice.\nfunction hasAxis(marks, k) {\n  const prefix = `${k}-axis `;\n  return marks.some((m) => m.ariaLabel?.startsWith(prefix));\n}\n\nfunction hasPositionChannel(k, marks) {\n  for (const mark of marks) {\n    for (const key in mark.channels) {\n      const {scale} = mark.channels[key];\n      if (scale === k || scale === \"projection\") {\n        return true;\n      }\n    }\n  }\n  return false;\n}\n\nfunction inheritScaleLabels(newScales, scales) {\n  for (const key in newScales) {\n    const newScale = newScales[key];\n    const scale = scales[key];\n    if (newScale.label === undefined && scale) {\n      newScale.label = scale.label;\n    }\n  }\n  return newScales;\n}\n\n// This differs from the other outerDimensions in that it accounts for rounding\n// and outer padding in the fact scales; we want the frame to align exactly with\n// the actual range, not the desired range.\nfunction actualDimensions({fx, fy}, dimensions) {\n  const {marginTop, marginRight, marginBottom, marginLeft, width, height} = outerDimensions(dimensions);\n  const fxr = fx && outerRange(fx);\n  const fyr = fy && outerRange(fy);\n  return {\n    marginTop: fy ? fyr[0] : marginTop,\n    marginRight: fx ? width - fxr[1] : marginRight,\n    marginBottom: fy ? height - fyr[1] : marginBottom,\n    marginLeft: fx ? fxr[0] : marginLeft,\n    // Some marks, namely the x- and y-axis labels, want to know what the\n    // desired (rather than actual) margins are for positioning.\n    inset: {\n      marginTop: dimensions.marginTop,\n      marginRight: dimensions.marginRight,\n      marginBottom: dimensions.marginBottom,\n      marginLeft: dimensions.marginLeft\n    },\n    width,\n    height\n  };\n}\n\nfunction outerRange(scale) {\n  const domain = scale.domain();\n  let x1 = scale(domain[0]);\n  let x2 = scale(domain[domain.length - 1]);\n  if (x2 < x1) [x1, x2] = [x2, x1];\n  return [x1, x2 + scale.bandwidth()];\n}\n", "import {\n  bisect,\n  extent,\n  thresholdFreedmanDiaconis,\n  thresholdScott,\n  thresholdSturges,\n  tickIncrement,\n  ticks,\n  utcTickInterval\n} from \"d3\";\nimport {withTip} from \"../mark.js\";\nimport {\n  coerceDate,\n  coerceNumbers,\n  identity,\n  isIterable,\n  isTemporal,\n  labelof,\n  map,\n  maybeApplyInterval,\n  maybeColorChannel,\n  maybeColumn,\n  maybeRangeInterval,\n  maybeTuple,\n  maybeValue,\n  mid,\n  valueof\n} from \"../options.js\";\nimport {maybeUtcInterval} from \"../time.js\";\nimport {basic} from \"./basic.js\";\nimport {\n  hasOutput,\n  maybeEvaluator,\n  maybeGroup,\n  maybeOutput,\n  maybeOutputs,\n  maybeReduce,\n  maybeSort,\n  maybeSubgroup,\n  reduceCount,\n  reduceFirst,\n  reduceIdentity\n} from \"./group.js\";\nimport {maybeInsetX, maybeInsetY} from \"./inset.js\";\n\n// Group on {z, fill, stroke}, then optionally on y, then bin x.\nexport function binX(outputs = {y: \"count\"}, options = {}) {\n  [outputs, options] = mergeOptions(outputs, options);\n  const {x, y} = options;\n  return binn(maybeBinValue(x, options, identity), null, null, y, outputs, maybeInsetX(options));\n}\n\n// Group on {z, fill, stroke}, then optionally on x, then bin y.\nexport function binY(outputs = {x: \"count\"}, options = {}) {\n  [outputs, options] = mergeOptions(outputs, options);\n  const {x, y} = options;\n  return binn(null, maybeBinValue(y, options, identity), x, null, outputs, maybeInsetY(options));\n}\n\n// Group on {z, fill, stroke}, then bin on x and y.\nexport function bin(outputs = {fill: \"count\"}, options = {}) {\n  [outputs, options] = mergeOptions(outputs, options);\n  const {x, y} = maybeBinValueTuple(options);\n  return binn(x, y, null, null, outputs, maybeInsetX(maybeInsetY(options)));\n}\n\nfunction maybeDenseInterval(bin, k, options = {}) {\n  return options?.interval == null\n    ? options\n    : bin({[k]: options?.reduce === undefined ? reduceFirst : options.reduce, filter: null}, options);\n}\n\nexport function maybeDenseIntervalX(options = {}) {\n  return maybeDenseInterval(binX, \"y\", withTip(options, \"x\"));\n}\n\nexport function maybeDenseIntervalY(options = {}) {\n  return maybeDenseInterval(binY, \"x\", withTip(options, \"y\"));\n}\n\nfunction binn(\n  bx, // optionally bin on x (exclusive with gx)\n  by, // optionally bin on y (exclusive with gy)\n  gx, // optionally group on x (exclusive with bx and gy)\n  gy, // optionally group on y (exclusive with by and gx)\n  {\n    data: reduceData = reduceIdentity, // TODO avoid materializing when unused?\n    filter = reduceCount, // return only non-empty bins by default\n    sort,\n    reverse,\n    ...outputs // output channel definitions\n  } = {},\n  inputs = {} // input channels and options\n) {\n  bx = maybeBin(bx);\n  by = maybeBin(by);\n\n  // Compute the outputs.\n  outputs = maybeBinOutputs(outputs, inputs);\n  reduceData = maybeBinReduce(reduceData, identity);\n  sort = sort == null ? undefined : maybeBinOutput(\"sort\", sort, inputs);\n  filter = filter == null ? undefined : maybeBinEvaluator(\"filter\", filter, inputs);\n\n  // Don\u2019t group on a channel if an output requires it as an input!\n  if (gx != null && hasOutput(outputs, \"x\", \"x1\", \"x2\")) gx = null;\n  if (gy != null && hasOutput(outputs, \"y\", \"y1\", \"y2\")) gy = null;\n\n  // Produce x1, x2, y1, and y2 output channels as appropriate (when binning).\n  const [BX1, setBX1] = maybeColumn(bx);\n  const [BX2, setBX2] = maybeColumn(bx);\n  const [BY1, setBY1] = maybeColumn(by);\n  const [BY2, setBY2] = maybeColumn(by);\n\n  // Produce x or y output channels as appropriate (when grouping).\n  const [k, gk] = gx != null ? [gx, \"x\"] : gy != null ? [gy, \"y\"] : [];\n  const [GK, setGK] = maybeColumn(k);\n\n  // Greedily materialize the z, fill, and stroke channels (if channels and not\n  // constants) so that we can reference them for subdividing groups without\n  // computing them more than once. We also want to consume options that should\n  // only apply to this transform rather than passing them through to the next.\n  const {\n    x,\n    y,\n    z,\n    fill,\n    stroke,\n    x1,\n    x2, // consumed if x is an output\n    y1,\n    y2, // consumed if y is an output\n    domain,\n    cumulative,\n    thresholds,\n    interval,\n    ...options\n  } = inputs;\n  const [GZ, setGZ] = maybeColumn(z);\n  const [vfill] = maybeColorChannel(fill);\n  const [vstroke] = maybeColorChannel(stroke);\n  const [GF, setGF] = maybeColumn(vfill);\n  const [GS, setGS] = maybeColumn(vstroke);\n\n  return {\n    ...(\"z\" in inputs && {z: GZ || z}),\n    ...(\"fill\" in inputs && {fill: GF || fill}),\n    ...(\"stroke\" in inputs && {stroke: GS || stroke}),\n    ...basic(options, (data, facets, plotOptions) => {\n      const K = maybeApplyInterval(valueof(data, k), plotOptions?.[gk]);\n      const Z = valueof(data, z);\n      const F = valueof(data, vfill);\n      const S = valueof(data, vstroke);\n      const G = maybeSubgroup(outputs, {z: Z, fill: F, stroke: S});\n      const groupFacets = [];\n      const groupData = [];\n      const GK = K && setGK([]);\n      const GZ = Z && setGZ([]);\n      const GF = F && setGF([]);\n      const GS = S && setGS([]);\n      const BX1 = bx && setBX1([]);\n      const BX2 = bx && setBX2([]);\n      const BY1 = by && setBY1([]);\n      const BY2 = by && setBY2([]);\n      const bin = bing(bx?.(data), by?.(data));\n      let i = 0;\n      for (const o of outputs) o.initialize(data);\n      if (sort) sort.initialize(data);\n      if (filter) filter.initialize(data);\n      for (const facet of facets) {\n        const groupFacet = [];\n        for (const o of outputs) o.scope(\"facet\", facet);\n        if (sort) sort.scope(\"facet\", facet);\n        if (filter) filter.scope(\"facet\", facet);\n        for (const [f, I] of maybeGroup(facet, G)) {\n          for (const [k, g] of maybeGroup(I, K)) {\n            for (const [b, extent] of bin(g)) {\n              if (filter && !filter.reduce(b, extent)) continue;\n              groupFacet.push(i++);\n              groupData.push(reduceData.reduceIndex(b, data, extent));\n              if (K) GK.push(k);\n              if (Z) GZ.push(G === Z ? f : Z[b[0]]);\n              if (F) GF.push(G === F ? f : F[b[0]]);\n              if (S) GS.push(G === S ? f : S[b[0]]);\n              if (BX1) BX1.push(extent.x1), BX2.push(extent.x2);\n              if (BY1) BY1.push(extent.y1), BY2.push(extent.y2);\n              for (const o of outputs) o.reduce(b, extent);\n              if (sort) sort.reduce(b);\n            }\n          }\n        }\n        groupFacets.push(groupFacet);\n      }\n      maybeSort(groupFacets, sort, reverse);\n      return {data: groupData, facets: groupFacets};\n    }),\n    ...(!hasOutput(outputs, \"x\") && (BX1 ? {x1: BX1, x2: BX2, x: mid(BX1, BX2)} : {x, x1, x2})),\n    ...(!hasOutput(outputs, \"y\") && (BY1 ? {y1: BY1, y2: BY2, y: mid(BY1, BY2)} : {y, y1, y2})),\n    ...(GK && {[gk]: GK}),\n    ...Object.fromEntries(outputs.map(({name, output}) => [name, output]))\n  };\n}\n\n// Allow bin options to be specified as part of outputs; merge them into options.\nfunction mergeOptions({cumulative, domain, thresholds, interval, ...outputs}, options) {\n  return [outputs, {cumulative, domain, thresholds, interval, ...options}];\n}\n\nfunction maybeBinValue(value, {cumulative, domain, thresholds, interval}, defaultValue) {\n  value = {...maybeValue(value)};\n  if (value.domain === undefined) value.domain = domain;\n  if (value.cumulative === undefined) value.cumulative = cumulative;\n  if (value.thresholds === undefined) value.thresholds = thresholds;\n  if (value.interval === undefined) value.interval = interval;\n  if (value.value === undefined) value.value = defaultValue;\n  value.thresholds = maybeThresholds(value.thresholds, value.interval);\n  return value;\n}\n\nfunction maybeBinValueTuple(options) {\n  let {x, y} = options;\n  x = maybeBinValue(x, options);\n  y = maybeBinValue(y, options);\n  [x.value, y.value] = maybeTuple(x.value, y.value);\n  return {x, y};\n}\n\nfunction maybeBin(options) {\n  if (options == null) return;\n  const {value, cumulative, domain = extent, thresholds} = options;\n  const bin = (data) => {\n    let V = valueof(data, value);\n    let T; // bin thresholds\n    if (isTemporal(V) || isTimeThresholds(thresholds)) {\n      V = map(V, coerceDate, Float64Array); // like coerceDates, but faster\n      let [min, max] = typeof domain === \"function\" ? domain(V) : domain;\n      let t = typeof thresholds === \"function\" && !isInterval(thresholds) ? thresholds(V, min, max) : thresholds;\n      if (typeof t === \"number\") t = utcTickInterval(min, max, t);\n      if (isInterval(t)) {\n        if (domain === extent) {\n          min = t.floor(min);\n          max = t.offset(t.floor(max));\n        }\n        t = t.range(min, t.offset(max));\n      }\n      T = t;\n    } else {\n      V = coerceNumbers(V);\n      let [min, max] = typeof domain === \"function\" ? domain(V) : domain;\n      let t = typeof thresholds === \"function\" && !isInterval(thresholds) ? thresholds(V, min, max) : thresholds;\n      if (typeof t === \"number\") {\n        // This differs from d3.ticks with regard to exclusive bounds: we want a\n        // first threshold less than or equal to the minimum, and a last\n        // threshold (strictly) greater than the maximum.\n        if (domain === extent) {\n          let step = tickIncrement(min, max, t);\n          if (isFinite(step)) {\n            if (step > 0) {\n              let r0 = Math.round(min / step);\n              let r1 = Math.round(max / step);\n              if (!(r0 * step <= min)) --r0;\n              if (!(r1 * step > max)) ++r1;\n              let n = r1 - r0 + 1;\n              t = new Float64Array(n);\n              for (let i = 0; i < n; ++i) t[i] = (r0 + i) * step;\n            } else if (step < 0) {\n              step = -step;\n              let r0 = Math.round(min * step);\n              let r1 = Math.round(max * step);\n              if (!(r0 / step <= min)) --r0;\n              if (!(r1 / step > max)) ++r1;\n              let n = r1 - r0 + 1;\n              t = new Float64Array(n);\n              for (let i = 0; i < n; ++i) t[i] = (r0 + i) / step;\n            } else {\n              t = [min];\n            }\n          } else {\n            t = [min];\n          }\n        } else {\n          t = ticks(min, max, t);\n        }\n      } else if (isInterval(t)) {\n        if (domain === extent) {\n          min = t.floor(min);\n          max = t.offset(t.floor(max));\n        }\n        t = t.range(min, t.offset(max));\n      }\n      T = t;\n    }\n    const E = [];\n    if (T.length === 1) E.push([T[0], T[0]]); // collapsed domain\n    else for (let i = 1; i < T.length; ++i) E.push([T[i - 1], T[i]]);\n    E.bin = (cumulative < 0 ? bin1cn : cumulative > 0 ? bin1cp : bin1)(E, T, V);\n    return E;\n  };\n  bin.label = labelof(value);\n  return bin;\n}\n\nexport function maybeThresholds(thresholds, interval, defaultThresholds = thresholdAuto) {\n  if (thresholds === undefined) {\n    return interval === undefined ? defaultThresholds : maybeRangeInterval(interval);\n  }\n  if (typeof thresholds === \"string\") {\n    switch (thresholds.toLowerCase()) {\n      case \"freedman-diaconis\":\n        return thresholdFreedmanDiaconis;\n      case \"scott\":\n        return thresholdScott;\n      case \"sturges\":\n        return thresholdSturges;\n      case \"auto\":\n        return thresholdAuto;\n    }\n    return maybeUtcInterval(thresholds);\n  }\n  return thresholds; // pass array, count, or function to bin.thresholds\n}\n\nfunction maybeBinOutputs(outputs, inputs) {\n  return maybeOutputs(outputs, inputs, maybeBinOutput);\n}\n\nfunction maybeBinOutput(name, reduce, inputs) {\n  return maybeOutput(name, reduce, inputs, maybeBinEvaluator);\n}\n\nfunction maybeBinEvaluator(name, reduce, inputs) {\n  return maybeEvaluator(name, reduce, inputs, maybeBinReduce);\n}\n\nfunction maybeBinReduce(reduce, value) {\n  return maybeReduce(reduce, value, maybeBinReduceFallback);\n}\n\nfunction maybeBinReduceFallback(reduce) {\n  switch (`${reduce}`.toLowerCase()) {\n    case \"x\":\n      return reduceX;\n    case \"x1\":\n      return reduceX1;\n    case \"x2\":\n      return reduceX2;\n    case \"y\":\n      return reduceY;\n    case \"y1\":\n      return reduceY1;\n    case \"y2\":\n      return reduceY2;\n  }\n  throw new Error(`invalid bin reduce: ${reduce}`);\n}\n\nfunction thresholdAuto(values, min, max) {\n  return Math.min(200, thresholdScott(values, min, max));\n}\n\nfunction isTimeThresholds(t) {\n  return isTimeInterval(t) || (isIterable(t) && isTemporal(t));\n}\n\nfunction isTimeInterval(t) {\n  return isInterval(t) && typeof t === \"function\" && t() instanceof Date;\n}\n\nfunction isInterval(t) {\n  return typeof t?.range === \"function\";\n}\n\nfunction bing(EX, EY) {\n  return EX && EY\n    ? function* (I) {\n        const X = EX.bin(I); // first bin on x\n        for (const [ix, [x1, x2]] of EX.entries()) {\n          const Y = EY.bin(X[ix]); // then bin on y\n          for (const [iy, [y1, y2]] of EY.entries()) {\n            yield [Y[iy], {x1, y1, x2, y2}];\n          }\n        }\n      }\n    : EX\n    ? function* (I) {\n        const X = EX.bin(I);\n        for (const [i, [x1, x2]] of EX.entries()) {\n          yield [X[i], {x1, x2}];\n        }\n      }\n    : function* (I) {\n        const Y = EY.bin(I);\n        for (const [i, [y1, y2]] of EY.entries()) {\n          yield [Y[i], {y1, y2}];\n        }\n      };\n}\n\n// non-cumulative distribution\nfunction bin1(E, T, V) {\n  T = coerceNumbers(T); // for faster bisection\n  return (I) => {\n    const B = E.map(() => []);\n    for (const i of I) B[bisect(T, V[i]) - 1]?.push(i); // TODO quantization?\n    return B;\n  };\n}\n\n// cumulative distribution\nfunction bin1cp(E, T, V) {\n  const bin = bin1(E, T, V);\n  return (I) => {\n    const B = bin(I);\n    for (let i = 1, n = B.length; i < n; ++i) {\n      const C = B[i - 1];\n      const b = B[i];\n      for (const j of C) b.push(j);\n    }\n    return B;\n  };\n}\n\n// complementary cumulative distribution\nfunction bin1cn(E, T, V) {\n  const bin = bin1(E, T, V);\n  return (I) => {\n    const B = bin(I);\n    for (let i = B.length - 2; i >= 0; --i) {\n      const C = B[i + 1];\n      const b = B[i];\n      for (const j of C) b.push(j);\n    }\n    return B;\n  };\n}\n\nfunction mid1(x1, x2) {\n  const m = (+x1 + +x2) / 2;\n  return x1 instanceof Date ? new Date(m) : m;\n}\n\nconst reduceX = {\n  reduceIndex(I, X, {x1, x2}) {\n    return mid1(x1, x2);\n  }\n};\n\nconst reduceY = {\n  reduceIndex(I, X, {y1, y2}) {\n    return mid1(y1, y2);\n  }\n};\n\nconst reduceX1 = {\n  reduceIndex(I, X, {x1}) {\n    return x1;\n  }\n};\n\nconst reduceX2 = {\n  reduceIndex(I, X, {x2}) {\n    return x2;\n  }\n};\n\nconst reduceY1 = {\n  reduceIndex(I, X, {y1}) {\n    return y1;\n  }\n};\n\nconst reduceY2 = {\n  reduceIndex(I, X, {y2}) {\n    return y2;\n  }\n};\n", "import {hasX, hasY, identity} from \"../options.js\";\n\nexport function maybeIdentityX(options = {}) {\n  return hasX(options) ? options : {...options, x: identity};\n}\n\nexport function maybeIdentityY(options = {}) {\n  return hasY(options) ? options : {...options, y: identity};\n}\n", "import {InternMap, cumsum, greatest, group, groupSort, max, min, rollup, sum} from \"d3\";\nimport {ascendingDefined, descendingDefined} from \"../defined.js\";\nimport {withTip} from \"../mark.js\";\nimport {maybeApplyInterval, maybeColumn, maybeZ, maybeZero} from \"../options.js\";\nimport {column, field, mid, one, range, valueof} from \"../options.js\";\nimport {basic} from \"./basic.js\";\n\nexport function stackX(stackOptions = {}, options = {}) {\n  if (arguments.length === 1) [stackOptions, options] = mergeOptions(stackOptions);\n  const {y1, y = y1, x, ...rest} = options; // note: consumes x!\n  const [transform, Y, x1, x2] = stack(y, x, \"y\", \"x\", stackOptions, rest);\n  return {...transform, y1, y: Y, x1, x2, x: mid(x1, x2)};\n}\n\nexport function stackX1(stackOptions = {}, options = {}) {\n  if (arguments.length === 1) [stackOptions, options] = mergeOptions(stackOptions);\n  const {y1, y = y1, x} = options;\n  const [transform, Y, X] = stack(y, x, \"y\", \"x\", stackOptions, options);\n  return {...transform, y1, y: Y, x: X};\n}\n\nexport function stackX2(stackOptions = {}, options = {}) {\n  if (arguments.length === 1) [stackOptions, options] = mergeOptions(stackOptions);\n  const {y1, y = y1, x} = options;\n  const [transform, Y, , X] = stack(y, x, \"y\", \"x\", stackOptions, options);\n  return {...transform, y1, y: Y, x: X};\n}\n\nexport function stackY(stackOptions = {}, options = {}) {\n  if (arguments.length === 1) [stackOptions, options] = mergeOptions(stackOptions);\n  const {x1, x = x1, y, ...rest} = options; // note: consumes y!\n  const [transform, X, y1, y2] = stack(x, y, \"x\", \"y\", stackOptions, rest);\n  return {...transform, x1, x: X, y1, y2, y: mid(y1, y2)};\n}\n\nexport function stackY1(stackOptions = {}, options = {}) {\n  if (arguments.length === 1) [stackOptions, options] = mergeOptions(stackOptions);\n  const {x1, x = x1, y} = options;\n  const [transform, X, Y] = stack(x, y, \"x\", \"y\", stackOptions, options);\n  return {...transform, x1, x: X, y: Y};\n}\n\nexport function stackY2(stackOptions = {}, options = {}) {\n  if (arguments.length === 1) [stackOptions, options] = mergeOptions(stackOptions);\n  const {x1, x = x1, y} = options;\n  const [transform, X, , Y] = stack(x, y, \"x\", \"y\", stackOptions, options);\n  return {...transform, x1, x: X, y: Y};\n}\n\nexport function maybeStackX({x, x1, x2, ...options} = {}) {\n  options = withTip(options, \"y\");\n  if (x1 === undefined && x2 === undefined) return stackX({x, ...options});\n  [x1, x2] = maybeZero(x, x1, x2);\n  return {...options, x1, x2};\n}\n\nexport function maybeStackY({y, y1, y2, ...options} = {}) {\n  options = withTip(options, \"x\");\n  if (y1 === undefined && y2 === undefined) return stackY({y, ...options});\n  [y1, y2] = maybeZero(y, y1, y2);\n  return {...options, y1, y2};\n}\n\n// The reverse option is ambiguous: it is both a stack option and a basic\n// transform. If only one options object is specified, we interpret it as a\n// stack option, and therefore must remove it from the propagated options.\nfunction mergeOptions(options) {\n  const {offset, order, reverse, ...rest} = options;\n  return [{offset, order, reverse}, rest];\n}\n\n// This is a hint to the tooltip mark that the y1 and y2 channels (for stackY,\n// or conversely x1 and x2 for stackX) represent a stacked length, and that the\n// tooltip should therefore show y2-y1 instead of an extent.\nconst lengthy = {length: true};\n\nfunction stack(x, y = one, kx, ky, {offset, order, reverse}, options) {\n  const z = maybeZ(options);\n  const [X, setX] = maybeColumn(x);\n  const [Y1, setY1] = column(y);\n  const [Y2, setY2] = column(y);\n  Y1.hint = Y2.hint = lengthy;\n  offset = maybeOffset(offset);\n  order = maybeOrder(order, offset, ky);\n  return [\n    basic(options, (data, facets, plotOptions) => {\n      const X = x == null ? undefined : setX(maybeApplyInterval(valueof(data, x), plotOptions?.[kx]));\n      const Y = valueof(data, y, Float64Array);\n      const Z = valueof(data, z);\n      const compare = order && order(data, X, Y, Z);\n      const n = data.length;\n      const Y1 = setY1(new Float64Array(n));\n      const Y2 = setY2(new Float64Array(n));\n      const facetstacks = [];\n      for (const facet of facets) {\n        const stacks = X ? Array.from(group(facet, (i) => X[i]).values()) : [facet];\n        if (compare) for (const stack of stacks) stack.sort(compare);\n        for (const stack of stacks) {\n          let yn = 0;\n          let yp = 0;\n          if (reverse) stack.reverse();\n          for (const i of stack) {\n            const y = Y[i];\n            if (y < 0) yn = Y2[i] = (Y1[i] = yn) + y;\n            else if (y > 0) yp = Y2[i] = (Y1[i] = yp) + y;\n            else Y2[i] = Y1[i] = yp; // NaN or zero\n          }\n        }\n        facetstacks.push(stacks);\n      }\n      if (offset) offset(facetstacks, Y1, Y2, Z);\n      return {data, facets};\n    }),\n    X,\n    Y1,\n    Y2\n  ];\n}\n\nfunction maybeOffset(offset) {\n  if (offset == null) return;\n  if (typeof offset === \"function\") return offset;\n  switch (`${offset}`.toLowerCase()) {\n    case \"expand\":\n    case \"normalize\":\n      return offsetExpand;\n    case \"center\":\n    case \"silhouette\":\n      return offsetCenter;\n    case \"wiggle\":\n      return offsetWiggle;\n  }\n  throw new Error(`unknown offset: ${offset}`);\n}\n\n// Given a single stack, returns the minimum and maximum values from the given\n// Y2 column. Note that this relies on Y2 always being the outer column for\n// diverging values.\nfunction extent(stack, Y2) {\n  let min = 0,\n    max = 0;\n  for (const i of stack) {\n    const y = Y2[i];\n    if (y < min) min = y;\n    if (y > max) max = y;\n  }\n  return [min, max];\n}\n\nfunction offsetExpand(facetstacks, Y1, Y2) {\n  for (const stacks of facetstacks) {\n    for (const stack of stacks) {\n      const [yn, yp] = extent(stack, Y2);\n      for (const i of stack) {\n        const m = 1 / (yp - yn || 1);\n        Y1[i] = m * (Y1[i] - yn);\n        Y2[i] = m * (Y2[i] - yn);\n      }\n    }\n  }\n}\n\nfunction offsetCenter(facetstacks, Y1, Y2) {\n  for (const stacks of facetstacks) {\n    for (const stack of stacks) {\n      const [yn, yp] = extent(stack, Y2);\n      for (const i of stack) {\n        const m = (yp + yn) / 2;\n        Y1[i] -= m;\n        Y2[i] -= m;\n      }\n    }\n    offsetZero(stacks, Y1, Y2);\n  }\n  offsetCenterFacets(facetstacks, Y1, Y2);\n}\n\nfunction offsetWiggle(facetstacks, Y1, Y2, Z) {\n  for (const stacks of facetstacks) {\n    const prev = new InternMap();\n    let y = 0;\n    for (const stack of stacks) {\n      let j = -1;\n      const Fi = stack.map((i) => Math.abs(Y2[i] - Y1[i]));\n      const Df = stack.map((i) => {\n        j = Z ? Z[i] : ++j;\n        const value = Y2[i] - Y1[i];\n        const diff = prev.has(j) ? value - prev.get(j) : 0;\n        prev.set(j, value);\n        return diff;\n      });\n      const Cf1 = [0, ...cumsum(Df)];\n      for (const i of stack) {\n        Y1[i] += y;\n        Y2[i] += y;\n      }\n      const s1 = sum(Fi);\n      if (s1) y -= sum(Fi, (d, i) => (Df[i] / 2 + Cf1[i]) * d) / s1;\n    }\n    offsetZero(stacks, Y1, Y2);\n  }\n  offsetCenterFacets(facetstacks, Y1, Y2);\n}\n\nfunction offsetZero(stacks, Y1, Y2) {\n  const m = min(stacks, (stack) => min(stack, (i) => Y1[i]));\n  for (const stack of stacks) {\n    for (const i of stack) {\n      Y1[i] -= m;\n      Y2[i] -= m;\n    }\n  }\n}\n\nfunction offsetCenterFacets(facetstacks, Y1, Y2) {\n  const n = facetstacks.length;\n  if (n === 1) return;\n  const facets = facetstacks.map((stacks) => stacks.flat());\n  const m = facets.map((I) => (min(I, (i) => Y1[i]) + max(I, (i) => Y2[i])) / 2);\n  const m0 = min(m);\n  for (let j = 0; j < n; j++) {\n    const p = m0 - m[j];\n    for (const i of facets[j]) {\n      Y1[i] += p;\n      Y2[i] += p;\n    }\n  }\n}\n\nfunction maybeOrder(order, offset, ky) {\n  if (order === undefined && offset === offsetWiggle) return orderInsideOut(ascendingDefined);\n  if (order == null) return;\n  if (typeof order === \"string\") {\n    const negate = order.startsWith(\"-\");\n    const compare = negate ? descendingDefined : ascendingDefined;\n    switch ((negate ? order.slice(1) : order).toLowerCase()) {\n      case \"value\":\n      case ky:\n        return orderY(compare);\n      case \"z\":\n        return orderZ(compare);\n      case \"sum\":\n        return orderSum(compare);\n      case \"appearance\":\n        return orderAppearance(compare);\n      case \"inside-out\":\n        return orderInsideOut(compare);\n    }\n    return orderAccessor(field(order));\n  }\n  if (typeof order === \"function\") return (order.length === 1 ? orderAccessor : orderComparator)(order);\n  if (Array.isArray(order)) return orderGiven(order);\n  throw new Error(`invalid order: ${order}`);\n}\n\n// by value\nfunction orderY(compare) {\n  return (data, X, Y) => (i, j) => compare(Y[i], Y[j]);\n}\n\n// by location\nfunction orderZ(compare) {\n  return (data, X, Y, Z) => (i, j) => compare(Z[i], Z[j]);\n}\n\n// by sum of value (a.k.a. \u201Cascending\u201D)\nfunction orderSum(compare) {\n  return orderZDomain(compare, (data, X, Y, Z) =>\n    groupSort(\n      range(data),\n      (I) => sum(I, (i) => Y[i]),\n      (i) => Z[i]\n    )\n  );\n}\n\n// by x = argmax of value\nfunction orderAppearance(compare) {\n  return orderZDomain(compare, (data, X, Y, Z) =>\n    groupSort(\n      range(data),\n      (I) => X[greatest(I, (i) => Y[i])],\n      (i) => Z[i]\n    )\n  );\n}\n\n// by x = argmax of value, but rearranged inside-out by alternating series\n// according to the sign of a running divergence of sums\nfunction orderInsideOut(compare) {\n  return orderZDomain(compare, (data, X, Y, Z) => {\n    const I = range(data);\n    const K = groupSort(\n      I,\n      (I) => X[greatest(I, (i) => Y[i])],\n      (i) => Z[i]\n    );\n    const sums = rollup(\n      I,\n      (I) => sum(I, (i) => Y[i]),\n      (i) => Z[i]\n    );\n    const Kp = [],\n      Kn = [];\n    let s = 0;\n    for (const k of K) {\n      if (s < 0) {\n        s += sums.get(k);\n        Kp.push(k);\n      } else {\n        s -= sums.get(k);\n        Kn.push(k);\n      }\n    }\n    return Kn.reverse().concat(Kp);\n  });\n}\n\nfunction orderAccessor(f) {\n  return (data) => {\n    const O = valueof(data, f);\n    return (i, j) => ascendingDefined(O[i], O[j]);\n  };\n}\n\nfunction orderComparator(f) {\n  return (data) => (i, j) => f(data[i], data[j]);\n}\n\nfunction orderGiven(domain) {\n  return orderZDomain(ascendingDefined, () => domain);\n}\n\n// Given an ordering (domain) of distinct values in z that can be derived from\n// the data, returns a comparator that can be used to sort stacks. Note that\n// this is a series order: it will be consistent across stacks.\nfunction orderZDomain(compare, domain) {\n  return (data, X, Y, Z) => {\n    if (!Z) throw new Error(\"missing channel: z\");\n    const map = new InternMap(domain(data, X, Y, Z).map((d, i) => [d, i]));\n    return (i, j) => compare(map.get(Z[i]), map.get(Z[j]));\n  };\n}\n", "import {create} from \"../context.js\";\nimport {Mark} from \"../mark.js\";\nimport {hasXY, identity, indexOf, number} from \"../options.js\";\nimport {isCollapsed} from \"../scales.js\";\nimport {applyAttr, applyChannelStyles, applyDirectStyles, applyIndirectStyles, applyTransform} from \"../style.js\";\nimport {impliedString} from \"../style.js\";\nimport {maybeIdentityX, maybeIdentityY} from \"../transforms/identity.js\";\nimport {maybeTrivialIntervalX, maybeTrivialIntervalY} from \"../transforms/interval.js\";\nimport {maybeStackX, maybeStackY} from \"../transforms/stack.js\";\n\nconst defaults = {\n  ariaLabel: \"rect\"\n};\n\nexport class Rect extends Mark {\n  constructor(data, options = {}) {\n    const {\n      x1,\n      y1,\n      x2,\n      y2,\n      inset = 0,\n      insetTop = inset,\n      insetRight = inset,\n      insetBottom = inset,\n      insetLeft = inset,\n      rx,\n      ry\n    } = options;\n    super(\n      data,\n      {\n        x1: {value: x1, scale: \"x\", optional: true},\n        y1: {value: y1, scale: \"y\", optional: true},\n        x2: {value: x2, scale: \"x\", optional: true},\n        y2: {value: y2, scale: \"y\", optional: true}\n      },\n      options,\n      defaults\n    );\n    this.insetTop = number(insetTop);\n    this.insetRight = number(insetRight);\n    this.insetBottom = number(insetBottom);\n    this.insetLeft = number(insetLeft);\n    this.rx = impliedString(rx, \"auto\"); // number or percentage\n    this.ry = impliedString(ry, \"auto\");\n  }\n  render(index, scales, channels, dimensions, context) {\n    const {x, y} = scales;\n    const {x1: X1, y1: Y1, x2: X2, y2: Y2} = channels;\n    const {marginTop, marginRight, marginBottom, marginLeft, width, height} = dimensions;\n    const {projection} = context;\n    const {insetTop, insetRight, insetBottom, insetLeft, rx, ry} = this;\n    return create(\"svg:g\", context)\n      .call(applyIndirectStyles, this, dimensions, context)\n      .call(applyTransform, this, {x: X1 && X2 && x, y: Y1 && Y2 && y}, 0, 0)\n      .call((g) =>\n        g\n          .selectAll()\n          .data(index)\n          .enter()\n          .append(\"rect\")\n          .call(applyDirectStyles, this)\n          .attr(\n            \"x\",\n            X1 && X2 && (projection || !isCollapsed(x))\n              ? (i) => Math.min(X1[i], X2[i]) + insetLeft\n              : marginLeft + insetLeft\n          )\n          .attr(\n            \"y\",\n            Y1 && Y2 && (projection || !isCollapsed(y))\n              ? (i) => Math.min(Y1[i], Y2[i]) + insetTop\n              : marginTop + insetTop\n          )\n          .attr(\n            \"width\",\n            X1 && X2 && (projection || !isCollapsed(x))\n              ? (i) => Math.max(0, Math.abs(X2[i] - X1[i]) - insetLeft - insetRight)\n              : width - marginRight - marginLeft - insetRight - insetLeft\n          )\n          .attr(\n            \"height\",\n            Y1 && Y2 && (projection || !isCollapsed(y))\n              ? (i) => Math.max(0, Math.abs(Y1[i] - Y2[i]) - insetTop - insetBottom)\n              : height - marginTop - marginBottom - insetTop - insetBottom\n          )\n          .call(applyAttr, \"rx\", rx)\n          .call(applyAttr, \"ry\", ry)\n          .call(applyChannelStyles, this, channels)\n      )\n      .node();\n  }\n}\n\nexport function rect(data, options) {\n  return new Rect(data, maybeTrivialIntervalX(maybeTrivialIntervalY(options)));\n}\n\nexport function rectX(data, options = {}) {\n  if (!hasXY(options)) options = {...options, y: indexOf, x2: identity, interval: 1};\n  return new Rect(data, maybeStackX(maybeTrivialIntervalY(maybeIdentityX(options))));\n}\n\nexport function rectY(data, options = {}) {\n  if (!hasXY(options)) options = {...options, x: indexOf, y2: identity, interval: 1};\n  return new Rect(data, maybeStackY(maybeTrivialIntervalX(maybeIdentityY(options))));\n}\n", "/**\n * @license\n * Copyright 2024 The Go Authors. All rights reserved.\n * Use of this source code is governed by a BSD-style\n * license that can be found in the LICENSE file.\n */\n\n/**\n * A treeNavController adds dynamic expansion and selection of index list\n * elements based on scroll position.\n *\n * Use it as follows:\n *  - Add the .js-Tree class to a parent element of your index and content.\n *  - Add the .js-Tree-item class to <li> elements of your index.\n *  - Add the .js-Tree-heading class to <hN> heading elements of your content.\n *\n * Then, when you scroll content, the 'aria-selected' and 'aria-expanded'\n * attributes of your tree items will be set according to the current content\n * scroll position. The included treenav.css implements styling to expand and\n * highlight index elements according to these attributes.\n */\nexport function treeNavController(el: HTMLElement) {\n  const headings = el.querySelectorAll<HTMLHeadingElement>(\".js-Tree-heading\");\n  const callback = () => {\n    // Collect heading elements above the scroll position.\n    let above: HTMLHeadingElement[] = [];\n    for (const h of headings) {\n      const rect = h.getBoundingClientRect();\n      if (rect.height && rect.top < 80) {\n        above.unshift(h);\n      }\n    }\n    // Highlight the first heading even if we're not yet scrolled below it.\n    if (above.length == 0 && headings[0] instanceof HTMLHeadingElement) {\n      above = [headings[0]];\n    }\n    // Collect the set of heading levels we're immediately below, at most one\n    // per heading level, by decresing level.\n    // e.g. [<h3 element>, <h2 element>, <h1 element>]\n    let threshold = Infinity;\n    const active: HTMLHeadingElement[] = [];\n    for (const h of above) {\n      const level = Number(h.tagName[1]);\n      if (level < threshold) {\n        threshold = level;\n        active.push(h);\n      }\n    }\n    // Update aria-selected and aria-expanded for all items, per the current\n    // position.\n    const navItems = el.querySelectorAll<HTMLElement>(\".js-Tree-item\");\n    for (const item of navItems) {\n      const headingId = item.dataset[\"headingId\"];\n      let selected = false,\n        expanded = false;\n      for (const h of active) {\n        if (h.id === headingId) {\n          if (h === active[0]) {\n            selected = true;\n          } else {\n            expanded = true;\n          }\n          break;\n        }\n      }\n      item.setAttribute(\"aria-selected\", selected ? \"true\" : \"false\");\n      item.setAttribute(\"aria-expanded\", expanded ? \"true\" : \"false\");\n    }\n  };\n\n  // Update on changes to viewport intersection, defensively debouncing to\n  // guard against performance issues.\n  const observer = new IntersectionObserver(debounce(callback, 20));\n  for (const h of headings) {\n    observer.observe(h);\n  }\n}\n\nexport function debounce<T extends (...args: unknown[]) => unknown>(\n  callback: T,\n  wait: number\n) {\n  let timeout: number;\n  return (...args: unknown[]) => {\n    clearTimeout(timeout);\n    timeout = setTimeout(() => callback(...args), wait);\n  };\n}\n", "/**\n * @license\n * Copyright 2023 The Go Authors. All rights reserved.\n * Use of this source code is governed by a BSD-style\n * license that can be found in the LICENSE file.\n */\n\nimport * as Plot from \"@observablehq/plot\";\n\nimport { debounce } from \"../shared/treenav\";\n\ndeclare global {\n  interface Page {\n    Charts: ChartData;\n  }\n\n  interface ChartData {\n    Programs: Program[];\n    DateRange: [string, string];\n    UploadDay: Plot.TimeIntervalName;\n  }\n\n  interface Program {\n    ID: string;\n    Name: string;\n    Counters: Counter[];\n    Active: boolean;\n  }\n\n  interface Counter {\n    ID: string;\n    Name: string;\n    Data: Datum[];\n  }\n\n  interface Datum {\n    [key: string]: any;\n    Week: string;\n    Program: string;\n    Version: string;\n    GOARCH: string;\n    GOOS: string;\n    GoVersion: string;\n    Key: string;\n    Value: number;\n  }\n  const Page: Page;\n}\n\nwindow.onload = function () {\n  drawCharts();\n  configSelector();\n  breadcrumbController();\n  sectionController();\n};\n\n// sectionController adds event listeners to the section headers\n// to toggle them open and closed.\nfunction sectionController() {\n  const html = document.querySelector(\"html\")!;\n  for (const e of document.querySelectorAll(\"h2\")) {\n    e.addEventListener(\"click\", function () {\n      let closed = localStorage.getItem(\"closed-sections\")?.split(\",\");\n      if (closed?.includes(this.id)) {\n        closed = closed.filter((v) => v !== this.id);\n        const str = closed.join(\",\");\n        localStorage.setItem(\"closed-sections\", str);\n        html.setAttribute(\"data-closed-sections\", str);\n      } else {\n        closed = [this.id].concat(closed ?? []);\n        const str = closed.join(\",\");\n        localStorage.setItem(\"closed-sections\", str);\n        html.setAttribute(\"data-closed-sections\", str);\n      }\n    });\n  }\n}\n\n// drawCharts draws the charts using @observable/plot. It is called when\n// the page is first rendered and when a facet is selected.\nfunction drawCharts() {\n  for (const program of Page.Charts.Programs ?? []) {\n    for (const counter of program.Counters ?? []) {\n      const rectYOpts: Plot.BinXInputs<Plot.RectYOptions> = {\n        tip: true,\n        x: (d: Datum) => new Date(d.Week),\n        y: (d: Datum) => d.Value,\n        interval: Page.Charts.UploadDay,\n        fill: (d: Datum) => {\n          const n = Number(d.Key);\n          return isNaN(n) ? d.Key : n;\n        },\n      };\n\n      const chart = Plot.plot({\n        nice: true,\n        x: {\n          type: \"utc\",\n          domain: Page.Charts.DateRange.map((d) => new Date(d)),\n          label: \"Week\",\n        },\n        y: {\n          label: \"Value\",\n        },\n        color: {\n          type: \"ordinal\",\n          legend: true,\n          scheme: \"Spectral\",\n          reverse: true,\n          label: \"Counter\",\n        },\n        height: 256,\n        style: \"overflow:visible;width:100%;background:transparent\",\n        marks: [\n          Plot.rectY(counter.Data, Plot.binX({ y: \"sum\" }, rectYOpts)),\n          Plot.ruleY([0]),\n        ],\n      });\n      document\n        .querySelector(`[data-chart-id=\"${counter.ID}\"]`)\n        ?.replaceChildren(chart);\n    }\n  }\n}\n\n// configSelector adds an event listener that reloads the page when a config\n// version is selected.\nfunction configSelector() {\n  const el = document.querySelector<HTMLButtonElement>(\".js-selectConfig\");\n  el?.addEventListener(\"change\", () => {\n    const params = new URLSearchParams(location.search);\n    params.set(el.name, el.value);\n    history.replaceState(null, \"\", \"?\" + params.toString());\n    location.reload();\n  });\n}\n\n// breadcrumbController updates the navigation header as the user scrolls\n// that page displaying information about the content currently in the\n// viewport.\nfunction breadcrumbController() {\n  const headings =\n    document.querySelectorAll<HTMLHeadingElement>(\"h1, h2, h3, h4\");\n  const callback = debounce(() => {\n    let above: HTMLHeadingElement[] = [];\n    for (const h of headings) {\n      const rect = h.getBoundingClientRect();\n      if (rect.height && rect.top < 80) {\n        above.unshift(h);\n      }\n    }\n    if (above.length < 2) {\n      above = [];\n    }\n    let threshold = Infinity;\n    const els: HTMLHeadingElement[] = [];\n    for (const h of above) {\n      const level = Number(h.tagName[1]);\n      if (level < threshold) {\n        threshold = level;\n        els.unshift(h);\n      }\n    }\n    const breadcrumb = document.querySelector(\".js-breadcrumb ol\");\n    const items = [];\n    for (const h of els) {\n      breadcrumb?.replaceChildren;\n      const li = document.createElement(\"li\");\n      const a = document.createElement(\"a\");\n      a.href = `#${h.id}`;\n      a.innerText = h.getAttribute(\"data-label\") ?? h.innerText;\n      li.appendChild(a);\n      items.push(li);\n    }\n    breadcrumb?.replaceChildren(...items);\n  }, 100);\n\n  const observer = new IntersectionObserver(callback);\n  for (const h of headings) {\n    observer.observe(h);\n  }\n}\n\nexport {};\n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AS,CAAC,EACtD,SAAS,OAAO,CAClB,CAAC,CACH,CAKA,SAASjB,IAAuB,CAC9B,IAAMkB,EACJ,SAAS,iBAAqC,gBAAgB,EAC1DC,EAAWC,GAAS,IAAM,CAC9B,IAAIC,EAA8B,CAAC,EACnC,QAAWC,KAAKJ,EAAU,CACxB,IAAMK,EAAOD,EAAE,sBAAsB,EACjCC,EAAK,QAAUA,EAAK,IAAM,IAC5BF,EAAM,QAAQC,CAAC,EAGfD,EAAM,OAAS,IACjBA,EAAQ,CAAC,GAEX,IAAIG,EAAY,IACVC,EAA4B,CAAC,EACnC,QAAWH,KAAKD,EAAO,CACrB,IAAMK,EAAQ,OAAOJ,EAAE,QAAQ,CAAC,CAAC,EAC7BI,EAAQF,IACVA,EAAYE,EACZD,EAAI,QAAQH,CAAC,GAGjB,IAAMK,EAAa,SAAS,cAAc,mBAAmB,EACvDC,EAAQ,CAAC,EACf,QAAWN,KAAKG,EAAK,CACnBE,GAAY,gBACZ,IAAME,EAAK,SAAS,cAAc,IAAI,EAChCC,EAAI,SAAS,cAAc,GAAG,EACpCA,EAAE,KAAO,IAAIR,EAAE,KACfQ,EAAE,UAAYR,EAAE,aAAa,YAAY,GAAKA,EAAE,UAChDO,EAAG,YAAYC,CAAC,EAChBF,EAAM,KAAKC,CAAE,EAEfF,GAAY,gBAAgB,GAAGC,CAAK,CACtC,EAAG,GAAG,EAEAG,EAAW,IAAI,qBAAqBZ,CAAQ,EAClD,QAAWG,KAAKJ,EACda,EAAS,QAAQT,CAAC,CAEtB",
+  "names": ["ascending", "a", "b", "descending", "a", "b", "bisector", "f", "compare1", "compare2", "delta", "ascending", "d", "x", "descending", "zero", "left", "a", "lo", "hi", "mid", "right", "center", "i", "number", "x", "numbers", "values", "valueof", "value", "index", "ascendingBisect", "bisector", "ascending", "bisectRight", "bisectLeft", "bisectCenter", "number", "bisect_default", "count", "values", "valueof", "value", "index", "length", "array", "empty", "arrayify", "values", "reducer", "reduce", "cross", "lengths", "j", "index", "product", "i", "cumsum", "values", "valueof", "sum", "index", "v", "variance", "values", "valueof", "count", "delta", "mean", "sum", "value", "index", "deviation", "values", "valueof", "v", "variance", "extent", "values", "valueof", "min", "max", "value", "index", "Adder", "x", "p", "i", "j", "y", "hi", "lo", "InternMap", "entries", "key", "keyof", "value", "intern_get", "intern_set", "intern_delete", "InternSet", "values", "_intern", "_key", "identity", "x", "group", "values", "keys", "nest", "identity", "rollup", "values", "reduce", "keys", "nest", "identity", "rollups", "nest", "values", "map", "reduce", "keys", "regroup", "i", "groups", "InternMap", "keyof", "index", "value", "key", "group", "permute", "source", "keys", "key", "sort", "values", "F", "f", "index", "d", "i", "j", "c", "ascendingDefined", "permute", "compareDefined", "compare", "ascending", "a", "b", "x", "groupSort", "values", "reduce", "key", "sort", "rollup", "ak", "av", "bk", "bv", "ascending", "group", "e10", "e5", "e2", "tickSpec", "start", "stop", "count", "step", "power", "error", "factor", "i1", "i2", "inc", "ticks", "reverse", "n", "i", "tickIncrement", "tickStep", "thresholdSturges", "values", "count", "max", "values", "valueof", "value", "index", "maxIndex", "values", "valueof", "max", "index", "value", "min", "values", "valueof", "value", "index", "minIndex", "values", "valueof", "min", "index", "value", "quickselect", "array", "k", "left", "right", "compare", "ascendingDefined", "compareDefined", "n", "m", "z", "s", "sd", "newLeft", "newRight", "t", "i", "j", "swap", "greatest", "values", "compare", "ascending", "max", "defined", "maxValue", "element", "value", "quantile", "values", "p", "valueof", "numbers", "n", "min", "max", "i", "i0", "value0", "quickselect", "value1", "quantileSorted", "number", "thresholdFreedmanDiaconis", "values", "min", "max", "c", "count", "d", "quantile", "thresholdScott", "values", "min", "max", "c", "count", "d", "deviation", "mean", "values", "valueof", "count", "sum", "value", "index", "median", "values", "valueof", "quantile", "flatten", "arrays", "array", "merge", "mode", "values", "valueof", "counts", "InternMap", "value", "index", "modeValue", "modeCount", "count", "pairs", "values", "pairof", "pair", "previous", "first", "value", "a", "b", "range", "start", "stop", "step", "n", "i", "sum", "values", "valueof", "value", "index", "reverse", "values", "identity_default", "x", "top", "right", "bottom", "left", "epsilon", "translateX", "x", "translateY", "y", "number", "scale", "d", "center", "offset", "entering", "axis", "orient", "tickArguments", "tickValues", "tickFormat", "tickSizeInner", "tickSizeOuter", "tickPadding", "k", "transform", "context", "values", "format", "identity_default", "spacing", "range", "range0", "range1", "position", "selection", "path", "tick", "tickExit", "tickEnter", "line", "text", "p", "_", "axisBottom", "scale", "axis", "bottom", "noop", "dispatch", "i", "n", "_", "t", "Dispatch", "parseTypenames", "typenames", "types", "name", "typename", "callback", "T", "get", "set", "copy", "type", "that", "args", "c", "dispatch_default", "xhtml", "namespaces_default", "namespace_default", "name", "prefix", "i", "namespaces_default", "creatorInherit", "name", "document", "uri", "xhtml", "creatorFixed", "fullname", "creator_default", "namespace_default", "none", "selector_default", "selector", "select_default", "select", "selector_default", "groups", "m", "subgroups", "j", "group", "n", "subgroup", "node", "subnode", "i", "Selection", "array", "x", "empty", "selectorAll_default", "selector", "arrayAll", "select", "array", "selectAll_default", "selectorAll_default", "groups", "m", "subgroups", "parents", "j", "group", "n", "node", "i", "Selection", "matcher_default", "selector", "childMatcher", "node", "find", "childFind", "match", "childFirst", "selectChild_default", "childMatcher", "filter", "children", "childrenFilter", "match", "selectChildren_default", "childMatcher", "filter_default", "match", "matcher_default", "groups", "m", "subgroups", "j", "group", "n", "subgroup", "node", "i", "Selection", "sparse_default", "update", "enter_default", "Selection", "sparse_default", "EnterNode", "parent", "datum", "child", "next", "selector", "constant_default", "x", "bindIndex", "parent", "group", "enter", "update", "exit", "data", "i", "node", "groupLength", "dataLength", "EnterNode", "bindKey", "key", "nodeByKeyValue", "keyValues", "keyValue", "datum", "data_default", "value", "bind", "parents", "groups", "constant_default", "m", "j", "arraylike", "enterGroup", "updateGroup", "exitGroup", "i0", "i1", "previous", "next", "Selection", "exit_default", "Selection", "sparse_default", "join_default", "onenter", "onupdate", "onexit", "enter", "update", "exit", "merge_default", "context", "selection", "groups0", "groups1", "m0", "m1", "m", "merges", "j", "group0", "group1", "n", "merge", "node", "i", "Selection", "order_default", "groups", "j", "m", "group", "i", "next", "node", "sort_default", "compare", "ascending", "compareNode", "a", "b", "groups", "m", "sortgroups", "j", "group", "n", "sortgroup", "node", "i", "Selection", "call_default", "callback", "nodes_default", "node_default", "groups", "j", "m", "group", "i", "n", "node", "size_default", "size", "node", "empty_default", "each_default", "callback", "groups", "j", "m", "group", "n", "node", "attrRemove", "name", "attrRemoveNS", "fullname", "attrConstant", "value", "attrConstantNS", "attrFunction", "v", "attrFunctionNS", "attr_default", "namespace_default", "node", "window_default", "node", "styleRemove", "name", "styleConstant", "value", "priority", "styleFunction", "v", "style_default", "styleValue", "node", "window_default", "propertyRemove", "name", "propertyConstant", "value", "propertyFunction", "v", "property_default", "classArray", "string", "classList", "node", "ClassList", "name", "i", "classedAdd", "names", "list", "n", "classedRemove", "classedTrue", "classedFalse", "classedFunction", "value", "classed_default", "textRemove", "textConstant", "value", "textFunction", "v", "text_default", "htmlRemove", "htmlConstant", "value", "htmlFunction", "v", "html_default", "raise", "raise_default", "lower", "lower_default", "append_default", "name", "create", "creator_default", "constantNull", "insert_default", "name", "before", "create", "creator_default", "select", "selector_default", "remove", "parent", "remove_default", "selection_cloneShallow", "clone", "parent", "selection_cloneDeep", "clone_default", "deep", "datum_default", "value", "contextListener", "listener", "event", "parseTypenames", "typenames", "t", "name", "i", "onRemove", "typename", "on", "j", "m", "o", "onAdd", "value", "options", "on_default", "n", "dispatchEvent", "node", "type", "params", "window", "window_default", "event", "dispatchConstant", "dispatchFunction", "dispatch_default", "iterator_default", "groups", "j", "m", "group", "i", "n", "node", "root", "Selection", "groups", "parents", "selection", "selection_selection", "select_default", "selectAll_default", "selectChild_default", "selectChildren_default", "filter_default", "data_default", "enter_default", "exit_default", "join_default", "merge_default", "order_default", "sort_default", "call_default", "nodes_default", "node_default", "size_default", "empty_default", "each_default", "attr_default", "style_default", "property_default", "classed_default", "text_default", "html_default", "raise_default", "lower_default", "append_default", "insert_default", "remove_default", "clone_default", "datum_default", "on_default", "dispatch_default", "iterator_default", "selection_default", "select_default", "selector", "Selection", "root", "sourceEvent_default", "event", "sourceEvent", "pointer_default", "event", "node", "sourceEvent_default", "svg", "point", "rect", "define_default", "constructor", "factory", "prototype", "extend", "parent", "definition", "key", "Color", "darker", "brighter", "reI", "reN", "reP", "reHex", "reRgbInteger", "reRgbPercent", "reRgbaInteger", "reRgbaPercent", "reHslPercent", "reHslaPercent", "named", "define_default", "color", "channels", "color_formatHex", "color_formatHex8", "color_formatHsl", "color_formatRgb", "hslConvert", "format", "m", "l", "rgbn", "Rgb", "rgba", "hsla", "n", "r", "g", "b", "a", "rgbConvert", "o", "rgb", "opacity", "extend", "k", "clampi", "clampa", "rgb_formatHex", "rgb_formatHex8", "rgb_formatRgb", "hex", "value", "h", "s", "Hsl", "min", "max", "hsl", "m2", "m1", "hsl2rgb", "clamph", "clampt", "radians", "degrees", "K", "Xn", "Yn", "Zn", "t0", "t1", "t2", "t3", "labConvert", "o", "Lab", "Hcl", "hcl2lab", "Rgb", "rgbConvert", "r", "rgb2lrgb", "g", "b", "y", "xyz2lab", "x", "z", "lab", "l", "a", "b", "opacity", "labConvert", "Lab", "define_default", "extend", "Color", "k", "K", "y", "x", "z", "Xn", "lab2xyz", "Yn", "Zn", "Rgb", "lrgb2rgb", "xyz2lab", "t3", "t2", "t0", "t1", "rgb2lrgb", "hclConvert", "o", "Hcl", "h", "degrees", "hcl", "h", "c", "l", "opacity", "hclConvert", "Hcl", "hcl2lab", "o", "Lab", "radians", "define_default", "extend", "Color", "k", "K", "A", "B", "C", "D", "E", "ED", "EB", "BC_DA", "cubehelixConvert", "o", "Cubehelix", "Rgb", "rgbConvert", "r", "g", "b", "l", "bl", "k", "s", "h", "degrees", "cubehelix", "opacity", "define_default", "extend", "Color", "brighter", "darker", "radians", "a", "cosh", "sinh", "basis", "t1", "v0", "v1", "v2", "v3", "t2", "t3", "basis_default", "values", "n", "t", "i", "basisClosed_default", "values", "n", "t", "i", "v0", "v1", "v2", "v3", "basis", "constant_default", "x", "linear", "a", "d", "t", "exponential", "b", "y", "hue", "constant_default", "gamma", "nogamma", "rgb_default", "rgbGamma", "y", "color", "gamma", "rgb", "start", "end", "r", "g", "b", "opacity", "nogamma", "t", "rgbSpline", "spline", "colors", "i", "rgbBasis", "basis_default", "rgbBasisClosed", "basisClosed_default", "numberArray_default", "a", "b", "c", "i", "t", "isNumberArray", "x", "genericArray", "a", "b", "nb", "na", "x", "c", "i", "value_default", "t", "date_default", "a", "b", "d", "t", "number_default", "a", "b", "t", "object_default", "a", "b", "i", "c", "k", "value_default", "t", "reA", "reB", "zero", "b", "one", "t", "string_default", "a", "bi", "am", "bm", "bs", "i", "s", "q", "number_default", "o", "value_default", "a", "b", "t", "c", "constant_default", "number_default", "color", "rgb_default", "string_default", "date_default", "isNumberArray", "numberArray_default", "genericArray", "object_default", "round_default", "a", "b", "t", "degrees", "identity", "decompose_default", "a", "b", "c", "d", "e", "f", "scaleX", "scaleY", "skewX", "svgNode", "parseCss", "value", "m", "identity", "decompose_default", "parseSvg", "interpolateTransform", "parse", "pxComma", "pxParen", "degParen", "pop", "s", "translate", "xa", "ya", "xb", "yb", "q", "i", "number_default", "rotate", "a", "b", "skewX", "scale", "t", "n", "o", "interpolateTransformCss", "parseCss", "interpolateTransformSvg", "parseSvg", "hsl", "hue", "start", "end", "h", "s", "nogamma", "l", "opacity", "t", "hsl_default", "hslLong", "lab", "start", "end", "l", "nogamma", "a", "b", "opacity", "t", "hcl", "hue", "start", "end", "h", "c", "nogamma", "l", "opacity", "t", "hcl_default", "hclLong", "cubehelix", "hue", "cubehelixGamma", "y", "start", "end", "h", "s", "nogamma", "l", "opacity", "t", "cubehelix_default", "cubehelixLong", "piecewise", "interpolate", "values", "value_default", "i", "n", "v", "I", "t", "quantize_default", "interpolator", "n", "samples", "i", "frame", "timeout", "interval", "pokeDelay", "taskHead", "taskTail", "clockLast", "clockNow", "clockSkew", "clock", "setFrame", "f", "now", "clearNow", "Timer", "timer", "callback", "delay", "time", "sleep", "t", "timerFlush", "wake", "nap", "poke", "t0", "t1", "t2", "timeout_default", "callback", "delay", "time", "t", "Timer", "elapsed", "emptyOn", "dispatch_default", "emptyTween", "CREATED", "SCHEDULED", "STARTING", "STARTED", "RUNNING", "ENDING", "ENDED", "schedule_default", "node", "name", "id", "index", "group", "timing", "schedules", "create", "init", "schedule", "get", "set", "self", "tween", "timer", "elapsed", "start", "i", "j", "n", "o", "stop", "timeout_default", "tick", "t", "interrupt_default", "node", "name", "schedules", "schedule", "active", "empty", "i", "STARTING", "ENDING", "ENDED", "interrupt_default", "name", "tweenRemove", "id", "name", "tween0", "tween1", "schedule", "set", "tween", "i", "n", "tweenFunction", "value", "t", "tween_default", "get", "tweenValue", "transition", "node", "interpolate_default", "a", "b", "c", "number_default", "color", "rgb_default", "string_default", "attrRemove", "name", "attrRemoveNS", "fullname", "attrConstant", "interpolate", "value1", "string00", "string1", "interpolate0", "string0", "attrConstantNS", "attrFunction", "value", "string10", "attrFunctionNS", "attr_default", "namespace_default", "i", "interpolateTransformSvg", "interpolate_default", "tweenValue", "attrInterpolate", "name", "i", "t", "attrInterpolateNS", "fullname", "attrTweenNS", "value", "t0", "i0", "tween", "attrTween", "attrTween_default", "key", "namespace_default", "delayFunction", "id", "value", "init", "delayConstant", "delay_default", "get", "durationFunction", "id", "value", "set", "durationConstant", "duration_default", "get", "easeConstant", "id", "value", "set", "ease_default", "get", "easeVarying", "id", "value", "v", "set", "easeVarying_default", "filter_default", "match", "matcher_default", "groups", "m", "subgroups", "j", "group", "n", "subgroup", "node", "i", "Transition", "merge_default", "transition", "groups0", "groups1", "m0", "m1", "m", "merges", "j", "group0", "group1", "n", "merge", "node", "i", "Transition", "start", "name", "t", "i", "onFunction", "id", "listener", "on0", "on1", "sit", "init", "set", "schedule", "on", "on_default", "get", "removeFunction", "id", "parent", "i", "remove_default", "select_default", "select", "name", "id", "selector_default", "groups", "m", "subgroups", "j", "group", "n", "subgroup", "node", "subnode", "i", "schedule_default", "get", "Transition", "selectAll_default", "select", "name", "id", "selectorAll_default", "groups", "m", "subgroups", "parents", "j", "group", "n", "node", "i", "children", "child", "inherit", "get", "k", "l", "schedule_default", "Transition", "Selection", "selection_default", "styleNull", "name", "interpolate", "string00", "string10", "interpolate0", "string0", "styleValue", "string1", "styleRemove", "styleConstant", "value1", "styleFunction", "value", "styleMaybeRemove", "id", "on0", "on1", "listener0", "key", "event", "remove", "schedule", "set", "on", "listener", "style_default", "priority", "i", "interpolateTransformCss", "interpolate_default", "tweenValue", "styleInterpolate", "name", "i", "priority", "t", "styleTween", "value", "i0", "tween", "styleTween_default", "key", "textConstant", "value", "textFunction", "value1", "text_default", "tweenValue", "textInterpolate", "i", "t", "textTween", "value", "t0", "i0", "tween", "textTween_default", "key", "transition_default", "name", "id0", "id1", "newId", "groups", "m", "j", "group", "n", "node", "i", "inherit", "get", "schedule_default", "Transition", "end_default", "on0", "on1", "that", "id", "size", "resolve", "reject", "cancel", "end", "schedule", "set", "on", "id", "Transition", "groups", "parents", "name", "transition", "selection_default", "newId", "selection_prototype", "select_default", "selectAll_default", "filter_default", "merge_default", "transition_default", "on_default", "attr_default", "attrTween_default", "style_default", "styleTween_default", "text_default", "textTween_default", "remove_default", "tween_default", "delay_default", "duration_default", "ease_default", "easeVarying_default", "end_default", "cubicInOut", "defaultTiming", "cubicInOut", "inherit", "node", "id", "timing", "transition_default", "name", "Transition", "newId", "now", "groups", "m", "j", "group", "n", "i", "schedule_default", "selection_default", "interrupt_default", "transition_default", "abs", "max", "min", "number1", "e", "number2", "X", "type", "x", "xy", "Y", "y", "XY", "type", "pi", "tau", "epsilon", "tauEpsilon", "append", "strings", "i", "appendRound", "digits", "d", "k", "n", "Path", "x", "y", "x1", "y1", "x2", "y2", "r", "x0", "y0", "x21", "y21", "x01", "y01", "l01_2", "x20", "y20", "l21_2", "l20_2", "l21", "l01", "l", "t01", "t21", "a0", "a1", "ccw", "dx", "dy", "cw", "da", "w", "h", "path", "pathRound", "formatDecimal_default", "x", "formatDecimalParts", "p", "i", "coefficient", "exponent_default", "x", "formatDecimalParts", "formatGroup_default", "grouping", "thousands", "value", "width", "i", "t", "j", "g", "length", "formatNumerals_default", "numerals", "value", "i", "re", "formatSpecifier", "specifier", "match", "FormatSpecifier", "formatTrim_default", "s", "out", "n", "i", "i0", "i1", "prefixExponent", "formatPrefixAuto_default", "x", "p", "d", "formatDecimalParts", "coefficient", "exponent", "n", "formatRounded_default", "x", "p", "d", "formatDecimalParts", "coefficient", "exponent", "formatTypes_default", "x", "p", "formatDecimal_default", "formatRounded_default", "formatPrefixAuto_default", "identity_default", "x", "map", "prefixes", "locale_default", "locale", "group", "identity_default", "formatGroup_default", "currencyPrefix", "currencySuffix", "decimal", "numerals", "formatNumerals_default", "percent", "minus", "nan", "newFormat", "specifier", "formatSpecifier", "fill", "align", "sign", "symbol", "zero", "width", "comma", "precision", "trim", "type", "formatTypes_default", "prefix", "suffix", "formatType", "maybeSuffix", "format", "value", "valuePrefix", "valueSuffix", "i", "n", "c", "valueNegative", "formatTrim_default", "prefixExponent", "length", "padding", "formatPrefix", "f", "e", "exponent_default", "k", "locale", "format", "formatPrefix", "defaultLocale", "definition", "locale_default", "precisionFixed_default", "step", "exponent_default", "precisionPrefix_default", "step", "value", "exponent_default", "precisionRound_default", "step", "max", "exponent_default", "epsilon", "epsilon2", "pi", "halfPi", "quarterPi", "tau", "degrees", "radians", "abs", "atan", "atan2", "cos", "exp", "log", "pow", "sin", "sign", "x", "sqrt", "tan", "acos", "pi", "asin", "halfPi", "noop", "streamGeometry", "geometry", "stream", "streamGeometryType", "streamObjectType", "object", "features", "i", "n", "coordinates", "streamLine", "streamPolygon", "geometries", "closed", "coordinate", "stream_default", "spherical", "cartesian", "atan2", "asin", "lambda", "phi", "cosPhi", "cos", "sin", "cartesianDot", "a", "b", "cartesianCross", "cartesianAddInPlace", "cartesianScale", "vector", "k", "cartesianNormalizeInPlace", "d", "l", "sqrt", "compose_default", "a", "b", "compose", "x", "y", "rotationIdentity", "lambda", "phi", "abs", "pi", "tau", "rotateRadians", "deltaLambda", "deltaPhi", "deltaGamma", "compose_default", "rotationLambda", "rotationPhiGamma", "forwardRotationLambda", "rotation", "cosDeltaPhi", "cos", "sinDeltaPhi", "sin", "cosDeltaGamma", "sinDeltaGamma", "cosPhi", "x", "y", "z", "k", "atan2", "asin", "rotation_default", "rotate", "radians", "forward", "coordinates", "degrees", "circleStream", "stream", "radius", "delta", "direction", "t0", "t1", "cosRadius", "cos", "sinRadius", "sin", "step", "tau", "circleRadius", "point", "t", "spherical", "cartesian", "cartesianNormalizeInPlace", "acos", "epsilon", "buffer_default", "lines", "line", "x", "y", "m", "noop", "result", "pointEqual_default", "a", "b", "abs", "epsilon", "Intersection", "point", "points", "other", "entry", "rejoin_default", "segments", "compareIntersection", "startInside", "interpolate", "stream", "subject", "clip", "i", "n", "segment", "p0", "p1", "pointEqual_default", "epsilon", "link", "start", "current", "isSubject", "array", "a", "b", "longitude", "point", "abs", "pi", "sign", "tau", "polygonContains_default", "polygon", "lambda", "phi", "sinPhi", "sin", "normal", "cos", "angle", "winding", "sum", "Adder", "halfPi", "epsilon", "i", "n", "m", "ring", "point0", "lambda0", "phi0", "quarterPi", "sinPhi0", "cosPhi0", "j", "lambda1", "sinPhi1", "cosPhi1", "point1", "phi1", "delta", "absDelta", "antimeridian", "k", "atan2", "arc", "cartesianCross", "cartesian", "cartesianNormalizeInPlace", "intersection", "phiArc", "asin", "epsilon2", "clip_default", "pointVisible", "clipLine", "interpolate", "start", "sink", "line", "ringBuffer", "buffer_default", "ringSink", "polygonStarted", "polygon", "segments", "ring", "clip", "point", "lineStart", "lineEnd", "pointRing", "ringStart", "ringEnd", "merge", "startInside", "polygonContains_default", "rejoin_default", "compareIntersection", "lambda", "phi", "pointLine", "clean", "ringSegments", "i", "n", "m", "segment", "validSegment", "a", "b", "halfPi", "epsilon", "antimeridian_default", "clip_default", "clipAntimeridianLine", "clipAntimeridianInterpolate", "pi", "halfPi", "stream", "lambda0", "phi0", "sign0", "clean", "lambda1", "phi1", "sign1", "delta", "abs", "epsilon", "clipAntimeridianIntersect", "cosPhi0", "cosPhi1", "sinLambda0Lambda1", "sin", "atan", "cos", "from", "to", "direction", "phi", "lambda", "circle_default", "radius", "cr", "cos", "delta", "radians", "smallRadius", "notHemisphere", "abs", "epsilon", "interpolate", "from", "to", "direction", "stream", "circleStream", "visible", "lambda", "phi", "clipLine", "point0", "c0", "v0", "v00", "clean", "point1", "point2", "v", "c", "code", "pi", "intersect", "pointEqual_default", "t", "a", "b", "two", "pa", "cartesian", "pb", "n1", "n2", "cartesianCross", "n2n2", "cartesianDot", "n1n2", "determinant", "c1", "c2", "n1xn2", "A", "cartesianScale", "B", "cartesianAddInPlace", "u", "w", "uu", "t2", "sqrt", "q", "spherical", "lambda0", "lambda1", "phi0", "phi1", "z", "polar", "meridian", "q1", "r", "clip_default", "line_default", "a", "b", "x0", "y0", "x1", "y1", "ax", "ay", "bx", "by", "t0", "t1", "dx", "dy", "r", "clipMax", "clipMin", "clipRectangle", "x0", "y0", "x1", "y1", "visible", "x", "y", "interpolate", "from", "to", "direction", "stream", "a", "a1", "corner", "comparePoint", "p", "abs", "epsilon", "compareIntersection", "b", "ca", "cb", "activeStream", "bufferStream", "buffer_default", "segments", "polygon", "ring", "x__", "y__", "v__", "x_", "y_", "v_", "first", "clean", "clipStream", "point", "lineStart", "lineEnd", "polygonStart", "polygonEnd", "polygonInside", "winding", "i", "n", "j", "m", "a0", "b0", "b1", "startInside", "cleanInside", "merge", "rejoin_default", "linePoint", "v", "line_default", "identity_default", "x", "areaSum", "Adder", "areaRingSum", "x00", "y00", "x0", "y0", "areaStream", "noop", "areaRingStart", "areaRingEnd", "abs", "area", "areaPointFirst", "x", "y", "areaPoint", "area_default", "x0", "y0", "x1", "y1", "boundsStream", "boundsPoint", "noop", "bounds", "x", "y", "bounds_default", "X0", "Y0", "Z0", "X1", "Y1", "Z1", "X2", "Y2", "Z2", "x00", "y00", "x0", "y0", "centroidStream", "centroidPoint", "centroidLineStart", "centroidLineEnd", "centroidRingStart", "centroidRingEnd", "centroid", "x", "y", "centroidPointFirstLine", "centroidPointLine", "dx", "dy", "z", "sqrt", "centroidPointFirstRing", "centroidPointRing", "centroid_default", "PathContext", "context", "_", "x", "y", "tau", "noop", "lengthSum", "Adder", "lengthRing", "x00", "y00", "x0", "y0", "lengthStream", "noop", "lengthPointFirst", "lengthPoint", "length", "x", "y", "sqrt", "measure_default", "cacheDigits", "cacheAppend", "cacheRadius", "cacheCircle", "PathString", "digits", "append", "appendRound", "_", "x", "y", "s", "result", "strings", "i", "j", "d", "k", "path_default", "projection", "context", "digits", "pointRadius", "projectionStream", "contextStream", "path", "object", "stream_default", "area_default", "measure_default", "bounds_default", "centroid_default", "_", "identity_default", "PathString", "PathContext", "d", "transform_default", "methods", "transformer", "stream", "s", "TransformStream", "key", "x", "y", "fit", "projection", "fitBounds", "object", "clip", "stream_default", "bounds_default", "fitExtent", "extent", "b", "w", "h", "k", "x", "y", "fitSize", "size", "fitWidth", "width", "fitHeight", "height", "maxDepth", "cosMinDistance", "cos", "radians", "resample_default", "project", "delta2", "resample", "resampleNone", "transformer", "x", "y", "resampleLineTo", "x0", "y0", "lambda0", "a0", "b0", "c0", "x1", "y1", "lambda1", "a1", "b1", "c1", "depth", "stream", "dx", "dy", "d2", "a", "b", "c", "m", "sqrt", "phi2", "asin", "lambda2", "abs", "epsilon", "atan2", "p", "x2", "y2", "dx2", "dy2", "dz", "lambda00", "x00", "y00", "a00", "b00", "c00", "resampleStream", "point", "lineStart", "lineEnd", "ringStart", "linePoint", "lambda", "phi", "cartesian", "ringPoint", "ringEnd", "transformRadians", "transformer", "x", "y", "radians", "transformRotate", "rotate", "scaleTranslate", "k", "dx", "dy", "sx", "sy", "transform", "scaleTranslateRotate", "alpha", "cosAlpha", "cos", "sinAlpha", "sin", "a", "b", "ai", "bi", "ci", "fi", "projection", "project", "projectionMutator", "projectAt", "lambda", "phi", "deltaLambda", "deltaPhi", "deltaGamma", "theta", "preclip", "antimeridian_default", "x0", "y0", "x1", "y1", "postclip", "identity_default", "delta2", "projectResample", "projectTransform", "projectRotateTransform", "cache", "cacheStream", "point", "invert", "degrees", "stream", "_", "reset", "circle_default", "clipRectangle", "recenter", "resample_default", "sqrt", "extent", "object", "fitExtent", "size", "fitSize", "width", "fitWidth", "height", "fitHeight", "center", "rotateRadians", "compose_default", "conicProjection", "projectAt", "phi0", "phi1", "pi", "m", "projectionMutator", "p", "_", "radians", "degrees", "cylindricalEqualAreaRaw", "phi0", "cosPhi0", "cos", "forward", "lambda", "phi", "sin", "x", "y", "asin", "conicEqualAreaRaw", "y0", "y1", "sy0", "sin", "n", "abs", "epsilon", "cylindricalEqualAreaRaw", "c", "r0", "sqrt", "project", "x", "y", "r", "cos", "r0y", "l", "atan2", "sign", "pi", "asin", "conicEqualArea_default", "conicProjection", "albers_default", "conicEqualArea_default", "multiplex", "streams", "n", "x", "y", "i", "albersUsa_default", "cache", "cacheStream", "lower48", "albers_default", "lower48Point", "alaska", "conicEqualArea_default", "alaskaPoint", "hawaii", "hawaiiPoint", "point", "pointStream", "albersUsa", "coordinates", "k", "t", "stream", "_", "reset", "epsilon", "extent", "object", "fitExtent", "size", "fitSize", "width", "fitWidth", "height", "fitHeight", "azimuthalRaw", "scale", "x", "y", "cx", "cos", "cy", "k", "sin", "azimuthalInvert", "angle", "z", "sqrt", "c", "sc", "cc", "atan2", "asin", "azimuthalEqualAreaRaw", "azimuthalRaw", "cxcy", "sqrt", "azimuthalInvert", "z", "asin", "azimuthalEqualArea_default", "projection", "azimuthalEquidistantRaw", "azimuthalRaw", "c", "acos", "sin", "azimuthalInvert", "z", "azimuthalEquidistant_default", "projection", "mercatorRaw", "lambda", "phi", "log", "tan", "halfPi", "x", "y", "atan", "exp", "mercator_default", "mercatorProjection", "tau", "project", "m", "projection", "center", "scale", "translate", "clipExtent", "x0", "y0", "x1", "y1", "_", "reclip", "k", "pi", "t", "rotation_default", "tany", "y", "tan", "halfPi", "conicConformalRaw", "y0", "y1", "cy0", "cos", "n", "sin", "log", "f", "pow", "mercatorRaw", "project", "x", "epsilon", "r", "fy", "sign", "sqrt", "l", "atan2", "abs", "pi", "atan", "conicConformal_default", "conicProjection", "equirectangularRaw", "lambda", "phi", "equirectangular_default", "projection", "conicEquidistantRaw", "y0", "y1", "cy0", "cos", "n", "sin", "g", "abs", "epsilon", "equirectangularRaw", "project", "x", "y", "gy", "nx", "l", "atan2", "sign", "pi", "sqrt", "conicEquidistant_default", "conicProjection", "A1", "A2", "A3", "A4", "M", "sqrt", "iterations", "equalEarthRaw", "lambda", "phi", "l", "asin", "sin", "l2", "l6", "cos", "x", "y", "delta", "fy", "fpy", "abs", "epsilon2", "equalEarth_default", "projection", "gnomonicRaw", "x", "y", "cy", "cos", "k", "sin", "azimuthalInvert", "atan", "gnomonic_default", "projection", "orthographicRaw", "x", "y", "cos", "sin", "azimuthalInvert", "asin", "orthographic_default", "projection", "epsilon", "stereographicRaw", "x", "y", "cy", "cos", "k", "sin", "azimuthalInvert", "z", "atan", "stereographic_default", "projection", "transverseMercatorRaw", "lambda", "phi", "log", "tan", "halfPi", "x", "y", "atan", "exp", "transverseMercator_default", "m", "mercatorProjection", "center", "rotate", "_", "initRange", "domain", "range", "initInterpolator", "interpolator", "implicit", "ordinal", "index", "InternMap", "domain", "range", "unknown", "scale", "d", "i", "_", "value", "initRange", "band", "scale", "ordinal", "domain", "ordinalRange", "r0", "r1", "step", "bandwidth", "round", "paddingInner", "paddingOuter", "align", "rescale", "n", "reverse", "start", "stop", "values", "range", "i", "_", "initRange", "pointish", "copy", "point", "constants", "x", "number", "x", "unit", "identity", "x", "normalize", "a", "b", "constants", "clamper", "t", "bimap", "domain", "range", "interpolate", "d0", "d1", "r0", "r1", "polymap", "j", "d", "r", "i", "bisect_default", "copy", "source", "target", "transformer", "value_default", "transform", "untransform", "unknown", "clamp", "piecewise", "output", "input", "rescale", "n", "scale", "y", "number_default", "_", "number", "round_default", "u", "continuous", "tickFormat", "start", "stop", "count", "specifier", "step", "tickStep", "precision", "formatSpecifier", "value", "precisionPrefix_default", "formatPrefix", "precisionRound_default", "precisionFixed_default", "format", "linearish", "scale", "domain", "count", "d", "ticks", "specifier", "tickFormat", "i0", "i1", "start", "stop", "prestep", "step", "maxIter", "tickIncrement", "linear", "continuous", "copy", "initRange", "identity", "domain", "unknown", "scale", "x", "_", "number", "linearish", "nice", "domain", "interval", "i0", "i1", "x0", "x1", "t", "transformLog", "x", "transformExp", "transformLogn", "transformExpn", "pow10", "powp", "base", "logp", "reflect", "f", "k", "loggish", "transform", "scale", "domain", "logs", "pows", "rescale", "_", "count", "d", "u", "v", "r", "i", "j", "t", "n", "z", "ticks", "specifier", "formatSpecifier", "format", "nice", "log", "transformer", "copy", "initRange", "transformSymlog", "c", "x", "transformSymexp", "symlogish", "transform", "scale", "_", "linearish", "symlog", "transformer", "copy", "initRange", "transformPow", "exponent", "x", "transformSqrt", "transformSquare", "powish", "transform", "scale", "identity", "rescale", "_", "linearish", "pow", "transformer", "copy", "initRange", "quantile", "domain", "range", "thresholds", "unknown", "rescale", "i", "n", "quantileSorted", "scale", "x", "bisect_default", "y", "_", "d", "ascending", "initRange", "threshold", "domain", "range", "unknown", "n", "scale", "x", "bisect_default", "_", "y", "i", "initRange", "t0", "t1", "timeInterval", "floori", "offseti", "count", "field", "interval", "date", "d0", "d1", "step", "start", "stop", "range", "previous", "test", "end", "d", "millisecond", "timeInterval", "date", "step", "start", "end", "k", "milliseconds", "second", "timeInterval", "date", "step", "start", "end", "seconds", "timeMinute", "timeInterval", "date", "step", "start", "end", "timeMinutes", "utcMinute", "utcMinutes", "timeHour", "timeInterval", "date", "step", "start", "end", "timeHours", "utcHour", "utcHours", "timeDay", "timeInterval", "date", "step", "start", "end", "timeDays", "utcDay", "utcDays", "unixDay", "unixDays", "timeWeekday", "i", "timeInterval", "date", "step", "start", "end", "timeSunday", "timeMonday", "timeTuesday", "timeWednesday", "timeThursday", "timeFriday", "timeSaturday", "timeSundays", "timeMondays", "timeTuesdays", "timeWednesdays", "timeThursdays", "timeFridays", "timeSaturdays", "utcWeekday", "utcSunday", "utcMonday", "utcTuesday", "utcWednesday", "utcThursday", "utcFriday", "utcSaturday", "utcSundays", "utcMondays", "utcTuesdays", "utcWednesdays", "utcThursdays", "utcFridays", "utcSaturdays", "timeMonth", "timeInterval", "date", "step", "start", "end", "timeMonths", "utcMonth", "utcMonths", "timeYear", "timeInterval", "date", "step", "start", "end", "k", "timeYears", "utcYear", "utcYears", "ticker", "year", "month", "week", "day", "hour", "minute", "tickIntervals", "second", "ticks", "start", "stop", "count", "reverse", "interval", "tickInterval", "target", "i", "bisector", "step", "tickStep", "millisecond", "t", "utcTicks", "utcTickInterval", "utcYear", "utcMonth", "utcSunday", "unixDay", "utcHour", "utcMinute", "timeTicks", "timeTickInterval", "timeYear", "timeMonth", "timeSunday", "timeDay", "timeHour", "timeMinute", "localDate", "d", "date", "utcDate", "newDate", "y", "m", "formatLocale", "locale", "locale_dateTime", "locale_date", "locale_time", "locale_periods", "locale_weekdays", "locale_shortWeekdays", "locale_months", "locale_shortMonths", "periodRe", "formatRe", "periodLookup", "formatLookup", "weekdayRe", "weekdayLookup", "shortWeekdayRe", "shortWeekdayLookup", "monthRe", "monthLookup", "shortMonthRe", "shortMonthLookup", "formats", "formatShortWeekday", "formatWeekday", "formatShortMonth", "formatMonth", "formatDayOfMonth", "formatMicroseconds", "formatYearISO", "formatFullYearISO", "formatHour24", "formatHour12", "formatDayOfYear", "formatMilliseconds", "formatMonthNumber", "formatMinutes", "formatPeriod", "formatQuarter", "formatUnixTimestamp", "formatUnixTimestampSeconds", "formatSeconds", "formatWeekdayNumberMonday", "formatWeekNumberSunday", "formatWeekNumberISO", "formatWeekdayNumberSunday", "formatWeekNumberMonday", "formatYear", "formatFullYear", "formatZone", "formatLiteralPercent", "utcFormats", "formatUTCShortWeekday", "formatUTCWeekday", "formatUTCShortMonth", "formatUTCMonth", "formatUTCDayOfMonth", "formatUTCMicroseconds", "formatUTCYearISO", "formatUTCFullYearISO", "formatUTCHour24", "formatUTCHour12", "formatUTCDayOfYear", "formatUTCMilliseconds", "formatUTCMonthNumber", "formatUTCMinutes", "formatUTCPeriod", "formatUTCQuarter", "formatUTCSeconds", "formatUTCWeekdayNumberMonday", "formatUTCWeekNumberSunday", "formatUTCWeekNumberISO", "formatUTCWeekdayNumberSunday", "formatUTCWeekNumberMonday", "formatUTCYear", "formatUTCFullYear", "formatUTCZone", "parses", "parseShortWeekday", "parseWeekday", "parseShortMonth", "parseMonth", "parseLocaleDateTime", "parseDayOfMonth", "parseMicroseconds", "parseYear", "parseFullYear", "parseHour24", "parseDayOfYear", "parseMilliseconds", "parseMonthNumber", "parseMinutes", "parsePeriod", "parseQuarter", "parseUnixTimestamp", "parseUnixTimestampSeconds", "parseSeconds", "parseWeekdayNumberMonday", "parseWeekNumberSunday", "parseWeekNumberISO", "parseWeekdayNumberSunday", "parseWeekNumberMonday", "parseLocaleDate", "parseLocaleTime", "parseZone", "parseLiteralPercent", "newFormat", "specifier", "string", "i", "j", "n", "c", "pad", "format", "pads", "newParse", "Z", "parseSpecifier", "week", "day", "utcMonday", "utcDay", "timeMonday", "timeDay", "parse", "f", "p", "numberRe", "percentRe", "requoteRe", "value", "fill", "width", "sign", "length", "requote", "s", "names", "name", "timeYear", "timeSunday", "dISO", "timeThursday", "z", "utcYear", "dow", "utcSunday", "UTCdISO", "utcThursday", "locale", "timeFormat", "timeParse", "utcFormat", "utcParse", "defaultLocale", "definition", "formatLocale", "date", "number", "calendar", "ticks", "tickInterval", "year", "month", "week", "day", "hour", "minute", "second", "format", "scale", "continuous", "invert", "domain", "formatMillisecond", "formatSecond", "formatMinute", "formatHour", "formatDay", "formatWeek", "formatMonth", "formatYear", "tickFormat", "y", "_", "interval", "d", "count", "specifier", "nice", "copy", "time", "initRange", "timeTicks", "timeTickInterval", "timeYear", "timeMonth", "timeSunday", "timeDay", "timeHour", "timeMinute", "timeFormat", "utcTime", "initRange", "calendar", "utcTicks", "utcTickInterval", "utcYear", "utcMonth", "utcSunday", "utcDay", "utcHour", "utcMinute", "second", "utcFormat", "copy", "source", "target", "transformer", "x0", "x1", "x2", "s", "t0", "t1", "t2", "k10", "k21", "interpolator", "identity", "transform", "clamp", "unknown", "scale", "x", "_", "range", "interpolate", "r0", "r1", "r2", "piecewise", "value_default", "round_default", "t", "diverging", "linearish", "copy", "initInterpolator", "divergingLog", "loggish", "divergingSymlog", "symlogish", "divergingPow", "powish", "colors_default", "specifier", "n", "colors", "i", "category10_default", "colors_default", "Accent_default", "colors_default", "Dark2_default", "colors_default", "Paired_default", "colors_default", "Pastel1_default", "colors_default", "Pastel2_default", "colors_default", "Set1_default", "colors_default", "Set2_default", "colors_default", "Set3_default", "colors_default", "Tableau10_default", "colors_default", "ramp_default", "scheme", "rgbBasis", "scheme", "colors_default", "BrBG_default", "ramp_default", "scheme", "colors_default", "PRGn_default", "ramp_default", "scheme", "colors_default", "PiYG_default", "ramp_default", "scheme", "colors_default", "PuOr_default", "ramp_default", "scheme", "colors_default", "RdBu_default", "ramp_default", "scheme", "colors_default", "RdGy_default", "ramp_default", "scheme", "colors_default", "RdYlBu_default", "ramp_default", "scheme", "colors_default", "RdYlGn_default", "ramp_default", "scheme", "colors_default", "Spectral_default", "ramp_default", "scheme", "colors_default", "BuGn_default", "ramp_default", "scheme", "colors_default", "BuPu_default", "ramp_default", "scheme", "colors_default", "GnBu_default", "ramp_default", "scheme", "colors_default", "OrRd_default", "ramp_default", "scheme", "colors_default", "PuBuGn_default", "ramp_default", "scheme", "colors_default", "PuBu_default", "ramp_default", "scheme", "colors_default", "PuRd_default", "ramp_default", "scheme", "colors_default", "RdPu_default", "ramp_default", "scheme", "colors_default", "YlGnBu_default", "ramp_default", "scheme", "colors_default", "YlGn_default", "ramp_default", "scheme", "colors_default", "YlOrBr_default", "ramp_default", "scheme", "colors_default", "YlOrRd_default", "ramp_default", "scheme", "colors_default", "Blues_default", "ramp_default", "scheme", "colors_default", "Greens_default", "ramp_default", "scheme", "colors_default", "Greys_default", "ramp_default", "scheme", "colors_default", "Purples_default", "ramp_default", "scheme", "colors_default", "Reds_default", "ramp_default", "scheme", "colors_default", "Oranges_default", "ramp_default", "cividis_default", "cubehelix_default", "cubehelixLong", "cubehelix", "warm", "cubehelixLong", "cubehelix", "cool", "c", "rainbow_default", "ts", "c", "rgb", "pi_1_3", "pi_2_3", "sinebow_default", "x", "turbo_default", "ramp", "range", "n", "t", "viridis_default", "colors_default", "magma", "inferno", "plasma", "cos", "min", "sin", "sqrt", "pi", "halfPi", "tau", "sqrt3", "sqrt", "asterisk_default", "context", "size", "r", "min", "t", "u", "circle_default", "context", "size", "r", "sqrt", "pi", "tau", "cross_default", "context", "size", "r", "sqrt", "tan30", "sqrt", "tan30_2", "diamond_default", "context", "size", "y", "x", "diamond2_default", "context", "size", "r", "sqrt", "plus_default", "context", "size", "r", "sqrt", "min", "square_default", "context", "size", "w", "sqrt", "x", "square2_default", "context", "size", "r", "sqrt", "ka", "kr", "sin", "pi", "kx", "tau", "ky", "cos", "star_default", "context", "size", "r", "sqrt", "x", "y", "c", "s", "sqrt3", "sqrt", "triangle_default", "context", "size", "y", "sqrt3", "sqrt", "triangle2_default", "context", "size", "s", "t", "u", "c", "s", "sqrt", "k", "a", "wye_default", "context", "size", "r", "x0", "y0", "x1", "y1", "x2", "y2", "times_default", "context", "size", "r", "sqrt", "min", "symbolsFill", "circle_default", "cross_default", "diamond_default", "square_default", "star_default", "triangle_default", "wye_default", "symbolsStroke", "plus_default", "times_default", "triangle2_default", "asterisk_default", "square2_default", "diamond2_default", "Transform", "k", "x", "y", "point", "location", "identity", "transform", "node", "defined", "x", "ascendingDefined", "a", "b", "ascending", "descendingDefined", "descending", "nonempty", "finite", "positive", "negative", "format", "date", "fallback", "hours", "minutes", "seconds", "milliseconds", "formatYear", "pad", "year", "value", "width", "re", "parse", "string", "fallback", "durationSecond", "durationMinute", "durationHour", "durationDay", "durationWeek", "durationMonth", "durationYear", "formats", "timeIntervals", "second", "timeMinute", "timeHour", "timeDay", "timeSunday", "timeMonth", "timeYear", "timeMonday", "timeTuesday", "timeWednesday", "timeThursday", "timeFriday", "timeSaturday", "utcIntervals", "utcMinute", "utcHour", "unixDay", "utcSunday", "utcMonth", "utcYear", "utcMonday", "utcTuesday", "utcWednesday", "utcThursday", "utcFriday", "utcSaturday", "parseInterval", "input", "intervals", "name", "period", "match", "interval", "maybeTimeInterval", "maybeUtcInterval", "isUtcYear", "i", "date", "isTimeYear", "formatTimeTicks", "scale", "data", "ticks", "anchor", "format", "timeFormat", "utcFormat", "template", "f1", "f2", "getTimeTicksInterval", "formatConditional", "medianStep", "median", "pairs", "a", "b", "bisector", "step", "start", "stop", "extent", "count", "format1", "format2", "x", "X", "j", "orderof", "TypedArray", "objectToString", "valueof", "data", "value", "type", "valueType", "maybeTypedMap", "field", "map", "constant", "maybeTypedArrayify", "f", "floater", "arrayify", "coerceNumber", "d", "i", "singleton", "name", "indexOf", "range", "identity", "one", "yes", "string", "x", "number", "first", "x", "second", "constant", "x", "percentile", "reduce", "p", "I", "f", "quantile", "coerceNumbers", "values", "TypedArray", "map", "coerceNumber", "coerceDates", "coerceDate", "parse", "maybeColorChannel", "value", "defaultValue", "isColor", "maybeNumberChannel", "maybeKeyword", "input", "name", "allowed", "keyword", "i", "arrayify", "data", "type", "slice", "hasX", "x1", "x2", "hasY", "y", "y1", "y2", "hasXY", "options", "isObject", "option", "objectToString", "isScaleOptions", "isOptions", "isDomainSort", "sort", "maybeZero", "x3", "identity", "maybeTuple", "first", "second", "maybeZ", "z", "fill", "stroke", "range", "n", "r", "take", "values", "index", "map", "i", "subarray", "I", "i", "j", "keyof", "value", "maybeInput", "key", "options", "column", "source", "labelof", "v", "maybeColumn", "defaultValue", "mid", "x1", "x2", "data", "X1", "X2", "isTemporal", "map", "_", "maybeApplyInterval", "V", "scale", "t", "maybeIntervalTransform", "interval", "type", "maybeInterval", "defined", "d", "lo", "hi", "range", "x", "maybeTimeInterval", "maybeUtcInterval", "maybeRangeInterval", "maybeNiceInterval", "maybeValue", "isOptions", "numberChannel", "valueof", "isIterable", "value", "isTextual", "values", "isOrdinal", "type", "isTemporal", "isTemporalString", "parse", "isNumericString", "isNumeric", "isEvery", "is", "every", "isColor", "color", "isOpacity", "isNoneish", "isNone", "isRound", "maybeAnchor", "name", "maybeKeyword", "maybeFrameAnchor", "orderof", "first", "last", "descending", "inherit", "options", "rest", "o", "defaults", "key", "named", "things", "names", "thing", "maybeNamed", "position", "color", "radius", "length", "opacity", "symbol", "projection", "registry", "sqrt3", "sqrt4_3", "symbolHexagon", "context", "size", "rx", "ry", "hy", "symbols", "asterisk_default", "circle_default", "cross_default", "diamond_default", "diamond2_default", "plus_default", "square_default", "square2_default", "star_default", "times_default", "triangle_default", "triangle2_default", "wye_default", "isSymbolObject", "value", "isSymbol", "maybeSymbol", "symbol", "basic", "f1", "s1", "r1", "t1", "i1", "options", "transform", "filterTransform", "isDomainSort", "composeTransform", "sortTransform", "reverseTransform", "initializer", "composeInitializer", "t2", "data", "facets", "plotOptions", "arrayify", "i2", "channels", "args", "c1", "d1", "c2", "d2", "f2", "filterTransform", "value", "data", "facets", "V", "valueof", "I", "reverseTransform", "data", "facets", "I", "sortTransform", "value", "sortData", "sortValue", "compare", "data", "facets", "compareData", "i", "j", "I", "channel", "order", "maybeValue", "negate", "descendingDefined", "ascendingDefined", "channels", "V", "valueof", "compareValue", "hasOutput", "outputs", "names", "name", "maybeOutputs", "inputs", "asOutput", "maybeOutput", "entries", "reduceTitle", "reduceFirst", "reduce", "nullOutput", "asEvaluator", "maybeEvaluator", "scale", "isObject", "evaluator", "output", "setOutput", "column", "O", "data", "scope", "I", "extent", "asReduce", "maybeReduce", "input", "maybeInput", "reducer", "V", "context", "labelof", "reduceCount", "valueof", "range", "maybeGroup", "X", "sort", "group", "i", "first", "value", "fallback", "invalidReduce", "reduceReduce", "reduceFunction", "reduceAccessor", "percentile", "reduceLast", "reduceIdentity", "reduceDistinct", "reduceSum", "reduceProportion", "deviation", "min", "minIndex", "max", "maxIndex", "reduceMaybeTemporalAccessor", "mean", "median", "variance", "mode", "maybeSubgroup", "maybeSort", "facets", "reverse", "S", "compare", "j", "ascendingDefined", "f", "take", "x", "isTemporal", "groups", "rollup", "second", "top", "bottom", "sum", "key", "s", "InternSet", "basis", "createChannel", "data", "scale", "type", "value", "filter", "hint", "name", "inferChannelScale", "valueof", "labelof", "createChannels", "channels", "channel", "valueObject", "scales", "values", "scaleName", "map", "isEvery", "isColor", "isOpacity", "isSymbol", "maybeSymbol", "registry", "channelDomain", "facets", "facetChannels", "options", "defaultOrder", "defaultReverse", "defaultReduce", "defaultLimit", "x", "y", "order", "reverse", "reduce", "limit", "maybeValue", "negate", "descendingGroup", "ascendingGroup", "maybeOrder", "X", "reindexFacetChannel", "findScaleChannel", "XV", "lo", "hi", "isIterable", "domain", "InternSet", "YV", "difference", "reducer", "maybeReduce", "rollups", "range", "I", "i", "first", "originalFacets", "V1", "V2", "vi", "j", "k1", "k2", "X1", "X2", "x2", "alias", "ak", "av", "bk", "bv", "ascendingDefined", "descendingDefined", "getSource", "key", "createContext", "options", "document", "create", "name", "select_default", "creator_default", "warnings", "consumeWarnings", "w", "warn", "message", "pi", "tau", "defaultAspectRatio", "createProjection", "projection", "globalInset", "insetTop", "insetRight", "insetBottom", "insetLeft", "dimensions", "options", "domain", "clip", "isObject", "inset", "namedProjection", "width", "height", "marginLeft", "marginRight", "marginTop", "marginBottom", "dx", "dy", "maybePostClip", "tx", "ty", "transform", "x0", "y0", "x1", "y1", "path_default", "k", "transform_default", "x", "y", "warn", "identity", "s", "scaleProjection", "albersUsa_default", "conicProjection", "albers_default", "azimuthalEqualArea_default", "azimuthalEquidistant_default", "conicConformal_default", "conicEqualArea_default", "conicEquidistant_default", "equalEarth_default", "equirectangular_default", "gnomonic_default", "reflectY", "mercator_default", "orthographic_default", "stereographic_default", "transverseMercator_default", "x2", "y2", "clipRectangle", "kx", "ky", "rotate", "precision", "type", "aspectRatio", "parallels", "constant", "stream", "project", "cx", "cy", "values", "n", "X", "Y", "i", "hasProjection", "projectionAspectRatio", "getGeometryChannels", "channel", "X", "Y", "x", "y", "sink", "object", "stream_default", "categoricalSchemes", "Accent_default", "category10_default", "Dark2_default", "Paired_default", "Pastel1_default", "Pastel2_default", "Set1_default", "Set2_default", "Set3_default", "Tableau10_default", "isCategoricalScheme", "scheme", "ordinalSchemes", "scheme11", "BrBG_default", "PRGn_default", "PiYG_default", "PuOr_default", "RdBu_default", "RdGy_default", "RdYlBu_default", "RdYlGn_default", "Spectral_default", "scheme11r", "scheme9", "Blues_default", "Greens_default", "Greys_default", "Oranges_default", "Purples_default", "Reds_default", "schemei", "turbo_default", "viridis_default", "magma", "inferno", "plasma", "cividis_default", "cubehelix_default", "warm", "cool", "BuGn_default", "BuPu_default", "GnBu_default", "OrRd_default", "PuBu_default", "PuBuGn_default", "PuRd_default", "RdPu_default", "YlGn_default", "YlGnBu_default", "YlOrBr_default", "YlOrRd_default", "schemeicyclical", "rainbow_default", "sinebow_default", "interpolate", "quantize_default", "t", "n", "ordinalScheme", "s", "ordinalRange", "length", "maybeBooleanRange", "domain", "range", "f", "value", "quantitativeSchemes", "quantitativeScheme", "divergingSchemes", "isDivergingScheme", "flip", "i", "t", "unit", "interpolators", "number_default", "rgb_default", "hsl_default", "hcl_default", "lab", "maybeInterpolator", "interpolate", "createScaleQ", "key", "scale", "channels", "type", "nice", "clamp", "zero", "domain", "inferAutoDomain", "unknown", "round", "scheme", "interval", "range", "registry", "radius", "inferRadialRange", "length", "inferLengthRange", "opacity", "color", "quantitativeScheme", "round_default", "reverse", "maybeRangeInterval", "n", "arrayify", "m", "piecewise", "_", "constant", "interpolatePiecewise", "min", "max", "extent", "slice", "orderof", "maybeNice", "maybeNiceInterval", "createScaleLinear", "options", "linear", "createScaleSqrt", "createScalePow", "exponent", "pow", "createScaleLog", "base", "inferLogDomain", "log", "createScaleSymlog", "symlog", "createScaleQuantile", "quantiles", "inferQuantileDomain", "quantize_default", "ordinalRange", "quantile", "createScaleThreshold", "createScaleQuantize", "thresholds", "ticks", "x", "sign", "isOrdered", "threshold", "d", "s", "descending", "createScaleIdentity", "identity", "inferDomain", "f", "finite", "value", "inferZeroDomain", "hint", "h25", "positive", "k", "r", "h50", "median", "v", "negative", "j", "createScaleD", "key", "scale", "transform", "channels", "type", "nice", "clamp", "domain", "inferDomain", "unknown", "pivot", "scheme", "range", "symmetric", "interpolate", "registry", "color", "rgb_default", "quantitativeScheme", "number_default", "reverse", "arrayify", "min", "max", "warn", "descending", "maybeInterpolator", "interpolatePiecewise", "piecewise", "flip", "mid", "mindelta", "maxdelta", "createScaleDiverging", "options", "diverging", "transformIdentity", "createScaleDivergingSqrt", "createScaleDivergingPow", "exponent", "divergingPow", "transformPow", "createScaleDivergingLog", "base", "negative", "positive", "divergingLog", "transformLog", "createScaleDivergingSymlog", "constant", "divergingSymlog", "transformSymlog", "x", "transformSqrt", "createScaleT", "key", "scale", "channels", "options", "createScaleQ", "createScaleTime", "time", "createScaleUtc", "utcTime", "ordinalImplicit", "createScaleO", "key", "scale", "channels", "type", "interval", "domain", "range", "reverse", "hint", "maybeRangeInterval", "inferDomain", "createScaleOrdinal", "scheme", "unknown", "options", "registry", "symbol", "inferSymbolHint", "inferSymbolRange", "map", "maybeSymbol", "color", "maybeBooleanRange", "interpolate", "quantitativeScheme", "t0", "d", "n", "quantize_default", "t", "ordinalScheme", "implicit", "ordinal", "createScalePoint", "align", "padding", "maybeRound", "point", "createScaleBand", "paddingInner", "paddingOuter", "band", "round", "values", "InternSet", "value", "v", "min", "max", "extent", "position", "sort", "ascendingDefined", "inferHint", "candidate", "isNoneish", "symbolsStroke", "symbolsFill", "createScales", "channelsByScale", "globalLabel", "globalInset", "globalInsetTop", "globalInsetRight", "globalInsetBottom", "globalInsetLeft", "round", "nice", "clamp", "zero", "align", "padding", "projection", "facetLabel", "options", "scales", "key", "channels", "scaleOptions", "scale", "createScale", "registry", "position", "label", "percent", "transform", "inset", "insetTop", "insetRight", "insetBottom", "insetLeft", "inferScaleLabel", "createScaleFunctions", "name", "type", "interval", "autoScaleRange", "dimensions", "x", "y", "fx", "fy", "superdimensions", "outerDimensions", "autoScaleRangeX", "autoScaleRangeY", "subdimensions", "innerDimensions", "l", "isOrdinalScale", "marginTop", "marginRight", "marginBottom", "marginLeft", "width", "height", "facetMarginTop", "facetMarginRight", "facetMarginBottom", "facetMarginLeft", "left", "right", "piecewiseRange", "autoScaleRound", "top", "bottom", "isBandScale", "roundError", "n", "start", "stop", "paddingInner", "paddingOuter", "m", "step", "length", "isThresholdScale", "end", "_", "createScale", "key", "channels", "options", "type", "inferScaleType", "isOrdinalScale", "values", "value", "isTemporal", "warn", "formatScaleType", "isTemporalString", "isNumericString", "coerceType", "coerceNumbers", "registry", "position", "symbol", "coerceSymbols", "coerceDates", "createScaleDiverging", "createScaleDivergingSqrt", "createScaleDivergingPow", "createScaleDivergingLog", "createScaleDivergingSymlog", "ordinalImplicit", "createScaleOrdinal", "createScaleLinear", "createScaleSqrt", "createScaleThreshold", "createScaleQuantile", "createScaleQuantize", "createScalePow", "createScaleLog", "createScaleSymlog", "createScaleUtc", "createScaleTime", "createScalePoint", "createScaleBand", "createScaleIdentity", "typeProjection", "domain", "range", "scheme", "pivot", "projection", "t", "kind", "radius", "opacity", "length", "asOrdinalType", "isOrdinal", "color", "isDivergingScheme", "isCategoricalScheme", "isTemporalScale", "isThresholdScale", "isBandScale", "isCollapsed", "scale", "domain", "value", "i", "n", "coerceType", "channels", "options", "coerceValues", "c", "coerceSymbols", "values", "map", "maybeSymbol", "exposeScales", "scaleDescriptors", "key", "registry", "exposeScale", "scale", "type", "domain", "range", "interpolate", "interval", "transform", "percent", "pivot", "d", "unknown", "slice", "t", "memoize1", "compute", "cacheValue", "cacheKeys", "keys", "k", "numberFormat", "memoize1", "locale", "monthFormat", "month", "weekdayFormat", "weekday", "formatNumber", "format", "i", "formatIsoDate", "date", "format", "formatAuto", "locale", "number", "formatNumber", "v", "string", "formatDefault", "offset", "nextClipId", "getClipId", "styles", "mark", "title", "href", "variaLabel", "ariaDescription", "ariaHidden", "target", "fill", "fillOpacity", "stroke", "strokeWidth", "strokeOpacity", "strokeLinejoin", "strokeLinecap", "strokeMiterlimit", "strokeDasharray", "strokeDashoffset", "opacity", "mixBlendMode", "imageFilter", "paintOrder", "pointerEvents", "shapeRendering", "channels", "cariaLabel", "defaultFill", "defaultFillOpacity", "defaultStroke", "defaultStrokeOpacity", "defaultStrokeWidth", "defaultStrokeLinecap", "defaultStrokeLinejoin", "defaultStrokeMiterlimit", "defaultPaintOrder", "isNoneish", "vfill", "cfill", "maybeColorChannel", "vfillOpacity", "cfillOpacity", "maybeNumberChannel", "vstroke", "cstroke", "vstrokeOpacity", "cstrokeOpacity", "vopacity", "copacity", "isNone", "isRound", "vstrokeWidth", "cstrokeWidth", "impliedString", "impliedNumber", "string", "applyTitle", "selection", "L", "i", "nonempty", "applyText", "applyText", "selection", "T", "i", "formatDefault", "applyChannelStyles", "selection", "target", "tip", "AL", "T", "F", "FO", "S", "SO", "SW", "O", "H", "applyAttr", "i", "applyHref", "applyTitle", "maybeClip", "clip", "maybeKeyword", "applyClip", "selection", "mark", "dimensions", "context", "clipUrl", "width", "height", "marginLeft", "marginRight", "marginTop", "marginBottom", "id", "getClipId", "create", "g", "projection", "path_default", "applyAttr", "applyIndirectStyles", "pointerEvents", "applyDirectStyles", "applyStyle", "applyHref", "href", "target", "i", "h", "a", "namespaces_default", "name", "value", "applyTransform", "x", "y", "tx", "offset", "ty", "impliedString", "impliedValue", "string", "impliedNumber", "number", "validClassName", "maybeClassName", "applyInlineStyles", "style", "element", "applyFrameAnchor", "frameAnchor", "createDimensions", "scales", "marks", "options", "marginTopDefault", "offset", "marginRightDefault", "marginBottomDefault", "marginLeftDefault", "marginTop", "marginRight", "marginBottom", "marginLeft", "margin", "width", "height", "autoHeight", "dimensions", "facetMargin", "facetMarginTop", "facetMarginRight", "facetMarginBottom", "facetMarginLeft", "x", "y", "fy", "fx", "projection", "aspectRatio", "nfy", "ar", "projectionAspectRatio", "nfx", "far", "lar", "ny", "isOrdinalScale", "ratio", "aspectRatioLength", "fxb", "fyb", "w", "k", "scale", "type", "domain", "transform", "exponent", "min", "max", "extent", "createFacets", "channelsByScale", "options", "fx", "fy", "createScales", "fxDomain", "fyDomain", "cross", "x", "y", "i", "recreateFacets", "facets", "X", "Y", "facetIndex", "f", "a", "b", "facetGroups", "data", "I", "range", "FX", "FY", "rollup", "G", "facetTranslator", "marginTop", "marginLeft", "facetExclude", "index", "ex", "e", "sum", "d", "n", "j", "facetAnchors", "facetAnchorTop", "facetAnchorRight", "facetAnchorBottom", "facetAnchorLeft", "and", "facetAnchorTopEmpty", "facetAnchorRightEmpty", "facetAnchorBottomEmpty", "facetAnchorLeftEmpty", "facetAnchorEmpty", "maybeFacetAnchor", "facetAnchor", "anchor", "indexCache", "V", "InternMap", "map", "v", "facetIndexOf", "facetFind", "keyof", "facetEmpty", "empty", "channels", "facetFilter", "groups", "Mark", "data", "channels", "options", "defaults", "facet", "facetAnchor", "fx", "fy", "sort", "dx", "dy", "margin", "marginTop", "marginRight", "marginBottom", "marginLeft", "clip", "extraChannels", "tip", "render", "isDomainSort", "initializer", "basic", "keyword", "singleton", "maybeFacetAnchor", "maybeNamed", "maybeChannels", "styles", "name", "channel", "isOptions", "value", "scale", "optional", "maybeClip", "maybeTip", "composeRender", "facets", "facetChannels", "plotOptions", "arrayify", "range", "originalFacets", "createChannels", "channelDomain", "index", "values", "filter", "defined", "i", "context", "cx", "cy", "project", "scales", "valueObject", "marks", "r1", "r2", "s", "v", "d", "c", "next", "maybeValue", "maybeKeyword", "withTip", "states", "pointerK", "kx", "ky", "x", "y", "px", "py", "maxRadius", "channels", "render", "options", "composeRender", "index", "scales", "values", "dimensions", "context", "next", "svg", "data", "state", "renderIndex", "fx", "fy", "tx", "ty", "faceted", "facetState", "facetStates", "cx", "cy", "applyFrameAnchor", "PX", "PY", "i", "anchorX", "anchorY", "g", "s", "f", "update", "ii", "ri", "r", "I", "p", "ft", "mt", "pointermove", "event", "xp", "yp", "pointer_default", "j", "dx", "dy", "rj", "pointerdown", "pointerleave", "pointer", "pointerX", "pointerY", "X1", "X2", "X", "Y1", "Y2", "Y", "inferFontVariant", "scale", "isOrdinalScale", "legendRamp", "color", "options", "label", "tickSize", "width", "height", "marginTop", "marginRight", "marginBottom", "marginLeft", "style", "ticks", "tickFormat", "fontVariant", "inferFontVariant", "round", "opacity", "className", "context", "createContext", "maybeClassName", "maybeNumberChannel", "svg", "create", "applyInlineStyles", "tickAdjust", "g", "x", "applyRange", "range", "type", "domain", "interpolate", "scale", "pivot", "interpolator", "piecewise", "interpolatePiecewise", "quantize_default", "number_default", "n", "canvas", "context2", "i", "j", "thresholds", "thresholdFormat", "d", "format", "linear", "map", "_", "band", "axisBottom", "impliedString", "radians", "markers", "mark", "marker", "markerStart", "markerMid", "markerEnd", "maybeMarker", "markerCircleFill", "markerArrow", "markerDot", "markerCircleStroke", "orient", "color", "context", "create", "nextMarkerId", "applyMarkers", "path", "S", "applyMarkersColor", "i", "applyMarkersColor", "path", "markerStart", "markerMid", "markerEnd", "stroke", "strokeof", "context", "iriByMarkerColor", "applyMarker", "marker", "i", "color", "iriByColor", "iri", "node", "id", "nextMarkerId", "maybeInsetX", "inset", "insetLeft", "insetRight", "options", "maybeInset", "maybeInsetY", "insetTop", "insetBottom", "inset1", "inset2", "offset", "maybeIntervalValue", "value", "interval", "maybeValue", "maybeInterval", "maybeIntervalK", "k", "maybeInsetK", "options", "trivial", "v", "v1", "v2", "label", "labelof", "V", "kv", "data", "valueof", "D1", "V1", "transform", "map", "maybeIntervalMidK", "V2", "isTemporal", "maybeTrivialIntervalX", "maybeInsetX", "maybeIntervalX", "options", "maybeIntervalK", "maybeInsetX", "maybeIntervalY", "maybeInsetY", "maybeIntervalMidX", "maybeIntervalMidK", "maybeIntervalMidY", "defaults", "RuleX", "Mark", "data", "options", "x", "y1", "y2", "inset", "insetTop", "insetBottom", "withTip", "number", "markers", "index", "scales", "channels", "dimensions", "context", "y", "X", "Y1", "Y2", "width", "height", "marginTop", "marginRight", "marginLeft", "marginBottom", "create", "applyIndirectStyles", "applyTransform", "offset", "g", "applyDirectStyles", "i", "isCollapsed", "applyChannelStyles", "applyMarkers", "RuleY", "x1", "x2", "insetRight", "insetLeft", "Y", "X1", "X2", "ruleX", "identity", "rest", "maybeIntervalY", "maybeOptionalZero", "ruleY", "maybeIntervalX", "template", "strings", "parts", "j", "copy", "i", "s", "defaults", "softHyphen", "Text", "Mark", "data", "options", "x", "y", "text", "isIterable", "isTextual", "identity", "indexOf", "frameAnchor", "textAnchor", "lineAnchor", "lineHeight", "lineWidth", "textOverflow", "monospace", "fontFamily", "fontSize", "fontStyle", "fontVariant", "fontWeight", "rotate", "vrotate", "crotate", "maybeNumberChannel", "vfontSize", "cfontSize", "maybeFontSizeChannel", "numberChannel", "nonempty", "impliedString", "keyword", "maybeTextOverflow", "string", "maybeFrameAnchor", "splitter", "clipper", "index", "scales", "channels", "dimensions", "context", "X", "Y", "R", "T", "TL", "FS", "cx", "cy", "applyFrameAnchor", "create", "applyIndirectStyles", "applyIndirectTextStyles", "applyTransform", "g", "applyDirectStyles", "applyMultilineText", "template", "i", "applyAttr", "applyChannelStyles", "selection", "mark", "splitLines", "clipLine", "lines", "formatDefault", "n", "m", "tspan", "namespaces_default", "title", "maybeTuple", "textX", "maybeIntervalMidY", "textY", "maybeIntervalMidX", "inferFontVariant", "isNumeric", "isTemporal", "fontSizes", "lineWrap", "input", "maxWidth", "widthof", "lineStart", "lineEnd", "wordStart", "wordEnd", "required", "lineBreaks", "j", "k", "defaultWidthMap", "defaultWidth", "start", "end", "sum", "readCharacter", "isPictographic", "monospaceWidth", "clipStart", "clipEnd", "ellipsis", "clipMiddle", "cut", "width", "inset", "I", "w", "l", "e", "ei", "reCombiner", "rePictographic", "isSurrogatePair", "isCombiner", "isZeroWidthJoiner", "isAscii", "hi", "lo", "defaults", "defaultRadius", "wingRatio", "shapeArrow", "context", "l", "r", "wing", "shapeSpike", "shapes", "isShapeObject", "value", "maybeShape", "shape", "Vector", "Mark", "data", "options", "x", "y", "length", "rotate", "anchor", "frameAnchor", "vl", "cl", "maybeNumberChannel", "vr", "cr", "keyword", "maybeFrameAnchor", "index", "scales", "channels", "dimensions", "X", "Y", "L", "A", "cx", "cy", "applyFrameAnchor", "create", "applyIndirectStyles", "applyTransform", "g", "applyDirectStyles", "template", "i", "p", "pathRound", "applyChannelStyles", "vectorX", "data", "options", "x", "identity", "rest", "Vector", "vectorY", "y", "maybeData", "data", "options", "isIterable", "maybeAnchor", "anchor", "anchors", "keyword", "anchorY", "anchorFy", "anchorX", "anchorFx", "axisY", "axisKy", "axisFy", "axisX", "axisKx", "axisFx", "k", "color", "opacity", "stroke", "strokeOpacity", "strokeWidth", "fill", "fillOpacity", "textAnchor", "textStroke", "textStrokeOpacity", "textStrokeWidth", "tickSize", "tickPadding", "tickRotate", "x", "margin", "marginTop", "marginRight", "marginBottom", "marginLeft", "label", "labelAnchor", "labelArrow", "labelOffset", "number", "maybeLabelArrow", "marks", "isNoneish", "axisTickKy", "axisTextKy", "text", "labelOptions", "facets", "channels", "scales", "dimensions", "scale", "cla", "clo", "formatAxisLabel", "y", "axisTickKx", "axisTextKx", "strokeLinecap", "strokeLinejoin", "facetAnchor", "frameAnchor", "inset", "insetLeft", "insetRight", "dx", "axisMark", "vectorY", "offset", "shapeTickLeft", "shapeTickRight", "insetTop", "insetBottom", "dy", "vectorX", "shapeTickBottom", "shapeTickTop", "radians", "tickFormat", "lineAnchor", "fontVariant", "textY", "ticks", "inferFontVariant", "inferTextChannel", "textX", "gridY", "gridKy", "gridFy", "gridX", "gridKx", "gridFx", "x1", "x2", "ruleY", "gridDefaults", "y1", "y2", "ruleX", "fontFamily", "fontSize", "fontStyle", "fontWeight", "monospace", "pointerEvents", "shapeRendering", "initializer", "maybeColorChannel", "maybeNumberChannel", "mark", "ariaLabel", "initialize", "axisInitializer", "_channels", "context", "initializeFacets", "tickSpacing", "interval", "isTemporalScale", "arrayify", "maybeRangeInterval", "min", "max", "extent", "range", "identity", "initializedChannels", "name", "channel", "valueof", "basicInitializer", "m", "inferTickFormat", "formatTimeTicks", "isUtcYear", "utcFormat", "isTimeYear", "timeFormat", "formatDefault", "isTemporal", "format", "constant", "l", "inferScaleOrder", "orderof", "isTemporalish", "order", "maybeScale", "scale", "key", "s", "legendSwatches", "color", "opacity", "options", "isOrdinalScale", "isThresholdScale", "legendItems", "selection", "width", "height", "maybeNumberChannel", "legendSymbols", "symbol", "fill", "fillOpacity", "stroke", "isNoneish", "strokeOpacity", "strokeWidth", "r", "vf", "cf", "maybeColorChannel", "vs", "cs", "sf", "ss", "size", "d", "p", "pathRound", "swatch", "columns", "tickFormat", "fontVariant", "inferFontVariant", "swatchSize", "swatchWidth", "swatchHeight", "marginLeft", "className", "style", "context", "createContext", "maybeClassName", "inferTickFormat", "swatches", "create", "extraStyle", "item", "div", "impliedString", "applyInlineStyles", "legendRegistry", "legendSymbols", "legendColor", "legendOpacity", "exposeLegends", "scales", "context", "defaults", "key", "options", "legendRegistry", "legendOptions", "className", "label", "ticks", "tickFormat", "inherit", "legendColor", "color", "legend", "legendSwatches", "legendRamp", "legendOpacity", "type", "interpolate", "scale", "rgb", "interpolateOpacity", "r", "g", "b", "t", "createLegends", "legends", "value", "o", "defaults", "lineDefaults", "Frame", "Mark", "options", "anchor", "inset", "insetTop", "insetRight", "insetBottom", "insetLeft", "rx", "ry", "singleton", "maybeKeyword", "number", "index", "scales", "channels", "dimensions", "context", "marginTop", "marginRight", "marginBottom", "marginLeft", "width", "height", "x1", "x2", "y1", "y2", "create", "applyIndirectStyles", "applyDirectStyles", "applyChannelStyles", "applyTransform", "line", "rect", "frame", "defaults", "ignoreChannels", "Tip", "Mark", "data", "options", "isIterable", "isTextual", "identity", "x", "y", "x1", "x2", "y1", "y2", "anchor", "monospace", "fontFamily", "fontSize", "fontStyle", "fontVariant", "fontWeight", "lineHeight", "lineWidth", "frameAnchor", "textAnchor", "textOverflow", "textPadding", "title", "pointerSize", "pathFilter", "maybeAnchor", "maybeFrameAnchor", "impliedString", "string", "maybeTextOverflow", "number", "key", "splitter", "clipper", "index", "scales", "values", "dimensions", "context", "mark", "fx", "fy", "svg", "document", "r", "m", "marginTop", "marginLeft", "sources", "getSources", "X1", "Y1", "X2", "Y2", "X", "Y", "ox", "oy", "cx", "cy", "applyFrameAnchor", "px", "anchorX", "py", "anchorY", "widthof", "monospaceWidth", "defaultWidth", "ee", "ellipsis", "formatFx", "inferTickFormat", "formatFy", "format", "i", "text", "line", "formatDefault", "channel", "value", "defined", "formatLabel", "formatPair", "scale", "g", "create", "applyIndirectStyles", "applyIndirectTextStyles", "applyTransform", "applyDirectStyles", "that", "select_default", "names", "name", "renderLine", "selection", "color", "opacity", "swatch", "w", "j", "cut", "k", "postrender", "width", "height", "tx", "h", "a", "fitLeft", "fitRight", "fitTop", "fitBottom", "ax", "ay", "path", "getPath", "t", "getLineOffset", "getTextTranslate", "tip", "maybeTuple", "length", "channels", "source", "getSource", "c1", "c2", "c", "defaultLabel", "plot", "options", "facet", "style", "caption", "ariaLabel", "ariaDescription", "className", "maybeClassName", "marks", "flatMarks", "inferTips", "topFacetState", "maybeTopFacet", "facetStateByMark", "mark", "facetState", "maybeMarkFacet", "channelsByScale", "addScaleChannels", "axes", "inferAxes", "facets", "createFacets", "topFacetsIndex", "facetFilter", "nonEmpty", "facetsIndex", "index", "i", "f", "facetExclude", "key", "registry", "isScaleOptions", "stateByMark", "facetChannels", "data", "channels", "applyScaleTransforms", "scaleDescriptors", "createScales", "scales", "createScaleFunctions", "dimensions", "createDimensions", "autoScaleRange", "fx", "fy", "subdimensions", "innerDimensions", "superdimensions", "actualDimensions", "context", "createContext", "document", "svg", "creator_default", "figure", "createProjection", "facetGroups", "state", "value", "newByScale", "update", "inferChannelScales", "channel", "scale", "position", "applyScaleTransform", "newChannelsByScale", "newScaleDescriptors", "inheritScaleLabels", "newScales", "facetDomains", "facetTranslate", "recreateFacets", "facetTranslator", "width", "height", "select_default", "applyInlineStyles", "values", "indexes", "node", "g", "faceted", "subarray", "name", "legends", "createLegends", "legend", "figcaption", "exposeScales", "exposeLegends", "w", "consumeWarnings", "plotThis", "Mark", "markify", "Render", "render", "t", "type", "percent", "interval", "transform", "x", "maybeIntervalTransform", "map", "inferChannelScale", "filter", "yes", "hasProjection", "gx", "gy", "y", "getGeometryChannels", "addScaleChannel", "scaleChannels", "arrayify", "createChannel", "groups", "warn", "derive", "initializer", "tips", "pointerX", "pointerY", "pointer", "tip", "projection", "axis", "grid", "facetAxis", "facetGrid", "xAxis", "xGrid", "yAxis", "yGrid", "fxAxis", "fxGrid", "fyAxis", "fyGrid", "hasPositionChannel", "hasAxis", "maybeGrid", "gridFy", "maybeAxis", "axisFy", "gridFx", "axisFx", "gridY", "axisY", "gridX", "axisX", "axisType", "primary", "secondary", "defaults", "both", "isBoth", "axisOptions", "line", "isNone", "frame", "lineOptions", "gridType", "gridOptions", "anchor", "ticks", "tickSize", "tickSpacing", "tickPadding", "tickFormat", "tickRotate", "fontVariant", "label", "labelAnchor", "labelArrow", "labelOffset", "stroke", "isColor", "isGridTicks", "isIterable", "k", "prefix", "m", "newScale", "marginTop", "marginRight", "marginBottom", "marginLeft", "outerDimensions", "fxr", "outerRange", "fyr", "domain", "x1", "x2", "binX", "outputs", "options", "mergeOptions", "x", "y", "binn", "maybeBinValue", "identity", "maybeInsetX", "binn", "bx", "by", "gx", "gy", "reduceData", "reduceIdentity", "filter", "reduceCount", "sort", "reverse", "outputs", "inputs", "maybeBin", "maybeBinOutputs", "maybeBinReduce", "identity", "maybeBinOutput", "maybeBinEvaluator", "hasOutput", "BX1", "setBX1", "maybeColumn", "BX2", "setBX2", "BY1", "setBY1", "BY2", "setBY2", "k", "gk", "GK", "setGK", "x", "y", "z", "fill", "stroke", "x1", "x2", "y1", "y2", "domain", "cumulative", "thresholds", "interval", "options", "GZ", "setGZ", "vfill", "maybeColorChannel", "vstroke", "GF", "setGF", "GS", "setGS", "basic", "data", "facets", "plotOptions", "K", "maybeApplyInterval", "valueof", "Z", "F", "S", "G", "maybeSubgroup", "groupFacets", "groupData", "bin", "bing", "i", "o", "facet", "groupFacet", "f", "I", "maybeGroup", "g", "b", "extent", "maybeSort", "mid", "name", "output", "mergeOptions", "maybeBinValue", "value", "defaultValue", "maybeValue", "maybeThresholds", "maybeBin", "options", "value", "cumulative", "domain", "extent", "thresholds", "bin", "data", "V", "valueof", "T", "isTemporal", "isTimeThresholds", "map", "coerceDate", "min", "max", "t", "isInterval", "utcTickInterval", "coerceNumbers", "step", "tickIncrement", "r0", "r1", "n", "i", "ticks", "E", "bin1cn", "bin1cp", "bin1", "labelof", "maybeThresholds", "interval", "defaultThresholds", "thresholdAuto", "maybeRangeInterval", "thresholdFreedmanDiaconis", "thresholdScott", "thresholdSturges", "maybeUtcInterval", "maybeBinOutputs", "outputs", "inputs", "maybeOutputs", "maybeBinOutput", "name", "reduce", "maybeOutput", "maybeBinEvaluator", "maybeEvaluator", "maybeBinReduce", "maybeReduce", "maybeBinReduceFallback", "reduceX", "reduceX1", "reduceX2", "reduceY", "reduceY1", "reduceY2", "values", "isTimeInterval", "isIterable", "bing", "EX", "EY", "I", "X", "ix", "x1", "x2", "Y", "iy", "y1", "y2", "B", "bisect_default", "C", "b", "j", "mid1", "m", "maybeIdentityY", "options", "hasY", "identity", "stackY", "stackOptions", "options", "mergeOptions", "x1", "x", "y", "rest", "transform", "X", "y1", "y2", "stack", "mid", "maybeStackY", "y", "y1", "y2", "options", "withTip", "stackY", "maybeZero", "mergeOptions", "offset", "order", "reverse", "rest", "lengthy", "stack", "x", "one", "kx", "ky", "z", "maybeZ", "X", "setX", "maybeColumn", "Y1", "setY1", "column", "Y2", "setY2", "maybeOffset", "maybeOrder", "basic", "data", "facets", "plotOptions", "maybeApplyInterval", "valueof", "Y", "Z", "compare", "n", "facetstacks", "facet", "stacks", "group", "i", "yn", "yp", "offsetExpand", "offsetCenter", "offsetWiggle", "extent", "min", "max", "m", "offsetZero", "offsetCenterFacets", "prev", "InternMap", "j", "Fi", "Df", "value", "diff", "Cf1", "cumsum", "s1", "sum", "d", "I", "m0", "p", "orderInsideOut", "ascendingDefined", "negate", "descendingDefined", "orderY", "orderZ", "orderSum", "orderAppearance", "orderAccessor", "field", "orderComparator", "orderGiven", "orderZDomain", "groupSort", "range", "greatest", "K", "sums", "rollup", "Kp", "Kn", "k", "f", "O", "domain", "map", "defaults", "Rect", "Mark", "data", "options", "x1", "y1", "x2", "y2", "inset", "insetTop", "insetRight", "insetBottom", "insetLeft", "rx", "ry", "number", "impliedString", "index", "scales", "channels", "dimensions", "context", "x", "y", "X1", "Y1", "X2", "Y2", "marginTop", "marginRight", "marginBottom", "marginLeft", "width", "height", "projection", "create", "applyIndirectStyles", "applyTransform", "g", "applyDirectStyles", "isCollapsed", "i", "applyAttr", "applyChannelStyles", "rectY", "data", "options", "hasXY", "indexOf", "identity", "Rect", "maybeStackY", "maybeTrivialIntervalX", "maybeIdentityY", "debounce", "callback", "wait", "timeout", "args", "drawCharts", "configSelector", "breadcrumbController", "sectionController", "html", "closed", "v", "str", "program", "counter", "rectYOpts", "d", "n", "chart", "plot", "rectY", "binX", "ruleY", "el", "params", "headings", "callback", "debounce", "above", "h", "rect", "threshold", "els", "level", "breadcrumb", "items", "li", "a", "observer"]
 }
diff --git a/internal/content/gotelemetryview/storage.min.js b/internal/content/gotelemetryview/storage.min.js
deleted file mode 100644
index 9b0bdb7..0000000
--- a/internal/content/gotelemetryview/storage.min.js
+++ /dev/null
@@ -1,9 +0,0 @@
-// Code generated by esbuild. DO NOT EDIT.
-"use strict";(()=>{(function(){let t=localStorage.getItem("closed-sections")??"";document.querySelector("html")?.setAttribute("data-closed-sections",t)})();})();
-/**
- * @license
- * Copyright 2023 The Go Authors. All rights reserved.
- * Use of this source code is governed by a BSD-style
- * license that can be found in the LICENSE file.
- */
-//# sourceMappingURL=storage.min.js.map
diff --git a/internal/content/gotelemetryview/storage.min.js.map b/internal/content/gotelemetryview/storage.min.js.map
deleted file mode 100644
index 1c426d3..0000000
--- a/internal/content/gotelemetryview/storage.min.js.map
+++ /dev/null
@@ -1,7 +0,0 @@
-{
-  "version": 3,
-  "sources": ["storage.ts"],
-  "sourcesContent": ["/**\n * @license\n * Copyright 2023 The Go Authors. All rights reserved.\n * Use of this source code is governed by a BSD-style\n * license that can be found in the LICENSE file.\n */\n\n(function () {\n  const closedSections = localStorage.getItem(\"closed-sections\") ?? \"\";\n  const html = document.querySelector(\"html\");\n  html?.setAttribute(\"data-closed-sections\", closedSections);\n})();\n"],
-  "mappings": ";oBAOC,UAAY,CACX,IAAMA,EAAiB,aAAa,QAAQ,iBAAiB,GAAK,GACrD,SAAS,cAAc,MAAM,GACpC,aAAa,uBAAwBA,CAAc,CAC3D,GAAG",
-  "names": ["closedSections"]
-}
diff --git a/internal/content/shared/base.css b/internal/content/shared/base.css
index 60838c8..4e74043 100644
--- a/internal/content/shared/base.css
+++ b/internal/content/shared/base.css
@@ -14,8 +14,43 @@
   --border-radius: 0.25rem;
 }
 
+.Breadcrumb {
+  background-color: var(--color-background-accented);
+}
+.Breadcrumb ol {
+  list-style: none;
+  align-items: center;
+  padding: 0;
+  margin: 1.5rem 0;
+  display: inline-flex;
+}
+.Breadcrumb li {
+  display: flex;
+  font-size: 0.875rem;
+}
+.Breadcrumb li:not(:last-child):after {
+  /* TODO(rfindley): use this arrow instead, from go.dev */
+  /* background: url("arrow-forward.svg") no-repeat; */
+  content: '>';
+  display: block;
+  height: 1rem;
+  margin: 0 0.8125rem;
+  width: 1rem;
+  text-align: center;
+}
+
+.Hero {
+  background-color: var(--color-background-accented);
+  padding: 1rem 0;
+}
+.Hero h1 {
+  font-size: 2.25rem;
+  font-weight: normal;
+  margin: 0;
+}
+
 .Container {
-  margin: 2rem 0 5rem;
+  margin: 0 0 5rem;
 }
 
 .Content {
diff --git a/internal/content/shared/base.html b/internal/content/shared/base.html
deleted file mode 100644
index ab01ea7..0000000
--- a/internal/content/shared/base.html
+++ /dev/null
@@ -1,7 +0,0 @@
-<!--
-  Copyright 2023 The Go Authors. All rights reserved.
-  Use of this source code is governed by a BSD-style
-  license that can be found in the LICENSE file.
--->
-
-{{template "base" .}}
diff --git a/internal/content/shared/base.tmpl b/internal/content/shared/base.tmpl
index b6e5b5b..eca3fca 100644
--- a/internal/content/shared/base.tmpl
+++ b/internal/content/shared/base.tmpl
@@ -17,8 +17,19 @@
   <link rel="stylesheet" href="/static/base.min.css">
 </head>
 <body>
+	{{with .Breadcrumbs}}
+  <nav class="Breadcrumb">
+    <div class="Content">
+      <ol>
+        {{range .}}
+        <li>{{if .Link}}<a href="{{.Link}}">{{.Label}}</a>{{else}}{{.Label}}{{end}}</li>
+        {{end}}
+      </ol>
+    </div>
+  </nav>
+  {{end}}
   <div class="Container">
-    <div class="Content">{{block "content" .}}{{.Content}}{{end}}</div>
+    {{block "content" .}}{{.Content}}{{end}}
   </div>
 </body>
 </html>
diff --git a/internal/content/shared/chartbrowser.css b/internal/content/shared/chartbrowser.css
new file mode 100644
index 0000000..bc85a96
--- /dev/null
+++ b/internal/content/shared/chartbrowser.css
@@ -0,0 +1,60 @@
+/*!
+ * Copyright 2024 The Go Authors. All rights reserved.
+ * Use of this source code is governed by a BSD-style
+ * license that can be found in the LICENSE file.
+ */
+
+@import url("../shared/treenav.css");
+
+/* Fix tooltip background for dark theme */
+svg g[aria-label="tip"] g {
+  fill: var(--color-background);
+}
+
+.Chartbrowser-view {
+  display: flex;
+  flex-direction: row;
+}
+.Chartbrowser-index {
+  flex: 1 1;
+  padding-right: 2rem;
+}
+.Chartbrowser-heading {
+  font-weight: bold;
+  font-size: 1.25rem;
+  margin: 0 0 0.5rem 0;
+}
+.Chartbrowser-index-sticky {
+  position: sticky;
+  top: 1rem;
+  width: 10rem;
+}
+.Chartbrowser-index-sticky > ul {
+  position: sticky;
+  top: 1rem;
+  margin-top: 0;
+}
+.Chartbrowser-link {
+  color: var(--color-text-subtle);
+  font-size: .875rem;
+  line-height: 1.5rem;
+}
+.Chartbrowser-program {
+  font-weight: normal;
+  margin: 0 0 1rem 0;
+  color: var(--color-text-subtle);
+}
+.Chartbrowser-program:not(:first-of-type) {
+  margin-top: 2rem;
+}
+.Chartbrowser-chart {
+  background-color: var(--color-background-accented);
+  border: 1px solid transparent;
+  margin-bottom: 1rem;
+  padding: 0.875rem;
+  box-shadow: 0 1px 2px 0 rgba(60, 64, 67, .3), 0 1px 3px 1px rgba(60, 64, 67, .15);
+}
+.Chartbrowser-chart-name {
+  text-align: center;
+  margin: 0;
+}
diff --git a/internal/content/shared/chartbrowser.tmpl b/internal/content/shared/chartbrowser.tmpl
new file mode 100644
index 0000000..0b0fdfa
--- /dev/null
+++ b/internal/content/shared/chartbrowser.tmpl
@@ -0,0 +1,54 @@
+<!--
+  Copyright 2024 The Go Authors. All rights reserved.
+  Use of this source code is governed by a BSD-style
+  license that can be found in the LICENSE file.
+-->
+
+<!--
+  A chart browser is a reusable component for displaying a collection of
+  charts.
+-->
+
+{{define "chartbrowser"}}
+  <div class="Chartbrowser-view js-Tree">
+    <div class="Chartbrowser-index">
+      <nav class="Chartbrowser-index-sticky">
+        <h3 class="Chartbrowser-heading">Charts</h2>
+        <ul>
+        {{range .Charts.Programs}}
+          {{if .Charts}}
+          <li class="js-Tree-item" data-heading-id="{{.ID}}">
+            <a class="Chartbrowser-link" href="#{{.ID}}">{{programName .Name}}</a>
+            <ul>
+              {{range .Charts}}
+              {{with .}}
+              <li class="js-Tree-item" data-heading-id="{{.ID}}">
+                <a class="Chartbrowser-link" href="#{{.ID}}">{{chartName .Name}}</a>
+              </li>
+              {{end}}
+              {{end}}
+            </ul>
+          </li>
+          {{end}}
+        {{end}}
+        </ul>
+      </nav>
+    </div>
+    <div class="Chartbrowser-content">
+    {{range .Charts.Programs}}
+      {{if .Charts}}
+      {{$progName := programName .Name}}
+      <h3 id="{{.ID}}" class="Chartbrowser-program js-Tree-heading">{{$progName}}</h3>
+      {{range .Charts}}
+      {{with .}}
+      <div class="Chartbrowser-chart">
+        <h4 id="{{.ID}}" class="Chartbrowser-chart-name js-Tree-heading">{{$progName}} > {{chartName .Name}}</h4>
+        <div class="Chart-chart" data-chart-id="{{.ID}}"></div>
+      </div>
+      {{end}}
+      {{end}}
+      {{end}}
+    {{end}}
+    </div>
+  </div>
+{{end}}
diff --git a/internal/content/shared/static/base.min.css b/internal/content/shared/static/base.min.css
index 5ef0c80..0240a2b 100644
--- a/internal/content/shared/static/base.min.css
+++ b/internal/content/shared/static/base.min.css
@@ -1,5 +1,5 @@
 /* Code generated by esbuild. DO NOT EDIT. */
-html{line-height:1.15;-webkit-text-size-adjust:100%}body{margin:0}main{display:block}h1{font-size:2em;margin:.67em 0}hr{box-sizing:content-box;height:0;overflow:visible}pre{font-family:monospace,monospace;font-size:1em}a{background-color:transparent}abbr[title]{border-bottom:none;text-decoration:underline;text-decoration:underline dotted}b,strong{font-weight:bolder}code,kbd,samp{font-family:monospace,monospace;font-size:1em}small{font-size:80%}sub,sup{font-size:75%;line-height:0;position:relative;vertical-align:baseline}sub{bottom:-.25em}sup{top:-.5em}img{border-style:none}button,input,optgroup,select,textarea{font-family:inherit;font-size:100%;line-height:1.15;margin:0}button,input{overflow:visible}button,select{text-transform:none}button,[type=button],[type=reset],[type=submit]{-webkit-appearance:button}button::-moz-focus-inner,[type=button]::-moz-focus-inner,[type=reset]::-moz-focus-inner,[type=submit]::-moz-focus-inner{border-style:none;padding:0}button:-moz-focusring,[type=button]:-moz-focusring,[type=reset]:-moz-focusring,[type=submit]:-moz-focusring{outline:1px dotted ButtonText}fieldset{padding:.35em .75em .625em}legend{box-sizing:border-box;color:inherit;display:table;max-width:100%;padding:0;white-space:normal}progress{vertical-align:baseline}textarea{overflow:auto}[type=checkbox],[type=radio]{box-sizing:border-box;padding:0}[type=number]::-webkit-inner-spin-button,[type=number]::-webkit-outer-spin-button{height:auto}[type=search]{-webkit-appearance:textfield;outline-offset:-2px}[type=search]::-webkit-search-decoration{-webkit-appearance:none}::-webkit-file-upload-button{-webkit-appearance:button;font:inherit}details{display:block}summary{display:list-item}template{display:none}[hidden]{display:none}:root{--gray-1: #202224;--gray-2: #3e4042;--gray-3: #555759;--gray-4: #6e7072;--gray-5: #848688;--gray-6: #aaacae;--gray-7: #c6c8ca;--gray-8: #dcdee0;--gray-9: #f0f1f2;--gray-10: #f8f8f8;--turq-light: #5dc9e2;--turq-med: #50b7e0;--turq-dark: #007d9c;--blue: #bfeaf4;--blue-light: #f2fafd;--black: #000;--green: #3a6e11;--green-light: #5fda64;--pink: #c85e7a;--pink-light: #fdecf1;--purple: #542c7d;--slate: #253443;--white: #fff;--yellow: #fceea5;--yellow-light: #fff8cc;--color-brand-primary: var(--turq-dark);--color-background: var(--white);--color-background-inverted: var(--slate);--color-background-accented: var(--gray-10);--color-background-highlighted: var(--blue);--color-background-highlighted-link: var(--blue-light);--color-background-info: var(--gray-9);--color-background-warning: var(--yellow-light);--color-background-alert: var(--pink-light);--color-border: var(--gray-7);--color-text: var(--gray-1);--color-text-subtle: var(--gray-4);--color-text-link: var(--turq-dark);--color-text-inverted: var(--white);--color-code-comment: var(--green);--color-input: var(--color-background);--color-input-text: var(--color-text);--color-button: var(--turq-dark);--color-button-disabled: var(--gray-9);--color-button-text: var(--white);--color-button-text-disabled: var(--gray-3);--color-button-inverted: var(--color-background);--color-button-inverted-disabled: var(--color-background);--color-button-inverted-text: var(--color-brand-primary);--color-button-inverted-text-disabled: var(--color-text-subtle);--color-button-accented: var(--yellow);--color-button-accented-disabled: var(--gray-9);--color-button-accented-text: var(--gray-1);--color-button-accented-text-disabled: var(--gray-3)}@media (prefers-color-scheme: dark){:root:not([data-theme="light"]){--color-brand-primary: var(--turq-med);--color-background: var(--gray-1);--color-background-accented: var(--gray-2);--color-background-highlighted: var(--gray-2);--color-background-highlighted-link: var(--gray-2);--color-background-info: var(--gray-3);--color-background-warning: var(--yellow);--color-background-alert: var(--pink);--color-border: var(--gray-4);--color-text: var(--gray-9);--color-text-link: var(--turq-med);--color-text-subtle: var(--gray-7);--color-code-comment: var(--green-light)}img.go-Icon{filter:invert(1)}}body{background-color:var(--color-background);color:var(--color-text);font-family:-apple-system,BlinkMacSystemFont,Segoe UI,Helvetica,Arial,sans-serif,"Apple Color Emoji","Segoe UI Emoji";font-size:1rem;line-height:normal}p{line-height:1.4375;max-width:75ch}hr{border:none;border-bottom:var(--border);margin:0;width:100%}code,pre,textarea.code{font-family:SFMono-Regular,Consolas,Liberation Mono,Menlo,monospace;font-size:.875rem;line-height:1.5em}pre,textarea.code{background-color:var(--color-background-accented);border:var(--border);border-radius:var(--border-radius);color:var(--color-text);overflow-x:auto;padding:.625rem;tab-size:4;white-space:pre}button,input,select,textarea{font:inherit}a,a:link,a:visited{color:var(--color-brand-primary);text-decoration:none}a:hover{color:var(--color-brand-primary);text-decoration:underline}a:hover>*{text-decoration:underline}.go-Tooltip{border-radius:var(--border-radius);cursor:pointer;display:inline-block;position:relative}.go-Tooltip>summary{list-style:none}.go-Tooltip>summary::-webkit-details-marker,.go-Tooltip>summary::marker{display:none}.go-Tooltip>summary>img{vertical-align:text-bottom}.go-Tooltip p{background:var(--color-background) 80%;border:var(--border);border-radius:var(--border-radius);color:var(--color-text);font-size:.75rem;letter-spacing:.0187rem;line-height:1rem;padding:.5rem;position:absolute;top:1.5rem;white-space:normal;width:12rem;z-index:100}:root{--border: .0625rem solid var(--color-border);--border-radius: .25rem}.Container{margin:2rem 0 5rem}.Content{margin:0 auto;max-width:64rem;padding:0 1rem}
+html{line-height:1.15;-webkit-text-size-adjust:100%}body{margin:0}main{display:block}h1{font-size:2em;margin:.67em 0}hr{box-sizing:content-box;height:0;overflow:visible}pre{font-family:monospace,monospace;font-size:1em}a{background-color:transparent}abbr[title]{border-bottom:none;text-decoration:underline;text-decoration:underline dotted}b,strong{font-weight:bolder}code,kbd,samp{font-family:monospace,monospace;font-size:1em}small{font-size:80%}sub,sup{font-size:75%;line-height:0;position:relative;vertical-align:baseline}sub{bottom:-.25em}sup{top:-.5em}img{border-style:none}button,input,optgroup,select,textarea{font-family:inherit;font-size:100%;line-height:1.15;margin:0}button,input{overflow:visible}button,select{text-transform:none}button,[type=button],[type=reset],[type=submit]{-webkit-appearance:button}button::-moz-focus-inner,[type=button]::-moz-focus-inner,[type=reset]::-moz-focus-inner,[type=submit]::-moz-focus-inner{border-style:none;padding:0}button:-moz-focusring,[type=button]:-moz-focusring,[type=reset]:-moz-focusring,[type=submit]:-moz-focusring{outline:1px dotted ButtonText}fieldset{padding:.35em .75em .625em}legend{box-sizing:border-box;color:inherit;display:table;max-width:100%;padding:0;white-space:normal}progress{vertical-align:baseline}textarea{overflow:auto}[type=checkbox],[type=radio]{box-sizing:border-box;padding:0}[type=number]::-webkit-inner-spin-button,[type=number]::-webkit-outer-spin-button{height:auto}[type=search]{-webkit-appearance:textfield;outline-offset:-2px}[type=search]::-webkit-search-decoration{-webkit-appearance:none}::-webkit-file-upload-button{-webkit-appearance:button;font:inherit}details{display:block}summary{display:list-item}template{display:none}[hidden]{display:none}:root{--gray-1: #202224;--gray-2: #3e4042;--gray-3: #555759;--gray-4: #6e7072;--gray-5: #848688;--gray-6: #aaacae;--gray-7: #c6c8ca;--gray-8: #dcdee0;--gray-9: #f0f1f2;--gray-10: #f8f8f8;--turq-light: #5dc9e2;--turq-med: #50b7e0;--turq-dark: #007d9c;--blue: #bfeaf4;--blue-light: #f2fafd;--black: #000;--green: #3a6e11;--green-light: #5fda64;--pink: #c85e7a;--pink-light: #fdecf1;--purple: #542c7d;--slate: #253443;--white: #fff;--yellow: #fceea5;--yellow-light: #fff8cc;--color-brand-primary: var(--turq-dark);--color-background: var(--white);--color-background-inverted: var(--slate);--color-background-accented: var(--gray-10);--color-background-highlighted: var(--blue);--color-background-highlighted-link: var(--blue-light);--color-background-info: var(--gray-9);--color-background-warning: var(--yellow-light);--color-background-alert: var(--pink-light);--color-border: var(--gray-7);--color-text: var(--gray-1);--color-text-subtle: var(--gray-4);--color-text-link: var(--turq-dark);--color-text-inverted: var(--white);--color-code-comment: var(--green);--color-input: var(--color-background);--color-input-text: var(--color-text);--color-button: var(--turq-dark);--color-button-disabled: var(--gray-9);--color-button-text: var(--white);--color-button-text-disabled: var(--gray-3);--color-button-inverted: var(--color-background);--color-button-inverted-disabled: var(--color-background);--color-button-inverted-text: var(--color-brand-primary);--color-button-inverted-text-disabled: var(--color-text-subtle);--color-button-accented: var(--yellow);--color-button-accented-disabled: var(--gray-9);--color-button-accented-text: var(--gray-1);--color-button-accented-text-disabled: var(--gray-3)}@media (prefers-color-scheme: dark){:root:not([data-theme="light"]){--color-brand-primary: var(--turq-med);--color-background: var(--gray-1);--color-background-accented: var(--gray-2);--color-background-highlighted: var(--gray-2);--color-background-highlighted-link: var(--gray-2);--color-background-info: var(--gray-3);--color-background-warning: var(--yellow);--color-background-alert: var(--pink);--color-border: var(--gray-4);--color-text: var(--gray-9);--color-text-link: var(--turq-med);--color-text-subtle: var(--gray-7);--color-code-comment: var(--green-light)}img.go-Icon{filter:invert(1)}}body{background-color:var(--color-background);color:var(--color-text);font-family:-apple-system,BlinkMacSystemFont,Segoe UI,Helvetica,Arial,sans-serif,"Apple Color Emoji","Segoe UI Emoji";font-size:1rem;line-height:normal}p{line-height:1.4375;max-width:75ch}hr{border:none;border-bottom:var(--border);margin:0;width:100%}code,pre,textarea.code{font-family:SFMono-Regular,Consolas,Liberation Mono,Menlo,monospace;font-size:.875rem;line-height:1.5em}pre,textarea.code{background-color:var(--color-background-accented);border:var(--border);border-radius:var(--border-radius);color:var(--color-text);overflow-x:auto;padding:.625rem;tab-size:4;white-space:pre}button,input,select,textarea{font:inherit}a,a:link,a:visited{color:var(--color-brand-primary);text-decoration:none}a:hover{color:var(--color-brand-primary);text-decoration:underline}a:hover>*{text-decoration:underline}.go-Tooltip{border-radius:var(--border-radius);cursor:pointer;display:inline-block;position:relative}.go-Tooltip>summary{list-style:none}.go-Tooltip>summary::-webkit-details-marker,.go-Tooltip>summary::marker{display:none}.go-Tooltip>summary>img{vertical-align:text-bottom}.go-Tooltip p{background:var(--color-background) 80%;border:var(--border);border-radius:var(--border-radius);color:var(--color-text);font-size:.75rem;letter-spacing:.0187rem;line-height:1rem;padding:.5rem;position:absolute;top:1.5rem;white-space:normal;width:12rem;z-index:100}:root{--border: .0625rem solid var(--color-border);--border-radius: .25rem}.Breadcrumb{background-color:var(--color-background-accented)}.Breadcrumb ol{list-style:none;align-items:center;padding:0;margin:1.5rem 0;display:inline-flex}.Breadcrumb li{display:flex;font-size:.875rem}.Breadcrumb li:not(:last-child):after{content:">";display:block;height:1rem;margin:0 .8125rem;width:1rem;text-align:center}.Hero{background-color:var(--color-background-accented);padding:1rem 0}.Hero h1{font-size:2.25rem;font-weight:400;margin:0}.Container{margin:0 0 5rem}.Content{margin:0 auto;max-width:64rem;padding:0 1rem}
 /*! normalize.css v8.0.1 | MIT License | github.com/necolas/normalize.css */
 /*!
  * Copyright 2021 The Go Authors. All rights reserved.
diff --git a/internal/content/shared/static/base.min.css.map b/internal/content/shared/static/base.min.css.map
index 6824215..b438420 100644
--- a/internal/content/shared/static/base.min.css.map
+++ b/internal/content/shared/static/base.min.css.map
@@ -1,7 +1,7 @@
 {
   "version": 3,
   "sources": ["../_normalize.css", "../_color.css", "../_typography.css", "../_tooltip.css", "../base.css"],
-  "sourcesContent": ["/* stylelint-disable */\n/*! normalize.css v8.0.1 | MIT License | github.com/necolas/normalize.css */\n\n/* Document\n   ========================================================================== */\n\n/**\n * 1. Correct the line height in all browsers.\n * 2. Prevent adjustments of font size after orientation changes in iOS.\n */\n\nhtml {\n  line-height: 1.15; /* 1 */\n  -webkit-text-size-adjust: 100%; /* 2 */\n}\n\n/* Sections\n   ========================================================================== */\n\n/**\n * Remove the margin in all browsers.\n */\n\nbody {\n  margin: 0;\n}\n\n/**\n * Render the `main` element consistently in IE.\n */\n\nmain {\n  display: block;\n}\n\n/**\n * Correct the font size and margin on `h1` elements within `section` and\n * `article` contexts in Chrome, Firefox, and Safari.\n */\n\nh1 {\n  font-size: 2em;\n  margin: 0.67em 0;\n}\n\n/* Grouping content\n   ========================================================================== */\n\n/**\n * 1. Add the correct box sizing in Firefox.\n * 2. Show the overflow in Edge and IE.\n */\n\nhr {\n  box-sizing: content-box; /* 1 */\n  height: 0; /* 1 */\n  overflow: visible; /* 2 */\n}\n\n/**\n * 1. Correct the inheritance and scaling of font size in all browsers.\n * 2. Correct the odd `em` font sizing in all browsers.\n */\n\npre {\n  font-family: monospace, monospace; /* 1 */\n  font-size: 1em; /* 2 */\n}\n\n/* Text-level semantics\n   ========================================================================== */\n\n/**\n * Remove the gray background on active links in IE 10.\n */\n\na {\n  background-color: transparent;\n}\n\n/**\n * 1. Remove the bottom border in Chrome 57-\n * 2. Add the correct text decoration in Chrome, Edge, IE, Opera, and Safari.\n */\n\nabbr[title] {\n  border-bottom: none; /* 1 */\n  text-decoration: underline; /* 2 */\n  text-decoration: underline dotted; /* 2 */\n}\n\n/**\n * Add the correct font weight in Chrome, Edge, and Safari.\n */\n\nb,\nstrong {\n  font-weight: bolder;\n}\n\n/**\n * 1. Correct the inheritance and scaling of font size in all browsers.\n * 2. Correct the odd `em` font sizing in all browsers.\n */\n\ncode,\nkbd,\nsamp {\n  font-family: monospace, monospace; /* 1 */\n  font-size: 1em; /* 2 */\n}\n\n/**\n * Add the correct font size in all browsers.\n */\n\nsmall {\n  font-size: 80%;\n}\n\n/**\n * Prevent `sub` and `sup` elements from affecting the line height in\n * all browsers.\n */\n\nsub,\nsup {\n  font-size: 75%;\n  line-height: 0;\n  position: relative;\n  vertical-align: baseline;\n}\n\nsub {\n  bottom: -0.25em;\n}\n\nsup {\n  top: -0.5em;\n}\n\n/* Embedded content\n   ========================================================================== */\n\n/**\n * Remove the border on images inside links in IE 10.\n */\n\nimg {\n  border-style: none;\n}\n\n/* Forms\n   ========================================================================== */\n\n/**\n * 1. Change the font styles in all browsers.\n * 2. Remove the margin in Firefox and Safari.\n */\n\nbutton,\ninput,\noptgroup,\nselect,\ntextarea {\n  font-family: inherit; /* 1 */\n  font-size: 100%; /* 1 */\n  line-height: 1.15; /* 1 */\n  margin: 0; /* 2 */\n}\n\n/**\n * Show the overflow in IE.\n * 1. Show the overflow in Edge.\n */\n\nbutton,\ninput {\n  /* 1 */\n  overflow: visible;\n}\n\n/**\n * Remove the inheritance of text transform in Edge, Firefox, and IE.\n * 1. Remove the inheritance of text transform in Firefox.\n */\n\nbutton,\nselect {\n  /* 1 */\n  text-transform: none;\n}\n\n/**\n * Correct the inability to style clickable types in iOS and Safari.\n */\n\nbutton,\n[type=\"button\"],\n[type=\"reset\"],\n[type=\"submit\"] {\n  -webkit-appearance: button;\n}\n\n/**\n * Remove the inner border and padding in Firefox.\n */\n\nbutton::-moz-focus-inner,\n[type=\"button\"]::-moz-focus-inner,\n[type=\"reset\"]::-moz-focus-inner,\n[type=\"submit\"]::-moz-focus-inner {\n  border-style: none;\n  padding: 0;\n}\n\n/**\n * Restore the focus styles unset by the previous rule.\n */\n\nbutton:-moz-focusring,\n[type=\"button\"]:-moz-focusring,\n[type=\"reset\"]:-moz-focusring,\n[type=\"submit\"]:-moz-focusring {\n  outline: 1px dotted ButtonText;\n}\n\n/**\n * Correct the padding in Firefox.\n */\n\nfieldset {\n  padding: 0.35em 0.75em 0.625em;\n}\n\n/**\n * 1. Correct the text wrapping in Edge and IE.\n * 2. Correct the color inheritance from `fieldset` elements in IE.\n * 3. Remove the padding so developers are not caught out when they zero out\n *    `fieldset` elements in all browsers.\n */\n\nlegend {\n  box-sizing: border-box; /* 1 */\n  color: inherit; /* 2 */\n  display: table; /* 1 */\n  max-width: 100%; /* 1 */\n  padding: 0; /* 3 */\n  white-space: normal; /* 1 */\n}\n\n/**\n * Add the correct vertical alignment in Chrome, Firefox, and Opera.\n */\n\nprogress {\n  vertical-align: baseline;\n}\n\n/**\n * Remove the default vertical scrollbar in IE 10+.\n */\n\ntextarea {\n  overflow: auto;\n}\n\n/**\n * 1. Add the correct box sizing in IE 10.\n * 2. Remove the padding in IE 10.\n */\n\n[type=\"checkbox\"],\n[type=\"radio\"] {\n  box-sizing: border-box; /* 1 */\n  padding: 0; /* 2 */\n}\n\n/**\n * Correct the cursor style of increment and decrement buttons in Chrome.\n */\n\n[type=\"number\"]::-webkit-inner-spin-button,\n[type=\"number\"]::-webkit-outer-spin-button {\n  height: auto;\n}\n\n/**\n * 1. Correct the odd appearance in Chrome and Safari.\n * 2. Correct the outline style in Safari.\n */\n\n[type=\"search\"] {\n  -webkit-appearance: textfield; /* 1 */\n  outline-offset: -2px; /* 2 */\n}\n\n/**\n * Remove the inner padding in Chrome and Safari on macOS.\n */\n\n[type=\"search\"]::-webkit-search-decoration {\n  -webkit-appearance: none;\n}\n\n/**\n * 1. Correct the inability to style clickable types in iOS and Safari.\n * 2. Change font properties to `inherit` in Safari.\n */\n\n::-webkit-file-upload-button {\n  -webkit-appearance: button; /* 1 */\n  font: inherit; /* 2 */\n}\n\n/* Interactive\n   ========================================================================== */\n\n/*\n * Add the correct display in Edge, IE 10+, and Firefox.\n */\n\ndetails {\n  display: block;\n}\n\n/*\n * Add the correct display in all browsers.\n */\n\nsummary {\n  display: list-item;\n}\n\n/* Misc\n   ========================================================================== */\n\n/**\n * Add the correct display in IE 10+.\n */\n\ntemplate {\n  display: none;\n}\n\n/**\n * Add the correct display in IE 10.\n */\n\n[hidden] {\n  display: none;\n}\n", "/*!\n * Copyright 2021 The Go Authors. All rights reserved.\n * Use of this source code is governed by a BSD-style\n * license that can be found in the LICENSE file.\n */\n\n:root {\n  /* Colors */\n  --gray-1: #202224;\n  --gray-2: #3e4042;\n  --gray-3: #555759;\n  --gray-4: #6e7072;\n  --gray-5: #848688;\n  --gray-6: #aaacae;\n  --gray-7: #c6c8ca;\n  --gray-8: #dcdee0;\n  --gray-9: #f0f1f2;\n  --gray-10: #f8f8f8;\n  --turq-light: #5dc9e2;\n  --turq-med: #50b7e0;\n  --turq-dark: #007d9c;\n  --blue: #bfeaf4;\n  --blue-light: #f2fafd;\n  --black: #000;\n  --green: #3a6e11;\n  --green-light: #5fda64;\n  --pink: #c85e7a;\n  --pink-light: #fdecf1;\n  --purple: #542c7d;\n  --slate: #253443; /* Footer background. */\n  --white: #fff;\n  --yellow: #fceea5;\n  --yellow-light: #fff8cc;\n\n  /* Color Intents */\n  --color-brand-primary: var(--turq-dark);\n  --color-background: var(--white);\n  --color-background-inverted: var(--slate);\n  --color-background-accented: var(--gray-10);\n  --color-background-highlighted: var(--blue);\n  --color-background-highlighted-link: var(--blue-light);\n  --color-background-info: var(--gray-9);\n  --color-background-warning: var(--yellow-light);\n  --color-background-alert: var(--pink-light);\n  --color-border: var(--gray-7);\n  --color-text: var(--gray-1);\n  --color-text-subtle: var(--gray-4);\n  --color-text-link: var(--turq-dark);\n  --color-text-inverted: var(--white);\n  --color-code-comment: var(--green);\n\n  /* Interactive Colors */\n  --color-input: var(--color-background);\n  --color-input-text: var(--color-text);\n  --color-button: var(--turq-dark);\n  --color-button-disabled: var(--gray-9);\n  --color-button-text: var(--white);\n  --color-button-text-disabled: var(--gray-3);\n  --color-button-inverted: var(--color-background);\n  --color-button-inverted-disabled: var(--color-background);\n  --color-button-inverted-text: var(--color-brand-primary);\n  --color-button-inverted-text-disabled: var(--color-text-subtle);\n  --color-button-accented: var(--yellow);\n  --color-button-accented-disabled: var(--gray-9);\n  --color-button-accented-text: var(--gray-1);\n  --color-button-accented-text-disabled: var(--gray-3);\n}\n\n@media (prefers-color-scheme: dark) {\n  :root:not([data-theme=\"light\"]) {\n    --color-brand-primary: var(--turq-med);\n    --color-background: var(--gray-1);\n    --color-background-accented: var(--gray-2);\n    --color-background-highlighted: var(--gray-2);\n    --color-background-highlighted-link: var(--gray-2);\n    --color-background-info: var(--gray-3);\n    --color-background-warning: var(--yellow);\n    --color-background-alert: var(--pink);\n    --color-border: var(--gray-4);\n    --color-text: var(--gray-9);\n    --color-text-link: var(--turq-med);\n    --color-text-subtle: var(--gray-7);\n    --color-code-comment: var(--green-light);\n  }\n\n  img.go-Icon {\n    filter: invert(1);\n  }\n}\n", "/*!\n * Copyright 2021 The Go Authors. All rights reserved.\n * Use of this source code is governed by a BSD-style\n * license that can be found in the LICENSE file.\n */\n\nbody {\n  background-color: var(--color-background);\n  color: var(--color-text);\n  font-family: -apple-system, BlinkMacSystemFont, \"Segoe UI\", Helvetica, Arial,\n    sans-serif, \"Apple Color Emoji\", \"Segoe UI Emoji\";\n  font-size: 1rem;\n  line-height: normal;\n}\n\np {\n  line-height: 1.4375;\n  max-width: 75ch;\n}\n\nhr {\n  border: none;\n  border-bottom: var(--border);\n  margin: 0;\n  width: 100%;\n}\n\ncode,\npre,\ntextarea.code {\n  font-family: SFMono-Regular, Consolas, \"Liberation Mono\", Menlo, monospace;\n  font-size: 0.875rem;\n  line-height: 1.5em;\n}\n\npre,\ntextarea.code {\n  background-color: var(--color-background-accented);\n  border: var(--border);\n  border-radius: var(--border-radius);\n  color: var(--color-text);\n  overflow-x: auto;\n  padding: 0.625rem;\n  tab-size: 4;\n  white-space: pre;\n}\n\nbutton,\ninput,\nselect,\ntextarea {\n  font: inherit;\n}\n\na,\na:link,\na:visited {\n  color: var(--color-brand-primary);\n  text-decoration: none;\n}\n\na:hover {\n  color: var(--color-brand-primary);\n  text-decoration: underline;\n}\n\na:hover > * {\n  text-decoration: underline;\n}\n", "/*!\n * Copyright 2021 The Go Authors. All rights reserved.\n * Use of this source code is governed by a BSD-style\n * license that can be found in the LICENSE file.\n */\n\n.go-Tooltip {\n  border-radius: var(--border-radius);\n  cursor: pointer;\n  display: inline-block;\n  position: relative;\n}\n\n.go-Tooltip > summary {\n  list-style: none;\n}\n\n.go-Tooltip > summary::-webkit-details-marker,\n.go-Tooltip > summary::marker {\n  display: none;\n}\n\n.go-Tooltip > summary > img {\n  vertical-align: text-bottom;\n}\n\n.go-Tooltip p {\n  background: var(--color-background) 80%;\n  border: var(--border);\n  border-radius: var(--border-radius);\n  color: var(--color-text);\n  font-size: 0.75rem;\n  letter-spacing: 0.0187rem;\n  line-height: 1rem;\n  padding: 0.5rem;\n  position: absolute;\n  top: 1.5rem;\n  white-space: normal;\n  width: 12rem;\n  z-index: 100;\n}\n", "/*!\n * Copyright 2023 The Go Authors. All rights reserved.\n * Use of this source code is governed by a BSD-style\n * license that can be found in the LICENSE file.\n */\n\n@import url(\"./_normalize.css\");\n@import url(\"./_color.css\");\n@import url(\"./_typography.css\");\n@import url(\"./_tooltip.css\");\n\n:root {\n  --border: 0.0625rem solid var(--color-border);\n  --border-radius: 0.25rem;\n}\n\n.Container {\n  margin: 2rem 0 5rem;\n}\n\n.Content {\n  margin: 0 auto;\n  max-width: 64rem;\n  padding: 0 1rem;\n}\n"],
-  "mappings": ";AAWA,KACE,iBACA,8BAUF,KAvBA,SA+BA,KACE,cAQF,GACE,cAzCF,eAqDA,GACE,uBACA,SACA,iBAQF,IACE,gCACA,cAUF,EACE,6BAQF,YACE,mBACA,0BACA,iCAOF,SAEE,mBAQF,cAGE,gCACA,cAOF,MACE,cAQF,QAEE,cACA,cACA,kBACA,wBAGF,IACE,cAGF,IACE,UAUF,IACE,kBAWF,sCAKE,oBACA,eACA,iBAvKF,SAgLA,aAGE,iBAQF,cAGE,oBAOF,gDAIE,0BAOF,wHAIE,kBApNF,UA4NA,4GAIE,8BAOF,SAvOA,2BAkPA,OACE,sBACA,cACA,cACA,eAtPF,UAwPE,mBAOF,SACE,wBAOF,SACE,cAQF,6BAEE,sBAlRF,UA0RA,kFAEE,YAQF,cACE,6BACA,oBAOF,yCACE,wBAQF,6BACE,0BACA,aAUF,QACE,cAOF,QACE,kBAUF,SACE,aAOF,SACE,aCxVF,MAEE,kBACA,kBACA,kBACA,kBACA,kBACA,kBACA,kBACA,kBACA,kBACA,mBACA,sBACA,oBACA,qBACA,gBACA,sBACA,cACA,iBACA,uBACA,gBACA,sBACA,kBACA,iBACA,cACA,kBACA,wBAGA,wCACA,iCACA,0CACA,4CACA,4CACA,uDACA,uCACA,gDACA,4CACA,8BACA,4BACA,mCACA,oCACA,oCACA,mCAGA,uCACA,sCACA,iCACA,uCACA,kCACA,4CACA,iDACA,0DACA,yDACA,gEACA,uCACA,gDACA,4CACA,qDAGF,oCACE,gCACE,uCACA,kCACA,2CACA,8CACA,mDACA,uCACA,0CACA,sCACA,8BACA,4BACA,mCACA,mCACA,yCAGF,YACE,kBChFJ,KACE,yCACA,wBACA,sHAEA,eACA,mBAGF,EACE,mBACA,eAGF,GACE,YACA,4BAtBF,SAwBE,WAGF,uBAGE,oEACA,kBACA,kBAGF,kBAEE,kDACA,qBACA,mCACA,wBACA,gBAzCF,gBA2CE,WACA,gBAGF,6BAIE,aAGF,mBAGE,iCACA,qBAGF,QACE,iCACA,0BAGF,UACE,0BC7DF,YACE,mCACA,eACA,qBACA,kBAGF,oBACE,gBAGF,wEAEE,aAGF,wBACE,2BAGF,cACE,uCACA,qBACA,mCACA,wBACA,iBACA,wBACA,iBAjCF,cAmCE,kBACA,WACA,mBACA,YACA,YC5BF,MACE,6CACA,wBAGF,WAhBA,mBAoBA,SApBA,cAsBE,gBAtBF",
+  "sourcesContent": ["/* stylelint-disable */\n/*! normalize.css v8.0.1 | MIT License | github.com/necolas/normalize.css */\n\n/* Document\n   ========================================================================== */\n\n/**\n * 1. Correct the line height in all browsers.\n * 2. Prevent adjustments of font size after orientation changes in iOS.\n */\n\nhtml {\n  line-height: 1.15; /* 1 */\n  -webkit-text-size-adjust: 100%; /* 2 */\n}\n\n/* Sections\n   ========================================================================== */\n\n/**\n * Remove the margin in all browsers.\n */\n\nbody {\n  margin: 0;\n}\n\n/**\n * Render the `main` element consistently in IE.\n */\n\nmain {\n  display: block;\n}\n\n/**\n * Correct the font size and margin on `h1` elements within `section` and\n * `article` contexts in Chrome, Firefox, and Safari.\n */\n\nh1 {\n  font-size: 2em;\n  margin: 0.67em 0;\n}\n\n/* Grouping content\n   ========================================================================== */\n\n/**\n * 1. Add the correct box sizing in Firefox.\n * 2. Show the overflow in Edge and IE.\n */\n\nhr {\n  box-sizing: content-box; /* 1 */\n  height: 0; /* 1 */\n  overflow: visible; /* 2 */\n}\n\n/**\n * 1. Correct the inheritance and scaling of font size in all browsers.\n * 2. Correct the odd `em` font sizing in all browsers.\n */\n\npre {\n  font-family: monospace, monospace; /* 1 */\n  font-size: 1em; /* 2 */\n}\n\n/* Text-level semantics\n   ========================================================================== */\n\n/**\n * Remove the gray background on active links in IE 10.\n */\n\na {\n  background-color: transparent;\n}\n\n/**\n * 1. Remove the bottom border in Chrome 57-\n * 2. Add the correct text decoration in Chrome, Edge, IE, Opera, and Safari.\n */\n\nabbr[title] {\n  border-bottom: none; /* 1 */\n  text-decoration: underline; /* 2 */\n  text-decoration: underline dotted; /* 2 */\n}\n\n/**\n * Add the correct font weight in Chrome, Edge, and Safari.\n */\n\nb,\nstrong {\n  font-weight: bolder;\n}\n\n/**\n * 1. Correct the inheritance and scaling of font size in all browsers.\n * 2. Correct the odd `em` font sizing in all browsers.\n */\n\ncode,\nkbd,\nsamp {\n  font-family: monospace, monospace; /* 1 */\n  font-size: 1em; /* 2 */\n}\n\n/**\n * Add the correct font size in all browsers.\n */\n\nsmall {\n  font-size: 80%;\n}\n\n/**\n * Prevent `sub` and `sup` elements from affecting the line height in\n * all browsers.\n */\n\nsub,\nsup {\n  font-size: 75%;\n  line-height: 0;\n  position: relative;\n  vertical-align: baseline;\n}\n\nsub {\n  bottom: -0.25em;\n}\n\nsup {\n  top: -0.5em;\n}\n\n/* Embedded content\n   ========================================================================== */\n\n/**\n * Remove the border on images inside links in IE 10.\n */\n\nimg {\n  border-style: none;\n}\n\n/* Forms\n   ========================================================================== */\n\n/**\n * 1. Change the font styles in all browsers.\n * 2. Remove the margin in Firefox and Safari.\n */\n\nbutton,\ninput,\noptgroup,\nselect,\ntextarea {\n  font-family: inherit; /* 1 */\n  font-size: 100%; /* 1 */\n  line-height: 1.15; /* 1 */\n  margin: 0; /* 2 */\n}\n\n/**\n * Show the overflow in IE.\n * 1. Show the overflow in Edge.\n */\n\nbutton,\ninput {\n  /* 1 */\n  overflow: visible;\n}\n\n/**\n * Remove the inheritance of text transform in Edge, Firefox, and IE.\n * 1. Remove the inheritance of text transform in Firefox.\n */\n\nbutton,\nselect {\n  /* 1 */\n  text-transform: none;\n}\n\n/**\n * Correct the inability to style clickable types in iOS and Safari.\n */\n\nbutton,\n[type=\"button\"],\n[type=\"reset\"],\n[type=\"submit\"] {\n  -webkit-appearance: button;\n}\n\n/**\n * Remove the inner border and padding in Firefox.\n */\n\nbutton::-moz-focus-inner,\n[type=\"button\"]::-moz-focus-inner,\n[type=\"reset\"]::-moz-focus-inner,\n[type=\"submit\"]::-moz-focus-inner {\n  border-style: none;\n  padding: 0;\n}\n\n/**\n * Restore the focus styles unset by the previous rule.\n */\n\nbutton:-moz-focusring,\n[type=\"button\"]:-moz-focusring,\n[type=\"reset\"]:-moz-focusring,\n[type=\"submit\"]:-moz-focusring {\n  outline: 1px dotted ButtonText;\n}\n\n/**\n * Correct the padding in Firefox.\n */\n\nfieldset {\n  padding: 0.35em 0.75em 0.625em;\n}\n\n/**\n * 1. Correct the text wrapping in Edge and IE.\n * 2. Correct the color inheritance from `fieldset` elements in IE.\n * 3. Remove the padding so developers are not caught out when they zero out\n *    `fieldset` elements in all browsers.\n */\n\nlegend {\n  box-sizing: border-box; /* 1 */\n  color: inherit; /* 2 */\n  display: table; /* 1 */\n  max-width: 100%; /* 1 */\n  padding: 0; /* 3 */\n  white-space: normal; /* 1 */\n}\n\n/**\n * Add the correct vertical alignment in Chrome, Firefox, and Opera.\n */\n\nprogress {\n  vertical-align: baseline;\n}\n\n/**\n * Remove the default vertical scrollbar in IE 10+.\n */\n\ntextarea {\n  overflow: auto;\n}\n\n/**\n * 1. Add the correct box sizing in IE 10.\n * 2. Remove the padding in IE 10.\n */\n\n[type=\"checkbox\"],\n[type=\"radio\"] {\n  box-sizing: border-box; /* 1 */\n  padding: 0; /* 2 */\n}\n\n/**\n * Correct the cursor style of increment and decrement buttons in Chrome.\n */\n\n[type=\"number\"]::-webkit-inner-spin-button,\n[type=\"number\"]::-webkit-outer-spin-button {\n  height: auto;\n}\n\n/**\n * 1. Correct the odd appearance in Chrome and Safari.\n * 2. Correct the outline style in Safari.\n */\n\n[type=\"search\"] {\n  -webkit-appearance: textfield; /* 1 */\n  outline-offset: -2px; /* 2 */\n}\n\n/**\n * Remove the inner padding in Chrome and Safari on macOS.\n */\n\n[type=\"search\"]::-webkit-search-decoration {\n  -webkit-appearance: none;\n}\n\n/**\n * 1. Correct the inability to style clickable types in iOS and Safari.\n * 2. Change font properties to `inherit` in Safari.\n */\n\n::-webkit-file-upload-button {\n  -webkit-appearance: button; /* 1 */\n  font: inherit; /* 2 */\n}\n\n/* Interactive\n   ========================================================================== */\n\n/*\n * Add the correct display in Edge, IE 10+, and Firefox.\n */\n\ndetails {\n  display: block;\n}\n\n/*\n * Add the correct display in all browsers.\n */\n\nsummary {\n  display: list-item;\n}\n\n/* Misc\n   ========================================================================== */\n\n/**\n * Add the correct display in IE 10+.\n */\n\ntemplate {\n  display: none;\n}\n\n/**\n * Add the correct display in IE 10.\n */\n\n[hidden] {\n  display: none;\n}\n", "/*!\n * Copyright 2021 The Go Authors. All rights reserved.\n * Use of this source code is governed by a BSD-style\n * license that can be found in the LICENSE file.\n */\n\n:root {\n  /* Colors */\n  --gray-1: #202224;\n  --gray-2: #3e4042;\n  --gray-3: #555759;\n  --gray-4: #6e7072;\n  --gray-5: #848688;\n  --gray-6: #aaacae;\n  --gray-7: #c6c8ca;\n  --gray-8: #dcdee0;\n  --gray-9: #f0f1f2;\n  --gray-10: #f8f8f8;\n  --turq-light: #5dc9e2;\n  --turq-med: #50b7e0;\n  --turq-dark: #007d9c;\n  --blue: #bfeaf4;\n  --blue-light: #f2fafd;\n  --black: #000;\n  --green: #3a6e11;\n  --green-light: #5fda64;\n  --pink: #c85e7a;\n  --pink-light: #fdecf1;\n  --purple: #542c7d;\n  --slate: #253443; /* Footer background. */\n  --white: #fff;\n  --yellow: #fceea5;\n  --yellow-light: #fff8cc;\n\n  /* Color Intents */\n  --color-brand-primary: var(--turq-dark);\n  --color-background: var(--white);\n  --color-background-inverted: var(--slate);\n  --color-background-accented: var(--gray-10);\n  --color-background-highlighted: var(--blue);\n  --color-background-highlighted-link: var(--blue-light);\n  --color-background-info: var(--gray-9);\n  --color-background-warning: var(--yellow-light);\n  --color-background-alert: var(--pink-light);\n  --color-border: var(--gray-7);\n  --color-text: var(--gray-1);\n  --color-text-subtle: var(--gray-4);\n  --color-text-link: var(--turq-dark);\n  --color-text-inverted: var(--white);\n  --color-code-comment: var(--green);\n\n  /* Interactive Colors */\n  --color-input: var(--color-background);\n  --color-input-text: var(--color-text);\n  --color-button: var(--turq-dark);\n  --color-button-disabled: var(--gray-9);\n  --color-button-text: var(--white);\n  --color-button-text-disabled: var(--gray-3);\n  --color-button-inverted: var(--color-background);\n  --color-button-inverted-disabled: var(--color-background);\n  --color-button-inverted-text: var(--color-brand-primary);\n  --color-button-inverted-text-disabled: var(--color-text-subtle);\n  --color-button-accented: var(--yellow);\n  --color-button-accented-disabled: var(--gray-9);\n  --color-button-accented-text: var(--gray-1);\n  --color-button-accented-text-disabled: var(--gray-3);\n}\n\n@media (prefers-color-scheme: dark) {\n  :root:not([data-theme=\"light\"]) {\n    --color-brand-primary: var(--turq-med);\n    --color-background: var(--gray-1);\n    --color-background-accented: var(--gray-2);\n    --color-background-highlighted: var(--gray-2);\n    --color-background-highlighted-link: var(--gray-2);\n    --color-background-info: var(--gray-3);\n    --color-background-warning: var(--yellow);\n    --color-background-alert: var(--pink);\n    --color-border: var(--gray-4);\n    --color-text: var(--gray-9);\n    --color-text-link: var(--turq-med);\n    --color-text-subtle: var(--gray-7);\n    --color-code-comment: var(--green-light);\n  }\n\n  img.go-Icon {\n    filter: invert(1);\n  }\n}\n", "/*!\n * Copyright 2021 The Go Authors. All rights reserved.\n * Use of this source code is governed by a BSD-style\n * license that can be found in the LICENSE file.\n */\n\nbody {\n  background-color: var(--color-background);\n  color: var(--color-text);\n  font-family: -apple-system, BlinkMacSystemFont, \"Segoe UI\", Helvetica, Arial,\n    sans-serif, \"Apple Color Emoji\", \"Segoe UI Emoji\";\n  font-size: 1rem;\n  line-height: normal;\n}\n\np {\n  line-height: 1.4375;\n  max-width: 75ch;\n}\n\nhr {\n  border: none;\n  border-bottom: var(--border);\n  margin: 0;\n  width: 100%;\n}\n\ncode,\npre,\ntextarea.code {\n  font-family: SFMono-Regular, Consolas, \"Liberation Mono\", Menlo, monospace;\n  font-size: 0.875rem;\n  line-height: 1.5em;\n}\n\npre,\ntextarea.code {\n  background-color: var(--color-background-accented);\n  border: var(--border);\n  border-radius: var(--border-radius);\n  color: var(--color-text);\n  overflow-x: auto;\n  padding: 0.625rem;\n  tab-size: 4;\n  white-space: pre;\n}\n\nbutton,\ninput,\nselect,\ntextarea {\n  font: inherit;\n}\n\na,\na:link,\na:visited {\n  color: var(--color-brand-primary);\n  text-decoration: none;\n}\n\na:hover {\n  color: var(--color-brand-primary);\n  text-decoration: underline;\n}\n\na:hover > * {\n  text-decoration: underline;\n}\n", "/*!\n * Copyright 2021 The Go Authors. All rights reserved.\n * Use of this source code is governed by a BSD-style\n * license that can be found in the LICENSE file.\n */\n\n.go-Tooltip {\n  border-radius: var(--border-radius);\n  cursor: pointer;\n  display: inline-block;\n  position: relative;\n}\n\n.go-Tooltip > summary {\n  list-style: none;\n}\n\n.go-Tooltip > summary::-webkit-details-marker,\n.go-Tooltip > summary::marker {\n  display: none;\n}\n\n.go-Tooltip > summary > img {\n  vertical-align: text-bottom;\n}\n\n.go-Tooltip p {\n  background: var(--color-background) 80%;\n  border: var(--border);\n  border-radius: var(--border-radius);\n  color: var(--color-text);\n  font-size: 0.75rem;\n  letter-spacing: 0.0187rem;\n  line-height: 1rem;\n  padding: 0.5rem;\n  position: absolute;\n  top: 1.5rem;\n  white-space: normal;\n  width: 12rem;\n  z-index: 100;\n}\n", "/*!\n * Copyright 2023 The Go Authors. All rights reserved.\n * Use of this source code is governed by a BSD-style\n * license that can be found in the LICENSE file.\n */\n\n@import url(\"./_normalize.css\");\n@import url(\"./_color.css\");\n@import url(\"./_typography.css\");\n@import url(\"./_tooltip.css\");\n\n:root {\n  --border: 0.0625rem solid var(--color-border);\n  --border-radius: 0.25rem;\n}\n\n.Breadcrumb {\n  background-color: var(--color-background-accented);\n}\n.Breadcrumb ol {\n  list-style: none;\n  align-items: center;\n  padding: 0;\n  margin: 1.5rem 0;\n  display: inline-flex;\n}\n.Breadcrumb li {\n  display: flex;\n  font-size: 0.875rem;\n}\n.Breadcrumb li:not(:last-child):after {\n  /* TODO(rfindley): use this arrow instead, from go.dev */\n  /* background: url(\"arrow-forward.svg\") no-repeat; */\n  content: '>';\n  display: block;\n  height: 1rem;\n  margin: 0 0.8125rem;\n  width: 1rem;\n  text-align: center;\n}\n\n.Hero {\n  background-color: var(--color-background-accented);\n  padding: 1rem 0;\n}\n.Hero h1 {\n  font-size: 2.25rem;\n  font-weight: normal;\n  margin: 0;\n}\n\n.Container {\n  margin: 0 0 5rem;\n}\n\n.Content {\n  margin: 0 auto;\n  max-width: 64rem;\n  padding: 0 1rem;\n}\n"],
+  "mappings": ";AAWA,KACE,iBACA,8BAUF,KAvBA,SA+BA,KACE,cAQF,GACE,cAzCF,eAqDA,GACE,uBACA,SACA,iBAQF,IACE,gCACA,cAUF,EACE,6BAQF,YACE,mBACA,0BACA,iCAOF,SAEE,mBAQF,cAGE,gCACA,cAOF,MACE,cAQF,QAEE,cACA,cACA,kBACA,wBAGF,IACE,cAGF,IACE,UAUF,IACE,kBAWF,sCAKE,oBACA,eACA,iBAvKF,SAgLA,aAGE,iBAQF,cAGE,oBAOF,gDAIE,0BAOF,wHAIE,kBApNF,UA4NA,4GAIE,8BAOF,SAvOA,2BAkPA,OACE,sBACA,cACA,cACA,eAtPF,UAwPE,mBAOF,SACE,wBAOF,SACE,cAQF,6BAEE,sBAlRF,UA0RA,kFAEE,YAQF,cACE,6BACA,oBAOF,yCACE,wBAQF,6BACE,0BACA,aAUF,QACE,cAOF,QACE,kBAUF,SACE,aAOF,SACE,aCxVF,MAEE,kBACA,kBACA,kBACA,kBACA,kBACA,kBACA,kBACA,kBACA,kBACA,mBACA,sBACA,oBACA,qBACA,gBACA,sBACA,cACA,iBACA,uBACA,gBACA,sBACA,kBACA,iBACA,cACA,kBACA,wBAGA,wCACA,iCACA,0CACA,4CACA,4CACA,uDACA,uCACA,gDACA,4CACA,8BACA,4BACA,mCACA,oCACA,oCACA,mCAGA,uCACA,sCACA,iCACA,uCACA,kCACA,4CACA,iDACA,0DACA,yDACA,gEACA,uCACA,gDACA,4CACA,qDAGF,oCACE,gCACE,uCACA,kCACA,2CACA,8CACA,mDACA,uCACA,0CACA,sCACA,8BACA,4BACA,mCACA,mCACA,yCAGF,YACE,kBChFJ,KACE,yCACA,wBACA,sHAEA,eACA,mBAGF,EACE,mBACA,eAGF,GACE,YACA,4BAtBF,SAwBE,WAGF,uBAGE,oEACA,kBACA,kBAGF,kBAEE,kDACA,qBACA,mCACA,wBACA,gBAzCF,gBA2CE,WACA,gBAGF,6BAIE,aAGF,mBAGE,iCACA,qBAGF,QACE,iCACA,0BAGF,UACE,0BC7DF,YACE,mCACA,eACA,qBACA,kBAGF,oBACE,gBAGF,wEAEE,aAGF,wBACE,2BAGF,cACE,uCACA,qBACA,mCACA,wBACA,iBACA,wBACA,iBAjCF,cAmCE,kBACA,WACA,mBACA,YACA,YC5BF,MACE,6CACA,wBAGF,YACE,kDAEF,eACE,gBACA,mBArBF,0BAwBE,oBAEF,eACE,aACA,kBAEF,sCAGE,YACA,cACA,YAnCF,kBAqCE,WACA,kBAGF,MACE,kDA1CF,eA6CA,SACE,kBACA,gBA/CF,SAmDA,WAnDA,gBAuDA,SAvDA,cAyDE,gBAzDF",
   "names": []
 }
diff --git a/internal/content/shared/static/chartbrowser.min.css b/internal/content/shared/static/chartbrowser.min.css
new file mode 100644
index 0000000..acb999a
--- /dev/null
+++ b/internal/content/shared/static/chartbrowser.min.css
@@ -0,0 +1,8 @@
+/* Code generated by esbuild. DO NOT EDIT. */
+.js-Tree ul{list-style:none;padding-left:0}.js-Tree-item ul{display:none}.js-Tree-item{overflow:hidden;text-overflow:ellipsis;padding:.125rem 0}.js-Tree-item[aria-expanded=true] ul{display:block}.js-Tree-item .js-Tree-item{position:relative;padding-left:1.25rem}.js-Tree-item .js-Tree-item[aria-selected=true]:before{background-color:var(--color-brand-primary);border-radius:50%;content:"";display:block;height:.3125rem;left:.4688rem;position:absolute;top:.75rem;width:.3125rem}.js-Tree-item>a{color:var(--color-text-subtle);font-size:.875rem}.js-Tree-item[aria-selected=true]>a{color:var(--color-text)}svg g[aria-label=tip] g{fill:var(--color-background)}.Chartbrowser-view{display:flex;flex-direction:row}.Chartbrowser-index{flex:1 1;padding-right:2rem}.Chartbrowser-heading{font-weight:700;font-size:1.25rem;margin:0 0 .5rem}.Chartbrowser-index-sticky{position:sticky;top:1rem;width:10rem}.Chartbrowser-index-sticky>ul{position:sticky;top:1rem;margin-top:0}.Chartbrowser-link{color:var(--color-text-subtle);font-size:.875rem;line-height:1.5rem}.Chartbrowser-program{font-weight:400;margin:0 0 1rem;color:var(--color-text-subtle)}.Chartbrowser-program:not(:first-of-type){margin-top:2rem}.Chartbrowser-chart{background-color:var(--color-background-accented);border:1px solid transparent;margin-bottom:1rem;padding:.875rem;box-shadow:0 1px 2px #3c40434d,0 1px 3px 1px #3c404326}.Chartbrowser-chart-name{text-align:center;margin:0}
+/*!
+ * Copyright 2024 The Go Authors. All rights reserved.
+ * Use of this source code is governed by a BSD-style
+ * license that can be found in the LICENSE file.
+ */
+/*# sourceMappingURL=chartbrowser.min.css.map */
diff --git a/internal/content/shared/static/chartbrowser.min.css.map b/internal/content/shared/static/chartbrowser.min.css.map
new file mode 100644
index 0000000..76ca2b0
--- /dev/null
+++ b/internal/content/shared/static/chartbrowser.min.css.map
@@ -0,0 +1,7 @@
+{
+  "version": 3,
+  "sources": ["../treenav.css", "../chartbrowser.css"],
+  "sourcesContent": ["/*!\n * Copyright 2024 The Go Authors. All rights reserved.\n * Use of this source code is governed by a BSD-style\n * license that can be found in the LICENSE file.\n */\n\n.js-Tree ul {\n  list-style: none;\n  padding-left: 0;\n}\n\n.js-Tree-item ul {\n  display: none;\n}\n\n.js-Tree-item {\n  overflow: hidden;\n  text-overflow: ellipsis;\n  padding: 0.125rem 0 0.125rem 0;\n}\n\n.js-Tree-item[aria-expanded='true'] ul {\n  display: block;\n}\n\n.js-Tree-item .js-Tree-item {\n  position: relative;\n  padding-left: 1.25rem;\n}\n\n.js-Tree-item .js-Tree-item[aria-selected='true']:before {\n  background-color: var(--color-brand-primary);\n  border-radius: 50%;\n  content: \"\";\n  display: block;\n  height: .3125rem;\n  left: .4688rem;\n  position: absolute;\n  top: .75rem;\n  width: .3125rem;\n}\n\n.js-Tree-item>a {\n  color: var(--color-text-subtle);\n  font-size: .875rem;\n}\n\n.js-Tree-item[aria-selected='true']>a {\n  color: var(--color-text);\n}\n\n", "/*!\n * Copyright 2024 The Go Authors. All rights reserved.\n * Use of this source code is governed by a BSD-style\n * license that can be found in the LICENSE file.\n */\n\n@import url(\"../shared/treenav.css\");\n\n/* Fix tooltip background for dark theme */\nsvg g[aria-label=\"tip\"] g {\n  fill: var(--color-background);\n}\n\n.Chartbrowser-view {\n  display: flex;\n  flex-direction: row;\n}\n.Chartbrowser-index {\n  flex: 1 1;\n  padding-right: 2rem;\n}\n.Chartbrowser-heading {\n  font-weight: bold;\n  font-size: 1.25rem;\n  margin: 0 0 0.5rem 0;\n}\n.Chartbrowser-index-sticky {\n  position: sticky;\n  top: 1rem;\n  width: 10rem;\n}\n.Chartbrowser-index-sticky > ul {\n  position: sticky;\n  top: 1rem;\n  margin-top: 0;\n}\n.Chartbrowser-link {\n  color: var(--color-text-subtle);\n  font-size: .875rem;\n  line-height: 1.5rem;\n}\n.Chartbrowser-program {\n  font-weight: normal;\n  margin: 0 0 1rem 0;\n  color: var(--color-text-subtle);\n}\n.Chartbrowser-program:not(:first-of-type) {\n  margin-top: 2rem;\n}\n.Chartbrowser-chart {\n  background-color: var(--color-background-accented);\n  border: 1px solid transparent;\n  margin-bottom: 1rem;\n  padding: 0.875rem;\n  box-shadow: 0 1px 2px 0 rgba(60, 64, 67, .3), 0 1px 3px 1px rgba(60, 64, 67, .15);\n}\n.Chartbrowser-chart-name {\n  text-align: center;\n  margin: 0;\n}\n"],
+  "mappings": ";AAMA,YACE,gBACA,eAGF,iBACE,aAGF,cACE,gBACA,uBAjBF,kBAqBA,qCACE,cAGF,4BACE,kBACA,qBAGF,uDACE,4CA/BF,kBAiCE,WACA,cACA,gBACA,cACA,kBACA,WACA,eAGF,gBACE,+BACA,kBAGF,oCACE,wBCvCF,wBACE,6BAGF,mBACE,aACA,mBAEF,oBACE,SACA,mBAEF,sBACE,gBACA,kBAvBF,iBA0BA,2BACE,gBACA,SACA,YAEF,8BACE,gBACA,SACA,aAEF,mBACE,+BACA,kBACA,mBAEF,sBACE,gBA1CF,gBA4CE,+BAEF,0CACE,gBAEF,oBACE,kDACA,6BACA,mBApDF,gBAsDE,uDAEF,yBACE,kBAzDF",
+  "names": []
+}
diff --git a/internal/content/shared/static/treenav.min.css b/internal/content/shared/static/treenav.min.css
new file mode 100644
index 0000000..3800c1d
--- /dev/null
+++ b/internal/content/shared/static/treenav.min.css
@@ -0,0 +1,8 @@
+/* Code generated by esbuild. DO NOT EDIT. */
+.js-Tree ul{list-style:none;padding-left:0}.js-Tree-item ul{display:none}.js-Tree-item{overflow:hidden;text-overflow:ellipsis;padding:.125rem 0}.js-Tree-item[aria-expanded=true] ul{display:block}.js-Tree-item .js-Tree-item{position:relative;padding-left:1.25rem}.js-Tree-item .js-Tree-item[aria-selected=true]:before{background-color:var(--color-brand-primary);border-radius:50%;content:"";display:block;height:.3125rem;left:.4688rem;position:absolute;top:.75rem;width:.3125rem}.js-Tree-item>a{color:var(--color-text-subtle);font-size:.875rem}.js-Tree-item[aria-selected=true]>a{color:var(--color-text)}
+/*!
+ * Copyright 2024 The Go Authors. All rights reserved.
+ * Use of this source code is governed by a BSD-style
+ * license that can be found in the LICENSE file.
+ */
+/*# sourceMappingURL=treenav.min.css.map */
diff --git a/internal/content/shared/static/treenav.min.css.map b/internal/content/shared/static/treenav.min.css.map
new file mode 100644
index 0000000..2578916
--- /dev/null
+++ b/internal/content/shared/static/treenav.min.css.map
@@ -0,0 +1,7 @@
+{
+  "version": 3,
+  "sources": ["../treenav.css"],
+  "sourcesContent": ["/*!\n * Copyright 2024 The Go Authors. All rights reserved.\n * Use of this source code is governed by a BSD-style\n * license that can be found in the LICENSE file.\n */\n\n.js-Tree ul {\n  list-style: none;\n  padding-left: 0;\n}\n\n.js-Tree-item ul {\n  display: none;\n}\n\n.js-Tree-item {\n  overflow: hidden;\n  text-overflow: ellipsis;\n  padding: 0.125rem 0 0.125rem 0;\n}\n\n.js-Tree-item[aria-expanded='true'] ul {\n  display: block;\n}\n\n.js-Tree-item .js-Tree-item {\n  position: relative;\n  padding-left: 1.25rem;\n}\n\n.js-Tree-item .js-Tree-item[aria-selected='true']:before {\n  background-color: var(--color-brand-primary);\n  border-radius: 50%;\n  content: \"\";\n  display: block;\n  height: .3125rem;\n  left: .4688rem;\n  position: absolute;\n  top: .75rem;\n  width: .3125rem;\n}\n\n.js-Tree-item>a {\n  color: var(--color-text-subtle);\n  font-size: .875rem;\n}\n\n.js-Tree-item[aria-selected='true']>a {\n  color: var(--color-text);\n}\n\n"],
+  "mappings": ";AAMA,YACE,gBACA,eAGF,iBACE,aAGF,cACE,gBACA,uBAjBF,kBAqBA,qCACE,cAGF,4BACE,kBACA,qBAGF,uDACE,4CA/BF,kBAiCE,WACA,cACA,gBACA,cACA,kBACA,WACA,eAGF,gBACE,+BACA,kBAGF,oCACE",
+  "names": []
+}
diff --git a/internal/content/shared/static/treenav.min.js b/internal/content/shared/static/treenav.min.js
new file mode 100644
index 0000000..9aed8ed
--- /dev/null
+++ b/internal/content/shared/static/treenav.min.js
@@ -0,0 +1,9 @@
+// Code generated by esbuild. DO NOT EDIT.
+"use strict";(()=>{function h(r){let n=r.querySelectorAll(".js-Tree-heading"),s=()=>{let o=[];for(let e of n){let t=e.getBoundingClientRect();t.height&&t.top<80&&o.unshift(e)}o.length==0&&n[0]instanceof HTMLHeadingElement&&(o=[n[0]]);let l=1/0,a=[];for(let e of o){let t=Number(e.tagName[1]);t<l&&(l=t,a.push(e))}let d=r.querySelectorAll(".js-Tree-item");for(let e of d){let t=e.dataset.headingId,c=!1,f=!1;for(let u of a)if(u.id===t){u===a[0]?c=!0:f=!0;break}e.setAttribute("aria-selected",c?"true":"false"),e.setAttribute("aria-expanded",f?"true":"false")}},i=new IntersectionObserver(m(s,20));for(let o of n)i.observe(o)}function m(r,n){let s;return(...i)=>{clearTimeout(s),s=setTimeout(()=>r(...i),n)}}})();
+/**
+ * @license
+ * Copyright 2024 The Go Authors. All rights reserved.
+ * Use of this source code is governed by a BSD-style
+ * license that can be found in the LICENSE file.
+ */
+//# sourceMappingURL=treenav.min.js.map
diff --git a/internal/content/shared/static/treenav.min.js.map b/internal/content/shared/static/treenav.min.js.map
new file mode 100644
index 0000000..a74a77f
--- /dev/null
+++ b/internal/content/shared/static/treenav.min.js.map
@@ -0,0 +1,7 @@
+{
+  "version": 3,
+  "sources": ["../treenav.ts"],
+  "sourcesContent": ["/**\n * @license\n * Copyright 2024 The Go Authors. All rights reserved.\n * Use of this source code is governed by a BSD-style\n * license that can be found in the LICENSE file.\n */\n\n/**\n * A treeNavController adds dynamic expansion and selection of index list\n * elements based on scroll position.\n *\n * Use it as follows:\n *  - Add the .js-Tree class to a parent element of your index and content.\n *  - Add the .js-Tree-item class to <li> elements of your index.\n *  - Add the .js-Tree-heading class to <hN> heading elements of your content.\n *\n * Then, when you scroll content, the 'aria-selected' and 'aria-expanded'\n * attributes of your tree items will be set according to the current content\n * scroll position. The included treenav.css implements styling to expand and\n * highlight index elements according to these attributes.\n */\nexport function treeNavController(el: HTMLElement) {\n  const headings = el.querySelectorAll<HTMLHeadingElement>(\".js-Tree-heading\");\n  const callback = () => {\n    // Collect heading elements above the scroll position.\n    let above: HTMLHeadingElement[] = [];\n    for (const h of headings) {\n      const rect = h.getBoundingClientRect();\n      if (rect.height && rect.top < 80) {\n        above.unshift(h);\n      }\n    }\n    // Highlight the first heading even if we're not yet scrolled below it.\n    if (above.length == 0 && headings[0] instanceof HTMLHeadingElement) {\n      above = [headings[0]];\n    }\n    // Collect the set of heading levels we're immediately below, at most one\n    // per heading level, by decresing level.\n    // e.g. [<h3 element>, <h2 element>, <h1 element>]\n    let threshold = Infinity;\n    const active: HTMLHeadingElement[] = [];\n    for (const h of above) {\n      const level = Number(h.tagName[1]);\n      if (level < threshold) {\n        threshold = level;\n        active.push(h);\n      }\n    }\n    // Update aria-selected and aria-expanded for all items, per the current\n    // position.\n    const navItems = el.querySelectorAll<HTMLElement>(\".js-Tree-item\");\n    for (const item of navItems) {\n      const headingId = item.dataset[\"headingId\"];\n      let selected = false,\n        expanded = false;\n      for (const h of active) {\n        if (h.id === headingId) {\n          if (h === active[0]) {\n            selected = true;\n          } else {\n            expanded = true;\n          }\n          break;\n        }\n      }\n      item.setAttribute(\"aria-selected\", selected ? \"true\" : \"false\");\n      item.setAttribute(\"aria-expanded\", expanded ? \"true\" : \"false\");\n    }\n  };\n\n  // Update on changes to viewport intersection, defensively debouncing to\n  // guard against performance issues.\n  const observer = new IntersectionObserver(debounce(callback, 20));\n  for (const h of headings) {\n    observer.observe(h);\n  }\n}\n\nexport function debounce<T extends (...args: unknown[]) => unknown>(\n  callback: T,\n  wait: number\n) {\n  let timeout: number;\n  return (...args: unknown[]) => {\n    clearTimeout(timeout);\n    timeout = setTimeout(() => callback(...args), wait);\n  };\n}\n"],
+  "mappings": ";mBAqBO,SAASA,EAAkBC,EAAiB,CACjD,IAAMC,EAAWD,EAAG,iBAAqC,kBAAkB,EACrEE,EAAW,IAAM,CAErB,IAAIC,EAA8B,CAAC,EACnC,QAAWC,KAAKH,EAAU,CACxB,IAAMI,EAAOD,EAAE,sBAAsB,EACjCC,EAAK,QAAUA,EAAK,IAAM,IAC5BF,EAAM,QAAQC,CAAC,EAIfD,EAAM,QAAU,GAAKF,EAAS,CAAC,YAAa,qBAC9CE,EAAQ,CAACF,EAAS,CAAC,CAAC,GAKtB,IAAIK,EAAY,IACVC,EAA+B,CAAC,EACtC,QAAWH,KAAKD,EAAO,CACrB,IAAMK,EAAQ,OAAOJ,EAAE,QAAQ,CAAC,CAAC,EAC7BI,EAAQF,IACVA,EAAYE,EACZD,EAAO,KAAKH,CAAC,GAKjB,IAAMK,EAAWT,EAAG,iBAA8B,eAAe,EACjE,QAAWU,KAAQD,EAAU,CAC3B,IAAME,EAAYD,EAAK,QAAQ,UAC3BE,EAAW,GACbC,EAAW,GACb,QAAWT,KAAKG,EACd,GAAIH,EAAE,KAAOO,EAAW,CAClBP,IAAMG,EAAO,CAAC,EAChBK,EAAW,GAEXC,EAAW,GAEb,MAGJH,EAAK,aAAa,gBAAiBE,EAAW,OAAS,OAAO,EAC9DF,EAAK,aAAa,gBAAiBG,EAAW,OAAS,OAAO,EAElE,EAIMC,EAAW,IAAI,qBAAqBC,EAASb,EAAU,EAAE,CAAC,EAChE,QAAWE,KAAKH,EACda,EAAS,QAAQV,CAAC,CAEtB,CAEO,SAASW,EACdb,EACAc,EACA,CACA,IAAIC,EACJ,MAAO,IAAIC,IAAoB,CAC7B,aAAaD,CAAO,EACpBA,EAAU,WAAW,IAAMf,EAAS,GAAGgB,CAAI,EAAGF,CAAI,CACpD,CACF",
+  "names": ["treeNavController", "el", "headings", "callback", "above", "h", "rect", "threshold", "active", "level", "navItems", "item", "headingId", "selected", "expanded", "observer", "debounce", "wait", "timeout", "args"]
+}
diff --git a/internal/content/shared/treenav.css b/internal/content/shared/treenav.css
new file mode 100644
index 0000000..3d08343
--- /dev/null
+++ b/internal/content/shared/treenav.css
@@ -0,0 +1,51 @@
+/*!
+ * Copyright 2024 The Go Authors. All rights reserved.
+ * Use of this source code is governed by a BSD-style
+ * license that can be found in the LICENSE file.
+ */
+
+.js-Tree ul {
+  list-style: none;
+  padding-left: 0;
+}
+
+.js-Tree-item ul {
+  display: none;
+}
+
+.js-Tree-item {
+  overflow: hidden;
+  text-overflow: ellipsis;
+  padding: 0.125rem 0 0.125rem 0;
+}
+
+.js-Tree-item[aria-expanded='true'] ul {
+  display: block;
+}
+
+.js-Tree-item .js-Tree-item {
+  position: relative;
+  padding-left: 1.25rem;
+}
+
+.js-Tree-item .js-Tree-item[aria-selected='true']:before {
+  background-color: var(--color-brand-primary);
+  border-radius: 50%;
+  content: "";
+  display: block;
+  height: .3125rem;
+  left: .4688rem;
+  position: absolute;
+  top: .75rem;
+  width: .3125rem;
+}
+
+.js-Tree-item>a {
+  color: var(--color-text-subtle);
+  font-size: .875rem;
+}
+
+.js-Tree-item[aria-selected='true']>a {
+  color: var(--color-text);
+}
+
diff --git a/internal/content/shared/treenav.ts b/internal/content/shared/treenav.ts
new file mode 100644
index 0000000..6bb6b1c
--- /dev/null
+++ b/internal/content/shared/treenav.ts
@@ -0,0 +1,88 @@
+/**
+ * @license
+ * Copyright 2024 The Go Authors. All rights reserved.
+ * Use of this source code is governed by a BSD-style
+ * license that can be found in the LICENSE file.
+ */
+
+/**
+ * A treeNavController adds dynamic expansion and selection of index list
+ * elements based on scroll position.
+ *
+ * Use it as follows:
+ *  - Add the .js-Tree class to a parent element of your index and content.
+ *  - Add the .js-Tree-item class to <li> elements of your index.
+ *  - Add the .js-Tree-heading class to <hN> heading elements of your content.
+ *
+ * Then, when you scroll content, the 'aria-selected' and 'aria-expanded'
+ * attributes of your tree items will be set according to the current content
+ * scroll position. The included treenav.css implements styling to expand and
+ * highlight index elements according to these attributes.
+ */
+export function treeNavController(el: HTMLElement) {
+  const headings = el.querySelectorAll<HTMLHeadingElement>(".js-Tree-heading");
+  const callback = () => {
+    // Collect heading elements above the scroll position.
+    let above: HTMLHeadingElement[] = [];
+    for (const h of headings) {
+      const rect = h.getBoundingClientRect();
+      if (rect.height && rect.top < 80) {
+        above.unshift(h);
+      }
+    }
+    // Highlight the first heading even if we're not yet scrolled below it.
+    if (above.length == 0 && headings[0] instanceof HTMLHeadingElement) {
+      above = [headings[0]];
+    }
+    // Collect the set of heading levels we're immediately below, at most one
+    // per heading level, by decresing level.
+    // e.g. [<h3 element>, <h2 element>, <h1 element>]
+    let threshold = Infinity;
+    const active: HTMLHeadingElement[] = [];
+    for (const h of above) {
+      const level = Number(h.tagName[1]);
+      if (level < threshold) {
+        threshold = level;
+        active.push(h);
+      }
+    }
+    // Update aria-selected and aria-expanded for all items, per the current
+    // position.
+    const navItems = el.querySelectorAll<HTMLElement>(".js-Tree-item");
+    for (const item of navItems) {
+      const headingId = item.dataset["headingId"];
+      let selected = false,
+        expanded = false;
+      for (const h of active) {
+        if (h.id === headingId) {
+          if (h === active[0]) {
+            selected = true;
+          } else {
+            expanded = true;
+          }
+          break;
+        }
+      }
+      item.setAttribute("aria-selected", selected ? "true" : "false");
+      item.setAttribute("aria-expanded", expanded ? "true" : "false");
+    }
+  };
+
+  // Update on changes to viewport intersection, defensively debouncing to
+  // guard against performance issues.
+  const observer = new IntersectionObserver(debounce(callback, 20));
+  for (const h of headings) {
+    observer.observe(h);
+  }
+}
+
+export function debounce<T extends (...args: unknown[]) => unknown>(
+  callback: T,
+  wait: number
+) {
+  let timeout: number;
+  return (...args: unknown[]) => {
+    clearTimeout(timeout);
+    timeout = setTimeout(() => callback(...args), wait);
+  };
+}
diff --git a/internal/content/telemetrygodev/allcharts.html b/internal/content/telemetrygodev/allcharts.html
new file mode 100644
index 0000000..5ea915d
--- /dev/null
+++ b/internal/content/telemetrygodev/allcharts.html
@@ -0,0 +1,35 @@
+<!--
+  Copyright 2024 The Go Authors. All rights reserved.
+  Use of this source code is governed by a BSD-style
+  license that can be found in the LICENSE file.
+-->
+
+{{template "base" .}}
+
+{{define "title"}}Go Telemetry / Daily Charts{{end}}
+
+{{define "content"}}
+
+<main id="main">
+<section>
+<div class="Hero">
+<div class="Content">
+  <h1>Daily Charts</h1>
+  <p>View charts for telemetry data.</p>
+</div>
+</div>
+</section>
+
+<section>
+<div class="Content">
+  <ul style="column-count: auto; column-width: 10rem">
+  {{range .}}
+    <li><a href="/charts/{{.}}">{{.}}</a></li>
+  {{end}}
+  </ul>
+</div>
+</section>
+
+</main>
+
+{{end}}
diff --git a/internal/content/telemetrygodev/charts.css b/internal/content/telemetrygodev/charts.css
index 8dea0ea..2da2c26 100644
--- a/internal/content/telemetrygodev/charts.css
+++ b/internal/content/telemetrygodev/charts.css
@@ -4,49 +4,9 @@
  * license that can be found in the LICENSE file.
  */
 
-/* Fix tooltip background for dark theme */
-svg g[aria-label="tip"] g {
-  fill: var(--color-background);
-}
 
-html {
-  scroll-padding-top: 4rem;
-}
+@import url("../shared/chartbrowser.css");
 
-.Breadcrumb {
-  position: sticky;
-  top: 0;
-  z-index: 1000;
-}
-
-.Breadcrumb ol {
-  align-items: center;
-  border-bottom: var(--border);
-  display: inline-flex;
-  gap: 1rem;
-  list-style: none;
-  margin-block-start: 0;
-  margin-block-end: 0;
-  padding-inline-start: 0;
-  min-height: 3rem;
-  width: calc(100% - 2rem);
-  background-color: var(--color-background);
-  padding: 0 1rem;
-  font-size: 0.875rem;
-  position: fixed;
-  top: 0;
-  transition: top 0.1s ease-in 0.1s;
-}
-
-.Breadcrumb ol:empty {
-  top: -3.0625rem;
-}
-
-.Breadcrumb li:not(:last-child)::after {
-  content: ">";
-  margin-left: 1rem;
-}
-
-.Breadcrumb li:last-child a {
-  color: var(--color-text-subtle);
+.Charts {
+  margin-top: 1.5rem;
 }
diff --git a/internal/content/telemetrygodev/charts.html b/internal/content/telemetrygodev/charts.html
index 7d7aa38..1202e0f 100644
--- a/internal/content/telemetrygodev/charts.html
+++ b/internal/content/telemetrygodev/charts.html
@@ -12,62 +12,26 @@
 <link rel="stylesheet" href="/static/charts.min.css">
 
 <main id="main">
-  <div class="Container">
-    <div class="Content">
-      <h1>Go Telemetry / {{index .Charts.DateRange 1}}</h1>
-      <p>These charts were generated with data from {{.Charts.NumReports}} reports.</p>
+<section>
+<div class="Hero">
+<div class="Content">
+  <h1>Daily charts for {{.Date}}</h1>
+  <p>Generated from {{.Charts.NumReports}} reports.</p>
+</div>
+</div>
+</section>
 
-      <section class="Index">
-        <h2 id="index">Index</h2>
-        <ul>
-          <li>
-            <a href="#charts">Charts</a>
-            <ul>
-              {{range .Charts.Programs}}
-              <li>
-                <a href="#{{.ID}}">{{.Name}}</a>
-                <ul>
-                  {{range .Charts}}
-                  {{with .}}
-                  <li>
-                    <a href="#{{.ID}}">{{.Name}}</a>
-                  </li>
-                  {{end}}
-                  {{end}}
-                </ul>
-              </li>
-              {{end}}
-            </ul>
-          </li>
-        </ul>
-      </section>
-
-      <section class="Charts">
-        <h2 id="charts">Charts</h2>
-        {{range .Charts.Programs}}
-        <div class="Chart">
-          <h3 id="{{.ID}}">
-            {{.Name}}
-          </h3>
-          {{range .Charts}}
-          {{with .}}
-          <div>
-            <h4 id="{{.ID}}">
-              {{.Name}}
-            </h4>
-            <div data-chart-id="{{.ID}}"></div>
-          </div>
-          {{end}}
-          {{end}}
-        </div>
-        {{end}}
-      </section>
-    </div>
+<section>
+<div class="Content">
+  <div class="Charts">
+  {{template "chartbrowser" .}}
   </div>
-</main>
+</div>
+</section>
 
 <script>
   window.Page = {{.}};
 </script>
 <script src="/static/charts.min.js"></script>
-{{end}}
\ No newline at end of file
+
+{{end}}
diff --git a/internal/content/telemetrygodev/charts.ts b/internal/content/telemetrygodev/charts.ts
index 7866160..5f4273f 100644
--- a/internal/content/telemetrygodev/charts.ts
+++ b/internal/content/telemetrygodev/charts.ts
@@ -35,6 +35,7 @@
 
 import * as d3 from "d3";
 import * as Plot from "@observablehq/plot";
+import { treeNavController } from "../shared/treenav";
 
 for (const program of Page.Charts?.Programs || []) {
   for (const counter of program?.Charts || []) {
@@ -58,6 +59,10 @@
   }
 }
 
+for (const el of document.querySelectorAll<HTMLElement>(".js-Tree")) {
+  treeNavController(el);
+}
+
 function partition({ Data, Name }: Chart) {
   Data ??= [];
 
diff --git a/internal/content/telemetrygodev/config.html b/internal/content/telemetrygodev/config.html
index 8790eaa..ad98a2a 100644
--- a/internal/content/telemetrygodev/config.html
+++ b/internal/content/telemetrygodev/config.html
@@ -10,6 +10,7 @@
 
 {{define "content"}}
 <main id="main">
+<div class="Content">
   <section class="Chart Config">
     <h2 id="config">Chart Config</h2>
     <p>
@@ -34,5 +35,6 @@
     </label>
     <pre style="max-height: 100rem">{{.UploadConfig}}</pre>
   </section>
+</div>
 </main>
 {{end}}
diff --git a/internal/content/telemetrygodev/data.html b/internal/content/telemetrygodev/data.html
new file mode 100644
index 0000000..9e2a28b
--- /dev/null
+++ b/internal/content/telemetrygodev/data.html
@@ -0,0 +1,36 @@
+<!--
+  Copyright 2024 The Go Authors. All rights reserved.
+  Use of this source code is governed by a BSD-style
+  license that can be found in the LICENSE file.
+-->
+
+{{template "base" .}}
+
+{{define "title"}}Go Telemetry / Data{{end}}
+
+{{define "content"}}
+
+<main id="main">
+<section>
+<div class="Hero">
+<div class="Content">
+  <h1>Merged daily reports</h1>
+  <p>Download raw telemetry data.</p>
+</div>
+</div>
+</section>
+
+<section>
+<div class="Content">
+  <ul style="margin-top: 1.5rem; column-count: auto; column-width: 10rem">
+  {{$url := .BucketURL}}
+  {{range .Dates}}
+  <li><a href="{{$url}}/{{.}}.json">{{.}}</a></li>
+  {{end}}
+  </ul>
+</div>
+</section>
+
+</main>
+
+{{end}}
diff --git a/internal/content/telemetrygodev/index.css b/internal/content/telemetrygodev/index.css
new file mode 100644
index 0000000..69c9b7f
--- /dev/null
+++ b/internal/content/telemetrygodev/index.css
@@ -0,0 +1,47 @@
+/*!
+ * Copyright 2024 The Go Authors. All rights reserved.
+ * Use of this source code is governed by a BSD-style
+ * license that can be found in the LICENSE file.
+ */
+
+@import url("../shared/chartbrowser.css");
+
+p {
+  /* Reset from _typography.css */
+  max-width: none;
+}
+
+.Charts {
+  margin-top: 1rem;
+}
+.Centered {
+  display: flex;
+  justify-content: center;
+}
+.Charts-heading {
+  margin: 2rem;
+  display: flex;
+  flex-direction: column;
+  align-items: center;
+}
+.Charts-heading h2 {
+  margin: 0;
+}
+.Charts-heading ul {
+  margin: 0.5rem 0 0 0;
+  list-style: none;
+  display: inline-flex;
+  padding: 0;
+}
+.Charts-heading li {
+  list-style: none;
+  display: inline-flex;
+}
+.Charts-heading li:not(:last-child):after {
+  content: '|';
+  display: block;
+  height: 1rem;
+  margin: 0 0.8125rem;
+  width: 1rem;
+  text-align: center;
+}
diff --git a/internal/content/telemetrygodev/index.html b/internal/content/telemetrygodev/index.html
index c2d81f4..2f41ab0 100644
--- a/internal/content/telemetrygodev/index.html
+++ b/internal/content/telemetrygodev/index.html
@@ -9,46 +9,55 @@
 {{define "title"}}Go Telemetry{{end}}
 
 {{define "content"}}
+<link rel="stylesheet" href="/static/index.min.css">
+
 <main id="main">
-  <h1>Go Telemetry</h1>
-  <section>
-    <h2>Overview</h2>
-    <p>
-    Go Telemetry is a way for Go toolchain programs to collect data about their
-    performance and usage. Uploaded data is used to help improve the Go
-    toolchain and related tools. Go Telemetry is not built into users'
-    binaries. Learn more about Go telemetry at
-    <a href="https://go.dev/doc/telemetry">go.dev/doc/telemetry</a>.
-    </p>
+<section>
+  <div class="Hero">
+    <div class="Content">
+      <h1>Go Telemetry &#128202;</h1>
+        <p>
+        <em>Go Telemetry</em> is a way for Go toolchain programs to collect
+        data about their performance and usage. Uploaded data is used to help
+        improve the Go toolchain and related tools. Go Telemetry is not built
+        into users' binaries. Learn more about Go telemetry at
+        <a href="https://go.dev/doc/telemetry">go.dev/doc/telemetry</a>.
+        </p>
 
-    <p>
-    Users who have opted in will upload an approved subset of telemetry
-    data approximately once a week. This subset is determined by the current
-    <a href="/config">upload configuration</a>.
-    </p>
+        <p>
+        Users who have opted in will upload an approved subset of telemetry
+        data approximately once a week. This subset is determined by the current
+        <a href="/config">upload configuration</a>.
+        </p>
 
-    <p>
-    For privacy information about this service, see
-    <a href="/privacy">telemetry.go.dev/privacy</a>.
-    </p>
-  </section>
-  <section>
-    <h2>Charts</h2>
-    <p>View charts for telemetry data.</p>
-    <ul style="column-count: auto; column-width: 10rem">
-    {{range .Charts}}
-      <li><a href="{{.URL}}">{{.Text}}</a></li>
-    {{end}}
-    </ul>
-  </section>
-  <section>
-    <h2>Reports</h2>
-    <p>Download telemetry reports.</p>
-    <ul style="column-count: auto; column-width: 10rem">
-    {{range .Reports}}
-      <li><a href="{{.URL}}">{{.Text}}</a></li>
-    {{end}}
-    </ul>
-  </section>
+        <p>
+        For privacy information about this service, see
+        <a href="/privacy">telemetry.go.dev/privacy</a>.
+      </p>
+    </div>
+  </div>
+</section>
+
+<section class="Charts">
+<div class="Content">
+  <div class="Centered">
+    <div class="Charts-heading">
+      <h2>Daily charts for {{.ChartDate}}</h2>
+      <ul>
+        <li><a href="/charts/">All daily charts</a></li>
+        <li><a href="/data/">All raw data</a></li>
+      </ul>
+    </div>
+  </div>
+  {{template "chartbrowser" .}}
+</div>
+</section>
+
 </main>
+
+<script>
+  window.Page = {{.}};
+</script>
+<script src="/static/charts.min.js"></script>
+
 {{end}}
diff --git a/internal/content/telemetrygodev/static/charts.min.css b/internal/content/telemetrygodev/static/charts.min.css
index 0bced8b..19dd8fc 100644
--- a/internal/content/telemetrygodev/static/charts.min.css
+++ b/internal/content/telemetrygodev/static/charts.min.css
@@ -1,5 +1,10 @@
 /* Code generated by esbuild. DO NOT EDIT. */
-svg g[aria-label=tip] g{fill:var(--color-background)}html{scroll-padding-top:4rem}.Breadcrumb{position:sticky;top:0;z-index:1000}.Breadcrumb ol{align-items:center;border-bottom:var(--border);display:inline-flex;gap:1rem;list-style:none;margin-block-start:0;margin-block-end:0;padding-inline-start:0;min-height:3rem;width:calc(100% - 2rem);background-color:var(--color-background);padding:0 1rem;font-size:.875rem;position:fixed;top:0;transition:top .1s ease-in .1s}.Breadcrumb ol:empty{top:-3.0625rem}.Breadcrumb li:not(:last-child):after{content:">";margin-left:1rem}.Breadcrumb li:last-child a{color:var(--color-text-subtle)}
+.js-Tree ul{list-style:none;padding-left:0}.js-Tree-item ul{display:none}.js-Tree-item{overflow:hidden;text-overflow:ellipsis;padding:.125rem 0}.js-Tree-item[aria-expanded=true] ul{display:block}.js-Tree-item .js-Tree-item{position:relative;padding-left:1.25rem}.js-Tree-item .js-Tree-item[aria-selected=true]:before{background-color:var(--color-brand-primary);border-radius:50%;content:"";display:block;height:.3125rem;left:.4688rem;position:absolute;top:.75rem;width:.3125rem}.js-Tree-item>a{color:var(--color-text-subtle);font-size:.875rem}.js-Tree-item[aria-selected=true]>a{color:var(--color-text)}svg g[aria-label=tip] g{fill:var(--color-background)}.Chartbrowser-view{display:flex;flex-direction:row}.Chartbrowser-index{flex:1 1;padding-right:2rem}.Chartbrowser-heading{font-weight:700;font-size:1.25rem;margin:0 0 .5rem}.Chartbrowser-index-sticky{position:sticky;top:1rem;width:10rem}.Chartbrowser-index-sticky>ul{position:sticky;top:1rem;margin-top:0}.Chartbrowser-link{color:var(--color-text-subtle);font-size:.875rem;line-height:1.5rem}.Chartbrowser-program{font-weight:400;margin:0 0 1rem;color:var(--color-text-subtle)}.Chartbrowser-program:not(:first-of-type){margin-top:2rem}.Chartbrowser-chart{background-color:var(--color-background-accented);border:1px solid transparent;margin-bottom:1rem;padding:.875rem;box-shadow:0 1px 2px #3c40434d,0 1px 3px 1px #3c404326}.Chartbrowser-chart-name{text-align:center;margin:0}.Charts{margin-top:1.5rem}
+/*!
+ * Copyright 2024 The Go Authors. All rights reserved.
+ * Use of this source code is governed by a BSD-style
+ * license that can be found in the LICENSE file.
+ */
 /*!
  * Copyright 2023 The Go Authors. All rights reserved.
  * Use of this source code is governed by a BSD-style
diff --git a/internal/content/telemetrygodev/static/charts.min.css.map b/internal/content/telemetrygodev/static/charts.min.css.map
index cb7ee5a..51b27b0 100644
--- a/internal/content/telemetrygodev/static/charts.min.css.map
+++ b/internal/content/telemetrygodev/static/charts.min.css.map
@@ -1,7 +1,7 @@
 {
   "version": 3,
-  "sources": ["../charts.css"],
-  "sourcesContent": ["/*!\n * Copyright 2023 The Go Authors. All rights reserved.\n * Use of this source code is governed by a BSD-style\n * license that can be found in the LICENSE file.\n */\n\n/* Fix tooltip background for dark theme */\nsvg g[aria-label=\"tip\"] g {\n  fill: var(--color-background);\n}\n\nhtml {\n  scroll-padding-top: 4rem;\n}\n\n.Breadcrumb {\n  position: sticky;\n  top: 0;\n  z-index: 1000;\n}\n\n.Breadcrumb ol {\n  align-items: center;\n  border-bottom: var(--border);\n  display: inline-flex;\n  gap: 1rem;\n  list-style: none;\n  margin-block-start: 0;\n  margin-block-end: 0;\n  padding-inline-start: 0;\n  min-height: 3rem;\n  width: calc(100% - 2rem);\n  background-color: var(--color-background);\n  padding: 0 1rem;\n  font-size: 0.875rem;\n  position: fixed;\n  top: 0;\n  transition: top 0.1s ease-in 0.1s;\n}\n\n.Breadcrumb ol:empty {\n  top: -3.0625rem;\n}\n\n.Breadcrumb li:not(:last-child)::after {\n  content: \">\";\n  margin-left: 1rem;\n}\n\n.Breadcrumb li:last-child a {\n  color: var(--color-text-subtle);\n}\n"],
-  "mappings": ";AAOA,wBACE,6BAGF,KACE,wBAGF,YACE,gBACA,MACA,aAGF,eACE,mBACA,4BACA,oBACA,SACA,gBACA,qBACA,mBACA,uBACA,gBACA,wBACA,yCAhCF,eAkCE,kBACA,eACA,MACA,+BAGF,qBACE,eAGF,sCACE,YACA,iBAGF,4BACE",
+  "sources": ["../../shared/treenav.css", "../../shared/chartbrowser.css", "../charts.css"],
+  "sourcesContent": ["/*!\n * Copyright 2024 The Go Authors. All rights reserved.\n * Use of this source code is governed by a BSD-style\n * license that can be found in the LICENSE file.\n */\n\n.js-Tree ul {\n  list-style: none;\n  padding-left: 0;\n}\n\n.js-Tree-item ul {\n  display: none;\n}\n\n.js-Tree-item {\n  overflow: hidden;\n  text-overflow: ellipsis;\n  padding: 0.125rem 0 0.125rem 0;\n}\n\n.js-Tree-item[aria-expanded='true'] ul {\n  display: block;\n}\n\n.js-Tree-item .js-Tree-item {\n  position: relative;\n  padding-left: 1.25rem;\n}\n\n.js-Tree-item .js-Tree-item[aria-selected='true']:before {\n  background-color: var(--color-brand-primary);\n  border-radius: 50%;\n  content: \"\";\n  display: block;\n  height: .3125rem;\n  left: .4688rem;\n  position: absolute;\n  top: .75rem;\n  width: .3125rem;\n}\n\n.js-Tree-item>a {\n  color: var(--color-text-subtle);\n  font-size: .875rem;\n}\n\n.js-Tree-item[aria-selected='true']>a {\n  color: var(--color-text);\n}\n\n", "/*!\n * Copyright 2024 The Go Authors. All rights reserved.\n * Use of this source code is governed by a BSD-style\n * license that can be found in the LICENSE file.\n */\n\n@import url(\"../shared/treenav.css\");\n\n/* Fix tooltip background for dark theme */\nsvg g[aria-label=\"tip\"] g {\n  fill: var(--color-background);\n}\n\n.Chartbrowser-view {\n  display: flex;\n  flex-direction: row;\n}\n.Chartbrowser-index {\n  flex: 1 1;\n  padding-right: 2rem;\n}\n.Chartbrowser-heading {\n  font-weight: bold;\n  font-size: 1.25rem;\n  margin: 0 0 0.5rem 0;\n}\n.Chartbrowser-index-sticky {\n  position: sticky;\n  top: 1rem;\n  width: 10rem;\n}\n.Chartbrowser-index-sticky > ul {\n  position: sticky;\n  top: 1rem;\n  margin-top: 0;\n}\n.Chartbrowser-link {\n  color: var(--color-text-subtle);\n  font-size: .875rem;\n  line-height: 1.5rem;\n}\n.Chartbrowser-program {\n  font-weight: normal;\n  margin: 0 0 1rem 0;\n  color: var(--color-text-subtle);\n}\n.Chartbrowser-program:not(:first-of-type) {\n  margin-top: 2rem;\n}\n.Chartbrowser-chart {\n  background-color: var(--color-background-accented);\n  border: 1px solid transparent;\n  margin-bottom: 1rem;\n  padding: 0.875rem;\n  box-shadow: 0 1px 2px 0 rgba(60, 64, 67, .3), 0 1px 3px 1px rgba(60, 64, 67, .15);\n}\n.Chartbrowser-chart-name {\n  text-align: center;\n  margin: 0;\n}\n", "/*!\n * Copyright 2023 The Go Authors. All rights reserved.\n * Use of this source code is governed by a BSD-style\n * license that can be found in the LICENSE file.\n */\n\n\n@import url(\"../shared/chartbrowser.css\");\n\n.Charts {\n  margin-top: 1.5rem;\n}\n"],
+  "mappings": ";AAMA,YACE,gBACA,eAGF,iBACE,aAGF,cACE,gBACA,uBAjBF,kBAqBA,qCACE,cAGF,4BACE,kBACA,qBAGF,uDACE,4CA/BF,kBAiCE,WACA,cACA,gBACA,cACA,kBACA,WACA,eAGF,gBACE,+BACA,kBAGF,oCACE,wBCvCF,wBACE,6BAGF,mBACE,aACA,mBAEF,oBACE,SACA,mBAEF,sBACE,gBACA,kBAvBF,iBA0BA,2BACE,gBACA,SACA,YAEF,8BACE,gBACA,SACA,aAEF,mBACE,+BACA,kBACA,mBAEF,sBACE,gBA1CF,gBA4CE,+BAEF,0CACE,gBAEF,oBACE,kDACA,6BACA,mBApDF,gBAsDE,uDAEF,yBACE,kBAzDF,SCSA,QACE",
   "names": []
 }
diff --git a/internal/content/telemetrygodev/static/charts.min.js b/internal/content/telemetrygodev/static/charts.min.js
index ede1c95..edda114 100644
--- a/internal/content/telemetrygodev/static/charts.min.js
+++ b/internal/content/telemetrygodev/static/charts.min.js
@@ -1,10 +1,10 @@
 // Code generated by esbuild. DO NOT EDIT.
-"use strict";(()=>{function bt(t,e){return t==null||e==null?NaN:t<e?-1:t>e?1:t>=e?0:NaN}function xe(t,e){return t==null||e==null?NaN:e<t?-1:e>t?1:e>=t?0:NaN}function qe(t){let e,n,r;t.length!==2?(e=bt,n=(f,u)=>bt(t(f),u),r=(f,u)=>t(f)-u):(e=t===bt||t===xe?t:Fy,n=t,r=t);function o(f,u,c=0,s=f.length){if(c<s){if(e(u,u)!==0)return s;do{let d=c+s>>>1;n(f[d],u)<0?c=d+1:s=d}while(c<s)}return c}function i(f,u,c=0,s=f.length){if(c<s){if(e(u,u)!==0)return s;do{let d=c+s>>>1;n(f[d],u)<=0?c=d+1:s=d}while(c<s)}return c}function a(f,u,c=0,s=f.length){let d=o(f,u,c,s-1);return d>c&&r(f[d-1],u)>-r(f[d],u)?d-1:d}return{left:o,center:a,right:i}}function Fy(){return 0}function Wo(t){return t===null?NaN:+t}function*Fp(t,e){if(e===void 0)for(let n of t)n!=null&&(n=+n)>=n&&(yield n);else{let n=-1;for(let r of t)(r=e(r,++n,t))!=null&&(r=+r)>=r&&(yield r)}}var qp=qe(bt),zp=qp.right,qy=qp.left,zy=qe(Wo).center,un=zp;function Jn(t,e){let n=0;if(e===void 0)for(let r of t)r!=null&&(r=+r)>=r&&++n;else{let r=-1;for(let o of t)(o=e(o,++r,t))!=null&&(o=+o)>=o&&++n}return n}function Yy(t){return t.length|0}function By(t){return!(t>0)}function Uy(t){return typeof t!="object"||"length"in t?t:Array.from(t)}function Xy(t){return e=>t(...e)}function Fa(...t){let e=typeof t[t.length-1]=="function"&&Xy(t.pop());t=t.map(Uy);let n=t.map(Yy),r=t.length-1,o=new Array(r+1).fill(0),i=[];if(r<0||n.some(By))return i;for(;;){i.push(o.map((f,u)=>t[u][f]));let a=r;for(;++o[a]===n[a];){if(a===0)return e?i.map(e):i;o[a--]=0}}}function qa(t,e){var n=0,r=0;return Float64Array.from(t,e===void 0?o=>n+=+o||0:o=>n+=+e(o,r++,t)||0)}function Rr(t,e){let n=0,r,o=0,i=0;if(e===void 0)for(let a of t)a!=null&&(a=+a)>=a&&(r=a-o,o+=r/++n,i+=r*(a-o));else{let a=-1;for(let f of t)(f=e(f,++a,t))!=null&&(f=+f)>=f&&(r=f-o,o+=r/++n,i+=r*(f-o))}if(n>1)return i/(n-1)}function Pr(t,e){let n=Rr(t,e);return n&&Math.sqrt(n)}function Ct(t,e){let n,r;if(e===void 0)for(let o of t)o!=null&&(n===void 0?o>=o&&(n=r=o):(n>o&&(n=o),r<o&&(r=o)));else{let o=-1;for(let i of t)(i=e(i,++o,t))!=null&&(n===void 0?i>=i&&(n=r=i):(n>i&&(n=i),r<i&&(r=i)))}return[n,r]}var ae=class{constructor(){this._partials=new Float64Array(32),this._n=0}add(e){let n=this._partials,r=0;for(let o=0;o<this._n&&o<32;o++){let i=n[o],a=e+i,f=Math.abs(e)<Math.abs(i)?e-(a-i):i-(a-e);f&&(n[r++]=f),e=a}return n[r]=e,this._n=r+1,this}valueOf(){let e=this._partials,n=this._n,r,o,i,a=0;if(n>0){for(a=e[--n];n>0&&(r=a,o=e[--n],a=r+o,i=o-(a-r),!i););n>0&&(i<0&&e[n-1]<0||i>0&&e[n-1]>0)&&(o=i*2,r=a+o,o==r-a&&(a=r))}return a}};var Qt=class extends Map{constructor(e,n=Up){if(super(),Object.defineProperties(this,{_intern:{value:new Map},_key:{value:n}}),e!=null)for(let[r,o]of e)this.set(r,o)}get(e){return super.get(us(this,e))}has(e){return super.has(us(this,e))}set(e,n){return super.set(Yp(this,e),n)}delete(e){return super.delete(Bp(this,e))}},Ce=class extends Set{constructor(e,n=Up){if(super(),Object.defineProperties(this,{_intern:{value:new Map},_key:{value:n}}),e!=null)for(let r of e)this.add(r)}has(e){return super.has(us(this,e))}add(e){return super.add(Yp(this,e))}delete(e){return super.delete(Bp(this,e))}};function us({_intern:t,_key:e},n){let r=e(n);return t.has(r)?t.get(r):n}function Yp({_intern:t,_key:e},n){let r=e(n);return t.has(r)?t.get(r):(t.set(r,n),n)}function Bp({_intern:t,_key:e},n){let r=e(n);return t.has(r)&&(n=t.get(r),t.delete(r)),n}function Up(t){return t!==null&&typeof t=="object"?t.valueOf():t}function Go(t){return t}function cn(t,...e){return ss(t,Go,Go,e)}function Ae(t,e,...n){return ss(t,Go,e,n)}function cs(t,e,...n){return ss(t,Array.from,e,n)}function ss(t,e,n,r){return function o(i,a){if(a>=r.length)return n(i);let f=new Qt,u=r[a++],c=-1;for(let s of i){let d=u(s,++c,i),l=f.get(d);l?l.push(s):f.set(d,[s])}for(let[s,d]of f)f.set(s,o(d,a));return e(f)}(t,0)}function ls(t,e){return Array.from(e,n=>t[n])}function ze(t,...e){if(typeof t[Symbol.iterator]!="function")throw new TypeError("values is not iterable");t=Array.from(t);let[n]=e;if(n&&n.length!==2||e.length>1){let r=Uint32Array.from(t,(o,i)=>i);return e.length>1?(e=e.map(o=>t.map(o)),r.sort((o,i)=>{for(let a of e){let f=Ho(a[o],a[i]);if(f)return f}})):(n=t.map(n),r.sort((o,i)=>Ho(n[o],n[i]))),ls(t,r)}return t.sort(ds(n))}function ds(t=bt){if(t===bt)return Ho;if(typeof t!="function")throw new TypeError("compare is not a function");return(e,n)=>{let r=t(e,n);return r||r===0?r:(t(n,n)===0)-(t(e,e)===0)}}function Ho(t,e){return(t==null||!(t>=t))-(e==null||!(e>=e))||(t<e?-1:t>e?1:0)}function Lr(t,e,n){return(e.length!==2?ze(Ae(t,e,n),([r,o],[i,a])=>bt(o,a)||bt(r,i)):ze(cn(t,n),([r,o],[i,a])=>e(o,a)||bt(r,i))).map(([r])=>r)}var Wy=Math.sqrt(50),Gy=Math.sqrt(10),Hy=Math.sqrt(2);function za(t,e,n){let r=(e-t)/Math.max(0,n),o=Math.floor(Math.log10(r)),i=r/Math.pow(10,o),a=i>=Wy?10:i>=Gy?5:i>=Hy?2:1,f,u,c;return o<0?(c=Math.pow(10,-o)/a,f=Math.round(t*c),u=Math.round(e*c),f/c<t&&++f,u/c>e&&--u,c=-c):(c=Math.pow(10,o)*a,f=Math.round(t/c),u=Math.round(e/c),f*c<t&&++f,u*c>e&&--u),u<f&&.5<=n&&n<2?za(t,e,n*2):[f,u,c]}function $e(t,e,n){if(e=+e,t=+t,n=+n,!(n>0))return[];if(t===e)return[t];let r=e<t,[o,i,a]=r?za(e,t,n):za(t,e,n);if(!(i>=o))return[];let f=i-o+1,u=new Array(f);if(r)if(a<0)for(let c=0;c<f;++c)u[c]=(i-c)/-a;else for(let c=0;c<f;++c)u[c]=(i-c)*a;else if(a<0)for(let c=0;c<f;++c)u[c]=(o+c)/-a;else for(let c=0;c<f;++c)u[c]=(o+c)*a;return u}function tr(t,e,n){return e=+e,t=+t,n=+n,za(t,e,n)[2]}function Or(t,e,n){e=+e,t=+t,n=+n;let r=e<t,o=r?tr(e,t,n):tr(t,e,n);return(r?-1:1)*(o<0?1/-o:o)}function Ya(t){return Math.max(1,Math.ceil(Math.log(Jn(t))/Math.LN2)+1)}function Wt(t,e){let n;if(e===void 0)for(let r of t)r!=null&&(n<r||n===void 0&&r>=r)&&(n=r);else{let r=-1;for(let o of t)(o=e(o,++r,t))!=null&&(n<o||n===void 0&&o>=o)&&(n=o)}return n}function Ba(t,e){let n,r=-1,o=-1;if(e===void 0)for(let i of t)++o,i!=null&&(n<i||n===void 0&&i>=i)&&(n=i,r=o);else for(let i of t)(i=e(i,++o,t))!=null&&(n<i||n===void 0&&i>=i)&&(n=i,r=o);return r}function Jt(t,e){let n;if(e===void 0)for(let r of t)r!=null&&(n>r||n===void 0&&r>=r)&&(n=r);else{let r=-1;for(let o of t)(o=e(o,++r,t))!=null&&(n>o||n===void 0&&o>=o)&&(n=o)}return n}function Ua(t,e){let n,r=-1,o=-1;if(e===void 0)for(let i of t)++o,i!=null&&(n>i||n===void 0&&i>=i)&&(n=i,r=o);else for(let i of t)(i=e(i,++o,t))!=null&&(n>i||n===void 0&&i>=i)&&(n=i,r=o);return r}function Xa(t,e,n=0,r=1/0,o){if(e=Math.floor(e),n=Math.floor(Math.max(0,n)),r=Math.floor(Math.min(t.length-1,r)),!(n<=e&&e<=r))return t;for(o=o===void 0?Ho:ds(o);r>n;){if(r-n>600){let u=r-n+1,c=e-n+1,s=Math.log(u),d=.5*Math.exp(2*s/3),l=.5*Math.sqrt(s*d*(u-d)/u)*(c-u/2<0?-1:1),p=Math.max(n,Math.floor(e-c*d/u+l)),m=Math.min(r,Math.floor(e+(u-c)*d/u+l));Xa(t,e,p,m,o)}let i=t[e],a=n,f=r;for(Vo(t,n,e),o(t[r],i)>0&&Vo(t,n,r);a<f;){for(Vo(t,a,f),++a,--f;o(t[a],i)<0;)++a;for(;o(t[f],i)>0;)--f}o(t[n],i)===0?Vo(t,n,f):(++f,Vo(t,f,r)),f<=e&&(n=f+1),e<=f&&(r=f-1)}return t}function Vo(t,e,n){let r=t[e];t[e]=t[n],t[n]=r}function jo(t,e=bt){let n,r=!1;if(e.length===1){let o;for(let i of t){let a=e(i);(r?bt(a,o)>0:bt(a,a)===0)&&(n=i,o=a,r=!0)}}else for(let o of t)(r?e(o,n)>0:e(o,o)===0)&&(n=o,r=!0);return n}function ye(t,e,n){if(t=Float64Array.from(Fp(t,n)),!(!(r=t.length)||isNaN(e=+e))){if(e<=0||r<2)return Jt(t);if(e>=1)return Wt(t);var r,o=(r-1)*e,i=Math.floor(o),a=Wt(Xa(t,i).subarray(0,i+1)),f=Jt(t.subarray(i+1));return a+(f-a)*(o-i)}}function ps(t,e,n=Wo){if(!(!(r=t.length)||isNaN(e=+e))){if(e<=0||r<2)return+n(t[0],0,t);if(e>=1)return+n(t[r-1],r-1,t);var r,o=(r-1)*e,i=Math.floor(o),a=+n(t[i],i,t),f=+n(t[i+1],i+1,t);return a+(f-a)*(o-i)}}function Wa(t,e,n){let r=Jn(t),o=ye(t,.75)-ye(t,.25);return r&&o?Math.ceil((n-e)/(2*o*Math.pow(r,-1/3))):1}function Zo(t,e,n){let r=Jn(t),o=Pr(t);return r&&o?Math.ceil((n-e)*Math.cbrt(r)/(3.49*o)):1}function Ga(t,e){let n=0,r=0;if(e===void 0)for(let o of t)o!=null&&(o=+o)>=o&&(++n,r+=o);else{let o=-1;for(let i of t)(i=e(i,++o,t))!=null&&(i=+i)>=i&&(++n,r+=i)}if(n)return r/n}function sn(t,e){return ye(t,.5,e)}function*jy(t){for(let e of t)yield*e}function Fr(t){return Array.from(jy(t))}function Ha(t,e){let n=new Qt;if(e===void 0)for(let i of t)i!=null&&i>=i&&n.set(i,(n.get(i)||0)+1);else{let i=-1;for(let a of t)(a=e(a,++i,t))!=null&&a>=a&&n.set(a,(n.get(a)||0)+1)}let r,o=0;for(let[i,a]of n)a>o&&(o=a,r=i);return r}function Va(t,e=Zy){let n=[],r,o=!1;for(let i of t)o&&n.push(e(r,i)),r=i,o=!0;return n}function Zy(t,e){return[t,e]}function er(t,e,n){t=+t,e=+e,n=(o=arguments.length)<2?(e=t,t=0,1):o<3?1:+n;for(var r=-1,o=Math.max(0,Math.ceil((e-t)/n))|0,i=new Array(o);++r<o;)i[r]=t+r*n;return i}function fe(t,e){let n=0;if(e===void 0)for(let r of t)(r=+r)&&(n+=r);else{let r=-1;for(let o of t)(o=+e(o,++r,t))&&(n+=o)}return n}function An(t){if(typeof t[Symbol.iterator]!="function")throw new TypeError("values is not iterable");return Array.from(t).reverse()}function ja(...t){let e=new Ce;for(let n of t)for(let r of n)e.add(r);return e}function Xp(t){return t}var ms=1,hs=2,gs=3,Za=4,Wp=1e-6;function Ky(t){return"translate("+t+",0)"}function Qy(t){return"translate(0,"+t+")"}function Jy(t){return e=>+t(e)}function tb(t,e){return e=Math.max(0,t.bandwidth()-e*2)/2,t.round()&&(e=Math.round(e)),n=>+t(n)+e}function eb(){return!this.__axis}function nb(t,e){var n=[],r=null,o=null,i=6,a=6,f=3,u=typeof window<"u"&&window.devicePixelRatio>1?0:.5,c=t===ms||t===Za?-1:1,s=t===Za||t===hs?"x":"y",d=t===ms||t===gs?Ky:Qy;function l(p){var m=r??(e.ticks?e.ticks.apply(e,n):e.domain()),h=o??(e.tickFormat?e.tickFormat.apply(e,n):Xp),g=Math.max(i,0)+f,b=e.range(),x=+b[0]+u,M=+b[b.length-1]+u,y=(e.bandwidth?tb:Jy)(e.copy(),u),w=p.selection?p.selection():p,v=w.selectAll(".domain").data([null]),T=w.selectAll(".tick").data(m,e).order(),I=T.exit(),E=T.enter().append("g").attr("class","tick"),F=T.select("line"),_=T.select("text");v=v.merge(v.enter().insert("path",".tick").attr("class","domain").attr("stroke","currentColor")),T=T.merge(E),F=F.merge(E.append("line").attr("stroke","currentColor").attr(s+"2",c*i)),_=_.merge(E.append("text").attr("fill","currentColor").attr(s,c*g).attr("dy",t===ms?"0em":t===gs?"0.71em":"0.32em")),p!==w&&(v=v.transition(p),T=T.transition(p),F=F.transition(p),_=_.transition(p),I=I.transition(p).attr("opacity",Wp).attr("transform",function(R){return isFinite(R=y(R))?d(R+u):this.getAttribute("transform")}),E.attr("opacity",Wp).attr("transform",function(R){var O=this.parentNode.__axis;return d((O&&isFinite(O=O(R))?O:y(R))+u)})),I.remove(),v.attr("d",t===Za||t===hs?a?"M"+c*a+","+x+"H"+u+"V"+M+"H"+c*a:"M"+u+","+x+"V"+M:a?"M"+x+","+c*a+"V"+u+"H"+M+"V"+c*a:"M"+x+","+u+"H"+M),T.attr("opacity",1).attr("transform",function(R){return d(y(R)+u)}),F.attr(s+"2",c*i),_.attr(s,c*g).text(h),w.filter(eb).attr("fill","none").attr("font-size",10).attr("font-family","sans-serif").attr("text-anchor",t===hs?"start":t===Za?"end":"middle"),w.each(function(){this.__axis=y})}return l.scale=function(p){return arguments.length?(e=p,l):e},l.ticks=function(){return n=Array.from(arguments),l},l.tickArguments=function(p){return arguments.length?(n=p==null?[]:Array.from(p),l):n.slice()},l.tickValues=function(p){return arguments.length?(r=p==null?null:Array.from(p),l):r&&r.slice()},l.tickFormat=function(p){return arguments.length?(o=p,l):o},l.tickSize=function(p){return arguments.length?(i=a=+p,l):i},l.tickSizeInner=function(p){return arguments.length?(i=+p,l):i},l.tickSizeOuter=function(p){return arguments.length?(a=+p,l):a},l.tickPadding=function(p){return arguments.length?(f=+p,l):f},l.offset=function(p){return arguments.length?(u=+p,l):u},l}function xs(t){return nb(gs,t)}var rb={value:()=>{}};function Hp(){for(var t=0,e=arguments.length,n={},r;t<e;++t){if(!(r=arguments[t]+"")||r in n||/[\s.]/.test(r))throw new Error("illegal type: "+r);n[r]=[]}return new Ka(n)}function Ka(t){this._=t}function ob(t,e){return t.trim().split(/^|\s+/).map(function(n){var r="",o=n.indexOf(".");if(o>=0&&(r=n.slice(o+1),n=n.slice(0,o)),n&&!e.hasOwnProperty(n))throw new Error("unknown type: "+n);return{type:n,name:r}})}Ka.prototype=Hp.prototype={constructor:Ka,on:function(t,e){var n=this._,r=ob(t+"",n),o,i=-1,a=r.length;if(arguments.length<2){for(;++i<a;)if((o=(t=r[i]).type)&&(o=ib(n[o],t.name)))return o;return}if(e!=null&&typeof e!="function")throw new Error("invalid callback: "+e);for(;++i<a;)if(o=(t=r[i]).type)n[o]=Gp(n[o],t.name,e);else if(e==null)for(o in n)n[o]=Gp(n[o],t.name,null);return this},copy:function(){var t={},e=this._;for(var n in e)t[n]=e[n].slice();return new Ka(t)},call:function(t,e){if((o=arguments.length-2)>0)for(var n=new Array(o),r=0,o,i;r<o;++r)n[r]=arguments[r+2];if(!this._.hasOwnProperty(t))throw new Error("unknown type: "+t);for(i=this._[t],r=0,o=i.length;r<o;++r)i[r].value.apply(e,n)},apply:function(t,e,n){if(!this._.hasOwnProperty(t))throw new Error("unknown type: "+t);for(var r=this._[t],o=0,i=r.length;o<i;++o)r[o].value.apply(e,n)}};function ib(t,e){for(var n=0,r=t.length,o;n<r;++n)if((o=t[n]).name===e)return o.value}function Gp(t,e,n){for(var r=0,o=t.length;r<o;++r)if(t[r].name===e){t[r]=rb,t=t.slice(0,r).concat(t.slice(r+1));break}return n!=null&&t.push({name:e,value:n}),t}var ys=Hp;var Qa="http://www.w3.org/1999/xhtml",Ye={svg:"http://www.w3.org/2000/svg",xhtml:Qa,xlink:"http://www.w3.org/1999/xlink",xml:"http://www.w3.org/XML/1998/namespace",xmlns:"http://www.w3.org/2000/xmlns/"};function ln(t){var e=t+="",n=e.indexOf(":");return n>=0&&(e=t.slice(0,n))!=="xmlns"&&(t=t.slice(n+1)),Ye.hasOwnProperty(e)?{space:Ye[e],local:t}:t}function ab(t){return function(){var e=this.ownerDocument,n=this.namespaceURI;return n===Qa&&e.documentElement.namespaceURI===Qa?e.createElement(t):e.createElementNS(n,t)}}function fb(t){return function(){return this.ownerDocument.createElementNS(t.space,t.local)}}function dn(t){var e=ln(t);return(e.local?fb:ab)(e)}function ub(){}function nr(t){return t==null?ub:function(){return this.querySelector(t)}}function Vp(t){typeof t!="function"&&(t=nr(t));for(var e=this._groups,n=e.length,r=new Array(n),o=0;o<n;++o)for(var i=e[o],a=i.length,f=r[o]=new Array(a),u,c,s=0;s<a;++s)(u=i[s])&&(c=t.call(u,u.__data__,s,i))&&("__data__"in u&&(c.__data__=u.__data__),f[s]=c);return new vt(r,this._parents)}function bs(t){return t==null?[]:Array.isArray(t)?t:Array.from(t)}function cb(){return[]}function Ko(t){return t==null?cb:function(){return this.querySelectorAll(t)}}function sb(t){return function(){return bs(t.apply(this,arguments))}}function jp(t){typeof t=="function"?t=sb(t):t=Ko(t);for(var e=this._groups,n=e.length,r=[],o=[],i=0;i<n;++i)for(var a=e[i],f=a.length,u,c=0;c<f;++c)(u=a[c])&&(r.push(t.call(u,u.__data__,c,a)),o.push(u));return new vt(r,o)}function Qo(t){return function(){return this.matches(t)}}function Ja(t){return function(e){return e.matches(t)}}var lb=Array.prototype.find;function db(t){return function(){return lb.call(this.children,t)}}function pb(){return this.firstElementChild}function Zp(t){return this.select(t==null?pb:db(typeof t=="function"?t:Ja(t)))}var mb=Array.prototype.filter;function hb(){return Array.from(this.children)}function gb(t){return function(){return mb.call(this.children,t)}}function Kp(t){return this.selectAll(t==null?hb:gb(typeof t=="function"?t:Ja(t)))}function Qp(t){typeof t!="function"&&(t=Qo(t));for(var e=this._groups,n=e.length,r=new Array(n),o=0;o<n;++o)for(var i=e[o],a=i.length,f=r[o]=[],u,c=0;c<a;++c)(u=i[c])&&t.call(u,u.__data__,c,i)&&f.push(u);return new vt(r,this._parents)}function tf(t){return new Array(t.length)}function Jp(){return new vt(this._enter||this._groups.map(tf),this._parents)}function Jo(t,e){this.ownerDocument=t.ownerDocument,this.namespaceURI=t.namespaceURI,this._next=null,this._parent=t,this.__data__=e}Jo.prototype={constructor:Jo,appendChild:function(t){return this._parent.insertBefore(t,this._next)},insertBefore:function(t,e){return this._parent.insertBefore(t,e)},querySelector:function(t){return this._parent.querySelector(t)},querySelectorAll:function(t){return this._parent.querySelectorAll(t)}};function tm(t){return function(){return t}}function xb(t,e,n,r,o,i){for(var a=0,f,u=e.length,c=i.length;a<c;++a)(f=e[a])?(f.__data__=i[a],r[a]=f):n[a]=new Jo(t,i[a]);for(;a<u;++a)(f=e[a])&&(o[a]=f)}function yb(t,e,n,r,o,i,a){var f,u,c=new Map,s=e.length,d=i.length,l=new Array(s),p;for(f=0;f<s;++f)(u=e[f])&&(l[f]=p=a.call(u,u.__data__,f,e)+"",c.has(p)?o[f]=u:c.set(p,u));for(f=0;f<d;++f)p=a.call(t,i[f],f,i)+"",(u=c.get(p))?(r[f]=u,u.__data__=i[f],c.delete(p)):n[f]=new Jo(t,i[f]);for(f=0;f<s;++f)(u=e[f])&&c.get(l[f])===u&&(o[f]=u)}function bb(t){return t.__data__}function em(t,e){if(!arguments.length)return Array.from(this,bb);var n=e?yb:xb,r=this._parents,o=this._groups;typeof t!="function"&&(t=tm(t));for(var i=o.length,a=new Array(i),f=new Array(i),u=new Array(i),c=0;c<i;++c){var s=r[c],d=o[c],l=d.length,p=wb(t.call(s,s&&s.__data__,c,r)),m=p.length,h=f[c]=new Array(m),g=a[c]=new Array(m),b=u[c]=new Array(l);n(s,d,h,g,b,p,e);for(var x=0,M=0,y,w;x<m;++x)if(y=h[x]){for(x>=M&&(M=x+1);!(w=g[M])&&++M<m;);y._next=w||null}}return a=new vt(a,r),a._enter=f,a._exit=u,a}function wb(t){return typeof t=="object"&&"length"in t?t:Array.from(t)}function nm(){return new vt(this._exit||this._groups.map(tf),this._parents)}function rm(t,e,n){var r=this.enter(),o=this,i=this.exit();return typeof t=="function"?(r=t(r),r&&(r=r.selection())):r=r.append(t+""),e!=null&&(o=e(o),o&&(o=o.selection())),n==null?i.remove():n(i),r&&o?r.merge(o).order():o}function om(t){for(var e=t.selection?t.selection():t,n=this._groups,r=e._groups,o=n.length,i=r.length,a=Math.min(o,i),f=new Array(o),u=0;u<a;++u)for(var c=n[u],s=r[u],d=c.length,l=f[u]=new Array(d),p,m=0;m<d;++m)(p=c[m]||s[m])&&(l[m]=p);for(;u<o;++u)f[u]=n[u];return new vt(f,this._parents)}function im(){for(var t=this._groups,e=-1,n=t.length;++e<n;)for(var r=t[e],o=r.length-1,i=r[o],a;--o>=0;)(a=r[o])&&(i&&a.compareDocumentPosition(i)^4&&i.parentNode.insertBefore(a,i),i=a);return this}function am(t){t||(t=vb);function e(d,l){return d&&l?t(d.__data__,l.__data__):!d-!l}for(var n=this._groups,r=n.length,o=new Array(r),i=0;i<r;++i){for(var a=n[i],f=a.length,u=o[i]=new Array(f),c,s=0;s<f;++s)(c=a[s])&&(u[s]=c);u.sort(e)}return new vt(o,this._parents).order()}function vb(t,e){return t<e?-1:t>e?1:t>=e?0:NaN}function fm(){var t=arguments[0];return arguments[0]=this,t.apply(null,arguments),this}function um(){return Array.from(this)}function cm(){for(var t=this._groups,e=0,n=t.length;e<n;++e)for(var r=t[e],o=0,i=r.length;o<i;++o){var a=r[o];if(a)return a}return null}function sm(){let t=0;for(let e of this)++t;return t}function lm(){return!this.node()}function dm(t){for(var e=this._groups,n=0,r=e.length;n<r;++n)for(var o=e[n],i=0,a=o.length,f;i<a;++i)(f=o[i])&&t.call(f,f.__data__,i,o);return this}function Mb(t){return function(){this.removeAttribute(t)}}function Sb(t){return function(){this.removeAttributeNS(t.space,t.local)}}function Tb(t,e){return function(){this.setAttribute(t,e)}}function _b(t,e){return function(){this.setAttributeNS(t.space,t.local,e)}}function Cb(t,e){return function(){var n=e.apply(this,arguments);n==null?this.removeAttribute(t):this.setAttribute(t,n)}}function Ab(t,e){return function(){var n=e.apply(this,arguments);n==null?this.removeAttributeNS(t.space,t.local):this.setAttributeNS(t.space,t.local,n)}}function pm(t,e){var n=ln(t);if(arguments.length<2){var r=this.node();return n.local?r.getAttributeNS(n.space,n.local):r.getAttribute(n)}return this.each((e==null?n.local?Sb:Mb:typeof e=="function"?n.local?Ab:Cb:n.local?_b:Tb)(n,e))}function ef(t){return t.ownerDocument&&t.ownerDocument.defaultView||t.document&&t||t.defaultView}function $b(t){return function(){this.style.removeProperty(t)}}function Ib(t,e,n){return function(){this.style.setProperty(t,e,n)}}function Eb(t,e,n){return function(){var r=e.apply(this,arguments);r==null?this.style.removeProperty(t):this.style.setProperty(t,r,n)}}function mm(t,e,n){return arguments.length>1?this.each((e==null?$b:typeof e=="function"?Eb:Ib)(t,e,n??"")):$n(this.node(),t)}function $n(t,e){return t.style.getPropertyValue(e)||ef(t).getComputedStyle(t,null).getPropertyValue(e)}function kb(t){return function(){delete this[t]}}function Nb(t,e){return function(){this[t]=e}}function Db(t,e){return function(){var n=e.apply(this,arguments);n==null?delete this[t]:this[t]=n}}function hm(t,e){return arguments.length>1?this.each((e==null?kb:typeof e=="function"?Db:Nb)(t,e)):this.node()[t]}function gm(t){return t.trim().split(/^|\s+/)}function ws(t){return t.classList||new xm(t)}function xm(t){this._node=t,this._names=gm(t.getAttribute("class")||"")}xm.prototype={add:function(t){var e=this._names.indexOf(t);e<0&&(this._names.push(t),this._node.setAttribute("class",this._names.join(" ")))},remove:function(t){var e=this._names.indexOf(t);e>=0&&(this._names.splice(e,1),this._node.setAttribute("class",this._names.join(" ")))},contains:function(t){return this._names.indexOf(t)>=0}};function ym(t,e){for(var n=ws(t),r=-1,o=e.length;++r<o;)n.add(e[r])}function bm(t,e){for(var n=ws(t),r=-1,o=e.length;++r<o;)n.remove(e[r])}function Rb(t){return function(){ym(this,t)}}function Pb(t){return function(){bm(this,t)}}function Lb(t,e){return function(){(e.apply(this,arguments)?ym:bm)(this,t)}}function wm(t,e){var n=gm(t+"");if(arguments.length<2){for(var r=ws(this.node()),o=-1,i=n.length;++o<i;)if(!r.contains(n[o]))return!1;return!0}return this.each((typeof e=="function"?Lb:e?Rb:Pb)(n,e))}function Ob(){this.textContent=""}function Fb(t){return function(){this.textContent=t}}function qb(t){return function(){var e=t.apply(this,arguments);this.textContent=e??""}}function vm(t){return arguments.length?this.each(t==null?Ob:(typeof t=="function"?qb:Fb)(t)):this.node().textContent}function zb(){this.innerHTML=""}function Yb(t){return function(){this.innerHTML=t}}function Bb(t){return function(){var e=t.apply(this,arguments);this.innerHTML=e??""}}function Mm(t){return arguments.length?this.each(t==null?zb:(typeof t=="function"?Bb:Yb)(t)):this.node().innerHTML}function Ub(){this.nextSibling&&this.parentNode.appendChild(this)}function Sm(){return this.each(Ub)}function Xb(){this.previousSibling&&this.parentNode.insertBefore(this,this.parentNode.firstChild)}function Tm(){return this.each(Xb)}function _m(t){var e=typeof t=="function"?t:dn(t);return this.select(function(){return this.appendChild(e.apply(this,arguments))})}function Wb(){return null}function Cm(t,e){var n=typeof t=="function"?t:dn(t),r=e==null?Wb:typeof e=="function"?e:nr(e);return this.select(function(){return this.insertBefore(n.apply(this,arguments),r.apply(this,arguments)||null)})}function Gb(){var t=this.parentNode;t&&t.removeChild(this)}function Am(){return this.each(Gb)}function Hb(){var t=this.cloneNode(!1),e=this.parentNode;return e?e.insertBefore(t,this.nextSibling):t}function Vb(){var t=this.cloneNode(!0),e=this.parentNode;return e?e.insertBefore(t,this.nextSibling):t}function $m(t){return this.select(t?Vb:Hb)}function Im(t){return arguments.length?this.property("__data__",t):this.node().__data__}function jb(t){return function(e){t.call(this,e,this.__data__)}}function Zb(t){return t.trim().split(/^|\s+/).map(function(e){var n="",r=e.indexOf(".");return r>=0&&(n=e.slice(r+1),e=e.slice(0,r)),{type:e,name:n}})}function Kb(t){return function(){var e=this.__on;if(e){for(var n=0,r=-1,o=e.length,i;n<o;++n)i=e[n],(!t.type||i.type===t.type)&&i.name===t.name?this.removeEventListener(i.type,i.listener,i.options):e[++r]=i;++r?e.length=r:delete this.__on}}}function Qb(t,e,n){return function(){var r=this.__on,o,i=jb(e);if(r){for(var a=0,f=r.length;a<f;++a)if((o=r[a]).type===t.type&&o.name===t.name){this.removeEventListener(o.type,o.listener,o.options),this.addEventListener(o.type,o.listener=i,o.options=n),o.value=e;return}}this.addEventListener(t.type,i,n),o={type:t.type,name:t.name,value:e,listener:i,options:n},r?r.push(o):this.__on=[o]}}function Em(t,e,n){var r=Zb(t+""),o,i=r.length,a;if(arguments.length<2){var f=this.node().__on;if(f){for(var u=0,c=f.length,s;u<c;++u)for(o=0,s=f[u];o<i;++o)if((a=r[o]).type===s.type&&a.name===s.name)return s.value}return}for(f=e?Qb:Kb,o=0;o<i;++o)this.each(f(r[o],e,n));return this}function km(t,e,n){var r=ef(t),o=r.CustomEvent;typeof o=="function"?o=new o(e,n):(o=r.document.createEvent("Event"),n?(o.initEvent(e,n.bubbles,n.cancelable),o.detail=n.detail):o.initEvent(e,!1,!1)),t.dispatchEvent(o)}function Jb(t,e){return function(){return km(this,t,e)}}function t2(t,e){return function(){return km(this,t,e.apply(this,arguments))}}function Nm(t,e){return this.each((typeof e=="function"?t2:Jb)(t,e))}function*Dm(){for(var t=this._groups,e=0,n=t.length;e<n;++e)for(var r=t[e],o=0,i=r.length,a;o<i;++o)(a=r[o])&&(yield a)}var vs=[null];function vt(t,e){this._groups=t,this._parents=e}function Rm(){return new vt([[document.documentElement]],vs)}function e2(){return this}vt.prototype=Rm.prototype={constructor:vt,select:Vp,selectAll:jp,selectChild:Zp,selectChildren:Kp,filter:Qp,data:em,enter:Jp,exit:nm,join:rm,merge:om,selection:e2,order:im,sort:am,call:fm,nodes:um,node:cm,size:sm,empty:lm,each:dm,attr:pm,style:mm,property:hm,classed:wm,text:vm,html:Mm,raise:Sm,lower:Tm,append:_m,insert:Cm,remove:Am,clone:$m,datum:Im,on:Em,dispatch:Nm,[Symbol.iterator]:Dm};var pn=Rm;function mn(t){return typeof t=="string"?new vt([[document.querySelector(t)]],[document.documentElement]):new vt([[t]],vs)}function Pm(t){let e;for(;e=t.sourceEvent;)t=e;return t}function Ms(t,e){if(t=Pm(t),e===void 0&&(e=t.currentTarget),e){var n=e.ownerSVGElement||e;if(n.createSVGPoint){var r=n.createSVGPoint();return r.x=t.clientX,r.y=t.clientY,r=r.matrixTransform(e.getScreenCTM().inverse()),[r.x,r.y]}if(e.getBoundingClientRect){var o=e.getBoundingClientRect();return[t.clientX-o.left-e.clientLeft,t.clientY-o.top-e.clientTop]}}return[t.pageX,t.pageY]}function hn(t,e,n){t.prototype=e.prototype=n,n.constructor=t}function In(t,e){var n=Object.create(t.prototype);for(var r in e)n[r]=e[r];return n}function Ue(){}var En=.7,ir=1/En,qr="\\s*([+-]?\\d+)\\s*",ti="\\s*([+-]?(?:\\d*\\.)?\\d+(?:[eE][+-]?\\d+)?)\\s*",Be="\\s*([+-]?(?:\\d*\\.)?\\d+(?:[eE][+-]?\\d+)?)%\\s*",n2=/^#([0-9a-f]{3,8})$/,r2=new RegExp(`^rgb\\(${qr},${qr},${qr}\\)$`),o2=new RegExp(`^rgb\\(${Be},${Be},${Be}\\)$`),i2=new RegExp(`^rgba\\(${qr},${qr},${qr},${ti}\\)$`),a2=new RegExp(`^rgba\\(${Be},${Be},${Be},${ti}\\)$`),f2=new RegExp(`^hsl\\(${ti},${Be},${Be}\\)$`),u2=new RegExp(`^hsla\\(${ti},${Be},${Be},${ti}\\)$`),Lm={aliceblue:15792383,antiquewhite:16444375,aqua:65535,aquamarine:8388564,azure:15794175,beige:16119260,bisque:16770244,black:0,blanchedalmond:16772045,blue:255,blueviolet:9055202,brown:10824234,burlywood:14596231,cadetblue:6266528,chartreuse:8388352,chocolate:13789470,coral:16744272,cornflowerblue:6591981,cornsilk:16775388,crimson:14423100,cyan:65535,darkblue:139,darkcyan:35723,darkgoldenrod:12092939,darkgray:11119017,darkgreen:25600,darkgrey:11119017,darkkhaki:12433259,darkmagenta:9109643,darkolivegreen:5597999,darkorange:16747520,darkorchid:10040012,darkred:9109504,darksalmon:15308410,darkseagreen:9419919,darkslateblue:4734347,darkslategray:3100495,darkslategrey:3100495,darkturquoise:52945,darkviolet:9699539,deeppink:16716947,deepskyblue:49151,dimgray:6908265,dimgrey:6908265,dodgerblue:2003199,firebrick:11674146,floralwhite:16775920,forestgreen:2263842,fuchsia:16711935,gainsboro:14474460,ghostwhite:16316671,gold:16766720,goldenrod:14329120,gray:8421504,green:32768,greenyellow:11403055,grey:8421504,honeydew:15794160,hotpink:16738740,indianred:13458524,indigo:4915330,ivory:16777200,khaki:15787660,lavender:15132410,lavenderblush:16773365,lawngreen:8190976,lemonchiffon:16775885,lightblue:11393254,lightcoral:15761536,lightcyan:14745599,lightgoldenrodyellow:16448210,lightgray:13882323,lightgreen:9498256,lightgrey:13882323,lightpink:16758465,lightsalmon:16752762,lightseagreen:2142890,lightskyblue:8900346,lightslategray:7833753,lightslategrey:7833753,lightsteelblue:11584734,lightyellow:16777184,lime:65280,limegreen:3329330,linen:16445670,magenta:16711935,maroon:8388608,mediumaquamarine:6737322,mediumblue:205,mediumorchid:12211667,mediumpurple:9662683,mediumseagreen:3978097,mediumslateblue:8087790,mediumspringgreen:64154,mediumturquoise:4772300,mediumvioletred:13047173,midnightblue:1644912,mintcream:16121850,mistyrose:16770273,moccasin:16770229,navajowhite:16768685,navy:128,oldlace:16643558,olive:8421376,olivedrab:7048739,orange:16753920,orangered:16729344,orchid:14315734,palegoldenrod:15657130,palegreen:10025880,paleturquoise:11529966,palevioletred:14381203,papayawhip:16773077,peachpuff:16767673,peru:13468991,pink:16761035,plum:14524637,powderblue:11591910,purple:8388736,rebeccapurple:6697881,red:16711680,rosybrown:12357519,royalblue:4286945,saddlebrown:9127187,salmon:16416882,sandybrown:16032864,seagreen:3050327,seashell:16774638,sienna:10506797,silver:12632256,skyblue:8900331,slateblue:6970061,slategray:7372944,slategrey:7372944,snow:16775930,springgreen:65407,steelblue:4620980,tan:13808780,teal:32896,thistle:14204888,tomato:16737095,turquoise:4251856,violet:15631086,wheat:16113331,white:16777215,whitesmoke:16119285,yellow:16776960,yellowgreen:10145074};hn(Ue,ue,{copy(t){return Object.assign(new this.constructor,this,t)},displayable(){return this.rgb().displayable()},hex:Om,formatHex:Om,formatHex8:c2,formatHsl:s2,formatRgb:Fm,toString:Fm});function Om(){return this.rgb().formatHex()}function c2(){return this.rgb().formatHex8()}function s2(){return Xm(this).formatHsl()}function Fm(){return this.rgb().formatRgb()}function ue(t){var e,n;return t=(t+"").trim().toLowerCase(),(e=n2.exec(t))?(n=e[1].length,e=parseInt(e[1],16),n===6?qm(e):n===3?new Tt(e>>8&15|e>>4&240,e>>4&15|e&240,(e&15)<<4|e&15,1):n===8?nf(e>>24&255,e>>16&255,e>>8&255,(e&255)/255):n===4?nf(e>>12&15|e>>8&240,e>>8&15|e>>4&240,e>>4&15|e&240,((e&15)<<4|e&15)/255):null):(e=r2.exec(t))?new Tt(e[1],e[2],e[3],1):(e=o2.exec(t))?new Tt(e[1]*255/100,e[2]*255/100,e[3]*255/100,1):(e=i2.exec(t))?nf(e[1],e[2],e[3],e[4]):(e=a2.exec(t))?nf(e[1]*255/100,e[2]*255/100,e[3]*255/100,e[4]):(e=f2.exec(t))?Bm(e[1],e[2]/100,e[3]/100,1):(e=u2.exec(t))?Bm(e[1],e[2]/100,e[3]/100,e[4]):Lm.hasOwnProperty(t)?qm(Lm[t]):t==="transparent"?new Tt(NaN,NaN,NaN,0):null}function qm(t){return new Tt(t>>16&255,t>>8&255,t&255,1)}function nf(t,e,n,r){return r<=0&&(t=e=n=NaN),new Tt(t,e,n,r)}function ei(t){return t instanceof Ue||(t=ue(t)),t?(t=t.rgb(),new Tt(t.r,t.g,t.b,t.opacity)):new Tt}function be(t,e,n,r){return arguments.length===1?ei(t):new Tt(t,e,n,r??1)}function Tt(t,e,n,r){this.r=+t,this.g=+e,this.b=+n,this.opacity=+r}hn(Tt,be,In(Ue,{brighter(t){return t=t==null?ir:Math.pow(ir,t),new Tt(this.r*t,this.g*t,this.b*t,this.opacity)},darker(t){return t=t==null?En:Math.pow(En,t),new Tt(this.r*t,this.g*t,this.b*t,this.opacity)},rgb(){return this},clamp(){return new Tt(or(this.r),or(this.g),or(this.b),of(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:zm,formatHex:zm,formatHex8:l2,formatRgb:Ym,toString:Ym}));function zm(){return`#${rr(this.r)}${rr(this.g)}${rr(this.b)}`}function l2(){return`#${rr(this.r)}${rr(this.g)}${rr(this.b)}${rr((isNaN(this.opacity)?1:this.opacity)*255)}`}function Ym(){let t=of(this.opacity);return`${t===1?"rgb(":"rgba("}${or(this.r)}, ${or(this.g)}, ${or(this.b)}${t===1?")":`, ${t})`}`}function of(t){return isNaN(t)?1:Math.max(0,Math.min(1,t))}function or(t){return Math.max(0,Math.min(255,Math.round(t)||0))}function rr(t){return t=or(t),(t<16?"0":"")+t.toString(16)}function Bm(t,e,n,r){return r<=0?t=e=n=NaN:n<=0||n>=1?t=e=NaN:e<=0&&(t=NaN),new Ie(t,e,n,r)}function Xm(t){if(t instanceof Ie)return new Ie(t.h,t.s,t.l,t.opacity);if(t instanceof Ue||(t=ue(t)),!t)return new Ie;if(t instanceof Ie)return t;t=t.rgb();var e=t.r/255,n=t.g/255,r=t.b/255,o=Math.min(e,n,r),i=Math.max(e,n,r),a=NaN,f=i-o,u=(i+o)/2;return f?(e===i?a=(n-r)/f+(n<r)*6:n===i?a=(r-e)/f+2:a=(e-n)/f+4,f/=u<.5?i+o:2-i-o,a*=60):f=u>0&&u<1?0:a,new Ie(a,f,u,t.opacity)}function ni(t,e,n,r){return arguments.length===1?Xm(t):new Ie(t,e,n,r??1)}function Ie(t,e,n,r){this.h=+t,this.s=+e,this.l=+n,this.opacity=+r}hn(Ie,ni,In(Ue,{brighter(t){return t=t==null?ir:Math.pow(ir,t),new Ie(this.h,this.s,this.l*t,this.opacity)},darker(t){return t=t==null?En:Math.pow(En,t),new Ie(this.h,this.s,this.l*t,this.opacity)},rgb(){var t=this.h%360+(this.h<0)*360,e=isNaN(t)||isNaN(this.s)?0:this.s,n=this.l,r=n+(n<.5?n:1-n)*e,o=2*n-r;return new Tt(Ss(t>=240?t-240:t+120,o,r),Ss(t,o,r),Ss(t<120?t+240:t-120,o,r),this.opacity)},clamp(){return new Ie(Um(this.h),rf(this.s),rf(this.l),of(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=of(this.opacity);return`${t===1?"hsl(":"hsla("}${Um(this.h)}, ${rf(this.s)*100}%, ${rf(this.l)*100}%${t===1?")":`, ${t})`}`}}));function Um(t){return t=(t||0)%360,t<0?t+360:t}function rf(t){return Math.max(0,Math.min(1,t||0))}function Ss(t,e,n){return(t<60?e+(n-e)*t/60:t<180?n:t<240?e+(n-e)*(240-t)/60:e)*255}var af=Math.PI/180,ff=180/Math.PI;var uf=18,Wm=.96422,Gm=1,Hm=.82521,Vm=4/29,zr=6/29,jm=3*zr*zr,d2=zr*zr*zr;function Zm(t){if(t instanceof Xe)return new Xe(t.l,t.a,t.b,t.opacity);if(t instanceof gn)return Km(t);t instanceof Tt||(t=ei(t));var e=As(t.r),n=As(t.g),r=As(t.b),o=Ts((.2225045*e+.7168786*n+.0606169*r)/Gm),i,a;return e===n&&n===r?i=a=o:(i=Ts((.4360747*e+.3850649*n+.1430804*r)/Wm),a=Ts((.0139322*e+.0971045*n+.7141733*r)/Hm)),new Xe(116*o-16,500*(i-o),200*(o-a),t.opacity)}function Yr(t,e,n,r){return arguments.length===1?Zm(t):new Xe(t,e,n,r??1)}function Xe(t,e,n,r){this.l=+t,this.a=+e,this.b=+n,this.opacity=+r}hn(Xe,Yr,In(Ue,{brighter(t){return new Xe(this.l+uf*(t??1),this.a,this.b,this.opacity)},darker(t){return new Xe(this.l-uf*(t??1),this.a,this.b,this.opacity)},rgb(){var t=(this.l+16)/116,e=isNaN(this.a)?t:t+this.a/500,n=isNaN(this.b)?t:t-this.b/200;return e=Wm*_s(e),t=Gm*_s(t),n=Hm*_s(n),new Tt(Cs(3.1338561*e-1.6168667*t-.4906146*n),Cs(-.9787684*e+1.9161415*t+.033454*n),Cs(.0719453*e-.2289914*t+1.4052427*n),this.opacity)}}));function Ts(t){return t>d2?Math.pow(t,1/3):t/jm+Vm}function _s(t){return t>zr?t*t*t:jm*(t-Vm)}function Cs(t){return 255*(t<=.0031308?12.92*t:1.055*Math.pow(t,1/2.4)-.055)}function As(t){return(t/=255)<=.04045?t/12.92:Math.pow((t+.055)/1.055,2.4)}function p2(t){if(t instanceof gn)return new gn(t.h,t.c,t.l,t.opacity);if(t instanceof Xe||(t=Zm(t)),t.a===0&&t.b===0)return new gn(NaN,0<t.l&&t.l<100?0:NaN,t.l,t.opacity);var e=Math.atan2(t.b,t.a)*ff;return new gn(e<0?e+360:e,Math.sqrt(t.a*t.a+t.b*t.b),t.l,t.opacity)}function ri(t,e,n,r){return arguments.length===1?p2(t):new gn(t,e,n,r??1)}function gn(t,e,n,r){this.h=+t,this.c=+e,this.l=+n,this.opacity=+r}function Km(t){if(isNaN(t.h))return new Xe(t.l,0,0,t.opacity);var e=t.h*af;return new Xe(t.l,Math.cos(e)*t.c,Math.sin(e)*t.c,t.opacity)}hn(gn,ri,In(Ue,{brighter(t){return new gn(this.h,this.c,this.l+uf*(t??1),this.opacity)},darker(t){return new gn(this.h,this.c,this.l-uf*(t??1),this.opacity)},rgb(){return Km(this).rgb()}}));var eh=-.14861,$s=1.78277,Is=-.29227,cf=-.90649,oi=1.97294,Qm=oi*cf,Jm=oi*$s,th=$s*Is-cf*eh;function m2(t){if(t instanceof ar)return new ar(t.h,t.s,t.l,t.opacity);t instanceof Tt||(t=ei(t));var e=t.r/255,n=t.g/255,r=t.b/255,o=(th*r+Qm*e-Jm*n)/(th+Qm-Jm),i=r-o,a=(oi*(n-o)-Is*i)/cf,f=Math.sqrt(a*a+i*i)/(oi*o*(1-o)),u=f?Math.atan2(a,i)*ff-120:NaN;return new ar(u<0?u+360:u,f,o,t.opacity)}function te(t,e,n,r){return arguments.length===1?m2(t):new ar(t,e,n,r??1)}function ar(t,e,n,r){this.h=+t,this.s=+e,this.l=+n,this.opacity=+r}hn(ar,te,In(Ue,{brighter(t){return t=t==null?ir:Math.pow(ir,t),new ar(this.h,this.s,this.l*t,this.opacity)},darker(t){return t=t==null?En:Math.pow(En,t),new ar(this.h,this.s,this.l*t,this.opacity)},rgb(){var t=isNaN(this.h)?0:(this.h+120)*af,e=+this.l,n=isNaN(this.s)?0:this.s*e*(1-e),r=Math.cos(t),o=Math.sin(t);return new Tt(255*(e+n*(eh*r+$s*o)),255*(e+n*(Is*r+cf*o)),255*(e+n*(oi*r)),this.opacity)}}));function Es(t,e,n,r,o){var i=t*t,a=i*t;return((1-3*t+3*i-a)*e+(4-6*i+3*a)*n+(1+3*t+3*i-3*a)*r+a*o)/6}function nh(t){var e=t.length-1;return function(n){var r=n<=0?n=0:n>=1?(n=1,e-1):Math.floor(n*e),o=t[r],i=t[r+1],a=r>0?t[r-1]:2*o-i,f=r<e-1?t[r+2]:2*i-o;return Es((n-r/e)*e,a,o,i,f)}}function rh(t){var e=t.length;return function(n){var r=Math.floor(((n%=1)<0?++n:n)*e),o=t[(r+e-1)%e],i=t[r%e],a=t[(r+1)%e],f=t[(r+2)%e];return Es((n-r/e)*e,o,i,a,f)}}var Br=t=>()=>t;function oh(t,e){return function(n){return t+n*e}}function h2(t,e,n){return t=Math.pow(t,n),e=Math.pow(e,n)-t,n=1/n,function(r){return Math.pow(t+r*e,n)}}function Ur(t,e){var n=e-t;return n?oh(t,n>180||n<-180?n-360*Math.round(n/360):n):Br(isNaN(t)?e:t)}function ih(t){return(t=+t)==1?xt:function(e,n){return n-e?h2(e,n,t):Br(isNaN(e)?n:e)}}function xt(t,e){var n=e-t;return n?oh(t,n):Br(isNaN(t)?e:t)}var we=function t(e){var n=ih(e);function r(o,i){var a=n((o=be(o)).r,(i=be(i)).r),f=n(o.g,i.g),u=n(o.b,i.b),c=xt(o.opacity,i.opacity);return function(s){return o.r=a(s),o.g=f(s),o.b=u(s),o.opacity=c(s),o+""}}return r.gamma=t,r}(1);function ah(t){return function(e){var n=e.length,r=new Array(n),o=new Array(n),i=new Array(n),a,f;for(a=0;a<n;++a)f=be(e[a]),r[a]=f.r||0,o[a]=f.g||0,i[a]=f.b||0;return r=t(r),o=t(o),i=t(i),f.opacity=1,function(u){return f.r=r(u),f.g=o(u),f.b=i(u),f+""}}}var ks=ah(nh),g2=ah(rh);function fh(t,e){e||(e=[]);var n=t?Math.min(e.length,t.length):0,r=e.slice(),o;return function(i){for(o=0;o<n;++o)r[o]=t[o]*(1-i)+e[o]*i;return r}}function uh(t){return ArrayBuffer.isView(t)&&!(t instanceof DataView)}function ch(t,e){var n=e?e.length:0,r=t?Math.min(n,t.length):0,o=new Array(r),i=new Array(n),a;for(a=0;a<r;++a)o[a]=Ee(t[a],e[a]);for(;a<n;++a)i[a]=e[a];return function(f){for(a=0;a<r;++a)i[a]=o[a](f);return i}}function sh(t,e){var n=new Date;return t=+t,e=+e,function(r){return n.setTime(t*(1-r)+e*r),n}}function ht(t,e){return t=+t,e=+e,function(n){return t*(1-n)+e*n}}function lh(t,e){var n={},r={},o;(t===null||typeof t!="object")&&(t={}),(e===null||typeof e!="object")&&(e={});for(o in e)o in t?n[o]=Ee(t[o],e[o]):r[o]=e[o];return function(i){for(o in n)r[o]=n[o](i);return r}}var Ds=/[-+]?(?:\d+\.?\d*|\.?\d+)(?:[eE][-+]?\d+)?/g,Ns=new RegExp(Ds.source,"g");function x2(t){return function(){return t}}function y2(t){return function(e){return t(e)+""}}function ii(t,e){var n=Ds.lastIndex=Ns.lastIndex=0,r,o,i,a=-1,f=[],u=[];for(t=t+"",e=e+"";(r=Ds.exec(t))&&(o=Ns.exec(e));)(i=o.index)>n&&(i=e.slice(n,i),f[a]?f[a]+=i:f[++a]=i),(r=r[0])===(o=o[0])?f[a]?f[a]+=o:f[++a]=o:(f[++a]=null,u.push({i:a,x:ht(r,o)})),n=Ns.lastIndex;return n<e.length&&(i=e.slice(n),f[a]?f[a]+=i:f[++a]=i),f.length<2?u[0]?y2(u[0].x):x2(e):(e=u.length,function(c){for(var s=0,d;s<e;++s)f[(d=u[s]).i]=d.x(c);return f.join("")})}function Ee(t,e){var n=typeof e,r;return e==null||n==="boolean"?Br(e):(n==="number"?ht:n==="string"?(r=ue(e))?(e=r,we):ii:e instanceof ue?we:e instanceof Date?sh:uh(e)?fh:Array.isArray(e)?ch:typeof e.valueOf!="function"&&typeof e.toString!="function"||isNaN(e)?lh:ht)(t,e)}function fr(t,e){return t=+t,e=+e,function(n){return Math.round(t*(1-n)+e*n)}}var dh=180/Math.PI,sf={translateX:0,translateY:0,rotate:0,skewX:0,scaleX:1,scaleY:1};function Rs(t,e,n,r,o,i){var a,f,u;return(a=Math.sqrt(t*t+e*e))&&(t/=a,e/=a),(u=t*n+e*r)&&(n-=t*u,r-=e*u),(f=Math.sqrt(n*n+r*r))&&(n/=f,r/=f,u/=f),t*r<e*n&&(t=-t,e=-e,u=-u,a=-a),{translateX:o,translateY:i,rotate:Math.atan2(e,t)*dh,skewX:Math.atan(u)*dh,scaleX:a,scaleY:f}}var lf;function ph(t){let e=new(typeof DOMMatrix=="function"?DOMMatrix:WebKitCSSMatrix)(t+"");return e.isIdentity?sf:Rs(e.a,e.b,e.c,e.d,e.e,e.f)}function mh(t){return t==null?sf:(lf||(lf=document.createElementNS("http://www.w3.org/2000/svg","g")),lf.setAttribute("transform",t),(t=lf.transform.baseVal.consolidate())?(t=t.matrix,Rs(t.a,t.b,t.c,t.d,t.e,t.f)):sf)}function hh(t,e,n,r){function o(c){return c.length?c.pop()+" ":""}function i(c,s,d,l,p,m){if(c!==d||s!==l){var h=p.push("translate(",null,e,null,n);m.push({i:h-4,x:ht(c,d)},{i:h-2,x:ht(s,l)})}else(d||l)&&p.push("translate("+d+e+l+n)}function a(c,s,d,l){c!==s?(c-s>180?s+=360:s-c>180&&(c+=360),l.push({i:d.push(o(d)+"rotate(",null,r)-2,x:ht(c,s)})):s&&d.push(o(d)+"rotate("+s+r)}function f(c,s,d,l){c!==s?l.push({i:d.push(o(d)+"skewX(",null,r)-2,x:ht(c,s)}):s&&d.push(o(d)+"skewX("+s+r)}function u(c,s,d,l,p,m){if(c!==d||s!==l){var h=p.push(o(p)+"scale(",null,",",null,")");m.push({i:h-4,x:ht(c,d)},{i:h-2,x:ht(s,l)})}else(d!==1||l!==1)&&p.push(o(p)+"scale("+d+","+l+")")}return function(c,s){var d=[],l=[];return c=t(c),s=t(s),i(c.translateX,c.translateY,s.translateX,s.translateY,d,l),a(c.rotate,s.rotate,d,l),f(c.skewX,s.skewX,d,l),u(c.scaleX,c.scaleY,s.scaleX,s.scaleY,d,l),c=s=null,function(p){for(var m=-1,h=l.length,g;++m<h;)d[(g=l[m]).i]=g.x(p);return d.join("")}}}var Ps=hh(ph,"px, ","px)","deg)"),Ls=hh(mh,", ",")",")");function gh(t){return function(e,n){var r=t((e=ni(e)).h,(n=ni(n)).h),o=xt(e.s,n.s),i=xt(e.l,n.l),a=xt(e.opacity,n.opacity);return function(f){return e.h=r(f),e.s=o(f),e.l=i(f),e.opacity=a(f),e+""}}}var Os=gh(Ur),b2=gh(xt);function df(t,e){var n=xt((t=Yr(t)).l,(e=Yr(e)).l),r=xt(t.a,e.a),o=xt(t.b,e.b),i=xt(t.opacity,e.opacity);return function(a){return t.l=n(a),t.a=r(a),t.b=o(a),t.opacity=i(a),t+""}}function xh(t){return function(e,n){var r=t((e=ri(e)).h,(n=ri(n)).h),o=xt(e.c,n.c),i=xt(e.l,n.l),a=xt(e.opacity,n.opacity);return function(f){return e.h=r(f),e.c=o(f),e.l=i(f),e.opacity=a(f),e+""}}}var Fs=xh(Ur),w2=xh(xt);function yh(t){return function e(n){n=+n;function r(o,i){var a=t((o=te(o)).h,(i=te(i)).h),f=xt(o.s,i.s),u=xt(o.l,i.l),c=xt(o.opacity,i.opacity);return function(s){return o.h=a(s),o.s=f(s),o.l=u(Math.pow(s,n)),o.opacity=c(s),o+""}}return r.gamma=e,r}(1)}var v2=yh(Ur),Xr=yh(xt);function We(t,e){e===void 0&&(e=t,t=Ee);for(var n=0,r=e.length-1,o=e[0],i=new Array(r<0?0:r);n<r;)i[n]=t(o,o=e[++n]);return function(a){var f=Math.max(0,Math.min(r-1,Math.floor(a*=r)));return i[f](a-f)}}function Gt(t,e){for(var n=new Array(e),r=0;r<e;++r)n[r]=t(r/(e-1));return n}var Wr=0,fi=0,ai=0,wh=1e3,pf,ui,mf=0,ur=0,hf=0,ci=typeof performance=="object"&&performance.now?performance:Date,vh=typeof window=="object"&&window.requestAnimationFrame?window.requestAnimationFrame.bind(window):function(t){setTimeout(t,17)};function li(){return ur||(vh(M2),ur=ci.now()+hf)}function M2(){ur=0}function si(){this._call=this._time=this._next=null}si.prototype=gf.prototype={constructor:si,restart:function(t,e,n){if(typeof t!="function")throw new TypeError("callback is not a function");n=(n==null?li():+n)+(e==null?0:+e),!this._next&&ui!==this&&(ui?ui._next=this:pf=this,ui=this),this._call=t,this._time=n,qs()},stop:function(){this._call&&(this._call=null,this._time=1/0,qs())}};function gf(t,e,n){var r=new si;return r.restart(t,e,n),r}function Mh(){li(),++Wr;for(var t=pf,e;t;)(e=ur-t._time)>=0&&t._call.call(void 0,e),t=t._next;--Wr}function bh(){ur=(mf=ci.now())+hf,Wr=fi=0;try{Mh()}finally{Wr=0,T2(),ur=0}}function S2(){var t=ci.now(),e=t-mf;e>wh&&(hf-=e,mf=t)}function T2(){for(var t,e=pf,n,r=1/0;e;)e._call?(r>e._time&&(r=e._time),t=e,e=e._next):(n=e._next,e._next=null,e=t?t._next=n:pf=n);ui=t,qs(r)}function qs(t){if(!Wr){fi&&(fi=clearTimeout(fi));var e=t-ur;e>24?(t<1/0&&(fi=setTimeout(bh,t-ci.now()-hf)),ai&&(ai=clearInterval(ai))):(ai||(mf=ci.now(),ai=setInterval(S2,wh)),Wr=1,vh(bh))}}function xf(t,e,n){var r=new si;return e=e==null?0:+e,r.restart(o=>{r.stop(),t(o+e)},e,n),r}var _2=ys("start","end","cancel","interrupt"),C2=[],_h=0,Sh=1,bf=2,yf=3,Th=4,wf=5,di=6;function kn(t,e,n,r,o,i){var a=t.__transition;if(!a)t.__transition={};else if(n in a)return;A2(t,n,{name:e,index:r,group:o,on:_2,tween:C2,time:i.time,delay:i.delay,duration:i.duration,ease:i.ease,timer:null,state:_h})}function pi(t,e){var n=At(t,e);if(n.state>_h)throw new Error("too late; already scheduled");return n}function Ft(t,e){var n=At(t,e);if(n.state>yf)throw new Error("too late; already running");return n}function At(t,e){var n=t.__transition;if(!n||!(n=n[e]))throw new Error("transition not found");return n}function A2(t,e,n){var r=t.__transition,o;r[e]=n,n.timer=gf(i,0,n.time);function i(c){n.state=Sh,n.timer.restart(a,n.delay,n.time),n.delay<=c&&a(c-n.delay)}function a(c){var s,d,l,p;if(n.state!==Sh)return u();for(s in r)if(p=r[s],p.name===n.name){if(p.state===yf)return xf(a);p.state===Th?(p.state=di,p.timer.stop(),p.on.call("interrupt",t,t.__data__,p.index,p.group),delete r[s]):+s<e&&(p.state=di,p.timer.stop(),p.on.call("cancel",t,t.__data__,p.index,p.group),delete r[s])}if(xf(function(){n.state===yf&&(n.state=Th,n.timer.restart(f,n.delay,n.time),f(c))}),n.state=bf,n.on.call("start",t,t.__data__,n.index,n.group),n.state===bf){for(n.state=yf,o=new Array(l=n.tween.length),s=0,d=-1;s<l;++s)(p=n.tween[s].value.call(t,t.__data__,n.index,n.group))&&(o[++d]=p);o.length=d+1}}function f(c){for(var s=c<n.duration?n.ease.call(null,c/n.duration):(n.timer.restart(u),n.state=wf,1),d=-1,l=o.length;++d<l;)o[d].call(t,s);n.state===wf&&(n.on.call("end",t,t.__data__,n.index,n.group),u())}function u(){n.state=di,n.timer.stop(),delete r[e];for(var c in r)return;delete t.__transition}}function vf(t,e){var n=t.__transition,r,o,i=!0,a;if(n){e=e==null?null:e+"";for(a in n){if((r=n[a]).name!==e){i=!1;continue}o=r.state>bf&&r.state<wf,r.state=di,r.timer.stop(),r.on.call(o?"interrupt":"cancel",t,t.__data__,r.index,r.group),delete n[a]}i&&delete t.__transition}}function Ch(t){return this.each(function(){vf(this,t)})}function $2(t,e){var n,r;return function(){var o=Ft(this,t),i=o.tween;if(i!==n){r=n=i;for(var a=0,f=r.length;a<f;++a)if(r[a].name===e){r=r.slice(),r.splice(a,1);break}}o.tween=r}}function I2(t,e,n){var r,o;if(typeof n!="function")throw new Error;return function(){var i=Ft(this,t),a=i.tween;if(a!==r){o=(r=a).slice();for(var f={name:e,value:n},u=0,c=o.length;u<c;++u)if(o[u].name===e){o[u]=f;break}u===c&&o.push(f)}i.tween=o}}function Ah(t,e){var n=this._id;if(t+="",arguments.length<2){for(var r=At(this.node(),n).tween,o=0,i=r.length,a;o<i;++o)if((a=r[o]).name===t)return a.value;return null}return this.each((e==null?$2:I2)(n,t,e))}function Gr(t,e,n){var r=t._id;return t.each(function(){var o=Ft(this,r);(o.value||(o.value={}))[e]=n.apply(this,arguments)}),function(o){return At(o,r).value[e]}}function Mf(t,e){var n;return(typeof e=="number"?ht:e instanceof ue?we:(n=ue(e))?(e=n,we):ii)(t,e)}function E2(t){return function(){this.removeAttribute(t)}}function k2(t){return function(){this.removeAttributeNS(t.space,t.local)}}function N2(t,e,n){var r,o=n+"",i;return function(){var a=this.getAttribute(t);return a===o?null:a===r?i:i=e(r=a,n)}}function D2(t,e,n){var r,o=n+"",i;return function(){var a=this.getAttributeNS(t.space,t.local);return a===o?null:a===r?i:i=e(r=a,n)}}function R2(t,e,n){var r,o,i;return function(){var a,f=n(this),u;return f==null?void this.removeAttribute(t):(a=this.getAttribute(t),u=f+"",a===u?null:a===r&&u===o?i:(o=u,i=e(r=a,f)))}}function P2(t,e,n){var r,o,i;return function(){var a,f=n(this),u;return f==null?void this.removeAttributeNS(t.space,t.local):(a=this.getAttributeNS(t.space,t.local),u=f+"",a===u?null:a===r&&u===o?i:(o=u,i=e(r=a,f)))}}function $h(t,e){var n=ln(t),r=n==="transform"?Ls:Mf;return this.attrTween(t,typeof e=="function"?(n.local?P2:R2)(n,r,Gr(this,"attr."+t,e)):e==null?(n.local?k2:E2)(n):(n.local?D2:N2)(n,r,e))}function L2(t,e){return function(n){this.setAttribute(t,e.call(this,n))}}function O2(t,e){return function(n){this.setAttributeNS(t.space,t.local,e.call(this,n))}}function F2(t,e){var n,r;function o(){var i=e.apply(this,arguments);return i!==r&&(n=(r=i)&&O2(t,i)),n}return o._value=e,o}function q2(t,e){var n,r;function o(){var i=e.apply(this,arguments);return i!==r&&(n=(r=i)&&L2(t,i)),n}return o._value=e,o}function Ih(t,e){var n="attr."+t;if(arguments.length<2)return(n=this.tween(n))&&n._value;if(e==null)return this.tween(n,null);if(typeof e!="function")throw new Error;var r=ln(t);return this.tween(n,(r.local?F2:q2)(r,e))}function z2(t,e){return function(){pi(this,t).delay=+e.apply(this,arguments)}}function Y2(t,e){return e=+e,function(){pi(this,t).delay=e}}function Eh(t){var e=this._id;return arguments.length?this.each((typeof t=="function"?z2:Y2)(e,t)):At(this.node(),e).delay}function B2(t,e){return function(){Ft(this,t).duration=+e.apply(this,arguments)}}function U2(t,e){return e=+e,function(){Ft(this,t).duration=e}}function kh(t){var e=this._id;return arguments.length?this.each((typeof t=="function"?B2:U2)(e,t)):At(this.node(),e).duration}function X2(t,e){if(typeof e!="function")throw new Error;return function(){Ft(this,t).ease=e}}function Nh(t){var e=this._id;return arguments.length?this.each(X2(e,t)):At(this.node(),e).ease}function W2(t,e){return function(){var n=e.apply(this,arguments);if(typeof n!="function")throw new Error;Ft(this,t).ease=n}}function Dh(t){if(typeof t!="function")throw new Error;return this.each(W2(this._id,t))}function Rh(t){typeof t!="function"&&(t=Qo(t));for(var e=this._groups,n=e.length,r=new Array(n),o=0;o<n;++o)for(var i=e[o],a=i.length,f=r[o]=[],u,c=0;c<a;++c)(u=i[c])&&t.call(u,u.__data__,c,i)&&f.push(u);return new ee(r,this._parents,this._name,this._id)}function Ph(t){if(t._id!==this._id)throw new Error;for(var e=this._groups,n=t._groups,r=e.length,o=n.length,i=Math.min(r,o),a=new Array(r),f=0;f<i;++f)for(var u=e[f],c=n[f],s=u.length,d=a[f]=new Array(s),l,p=0;p<s;++p)(l=u[p]||c[p])&&(d[p]=l);for(;f<r;++f)a[f]=e[f];return new ee(a,this._parents,this._name,this._id)}function G2(t){return(t+"").trim().split(/^|\s+/).every(function(e){var n=e.indexOf(".");return n>=0&&(e=e.slice(0,n)),!e||e==="start"})}function H2(t,e,n){var r,o,i=G2(e)?pi:Ft;return function(){var a=i(this,t),f=a.on;f!==r&&(o=(r=f).copy()).on(e,n),a.on=o}}function Lh(t,e){var n=this._id;return arguments.length<2?At(this.node(),n).on.on(t):this.each(H2(n,t,e))}function V2(t){return function(){var e=this.parentNode;for(var n in this.__transition)if(+n!==t)return;e&&e.removeChild(this)}}function Oh(){return this.on("end.remove",V2(this._id))}function Fh(t){var e=this._name,n=this._id;typeof t!="function"&&(t=nr(t));for(var r=this._groups,o=r.length,i=new Array(o),a=0;a<o;++a)for(var f=r[a],u=f.length,c=i[a]=new Array(u),s,d,l=0;l<u;++l)(s=f[l])&&(d=t.call(s,s.__data__,l,f))&&("__data__"in s&&(d.__data__=s.__data__),c[l]=d,kn(c[l],e,n,l,c,At(s,n)));return new ee(i,this._parents,e,n)}function qh(t){var e=this._name,n=this._id;typeof t!="function"&&(t=Ko(t));for(var r=this._groups,o=r.length,i=[],a=[],f=0;f<o;++f)for(var u=r[f],c=u.length,s,d=0;d<c;++d)if(s=u[d]){for(var l=t.call(s,s.__data__,d,u),p,m=At(s,n),h=0,g=l.length;h<g;++h)(p=l[h])&&kn(p,e,n,h,l,m);i.push(l),a.push(s)}return new ee(i,a,e,n)}var j2=pn.prototype.constructor;function zh(){return new j2(this._groups,this._parents)}function Z2(t,e){var n,r,o;return function(){var i=$n(this,t),a=(this.style.removeProperty(t),$n(this,t));return i===a?null:i===n&&a===r?o:o=e(n=i,r=a)}}function Yh(t){return function(){this.style.removeProperty(t)}}function K2(t,e,n){var r,o=n+"",i;return function(){var a=$n(this,t);return a===o?null:a===r?i:i=e(r=a,n)}}function Q2(t,e,n){var r,o,i;return function(){var a=$n(this,t),f=n(this),u=f+"";return f==null&&(u=f=(this.style.removeProperty(t),$n(this,t))),a===u?null:a===r&&u===o?i:(o=u,i=e(r=a,f))}}function J2(t,e){var n,r,o,i="style."+e,a="end."+i,f;return function(){var u=Ft(this,t),c=u.on,s=u.value[i]==null?f||(f=Yh(e)):void 0;(c!==n||o!==s)&&(r=(n=c).copy()).on(a,o=s),u.on=r}}function Bh(t,e,n){var r=(t+="")=="transform"?Ps:Mf;return e==null?this.styleTween(t,Z2(t,r)).on("end.style."+t,Yh(t)):typeof e=="function"?this.styleTween(t,Q2(t,r,Gr(this,"style."+t,e))).each(J2(this._id,t)):this.styleTween(t,K2(t,r,e),n).on("end.style."+t,null)}function tw(t,e,n){return function(r){this.style.setProperty(t,e.call(this,r),n)}}function ew(t,e,n){var r,o;function i(){var a=e.apply(this,arguments);return a!==o&&(r=(o=a)&&tw(t,a,n)),r}return i._value=e,i}function Uh(t,e,n){var r="style."+(t+="");if(arguments.length<2)return(r=this.tween(r))&&r._value;if(e==null)return this.tween(r,null);if(typeof e!="function")throw new Error;return this.tween(r,ew(t,e,n??""))}function nw(t){return function(){this.textContent=t}}function rw(t){return function(){var e=t(this);this.textContent=e??""}}function Xh(t){return this.tween("text",typeof t=="function"?rw(Gr(this,"text",t)):nw(t==null?"":t+""))}function ow(t){return function(e){this.textContent=t.call(this,e)}}function iw(t){var e,n;function r(){var o=t.apply(this,arguments);return o!==n&&(e=(n=o)&&ow(o)),e}return r._value=t,r}function Wh(t){var e="text";if(arguments.length<1)return(e=this.tween(e))&&e._value;if(t==null)return this.tween(e,null);if(typeof t!="function")throw new Error;return this.tween(e,iw(t))}function Gh(){for(var t=this._name,e=this._id,n=Sf(),r=this._groups,o=r.length,i=0;i<o;++i)for(var a=r[i],f=a.length,u,c=0;c<f;++c)if(u=a[c]){var s=At(u,e);kn(u,t,n,c,a,{time:s.time+s.delay+s.duration,delay:0,duration:s.duration,ease:s.ease})}return new ee(r,this._parents,t,n)}function Hh(){var t,e,n=this,r=n._id,o=n.size();return new Promise(function(i,a){var f={value:a},u={value:function(){--o===0&&i()}};n.each(function(){var c=Ft(this,r),s=c.on;s!==t&&(e=(t=s).copy(),e._.cancel.push(f),e._.interrupt.push(f),e._.end.push(u)),c.on=e}),o===0&&i()})}var aw=0;function ee(t,e,n,r){this._groups=t,this._parents=e,this._name=n,this._id=r}function Vh(t){return pn().transition(t)}function Sf(){return++aw}var xn=pn.prototype;ee.prototype=Vh.prototype={constructor:ee,select:Fh,selectAll:qh,selectChild:xn.selectChild,selectChildren:xn.selectChildren,filter:Rh,merge:Ph,selection:zh,transition:Gh,call:xn.call,nodes:xn.nodes,node:xn.node,size:xn.size,empty:xn.empty,each:xn.each,on:Lh,attr:$h,attrTween:Ih,style:Bh,styleTween:Uh,text:Xh,textTween:Wh,remove:Oh,tween:Ah,delay:Eh,duration:kh,ease:Nh,easeVarying:Dh,end:Hh,[Symbol.iterator]:xn[Symbol.iterator]};function Tf(t){return((t*=2)<=1?t*t*t:(t-=2)*t*t+2)/2}var fw={time:null,delay:0,duration:250,ease:Tf};function uw(t,e){for(var n;!(n=t.__transition)||!(n=n[e]);)if(!(t=t.parentNode))throw new Error(`transition ${e} not found`);return n}function jh(t){var e,n;t instanceof ee?(e=t._id,t=t._name):(e=Sf(),(n=fw).time=li(),t=t==null?null:t+"");for(var r=this._groups,o=r.length,i=0;i<o;++i)for(var a=r[i],f=a.length,u,c=0;c<f;++c)(u=a[c])&&kn(u,t,e,c,a,n||uw(u,e));return new ee(r,this._parents,t,e)}pn.prototype.interrupt=Ch;pn.prototype.transition=jh;var{abs:DC,max:RC,min:PC}=Math;function Zh(t){return[+t[0],+t[1]]}function cw(t){return[Zh(t[0]),Zh(t[1])]}var LC={name:"x",handles:["w","e"].map(zs),input:function(t,e){return t==null?null:[[+t[0],e[0][1]],[+t[1],e[1][1]]]},output:function(t){return t&&[t[0][0],t[1][0]]}},OC={name:"y",handles:["n","s"].map(zs),input:function(t,e){return t==null?null:[[e[0][0],+t[0]],[e[1][0],+t[1]]]},output:function(t){return t&&[t[0][1],t[1][1]]}},FC={name:"xy",handles:["n","w","e","s","nw","ne","sw","se"].map(zs),input:function(t){return t==null?null:cw(t)},output:function(t){return t}};function zs(t){return{type:t}}var Ys=Math.PI,Bs=2*Ys,cr=1e-6,sw=Bs-cr;function Kh(t){this._+=t[0];for(let e=1,n=t.length;e<n;++e)this._+=arguments[e]+t[e]}function lw(t){let e=Math.floor(t);if(!(e>=0))throw new Error(`invalid digits: ${t}`);if(e>15)return Kh;let n=10**e;return function(r){this._+=r[0];for(let o=1,i=r.length;o<i;++o)this._+=Math.round(arguments[o]*n)/n+r[o]}}var Hr=class{constructor(e){this._x0=this._y0=this._x1=this._y1=null,this._="",this._append=e==null?Kh:lw(e)}moveTo(e,n){this._append`M${this._x0=this._x1=+e},${this._y0=this._y1=+n}`}closePath(){this._x1!==null&&(this._x1=this._x0,this._y1=this._y0,this._append`Z`)}lineTo(e,n){this._append`L${this._x1=+e},${this._y1=+n}`}quadraticCurveTo(e,n,r,o){this._append`Q${+e},${+n},${this._x1=+r},${this._y1=+o}`}bezierCurveTo(e,n,r,o,i,a){this._append`C${+e},${+n},${+r},${+o},${this._x1=+i},${this._y1=+a}`}arcTo(e,n,r,o,i){if(e=+e,n=+n,r=+r,o=+o,i=+i,i<0)throw new Error(`negative radius: ${i}`);let a=this._x1,f=this._y1,u=r-e,c=o-n,s=a-e,d=f-n,l=s*s+d*d;if(this._x1===null)this._append`M${this._x1=e},${this._y1=n}`;else if(l>cr)if(!(Math.abs(d*u-c*s)>cr)||!i)this._append`L${this._x1=e},${this._y1=n}`;else{let p=r-a,m=o-f,h=u*u+c*c,g=p*p+m*m,b=Math.sqrt(h),x=Math.sqrt(l),M=i*Math.tan((Ys-Math.acos((h+l-g)/(2*b*x)))/2),y=M/x,w=M/b;Math.abs(y-1)>cr&&this._append`L${e+y*s},${n+y*d}`,this._append`A${i},${i},0,0,${+(d*p>s*m)},${this._x1=e+w*u},${this._y1=n+w*c}`}}arc(e,n,r,o,i,a){if(e=+e,n=+n,r=+r,a=!!a,r<0)throw new Error(`negative radius: ${r}`);let f=r*Math.cos(o),u=r*Math.sin(o),c=e+f,s=n+u,d=1^a,l=a?o-i:i-o;this._x1===null?this._append`M${c},${s}`:(Math.abs(this._x1-c)>cr||Math.abs(this._y1-s)>cr)&&this._append`L${c},${s}`,r&&(l<0&&(l=l%Bs+Bs),l>sw?this._append`A${r},${r},0,1,${d},${e-f},${n-u}A${r},${r},0,1,${d},${this._x1=c},${this._y1=s}`:l>cr&&this._append`A${r},${r},0,${+(l>=Ys)},${d},${this._x1=e+r*Math.cos(i)},${this._y1=n+r*Math.sin(i)}`)}rect(e,n,r,o){this._append`M${this._x0=this._x1=+e},${this._y0=this._y1=+n}h${r=+r}v${+o}h${-r}Z`}toString(){return this._}};function Qh(){return new Hr}Qh.prototype=Hr.prototype;function Vr(t=3){return new Hr(+t)}function Jh(t){return Math.abs(t=Math.round(t))>=1e21?t.toLocaleString("en").replace(/,/g,""):t.toString(10)}function sr(t,e){if((n=(t=e?t.toExponential(e-1):t.toExponential()).indexOf("e"))<0)return null;var n,r=t.slice(0,n);return[r.length>1?r[0]+r.slice(2):r,+t.slice(n+1)]}function Ge(t){return t=sr(Math.abs(t)),t?t[1]:NaN}function t0(t,e){return function(n,r){for(var o=n.length,i=[],a=0,f=t[0],u=0;o>0&&f>0&&(u+f+1>r&&(f=Math.max(1,r-u)),i.push(n.substring(o-=f,o+f)),!((u+=f+1)>r));)f=t[a=(a+1)%t.length];return i.reverse().join(e)}}function e0(t){return function(e){return e.replace(/[0-9]/g,function(n){return t[+n]})}}var dw=/^(?:(.)?([<>=^]))?([+\-( ])?([$#])?(0)?(\d+)?(,)?(\.\d+)?(~)?([a-z%])?$/i;function He(t){if(!(e=dw.exec(t)))throw new Error("invalid format: "+t);var e;return new _f({fill:e[1],align:e[2],sign:e[3],symbol:e[4],zero:e[5],width:e[6],comma:e[7],precision:e[8]&&e[8].slice(1),trim:e[9],type:e[10]})}He.prototype=_f.prototype;function _f(t){this.fill=t.fill===void 0?" ":t.fill+"",this.align=t.align===void 0?">":t.align+"",this.sign=t.sign===void 0?"-":t.sign+"",this.symbol=t.symbol===void 0?"":t.symbol+"",this.zero=!!t.zero,this.width=t.width===void 0?void 0:+t.width,this.comma=!!t.comma,this.precision=t.precision===void 0?void 0:+t.precision,this.trim=!!t.trim,this.type=t.type===void 0?"":t.type+""}_f.prototype.toString=function(){return this.fill+this.align+this.sign+this.symbol+(this.zero?"0":"")+(this.width===void 0?"":Math.max(1,this.width|0))+(this.comma?",":"")+(this.precision===void 0?"":"."+Math.max(0,this.precision|0))+(this.trim?"~":"")+this.type};function n0(t){t:for(var e=t.length,n=1,r=-1,o;n<e;++n)switch(t[n]){case".":r=o=n;break;case"0":r===0&&(r=n),o=n;break;default:if(!+t[n])break t;r>0&&(r=0);break}return r>0?t.slice(0,r)+t.slice(o+1):t}var Us;function r0(t,e){var n=sr(t,e);if(!n)return t+"";var r=n[0],o=n[1],i=o-(Us=Math.max(-8,Math.min(8,Math.floor(o/3)))*3)+1,a=r.length;return i===a?r:i>a?r+new Array(i-a+1).join("0"):i>0?r.slice(0,i)+"."+r.slice(i):"0."+new Array(1-i).join("0")+sr(t,Math.max(0,e+i-1))[0]}function Xs(t,e){var n=sr(t,e);if(!n)return t+"";var r=n[0],o=n[1];return o<0?"0."+new Array(-o).join("0")+r:r.length>o+1?r.slice(0,o+1)+"."+r.slice(o+1):r+new Array(o-r.length+2).join("0")}var Ws={"%":(t,e)=>(t*100).toFixed(e),b:t=>Math.round(t).toString(2),c:t=>t+"",d:Jh,e:(t,e)=>t.toExponential(e),f:(t,e)=>t.toFixed(e),g:(t,e)=>t.toPrecision(e),o:t=>Math.round(t).toString(8),p:(t,e)=>Xs(t*100,e),r:Xs,s:r0,X:t=>Math.round(t).toString(16).toUpperCase(),x:t=>Math.round(t).toString(16)};function Gs(t){return t}var o0=Array.prototype.map,i0=["y","z","a","f","p","n","\xB5","m","","k","M","G","T","P","E","Z","Y"];function a0(t){var e=t.grouping===void 0||t.thousands===void 0?Gs:t0(o0.call(t.grouping,Number),t.thousands+""),n=t.currency===void 0?"":t.currency[0]+"",r=t.currency===void 0?"":t.currency[1]+"",o=t.decimal===void 0?".":t.decimal+"",i=t.numerals===void 0?Gs:e0(o0.call(t.numerals,String)),a=t.percent===void 0?"%":t.percent+"",f=t.minus===void 0?"\u2212":t.minus+"",u=t.nan===void 0?"NaN":t.nan+"";function c(d){d=He(d);var l=d.fill,p=d.align,m=d.sign,h=d.symbol,g=d.zero,b=d.width,x=d.comma,M=d.precision,y=d.trim,w=d.type;w==="n"?(x=!0,w="g"):Ws[w]||(M===void 0&&(M=12),y=!0,w="g"),(g||l==="0"&&p==="=")&&(g=!0,l="0",p="=");var v=h==="$"?n:h==="#"&&/[boxX]/.test(w)?"0"+w.toLowerCase():"",T=h==="$"?r:/[%p]/.test(w)?a:"",I=Ws[w],E=/[defgprs%]/.test(w);M=M===void 0?6:/[gprs]/.test(w)?Math.max(1,Math.min(21,M)):Math.max(0,Math.min(20,M));function F(_){var R=v,O=T,P,S,A;if(w==="c")O=I(_)+O,_="";else{_=+_;var N=_<0||1/_<0;if(_=isNaN(_)?u:I(Math.abs(_),M),y&&(_=n0(_)),N&&+_==0&&m!=="+"&&(N=!1),R=(N?m==="("?m:f:m==="-"||m==="("?"":m)+R,O=(w==="s"?i0[8+Us/3]:"")+O+(N&&m==="("?")":""),E){for(P=-1,S=_.length;++P<S;)if(A=_.charCodeAt(P),48>A||A>57){O=(A===46?o+_.slice(P+1):_.slice(P))+O,_=_.slice(0,P);break}}}x&&!g&&(_=e(_,1/0));var L=R.length+_.length+O.length,D=L<b?new Array(b-L+1).join(l):"";switch(x&&g&&(_=e(D+_,D.length?b-O.length:1/0),D=""),p){case"<":_=R+_+O+D;break;case"=":_=R+D+_+O;break;case"^":_=D.slice(0,L=D.length>>1)+R+_+O+D.slice(L);break;default:_=D+R+_+O;break}return i(_)}return F.toString=function(){return d+""},F}function s(d,l){var p=c((d=He(d),d.type="f",d)),m=Math.max(-8,Math.min(8,Math.floor(Ge(l)/3)))*3,h=Math.pow(10,-m),g=i0[8+m/3];return function(b){return p(h*b)+g}}return{format:c,formatPrefix:s}}var Cf,Ve,Af;Hs({thousands:",",grouping:[3],currency:["$",""]});function Hs(t){return Cf=a0(t),Ve=Cf.format,Af=Cf.formatPrefix,Cf}function Vs(t){return Math.max(0,-Ge(Math.abs(t)))}function js(t,e){return Math.max(0,Math.max(-8,Math.min(8,Math.floor(Ge(e)/3)))*3-Ge(Math.abs(t)))}function Zs(t,e){return t=Math.abs(t),e=Math.abs(e)-t,Math.max(0,Ge(e)-Ge(t))+1}var U=1e-6,$f=1e-12,V=Math.PI,ft=V/2,Ks=V/4,Dt=V*2,$t=180/V,ut=V/180,K=Math.abs,ve=Math.atan,qt=Math.atan2,B=Math.cos;var If=Math.exp;var lr=Math.log,Ef=Math.pow,Y=Math.sin,Ht=Math.sign||function(t){return t>0?1:t<0?-1:0},mt=Math.sqrt,jr=Math.tan;function kf(t){return t>1?0:t<-1?V:Math.acos(t)}function Mt(t){return t>1?ft:t<-1?-ft:Math.asin(t)}function Rt(){}function Nf(t,e){t&&u0.hasOwnProperty(t.type)&&u0[t.type](t,e)}var f0={Feature:function(t,e){Nf(t.geometry,e)},FeatureCollection:function(t,e){for(var n=t.features,r=-1,o=n.length;++r<o;)Nf(n[r].geometry,e)}},u0={Sphere:function(t,e){e.sphere()},Point:function(t,e){t=t.coordinates,e.point(t[0],t[1],t[2])},MultiPoint:function(t,e){for(var n=t.coordinates,r=-1,o=n.length;++r<o;)t=n[r],e.point(t[0],t[1],t[2])},LineString:function(t,e){Qs(t.coordinates,e,0)},MultiLineString:function(t,e){for(var n=t.coordinates,r=-1,o=n.length;++r<o;)Qs(n[r],e,0)},Polygon:function(t,e){c0(t.coordinates,e)},MultiPolygon:function(t,e){for(var n=t.coordinates,r=-1,o=n.length;++r<o;)c0(n[r],e)},GeometryCollection:function(t,e){for(var n=t.geometries,r=-1,o=n.length;++r<o;)Nf(n[r],e)}};function Qs(t,e,n){var r=-1,o=t.length-n,i;for(e.lineStart();++r<o;)i=t[r],e.point(i[0],i[1],i[2]);e.lineEnd()}function c0(t,e){var n=-1,r=t.length;for(e.polygonStart();++n<r;)Qs(t[n],e,1);e.polygonEnd()}function ke(t,e){t&&f0.hasOwnProperty(t.type)?f0[t.type](t,e):Nf(t,e)}function mi(t){return[qt(t[1],t[0]),Mt(t[2])]}function je(t){var e=t[0],n=t[1],r=B(n);return[r*B(e),r*Y(e),Y(n)]}function hi(t,e){return t[0]*e[0]+t[1]*e[1]+t[2]*e[2]}function Zr(t,e){return[t[1]*e[2]-t[2]*e[1],t[2]*e[0]-t[0]*e[2],t[0]*e[1]-t[1]*e[0]]}function Df(t,e){t[0]+=e[0],t[1]+=e[1],t[2]+=e[2]}function gi(t,e){return[t[0]*e,t[1]*e,t[2]*e]}function xi(t){var e=mt(t[0]*t[0]+t[1]*t[1]+t[2]*t[2]);t[0]/=e,t[1]/=e,t[2]/=e}function yi(t,e){function n(r,o){return r=t(r,o),e(r[0],r[1])}return t.invert&&e.invert&&(n.invert=function(r,o){return r=e.invert(r,o),r&&t.invert(r[0],r[1])}),n}function Js(t,e){return K(t)>V&&(t-=Math.round(t/Dt)*Dt),[t,e]}Js.invert=Js;function tl(t,e,n){return(t%=Dt)?e||n?yi(l0(t),d0(e,n)):l0(t):e||n?d0(e,n):Js}function s0(t){return function(e,n){return e+=t,K(e)>V&&(e-=Math.round(e/Dt)*Dt),[e,n]}}function l0(t){var e=s0(t);return e.invert=s0(-t),e}function d0(t,e){var n=B(t),r=Y(t),o=B(e),i=Y(e);function a(f,u){var c=B(u),s=B(f)*c,d=Y(f)*c,l=Y(u),p=l*n+s*r;return[qt(d*o-p*i,s*n-l*r),Mt(p*o+d*i)]}return a.invert=function(f,u){var c=B(u),s=B(f)*c,d=Y(f)*c,l=Y(u),p=l*o-d*i;return[qt(d*o+l*i,s*n+p*r),Mt(p*n-s*r)]},a}function p0(t){t=tl(t[0]*ut,t[1]*ut,t.length>2?t[2]*ut:0);function e(n){return n=t(n[0]*ut,n[1]*ut),n[0]*=$t,n[1]*=$t,n}return e.invert=function(n){return n=t.invert(n[0]*ut,n[1]*ut),n[0]*=$t,n[1]*=$t,n},e}function h0(t,e,n,r,o,i){if(n){var a=B(e),f=Y(e),u=r*n;o==null?(o=e+r*Dt,i=e-u/2):(o=m0(a,o),i=m0(a,i),(r>0?o<i:o>i)&&(o+=r*Dt));for(var c,s=o;r>0?s>i:s<i;s-=u)c=mi([a,-f*B(s),-f*Y(s)]),t.point(c[0],c[1])}}function m0(t,e){e=je(e),e[0]-=t,xi(e);var n=kf(-e[1]);return((-e[2]<0?-n:n)+Dt-U)%Dt}function Rf(){var t=[],e;return{point:function(n,r,o){e.push([n,r,o])},lineStart:function(){t.push(e=[])},lineEnd:Rt,rejoin:function(){t.length>1&&t.push(t.pop().concat(t.shift()))},result:function(){var n=t;return t=[],e=null,n}}}function Kr(t,e){return K(t[0]-e[0])<U&&K(t[1]-e[1])<U}function Pf(t,e,n,r){this.x=t,this.z=e,this.o=n,this.e=r,this.v=!1,this.n=this.p=null}function Lf(t,e,n,r,o){var i=[],a=[],f,u;if(t.forEach(function(m){if(!((h=m.length-1)<=0)){var h,g=m[0],b=m[h],x;if(Kr(g,b)){if(!g[2]&&!b[2]){for(o.lineStart(),f=0;f<h;++f)o.point((g=m[f])[0],g[1]);o.lineEnd();return}b[0]+=2*U}i.push(x=new Pf(g,m,null,!0)),a.push(x.o=new Pf(g,null,x,!1)),i.push(x=new Pf(b,m,null,!1)),a.push(x.o=new Pf(b,null,x,!0))}}),!!i.length){for(a.sort(e),g0(i),g0(a),f=0,u=a.length;f<u;++f)a[f].e=n=!n;for(var c=i[0],s,d;;){for(var l=c,p=!0;l.v;)if((l=l.n)===c)return;s=l.z,o.lineStart();do{if(l.v=l.o.v=!0,l.e){if(p)for(f=0,u=s.length;f<u;++f)o.point((d=s[f])[0],d[1]);else r(l.x,l.n.x,1,o);l=l.n}else{if(p)for(s=l.p.z,f=s.length-1;f>=0;--f)o.point((d=s[f])[0],d[1]);else r(l.x,l.p.x,-1,o);l=l.p}l=l.o,s=l.z,p=!p}while(!l.v);o.lineEnd()}}}function g0(t){if(e=t.length){for(var e,n=0,r=t[0],o;++n<e;)r.n=o=t[n],o.p=r,r=o;r.n=o=t[0],o.p=r}}function el(t){return K(t[0])<=V?t[0]:Ht(t[0])*((K(t[0])+V)%Dt-V)}function x0(t,e){var n=el(e),r=e[1],o=Y(r),i=[Y(n),-B(n),0],a=0,f=0,u=new ae;o===1?r=ft+U:o===-1&&(r=-ft-U);for(var c=0,s=t.length;c<s;++c)if(l=(d=t[c]).length)for(var d,l,p=d[l-1],m=el(p),h=p[1]/2+Ks,g=Y(h),b=B(h),x=0;x<l;++x,m=y,g=v,b=T,p=M){var M=d[x],y=el(M),w=M[1]/2+Ks,v=Y(w),T=B(w),I=y-m,E=I>=0?1:-1,F=E*I,_=F>V,R=g*v;if(u.add(qt(R*E*Y(F),b*T+R*B(F))),a+=_?I+E*Dt:I,_^m>=n^y>=n){var O=Zr(je(p),je(M));xi(O);var P=Zr(i,O);xi(P);var S=(_^I>=0?-1:1)*Mt(P[2]);(r>S||r===S&&(O[0]||O[1]))&&(f+=_^I>=0?1:-1)}}return(a<-U||a<U&&u<-$f)^f&1}function Of(t,e,n,r){return function(o){var i=e(o),a=Rf(),f=e(a),u=!1,c,s,d,l={point:p,lineStart:h,lineEnd:g,polygonStart:function(){l.point=b,l.lineStart=x,l.lineEnd=M,s=[],c=[]},polygonEnd:function(){l.point=p,l.lineStart=h,l.lineEnd=g,s=Fr(s);var y=x0(c,r);s.length?(u||(o.polygonStart(),u=!0),Lf(s,mw,y,n,o)):y&&(u||(o.polygonStart(),u=!0),o.lineStart(),n(null,null,1,o),o.lineEnd()),u&&(o.polygonEnd(),u=!1),s=c=null},sphere:function(){o.polygonStart(),o.lineStart(),n(null,null,1,o),o.lineEnd(),o.polygonEnd()}};function p(y,w){t(y,w)&&o.point(y,w)}function m(y,w){i.point(y,w)}function h(){l.point=m,i.lineStart()}function g(){l.point=p,i.lineEnd()}function b(y,w){d.push([y,w]),f.point(y,w)}function x(){f.lineStart(),d=[]}function M(){b(d[0][0],d[0][1]),f.lineEnd();var y=f.clean(),w=a.result(),v,T=w.length,I,E,F;if(d.pop(),c.push(d),d=null,!!T){if(y&1){if(E=w[0],(I=E.length-1)>0){for(u||(o.polygonStart(),u=!0),o.lineStart(),v=0;v<I;++v)o.point((F=E[v])[0],F[1]);o.lineEnd()}return}T>1&&y&2&&w.push(w.pop().concat(w.shift())),s.push(w.filter(pw))}}return l}}function pw(t){return t.length>1}function mw(t,e){return((t=t.x)[0]<0?t[1]-ft-U:ft-t[1])-((e=e.x)[0]<0?e[1]-ft-U:ft-e[1])}var nl=Of(function(){return!0},hw,xw,[-V,-ft]);function hw(t){var e=NaN,n=NaN,r=NaN,o;return{lineStart:function(){t.lineStart(),o=1},point:function(i,a){var f=i>0?V:-V,u=K(i-e);K(u-V)<U?(t.point(e,n=(n+a)/2>0?ft:-ft),t.point(r,n),t.lineEnd(),t.lineStart(),t.point(f,n),t.point(i,n),o=0):r!==f&&u>=V&&(K(e-r)<U&&(e-=r*U),K(i-f)<U&&(i-=f*U),n=gw(e,n,i,a),t.point(r,n),t.lineEnd(),t.lineStart(),t.point(f,n),o=0),t.point(e=i,n=a),r=f},lineEnd:function(){t.lineEnd(),e=n=NaN},clean:function(){return 2-o}}}function gw(t,e,n,r){var o,i,a=Y(t-n);return K(a)>U?ve((Y(e)*(i=B(r))*Y(n)-Y(r)*(o=B(e))*Y(t))/(o*i*a)):(e+r)/2}function xw(t,e,n,r){var o;if(t==null)o=n*ft,r.point(-V,o),r.point(0,o),r.point(V,o),r.point(V,0),r.point(V,-o),r.point(0,-o),r.point(-V,-o),r.point(-V,0),r.point(-V,o);else if(K(t[0]-e[0])>U){var i=t[0]<e[0]?V:-V;o=n*i/2,r.point(-i,o),r.point(0,o),r.point(i,o)}else r.point(e[0],e[1])}function y0(t){var e=B(t),n=6*ut,r=e>0,o=K(e)>U;function i(s,d,l,p){h0(p,t,n,l,s,d)}function a(s,d){return B(s)*B(d)>e}function f(s){var d,l,p,m,h;return{lineStart:function(){m=p=!1,h=1},point:function(g,b){var x=[g,b],M,y=a(g,b),w=r?y?0:c(g,b):y?c(g+(g<0?V:-V),b):0;if(!d&&(m=p=y)&&s.lineStart(),y!==p&&(M=u(d,x),(!M||Kr(d,M)||Kr(x,M))&&(x[2]=1)),y!==p)h=0,y?(s.lineStart(),M=u(x,d),s.point(M[0],M[1])):(M=u(d,x),s.point(M[0],M[1],2),s.lineEnd()),d=M;else if(o&&d&&r^y){var v;!(w&l)&&(v=u(x,d,!0))&&(h=0,r?(s.lineStart(),s.point(v[0][0],v[0][1]),s.point(v[1][0],v[1][1]),s.lineEnd()):(s.point(v[1][0],v[1][1]),s.lineEnd(),s.lineStart(),s.point(v[0][0],v[0][1],3)))}y&&(!d||!Kr(d,x))&&s.point(x[0],x[1]),d=x,p=y,l=w},lineEnd:function(){p&&s.lineEnd(),d=null},clean:function(){return h|(m&&p)<<1}}}function u(s,d,l){var p=je(s),m=je(d),h=[1,0,0],g=Zr(p,m),b=hi(g,g),x=g[0],M=b-x*x;if(!M)return!l&&s;var y=e*b/M,w=-e*x/M,v=Zr(h,g),T=gi(h,y),I=gi(g,w);Df(T,I);var E=v,F=hi(T,E),_=hi(E,E),R=F*F-_*(hi(T,T)-1);if(!(R<0)){var O=mt(R),P=gi(E,(-F-O)/_);if(Df(P,T),P=mi(P),!l)return P;var S=s[0],A=d[0],N=s[1],L=d[1],D;A<S&&(D=S,S=A,A=D);var tt=A-S,Z=K(tt-V)<U,G=Z||tt<U;if(!Z&&L<N&&(D=N,N=L,L=D),G?Z?N+L>0^P[1]<(K(P[0]-S)<U?N:L):N<=P[1]&&P[1]<=L:tt>V^(S<=P[0]&&P[0]<=A)){var Q=gi(E,(-F+O)/_);return Df(Q,T),[P,mi(Q)]}}}function c(s,d){var l=r?t:V-t,p=0;return s<-l?p|=1:s>l&&(p|=2),d<-l?p|=4:d>l&&(p|=8),p}return Of(a,f,i,r?[0,-t]:[-V,t-V])}function b0(t,e,n,r,o,i){var a=t[0],f=t[1],u=e[0],c=e[1],s=0,d=1,l=u-a,p=c-f,m;if(m=n-a,!(!l&&m>0)){if(m/=l,l<0){if(m<s)return;m<d&&(d=m)}else if(l>0){if(m>d)return;m>s&&(s=m)}if(m=o-a,!(!l&&m<0)){if(m/=l,l<0){if(m>d)return;m>s&&(s=m)}else if(l>0){if(m<s)return;m<d&&(d=m)}if(m=r-f,!(!p&&m>0)){if(m/=p,p<0){if(m<s)return;m<d&&(d=m)}else if(p>0){if(m>d)return;m>s&&(s=m)}if(m=i-f,!(!p&&m<0)){if(m/=p,p<0){if(m>d)return;m>s&&(s=m)}else if(p>0){if(m<s)return;m<d&&(d=m)}return s>0&&(t[0]=a+s*l,t[1]=f+s*p),d<1&&(e[0]=a+d*l,e[1]=f+d*p),!0}}}}}var bi=1e9,Ff=-bi;function Qr(t,e,n,r){function o(c,s){return t<=c&&c<=n&&e<=s&&s<=r}function i(c,s,d,l){var p=0,m=0;if(c==null||(p=a(c,d))!==(m=a(s,d))||u(c,s)<0^d>0)do l.point(p===0||p===3?t:n,p>1?r:e);while((p=(p+d+4)%4)!==m);else l.point(s[0],s[1])}function a(c,s){return K(c[0]-t)<U?s>0?0:3:K(c[0]-n)<U?s>0?2:1:K(c[1]-e)<U?s>0?1:0:s>0?3:2}function f(c,s){return u(c.x,s.x)}function u(c,s){var d=a(c,1),l=a(s,1);return d!==l?d-l:d===0?s[1]-c[1]:d===1?c[0]-s[0]:d===2?c[1]-s[1]:s[0]-c[0]}return function(c){var s=c,d=Rf(),l,p,m,h,g,b,x,M,y,w,v,T={point:I,lineStart:R,lineEnd:O,polygonStart:F,polygonEnd:_};function I(S,A){o(S,A)&&s.point(S,A)}function E(){for(var S=0,A=0,N=p.length;A<N;++A)for(var L=p[A],D=1,tt=L.length,Z=L[0],G,Q,at=Z[0],Ut=Z[1];D<tt;++D)G=at,Q=Ut,Z=L[D],at=Z[0],Ut=Z[1],Q<=r?Ut>r&&(at-G)*(r-Q)>(Ut-Q)*(t-G)&&++S:Ut<=r&&(at-G)*(r-Q)<(Ut-Q)*(t-G)&&--S;return S}function F(){s=d,l=[],p=[],v=!0}function _(){var S=E(),A=v&&S,N=(l=Fr(l)).length;(A||N)&&(c.polygonStart(),A&&(c.lineStart(),i(null,null,1,c),c.lineEnd()),N&&Lf(l,f,S,i,c),c.polygonEnd()),s=c,l=p=m=null}function R(){T.point=P,p&&p.push(m=[]),w=!0,y=!1,x=M=NaN}function O(){l&&(P(h,g),b&&y&&d.rejoin(),l.push(d.result())),T.point=I,y&&s.lineEnd()}function P(S,A){var N=o(S,A);if(p&&m.push([S,A]),w)h=S,g=A,b=N,w=!1,N&&(s.lineStart(),s.point(S,A));else if(N&&y)s.point(S,A);else{var L=[x=Math.max(Ff,Math.min(bi,x)),M=Math.max(Ff,Math.min(bi,M))],D=[S=Math.max(Ff,Math.min(bi,S)),A=Math.max(Ff,Math.min(bi,A))];b0(L,D,t,e,n,r)?(y||(s.lineStart(),s.point(L[0],L[1])),s.point(D[0],D[1]),N||s.lineEnd(),v=!1):N&&(s.lineStart(),s.point(S,A),v=!1)}x=S,M=A,y=N}return T}}var wi=t=>t;var rl=new ae,ol=new ae,w0,v0,il,al,Nn={point:Rt,lineStart:Rt,lineEnd:Rt,polygonStart:function(){Nn.lineStart=yw,Nn.lineEnd=ww},polygonEnd:function(){Nn.lineStart=Nn.lineEnd=Nn.point=Rt,rl.add(K(ol)),ol=new ae},result:function(){var t=rl/2;return rl=new ae,t}};function yw(){Nn.point=bw}function bw(t,e){Nn.point=M0,w0=il=t,v0=al=e}function M0(t,e){ol.add(al*t-il*e),il=t,al=e}function ww(){M0(w0,v0)}var fl=Nn;var Jr=1/0,qf=Jr,vi=-Jr,zf=vi,vw={point:Mw,lineStart:Rt,lineEnd:Rt,polygonStart:Rt,polygonEnd:Rt,result:function(){var t=[[Jr,qf],[vi,zf]];return vi=zf=-(qf=Jr=1/0),t}};function Mw(t,e){t<Jr&&(Jr=t),t>vi&&(vi=t),e<qf&&(qf=e),e>zf&&(zf=e)}var to=vw;var ul=0,cl=0,Mi=0,Yf=0,Bf=0,eo=0,sl=0,ll=0,Si=0,_0,C0,Ze,Ke,Ne={point:dr,lineStart:S0,lineEnd:T0,polygonStart:function(){Ne.lineStart=_w,Ne.lineEnd=Cw},polygonEnd:function(){Ne.point=dr,Ne.lineStart=S0,Ne.lineEnd=T0},result:function(){var t=Si?[sl/Si,ll/Si]:eo?[Yf/eo,Bf/eo]:Mi?[ul/Mi,cl/Mi]:[NaN,NaN];return ul=cl=Mi=Yf=Bf=eo=sl=ll=Si=0,t}};function dr(t,e){ul+=t,cl+=e,++Mi}function S0(){Ne.point=Sw}function Sw(t,e){Ne.point=Tw,dr(Ze=t,Ke=e)}function Tw(t,e){var n=t-Ze,r=e-Ke,o=mt(n*n+r*r);Yf+=o*(Ze+t)/2,Bf+=o*(Ke+e)/2,eo+=o,dr(Ze=t,Ke=e)}function T0(){Ne.point=dr}function _w(){Ne.point=Aw}function Cw(){A0(_0,C0)}function Aw(t,e){Ne.point=A0,dr(_0=Ze=t,C0=Ke=e)}function A0(t,e){var n=t-Ze,r=e-Ke,o=mt(n*n+r*r);Yf+=o*(Ze+t)/2,Bf+=o*(Ke+e)/2,eo+=o,o=Ke*t-Ze*e,sl+=o*(Ze+t),ll+=o*(Ke+e),Si+=o*3,dr(Ze=t,Ke=e)}var dl=Ne;function Uf(t){this._context=t}Uf.prototype={_radius:4.5,pointRadius:function(t){return this._radius=t,this},polygonStart:function(){this._line=0},polygonEnd:function(){this._line=NaN},lineStart:function(){this._point=0},lineEnd:function(){this._line===0&&this._context.closePath(),this._point=NaN},point:function(t,e){switch(this._point){case 0:{this._context.moveTo(t,e),this._point=1;break}case 1:{this._context.lineTo(t,e);break}default:{this._context.moveTo(t+this._radius,e),this._context.arc(t,e,this._radius,0,Dt);break}}},result:Rt};var ml=new ae,pl,$0,I0,Ti,_i,Xf={point:Rt,lineStart:function(){Xf.point=$w},lineEnd:function(){pl&&E0($0,I0),Xf.point=Rt},polygonStart:function(){pl=!0},polygonEnd:function(){pl=null},result:function(){var t=+ml;return ml=new ae,t}};function $w(t,e){Xf.point=E0,$0=Ti=t,I0=_i=e}function E0(t,e){Ti-=t,_i-=e,ml.add(mt(Ti*Ti+_i*_i)),Ti=t,_i=e}var hl=Xf;var k0,Wf,N0,D0,no=class{constructor(e){this._append=e==null?R0:Iw(e),this._radius=4.5,this._=""}pointRadius(e){return this._radius=+e,this}polygonStart(){this._line=0}polygonEnd(){this._line=NaN}lineStart(){this._point=0}lineEnd(){this._line===0&&(this._+="Z"),this._point=NaN}point(e,n){switch(this._point){case 0:{this._append`M${e},${n}`,this._point=1;break}case 1:{this._append`L${e},${n}`;break}default:{if(this._append`M${e},${n}`,this._radius!==N0||this._append!==Wf){let r=this._radius,o=this._;this._="",this._append`m0,${r}a${r},${r} 0 1,1 0,${-2*r}a${r},${r} 0 1,1 0,${2*r}z`,N0=r,Wf=this._append,D0=this._,this._=o}this._+=D0;break}}}result(){let e=this._;return this._="",e.length?e:null}};function R0(t){let e=1;this._+=t[0];for(let n=t.length;e<n;++e)this._+=arguments[e]+t[e]}function Iw(t){let e=Math.floor(t);if(!(e>=0))throw new RangeError(`invalid digits: ${t}`);if(e>15)return R0;if(e!==k0){let n=10**e;k0=e,Wf=function(o){let i=1;this._+=o[0];for(let a=o.length;i<a;++i)this._+=Math.round(arguments[i]*n)/n+o[i]}}return Wf}function Ci(t,e){let n=3,r=4.5,o,i;function a(f){return f&&(typeof r=="function"&&i.pointRadius(+r.apply(this,arguments)),ke(f,o(i))),i.result()}return a.area=function(f){return ke(f,o(fl)),fl.result()},a.measure=function(f){return ke(f,o(hl)),hl.result()},a.bounds=function(f){return ke(f,o(to)),to.result()},a.centroid=function(f){return ke(f,o(dl)),dl.result()},a.projection=function(f){return arguments.length?(o=f==null?(t=null,wi):(t=f).stream,a):t},a.context=function(f){return arguments.length?(i=f==null?(e=null,new no(n)):new Uf(e=f),typeof r!="function"&&i.pointRadius(r),a):e},a.pointRadius=function(f){return arguments.length?(r=typeof f=="function"?f:(i.pointRadius(+f),+f),a):r},a.digits=function(f){if(!arguments.length)return n;if(f==null)n=null;else{let u=Math.floor(f);if(!(u>=0))throw new RangeError(`invalid digits: ${f}`);n=u}return e===null&&(i=new no(n)),a},a.projection(t).digits(n).context(e)}function Ai(t){return{stream:ro(t)}}function ro(t){return function(e){var n=new gl;for(var r in t)n[r]=t[r];return n.stream=e,n}}function gl(){}gl.prototype={constructor:gl,point:function(t,e){this.stream.point(t,e)},sphere:function(){this.stream.sphere()},lineStart:function(){this.stream.lineStart()},lineEnd:function(){this.stream.lineEnd()},polygonStart:function(){this.stream.polygonStart()},polygonEnd:function(){this.stream.polygonEnd()}};function xl(t,e,n){var r=t.clipExtent&&t.clipExtent();return t.scale(150).translate([0,0]),r!=null&&t.clipExtent(null),ke(n,t.stream(to)),e(to.result()),r!=null&&t.clipExtent(r),t}function $i(t,e,n){return xl(t,function(r){var o=e[1][0]-e[0][0],i=e[1][1]-e[0][1],a=Math.min(o/(r[1][0]-r[0][0]),i/(r[1][1]-r[0][1])),f=+e[0][0]+(o-a*(r[1][0]+r[0][0]))/2,u=+e[0][1]+(i-a*(r[1][1]+r[0][1]))/2;t.scale(150*a).translate([f,u])},n)}function Gf(t,e,n){return $i(t,[[0,0],e],n)}function Hf(t,e,n){return xl(t,function(r){var o=+e,i=o/(r[1][0]-r[0][0]),a=(o-i*(r[1][0]+r[0][0]))/2,f=-i*r[0][1];t.scale(150*i).translate([a,f])},n)}function Vf(t,e,n){return xl(t,function(r){var o=+e,i=o/(r[1][1]-r[0][1]),a=-i*r[0][0],f=(o-i*(r[1][1]+r[0][1]))/2;t.scale(150*i).translate([a,f])},n)}var P0=16,Ew=B(30*ut);function yl(t,e){return+e?Nw(t,e):kw(t)}function kw(t){return ro({point:function(e,n){e=t(e,n),this.stream.point(e[0],e[1])}})}function Nw(t,e){function n(r,o,i,a,f,u,c,s,d,l,p,m,h,g){var b=c-r,x=s-o,M=b*b+x*x;if(M>4*e&&h--){var y=a+l,w=f+p,v=u+m,T=mt(y*y+w*w+v*v),I=Mt(v/=T),E=K(K(v)-1)<U||K(i-d)<U?(i+d)/2:qt(w,y),F=t(E,I),_=F[0],R=F[1],O=_-r,P=R-o,S=x*O-b*P;(S*S/M>e||K((b*O+x*P)/M-.5)>.3||a*l+f*p+u*m<Ew)&&(n(r,o,i,a,f,u,_,R,E,y/=T,w/=T,v,h,g),g.point(_,R),n(_,R,E,y,w,v,c,s,d,l,p,m,h,g))}}return function(r){var o,i,a,f,u,c,s,d,l,p,m,h,g={point:b,lineStart:x,lineEnd:y,polygonStart:function(){r.polygonStart(),g.lineStart=w},polygonEnd:function(){r.polygonEnd(),g.lineStart=x}};function b(I,E){I=t(I,E),r.point(I[0],I[1])}function x(){d=NaN,g.point=M,r.lineStart()}function M(I,E){var F=je([I,E]),_=t(I,E);n(d,l,s,p,m,h,d=_[0],l=_[1],s=I,p=F[0],m=F[1],h=F[2],P0,r),r.point(d,l)}function y(){g.point=b,r.lineEnd()}function w(){x(),g.point=v,g.lineEnd=T}function v(I,E){M(o=I,E),i=d,a=l,f=p,u=m,c=h,g.point=M}function T(){n(d,l,s,p,m,h,i,a,o,f,u,c,P0,r),g.lineEnd=y,y()}return g}}var Dw=ro({point:function(t,e){this.stream.point(t*ut,e*ut)}});function Rw(t){return ro({point:function(e,n){var r=t(e,n);return this.stream.point(r[0],r[1])}})}function Pw(t,e,n,r,o){function i(a,f){return a*=r,f*=o,[e+t*a,n-t*f]}return i.invert=function(a,f){return[(a-e)/t*r,(n-f)/t*o]},i}function L0(t,e,n,r,o,i){if(!i)return Pw(t,e,n,r,o);var a=B(i),f=Y(i),u=a*t,c=f*t,s=a/t,d=f/t,l=(f*n-a*e)/t,p=(f*e+a*n)/t;function m(h,g){return h*=r,g*=o,[u*h-c*g+e,n-c*h-u*g]}return m.invert=function(h,g){return[r*(s*h-d*g+l),o*(p-d*h-s*g)]},m}function zt(t){return bl(function(){return t})()}function bl(t){var e,n=150,r=480,o=250,i=0,a=0,f=0,u=0,c=0,s,d=0,l=1,p=1,m=null,h=nl,g=null,b,x,M,y=wi,w=.5,v,T,I,E,F;function _(S){return I(S[0]*ut,S[1]*ut)}function R(S){return S=I.invert(S[0],S[1]),S&&[S[0]*$t,S[1]*$t]}_.stream=function(S){return E&&F===S?E:E=Dw(Rw(s)(h(v(y(F=S)))))},_.preclip=function(S){return arguments.length?(h=S,m=void 0,P()):h},_.postclip=function(S){return arguments.length?(y=S,g=b=x=M=null,P()):y},_.clipAngle=function(S){return arguments.length?(h=+S?y0(m=S*ut):(m=null,nl),P()):m*$t},_.clipExtent=function(S){return arguments.length?(y=S==null?(g=b=x=M=null,wi):Qr(g=+S[0][0],b=+S[0][1],x=+S[1][0],M=+S[1][1]),P()):g==null?null:[[g,b],[x,M]]},_.scale=function(S){return arguments.length?(n=+S,O()):n},_.translate=function(S){return arguments.length?(r=+S[0],o=+S[1],O()):[r,o]},_.center=function(S){return arguments.length?(i=S[0]%360*ut,a=S[1]%360*ut,O()):[i*$t,a*$t]},_.rotate=function(S){return arguments.length?(f=S[0]%360*ut,u=S[1]%360*ut,c=S.length>2?S[2]%360*ut:0,O()):[f*$t,u*$t,c*$t]},_.angle=function(S){return arguments.length?(d=S%360*ut,O()):d*$t},_.reflectX=function(S){return arguments.length?(l=S?-1:1,O()):l<0},_.reflectY=function(S){return arguments.length?(p=S?-1:1,O()):p<0},_.precision=function(S){return arguments.length?(v=yl(T,w=S*S),P()):mt(w)},_.fitExtent=function(S,A){return $i(_,S,A)},_.fitSize=function(S,A){return Gf(_,S,A)},_.fitWidth=function(S,A){return Hf(_,S,A)},_.fitHeight=function(S,A){return Vf(_,S,A)};function O(){var S=L0(n,0,0,l,p,d).apply(null,e(i,a)),A=L0(n,r-S[0],o-S[1],l,p,d);return s=tl(f,u,c),T=yi(e,A),I=yi(s,T),v=yl(T,w),P()}function P(){return E=F=null,_}return function(){return e=t.apply(this,arguments),_.invert=e.invert&&R,O()}}function oo(t){var e=0,n=V/3,r=bl(t),o=r(e,n);return o.parallels=function(i){return arguments.length?r(e=i[0]*ut,n=i[1]*ut):[e*$t,n*$t]},o}function O0(t){var e=B(t);function n(r,o){return[r*e,Y(o)/e]}return n.invert=function(r,o){return[r/e,Mt(o*e)]},n}function F0(t,e){var n=Y(t),r=(n+Y(e))/2;if(K(r)<U)return O0(t);var o=1+n*(2*r-n),i=mt(o)/r;function a(f,u){var c=mt(o-2*r*Y(u))/r;return[c*Y(f*=r),i-c*B(f)]}return a.invert=function(f,u){var c=i-u,s=qt(f,K(c))*Ht(c);return c*r<0&&(s-=V*Ht(f)*Ht(c)),[s/r,Mt((o-(f*f+c*c)*r*r)/(2*r))]},a}function Dn(){return oo(F0).scale(155.424).center([0,33.6442])}function Ii(){return Dn().parallels([29.5,45.5]).scale(1070).translate([480,250]).rotate([96,0]).center([-.6,38.7])}function Lw(t){var e=t.length;return{point:function(n,r){for(var o=-1;++o<e;)t[o].point(n,r)},sphere:function(){for(var n=-1;++n<e;)t[n].sphere()},lineStart:function(){for(var n=-1;++n<e;)t[n].lineStart()},lineEnd:function(){for(var n=-1;++n<e;)t[n].lineEnd()},polygonStart:function(){for(var n=-1;++n<e;)t[n].polygonStart()},polygonEnd:function(){for(var n=-1;++n<e;)t[n].polygonEnd()}}}function wl(){var t,e,n=Ii(),r,o=Dn().rotate([154,0]).center([-2,58.5]).parallels([55,65]),i,a=Dn().rotate([157,0]).center([-3,19.9]).parallels([8,18]),f,u,c={point:function(l,p){u=[l,p]}};function s(l){var p=l[0],m=l[1];return u=null,r.point(p,m),u||(i.point(p,m),u)||(f.point(p,m),u)}s.invert=function(l){var p=n.scale(),m=n.translate(),h=(l[0]-m[0])/p,g=(l[1]-m[1])/p;return(g>=.12&&g<.234&&h>=-.425&&h<-.214?o:g>=.166&&g<.234&&h>=-.214&&h<-.115?a:n).invert(l)},s.stream=function(l){return t&&e===l?t:t=Lw([n.stream(e=l),o.stream(l),a.stream(l)])},s.precision=function(l){return arguments.length?(n.precision(l),o.precision(l),a.precision(l),d()):n.precision()},s.scale=function(l){return arguments.length?(n.scale(l),o.scale(l*.35),a.scale(l),s.translate(n.translate())):n.scale()},s.translate=function(l){if(!arguments.length)return n.translate();var p=n.scale(),m=+l[0],h=+l[1];return r=n.translate(l).clipExtent([[m-.455*p,h-.238*p],[m+.455*p,h+.238*p]]).stream(c),i=o.translate([m-.307*p,h+.201*p]).clipExtent([[m-.425*p+U,h+.12*p+U],[m-.214*p-U,h+.234*p-U]]).stream(c),f=a.translate([m-.205*p,h+.212*p]).clipExtent([[m-.214*p+U,h+.166*p+U],[m-.115*p-U,h+.234*p-U]]).stream(c),d()},s.fitExtent=function(l,p){return $i(s,l,p)},s.fitSize=function(l,p){return Gf(s,l,p)},s.fitWidth=function(l,p){return Hf(s,l,p)},s.fitHeight=function(l,p){return Vf(s,l,p)};function d(){return t=e=null,s}return s.scale(1070)}function jf(t){return function(e,n){var r=B(e),o=B(n),i=t(r*o);return i===1/0?[2,0]:[i*o*Y(e),i*Y(n)]}}function Qe(t){return function(e,n){var r=mt(e*e+n*n),o=t(r),i=Y(o),a=B(o);return[qt(e*i,r*a),Mt(r&&n*i/r)]}}var vl=jf(function(t){return mt(2/(1+t))});vl.invert=Qe(function(t){return 2*Mt(t/2)});function Ml(){return zt(vl).scale(124.75).clipAngle(180-.001)}var Sl=jf(function(t){return(t=kf(t))&&t/Y(t)});Sl.invert=Qe(function(t){return t});function Tl(){return zt(Sl).scale(79.4188).clipAngle(180-.001)}function io(t,e){return[t,lr(jr((ft+e)/2))]}io.invert=function(t,e){return[t,2*ve(If(e))-ft]};function _l(){return Cl(io).scale(961/Dt)}function Cl(t){var e=zt(t),n=e.center,r=e.scale,o=e.translate,i=e.clipExtent,a=null,f,u,c;e.scale=function(d){return arguments.length?(r(d),s()):r()},e.translate=function(d){return arguments.length?(o(d),s()):o()},e.center=function(d){return arguments.length?(n(d),s()):n()},e.clipExtent=function(d){return arguments.length?(d==null?a=f=u=c=null:(a=+d[0][0],f=+d[0][1],u=+d[1][0],c=+d[1][1]),s()):a==null?null:[[a,f],[u,c]]};function s(){var d=V*r(),l=e(p0(e.rotate()).invert([0,0]));return i(a==null?[[l[0]-d,l[1]-d],[l[0]+d,l[1]+d]]:t===io?[[Math.max(l[0]-d,a),f],[Math.min(l[0]+d,u),c]]:[[a,Math.max(l[1]-d,f)],[u,Math.min(l[1]+d,c)]])}return s()}function Zf(t){return jr((ft+t)/2)}function q0(t,e){var n=B(t),r=t===e?Y(t):lr(n/B(e))/lr(Zf(e)/Zf(t)),o=n*Ef(Zf(t),r)/r;if(!r)return io;function i(a,f){o>0?f<-ft+U&&(f=-ft+U):f>ft-U&&(f=ft-U);var u=o/Ef(Zf(f),r);return[u*Y(r*a),o-u*B(r*a)]}return i.invert=function(a,f){var u=o-f,c=Ht(r)*mt(a*a+u*u),s=qt(a,K(u))*Ht(u);return u*r<0&&(s-=V*Ht(a)*Ht(u)),[s/r,2*ve(Ef(o/c,1/r))-ft]},i}function Al(){return oo(q0).scale(109.5).parallels([30,30])}function ao(t,e){return[t,e]}ao.invert=ao;function $l(){return zt(ao).scale(152.63)}function z0(t,e){var n=B(t),r=t===e?Y(t):(n-B(e))/(e-t),o=n/r+t;if(K(r)<U)return ao;function i(a,f){var u=o-f,c=r*a;return[u*Y(c),o-u*B(c)]}return i.invert=function(a,f){var u=o-f,c=qt(a,K(u))*Ht(u);return u*r<0&&(c-=V*Ht(a)*Ht(u)),[c/r,o-Ht(r)*mt(a*a+u*u)]},i}function Il(){return oo(z0).scale(131.154).center([0,13.9389])}var Ei=1.340264,ki=-.081106,Ni=893e-6,Di=.003796,Kf=mt(3)/2,Ow=12;function El(t,e){var n=Mt(Kf*Y(e)),r=n*n,o=r*r*r;return[t*B(n)/(Kf*(Ei+3*ki*r+o*(7*Ni+9*Di*r))),n*(Ei+ki*r+o*(Ni+Di*r))]}El.invert=function(t,e){for(var n=e,r=n*n,o=r*r*r,i=0,a,f,u;i<Ow&&(f=n*(Ei+ki*r+o*(Ni+Di*r))-e,u=Ei+3*ki*r+o*(7*Ni+9*Di*r),n-=a=f/u,r=n*n,o=r*r*r,!(K(a)<$f));++i);return[Kf*t*(Ei+3*ki*r+o*(7*Ni+9*Di*r))/B(n),Mt(Y(n)/Kf)]};function kl(){return zt(El).scale(177.158)}function Nl(t,e){var n=B(e),r=B(t)*n;return[n*Y(t)/r,Y(e)/r]}Nl.invert=Qe(ve);function Dl(){return zt(Nl).scale(144.049).clipAngle(60)}function Rl(t,e){return[B(e)*Y(t),Y(e)]}Rl.invert=Qe(Mt);function Pl(){return zt(Rl).scale(249.5).clipAngle(90+U)}function Ll(t,e){var n=B(e),r=1+B(t)*n;return[n*Y(t)/r,Y(e)/r]}Ll.invert=Qe(function(t){return 2*ve(t)});function Ol(){return zt(Ll).scale(250).clipAngle(142)}function Fl(t,e){return[lr(jr((ft+e)/2)),-t]}Fl.invert=function(t,e){return[-e,2*ve(If(t))-ft]};function ql(){var t=Cl(Fl),e=t.center,n=t.rotate;return t.center=function(r){return arguments.length?e([-r[1],r[0]]):(r=e(),[r[1],-r[0]])},t.rotate=function(r){return arguments.length?n([r[0],r[1],r.length>2?r[2]+90:90]):(r=n(),[r[0],r[1],r[2]-90])},n([0,0,90]).scale(159.155)}function _t(t,e){switch(arguments.length){case 0:break;case 1:this.range(t);break;default:this.range(e).domain(t);break}return this}function Ri(t,e){switch(arguments.length){case 0:break;case 1:{typeof t=="function"?this.interpolator(t):this.range(t);break}default:{this.domain(t),typeof e=="function"?this.interpolator(e):this.range(e);break}}return this}var Pi=Symbol("implicit");function pr(){var t=new Qt,e=[],n=[],r=Pi;function o(i){let a=t.get(i);if(a===void 0){if(r!==Pi)return r;t.set(i,a=e.push(i)-1)}return n[a%n.length]}return o.domain=function(i){if(!arguments.length)return e.slice();e=[],t=new Qt;for(let a of i)t.has(a)||t.set(a,e.push(a)-1);return o},o.range=function(i){return arguments.length?(n=Array.from(i),o):n.slice()},o.unknown=function(i){return arguments.length?(r=i,o):r},o.copy=function(){return pr(e,n).unknown(r)},_t.apply(o,arguments),o}function Rn(){var t=pr().unknown(void 0),e=t.domain,n=t.range,r=0,o=1,i,a,f=!1,u=0,c=0,s=.5;delete t.unknown;function d(){var l=e().length,p=o<r,m=p?o:r,h=p?r:o;i=(h-m)/Math.max(1,l-u+c*2),f&&(i=Math.floor(i)),m+=(h-m-i*(l-u))*s,a=i*(1-u),f&&(m=Math.round(m),a=Math.round(a));var g=er(l).map(function(b){return m+i*b});return n(p?g.reverse():g)}return t.domain=function(l){return arguments.length?(e(l),d()):e()},t.range=function(l){return arguments.length?([r,o]=l,r=+r,o=+o,d()):[r,o]},t.rangeRound=function(l){return[r,o]=l,r=+r,o=+o,f=!0,d()},t.bandwidth=function(){return a},t.step=function(){return i},t.round=function(l){return arguments.length?(f=!!l,d()):f},t.padding=function(l){return arguments.length?(u=Math.min(1,c=+l),d()):u},t.paddingInner=function(l){return arguments.length?(u=Math.min(1,l),d()):u},t.paddingOuter=function(l){return arguments.length?(c=+l,d()):c},t.align=function(l){return arguments.length?(s=Math.max(0,Math.min(1,l)),d()):s},t.copy=function(){return Rn(e(),[r,o]).round(f).paddingInner(u).paddingOuter(c).align(s)},_t.apply(d(),arguments)}function Y0(t){var e=t.copy;return t.padding=t.paddingOuter,delete t.paddingInner,delete t.paddingOuter,t.copy=function(){return Y0(e())},t}function zl(){return Y0(Rn.apply(null,arguments).paddingInner(1))}function Yl(t){return function(){return t}}function fo(t){return+t}var B0=[0,1];function oe(t){return t}function Bl(t,e){return(e-=t=+t)?function(n){return(n-t)/e}:Yl(isNaN(e)?NaN:.5)}function Fw(t,e){var n;return t>e&&(n=t,t=e,e=n),function(r){return Math.max(t,Math.min(e,r))}}function qw(t,e,n){var r=t[0],o=t[1],i=e[0],a=e[1];return o<r?(r=Bl(o,r),i=n(a,i)):(r=Bl(r,o),i=n(i,a)),function(f){return i(r(f))}}function zw(t,e,n){var r=Math.min(t.length,e.length)-1,o=new Array(r),i=new Array(r),a=-1;for(t[r]<t[0]&&(t=t.slice().reverse(),e=e.slice().reverse());++a<r;)o[a]=Bl(t[a],t[a+1]),i[a]=n(e[a],e[a+1]);return function(f){var u=un(t,f,1,r)-1;return i[u](o[u](f))}}function Je(t,e){return e.domain(t.domain()).range(t.range()).interpolate(t.interpolate()).clamp(t.clamp()).unknown(t.unknown())}function mr(){var t=B0,e=B0,n=Ee,r,o,i,a=oe,f,u,c;function s(){var l=Math.min(t.length,e.length);return a!==oe&&(a=Fw(t[0],t[l-1])),f=l>2?zw:qw,u=c=null,d}function d(l){return l==null||isNaN(l=+l)?i:(u||(u=f(t.map(r),e,n)))(r(a(l)))}return d.invert=function(l){return a(o((c||(c=f(e,t.map(r),ht)))(l)))},d.domain=function(l){return arguments.length?(t=Array.from(l,fo),s()):t.slice()},d.range=function(l){return arguments.length?(e=Array.from(l),s()):e.slice()},d.rangeRound=function(l){return e=Array.from(l),n=fr,s()},d.clamp=function(l){return arguments.length?(a=l?!0:oe,s()):a!==oe},d.interpolate=function(l){return arguments.length?(n=l,s()):n},d.unknown=function(l){return arguments.length?(i=l,d):i},function(l,p){return r=l,o=p,s()}}function Li(){return mr()(oe,oe)}function Ul(t,e,n,r){var o=Or(t,e,n),i;switch(r=He(r??",f"),r.type){case"s":{var a=Math.max(Math.abs(t),Math.abs(e));return r.precision==null&&!isNaN(i=js(o,a))&&(r.precision=i),Af(r,a)}case"":case"e":case"g":case"p":case"r":{r.precision==null&&!isNaN(i=Zs(o,Math.max(Math.abs(t),Math.abs(e))))&&(r.precision=i-(r.type==="e"));break}case"f":case"%":{r.precision==null&&!isNaN(i=Vs(o))&&(r.precision=i-(r.type==="%")*2);break}}return Ve(r)}function yn(t){var e=t.domain;return t.ticks=function(n){var r=e();return $e(r[0],r[r.length-1],n??10)},t.tickFormat=function(n,r){var o=e();return Ul(o[0],o[o.length-1],n??10,r)},t.nice=function(n){n==null&&(n=10);var r=e(),o=0,i=r.length-1,a=r[o],f=r[i],u,c,s=10;for(f<a&&(c=a,a=f,f=c,c=o,o=i,i=c);s-- >0;){if(c=tr(a,f,n),c===u)return r[o]=a,r[i]=f,e(r);if(c>0)a=Math.floor(a/c)*c,f=Math.ceil(f/c)*c;else if(c<0)a=Math.ceil(a*c)/c,f=Math.floor(f*c)/c;else break;u=c}return t},t}function hr(){var t=Li();return t.copy=function(){return Je(t,hr())},_t.apply(t,arguments),yn(t)}function Oi(t){var e;function n(r){return r==null||isNaN(r=+r)?e:r}return n.invert=n,n.domain=n.range=function(r){return arguments.length?(t=Array.from(r,fo),n):t.slice()},n.unknown=function(r){return arguments.length?(e=r,n):e},n.copy=function(){return Oi(t).unknown(e)},t=arguments.length?Array.from(t,fo):[0,1],yn(n)}function Fi(t,e){t=t.slice();var n=0,r=t.length-1,o=t[n],i=t[r],a;return i<o&&(a=n,n=r,r=a,a=o,o=i,i=a),t[n]=e.floor(o),t[r]=e.ceil(i),t}function U0(t){return Math.log(t)}function X0(t){return Math.exp(t)}function Yw(t){return-Math.log(-t)}function Bw(t){return-Math.exp(-t)}function Uw(t){return isFinite(t)?+("1e"+t):t<0?0:t}function Xw(t){return t===10?Uw:t===Math.E?Math.exp:e=>Math.pow(t,e)}function Ww(t){return t===Math.E?Math.log:t===10&&Math.log10||t===2&&Math.log2||(t=Math.log(t),e=>Math.log(e)/t)}function W0(t){return(e,n)=>-t(-e,n)}function Xl(t){let e=t(U0,X0),n=e.domain,r=10,o,i;function a(){return o=Ww(r),i=Xw(r),n()[0]<0?(o=W0(o),i=W0(i),t(Yw,Bw)):t(U0,X0),e}return e.base=function(f){return arguments.length?(r=+f,a()):r},e.domain=function(f){return arguments.length?(n(f),a()):n()},e.ticks=f=>{let u=n(),c=u[0],s=u[u.length-1],d=s<c;d&&([c,s]=[s,c]);let l=o(c),p=o(s),m,h,g=f==null?10:+f,b=[];if(!(r%1)&&p-l<g){if(l=Math.floor(l),p=Math.ceil(p),c>0){for(;l<=p;++l)for(m=1;m<r;++m)if(h=l<0?m/i(-l):m*i(l),!(h<c)){if(h>s)break;b.push(h)}}else for(;l<=p;++l)for(m=r-1;m>=1;--m)if(h=l>0?m/i(-l):m*i(l),!(h<c)){if(h>s)break;b.push(h)}b.length*2<g&&(b=$e(c,s,g))}else b=$e(l,p,Math.min(p-l,g)).map(i);return d?b.reverse():b},e.tickFormat=(f,u)=>{if(f==null&&(f=10),u==null&&(u=r===10?"s":","),typeof u!="function"&&(!(r%1)&&(u=He(u)).precision==null&&(u.trim=!0),u=Ve(u)),f===1/0)return u;let c=Math.max(1,r*f/e.ticks().length);return s=>{let d=s/i(Math.round(o(s)));return d*r<r-.5&&(d*=r),d<=c?u(s):""}},e.nice=()=>n(Fi(n(),{floor:f=>i(Math.floor(o(f))),ceil:f=>i(Math.ceil(o(f)))})),e}function qi(){let t=Xl(mr()).domain([1,10]);return t.copy=()=>Je(t,qi()).base(t.base()),_t.apply(t,arguments),t}function G0(t){return function(e){return Math.sign(e)*Math.log1p(Math.abs(e/t))}}function H0(t){return function(e){return Math.sign(e)*Math.expm1(Math.abs(e))*t}}function Wl(t){var e=1,n=t(G0(e),H0(e));return n.constant=function(r){return arguments.length?t(G0(e=+r),H0(e)):e},yn(n)}function zi(){var t=Wl(mr());return t.copy=function(){return Je(t,zi()).constant(t.constant())},_t.apply(t,arguments)}function V0(t){return function(e){return e<0?-Math.pow(-e,t):Math.pow(e,t)}}function Gw(t){return t<0?-Math.sqrt(-t):Math.sqrt(t)}function Hw(t){return t<0?-t*t:t*t}function Gl(t){var e=t(oe,oe),n=1;function r(){return n===1?t(oe,oe):n===.5?t(Gw,Hw):t(V0(n),V0(1/n))}return e.exponent=function(o){return arguments.length?(n=+o,r()):n},yn(e)}function Yi(){var t=Gl(mr());return t.copy=function(){return Je(t,Yi()).exponent(t.exponent())},_t.apply(t,arguments),t}function Bi(){var t=[],e=[],n=[],r;function o(){var a=0,f=Math.max(1,e.length);for(n=new Array(f-1);++a<f;)n[a-1]=ps(t,a/f);return i}function i(a){return a==null||isNaN(a=+a)?r:e[un(n,a)]}return i.invertExtent=function(a){var f=e.indexOf(a);return f<0?[NaN,NaN]:[f>0?n[f-1]:t[0],f<n.length?n[f]:t[t.length-1]]},i.domain=function(a){if(!arguments.length)return t.slice();t=[];for(let f of a)f!=null&&!isNaN(f=+f)&&t.push(f);return t.sort(bt),o()},i.range=function(a){return arguments.length?(e=Array.from(a),o()):e.slice()},i.unknown=function(a){return arguments.length?(r=a,i):r},i.quantiles=function(){return n.slice()},i.copy=function(){return Bi().domain(t).range(e).unknown(r)},_t.apply(i,arguments)}function Ui(){var t=[.5],e=[0,1],n,r=1;function o(i){return i!=null&&i<=i?e[un(t,i,0,r)]:n}return o.domain=function(i){return arguments.length?(t=Array.from(i),r=Math.min(t.length,e.length-1),o):t.slice()},o.range=function(i){return arguments.length?(e=Array.from(i),r=Math.min(t.length,e.length-1),o):e.slice()},o.invertExtent=function(i){var a=e.indexOf(i);return[t[a-1],t[a]]},o.unknown=function(i){return arguments.length?(n=i,o):n},o.copy=function(){return Ui().domain(t).range(e).unknown(n)},_t.apply(o,arguments)}var Hl=new Date,Vl=new Date;function dt(t,e,n,r){function o(i){return t(i=arguments.length===0?new Date:new Date(+i)),i}return o.floor=i=>(t(i=new Date(+i)),i),o.ceil=i=>(t(i=new Date(i-1)),e(i,1),t(i),i),o.round=i=>{let a=o(i),f=o.ceil(i);return i-a<f-i?a:f},o.offset=(i,a)=>(e(i=new Date(+i),a==null?1:Math.floor(a)),i),o.range=(i,a,f)=>{let u=[];if(i=o.ceil(i),f=f==null?1:Math.floor(f),!(i<a)||!(f>0))return u;let c;do u.push(c=new Date(+i)),e(i,f),t(i);while(c<i&&i<a);return u},o.filter=i=>dt(a=>{if(a>=a)for(;t(a),!i(a);)a.setTime(a-1)},(a,f)=>{if(a>=a)if(f<0)for(;++f<=0;)for(;e(a,-1),!i(a););else for(;--f>=0;)for(;e(a,1),!i(a););}),n&&(o.count=(i,a)=>(Hl.setTime(+i),Vl.setTime(+a),t(Hl),t(Vl),Math.floor(n(Hl,Vl))),o.every=i=>(i=Math.floor(i),!isFinite(i)||!(i>0)?null:i>1?o.filter(r?a=>r(a)%i===0:a=>o.count(0,a)%i===0):o)),o}var Xi=dt(()=>{},(t,e)=>{t.setTime(+t+e)},(t,e)=>e-t);Xi.every=t=>(t=Math.floor(t),!isFinite(t)||!(t>0)?null:t>1?dt(e=>{e.setTime(Math.floor(e/t)*t)},(e,n)=>{e.setTime(+e+n*t)},(e,n)=>(n-e)/t):Xi);var Rk=Xi.range;var Vt=dt(t=>{t.setTime(t-t.getMilliseconds())},(t,e)=>{t.setTime(+t+e*1e3)},(t,e)=>(e-t)/1e3,t=>t.getUTCSeconds()),j0=Vt.range;var Pn=dt(t=>{t.setTime(t-t.getMilliseconds()-t.getSeconds()*1e3)},(t,e)=>{t.setTime(+t+e*6e4)},(t,e)=>(e-t)/6e4,t=>t.getMinutes()),Vw=Pn.range,Ln=dt(t=>{t.setUTCSeconds(0,0)},(t,e)=>{t.setTime(+t+e*6e4)},(t,e)=>(e-t)/6e4,t=>t.getUTCMinutes()),jw=Ln.range;var On=dt(t=>{t.setTime(t-t.getMilliseconds()-t.getSeconds()*1e3-t.getMinutes()*6e4)},(t,e)=>{t.setTime(+t+e*36e5)},(t,e)=>(e-t)/36e5,t=>t.getHours()),Zw=On.range,Fn=dt(t=>{t.setUTCMinutes(0,0,0)},(t,e)=>{t.setTime(+t+e*36e5)},(t,e)=>(e-t)/36e5,t=>t.getUTCHours()),Kw=Fn.range;var De=dt(t=>t.setHours(0,0,0,0),(t,e)=>t.setDate(t.getDate()+e),(t,e)=>(e-t-(e.getTimezoneOffset()-t.getTimezoneOffset())*6e4)/864e5,t=>t.getDate()-1),Qw=De.range,yr=dt(t=>{t.setUTCHours(0,0,0,0)},(t,e)=>{t.setUTCDate(t.getUTCDate()+e)},(t,e)=>(e-t)/864e5,t=>t.getUTCDate()-1),Jw=yr.range,uo=dt(t=>{t.setUTCHours(0,0,0,0)},(t,e)=>{t.setUTCDate(t.getUTCDate()+e)},(t,e)=>(e-t)/864e5,t=>Math.floor(t/864e5)),t6=uo.range;function br(t){return dt(e=>{e.setDate(e.getDate()-(e.getDay()+7-t)%7),e.setHours(0,0,0,0)},(e,n)=>{e.setDate(e.getDate()+n*7)},(e,n)=>(n-e-(n.getTimezoneOffset()-e.getTimezoneOffset())*6e4)/6048e5)}var ce=br(0),qn=br(1),Qf=br(2),Jf=br(3),en=br(4),tu=br(5),eu=br(6),K0=ce.range,e6=qn.range,n6=Qf.range,r6=Jf.range,o6=en.range,i6=tu.range,a6=eu.range;function wr(t){return dt(e=>{e.setUTCDate(e.getUTCDate()-(e.getUTCDay()+7-t)%7),e.setUTCHours(0,0,0,0)},(e,n)=>{e.setUTCDate(e.getUTCDate()+n*7)},(e,n)=>(n-e)/6048e5)}var se=wr(0),zn=wr(1),nu=wr(2),ru=wr(3),nn=wr(4),ou=wr(5),iu=wr(6),Q0=se.range,f6=zn.range,u6=nu.range,c6=ru.range,s6=nn.range,l6=ou.range,d6=iu.range;var Yn=dt(t=>{t.setDate(1),t.setHours(0,0,0,0)},(t,e)=>{t.setMonth(t.getMonth()+e)},(t,e)=>e.getMonth()-t.getMonth()+(e.getFullYear()-t.getFullYear())*12,t=>t.getMonth()),p6=Yn.range,Bn=dt(t=>{t.setUTCDate(1),t.setUTCHours(0,0,0,0)},(t,e)=>{t.setUTCMonth(t.getUTCMonth()+e)},(t,e)=>e.getUTCMonth()-t.getUTCMonth()+(e.getUTCFullYear()-t.getUTCFullYear())*12,t=>t.getUTCMonth()),m6=Bn.range;var jt=dt(t=>{t.setMonth(0,1),t.setHours(0,0,0,0)},(t,e)=>{t.setFullYear(t.getFullYear()+e)},(t,e)=>e.getFullYear()-t.getFullYear(),t=>t.getFullYear());jt.every=t=>!isFinite(t=Math.floor(t))||!(t>0)?null:dt(e=>{e.setFullYear(Math.floor(e.getFullYear()/t)*t),e.setMonth(0,1),e.setHours(0,0,0,0)},(e,n)=>{e.setFullYear(e.getFullYear()+n*t)});var h6=jt.range,Zt=dt(t=>{t.setUTCMonth(0,1),t.setUTCHours(0,0,0,0)},(t,e)=>{t.setUTCFullYear(t.getUTCFullYear()+e)},(t,e)=>e.getUTCFullYear()-t.getUTCFullYear(),t=>t.getUTCFullYear());Zt.every=t=>!isFinite(t=Math.floor(t))||!(t>0)?null:dt(e=>{e.setUTCFullYear(Math.floor(e.getUTCFullYear()/t)*t),e.setUTCMonth(0,1),e.setUTCHours(0,0,0,0)},(e,n)=>{e.setUTCFullYear(e.getUTCFullYear()+n*t)});var g6=Zt.range;function tg(t,e,n,r,o,i){let a=[[Vt,1,1e3],[Vt,5,5*1e3],[Vt,15,15*1e3],[Vt,30,30*1e3],[i,1,6e4],[i,5,5*6e4],[i,15,15*6e4],[i,30,30*6e4],[o,1,36e5],[o,3,3*36e5],[o,6,6*36e5],[o,12,12*36e5],[r,1,864e5],[r,2,2*864e5],[n,1,6048e5],[e,1,2592e6],[e,3,3*2592e6],[t,1,31536e6]];function f(c,s,d){let l=s<c;l&&([c,s]=[s,c]);let p=d&&typeof d.range=="function"?d:u(c,s,d),m=p?p.range(c,+s+1):[];return l?m.reverse():m}function u(c,s,d){let l=Math.abs(s-c)/d,p=qe(([,,g])=>g).right(a,l);if(p===a.length)return t.every(Or(c/31536e6,s/31536e6,d));if(p===0)return Xi.every(Math.max(Or(c,s,d),1));let[m,h]=a[l/a[p-1][2]<a[p][2]/l?p-1:p];return m.every(h)}return[f,u]}var[jl,Gi]=tg(Zt,Bn,se,uo,Fn,Ln),[Zl,Kl]=tg(jt,Yn,ce,De,On,Pn);function Ql(t){if(0<=t.y&&t.y<100){var e=new Date(-1,t.m,t.d,t.H,t.M,t.S,t.L);return e.setFullYear(t.y),e}return new Date(t.y,t.m,t.d,t.H,t.M,t.S,t.L)}function Jl(t){if(0<=t.y&&t.y<100){var e=new Date(Date.UTC(-1,t.m,t.d,t.H,t.M,t.S,t.L));return e.setUTCFullYear(t.y),e}return new Date(Date.UTC(t.y,t.m,t.d,t.H,t.M,t.S,t.L))}function Hi(t,e,n){return{y:t,m:e,d:n,H:0,M:0,S:0,L:0}}function td(t){var e=t.dateTime,n=t.date,r=t.time,o=t.periods,i=t.days,a=t.shortDays,f=t.months,u=t.shortMonths,c=Vi(o),s=ji(o),d=Vi(i),l=ji(i),p=Vi(a),m=ji(a),h=Vi(f),g=ji(f),b=Vi(u),x=ji(u),M={a:N,A:L,b:D,B:tt,c:null,d:ag,e:ag,f:z6,g:Z6,G:Q6,H:O6,I:F6,j:q6,L:lg,m:Y6,M:B6,p:Z,q:G,Q:cg,s:sg,S:U6,u:X6,U:W6,V:G6,w:H6,W:V6,x:null,X:null,y:j6,Y:K6,Z:J6,"%":ug},y={a:Q,A:at,b:Ut,B:Fe,c:null,d:fg,e:fg,f:rv,g:pv,G:hv,H:tv,I:ev,j:nv,L:pg,m:ov,M:iv,p:H,q:X,Q:cg,s:sg,S:av,u:fv,U:uv,V:cv,w:sv,W:lv,x:null,X:null,y:dv,Y:mv,Z:gv,"%":ug},w={a:F,A:_,b:R,B:O,c:P,d:og,e:og,f:D6,g:rg,G:ng,H:ig,I:ig,j:I6,L:N6,m:$6,M:E6,p:E,q:A6,Q:P6,s:L6,S:k6,u:M6,U:S6,V:T6,w:v6,W:_6,x:S,X:A,y:rg,Y:ng,Z:C6,"%":R6};M.x=v(n,M),M.X=v(r,M),M.c=v(e,M),y.x=v(n,y),y.X=v(r,y),y.c=v(e,y);function v($,q){return function(z){var C=[],j=-1,J=0,ot=$.length,lt,Xt,Zn;for(z instanceof Date||(z=new Date(+z));++j<ot;)$.charCodeAt(j)===37&&(C.push($.slice(J,j)),(Xt=eg[lt=$.charAt(++j)])!=null?lt=$.charAt(++j):Xt=lt==="e"?" ":"0",(Zn=q[lt])&&(lt=Zn(z,Xt)),C.push(lt),J=j+1);return C.push($.slice(J,j)),C.join("")}}function T($,q){return function(z){var C=Hi(1900,void 0,1),j=I(C,$,z+="",0),J,ot;if(j!=z.length)return null;if("Q"in C)return new Date(C.Q);if("s"in C)return new Date(C.s*1e3+("L"in C?C.L:0));if(q&&!("Z"in C)&&(C.Z=0),"p"in C&&(C.H=C.H%12+C.p*12),C.m===void 0&&(C.m="q"in C?C.q:0),"V"in C){if(C.V<1||C.V>53)return null;"w"in C||(C.w=1),"Z"in C?(J=Jl(Hi(C.y,0,1)),ot=J.getUTCDay(),J=ot>4||ot===0?zn.ceil(J):zn(J),J=yr.offset(J,(C.V-1)*7),C.y=J.getUTCFullYear(),C.m=J.getUTCMonth(),C.d=J.getUTCDate()+(C.w+6)%7):(J=Ql(Hi(C.y,0,1)),ot=J.getDay(),J=ot>4||ot===0?qn.ceil(J):qn(J),J=De.offset(J,(C.V-1)*7),C.y=J.getFullYear(),C.m=J.getMonth(),C.d=J.getDate()+(C.w+6)%7)}else("W"in C||"U"in C)&&("w"in C||(C.w="u"in C?C.u%7:"W"in C?1:0),ot="Z"in C?Jl(Hi(C.y,0,1)).getUTCDay():Ql(Hi(C.y,0,1)).getDay(),C.m=0,C.d="W"in C?(C.w+6)%7+C.W*7-(ot+5)%7:C.w+C.U*7-(ot+6)%7);return"Z"in C?(C.H+=C.Z/100|0,C.M+=C.Z%100,Jl(C)):Ql(C)}}function I($,q,z,C){for(var j=0,J=q.length,ot=z.length,lt,Xt;j<J;){if(C>=ot)return-1;if(lt=q.charCodeAt(j++),lt===37){if(lt=q.charAt(j++),Xt=w[lt in eg?q.charAt(j++):lt],!Xt||(C=Xt($,z,C))<0)return-1}else if(lt!=z.charCodeAt(C++))return-1}return C}function E($,q,z){var C=c.exec(q.slice(z));return C?($.p=s.get(C[0].toLowerCase()),z+C[0].length):-1}function F($,q,z){var C=p.exec(q.slice(z));return C?($.w=m.get(C[0].toLowerCase()),z+C[0].length):-1}function _($,q,z){var C=d.exec(q.slice(z));return C?($.w=l.get(C[0].toLowerCase()),z+C[0].length):-1}function R($,q,z){var C=b.exec(q.slice(z));return C?($.m=x.get(C[0].toLowerCase()),z+C[0].length):-1}function O($,q,z){var C=h.exec(q.slice(z));return C?($.m=g.get(C[0].toLowerCase()),z+C[0].length):-1}function P($,q,z){return I($,e,q,z)}function S($,q,z){return I($,n,q,z)}function A($,q,z){return I($,r,q,z)}function N($){return a[$.getDay()]}function L($){return i[$.getDay()]}function D($){return u[$.getMonth()]}function tt($){return f[$.getMonth()]}function Z($){return o[+($.getHours()>=12)]}function G($){return 1+~~($.getMonth()/3)}function Q($){return a[$.getUTCDay()]}function at($){return i[$.getUTCDay()]}function Ut($){return u[$.getUTCMonth()]}function Fe($){return f[$.getUTCMonth()]}function H($){return o[+($.getUTCHours()>=12)]}function X($){return 1+~~($.getUTCMonth()/3)}return{format:function($){var q=v($+="",M);return q.toString=function(){return $},q},parse:function($){var q=T($+="",!1);return q.toString=function(){return $},q},utcFormat:function($){var q=v($+="",y);return q.toString=function(){return $},q},utcParse:function($){var q=T($+="",!0);return q.toString=function(){return $},q}}}var eg={"-":"",_:" ",0:"0"},Pt=/^\s*\d+/,y6=/^%/,b6=/[\\^$*+?|[\]().{}]/g;function nt(t,e,n){var r=t<0?"-":"",o=(r?-t:t)+"",i=o.length;return r+(i<n?new Array(n-i+1).join(e)+o:o)}function w6(t){return t.replace(b6,"\\$&")}function Vi(t){return new RegExp("^(?:"+t.map(w6).join("|")+")","i")}function ji(t){return new Map(t.map((e,n)=>[e.toLowerCase(),n]))}function v6(t,e,n){var r=Pt.exec(e.slice(n,n+1));return r?(t.w=+r[0],n+r[0].length):-1}function M6(t,e,n){var r=Pt.exec(e.slice(n,n+1));return r?(t.u=+r[0],n+r[0].length):-1}function S6(t,e,n){var r=Pt.exec(e.slice(n,n+2));return r?(t.U=+r[0],n+r[0].length):-1}function T6(t,e,n){var r=Pt.exec(e.slice(n,n+2));return r?(t.V=+r[0],n+r[0].length):-1}function _6(t,e,n){var r=Pt.exec(e.slice(n,n+2));return r?(t.W=+r[0],n+r[0].length):-1}function ng(t,e,n){var r=Pt.exec(e.slice(n,n+4));return r?(t.y=+r[0],n+r[0].length):-1}function rg(t,e,n){var r=Pt.exec(e.slice(n,n+2));return r?(t.y=+r[0]+(+r[0]>68?1900:2e3),n+r[0].length):-1}function C6(t,e,n){var r=/^(Z)|([+-]\d\d)(?::?(\d\d))?/.exec(e.slice(n,n+6));return r?(t.Z=r[1]?0:-(r[2]+(r[3]||"00")),n+r[0].length):-1}function A6(t,e,n){var r=Pt.exec(e.slice(n,n+1));return r?(t.q=r[0]*3-3,n+r[0].length):-1}function $6(t,e,n){var r=Pt.exec(e.slice(n,n+2));return r?(t.m=r[0]-1,n+r[0].length):-1}function og(t,e,n){var r=Pt.exec(e.slice(n,n+2));return r?(t.d=+r[0],n+r[0].length):-1}function I6(t,e,n){var r=Pt.exec(e.slice(n,n+3));return r?(t.m=0,t.d=+r[0],n+r[0].length):-1}function ig(t,e,n){var r=Pt.exec(e.slice(n,n+2));return r?(t.H=+r[0],n+r[0].length):-1}function E6(t,e,n){var r=Pt.exec(e.slice(n,n+2));return r?(t.M=+r[0],n+r[0].length):-1}function k6(t,e,n){var r=Pt.exec(e.slice(n,n+2));return r?(t.S=+r[0],n+r[0].length):-1}function N6(t,e,n){var r=Pt.exec(e.slice(n,n+3));return r?(t.L=+r[0],n+r[0].length):-1}function D6(t,e,n){var r=Pt.exec(e.slice(n,n+6));return r?(t.L=Math.floor(r[0]/1e3),n+r[0].length):-1}function R6(t,e,n){var r=y6.exec(e.slice(n,n+1));return r?n+r[0].length:-1}function P6(t,e,n){var r=Pt.exec(e.slice(n));return r?(t.Q=+r[0],n+r[0].length):-1}function L6(t,e,n){var r=Pt.exec(e.slice(n));return r?(t.s=+r[0],n+r[0].length):-1}function ag(t,e){return nt(t.getDate(),e,2)}function O6(t,e){return nt(t.getHours(),e,2)}function F6(t,e){return nt(t.getHours()%12||12,e,2)}function q6(t,e){return nt(1+De.count(jt(t),t),e,3)}function lg(t,e){return nt(t.getMilliseconds(),e,3)}function z6(t,e){return lg(t,e)+"000"}function Y6(t,e){return nt(t.getMonth()+1,e,2)}function B6(t,e){return nt(t.getMinutes(),e,2)}function U6(t,e){return nt(t.getSeconds(),e,2)}function X6(t){var e=t.getDay();return e===0?7:e}function W6(t,e){return nt(ce.count(jt(t)-1,t),e,2)}function dg(t){var e=t.getDay();return e>=4||e===0?en(t):en.ceil(t)}function G6(t,e){return t=dg(t),nt(en.count(jt(t),t)+(jt(t).getDay()===4),e,2)}function H6(t){return t.getDay()}function V6(t,e){return nt(qn.count(jt(t)-1,t),e,2)}function j6(t,e){return nt(t.getFullYear()%100,e,2)}function Z6(t,e){return t=dg(t),nt(t.getFullYear()%100,e,2)}function K6(t,e){return nt(t.getFullYear()%1e4,e,4)}function Q6(t,e){var n=t.getDay();return t=n>=4||n===0?en(t):en.ceil(t),nt(t.getFullYear()%1e4,e,4)}function J6(t){var e=t.getTimezoneOffset();return(e>0?"-":(e*=-1,"+"))+nt(e/60|0,"0",2)+nt(e%60,"0",2)}function fg(t,e){return nt(t.getUTCDate(),e,2)}function tv(t,e){return nt(t.getUTCHours(),e,2)}function ev(t,e){return nt(t.getUTCHours()%12||12,e,2)}function nv(t,e){return nt(1+yr.count(Zt(t),t),e,3)}function pg(t,e){return nt(t.getUTCMilliseconds(),e,3)}function rv(t,e){return pg(t,e)+"000"}function ov(t,e){return nt(t.getUTCMonth()+1,e,2)}function iv(t,e){return nt(t.getUTCMinutes(),e,2)}function av(t,e){return nt(t.getUTCSeconds(),e,2)}function fv(t){var e=t.getUTCDay();return e===0?7:e}function uv(t,e){return nt(se.count(Zt(t)-1,t),e,2)}function mg(t){var e=t.getUTCDay();return e>=4||e===0?nn(t):nn.ceil(t)}function cv(t,e){return t=mg(t),nt(nn.count(Zt(t),t)+(Zt(t).getUTCDay()===4),e,2)}function sv(t){return t.getUTCDay()}function lv(t,e){return nt(zn.count(Zt(t)-1,t),e,2)}function dv(t,e){return nt(t.getUTCFullYear()%100,e,2)}function pv(t,e){return t=mg(t),nt(t.getUTCFullYear()%100,e,2)}function mv(t,e){return nt(t.getUTCFullYear()%1e4,e,4)}function hv(t,e){var n=t.getUTCDay();return t=n>=4||n===0?nn(t):nn.ceil(t),nt(t.getUTCFullYear()%1e4,e,4)}function gv(){return"+0000"}function ug(){return"%"}function cg(t){return+t}function sg(t){return Math.floor(+t/1e3)}var co,Un,hg,bn,gg;ed({dateTime:"%x, %X",date:"%-m/%-d/%Y",time:"%-I:%M:%S %p",periods:["AM","PM"],days:["Sunday","Monday","Tuesday","Wednesday","Thursday","Friday","Saturday"],shortDays:["Sun","Mon","Tue","Wed","Thu","Fri","Sat"],months:["January","February","March","April","May","June","July","August","September","October","November","December"],shortMonths:["Jan","Feb","Mar","Apr","May","Jun","Jul","Aug","Sep","Oct","Nov","Dec"]});function ed(t){return co=td(t),Un=co.format,hg=co.parse,bn=co.utcFormat,gg=co.utcParse,co}function xv(t){return new Date(t)}function yv(t){return t instanceof Date?+t:+new Date(+t)}function au(t,e,n,r,o,i,a,f,u,c){var s=Li(),d=s.invert,l=s.domain,p=c(".%L"),m=c(":%S"),h=c("%I:%M"),g=c("%I %p"),b=c("%a %d"),x=c("%b %d"),M=c("%B"),y=c("%Y");function w(v){return(u(v)<v?p:f(v)<v?m:a(v)<v?h:i(v)<v?g:r(v)<v?o(v)<v?b:x:n(v)<v?M:y)(v)}return s.invert=function(v){return new Date(d(v))},s.domain=function(v){return arguments.length?l(Array.from(v,yv)):l().map(xv)},s.ticks=function(v){var T=l();return t(T[0],T[T.length-1],v??10)},s.tickFormat=function(v,T){return T==null?w:c(T)},s.nice=function(v){var T=l();return(!v||typeof v.range!="function")&&(v=e(T[0],T[T.length-1],v??10)),v?l(Fi(T,v)):s},s.copy=function(){return Je(s,au(t,e,n,r,o,i,a,f,u,c))},s}function fu(){return _t.apply(au(Zl,Kl,jt,Yn,ce,De,On,Pn,Vt,Un).domain([new Date(2e3,0,1),new Date(2e3,0,2)]),arguments)}function uu(){return _t.apply(au(jl,Gi,Zt,Bn,se,yr,Fn,Ln,Vt,bn).domain([Date.UTC(2e3,0,1),Date.UTC(2e3,0,2)]),arguments)}function Zi(t,e){return e.domain(t.domain()).interpolator(t.interpolator()).clamp(t.clamp()).unknown(t.unknown())}function cu(){var t=0,e=.5,n=1,r=1,o,i,a,f,u,c=oe,s,d=!1,l;function p(h){return isNaN(h=+h)?l:(h=.5+((h=+s(h))-i)*(r*h<r*i?f:u),c(d?Math.max(0,Math.min(1,h)):h))}p.domain=function(h){return arguments.length?([t,e,n]=h,o=s(t=+t),i=s(e=+e),a=s(n=+n),f=o===i?0:.5/(i-o),u=i===a?0:.5/(a-i),r=i<o?-1:1,p):[t,e,n]},p.clamp=function(h){return arguments.length?(d=!!h,p):d},p.interpolator=function(h){return arguments.length?(c=h,p):c};function m(h){return function(g){var b,x,M;return arguments.length?([b,x,M]=g,c=We(h,[b,x,M]),p):[c(0),c(.5),c(1)]}}return p.range=m(Ee),p.rangeRound=m(fr),p.unknown=function(h){return arguments.length?(l=h,p):l},function(h){return s=h,o=h(t),i=h(e),a=h(n),f=o===i?0:.5/(i-o),u=i===a?0:.5/(a-i),r=i<o?-1:1,p}}function Ki(){var t=yn(cu()(oe));return t.copy=function(){return Zi(t,Ki())},Ri.apply(t,arguments)}function su(){var t=Xl(cu()).domain([.1,1,10]);return t.copy=function(){return Zi(t,su()).base(t.base())},Ri.apply(t,arguments)}function lu(){var t=Wl(cu());return t.copy=function(){return Zi(t,lu()).constant(t.constant())},Ri.apply(t,arguments)}function du(){var t=Gl(cu());return t.copy=function(){return Zi(t,du()).exponent(t.exponent())},Ri.apply(t,arguments)}function k(t){for(var e=t.length/6|0,n=new Array(e),r=0;r<e;)n[r]="#"+t.slice(r*6,++r*6);return n}var nd=k("1f77b4ff7f0e2ca02cd627289467bd8c564be377c27f7f7fbcbd2217becf");var rd=k("7fc97fbeaed4fdc086ffff99386cb0f0027fbf5b17666666");var od=k("1b9e77d95f027570b3e7298a66a61ee6ab02a6761d666666");var id=k("a6cee31f78b4b2df8a33a02cfb9a99e31a1cfdbf6fff7f00cab2d66a3d9affff99b15928");var ad=k("fbb4aeb3cde3ccebc5decbe4fed9a6ffffcce5d8bdfddaecf2f2f2");var fd=k("b3e2cdfdcdaccbd5e8f4cae4e6f5c9fff2aef1e2cccccccc");var ud=k("e41a1c377eb84daf4a984ea3ff7f00ffff33a65628f781bf999999");var cd=k("66c2a5fc8d628da0cbe78ac3a6d854ffd92fe5c494b3b3b3");var sd=k("8dd3c7ffffb3bebadafb807280b1d3fdb462b3de69fccde5d9d9d9bc80bdccebc5ffed6f");var ld=k("4e79a7f28e2ce1575976b7b259a14fedc949af7aa1ff9da79c755fbab0ab");var W=t=>ks(t[t.length-1]);var pu=new Array(3).concat("d8b365f5f5f55ab4ac","a6611adfc27d80cdc1018571","a6611adfc27df5f5f580cdc1018571","8c510ad8b365f6e8c3c7eae55ab4ac01665e","8c510ad8b365f6e8c3f5f5f5c7eae55ab4ac01665e","8c510abf812ddfc27df6e8c3c7eae580cdc135978f01665e","8c510abf812ddfc27df6e8c3f5f5f5c7eae580cdc135978f01665e","5430058c510abf812ddfc27df6e8c3c7eae580cdc135978f01665e003c30","5430058c510abf812ddfc27df6e8c3f5f5f5c7eae580cdc135978f01665e003c30").map(k),mu=W(pu);var hu=new Array(3).concat("af8dc3f7f7f77fbf7b","7b3294c2a5cfa6dba0008837","7b3294c2a5cff7f7f7a6dba0008837","762a83af8dc3e7d4e8d9f0d37fbf7b1b7837","762a83af8dc3e7d4e8f7f7f7d9f0d37fbf7b1b7837","762a839970abc2a5cfe7d4e8d9f0d3a6dba05aae611b7837","762a839970abc2a5cfe7d4e8f7f7f7d9f0d3a6dba05aae611b7837","40004b762a839970abc2a5cfe7d4e8d9f0d3a6dba05aae611b783700441b","40004b762a839970abc2a5cfe7d4e8f7f7f7d9f0d3a6dba05aae611b783700441b").map(k),gu=W(hu);var xu=new Array(3).concat("e9a3c9f7f7f7a1d76a","d01c8bf1b6dab8e1864dac26","d01c8bf1b6daf7f7f7b8e1864dac26","c51b7de9a3c9fde0efe6f5d0a1d76a4d9221","c51b7de9a3c9fde0eff7f7f7e6f5d0a1d76a4d9221","c51b7dde77aef1b6dafde0efe6f5d0b8e1867fbc414d9221","c51b7dde77aef1b6dafde0eff7f7f7e6f5d0b8e1867fbc414d9221","8e0152c51b7dde77aef1b6dafde0efe6f5d0b8e1867fbc414d9221276419","8e0152c51b7dde77aef1b6dafde0eff7f7f7e6f5d0b8e1867fbc414d9221276419").map(k),yu=W(xu);var bu=new Array(3).concat("998ec3f7f7f7f1a340","5e3c99b2abd2fdb863e66101","5e3c99b2abd2f7f7f7fdb863e66101","542788998ec3d8daebfee0b6f1a340b35806","542788998ec3d8daebf7f7f7fee0b6f1a340b35806","5427888073acb2abd2d8daebfee0b6fdb863e08214b35806","5427888073acb2abd2d8daebf7f7f7fee0b6fdb863e08214b35806","2d004b5427888073acb2abd2d8daebfee0b6fdb863e08214b358067f3b08","2d004b5427888073acb2abd2d8daebf7f7f7fee0b6fdb863e08214b358067f3b08").map(k),wu=W(bu);var Qi=new Array(3).concat("ef8a62f7f7f767a9cf","ca0020f4a58292c5de0571b0","ca0020f4a582f7f7f792c5de0571b0","b2182bef8a62fddbc7d1e5f067a9cf2166ac","b2182bef8a62fddbc7f7f7f7d1e5f067a9cf2166ac","b2182bd6604df4a582fddbc7d1e5f092c5de4393c32166ac","b2182bd6604df4a582fddbc7f7f7f7d1e5f092c5de4393c32166ac","67001fb2182bd6604df4a582fddbc7d1e5f092c5de4393c32166ac053061","67001fb2182bd6604df4a582fddbc7f7f7f7d1e5f092c5de4393c32166ac053061").map(k),so=W(Qi);var vu=new Array(3).concat("ef8a62ffffff999999","ca0020f4a582bababa404040","ca0020f4a582ffffffbababa404040","b2182bef8a62fddbc7e0e0e09999994d4d4d","b2182bef8a62fddbc7ffffffe0e0e09999994d4d4d","b2182bd6604df4a582fddbc7e0e0e0bababa8787874d4d4d","b2182bd6604df4a582fddbc7ffffffe0e0e0bababa8787874d4d4d","67001fb2182bd6604df4a582fddbc7e0e0e0bababa8787874d4d4d1a1a1a","67001fb2182bd6604df4a582fddbc7ffffffe0e0e0bababa8787874d4d4d1a1a1a").map(k),Mu=W(vu);var Ji=new Array(3).concat("fc8d59ffffbf91bfdb","d7191cfdae61abd9e92c7bb6","d7191cfdae61ffffbfabd9e92c7bb6","d73027fc8d59fee090e0f3f891bfdb4575b4","d73027fc8d59fee090ffffbfe0f3f891bfdb4575b4","d73027f46d43fdae61fee090e0f3f8abd9e974add14575b4","d73027f46d43fdae61fee090ffffbfe0f3f8abd9e974add14575b4","a50026d73027f46d43fdae61fee090e0f3f8abd9e974add14575b4313695","a50026d73027f46d43fdae61fee090ffffbfe0f3f8abd9e974add14575b4313695").map(k),lo=W(Ji);var Su=new Array(3).concat("fc8d59ffffbf91cf60","d7191cfdae61a6d96a1a9641","d7191cfdae61ffffbfa6d96a1a9641","d73027fc8d59fee08bd9ef8b91cf601a9850","d73027fc8d59fee08bffffbfd9ef8b91cf601a9850","d73027f46d43fdae61fee08bd9ef8ba6d96a66bd631a9850","d73027f46d43fdae61fee08bffffbfd9ef8ba6d96a66bd631a9850","a50026d73027f46d43fdae61fee08bd9ef8ba6d96a66bd631a9850006837","a50026d73027f46d43fdae61fee08bffffbfd9ef8ba6d96a66bd631a9850006837").map(k),Tu=W(Su);var _u=new Array(3).concat("fc8d59ffffbf99d594","d7191cfdae61abdda42b83ba","d7191cfdae61ffffbfabdda42b83ba","d53e4ffc8d59fee08be6f59899d5943288bd","d53e4ffc8d59fee08bffffbfe6f59899d5943288bd","d53e4ff46d43fdae61fee08be6f598abdda466c2a53288bd","d53e4ff46d43fdae61fee08bffffbfe6f598abdda466c2a53288bd","9e0142d53e4ff46d43fdae61fee08be6f598abdda466c2a53288bd5e4fa2","9e0142d53e4ff46d43fdae61fee08bffffbfe6f598abdda466c2a53288bd5e4fa2").map(k),Cu=W(_u);var Au=new Array(3).concat("e5f5f999d8c92ca25f","edf8fbb2e2e266c2a4238b45","edf8fbb2e2e266c2a42ca25f006d2c","edf8fbccece699d8c966c2a42ca25f006d2c","edf8fbccece699d8c966c2a441ae76238b45005824","f7fcfde5f5f9ccece699d8c966c2a441ae76238b45005824","f7fcfde5f5f9ccece699d8c966c2a441ae76238b45006d2c00441b").map(k),$u=W(Au);var Iu=new Array(3).concat("e0ecf49ebcda8856a7","edf8fbb3cde38c96c688419d","edf8fbb3cde38c96c68856a7810f7c","edf8fbbfd3e69ebcda8c96c68856a7810f7c","edf8fbbfd3e69ebcda8c96c68c6bb188419d6e016b","f7fcfde0ecf4bfd3e69ebcda8c96c68c6bb188419d6e016b","f7fcfde0ecf4bfd3e69ebcda8c96c68c6bb188419d810f7c4d004b").map(k),Eu=W(Iu);var ku=new Array(3).concat("e0f3dba8ddb543a2ca","f0f9e8bae4bc7bccc42b8cbe","f0f9e8bae4bc7bccc443a2ca0868ac","f0f9e8ccebc5a8ddb57bccc443a2ca0868ac","f0f9e8ccebc5a8ddb57bccc44eb3d32b8cbe08589e","f7fcf0e0f3dbccebc5a8ddb57bccc44eb3d32b8cbe08589e","f7fcf0e0f3dbccebc5a8ddb57bccc44eb3d32b8cbe0868ac084081").map(k),Nu=W(ku);var Du=new Array(3).concat("fee8c8fdbb84e34a33","fef0d9fdcc8afc8d59d7301f","fef0d9fdcc8afc8d59e34a33b30000","fef0d9fdd49efdbb84fc8d59e34a33b30000","fef0d9fdd49efdbb84fc8d59ef6548d7301f990000","fff7ecfee8c8fdd49efdbb84fc8d59ef6548d7301f990000","fff7ecfee8c8fdd49efdbb84fc8d59ef6548d7301fb300007f0000").map(k),Ru=W(Du);var Pu=new Array(3).concat("ece2f0a6bddb1c9099","f6eff7bdc9e167a9cf02818a","f6eff7bdc9e167a9cf1c9099016c59","f6eff7d0d1e6a6bddb67a9cf1c9099016c59","f6eff7d0d1e6a6bddb67a9cf3690c002818a016450","fff7fbece2f0d0d1e6a6bddb67a9cf3690c002818a016450","fff7fbece2f0d0d1e6a6bddb67a9cf3690c002818a016c59014636").map(k),Lu=W(Pu);var Ou=new Array(3).concat("ece7f2a6bddb2b8cbe","f1eef6bdc9e174a9cf0570b0","f1eef6bdc9e174a9cf2b8cbe045a8d","f1eef6d0d1e6a6bddb74a9cf2b8cbe045a8d","f1eef6d0d1e6a6bddb74a9cf3690c00570b0034e7b","fff7fbece7f2d0d1e6a6bddb74a9cf3690c00570b0034e7b","fff7fbece7f2d0d1e6a6bddb74a9cf3690c00570b0045a8d023858").map(k),Fu=W(Ou);var qu=new Array(3).concat("e7e1efc994c7dd1c77","f1eef6d7b5d8df65b0ce1256","f1eef6d7b5d8df65b0dd1c77980043","f1eef6d4b9dac994c7df65b0dd1c77980043","f1eef6d4b9dac994c7df65b0e7298ace125691003f","f7f4f9e7e1efd4b9dac994c7df65b0e7298ace125691003f","f7f4f9e7e1efd4b9dac994c7df65b0e7298ace125698004367001f").map(k),zu=W(qu);var Yu=new Array(3).concat("fde0ddfa9fb5c51b8a","feebe2fbb4b9f768a1ae017e","feebe2fbb4b9f768a1c51b8a7a0177","feebe2fcc5c0fa9fb5f768a1c51b8a7a0177","feebe2fcc5c0fa9fb5f768a1dd3497ae017e7a0177","fff7f3fde0ddfcc5c0fa9fb5f768a1dd3497ae017e7a0177","fff7f3fde0ddfcc5c0fa9fb5f768a1dd3497ae017e7a017749006a").map(k),Bu=W(Yu);var Uu=new Array(3).concat("edf8b17fcdbb2c7fb8","ffffcca1dab441b6c4225ea8","ffffcca1dab441b6c42c7fb8253494","ffffccc7e9b47fcdbb41b6c42c7fb8253494","ffffccc7e9b47fcdbb41b6c41d91c0225ea80c2c84","ffffd9edf8b1c7e9b47fcdbb41b6c41d91c0225ea80c2c84","ffffd9edf8b1c7e9b47fcdbb41b6c41d91c0225ea8253494081d58").map(k),Xu=W(Uu);var Wu=new Array(3).concat("f7fcb9addd8e31a354","ffffccc2e69978c679238443","ffffccc2e69978c67931a354006837","ffffccd9f0a3addd8e78c67931a354006837","ffffccd9f0a3addd8e78c67941ab5d238443005a32","ffffe5f7fcb9d9f0a3addd8e78c67941ab5d238443005a32","ffffe5f7fcb9d9f0a3addd8e78c67941ab5d238443006837004529").map(k),Gu=W(Wu);var Hu=new Array(3).concat("fff7bcfec44fd95f0e","ffffd4fed98efe9929cc4c02","ffffd4fed98efe9929d95f0e993404","ffffd4fee391fec44ffe9929d95f0e993404","ffffd4fee391fec44ffe9929ec7014cc4c028c2d04","ffffe5fff7bcfee391fec44ffe9929ec7014cc4c028c2d04","ffffe5fff7bcfee391fec44ffe9929ec7014cc4c02993404662506").map(k),Vu=W(Hu);var ju=new Array(3).concat("ffeda0feb24cf03b20","ffffb2fecc5cfd8d3ce31a1c","ffffb2fecc5cfd8d3cf03b20bd0026","ffffb2fed976feb24cfd8d3cf03b20bd0026","ffffb2fed976feb24cfd8d3cfc4e2ae31a1cb10026","ffffccffeda0fed976feb24cfd8d3cfc4e2ae31a1cb10026","ffffccffeda0fed976feb24cfd8d3cfc4e2ae31a1cbd0026800026").map(k),Zu=W(ju);var Ku=new Array(3).concat("deebf79ecae13182bd","eff3ffbdd7e76baed62171b5","eff3ffbdd7e76baed63182bd08519c","eff3ffc6dbef9ecae16baed63182bd08519c","eff3ffc6dbef9ecae16baed64292c62171b5084594","f7fbffdeebf7c6dbef9ecae16baed64292c62171b5084594","f7fbffdeebf7c6dbef9ecae16baed64292c62171b508519c08306b").map(k),Qu=W(Ku);var Ju=new Array(3).concat("e5f5e0a1d99b31a354","edf8e9bae4b374c476238b45","edf8e9bae4b374c47631a354006d2c","edf8e9c7e9c0a1d99b74c47631a354006d2c","edf8e9c7e9c0a1d99b74c47641ab5d238b45005a32","f7fcf5e5f5e0c7e9c0a1d99b74c47641ab5d238b45005a32","f7fcf5e5f5e0c7e9c0a1d99b74c47641ab5d238b45006d2c00441b").map(k),tc=W(Ju);var ec=new Array(3).concat("f0f0f0bdbdbd636363","f7f7f7cccccc969696525252","f7f7f7cccccc969696636363252525","f7f7f7d9d9d9bdbdbd969696636363252525","f7f7f7d9d9d9bdbdbd969696737373525252252525","fffffff0f0f0d9d9d9bdbdbd969696737373525252252525","fffffff0f0f0d9d9d9bdbdbd969696737373525252252525000000").map(k),nc=W(ec);var rc=new Array(3).concat("efedf5bcbddc756bb1","f2f0f7cbc9e29e9ac86a51a3","f2f0f7cbc9e29e9ac8756bb154278f","f2f0f7dadaebbcbddc9e9ac8756bb154278f","f2f0f7dadaebbcbddc9e9ac8807dba6a51a34a1486","fcfbfdefedf5dadaebbcbddc9e9ac8807dba6a51a34a1486","fcfbfdefedf5dadaebbcbddc9e9ac8807dba6a51a354278f3f007d").map(k),oc=W(rc);var ic=new Array(3).concat("fee0d2fc9272de2d26","fee5d9fcae91fb6a4acb181d","fee5d9fcae91fb6a4ade2d26a50f15","fee5d9fcbba1fc9272fb6a4ade2d26a50f15","fee5d9fcbba1fc9272fb6a4aef3b2ccb181d99000d","fff5f0fee0d2fcbba1fc9272fb6a4aef3b2ccb181d99000d","fff5f0fee0d2fcbba1fc9272fb6a4aef3b2ccb181da50f1567000d").map(k),ac=W(ic);var fc=new Array(3).concat("fee6cefdae6be6550d","feeddefdbe85fd8d3cd94701","feeddefdbe85fd8d3ce6550da63603","feeddefdd0a2fdae6bfd8d3ce6550da63603","feeddefdd0a2fdae6bfd8d3cf16913d948018c2d04","fff5ebfee6cefdd0a2fdae6bfd8d3cf16913d948018c2d04","fff5ebfee6cefdd0a2fdae6bfd8d3cf16913d94801a636037f2704").map(k),uc=W(fc);function cc(t){return t=Math.max(0,Math.min(1,t)),"rgb("+Math.max(0,Math.min(255,Math.round(-4.54-t*(35.34-t*(2381.73-t*(6402.7-t*(7024.72-t*2710.57)))))))+", "+Math.max(0,Math.min(255,Math.round(32.49+t*(170.73+t*(52.82-t*(131.46-t*(176.58-t*67.37)))))))+", "+Math.max(0,Math.min(255,Math.round(81.24+t*(442.36-t*(2482.43-t*(6167.24-t*(6614.94-t*2475.67)))))))+")"}var sc=Xr(te(300,.5,0),te(-240,.5,1));var dc=Xr(te(-100,.75,.35),te(80,1.5,.8)),pc=Xr(te(260,.75,.35),te(80,1.5,.8)),lc=te();function mc(t){(t<0||t>1)&&(t-=Math.floor(t));var e=Math.abs(t-.5);return lc.h=360*t-100,lc.s=1.5-1.5*e,lc.l=.8-.9*e,lc+""}var hc=be(),bv=Math.PI/3,wv=Math.PI*2/3;function gc(t){var e;return t=(.5-t)*Math.PI,hc.r=255*(e=Math.sin(t))*e,hc.g=255*(e=Math.sin(t+bv))*e,hc.b=255*(e=Math.sin(t+wv))*e,hc+""}function xc(t){return t=Math.max(0,Math.min(1,t)),"rgb("+Math.max(0,Math.min(255,Math.round(34.61+t*(1172.33-t*(10793.56-t*(33300.12-t*(38394.49-t*14825.05)))))))+", "+Math.max(0,Math.min(255,Math.round(23.31+t*(557.33+t*(1225.33-t*(3574.96-t*(1073.77+t*707.56)))))))+", "+Math.max(0,Math.min(255,Math.round(27.2+t*(3211.1-t*(15327.97-t*(27814-t*(22569.18-t*6838.66)))))))+")"}function yc(t){var e=t.length;return function(n){return t[Math.max(0,Math.min(e-1,Math.floor(n*e)))]}}var bc=yc(k("44015444025645045745055946075a46085c460a5d460b5e470d60470e6147106347116447136548146748166848176948186a481a6c481b6d481c6e481d6f481f70482071482173482374482475482576482677482878482979472a7a472c7a472d7b472e7c472f7d46307e46327e46337f463480453581453781453882443983443a83443b84433d84433e85423f854240864241864142874144874045884046883f47883f48893e49893e4a893e4c8a3d4d8a3d4e8a3c4f8a3c508b3b518b3b528b3a538b3a548c39558c39568c38588c38598c375a8c375b8d365c8d365d8d355e8d355f8d34608d34618d33628d33638d32648e32658e31668e31678e31688e30698e306a8e2f6b8e2f6c8e2e6d8e2e6e8e2e6f8e2d708e2d718e2c718e2c728e2c738e2b748e2b758e2a768e2a778e2a788e29798e297a8e297b8e287c8e287d8e277e8e277f8e27808e26818e26828e26828e25838e25848e25858e24868e24878e23888e23898e238a8d228b8d228c8d228d8d218e8d218f8d21908d21918c20928c20928c20938c1f948c1f958b1f968b1f978b1f988b1f998a1f9a8a1e9b8a1e9c891e9d891f9e891f9f881fa0881fa1881fa1871fa28720a38620a48621a58521a68522a78522a88423a98324aa8325ab8225ac8226ad8127ad8128ae8029af7f2ab07f2cb17e2db27d2eb37c2fb47c31b57b32b67a34b67935b77937b87838b9773aba763bbb753dbc743fbc7340bd7242be7144bf7046c06f48c16e4ac16d4cc26c4ec36b50c46a52c56954c56856c66758c7655ac8645cc8635ec96260ca6063cb5f65cb5e67cc5c69cd5b6ccd5a6ece5870cf5773d05675d05477d1537ad1517cd2507fd34e81d34d84d44b86d54989d5488bd6468ed64590d74393d74195d84098d83e9bd93c9dd93ba0da39a2da37a5db36a8db34aadc32addc30b0dd2fb2dd2db5de2bb8de29bade28bddf26c0df25c2df23c5e021c8e020cae11fcde11dd0e11cd2e21bd5e21ad8e219dae319dde318dfe318e2e418e5e419e7e419eae51aece51befe51cf1e51df4e61ef6e620f8e621fbe723fde725")),wc=yc(k("00000401000501010601010802010902020b02020d03030f03031204041405041606051806051a07061c08071e0907200a08220b09240c09260d0a290e0b2b100b2d110c2f120d31130d34140e36150e38160f3b180f3d19103f1a10421c10441d11471e114920114b21114e22115024125325125527125829115a2a115c2c115f2d11612f116331116533106734106936106b38106c390f6e3b0f703d0f713f0f72400f74420f75440f764510774710784910784a10794c117a4e117b4f127b51127c52137c54137d56147d57157e59157e5a167e5c167f5d177f5f187f601880621980641a80651a80671b80681c816a1c816b1d816d1d816e1e81701f81721f817320817521817621817822817922827b23827c23827e24828025828125818326818426818627818827818928818b29818c29818e2a81902a81912b81932b80942c80962c80982d80992d809b2e7f9c2e7f9e2f7fa02f7fa1307ea3307ea5317ea6317da8327daa337dab337cad347cae347bb0357bb2357bb3367ab5367ab73779b83779ba3878bc3978bd3977bf3a77c03a76c23b75c43c75c53c74c73d73c83e73ca3e72cc3f71cd4071cf4070d0416fd2426fd3436ed5446dd6456cd8456cd9466bdb476adc4869de4968df4a68e04c67e24d66e34e65e44f64e55064e75263e85362e95462ea5661eb5760ec5860ed5a5fee5b5eef5d5ef05f5ef1605df2625df2645cf3655cf4675cf4695cf56b5cf66c5cf66e5cf7705cf7725cf8745cf8765cf9785df9795df97b5dfa7d5efa7f5efa815ffb835ffb8560fb8761fc8961fc8a62fc8c63fc8e64fc9065fd9266fd9467fd9668fd9869fd9a6afd9b6bfe9d6cfe9f6dfea16efea36ffea571fea772fea973feaa74feac76feae77feb078feb27afeb47bfeb67cfeb77efeb97ffebb81febd82febf84fec185fec287fec488fec68afec88cfeca8dfecc8ffecd90fecf92fed194fed395fed597fed799fed89afdda9cfddc9efddea0fde0a1fde2a3fde3a5fde5a7fde7a9fde9aafdebacfcecaefceeb0fcf0b2fcf2b4fcf4b6fcf6b8fcf7b9fcf9bbfcfbbdfcfdbf")),vc=yc(k("00000401000501010601010802010a02020c02020e03021004031204031405041706041907051b08051d09061f0a07220b07240c08260d08290e092b10092d110a30120a32140b34150b37160b39180c3c190c3e1b0c411c0c431e0c451f0c48210c4a230c4c240c4f260c51280b53290b552b0b572d0b592f0a5b310a5c320a5e340a5f3609613809623909633b09643d09653e0966400a67420a68440a68450a69470b6a490b6a4a0c6b4c0c6b4d0d6c4f0d6c510e6c520e6d540f6d550f6d57106e59106e5a116e5c126e5d126e5f136e61136e62146e64156e65156e67166e69166e6a176e6c186e6d186e6f196e71196e721a6e741a6e751b6e771c6d781c6d7a1d6d7c1d6d7d1e6d7f1e6c801f6c82206c84206b85216b87216b88226a8a226a8c23698d23698f24699025689225689326679526679727669827669a28659b29649d29649f2a63a02a63a22b62a32c61a52c60a62d60a82e5fa92e5eab2f5ead305dae305cb0315bb1325ab3325ab43359b63458b73557b93556ba3655bc3754bd3853bf3952c03a51c13a50c33b4fc43c4ec63d4dc73e4cc83f4bca404acb4149cc4248ce4347cf4446d04545d24644d34743d44842d54a41d74b3fd84c3ed94d3dda4e3cdb503bdd513ade5238df5337e05536e15635e25734e35933e45a31e55c30e65d2fe75e2ee8602de9612bea632aeb6429eb6628ec6726ed6925ee6a24ef6c23ef6e21f06f20f1711ff1731df2741cf3761bf37819f47918f57b17f57d15f67e14f68013f78212f78410f8850ff8870ef8890cf98b0bf98c0af98e09fa9008fa9207fa9407fb9606fb9706fb9906fb9b06fb9d07fc9f07fca108fca309fca50afca60cfca80dfcaa0ffcac11fcae12fcb014fcb216fcb418fbb61afbb81dfbba1ffbbc21fbbe23fac026fac228fac42afac62df9c72ff9c932f9cb35f8cd37f8cf3af7d13df7d340f6d543f6d746f5d949f5db4cf4dd4ff4df53f4e156f3e35af3e55df2e661f2e865f2ea69f1ec6df1ed71f1ef75f1f179f2f27df2f482f3f586f3f68af4f88ef5f992f6fa96f8fb9af9fc9dfafda1fcffa4")),Mc=yc(k("0d088710078813078916078a19068c1b068d1d068e20068f2206902406912605912805922a05932c05942e05952f059631059733059735049837049938049a3a049a3c049b3e049c3f049c41049d43039e44039e46039f48039f4903a04b03a14c02a14e02a25002a25102a35302a35502a45601a45801a45901a55b01a55c01a65e01a66001a66100a76300a76400a76600a76700a86900a86a00a86c00a86e00a86f00a87100a87201a87401a87501a87701a87801a87a02a87b02a87d03a87e03a88004a88104a78305a78405a78606a68707a68808a68a09a58b0aa58d0ba58e0ca48f0da4910ea3920fa39410a29511a19613a19814a099159f9a169f9c179e9d189d9e199da01a9ca11b9ba21d9aa31e9aa51f99a62098a72197a82296aa2395ab2494ac2694ad2793ae2892b02991b12a90b22b8fb32c8eb42e8db52f8cb6308bb7318ab83289ba3388bb3488bc3587bd3786be3885bf3984c03a83c13b82c23c81c33d80c43e7fc5407ec6417dc7427cc8437bc9447aca457acb4679cc4778cc4977cd4a76ce4b75cf4c74d04d73d14e72d24f71d35171d45270d5536fd5546ed6556dd7566cd8576bd9586ada5a6ada5b69db5c68dc5d67dd5e66de5f65de6164df6263e06363e16462e26561e26660e3685fe4695ee56a5de56b5de66c5ce76e5be76f5ae87059e97158e97257ea7457eb7556eb7655ec7754ed7953ed7a52ee7b51ef7c51ef7e50f07f4ff0804ef1814df1834cf2844bf3854bf3874af48849f48948f58b47f58c46f68d45f68f44f79044f79143f79342f89441f89540f9973ff9983ef99a3efa9b3dfa9c3cfa9e3bfb9f3afba139fba238fca338fca537fca636fca835fca934fdab33fdac33fdae32fdaf31fdb130fdb22ffdb42ffdb52efeb72dfeb82cfeba2cfebb2bfebd2afebe2afec029fdc229fdc328fdc527fdc627fdc827fdca26fdcb26fccd25fcce25fcd025fcd225fbd324fbd524fbd724fad824fada24f9dc24f9dd25f8df25f8e125f7e225f7e425f6e626f6e826f5e926f5eb27f4ed27f3ee27f3f027f2f227f1f426f1f525f0f724f0f921"));var dd=Math.cos;var po=Math.min,ta=Math.sin,rt=Math.sqrt;var vr=Math.PI,eL=vr/2,mo=2*vr;var vv=rt(3),ea={draw(t,e){let n=rt(e+po(e/28,.75))*.59436,r=n/2,o=r*vv;t.moveTo(0,n),t.lineTo(0,-n),t.moveTo(-o,-r),t.lineTo(o,r),t.moveTo(-o,r),t.lineTo(o,-r)}};var ho={draw(t,e){let n=rt(e/vr);t.moveTo(n,0),t.arc(0,0,n,0,mo)}};var na={draw(t,e){let n=rt(e/5)/2;t.moveTo(-3*n,-n),t.lineTo(-n,-n),t.lineTo(-n,-3*n),t.lineTo(n,-3*n),t.lineTo(n,-n),t.lineTo(3*n,-n),t.lineTo(3*n,n),t.lineTo(n,n),t.lineTo(n,3*n),t.lineTo(-n,3*n),t.lineTo(-n,n),t.lineTo(-3*n,n),t.closePath()}};var xg=rt(1/3),Mv=xg*2,ra={draw(t,e){let n=rt(e/Mv),r=n*xg;t.moveTo(0,-n),t.lineTo(r,0),t.lineTo(0,n),t.lineTo(-r,0),t.closePath()}};var oa={draw(t,e){let n=rt(e)*.62625;t.moveTo(0,-n),t.lineTo(n,0),t.lineTo(0,n),t.lineTo(-n,0),t.closePath()}};var ia={draw(t,e){let n=rt(e-po(e/7,2))*.87559;t.moveTo(-n,0),t.lineTo(n,0),t.moveTo(0,n),t.lineTo(0,-n)}};var aa={draw(t,e){let n=rt(e),r=-n/2;t.rect(r,r,n,n)}};var fa={draw(t,e){let n=rt(e)*.4431;t.moveTo(n,n),t.lineTo(n,-n),t.lineTo(-n,-n),t.lineTo(-n,n),t.closePath()}};var Sv=.8908130915292852,yg=ta(vr/10)/ta(7*vr/10),Tv=ta(mo/10)*yg,_v=-dd(mo/10)*yg,ua={draw(t,e){let n=rt(e*Sv),r=Tv*n,o=_v*n;t.moveTo(0,-n),t.lineTo(r,o);for(let i=1;i<5;++i){let a=mo*i/5,f=dd(a),u=ta(a);t.lineTo(u*n,-f*n),t.lineTo(f*r-u*o,u*r+f*o)}t.closePath()}};var pd=rt(3),ca={draw(t,e){let n=-rt(e/(pd*3));t.moveTo(0,n*2),t.lineTo(-pd*n,-n),t.lineTo(pd*n,-n),t.closePath()}};var Cv=rt(3),sa={draw(t,e){let n=rt(e)*.6824,r=n/2,o=n*Cv/2;t.moveTo(0,-n),t.lineTo(o,r),t.lineTo(-o,r),t.closePath()}};var Me=-.5,Se=rt(3)/2,md=1/rt(12),Av=(md/2+1)*3,la={draw(t,e){let n=rt(e/Av),r=n/2,o=n*md,i=r,a=n*md+n,f=-i,u=a;t.moveTo(r,o),t.lineTo(i,a),t.lineTo(f,u),t.lineTo(Me*r-Se*o,Se*r+Me*o),t.lineTo(Me*i-Se*a,Se*i+Me*a),t.lineTo(Me*f-Se*u,Se*f+Me*u),t.lineTo(Me*r+Se*o,Me*o-Se*r),t.lineTo(Me*i+Se*a,Me*a-Se*i),t.lineTo(Me*f+Se*u,Me*u-Se*f),t.closePath()}};var go={draw(t,e){let n=rt(e-po(e/6,1.7))*.6189;t.moveTo(-n,-n),t.lineTo(n,n),t.moveTo(-n,n),t.lineTo(n,-n)}};var Sc=[ho,na,ra,aa,ua,ca,la],hd=[ho,ia,go,sa,ea,fa,oa];function Xn(t,e,n){this.k=t,this.x=e,this.y=n}Xn.prototype={constructor:Xn,scale:function(t){return t===1?this:new Xn(this.k*t,this.x,this.y)},translate:function(t,e){return t===0&e===0?this:new Xn(this.k,this.x+this.k*t,this.y+this.k*e)},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 gd=new Xn(1,0,0);xd.prototype=Xn.prototype;function xd(t){for(;!t.__zoom;)if(!(t=t.parentNode))return gd;return t.__zoom}function Re(t){return t!=null&&!Number.isNaN(t)}function Kt(t,e){return+Re(e)-+Re(t)||bt(t,e)}function Mr(t,e){return+Re(e)-+Re(t)||xe(t,e)}function Tc(t){return t!=null&&`${t}`!=""}function yd(t){return isFinite(t)?t:NaN}function da(t){return t>0&&isFinite(t)?t:NaN}function _c(t){return t<0&&isFinite(t)?t:NaN}function Cc(t,e){if(t instanceof Date||(t=new Date(+t)),isNaN(t))return typeof e=="function"?e(t):e;let n=t.getUTCHours(),r=t.getUTCMinutes(),o=t.getUTCSeconds(),i=t.getUTCMilliseconds();return`${Iv(t.getUTCFullYear(),4)}-${wn(t.getUTCMonth()+1,2)}-${wn(t.getUTCDate(),2)}${n||r||o||i?`T${wn(n,2)}:${wn(r,2)}${o||i?`:${wn(o,2)}${i?`.${wn(i,3)}`:""}`:""}Z`:""}`}function Iv(t){return t<0?`-${wn(-t,6)}`:t>9999?`+${wn(t,6)}`:wn(t,4)}function wn(t,e){return`${t}`.padStart(e,"0")}var Ev=/^(?:[-+]\d{2})?\d{4}(?:-\d{2}(?:-\d{2})?)?(?:T\d{2}:\d{2}(?::\d{2}(?:\.\d{3})?)?(?:Z|[-+]\d{2}:?\d{2})?)?$/;function pa(t,e){return Ev.test(t+="")?new Date(t):typeof e=="function"?e(t):e}var Ac=1e3,bd=Ac*60,wd=bd*60,ha=wd*24,kv=ha*7,bg=ha*30,Nv=ha*365,ma=[["millisecond",.5*Ac],["second",Ac],["second",30*Ac],["minute",bd],["minute",30*bd],["hour",wd],["hour",12*wd],["day",ha],["day",2*ha],["week",kv],["month",bg],["month",3*bg],["year",Nv]],Dv=new Map([["second",Vt],["minute",Pn],["hour",On],["day",De],["week",ce],["month",Yn],["year",jt],["monday",qn],["tuesday",Qf],["wednesday",Jf],["thursday",en],["friday",tu],["saturday",eu],["sunday",ce]]),Rv=new Map([["second",Vt],["minute",Ln],["hour",Fn],["day",uo],["week",se],["month",Bn],["year",Zt],["monday",zn],["tuesday",nu],["wednesday",ru],["thursday",nn],["friday",ou],["saturday",iu],["sunday",se]]);function wg(t,e){let n=`${t}`.toLowerCase();n.endsWith("s")&&(n=n.slice(0,-1));let r=1,o=/^(?:(\d+)\s+)/.exec(n);switch(o&&(n=n.slice(o[0].length),r=+o[1]),n){case"quarter":n="month",r*=3;break;case"half":n="month",r*=6;break}let i=e.get(n);if(!i)throw new Error(`unknown interval: ${t}`);if(!(r>1))return i;if(!i.every)throw new Error(`non-periodic interval: ${n}`);return i.every(r)}function vg(t){return wg(t,Dv)}function $c(t){return wg(t,Rv)}function Mg(t){if(!t)return!1;let e=t.floor(new Date(Date.UTC(2e3,11,31)));return Zt(e)>=e}function Sg(t){if(!t)return!1;let e=t.floor(new Date(2e3,11,31));return jt(e)>=e}function Tg(t,e,n,r){let o=t.type==="time"?Un:bn,i=r==="left"||r==="right"?(a,f)=>`
+"use strict";(()=>{function bt(t,e){return t==null||e==null?NaN:t<e?-1:t>e?1:t>=e?0:NaN}function xe(t,e){return t==null||e==null?NaN:e<t?-1:e>t?1:e>=t?0:NaN}function qe(t){let e,n,r;t.length!==2?(e=bt,n=(f,u)=>bt(t(f),u),r=(f,u)=>t(f)-u):(e=t===bt||t===xe?t:qy,n=t,r=t);function o(f,u,c=0,s=f.length){if(c<s){if(e(u,u)!==0)return s;do{let d=c+s>>>1;n(f[d],u)<0?c=d+1:s=d}while(c<s)}return c}function i(f,u,c=0,s=f.length){if(c<s){if(e(u,u)!==0)return s;do{let d=c+s>>>1;n(f[d],u)<=0?c=d+1:s=d}while(c<s)}return c}function a(f,u,c=0,s=f.length){let d=o(f,u,c,s-1);return d>c&&r(f[d-1],u)>-r(f[d],u)?d-1:d}return{left:o,center:a,right:i}}function qy(){return 0}function Ho(t){return t===null?NaN:+t}function*Fp(t,e){if(e===void 0)for(let n of t)n!=null&&(n=+n)>=n&&(yield n);else{let n=-1;for(let r of t)(r=e(r,++n,t))!=null&&(r=+r)>=r&&(yield r)}}var qp=qe(bt),zp=qp.right,zy=qp.left,Yy=qe(Ho).center,un=zp;function Jn(t,e){let n=0;if(e===void 0)for(let r of t)r!=null&&(r=+r)>=r&&++n;else{let r=-1;for(let o of t)(o=e(o,++r,t))!=null&&(o=+o)>=o&&++n}return n}function By(t){return t.length|0}function Uy(t){return!(t>0)}function Xy(t){return typeof t!="object"||"length"in t?t:Array.from(t)}function Hy(t){return e=>t(...e)}function Fa(...t){let e=typeof t[t.length-1]=="function"&&Hy(t.pop());t=t.map(Xy);let n=t.map(By),r=t.length-1,o=new Array(r+1).fill(0),i=[];if(r<0||n.some(Uy))return i;for(;;){i.push(o.map((f,u)=>t[u][f]));let a=r;for(;++o[a]===n[a];){if(a===0)return e?i.map(e):i;o[a--]=0}}}function qa(t,e){var n=0,r=0;return Float64Array.from(t,e===void 0?o=>n+=+o||0:o=>n+=+e(o,r++,t)||0)}function Rr(t,e){let n=0,r,o=0,i=0;if(e===void 0)for(let a of t)a!=null&&(a=+a)>=a&&(r=a-o,o+=r/++n,i+=r*(a-o));else{let a=-1;for(let f of t)(f=e(f,++a,t))!=null&&(f=+f)>=f&&(r=f-o,o+=r/++n,i+=r*(f-o))}if(n>1)return i/(n-1)}function Lr(t,e){let n=Rr(t,e);return n&&Math.sqrt(n)}function Ct(t,e){let n,r;if(e===void 0)for(let o of t)o!=null&&(n===void 0?o>=o&&(n=r=o):(n>o&&(n=o),r<o&&(r=o)));else{let o=-1;for(let i of t)(i=e(i,++o,t))!=null&&(n===void 0?i>=i&&(n=r=i):(n>i&&(n=i),r<i&&(r=i)))}return[n,r]}var ae=class{constructor(){this._partials=new Float64Array(32),this._n=0}add(e){let n=this._partials,r=0;for(let o=0;o<this._n&&o<32;o++){let i=n[o],a=e+i,f=Math.abs(e)<Math.abs(i)?e-(a-i):i-(a-e);f&&(n[r++]=f),e=a}return n[r]=e,this._n=r+1,this}valueOf(){let e=this._partials,n=this._n,r,o,i,a=0;if(n>0){for(a=e[--n];n>0&&(r=a,o=e[--n],a=r+o,i=o-(a-r),!i););n>0&&(i<0&&e[n-1]<0||i>0&&e[n-1]>0)&&(o=i*2,r=a+o,o==r-a&&(a=r))}return a}};var Qt=class extends Map{constructor(e,n=Up){if(super(),Object.defineProperties(this,{_intern:{value:new Map},_key:{value:n}}),e!=null)for(let[r,o]of e)this.set(r,o)}get(e){return super.get(us(this,e))}has(e){return super.has(us(this,e))}set(e,n){return super.set(Yp(this,e),n)}delete(e){return super.delete(Bp(this,e))}},Ce=class extends Set{constructor(e,n=Up){if(super(),Object.defineProperties(this,{_intern:{value:new Map},_key:{value:n}}),e!=null)for(let r of e)this.add(r)}has(e){return super.has(us(this,e))}add(e){return super.add(Yp(this,e))}delete(e){return super.delete(Bp(this,e))}};function us({_intern:t,_key:e},n){let r=e(n);return t.has(r)?t.get(r):n}function Yp({_intern:t,_key:e},n){let r=e(n);return t.has(r)?t.get(r):(t.set(r,n),n)}function Bp({_intern:t,_key:e},n){let r=e(n);return t.has(r)&&(n=t.get(r),t.delete(r)),n}function Up(t){return t!==null&&typeof t=="object"?t.valueOf():t}function Wo(t){return t}function cn(t,...e){return ss(t,Wo,Wo,e)}function Ae(t,e,...n){return ss(t,Wo,e,n)}function cs(t,e,...n){return ss(t,Array.from,e,n)}function ss(t,e,n,r){return function o(i,a){if(a>=r.length)return n(i);let f=new Qt,u=r[a++],c=-1;for(let s of i){let d=u(s,++c,i),l=f.get(d);l?l.push(s):f.set(d,[s])}for(let[s,d]of f)f.set(s,o(d,a));return e(f)}(t,0)}function ls(t,e){return Array.from(e,n=>t[n])}function ze(t,...e){if(typeof t[Symbol.iterator]!="function")throw new TypeError("values is not iterable");t=Array.from(t);let[n]=e;if(n&&n.length!==2||e.length>1){let r=Uint32Array.from(t,(o,i)=>i);return e.length>1?(e=e.map(o=>t.map(o)),r.sort((o,i)=>{for(let a of e){let f=Go(a[o],a[i]);if(f)return f}})):(n=t.map(n),r.sort((o,i)=>Go(n[o],n[i]))),ls(t,r)}return t.sort(ds(n))}function ds(t=bt){if(t===bt)return Go;if(typeof t!="function")throw new TypeError("compare is not a function");return(e,n)=>{let r=t(e,n);return r||r===0?r:(t(n,n)===0)-(t(e,e)===0)}}function Go(t,e){return(t==null||!(t>=t))-(e==null||!(e>=e))||(t<e?-1:t>e?1:0)}function Pr(t,e,n){return(e.length!==2?ze(Ae(t,e,n),([r,o],[i,a])=>bt(o,a)||bt(r,i)):ze(cn(t,n),([r,o],[i,a])=>e(o,a)||bt(r,i))).map(([r])=>r)}var Wy=Math.sqrt(50),Gy=Math.sqrt(10),Vy=Math.sqrt(2);function za(t,e,n){let r=(e-t)/Math.max(0,n),o=Math.floor(Math.log10(r)),i=r/Math.pow(10,o),a=i>=Wy?10:i>=Gy?5:i>=Vy?2:1,f,u,c;return o<0?(c=Math.pow(10,-o)/a,f=Math.round(t*c),u=Math.round(e*c),f/c<t&&++f,u/c>e&&--u,c=-c):(c=Math.pow(10,o)*a,f=Math.round(t/c),u=Math.round(e/c),f*c<t&&++f,u*c>e&&--u),u<f&&.5<=n&&n<2?za(t,e,n*2):[f,u,c]}function $e(t,e,n){if(e=+e,t=+t,n=+n,!(n>0))return[];if(t===e)return[t];let r=e<t,[o,i,a]=r?za(e,t,n):za(t,e,n);if(!(i>=o))return[];let f=i-o+1,u=new Array(f);if(r)if(a<0)for(let c=0;c<f;++c)u[c]=(i-c)/-a;else for(let c=0;c<f;++c)u[c]=(i-c)*a;else if(a<0)for(let c=0;c<f;++c)u[c]=(o+c)/-a;else for(let c=0;c<f;++c)u[c]=(o+c)*a;return u}function tr(t,e,n){return e=+e,t=+t,n=+n,za(t,e,n)[2]}function Or(t,e,n){e=+e,t=+t,n=+n;let r=e<t,o=r?tr(e,t,n):tr(t,e,n);return(r?-1:1)*(o<0?1/-o:o)}function Ya(t){return Math.max(1,Math.ceil(Math.log(Jn(t))/Math.LN2)+1)}function Ht(t,e){let n;if(e===void 0)for(let r of t)r!=null&&(n<r||n===void 0&&r>=r)&&(n=r);else{let r=-1;for(let o of t)(o=e(o,++r,t))!=null&&(n<o||n===void 0&&o>=o)&&(n=o)}return n}function Ba(t,e){let n,r=-1,o=-1;if(e===void 0)for(let i of t)++o,i!=null&&(n<i||n===void 0&&i>=i)&&(n=i,r=o);else for(let i of t)(i=e(i,++o,t))!=null&&(n<i||n===void 0&&i>=i)&&(n=i,r=o);return r}function Jt(t,e){let n;if(e===void 0)for(let r of t)r!=null&&(n>r||n===void 0&&r>=r)&&(n=r);else{let r=-1;for(let o of t)(o=e(o,++r,t))!=null&&(n>o||n===void 0&&o>=o)&&(n=o)}return n}function Ua(t,e){let n,r=-1,o=-1;if(e===void 0)for(let i of t)++o,i!=null&&(n>i||n===void 0&&i>=i)&&(n=i,r=o);else for(let i of t)(i=e(i,++o,t))!=null&&(n>i||n===void 0&&i>=i)&&(n=i,r=o);return r}function Xa(t,e,n=0,r=1/0,o){if(e=Math.floor(e),n=Math.floor(Math.max(0,n)),r=Math.floor(Math.min(t.length-1,r)),!(n<=e&&e<=r))return t;for(o=o===void 0?Go:ds(o);r>n;){if(r-n>600){let u=r-n+1,c=e-n+1,s=Math.log(u),d=.5*Math.exp(2*s/3),l=.5*Math.sqrt(s*d*(u-d)/u)*(c-u/2<0?-1:1),p=Math.max(n,Math.floor(e-c*d/u+l)),m=Math.min(r,Math.floor(e+(u-c)*d/u+l));Xa(t,e,p,m,o)}let i=t[e],a=n,f=r;for(Vo(t,n,e),o(t[r],i)>0&&Vo(t,n,r);a<f;){for(Vo(t,a,f),++a,--f;o(t[a],i)<0;)++a;for(;o(t[f],i)>0;)--f}o(t[n],i)===0?Vo(t,n,f):(++f,Vo(t,f,r)),f<=e&&(n=f+1),e<=f&&(r=f-1)}return t}function Vo(t,e,n){let r=t[e];t[e]=t[n],t[n]=r}function jo(t,e=bt){let n,r=!1;if(e.length===1){let o;for(let i of t){let a=e(i);(r?bt(a,o)>0:bt(a,a)===0)&&(n=i,o=a,r=!0)}}else for(let o of t)(r?e(o,n)>0:e(o,o)===0)&&(n=o,r=!0);return n}function ye(t,e,n){if(t=Float64Array.from(Fp(t,n)),!(!(r=t.length)||isNaN(e=+e))){if(e<=0||r<2)return Jt(t);if(e>=1)return Ht(t);var r,o=(r-1)*e,i=Math.floor(o),a=Ht(Xa(t,i).subarray(0,i+1)),f=Jt(t.subarray(i+1));return a+(f-a)*(o-i)}}function ps(t,e,n=Ho){if(!(!(r=t.length)||isNaN(e=+e))){if(e<=0||r<2)return+n(t[0],0,t);if(e>=1)return+n(t[r-1],r-1,t);var r,o=(r-1)*e,i=Math.floor(o),a=+n(t[i],i,t),f=+n(t[i+1],i+1,t);return a+(f-a)*(o-i)}}function Ha(t,e,n){let r=Jn(t),o=ye(t,.75)-ye(t,.25);return r&&o?Math.ceil((n-e)/(2*o*Math.pow(r,-1/3))):1}function Zo(t,e,n){let r=Jn(t),o=Lr(t);return r&&o?Math.ceil((n-e)*Math.cbrt(r)/(3.49*o)):1}function Wa(t,e){let n=0,r=0;if(e===void 0)for(let o of t)o!=null&&(o=+o)>=o&&(++n,r+=o);else{let o=-1;for(let i of t)(i=e(i,++o,t))!=null&&(i=+i)>=i&&(++n,r+=i)}if(n)return r/n}function sn(t,e){return ye(t,.5,e)}function*Zy(t){for(let e of t)yield*e}function Fr(t){return Array.from(Zy(t))}function Ga(t,e){let n=new Qt;if(e===void 0)for(let i of t)i!=null&&i>=i&&n.set(i,(n.get(i)||0)+1);else{let i=-1;for(let a of t)(a=e(a,++i,t))!=null&&a>=a&&n.set(a,(n.get(a)||0)+1)}let r,o=0;for(let[i,a]of n)a>o&&(o=a,r=i);return r}function Va(t,e=Ky){let n=[],r,o=!1;for(let i of t)o&&n.push(e(r,i)),r=i,o=!0;return n}function Ky(t,e){return[t,e]}function er(t,e,n){t=+t,e=+e,n=(o=arguments.length)<2?(e=t,t=0,1):o<3?1:+n;for(var r=-1,o=Math.max(0,Math.ceil((e-t)/n))|0,i=new Array(o);++r<o;)i[r]=t+r*n;return i}function fe(t,e){let n=0;if(e===void 0)for(let r of t)(r=+r)&&(n+=r);else{let r=-1;for(let o of t)(o=+e(o,++r,t))&&(n+=o)}return n}function An(t){if(typeof t[Symbol.iterator]!="function")throw new TypeError("values is not iterable");return Array.from(t).reverse()}function ja(...t){let e=new Ce;for(let n of t)for(let r of n)e.add(r);return e}function Xp(t){return t}var ms=1,hs=2,gs=3,Za=4,Hp=1e-6;function Qy(t){return"translate("+t+",0)"}function Jy(t){return"translate(0,"+t+")"}function tb(t){return e=>+t(e)}function eb(t,e){return e=Math.max(0,t.bandwidth()-e*2)/2,t.round()&&(e=Math.round(e)),n=>+t(n)+e}function nb(){return!this.__axis}function rb(t,e){var n=[],r=null,o=null,i=6,a=6,f=3,u=typeof window<"u"&&window.devicePixelRatio>1?0:.5,c=t===ms||t===Za?-1:1,s=t===Za||t===hs?"x":"y",d=t===ms||t===gs?Qy:Jy;function l(p){var m=r??(e.ticks?e.ticks.apply(e,n):e.domain()),h=o??(e.tickFormat?e.tickFormat.apply(e,n):Xp),g=Math.max(i,0)+f,b=e.range(),x=+b[0]+u,M=+b[b.length-1]+u,y=(e.bandwidth?eb:tb)(e.copy(),u),w=p.selection?p.selection():p,v=w.selectAll(".domain").data([null]),T=w.selectAll(".tick").data(m,e).order(),E=T.exit(),I=T.enter().append("g").attr("class","tick"),F=T.select("line"),_=T.select("text");v=v.merge(v.enter().insert("path",".tick").attr("class","domain").attr("stroke","currentColor")),T=T.merge(I),F=F.merge(I.append("line").attr("stroke","currentColor").attr(s+"2",c*i)),_=_.merge(I.append("text").attr("fill","currentColor").attr(s,c*g).attr("dy",t===ms?"0em":t===gs?"0.71em":"0.32em")),p!==w&&(v=v.transition(p),T=T.transition(p),F=F.transition(p),_=_.transition(p),E=E.transition(p).attr("opacity",Hp).attr("transform",function(R){return isFinite(R=y(R))?d(R+u):this.getAttribute("transform")}),I.attr("opacity",Hp).attr("transform",function(R){var O=this.parentNode.__axis;return d((O&&isFinite(O=O(R))?O:y(R))+u)})),E.remove(),v.attr("d",t===Za||t===hs?a?"M"+c*a+","+x+"H"+u+"V"+M+"H"+c*a:"M"+u+","+x+"V"+M:a?"M"+x+","+c*a+"V"+u+"H"+M+"V"+c*a:"M"+x+","+u+"H"+M),T.attr("opacity",1).attr("transform",function(R){return d(y(R)+u)}),F.attr(s+"2",c*i),_.attr(s,c*g).text(h),w.filter(nb).attr("fill","none").attr("font-size",10).attr("font-family","sans-serif").attr("text-anchor",t===hs?"start":t===Za?"end":"middle"),w.each(function(){this.__axis=y})}return l.scale=function(p){return arguments.length?(e=p,l):e},l.ticks=function(){return n=Array.from(arguments),l},l.tickArguments=function(p){return arguments.length?(n=p==null?[]:Array.from(p),l):n.slice()},l.tickValues=function(p){return arguments.length?(r=p==null?null:Array.from(p),l):r&&r.slice()},l.tickFormat=function(p){return arguments.length?(o=p,l):o},l.tickSize=function(p){return arguments.length?(i=a=+p,l):i},l.tickSizeInner=function(p){return arguments.length?(i=+p,l):i},l.tickSizeOuter=function(p){return arguments.length?(a=+p,l):a},l.tickPadding=function(p){return arguments.length?(f=+p,l):f},l.offset=function(p){return arguments.length?(u=+p,l):u},l}function xs(t){return rb(gs,t)}var ob={value:()=>{}};function Gp(){for(var t=0,e=arguments.length,n={},r;t<e;++t){if(!(r=arguments[t]+"")||r in n||/[\s.]/.test(r))throw new Error("illegal type: "+r);n[r]=[]}return new Ka(n)}function Ka(t){this._=t}function ib(t,e){return t.trim().split(/^|\s+/).map(function(n){var r="",o=n.indexOf(".");if(o>=0&&(r=n.slice(o+1),n=n.slice(0,o)),n&&!e.hasOwnProperty(n))throw new Error("unknown type: "+n);return{type:n,name:r}})}Ka.prototype=Gp.prototype={constructor:Ka,on:function(t,e){var n=this._,r=ib(t+"",n),o,i=-1,a=r.length;if(arguments.length<2){for(;++i<a;)if((o=(t=r[i]).type)&&(o=ab(n[o],t.name)))return o;return}if(e!=null&&typeof e!="function")throw new Error("invalid callback: "+e);for(;++i<a;)if(o=(t=r[i]).type)n[o]=Wp(n[o],t.name,e);else if(e==null)for(o in n)n[o]=Wp(n[o],t.name,null);return this},copy:function(){var t={},e=this._;for(var n in e)t[n]=e[n].slice();return new Ka(t)},call:function(t,e){if((o=arguments.length-2)>0)for(var n=new Array(o),r=0,o,i;r<o;++r)n[r]=arguments[r+2];if(!this._.hasOwnProperty(t))throw new Error("unknown type: "+t);for(i=this._[t],r=0,o=i.length;r<o;++r)i[r].value.apply(e,n)},apply:function(t,e,n){if(!this._.hasOwnProperty(t))throw new Error("unknown type: "+t);for(var r=this._[t],o=0,i=r.length;o<i;++o)r[o].value.apply(e,n)}};function ab(t,e){for(var n=0,r=t.length,o;n<r;++n)if((o=t[n]).name===e)return o.value}function Wp(t,e,n){for(var r=0,o=t.length;r<o;++r)if(t[r].name===e){t[r]=ob,t=t.slice(0,r).concat(t.slice(r+1));break}return n!=null&&t.push({name:e,value:n}),t}var ys=Gp;var Qa="http://www.w3.org/1999/xhtml",Ye={svg:"http://www.w3.org/2000/svg",xhtml:Qa,xlink:"http://www.w3.org/1999/xlink",xml:"http://www.w3.org/XML/1998/namespace",xmlns:"http://www.w3.org/2000/xmlns/"};function ln(t){var e=t+="",n=e.indexOf(":");return n>=0&&(e=t.slice(0,n))!=="xmlns"&&(t=t.slice(n+1)),Ye.hasOwnProperty(e)?{space:Ye[e],local:t}:t}function fb(t){return function(){var e=this.ownerDocument,n=this.namespaceURI;return n===Qa&&e.documentElement.namespaceURI===Qa?e.createElement(t):e.createElementNS(n,t)}}function ub(t){return function(){return this.ownerDocument.createElementNS(t.space,t.local)}}function dn(t){var e=ln(t);return(e.local?ub:fb)(e)}function cb(){}function nr(t){return t==null?cb:function(){return this.querySelector(t)}}function Vp(t){typeof t!="function"&&(t=nr(t));for(var e=this._groups,n=e.length,r=new Array(n),o=0;o<n;++o)for(var i=e[o],a=i.length,f=r[o]=new Array(a),u,c,s=0;s<a;++s)(u=i[s])&&(c=t.call(u,u.__data__,s,i))&&("__data__"in u&&(c.__data__=u.__data__),f[s]=c);return new vt(r,this._parents)}function bs(t){return t==null?[]:Array.isArray(t)?t:Array.from(t)}function sb(){return[]}function Ko(t){return t==null?sb:function(){return this.querySelectorAll(t)}}function lb(t){return function(){return bs(t.apply(this,arguments))}}function jp(t){typeof t=="function"?t=lb(t):t=Ko(t);for(var e=this._groups,n=e.length,r=[],o=[],i=0;i<n;++i)for(var a=e[i],f=a.length,u,c=0;c<f;++c)(u=a[c])&&(r.push(t.call(u,u.__data__,c,a)),o.push(u));return new vt(r,o)}function Qo(t){return function(){return this.matches(t)}}function Ja(t){return function(e){return e.matches(t)}}var db=Array.prototype.find;function pb(t){return function(){return db.call(this.children,t)}}function mb(){return this.firstElementChild}function Zp(t){return this.select(t==null?mb:pb(typeof t=="function"?t:Ja(t)))}var hb=Array.prototype.filter;function gb(){return Array.from(this.children)}function xb(t){return function(){return hb.call(this.children,t)}}function Kp(t){return this.selectAll(t==null?gb:xb(typeof t=="function"?t:Ja(t)))}function Qp(t){typeof t!="function"&&(t=Qo(t));for(var e=this._groups,n=e.length,r=new Array(n),o=0;o<n;++o)for(var i=e[o],a=i.length,f=r[o]=[],u,c=0;c<a;++c)(u=i[c])&&t.call(u,u.__data__,c,i)&&f.push(u);return new vt(r,this._parents)}function tf(t){return new Array(t.length)}function Jp(){return new vt(this._enter||this._groups.map(tf),this._parents)}function Jo(t,e){this.ownerDocument=t.ownerDocument,this.namespaceURI=t.namespaceURI,this._next=null,this._parent=t,this.__data__=e}Jo.prototype={constructor:Jo,appendChild:function(t){return this._parent.insertBefore(t,this._next)},insertBefore:function(t,e){return this._parent.insertBefore(t,e)},querySelector:function(t){return this._parent.querySelector(t)},querySelectorAll:function(t){return this._parent.querySelectorAll(t)}};function tm(t){return function(){return t}}function yb(t,e,n,r,o,i){for(var a=0,f,u=e.length,c=i.length;a<c;++a)(f=e[a])?(f.__data__=i[a],r[a]=f):n[a]=new Jo(t,i[a]);for(;a<u;++a)(f=e[a])&&(o[a]=f)}function bb(t,e,n,r,o,i,a){var f,u,c=new Map,s=e.length,d=i.length,l=new Array(s),p;for(f=0;f<s;++f)(u=e[f])&&(l[f]=p=a.call(u,u.__data__,f,e)+"",c.has(p)?o[f]=u:c.set(p,u));for(f=0;f<d;++f)p=a.call(t,i[f],f,i)+"",(u=c.get(p))?(r[f]=u,u.__data__=i[f],c.delete(p)):n[f]=new Jo(t,i[f]);for(f=0;f<s;++f)(u=e[f])&&c.get(l[f])===u&&(o[f]=u)}function wb(t){return t.__data__}function em(t,e){if(!arguments.length)return Array.from(this,wb);var n=e?bb:yb,r=this._parents,o=this._groups;typeof t!="function"&&(t=tm(t));for(var i=o.length,a=new Array(i),f=new Array(i),u=new Array(i),c=0;c<i;++c){var s=r[c],d=o[c],l=d.length,p=vb(t.call(s,s&&s.__data__,c,r)),m=p.length,h=f[c]=new Array(m),g=a[c]=new Array(m),b=u[c]=new Array(l);n(s,d,h,g,b,p,e);for(var x=0,M=0,y,w;x<m;++x)if(y=h[x]){for(x>=M&&(M=x+1);!(w=g[M])&&++M<m;);y._next=w||null}}return a=new vt(a,r),a._enter=f,a._exit=u,a}function vb(t){return typeof t=="object"&&"length"in t?t:Array.from(t)}function nm(){return new vt(this._exit||this._groups.map(tf),this._parents)}function rm(t,e,n){var r=this.enter(),o=this,i=this.exit();return typeof t=="function"?(r=t(r),r&&(r=r.selection())):r=r.append(t+""),e!=null&&(o=e(o),o&&(o=o.selection())),n==null?i.remove():n(i),r&&o?r.merge(o).order():o}function om(t){for(var e=t.selection?t.selection():t,n=this._groups,r=e._groups,o=n.length,i=r.length,a=Math.min(o,i),f=new Array(o),u=0;u<a;++u)for(var c=n[u],s=r[u],d=c.length,l=f[u]=new Array(d),p,m=0;m<d;++m)(p=c[m]||s[m])&&(l[m]=p);for(;u<o;++u)f[u]=n[u];return new vt(f,this._parents)}function im(){for(var t=this._groups,e=-1,n=t.length;++e<n;)for(var r=t[e],o=r.length-1,i=r[o],a;--o>=0;)(a=r[o])&&(i&&a.compareDocumentPosition(i)^4&&i.parentNode.insertBefore(a,i),i=a);return this}function am(t){t||(t=Mb);function e(d,l){return d&&l?t(d.__data__,l.__data__):!d-!l}for(var n=this._groups,r=n.length,o=new Array(r),i=0;i<r;++i){for(var a=n[i],f=a.length,u=o[i]=new Array(f),c,s=0;s<f;++s)(c=a[s])&&(u[s]=c);u.sort(e)}return new vt(o,this._parents).order()}function Mb(t,e){return t<e?-1:t>e?1:t>=e?0:NaN}function fm(){var t=arguments[0];return arguments[0]=this,t.apply(null,arguments),this}function um(){return Array.from(this)}function cm(){for(var t=this._groups,e=0,n=t.length;e<n;++e)for(var r=t[e],o=0,i=r.length;o<i;++o){var a=r[o];if(a)return a}return null}function sm(){let t=0;for(let e of this)++t;return t}function lm(){return!this.node()}function dm(t){for(var e=this._groups,n=0,r=e.length;n<r;++n)for(var o=e[n],i=0,a=o.length,f;i<a;++i)(f=o[i])&&t.call(f,f.__data__,i,o);return this}function Sb(t){return function(){this.removeAttribute(t)}}function Tb(t){return function(){this.removeAttributeNS(t.space,t.local)}}function _b(t,e){return function(){this.setAttribute(t,e)}}function Cb(t,e){return function(){this.setAttributeNS(t.space,t.local,e)}}function Ab(t,e){return function(){var n=e.apply(this,arguments);n==null?this.removeAttribute(t):this.setAttribute(t,n)}}function $b(t,e){return function(){var n=e.apply(this,arguments);n==null?this.removeAttributeNS(t.space,t.local):this.setAttributeNS(t.space,t.local,n)}}function pm(t,e){var n=ln(t);if(arguments.length<2){var r=this.node();return n.local?r.getAttributeNS(n.space,n.local):r.getAttribute(n)}return this.each((e==null?n.local?Tb:Sb:typeof e=="function"?n.local?$b:Ab:n.local?Cb:_b)(n,e))}function ef(t){return t.ownerDocument&&t.ownerDocument.defaultView||t.document&&t||t.defaultView}function Eb(t){return function(){this.style.removeProperty(t)}}function Ib(t,e,n){return function(){this.style.setProperty(t,e,n)}}function kb(t,e,n){return function(){var r=e.apply(this,arguments);r==null?this.style.removeProperty(t):this.style.setProperty(t,r,n)}}function mm(t,e,n){return arguments.length>1?this.each((e==null?Eb:typeof e=="function"?kb:Ib)(t,e,n??"")):$n(this.node(),t)}function $n(t,e){return t.style.getPropertyValue(e)||ef(t).getComputedStyle(t,null).getPropertyValue(e)}function Nb(t){return function(){delete this[t]}}function Db(t,e){return function(){this[t]=e}}function Rb(t,e){return function(){var n=e.apply(this,arguments);n==null?delete this[t]:this[t]=n}}function hm(t,e){return arguments.length>1?this.each((e==null?Nb:typeof e=="function"?Rb:Db)(t,e)):this.node()[t]}function gm(t){return t.trim().split(/^|\s+/)}function ws(t){return t.classList||new xm(t)}function xm(t){this._node=t,this._names=gm(t.getAttribute("class")||"")}xm.prototype={add:function(t){var e=this._names.indexOf(t);e<0&&(this._names.push(t),this._node.setAttribute("class",this._names.join(" ")))},remove:function(t){var e=this._names.indexOf(t);e>=0&&(this._names.splice(e,1),this._node.setAttribute("class",this._names.join(" ")))},contains:function(t){return this._names.indexOf(t)>=0}};function ym(t,e){for(var n=ws(t),r=-1,o=e.length;++r<o;)n.add(e[r])}function bm(t,e){for(var n=ws(t),r=-1,o=e.length;++r<o;)n.remove(e[r])}function Lb(t){return function(){ym(this,t)}}function Pb(t){return function(){bm(this,t)}}function Ob(t,e){return function(){(e.apply(this,arguments)?ym:bm)(this,t)}}function wm(t,e){var n=gm(t+"");if(arguments.length<2){for(var r=ws(this.node()),o=-1,i=n.length;++o<i;)if(!r.contains(n[o]))return!1;return!0}return this.each((typeof e=="function"?Ob:e?Lb:Pb)(n,e))}function Fb(){this.textContent=""}function qb(t){return function(){this.textContent=t}}function zb(t){return function(){var e=t.apply(this,arguments);this.textContent=e??""}}function vm(t){return arguments.length?this.each(t==null?Fb:(typeof t=="function"?zb:qb)(t)):this.node().textContent}function Yb(){this.innerHTML=""}function Bb(t){return function(){this.innerHTML=t}}function Ub(t){return function(){var e=t.apply(this,arguments);this.innerHTML=e??""}}function Mm(t){return arguments.length?this.each(t==null?Yb:(typeof t=="function"?Ub:Bb)(t)):this.node().innerHTML}function Xb(){this.nextSibling&&this.parentNode.appendChild(this)}function Sm(){return this.each(Xb)}function Hb(){this.previousSibling&&this.parentNode.insertBefore(this,this.parentNode.firstChild)}function Tm(){return this.each(Hb)}function _m(t){var e=typeof t=="function"?t:dn(t);return this.select(function(){return this.appendChild(e.apply(this,arguments))})}function Wb(){return null}function Cm(t,e){var n=typeof t=="function"?t:dn(t),r=e==null?Wb:typeof e=="function"?e:nr(e);return this.select(function(){return this.insertBefore(n.apply(this,arguments),r.apply(this,arguments)||null)})}function Gb(){var t=this.parentNode;t&&t.removeChild(this)}function Am(){return this.each(Gb)}function Vb(){var t=this.cloneNode(!1),e=this.parentNode;return e?e.insertBefore(t,this.nextSibling):t}function jb(){var t=this.cloneNode(!0),e=this.parentNode;return e?e.insertBefore(t,this.nextSibling):t}function $m(t){return this.select(t?jb:Vb)}function Em(t){return arguments.length?this.property("__data__",t):this.node().__data__}function Zb(t){return function(e){t.call(this,e,this.__data__)}}function Kb(t){return t.trim().split(/^|\s+/).map(function(e){var n="",r=e.indexOf(".");return r>=0&&(n=e.slice(r+1),e=e.slice(0,r)),{type:e,name:n}})}function Qb(t){return function(){var e=this.__on;if(e){for(var n=0,r=-1,o=e.length,i;n<o;++n)i=e[n],(!t.type||i.type===t.type)&&i.name===t.name?this.removeEventListener(i.type,i.listener,i.options):e[++r]=i;++r?e.length=r:delete this.__on}}}function Jb(t,e,n){return function(){var r=this.__on,o,i=Zb(e);if(r){for(var a=0,f=r.length;a<f;++a)if((o=r[a]).type===t.type&&o.name===t.name){this.removeEventListener(o.type,o.listener,o.options),this.addEventListener(o.type,o.listener=i,o.options=n),o.value=e;return}}this.addEventListener(t.type,i,n),o={type:t.type,name:t.name,value:e,listener:i,options:n},r?r.push(o):this.__on=[o]}}function Im(t,e,n){var r=Kb(t+""),o,i=r.length,a;if(arguments.length<2){var f=this.node().__on;if(f){for(var u=0,c=f.length,s;u<c;++u)for(o=0,s=f[u];o<i;++o)if((a=r[o]).type===s.type&&a.name===s.name)return s.value}return}for(f=e?Jb:Qb,o=0;o<i;++o)this.each(f(r[o],e,n));return this}function km(t,e,n){var r=ef(t),o=r.CustomEvent;typeof o=="function"?o=new o(e,n):(o=r.document.createEvent("Event"),n?(o.initEvent(e,n.bubbles,n.cancelable),o.detail=n.detail):o.initEvent(e,!1,!1)),t.dispatchEvent(o)}function t2(t,e){return function(){return km(this,t,e)}}function e2(t,e){return function(){return km(this,t,e.apply(this,arguments))}}function Nm(t,e){return this.each((typeof e=="function"?e2:t2)(t,e))}function*Dm(){for(var t=this._groups,e=0,n=t.length;e<n;++e)for(var r=t[e],o=0,i=r.length,a;o<i;++o)(a=r[o])&&(yield a)}var vs=[null];function vt(t,e){this._groups=t,this._parents=e}function Rm(){return new vt([[document.documentElement]],vs)}function n2(){return this}vt.prototype=Rm.prototype={constructor:vt,select:Vp,selectAll:jp,selectChild:Zp,selectChildren:Kp,filter:Qp,data:em,enter:Jp,exit:nm,join:rm,merge:om,selection:n2,order:im,sort:am,call:fm,nodes:um,node:cm,size:sm,empty:lm,each:dm,attr:pm,style:mm,property:hm,classed:wm,text:vm,html:Mm,raise:Sm,lower:Tm,append:_m,insert:Cm,remove:Am,clone:$m,datum:Em,on:Im,dispatch:Nm,[Symbol.iterator]:Dm};var pn=Rm;function mn(t){return typeof t=="string"?new vt([[document.querySelector(t)]],[document.documentElement]):new vt([[t]],vs)}function Lm(t){let e;for(;e=t.sourceEvent;)t=e;return t}function Ms(t,e){if(t=Lm(t),e===void 0&&(e=t.currentTarget),e){var n=e.ownerSVGElement||e;if(n.createSVGPoint){var r=n.createSVGPoint();return r.x=t.clientX,r.y=t.clientY,r=r.matrixTransform(e.getScreenCTM().inverse()),[r.x,r.y]}if(e.getBoundingClientRect){var o=e.getBoundingClientRect();return[t.clientX-o.left-e.clientLeft,t.clientY-o.top-e.clientTop]}}return[t.pageX,t.pageY]}function hn(t,e,n){t.prototype=e.prototype=n,n.constructor=t}function En(t,e){var n=Object.create(t.prototype);for(var r in e)n[r]=e[r];return n}function Ue(){}var In=.7,ir=1/In,qr="\\s*([+-]?\\d+)\\s*",ti="\\s*([+-]?(?:\\d*\\.)?\\d+(?:[eE][+-]?\\d+)?)\\s*",Be="\\s*([+-]?(?:\\d*\\.)?\\d+(?:[eE][+-]?\\d+)?)%\\s*",r2=/^#([0-9a-f]{3,8})$/,o2=new RegExp(`^rgb\\(${qr},${qr},${qr}\\)$`),i2=new RegExp(`^rgb\\(${Be},${Be},${Be}\\)$`),a2=new RegExp(`^rgba\\(${qr},${qr},${qr},${ti}\\)$`),f2=new RegExp(`^rgba\\(${Be},${Be},${Be},${ti}\\)$`),u2=new RegExp(`^hsl\\(${ti},${Be},${Be}\\)$`),c2=new RegExp(`^hsla\\(${ti},${Be},${Be},${ti}\\)$`),Pm={aliceblue:15792383,antiquewhite:16444375,aqua:65535,aquamarine:8388564,azure:15794175,beige:16119260,bisque:16770244,black:0,blanchedalmond:16772045,blue:255,blueviolet:9055202,brown:10824234,burlywood:14596231,cadetblue:6266528,chartreuse:8388352,chocolate:13789470,coral:16744272,cornflowerblue:6591981,cornsilk:16775388,crimson:14423100,cyan:65535,darkblue:139,darkcyan:35723,darkgoldenrod:12092939,darkgray:11119017,darkgreen:25600,darkgrey:11119017,darkkhaki:12433259,darkmagenta:9109643,darkolivegreen:5597999,darkorange:16747520,darkorchid:10040012,darkred:9109504,darksalmon:15308410,darkseagreen:9419919,darkslateblue:4734347,darkslategray:3100495,darkslategrey:3100495,darkturquoise:52945,darkviolet:9699539,deeppink:16716947,deepskyblue:49151,dimgray:6908265,dimgrey:6908265,dodgerblue:2003199,firebrick:11674146,floralwhite:16775920,forestgreen:2263842,fuchsia:16711935,gainsboro:14474460,ghostwhite:16316671,gold:16766720,goldenrod:14329120,gray:8421504,green:32768,greenyellow:11403055,grey:8421504,honeydew:15794160,hotpink:16738740,indianred:13458524,indigo:4915330,ivory:16777200,khaki:15787660,lavender:15132410,lavenderblush:16773365,lawngreen:8190976,lemonchiffon:16775885,lightblue:11393254,lightcoral:15761536,lightcyan:14745599,lightgoldenrodyellow:16448210,lightgray:13882323,lightgreen:9498256,lightgrey:13882323,lightpink:16758465,lightsalmon:16752762,lightseagreen:2142890,lightskyblue:8900346,lightslategray:7833753,lightslategrey:7833753,lightsteelblue:11584734,lightyellow:16777184,lime:65280,limegreen:3329330,linen:16445670,magenta:16711935,maroon:8388608,mediumaquamarine:6737322,mediumblue:205,mediumorchid:12211667,mediumpurple:9662683,mediumseagreen:3978097,mediumslateblue:8087790,mediumspringgreen:64154,mediumturquoise:4772300,mediumvioletred:13047173,midnightblue:1644912,mintcream:16121850,mistyrose:16770273,moccasin:16770229,navajowhite:16768685,navy:128,oldlace:16643558,olive:8421376,olivedrab:7048739,orange:16753920,orangered:16729344,orchid:14315734,palegoldenrod:15657130,palegreen:10025880,paleturquoise:11529966,palevioletred:14381203,papayawhip:16773077,peachpuff:16767673,peru:13468991,pink:16761035,plum:14524637,powderblue:11591910,purple:8388736,rebeccapurple:6697881,red:16711680,rosybrown:12357519,royalblue:4286945,saddlebrown:9127187,salmon:16416882,sandybrown:16032864,seagreen:3050327,seashell:16774638,sienna:10506797,silver:12632256,skyblue:8900331,slateblue:6970061,slategray:7372944,slategrey:7372944,snow:16775930,springgreen:65407,steelblue:4620980,tan:13808780,teal:32896,thistle:14204888,tomato:16737095,turquoise:4251856,violet:15631086,wheat:16113331,white:16777215,whitesmoke:16119285,yellow:16776960,yellowgreen:10145074};hn(Ue,ue,{copy(t){return Object.assign(new this.constructor,this,t)},displayable(){return this.rgb().displayable()},hex:Om,formatHex:Om,formatHex8:s2,formatHsl:l2,formatRgb:Fm,toString:Fm});function Om(){return this.rgb().formatHex()}function s2(){return this.rgb().formatHex8()}function l2(){return Xm(this).formatHsl()}function Fm(){return this.rgb().formatRgb()}function ue(t){var e,n;return t=(t+"").trim().toLowerCase(),(e=r2.exec(t))?(n=e[1].length,e=parseInt(e[1],16),n===6?qm(e):n===3?new Tt(e>>8&15|e>>4&240,e>>4&15|e&240,(e&15)<<4|e&15,1):n===8?nf(e>>24&255,e>>16&255,e>>8&255,(e&255)/255):n===4?nf(e>>12&15|e>>8&240,e>>8&15|e>>4&240,e>>4&15|e&240,((e&15)<<4|e&15)/255):null):(e=o2.exec(t))?new Tt(e[1],e[2],e[3],1):(e=i2.exec(t))?new Tt(e[1]*255/100,e[2]*255/100,e[3]*255/100,1):(e=a2.exec(t))?nf(e[1],e[2],e[3],e[4]):(e=f2.exec(t))?nf(e[1]*255/100,e[2]*255/100,e[3]*255/100,e[4]):(e=u2.exec(t))?Bm(e[1],e[2]/100,e[3]/100,1):(e=c2.exec(t))?Bm(e[1],e[2]/100,e[3]/100,e[4]):Pm.hasOwnProperty(t)?qm(Pm[t]):t==="transparent"?new Tt(NaN,NaN,NaN,0):null}function qm(t){return new Tt(t>>16&255,t>>8&255,t&255,1)}function nf(t,e,n,r){return r<=0&&(t=e=n=NaN),new Tt(t,e,n,r)}function ei(t){return t instanceof Ue||(t=ue(t)),t?(t=t.rgb(),new Tt(t.r,t.g,t.b,t.opacity)):new Tt}function be(t,e,n,r){return arguments.length===1?ei(t):new Tt(t,e,n,r??1)}function Tt(t,e,n,r){this.r=+t,this.g=+e,this.b=+n,this.opacity=+r}hn(Tt,be,En(Ue,{brighter(t){return t=t==null?ir:Math.pow(ir,t),new Tt(this.r*t,this.g*t,this.b*t,this.opacity)},darker(t){return t=t==null?In:Math.pow(In,t),new Tt(this.r*t,this.g*t,this.b*t,this.opacity)},rgb(){return this},clamp(){return new Tt(or(this.r),or(this.g),or(this.b),of(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:zm,formatHex:zm,formatHex8:d2,formatRgb:Ym,toString:Ym}));function zm(){return`#${rr(this.r)}${rr(this.g)}${rr(this.b)}`}function d2(){return`#${rr(this.r)}${rr(this.g)}${rr(this.b)}${rr((isNaN(this.opacity)?1:this.opacity)*255)}`}function Ym(){let t=of(this.opacity);return`${t===1?"rgb(":"rgba("}${or(this.r)}, ${or(this.g)}, ${or(this.b)}${t===1?")":`, ${t})`}`}function of(t){return isNaN(t)?1:Math.max(0,Math.min(1,t))}function or(t){return Math.max(0,Math.min(255,Math.round(t)||0))}function rr(t){return t=or(t),(t<16?"0":"")+t.toString(16)}function Bm(t,e,n,r){return r<=0?t=e=n=NaN:n<=0||n>=1?t=e=NaN:e<=0&&(t=NaN),new Ee(t,e,n,r)}function Xm(t){if(t instanceof Ee)return new Ee(t.h,t.s,t.l,t.opacity);if(t instanceof Ue||(t=ue(t)),!t)return new Ee;if(t instanceof Ee)return t;t=t.rgb();var e=t.r/255,n=t.g/255,r=t.b/255,o=Math.min(e,n,r),i=Math.max(e,n,r),a=NaN,f=i-o,u=(i+o)/2;return f?(e===i?a=(n-r)/f+(n<r)*6:n===i?a=(r-e)/f+2:a=(e-n)/f+4,f/=u<.5?i+o:2-i-o,a*=60):f=u>0&&u<1?0:a,new Ee(a,f,u,t.opacity)}function ni(t,e,n,r){return arguments.length===1?Xm(t):new Ee(t,e,n,r??1)}function Ee(t,e,n,r){this.h=+t,this.s=+e,this.l=+n,this.opacity=+r}hn(Ee,ni,En(Ue,{brighter(t){return t=t==null?ir:Math.pow(ir,t),new Ee(this.h,this.s,this.l*t,this.opacity)},darker(t){return t=t==null?In:Math.pow(In,t),new Ee(this.h,this.s,this.l*t,this.opacity)},rgb(){var t=this.h%360+(this.h<0)*360,e=isNaN(t)||isNaN(this.s)?0:this.s,n=this.l,r=n+(n<.5?n:1-n)*e,o=2*n-r;return new Tt(Ss(t>=240?t-240:t+120,o,r),Ss(t,o,r),Ss(t<120?t+240:t-120,o,r),this.opacity)},clamp(){return new Ee(Um(this.h),rf(this.s),rf(this.l),of(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=of(this.opacity);return`${t===1?"hsl(":"hsla("}${Um(this.h)}, ${rf(this.s)*100}%, ${rf(this.l)*100}%${t===1?")":`, ${t})`}`}}));function Um(t){return t=(t||0)%360,t<0?t+360:t}function rf(t){return Math.max(0,Math.min(1,t||0))}function Ss(t,e,n){return(t<60?e+(n-e)*t/60:t<180?n:t<240?e+(n-e)*(240-t)/60:e)*255}var af=Math.PI/180,ff=180/Math.PI;var uf=18,Hm=.96422,Wm=1,Gm=.82521,Vm=4/29,zr=6/29,jm=3*zr*zr,p2=zr*zr*zr;function Zm(t){if(t instanceof Xe)return new Xe(t.l,t.a,t.b,t.opacity);if(t instanceof gn)return Km(t);t instanceof Tt||(t=ei(t));var e=As(t.r),n=As(t.g),r=As(t.b),o=Ts((.2225045*e+.7168786*n+.0606169*r)/Wm),i,a;return e===n&&n===r?i=a=o:(i=Ts((.4360747*e+.3850649*n+.1430804*r)/Hm),a=Ts((.0139322*e+.0971045*n+.7141733*r)/Gm)),new Xe(116*o-16,500*(i-o),200*(o-a),t.opacity)}function Yr(t,e,n,r){return arguments.length===1?Zm(t):new Xe(t,e,n,r??1)}function Xe(t,e,n,r){this.l=+t,this.a=+e,this.b=+n,this.opacity=+r}hn(Xe,Yr,En(Ue,{brighter(t){return new Xe(this.l+uf*(t??1),this.a,this.b,this.opacity)},darker(t){return new Xe(this.l-uf*(t??1),this.a,this.b,this.opacity)},rgb(){var t=(this.l+16)/116,e=isNaN(this.a)?t:t+this.a/500,n=isNaN(this.b)?t:t-this.b/200;return e=Hm*_s(e),t=Wm*_s(t),n=Gm*_s(n),new Tt(Cs(3.1338561*e-1.6168667*t-.4906146*n),Cs(-.9787684*e+1.9161415*t+.033454*n),Cs(.0719453*e-.2289914*t+1.4052427*n),this.opacity)}}));function Ts(t){return t>p2?Math.pow(t,1/3):t/jm+Vm}function _s(t){return t>zr?t*t*t:jm*(t-Vm)}function Cs(t){return 255*(t<=.0031308?12.92*t:1.055*Math.pow(t,1/2.4)-.055)}function As(t){return(t/=255)<=.04045?t/12.92:Math.pow((t+.055)/1.055,2.4)}function m2(t){if(t instanceof gn)return new gn(t.h,t.c,t.l,t.opacity);if(t instanceof Xe||(t=Zm(t)),t.a===0&&t.b===0)return new gn(NaN,0<t.l&&t.l<100?0:NaN,t.l,t.opacity);var e=Math.atan2(t.b,t.a)*ff;return new gn(e<0?e+360:e,Math.sqrt(t.a*t.a+t.b*t.b),t.l,t.opacity)}function ri(t,e,n,r){return arguments.length===1?m2(t):new gn(t,e,n,r??1)}function gn(t,e,n,r){this.h=+t,this.c=+e,this.l=+n,this.opacity=+r}function Km(t){if(isNaN(t.h))return new Xe(t.l,0,0,t.opacity);var e=t.h*af;return new Xe(t.l,Math.cos(e)*t.c,Math.sin(e)*t.c,t.opacity)}hn(gn,ri,En(Ue,{brighter(t){return new gn(this.h,this.c,this.l+uf*(t??1),this.opacity)},darker(t){return new gn(this.h,this.c,this.l-uf*(t??1),this.opacity)},rgb(){return Km(this).rgb()}}));var eh=-.14861,$s=1.78277,Es=-.29227,cf=-.90649,oi=1.97294,Qm=oi*cf,Jm=oi*$s,th=$s*Es-cf*eh;function h2(t){if(t instanceof ar)return new ar(t.h,t.s,t.l,t.opacity);t instanceof Tt||(t=ei(t));var e=t.r/255,n=t.g/255,r=t.b/255,o=(th*r+Qm*e-Jm*n)/(th+Qm-Jm),i=r-o,a=(oi*(n-o)-Es*i)/cf,f=Math.sqrt(a*a+i*i)/(oi*o*(1-o)),u=f?Math.atan2(a,i)*ff-120:NaN;return new ar(u<0?u+360:u,f,o,t.opacity)}function te(t,e,n,r){return arguments.length===1?h2(t):new ar(t,e,n,r??1)}function ar(t,e,n,r){this.h=+t,this.s=+e,this.l=+n,this.opacity=+r}hn(ar,te,En(Ue,{brighter(t){return t=t==null?ir:Math.pow(ir,t),new ar(this.h,this.s,this.l*t,this.opacity)},darker(t){return t=t==null?In:Math.pow(In,t),new ar(this.h,this.s,this.l*t,this.opacity)},rgb(){var t=isNaN(this.h)?0:(this.h+120)*af,e=+this.l,n=isNaN(this.s)?0:this.s*e*(1-e),r=Math.cos(t),o=Math.sin(t);return new Tt(255*(e+n*(eh*r+$s*o)),255*(e+n*(Es*r+cf*o)),255*(e+n*(oi*r)),this.opacity)}}));function Is(t,e,n,r,o){var i=t*t,a=i*t;return((1-3*t+3*i-a)*e+(4-6*i+3*a)*n+(1+3*t+3*i-3*a)*r+a*o)/6}function nh(t){var e=t.length-1;return function(n){var r=n<=0?n=0:n>=1?(n=1,e-1):Math.floor(n*e),o=t[r],i=t[r+1],a=r>0?t[r-1]:2*o-i,f=r<e-1?t[r+2]:2*i-o;return Is((n-r/e)*e,a,o,i,f)}}function rh(t){var e=t.length;return function(n){var r=Math.floor(((n%=1)<0?++n:n)*e),o=t[(r+e-1)%e],i=t[r%e],a=t[(r+1)%e],f=t[(r+2)%e];return Is((n-r/e)*e,o,i,a,f)}}var Br=t=>()=>t;function oh(t,e){return function(n){return t+n*e}}function g2(t,e,n){return t=Math.pow(t,n),e=Math.pow(e,n)-t,n=1/n,function(r){return Math.pow(t+r*e,n)}}function Ur(t,e){var n=e-t;return n?oh(t,n>180||n<-180?n-360*Math.round(n/360):n):Br(isNaN(t)?e:t)}function ih(t){return(t=+t)==1?xt:function(e,n){return n-e?g2(e,n,t):Br(isNaN(e)?n:e)}}function xt(t,e){var n=e-t;return n?oh(t,n):Br(isNaN(t)?e:t)}var we=function t(e){var n=ih(e);function r(o,i){var a=n((o=be(o)).r,(i=be(i)).r),f=n(o.g,i.g),u=n(o.b,i.b),c=xt(o.opacity,i.opacity);return function(s){return o.r=a(s),o.g=f(s),o.b=u(s),o.opacity=c(s),o+""}}return r.gamma=t,r}(1);function ah(t){return function(e){var n=e.length,r=new Array(n),o=new Array(n),i=new Array(n),a,f;for(a=0;a<n;++a)f=be(e[a]),r[a]=f.r||0,o[a]=f.g||0,i[a]=f.b||0;return r=t(r),o=t(o),i=t(i),f.opacity=1,function(u){return f.r=r(u),f.g=o(u),f.b=i(u),f+""}}}var ks=ah(nh),x2=ah(rh);function fh(t,e){e||(e=[]);var n=t?Math.min(e.length,t.length):0,r=e.slice(),o;return function(i){for(o=0;o<n;++o)r[o]=t[o]*(1-i)+e[o]*i;return r}}function uh(t){return ArrayBuffer.isView(t)&&!(t instanceof DataView)}function ch(t,e){var n=e?e.length:0,r=t?Math.min(n,t.length):0,o=new Array(r),i=new Array(n),a;for(a=0;a<r;++a)o[a]=Ie(t[a],e[a]);for(;a<n;++a)i[a]=e[a];return function(f){for(a=0;a<r;++a)i[a]=o[a](f);return i}}function sh(t,e){var n=new Date;return t=+t,e=+e,function(r){return n.setTime(t*(1-r)+e*r),n}}function ht(t,e){return t=+t,e=+e,function(n){return t*(1-n)+e*n}}function lh(t,e){var n={},r={},o;(t===null||typeof t!="object")&&(t={}),(e===null||typeof e!="object")&&(e={});for(o in e)o in t?n[o]=Ie(t[o],e[o]):r[o]=e[o];return function(i){for(o in n)r[o]=n[o](i);return r}}var Ds=/[-+]?(?:\d+\.?\d*|\.?\d+)(?:[eE][-+]?\d+)?/g,Ns=new RegExp(Ds.source,"g");function y2(t){return function(){return t}}function b2(t){return function(e){return t(e)+""}}function ii(t,e){var n=Ds.lastIndex=Ns.lastIndex=0,r,o,i,a=-1,f=[],u=[];for(t=t+"",e=e+"";(r=Ds.exec(t))&&(o=Ns.exec(e));)(i=o.index)>n&&(i=e.slice(n,i),f[a]?f[a]+=i:f[++a]=i),(r=r[0])===(o=o[0])?f[a]?f[a]+=o:f[++a]=o:(f[++a]=null,u.push({i:a,x:ht(r,o)})),n=Ns.lastIndex;return n<e.length&&(i=e.slice(n),f[a]?f[a]+=i:f[++a]=i),f.length<2?u[0]?b2(u[0].x):y2(e):(e=u.length,function(c){for(var s=0,d;s<e;++s)f[(d=u[s]).i]=d.x(c);return f.join("")})}function Ie(t,e){var n=typeof e,r;return e==null||n==="boolean"?Br(e):(n==="number"?ht:n==="string"?(r=ue(e))?(e=r,we):ii:e instanceof ue?we:e instanceof Date?sh:uh(e)?fh:Array.isArray(e)?ch:typeof e.valueOf!="function"&&typeof e.toString!="function"||isNaN(e)?lh:ht)(t,e)}function fr(t,e){return t=+t,e=+e,function(n){return Math.round(t*(1-n)+e*n)}}var dh=180/Math.PI,sf={translateX:0,translateY:0,rotate:0,skewX:0,scaleX:1,scaleY:1};function Rs(t,e,n,r,o,i){var a,f,u;return(a=Math.sqrt(t*t+e*e))&&(t/=a,e/=a),(u=t*n+e*r)&&(n-=t*u,r-=e*u),(f=Math.sqrt(n*n+r*r))&&(n/=f,r/=f,u/=f),t*r<e*n&&(t=-t,e=-e,u=-u,a=-a),{translateX:o,translateY:i,rotate:Math.atan2(e,t)*dh,skewX:Math.atan(u)*dh,scaleX:a,scaleY:f}}var lf;function ph(t){let e=new(typeof DOMMatrix=="function"?DOMMatrix:WebKitCSSMatrix)(t+"");return e.isIdentity?sf:Rs(e.a,e.b,e.c,e.d,e.e,e.f)}function mh(t){return t==null?sf:(lf||(lf=document.createElementNS("http://www.w3.org/2000/svg","g")),lf.setAttribute("transform",t),(t=lf.transform.baseVal.consolidate())?(t=t.matrix,Rs(t.a,t.b,t.c,t.d,t.e,t.f)):sf)}function hh(t,e,n,r){function o(c){return c.length?c.pop()+" ":""}function i(c,s,d,l,p,m){if(c!==d||s!==l){var h=p.push("translate(",null,e,null,n);m.push({i:h-4,x:ht(c,d)},{i:h-2,x:ht(s,l)})}else(d||l)&&p.push("translate("+d+e+l+n)}function a(c,s,d,l){c!==s?(c-s>180?s+=360:s-c>180&&(c+=360),l.push({i:d.push(o(d)+"rotate(",null,r)-2,x:ht(c,s)})):s&&d.push(o(d)+"rotate("+s+r)}function f(c,s,d,l){c!==s?l.push({i:d.push(o(d)+"skewX(",null,r)-2,x:ht(c,s)}):s&&d.push(o(d)+"skewX("+s+r)}function u(c,s,d,l,p,m){if(c!==d||s!==l){var h=p.push(o(p)+"scale(",null,",",null,")");m.push({i:h-4,x:ht(c,d)},{i:h-2,x:ht(s,l)})}else(d!==1||l!==1)&&p.push(o(p)+"scale("+d+","+l+")")}return function(c,s){var d=[],l=[];return c=t(c),s=t(s),i(c.translateX,c.translateY,s.translateX,s.translateY,d,l),a(c.rotate,s.rotate,d,l),f(c.skewX,s.skewX,d,l),u(c.scaleX,c.scaleY,s.scaleX,s.scaleY,d,l),c=s=null,function(p){for(var m=-1,h=l.length,g;++m<h;)d[(g=l[m]).i]=g.x(p);return d.join("")}}}var Ls=hh(ph,"px, ","px)","deg)"),Ps=hh(mh,", ",")",")");function gh(t){return function(e,n){var r=t((e=ni(e)).h,(n=ni(n)).h),o=xt(e.s,n.s),i=xt(e.l,n.l),a=xt(e.opacity,n.opacity);return function(f){return e.h=r(f),e.s=o(f),e.l=i(f),e.opacity=a(f),e+""}}}var Os=gh(Ur),w2=gh(xt);function df(t,e){var n=xt((t=Yr(t)).l,(e=Yr(e)).l),r=xt(t.a,e.a),o=xt(t.b,e.b),i=xt(t.opacity,e.opacity);return function(a){return t.l=n(a),t.a=r(a),t.b=o(a),t.opacity=i(a),t+""}}function xh(t){return function(e,n){var r=t((e=ri(e)).h,(n=ri(n)).h),o=xt(e.c,n.c),i=xt(e.l,n.l),a=xt(e.opacity,n.opacity);return function(f){return e.h=r(f),e.c=o(f),e.l=i(f),e.opacity=a(f),e+""}}}var Fs=xh(Ur),v2=xh(xt);function yh(t){return function e(n){n=+n;function r(o,i){var a=t((o=te(o)).h,(i=te(i)).h),f=xt(o.s,i.s),u=xt(o.l,i.l),c=xt(o.opacity,i.opacity);return function(s){return o.h=a(s),o.s=f(s),o.l=u(Math.pow(s,n)),o.opacity=c(s),o+""}}return r.gamma=e,r}(1)}var M2=yh(Ur),Xr=yh(xt);function He(t,e){e===void 0&&(e=t,t=Ie);for(var n=0,r=e.length-1,o=e[0],i=new Array(r<0?0:r);n<r;)i[n]=t(o,o=e[++n]);return function(a){var f=Math.max(0,Math.min(r-1,Math.floor(a*=r)));return i[f](a-f)}}function Wt(t,e){for(var n=new Array(e),r=0;r<e;++r)n[r]=t(r/(e-1));return n}var Hr=0,fi=0,ai=0,wh=1e3,pf,ui,mf=0,ur=0,hf=0,ci=typeof performance=="object"&&performance.now?performance:Date,vh=typeof window=="object"&&window.requestAnimationFrame?window.requestAnimationFrame.bind(window):function(t){setTimeout(t,17)};function li(){return ur||(vh(S2),ur=ci.now()+hf)}function S2(){ur=0}function si(){this._call=this._time=this._next=null}si.prototype=gf.prototype={constructor:si,restart:function(t,e,n){if(typeof t!="function")throw new TypeError("callback is not a function");n=(n==null?li():+n)+(e==null?0:+e),!this._next&&ui!==this&&(ui?ui._next=this:pf=this,ui=this),this._call=t,this._time=n,qs()},stop:function(){this._call&&(this._call=null,this._time=1/0,qs())}};function gf(t,e,n){var r=new si;return r.restart(t,e,n),r}function Mh(){li(),++Hr;for(var t=pf,e;t;)(e=ur-t._time)>=0&&t._call.call(void 0,e),t=t._next;--Hr}function bh(){ur=(mf=ci.now())+hf,Hr=fi=0;try{Mh()}finally{Hr=0,_2(),ur=0}}function T2(){var t=ci.now(),e=t-mf;e>wh&&(hf-=e,mf=t)}function _2(){for(var t,e=pf,n,r=1/0;e;)e._call?(r>e._time&&(r=e._time),t=e,e=e._next):(n=e._next,e._next=null,e=t?t._next=n:pf=n);ui=t,qs(r)}function qs(t){if(!Hr){fi&&(fi=clearTimeout(fi));var e=t-ur;e>24?(t<1/0&&(fi=setTimeout(bh,t-ci.now()-hf)),ai&&(ai=clearInterval(ai))):(ai||(mf=ci.now(),ai=setInterval(T2,wh)),Hr=1,vh(bh))}}function xf(t,e,n){var r=new si;return e=e==null?0:+e,r.restart(o=>{r.stop(),t(o+e)},e,n),r}var C2=ys("start","end","cancel","interrupt"),A2=[],_h=0,Sh=1,bf=2,yf=3,Th=4,wf=5,di=6;function kn(t,e,n,r,o,i){var a=t.__transition;if(!a)t.__transition={};else if(n in a)return;$2(t,n,{name:e,index:r,group:o,on:C2,tween:A2,time:i.time,delay:i.delay,duration:i.duration,ease:i.ease,timer:null,state:_h})}function pi(t,e){var n=At(t,e);if(n.state>_h)throw new Error("too late; already scheduled");return n}function Ft(t,e){var n=At(t,e);if(n.state>yf)throw new Error("too late; already running");return n}function At(t,e){var n=t.__transition;if(!n||!(n=n[e]))throw new Error("transition not found");return n}function $2(t,e,n){var r=t.__transition,o;r[e]=n,n.timer=gf(i,0,n.time);function i(c){n.state=Sh,n.timer.restart(a,n.delay,n.time),n.delay<=c&&a(c-n.delay)}function a(c){var s,d,l,p;if(n.state!==Sh)return u();for(s in r)if(p=r[s],p.name===n.name){if(p.state===yf)return xf(a);p.state===Th?(p.state=di,p.timer.stop(),p.on.call("interrupt",t,t.__data__,p.index,p.group),delete r[s]):+s<e&&(p.state=di,p.timer.stop(),p.on.call("cancel",t,t.__data__,p.index,p.group),delete r[s])}if(xf(function(){n.state===yf&&(n.state=Th,n.timer.restart(f,n.delay,n.time),f(c))}),n.state=bf,n.on.call("start",t,t.__data__,n.index,n.group),n.state===bf){for(n.state=yf,o=new Array(l=n.tween.length),s=0,d=-1;s<l;++s)(p=n.tween[s].value.call(t,t.__data__,n.index,n.group))&&(o[++d]=p);o.length=d+1}}function f(c){for(var s=c<n.duration?n.ease.call(null,c/n.duration):(n.timer.restart(u),n.state=wf,1),d=-1,l=o.length;++d<l;)o[d].call(t,s);n.state===wf&&(n.on.call("end",t,t.__data__,n.index,n.group),u())}function u(){n.state=di,n.timer.stop(),delete r[e];for(var c in r)return;delete t.__transition}}function vf(t,e){var n=t.__transition,r,o,i=!0,a;if(n){e=e==null?null:e+"";for(a in n){if((r=n[a]).name!==e){i=!1;continue}o=r.state>bf&&r.state<wf,r.state=di,r.timer.stop(),r.on.call(o?"interrupt":"cancel",t,t.__data__,r.index,r.group),delete n[a]}i&&delete t.__transition}}function Ch(t){return this.each(function(){vf(this,t)})}function E2(t,e){var n,r;return function(){var o=Ft(this,t),i=o.tween;if(i!==n){r=n=i;for(var a=0,f=r.length;a<f;++a)if(r[a].name===e){r=r.slice(),r.splice(a,1);break}}o.tween=r}}function I2(t,e,n){var r,o;if(typeof n!="function")throw new Error;return function(){var i=Ft(this,t),a=i.tween;if(a!==r){o=(r=a).slice();for(var f={name:e,value:n},u=0,c=o.length;u<c;++u)if(o[u].name===e){o[u]=f;break}u===c&&o.push(f)}i.tween=o}}function Ah(t,e){var n=this._id;if(t+="",arguments.length<2){for(var r=At(this.node(),n).tween,o=0,i=r.length,a;o<i;++o)if((a=r[o]).name===t)return a.value;return null}return this.each((e==null?E2:I2)(n,t,e))}function Wr(t,e,n){var r=t._id;return t.each(function(){var o=Ft(this,r);(o.value||(o.value={}))[e]=n.apply(this,arguments)}),function(o){return At(o,r).value[e]}}function Mf(t,e){var n;return(typeof e=="number"?ht:e instanceof ue?we:(n=ue(e))?(e=n,we):ii)(t,e)}function k2(t){return function(){this.removeAttribute(t)}}function N2(t){return function(){this.removeAttributeNS(t.space,t.local)}}function D2(t,e,n){var r,o=n+"",i;return function(){var a=this.getAttribute(t);return a===o?null:a===r?i:i=e(r=a,n)}}function R2(t,e,n){var r,o=n+"",i;return function(){var a=this.getAttributeNS(t.space,t.local);return a===o?null:a===r?i:i=e(r=a,n)}}function L2(t,e,n){var r,o,i;return function(){var a,f=n(this),u;return f==null?void this.removeAttribute(t):(a=this.getAttribute(t),u=f+"",a===u?null:a===r&&u===o?i:(o=u,i=e(r=a,f)))}}function P2(t,e,n){var r,o,i;return function(){var a,f=n(this),u;return f==null?void this.removeAttributeNS(t.space,t.local):(a=this.getAttributeNS(t.space,t.local),u=f+"",a===u?null:a===r&&u===o?i:(o=u,i=e(r=a,f)))}}function $h(t,e){var n=ln(t),r=n==="transform"?Ps:Mf;return this.attrTween(t,typeof e=="function"?(n.local?P2:L2)(n,r,Wr(this,"attr."+t,e)):e==null?(n.local?N2:k2)(n):(n.local?R2:D2)(n,r,e))}function O2(t,e){return function(n){this.setAttribute(t,e.call(this,n))}}function F2(t,e){return function(n){this.setAttributeNS(t.space,t.local,e.call(this,n))}}function q2(t,e){var n,r;function o(){var i=e.apply(this,arguments);return i!==r&&(n=(r=i)&&F2(t,i)),n}return o._value=e,o}function z2(t,e){var n,r;function o(){var i=e.apply(this,arguments);return i!==r&&(n=(r=i)&&O2(t,i)),n}return o._value=e,o}function Eh(t,e){var n="attr."+t;if(arguments.length<2)return(n=this.tween(n))&&n._value;if(e==null)return this.tween(n,null);if(typeof e!="function")throw new Error;var r=ln(t);return this.tween(n,(r.local?q2:z2)(r,e))}function Y2(t,e){return function(){pi(this,t).delay=+e.apply(this,arguments)}}function B2(t,e){return e=+e,function(){pi(this,t).delay=e}}function Ih(t){var e=this._id;return arguments.length?this.each((typeof t=="function"?Y2:B2)(e,t)):At(this.node(),e).delay}function U2(t,e){return function(){Ft(this,t).duration=+e.apply(this,arguments)}}function X2(t,e){return e=+e,function(){Ft(this,t).duration=e}}function kh(t){var e=this._id;return arguments.length?this.each((typeof t=="function"?U2:X2)(e,t)):At(this.node(),e).duration}function H2(t,e){if(typeof e!="function")throw new Error;return function(){Ft(this,t).ease=e}}function Nh(t){var e=this._id;return arguments.length?this.each(H2(e,t)):At(this.node(),e).ease}function W2(t,e){return function(){var n=e.apply(this,arguments);if(typeof n!="function")throw new Error;Ft(this,t).ease=n}}function Dh(t){if(typeof t!="function")throw new Error;return this.each(W2(this._id,t))}function Rh(t){typeof t!="function"&&(t=Qo(t));for(var e=this._groups,n=e.length,r=new Array(n),o=0;o<n;++o)for(var i=e[o],a=i.length,f=r[o]=[],u,c=0;c<a;++c)(u=i[c])&&t.call(u,u.__data__,c,i)&&f.push(u);return new ee(r,this._parents,this._name,this._id)}function Lh(t){if(t._id!==this._id)throw new Error;for(var e=this._groups,n=t._groups,r=e.length,o=n.length,i=Math.min(r,o),a=new Array(r),f=0;f<i;++f)for(var u=e[f],c=n[f],s=u.length,d=a[f]=new Array(s),l,p=0;p<s;++p)(l=u[p]||c[p])&&(d[p]=l);for(;f<r;++f)a[f]=e[f];return new ee(a,this._parents,this._name,this._id)}function G2(t){return(t+"").trim().split(/^|\s+/).every(function(e){var n=e.indexOf(".");return n>=0&&(e=e.slice(0,n)),!e||e==="start"})}function V2(t,e,n){var r,o,i=G2(e)?pi:Ft;return function(){var a=i(this,t),f=a.on;f!==r&&(o=(r=f).copy()).on(e,n),a.on=o}}function Ph(t,e){var n=this._id;return arguments.length<2?At(this.node(),n).on.on(t):this.each(V2(n,t,e))}function j2(t){return function(){var e=this.parentNode;for(var n in this.__transition)if(+n!==t)return;e&&e.removeChild(this)}}function Oh(){return this.on("end.remove",j2(this._id))}function Fh(t){var e=this._name,n=this._id;typeof t!="function"&&(t=nr(t));for(var r=this._groups,o=r.length,i=new Array(o),a=0;a<o;++a)for(var f=r[a],u=f.length,c=i[a]=new Array(u),s,d,l=0;l<u;++l)(s=f[l])&&(d=t.call(s,s.__data__,l,f))&&("__data__"in s&&(d.__data__=s.__data__),c[l]=d,kn(c[l],e,n,l,c,At(s,n)));return new ee(i,this._parents,e,n)}function qh(t){var e=this._name,n=this._id;typeof t!="function"&&(t=Ko(t));for(var r=this._groups,o=r.length,i=[],a=[],f=0;f<o;++f)for(var u=r[f],c=u.length,s,d=0;d<c;++d)if(s=u[d]){for(var l=t.call(s,s.__data__,d,u),p,m=At(s,n),h=0,g=l.length;h<g;++h)(p=l[h])&&kn(p,e,n,h,l,m);i.push(l),a.push(s)}return new ee(i,a,e,n)}var Z2=pn.prototype.constructor;function zh(){return new Z2(this._groups,this._parents)}function K2(t,e){var n,r,o;return function(){var i=$n(this,t),a=(this.style.removeProperty(t),$n(this,t));return i===a?null:i===n&&a===r?o:o=e(n=i,r=a)}}function Yh(t){return function(){this.style.removeProperty(t)}}function Q2(t,e,n){var r,o=n+"",i;return function(){var a=$n(this,t);return a===o?null:a===r?i:i=e(r=a,n)}}function J2(t,e,n){var r,o,i;return function(){var a=$n(this,t),f=n(this),u=f+"";return f==null&&(u=f=(this.style.removeProperty(t),$n(this,t))),a===u?null:a===r&&u===o?i:(o=u,i=e(r=a,f))}}function tw(t,e){var n,r,o,i="style."+e,a="end."+i,f;return function(){var u=Ft(this,t),c=u.on,s=u.value[i]==null?f||(f=Yh(e)):void 0;(c!==n||o!==s)&&(r=(n=c).copy()).on(a,o=s),u.on=r}}function Bh(t,e,n){var r=(t+="")=="transform"?Ls:Mf;return e==null?this.styleTween(t,K2(t,r)).on("end.style."+t,Yh(t)):typeof e=="function"?this.styleTween(t,J2(t,r,Wr(this,"style."+t,e))).each(tw(this._id,t)):this.styleTween(t,Q2(t,r,e),n).on("end.style."+t,null)}function ew(t,e,n){return function(r){this.style.setProperty(t,e.call(this,r),n)}}function nw(t,e,n){var r,o;function i(){var a=e.apply(this,arguments);return a!==o&&(r=(o=a)&&ew(t,a,n)),r}return i._value=e,i}function Uh(t,e,n){var r="style."+(t+="");if(arguments.length<2)return(r=this.tween(r))&&r._value;if(e==null)return this.tween(r,null);if(typeof e!="function")throw new Error;return this.tween(r,nw(t,e,n??""))}function rw(t){return function(){this.textContent=t}}function ow(t){return function(){var e=t(this);this.textContent=e??""}}function Xh(t){return this.tween("text",typeof t=="function"?ow(Wr(this,"text",t)):rw(t==null?"":t+""))}function iw(t){return function(e){this.textContent=t.call(this,e)}}function aw(t){var e,n;function r(){var o=t.apply(this,arguments);return o!==n&&(e=(n=o)&&iw(o)),e}return r._value=t,r}function Hh(t){var e="text";if(arguments.length<1)return(e=this.tween(e))&&e._value;if(t==null)return this.tween(e,null);if(typeof t!="function")throw new Error;return this.tween(e,aw(t))}function Wh(){for(var t=this._name,e=this._id,n=Sf(),r=this._groups,o=r.length,i=0;i<o;++i)for(var a=r[i],f=a.length,u,c=0;c<f;++c)if(u=a[c]){var s=At(u,e);kn(u,t,n,c,a,{time:s.time+s.delay+s.duration,delay:0,duration:s.duration,ease:s.ease})}return new ee(r,this._parents,t,n)}function Gh(){var t,e,n=this,r=n._id,o=n.size();return new Promise(function(i,a){var f={value:a},u={value:function(){--o===0&&i()}};n.each(function(){var c=Ft(this,r),s=c.on;s!==t&&(e=(t=s).copy(),e._.cancel.push(f),e._.interrupt.push(f),e._.end.push(u)),c.on=e}),o===0&&i()})}var fw=0;function ee(t,e,n,r){this._groups=t,this._parents=e,this._name=n,this._id=r}function Vh(t){return pn().transition(t)}function Sf(){return++fw}var xn=pn.prototype;ee.prototype=Vh.prototype={constructor:ee,select:Fh,selectAll:qh,selectChild:xn.selectChild,selectChildren:xn.selectChildren,filter:Rh,merge:Lh,selection:zh,transition:Wh,call:xn.call,nodes:xn.nodes,node:xn.node,size:xn.size,empty:xn.empty,each:xn.each,on:Ph,attr:$h,attrTween:Eh,style:Bh,styleTween:Uh,text:Xh,textTween:Hh,remove:Oh,tween:Ah,delay:Ih,duration:kh,ease:Nh,easeVarying:Dh,end:Gh,[Symbol.iterator]:xn[Symbol.iterator]};function Tf(t){return((t*=2)<=1?t*t*t:(t-=2)*t*t+2)/2}var uw={time:null,delay:0,duration:250,ease:Tf};function cw(t,e){for(var n;!(n=t.__transition)||!(n=n[e]);)if(!(t=t.parentNode))throw new Error(`transition ${e} not found`);return n}function jh(t){var e,n;t instanceof ee?(e=t._id,t=t._name):(e=Sf(),(n=uw).time=li(),t=t==null?null:t+"");for(var r=this._groups,o=r.length,i=0;i<o;++i)for(var a=r[i],f=a.length,u,c=0;c<f;++c)(u=a[c])&&kn(u,t,e,c,a,n||cw(u,e));return new ee(r,this._parents,t,e)}pn.prototype.interrupt=Ch;pn.prototype.transition=jh;var{abs:LC,max:PC,min:OC}=Math;function Zh(t){return[+t[0],+t[1]]}function sw(t){return[Zh(t[0]),Zh(t[1])]}var FC={name:"x",handles:["w","e"].map(zs),input:function(t,e){return t==null?null:[[+t[0],e[0][1]],[+t[1],e[1][1]]]},output:function(t){return t&&[t[0][0],t[1][0]]}},qC={name:"y",handles:["n","s"].map(zs),input:function(t,e){return t==null?null:[[e[0][0],+t[0]],[e[1][0],+t[1]]]},output:function(t){return t&&[t[0][1],t[1][1]]}},zC={name:"xy",handles:["n","w","e","s","nw","ne","sw","se"].map(zs),input:function(t){return t==null?null:sw(t)},output:function(t){return t}};function zs(t){return{type:t}}var Ys=Math.PI,Bs=2*Ys,cr=1e-6,lw=Bs-cr;function Kh(t){this._+=t[0];for(let e=1,n=t.length;e<n;++e)this._+=arguments[e]+t[e]}function dw(t){let e=Math.floor(t);if(!(e>=0))throw new Error(`invalid digits: ${t}`);if(e>15)return Kh;let n=10**e;return function(r){this._+=r[0];for(let o=1,i=r.length;o<i;++o)this._+=Math.round(arguments[o]*n)/n+r[o]}}var Gr=class{constructor(e){this._x0=this._y0=this._x1=this._y1=null,this._="",this._append=e==null?Kh:dw(e)}moveTo(e,n){this._append`M${this._x0=this._x1=+e},${this._y0=this._y1=+n}`}closePath(){this._x1!==null&&(this._x1=this._x0,this._y1=this._y0,this._append`Z`)}lineTo(e,n){this._append`L${this._x1=+e},${this._y1=+n}`}quadraticCurveTo(e,n,r,o){this._append`Q${+e},${+n},${this._x1=+r},${this._y1=+o}`}bezierCurveTo(e,n,r,o,i,a){this._append`C${+e},${+n},${+r},${+o},${this._x1=+i},${this._y1=+a}`}arcTo(e,n,r,o,i){if(e=+e,n=+n,r=+r,o=+o,i=+i,i<0)throw new Error(`negative radius: ${i}`);let a=this._x1,f=this._y1,u=r-e,c=o-n,s=a-e,d=f-n,l=s*s+d*d;if(this._x1===null)this._append`M${this._x1=e},${this._y1=n}`;else if(l>cr)if(!(Math.abs(d*u-c*s)>cr)||!i)this._append`L${this._x1=e},${this._y1=n}`;else{let p=r-a,m=o-f,h=u*u+c*c,g=p*p+m*m,b=Math.sqrt(h),x=Math.sqrt(l),M=i*Math.tan((Ys-Math.acos((h+l-g)/(2*b*x)))/2),y=M/x,w=M/b;Math.abs(y-1)>cr&&this._append`L${e+y*s},${n+y*d}`,this._append`A${i},${i},0,0,${+(d*p>s*m)},${this._x1=e+w*u},${this._y1=n+w*c}`}}arc(e,n,r,o,i,a){if(e=+e,n=+n,r=+r,a=!!a,r<0)throw new Error(`negative radius: ${r}`);let f=r*Math.cos(o),u=r*Math.sin(o),c=e+f,s=n+u,d=1^a,l=a?o-i:i-o;this._x1===null?this._append`M${c},${s}`:(Math.abs(this._x1-c)>cr||Math.abs(this._y1-s)>cr)&&this._append`L${c},${s}`,r&&(l<0&&(l=l%Bs+Bs),l>lw?this._append`A${r},${r},0,1,${d},${e-f},${n-u}A${r},${r},0,1,${d},${this._x1=c},${this._y1=s}`:l>cr&&this._append`A${r},${r},0,${+(l>=Ys)},${d},${this._x1=e+r*Math.cos(i)},${this._y1=n+r*Math.sin(i)}`)}rect(e,n,r,o){this._append`M${this._x0=this._x1=+e},${this._y0=this._y1=+n}h${r=+r}v${+o}h${-r}Z`}toString(){return this._}};function Qh(){return new Gr}Qh.prototype=Gr.prototype;function Vr(t=3){return new Gr(+t)}function Jh(t){return Math.abs(t=Math.round(t))>=1e21?t.toLocaleString("en").replace(/,/g,""):t.toString(10)}function sr(t,e){if((n=(t=e?t.toExponential(e-1):t.toExponential()).indexOf("e"))<0)return null;var n,r=t.slice(0,n);return[r.length>1?r[0]+r.slice(2):r,+t.slice(n+1)]}function We(t){return t=sr(Math.abs(t)),t?t[1]:NaN}function t0(t,e){return function(n,r){for(var o=n.length,i=[],a=0,f=t[0],u=0;o>0&&f>0&&(u+f+1>r&&(f=Math.max(1,r-u)),i.push(n.substring(o-=f,o+f)),!((u+=f+1)>r));)f=t[a=(a+1)%t.length];return i.reverse().join(e)}}function e0(t){return function(e){return e.replace(/[0-9]/g,function(n){return t[+n]})}}var pw=/^(?:(.)?([<>=^]))?([+\-( ])?([$#])?(0)?(\d+)?(,)?(\.\d+)?(~)?([a-z%])?$/i;function Ge(t){if(!(e=pw.exec(t)))throw new Error("invalid format: "+t);var e;return new _f({fill:e[1],align:e[2],sign:e[3],symbol:e[4],zero:e[5],width:e[6],comma:e[7],precision:e[8]&&e[8].slice(1),trim:e[9],type:e[10]})}Ge.prototype=_f.prototype;function _f(t){this.fill=t.fill===void 0?" ":t.fill+"",this.align=t.align===void 0?">":t.align+"",this.sign=t.sign===void 0?"-":t.sign+"",this.symbol=t.symbol===void 0?"":t.symbol+"",this.zero=!!t.zero,this.width=t.width===void 0?void 0:+t.width,this.comma=!!t.comma,this.precision=t.precision===void 0?void 0:+t.precision,this.trim=!!t.trim,this.type=t.type===void 0?"":t.type+""}_f.prototype.toString=function(){return this.fill+this.align+this.sign+this.symbol+(this.zero?"0":"")+(this.width===void 0?"":Math.max(1,this.width|0))+(this.comma?",":"")+(this.precision===void 0?"":"."+Math.max(0,this.precision|0))+(this.trim?"~":"")+this.type};function n0(t){t:for(var e=t.length,n=1,r=-1,o;n<e;++n)switch(t[n]){case".":r=o=n;break;case"0":r===0&&(r=n),o=n;break;default:if(!+t[n])break t;r>0&&(r=0);break}return r>0?t.slice(0,r)+t.slice(o+1):t}var Us;function r0(t,e){var n=sr(t,e);if(!n)return t+"";var r=n[0],o=n[1],i=o-(Us=Math.max(-8,Math.min(8,Math.floor(o/3)))*3)+1,a=r.length;return i===a?r:i>a?r+new Array(i-a+1).join("0"):i>0?r.slice(0,i)+"."+r.slice(i):"0."+new Array(1-i).join("0")+sr(t,Math.max(0,e+i-1))[0]}function Xs(t,e){var n=sr(t,e);if(!n)return t+"";var r=n[0],o=n[1];return o<0?"0."+new Array(-o).join("0")+r:r.length>o+1?r.slice(0,o+1)+"."+r.slice(o+1):r+new Array(o-r.length+2).join("0")}var Hs={"%":(t,e)=>(t*100).toFixed(e),b:t=>Math.round(t).toString(2),c:t=>t+"",d:Jh,e:(t,e)=>t.toExponential(e),f:(t,e)=>t.toFixed(e),g:(t,e)=>t.toPrecision(e),o:t=>Math.round(t).toString(8),p:(t,e)=>Xs(t*100,e),r:Xs,s:r0,X:t=>Math.round(t).toString(16).toUpperCase(),x:t=>Math.round(t).toString(16)};function Ws(t){return t}var o0=Array.prototype.map,i0=["y","z","a","f","p","n","\xB5","m","","k","M","G","T","P","E","Z","Y"];function a0(t){var e=t.grouping===void 0||t.thousands===void 0?Ws:t0(o0.call(t.grouping,Number),t.thousands+""),n=t.currency===void 0?"":t.currency[0]+"",r=t.currency===void 0?"":t.currency[1]+"",o=t.decimal===void 0?".":t.decimal+"",i=t.numerals===void 0?Ws:e0(o0.call(t.numerals,String)),a=t.percent===void 0?"%":t.percent+"",f=t.minus===void 0?"\u2212":t.minus+"",u=t.nan===void 0?"NaN":t.nan+"";function c(d){d=Ge(d);var l=d.fill,p=d.align,m=d.sign,h=d.symbol,g=d.zero,b=d.width,x=d.comma,M=d.precision,y=d.trim,w=d.type;w==="n"?(x=!0,w="g"):Hs[w]||(M===void 0&&(M=12),y=!0,w="g"),(g||l==="0"&&p==="=")&&(g=!0,l="0",p="=");var v=h==="$"?n:h==="#"&&/[boxX]/.test(w)?"0"+w.toLowerCase():"",T=h==="$"?r:/[%p]/.test(w)?a:"",E=Hs[w],I=/[defgprs%]/.test(w);M=M===void 0?6:/[gprs]/.test(w)?Math.max(1,Math.min(21,M)):Math.max(0,Math.min(20,M));function F(_){var R=v,O=T,L,S,A;if(w==="c")O=E(_)+O,_="";else{_=+_;var N=_<0||1/_<0;if(_=isNaN(_)?u:E(Math.abs(_),M),y&&(_=n0(_)),N&&+_==0&&m!=="+"&&(N=!1),R=(N?m==="("?m:f:m==="-"||m==="("?"":m)+R,O=(w==="s"?i0[8+Us/3]:"")+O+(N&&m==="("?")":""),I){for(L=-1,S=_.length;++L<S;)if(A=_.charCodeAt(L),48>A||A>57){O=(A===46?o+_.slice(L+1):_.slice(L))+O,_=_.slice(0,L);break}}}x&&!g&&(_=e(_,1/0));var P=R.length+_.length+O.length,D=P<b?new Array(b-P+1).join(l):"";switch(x&&g&&(_=e(D+_,D.length?b-O.length:1/0),D=""),p){case"<":_=R+_+O+D;break;case"=":_=R+D+_+O;break;case"^":_=D.slice(0,P=D.length>>1)+R+_+O+D.slice(P);break;default:_=D+R+_+O;break}return i(_)}return F.toString=function(){return d+""},F}function s(d,l){var p=c((d=Ge(d),d.type="f",d)),m=Math.max(-8,Math.min(8,Math.floor(We(l)/3)))*3,h=Math.pow(10,-m),g=i0[8+m/3];return function(b){return p(h*b)+g}}return{format:c,formatPrefix:s}}var Cf,Ve,Af;Gs({thousands:",",grouping:[3],currency:["$",""]});function Gs(t){return Cf=a0(t),Ve=Cf.format,Af=Cf.formatPrefix,Cf}function Vs(t){return Math.max(0,-We(Math.abs(t)))}function js(t,e){return Math.max(0,Math.max(-8,Math.min(8,Math.floor(We(e)/3)))*3-We(Math.abs(t)))}function Zs(t,e){return t=Math.abs(t),e=Math.abs(e)-t,Math.max(0,We(e)-We(t))+1}var U=1e-6,$f=1e-12,V=Math.PI,ft=V/2,Ks=V/4,Dt=V*2,$t=180/V,ut=V/180,K=Math.abs,ve=Math.atan,qt=Math.atan2,B=Math.cos;var Ef=Math.exp;var lr=Math.log,If=Math.pow,Y=Math.sin,Gt=Math.sign||function(t){return t>0?1:t<0?-1:0},mt=Math.sqrt,jr=Math.tan;function kf(t){return t>1?0:t<-1?V:Math.acos(t)}function Mt(t){return t>1?ft:t<-1?-ft:Math.asin(t)}function Rt(){}function Nf(t,e){t&&u0.hasOwnProperty(t.type)&&u0[t.type](t,e)}var f0={Feature:function(t,e){Nf(t.geometry,e)},FeatureCollection:function(t,e){for(var n=t.features,r=-1,o=n.length;++r<o;)Nf(n[r].geometry,e)}},u0={Sphere:function(t,e){e.sphere()},Point:function(t,e){t=t.coordinates,e.point(t[0],t[1],t[2])},MultiPoint:function(t,e){for(var n=t.coordinates,r=-1,o=n.length;++r<o;)t=n[r],e.point(t[0],t[1],t[2])},LineString:function(t,e){Qs(t.coordinates,e,0)},MultiLineString:function(t,e){for(var n=t.coordinates,r=-1,o=n.length;++r<o;)Qs(n[r],e,0)},Polygon:function(t,e){c0(t.coordinates,e)},MultiPolygon:function(t,e){for(var n=t.coordinates,r=-1,o=n.length;++r<o;)c0(n[r],e)},GeometryCollection:function(t,e){for(var n=t.geometries,r=-1,o=n.length;++r<o;)Nf(n[r],e)}};function Qs(t,e,n){var r=-1,o=t.length-n,i;for(e.lineStart();++r<o;)i=t[r],e.point(i[0],i[1],i[2]);e.lineEnd()}function c0(t,e){var n=-1,r=t.length;for(e.polygonStart();++n<r;)Qs(t[n],e,1);e.polygonEnd()}function ke(t,e){t&&f0.hasOwnProperty(t.type)?f0[t.type](t,e):Nf(t,e)}function mi(t){return[qt(t[1],t[0]),Mt(t[2])]}function je(t){var e=t[0],n=t[1],r=B(n);return[r*B(e),r*Y(e),Y(n)]}function hi(t,e){return t[0]*e[0]+t[1]*e[1]+t[2]*e[2]}function Zr(t,e){return[t[1]*e[2]-t[2]*e[1],t[2]*e[0]-t[0]*e[2],t[0]*e[1]-t[1]*e[0]]}function Df(t,e){t[0]+=e[0],t[1]+=e[1],t[2]+=e[2]}function gi(t,e){return[t[0]*e,t[1]*e,t[2]*e]}function xi(t){var e=mt(t[0]*t[0]+t[1]*t[1]+t[2]*t[2]);t[0]/=e,t[1]/=e,t[2]/=e}function yi(t,e){function n(r,o){return r=t(r,o),e(r[0],r[1])}return t.invert&&e.invert&&(n.invert=function(r,o){return r=e.invert(r,o),r&&t.invert(r[0],r[1])}),n}function Js(t,e){return K(t)>V&&(t-=Math.round(t/Dt)*Dt),[t,e]}Js.invert=Js;function tl(t,e,n){return(t%=Dt)?e||n?yi(l0(t),d0(e,n)):l0(t):e||n?d0(e,n):Js}function s0(t){return function(e,n){return e+=t,K(e)>V&&(e-=Math.round(e/Dt)*Dt),[e,n]}}function l0(t){var e=s0(t);return e.invert=s0(-t),e}function d0(t,e){var n=B(t),r=Y(t),o=B(e),i=Y(e);function a(f,u){var c=B(u),s=B(f)*c,d=Y(f)*c,l=Y(u),p=l*n+s*r;return[qt(d*o-p*i,s*n-l*r),Mt(p*o+d*i)]}return a.invert=function(f,u){var c=B(u),s=B(f)*c,d=Y(f)*c,l=Y(u),p=l*o-d*i;return[qt(d*o+l*i,s*n+p*r),Mt(p*n-s*r)]},a}function p0(t){t=tl(t[0]*ut,t[1]*ut,t.length>2?t[2]*ut:0);function e(n){return n=t(n[0]*ut,n[1]*ut),n[0]*=$t,n[1]*=$t,n}return e.invert=function(n){return n=t.invert(n[0]*ut,n[1]*ut),n[0]*=$t,n[1]*=$t,n},e}function h0(t,e,n,r,o,i){if(n){var a=B(e),f=Y(e),u=r*n;o==null?(o=e+r*Dt,i=e-u/2):(o=m0(a,o),i=m0(a,i),(r>0?o<i:o>i)&&(o+=r*Dt));for(var c,s=o;r>0?s>i:s<i;s-=u)c=mi([a,-f*B(s),-f*Y(s)]),t.point(c[0],c[1])}}function m0(t,e){e=je(e),e[0]-=t,xi(e);var n=kf(-e[1]);return((-e[2]<0?-n:n)+Dt-U)%Dt}function Rf(){var t=[],e;return{point:function(n,r,o){e.push([n,r,o])},lineStart:function(){t.push(e=[])},lineEnd:Rt,rejoin:function(){t.length>1&&t.push(t.pop().concat(t.shift()))},result:function(){var n=t;return t=[],e=null,n}}}function Kr(t,e){return K(t[0]-e[0])<U&&K(t[1]-e[1])<U}function Lf(t,e,n,r){this.x=t,this.z=e,this.o=n,this.e=r,this.v=!1,this.n=this.p=null}function Pf(t,e,n,r,o){var i=[],a=[],f,u;if(t.forEach(function(m){if(!((h=m.length-1)<=0)){var h,g=m[0],b=m[h],x;if(Kr(g,b)){if(!g[2]&&!b[2]){for(o.lineStart(),f=0;f<h;++f)o.point((g=m[f])[0],g[1]);o.lineEnd();return}b[0]+=2*U}i.push(x=new Lf(g,m,null,!0)),a.push(x.o=new Lf(g,null,x,!1)),i.push(x=new Lf(b,m,null,!1)),a.push(x.o=new Lf(b,null,x,!0))}}),!!i.length){for(a.sort(e),g0(i),g0(a),f=0,u=a.length;f<u;++f)a[f].e=n=!n;for(var c=i[0],s,d;;){for(var l=c,p=!0;l.v;)if((l=l.n)===c)return;s=l.z,o.lineStart();do{if(l.v=l.o.v=!0,l.e){if(p)for(f=0,u=s.length;f<u;++f)o.point((d=s[f])[0],d[1]);else r(l.x,l.n.x,1,o);l=l.n}else{if(p)for(s=l.p.z,f=s.length-1;f>=0;--f)o.point((d=s[f])[0],d[1]);else r(l.x,l.p.x,-1,o);l=l.p}l=l.o,s=l.z,p=!p}while(!l.v);o.lineEnd()}}}function g0(t){if(e=t.length){for(var e,n=0,r=t[0],o;++n<e;)r.n=o=t[n],o.p=r,r=o;r.n=o=t[0],o.p=r}}function el(t){return K(t[0])<=V?t[0]:Gt(t[0])*((K(t[0])+V)%Dt-V)}function x0(t,e){var n=el(e),r=e[1],o=Y(r),i=[Y(n),-B(n),0],a=0,f=0,u=new ae;o===1?r=ft+U:o===-1&&(r=-ft-U);for(var c=0,s=t.length;c<s;++c)if(l=(d=t[c]).length)for(var d,l,p=d[l-1],m=el(p),h=p[1]/2+Ks,g=Y(h),b=B(h),x=0;x<l;++x,m=y,g=v,b=T,p=M){var M=d[x],y=el(M),w=M[1]/2+Ks,v=Y(w),T=B(w),E=y-m,I=E>=0?1:-1,F=I*E,_=F>V,R=g*v;if(u.add(qt(R*I*Y(F),b*T+R*B(F))),a+=_?E+I*Dt:E,_^m>=n^y>=n){var O=Zr(je(p),je(M));xi(O);var L=Zr(i,O);xi(L);var S=(_^E>=0?-1:1)*Mt(L[2]);(r>S||r===S&&(O[0]||O[1]))&&(f+=_^E>=0?1:-1)}}return(a<-U||a<U&&u<-$f)^f&1}function Of(t,e,n,r){return function(o){var i=e(o),a=Rf(),f=e(a),u=!1,c,s,d,l={point:p,lineStart:h,lineEnd:g,polygonStart:function(){l.point=b,l.lineStart=x,l.lineEnd=M,s=[],c=[]},polygonEnd:function(){l.point=p,l.lineStart=h,l.lineEnd=g,s=Fr(s);var y=x0(c,r);s.length?(u||(o.polygonStart(),u=!0),Pf(s,hw,y,n,o)):y&&(u||(o.polygonStart(),u=!0),o.lineStart(),n(null,null,1,o),o.lineEnd()),u&&(o.polygonEnd(),u=!1),s=c=null},sphere:function(){o.polygonStart(),o.lineStart(),n(null,null,1,o),o.lineEnd(),o.polygonEnd()}};function p(y,w){t(y,w)&&o.point(y,w)}function m(y,w){i.point(y,w)}function h(){l.point=m,i.lineStart()}function g(){l.point=p,i.lineEnd()}function b(y,w){d.push([y,w]),f.point(y,w)}function x(){f.lineStart(),d=[]}function M(){b(d[0][0],d[0][1]),f.lineEnd();var y=f.clean(),w=a.result(),v,T=w.length,E,I,F;if(d.pop(),c.push(d),d=null,!!T){if(y&1){if(I=w[0],(E=I.length-1)>0){for(u||(o.polygonStart(),u=!0),o.lineStart(),v=0;v<E;++v)o.point((F=I[v])[0],F[1]);o.lineEnd()}return}T>1&&y&2&&w.push(w.pop().concat(w.shift())),s.push(w.filter(mw))}}return l}}function mw(t){return t.length>1}function hw(t,e){return((t=t.x)[0]<0?t[1]-ft-U:ft-t[1])-((e=e.x)[0]<0?e[1]-ft-U:ft-e[1])}var nl=Of(function(){return!0},gw,yw,[-V,-ft]);function gw(t){var e=NaN,n=NaN,r=NaN,o;return{lineStart:function(){t.lineStart(),o=1},point:function(i,a){var f=i>0?V:-V,u=K(i-e);K(u-V)<U?(t.point(e,n=(n+a)/2>0?ft:-ft),t.point(r,n),t.lineEnd(),t.lineStart(),t.point(f,n),t.point(i,n),o=0):r!==f&&u>=V&&(K(e-r)<U&&(e-=r*U),K(i-f)<U&&(i-=f*U),n=xw(e,n,i,a),t.point(r,n),t.lineEnd(),t.lineStart(),t.point(f,n),o=0),t.point(e=i,n=a),r=f},lineEnd:function(){t.lineEnd(),e=n=NaN},clean:function(){return 2-o}}}function xw(t,e,n,r){var o,i,a=Y(t-n);return K(a)>U?ve((Y(e)*(i=B(r))*Y(n)-Y(r)*(o=B(e))*Y(t))/(o*i*a)):(e+r)/2}function yw(t,e,n,r){var o;if(t==null)o=n*ft,r.point(-V,o),r.point(0,o),r.point(V,o),r.point(V,0),r.point(V,-o),r.point(0,-o),r.point(-V,-o),r.point(-V,0),r.point(-V,o);else if(K(t[0]-e[0])>U){var i=t[0]<e[0]?V:-V;o=n*i/2,r.point(-i,o),r.point(0,o),r.point(i,o)}else r.point(e[0],e[1])}function y0(t){var e=B(t),n=6*ut,r=e>0,o=K(e)>U;function i(s,d,l,p){h0(p,t,n,l,s,d)}function a(s,d){return B(s)*B(d)>e}function f(s){var d,l,p,m,h;return{lineStart:function(){m=p=!1,h=1},point:function(g,b){var x=[g,b],M,y=a(g,b),w=r?y?0:c(g,b):y?c(g+(g<0?V:-V),b):0;if(!d&&(m=p=y)&&s.lineStart(),y!==p&&(M=u(d,x),(!M||Kr(d,M)||Kr(x,M))&&(x[2]=1)),y!==p)h=0,y?(s.lineStart(),M=u(x,d),s.point(M[0],M[1])):(M=u(d,x),s.point(M[0],M[1],2),s.lineEnd()),d=M;else if(o&&d&&r^y){var v;!(w&l)&&(v=u(x,d,!0))&&(h=0,r?(s.lineStart(),s.point(v[0][0],v[0][1]),s.point(v[1][0],v[1][1]),s.lineEnd()):(s.point(v[1][0],v[1][1]),s.lineEnd(),s.lineStart(),s.point(v[0][0],v[0][1],3)))}y&&(!d||!Kr(d,x))&&s.point(x[0],x[1]),d=x,p=y,l=w},lineEnd:function(){p&&s.lineEnd(),d=null},clean:function(){return h|(m&&p)<<1}}}function u(s,d,l){var p=je(s),m=je(d),h=[1,0,0],g=Zr(p,m),b=hi(g,g),x=g[0],M=b-x*x;if(!M)return!l&&s;var y=e*b/M,w=-e*x/M,v=Zr(h,g),T=gi(h,y),E=gi(g,w);Df(T,E);var I=v,F=hi(T,I),_=hi(I,I),R=F*F-_*(hi(T,T)-1);if(!(R<0)){var O=mt(R),L=gi(I,(-F-O)/_);if(Df(L,T),L=mi(L),!l)return L;var S=s[0],A=d[0],N=s[1],P=d[1],D;A<S&&(D=S,S=A,A=D);var tt=A-S,Z=K(tt-V)<U,W=Z||tt<U;if(!Z&&P<N&&(D=N,N=P,P=D),W?Z?N+P>0^L[1]<(K(L[0]-S)<U?N:P):N<=L[1]&&L[1]<=P:tt>V^(S<=L[0]&&L[0]<=A)){var Q=gi(I,(-F+O)/_);return Df(Q,T),[L,mi(Q)]}}}function c(s,d){var l=r?t:V-t,p=0;return s<-l?p|=1:s>l&&(p|=2),d<-l?p|=4:d>l&&(p|=8),p}return Of(a,f,i,r?[0,-t]:[-V,t-V])}function b0(t,e,n,r,o,i){var a=t[0],f=t[1],u=e[0],c=e[1],s=0,d=1,l=u-a,p=c-f,m;if(m=n-a,!(!l&&m>0)){if(m/=l,l<0){if(m<s)return;m<d&&(d=m)}else if(l>0){if(m>d)return;m>s&&(s=m)}if(m=o-a,!(!l&&m<0)){if(m/=l,l<0){if(m>d)return;m>s&&(s=m)}else if(l>0){if(m<s)return;m<d&&(d=m)}if(m=r-f,!(!p&&m>0)){if(m/=p,p<0){if(m<s)return;m<d&&(d=m)}else if(p>0){if(m>d)return;m>s&&(s=m)}if(m=i-f,!(!p&&m<0)){if(m/=p,p<0){if(m>d)return;m>s&&(s=m)}else if(p>0){if(m<s)return;m<d&&(d=m)}return s>0&&(t[0]=a+s*l,t[1]=f+s*p),d<1&&(e[0]=a+d*l,e[1]=f+d*p),!0}}}}}var bi=1e9,Ff=-bi;function Qr(t,e,n,r){function o(c,s){return t<=c&&c<=n&&e<=s&&s<=r}function i(c,s,d,l){var p=0,m=0;if(c==null||(p=a(c,d))!==(m=a(s,d))||u(c,s)<0^d>0)do l.point(p===0||p===3?t:n,p>1?r:e);while((p=(p+d+4)%4)!==m);else l.point(s[0],s[1])}function a(c,s){return K(c[0]-t)<U?s>0?0:3:K(c[0]-n)<U?s>0?2:1:K(c[1]-e)<U?s>0?1:0:s>0?3:2}function f(c,s){return u(c.x,s.x)}function u(c,s){var d=a(c,1),l=a(s,1);return d!==l?d-l:d===0?s[1]-c[1]:d===1?c[0]-s[0]:d===2?c[1]-s[1]:s[0]-c[0]}return function(c){var s=c,d=Rf(),l,p,m,h,g,b,x,M,y,w,v,T={point:E,lineStart:R,lineEnd:O,polygonStart:F,polygonEnd:_};function E(S,A){o(S,A)&&s.point(S,A)}function I(){for(var S=0,A=0,N=p.length;A<N;++A)for(var P=p[A],D=1,tt=P.length,Z=P[0],W,Q,at=Z[0],Ut=Z[1];D<tt;++D)W=at,Q=Ut,Z=P[D],at=Z[0],Ut=Z[1],Q<=r?Ut>r&&(at-W)*(r-Q)>(Ut-Q)*(t-W)&&++S:Ut<=r&&(at-W)*(r-Q)<(Ut-Q)*(t-W)&&--S;return S}function F(){s=d,l=[],p=[],v=!0}function _(){var S=I(),A=v&&S,N=(l=Fr(l)).length;(A||N)&&(c.polygonStart(),A&&(c.lineStart(),i(null,null,1,c),c.lineEnd()),N&&Pf(l,f,S,i,c),c.polygonEnd()),s=c,l=p=m=null}function R(){T.point=L,p&&p.push(m=[]),w=!0,y=!1,x=M=NaN}function O(){l&&(L(h,g),b&&y&&d.rejoin(),l.push(d.result())),T.point=E,y&&s.lineEnd()}function L(S,A){var N=o(S,A);if(p&&m.push([S,A]),w)h=S,g=A,b=N,w=!1,N&&(s.lineStart(),s.point(S,A));else if(N&&y)s.point(S,A);else{var P=[x=Math.max(Ff,Math.min(bi,x)),M=Math.max(Ff,Math.min(bi,M))],D=[S=Math.max(Ff,Math.min(bi,S)),A=Math.max(Ff,Math.min(bi,A))];b0(P,D,t,e,n,r)?(y||(s.lineStart(),s.point(P[0],P[1])),s.point(D[0],D[1]),N||s.lineEnd(),v=!1):N&&(s.lineStart(),s.point(S,A),v=!1)}x=S,M=A,y=N}return T}}var wi=t=>t;var rl=new ae,ol=new ae,w0,v0,il,al,Nn={point:Rt,lineStart:Rt,lineEnd:Rt,polygonStart:function(){Nn.lineStart=bw,Nn.lineEnd=vw},polygonEnd:function(){Nn.lineStart=Nn.lineEnd=Nn.point=Rt,rl.add(K(ol)),ol=new ae},result:function(){var t=rl/2;return rl=new ae,t}};function bw(){Nn.point=ww}function ww(t,e){Nn.point=M0,w0=il=t,v0=al=e}function M0(t,e){ol.add(al*t-il*e),il=t,al=e}function vw(){M0(w0,v0)}var fl=Nn;var Jr=1/0,qf=Jr,vi=-Jr,zf=vi,Mw={point:Sw,lineStart:Rt,lineEnd:Rt,polygonStart:Rt,polygonEnd:Rt,result:function(){var t=[[Jr,qf],[vi,zf]];return vi=zf=-(qf=Jr=1/0),t}};function Sw(t,e){t<Jr&&(Jr=t),t>vi&&(vi=t),e<qf&&(qf=e),e>zf&&(zf=e)}var to=Mw;var ul=0,cl=0,Mi=0,Yf=0,Bf=0,eo=0,sl=0,ll=0,Si=0,_0,C0,Ze,Ke,Ne={point:dr,lineStart:S0,lineEnd:T0,polygonStart:function(){Ne.lineStart=Cw,Ne.lineEnd=Aw},polygonEnd:function(){Ne.point=dr,Ne.lineStart=S0,Ne.lineEnd=T0},result:function(){var t=Si?[sl/Si,ll/Si]:eo?[Yf/eo,Bf/eo]:Mi?[ul/Mi,cl/Mi]:[NaN,NaN];return ul=cl=Mi=Yf=Bf=eo=sl=ll=Si=0,t}};function dr(t,e){ul+=t,cl+=e,++Mi}function S0(){Ne.point=Tw}function Tw(t,e){Ne.point=_w,dr(Ze=t,Ke=e)}function _w(t,e){var n=t-Ze,r=e-Ke,o=mt(n*n+r*r);Yf+=o*(Ze+t)/2,Bf+=o*(Ke+e)/2,eo+=o,dr(Ze=t,Ke=e)}function T0(){Ne.point=dr}function Cw(){Ne.point=$w}function Aw(){A0(_0,C0)}function $w(t,e){Ne.point=A0,dr(_0=Ze=t,C0=Ke=e)}function A0(t,e){var n=t-Ze,r=e-Ke,o=mt(n*n+r*r);Yf+=o*(Ze+t)/2,Bf+=o*(Ke+e)/2,eo+=o,o=Ke*t-Ze*e,sl+=o*(Ze+t),ll+=o*(Ke+e),Si+=o*3,dr(Ze=t,Ke=e)}var dl=Ne;function Uf(t){this._context=t}Uf.prototype={_radius:4.5,pointRadius:function(t){return this._radius=t,this},polygonStart:function(){this._line=0},polygonEnd:function(){this._line=NaN},lineStart:function(){this._point=0},lineEnd:function(){this._line===0&&this._context.closePath(),this._point=NaN},point:function(t,e){switch(this._point){case 0:{this._context.moveTo(t,e),this._point=1;break}case 1:{this._context.lineTo(t,e);break}default:{this._context.moveTo(t+this._radius,e),this._context.arc(t,e,this._radius,0,Dt);break}}},result:Rt};var ml=new ae,pl,$0,E0,Ti,_i,Xf={point:Rt,lineStart:function(){Xf.point=Ew},lineEnd:function(){pl&&I0($0,E0),Xf.point=Rt},polygonStart:function(){pl=!0},polygonEnd:function(){pl=null},result:function(){var t=+ml;return ml=new ae,t}};function Ew(t,e){Xf.point=I0,$0=Ti=t,E0=_i=e}function I0(t,e){Ti-=t,_i-=e,ml.add(mt(Ti*Ti+_i*_i)),Ti=t,_i=e}var hl=Xf;var k0,Hf,N0,D0,no=class{constructor(e){this._append=e==null?R0:Iw(e),this._radius=4.5,this._=""}pointRadius(e){return this._radius=+e,this}polygonStart(){this._line=0}polygonEnd(){this._line=NaN}lineStart(){this._point=0}lineEnd(){this._line===0&&(this._+="Z"),this._point=NaN}point(e,n){switch(this._point){case 0:{this._append`M${e},${n}`,this._point=1;break}case 1:{this._append`L${e},${n}`;break}default:{if(this._append`M${e},${n}`,this._radius!==N0||this._append!==Hf){let r=this._radius,o=this._;this._="",this._append`m0,${r}a${r},${r} 0 1,1 0,${-2*r}a${r},${r} 0 1,1 0,${2*r}z`,N0=r,Hf=this._append,D0=this._,this._=o}this._+=D0;break}}}result(){let e=this._;return this._="",e.length?e:null}};function R0(t){let e=1;this._+=t[0];for(let n=t.length;e<n;++e)this._+=arguments[e]+t[e]}function Iw(t){let e=Math.floor(t);if(!(e>=0))throw new RangeError(`invalid digits: ${t}`);if(e>15)return R0;if(e!==k0){let n=10**e;k0=e,Hf=function(o){let i=1;this._+=o[0];for(let a=o.length;i<a;++i)this._+=Math.round(arguments[i]*n)/n+o[i]}}return Hf}function Ci(t,e){let n=3,r=4.5,o,i;function a(f){return f&&(typeof r=="function"&&i.pointRadius(+r.apply(this,arguments)),ke(f,o(i))),i.result()}return a.area=function(f){return ke(f,o(fl)),fl.result()},a.measure=function(f){return ke(f,o(hl)),hl.result()},a.bounds=function(f){return ke(f,o(to)),to.result()},a.centroid=function(f){return ke(f,o(dl)),dl.result()},a.projection=function(f){return arguments.length?(o=f==null?(t=null,wi):(t=f).stream,a):t},a.context=function(f){return arguments.length?(i=f==null?(e=null,new no(n)):new Uf(e=f),typeof r!="function"&&i.pointRadius(r),a):e},a.pointRadius=function(f){return arguments.length?(r=typeof f=="function"?f:(i.pointRadius(+f),+f),a):r},a.digits=function(f){if(!arguments.length)return n;if(f==null)n=null;else{let u=Math.floor(f);if(!(u>=0))throw new RangeError(`invalid digits: ${f}`);n=u}return e===null&&(i=new no(n)),a},a.projection(t).digits(n).context(e)}function Ai(t){return{stream:ro(t)}}function ro(t){return function(e){var n=new gl;for(var r in t)n[r]=t[r];return n.stream=e,n}}function gl(){}gl.prototype={constructor:gl,point:function(t,e){this.stream.point(t,e)},sphere:function(){this.stream.sphere()},lineStart:function(){this.stream.lineStart()},lineEnd:function(){this.stream.lineEnd()},polygonStart:function(){this.stream.polygonStart()},polygonEnd:function(){this.stream.polygonEnd()}};function xl(t,e,n){var r=t.clipExtent&&t.clipExtent();return t.scale(150).translate([0,0]),r!=null&&t.clipExtent(null),ke(n,t.stream(to)),e(to.result()),r!=null&&t.clipExtent(r),t}function $i(t,e,n){return xl(t,function(r){var o=e[1][0]-e[0][0],i=e[1][1]-e[0][1],a=Math.min(o/(r[1][0]-r[0][0]),i/(r[1][1]-r[0][1])),f=+e[0][0]+(o-a*(r[1][0]+r[0][0]))/2,u=+e[0][1]+(i-a*(r[1][1]+r[0][1]))/2;t.scale(150*a).translate([f,u])},n)}function Wf(t,e,n){return $i(t,[[0,0],e],n)}function Gf(t,e,n){return xl(t,function(r){var o=+e,i=o/(r[1][0]-r[0][0]),a=(o-i*(r[1][0]+r[0][0]))/2,f=-i*r[0][1];t.scale(150*i).translate([a,f])},n)}function Vf(t,e,n){return xl(t,function(r){var o=+e,i=o/(r[1][1]-r[0][1]),a=-i*r[0][0],f=(o-i*(r[1][1]+r[0][1]))/2;t.scale(150*i).translate([a,f])},n)}var L0=16,kw=B(30*ut);function yl(t,e){return+e?Dw(t,e):Nw(t)}function Nw(t){return ro({point:function(e,n){e=t(e,n),this.stream.point(e[0],e[1])}})}function Dw(t,e){function n(r,o,i,a,f,u,c,s,d,l,p,m,h,g){var b=c-r,x=s-o,M=b*b+x*x;if(M>4*e&&h--){var y=a+l,w=f+p,v=u+m,T=mt(y*y+w*w+v*v),E=Mt(v/=T),I=K(K(v)-1)<U||K(i-d)<U?(i+d)/2:qt(w,y),F=t(I,E),_=F[0],R=F[1],O=_-r,L=R-o,S=x*O-b*L;(S*S/M>e||K((b*O+x*L)/M-.5)>.3||a*l+f*p+u*m<kw)&&(n(r,o,i,a,f,u,_,R,I,y/=T,w/=T,v,h,g),g.point(_,R),n(_,R,I,y,w,v,c,s,d,l,p,m,h,g))}}return function(r){var o,i,a,f,u,c,s,d,l,p,m,h,g={point:b,lineStart:x,lineEnd:y,polygonStart:function(){r.polygonStart(),g.lineStart=w},polygonEnd:function(){r.polygonEnd(),g.lineStart=x}};function b(E,I){E=t(E,I),r.point(E[0],E[1])}function x(){d=NaN,g.point=M,r.lineStart()}function M(E,I){var F=je([E,I]),_=t(E,I);n(d,l,s,p,m,h,d=_[0],l=_[1],s=E,p=F[0],m=F[1],h=F[2],L0,r),r.point(d,l)}function y(){g.point=b,r.lineEnd()}function w(){x(),g.point=v,g.lineEnd=T}function v(E,I){M(o=E,I),i=d,a=l,f=p,u=m,c=h,g.point=M}function T(){n(d,l,s,p,m,h,i,a,o,f,u,c,L0,r),g.lineEnd=y,y()}return g}}var Rw=ro({point:function(t,e){this.stream.point(t*ut,e*ut)}});function Lw(t){return ro({point:function(e,n){var r=t(e,n);return this.stream.point(r[0],r[1])}})}function Pw(t,e,n,r,o){function i(a,f){return a*=r,f*=o,[e+t*a,n-t*f]}return i.invert=function(a,f){return[(a-e)/t*r,(n-f)/t*o]},i}function P0(t,e,n,r,o,i){if(!i)return Pw(t,e,n,r,o);var a=B(i),f=Y(i),u=a*t,c=f*t,s=a/t,d=f/t,l=(f*n-a*e)/t,p=(f*e+a*n)/t;function m(h,g){return h*=r,g*=o,[u*h-c*g+e,n-c*h-u*g]}return m.invert=function(h,g){return[r*(s*h-d*g+l),o*(p-d*h-s*g)]},m}function zt(t){return bl(function(){return t})()}function bl(t){var e,n=150,r=480,o=250,i=0,a=0,f=0,u=0,c=0,s,d=0,l=1,p=1,m=null,h=nl,g=null,b,x,M,y=wi,w=.5,v,T,E,I,F;function _(S){return E(S[0]*ut,S[1]*ut)}function R(S){return S=E.invert(S[0],S[1]),S&&[S[0]*$t,S[1]*$t]}_.stream=function(S){return I&&F===S?I:I=Rw(Lw(s)(h(v(y(F=S)))))},_.preclip=function(S){return arguments.length?(h=S,m=void 0,L()):h},_.postclip=function(S){return arguments.length?(y=S,g=b=x=M=null,L()):y},_.clipAngle=function(S){return arguments.length?(h=+S?y0(m=S*ut):(m=null,nl),L()):m*$t},_.clipExtent=function(S){return arguments.length?(y=S==null?(g=b=x=M=null,wi):Qr(g=+S[0][0],b=+S[0][1],x=+S[1][0],M=+S[1][1]),L()):g==null?null:[[g,b],[x,M]]},_.scale=function(S){return arguments.length?(n=+S,O()):n},_.translate=function(S){return arguments.length?(r=+S[0],o=+S[1],O()):[r,o]},_.center=function(S){return arguments.length?(i=S[0]%360*ut,a=S[1]%360*ut,O()):[i*$t,a*$t]},_.rotate=function(S){return arguments.length?(f=S[0]%360*ut,u=S[1]%360*ut,c=S.length>2?S[2]%360*ut:0,O()):[f*$t,u*$t,c*$t]},_.angle=function(S){return arguments.length?(d=S%360*ut,O()):d*$t},_.reflectX=function(S){return arguments.length?(l=S?-1:1,O()):l<0},_.reflectY=function(S){return arguments.length?(p=S?-1:1,O()):p<0},_.precision=function(S){return arguments.length?(v=yl(T,w=S*S),L()):mt(w)},_.fitExtent=function(S,A){return $i(_,S,A)},_.fitSize=function(S,A){return Wf(_,S,A)},_.fitWidth=function(S,A){return Gf(_,S,A)},_.fitHeight=function(S,A){return Vf(_,S,A)};function O(){var S=P0(n,0,0,l,p,d).apply(null,e(i,a)),A=P0(n,r-S[0],o-S[1],l,p,d);return s=tl(f,u,c),T=yi(e,A),E=yi(s,T),v=yl(T,w),L()}function L(){return I=F=null,_}return function(){return e=t.apply(this,arguments),_.invert=e.invert&&R,O()}}function oo(t){var e=0,n=V/3,r=bl(t),o=r(e,n);return o.parallels=function(i){return arguments.length?r(e=i[0]*ut,n=i[1]*ut):[e*$t,n*$t]},o}function O0(t){var e=B(t);function n(r,o){return[r*e,Y(o)/e]}return n.invert=function(r,o){return[r/e,Mt(o*e)]},n}function F0(t,e){var n=Y(t),r=(n+Y(e))/2;if(K(r)<U)return O0(t);var o=1+n*(2*r-n),i=mt(o)/r;function a(f,u){var c=mt(o-2*r*Y(u))/r;return[c*Y(f*=r),i-c*B(f)]}return a.invert=function(f,u){var c=i-u,s=qt(f,K(c))*Gt(c);return c*r<0&&(s-=V*Gt(f)*Gt(c)),[s/r,Mt((o-(f*f+c*c)*r*r)/(2*r))]},a}function Dn(){return oo(F0).scale(155.424).center([0,33.6442])}function Ei(){return Dn().parallels([29.5,45.5]).scale(1070).translate([480,250]).rotate([96,0]).center([-.6,38.7])}function Ow(t){var e=t.length;return{point:function(n,r){for(var o=-1;++o<e;)t[o].point(n,r)},sphere:function(){for(var n=-1;++n<e;)t[n].sphere()},lineStart:function(){for(var n=-1;++n<e;)t[n].lineStart()},lineEnd:function(){for(var n=-1;++n<e;)t[n].lineEnd()},polygonStart:function(){for(var n=-1;++n<e;)t[n].polygonStart()},polygonEnd:function(){for(var n=-1;++n<e;)t[n].polygonEnd()}}}function wl(){var t,e,n=Ei(),r,o=Dn().rotate([154,0]).center([-2,58.5]).parallels([55,65]),i,a=Dn().rotate([157,0]).center([-3,19.9]).parallels([8,18]),f,u,c={point:function(l,p){u=[l,p]}};function s(l){var p=l[0],m=l[1];return u=null,r.point(p,m),u||(i.point(p,m),u)||(f.point(p,m),u)}s.invert=function(l){var p=n.scale(),m=n.translate(),h=(l[0]-m[0])/p,g=(l[1]-m[1])/p;return(g>=.12&&g<.234&&h>=-.425&&h<-.214?o:g>=.166&&g<.234&&h>=-.214&&h<-.115?a:n).invert(l)},s.stream=function(l){return t&&e===l?t:t=Ow([n.stream(e=l),o.stream(l),a.stream(l)])},s.precision=function(l){return arguments.length?(n.precision(l),o.precision(l),a.precision(l),d()):n.precision()},s.scale=function(l){return arguments.length?(n.scale(l),o.scale(l*.35),a.scale(l),s.translate(n.translate())):n.scale()},s.translate=function(l){if(!arguments.length)return n.translate();var p=n.scale(),m=+l[0],h=+l[1];return r=n.translate(l).clipExtent([[m-.455*p,h-.238*p],[m+.455*p,h+.238*p]]).stream(c),i=o.translate([m-.307*p,h+.201*p]).clipExtent([[m-.425*p+U,h+.12*p+U],[m-.214*p-U,h+.234*p-U]]).stream(c),f=a.translate([m-.205*p,h+.212*p]).clipExtent([[m-.214*p+U,h+.166*p+U],[m-.115*p-U,h+.234*p-U]]).stream(c),d()},s.fitExtent=function(l,p){return $i(s,l,p)},s.fitSize=function(l,p){return Wf(s,l,p)},s.fitWidth=function(l,p){return Gf(s,l,p)},s.fitHeight=function(l,p){return Vf(s,l,p)};function d(){return t=e=null,s}return s.scale(1070)}function jf(t){return function(e,n){var r=B(e),o=B(n),i=t(r*o);return i===1/0?[2,0]:[i*o*Y(e),i*Y(n)]}}function Qe(t){return function(e,n){var r=mt(e*e+n*n),o=t(r),i=Y(o),a=B(o);return[qt(e*i,r*a),Mt(r&&n*i/r)]}}var vl=jf(function(t){return mt(2/(1+t))});vl.invert=Qe(function(t){return 2*Mt(t/2)});function Ml(){return zt(vl).scale(124.75).clipAngle(180-.001)}var Sl=jf(function(t){return(t=kf(t))&&t/Y(t)});Sl.invert=Qe(function(t){return t});function Tl(){return zt(Sl).scale(79.4188).clipAngle(180-.001)}function io(t,e){return[t,lr(jr((ft+e)/2))]}io.invert=function(t,e){return[t,2*ve(Ef(e))-ft]};function _l(){return Cl(io).scale(961/Dt)}function Cl(t){var e=zt(t),n=e.center,r=e.scale,o=e.translate,i=e.clipExtent,a=null,f,u,c;e.scale=function(d){return arguments.length?(r(d),s()):r()},e.translate=function(d){return arguments.length?(o(d),s()):o()},e.center=function(d){return arguments.length?(n(d),s()):n()},e.clipExtent=function(d){return arguments.length?(d==null?a=f=u=c=null:(a=+d[0][0],f=+d[0][1],u=+d[1][0],c=+d[1][1]),s()):a==null?null:[[a,f],[u,c]]};function s(){var d=V*r(),l=e(p0(e.rotate()).invert([0,0]));return i(a==null?[[l[0]-d,l[1]-d],[l[0]+d,l[1]+d]]:t===io?[[Math.max(l[0]-d,a),f],[Math.min(l[0]+d,u),c]]:[[a,Math.max(l[1]-d,f)],[u,Math.min(l[1]+d,c)]])}return s()}function Zf(t){return jr((ft+t)/2)}function q0(t,e){var n=B(t),r=t===e?Y(t):lr(n/B(e))/lr(Zf(e)/Zf(t)),o=n*If(Zf(t),r)/r;if(!r)return io;function i(a,f){o>0?f<-ft+U&&(f=-ft+U):f>ft-U&&(f=ft-U);var u=o/If(Zf(f),r);return[u*Y(r*a),o-u*B(r*a)]}return i.invert=function(a,f){var u=o-f,c=Gt(r)*mt(a*a+u*u),s=qt(a,K(u))*Gt(u);return u*r<0&&(s-=V*Gt(a)*Gt(u)),[s/r,2*ve(If(o/c,1/r))-ft]},i}function Al(){return oo(q0).scale(109.5).parallels([30,30])}function ao(t,e){return[t,e]}ao.invert=ao;function $l(){return zt(ao).scale(152.63)}function z0(t,e){var n=B(t),r=t===e?Y(t):(n-B(e))/(e-t),o=n/r+t;if(K(r)<U)return ao;function i(a,f){var u=o-f,c=r*a;return[u*Y(c),o-u*B(c)]}return i.invert=function(a,f){var u=o-f,c=qt(a,K(u))*Gt(u);return u*r<0&&(c-=V*Gt(a)*Gt(u)),[c/r,o-Gt(r)*mt(a*a+u*u)]},i}function El(){return oo(z0).scale(131.154).center([0,13.9389])}var Ii=1.340264,ki=-.081106,Ni=893e-6,Di=.003796,Kf=mt(3)/2,Fw=12;function Il(t,e){var n=Mt(Kf*Y(e)),r=n*n,o=r*r*r;return[t*B(n)/(Kf*(Ii+3*ki*r+o*(7*Ni+9*Di*r))),n*(Ii+ki*r+o*(Ni+Di*r))]}Il.invert=function(t,e){for(var n=e,r=n*n,o=r*r*r,i=0,a,f,u;i<Fw&&(f=n*(Ii+ki*r+o*(Ni+Di*r))-e,u=Ii+3*ki*r+o*(7*Ni+9*Di*r),n-=a=f/u,r=n*n,o=r*r*r,!(K(a)<$f));++i);return[Kf*t*(Ii+3*ki*r+o*(7*Ni+9*Di*r))/B(n),Mt(Y(n)/Kf)]};function kl(){return zt(Il).scale(177.158)}function Nl(t,e){var n=B(e),r=B(t)*n;return[n*Y(t)/r,Y(e)/r]}Nl.invert=Qe(ve);function Dl(){return zt(Nl).scale(144.049).clipAngle(60)}function Rl(t,e){return[B(e)*Y(t),Y(e)]}Rl.invert=Qe(Mt);function Ll(){return zt(Rl).scale(249.5).clipAngle(90+U)}function Pl(t,e){var n=B(e),r=1+B(t)*n;return[n*Y(t)/r,Y(e)/r]}Pl.invert=Qe(function(t){return 2*ve(t)});function Ol(){return zt(Pl).scale(250).clipAngle(142)}function Fl(t,e){return[lr(jr((ft+e)/2)),-t]}Fl.invert=function(t,e){return[-e,2*ve(Ef(t))-ft]};function ql(){var t=Cl(Fl),e=t.center,n=t.rotate;return t.center=function(r){return arguments.length?e([-r[1],r[0]]):(r=e(),[r[1],-r[0]])},t.rotate=function(r){return arguments.length?n([r[0],r[1],r.length>2?r[2]+90:90]):(r=n(),[r[0],r[1],r[2]-90])},n([0,0,90]).scale(159.155)}function _t(t,e){switch(arguments.length){case 0:break;case 1:this.range(t);break;default:this.range(e).domain(t);break}return this}function Ri(t,e){switch(arguments.length){case 0:break;case 1:{typeof t=="function"?this.interpolator(t):this.range(t);break}default:{this.domain(t),typeof e=="function"?this.interpolator(e):this.range(e);break}}return this}var Li=Symbol("implicit");function pr(){var t=new Qt,e=[],n=[],r=Li;function o(i){let a=t.get(i);if(a===void 0){if(r!==Li)return r;t.set(i,a=e.push(i)-1)}return n[a%n.length]}return o.domain=function(i){if(!arguments.length)return e.slice();e=[],t=new Qt;for(let a of i)t.has(a)||t.set(a,e.push(a)-1);return o},o.range=function(i){return arguments.length?(n=Array.from(i),o):n.slice()},o.unknown=function(i){return arguments.length?(r=i,o):r},o.copy=function(){return pr(e,n).unknown(r)},_t.apply(o,arguments),o}function Rn(){var t=pr().unknown(void 0),e=t.domain,n=t.range,r=0,o=1,i,a,f=!1,u=0,c=0,s=.5;delete t.unknown;function d(){var l=e().length,p=o<r,m=p?o:r,h=p?r:o;i=(h-m)/Math.max(1,l-u+c*2),f&&(i=Math.floor(i)),m+=(h-m-i*(l-u))*s,a=i*(1-u),f&&(m=Math.round(m),a=Math.round(a));var g=er(l).map(function(b){return m+i*b});return n(p?g.reverse():g)}return t.domain=function(l){return arguments.length?(e(l),d()):e()},t.range=function(l){return arguments.length?([r,o]=l,r=+r,o=+o,d()):[r,o]},t.rangeRound=function(l){return[r,o]=l,r=+r,o=+o,f=!0,d()},t.bandwidth=function(){return a},t.step=function(){return i},t.round=function(l){return arguments.length?(f=!!l,d()):f},t.padding=function(l){return arguments.length?(u=Math.min(1,c=+l),d()):u},t.paddingInner=function(l){return arguments.length?(u=Math.min(1,l),d()):u},t.paddingOuter=function(l){return arguments.length?(c=+l,d()):c},t.align=function(l){return arguments.length?(s=Math.max(0,Math.min(1,l)),d()):s},t.copy=function(){return Rn(e(),[r,o]).round(f).paddingInner(u).paddingOuter(c).align(s)},_t.apply(d(),arguments)}function Y0(t){var e=t.copy;return t.padding=t.paddingOuter,delete t.paddingInner,delete t.paddingOuter,t.copy=function(){return Y0(e())},t}function zl(){return Y0(Rn.apply(null,arguments).paddingInner(1))}function Yl(t){return function(){return t}}function fo(t){return+t}var B0=[0,1];function oe(t){return t}function Bl(t,e){return(e-=t=+t)?function(n){return(n-t)/e}:Yl(isNaN(e)?NaN:.5)}function qw(t,e){var n;return t>e&&(n=t,t=e,e=n),function(r){return Math.max(t,Math.min(e,r))}}function zw(t,e,n){var r=t[0],o=t[1],i=e[0],a=e[1];return o<r?(r=Bl(o,r),i=n(a,i)):(r=Bl(r,o),i=n(i,a)),function(f){return i(r(f))}}function Yw(t,e,n){var r=Math.min(t.length,e.length)-1,o=new Array(r),i=new Array(r),a=-1;for(t[r]<t[0]&&(t=t.slice().reverse(),e=e.slice().reverse());++a<r;)o[a]=Bl(t[a],t[a+1]),i[a]=n(e[a],e[a+1]);return function(f){var u=un(t,f,1,r)-1;return i[u](o[u](f))}}function Je(t,e){return e.domain(t.domain()).range(t.range()).interpolate(t.interpolate()).clamp(t.clamp()).unknown(t.unknown())}function mr(){var t=B0,e=B0,n=Ie,r,o,i,a=oe,f,u,c;function s(){var l=Math.min(t.length,e.length);return a!==oe&&(a=qw(t[0],t[l-1])),f=l>2?Yw:zw,u=c=null,d}function d(l){return l==null||isNaN(l=+l)?i:(u||(u=f(t.map(r),e,n)))(r(a(l)))}return d.invert=function(l){return a(o((c||(c=f(e,t.map(r),ht)))(l)))},d.domain=function(l){return arguments.length?(t=Array.from(l,fo),s()):t.slice()},d.range=function(l){return arguments.length?(e=Array.from(l),s()):e.slice()},d.rangeRound=function(l){return e=Array.from(l),n=fr,s()},d.clamp=function(l){return arguments.length?(a=l?!0:oe,s()):a!==oe},d.interpolate=function(l){return arguments.length?(n=l,s()):n},d.unknown=function(l){return arguments.length?(i=l,d):i},function(l,p){return r=l,o=p,s()}}function Pi(){return mr()(oe,oe)}function Ul(t,e,n,r){var o=Or(t,e,n),i;switch(r=Ge(r??",f"),r.type){case"s":{var a=Math.max(Math.abs(t),Math.abs(e));return r.precision==null&&!isNaN(i=js(o,a))&&(r.precision=i),Af(r,a)}case"":case"e":case"g":case"p":case"r":{r.precision==null&&!isNaN(i=Zs(o,Math.max(Math.abs(t),Math.abs(e))))&&(r.precision=i-(r.type==="e"));break}case"f":case"%":{r.precision==null&&!isNaN(i=Vs(o))&&(r.precision=i-(r.type==="%")*2);break}}return Ve(r)}function yn(t){var e=t.domain;return t.ticks=function(n){var r=e();return $e(r[0],r[r.length-1],n??10)},t.tickFormat=function(n,r){var o=e();return Ul(o[0],o[o.length-1],n??10,r)},t.nice=function(n){n==null&&(n=10);var r=e(),o=0,i=r.length-1,a=r[o],f=r[i],u,c,s=10;for(f<a&&(c=a,a=f,f=c,c=o,o=i,i=c);s-- >0;){if(c=tr(a,f,n),c===u)return r[o]=a,r[i]=f,e(r);if(c>0)a=Math.floor(a/c)*c,f=Math.ceil(f/c)*c;else if(c<0)a=Math.ceil(a*c)/c,f=Math.floor(f*c)/c;else break;u=c}return t},t}function hr(){var t=Pi();return t.copy=function(){return Je(t,hr())},_t.apply(t,arguments),yn(t)}function Oi(t){var e;function n(r){return r==null||isNaN(r=+r)?e:r}return n.invert=n,n.domain=n.range=function(r){return arguments.length?(t=Array.from(r,fo),n):t.slice()},n.unknown=function(r){return arguments.length?(e=r,n):e},n.copy=function(){return Oi(t).unknown(e)},t=arguments.length?Array.from(t,fo):[0,1],yn(n)}function Fi(t,e){t=t.slice();var n=0,r=t.length-1,o=t[n],i=t[r],a;return i<o&&(a=n,n=r,r=a,a=o,o=i,i=a),t[n]=e.floor(o),t[r]=e.ceil(i),t}function U0(t){return Math.log(t)}function X0(t){return Math.exp(t)}function Bw(t){return-Math.log(-t)}function Uw(t){return-Math.exp(-t)}function Xw(t){return isFinite(t)?+("1e"+t):t<0?0:t}function Hw(t){return t===10?Xw:t===Math.E?Math.exp:e=>Math.pow(t,e)}function Ww(t){return t===Math.E?Math.log:t===10&&Math.log10||t===2&&Math.log2||(t=Math.log(t),e=>Math.log(e)/t)}function H0(t){return(e,n)=>-t(-e,n)}function Xl(t){let e=t(U0,X0),n=e.domain,r=10,o,i;function a(){return o=Ww(r),i=Hw(r),n()[0]<0?(o=H0(o),i=H0(i),t(Bw,Uw)):t(U0,X0),e}return e.base=function(f){return arguments.length?(r=+f,a()):r},e.domain=function(f){return arguments.length?(n(f),a()):n()},e.ticks=f=>{let u=n(),c=u[0],s=u[u.length-1],d=s<c;d&&([c,s]=[s,c]);let l=o(c),p=o(s),m,h,g=f==null?10:+f,b=[];if(!(r%1)&&p-l<g){if(l=Math.floor(l),p=Math.ceil(p),c>0){for(;l<=p;++l)for(m=1;m<r;++m)if(h=l<0?m/i(-l):m*i(l),!(h<c)){if(h>s)break;b.push(h)}}else for(;l<=p;++l)for(m=r-1;m>=1;--m)if(h=l>0?m/i(-l):m*i(l),!(h<c)){if(h>s)break;b.push(h)}b.length*2<g&&(b=$e(c,s,g))}else b=$e(l,p,Math.min(p-l,g)).map(i);return d?b.reverse():b},e.tickFormat=(f,u)=>{if(f==null&&(f=10),u==null&&(u=r===10?"s":","),typeof u!="function"&&(!(r%1)&&(u=Ge(u)).precision==null&&(u.trim=!0),u=Ve(u)),f===1/0)return u;let c=Math.max(1,r*f/e.ticks().length);return s=>{let d=s/i(Math.round(o(s)));return d*r<r-.5&&(d*=r),d<=c?u(s):""}},e.nice=()=>n(Fi(n(),{floor:f=>i(Math.floor(o(f))),ceil:f=>i(Math.ceil(o(f)))})),e}function qi(){let t=Xl(mr()).domain([1,10]);return t.copy=()=>Je(t,qi()).base(t.base()),_t.apply(t,arguments),t}function W0(t){return function(e){return Math.sign(e)*Math.log1p(Math.abs(e/t))}}function G0(t){return function(e){return Math.sign(e)*Math.expm1(Math.abs(e))*t}}function Hl(t){var e=1,n=t(W0(e),G0(e));return n.constant=function(r){return arguments.length?t(W0(e=+r),G0(e)):e},yn(n)}function zi(){var t=Hl(mr());return t.copy=function(){return Je(t,zi()).constant(t.constant())},_t.apply(t,arguments)}function V0(t){return function(e){return e<0?-Math.pow(-e,t):Math.pow(e,t)}}function Gw(t){return t<0?-Math.sqrt(-t):Math.sqrt(t)}function Vw(t){return t<0?-t*t:t*t}function Wl(t){var e=t(oe,oe),n=1;function r(){return n===1?t(oe,oe):n===.5?t(Gw,Vw):t(V0(n),V0(1/n))}return e.exponent=function(o){return arguments.length?(n=+o,r()):n},yn(e)}function Yi(){var t=Wl(mr());return t.copy=function(){return Je(t,Yi()).exponent(t.exponent())},_t.apply(t,arguments),t}function Bi(){var t=[],e=[],n=[],r;function o(){var a=0,f=Math.max(1,e.length);for(n=new Array(f-1);++a<f;)n[a-1]=ps(t,a/f);return i}function i(a){return a==null||isNaN(a=+a)?r:e[un(n,a)]}return i.invertExtent=function(a){var f=e.indexOf(a);return f<0?[NaN,NaN]:[f>0?n[f-1]:t[0],f<n.length?n[f]:t[t.length-1]]},i.domain=function(a){if(!arguments.length)return t.slice();t=[];for(let f of a)f!=null&&!isNaN(f=+f)&&t.push(f);return t.sort(bt),o()},i.range=function(a){return arguments.length?(e=Array.from(a),o()):e.slice()},i.unknown=function(a){return arguments.length?(r=a,i):r},i.quantiles=function(){return n.slice()},i.copy=function(){return Bi().domain(t).range(e).unknown(r)},_t.apply(i,arguments)}function Ui(){var t=[.5],e=[0,1],n,r=1;function o(i){return i!=null&&i<=i?e[un(t,i,0,r)]:n}return o.domain=function(i){return arguments.length?(t=Array.from(i),r=Math.min(t.length,e.length-1),o):t.slice()},o.range=function(i){return arguments.length?(e=Array.from(i),r=Math.min(t.length,e.length-1),o):e.slice()},o.invertExtent=function(i){var a=e.indexOf(i);return[t[a-1],t[a]]},o.unknown=function(i){return arguments.length?(n=i,o):n},o.copy=function(){return Ui().domain(t).range(e).unknown(n)},_t.apply(o,arguments)}var Gl=new Date,Vl=new Date;function dt(t,e,n,r){function o(i){return t(i=arguments.length===0?new Date:new Date(+i)),i}return o.floor=i=>(t(i=new Date(+i)),i),o.ceil=i=>(t(i=new Date(i-1)),e(i,1),t(i),i),o.round=i=>{let a=o(i),f=o.ceil(i);return i-a<f-i?a:f},o.offset=(i,a)=>(e(i=new Date(+i),a==null?1:Math.floor(a)),i),o.range=(i,a,f)=>{let u=[];if(i=o.ceil(i),f=f==null?1:Math.floor(f),!(i<a)||!(f>0))return u;let c;do u.push(c=new Date(+i)),e(i,f),t(i);while(c<i&&i<a);return u},o.filter=i=>dt(a=>{if(a>=a)for(;t(a),!i(a);)a.setTime(a-1)},(a,f)=>{if(a>=a)if(f<0)for(;++f<=0;)for(;e(a,-1),!i(a););else for(;--f>=0;)for(;e(a,1),!i(a););}),n&&(o.count=(i,a)=>(Gl.setTime(+i),Vl.setTime(+a),t(Gl),t(Vl),Math.floor(n(Gl,Vl))),o.every=i=>(i=Math.floor(i),!isFinite(i)||!(i>0)?null:i>1?o.filter(r?a=>r(a)%i===0:a=>o.count(0,a)%i===0):o)),o}var Xi=dt(()=>{},(t,e)=>{t.setTime(+t+e)},(t,e)=>e-t);Xi.every=t=>(t=Math.floor(t),!isFinite(t)||!(t>0)?null:t>1?dt(e=>{e.setTime(Math.floor(e/t)*t)},(e,n)=>{e.setTime(+e+n*t)},(e,n)=>(n-e)/t):Xi);var Pk=Xi.range;var Vt=dt(t=>{t.setTime(t-t.getMilliseconds())},(t,e)=>{t.setTime(+t+e*1e3)},(t,e)=>(e-t)/1e3,t=>t.getUTCSeconds()),j0=Vt.range;var Ln=dt(t=>{t.setTime(t-t.getMilliseconds()-t.getSeconds()*1e3)},(t,e)=>{t.setTime(+t+e*6e4)},(t,e)=>(e-t)/6e4,t=>t.getMinutes()),jw=Ln.range,Pn=dt(t=>{t.setUTCSeconds(0,0)},(t,e)=>{t.setTime(+t+e*6e4)},(t,e)=>(e-t)/6e4,t=>t.getUTCMinutes()),Zw=Pn.range;var On=dt(t=>{t.setTime(t-t.getMilliseconds()-t.getSeconds()*1e3-t.getMinutes()*6e4)},(t,e)=>{t.setTime(+t+e*36e5)},(t,e)=>(e-t)/36e5,t=>t.getHours()),Kw=On.range,Fn=dt(t=>{t.setUTCMinutes(0,0,0)},(t,e)=>{t.setTime(+t+e*36e5)},(t,e)=>(e-t)/36e5,t=>t.getUTCHours()),Qw=Fn.range;var De=dt(t=>t.setHours(0,0,0,0),(t,e)=>t.setDate(t.getDate()+e),(t,e)=>(e-t-(e.getTimezoneOffset()-t.getTimezoneOffset())*6e4)/864e5,t=>t.getDate()-1),Jw=De.range,yr=dt(t=>{t.setUTCHours(0,0,0,0)},(t,e)=>{t.setUTCDate(t.getUTCDate()+e)},(t,e)=>(e-t)/864e5,t=>t.getUTCDate()-1),t6=yr.range,uo=dt(t=>{t.setUTCHours(0,0,0,0)},(t,e)=>{t.setUTCDate(t.getUTCDate()+e)},(t,e)=>(e-t)/864e5,t=>Math.floor(t/864e5)),e6=uo.range;function br(t){return dt(e=>{e.setDate(e.getDate()-(e.getDay()+7-t)%7),e.setHours(0,0,0,0)},(e,n)=>{e.setDate(e.getDate()+n*7)},(e,n)=>(n-e-(n.getTimezoneOffset()-e.getTimezoneOffset())*6e4)/6048e5)}var ce=br(0),qn=br(1),Qf=br(2),Jf=br(3),en=br(4),tu=br(5),eu=br(6),K0=ce.range,n6=qn.range,r6=Qf.range,o6=Jf.range,i6=en.range,a6=tu.range,f6=eu.range;function wr(t){return dt(e=>{e.setUTCDate(e.getUTCDate()-(e.getUTCDay()+7-t)%7),e.setUTCHours(0,0,0,0)},(e,n)=>{e.setUTCDate(e.getUTCDate()+n*7)},(e,n)=>(n-e)/6048e5)}var se=wr(0),zn=wr(1),nu=wr(2),ru=wr(3),nn=wr(4),ou=wr(5),iu=wr(6),Q0=se.range,u6=zn.range,c6=nu.range,s6=ru.range,l6=nn.range,d6=ou.range,p6=iu.range;var Yn=dt(t=>{t.setDate(1),t.setHours(0,0,0,0)},(t,e)=>{t.setMonth(t.getMonth()+e)},(t,e)=>e.getMonth()-t.getMonth()+(e.getFullYear()-t.getFullYear())*12,t=>t.getMonth()),m6=Yn.range,Bn=dt(t=>{t.setUTCDate(1),t.setUTCHours(0,0,0,0)},(t,e)=>{t.setUTCMonth(t.getUTCMonth()+e)},(t,e)=>e.getUTCMonth()-t.getUTCMonth()+(e.getUTCFullYear()-t.getUTCFullYear())*12,t=>t.getUTCMonth()),h6=Bn.range;var jt=dt(t=>{t.setMonth(0,1),t.setHours(0,0,0,0)},(t,e)=>{t.setFullYear(t.getFullYear()+e)},(t,e)=>e.getFullYear()-t.getFullYear(),t=>t.getFullYear());jt.every=t=>!isFinite(t=Math.floor(t))||!(t>0)?null:dt(e=>{e.setFullYear(Math.floor(e.getFullYear()/t)*t),e.setMonth(0,1),e.setHours(0,0,0,0)},(e,n)=>{e.setFullYear(e.getFullYear()+n*t)});var g6=jt.range,Zt=dt(t=>{t.setUTCMonth(0,1),t.setUTCHours(0,0,0,0)},(t,e)=>{t.setUTCFullYear(t.getUTCFullYear()+e)},(t,e)=>e.getUTCFullYear()-t.getUTCFullYear(),t=>t.getUTCFullYear());Zt.every=t=>!isFinite(t=Math.floor(t))||!(t>0)?null:dt(e=>{e.setUTCFullYear(Math.floor(e.getUTCFullYear()/t)*t),e.setUTCMonth(0,1),e.setUTCHours(0,0,0,0)},(e,n)=>{e.setUTCFullYear(e.getUTCFullYear()+n*t)});var x6=Zt.range;function tg(t,e,n,r,o,i){let a=[[Vt,1,1e3],[Vt,5,5*1e3],[Vt,15,15*1e3],[Vt,30,30*1e3],[i,1,6e4],[i,5,5*6e4],[i,15,15*6e4],[i,30,30*6e4],[o,1,36e5],[o,3,3*36e5],[o,6,6*36e5],[o,12,12*36e5],[r,1,864e5],[r,2,2*864e5],[n,1,6048e5],[e,1,2592e6],[e,3,3*2592e6],[t,1,31536e6]];function f(c,s,d){let l=s<c;l&&([c,s]=[s,c]);let p=d&&typeof d.range=="function"?d:u(c,s,d),m=p?p.range(c,+s+1):[];return l?m.reverse():m}function u(c,s,d){let l=Math.abs(s-c)/d,p=qe(([,,g])=>g).right(a,l);if(p===a.length)return t.every(Or(c/31536e6,s/31536e6,d));if(p===0)return Xi.every(Math.max(Or(c,s,d),1));let[m,h]=a[l/a[p-1][2]<a[p][2]/l?p-1:p];return m.every(h)}return[f,u]}var[jl,Wi]=tg(Zt,Bn,se,uo,Fn,Pn),[Zl,Kl]=tg(jt,Yn,ce,De,On,Ln);function Ql(t){if(0<=t.y&&t.y<100){var e=new Date(-1,t.m,t.d,t.H,t.M,t.S,t.L);return e.setFullYear(t.y),e}return new Date(t.y,t.m,t.d,t.H,t.M,t.S,t.L)}function Jl(t){if(0<=t.y&&t.y<100){var e=new Date(Date.UTC(-1,t.m,t.d,t.H,t.M,t.S,t.L));return e.setUTCFullYear(t.y),e}return new Date(Date.UTC(t.y,t.m,t.d,t.H,t.M,t.S,t.L))}function Gi(t,e,n){return{y:t,m:e,d:n,H:0,M:0,S:0,L:0}}function td(t){var e=t.dateTime,n=t.date,r=t.time,o=t.periods,i=t.days,a=t.shortDays,f=t.months,u=t.shortMonths,c=Vi(o),s=ji(o),d=Vi(i),l=ji(i),p=Vi(a),m=ji(a),h=Vi(f),g=ji(f),b=Vi(u),x=ji(u),M={a:N,A:P,b:D,B:tt,c:null,d:ag,e:ag,f:Y6,g:K6,G:J6,H:F6,I:q6,j:z6,L:lg,m:B6,M:U6,p:Z,q:W,Q:cg,s:sg,S:X6,u:H6,U:W6,V:G6,w:V6,W:j6,x:null,X:null,y:Z6,Y:Q6,Z:tv,"%":ug},y={a:Q,A:at,b:Ut,B:Fe,c:null,d:fg,e:fg,f:ov,g:mv,G:gv,H:ev,I:nv,j:rv,L:pg,m:iv,M:av,p:G,q:X,Q:cg,s:sg,S:fv,u:uv,U:cv,V:sv,w:lv,W:dv,x:null,X:null,y:pv,Y:hv,Z:xv,"%":ug},w={a:F,A:_,b:R,B:O,c:L,d:og,e:og,f:R6,g:rg,G:ng,H:ig,I:ig,j:I6,L:D6,m:E6,M:k6,p:I,q:$6,Q:P6,s:O6,S:N6,u:S6,U:T6,V:_6,w:M6,W:C6,x:S,X:A,y:rg,Y:ng,Z:A6,"%":L6};M.x=v(n,M),M.X=v(r,M),M.c=v(e,M),y.x=v(n,y),y.X=v(r,y),y.c=v(e,y);function v($,q){return function(z){var C=[],j=-1,J=0,ot=$.length,lt,Xt,Zn;for(z instanceof Date||(z=new Date(+z));++j<ot;)$.charCodeAt(j)===37&&(C.push($.slice(J,j)),(Xt=eg[lt=$.charAt(++j)])!=null?lt=$.charAt(++j):Xt=lt==="e"?" ":"0",(Zn=q[lt])&&(lt=Zn(z,Xt)),C.push(lt),J=j+1);return C.push($.slice(J,j)),C.join("")}}function T($,q){return function(z){var C=Gi(1900,void 0,1),j=E(C,$,z+="",0),J,ot;if(j!=z.length)return null;if("Q"in C)return new Date(C.Q);if("s"in C)return new Date(C.s*1e3+("L"in C?C.L:0));if(q&&!("Z"in C)&&(C.Z=0),"p"in C&&(C.H=C.H%12+C.p*12),C.m===void 0&&(C.m="q"in C?C.q:0),"V"in C){if(C.V<1||C.V>53)return null;"w"in C||(C.w=1),"Z"in C?(J=Jl(Gi(C.y,0,1)),ot=J.getUTCDay(),J=ot>4||ot===0?zn.ceil(J):zn(J),J=yr.offset(J,(C.V-1)*7),C.y=J.getUTCFullYear(),C.m=J.getUTCMonth(),C.d=J.getUTCDate()+(C.w+6)%7):(J=Ql(Gi(C.y,0,1)),ot=J.getDay(),J=ot>4||ot===0?qn.ceil(J):qn(J),J=De.offset(J,(C.V-1)*7),C.y=J.getFullYear(),C.m=J.getMonth(),C.d=J.getDate()+(C.w+6)%7)}else("W"in C||"U"in C)&&("w"in C||(C.w="u"in C?C.u%7:"W"in C?1:0),ot="Z"in C?Jl(Gi(C.y,0,1)).getUTCDay():Ql(Gi(C.y,0,1)).getDay(),C.m=0,C.d="W"in C?(C.w+6)%7+C.W*7-(ot+5)%7:C.w+C.U*7-(ot+6)%7);return"Z"in C?(C.H+=C.Z/100|0,C.M+=C.Z%100,Jl(C)):Ql(C)}}function E($,q,z,C){for(var j=0,J=q.length,ot=z.length,lt,Xt;j<J;){if(C>=ot)return-1;if(lt=q.charCodeAt(j++),lt===37){if(lt=q.charAt(j++),Xt=w[lt in eg?q.charAt(j++):lt],!Xt||(C=Xt($,z,C))<0)return-1}else if(lt!=z.charCodeAt(C++))return-1}return C}function I($,q,z){var C=c.exec(q.slice(z));return C?($.p=s.get(C[0].toLowerCase()),z+C[0].length):-1}function F($,q,z){var C=p.exec(q.slice(z));return C?($.w=m.get(C[0].toLowerCase()),z+C[0].length):-1}function _($,q,z){var C=d.exec(q.slice(z));return C?($.w=l.get(C[0].toLowerCase()),z+C[0].length):-1}function R($,q,z){var C=b.exec(q.slice(z));return C?($.m=x.get(C[0].toLowerCase()),z+C[0].length):-1}function O($,q,z){var C=h.exec(q.slice(z));return C?($.m=g.get(C[0].toLowerCase()),z+C[0].length):-1}function L($,q,z){return E($,e,q,z)}function S($,q,z){return E($,n,q,z)}function A($,q,z){return E($,r,q,z)}function N($){return a[$.getDay()]}function P($){return i[$.getDay()]}function D($){return u[$.getMonth()]}function tt($){return f[$.getMonth()]}function Z($){return o[+($.getHours()>=12)]}function W($){return 1+~~($.getMonth()/3)}function Q($){return a[$.getUTCDay()]}function at($){return i[$.getUTCDay()]}function Ut($){return u[$.getUTCMonth()]}function Fe($){return f[$.getUTCMonth()]}function G($){return o[+($.getUTCHours()>=12)]}function X($){return 1+~~($.getUTCMonth()/3)}return{format:function($){var q=v($+="",M);return q.toString=function(){return $},q},parse:function($){var q=T($+="",!1);return q.toString=function(){return $},q},utcFormat:function($){var q=v($+="",y);return q.toString=function(){return $},q},utcParse:function($){var q=T($+="",!0);return q.toString=function(){return $},q}}}var eg={"-":"",_:" ",0:"0"},Lt=/^\s*\d+/,b6=/^%/,w6=/[\\^$*+?|[\]().{}]/g;function nt(t,e,n){var r=t<0?"-":"",o=(r?-t:t)+"",i=o.length;return r+(i<n?new Array(n-i+1).join(e)+o:o)}function v6(t){return t.replace(w6,"\\$&")}function Vi(t){return new RegExp("^(?:"+t.map(v6).join("|")+")","i")}function ji(t){return new Map(t.map((e,n)=>[e.toLowerCase(),n]))}function M6(t,e,n){var r=Lt.exec(e.slice(n,n+1));return r?(t.w=+r[0],n+r[0].length):-1}function S6(t,e,n){var r=Lt.exec(e.slice(n,n+1));return r?(t.u=+r[0],n+r[0].length):-1}function T6(t,e,n){var r=Lt.exec(e.slice(n,n+2));return r?(t.U=+r[0],n+r[0].length):-1}function _6(t,e,n){var r=Lt.exec(e.slice(n,n+2));return r?(t.V=+r[0],n+r[0].length):-1}function C6(t,e,n){var r=Lt.exec(e.slice(n,n+2));return r?(t.W=+r[0],n+r[0].length):-1}function ng(t,e,n){var r=Lt.exec(e.slice(n,n+4));return r?(t.y=+r[0],n+r[0].length):-1}function rg(t,e,n){var r=Lt.exec(e.slice(n,n+2));return r?(t.y=+r[0]+(+r[0]>68?1900:2e3),n+r[0].length):-1}function A6(t,e,n){var r=/^(Z)|([+-]\d\d)(?::?(\d\d))?/.exec(e.slice(n,n+6));return r?(t.Z=r[1]?0:-(r[2]+(r[3]||"00")),n+r[0].length):-1}function $6(t,e,n){var r=Lt.exec(e.slice(n,n+1));return r?(t.q=r[0]*3-3,n+r[0].length):-1}function E6(t,e,n){var r=Lt.exec(e.slice(n,n+2));return r?(t.m=r[0]-1,n+r[0].length):-1}function og(t,e,n){var r=Lt.exec(e.slice(n,n+2));return r?(t.d=+r[0],n+r[0].length):-1}function I6(t,e,n){var r=Lt.exec(e.slice(n,n+3));return r?(t.m=0,t.d=+r[0],n+r[0].length):-1}function ig(t,e,n){var r=Lt.exec(e.slice(n,n+2));return r?(t.H=+r[0],n+r[0].length):-1}function k6(t,e,n){var r=Lt.exec(e.slice(n,n+2));return r?(t.M=+r[0],n+r[0].length):-1}function N6(t,e,n){var r=Lt.exec(e.slice(n,n+2));return r?(t.S=+r[0],n+r[0].length):-1}function D6(t,e,n){var r=Lt.exec(e.slice(n,n+3));return r?(t.L=+r[0],n+r[0].length):-1}function R6(t,e,n){var r=Lt.exec(e.slice(n,n+6));return r?(t.L=Math.floor(r[0]/1e3),n+r[0].length):-1}function L6(t,e,n){var r=b6.exec(e.slice(n,n+1));return r?n+r[0].length:-1}function P6(t,e,n){var r=Lt.exec(e.slice(n));return r?(t.Q=+r[0],n+r[0].length):-1}function O6(t,e,n){var r=Lt.exec(e.slice(n));return r?(t.s=+r[0],n+r[0].length):-1}function ag(t,e){return nt(t.getDate(),e,2)}function F6(t,e){return nt(t.getHours(),e,2)}function q6(t,e){return nt(t.getHours()%12||12,e,2)}function z6(t,e){return nt(1+De.count(jt(t),t),e,3)}function lg(t,e){return nt(t.getMilliseconds(),e,3)}function Y6(t,e){return lg(t,e)+"000"}function B6(t,e){return nt(t.getMonth()+1,e,2)}function U6(t,e){return nt(t.getMinutes(),e,2)}function X6(t,e){return nt(t.getSeconds(),e,2)}function H6(t){var e=t.getDay();return e===0?7:e}function W6(t,e){return nt(ce.count(jt(t)-1,t),e,2)}function dg(t){var e=t.getDay();return e>=4||e===0?en(t):en.ceil(t)}function G6(t,e){return t=dg(t),nt(en.count(jt(t),t)+(jt(t).getDay()===4),e,2)}function V6(t){return t.getDay()}function j6(t,e){return nt(qn.count(jt(t)-1,t),e,2)}function Z6(t,e){return nt(t.getFullYear()%100,e,2)}function K6(t,e){return t=dg(t),nt(t.getFullYear()%100,e,2)}function Q6(t,e){return nt(t.getFullYear()%1e4,e,4)}function J6(t,e){var n=t.getDay();return t=n>=4||n===0?en(t):en.ceil(t),nt(t.getFullYear()%1e4,e,4)}function tv(t){var e=t.getTimezoneOffset();return(e>0?"-":(e*=-1,"+"))+nt(e/60|0,"0",2)+nt(e%60,"0",2)}function fg(t,e){return nt(t.getUTCDate(),e,2)}function ev(t,e){return nt(t.getUTCHours(),e,2)}function nv(t,e){return nt(t.getUTCHours()%12||12,e,2)}function rv(t,e){return nt(1+yr.count(Zt(t),t),e,3)}function pg(t,e){return nt(t.getUTCMilliseconds(),e,3)}function ov(t,e){return pg(t,e)+"000"}function iv(t,e){return nt(t.getUTCMonth()+1,e,2)}function av(t,e){return nt(t.getUTCMinutes(),e,2)}function fv(t,e){return nt(t.getUTCSeconds(),e,2)}function uv(t){var e=t.getUTCDay();return e===0?7:e}function cv(t,e){return nt(se.count(Zt(t)-1,t),e,2)}function mg(t){var e=t.getUTCDay();return e>=4||e===0?nn(t):nn.ceil(t)}function sv(t,e){return t=mg(t),nt(nn.count(Zt(t),t)+(Zt(t).getUTCDay()===4),e,2)}function lv(t){return t.getUTCDay()}function dv(t,e){return nt(zn.count(Zt(t)-1,t),e,2)}function pv(t,e){return nt(t.getUTCFullYear()%100,e,2)}function mv(t,e){return t=mg(t),nt(t.getUTCFullYear()%100,e,2)}function hv(t,e){return nt(t.getUTCFullYear()%1e4,e,4)}function gv(t,e){var n=t.getUTCDay();return t=n>=4||n===0?nn(t):nn.ceil(t),nt(t.getUTCFullYear()%1e4,e,4)}function xv(){return"+0000"}function ug(){return"%"}function cg(t){return+t}function sg(t){return Math.floor(+t/1e3)}var co,Un,hg,bn,gg;ed({dateTime:"%x, %X",date:"%-m/%-d/%Y",time:"%-I:%M:%S %p",periods:["AM","PM"],days:["Sunday","Monday","Tuesday","Wednesday","Thursday","Friday","Saturday"],shortDays:["Sun","Mon","Tue","Wed","Thu","Fri","Sat"],months:["January","February","March","April","May","June","July","August","September","October","November","December"],shortMonths:["Jan","Feb","Mar","Apr","May","Jun","Jul","Aug","Sep","Oct","Nov","Dec"]});function ed(t){return co=td(t),Un=co.format,hg=co.parse,bn=co.utcFormat,gg=co.utcParse,co}function yv(t){return new Date(t)}function bv(t){return t instanceof Date?+t:+new Date(+t)}function au(t,e,n,r,o,i,a,f,u,c){var s=Pi(),d=s.invert,l=s.domain,p=c(".%L"),m=c(":%S"),h=c("%I:%M"),g=c("%I %p"),b=c("%a %d"),x=c("%b %d"),M=c("%B"),y=c("%Y");function w(v){return(u(v)<v?p:f(v)<v?m:a(v)<v?h:i(v)<v?g:r(v)<v?o(v)<v?b:x:n(v)<v?M:y)(v)}return s.invert=function(v){return new Date(d(v))},s.domain=function(v){return arguments.length?l(Array.from(v,bv)):l().map(yv)},s.ticks=function(v){var T=l();return t(T[0],T[T.length-1],v??10)},s.tickFormat=function(v,T){return T==null?w:c(T)},s.nice=function(v){var T=l();return(!v||typeof v.range!="function")&&(v=e(T[0],T[T.length-1],v??10)),v?l(Fi(T,v)):s},s.copy=function(){return Je(s,au(t,e,n,r,o,i,a,f,u,c))},s}function fu(){return _t.apply(au(Zl,Kl,jt,Yn,ce,De,On,Ln,Vt,Un).domain([new Date(2e3,0,1),new Date(2e3,0,2)]),arguments)}function uu(){return _t.apply(au(jl,Wi,Zt,Bn,se,yr,Fn,Pn,Vt,bn).domain([Date.UTC(2e3,0,1),Date.UTC(2e3,0,2)]),arguments)}function Zi(t,e){return e.domain(t.domain()).interpolator(t.interpolator()).clamp(t.clamp()).unknown(t.unknown())}function cu(){var t=0,e=.5,n=1,r=1,o,i,a,f,u,c=oe,s,d=!1,l;function p(h){return isNaN(h=+h)?l:(h=.5+((h=+s(h))-i)*(r*h<r*i?f:u),c(d?Math.max(0,Math.min(1,h)):h))}p.domain=function(h){return arguments.length?([t,e,n]=h,o=s(t=+t),i=s(e=+e),a=s(n=+n),f=o===i?0:.5/(i-o),u=i===a?0:.5/(a-i),r=i<o?-1:1,p):[t,e,n]},p.clamp=function(h){return arguments.length?(d=!!h,p):d},p.interpolator=function(h){return arguments.length?(c=h,p):c};function m(h){return function(g){var b,x,M;return arguments.length?([b,x,M]=g,c=He(h,[b,x,M]),p):[c(0),c(.5),c(1)]}}return p.range=m(Ie),p.rangeRound=m(fr),p.unknown=function(h){return arguments.length?(l=h,p):l},function(h){return s=h,o=h(t),i=h(e),a=h(n),f=o===i?0:.5/(i-o),u=i===a?0:.5/(a-i),r=i<o?-1:1,p}}function Ki(){var t=yn(cu()(oe));return t.copy=function(){return Zi(t,Ki())},Ri.apply(t,arguments)}function su(){var t=Xl(cu()).domain([.1,1,10]);return t.copy=function(){return Zi(t,su()).base(t.base())},Ri.apply(t,arguments)}function lu(){var t=Hl(cu());return t.copy=function(){return Zi(t,lu()).constant(t.constant())},Ri.apply(t,arguments)}function du(){var t=Wl(cu());return t.copy=function(){return Zi(t,du()).exponent(t.exponent())},Ri.apply(t,arguments)}function k(t){for(var e=t.length/6|0,n=new Array(e),r=0;r<e;)n[r]="#"+t.slice(r*6,++r*6);return n}var nd=k("1f77b4ff7f0e2ca02cd627289467bd8c564be377c27f7f7fbcbd2217becf");var rd=k("7fc97fbeaed4fdc086ffff99386cb0f0027fbf5b17666666");var od=k("1b9e77d95f027570b3e7298a66a61ee6ab02a6761d666666");var id=k("a6cee31f78b4b2df8a33a02cfb9a99e31a1cfdbf6fff7f00cab2d66a3d9affff99b15928");var ad=k("fbb4aeb3cde3ccebc5decbe4fed9a6ffffcce5d8bdfddaecf2f2f2");var fd=k("b3e2cdfdcdaccbd5e8f4cae4e6f5c9fff2aef1e2cccccccc");var ud=k("e41a1c377eb84daf4a984ea3ff7f00ffff33a65628f781bf999999");var cd=k("66c2a5fc8d628da0cbe78ac3a6d854ffd92fe5c494b3b3b3");var sd=k("8dd3c7ffffb3bebadafb807280b1d3fdb462b3de69fccde5d9d9d9bc80bdccebc5ffed6f");var ld=k("4e79a7f28e2ce1575976b7b259a14fedc949af7aa1ff9da79c755fbab0ab");var H=t=>ks(t[t.length-1]);var pu=new Array(3).concat("d8b365f5f5f55ab4ac","a6611adfc27d80cdc1018571","a6611adfc27df5f5f580cdc1018571","8c510ad8b365f6e8c3c7eae55ab4ac01665e","8c510ad8b365f6e8c3f5f5f5c7eae55ab4ac01665e","8c510abf812ddfc27df6e8c3c7eae580cdc135978f01665e","8c510abf812ddfc27df6e8c3f5f5f5c7eae580cdc135978f01665e","5430058c510abf812ddfc27df6e8c3c7eae580cdc135978f01665e003c30","5430058c510abf812ddfc27df6e8c3f5f5f5c7eae580cdc135978f01665e003c30").map(k),mu=H(pu);var hu=new Array(3).concat("af8dc3f7f7f77fbf7b","7b3294c2a5cfa6dba0008837","7b3294c2a5cff7f7f7a6dba0008837","762a83af8dc3e7d4e8d9f0d37fbf7b1b7837","762a83af8dc3e7d4e8f7f7f7d9f0d37fbf7b1b7837","762a839970abc2a5cfe7d4e8d9f0d3a6dba05aae611b7837","762a839970abc2a5cfe7d4e8f7f7f7d9f0d3a6dba05aae611b7837","40004b762a839970abc2a5cfe7d4e8d9f0d3a6dba05aae611b783700441b","40004b762a839970abc2a5cfe7d4e8f7f7f7d9f0d3a6dba05aae611b783700441b").map(k),gu=H(hu);var xu=new Array(3).concat("e9a3c9f7f7f7a1d76a","d01c8bf1b6dab8e1864dac26","d01c8bf1b6daf7f7f7b8e1864dac26","c51b7de9a3c9fde0efe6f5d0a1d76a4d9221","c51b7de9a3c9fde0eff7f7f7e6f5d0a1d76a4d9221","c51b7dde77aef1b6dafde0efe6f5d0b8e1867fbc414d9221","c51b7dde77aef1b6dafde0eff7f7f7e6f5d0b8e1867fbc414d9221","8e0152c51b7dde77aef1b6dafde0efe6f5d0b8e1867fbc414d9221276419","8e0152c51b7dde77aef1b6dafde0eff7f7f7e6f5d0b8e1867fbc414d9221276419").map(k),yu=H(xu);var bu=new Array(3).concat("998ec3f7f7f7f1a340","5e3c99b2abd2fdb863e66101","5e3c99b2abd2f7f7f7fdb863e66101","542788998ec3d8daebfee0b6f1a340b35806","542788998ec3d8daebf7f7f7fee0b6f1a340b35806","5427888073acb2abd2d8daebfee0b6fdb863e08214b35806","5427888073acb2abd2d8daebf7f7f7fee0b6fdb863e08214b35806","2d004b5427888073acb2abd2d8daebfee0b6fdb863e08214b358067f3b08","2d004b5427888073acb2abd2d8daebf7f7f7fee0b6fdb863e08214b358067f3b08").map(k),wu=H(bu);var Qi=new Array(3).concat("ef8a62f7f7f767a9cf","ca0020f4a58292c5de0571b0","ca0020f4a582f7f7f792c5de0571b0","b2182bef8a62fddbc7d1e5f067a9cf2166ac","b2182bef8a62fddbc7f7f7f7d1e5f067a9cf2166ac","b2182bd6604df4a582fddbc7d1e5f092c5de4393c32166ac","b2182bd6604df4a582fddbc7f7f7f7d1e5f092c5de4393c32166ac","67001fb2182bd6604df4a582fddbc7d1e5f092c5de4393c32166ac053061","67001fb2182bd6604df4a582fddbc7f7f7f7d1e5f092c5de4393c32166ac053061").map(k),so=H(Qi);var vu=new Array(3).concat("ef8a62ffffff999999","ca0020f4a582bababa404040","ca0020f4a582ffffffbababa404040","b2182bef8a62fddbc7e0e0e09999994d4d4d","b2182bef8a62fddbc7ffffffe0e0e09999994d4d4d","b2182bd6604df4a582fddbc7e0e0e0bababa8787874d4d4d","b2182bd6604df4a582fddbc7ffffffe0e0e0bababa8787874d4d4d","67001fb2182bd6604df4a582fddbc7e0e0e0bababa8787874d4d4d1a1a1a","67001fb2182bd6604df4a582fddbc7ffffffe0e0e0bababa8787874d4d4d1a1a1a").map(k),Mu=H(vu);var Ji=new Array(3).concat("fc8d59ffffbf91bfdb","d7191cfdae61abd9e92c7bb6","d7191cfdae61ffffbfabd9e92c7bb6","d73027fc8d59fee090e0f3f891bfdb4575b4","d73027fc8d59fee090ffffbfe0f3f891bfdb4575b4","d73027f46d43fdae61fee090e0f3f8abd9e974add14575b4","d73027f46d43fdae61fee090ffffbfe0f3f8abd9e974add14575b4","a50026d73027f46d43fdae61fee090e0f3f8abd9e974add14575b4313695","a50026d73027f46d43fdae61fee090ffffbfe0f3f8abd9e974add14575b4313695").map(k),lo=H(Ji);var Su=new Array(3).concat("fc8d59ffffbf91cf60","d7191cfdae61a6d96a1a9641","d7191cfdae61ffffbfa6d96a1a9641","d73027fc8d59fee08bd9ef8b91cf601a9850","d73027fc8d59fee08bffffbfd9ef8b91cf601a9850","d73027f46d43fdae61fee08bd9ef8ba6d96a66bd631a9850","d73027f46d43fdae61fee08bffffbfd9ef8ba6d96a66bd631a9850","a50026d73027f46d43fdae61fee08bd9ef8ba6d96a66bd631a9850006837","a50026d73027f46d43fdae61fee08bffffbfd9ef8ba6d96a66bd631a9850006837").map(k),Tu=H(Su);var _u=new Array(3).concat("fc8d59ffffbf99d594","d7191cfdae61abdda42b83ba","d7191cfdae61ffffbfabdda42b83ba","d53e4ffc8d59fee08be6f59899d5943288bd","d53e4ffc8d59fee08bffffbfe6f59899d5943288bd","d53e4ff46d43fdae61fee08be6f598abdda466c2a53288bd","d53e4ff46d43fdae61fee08bffffbfe6f598abdda466c2a53288bd","9e0142d53e4ff46d43fdae61fee08be6f598abdda466c2a53288bd5e4fa2","9e0142d53e4ff46d43fdae61fee08bffffbfe6f598abdda466c2a53288bd5e4fa2").map(k),Cu=H(_u);var Au=new Array(3).concat("e5f5f999d8c92ca25f","edf8fbb2e2e266c2a4238b45","edf8fbb2e2e266c2a42ca25f006d2c","edf8fbccece699d8c966c2a42ca25f006d2c","edf8fbccece699d8c966c2a441ae76238b45005824","f7fcfde5f5f9ccece699d8c966c2a441ae76238b45005824","f7fcfde5f5f9ccece699d8c966c2a441ae76238b45006d2c00441b").map(k),$u=H(Au);var Eu=new Array(3).concat("e0ecf49ebcda8856a7","edf8fbb3cde38c96c688419d","edf8fbb3cde38c96c68856a7810f7c","edf8fbbfd3e69ebcda8c96c68856a7810f7c","edf8fbbfd3e69ebcda8c96c68c6bb188419d6e016b","f7fcfde0ecf4bfd3e69ebcda8c96c68c6bb188419d6e016b","f7fcfde0ecf4bfd3e69ebcda8c96c68c6bb188419d810f7c4d004b").map(k),Iu=H(Eu);var ku=new Array(3).concat("e0f3dba8ddb543a2ca","f0f9e8bae4bc7bccc42b8cbe","f0f9e8bae4bc7bccc443a2ca0868ac","f0f9e8ccebc5a8ddb57bccc443a2ca0868ac","f0f9e8ccebc5a8ddb57bccc44eb3d32b8cbe08589e","f7fcf0e0f3dbccebc5a8ddb57bccc44eb3d32b8cbe08589e","f7fcf0e0f3dbccebc5a8ddb57bccc44eb3d32b8cbe0868ac084081").map(k),Nu=H(ku);var Du=new Array(3).concat("fee8c8fdbb84e34a33","fef0d9fdcc8afc8d59d7301f","fef0d9fdcc8afc8d59e34a33b30000","fef0d9fdd49efdbb84fc8d59e34a33b30000","fef0d9fdd49efdbb84fc8d59ef6548d7301f990000","fff7ecfee8c8fdd49efdbb84fc8d59ef6548d7301f990000","fff7ecfee8c8fdd49efdbb84fc8d59ef6548d7301fb300007f0000").map(k),Ru=H(Du);var Lu=new Array(3).concat("ece2f0a6bddb1c9099","f6eff7bdc9e167a9cf02818a","f6eff7bdc9e167a9cf1c9099016c59","f6eff7d0d1e6a6bddb67a9cf1c9099016c59","f6eff7d0d1e6a6bddb67a9cf3690c002818a016450","fff7fbece2f0d0d1e6a6bddb67a9cf3690c002818a016450","fff7fbece2f0d0d1e6a6bddb67a9cf3690c002818a016c59014636").map(k),Pu=H(Lu);var Ou=new Array(3).concat("ece7f2a6bddb2b8cbe","f1eef6bdc9e174a9cf0570b0","f1eef6bdc9e174a9cf2b8cbe045a8d","f1eef6d0d1e6a6bddb74a9cf2b8cbe045a8d","f1eef6d0d1e6a6bddb74a9cf3690c00570b0034e7b","fff7fbece7f2d0d1e6a6bddb74a9cf3690c00570b0034e7b","fff7fbece7f2d0d1e6a6bddb74a9cf3690c00570b0045a8d023858").map(k),Fu=H(Ou);var qu=new Array(3).concat("e7e1efc994c7dd1c77","f1eef6d7b5d8df65b0ce1256","f1eef6d7b5d8df65b0dd1c77980043","f1eef6d4b9dac994c7df65b0dd1c77980043","f1eef6d4b9dac994c7df65b0e7298ace125691003f","f7f4f9e7e1efd4b9dac994c7df65b0e7298ace125691003f","f7f4f9e7e1efd4b9dac994c7df65b0e7298ace125698004367001f").map(k),zu=H(qu);var Yu=new Array(3).concat("fde0ddfa9fb5c51b8a","feebe2fbb4b9f768a1ae017e","feebe2fbb4b9f768a1c51b8a7a0177","feebe2fcc5c0fa9fb5f768a1c51b8a7a0177","feebe2fcc5c0fa9fb5f768a1dd3497ae017e7a0177","fff7f3fde0ddfcc5c0fa9fb5f768a1dd3497ae017e7a0177","fff7f3fde0ddfcc5c0fa9fb5f768a1dd3497ae017e7a017749006a").map(k),Bu=H(Yu);var Uu=new Array(3).concat("edf8b17fcdbb2c7fb8","ffffcca1dab441b6c4225ea8","ffffcca1dab441b6c42c7fb8253494","ffffccc7e9b47fcdbb41b6c42c7fb8253494","ffffccc7e9b47fcdbb41b6c41d91c0225ea80c2c84","ffffd9edf8b1c7e9b47fcdbb41b6c41d91c0225ea80c2c84","ffffd9edf8b1c7e9b47fcdbb41b6c41d91c0225ea8253494081d58").map(k),Xu=H(Uu);var Hu=new Array(3).concat("f7fcb9addd8e31a354","ffffccc2e69978c679238443","ffffccc2e69978c67931a354006837","ffffccd9f0a3addd8e78c67931a354006837","ffffccd9f0a3addd8e78c67941ab5d238443005a32","ffffe5f7fcb9d9f0a3addd8e78c67941ab5d238443005a32","ffffe5f7fcb9d9f0a3addd8e78c67941ab5d238443006837004529").map(k),Wu=H(Hu);var Gu=new Array(3).concat("fff7bcfec44fd95f0e","ffffd4fed98efe9929cc4c02","ffffd4fed98efe9929d95f0e993404","ffffd4fee391fec44ffe9929d95f0e993404","ffffd4fee391fec44ffe9929ec7014cc4c028c2d04","ffffe5fff7bcfee391fec44ffe9929ec7014cc4c028c2d04","ffffe5fff7bcfee391fec44ffe9929ec7014cc4c02993404662506").map(k),Vu=H(Gu);var ju=new Array(3).concat("ffeda0feb24cf03b20","ffffb2fecc5cfd8d3ce31a1c","ffffb2fecc5cfd8d3cf03b20bd0026","ffffb2fed976feb24cfd8d3cf03b20bd0026","ffffb2fed976feb24cfd8d3cfc4e2ae31a1cb10026","ffffccffeda0fed976feb24cfd8d3cfc4e2ae31a1cb10026","ffffccffeda0fed976feb24cfd8d3cfc4e2ae31a1cbd0026800026").map(k),Zu=H(ju);var Ku=new Array(3).concat("deebf79ecae13182bd","eff3ffbdd7e76baed62171b5","eff3ffbdd7e76baed63182bd08519c","eff3ffc6dbef9ecae16baed63182bd08519c","eff3ffc6dbef9ecae16baed64292c62171b5084594","f7fbffdeebf7c6dbef9ecae16baed64292c62171b5084594","f7fbffdeebf7c6dbef9ecae16baed64292c62171b508519c08306b").map(k),Qu=H(Ku);var Ju=new Array(3).concat("e5f5e0a1d99b31a354","edf8e9bae4b374c476238b45","edf8e9bae4b374c47631a354006d2c","edf8e9c7e9c0a1d99b74c47631a354006d2c","edf8e9c7e9c0a1d99b74c47641ab5d238b45005a32","f7fcf5e5f5e0c7e9c0a1d99b74c47641ab5d238b45005a32","f7fcf5e5f5e0c7e9c0a1d99b74c47641ab5d238b45006d2c00441b").map(k),tc=H(Ju);var ec=new Array(3).concat("f0f0f0bdbdbd636363","f7f7f7cccccc969696525252","f7f7f7cccccc969696636363252525","f7f7f7d9d9d9bdbdbd969696636363252525","f7f7f7d9d9d9bdbdbd969696737373525252252525","fffffff0f0f0d9d9d9bdbdbd969696737373525252252525","fffffff0f0f0d9d9d9bdbdbd969696737373525252252525000000").map(k),nc=H(ec);var rc=new Array(3).concat("efedf5bcbddc756bb1","f2f0f7cbc9e29e9ac86a51a3","f2f0f7cbc9e29e9ac8756bb154278f","f2f0f7dadaebbcbddc9e9ac8756bb154278f","f2f0f7dadaebbcbddc9e9ac8807dba6a51a34a1486","fcfbfdefedf5dadaebbcbddc9e9ac8807dba6a51a34a1486","fcfbfdefedf5dadaebbcbddc9e9ac8807dba6a51a354278f3f007d").map(k),oc=H(rc);var ic=new Array(3).concat("fee0d2fc9272de2d26","fee5d9fcae91fb6a4acb181d","fee5d9fcae91fb6a4ade2d26a50f15","fee5d9fcbba1fc9272fb6a4ade2d26a50f15","fee5d9fcbba1fc9272fb6a4aef3b2ccb181d99000d","fff5f0fee0d2fcbba1fc9272fb6a4aef3b2ccb181d99000d","fff5f0fee0d2fcbba1fc9272fb6a4aef3b2ccb181da50f1567000d").map(k),ac=H(ic);var fc=new Array(3).concat("fee6cefdae6be6550d","feeddefdbe85fd8d3cd94701","feeddefdbe85fd8d3ce6550da63603","feeddefdd0a2fdae6bfd8d3ce6550da63603","feeddefdd0a2fdae6bfd8d3cf16913d948018c2d04","fff5ebfee6cefdd0a2fdae6bfd8d3cf16913d948018c2d04","fff5ebfee6cefdd0a2fdae6bfd8d3cf16913d94801a636037f2704").map(k),uc=H(fc);function cc(t){return t=Math.max(0,Math.min(1,t)),"rgb("+Math.max(0,Math.min(255,Math.round(-4.54-t*(35.34-t*(2381.73-t*(6402.7-t*(7024.72-t*2710.57)))))))+", "+Math.max(0,Math.min(255,Math.round(32.49+t*(170.73+t*(52.82-t*(131.46-t*(176.58-t*67.37)))))))+", "+Math.max(0,Math.min(255,Math.round(81.24+t*(442.36-t*(2482.43-t*(6167.24-t*(6614.94-t*2475.67)))))))+")"}var sc=Xr(te(300,.5,0),te(-240,.5,1));var dc=Xr(te(-100,.75,.35),te(80,1.5,.8)),pc=Xr(te(260,.75,.35),te(80,1.5,.8)),lc=te();function mc(t){(t<0||t>1)&&(t-=Math.floor(t));var e=Math.abs(t-.5);return lc.h=360*t-100,lc.s=1.5-1.5*e,lc.l=.8-.9*e,lc+""}var hc=be(),wv=Math.PI/3,vv=Math.PI*2/3;function gc(t){var e;return t=(.5-t)*Math.PI,hc.r=255*(e=Math.sin(t))*e,hc.g=255*(e=Math.sin(t+wv))*e,hc.b=255*(e=Math.sin(t+vv))*e,hc+""}function xc(t){return t=Math.max(0,Math.min(1,t)),"rgb("+Math.max(0,Math.min(255,Math.round(34.61+t*(1172.33-t*(10793.56-t*(33300.12-t*(38394.49-t*14825.05)))))))+", "+Math.max(0,Math.min(255,Math.round(23.31+t*(557.33+t*(1225.33-t*(3574.96-t*(1073.77+t*707.56)))))))+", "+Math.max(0,Math.min(255,Math.round(27.2+t*(3211.1-t*(15327.97-t*(27814-t*(22569.18-t*6838.66)))))))+")"}function yc(t){var e=t.length;return function(n){return t[Math.max(0,Math.min(e-1,Math.floor(n*e)))]}}var bc=yc(k("44015444025645045745055946075a46085c460a5d460b5e470d60470e6147106347116447136548146748166848176948186a481a6c481b6d481c6e481d6f481f70482071482173482374482475482576482677482878482979472a7a472c7a472d7b472e7c472f7d46307e46327e46337f463480453581453781453882443983443a83443b84433d84433e85423f854240864241864142874144874045884046883f47883f48893e49893e4a893e4c8a3d4d8a3d4e8a3c4f8a3c508b3b518b3b528b3a538b3a548c39558c39568c38588c38598c375a8c375b8d365c8d365d8d355e8d355f8d34608d34618d33628d33638d32648e32658e31668e31678e31688e30698e306a8e2f6b8e2f6c8e2e6d8e2e6e8e2e6f8e2d708e2d718e2c718e2c728e2c738e2b748e2b758e2a768e2a778e2a788e29798e297a8e297b8e287c8e287d8e277e8e277f8e27808e26818e26828e26828e25838e25848e25858e24868e24878e23888e23898e238a8d228b8d228c8d228d8d218e8d218f8d21908d21918c20928c20928c20938c1f948c1f958b1f968b1f978b1f988b1f998a1f9a8a1e9b8a1e9c891e9d891f9e891f9f881fa0881fa1881fa1871fa28720a38620a48621a58521a68522a78522a88423a98324aa8325ab8225ac8226ad8127ad8128ae8029af7f2ab07f2cb17e2db27d2eb37c2fb47c31b57b32b67a34b67935b77937b87838b9773aba763bbb753dbc743fbc7340bd7242be7144bf7046c06f48c16e4ac16d4cc26c4ec36b50c46a52c56954c56856c66758c7655ac8645cc8635ec96260ca6063cb5f65cb5e67cc5c69cd5b6ccd5a6ece5870cf5773d05675d05477d1537ad1517cd2507fd34e81d34d84d44b86d54989d5488bd6468ed64590d74393d74195d84098d83e9bd93c9dd93ba0da39a2da37a5db36a8db34aadc32addc30b0dd2fb2dd2db5de2bb8de29bade28bddf26c0df25c2df23c5e021c8e020cae11fcde11dd0e11cd2e21bd5e21ad8e219dae319dde318dfe318e2e418e5e419e7e419eae51aece51befe51cf1e51df4e61ef6e620f8e621fbe723fde725")),wc=yc(k("00000401000501010601010802010902020b02020d03030f03031204041405041606051806051a07061c08071e0907200a08220b09240c09260d0a290e0b2b100b2d110c2f120d31130d34140e36150e38160f3b180f3d19103f1a10421c10441d11471e114920114b21114e22115024125325125527125829115a2a115c2c115f2d11612f116331116533106734106936106b38106c390f6e3b0f703d0f713f0f72400f74420f75440f764510774710784910784a10794c117a4e117b4f127b51127c52137c54137d56147d57157e59157e5a167e5c167f5d177f5f187f601880621980641a80651a80671b80681c816a1c816b1d816d1d816e1e81701f81721f817320817521817621817822817922827b23827c23827e24828025828125818326818426818627818827818928818b29818c29818e2a81902a81912b81932b80942c80962c80982d80992d809b2e7f9c2e7f9e2f7fa02f7fa1307ea3307ea5317ea6317da8327daa337dab337cad347cae347bb0357bb2357bb3367ab5367ab73779b83779ba3878bc3978bd3977bf3a77c03a76c23b75c43c75c53c74c73d73c83e73ca3e72cc3f71cd4071cf4070d0416fd2426fd3436ed5446dd6456cd8456cd9466bdb476adc4869de4968df4a68e04c67e24d66e34e65e44f64e55064e75263e85362e95462ea5661eb5760ec5860ed5a5fee5b5eef5d5ef05f5ef1605df2625df2645cf3655cf4675cf4695cf56b5cf66c5cf66e5cf7705cf7725cf8745cf8765cf9785df9795df97b5dfa7d5efa7f5efa815ffb835ffb8560fb8761fc8961fc8a62fc8c63fc8e64fc9065fd9266fd9467fd9668fd9869fd9a6afd9b6bfe9d6cfe9f6dfea16efea36ffea571fea772fea973feaa74feac76feae77feb078feb27afeb47bfeb67cfeb77efeb97ffebb81febd82febf84fec185fec287fec488fec68afec88cfeca8dfecc8ffecd90fecf92fed194fed395fed597fed799fed89afdda9cfddc9efddea0fde0a1fde2a3fde3a5fde5a7fde7a9fde9aafdebacfcecaefceeb0fcf0b2fcf2b4fcf4b6fcf6b8fcf7b9fcf9bbfcfbbdfcfdbf")),vc=yc(k("00000401000501010601010802010a02020c02020e03021004031204031405041706041907051b08051d09061f0a07220b07240c08260d08290e092b10092d110a30120a32140b34150b37160b39180c3c190c3e1b0c411c0c431e0c451f0c48210c4a230c4c240c4f260c51280b53290b552b0b572d0b592f0a5b310a5c320a5e340a5f3609613809623909633b09643d09653e0966400a67420a68440a68450a69470b6a490b6a4a0c6b4c0c6b4d0d6c4f0d6c510e6c520e6d540f6d550f6d57106e59106e5a116e5c126e5d126e5f136e61136e62146e64156e65156e67166e69166e6a176e6c186e6d186e6f196e71196e721a6e741a6e751b6e771c6d781c6d7a1d6d7c1d6d7d1e6d7f1e6c801f6c82206c84206b85216b87216b88226a8a226a8c23698d23698f24699025689225689326679526679727669827669a28659b29649d29649f2a63a02a63a22b62a32c61a52c60a62d60a82e5fa92e5eab2f5ead305dae305cb0315bb1325ab3325ab43359b63458b73557b93556ba3655bc3754bd3853bf3952c03a51c13a50c33b4fc43c4ec63d4dc73e4cc83f4bca404acb4149cc4248ce4347cf4446d04545d24644d34743d44842d54a41d74b3fd84c3ed94d3dda4e3cdb503bdd513ade5238df5337e05536e15635e25734e35933e45a31e55c30e65d2fe75e2ee8602de9612bea632aeb6429eb6628ec6726ed6925ee6a24ef6c23ef6e21f06f20f1711ff1731df2741cf3761bf37819f47918f57b17f57d15f67e14f68013f78212f78410f8850ff8870ef8890cf98b0bf98c0af98e09fa9008fa9207fa9407fb9606fb9706fb9906fb9b06fb9d07fc9f07fca108fca309fca50afca60cfca80dfcaa0ffcac11fcae12fcb014fcb216fcb418fbb61afbb81dfbba1ffbbc21fbbe23fac026fac228fac42afac62df9c72ff9c932f9cb35f8cd37f8cf3af7d13df7d340f6d543f6d746f5d949f5db4cf4dd4ff4df53f4e156f3e35af3e55df2e661f2e865f2ea69f1ec6df1ed71f1ef75f1f179f2f27df2f482f3f586f3f68af4f88ef5f992f6fa96f8fb9af9fc9dfafda1fcffa4")),Mc=yc(k("0d088710078813078916078a19068c1b068d1d068e20068f2206902406912605912805922a05932c05942e05952f059631059733059735049837049938049a3a049a3c049b3e049c3f049c41049d43039e44039e46039f48039f4903a04b03a14c02a14e02a25002a25102a35302a35502a45601a45801a45901a55b01a55c01a65e01a66001a66100a76300a76400a76600a76700a86900a86a00a86c00a86e00a86f00a87100a87201a87401a87501a87701a87801a87a02a87b02a87d03a87e03a88004a88104a78305a78405a78606a68707a68808a68a09a58b0aa58d0ba58e0ca48f0da4910ea3920fa39410a29511a19613a19814a099159f9a169f9c179e9d189d9e199da01a9ca11b9ba21d9aa31e9aa51f99a62098a72197a82296aa2395ab2494ac2694ad2793ae2892b02991b12a90b22b8fb32c8eb42e8db52f8cb6308bb7318ab83289ba3388bb3488bc3587bd3786be3885bf3984c03a83c13b82c23c81c33d80c43e7fc5407ec6417dc7427cc8437bc9447aca457acb4679cc4778cc4977cd4a76ce4b75cf4c74d04d73d14e72d24f71d35171d45270d5536fd5546ed6556dd7566cd8576bd9586ada5a6ada5b69db5c68dc5d67dd5e66de5f65de6164df6263e06363e16462e26561e26660e3685fe4695ee56a5de56b5de66c5ce76e5be76f5ae87059e97158e97257ea7457eb7556eb7655ec7754ed7953ed7a52ee7b51ef7c51ef7e50f07f4ff0804ef1814df1834cf2844bf3854bf3874af48849f48948f58b47f58c46f68d45f68f44f79044f79143f79342f89441f89540f9973ff9983ef99a3efa9b3dfa9c3cfa9e3bfb9f3afba139fba238fca338fca537fca636fca835fca934fdab33fdac33fdae32fdaf31fdb130fdb22ffdb42ffdb52efeb72dfeb82cfeba2cfebb2bfebd2afebe2afec029fdc229fdc328fdc527fdc627fdc827fdca26fdcb26fccd25fcce25fcd025fcd225fbd324fbd524fbd724fad824fada24f9dc24f9dd25f8df25f8e125f7e225f7e425f6e626f6e826f5e926f5eb27f4ed27f3ee27f3f027f2f227f1f426f1f525f0f724f0f921"));var dd=Math.cos;var po=Math.min,ta=Math.sin,rt=Math.sqrt;var vr=Math.PI,rP=vr/2,mo=2*vr;var Mv=rt(3),ea={draw(t,e){let n=rt(e+po(e/28,.75))*.59436,r=n/2,o=r*Mv;t.moveTo(0,n),t.lineTo(0,-n),t.moveTo(-o,-r),t.lineTo(o,r),t.moveTo(-o,r),t.lineTo(o,-r)}};var ho={draw(t,e){let n=rt(e/vr);t.moveTo(n,0),t.arc(0,0,n,0,mo)}};var na={draw(t,e){let n=rt(e/5)/2;t.moveTo(-3*n,-n),t.lineTo(-n,-n),t.lineTo(-n,-3*n),t.lineTo(n,-3*n),t.lineTo(n,-n),t.lineTo(3*n,-n),t.lineTo(3*n,n),t.lineTo(n,n),t.lineTo(n,3*n),t.lineTo(-n,3*n),t.lineTo(-n,n),t.lineTo(-3*n,n),t.closePath()}};var xg=rt(1/3),Sv=xg*2,ra={draw(t,e){let n=rt(e/Sv),r=n*xg;t.moveTo(0,-n),t.lineTo(r,0),t.lineTo(0,n),t.lineTo(-r,0),t.closePath()}};var oa={draw(t,e){let n=rt(e)*.62625;t.moveTo(0,-n),t.lineTo(n,0),t.lineTo(0,n),t.lineTo(-n,0),t.closePath()}};var ia={draw(t,e){let n=rt(e-po(e/7,2))*.87559;t.moveTo(-n,0),t.lineTo(n,0),t.moveTo(0,n),t.lineTo(0,-n)}};var aa={draw(t,e){let n=rt(e),r=-n/2;t.rect(r,r,n,n)}};var fa={draw(t,e){let n=rt(e)*.4431;t.moveTo(n,n),t.lineTo(n,-n),t.lineTo(-n,-n),t.lineTo(-n,n),t.closePath()}};var Tv=.8908130915292852,yg=ta(vr/10)/ta(7*vr/10),_v=ta(mo/10)*yg,Cv=-dd(mo/10)*yg,ua={draw(t,e){let n=rt(e*Tv),r=_v*n,o=Cv*n;t.moveTo(0,-n),t.lineTo(r,o);for(let i=1;i<5;++i){let a=mo*i/5,f=dd(a),u=ta(a);t.lineTo(u*n,-f*n),t.lineTo(f*r-u*o,u*r+f*o)}t.closePath()}};var pd=rt(3),ca={draw(t,e){let n=-rt(e/(pd*3));t.moveTo(0,n*2),t.lineTo(-pd*n,-n),t.lineTo(pd*n,-n),t.closePath()}};var Av=rt(3),sa={draw(t,e){let n=rt(e)*.6824,r=n/2,o=n*Av/2;t.moveTo(0,-n),t.lineTo(o,r),t.lineTo(-o,r),t.closePath()}};var Me=-.5,Se=rt(3)/2,md=1/rt(12),$v=(md/2+1)*3,la={draw(t,e){let n=rt(e/$v),r=n/2,o=n*md,i=r,a=n*md+n,f=-i,u=a;t.moveTo(r,o),t.lineTo(i,a),t.lineTo(f,u),t.lineTo(Me*r-Se*o,Se*r+Me*o),t.lineTo(Me*i-Se*a,Se*i+Me*a),t.lineTo(Me*f-Se*u,Se*f+Me*u),t.lineTo(Me*r+Se*o,Me*o-Se*r),t.lineTo(Me*i+Se*a,Me*a-Se*i),t.lineTo(Me*f+Se*u,Me*u-Se*f),t.closePath()}};var go={draw(t,e){let n=rt(e-po(e/6,1.7))*.6189;t.moveTo(-n,-n),t.lineTo(n,n),t.moveTo(-n,n),t.lineTo(n,-n)}};var Sc=[ho,na,ra,aa,ua,ca,la],hd=[ho,ia,go,sa,ea,fa,oa];function Xn(t,e,n){this.k=t,this.x=e,this.y=n}Xn.prototype={constructor:Xn,scale:function(t){return t===1?this:new Xn(this.k*t,this.x,this.y)},translate:function(t,e){return t===0&e===0?this:new Xn(this.k,this.x+this.k*t,this.y+this.k*e)},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 gd=new Xn(1,0,0);xd.prototype=Xn.prototype;function xd(t){for(;!t.__zoom;)if(!(t=t.parentNode))return gd;return t.__zoom}function Re(t){return t!=null&&!Number.isNaN(t)}function Kt(t,e){return+Re(e)-+Re(t)||bt(t,e)}function Mr(t,e){return+Re(e)-+Re(t)||xe(t,e)}function Tc(t){return t!=null&&`${t}`!=""}function yd(t){return isFinite(t)?t:NaN}function da(t){return t>0&&isFinite(t)?t:NaN}function _c(t){return t<0&&isFinite(t)?t:NaN}function Cc(t,e){if(t instanceof Date||(t=new Date(+t)),isNaN(t))return typeof e=="function"?e(t):e;let n=t.getUTCHours(),r=t.getUTCMinutes(),o=t.getUTCSeconds(),i=t.getUTCMilliseconds();return`${Iv(t.getUTCFullYear(),4)}-${wn(t.getUTCMonth()+1,2)}-${wn(t.getUTCDate(),2)}${n||r||o||i?`T${wn(n,2)}:${wn(r,2)}${o||i?`:${wn(o,2)}${i?`.${wn(i,3)}`:""}`:""}Z`:""}`}function Iv(t){return t<0?`-${wn(-t,6)}`:t>9999?`+${wn(t,6)}`:wn(t,4)}function wn(t,e){return`${t}`.padStart(e,"0")}var kv=/^(?:[-+]\d{2})?\d{4}(?:-\d{2}(?:-\d{2})?)?(?:T\d{2}:\d{2}(?::\d{2}(?:\.\d{3})?)?(?:Z|[-+]\d{2}:?\d{2})?)?$/;function pa(t,e){return kv.test(t+="")?new Date(t):typeof e=="function"?e(t):e}var Ac=1e3,bd=Ac*60,wd=bd*60,ha=wd*24,Nv=ha*7,bg=ha*30,Dv=ha*365,ma=[["millisecond",.5*Ac],["second",Ac],["second",30*Ac],["minute",bd],["minute",30*bd],["hour",wd],["hour",12*wd],["day",ha],["day",2*ha],["week",Nv],["month",bg],["month",3*bg],["year",Dv]],Rv=new Map([["second",Vt],["minute",Ln],["hour",On],["day",De],["week",ce],["month",Yn],["year",jt],["monday",qn],["tuesday",Qf],["wednesday",Jf],["thursday",en],["friday",tu],["saturday",eu],["sunday",ce]]),Lv=new Map([["second",Vt],["minute",Pn],["hour",Fn],["day",uo],["week",se],["month",Bn],["year",Zt],["monday",zn],["tuesday",nu],["wednesday",ru],["thursday",nn],["friday",ou],["saturday",iu],["sunday",se]]);function wg(t,e){let n=`${t}`.toLowerCase();n.endsWith("s")&&(n=n.slice(0,-1));let r=1,o=/^(?:(\d+)\s+)/.exec(n);switch(o&&(n=n.slice(o[0].length),r=+o[1]),n){case"quarter":n="month",r*=3;break;case"half":n="month",r*=6;break}let i=e.get(n);if(!i)throw new Error(`unknown interval: ${t}`);if(!(r>1))return i;if(!i.every)throw new Error(`non-periodic interval: ${n}`);return i.every(r)}function vg(t){return wg(t,Rv)}function $c(t){return wg(t,Lv)}function Mg(t){if(!t)return!1;let e=t.floor(new Date(Date.UTC(2e3,11,31)));return Zt(e)>=e}function Sg(t){if(!t)return!1;let e=t.floor(new Date(2e3,11,31));return jt(e)>=e}function Tg(t,e,n,r){let o=t.type==="time"?Un:bn,i=r==="left"||r==="right"?(a,f)=>`
 ${a}
 ${f}`:r==="top"?(a,f)=>`${f}
 ${a}`:(a,f)=>`${a}
-${f}`;switch(Pv(t,e,n)){case"millisecond":return Sr(o(".%L"),o(":%M:%S"),i);case"second":return Sr(o(":%S"),o("%-I:%M"),i);case"minute":return Sr(o("%-I:%M"),o("%p"),i);case"hour":return Sr(o("%-I %p"),o("%b %-d"),i);case"day":return Sr(o("%-d"),o("%b"),i);case"week":return Sr(o("%-d"),o("%b"),i);case"month":return Sr(o("%b"),o("%Y"),i);case"year":return o("%Y")}throw new Error("unable to format time ticks")}function Pv(t,e,n){let r=sn(Va(e,(u,c)=>Math.abs(c-u)||NaN));if(r>0)return ma[qe(([,u])=>u).right(ma,r,1,ma.length)-1][0];let[o,i]=Ct(t.domain()),a=typeof n=="number"?n:10,f=Math.abs(i-o)/a;return ma[qe(([,u])=>Math.log(u)).center(ma,Math.log(f))][0]}function Sr(t,e,n){return(r,o,i)=>{let a=t(r,o),f=e(r,o),u=o-vn(i);return o!==u&&i[u]!==void 0&&f===e(i[u],u)?a:n(a,f)}}var ga=Object.getPrototypeOf(Uint8Array),Lv=Object.prototype.toString;function gt(t,e,n){let r=typeof e;return r==="string"?_g(t,vd(e),n):r==="function"?_g(t,e,n):r==="number"||e instanceof Date||r==="boolean"?pt(t,Wn(e),n):typeof e?.transform=="function"?Cg(e.transform(t),n):Cg(e,n)}function _g(t,e,n){return pt(t,n?.prototype instanceof ga?Ov(e):e,n)}function Cg(t,e){return e===void 0?kt(t):t instanceof e?t:e.prototype instanceof ga&&!(t instanceof ga)?e.from(t,Md):e.from(t)}function Ov(t){return(e,n)=>Md(t(e,n))}var xo=[null],vd=t=>e=>e[t],Ic={transform:ne},wt={transform:t=>t};var Ag=()=>1,$g=()=>!0,It=t=>t==null?t:`${t}`,ct=t=>t==null?t:+t;var xa=t=>t?t[0]:void 0,Ec=t=>t?t[1]:void 0;var Wn=t=>()=>t;function Ig(t){let e=+`${t}`.slice(1)/100;return(n,r)=>ye(n,e,r)}function Tr(t){return t instanceof ga?t:pt(t,Md,Float64Array)}function Md(t){return t==null?NaN:Number(t)}function Eg(t){return pt(t,Sd)}function Sd(t){return t instanceof Date&&!isNaN(t)?t:typeof t=="string"?pa(t):t==null||isNaN(t=+t)?void 0:new Date(t)}function ie(t,e){return t===void 0&&(t=e),t===null?[void 0,"none"]:vo(t)?[void 0,t]:[t,void 0]}function Et(t,e){return t===void 0&&(t=e),t===null||typeof t=="number"?[void 0,t]:[t,void 0]}function _r(t,e,n){if(t!=null)return le(t,e,n)}function le(t,e,n){let r=`${t}`.toLowerCase();if(!n.includes(r))throw new Error(`invalid ${e}: ${t}`);return r}function kt(t){return t==null||t instanceof Array||t instanceof ga?t:Array.from(t)}function pt(t,e,n=Array){return t==null?t:t instanceof n?t.map(e):n.from(t,e)}function ya(t,e=Array){return t instanceof e?t.slice():e.from(t)}function kg({x:t,x1:e,x2:n}){return t!==void 0||e!==void 0||n!==void 0}function Td({y:t,y1:e,y2:n}){return t!==void 0||e!==void 0||n!==void 0}function Ng(t){return kg(t)||Td(t)||t.interval!==void 0}function Mn(t){return t?.toString===Lv}function yo(t){return Mn(t)&&(t.type!==void 0||t.domain!==void 0)}function ba(t){return Mn(t)&&typeof t.transform!="function"}function Cr(t){return ba(t)&&t.value===void 0&&t.channel===void 0}function Dg(t,e,n,r=wt){return e===void 0&&n===void 0?(e=0,n=t===void 0?r:t):e===void 0?e=t===void 0?0:t:n===void 0&&(n=t===void 0?0:t),[e,n]}function Ar(t,e){return t===void 0&&e===void 0?[xa,Ec]:[t,e]}function Rg({z:t,fill:e,stroke:n}={}){return t===void 0&&([t]=ie(e)),t===void 0&&([t]=ie(n)),t}function ne(t){let e=t.length,n=new Uint32Array(e);for(let r=0;r<e;++r)n[r]=r;return n}function _d(t,e){return pt(e,n=>t[n])}function Pg(t,e,n){return t.subarray?t.subarray(e,n):t.slice(e,n)}function bo(t){return t!==null&&typeof t=="object"?t.valueOf():t}function Lg(t,e){if(e[t]!==void 0)return e[t];switch(t){case"x1":case"x2":t="x";break;case"y1":case"y2":t="y";break}return e[t]}function wo(t){let e;return[{transform:()=>e,label:Pe(t)},n=>e=n]}function Te(t){return t==null?[t]:wo(t)}function Pe(t,e){return typeof t=="string"?t:t&&t.label!==void 0?t.label:e}function wa(t,e){return{transform(n){let r=t.transform(n),o=e.transform(n);return Yt(r)||Yt(o)?pt(r,(i,a)=>new Date((+r[a]+ +o[a])/2)):pt(r,(i,a)=>(+r[a]+ +o[a])/2,Float64Array)},label:t.label}}function va(t,e){let n=Cd(e?.interval,e?.type);return n?pt(t,n):t}function Cd(t,e){let n=kc(t,e);return n&&(r=>Re(r)?n.floor(r):r)}function kc(t,e){if(t!=null){if(typeof t=="number"){0<t&&t<1&&Number.isInteger(1/t)&&(t=-1/t);let n=Math.abs(t);return t<0?{floor:r=>Math.floor(r*n)/n,offset:r=>(r*n+1)/n,range:(r,o)=>er(Math.ceil(r*n),o*n).map(i=>i/n)}:{floor:r=>Math.floor(r/n)*n,offset:r=>r+n,range:(r,o)=>er(Math.ceil(r/n),o/n).map(i=>i*n)}}if(typeof t=="string")return(e==="time"?vg:$c)(t);if(typeof t.floor!="function")throw new Error("invalid interval; missing floor method");if(typeof t.offset!="function")throw new Error("invalid interval; missing offset method");return t}}function rn(t,e){if(t=kc(t,e),t&&typeof t.range!="function")throw new Error("invalid interval: missing range method");return t}function Og(t,e){if(t=rn(t,e),t&&typeof t.ceil!="function")throw new Error("invalid interval: missing ceil method");return t}function on(t){return t===void 0||ba(t)?t:{value:t}}function Fg(t){return t==null?null:{transform:e=>gt(e,t,Float64Array),label:Pe(t)}}function re(t){return t&&typeof t[Symbol.iterator]=="function"}function Nc(t){for(let e of t)if(e!=null)return typeof e!="object"||e instanceof Date}function Ad(t){for(let e of t){if(e==null)continue;let n=typeof e;return n==="string"||n==="boolean"}}function Yt(t){for(let e of t)if(e!=null)return e instanceof Date}function qg(t){for(let e of t)if(e!=null)return typeof e=="string"&&isNaN(e)&&pa(e)}function zg(t){for(let e of t)if(e!=null){if(typeof e!="string")return!1;if(e.trim())return!isNaN(e)}}function Yg(t){for(let e of t)if(e!=null)return typeof e=="number"}function Dc(t,e){let n;for(let r of t)if(r!=null){if(!e(r))return!1;n=!0}return n}function vo(t){return typeof t!="string"?!1:(t=t.toLowerCase().trim(),t==="none"||t==="currentcolor"||t.startsWith("url(")&&t.endsWith(")")||t.startsWith("var(")&&t.endsWith(")")||ue(t)!==null)}function Bg(t){return typeof t=="number"&&(0<=t&&t<=1||isNaN(t))}function Lt(t){return t==null||$r(t)}function $r(t){return/^\s*none\s*$/i.test(t)}function Ug(t){return/^\s*round\s*$/i.test(t)}function $d(t,e){return _r(t,e,["middle","top-left","top","top-right","right","bottom-right","bottom","bottom-left","left"])}function Mo(t="middle"){return $d(t,"frameAnchor")}function vn(t){if(t==null)return;let e=t[0],n=t[t.length-1];return xe(e,n)}function Xg(t={},...e){let n=t;for(let r of e)for(let o in r)if(n[o]===void 0){let i=r[o];n===t?n={...n,[o]:i}:n[o]=i}return n}function Fv(t){console.warn("named iterables are deprecated; please use an object instead");let e=new Set;return Object.fromEntries(Array.from(t,n=>{let{name:r}=n;if(r==null)throw new Error("missing name");let o=`${r}`;if(o==="__proto__")throw new Error(`illegal name: ${o}`);if(e.has(o))throw new Error(`duplicate name: ${o}`);return e.add(o),[r,n]}))}function Id(t){return re(t)?Fv(t):t}var de=Symbol("position"),pe=Symbol("color"),So=Symbol("radius"),To=Symbol("length"),_o=Symbol("opacity"),Co=Symbol("symbol"),qv=Symbol("projection"),st=new Map([["x",de],["y",de],["fx",de],["fy",de],["r",So],["color",pe],["opacity",_o],["symbol",Co],["length",To],["projection",qv]]);var zv=Math.sqrt(3),Yv=2/zv,Bv={draw(t,e){let n=Math.sqrt(e/Math.PI),r=n*Yv,o=r/2;t.moveTo(0,r),t.lineTo(n,o),t.lineTo(n,-o),t.lineTo(0,-r),t.lineTo(-n,-o),t.lineTo(-n,o),t.closePath()}},Wg=new Map([["asterisk",ea],["circle",ho],["cross",na],["diamond",ra],["diamond2",oa],["hexagon",Bv],["plus",ia],["square",aa],["square2",fa],["star",ua],["times",go],["triangle",ca],["triangle2",sa],["wye",la]]);function Gg(t){return t&&typeof t.draw=="function"}function Hg(t){return Gg(t)?!0:typeof t!="string"?!1:Wg.has(t.toLowerCase())}function Ao(t){if(t==null||Gg(t))return t;let e=Wg.get(`${t}`.toLowerCase());if(e)return e;throw new Error(`invalid symbol: ${t}`)}function $o({filter:t,sort:e,reverse:n,transform:r,initializer:o,...i}={},a){if(r===void 0&&(t!=null&&(r=Vg(t)),e!=null&&!Cr(e)&&(r=Ed(r,Zg(e))),n&&(r=Ed(r,jg))),a!=null&&o!=null)throw new Error("transforms cannot be applied after initializers");return{...i,...(e===null||Cr(e))&&{sort:e},transform:Ed(r,a)}}function Ir({filter:t,sort:e,reverse:n,initializer:r,...o}={},i){return r===void 0&&(t!=null&&(r=Vg(t)),e!=null&&!Cr(e)&&(r=kd(r,Zg(e))),n&&(r=kd(r,jg))),{...o,...(e===null||Cr(e))&&{sort:e},initializer:kd(r,i)}}function Ed(t,e){return t==null?e===null?void 0:e:e==null?t===null?void 0:t:function(n,r,o){return{data:n,facets:r}=t.call(this,n,r,o),e.call(this,kt(n),r,o)}}function kd(t,e){return t==null?e===null?void 0:e:e==null?t===null?void 0:t:function(n,r,o,...i){let a,f,u,c,s,d;return{data:f=n,facets:u=r,channels:a}=t.call(this,n,r,o,...i),{data:s=f,facets:d=u,channels:c}=e.call(this,f,u,{...o,...a},...i),{data:s,facets:d,channels:{...a,...c}}}}function Vg(t){return(e,n)=>{let r=gt(e,t);return{data:e,facets:n.map(o=>o.filter(i=>r[i]))}}}function jg(t,e){return{data:t,facets:e.map(n=>n.slice().reverse())}}function Zg(t){return(typeof t=="function"&&t.length!==1?Uv:Xv)(t)}function Uv(t){return(e,n)=>{let r=(o,i)=>t(e[o],e[i]);return{data:e,facets:n.map(o=>o.slice().sort(r))}}}function Xv(t){let e,n;({channel:e,value:t,order:n}={...on(t)});let r=e?.startsWith("-");if(r&&(e=e.slice(1)),n===void 0&&(n=r?Mr:Kt),typeof n!="function")switch(`${n}`.toLowerCase()){case"ascending":n=Kt;break;case"descending":n=Mr;break;default:throw new Error(`invalid order: ${n}`)}return(o,i,a)=>{let f;if(e===void 0)f=gt(o,t);else{if(a===void 0)throw new Error("channel sort requires an initializer");if(f=a[e],!f)return{};f=f.value}let u=(c,s)=>n(f[c],f[s]);return{data:o,facets:i.map(c=>c.slice().sort(u))}}}function Sa(t,...e){for(let{name:n}of t)if(e.includes(n))return!0;return!1}function Jg(t,e,n=Nd){let r=Object.entries(t);return e.title!=null&&t.title===void 0&&r.push(["title",jv]),e.href!=null&&t.href===void 0&&r.push(["href",Ld]),r.filter(([,o])=>o!==void 0).map(([o,i])=>i===null?Wv(o):n(o,i,e))}function Nd(t,e,n,r=Dd){let o;Mn(e)&&"reduce"in e&&(o=e.scale,e=e.reduce);let i=r(t,e,n),[a,f]=wo(i.label),u;return{name:t,output:o===void 0?a:{value:a,scale:o},initialize(c){i.initialize(c),u=f([])},scope(c,s){i.scope(c,s)},reduce(c,s){u.push(i.reduce(c,s))}}}function Wv(t){return{name:t,initialize(){},scope(){},reduce(){}}}function Dd(t,e,n,r=Ta){let o=Lg(t,n),i=r(e,o),a,f;return{label:Pe(i===Ma?null:o,i.label),initialize(u){a=o===void 0?u:gt(u,o),i.scope==="data"&&(f=i.reduceIndex(ne(u),a))},scope(u,c){i.scope===u&&(f=i.reduceIndex(c,a))},reduce(u,c){return i.scope==null?i.reduceIndex(u,a,c):i.reduceIndex(u,a,f,c)}}}function Rd(t,e){return e?ze(cn(t,n=>e[n]),xa):[[,t]]}function Ta(t,e,n=Gv){if(t==null)return n(t);if(typeof t.reduceIndex=="function")return t;if(typeof t.reduce=="function"&&Mn(t))return Hv(t);if(typeof t=="function")return Vv(t);if(/^p\d{2}$/i.test(t))return Sn(Ig(t));switch(`${t}`.toLowerCase()){case"first":return Ld;case"last":return Zv;case"identity":return Pd;case"count":return Ma;case"distinct":return Kv;case"sum":return e==null?Ma:Qv;case"proportion":return Qg(e,"data");case"proportion-facet":return Qg(e,"facet");case"deviation":return Sn(Pr);case"min":return Sn(Jt);case"min-index":return Sn(Ua);case"max":return Sn(Wt);case"max-index":return Sn(Ba);case"mean":return Kg(Ga);case"median":return Kg(sn);case"variance":return Sn(Rr);case"mode":return Sn(Ha)}return n(t)}function Gv(t){throw new Error(`invalid reduce: ${t}`)}function t1(t,e){for(let n in e){let r=e[n];if(r!==void 0&&!t.some(o=>o.name===n))return r}}function e1(t,e,n){if(e){let r=e.output.transform(),o=(i,a)=>Kt(r[i],r[a]);t.forEach(i=>i.sort(o))}n&&t.forEach(r=>r.reverse())}function Hv(t){return console.warn("deprecated reduce interface; implement reduceIndex instead."),{...t,reduceIndex:t.reduce.bind(t)}}function Vv(t){return{reduceIndex(e,n,r){return t(_d(n,e),r)}}}function Sn(t){return{reduceIndex(e,n){return t(e,r=>n[r])}}}function Kg(t){return{reduceIndex(e,n){let r=t(e,o=>n[o]);return Yt(n)?new Date(r):r}}}var Pd={reduceIndex(t,e){return _d(e,t)}},Ld={reduceIndex(t,e){return e[t[0]]}},jv={reduceIndex(t,e){let r=ze(Ae(t,i=>i.length,i=>e[i]),Ec),o=r.slice(-5).reverse();if(o.length<r.length){let i=r.slice(0,-4);o[5-1]=[`\u2026 ${i.length.toLocaleString("en-US")} more`,fe(i,Ec)]}return o.map(([i,a])=>`${i} (${a.toLocaleString("en-US")})`).join(`
-`)}},Zv={reduceIndex(t,e){return e[t[t.length-1]]}},Ma={label:"Frequency",reduceIndex(t){return t.length}},Kv={label:"Distinct",reduceIndex(t,e){let n=new Ce;for(let r of t)n.add(e[r]);return n.size}},Qv=Sn(fe);function Qg(t,e){return t==null?{scope:e,label:"Frequency",reduceIndex:(n,r,o=1)=>n.length/o}:{scope:e,reduceIndex:(n,r,o=1)=>fe(n,i=>r[i])/o}}function Io(t,{scale:e,type:n,value:r,filter:o,hint:i},a){return i===void 0&&typeof r?.transform=="function"&&(i=r.hint),Fd(a,{scale:e,type:n,value:gt(t,r),label:Pe(r),filter:o,hint:i})}function r1(t,e){return Object.fromEntries(Object.entries(t).map(([n,r])=>[n,Io(e,r,n)]))}function o1(t,e){let n=Object.fromEntries(Object.entries(t).map(([r,{scale:o,value:i}])=>{let a=o==null?null:e[o];return[r,a==null?i:pt(i,a)]}));return n.channels=t,n}function Fd(t,e){let{scale:n,value:r}=e;if(n===!0||n==="auto")switch(t){case"fill":case"stroke":case"color":e.scale=n!==!0&&Dc(r,vo)?null:"color";break;case"fillOpacity":case"strokeOpacity":case"opacity":e.scale=n!==!0&&Dc(r,Bg)?null:"opacity";break;case"symbol":n!==!0&&Dc(r,Hg)?(e.scale=null,e.value=pt(r,Ao)):e.scale="symbol";break;default:e.scale=st.has(t)?t:null;break}else if(n===!1)e.scale=null;else if(n!=null&&!st.has(n))throw new Error(`unknown scale: ${n}`);return e}function i1(t,e,n,r,o){let{order:i,reverse:a,reduce:f=!0,limit:u}=o;for(let c in o){if(!st.has(c))continue;let{value:s,order:d=i,reverse:l=a,reduce:p=f,limit:m=u}=on(o[c]),h=s?.startsWith("-");if(h&&(s=s.slice(1)),d=d===void 0?h!==(s==="width"||s==="height")?f1:a1:e8(d),p==null||p===!1)continue;let g=c==="fx"||c==="fy"?t8(e,r[c]):Jv(n,c);if(!g)throw new Error(`missing channel for scale: ${c}`);let b=g.value,[x=0,M=1/0]=re(m)?m:m<0?[m]:[0,m];if(s==null)g.domain=()=>{let y=Array.from(new Ce(b));return l&&(y=y.reverse()),(x!==0||M!==1/0)&&(y=y.slice(x,M)),y};else{let y=s==="data"?t:s==="height"?n1(n,"y1","y2"):s==="width"?n1(n,"x1","x2"):Od(n,s,s==="y"?"y2":s==="x"?"x2":void 0),w=Ta(p===!0?"max":p,y);g.domain=()=>{let v=cs(ne(b),T=>w.reduceIndex(T,y),T=>b[T]);return d&&v.sort(d),l&&v.reverse(),(x!==0||M!==1/0)&&(v=v.slice(x,M)),v.map(xa)}}}}function Jv(t,e){for(let n in t){let r=t[n];if(r.scale===e)return r}}function t8(t,e){let n=t.original;if(n===t)return e;let r=e.value,o=e.value=[];for(let i=0;i<n.length;++i){let a=r[n[i][0]];for(let f of t[i])o[f]=a}return e}function n1(t,e,n){let r=Od(t,e),o=Od(t,n);return pt(o,(i,a)=>Math.abs(i-r[a]),Float64Array)}function Od(t,e,n){let r=t[e];if(!r&&n!==void 0&&(r=t[n]),r)return r.value;throw new Error(`missing channel: ${e}`)}function e8(t){if(t==null||typeof t=="function")return t;switch(`${t}`.toLowerCase()){case"ascending":return a1;case"descending":return f1}throw new Error(`invalid order: ${t}`)}function a1([t,e],[n,r]){return Kt(e,r)||Kt(t,n)}function f1([t,e],[n,r]){return Mr(e,r)||Kt(t,n)}function u1(t,e){let n=t[e];if(n){for(;n.source;)n=n.source;return n.source===null?null:n}}function Eo(t={}){let{document:e=typeof window<"u"?window.document:void 0}=t;return{document:e}}function yt(t,{document:e}){return mn(dn(t).call(e.documentElement))}var qd=0;function c1(){let t=qd;return qd=0,t}function an(t){console.warn(t),++qd}var l1=Math.PI,Tn=2*l1,s1=.618;function d1({projection:t,inset:e=0,insetTop:n=e,insetRight:r=e,insetBottom:o=e,insetLeft:i=e}={},a){if(t==null)return;if(typeof t.stream=="function")return t;let f,u,c="frame";if(Mn(t)){let w;if({type:t,domain:u,inset:w,insetTop:n=w!==void 0?w:n,insetRight:r=w!==void 0?w:r,insetBottom:o=w!==void 0?w:o,insetLeft:i=w!==void 0?w:i,clip:c=c,...f}=t,t==null)return}typeof t!="function"&&({type:t}=p1(t));let{width:s,height:d,marginLeft:l,marginRight:p,marginTop:m,marginBottom:h}=a,g=s-l-p-i-r,b=d-m-h-n-o;if(t=t?.({width:g,height:b,clip:c,...f}),t==null)return;c=n8(c,l,m,s-p,d-h);let x=l+i,M=m+n,y;if(u!=null){let[[w,v],[T,I]]=Ci(t).bounds(u),E=Math.min(g/(T-w),b/(I-v));E>0?(x-=(E*(w+T)-g)/2,M-=(E*(v+I)-b)/2,y=Ai({point(F,_){this.stream.point(F*E+x,_*E+M)}})):an("Warning: the projection could not be fit to the specified domain; using the default scale.")}return y??=x===0&&M===0?m1():Ai({point(w,v){this.stream.point(w+x,v+M)}}),{stream:w=>t.stream(y.stream(c(w)))}}function p1(t){switch(`${t}`.toLowerCase()){case"albers-usa":return Le(wl,.7463,.4673);case"albers":return Rc(Ii,.7463,.4673);case"azimuthal-equal-area":return Le(Ml,4,4);case"azimuthal-equidistant":return Le(Tl,Tn,Tn);case"conic-conformal":return Rc(Al,Tn,Tn);case"conic-equal-area":return Rc(Dn,6.1702,2.9781);case"conic-equidistant":return Rc(Il,7.312,3.6282);case"equal-earth":return Le(kl,5.4133,2.6347);case"equirectangular":return Le($l,Tn,l1);case"gnomonic":return Le(Dl,3.4641,3.4641);case"identity":return{type:m1};case"reflect-y":return{type:r8};case"mercator":return Le(_l,Tn,Tn);case"orthographic":return Le(Pl,2,2);case"stereographic":return Le(Ol,2,2);case"transverse-mercator":return Le(ql,Tn,Tn);default:throw new Error(`unknown projection type: ${t}`)}}function n8(t,e,n,r,o){if(t===!1||t==null||typeof t=="number")return i=>i;switch(t===!0&&(t="frame"),`${t}`.toLowerCase()){case"frame":return Qr(e,n,r,o);default:throw new Error(`unknown projection clip type: ${t}`)}}function Le(t,e,n){return{type:({width:r,height:o,rotate:i,precision:a=.15,clip:f})=>{let u=t();return a!=null&&u.precision?.(a),i!=null&&u.rotate?.(i),typeof f=="number"&&u.clipAngle?.(f),u.scale(Math.min(r/e,o/n)),u.translate([r/2,o/2]),u},aspectRatio:n/e}}function Rc(t,e,n){let{type:r,aspectRatio:o}=Le(t,e,n);return{type:i=>{let{parallels:a,domain:f,width:u,height:c}=i,s=r(i);return a!=null&&(s.parallels(a),f===void 0&&s.fitSize([u,c],{type:"Sphere"})),s},aspectRatio:o}}var m1=Wn({stream:t=>t}),r8=Wn(Ai({point(t,e){this.stream.point(t,-e)}}));function h1(t,e,n,r){let o=n[t],i=n[e],a=o.length,f=n[t]=new Float64Array(a).fill(NaN),u=n[e]=new Float64Array(a).fill(NaN),c,s=r.stream({point(d,l){f[c]=d,u[c]=l}});for(c=0;c<a;++c)s.point(o[c],i[c])}function g1({projection:t}={}){return t==null?!1:typeof t.stream=="function"?!0:(Mn(t)&&(t=t.type),t!=null)}function x1(t){if(typeof t?.stream=="function")return s1;if(Mn(t)&&(t=t.type),t!=null){if(typeof t!="function"){let{aspectRatio:e}=p1(t);if(e)return e}return s1}}function y1(t){let e=[],n=[],r={scale:"x",value:e},o={scale:"y",value:n},i={point(a,f){e.push(a),n.push(f)},lineStart(){},lineEnd(){},polygonStart(){},polygonEnd(){},sphere(){}};for(let a of t.value)ke(a,i);return[r,o]}var S1=new Map([["accent",rd],["category10",nd],["dark2",od],["paired",id],["pastel1",ad],["pastel2",fd],["set1",ud],["set2",cd],["set3",sd],["tableau10",ld]]);function T1(t){return t!=null&&S1.has(`${t}`.toLowerCase())}var b1=new Map([...S1,["brbg",_n(pu,mu)],["prgn",_n(hu,gu)],["piyg",_n(xu,yu)],["puor",_n(bu,wu)],["rdbu",_n(Qi,so)],["rdgy",_n(vu,Mu)],["rdylbu",_n(Ji,lo)],["rdylgn",_n(Su,Tu)],["spectral",_n(_u,Cu)],["burd",w1(Qi,so)],["buylrd",w1(Ji,lo)],["blues",Ot(Ku,Qu)],["greens",Ot(Ju,tc)],["greys",Ot(ec,nc)],["oranges",Ot(fc,uc)],["purples",Ot(rc,oc)],["reds",Ot(ic,ac)],["turbo",Cn(xc)],["viridis",Cn(bc)],["magma",Cn(wc)],["inferno",Cn(vc)],["plasma",Cn(Mc)],["cividis",Cn(cc)],["cubehelix",Cn(sc)],["warm",Cn(dc)],["cool",Cn(pc)],["bugn",Ot(Au,$u)],["bupu",Ot(Iu,Eu)],["gnbu",Ot(ku,Nu)],["orrd",Ot(Du,Ru)],["pubu",Ot(Ou,Fu)],["pubugn",Ot(Pu,Lu)],["purd",Ot(qu,zu)],["rdpu",Ot(Yu,Bu)],["ylgn",Ot(Wu,Gu)],["ylgnbu",Ot(Uu,Xu)],["ylorbr",Ot(Hu,Vu)],["ylorrd",Ot(ju,Zu)],["rainbow",v1(mc)],["sinebow",v1(gc)]]);function Ot(t,e){return({length:n})=>n===1?[t[3][1]]:n===2?[t[3][1],t[3][2]]:(n=Math.max(3,Math.floor(n)),n>9?Gt(e,n):t[n])}function _n(t,e){return({length:n})=>n===2?[t[3][0],t[3][2]]:(n=Math.max(3,Math.floor(n)),n>11?Gt(e,n):t[n])}function w1(t,e){return({length:n})=>n===2?[t[3][2],t[3][0]]:(n=Math.max(3,Math.floor(n)),n>11?Gt(r=>e(1-r),n):t[n].slice().reverse())}function Cn(t){return({length:e})=>Gt(t,Math.max(2,Math.floor(e)))}function v1(t){return({length:e})=>Gt(t,Math.floor(e)+1).slice(0,-1)}function zd(t){let e=`${t}`.toLowerCase();if(!b1.has(e))throw new Error(`unknown ordinal scheme: ${e}`);return b1.get(e)}function _a(t,e){let n=zd(t),r=typeof n=="function"?n({length:e}):n;return r.length!==e?r.slice(0,e):r}function _1(t,e="greys"){let n=new Set,[r,o]=_a(e,2);for(let i of t)if(i!=null)if(i===!0)n.add(o);else if(i===!1)n.add(r);else return;return[...n]}var M1=new Map([["brbg",mu],["prgn",gu],["piyg",yu],["puor",wu],["rdbu",so],["rdgy",Mu],["rdylbu",lo],["rdylgn",Tu],["spectral",Cu],["burd",t=>so(1-t)],["buylrd",t=>lo(1-t)],["blues",Qu],["greens",tc],["greys",nc],["purples",oc],["reds",ac],["oranges",uc],["turbo",xc],["viridis",bc],["magma",wc],["inferno",vc],["plasma",Mc],["cividis",cc],["cubehelix",sc],["warm",dc],["cool",pc],["bugn",$u],["bupu",Eu],["gnbu",Nu],["orrd",Ru],["pubugn",Lu],["pubu",Fu],["purd",zu],["rdpu",Bu],["ylgnbu",Xu],["ylgn",Gu],["ylorbr",Vu],["ylorrd",Zu],["rainbow",mc],["sinebow",gc]]);function ko(t){let e=`${t}`.toLowerCase();if(!M1.has(e))throw new Error(`unknown quantitative scheme: ${e}`);return M1.get(e)}var o8=new Set(["brbg","prgn","piyg","puor","rdbu","rdgy","rdylbu","rdylgn","spectral","burd","buylrd"]);function C1(t){return t!=null&&o8.has(`${t}`.toLowerCase())}var Bd=t=>e=>t(1-e),Yd=[0,1],A1=new Map([["number",ht],["rgb",we],["hsl",Os],["hcl",Fs],["lab",df]]);function Ud(t){let e=`${t}`.toLowerCase();if(!A1.has(e))throw new Error(`unknown interpolator: ${e}`);return A1.get(e)}function Do(t,e,n,{type:r,nice:o,clamp:i,zero:a,domain:f=P1(t,n),unknown:u,round:c,scheme:s,interval:d,range:l=st.get(t)===So?u8(n,f):st.get(t)===To?c8(n,f):st.get(t)===_o?Yd:void 0,interpolate:p=st.get(t)===pe?s==null&&l!==void 0?we:ko(s!==void 0?s:r==="cyclical"?"rainbow":"turbo"):c?fr:ht,reverse:m}){if(d=rn(d,r),(r==="cyclical"||r==="sequential")&&(r="linear"),typeof p!="function"&&(p=Ud(p)),m=!!m,l!==void 0){let h=(f=kt(f)).length,g=(l=kt(l)).length;if(h!==g){if(p.length===1)throw new Error("invalid piecewise interpolator");p=We(p,l),l=void 0}}if(p.length===1?(m&&(p=Bd(p),m=!1),l===void 0&&(l=Float64Array.from(f,(h,g)=>g/(f.length-1)),l.length===2&&(l=Yd)),e.interpolate((l===Yd?Wn:Ca)(p))):e.interpolate(p),a){let[h,g]=Ct(f);(h>0||g<0)&&(f=ya(f),vn(f)!==Math.sign(h)?f[f.length-1]=0:f[0]=0)}return m&&(f=An(f)),e.domain(f).unknown(u),o&&(e.nice(i8(o,r)),f=e.domain()),l!==void 0&&e.range(l),i&&e.clamp(i),{type:r,domain:f,range:l,scale:e,interpolate:p,interval:d}}function i8(t,e){return t===!0?void 0:typeof t=="number"?t:Og(t,e)}function $1(t,e,n){return Do(t,hr(),e,n)}function I1(t,e,n){return Xd(t,e,{...n,exponent:.5})}function Xd(t,e,{exponent:n=1,...r}){return Do(t,Yi().exponent(n),e,{...r,type:"pow"})}function E1(t,e,{base:n=10,domain:r=s8(e),...o}){return Do(t,qi().base(n),e,{...o,domain:r})}function k1(t,e,{constant:n=1,...r}){return Do(t,zi().constant(n),e,r)}function N1(t,e,{range:n,quantiles:r=n===void 0?5:(n=[...n]).length,n:o=r,scheme:i="rdylbu",domain:a=l8(e),unknown:f,interpolate:u,reverse:c}){return n===void 0&&(n=u!==void 0?Gt(u,o):st.get(t)===pe?_a(i,o):void 0),a.length>0&&(a=Bi(a,n===void 0?{length:o}:n).quantiles()),Pc(t,e,{domain:a,range:n,reverse:c,unknown:f})}function D1(t,e,{range:n,n:r=n===void 0?5:(n=[...n]).length,scheme:o="rdylbu",domain:i=P1(t,e),unknown:a,interpolate:f,reverse:u}){let[c,s]=Ct(i),d;return n===void 0?(d=$e(c,s,r),d[0]<=c&&d.splice(0,1),d[d.length-1]>=s&&d.pop(),r=d.length+1,n=f!==void 0?Gt(f,r):st.get(t)===pe?_a(o,r):void 0):(d=Gt(ht(c,s),r+1).slice(1,-1),c instanceof Date&&(d=d.map(l=>new Date(l)))),vn(kt(i))<0&&d.reverse(),Pc(t,e,{domain:d,range:n,reverse:u,unknown:a})}function Pc(t,e,{domain:n=[0],unknown:r,scheme:o="rdylbu",interpolate:i,range:a=i!==void 0?Gt(i,n.length+1):st.get(t)===pe?_a(o,n.length+1):void 0,reverse:f}){n=kt(n);let u=vn(n);if(!isNaN(u)&&!a8(n,u))throw new Error(`the ${t} scale has a non-monotonic domain`);return f&&(a=An(a)),{type:"threshold",scale:Ui(u<0?An(n):n,a===void 0?[]:a).unknown(r),domain:n,range:a}}function a8(t,e){for(let n=1,r=t.length,o=t[0];n<r;++n){let i=xe(o,o=t[n]);if(i!==0&&i!==e)return!1}return!0}function R1(){return{type:"identity",scale:Oi()}}function No(t,e=yd){return t.length?[Jt(t,({value:n})=>n===void 0?n:Jt(n,e)),Wt(t,({value:n})=>n===void 0?n:Wt(n,e))]:[0,1]}function P1(t,e){let n=st.get(t);return(n===So||n===_o||n===To?f8:No)(e)}function f8(t){return[0,t.length?Wt(t,({value:e})=>e===void 0?e:Wt(e,yd)):1]}function u8(t,e){let n=t.find(({radius:a})=>a!==void 0);if(n!==void 0)return[0,n.radius];let r=ye(t,.5,({value:a})=>a===void 0?NaN:ye(a,.25,da)),o=e.map(a=>3*Math.sqrt(a/r)),i=30/Wt(o);return i<1?o.map(a=>a*i):o}function c8(t,e){let n=sn(t,({value:i})=>i===void 0?NaN:sn(i,Math.abs)),r=e.map(i=>12*i/n),o=60/Wt(r);return o<1?r.map(i=>i*o):r}function s8(t){for(let{value:e}of t)if(e!==void 0)for(let n of e){if(n>0)return No(t,da);if(n<0)return No(t,_c)}return[1,10]}function l8(t){let e=[];for(let{value:n}of t)if(n!==void 0)for(let r of n)e.push(r);return e}function Ca(t){return(e,n)=>r=>t(e+r*(n-e))}function Lc(t,e,n,r,{type:o,nice:i,clamp:a,domain:f=No(r),unknown:u,pivot:c=0,scheme:s,range:d,symmetric:l=!0,interpolate:p=st.get(t)===pe?s==null&&d!==void 0?we:ko(s!==void 0?s:"rdbu"):ht,reverse:m}){c=+c,f=kt(f);let[h,g]=f;if(f.length>2&&an(`Warning: the diverging ${t} scale domain contains extra elements.`),xe(h,g)<0&&([h,g]=[g,h],m=!m),h=Math.min(h,c),g=Math.max(g,c),typeof p!="function"&&(p=Ud(p)),d!==void 0&&(p=p.length===1?Ca(p)(...d):We(p,d)),m&&(p=Bd(p)),l){let b=n.apply(c),x=b-n.apply(h),M=n.apply(g)-b;x<M?h=n.invert(b-M):x>M&&(g=n.invert(b+x))}return e.domain([h,c,g]).unknown(u).interpolator(p),a&&e.clamp(a),i&&e.nice(i),{type:o,domain:[h,g],pivot:c,interpolate:p,scale:e}}function L1(t,e,n){return Lc(t,Ki(),d8,e,n)}function O1(t,e,n){return Wd(t,e,{...n,exponent:.5})}function Wd(t,e,{exponent:n=1,...r}){return Lc(t,du().exponent(n=+n),h8(n),e,{...r,type:"diverging-pow"})}function F1(t,e,{base:n=10,pivot:r=1,domain:o=No(e,r<0?_c:da),...i}){return Lc(t,su().base(n=+n),p8,e,{domain:o,pivot:r,...i})}function q1(t,e,{constant:n=1,...r}){return Lc(t,lu().constant(n=+n),g8(n),e,r)}var d8={apply(t){return t},invert(t){return t}},p8={apply:Math.log,invert:Math.exp},m8={apply(t){return Math.sign(t)*Math.sqrt(Math.abs(t))},invert(t){return Math.sign(t)*(t*t)}};function h8(t){return t===.5?m8:{apply(e){return Math.sign(e)*Math.pow(Math.abs(e),t)},invert(e){return Math.sign(e)*Math.pow(Math.abs(e),1/t)}}}function g8(t){return{apply(e){return Math.sign(e)*Math.log1p(Math.abs(e/t))},invert(e){return Math.sign(e)*Math.expm1(Math.abs(e))*t}}}function z1(t,e,n,r){return Do(t,e,n,r)}function Y1(t,e,n){return z1(t,fu(),e,n)}function B1(t,e,n){return z1(t,uu(),e,n)}var Ro=Symbol("ordinal");function X1(t,e,n,{type:r,interval:o,domain:i,range:a,reverse:f,hint:u}){return o=rn(o,r),i===void 0&&(i=j1(n,o,t)),(r==="categorical"||r===Ro)&&(r="ordinal"),f&&(i=An(i)),e.domain(i),a!==void 0&&(typeof a=="function"&&(a=a(i)),e.range(a)),{type:r,domain:i,range:a,scale:e,hint:u,interval:o}}function W1(t,e,{type:n,interval:r,domain:o,range:i,scheme:a,unknown:f,...u}){r=rn(r,n),o===void 0&&(o=j1(e,r,t));let c;if(st.get(t)===Co)c=x8(e),i=i===void 0?y8(c):pt(i,Ao);else if(st.get(t)===pe&&(i===void 0&&(n==="ordinal"||n===Ro)&&(i=_1(o,a),i!==void 0&&(a=void 0)),a===void 0&&i===void 0&&(a=n==="ordinal"?"turbo":"tableau10"),a!==void 0))if(i!==void 0){let s=ko(a),d=i[0],l=i[1]-i[0];i=({length:p})=>Gt(m=>s(d+l*m),p)}else i=zd(a);if(f===Pi)throw new Error(`implicit unknown on ${t} scale is not supported`);return X1(t,pr().unknown(f),e,{...u,type:n,domain:o,range:i,hint:c})}function G1(t,e,{align:n=.5,padding:r=.5,...o}){return V1(zl().align(n).padding(r),e,o,t)}function H1(t,e,{align:n=.5,padding:r=.1,paddingInner:o=r,paddingOuter:i=t==="fx"||t==="fy"?0:r,...a}){return V1(Rn().align(n).paddingInner(o).paddingOuter(i),e,a,t)}function V1(t,e,n,r){let{round:o}=n;return o!==void 0&&t.round(o=!!o),t=X1(r,t,e,n),t.round=o,t}function j1(t,e,n){let r=new Ce;for(let{value:o,domain:i}of t){if(i!==void 0)return i();if(o!==void 0)for(let a of o)r.add(a)}if(e!==void 0){let[o,i]=Ct(r).map(e.floor,e);return e.range(o,e.offset(i))}if(r.size>1e4&&st.get(n)===de)throw new Error(`implicit ordinal domain of ${n} scale has more than 10,000 values`);return ze(r,Kt)}function U1(t,e){let n;for(let{hint:r}of t){let o=r?.[e];if(o!==void 0){if(n===void 0)n=o;else if(n!==o)return}}return n}function x8(t){return{fill:U1(t,"fill"),stroke:U1(t,"stroke")}}function y8(t){return Lt(t.fill)?hd:Sc}function Aa(t,{label:e,inset:n=0,insetTop:r=n,insetRight:o=n,insetBottom:i=n,insetLeft:a=n,round:f,nice:u,clamp:c,zero:s,align:d,padding:l,projection:p,facet:{label:m=e}={},...h}={}){let g={};for(let[b,x]of t){let M=h[b],y=v8(b,x,{round:st.get(b)===de?f:void 0,nice:u,clamp:c,zero:s,align:d,padding:l,projection:p,...M});if(y){let{label:w=b==="fx"||b==="fy"?m:e,percent:v,transform:T,inset:I,insetTop:E=I!==void 0?I:b==="y"?r:0,insetRight:F=I!==void 0?I:b==="x"?o:0,insetBottom:_=I!==void 0?I:b==="y"?i:0,insetLeft:R=I!==void 0?I:b==="x"?a:0}=M||{};if(T==null)T=void 0;else if(typeof T!="function")throw new Error("invalid scale transform; not a function");y.percent=!!v,y.label=w===void 0?b8(x,y):w,y.transform=T,b==="x"||b==="fx"?(y.insetLeft=+R,y.insetRight=+F):(b==="y"||b==="fy")&&(y.insetTop=+E,y.insetBottom=+_),g[b]=y}}return g}function Hd(t){return Object.fromEntries(Object.entries(t).filter(([,{scale:e}])=>e).map(([e,{scale:n,type:r,interval:o,label:i}])=>(n.type=r,o!=null&&(n.interval=o),i!=null&&(n.label=i),[e,n])))}function J1(t,e){let{x:n,y:r,fx:o,fy:i}=t,a=o||i?Fc(e):e;o&&Z1(o,a),i&&K1(i,a);let f=o||i?Vd(t,e):e;n&&Z1(n,f),r&&K1(r,f)}function b8(t=[],e){let n;for(let{label:r}of t)if(r!==void 0){if(n===void 0)n=r;else if(n!==r)return}if(n!==void 0)return!fn(e)&&e.percent&&(n=`${n} (%)`),{inferred:!0,toString:()=>n}}function Fc(t){let{marginTop:e,marginRight:n,marginBottom:r,marginLeft:o,width:i,height:a,facet:{marginTop:f,marginRight:u,marginBottom:c,marginLeft:s}}=t;return{marginTop:Math.max(e,f),marginRight:Math.max(n,u),marginBottom:Math.max(r,c),marginLeft:Math.max(o,s),width:i,height:a}}function Vd({fx:t,fy:e},n){let{marginTop:r,marginRight:o,marginBottom:i,marginLeft:a,width:f,height:u}=Fc(n);return{marginTop:r,marginRight:o,marginBottom:i,marginLeft:a,width:t?t.scale.bandwidth()+a+o:f,height:e?e.scale.bandwidth()+r+i:u,facet:{width:f,height:u}}}function Z1(t,e){if(t.range===void 0){let{insetLeft:n,insetRight:r}=t,{width:o,marginLeft:i=0,marginRight:a=0}=e,f=i+n,u=o-a-r;t.range=[f,Math.max(f,u)],fn(t)||(t.range=ex(t)),t.scale.range(t.range)}tx(t)}function K1(t,e){if(t.range===void 0){let{insetTop:n,insetBottom:r}=t,{height:o,marginTop:i=0,marginBottom:a=0}=e,f=i+n,u=o-a-r;t.range=[Math.max(f,u),f],fn(t)?t.range.reverse():t.range=ex(t),t.scale.range(t.range)}tx(t)}function tx(t){t.round===void 0&&S8(t)&&w8(t)<=30&&t.scale.round(!0)}function w8({scale:t}){let e=t.domain().length,[n,r]=t.range(),o=t.paddingInner?t.paddingInner():1,i=t.paddingOuter?t.paddingOuter():t.padding(),a=e-o,f=Math.abs(r-n)/Math.max(1,a+i*2);return(f-Math.floor(f))*a}function ex(t){let e=t.scale.domain().length+jd(t);if(!(e>2))return t.range;let[n,r]=t.range;return Array.from({length:e},(o,i)=>n+i/(e-1)*(r-n))}function v8(t,e=[],n={}){let r=M8(t,e,n);if(n.type===void 0&&n.domain===void 0&&n.range===void 0&&n.interval==null&&t!=="fx"&&t!=="fy"&&fn({type:r})){let o=e.map(({value:i})=>i).filter(i=>i!==void 0);o.some(Yt)?an(`Warning: some data associated with the ${t} scale are dates. Dates are typically associated with a "utc" or "time" scale rather than a "${Po(r)}" scale. If you are using a bar mark, you probably want a rect mark with the interval option instead; if you are using a group transform, you probably want a bin transform instead. If you want to treat this data as ordinal, you can specify the interval of the ${t} scale (e.g., d3.utcDay), or you can suppress this warning by setting the type of the ${t} scale to "${Po(r)}".`):o.some(qg)?an(`Warning: some data associated with the ${t} scale are strings that appear to be dates (e.g., YYYY-MM-DD). If these strings represent dates, you should parse them to Date objects. Dates are typically associated with a "utc" or "time" scale rather than a "${Po(r)}" scale. If you are using a bar mark, you probably want a rect mark with the interval option instead; if you are using a group transform, you probably want a bin transform instead. If you want to treat this data as ordinal, you can suppress this warning by setting the type of the ${t} scale to "${Po(r)}".`):o.some(zg)&&an(`Warning: some data associated with the ${t} scale are strings that appear to be numbers. If these strings represent numbers, you should parse or coerce them to numbers. Numbers are typically associated with a "linear" scale rather than a "${Po(r)}" scale. If you want to treat this data as ordinal, you can specify the interval of the ${t} scale (e.g., 1 for integers), or you can suppress this warning by setting the type of the ${t} scale to "${Po(r)}".`)}switch(n.type=r,r){case"diverging":case"diverging-sqrt":case"diverging-pow":case"diverging-log":case"diverging-symlog":case"cyclical":case"sequential":case"linear":case"sqrt":case"threshold":case"quantile":case"pow":case"log":case"symlog":n=Oc(e,n,Tr);break;case"identity":switch(st.get(t)){case de:n=Oc(e,n,Tr);break;case Co:n=Oc(e,n,T8);break}break;case"utc":case"time":n=Oc(e,n,Eg);break}switch(r){case"diverging":return L1(t,e,n);case"diverging-sqrt":return O1(t,e,n);case"diverging-pow":return Wd(t,e,n);case"diverging-log":return F1(t,e,n);case"diverging-symlog":return q1(t,e,n);case"categorical":case"ordinal":case Ro:return W1(t,e,n);case"cyclical":case"sequential":case"linear":return $1(t,e,n);case"sqrt":return I1(t,e,n);case"threshold":return Pc(t,e,n);case"quantile":return N1(t,e,n);case"quantize":return D1(t,e,n);case"pow":return Xd(t,e,n);case"log":return E1(t,e,n);case"symlog":return k1(t,e,n);case"utc":return B1(t,e,n);case"time":return Y1(t,e,n);case"point":return G1(t,e,n);case"band":return H1(t,e,n);case"identity":return st.get(t)===de?R1():{type:"identity"};case void 0:return;default:throw new Error(`unknown scale type: ${r}`)}}function Po(t){return typeof t=="symbol"?t.description:t}var Q1={toString:()=>"projection"};function M8(t,e,{type:n,domain:r,range:o,scheme:i,pivot:a,projection:f}){if(t==="fx"||t==="fy")return"band";(t==="x"||t==="y")&&f!=null&&(n=Q1);for(let{type:c}of e)if(c!==void 0){if(n===void 0)n=c;else if(n!==c)throw new Error(`scale incompatible with channel: ${n} !== ${c}`)}if(n===Q1)return;if(n!==void 0)return n;if(r===void 0&&!e.some(({value:c})=>c!==void 0))return;let u=st.get(t);if(u===So)return"sqrt";if(u===_o||u===To)return"linear";if(u===Co)return"ordinal";if((r||o||[]).length>2)return Gd(u);if(r!==void 0){if(Ad(r))return Gd(u);if(Yt(r))return"utc"}else{let c=e.map(({value:s})=>s).filter(s=>s!==void 0);if(c.some(Ad))return Gd(u);if(c.some(Yt))return"utc"}if(u===pe){if(a!=null||C1(i))return"diverging";if(T1(i))return"categorical"}return"linear"}function Gd(t){switch(t){case de:return"point";case pe:return Ro;default:return"ordinal"}}function qc({type:t}){return t==="time"||t==="utc"}function fn({type:t}){return t==="ordinal"||t==="point"||t==="band"||t===Ro}function jd({type:t}){return t==="threshold"}function S8({type:t}){return t==="point"||t==="band"}function Gn(t){if(t===void 0)return!0;let e=t.domain(),n=t(e[0]);for(let r=1,o=e.length;r<o;++r)if(t(e[r])-n)return!1;return!0}function Oc(t,{domain:e,...n},r){for(let o of t)o.value!==void 0&&(o.value=r(o.value));return{domain:e===void 0?e:r(e),...n}}function T8(t){return pt(t,Ao)}function nx(t){return e=>{if(!st.has(e=`${e}`))throw new Error(`unknown scale: ${e}`);return e in t?_8(t[e]):void 0}}function _8({scale:t,type:e,domain:n,range:r,interpolate:o,interval:i,transform:a,percent:f,pivot:u}){if(e==="identity")return{type:"identity",apply:s=>s,invert:s=>s};let c=t.unknown?t.unknown():void 0;return{type:e,domain:ya(n),...r!==void 0&&{range:ya(r)},...a!==void 0&&{transform:a},...f&&{percent:f},...c!==void 0&&{unknown:c},...i!==void 0&&{interval:i},...o!==void 0&&{interpolate:o},...t.clamp&&{clamp:t.clamp()},...u!==void 0&&{pivot:u,symmetric:!1},...t.base&&{base:t.base()},...t.exponent&&{exponent:t.exponent()},...t.constant&&{constant:t.constant()},...t.align&&{align:t.align(),round:t.round()},...t.padding&&(t.paddingInner?{paddingInner:t.paddingInner(),paddingOuter:t.paddingOuter()}:{padding:t.padding()}),...t.bandwidth&&{bandwidth:t.bandwidth(),step:t.step()},apply:s=>t(s),...t.invert&&{invert:s=>t.invert(s)}}}function zc(t){let e,n;return(...r)=>((n?.length!==r.length||n.some((o,i)=>o!==r[i]))&&(n=r,e=t(...r)),e)}var C8=zc(t=>new Intl.NumberFormat(t)),Nq=zc((t,e)=>new Intl.DateTimeFormat(t,{timeZone:"UTC",...e&&{month:e}})),Dq=zc((t,e)=>new Intl.DateTimeFormat(t,{timeZone:"UTC",...e&&{weekday:e}}));function A8(t="en-US"){let e=C8(t);return n=>n!=null&&!isNaN(n)?e.format(n):void 0}function $8(t){return Cc(t,"Invalid Date")}function I8(t="en-US"){let e=A8(t);return n=>(n instanceof Date?$8:typeof n=="number"?e:It)(n)}var _e=I8();var Bt=(typeof window<"u"?window.devicePixelRatio>1:typeof it>"u")?0:.5,E8=0;function rx(){return`plot-clip-${++E8}`}function ox(t,{title:e,href:n,ariaLabel:r,ariaDescription:o,ariaHidden:i,target:a,fill:f,fillOpacity:u,stroke:c,strokeWidth:s,strokeOpacity:d,strokeLinejoin:l,strokeLinecap:p,strokeMiterlimit:m,strokeDasharray:h,strokeDashoffset:g,opacity:b,mixBlendMode:x,imageFilter:M,paintOrder:y,pointerEvents:w,shapeRendering:v,channels:T},{ariaLabel:I,fill:E="currentColor",fillOpacity:F,stroke:_="none",strokeOpacity:R,strokeWidth:O,strokeLinecap:P,strokeLinejoin:S,strokeMiterlimit:A,paintOrder:N}){E===null&&(f=null,u=null),_===null&&(c=null,d=null),Lt(E)?!Lt(_)&&(!Lt(f)||T?.fill)&&(_="none"):Lt(_)&&(!Lt(c)||T?.stroke)&&(E="none");let[L,D]=ie(f,E),[tt,Z]=Et(u,F),[G,Q]=ie(c,_),[at,Ut]=Et(d,R),[Fe,H]=Et(b);$r(Q)||(s===void 0&&(s=O),p===void 0&&(p=P),l===void 0&&(l=S),m===void 0&&!Ug(l)&&(m=A),!$r(D)&&y===void 0&&(y=N));let[X,$]=Et(s);return E!==null&&(t.fill=St(D,"currentColor"),t.fillOpacity=$a(Z,1)),_!==null&&(t.stroke=St(Q,"none"),t.strokeWidth=$a($,1),t.strokeOpacity=$a(Ut,1),t.strokeLinejoin=St(l,"miter"),t.strokeLinecap=St(p,"butt"),t.strokeMiterlimit=$a(m,4),t.strokeDasharray=St(h,"none"),t.strokeDashoffset=St(g,"0")),t.target=It(a),t.ariaLabel=It(I),t.ariaDescription=It(o),t.ariaHidden=It(i),t.opacity=$a(H,1),t.mixBlendMode=St(x,"normal"),t.imageFilter=St(M,"none"),t.paintOrder=St(y,"normal"),t.pointerEvents=St(w,"auto"),t.shapeRendering=St(v,"auto"),{title:{value:e,optional:!0,filter:null},href:{value:n,optional:!0,filter:null},ariaLabel:{value:r,optional:!0,filter:null},fill:{value:L,scale:"auto",optional:!0},fillOpacity:{value:tt,scale:"auto",optional:!0},stroke:{value:G,scale:"auto",optional:!0},strokeOpacity:{value:at,scale:"auto",optional:!0},strokeWidth:{value:X,optional:!0},opacity:{value:Fe,scale:"auto",optional:!0}}}function k8(t,e){e&&t.filter(n=>Tc(e[n])).append("title").call(N8,e)}function N8(t,e){e&&t.text(n=>_e(e[n]))}function Oe(t,{target:e,tip:n},{ariaLabel:r,title:o,fill:i,fillOpacity:a,stroke:f,strokeOpacity:u,strokeWidth:c,opacity:s,href:d}){r&&et(t,"aria-label",l=>r[l]),i&&et(t,"fill",l=>i[l]),a&&et(t,"fill-opacity",l=>a[l]),f&&et(t,"stroke",l=>f[l]),u&&et(t,"stroke-opacity",l=>u[l]),c&&et(t,"stroke-width",l=>c[l]),s&&et(t,"opacity",l=>s[l]),d&&R8(t,l=>d[l],e),n||k8(t,o)}function ix(t){return t===!0?t="frame":t===!1&&(t=null),_r(t,"clip",["frame","sphere"])}function D8(t,e,n,r){let o;switch(e.clip){case"frame":{let{width:i,height:a,marginLeft:f,marginRight:u,marginTop:c,marginBottom:s}=n,d=rx();o=`url(#${d})`,t=yt("svg:g",r).call(l=>l.append("svg:clipPath").attr("id",d).append("rect").attr("x",f).attr("y",c).attr("width",i-u-f).attr("height",a-c-s)).each(function(){this.appendChild(t.node()),t.node=()=>this});break}case"sphere":{let{projection:i}=r;if(!i)throw new Error('the "sphere" clip option requires a projection');let a=rx();o=`url(#${a})`,t.append("clipPath").attr("id",a).append("path").attr("d",Ci(i)({type:"Sphere"}));break}}et(t,"aria-label",e.ariaLabel),et(t,"aria-description",e.ariaDescription),et(t,"aria-hidden",e.ariaHidden),et(t,"clip-path",o)}function me(t,e,n,r){D8(t,e,n,r),et(t,"fill",e.fill),et(t,"fill-opacity",e.fillOpacity),et(t,"stroke",e.stroke),et(t,"stroke-width",e.strokeWidth),et(t,"stroke-opacity",e.strokeOpacity),et(t,"stroke-linejoin",e.strokeLinejoin),et(t,"stroke-linecap",e.strokeLinecap),et(t,"stroke-miterlimit",e.strokeMiterlimit),et(t,"stroke-dasharray",e.strokeDasharray),et(t,"stroke-dashoffset",e.strokeDashoffset),et(t,"shape-rendering",e.shapeRendering),et(t,"filter",e.imageFilter),et(t,"paint-order",e.paintOrder);let{pointerEvents:o=r.pointerSticky===!1?"none":void 0}=e;et(t,"pointer-events",o)}function he(t,e){P8(t,"mix-blend-mode",e.mixBlendMode),et(t,"opacity",e.opacity)}function R8(t,e,n){t.each(function(r){let o=e(r);if(o!=null){let i=this.ownerDocument.createElementNS(Ye.svg,"a");i.setAttribute("fill","inherit"),i.setAttributeNS(Ye.xlink,"href",o),n!=null&&i.setAttribute("target",n),this.parentNode.insertBefore(i,this).appendChild(this)}})}function et(t,e,n){n!=null&&t.attr(e,n)}function P8(t,e,n){n!=null&&t.style(e,n)}function ge(t,e,{x:n,y:r},o=Bt,i=Bt){o+=e.dx,i+=e.dy,n?.bandwidth&&(o+=n.bandwidth()/2),r?.bandwidth&&(i+=r.bandwidth()/2),(o||i)&&t.attr("transform",`translate(${o},${i})`)}function St(t,e){if((t=It(t))!==e)return t}function $a(t,e){if((t=ct(t))!==e)return t}var L8=/^-?([_a-z]|[\240-\377]|\\[0-9a-f]{1,6}(\r\n|[ \t\r\n\f])?|\\[^\r\n\f0-9a-f])([_a-z0-9-]|[\240-\377]|\\[0-9a-f]{1,6}(\r\n|[ \t\r\n\f])?|\\[^\r\n\f0-9a-f])*$/i;function Lo(t){if(t===void 0)return"plot-d6a7b5";if(t=`${t}`,!L8.test(t))throw new Error(`invalid class name: ${t}`);return t}function Oo(t,e){if(typeof e=="string")t.property("style",e);else if(e!=null)for(let n of t)Object.assign(n.style,e)}function Hn({frameAnchor:t},{width:e,height:n,marginTop:r,marginRight:o,marginBottom:i,marginLeft:a}){return[/left$/.test(t)?a:/right$/.test(t)?e-o:(a+e-o)/2,/^top/.test(t)?r:/^bottom/.test(t)?n-i:(r+n-i)/2]}function fx(t,e,n={}){let r=.5-Bt,o=.5+Bt,i=.5+Bt,a=.5-Bt;for(let{marginTop:h,marginRight:g,marginBottom:b,marginLeft:x}of e)h>r&&(r=h),g>o&&(o=g),b>i&&(i=b),x>a&&(a=x);let{margin:f,marginTop:u=f!==void 0?f:r,marginRight:c=f!==void 0?f:o,marginBottom:s=f!==void 0?f:i,marginLeft:d=f!==void 0?f:a}=n;u=+u,c=+c,s=+s,d=+d;let{width:l=640,height:p=O8(t,n,{width:l,marginTopDefault:r,marginRightDefault:o,marginBottomDefault:i,marginLeftDefault:a})+Math.max(0,u-r+s-i)}=n;l=+l,p=+p;let m={width:l,height:p,marginTop:u,marginRight:c,marginBottom:s,marginLeft:d};if(t.fx||t.fy){let{margin:h,marginTop:g=h!==void 0?h:u,marginRight:b=h!==void 0?h:c,marginBottom:x=h!==void 0?h:s,marginLeft:M=h!==void 0?h:d}=n.facet??{};g=+g,b=+b,x=+x,M=+M,m.facet={marginTop:g,marginRight:b,marginBottom:x,marginLeft:M}}return m}function O8({x:t,y:e,fy:n,fx:r},{projection:o,aspectRatio:i},{width:a,marginTopDefault:f,marginRightDefault:u,marginBottomDefault:c,marginLeftDefault:s}){let d=n?n.scale.domain().length:1,l=x1(o);if(l){let m=r?r.scale.domain().length:1,h=(1.1*d-.1)/(1.1*m-.1)*l,g=Math.max(.1,Math.min(10,h));return Math.round((a-s-u)*g+f+c)}let p=e?fn(e)?e.scale.domain().length:Math.max(7,17/d):1;if(i!=null){if(i=+i,!(isFinite(i)&&i>0))throw new Error(`invalid aspectRatio: ${i}`);let m=ax("y",e)/(ax("x",t)*i),h=r?r.scale.bandwidth():1,g=n?n.scale.bandwidth():1,b=h*(a-s-u)-t.insetLeft-t.insetRight;return(m*b+e.insetTop+e.insetBottom)/g+f+c}return!!(e||n)*Math.max(1,Math.min(60,p*d))*20+!!r*30+60}function ax(t,e){if(!e)throw new Error(`aspectRatio requires ${t} scale`);let{type:n,domain:r}=e,o;switch(n){case"linear":case"utc":case"time":o=Number;break;case"pow":{let f=e.scale.exponent();o=u=>Math.pow(u,f);break}case"log":o=Math.log;break;case"point":case"band":return r.length;default:throw new Error(`unsupported ${t} scale for aspectRatio: ${n}`)}let[i,a]=Ct(r);return Math.abs(o(a)-o(i))}function cx(t,e){let{fx:n,fy:r}=Aa(t,e),o=n?.scale.domain(),i=r?.scale.domain();return o&&i?Fa(o,i).map(([a,f],u)=>({x:a,y:f,i:u})):o?o.map((a,f)=>({x:a,i:f})):i?i.map((a,f)=>({y:a,i:f})):void 0}function sx(t,{x:e,y:n}){return e&&=tp(e),n&&=tp(n),t.filter(e&&n?r=>e.has(r.x)&&n.has(r.y):e?r=>e.has(r.x):r=>n.has(r.y)).sort(e&&n?(r,o)=>e.get(r.x)-e.get(o.x)||n.get(r.y)-n.get(o.y):e?(r,o)=>e.get(r.x)-e.get(o.x):(r,o)=>n.get(r.y)-n.get(o.y))}function Bc(t,{fx:e,fy:n}){let r=ne(t),o=e?.value,i=n?.value;return e&&n?Ae(r,a=>(a.fx=o[a[0]],a.fy=i[a[0]],a),a=>o[a],a=>i[a]):e?Ae(r,a=>(a.fx=o[a[0]],a),a=>o[a]):Ae(r,a=>(a.fy=i[a[0]],a),a=>i[a])}function lx(t,e,{marginTop:n,marginLeft:r}){return t&&e?({x:o,y:i})=>`translate(${t(o)-r},${e(i)-n})`:t?({x:o})=>`translate(${t(o)-r},0)`:({y:o})=>`translate(0,${e(o)-n})`}function dx(t){let e=[],n=new Uint32Array(fe(t,r=>r.length));for(let r of t){let o=0;for(let i of t)r!==i&&(n.set(i,o),o+=i.length);e.push(n.slice(0,o))}return e}var F8=new Map([["top",Zd],["right",Jd],["bottom",Kd],["left",Qd],["top-left",Yc(Zd,Qd)],["top-right",Yc(Zd,Jd)],["bottom-left",Yc(Kd,Qd)],["bottom-right",Yc(Kd,Jd)],["top-empty",z8],["right-empty",U8],["bottom-empty",Y8],["left-empty",B8],["empty",X8]]);function px(t){if(t==null)return null;let e=F8.get(`${t}`.toLowerCase());if(e)return e;throw new Error(`invalid facet anchor: ${t}`)}var ux=new WeakMap;function tp(t){let e=ux.get(t);return e||ux.set(t,e=new Qt(pt(t,(n,r)=>[n,r]))),e}function Vn(t,e){return tp(t).get(e)}function q8(t,e,n){return e=bo(e),n=bo(n),t.find(r=>Object.is(bo(r.x),e)&&Object.is(bo(r.y),n))}function Uc(t,e,n){return q8(t,e,n)?.empty}function Zd(t,{y:e},{y:n}){return e?Vn(e,n)===0:!0}function Kd(t,{y:e},{y:n}){return e?Vn(e,n)===e.length-1:!0}function Qd(t,{x:e},{x:n}){return e?Vn(e,n)===0:!0}function Jd(t,{x:e},{x:n}){return e?Vn(e,n)===e.length-1:!0}function z8(t,{y:e},{x:n,y:r,empty:o}){if(o)return!1;if(!e)return;let i=Vn(e,r);if(i>0)return Uc(t,n,e[i-1])}function Y8(t,{y:e},{x:n,y:r,empty:o}){if(o)return!1;if(!e)return;let i=Vn(e,r);if(i<e.length-1)return Uc(t,n,e[i+1])}function B8(t,{x:e},{x:n,y:r,empty:o}){if(o)return!1;if(!e)return;let i=Vn(e,n);if(i>0)return Uc(t,e[i-1],r)}function U8(t,{x:e},{x:n,y:r,empty:o}){if(o)return!1;if(!e)return;let i=Vn(e,n);if(i<e.length-1)return Uc(t,e[i+1],r)}function X8(t,e,{empty:n}){return n}function Yc(t,e){return function(){return t.apply(null,arguments)&&e.apply(null,arguments)}}function Xc(t,{channels:{fx:e,fy:n},groups:r}){return e&&n?t.map(({x:o,y:i})=>r.get(o)?.get(i)??[]):e?t.map(({x:o})=>r.get(o)??[]):t.map(({y:o})=>r.get(o)??[])}var Nt=class{constructor(e,n={},r={},o){let{facet:i="auto",facetAnchor:a,fx:f,fy:u,sort:c,dx:s=0,dy:d=0,margin:l=0,marginTop:p=l,marginRight:m=l,marginBottom:h=l,marginLeft:g=l,clip:b,channels:x,tip:M,render:y}=r;if(this.data=e,this.sort=Cr(c)?c:null,this.initializer=Ir(r).initializer,this.transform=this.initializer?r.transform:$o(r).transform,i===null||i===!1?this.facet=null:(this.facet=le(i===!0?"include":i,"facet",["auto","include","exclude","super"]),this.fx=e===xo&&typeof f=="string"?[f]:f,this.fy=e===xo&&typeof u=="string"?[u]:u),this.facetAnchor=px(a),n=Id(n),x!==void 0&&(n={...W8(x),...n}),o!==void 0&&(n={...ox(this,r,o),...n}),this.channels=Object.fromEntries(Object.entries(n).map(([w,v])=>{if(ba(v.value)){let{value:T,scale:I=v.scale}=v.value;v={...v,scale:I,value:T}}if(e===xo&&typeof v.value=="string"){let{value:T}=v;v={...v,value:[T]}}return[w,v]}).filter(([w,{value:v,optional:T}])=>{if(v!=null)return!0;if(T)return!1;throw new Error(`missing channel value: ${w}`)})),this.dx=+s,this.dy=+d,this.marginTop=+p,this.marginRight=+m,this.marginBottom=+h,this.marginLeft=+g,this.clip=ix(b),this.tip=G8(M),this.facet==="super"){if(f||u)throw new Error("super-faceting cannot use fx or fy");for(let w in this.channels){let{scale:v}=n[w];if(!(v!=="x"&&v!=="y"))throw new Error("super-faceting cannot use x or y")}}y!=null&&(this.render=np(y,this.render))}initialize(e,n,r){let o=kt(this.data);e===void 0&&o!=null&&(e=[ne(o)]);let i=e;this.transform!=null&&({facets:e,data:o}=this.transform(o,e,r),o=kt(o)),e!==void 0&&(e.original=i);let a=r1(this.channels,o);return this.sort!=null&&i1(o,e,a,n,this.sort),{data:o,facets:e,channels:a}}filter(e,n,r){for(let o in n){let{filter:i=Re}=n[o];if(i!==null){let a=r[o];e=e.filter(f=>i(a[f]))}}return e}project(e,n,r){for(let o in e)if(e[o].scale==="x"&&/^x|x$/.test(o)){let i=o.replace(/^x|x$/,"y");i in e&&e[i].scale==="y"&&h1(o,i,n,r.projection)}}scale(e,n,r){let o=o1(e,n);return r.projection&&this.project(e,o,r),o}};function ep(...t){return t.plot=Nt.prototype.plot,t}function np(t,e){if(t==null)return e===null?void 0:e;if(e==null)return t===null?void 0:t;if(typeof t!="function")throw new TypeError(`invalid render transform: ${t}`);if(typeof e!="function")throw new TypeError(`invalid render transform: ${e}`);return function(n,r,o,i,a,f){return t.call(this,n,r,o,i,a,(u,c,s,d,l)=>e.call(this,u,c,s,d,l,f))}}function W8(t){return Object.fromEntries(Object.entries(Id(t)).map(([e,n])=>(n=on(n),n.filter===void 0&&n.scale==null&&(n={...n,filter:null}),[e,n])))}function G8(t){return t===!0?"xy":t===!1?null:_r(t,"tip",["x","y","xy"])}function Ia(t,e){return t?.tip===!0?{...t,tip:e}:t}var mx=new WeakMap;function rp(t,e,{x:n,y:r,px:o,py:i,maxRadius:a=40,channels:f,render:u,...c}={}){return a=+a,o!=null&&(n??=null,f={...f,px:{value:o,scale:"x"}}),i!=null&&(r??=null,f={...f,py:{value:i,scale:"y"}}),{x:n,y:r,channels:f,...c,render:np(function(s,d,l,p,m,h){m={...m,pointerSticky:!1};let g=m.ownerSVGElement,{data:b}=m.getMarkState(this),x=mx.get(g);x||mx.set(g,x={sticky:!1,roots:[],renders:[]});let M=x.renders.push(Q)-1,{x:y,y:w,fx:v,fy:T}=d,I=v?v(s.fx)-p.marginLeft:0,E=T?T(s.fy)-p.marginTop:0;y?.bandwidth&&(I+=y.bandwidth()/2),w?.bandwidth&&(E+=w.bandwidth()/2);let F=s.fi!=null,_;if(F){let H=x.facetStates;H||(x.facetStates=H=new Map),_=H.get(this),_||H.set(this,_=new Map)}let[R,O]=Hn(this,p),{px:P,py:S}=l,A=P?H=>P[H]:op(l,R),N=S?H=>S[H]:ip(l,O),L,D,tt,Z;function G(H,X){if(F)if(Z&&(Z=cancelAnimationFrame(Z)),H==null)_.delete(s.fi);else{_.set(s.fi,X),Z=requestAnimationFrame(()=>{Z=null;for(let $ of _.values())if($<X){H=null;break}Q(H)});return}Q(H)}function Q(H){if(L===H&&tt===x.sticky)return;L=H,tt=m.pointerSticky=x.sticky;let X=L==null?[]:[L];F&&(X.fx=s.fx,X.fy=s.fy,X.fi=s.fi);let $=h(X,d,l,p,m);if(D){if(F){let q=D.parentNode,z=D.getAttribute("transform"),C=$.getAttribute("transform");z?$.setAttribute("transform",z):$.removeAttribute("transform"),C?q.setAttribute("transform",C):q.removeAttribute("transform"),$.removeAttribute("aria-label"),$.removeAttribute("aria-description"),$.removeAttribute("aria-hidden")}D.replaceWith($)}return x.roots[M]=D=$,m.dispatchValue(L==null?null:b[L]),$}function at(H){if(x.sticky||H.pointerType==="mouse"&&H.buttons===1)return;let[X,$]=Ms(H);X-=I,$-=E;let q=null,z=a*a;for(let C of s){let j=t*(A(C)-X),J=e*(N(C)-$),ot=j*j+J*J;ot<=z&&(q=C,z=ot)}G(q,z)}function Ut(H){H.pointerType==="mouse"&&L!=null&&(x.sticky&&x.roots.some(X=>X?.contains(H.target))||(x.sticky?(x.sticky=!1,x.renders.forEach(X=>X(null))):(x.sticky=!0,Q(L)),H.stopImmediatePropagation()))}function Fe(H){H.pointerType==="mouse"&&(x.sticky||G(null))}return g.addEventListener("pointerenter",at),g.addEventListener("pointermove",at),g.addEventListener("pointerdown",Ut),g.addEventListener("pointerleave",Fe),Q(null)},u)}}function hx(t){return rp(1,1,t)}function gx(t){return rp(1,.01,t)}function xx(t){return rp(.01,1,t)}function op({x1:t,x2:e,x:n=t},r){return t&&e?o=>(t[o]+e[o])/2:n?o=>n[o]:()=>r}function ip({y1:t,y2:e,y:n=t},r){return t&&e?o=>(t[o]+e[o])/2:n?o=>n[o]:()=>r}function Wc(t){return fn(t)&&t.interval===void 0?void 0:"tabular-nums"}function yx(t,e){let{label:n=t.label,tickSize:r=6,width:o=240,height:i=44+r,marginTop:a=18,marginRight:f=0,marginBottom:u=16+r,marginLeft:c=0,style:s,ticks:d=(o-c-f)/64,tickFormat:l,fontVariant:p=Wc(t),round:m=!0,opacity:h,className:g}=e,b=Eo(e);g=Lo(g),h=Et(h)[1],l===null&&(l=()=>null);let x=yt("svg",b).attr("class",`${g}-ramp`).attr("font-family","system-ui, sans-serif").attr("font-size",10).attr("width",o).attr("height",i).attr("viewBox",`0 0 ${o} ${i}`).call(R=>R.append("style").text(`.${g}-ramp {
+${f}`;switch(Pv(t,e,n)){case"millisecond":return Sr(o(".%L"),o(":%M:%S"),i);case"second":return Sr(o(":%S"),o("%-I:%M"),i);case"minute":return Sr(o("%-I:%M"),o("%p"),i);case"hour":return Sr(o("%-I %p"),o("%b %-d"),i);case"day":return Sr(o("%-d"),o("%b"),i);case"week":return Sr(o("%-d"),o("%b"),i);case"month":return Sr(o("%b"),o("%Y"),i);case"year":return o("%Y")}throw new Error("unable to format time ticks")}function Pv(t,e,n){let r=sn(Va(e,(u,c)=>Math.abs(c-u)||NaN));if(r>0)return ma[qe(([,u])=>u).right(ma,r,1,ma.length)-1][0];let[o,i]=Ct(t.domain()),a=typeof n=="number"?n:10,f=Math.abs(i-o)/a;return ma[qe(([,u])=>Math.log(u)).center(ma,Math.log(f))][0]}function Sr(t,e,n){return(r,o,i)=>{let a=t(r,o),f=e(r,o),u=o-vn(i);return o!==u&&i[u]!==void 0&&f===e(i[u],u)?a:n(a,f)}}var ga=Object.getPrototypeOf(Uint8Array),Ov=Object.prototype.toString;function gt(t,e,n){let r=typeof e;return r==="string"?_g(t,vd(e),n):r==="function"?_g(t,e,n):r==="number"||e instanceof Date||r==="boolean"?pt(t,Hn(e),n):typeof e?.transform=="function"?Cg(e.transform(t),n):Cg(e,n)}function _g(t,e,n){return pt(t,n?.prototype instanceof ga?Fv(e):e,n)}function Cg(t,e){return e===void 0?kt(t):t instanceof e?t:e.prototype instanceof ga&&!(t instanceof ga)?e.from(t,Md):e.from(t)}function Fv(t){return(e,n)=>Md(t(e,n))}var xo=[null],vd=t=>e=>e[t],Ec={transform:ne},wt={transform:t=>t};var Ag=()=>1,$g=()=>!0,Et=t=>t==null?t:`${t}`,ct=t=>t==null?t:+t;var xa=t=>t?t[0]:void 0,Ic=t=>t?t[1]:void 0;var Hn=t=>()=>t;function Eg(t){let e=+`${t}`.slice(1)/100;return(n,r)=>ye(n,e,r)}function Tr(t){return t instanceof ga?t:pt(t,Md,Float64Array)}function Md(t){return t==null?NaN:Number(t)}function Ig(t){return pt(t,Sd)}function Sd(t){return t instanceof Date&&!isNaN(t)?t:typeof t=="string"?pa(t):t==null||isNaN(t=+t)?void 0:new Date(t)}function ie(t,e){return t===void 0&&(t=e),t===null?[void 0,"none"]:vo(t)?[void 0,t]:[t,void 0]}function It(t,e){return t===void 0&&(t=e),t===null||typeof t=="number"?[void 0,t]:[t,void 0]}function _r(t,e,n){if(t!=null)return le(t,e,n)}function le(t,e,n){let r=`${t}`.toLowerCase();if(!n.includes(r))throw new Error(`invalid ${e}: ${t}`);return r}function kt(t){return t==null||t instanceof Array||t instanceof ga?t:Array.from(t)}function pt(t,e,n=Array){return t==null?t:t instanceof n?t.map(e):n.from(t,e)}function ya(t,e=Array){return t instanceof e?t.slice():e.from(t)}function kg({x:t,x1:e,x2:n}){return t!==void 0||e!==void 0||n!==void 0}function Td({y:t,y1:e,y2:n}){return t!==void 0||e!==void 0||n!==void 0}function Ng(t){return kg(t)||Td(t)||t.interval!==void 0}function Mn(t){return t?.toString===Ov}function yo(t){return Mn(t)&&(t.type!==void 0||t.domain!==void 0)}function ba(t){return Mn(t)&&typeof t.transform!="function"}function Cr(t){return ba(t)&&t.value===void 0&&t.channel===void 0}function Dg(t,e,n,r=wt){return e===void 0&&n===void 0?(e=0,n=t===void 0?r:t):e===void 0?e=t===void 0?0:t:n===void 0&&(n=t===void 0?0:t),[e,n]}function Ar(t,e){return t===void 0&&e===void 0?[xa,Ic]:[t,e]}function Rg({z:t,fill:e,stroke:n}={}){return t===void 0&&([t]=ie(e)),t===void 0&&([t]=ie(n)),t}function ne(t){let e=t.length,n=new Uint32Array(e);for(let r=0;r<e;++r)n[r]=r;return n}function _d(t,e){return pt(e,n=>t[n])}function Lg(t,e,n){return t.subarray?t.subarray(e,n):t.slice(e,n)}function bo(t){return t!==null&&typeof t=="object"?t.valueOf():t}function Pg(t,e){if(e[t]!==void 0)return e[t];switch(t){case"x1":case"x2":t="x";break;case"y1":case"y2":t="y";break}return e[t]}function wo(t){let e;return[{transform:()=>e,label:Le(t)},n=>e=n]}function Te(t){return t==null?[t]:wo(t)}function Le(t,e){return typeof t=="string"?t:t&&t.label!==void 0?t.label:e}function wa(t,e){return{transform(n){let r=t.transform(n),o=e.transform(n);return Yt(r)||Yt(o)?pt(r,(i,a)=>new Date((+r[a]+ +o[a])/2)):pt(r,(i,a)=>(+r[a]+ +o[a])/2,Float64Array)},label:t.label}}function va(t,e){let n=Cd(e?.interval,e?.type);return n?pt(t,n):t}function Cd(t,e){let n=kc(t,e);return n&&(r=>Re(r)?n.floor(r):r)}function kc(t,e){if(t!=null){if(typeof t=="number"){0<t&&t<1&&Number.isInteger(1/t)&&(t=-1/t);let n=Math.abs(t);return t<0?{floor:r=>Math.floor(r*n)/n,offset:r=>(r*n+1)/n,range:(r,o)=>er(Math.ceil(r*n),o*n).map(i=>i/n)}:{floor:r=>Math.floor(r/n)*n,offset:r=>r+n,range:(r,o)=>er(Math.ceil(r/n),o/n).map(i=>i*n)}}if(typeof t=="string")return(e==="time"?vg:$c)(t);if(typeof t.floor!="function")throw new Error("invalid interval; missing floor method");if(typeof t.offset!="function")throw new Error("invalid interval; missing offset method");return t}}function rn(t,e){if(t=kc(t,e),t&&typeof t.range!="function")throw new Error("invalid interval: missing range method");return t}function Og(t,e){if(t=rn(t,e),t&&typeof t.ceil!="function")throw new Error("invalid interval: missing ceil method");return t}function on(t){return t===void 0||ba(t)?t:{value:t}}function Fg(t){return t==null?null:{transform:e=>gt(e,t,Float64Array),label:Le(t)}}function re(t){return t&&typeof t[Symbol.iterator]=="function"}function Nc(t){for(let e of t)if(e!=null)return typeof e!="object"||e instanceof Date}function Ad(t){for(let e of t){if(e==null)continue;let n=typeof e;return n==="string"||n==="boolean"}}function Yt(t){for(let e of t)if(e!=null)return e instanceof Date}function qg(t){for(let e of t)if(e!=null)return typeof e=="string"&&isNaN(e)&&pa(e)}function zg(t){for(let e of t)if(e!=null){if(typeof e!="string")return!1;if(e.trim())return!isNaN(e)}}function Yg(t){for(let e of t)if(e!=null)return typeof e=="number"}function Dc(t,e){let n;for(let r of t)if(r!=null){if(!e(r))return!1;n=!0}return n}function vo(t){return typeof t!="string"?!1:(t=t.toLowerCase().trim(),t==="none"||t==="currentcolor"||t.startsWith("url(")&&t.endsWith(")")||t.startsWith("var(")&&t.endsWith(")")||ue(t)!==null)}function Bg(t){return typeof t=="number"&&(0<=t&&t<=1||isNaN(t))}function Pt(t){return t==null||$r(t)}function $r(t){return/^\s*none\s*$/i.test(t)}function Ug(t){return/^\s*round\s*$/i.test(t)}function $d(t,e){return _r(t,e,["middle","top-left","top","top-right","right","bottom-right","bottom","bottom-left","left"])}function Mo(t="middle"){return $d(t,"frameAnchor")}function vn(t){if(t==null)return;let e=t[0],n=t[t.length-1];return xe(e,n)}function Xg(t={},...e){let n=t;for(let r of e)for(let o in r)if(n[o]===void 0){let i=r[o];n===t?n={...n,[o]:i}:n[o]=i}return n}function qv(t){console.warn("named iterables are deprecated; please use an object instead");let e=new Set;return Object.fromEntries(Array.from(t,n=>{let{name:r}=n;if(r==null)throw new Error("missing name");let o=`${r}`;if(o==="__proto__")throw new Error(`illegal name: ${o}`);if(e.has(o))throw new Error(`duplicate name: ${o}`);return e.add(o),[r,n]}))}function Ed(t){return re(t)?qv(t):t}var de=Symbol("position"),pe=Symbol("color"),So=Symbol("radius"),To=Symbol("length"),_o=Symbol("opacity"),Co=Symbol("symbol"),zv=Symbol("projection"),st=new Map([["x",de],["y",de],["fx",de],["fy",de],["r",So],["color",pe],["opacity",_o],["symbol",Co],["length",To],["projection",zv]]);var Yv=Math.sqrt(3),Bv=2/Yv,Uv={draw(t,e){let n=Math.sqrt(e/Math.PI),r=n*Bv,o=r/2;t.moveTo(0,r),t.lineTo(n,o),t.lineTo(n,-o),t.lineTo(0,-r),t.lineTo(-n,-o),t.lineTo(-n,o),t.closePath()}},Hg=new Map([["asterisk",ea],["circle",ho],["cross",na],["diamond",ra],["diamond2",oa],["hexagon",Uv],["plus",ia],["square",aa],["square2",fa],["star",ua],["times",go],["triangle",ca],["triangle2",sa],["wye",la]]);function Wg(t){return t&&typeof t.draw=="function"}function Gg(t){return Wg(t)?!0:typeof t!="string"?!1:Hg.has(t.toLowerCase())}function Ao(t){if(t==null||Wg(t))return t;let e=Hg.get(`${t}`.toLowerCase());if(e)return e;throw new Error(`invalid symbol: ${t}`)}function $o({filter:t,sort:e,reverse:n,transform:r,initializer:o,...i}={},a){if(r===void 0&&(t!=null&&(r=Vg(t)),e!=null&&!Cr(e)&&(r=Id(r,Zg(e))),n&&(r=Id(r,jg))),a!=null&&o!=null)throw new Error("transforms cannot be applied after initializers");return{...i,...(e===null||Cr(e))&&{sort:e},transform:Id(r,a)}}function Er({filter:t,sort:e,reverse:n,initializer:r,...o}={},i){return r===void 0&&(t!=null&&(r=Vg(t)),e!=null&&!Cr(e)&&(r=kd(r,Zg(e))),n&&(r=kd(r,jg))),{...o,...(e===null||Cr(e))&&{sort:e},initializer:kd(r,i)}}function Id(t,e){return t==null?e===null?void 0:e:e==null?t===null?void 0:t:function(n,r,o){return{data:n,facets:r}=t.call(this,n,r,o),e.call(this,kt(n),r,o)}}function kd(t,e){return t==null?e===null?void 0:e:e==null?t===null?void 0:t:function(n,r,o,...i){let a,f,u,c,s,d;return{data:f=n,facets:u=r,channels:a}=t.call(this,n,r,o,...i),{data:s=f,facets:d=u,channels:c}=e.call(this,f,u,{...o,...a},...i),{data:s,facets:d,channels:{...a,...c}}}}function Vg(t){return(e,n)=>{let r=gt(e,t);return{data:e,facets:n.map(o=>o.filter(i=>r[i]))}}}function jg(t,e){return{data:t,facets:e.map(n=>n.slice().reverse())}}function Zg(t){return(typeof t=="function"&&t.length!==1?Xv:Hv)(t)}function Xv(t){return(e,n)=>{let r=(o,i)=>t(e[o],e[i]);return{data:e,facets:n.map(o=>o.slice().sort(r))}}}function Hv(t){let e,n;({channel:e,value:t,order:n}={...on(t)});let r=e?.startsWith("-");if(r&&(e=e.slice(1)),n===void 0&&(n=r?Mr:Kt),typeof n!="function")switch(`${n}`.toLowerCase()){case"ascending":n=Kt;break;case"descending":n=Mr;break;default:throw new Error(`invalid order: ${n}`)}return(o,i,a)=>{let f;if(e===void 0)f=gt(o,t);else{if(a===void 0)throw new Error("channel sort requires an initializer");if(f=a[e],!f)return{};f=f.value}let u=(c,s)=>n(f[c],f[s]);return{data:o,facets:i.map(c=>c.slice().sort(u))}}}function Sa(t,...e){for(let{name:n}of t)if(e.includes(n))return!0;return!1}function Jg(t,e,n=Nd){let r=Object.entries(t);return e.title!=null&&t.title===void 0&&r.push(["title",Zv]),e.href!=null&&t.href===void 0&&r.push(["href",Pd]),r.filter(([,o])=>o!==void 0).map(([o,i])=>i===null?Wv(o):n(o,i,e))}function Nd(t,e,n,r=Dd){let o;Mn(e)&&"reduce"in e&&(o=e.scale,e=e.reduce);let i=r(t,e,n),[a,f]=wo(i.label),u;return{name:t,output:o===void 0?a:{value:a,scale:o},initialize(c){i.initialize(c),u=f([])},scope(c,s){i.scope(c,s)},reduce(c,s){u.push(i.reduce(c,s))}}}function Wv(t){return{name:t,initialize(){},scope(){},reduce(){}}}function Dd(t,e,n,r=Ta){let o=Pg(t,n),i=r(e,o),a,f;return{label:Le(i===Ma?null:o,i.label),initialize(u){a=o===void 0?u:gt(u,o),i.scope==="data"&&(f=i.reduceIndex(ne(u),a))},scope(u,c){i.scope===u&&(f=i.reduceIndex(c,a))},reduce(u,c){return i.scope==null?i.reduceIndex(u,a,c):i.reduceIndex(u,a,f,c)}}}function Rd(t,e){return e?ze(cn(t,n=>e[n]),xa):[[,t]]}function Ta(t,e,n=Gv){if(t==null)return n(t);if(typeof t.reduceIndex=="function")return t;if(typeof t.reduce=="function"&&Mn(t))return Vv(t);if(typeof t=="function")return jv(t);if(/^p\d{2}$/i.test(t))return Sn(Eg(t));switch(`${t}`.toLowerCase()){case"first":return Pd;case"last":return Kv;case"identity":return Ld;case"count":return Ma;case"distinct":return Qv;case"sum":return e==null?Ma:Jv;case"proportion":return Qg(e,"data");case"proportion-facet":return Qg(e,"facet");case"deviation":return Sn(Lr);case"min":return Sn(Jt);case"min-index":return Sn(Ua);case"max":return Sn(Ht);case"max-index":return Sn(Ba);case"mean":return Kg(Wa);case"median":return Kg(sn);case"variance":return Sn(Rr);case"mode":return Sn(Ga)}return n(t)}function Gv(t){throw new Error(`invalid reduce: ${t}`)}function t1(t,e){for(let n in e){let r=e[n];if(r!==void 0&&!t.some(o=>o.name===n))return r}}function e1(t,e,n){if(e){let r=e.output.transform(),o=(i,a)=>Kt(r[i],r[a]);t.forEach(i=>i.sort(o))}n&&t.forEach(r=>r.reverse())}function Vv(t){return console.warn("deprecated reduce interface; implement reduceIndex instead."),{...t,reduceIndex:t.reduce.bind(t)}}function jv(t){return{reduceIndex(e,n,r){return t(_d(n,e),r)}}}function Sn(t){return{reduceIndex(e,n){return t(e,r=>n[r])}}}function Kg(t){return{reduceIndex(e,n){let r=t(e,o=>n[o]);return Yt(n)?new Date(r):r}}}var Ld={reduceIndex(t,e){return _d(e,t)}},Pd={reduceIndex(t,e){return e[t[0]]}},Zv={reduceIndex(t,e){let r=ze(Ae(t,i=>i.length,i=>e[i]),Ic),o=r.slice(-5).reverse();if(o.length<r.length){let i=r.slice(0,-4);o[5-1]=[`\u2026 ${i.length.toLocaleString("en-US")} more`,fe(i,Ic)]}return o.map(([i,a])=>`${i} (${a.toLocaleString("en-US")})`).join(`
+`)}},Kv={reduceIndex(t,e){return e[t[t.length-1]]}},Ma={label:"Frequency",reduceIndex(t){return t.length}},Qv={label:"Distinct",reduceIndex(t,e){let n=new Ce;for(let r of t)n.add(e[r]);return n.size}},Jv=Sn(fe);function Qg(t,e){return t==null?{scope:e,label:"Frequency",reduceIndex:(n,r,o=1)=>n.length/o}:{scope:e,reduceIndex:(n,r,o=1)=>fe(n,i=>r[i])/o}}function Eo(t,{scale:e,type:n,value:r,filter:o,hint:i},a){return i===void 0&&typeof r?.transform=="function"&&(i=r.hint),Fd(a,{scale:e,type:n,value:gt(t,r),label:Le(r),filter:o,hint:i})}function r1(t,e){return Object.fromEntries(Object.entries(t).map(([n,r])=>[n,Eo(e,r,n)]))}function o1(t,e){let n=Object.fromEntries(Object.entries(t).map(([r,{scale:o,value:i}])=>{let a=o==null?null:e[o];return[r,a==null?i:pt(i,a)]}));return n.channels=t,n}function Fd(t,e){let{scale:n,value:r}=e;if(n===!0||n==="auto")switch(t){case"fill":case"stroke":case"color":e.scale=n!==!0&&Dc(r,vo)?null:"color";break;case"fillOpacity":case"strokeOpacity":case"opacity":e.scale=n!==!0&&Dc(r,Bg)?null:"opacity";break;case"symbol":n!==!0&&Dc(r,Gg)?(e.scale=null,e.value=pt(r,Ao)):e.scale="symbol";break;default:e.scale=st.has(t)?t:null;break}else if(n===!1)e.scale=null;else if(n!=null&&!st.has(n))throw new Error(`unknown scale: ${n}`);return e}function i1(t,e,n,r,o){let{order:i,reverse:a,reduce:f=!0,limit:u}=o;for(let c in o){if(!st.has(c))continue;let{value:s,order:d=i,reverse:l=a,reduce:p=f,limit:m=u}=on(o[c]),h=s?.startsWith("-");if(h&&(s=s.slice(1)),d=d===void 0?h!==(s==="width"||s==="height")?f1:a1:n8(d),p==null||p===!1)continue;let g=c==="fx"||c==="fy"?e8(e,r[c]):t8(n,c);if(!g)throw new Error(`missing channel for scale: ${c}`);let b=g.value,[x=0,M=1/0]=re(m)?m:m<0?[m]:[0,m];if(s==null)g.domain=()=>{let y=Array.from(new Ce(b));return l&&(y=y.reverse()),(x!==0||M!==1/0)&&(y=y.slice(x,M)),y};else{let y=s==="data"?t:s==="height"?n1(n,"y1","y2"):s==="width"?n1(n,"x1","x2"):Od(n,s,s==="y"?"y2":s==="x"?"x2":void 0),w=Ta(p===!0?"max":p,y);g.domain=()=>{let v=cs(ne(b),T=>w.reduceIndex(T,y),T=>b[T]);return d&&v.sort(d),l&&v.reverse(),(x!==0||M!==1/0)&&(v=v.slice(x,M)),v.map(xa)}}}}function t8(t,e){for(let n in t){let r=t[n];if(r.scale===e)return r}}function e8(t,e){let n=t.original;if(n===t)return e;let r=e.value,o=e.value=[];for(let i=0;i<n.length;++i){let a=r[n[i][0]];for(let f of t[i])o[f]=a}return e}function n1(t,e,n){let r=Od(t,e),o=Od(t,n);return pt(o,(i,a)=>Math.abs(i-r[a]),Float64Array)}function Od(t,e,n){let r=t[e];if(!r&&n!==void 0&&(r=t[n]),r)return r.value;throw new Error(`missing channel: ${e}`)}function n8(t){if(t==null||typeof t=="function")return t;switch(`${t}`.toLowerCase()){case"ascending":return a1;case"descending":return f1}throw new Error(`invalid order: ${t}`)}function a1([t,e],[n,r]){return Kt(e,r)||Kt(t,n)}function f1([t,e],[n,r]){return Mr(e,r)||Kt(t,n)}function u1(t,e){let n=t[e];if(n){for(;n.source;)n=n.source;return n.source===null?null:n}}function Io(t={}){let{document:e=typeof window<"u"?window.document:void 0}=t;return{document:e}}function yt(t,{document:e}){return mn(dn(t).call(e.documentElement))}var qd=0;function c1(){let t=qd;return qd=0,t}function an(t){console.warn(t),++qd}var l1=Math.PI,Tn=2*l1,s1=.618;function d1({projection:t,inset:e=0,insetTop:n=e,insetRight:r=e,insetBottom:o=e,insetLeft:i=e}={},a){if(t==null)return;if(typeof t.stream=="function")return t;let f,u,c="frame";if(Mn(t)){let w;if({type:t,domain:u,inset:w,insetTop:n=w!==void 0?w:n,insetRight:r=w!==void 0?w:r,insetBottom:o=w!==void 0?w:o,insetLeft:i=w!==void 0?w:i,clip:c=c,...f}=t,t==null)return}typeof t!="function"&&({type:t}=p1(t));let{width:s,height:d,marginLeft:l,marginRight:p,marginTop:m,marginBottom:h}=a,g=s-l-p-i-r,b=d-m-h-n-o;if(t=t?.({width:g,height:b,clip:c,...f}),t==null)return;c=r8(c,l,m,s-p,d-h);let x=l+i,M=m+n,y;if(u!=null){let[[w,v],[T,E]]=Ci(t).bounds(u),I=Math.min(g/(T-w),b/(E-v));I>0?(x-=(I*(w+T)-g)/2,M-=(I*(v+E)-b)/2,y=Ai({point(F,_){this.stream.point(F*I+x,_*I+M)}})):an("Warning: the projection could not be fit to the specified domain; using the default scale.")}return y??=x===0&&M===0?m1():Ai({point(w,v){this.stream.point(w+x,v+M)}}),{stream:w=>t.stream(y.stream(c(w)))}}function p1(t){switch(`${t}`.toLowerCase()){case"albers-usa":return Pe(wl,.7463,.4673);case"albers":return Rc(Ei,.7463,.4673);case"azimuthal-equal-area":return Pe(Ml,4,4);case"azimuthal-equidistant":return Pe(Tl,Tn,Tn);case"conic-conformal":return Rc(Al,Tn,Tn);case"conic-equal-area":return Rc(Dn,6.1702,2.9781);case"conic-equidistant":return Rc(El,7.312,3.6282);case"equal-earth":return Pe(kl,5.4133,2.6347);case"equirectangular":return Pe($l,Tn,l1);case"gnomonic":return Pe(Dl,3.4641,3.4641);case"identity":return{type:m1};case"reflect-y":return{type:o8};case"mercator":return Pe(_l,Tn,Tn);case"orthographic":return Pe(Ll,2,2);case"stereographic":return Pe(Ol,2,2);case"transverse-mercator":return Pe(ql,Tn,Tn);default:throw new Error(`unknown projection type: ${t}`)}}function r8(t,e,n,r,o){if(t===!1||t==null||typeof t=="number")return i=>i;switch(t===!0&&(t="frame"),`${t}`.toLowerCase()){case"frame":return Qr(e,n,r,o);default:throw new Error(`unknown projection clip type: ${t}`)}}function Pe(t,e,n){return{type:({width:r,height:o,rotate:i,precision:a=.15,clip:f})=>{let u=t();return a!=null&&u.precision?.(a),i!=null&&u.rotate?.(i),typeof f=="number"&&u.clipAngle?.(f),u.scale(Math.min(r/e,o/n)),u.translate([r/2,o/2]),u},aspectRatio:n/e}}function Rc(t,e,n){let{type:r,aspectRatio:o}=Pe(t,e,n);return{type:i=>{let{parallels:a,domain:f,width:u,height:c}=i,s=r(i);return a!=null&&(s.parallels(a),f===void 0&&s.fitSize([u,c],{type:"Sphere"})),s},aspectRatio:o}}var m1=Hn({stream:t=>t}),o8=Hn(Ai({point(t,e){this.stream.point(t,-e)}}));function h1(t,e,n,r){let o=n[t],i=n[e],a=o.length,f=n[t]=new Float64Array(a).fill(NaN),u=n[e]=new Float64Array(a).fill(NaN),c,s=r.stream({point(d,l){f[c]=d,u[c]=l}});for(c=0;c<a;++c)s.point(o[c],i[c])}function g1({projection:t}={}){return t==null?!1:typeof t.stream=="function"?!0:(Mn(t)&&(t=t.type),t!=null)}function x1(t){if(typeof t?.stream=="function")return s1;if(Mn(t)&&(t=t.type),t!=null){if(typeof t!="function"){let{aspectRatio:e}=p1(t);if(e)return e}return s1}}function y1(t){let e=[],n=[],r={scale:"x",value:e},o={scale:"y",value:n},i={point(a,f){e.push(a),n.push(f)},lineStart(){},lineEnd(){},polygonStart(){},polygonEnd(){},sphere(){}};for(let a of t.value)ke(a,i);return[r,o]}var S1=new Map([["accent",rd],["category10",nd],["dark2",od],["paired",id],["pastel1",ad],["pastel2",fd],["set1",ud],["set2",cd],["set3",sd],["tableau10",ld]]);function T1(t){return t!=null&&S1.has(`${t}`.toLowerCase())}var b1=new Map([...S1,["brbg",_n(pu,mu)],["prgn",_n(hu,gu)],["piyg",_n(xu,yu)],["puor",_n(bu,wu)],["rdbu",_n(Qi,so)],["rdgy",_n(vu,Mu)],["rdylbu",_n(Ji,lo)],["rdylgn",_n(Su,Tu)],["spectral",_n(_u,Cu)],["burd",w1(Qi,so)],["buylrd",w1(Ji,lo)],["blues",Ot(Ku,Qu)],["greens",Ot(Ju,tc)],["greys",Ot(ec,nc)],["oranges",Ot(fc,uc)],["purples",Ot(rc,oc)],["reds",Ot(ic,ac)],["turbo",Cn(xc)],["viridis",Cn(bc)],["magma",Cn(wc)],["inferno",Cn(vc)],["plasma",Cn(Mc)],["cividis",Cn(cc)],["cubehelix",Cn(sc)],["warm",Cn(dc)],["cool",Cn(pc)],["bugn",Ot(Au,$u)],["bupu",Ot(Eu,Iu)],["gnbu",Ot(ku,Nu)],["orrd",Ot(Du,Ru)],["pubu",Ot(Ou,Fu)],["pubugn",Ot(Lu,Pu)],["purd",Ot(qu,zu)],["rdpu",Ot(Yu,Bu)],["ylgn",Ot(Hu,Wu)],["ylgnbu",Ot(Uu,Xu)],["ylorbr",Ot(Gu,Vu)],["ylorrd",Ot(ju,Zu)],["rainbow",v1(mc)],["sinebow",v1(gc)]]);function Ot(t,e){return({length:n})=>n===1?[t[3][1]]:n===2?[t[3][1],t[3][2]]:(n=Math.max(3,Math.floor(n)),n>9?Wt(e,n):t[n])}function _n(t,e){return({length:n})=>n===2?[t[3][0],t[3][2]]:(n=Math.max(3,Math.floor(n)),n>11?Wt(e,n):t[n])}function w1(t,e){return({length:n})=>n===2?[t[3][2],t[3][0]]:(n=Math.max(3,Math.floor(n)),n>11?Wt(r=>e(1-r),n):t[n].slice().reverse())}function Cn(t){return({length:e})=>Wt(t,Math.max(2,Math.floor(e)))}function v1(t){return({length:e})=>Wt(t,Math.floor(e)+1).slice(0,-1)}function zd(t){let e=`${t}`.toLowerCase();if(!b1.has(e))throw new Error(`unknown ordinal scheme: ${e}`);return b1.get(e)}function _a(t,e){let n=zd(t),r=typeof n=="function"?n({length:e}):n;return r.length!==e?r.slice(0,e):r}function _1(t,e="greys"){let n=new Set,[r,o]=_a(e,2);for(let i of t)if(i!=null)if(i===!0)n.add(o);else if(i===!1)n.add(r);else return;return[...n]}var M1=new Map([["brbg",mu],["prgn",gu],["piyg",yu],["puor",wu],["rdbu",so],["rdgy",Mu],["rdylbu",lo],["rdylgn",Tu],["spectral",Cu],["burd",t=>so(1-t)],["buylrd",t=>lo(1-t)],["blues",Qu],["greens",tc],["greys",nc],["purples",oc],["reds",ac],["oranges",uc],["turbo",xc],["viridis",bc],["magma",wc],["inferno",vc],["plasma",Mc],["cividis",cc],["cubehelix",sc],["warm",dc],["cool",pc],["bugn",$u],["bupu",Iu],["gnbu",Nu],["orrd",Ru],["pubugn",Pu],["pubu",Fu],["purd",zu],["rdpu",Bu],["ylgnbu",Xu],["ylgn",Wu],["ylorbr",Vu],["ylorrd",Zu],["rainbow",mc],["sinebow",gc]]);function ko(t){let e=`${t}`.toLowerCase();if(!M1.has(e))throw new Error(`unknown quantitative scheme: ${e}`);return M1.get(e)}var i8=new Set(["brbg","prgn","piyg","puor","rdbu","rdgy","rdylbu","rdylgn","spectral","burd","buylrd"]);function C1(t){return t!=null&&i8.has(`${t}`.toLowerCase())}var Bd=t=>e=>t(1-e),Yd=[0,1],A1=new Map([["number",ht],["rgb",we],["hsl",Os],["hcl",Fs],["lab",df]]);function Ud(t){let e=`${t}`.toLowerCase();if(!A1.has(e))throw new Error(`unknown interpolator: ${e}`);return A1.get(e)}function Do(t,e,n,{type:r,nice:o,clamp:i,zero:a,domain:f=L1(t,n),unknown:u,round:c,scheme:s,interval:d,range:l=st.get(t)===So?c8(n,f):st.get(t)===To?s8(n,f):st.get(t)===_o?Yd:void 0,interpolate:p=st.get(t)===pe?s==null&&l!==void 0?we:ko(s!==void 0?s:r==="cyclical"?"rainbow":"turbo"):c?fr:ht,reverse:m}){if(d=rn(d,r),(r==="cyclical"||r==="sequential")&&(r="linear"),typeof p!="function"&&(p=Ud(p)),m=!!m,l!==void 0){let h=(f=kt(f)).length,g=(l=kt(l)).length;if(h!==g){if(p.length===1)throw new Error("invalid piecewise interpolator");p=He(p,l),l=void 0}}if(p.length===1?(m&&(p=Bd(p),m=!1),l===void 0&&(l=Float64Array.from(f,(h,g)=>g/(f.length-1)),l.length===2&&(l=Yd)),e.interpolate((l===Yd?Hn:Ca)(p))):e.interpolate(p),a){let[h,g]=Ct(f);(h>0||g<0)&&(f=ya(f),vn(f)!==Math.sign(h)?f[f.length-1]=0:f[0]=0)}return m&&(f=An(f)),e.domain(f).unknown(u),o&&(e.nice(a8(o,r)),f=e.domain()),l!==void 0&&e.range(l),i&&e.clamp(i),{type:r,domain:f,range:l,scale:e,interpolate:p,interval:d}}function a8(t,e){return t===!0?void 0:typeof t=="number"?t:Og(t,e)}function $1(t,e,n){return Do(t,hr(),e,n)}function E1(t,e,n){return Xd(t,e,{...n,exponent:.5})}function Xd(t,e,{exponent:n=1,...r}){return Do(t,Yi().exponent(n),e,{...r,type:"pow"})}function I1(t,e,{base:n=10,domain:r=l8(e),...o}){return Do(t,qi().base(n),e,{...o,domain:r})}function k1(t,e,{constant:n=1,...r}){return Do(t,zi().constant(n),e,r)}function N1(t,e,{range:n,quantiles:r=n===void 0?5:(n=[...n]).length,n:o=r,scheme:i="rdylbu",domain:a=d8(e),unknown:f,interpolate:u,reverse:c}){return n===void 0&&(n=u!==void 0?Wt(u,o):st.get(t)===pe?_a(i,o):void 0),a.length>0&&(a=Bi(a,n===void 0?{length:o}:n).quantiles()),Lc(t,e,{domain:a,range:n,reverse:c,unknown:f})}function D1(t,e,{range:n,n:r=n===void 0?5:(n=[...n]).length,scheme:o="rdylbu",domain:i=L1(t,e),unknown:a,interpolate:f,reverse:u}){let[c,s]=Ct(i),d;return n===void 0?(d=$e(c,s,r),d[0]<=c&&d.splice(0,1),d[d.length-1]>=s&&d.pop(),r=d.length+1,n=f!==void 0?Wt(f,r):st.get(t)===pe?_a(o,r):void 0):(d=Wt(ht(c,s),r+1).slice(1,-1),c instanceof Date&&(d=d.map(l=>new Date(l)))),vn(kt(i))<0&&d.reverse(),Lc(t,e,{domain:d,range:n,reverse:u,unknown:a})}function Lc(t,e,{domain:n=[0],unknown:r,scheme:o="rdylbu",interpolate:i,range:a=i!==void 0?Wt(i,n.length+1):st.get(t)===pe?_a(o,n.length+1):void 0,reverse:f}){n=kt(n);let u=vn(n);if(!isNaN(u)&&!f8(n,u))throw new Error(`the ${t} scale has a non-monotonic domain`);return f&&(a=An(a)),{type:"threshold",scale:Ui(u<0?An(n):n,a===void 0?[]:a).unknown(r),domain:n,range:a}}function f8(t,e){for(let n=1,r=t.length,o=t[0];n<r;++n){let i=xe(o,o=t[n]);if(i!==0&&i!==e)return!1}return!0}function R1(){return{type:"identity",scale:Oi()}}function No(t,e=yd){return t.length?[Jt(t,({value:n})=>n===void 0?n:Jt(n,e)),Ht(t,({value:n})=>n===void 0?n:Ht(n,e))]:[0,1]}function L1(t,e){let n=st.get(t);return(n===So||n===_o||n===To?u8:No)(e)}function u8(t){return[0,t.length?Ht(t,({value:e})=>e===void 0?e:Ht(e,yd)):1]}function c8(t,e){let n=t.find(({radius:a})=>a!==void 0);if(n!==void 0)return[0,n.radius];let r=ye(t,.5,({value:a})=>a===void 0?NaN:ye(a,.25,da)),o=e.map(a=>3*Math.sqrt(a/r)),i=30/Ht(o);return i<1?o.map(a=>a*i):o}function s8(t,e){let n=sn(t,({value:i})=>i===void 0?NaN:sn(i,Math.abs)),r=e.map(i=>12*i/n),o=60/Ht(r);return o<1?r.map(i=>i*o):r}function l8(t){for(let{value:e}of t)if(e!==void 0)for(let n of e){if(n>0)return No(t,da);if(n<0)return No(t,_c)}return[1,10]}function d8(t){let e=[];for(let{value:n}of t)if(n!==void 0)for(let r of n)e.push(r);return e}function Ca(t){return(e,n)=>r=>t(e+r*(n-e))}function Pc(t,e,n,r,{type:o,nice:i,clamp:a,domain:f=No(r),unknown:u,pivot:c=0,scheme:s,range:d,symmetric:l=!0,interpolate:p=st.get(t)===pe?s==null&&d!==void 0?we:ko(s!==void 0?s:"rdbu"):ht,reverse:m}){c=+c,f=kt(f);let[h,g]=f;if(f.length>2&&an(`Warning: the diverging ${t} scale domain contains extra elements.`),xe(h,g)<0&&([h,g]=[g,h],m=!m),h=Math.min(h,c),g=Math.max(g,c),typeof p!="function"&&(p=Ud(p)),d!==void 0&&(p=p.length===1?Ca(p)(...d):He(p,d)),m&&(p=Bd(p)),l){let b=n.apply(c),x=b-n.apply(h),M=n.apply(g)-b;x<M?h=n.invert(b-M):x>M&&(g=n.invert(b+x))}return e.domain([h,c,g]).unknown(u).interpolator(p),a&&e.clamp(a),i&&e.nice(i),{type:o,domain:[h,g],pivot:c,interpolate:p,scale:e}}function P1(t,e,n){return Pc(t,Ki(),p8,e,n)}function O1(t,e,n){return Hd(t,e,{...n,exponent:.5})}function Hd(t,e,{exponent:n=1,...r}){return Pc(t,du().exponent(n=+n),g8(n),e,{...r,type:"diverging-pow"})}function F1(t,e,{base:n=10,pivot:r=1,domain:o=No(e,r<0?_c:da),...i}){return Pc(t,su().base(n=+n),m8,e,{domain:o,pivot:r,...i})}function q1(t,e,{constant:n=1,...r}){return Pc(t,lu().constant(n=+n),x8(n),e,r)}var p8={apply(t){return t},invert(t){return t}},m8={apply:Math.log,invert:Math.exp},h8={apply(t){return Math.sign(t)*Math.sqrt(Math.abs(t))},invert(t){return Math.sign(t)*(t*t)}};function g8(t){return t===.5?h8:{apply(e){return Math.sign(e)*Math.pow(Math.abs(e),t)},invert(e){return Math.sign(e)*Math.pow(Math.abs(e),1/t)}}}function x8(t){return{apply(e){return Math.sign(e)*Math.log1p(Math.abs(e/t))},invert(e){return Math.sign(e)*Math.expm1(Math.abs(e))*t}}}function z1(t,e,n,r){return Do(t,e,n,r)}function Y1(t,e,n){return z1(t,fu(),e,n)}function B1(t,e,n){return z1(t,uu(),e,n)}var Ro=Symbol("ordinal");function X1(t,e,n,{type:r,interval:o,domain:i,range:a,reverse:f,hint:u}){return o=rn(o,r),i===void 0&&(i=j1(n,o,t)),(r==="categorical"||r===Ro)&&(r="ordinal"),f&&(i=An(i)),e.domain(i),a!==void 0&&(typeof a=="function"&&(a=a(i)),e.range(a)),{type:r,domain:i,range:a,scale:e,hint:u,interval:o}}function H1(t,e,{type:n,interval:r,domain:o,range:i,scheme:a,unknown:f,...u}){r=rn(r,n),o===void 0&&(o=j1(e,r,t));let c;if(st.get(t)===Co)c=y8(e),i=i===void 0?b8(c):pt(i,Ao);else if(st.get(t)===pe&&(i===void 0&&(n==="ordinal"||n===Ro)&&(i=_1(o,a),i!==void 0&&(a=void 0)),a===void 0&&i===void 0&&(a=n==="ordinal"?"turbo":"tableau10"),a!==void 0))if(i!==void 0){let s=ko(a),d=i[0],l=i[1]-i[0];i=({length:p})=>Wt(m=>s(d+l*m),p)}else i=zd(a);if(f===Li)throw new Error(`implicit unknown on ${t} scale is not supported`);return X1(t,pr().unknown(f),e,{...u,type:n,domain:o,range:i,hint:c})}function W1(t,e,{align:n=.5,padding:r=.5,...o}){return V1(zl().align(n).padding(r),e,o,t)}function G1(t,e,{align:n=.5,padding:r=.1,paddingInner:o=r,paddingOuter:i=t==="fx"||t==="fy"?0:r,...a}){return V1(Rn().align(n).paddingInner(o).paddingOuter(i),e,a,t)}function V1(t,e,n,r){let{round:o}=n;return o!==void 0&&t.round(o=!!o),t=X1(r,t,e,n),t.round=o,t}function j1(t,e,n){let r=new Ce;for(let{value:o,domain:i}of t){if(i!==void 0)return i();if(o!==void 0)for(let a of o)r.add(a)}if(e!==void 0){let[o,i]=Ct(r).map(e.floor,e);return e.range(o,e.offset(i))}if(r.size>1e4&&st.get(n)===de)throw new Error(`implicit ordinal domain of ${n} scale has more than 10,000 values`);return ze(r,Kt)}function U1(t,e){let n;for(let{hint:r}of t){let o=r?.[e];if(o!==void 0){if(n===void 0)n=o;else if(n!==o)return}}return n}function y8(t){return{fill:U1(t,"fill"),stroke:U1(t,"stroke")}}function b8(t){return Pt(t.fill)?hd:Sc}function Aa(t,{label:e,inset:n=0,insetTop:r=n,insetRight:o=n,insetBottom:i=n,insetLeft:a=n,round:f,nice:u,clamp:c,zero:s,align:d,padding:l,projection:p,facet:{label:m=e}={},...h}={}){let g={};for(let[b,x]of t){let M=h[b],y=M8(b,x,{round:st.get(b)===de?f:void 0,nice:u,clamp:c,zero:s,align:d,padding:l,projection:p,...M});if(y){let{label:w=b==="fx"||b==="fy"?m:e,percent:v,transform:T,inset:E,insetTop:I=E!==void 0?E:b==="y"?r:0,insetRight:F=E!==void 0?E:b==="x"?o:0,insetBottom:_=E!==void 0?E:b==="y"?i:0,insetLeft:R=E!==void 0?E:b==="x"?a:0}=M||{};if(T==null)T=void 0;else if(typeof T!="function")throw new Error("invalid scale transform; not a function");y.percent=!!v,y.label=w===void 0?w8(x,y):w,y.transform=T,b==="x"||b==="fx"?(y.insetLeft=+R,y.insetRight=+F):(b==="y"||b==="fy")&&(y.insetTop=+I,y.insetBottom=+_),g[b]=y}}return g}function Gd(t){return Object.fromEntries(Object.entries(t).filter(([,{scale:e}])=>e).map(([e,{scale:n,type:r,interval:o,label:i}])=>(n.type=r,o!=null&&(n.interval=o),i!=null&&(n.label=i),[e,n])))}function J1(t,e){let{x:n,y:r,fx:o,fy:i}=t,a=o||i?Fc(e):e;o&&Z1(o,a),i&&K1(i,a);let f=o||i?Vd(t,e):e;n&&Z1(n,f),r&&K1(r,f)}function w8(t=[],e){let n;for(let{label:r}of t)if(r!==void 0){if(n===void 0)n=r;else if(n!==r)return}if(n!==void 0)return!fn(e)&&e.percent&&(n=`${n} (%)`),{inferred:!0,toString:()=>n}}function Fc(t){let{marginTop:e,marginRight:n,marginBottom:r,marginLeft:o,width:i,height:a,facet:{marginTop:f,marginRight:u,marginBottom:c,marginLeft:s}}=t;return{marginTop:Math.max(e,f),marginRight:Math.max(n,u),marginBottom:Math.max(r,c),marginLeft:Math.max(o,s),width:i,height:a}}function Vd({fx:t,fy:e},n){let{marginTop:r,marginRight:o,marginBottom:i,marginLeft:a,width:f,height:u}=Fc(n);return{marginTop:r,marginRight:o,marginBottom:i,marginLeft:a,width:t?t.scale.bandwidth()+a+o:f,height:e?e.scale.bandwidth()+r+i:u,facet:{width:f,height:u}}}function Z1(t,e){if(t.range===void 0){let{insetLeft:n,insetRight:r}=t,{width:o,marginLeft:i=0,marginRight:a=0}=e,f=i+n,u=o-a-r;t.range=[f,Math.max(f,u)],fn(t)||(t.range=ex(t)),t.scale.range(t.range)}tx(t)}function K1(t,e){if(t.range===void 0){let{insetTop:n,insetBottom:r}=t,{height:o,marginTop:i=0,marginBottom:a=0}=e,f=i+n,u=o-a-r;t.range=[Math.max(f,u),f],fn(t)?t.range.reverse():t.range=ex(t),t.scale.range(t.range)}tx(t)}function tx(t){t.round===void 0&&T8(t)&&v8(t)<=30&&t.scale.round(!0)}function v8({scale:t}){let e=t.domain().length,[n,r]=t.range(),o=t.paddingInner?t.paddingInner():1,i=t.paddingOuter?t.paddingOuter():t.padding(),a=e-o,f=Math.abs(r-n)/Math.max(1,a+i*2);return(f-Math.floor(f))*a}function ex(t){let e=t.scale.domain().length+jd(t);if(!(e>2))return t.range;let[n,r]=t.range;return Array.from({length:e},(o,i)=>n+i/(e-1)*(r-n))}function M8(t,e=[],n={}){let r=S8(t,e,n);if(n.type===void 0&&n.domain===void 0&&n.range===void 0&&n.interval==null&&t!=="fx"&&t!=="fy"&&fn({type:r})){let o=e.map(({value:i})=>i).filter(i=>i!==void 0);o.some(Yt)?an(`Warning: some data associated with the ${t} scale are dates. Dates are typically associated with a "utc" or "time" scale rather than a "${Lo(r)}" scale. If you are using a bar mark, you probably want a rect mark with the interval option instead; if you are using a group transform, you probably want a bin transform instead. If you want to treat this data as ordinal, you can specify the interval of the ${t} scale (e.g., d3.utcDay), or you can suppress this warning by setting the type of the ${t} scale to "${Lo(r)}".`):o.some(qg)?an(`Warning: some data associated with the ${t} scale are strings that appear to be dates (e.g., YYYY-MM-DD). If these strings represent dates, you should parse them to Date objects. Dates are typically associated with a "utc" or "time" scale rather than a "${Lo(r)}" scale. If you are using a bar mark, you probably want a rect mark with the interval option instead; if you are using a group transform, you probably want a bin transform instead. If you want to treat this data as ordinal, you can suppress this warning by setting the type of the ${t} scale to "${Lo(r)}".`):o.some(zg)&&an(`Warning: some data associated with the ${t} scale are strings that appear to be numbers. If these strings represent numbers, you should parse or coerce them to numbers. Numbers are typically associated with a "linear" scale rather than a "${Lo(r)}" scale. If you want to treat this data as ordinal, you can specify the interval of the ${t} scale (e.g., 1 for integers), or you can suppress this warning by setting the type of the ${t} scale to "${Lo(r)}".`)}switch(n.type=r,r){case"diverging":case"diverging-sqrt":case"diverging-pow":case"diverging-log":case"diverging-symlog":case"cyclical":case"sequential":case"linear":case"sqrt":case"threshold":case"quantile":case"pow":case"log":case"symlog":n=Oc(e,n,Tr);break;case"identity":switch(st.get(t)){case de:n=Oc(e,n,Tr);break;case Co:n=Oc(e,n,_8);break}break;case"utc":case"time":n=Oc(e,n,Ig);break}switch(r){case"diverging":return P1(t,e,n);case"diverging-sqrt":return O1(t,e,n);case"diverging-pow":return Hd(t,e,n);case"diverging-log":return F1(t,e,n);case"diverging-symlog":return q1(t,e,n);case"categorical":case"ordinal":case Ro:return H1(t,e,n);case"cyclical":case"sequential":case"linear":return $1(t,e,n);case"sqrt":return E1(t,e,n);case"threshold":return Lc(t,e,n);case"quantile":return N1(t,e,n);case"quantize":return D1(t,e,n);case"pow":return Xd(t,e,n);case"log":return I1(t,e,n);case"symlog":return k1(t,e,n);case"utc":return B1(t,e,n);case"time":return Y1(t,e,n);case"point":return W1(t,e,n);case"band":return G1(t,e,n);case"identity":return st.get(t)===de?R1():{type:"identity"};case void 0:return;default:throw new Error(`unknown scale type: ${r}`)}}function Lo(t){return typeof t=="symbol"?t.description:t}var Q1={toString:()=>"projection"};function S8(t,e,{type:n,domain:r,range:o,scheme:i,pivot:a,projection:f}){if(t==="fx"||t==="fy")return"band";(t==="x"||t==="y")&&f!=null&&(n=Q1);for(let{type:c}of e)if(c!==void 0){if(n===void 0)n=c;else if(n!==c)throw new Error(`scale incompatible with channel: ${n} !== ${c}`)}if(n===Q1)return;if(n!==void 0)return n;if(r===void 0&&!e.some(({value:c})=>c!==void 0))return;let u=st.get(t);if(u===So)return"sqrt";if(u===_o||u===To)return"linear";if(u===Co)return"ordinal";if((r||o||[]).length>2)return Wd(u);if(r!==void 0){if(Ad(r))return Wd(u);if(Yt(r))return"utc"}else{let c=e.map(({value:s})=>s).filter(s=>s!==void 0);if(c.some(Ad))return Wd(u);if(c.some(Yt))return"utc"}if(u===pe){if(a!=null||C1(i))return"diverging";if(T1(i))return"categorical"}return"linear"}function Wd(t){switch(t){case de:return"point";case pe:return Ro;default:return"ordinal"}}function qc({type:t}){return t==="time"||t==="utc"}function fn({type:t}){return t==="ordinal"||t==="point"||t==="band"||t===Ro}function jd({type:t}){return t==="threshold"}function T8({type:t}){return t==="point"||t==="band"}function Wn(t){if(t===void 0)return!0;let e=t.domain(),n=t(e[0]);for(let r=1,o=e.length;r<o;++r)if(t(e[r])-n)return!1;return!0}function Oc(t,{domain:e,...n},r){for(let o of t)o.value!==void 0&&(o.value=r(o.value));return{domain:e===void 0?e:r(e),...n}}function _8(t){return pt(t,Ao)}function nx(t){return e=>{if(!st.has(e=`${e}`))throw new Error(`unknown scale: ${e}`);return e in t?C8(t[e]):void 0}}function C8({scale:t,type:e,domain:n,range:r,interpolate:o,interval:i,transform:a,percent:f,pivot:u}){if(e==="identity")return{type:"identity",apply:s=>s,invert:s=>s};let c=t.unknown?t.unknown():void 0;return{type:e,domain:ya(n),...r!==void 0&&{range:ya(r)},...a!==void 0&&{transform:a},...f&&{percent:f},...c!==void 0&&{unknown:c},...i!==void 0&&{interval:i},...o!==void 0&&{interpolate:o},...t.clamp&&{clamp:t.clamp()},...u!==void 0&&{pivot:u,symmetric:!1},...t.base&&{base:t.base()},...t.exponent&&{exponent:t.exponent()},...t.constant&&{constant:t.constant()},...t.align&&{align:t.align(),round:t.round()},...t.padding&&(t.paddingInner?{paddingInner:t.paddingInner(),paddingOuter:t.paddingOuter()}:{padding:t.padding()}),...t.bandwidth&&{bandwidth:t.bandwidth(),step:t.step()},apply:s=>t(s),...t.invert&&{invert:s=>t.invert(s)}}}function zc(t){let e,n;return(...r)=>((n?.length!==r.length||n.some((o,i)=>o!==r[i]))&&(n=r,e=t(...r)),e)}var A8=zc(t=>new Intl.NumberFormat(t)),Rq=zc((t,e)=>new Intl.DateTimeFormat(t,{timeZone:"UTC",...e&&{month:e}})),Lq=zc((t,e)=>new Intl.DateTimeFormat(t,{timeZone:"UTC",...e&&{weekday:e}}));function $8(t="en-US"){let e=A8(t);return n=>n!=null&&!isNaN(n)?e.format(n):void 0}function E8(t){return Cc(t,"Invalid Date")}function I8(t="en-US"){let e=$8(t);return n=>(n instanceof Date?E8:typeof n=="number"?e:Et)(n)}var _e=I8();var Bt=(typeof window<"u"?window.devicePixelRatio>1:typeof it>"u")?0:.5,k8=0;function rx(){return`plot-clip-${++k8}`}function ox(t,{title:e,href:n,ariaLabel:r,ariaDescription:o,ariaHidden:i,target:a,fill:f,fillOpacity:u,stroke:c,strokeWidth:s,strokeOpacity:d,strokeLinejoin:l,strokeLinecap:p,strokeMiterlimit:m,strokeDasharray:h,strokeDashoffset:g,opacity:b,mixBlendMode:x,imageFilter:M,paintOrder:y,pointerEvents:w,shapeRendering:v,channels:T},{ariaLabel:E,fill:I="currentColor",fillOpacity:F,stroke:_="none",strokeOpacity:R,strokeWidth:O,strokeLinecap:L,strokeLinejoin:S,strokeMiterlimit:A,paintOrder:N}){I===null&&(f=null,u=null),_===null&&(c=null,d=null),Pt(I)?!Pt(_)&&(!Pt(f)||T?.fill)&&(_="none"):Pt(_)&&(!Pt(c)||T?.stroke)&&(I="none");let[P,D]=ie(f,I),[tt,Z]=It(u,F),[W,Q]=ie(c,_),[at,Ut]=It(d,R),[Fe,G]=It(b);$r(Q)||(s===void 0&&(s=O),p===void 0&&(p=L),l===void 0&&(l=S),m===void 0&&!Ug(l)&&(m=A),!$r(D)&&y===void 0&&(y=N));let[X,$]=It(s);return I!==null&&(t.fill=St(D,"currentColor"),t.fillOpacity=$a(Z,1)),_!==null&&(t.stroke=St(Q,"none"),t.strokeWidth=$a($,1),t.strokeOpacity=$a(Ut,1),t.strokeLinejoin=St(l,"miter"),t.strokeLinecap=St(p,"butt"),t.strokeMiterlimit=$a(m,4),t.strokeDasharray=St(h,"none"),t.strokeDashoffset=St(g,"0")),t.target=Et(a),t.ariaLabel=Et(E),t.ariaDescription=Et(o),t.ariaHidden=Et(i),t.opacity=$a(G,1),t.mixBlendMode=St(x,"normal"),t.imageFilter=St(M,"none"),t.paintOrder=St(y,"normal"),t.pointerEvents=St(w,"auto"),t.shapeRendering=St(v,"auto"),{title:{value:e,optional:!0,filter:null},href:{value:n,optional:!0,filter:null},ariaLabel:{value:r,optional:!0,filter:null},fill:{value:P,scale:"auto",optional:!0},fillOpacity:{value:tt,scale:"auto",optional:!0},stroke:{value:W,scale:"auto",optional:!0},strokeOpacity:{value:at,scale:"auto",optional:!0},strokeWidth:{value:X,optional:!0},opacity:{value:Fe,scale:"auto",optional:!0}}}function N8(t,e){e&&t.filter(n=>Tc(e[n])).append("title").call(D8,e)}function D8(t,e){e&&t.text(n=>_e(e[n]))}function Oe(t,{target:e,tip:n},{ariaLabel:r,title:o,fill:i,fillOpacity:a,stroke:f,strokeOpacity:u,strokeWidth:c,opacity:s,href:d}){r&&et(t,"aria-label",l=>r[l]),i&&et(t,"fill",l=>i[l]),a&&et(t,"fill-opacity",l=>a[l]),f&&et(t,"stroke",l=>f[l]),u&&et(t,"stroke-opacity",l=>u[l]),c&&et(t,"stroke-width",l=>c[l]),s&&et(t,"opacity",l=>s[l]),d&&L8(t,l=>d[l],e),n||N8(t,o)}function ix(t){return t===!0?t="frame":t===!1&&(t=null),_r(t,"clip",["frame","sphere"])}function R8(t,e,n,r){let o;switch(e.clip){case"frame":{let{width:i,height:a,marginLeft:f,marginRight:u,marginTop:c,marginBottom:s}=n,d=rx();o=`url(#${d})`,t=yt("svg:g",r).call(l=>l.append("svg:clipPath").attr("id",d).append("rect").attr("x",f).attr("y",c).attr("width",i-u-f).attr("height",a-c-s)).each(function(){this.appendChild(t.node()),t.node=()=>this});break}case"sphere":{let{projection:i}=r;if(!i)throw new Error('the "sphere" clip option requires a projection');let a=rx();o=`url(#${a})`,t.append("clipPath").attr("id",a).append("path").attr("d",Ci(i)({type:"Sphere"}));break}}et(t,"aria-label",e.ariaLabel),et(t,"aria-description",e.ariaDescription),et(t,"aria-hidden",e.ariaHidden),et(t,"clip-path",o)}function me(t,e,n,r){R8(t,e,n,r),et(t,"fill",e.fill),et(t,"fill-opacity",e.fillOpacity),et(t,"stroke",e.stroke),et(t,"stroke-width",e.strokeWidth),et(t,"stroke-opacity",e.strokeOpacity),et(t,"stroke-linejoin",e.strokeLinejoin),et(t,"stroke-linecap",e.strokeLinecap),et(t,"stroke-miterlimit",e.strokeMiterlimit),et(t,"stroke-dasharray",e.strokeDasharray),et(t,"stroke-dashoffset",e.strokeDashoffset),et(t,"shape-rendering",e.shapeRendering),et(t,"filter",e.imageFilter),et(t,"paint-order",e.paintOrder);let{pointerEvents:o=r.pointerSticky===!1?"none":void 0}=e;et(t,"pointer-events",o)}function he(t,e){P8(t,"mix-blend-mode",e.mixBlendMode),et(t,"opacity",e.opacity)}function L8(t,e,n){t.each(function(r){let o=e(r);if(o!=null){let i=this.ownerDocument.createElementNS(Ye.svg,"a");i.setAttribute("fill","inherit"),i.setAttributeNS(Ye.xlink,"href",o),n!=null&&i.setAttribute("target",n),this.parentNode.insertBefore(i,this).appendChild(this)}})}function et(t,e,n){n!=null&&t.attr(e,n)}function P8(t,e,n){n!=null&&t.style(e,n)}function ge(t,e,{x:n,y:r},o=Bt,i=Bt){o+=e.dx,i+=e.dy,n?.bandwidth&&(o+=n.bandwidth()/2),r?.bandwidth&&(i+=r.bandwidth()/2),(o||i)&&t.attr("transform",`translate(${o},${i})`)}function St(t,e){if((t=Et(t))!==e)return t}function $a(t,e){if((t=ct(t))!==e)return t}var O8=/^-?([_a-z]|[\240-\377]|\\[0-9a-f]{1,6}(\r\n|[ \t\r\n\f])?|\\[^\r\n\f0-9a-f])([_a-z0-9-]|[\240-\377]|\\[0-9a-f]{1,6}(\r\n|[ \t\r\n\f])?|\\[^\r\n\f0-9a-f])*$/i;function Po(t){if(t===void 0)return"plot-d6a7b5";if(t=`${t}`,!O8.test(t))throw new Error(`invalid class name: ${t}`);return t}function Oo(t,e){if(typeof e=="string")t.property("style",e);else if(e!=null)for(let n of t)Object.assign(n.style,e)}function Gn({frameAnchor:t},{width:e,height:n,marginTop:r,marginRight:o,marginBottom:i,marginLeft:a}){return[/left$/.test(t)?a:/right$/.test(t)?e-o:(a+e-o)/2,/^top/.test(t)?r:/^bottom/.test(t)?n-i:(r+n-i)/2]}function fx(t,e,n={}){let r=.5-Bt,o=.5+Bt,i=.5+Bt,a=.5-Bt;for(let{marginTop:h,marginRight:g,marginBottom:b,marginLeft:x}of e)h>r&&(r=h),g>o&&(o=g),b>i&&(i=b),x>a&&(a=x);let{margin:f,marginTop:u=f!==void 0?f:r,marginRight:c=f!==void 0?f:o,marginBottom:s=f!==void 0?f:i,marginLeft:d=f!==void 0?f:a}=n;u=+u,c=+c,s=+s,d=+d;let{width:l=640,height:p=F8(t,n,{width:l,marginTopDefault:r,marginRightDefault:o,marginBottomDefault:i,marginLeftDefault:a})+Math.max(0,u-r+s-i)}=n;l=+l,p=+p;let m={width:l,height:p,marginTop:u,marginRight:c,marginBottom:s,marginLeft:d};if(t.fx||t.fy){let{margin:h,marginTop:g=h!==void 0?h:u,marginRight:b=h!==void 0?h:c,marginBottom:x=h!==void 0?h:s,marginLeft:M=h!==void 0?h:d}=n.facet??{};g=+g,b=+b,x=+x,M=+M,m.facet={marginTop:g,marginRight:b,marginBottom:x,marginLeft:M}}return m}function F8({x:t,y:e,fy:n,fx:r},{projection:o,aspectRatio:i},{width:a,marginTopDefault:f,marginRightDefault:u,marginBottomDefault:c,marginLeftDefault:s}){let d=n?n.scale.domain().length:1,l=x1(o);if(l){let m=r?r.scale.domain().length:1,h=(1.1*d-.1)/(1.1*m-.1)*l,g=Math.max(.1,Math.min(10,h));return Math.round((a-s-u)*g+f+c)}let p=e?fn(e)?e.scale.domain().length:Math.max(7,17/d):1;if(i!=null){if(i=+i,!(isFinite(i)&&i>0))throw new Error(`invalid aspectRatio: ${i}`);let m=ax("y",e)/(ax("x",t)*i),h=r?r.scale.bandwidth():1,g=n?n.scale.bandwidth():1,b=h*(a-s-u)-t.insetLeft-t.insetRight;return(m*b+e.insetTop+e.insetBottom)/g+f+c}return!!(e||n)*Math.max(1,Math.min(60,p*d))*20+!!r*30+60}function ax(t,e){if(!e)throw new Error(`aspectRatio requires ${t} scale`);let{type:n,domain:r}=e,o;switch(n){case"linear":case"utc":case"time":o=Number;break;case"pow":{let f=e.scale.exponent();o=u=>Math.pow(u,f);break}case"log":o=Math.log;break;case"point":case"band":return r.length;default:throw new Error(`unsupported ${t} scale for aspectRatio: ${n}`)}let[i,a]=Ct(r);return Math.abs(o(a)-o(i))}function cx(t,e){let{fx:n,fy:r}=Aa(t,e),o=n?.scale.domain(),i=r?.scale.domain();return o&&i?Fa(o,i).map(([a,f],u)=>({x:a,y:f,i:u})):o?o.map((a,f)=>({x:a,i:f})):i?i.map((a,f)=>({y:a,i:f})):void 0}function sx(t,{x:e,y:n}){return e&&=tp(e),n&&=tp(n),t.filter(e&&n?r=>e.has(r.x)&&n.has(r.y):e?r=>e.has(r.x):r=>n.has(r.y)).sort(e&&n?(r,o)=>e.get(r.x)-e.get(o.x)||n.get(r.y)-n.get(o.y):e?(r,o)=>e.get(r.x)-e.get(o.x):(r,o)=>n.get(r.y)-n.get(o.y))}function Bc(t,{fx:e,fy:n}){let r=ne(t),o=e?.value,i=n?.value;return e&&n?Ae(r,a=>(a.fx=o[a[0]],a.fy=i[a[0]],a),a=>o[a],a=>i[a]):e?Ae(r,a=>(a.fx=o[a[0]],a),a=>o[a]):Ae(r,a=>(a.fy=i[a[0]],a),a=>i[a])}function lx(t,e,{marginTop:n,marginLeft:r}){return t&&e?({x:o,y:i})=>`translate(${t(o)-r},${e(i)-n})`:t?({x:o})=>`translate(${t(o)-r},0)`:({y:o})=>`translate(0,${e(o)-n})`}function dx(t){let e=[],n=new Uint32Array(fe(t,r=>r.length));for(let r of t){let o=0;for(let i of t)r!==i&&(n.set(i,o),o+=i.length);e.push(n.slice(0,o))}return e}var q8=new Map([["top",Zd],["right",Jd],["bottom",Kd],["left",Qd],["top-left",Yc(Zd,Qd)],["top-right",Yc(Zd,Jd)],["bottom-left",Yc(Kd,Qd)],["bottom-right",Yc(Kd,Jd)],["top-empty",Y8],["right-empty",X8],["bottom-empty",B8],["left-empty",U8],["empty",H8]]);function px(t){if(t==null)return null;let e=q8.get(`${t}`.toLowerCase());if(e)return e;throw new Error(`invalid facet anchor: ${t}`)}var ux=new WeakMap;function tp(t){let e=ux.get(t);return e||ux.set(t,e=new Qt(pt(t,(n,r)=>[n,r]))),e}function Vn(t,e){return tp(t).get(e)}function z8(t,e,n){return e=bo(e),n=bo(n),t.find(r=>Object.is(bo(r.x),e)&&Object.is(bo(r.y),n))}function Uc(t,e,n){return z8(t,e,n)?.empty}function Zd(t,{y:e},{y:n}){return e?Vn(e,n)===0:!0}function Kd(t,{y:e},{y:n}){return e?Vn(e,n)===e.length-1:!0}function Qd(t,{x:e},{x:n}){return e?Vn(e,n)===0:!0}function Jd(t,{x:e},{x:n}){return e?Vn(e,n)===e.length-1:!0}function Y8(t,{y:e},{x:n,y:r,empty:o}){if(o)return!1;if(!e)return;let i=Vn(e,r);if(i>0)return Uc(t,n,e[i-1])}function B8(t,{y:e},{x:n,y:r,empty:o}){if(o)return!1;if(!e)return;let i=Vn(e,r);if(i<e.length-1)return Uc(t,n,e[i+1])}function U8(t,{x:e},{x:n,y:r,empty:o}){if(o)return!1;if(!e)return;let i=Vn(e,n);if(i>0)return Uc(t,e[i-1],r)}function X8(t,{x:e},{x:n,y:r,empty:o}){if(o)return!1;if(!e)return;let i=Vn(e,n);if(i<e.length-1)return Uc(t,e[i+1],r)}function H8(t,e,{empty:n}){return n}function Yc(t,e){return function(){return t.apply(null,arguments)&&e.apply(null,arguments)}}function Xc(t,{channels:{fx:e,fy:n},groups:r}){return e&&n?t.map(({x:o,y:i})=>r.get(o)?.get(i)??[]):e?t.map(({x:o})=>r.get(o)??[]):t.map(({y:o})=>r.get(o)??[])}var Nt=class{constructor(e,n={},r={},o){let{facet:i="auto",facetAnchor:a,fx:f,fy:u,sort:c,dx:s=0,dy:d=0,margin:l=0,marginTop:p=l,marginRight:m=l,marginBottom:h=l,marginLeft:g=l,clip:b,channels:x,tip:M,render:y}=r;if(this.data=e,this.sort=Cr(c)?c:null,this.initializer=Er(r).initializer,this.transform=this.initializer?r.transform:$o(r).transform,i===null||i===!1?this.facet=null:(this.facet=le(i===!0?"include":i,"facet",["auto","include","exclude","super"]),this.fx=e===xo&&typeof f=="string"?[f]:f,this.fy=e===xo&&typeof u=="string"?[u]:u),this.facetAnchor=px(a),n=Ed(n),x!==void 0&&(n={...W8(x),...n}),o!==void 0&&(n={...ox(this,r,o),...n}),this.channels=Object.fromEntries(Object.entries(n).map(([w,v])=>{if(ba(v.value)){let{value:T,scale:E=v.scale}=v.value;v={...v,scale:E,value:T}}if(e===xo&&typeof v.value=="string"){let{value:T}=v;v={...v,value:[T]}}return[w,v]}).filter(([w,{value:v,optional:T}])=>{if(v!=null)return!0;if(T)return!1;throw new Error(`missing channel value: ${w}`)})),this.dx=+s,this.dy=+d,this.marginTop=+p,this.marginRight=+m,this.marginBottom=+h,this.marginLeft=+g,this.clip=ix(b),this.tip=G8(M),this.facet==="super"){if(f||u)throw new Error("super-faceting cannot use fx or fy");for(let w in this.channels){let{scale:v}=n[w];if(!(v!=="x"&&v!=="y"))throw new Error("super-faceting cannot use x or y")}}y!=null&&(this.render=np(y,this.render))}initialize(e,n,r){let o=kt(this.data);e===void 0&&o!=null&&(e=[ne(o)]);let i=e;this.transform!=null&&({facets:e,data:o}=this.transform(o,e,r),o=kt(o)),e!==void 0&&(e.original=i);let a=r1(this.channels,o);return this.sort!=null&&i1(o,e,a,n,this.sort),{data:o,facets:e,channels:a}}filter(e,n,r){for(let o in n){let{filter:i=Re}=n[o];if(i!==null){let a=r[o];e=e.filter(f=>i(a[f]))}}return e}project(e,n,r){for(let o in e)if(e[o].scale==="x"&&/^x|x$/.test(o)){let i=o.replace(/^x|x$/,"y");i in e&&e[i].scale==="y"&&h1(o,i,n,r.projection)}}scale(e,n,r){let o=o1(e,n);return r.projection&&this.project(e,o,r),o}};function ep(...t){return t.plot=Nt.prototype.plot,t}function np(t,e){if(t==null)return e===null?void 0:e;if(e==null)return t===null?void 0:t;if(typeof t!="function")throw new TypeError(`invalid render transform: ${t}`);if(typeof e!="function")throw new TypeError(`invalid render transform: ${e}`);return function(n,r,o,i,a,f){return t.call(this,n,r,o,i,a,(u,c,s,d,l)=>e.call(this,u,c,s,d,l,f))}}function W8(t){return Object.fromEntries(Object.entries(Ed(t)).map(([e,n])=>(n=on(n),n.filter===void 0&&n.scale==null&&(n={...n,filter:null}),[e,n])))}function G8(t){return t===!0?"xy":t===!1?null:_r(t,"tip",["x","y","xy"])}function Ea(t,e){return t?.tip===!0?{...t,tip:e}:t}var mx=new WeakMap;function rp(t,e,{x:n,y:r,px:o,py:i,maxRadius:a=40,channels:f,render:u,...c}={}){return a=+a,o!=null&&(n??=null,f={...f,px:{value:o,scale:"x"}}),i!=null&&(r??=null,f={...f,py:{value:i,scale:"y"}}),{x:n,y:r,channels:f,...c,render:np(function(s,d,l,p,m,h){m={...m,pointerSticky:!1};let g=m.ownerSVGElement,{data:b}=m.getMarkState(this),x=mx.get(g);x||mx.set(g,x={sticky:!1,roots:[],renders:[]});let M=x.renders.push(Q)-1,{x:y,y:w,fx:v,fy:T}=d,E=v?v(s.fx)-p.marginLeft:0,I=T?T(s.fy)-p.marginTop:0;y?.bandwidth&&(E+=y.bandwidth()/2),w?.bandwidth&&(I+=w.bandwidth()/2);let F=s.fi!=null,_;if(F){let G=x.facetStates;G||(x.facetStates=G=new Map),_=G.get(this),_||G.set(this,_=new Map)}let[R,O]=Gn(this,p),{px:L,py:S}=l,A=L?G=>L[G]:op(l,R),N=S?G=>S[G]:ip(l,O),P,D,tt,Z;function W(G,X){if(F)if(Z&&(Z=cancelAnimationFrame(Z)),G==null)_.delete(s.fi);else{_.set(s.fi,X),Z=requestAnimationFrame(()=>{Z=null;for(let $ of _.values())if($<X){G=null;break}Q(G)});return}Q(G)}function Q(G){if(P===G&&tt===x.sticky)return;P=G,tt=m.pointerSticky=x.sticky;let X=P==null?[]:[P];F&&(X.fx=s.fx,X.fy=s.fy,X.fi=s.fi);let $=h(X,d,l,p,m);if(D){if(F){let q=D.parentNode,z=D.getAttribute("transform"),C=$.getAttribute("transform");z?$.setAttribute("transform",z):$.removeAttribute("transform"),C?q.setAttribute("transform",C):q.removeAttribute("transform"),$.removeAttribute("aria-label"),$.removeAttribute("aria-description"),$.removeAttribute("aria-hidden")}D.replaceWith($)}return x.roots[M]=D=$,m.dispatchValue(P==null?null:b[P]),$}function at(G){if(x.sticky||G.pointerType==="mouse"&&G.buttons===1)return;let[X,$]=Ms(G);X-=E,$-=I;let q=null,z=a*a;for(let C of s){let j=t*(A(C)-X),J=e*(N(C)-$),ot=j*j+J*J;ot<=z&&(q=C,z=ot)}W(q,z)}function Ut(G){G.pointerType==="mouse"&&P!=null&&(x.sticky&&x.roots.some(X=>X?.contains(G.target))||(x.sticky?(x.sticky=!1,x.renders.forEach(X=>X(null))):(x.sticky=!0,Q(P)),G.stopImmediatePropagation()))}function Fe(G){G.pointerType==="mouse"&&(x.sticky||W(null))}return g.addEventListener("pointerenter",at),g.addEventListener("pointermove",at),g.addEventListener("pointerdown",Ut),g.addEventListener("pointerleave",Fe),Q(null)},u)}}function hx(t){return rp(1,1,t)}function gx(t){return rp(1,.01,t)}function xx(t){return rp(.01,1,t)}function op({x1:t,x2:e,x:n=t},r){return t&&e?o=>(t[o]+e[o])/2:n?o=>n[o]:()=>r}function ip({y1:t,y2:e,y:n=t},r){return t&&e?o=>(t[o]+e[o])/2:n?o=>n[o]:()=>r}function Hc(t){return fn(t)&&t.interval===void 0?void 0:"tabular-nums"}function yx(t,e){let{label:n=t.label,tickSize:r=6,width:o=240,height:i=44+r,marginTop:a=18,marginRight:f=0,marginBottom:u=16+r,marginLeft:c=0,style:s,ticks:d=(o-c-f)/64,tickFormat:l,fontVariant:p=Hc(t),round:m=!0,opacity:h,className:g}=e,b=Io(e);g=Po(g),h=It(h)[1],l===null&&(l=()=>null);let x=yt("svg",b).attr("class",`${g}-ramp`).attr("font-family","system-ui, sans-serif").attr("font-size",10).attr("width",o).attr("height",i).attr("viewBox",`0 0 ${o} ${i}`).call(R=>R.append("style").text(`.${g}-ramp {
   display: block;
   background: white;
   height: auto;
@@ -14,9 +14,9 @@
 }
 .${g}-ramp text {
   white-space: pre;
-}`)).call(Oo,s),M=R=>R.selectAll(".tick line").attr("y1",a+u-i),y,w=m?(R,O)=>R.rangeRound(O):(R,O)=>R.range(O),{type:v,domain:T,range:I,interpolate:E,scale:F,pivot:_}=t;if(E){let R=I===void 0?E:We(E.length===1?Ca(E):E,I);y=w(F.copy(),Gt(ht(c,o-f),Math.min(T.length+(_!==void 0),I===void 0?1/0:I.length)));let O=256,P=b.document.createElement("canvas");P.width=O,P.height=1;let S=P.getContext("2d");for(let A=0,N=O-1;A<O;++A)S.fillStyle=R(A/N),S.fillRect(A,0,1,1);x.append("image").attr("opacity",h).attr("x",c).attr("y",a).attr("width",o-c-f).attr("height",i-a-u).attr("preserveAspectRatio","none").attr("xlink:href",P.toDataURL())}else if(v==="threshold"){let R=T,O=l===void 0?P=>P:typeof l=="string"?Ve(l):l;y=w(hr().domain([-1,I.length-1]),[c,o-f]),x.append("g").attr("fill-opacity",h).selectAll().data(I).enter().append("rect").attr("x",(P,S)=>y(S-1)).attr("y",a).attr("width",(P,S)=>y(S)-y(S-1)).attr("height",i-a-u).attr("fill",P=>P),d=pt(R,(P,S)=>S),l=P=>O(R[P],P)}else y=w(Rn().domain(T),[c,o-f]),x.append("g").attr("fill-opacity",h).selectAll().data(T).enter().append("rect").attr("x",y).attr("y",a).attr("width",Math.max(0,y.bandwidth()-1)).attr("height",i-a-u).attr("fill",F),M=()=>{};return x.append("g").attr("transform",`translate(0,${i-u})`).call(xs(y).ticks(Array.isArray(d)?null:d,typeof l=="string"?l:void 0).tickFormat(typeof l=="function"?l:void 0).tickSize(r).tickValues(Array.isArray(d)?d:null)).attr("font-size",null).attr("font-family",null).attr("font-variant",St(p,"normal")).call(M).call(R=>R.select(".domain").remove()),n!==void 0&&x.append("text").attr("x",c).attr("y",a-6).attr("fill","currentColor").attr("font-weight","bold").text(n),x.node()}var ap=Math.PI/180;function up(t,{marker:e,markerStart:n=e,markerMid:r=e,markerEnd:o=e}={}){t.markerStart=fp(n),t.markerMid=fp(r),t.markerEnd=fp(o)}function fp(t){if(t==null||t===!1)return null;if(t===!0)return wx;if(typeof t=="function")return t;switch(`${t}`.toLowerCase()){case"none":return null;case"arrow":return bx("auto");case"arrow-reverse":return bx("auto-start-reverse");case"dot":return H8;case"circle":case"circle-fill":return wx;case"circle-stroke":return V8}throw new Error(`invalid marker: ${t}`)}function bx(t){return(e,n)=>yt("svg:marker",n).attr("viewBox","-5 -5 10 10").attr("markerWidth",6.67).attr("markerHeight",6.67).attr("orient",t).attr("fill","none").attr("stroke",e).attr("stroke-width",1.5).attr("stroke-linecap","round").attr("stroke-linejoin","round").call(r=>r.append("path").attr("d","M-1.5,-3l3,3l-3,3")).node()}function H8(t,e){return yt("svg:marker",e).attr("viewBox","-5 -5 10 10").attr("markerWidth",6.67).attr("markerHeight",6.67).attr("fill",t).attr("stroke","none").call(n=>n.append("circle").attr("r",2.5)).node()}function wx(t,e){return yt("svg:marker",e).attr("viewBox","-5 -5 10 10").attr("markerWidth",6.67).attr("markerHeight",6.67).attr("fill",t).attr("stroke","white").attr("stroke-width",1.5).call(n=>n.append("circle").attr("r",3)).node()}function V8(t,e){return yt("svg:marker",e).attr("viewBox","-5 -5 10 10").attr("markerWidth",6.67).attr("markerHeight",6.67).attr("fill","white").attr("stroke",t).attr("stroke-width",1.5).call(n=>n.append("circle").attr("r",3)).node()}var j8=0;function cp(t,e,{stroke:n},r){return Z8(t,e,n&&(o=>n[o]),r)}function Z8(t,{markerStart:e,markerMid:n,markerEnd:r,stroke:o},i=()=>o,a){let f=new Map;function u(c){return function(s){let d=i(s),l=f.get(c);l||f.set(c,l=new Map);let p=l.get(d);if(!p){let m=this.parentNode.insertBefore(c(d,a),this),h=`plot-marker-${++j8}`;m.setAttribute("id",h),l.set(d,p=`url(#${h})`)}return p}}e&&t.attr("marker-start",u(e)),n&&t.attr("marker-mid",u(n)),r&&t.attr("marker-end",u(r))}function Ea({inset:t,insetLeft:e,insetRight:n,...r}={}){return[e,n]=vx(t,e,n),{inset:t,insetLeft:e,insetRight:n,...r}}function Gc({inset:t,insetTop:e,insetBottom:n,...r}={}){return[e,n]=vx(t,e,n),{inset:t,insetTop:e,insetBottom:n,...r}}function vx(t,e,n){return t===void 0&&e===void 0&&n===void 0?Bt?[1,0]:[.5,.5]:[e,n]}function Mx(t,{interval:e}){return t={...on(t)},t.interval=kc(t.interval===void 0?e:t.interval),t}function Sx(t,e,n,r){let{[t]:o,[`${t}1`]:i,[`${t}2`]:a}=n,{value:f,interval:u}=Mx(o,n);if(f==null||u==null&&!r)return n;let c=Pe(o);if(u==null){let p,m={transform:h=>p||(p=gt(h,f)),label:c};return{...n,[t]:void 0,[`${t}1`]:i===void 0?m:i,[`${t}2`]:a===void 0?m:a}}let s,d;function l(p){return d!==void 0&&p===s?d:d=pt(gt(s=p,f),m=>u.floor(m))}return e({...n,[t]:void 0,[`${t}1`]:i===void 0?{transform:l,label:c}:i,[`${t}2`]:a===void 0?{transform:p=>l(p).map(m=>u.offset(m)),label:c}:a})}function Tx(t,e,n){let{[t]:r}=n,{value:o,interval:i}=Mx(r,n);return o==null||i==null?n:e({...n,[t]:{label:Pe(r),transform:a=>{let f=pt(gt(a,o),c=>i.floor(c)),u=f.map(c=>i.offset(c));return f.map(Yt(f)?(c,s)=>c==null||isNaN(c=+c)||(s=u[s],s==null)||isNaN(s=+s)?void 0:new Date((c+s)/2):(c,s)=>c==null||(s=u[s],s==null)?NaN:(+c+ +s)/2)}}})}function sp(t={}){return Sx("x",Ea,t)}function Hc(t={}){return Sx("y",Gc,t)}function _x(t={}){return Tx("x",Ea,t)}function Cx(t={}){return Tx("y",Gc,t)}var Ax={ariaLabel:"rule",fill:null,stroke:"currentColor"},lp=class extends Nt{constructor(e,n={}){let{x:r,y1:o,y2:i,inset:a=0,insetTop:f=a,insetBottom:u=a}=n;super(e,{x:{value:r,scale:"x",optional:!0},y1:{value:o,scale:"y",optional:!0},y2:{value:i,scale:"y",optional:!0}},Ia(n,"x"),Ax),this.insetTop=ct(f),this.insetBottom=ct(u),up(this,n)}render(e,n,r,o,i){let{x:a,y:f}=n,{x:u,y1:c,y2:s}=r,{width:d,height:l,marginTop:p,marginRight:m,marginLeft:h,marginBottom:g}=o,{insetTop:b,insetBottom:x}=this;return yt("svg:g",i).call(me,this,o,i).call(ge,this,{x:u&&a},Bt,0).call(M=>M.selectAll().data(e).enter().append("line").call(he,this).attr("x1",u?y=>u[y]:(h+d-m)/2).attr("x2",u?y=>u[y]:(h+d-m)/2).attr("y1",c&&!Gn(f)?y=>c[y]+b:p+b).attr("y2",s&&!Gn(f)?f.bandwidth?y=>s[y]+f.bandwidth()-x:y=>s[y]-x:l-g-x).call(Oe,this,r).call(cp,this,r,i)).node()}},dp=class extends Nt{constructor(e,n={}){let{x1:r,x2:o,y:i,inset:a=0,insetRight:f=a,insetLeft:u=a}=n;super(e,{y:{value:i,scale:"y",optional:!0},x1:{value:r,scale:"x",optional:!0},x2:{value:o,scale:"x",optional:!0}},Ia(n,"y"),Ax),this.insetRight=ct(f),this.insetLeft=ct(u),up(this,n)}render(e,n,r,o,i){let{x:a,y:f}=n,{y:u,x1:c,x2:s}=r,{width:d,height:l,marginTop:p,marginRight:m,marginLeft:h,marginBottom:g}=o,{insetLeft:b,insetRight:x}=this;return yt("svg:g",i).call(me,this,o,i).call(ge,this,{y:u&&f},0,Bt).call(M=>M.selectAll().data(e).enter().append("line").call(he,this).attr("x1",c&&!Gn(a)?y=>c[y]+b:h+b).attr("x2",s&&!Gn(a)?a.bandwidth?y=>s[y]+a.bandwidth()-x:y=>s[y]-x:d-m-x).attr("y1",u?y=>u[y]:(p+l-g)/2).attr("y2",u?y=>u[y]:(p+l-g)/2).call(Oe,this,r).call(cp,this,r,i)).node()}};function $x(t,e){let{x:n=wt,y:r,y1:o,y2:i,...a}=Hc(e);return[o,i]=Ex(r,o,i),new lp(t,{...a,x:n,y1:o,y2:i})}function Ix(t,e){let{y:n=wt,x:r,x1:o,x2:i,...a}=sp(e);return[o,i]=Ex(r,o,i),new dp(t,{...a,y:n,x1:o,x2:i})}function Ex(t,e,n){if(t==null){if(e===void 0){if(n!==void 0)return[0,n]}else if(n===void 0)return[0,e]}else{if(e===void 0)return n===void 0?[0,t]:[t,n];if(n===void 0)return[t,e]}return[e,n]}function Vc(t,...e){let n=e.length;for(let r=0,o=!0;r<n;++r)typeof e[r]!="function"&&(o&&(t=t.slice(),o=!1),t.splice(r,2,t[r]+e[r]+t[r+1]),e.splice(r,1),--r,--n);return r=>{let o=t[0];for(let i=0;i<n;++i)o+=e[i](r)+t[i+1];return o}}var K8={ariaLabel:"text",strokeLinejoin:"round",strokeWidth:3,paintOrder:"stroke"},Px="\xAD",Fo=class extends Nt{constructor(e,n={}){let{x:r,y:o,text:i=re(e)&&Nc(e)?wt:Ic,frameAnchor:a,textAnchor:f=/right$/i.test(a)?"end":/left$/i.test(a)?"start":"middle",lineAnchor:u=/^top/i.test(a)?"top":/^bottom/i.test(a)?"bottom":"middle",lineHeight:c=1,lineWidth:s=1/0,textOverflow:d,monospace:l,fontFamily:p=l?"ui-monospace, monospace":void 0,fontSize:m,fontStyle:h,fontVariant:g,fontWeight:b,rotate:x}=n,[M,y]=Et(x,0),[w,v]=e5(m);if(super(e,{x:{value:r,scale:"x",optional:!0},y:{value:o,scale:"y",optional:!0},fontSize:{value:w,optional:!0},rotate:{value:Fg(M),optional:!0},text:{value:i,filter:Tc,optional:!0}},n,K8),this.rotate=y,this.textAnchor=St(f,"middle"),this.lineAnchor=le(u,"lineAnchor",["top","middle","bottom"]),this.lineHeight=+c,this.lineWidth=+s,this.textOverflow=mp(d),this.monospace=!!l,this.fontFamily=It(p),this.fontSize=v,this.fontStyle=It(h),this.fontVariant=It(g),this.fontWeight=It(b),this.frameAnchor=Mo(a),!(this.lineWidth>=0))throw new Error(`invalid lineWidth: ${s}`);this.splitLines=yp(this),this.clipLine=bp(this)}render(e,n,r,o,i){let{x:a,y:f}=n,{x:u,y:c,rotate:s,text:d,title:l,fontSize:p}=r,{rotate:m}=this,[h,g]=Hn(this,o);return yt("svg:g",i).call(me,this,o,i).call(xp,this,d,o).call(ge,this,{x:u&&a,y:c&&f}).call(b=>b.selectAll().data(e).enter().append("text").call(he,this).call(Q8,this,d,l).attr("transform",Vc`translate(${u?x=>u[x]:h},${c?x=>c[x]:g})${s?x=>` rotate(${s[x]})`:m?` rotate(${m})`:""}`).call(et,"font-size",p&&(x=>p[x])).call(Oe,this,r)).node()}};function mp(t){return t==null?null:le(t,"textOverflow",["clip","ellipsis","clip-start","clip-end","ellipsis-start","ellipsis-middle","ellipsis-end"]).replace(/^(clip|ellipsis)$/,"$1-end")}function Q8(t,e,n,r){if(!n)return;let{lineAnchor:o,lineHeight:i,textOverflow:a,splitLines:f,clipLine:u}=e;t.each(function(c){let s=f(_e(n[c])??"").map(u),d=s.length,l=o==="top"?.71:o==="bottom"?1-d:(164-d*100)/200;if(d>1){let p=0;for(let m=0;m<d;++m){if(++p,!s[m])continue;let h=this.ownerDocument.createElementNS(Ye.svg,"tspan");h.setAttribute("x",0),m===p-1?h.setAttribute("y",`${(l+m)*i}em`):h.setAttribute("dy",`${p*i}em`),h.textContent=s[m],this.appendChild(h),p=0}}else l&&this.setAttribute("y",`${l*i}em`),this.textContent=s[0];if(a&&!r&&s[0]!==n[c]){let p=this.ownerDocument.createElementNS(Ye.svg,"title");p.textContent=n[c],this.appendChild(p)}})}function qo(t,{x:e,y:n,...r}={}){return r.frameAnchor===void 0&&([e,n]=Ar(e,n)),new Fo(t,{...r,x:e,y:n})}function hp(t,{x:e=wt,...n}={}){return new Fo(t,Cx({...n,x:e}))}function gp(t,{y:e=wt,...n}={}){return new Fo(t,_x({...n,y:e}))}function xp(t,e,n){et(t,"text-anchor",e.textAnchor),et(t,"font-family",e.fontFamily),et(t,"font-size",e.fontSize),et(t,"font-style",e.fontStyle),et(t,"font-variant",e.fontVariant===void 0?J8(n):e.fontVariant),et(t,"font-weight",e.fontWeight)}function J8(t){return t&&(Yg(t)||Yt(t))?"tabular-nums":void 0}var t5=new Set(["inherit","initial","revert","unset","xx-small","x-small","small","medium","large","x-large","xx-large","xxx-large","larger","smaller"]);function e5(t){return t==null||typeof t=="number"?[void 0,t]:typeof t!="string"?[t,void 0]:(t=t.trim().toLowerCase(),t5.has(t)||/^[+-]?\d*\.?\d+(e[+-]?\d+)?(\w*|%)$/.test(t)?[void 0,t]:[t,void 0])}function n5(t,e,n){let r=[],o,i=0;for(let[a,f,u]of r5(t)){if(o===void 0&&(o=a),i>o&&n(t,o,f)>e&&(r.push(t.slice(o,i)+(t[i-1]===Px?"-":"")),o=a),u){r.push(t.slice(o,f)),o=void 0;continue}i=f}return r}function*r5(t){let e=0,n=0,r=t.length;for(;n<r;){let o=1;switch(t[n]){case Px:case"-":++n,yield[e,n,!1],e=n;break;case" ":for(yield[e,n,!1];t[++n]===" ";);e=n;break;case"\r":t[n+1]===`
+}`)).call(Oo,s),M=R=>R.selectAll(".tick line").attr("y1",a+u-i),y,w=m?(R,O)=>R.rangeRound(O):(R,O)=>R.range(O),{type:v,domain:T,range:E,interpolate:I,scale:F,pivot:_}=t;if(I){let R=E===void 0?I:He(I.length===1?Ca(I):I,E);y=w(F.copy(),Wt(ht(c,o-f),Math.min(T.length+(_!==void 0),E===void 0?1/0:E.length)));let O=256,L=b.document.createElement("canvas");L.width=O,L.height=1;let S=L.getContext("2d");for(let A=0,N=O-1;A<O;++A)S.fillStyle=R(A/N),S.fillRect(A,0,1,1);x.append("image").attr("opacity",h).attr("x",c).attr("y",a).attr("width",o-c-f).attr("height",i-a-u).attr("preserveAspectRatio","none").attr("xlink:href",L.toDataURL())}else if(v==="threshold"){let R=T,O=l===void 0?L=>L:typeof l=="string"?Ve(l):l;y=w(hr().domain([-1,E.length-1]),[c,o-f]),x.append("g").attr("fill-opacity",h).selectAll().data(E).enter().append("rect").attr("x",(L,S)=>y(S-1)).attr("y",a).attr("width",(L,S)=>y(S)-y(S-1)).attr("height",i-a-u).attr("fill",L=>L),d=pt(R,(L,S)=>S),l=L=>O(R[L],L)}else y=w(Rn().domain(T),[c,o-f]),x.append("g").attr("fill-opacity",h).selectAll().data(T).enter().append("rect").attr("x",y).attr("y",a).attr("width",Math.max(0,y.bandwidth()-1)).attr("height",i-a-u).attr("fill",F),M=()=>{};return x.append("g").attr("transform",`translate(0,${i-u})`).call(xs(y).ticks(Array.isArray(d)?null:d,typeof l=="string"?l:void 0).tickFormat(typeof l=="function"?l:void 0).tickSize(r).tickValues(Array.isArray(d)?d:null)).attr("font-size",null).attr("font-family",null).attr("font-variant",St(p,"normal")).call(M).call(R=>R.select(".domain").remove()),n!==void 0&&x.append("text").attr("x",c).attr("y",a-6).attr("fill","currentColor").attr("font-weight","bold").text(n),x.node()}var ap=Math.PI/180;function up(t,{marker:e,markerStart:n=e,markerMid:r=e,markerEnd:o=e}={}){t.markerStart=fp(n),t.markerMid=fp(r),t.markerEnd=fp(o)}function fp(t){if(t==null||t===!1)return null;if(t===!0)return wx;if(typeof t=="function")return t;switch(`${t}`.toLowerCase()){case"none":return null;case"arrow":return bx("auto");case"arrow-reverse":return bx("auto-start-reverse");case"dot":return V8;case"circle":case"circle-fill":return wx;case"circle-stroke":return j8}throw new Error(`invalid marker: ${t}`)}function bx(t){return(e,n)=>yt("svg:marker",n).attr("viewBox","-5 -5 10 10").attr("markerWidth",6.67).attr("markerHeight",6.67).attr("orient",t).attr("fill","none").attr("stroke",e).attr("stroke-width",1.5).attr("stroke-linecap","round").attr("stroke-linejoin","round").call(r=>r.append("path").attr("d","M-1.5,-3l3,3l-3,3")).node()}function V8(t,e){return yt("svg:marker",e).attr("viewBox","-5 -5 10 10").attr("markerWidth",6.67).attr("markerHeight",6.67).attr("fill",t).attr("stroke","none").call(n=>n.append("circle").attr("r",2.5)).node()}function wx(t,e){return yt("svg:marker",e).attr("viewBox","-5 -5 10 10").attr("markerWidth",6.67).attr("markerHeight",6.67).attr("fill",t).attr("stroke","white").attr("stroke-width",1.5).call(n=>n.append("circle").attr("r",3)).node()}function j8(t,e){return yt("svg:marker",e).attr("viewBox","-5 -5 10 10").attr("markerWidth",6.67).attr("markerHeight",6.67).attr("fill","white").attr("stroke",t).attr("stroke-width",1.5).call(n=>n.append("circle").attr("r",3)).node()}var Z8=0;function cp(t,e,{stroke:n},r){return K8(t,e,n&&(o=>n[o]),r)}function K8(t,{markerStart:e,markerMid:n,markerEnd:r,stroke:o},i=()=>o,a){let f=new Map;function u(c){return function(s){let d=i(s),l=f.get(c);l||f.set(c,l=new Map);let p=l.get(d);if(!p){let m=this.parentNode.insertBefore(c(d,a),this),h=`plot-marker-${++Z8}`;m.setAttribute("id",h),l.set(d,p=`url(#${h})`)}return p}}e&&t.attr("marker-start",u(e)),n&&t.attr("marker-mid",u(n)),r&&t.attr("marker-end",u(r))}function Ia({inset:t,insetLeft:e,insetRight:n,...r}={}){return[e,n]=vx(t,e,n),{inset:t,insetLeft:e,insetRight:n,...r}}function Wc({inset:t,insetTop:e,insetBottom:n,...r}={}){return[e,n]=vx(t,e,n),{inset:t,insetTop:e,insetBottom:n,...r}}function vx(t,e,n){return t===void 0&&e===void 0&&n===void 0?Bt?[1,0]:[.5,.5]:[e,n]}function Mx(t,{interval:e}){return t={...on(t)},t.interval=kc(t.interval===void 0?e:t.interval),t}function Sx(t,e,n,r){let{[t]:o,[`${t}1`]:i,[`${t}2`]:a}=n,{value:f,interval:u}=Mx(o,n);if(f==null||u==null&&!r)return n;let c=Le(o);if(u==null){let p,m={transform:h=>p||(p=gt(h,f)),label:c};return{...n,[t]:void 0,[`${t}1`]:i===void 0?m:i,[`${t}2`]:a===void 0?m:a}}let s,d;function l(p){return d!==void 0&&p===s?d:d=pt(gt(s=p,f),m=>u.floor(m))}return e({...n,[t]:void 0,[`${t}1`]:i===void 0?{transform:l,label:c}:i,[`${t}2`]:a===void 0?{transform:p=>l(p).map(m=>u.offset(m)),label:c}:a})}function Tx(t,e,n){let{[t]:r}=n,{value:o,interval:i}=Mx(r,n);return o==null||i==null?n:e({...n,[t]:{label:Le(r),transform:a=>{let f=pt(gt(a,o),c=>i.floor(c)),u=f.map(c=>i.offset(c));return f.map(Yt(f)?(c,s)=>c==null||isNaN(c=+c)||(s=u[s],s==null)||isNaN(s=+s)?void 0:new Date((c+s)/2):(c,s)=>c==null||(s=u[s],s==null)?NaN:(+c+ +s)/2)}}})}function sp(t={}){return Sx("x",Ia,t)}function Gc(t={}){return Sx("y",Wc,t)}function _x(t={}){return Tx("x",Ia,t)}function Cx(t={}){return Tx("y",Wc,t)}var Ax={ariaLabel:"rule",fill:null,stroke:"currentColor"},lp=class extends Nt{constructor(e,n={}){let{x:r,y1:o,y2:i,inset:a=0,insetTop:f=a,insetBottom:u=a}=n;super(e,{x:{value:r,scale:"x",optional:!0},y1:{value:o,scale:"y",optional:!0},y2:{value:i,scale:"y",optional:!0}},Ea(n,"x"),Ax),this.insetTop=ct(f),this.insetBottom=ct(u),up(this,n)}render(e,n,r,o,i){let{x:a,y:f}=n,{x:u,y1:c,y2:s}=r,{width:d,height:l,marginTop:p,marginRight:m,marginLeft:h,marginBottom:g}=o,{insetTop:b,insetBottom:x}=this;return yt("svg:g",i).call(me,this,o,i).call(ge,this,{x:u&&a},Bt,0).call(M=>M.selectAll().data(e).enter().append("line").call(he,this).attr("x1",u?y=>u[y]:(h+d-m)/2).attr("x2",u?y=>u[y]:(h+d-m)/2).attr("y1",c&&!Wn(f)?y=>c[y]+b:p+b).attr("y2",s&&!Wn(f)?f.bandwidth?y=>s[y]+f.bandwidth()-x:y=>s[y]-x:l-g-x).call(Oe,this,r).call(cp,this,r,i)).node()}},dp=class extends Nt{constructor(e,n={}){let{x1:r,x2:o,y:i,inset:a=0,insetRight:f=a,insetLeft:u=a}=n;super(e,{y:{value:i,scale:"y",optional:!0},x1:{value:r,scale:"x",optional:!0},x2:{value:o,scale:"x",optional:!0}},Ea(n,"y"),Ax),this.insetRight=ct(f),this.insetLeft=ct(u),up(this,n)}render(e,n,r,o,i){let{x:a,y:f}=n,{y:u,x1:c,x2:s}=r,{width:d,height:l,marginTop:p,marginRight:m,marginLeft:h,marginBottom:g}=o,{insetLeft:b,insetRight:x}=this;return yt("svg:g",i).call(me,this,o,i).call(ge,this,{y:u&&f},0,Bt).call(M=>M.selectAll().data(e).enter().append("line").call(he,this).attr("x1",c&&!Wn(a)?y=>c[y]+b:h+b).attr("x2",s&&!Wn(a)?a.bandwidth?y=>s[y]+a.bandwidth()-x:y=>s[y]-x:d-m-x).attr("y1",u?y=>u[y]:(p+l-g)/2).attr("y2",u?y=>u[y]:(p+l-g)/2).call(Oe,this,r).call(cp,this,r,i)).node()}};function $x(t,e){let{x:n=wt,y:r,y1:o,y2:i,...a}=Gc(e);return[o,i]=Ix(r,o,i),new lp(t,{...a,x:n,y1:o,y2:i})}function Ex(t,e){let{y:n=wt,x:r,x1:o,x2:i,...a}=sp(e);return[o,i]=Ix(r,o,i),new dp(t,{...a,y:n,x1:o,x2:i})}function Ix(t,e,n){if(t==null){if(e===void 0){if(n!==void 0)return[0,n]}else if(n===void 0)return[0,e]}else{if(e===void 0)return n===void 0?[0,t]:[t,n];if(n===void 0)return[t,e]}return[e,n]}function Vc(t,...e){let n=e.length;for(let r=0,o=!0;r<n;++r)typeof e[r]!="function"&&(o&&(t=t.slice(),o=!1),t.splice(r,2,t[r]+e[r]+t[r+1]),e.splice(r,1),--r,--n);return r=>{let o=t[0];for(let i=0;i<n;++i)o+=e[i](r)+t[i+1];return o}}var Q8={ariaLabel:"text",strokeLinejoin:"round",strokeWidth:3,paintOrder:"stroke"},Lx="\xAD",Fo=class extends Nt{constructor(e,n={}){let{x:r,y:o,text:i=re(e)&&Nc(e)?wt:Ec,frameAnchor:a,textAnchor:f=/right$/i.test(a)?"end":/left$/i.test(a)?"start":"middle",lineAnchor:u=/^top/i.test(a)?"top":/^bottom/i.test(a)?"bottom":"middle",lineHeight:c=1,lineWidth:s=1/0,textOverflow:d,monospace:l,fontFamily:p=l?"ui-monospace, monospace":void 0,fontSize:m,fontStyle:h,fontVariant:g,fontWeight:b,rotate:x}=n,[M,y]=It(x,0),[w,v]=n5(m);if(super(e,{x:{value:r,scale:"x",optional:!0},y:{value:o,scale:"y",optional:!0},fontSize:{value:w,optional:!0},rotate:{value:Fg(M),optional:!0},text:{value:i,filter:Tc,optional:!0}},n,Q8),this.rotate=y,this.textAnchor=St(f,"middle"),this.lineAnchor=le(u,"lineAnchor",["top","middle","bottom"]),this.lineHeight=+c,this.lineWidth=+s,this.textOverflow=mp(d),this.monospace=!!l,this.fontFamily=Et(p),this.fontSize=v,this.fontStyle=Et(h),this.fontVariant=Et(g),this.fontWeight=Et(b),this.frameAnchor=Mo(a),!(this.lineWidth>=0))throw new Error(`invalid lineWidth: ${s}`);this.splitLines=yp(this),this.clipLine=bp(this)}render(e,n,r,o,i){let{x:a,y:f}=n,{x:u,y:c,rotate:s,text:d,title:l,fontSize:p}=r,{rotate:m}=this,[h,g]=Gn(this,o);return yt("svg:g",i).call(me,this,o,i).call(xp,this,d,o).call(ge,this,{x:u&&a,y:c&&f}).call(b=>b.selectAll().data(e).enter().append("text").call(he,this).call(J8,this,d,l).attr("transform",Vc`translate(${u?x=>u[x]:h},${c?x=>c[x]:g})${s?x=>` rotate(${s[x]})`:m?` rotate(${m})`:""}`).call(et,"font-size",p&&(x=>p[x])).call(Oe,this,r)).node()}};function mp(t){return t==null?null:le(t,"textOverflow",["clip","ellipsis","clip-start","clip-end","ellipsis-start","ellipsis-middle","ellipsis-end"]).replace(/^(clip|ellipsis)$/,"$1-end")}function J8(t,e,n,r){if(!n)return;let{lineAnchor:o,lineHeight:i,textOverflow:a,splitLines:f,clipLine:u}=e;t.each(function(c){let s=f(_e(n[c])??"").map(u),d=s.length,l=o==="top"?.71:o==="bottom"?1-d:(164-d*100)/200;if(d>1){let p=0;for(let m=0;m<d;++m){if(++p,!s[m])continue;let h=this.ownerDocument.createElementNS(Ye.svg,"tspan");h.setAttribute("x",0),m===p-1?h.setAttribute("y",`${(l+m)*i}em`):h.setAttribute("dy",`${p*i}em`),h.textContent=s[m],this.appendChild(h),p=0}}else l&&this.setAttribute("y",`${l*i}em`),this.textContent=s[0];if(a&&!r&&s[0]!==n[c]){let p=this.ownerDocument.createElementNS(Ye.svg,"title");p.textContent=n[c],this.appendChild(p)}})}function qo(t,{x:e,y:n,...r}={}){return r.frameAnchor===void 0&&([e,n]=Ar(e,n)),new Fo(t,{...r,x:e,y:n})}function hp(t,{x:e=wt,...n}={}){return new Fo(t,Cx({...n,x:e}))}function gp(t,{y:e=wt,...n}={}){return new Fo(t,_x({...n,y:e}))}function xp(t,e,n){et(t,"text-anchor",e.textAnchor),et(t,"font-family",e.fontFamily),et(t,"font-size",e.fontSize),et(t,"font-style",e.fontStyle),et(t,"font-variant",e.fontVariant===void 0?t5(n):e.fontVariant),et(t,"font-weight",e.fontWeight)}function t5(t){return t&&(Yg(t)||Yt(t))?"tabular-nums":void 0}var e5=new Set(["inherit","initial","revert","unset","xx-small","x-small","small","medium","large","x-large","xx-large","xxx-large","larger","smaller"]);function n5(t){return t==null||typeof t=="number"?[void 0,t]:typeof t!="string"?[t,void 0]:(t=t.trim().toLowerCase(),e5.has(t)||/^[+-]?\d*\.?\d+(e[+-]?\d+)?(\w*|%)$/.test(t)?[void 0,t]:[t,void 0])}function r5(t,e,n){let r=[],o,i=0;for(let[a,f,u]of o5(t)){if(o===void 0&&(o=a),i>o&&n(t,o,f)>e&&(r.push(t.slice(o,i)+(t[i-1]===Lx?"-":"")),o=a),u){r.push(t.slice(o,f)),o=void 0;continue}i=f}return r}function*o5(t){let e=0,n=0,r=t.length;for(;n<r;){let o=1;switch(t[n]){case Lx:case"-":++n,yield[e,n,!1],e=n;break;case" ":for(yield[e,n,!1];t[++n]===" ";);e=n;break;case"\r":t[n+1]===`
 `&&++o;case`
-`:yield[e,n,!0],n+=o,e=n;break;default:++n;break}}yield[e,n,!0]}var kx={a:56,b:63,c:57,d:63,e:58,f:37,g:62,h:60,i:26,j:26,k:55,l:26,m:88,n:60,o:60,p:62,q:62,r:39,s:54,t:38,u:60,v:55,w:79,x:54,y:55,z:55,A:69,B:67,C:73,D:74,E:61,F:58,G:76,H:75,I:28,J:55,K:67,L:58,M:89,N:75,O:78,P:65,Q:78,R:67,S:65,T:65,U:75,V:69,W:98,X:69,Y:67,Z:67,0:64,1:48,2:62,3:64,4:66,5:63,6:65,7:58,8:65,9:65," ":29,"!":32,'"':49,"'":31,"(":39,")":39,",":31,"-":48,".":31,"/":32,":":31,";":31,"?":52,"\u2018":31,"\u2019":31,"\u201C":47,"\u201D":47,"\u2026":82};function jc(t,e=0,n=t.length){let r=0;for(let o=e;o<n;o=zo(t,o))r+=kx[t[o]]??(Ox(t,o)?120:kx.e);return r}function Zc(t,e=0,n=t.length){let r=0;for(let o=e;o<n;o=zo(t,o))r+=Ox(t,o)?200:100;return r}function yp({monospace:t,lineWidth:e,textOverflow:n}){if(n!=null||e==1/0)return i=>i.split(/\r\n?|\n/g);let r=t?Zc:jc,o=e*100;return i=>n5(i,o,r)}function bp({monospace:t,lineWidth:e,textOverflow:n}){if(n==null||e==1/0)return i=>i;let r=t?Zc:jc,o=e*100;switch(n){case"clip-start":return i=>Dx(i,o,r,"");case"clip-end":return i=>Nx(i,o,r,"");case"ellipsis-start":return i=>Dx(i,o,r,Er);case"ellipsis-middle":return i=>o5(i,o,r,Er);case"ellipsis-end":return i=>Nx(i,o,r,Er)}}var Er="\u2026";function kr(t,e,n,r){let o=[],i=0;for(let a=0,f=0,u=t.length;a<u;a=f){f=zo(t,a);let c=n(t,a,f);if(i+c>e){for(i+=r;i>e&&a>0;)f=a,a=o.pop(),i-=n(t,a,f);return[a,e-i]}i+=c,o.push(a)}return[-1,0]}function Nx(t,e,n,r){t=t.trim();let o=n(r),[i]=kr(t,e,n,o);return i<0?t:t.slice(0,i).trimEnd()+r}function o5(t,e,n,r){t=t.trim();let o=n(t);if(o<=e)return t;let i=n(r)/2,[a,f]=kr(t,e/2,n,i),[u]=kr(t,o-e/2-f+i,n,-i);return u<0?r:t.slice(0,a).trimEnd()+r+t.slice(zo(t,u)).trimStart()}function Dx(t,e,n,r){t=t.trim();let o=n(t);if(o<=e)return t;let i=n(r),[a]=kr(t,o-e+i,n,-i);return a<0?r:r+t.slice(zo(t,a)).trimStart()}var pp=/[\p{Combining_Mark}\p{Emoji_Modifier}]+/uy,Rx=/\p{Extended_Pictographic}/uy;function zo(t,e){return e+=i5(t,e)?2:1,f5(t,e)&&(e=pp.lastIndex),a5(t,e)?zo(t,e+1):e}function Lx(t,e){return t.charCodeAt(e)<128}function i5(t,e){let n=t.charCodeAt(e);if(n>=55296&&n<56320){let r=t.charCodeAt(e+1);return r>=56320&&r<57344}return!1}function a5(t,e){return t.charCodeAt(e)===8205}function f5(t,e){return Lx(t,e)?!1:(pp.lastIndex=e,pp.test(t))}function Ox(t,e){return Lx(t,e)?!1:(Rx.lastIndex=e,Rx.test(t))}var u5={ariaLabel:"vector",fill:"none",stroke:"currentColor",strokeWidth:1.5,strokeLinejoin:"round",strokeLinecap:"round"},Fx=3.5,c5=Fx*5,qx={draw(t,e,n){let r=e*n/c5;t.moveTo(0,0),t.lineTo(0,-e),t.moveTo(-r,r-e),t.lineTo(0,-e),t.lineTo(r,r-e)}},s5={draw(t,e,n){t.moveTo(-n,0),t.lineTo(0,-e),t.lineTo(n,0)}},l5=new Map([["arrow",qx],["spike",s5]]);function d5(t){return t&&typeof t.draw=="function"}function p5(t){if(d5(t))return t;let e=l5.get(`${t}`.toLowerCase());if(e)return e;throw new Error(`invalid shape: ${t}`)}var Kc=class extends Nt{constructor(e,n={}){let{x:r,y:o,r:i=Fx,length:a,rotate:f,shape:u=qx,anchor:c="middle",frameAnchor:s}=n,[d,l]=Et(a,12),[p,m]=Et(f,0);super(e,{x:{value:r,scale:"x",optional:!0},y:{value:o,scale:"y",optional:!0},length:{value:d,scale:"length",optional:!0},rotate:{value:p,optional:!0}},n,u5),this.r=+i,this.length=l,this.rotate=m,this.shape=p5(u),this.anchor=le(c,"anchor",["start","middle","end"]),this.frameAnchor=Mo(s)}render(e,n,r,o,i){let{x:a,y:f}=n,{x:u,y:c,length:s,rotate:d}=r,{length:l,rotate:p,anchor:m,shape:h,r:g}=this,[b,x]=Hn(this,o);return yt("svg:g",i).call(me,this,o,i).call(ge,this,{x:u&&a,y:c&&f}).call(M=>M.selectAll().data(e).enter().append("path").call(he,this).attr("transform",Vc`translate(${u?y=>u[y]:b},${c?y=>c[y]:x})${d?y=>` rotate(${d[y]})`:p?` rotate(${p})`:""}${m==="start"?"":m==="end"?s?y=>` translate(0,${s[y]})`:` translate(0,${l})`:s?y=>` translate(0,${s[y]/2})`:` translate(0,${l/2})`}`).attr("d",s?y=>{let w=Vr();return h.draw(w,s[y],g),w}:(()=>{let y=Vr();return h.draw(y,l,g),y})()).call(Oe,this,r)).node()}};function zx(t,e={}){let{x:n=wt,...r}=e;return new Kc(t,{...r,x:n})}function Yx(t,e={}){let{y:n=wt,...r}=e;return new Kc(t,{...r,y:n})}function jn(t,e){return arguments.length<2&&!re(t)&&(e=t,t=null),e===void 0&&(e={}),[t,e]}function Qc({anchor:t}={},e){return t===void 0?e[0]:le(t,"anchor",e)}function Bx(t){return Qc(t,["left","right"])}function Ux(t){return Qc(t,["right","left"])}function Xx(t){return Qc(t,["bottom","top"])}function Wx(t){return Qc(t,["top","bottom"])}function Jc(){let[t,e]=jn(...arguments);return Gx("y",Bx(e),t,e)}function wp(){let[t,e]=jn(...arguments);return Gx("fy",Ux(e),t,e)}function Nr(){let[t,e]=jn(...arguments);return Hx("x",Xx(e),t,e)}function vp(){let[t,e]=jn(...arguments);return Hx("fx",Wx(e),t,e)}function Gx(t,e,n,{color:r="currentColor",opacity:o=1,stroke:i=r,strokeOpacity:a=o,strokeWidth:f=1,fill:u=r,fillOpacity:c=o,textAnchor:s,textStroke:d,textStrokeOpacity:l,textStrokeWidth:p,tickSize:m=t==="y"?6:0,tickPadding:h,tickRotate:g,x:b,margin:x,marginTop:M=x===void 0?20:x,marginRight:y=x===void 0?e==="right"?40:0:x,marginBottom:w=x===void 0?20:x,marginLeft:v=x===void 0?e==="left"?40:0:x,label:T,labelAnchor:I,labelArrow:E,labelOffset:F,..._}){return m=ct(m),h=ct(h),g=ct(g),I!==void 0&&(I=le(I,"labelAnchor",["center","top","bottom"])),E=ey(E),ep(m&&!Lt(i)?m5(t,e,n,{stroke:i,strokeOpacity:a,strokeWidth:f,tickSize:m,tickPadding:h,tickRotate:g,x:b,..._}):null,Lt(u)?null:g5(t,e,n,{fill:u,fillOpacity:c,stroke:d,strokeOpacity:l,strokeWidth:p,textAnchor:s,tickSize:m,tickPadding:h,tickRotate:g,x:b,marginTop:M,marginRight:y,marginBottom:w,marginLeft:v,..._}),!Lt(u)&&T!==null?qo([],Kx({fill:u,fillOpacity:c,..._},function(R,O,P,S,A){let N=S[t],{marginTop:L,marginRight:D,marginBottom:tt,marginLeft:Z}=t==="y"&&A.inset||A,G=I??(N.bandwidth?"center":"top"),Q=F??(e==="right"?D:Z)-3;return G==="center"?(this.textAnchor=void 0,this.lineAnchor=e==="right"?"bottom":"top",this.frameAnchor=e,this.rotate=-90):(this.textAnchor=e==="right"?"end":"start",this.lineAnchor=G,this.frameAnchor=`${G}-${e}`,this.rotate=0),this.dy=G==="top"?3-L:G==="bottom"?tt-3:0,this.dx=e==="right"?Q:-Q,this.ariaLabel=`${t}-axis label`,{facets:[[0]],channels:{text:{value:[ty(t,N,{anchor:e,label:T,labelAnchor:G,labelArrow:E})]}}}})):null)}function Hx(t,e,n,{color:r="currentColor",opacity:o=1,stroke:i=r,strokeOpacity:a=o,strokeWidth:f=1,fill:u=r,fillOpacity:c=o,textAnchor:s,textStroke:d,textStrokeOpacity:l,textStrokeWidth:p,tickSize:m=t==="x"?6:0,tickPadding:h,tickRotate:g,y:b,margin:x,marginTop:M=x===void 0?e==="top"?30:0:x,marginRight:y=x===void 0?20:x,marginBottom:w=x===void 0?e==="bottom"?30:0:x,marginLeft:v=x===void 0?20:x,label:T,labelAnchor:I,labelArrow:E,labelOffset:F,..._}){return m=ct(m),h=ct(h),g=ct(g),I!==void 0&&(I=le(I,"labelAnchor",["center","left","right"])),E=ey(E),ep(m&&!Lt(i)?h5(t,e,n,{stroke:i,strokeOpacity:a,strokeWidth:f,tickSize:m,tickPadding:h,tickRotate:g,y:b,..._}):null,Lt(u)?null:x5(t,e,n,{fill:u,fillOpacity:c,stroke:d,strokeOpacity:l,strokeWidth:p,textAnchor:s,tickSize:m,tickPadding:h,tickRotate:g,y:b,marginTop:M,marginRight:y,marginBottom:w,marginLeft:v,..._}),!Lt(u)&&T!==null?qo([],Kx({fill:u,fillOpacity:c,..._},function(R,O,P,S,A){let N=S[t],{marginTop:L,marginRight:D,marginBottom:tt,marginLeft:Z}=t==="x"&&A.inset||A,G=I??(N.bandwidth?"center":"right"),Q=F??(e==="top"?L:tt)-3;return G==="center"?(this.frameAnchor=e,this.textAnchor=void 0):(this.frameAnchor=`${e}-${G}`,this.textAnchor=G==="right"?"end":"start"),this.lineAnchor=e,this.dy=e==="top"?-Q:Q,this.dx=G==="right"?D-3:G==="left"?3-Z:0,this.ariaLabel=`${t}-axis label`,{facets:[[0]],channels:{text:{value:[ty(t,N,{anchor:e,label:T,labelAnchor:G,labelArrow:E})]}}}})):null)}function m5(t,e,n,{strokeWidth:r=1,strokeLinecap:o=null,strokeLinejoin:i=null,facetAnchor:a=e+(t==="y"?"-empty":""),frameAnchor:f=e,tickSize:u,inset:c=0,insetLeft:s=c,insetRight:d=c,dx:l=0,y:p=t==="y"?void 0:null,...m}){return Yo(Yx,t,`${t}-axis tick`,n,{strokeWidth:r,strokeLinecap:o,strokeLinejoin:i,facetAnchor:a,frameAnchor:f,y:p,...m,dx:e==="left"?+l-Bt+ +s:+l+Bt-d,anchor:"start",length:u,shape:e==="left"?w5:v5})}function h5(t,e,n,{strokeWidth:r=1,strokeLinecap:o=null,strokeLinejoin:i=null,facetAnchor:a=e+(t==="x"?"-empty":""),frameAnchor:f=e,tickSize:u,inset:c=0,insetTop:s=c,insetBottom:d=c,dy:l=0,x:p=t==="x"?void 0:null,...m}){return Yo(zx,t,`${t}-axis tick`,n,{strokeWidth:r,strokeLinejoin:i,strokeLinecap:o,facetAnchor:a,frameAnchor:f,x:p,...m,dy:e==="bottom"?+l-Bt-d:+l+Bt+ +s,anchor:"start",length:u,shape:e==="bottom"?y5:b5})}function g5(t,e,n,{facetAnchor:r=e+(t==="y"?"-empty":""),frameAnchor:o=e,tickSize:i,tickRotate:a=0,tickPadding:f=Math.max(3,9-i)+(Math.abs(a)>60?4*Math.cos(a*ap):0),tickFormat:u,text:c=typeof u=="function"?u:void 0,textAnchor:s=Math.abs(a)>60?"middle":e==="left"?"end":"start",lineAnchor:d=a>60?"top":a<-60?"bottom":"middle",fontVariant:l,inset:p=0,insetLeft:m=p,insetRight:h=p,dx:g=0,y:b=t==="y"?void 0:null,...x}){return Yo(gp,t,`${t}-axis tick label`,n,{facetAnchor:r,frameAnchor:o,text:c===void 0?null:c,textAnchor:s,lineAnchor:d,fontVariant:l,rotate:a,y:b,...x,dx:e==="left"?+g-i-f+ +m:+g+ +i+ +f-h},function(M,y,w,v){l===void 0&&(this.fontVariant=Jx(M)),c===void 0&&(v.text=Qx(M,y,w,u,e))})}function x5(t,e,n,{facetAnchor:r=e+(t==="x"?"-empty":""),frameAnchor:o=e,tickSize:i,tickRotate:a=0,tickPadding:f=Math.max(3,9-i)+(Math.abs(a)>=10?4*Math.cos(a*ap):0),tickFormat:u,text:c=typeof u=="function"?u:void 0,textAnchor:s=Math.abs(a)>=10?a<0^e==="bottom"?"start":"end":"middle",lineAnchor:d=Math.abs(a)>=10?"middle":e==="bottom"?"top":"bottom",fontVariant:l,inset:p=0,insetTop:m=p,insetBottom:h=p,dy:g=0,x:b=t==="x"?void 0:null,...x}){return Yo(hp,t,`${t}-axis tick label`,n,{facetAnchor:r,frameAnchor:o,text:c===void 0?null:c,textAnchor:s,lineAnchor:d,fontVariant:l,rotate:a,x:b,...x,dy:e==="bottom"?+g+ +i+ +f-h:+g-i-f+ +m},function(M,y,w,v){l===void 0&&(this.fontVariant=Jx(M)),c===void 0&&(v.text=Qx(M,y,w,u,e))})}function Mp(){let[t,e]=jn(...arguments);return Vx("y",Bx(e),t,e)}function Sp(){let[t,e]=jn(...arguments);return Vx("fy",Ux(e),t,e)}function Tp(){let[t,e]=jn(...arguments);return jx("x",Xx(e),t,e)}function _p(){let[t,e]=jn(...arguments);return jx("fx",Wx(e),t,e)}function Vx(t,e,n,{y:r=t==="y"?void 0:null,x:o=null,x1:i=e==="left"?o:null,x2:a=e==="right"?o:null,...f}){return Yo(Ix,t,`${t}-grid`,n,{y:r,x1:i,x2:a,...Zx(f)})}function jx(t,e,n,{x:r=t==="x"?void 0:null,y:o=null,y1:i=e==="top"?o:null,y2:a=e==="bottom"?o:null,...f}){return Yo($x,t,`${t}-grid`,n,{x:r,y1:i,y2:a,...Zx(f)})}function Zx({color:t="currentColor",opacity:e=.1,stroke:n=t,strokeOpacity:r=e,strokeWidth:o=1,...i}){return{stroke:n,strokeOpacity:r,strokeWidth:o,...i}}function Kx({fill:t,fillOpacity:e,fontFamily:n,fontSize:r,fontStyle:o,fontWeight:i,monospace:a,pointerEvents:f,shapeRendering:u},c){return[,t]=ie(t),[,e]=Et(e),{facet:"super",x:null,y:null,fill:t,fillOpacity:e,fontFamily:n,fontSize:r,fontStyle:o,fontWeight:i,monospace:a,pointerEvents:f,shapeRendering:u,initializer:c}}function Yo(t,e,n,r,o,i){let a;function f(s,d,l,p,m,h){let g=s==null&&(e==="fx"||e==="fy"),{[e]:b}=p;if(!b)throw new Error(`missing scale: ${e}`);let{ticks:x,tickSpacing:M,interval:y}=o;if(qc(b)&&typeof x=="string"&&(y=x,x=void 0),s==null){if(re(x))s=kt(x);else if(b.ticks)if(x!==void 0)s=b.ticks(x);else if(y=rn(y===void 0?b.interval:y,b.type),y!==void 0){let[v,T]=Ct(b.domain());s=y.range(v,y.offset(y.floor(T)))}else{let[v,T]=Ct(b.range());x=(T-v)/(M===void 0?e==="x"?80:35:M),s=b.ticks(x)}else s=b.domain();e==="y"||e==="x"?d=[ne(s)]:a[e]={scale:e,value:wt}}i?.call(this,b,s,x,a);let w=Object.fromEntries(Object.entries(a).map(([v,T])=>[v,{...T,value:gt(s,T.value)}]));return g&&(d=h.filterFacets(s,w)),{data:s,facets:d,channels:w}}let u=Ir(o).initializer,c=t(r,Ir({...o,initializer:f},u));return r==null?(a=c.channels,c.channels={}):a={},c.ariaLabel=n,c}function Qx(t,e,n,r,o){return{value:Bo(t,e,n,r,o)}}function Bo(t,e,n,r,o){return r===void 0&&qc(t)?Tg(t,e,n,o):t.tickFormat?t.tickFormat(re(n)?null:n,r):r===void 0?Mg(t.interval)?bn("%Y"):Sg(t.interval)?Un("%Y"):_e:typeof r=="string"?(Yt(t.domain())?bn:Ve)(r):Wn(r)}var y5={draw(t,e){t.moveTo(0,0),t.lineTo(0,e)}},b5={draw(t,e){t.moveTo(0,0),t.lineTo(0,-e)}},w5={draw(t,e){t.moveTo(0,0),t.lineTo(-e,0)}},v5={draw(t,e){t.moveTo(0,0),t.lineTo(e,0)}};function Jx(t){return t.bandwidth&&!t.interval?void 0:"tabular-nums"}function M5(t){return Math.sign(vn(t.domain()))*Math.sign(vn(t.range()))}function ty(t,e,{anchor:n,label:r=e.label,labelAnchor:o,labelArrow:i}={}){if(!(r==null||r.inferred&&S5(e)&&/^(date|time|year)$/i.test(r))){if(r=String(r),i==="auto"&&(i=(!e.bandwidth||e.interval)&&!/[↑↓→←]/.test(r)),!i)return r;if(i===!0){let a=M5(e);a&&(i=/x$/.test(t)||o==="center"?/x$/.test(t)===a<0?"left":"right":a<0?"up":"down")}switch(i){case"left":return`\u2190 ${r}`;case"right":return`${r} \u2192`;case"up":return n==="right"?`${r} \u2191`:`\u2191 ${r}`;case"down":return n==="right"?`${r} \u2193`:`\u2193 ${r}`}return r}}function ey(t="auto"){return Lt(t)?!1:typeof t=="boolean"?t:le(t,"labelArrow",["auto","up","right","down","left"])}function S5(t){return qc(t)||t.interval!=null}function ny(t,e){if(e==null)return e;let n=t(e);if(!n)throw new Error(`scale not found: ${e}`);return n}function ry(t,{opacity:e,...n}={}){if(!fn(t)&&!jd(t))throw new Error(`swatches legend requires ordinal or threshold color scale (not ${t.type})`);return iy(t,n,(r,o,i,a)=>r.append("svg").attr("width",i).attr("height",a).attr("fill",o.scale).attr("fill-opacity",Et(e)[1]).append("rect").attr("width","100%").attr("height","100%"))}function oy(t,{fill:e=t.hint?.fill!==void 0?t.hint.fill:"none",fillOpacity:n=1,stroke:r=t.hint?.stroke!==void 0?t.hint.stroke:Lt(e)?"currentColor":"none",strokeOpacity:o=1,strokeWidth:i=1.5,r:a=4.5,...f}={},u){let[c,s]=ie(e),[d,l]=ie(r),p=ny(u,c),m=ny(u,d),h=a*a*Math.PI;return n=Et(n)[1],o=Et(o)[1],i=Et(i)[1],iy(t,f,(g,b,x,M)=>g.append("svg").attr("viewBox","-8 -8 16 16").attr("width",x).attr("height",M).attr("fill",c==="color"?y=>p.scale(y):s).attr("fill-opacity",n).attr("stroke",d==="color"?y=>m.scale(y):l).attr("stroke-opacity",o).attr("stroke-width",i).append("path").attr("d",y=>{let w=Vr();return t.scale(y).draw(w,h),w}))}function iy(t,e={},n){let{columns:r,tickFormat:o,fontVariant:i=Wc(t),swatchSize:a=15,swatchWidth:f=a,swatchHeight:u=a,marginLeft:c=0,className:s,style:d,width:l}=e,p=Eo(e);s=Lo(s),typeof o!="function"&&(o=Bo(t.scale,t.domain,void 0,o));let m=yt("div",p).attr("class",`${s}-swatches ${s}-swatches-${r!=null?"columns":"wrap"}`),h;return r!=null?(h=`.${s}-swatches-columns .${s}-swatch {
+`:yield[e,n,!0],n+=o,e=n;break;default:++n;break}}yield[e,n,!0]}var kx={a:56,b:63,c:57,d:63,e:58,f:37,g:62,h:60,i:26,j:26,k:55,l:26,m:88,n:60,o:60,p:62,q:62,r:39,s:54,t:38,u:60,v:55,w:79,x:54,y:55,z:55,A:69,B:67,C:73,D:74,E:61,F:58,G:76,H:75,I:28,J:55,K:67,L:58,M:89,N:75,O:78,P:65,Q:78,R:67,S:65,T:65,U:75,V:69,W:98,X:69,Y:67,Z:67,0:64,1:48,2:62,3:64,4:66,5:63,6:65,7:58,8:65,9:65," ":29,"!":32,'"':49,"'":31,"(":39,")":39,",":31,"-":48,".":31,"/":32,":":31,";":31,"?":52,"\u2018":31,"\u2019":31,"\u201C":47,"\u201D":47,"\u2026":82};function jc(t,e=0,n=t.length){let r=0;for(let o=e;o<n;o=zo(t,o))r+=kx[t[o]]??(Ox(t,o)?120:kx.e);return r}function Zc(t,e=0,n=t.length){let r=0;for(let o=e;o<n;o=zo(t,o))r+=Ox(t,o)?200:100;return r}function yp({monospace:t,lineWidth:e,textOverflow:n}){if(n!=null||e==1/0)return i=>i.split(/\r\n?|\n/g);let r=t?Zc:jc,o=e*100;return i=>r5(i,o,r)}function bp({monospace:t,lineWidth:e,textOverflow:n}){if(n==null||e==1/0)return i=>i;let r=t?Zc:jc,o=e*100;switch(n){case"clip-start":return i=>Dx(i,o,r,"");case"clip-end":return i=>Nx(i,o,r,"");case"ellipsis-start":return i=>Dx(i,o,r,Ir);case"ellipsis-middle":return i=>i5(i,o,r,Ir);case"ellipsis-end":return i=>Nx(i,o,r,Ir)}}var Ir="\u2026";function kr(t,e,n,r){let o=[],i=0;for(let a=0,f=0,u=t.length;a<u;a=f){f=zo(t,a);let c=n(t,a,f);if(i+c>e){for(i+=r;i>e&&a>0;)f=a,a=o.pop(),i-=n(t,a,f);return[a,e-i]}i+=c,o.push(a)}return[-1,0]}function Nx(t,e,n,r){t=t.trim();let o=n(r),[i]=kr(t,e,n,o);return i<0?t:t.slice(0,i).trimEnd()+r}function i5(t,e,n,r){t=t.trim();let o=n(t);if(o<=e)return t;let i=n(r)/2,[a,f]=kr(t,e/2,n,i),[u]=kr(t,o-e/2-f+i,n,-i);return u<0?r:t.slice(0,a).trimEnd()+r+t.slice(zo(t,u)).trimStart()}function Dx(t,e,n,r){t=t.trim();let o=n(t);if(o<=e)return t;let i=n(r),[a]=kr(t,o-e+i,n,-i);return a<0?r:r+t.slice(zo(t,a)).trimStart()}var pp=/[\p{Combining_Mark}\p{Emoji_Modifier}]+/uy,Rx=/\p{Extended_Pictographic}/uy;function zo(t,e){return e+=a5(t,e)?2:1,u5(t,e)&&(e=pp.lastIndex),f5(t,e)?zo(t,e+1):e}function Px(t,e){return t.charCodeAt(e)<128}function a5(t,e){let n=t.charCodeAt(e);if(n>=55296&&n<56320){let r=t.charCodeAt(e+1);return r>=56320&&r<57344}return!1}function f5(t,e){return t.charCodeAt(e)===8205}function u5(t,e){return Px(t,e)?!1:(pp.lastIndex=e,pp.test(t))}function Ox(t,e){return Px(t,e)?!1:(Rx.lastIndex=e,Rx.test(t))}var c5={ariaLabel:"vector",fill:"none",stroke:"currentColor",strokeWidth:1.5,strokeLinejoin:"round",strokeLinecap:"round"},Fx=3.5,s5=Fx*5,qx={draw(t,e,n){let r=e*n/s5;t.moveTo(0,0),t.lineTo(0,-e),t.moveTo(-r,r-e),t.lineTo(0,-e),t.lineTo(r,r-e)}},l5={draw(t,e,n){t.moveTo(-n,0),t.lineTo(0,-e),t.lineTo(n,0)}},d5=new Map([["arrow",qx],["spike",l5]]);function p5(t){return t&&typeof t.draw=="function"}function m5(t){if(p5(t))return t;let e=d5.get(`${t}`.toLowerCase());if(e)return e;throw new Error(`invalid shape: ${t}`)}var Kc=class extends Nt{constructor(e,n={}){let{x:r,y:o,r:i=Fx,length:a,rotate:f,shape:u=qx,anchor:c="middle",frameAnchor:s}=n,[d,l]=It(a,12),[p,m]=It(f,0);super(e,{x:{value:r,scale:"x",optional:!0},y:{value:o,scale:"y",optional:!0},length:{value:d,scale:"length",optional:!0},rotate:{value:p,optional:!0}},n,c5),this.r=+i,this.length=l,this.rotate=m,this.shape=m5(u),this.anchor=le(c,"anchor",["start","middle","end"]),this.frameAnchor=Mo(s)}render(e,n,r,o,i){let{x:a,y:f}=n,{x:u,y:c,length:s,rotate:d}=r,{length:l,rotate:p,anchor:m,shape:h,r:g}=this,[b,x]=Gn(this,o);return yt("svg:g",i).call(me,this,o,i).call(ge,this,{x:u&&a,y:c&&f}).call(M=>M.selectAll().data(e).enter().append("path").call(he,this).attr("transform",Vc`translate(${u?y=>u[y]:b},${c?y=>c[y]:x})${d?y=>` rotate(${d[y]})`:p?` rotate(${p})`:""}${m==="start"?"":m==="end"?s?y=>` translate(0,${s[y]})`:` translate(0,${l})`:s?y=>` translate(0,${s[y]/2})`:` translate(0,${l/2})`}`).attr("d",s?y=>{let w=Vr();return h.draw(w,s[y],g),w}:(()=>{let y=Vr();return h.draw(y,l,g),y})()).call(Oe,this,r)).node()}};function zx(t,e={}){let{x:n=wt,...r}=e;return new Kc(t,{...r,x:n})}function Yx(t,e={}){let{y:n=wt,...r}=e;return new Kc(t,{...r,y:n})}function jn(t,e){return arguments.length<2&&!re(t)&&(e=t,t=null),e===void 0&&(e={}),[t,e]}function Qc({anchor:t}={},e){return t===void 0?e[0]:le(t,"anchor",e)}function Bx(t){return Qc(t,["left","right"])}function Ux(t){return Qc(t,["right","left"])}function Xx(t){return Qc(t,["bottom","top"])}function Hx(t){return Qc(t,["top","bottom"])}function Jc(){let[t,e]=jn(...arguments);return Wx("y",Bx(e),t,e)}function wp(){let[t,e]=jn(...arguments);return Wx("fy",Ux(e),t,e)}function Nr(){let[t,e]=jn(...arguments);return Gx("x",Xx(e),t,e)}function vp(){let[t,e]=jn(...arguments);return Gx("fx",Hx(e),t,e)}function Wx(t,e,n,{color:r="currentColor",opacity:o=1,stroke:i=r,strokeOpacity:a=o,strokeWidth:f=1,fill:u=r,fillOpacity:c=o,textAnchor:s,textStroke:d,textStrokeOpacity:l,textStrokeWidth:p,tickSize:m=t==="y"?6:0,tickPadding:h,tickRotate:g,x:b,margin:x,marginTop:M=x===void 0?20:x,marginRight:y=x===void 0?e==="right"?40:0:x,marginBottom:w=x===void 0?20:x,marginLeft:v=x===void 0?e==="left"?40:0:x,label:T,labelAnchor:E,labelArrow:I,labelOffset:F,..._}){return m=ct(m),h=ct(h),g=ct(g),E!==void 0&&(E=le(E,"labelAnchor",["center","top","bottom"])),I=ey(I),ep(m&&!Pt(i)?h5(t,e,n,{stroke:i,strokeOpacity:a,strokeWidth:f,tickSize:m,tickPadding:h,tickRotate:g,x:b,..._}):null,Pt(u)?null:x5(t,e,n,{fill:u,fillOpacity:c,stroke:d,strokeOpacity:l,strokeWidth:p,textAnchor:s,tickSize:m,tickPadding:h,tickRotate:g,x:b,marginTop:M,marginRight:y,marginBottom:w,marginLeft:v,..._}),!Pt(u)&&T!==null?qo([],Kx({fill:u,fillOpacity:c,..._},function(R,O,L,S,A){let N=S[t],{marginTop:P,marginRight:D,marginBottom:tt,marginLeft:Z}=t==="y"&&A.inset||A,W=E??(N.bandwidth?"center":"top"),Q=F??(e==="right"?D:Z)-3;return W==="center"?(this.textAnchor=void 0,this.lineAnchor=e==="right"?"bottom":"top",this.frameAnchor=e,this.rotate=-90):(this.textAnchor=e==="right"?"end":"start",this.lineAnchor=W,this.frameAnchor=`${W}-${e}`,this.rotate=0),this.dy=W==="top"?3-P:W==="bottom"?tt-3:0,this.dx=e==="right"?Q:-Q,this.ariaLabel=`${t}-axis label`,{facets:[[0]],channels:{text:{value:[ty(t,N,{anchor:e,label:T,labelAnchor:W,labelArrow:I})]}}}})):null)}function Gx(t,e,n,{color:r="currentColor",opacity:o=1,stroke:i=r,strokeOpacity:a=o,strokeWidth:f=1,fill:u=r,fillOpacity:c=o,textAnchor:s,textStroke:d,textStrokeOpacity:l,textStrokeWidth:p,tickSize:m=t==="x"?6:0,tickPadding:h,tickRotate:g,y:b,margin:x,marginTop:M=x===void 0?e==="top"?30:0:x,marginRight:y=x===void 0?20:x,marginBottom:w=x===void 0?e==="bottom"?30:0:x,marginLeft:v=x===void 0?20:x,label:T,labelAnchor:E,labelArrow:I,labelOffset:F,..._}){return m=ct(m),h=ct(h),g=ct(g),E!==void 0&&(E=le(E,"labelAnchor",["center","left","right"])),I=ey(I),ep(m&&!Pt(i)?g5(t,e,n,{stroke:i,strokeOpacity:a,strokeWidth:f,tickSize:m,tickPadding:h,tickRotate:g,y:b,..._}):null,Pt(u)?null:y5(t,e,n,{fill:u,fillOpacity:c,stroke:d,strokeOpacity:l,strokeWidth:p,textAnchor:s,tickSize:m,tickPadding:h,tickRotate:g,y:b,marginTop:M,marginRight:y,marginBottom:w,marginLeft:v,..._}),!Pt(u)&&T!==null?qo([],Kx({fill:u,fillOpacity:c,..._},function(R,O,L,S,A){let N=S[t],{marginTop:P,marginRight:D,marginBottom:tt,marginLeft:Z}=t==="x"&&A.inset||A,W=E??(N.bandwidth?"center":"right"),Q=F??(e==="top"?P:tt)-3;return W==="center"?(this.frameAnchor=e,this.textAnchor=void 0):(this.frameAnchor=`${e}-${W}`,this.textAnchor=W==="right"?"end":"start"),this.lineAnchor=e,this.dy=e==="top"?-Q:Q,this.dx=W==="right"?D-3:W==="left"?3-Z:0,this.ariaLabel=`${t}-axis label`,{facets:[[0]],channels:{text:{value:[ty(t,N,{anchor:e,label:T,labelAnchor:W,labelArrow:I})]}}}})):null)}function h5(t,e,n,{strokeWidth:r=1,strokeLinecap:o=null,strokeLinejoin:i=null,facetAnchor:a=e+(t==="y"?"-empty":""),frameAnchor:f=e,tickSize:u,inset:c=0,insetLeft:s=c,insetRight:d=c,dx:l=0,y:p=t==="y"?void 0:null,...m}){return Yo(Yx,t,`${t}-axis tick`,n,{strokeWidth:r,strokeLinecap:o,strokeLinejoin:i,facetAnchor:a,frameAnchor:f,y:p,...m,dx:e==="left"?+l-Bt+ +s:+l+Bt-d,anchor:"start",length:u,shape:e==="left"?v5:M5})}function g5(t,e,n,{strokeWidth:r=1,strokeLinecap:o=null,strokeLinejoin:i=null,facetAnchor:a=e+(t==="x"?"-empty":""),frameAnchor:f=e,tickSize:u,inset:c=0,insetTop:s=c,insetBottom:d=c,dy:l=0,x:p=t==="x"?void 0:null,...m}){return Yo(zx,t,`${t}-axis tick`,n,{strokeWidth:r,strokeLinejoin:i,strokeLinecap:o,facetAnchor:a,frameAnchor:f,x:p,...m,dy:e==="bottom"?+l-Bt-d:+l+Bt+ +s,anchor:"start",length:u,shape:e==="bottom"?b5:w5})}function x5(t,e,n,{facetAnchor:r=e+(t==="y"?"-empty":""),frameAnchor:o=e,tickSize:i,tickRotate:a=0,tickPadding:f=Math.max(3,9-i)+(Math.abs(a)>60?4*Math.cos(a*ap):0),tickFormat:u,text:c=typeof u=="function"?u:void 0,textAnchor:s=Math.abs(a)>60?"middle":e==="left"?"end":"start",lineAnchor:d=a>60?"top":a<-60?"bottom":"middle",fontVariant:l,inset:p=0,insetLeft:m=p,insetRight:h=p,dx:g=0,y:b=t==="y"?void 0:null,...x}){return Yo(gp,t,`${t}-axis tick label`,n,{facetAnchor:r,frameAnchor:o,text:c===void 0?null:c,textAnchor:s,lineAnchor:d,fontVariant:l,rotate:a,y:b,...x,dx:e==="left"?+g-i-f+ +m:+g+ +i+ +f-h},function(M,y,w,v){l===void 0&&(this.fontVariant=Jx(M)),c===void 0&&(v.text=Qx(M,y,w,u,e))})}function y5(t,e,n,{facetAnchor:r=e+(t==="x"?"-empty":""),frameAnchor:o=e,tickSize:i,tickRotate:a=0,tickPadding:f=Math.max(3,9-i)+(Math.abs(a)>=10?4*Math.cos(a*ap):0),tickFormat:u,text:c=typeof u=="function"?u:void 0,textAnchor:s=Math.abs(a)>=10?a<0^e==="bottom"?"start":"end":"middle",lineAnchor:d=Math.abs(a)>=10?"middle":e==="bottom"?"top":"bottom",fontVariant:l,inset:p=0,insetTop:m=p,insetBottom:h=p,dy:g=0,x:b=t==="x"?void 0:null,...x}){return Yo(hp,t,`${t}-axis tick label`,n,{facetAnchor:r,frameAnchor:o,text:c===void 0?null:c,textAnchor:s,lineAnchor:d,fontVariant:l,rotate:a,x:b,...x,dy:e==="bottom"?+g+ +i+ +f-h:+g-i-f+ +m},function(M,y,w,v){l===void 0&&(this.fontVariant=Jx(M)),c===void 0&&(v.text=Qx(M,y,w,u,e))})}function Mp(){let[t,e]=jn(...arguments);return Vx("y",Bx(e),t,e)}function Sp(){let[t,e]=jn(...arguments);return Vx("fy",Ux(e),t,e)}function Tp(){let[t,e]=jn(...arguments);return jx("x",Xx(e),t,e)}function _p(){let[t,e]=jn(...arguments);return jx("fx",Hx(e),t,e)}function Vx(t,e,n,{y:r=t==="y"?void 0:null,x:o=null,x1:i=e==="left"?o:null,x2:a=e==="right"?o:null,...f}){return Yo(Ex,t,`${t}-grid`,n,{y:r,x1:i,x2:a,...Zx(f)})}function jx(t,e,n,{x:r=t==="x"?void 0:null,y:o=null,y1:i=e==="top"?o:null,y2:a=e==="bottom"?o:null,...f}){return Yo($x,t,`${t}-grid`,n,{x:r,y1:i,y2:a,...Zx(f)})}function Zx({color:t="currentColor",opacity:e=.1,stroke:n=t,strokeOpacity:r=e,strokeWidth:o=1,...i}){return{stroke:n,strokeOpacity:r,strokeWidth:o,...i}}function Kx({fill:t,fillOpacity:e,fontFamily:n,fontSize:r,fontStyle:o,fontWeight:i,monospace:a,pointerEvents:f,shapeRendering:u},c){return[,t]=ie(t),[,e]=It(e),{facet:"super",x:null,y:null,fill:t,fillOpacity:e,fontFamily:n,fontSize:r,fontStyle:o,fontWeight:i,monospace:a,pointerEvents:f,shapeRendering:u,initializer:c}}function Yo(t,e,n,r,o,i){let a;function f(s,d,l,p,m,h){let g=s==null&&(e==="fx"||e==="fy"),{[e]:b}=p;if(!b)throw new Error(`missing scale: ${e}`);let{ticks:x,tickSpacing:M,interval:y}=o;if(qc(b)&&typeof x=="string"&&(y=x,x=void 0),s==null){if(re(x))s=kt(x);else if(b.ticks)if(x!==void 0)s=b.ticks(x);else if(y=rn(y===void 0?b.interval:y,b.type),y!==void 0){let[v,T]=Ct(b.domain());s=y.range(v,y.offset(y.floor(T)))}else{let[v,T]=Ct(b.range());x=(T-v)/(M===void 0?e==="x"?80:35:M),s=b.ticks(x)}else s=b.domain();e==="y"||e==="x"?d=[ne(s)]:a[e]={scale:e,value:wt}}i?.call(this,b,s,x,a);let w=Object.fromEntries(Object.entries(a).map(([v,T])=>[v,{...T,value:gt(s,T.value)}]));return g&&(d=h.filterFacets(s,w)),{data:s,facets:d,channels:w}}let u=Er(o).initializer,c=t(r,Er({...o,initializer:f},u));return r==null?(a=c.channels,c.channels={}):a={},c.ariaLabel=n,c}function Qx(t,e,n,r,o){return{value:Bo(t,e,n,r,o)}}function Bo(t,e,n,r,o){return r===void 0&&qc(t)?Tg(t,e,n,o):t.tickFormat?t.tickFormat(re(n)?null:n,r):r===void 0?Mg(t.interval)?bn("%Y"):Sg(t.interval)?Un("%Y"):_e:typeof r=="string"?(Yt(t.domain())?bn:Ve)(r):Hn(r)}var b5={draw(t,e){t.moveTo(0,0),t.lineTo(0,e)}},w5={draw(t,e){t.moveTo(0,0),t.lineTo(0,-e)}},v5={draw(t,e){t.moveTo(0,0),t.lineTo(-e,0)}},M5={draw(t,e){t.moveTo(0,0),t.lineTo(e,0)}};function Jx(t){return t.bandwidth&&!t.interval?void 0:"tabular-nums"}function S5(t){return Math.sign(vn(t.domain()))*Math.sign(vn(t.range()))}function ty(t,e,{anchor:n,label:r=e.label,labelAnchor:o,labelArrow:i}={}){if(!(r==null||r.inferred&&T5(e)&&/^(date|time|year)$/i.test(r))){if(r=String(r),i==="auto"&&(i=(!e.bandwidth||e.interval)&&!/[↑↓→←]/.test(r)),!i)return r;if(i===!0){let a=S5(e);a&&(i=/x$/.test(t)||o==="center"?/x$/.test(t)===a<0?"left":"right":a<0?"up":"down")}switch(i){case"left":return`\u2190 ${r}`;case"right":return`${r} \u2192`;case"up":return n==="right"?`${r} \u2191`:`\u2191 ${r}`;case"down":return n==="right"?`${r} \u2193`:`\u2193 ${r}`}return r}}function ey(t="auto"){return Pt(t)?!1:typeof t=="boolean"?t:le(t,"labelArrow",["auto","up","right","down","left"])}function T5(t){return qc(t)||t.interval!=null}function ny(t,e){if(e==null)return e;let n=t(e);if(!n)throw new Error(`scale not found: ${e}`);return n}function ry(t,{opacity:e,...n}={}){if(!fn(t)&&!jd(t))throw new Error(`swatches legend requires ordinal or threshold color scale (not ${t.type})`);return iy(t,n,(r,o,i,a)=>r.append("svg").attr("width",i).attr("height",a).attr("fill",o.scale).attr("fill-opacity",It(e)[1]).append("rect").attr("width","100%").attr("height","100%"))}function oy(t,{fill:e=t.hint?.fill!==void 0?t.hint.fill:"none",fillOpacity:n=1,stroke:r=t.hint?.stroke!==void 0?t.hint.stroke:Pt(e)?"currentColor":"none",strokeOpacity:o=1,strokeWidth:i=1.5,r:a=4.5,...f}={},u){let[c,s]=ie(e),[d,l]=ie(r),p=ny(u,c),m=ny(u,d),h=a*a*Math.PI;return n=It(n)[1],o=It(o)[1],i=It(i)[1],iy(t,f,(g,b,x,M)=>g.append("svg").attr("viewBox","-8 -8 16 16").attr("width",x).attr("height",M).attr("fill",c==="color"?y=>p.scale(y):s).attr("fill-opacity",n).attr("stroke",d==="color"?y=>m.scale(y):l).attr("stroke-opacity",o).attr("stroke-width",i).append("path").attr("d",y=>{let w=Vr();return t.scale(y).draw(w,h),w}))}function iy(t,e={},n){let{columns:r,tickFormat:o,fontVariant:i=Hc(t),swatchSize:a=15,swatchWidth:f=a,swatchHeight:u=a,marginLeft:c=0,className:s,style:d,width:l}=e,p=Io(e);s=Po(s),typeof o!="function"&&(o=Bo(t.scale,t.domain,void 0,o));let m=yt("div",p).attr("class",`${s}-swatches ${s}-swatches-${r!=null?"columns":"wrap"}`),h;return r!=null?(h=`.${s}-swatches-columns .${s}-swatch {
   display: flex;
   align-items: center;
   break-inside: avoid;
@@ -48,7 +48,7 @@
   margin-right: 0.5em;
   overflow: visible;
 }
-${h}`)).style("margin-left",c?`${+c}px`:null).style("width",l===void 0?null:`${+l}px`).style("font-variant",St(i,"normal")).call(Oo,d).node()}var Cp=new Map([["symbol",oy],["color",uy],["opacity",T5]]);function ay(t,e,n={}){return(r,o)=>{if(!Cp.has(r))throw new Error(`unknown legend type: ${r}`);if(r in t)return Cp.get(r)(t[r],fy(e,n[r],o),i=>t[i])}}function fy({className:t,...e},{label:n,ticks:r,tickFormat:o}={},i){return Xg(i,{className:t,...e},{label:n,ticks:r,tickFormat:o})}function uy(t,{legend:e=!0,...n}){if(e===!0&&(e=t.type==="ordinal"?"swatches":"ramp"),t.domain!==void 0)switch(`${e}`.toLowerCase()){case"swatches":return ry(t,n);case"ramp":return yx(t,n);default:throw new Error(`unknown legend type: ${e}`)}}function T5({type:t,interpolate:e,...n},{legend:r=!0,color:o=be(0,0,0),...i}){if(!e)throw new Error(`${t} opacity scales are not supported`);if(r===!0&&(r="ramp"),`${r}`.toLowerCase()!=="ramp")throw new Error(`${r} opacity legends are not supported`);return uy({type:t,...n,interpolate:_5(o)},{legend:r,...i})}function _5(t){let{r:e,g:n,b:r}=be(t)||be(0,0,0);return o=>`rgba(${e},${n},${r},${o})`}function cy(t,e,n){let r=[];for(let[o,i]of Cp){let a=n[o];if(a?.legend&&o in t){let f=i(t[o],fy(e,t[o],a),u=>t[u]);f!=null&&r.push(f)}}return r}var C5={ariaLabel:"frame",fill:"none",stroke:"currentColor"},A5={ariaLabel:"frame",fill:null,stroke:"currentColor",strokeLinecap:"square"},ts=class extends Nt{constructor(e={}){let{anchor:n=null,inset:r=0,insetTop:o=r,insetRight:i=r,insetBottom:a=r,insetLeft:f=r,rx:u,ry:c}=e;super(xo,void 0,e,n==null?C5:A5),this.anchor=_r(n,"anchor",["top","right","bottom","left"]),this.insetTop=ct(o),this.insetRight=ct(i),this.insetBottom=ct(a),this.insetLeft=ct(f),this.rx=ct(u),this.ry=ct(c)}render(e,n,r,o,i){let{marginTop:a,marginRight:f,marginBottom:u,marginLeft:c,width:s,height:d}=o,{anchor:l,insetTop:p,insetRight:m,insetBottom:h,insetLeft:g,rx:b,ry:x}=this,M=c+g,y=s-f-m,w=a+p,v=d-u-h;return yt(l?"svg:line":"svg:rect",i).datum(0).call(me,this,o,i).call(he,this).call(Oe,this,r).call(ge,this,{}).call(l==="left"?T=>T.attr("x1",M).attr("x2",M).attr("y1",w).attr("y2",v):l==="right"?T=>T.attr("x1",y).attr("x2",y).attr("y1",w).attr("y2",v):l==="top"?T=>T.attr("x1",M).attr("x2",y).attr("y1",w).attr("y2",w):l==="bottom"?T=>T.attr("x1",M).attr("x2",y).attr("y1",v).attr("y2",v):T=>T.attr("x",M).attr("y",w).attr("width",y-M).attr("height",v-w).attr("rx",b).attr("ry",x)).node()}};function Uo(t){return new ts(t)}var Ap={ariaLabel:"tip",fill:"white",stroke:"currentColor"},$5=new Set(["geometry","href","src","ariaLabel"]),Ip=class extends Nt{constructor(e,n={}){n.tip&&(n={...n,tip:!1}),n.title===void 0&&re(e)&&Nc(e)&&(n={...n,title:wt});let{x:r,y:o,x1:i,x2:a,y1:f,y2:u,anchor:c,monospace:s,fontFamily:d=s?"ui-monospace, monospace":void 0,fontSize:l,fontStyle:p,fontVariant:m,fontWeight:h,lineHeight:g=1,lineWidth:b=20,frameAnchor:x,textAnchor:M="start",textOverflow:y,textPadding:w=8,title:v,pointerSize:T=12,pathFilter:I="drop-shadow(0 3px 4px rgba(0,0,0,0.2))"}=n;super(e,{x:{value:i!=null&&a!=null?null:r,scale:"x",optional:!0},y:{value:f!=null&&u!=null?null:o,scale:"y",optional:!0},x1:{value:i,scale:"x",optional:a==null},y1:{value:f,scale:"y",optional:u==null},x2:{value:a,scale:"x",optional:i==null},y2:{value:u,scale:"y",optional:f==null},title:{value:v,optional:!0}},n,Ap),this.anchor=$d(c,"anchor"),this.previousAnchor=this.anchor??"top-left",this.frameAnchor=Mo(x),this.textAnchor=St(M,"middle"),this.textPadding=+w,this.pointerSize=+T,this.pathFilter=It(I),this.lineHeight=+g,this.lineWidth=+b,this.textOverflow=mp(y),this.monospace=!!s,this.fontFamily=It(d),this.fontSize=ct(l),this.fontStyle=It(p),this.fontVariant=It(m),this.fontWeight=It(h);for(let E in Ap)E in this.channels&&(this[E]=Ap[E]);this.splitLines=yp(this),this.clipLine=bp(this)}render(e,n,r,o,i){let a=this,{x:f,y:u,fx:c,fy:s}=n,{ownerSVGElement:d,document:l}=i,{anchor:p,monospace:m,lineHeight:h,lineWidth:g}=this,{textPadding:b,pointerSize:x,pathFilter:M}=this,{marginTop:y,marginLeft:w}=o,v=N5(r),{x1:T,y1:I,x2:E,y2:F,x:_=T??E,y:R=I??F}=r,O=c?c(e.fx)-w:0,P=s?s(e.fy)-y:0,[S,A]=Hn(this,o),N=op(r,S),L=ip(r,A),D=m?Zc:jc,tt=D(Er),Z=c&&Bo(c),G=s&&Bo(s);function*Q(H,X){if("title"in H){let $=H.title.value[X];for(let q of a.splitLines(_e($)))yield{name:"",value:a.clipLine(q)};return}for(let $ in H){if($==="x1"&&"x2"in H||$==="y1"&&"y2"in H)continue;let q=H[$],z=q.value[X];if(!(!Re(z)&&q.scale==null))if($==="x2"&&"x1"in H)yield{name:$p(n,q,"x"),value:sy(H.x1,q,X)};else if($==="y2"&&"y1"in H)yield{name:$p(n,q,"y"),value:sy(H.y1,q,X)};else{let C=q.scale,j={name:$p(n,q,$),value:_e(z)};(C==="color"||C==="opacity")&&(j[C]=r[$][X]),yield j}}e.fi!=null&&c&&(yield{name:String(c.label??"fx"),value:Z(e.fx)}),e.fi!=null&&s&&(yield{name:String(s.label??"fy"),value:G(e.fy)})}let at=yt("svg:g",i).call(me,this,o,i).call(xp,this).call(ge,this,{x:_&&f,y:R&&u}).call(H=>H.selectAll().data(e).enter().append("g").attr("transform",X=>`translate(${Math.round(N(X))},${Math.round(L(X))})`).call(he,this).call(X=>X.append("path").attr("filter",M)).call(X=>X.append("text").each(function($){let q=mn(this);this.setAttribute("fill","currentColor"),this.setAttribute("fill-opacity",1),this.setAttribute("stroke","none");let z=new Set;for(let C of Q(v,$)){let j=C.name;j&&z.has(j)||(z.add(j),Ut(q,C))}})));function Ut(H,{name:X,value:$,color:q,opacity:z}){let C=q!=null||z!=null,j,J=g*100,[ot]=kr(X,J,D,tt);if(ot>=0)X=X.slice(0,ot).trimEnd()+Er,j=$.trim(),$="";else{(X||!$&&!C)&&($=" "+$);let[Xt]=kr($,J-D(X),D,tt);Xt>=0&&($=$.slice(0,Xt).trimEnd()+Er,j=$.trim())}let lt=H.append("tspan").attr("x",0).attr("dy",`${h}em`).text("\u200B");X&&lt.append("tspan").attr("font-weight","bold").text(X),$&&lt.append(()=>l.createTextNode($)),C&&lt.append("tspan").text(" \u25A0").attr("fill",q).attr("fill-opacity",z).style("user-select","none"),j&&lt.append("title").text(j)}function Fe(){let{width:H,height:X}=o.facet??o;at.selectChildren().each(function($){let{x:q,width:z,height:C}=this.getBBox();z=Math.round(z),C=Math.round(C);let j=p;if(j===void 0){j=a.previousAnchor;let lt=N($)+O,Xt=L($)+P,Zn=lt+z+b*2<H,Ra=lt-z-b*2>0,Pa=Xt+C+x+b*2+7<X,La=Xt-C-x-b*2>0,Oa=(/-left$/.test(j)?Zn||!Ra:Zn&&!Ra)?"left":"right",fs=(/^top-/.test(j)?Pa||!La:Pa&&!La)?"top":"bottom";j=a.previousAnchor=`${fs}-${Oa}`}let J=this.firstChild,ot=this.lastChild;if(J.setAttribute("d",k5(j,x,b,z,C)),q)for(let lt of ot.childNodes)lt.setAttribute("x",-q);ot.setAttribute("y",`${+I5(j,ot.childNodes.length,h).toFixed(6)}em`),ot.setAttribute("transform",`translate(${E5(j,x,b,z,C)})`)})}return d.isConnected?Promise.resolve().then(Fe):typeof requestAnimationFrame<"u"&&requestAnimationFrame(Fe),at.node()}};function ly(t,{x:e,y:n,...r}={}){return r.frameAnchor===void 0&&([e,n]=Ar(e,n)),new Ip(t,{...r,x:e,y:n})}function I5(t,e,n){return/^top(?:-|$)/.test(t)?.94-n:-.29-e*n}function E5(t,e,n,r,o){switch(t){case"middle":return[-r/2,o/2];case"top-left":return[n,e+n];case"top":return[-r/2,e/2+n];case"top-right":return[-r-n,e+n];case"right":return[-e/2-r-n,o/2];case"bottom-left":return[n,-e-n];case"bottom":return[-r/2,-e/2-n];case"bottom-right":return[-r-n,-e-n];case"left":return[n+e/2,o/2]}}function k5(t,e,n,r,o){let i=r+n*2,a=o+n*2;switch(t){case"middle":return`M${-i/2},${-a/2}h${i}v${a}h${-i}z`;case"top-left":return`M0,0l${e},${e}h${i-e}v${a}h${-i}z`;case"top":return`M0,0l${e/2},${e/2}h${(i-e)/2}v${a}h${-i}v${-a}h${(i-e)/2}z`;case"top-right":return`M0,0l${-e},${e}h${e-i}v${a}h${i}z`;case"right":return`M0,0l${-e/2},${-e/2}v${e/2-a/2}h${-i}v${a}h${i}v${e/2-a/2}z`;case"bottom-left":return`M0,0l${e},${-e}h${i-e}v${-a}h${-i}z`;case"bottom":return`M0,0l${e/2},${-e/2}h${(i-e)/2}v${-a}h${-i}v${a}h${(i-e)/2}z`;case"bottom-right":return`M0,0l${-e},${-e}h${e-i}v${-a}h${i}z`;case"left":return`M0,0l${e/2},${-e/2}v${e/2-a/2}h${i}v${a}h${-i}v${e/2-a/2}z`}}function N5({channels:t}){let e={};for(let n in t){if($5.has(n))continue;let r=u1(t,n);r&&(e[n]=r)}return e}function sy(t,e,n){return e.hint?.length?`${_e(e.value[n]-t.value[n])}`:`${_e(t.value[n])}\u2013${_e(e.value[n])}`}function $p(t,e,n){return String(t[e.scale]?.label??e?.label??n)}function Na(t={}){let{facet:e,style:n,caption:r,ariaLabel:o,ariaDescription:i}=t,a=Lo(t.className),f=t.marks===void 0?[]:dy(t.marks);f.push(...F5(f));let u=L5(e,t),c=new Map;for(let A of f){let N=py(A,u,t);N&&c.set(A,N)}let s=new Map;u&&ka(s,[u],t),ka(s,c,t);let d=dy(q5(f,s,t));for(let A of d){let N=py(A,u,t);N&&c.set(A,N)}f.unshift(...d);let l=cx(s,t);if(l!==void 0){let A=u?Xc(l,u):void 0;for(let L of f){if(L.facet===null||L.facet==="super")continue;let D=c.get(L);D!==void 0&&(D.facetsIndex=L.fx!=null||L.fy!=null?Xc(l,D):A)}let N=new Set;for(let{facetsIndex:L}of c.values())L?.forEach((D,tt)=>{D?.length>0&&N.add(tt)});l.forEach(0<N.size&&N.size<l.length?(L,D)=>L.empty=!N.has(D):L=>L.empty=!1);for(let L of f)if(L.facet==="exclude"){let D=c.get(L);D!==void 0&&(D.facetsIndex=dx(D.facetsIndex))}}for(let A of st.keys())yo(t[A])&&A!=="fx"&&A!=="fy"&&s.set(A,[]);let p=new Map;for(let A of f){if(p.has(A))throw new Error("duplicate mark; each mark must be unique");let{facetsIndex:N,channels:L}=c.get(A)??{},{data:D,facets:tt,channels:Z}=A.initialize(N,L,t);Np(Z,t),p.set(A,{data:D,facets:tt,channels:Z})}let m=Aa(ka(s,p,t),t),h=Hd(m),g=fx(m,f,t);J1(m,g);let{fx:b,fy:x}=h,M=b||x?Vd(m,g):g,y=b||x?G5(h,g):g,w=Eo(t),v=w.document,T=dn("svg").call(v.documentElement),I=T;w.ownerSVGElement=T,w.className=a,w.projection=d1(t,M),w.filterFacets=(A,N)=>Xc(l,{channels:N,groups:Bc(A,N)}),w.getMarkState=A=>{let N=p.get(A),L=c.get(A);return{...N,channels:{...N.channels,...L?.channels}}},w.dispatchValue=A=>{I.value!==A&&(I.value=A,I.dispatchEvent(new Event("input",{bubbles:!0})))};let E=new Set;for(let[A,N]of p)if(A.initializer!=null){let L=A.facet==="super"?y:M,D=A.initializer(N.data,N.facets,N.channels,h,L,w);if(D.data!==void 0&&(N.data=D.data),D.facets!==void 0&&(N.facets=D.facets),D.channels!==void 0){let{fx:tt,fy:Z,...G}=D.channels;P5(G),Object.assign(N.channels,G);for(let Q of Object.values(G)){let{scale:at}=Q;at!=null&&st.get(at)!==de&&(gy(Q,t),E.add(at))}(tt!=null||Z!=null)&&c.set(A,!0)}}if(E.size){let A=new Map;ka(A,p,t,D=>E.has(D)),ka(s,p,t,D=>E.has(D));let N=W5(Aa(A,t),m),L=Hd(N);Object.assign(m,N),Object.assign(h,L)}let F,_;l!==void 0&&(F={x:b?.domain(),y:x?.domain()},l=sx(l,F),_=lx(b,x,g));for(let[A,N]of p)N.values=A.scale(N.channels,h,w);let{width:R,height:O}=g;mn(T).attr("class",a).attr("fill","currentColor").attr("font-family","system-ui, sans-serif").attr("font-size",10).attr("text-anchor","middle").attr("width",R).attr("height",O).attr("viewBox",`0 0 ${R} ${O}`).attr("aria-label",o).attr("aria-description",i).call(A=>A.append("style").text(`.${a} {
+${h}`)).style("margin-left",c?`${+c}px`:null).style("width",l===void 0?null:`${+l}px`).style("font-variant",St(i,"normal")).call(Oo,d).node()}var Cp=new Map([["symbol",oy],["color",uy],["opacity",_5]]);function ay(t,e,n={}){return(r,o)=>{if(!Cp.has(r))throw new Error(`unknown legend type: ${r}`);if(r in t)return Cp.get(r)(t[r],fy(e,n[r],o),i=>t[i])}}function fy({className:t,...e},{label:n,ticks:r,tickFormat:o}={},i){return Xg(i,{className:t,...e},{label:n,ticks:r,tickFormat:o})}function uy(t,{legend:e=!0,...n}){if(e===!0&&(e=t.type==="ordinal"?"swatches":"ramp"),t.domain!==void 0)switch(`${e}`.toLowerCase()){case"swatches":return ry(t,n);case"ramp":return yx(t,n);default:throw new Error(`unknown legend type: ${e}`)}}function _5({type:t,interpolate:e,...n},{legend:r=!0,color:o=be(0,0,0),...i}){if(!e)throw new Error(`${t} opacity scales are not supported`);if(r===!0&&(r="ramp"),`${r}`.toLowerCase()!=="ramp")throw new Error(`${r} opacity legends are not supported`);return uy({type:t,...n,interpolate:C5(o)},{legend:r,...i})}function C5(t){let{r:e,g:n,b:r}=be(t)||be(0,0,0);return o=>`rgba(${e},${n},${r},${o})`}function cy(t,e,n){let r=[];for(let[o,i]of Cp){let a=n[o];if(a?.legend&&o in t){let f=i(t[o],fy(e,t[o],a),u=>t[u]);f!=null&&r.push(f)}}return r}var A5={ariaLabel:"frame",fill:"none",stroke:"currentColor"},$5={ariaLabel:"frame",fill:null,stroke:"currentColor",strokeLinecap:"square"},ts=class extends Nt{constructor(e={}){let{anchor:n=null,inset:r=0,insetTop:o=r,insetRight:i=r,insetBottom:a=r,insetLeft:f=r,rx:u,ry:c}=e;super(xo,void 0,e,n==null?A5:$5),this.anchor=_r(n,"anchor",["top","right","bottom","left"]),this.insetTop=ct(o),this.insetRight=ct(i),this.insetBottom=ct(a),this.insetLeft=ct(f),this.rx=ct(u),this.ry=ct(c)}render(e,n,r,o,i){let{marginTop:a,marginRight:f,marginBottom:u,marginLeft:c,width:s,height:d}=o,{anchor:l,insetTop:p,insetRight:m,insetBottom:h,insetLeft:g,rx:b,ry:x}=this,M=c+g,y=s-f-m,w=a+p,v=d-u-h;return yt(l?"svg:line":"svg:rect",i).datum(0).call(me,this,o,i).call(he,this).call(Oe,this,r).call(ge,this,{}).call(l==="left"?T=>T.attr("x1",M).attr("x2",M).attr("y1",w).attr("y2",v):l==="right"?T=>T.attr("x1",y).attr("x2",y).attr("y1",w).attr("y2",v):l==="top"?T=>T.attr("x1",M).attr("x2",y).attr("y1",w).attr("y2",w):l==="bottom"?T=>T.attr("x1",M).attr("x2",y).attr("y1",v).attr("y2",v):T=>T.attr("x",M).attr("y",w).attr("width",y-M).attr("height",v-w).attr("rx",b).attr("ry",x)).node()}};function Uo(t){return new ts(t)}var Ap={ariaLabel:"tip",fill:"white",stroke:"currentColor"},E5=new Set(["geometry","href","src","ariaLabel"]),Ep=class extends Nt{constructor(e,n={}){n.tip&&(n={...n,tip:!1}),n.title===void 0&&re(e)&&Nc(e)&&(n={...n,title:wt});let{x:r,y:o,x1:i,x2:a,y1:f,y2:u,anchor:c,monospace:s,fontFamily:d=s?"ui-monospace, monospace":void 0,fontSize:l,fontStyle:p,fontVariant:m,fontWeight:h,lineHeight:g=1,lineWidth:b=20,frameAnchor:x,textAnchor:M="start",textOverflow:y,textPadding:w=8,title:v,pointerSize:T=12,pathFilter:E="drop-shadow(0 3px 4px rgba(0,0,0,0.2))"}=n;super(e,{x:{value:i!=null&&a!=null?null:r,scale:"x",optional:!0},y:{value:f!=null&&u!=null?null:o,scale:"y",optional:!0},x1:{value:i,scale:"x",optional:a==null},y1:{value:f,scale:"y",optional:u==null},x2:{value:a,scale:"x",optional:i==null},y2:{value:u,scale:"y",optional:f==null},title:{value:v,optional:!0}},n,Ap),this.anchor=$d(c,"anchor"),this.previousAnchor=this.anchor??"top-left",this.frameAnchor=Mo(x),this.textAnchor=St(M,"middle"),this.textPadding=+w,this.pointerSize=+T,this.pathFilter=Et(E),this.lineHeight=+g,this.lineWidth=+b,this.textOverflow=mp(y),this.monospace=!!s,this.fontFamily=Et(d),this.fontSize=ct(l),this.fontStyle=Et(p),this.fontVariant=Et(m),this.fontWeight=Et(h);for(let I in Ap)I in this.channels&&(this[I]=Ap[I]);this.splitLines=yp(this),this.clipLine=bp(this)}render(e,n,r,o,i){let a=this,{x:f,y:u,fx:c,fy:s}=n,{ownerSVGElement:d,document:l}=i,{anchor:p,monospace:m,lineHeight:h,lineWidth:g}=this,{textPadding:b,pointerSize:x,pathFilter:M}=this,{marginTop:y,marginLeft:w}=o,v=D5(r),{x1:T,y1:E,x2:I,y2:F,x:_=T??I,y:R=E??F}=r,O=c?c(e.fx)-w:0,L=s?s(e.fy)-y:0,[S,A]=Gn(this,o),N=op(r,S),P=ip(r,A),D=m?Zc:jc,tt=D(Ir),Z=c&&Bo(c),W=s&&Bo(s);function*Q(G,X){if("title"in G){let $=G.title.value[X];for(let q of a.splitLines(_e($)))yield{name:"",value:a.clipLine(q)};return}for(let $ in G){if($==="x1"&&"x2"in G||$==="y1"&&"y2"in G)continue;let q=G[$],z=q.value[X];if(!(!Re(z)&&q.scale==null))if($==="x2"&&"x1"in G)yield{name:$p(n,q,"x"),value:sy(G.x1,q,X)};else if($==="y2"&&"y1"in G)yield{name:$p(n,q,"y"),value:sy(G.y1,q,X)};else{let C=q.scale,j={name:$p(n,q,$),value:_e(z)};(C==="color"||C==="opacity")&&(j[C]=r[$][X]),yield j}}e.fi!=null&&c&&(yield{name:String(c.label??"fx"),value:Z(e.fx)}),e.fi!=null&&s&&(yield{name:String(s.label??"fy"),value:W(e.fy)})}let at=yt("svg:g",i).call(me,this,o,i).call(xp,this).call(ge,this,{x:_&&f,y:R&&u}).call(G=>G.selectAll().data(e).enter().append("g").attr("transform",X=>`translate(${Math.round(N(X))},${Math.round(P(X))})`).call(he,this).call(X=>X.append("path").attr("filter",M)).call(X=>X.append("text").each(function($){let q=mn(this);this.setAttribute("fill","currentColor"),this.setAttribute("fill-opacity",1),this.setAttribute("stroke","none");let z=new Set;for(let C of Q(v,$)){let j=C.name;j&&z.has(j)||(z.add(j),Ut(q,C))}})));function Ut(G,{name:X,value:$,color:q,opacity:z}){let C=q!=null||z!=null,j,J=g*100,[ot]=kr(X,J,D,tt);if(ot>=0)X=X.slice(0,ot).trimEnd()+Ir,j=$.trim(),$="";else{(X||!$&&!C)&&($=" "+$);let[Xt]=kr($,J-D(X),D,tt);Xt>=0&&($=$.slice(0,Xt).trimEnd()+Ir,j=$.trim())}let lt=G.append("tspan").attr("x",0).attr("dy",`${h}em`).text("\u200B");X&&lt.append("tspan").attr("font-weight","bold").text(X),$&&lt.append(()=>l.createTextNode($)),C&&lt.append("tspan").text(" \u25A0").attr("fill",q).attr("fill-opacity",z).style("user-select","none"),j&&lt.append("title").text(j)}function Fe(){let{width:G,height:X}=o.facet??o;at.selectChildren().each(function($){let{x:q,width:z,height:C}=this.getBBox();z=Math.round(z),C=Math.round(C);let j=p;if(j===void 0){j=a.previousAnchor;let lt=N($)+O,Xt=P($)+L,Zn=lt+z+b*2<G,Ra=lt-z-b*2>0,La=Xt+C+x+b*2+7<X,Pa=Xt-C-x-b*2>0,Oa=(/-left$/.test(j)?Zn||!Ra:Zn&&!Ra)?"left":"right",fs=(/^top-/.test(j)?La||!Pa:La&&!Pa)?"top":"bottom";j=a.previousAnchor=`${fs}-${Oa}`}let J=this.firstChild,ot=this.lastChild;if(J.setAttribute("d",N5(j,x,b,z,C)),q)for(let lt of ot.childNodes)lt.setAttribute("x",-q);ot.setAttribute("y",`${+I5(j,ot.childNodes.length,h).toFixed(6)}em`),ot.setAttribute("transform",`translate(${k5(j,x,b,z,C)})`)})}return d.isConnected?Promise.resolve().then(Fe):typeof requestAnimationFrame<"u"&&requestAnimationFrame(Fe),at.node()}};function ly(t,{x:e,y:n,...r}={}){return r.frameAnchor===void 0&&([e,n]=Ar(e,n)),new Ep(t,{...r,x:e,y:n})}function I5(t,e,n){return/^top(?:-|$)/.test(t)?.94-n:-.29-e*n}function k5(t,e,n,r,o){switch(t){case"middle":return[-r/2,o/2];case"top-left":return[n,e+n];case"top":return[-r/2,e/2+n];case"top-right":return[-r-n,e+n];case"right":return[-e/2-r-n,o/2];case"bottom-left":return[n,-e-n];case"bottom":return[-r/2,-e/2-n];case"bottom-right":return[-r-n,-e-n];case"left":return[n+e/2,o/2]}}function N5(t,e,n,r,o){let i=r+n*2,a=o+n*2;switch(t){case"middle":return`M${-i/2},${-a/2}h${i}v${a}h${-i}z`;case"top-left":return`M0,0l${e},${e}h${i-e}v${a}h${-i}z`;case"top":return`M0,0l${e/2},${e/2}h${(i-e)/2}v${a}h${-i}v${-a}h${(i-e)/2}z`;case"top-right":return`M0,0l${-e},${e}h${e-i}v${a}h${i}z`;case"right":return`M0,0l${-e/2},${-e/2}v${e/2-a/2}h${-i}v${a}h${i}v${e/2-a/2}z`;case"bottom-left":return`M0,0l${e},${-e}h${i-e}v${-a}h${-i}z`;case"bottom":return`M0,0l${e/2},${-e/2}h${(i-e)/2}v${-a}h${-i}v${a}h${(i-e)/2}z`;case"bottom-right":return`M0,0l${-e},${-e}h${e-i}v${-a}h${i}z`;case"left":return`M0,0l${e/2},${-e/2}v${e/2-a/2}h${i}v${a}h${-i}v${e/2-a/2}z`}}function D5({channels:t}){let e={};for(let n in t){if(E5.has(n))continue;let r=u1(t,n);r&&(e[n]=r)}return e}function sy(t,e,n){return e.hint?.length?`${_e(e.value[n]-t.value[n])}`:`${_e(t.value[n])}\u2013${_e(e.value[n])}`}function $p(t,e,n){return String(t[e.scale]?.label??e?.label??n)}function Na(t={}){let{facet:e,style:n,caption:r,ariaLabel:o,ariaDescription:i}=t,a=Po(t.className),f=t.marks===void 0?[]:dy(t.marks);f.push(...q5(f));let u=O5(e,t),c=new Map;for(let A of f){let N=py(A,u,t);N&&c.set(A,N)}let s=new Map;u&&ka(s,[u],t),ka(s,c,t);let d=dy(z5(f,s,t));for(let A of d){let N=py(A,u,t);N&&c.set(A,N)}f.unshift(...d);let l=cx(s,t);if(l!==void 0){let A=u?Xc(l,u):void 0;for(let P of f){if(P.facet===null||P.facet==="super")continue;let D=c.get(P);D!==void 0&&(D.facetsIndex=P.fx!=null||P.fy!=null?Xc(l,D):A)}let N=new Set;for(let{facetsIndex:P}of c.values())P?.forEach((D,tt)=>{D?.length>0&&N.add(tt)});l.forEach(0<N.size&&N.size<l.length?(P,D)=>P.empty=!N.has(D):P=>P.empty=!1);for(let P of f)if(P.facet==="exclude"){let D=c.get(P);D!==void 0&&(D.facetsIndex=dx(D.facetsIndex))}}for(let A of st.keys())yo(t[A])&&A!=="fx"&&A!=="fy"&&s.set(A,[]);let p=new Map;for(let A of f){if(p.has(A))throw new Error("duplicate mark; each mark must be unique");let{facetsIndex:N,channels:P}=c.get(A)??{},{data:D,facets:tt,channels:Z}=A.initialize(N,P,t);Np(Z,t),p.set(A,{data:D,facets:tt,channels:Z})}let m=Aa(ka(s,p,t),t),h=Gd(m),g=fx(m,f,t);J1(m,g);let{fx:b,fy:x}=h,M=b||x?Vd(m,g):g,y=b||x?G5(h,g):g,w=Io(t),v=w.document,T=dn("svg").call(v.documentElement),E=T;w.ownerSVGElement=T,w.className=a,w.projection=d1(t,M),w.filterFacets=(A,N)=>Xc(l,{channels:N,groups:Bc(A,N)}),w.getMarkState=A=>{let N=p.get(A),P=c.get(A);return{...N,channels:{...N.channels,...P?.channels}}},w.dispatchValue=A=>{E.value!==A&&(E.value=A,E.dispatchEvent(new Event("input",{bubbles:!0})))};let I=new Set;for(let[A,N]of p)if(A.initializer!=null){let P=A.facet==="super"?y:M,D=A.initializer(N.data,N.facets,N.channels,h,P,w);if(D.data!==void 0&&(N.data=D.data),D.facets!==void 0&&(N.facets=D.facets),D.channels!==void 0){let{fx:tt,fy:Z,...W}=D.channels;P5(W),Object.assign(N.channels,W);for(let Q of Object.values(W)){let{scale:at}=Q;at!=null&&st.get(at)!==de&&(gy(Q,t),I.add(at))}(tt!=null||Z!=null)&&c.set(A,!0)}}if(I.size){let A=new Map;ka(A,p,t,D=>I.has(D)),ka(s,p,t,D=>I.has(D));let N=W5(Aa(A,t),m),P=Gd(N);Object.assign(m,N),Object.assign(h,P)}let F,_;l!==void 0&&(F={x:b?.domain(),y:x?.domain()},l=sx(l,F),_=lx(b,x,g));for(let[A,N]of p)N.values=A.scale(N.channels,h,w);let{width:R,height:O}=g;mn(T).attr("class",a).attr("fill","currentColor").attr("font-family","system-ui, sans-serif").attr("font-size",10).attr("text-anchor","middle").attr("width",R).attr("height",O).attr("viewBox",`0 0 ${R} ${O}`).attr("aria-label",o).attr("aria-description",i).call(A=>A.append("style").text(`.${a} {
   display: block;
   background: white;
   height: auto;
@@ -58,7 +58,13 @@
 .${a} text,
 .${a} tspan {
   white-space: pre;
-}`)).call(Oo,n);for(let A of f){let{channels:N,values:L,facets:D}=p.get(A);if(l===void 0||A.facet==="super"){let tt=null;if(D&&(tt=D[0],tt=A.filter(tt,N,L),tt.length===0))continue;let Z=A.render(tt,h,L,y,w);if(Z==null)continue;T.appendChild(Z)}else{let tt;for(let Z of l){if(!(A.facetAnchor?.(l,F,Z)??!Z.empty))continue;let G=null;if(D){let at=c.has(A);if(G=D[at?Z.i:0],G=A.filter(G,N,L),G.length===0)continue;!at&&G===D[0]&&(G=Pg(G)),G.fx=Z.x,G.fy=Z.y,G.fi=Z.i}let Q=A.render(G,h,L,M,w);if(Q!=null){(tt??=mn(T).append("g")).append(()=>Q).datum(Z);for(let at of["aria-label","aria-description","aria-hidden","transform"])Q.hasAttribute(at)&&(tt.attr(at,Q.getAttribute(at)),Q.removeAttribute(at))}}tt?.selectChildren().attr("transform",_)}}let P=cy(m,w,t);if(r!=null||P.length>0){I=v.createElement("figure"),I.style.maxWidth="initial";for(let A of P)I.appendChild(A);if(I.appendChild(T),r!=null){let A=v.createElement("figcaption");A.appendChild(r?.ownerDocument?r:v.createTextNode(r)),I.appendChild(A)}}I.scale=nx(m),I.legend=ay(m,w,t);let S=c1();return S>0&&mn(T).append("text").attr("x",R).attr("y",20).attr("dy","-1em").attr("text-anchor","end").attr("font-family","initial").text("\u26A0\uFE0F").append("title").text(`${S.toLocaleString("en-US")} warning${S===1?"":"s"}. Please check the console.`),I}function D5({marks:t=[],...e}={}){return Na({...e,marks:[...t,this]})}Nt.prototype.plot=D5;function dy(t){return t.flat(1/0).filter(e=>e!=null).map(R5)}function R5(t){return typeof t.render=="function"?t:new kp(t)}var kp=class extends Nt{constructor(e){if(typeof e!="function")throw new TypeError("invalid mark; missing render function");super(),this.render=e}render(){}};function Np(t,e){for(let n in t)gy(t[n],e);return t}function gy(t,e){let{scale:n,transform:r=!0}=t;if(n==null||!r)return;let{type:o,percent:i,interval:a,transform:f=i?u=>u*100:Cd(a,o)}=e[n]??{};f!=null&&(t.value=pt(t.value,f),t.transform=!1)}function P5(t){for(let e in t)Fd(e,t[e])}function ka(t,e,n,r=$g){for(let{channels:o}of e.values())for(let i in o){let a=o[i],{scale:f}=a;if(f!=null&&r(f))if(f==="projection"){if(!g1(n)){let u=n.x?.domain===void 0,c=n.y?.domain===void 0;if(u||c){let[s,d]=y1(a);u&&Ep(t,"x",s),c&&Ep(t,"y",d)}}}else Ep(t,f,a)}return t}function Ep(t,e,n){let r=t.get(e);r!==void 0?r.push(n):t.set(e,[n])}function L5(t,e){if(t==null)return;let{x:n,y:r}=t;if(n==null&&r==null)return;let o=kt(t.data);if(o==null)throw new Error("missing facet data");let i={};n!=null&&(i.fx=Io(o,{value:n,scale:"fx"})),r!=null&&(i.fy=Io(o,{value:r,scale:"fy"})),Np(i,e);let a=Bc(o,i);return{channels:i,groups:a,data:t.data}}function py(t,e,n){if(t.facet===null||t.facet==="super")return;let{fx:r,fy:o}=t;if(r!=null||o!=null){let u=kt(t.data??r??o);if(u===void 0)throw new Error(`missing facet data in ${t.ariaLabel}`);if(u===null)return;let c={};return r!=null&&(c.fx=Io(u,{value:r,scale:"fx"})),o!=null&&(c.fy=Io(u,{value:o,scale:"fy"})),Np(c,n),{channels:c,groups:Bc(u,c)}}if(e===void 0)return;let{channels:i,groups:a,data:f}=e;if(t.facet!=="auto"||t.data===f)return{channels:i,groups:a};f.length>0&&(a.size>1||a.size===1&&i.fx&&i.fy&&[...a][0][1].size>1)&&kt(t.data)?.length===f.length&&an(`Warning: the ${t.ariaLabel} mark appears to use faceted data, but isn\u2019t faceted. The mark data has the same length as the facet data and the mark facet option is "auto", but the mark data and facet data are distinct. If this mark should be faceted, set the mark facet option to true; otherwise, suppress this warning by setting the mark facet option to false.`)}function O5(t,e={}){return Ir({...e,x:null,y:null},(n,r,o,i,a,f)=>f.getMarkState(t))}function F5(t){let e=[];for(let n of t){let r=n.tip;if(r){let i=(r==="x"?gx:r==="y"?xx:hx)(O5(n));i.title=null,e.push(ly(n.data,i))}}return e}function q5(t,e,n){let{projection:r,x:o={},y:i={},fx:a={},fy:f={},axis:u,grid:c,facet:s={},facet:{axis:d=u,grid:l}=s,x:{axis:p=u,grid:m=p===null?null:c}=o,y:{axis:h=u,grid:g=h===null?null:c}=i,fx:{axis:b=d,grid:x=b===null?null:l}=a,fy:{axis:M=d,grid:y=M===null?null:l}=f}=n;(r||!yo(o)&&!my("x",t))&&(p=m=null),(r||!yo(i)&&!my("y",t))&&(h=g=null),e.has("fx")||(b=x=null),e.has("fy")||(M=y=null),p===void 0&&(p=!rs(t,"x")),h===void 0&&(h=!rs(t,"y")),b===void 0&&(b=!rs(t,"fx")),M===void 0&&(M=!rs(t,"fy")),p===!0&&(p="bottom"),h===!0&&(h="left"),b===!0&&(b=p==="top"||p===null?"bottom":"top"),M===!0&&(M=h==="right"||h===null?"left":"right");let w=[];return ns(w,y,Sp,f),es(w,M,wp,"right","left",s,f),ns(w,x,_p,a),es(w,b,vp,"top","bottom",s,a),ns(w,g,Mp,i),es(w,h,Jc,"left","right",n,i),ns(w,m,Tp,o),es(w,p,Nr,"bottom","top",n,o),w}function es(t,e,n,r,o,i,a){if(!e)return;let f=z5(e);a=Y5(f?r:e,i,a);let{line:u}=a;(n===Jc||n===Nr)&&u&&!$r(u)&&t.push(Uo(B5(a))),t.push(n(a)),f&&t.push(n({...a,anchor:o,label:null}))}function ns(t,e,n,r){!e||$r(e)||t.push(n(U5(e,r)))}function z5(t){return/^\s*both\s*$/i.test(t)}function Y5(t,e,{line:n=e.line,ticks:r,tickSize:o,tickSpacing:i,tickPadding:a,tickFormat:f,tickRotate:u,fontVariant:c,ariaLabel:s,ariaDescription:d,label:l=e.label,labelAnchor:p,labelArrow:m=e.labelArrow,labelOffset:h}){return{anchor:t,line:n,ticks:r,tickSize:o,tickSpacing:i,tickPadding:a,tickFormat:f,tickRotate:u,fontVariant:c,ariaLabel:s,ariaDescription:d,label:l,labelAnchor:p,labelArrow:m,labelOffset:h}}function B5(t){let{anchor:e,line:n}=t;return{anchor:e,facetAnchor:e+"-empty",stroke:n===!0?void 0:n}}function U5(t,{stroke:e=vo(t)?t:void 0,ticks:n=X5(t)?t:void 0,tickSpacing:r,ariaLabel:o,ariaDescription:i}){return{stroke:e,ticks:n,tickSpacing:r,ariaLabel:o,ariaDescription:i}}function X5(t){switch(typeof t){case"number":return!0;case"string":return!vo(t)}return re(t)||typeof t?.range=="function"}function rs(t,e){let n=`${e}-axis `;return t.some(r=>r.ariaLabel?.startsWith(n))}function my(t,e){for(let n of e)for(let r in n.channels){let{scale:o}=n.channels[r];if(o===t||o==="projection")return!0}return!1}function W5(t,e){for(let n in t){let r=t[n],o=e[n];r.label===void 0&&o&&(r.label=o.label)}return t}function G5({fx:t,fy:e},n){let{marginTop:r,marginRight:o,marginBottom:i,marginLeft:a,width:f,height:u}=Fc(n),c=t&&hy(t),s=e&&hy(e);return{marginTop:e?s[0]:r,marginRight:t?f-c[1]:o,marginBottom:e?u-s[1]:i,marginLeft:t?c[0]:a,inset:{marginTop:n.marginTop,marginRight:n.marginRight,marginBottom:n.marginBottom,marginLeft:n.marginLeft},width:f,height:u}}function hy(t){let e=t.domain(),n=t(e[0]),r=t(e[e.length-1]);return r<n&&([n,r]=[r,n]),[n,r+t.bandwidth()]}function Dp(t={y:"count"},e={}){[t,e]=V5(t,e);let{x:n,y:r}=e;return H5(j5(n,e,wt),null,null,r,t,Ea(e))}function H5(t,e,n,r,{data:o=Pd,filter:i=Ma,sort:a,reverse:f,...u}={},c={}){t=xy(t),e=xy(e),u=K5(u,c),o=vy(o,wt),a=a==null?void 0:by("sort",a,c),i=i==null?void 0:wy("filter",i,c),n!=null&&Sa(u,"x","x1","x2")&&(n=null),r!=null&&Sa(u,"y","y1","y2")&&(r=null);let[s,d]=Te(t),[l,p]=Te(t),[m,h]=Te(e),[g,b]=Te(e),[x,M]=n!=null?[n,"x"]:r!=null?[r,"y"]:[],[y,w]=Te(x),{x:v,y:T,z:I,fill:E,stroke:F,x1:_,x2:R,y1:O,y2:P,domain:S,cumulative:A,thresholds:N,interval:L,...D}=c,[tt,Z]=Te(I),[G]=ie(E),[Q]=ie(F),[at,Ut]=Te(G),[Fe,H]=Te(Q);return{..."z"in c&&{z:tt||I},..."fill"in c&&{fill:at||E},..."stroke"in c&&{stroke:Fe||F},...$o(D,(X,$,q)=>{let z=va(gt(X,x),q?.[M]),C=gt(X,I),j=gt(X,G),J=gt(X,Q),ot=t1(u,{z:C,fill:j,stroke:J}),lt=[],Xt=[],Zn=z&&w([]),Ra=C&&Z([]),Pa=j&&Ut([]),La=J&&H([]),Oa=t&&d([]),fs=t&&p([]),Lp=e&&h([]),ky=e&&b([]),Ny=e3(t?.(X),e?.(X)),Dy=0;for(let Dr of u)Dr.initialize(X);a&&a.initialize(X),i&&i.initialize(X);for(let Dr of $){let Op=[];for(let Xo of u)Xo.scope("facet",Dr);a&&a.scope("facet",Dr),i&&i.scope("facet",Dr);for(let[Xo,Ry]of Rd(Dr,ot))for(let[Py,Ly]of Rd(Ry,z))for(let[Kn,Qn]of Ny(Ly))if(!(i&&!i.reduce(Kn,Qn))){Op.push(Dy++),Xt.push(o.reduceIndex(Kn,X,Qn)),z&&Zn.push(Py),C&&Ra.push(ot===C?Xo:C[Kn[0]]),j&&Pa.push(ot===j?Xo:j[Kn[0]]),J&&La.push(ot===J?Xo:J[Kn[0]]),Oa&&(Oa.push(Qn.x1),fs.push(Qn.x2)),Lp&&(Lp.push(Qn.y1),ky.push(Qn.y2));for(let Oy of u)Oy.reduce(Kn,Qn);a&&a.reduce(Kn)}lt.push(Op)}return e1(lt,a,f),{data:Xt,facets:lt}}),...!Sa(u,"x")&&(s?{x1:s,x2:l,x:wa(s,l)}:{x:v,x1:_,x2:R}),...!Sa(u,"y")&&(m?{y1:m,y2:g,y:wa(m,g)}:{y:T,y1:O,y2:P}),...y&&{[M]:y},...Object.fromEntries(u.map(({name:X,output:$})=>[X,$]))}}function V5({cumulative:t,domain:e,thresholds:n,interval:r,...o},i){return[o,{cumulative:t,domain:e,thresholds:n,interval:r,...i}]}function j5(t,{cumulative:e,domain:n,thresholds:r,interval:o},i){return t={...on(t)},t.domain===void 0&&(t.domain=n),t.cumulative===void 0&&(t.cumulative=e),t.thresholds===void 0&&(t.thresholds=r),t.interval===void 0&&(t.interval=o),t.value===void 0&&(t.value=i),t.thresholds=Z5(t.thresholds,t.interval),t}function xy(t){if(t==null)return;let{value:e,cumulative:n,domain:r=Ct,thresholds:o}=t,i=a=>{let f=gt(a,e),u;if(Yt(f)||J5(o)){f=pt(f,Sd,Float64Array);let[s,d]=typeof r=="function"?r(f):r,l=typeof o=="function"&&!Da(o)?o(f,s,d):o;typeof l=="number"&&(l=Gi(s,d,l)),Da(l)&&(r===Ct&&(s=l.floor(s),d=l.offset(l.floor(d))),l=l.range(s,l.offset(d))),u=l}else{f=Tr(f);let[s,d]=typeof r=="function"?r(f):r,l=typeof o=="function"&&!Da(o)?o(f,s,d):o;if(typeof l=="number")if(r===Ct){let p=tr(s,d,l);if(isFinite(p))if(p>0){let m=Math.round(s/p),h=Math.round(d/p);m*p<=s||--m,h*p>d||++h;let g=h-m+1;l=new Float64Array(g);for(let b=0;b<g;++b)l[b]=(m+b)*p}else if(p<0){p=-p;let m=Math.round(s*p),h=Math.round(d*p);m/p<=s||--m,h/p>d||++h;let g=h-m+1;l=new Float64Array(g);for(let b=0;b<g;++b)l[b]=(m+b)/p}else l=[s];else l=[s]}else l=$e(s,d,l);else Da(l)&&(r===Ct&&(s=l.floor(s),d=l.offset(l.floor(d))),l=l.range(s,l.offset(d)));u=l}let c=[];if(u.length===1)c.push([u[0],u[0]]);else for(let s=1;s<u.length;++s)c.push([u[s-1],u[s]]);return c.bin=(n<0?r3:n>0?n3:Rp)(c,u,f),c};return i.label=Pe(e),i}function Z5(t,e,n=yy){if(t===void 0)return e===void 0?n:rn(e);if(typeof t=="string"){switch(t.toLowerCase()){case"freedman-diaconis":return Wa;case"scott":return Zo;case"sturges":return Ya;case"auto":return yy}return $c(t)}return t}function K5(t,e){return Jg(t,e,by)}function by(t,e,n){return Nd(t,e,n,wy)}function wy(t,e,n){return Dd(t,e,n,vy)}function vy(t,e){return Ta(t,e,Q5)}function Q5(t){switch(`${t}`.toLowerCase()){case"x":return o3;case"x1":return a3;case"x2":return f3;case"y":return i3;case"y1":return u3;case"y2":return c3}throw new Error(`invalid bin reduce: ${t}`)}function yy(t,e,n){return Math.min(200,Zo(t,e,n))}function J5(t){return t3(t)||re(t)&&Yt(t)}function t3(t){return Da(t)&&typeof t=="function"&&t()instanceof Date}function Da(t){return typeof t?.range=="function"}function e3(t,e){return t&&e?function*(n){let r=t.bin(n);for(let[o,[i,a]]of t.entries()){let f=e.bin(r[o]);for(let[u,[c,s]]of e.entries())yield[f[u],{x1:i,y1:c,x2:a,y2:s}]}}:t?function*(n){let r=t.bin(n);for(let[o,[i,a]]of t.entries())yield[r[o],{x1:i,x2:a}]}:function*(n){let r=e.bin(n);for(let[o,[i,a]]of e.entries())yield[r[o],{y1:i,y2:a}]}}function Rp(t,e,n){return e=Tr(e),r=>{let o=t.map(()=>[]);for(let i of r)o[un(e,n[i])-1]?.push(i);return o}}function n3(t,e,n){let r=Rp(t,e,n);return o=>{let i=r(o);for(let a=1,f=i.length;a<f;++a){let u=i[a-1],c=i[a];for(let s of u)c.push(s)}return i}}function r3(t,e,n){let r=Rp(t,e,n);return o=>{let i=r(o);for(let a=i.length-2;a>=0;--a){let f=i[a+1],u=i[a];for(let c of f)u.push(c)}return i}}function My(t,e){let n=(+t+ +e)/2;return t instanceof Date?new Date(n):n}var o3={reduceIndex(t,e,{x1:n,x2:r}){return My(n,r)}},i3={reduceIndex(t,e,{y1:n,y2:r}){return My(n,r)}},a3={reduceIndex(t,e,{x1:n}){return n}},f3={reduceIndex(t,e,{x2:n}){return n}},u3={reduceIndex(t,e,{y1:n}){return n}},c3={reduceIndex(t,e,{y2:n}){return n}};function Sy(t={}){return Td(t)?t:{...t,y:wt}}function s3(t={},e={}){arguments.length===1&&([t,e]=l3(t));let{x1:n,x:r=n,y:o,...i}=e,[a,f,u,c]=p3(r,o,"x","y",t,i);return{...a,x1:n,x:f,y1:u,y2:c,y:wa(u,c)}}function Cy({y:t,y1:e,y2:n,...r}={}){return r=Ia(r,"x"),e===void 0&&n===void 0?s3({y:t,...r}):([e,n]=Dg(t,e,n),{...r,y1:e,y2:n})}function l3(t){let{offset:e,order:n,reverse:r,...o}=t;return[{offset:e,order:n,reverse:r},o]}var d3={length:!0};function p3(t,e=Ag,n,r,{offset:o,order:i,reverse:a},f){let u=Rg(f),[c,s]=Te(t),[d,l]=wo(e),[p,m]=wo(e);return d.hint=p.hint=d3,o=m3(o),i=x3(i,o,r),[$o(f,(h,g,b)=>{let x=t==null?void 0:s(va(gt(h,t),b?.[n])),M=gt(h,e,Float64Array),y=gt(h,u),w=i&&i(h,x,M,y),v=h.length,T=l(new Float64Array(v)),I=m(new Float64Array(v)),E=[];for(let F of g){let _=x?Array.from(cn(F,R=>x[R]).values()):[F];if(w)for(let R of _)R.sort(w);for(let R of _){let O=0,P=0;a&&R.reverse();for(let S of R){let A=M[S];A<0?O=I[S]=(T[S]=O)+A:A>0?P=I[S]=(T[S]=P)+A:I[S]=T[S]=P}}E.push(_)}return o&&o(E,T,I,y),{data:h,facets:g}}),c,d,p]}function m3(t){if(t!=null){if(typeof t=="function")return t;switch(`${t}`.toLowerCase()){case"expand":case"normalize":return h3;case"center":case"silhouette":return g3;case"wiggle":return $y}throw new Error(`unknown offset: ${t}`)}}function Ay(t,e){let n=0,r=0;for(let o of t){let i=e[o];i<n&&(n=i),i>r&&(r=i)}return[n,r]}function h3(t,e,n){for(let r of t)for(let o of r){let[i,a]=Ay(o,n);for(let f of o){let u=1/(a-i||1);e[f]=u*(e[f]-i),n[f]=u*(n[f]-i)}}}function g3(t,e,n){for(let r of t){for(let o of r){let[i,a]=Ay(o,n);for(let f of o){let u=(a+i)/2;e[f]-=u,n[f]-=u}}Iy(r,e,n)}Ey(t,e,n)}function $y(t,e,n,r){for(let o of t){let i=new Qt,a=0;for(let f of o){let u=-1,c=f.map(p=>Math.abs(n[p]-e[p])),s=f.map(p=>{u=r?r[p]:++u;let m=n[p]-e[p],h=i.has(u)?m-i.get(u):0;return i.set(u,m),h}),d=[0,...qa(s)];for(let p of f)e[p]+=a,n[p]+=a;let l=fe(c);l&&(a-=fe(c,(p,m)=>(s[m]/2+d[m])*p)/l)}Iy(o,e,n)}Ey(t,e,n)}function Iy(t,e,n){let r=Jt(t,o=>Jt(o,i=>e[i]));for(let o of t)for(let i of o)e[i]-=r,n[i]-=r}function Ey(t,e,n){let r=t.length;if(r===1)return;let o=t.map(f=>f.flat()),i=o.map(f=>(Jt(f,u=>e[u])+Wt(f,u=>n[u]))/2),a=Jt(i);for(let f=0;f<r;f++){let u=a-i[f];for(let c of o[f])e[c]+=u,n[c]+=u}}function x3(t,e,n){if(t===void 0&&e===$y)return Ty(Kt);if(t!=null){if(typeof t=="string"){let r=t.startsWith("-"),o=r?Mr:Kt;switch((r?t.slice(1):t).toLowerCase()){case"value":case n:return y3(o);case"z":return b3(o);case"sum":return w3(o);case"appearance":return v3(o);case"inside-out":return Ty(o)}return _y(vd(t))}if(typeof t=="function")return(t.length===1?_y:M3)(t);if(Array.isArray(t))return S3(t);throw new Error(`invalid order: ${t}`)}}function y3(t){return(e,n,r)=>(o,i)=>t(r[o],r[i])}function b3(t){return(e,n,r,o)=>(i,a)=>t(o[i],o[a])}function w3(t){return os(t,(e,n,r,o)=>Lr(ne(e),i=>fe(i,a=>r[a]),i=>o[i]))}function v3(t){return os(t,(e,n,r,o)=>Lr(ne(e),i=>n[jo(i,a=>r[a])],i=>o[i]))}function Ty(t){return os(t,(e,n,r,o)=>{let i=ne(e),a=Lr(i,d=>n[jo(d,l=>r[l])],d=>o[d]),f=Ae(i,d=>fe(d,l=>r[l]),d=>o[d]),u=[],c=[],s=0;for(let d of a)s<0?(s+=f.get(d),u.push(d)):(s-=f.get(d),c.push(d));return c.reverse().concat(u)})}function _y(t){return e=>{let n=gt(e,t);return(r,o)=>Kt(n[r],n[o])}}function M3(t){return e=>(n,r)=>t(e[n],e[r])}function S3(t){return os(Kt,()=>t)}function os(t,e){return(n,r,o,i)=>{if(!i)throw new Error("missing channel: z");let a=new Qt(e(n,r,o,i).map((f,u)=>[f,u]));return(f,u)=>t(a.get(i[f]),a.get(i[u]))}}var Pp=class extends Nt{constructor(e,n,r={},o){super(e,n,r,o);let{inset:i=0,insetTop:a=i,insetRight:f=i,insetBottom:u=i,insetLeft:c=i,rx:s,ry:d}=r;this.insetTop=ct(a),this.insetRight=ct(f),this.insetBottom=ct(u),this.insetLeft=ct(c),this.rx=St(s,"auto"),this.ry=St(d,"auto")}render(e,n,r,o,i){let{rx:a,ry:f}=this;return yt("svg:g",i).call(me,this,o,i).call(this._transform,this,n).call(u=>u.selectAll().data(e).enter().append("rect").call(he,this).attr("x",this._x(n,r,o)).attr("width",this._width(n,r,o)).attr("y",this._y(n,r,o)).attr("height",this._height(n,r,o)).call(et,"rx",a).call(et,"ry",f).call(Oe,this,r)).node()}_x(e,{x:n},{marginLeft:r}){let{insetLeft:o}=this;return n?i=>n[i]+o:r+o}_y(e,{y:n},{marginTop:r}){let{insetTop:o}=this;return n?i=>n[i]+o:r+o}_width({x:e},{x:n},{marginRight:r,marginLeft:o,width:i}){let{insetLeft:a,insetRight:f}=this,u=n&&e?e.bandwidth():i-r-o;return Math.max(0,u-a-f)}_height({y:e},{y:n},{marginTop:r,marginBottom:o,height:i}){let{insetTop:a,insetBottom:f}=this,u=n&&e?e.bandwidth():i-r-o;return Math.max(0,u-a-f)}},T3={ariaLabel:"bar"};var is=class extends Pp{constructor(e,n={}){let{x:r,y1:o,y2:i}=n;super(e,{y1:{value:o,scale:"y"},y2:{value:i,scale:"y"},x:{value:r,scale:"x",type:"band",optional:!0}},n,T3)}_transform(e,n,{y:r}){e.call(ge,n,{y:r},0,0)}_y({y:e},{y1:n,y2:r},{marginTop:o}){let{insetTop:i}=this;return Gn(e)?o+i:a=>Math.min(n[a],r[a])+i}_height({y:e},{y1:n,y2:r},{marginTop:o,marginBottom:i,height:a}){let{insetTop:f,insetBottom:u}=this;return Gn(e)?a-o-i-f-u:c=>Math.max(0,Math.abs(r[c]-n[c])-f-u)}};function as(t,e={}){return Ng(e)||(e={...e,x:Ic,y2:wt}),new is(t,Cy(Hc(Sy(e))))}for(let t of Page.Charts?.Programs||[])for(let e of t?.Charts||[])switch(e.Type){case"partition":document.querySelector(`[data-chart-id="${e.ID}"]`)?.append(C3(e));break;case"histogram":document.querySelector(`[data-chart-id="${e.ID}"]`)?.append(A3(e));break;default:console.error("unknown chart type");break}function C3({Data:t,Name:e}){t??=[];let n=t.map(r=>r.Value).reduce((r,o)=>Math.max(r,o),0);return Na({color:{type:"ordinal",scheme:"Spectral"},nice:!0,x:{label:e,labelOffset:Number.MAX_SAFE_INTEGER,tickRotate:45,domain:t.map(r=>r.Key)},y:{label:"Count",domain:[0,n+1]},width:1024,style:"overflow:visible;background:transparent;margin-bottom:3rem;",marks:[as(t,{tip:!0,fill:r=>isNaN(Number(r.Key))?r.Key:Number(r.Key),x:r=>r.Key,y:r=>r.Value}),Uo()]})}function A3({Data:t}){t??=[];let e=3,n=f=>isNaN(Number(f))?f:Number(f),r=Array.from(ja(t.map(f=>n(f.Key)))),o=new Map(r.map((f,u)=>[f,u])),i=f=>(o.get(f)??0)%e,a=f=>Math.floor((o.get(f)??0)/e);return Na({marginLeft:60,width:1024,grid:!0,nice:!0,x:{label:"Distribution"},color:{type:"ordinal",legend:!0,scheme:"Spectral",label:"Counter"},y:{insetTop:16,domain:[0,1]},fx:{ticks:[]},fy:{ticks:[]},style:"background:transparent;",marks:[as(t,Dp({y:"proportion-facet",x:"x1",interval:.1,cumulative:1},{tip:!0,fill:f=>n(f.Key),x:f=>f.Value,fx:f=>i(n(f.Key)),fy:f=>a(n(f.Key))})),qo(r,{frameAnchor:"top",dy:3,fx:i,fy:a}),Nr({anchor:"bottom",tickSpacing:35}),Nr({anchor:"top",tickSpacing:35}),Uo()]})}})();
+}`)).call(Oo,n);for(let A of f){let{channels:N,values:P,facets:D}=p.get(A);if(l===void 0||A.facet==="super"){let tt=null;if(D&&(tt=D[0],tt=A.filter(tt,N,P),tt.length===0))continue;let Z=A.render(tt,h,P,y,w);if(Z==null)continue;T.appendChild(Z)}else{let tt;for(let Z of l){if(!(A.facetAnchor?.(l,F,Z)??!Z.empty))continue;let W=null;if(D){let at=c.has(A);if(W=D[at?Z.i:0],W=A.filter(W,N,P),W.length===0)continue;!at&&W===D[0]&&(W=Lg(W)),W.fx=Z.x,W.fy=Z.y,W.fi=Z.i}let Q=A.render(W,h,P,M,w);if(Q!=null){(tt??=mn(T).append("g")).append(()=>Q).datum(Z);for(let at of["aria-label","aria-description","aria-hidden","transform"])Q.hasAttribute(at)&&(tt.attr(at,Q.getAttribute(at)),Q.removeAttribute(at))}}tt?.selectChildren().attr("transform",_)}}let L=cy(m,w,t);if(r!=null||L.length>0){E=v.createElement("figure"),E.style.maxWidth="initial";for(let A of L)E.appendChild(A);if(E.appendChild(T),r!=null){let A=v.createElement("figcaption");A.appendChild(r?.ownerDocument?r:v.createTextNode(r)),E.appendChild(A)}}E.scale=nx(m),E.legend=ay(m,w,t);let S=c1();return S>0&&mn(T).append("text").attr("x",R).attr("y",20).attr("dy","-1em").attr("text-anchor","end").attr("font-family","initial").text("\u26A0\uFE0F").append("title").text(`${S.toLocaleString("en-US")} warning${S===1?"":"s"}. Please check the console.`),E}function R5({marks:t=[],...e}={}){return Na({...e,marks:[...t,this]})}Nt.prototype.plot=R5;function dy(t){return t.flat(1/0).filter(e=>e!=null).map(L5)}function L5(t){return typeof t.render=="function"?t:new kp(t)}var kp=class extends Nt{constructor(e){if(typeof e!="function")throw new TypeError("invalid mark; missing render function");super(),this.render=e}render(){}};function Np(t,e){for(let n in t)gy(t[n],e);return t}function gy(t,e){let{scale:n,transform:r=!0}=t;if(n==null||!r)return;let{type:o,percent:i,interval:a,transform:f=i?u=>u*100:Cd(a,o)}=e[n]??{};f!=null&&(t.value=pt(t.value,f),t.transform=!1)}function P5(t){for(let e in t)Fd(e,t[e])}function ka(t,e,n,r=$g){for(let{channels:o}of e.values())for(let i in o){let a=o[i],{scale:f}=a;if(f!=null&&r(f))if(f==="projection"){if(!g1(n)){let u=n.x?.domain===void 0,c=n.y?.domain===void 0;if(u||c){let[s,d]=y1(a);u&&Ip(t,"x",s),c&&Ip(t,"y",d)}}}else Ip(t,f,a)}return t}function Ip(t,e,n){let r=t.get(e);r!==void 0?r.push(n):t.set(e,[n])}function O5(t,e){if(t==null)return;let{x:n,y:r}=t;if(n==null&&r==null)return;let o=kt(t.data);if(o==null)throw new Error("missing facet data");let i={};n!=null&&(i.fx=Eo(o,{value:n,scale:"fx"})),r!=null&&(i.fy=Eo(o,{value:r,scale:"fy"})),Np(i,e);let a=Bc(o,i);return{channels:i,groups:a,data:t.data}}function py(t,e,n){if(t.facet===null||t.facet==="super")return;let{fx:r,fy:o}=t;if(r!=null||o!=null){let u=kt(t.data??r??o);if(u===void 0)throw new Error(`missing facet data in ${t.ariaLabel}`);if(u===null)return;let c={};return r!=null&&(c.fx=Eo(u,{value:r,scale:"fx"})),o!=null&&(c.fy=Eo(u,{value:o,scale:"fy"})),Np(c,n),{channels:c,groups:Bc(u,c)}}if(e===void 0)return;let{channels:i,groups:a,data:f}=e;if(t.facet!=="auto"||t.data===f)return{channels:i,groups:a};f.length>0&&(a.size>1||a.size===1&&i.fx&&i.fy&&[...a][0][1].size>1)&&kt(t.data)?.length===f.length&&an(`Warning: the ${t.ariaLabel} mark appears to use faceted data, but isn\u2019t faceted. The mark data has the same length as the facet data and the mark facet option is "auto", but the mark data and facet data are distinct. If this mark should be faceted, set the mark facet option to true; otherwise, suppress this warning by setting the mark facet option to false.`)}function F5(t,e={}){return Er({...e,x:null,y:null},(n,r,o,i,a,f)=>f.getMarkState(t))}function q5(t){let e=[];for(let n of t){let r=n.tip;if(r){let i=(r==="x"?gx:r==="y"?xx:hx)(F5(n));i.title=null,e.push(ly(n.data,i))}}return e}function z5(t,e,n){let{projection:r,x:o={},y:i={},fx:a={},fy:f={},axis:u,grid:c,facet:s={},facet:{axis:d=u,grid:l}=s,x:{axis:p=u,grid:m=p===null?null:c}=o,y:{axis:h=u,grid:g=h===null?null:c}=i,fx:{axis:b=d,grid:x=b===null?null:l}=a,fy:{axis:M=d,grid:y=M===null?null:l}=f}=n;(r||!yo(o)&&!my("x",t))&&(p=m=null),(r||!yo(i)&&!my("y",t))&&(h=g=null),e.has("fx")||(b=x=null),e.has("fy")||(M=y=null),p===void 0&&(p=!rs(t,"x")),h===void 0&&(h=!rs(t,"y")),b===void 0&&(b=!rs(t,"fx")),M===void 0&&(M=!rs(t,"fy")),p===!0&&(p="bottom"),h===!0&&(h="left"),b===!0&&(b=p==="top"||p===null?"bottom":"top"),M===!0&&(M=h==="right"||h===null?"left":"right");let w=[];return ns(w,y,Sp,f),es(w,M,wp,"right","left",s,f),ns(w,x,_p,a),es(w,b,vp,"top","bottom",s,a),ns(w,g,Mp,i),es(w,h,Jc,"left","right",n,i),ns(w,m,Tp,o),es(w,p,Nr,"bottom","top",n,o),w}function es(t,e,n,r,o,i,a){if(!e)return;let f=Y5(e);a=B5(f?r:e,i,a);let{line:u}=a;(n===Jc||n===Nr)&&u&&!$r(u)&&t.push(Uo(U5(a))),t.push(n(a)),f&&t.push(n({...a,anchor:o,label:null}))}function ns(t,e,n,r){!e||$r(e)||t.push(n(X5(e,r)))}function Y5(t){return/^\s*both\s*$/i.test(t)}function B5(t,e,{line:n=e.line,ticks:r,tickSize:o,tickSpacing:i,tickPadding:a,tickFormat:f,tickRotate:u,fontVariant:c,ariaLabel:s,ariaDescription:d,label:l=e.label,labelAnchor:p,labelArrow:m=e.labelArrow,labelOffset:h}){return{anchor:t,line:n,ticks:r,tickSize:o,tickSpacing:i,tickPadding:a,tickFormat:f,tickRotate:u,fontVariant:c,ariaLabel:s,ariaDescription:d,label:l,labelAnchor:p,labelArrow:m,labelOffset:h}}function U5(t){let{anchor:e,line:n}=t;return{anchor:e,facetAnchor:e+"-empty",stroke:n===!0?void 0:n}}function X5(t,{stroke:e=vo(t)?t:void 0,ticks:n=H5(t)?t:void 0,tickSpacing:r,ariaLabel:o,ariaDescription:i}){return{stroke:e,ticks:n,tickSpacing:r,ariaLabel:o,ariaDescription:i}}function H5(t){switch(typeof t){case"number":return!0;case"string":return!vo(t)}return re(t)||typeof t?.range=="function"}function rs(t,e){let n=`${e}-axis `;return t.some(r=>r.ariaLabel?.startsWith(n))}function my(t,e){for(let n of e)for(let r in n.channels){let{scale:o}=n.channels[r];if(o===t||o==="projection")return!0}return!1}function W5(t,e){for(let n in t){let r=t[n],o=e[n];r.label===void 0&&o&&(r.label=o.label)}return t}function G5({fx:t,fy:e},n){let{marginTop:r,marginRight:o,marginBottom:i,marginLeft:a,width:f,height:u}=Fc(n),c=t&&hy(t),s=e&&hy(e);return{marginTop:e?s[0]:r,marginRight:t?f-c[1]:o,marginBottom:e?u-s[1]:i,marginLeft:t?c[0]:a,inset:{marginTop:n.marginTop,marginRight:n.marginRight,marginBottom:n.marginBottom,marginLeft:n.marginLeft},width:f,height:u}}function hy(t){let e=t.domain(),n=t(e[0]),r=t(e[e.length-1]);return r<n&&([n,r]=[r,n]),[n,r+t.bandwidth()]}function Dp(t={y:"count"},e={}){[t,e]=j5(t,e);let{x:n,y:r}=e;return V5(Z5(n,e,wt),null,null,r,t,Ia(e))}function V5(t,e,n,r,{data:o=Ld,filter:i=Ma,sort:a,reverse:f,...u}={},c={}){t=xy(t),e=xy(e),u=Q5(u,c),o=vy(o,wt),a=a==null?void 0:by("sort",a,c),i=i==null?void 0:wy("filter",i,c),n!=null&&Sa(u,"x","x1","x2")&&(n=null),r!=null&&Sa(u,"y","y1","y2")&&(r=null);let[s,d]=Te(t),[l,p]=Te(t),[m,h]=Te(e),[g,b]=Te(e),[x,M]=n!=null?[n,"x"]:r!=null?[r,"y"]:[],[y,w]=Te(x),{x:v,y:T,z:E,fill:I,stroke:F,x1:_,x2:R,y1:O,y2:L,domain:S,cumulative:A,thresholds:N,interval:P,...D}=c,[tt,Z]=Te(E),[W]=ie(I),[Q]=ie(F),[at,Ut]=Te(W),[Fe,G]=Te(Q);return{..."z"in c&&{z:tt||E},..."fill"in c&&{fill:at||I},..."stroke"in c&&{stroke:Fe||F},...$o(D,(X,$,q)=>{let z=va(gt(X,x),q?.[M]),C=gt(X,E),j=gt(X,W),J=gt(X,Q),ot=t1(u,{z:C,fill:j,stroke:J}),lt=[],Xt=[],Zn=z&&w([]),Ra=C&&Z([]),La=j&&Ut([]),Pa=J&&G([]),Oa=t&&d([]),fs=t&&p([]),Pp=e&&h([]),Ny=e&&b([]),Dy=n3(t?.(X),e?.(X)),Ry=0;for(let Dr of u)Dr.initialize(X);a&&a.initialize(X),i&&i.initialize(X);for(let Dr of $){let Op=[];for(let Xo of u)Xo.scope("facet",Dr);a&&a.scope("facet",Dr),i&&i.scope("facet",Dr);for(let[Xo,Ly]of Rd(Dr,ot))for(let[Py,Oy]of Rd(Ly,z))for(let[Kn,Qn]of Dy(Oy))if(!(i&&!i.reduce(Kn,Qn))){Op.push(Ry++),Xt.push(o.reduceIndex(Kn,X,Qn)),z&&Zn.push(Py),C&&Ra.push(ot===C?Xo:C[Kn[0]]),j&&La.push(ot===j?Xo:j[Kn[0]]),J&&Pa.push(ot===J?Xo:J[Kn[0]]),Oa&&(Oa.push(Qn.x1),fs.push(Qn.x2)),Pp&&(Pp.push(Qn.y1),Ny.push(Qn.y2));for(let Fy of u)Fy.reduce(Kn,Qn);a&&a.reduce(Kn)}lt.push(Op)}return e1(lt,a,f),{data:Xt,facets:lt}}),...!Sa(u,"x")&&(s?{x1:s,x2:l,x:wa(s,l)}:{x:v,x1:_,x2:R}),...!Sa(u,"y")&&(m?{y1:m,y2:g,y:wa(m,g)}:{y:T,y1:O,y2:L}),...y&&{[M]:y},...Object.fromEntries(u.map(({name:X,output:$})=>[X,$]))}}function j5({cumulative:t,domain:e,thresholds:n,interval:r,...o},i){return[o,{cumulative:t,domain:e,thresholds:n,interval:r,...i}]}function Z5(t,{cumulative:e,domain:n,thresholds:r,interval:o},i){return t={...on(t)},t.domain===void 0&&(t.domain=n),t.cumulative===void 0&&(t.cumulative=e),t.thresholds===void 0&&(t.thresholds=r),t.interval===void 0&&(t.interval=o),t.value===void 0&&(t.value=i),t.thresholds=K5(t.thresholds,t.interval),t}function xy(t){if(t==null)return;let{value:e,cumulative:n,domain:r=Ct,thresholds:o}=t,i=a=>{let f=gt(a,e),u;if(Yt(f)||t3(o)){f=pt(f,Sd,Float64Array);let[s,d]=typeof r=="function"?r(f):r,l=typeof o=="function"&&!Da(o)?o(f,s,d):o;typeof l=="number"&&(l=Wi(s,d,l)),Da(l)&&(r===Ct&&(s=l.floor(s),d=l.offset(l.floor(d))),l=l.range(s,l.offset(d))),u=l}else{f=Tr(f);let[s,d]=typeof r=="function"?r(f):r,l=typeof o=="function"&&!Da(o)?o(f,s,d):o;if(typeof l=="number")if(r===Ct){let p=tr(s,d,l);if(isFinite(p))if(p>0){let m=Math.round(s/p),h=Math.round(d/p);m*p<=s||--m,h*p>d||++h;let g=h-m+1;l=new Float64Array(g);for(let b=0;b<g;++b)l[b]=(m+b)*p}else if(p<0){p=-p;let m=Math.round(s*p),h=Math.round(d*p);m/p<=s||--m,h/p>d||++h;let g=h-m+1;l=new Float64Array(g);for(let b=0;b<g;++b)l[b]=(m+b)/p}else l=[s];else l=[s]}else l=$e(s,d,l);else Da(l)&&(r===Ct&&(s=l.floor(s),d=l.offset(l.floor(d))),l=l.range(s,l.offset(d)));u=l}let c=[];if(u.length===1)c.push([u[0],u[0]]);else for(let s=1;s<u.length;++s)c.push([u[s-1],u[s]]);return c.bin=(n<0?o3:n>0?r3:Rp)(c,u,f),c};return i.label=Le(e),i}function K5(t,e,n=yy){if(t===void 0)return e===void 0?n:rn(e);if(typeof t=="string"){switch(t.toLowerCase()){case"freedman-diaconis":return Ha;case"scott":return Zo;case"sturges":return Ya;case"auto":return yy}return $c(t)}return t}function Q5(t,e){return Jg(t,e,by)}function by(t,e,n){return Nd(t,e,n,wy)}function wy(t,e,n){return Dd(t,e,n,vy)}function vy(t,e){return Ta(t,e,J5)}function J5(t){switch(`${t}`.toLowerCase()){case"x":return i3;case"x1":return f3;case"x2":return u3;case"y":return a3;case"y1":return c3;case"y2":return s3}throw new Error(`invalid bin reduce: ${t}`)}function yy(t,e,n){return Math.min(200,Zo(t,e,n))}function t3(t){return e3(t)||re(t)&&Yt(t)}function e3(t){return Da(t)&&typeof t=="function"&&t()instanceof Date}function Da(t){return typeof t?.range=="function"}function n3(t,e){return t&&e?function*(n){let r=t.bin(n);for(let[o,[i,a]]of t.entries()){let f=e.bin(r[o]);for(let[u,[c,s]]of e.entries())yield[f[u],{x1:i,y1:c,x2:a,y2:s}]}}:t?function*(n){let r=t.bin(n);for(let[o,[i,a]]of t.entries())yield[r[o],{x1:i,x2:a}]}:function*(n){let r=e.bin(n);for(let[o,[i,a]]of e.entries())yield[r[o],{y1:i,y2:a}]}}function Rp(t,e,n){return e=Tr(e),r=>{let o=t.map(()=>[]);for(let i of r)o[un(e,n[i])-1]?.push(i);return o}}function r3(t,e,n){let r=Rp(t,e,n);return o=>{let i=r(o);for(let a=1,f=i.length;a<f;++a){let u=i[a-1],c=i[a];for(let s of u)c.push(s)}return i}}function o3(t,e,n){let r=Rp(t,e,n);return o=>{let i=r(o);for(let a=i.length-2;a>=0;--a){let f=i[a+1],u=i[a];for(let c of f)u.push(c)}return i}}function My(t,e){let n=(+t+ +e)/2;return t instanceof Date?new Date(n):n}var i3={reduceIndex(t,e,{x1:n,x2:r}){return My(n,r)}},a3={reduceIndex(t,e,{y1:n,y2:r}){return My(n,r)}},f3={reduceIndex(t,e,{x1:n}){return n}},u3={reduceIndex(t,e,{x2:n}){return n}},c3={reduceIndex(t,e,{y1:n}){return n}},s3={reduceIndex(t,e,{y2:n}){return n}};function Sy(t={}){return Td(t)?t:{...t,y:wt}}function l3(t={},e={}){arguments.length===1&&([t,e]=d3(t));let{x1:n,x:r=n,y:o,...i}=e,[a,f,u,c]=m3(r,o,"x","y",t,i);return{...a,x1:n,x:f,y1:u,y2:c,y:wa(u,c)}}function Cy({y:t,y1:e,y2:n,...r}={}){return r=Ea(r,"x"),e===void 0&&n===void 0?l3({y:t,...r}):([e,n]=Dg(t,e,n),{...r,y1:e,y2:n})}function d3(t){let{offset:e,order:n,reverse:r,...o}=t;return[{offset:e,order:n,reverse:r},o]}var p3={length:!0};function m3(t,e=Ag,n,r,{offset:o,order:i,reverse:a},f){let u=Rg(f),[c,s]=Te(t),[d,l]=wo(e),[p,m]=wo(e);return d.hint=p.hint=p3,o=h3(o),i=y3(i,o,r),[$o(f,(h,g,b)=>{let x=t==null?void 0:s(va(gt(h,t),b?.[n])),M=gt(h,e,Float64Array),y=gt(h,u),w=i&&i(h,x,M,y),v=h.length,T=l(new Float64Array(v)),E=m(new Float64Array(v)),I=[];for(let F of g){let _=x?Array.from(cn(F,R=>x[R]).values()):[F];if(w)for(let R of _)R.sort(w);for(let R of _){let O=0,L=0;a&&R.reverse();for(let S of R){let A=M[S];A<0?O=E[S]=(T[S]=O)+A:A>0?L=E[S]=(T[S]=L)+A:E[S]=T[S]=L}}I.push(_)}return o&&o(I,T,E,y),{data:h,facets:g}}),c,d,p]}function h3(t){if(t!=null){if(typeof t=="function")return t;switch(`${t}`.toLowerCase()){case"expand":case"normalize":return g3;case"center":case"silhouette":return x3;case"wiggle":return $y}throw new Error(`unknown offset: ${t}`)}}function Ay(t,e){let n=0,r=0;for(let o of t){let i=e[o];i<n&&(n=i),i>r&&(r=i)}return[n,r]}function g3(t,e,n){for(let r of t)for(let o of r){let[i,a]=Ay(o,n);for(let f of o){let u=1/(a-i||1);e[f]=u*(e[f]-i),n[f]=u*(n[f]-i)}}}function x3(t,e,n){for(let r of t){for(let o of r){let[i,a]=Ay(o,n);for(let f of o){let u=(a+i)/2;e[f]-=u,n[f]-=u}}Ey(r,e,n)}Iy(t,e,n)}function $y(t,e,n,r){for(let o of t){let i=new Qt,a=0;for(let f of o){let u=-1,c=f.map(p=>Math.abs(n[p]-e[p])),s=f.map(p=>{u=r?r[p]:++u;let m=n[p]-e[p],h=i.has(u)?m-i.get(u):0;return i.set(u,m),h}),d=[0,...qa(s)];for(let p of f)e[p]+=a,n[p]+=a;let l=fe(c);l&&(a-=fe(c,(p,m)=>(s[m]/2+d[m])*p)/l)}Ey(o,e,n)}Iy(t,e,n)}function Ey(t,e,n){let r=Jt(t,o=>Jt(o,i=>e[i]));for(let o of t)for(let i of o)e[i]-=r,n[i]-=r}function Iy(t,e,n){let r=t.length;if(r===1)return;let o=t.map(f=>f.flat()),i=o.map(f=>(Jt(f,u=>e[u])+Ht(f,u=>n[u]))/2),a=Jt(i);for(let f=0;f<r;f++){let u=a-i[f];for(let c of o[f])e[c]+=u,n[c]+=u}}function y3(t,e,n){if(t===void 0&&e===$y)return Ty(Kt);if(t!=null){if(typeof t=="string"){let r=t.startsWith("-"),o=r?Mr:Kt;switch((r?t.slice(1):t).toLowerCase()){case"value":case n:return b3(o);case"z":return w3(o);case"sum":return v3(o);case"appearance":return M3(o);case"inside-out":return Ty(o)}return _y(vd(t))}if(typeof t=="function")return(t.length===1?_y:S3)(t);if(Array.isArray(t))return T3(t);throw new Error(`invalid order: ${t}`)}}function b3(t){return(e,n,r)=>(o,i)=>t(r[o],r[i])}function w3(t){return(e,n,r,o)=>(i,a)=>t(o[i],o[a])}function v3(t){return os(t,(e,n,r,o)=>Pr(ne(e),i=>fe(i,a=>r[a]),i=>o[i]))}function M3(t){return os(t,(e,n,r,o)=>Pr(ne(e),i=>n[jo(i,a=>r[a])],i=>o[i]))}function Ty(t){return os(t,(e,n,r,o)=>{let i=ne(e),a=Pr(i,d=>n[jo(d,l=>r[l])],d=>o[d]),f=Ae(i,d=>fe(d,l=>r[l]),d=>o[d]),u=[],c=[],s=0;for(let d of a)s<0?(s+=f.get(d),u.push(d)):(s-=f.get(d),c.push(d));return c.reverse().concat(u)})}function _y(t){return e=>{let n=gt(e,t);return(r,o)=>Kt(n[r],n[o])}}function S3(t){return e=>(n,r)=>t(e[n],e[r])}function T3(t){return os(Kt,()=>t)}function os(t,e){return(n,r,o,i)=>{if(!i)throw new Error("missing channel: z");let a=new Qt(e(n,r,o,i).map((f,u)=>[f,u]));return(f,u)=>t(a.get(i[f]),a.get(i[u]))}}var Lp=class extends Nt{constructor(e,n,r={},o){super(e,n,r,o);let{inset:i=0,insetTop:a=i,insetRight:f=i,insetBottom:u=i,insetLeft:c=i,rx:s,ry:d}=r;this.insetTop=ct(a),this.insetRight=ct(f),this.insetBottom=ct(u),this.insetLeft=ct(c),this.rx=St(s,"auto"),this.ry=St(d,"auto")}render(e,n,r,o,i){let{rx:a,ry:f}=this;return yt("svg:g",i).call(me,this,o,i).call(this._transform,this,n).call(u=>u.selectAll().data(e).enter().append("rect").call(he,this).attr("x",this._x(n,r,o)).attr("width",this._width(n,r,o)).attr("y",this._y(n,r,o)).attr("height",this._height(n,r,o)).call(et,"rx",a).call(et,"ry",f).call(Oe,this,r)).node()}_x(e,{x:n},{marginLeft:r}){let{insetLeft:o}=this;return n?i=>n[i]+o:r+o}_y(e,{y:n},{marginTop:r}){let{insetTop:o}=this;return n?i=>n[i]+o:r+o}_width({x:e},{x:n},{marginRight:r,marginLeft:o,width:i}){let{insetLeft:a,insetRight:f}=this,u=n&&e?e.bandwidth():i-r-o;return Math.max(0,u-a-f)}_height({y:e},{y:n},{marginTop:r,marginBottom:o,height:i}){let{insetTop:a,insetBottom:f}=this,u=n&&e?e.bandwidth():i-r-o;return Math.max(0,u-a-f)}},_3={ariaLabel:"bar"};var is=class extends Lp{constructor(e,n={}){let{x:r,y1:o,y2:i}=n;super(e,{y1:{value:o,scale:"y"},y2:{value:i,scale:"y"},x:{value:r,scale:"x",type:"band",optional:!0}},n,_3)}_transform(e,n,{y:r}){e.call(ge,n,{y:r},0,0)}_y({y:e},{y1:n,y2:r},{marginTop:o}){let{insetTop:i}=this;return Wn(e)?o+i:a=>Math.min(n[a],r[a])+i}_height({y:e},{y1:n,y2:r},{marginTop:o,marginBottom:i,height:a}){let{insetTop:f,insetBottom:u}=this;return Wn(e)?a-o-i-f-u:c=>Math.max(0,Math.abs(r[c]-n[c])-f-u)}};function as(t,e={}){return Ng(e)||(e={...e,x:Ec,y2:wt}),new is(t,Cy(Gc(Sy(e))))}function ky(t){let e=t.querySelectorAll(".js-Tree-heading"),n=()=>{let o=[];for(let u of e){let c=u.getBoundingClientRect();c.height&&c.top<80&&o.unshift(u)}o.length==0&&e[0]instanceof HTMLHeadingElement&&(o=[e[0]]);let i=1/0,a=[];for(let u of o){let c=Number(u.tagName[1]);c<i&&(i=c,a.push(u))}let f=t.querySelectorAll(".js-Tree-item");for(let u of f){let c=u.dataset.headingId,s=!1,d=!1;for(let l of a)if(l.id===c){l===a[0]?s=!0:d=!0;break}u.setAttribute("aria-selected",s?"true":"false"),u.setAttribute("aria-expanded",d?"true":"false")}},r=new IntersectionObserver(A3(n,20));for(let o of e)r.observe(o)}function A3(t,e){let n;return(...r)=>{clearTimeout(n),n=setTimeout(()=>t(...r),e)}}for(let t of Page.Charts?.Programs||[])for(let e of t?.Charts||[])switch(e.Type){case"partition":document.querySelector(`[data-chart-id="${e.ID}"]`)?.append($3(e));break;case"histogram":document.querySelector(`[data-chart-id="${e.ID}"]`)?.append(E3(e));break;default:console.error("unknown chart type");break}for(let t of document.querySelectorAll(".js-Tree"))ky(t);function $3({Data:t,Name:e}){t??=[];let n=t.map(r=>r.Value).reduce((r,o)=>Math.max(r,o),0);return Na({color:{type:"ordinal",scheme:"Spectral"},nice:!0,x:{label:e,labelOffset:Number.MAX_SAFE_INTEGER,tickRotate:45,domain:t.map(r=>r.Key)},y:{label:"Count",domain:[0,n+1]},width:1024,style:"overflow:visible;background:transparent;margin-bottom:3rem;",marks:[as(t,{tip:!0,fill:r=>isNaN(Number(r.Key))?r.Key:Number(r.Key),x:r=>r.Key,y:r=>r.Value}),Uo()]})}function E3({Data:t}){t??=[];let e=3,n=f=>isNaN(Number(f))?f:Number(f),r=Array.from(ja(t.map(f=>n(f.Key)))),o=new Map(r.map((f,u)=>[f,u])),i=f=>(o.get(f)??0)%e,a=f=>Math.floor((o.get(f)??0)/e);return Na({marginLeft:60,width:1024,grid:!0,nice:!0,x:{label:"Distribution"},color:{type:"ordinal",legend:!0,scheme:"Spectral",label:"Counter"},y:{insetTop:16,domain:[0,1]},fx:{ticks:[]},fy:{ticks:[]},style:"background:transparent;",marks:[as(t,Dp({y:"proportion-facet",x:"x1",interval:.1,cumulative:1},{tip:!0,fill:f=>n(f.Key),x:f=>f.Value,fx:f=>i(n(f.Key)),fy:f=>a(n(f.Key))})),qo(r,{frameAnchor:"top",dy:3,fx:i,fy:a}),Nr({anchor:"bottom",tickSpacing:35}),Nr({anchor:"top",tickSpacing:35}),Uo()]})}})();
+/**
+ * @license
+ * Copyright 2024 The Go Authors. All rights reserved.
+ * Use of this source code is governed by a BSD-style
+ * license that can be found in the LICENSE file.
+ */
 /**
  * @license
  * Copyright 2023 The Go Authors. All rights reserved.
diff --git a/internal/content/telemetrygodev/static/charts.min.js.map b/internal/content/telemetrygodev/static/charts.min.js.map
index d0e1537..e01bd17 100644
--- a/internal/content/telemetrygodev/static/charts.min.js.map
+++ b/internal/content/telemetrygodev/static/charts.min.js.map
@@ -1,7 +1,7 @@
 {
   "version": 3,
-  "sources": ["../../../../node_modules/d3-array/src/ascending.js", "../../../../node_modules/d3-array/src/descending.js", "../../../../node_modules/d3-array/src/bisector.js", "../../../../node_modules/d3-array/src/number.js", "../../../../node_modules/d3-array/src/bisect.js", "../../../../node_modules/d3-array/src/count.js", "../../../../node_modules/d3-array/src/cross.js", "../../../../node_modules/d3-array/src/cumsum.js", "../../../../node_modules/d3-array/src/variance.js", "../../../../node_modules/d3-array/src/deviation.js", "../../../../node_modules/d3-array/src/extent.js", "../../../../node_modules/d3-array/src/fsum.js", "../../../../node_modules/internmap/src/index.js", "../../../../node_modules/d3-array/src/identity.js", "../../../../node_modules/d3-array/src/group.js", "../../../../node_modules/d3-array/src/permute.js", "../../../../node_modules/d3-array/src/sort.js", "../../../../node_modules/d3-array/src/groupSort.js", "../../../../node_modules/d3-array/src/ticks.js", "../../../../node_modules/d3-array/src/threshold/sturges.js", "../../../../node_modules/d3-array/src/max.js", "../../../../node_modules/d3-array/src/maxIndex.js", "../../../../node_modules/d3-array/src/min.js", "../../../../node_modules/d3-array/src/minIndex.js", "../../../../node_modules/d3-array/src/quickselect.js", "../../../../node_modules/d3-array/src/greatest.js", "../../../../node_modules/d3-array/src/quantile.js", "../../../../node_modules/d3-array/src/threshold/freedmanDiaconis.js", "../../../../node_modules/d3-array/src/threshold/scott.js", "../../../../node_modules/d3-array/src/mean.js", "../../../../node_modules/d3-array/src/median.js", "../../../../node_modules/d3-array/src/merge.js", "../../../../node_modules/d3-array/src/mode.js", "../../../../node_modules/d3-array/src/pairs.js", "../../../../node_modules/d3-array/src/range.js", "../../../../node_modules/d3-array/src/sum.js", "../../../../node_modules/d3-array/src/reverse.js", "../../../../node_modules/d3-array/src/union.js", "../../../../node_modules/d3-axis/src/identity.js", "../../../../node_modules/d3-axis/src/axis.js", "../../../../node_modules/d3-dispatch/src/dispatch.js", "../../../../node_modules/d3-selection/src/namespaces.js", "../../../../node_modules/d3-selection/src/namespace.js", "../../../../node_modules/d3-selection/src/creator.js", "../../../../node_modules/d3-selection/src/selector.js", "../../../../node_modules/d3-selection/src/selection/select.js", "../../../../node_modules/d3-selection/src/array.js", "../../../../node_modules/d3-selection/src/selectorAll.js", "../../../../node_modules/d3-selection/src/selection/selectAll.js", "../../../../node_modules/d3-selection/src/matcher.js", "../../../../node_modules/d3-selection/src/selection/selectChild.js", "../../../../node_modules/d3-selection/src/selection/selectChildren.js", "../../../../node_modules/d3-selection/src/selection/filter.js", "../../../../node_modules/d3-selection/src/selection/sparse.js", "../../../../node_modules/d3-selection/src/selection/enter.js", "../../../../node_modules/d3-selection/src/constant.js", "../../../../node_modules/d3-selection/src/selection/data.js", "../../../../node_modules/d3-selection/src/selection/exit.js", "../../../../node_modules/d3-selection/src/selection/join.js", "../../../../node_modules/d3-selection/src/selection/merge.js", "../../../../node_modules/d3-selection/src/selection/order.js", "../../../../node_modules/d3-selection/src/selection/sort.js", "../../../../node_modules/d3-selection/src/selection/call.js", "../../../../node_modules/d3-selection/src/selection/nodes.js", "../../../../node_modules/d3-selection/src/selection/node.js", "../../../../node_modules/d3-selection/src/selection/size.js", "../../../../node_modules/d3-selection/src/selection/empty.js", "../../../../node_modules/d3-selection/src/selection/each.js", "../../../../node_modules/d3-selection/src/selection/attr.js", "../../../../node_modules/d3-selection/src/window.js", "../../../../node_modules/d3-selection/src/selection/style.js", "../../../../node_modules/d3-selection/src/selection/property.js", "../../../../node_modules/d3-selection/src/selection/classed.js", "../../../../node_modules/d3-selection/src/selection/text.js", "../../../../node_modules/d3-selection/src/selection/html.js", "../../../../node_modules/d3-selection/src/selection/raise.js", "../../../../node_modules/d3-selection/src/selection/lower.js", "../../../../node_modules/d3-selection/src/selection/append.js", "../../../../node_modules/d3-selection/src/selection/insert.js", "../../../../node_modules/d3-selection/src/selection/remove.js", "../../../../node_modules/d3-selection/src/selection/clone.js", "../../../../node_modules/d3-selection/src/selection/datum.js", "../../../../node_modules/d3-selection/src/selection/on.js", "../../../../node_modules/d3-selection/src/selection/dispatch.js", "../../../../node_modules/d3-selection/src/selection/iterator.js", "../../../../node_modules/d3-selection/src/selection/index.js", "../../../../node_modules/d3-selection/src/select.js", "../../../../node_modules/d3-selection/src/sourceEvent.js", "../../../../node_modules/d3-selection/src/pointer.js", "../../../../node_modules/d3-color/src/define.js", "../../../../node_modules/d3-color/src/color.js", "../../../../node_modules/d3-color/src/math.js", "../../../../node_modules/d3-color/src/lab.js", "../../../../node_modules/d3-color/src/cubehelix.js", "../../../../node_modules/d3-interpolate/src/basis.js", "../../../../node_modules/d3-interpolate/src/basisClosed.js", "../../../../node_modules/d3-interpolate/src/constant.js", "../../../../node_modules/d3-interpolate/src/color.js", "../../../../node_modules/d3-interpolate/src/rgb.js", "../../../../node_modules/d3-interpolate/src/numberArray.js", "../../../../node_modules/d3-interpolate/src/array.js", "../../../../node_modules/d3-interpolate/src/date.js", "../../../../node_modules/d3-interpolate/src/number.js", "../../../../node_modules/d3-interpolate/src/object.js", "../../../../node_modules/d3-interpolate/src/string.js", "../../../../node_modules/d3-interpolate/src/value.js", "../../../../node_modules/d3-interpolate/src/round.js", "../../../../node_modules/d3-interpolate/src/transform/decompose.js", "../../../../node_modules/d3-interpolate/src/transform/parse.js", "../../../../node_modules/d3-interpolate/src/transform/index.js", "../../../../node_modules/d3-interpolate/src/hsl.js", "../../../../node_modules/d3-interpolate/src/lab.js", "../../../../node_modules/d3-interpolate/src/hcl.js", "../../../../node_modules/d3-interpolate/src/cubehelix.js", "../../../../node_modules/d3-interpolate/src/piecewise.js", "../../../../node_modules/d3-interpolate/src/quantize.js", "../../../../node_modules/d3-timer/src/timer.js", "../../../../node_modules/d3-timer/src/timeout.js", "../../../../node_modules/d3-transition/src/transition/schedule.js", "../../../../node_modules/d3-transition/src/interrupt.js", "../../../../node_modules/d3-transition/src/selection/interrupt.js", "../../../../node_modules/d3-transition/src/transition/tween.js", "../../../../node_modules/d3-transition/src/transition/interpolate.js", "../../../../node_modules/d3-transition/src/transition/attr.js", "../../../../node_modules/d3-transition/src/transition/attrTween.js", "../../../../node_modules/d3-transition/src/transition/delay.js", "../../../../node_modules/d3-transition/src/transition/duration.js", "../../../../node_modules/d3-transition/src/transition/ease.js", "../../../../node_modules/d3-transition/src/transition/easeVarying.js", "../../../../node_modules/d3-transition/src/transition/filter.js", "../../../../node_modules/d3-transition/src/transition/merge.js", "../../../../node_modules/d3-transition/src/transition/on.js", "../../../../node_modules/d3-transition/src/transition/remove.js", "../../../../node_modules/d3-transition/src/transition/select.js", "../../../../node_modules/d3-transition/src/transition/selectAll.js", "../../../../node_modules/d3-transition/src/transition/selection.js", "../../../../node_modules/d3-transition/src/transition/style.js", "../../../../node_modules/d3-transition/src/transition/styleTween.js", "../../../../node_modules/d3-transition/src/transition/text.js", "../../../../node_modules/d3-transition/src/transition/textTween.js", "../../../../node_modules/d3-transition/src/transition/transition.js", "../../../../node_modules/d3-transition/src/transition/end.js", "../../../../node_modules/d3-transition/src/transition/index.js", "../../../../node_modules/d3-ease/src/cubic.js", "../../../../node_modules/d3-transition/src/selection/transition.js", "../../../../node_modules/d3-transition/src/selection/index.js", "../../../../node_modules/d3-brush/src/brush.js", "../../../../node_modules/d3-path/src/path.js", "../../../../node_modules/d3-format/src/formatDecimal.js", "../../../../node_modules/d3-format/src/exponent.js", "../../../../node_modules/d3-format/src/formatGroup.js", "../../../../node_modules/d3-format/src/formatNumerals.js", "../../../../node_modules/d3-format/src/formatSpecifier.js", "../../../../node_modules/d3-format/src/formatTrim.js", "../../../../node_modules/d3-format/src/formatPrefixAuto.js", "../../../../node_modules/d3-format/src/formatRounded.js", "../../../../node_modules/d3-format/src/formatTypes.js", "../../../../node_modules/d3-format/src/identity.js", "../../../../node_modules/d3-format/src/locale.js", "../../../../node_modules/d3-format/src/defaultLocale.js", "../../../../node_modules/d3-format/src/precisionFixed.js", "../../../../node_modules/d3-format/src/precisionPrefix.js", "../../../../node_modules/d3-format/src/precisionRound.js", "../../../../node_modules/d3-geo/src/math.js", "../../../../node_modules/d3-geo/src/noop.js", "../../../../node_modules/d3-geo/src/stream.js", "../../../../node_modules/d3-geo/src/cartesian.js", "../../../../node_modules/d3-geo/src/compose.js", "../../../../node_modules/d3-geo/src/rotation.js", "../../../../node_modules/d3-geo/src/circle.js", "../../../../node_modules/d3-geo/src/clip/buffer.js", "../../../../node_modules/d3-geo/src/pointEqual.js", "../../../../node_modules/d3-geo/src/clip/rejoin.js", "../../../../node_modules/d3-geo/src/polygonContains.js", "../../../../node_modules/d3-geo/src/clip/index.js", "../../../../node_modules/d3-geo/src/clip/antimeridian.js", "../../../../node_modules/d3-geo/src/clip/circle.js", "../../../../node_modules/d3-geo/src/clip/line.js", "../../../../node_modules/d3-geo/src/clip/rectangle.js", "../../../../node_modules/d3-geo/src/identity.js", "../../../../node_modules/d3-geo/src/path/area.js", "../../../../node_modules/d3-geo/src/path/bounds.js", "../../../../node_modules/d3-geo/src/path/centroid.js", "../../../../node_modules/d3-geo/src/path/context.js", "../../../../node_modules/d3-geo/src/path/measure.js", "../../../../node_modules/d3-geo/src/path/string.js", "../../../../node_modules/d3-geo/src/path/index.js", "../../../../node_modules/d3-geo/src/transform.js", "../../../../node_modules/d3-geo/src/projection/fit.js", "../../../../node_modules/d3-geo/src/projection/resample.js", "../../../../node_modules/d3-geo/src/projection/index.js", "../../../../node_modules/d3-geo/src/projection/conic.js", "../../../../node_modules/d3-geo/src/projection/cylindricalEqualArea.js", "../../../../node_modules/d3-geo/src/projection/conicEqualArea.js", "../../../../node_modules/d3-geo/src/projection/albers.js", "../../../../node_modules/d3-geo/src/projection/albersUsa.js", "../../../../node_modules/d3-geo/src/projection/azimuthal.js", "../../../../node_modules/d3-geo/src/projection/azimuthalEqualArea.js", "../../../../node_modules/d3-geo/src/projection/azimuthalEquidistant.js", "../../../../node_modules/d3-geo/src/projection/mercator.js", "../../../../node_modules/d3-geo/src/projection/conicConformal.js", "../../../../node_modules/d3-geo/src/projection/equirectangular.js", "../../../../node_modules/d3-geo/src/projection/conicEquidistant.js", "../../../../node_modules/d3-geo/src/projection/equalEarth.js", "../../../../node_modules/d3-geo/src/projection/gnomonic.js", "../../../../node_modules/d3-geo/src/projection/orthographic.js", "../../../../node_modules/d3-geo/src/projection/stereographic.js", "../../../../node_modules/d3-geo/src/projection/transverseMercator.js", "../../../../node_modules/d3-scale/src/init.js", "../../../../node_modules/d3-scale/src/ordinal.js", "../../../../node_modules/d3-scale/src/band.js", "../../../../node_modules/d3-scale/src/constant.js", "../../../../node_modules/d3-scale/src/number.js", "../../../../node_modules/d3-scale/src/continuous.js", "../../../../node_modules/d3-scale/src/tickFormat.js", "../../../../node_modules/d3-scale/src/linear.js", "../../../../node_modules/d3-scale/src/identity.js", "../../../../node_modules/d3-scale/src/nice.js", "../../../../node_modules/d3-scale/src/log.js", "../../../../node_modules/d3-scale/src/symlog.js", "../../../../node_modules/d3-scale/src/pow.js", "../../../../node_modules/d3-scale/src/quantile.js", "../../../../node_modules/d3-scale/src/threshold.js", "../../../../node_modules/d3-time/src/interval.js", "../../../../node_modules/d3-time/src/millisecond.js", "../../../../node_modules/d3-time/src/second.js", "../../../../node_modules/d3-time/src/minute.js", "../../../../node_modules/d3-time/src/hour.js", "../../../../node_modules/d3-time/src/day.js", "../../../../node_modules/d3-time/src/week.js", "../../../../node_modules/d3-time/src/month.js", "../../../../node_modules/d3-time/src/year.js", "../../../../node_modules/d3-time/src/ticks.js", "../../../../node_modules/d3-time-format/src/locale.js", "../../../../node_modules/d3-time-format/src/defaultLocale.js", "../../../../node_modules/d3-scale/src/time.js", "../../../../node_modules/d3-scale/src/utcTime.js", "../../../../node_modules/d3-scale/src/sequential.js", "../../../../node_modules/d3-scale/src/diverging.js", "../../../../node_modules/d3-scale-chromatic/src/colors.js", "../../../../node_modules/d3-scale-chromatic/src/categorical/category10.js", "../../../../node_modules/d3-scale-chromatic/src/categorical/Accent.js", "../../../../node_modules/d3-scale-chromatic/src/categorical/Dark2.js", "../../../../node_modules/d3-scale-chromatic/src/categorical/Paired.js", "../../../../node_modules/d3-scale-chromatic/src/categorical/Pastel1.js", "../../../../node_modules/d3-scale-chromatic/src/categorical/Pastel2.js", "../../../../node_modules/d3-scale-chromatic/src/categorical/Set1.js", "../../../../node_modules/d3-scale-chromatic/src/categorical/Set2.js", "../../../../node_modules/d3-scale-chromatic/src/categorical/Set3.js", "../../../../node_modules/d3-scale-chromatic/src/categorical/Tableau10.js", "../../../../node_modules/d3-scale-chromatic/src/ramp.js", "../../../../node_modules/d3-scale-chromatic/src/diverging/BrBG.js", "../../../../node_modules/d3-scale-chromatic/src/diverging/PRGn.js", "../../../../node_modules/d3-scale-chromatic/src/diverging/PiYG.js", "../../../../node_modules/d3-scale-chromatic/src/diverging/PuOr.js", "../../../../node_modules/d3-scale-chromatic/src/diverging/RdBu.js", "../../../../node_modules/d3-scale-chromatic/src/diverging/RdGy.js", "../../../../node_modules/d3-scale-chromatic/src/diverging/RdYlBu.js", "../../../../node_modules/d3-scale-chromatic/src/diverging/RdYlGn.js", "../../../../node_modules/d3-scale-chromatic/src/diverging/Spectral.js", "../../../../node_modules/d3-scale-chromatic/src/sequential-multi/BuGn.js", "../../../../node_modules/d3-scale-chromatic/src/sequential-multi/BuPu.js", "../../../../node_modules/d3-scale-chromatic/src/sequential-multi/GnBu.js", "../../../../node_modules/d3-scale-chromatic/src/sequential-multi/OrRd.js", "../../../../node_modules/d3-scale-chromatic/src/sequential-multi/PuBuGn.js", "../../../../node_modules/d3-scale-chromatic/src/sequential-multi/PuBu.js", "../../../../node_modules/d3-scale-chromatic/src/sequential-multi/PuRd.js", "../../../../node_modules/d3-scale-chromatic/src/sequential-multi/RdPu.js", "../../../../node_modules/d3-scale-chromatic/src/sequential-multi/YlGnBu.js", "../../../../node_modules/d3-scale-chromatic/src/sequential-multi/YlGn.js", "../../../../node_modules/d3-scale-chromatic/src/sequential-multi/YlOrBr.js", "../../../../node_modules/d3-scale-chromatic/src/sequential-multi/YlOrRd.js", "../../../../node_modules/d3-scale-chromatic/src/sequential-single/Blues.js", "../../../../node_modules/d3-scale-chromatic/src/sequential-single/Greens.js", "../../../../node_modules/d3-scale-chromatic/src/sequential-single/Greys.js", "../../../../node_modules/d3-scale-chromatic/src/sequential-single/Purples.js", "../../../../node_modules/d3-scale-chromatic/src/sequential-single/Reds.js", "../../../../node_modules/d3-scale-chromatic/src/sequential-single/Oranges.js", "../../../../node_modules/d3-scale-chromatic/src/sequential-multi/cividis.js", "../../../../node_modules/d3-scale-chromatic/src/sequential-multi/cubehelix.js", "../../../../node_modules/d3-scale-chromatic/src/sequential-multi/rainbow.js", "../../../../node_modules/d3-scale-chromatic/src/sequential-multi/sinebow.js", "../../../../node_modules/d3-scale-chromatic/src/sequential-multi/turbo.js", "../../../../node_modules/d3-scale-chromatic/src/sequential-multi/viridis.js", "../../../../node_modules/d3-shape/src/math.js", "../../../../node_modules/d3-shape/src/symbol/asterisk.js", "../../../../node_modules/d3-shape/src/symbol/circle.js", "../../../../node_modules/d3-shape/src/symbol/cross.js", "../../../../node_modules/d3-shape/src/symbol/diamond.js", "../../../../node_modules/d3-shape/src/symbol/diamond2.js", "../../../../node_modules/d3-shape/src/symbol/plus.js", "../../../../node_modules/d3-shape/src/symbol/square.js", "../../../../node_modules/d3-shape/src/symbol/square2.js", "../../../../node_modules/d3-shape/src/symbol/star.js", "../../../../node_modules/d3-shape/src/symbol/triangle.js", "../../../../node_modules/d3-shape/src/symbol/triangle2.js", "../../../../node_modules/d3-shape/src/symbol/wye.js", "../../../../node_modules/d3-shape/src/symbol/times.js", "../../../../node_modules/d3-shape/src/symbol.js", "../../../../node_modules/d3-zoom/src/transform.js", "../../../../node_modules/@observablehq/plot/src/defined.js", "../../../../node_modules/isoformat/src/format.js", "../../../../node_modules/isoformat/src/parse.js", "../../../../node_modules/@observablehq/plot/src/time.js", "../../../../node_modules/@observablehq/plot/src/options.js", "../../../../node_modules/@observablehq/plot/src/scales/index.js", "../../../../node_modules/@observablehq/plot/src/symbol.js", "../../../../node_modules/@observablehq/plot/src/transforms/basic.js", "../../../../node_modules/@observablehq/plot/src/transforms/group.js", "../../../../node_modules/@observablehq/plot/src/channel.js", "../../../../node_modules/@observablehq/plot/src/context.js", "../../../../node_modules/@observablehq/plot/src/warnings.js", "../../../../node_modules/@observablehq/plot/src/projection.js", "../../../../node_modules/@observablehq/plot/src/scales/schemes.js", "../../../../node_modules/@observablehq/plot/src/scales/quantitative.js", "../../../../node_modules/@observablehq/plot/src/scales/diverging.js", "../../../../node_modules/@observablehq/plot/src/scales/temporal.js", "../../../../node_modules/@observablehq/plot/src/scales/ordinal.js", "../../../../node_modules/@observablehq/plot/src/scales.js", "../../../../node_modules/@observablehq/plot/src/memoize.js", "../../../../node_modules/@observablehq/plot/src/format.js", "../../../../node_modules/@observablehq/plot/src/style.js", "../../../../node_modules/@observablehq/plot/src/dimensions.js", "../../../../node_modules/@observablehq/plot/src/facet.js", "../../../../node_modules/@observablehq/plot/src/mark.js", "../../../../node_modules/@observablehq/plot/src/interactions/pointer.js", "../../../../node_modules/@observablehq/plot/src/axes.js", "../../../../node_modules/@observablehq/plot/src/legends/ramp.js", "../../../../node_modules/@observablehq/plot/src/math.js", "../../../../node_modules/@observablehq/plot/src/marker.js", "../../../../node_modules/@observablehq/plot/src/transforms/inset.js", "../../../../node_modules/@observablehq/plot/src/transforms/interval.js", "../../../../node_modules/@observablehq/plot/src/marks/rule.js", "../../../../node_modules/@observablehq/plot/src/template.js", "../../../../node_modules/@observablehq/plot/src/marks/text.js", "../../../../node_modules/@observablehq/plot/src/marks/vector.js", "../../../../node_modules/@observablehq/plot/src/marks/axis.js", "../../../../node_modules/@observablehq/plot/src/legends/swatches.js", "../../../../node_modules/@observablehq/plot/src/legends.js", "../../../../node_modules/@observablehq/plot/src/marks/frame.js", "../../../../node_modules/@observablehq/plot/src/marks/tip.js", "../../../../node_modules/@observablehq/plot/src/plot.js", "../../../../node_modules/@observablehq/plot/src/transforms/bin.js", "../../../../node_modules/@observablehq/plot/src/transforms/identity.js", "../../../../node_modules/@observablehq/plot/src/transforms/stack.js", "../../../../node_modules/@observablehq/plot/src/marks/bar.js", "../charts.ts"],
-  "sourcesContent": ["export default function ascending(a, b) {\n  return a == null || b == null ? NaN : a < b ? -1 : a > b ? 1 : a >= b ? 0 : NaN;\n}\n", "export default function descending(a, b) {\n  return a == null || b == null ? NaN\n    : b < a ? -1\n    : b > a ? 1\n    : b >= a ? 0\n    : NaN;\n}\n", "import ascending from \"./ascending.js\";\nimport descending from \"./descending.js\";\n\nexport default function bisector(f) {\n  let compare1, compare2, delta;\n\n  // If an accessor is specified, promote it to a comparator. In this case we\n  // can test whether the search value is (self-) comparable. We can\u2019t do this\n  // for a comparator (except for specific, known comparators) because we can\u2019t\n  // tell if the comparator is symmetric, and an asymmetric comparator can\u2019t be\n  // used to test whether a single value is comparable.\n  if (f.length !== 2) {\n    compare1 = ascending;\n    compare2 = (d, x) => ascending(f(d), x);\n    delta = (d, x) => f(d) - x;\n  } else {\n    compare1 = f === ascending || f === descending ? f : zero;\n    compare2 = f;\n    delta = f;\n  }\n\n  function left(a, x, lo = 0, hi = a.length) {\n    if (lo < hi) {\n      if (compare1(x, x) !== 0) return hi;\n      do {\n        const mid = (lo + hi) >>> 1;\n        if (compare2(a[mid], x) < 0) lo = mid + 1;\n        else hi = mid;\n      } while (lo < hi);\n    }\n    return lo;\n  }\n\n  function right(a, x, lo = 0, hi = a.length) {\n    if (lo < hi) {\n      if (compare1(x, x) !== 0) return hi;\n      do {\n        const mid = (lo + hi) >>> 1;\n        if (compare2(a[mid], x) <= 0) lo = mid + 1;\n        else hi = mid;\n      } while (lo < hi);\n    }\n    return lo;\n  }\n\n  function center(a, x, lo = 0, hi = a.length) {\n    const i = left(a, x, lo, hi - 1);\n    return i > lo && delta(a[i - 1], x) > -delta(a[i], x) ? i - 1 : i;\n  }\n\n  return {left, center, right};\n}\n\nfunction zero() {\n  return 0;\n}\n", "export default function number(x) {\n  return x === null ? NaN : +x;\n}\n\nexport function* numbers(values, valueof) {\n  if (valueof === undefined) {\n    for (let value of values) {\n      if (value != null && (value = +value) >= value) {\n        yield value;\n      }\n    }\n  } else {\n    let index = -1;\n    for (let value of values) {\n      if ((value = valueof(value, ++index, values)) != null && (value = +value) >= value) {\n        yield value;\n      }\n    }\n  }\n}\n", "import ascending from \"./ascending.js\";\nimport bisector from \"./bisector.js\";\nimport number from \"./number.js\";\n\nconst ascendingBisect = bisector(ascending);\nexport const bisectRight = ascendingBisect.right;\nexport const bisectLeft = ascendingBisect.left;\nexport const bisectCenter = bisector(number).center;\nexport default bisectRight;\n", "export default function count(values, valueof) {\n  let count = 0;\n  if (valueof === undefined) {\n    for (let value of values) {\n      if (value != null && (value = +value) >= value) {\n        ++count;\n      }\n    }\n  } else {\n    let index = -1;\n    for (let value of values) {\n      if ((value = valueof(value, ++index, values)) != null && (value = +value) >= value) {\n        ++count;\n      }\n    }\n  }\n  return count;\n}\n", "function length(array) {\n  return array.length | 0;\n}\n\nfunction empty(length) {\n  return !(length > 0);\n}\n\nfunction arrayify(values) {\n  return typeof values !== \"object\" || \"length\" in values ? values : Array.from(values);\n}\n\nfunction reducer(reduce) {\n  return values => reduce(...values);\n}\n\nexport default function cross(...values) {\n  const reduce = typeof values[values.length - 1] === \"function\" && reducer(values.pop());\n  values = values.map(arrayify);\n  const lengths = values.map(length);\n  const j = values.length - 1;\n  const index = new Array(j + 1).fill(0);\n  const product = [];\n  if (j < 0 || lengths.some(empty)) return product;\n  while (true) {\n    product.push(index.map((j, i) => values[i][j]));\n    let i = j;\n    while (++index[i] === lengths[i]) {\n      if (i === 0) return reduce ? product.map(reduce) : product;\n      index[i--] = 0;\n    }\n  }\n}\n", "export default function cumsum(values, valueof) {\n  var sum = 0, index = 0;\n  return Float64Array.from(values, valueof === undefined\n    ? v => (sum += +v || 0)\n    : v => (sum += +valueof(v, index++, values) || 0));\n}", "export default function variance(values, valueof) {\n  let count = 0;\n  let delta;\n  let mean = 0;\n  let sum = 0;\n  if (valueof === undefined) {\n    for (let value of values) {\n      if (value != null && (value = +value) >= value) {\n        delta = value - mean;\n        mean += delta / ++count;\n        sum += delta * (value - mean);\n      }\n    }\n  } else {\n    let index = -1;\n    for (let value of values) {\n      if ((value = valueof(value, ++index, values)) != null && (value = +value) >= value) {\n        delta = value - mean;\n        mean += delta / ++count;\n        sum += delta * (value - mean);\n      }\n    }\n  }\n  if (count > 1) return sum / (count - 1);\n}\n", "import variance from \"./variance.js\";\n\nexport default function deviation(values, valueof) {\n  const v = variance(values, valueof);\n  return v ? Math.sqrt(v) : v;\n}\n", "export default function extent(values, valueof) {\n  let min;\n  let max;\n  if (valueof === undefined) {\n    for (const value of values) {\n      if (value != null) {\n        if (min === undefined) {\n          if (value >= value) min = max = value;\n        } else {\n          if (min > value) min = value;\n          if (max < value) max = value;\n        }\n      }\n    }\n  } else {\n    let index = -1;\n    for (let value of values) {\n      if ((value = valueof(value, ++index, values)) != null) {\n        if (min === undefined) {\n          if (value >= value) min = max = value;\n        } else {\n          if (min > value) min = value;\n          if (max < value) max = value;\n        }\n      }\n    }\n  }\n  return [min, max];\n}\n", "// https://github.com/python/cpython/blob/a74eea238f5baba15797e2e8b570d153bc8690a7/Modules/mathmodule.c#L1423\nexport class Adder {\n  constructor() {\n    this._partials = new Float64Array(32);\n    this._n = 0;\n  }\n  add(x) {\n    const p = this._partials;\n    let i = 0;\n    for (let j = 0; j < this._n && j < 32; j++) {\n      const y = p[j],\n        hi = x + y,\n        lo = Math.abs(x) < Math.abs(y) ? x - (hi - y) : y - (hi - x);\n      if (lo) p[i++] = lo;\n      x = hi;\n    }\n    p[i] = x;\n    this._n = i + 1;\n    return this;\n  }\n  valueOf() {\n    const p = this._partials;\n    let n = this._n, x, y, lo, hi = 0;\n    if (n > 0) {\n      hi = p[--n];\n      while (n > 0) {\n        x = hi;\n        y = p[--n];\n        hi = x + y;\n        lo = y - (hi - x);\n        if (lo) break;\n      }\n      if (n > 0 && ((lo < 0 && p[n - 1] < 0) || (lo > 0 && p[n - 1] > 0))) {\n        y = lo * 2;\n        x = hi + y;\n        if (y == x - hi) hi = x;\n      }\n    }\n    return hi;\n  }\n}\n\nexport function fsum(values, valueof) {\n  const adder = new Adder();\n  if (valueof === undefined) {\n    for (let value of values) {\n      if (value = +value) {\n        adder.add(value);\n      }\n    }\n  } else {\n    let index = -1;\n    for (let value of values) {\n      if (value = +valueof(value, ++index, values)) {\n        adder.add(value);\n      }\n    }\n  }\n  return +adder;\n}\n\nexport function fcumsum(values, valueof) {\n  const adder = new Adder();\n  let index = -1;\n  return Float64Array.from(values, valueof === undefined\n      ? v => adder.add(+v || 0)\n      : v => adder.add(+valueof(v, ++index, values) || 0)\n  );\n}\n", "export class InternMap extends Map {\n  constructor(entries, key = keyof) {\n    super();\n    Object.defineProperties(this, {_intern: {value: new Map()}, _key: {value: key}});\n    if (entries != null) for (const [key, value] of entries) this.set(key, value);\n  }\n  get(key) {\n    return super.get(intern_get(this, key));\n  }\n  has(key) {\n    return super.has(intern_get(this, key));\n  }\n  set(key, value) {\n    return super.set(intern_set(this, key), value);\n  }\n  delete(key) {\n    return super.delete(intern_delete(this, key));\n  }\n}\n\nexport class InternSet extends Set {\n  constructor(values, key = keyof) {\n    super();\n    Object.defineProperties(this, {_intern: {value: new Map()}, _key: {value: key}});\n    if (values != null) for (const value of values) this.add(value);\n  }\n  has(value) {\n    return super.has(intern_get(this, value));\n  }\n  add(value) {\n    return super.add(intern_set(this, value));\n  }\n  delete(value) {\n    return super.delete(intern_delete(this, value));\n  }\n}\n\nfunction intern_get({_intern, _key}, value) {\n  const key = _key(value);\n  return _intern.has(key) ? _intern.get(key) : value;\n}\n\nfunction intern_set({_intern, _key}, value) {\n  const key = _key(value);\n  if (_intern.has(key)) return _intern.get(key);\n  _intern.set(key, value);\n  return value;\n}\n\nfunction intern_delete({_intern, _key}, value) {\n  const key = _key(value);\n  if (_intern.has(key)) {\n    value = _intern.get(key);\n    _intern.delete(key);\n  }\n  return value;\n}\n\nfunction keyof(value) {\n  return value !== null && typeof value === \"object\" ? value.valueOf() : value;\n}\n", "export default function identity(x) {\n  return x;\n}\n", "import {InternMap} from \"internmap\";\nimport identity from \"./identity.js\";\n\nexport default function group(values, ...keys) {\n  return nest(values, identity, identity, keys);\n}\n\nexport function groups(values, ...keys) {\n  return nest(values, Array.from, identity, keys);\n}\n\nfunction flatten(groups, keys) {\n  for (let i = 1, n = keys.length; i < n; ++i) {\n    groups = groups.flatMap(g => g.pop().map(([key, value]) => [...g, key, value]));\n  }\n  return groups;\n}\n\nexport function flatGroup(values, ...keys) {\n  return flatten(groups(values, ...keys), keys);\n}\n\nexport function flatRollup(values, reduce, ...keys) {\n  return flatten(rollups(values, reduce, ...keys), keys);\n}\n\nexport function rollup(values, reduce, ...keys) {\n  return nest(values, identity, reduce, keys);\n}\n\nexport function rollups(values, reduce, ...keys) {\n  return nest(values, Array.from, reduce, keys);\n}\n\nexport function index(values, ...keys) {\n  return nest(values, identity, unique, keys);\n}\n\nexport function indexes(values, ...keys) {\n  return nest(values, Array.from, unique, keys);\n}\n\nfunction unique(values) {\n  if (values.length !== 1) throw new Error(\"duplicate key\");\n  return values[0];\n}\n\nfunction nest(values, map, reduce, keys) {\n  return (function regroup(values, i) {\n    if (i >= keys.length) return reduce(values);\n    const groups = new InternMap();\n    const keyof = keys[i++];\n    let index = -1;\n    for (const value of values) {\n      const key = keyof(value, ++index, values);\n      const group = groups.get(key);\n      if (group) group.push(value);\n      else groups.set(key, [value]);\n    }\n    for (const [key, values] of groups) {\n      groups.set(key, regroup(values, i));\n    }\n    return map(groups);\n  })(values, 0);\n}\n", "export default function permute(source, keys) {\n  return Array.from(keys, key => source[key]);\n}\n", "import ascending from \"./ascending.js\";\nimport permute from \"./permute.js\";\n\nexport default function sort(values, ...F) {\n  if (typeof values[Symbol.iterator] !== \"function\") throw new TypeError(\"values is not iterable\");\n  values = Array.from(values);\n  let [f] = F;\n  if ((f && f.length !== 2) || F.length > 1) {\n    const index = Uint32Array.from(values, (d, i) => i);\n    if (F.length > 1) {\n      F = F.map(f => values.map(f));\n      index.sort((i, j) => {\n        for (const f of F) {\n          const c = ascendingDefined(f[i], f[j]);\n          if (c) return c;\n        }\n      });\n    } else {\n      f = values.map(f);\n      index.sort((i, j) => ascendingDefined(f[i], f[j]));\n    }\n    return permute(values, index);\n  }\n  return values.sort(compareDefined(f));\n}\n\nexport function compareDefined(compare = ascending) {\n  if (compare === ascending) return ascendingDefined;\n  if (typeof compare !== \"function\") throw new TypeError(\"compare is not a function\");\n  return (a, b) => {\n    const x = compare(a, b);\n    if (x || x === 0) return x;\n    return (compare(b, b) === 0) - (compare(a, a) === 0);\n  };\n}\n\nexport function ascendingDefined(a, b) {\n  return (a == null || !(a >= a)) - (b == null || !(b >= b)) || (a < b ? -1 : a > b ? 1 : 0);\n}\n", "import ascending from \"./ascending.js\";\nimport group, {rollup} from \"./group.js\";\nimport sort from \"./sort.js\";\n\nexport default function groupSort(values, reduce, key) {\n  return (reduce.length !== 2\n    ? sort(rollup(values, reduce, key), (([ak, av], [bk, bv]) => ascending(av, bv) || ascending(ak, bk)))\n    : sort(group(values, key), (([ak, av], [bk, bv]) => reduce(av, bv) || ascending(ak, bk))))\n    .map(([key]) => key);\n}\n", "const e10 = Math.sqrt(50),\n    e5 = Math.sqrt(10),\n    e2 = Math.sqrt(2);\n\nfunction tickSpec(start, stop, count) {\n  const step = (stop - start) / Math.max(0, count),\n      power = Math.floor(Math.log10(step)),\n      error = step / Math.pow(10, power),\n      factor = error >= e10 ? 10 : error >= e5 ? 5 : error >= e2 ? 2 : 1;\n  let i1, i2, inc;\n  if (power < 0) {\n    inc = Math.pow(10, -power) / factor;\n    i1 = Math.round(start * inc);\n    i2 = Math.round(stop * inc);\n    if (i1 / inc < start) ++i1;\n    if (i2 / inc > stop) --i2;\n    inc = -inc;\n  } else {\n    inc = Math.pow(10, power) * factor;\n    i1 = Math.round(start / inc);\n    i2 = Math.round(stop / inc);\n    if (i1 * inc < start) ++i1;\n    if (i2 * inc > stop) --i2;\n  }\n  if (i2 < i1 && 0.5 <= count && count < 2) return tickSpec(start, stop, count * 2);\n  return [i1, i2, inc];\n}\n\nexport default function ticks(start, stop, count) {\n  stop = +stop, start = +start, count = +count;\n  if (!(count > 0)) return [];\n  if (start === stop) return [start];\n  const reverse = stop < start, [i1, i2, inc] = reverse ? tickSpec(stop, start, count) : tickSpec(start, stop, count);\n  if (!(i2 >= i1)) return [];\n  const n = i2 - i1 + 1, ticks = new Array(n);\n  if (reverse) {\n    if (inc < 0) for (let i = 0; i < n; ++i) ticks[i] = (i2 - i) / -inc;\n    else for (let i = 0; i < n; ++i) ticks[i] = (i2 - i) * inc;\n  } else {\n    if (inc < 0) for (let i = 0; i < n; ++i) ticks[i] = (i1 + i) / -inc;\n    else for (let i = 0; i < n; ++i) ticks[i] = (i1 + i) * inc;\n  }\n  return ticks;\n}\n\nexport function tickIncrement(start, stop, count) {\n  stop = +stop, start = +start, count = +count;\n  return tickSpec(start, stop, count)[2];\n}\n\nexport function tickStep(start, stop, count) {\n  stop = +stop, start = +start, count = +count;\n  const reverse = stop < start, inc = reverse ? tickIncrement(stop, start, count) : tickIncrement(start, stop, count);\n  return (reverse ? -1 : 1) * (inc < 0 ? 1 / -inc : inc);\n}\n", "import count from \"../count.js\";\n\nexport default function thresholdSturges(values) {\n  return Math.max(1, Math.ceil(Math.log(count(values)) / Math.LN2) + 1);\n}\n", "export default function max(values, valueof) {\n  let max;\n  if (valueof === undefined) {\n    for (const value of values) {\n      if (value != null\n          && (max < value || (max === undefined && value >= value))) {\n        max = value;\n      }\n    }\n  } else {\n    let index = -1;\n    for (let value of values) {\n      if ((value = valueof(value, ++index, values)) != null\n          && (max < value || (max === undefined && value >= value))) {\n        max = value;\n      }\n    }\n  }\n  return max;\n}\n", "export default function maxIndex(values, valueof) {\n  let max;\n  let maxIndex = -1;\n  let index = -1;\n  if (valueof === undefined) {\n    for (const value of values) {\n      ++index;\n      if (value != null\n          && (max < value || (max === undefined && value >= value))) {\n        max = value, maxIndex = index;\n      }\n    }\n  } else {\n    for (let value of values) {\n      if ((value = valueof(value, ++index, values)) != null\n          && (max < value || (max === undefined && value >= value))) {\n        max = value, maxIndex = index;\n      }\n    }\n  }\n  return maxIndex;\n}\n", "export default function min(values, valueof) {\n  let min;\n  if (valueof === undefined) {\n    for (const value of values) {\n      if (value != null\n          && (min > value || (min === undefined && value >= value))) {\n        min = value;\n      }\n    }\n  } else {\n    let index = -1;\n    for (let value of values) {\n      if ((value = valueof(value, ++index, values)) != null\n          && (min > value || (min === undefined && value >= value))) {\n        min = value;\n      }\n    }\n  }\n  return min;\n}\n", "export default function minIndex(values, valueof) {\n  let min;\n  let minIndex = -1;\n  let index = -1;\n  if (valueof === undefined) {\n    for (const value of values) {\n      ++index;\n      if (value != null\n          && (min > value || (min === undefined && value >= value))) {\n        min = value, minIndex = index;\n      }\n    }\n  } else {\n    for (let value of values) {\n      if ((value = valueof(value, ++index, values)) != null\n          && (min > value || (min === undefined && value >= value))) {\n        min = value, minIndex = index;\n      }\n    }\n  }\n  return minIndex;\n}\n", "import {ascendingDefined, compareDefined} from \"./sort.js\";\n\n// Based on https://github.com/mourner/quickselect\n// ISC license, Copyright 2018 Vladimir Agafonkin.\nexport default function quickselect(array, k, left = 0, right = Infinity, compare) {\n  k = Math.floor(k);\n  left = Math.floor(Math.max(0, left));\n  right = Math.floor(Math.min(array.length - 1, right));\n\n  if (!(left <= k && k <= right)) return array;\n\n  compare = compare === undefined ? ascendingDefined : compareDefined(compare);\n\n  while (right > left) {\n    if (right - left > 600) {\n      const n = right - left + 1;\n      const m = k - left + 1;\n      const z = Math.log(n);\n      const s = 0.5 * Math.exp(2 * z / 3);\n      const sd = 0.5 * Math.sqrt(z * s * (n - s) / n) * (m - n / 2 < 0 ? -1 : 1);\n      const newLeft = Math.max(left, Math.floor(k - m * s / n + sd));\n      const newRight = Math.min(right, Math.floor(k + (n - m) * s / n + sd));\n      quickselect(array, k, newLeft, newRight, compare);\n    }\n\n    const t = array[k];\n    let i = left;\n    let j = right;\n\n    swap(array, left, k);\n    if (compare(array[right], t) > 0) swap(array, left, right);\n\n    while (i < j) {\n      swap(array, i, j), ++i, --j;\n      while (compare(array[i], t) < 0) ++i;\n      while (compare(array[j], t) > 0) --j;\n    }\n\n    if (compare(array[left], t) === 0) swap(array, left, j);\n    else ++j, swap(array, j, right);\n\n    if (j <= k) left = j + 1;\n    if (k <= j) right = j - 1;\n  }\n\n  return array;\n}\n\nfunction swap(array, i, j) {\n  const t = array[i];\n  array[i] = array[j];\n  array[j] = t;\n}\n", "import ascending from \"./ascending.js\";\n\nexport default function greatest(values, compare = ascending) {\n  let max;\n  let defined = false;\n  if (compare.length === 1) {\n    let maxValue;\n    for (const element of values) {\n      const value = compare(element);\n      if (defined\n          ? ascending(value, maxValue) > 0\n          : ascending(value, value) === 0) {\n        max = element;\n        maxValue = value;\n        defined = true;\n      }\n    }\n  } else {\n    for (const value of values) {\n      if (defined\n          ? compare(value, max) > 0\n          : compare(value, value) === 0) {\n        max = value;\n        defined = true;\n      }\n    }\n  }\n  return max;\n}\n", "import max from \"./max.js\";\nimport maxIndex from \"./maxIndex.js\";\nimport min from \"./min.js\";\nimport minIndex from \"./minIndex.js\";\nimport quickselect from \"./quickselect.js\";\nimport number, {numbers} from \"./number.js\";\nimport {ascendingDefined} from \"./sort.js\";\nimport greatest from \"./greatest.js\";\n\nexport default function quantile(values, p, valueof) {\n  values = Float64Array.from(numbers(values, valueof));\n  if (!(n = values.length) || isNaN(p = +p)) return;\n  if (p <= 0 || n < 2) return min(values);\n  if (p >= 1) return max(values);\n  var n,\n      i = (n - 1) * p,\n      i0 = Math.floor(i),\n      value0 = max(quickselect(values, i0).subarray(0, i0 + 1)),\n      value1 = min(values.subarray(i0 + 1));\n  return value0 + (value1 - value0) * (i - i0);\n}\n\nexport function quantileSorted(values, p, valueof = number) {\n  if (!(n = values.length) || isNaN(p = +p)) return;\n  if (p <= 0 || n < 2) return +valueof(values[0], 0, values);\n  if (p >= 1) return +valueof(values[n - 1], n - 1, values);\n  var n,\n      i = (n - 1) * p,\n      i0 = Math.floor(i),\n      value0 = +valueof(values[i0], i0, values),\n      value1 = +valueof(values[i0 + 1], i0 + 1, values);\n  return value0 + (value1 - value0) * (i - i0);\n}\n\nexport function quantileIndex(values, p, valueof) {\n  values = Float64Array.from(numbers(values, valueof));\n  if (!(n = values.length) || isNaN(p = +p)) return;\n  if (p <= 0 || n < 2) return minIndex(values);\n  if (p >= 1) return maxIndex(values);\n  var n,\n      i = Math.floor((n - 1) * p),\n      order = (i, j) => ascendingDefined(values[i], values[j]),\n      index = quickselect(Uint32Array.from(values, (_, i) => i), i, 0, n - 1, order);\n  return greatest(index.subarray(0, i + 1), i => values[i]);\n}\n", "import count from \"../count.js\";\nimport quantile from \"../quantile.js\";\n\nexport default function thresholdFreedmanDiaconis(values, min, max) {\n  const c = count(values), d = quantile(values, 0.75) - quantile(values, 0.25);\n  return c && d ? Math.ceil((max - min) / (2 * d * Math.pow(c, -1 / 3))) : 1;\n}\n", "import count from \"../count.js\";\nimport deviation from \"../deviation.js\";\n\nexport default function thresholdScott(values, min, max) {\n  const c = count(values), d = deviation(values);\n  return c && d ? Math.ceil((max - min) * Math.cbrt(c) / (3.49 * d)) : 1;\n}\n", "export default function mean(values, valueof) {\n  let count = 0;\n  let sum = 0;\n  if (valueof === undefined) {\n    for (let value of values) {\n      if (value != null && (value = +value) >= value) {\n        ++count, sum += value;\n      }\n    }\n  } else {\n    let index = -1;\n    for (let value of values) {\n      if ((value = valueof(value, ++index, values)) != null && (value = +value) >= value) {\n        ++count, sum += value;\n      }\n    }\n  }\n  if (count) return sum / count;\n}\n", "import quantile, {quantileIndex} from \"./quantile.js\";\n\nexport default function median(values, valueof) {\n  return quantile(values, 0.5, valueof);\n}\n\nexport function medianIndex(values, valueof) {\n  return quantileIndex(values, 0.5, valueof);\n}\n", "function* flatten(arrays) {\n  for (const array of arrays) {\n    yield* array;\n  }\n}\n\nexport default function merge(arrays) {\n  return Array.from(flatten(arrays));\n}\n", "import {InternMap} from \"internmap\";\n\nexport default function mode(values, valueof) {\n  const counts = new InternMap();\n  if (valueof === undefined) {\n    for (let value of values) {\n      if (value != null && value >= value) {\n        counts.set(value, (counts.get(value) || 0) + 1);\n      }\n    }\n  } else {\n    let index = -1;\n    for (let value of values) {\n      if ((value = valueof(value, ++index, values)) != null && value >= value) {\n        counts.set(value, (counts.get(value) || 0) + 1);\n      }\n    }\n  }\n  let modeValue;\n  let modeCount = 0;\n  for (const [value, count] of counts) {\n    if (count > modeCount) {\n      modeCount = count;\n      modeValue = value;\n    }\n  }\n  return modeValue;\n}\n", "export default function pairs(values, pairof = pair) {\n  const pairs = [];\n  let previous;\n  let first = false;\n  for (const value of values) {\n    if (first) pairs.push(pairof(previous, value));\n    previous = value;\n    first = true;\n  }\n  return pairs;\n}\n\nexport function pair(a, b) {\n  return [a, b];\n}\n", "export default function range(start, stop, step) {\n  start = +start, stop = +stop, step = (n = arguments.length) < 2 ? (stop = start, start = 0, 1) : n < 3 ? 1 : +step;\n\n  var i = -1,\n      n = Math.max(0, Math.ceil((stop - start) / step)) | 0,\n      range = new Array(n);\n\n  while (++i < n) {\n    range[i] = start + i * step;\n  }\n\n  return range;\n}\n", "export default function sum(values, valueof) {\n  let sum = 0;\n  if (valueof === undefined) {\n    for (let value of values) {\n      if (value = +value) {\n        sum += value;\n      }\n    }\n  } else {\n    let index = -1;\n    for (let value of values) {\n      if (value = +valueof(value, ++index, values)) {\n        sum += value;\n      }\n    }\n  }\n  return sum;\n}\n", "export default function reverse(values) {\n  if (typeof values[Symbol.iterator] !== \"function\") throw new TypeError(\"values is not iterable\");\n  return Array.from(values).reverse();\n}\n", "import {InternSet} from \"internmap\";\n\nexport default function union(...others) {\n  const set = new InternSet();\n  for (const other of others) {\n    for (const o of other) {\n      set.add(o);\n    }\n  }\n  return set;\n}\n", "export default function(x) {\n  return x;\n}\n", "import identity from \"./identity.js\";\n\nvar top = 1,\n    right = 2,\n    bottom = 3,\n    left = 4,\n    epsilon = 1e-6;\n\nfunction translateX(x) {\n  return \"translate(\" + x + \",0)\";\n}\n\nfunction translateY(y) {\n  return \"translate(0,\" + y + \")\";\n}\n\nfunction number(scale) {\n  return d => +scale(d);\n}\n\nfunction center(scale, offset) {\n  offset = Math.max(0, scale.bandwidth() - offset * 2) / 2;\n  if (scale.round()) offset = Math.round(offset);\n  return d => +scale(d) + offset;\n}\n\nfunction entering() {\n  return !this.__axis;\n}\n\nfunction axis(orient, scale) {\n  var tickArguments = [],\n      tickValues = null,\n      tickFormat = null,\n      tickSizeInner = 6,\n      tickSizeOuter = 6,\n      tickPadding = 3,\n      offset = typeof window !== \"undefined\" && window.devicePixelRatio > 1 ? 0 : 0.5,\n      k = orient === top || orient === left ? -1 : 1,\n      x = orient === left || orient === right ? \"x\" : \"y\",\n      transform = orient === top || orient === bottom ? translateX : translateY;\n\n  function axis(context) {\n    var values = tickValues == null ? (scale.ticks ? scale.ticks.apply(scale, tickArguments) : scale.domain()) : tickValues,\n        format = tickFormat == null ? (scale.tickFormat ? scale.tickFormat.apply(scale, tickArguments) : identity) : tickFormat,\n        spacing = Math.max(tickSizeInner, 0) + tickPadding,\n        range = scale.range(),\n        range0 = +range[0] + offset,\n        range1 = +range[range.length - 1] + offset,\n        position = (scale.bandwidth ? center : number)(scale.copy(), offset),\n        selection = context.selection ? context.selection() : context,\n        path = selection.selectAll(\".domain\").data([null]),\n        tick = selection.selectAll(\".tick\").data(values, scale).order(),\n        tickExit = tick.exit(),\n        tickEnter = tick.enter().append(\"g\").attr(\"class\", \"tick\"),\n        line = tick.select(\"line\"),\n        text = tick.select(\"text\");\n\n    path = path.merge(path.enter().insert(\"path\", \".tick\")\n        .attr(\"class\", \"domain\")\n        .attr(\"stroke\", \"currentColor\"));\n\n    tick = tick.merge(tickEnter);\n\n    line = line.merge(tickEnter.append(\"line\")\n        .attr(\"stroke\", \"currentColor\")\n        .attr(x + \"2\", k * tickSizeInner));\n\n    text = text.merge(tickEnter.append(\"text\")\n        .attr(\"fill\", \"currentColor\")\n        .attr(x, k * spacing)\n        .attr(\"dy\", orient === top ? \"0em\" : orient === bottom ? \"0.71em\" : \"0.32em\"));\n\n    if (context !== selection) {\n      path = path.transition(context);\n      tick = tick.transition(context);\n      line = line.transition(context);\n      text = text.transition(context);\n\n      tickExit = tickExit.transition(context)\n          .attr(\"opacity\", epsilon)\n          .attr(\"transform\", function(d) { return isFinite(d = position(d)) ? transform(d + offset) : this.getAttribute(\"transform\"); });\n\n      tickEnter\n          .attr(\"opacity\", epsilon)\n          .attr(\"transform\", function(d) { var p = this.parentNode.__axis; return transform((p && isFinite(p = p(d)) ? p : position(d)) + offset); });\n    }\n\n    tickExit.remove();\n\n    path\n        .attr(\"d\", orient === left || orient === right\n            ? (tickSizeOuter ? \"M\" + k * tickSizeOuter + \",\" + range0 + \"H\" + offset + \"V\" + range1 + \"H\" + k * tickSizeOuter : \"M\" + offset + \",\" + range0 + \"V\" + range1)\n            : (tickSizeOuter ? \"M\" + range0 + \",\" + k * tickSizeOuter + \"V\" + offset + \"H\" + range1 + \"V\" + k * tickSizeOuter : \"M\" + range0 + \",\" + offset + \"H\" + range1));\n\n    tick\n        .attr(\"opacity\", 1)\n        .attr(\"transform\", function(d) { return transform(position(d) + offset); });\n\n    line\n        .attr(x + \"2\", k * tickSizeInner);\n\n    text\n        .attr(x, k * spacing)\n        .text(format);\n\n    selection.filter(entering)\n        .attr(\"fill\", \"none\")\n        .attr(\"font-size\", 10)\n        .attr(\"font-family\", \"sans-serif\")\n        .attr(\"text-anchor\", orient === right ? \"start\" : orient === left ? \"end\" : \"middle\");\n\n    selection\n        .each(function() { this.__axis = position; });\n  }\n\n  axis.scale = function(_) {\n    return arguments.length ? (scale = _, axis) : scale;\n  };\n\n  axis.ticks = function() {\n    return tickArguments = Array.from(arguments), axis;\n  };\n\n  axis.tickArguments = function(_) {\n    return arguments.length ? (tickArguments = _ == null ? [] : Array.from(_), axis) : tickArguments.slice();\n  };\n\n  axis.tickValues = function(_) {\n    return arguments.length ? (tickValues = _ == null ? null : Array.from(_), axis) : tickValues && tickValues.slice();\n  };\n\n  axis.tickFormat = function(_) {\n    return arguments.length ? (tickFormat = _, axis) : tickFormat;\n  };\n\n  axis.tickSize = function(_) {\n    return arguments.length ? (tickSizeInner = tickSizeOuter = +_, axis) : tickSizeInner;\n  };\n\n  axis.tickSizeInner = function(_) {\n    return arguments.length ? (tickSizeInner = +_, axis) : tickSizeInner;\n  };\n\n  axis.tickSizeOuter = function(_) {\n    return arguments.length ? (tickSizeOuter = +_, axis) : tickSizeOuter;\n  };\n\n  axis.tickPadding = function(_) {\n    return arguments.length ? (tickPadding = +_, axis) : tickPadding;\n  };\n\n  axis.offset = function(_) {\n    return arguments.length ? (offset = +_, axis) : offset;\n  };\n\n  return axis;\n}\n\nexport function axisTop(scale) {\n  return axis(top, scale);\n}\n\nexport function axisRight(scale) {\n  return axis(right, scale);\n}\n\nexport function axisBottom(scale) {\n  return axis(bottom, scale);\n}\n\nexport function axisLeft(scale) {\n  return axis(left, scale);\n}\n", "var noop = {value: () => {}};\n\nfunction dispatch() {\n  for (var i = 0, n = arguments.length, _ = {}, t; i < n; ++i) {\n    if (!(t = arguments[i] + \"\") || (t in _) || /[\\s.]/.test(t)) throw new Error(\"illegal type: \" + t);\n    _[t] = [];\n  }\n  return new Dispatch(_);\n}\n\nfunction Dispatch(_) {\n  this._ = _;\n}\n\nfunction parseTypenames(typenames, types) {\n  return typenames.trim().split(/^|\\s+/).map(function(t) {\n    var name = \"\", i = t.indexOf(\".\");\n    if (i >= 0) name = t.slice(i + 1), t = t.slice(0, i);\n    if (t && !types.hasOwnProperty(t)) throw new Error(\"unknown type: \" + t);\n    return {type: t, name: name};\n  });\n}\n\nDispatch.prototype = dispatch.prototype = {\n  constructor: Dispatch,\n  on: function(typename, callback) {\n    var _ = this._,\n        T = parseTypenames(typename + \"\", _),\n        t,\n        i = -1,\n        n = T.length;\n\n    // If no callback was specified, return the callback of the given type and name.\n    if (arguments.length < 2) {\n      while (++i < n) if ((t = (typename = T[i]).type) && (t = get(_[t], typename.name))) return t;\n      return;\n    }\n\n    // If a type was specified, set the callback for the given type and name.\n    // Otherwise, if a null callback was specified, remove callbacks of the given name.\n    if (callback != null && typeof callback !== \"function\") throw new Error(\"invalid callback: \" + callback);\n    while (++i < n) {\n      if (t = (typename = T[i]).type) _[t] = set(_[t], typename.name, callback);\n      else if (callback == null) for (t in _) _[t] = set(_[t], typename.name, null);\n    }\n\n    return this;\n  },\n  copy: function() {\n    var copy = {}, _ = this._;\n    for (var t in _) copy[t] = _[t].slice();\n    return new Dispatch(copy);\n  },\n  call: function(type, that) {\n    if ((n = arguments.length - 2) > 0) for (var args = new Array(n), i = 0, n, t; i < n; ++i) args[i] = arguments[i + 2];\n    if (!this._.hasOwnProperty(type)) throw new Error(\"unknown type: \" + type);\n    for (t = this._[type], i = 0, n = t.length; i < n; ++i) t[i].value.apply(that, args);\n  },\n  apply: function(type, that, args) {\n    if (!this._.hasOwnProperty(type)) throw new Error(\"unknown type: \" + type);\n    for (var t = this._[type], i = 0, n = t.length; i < n; ++i) t[i].value.apply(that, args);\n  }\n};\n\nfunction get(type, name) {\n  for (var i = 0, n = type.length, c; i < n; ++i) {\n    if ((c = type[i]).name === name) {\n      return c.value;\n    }\n  }\n}\n\nfunction set(type, name, callback) {\n  for (var i = 0, n = type.length; i < n; ++i) {\n    if (type[i].name === name) {\n      type[i] = noop, type = type.slice(0, i).concat(type.slice(i + 1));\n      break;\n    }\n  }\n  if (callback != null) type.push({name: name, value: callback});\n  return type;\n}\n\nexport default dispatch;\n", "export var xhtml = \"http://www.w3.org/1999/xhtml\";\n\nexport default {\n  svg: \"http://www.w3.org/2000/svg\",\n  xhtml: xhtml,\n  xlink: \"http://www.w3.org/1999/xlink\",\n  xml: \"http://www.w3.org/XML/1998/namespace\",\n  xmlns: \"http://www.w3.org/2000/xmlns/\"\n};\n", "import namespaces from \"./namespaces.js\";\n\nexport default function(name) {\n  var prefix = name += \"\", i = prefix.indexOf(\":\");\n  if (i >= 0 && (prefix = name.slice(0, i)) !== \"xmlns\") name = name.slice(i + 1);\n  return namespaces.hasOwnProperty(prefix) ? {space: namespaces[prefix], local: name} : name; // eslint-disable-line no-prototype-builtins\n}\n", "import namespace from \"./namespace.js\";\nimport {xhtml} from \"./namespaces.js\";\n\nfunction creatorInherit(name) {\n  return function() {\n    var document = this.ownerDocument,\n        uri = this.namespaceURI;\n    return uri === xhtml && document.documentElement.namespaceURI === xhtml\n        ? document.createElement(name)\n        : document.createElementNS(uri, name);\n  };\n}\n\nfunction creatorFixed(fullname) {\n  return function() {\n    return this.ownerDocument.createElementNS(fullname.space, fullname.local);\n  };\n}\n\nexport default function(name) {\n  var fullname = namespace(name);\n  return (fullname.local\n      ? creatorFixed\n      : creatorInherit)(fullname);\n}\n", "function none() {}\n\nexport default function(selector) {\n  return selector == null ? none : function() {\n    return this.querySelector(selector);\n  };\n}\n", "import {Selection} from \"./index.js\";\nimport selector from \"../selector.js\";\n\nexport default function(select) {\n  if (typeof select !== \"function\") select = selector(select);\n\n  for (var groups = this._groups, m = groups.length, subgroups = new Array(m), j = 0; j < m; ++j) {\n    for (var group = groups[j], n = group.length, subgroup = subgroups[j] = new Array(n), node, subnode, i = 0; i < n; ++i) {\n      if ((node = group[i]) && (subnode = select.call(node, node.__data__, i, group))) {\n        if (\"__data__\" in node) subnode.__data__ = node.__data__;\n        subgroup[i] = subnode;\n      }\n    }\n  }\n\n  return new Selection(subgroups, this._parents);\n}\n", "// Given something array like (or null), returns something that is strictly an\n// array. This is used to ensure that array-like objects passed to d3.selectAll\n// or selection.selectAll are converted into proper arrays when creating a\n// selection; we don\u2019t ever want to create a selection backed by a live\n// HTMLCollection or NodeList. However, note that selection.selectAll will use a\n// static NodeList as a group, since it safely derived from querySelectorAll.\nexport default function array(x) {\n  return x == null ? [] : Array.isArray(x) ? x : Array.from(x);\n}\n", "function empty() {\n  return [];\n}\n\nexport default function(selector) {\n  return selector == null ? empty : function() {\n    return this.querySelectorAll(selector);\n  };\n}\n", "import {Selection} from \"./index.js\";\nimport array from \"../array.js\";\nimport selectorAll from \"../selectorAll.js\";\n\nfunction arrayAll(select) {\n  return function() {\n    return array(select.apply(this, arguments));\n  };\n}\n\nexport default function(select) {\n  if (typeof select === \"function\") select = arrayAll(select);\n  else select = selectorAll(select);\n\n  for (var groups = this._groups, m = groups.length, subgroups = [], parents = [], j = 0; j < m; ++j) {\n    for (var group = groups[j], n = group.length, node, i = 0; i < n; ++i) {\n      if (node = group[i]) {\n        subgroups.push(select.call(node, node.__data__, i, group));\n        parents.push(node);\n      }\n    }\n  }\n\n  return new Selection(subgroups, parents);\n}\n", "export default function(selector) {\n  return function() {\n    return this.matches(selector);\n  };\n}\n\nexport function childMatcher(selector) {\n  return function(node) {\n    return node.matches(selector);\n  };\n}\n\n", "import {childMatcher} from \"../matcher.js\";\n\nvar find = Array.prototype.find;\n\nfunction childFind(match) {\n  return function() {\n    return find.call(this.children, match);\n  };\n}\n\nfunction childFirst() {\n  return this.firstElementChild;\n}\n\nexport default function(match) {\n  return this.select(match == null ? childFirst\n      : childFind(typeof match === \"function\" ? match : childMatcher(match)));\n}\n", "import {childMatcher} from \"../matcher.js\";\n\nvar filter = Array.prototype.filter;\n\nfunction children() {\n  return Array.from(this.children);\n}\n\nfunction childrenFilter(match) {\n  return function() {\n    return filter.call(this.children, match);\n  };\n}\n\nexport default function(match) {\n  return this.selectAll(match == null ? children\n      : childrenFilter(typeof match === \"function\" ? match : childMatcher(match)));\n}\n", "import {Selection} from \"./index.js\";\nimport matcher from \"../matcher.js\";\n\nexport default function(match) {\n  if (typeof match !== \"function\") match = matcher(match);\n\n  for (var groups = this._groups, m = groups.length, subgroups = new Array(m), j = 0; j < m; ++j) {\n    for (var group = groups[j], n = group.length, subgroup = subgroups[j] = [], node, i = 0; i < n; ++i) {\n      if ((node = group[i]) && match.call(node, node.__data__, i, group)) {\n        subgroup.push(node);\n      }\n    }\n  }\n\n  return new Selection(subgroups, this._parents);\n}\n", "export default function(update) {\n  return new Array(update.length);\n}\n", "import sparse from \"./sparse.js\";\nimport {Selection} from \"./index.js\";\n\nexport default function() {\n  return new Selection(this._enter || this._groups.map(sparse), this._parents);\n}\n\nexport function EnterNode(parent, datum) {\n  this.ownerDocument = parent.ownerDocument;\n  this.namespaceURI = parent.namespaceURI;\n  this._next = null;\n  this._parent = parent;\n  this.__data__ = datum;\n}\n\nEnterNode.prototype = {\n  constructor: EnterNode,\n  appendChild: function(child) { return this._parent.insertBefore(child, this._next); },\n  insertBefore: function(child, next) { return this._parent.insertBefore(child, next); },\n  querySelector: function(selector) { return this._parent.querySelector(selector); },\n  querySelectorAll: function(selector) { return this._parent.querySelectorAll(selector); }\n};\n", "export default function(x) {\n  return function() {\n    return x;\n  };\n}\n", "import {Selection} from \"./index.js\";\nimport {EnterNode} from \"./enter.js\";\nimport constant from \"../constant.js\";\n\nfunction bindIndex(parent, group, enter, update, exit, data) {\n  var i = 0,\n      node,\n      groupLength = group.length,\n      dataLength = data.length;\n\n  // Put any non-null nodes that fit into update.\n  // Put any null nodes into enter.\n  // Put any remaining data into enter.\n  for (; i < dataLength; ++i) {\n    if (node = group[i]) {\n      node.__data__ = data[i];\n      update[i] = node;\n    } else {\n      enter[i] = new EnterNode(parent, data[i]);\n    }\n  }\n\n  // Put any non-null nodes that don\u2019t fit into exit.\n  for (; i < groupLength; ++i) {\n    if (node = group[i]) {\n      exit[i] = node;\n    }\n  }\n}\n\nfunction bindKey(parent, group, enter, update, exit, data, key) {\n  var i,\n      node,\n      nodeByKeyValue = new Map,\n      groupLength = group.length,\n      dataLength = data.length,\n      keyValues = new Array(groupLength),\n      keyValue;\n\n  // Compute the key for each node.\n  // If multiple nodes have the same key, the duplicates are added to exit.\n  for (i = 0; i < groupLength; ++i) {\n    if (node = group[i]) {\n      keyValues[i] = keyValue = key.call(node, node.__data__, i, group) + \"\";\n      if (nodeByKeyValue.has(keyValue)) {\n        exit[i] = node;\n      } else {\n        nodeByKeyValue.set(keyValue, node);\n      }\n    }\n  }\n\n  // Compute the key for each datum.\n  // If there a node associated with this key, join and add it to update.\n  // If there is not (or the key is a duplicate), add it to enter.\n  for (i = 0; i < dataLength; ++i) {\n    keyValue = key.call(parent, data[i], i, data) + \"\";\n    if (node = nodeByKeyValue.get(keyValue)) {\n      update[i] = node;\n      node.__data__ = data[i];\n      nodeByKeyValue.delete(keyValue);\n    } else {\n      enter[i] = new EnterNode(parent, data[i]);\n    }\n  }\n\n  // Add any remaining nodes that were not bound to data to exit.\n  for (i = 0; i < groupLength; ++i) {\n    if ((node = group[i]) && (nodeByKeyValue.get(keyValues[i]) === node)) {\n      exit[i] = node;\n    }\n  }\n}\n\nfunction datum(node) {\n  return node.__data__;\n}\n\nexport default function(value, key) {\n  if (!arguments.length) return Array.from(this, datum);\n\n  var bind = key ? bindKey : bindIndex,\n      parents = this._parents,\n      groups = this._groups;\n\n  if (typeof value !== \"function\") value = constant(value);\n\n  for (var m = groups.length, update = new Array(m), enter = new Array(m), exit = new Array(m), j = 0; j < m; ++j) {\n    var parent = parents[j],\n        group = groups[j],\n        groupLength = group.length,\n        data = arraylike(value.call(parent, parent && parent.__data__, j, parents)),\n        dataLength = data.length,\n        enterGroup = enter[j] = new Array(dataLength),\n        updateGroup = update[j] = new Array(dataLength),\n        exitGroup = exit[j] = new Array(groupLength);\n\n    bind(parent, group, enterGroup, updateGroup, exitGroup, data, key);\n\n    // Now connect the enter nodes to their following update node, such that\n    // appendChild can insert the materialized enter node before this node,\n    // rather than at the end of the parent node.\n    for (var i0 = 0, i1 = 0, previous, next; i0 < dataLength; ++i0) {\n      if (previous = enterGroup[i0]) {\n        if (i0 >= i1) i1 = i0 + 1;\n        while (!(next = updateGroup[i1]) && ++i1 < dataLength);\n        previous._next = next || null;\n      }\n    }\n  }\n\n  update = new Selection(update, parents);\n  update._enter = enter;\n  update._exit = exit;\n  return update;\n}\n\n// Given some data, this returns an array-like view of it: an object that\n// exposes a length property and allows numeric indexing. Note that unlike\n// selectAll, this isn\u2019t worried about \u201Clive\u201D collections because the resulting\n// array will only be used briefly while data is being bound. (It is possible to\n// cause the data to change while iterating by using a key function, but please\n// don\u2019t; we\u2019d rather avoid a gratuitous copy.)\nfunction arraylike(data) {\n  return typeof data === \"object\" && \"length\" in data\n    ? data // Array, TypedArray, NodeList, array-like\n    : Array.from(data); // Map, Set, iterable, string, or anything else\n}\n", "import sparse from \"./sparse.js\";\nimport {Selection} from \"./index.js\";\n\nexport default function() {\n  return new Selection(this._exit || this._groups.map(sparse), this._parents);\n}\n", "export default function(onenter, onupdate, onexit) {\n  var enter = this.enter(), update = this, exit = this.exit();\n  if (typeof onenter === \"function\") {\n    enter = onenter(enter);\n    if (enter) enter = enter.selection();\n  } else {\n    enter = enter.append(onenter + \"\");\n  }\n  if (onupdate != null) {\n    update = onupdate(update);\n    if (update) update = update.selection();\n  }\n  if (onexit == null) exit.remove(); else onexit(exit);\n  return enter && update ? enter.merge(update).order() : update;\n}\n", "import {Selection} from \"./index.js\";\n\nexport default function(context) {\n  var selection = context.selection ? context.selection() : context;\n\n  for (var groups0 = this._groups, groups1 = selection._groups, m0 = groups0.length, m1 = groups1.length, m = Math.min(m0, m1), merges = new Array(m0), j = 0; j < m; ++j) {\n    for (var group0 = groups0[j], group1 = groups1[j], n = group0.length, merge = merges[j] = new Array(n), node, i = 0; i < n; ++i) {\n      if (node = group0[i] || group1[i]) {\n        merge[i] = node;\n      }\n    }\n  }\n\n  for (; j < m0; ++j) {\n    merges[j] = groups0[j];\n  }\n\n  return new Selection(merges, this._parents);\n}\n", "export default function() {\n\n  for (var groups = this._groups, j = -1, m = groups.length; ++j < m;) {\n    for (var group = groups[j], i = group.length - 1, next = group[i], node; --i >= 0;) {\n      if (node = group[i]) {\n        if (next && node.compareDocumentPosition(next) ^ 4) next.parentNode.insertBefore(node, next);\n        next = node;\n      }\n    }\n  }\n\n  return this;\n}\n", "import {Selection} from \"./index.js\";\n\nexport default function(compare) {\n  if (!compare) compare = ascending;\n\n  function compareNode(a, b) {\n    return a && b ? compare(a.__data__, b.__data__) : !a - !b;\n  }\n\n  for (var groups = this._groups, m = groups.length, sortgroups = new Array(m), j = 0; j < m; ++j) {\n    for (var group = groups[j], n = group.length, sortgroup = sortgroups[j] = new Array(n), node, i = 0; i < n; ++i) {\n      if (node = group[i]) {\n        sortgroup[i] = node;\n      }\n    }\n    sortgroup.sort(compareNode);\n  }\n\n  return new Selection(sortgroups, this._parents).order();\n}\n\nfunction ascending(a, b) {\n  return a < b ? -1 : a > b ? 1 : a >= b ? 0 : NaN;\n}\n", "export default function() {\n  var callback = arguments[0];\n  arguments[0] = this;\n  callback.apply(null, arguments);\n  return this;\n}\n", "export default function() {\n  return Array.from(this);\n}\n", "export default function() {\n\n  for (var groups = this._groups, j = 0, m = groups.length; j < m; ++j) {\n    for (var group = groups[j], i = 0, n = group.length; i < n; ++i) {\n      var node = group[i];\n      if (node) return node;\n    }\n  }\n\n  return null;\n}\n", "export default function() {\n  let size = 0;\n  for (const node of this) ++size; // eslint-disable-line no-unused-vars\n  return size;\n}\n", "export default function() {\n  return !this.node();\n}\n", "export default function(callback) {\n\n  for (var groups = this._groups, j = 0, m = groups.length; j < m; ++j) {\n    for (var group = groups[j], i = 0, n = group.length, node; i < n; ++i) {\n      if (node = group[i]) callback.call(node, node.__data__, i, group);\n    }\n  }\n\n  return this;\n}\n", "import namespace from \"../namespace.js\";\n\nfunction attrRemove(name) {\n  return function() {\n    this.removeAttribute(name);\n  };\n}\n\nfunction attrRemoveNS(fullname) {\n  return function() {\n    this.removeAttributeNS(fullname.space, fullname.local);\n  };\n}\n\nfunction attrConstant(name, value) {\n  return function() {\n    this.setAttribute(name, value);\n  };\n}\n\nfunction attrConstantNS(fullname, value) {\n  return function() {\n    this.setAttributeNS(fullname.space, fullname.local, value);\n  };\n}\n\nfunction attrFunction(name, value) {\n  return function() {\n    var v = value.apply(this, arguments);\n    if (v == null) this.removeAttribute(name);\n    else this.setAttribute(name, v);\n  };\n}\n\nfunction attrFunctionNS(fullname, value) {\n  return function() {\n    var v = value.apply(this, arguments);\n    if (v == null) this.removeAttributeNS(fullname.space, fullname.local);\n    else this.setAttributeNS(fullname.space, fullname.local, v);\n  };\n}\n\nexport default function(name, value) {\n  var fullname = namespace(name);\n\n  if (arguments.length < 2) {\n    var node = this.node();\n    return fullname.local\n        ? node.getAttributeNS(fullname.space, fullname.local)\n        : node.getAttribute(fullname);\n  }\n\n  return this.each((value == null\n      ? (fullname.local ? attrRemoveNS : attrRemove) : (typeof value === \"function\"\n      ? (fullname.local ? attrFunctionNS : attrFunction)\n      : (fullname.local ? attrConstantNS : attrConstant)))(fullname, value));\n}\n", "export default function(node) {\n  return (node.ownerDocument && node.ownerDocument.defaultView) // node is a Node\n      || (node.document && node) // node is a Window\n      || node.defaultView; // node is a Document\n}\n", "import defaultView from \"../window.js\";\n\nfunction styleRemove(name) {\n  return function() {\n    this.style.removeProperty(name);\n  };\n}\n\nfunction styleConstant(name, value, priority) {\n  return function() {\n    this.style.setProperty(name, value, priority);\n  };\n}\n\nfunction styleFunction(name, value, priority) {\n  return function() {\n    var v = value.apply(this, arguments);\n    if (v == null) this.style.removeProperty(name);\n    else this.style.setProperty(name, v, priority);\n  };\n}\n\nexport default function(name, value, priority) {\n  return arguments.length > 1\n      ? this.each((value == null\n            ? styleRemove : typeof value === \"function\"\n            ? styleFunction\n            : styleConstant)(name, value, priority == null ? \"\" : priority))\n      : styleValue(this.node(), name);\n}\n\nexport function styleValue(node, name) {\n  return node.style.getPropertyValue(name)\n      || defaultView(node).getComputedStyle(node, null).getPropertyValue(name);\n}\n", "function propertyRemove(name) {\n  return function() {\n    delete this[name];\n  };\n}\n\nfunction propertyConstant(name, value) {\n  return function() {\n    this[name] = value;\n  };\n}\n\nfunction propertyFunction(name, value) {\n  return function() {\n    var v = value.apply(this, arguments);\n    if (v == null) delete this[name];\n    else this[name] = v;\n  };\n}\n\nexport default function(name, value) {\n  return arguments.length > 1\n      ? this.each((value == null\n          ? propertyRemove : typeof value === \"function\"\n          ? propertyFunction\n          : propertyConstant)(name, value))\n      : this.node()[name];\n}\n", "function classArray(string) {\n  return string.trim().split(/^|\\s+/);\n}\n\nfunction classList(node) {\n  return node.classList || new ClassList(node);\n}\n\nfunction ClassList(node) {\n  this._node = node;\n  this._names = classArray(node.getAttribute(\"class\") || \"\");\n}\n\nClassList.prototype = {\n  add: function(name) {\n    var i = this._names.indexOf(name);\n    if (i < 0) {\n      this._names.push(name);\n      this._node.setAttribute(\"class\", this._names.join(\" \"));\n    }\n  },\n  remove: function(name) {\n    var i = this._names.indexOf(name);\n    if (i >= 0) {\n      this._names.splice(i, 1);\n      this._node.setAttribute(\"class\", this._names.join(\" \"));\n    }\n  },\n  contains: function(name) {\n    return this._names.indexOf(name) >= 0;\n  }\n};\n\nfunction classedAdd(node, names) {\n  var list = classList(node), i = -1, n = names.length;\n  while (++i < n) list.add(names[i]);\n}\n\nfunction classedRemove(node, names) {\n  var list = classList(node), i = -1, n = names.length;\n  while (++i < n) list.remove(names[i]);\n}\n\nfunction classedTrue(names) {\n  return function() {\n    classedAdd(this, names);\n  };\n}\n\nfunction classedFalse(names) {\n  return function() {\n    classedRemove(this, names);\n  };\n}\n\nfunction classedFunction(names, value) {\n  return function() {\n    (value.apply(this, arguments) ? classedAdd : classedRemove)(this, names);\n  };\n}\n\nexport default function(name, value) {\n  var names = classArray(name + \"\");\n\n  if (arguments.length < 2) {\n    var list = classList(this.node()), i = -1, n = names.length;\n    while (++i < n) if (!list.contains(names[i])) return false;\n    return true;\n  }\n\n  return this.each((typeof value === \"function\"\n      ? classedFunction : value\n      ? classedTrue\n      : classedFalse)(names, value));\n}\n", "function textRemove() {\n  this.textContent = \"\";\n}\n\nfunction textConstant(value) {\n  return function() {\n    this.textContent = value;\n  };\n}\n\nfunction textFunction(value) {\n  return function() {\n    var v = value.apply(this, arguments);\n    this.textContent = v == null ? \"\" : v;\n  };\n}\n\nexport default function(value) {\n  return arguments.length\n      ? this.each(value == null\n          ? textRemove : (typeof value === \"function\"\n          ? textFunction\n          : textConstant)(value))\n      : this.node().textContent;\n}\n", "function htmlRemove() {\n  this.innerHTML = \"\";\n}\n\nfunction htmlConstant(value) {\n  return function() {\n    this.innerHTML = value;\n  };\n}\n\nfunction htmlFunction(value) {\n  return function() {\n    var v = value.apply(this, arguments);\n    this.innerHTML = v == null ? \"\" : v;\n  };\n}\n\nexport default function(value) {\n  return arguments.length\n      ? this.each(value == null\n          ? htmlRemove : (typeof value === \"function\"\n          ? htmlFunction\n          : htmlConstant)(value))\n      : this.node().innerHTML;\n}\n", "function raise() {\n  if (this.nextSibling) this.parentNode.appendChild(this);\n}\n\nexport default function() {\n  return this.each(raise);\n}\n", "function lower() {\n  if (this.previousSibling) this.parentNode.insertBefore(this, this.parentNode.firstChild);\n}\n\nexport default function() {\n  return this.each(lower);\n}\n", "import creator from \"../creator.js\";\n\nexport default function(name) {\n  var create = typeof name === \"function\" ? name : creator(name);\n  return this.select(function() {\n    return this.appendChild(create.apply(this, arguments));\n  });\n}\n", "import creator from \"../creator.js\";\nimport selector from \"../selector.js\";\n\nfunction constantNull() {\n  return null;\n}\n\nexport default function(name, before) {\n  var create = typeof name === \"function\" ? name : creator(name),\n      select = before == null ? constantNull : typeof before === \"function\" ? before : selector(before);\n  return this.select(function() {\n    return this.insertBefore(create.apply(this, arguments), select.apply(this, arguments) || null);\n  });\n}\n", "function remove() {\n  var parent = this.parentNode;\n  if (parent) parent.removeChild(this);\n}\n\nexport default function() {\n  return this.each(remove);\n}\n", "function selection_cloneShallow() {\n  var clone = this.cloneNode(false), parent = this.parentNode;\n  return parent ? parent.insertBefore(clone, this.nextSibling) : clone;\n}\n\nfunction selection_cloneDeep() {\n  var clone = this.cloneNode(true), parent = this.parentNode;\n  return parent ? parent.insertBefore(clone, this.nextSibling) : clone;\n}\n\nexport default function(deep) {\n  return this.select(deep ? selection_cloneDeep : selection_cloneShallow);\n}\n", "export default function(value) {\n  return arguments.length\n      ? this.property(\"__data__\", value)\n      : this.node().__data__;\n}\n", "function contextListener(listener) {\n  return function(event) {\n    listener.call(this, event, this.__data__);\n  };\n}\n\nfunction parseTypenames(typenames) {\n  return typenames.trim().split(/^|\\s+/).map(function(t) {\n    var name = \"\", i = t.indexOf(\".\");\n    if (i >= 0) name = t.slice(i + 1), t = t.slice(0, i);\n    return {type: t, name: name};\n  });\n}\n\nfunction onRemove(typename) {\n  return function() {\n    var on = this.__on;\n    if (!on) return;\n    for (var j = 0, i = -1, m = on.length, o; j < m; ++j) {\n      if (o = on[j], (!typename.type || o.type === typename.type) && o.name === typename.name) {\n        this.removeEventListener(o.type, o.listener, o.options);\n      } else {\n        on[++i] = o;\n      }\n    }\n    if (++i) on.length = i;\n    else delete this.__on;\n  };\n}\n\nfunction onAdd(typename, value, options) {\n  return function() {\n    var on = this.__on, o, listener = contextListener(value);\n    if (on) for (var j = 0, m = on.length; j < m; ++j) {\n      if ((o = on[j]).type === typename.type && o.name === typename.name) {\n        this.removeEventListener(o.type, o.listener, o.options);\n        this.addEventListener(o.type, o.listener = listener, o.options = options);\n        o.value = value;\n        return;\n      }\n    }\n    this.addEventListener(typename.type, listener, options);\n    o = {type: typename.type, name: typename.name, value: value, listener: listener, options: options};\n    if (!on) this.__on = [o];\n    else on.push(o);\n  };\n}\n\nexport default function(typename, value, options) {\n  var typenames = parseTypenames(typename + \"\"), i, n = typenames.length, t;\n\n  if (arguments.length < 2) {\n    var on = this.node().__on;\n    if (on) for (var j = 0, m = on.length, o; j < m; ++j) {\n      for (i = 0, o = on[j]; i < n; ++i) {\n        if ((t = typenames[i]).type === o.type && t.name === o.name) {\n          return o.value;\n        }\n      }\n    }\n    return;\n  }\n\n  on = value ? onAdd : onRemove;\n  for (i = 0; i < n; ++i) this.each(on(typenames[i], value, options));\n  return this;\n}\n", "import defaultView from \"../window.js\";\n\nfunction dispatchEvent(node, type, params) {\n  var window = defaultView(node),\n      event = window.CustomEvent;\n\n  if (typeof event === \"function\") {\n    event = new event(type, params);\n  } else {\n    event = window.document.createEvent(\"Event\");\n    if (params) event.initEvent(type, params.bubbles, params.cancelable), event.detail = params.detail;\n    else event.initEvent(type, false, false);\n  }\n\n  node.dispatchEvent(event);\n}\n\nfunction dispatchConstant(type, params) {\n  return function() {\n    return dispatchEvent(this, type, params);\n  };\n}\n\nfunction dispatchFunction(type, params) {\n  return function() {\n    return dispatchEvent(this, type, params.apply(this, arguments));\n  };\n}\n\nexport default function(type, params) {\n  return this.each((typeof params === \"function\"\n      ? dispatchFunction\n      : dispatchConstant)(type, params));\n}\n", "export default function*() {\n  for (var groups = this._groups, j = 0, m = groups.length; j < m; ++j) {\n    for (var group = groups[j], i = 0, n = group.length, node; i < n; ++i) {\n      if (node = group[i]) yield node;\n    }\n  }\n}\n", "import selection_select from \"./select.js\";\nimport selection_selectAll from \"./selectAll.js\";\nimport selection_selectChild from \"./selectChild.js\";\nimport selection_selectChildren from \"./selectChildren.js\";\nimport selection_filter from \"./filter.js\";\nimport selection_data from \"./data.js\";\nimport selection_enter from \"./enter.js\";\nimport selection_exit from \"./exit.js\";\nimport selection_join from \"./join.js\";\nimport selection_merge from \"./merge.js\";\nimport selection_order from \"./order.js\";\nimport selection_sort from \"./sort.js\";\nimport selection_call from \"./call.js\";\nimport selection_nodes from \"./nodes.js\";\nimport selection_node from \"./node.js\";\nimport selection_size from \"./size.js\";\nimport selection_empty from \"./empty.js\";\nimport selection_each from \"./each.js\";\nimport selection_attr from \"./attr.js\";\nimport selection_style from \"./style.js\";\nimport selection_property from \"./property.js\";\nimport selection_classed from \"./classed.js\";\nimport selection_text from \"./text.js\";\nimport selection_html from \"./html.js\";\nimport selection_raise from \"./raise.js\";\nimport selection_lower from \"./lower.js\";\nimport selection_append from \"./append.js\";\nimport selection_insert from \"./insert.js\";\nimport selection_remove from \"./remove.js\";\nimport selection_clone from \"./clone.js\";\nimport selection_datum from \"./datum.js\";\nimport selection_on from \"./on.js\";\nimport selection_dispatch from \"./dispatch.js\";\nimport selection_iterator from \"./iterator.js\";\n\nexport var root = [null];\n\nexport function Selection(groups, parents) {\n  this._groups = groups;\n  this._parents = parents;\n}\n\nfunction selection() {\n  return new Selection([[document.documentElement]], root);\n}\n\nfunction selection_selection() {\n  return this;\n}\n\nSelection.prototype = selection.prototype = {\n  constructor: Selection,\n  select: selection_select,\n  selectAll: selection_selectAll,\n  selectChild: selection_selectChild,\n  selectChildren: selection_selectChildren,\n  filter: selection_filter,\n  data: selection_data,\n  enter: selection_enter,\n  exit: selection_exit,\n  join: selection_join,\n  merge: selection_merge,\n  selection: selection_selection,\n  order: selection_order,\n  sort: selection_sort,\n  call: selection_call,\n  nodes: selection_nodes,\n  node: selection_node,\n  size: selection_size,\n  empty: selection_empty,\n  each: selection_each,\n  attr: selection_attr,\n  style: selection_style,\n  property: selection_property,\n  classed: selection_classed,\n  text: selection_text,\n  html: selection_html,\n  raise: selection_raise,\n  lower: selection_lower,\n  append: selection_append,\n  insert: selection_insert,\n  remove: selection_remove,\n  clone: selection_clone,\n  datum: selection_datum,\n  on: selection_on,\n  dispatch: selection_dispatch,\n  [Symbol.iterator]: selection_iterator\n};\n\nexport default selection;\n", "import {Selection, root} from \"./selection/index.js\";\n\nexport default function(selector) {\n  return typeof selector === \"string\"\n      ? new Selection([[document.querySelector(selector)]], [document.documentElement])\n      : new Selection([[selector]], root);\n}\n", "export default function(event) {\n  let sourceEvent;\n  while (sourceEvent = event.sourceEvent) event = sourceEvent;\n  return event;\n}\n", "import sourceEvent from \"./sourceEvent.js\";\n\nexport default function(event, node) {\n  event = sourceEvent(event);\n  if (node === undefined) node = event.currentTarget;\n  if (node) {\n    var svg = node.ownerSVGElement || node;\n    if (svg.createSVGPoint) {\n      var point = svg.createSVGPoint();\n      point.x = event.clientX, point.y = event.clientY;\n      point = point.matrixTransform(node.getScreenCTM().inverse());\n      return [point.x, point.y];\n    }\n    if (node.getBoundingClientRect) {\n      var rect = node.getBoundingClientRect();\n      return [event.clientX - rect.left - node.clientLeft, event.clientY - rect.top - node.clientTop];\n    }\n  }\n  return [event.pageX, event.pageY];\n}\n", "export default function(constructor, factory, prototype) {\n  constructor.prototype = factory.prototype = prototype;\n  prototype.constructor = constructor;\n}\n\nexport function extend(parent, definition) {\n  var prototype = Object.create(parent.prototype);\n  for (var key in definition) prototype[key] = definition[key];\n  return prototype;\n}\n", "import define, {extend} from \"./define.js\";\n\nexport function Color() {}\n\nexport var darker = 0.7;\nexport var brighter = 1 / darker;\n\nvar reI = \"\\\\s*([+-]?\\\\d+)\\\\s*\",\n    reN = \"\\\\s*([+-]?(?:\\\\d*\\\\.)?\\\\d+(?:[eE][+-]?\\\\d+)?)\\\\s*\",\n    reP = \"\\\\s*([+-]?(?:\\\\d*\\\\.)?\\\\d+(?:[eE][+-]?\\\\d+)?)%\\\\s*\",\n    reHex = /^#([0-9a-f]{3,8})$/,\n    reRgbInteger = new RegExp(`^rgb\\\\(${reI},${reI},${reI}\\\\)$`),\n    reRgbPercent = new RegExp(`^rgb\\\\(${reP},${reP},${reP}\\\\)$`),\n    reRgbaInteger = new RegExp(`^rgba\\\\(${reI},${reI},${reI},${reN}\\\\)$`),\n    reRgbaPercent = new RegExp(`^rgba\\\\(${reP},${reP},${reP},${reN}\\\\)$`),\n    reHslPercent = new RegExp(`^hsl\\\\(${reN},${reP},${reP}\\\\)$`),\n    reHslaPercent = new RegExp(`^hsla\\\\(${reN},${reP},${reP},${reN}\\\\)$`);\n\nvar named = {\n  aliceblue: 0xf0f8ff,\n  antiquewhite: 0xfaebd7,\n  aqua: 0x00ffff,\n  aquamarine: 0x7fffd4,\n  azure: 0xf0ffff,\n  beige: 0xf5f5dc,\n  bisque: 0xffe4c4,\n  black: 0x000000,\n  blanchedalmond: 0xffebcd,\n  blue: 0x0000ff,\n  blueviolet: 0x8a2be2,\n  brown: 0xa52a2a,\n  burlywood: 0xdeb887,\n  cadetblue: 0x5f9ea0,\n  chartreuse: 0x7fff00,\n  chocolate: 0xd2691e,\n  coral: 0xff7f50,\n  cornflowerblue: 0x6495ed,\n  cornsilk: 0xfff8dc,\n  crimson: 0xdc143c,\n  cyan: 0x00ffff,\n  darkblue: 0x00008b,\n  darkcyan: 0x008b8b,\n  darkgoldenrod: 0xb8860b,\n  darkgray: 0xa9a9a9,\n  darkgreen: 0x006400,\n  darkgrey: 0xa9a9a9,\n  darkkhaki: 0xbdb76b,\n  darkmagenta: 0x8b008b,\n  darkolivegreen: 0x556b2f,\n  darkorange: 0xff8c00,\n  darkorchid: 0x9932cc,\n  darkred: 0x8b0000,\n  darksalmon: 0xe9967a,\n  darkseagreen: 0x8fbc8f,\n  darkslateblue: 0x483d8b,\n  darkslategray: 0x2f4f4f,\n  darkslategrey: 0x2f4f4f,\n  darkturquoise: 0x00ced1,\n  darkviolet: 0x9400d3,\n  deeppink: 0xff1493,\n  deepskyblue: 0x00bfff,\n  dimgray: 0x696969,\n  dimgrey: 0x696969,\n  dodgerblue: 0x1e90ff,\n  firebrick: 0xb22222,\n  floralwhite: 0xfffaf0,\n  forestgreen: 0x228b22,\n  fuchsia: 0xff00ff,\n  gainsboro: 0xdcdcdc,\n  ghostwhite: 0xf8f8ff,\n  gold: 0xffd700,\n  goldenrod: 0xdaa520,\n  gray: 0x808080,\n  green: 0x008000,\n  greenyellow: 0xadff2f,\n  grey: 0x808080,\n  honeydew: 0xf0fff0,\n  hotpink: 0xff69b4,\n  indianred: 0xcd5c5c,\n  indigo: 0x4b0082,\n  ivory: 0xfffff0,\n  khaki: 0xf0e68c,\n  lavender: 0xe6e6fa,\n  lavenderblush: 0xfff0f5,\n  lawngreen: 0x7cfc00,\n  lemonchiffon: 0xfffacd,\n  lightblue: 0xadd8e6,\n  lightcoral: 0xf08080,\n  lightcyan: 0xe0ffff,\n  lightgoldenrodyellow: 0xfafad2,\n  lightgray: 0xd3d3d3,\n  lightgreen: 0x90ee90,\n  lightgrey: 0xd3d3d3,\n  lightpink: 0xffb6c1,\n  lightsalmon: 0xffa07a,\n  lightseagreen: 0x20b2aa,\n  lightskyblue: 0x87cefa,\n  lightslategray: 0x778899,\n  lightslategrey: 0x778899,\n  lightsteelblue: 0xb0c4de,\n  lightyellow: 0xffffe0,\n  lime: 0x00ff00,\n  limegreen: 0x32cd32,\n  linen: 0xfaf0e6,\n  magenta: 0xff00ff,\n  maroon: 0x800000,\n  mediumaquamarine: 0x66cdaa,\n  mediumblue: 0x0000cd,\n  mediumorchid: 0xba55d3,\n  mediumpurple: 0x9370db,\n  mediumseagreen: 0x3cb371,\n  mediumslateblue: 0x7b68ee,\n  mediumspringgreen: 0x00fa9a,\n  mediumturquoise: 0x48d1cc,\n  mediumvioletred: 0xc71585,\n  midnightblue: 0x191970,\n  mintcream: 0xf5fffa,\n  mistyrose: 0xffe4e1,\n  moccasin: 0xffe4b5,\n  navajowhite: 0xffdead,\n  navy: 0x000080,\n  oldlace: 0xfdf5e6,\n  olive: 0x808000,\n  olivedrab: 0x6b8e23,\n  orange: 0xffa500,\n  orangered: 0xff4500,\n  orchid: 0xda70d6,\n  palegoldenrod: 0xeee8aa,\n  palegreen: 0x98fb98,\n  paleturquoise: 0xafeeee,\n  palevioletred: 0xdb7093,\n  papayawhip: 0xffefd5,\n  peachpuff: 0xffdab9,\n  peru: 0xcd853f,\n  pink: 0xffc0cb,\n  plum: 0xdda0dd,\n  powderblue: 0xb0e0e6,\n  purple: 0x800080,\n  rebeccapurple: 0x663399,\n  red: 0xff0000,\n  rosybrown: 0xbc8f8f,\n  royalblue: 0x4169e1,\n  saddlebrown: 0x8b4513,\n  salmon: 0xfa8072,\n  sandybrown: 0xf4a460,\n  seagreen: 0x2e8b57,\n  seashell: 0xfff5ee,\n  sienna: 0xa0522d,\n  silver: 0xc0c0c0,\n  skyblue: 0x87ceeb,\n  slateblue: 0x6a5acd,\n  slategray: 0x708090,\n  slategrey: 0x708090,\n  snow: 0xfffafa,\n  springgreen: 0x00ff7f,\n  steelblue: 0x4682b4,\n  tan: 0xd2b48c,\n  teal: 0x008080,\n  thistle: 0xd8bfd8,\n  tomato: 0xff6347,\n  turquoise: 0x40e0d0,\n  violet: 0xee82ee,\n  wheat: 0xf5deb3,\n  white: 0xffffff,\n  whitesmoke: 0xf5f5f5,\n  yellow: 0xffff00,\n  yellowgreen: 0x9acd32\n};\n\ndefine(Color, color, {\n  copy(channels) {\n    return Object.assign(new this.constructor, this, channels);\n  },\n  displayable() {\n    return this.rgb().displayable();\n  },\n  hex: color_formatHex, // Deprecated! Use color.formatHex.\n  formatHex: color_formatHex,\n  formatHex8: color_formatHex8,\n  formatHsl: color_formatHsl,\n  formatRgb: color_formatRgb,\n  toString: color_formatRgb\n});\n\nfunction color_formatHex() {\n  return this.rgb().formatHex();\n}\n\nfunction color_formatHex8() {\n  return this.rgb().formatHex8();\n}\n\nfunction color_formatHsl() {\n  return hslConvert(this).formatHsl();\n}\n\nfunction color_formatRgb() {\n  return this.rgb().formatRgb();\n}\n\nexport default function color(format) {\n  var m, l;\n  format = (format + \"\").trim().toLowerCase();\n  return (m = reHex.exec(format)) ? (l = m[1].length, m = parseInt(m[1], 16), l === 6 ? rgbn(m) // #ff0000\n      : l === 3 ? new Rgb((m >> 8 & 0xf) | (m >> 4 & 0xf0), (m >> 4 & 0xf) | (m & 0xf0), ((m & 0xf) << 4) | (m & 0xf), 1) // #f00\n      : l === 8 ? rgba(m >> 24 & 0xff, m >> 16 & 0xff, m >> 8 & 0xff, (m & 0xff) / 0xff) // #ff000000\n      : l === 4 ? rgba((m >> 12 & 0xf) | (m >> 8 & 0xf0), (m >> 8 & 0xf) | (m >> 4 & 0xf0), (m >> 4 & 0xf) | (m & 0xf0), (((m & 0xf) << 4) | (m & 0xf)) / 0xff) // #f000\n      : null) // invalid hex\n      : (m = reRgbInteger.exec(format)) ? new Rgb(m[1], m[2], m[3], 1) // rgb(255, 0, 0)\n      : (m = reRgbPercent.exec(format)) ? new Rgb(m[1] * 255 / 100, m[2] * 255 / 100, m[3] * 255 / 100, 1) // rgb(100%, 0%, 0%)\n      : (m = reRgbaInteger.exec(format)) ? rgba(m[1], m[2], m[3], m[4]) // rgba(255, 0, 0, 1)\n      : (m = reRgbaPercent.exec(format)) ? rgba(m[1] * 255 / 100, m[2] * 255 / 100, m[3] * 255 / 100, m[4]) // rgb(100%, 0%, 0%, 1)\n      : (m = reHslPercent.exec(format)) ? hsla(m[1], m[2] / 100, m[3] / 100, 1) // hsl(120, 50%, 50%)\n      : (m = reHslaPercent.exec(format)) ? hsla(m[1], m[2] / 100, m[3] / 100, m[4]) // hsla(120, 50%, 50%, 1)\n      : named.hasOwnProperty(format) ? rgbn(named[format]) // eslint-disable-line no-prototype-builtins\n      : format === \"transparent\" ? new Rgb(NaN, NaN, NaN, 0)\n      : null;\n}\n\nfunction rgbn(n) {\n  return new Rgb(n >> 16 & 0xff, n >> 8 & 0xff, n & 0xff, 1);\n}\n\nfunction rgba(r, g, b, a) {\n  if (a <= 0) r = g = b = NaN;\n  return new Rgb(r, g, b, a);\n}\n\nexport function rgbConvert(o) {\n  if (!(o instanceof Color)) o = color(o);\n  if (!o) return new Rgb;\n  o = o.rgb();\n  return new Rgb(o.r, o.g, o.b, o.opacity);\n}\n\nexport function rgb(r, g, b, opacity) {\n  return arguments.length === 1 ? rgbConvert(r) : new Rgb(r, g, b, opacity == null ? 1 : opacity);\n}\n\nexport function Rgb(r, g, b, opacity) {\n  this.r = +r;\n  this.g = +g;\n  this.b = +b;\n  this.opacity = +opacity;\n}\n\ndefine(Rgb, rgb, extend(Color, {\n  brighter(k) {\n    k = k == null ? brighter : Math.pow(brighter, k);\n    return new Rgb(this.r * k, this.g * k, this.b * k, this.opacity);\n  },\n  darker(k) {\n    k = k == null ? darker : Math.pow(darker, k);\n    return new Rgb(this.r * k, this.g * k, this.b * k, this.opacity);\n  },\n  rgb() {\n    return this;\n  },\n  clamp() {\n    return new Rgb(clampi(this.r), clampi(this.g), clampi(this.b), clampa(this.opacity));\n  },\n  displayable() {\n    return (-0.5 <= this.r && this.r < 255.5)\n        && (-0.5 <= this.g && this.g < 255.5)\n        && (-0.5 <= this.b && this.b < 255.5)\n        && (0 <= this.opacity && this.opacity <= 1);\n  },\n  hex: rgb_formatHex, // Deprecated! Use color.formatHex.\n  formatHex: rgb_formatHex,\n  formatHex8: rgb_formatHex8,\n  formatRgb: rgb_formatRgb,\n  toString: rgb_formatRgb\n}));\n\nfunction rgb_formatHex() {\n  return `#${hex(this.r)}${hex(this.g)}${hex(this.b)}`;\n}\n\nfunction rgb_formatHex8() {\n  return `#${hex(this.r)}${hex(this.g)}${hex(this.b)}${hex((isNaN(this.opacity) ? 1 : this.opacity) * 255)}`;\n}\n\nfunction rgb_formatRgb() {\n  const a = clampa(this.opacity);\n  return `${a === 1 ? \"rgb(\" : \"rgba(\"}${clampi(this.r)}, ${clampi(this.g)}, ${clampi(this.b)}${a === 1 ? \")\" : `, ${a})`}`;\n}\n\nfunction clampa(opacity) {\n  return isNaN(opacity) ? 1 : Math.max(0, Math.min(1, opacity));\n}\n\nfunction clampi(value) {\n  return Math.max(0, Math.min(255, Math.round(value) || 0));\n}\n\nfunction hex(value) {\n  value = clampi(value);\n  return (value < 16 ? \"0\" : \"\") + value.toString(16);\n}\n\nfunction hsla(h, s, l, a) {\n  if (a <= 0) h = s = l = NaN;\n  else if (l <= 0 || l >= 1) h = s = NaN;\n  else if (s <= 0) h = NaN;\n  return new Hsl(h, s, l, a);\n}\n\nexport function hslConvert(o) {\n  if (o instanceof Hsl) return new Hsl(o.h, o.s, o.l, o.opacity);\n  if (!(o instanceof Color)) o = color(o);\n  if (!o) return new Hsl;\n  if (o instanceof Hsl) return o;\n  o = o.rgb();\n  var r = o.r / 255,\n      g = o.g / 255,\n      b = o.b / 255,\n      min = Math.min(r, g, b),\n      max = Math.max(r, g, b),\n      h = NaN,\n      s = max - min,\n      l = (max + min) / 2;\n  if (s) {\n    if (r === max) h = (g - b) / s + (g < b) * 6;\n    else if (g === max) h = (b - r) / s + 2;\n    else h = (r - g) / s + 4;\n    s /= l < 0.5 ? max + min : 2 - max - min;\n    h *= 60;\n  } else {\n    s = l > 0 && l < 1 ? 0 : h;\n  }\n  return new Hsl(h, s, l, o.opacity);\n}\n\nexport function hsl(h, s, l, opacity) {\n  return arguments.length === 1 ? hslConvert(h) : new Hsl(h, s, l, opacity == null ? 1 : opacity);\n}\n\nfunction Hsl(h, s, l, opacity) {\n  this.h = +h;\n  this.s = +s;\n  this.l = +l;\n  this.opacity = +opacity;\n}\n\ndefine(Hsl, hsl, extend(Color, {\n  brighter(k) {\n    k = k == null ? brighter : Math.pow(brighter, k);\n    return new Hsl(this.h, this.s, this.l * k, this.opacity);\n  },\n  darker(k) {\n    k = k == null ? darker : Math.pow(darker, k);\n    return new Hsl(this.h, this.s, this.l * k, this.opacity);\n  },\n  rgb() {\n    var h = this.h % 360 + (this.h < 0) * 360,\n        s = isNaN(h) || isNaN(this.s) ? 0 : this.s,\n        l = this.l,\n        m2 = l + (l < 0.5 ? l : 1 - l) * s,\n        m1 = 2 * l - m2;\n    return new Rgb(\n      hsl2rgb(h >= 240 ? h - 240 : h + 120, m1, m2),\n      hsl2rgb(h, m1, m2),\n      hsl2rgb(h < 120 ? h + 240 : h - 120, m1, m2),\n      this.opacity\n    );\n  },\n  clamp() {\n    return new Hsl(clamph(this.h), clampt(this.s), clampt(this.l), clampa(this.opacity));\n  },\n  displayable() {\n    return (0 <= this.s && this.s <= 1 || isNaN(this.s))\n        && (0 <= this.l && this.l <= 1)\n        && (0 <= this.opacity && this.opacity <= 1);\n  },\n  formatHsl() {\n    const a = clampa(this.opacity);\n    return `${a === 1 ? \"hsl(\" : \"hsla(\"}${clamph(this.h)}, ${clampt(this.s) * 100}%, ${clampt(this.l) * 100}%${a === 1 ? \")\" : `, ${a})`}`;\n  }\n}));\n\nfunction clamph(value) {\n  value = (value || 0) % 360;\n  return value < 0 ? value + 360 : value;\n}\n\nfunction clampt(value) {\n  return Math.max(0, Math.min(1, value || 0));\n}\n\n/* From FvD 13.37, CSS Color Module Level 3 */\nfunction hsl2rgb(h, m1, m2) {\n  return (h < 60 ? m1 + (m2 - m1) * h / 60\n      : h < 180 ? m2\n      : h < 240 ? m1 + (m2 - m1) * (240 - h) / 60\n      : m1) * 255;\n}\n", "export const radians = Math.PI / 180;\nexport const degrees = 180 / Math.PI;\n", "import define, {extend} from \"./define.js\";\nimport {Color, rgbConvert, Rgb} from \"./color.js\";\nimport {degrees, radians} from \"./math.js\";\n\n// https://observablehq.com/@mbostock/lab-and-rgb\nconst K = 18,\n    Xn = 0.96422,\n    Yn = 1,\n    Zn = 0.82521,\n    t0 = 4 / 29,\n    t1 = 6 / 29,\n    t2 = 3 * t1 * t1,\n    t3 = t1 * t1 * t1;\n\nfunction labConvert(o) {\n  if (o instanceof Lab) return new Lab(o.l, o.a, o.b, o.opacity);\n  if (o instanceof Hcl) return hcl2lab(o);\n  if (!(o instanceof Rgb)) o = rgbConvert(o);\n  var r = rgb2lrgb(o.r),\n      g = rgb2lrgb(o.g),\n      b = rgb2lrgb(o.b),\n      y = xyz2lab((0.2225045 * r + 0.7168786 * g + 0.0606169 * b) / Yn), x, z;\n  if (r === g && g === b) x = z = y; else {\n    x = xyz2lab((0.4360747 * r + 0.3850649 * g + 0.1430804 * b) / Xn);\n    z = xyz2lab((0.0139322 * r + 0.0971045 * g + 0.7141733 * b) / Zn);\n  }\n  return new Lab(116 * y - 16, 500 * (x - y), 200 * (y - z), o.opacity);\n}\n\nexport function gray(l, opacity) {\n  return new Lab(l, 0, 0, opacity == null ? 1 : opacity);\n}\n\nexport default function lab(l, a, b, opacity) {\n  return arguments.length === 1 ? labConvert(l) : new Lab(l, a, b, opacity == null ? 1 : opacity);\n}\n\nexport function Lab(l, a, b, opacity) {\n  this.l = +l;\n  this.a = +a;\n  this.b = +b;\n  this.opacity = +opacity;\n}\n\ndefine(Lab, lab, extend(Color, {\n  brighter(k) {\n    return new Lab(this.l + K * (k == null ? 1 : k), this.a, this.b, this.opacity);\n  },\n  darker(k) {\n    return new Lab(this.l - K * (k == null ? 1 : k), this.a, this.b, this.opacity);\n  },\n  rgb() {\n    var y = (this.l + 16) / 116,\n        x = isNaN(this.a) ? y : y + this.a / 500,\n        z = isNaN(this.b) ? y : y - this.b / 200;\n    x = Xn * lab2xyz(x);\n    y = Yn * lab2xyz(y);\n    z = Zn * lab2xyz(z);\n    return new Rgb(\n      lrgb2rgb( 3.1338561 * x - 1.6168667 * y - 0.4906146 * z),\n      lrgb2rgb(-0.9787684 * x + 1.9161415 * y + 0.0334540 * z),\n      lrgb2rgb( 0.0719453 * x - 0.2289914 * y + 1.4052427 * z),\n      this.opacity\n    );\n  }\n}));\n\nfunction xyz2lab(t) {\n  return t > t3 ? Math.pow(t, 1 / 3) : t / t2 + t0;\n}\n\nfunction lab2xyz(t) {\n  return t > t1 ? t * t * t : t2 * (t - t0);\n}\n\nfunction lrgb2rgb(x) {\n  return 255 * (x <= 0.0031308 ? 12.92 * x : 1.055 * Math.pow(x, 1 / 2.4) - 0.055);\n}\n\nfunction rgb2lrgb(x) {\n  return (x /= 255) <= 0.04045 ? x / 12.92 : Math.pow((x + 0.055) / 1.055, 2.4);\n}\n\nfunction hclConvert(o) {\n  if (o instanceof Hcl) return new Hcl(o.h, o.c, o.l, o.opacity);\n  if (!(o instanceof Lab)) o = labConvert(o);\n  if (o.a === 0 && o.b === 0) return new Hcl(NaN, 0 < o.l && o.l < 100 ? 0 : NaN, o.l, o.opacity);\n  var h = Math.atan2(o.b, o.a) * degrees;\n  return new Hcl(h < 0 ? h + 360 : h, Math.sqrt(o.a * o.a + o.b * o.b), o.l, o.opacity);\n}\n\nexport function lch(l, c, h, opacity) {\n  return arguments.length === 1 ? hclConvert(l) : new Hcl(h, c, l, opacity == null ? 1 : opacity);\n}\n\nexport function hcl(h, c, l, opacity) {\n  return arguments.length === 1 ? hclConvert(h) : new Hcl(h, c, l, opacity == null ? 1 : opacity);\n}\n\nexport function Hcl(h, c, l, opacity) {\n  this.h = +h;\n  this.c = +c;\n  this.l = +l;\n  this.opacity = +opacity;\n}\n\nfunction hcl2lab(o) {\n  if (isNaN(o.h)) return new Lab(o.l, 0, 0, o.opacity);\n  var h = o.h * radians;\n  return new Lab(o.l, Math.cos(h) * o.c, Math.sin(h) * o.c, o.opacity);\n}\n\ndefine(Hcl, hcl, extend(Color, {\n  brighter(k) {\n    return new Hcl(this.h, this.c, this.l + K * (k == null ? 1 : k), this.opacity);\n  },\n  darker(k) {\n    return new Hcl(this.h, this.c, this.l - K * (k == null ? 1 : k), this.opacity);\n  },\n  rgb() {\n    return hcl2lab(this).rgb();\n  }\n}));\n", "import define, {extend} from \"./define.js\";\nimport {Color, rgbConvert, Rgb, darker, brighter} from \"./color.js\";\nimport {degrees, radians} from \"./math.js\";\n\nvar A = -0.14861,\n    B = +1.78277,\n    C = -0.29227,\n    D = -0.90649,\n    E = +1.97294,\n    ED = E * D,\n    EB = E * B,\n    BC_DA = B * C - D * A;\n\nfunction cubehelixConvert(o) {\n  if (o instanceof Cubehelix) return new Cubehelix(o.h, o.s, o.l, o.opacity);\n  if (!(o instanceof Rgb)) o = rgbConvert(o);\n  var r = o.r / 255,\n      g = o.g / 255,\n      b = o.b / 255,\n      l = (BC_DA * b + ED * r - EB * g) / (BC_DA + ED - EB),\n      bl = b - l,\n      k = (E * (g - l) - C * bl) / D,\n      s = Math.sqrt(k * k + bl * bl) / (E * l * (1 - l)), // NaN if l=0 or l=1\n      h = s ? Math.atan2(k, bl) * degrees - 120 : NaN;\n  return new Cubehelix(h < 0 ? h + 360 : h, s, l, o.opacity);\n}\n\nexport default function cubehelix(h, s, l, opacity) {\n  return arguments.length === 1 ? cubehelixConvert(h) : new Cubehelix(h, s, l, opacity == null ? 1 : opacity);\n}\n\nexport function Cubehelix(h, s, l, opacity) {\n  this.h = +h;\n  this.s = +s;\n  this.l = +l;\n  this.opacity = +opacity;\n}\n\ndefine(Cubehelix, cubehelix, extend(Color, {\n  brighter(k) {\n    k = k == null ? brighter : Math.pow(brighter, k);\n    return new Cubehelix(this.h, this.s, this.l * k, this.opacity);\n  },\n  darker(k) {\n    k = k == null ? darker : Math.pow(darker, k);\n    return new Cubehelix(this.h, this.s, this.l * k, this.opacity);\n  },\n  rgb() {\n    var h = isNaN(this.h) ? 0 : (this.h + 120) * radians,\n        l = +this.l,\n        a = isNaN(this.s) ? 0 : this.s * l * (1 - l),\n        cosh = Math.cos(h),\n        sinh = Math.sin(h);\n    return new Rgb(\n      255 * (l + a * (A * cosh + B * sinh)),\n      255 * (l + a * (C * cosh + D * sinh)),\n      255 * (l + a * (E * cosh)),\n      this.opacity\n    );\n  }\n}));\n", "export function basis(t1, v0, v1, v2, v3) {\n  var t2 = t1 * t1, t3 = t2 * t1;\n  return ((1 - 3 * t1 + 3 * t2 - t3) * v0\n      + (4 - 6 * t2 + 3 * t3) * v1\n      + (1 + 3 * t1 + 3 * t2 - 3 * t3) * v2\n      + t3 * v3) / 6;\n}\n\nexport default function(values) {\n  var n = values.length - 1;\n  return function(t) {\n    var i = t <= 0 ? (t = 0) : t >= 1 ? (t = 1, n - 1) : Math.floor(t * n),\n        v1 = values[i],\n        v2 = values[i + 1],\n        v0 = i > 0 ? values[i - 1] : 2 * v1 - v2,\n        v3 = i < n - 1 ? values[i + 2] : 2 * v2 - v1;\n    return basis((t - i / n) * n, v0, v1, v2, v3);\n  };\n}\n", "import {basis} from \"./basis.js\";\n\nexport default function(values) {\n  var n = values.length;\n  return function(t) {\n    var i = Math.floor(((t %= 1) < 0 ? ++t : t) * n),\n        v0 = values[(i + n - 1) % n],\n        v1 = values[i % n],\n        v2 = values[(i + 1) % n],\n        v3 = values[(i + 2) % n];\n    return basis((t - i / n) * n, v0, v1, v2, v3);\n  };\n}\n", "export default x => () => x;\n", "import constant from \"./constant.js\";\n\nfunction linear(a, d) {\n  return function(t) {\n    return a + t * d;\n  };\n}\n\nfunction exponential(a, b, y) {\n  return a = Math.pow(a, y), b = Math.pow(b, y) - a, y = 1 / y, function(t) {\n    return Math.pow(a + t * b, y);\n  };\n}\n\nexport function hue(a, b) {\n  var d = b - a;\n  return d ? linear(a, d > 180 || d < -180 ? d - 360 * Math.round(d / 360) : d) : constant(isNaN(a) ? b : a);\n}\n\nexport function gamma(y) {\n  return (y = +y) === 1 ? nogamma : function(a, b) {\n    return b - a ? exponential(a, b, y) : constant(isNaN(a) ? b : a);\n  };\n}\n\nexport default function nogamma(a, b) {\n  var d = b - a;\n  return d ? linear(a, d) : constant(isNaN(a) ? b : a);\n}\n", "import {rgb as colorRgb} from \"d3-color\";\nimport basis from \"./basis.js\";\nimport basisClosed from \"./basisClosed.js\";\nimport nogamma, {gamma} from \"./color.js\";\n\nexport default (function rgbGamma(y) {\n  var color = gamma(y);\n\n  function rgb(start, end) {\n    var r = color((start = colorRgb(start)).r, (end = colorRgb(end)).r),\n        g = color(start.g, end.g),\n        b = color(start.b, end.b),\n        opacity = nogamma(start.opacity, end.opacity);\n    return function(t) {\n      start.r = r(t);\n      start.g = g(t);\n      start.b = b(t);\n      start.opacity = opacity(t);\n      return start + \"\";\n    };\n  }\n\n  rgb.gamma = rgbGamma;\n\n  return rgb;\n})(1);\n\nfunction rgbSpline(spline) {\n  return function(colors) {\n    var n = colors.length,\n        r = new Array(n),\n        g = new Array(n),\n        b = new Array(n),\n        i, color;\n    for (i = 0; i < n; ++i) {\n      color = colorRgb(colors[i]);\n      r[i] = color.r || 0;\n      g[i] = color.g || 0;\n      b[i] = color.b || 0;\n    }\n    r = spline(r);\n    g = spline(g);\n    b = spline(b);\n    color.opacity = 1;\n    return function(t) {\n      color.r = r(t);\n      color.g = g(t);\n      color.b = b(t);\n      return color + \"\";\n    };\n  };\n}\n\nexport var rgbBasis = rgbSpline(basis);\nexport var rgbBasisClosed = rgbSpline(basisClosed);\n", "export default function(a, b) {\n  if (!b) b = [];\n  var n = a ? Math.min(b.length, a.length) : 0,\n      c = b.slice(),\n      i;\n  return function(t) {\n    for (i = 0; i < n; ++i) c[i] = a[i] * (1 - t) + b[i] * t;\n    return c;\n  };\n}\n\nexport function isNumberArray(x) {\n  return ArrayBuffer.isView(x) && !(x instanceof DataView);\n}\n", "import value from \"./value.js\";\nimport numberArray, {isNumberArray} from \"./numberArray.js\";\n\nexport default function(a, b) {\n  return (isNumberArray(b) ? numberArray : genericArray)(a, b);\n}\n\nexport function genericArray(a, b) {\n  var nb = b ? b.length : 0,\n      na = a ? Math.min(nb, a.length) : 0,\n      x = new Array(na),\n      c = new Array(nb),\n      i;\n\n  for (i = 0; i < na; ++i) x[i] = value(a[i], b[i]);\n  for (; i < nb; ++i) c[i] = b[i];\n\n  return function(t) {\n    for (i = 0; i < na; ++i) c[i] = x[i](t);\n    return c;\n  };\n}\n", "export default function(a, b) {\n  var d = new Date;\n  return a = +a, b = +b, function(t) {\n    return d.setTime(a * (1 - t) + b * t), d;\n  };\n}\n", "export default function(a, b) {\n  return a = +a, b = +b, function(t) {\n    return a * (1 - t) + b * t;\n  };\n}\n", "import value from \"./value.js\";\n\nexport default function(a, b) {\n  var i = {},\n      c = {},\n      k;\n\n  if (a === null || typeof a !== \"object\") a = {};\n  if (b === null || typeof b !== \"object\") b = {};\n\n  for (k in b) {\n    if (k in a) {\n      i[k] = value(a[k], b[k]);\n    } else {\n      c[k] = b[k];\n    }\n  }\n\n  return function(t) {\n    for (k in i) c[k] = i[k](t);\n    return c;\n  };\n}\n", "import number from \"./number.js\";\n\nvar reA = /[-+]?(?:\\d+\\.?\\d*|\\.?\\d+)(?:[eE][-+]?\\d+)?/g,\n    reB = new RegExp(reA.source, \"g\");\n\nfunction zero(b) {\n  return function() {\n    return b;\n  };\n}\n\nfunction one(b) {\n  return function(t) {\n    return b(t) + \"\";\n  };\n}\n\nexport default function(a, b) {\n  var bi = reA.lastIndex = reB.lastIndex = 0, // scan index for next number in b\n      am, // current match in a\n      bm, // current match in b\n      bs, // string preceding current number in b, if any\n      i = -1, // index in s\n      s = [], // string constants and placeholders\n      q = []; // number interpolators\n\n  // Coerce inputs to strings.\n  a = a + \"\", b = b + \"\";\n\n  // Interpolate pairs of numbers in a & b.\n  while ((am = reA.exec(a))\n      && (bm = reB.exec(b))) {\n    if ((bs = bm.index) > bi) { // a string precedes the next number in b\n      bs = b.slice(bi, bs);\n      if (s[i]) s[i] += bs; // coalesce with previous string\n      else s[++i] = bs;\n    }\n    if ((am = am[0]) === (bm = bm[0])) { // numbers in a & b match\n      if (s[i]) s[i] += bm; // coalesce with previous string\n      else s[++i] = bm;\n    } else { // interpolate non-matching numbers\n      s[++i] = null;\n      q.push({i: i, x: number(am, bm)});\n    }\n    bi = reB.lastIndex;\n  }\n\n  // Add remains of b.\n  if (bi < b.length) {\n    bs = b.slice(bi);\n    if (s[i]) s[i] += bs; // coalesce with previous string\n    else s[++i] = bs;\n  }\n\n  // Special optimization for only a single match.\n  // Otherwise, interpolate each of the numbers and rejoin the string.\n  return s.length < 2 ? (q[0]\n      ? one(q[0].x)\n      : zero(b))\n      : (b = q.length, function(t) {\n          for (var i = 0, o; i < b; ++i) s[(o = q[i]).i] = o.x(t);\n          return s.join(\"\");\n        });\n}\n", "import {color} from \"d3-color\";\nimport rgb from \"./rgb.js\";\nimport {genericArray} from \"./array.js\";\nimport date from \"./date.js\";\nimport number from \"./number.js\";\nimport object from \"./object.js\";\nimport string from \"./string.js\";\nimport constant from \"./constant.js\";\nimport numberArray, {isNumberArray} from \"./numberArray.js\";\n\nexport default function(a, b) {\n  var t = typeof b, c;\n  return b == null || t === \"boolean\" ? constant(b)\n      : (t === \"number\" ? number\n      : t === \"string\" ? ((c = color(b)) ? (b = c, rgb) : string)\n      : b instanceof color ? rgb\n      : b instanceof Date ? date\n      : isNumberArray(b) ? numberArray\n      : Array.isArray(b) ? genericArray\n      : typeof b.valueOf !== \"function\" && typeof b.toString !== \"function\" || isNaN(b) ? object\n      : number)(a, b);\n}\n", "export default function(a, b) {\n  return a = +a, b = +b, function(t) {\n    return Math.round(a * (1 - t) + b * t);\n  };\n}\n", "var degrees = 180 / Math.PI;\n\nexport var identity = {\n  translateX: 0,\n  translateY: 0,\n  rotate: 0,\n  skewX: 0,\n  scaleX: 1,\n  scaleY: 1\n};\n\nexport default function(a, b, c, d, e, f) {\n  var scaleX, scaleY, skewX;\n  if (scaleX = Math.sqrt(a * a + b * b)) a /= scaleX, b /= scaleX;\n  if (skewX = a * c + b * d) c -= a * skewX, d -= b * skewX;\n  if (scaleY = Math.sqrt(c * c + d * d)) c /= scaleY, d /= scaleY, skewX /= scaleY;\n  if (a * d < b * c) a = -a, b = -b, skewX = -skewX, scaleX = -scaleX;\n  return {\n    translateX: e,\n    translateY: f,\n    rotate: Math.atan2(b, a) * degrees,\n    skewX: Math.atan(skewX) * degrees,\n    scaleX: scaleX,\n    scaleY: scaleY\n  };\n}\n", "import decompose, {identity} from \"./decompose.js\";\n\nvar svgNode;\n\n/* eslint-disable no-undef */\nexport function parseCss(value) {\n  const m = new (typeof DOMMatrix === \"function\" ? DOMMatrix : WebKitCSSMatrix)(value + \"\");\n  return m.isIdentity ? identity : decompose(m.a, m.b, m.c, m.d, m.e, m.f);\n}\n\nexport function parseSvg(value) {\n  if (value == null) return identity;\n  if (!svgNode) svgNode = document.createElementNS(\"http://www.w3.org/2000/svg\", \"g\");\n  svgNode.setAttribute(\"transform\", value);\n  if (!(value = svgNode.transform.baseVal.consolidate())) return identity;\n  value = value.matrix;\n  return decompose(value.a, value.b, value.c, value.d, value.e, value.f);\n}\n", "import number from \"../number.js\";\nimport {parseCss, parseSvg} from \"./parse.js\";\n\nfunction interpolateTransform(parse, pxComma, pxParen, degParen) {\n\n  function pop(s) {\n    return s.length ? s.pop() + \" \" : \"\";\n  }\n\n  function translate(xa, ya, xb, yb, s, q) {\n    if (xa !== xb || ya !== yb) {\n      var i = s.push(\"translate(\", null, pxComma, null, pxParen);\n      q.push({i: i - 4, x: number(xa, xb)}, {i: i - 2, x: number(ya, yb)});\n    } else if (xb || yb) {\n      s.push(\"translate(\" + xb + pxComma + yb + pxParen);\n    }\n  }\n\n  function rotate(a, b, s, q) {\n    if (a !== b) {\n      if (a - b > 180) b += 360; else if (b - a > 180) a += 360; // shortest path\n      q.push({i: s.push(pop(s) + \"rotate(\", null, degParen) - 2, x: number(a, b)});\n    } else if (b) {\n      s.push(pop(s) + \"rotate(\" + b + degParen);\n    }\n  }\n\n  function skewX(a, b, s, q) {\n    if (a !== b) {\n      q.push({i: s.push(pop(s) + \"skewX(\", null, degParen) - 2, x: number(a, b)});\n    } else if (b) {\n      s.push(pop(s) + \"skewX(\" + b + degParen);\n    }\n  }\n\n  function scale(xa, ya, xb, yb, s, q) {\n    if (xa !== xb || ya !== yb) {\n      var i = s.push(pop(s) + \"scale(\", null, \",\", null, \")\");\n      q.push({i: i - 4, x: number(xa, xb)}, {i: i - 2, x: number(ya, yb)});\n    } else if (xb !== 1 || yb !== 1) {\n      s.push(pop(s) + \"scale(\" + xb + \",\" + yb + \")\");\n    }\n  }\n\n  return function(a, b) {\n    var s = [], // string constants and placeholders\n        q = []; // number interpolators\n    a = parse(a), b = parse(b);\n    translate(a.translateX, a.translateY, b.translateX, b.translateY, s, q);\n    rotate(a.rotate, b.rotate, s, q);\n    skewX(a.skewX, b.skewX, s, q);\n    scale(a.scaleX, a.scaleY, b.scaleX, b.scaleY, s, q);\n    a = b = null; // gc\n    return function(t) {\n      var i = -1, n = q.length, o;\n      while (++i < n) s[(o = q[i]).i] = o.x(t);\n      return s.join(\"\");\n    };\n  };\n}\n\nexport var interpolateTransformCss = interpolateTransform(parseCss, \"px, \", \"px)\", \"deg)\");\nexport var interpolateTransformSvg = interpolateTransform(parseSvg, \", \", \")\", \")\");\n", "import {hsl as colorHsl} from \"d3-color\";\nimport color, {hue} from \"./color.js\";\n\nfunction hsl(hue) {\n  return function(start, end) {\n    var h = hue((start = colorHsl(start)).h, (end = colorHsl(end)).h),\n        s = color(start.s, end.s),\n        l = color(start.l, end.l),\n        opacity = color(start.opacity, end.opacity);\n    return function(t) {\n      start.h = h(t);\n      start.s = s(t);\n      start.l = l(t);\n      start.opacity = opacity(t);\n      return start + \"\";\n    };\n  }\n}\n\nexport default hsl(hue);\nexport var hslLong = hsl(color);\n", "import {lab as colorLab} from \"d3-color\";\nimport color from \"./color.js\";\n\nexport default function lab(start, end) {\n  var l = color((start = colorLab(start)).l, (end = colorLab(end)).l),\n      a = color(start.a, end.a),\n      b = color(start.b, end.b),\n      opacity = color(start.opacity, end.opacity);\n  return function(t) {\n    start.l = l(t);\n    start.a = a(t);\n    start.b = b(t);\n    start.opacity = opacity(t);\n    return start + \"\";\n  };\n}\n", "import {hcl as colorHcl} from \"d3-color\";\nimport color, {hue} from \"./color.js\";\n\nfunction hcl(hue) {\n  return function(start, end) {\n    var h = hue((start = colorHcl(start)).h, (end = colorHcl(end)).h),\n        c = color(start.c, end.c),\n        l = color(start.l, end.l),\n        opacity = color(start.opacity, end.opacity);\n    return function(t) {\n      start.h = h(t);\n      start.c = c(t);\n      start.l = l(t);\n      start.opacity = opacity(t);\n      return start + \"\";\n    };\n  }\n}\n\nexport default hcl(hue);\nexport var hclLong = hcl(color);\n", "import {cubehelix as colorCubehelix} from \"d3-color\";\nimport color, {hue} from \"./color.js\";\n\nfunction cubehelix(hue) {\n  return (function cubehelixGamma(y) {\n    y = +y;\n\n    function cubehelix(start, end) {\n      var h = hue((start = colorCubehelix(start)).h, (end = colorCubehelix(end)).h),\n          s = color(start.s, end.s),\n          l = color(start.l, end.l),\n          opacity = color(start.opacity, end.opacity);\n      return function(t) {\n        start.h = h(t);\n        start.s = s(t);\n        start.l = l(Math.pow(t, y));\n        start.opacity = opacity(t);\n        return start + \"\";\n      };\n    }\n\n    cubehelix.gamma = cubehelixGamma;\n\n    return cubehelix;\n  })(1);\n}\n\nexport default cubehelix(hue);\nexport var cubehelixLong = cubehelix(color);\n", "import {default as value} from \"./value.js\";\n\nexport default function piecewise(interpolate, values) {\n  if (values === undefined) values = interpolate, interpolate = value;\n  var i = 0, n = values.length - 1, v = values[0], I = new Array(n < 0 ? 0 : n);\n  while (i < n) I[i] = interpolate(v, v = values[++i]);\n  return function(t) {\n    var i = Math.max(0, Math.min(n - 1, Math.floor(t *= n)));\n    return I[i](t - i);\n  };\n}\n", "export default function(interpolator, n) {\n  var samples = new Array(n);\n  for (var i = 0; i < n; ++i) samples[i] = interpolator(i / (n - 1));\n  return samples;\n}\n", "var frame = 0, // is an animation frame pending?\n    timeout = 0, // is a timeout pending?\n    interval = 0, // are any timers active?\n    pokeDelay = 1000, // how frequently we check for clock skew\n    taskHead,\n    taskTail,\n    clockLast = 0,\n    clockNow = 0,\n    clockSkew = 0,\n    clock = typeof performance === \"object\" && performance.now ? performance : Date,\n    setFrame = typeof window === \"object\" && window.requestAnimationFrame ? window.requestAnimationFrame.bind(window) : function(f) { setTimeout(f, 17); };\n\nexport function now() {\n  return clockNow || (setFrame(clearNow), clockNow = clock.now() + clockSkew);\n}\n\nfunction clearNow() {\n  clockNow = 0;\n}\n\nexport function Timer() {\n  this._call =\n  this._time =\n  this._next = null;\n}\n\nTimer.prototype = timer.prototype = {\n  constructor: Timer,\n  restart: function(callback, delay, time) {\n    if (typeof callback !== \"function\") throw new TypeError(\"callback is not a function\");\n    time = (time == null ? now() : +time) + (delay == null ? 0 : +delay);\n    if (!this._next && taskTail !== this) {\n      if (taskTail) taskTail._next = this;\n      else taskHead = this;\n      taskTail = this;\n    }\n    this._call = callback;\n    this._time = time;\n    sleep();\n  },\n  stop: function() {\n    if (this._call) {\n      this._call = null;\n      this._time = Infinity;\n      sleep();\n    }\n  }\n};\n\nexport function timer(callback, delay, time) {\n  var t = new Timer;\n  t.restart(callback, delay, time);\n  return t;\n}\n\nexport function timerFlush() {\n  now(); // Get the current time, if not already set.\n  ++frame; // Pretend we\u2019ve set an alarm, if we haven\u2019t already.\n  var t = taskHead, e;\n  while (t) {\n    if ((e = clockNow - t._time) >= 0) t._call.call(undefined, e);\n    t = t._next;\n  }\n  --frame;\n}\n\nfunction wake() {\n  clockNow = (clockLast = clock.now()) + clockSkew;\n  frame = timeout = 0;\n  try {\n    timerFlush();\n  } finally {\n    frame = 0;\n    nap();\n    clockNow = 0;\n  }\n}\n\nfunction poke() {\n  var now = clock.now(), delay = now - clockLast;\n  if (delay > pokeDelay) clockSkew -= delay, clockLast = now;\n}\n\nfunction nap() {\n  var t0, t1 = taskHead, t2, time = Infinity;\n  while (t1) {\n    if (t1._call) {\n      if (time > t1._time) time = t1._time;\n      t0 = t1, t1 = t1._next;\n    } else {\n      t2 = t1._next, t1._next = null;\n      t1 = t0 ? t0._next = t2 : taskHead = t2;\n    }\n  }\n  taskTail = t0;\n  sleep(time);\n}\n\nfunction sleep(time) {\n  if (frame) return; // Soonest alarm already set, or will be.\n  if (timeout) timeout = clearTimeout(timeout);\n  var delay = time - clockNow; // Strictly less than if we recomputed clockNow.\n  if (delay > 24) {\n    if (time < Infinity) timeout = setTimeout(wake, time - clock.now() - clockSkew);\n    if (interval) interval = clearInterval(interval);\n  } else {\n    if (!interval) clockLast = clock.now(), interval = setInterval(poke, pokeDelay);\n    frame = 1, setFrame(wake);\n  }\n}\n", "import {Timer} from \"./timer.js\";\n\nexport default function(callback, delay, time) {\n  var t = new Timer;\n  delay = delay == null ? 0 : +delay;\n  t.restart(elapsed => {\n    t.stop();\n    callback(elapsed + delay);\n  }, delay, time);\n  return t;\n}\n", "import {dispatch} from \"d3-dispatch\";\nimport {timer, timeout} from \"d3-timer\";\n\nvar emptyOn = dispatch(\"start\", \"end\", \"cancel\", \"interrupt\");\nvar emptyTween = [];\n\nexport var CREATED = 0;\nexport var SCHEDULED = 1;\nexport var STARTING = 2;\nexport var STARTED = 3;\nexport var RUNNING = 4;\nexport var ENDING = 5;\nexport var ENDED = 6;\n\nexport default function(node, name, id, index, group, timing) {\n  var schedules = node.__transition;\n  if (!schedules) node.__transition = {};\n  else if (id in schedules) return;\n  create(node, id, {\n    name: name,\n    index: index, // For context during callback.\n    group: group, // For context during callback.\n    on: emptyOn,\n    tween: emptyTween,\n    time: timing.time,\n    delay: timing.delay,\n    duration: timing.duration,\n    ease: timing.ease,\n    timer: null,\n    state: CREATED\n  });\n}\n\nexport function init(node, id) {\n  var schedule = get(node, id);\n  if (schedule.state > CREATED) throw new Error(\"too late; already scheduled\");\n  return schedule;\n}\n\nexport function set(node, id) {\n  var schedule = get(node, id);\n  if (schedule.state > STARTED) throw new Error(\"too late; already running\");\n  return schedule;\n}\n\nexport function get(node, id) {\n  var schedule = node.__transition;\n  if (!schedule || !(schedule = schedule[id])) throw new Error(\"transition not found\");\n  return schedule;\n}\n\nfunction create(node, id, self) {\n  var schedules = node.__transition,\n      tween;\n\n  // Initialize the self timer when the transition is created.\n  // Note the actual delay is not known until the first callback!\n  schedules[id] = self;\n  self.timer = timer(schedule, 0, self.time);\n\n  function schedule(elapsed) {\n    self.state = SCHEDULED;\n    self.timer.restart(start, self.delay, self.time);\n\n    // If the elapsed delay is less than our first sleep, start immediately.\n    if (self.delay <= elapsed) start(elapsed - self.delay);\n  }\n\n  function start(elapsed) {\n    var i, j, n, o;\n\n    // If the state is not SCHEDULED, then we previously errored on start.\n    if (self.state !== SCHEDULED) return stop();\n\n    for (i in schedules) {\n      o = schedules[i];\n      if (o.name !== self.name) continue;\n\n      // While this element already has a starting transition during this frame,\n      // defer starting an interrupting transition until that transition has a\n      // chance to tick (and possibly end); see d3/d3-transition#54!\n      if (o.state === STARTED) return timeout(start);\n\n      // Interrupt the active transition, if any.\n      if (o.state === RUNNING) {\n        o.state = ENDED;\n        o.timer.stop();\n        o.on.call(\"interrupt\", node, node.__data__, o.index, o.group);\n        delete schedules[i];\n      }\n\n      // Cancel any pre-empted transitions.\n      else if (+i < id) {\n        o.state = ENDED;\n        o.timer.stop();\n        o.on.call(\"cancel\", node, node.__data__, o.index, o.group);\n        delete schedules[i];\n      }\n    }\n\n    // Defer the first tick to end of the current frame; see d3/d3#1576.\n    // Note the transition may be canceled after start and before the first tick!\n    // Note this must be scheduled before the start event; see d3/d3-transition#16!\n    // Assuming this is successful, subsequent callbacks go straight to tick.\n    timeout(function() {\n      if (self.state === STARTED) {\n        self.state = RUNNING;\n        self.timer.restart(tick, self.delay, self.time);\n        tick(elapsed);\n      }\n    });\n\n    // Dispatch the start event.\n    // Note this must be done before the tween are initialized.\n    self.state = STARTING;\n    self.on.call(\"start\", node, node.__data__, self.index, self.group);\n    if (self.state !== STARTING) return; // interrupted\n    self.state = STARTED;\n\n    // Initialize the tween, deleting null tween.\n    tween = new Array(n = self.tween.length);\n    for (i = 0, j = -1; i < n; ++i) {\n      if (o = self.tween[i].value.call(node, node.__data__, self.index, self.group)) {\n        tween[++j] = o;\n      }\n    }\n    tween.length = j + 1;\n  }\n\n  function tick(elapsed) {\n    var t = elapsed < self.duration ? self.ease.call(null, elapsed / self.duration) : (self.timer.restart(stop), self.state = ENDING, 1),\n        i = -1,\n        n = tween.length;\n\n    while (++i < n) {\n      tween[i].call(node, t);\n    }\n\n    // Dispatch the end event.\n    if (self.state === ENDING) {\n      self.on.call(\"end\", node, node.__data__, self.index, self.group);\n      stop();\n    }\n  }\n\n  function stop() {\n    self.state = ENDED;\n    self.timer.stop();\n    delete schedules[id];\n    for (var i in schedules) return; // eslint-disable-line no-unused-vars\n    delete node.__transition;\n  }\n}\n", "import {STARTING, ENDING, ENDED} from \"./transition/schedule.js\";\n\nexport default function(node, name) {\n  var schedules = node.__transition,\n      schedule,\n      active,\n      empty = true,\n      i;\n\n  if (!schedules) return;\n\n  name = name == null ? null : name + \"\";\n\n  for (i in schedules) {\n    if ((schedule = schedules[i]).name !== name) { empty = false; continue; }\n    active = schedule.state > STARTING && schedule.state < ENDING;\n    schedule.state = ENDED;\n    schedule.timer.stop();\n    schedule.on.call(active ? \"interrupt\" : \"cancel\", node, node.__data__, schedule.index, schedule.group);\n    delete schedules[i];\n  }\n\n  if (empty) delete node.__transition;\n}\n", "import interrupt from \"../interrupt.js\";\n\nexport default function(name) {\n  return this.each(function() {\n    interrupt(this, name);\n  });\n}\n", "import {get, set} from \"./schedule.js\";\n\nfunction tweenRemove(id, name) {\n  var tween0, tween1;\n  return function() {\n    var schedule = set(this, id),\n        tween = schedule.tween;\n\n    // If this node shared tween with the previous node,\n    // just assign the updated shared tween and we\u2019re done!\n    // Otherwise, copy-on-write.\n    if (tween !== tween0) {\n      tween1 = tween0 = tween;\n      for (var i = 0, n = tween1.length; i < n; ++i) {\n        if (tween1[i].name === name) {\n          tween1 = tween1.slice();\n          tween1.splice(i, 1);\n          break;\n        }\n      }\n    }\n\n    schedule.tween = tween1;\n  };\n}\n\nfunction tweenFunction(id, name, value) {\n  var tween0, tween1;\n  if (typeof value !== \"function\") throw new Error;\n  return function() {\n    var schedule = set(this, id),\n        tween = schedule.tween;\n\n    // If this node shared tween with the previous node,\n    // just assign the updated shared tween and we\u2019re done!\n    // Otherwise, copy-on-write.\n    if (tween !== tween0) {\n      tween1 = (tween0 = tween).slice();\n      for (var t = {name: name, value: value}, i = 0, n = tween1.length; i < n; ++i) {\n        if (tween1[i].name === name) {\n          tween1[i] = t;\n          break;\n        }\n      }\n      if (i === n) tween1.push(t);\n    }\n\n    schedule.tween = tween1;\n  };\n}\n\nexport default function(name, value) {\n  var id = this._id;\n\n  name += \"\";\n\n  if (arguments.length < 2) {\n    var tween = get(this.node(), id).tween;\n    for (var i = 0, n = tween.length, t; i < n; ++i) {\n      if ((t = tween[i]).name === name) {\n        return t.value;\n      }\n    }\n    return null;\n  }\n\n  return this.each((value == null ? tweenRemove : tweenFunction)(id, name, value));\n}\n\nexport function tweenValue(transition, name, value) {\n  var id = transition._id;\n\n  transition.each(function() {\n    var schedule = set(this, id);\n    (schedule.value || (schedule.value = {}))[name] = value.apply(this, arguments);\n  });\n\n  return function(node) {\n    return get(node, id).value[name];\n  };\n}\n", "import {color} from \"d3-color\";\nimport {interpolateNumber, interpolateRgb, interpolateString} from \"d3-interpolate\";\n\nexport default function(a, b) {\n  var c;\n  return (typeof b === \"number\" ? interpolateNumber\n      : b instanceof color ? interpolateRgb\n      : (c = color(b)) ? (b = c, interpolateRgb)\n      : interpolateString)(a, b);\n}\n", "import {interpolateTransformSvg as interpolateTransform} from \"d3-interpolate\";\nimport {namespace} from \"d3-selection\";\nimport {tweenValue} from \"./tween.js\";\nimport interpolate from \"./interpolate.js\";\n\nfunction attrRemove(name) {\n  return function() {\n    this.removeAttribute(name);\n  };\n}\n\nfunction attrRemoveNS(fullname) {\n  return function() {\n    this.removeAttributeNS(fullname.space, fullname.local);\n  };\n}\n\nfunction attrConstant(name, interpolate, value1) {\n  var string00,\n      string1 = value1 + \"\",\n      interpolate0;\n  return function() {\n    var string0 = this.getAttribute(name);\n    return string0 === string1 ? null\n        : string0 === string00 ? interpolate0\n        : interpolate0 = interpolate(string00 = string0, value1);\n  };\n}\n\nfunction attrConstantNS(fullname, interpolate, value1) {\n  var string00,\n      string1 = value1 + \"\",\n      interpolate0;\n  return function() {\n    var string0 = this.getAttributeNS(fullname.space, fullname.local);\n    return string0 === string1 ? null\n        : string0 === string00 ? interpolate0\n        : interpolate0 = interpolate(string00 = string0, value1);\n  };\n}\n\nfunction attrFunction(name, interpolate, value) {\n  var string00,\n      string10,\n      interpolate0;\n  return function() {\n    var string0, value1 = value(this), string1;\n    if (value1 == null) return void this.removeAttribute(name);\n    string0 = this.getAttribute(name);\n    string1 = value1 + \"\";\n    return string0 === string1 ? null\n        : string0 === string00 && string1 === string10 ? interpolate0\n        : (string10 = string1, interpolate0 = interpolate(string00 = string0, value1));\n  };\n}\n\nfunction attrFunctionNS(fullname, interpolate, value) {\n  var string00,\n      string10,\n      interpolate0;\n  return function() {\n    var string0, value1 = value(this), string1;\n    if (value1 == null) return void this.removeAttributeNS(fullname.space, fullname.local);\n    string0 = this.getAttributeNS(fullname.space, fullname.local);\n    string1 = value1 + \"\";\n    return string0 === string1 ? null\n        : string0 === string00 && string1 === string10 ? interpolate0\n        : (string10 = string1, interpolate0 = interpolate(string00 = string0, value1));\n  };\n}\n\nexport default function(name, value) {\n  var fullname = namespace(name), i = fullname === \"transform\" ? interpolateTransform : interpolate;\n  return this.attrTween(name, typeof value === \"function\"\n      ? (fullname.local ? attrFunctionNS : attrFunction)(fullname, i, tweenValue(this, \"attr.\" + name, value))\n      : value == null ? (fullname.local ? attrRemoveNS : attrRemove)(fullname)\n      : (fullname.local ? attrConstantNS : attrConstant)(fullname, i, value));\n}\n", "import {namespace} from \"d3-selection\";\n\nfunction attrInterpolate(name, i) {\n  return function(t) {\n    this.setAttribute(name, i.call(this, t));\n  };\n}\n\nfunction attrInterpolateNS(fullname, i) {\n  return function(t) {\n    this.setAttributeNS(fullname.space, fullname.local, i.call(this, t));\n  };\n}\n\nfunction attrTweenNS(fullname, value) {\n  var t0, i0;\n  function tween() {\n    var i = value.apply(this, arguments);\n    if (i !== i0) t0 = (i0 = i) && attrInterpolateNS(fullname, i);\n    return t0;\n  }\n  tween._value = value;\n  return tween;\n}\n\nfunction attrTween(name, value) {\n  var t0, i0;\n  function tween() {\n    var i = value.apply(this, arguments);\n    if (i !== i0) t0 = (i0 = i) && attrInterpolate(name, i);\n    return t0;\n  }\n  tween._value = value;\n  return tween;\n}\n\nexport default function(name, value) {\n  var key = \"attr.\" + name;\n  if (arguments.length < 2) return (key = this.tween(key)) && key._value;\n  if (value == null) return this.tween(key, null);\n  if (typeof value !== \"function\") throw new Error;\n  var fullname = namespace(name);\n  return this.tween(key, (fullname.local ? attrTweenNS : attrTween)(fullname, value));\n}\n", "import {get, init} from \"./schedule.js\";\n\nfunction delayFunction(id, value) {\n  return function() {\n    init(this, id).delay = +value.apply(this, arguments);\n  };\n}\n\nfunction delayConstant(id, value) {\n  return value = +value, function() {\n    init(this, id).delay = value;\n  };\n}\n\nexport default function(value) {\n  var id = this._id;\n\n  return arguments.length\n      ? this.each((typeof value === \"function\"\n          ? delayFunction\n          : delayConstant)(id, value))\n      : get(this.node(), id).delay;\n}\n", "import {get, set} from \"./schedule.js\";\n\nfunction durationFunction(id, value) {\n  return function() {\n    set(this, id).duration = +value.apply(this, arguments);\n  };\n}\n\nfunction durationConstant(id, value) {\n  return value = +value, function() {\n    set(this, id).duration = value;\n  };\n}\n\nexport default function(value) {\n  var id = this._id;\n\n  return arguments.length\n      ? this.each((typeof value === \"function\"\n          ? durationFunction\n          : durationConstant)(id, value))\n      : get(this.node(), id).duration;\n}\n", "import {get, set} from \"./schedule.js\";\n\nfunction easeConstant(id, value) {\n  if (typeof value !== \"function\") throw new Error;\n  return function() {\n    set(this, id).ease = value;\n  };\n}\n\nexport default function(value) {\n  var id = this._id;\n\n  return arguments.length\n      ? this.each(easeConstant(id, value))\n      : get(this.node(), id).ease;\n}\n", "import {set} from \"./schedule.js\";\n\nfunction easeVarying(id, value) {\n  return function() {\n    var v = value.apply(this, arguments);\n    if (typeof v !== \"function\") throw new Error;\n    set(this, id).ease = v;\n  };\n}\n\nexport default function(value) {\n  if (typeof value !== \"function\") throw new Error;\n  return this.each(easeVarying(this._id, value));\n}\n", "import {matcher} from \"d3-selection\";\nimport {Transition} from \"./index.js\";\n\nexport default function(match) {\n  if (typeof match !== \"function\") match = matcher(match);\n\n  for (var groups = this._groups, m = groups.length, subgroups = new Array(m), j = 0; j < m; ++j) {\n    for (var group = groups[j], n = group.length, subgroup = subgroups[j] = [], node, i = 0; i < n; ++i) {\n      if ((node = group[i]) && match.call(node, node.__data__, i, group)) {\n        subgroup.push(node);\n      }\n    }\n  }\n\n  return new Transition(subgroups, this._parents, this._name, this._id);\n}\n", "import {Transition} from \"./index.js\";\n\nexport default function(transition) {\n  if (transition._id !== this._id) throw new Error;\n\n  for (var groups0 = this._groups, groups1 = transition._groups, m0 = groups0.length, m1 = groups1.length, m = Math.min(m0, m1), merges = new Array(m0), j = 0; j < m; ++j) {\n    for (var group0 = groups0[j], group1 = groups1[j], n = group0.length, merge = merges[j] = new Array(n), node, i = 0; i < n; ++i) {\n      if (node = group0[i] || group1[i]) {\n        merge[i] = node;\n      }\n    }\n  }\n\n  for (; j < m0; ++j) {\n    merges[j] = groups0[j];\n  }\n\n  return new Transition(merges, this._parents, this._name, this._id);\n}\n", "import {get, set, init} from \"./schedule.js\";\n\nfunction start(name) {\n  return (name + \"\").trim().split(/^|\\s+/).every(function(t) {\n    var i = t.indexOf(\".\");\n    if (i >= 0) t = t.slice(0, i);\n    return !t || t === \"start\";\n  });\n}\n\nfunction onFunction(id, name, listener) {\n  var on0, on1, sit = start(name) ? init : set;\n  return function() {\n    var schedule = sit(this, id),\n        on = schedule.on;\n\n    // If this node shared a dispatch with the previous node,\n    // just assign the updated shared dispatch and we\u2019re done!\n    // Otherwise, copy-on-write.\n    if (on !== on0) (on1 = (on0 = on).copy()).on(name, listener);\n\n    schedule.on = on1;\n  };\n}\n\nexport default function(name, listener) {\n  var id = this._id;\n\n  return arguments.length < 2\n      ? get(this.node(), id).on.on(name)\n      : this.each(onFunction(id, name, listener));\n}\n", "function removeFunction(id) {\n  return function() {\n    var parent = this.parentNode;\n    for (var i in this.__transition) if (+i !== id) return;\n    if (parent) parent.removeChild(this);\n  };\n}\n\nexport default function() {\n  return this.on(\"end.remove\", removeFunction(this._id));\n}\n", "import {selector} from \"d3-selection\";\nimport {Transition} from \"./index.js\";\nimport schedule, {get} from \"./schedule.js\";\n\nexport default function(select) {\n  var name = this._name,\n      id = this._id;\n\n  if (typeof select !== \"function\") select = selector(select);\n\n  for (var groups = this._groups, m = groups.length, subgroups = new Array(m), j = 0; j < m; ++j) {\n    for (var group = groups[j], n = group.length, subgroup = subgroups[j] = new Array(n), node, subnode, i = 0; i < n; ++i) {\n      if ((node = group[i]) && (subnode = select.call(node, node.__data__, i, group))) {\n        if (\"__data__\" in node) subnode.__data__ = node.__data__;\n        subgroup[i] = subnode;\n        schedule(subgroup[i], name, id, i, subgroup, get(node, id));\n      }\n    }\n  }\n\n  return new Transition(subgroups, this._parents, name, id);\n}\n", "import {selectorAll} from \"d3-selection\";\nimport {Transition} from \"./index.js\";\nimport schedule, {get} from \"./schedule.js\";\n\nexport default function(select) {\n  var name = this._name,\n      id = this._id;\n\n  if (typeof select !== \"function\") select = selectorAll(select);\n\n  for (var groups = this._groups, m = groups.length, subgroups = [], parents = [], j = 0; j < m; ++j) {\n    for (var group = groups[j], n = group.length, node, i = 0; i < n; ++i) {\n      if (node = group[i]) {\n        for (var children = select.call(node, node.__data__, i, group), child, inherit = get(node, id), k = 0, l = children.length; k < l; ++k) {\n          if (child = children[k]) {\n            schedule(child, name, id, k, children, inherit);\n          }\n        }\n        subgroups.push(children);\n        parents.push(node);\n      }\n    }\n  }\n\n  return new Transition(subgroups, parents, name, id);\n}\n", "import {selection} from \"d3-selection\";\n\nvar Selection = selection.prototype.constructor;\n\nexport default function() {\n  return new Selection(this._groups, this._parents);\n}\n", "import {interpolateTransformCss as interpolateTransform} from \"d3-interpolate\";\nimport {style} from \"d3-selection\";\nimport {set} from \"./schedule.js\";\nimport {tweenValue} from \"./tween.js\";\nimport interpolate from \"./interpolate.js\";\n\nfunction styleNull(name, interpolate) {\n  var string00,\n      string10,\n      interpolate0;\n  return function() {\n    var string0 = style(this, name),\n        string1 = (this.style.removeProperty(name), style(this, name));\n    return string0 === string1 ? null\n        : string0 === string00 && string1 === string10 ? interpolate0\n        : interpolate0 = interpolate(string00 = string0, string10 = string1);\n  };\n}\n\nfunction styleRemove(name) {\n  return function() {\n    this.style.removeProperty(name);\n  };\n}\n\nfunction styleConstant(name, interpolate, value1) {\n  var string00,\n      string1 = value1 + \"\",\n      interpolate0;\n  return function() {\n    var string0 = style(this, name);\n    return string0 === string1 ? null\n        : string0 === string00 ? interpolate0\n        : interpolate0 = interpolate(string00 = string0, value1);\n  };\n}\n\nfunction styleFunction(name, interpolate, value) {\n  var string00,\n      string10,\n      interpolate0;\n  return function() {\n    var string0 = style(this, name),\n        value1 = value(this),\n        string1 = value1 + \"\";\n    if (value1 == null) string1 = value1 = (this.style.removeProperty(name), style(this, name));\n    return string0 === string1 ? null\n        : string0 === string00 && string1 === string10 ? interpolate0\n        : (string10 = string1, interpolate0 = interpolate(string00 = string0, value1));\n  };\n}\n\nfunction styleMaybeRemove(id, name) {\n  var on0, on1, listener0, key = \"style.\" + name, event = \"end.\" + key, remove;\n  return function() {\n    var schedule = set(this, id),\n        on = schedule.on,\n        listener = schedule.value[key] == null ? remove || (remove = styleRemove(name)) : undefined;\n\n    // If this node shared a dispatch with the previous node,\n    // just assign the updated shared dispatch and we\u2019re done!\n    // Otherwise, copy-on-write.\n    if (on !== on0 || listener0 !== listener) (on1 = (on0 = on).copy()).on(event, listener0 = listener);\n\n    schedule.on = on1;\n  };\n}\n\nexport default function(name, value, priority) {\n  var i = (name += \"\") === \"transform\" ? interpolateTransform : interpolate;\n  return value == null ? this\n      .styleTween(name, styleNull(name, i))\n      .on(\"end.style.\" + name, styleRemove(name))\n    : typeof value === \"function\" ? this\n      .styleTween(name, styleFunction(name, i, tweenValue(this, \"style.\" + name, value)))\n      .each(styleMaybeRemove(this._id, name))\n    : this\n      .styleTween(name, styleConstant(name, i, value), priority)\n      .on(\"end.style.\" + name, null);\n}\n", "function styleInterpolate(name, i, priority) {\n  return function(t) {\n    this.style.setProperty(name, i.call(this, t), priority);\n  };\n}\n\nfunction styleTween(name, value, priority) {\n  var t, i0;\n  function tween() {\n    var i = value.apply(this, arguments);\n    if (i !== i0) t = (i0 = i) && styleInterpolate(name, i, priority);\n    return t;\n  }\n  tween._value = value;\n  return tween;\n}\n\nexport default function(name, value, priority) {\n  var key = \"style.\" + (name += \"\");\n  if (arguments.length < 2) return (key = this.tween(key)) && key._value;\n  if (value == null) return this.tween(key, null);\n  if (typeof value !== \"function\") throw new Error;\n  return this.tween(key, styleTween(name, value, priority == null ? \"\" : priority));\n}\n", "import {tweenValue} from \"./tween.js\";\n\nfunction textConstant(value) {\n  return function() {\n    this.textContent = value;\n  };\n}\n\nfunction textFunction(value) {\n  return function() {\n    var value1 = value(this);\n    this.textContent = value1 == null ? \"\" : value1;\n  };\n}\n\nexport default function(value) {\n  return this.tween(\"text\", typeof value === \"function\"\n      ? textFunction(tweenValue(this, \"text\", value))\n      : textConstant(value == null ? \"\" : value + \"\"));\n}\n", "function textInterpolate(i) {\n  return function(t) {\n    this.textContent = i.call(this, t);\n  };\n}\n\nfunction textTween(value) {\n  var t0, i0;\n  function tween() {\n    var i = value.apply(this, arguments);\n    if (i !== i0) t0 = (i0 = i) && textInterpolate(i);\n    return t0;\n  }\n  tween._value = value;\n  return tween;\n}\n\nexport default function(value) {\n  var key = \"text\";\n  if (arguments.length < 1) return (key = this.tween(key)) && key._value;\n  if (value == null) return this.tween(key, null);\n  if (typeof value !== \"function\") throw new Error;\n  return this.tween(key, textTween(value));\n}\n", "import {Transition, newId} from \"./index.js\";\nimport schedule, {get} from \"./schedule.js\";\n\nexport default function() {\n  var name = this._name,\n      id0 = this._id,\n      id1 = newId();\n\n  for (var groups = this._groups, m = groups.length, j = 0; j < m; ++j) {\n    for (var group = groups[j], n = group.length, node, i = 0; i < n; ++i) {\n      if (node = group[i]) {\n        var inherit = get(node, id0);\n        schedule(node, name, id1, i, group, {\n          time: inherit.time + inherit.delay + inherit.duration,\n          delay: 0,\n          duration: inherit.duration,\n          ease: inherit.ease\n        });\n      }\n    }\n  }\n\n  return new Transition(groups, this._parents, name, id1);\n}\n", "import {set} from \"./schedule.js\";\n\nexport default function() {\n  var on0, on1, that = this, id = that._id, size = that.size();\n  return new Promise(function(resolve, reject) {\n    var cancel = {value: reject},\n        end = {value: function() { if (--size === 0) resolve(); }};\n\n    that.each(function() {\n      var schedule = set(this, id),\n          on = schedule.on;\n\n      // If this node shared a dispatch with the previous node,\n      // just assign the updated shared dispatch and we\u2019re done!\n      // Otherwise, copy-on-write.\n      if (on !== on0) {\n        on1 = (on0 = on).copy();\n        on1._.cancel.push(cancel);\n        on1._.interrupt.push(cancel);\n        on1._.end.push(end);\n      }\n\n      schedule.on = on1;\n    });\n\n    // The selection was empty, resolve end immediately\n    if (size === 0) resolve();\n  });\n}\n", "import {selection} from \"d3-selection\";\nimport transition_attr from \"./attr.js\";\nimport transition_attrTween from \"./attrTween.js\";\nimport transition_delay from \"./delay.js\";\nimport transition_duration from \"./duration.js\";\nimport transition_ease from \"./ease.js\";\nimport transition_easeVarying from \"./easeVarying.js\";\nimport transition_filter from \"./filter.js\";\nimport transition_merge from \"./merge.js\";\nimport transition_on from \"./on.js\";\nimport transition_remove from \"./remove.js\";\nimport transition_select from \"./select.js\";\nimport transition_selectAll from \"./selectAll.js\";\nimport transition_selection from \"./selection.js\";\nimport transition_style from \"./style.js\";\nimport transition_styleTween from \"./styleTween.js\";\nimport transition_text from \"./text.js\";\nimport transition_textTween from \"./textTween.js\";\nimport transition_transition from \"./transition.js\";\nimport transition_tween from \"./tween.js\";\nimport transition_end from \"./end.js\";\n\nvar id = 0;\n\nexport function Transition(groups, parents, name, id) {\n  this._groups = groups;\n  this._parents = parents;\n  this._name = name;\n  this._id = id;\n}\n\nexport default function transition(name) {\n  return selection().transition(name);\n}\n\nexport function newId() {\n  return ++id;\n}\n\nvar selection_prototype = selection.prototype;\n\nTransition.prototype = transition.prototype = {\n  constructor: Transition,\n  select: transition_select,\n  selectAll: transition_selectAll,\n  selectChild: selection_prototype.selectChild,\n  selectChildren: selection_prototype.selectChildren,\n  filter: transition_filter,\n  merge: transition_merge,\n  selection: transition_selection,\n  transition: transition_transition,\n  call: selection_prototype.call,\n  nodes: selection_prototype.nodes,\n  node: selection_prototype.node,\n  size: selection_prototype.size,\n  empty: selection_prototype.empty,\n  each: selection_prototype.each,\n  on: transition_on,\n  attr: transition_attr,\n  attrTween: transition_attrTween,\n  style: transition_style,\n  styleTween: transition_styleTween,\n  text: transition_text,\n  textTween: transition_textTween,\n  remove: transition_remove,\n  tween: transition_tween,\n  delay: transition_delay,\n  duration: transition_duration,\n  ease: transition_ease,\n  easeVarying: transition_easeVarying,\n  end: transition_end,\n  [Symbol.iterator]: selection_prototype[Symbol.iterator]\n};\n", "export function cubicIn(t) {\n  return t * t * t;\n}\n\nexport function cubicOut(t) {\n  return --t * t * t + 1;\n}\n\nexport function cubicInOut(t) {\n  return ((t *= 2) <= 1 ? t * t * t : (t -= 2) * t * t + 2) / 2;\n}\n", "import {Transition, newId} from \"../transition/index.js\";\nimport schedule from \"../transition/schedule.js\";\nimport {easeCubicInOut} from \"d3-ease\";\nimport {now} from \"d3-timer\";\n\nvar defaultTiming = {\n  time: null, // Set on use.\n  delay: 0,\n  duration: 250,\n  ease: easeCubicInOut\n};\n\nfunction inherit(node, id) {\n  var timing;\n  while (!(timing = node.__transition) || !(timing = timing[id])) {\n    if (!(node = node.parentNode)) {\n      throw new Error(`transition ${id} not found`);\n    }\n  }\n  return timing;\n}\n\nexport default function(name) {\n  var id,\n      timing;\n\n  if (name instanceof Transition) {\n    id = name._id, name = name._name;\n  } else {\n    id = newId(), (timing = defaultTiming).time = now(), name = name == null ? null : name + \"\";\n  }\n\n  for (var groups = this._groups, m = groups.length, j = 0; j < m; ++j) {\n    for (var group = groups[j], n = group.length, node, i = 0; i < n; ++i) {\n      if (node = group[i]) {\n        schedule(node, name, id, i, group, timing || inherit(node, id));\n      }\n    }\n  }\n\n  return new Transition(groups, this._parents, name, id);\n}\n", "import {selection} from \"d3-selection\";\nimport selection_interrupt from \"./interrupt.js\";\nimport selection_transition from \"./transition.js\";\n\nselection.prototype.interrupt = selection_interrupt;\nselection.prototype.transition = selection_transition;\n", "import {dispatch} from \"d3-dispatch\";\nimport {dragDisable, dragEnable} from \"d3-drag\";\nimport {interpolate} from \"d3-interpolate\";\nimport {pointer, select} from \"d3-selection\";\nimport {interrupt} from \"d3-transition\";\nimport constant from \"./constant.js\";\nimport BrushEvent from \"./event.js\";\nimport noevent, {nopropagation} from \"./noevent.js\";\n\nvar MODE_DRAG = {name: \"drag\"},\n    MODE_SPACE = {name: \"space\"},\n    MODE_HANDLE = {name: \"handle\"},\n    MODE_CENTER = {name: \"center\"};\n\nconst {abs, max, min} = Math;\n\nfunction number1(e) {\n  return [+e[0], +e[1]];\n}\n\nfunction number2(e) {\n  return [number1(e[0]), number1(e[1])];\n}\n\nvar X = {\n  name: \"x\",\n  handles: [\"w\", \"e\"].map(type),\n  input: function(x, e) { return x == null ? null : [[+x[0], e[0][1]], [+x[1], e[1][1]]]; },\n  output: function(xy) { return xy && [xy[0][0], xy[1][0]]; }\n};\n\nvar Y = {\n  name: \"y\",\n  handles: [\"n\", \"s\"].map(type),\n  input: function(y, e) { return y == null ? null : [[e[0][0], +y[0]], [e[1][0], +y[1]]]; },\n  output: function(xy) { return xy && [xy[0][1], xy[1][1]]; }\n};\n\nvar XY = {\n  name: \"xy\",\n  handles: [\"n\", \"w\", \"e\", \"s\", \"nw\", \"ne\", \"sw\", \"se\"].map(type),\n  input: function(xy) { return xy == null ? null : number2(xy); },\n  output: function(xy) { return xy; }\n};\n\nvar cursors = {\n  overlay: \"crosshair\",\n  selection: \"move\",\n  n: \"ns-resize\",\n  e: \"ew-resize\",\n  s: \"ns-resize\",\n  w: \"ew-resize\",\n  nw: \"nwse-resize\",\n  ne: \"nesw-resize\",\n  se: \"nwse-resize\",\n  sw: \"nesw-resize\"\n};\n\nvar flipX = {\n  e: \"w\",\n  w: \"e\",\n  nw: \"ne\",\n  ne: \"nw\",\n  se: \"sw\",\n  sw: \"se\"\n};\n\nvar flipY = {\n  n: \"s\",\n  s: \"n\",\n  nw: \"sw\",\n  ne: \"se\",\n  se: \"ne\",\n  sw: \"nw\"\n};\n\nvar signsX = {\n  overlay: +1,\n  selection: +1,\n  n: null,\n  e: +1,\n  s: null,\n  w: -1,\n  nw: -1,\n  ne: +1,\n  se: +1,\n  sw: -1\n};\n\nvar signsY = {\n  overlay: +1,\n  selection: +1,\n  n: -1,\n  e: null,\n  s: +1,\n  w: null,\n  nw: -1,\n  ne: -1,\n  se: +1,\n  sw: +1\n};\n\nfunction type(t) {\n  return {type: t};\n}\n\n// Ignore right-click, since that should open the context menu.\nfunction defaultFilter(event) {\n  return !event.ctrlKey && !event.button;\n}\n\nfunction defaultExtent() {\n  var svg = this.ownerSVGElement || this;\n  if (svg.hasAttribute(\"viewBox\")) {\n    svg = svg.viewBox.baseVal;\n    return [[svg.x, svg.y], [svg.x + svg.width, svg.y + svg.height]];\n  }\n  return [[0, 0], [svg.width.baseVal.value, svg.height.baseVal.value]];\n}\n\nfunction defaultTouchable() {\n  return navigator.maxTouchPoints || (\"ontouchstart\" in this);\n}\n\n// Like d3.local, but with the name \u201C__brush\u201D rather than auto-generated.\nfunction local(node) {\n  while (!node.__brush) if (!(node = node.parentNode)) return;\n  return node.__brush;\n}\n\nfunction empty(extent) {\n  return extent[0][0] === extent[1][0]\n      || extent[0][1] === extent[1][1];\n}\n\nexport function brushSelection(node) {\n  var state = node.__brush;\n  return state ? state.dim.output(state.selection) : null;\n}\n\nexport function brushX() {\n  return brush(X);\n}\n\nexport function brushY() {\n  return brush(Y);\n}\n\nexport default function() {\n  return brush(XY);\n}\n\nfunction brush(dim) {\n  var extent = defaultExtent,\n      filter = defaultFilter,\n      touchable = defaultTouchable,\n      keys = true,\n      listeners = dispatch(\"start\", \"brush\", \"end\"),\n      handleSize = 6,\n      touchending;\n\n  function brush(group) {\n    var overlay = group\n        .property(\"__brush\", initialize)\n      .selectAll(\".overlay\")\n      .data([type(\"overlay\")]);\n\n    overlay.enter().append(\"rect\")\n        .attr(\"class\", \"overlay\")\n        .attr(\"pointer-events\", \"all\")\n        .attr(\"cursor\", cursors.overlay)\n      .merge(overlay)\n        .each(function() {\n          var extent = local(this).extent;\n          select(this)\n              .attr(\"x\", extent[0][0])\n              .attr(\"y\", extent[0][1])\n              .attr(\"width\", extent[1][0] - extent[0][0])\n              .attr(\"height\", extent[1][1] - extent[0][1]);\n        });\n\n    group.selectAll(\".selection\")\n      .data([type(\"selection\")])\n      .enter().append(\"rect\")\n        .attr(\"class\", \"selection\")\n        .attr(\"cursor\", cursors.selection)\n        .attr(\"fill\", \"#777\")\n        .attr(\"fill-opacity\", 0.3)\n        .attr(\"stroke\", \"#fff\")\n        .attr(\"shape-rendering\", \"crispEdges\");\n\n    var handle = group.selectAll(\".handle\")\n      .data(dim.handles, function(d) { return d.type; });\n\n    handle.exit().remove();\n\n    handle.enter().append(\"rect\")\n        .attr(\"class\", function(d) { return \"handle handle--\" + d.type; })\n        .attr(\"cursor\", function(d) { return cursors[d.type]; });\n\n    group\n        .each(redraw)\n        .attr(\"fill\", \"none\")\n        .attr(\"pointer-events\", \"all\")\n        .on(\"mousedown.brush\", started)\n      .filter(touchable)\n        .on(\"touchstart.brush\", started)\n        .on(\"touchmove.brush\", touchmoved)\n        .on(\"touchend.brush touchcancel.brush\", touchended)\n        .style(\"touch-action\", \"none\")\n        .style(\"-webkit-tap-highlight-color\", \"rgba(0,0,0,0)\");\n  }\n\n  brush.move = function(group, selection, event) {\n    if (group.tween) {\n      group\n          .on(\"start.brush\", function(event) { emitter(this, arguments).beforestart().start(event); })\n          .on(\"interrupt.brush end.brush\", function(event) { emitter(this, arguments).end(event); })\n          .tween(\"brush\", function() {\n            var that = this,\n                state = that.__brush,\n                emit = emitter(that, arguments),\n                selection0 = state.selection,\n                selection1 = dim.input(typeof selection === \"function\" ? selection.apply(this, arguments) : selection, state.extent),\n                i = interpolate(selection0, selection1);\n\n            function tween(t) {\n              state.selection = t === 1 && selection1 === null ? null : i(t);\n              redraw.call(that);\n              emit.brush();\n            }\n\n            return selection0 !== null && selection1 !== null ? tween : tween(1);\n          });\n    } else {\n      group\n          .each(function() {\n            var that = this,\n                args = arguments,\n                state = that.__brush,\n                selection1 = dim.input(typeof selection === \"function\" ? selection.apply(that, args) : selection, state.extent),\n                emit = emitter(that, args).beforestart();\n\n            interrupt(that);\n            state.selection = selection1 === null ? null : selection1;\n            redraw.call(that);\n            emit.start(event).brush(event).end(event);\n          });\n    }\n  };\n\n  brush.clear = function(group, event) {\n    brush.move(group, null, event);\n  };\n\n  function redraw() {\n    var group = select(this),\n        selection = local(this).selection;\n\n    if (selection) {\n      group.selectAll(\".selection\")\n          .style(\"display\", null)\n          .attr(\"x\", selection[0][0])\n          .attr(\"y\", selection[0][1])\n          .attr(\"width\", selection[1][0] - selection[0][0])\n          .attr(\"height\", selection[1][1] - selection[0][1]);\n\n      group.selectAll(\".handle\")\n          .style(\"display\", null)\n          .attr(\"x\", function(d) { return d.type[d.type.length - 1] === \"e\" ? selection[1][0] - handleSize / 2 : selection[0][0] - handleSize / 2; })\n          .attr(\"y\", function(d) { return d.type[0] === \"s\" ? selection[1][1] - handleSize / 2 : selection[0][1] - handleSize / 2; })\n          .attr(\"width\", function(d) { return d.type === \"n\" || d.type === \"s\" ? selection[1][0] - selection[0][0] + handleSize : handleSize; })\n          .attr(\"height\", function(d) { return d.type === \"e\" || d.type === \"w\" ? selection[1][1] - selection[0][1] + handleSize : handleSize; });\n    }\n\n    else {\n      group.selectAll(\".selection,.handle\")\n          .style(\"display\", \"none\")\n          .attr(\"x\", null)\n          .attr(\"y\", null)\n          .attr(\"width\", null)\n          .attr(\"height\", null);\n    }\n  }\n\n  function emitter(that, args, clean) {\n    var emit = that.__brush.emitter;\n    return emit && (!clean || !emit.clean) ? emit : new Emitter(that, args, clean);\n  }\n\n  function Emitter(that, args, clean) {\n    this.that = that;\n    this.args = args;\n    this.state = that.__brush;\n    this.active = 0;\n    this.clean = clean;\n  }\n\n  Emitter.prototype = {\n    beforestart: function() {\n      if (++this.active === 1) this.state.emitter = this, this.starting = true;\n      return this;\n    },\n    start: function(event, mode) {\n      if (this.starting) this.starting = false, this.emit(\"start\", event, mode);\n      else this.emit(\"brush\", event);\n      return this;\n    },\n    brush: function(event, mode) {\n      this.emit(\"brush\", event, mode);\n      return this;\n    },\n    end: function(event, mode) {\n      if (--this.active === 0) delete this.state.emitter, this.emit(\"end\", event, mode);\n      return this;\n    },\n    emit: function(type, event, mode) {\n      var d = select(this.that).datum();\n      listeners.call(\n        type,\n        this.that,\n        new BrushEvent(type, {\n          sourceEvent: event,\n          target: brush,\n          selection: dim.output(this.state.selection),\n          mode,\n          dispatch: listeners\n        }),\n        d\n      );\n    }\n  };\n\n  function started(event) {\n    if (touchending && !event.touches) return;\n    if (!filter.apply(this, arguments)) return;\n\n    var that = this,\n        type = event.target.__data__.type,\n        mode = (keys && event.metaKey ? type = \"overlay\" : type) === \"selection\" ? MODE_DRAG : (keys && event.altKey ? MODE_CENTER : MODE_HANDLE),\n        signX = dim === Y ? null : signsX[type],\n        signY = dim === X ? null : signsY[type],\n        state = local(that),\n        extent = state.extent,\n        selection = state.selection,\n        W = extent[0][0], w0, w1,\n        N = extent[0][1], n0, n1,\n        E = extent[1][0], e0, e1,\n        S = extent[1][1], s0, s1,\n        dx = 0,\n        dy = 0,\n        moving,\n        shifting = signX && signY && keys && event.shiftKey,\n        lockX,\n        lockY,\n        points = Array.from(event.touches || [event], t => {\n          const i = t.identifier;\n          t = pointer(t, that);\n          t.point0 = t.slice();\n          t.identifier = i;\n          return t;\n        });\n\n    interrupt(that);\n    var emit = emitter(that, arguments, true).beforestart();\n\n    if (type === \"overlay\") {\n      if (selection) moving = true;\n      const pts = [points[0], points[1] || points[0]];\n      state.selection = selection = [[\n          w0 = dim === Y ? W : min(pts[0][0], pts[1][0]),\n          n0 = dim === X ? N : min(pts[0][1], pts[1][1])\n        ], [\n          e0 = dim === Y ? E : max(pts[0][0], pts[1][0]),\n          s0 = dim === X ? S : max(pts[0][1], pts[1][1])\n        ]];\n      if (points.length > 1) move(event);\n    } else {\n      w0 = selection[0][0];\n      n0 = selection[0][1];\n      e0 = selection[1][0];\n      s0 = selection[1][1];\n    }\n\n    w1 = w0;\n    n1 = n0;\n    e1 = e0;\n    s1 = s0;\n\n    var group = select(that)\n        .attr(\"pointer-events\", \"none\");\n\n    var overlay = group.selectAll(\".overlay\")\n        .attr(\"cursor\", cursors[type]);\n\n    if (event.touches) {\n      emit.moved = moved;\n      emit.ended = ended;\n    } else {\n      var view = select(event.view)\n          .on(\"mousemove.brush\", moved, true)\n          .on(\"mouseup.brush\", ended, true);\n      if (keys) view\n          .on(\"keydown.brush\", keydowned, true)\n          .on(\"keyup.brush\", keyupped, true)\n\n      dragDisable(event.view);\n    }\n\n    redraw.call(that);\n    emit.start(event, mode.name);\n\n    function moved(event) {\n      for (const p of event.changedTouches || [event]) {\n        for (const d of points)\n          if (d.identifier === p.identifier) d.cur = pointer(p, that);\n      }\n      if (shifting && !lockX && !lockY && points.length === 1) {\n        const point = points[0];\n        if (abs(point.cur[0] - point[0]) > abs(point.cur[1] - point[1]))\n          lockY = true;\n        else\n          lockX = true;\n      }\n      for (const point of points)\n        if (point.cur) point[0] = point.cur[0], point[1] = point.cur[1];\n      moving = true;\n      noevent(event);\n      move(event);\n    }\n\n    function move(event) {\n      const point = points[0], point0 = point.point0;\n      var t;\n\n      dx = point[0] - point0[0];\n      dy = point[1] - point0[1];\n\n      switch (mode) {\n        case MODE_SPACE:\n        case MODE_DRAG: {\n          if (signX) dx = max(W - w0, min(E - e0, dx)), w1 = w0 + dx, e1 = e0 + dx;\n          if (signY) dy = max(N - n0, min(S - s0, dy)), n1 = n0 + dy, s1 = s0 + dy;\n          break;\n        }\n        case MODE_HANDLE: {\n          if (points[1]) {\n            if (signX) w1 = max(W, min(E, points[0][0])), e1 = max(W, min(E, points[1][0])), signX = 1;\n            if (signY) n1 = max(N, min(S, points[0][1])), s1 = max(N, min(S, points[1][1])), signY = 1;\n          } else {\n            if (signX < 0) dx = max(W - w0, min(E - w0, dx)), w1 = w0 + dx, e1 = e0;\n            else if (signX > 0) dx = max(W - e0, min(E - e0, dx)), w1 = w0, e1 = e0 + dx;\n            if (signY < 0) dy = max(N - n0, min(S - n0, dy)), n1 = n0 + dy, s1 = s0;\n            else if (signY > 0) dy = max(N - s0, min(S - s0, dy)), n1 = n0, s1 = s0 + dy;\n          }\n          break;\n        }\n        case MODE_CENTER: {\n          if (signX) w1 = max(W, min(E, w0 - dx * signX)), e1 = max(W, min(E, e0 + dx * signX));\n          if (signY) n1 = max(N, min(S, n0 - dy * signY)), s1 = max(N, min(S, s0 + dy * signY));\n          break;\n        }\n      }\n\n      if (e1 < w1) {\n        signX *= -1;\n        t = w0, w0 = e0, e0 = t;\n        t = w1, w1 = e1, e1 = t;\n        if (type in flipX) overlay.attr(\"cursor\", cursors[type = flipX[type]]);\n      }\n\n      if (s1 < n1) {\n        signY *= -1;\n        t = n0, n0 = s0, s0 = t;\n        t = n1, n1 = s1, s1 = t;\n        if (type in flipY) overlay.attr(\"cursor\", cursors[type = flipY[type]]);\n      }\n\n      if (state.selection) selection = state.selection; // May be set by brush.move!\n      if (lockX) w1 = selection[0][0], e1 = selection[1][0];\n      if (lockY) n1 = selection[0][1], s1 = selection[1][1];\n\n      if (selection[0][0] !== w1\n          || selection[0][1] !== n1\n          || selection[1][0] !== e1\n          || selection[1][1] !== s1) {\n        state.selection = [[w1, n1], [e1, s1]];\n        redraw.call(that);\n        emit.brush(event, mode.name);\n      }\n    }\n\n    function ended(event) {\n      nopropagation(event);\n      if (event.touches) {\n        if (event.touches.length) return;\n        if (touchending) clearTimeout(touchending);\n        touchending = setTimeout(function() { touchending = null; }, 500); // Ghost clicks are delayed!\n      } else {\n        dragEnable(event.view, moving);\n        view.on(\"keydown.brush keyup.brush mousemove.brush mouseup.brush\", null);\n      }\n      group.attr(\"pointer-events\", \"all\");\n      overlay.attr(\"cursor\", cursors.overlay);\n      if (state.selection) selection = state.selection; // May be set by brush.move (on start)!\n      if (empty(selection)) state.selection = null, redraw.call(that);\n      emit.end(event, mode.name);\n    }\n\n    function keydowned(event) {\n      switch (event.keyCode) {\n        case 16: { // SHIFT\n          shifting = signX && signY;\n          break;\n        }\n        case 18: { // ALT\n          if (mode === MODE_HANDLE) {\n            if (signX) e0 = e1 - dx * signX, w0 = w1 + dx * signX;\n            if (signY) s0 = s1 - dy * signY, n0 = n1 + dy * signY;\n            mode = MODE_CENTER;\n            move(event);\n          }\n          break;\n        }\n        case 32: { // SPACE; takes priority over ALT\n          if (mode === MODE_HANDLE || mode === MODE_CENTER) {\n            if (signX < 0) e0 = e1 - dx; else if (signX > 0) w0 = w1 - dx;\n            if (signY < 0) s0 = s1 - dy; else if (signY > 0) n0 = n1 - dy;\n            mode = MODE_SPACE;\n            overlay.attr(\"cursor\", cursors.selection);\n            move(event);\n          }\n          break;\n        }\n        default: return;\n      }\n      noevent(event);\n    }\n\n    function keyupped(event) {\n      switch (event.keyCode) {\n        case 16: { // SHIFT\n          if (shifting) {\n            lockX = lockY = shifting = false;\n            move(event);\n          }\n          break;\n        }\n        case 18: { // ALT\n          if (mode === MODE_CENTER) {\n            if (signX < 0) e0 = e1; else if (signX > 0) w0 = w1;\n            if (signY < 0) s0 = s1; else if (signY > 0) n0 = n1;\n            mode = MODE_HANDLE;\n            move(event);\n          }\n          break;\n        }\n        case 32: { // SPACE\n          if (mode === MODE_SPACE) {\n            if (event.altKey) {\n              if (signX) e0 = e1 - dx * signX, w0 = w1 + dx * signX;\n              if (signY) s0 = s1 - dy * signY, n0 = n1 + dy * signY;\n              mode = MODE_CENTER;\n            } else {\n              if (signX < 0) e0 = e1; else if (signX > 0) w0 = w1;\n              if (signY < 0) s0 = s1; else if (signY > 0) n0 = n1;\n              mode = MODE_HANDLE;\n            }\n            overlay.attr(\"cursor\", cursors[type]);\n            move(event);\n          }\n          break;\n        }\n        default: return;\n      }\n      noevent(event);\n    }\n  }\n\n  function touchmoved(event) {\n    emitter(this, arguments).moved(event);\n  }\n\n  function touchended(event) {\n    emitter(this, arguments).ended(event);\n  }\n\n  function initialize() {\n    var state = this.__brush || {selection: null};\n    state.extent = number2(extent.apply(this, arguments));\n    state.dim = dim;\n    return state;\n  }\n\n  brush.extent = function(_) {\n    return arguments.length ? (extent = typeof _ === \"function\" ? _ : constant(number2(_)), brush) : extent;\n  };\n\n  brush.filter = function(_) {\n    return arguments.length ? (filter = typeof _ === \"function\" ? _ : constant(!!_), brush) : filter;\n  };\n\n  brush.touchable = function(_) {\n    return arguments.length ? (touchable = typeof _ === \"function\" ? _ : constant(!!_), brush) : touchable;\n  };\n\n  brush.handleSize = function(_) {\n    return arguments.length ? (handleSize = +_, brush) : handleSize;\n  };\n\n  brush.keyModifiers = function(_) {\n    return arguments.length ? (keys = !!_, brush) : keys;\n  };\n\n  brush.on = function() {\n    var value = listeners.on.apply(listeners, arguments);\n    return value === listeners ? brush : value;\n  };\n\n  return brush;\n}\n", "const pi = Math.PI,\n    tau = 2 * pi,\n    epsilon = 1e-6,\n    tauEpsilon = tau - epsilon;\n\nfunction append(strings) {\n  this._ += strings[0];\n  for (let i = 1, n = strings.length; i < n; ++i) {\n    this._ += arguments[i] + strings[i];\n  }\n}\n\nfunction appendRound(digits) {\n  let d = Math.floor(digits);\n  if (!(d >= 0)) throw new Error(`invalid digits: ${digits}`);\n  if (d > 15) return append;\n  const k = 10 ** d;\n  return function(strings) {\n    this._ += strings[0];\n    for (let i = 1, n = strings.length; i < n; ++i) {\n      this._ += Math.round(arguments[i] * k) / k + strings[i];\n    }\n  };\n}\n\nexport class Path {\n  constructor(digits) {\n    this._x0 = this._y0 = // start of current subpath\n    this._x1 = this._y1 = null; // end of current subpath\n    this._ = \"\";\n    this._append = digits == null ? append : appendRound(digits);\n  }\n  moveTo(x, y) {\n    this._append`M${this._x0 = this._x1 = +x},${this._y0 = this._y1 = +y}`;\n  }\n  closePath() {\n    if (this._x1 !== null) {\n      this._x1 = this._x0, this._y1 = this._y0;\n      this._append`Z`;\n    }\n  }\n  lineTo(x, y) {\n    this._append`L${this._x1 = +x},${this._y1 = +y}`;\n  }\n  quadraticCurveTo(x1, y1, x, y) {\n    this._append`Q${+x1},${+y1},${this._x1 = +x},${this._y1 = +y}`;\n  }\n  bezierCurveTo(x1, y1, x2, y2, x, y) {\n    this._append`C${+x1},${+y1},${+x2},${+y2},${this._x1 = +x},${this._y1 = +y}`;\n  }\n  arcTo(x1, y1, x2, y2, r) {\n    x1 = +x1, y1 = +y1, x2 = +x2, y2 = +y2, r = +r;\n\n    // Is the radius negative? Error.\n    if (r < 0) throw new Error(`negative radius: ${r}`);\n\n    let x0 = this._x1,\n        y0 = this._y1,\n        x21 = x2 - x1,\n        y21 = y2 - y1,\n        x01 = x0 - x1,\n        y01 = y0 - y1,\n        l01_2 = x01 * x01 + y01 * y01;\n\n    // Is this path empty? Move to (x1,y1).\n    if (this._x1 === null) {\n      this._append`M${this._x1 = x1},${this._y1 = y1}`;\n    }\n\n    // Or, is (x1,y1) coincident with (x0,y0)? Do nothing.\n    else if (!(l01_2 > epsilon));\n\n    // Or, are (x0,y0), (x1,y1) and (x2,y2) collinear?\n    // Equivalently, is (x1,y1) coincident with (x2,y2)?\n    // Or, is the radius zero? Line to (x1,y1).\n    else if (!(Math.abs(y01 * x21 - y21 * x01) > epsilon) || !r) {\n      this._append`L${this._x1 = x1},${this._y1 = y1}`;\n    }\n\n    // Otherwise, draw an arc!\n    else {\n      let x20 = x2 - x0,\n          y20 = y2 - y0,\n          l21_2 = x21 * x21 + y21 * y21,\n          l20_2 = x20 * x20 + y20 * y20,\n          l21 = Math.sqrt(l21_2),\n          l01 = Math.sqrt(l01_2),\n          l = r * Math.tan((pi - Math.acos((l21_2 + l01_2 - l20_2) / (2 * l21 * l01))) / 2),\n          t01 = l / l01,\n          t21 = l / l21;\n\n      // If the start tangent is not coincident with (x0,y0), line to.\n      if (Math.abs(t01 - 1) > epsilon) {\n        this._append`L${x1 + t01 * x01},${y1 + t01 * y01}`;\n      }\n\n      this._append`A${r},${r},0,0,${+(y01 * x20 > x01 * y20)},${this._x1 = x1 + t21 * x21},${this._y1 = y1 + t21 * y21}`;\n    }\n  }\n  arc(x, y, r, a0, a1, ccw) {\n    x = +x, y = +y, r = +r, ccw = !!ccw;\n\n    // Is the radius negative? Error.\n    if (r < 0) throw new Error(`negative radius: ${r}`);\n\n    let dx = r * Math.cos(a0),\n        dy = r * Math.sin(a0),\n        x0 = x + dx,\n        y0 = y + dy,\n        cw = 1 ^ ccw,\n        da = ccw ? a0 - a1 : a1 - a0;\n\n    // Is this path empty? Move to (x0,y0).\n    if (this._x1 === null) {\n      this._append`M${x0},${y0}`;\n    }\n\n    // Or, is (x0,y0) not coincident with the previous point? Line to (x0,y0).\n    else if (Math.abs(this._x1 - x0) > epsilon || Math.abs(this._y1 - y0) > epsilon) {\n      this._append`L${x0},${y0}`;\n    }\n\n    // Is this arc empty? We\u2019re done.\n    if (!r) return;\n\n    // Does the angle go the wrong way? Flip the direction.\n    if (da < 0) da = da % tau + tau;\n\n    // Is this a complete circle? Draw two arcs to complete the circle.\n    if (da > tauEpsilon) {\n      this._append`A${r},${r},0,1,${cw},${x - dx},${y - dy}A${r},${r},0,1,${cw},${this._x1 = x0},${this._y1 = y0}`;\n    }\n\n    // Is this arc non-empty? Draw an arc!\n    else if (da > epsilon) {\n      this._append`A${r},${r},0,${+(da >= pi)},${cw},${this._x1 = x + r * Math.cos(a1)},${this._y1 = y + r * Math.sin(a1)}`;\n    }\n  }\n  rect(x, y, w, h) {\n    this._append`M${this._x0 = this._x1 = +x},${this._y0 = this._y1 = +y}h${w = +w}v${+h}h${-w}Z`;\n  }\n  toString() {\n    return this._;\n  }\n}\n\nexport function path() {\n  return new Path;\n}\n\n// Allow instanceof d3.path\npath.prototype = Path.prototype;\n\nexport function pathRound(digits = 3) {\n  return new Path(+digits);\n}\n", "export default function(x) {\n  return Math.abs(x = Math.round(x)) >= 1e21\n      ? x.toLocaleString(\"en\").replace(/,/g, \"\")\n      : x.toString(10);\n}\n\n// Computes the decimal coefficient and exponent of the specified number x with\n// significant digits p, where x is positive and p is in [1, 21] or undefined.\n// For example, formatDecimalParts(1.23) returns [\"123\", 0].\nexport function formatDecimalParts(x, p) {\n  if ((i = (x = p ? x.toExponential(p - 1) : x.toExponential()).indexOf(\"e\")) < 0) return null; // NaN, \u00B1Infinity\n  var i, coefficient = x.slice(0, i);\n\n  // The string returned by toExponential either has the form \\d\\.\\d+e[-+]\\d+\n  // (e.g., 1.2e+3) or the form \\de[-+]\\d+ (e.g., 1e+3).\n  return [\n    coefficient.length > 1 ? coefficient[0] + coefficient.slice(2) : coefficient,\n    +x.slice(i + 1)\n  ];\n}\n", "import {formatDecimalParts} from \"./formatDecimal.js\";\n\nexport default function(x) {\n  return x = formatDecimalParts(Math.abs(x)), x ? x[1] : NaN;\n}\n", "export default function(grouping, thousands) {\n  return function(value, width) {\n    var i = value.length,\n        t = [],\n        j = 0,\n        g = grouping[0],\n        length = 0;\n\n    while (i > 0 && g > 0) {\n      if (length + g + 1 > width) g = Math.max(1, width - length);\n      t.push(value.substring(i -= g, i + g));\n      if ((length += g + 1) > width) break;\n      g = grouping[j = (j + 1) % grouping.length];\n    }\n\n    return t.reverse().join(thousands);\n  };\n}\n", "export default function(numerals) {\n  return function(value) {\n    return value.replace(/[0-9]/g, function(i) {\n      return numerals[+i];\n    });\n  };\n}\n", "// [[fill]align][sign][symbol][0][width][,][.precision][~][type]\nvar re = /^(?:(.)?([<>=^]))?([+\\-( ])?([$#])?(0)?(\\d+)?(,)?(\\.\\d+)?(~)?([a-z%])?$/i;\n\nexport default function formatSpecifier(specifier) {\n  if (!(match = re.exec(specifier))) throw new Error(\"invalid format: \" + specifier);\n  var match;\n  return new FormatSpecifier({\n    fill: match[1],\n    align: match[2],\n    sign: match[3],\n    symbol: match[4],\n    zero: match[5],\n    width: match[6],\n    comma: match[7],\n    precision: match[8] && match[8].slice(1),\n    trim: match[9],\n    type: match[10]\n  });\n}\n\nformatSpecifier.prototype = FormatSpecifier.prototype; // instanceof\n\nexport function FormatSpecifier(specifier) {\n  this.fill = specifier.fill === undefined ? \" \" : specifier.fill + \"\";\n  this.align = specifier.align === undefined ? \">\" : specifier.align + \"\";\n  this.sign = specifier.sign === undefined ? \"-\" : specifier.sign + \"\";\n  this.symbol = specifier.symbol === undefined ? \"\" : specifier.symbol + \"\";\n  this.zero = !!specifier.zero;\n  this.width = specifier.width === undefined ? undefined : +specifier.width;\n  this.comma = !!specifier.comma;\n  this.precision = specifier.precision === undefined ? undefined : +specifier.precision;\n  this.trim = !!specifier.trim;\n  this.type = specifier.type === undefined ? \"\" : specifier.type + \"\";\n}\n\nFormatSpecifier.prototype.toString = function() {\n  return this.fill\n      + this.align\n      + this.sign\n      + this.symbol\n      + (this.zero ? \"0\" : \"\")\n      + (this.width === undefined ? \"\" : Math.max(1, this.width | 0))\n      + (this.comma ? \",\" : \"\")\n      + (this.precision === undefined ? \"\" : \".\" + Math.max(0, this.precision | 0))\n      + (this.trim ? \"~\" : \"\")\n      + this.type;\n};\n", "// Trims insignificant zeros, e.g., replaces 1.2000k with 1.2k.\nexport default function(s) {\n  out: for (var n = s.length, i = 1, i0 = -1, i1; i < n; ++i) {\n    switch (s[i]) {\n      case \".\": i0 = i1 = i; break;\n      case \"0\": if (i0 === 0) i0 = i; i1 = i; break;\n      default: if (!+s[i]) break out; if (i0 > 0) i0 = 0; break;\n    }\n  }\n  return i0 > 0 ? s.slice(0, i0) + s.slice(i1 + 1) : s;\n}\n", "import {formatDecimalParts} from \"./formatDecimal.js\";\n\nexport var prefixExponent;\n\nexport default function(x, p) {\n  var d = formatDecimalParts(x, p);\n  if (!d) return x + \"\";\n  var coefficient = d[0],\n      exponent = d[1],\n      i = exponent - (prefixExponent = Math.max(-8, Math.min(8, Math.floor(exponent / 3))) * 3) + 1,\n      n = coefficient.length;\n  return i === n ? coefficient\n      : i > n ? coefficient + new Array(i - n + 1).join(\"0\")\n      : i > 0 ? coefficient.slice(0, i) + \".\" + coefficient.slice(i)\n      : \"0.\" + new Array(1 - i).join(\"0\") + formatDecimalParts(x, Math.max(0, p + i - 1))[0]; // less than 1y!\n}\n", "import {formatDecimalParts} from \"./formatDecimal.js\";\n\nexport default function(x, p) {\n  var d = formatDecimalParts(x, p);\n  if (!d) return x + \"\";\n  var coefficient = d[0],\n      exponent = d[1];\n  return exponent < 0 ? \"0.\" + new Array(-exponent).join(\"0\") + coefficient\n      : coefficient.length > exponent + 1 ? coefficient.slice(0, exponent + 1) + \".\" + coefficient.slice(exponent + 1)\n      : coefficient + new Array(exponent - coefficient.length + 2).join(\"0\");\n}\n", "import formatDecimal from \"./formatDecimal.js\";\nimport formatPrefixAuto from \"./formatPrefixAuto.js\";\nimport formatRounded from \"./formatRounded.js\";\n\nexport default {\n  \"%\": (x, p) => (x * 100).toFixed(p),\n  \"b\": (x) => Math.round(x).toString(2),\n  \"c\": (x) => x + \"\",\n  \"d\": formatDecimal,\n  \"e\": (x, p) => x.toExponential(p),\n  \"f\": (x, p) => x.toFixed(p),\n  \"g\": (x, p) => x.toPrecision(p),\n  \"o\": (x) => Math.round(x).toString(8),\n  \"p\": (x, p) => formatRounded(x * 100, p),\n  \"r\": formatRounded,\n  \"s\": formatPrefixAuto,\n  \"X\": (x) => Math.round(x).toString(16).toUpperCase(),\n  \"x\": (x) => Math.round(x).toString(16)\n};\n", "export default function(x) {\n  return x;\n}\n", "import exponent from \"./exponent.js\";\nimport formatGroup from \"./formatGroup.js\";\nimport formatNumerals from \"./formatNumerals.js\";\nimport formatSpecifier from \"./formatSpecifier.js\";\nimport formatTrim from \"./formatTrim.js\";\nimport formatTypes from \"./formatTypes.js\";\nimport {prefixExponent} from \"./formatPrefixAuto.js\";\nimport identity from \"./identity.js\";\n\nvar map = Array.prototype.map,\n    prefixes = [\"y\",\"z\",\"a\",\"f\",\"p\",\"n\",\"\u00B5\",\"m\",\"\",\"k\",\"M\",\"G\",\"T\",\"P\",\"E\",\"Z\",\"Y\"];\n\nexport default function(locale) {\n  var group = locale.grouping === undefined || locale.thousands === undefined ? identity : formatGroup(map.call(locale.grouping, Number), locale.thousands + \"\"),\n      currencyPrefix = locale.currency === undefined ? \"\" : locale.currency[0] + \"\",\n      currencySuffix = locale.currency === undefined ? \"\" : locale.currency[1] + \"\",\n      decimal = locale.decimal === undefined ? \".\" : locale.decimal + \"\",\n      numerals = locale.numerals === undefined ? identity : formatNumerals(map.call(locale.numerals, String)),\n      percent = locale.percent === undefined ? \"%\" : locale.percent + \"\",\n      minus = locale.minus === undefined ? \"\u2212\" : locale.minus + \"\",\n      nan = locale.nan === undefined ? \"NaN\" : locale.nan + \"\";\n\n  function newFormat(specifier) {\n    specifier = formatSpecifier(specifier);\n\n    var fill = specifier.fill,\n        align = specifier.align,\n        sign = specifier.sign,\n        symbol = specifier.symbol,\n        zero = specifier.zero,\n        width = specifier.width,\n        comma = specifier.comma,\n        precision = specifier.precision,\n        trim = specifier.trim,\n        type = specifier.type;\n\n    // The \"n\" type is an alias for \",g\".\n    if (type === \"n\") comma = true, type = \"g\";\n\n    // The \"\" type, and any invalid type, is an alias for \".12~g\".\n    else if (!formatTypes[type]) precision === undefined && (precision = 12), trim = true, type = \"g\";\n\n    // If zero fill is specified, padding goes after sign and before digits.\n    if (zero || (fill === \"0\" && align === \"=\")) zero = true, fill = \"0\", align = \"=\";\n\n    // Compute the prefix and suffix.\n    // For SI-prefix, the suffix is lazily computed.\n    var prefix = symbol === \"$\" ? currencyPrefix : symbol === \"#\" && /[boxX]/.test(type) ? \"0\" + type.toLowerCase() : \"\",\n        suffix = symbol === \"$\" ? currencySuffix : /[%p]/.test(type) ? percent : \"\";\n\n    // What format function should we use?\n    // Is this an integer type?\n    // Can this type generate exponential notation?\n    var formatType = formatTypes[type],\n        maybeSuffix = /[defgprs%]/.test(type);\n\n    // Set the default precision if not specified,\n    // or clamp the specified precision to the supported range.\n    // For significant precision, it must be in [1, 21].\n    // For fixed precision, it must be in [0, 20].\n    precision = precision === undefined ? 6\n        : /[gprs]/.test(type) ? Math.max(1, Math.min(21, precision))\n        : Math.max(0, Math.min(20, precision));\n\n    function format(value) {\n      var valuePrefix = prefix,\n          valueSuffix = suffix,\n          i, n, c;\n\n      if (type === \"c\") {\n        valueSuffix = formatType(value) + valueSuffix;\n        value = \"\";\n      } else {\n        value = +value;\n\n        // Determine the sign. -0 is not less than 0, but 1 / -0 is!\n        var valueNegative = value < 0 || 1 / value < 0;\n\n        // Perform the initial formatting.\n        value = isNaN(value) ? nan : formatType(Math.abs(value), precision);\n\n        // Trim insignificant zeros.\n        if (trim) value = formatTrim(value);\n\n        // If a negative value rounds to zero after formatting, and no explicit positive sign is requested, hide the sign.\n        if (valueNegative && +value === 0 && sign !== \"+\") valueNegative = false;\n\n        // Compute the prefix and suffix.\n        valuePrefix = (valueNegative ? (sign === \"(\" ? sign : minus) : sign === \"-\" || sign === \"(\" ? \"\" : sign) + valuePrefix;\n        valueSuffix = (type === \"s\" ? prefixes[8 + prefixExponent / 3] : \"\") + valueSuffix + (valueNegative && sign === \"(\" ? \")\" : \"\");\n\n        // Break the formatted value into the integer \u201Cvalue\u201D part that can be\n        // grouped, and fractional or exponential \u201Csuffix\u201D part that is not.\n        if (maybeSuffix) {\n          i = -1, n = value.length;\n          while (++i < n) {\n            if (c = value.charCodeAt(i), 48 > c || c > 57) {\n              valueSuffix = (c === 46 ? decimal + value.slice(i + 1) : value.slice(i)) + valueSuffix;\n              value = value.slice(0, i);\n              break;\n            }\n          }\n        }\n      }\n\n      // If the fill character is not \"0\", grouping is applied before padding.\n      if (comma && !zero) value = group(value, Infinity);\n\n      // Compute the padding.\n      var length = valuePrefix.length + value.length + valueSuffix.length,\n          padding = length < width ? new Array(width - length + 1).join(fill) : \"\";\n\n      // If the fill character is \"0\", grouping is applied after padding.\n      if (comma && zero) value = group(padding + value, padding.length ? width - valueSuffix.length : Infinity), padding = \"\";\n\n      // Reconstruct the final output based on the desired alignment.\n      switch (align) {\n        case \"<\": value = valuePrefix + value + valueSuffix + padding; break;\n        case \"=\": value = valuePrefix + padding + value + valueSuffix; break;\n        case \"^\": value = padding.slice(0, length = padding.length >> 1) + valuePrefix + value + valueSuffix + padding.slice(length); break;\n        default: value = padding + valuePrefix + value + valueSuffix; break;\n      }\n\n      return numerals(value);\n    }\n\n    format.toString = function() {\n      return specifier + \"\";\n    };\n\n    return format;\n  }\n\n  function formatPrefix(specifier, value) {\n    var f = newFormat((specifier = formatSpecifier(specifier), specifier.type = \"f\", specifier)),\n        e = Math.max(-8, Math.min(8, Math.floor(exponent(value) / 3))) * 3,\n        k = Math.pow(10, -e),\n        prefix = prefixes[8 + e / 3];\n    return function(value) {\n      return f(k * value) + prefix;\n    };\n  }\n\n  return {\n    format: newFormat,\n    formatPrefix: formatPrefix\n  };\n}\n", "import formatLocale from \"./locale.js\";\n\nvar locale;\nexport var format;\nexport var formatPrefix;\n\ndefaultLocale({\n  thousands: \",\",\n  grouping: [3],\n  currency: [\"$\", \"\"]\n});\n\nexport default function defaultLocale(definition) {\n  locale = formatLocale(definition);\n  format = locale.format;\n  formatPrefix = locale.formatPrefix;\n  return locale;\n}\n", "import exponent from \"./exponent.js\";\n\nexport default function(step) {\n  return Math.max(0, -exponent(Math.abs(step)));\n}\n", "import exponent from \"./exponent.js\";\n\nexport default function(step, value) {\n  return Math.max(0, Math.max(-8, Math.min(8, Math.floor(exponent(value) / 3))) * 3 - exponent(Math.abs(step)));\n}\n", "import exponent from \"./exponent.js\";\n\nexport default function(step, max) {\n  step = Math.abs(step), max = Math.abs(max) - step;\n  return Math.max(0, exponent(max) - exponent(step)) + 1;\n}\n", "export var epsilon = 1e-6;\nexport var epsilon2 = 1e-12;\nexport var pi = Math.PI;\nexport var halfPi = pi / 2;\nexport var quarterPi = pi / 4;\nexport var tau = pi * 2;\n\nexport var degrees = 180 / pi;\nexport var radians = pi / 180;\n\nexport var abs = Math.abs;\nexport var atan = Math.atan;\nexport var atan2 = Math.atan2;\nexport var cos = Math.cos;\nexport var ceil = Math.ceil;\nexport var exp = Math.exp;\nexport var floor = Math.floor;\nexport var hypot = Math.hypot;\nexport var log = Math.log;\nexport var pow = Math.pow;\nexport var sin = Math.sin;\nexport var sign = Math.sign || function(x) { return x > 0 ? 1 : x < 0 ? -1 : 0; };\nexport var sqrt = Math.sqrt;\nexport var tan = Math.tan;\n\nexport function acos(x) {\n  return x > 1 ? 0 : x < -1 ? pi : Math.acos(x);\n}\n\nexport function asin(x) {\n  return x > 1 ? halfPi : x < -1 ? -halfPi : Math.asin(x);\n}\n\nexport function haversin(x) {\n  return (x = sin(x / 2)) * x;\n}\n", "export default function noop() {}\n", "function streamGeometry(geometry, stream) {\n  if (geometry && streamGeometryType.hasOwnProperty(geometry.type)) {\n    streamGeometryType[geometry.type](geometry, stream);\n  }\n}\n\nvar streamObjectType = {\n  Feature: function(object, stream) {\n    streamGeometry(object.geometry, stream);\n  },\n  FeatureCollection: function(object, stream) {\n    var features = object.features, i = -1, n = features.length;\n    while (++i < n) streamGeometry(features[i].geometry, stream);\n  }\n};\n\nvar streamGeometryType = {\n  Sphere: function(object, stream) {\n    stream.sphere();\n  },\n  Point: function(object, stream) {\n    object = object.coordinates;\n    stream.point(object[0], object[1], object[2]);\n  },\n  MultiPoint: function(object, stream) {\n    var coordinates = object.coordinates, i = -1, n = coordinates.length;\n    while (++i < n) object = coordinates[i], stream.point(object[0], object[1], object[2]);\n  },\n  LineString: function(object, stream) {\n    streamLine(object.coordinates, stream, 0);\n  },\n  MultiLineString: function(object, stream) {\n    var coordinates = object.coordinates, i = -1, n = coordinates.length;\n    while (++i < n) streamLine(coordinates[i], stream, 0);\n  },\n  Polygon: function(object, stream) {\n    streamPolygon(object.coordinates, stream);\n  },\n  MultiPolygon: function(object, stream) {\n    var coordinates = object.coordinates, i = -1, n = coordinates.length;\n    while (++i < n) streamPolygon(coordinates[i], stream);\n  },\n  GeometryCollection: function(object, stream) {\n    var geometries = object.geometries, i = -1, n = geometries.length;\n    while (++i < n) streamGeometry(geometries[i], stream);\n  }\n};\n\nfunction streamLine(coordinates, stream, closed) {\n  var i = -1, n = coordinates.length - closed, coordinate;\n  stream.lineStart();\n  while (++i < n) coordinate = coordinates[i], stream.point(coordinate[0], coordinate[1], coordinate[2]);\n  stream.lineEnd();\n}\n\nfunction streamPolygon(coordinates, stream) {\n  var i = -1, n = coordinates.length;\n  stream.polygonStart();\n  while (++i < n) streamLine(coordinates[i], stream, 1);\n  stream.polygonEnd();\n}\n\nexport default function(object, stream) {\n  if (object && streamObjectType.hasOwnProperty(object.type)) {\n    streamObjectType[object.type](object, stream);\n  } else {\n    streamGeometry(object, stream);\n  }\n}\n", "import {asin, atan2, cos, sin, sqrt} from \"./math.js\";\n\nexport function spherical(cartesian) {\n  return [atan2(cartesian[1], cartesian[0]), asin(cartesian[2])];\n}\n\nexport function cartesian(spherical) {\n  var lambda = spherical[0], phi = spherical[1], cosPhi = cos(phi);\n  return [cosPhi * cos(lambda), cosPhi * sin(lambda), sin(phi)];\n}\n\nexport function cartesianDot(a, b) {\n  return a[0] * b[0] + a[1] * b[1] + a[2] * b[2];\n}\n\nexport function cartesianCross(a, b) {\n  return [a[1] * b[2] - a[2] * b[1], a[2] * b[0] - a[0] * b[2], a[0] * b[1] - a[1] * b[0]];\n}\n\n// TODO return a\nexport function cartesianAddInPlace(a, b) {\n  a[0] += b[0], a[1] += b[1], a[2] += b[2];\n}\n\nexport function cartesianScale(vector, k) {\n  return [vector[0] * k, vector[1] * k, vector[2] * k];\n}\n\n// TODO return d\nexport function cartesianNormalizeInPlace(d) {\n  var l = sqrt(d[0] * d[0] + d[1] * d[1] + d[2] * d[2]);\n  d[0] /= l, d[1] /= l, d[2] /= l;\n}\n", "export default function(a, b) {\n\n  function compose(x, y) {\n    return x = a(x, y), b(x[0], x[1]);\n  }\n\n  if (a.invert && b.invert) compose.invert = function(x, y) {\n    return x = b.invert(x, y), x && a.invert(x[0], x[1]);\n  };\n\n  return compose;\n}\n", "import compose from \"./compose.js\";\nimport {abs, asin, atan2, cos, degrees, pi, radians, sin, tau} from \"./math.js\";\n\nfunction rotationIdentity(lambda, phi) {\n  if (abs(lambda) > pi) lambda -= Math.round(lambda / tau) * tau;\n  return [lambda, phi];\n}\n\nrotationIdentity.invert = rotationIdentity;\n\nexport function rotateRadians(deltaLambda, deltaPhi, deltaGamma) {\n  return (deltaLambda %= tau) ? (deltaPhi || deltaGamma ? compose(rotationLambda(deltaLambda), rotationPhiGamma(deltaPhi, deltaGamma))\n    : rotationLambda(deltaLambda))\n    : (deltaPhi || deltaGamma ? rotationPhiGamma(deltaPhi, deltaGamma)\n    : rotationIdentity);\n}\n\nfunction forwardRotationLambda(deltaLambda) {\n  return function(lambda, phi) {\n    lambda += deltaLambda;\n    if (abs(lambda) > pi) lambda -= Math.round(lambda / tau) * tau;\n    return [lambda, phi];\n  };\n}\n\nfunction rotationLambda(deltaLambda) {\n  var rotation = forwardRotationLambda(deltaLambda);\n  rotation.invert = forwardRotationLambda(-deltaLambda);\n  return rotation;\n}\n\nfunction rotationPhiGamma(deltaPhi, deltaGamma) {\n  var cosDeltaPhi = cos(deltaPhi),\n      sinDeltaPhi = sin(deltaPhi),\n      cosDeltaGamma = cos(deltaGamma),\n      sinDeltaGamma = sin(deltaGamma);\n\n  function rotation(lambda, phi) {\n    var cosPhi = cos(phi),\n        x = cos(lambda) * cosPhi,\n        y = sin(lambda) * cosPhi,\n        z = sin(phi),\n        k = z * cosDeltaPhi + x * sinDeltaPhi;\n    return [\n      atan2(y * cosDeltaGamma - k * sinDeltaGamma, x * cosDeltaPhi - z * sinDeltaPhi),\n      asin(k * cosDeltaGamma + y * sinDeltaGamma)\n    ];\n  }\n\n  rotation.invert = function(lambda, phi) {\n    var cosPhi = cos(phi),\n        x = cos(lambda) * cosPhi,\n        y = sin(lambda) * cosPhi,\n        z = sin(phi),\n        k = z * cosDeltaGamma - y * sinDeltaGamma;\n    return [\n      atan2(y * cosDeltaGamma + z * sinDeltaGamma, x * cosDeltaPhi + k * sinDeltaPhi),\n      asin(k * cosDeltaPhi - x * sinDeltaPhi)\n    ];\n  };\n\n  return rotation;\n}\n\nexport default function(rotate) {\n  rotate = rotateRadians(rotate[0] * radians, rotate[1] * radians, rotate.length > 2 ? rotate[2] * radians : 0);\n\n  function forward(coordinates) {\n    coordinates = rotate(coordinates[0] * radians, coordinates[1] * radians);\n    return coordinates[0] *= degrees, coordinates[1] *= degrees, coordinates;\n  }\n\n  forward.invert = function(coordinates) {\n    coordinates = rotate.invert(coordinates[0] * radians, coordinates[1] * radians);\n    return coordinates[0] *= degrees, coordinates[1] *= degrees, coordinates;\n  };\n\n  return forward;\n}\n", "import {cartesian, cartesianNormalizeInPlace, spherical} from \"./cartesian.js\";\nimport constant from \"./constant.js\";\nimport {acos, cos, degrees, epsilon, radians, sin, tau} from \"./math.js\";\nimport {rotateRadians} from \"./rotation.js\";\n\n// Generates a circle centered at [0\u00B0, 0\u00B0], with a given radius and precision.\nexport function circleStream(stream, radius, delta, direction, t0, t1) {\n  if (!delta) return;\n  var cosRadius = cos(radius),\n      sinRadius = sin(radius),\n      step = direction * delta;\n  if (t0 == null) {\n    t0 = radius + direction * tau;\n    t1 = radius - step / 2;\n  } else {\n    t0 = circleRadius(cosRadius, t0);\n    t1 = circleRadius(cosRadius, t1);\n    if (direction > 0 ? t0 < t1 : t0 > t1) t0 += direction * tau;\n  }\n  for (var point, t = t0; direction > 0 ? t > t1 : t < t1; t -= step) {\n    point = spherical([cosRadius, -sinRadius * cos(t), -sinRadius * sin(t)]);\n    stream.point(point[0], point[1]);\n  }\n}\n\n// Returns the signed angle of a cartesian point relative to [cosRadius, 0, 0].\nfunction circleRadius(cosRadius, point) {\n  point = cartesian(point), point[0] -= cosRadius;\n  cartesianNormalizeInPlace(point);\n  var radius = acos(-point[1]);\n  return ((-point[2] < 0 ? -radius : radius) + tau - epsilon) % tau;\n}\n\nexport default function() {\n  var center = constant([0, 0]),\n      radius = constant(90),\n      precision = constant(6),\n      ring,\n      rotate,\n      stream = {point: point};\n\n  function point(x, y) {\n    ring.push(x = rotate(x, y));\n    x[0] *= degrees, x[1] *= degrees;\n  }\n\n  function circle() {\n    var c = center.apply(this, arguments),\n        r = radius.apply(this, arguments) * radians,\n        p = precision.apply(this, arguments) * radians;\n    ring = [];\n    rotate = rotateRadians(-c[0] * radians, -c[1] * radians, 0).invert;\n    circleStream(stream, r, p, 1);\n    c = {type: \"Polygon\", coordinates: [ring]};\n    ring = rotate = null;\n    return c;\n  }\n\n  circle.center = function(_) {\n    return arguments.length ? (center = typeof _ === \"function\" ? _ : constant([+_[0], +_[1]]), circle) : center;\n  };\n\n  circle.radius = function(_) {\n    return arguments.length ? (radius = typeof _ === \"function\" ? _ : constant(+_), circle) : radius;\n  };\n\n  circle.precision = function(_) {\n    return arguments.length ? (precision = typeof _ === \"function\" ? _ : constant(+_), circle) : precision;\n  };\n\n  return circle;\n}\n", "import noop from \"../noop.js\";\n\nexport default function() {\n  var lines = [],\n      line;\n  return {\n    point: function(x, y, m) {\n      line.push([x, y, m]);\n    },\n    lineStart: function() {\n      lines.push(line = []);\n    },\n    lineEnd: noop,\n    rejoin: function() {\n      if (lines.length > 1) lines.push(lines.pop().concat(lines.shift()));\n    },\n    result: function() {\n      var result = lines;\n      lines = [];\n      line = null;\n      return result;\n    }\n  };\n}\n", "import {abs, epsilon} from \"./math.js\";\n\nexport default function(a, b) {\n  return abs(a[0] - b[0]) < epsilon && abs(a[1] - b[1]) < epsilon;\n}\n", "import pointEqual from \"../pointEqual.js\";\nimport {epsilon} from \"../math.js\";\n\nfunction Intersection(point, points, other, entry) {\n  this.x = point;\n  this.z = points;\n  this.o = other; // another intersection\n  this.e = entry; // is an entry?\n  this.v = false; // visited\n  this.n = this.p = null; // next & previous\n}\n\n// A generalized polygon clipping algorithm: given a polygon that has been cut\n// into its visible line segments, and rejoins the segments by interpolating\n// along the clip edge.\nexport default function(segments, compareIntersection, startInside, interpolate, stream) {\n  var subject = [],\n      clip = [],\n      i,\n      n;\n\n  segments.forEach(function(segment) {\n    if ((n = segment.length - 1) <= 0) return;\n    var n, p0 = segment[0], p1 = segment[n], x;\n\n    if (pointEqual(p0, p1)) {\n      if (!p0[2] && !p1[2]) {\n        stream.lineStart();\n        for (i = 0; i < n; ++i) stream.point((p0 = segment[i])[0], p0[1]);\n        stream.lineEnd();\n        return;\n      }\n      // handle degenerate cases by moving the point\n      p1[0] += 2 * epsilon;\n    }\n\n    subject.push(x = new Intersection(p0, segment, null, true));\n    clip.push(x.o = new Intersection(p0, null, x, false));\n    subject.push(x = new Intersection(p1, segment, null, false));\n    clip.push(x.o = new Intersection(p1, null, x, true));\n  });\n\n  if (!subject.length) return;\n\n  clip.sort(compareIntersection);\n  link(subject);\n  link(clip);\n\n  for (i = 0, n = clip.length; i < n; ++i) {\n    clip[i].e = startInside = !startInside;\n  }\n\n  var start = subject[0],\n      points,\n      point;\n\n  while (1) {\n    // Find first unvisited intersection.\n    var current = start,\n        isSubject = true;\n    while (current.v) if ((current = current.n) === start) return;\n    points = current.z;\n    stream.lineStart();\n    do {\n      current.v = current.o.v = true;\n      if (current.e) {\n        if (isSubject) {\n          for (i = 0, n = points.length; i < n; ++i) stream.point((point = points[i])[0], point[1]);\n        } else {\n          interpolate(current.x, current.n.x, 1, stream);\n        }\n        current = current.n;\n      } else {\n        if (isSubject) {\n          points = current.p.z;\n          for (i = points.length - 1; i >= 0; --i) stream.point((point = points[i])[0], point[1]);\n        } else {\n          interpolate(current.x, current.p.x, -1, stream);\n        }\n        current = current.p;\n      }\n      current = current.o;\n      points = current.z;\n      isSubject = !isSubject;\n    } while (!current.v);\n    stream.lineEnd();\n  }\n}\n\nfunction link(array) {\n  if (!(n = array.length)) return;\n  var n,\n      i = 0,\n      a = array[0],\n      b;\n  while (++i < n) {\n    a.n = b = array[i];\n    b.p = a;\n    a = b;\n  }\n  a.n = b = array[0];\n  b.p = a;\n}\n", "import {Adder} from \"d3-array\";\nimport {cartesian, cartesianCross, cartesianNormalizeInPlace} from \"./cartesian.js\";\nimport {abs, asin, atan2, cos, epsilon, epsilon2, halfPi, pi, quarterPi, sign, sin, tau} from \"./math.js\";\n\nfunction longitude(point) {\n  return abs(point[0]) <= pi ? point[0] : sign(point[0]) * ((abs(point[0]) + pi) % tau - pi);\n}\n\nexport default function(polygon, point) {\n  var lambda = longitude(point),\n      phi = point[1],\n      sinPhi = sin(phi),\n      normal = [sin(lambda), -cos(lambda), 0],\n      angle = 0,\n      winding = 0;\n\n  var sum = new Adder();\n\n  if (sinPhi === 1) phi = halfPi + epsilon;\n  else if (sinPhi === -1) phi = -halfPi - epsilon;\n\n  for (var i = 0, n = polygon.length; i < n; ++i) {\n    if (!(m = (ring = polygon[i]).length)) continue;\n    var ring,\n        m,\n        point0 = ring[m - 1],\n        lambda0 = longitude(point0),\n        phi0 = point0[1] / 2 + quarterPi,\n        sinPhi0 = sin(phi0),\n        cosPhi0 = cos(phi0);\n\n    for (var j = 0; j < m; ++j, lambda0 = lambda1, sinPhi0 = sinPhi1, cosPhi0 = cosPhi1, point0 = point1) {\n      var point1 = ring[j],\n          lambda1 = longitude(point1),\n          phi1 = point1[1] / 2 + quarterPi,\n          sinPhi1 = sin(phi1),\n          cosPhi1 = cos(phi1),\n          delta = lambda1 - lambda0,\n          sign = delta >= 0 ? 1 : -1,\n          absDelta = sign * delta,\n          antimeridian = absDelta > pi,\n          k = sinPhi0 * sinPhi1;\n\n      sum.add(atan2(k * sign * sin(absDelta), cosPhi0 * cosPhi1 + k * cos(absDelta)));\n      angle += antimeridian ? delta + sign * tau : delta;\n\n      // Are the longitudes either side of the point\u2019s meridian (lambda),\n      // and are the latitudes smaller than the parallel (phi)?\n      if (antimeridian ^ lambda0 >= lambda ^ lambda1 >= lambda) {\n        var arc = cartesianCross(cartesian(point0), cartesian(point1));\n        cartesianNormalizeInPlace(arc);\n        var intersection = cartesianCross(normal, arc);\n        cartesianNormalizeInPlace(intersection);\n        var phiArc = (antimeridian ^ delta >= 0 ? -1 : 1) * asin(intersection[2]);\n        if (phi > phiArc || phi === phiArc && (arc[0] || arc[1])) {\n          winding += antimeridian ^ delta >= 0 ? 1 : -1;\n        }\n      }\n    }\n  }\n\n  // First, determine whether the South pole is inside or outside:\n  //\n  // It is inside if:\n  // * the polygon winds around it in a clockwise direction.\n  // * the polygon does not (cumulatively) wind around it, but has a negative\n  //   (counter-clockwise) area.\n  //\n  // Second, count the (signed) number of times a segment crosses a lambda\n  // from the point to the South pole.  If it is zero, then the point is the\n  // same side as the South pole.\n\n  return (angle < -epsilon || angle < epsilon && sum < -epsilon2) ^ (winding & 1);\n}\n", "import clipBuffer from \"./buffer.js\";\nimport clipRejoin from \"./rejoin.js\";\nimport {epsilon, halfPi} from \"../math.js\";\nimport polygonContains from \"../polygonContains.js\";\nimport {merge} from \"d3-array\";\n\nexport default function(pointVisible, clipLine, interpolate, start) {\n  return function(sink) {\n    var line = clipLine(sink),\n        ringBuffer = clipBuffer(),\n        ringSink = clipLine(ringBuffer),\n        polygonStarted = false,\n        polygon,\n        segments,\n        ring;\n\n    var clip = {\n      point: point,\n      lineStart: lineStart,\n      lineEnd: lineEnd,\n      polygonStart: function() {\n        clip.point = pointRing;\n        clip.lineStart = ringStart;\n        clip.lineEnd = ringEnd;\n        segments = [];\n        polygon = [];\n      },\n      polygonEnd: function() {\n        clip.point = point;\n        clip.lineStart = lineStart;\n        clip.lineEnd = lineEnd;\n        segments = merge(segments);\n        var startInside = polygonContains(polygon, start);\n        if (segments.length) {\n          if (!polygonStarted) sink.polygonStart(), polygonStarted = true;\n          clipRejoin(segments, compareIntersection, startInside, interpolate, sink);\n        } else if (startInside) {\n          if (!polygonStarted) sink.polygonStart(), polygonStarted = true;\n          sink.lineStart();\n          interpolate(null, null, 1, sink);\n          sink.lineEnd();\n        }\n        if (polygonStarted) sink.polygonEnd(), polygonStarted = false;\n        segments = polygon = null;\n      },\n      sphere: function() {\n        sink.polygonStart();\n        sink.lineStart();\n        interpolate(null, null, 1, sink);\n        sink.lineEnd();\n        sink.polygonEnd();\n      }\n    };\n\n    function point(lambda, phi) {\n      if (pointVisible(lambda, phi)) sink.point(lambda, phi);\n    }\n\n    function pointLine(lambda, phi) {\n      line.point(lambda, phi);\n    }\n\n    function lineStart() {\n      clip.point = pointLine;\n      line.lineStart();\n    }\n\n    function lineEnd() {\n      clip.point = point;\n      line.lineEnd();\n    }\n\n    function pointRing(lambda, phi) {\n      ring.push([lambda, phi]);\n      ringSink.point(lambda, phi);\n    }\n\n    function ringStart() {\n      ringSink.lineStart();\n      ring = [];\n    }\n\n    function ringEnd() {\n      pointRing(ring[0][0], ring[0][1]);\n      ringSink.lineEnd();\n\n      var clean = ringSink.clean(),\n          ringSegments = ringBuffer.result(),\n          i, n = ringSegments.length, m,\n          segment,\n          point;\n\n      ring.pop();\n      polygon.push(ring);\n      ring = null;\n\n      if (!n) return;\n\n      // No intersections.\n      if (clean & 1) {\n        segment = ringSegments[0];\n        if ((m = segment.length - 1) > 0) {\n          if (!polygonStarted) sink.polygonStart(), polygonStarted = true;\n          sink.lineStart();\n          for (i = 0; i < m; ++i) sink.point((point = segment[i])[0], point[1]);\n          sink.lineEnd();\n        }\n        return;\n      }\n\n      // Rejoin connected segments.\n      // TODO reuse ringBuffer.rejoin()?\n      if (n > 1 && clean & 2) ringSegments.push(ringSegments.pop().concat(ringSegments.shift()));\n\n      segments.push(ringSegments.filter(validSegment));\n    }\n\n    return clip;\n  };\n}\n\nfunction validSegment(segment) {\n  return segment.length > 1;\n}\n\n// Intersections are sorted along the clip edge. For both antimeridian cutting\n// and circle clipping, the same comparison is used.\nfunction compareIntersection(a, b) {\n  return ((a = a.x)[0] < 0 ? a[1] - halfPi - epsilon : halfPi - a[1])\n       - ((b = b.x)[0] < 0 ? b[1] - halfPi - epsilon : halfPi - b[1]);\n}\n", "import clip from \"./index.js\";\nimport {abs, atan, cos, epsilon, halfPi, pi, sin} from \"../math.js\";\n\nexport default clip(\n  function() { return true; },\n  clipAntimeridianLine,\n  clipAntimeridianInterpolate,\n  [-pi, -halfPi]\n);\n\n// Takes a line and cuts into visible segments. Return values: 0 - there were\n// intersections or the line was empty; 1 - no intersections; 2 - there were\n// intersections, and the first and last segments should be rejoined.\nfunction clipAntimeridianLine(stream) {\n  var lambda0 = NaN,\n      phi0 = NaN,\n      sign0 = NaN,\n      clean; // no intersections\n\n  return {\n    lineStart: function() {\n      stream.lineStart();\n      clean = 1;\n    },\n    point: function(lambda1, phi1) {\n      var sign1 = lambda1 > 0 ? pi : -pi,\n          delta = abs(lambda1 - lambda0);\n      if (abs(delta - pi) < epsilon) { // line crosses a pole\n        stream.point(lambda0, phi0 = (phi0 + phi1) / 2 > 0 ? halfPi : -halfPi);\n        stream.point(sign0, phi0);\n        stream.lineEnd();\n        stream.lineStart();\n        stream.point(sign1, phi0);\n        stream.point(lambda1, phi0);\n        clean = 0;\n      } else if (sign0 !== sign1 && delta >= pi) { // line crosses antimeridian\n        if (abs(lambda0 - sign0) < epsilon) lambda0 -= sign0 * epsilon; // handle degeneracies\n        if (abs(lambda1 - sign1) < epsilon) lambda1 -= sign1 * epsilon;\n        phi0 = clipAntimeridianIntersect(lambda0, phi0, lambda1, phi1);\n        stream.point(sign0, phi0);\n        stream.lineEnd();\n        stream.lineStart();\n        stream.point(sign1, phi0);\n        clean = 0;\n      }\n      stream.point(lambda0 = lambda1, phi0 = phi1);\n      sign0 = sign1;\n    },\n    lineEnd: function() {\n      stream.lineEnd();\n      lambda0 = phi0 = NaN;\n    },\n    clean: function() {\n      return 2 - clean; // if intersections, rejoin first and last segments\n    }\n  };\n}\n\nfunction clipAntimeridianIntersect(lambda0, phi0, lambda1, phi1) {\n  var cosPhi0,\n      cosPhi1,\n      sinLambda0Lambda1 = sin(lambda0 - lambda1);\n  return abs(sinLambda0Lambda1) > epsilon\n      ? atan((sin(phi0) * (cosPhi1 = cos(phi1)) * sin(lambda1)\n          - sin(phi1) * (cosPhi0 = cos(phi0)) * sin(lambda0))\n          / (cosPhi0 * cosPhi1 * sinLambda0Lambda1))\n      : (phi0 + phi1) / 2;\n}\n\nfunction clipAntimeridianInterpolate(from, to, direction, stream) {\n  var phi;\n  if (from == null) {\n    phi = direction * halfPi;\n    stream.point(-pi, phi);\n    stream.point(0, phi);\n    stream.point(pi, phi);\n    stream.point(pi, 0);\n    stream.point(pi, -phi);\n    stream.point(0, -phi);\n    stream.point(-pi, -phi);\n    stream.point(-pi, 0);\n    stream.point(-pi, phi);\n  } else if (abs(from[0] - to[0]) > epsilon) {\n    var lambda = from[0] < to[0] ? pi : -pi;\n    phi = direction * lambda / 2;\n    stream.point(-lambda, phi);\n    stream.point(0, phi);\n    stream.point(lambda, phi);\n  } else {\n    stream.point(to[0], to[1]);\n  }\n}\n", "import {cartesian, cartesianAddInPlace, cartesianCross, cartesianDot, cartesianScale, spherical} from \"../cartesian.js\";\nimport {circleStream} from \"../circle.js\";\nimport {abs, cos, epsilon, pi, radians, sqrt} from \"../math.js\";\nimport pointEqual from \"../pointEqual.js\";\nimport clip from \"./index.js\";\n\nexport default function(radius) {\n  var cr = cos(radius),\n      delta = 6 * radians,\n      smallRadius = cr > 0,\n      notHemisphere = abs(cr) > epsilon; // TODO optimise for this common case\n\n  function interpolate(from, to, direction, stream) {\n    circleStream(stream, radius, delta, direction, from, to);\n  }\n\n  function visible(lambda, phi) {\n    return cos(lambda) * cos(phi) > cr;\n  }\n\n  // Takes a line and cuts into visible segments. Return values used for polygon\n  // clipping: 0 - there were intersections or the line was empty; 1 - no\n  // intersections 2 - there were intersections, and the first and last segments\n  // should be rejoined.\n  function clipLine(stream) {\n    var point0, // previous point\n        c0, // code for previous point\n        v0, // visibility of previous point\n        v00, // visibility of first point\n        clean; // no intersections\n    return {\n      lineStart: function() {\n        v00 = v0 = false;\n        clean = 1;\n      },\n      point: function(lambda, phi) {\n        var point1 = [lambda, phi],\n            point2,\n            v = visible(lambda, phi),\n            c = smallRadius\n              ? v ? 0 : code(lambda, phi)\n              : v ? code(lambda + (lambda < 0 ? pi : -pi), phi) : 0;\n        if (!point0 && (v00 = v0 = v)) stream.lineStart();\n        if (v !== v0) {\n          point2 = intersect(point0, point1);\n          if (!point2 || pointEqual(point0, point2) || pointEqual(point1, point2))\n            point1[2] = 1;\n        }\n        if (v !== v0) {\n          clean = 0;\n          if (v) {\n            // outside going in\n            stream.lineStart();\n            point2 = intersect(point1, point0);\n            stream.point(point2[0], point2[1]);\n          } else {\n            // inside going out\n            point2 = intersect(point0, point1);\n            stream.point(point2[0], point2[1], 2);\n            stream.lineEnd();\n          }\n          point0 = point2;\n        } else if (notHemisphere && point0 && smallRadius ^ v) {\n          var t;\n          // If the codes for two points are different, or are both zero,\n          // and there this segment intersects with the small circle.\n          if (!(c & c0) && (t = intersect(point1, point0, true))) {\n            clean = 0;\n            if (smallRadius) {\n              stream.lineStart();\n              stream.point(t[0][0], t[0][1]);\n              stream.point(t[1][0], t[1][1]);\n              stream.lineEnd();\n            } else {\n              stream.point(t[1][0], t[1][1]);\n              stream.lineEnd();\n              stream.lineStart();\n              stream.point(t[0][0], t[0][1], 3);\n            }\n          }\n        }\n        if (v && (!point0 || !pointEqual(point0, point1))) {\n          stream.point(point1[0], point1[1]);\n        }\n        point0 = point1, v0 = v, c0 = c;\n      },\n      lineEnd: function() {\n        if (v0) stream.lineEnd();\n        point0 = null;\n      },\n      // Rejoin first and last segments if there were intersections and the first\n      // and last points were visible.\n      clean: function() {\n        return clean | ((v00 && v0) << 1);\n      }\n    };\n  }\n\n  // Intersects the great circle between a and b with the clip circle.\n  function intersect(a, b, two) {\n    var pa = cartesian(a),\n        pb = cartesian(b);\n\n    // We have two planes, n1.p = d1 and n2.p = d2.\n    // Find intersection line p(t) = c1 n1 + c2 n2 + t (n1 \u2A2F n2).\n    var n1 = [1, 0, 0], // normal\n        n2 = cartesianCross(pa, pb),\n        n2n2 = cartesianDot(n2, n2),\n        n1n2 = n2[0], // cartesianDot(n1, n2),\n        determinant = n2n2 - n1n2 * n1n2;\n\n    // Two polar points.\n    if (!determinant) return !two && a;\n\n    var c1 =  cr * n2n2 / determinant,\n        c2 = -cr * n1n2 / determinant,\n        n1xn2 = cartesianCross(n1, n2),\n        A = cartesianScale(n1, c1),\n        B = cartesianScale(n2, c2);\n    cartesianAddInPlace(A, B);\n\n    // Solve |p(t)|^2 = 1.\n    var u = n1xn2,\n        w = cartesianDot(A, u),\n        uu = cartesianDot(u, u),\n        t2 = w * w - uu * (cartesianDot(A, A) - 1);\n\n    if (t2 < 0) return;\n\n    var t = sqrt(t2),\n        q = cartesianScale(u, (-w - t) / uu);\n    cartesianAddInPlace(q, A);\n    q = spherical(q);\n\n    if (!two) return q;\n\n    // Two intersection points.\n    var lambda0 = a[0],\n        lambda1 = b[0],\n        phi0 = a[1],\n        phi1 = b[1],\n        z;\n\n    if (lambda1 < lambda0) z = lambda0, lambda0 = lambda1, lambda1 = z;\n\n    var delta = lambda1 - lambda0,\n        polar = abs(delta - pi) < epsilon,\n        meridian = polar || delta < epsilon;\n\n    if (!polar && phi1 < phi0) z = phi0, phi0 = phi1, phi1 = z;\n\n    // Check that the first point is between a and b.\n    if (meridian\n        ? polar\n          ? phi0 + phi1 > 0 ^ q[1] < (abs(q[0] - lambda0) < epsilon ? phi0 : phi1)\n          : phi0 <= q[1] && q[1] <= phi1\n        : delta > pi ^ (lambda0 <= q[0] && q[0] <= lambda1)) {\n      var q1 = cartesianScale(u, (-w + t) / uu);\n      cartesianAddInPlace(q1, A);\n      return [q, spherical(q1)];\n    }\n  }\n\n  // Generates a 4-bit vector representing the location of a point relative to\n  // the small circle's bounding box.\n  function code(lambda, phi) {\n    var r = smallRadius ? radius : pi - radius,\n        code = 0;\n    if (lambda < -r) code |= 1; // left\n    else if (lambda > r) code |= 2; // right\n    if (phi < -r) code |= 4; // below\n    else if (phi > r) code |= 8; // above\n    return code;\n  }\n\n  return clip(visible, clipLine, interpolate, smallRadius ? [0, -radius] : [-pi, radius - pi]);\n}\n", "export default function(a, b, x0, y0, x1, y1) {\n  var ax = a[0],\n      ay = a[1],\n      bx = b[0],\n      by = b[1],\n      t0 = 0,\n      t1 = 1,\n      dx = bx - ax,\n      dy = by - ay,\n      r;\n\n  r = x0 - ax;\n  if (!dx && r > 0) return;\n  r /= dx;\n  if (dx < 0) {\n    if (r < t0) return;\n    if (r < t1) t1 = r;\n  } else if (dx > 0) {\n    if (r > t1) return;\n    if (r > t0) t0 = r;\n  }\n\n  r = x1 - ax;\n  if (!dx && r < 0) return;\n  r /= dx;\n  if (dx < 0) {\n    if (r > t1) return;\n    if (r > t0) t0 = r;\n  } else if (dx > 0) {\n    if (r < t0) return;\n    if (r < t1) t1 = r;\n  }\n\n  r = y0 - ay;\n  if (!dy && r > 0) return;\n  r /= dy;\n  if (dy < 0) {\n    if (r < t0) return;\n    if (r < t1) t1 = r;\n  } else if (dy > 0) {\n    if (r > t1) return;\n    if (r > t0) t0 = r;\n  }\n\n  r = y1 - ay;\n  if (!dy && r < 0) return;\n  r /= dy;\n  if (dy < 0) {\n    if (r > t1) return;\n    if (r > t0) t0 = r;\n  } else if (dy > 0) {\n    if (r < t0) return;\n    if (r < t1) t1 = r;\n  }\n\n  if (t0 > 0) a[0] = ax + t0 * dx, a[1] = ay + t0 * dy;\n  if (t1 < 1) b[0] = ax + t1 * dx, b[1] = ay + t1 * dy;\n  return true;\n}\n", "import {abs, epsilon} from \"../math.js\";\nimport clipBuffer from \"./buffer.js\";\nimport clipLine from \"./line.js\";\nimport clipRejoin from \"./rejoin.js\";\nimport {merge} from \"d3-array\";\n\nvar clipMax = 1e9, clipMin = -clipMax;\n\n// TODO Use d3-polygon\u2019s polygonContains here for the ring check?\n// TODO Eliminate duplicate buffering in clipBuffer and polygon.push?\n\nexport default function clipRectangle(x0, y0, x1, y1) {\n\n  function visible(x, y) {\n    return x0 <= x && x <= x1 && y0 <= y && y <= y1;\n  }\n\n  function interpolate(from, to, direction, stream) {\n    var a = 0, a1 = 0;\n    if (from == null\n        || (a = corner(from, direction)) !== (a1 = corner(to, direction))\n        || comparePoint(from, to) < 0 ^ direction > 0) {\n      do stream.point(a === 0 || a === 3 ? x0 : x1, a > 1 ? y1 : y0);\n      while ((a = (a + direction + 4) % 4) !== a1);\n    } else {\n      stream.point(to[0], to[1]);\n    }\n  }\n\n  function corner(p, direction) {\n    return abs(p[0] - x0) < epsilon ? direction > 0 ? 0 : 3\n        : abs(p[0] - x1) < epsilon ? direction > 0 ? 2 : 1\n        : abs(p[1] - y0) < epsilon ? direction > 0 ? 1 : 0\n        : direction > 0 ? 3 : 2; // abs(p[1] - y1) < epsilon\n  }\n\n  function compareIntersection(a, b) {\n    return comparePoint(a.x, b.x);\n  }\n\n  function comparePoint(a, b) {\n    var ca = corner(a, 1),\n        cb = corner(b, 1);\n    return ca !== cb ? ca - cb\n        : ca === 0 ? b[1] - a[1]\n        : ca === 1 ? a[0] - b[0]\n        : ca === 2 ? a[1] - b[1]\n        : b[0] - a[0];\n  }\n\n  return function(stream) {\n    var activeStream = stream,\n        bufferStream = clipBuffer(),\n        segments,\n        polygon,\n        ring,\n        x__, y__, v__, // first point\n        x_, y_, v_, // previous point\n        first,\n        clean;\n\n    var clipStream = {\n      point: point,\n      lineStart: lineStart,\n      lineEnd: lineEnd,\n      polygonStart: polygonStart,\n      polygonEnd: polygonEnd\n    };\n\n    function point(x, y) {\n      if (visible(x, y)) activeStream.point(x, y);\n    }\n\n    function polygonInside() {\n      var winding = 0;\n\n      for (var i = 0, n = polygon.length; i < n; ++i) {\n        for (var ring = polygon[i], j = 1, m = ring.length, point = ring[0], a0, a1, b0 = point[0], b1 = point[1]; j < m; ++j) {\n          a0 = b0, a1 = b1, point = ring[j], b0 = point[0], b1 = point[1];\n          if (a1 <= y1) { if (b1 > y1 && (b0 - a0) * (y1 - a1) > (b1 - a1) * (x0 - a0)) ++winding; }\n          else { if (b1 <= y1 && (b0 - a0) * (y1 - a1) < (b1 - a1) * (x0 - a0)) --winding; }\n        }\n      }\n\n      return winding;\n    }\n\n    // Buffer geometry within a polygon and then clip it en masse.\n    function polygonStart() {\n      activeStream = bufferStream, segments = [], polygon = [], clean = true;\n    }\n\n    function polygonEnd() {\n      var startInside = polygonInside(),\n          cleanInside = clean && startInside,\n          visible = (segments = merge(segments)).length;\n      if (cleanInside || visible) {\n        stream.polygonStart();\n        if (cleanInside) {\n          stream.lineStart();\n          interpolate(null, null, 1, stream);\n          stream.lineEnd();\n        }\n        if (visible) {\n          clipRejoin(segments, compareIntersection, startInside, interpolate, stream);\n        }\n        stream.polygonEnd();\n      }\n      activeStream = stream, segments = polygon = ring = null;\n    }\n\n    function lineStart() {\n      clipStream.point = linePoint;\n      if (polygon) polygon.push(ring = []);\n      first = true;\n      v_ = false;\n      x_ = y_ = NaN;\n    }\n\n    // TODO rather than special-case polygons, simply handle them separately.\n    // Ideally, coincident intersection points should be jittered to avoid\n    // clipping issues.\n    function lineEnd() {\n      if (segments) {\n        linePoint(x__, y__);\n        if (v__ && v_) bufferStream.rejoin();\n        segments.push(bufferStream.result());\n      }\n      clipStream.point = point;\n      if (v_) activeStream.lineEnd();\n    }\n\n    function linePoint(x, y) {\n      var v = visible(x, y);\n      if (polygon) ring.push([x, y]);\n      if (first) {\n        x__ = x, y__ = y, v__ = v;\n        first = false;\n        if (v) {\n          activeStream.lineStart();\n          activeStream.point(x, y);\n        }\n      } else {\n        if (v && v_) activeStream.point(x, y);\n        else {\n          var a = [x_ = Math.max(clipMin, Math.min(clipMax, x_)), y_ = Math.max(clipMin, Math.min(clipMax, y_))],\n              b = [x = Math.max(clipMin, Math.min(clipMax, x)), y = Math.max(clipMin, Math.min(clipMax, y))];\n          if (clipLine(a, b, x0, y0, x1, y1)) {\n            if (!v_) {\n              activeStream.lineStart();\n              activeStream.point(a[0], a[1]);\n            }\n            activeStream.point(b[0], b[1]);\n            if (!v) activeStream.lineEnd();\n            clean = false;\n          } else if (v) {\n            activeStream.lineStart();\n            activeStream.point(x, y);\n            clean = false;\n          }\n        }\n      }\n      x_ = x, y_ = y, v_ = v;\n    }\n\n    return clipStream;\n  };\n}\n", "export default x => x;\n", "import {Adder} from \"d3-array\";\nimport {abs} from \"../math.js\";\nimport noop from \"../noop.js\";\n\nvar areaSum = new Adder(),\n    areaRingSum = new Adder(),\n    x00,\n    y00,\n    x0,\n    y0;\n\nvar areaStream = {\n  point: noop,\n  lineStart: noop,\n  lineEnd: noop,\n  polygonStart: function() {\n    areaStream.lineStart = areaRingStart;\n    areaStream.lineEnd = areaRingEnd;\n  },\n  polygonEnd: function() {\n    areaStream.lineStart = areaStream.lineEnd = areaStream.point = noop;\n    areaSum.add(abs(areaRingSum));\n    areaRingSum = new Adder();\n  },\n  result: function() {\n    var area = areaSum / 2;\n    areaSum = new Adder();\n    return area;\n  }\n};\n\nfunction areaRingStart() {\n  areaStream.point = areaPointFirst;\n}\n\nfunction areaPointFirst(x, y) {\n  areaStream.point = areaPoint;\n  x00 = x0 = x, y00 = y0 = y;\n}\n\nfunction areaPoint(x, y) {\n  areaRingSum.add(y0 * x - x0 * y);\n  x0 = x, y0 = y;\n}\n\nfunction areaRingEnd() {\n  areaPoint(x00, y00);\n}\n\nexport default areaStream;\n", "import noop from \"../noop.js\";\n\nvar x0 = Infinity,\n    y0 = x0,\n    x1 = -x0,\n    y1 = x1;\n\nvar boundsStream = {\n  point: boundsPoint,\n  lineStart: noop,\n  lineEnd: noop,\n  polygonStart: noop,\n  polygonEnd: noop,\n  result: function() {\n    var bounds = [[x0, y0], [x1, y1]];\n    x1 = y1 = -(y0 = x0 = Infinity);\n    return bounds;\n  }\n};\n\nfunction boundsPoint(x, y) {\n  if (x < x0) x0 = x;\n  if (x > x1) x1 = x;\n  if (y < y0) y0 = y;\n  if (y > y1) y1 = y;\n}\n\nexport default boundsStream;\n", "import {sqrt} from \"../math.js\";\n\n// TODO Enforce positive area for exterior, negative area for interior?\n\nvar X0 = 0,\n    Y0 = 0,\n    Z0 = 0,\n    X1 = 0,\n    Y1 = 0,\n    Z1 = 0,\n    X2 = 0,\n    Y2 = 0,\n    Z2 = 0,\n    x00,\n    y00,\n    x0,\n    y0;\n\nvar centroidStream = {\n  point: centroidPoint,\n  lineStart: centroidLineStart,\n  lineEnd: centroidLineEnd,\n  polygonStart: function() {\n    centroidStream.lineStart = centroidRingStart;\n    centroidStream.lineEnd = centroidRingEnd;\n  },\n  polygonEnd: function() {\n    centroidStream.point = centroidPoint;\n    centroidStream.lineStart = centroidLineStart;\n    centroidStream.lineEnd = centroidLineEnd;\n  },\n  result: function() {\n    var centroid = Z2 ? [X2 / Z2, Y2 / Z2]\n        : Z1 ? [X1 / Z1, Y1 / Z1]\n        : Z0 ? [X0 / Z0, Y0 / Z0]\n        : [NaN, NaN];\n    X0 = Y0 = Z0 =\n    X1 = Y1 = Z1 =\n    X2 = Y2 = Z2 = 0;\n    return centroid;\n  }\n};\n\nfunction centroidPoint(x, y) {\n  X0 += x;\n  Y0 += y;\n  ++Z0;\n}\n\nfunction centroidLineStart() {\n  centroidStream.point = centroidPointFirstLine;\n}\n\nfunction centroidPointFirstLine(x, y) {\n  centroidStream.point = centroidPointLine;\n  centroidPoint(x0 = x, y0 = y);\n}\n\nfunction centroidPointLine(x, y) {\n  var dx = x - x0, dy = y - y0, z = sqrt(dx * dx + dy * dy);\n  X1 += z * (x0 + x) / 2;\n  Y1 += z * (y0 + y) / 2;\n  Z1 += z;\n  centroidPoint(x0 = x, y0 = y);\n}\n\nfunction centroidLineEnd() {\n  centroidStream.point = centroidPoint;\n}\n\nfunction centroidRingStart() {\n  centroidStream.point = centroidPointFirstRing;\n}\n\nfunction centroidRingEnd() {\n  centroidPointRing(x00, y00);\n}\n\nfunction centroidPointFirstRing(x, y) {\n  centroidStream.point = centroidPointRing;\n  centroidPoint(x00 = x0 = x, y00 = y0 = y);\n}\n\nfunction centroidPointRing(x, y) {\n  var dx = x - x0,\n      dy = y - y0,\n      z = sqrt(dx * dx + dy * dy);\n\n  X1 += z * (x0 + x) / 2;\n  Y1 += z * (y0 + y) / 2;\n  Z1 += z;\n\n  z = y0 * x - x0 * y;\n  X2 += z * (x0 + x);\n  Y2 += z * (y0 + y);\n  Z2 += z * 3;\n  centroidPoint(x0 = x, y0 = y);\n}\n\nexport default centroidStream;\n", "import {tau} from \"../math.js\";\nimport noop from \"../noop.js\";\n\nexport default function PathContext(context) {\n  this._context = context;\n}\n\nPathContext.prototype = {\n  _radius: 4.5,\n  pointRadius: function(_) {\n    return this._radius = _, this;\n  },\n  polygonStart: function() {\n    this._line = 0;\n  },\n  polygonEnd: function() {\n    this._line = NaN;\n  },\n  lineStart: function() {\n    this._point = 0;\n  },\n  lineEnd: function() {\n    if (this._line === 0) this._context.closePath();\n    this._point = NaN;\n  },\n  point: function(x, y) {\n    switch (this._point) {\n      case 0: {\n        this._context.moveTo(x, y);\n        this._point = 1;\n        break;\n      }\n      case 1: {\n        this._context.lineTo(x, y);\n        break;\n      }\n      default: {\n        this._context.moveTo(x + this._radius, y);\n        this._context.arc(x, y, this._radius, 0, tau);\n        break;\n      }\n    }\n  },\n  result: noop\n};\n", "import {Adder} from \"d3-array\";\nimport {sqrt} from \"../math.js\";\nimport noop from \"../noop.js\";\n\nvar lengthSum = new Adder(),\n    lengthRing,\n    x00,\n    y00,\n    x0,\n    y0;\n\nvar lengthStream = {\n  point: noop,\n  lineStart: function() {\n    lengthStream.point = lengthPointFirst;\n  },\n  lineEnd: function() {\n    if (lengthRing) lengthPoint(x00, y00);\n    lengthStream.point = noop;\n  },\n  polygonStart: function() {\n    lengthRing = true;\n  },\n  polygonEnd: function() {\n    lengthRing = null;\n  },\n  result: function() {\n    var length = +lengthSum;\n    lengthSum = new Adder();\n    return length;\n  }\n};\n\nfunction lengthPointFirst(x, y) {\n  lengthStream.point = lengthPoint;\n  x00 = x0 = x, y00 = y0 = y;\n}\n\nfunction lengthPoint(x, y) {\n  x0 -= x, y0 -= y;\n  lengthSum.add(sqrt(x0 * x0 + y0 * y0));\n  x0 = x, y0 = y;\n}\n\nexport default lengthStream;\n", "// Simple caching for constant-radius points.\nlet cacheDigits, cacheAppend, cacheRadius, cacheCircle;\n\nexport default class PathString {\n  constructor(digits) {\n    this._append = digits == null ? append : appendRound(digits);\n    this._radius = 4.5;\n    this._ = \"\";\n  }\n  pointRadius(_) {\n    this._radius = +_;\n    return this;\n  }\n  polygonStart() {\n    this._line = 0;\n  }\n  polygonEnd() {\n    this._line = NaN;\n  }\n  lineStart() {\n    this._point = 0;\n  }\n  lineEnd() {\n    if (this._line === 0) this._ += \"Z\";\n    this._point = NaN;\n  }\n  point(x, y) {\n    switch (this._point) {\n      case 0: {\n        this._append`M${x},${y}`;\n        this._point = 1;\n        break;\n      }\n      case 1: {\n        this._append`L${x},${y}`;\n        break;\n      }\n      default: {\n        this._append`M${x},${y}`;\n        if (this._radius !== cacheRadius || this._append !== cacheAppend) {\n          const r = this._radius;\n          const s = this._;\n          this._ = \"\"; // stash the old string so we can cache the circle path fragment\n          this._append`m0,${r}a${r},${r} 0 1,1 0,${-2 * r}a${r},${r} 0 1,1 0,${2 * r}z`;\n          cacheRadius = r;\n          cacheAppend = this._append;\n          cacheCircle = this._;\n          this._ = s;\n        }\n        this._ += cacheCircle;\n        break;\n      }\n    }\n  }\n  result() {\n    const result = this._;\n    this._ = \"\";\n    return result.length ? result : null;\n  }\n}\n\nfunction append(strings) {\n  let i = 1;\n  this._ += strings[0];\n  for (const j = strings.length; i < j; ++i) {\n    this._ += arguments[i] + strings[i];\n  }\n}\n\nfunction appendRound(digits) {\n  const d = Math.floor(digits);\n  if (!(d >= 0)) throw new RangeError(`invalid digits: ${digits}`);\n  if (d > 15) return append;\n  if (d !== cacheDigits) {\n    const k = 10 ** d;\n    cacheDigits = d;\n    cacheAppend = function append(strings) {\n      let i = 1;\n      this._ += strings[0];\n      for (const j = strings.length; i < j; ++i) {\n        this._ += Math.round(arguments[i] * k) / k + strings[i];\n      }\n    };\n  }\n  return cacheAppend;\n}\n", "import identity from \"../identity.js\";\nimport stream from \"../stream.js\";\nimport pathArea from \"./area.js\";\nimport pathBounds from \"./bounds.js\";\nimport pathCentroid from \"./centroid.js\";\nimport PathContext from \"./context.js\";\nimport pathMeasure from \"./measure.js\";\nimport PathString from \"./string.js\";\n\nexport default function(projection, context) {\n  let digits = 3,\n      pointRadius = 4.5,\n      projectionStream,\n      contextStream;\n\n  function path(object) {\n    if (object) {\n      if (typeof pointRadius === \"function\") contextStream.pointRadius(+pointRadius.apply(this, arguments));\n      stream(object, projectionStream(contextStream));\n    }\n    return contextStream.result();\n  }\n\n  path.area = function(object) {\n    stream(object, projectionStream(pathArea));\n    return pathArea.result();\n  };\n\n  path.measure = function(object) {\n    stream(object, projectionStream(pathMeasure));\n    return pathMeasure.result();\n  };\n\n  path.bounds = function(object) {\n    stream(object, projectionStream(pathBounds));\n    return pathBounds.result();\n  };\n\n  path.centroid = function(object) {\n    stream(object, projectionStream(pathCentroid));\n    return pathCentroid.result();\n  };\n\n  path.projection = function(_) {\n    if (!arguments.length) return projection;\n    projectionStream = _ == null ? (projection = null, identity) : (projection = _).stream;\n    return path;\n  };\n\n  path.context = function(_) {\n    if (!arguments.length) return context;\n    contextStream = _ == null ? (context = null, new PathString(digits)) : new PathContext(context = _);\n    if (typeof pointRadius !== \"function\") contextStream.pointRadius(pointRadius);\n    return path;\n  };\n\n  path.pointRadius = function(_) {\n    if (!arguments.length) return pointRadius;\n    pointRadius = typeof _ === \"function\" ? _ : (contextStream.pointRadius(+_), +_);\n    return path;\n  };\n\n  path.digits = function(_) {\n    if (!arguments.length) return digits;\n    if (_ == null) digits = null;\n    else {\n      const d = Math.floor(_);\n      if (!(d >= 0)) throw new RangeError(`invalid digits: ${_}`);\n      digits = d;\n    }\n    if (context === null) contextStream = new PathString(digits);\n    return path;\n  };\n\n  return path.projection(projection).digits(digits).context(context);\n}\n", "export default function(methods) {\n  return {\n    stream: transformer(methods)\n  };\n}\n\nexport function transformer(methods) {\n  return function(stream) {\n    var s = new TransformStream;\n    for (var key in methods) s[key] = methods[key];\n    s.stream = stream;\n    return s;\n  };\n}\n\nfunction TransformStream() {}\n\nTransformStream.prototype = {\n  constructor: TransformStream,\n  point: function(x, y) { this.stream.point(x, y); },\n  sphere: function() { this.stream.sphere(); },\n  lineStart: function() { this.stream.lineStart(); },\n  lineEnd: function() { this.stream.lineEnd(); },\n  polygonStart: function() { this.stream.polygonStart(); },\n  polygonEnd: function() { this.stream.polygonEnd(); }\n};\n", "import {default as geoStream} from \"../stream.js\";\nimport boundsStream from \"../path/bounds.js\";\n\nfunction fit(projection, fitBounds, object) {\n  var clip = projection.clipExtent && projection.clipExtent();\n  projection.scale(150).translate([0, 0]);\n  if (clip != null) projection.clipExtent(null);\n  geoStream(object, projection.stream(boundsStream));\n  fitBounds(boundsStream.result());\n  if (clip != null) projection.clipExtent(clip);\n  return projection;\n}\n\nexport function fitExtent(projection, extent, object) {\n  return fit(projection, function(b) {\n    var w = extent[1][0] - extent[0][0],\n        h = extent[1][1] - extent[0][1],\n        k = Math.min(w / (b[1][0] - b[0][0]), h / (b[1][1] - b[0][1])),\n        x = +extent[0][0] + (w - k * (b[1][0] + b[0][0])) / 2,\n        y = +extent[0][1] + (h - k * (b[1][1] + b[0][1])) / 2;\n    projection.scale(150 * k).translate([x, y]);\n  }, object);\n}\n\nexport function fitSize(projection, size, object) {\n  return fitExtent(projection, [[0, 0], size], object);\n}\n\nexport function fitWidth(projection, width, object) {\n  return fit(projection, function(b) {\n    var w = +width,\n        k = w / (b[1][0] - b[0][0]),\n        x = (w - k * (b[1][0] + b[0][0])) / 2,\n        y = -k * b[0][1];\n    projection.scale(150 * k).translate([x, y]);\n  }, object);\n}\n\nexport function fitHeight(projection, height, object) {\n  return fit(projection, function(b) {\n    var h = +height,\n        k = h / (b[1][1] - b[0][1]),\n        x = -k * b[0][0],\n        y = (h - k * (b[1][1] + b[0][1])) / 2;\n    projection.scale(150 * k).translate([x, y]);\n  }, object);\n}\n", "import {cartesian} from \"../cartesian.js\";\nimport {abs, asin, atan2, cos, epsilon, radians, sqrt} from \"../math.js\";\nimport {transformer} from \"../transform.js\";\n\nvar maxDepth = 16, // maximum depth of subdivision\n    cosMinDistance = cos(30 * radians); // cos(minimum angular distance)\n\nexport default function(project, delta2) {\n  return +delta2 ? resample(project, delta2) : resampleNone(project);\n}\n\nfunction resampleNone(project) {\n  return transformer({\n    point: function(x, y) {\n      x = project(x, y);\n      this.stream.point(x[0], x[1]);\n    }\n  });\n}\n\nfunction resample(project, delta2) {\n\n  function resampleLineTo(x0, y0, lambda0, a0, b0, c0, x1, y1, lambda1, a1, b1, c1, depth, stream) {\n    var dx = x1 - x0,\n        dy = y1 - y0,\n        d2 = dx * dx + dy * dy;\n    if (d2 > 4 * delta2 && depth--) {\n      var a = a0 + a1,\n          b = b0 + b1,\n          c = c0 + c1,\n          m = sqrt(a * a + b * b + c * c),\n          phi2 = asin(c /= m),\n          lambda2 = abs(abs(c) - 1) < epsilon || abs(lambda0 - lambda1) < epsilon ? (lambda0 + lambda1) / 2 : atan2(b, a),\n          p = project(lambda2, phi2),\n          x2 = p[0],\n          y2 = p[1],\n          dx2 = x2 - x0,\n          dy2 = y2 - y0,\n          dz = dy * dx2 - dx * dy2;\n      if (dz * dz / d2 > delta2 // perpendicular projected distance\n          || abs((dx * dx2 + dy * dy2) / d2 - 0.5) > 0.3 // midpoint close to an end\n          || a0 * a1 + b0 * b1 + c0 * c1 < cosMinDistance) { // angular distance\n        resampleLineTo(x0, y0, lambda0, a0, b0, c0, x2, y2, lambda2, a /= m, b /= m, c, depth, stream);\n        stream.point(x2, y2);\n        resampleLineTo(x2, y2, lambda2, a, b, c, x1, y1, lambda1, a1, b1, c1, depth, stream);\n      }\n    }\n  }\n  return function(stream) {\n    var lambda00, x00, y00, a00, b00, c00, // first point\n        lambda0, x0, y0, a0, b0, c0; // previous point\n\n    var resampleStream = {\n      point: point,\n      lineStart: lineStart,\n      lineEnd: lineEnd,\n      polygonStart: function() { stream.polygonStart(); resampleStream.lineStart = ringStart; },\n      polygonEnd: function() { stream.polygonEnd(); resampleStream.lineStart = lineStart; }\n    };\n\n    function point(x, y) {\n      x = project(x, y);\n      stream.point(x[0], x[1]);\n    }\n\n    function lineStart() {\n      x0 = NaN;\n      resampleStream.point = linePoint;\n      stream.lineStart();\n    }\n\n    function linePoint(lambda, phi) {\n      var c = cartesian([lambda, phi]), p = project(lambda, phi);\n      resampleLineTo(x0, y0, lambda0, a0, b0, c0, x0 = p[0], y0 = p[1], lambda0 = lambda, a0 = c[0], b0 = c[1], c0 = c[2], maxDepth, stream);\n      stream.point(x0, y0);\n    }\n\n    function lineEnd() {\n      resampleStream.point = point;\n      stream.lineEnd();\n    }\n\n    function ringStart() {\n      lineStart();\n      resampleStream.point = ringPoint;\n      resampleStream.lineEnd = ringEnd;\n    }\n\n    function ringPoint(lambda, phi) {\n      linePoint(lambda00 = lambda, phi), x00 = x0, y00 = y0, a00 = a0, b00 = b0, c00 = c0;\n      resampleStream.point = linePoint;\n    }\n\n    function ringEnd() {\n      resampleLineTo(x0, y0, lambda0, a0, b0, c0, x00, y00, lambda00, a00, b00, c00, maxDepth, stream);\n      resampleStream.lineEnd = lineEnd;\n      lineEnd();\n    }\n\n    return resampleStream;\n  };\n}\n", "import clipAntimeridian from \"../clip/antimeridian.js\";\nimport clipCircle from \"../clip/circle.js\";\nimport clipRectangle from \"../clip/rectangle.js\";\nimport compose from \"../compose.js\";\nimport identity from \"../identity.js\";\nimport {cos, degrees, radians, sin, sqrt} from \"../math.js\";\nimport {rotateRadians} from \"../rotation.js\";\nimport {transformer} from \"../transform.js\";\nimport {fitExtent, fitSize, fitWidth, fitHeight} from \"./fit.js\";\nimport resample from \"./resample.js\";\n\nvar transformRadians = transformer({\n  point: function(x, y) {\n    this.stream.point(x * radians, y * radians);\n  }\n});\n\nfunction transformRotate(rotate) {\n  return transformer({\n    point: function(x, y) {\n      var r = rotate(x, y);\n      return this.stream.point(r[0], r[1]);\n    }\n  });\n}\n\nfunction scaleTranslate(k, dx, dy, sx, sy) {\n  function transform(x, y) {\n    x *= sx; y *= sy;\n    return [dx + k * x, dy - k * y];\n  }\n  transform.invert = function(x, y) {\n    return [(x - dx) / k * sx, (dy - y) / k * sy];\n  };\n  return transform;\n}\n\nfunction scaleTranslateRotate(k, dx, dy, sx, sy, alpha) {\n  if (!alpha) return scaleTranslate(k, dx, dy, sx, sy);\n  var cosAlpha = cos(alpha),\n      sinAlpha = sin(alpha),\n      a = cosAlpha * k,\n      b = sinAlpha * k,\n      ai = cosAlpha / k,\n      bi = sinAlpha / k,\n      ci = (sinAlpha * dy - cosAlpha * dx) / k,\n      fi = (sinAlpha * dx + cosAlpha * dy) / k;\n  function transform(x, y) {\n    x *= sx; y *= sy;\n    return [a * x - b * y + dx, dy - b * x - a * y];\n  }\n  transform.invert = function(x, y) {\n    return [sx * (ai * x - bi * y + ci), sy * (fi - bi * x - ai * y)];\n  };\n  return transform;\n}\n\nexport default function projection(project) {\n  return projectionMutator(function() { return project; })();\n}\n\nexport function projectionMutator(projectAt) {\n  var project,\n      k = 150, // scale\n      x = 480, y = 250, // translate\n      lambda = 0, phi = 0, // center\n      deltaLambda = 0, deltaPhi = 0, deltaGamma = 0, rotate, // pre-rotate\n      alpha = 0, // post-rotate angle\n      sx = 1, // reflectX\n      sy = 1, // reflectX\n      theta = null, preclip = clipAntimeridian, // pre-clip angle\n      x0 = null, y0, x1, y1, postclip = identity, // post-clip extent\n      delta2 = 0.5, // precision\n      projectResample,\n      projectTransform,\n      projectRotateTransform,\n      cache,\n      cacheStream;\n\n  function projection(point) {\n    return projectRotateTransform(point[0] * radians, point[1] * radians);\n  }\n\n  function invert(point) {\n    point = projectRotateTransform.invert(point[0], point[1]);\n    return point && [point[0] * degrees, point[1] * degrees];\n  }\n\n  projection.stream = function(stream) {\n    return cache && cacheStream === stream ? cache : cache = transformRadians(transformRotate(rotate)(preclip(projectResample(postclip(cacheStream = stream)))));\n  };\n\n  projection.preclip = function(_) {\n    return arguments.length ? (preclip = _, theta = undefined, reset()) : preclip;\n  };\n\n  projection.postclip = function(_) {\n    return arguments.length ? (postclip = _, x0 = y0 = x1 = y1 = null, reset()) : postclip;\n  };\n\n  projection.clipAngle = function(_) {\n    return arguments.length ? (preclip = +_ ? clipCircle(theta = _ * radians) : (theta = null, clipAntimeridian), reset()) : theta * degrees;\n  };\n\n  projection.clipExtent = function(_) {\n    return arguments.length ? (postclip = _ == null ? (x0 = y0 = x1 = y1 = null, identity) : clipRectangle(x0 = +_[0][0], y0 = +_[0][1], x1 = +_[1][0], y1 = +_[1][1]), reset()) : x0 == null ? null : [[x0, y0], [x1, y1]];\n  };\n\n  projection.scale = function(_) {\n    return arguments.length ? (k = +_, recenter()) : k;\n  };\n\n  projection.translate = function(_) {\n    return arguments.length ? (x = +_[0], y = +_[1], recenter()) : [x, y];\n  };\n\n  projection.center = function(_) {\n    return arguments.length ? (lambda = _[0] % 360 * radians, phi = _[1] % 360 * radians, recenter()) : [lambda * degrees, phi * degrees];\n  };\n\n  projection.rotate = function(_) {\n    return arguments.length ? (deltaLambda = _[0] % 360 * radians, deltaPhi = _[1] % 360 * radians, deltaGamma = _.length > 2 ? _[2] % 360 * radians : 0, recenter()) : [deltaLambda * degrees, deltaPhi * degrees, deltaGamma * degrees];\n  };\n\n  projection.angle = function(_) {\n    return arguments.length ? (alpha = _ % 360 * radians, recenter()) : alpha * degrees;\n  };\n\n  projection.reflectX = function(_) {\n    return arguments.length ? (sx = _ ? -1 : 1, recenter()) : sx < 0;\n  };\n\n  projection.reflectY = function(_) {\n    return arguments.length ? (sy = _ ? -1 : 1, recenter()) : sy < 0;\n  };\n\n  projection.precision = function(_) {\n    return arguments.length ? (projectResample = resample(projectTransform, delta2 = _ * _), reset()) : sqrt(delta2);\n  };\n\n  projection.fitExtent = function(extent, object) {\n    return fitExtent(projection, extent, object);\n  };\n\n  projection.fitSize = function(size, object) {\n    return fitSize(projection, size, object);\n  };\n\n  projection.fitWidth = function(width, object) {\n    return fitWidth(projection, width, object);\n  };\n\n  projection.fitHeight = function(height, object) {\n    return fitHeight(projection, height, object);\n  };\n\n  function recenter() {\n    var center = scaleTranslateRotate(k, 0, 0, sx, sy, alpha).apply(null, project(lambda, phi)),\n        transform = scaleTranslateRotate(k, x - center[0], y - center[1], sx, sy, alpha);\n    rotate = rotateRadians(deltaLambda, deltaPhi, deltaGamma);\n    projectTransform = compose(project, transform);\n    projectRotateTransform = compose(rotate, projectTransform);\n    projectResample = resample(projectTransform, delta2);\n    return reset();\n  }\n\n  function reset() {\n    cache = cacheStream = null;\n    return projection;\n  }\n\n  return function() {\n    project = projectAt.apply(this, arguments);\n    projection.invert = project.invert && invert;\n    return recenter();\n  };\n}\n", "import {degrees, pi, radians} from \"../math.js\";\nimport {projectionMutator} from \"./index.js\";\n\nexport function conicProjection(projectAt) {\n  var phi0 = 0,\n      phi1 = pi / 3,\n      m = projectionMutator(projectAt),\n      p = m(phi0, phi1);\n\n  p.parallels = function(_) {\n    return arguments.length ? m(phi0 = _[0] * radians, phi1 = _[1] * radians) : [phi0 * degrees, phi1 * degrees];\n  };\n\n  return p;\n}\n", "import {asin, cos, sin} from \"../math.js\";\n\nexport function cylindricalEqualAreaRaw(phi0) {\n  var cosPhi0 = cos(phi0);\n\n  function forward(lambda, phi) {\n    return [lambda * cosPhi0, sin(phi) / cosPhi0];\n  }\n\n  forward.invert = function(x, y) {\n    return [x / cosPhi0, asin(y * cosPhi0)];\n  };\n\n  return forward;\n}\n", "import {abs, asin, atan2, cos, epsilon, pi, sign, sin, sqrt} from \"../math.js\";\nimport {conicProjection} from \"./conic.js\";\nimport {cylindricalEqualAreaRaw} from \"./cylindricalEqualArea.js\";\n\nexport function conicEqualAreaRaw(y0, y1) {\n  var sy0 = sin(y0), n = (sy0 + sin(y1)) / 2;\n\n  // Are the parallels symmetrical around the Equator?\n  if (abs(n) < epsilon) return cylindricalEqualAreaRaw(y0);\n\n  var c = 1 + sy0 * (2 * n - sy0), r0 = sqrt(c) / n;\n\n  function project(x, y) {\n    var r = sqrt(c - 2 * n * sin(y)) / n;\n    return [r * sin(x *= n), r0 - r * cos(x)];\n  }\n\n  project.invert = function(x, y) {\n    var r0y = r0 - y,\n        l = atan2(x, abs(r0y)) * sign(r0y);\n    if (r0y * n < 0)\n      l -= pi * sign(x) * sign(r0y);\n    return [l / n, asin((c - (x * x + r0y * r0y) * n * n) / (2 * n))];\n  };\n\n  return project;\n}\n\nexport default function() {\n  return conicProjection(conicEqualAreaRaw)\n      .scale(155.424)\n      .center([0, 33.6442]);\n}\n", "import conicEqualArea from \"./conicEqualArea.js\";\n\nexport default function() {\n  return conicEqualArea()\n      .parallels([29.5, 45.5])\n      .scale(1070)\n      .translate([480, 250])\n      .rotate([96, 0])\n      .center([-0.6, 38.7]);\n}\n", "import {epsilon} from \"../math.js\";\nimport albers from \"./albers.js\";\nimport conicEqualArea from \"./conicEqualArea.js\";\nimport {fitExtent, fitSize, fitWidth, fitHeight} from \"./fit.js\";\n\n// The projections must have mutually exclusive clip regions on the sphere,\n// as this will avoid emitting interleaving lines and polygons.\nfunction multiplex(streams) {\n  var n = streams.length;\n  return {\n    point: function(x, y) { var i = -1; while (++i < n) streams[i].point(x, y); },\n    sphere: function() { var i = -1; while (++i < n) streams[i].sphere(); },\n    lineStart: function() { var i = -1; while (++i < n) streams[i].lineStart(); },\n    lineEnd: function() { var i = -1; while (++i < n) streams[i].lineEnd(); },\n    polygonStart: function() { var i = -1; while (++i < n) streams[i].polygonStart(); },\n    polygonEnd: function() { var i = -1; while (++i < n) streams[i].polygonEnd(); }\n  };\n}\n\n// A composite projection for the United States, configured by default for\n// 960\u00D7500. The projection also works quite well at 960\u00D7600 if you change the\n// scale to 1285 and adjust the translate accordingly. The set of standard\n// parallels for each region comes from USGS, which is published here:\n// http://egsc.usgs.gov/isb/pubs/MapProjections/projections.html#albers\nexport default function() {\n  var cache,\n      cacheStream,\n      lower48 = albers(), lower48Point,\n      alaska = conicEqualArea().rotate([154, 0]).center([-2, 58.5]).parallels([55, 65]), alaskaPoint, // EPSG:3338\n      hawaii = conicEqualArea().rotate([157, 0]).center([-3, 19.9]).parallels([8, 18]), hawaiiPoint, // ESRI:102007\n      point, pointStream = {point: function(x, y) { point = [x, y]; }};\n\n  function albersUsa(coordinates) {\n    var x = coordinates[0], y = coordinates[1];\n    return point = null,\n        (lower48Point.point(x, y), point)\n        || (alaskaPoint.point(x, y), point)\n        || (hawaiiPoint.point(x, y), point);\n  }\n\n  albersUsa.invert = function(coordinates) {\n    var k = lower48.scale(),\n        t = lower48.translate(),\n        x = (coordinates[0] - t[0]) / k,\n        y = (coordinates[1] - t[1]) / k;\n    return (y >= 0.120 && y < 0.234 && x >= -0.425 && x < -0.214 ? alaska\n        : y >= 0.166 && y < 0.234 && x >= -0.214 && x < -0.115 ? hawaii\n        : lower48).invert(coordinates);\n  };\n\n  albersUsa.stream = function(stream) {\n    return cache && cacheStream === stream ? cache : cache = multiplex([lower48.stream(cacheStream = stream), alaska.stream(stream), hawaii.stream(stream)]);\n  };\n\n  albersUsa.precision = function(_) {\n    if (!arguments.length) return lower48.precision();\n    lower48.precision(_), alaska.precision(_), hawaii.precision(_);\n    return reset();\n  };\n\n  albersUsa.scale = function(_) {\n    if (!arguments.length) return lower48.scale();\n    lower48.scale(_), alaska.scale(_ * 0.35), hawaii.scale(_);\n    return albersUsa.translate(lower48.translate());\n  };\n\n  albersUsa.translate = function(_) {\n    if (!arguments.length) return lower48.translate();\n    var k = lower48.scale(), x = +_[0], y = +_[1];\n\n    lower48Point = lower48\n        .translate(_)\n        .clipExtent([[x - 0.455 * k, y - 0.238 * k], [x + 0.455 * k, y + 0.238 * k]])\n        .stream(pointStream);\n\n    alaskaPoint = alaska\n        .translate([x - 0.307 * k, y + 0.201 * k])\n        .clipExtent([[x - 0.425 * k + epsilon, y + 0.120 * k + epsilon], [x - 0.214 * k - epsilon, y + 0.234 * k - epsilon]])\n        .stream(pointStream);\n\n    hawaiiPoint = hawaii\n        .translate([x - 0.205 * k, y + 0.212 * k])\n        .clipExtent([[x - 0.214 * k + epsilon, y + 0.166 * k + epsilon], [x - 0.115 * k - epsilon, y + 0.234 * k - epsilon]])\n        .stream(pointStream);\n\n    return reset();\n  };\n\n  albersUsa.fitExtent = function(extent, object) {\n    return fitExtent(albersUsa, extent, object);\n  };\n\n  albersUsa.fitSize = function(size, object) {\n    return fitSize(albersUsa, size, object);\n  };\n\n  albersUsa.fitWidth = function(width, object) {\n    return fitWidth(albersUsa, width, object);\n  };\n\n  albersUsa.fitHeight = function(height, object) {\n    return fitHeight(albersUsa, height, object);\n  };\n\n  function reset() {\n    cache = cacheStream = null;\n    return albersUsa;\n  }\n\n  return albersUsa.scale(1070);\n}\n", "import {asin, atan2, cos, sin, sqrt} from \"../math.js\";\n\nexport function azimuthalRaw(scale) {\n  return function(x, y) {\n    var cx = cos(x),\n        cy = cos(y),\n        k = scale(cx * cy);\n        if (k === Infinity) return [2, 0];\n    return [\n      k * cy * sin(x),\n      k * sin(y)\n    ];\n  }\n}\n\nexport function azimuthalInvert(angle) {\n  return function(x, y) {\n    var z = sqrt(x * x + y * y),\n        c = angle(z),\n        sc = sin(c),\n        cc = cos(c);\n    return [\n      atan2(x * sc, z * cc),\n      asin(z && y * sc / z)\n    ];\n  }\n}\n", "import {asin, sqrt} from \"../math.js\";\nimport {azimuthalRaw, azimuthalInvert} from \"./azimuthal.js\";\nimport projection from \"./index.js\";\n\nexport var azimuthalEqualAreaRaw = azimuthalRaw(function(cxcy) {\n  return sqrt(2 / (1 + cxcy));\n});\n\nazimuthalEqualAreaRaw.invert = azimuthalInvert(function(z) {\n  return 2 * asin(z / 2);\n});\n\nexport default function() {\n  return projection(azimuthalEqualAreaRaw)\n      .scale(124.75)\n      .clipAngle(180 - 1e-3);\n}\n", "import {acos, sin} from \"../math.js\";\nimport {azimuthalRaw, azimuthalInvert} from \"./azimuthal.js\";\nimport projection from \"./index.js\";\n\nexport var azimuthalEquidistantRaw = azimuthalRaw(function(c) {\n  return (c = acos(c)) && c / sin(c);\n});\n\nazimuthalEquidistantRaw.invert = azimuthalInvert(function(z) {\n  return z;\n});\n\nexport default function() {\n  return projection(azimuthalEquidistantRaw)\n      .scale(79.4188)\n      .clipAngle(180 - 1e-3);\n}\n", "import {atan, exp, halfPi, log, pi, tan, tau} from \"../math.js\";\nimport rotation from \"../rotation.js\";\nimport projection from \"./index.js\";\n\nexport function mercatorRaw(lambda, phi) {\n  return [lambda, log(tan((halfPi + phi) / 2))];\n}\n\nmercatorRaw.invert = function(x, y) {\n  return [x, 2 * atan(exp(y)) - halfPi];\n};\n\nexport default function() {\n  return mercatorProjection(mercatorRaw)\n      .scale(961 / tau);\n}\n\nexport function mercatorProjection(project) {\n  var m = projection(project),\n      center = m.center,\n      scale = m.scale,\n      translate = m.translate,\n      clipExtent = m.clipExtent,\n      x0 = null, y0, x1, y1; // clip extent\n\n  m.scale = function(_) {\n    return arguments.length ? (scale(_), reclip()) : scale();\n  };\n\n  m.translate = function(_) {\n    return arguments.length ? (translate(_), reclip()) : translate();\n  };\n\n  m.center = function(_) {\n    return arguments.length ? (center(_), reclip()) : center();\n  };\n\n  m.clipExtent = function(_) {\n    return arguments.length ? ((_ == null ? x0 = y0 = x1 = y1 = null : (x0 = +_[0][0], y0 = +_[0][1], x1 = +_[1][0], y1 = +_[1][1])), reclip()) : x0 == null ? null : [[x0, y0], [x1, y1]];\n  };\n\n  function reclip() {\n    var k = pi * scale(),\n        t = m(rotation(m.rotate()).invert([0, 0]));\n    return clipExtent(x0 == null\n        ? [[t[0] - k, t[1] - k], [t[0] + k, t[1] + k]] : project === mercatorRaw\n        ? [[Math.max(t[0] - k, x0), y0], [Math.min(t[0] + k, x1), y1]]\n        : [[x0, Math.max(t[1] - k, y0)], [x1, Math.min(t[1] + k, y1)]]);\n  }\n\n  return reclip();\n}\n", "import {abs, atan, atan2, cos, epsilon, halfPi, log, pi, pow, sign, sin, sqrt, tan} from \"../math.js\";\nimport {conicProjection} from \"./conic.js\";\nimport {mercatorRaw} from \"./mercator.js\";\n\nfunction tany(y) {\n  return tan((halfPi + y) / 2);\n}\n\nexport function conicConformalRaw(y0, y1) {\n  var cy0 = cos(y0),\n      n = y0 === y1 ? sin(y0) : log(cy0 / cos(y1)) / log(tany(y1) / tany(y0)),\n      f = cy0 * pow(tany(y0), n) / n;\n\n  if (!n) return mercatorRaw;\n\n  function project(x, y) {\n    if (f > 0) { if (y < -halfPi + epsilon) y = -halfPi + epsilon; }\n    else { if (y > halfPi - epsilon) y = halfPi - epsilon; }\n    var r = f / pow(tany(y), n);\n    return [r * sin(n * x), f - r * cos(n * x)];\n  }\n\n  project.invert = function(x, y) {\n    var fy = f - y, r = sign(n) * sqrt(x * x + fy * fy),\n      l = atan2(x, abs(fy)) * sign(fy);\n    if (fy * n < 0)\n      l -= pi * sign(x) * sign(fy);\n    return [l / n, 2 * atan(pow(f / r, 1 / n)) - halfPi];\n  };\n\n  return project;\n}\n\nexport default function() {\n  return conicProjection(conicConformalRaw)\n      .scale(109.5)\n      .parallels([30, 30]);\n}\n", "import projection from \"./index.js\";\n\nexport function equirectangularRaw(lambda, phi) {\n  return [lambda, phi];\n}\n\nequirectangularRaw.invert = equirectangularRaw;\n\nexport default function() {\n  return projection(equirectangularRaw)\n      .scale(152.63);\n}\n", "import {abs, atan2, cos, epsilon, pi, sign, sin, sqrt} from \"../math.js\";\nimport {conicProjection} from \"./conic.js\";\nimport {equirectangularRaw} from \"./equirectangular.js\";\n\nexport function conicEquidistantRaw(y0, y1) {\n  var cy0 = cos(y0),\n      n = y0 === y1 ? sin(y0) : (cy0 - cos(y1)) / (y1 - y0),\n      g = cy0 / n + y0;\n\n  if (abs(n) < epsilon) return equirectangularRaw;\n\n  function project(x, y) {\n    var gy = g - y, nx = n * x;\n    return [gy * sin(nx), g - gy * cos(nx)];\n  }\n\n  project.invert = function(x, y) {\n    var gy = g - y,\n        l = atan2(x, abs(gy)) * sign(gy);\n    if (gy * n < 0)\n      l -= pi * sign(x) * sign(gy);\n    return [l / n, g - sign(n) * sqrt(x * x + gy * gy)];\n  };\n\n  return project;\n}\n\nexport default function() {\n  return conicProjection(conicEquidistantRaw)\n      .scale(131.154)\n      .center([0, 13.9389]);\n}\n", "import projection from \"./index.js\";\nimport {abs, asin, cos, epsilon2, sin, sqrt} from \"../math.js\";\n\nvar A1 = 1.340264,\n    A2 = -0.081106,\n    A3 = 0.000893,\n    A4 = 0.003796,\n    M = sqrt(3) / 2,\n    iterations = 12;\n\nexport function equalEarthRaw(lambda, phi) {\n  var l = asin(M * sin(phi)), l2 = l * l, l6 = l2 * l2 * l2;\n  return [\n    lambda * cos(l) / (M * (A1 + 3 * A2 * l2 + l6 * (7 * A3 + 9 * A4 * l2))),\n    l * (A1 + A2 * l2 + l6 * (A3 + A4 * l2))\n  ];\n}\n\nequalEarthRaw.invert = function(x, y) {\n  var l = y, l2 = l * l, l6 = l2 * l2 * l2;\n  for (var i = 0, delta, fy, fpy; i < iterations; ++i) {\n    fy = l * (A1 + A2 * l2 + l6 * (A3 + A4 * l2)) - y;\n    fpy = A1 + 3 * A2 * l2 + l6 * (7 * A3 + 9 * A4 * l2);\n    l -= delta = fy / fpy, l2 = l * l, l6 = l2 * l2 * l2;\n    if (abs(delta) < epsilon2) break;\n  }\n  return [\n    M * x * (A1 + 3 * A2 * l2 + l6 * (7 * A3 + 9 * A4 * l2)) / cos(l),\n    asin(sin(l) / M)\n  ];\n};\n\nexport default function() {\n  return projection(equalEarthRaw)\n      .scale(177.158);\n}\n", "import {atan, cos, sin} from \"../math.js\";\nimport {azimuthalInvert} from \"./azimuthal.js\";\nimport projection from \"./index.js\";\n\nexport function gnomonicRaw(x, y) {\n  var cy = cos(y), k = cos(x) * cy;\n  return [cy * sin(x) / k, sin(y) / k];\n}\n\ngnomonicRaw.invert = azimuthalInvert(atan);\n\nexport default function() {\n  return projection(gnomonicRaw)\n      .scale(144.049)\n      .clipAngle(60);\n}\n", "import {asin, cos, epsilon, sin} from \"../math.js\";\nimport {azimuthalInvert} from \"./azimuthal.js\";\nimport projection from \"./index.js\";\n\nexport function orthographicRaw(x, y) {\n  return [cos(y) * sin(x), sin(y)];\n}\n\northographicRaw.invert = azimuthalInvert(asin);\n\nexport default function() {\n  return projection(orthographicRaw)\n      .scale(249.5)\n      .clipAngle(90 + epsilon);\n}\n", "import {atan, cos, sin} from \"../math.js\";\nimport {azimuthalInvert} from \"./azimuthal.js\";\nimport projection from \"./index.js\";\n\nexport function stereographicRaw(x, y) {\n  var cy = cos(y), k = 1 + cos(x) * cy;\n  return [cy * sin(x) / k, sin(y) / k];\n}\n\nstereographicRaw.invert = azimuthalInvert(function(z) {\n  return 2 * atan(z);\n});\n\nexport default function() {\n  return projection(stereographicRaw)\n      .scale(250)\n      .clipAngle(142);\n}\n", "import {atan, exp, halfPi, log, tan} from \"../math.js\";\nimport {mercatorProjection} from \"./mercator.js\";\n\nexport function transverseMercatorRaw(lambda, phi) {\n  return [log(tan((halfPi + phi) / 2)), -lambda];\n}\n\ntransverseMercatorRaw.invert = function(x, y) {\n  return [-y, 2 * atan(exp(x)) - halfPi];\n};\n\nexport default function() {\n  var m = mercatorProjection(transverseMercatorRaw),\n      center = m.center,\n      rotate = m.rotate;\n\n  m.center = function(_) {\n    return arguments.length ? center([-_[1], _[0]]) : (_ = center(), [_[1], -_[0]]);\n  };\n\n  m.rotate = function(_) {\n    return arguments.length ? rotate([_[0], _[1], _.length > 2 ? _[2] + 90 : 90]) : (_ = rotate(), [_[0], _[1], _[2] - 90]);\n  };\n\n  return rotate([0, 0, 90])\n      .scale(159.155);\n}\n", "export function initRange(domain, range) {\n  switch (arguments.length) {\n    case 0: break;\n    case 1: this.range(domain); break;\n    default: this.range(range).domain(domain); break;\n  }\n  return this;\n}\n\nexport function initInterpolator(domain, interpolator) {\n  switch (arguments.length) {\n    case 0: break;\n    case 1: {\n      if (typeof domain === \"function\") this.interpolator(domain);\n      else this.range(domain);\n      break;\n    }\n    default: {\n      this.domain(domain);\n      if (typeof interpolator === \"function\") this.interpolator(interpolator);\n      else this.range(interpolator);\n      break;\n    }\n  }\n  return this;\n}\n", "import {InternMap} from \"d3-array\";\nimport {initRange} from \"./init.js\";\n\nexport const implicit = Symbol(\"implicit\");\n\nexport default function ordinal() {\n  var index = new InternMap(),\n      domain = [],\n      range = [],\n      unknown = implicit;\n\n  function scale(d) {\n    let i = index.get(d);\n    if (i === undefined) {\n      if (unknown !== implicit) return unknown;\n      index.set(d, i = domain.push(d) - 1);\n    }\n    return range[i % range.length];\n  }\n\n  scale.domain = function(_) {\n    if (!arguments.length) return domain.slice();\n    domain = [], index = new InternMap();\n    for (const value of _) {\n      if (index.has(value)) continue;\n      index.set(value, domain.push(value) - 1);\n    }\n    return scale;\n  };\n\n  scale.range = function(_) {\n    return arguments.length ? (range = Array.from(_), scale) : range.slice();\n  };\n\n  scale.unknown = function(_) {\n    return arguments.length ? (unknown = _, scale) : unknown;\n  };\n\n  scale.copy = function() {\n    return ordinal(domain, range).unknown(unknown);\n  };\n\n  initRange.apply(scale, arguments);\n\n  return scale;\n}\n", "import {range as sequence} from \"d3-array\";\nimport {initRange} from \"./init.js\";\nimport ordinal from \"./ordinal.js\";\n\nexport default function band() {\n  var scale = ordinal().unknown(undefined),\n      domain = scale.domain,\n      ordinalRange = scale.range,\n      r0 = 0,\n      r1 = 1,\n      step,\n      bandwidth,\n      round = false,\n      paddingInner = 0,\n      paddingOuter = 0,\n      align = 0.5;\n\n  delete scale.unknown;\n\n  function rescale() {\n    var n = domain().length,\n        reverse = r1 < r0,\n        start = reverse ? r1 : r0,\n        stop = reverse ? r0 : r1;\n    step = (stop - start) / Math.max(1, n - paddingInner + paddingOuter * 2);\n    if (round) step = Math.floor(step);\n    start += (stop - start - step * (n - paddingInner)) * align;\n    bandwidth = step * (1 - paddingInner);\n    if (round) start = Math.round(start), bandwidth = Math.round(bandwidth);\n    var values = sequence(n).map(function(i) { return start + step * i; });\n    return ordinalRange(reverse ? values.reverse() : values);\n  }\n\n  scale.domain = function(_) {\n    return arguments.length ? (domain(_), rescale()) : domain();\n  };\n\n  scale.range = function(_) {\n    return arguments.length ? ([r0, r1] = _, r0 = +r0, r1 = +r1, rescale()) : [r0, r1];\n  };\n\n  scale.rangeRound = function(_) {\n    return [r0, r1] = _, r0 = +r0, r1 = +r1, round = true, rescale();\n  };\n\n  scale.bandwidth = function() {\n    return bandwidth;\n  };\n\n  scale.step = function() {\n    return step;\n  };\n\n  scale.round = function(_) {\n    return arguments.length ? (round = !!_, rescale()) : round;\n  };\n\n  scale.padding = function(_) {\n    return arguments.length ? (paddingInner = Math.min(1, paddingOuter = +_), rescale()) : paddingInner;\n  };\n\n  scale.paddingInner = function(_) {\n    return arguments.length ? (paddingInner = Math.min(1, _), rescale()) : paddingInner;\n  };\n\n  scale.paddingOuter = function(_) {\n    return arguments.length ? (paddingOuter = +_, rescale()) : paddingOuter;\n  };\n\n  scale.align = function(_) {\n    return arguments.length ? (align = Math.max(0, Math.min(1, _)), rescale()) : align;\n  };\n\n  scale.copy = function() {\n    return band(domain(), [r0, r1])\n        .round(round)\n        .paddingInner(paddingInner)\n        .paddingOuter(paddingOuter)\n        .align(align);\n  };\n\n  return initRange.apply(rescale(), arguments);\n}\n\nfunction pointish(scale) {\n  var copy = scale.copy;\n\n  scale.padding = scale.paddingOuter;\n  delete scale.paddingInner;\n  delete scale.paddingOuter;\n\n  scale.copy = function() {\n    return pointish(copy());\n  };\n\n  return scale;\n}\n\nexport function point() {\n  return pointish(band.apply(null, arguments).paddingInner(1));\n}\n", "export default function constants(x) {\n  return function() {\n    return x;\n  };\n}\n", "export default function number(x) {\n  return +x;\n}\n", "import {bisect} from \"d3-array\";\nimport {interpolate as interpolateValue, interpolateNumber, interpolateRound} from \"d3-interpolate\";\nimport constant from \"./constant.js\";\nimport number from \"./number.js\";\n\nvar unit = [0, 1];\n\nexport function identity(x) {\n  return x;\n}\n\nfunction normalize(a, b) {\n  return (b -= (a = +a))\n      ? function(x) { return (x - a) / b; }\n      : constant(isNaN(b) ? NaN : 0.5);\n}\n\nfunction clamper(a, b) {\n  var t;\n  if (a > b) t = a, a = b, b = t;\n  return function(x) { return Math.max(a, Math.min(b, x)); };\n}\n\n// normalize(a, b)(x) takes a domain value x in [a,b] and returns the corresponding parameter t in [0,1].\n// interpolate(a, b)(t) takes a parameter t in [0,1] and returns the corresponding range value x in [a,b].\nfunction bimap(domain, range, interpolate) {\n  var d0 = domain[0], d1 = domain[1], r0 = range[0], r1 = range[1];\n  if (d1 < d0) d0 = normalize(d1, d0), r0 = interpolate(r1, r0);\n  else d0 = normalize(d0, d1), r0 = interpolate(r0, r1);\n  return function(x) { return r0(d0(x)); };\n}\n\nfunction polymap(domain, range, interpolate) {\n  var j = Math.min(domain.length, range.length) - 1,\n      d = new Array(j),\n      r = new Array(j),\n      i = -1;\n\n  // Reverse descending domains.\n  if (domain[j] < domain[0]) {\n    domain = domain.slice().reverse();\n    range = range.slice().reverse();\n  }\n\n  while (++i < j) {\n    d[i] = normalize(domain[i], domain[i + 1]);\n    r[i] = interpolate(range[i], range[i + 1]);\n  }\n\n  return function(x) {\n    var i = bisect(domain, x, 1, j) - 1;\n    return r[i](d[i](x));\n  };\n}\n\nexport function copy(source, target) {\n  return target\n      .domain(source.domain())\n      .range(source.range())\n      .interpolate(source.interpolate())\n      .clamp(source.clamp())\n      .unknown(source.unknown());\n}\n\nexport function transformer() {\n  var domain = unit,\n      range = unit,\n      interpolate = interpolateValue,\n      transform,\n      untransform,\n      unknown,\n      clamp = identity,\n      piecewise,\n      output,\n      input;\n\n  function rescale() {\n    var n = Math.min(domain.length, range.length);\n    if (clamp !== identity) clamp = clamper(domain[0], domain[n - 1]);\n    piecewise = n > 2 ? polymap : bimap;\n    output = input = null;\n    return scale;\n  }\n\n  function scale(x) {\n    return x == null || isNaN(x = +x) ? unknown : (output || (output = piecewise(domain.map(transform), range, interpolate)))(transform(clamp(x)));\n  }\n\n  scale.invert = function(y) {\n    return clamp(untransform((input || (input = piecewise(range, domain.map(transform), interpolateNumber)))(y)));\n  };\n\n  scale.domain = function(_) {\n    return arguments.length ? (domain = Array.from(_, number), rescale()) : domain.slice();\n  };\n\n  scale.range = function(_) {\n    return arguments.length ? (range = Array.from(_), rescale()) : range.slice();\n  };\n\n  scale.rangeRound = function(_) {\n    return range = Array.from(_), interpolate = interpolateRound, rescale();\n  };\n\n  scale.clamp = function(_) {\n    return arguments.length ? (clamp = _ ? true : identity, rescale()) : clamp !== identity;\n  };\n\n  scale.interpolate = function(_) {\n    return arguments.length ? (interpolate = _, rescale()) : interpolate;\n  };\n\n  scale.unknown = function(_) {\n    return arguments.length ? (unknown = _, scale) : unknown;\n  };\n\n  return function(t, u) {\n    transform = t, untransform = u;\n    return rescale();\n  };\n}\n\nexport default function continuous() {\n  return transformer()(identity, identity);\n}\n", "import {tickStep} from \"d3-array\";\nimport {format, formatPrefix, formatSpecifier, precisionFixed, precisionPrefix, precisionRound} from \"d3-format\";\n\nexport default function tickFormat(start, stop, count, specifier) {\n  var step = tickStep(start, stop, count),\n      precision;\n  specifier = formatSpecifier(specifier == null ? \",f\" : specifier);\n  switch (specifier.type) {\n    case \"s\": {\n      var value = Math.max(Math.abs(start), Math.abs(stop));\n      if (specifier.precision == null && !isNaN(precision = precisionPrefix(step, value))) specifier.precision = precision;\n      return formatPrefix(specifier, value);\n    }\n    case \"\":\n    case \"e\":\n    case \"g\":\n    case \"p\":\n    case \"r\": {\n      if (specifier.precision == null && !isNaN(precision = precisionRound(step, Math.max(Math.abs(start), Math.abs(stop))))) specifier.precision = precision - (specifier.type === \"e\");\n      break;\n    }\n    case \"f\":\n    case \"%\": {\n      if (specifier.precision == null && !isNaN(precision = precisionFixed(step))) specifier.precision = precision - (specifier.type === \"%\") * 2;\n      break;\n    }\n  }\n  return format(specifier);\n}\n", "import {ticks, tickIncrement} from \"d3-array\";\nimport continuous, {copy} from \"./continuous.js\";\nimport {initRange} from \"./init.js\";\nimport tickFormat from \"./tickFormat.js\";\n\nexport function linearish(scale) {\n  var domain = scale.domain;\n\n  scale.ticks = function(count) {\n    var d = domain();\n    return ticks(d[0], d[d.length - 1], count == null ? 10 : count);\n  };\n\n  scale.tickFormat = function(count, specifier) {\n    var d = domain();\n    return tickFormat(d[0], d[d.length - 1], count == null ? 10 : count, specifier);\n  };\n\n  scale.nice = function(count) {\n    if (count == null) count = 10;\n\n    var d = domain();\n    var i0 = 0;\n    var i1 = d.length - 1;\n    var start = d[i0];\n    var stop = d[i1];\n    var prestep;\n    var step;\n    var maxIter = 10;\n\n    if (stop < start) {\n      step = start, start = stop, stop = step;\n      step = i0, i0 = i1, i1 = step;\n    }\n    \n    while (maxIter-- > 0) {\n      step = tickIncrement(start, stop, count);\n      if (step === prestep) {\n        d[i0] = start\n        d[i1] = stop\n        return domain(d);\n      } else if (step > 0) {\n        start = Math.floor(start / step) * step;\n        stop = Math.ceil(stop / step) * step;\n      } else if (step < 0) {\n        start = Math.ceil(start * step) / step;\n        stop = Math.floor(stop * step) / step;\n      } else {\n        break;\n      }\n      prestep = step;\n    }\n\n    return scale;\n  };\n\n  return scale;\n}\n\nexport default function linear() {\n  var scale = continuous();\n\n  scale.copy = function() {\n    return copy(scale, linear());\n  };\n\n  initRange.apply(scale, arguments);\n\n  return linearish(scale);\n}\n", "import {linearish} from \"./linear.js\";\nimport number from \"./number.js\";\n\nexport default function identity(domain) {\n  var unknown;\n\n  function scale(x) {\n    return x == null || isNaN(x = +x) ? unknown : x;\n  }\n\n  scale.invert = scale;\n\n  scale.domain = scale.range = function(_) {\n    return arguments.length ? (domain = Array.from(_, number), scale) : domain.slice();\n  };\n\n  scale.unknown = function(_) {\n    return arguments.length ? (unknown = _, scale) : unknown;\n  };\n\n  scale.copy = function() {\n    return identity(domain).unknown(unknown);\n  };\n\n  domain = arguments.length ? Array.from(domain, number) : [0, 1];\n\n  return linearish(scale);\n}\n", "export default function nice(domain, interval) {\n  domain = domain.slice();\n\n  var i0 = 0,\n      i1 = domain.length - 1,\n      x0 = domain[i0],\n      x1 = domain[i1],\n      t;\n\n  if (x1 < x0) {\n    t = i0, i0 = i1, i1 = t;\n    t = x0, x0 = x1, x1 = t;\n  }\n\n  domain[i0] = interval.floor(x0);\n  domain[i1] = interval.ceil(x1);\n  return domain;\n}\n", "import {ticks} from \"d3-array\";\nimport {format, formatSpecifier} from \"d3-format\";\nimport nice from \"./nice.js\";\nimport {copy, transformer} from \"./continuous.js\";\nimport {initRange} from \"./init.js\";\n\nfunction transformLog(x) {\n  return Math.log(x);\n}\n\nfunction transformExp(x) {\n  return Math.exp(x);\n}\n\nfunction transformLogn(x) {\n  return -Math.log(-x);\n}\n\nfunction transformExpn(x) {\n  return -Math.exp(-x);\n}\n\nfunction pow10(x) {\n  return isFinite(x) ? +(\"1e\" + x) : x < 0 ? 0 : x;\n}\n\nfunction powp(base) {\n  return base === 10 ? pow10\n      : base === Math.E ? Math.exp\n      : x => Math.pow(base, x);\n}\n\nfunction logp(base) {\n  return base === Math.E ? Math.log\n      : base === 10 && Math.log10\n      || base === 2 && Math.log2\n      || (base = Math.log(base), x => Math.log(x) / base);\n}\n\nfunction reflect(f) {\n  return (x, k) => -f(-x, k);\n}\n\nexport function loggish(transform) {\n  const scale = transform(transformLog, transformExp);\n  const domain = scale.domain;\n  let base = 10;\n  let logs;\n  let pows;\n\n  function rescale() {\n    logs = logp(base), pows = powp(base);\n    if (domain()[0] < 0) {\n      logs = reflect(logs), pows = reflect(pows);\n      transform(transformLogn, transformExpn);\n    } else {\n      transform(transformLog, transformExp);\n    }\n    return scale;\n  }\n\n  scale.base = function(_) {\n    return arguments.length ? (base = +_, rescale()) : base;\n  };\n\n  scale.domain = function(_) {\n    return arguments.length ? (domain(_), rescale()) : domain();\n  };\n\n  scale.ticks = count => {\n    const d = domain();\n    let u = d[0];\n    let v = d[d.length - 1];\n    const r = v < u;\n\n    if (r) ([u, v] = [v, u]);\n\n    let i = logs(u);\n    let j = logs(v);\n    let k;\n    let t;\n    const n = count == null ? 10 : +count;\n    let z = [];\n\n    if (!(base % 1) && j - i < n) {\n      i = Math.floor(i), j = Math.ceil(j);\n      if (u > 0) for (; i <= j; ++i) {\n        for (k = 1; k < base; ++k) {\n          t = i < 0 ? k / pows(-i) : k * pows(i);\n          if (t < u) continue;\n          if (t > v) break;\n          z.push(t);\n        }\n      } else for (; i <= j; ++i) {\n        for (k = base - 1; k >= 1; --k) {\n          t = i > 0 ? k / pows(-i) : k * pows(i);\n          if (t < u) continue;\n          if (t > v) break;\n          z.push(t);\n        }\n      }\n      if (z.length * 2 < n) z = ticks(u, v, n);\n    } else {\n      z = ticks(i, j, Math.min(j - i, n)).map(pows);\n    }\n    return r ? z.reverse() : z;\n  };\n\n  scale.tickFormat = (count, specifier) => {\n    if (count == null) count = 10;\n    if (specifier == null) specifier = base === 10 ? \"s\" : \",\";\n    if (typeof specifier !== \"function\") {\n      if (!(base % 1) && (specifier = formatSpecifier(specifier)).precision == null) specifier.trim = true;\n      specifier = format(specifier);\n    }\n    if (count === Infinity) return specifier;\n    const k = Math.max(1, base * count / scale.ticks().length); // TODO fast estimate?\n    return d => {\n      let i = d / pows(Math.round(logs(d)));\n      if (i * base < base - 0.5) i *= base;\n      return i <= k ? specifier(d) : \"\";\n    };\n  };\n\n  scale.nice = () => {\n    return domain(nice(domain(), {\n      floor: x => pows(Math.floor(logs(x))),\n      ceil: x => pows(Math.ceil(logs(x)))\n    }));\n  };\n\n  return scale;\n}\n\nexport default function log() {\n  const scale = loggish(transformer()).domain([1, 10]);\n  scale.copy = () => copy(scale, log()).base(scale.base());\n  initRange.apply(scale, arguments);\n  return scale;\n}\n", "import {linearish} from \"./linear.js\";\nimport {copy, transformer} from \"./continuous.js\";\nimport {initRange} from \"./init.js\";\n\nfunction transformSymlog(c) {\n  return function(x) {\n    return Math.sign(x) * Math.log1p(Math.abs(x / c));\n  };\n}\n\nfunction transformSymexp(c) {\n  return function(x) {\n    return Math.sign(x) * Math.expm1(Math.abs(x)) * c;\n  };\n}\n\nexport function symlogish(transform) {\n  var c = 1, scale = transform(transformSymlog(c), transformSymexp(c));\n\n  scale.constant = function(_) {\n    return arguments.length ? transform(transformSymlog(c = +_), transformSymexp(c)) : c;\n  };\n\n  return linearish(scale);\n}\n\nexport default function symlog() {\n  var scale = symlogish(transformer());\n\n  scale.copy = function() {\n    return copy(scale, symlog()).constant(scale.constant());\n  };\n\n  return initRange.apply(scale, arguments);\n}\n", "import {linearish} from \"./linear.js\";\nimport {copy, identity, transformer} from \"./continuous.js\";\nimport {initRange} from \"./init.js\";\n\nfunction transformPow(exponent) {\n  return function(x) {\n    return x < 0 ? -Math.pow(-x, exponent) : Math.pow(x, exponent);\n  };\n}\n\nfunction transformSqrt(x) {\n  return x < 0 ? -Math.sqrt(-x) : Math.sqrt(x);\n}\n\nfunction transformSquare(x) {\n  return x < 0 ? -x * x : x * x;\n}\n\nexport function powish(transform) {\n  var scale = transform(identity, identity),\n      exponent = 1;\n\n  function rescale() {\n    return exponent === 1 ? transform(identity, identity)\n        : exponent === 0.5 ? transform(transformSqrt, transformSquare)\n        : transform(transformPow(exponent), transformPow(1 / exponent));\n  }\n\n  scale.exponent = function(_) {\n    return arguments.length ? (exponent = +_, rescale()) : exponent;\n  };\n\n  return linearish(scale);\n}\n\nexport default function pow() {\n  var scale = powish(transformer());\n\n  scale.copy = function() {\n    return copy(scale, pow()).exponent(scale.exponent());\n  };\n\n  initRange.apply(scale, arguments);\n\n  return scale;\n}\n\nexport function sqrt() {\n  return pow.apply(null, arguments).exponent(0.5);\n}\n", "import {ascending, bisect, quantileSorted as threshold} from \"d3-array\";\nimport {initRange} from \"./init.js\";\n\nexport default function quantile() {\n  var domain = [],\n      range = [],\n      thresholds = [],\n      unknown;\n\n  function rescale() {\n    var i = 0, n = Math.max(1, range.length);\n    thresholds = new Array(n - 1);\n    while (++i < n) thresholds[i - 1] = threshold(domain, i / n);\n    return scale;\n  }\n\n  function scale(x) {\n    return x == null || isNaN(x = +x) ? unknown : range[bisect(thresholds, x)];\n  }\n\n  scale.invertExtent = function(y) {\n    var i = range.indexOf(y);\n    return i < 0 ? [NaN, NaN] : [\n      i > 0 ? thresholds[i - 1] : domain[0],\n      i < thresholds.length ? thresholds[i] : domain[domain.length - 1]\n    ];\n  };\n\n  scale.domain = function(_) {\n    if (!arguments.length) return domain.slice();\n    domain = [];\n    for (let d of _) if (d != null && !isNaN(d = +d)) domain.push(d);\n    domain.sort(ascending);\n    return rescale();\n  };\n\n  scale.range = function(_) {\n    return arguments.length ? (range = Array.from(_), rescale()) : range.slice();\n  };\n\n  scale.unknown = function(_) {\n    return arguments.length ? (unknown = _, scale) : unknown;\n  };\n\n  scale.quantiles = function() {\n    return thresholds.slice();\n  };\n\n  scale.copy = function() {\n    return quantile()\n        .domain(domain)\n        .range(range)\n        .unknown(unknown);\n  };\n\n  return initRange.apply(scale, arguments);\n}\n", "import {bisect} from \"d3-array\";\nimport {initRange} from \"./init.js\";\n\nexport default function threshold() {\n  var domain = [0.5],\n      range = [0, 1],\n      unknown,\n      n = 1;\n\n  function scale(x) {\n    return x != null && x <= x ? range[bisect(domain, x, 0, n)] : unknown;\n  }\n\n  scale.domain = function(_) {\n    return arguments.length ? (domain = Array.from(_), n = Math.min(domain.length, range.length - 1), scale) : domain.slice();\n  };\n\n  scale.range = function(_) {\n    return arguments.length ? (range = Array.from(_), n = Math.min(domain.length, range.length - 1), scale) : range.slice();\n  };\n\n  scale.invertExtent = function(y) {\n    var i = range.indexOf(y);\n    return [domain[i - 1], domain[i]];\n  };\n\n  scale.unknown = function(_) {\n    return arguments.length ? (unknown = _, scale) : unknown;\n  };\n\n  scale.copy = function() {\n    return threshold()\n        .domain(domain)\n        .range(range)\n        .unknown(unknown);\n  };\n\n  return initRange.apply(scale, arguments);\n}\n", "const t0 = new Date, t1 = new Date;\n\nexport function timeInterval(floori, offseti, count, field) {\n\n  function interval(date) {\n    return floori(date = arguments.length === 0 ? new Date : new Date(+date)), date;\n  }\n\n  interval.floor = (date) => {\n    return floori(date = new Date(+date)), date;\n  };\n\n  interval.ceil = (date) => {\n    return floori(date = new Date(date - 1)), offseti(date, 1), floori(date), date;\n  };\n\n  interval.round = (date) => {\n    const d0 = interval(date), d1 = interval.ceil(date);\n    return date - d0 < d1 - date ? d0 : d1;\n  };\n\n  interval.offset = (date, step) => {\n    return offseti(date = new Date(+date), step == null ? 1 : Math.floor(step)), date;\n  };\n\n  interval.range = (start, stop, step) => {\n    const range = [];\n    start = interval.ceil(start);\n    step = step == null ? 1 : Math.floor(step);\n    if (!(start < stop) || !(step > 0)) return range; // also handles Invalid Date\n    let previous;\n    do range.push(previous = new Date(+start)), offseti(start, step), floori(start);\n    while (previous < start && start < stop);\n    return range;\n  };\n\n  interval.filter = (test) => {\n    return timeInterval((date) => {\n      if (date >= date) while (floori(date), !test(date)) date.setTime(date - 1);\n    }, (date, step) => {\n      if (date >= date) {\n        if (step < 0) while (++step <= 0) {\n          while (offseti(date, -1), !test(date)) {} // eslint-disable-line no-empty\n        } else while (--step >= 0) {\n          while (offseti(date, +1), !test(date)) {} // eslint-disable-line no-empty\n        }\n      }\n    });\n  };\n\n  if (count) {\n    interval.count = (start, end) => {\n      t0.setTime(+start), t1.setTime(+end);\n      floori(t0), floori(t1);\n      return Math.floor(count(t0, t1));\n    };\n\n    interval.every = (step) => {\n      step = Math.floor(step);\n      return !isFinite(step) || !(step > 0) ? null\n          : !(step > 1) ? interval\n          : interval.filter(field\n              ? (d) => field(d) % step === 0\n              : (d) => interval.count(0, d) % step === 0);\n    };\n  }\n\n  return interval;\n}\n", "import {timeInterval} from \"./interval.js\";\n\nexport const millisecond = timeInterval(() => {\n  // noop\n}, (date, step) => {\n  date.setTime(+date + step);\n}, (start, end) => {\n  return end - start;\n});\n\n// An optimized implementation for this simple case.\nmillisecond.every = (k) => {\n  k = Math.floor(k);\n  if (!isFinite(k) || !(k > 0)) return null;\n  if (!(k > 1)) return millisecond;\n  return timeInterval((date) => {\n    date.setTime(Math.floor(date / k) * k);\n  }, (date, step) => {\n    date.setTime(+date + step * k);\n  }, (start, end) => {\n    return (end - start) / k;\n  });\n};\n\nexport const milliseconds = millisecond.range;\n", "import {timeInterval} from \"./interval.js\";\nimport {durationSecond} from \"./duration.js\";\n\nexport const second = timeInterval((date) => {\n  date.setTime(date - date.getMilliseconds());\n}, (date, step) => {\n  date.setTime(+date + step * durationSecond);\n}, (start, end) => {\n  return (end - start) / durationSecond;\n}, (date) => {\n  return date.getUTCSeconds();\n});\n\nexport const seconds = second.range;\n", "import {timeInterval} from \"./interval.js\";\nimport {durationMinute, durationSecond} from \"./duration.js\";\n\nexport const timeMinute = timeInterval((date) => {\n  date.setTime(date - date.getMilliseconds() - date.getSeconds() * durationSecond);\n}, (date, step) => {\n  date.setTime(+date + step * durationMinute);\n}, (start, end) => {\n  return (end - start) / durationMinute;\n}, (date) => {\n  return date.getMinutes();\n});\n\nexport const timeMinutes = timeMinute.range;\n\nexport const utcMinute = timeInterval((date) => {\n  date.setUTCSeconds(0, 0);\n}, (date, step) => {\n  date.setTime(+date + step * durationMinute);\n}, (start, end) => {\n  return (end - start) / durationMinute;\n}, (date) => {\n  return date.getUTCMinutes();\n});\n\nexport const utcMinutes = utcMinute.range;\n", "import {timeInterval} from \"./interval.js\";\nimport {durationHour, durationMinute, durationSecond} from \"./duration.js\";\n\nexport const timeHour = timeInterval((date) => {\n  date.setTime(date - date.getMilliseconds() - date.getSeconds() * durationSecond - date.getMinutes() * durationMinute);\n}, (date, step) => {\n  date.setTime(+date + step * durationHour);\n}, (start, end) => {\n  return (end - start) / durationHour;\n}, (date) => {\n  return date.getHours();\n});\n\nexport const timeHours = timeHour.range;\n\nexport const utcHour = timeInterval((date) => {\n  date.setUTCMinutes(0, 0, 0);\n}, (date, step) => {\n  date.setTime(+date + step * durationHour);\n}, (start, end) => {\n  return (end - start) / durationHour;\n}, (date) => {\n  return date.getUTCHours();\n});\n\nexport const utcHours = utcHour.range;\n", "import {timeInterval} from \"./interval.js\";\nimport {durationDay, durationMinute} from \"./duration.js\";\n\nexport const timeDay = timeInterval(\n  date => date.setHours(0, 0, 0, 0),\n  (date, step) => date.setDate(date.getDate() + step),\n  (start, end) => (end - start - (end.getTimezoneOffset() - start.getTimezoneOffset()) * durationMinute) / durationDay,\n  date => date.getDate() - 1\n);\n\nexport const timeDays = timeDay.range;\n\nexport const utcDay = timeInterval((date) => {\n  date.setUTCHours(0, 0, 0, 0);\n}, (date, step) => {\n  date.setUTCDate(date.getUTCDate() + step);\n}, (start, end) => {\n  return (end - start) / durationDay;\n}, (date) => {\n  return date.getUTCDate() - 1;\n});\n\nexport const utcDays = utcDay.range;\n\nexport const unixDay = timeInterval((date) => {\n  date.setUTCHours(0, 0, 0, 0);\n}, (date, step) => {\n  date.setUTCDate(date.getUTCDate() + step);\n}, (start, end) => {\n  return (end - start) / durationDay;\n}, (date) => {\n  return Math.floor(date / durationDay);\n});\n\nexport const unixDays = unixDay.range;\n", "import {timeInterval} from \"./interval.js\";\nimport {durationMinute, durationWeek} from \"./duration.js\";\n\nfunction timeWeekday(i) {\n  return timeInterval((date) => {\n    date.setDate(date.getDate() - (date.getDay() + 7 - i) % 7);\n    date.setHours(0, 0, 0, 0);\n  }, (date, step) => {\n    date.setDate(date.getDate() + step * 7);\n  }, (start, end) => {\n    return (end - start - (end.getTimezoneOffset() - start.getTimezoneOffset()) * durationMinute) / durationWeek;\n  });\n}\n\nexport const timeSunday = timeWeekday(0);\nexport const timeMonday = timeWeekday(1);\nexport const timeTuesday = timeWeekday(2);\nexport const timeWednesday = timeWeekday(3);\nexport const timeThursday = timeWeekday(4);\nexport const timeFriday = timeWeekday(5);\nexport const timeSaturday = timeWeekday(6);\n\nexport const timeSundays = timeSunday.range;\nexport const timeMondays = timeMonday.range;\nexport const timeTuesdays = timeTuesday.range;\nexport const timeWednesdays = timeWednesday.range;\nexport const timeThursdays = timeThursday.range;\nexport const timeFridays = timeFriday.range;\nexport const timeSaturdays = timeSaturday.range;\n\nfunction utcWeekday(i) {\n  return timeInterval((date) => {\n    date.setUTCDate(date.getUTCDate() - (date.getUTCDay() + 7 - i) % 7);\n    date.setUTCHours(0, 0, 0, 0);\n  }, (date, step) => {\n    date.setUTCDate(date.getUTCDate() + step * 7);\n  }, (start, end) => {\n    return (end - start) / durationWeek;\n  });\n}\n\nexport const utcSunday = utcWeekday(0);\nexport const utcMonday = utcWeekday(1);\nexport const utcTuesday = utcWeekday(2);\nexport const utcWednesday = utcWeekday(3);\nexport const utcThursday = utcWeekday(4);\nexport const utcFriday = utcWeekday(5);\nexport const utcSaturday = utcWeekday(6);\n\nexport const utcSundays = utcSunday.range;\nexport const utcMondays = utcMonday.range;\nexport const utcTuesdays = utcTuesday.range;\nexport const utcWednesdays = utcWednesday.range;\nexport const utcThursdays = utcThursday.range;\nexport const utcFridays = utcFriday.range;\nexport const utcSaturdays = utcSaturday.range;\n", "import {timeInterval} from \"./interval.js\";\n\nexport const timeMonth = timeInterval((date) => {\n  date.setDate(1);\n  date.setHours(0, 0, 0, 0);\n}, (date, step) => {\n  date.setMonth(date.getMonth() + step);\n}, (start, end) => {\n  return end.getMonth() - start.getMonth() + (end.getFullYear() - start.getFullYear()) * 12;\n}, (date) => {\n  return date.getMonth();\n});\n\nexport const timeMonths = timeMonth.range;\n\nexport const utcMonth = timeInterval((date) => {\n  date.setUTCDate(1);\n  date.setUTCHours(0, 0, 0, 0);\n}, (date, step) => {\n  date.setUTCMonth(date.getUTCMonth() + step);\n}, (start, end) => {\n  return end.getUTCMonth() - start.getUTCMonth() + (end.getUTCFullYear() - start.getUTCFullYear()) * 12;\n}, (date) => {\n  return date.getUTCMonth();\n});\n\nexport const utcMonths = utcMonth.range;\n", "import {timeInterval} from \"./interval.js\";\n\nexport const timeYear = timeInterval((date) => {\n  date.setMonth(0, 1);\n  date.setHours(0, 0, 0, 0);\n}, (date, step) => {\n  date.setFullYear(date.getFullYear() + step);\n}, (start, end) => {\n  return end.getFullYear() - start.getFullYear();\n}, (date) => {\n  return date.getFullYear();\n});\n\n// An optimized implementation for this simple case.\ntimeYear.every = (k) => {\n  return !isFinite(k = Math.floor(k)) || !(k > 0) ? null : timeInterval((date) => {\n    date.setFullYear(Math.floor(date.getFullYear() / k) * k);\n    date.setMonth(0, 1);\n    date.setHours(0, 0, 0, 0);\n  }, (date, step) => {\n    date.setFullYear(date.getFullYear() + step * k);\n  });\n};\n\nexport const timeYears = timeYear.range;\n\nexport const utcYear = timeInterval((date) => {\n  date.setUTCMonth(0, 1);\n  date.setUTCHours(0, 0, 0, 0);\n}, (date, step) => {\n  date.setUTCFullYear(date.getUTCFullYear() + step);\n}, (start, end) => {\n  return end.getUTCFullYear() - start.getUTCFullYear();\n}, (date) => {\n  return date.getUTCFullYear();\n});\n\n// An optimized implementation for this simple case.\nutcYear.every = (k) => {\n  return !isFinite(k = Math.floor(k)) || !(k > 0) ? null : timeInterval((date) => {\n    date.setUTCFullYear(Math.floor(date.getUTCFullYear() / k) * k);\n    date.setUTCMonth(0, 1);\n    date.setUTCHours(0, 0, 0, 0);\n  }, (date, step) => {\n    date.setUTCFullYear(date.getUTCFullYear() + step * k);\n  });\n};\n\nexport const utcYears = utcYear.range;\n", "import {bisector, tickStep} from \"d3-array\";\nimport {durationDay, durationHour, durationMinute, durationMonth, durationSecond, durationWeek, durationYear} from \"./duration.js\";\nimport {millisecond} from \"./millisecond.js\";\nimport {second} from \"./second.js\";\nimport {timeMinute, utcMinute} from \"./minute.js\";\nimport {timeHour, utcHour} from \"./hour.js\";\nimport {timeDay, unixDay} from \"./day.js\";\nimport {timeSunday, utcSunday} from \"./week.js\";\nimport {timeMonth, utcMonth} from \"./month.js\";\nimport {timeYear, utcYear} from \"./year.js\";\n\nfunction ticker(year, month, week, day, hour, minute) {\n\n  const tickIntervals = [\n    [second,  1,      durationSecond],\n    [second,  5,  5 * durationSecond],\n    [second, 15, 15 * durationSecond],\n    [second, 30, 30 * durationSecond],\n    [minute,  1,      durationMinute],\n    [minute,  5,  5 * durationMinute],\n    [minute, 15, 15 * durationMinute],\n    [minute, 30, 30 * durationMinute],\n    [  hour,  1,      durationHour  ],\n    [  hour,  3,  3 * durationHour  ],\n    [  hour,  6,  6 * durationHour  ],\n    [  hour, 12, 12 * durationHour  ],\n    [   day,  1,      durationDay   ],\n    [   day,  2,  2 * durationDay   ],\n    [  week,  1,      durationWeek  ],\n    [ month,  1,      durationMonth ],\n    [ month,  3,  3 * durationMonth ],\n    [  year,  1,      durationYear  ]\n  ];\n\n  function ticks(start, stop, count) {\n    const reverse = stop < start;\n    if (reverse) [start, stop] = [stop, start];\n    const interval = count && typeof count.range === \"function\" ? count : tickInterval(start, stop, count);\n    const ticks = interval ? interval.range(start, +stop + 1) : []; // inclusive stop\n    return reverse ? ticks.reverse() : ticks;\n  }\n\n  function tickInterval(start, stop, count) {\n    const target = Math.abs(stop - start) / count;\n    const i = bisector(([,, step]) => step).right(tickIntervals, target);\n    if (i === tickIntervals.length) return year.every(tickStep(start / durationYear, stop / durationYear, count));\n    if (i === 0) return millisecond.every(Math.max(tickStep(start, stop, count), 1));\n    const [t, step] = tickIntervals[target / tickIntervals[i - 1][2] < tickIntervals[i][2] / target ? i - 1 : i];\n    return t.every(step);\n  }\n\n  return [ticks, tickInterval];\n}\n\nconst [utcTicks, utcTickInterval] = ticker(utcYear, utcMonth, utcSunday, unixDay, utcHour, utcMinute);\nconst [timeTicks, timeTickInterval] = ticker(timeYear, timeMonth, timeSunday, timeDay, timeHour, timeMinute);\n\nexport {utcTicks, utcTickInterval, timeTicks, timeTickInterval};\n", "import {\n  timeDay,\n  timeSunday,\n  timeMonday,\n  timeThursday,\n  timeYear,\n  utcDay,\n  utcSunday,\n  utcMonday,\n  utcThursday,\n  utcYear\n} from \"d3-time\";\n\nfunction localDate(d) {\n  if (0 <= d.y && d.y < 100) {\n    var date = new Date(-1, d.m, d.d, d.H, d.M, d.S, d.L);\n    date.setFullYear(d.y);\n    return date;\n  }\n  return new Date(d.y, d.m, d.d, d.H, d.M, d.S, d.L);\n}\n\nfunction utcDate(d) {\n  if (0 <= d.y && d.y < 100) {\n    var date = new Date(Date.UTC(-1, d.m, d.d, d.H, d.M, d.S, d.L));\n    date.setUTCFullYear(d.y);\n    return date;\n  }\n  return new Date(Date.UTC(d.y, d.m, d.d, d.H, d.M, d.S, d.L));\n}\n\nfunction newDate(y, m, d) {\n  return {y: y, m: m, d: d, H: 0, M: 0, S: 0, L: 0};\n}\n\nexport default function formatLocale(locale) {\n  var locale_dateTime = locale.dateTime,\n      locale_date = locale.date,\n      locale_time = locale.time,\n      locale_periods = locale.periods,\n      locale_weekdays = locale.days,\n      locale_shortWeekdays = locale.shortDays,\n      locale_months = locale.months,\n      locale_shortMonths = locale.shortMonths;\n\n  var periodRe = formatRe(locale_periods),\n      periodLookup = formatLookup(locale_periods),\n      weekdayRe = formatRe(locale_weekdays),\n      weekdayLookup = formatLookup(locale_weekdays),\n      shortWeekdayRe = formatRe(locale_shortWeekdays),\n      shortWeekdayLookup = formatLookup(locale_shortWeekdays),\n      monthRe = formatRe(locale_months),\n      monthLookup = formatLookup(locale_months),\n      shortMonthRe = formatRe(locale_shortMonths),\n      shortMonthLookup = formatLookup(locale_shortMonths);\n\n  var formats = {\n    \"a\": formatShortWeekday,\n    \"A\": formatWeekday,\n    \"b\": formatShortMonth,\n    \"B\": formatMonth,\n    \"c\": null,\n    \"d\": formatDayOfMonth,\n    \"e\": formatDayOfMonth,\n    \"f\": formatMicroseconds,\n    \"g\": formatYearISO,\n    \"G\": formatFullYearISO,\n    \"H\": formatHour24,\n    \"I\": formatHour12,\n    \"j\": formatDayOfYear,\n    \"L\": formatMilliseconds,\n    \"m\": formatMonthNumber,\n    \"M\": formatMinutes,\n    \"p\": formatPeriod,\n    \"q\": formatQuarter,\n    \"Q\": formatUnixTimestamp,\n    \"s\": formatUnixTimestampSeconds,\n    \"S\": formatSeconds,\n    \"u\": formatWeekdayNumberMonday,\n    \"U\": formatWeekNumberSunday,\n    \"V\": formatWeekNumberISO,\n    \"w\": formatWeekdayNumberSunday,\n    \"W\": formatWeekNumberMonday,\n    \"x\": null,\n    \"X\": null,\n    \"y\": formatYear,\n    \"Y\": formatFullYear,\n    \"Z\": formatZone,\n    \"%\": formatLiteralPercent\n  };\n\n  var utcFormats = {\n    \"a\": formatUTCShortWeekday,\n    \"A\": formatUTCWeekday,\n    \"b\": formatUTCShortMonth,\n    \"B\": formatUTCMonth,\n    \"c\": null,\n    \"d\": formatUTCDayOfMonth,\n    \"e\": formatUTCDayOfMonth,\n    \"f\": formatUTCMicroseconds,\n    \"g\": formatUTCYearISO,\n    \"G\": formatUTCFullYearISO,\n    \"H\": formatUTCHour24,\n    \"I\": formatUTCHour12,\n    \"j\": formatUTCDayOfYear,\n    \"L\": formatUTCMilliseconds,\n    \"m\": formatUTCMonthNumber,\n    \"M\": formatUTCMinutes,\n    \"p\": formatUTCPeriod,\n    \"q\": formatUTCQuarter,\n    \"Q\": formatUnixTimestamp,\n    \"s\": formatUnixTimestampSeconds,\n    \"S\": formatUTCSeconds,\n    \"u\": formatUTCWeekdayNumberMonday,\n    \"U\": formatUTCWeekNumberSunday,\n    \"V\": formatUTCWeekNumberISO,\n    \"w\": formatUTCWeekdayNumberSunday,\n    \"W\": formatUTCWeekNumberMonday,\n    \"x\": null,\n    \"X\": null,\n    \"y\": formatUTCYear,\n    \"Y\": formatUTCFullYear,\n    \"Z\": formatUTCZone,\n    \"%\": formatLiteralPercent\n  };\n\n  var parses = {\n    \"a\": parseShortWeekday,\n    \"A\": parseWeekday,\n    \"b\": parseShortMonth,\n    \"B\": parseMonth,\n    \"c\": parseLocaleDateTime,\n    \"d\": parseDayOfMonth,\n    \"e\": parseDayOfMonth,\n    \"f\": parseMicroseconds,\n    \"g\": parseYear,\n    \"G\": parseFullYear,\n    \"H\": parseHour24,\n    \"I\": parseHour24,\n    \"j\": parseDayOfYear,\n    \"L\": parseMilliseconds,\n    \"m\": parseMonthNumber,\n    \"M\": parseMinutes,\n    \"p\": parsePeriod,\n    \"q\": parseQuarter,\n    \"Q\": parseUnixTimestamp,\n    \"s\": parseUnixTimestampSeconds,\n    \"S\": parseSeconds,\n    \"u\": parseWeekdayNumberMonday,\n    \"U\": parseWeekNumberSunday,\n    \"V\": parseWeekNumberISO,\n    \"w\": parseWeekdayNumberSunday,\n    \"W\": parseWeekNumberMonday,\n    \"x\": parseLocaleDate,\n    \"X\": parseLocaleTime,\n    \"y\": parseYear,\n    \"Y\": parseFullYear,\n    \"Z\": parseZone,\n    \"%\": parseLiteralPercent\n  };\n\n  // These recursive directive definitions must be deferred.\n  formats.x = newFormat(locale_date, formats);\n  formats.X = newFormat(locale_time, formats);\n  formats.c = newFormat(locale_dateTime, formats);\n  utcFormats.x = newFormat(locale_date, utcFormats);\n  utcFormats.X = newFormat(locale_time, utcFormats);\n  utcFormats.c = newFormat(locale_dateTime, utcFormats);\n\n  function newFormat(specifier, formats) {\n    return function(date) {\n      var string = [],\n          i = -1,\n          j = 0,\n          n = specifier.length,\n          c,\n          pad,\n          format;\n\n      if (!(date instanceof Date)) date = new Date(+date);\n\n      while (++i < n) {\n        if (specifier.charCodeAt(i) === 37) {\n          string.push(specifier.slice(j, i));\n          if ((pad = pads[c = specifier.charAt(++i)]) != null) c = specifier.charAt(++i);\n          else pad = c === \"e\" ? \" \" : \"0\";\n          if (format = formats[c]) c = format(date, pad);\n          string.push(c);\n          j = i + 1;\n        }\n      }\n\n      string.push(specifier.slice(j, i));\n      return string.join(\"\");\n    };\n  }\n\n  function newParse(specifier, Z) {\n    return function(string) {\n      var d = newDate(1900, undefined, 1),\n          i = parseSpecifier(d, specifier, string += \"\", 0),\n          week, day;\n      if (i != string.length) return null;\n\n      // If a UNIX timestamp is specified, return it.\n      if (\"Q\" in d) return new Date(d.Q);\n      if (\"s\" in d) return new Date(d.s * 1000 + (\"L\" in d ? d.L : 0));\n\n      // If this is utcParse, never use the local timezone.\n      if (Z && !(\"Z\" in d)) d.Z = 0;\n\n      // The am-pm flag is 0 for AM, and 1 for PM.\n      if (\"p\" in d) d.H = d.H % 12 + d.p * 12;\n\n      // If the month was not specified, inherit from the quarter.\n      if (d.m === undefined) d.m = \"q\" in d ? d.q : 0;\n\n      // Convert day-of-week and week-of-year to day-of-year.\n      if (\"V\" in d) {\n        if (d.V < 1 || d.V > 53) return null;\n        if (!(\"w\" in d)) d.w = 1;\n        if (\"Z\" in d) {\n          week = utcDate(newDate(d.y, 0, 1)), day = week.getUTCDay();\n          week = day > 4 || day === 0 ? utcMonday.ceil(week) : utcMonday(week);\n          week = utcDay.offset(week, (d.V - 1) * 7);\n          d.y = week.getUTCFullYear();\n          d.m = week.getUTCMonth();\n          d.d = week.getUTCDate() + (d.w + 6) % 7;\n        } else {\n          week = localDate(newDate(d.y, 0, 1)), day = week.getDay();\n          week = day > 4 || day === 0 ? timeMonday.ceil(week) : timeMonday(week);\n          week = timeDay.offset(week, (d.V - 1) * 7);\n          d.y = week.getFullYear();\n          d.m = week.getMonth();\n          d.d = week.getDate() + (d.w + 6) % 7;\n        }\n      } else if (\"W\" in d || \"U\" in d) {\n        if (!(\"w\" in d)) d.w = \"u\" in d ? d.u % 7 : \"W\" in d ? 1 : 0;\n        day = \"Z\" in d ? utcDate(newDate(d.y, 0, 1)).getUTCDay() : localDate(newDate(d.y, 0, 1)).getDay();\n        d.m = 0;\n        d.d = \"W\" in d ? (d.w + 6) % 7 + d.W * 7 - (day + 5) % 7 : d.w + d.U * 7 - (day + 6) % 7;\n      }\n\n      // If a time zone is specified, all fields are interpreted as UTC and then\n      // offset according to the specified time zone.\n      if (\"Z\" in d) {\n        d.H += d.Z / 100 | 0;\n        d.M += d.Z % 100;\n        return utcDate(d);\n      }\n\n      // Otherwise, all fields are in local time.\n      return localDate(d);\n    };\n  }\n\n  function parseSpecifier(d, specifier, string, j) {\n    var i = 0,\n        n = specifier.length,\n        m = string.length,\n        c,\n        parse;\n\n    while (i < n) {\n      if (j >= m) return -1;\n      c = specifier.charCodeAt(i++);\n      if (c === 37) {\n        c = specifier.charAt(i++);\n        parse = parses[c in pads ? specifier.charAt(i++) : c];\n        if (!parse || ((j = parse(d, string, j)) < 0)) return -1;\n      } else if (c != string.charCodeAt(j++)) {\n        return -1;\n      }\n    }\n\n    return j;\n  }\n\n  function parsePeriod(d, string, i) {\n    var n = periodRe.exec(string.slice(i));\n    return n ? (d.p = periodLookup.get(n[0].toLowerCase()), i + n[0].length) : -1;\n  }\n\n  function parseShortWeekday(d, string, i) {\n    var n = shortWeekdayRe.exec(string.slice(i));\n    return n ? (d.w = shortWeekdayLookup.get(n[0].toLowerCase()), i + n[0].length) : -1;\n  }\n\n  function parseWeekday(d, string, i) {\n    var n = weekdayRe.exec(string.slice(i));\n    return n ? (d.w = weekdayLookup.get(n[0].toLowerCase()), i + n[0].length) : -1;\n  }\n\n  function parseShortMonth(d, string, i) {\n    var n = shortMonthRe.exec(string.slice(i));\n    return n ? (d.m = shortMonthLookup.get(n[0].toLowerCase()), i + n[0].length) : -1;\n  }\n\n  function parseMonth(d, string, i) {\n    var n = monthRe.exec(string.slice(i));\n    return n ? (d.m = monthLookup.get(n[0].toLowerCase()), i + n[0].length) : -1;\n  }\n\n  function parseLocaleDateTime(d, string, i) {\n    return parseSpecifier(d, locale_dateTime, string, i);\n  }\n\n  function parseLocaleDate(d, string, i) {\n    return parseSpecifier(d, locale_date, string, i);\n  }\n\n  function parseLocaleTime(d, string, i) {\n    return parseSpecifier(d, locale_time, string, i);\n  }\n\n  function formatShortWeekday(d) {\n    return locale_shortWeekdays[d.getDay()];\n  }\n\n  function formatWeekday(d) {\n    return locale_weekdays[d.getDay()];\n  }\n\n  function formatShortMonth(d) {\n    return locale_shortMonths[d.getMonth()];\n  }\n\n  function formatMonth(d) {\n    return locale_months[d.getMonth()];\n  }\n\n  function formatPeriod(d) {\n    return locale_periods[+(d.getHours() >= 12)];\n  }\n\n  function formatQuarter(d) {\n    return 1 + ~~(d.getMonth() / 3);\n  }\n\n  function formatUTCShortWeekday(d) {\n    return locale_shortWeekdays[d.getUTCDay()];\n  }\n\n  function formatUTCWeekday(d) {\n    return locale_weekdays[d.getUTCDay()];\n  }\n\n  function formatUTCShortMonth(d) {\n    return locale_shortMonths[d.getUTCMonth()];\n  }\n\n  function formatUTCMonth(d) {\n    return locale_months[d.getUTCMonth()];\n  }\n\n  function formatUTCPeriod(d) {\n    return locale_periods[+(d.getUTCHours() >= 12)];\n  }\n\n  function formatUTCQuarter(d) {\n    return 1 + ~~(d.getUTCMonth() / 3);\n  }\n\n  return {\n    format: function(specifier) {\n      var f = newFormat(specifier += \"\", formats);\n      f.toString = function() { return specifier; };\n      return f;\n    },\n    parse: function(specifier) {\n      var p = newParse(specifier += \"\", false);\n      p.toString = function() { return specifier; };\n      return p;\n    },\n    utcFormat: function(specifier) {\n      var f = newFormat(specifier += \"\", utcFormats);\n      f.toString = function() { return specifier; };\n      return f;\n    },\n    utcParse: function(specifier) {\n      var p = newParse(specifier += \"\", true);\n      p.toString = function() { return specifier; };\n      return p;\n    }\n  };\n}\n\nvar pads = {\"-\": \"\", \"_\": \" \", \"0\": \"0\"},\n    numberRe = /^\\s*\\d+/, // note: ignores next directive\n    percentRe = /^%/,\n    requoteRe = /[\\\\^$*+?|[\\]().{}]/g;\n\nfunction pad(value, fill, width) {\n  var sign = value < 0 ? \"-\" : \"\",\n      string = (sign ? -value : value) + \"\",\n      length = string.length;\n  return sign + (length < width ? new Array(width - length + 1).join(fill) + string : string);\n}\n\nfunction requote(s) {\n  return s.replace(requoteRe, \"\\\\$&\");\n}\n\nfunction formatRe(names) {\n  return new RegExp(\"^(?:\" + names.map(requote).join(\"|\") + \")\", \"i\");\n}\n\nfunction formatLookup(names) {\n  return new Map(names.map((name, i) => [name.toLowerCase(), i]));\n}\n\nfunction parseWeekdayNumberSunday(d, string, i) {\n  var n = numberRe.exec(string.slice(i, i + 1));\n  return n ? (d.w = +n[0], i + n[0].length) : -1;\n}\n\nfunction parseWeekdayNumberMonday(d, string, i) {\n  var n = numberRe.exec(string.slice(i, i + 1));\n  return n ? (d.u = +n[0], i + n[0].length) : -1;\n}\n\nfunction parseWeekNumberSunday(d, string, i) {\n  var n = numberRe.exec(string.slice(i, i + 2));\n  return n ? (d.U = +n[0], i + n[0].length) : -1;\n}\n\nfunction parseWeekNumberISO(d, string, i) {\n  var n = numberRe.exec(string.slice(i, i + 2));\n  return n ? (d.V = +n[0], i + n[0].length) : -1;\n}\n\nfunction parseWeekNumberMonday(d, string, i) {\n  var n = numberRe.exec(string.slice(i, i + 2));\n  return n ? (d.W = +n[0], i + n[0].length) : -1;\n}\n\nfunction parseFullYear(d, string, i) {\n  var n = numberRe.exec(string.slice(i, i + 4));\n  return n ? (d.y = +n[0], i + n[0].length) : -1;\n}\n\nfunction parseYear(d, string, i) {\n  var n = numberRe.exec(string.slice(i, i + 2));\n  return n ? (d.y = +n[0] + (+n[0] > 68 ? 1900 : 2000), i + n[0].length) : -1;\n}\n\nfunction parseZone(d, string, i) {\n  var n = /^(Z)|([+-]\\d\\d)(?::?(\\d\\d))?/.exec(string.slice(i, i + 6));\n  return n ? (d.Z = n[1] ? 0 : -(n[2] + (n[3] || \"00\")), i + n[0].length) : -1;\n}\n\nfunction parseQuarter(d, string, i) {\n  var n = numberRe.exec(string.slice(i, i + 1));\n  return n ? (d.q = n[0] * 3 - 3, i + n[0].length) : -1;\n}\n\nfunction parseMonthNumber(d, string, i) {\n  var n = numberRe.exec(string.slice(i, i + 2));\n  return n ? (d.m = n[0] - 1, i + n[0].length) : -1;\n}\n\nfunction parseDayOfMonth(d, string, i) {\n  var n = numberRe.exec(string.slice(i, i + 2));\n  return n ? (d.d = +n[0], i + n[0].length) : -1;\n}\n\nfunction parseDayOfYear(d, string, i) {\n  var n = numberRe.exec(string.slice(i, i + 3));\n  return n ? (d.m = 0, d.d = +n[0], i + n[0].length) : -1;\n}\n\nfunction parseHour24(d, string, i) {\n  var n = numberRe.exec(string.slice(i, i + 2));\n  return n ? (d.H = +n[0], i + n[0].length) : -1;\n}\n\nfunction parseMinutes(d, string, i) {\n  var n = numberRe.exec(string.slice(i, i + 2));\n  return n ? (d.M = +n[0], i + n[0].length) : -1;\n}\n\nfunction parseSeconds(d, string, i) {\n  var n = numberRe.exec(string.slice(i, i + 2));\n  return n ? (d.S = +n[0], i + n[0].length) : -1;\n}\n\nfunction parseMilliseconds(d, string, i) {\n  var n = numberRe.exec(string.slice(i, i + 3));\n  return n ? (d.L = +n[0], i + n[0].length) : -1;\n}\n\nfunction parseMicroseconds(d, string, i) {\n  var n = numberRe.exec(string.slice(i, i + 6));\n  return n ? (d.L = Math.floor(n[0] / 1000), i + n[0].length) : -1;\n}\n\nfunction parseLiteralPercent(d, string, i) {\n  var n = percentRe.exec(string.slice(i, i + 1));\n  return n ? i + n[0].length : -1;\n}\n\nfunction parseUnixTimestamp(d, string, i) {\n  var n = numberRe.exec(string.slice(i));\n  return n ? (d.Q = +n[0], i + n[0].length) : -1;\n}\n\nfunction parseUnixTimestampSeconds(d, string, i) {\n  var n = numberRe.exec(string.slice(i));\n  return n ? (d.s = +n[0], i + n[0].length) : -1;\n}\n\nfunction formatDayOfMonth(d, p) {\n  return pad(d.getDate(), p, 2);\n}\n\nfunction formatHour24(d, p) {\n  return pad(d.getHours(), p, 2);\n}\n\nfunction formatHour12(d, p) {\n  return pad(d.getHours() % 12 || 12, p, 2);\n}\n\nfunction formatDayOfYear(d, p) {\n  return pad(1 + timeDay.count(timeYear(d), d), p, 3);\n}\n\nfunction formatMilliseconds(d, p) {\n  return pad(d.getMilliseconds(), p, 3);\n}\n\nfunction formatMicroseconds(d, p) {\n  return formatMilliseconds(d, p) + \"000\";\n}\n\nfunction formatMonthNumber(d, p) {\n  return pad(d.getMonth() + 1, p, 2);\n}\n\nfunction formatMinutes(d, p) {\n  return pad(d.getMinutes(), p, 2);\n}\n\nfunction formatSeconds(d, p) {\n  return pad(d.getSeconds(), p, 2);\n}\n\nfunction formatWeekdayNumberMonday(d) {\n  var day = d.getDay();\n  return day === 0 ? 7 : day;\n}\n\nfunction formatWeekNumberSunday(d, p) {\n  return pad(timeSunday.count(timeYear(d) - 1, d), p, 2);\n}\n\nfunction dISO(d) {\n  var day = d.getDay();\n  return (day >= 4 || day === 0) ? timeThursday(d) : timeThursday.ceil(d);\n}\n\nfunction formatWeekNumberISO(d, p) {\n  d = dISO(d);\n  return pad(timeThursday.count(timeYear(d), d) + (timeYear(d).getDay() === 4), p, 2);\n}\n\nfunction formatWeekdayNumberSunday(d) {\n  return d.getDay();\n}\n\nfunction formatWeekNumberMonday(d, p) {\n  return pad(timeMonday.count(timeYear(d) - 1, d), p, 2);\n}\n\nfunction formatYear(d, p) {\n  return pad(d.getFullYear() % 100, p, 2);\n}\n\nfunction formatYearISO(d, p) {\n  d = dISO(d);\n  return pad(d.getFullYear() % 100, p, 2);\n}\n\nfunction formatFullYear(d, p) {\n  return pad(d.getFullYear() % 10000, p, 4);\n}\n\nfunction formatFullYearISO(d, p) {\n  var day = d.getDay();\n  d = (day >= 4 || day === 0) ? timeThursday(d) : timeThursday.ceil(d);\n  return pad(d.getFullYear() % 10000, p, 4);\n}\n\nfunction formatZone(d) {\n  var z = d.getTimezoneOffset();\n  return (z > 0 ? \"-\" : (z *= -1, \"+\"))\n      + pad(z / 60 | 0, \"0\", 2)\n      + pad(z % 60, \"0\", 2);\n}\n\nfunction formatUTCDayOfMonth(d, p) {\n  return pad(d.getUTCDate(), p, 2);\n}\n\nfunction formatUTCHour24(d, p) {\n  return pad(d.getUTCHours(), p, 2);\n}\n\nfunction formatUTCHour12(d, p) {\n  return pad(d.getUTCHours() % 12 || 12, p, 2);\n}\n\nfunction formatUTCDayOfYear(d, p) {\n  return pad(1 + utcDay.count(utcYear(d), d), p, 3);\n}\n\nfunction formatUTCMilliseconds(d, p) {\n  return pad(d.getUTCMilliseconds(), p, 3);\n}\n\nfunction formatUTCMicroseconds(d, p) {\n  return formatUTCMilliseconds(d, p) + \"000\";\n}\n\nfunction formatUTCMonthNumber(d, p) {\n  return pad(d.getUTCMonth() + 1, p, 2);\n}\n\nfunction formatUTCMinutes(d, p) {\n  return pad(d.getUTCMinutes(), p, 2);\n}\n\nfunction formatUTCSeconds(d, p) {\n  return pad(d.getUTCSeconds(), p, 2);\n}\n\nfunction formatUTCWeekdayNumberMonday(d) {\n  var dow = d.getUTCDay();\n  return dow === 0 ? 7 : dow;\n}\n\nfunction formatUTCWeekNumberSunday(d, p) {\n  return pad(utcSunday.count(utcYear(d) - 1, d), p, 2);\n}\n\nfunction UTCdISO(d) {\n  var day = d.getUTCDay();\n  return (day >= 4 || day === 0) ? utcThursday(d) : utcThursday.ceil(d);\n}\n\nfunction formatUTCWeekNumberISO(d, p) {\n  d = UTCdISO(d);\n  return pad(utcThursday.count(utcYear(d), d) + (utcYear(d).getUTCDay() === 4), p, 2);\n}\n\nfunction formatUTCWeekdayNumberSunday(d) {\n  return d.getUTCDay();\n}\n\nfunction formatUTCWeekNumberMonday(d, p) {\n  return pad(utcMonday.count(utcYear(d) - 1, d), p, 2);\n}\n\nfunction formatUTCYear(d, p) {\n  return pad(d.getUTCFullYear() % 100, p, 2);\n}\n\nfunction formatUTCYearISO(d, p) {\n  d = UTCdISO(d);\n  return pad(d.getUTCFullYear() % 100, p, 2);\n}\n\nfunction formatUTCFullYear(d, p) {\n  return pad(d.getUTCFullYear() % 10000, p, 4);\n}\n\nfunction formatUTCFullYearISO(d, p) {\n  var day = d.getUTCDay();\n  d = (day >= 4 || day === 0) ? utcThursday(d) : utcThursday.ceil(d);\n  return pad(d.getUTCFullYear() % 10000, p, 4);\n}\n\nfunction formatUTCZone() {\n  return \"+0000\";\n}\n\nfunction formatLiteralPercent() {\n  return \"%\";\n}\n\nfunction formatUnixTimestamp(d) {\n  return +d;\n}\n\nfunction formatUnixTimestampSeconds(d) {\n  return Math.floor(+d / 1000);\n}\n", "import formatLocale from \"./locale.js\";\n\nvar locale;\nexport var timeFormat;\nexport var timeParse;\nexport var utcFormat;\nexport var utcParse;\n\ndefaultLocale({\n  dateTime: \"%x, %X\",\n  date: \"%-m/%-d/%Y\",\n  time: \"%-I:%M:%S %p\",\n  periods: [\"AM\", \"PM\"],\n  days: [\"Sunday\", \"Monday\", \"Tuesday\", \"Wednesday\", \"Thursday\", \"Friday\", \"Saturday\"],\n  shortDays: [\"Sun\", \"Mon\", \"Tue\", \"Wed\", \"Thu\", \"Fri\", \"Sat\"],\n  months: [\"January\", \"February\", \"March\", \"April\", \"May\", \"June\", \"July\", \"August\", \"September\", \"October\", \"November\", \"December\"],\n  shortMonths: [\"Jan\", \"Feb\", \"Mar\", \"Apr\", \"May\", \"Jun\", \"Jul\", \"Aug\", \"Sep\", \"Oct\", \"Nov\", \"Dec\"]\n});\n\nexport default function defaultLocale(definition) {\n  locale = formatLocale(definition);\n  timeFormat = locale.format;\n  timeParse = locale.parse;\n  utcFormat = locale.utcFormat;\n  utcParse = locale.utcParse;\n  return locale;\n}\n", "import {timeYear, timeMonth, timeWeek, timeDay, timeHour, timeMinute, timeSecond, timeTicks, timeTickInterval} from \"d3-time\";\nimport {timeFormat} from \"d3-time-format\";\nimport continuous, {copy} from \"./continuous.js\";\nimport {initRange} from \"./init.js\";\nimport nice from \"./nice.js\";\n\nfunction date(t) {\n  return new Date(t);\n}\n\nfunction number(t) {\n  return t instanceof Date ? +t : +new Date(+t);\n}\n\nexport function calendar(ticks, tickInterval, year, month, week, day, hour, minute, second, format) {\n  var scale = continuous(),\n      invert = scale.invert,\n      domain = scale.domain;\n\n  var formatMillisecond = format(\".%L\"),\n      formatSecond = format(\":%S\"),\n      formatMinute = format(\"%I:%M\"),\n      formatHour = format(\"%I %p\"),\n      formatDay = format(\"%a %d\"),\n      formatWeek = format(\"%b %d\"),\n      formatMonth = format(\"%B\"),\n      formatYear = format(\"%Y\");\n\n  function tickFormat(date) {\n    return (second(date) < date ? formatMillisecond\n        : minute(date) < date ? formatSecond\n        : hour(date) < date ? formatMinute\n        : day(date) < date ? formatHour\n        : month(date) < date ? (week(date) < date ? formatDay : formatWeek)\n        : year(date) < date ? formatMonth\n        : formatYear)(date);\n  }\n\n  scale.invert = function(y) {\n    return new Date(invert(y));\n  };\n\n  scale.domain = function(_) {\n    return arguments.length ? domain(Array.from(_, number)) : domain().map(date);\n  };\n\n  scale.ticks = function(interval) {\n    var d = domain();\n    return ticks(d[0], d[d.length - 1], interval == null ? 10 : interval);\n  };\n\n  scale.tickFormat = function(count, specifier) {\n    return specifier == null ? tickFormat : format(specifier);\n  };\n\n  scale.nice = function(interval) {\n    var d = domain();\n    if (!interval || typeof interval.range !== \"function\") interval = tickInterval(d[0], d[d.length - 1], interval == null ? 10 : interval);\n    return interval ? domain(nice(d, interval)) : scale;\n  };\n\n  scale.copy = function() {\n    return copy(scale, calendar(ticks, tickInterval, year, month, week, day, hour, minute, second, format));\n  };\n\n  return scale;\n}\n\nexport default function time() {\n  return initRange.apply(calendar(timeTicks, timeTickInterval, timeYear, timeMonth, timeWeek, timeDay, timeHour, timeMinute, timeSecond, timeFormat).domain([new Date(2000, 0, 1), new Date(2000, 0, 2)]), arguments);\n}\n", "import {utcYear, utcMonth, utcWeek, utcDay, utcHour, utcMinute, utcSecond, utcTicks, utcTickInterval} from \"d3-time\";\nimport {utcFormat} from \"d3-time-format\";\nimport {calendar} from \"./time.js\";\nimport {initRange} from \"./init.js\";\n\nexport default function utcTime() {\n  return initRange.apply(calendar(utcTicks, utcTickInterval, utcYear, utcMonth, utcWeek, utcDay, utcHour, utcMinute, utcSecond, utcFormat).domain([Date.UTC(2000, 0, 1), Date.UTC(2000, 0, 2)]), arguments);\n}\n", "import {interpolate, interpolateRound} from \"d3-interpolate\";\nimport {identity} from \"./continuous.js\";\nimport {initInterpolator} from \"./init.js\";\nimport {linearish} from \"./linear.js\";\nimport {loggish} from \"./log.js\";\nimport {symlogish} from \"./symlog.js\";\nimport {powish} from \"./pow.js\";\n\nfunction transformer() {\n  var x0 = 0,\n      x1 = 1,\n      t0,\n      t1,\n      k10,\n      transform,\n      interpolator = identity,\n      clamp = false,\n      unknown;\n\n  function scale(x) {\n    return x == null || isNaN(x = +x) ? unknown : interpolator(k10 === 0 ? 0.5 : (x = (transform(x) - t0) * k10, clamp ? Math.max(0, Math.min(1, x)) : x));\n  }\n\n  scale.domain = function(_) {\n    return arguments.length ? ([x0, x1] = _, t0 = transform(x0 = +x0), t1 = transform(x1 = +x1), k10 = t0 === t1 ? 0 : 1 / (t1 - t0), scale) : [x0, x1];\n  };\n\n  scale.clamp = function(_) {\n    return arguments.length ? (clamp = !!_, scale) : clamp;\n  };\n\n  scale.interpolator = function(_) {\n    return arguments.length ? (interpolator = _, scale) : interpolator;\n  };\n\n  function range(interpolate) {\n    return function(_) {\n      var r0, r1;\n      return arguments.length ? ([r0, r1] = _, interpolator = interpolate(r0, r1), scale) : [interpolator(0), interpolator(1)];\n    };\n  }\n\n  scale.range = range(interpolate);\n\n  scale.rangeRound = range(interpolateRound);\n\n  scale.unknown = function(_) {\n    return arguments.length ? (unknown = _, scale) : unknown;\n  };\n\n  return function(t) {\n    transform = t, t0 = t(x0), t1 = t(x1), k10 = t0 === t1 ? 0 : 1 / (t1 - t0);\n    return scale;\n  };\n}\n\nexport function copy(source, target) {\n  return target\n      .domain(source.domain())\n      .interpolator(source.interpolator())\n      .clamp(source.clamp())\n      .unknown(source.unknown());\n}\n\nexport default function sequential() {\n  var scale = linearish(transformer()(identity));\n\n  scale.copy = function() {\n    return copy(scale, sequential());\n  };\n\n  return initInterpolator.apply(scale, arguments);\n}\n\nexport function sequentialLog() {\n  var scale = loggish(transformer()).domain([1, 10]);\n\n  scale.copy = function() {\n    return copy(scale, sequentialLog()).base(scale.base());\n  };\n\n  return initInterpolator.apply(scale, arguments);\n}\n\nexport function sequentialSymlog() {\n  var scale = symlogish(transformer());\n\n  scale.copy = function() {\n    return copy(scale, sequentialSymlog()).constant(scale.constant());\n  };\n\n  return initInterpolator.apply(scale, arguments);\n}\n\nexport function sequentialPow() {\n  var scale = powish(transformer());\n\n  scale.copy = function() {\n    return copy(scale, sequentialPow()).exponent(scale.exponent());\n  };\n\n  return initInterpolator.apply(scale, arguments);\n}\n\nexport function sequentialSqrt() {\n  return sequentialPow.apply(null, arguments).exponent(0.5);\n}\n", "import {interpolate, interpolateRound, piecewise} from \"d3-interpolate\";\nimport {identity} from \"./continuous.js\";\nimport {initInterpolator} from \"./init.js\";\nimport {linearish} from \"./linear.js\";\nimport {loggish} from \"./log.js\";\nimport {copy} from \"./sequential.js\";\nimport {symlogish} from \"./symlog.js\";\nimport {powish} from \"./pow.js\";\n\nfunction transformer() {\n  var x0 = 0,\n      x1 = 0.5,\n      x2 = 1,\n      s = 1,\n      t0,\n      t1,\n      t2,\n      k10,\n      k21,\n      interpolator = identity,\n      transform,\n      clamp = false,\n      unknown;\n\n  function scale(x) {\n    return isNaN(x = +x) ? unknown : (x = 0.5 + ((x = +transform(x)) - t1) * (s * x < s * t1 ? k10 : k21), interpolator(clamp ? Math.max(0, Math.min(1, x)) : x));\n  }\n\n  scale.domain = function(_) {\n    return arguments.length ? ([x0, x1, x2] = _, t0 = transform(x0 = +x0), t1 = transform(x1 = +x1), t2 = transform(x2 = +x2), k10 = t0 === t1 ? 0 : 0.5 / (t1 - t0), k21 = t1 === t2 ? 0 : 0.5 / (t2 - t1), s = t1 < t0 ? -1 : 1, scale) : [x0, x1, x2];\n  };\n\n  scale.clamp = function(_) {\n    return arguments.length ? (clamp = !!_, scale) : clamp;\n  };\n\n  scale.interpolator = function(_) {\n    return arguments.length ? (interpolator = _, scale) : interpolator;\n  };\n\n  function range(interpolate) {\n    return function(_) {\n      var r0, r1, r2;\n      return arguments.length ? ([r0, r1, r2] = _, interpolator = piecewise(interpolate, [r0, r1, r2]), scale) : [interpolator(0), interpolator(0.5), interpolator(1)];\n    };\n  }\n\n  scale.range = range(interpolate);\n\n  scale.rangeRound = range(interpolateRound);\n\n  scale.unknown = function(_) {\n    return arguments.length ? (unknown = _, scale) : unknown;\n  };\n\n  return function(t) {\n    transform = t, t0 = t(x0), t1 = t(x1), t2 = t(x2), k10 = t0 === t1 ? 0 : 0.5 / (t1 - t0), k21 = t1 === t2 ? 0 : 0.5 / (t2 - t1), s = t1 < t0 ? -1 : 1;\n    return scale;\n  };\n}\n\nexport default function diverging() {\n  var scale = linearish(transformer()(identity));\n\n  scale.copy = function() {\n    return copy(scale, diverging());\n  };\n\n  return initInterpolator.apply(scale, arguments);\n}\n\nexport function divergingLog() {\n  var scale = loggish(transformer()).domain([0.1, 1, 10]);\n\n  scale.copy = function() {\n    return copy(scale, divergingLog()).base(scale.base());\n  };\n\n  return initInterpolator.apply(scale, arguments);\n}\n\nexport function divergingSymlog() {\n  var scale = symlogish(transformer());\n\n  scale.copy = function() {\n    return copy(scale, divergingSymlog()).constant(scale.constant());\n  };\n\n  return initInterpolator.apply(scale, arguments);\n}\n\nexport function divergingPow() {\n  var scale = powish(transformer());\n\n  scale.copy = function() {\n    return copy(scale, divergingPow()).exponent(scale.exponent());\n  };\n\n  return initInterpolator.apply(scale, arguments);\n}\n\nexport function divergingSqrt() {\n  return divergingPow.apply(null, arguments).exponent(0.5);\n}\n", "export default function(specifier) {\n  var n = specifier.length / 6 | 0, colors = new Array(n), i = 0;\n  while (i < n) colors[i] = \"#\" + specifier.slice(i * 6, ++i * 6);\n  return colors;\n}\n", "import colors from \"../colors.js\";\n\nexport default colors(\"1f77b4ff7f0e2ca02cd627289467bd8c564be377c27f7f7fbcbd2217becf\");\n", "import colors from \"../colors.js\";\n\nexport default colors(\"7fc97fbeaed4fdc086ffff99386cb0f0027fbf5b17666666\");\n", "import colors from \"../colors.js\";\n\nexport default colors(\"1b9e77d95f027570b3e7298a66a61ee6ab02a6761d666666\");\n", "import colors from \"../colors.js\";\n\nexport default colors(\"a6cee31f78b4b2df8a33a02cfb9a99e31a1cfdbf6fff7f00cab2d66a3d9affff99b15928\");\n", "import colors from \"../colors.js\";\n\nexport default colors(\"fbb4aeb3cde3ccebc5decbe4fed9a6ffffcce5d8bdfddaecf2f2f2\");\n", "import colors from \"../colors.js\";\n\nexport default colors(\"b3e2cdfdcdaccbd5e8f4cae4e6f5c9fff2aef1e2cccccccc\");\n", "import colors from \"../colors.js\";\n\nexport default colors(\"e41a1c377eb84daf4a984ea3ff7f00ffff33a65628f781bf999999\");\n", "import colors from \"../colors.js\";\n\nexport default colors(\"66c2a5fc8d628da0cbe78ac3a6d854ffd92fe5c494b3b3b3\");\n", "import colors from \"../colors.js\";\n\nexport default colors(\"8dd3c7ffffb3bebadafb807280b1d3fdb462b3de69fccde5d9d9d9bc80bdccebc5ffed6f\");\n", "import colors from \"../colors.js\";\n\nexport default colors(\"4e79a7f28e2ce1575976b7b259a14fedc949af7aa1ff9da79c755fbab0ab\");\n", "import {interpolateRgbBasis} from \"d3-interpolate\";\n\nexport default scheme => interpolateRgbBasis(scheme[scheme.length - 1]);\n", "import colors from \"../colors.js\";\nimport ramp from \"../ramp.js\";\n\nexport var scheme = new Array(3).concat(\n  \"d8b365f5f5f55ab4ac\",\n  \"a6611adfc27d80cdc1018571\",\n  \"a6611adfc27df5f5f580cdc1018571\",\n  \"8c510ad8b365f6e8c3c7eae55ab4ac01665e\",\n  \"8c510ad8b365f6e8c3f5f5f5c7eae55ab4ac01665e\",\n  \"8c510abf812ddfc27df6e8c3c7eae580cdc135978f01665e\",\n  \"8c510abf812ddfc27df6e8c3f5f5f5c7eae580cdc135978f01665e\",\n  \"5430058c510abf812ddfc27df6e8c3c7eae580cdc135978f01665e003c30\",\n  \"5430058c510abf812ddfc27df6e8c3f5f5f5c7eae580cdc135978f01665e003c30\"\n).map(colors);\n\nexport default ramp(scheme);\n", "import colors from \"../colors.js\";\nimport ramp from \"../ramp.js\";\n\nexport var scheme = new Array(3).concat(\n  \"af8dc3f7f7f77fbf7b\",\n  \"7b3294c2a5cfa6dba0008837\",\n  \"7b3294c2a5cff7f7f7a6dba0008837\",\n  \"762a83af8dc3e7d4e8d9f0d37fbf7b1b7837\",\n  \"762a83af8dc3e7d4e8f7f7f7d9f0d37fbf7b1b7837\",\n  \"762a839970abc2a5cfe7d4e8d9f0d3a6dba05aae611b7837\",\n  \"762a839970abc2a5cfe7d4e8f7f7f7d9f0d3a6dba05aae611b7837\",\n  \"40004b762a839970abc2a5cfe7d4e8d9f0d3a6dba05aae611b783700441b\",\n  \"40004b762a839970abc2a5cfe7d4e8f7f7f7d9f0d3a6dba05aae611b783700441b\"\n).map(colors);\n\nexport default ramp(scheme);\n", "import colors from \"../colors.js\";\nimport ramp from \"../ramp.js\";\n\nexport var scheme = new Array(3).concat(\n  \"e9a3c9f7f7f7a1d76a\",\n  \"d01c8bf1b6dab8e1864dac26\",\n  \"d01c8bf1b6daf7f7f7b8e1864dac26\",\n  \"c51b7de9a3c9fde0efe6f5d0a1d76a4d9221\",\n  \"c51b7de9a3c9fde0eff7f7f7e6f5d0a1d76a4d9221\",\n  \"c51b7dde77aef1b6dafde0efe6f5d0b8e1867fbc414d9221\",\n  \"c51b7dde77aef1b6dafde0eff7f7f7e6f5d0b8e1867fbc414d9221\",\n  \"8e0152c51b7dde77aef1b6dafde0efe6f5d0b8e1867fbc414d9221276419\",\n  \"8e0152c51b7dde77aef1b6dafde0eff7f7f7e6f5d0b8e1867fbc414d9221276419\"\n).map(colors);\n\nexport default ramp(scheme);\n", "import colors from \"../colors.js\";\nimport ramp from \"../ramp.js\";\n\nexport var scheme = new Array(3).concat(\n  \"998ec3f7f7f7f1a340\",\n  \"5e3c99b2abd2fdb863e66101\",\n  \"5e3c99b2abd2f7f7f7fdb863e66101\",\n  \"542788998ec3d8daebfee0b6f1a340b35806\",\n  \"542788998ec3d8daebf7f7f7fee0b6f1a340b35806\",\n  \"5427888073acb2abd2d8daebfee0b6fdb863e08214b35806\",\n  \"5427888073acb2abd2d8daebf7f7f7fee0b6fdb863e08214b35806\",\n  \"2d004b5427888073acb2abd2d8daebfee0b6fdb863e08214b358067f3b08\",\n  \"2d004b5427888073acb2abd2d8daebf7f7f7fee0b6fdb863e08214b358067f3b08\"\n).map(colors);\n\nexport default ramp(scheme);\n", "import colors from \"../colors.js\";\nimport ramp from \"../ramp.js\";\n\nexport var scheme = new Array(3).concat(\n  \"ef8a62f7f7f767a9cf\",\n  \"ca0020f4a58292c5de0571b0\",\n  \"ca0020f4a582f7f7f792c5de0571b0\",\n  \"b2182bef8a62fddbc7d1e5f067a9cf2166ac\",\n  \"b2182bef8a62fddbc7f7f7f7d1e5f067a9cf2166ac\",\n  \"b2182bd6604df4a582fddbc7d1e5f092c5de4393c32166ac\",\n  \"b2182bd6604df4a582fddbc7f7f7f7d1e5f092c5de4393c32166ac\",\n  \"67001fb2182bd6604df4a582fddbc7d1e5f092c5de4393c32166ac053061\",\n  \"67001fb2182bd6604df4a582fddbc7f7f7f7d1e5f092c5de4393c32166ac053061\"\n).map(colors);\n\nexport default ramp(scheme);\n", "import colors from \"../colors.js\";\nimport ramp from \"../ramp.js\";\n\nexport var scheme = new Array(3).concat(\n  \"ef8a62ffffff999999\",\n  \"ca0020f4a582bababa404040\",\n  \"ca0020f4a582ffffffbababa404040\",\n  \"b2182bef8a62fddbc7e0e0e09999994d4d4d\",\n  \"b2182bef8a62fddbc7ffffffe0e0e09999994d4d4d\",\n  \"b2182bd6604df4a582fddbc7e0e0e0bababa8787874d4d4d\",\n  \"b2182bd6604df4a582fddbc7ffffffe0e0e0bababa8787874d4d4d\",\n  \"67001fb2182bd6604df4a582fddbc7e0e0e0bababa8787874d4d4d1a1a1a\",\n  \"67001fb2182bd6604df4a582fddbc7ffffffe0e0e0bababa8787874d4d4d1a1a1a\"\n).map(colors);\n\nexport default ramp(scheme);\n", "import colors from \"../colors.js\";\nimport ramp from \"../ramp.js\";\n\nexport var scheme = new Array(3).concat(\n  \"fc8d59ffffbf91bfdb\",\n  \"d7191cfdae61abd9e92c7bb6\",\n  \"d7191cfdae61ffffbfabd9e92c7bb6\",\n  \"d73027fc8d59fee090e0f3f891bfdb4575b4\",\n  \"d73027fc8d59fee090ffffbfe0f3f891bfdb4575b4\",\n  \"d73027f46d43fdae61fee090e0f3f8abd9e974add14575b4\",\n  \"d73027f46d43fdae61fee090ffffbfe0f3f8abd9e974add14575b4\",\n  \"a50026d73027f46d43fdae61fee090e0f3f8abd9e974add14575b4313695\",\n  \"a50026d73027f46d43fdae61fee090ffffbfe0f3f8abd9e974add14575b4313695\"\n).map(colors);\n\nexport default ramp(scheme);\n", "import colors from \"../colors.js\";\nimport ramp from \"../ramp.js\";\n\nexport var scheme = new Array(3).concat(\n  \"fc8d59ffffbf91cf60\",\n  \"d7191cfdae61a6d96a1a9641\",\n  \"d7191cfdae61ffffbfa6d96a1a9641\",\n  \"d73027fc8d59fee08bd9ef8b91cf601a9850\",\n  \"d73027fc8d59fee08bffffbfd9ef8b91cf601a9850\",\n  \"d73027f46d43fdae61fee08bd9ef8ba6d96a66bd631a9850\",\n  \"d73027f46d43fdae61fee08bffffbfd9ef8ba6d96a66bd631a9850\",\n  \"a50026d73027f46d43fdae61fee08bd9ef8ba6d96a66bd631a9850006837\",\n  \"a50026d73027f46d43fdae61fee08bffffbfd9ef8ba6d96a66bd631a9850006837\"\n).map(colors);\n\nexport default ramp(scheme);\n", "import colors from \"../colors.js\";\nimport ramp from \"../ramp.js\";\n\nexport var scheme = new Array(3).concat(\n  \"fc8d59ffffbf99d594\",\n  \"d7191cfdae61abdda42b83ba\",\n  \"d7191cfdae61ffffbfabdda42b83ba\",\n  \"d53e4ffc8d59fee08be6f59899d5943288bd\",\n  \"d53e4ffc8d59fee08bffffbfe6f59899d5943288bd\",\n  \"d53e4ff46d43fdae61fee08be6f598abdda466c2a53288bd\",\n  \"d53e4ff46d43fdae61fee08bffffbfe6f598abdda466c2a53288bd\",\n  \"9e0142d53e4ff46d43fdae61fee08be6f598abdda466c2a53288bd5e4fa2\",\n  \"9e0142d53e4ff46d43fdae61fee08bffffbfe6f598abdda466c2a53288bd5e4fa2\"\n).map(colors);\n\nexport default ramp(scheme);\n", "import colors from \"../colors.js\";\nimport ramp from \"../ramp.js\";\n\nexport var scheme = new Array(3).concat(\n  \"e5f5f999d8c92ca25f\",\n  \"edf8fbb2e2e266c2a4238b45\",\n  \"edf8fbb2e2e266c2a42ca25f006d2c\",\n  \"edf8fbccece699d8c966c2a42ca25f006d2c\",\n  \"edf8fbccece699d8c966c2a441ae76238b45005824\",\n  \"f7fcfde5f5f9ccece699d8c966c2a441ae76238b45005824\",\n  \"f7fcfde5f5f9ccece699d8c966c2a441ae76238b45006d2c00441b\"\n).map(colors);\n\nexport default ramp(scheme);\n", "import colors from \"../colors.js\";\nimport ramp from \"../ramp.js\";\n\nexport var scheme = new Array(3).concat(\n  \"e0ecf49ebcda8856a7\",\n  \"edf8fbb3cde38c96c688419d\",\n  \"edf8fbb3cde38c96c68856a7810f7c\",\n  \"edf8fbbfd3e69ebcda8c96c68856a7810f7c\",\n  \"edf8fbbfd3e69ebcda8c96c68c6bb188419d6e016b\",\n  \"f7fcfde0ecf4bfd3e69ebcda8c96c68c6bb188419d6e016b\",\n  \"f7fcfde0ecf4bfd3e69ebcda8c96c68c6bb188419d810f7c4d004b\"\n).map(colors);\n\nexport default ramp(scheme);\n", "import colors from \"../colors.js\";\nimport ramp from \"../ramp.js\";\n\nexport var scheme = new Array(3).concat(\n  \"e0f3dba8ddb543a2ca\",\n  \"f0f9e8bae4bc7bccc42b8cbe\",\n  \"f0f9e8bae4bc7bccc443a2ca0868ac\",\n  \"f0f9e8ccebc5a8ddb57bccc443a2ca0868ac\",\n  \"f0f9e8ccebc5a8ddb57bccc44eb3d32b8cbe08589e\",\n  \"f7fcf0e0f3dbccebc5a8ddb57bccc44eb3d32b8cbe08589e\",\n  \"f7fcf0e0f3dbccebc5a8ddb57bccc44eb3d32b8cbe0868ac084081\"\n).map(colors);\n\nexport default ramp(scheme);\n", "import colors from \"../colors.js\";\nimport ramp from \"../ramp.js\";\n\nexport var scheme = new Array(3).concat(\n  \"fee8c8fdbb84e34a33\",\n  \"fef0d9fdcc8afc8d59d7301f\",\n  \"fef0d9fdcc8afc8d59e34a33b30000\",\n  \"fef0d9fdd49efdbb84fc8d59e34a33b30000\",\n  \"fef0d9fdd49efdbb84fc8d59ef6548d7301f990000\",\n  \"fff7ecfee8c8fdd49efdbb84fc8d59ef6548d7301f990000\",\n  \"fff7ecfee8c8fdd49efdbb84fc8d59ef6548d7301fb300007f0000\"\n).map(colors);\n\nexport default ramp(scheme);\n", "import colors from \"../colors.js\";\nimport ramp from \"../ramp.js\";\n\nexport var scheme = new Array(3).concat(\n  \"ece2f0a6bddb1c9099\",\n  \"f6eff7bdc9e167a9cf02818a\",\n  \"f6eff7bdc9e167a9cf1c9099016c59\",\n  \"f6eff7d0d1e6a6bddb67a9cf1c9099016c59\",\n  \"f6eff7d0d1e6a6bddb67a9cf3690c002818a016450\",\n  \"fff7fbece2f0d0d1e6a6bddb67a9cf3690c002818a016450\",\n  \"fff7fbece2f0d0d1e6a6bddb67a9cf3690c002818a016c59014636\"\n).map(colors);\n\nexport default ramp(scheme);\n", "import colors from \"../colors.js\";\nimport ramp from \"../ramp.js\";\n\nexport var scheme = new Array(3).concat(\n  \"ece7f2a6bddb2b8cbe\",\n  \"f1eef6bdc9e174a9cf0570b0\",\n  \"f1eef6bdc9e174a9cf2b8cbe045a8d\",\n  \"f1eef6d0d1e6a6bddb74a9cf2b8cbe045a8d\",\n  \"f1eef6d0d1e6a6bddb74a9cf3690c00570b0034e7b\",\n  \"fff7fbece7f2d0d1e6a6bddb74a9cf3690c00570b0034e7b\",\n  \"fff7fbece7f2d0d1e6a6bddb74a9cf3690c00570b0045a8d023858\"\n).map(colors);\n\nexport default ramp(scheme);\n", "import colors from \"../colors.js\";\nimport ramp from \"../ramp.js\";\n\nexport var scheme = new Array(3).concat(\n  \"e7e1efc994c7dd1c77\",\n  \"f1eef6d7b5d8df65b0ce1256\",\n  \"f1eef6d7b5d8df65b0dd1c77980043\",\n  \"f1eef6d4b9dac994c7df65b0dd1c77980043\",\n  \"f1eef6d4b9dac994c7df65b0e7298ace125691003f\",\n  \"f7f4f9e7e1efd4b9dac994c7df65b0e7298ace125691003f\",\n  \"f7f4f9e7e1efd4b9dac994c7df65b0e7298ace125698004367001f\"\n).map(colors);\n\nexport default ramp(scheme);\n", "import colors from \"../colors.js\";\nimport ramp from \"../ramp.js\";\n\nexport var scheme = new Array(3).concat(\n  \"fde0ddfa9fb5c51b8a\",\n  \"feebe2fbb4b9f768a1ae017e\",\n  \"feebe2fbb4b9f768a1c51b8a7a0177\",\n  \"feebe2fcc5c0fa9fb5f768a1c51b8a7a0177\",\n  \"feebe2fcc5c0fa9fb5f768a1dd3497ae017e7a0177\",\n  \"fff7f3fde0ddfcc5c0fa9fb5f768a1dd3497ae017e7a0177\",\n  \"fff7f3fde0ddfcc5c0fa9fb5f768a1dd3497ae017e7a017749006a\"\n).map(colors);\n\nexport default ramp(scheme);\n", "import colors from \"../colors.js\";\nimport ramp from \"../ramp.js\";\n\nexport var scheme = new Array(3).concat(\n  \"edf8b17fcdbb2c7fb8\",\n  \"ffffcca1dab441b6c4225ea8\",\n  \"ffffcca1dab441b6c42c7fb8253494\",\n  \"ffffccc7e9b47fcdbb41b6c42c7fb8253494\",\n  \"ffffccc7e9b47fcdbb41b6c41d91c0225ea80c2c84\",\n  \"ffffd9edf8b1c7e9b47fcdbb41b6c41d91c0225ea80c2c84\",\n  \"ffffd9edf8b1c7e9b47fcdbb41b6c41d91c0225ea8253494081d58\"\n).map(colors);\n\nexport default ramp(scheme);\n", "import colors from \"../colors.js\";\nimport ramp from \"../ramp.js\";\n\nexport var scheme = new Array(3).concat(\n  \"f7fcb9addd8e31a354\",\n  \"ffffccc2e69978c679238443\",\n  \"ffffccc2e69978c67931a354006837\",\n  \"ffffccd9f0a3addd8e78c67931a354006837\",\n  \"ffffccd9f0a3addd8e78c67941ab5d238443005a32\",\n  \"ffffe5f7fcb9d9f0a3addd8e78c67941ab5d238443005a32\",\n  \"ffffe5f7fcb9d9f0a3addd8e78c67941ab5d238443006837004529\"\n).map(colors);\n\nexport default ramp(scheme);\n", "import colors from \"../colors.js\";\nimport ramp from \"../ramp.js\";\n\nexport var scheme = new Array(3).concat(\n  \"fff7bcfec44fd95f0e\",\n  \"ffffd4fed98efe9929cc4c02\",\n  \"ffffd4fed98efe9929d95f0e993404\",\n  \"ffffd4fee391fec44ffe9929d95f0e993404\",\n  \"ffffd4fee391fec44ffe9929ec7014cc4c028c2d04\",\n  \"ffffe5fff7bcfee391fec44ffe9929ec7014cc4c028c2d04\",\n  \"ffffe5fff7bcfee391fec44ffe9929ec7014cc4c02993404662506\"\n).map(colors);\n\nexport default ramp(scheme);\n", "import colors from \"../colors.js\";\nimport ramp from \"../ramp.js\";\n\nexport var scheme = new Array(3).concat(\n  \"ffeda0feb24cf03b20\",\n  \"ffffb2fecc5cfd8d3ce31a1c\",\n  \"ffffb2fecc5cfd8d3cf03b20bd0026\",\n  \"ffffb2fed976feb24cfd8d3cf03b20bd0026\",\n  \"ffffb2fed976feb24cfd8d3cfc4e2ae31a1cb10026\",\n  \"ffffccffeda0fed976feb24cfd8d3cfc4e2ae31a1cb10026\",\n  \"ffffccffeda0fed976feb24cfd8d3cfc4e2ae31a1cbd0026800026\"\n).map(colors);\n\nexport default ramp(scheme);\n", "import colors from \"../colors.js\";\nimport ramp from \"../ramp.js\";\n\nexport var scheme = new Array(3).concat(\n  \"deebf79ecae13182bd\",\n  \"eff3ffbdd7e76baed62171b5\",\n  \"eff3ffbdd7e76baed63182bd08519c\",\n  \"eff3ffc6dbef9ecae16baed63182bd08519c\",\n  \"eff3ffc6dbef9ecae16baed64292c62171b5084594\",\n  \"f7fbffdeebf7c6dbef9ecae16baed64292c62171b5084594\",\n  \"f7fbffdeebf7c6dbef9ecae16baed64292c62171b508519c08306b\"\n).map(colors);\n\nexport default ramp(scheme);\n", "import colors from \"../colors.js\";\nimport ramp from \"../ramp.js\";\n\nexport var scheme = new Array(3).concat(\n  \"e5f5e0a1d99b31a354\",\n  \"edf8e9bae4b374c476238b45\",\n  \"edf8e9bae4b374c47631a354006d2c\",\n  \"edf8e9c7e9c0a1d99b74c47631a354006d2c\",\n  \"edf8e9c7e9c0a1d99b74c47641ab5d238b45005a32\",\n  \"f7fcf5e5f5e0c7e9c0a1d99b74c47641ab5d238b45005a32\",\n  \"f7fcf5e5f5e0c7e9c0a1d99b74c47641ab5d238b45006d2c00441b\"\n).map(colors);\n\nexport default ramp(scheme);\n", "import colors from \"../colors.js\";\nimport ramp from \"../ramp.js\";\n\nexport var scheme = new Array(3).concat(\n  \"f0f0f0bdbdbd636363\",\n  \"f7f7f7cccccc969696525252\",\n  \"f7f7f7cccccc969696636363252525\",\n  \"f7f7f7d9d9d9bdbdbd969696636363252525\",\n  \"f7f7f7d9d9d9bdbdbd969696737373525252252525\",\n  \"fffffff0f0f0d9d9d9bdbdbd969696737373525252252525\",\n  \"fffffff0f0f0d9d9d9bdbdbd969696737373525252252525000000\"\n).map(colors);\n\nexport default ramp(scheme);\n", "import colors from \"../colors.js\";\nimport ramp from \"../ramp.js\";\n\nexport var scheme = new Array(3).concat(\n  \"efedf5bcbddc756bb1\",\n  \"f2f0f7cbc9e29e9ac86a51a3\",\n  \"f2f0f7cbc9e29e9ac8756bb154278f\",\n  \"f2f0f7dadaebbcbddc9e9ac8756bb154278f\",\n  \"f2f0f7dadaebbcbddc9e9ac8807dba6a51a34a1486\",\n  \"fcfbfdefedf5dadaebbcbddc9e9ac8807dba6a51a34a1486\",\n  \"fcfbfdefedf5dadaebbcbddc9e9ac8807dba6a51a354278f3f007d\"\n).map(colors);\n\nexport default ramp(scheme);\n", "import colors from \"../colors.js\";\nimport ramp from \"../ramp.js\";\n\nexport var scheme = new Array(3).concat(\n  \"fee0d2fc9272de2d26\",\n  \"fee5d9fcae91fb6a4acb181d\",\n  \"fee5d9fcae91fb6a4ade2d26a50f15\",\n  \"fee5d9fcbba1fc9272fb6a4ade2d26a50f15\",\n  \"fee5d9fcbba1fc9272fb6a4aef3b2ccb181d99000d\",\n  \"fff5f0fee0d2fcbba1fc9272fb6a4aef3b2ccb181d99000d\",\n  \"fff5f0fee0d2fcbba1fc9272fb6a4aef3b2ccb181da50f1567000d\"\n).map(colors);\n\nexport default ramp(scheme);\n", "import colors from \"../colors.js\";\nimport ramp from \"../ramp.js\";\n\nexport var scheme = new Array(3).concat(\n  \"fee6cefdae6be6550d\",\n  \"feeddefdbe85fd8d3cd94701\",\n  \"feeddefdbe85fd8d3ce6550da63603\",\n  \"feeddefdd0a2fdae6bfd8d3ce6550da63603\",\n  \"feeddefdd0a2fdae6bfd8d3cf16913d948018c2d04\",\n  \"fff5ebfee6cefdd0a2fdae6bfd8d3cf16913d948018c2d04\",\n  \"fff5ebfee6cefdd0a2fdae6bfd8d3cf16913d94801a636037f2704\"\n).map(colors);\n\nexport default ramp(scheme);\n", "export default function(t) {\n  t = Math.max(0, Math.min(1, t));\n  return \"rgb(\"\n      + Math.max(0, Math.min(255, Math.round(-4.54 - t * (35.34 - t * (2381.73 - t * (6402.7 - t * (7024.72 - t * 2710.57))))))) + \", \"\n      + Math.max(0, Math.min(255, Math.round(32.49 + t * (170.73 + t * (52.82 - t * (131.46 - t * (176.58 - t * 67.37))))))) + \", \"\n      + Math.max(0, Math.min(255, Math.round(81.24 + t * (442.36 - t * (2482.43 - t * (6167.24 - t * (6614.94 - t * 2475.67)))))))\n      + \")\";\n}\n", "import {cubehelix} from \"d3-color\";\nimport {interpolateCubehelixLong} from \"d3-interpolate\";\n\nexport default interpolateCubehelixLong(cubehelix(300, 0.5, 0.0), cubehelix(-240, 0.5, 1.0));\n", "import {cubehelix} from \"d3-color\";\nimport {interpolateCubehelixLong} from \"d3-interpolate\";\n\nexport var warm = interpolateCubehelixLong(cubehelix(-100, 0.75, 0.35), cubehelix(80, 1.50, 0.8));\n\nexport var cool = interpolateCubehelixLong(cubehelix(260, 0.75, 0.35), cubehelix(80, 1.50, 0.8));\n\nvar c = cubehelix();\n\nexport default function(t) {\n  if (t < 0 || t > 1) t -= Math.floor(t);\n  var ts = Math.abs(t - 0.5);\n  c.h = 360 * t - 100;\n  c.s = 1.5 - 1.5 * ts;\n  c.l = 0.8 - 0.9 * ts;\n  return c + \"\";\n}\n", "import {rgb} from \"d3-color\";\n\nvar c = rgb(),\n    pi_1_3 = Math.PI / 3,\n    pi_2_3 = Math.PI * 2 / 3;\n\nexport default function(t) {\n  var x;\n  t = (0.5 - t) * Math.PI;\n  c.r = 255 * (x = Math.sin(t)) * x;\n  c.g = 255 * (x = Math.sin(t + pi_1_3)) * x;\n  c.b = 255 * (x = Math.sin(t + pi_2_3)) * x;\n  return c + \"\";\n}\n", "export default function(t) {\n  t = Math.max(0, Math.min(1, t));\n  return \"rgb(\"\n      + Math.max(0, Math.min(255, Math.round(34.61 + t * (1172.33 - t * (10793.56 - t * (33300.12 - t * (38394.49 - t * 14825.05))))))) + \", \"\n      + Math.max(0, Math.min(255, Math.round(23.31 + t * (557.33 + t * (1225.33 - t * (3574.96 - t * (1073.77 + t * 707.56))))))) + \", \"\n      + Math.max(0, Math.min(255, Math.round(27.2 + t * (3211.1 - t * (15327.97 - t * (27814 - t * (22569.18 - t * 6838.66)))))))\n      + \")\";\n}\n", "import colors from \"../colors.js\";\n\nfunction ramp(range) {\n  var n = range.length;\n  return function(t) {\n    return range[Math.max(0, Math.min(n - 1, Math.floor(t * n)))];\n  };\n}\n\nexport default ramp(colors(\"44015444025645045745055946075a46085c460a5d460b5e470d60470e6147106347116447136548146748166848176948186a481a6c481b6d481c6e481d6f481f70482071482173482374482475482576482677482878482979472a7a472c7a472d7b472e7c472f7d46307e46327e46337f463480453581453781453882443983443a83443b84433d84433e85423f854240864241864142874144874045884046883f47883f48893e49893e4a893e4c8a3d4d8a3d4e8a3c4f8a3c508b3b518b3b528b3a538b3a548c39558c39568c38588c38598c375a8c375b8d365c8d365d8d355e8d355f8d34608d34618d33628d33638d32648e32658e31668e31678e31688e30698e306a8e2f6b8e2f6c8e2e6d8e2e6e8e2e6f8e2d708e2d718e2c718e2c728e2c738e2b748e2b758e2a768e2a778e2a788e29798e297a8e297b8e287c8e287d8e277e8e277f8e27808e26818e26828e26828e25838e25848e25858e24868e24878e23888e23898e238a8d228b8d228c8d228d8d218e8d218f8d21908d21918c20928c20928c20938c1f948c1f958b1f968b1f978b1f988b1f998a1f9a8a1e9b8a1e9c891e9d891f9e891f9f881fa0881fa1881fa1871fa28720a38620a48621a58521a68522a78522a88423a98324aa8325ab8225ac8226ad8127ad8128ae8029af7f2ab07f2cb17e2db27d2eb37c2fb47c31b57b32b67a34b67935b77937b87838b9773aba763bbb753dbc743fbc7340bd7242be7144bf7046c06f48c16e4ac16d4cc26c4ec36b50c46a52c56954c56856c66758c7655ac8645cc8635ec96260ca6063cb5f65cb5e67cc5c69cd5b6ccd5a6ece5870cf5773d05675d05477d1537ad1517cd2507fd34e81d34d84d44b86d54989d5488bd6468ed64590d74393d74195d84098d83e9bd93c9dd93ba0da39a2da37a5db36a8db34aadc32addc30b0dd2fb2dd2db5de2bb8de29bade28bddf26c0df25c2df23c5e021c8e020cae11fcde11dd0e11cd2e21bd5e21ad8e219dae319dde318dfe318e2e418e5e419e7e419eae51aece51befe51cf1e51df4e61ef6e620f8e621fbe723fde725\"));\n\nexport var magma = ramp(colors(\"00000401000501010601010802010902020b02020d03030f03031204041405041606051806051a07061c08071e0907200a08220b09240c09260d0a290e0b2b100b2d110c2f120d31130d34140e36150e38160f3b180f3d19103f1a10421c10441d11471e114920114b21114e22115024125325125527125829115a2a115c2c115f2d11612f116331116533106734106936106b38106c390f6e3b0f703d0f713f0f72400f74420f75440f764510774710784910784a10794c117a4e117b4f127b51127c52137c54137d56147d57157e59157e5a167e5c167f5d177f5f187f601880621980641a80651a80671b80681c816a1c816b1d816d1d816e1e81701f81721f817320817521817621817822817922827b23827c23827e24828025828125818326818426818627818827818928818b29818c29818e2a81902a81912b81932b80942c80962c80982d80992d809b2e7f9c2e7f9e2f7fa02f7fa1307ea3307ea5317ea6317da8327daa337dab337cad347cae347bb0357bb2357bb3367ab5367ab73779b83779ba3878bc3978bd3977bf3a77c03a76c23b75c43c75c53c74c73d73c83e73ca3e72cc3f71cd4071cf4070d0416fd2426fd3436ed5446dd6456cd8456cd9466bdb476adc4869de4968df4a68e04c67e24d66e34e65e44f64e55064e75263e85362e95462ea5661eb5760ec5860ed5a5fee5b5eef5d5ef05f5ef1605df2625df2645cf3655cf4675cf4695cf56b5cf66c5cf66e5cf7705cf7725cf8745cf8765cf9785df9795df97b5dfa7d5efa7f5efa815ffb835ffb8560fb8761fc8961fc8a62fc8c63fc8e64fc9065fd9266fd9467fd9668fd9869fd9a6afd9b6bfe9d6cfe9f6dfea16efea36ffea571fea772fea973feaa74feac76feae77feb078feb27afeb47bfeb67cfeb77efeb97ffebb81febd82febf84fec185fec287fec488fec68afec88cfeca8dfecc8ffecd90fecf92fed194fed395fed597fed799fed89afdda9cfddc9efddea0fde0a1fde2a3fde3a5fde5a7fde7a9fde9aafdebacfcecaefceeb0fcf0b2fcf2b4fcf4b6fcf6b8fcf7b9fcf9bbfcfbbdfcfdbf\"));\n\nexport var inferno = ramp(colors(\"00000401000501010601010802010a02020c02020e03021004031204031405041706041907051b08051d09061f0a07220b07240c08260d08290e092b10092d110a30120a32140b34150b37160b39180c3c190c3e1b0c411c0c431e0c451f0c48210c4a230c4c240c4f260c51280b53290b552b0b572d0b592f0a5b310a5c320a5e340a5f3609613809623909633b09643d09653e0966400a67420a68440a68450a69470b6a490b6a4a0c6b4c0c6b4d0d6c4f0d6c510e6c520e6d540f6d550f6d57106e59106e5a116e5c126e5d126e5f136e61136e62146e64156e65156e67166e69166e6a176e6c186e6d186e6f196e71196e721a6e741a6e751b6e771c6d781c6d7a1d6d7c1d6d7d1e6d7f1e6c801f6c82206c84206b85216b87216b88226a8a226a8c23698d23698f24699025689225689326679526679727669827669a28659b29649d29649f2a63a02a63a22b62a32c61a52c60a62d60a82e5fa92e5eab2f5ead305dae305cb0315bb1325ab3325ab43359b63458b73557b93556ba3655bc3754bd3853bf3952c03a51c13a50c33b4fc43c4ec63d4dc73e4cc83f4bca404acb4149cc4248ce4347cf4446d04545d24644d34743d44842d54a41d74b3fd84c3ed94d3dda4e3cdb503bdd513ade5238df5337e05536e15635e25734e35933e45a31e55c30e65d2fe75e2ee8602de9612bea632aeb6429eb6628ec6726ed6925ee6a24ef6c23ef6e21f06f20f1711ff1731df2741cf3761bf37819f47918f57b17f57d15f67e14f68013f78212f78410f8850ff8870ef8890cf98b0bf98c0af98e09fa9008fa9207fa9407fb9606fb9706fb9906fb9b06fb9d07fc9f07fca108fca309fca50afca60cfca80dfcaa0ffcac11fcae12fcb014fcb216fcb418fbb61afbb81dfbba1ffbbc21fbbe23fac026fac228fac42afac62df9c72ff9c932f9cb35f8cd37f8cf3af7d13df7d340f6d543f6d746f5d949f5db4cf4dd4ff4df53f4e156f3e35af3e55df2e661f2e865f2ea69f1ec6df1ed71f1ef75f1f179f2f27df2f482f3f586f3f68af4f88ef5f992f6fa96f8fb9af9fc9dfafda1fcffa4\"));\n\nexport var plasma = ramp(colors(\"0d088710078813078916078a19068c1b068d1d068e20068f2206902406912605912805922a05932c05942e05952f059631059733059735049837049938049a3a049a3c049b3e049c3f049c41049d43039e44039e46039f48039f4903a04b03a14c02a14e02a25002a25102a35302a35502a45601a45801a45901a55b01a55c01a65e01a66001a66100a76300a76400a76600a76700a86900a86a00a86c00a86e00a86f00a87100a87201a87401a87501a87701a87801a87a02a87b02a87d03a87e03a88004a88104a78305a78405a78606a68707a68808a68a09a58b0aa58d0ba58e0ca48f0da4910ea3920fa39410a29511a19613a19814a099159f9a169f9c179e9d189d9e199da01a9ca11b9ba21d9aa31e9aa51f99a62098a72197a82296aa2395ab2494ac2694ad2793ae2892b02991b12a90b22b8fb32c8eb42e8db52f8cb6308bb7318ab83289ba3388bb3488bc3587bd3786be3885bf3984c03a83c13b82c23c81c33d80c43e7fc5407ec6417dc7427cc8437bc9447aca457acb4679cc4778cc4977cd4a76ce4b75cf4c74d04d73d14e72d24f71d35171d45270d5536fd5546ed6556dd7566cd8576bd9586ada5a6ada5b69db5c68dc5d67dd5e66de5f65de6164df6263e06363e16462e26561e26660e3685fe4695ee56a5de56b5de66c5ce76e5be76f5ae87059e97158e97257ea7457eb7556eb7655ec7754ed7953ed7a52ee7b51ef7c51ef7e50f07f4ff0804ef1814df1834cf2844bf3854bf3874af48849f48948f58b47f58c46f68d45f68f44f79044f79143f79342f89441f89540f9973ff9983ef99a3efa9b3dfa9c3cfa9e3bfb9f3afba139fba238fca338fca537fca636fca835fca934fdab33fdac33fdae32fdaf31fdb130fdb22ffdb42ffdb52efeb72dfeb82cfeba2cfebb2bfebd2afebe2afec029fdc229fdc328fdc527fdc627fdc827fdca26fdcb26fccd25fcce25fcd025fcd225fbd324fbd524fbd724fad824fada24f9dc24f9dd25f8df25f8e125f7e225f7e425f6e626f6e826f5e926f5eb27f4ed27f3ee27f3f027f2f227f1f426f1f525f0f724f0f921\"));\n", "export const abs = Math.abs;\nexport const atan2 = Math.atan2;\nexport const cos = Math.cos;\nexport const max = Math.max;\nexport const min = Math.min;\nexport const sin = Math.sin;\nexport const sqrt = Math.sqrt;\n\nexport const epsilon = 1e-12;\nexport const pi = Math.PI;\nexport const halfPi = pi / 2;\nexport const tau = 2 * pi;\n\nexport function acos(x) {\n  return x > 1 ? 0 : x < -1 ? pi : Math.acos(x);\n}\n\nexport function asin(x) {\n  return x >= 1 ? halfPi : x <= -1 ? -halfPi : Math.asin(x);\n}\n", "import {min, sqrt} from \"../math.js\";\n\nconst sqrt3 = sqrt(3);\n\nexport default {\n  draw(context, size) {\n    const r = sqrt(size + min(size / 28, 0.75)) * 0.59436;\n    const t = r / 2;\n    const u = t * sqrt3;\n    context.moveTo(0, r);\n    context.lineTo(0, -r);\n    context.moveTo(-u, -t);\n    context.lineTo(u, t);\n    context.moveTo(-u, t);\n    context.lineTo(u, -t);\n  }\n};\n", "import {pi, sqrt, tau} from \"../math.js\";\n\nexport default {\n  draw(context, size) {\n    const r = sqrt(size / pi);\n    context.moveTo(r, 0);\n    context.arc(0, 0, r, 0, tau);\n  }\n};\n", "import {sqrt} from \"../math.js\";\n\nexport default {\n  draw(context, size) {\n    const r = sqrt(size / 5) / 2;\n    context.moveTo(-3 * r, -r);\n    context.lineTo(-r, -r);\n    context.lineTo(-r, -3 * r);\n    context.lineTo(r, -3 * r);\n    context.lineTo(r, -r);\n    context.lineTo(3 * r, -r);\n    context.lineTo(3 * r, r);\n    context.lineTo(r, r);\n    context.lineTo(r, 3 * r);\n    context.lineTo(-r, 3 * r);\n    context.lineTo(-r, r);\n    context.lineTo(-3 * r, r);\n    context.closePath();\n  }\n};\n", "import {sqrt} from \"../math.js\";\n\nconst tan30 = sqrt(1 / 3);\nconst tan30_2 = tan30 * 2;\n\nexport default {\n  draw(context, size) {\n    const y = sqrt(size / tan30_2);\n    const x = y * tan30;\n    context.moveTo(0, -y);\n    context.lineTo(x, 0);\n    context.lineTo(0, y);\n    context.lineTo(-x, 0);\n    context.closePath();\n  }\n};\n", "import {sqrt} from \"../math.js\";\n\nexport default {\n  draw(context, size) {\n    const r = sqrt(size) * 0.62625;\n    context.moveTo(0, -r);\n    context.lineTo(r, 0);\n    context.lineTo(0, r);\n    context.lineTo(-r, 0);\n    context.closePath();\n  }\n};\n", "import {min, sqrt} from \"../math.js\";\n\nexport default {\n  draw(context, size) {\n    const r = sqrt(size - min(size / 7, 2)) * 0.87559;\n    context.moveTo(-r, 0);\n    context.lineTo(r, 0);\n    context.moveTo(0, r);\n    context.lineTo(0, -r);\n  }\n};\n", "import {sqrt} from \"../math.js\";\n\nexport default {\n  draw(context, size) {\n    const w = sqrt(size);\n    const x = -w / 2;\n    context.rect(x, x, w, w);\n  }\n};\n", "import {sqrt} from \"../math.js\";\n\nexport default {\n  draw(context, size) {\n    const r = sqrt(size) * 0.4431;\n    context.moveTo(r, r);\n    context.lineTo(r, -r);\n    context.lineTo(-r, -r);\n    context.lineTo(-r, r);\n    context.closePath();\n  }\n};\n", "import {sin, cos, sqrt, pi, tau} from \"../math.js\";\n\nconst ka = 0.89081309152928522810;\nconst kr = sin(pi / 10) / sin(7 * pi / 10);\nconst kx = sin(tau / 10) * kr;\nconst ky = -cos(tau / 10) * kr;\n\nexport default {\n  draw(context, size) {\n    const r = sqrt(size * ka);\n    const x = kx * r;\n    const y = ky * r;\n    context.moveTo(0, -r);\n    context.lineTo(x, y);\n    for (let i = 1; i < 5; ++i) {\n      const a = tau * i / 5;\n      const c = cos(a);\n      const s = sin(a);\n      context.lineTo(s * r, -c * r);\n      context.lineTo(c * x - s * y, s * x + c * y);\n    }\n    context.closePath();\n  }\n};\n", "import {sqrt} from \"../math.js\";\n\nconst sqrt3 = sqrt(3);\n\nexport default {\n  draw(context, size) {\n    const y = -sqrt(size / (sqrt3 * 3));\n    context.moveTo(0, y * 2);\n    context.lineTo(-sqrt3 * y, -y);\n    context.lineTo(sqrt3 * y, -y);\n    context.closePath();\n  }\n};\n", "import {sqrt} from \"../math.js\";\n\nconst sqrt3 = sqrt(3);\n\nexport default {\n  draw(context, size) {\n    const s = sqrt(size) * 0.6824;\n    const t = s  / 2;\n    const u = (s * sqrt3) / 2; // cos(Math.PI / 6)\n    context.moveTo(0, -s);\n    context.lineTo(u, t);\n    context.lineTo(-u, t);\n    context.closePath();\n  }\n};\n", "import {sqrt} from \"../math.js\";\n\nconst c = -0.5;\nconst s = sqrt(3) / 2;\nconst k = 1 / sqrt(12);\nconst a = (k / 2 + 1) * 3;\n\nexport default {\n  draw(context, size) {\n    const r = sqrt(size / a);\n    const x0 = r / 2, y0 = r * k;\n    const x1 = x0, y1 = r * k + r;\n    const x2 = -x1, y2 = y1;\n    context.moveTo(x0, y0);\n    context.lineTo(x1, y1);\n    context.lineTo(x2, y2);\n    context.lineTo(c * x0 - s * y0, s * x0 + c * y0);\n    context.lineTo(c * x1 - s * y1, s * x1 + c * y1);\n    context.lineTo(c * x2 - s * y2, s * x2 + c * y2);\n    context.lineTo(c * x0 + s * y0, c * y0 - s * x0);\n    context.lineTo(c * x1 + s * y1, c * y1 - s * x1);\n    context.lineTo(c * x2 + s * y2, c * y2 - s * x2);\n    context.closePath();\n  }\n};\n", "import {min, sqrt} from \"../math.js\";\n\nexport default {\n  draw(context, size) {\n    const r = sqrt(size - min(size / 6, 1.7)) * 0.6189;\n    context.moveTo(-r, -r);\n    context.lineTo(r, r);\n    context.moveTo(-r, r);\n    context.lineTo(r, -r);\n  }\n};\n", "import constant from \"./constant.js\";\nimport {withPath} from \"./path.js\";\nimport asterisk from \"./symbol/asterisk.js\";\nimport circle from \"./symbol/circle.js\";\nimport cross from \"./symbol/cross.js\";\nimport diamond from \"./symbol/diamond.js\";\nimport diamond2 from \"./symbol/diamond2.js\";\nimport plus from \"./symbol/plus.js\";\nimport square from \"./symbol/square.js\";\nimport square2 from \"./symbol/square2.js\";\nimport star from \"./symbol/star.js\";\nimport triangle from \"./symbol/triangle.js\";\nimport triangle2 from \"./symbol/triangle2.js\";\nimport wye from \"./symbol/wye.js\";\nimport times from \"./symbol/times.js\";\n\n// These symbols are designed to be filled.\nexport const symbolsFill = [\n  circle,\n  cross,\n  diamond,\n  square,\n  star,\n  triangle,\n  wye\n];\n\n// These symbols are designed to be stroked (with a width of 1.5px and round caps).\nexport const symbolsStroke = [\n  circle,\n  plus,\n  times,\n  triangle2,\n  asterisk,\n  square2,\n  diamond2\n];\n\nexport default function Symbol(type, size) {\n  let context = null,\n      path = withPath(symbol);\n\n  type = typeof type === \"function\" ? type : constant(type || circle);\n  size = typeof size === \"function\" ? size : constant(size === undefined ? 64 : +size);\n\n  function symbol() {\n    let buffer;\n    if (!context) context = buffer = path();\n    type.apply(this, arguments).draw(context, +size.apply(this, arguments));\n    if (buffer) return context = null, buffer + \"\" || null;\n  }\n\n  symbol.type = function(_) {\n    return arguments.length ? (type = typeof _ === \"function\" ? _ : constant(_), symbol) : type;\n  };\n\n  symbol.size = function(_) {\n    return arguments.length ? (size = typeof _ === \"function\" ? _ : constant(+_), symbol) : size;\n  };\n\n  symbol.context = function(_) {\n    return arguments.length ? (context = _ == null ? null : _, symbol) : context;\n  };\n\n  return symbol;\n}\n", "export function Transform(k, x, y) {\n  this.k = k;\n  this.x = x;\n  this.y = y;\n}\n\nTransform.prototype = {\n  constructor: Transform,\n  scale: function(k) {\n    return k === 1 ? this : new Transform(this.k * k, this.x, this.y);\n  },\n  translate: function(x, y) {\n    return x === 0 & y === 0 ? this : new Transform(this.k, this.x + this.k * x, this.y + this.k * y);\n  },\n  apply: function(point) {\n    return [point[0] * this.k + this.x, point[1] * this.k + this.y];\n  },\n  applyX: function(x) {\n    return x * this.k + this.x;\n  },\n  applyY: function(y) {\n    return y * this.k + this.y;\n  },\n  invert: function(location) {\n    return [(location[0] - this.x) / this.k, (location[1] - this.y) / this.k];\n  },\n  invertX: function(x) {\n    return (x - this.x) / this.k;\n  },\n  invertY: function(y) {\n    return (y - this.y) / this.k;\n  },\n  rescaleX: function(x) {\n    return x.copy().domain(x.range().map(this.invertX, this).map(x.invert, x));\n  },\n  rescaleY: function(y) {\n    return y.copy().domain(y.range().map(this.invertY, this).map(y.invert, y));\n  },\n  toString: function() {\n    return \"translate(\" + this.x + \",\" + this.y + \") scale(\" + this.k + \")\";\n  }\n};\n\nexport var identity = new Transform(1, 0, 0);\n\ntransform.prototype = Transform.prototype;\n\nexport default function transform(node) {\n  while (!node.__zoom) if (!(node = node.parentNode)) return identity;\n  return node.__zoom;\n}\n", "import {ascending, descending} from \"d3\";\n\nexport function defined(x) {\n  return x != null && !Number.isNaN(x);\n}\n\nexport function ascendingDefined(a, b) {\n  return +defined(b) - +defined(a) || ascending(a, b);\n}\n\nexport function descendingDefined(a, b) {\n  return +defined(b) - +defined(a) || descending(a, b);\n}\n\nexport function nonempty(x) {\n  return x != null && `${x}` !== \"\";\n}\n\nexport function finite(x) {\n  return isFinite(x) ? x : NaN;\n}\n\nexport function positive(x) {\n  return x > 0 && isFinite(x) ? x : NaN;\n}\n\nexport function negative(x) {\n  return x < 0 && isFinite(x) ? x : NaN;\n}\n", "export default function format(date, fallback) {\n  if (!(date instanceof Date)) date = new Date(+date);\n  if (isNaN(date)) return typeof fallback === \"function\" ? fallback(date) : fallback;\n  const hours = date.getUTCHours();\n  const minutes = date.getUTCMinutes();\n  const seconds = date.getUTCSeconds();\n  const milliseconds = date.getUTCMilliseconds();\n  return `${formatYear(date.getUTCFullYear(), 4)}-${pad(date.getUTCMonth() + 1, 2)}-${pad(date.getUTCDate(), 2)}${\n    hours || minutes || seconds || milliseconds ? `T${pad(hours, 2)}:${pad(minutes, 2)}${\n      seconds || milliseconds ? `:${pad(seconds, 2)}${\n        milliseconds ? `.${pad(milliseconds, 3)}` : ``\n      }` : ``\n    }Z` : ``\n  }`;\n}\n\nfunction formatYear(year) {\n  return year < 0 ? `-${pad(-year, 6)}`\n    : year > 9999 ? `+${pad(year, 6)}`\n    : pad(year, 4);\n}\n\nfunction pad(value, width) {\n  return `${value}`.padStart(width, \"0\");\n}\n", "const re = /^(?:[-+]\\d{2})?\\d{4}(?:-\\d{2}(?:-\\d{2})?)?(?:T\\d{2}:\\d{2}(?::\\d{2}(?:\\.\\d{3})?)?(?:Z|[-+]\\d{2}:?\\d{2})?)?$/;\n\nexport default function parse(string, fallback) {\n  if (!re.test(string += \"\")) return typeof fallback === \"function\" ? fallback(string) : fallback;\n  return new Date(string);\n}\n", "import {bisector, extent, median, pairs, timeFormat, utcFormat} from \"d3\";\nimport {utcSecond, utcMinute, utcHour, unixDay, utcWeek, utcMonth, utcYear} from \"d3\";\nimport {utcMonday, utcTuesday, utcWednesday, utcThursday, utcFriday, utcSaturday, utcSunday} from \"d3\";\nimport {timeSecond, timeMinute, timeHour, timeDay, timeWeek, timeMonth, timeYear} from \"d3\";\nimport {timeMonday, timeTuesday, timeWednesday, timeThursday, timeFriday, timeSaturday, timeSunday} from \"d3\";\nimport {orderof} from \"./options.js\";\n\nconst durationSecond = 1000;\nconst durationMinute = durationSecond * 60;\nconst durationHour = durationMinute * 60;\nconst durationDay = durationHour * 24;\nconst durationWeek = durationDay * 7;\nconst durationMonth = durationDay * 30;\nconst durationYear = durationDay * 365;\n\n// See https://github.com/d3/d3-time/blob/9e8dc940f38f78d7588aad68a54a25b1f0c2d97b/src/ticks.js#L14-L33\nconst formats = [\n  [\"millisecond\", 0.5 * durationSecond],\n  [\"second\", durationSecond],\n  [\"second\", 30 * durationSecond],\n  [\"minute\", durationMinute],\n  [\"minute\", 30 * durationMinute],\n  [\"hour\", durationHour],\n  [\"hour\", 12 * durationHour],\n  [\"day\", durationDay],\n  [\"day\", 2 * durationDay],\n  [\"week\", durationWeek],\n  [\"month\", durationMonth],\n  [\"month\", 3 * durationMonth],\n  [\"year\", durationYear]\n];\n\nconst timeIntervals = new Map([\n  [\"second\", timeSecond],\n  [\"minute\", timeMinute],\n  [\"hour\", timeHour],\n  [\"day\", timeDay], // TODO local time equivalent of unixDay?\n  [\"week\", timeWeek],\n  [\"month\", timeMonth],\n  [\"year\", timeYear],\n  [\"monday\", timeMonday],\n  [\"tuesday\", timeTuesday],\n  [\"wednesday\", timeWednesday],\n  [\"thursday\", timeThursday],\n  [\"friday\", timeFriday],\n  [\"saturday\", timeSaturday],\n  [\"sunday\", timeSunday]\n]);\n\nconst utcIntervals = new Map([\n  [\"second\", utcSecond],\n  [\"minute\", utcMinute],\n  [\"hour\", utcHour],\n  [\"day\", unixDay],\n  [\"week\", utcWeek],\n  [\"month\", utcMonth],\n  [\"year\", utcYear],\n  [\"monday\", utcMonday],\n  [\"tuesday\", utcTuesday],\n  [\"wednesday\", utcWednesday],\n  [\"thursday\", utcThursday],\n  [\"friday\", utcFriday],\n  [\"saturday\", utcSaturday],\n  [\"sunday\", utcSunday]\n]);\n\nfunction parseInterval(input, intervals) {\n  let name = `${input}`.toLowerCase();\n  if (name.endsWith(\"s\")) name = name.slice(0, -1); // drop plural\n  let period = 1;\n  const match = /^(?:(\\d+)\\s+)/.exec(name);\n  if (match) {\n    name = name.slice(match[0].length);\n    period = +match[1];\n  }\n  switch (name) {\n    case \"quarter\":\n      name = \"month\";\n      period *= 3;\n      break;\n    case \"half\":\n      name = \"month\";\n      period *= 6;\n      break;\n  }\n  let interval = intervals.get(name);\n  if (!interval) throw new Error(`unknown interval: ${input}`);\n  if (!(period > 1)) return interval;\n  if (!interval.every) throw new Error(`non-periodic interval: ${name}`);\n  return interval.every(period);\n}\n\nexport function maybeTimeInterval(interval) {\n  return parseInterval(interval, timeIntervals);\n}\n\nexport function maybeUtcInterval(interval) {\n  return parseInterval(interval, utcIntervals);\n}\n\nexport function isUtcYear(i) {\n  if (!i) return false;\n  const date = i.floor(new Date(Date.UTC(2000, 11, 31)));\n  return utcYear(date) >= date; // coercing equality\n}\n\nexport function isTimeYear(i) {\n  if (!i) return false;\n  const date = i.floor(new Date(2000, 11, 31));\n  return timeYear(date) >= date; // coercing equality\n}\n\nexport function formatTimeTicks(scale, data, ticks, anchor) {\n  const format = scale.type === \"time\" ? timeFormat : utcFormat;\n  const template =\n    anchor === \"left\" || anchor === \"right\"\n      ? (f1, f2) => `\\n${f1}\\n${f2}` // extra newline to keep f1 centered\n      : anchor === \"top\"\n      ? (f1, f2) => `${f2}\\n${f1}`\n      : (f1, f2) => `${f1}\\n${f2}`;\n  switch (getTimeTicksInterval(scale, data, ticks)) {\n    case \"millisecond\":\n      return formatConditional(format(\".%L\"), format(\":%M:%S\"), template);\n    case \"second\":\n      return formatConditional(format(\":%S\"), format(\"%-I:%M\"), template);\n    case \"minute\":\n      return formatConditional(format(\"%-I:%M\"), format(\"%p\"), template);\n    case \"hour\":\n      return formatConditional(format(\"%-I %p\"), format(\"%b %-d\"), template);\n    case \"day\":\n      return formatConditional(format(\"%-d\"), format(\"%b\"), template);\n    case \"week\":\n      return formatConditional(format(\"%-d\"), format(\"%b\"), template);\n    case \"month\":\n      return formatConditional(format(\"%b\"), format(\"%Y\"), template);\n    case \"year\":\n      return format(\"%Y\");\n  }\n  throw new Error(\"unable to format time ticks\");\n}\n\n// Compute the median difference between adjacent ticks, ignoring repeated\n// ticks; this implies an effective time interval, assuming that ticks are\n// regularly spaced; choose the largest format less than this interval so that\n// the ticks show the field that is changing. If the ticks are not available,\n// fallback to an approximation based on the desired number of ticks.\nfunction getTimeTicksInterval(scale, data, ticks) {\n  const medianStep = median(pairs(data, (a, b) => Math.abs(b - a) || NaN));\n  if (medianStep > 0) return formats[bisector(([, step]) => step).right(formats, medianStep, 1, formats.length) - 1][0];\n  const [start, stop] = extent(scale.domain());\n  const count = typeof ticks === \"number\" ? ticks : 10;\n  const step = Math.abs(stop - start) / count;\n  return formats[bisector(([, step]) => Math.log(step)).center(formats, Math.log(step))][0];\n}\n\nfunction formatConditional(format1, format2, template) {\n  return (x, i, X) => {\n    const f1 = format1(x, i); // always shown\n    const f2 = format2(x, i); // only shown if different\n    const j = i - orderof(X); // detect reversed domains\n    return i !== j && X[j] !== undefined && f2 === format2(X[j], j) ? f1 : template(f1, f2);\n  };\n}\n", "import {color, descending, quantile, range as rangei} from \"d3\";\nimport {parse as isoParse} from \"isoformat\";\nimport {defined} from \"./defined.js\";\nimport {maybeTimeInterval, maybeUtcInterval} from \"./time.js\";\n\n// https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/TypedArray\nexport const TypedArray = Object.getPrototypeOf(Uint8Array);\nconst objectToString = Object.prototype.toString;\n\nexport function valueof(data, value, type) {\n  const valueType = typeof value;\n  return valueType === \"string\"\n    ? maybeTypedMap(data, field(value), type)\n    : valueType === \"function\"\n    ? maybeTypedMap(data, value, type)\n    : valueType === \"number\" || value instanceof Date || valueType === \"boolean\"\n    ? map(data, constant(value), type)\n    : typeof value?.transform === \"function\"\n    ? maybeTypedArrayify(value.transform(data), type)\n    : maybeTypedArrayify(value, type);\n}\n\nfunction maybeTypedMap(data, f, type) {\n  return map(data, type?.prototype instanceof TypedArray ? floater(f) : f, type);\n}\n\nfunction maybeTypedArrayify(data, type) {\n  return type === undefined\n    ? arrayify(data) // preserve undefined type\n    : data instanceof type\n    ? data\n    : type.prototype instanceof TypedArray && !(data instanceof TypedArray)\n    ? type.from(data, coerceNumber)\n    : type.from(data);\n}\n\nfunction floater(f) {\n  return (d, i) => coerceNumber(f(d, i));\n}\n\nexport const singleton = [null]; // for data-less decoration marks, e.g. frame\nexport const field = (name) => (d) => d[name];\nexport const indexOf = {transform: range};\nexport const identity = {transform: (d) => d};\nexport const zero = () => 0;\nexport const one = () => 1;\nexport const yes = () => true;\nexport const string = (x) => (x == null ? x : `${x}`);\nexport const number = (x) => (x == null ? x : +x);\nexport const boolean = (x) => (x == null ? x : !!x);\nexport const first = (x) => (x ? x[0] : undefined);\nexport const second = (x) => (x ? x[1] : undefined);\nexport const third = (x) => (x ? x[2] : undefined);\nexport const constant = (x) => () => x;\n\n// Converts a string like \u201Cp25\u201D into a function that takes an index I and an\n// accessor function f, returning the corresponding percentile value.\nexport function percentile(reduce) {\n  const p = +`${reduce}`.slice(1) / 100;\n  return (I, f) => quantile(I, p, f);\n}\n\n// If the values are specified as a typed array, no coercion is required.\nexport function coerceNumbers(values) {\n  return values instanceof TypedArray ? values : map(values, coerceNumber, Float64Array);\n}\n\n// Unlike Mark\u2019s number, here we want to convert null and undefined to NaN since\n// the result will be stored in a Float64Array and we don\u2019t want null to be\n// coerced to zero. We use Number instead of unary + to allow BigInt coercion.\nfunction coerceNumber(x) {\n  return x == null ? NaN : Number(x);\n}\n\nexport function coerceDates(values) {\n  return map(values, coerceDate);\n}\n\n// When coercing strings to dates, we only want to allow the ISO 8601 format\n// since the built-in string parsing of the Date constructor varies across\n// browsers. (In the future, this could be made more liberal if desired, though\n// it is still generally preferable to do date parsing yourself explicitly,\n// rather than rely on Plot.) Any non-string values are coerced to number first\n// and treated as milliseconds since UNIX epoch.\nexport function coerceDate(x) {\n  return x instanceof Date && !isNaN(x)\n    ? x\n    : typeof x === \"string\"\n    ? isoParse(x)\n    : x == null || isNaN((x = +x))\n    ? undefined\n    : new Date(x);\n}\n\n// Some channels may allow a string constant to be specified; to differentiate\n// string constants (e.g., \"red\") from named fields (e.g., \"date\"), this\n// function tests whether the given value is a CSS color string and returns a\n// tuple [channel, constant] where one of the two is undefined, and the other is\n// the given value. If you wish to reference a named field that is also a valid\n// CSS color, use an accessor (d => d.red) instead.\nexport function maybeColorChannel(value, defaultValue) {\n  if (value === undefined) value = defaultValue;\n  return value === null ? [undefined, \"none\"] : isColor(value) ? [undefined, value] : [value, undefined];\n}\n\n// Similar to maybeColorChannel, this tests whether the given value is a number\n// indicating a constant, and otherwise assumes that it\u2019s a channel value.\nexport function maybeNumberChannel(value, defaultValue) {\n  if (value === undefined) value = defaultValue;\n  return value === null || typeof value === \"number\" ? [undefined, value] : [value, undefined];\n}\n\n// Validates the specified optional string against the allowed list of keywords.\nexport function maybeKeyword(input, name, allowed) {\n  if (input != null) return keyword(input, name, allowed);\n}\n\n// Validates the specified required string against the allowed list of keywords.\nexport function keyword(input, name, allowed) {\n  const i = `${input}`.toLowerCase();\n  if (!allowed.includes(i)) throw new Error(`invalid ${name}: ${input}`);\n  return i;\n}\n\n// Promotes the specified data to an array as needed.\nexport function arrayify(data) {\n  return data == null || data instanceof Array || data instanceof TypedArray ? data : Array.from(data);\n}\n\n// An optimization of type.from(values, f): if the given values are already an\n// instanceof the desired array type, the faster values.map method is used.\nexport function map(values, f, type = Array) {\n  return values == null ? values : values instanceof type ? values.map(f) : type.from(values, f);\n}\n\n// An optimization of type.from(values): if the given values are already an\n// instanceof the desired array type, the faster values.slice method is used.\nexport function slice(values, type = Array) {\n  return values instanceof type ? values.slice() : type.from(values);\n}\n\n// Returns true if any of x, x1, or x2 is not (strictly) undefined.\nexport function hasX({x, x1, x2}) {\n  return x !== undefined || x1 !== undefined || x2 !== undefined;\n}\n\n// Returns true if any of y, y1, or y2 is not (strictly) undefined.\nexport function hasY({y, y1, y2}) {\n  return y !== undefined || y1 !== undefined || y2 !== undefined;\n}\n\n// Returns true if has x or y, or if interval is not (strictly) undefined.\nexport function hasXY(options) {\n  return hasX(options) || hasY(options) || options.interval !== undefined;\n}\n\n// Disambiguates an options object (e.g., {y: \"x2\"}) from a primitive value.\nexport function isObject(option) {\n  return option?.toString === objectToString;\n}\n\n// Disambiguates a scale options object (e.g., {color: {type: \"linear\"}}) from\n// some other option (e.g., {color: \"red\"}). When creating standalone legends,\n// this is used to test whether a scale is defined; this should be consistent\n// with inferScaleType when there are no channels associated with the scale, and\n// if this returns true, then normalizeScale must return non-null.\nexport function isScaleOptions(option) {\n  return isObject(option) && (option.type !== undefined || option.domain !== undefined);\n}\n\n// Disambiguates an options object (e.g., {y: \"x2\"}) from a channel value\n// definition expressed as a channel transform (e.g., {transform: \u2026}).\nexport function isOptions(option) {\n  return isObject(option) && typeof option.transform !== \"function\";\n}\n\n// Disambiguates a sort transform (e.g., {sort: \"date\"}) from a channel domain\n// sort definition (e.g., {sort: {y: \"x\"}}).\nexport function isDomainSort(sort) {\n  return isOptions(sort) && sort.value === undefined && sort.channel === undefined;\n}\n\n// For marks specified either as [0, x] or [x1, x2], such as areas and bars.\nexport function maybeZero(x, x1, x2, x3 = identity) {\n  if (x1 === undefined && x2 === undefined) {\n    // {x} or {}\n    (x1 = 0), (x2 = x === undefined ? x3 : x);\n  } else if (x1 === undefined) {\n    // {x, x2} or {x2}\n    x1 = x === undefined ? 0 : x;\n  } else if (x2 === undefined) {\n    // {x, x1} or {x1}\n    x2 = x === undefined ? 0 : x;\n  }\n  return [x1, x2];\n}\n\n// For marks that have x and y channels (e.g., cell, dot, line, text).\nexport function maybeTuple(x, y) {\n  return x === undefined && y === undefined ? [first, second] : [x, y];\n}\n\n// A helper for extracting the z channel, if it is variable. Used by transforms\n// that require series, such as moving average and normalize.\nexport function maybeZ({z, fill, stroke} = {}) {\n  if (z === undefined) [z] = maybeColorChannel(fill);\n  if (z === undefined) [z] = maybeColorChannel(stroke);\n  return z;\n}\n\n// Returns a Uint32Array with elements [0, 1, 2, \u2026 data.length - 1].\nexport function range(data) {\n  const n = data.length;\n  const r = new Uint32Array(n);\n  for (let i = 0; i < n; ++i) r[i] = i;\n  return r;\n}\n\n// Returns a filtered range of data given the test function.\nexport function where(data, test) {\n  return range(data).filter((i) => test(data[i], i, data));\n}\n\n// Returns an array [values[index[0]], values[index[1]], \u2026].\nexport function take(values, index) {\n  return map(index, (i) => values[i]);\n}\n\n// If f does not take exactly one argument, wraps it in a function that uses take.\nexport function taker(f) {\n  return f.length === 1 ? (index, values) => f(take(values, index)) : f;\n}\n\n// Uses subarray if available, and otherwise slice.\nexport function subarray(I, i, j) {\n  return I.subarray ? I.subarray(i, j) : I.slice(i, j);\n}\n\n// Based on InternMap (d3.group).\nexport function keyof(value) {\n  return value !== null && typeof value === \"object\" ? value.valueOf() : value;\n}\n\nexport function maybeInput(key, options) {\n  if (options[key] !== undefined) return options[key];\n  switch (key) {\n    case \"x1\":\n    case \"x2\":\n      key = \"x\";\n      break;\n    case \"y1\":\n    case \"y2\":\n      key = \"y\";\n      break;\n  }\n  return options[key];\n}\n\nexport function column(source) {\n  // Defines a column whose values are lazily populated by calling the returned\n  // setter. If the given source is labeled, the label is propagated to the\n  // returned column definition.\n  let value;\n  return [\n    {\n      transform: () => value,\n      label: labelof(source)\n    },\n    (v) => (value = v)\n  ];\n}\n\n// Like column, but allows the source to be null.\nexport function maybeColumn(source) {\n  return source == null ? [source] : column(source);\n}\n\nexport function labelof(value, defaultValue) {\n  return typeof value === \"string\" ? value : value && value.label !== undefined ? value.label : defaultValue;\n}\n\n// Assuming that both x1 and x2 and lazy columns (per above), this derives a new\n// a column that\u2019s the average of the two, and which inherits the column label\n// (if any). Both input columns are assumed to be quantitative. If either column\n// is temporal, the returned column is also temporal.\nexport function mid(x1, x2) {\n  return {\n    transform(data) {\n      const X1 = x1.transform(data);\n      const X2 = x2.transform(data);\n      return isTemporal(X1) || isTemporal(X2)\n        ? map(X1, (_, i) => new Date((+X1[i] + +X2[i]) / 2))\n        : map(X1, (_, i) => (+X1[i] + +X2[i]) / 2, Float64Array);\n    },\n    label: x1.label\n  };\n}\n\n// If the scale options declare an interval, applies it to the values V.\nexport function maybeApplyInterval(V, scale) {\n  const t = maybeIntervalTransform(scale?.interval, scale?.type);\n  return t ? map(V, t) : V;\n}\n\n// Returns the equivalent scale transform for the specified interval option.\nexport function maybeIntervalTransform(interval, type) {\n  const i = maybeInterval(interval, type);\n  return i && ((v) => (defined(v) ? i.floor(v) : v));\n}\n\n// If interval is not nullish, converts interval shorthand such as a number (for\n// multiples) or a time interval name (such as \u201Cday\u201D) to a {floor, offset,\n// range} object similar to a D3 time interval.\nexport function maybeInterval(interval, type) {\n  if (interval == null) return;\n  if (typeof interval === \"number\") {\n    if (0 < interval && interval < 1 && Number.isInteger(1 / interval)) interval = -1 / interval;\n    const n = Math.abs(interval);\n    return interval < 0\n      ? {\n          floor: (d) => Math.floor(d * n) / n,\n          offset: (d) => (d * n + 1) / n, // note: no optional step for simplicity\n          range: (lo, hi) => rangei(Math.ceil(lo * n), hi * n).map((x) => x / n)\n        }\n      : {\n          floor: (d) => Math.floor(d / n) * n,\n          offset: (d) => d + n, // note: no optional step for simplicity\n          range: (lo, hi) => rangei(Math.ceil(lo / n), hi / n).map((x) => x * n)\n        };\n  }\n  if (typeof interval === \"string\") return (type === \"time\" ? maybeTimeInterval : maybeUtcInterval)(interval);\n  if (typeof interval.floor !== \"function\") throw new Error(\"invalid interval; missing floor method\");\n  if (typeof interval.offset !== \"function\") throw new Error(\"invalid interval; missing offset method\");\n  return interval;\n}\n\n// Like maybeInterval, but requires a range method too.\nexport function maybeRangeInterval(interval, type) {\n  interval = maybeInterval(interval, type);\n  if (interval && typeof interval.range !== \"function\") throw new Error(\"invalid interval: missing range method\");\n  return interval;\n}\n\n// Like maybeRangeInterval, but requires a ceil method too.\nexport function maybeNiceInterval(interval, type) {\n  interval = maybeRangeInterval(interval, type);\n  if (interval && typeof interval.ceil !== \"function\") throw new Error(\"invalid interval: missing ceil method\");\n  return interval;\n}\n\n// This distinguishes between per-dimension options and a standalone value.\nexport function maybeValue(value) {\n  return value === undefined || isOptions(value) ? value : {value};\n}\n\n// Coerces the given channel values (if any) to numbers. This is useful when\n// values will be interpolated into other code, such as an SVG transform, and\n// where we don\u2019t wish to allow unexpected behavior for weird input.\nexport function numberChannel(source) {\n  return source == null\n    ? null\n    : {\n        transform: (data) => valueof(data, source, Float64Array),\n        label: labelof(source)\n      };\n}\n\nexport function isTuples(data) {\n  if (!isIterable(data)) return false;\n  for (const d of data) {\n    if (d == null) continue;\n    return typeof d === \"object\" && \"0\" in d && \"1\" in d;\n  }\n}\n\nexport function isIterable(value) {\n  return value && typeof value[Symbol.iterator] === \"function\";\n}\n\nexport function isTextual(values) {\n  for (const value of values) {\n    if (value == null) continue;\n    return typeof value !== \"object\" || value instanceof Date;\n  }\n}\n\nexport function isOrdinal(values) {\n  for (const value of values) {\n    if (value == null) continue;\n    const type = typeof value;\n    return type === \"string\" || type === \"boolean\";\n  }\n}\n\nexport function isTemporal(values) {\n  for (const value of values) {\n    if (value == null) continue;\n    return value instanceof Date;\n  }\n}\n\n// Are these strings that might represent dates? This is stricter than ISO 8601\n// because we want to ignore false positives on numbers; for example, the string\n// \"1192\" is more likely to represent a number than a date even though it is\n// valid ISO 8601 representing 1192-01-01.\nexport function isTemporalString(values) {\n  for (const value of values) {\n    if (value == null) continue;\n    return typeof value === \"string\" && isNaN(value) && isoParse(value);\n  }\n}\n\n// Are these strings that might represent numbers? This is stricter than\n// coercion because we want to ignore false positives on e.g. empty strings.\nexport function isNumericString(values) {\n  for (const value of values) {\n    if (value == null) continue;\n    if (typeof value !== \"string\") return false;\n    if (!value.trim()) continue;\n    return !isNaN(value);\n  }\n}\n\nexport function isNumeric(values) {\n  for (const value of values) {\n    if (value == null) continue;\n    return typeof value === \"number\";\n  }\n}\n\n// Returns true if every non-null value in the specified iterable of values\n// passes the specified predicate, and there is at least one non-null value;\n// returns false if at least one non-null value does not pass the specified\n// predicate; otherwise returns undefined (as if all values are null).\nexport function isEvery(values, is) {\n  let every;\n  for (const value of values) {\n    if (value == null) continue;\n    if (!is(value)) return false;\n    every = true;\n  }\n  return every;\n}\n\n// Mostly relies on d3-color, with a few extra color keywords. Currently this\n// strictly requires that the value be a string; we might want to apply string\n// coercion here, though note that d3-color instances would need to support\n// valueOf to work correctly with InternMap.\n// https://www.w3.org/TR/SVG11/painting.html#SpecifyingPaint\nexport function isColor(value) {\n  if (typeof value !== \"string\") return false;\n  value = value.toLowerCase().trim();\n  return (\n    value === \"none\" ||\n    value === \"currentcolor\" ||\n    (value.startsWith(\"url(\") && value.endsWith(\")\")) || // <funciri>, e.g. pattern or gradient\n    (value.startsWith(\"var(\") && value.endsWith(\")\")) || // CSS variable\n    color(value) !== null\n  );\n}\n\nexport function isOpacity(value) {\n  return typeof value === \"number\" && ((0 <= value && value <= 1) || isNaN(value));\n}\n\nexport function isNoneish(value) {\n  return value == null || isNone(value);\n}\n\nexport function isNone(value) {\n  return /^\\s*none\\s*$/i.test(value);\n}\n\nexport function isRound(value) {\n  return /^\\s*round\\s*$/i.test(value);\n}\n\nexport function maybeAnchor(value, name) {\n  return maybeKeyword(value, name, [\n    \"middle\",\n    \"top-left\",\n    \"top\",\n    \"top-right\",\n    \"right\",\n    \"bottom-right\",\n    \"bottom\",\n    \"bottom-left\",\n    \"left\"\n  ]);\n}\n\nexport function maybeFrameAnchor(value = \"middle\") {\n  return maybeAnchor(value, \"frameAnchor\");\n}\n\n// Like a sort comparator, returns a positive value if the given array of values\n// is in ascending order, a negative value if the values are in descending\n// order. Assumes monotonicity; only tests the first and last values.\nexport function orderof(values) {\n  if (values == null) return;\n  const first = values[0];\n  const last = values[values.length - 1];\n  return descending(first, last);\n}\n\n// Unlike {...defaults, ...options}, this ensures that any undefined (but\n// present) properties in options inherit the given default value.\nexport function inherit(options = {}, ...rest) {\n  let o = options;\n  for (const defaults of rest) {\n    for (const key in defaults) {\n      if (o[key] === undefined) {\n        const value = defaults[key];\n        if (o === options) o = {...o, [key]: value};\n        else o[key] = value;\n      }\n    }\n  }\n  return o;\n}\n\n// Given an iterable of named things (objects with a name property), returns a\n// corresponding object with properties associated with the given name.\nexport function named(things) {\n  console.warn(\"named iterables are deprecated; please use an object instead\");\n  const names = new Set();\n  return Object.fromEntries(\n    Array.from(things, (thing) => {\n      const {name} = thing;\n      if (name == null) throw new Error(\"missing name\");\n      const key = `${name}`;\n      if (key === \"__proto__\") throw new Error(`illegal name: ${key}`);\n      if (names.has(key)) throw new Error(`duplicate name: ${key}`);\n      names.add(key);\n      return [name, thing];\n    })\n  );\n}\n\nexport function maybeNamed(things) {\n  return isIterable(things) ? named(things) : things;\n}\n", "// Positional scales have associated axes, and for ordinal data, a point or band\n// scale is used instead of an ordinal scale.\nexport const position = Symbol(\"position\");\n\n// Color scales default to the turbo interpolator for quantitative data, and to\n// the Tableau10 scheme for ordinal data. Color scales may also have an\n// associated legend.\nexport const color = Symbol(\"color\");\n\n// Radius scales default to the sqrt type, have a default range of [0, 3], and a\n// default domain from 0 to the median first quartile of associated channels.\nexport const radius = Symbol(\"radius\");\n\n// Length scales default to the linear type, have a default range of [0, 12],\n// and a default domain from 0 to the median median of associated channels.\nexport const length = Symbol(\"length\");\n\n// Opacity scales have a default range of [0, 1], and a default domain from 0 to\n// the maximum value of associated channels.\nexport const opacity = Symbol(\"opacity\");\n\n// Symbol scales have a default range of categorical symbols.\nexport const symbol = Symbol(\"symbol\");\n\n// There isn\u2019t really a projection scale; this represents x and y for geometry.\nexport const projection = Symbol(\"projection\");\n\n// TODO Rather than hard-coding the list of known scale names, collect the names\n// and categories for each plot specification, so that custom marks can register\n// custom scales.\nexport const registry = new Map([\n  [\"x\", position],\n  [\"y\", position],\n  [\"fx\", position],\n  [\"fy\", position],\n  [\"r\", radius],\n  [\"color\", color],\n  [\"opacity\", opacity],\n  [\"symbol\", symbol],\n  [\"length\", length],\n  [\"projection\", projection]\n]);\n", "import {symbolAsterisk, symbolDiamond2, symbolPlus, symbolSquare2, symbolTriangle2, symbolTimes} from \"d3\";\nimport {symbolCircle, symbolCross, symbolDiamond, symbolSquare, symbolStar, symbolTriangle, symbolWye} from \"d3\";\n\nexport const sqrt3 = Math.sqrt(3);\nexport const sqrt4_3 = 2 / sqrt3;\n\nconst symbolHexagon = {\n  draw(context, size) {\n    const rx = Math.sqrt(size / Math.PI),\n      ry = rx * sqrt4_3,\n      hy = ry / 2;\n    context.moveTo(0, ry);\n    context.lineTo(rx, hy);\n    context.lineTo(rx, -hy);\n    context.lineTo(0, -ry);\n    context.lineTo(-rx, -hy);\n    context.lineTo(-rx, hy);\n    context.closePath();\n  }\n};\n\nconst symbols = new Map([\n  [\"asterisk\", symbolAsterisk],\n  [\"circle\", symbolCircle],\n  [\"cross\", symbolCross],\n  [\"diamond\", symbolDiamond],\n  [\"diamond2\", symbolDiamond2],\n  [\"hexagon\", symbolHexagon],\n  [\"plus\", symbolPlus],\n  [\"square\", symbolSquare],\n  [\"square2\", symbolSquare2],\n  [\"star\", symbolStar],\n  [\"times\", symbolTimes],\n  [\"triangle\", symbolTriangle],\n  [\"triangle2\", symbolTriangle2],\n  [\"wye\", symbolWye]\n]);\n\nfunction isSymbolObject(value) {\n  return value && typeof value.draw === \"function\";\n}\n\nexport function isSymbol(value) {\n  if (isSymbolObject(value)) return true;\n  if (typeof value !== \"string\") return false;\n  return symbols.has(value.toLowerCase());\n}\n\nexport function maybeSymbol(symbol) {\n  if (symbol == null || isSymbolObject(symbol)) return symbol;\n  const value = symbols.get(`${symbol}`.toLowerCase());\n  if (value) return value;\n  throw new Error(`invalid symbol: ${symbol}`);\n}\n\nexport function maybeSymbolChannel(symbol) {\n  if (symbol == null || isSymbolObject(symbol)) return [undefined, symbol];\n  if (typeof symbol === \"string\") {\n    const value = symbols.get(`${symbol}`.toLowerCase());\n    if (value) return [undefined, value];\n  }\n  return [symbol, undefined];\n}\n", "import {randomLcg} from \"d3\";\nimport {ascendingDefined, descendingDefined} from \"../defined.js\";\nimport {arrayify, isDomainSort, isOptions, maybeValue, valueof} from \"../options.js\";\n\nexport function basic({filter: f1, sort: s1, reverse: r1, transform: t1, initializer: i1, ...options} = {}, transform) {\n  // If both t1 and t2 are defined, returns a composite transform that first\n  // applies t1 and then applies t2.\n  if (t1 === undefined) {\n    // explicit transform overrides filter, sort, and reverse\n    if (f1 != null) t1 = filterTransform(f1);\n    if (s1 != null && !isDomainSort(s1)) t1 = composeTransform(t1, sortTransform(s1));\n    if (r1) t1 = composeTransform(t1, reverseTransform);\n  }\n  if (transform != null && i1 != null) throw new Error(\"transforms cannot be applied after initializers\");\n  return {\n    ...options,\n    ...((s1 === null || isDomainSort(s1)) && {sort: s1}),\n    transform: composeTransform(t1, transform)\n  };\n}\n\nexport function initializer({filter: f1, sort: s1, reverse: r1, initializer: i1, ...options} = {}, initializer) {\n  // If both i1 and i2 are defined, returns a composite initializer that first\n  // applies i1 and then applies i2.\n  if (i1 === undefined) {\n    // explicit initializer overrides filter, sort, and reverse\n    if (f1 != null) i1 = filterTransform(f1);\n    if (s1 != null && !isDomainSort(s1)) i1 = composeInitializer(i1, sortTransform(s1));\n    if (r1) i1 = composeInitializer(i1, reverseTransform);\n  }\n  return {\n    ...options,\n    ...((s1 === null || isDomainSort(s1)) && {sort: s1}),\n    initializer: composeInitializer(i1, initializer)\n  };\n}\n\nfunction composeTransform(t1, t2) {\n  if (t1 == null) return t2 === null ? undefined : t2;\n  if (t2 == null) return t1 === null ? undefined : t1;\n  return function (data, facets, plotOptions) {\n    ({data, facets} = t1.call(this, data, facets, plotOptions));\n    return t2.call(this, arrayify(data), facets, plotOptions);\n  };\n}\n\nfunction composeInitializer(i1, i2) {\n  if (i1 == null) return i2 === null ? undefined : i2;\n  if (i2 == null) return i1 === null ? undefined : i1;\n  return function (data, facets, channels, ...args) {\n    let c1, d1, f1, c2, d2, f2;\n    ({data: d1 = data, facets: f1 = facets, channels: c1} = i1.call(this, data, facets, channels, ...args));\n    ({data: d2 = d1, facets: f2 = f1, channels: c2} = i2.call(this, d1, f1, {...channels, ...c1}, ...args));\n    return {data: d2, facets: f2, channels: {...c1, ...c2}};\n  };\n}\n\nfunction apply(options, t) {\n  return (options.initializer != null ? initializer : basic)(options, t);\n}\n\nexport function filter(test, options) {\n  return apply(options, filterTransform(test));\n}\n\nfunction filterTransform(value) {\n  return (data, facets) => {\n    const V = valueof(data, value);\n    return {data, facets: facets.map((I) => I.filter((i) => V[i]))};\n  };\n}\n\nexport function reverse({sort, ...options} = {}) {\n  return {\n    ...apply(options, reverseTransform),\n    sort: isDomainSort(sort) ? sort : null\n  };\n}\n\nfunction reverseTransform(data, facets) {\n  return {data, facets: facets.map((I) => I.slice().reverse())};\n}\n\nexport function shuffle({seed, sort, ...options} = {}) {\n  return {\n    ...apply(options, sortValue(seed == null ? Math.random : randomLcg(seed))),\n    sort: isDomainSort(sort) ? sort : null\n  };\n}\n\nexport function sort(order, {sort, ...options} = {}) {\n  return {\n    ...(isOptions(order) && order.channel !== undefined ? initializer : apply)(options, sortTransform(order)),\n    sort: isDomainSort(sort) ? sort : null\n  };\n}\n\nfunction sortTransform(value) {\n  return (typeof value === \"function\" && value.length !== 1 ? sortData : sortValue)(value);\n}\n\nfunction sortData(compare) {\n  return (data, facets) => {\n    const compareData = (i, j) => compare(data[i], data[j]);\n    return {data, facets: facets.map((I) => I.slice().sort(compareData))};\n  };\n}\n\nfunction sortValue(value) {\n  let channel, order;\n  ({channel, value, order} = {...maybeValue(value)});\n  const negate = channel?.startsWith(\"-\");\n  if (negate) channel = channel.slice(1);\n  if (order === undefined) order = negate ? descendingDefined : ascendingDefined;\n  if (typeof order !== \"function\") {\n    switch (`${order}`.toLowerCase()) {\n      case \"ascending\":\n        order = ascendingDefined;\n        break;\n      case \"descending\":\n        order = descendingDefined;\n        break;\n      default:\n        throw new Error(`invalid order: ${order}`);\n    }\n  }\n  return (data, facets, channels) => {\n    let V;\n    if (channel === undefined) {\n      V = valueof(data, value);\n    } else {\n      if (channels === undefined) throw new Error(\"channel sort requires an initializer\");\n      V = channels[channel];\n      if (!V) return {}; // ignore missing channel\n      V = V.value;\n    }\n    const compareValue = (i, j) => order(V[i], V[j]);\n    return {data, facets: facets.map((I) => I.slice().sort(compareValue))};\n  };\n}\n", "import {\n  InternSet,\n  deviation,\n  group as grouper,\n  max,\n  maxIndex,\n  mean,\n  median,\n  min,\n  minIndex,\n  mode,\n  rollup,\n  sort,\n  sum,\n  variance\n} from \"d3\";\nimport {ascendingDefined} from \"../defined.js\";\nimport {\n  column,\n  first,\n  identity,\n  isObject,\n  isTemporal,\n  labelof,\n  maybeApplyInterval,\n  maybeColorChannel,\n  maybeColumn,\n  maybeInput,\n  maybeTuple,\n  percentile,\n  range,\n  second,\n  take,\n  valueof\n} from \"../options.js\";\nimport {basic} from \"./basic.js\";\n\n// Group on {z, fill, stroke}.\nexport function groupZ(outputs, options) {\n  return groupn(null, null, outputs, options);\n}\n\n// Group on {z, fill, stroke}, then on x.\nexport function groupX(outputs = {y: \"count\"}, options = {}) {\n  const {x = identity} = options;\n  if (x == null) throw new Error(\"missing channel: x\");\n  return groupn(x, null, outputs, options);\n}\n\n// Group on {z, fill, stroke}, then on y.\nexport function groupY(outputs = {x: \"count\"}, options = {}) {\n  const {y = identity} = options;\n  if (y == null) throw new Error(\"missing channel: y\");\n  return groupn(null, y, outputs, options);\n}\n\n// Group on {z, fill, stroke}, then on x and y.\nexport function group(outputs = {fill: \"count\"}, options = {}) {\n  let {x, y} = options;\n  [x, y] = maybeTuple(x, y);\n  if (x == null) throw new Error(\"missing channel: x\");\n  if (y == null) throw new Error(\"missing channel: y\");\n  return groupn(x, y, outputs, options);\n}\n\nfunction groupn(\n  x, // optionally group on x\n  y, // optionally group on y\n  {\n    data: reduceData = reduceIdentity,\n    filter,\n    sort,\n    reverse,\n    ...outputs // output channel definitions\n  } = {},\n  inputs = {} // input channels and options\n) {\n  // Compute the outputs.\n  outputs = maybeOutputs(outputs, inputs);\n  reduceData = maybeReduce(reduceData, identity);\n  sort = sort == null ? undefined : maybeOutput(\"sort\", sort, inputs);\n  filter = filter == null ? undefined : maybeEvaluator(\"filter\", filter, inputs);\n\n  // Produce x and y output channels as appropriate.\n  const [GX, setGX] = maybeColumn(x);\n  const [GY, setGY] = maybeColumn(y);\n\n  // Greedily materialize the z, fill, and stroke channels (if channels and not\n  // constants) so that we can reference them for subdividing groups without\n  // computing them more than once.\n  const {\n    z,\n    fill,\n    stroke,\n    x1,\n    x2, // consumed if x is an output\n    y1,\n    y2, // consumed if y is an output\n    ...options\n  } = inputs;\n  const [GZ, setGZ] = maybeColumn(z);\n  const [vfill] = maybeColorChannel(fill);\n  const [vstroke] = maybeColorChannel(stroke);\n  const [GF, setGF] = maybeColumn(vfill);\n  const [GS, setGS] = maybeColumn(vstroke);\n\n  return {\n    ...(\"z\" in inputs && {z: GZ || z}),\n    ...(\"fill\" in inputs && {fill: GF || fill}),\n    ...(\"stroke\" in inputs && {stroke: GS || stroke}),\n    ...basic(options, (data, facets, plotOptions) => {\n      const X = maybeApplyInterval(valueof(data, x), plotOptions?.x);\n      const Y = maybeApplyInterval(valueof(data, y), plotOptions?.y);\n      const Z = valueof(data, z);\n      const F = valueof(data, vfill);\n      const S = valueof(data, vstroke);\n      const G = maybeSubgroup(outputs, {z: Z, fill: F, stroke: S});\n      const groupFacets = [];\n      const groupData = [];\n      const GX = X && setGX([]);\n      const GY = Y && setGY([]);\n      const GZ = Z && setGZ([]);\n      const GF = F && setGF([]);\n      const GS = S && setGS([]);\n      let i = 0;\n      for (const o of outputs) o.initialize(data);\n      if (sort) sort.initialize(data);\n      if (filter) filter.initialize(data);\n      for (const facet of facets) {\n        const groupFacet = [];\n        for (const o of outputs) o.scope(\"facet\", facet);\n        if (sort) sort.scope(\"facet\", facet);\n        if (filter) filter.scope(\"facet\", facet);\n        for (const [f, I] of maybeGroup(facet, G)) {\n          for (const [y, gg] of maybeGroup(I, Y)) {\n            for (const [x, g] of maybeGroup(gg, X)) {\n              if (filter && !filter.reduce(g)) continue;\n              groupFacet.push(i++);\n              groupData.push(reduceData.reduceIndex(g, data));\n              if (X) GX.push(x);\n              if (Y) GY.push(y);\n              if (Z) GZ.push(G === Z ? f : Z[g[0]]);\n              if (F) GF.push(G === F ? f : F[g[0]]);\n              if (S) GS.push(G === S ? f : S[g[0]]);\n              for (const o of outputs) o.reduce(g);\n              if (sort) sort.reduce(g);\n            }\n          }\n        }\n        groupFacets.push(groupFacet);\n      }\n      maybeSort(groupFacets, sort, reverse);\n      return {data: groupData, facets: groupFacets};\n    }),\n    ...(!hasOutput(outputs, \"x\") && (GX ? {x: GX} : {x1, x2})),\n    ...(!hasOutput(outputs, \"y\") && (GY ? {y: GY} : {y1, y2})),\n    ...Object.fromEntries(outputs.map(({name, output}) => [name, output]))\n  };\n}\n\nexport function hasOutput(outputs, ...names) {\n  for (const {name} of outputs) {\n    if (names.includes(name)) {\n      return true;\n    }\n  }\n  return false;\n}\n\nexport function maybeOutputs(outputs, inputs, asOutput = maybeOutput) {\n  const entries = Object.entries(outputs);\n  // Propagate standard mark channels by default.\n  if (inputs.title != null && outputs.title === undefined) entries.push([\"title\", reduceTitle]);\n  if (inputs.href != null && outputs.href === undefined) entries.push([\"href\", reduceFirst]);\n  return entries\n    .filter(([, reduce]) => reduce !== undefined)\n    .map(([name, reduce]) => (reduce === null ? nullOutput(name) : asOutput(name, reduce, inputs)));\n}\n\nexport function maybeOutput(name, reduce, inputs, asEvaluator = maybeEvaluator) {\n  let scale; // optional per-channel scale override\n  if (isObject(reduce) && \"reduce\" in reduce) (scale = reduce.scale), (reduce = reduce.reduce); // N.B. array.reduce\n  const evaluator = asEvaluator(name, reduce, inputs);\n  const [output, setOutput] = column(evaluator.label);\n  let O;\n  return {\n    name,\n    output: scale === undefined ? output : {value: output, scale},\n    initialize(data) {\n      evaluator.initialize(data);\n      O = setOutput([]);\n    },\n    scope(scope, I) {\n      evaluator.scope(scope, I);\n    },\n    reduce(I, extent) {\n      O.push(evaluator.reduce(I, extent));\n    }\n  };\n}\n\nfunction nullOutput(name) {\n  return {name, initialize() {}, scope() {}, reduce() {}};\n}\n\nexport function maybeEvaluator(name, reduce, inputs, asReduce = maybeReduce) {\n  const input = maybeInput(name, inputs);\n  const reducer = asReduce(reduce, input);\n  let V, context;\n  return {\n    label: labelof(reducer === reduceCount ? null : input, reducer.label),\n    initialize(data) {\n      V = input === undefined ? data : valueof(data, input);\n      if (reducer.scope === \"data\") {\n        context = reducer.reduceIndex(range(data), V);\n      }\n    },\n    scope(scope, I) {\n      if (reducer.scope === scope) {\n        context = reducer.reduceIndex(I, V);\n      }\n    },\n    reduce(I, extent) {\n      return reducer.scope == null ? reducer.reduceIndex(I, V, extent) : reducer.reduceIndex(I, V, context, extent);\n    }\n  };\n}\n\nexport function maybeGroup(I, X) {\n  return X\n    ? sort(\n        grouper(I, (i) => X[i]),\n        first\n      )\n    : [[, I]];\n}\n\nexport function maybeReduce(reduce, value, fallback = invalidReduce) {\n  if (reduce == null) return fallback(reduce);\n  if (typeof reduce.reduceIndex === \"function\") return reduce;\n  if (typeof reduce.reduce === \"function\" && isObject(reduce)) return reduceReduce(reduce); // N.B. array.reduce\n  if (typeof reduce === \"function\") return reduceFunction(reduce);\n  if (/^p\\d{2}$/i.test(reduce)) return reduceAccessor(percentile(reduce));\n  switch (`${reduce}`.toLowerCase()) {\n    case \"first\":\n      return reduceFirst;\n    case \"last\":\n      return reduceLast;\n    case \"identity\":\n      return reduceIdentity;\n    case \"count\":\n      return reduceCount;\n    case \"distinct\":\n      return reduceDistinct;\n    case \"sum\":\n      return value == null ? reduceCount : reduceSum;\n    case \"proportion\":\n      return reduceProportion(value, \"data\");\n    case \"proportion-facet\":\n      return reduceProportion(value, \"facet\");\n    case \"deviation\":\n      return reduceAccessor(deviation);\n    case \"min\":\n      return reduceAccessor(min);\n    case \"min-index\":\n      return reduceAccessor(minIndex);\n    case \"max\":\n      return reduceAccessor(max);\n    case \"max-index\":\n      return reduceAccessor(maxIndex);\n    case \"mean\":\n      return reduceMaybeTemporalAccessor(mean);\n    case \"median\":\n      return reduceMaybeTemporalAccessor(median);\n    case \"variance\":\n      return reduceAccessor(variance);\n    case \"mode\":\n      return reduceAccessor(mode);\n  }\n  return fallback(reduce);\n}\n\nfunction invalidReduce(reduce) {\n  throw new Error(`invalid reduce: ${reduce}`);\n}\n\nexport function maybeSubgroup(outputs, inputs) {\n  for (const name in inputs) {\n    const value = inputs[name];\n    if (value !== undefined && !outputs.some((o) => o.name === name)) {\n      return value;\n    }\n  }\n}\n\nexport function maybeSort(facets, sort, reverse) {\n  if (sort) {\n    const S = sort.output.transform();\n    const compare = (i, j) => ascendingDefined(S[i], S[j]);\n    facets.forEach((f) => f.sort(compare));\n  }\n  if (reverse) {\n    facets.forEach((f) => f.reverse());\n  }\n}\n\nfunction reduceReduce(reduce) {\n  console.warn(\"deprecated reduce interface; implement reduceIndex instead.\");\n  return {...reduce, reduceIndex: reduce.reduce.bind(reduce)};\n}\n\nfunction reduceFunction(f) {\n  return {\n    reduceIndex(I, X, extent) {\n      return f(take(X, I), extent);\n    }\n  };\n}\n\nfunction reduceAccessor(f) {\n  return {\n    reduceIndex(I, X) {\n      return f(I, (i) => X[i]);\n    }\n  };\n}\n\nfunction reduceMaybeTemporalAccessor(f) {\n  return {\n    reduceIndex(I, X) {\n      const x = f(I, (i) => X[i]);\n      return isTemporal(X) ? new Date(x) : x;\n    }\n  };\n}\n\nexport const reduceIdentity = {\n  reduceIndex(I, X) {\n    return take(X, I);\n  }\n};\n\nexport const reduceFirst = {\n  reduceIndex(I, X) {\n    return X[I[0]];\n  }\n};\n\nconst reduceTitle = {\n  reduceIndex(I, X) {\n    const n = 5;\n    const groups = sort(\n      rollup(\n        I,\n        (V) => V.length,\n        (i) => X[i]\n      ),\n      second\n    );\n    const top = groups.slice(-n).reverse();\n    if (top.length < groups.length) {\n      const bottom = groups.slice(0, 1 - n);\n      top[n - 1] = [`\u2026 ${bottom.length.toLocaleString(\"en-US\")} more`, sum(bottom, second)];\n    }\n    return top.map(([key, value]) => `${key} (${value.toLocaleString(\"en-US\")})`).join(\"\\n\");\n  }\n};\n\nconst reduceLast = {\n  reduceIndex(I, X) {\n    return X[I[I.length - 1]];\n  }\n};\n\nexport const reduceCount = {\n  label: \"Frequency\",\n  reduceIndex(I) {\n    return I.length;\n  }\n};\n\nconst reduceDistinct = {\n  label: \"Distinct\",\n  reduceIndex(I, X) {\n    const s = new InternSet();\n    for (const i of I) s.add(X[i]);\n    return s.size;\n  }\n};\n\nconst reduceSum = reduceAccessor(sum);\n\nfunction reduceProportion(value, scope) {\n  return value == null\n    ? {scope, label: \"Frequency\", reduceIndex: (I, V, basis = 1) => I.length / basis}\n    : {scope, reduceIndex: (I, V, basis = 1) => sum(I, (i) => V[i]) / basis};\n}\n", "import {InternSet, rollups} from \"d3\";\nimport {ascendingDefined, descendingDefined} from \"./defined.js\";\nimport {first, isColor, isEvery, isIterable, isOpacity, labelof, map, maybeValue, range, valueof} from \"./options.js\";\nimport {registry} from \"./scales/index.js\";\nimport {isSymbol, maybeSymbol} from \"./symbol.js\";\nimport {maybeReduce} from \"./transforms/group.js\";\n\nexport function createChannel(data, {scale, type, value, filter, hint}, name) {\n  if (hint === undefined && typeof value?.transform === \"function\") hint = value.hint;\n  return inferChannelScale(name, {\n    scale,\n    type,\n    value: valueof(data, value),\n    label: labelof(value),\n    filter,\n    hint\n  });\n}\n\nexport function createChannels(channels, data) {\n  return Object.fromEntries(\n    Object.entries(channels).map(([name, channel]) => [name, createChannel(data, channel, name)])\n  );\n}\n\n// TODO Use Float64Array for scales with numeric ranges, e.g. position?\nexport function valueObject(channels, scales) {\n  const values = Object.fromEntries(\n    Object.entries(channels).map(([name, {scale: scaleName, value}]) => {\n      const scale = scaleName == null ? null : scales[scaleName];\n      return [name, scale == null ? value : map(value, scale)];\n    })\n  );\n  values.channels = channels; // expose channel state for advanced usage\n  return values;\n}\n\n// If the channel uses the \"auto\" scale (or equivalently true), infer the scale\n// from the channel name and the provided values. For color and symbol channels,\n// no scale is applied if the values are literal; however for symbols, we must\n// promote symbol names (e.g., \"plus\") to symbol implementations (symbolPlus).\n// Note: mutates channel!\nexport function inferChannelScale(name, channel) {\n  const {scale, value} = channel;\n  if (scale === true || scale === \"auto\") {\n    switch (name) {\n      case \"fill\":\n      case \"stroke\":\n      case \"color\":\n        channel.scale = scale !== true && isEvery(value, isColor) ? null : \"color\";\n        break;\n      case \"fillOpacity\":\n      case \"strokeOpacity\":\n      case \"opacity\":\n        channel.scale = scale !== true && isEvery(value, isOpacity) ? null : \"opacity\";\n        break;\n      case \"symbol\":\n        if (scale !== true && isEvery(value, isSymbol)) {\n          channel.scale = null;\n          channel.value = map(value, maybeSymbol);\n        } else {\n          channel.scale = \"symbol\";\n        }\n        break;\n      default:\n        channel.scale = registry.has(name) ? name : null;\n        break;\n    }\n  } else if (scale === false) {\n    channel.scale = null;\n  } else if (scale != null && !registry.has(scale)) {\n    throw new Error(`unknown scale: ${scale}`);\n  }\n  return channel;\n}\n\n// Note: mutates channel.domain! This is set to a function so that it is lazily\n// computed; i.e., if the scale\u2019s domain is set explicitly, that takes priority\n// over the sort option, and we don\u2019t need to do additional work.\nexport function channelDomain(data, facets, channels, facetChannels, options) {\n  const {order: defaultOrder, reverse: defaultReverse, reduce: defaultReduce = true, limit: defaultLimit} = options;\n  for (const x in options) {\n    if (!registry.has(x)) continue; // ignore unknown scale keys (including generic options)\n    let {value: y, order = defaultOrder, reverse = defaultReverse, reduce = defaultReduce, limit = defaultLimit} = maybeValue(options[x]); // prettier-ignore\n    const negate = y?.startsWith(\"-\");\n    if (negate) y = y.slice(1);\n    order = order === undefined ? negate !== (y === \"width\" || y === \"height\") ? descendingGroup : ascendingGroup : maybeOrder(order); // prettier-ignore\n    if (reduce == null || reduce === false) continue; // disabled reducer\n    const X = x === \"fx\" || x === \"fy\" ? reindexFacetChannel(facets, facetChannels[x]) : findScaleChannel(channels, x);\n    if (!X) throw new Error(`missing channel for scale: ${x}`);\n    const XV = X.value;\n    const [lo = 0, hi = Infinity] = isIterable(limit) ? limit : limit < 0 ? [limit] : [0, limit];\n    if (y == null) {\n      X.domain = () => {\n        let domain = Array.from(new InternSet(XV)); // remove any duplicates\n        if (reverse) domain = domain.reverse();\n        if (lo !== 0 || hi !== Infinity) domain = domain.slice(lo, hi);\n        return domain;\n      };\n    } else {\n      const YV =\n        y === \"data\"\n          ? data\n          : y === \"height\"\n          ? difference(channels, \"y1\", \"y2\")\n          : y === \"width\"\n          ? difference(channels, \"x1\", \"x2\")\n          : values(channels, y, y === \"y\" ? \"y2\" : y === \"x\" ? \"x2\" : undefined);\n      const reducer = maybeReduce(reduce === true ? \"max\" : reduce, YV);\n      X.domain = () => {\n        let domain = rollups(\n          range(XV),\n          (I) => reducer.reduceIndex(I, YV),\n          (i) => XV[i]\n        );\n        if (order) domain.sort(order);\n        if (reverse) domain.reverse();\n        if (lo !== 0 || hi !== Infinity) domain = domain.slice(lo, hi);\n        return domain.map(first);\n      };\n    }\n  }\n}\n\nfunction findScaleChannel(channels, scale) {\n  for (const name in channels) {\n    const channel = channels[name];\n    if (channel.scale === scale) return channel;\n  }\n}\n\n// Facet channels are not affected by transforms; so, to compute the domain of a\n// facet scale, we must first re-index the facet channel according to the\n// transformed mark index. Note: mutates channel, but that should be safe here?\nfunction reindexFacetChannel(facets, channel) {\n  const originalFacets = facets.original;\n  if (originalFacets === facets) return channel; // not transformed\n  const V1 = channel.value;\n  const V2 = (channel.value = []); // mutates channel!\n  for (let i = 0; i < originalFacets.length; ++i) {\n    const vi = V1[originalFacets[i][0]];\n    for (const j of facets[i]) V2[j] = vi;\n  }\n  return channel;\n}\n\nfunction difference(channels, k1, k2) {\n  const X1 = values(channels, k1);\n  const X2 = values(channels, k2);\n  return map(X2, (x2, i) => Math.abs(x2 - X1[i]), Float64Array);\n}\n\nfunction values(channels, name, alias) {\n  let channel = channels[name];\n  if (!channel && alias !== undefined) channel = channels[alias];\n  if (channel) return channel.value;\n  throw new Error(`missing channel: ${name}`);\n}\n\nfunction maybeOrder(order) {\n  if (order == null || typeof order === \"function\") return order;\n  switch (`${order}`.toLowerCase()) {\n    case \"ascending\":\n      return ascendingGroup;\n    case \"descending\":\n      return descendingGroup;\n  }\n  throw new Error(`invalid order: ${order}`);\n}\n\nfunction ascendingGroup([ak, av], [bk, bv]) {\n  return ascendingDefined(av, bv) || ascendingDefined(ak, bk);\n}\n\nfunction descendingGroup([ak, av], [bk, bv]) {\n  return descendingDefined(av, bv) || ascendingDefined(ak, bk);\n}\n\nexport function getSource(channels, key) {\n  let channel = channels[key];\n  if (!channel) return;\n  while (channel.source) channel = channel.source;\n  return channel.source === null ? null : channel;\n}\n", "import {creator, select} from \"d3\";\n\nexport function createContext(options = {}) {\n  const {document = typeof window !== \"undefined\" ? window.document : undefined} = options;\n  return {document};\n}\n\nexport function create(name, {document}) {\n  return select(creator(name).call(document.documentElement));\n}\n", "let warnings = 0;\n\nexport function consumeWarnings() {\n  const w = warnings;\n  warnings = 0;\n  return w;\n}\n\nexport function warn(message) {\n  console.warn(message);\n  ++warnings;\n}\n", "import {\n  geoAlbers,\n  geoAlbersUsa,\n  geoAzimuthalEqualArea,\n  geoAzimuthalEquidistant,\n  geoClipRectangle,\n  geoConicConformal,\n  geoConicEqualArea,\n  geoConicEquidistant,\n  geoEqualEarth,\n  geoEquirectangular,\n  geoGnomonic,\n  geoMercator,\n  geoOrthographic,\n  geoPath,\n  geoStereographic,\n  geoStream,\n  geoTransform,\n  geoTransverseMercator\n} from \"d3\";\nimport {valueObject} from \"./channel.js\";\nimport {coerceNumbers, constant, isObject} from \"./options.js\";\nimport {warn} from \"./warnings.js\";\n\nconst pi = Math.PI;\nconst tau = 2 * pi;\nconst defaultAspectRatio = 0.618;\n\nexport function createProjection(\n  {\n    projection,\n    inset: globalInset = 0,\n    insetTop = globalInset,\n    insetRight = globalInset,\n    insetBottom = globalInset,\n    insetLeft = globalInset\n  } = {},\n  dimensions\n) {\n  if (projection == null) return;\n  if (typeof projection.stream === \"function\") return projection; // d3 projection\n  let options;\n  let domain;\n  let clip = \"frame\";\n\n  // If the projection was specified as an object with additional options,\n  // extract those. The order of precedence for insetTop (and other insets) is:\n  // projection.insetTop, projection.inset, (global) insetTop, (global) inset.\n  // Any other options on this object will be passed through to the initializer.\n  if (isObject(projection)) {\n    let inset;\n    ({\n      type: projection,\n      domain,\n      inset,\n      insetTop = inset !== undefined ? inset : insetTop,\n      insetRight = inset !== undefined ? inset : insetRight,\n      insetBottom = inset !== undefined ? inset : insetBottom,\n      insetLeft = inset !== undefined ? inset : insetLeft,\n      clip = clip,\n      ...options\n    } = projection);\n    if (projection == null) return;\n  }\n\n  // For named projections, retrieve the corresponding projection initializer.\n  if (typeof projection !== \"function\") ({type: projection} = namedProjection(projection));\n\n  // Compute the frame dimensions and invoke the projection initializer.\n  const {width, height, marginLeft, marginRight, marginTop, marginBottom} = dimensions;\n  const dx = width - marginLeft - marginRight - insetLeft - insetRight;\n  const dy = height - marginTop - marginBottom - insetTop - insetBottom;\n  projection = projection?.({width: dx, height: dy, clip, ...options});\n\n  // The projection initializer might decide to not use a projection.\n  if (projection == null) return;\n  clip = maybePostClip(clip, marginLeft, marginTop, width - marginRight, height - marginBottom);\n\n  // Translate the origin to the top-left corner, respecting margins and insets.\n  let tx = marginLeft + insetLeft;\n  let ty = marginTop + insetTop;\n  let transform;\n\n  // If a domain is specified, fit the projection to the frame.\n  if (domain != null) {\n    const [[x0, y0], [x1, y1]] = geoPath(projection).bounds(domain);\n    const k = Math.min(dx / (x1 - x0), dy / (y1 - y0));\n    if (k > 0) {\n      tx -= (k * (x0 + x1) - dx) / 2;\n      ty -= (k * (y0 + y1) - dy) / 2;\n      transform = geoTransform({\n        point(x, y) {\n          this.stream.point(x * k + tx, y * k + ty);\n        }\n      });\n    } else {\n      warn(`Warning: the projection could not be fit to the specified domain; using the default scale.`);\n    }\n  }\n\n  transform ??=\n    tx === 0 && ty === 0\n      ? identity()\n      : geoTransform({\n          point(x, y) {\n            this.stream.point(x + tx, y + ty);\n          }\n        });\n\n  return {stream: (s) => projection.stream(transform.stream(clip(s)))};\n}\n\nfunction namedProjection(projection) {\n  switch (`${projection}`.toLowerCase()) {\n    case \"albers-usa\":\n      return scaleProjection(geoAlbersUsa, 0.7463, 0.4673);\n    case \"albers\":\n      return conicProjection(geoAlbers, 0.7463, 0.4673);\n    case \"azimuthal-equal-area\":\n      return scaleProjection(geoAzimuthalEqualArea, 4, 4);\n    case \"azimuthal-equidistant\":\n      return scaleProjection(geoAzimuthalEquidistant, tau, tau);\n    case \"conic-conformal\":\n      return conicProjection(geoConicConformal, tau, tau);\n    case \"conic-equal-area\":\n      return conicProjection(geoConicEqualArea, 6.1702, 2.9781);\n    case \"conic-equidistant\":\n      return conicProjection(geoConicEquidistant, 7.312, 3.6282);\n    case \"equal-earth\":\n      return scaleProjection(geoEqualEarth, 5.4133, 2.6347);\n    case \"equirectangular\":\n      return scaleProjection(geoEquirectangular, tau, pi);\n    case \"gnomonic\":\n      return scaleProjection(geoGnomonic, 3.4641, 3.4641);\n    case \"identity\":\n      return {type: identity};\n    case \"reflect-y\":\n      return {type: reflectY};\n    case \"mercator\":\n      return scaleProjection(geoMercator, tau, tau);\n    case \"orthographic\":\n      return scaleProjection(geoOrthographic, 2, 2);\n    case \"stereographic\":\n      return scaleProjection(geoStereographic, 2, 2);\n    case \"transverse-mercator\":\n      return scaleProjection(geoTransverseMercator, tau, tau);\n    default:\n      throw new Error(`unknown projection type: ${projection}`);\n  }\n}\n\nfunction maybePostClip(clip, x1, y1, x2, y2) {\n  if (clip === false || clip == null || typeof clip === \"number\") return (s) => s;\n  if (clip === true) clip = \"frame\";\n  switch (`${clip}`.toLowerCase()) {\n    case \"frame\":\n      return geoClipRectangle(x1, y1, x2, y2);\n    default:\n      throw new Error(`unknown projection clip type: ${clip}`);\n  }\n}\n\nfunction scaleProjection(createProjection, kx, ky) {\n  return {\n    type: ({width, height, rotate, precision = 0.15, clip}) => {\n      const projection = createProjection();\n      if (precision != null) projection.precision?.(precision);\n      if (rotate != null) projection.rotate?.(rotate);\n      if (typeof clip === \"number\") projection.clipAngle?.(clip);\n      projection.scale(Math.min(width / kx, height / ky));\n      projection.translate([width / 2, height / 2]);\n      return projection;\n    },\n    aspectRatio: ky / kx\n  };\n}\n\nfunction conicProjection(createProjection, kx, ky) {\n  const {type, aspectRatio} = scaleProjection(createProjection, kx, ky);\n  return {\n    type: (options) => {\n      const {parallels, domain, width, height} = options;\n      const projection = type(options);\n      if (parallels != null) {\n        projection.parallels(parallels);\n        if (domain === undefined) {\n          projection.fitSize([width, height], {type: \"Sphere\"});\n        }\n      }\n      return projection;\n    },\n    aspectRatio\n  };\n}\n\nconst identity = constant({stream: (stream) => stream});\n\nconst reflectY = constant(\n  geoTransform({\n    point(x, y) {\n      this.stream.point(x, -y);\n    }\n  })\n);\n\n// Applies a point-wise projection to the given paired x and y channels.\n// Note: mutates values!\nexport function project(cx, cy, values, projection) {\n  const x = values[cx];\n  const y = values[cy];\n  const n = x.length;\n  const X = (values[cx] = new Float64Array(n).fill(NaN));\n  const Y = (values[cy] = new Float64Array(n).fill(NaN));\n  let i;\n  const stream = projection.stream({\n    point(x, y) {\n      X[i] = x;\n      Y[i] = y;\n    }\n  });\n  for (i = 0; i < n; ++i) {\n    stream.point(x[i], y[i]);\n  }\n}\n\n// Returns true if a projection was specified. This should match the logic of\n// createProjection above, and is called before we construct the projection.\n// (Though note that we ignore the edge case where the projection initializer\n// may return null.)\nexport function hasProjection({projection} = {}) {\n  if (projection == null) return false;\n  if (typeof projection.stream === \"function\") return true;\n  if (isObject(projection)) projection = projection.type;\n  return projection != null;\n}\n\n// When a named projection is specified, we can use its natural aspect ratio to\n// determine a good value for the projection\u2019s height based on the desired\n// width. When we don\u2019t have a way to know, the golden ratio is our best guess.\n// Due to a circular dependency (we need to know the height before we can\n// construct the projection), we have to test the raw projection option rather\n// than the materialized projection; therefore we must be extremely careful that\n// the logic of this function exactly matches createProjection above!\nexport function projectionAspectRatio(projection) {\n  if (typeof projection?.stream === \"function\") return defaultAspectRatio;\n  if (isObject(projection)) projection = projection.type;\n  if (projection == null) return;\n  if (typeof projection !== \"function\") {\n    const {aspectRatio} = namedProjection(projection);\n    if (aspectRatio) return aspectRatio;\n  }\n  return defaultAspectRatio;\n}\n\n// Extract the (possibly) scaled values for the x and y channels, and apply the\n// projection if any.\nexport function applyPosition(channels, scales, {projection}) {\n  const {x, y} = channels;\n  let position = {};\n  if (x) position.x = x;\n  if (y) position.y = y;\n  position = valueObject(position, scales);\n  if (projection && x?.scale === \"x\" && y?.scale === \"y\") project(\"x\", \"y\", position, projection);\n  if (x) position.x = coerceNumbers(position.x);\n  if (y) position.y = coerceNumbers(position.y);\n  return position;\n}\n\nexport function getGeometryChannels(channel) {\n  const X = [];\n  const Y = [];\n  const x = {scale: \"x\", value: X};\n  const y = {scale: \"y\", value: Y};\n  const sink = {\n    point(x, y) {\n      X.push(x);\n      Y.push(y);\n    },\n    lineStart() {},\n    lineEnd() {},\n    polygonStart() {},\n    polygonEnd() {},\n    sphere() {}\n  };\n  for (const object of channel.value) geoStream(object, sink);\n  return [x, y];\n}\n", "import {\n  interpolateBlues,\n  interpolateBrBG,\n  interpolateBuGn,\n  interpolateBuPu,\n  interpolateGnBu,\n  interpolateGreens,\n  interpolateGreys,\n  interpolateOranges,\n  interpolateOrRd,\n  interpolatePiYG,\n  interpolatePRGn,\n  interpolatePuBu,\n  interpolatePuBuGn,\n  interpolatePuOr,\n  interpolatePuRd,\n  interpolatePurples,\n  interpolateRdBu,\n  interpolateRdGy,\n  interpolateRdPu,\n  interpolateRdYlBu,\n  interpolateRdYlGn,\n  interpolateReds,\n  interpolateSpectral,\n  interpolateYlGn,\n  interpolateYlGnBu,\n  interpolateYlOrBr,\n  interpolateYlOrRd,\n  interpolateTurbo,\n  interpolateViridis,\n  interpolateMagma,\n  interpolateInferno,\n  interpolatePlasma,\n  interpolateCividis,\n  interpolateCubehelixDefault,\n  interpolateWarm,\n  interpolateCool,\n  interpolateRainbow,\n  interpolateSinebow,\n  quantize,\n  schemeAccent,\n  schemeBlues,\n  schemeBrBG,\n  schemeBuGn,\n  schemeBuPu,\n  schemeCategory10,\n  schemeDark2,\n  schemeGnBu,\n  schemeGreens,\n  schemeGreys,\n  schemeOranges,\n  schemeOrRd,\n  schemePaired,\n  schemePastel1,\n  schemePastel2,\n  schemePiYG,\n  schemePRGn,\n  schemePuBu,\n  schemePuBuGn,\n  schemePuOr,\n  schemePuRd,\n  schemePurples,\n  schemeRdBu,\n  schemeRdGy,\n  schemeRdPu,\n  schemeRdYlBu,\n  schemeRdYlGn,\n  schemeReds,\n  schemeSet1,\n  schemeSet2,\n  schemeSet3,\n  schemeSpectral,\n  schemeTableau10,\n  schemeYlGn,\n  schemeYlGnBu,\n  schemeYlOrBr,\n  schemeYlOrRd\n} from \"d3\";\n\nconst categoricalSchemes = new Map([\n  [\"accent\", schemeAccent],\n  [\"category10\", schemeCategory10],\n  [\"dark2\", schemeDark2],\n  [\"paired\", schemePaired],\n  [\"pastel1\", schemePastel1],\n  [\"pastel2\", schemePastel2],\n  [\"set1\", schemeSet1],\n  [\"set2\", schemeSet2],\n  [\"set3\", schemeSet3],\n  [\"tableau10\", schemeTableau10]\n]);\n\nexport function isCategoricalScheme(scheme) {\n  return scheme != null && categoricalSchemes.has(`${scheme}`.toLowerCase());\n}\n\nconst ordinalSchemes = new Map([\n  ...categoricalSchemes,\n\n  // diverging\n  [\"brbg\", scheme11(schemeBrBG, interpolateBrBG)],\n  [\"prgn\", scheme11(schemePRGn, interpolatePRGn)],\n  [\"piyg\", scheme11(schemePiYG, interpolatePiYG)],\n  [\"puor\", scheme11(schemePuOr, interpolatePuOr)],\n  [\"rdbu\", scheme11(schemeRdBu, interpolateRdBu)],\n  [\"rdgy\", scheme11(schemeRdGy, interpolateRdGy)],\n  [\"rdylbu\", scheme11(schemeRdYlBu, interpolateRdYlBu)],\n  [\"rdylgn\", scheme11(schemeRdYlGn, interpolateRdYlGn)],\n  [\"spectral\", scheme11(schemeSpectral, interpolateSpectral)],\n\n  // reversed diverging (for temperature data)\n  [\"burd\", scheme11r(schemeRdBu, interpolateRdBu)],\n  [\"buylrd\", scheme11r(schemeRdYlBu, interpolateRdYlBu)],\n\n  // sequential (single-hue)\n  [\"blues\", scheme9(schemeBlues, interpolateBlues)],\n  [\"greens\", scheme9(schemeGreens, interpolateGreens)],\n  [\"greys\", scheme9(schemeGreys, interpolateGreys)],\n  [\"oranges\", scheme9(schemeOranges, interpolateOranges)],\n  [\"purples\", scheme9(schemePurples, interpolatePurples)],\n  [\"reds\", scheme9(schemeReds, interpolateReds)],\n\n  // sequential (multi-hue)\n  [\"turbo\", schemei(interpolateTurbo)],\n  [\"viridis\", schemei(interpolateViridis)],\n  [\"magma\", schemei(interpolateMagma)],\n  [\"inferno\", schemei(interpolateInferno)],\n  [\"plasma\", schemei(interpolatePlasma)],\n  [\"cividis\", schemei(interpolateCividis)],\n  [\"cubehelix\", schemei(interpolateCubehelixDefault)],\n  [\"warm\", schemei(interpolateWarm)],\n  [\"cool\", schemei(interpolateCool)],\n  [\"bugn\", scheme9(schemeBuGn, interpolateBuGn)],\n  [\"bupu\", scheme9(schemeBuPu, interpolateBuPu)],\n  [\"gnbu\", scheme9(schemeGnBu, interpolateGnBu)],\n  [\"orrd\", scheme9(schemeOrRd, interpolateOrRd)],\n  [\"pubu\", scheme9(schemePuBu, interpolatePuBu)],\n  [\"pubugn\", scheme9(schemePuBuGn, interpolatePuBuGn)],\n  [\"purd\", scheme9(schemePuRd, interpolatePuRd)],\n  [\"rdpu\", scheme9(schemeRdPu, interpolateRdPu)],\n  [\"ylgn\", scheme9(schemeYlGn, interpolateYlGn)],\n  [\"ylgnbu\", scheme9(schemeYlGnBu, interpolateYlGnBu)],\n  [\"ylorbr\", scheme9(schemeYlOrBr, interpolateYlOrBr)],\n  [\"ylorrd\", scheme9(schemeYlOrRd, interpolateYlOrRd)],\n\n  // cyclical\n  [\"rainbow\", schemeicyclical(interpolateRainbow)],\n  [\"sinebow\", schemeicyclical(interpolateSinebow)]\n]);\n\nfunction scheme9(scheme, interpolate) {\n  return ({length: n}) => {\n    if (n === 1) return [scheme[3][1]]; // favor midpoint\n    if (n === 2) return [scheme[3][1], scheme[3][2]]; // favor darker\n    n = Math.max(3, Math.floor(n));\n    return n > 9 ? quantize(interpolate, n) : scheme[n];\n  };\n}\n\nfunction scheme11(scheme, interpolate) {\n  return ({length: n}) => {\n    if (n === 2) return [scheme[3][0], scheme[3][2]]; // favor diverging extrema\n    n = Math.max(3, Math.floor(n));\n    return n > 11 ? quantize(interpolate, n) : scheme[n];\n  };\n}\n\nfunction scheme11r(scheme, interpolate) {\n  return ({length: n}) => {\n    if (n === 2) return [scheme[3][2], scheme[3][0]]; // favor diverging extrema\n    n = Math.max(3, Math.floor(n));\n    return n > 11 ? quantize((t) => interpolate(1 - t), n) : scheme[n].slice().reverse();\n  };\n}\n\nfunction schemei(interpolate) {\n  return ({length: n}) => quantize(interpolate, Math.max(2, Math.floor(n)));\n}\n\nfunction schemeicyclical(interpolate) {\n  return ({length: n}) => quantize(interpolate, Math.floor(n) + 1).slice(0, -1);\n}\n\nexport function ordinalScheme(scheme) {\n  const s = `${scheme}`.toLowerCase();\n  if (!ordinalSchemes.has(s)) throw new Error(`unknown ordinal scheme: ${s}`);\n  return ordinalSchemes.get(s);\n}\n\nexport function ordinalRange(scheme, length) {\n  const s = ordinalScheme(scheme);\n  const r = typeof s === \"function\" ? s({length}) : s;\n  return r.length !== length ? r.slice(0, length) : r;\n}\n\n// If the specified domain contains only booleans (ignoring null and undefined),\n// returns a corresponding range where false is mapped to the low color and true\n// is mapped to the high color of the specified scheme.\nexport function maybeBooleanRange(domain, scheme = \"greys\") {\n  const range = new Set();\n  const [f, t] = ordinalRange(scheme, 2);\n  for (const value of domain) {\n    if (value == null) continue;\n    if (value === true) range.add(t);\n    else if (value === false) range.add(f);\n    else return;\n  }\n  return [...range];\n}\n\nconst quantitativeSchemes = new Map([\n  // diverging\n  [\"brbg\", interpolateBrBG],\n  [\"prgn\", interpolatePRGn],\n  [\"piyg\", interpolatePiYG],\n  [\"puor\", interpolatePuOr],\n  [\"rdbu\", interpolateRdBu],\n  [\"rdgy\", interpolateRdGy],\n  [\"rdylbu\", interpolateRdYlBu],\n  [\"rdylgn\", interpolateRdYlGn],\n  [\"spectral\", interpolateSpectral],\n\n  // reversed diverging (for temperature data)\n  [\"burd\", (t) => interpolateRdBu(1 - t)],\n  [\"buylrd\", (t) => interpolateRdYlBu(1 - t)],\n\n  // sequential (single-hue)\n  [\"blues\", interpolateBlues],\n  [\"greens\", interpolateGreens],\n  [\"greys\", interpolateGreys],\n  [\"purples\", interpolatePurples],\n  [\"reds\", interpolateReds],\n  [\"oranges\", interpolateOranges],\n\n  // sequential (multi-hue)\n  [\"turbo\", interpolateTurbo],\n  [\"viridis\", interpolateViridis],\n  [\"magma\", interpolateMagma],\n  [\"inferno\", interpolateInferno],\n  [\"plasma\", interpolatePlasma],\n  [\"cividis\", interpolateCividis],\n  [\"cubehelix\", interpolateCubehelixDefault],\n  [\"warm\", interpolateWarm],\n  [\"cool\", interpolateCool],\n  [\"bugn\", interpolateBuGn],\n  [\"bupu\", interpolateBuPu],\n  [\"gnbu\", interpolateGnBu],\n  [\"orrd\", interpolateOrRd],\n  [\"pubugn\", interpolatePuBuGn],\n  [\"pubu\", interpolatePuBu],\n  [\"purd\", interpolatePuRd],\n  [\"rdpu\", interpolateRdPu],\n  [\"ylgnbu\", interpolateYlGnBu],\n  [\"ylgn\", interpolateYlGn],\n  [\"ylorbr\", interpolateYlOrBr],\n  [\"ylorrd\", interpolateYlOrRd],\n\n  // cyclical\n  [\"rainbow\", interpolateRainbow],\n  [\"sinebow\", interpolateSinebow]\n]);\n\nexport function quantitativeScheme(scheme) {\n  const s = `${scheme}`.toLowerCase();\n  if (!quantitativeSchemes.has(s)) throw new Error(`unknown quantitative scheme: ${s}`);\n  return quantitativeSchemes.get(s);\n}\n\nconst divergingSchemes = new Set([\n  \"brbg\",\n  \"prgn\",\n  \"piyg\",\n  \"puor\",\n  \"rdbu\",\n  \"rdgy\",\n  \"rdylbu\",\n  \"rdylgn\",\n  \"spectral\",\n  \"burd\",\n  \"buylrd\"\n]);\n\nexport function isDivergingScheme(scheme) {\n  return scheme != null && divergingSchemes.has(`${scheme}`.toLowerCase());\n}\n", "import {\n  descending,\n  extent,\n  interpolateHcl,\n  interpolateHsl,\n  interpolateLab,\n  interpolateNumber,\n  interpolateRgb,\n  interpolateRound,\n  max,\n  median,\n  min,\n  piecewise,\n  quantile,\n  quantize,\n  reverse as reverseof,\n  scaleIdentity,\n  scaleLinear,\n  scaleLog,\n  scalePow,\n  scaleQuantile,\n  scaleSymlog,\n  scaleThreshold,\n  ticks\n} from \"d3\";\nimport {finite, negative, positive} from \"../defined.js\";\nimport {arrayify, constant, maybeNiceInterval, maybeRangeInterval, orderof, slice} from \"../options.js\";\nimport {color, length, opacity, radius, registry} from \"./index.js\";\nimport {ordinalRange, quantitativeScheme} from \"./schemes.js\";\n\nexport const flip = (i) => (t) => i(1 - t);\nconst unit = [0, 1];\n\nconst interpolators = new Map([\n  // numbers\n  [\"number\", interpolateNumber],\n\n  // color spaces\n  [\"rgb\", interpolateRgb],\n  [\"hsl\", interpolateHsl],\n  [\"hcl\", interpolateHcl],\n  [\"lab\", interpolateLab]\n]);\n\nexport function maybeInterpolator(interpolate) {\n  const i = `${interpolate}`.toLowerCase();\n  if (!interpolators.has(i)) throw new Error(`unknown interpolator: ${i}`);\n  return interpolators.get(i);\n}\n\nexport function createScaleQ(\n  key,\n  scale,\n  channels,\n  {\n    type,\n    nice,\n    clamp,\n    zero,\n    domain = inferAutoDomain(key, channels),\n    unknown,\n    round,\n    scheme,\n    interval,\n    range = registry.get(key) === radius\n      ? inferRadialRange(channels, domain)\n      : registry.get(key) === length\n      ? inferLengthRange(channels, domain)\n      : registry.get(key) === opacity\n      ? unit\n      : undefined,\n    interpolate = registry.get(key) === color\n      ? scheme == null && range !== undefined\n        ? interpolateRgb\n        : quantitativeScheme(scheme !== undefined ? scheme : type === \"cyclical\" ? \"rainbow\" : \"turbo\")\n      : round\n      ? interpolateRound\n      : interpolateNumber,\n    reverse\n  }\n) {\n  interval = maybeRangeInterval(interval, type);\n  if (type === \"cyclical\" || type === \"sequential\") type = \"linear\"; // shorthand for color schemes\n  if (typeof interpolate !== \"function\") interpolate = maybeInterpolator(interpolate); // named interpolator\n  reverse = !!reverse;\n\n  // If an explicit range is specified, and it has a different length than the\n  // domain, then redistribute the range using a piecewise interpolator.\n  if (range !== undefined) {\n    const n = (domain = arrayify(domain)).length;\n    const m = (range = arrayify(range)).length;\n    if (n !== m) {\n      if (interpolate.length === 1) throw new Error(\"invalid piecewise interpolator\"); // e.g., turbo\n      interpolate = piecewise(interpolate, range);\n      range = undefined;\n    }\n  }\n\n  // Disambiguate between a two-argument interpolator that is used in\n  // conjunction with the range, and a one-argument \u201Cfixed\u201D interpolator on the\n  // [0, 1] interval as with the RdBu color scheme.\n  if (interpolate.length === 1) {\n    if (reverse) {\n      interpolate = flip(interpolate);\n      reverse = false;\n    }\n    if (range === undefined) {\n      range = Float64Array.from(domain, (_, i) => i / (domain.length - 1));\n      if (range.length === 2) range = unit; // optimize common case of [0, 1]\n    }\n    scale.interpolate((range === unit ? constant : interpolatePiecewise)(interpolate));\n  } else {\n    scale.interpolate(interpolate);\n  }\n\n  // If a zero option is specified, we assume that the domain is numeric, and we\n  // want to ensure that the domain crosses zero. However, note that the domain\n  // may be reversed (descending) so we shouldn\u2019t assume that the first value is\n  // smaller than the last; and also it\u2019s possible that the domain has more than\n  // two values for a \u201Cpoly\u201D scale. And lastly be careful not to mutate input!\n  if (zero) {\n    const [min, max] = extent(domain);\n    if (min > 0 || max < 0) {\n      domain = slice(domain);\n      if (orderof(domain) !== Math.sign(min)) domain[domain.length - 1] = 0; // [2, 1] or [-2, -1]\n      else domain[0] = 0; // [1, 2] or [-1, -2]\n    }\n  }\n\n  if (reverse) domain = reverseof(domain);\n  scale.domain(domain).unknown(unknown);\n  if (nice) scale.nice(maybeNice(nice, type)), (domain = scale.domain());\n  if (range !== undefined) scale.range(range);\n  if (clamp) scale.clamp(clamp);\n  return {type, domain, range, scale, interpolate, interval};\n}\n\nfunction maybeNice(nice, type) {\n  return nice === true ? undefined : typeof nice === \"number\" ? nice : maybeNiceInterval(nice, type);\n}\n\nexport function createScaleLinear(key, channels, options) {\n  return createScaleQ(key, scaleLinear(), channels, options);\n}\n\nexport function createScaleSqrt(key, channels, options) {\n  return createScalePow(key, channels, {...options, exponent: 0.5});\n}\n\nexport function createScalePow(key, channels, {exponent = 1, ...options}) {\n  return createScaleQ(key, scalePow().exponent(exponent), channels, {...options, type: \"pow\"});\n}\n\nexport function createScaleLog(key, channels, {base = 10, domain = inferLogDomain(channels), ...options}) {\n  return createScaleQ(key, scaleLog().base(base), channels, {...options, domain});\n}\n\nexport function createScaleSymlog(key, channels, {constant = 1, ...options}) {\n  return createScaleQ(key, scaleSymlog().constant(constant), channels, options);\n}\n\nexport function createScaleQuantile(\n  key,\n  channels,\n  {\n    range,\n    quantiles = range === undefined ? 5 : (range = [...range]).length, // deprecated; use n instead\n    n = quantiles,\n    scheme = \"rdylbu\",\n    domain = inferQuantileDomain(channels),\n    unknown,\n    interpolate,\n    reverse\n  }\n) {\n  if (range === undefined) {\n    range =\n      interpolate !== undefined\n        ? quantize(interpolate, n)\n        : registry.get(key) === color\n        ? ordinalRange(scheme, n)\n        : undefined;\n  }\n  if (domain.length > 0) {\n    domain = scaleQuantile(domain, range === undefined ? {length: n} : range).quantiles();\n  }\n  return createScaleThreshold(key, channels, {domain, range, reverse, unknown});\n}\n\nexport function createScaleQuantize(\n  key,\n  channels,\n  {\n    range,\n    n = range === undefined ? 5 : (range = [...range]).length,\n    scheme = \"rdylbu\",\n    domain = inferAutoDomain(key, channels),\n    unknown,\n    interpolate,\n    reverse\n  }\n) {\n  const [min, max] = extent(domain);\n  let thresholds;\n  if (range === undefined) {\n    thresholds = ticks(min, max, n); // approximate number of nice, round thresholds\n    if (thresholds[0] <= min) thresholds.splice(0, 1); // drop exact lower bound\n    if (thresholds[thresholds.length - 1] >= max) thresholds.pop(); // drop exact upper bound\n    n = thresholds.length + 1;\n    range =\n      interpolate !== undefined\n        ? quantize(interpolate, n)\n        : registry.get(key) === color\n        ? ordinalRange(scheme, n)\n        : undefined;\n  } else {\n    thresholds = quantize(interpolateNumber(min, max), n + 1).slice(1, -1); // exactly n - 1 thresholds to match range\n    if (min instanceof Date) thresholds = thresholds.map((x) => new Date(x)); // preserve date types\n  }\n  if (orderof(arrayify(domain)) < 0) thresholds.reverse(); // preserve descending domain\n  return createScaleThreshold(key, channels, {domain: thresholds, range, reverse, unknown});\n}\n\nexport function createScaleThreshold(\n  key,\n  channels,\n  {\n    domain = [0], // explicit thresholds in ascending order\n    unknown,\n    scheme = \"rdylbu\",\n    interpolate,\n    range = interpolate !== undefined\n      ? quantize(interpolate, domain.length + 1)\n      : registry.get(key) === color\n      ? ordinalRange(scheme, domain.length + 1)\n      : undefined,\n    reverse\n  }\n) {\n  domain = arrayify(domain);\n  const sign = orderof(domain); // preserve descending domain\n  if (!isNaN(sign) && !isOrdered(domain, sign)) throw new Error(`the ${key} scale has a non-monotonic domain`);\n  if (reverse) range = reverseof(range); // domain ascending, so reverse range\n  return {\n    type: \"threshold\",\n    scale: scaleThreshold(sign < 0 ? reverseof(domain) : domain, range === undefined ? [] : range).unknown(unknown),\n    domain,\n    range\n  };\n}\n\nfunction isOrdered(domain, sign) {\n  for (let i = 1, n = domain.length, d = domain[0]; i < n; ++i) {\n    const s = descending(d, (d = domain[i]));\n    if (s !== 0 && s !== sign) return false;\n  }\n  return true;\n}\n\nexport function createScaleIdentity() {\n  return {type: \"identity\", scale: scaleIdentity()};\n}\n\nexport function inferDomain(channels, f = finite) {\n  return channels.length\n    ? [\n        min(channels, ({value}) => (value === undefined ? value : min(value, f))),\n        max(channels, ({value}) => (value === undefined ? value : max(value, f)))\n      ]\n    : [0, 1];\n}\n\nfunction inferAutoDomain(key, channels) {\n  const type = registry.get(key);\n  return (type === radius || type === opacity || type === length ? inferZeroDomain : inferDomain)(channels);\n}\n\nfunction inferZeroDomain(channels) {\n  return [0, channels.length ? max(channels, ({value}) => (value === undefined ? value : max(value, finite))) : 1];\n}\n\n// We don\u2019t want the upper bound of the radial domain to be zero, as this would\n// be degenerate, so we ignore nonpositive values. We also don\u2019t want the\n// maximum default radius to exceed 30px.\nfunction inferRadialRange(channels, domain) {\n  const hint = channels.find(({radius}) => radius !== undefined);\n  if (hint !== undefined) return [0, hint.radius]; // a natural maximum radius, e.g. hexbins\n  const h25 = quantile(channels, 0.5, ({value}) => (value === undefined ? NaN : quantile(value, 0.25, positive)));\n  const range = domain.map((d) => 3 * Math.sqrt(d / h25));\n  const k = 30 / max(range);\n  return k < 1 ? range.map((r) => r * k) : range;\n}\n\n// We want a length scale\u2019s domain to go from zero to a positive value, and to\n// treat negative lengths if any as inverted vectors of equivalent magnitude. We\n// also don\u2019t want the maximum default length to exceed 60px.\nfunction inferLengthRange(channels, domain) {\n  const h50 = median(channels, ({value}) => (value === undefined ? NaN : median(value, Math.abs)));\n  const range = domain.map((d) => (12 * d) / h50);\n  const k = 60 / max(range);\n  return k < 1 ? range.map((r) => r * k) : range;\n}\n\nfunction inferLogDomain(channels) {\n  for (const {value} of channels) {\n    if (value !== undefined) {\n      for (let v of value) {\n        if (v > 0) return inferDomain(channels, positive);\n        if (v < 0) return inferDomain(channels, negative);\n      }\n    }\n  }\n  return [1, 10];\n}\n\nfunction inferQuantileDomain(channels) {\n  const domain = [];\n  for (const {value} of channels) {\n    if (value === undefined) continue;\n    for (const v of value) domain.push(v);\n  }\n  return domain;\n}\n\nexport function interpolatePiecewise(interpolate) {\n  return (i, j) => (t) => interpolate(i + t * (j - i));\n}\n", "import {\n  descending,\n  interpolateNumber,\n  interpolateRgb,\n  piecewise,\n  scaleDiverging,\n  scaleDivergingLog,\n  scaleDivergingPow,\n  scaleDivergingSymlog\n} from \"d3\";\nimport {negative, positive} from \"../defined.js\";\nimport {arrayify} from \"../options.js\";\nimport {warn} from \"../warnings.js\";\nimport {color, registry} from \"./index.js\";\nimport {flip, inferDomain, interpolatePiecewise, maybeInterpolator} from \"./quantitative.js\";\nimport {quantitativeScheme} from \"./schemes.js\";\n\nfunction createScaleD(\n  key,\n  scale,\n  transform,\n  channels,\n  {\n    type,\n    nice,\n    clamp,\n    domain = inferDomain(channels),\n    unknown,\n    pivot = 0,\n    scheme,\n    range,\n    symmetric = true,\n    interpolate = registry.get(key) === color\n      ? scheme == null && range !== undefined\n        ? interpolateRgb\n        : quantitativeScheme(scheme !== undefined ? scheme : \"rdbu\")\n      : interpolateNumber,\n    reverse\n  }\n) {\n  pivot = +pivot;\n  domain = arrayify(domain);\n  let [min, max] = domain;\n  if (domain.length > 2) warn(`Warning: the diverging ${key} scale domain contains extra elements.`);\n\n  if (descending(min, max) < 0) ([min, max] = [max, min]), (reverse = !reverse);\n  min = Math.min(min, pivot);\n  max = Math.max(max, pivot);\n\n  // Sometimes interpolate is a named interpolator, such as \"lab\" for Lab color\n  // space. Other times interpolate is a function that takes two arguments and\n  // is used in conjunction with the range. And other times the interpolate\n  // function is a \u201Cfixed\u201D interpolator on the [0, 1] interval, as when a\n  // color scheme such as interpolateRdBu is used.\n  if (typeof interpolate !== \"function\") {\n    interpolate = maybeInterpolator(interpolate);\n  }\n\n  // If an explicit range is specified, promote it to a piecewise interpolator.\n  if (range !== undefined) {\n    interpolate =\n      interpolate.length === 1 ? interpolatePiecewise(interpolate)(...range) : piecewise(interpolate, range);\n  }\n\n  // Reverse before normalization.\n  if (reverse) interpolate = flip(interpolate);\n\n  // Normalize the interpolator for symmetric difference around the pivot.\n  if (symmetric) {\n    const mid = transform.apply(pivot);\n    const mindelta = mid - transform.apply(min);\n    const maxdelta = transform.apply(max) - mid;\n    if (mindelta < maxdelta) min = transform.invert(mid - maxdelta);\n    else if (mindelta > maxdelta) max = transform.invert(mid + mindelta);\n  }\n\n  scale.domain([min, pivot, max]).unknown(unknown).interpolator(interpolate);\n  if (clamp) scale.clamp(clamp);\n  if (nice) scale.nice(nice);\n  return {type, domain: [min, max], pivot, interpolate, scale};\n}\n\nexport function createScaleDiverging(key, channels, options) {\n  return createScaleD(key, scaleDiverging(), transformIdentity, channels, options);\n}\n\nexport function createScaleDivergingSqrt(key, channels, options) {\n  return createScaleDivergingPow(key, channels, {...options, exponent: 0.5});\n}\n\nexport function createScaleDivergingPow(key, channels, {exponent = 1, ...options}) {\n  return createScaleD(key, scaleDivergingPow().exponent((exponent = +exponent)), transformPow(exponent), channels, {\n    ...options,\n    type: \"diverging-pow\"\n  });\n}\n\nexport function createScaleDivergingLog(\n  key,\n  channels,\n  {base = 10, pivot = 1, domain = inferDomain(channels, pivot < 0 ? negative : positive), ...options}\n) {\n  return createScaleD(key, scaleDivergingLog().base((base = +base)), transformLog, channels, {\n    domain,\n    pivot,\n    ...options\n  });\n}\n\nexport function createScaleDivergingSymlog(key, channels, {constant = 1, ...options}) {\n  return createScaleD(\n    key,\n    scaleDivergingSymlog().constant((constant = +constant)),\n    transformSymlog(constant),\n    channels,\n    options\n  );\n}\n\nconst transformIdentity = {\n  apply(x) {\n    return x;\n  },\n  invert(x) {\n    return x;\n  }\n};\n\nconst transformLog = {\n  apply: Math.log,\n  invert: Math.exp\n};\n\nconst transformSqrt = {\n  apply(x) {\n    return Math.sign(x) * Math.sqrt(Math.abs(x));\n  },\n  invert(x) {\n    return Math.sign(x) * (x * x);\n  }\n};\n\nfunction transformPow(exponent) {\n  return exponent === 0.5\n    ? transformSqrt\n    : {\n        apply(x) {\n          return Math.sign(x) * Math.pow(Math.abs(x), exponent);\n        },\n        invert(x) {\n          return Math.sign(x) * Math.pow(Math.abs(x), 1 / exponent);\n        }\n      };\n}\n\nfunction transformSymlog(constant) {\n  return {\n    apply(x) {\n      return Math.sign(x) * Math.log1p(Math.abs(x / constant));\n    },\n    invert(x) {\n      return Math.sign(x) * Math.expm1(Math.abs(x)) * constant;\n    }\n  };\n}\n", "import {scaleTime, scaleUtc} from \"d3\";\nimport {createScaleQ} from \"./quantitative.js\";\n\nfunction createScaleT(key, scale, channels, options) {\n  return createScaleQ(key, scale, channels, options);\n}\n\nexport function createScaleTime(key, channels, options) {\n  return createScaleT(key, scaleTime(), channels, options);\n}\n\nexport function createScaleUtc(key, channels, options) {\n  return createScaleT(key, scaleUtc(), channels, options);\n}\n", "import {InternSet, extent, quantize, reverse as reverseof, sort, symbolsFill, symbolsStroke} from \"d3\";\nimport {scaleBand, scaleOrdinal, scalePoint, scaleImplicit} from \"d3\";\nimport {ascendingDefined} from \"../defined.js\";\nimport {isNoneish, map, maybeRangeInterval} from \"../options.js\";\nimport {maybeSymbol} from \"../symbol.js\";\nimport {registry, color, position, symbol} from \"./index.js\";\nimport {maybeBooleanRange, ordinalScheme, quantitativeScheme} from \"./schemes.js\";\n\n// This denotes an implicitly ordinal color scale: the scale type was not set,\n// but the associated values are strings or booleans. If the associated defined\n// values are entirely boolean, the range will default to greys. You can opt out\n// of this by setting the type explicitly.\nexport const ordinalImplicit = Symbol(\"ordinal\");\n\nfunction createScaleO(key, scale, channels, {type, interval, domain, range, reverse, hint}) {\n  interval = maybeRangeInterval(interval, type);\n  if (domain === undefined) domain = inferDomain(channels, interval, key);\n  if (type === \"categorical\" || type === ordinalImplicit) type = \"ordinal\"; // shorthand for color schemes\n  if (reverse) domain = reverseof(domain);\n  scale.domain(domain);\n  if (range !== undefined) {\n    // If the range is specified as a function, pass it the domain.\n    if (typeof range === \"function\") range = range(domain);\n    scale.range(range);\n  }\n  return {type, domain, range, scale, hint, interval};\n}\n\nexport function createScaleOrdinal(key, channels, {type, interval, domain, range, scheme, unknown, ...options}) {\n  interval = maybeRangeInterval(interval, type);\n  if (domain === undefined) domain = inferDomain(channels, interval, key);\n  let hint;\n  if (registry.get(key) === symbol) {\n    hint = inferSymbolHint(channels);\n    range = range === undefined ? inferSymbolRange(hint) : map(range, maybeSymbol);\n  } else if (registry.get(key) === color) {\n    if (range === undefined && (type === \"ordinal\" || type === ordinalImplicit)) {\n      range = maybeBooleanRange(domain, scheme);\n      if (range !== undefined) scheme = undefined; // Don\u2019t re-apply scheme.\n    }\n    if (scheme === undefined && range === undefined) {\n      scheme = type === \"ordinal\" ? \"turbo\" : \"tableau10\";\n    }\n    if (scheme !== undefined) {\n      if (range !== undefined) {\n        const interpolate = quantitativeScheme(scheme);\n        const t0 = range[0],\n          d = range[1] - range[0];\n        range = ({length: n}) => quantize((t) => interpolate(t0 + d * t), n);\n      } else {\n        range = ordinalScheme(scheme);\n      }\n    }\n  }\n  if (unknown === scaleImplicit) {\n    throw new Error(`implicit unknown on ${key} scale is not supported`);\n  }\n  return createScaleO(key, scaleOrdinal().unknown(unknown), channels, {...options, type, domain, range, hint});\n}\n\nexport function createScalePoint(key, channels, {align = 0.5, padding = 0.5, ...options}) {\n  return maybeRound(scalePoint().align(align).padding(padding), channels, options, key);\n}\n\nexport function createScaleBand(\n  key,\n  channels,\n  {\n    align = 0.5,\n    padding = 0.1,\n    paddingInner = padding,\n    paddingOuter = key === \"fx\" || key === \"fy\" ? 0 : padding,\n    ...options\n  }\n) {\n  return maybeRound(\n    scaleBand().align(align).paddingInner(paddingInner).paddingOuter(paddingOuter),\n    channels,\n    options,\n    key\n  );\n}\n\nfunction maybeRound(scale, channels, options, key) {\n  let {round} = options;\n  if (round !== undefined) scale.round((round = !!round));\n  scale = createScaleO(key, scale, channels, options);\n  scale.round = round; // preserve for autoScaleRound\n  return scale;\n}\n\nfunction inferDomain(channels, interval, key) {\n  const values = new InternSet();\n  for (const {value, domain} of channels) {\n    if (domain !== undefined) return domain(); // see channelDomain\n    if (value === undefined) continue;\n    for (const v of value) values.add(v);\n  }\n  if (interval !== undefined) {\n    const [min, max] = extent(values).map(interval.floor, interval);\n    return interval.range(min, interval.offset(max));\n  }\n  if (values.size > 10e3 && registry.get(key) === position) {\n    throw new Error(`implicit ordinal domain of ${key} scale has more than 10,000 values`);\n  }\n  return sort(values, ascendingDefined);\n}\n\n// If all channels provide a consistent hint, propagate it to the scale.\nfunction inferHint(channels, key) {\n  let value;\n  for (const {hint} of channels) {\n    const candidate = hint?.[key];\n    if (candidate === undefined) continue; // no hint here\n    if (value === undefined) value = candidate;\n    // first hint\n    else if (value !== candidate) return; // inconsistent hint\n  }\n  return value;\n}\n\nfunction inferSymbolHint(channels) {\n  return {\n    fill: inferHint(channels, \"fill\"),\n    stroke: inferHint(channels, \"stroke\")\n  };\n}\n\nfunction inferSymbolRange(hint) {\n  return isNoneish(hint.fill) ? symbolsStroke : symbolsFill;\n}\n", "import {\n  isOrdinal,\n  isTemporal,\n  isTemporalString,\n  isNumericString,\n  isScaleOptions,\n  map,\n  slice,\n  coerceNumbers,\n  coerceDates\n} from \"./options.js\";\nimport {registry, color, position, radius, opacity, symbol, length} from \"./scales/index.js\";\nimport {\n  createScaleLinear,\n  createScaleSqrt,\n  createScalePow,\n  createScaleLog,\n  createScaleSymlog,\n  createScaleQuantile,\n  createScaleQuantize,\n  createScaleThreshold,\n  createScaleIdentity\n} from \"./scales/quantitative.js\";\nimport {\n  createScaleDiverging,\n  createScaleDivergingSqrt,\n  createScaleDivergingPow,\n  createScaleDivergingLog,\n  createScaleDivergingSymlog\n} from \"./scales/diverging.js\";\nimport {isCategoricalScheme, isDivergingScheme} from \"./scales/schemes.js\";\nimport {createScaleTime, createScaleUtc} from \"./scales/temporal.js\";\nimport {createScaleOrdinal, createScalePoint, createScaleBand, ordinalImplicit} from \"./scales/ordinal.js\";\nimport {maybeSymbol} from \"./symbol.js\";\nimport {warn} from \"./warnings.js\";\n\nexport function createScales(\n  channelsByScale,\n  {\n    label: globalLabel,\n    inset: globalInset = 0,\n    insetTop: globalInsetTop = globalInset,\n    insetRight: globalInsetRight = globalInset,\n    insetBottom: globalInsetBottom = globalInset,\n    insetLeft: globalInsetLeft = globalInset,\n    round,\n    nice,\n    clamp,\n    zero,\n    align,\n    padding,\n    projection,\n    facet: {label: facetLabel = globalLabel} = {},\n    ...options\n  } = {}\n) {\n  const scales = {};\n  for (const [key, channels] of channelsByScale) {\n    const scaleOptions = options[key];\n    const scale = createScale(key, channels, {\n      round: registry.get(key) === position ? round : undefined, // only for position\n      nice,\n      clamp,\n      zero,\n      align,\n      padding,\n      projection,\n      ...scaleOptions\n    });\n    if (scale) {\n      // populate generic scale options (percent, transform, insets)\n      let {\n        label = key === \"fx\" || key === \"fy\" ? facetLabel : globalLabel,\n        percent,\n        transform,\n        inset,\n        insetTop = inset !== undefined ? inset : key === \"y\" ? globalInsetTop : 0, // not fy\n        insetRight = inset !== undefined ? inset : key === \"x\" ? globalInsetRight : 0, // not fx\n        insetBottom = inset !== undefined ? inset : key === \"y\" ? globalInsetBottom : 0, // not fy\n        insetLeft = inset !== undefined ? inset : key === \"x\" ? globalInsetLeft : 0 // not fx\n      } = scaleOptions || {};\n      if (transform == null) transform = undefined;\n      else if (typeof transform !== \"function\") throw new Error(\"invalid scale transform; not a function\");\n      scale.percent = !!percent;\n      scale.label = label === undefined ? inferScaleLabel(channels, scale) : label;\n      scale.transform = transform;\n      if (key === \"x\" || key === \"fx\") {\n        scale.insetLeft = +insetLeft;\n        scale.insetRight = +insetRight;\n      } else if (key === \"y\" || key === \"fy\") {\n        scale.insetTop = +insetTop;\n        scale.insetBottom = +insetBottom;\n      }\n      scales[key] = scale;\n    }\n  }\n  return scales;\n}\n\nexport function createScaleFunctions(scales) {\n  return Object.fromEntries(\n    Object.entries(scales)\n      .filter(([, {scale}]) => scale) // drop identity scales\n      .map(([name, {scale, type, interval, label}]) => {\n        scale.type = type; // for axis\n        if (interval != null) scale.interval = interval; // for axis\n        if (label != null) scale.label = label; // for axis\n        return [name, scale];\n      })\n  );\n}\n\n// Mutates scale.range!\nexport function autoScaleRange(scales, dimensions) {\n  const {x, y, fx, fy} = scales;\n  const superdimensions = fx || fy ? outerDimensions(dimensions) : dimensions;\n  if (fx) autoScaleRangeX(fx, superdimensions);\n  if (fy) autoScaleRangeY(fy, superdimensions);\n  const subdimensions = fx || fy ? innerDimensions(scales, dimensions) : dimensions;\n  if (x) autoScaleRangeX(x, subdimensions);\n  if (y) autoScaleRangeY(y, subdimensions);\n}\n\n// Channels can have labels; if all the channels for a given scale are\n// consistently labeled (i.e., have the same value if not undefined), and the\n// corresponding scale doesn\u2019t already have an explicit label, then the\n// channels\u2019 label is promoted to the scale. This inferred label should have an\n// orientation-appropriate arrow added when used as an axis, but we don\u2019t want\n// to add the arrow when the label is set explicitly as an option; so, the\n// inferred label is distinguished as an object with an \u201Cinferred\u201D property.\nfunction inferScaleLabel(channels = [], scale) {\n  let label;\n  for (const {label: l} of channels) {\n    if (l === undefined) continue;\n    if (label === undefined) label = l;\n    else if (label !== l) return;\n  }\n  if (label === undefined) return;\n  if (!isOrdinalScale(scale) && scale.percent) label = `${label} (%)`;\n  return {inferred: true, toString: () => label};\n}\n\n// Returns the dimensions of the outer frame; this is subdivided into facets\n// with the margins of each facet collapsing into the outer margins.\nexport function outerDimensions(dimensions) {\n  const {\n    marginTop,\n    marginRight,\n    marginBottom,\n    marginLeft,\n    width,\n    height,\n    facet: {\n      marginTop: facetMarginTop,\n      marginRight: facetMarginRight,\n      marginBottom: facetMarginBottom,\n      marginLeft: facetMarginLeft\n    }\n  } = dimensions;\n  return {\n    marginTop: Math.max(marginTop, facetMarginTop),\n    marginRight: Math.max(marginRight, facetMarginRight),\n    marginBottom: Math.max(marginBottom, facetMarginBottom),\n    marginLeft: Math.max(marginLeft, facetMarginLeft),\n    width,\n    height\n  };\n}\n\n// Returns the dimensions of each facet.\nexport function innerDimensions({fx, fy}, dimensions) {\n  const {marginTop, marginRight, marginBottom, marginLeft, width, height} = outerDimensions(dimensions);\n  return {\n    marginTop,\n    marginRight,\n    marginBottom,\n    marginLeft,\n    width: fx ? fx.scale.bandwidth() + marginLeft + marginRight : width,\n    height: fy ? fy.scale.bandwidth() + marginTop + marginBottom : height,\n    facet: {width, height}\n  };\n}\n\nfunction autoScaleRangeX(scale, dimensions) {\n  if (scale.range === undefined) {\n    const {insetLeft, insetRight} = scale;\n    const {width, marginLeft = 0, marginRight = 0} = dimensions;\n    const left = marginLeft + insetLeft;\n    const right = width - marginRight - insetRight;\n    scale.range = [left, Math.max(left, right)];\n    if (!isOrdinalScale(scale)) scale.range = piecewiseRange(scale);\n    scale.scale.range(scale.range);\n  }\n  autoScaleRound(scale);\n}\n\nfunction autoScaleRangeY(scale, dimensions) {\n  if (scale.range === undefined) {\n    const {insetTop, insetBottom} = scale;\n    const {height, marginTop = 0, marginBottom = 0} = dimensions;\n    const top = marginTop + insetTop;\n    const bottom = height - marginBottom - insetBottom;\n    scale.range = [Math.max(top, bottom), top];\n    if (!isOrdinalScale(scale)) scale.range = piecewiseRange(scale);\n    else scale.range.reverse();\n    scale.scale.range(scale.range);\n  }\n  autoScaleRound(scale);\n}\n\nfunction autoScaleRound(scale) {\n  if (scale.round === undefined && isBandScale(scale) && roundError(scale) <= 30) {\n    scale.scale.round(true);\n  }\n}\n\n// If we were to turn on rounding for this band or point scale, how much wasted\n// space would it introduce (on both ends of the range)? This must match\n// d3.scaleBand\u2019s rounding behavior:\n// https://github.com/d3/d3-scale/blob/83555bd759c7314420bd4240642beda5e258db9e/src/band.js#L20-L32\nfunction roundError({scale}) {\n  const n = scale.domain().length;\n  const [start, stop] = scale.range();\n  const paddingInner = scale.paddingInner ? scale.paddingInner() : 1;\n  const paddingOuter = scale.paddingOuter ? scale.paddingOuter() : scale.padding();\n  const m = n - paddingInner;\n  const step = Math.abs(stop - start) / Math.max(1, m + paddingOuter * 2);\n  return (step - Math.floor(step)) * m;\n}\n\nfunction piecewiseRange(scale) {\n  const length = scale.scale.domain().length + isThresholdScale(scale);\n  if (!(length > 2)) return scale.range;\n  const [start, end] = scale.range;\n  return Array.from({length}, (_, i) => start + (i / (length - 1)) * (end - start));\n}\n\nexport function normalizeScale(key, scale, hint) {\n  return createScale(key, hint === undefined ? undefined : [{hint}], {...scale});\n}\n\nfunction createScale(key, channels = [], options = {}) {\n  const type = inferScaleType(key, channels, options);\n\n  // Warn for common misuses of implicit ordinal scales. We disable this test if\n  // you specify a scale interval or if you set the domain or range explicitly,\n  // since setting the domain or range (typically with a cardinality of more than\n  // two) is another indication that you intended for the scale to be ordinal; we\n  // also disable it for facet scales since these are always band scales.\n  if (\n    options.type === undefined &&\n    options.domain === undefined &&\n    options.range === undefined &&\n    options.interval == null &&\n    key !== \"fx\" &&\n    key !== \"fy\" &&\n    isOrdinalScale({type})\n  ) {\n    const values = channels.map(({value}) => value).filter((value) => value !== undefined);\n    if (values.some(isTemporal))\n      warn(\n        `Warning: some data associated with the ${key} scale are dates. Dates are typically associated with a \"utc\" or \"time\" scale rather than a \"${formatScaleType(\n          type\n        )}\" scale. If you are using a bar mark, you probably want a rect mark with the interval option instead; if you are using a group transform, you probably want a bin transform instead. If you want to treat this data as ordinal, you can specify the interval of the ${key} scale (e.g., d3.utcDay), or you can suppress this warning by setting the type of the ${key} scale to \"${formatScaleType(\n          type\n        )}\".`\n      );\n    else if (values.some(isTemporalString))\n      warn(\n        `Warning: some data associated with the ${key} scale are strings that appear to be dates (e.g., YYYY-MM-DD). If these strings represent dates, you should parse them to Date objects. Dates are typically associated with a \"utc\" or \"time\" scale rather than a \"${formatScaleType(\n          type\n        )}\" scale. If you are using a bar mark, you probably want a rect mark with the interval option instead; if you are using a group transform, you probably want a bin transform instead. If you want to treat this data as ordinal, you can suppress this warning by setting the type of the ${key} scale to \"${formatScaleType(\n          type\n        )}\".`\n      );\n    else if (values.some(isNumericString))\n      warn(\n        `Warning: some data associated with the ${key} scale are strings that appear to be numbers. If these strings represent numbers, you should parse or coerce them to numbers. Numbers are typically associated with a \"linear\" scale rather than a \"${formatScaleType(\n          type\n        )}\" scale. If you want to treat this data as ordinal, you can specify the interval of the ${key} scale (e.g., 1 for integers), or you can suppress this warning by setting the type of the ${key} scale to \"${formatScaleType(\n          type\n        )}\".`\n      );\n  }\n\n  options.type = type; // Mutates input!\n\n  // Once the scale type is known, coerce the associated channel values and any\n  // explicitly-specified domain to the expected type.\n  switch (type) {\n    case \"diverging\":\n    case \"diverging-sqrt\":\n    case \"diverging-pow\":\n    case \"diverging-log\":\n    case \"diverging-symlog\":\n    case \"cyclical\":\n    case \"sequential\":\n    case \"linear\":\n    case \"sqrt\":\n    case \"threshold\":\n    case \"quantile\":\n    case \"pow\":\n    case \"log\":\n    case \"symlog\":\n      options = coerceType(channels, options, coerceNumbers);\n      break;\n    case \"identity\":\n      switch (registry.get(key)) {\n        case position:\n          options = coerceType(channels, options, coerceNumbers);\n          break;\n        case symbol:\n          options = coerceType(channels, options, coerceSymbols);\n          break;\n      }\n      break;\n    case \"utc\":\n    case \"time\":\n      options = coerceType(channels, options, coerceDates);\n      break;\n  }\n\n  switch (type) {\n    case \"diverging\":\n      return createScaleDiverging(key, channels, options);\n    case \"diverging-sqrt\":\n      return createScaleDivergingSqrt(key, channels, options);\n    case \"diverging-pow\":\n      return createScaleDivergingPow(key, channels, options);\n    case \"diverging-log\":\n      return createScaleDivergingLog(key, channels, options);\n    case \"diverging-symlog\":\n      return createScaleDivergingSymlog(key, channels, options);\n    case \"categorical\":\n    case \"ordinal\":\n    case ordinalImplicit:\n      return createScaleOrdinal(key, channels, options);\n    case \"cyclical\":\n    case \"sequential\":\n    case \"linear\":\n      return createScaleLinear(key, channels, options);\n    case \"sqrt\":\n      return createScaleSqrt(key, channels, options);\n    case \"threshold\":\n      return createScaleThreshold(key, channels, options);\n    case \"quantile\":\n      return createScaleQuantile(key, channels, options);\n    case \"quantize\":\n      return createScaleQuantize(key, channels, options);\n    case \"pow\":\n      return createScalePow(key, channels, options);\n    case \"log\":\n      return createScaleLog(key, channels, options);\n    case \"symlog\":\n      return createScaleSymlog(key, channels, options);\n    case \"utc\":\n      return createScaleUtc(key, channels, options);\n    case \"time\":\n      return createScaleTime(key, channels, options);\n    case \"point\":\n      return createScalePoint(key, channels, options);\n    case \"band\":\n      return createScaleBand(key, channels, options);\n    case \"identity\":\n      return registry.get(key) === position ? createScaleIdentity() : {type: \"identity\"};\n    case undefined:\n      return;\n    default:\n      throw new Error(`unknown scale type: ${type}`);\n  }\n}\n\nfunction formatScaleType(type) {\n  return typeof type === \"symbol\" ? type.description : type;\n}\n\n// A special type symbol when the x and y scales are replaced with a projection.\nconst typeProjection = {toString: () => \"projection\"};\n\nfunction inferScaleType(key, channels, {type, domain, range, scheme, pivot, projection}) {\n  // The facet scales are always band scales; this cannot be changed.\n  if (key === \"fx\" || key === \"fy\") return \"band\";\n\n  // If a projection is specified, the x- and y-scales are disabled; these\n  // channels will be projected rather than scaled. (But still check that none\n  // of the associated channels are incompatible with a projection.)\n  if ((key === \"x\" || key === \"y\") && projection != null) type = typeProjection;\n\n  // If a channel dictates a scale type, make sure that it is consistent with\n  // the user-specified scale type (if any) and all other channels. For example,\n  // barY requires x to be a band scale and disallows any other scale type.\n  for (const {type: t} of channels) {\n    if (t === undefined) continue;\n    else if (type === undefined) type = t;\n    else if (type !== t) throw new Error(`scale incompatible with channel: ${type} !== ${t}`);\n  }\n\n  // If the scale, a channel, or user specified a (consistent) type, return it.\n  if (type === typeProjection) return;\n  if (type !== undefined) return type;\n\n  // If there\u2019s no data (and no type) associated with this scale, don\u2019t create a scale.\n  if (domain === undefined && !channels.some(({value}) => value !== undefined)) return;\n\n  // Some scales have default types.\n  const kind = registry.get(key);\n  if (kind === radius) return \"sqrt\";\n  if (kind === opacity || kind === length) return \"linear\";\n  if (kind === symbol) return \"ordinal\";\n\n  // If the domain or range has more than two values, assume it\u2019s ordinal. You\n  // can still use a \u201Cpiecewise\u201D (or \u201Cpolylinear\u201D) scale, but you must set the\n  // type explicitly.\n  if ((domain || range || []).length > 2) return asOrdinalType(kind);\n\n  // Otherwise, infer the scale type from the data! Prefer the domain, if\n  // present, over channels. (The domain and channels should be consistently\n  // typed, and the domain is more explicit and typically much smaller.) We only\n  // check the first defined value for expedience and simplicity; we expect\n  // that the types are consistent.\n  if (domain !== undefined) {\n    if (isOrdinal(domain)) return asOrdinalType(kind);\n    if (isTemporal(domain)) return \"utc\";\n  } else {\n    const values = channels.map(({value}) => value).filter((value) => value !== undefined);\n    if (values.some(isOrdinal)) return asOrdinalType(kind);\n    if (values.some(isTemporal)) return \"utc\";\n  }\n\n  // For color scales, take a hint from the color scheme and pivot option.\n  if (kind === color) {\n    if (pivot != null || isDivergingScheme(scheme)) return \"diverging\";\n    if (isCategoricalScheme(scheme)) return \"categorical\";\n  }\n\n  return \"linear\";\n}\n\n// Positional scales default to a point scale instead of an ordinal scale.\nfunction asOrdinalType(kind) {\n  switch (kind) {\n    case position:\n      return \"point\";\n    case color:\n      return ordinalImplicit;\n    default:\n      return \"ordinal\";\n  }\n}\n\nexport function isTemporalScale({type}) {\n  return type === \"time\" || type === \"utc\";\n}\n\nexport function isOrdinalScale({type}) {\n  return type === \"ordinal\" || type === \"point\" || type === \"band\" || type === ordinalImplicit;\n}\n\nexport function isThresholdScale({type}) {\n  return type === \"threshold\";\n}\n\nfunction isBandScale({type}) {\n  return type === \"point\" || type === \"band\";\n}\n\nexport function isDivergingScale({type}) {\n  return /^diverging($|-)/.test(type);\n}\n\n// Certain marks have special behavior if a scale is collapsed, i.e. if the\n// domain is degenerate and represents only a single value such as [3, 3]; for\n// example, a rect will span the full extent of the chart along a collapsed\n// dimension (whereas a dot will simply be drawn in the center).\nexport function isCollapsed(scale) {\n  if (scale === undefined) return true; // treat missing scale as collapsed\n  const domain = scale.domain();\n  const value = scale(domain[0]);\n  for (let i = 1, n = domain.length; i < n; ++i) {\n    if (scale(domain[i]) - value) {\n      return false;\n    }\n  }\n  return true;\n}\n\n// Mutates channel.value!\nfunction coerceType(channels, {domain, ...options}, coerceValues) {\n  for (const c of channels) {\n    if (c.value !== undefined) {\n      c.value = coerceValues(c.value);\n    }\n  }\n  return {\n    domain: domain === undefined ? domain : coerceValues(domain),\n    ...options\n  };\n}\n\nfunction coerceSymbols(values) {\n  return map(values, maybeSymbol);\n}\n\nexport function scale(options = {}) {\n  let scale;\n  for (const key in options) {\n    if (!registry.has(key)) continue; // ignore unknown properties\n    if (!isScaleOptions(options[key])) continue; // e.g., ignore {color: \"red\"}\n    if (scale !== undefined) throw new Error(\"ambiguous scale definition; multiple scales found\");\n    scale = exposeScale(normalizeScale(key, options[key]));\n  }\n  if (scale === undefined) throw new Error(\"invalid scale definition; no scale found\");\n  return scale;\n}\n\nexport function exposeScales(scaleDescriptors) {\n  return (key) => {\n    if (!registry.has((key = `${key}`))) throw new Error(`unknown scale: ${key}`);\n    return key in scaleDescriptors ? exposeScale(scaleDescriptors[key]) : undefined;\n  };\n}\n\n// Note: axis- and legend-related properties (such as label, ticks and\n// tickFormat) are not included here as they do not affect the scale\u2019s behavior.\nfunction exposeScale({scale, type, domain, range, interpolate, interval, transform, percent, pivot}) {\n  if (type === \"identity\") return {type: \"identity\", apply: (d) => d, invert: (d) => d};\n  const unknown = scale.unknown ? scale.unknown() : undefined;\n  return {\n    type,\n    domain: slice(domain), // defensive copy\n    ...(range !== undefined && {range: slice(range)}), // defensive copy\n    ...(transform !== undefined && {transform}),\n    ...(percent && {percent}), // only exposed if truthy\n    ...(unknown !== undefined && {unknown}),\n    ...(interval !== undefined && {interval}),\n\n    // quantitative\n    ...(interpolate !== undefined && {interpolate}),\n    ...(scale.clamp && {clamp: scale.clamp()}),\n\n    // diverging (always asymmetric; we never want to apply the symmetric transform twice)\n    ...(pivot !== undefined && {pivot, symmetric: false}),\n\n    // log, diverging-log\n    ...(scale.base && {base: scale.base()}),\n\n    // pow, diverging-pow\n    ...(scale.exponent && {exponent: scale.exponent()}),\n\n    // symlog, diverging-symlog\n    ...(scale.constant && {constant: scale.constant()}),\n\n    // band, point\n    ...(scale.align && {align: scale.align(), round: scale.round()}),\n    ...(scale.padding &&\n      (scale.paddingInner\n        ? {paddingInner: scale.paddingInner(), paddingOuter: scale.paddingOuter()}\n        : {padding: scale.padding()})),\n    ...(scale.bandwidth && {bandwidth: scale.bandwidth(), step: scale.step()}),\n\n    // utilities\n    apply: (t) => scale(t),\n    ...(scale.invert && {invert: (t) => scale.invert(t)})\n  };\n}\n", "export function memoize1(compute) {\n  let cacheValue, cacheKeys;\n  return (...keys) => {\n    if (cacheKeys?.length !== keys.length || cacheKeys.some((k, i) => k !== keys[i])) {\n      cacheKeys = keys;\n      cacheValue = compute(...keys);\n    }\n    return cacheValue;\n  };\n}\n", "import {format as isoFormat} from \"isoformat\";\nimport {string} from \"./options.js\";\nimport {memoize1} from \"./memoize.js\";\n\nconst numberFormat = memoize1((locale) => {\n  return new Intl.NumberFormat(locale);\n});\n\nconst monthFormat = memoize1((locale, month) => {\n  return new Intl.DateTimeFormat(locale, {timeZone: \"UTC\", ...(month && {month})});\n});\n\nconst weekdayFormat = memoize1((locale, weekday) => {\n  return new Intl.DateTimeFormat(locale, {timeZone: \"UTC\", ...(weekday && {weekday})});\n});\n\nexport function formatNumber(locale = \"en-US\") {\n  const format = numberFormat(locale);\n  return (i) => (i != null && !isNaN(i) ? format.format(i) : undefined);\n}\n\nexport function formatMonth(locale = \"en-US\", format = \"short\") {\n  const fmt = monthFormat(locale, format);\n  return (i) => (i != null && !isNaN((i = +new Date(Date.UTC(2000, +i)))) ? fmt.format(i) : undefined);\n}\n\nexport function formatWeekday(locale = \"en-US\", format = \"short\") {\n  const fmt = weekdayFormat(locale, format);\n  return (i) => (i != null && !isNaN((i = +new Date(Date.UTC(2001, 0, +i)))) ? fmt.format(i) : undefined);\n}\n\nexport function formatIsoDate(date) {\n  return isoFormat(date, \"Invalid Date\");\n}\n\nexport function formatAuto(locale = \"en-US\") {\n  const number = formatNumber(locale);\n  return (v) => (v instanceof Date ? formatIsoDate : typeof v === \"number\" ? number : string)(v);\n}\n\n// TODO When Plot supports a top-level locale option, this should be removed\n// because it lacks context to know which locale to use; formatAuto should be\n// used instead whenever possible.\nexport const formatDefault = formatAuto();\n", "import {geoPath, group, namespaces} from \"d3\";\nimport {create} from \"./context.js\";\nimport {defined, nonempty} from \"./defined.js\";\nimport {formatDefault} from \"./format.js\";\nimport {\n  string,\n  number,\n  maybeColorChannel,\n  maybeNumberChannel,\n  maybeKeyword,\n  isNoneish,\n  isNone,\n  isRound,\n  keyof\n} from \"./options.js\";\nimport {warn} from \"./warnings.js\";\n\nexport const offset = (typeof window !== \"undefined\" ? window.devicePixelRatio > 1 : typeof it === \"undefined\") ? 0 : 0.5; // prettier-ignore\n\nlet nextClipId = 0;\n\nfunction getClipId() {\n  return `plot-clip-${++nextClipId}`;\n}\n\nexport function styles(\n  mark,\n  {\n    title,\n    href,\n    ariaLabel: variaLabel,\n    ariaDescription,\n    ariaHidden,\n    target,\n    fill,\n    fillOpacity,\n    stroke,\n    strokeWidth,\n    strokeOpacity,\n    strokeLinejoin,\n    strokeLinecap,\n    strokeMiterlimit,\n    strokeDasharray,\n    strokeDashoffset,\n    opacity,\n    mixBlendMode,\n    imageFilter,\n    paintOrder,\n    pointerEvents,\n    shapeRendering,\n    channels\n  },\n  {\n    ariaLabel: cariaLabel,\n    fill: defaultFill = \"currentColor\",\n    fillOpacity: defaultFillOpacity,\n    stroke: defaultStroke = \"none\",\n    strokeOpacity: defaultStrokeOpacity,\n    strokeWidth: defaultStrokeWidth,\n    strokeLinecap: defaultStrokeLinecap,\n    strokeLinejoin: defaultStrokeLinejoin,\n    strokeMiterlimit: defaultStrokeMiterlimit,\n    paintOrder: defaultPaintOrder\n  }\n) {\n  // Some marks don\u2019t support fill (e.g., tick and rule).\n  if (defaultFill === null) {\n    fill = null;\n    fillOpacity = null;\n  }\n\n  // Some marks don\u2019t support stroke (e.g., image).\n  if (defaultStroke === null) {\n    stroke = null;\n    strokeOpacity = null;\n  }\n\n  // Some marks default to fill with no stroke, while others default to stroke\n  // with no fill. For example, bar and area default to fill, while dot and line\n  // default to stroke. For marks that fill by default, the default fill only\n  // applies if the stroke is (constant) none; if you set a stroke, then the\n  // default fill becomes none. Similarly for marks that stroke by stroke, the\n  // default stroke only applies if the fill is (constant) none.\n  if (isNoneish(defaultFill)) {\n    if (!isNoneish(defaultStroke) && (!isNoneish(fill) || channels?.fill)) defaultStroke = \"none\";\n  } else {\n    if (isNoneish(defaultStroke) && (!isNoneish(stroke) || channels?.stroke)) defaultFill = \"none\";\n  }\n\n  const [vfill, cfill] = maybeColorChannel(fill, defaultFill);\n  const [vfillOpacity, cfillOpacity] = maybeNumberChannel(fillOpacity, defaultFillOpacity);\n  const [vstroke, cstroke] = maybeColorChannel(stroke, defaultStroke);\n  const [vstrokeOpacity, cstrokeOpacity] = maybeNumberChannel(strokeOpacity, defaultStrokeOpacity);\n  const [vopacity, copacity] = maybeNumberChannel(opacity);\n\n  // For styles that have no effect if there is no stroke, only apply the\n  // defaults if the stroke is not the constant none. (If stroke is a channel,\n  // then cstroke will be undefined, but there\u2019s still a stroke; hence we don\u2019t\n  // use isNoneish here.)\n  if (!isNone(cstroke)) {\n    if (strokeWidth === undefined) strokeWidth = defaultStrokeWidth;\n    if (strokeLinecap === undefined) strokeLinecap = defaultStrokeLinecap;\n    if (strokeLinejoin === undefined) strokeLinejoin = defaultStrokeLinejoin;\n\n    // The default stroke miterlimit need not be applied if the current stroke\n    // is the constant round; this only has effect on miter joins.\n    if (strokeMiterlimit === undefined && !isRound(strokeLinejoin)) strokeMiterlimit = defaultStrokeMiterlimit;\n\n    // The paint order only takes effect if there is both a fill and a stroke\n    // (at least if we ignore markers, which no built-in marks currently use).\n    if (!isNone(cfill) && paintOrder === undefined) paintOrder = defaultPaintOrder;\n  }\n\n  const [vstrokeWidth, cstrokeWidth] = maybeNumberChannel(strokeWidth);\n\n  // Some marks don\u2019t support fill (e.g., tick and rule).\n  if (defaultFill !== null) {\n    mark.fill = impliedString(cfill, \"currentColor\");\n    mark.fillOpacity = impliedNumber(cfillOpacity, 1);\n  }\n\n  // Some marks don\u2019t support stroke (e.g., image).\n  if (defaultStroke !== null) {\n    mark.stroke = impliedString(cstroke, \"none\");\n    mark.strokeWidth = impliedNumber(cstrokeWidth, 1);\n    mark.strokeOpacity = impliedNumber(cstrokeOpacity, 1);\n    mark.strokeLinejoin = impliedString(strokeLinejoin, \"miter\");\n    mark.strokeLinecap = impliedString(strokeLinecap, \"butt\");\n    mark.strokeMiterlimit = impliedNumber(strokeMiterlimit, 4);\n    mark.strokeDasharray = impliedString(strokeDasharray, \"none\");\n    mark.strokeDashoffset = impliedString(strokeDashoffset, \"0\");\n  }\n\n  mark.target = string(target);\n  mark.ariaLabel = string(cariaLabel);\n  mark.ariaDescription = string(ariaDescription);\n  mark.ariaHidden = string(ariaHidden);\n  mark.opacity = impliedNumber(copacity, 1);\n  mark.mixBlendMode = impliedString(mixBlendMode, \"normal\");\n  mark.imageFilter = impliedString(imageFilter, \"none\");\n  mark.paintOrder = impliedString(paintOrder, \"normal\");\n  mark.pointerEvents = impliedString(pointerEvents, \"auto\");\n  mark.shapeRendering = impliedString(shapeRendering, \"auto\");\n\n  return {\n    title: {value: title, optional: true, filter: null},\n    href: {value: href, optional: true, filter: null},\n    ariaLabel: {value: variaLabel, optional: true, filter: null},\n    fill: {value: vfill, scale: \"auto\", optional: true},\n    fillOpacity: {value: vfillOpacity, scale: \"auto\", optional: true},\n    stroke: {value: vstroke, scale: \"auto\", optional: true},\n    strokeOpacity: {value: vstrokeOpacity, scale: \"auto\", optional: true},\n    strokeWidth: {value: vstrokeWidth, optional: true},\n    opacity: {value: vopacity, scale: \"auto\", optional: true}\n  };\n}\n\n// Applies the specified titles via selection.call.\nexport function applyTitle(selection, L) {\n  if (L)\n    selection\n      .filter((i) => nonempty(L[i]))\n      .append(\"title\")\n      .call(applyText, L);\n}\n\n// Like applyTitle, but for grouped data (lines, areas).\nexport function applyTitleGroup(selection, L) {\n  if (L)\n    selection\n      .filter(([i]) => nonempty(L[i]))\n      .append(\"title\")\n      .call(applyTextGroup, L);\n}\n\nexport function applyText(selection, T) {\n  if (T) selection.text((i) => formatDefault(T[i]));\n}\n\nexport function applyTextGroup(selection, T) {\n  if (T) selection.text(([i]) => formatDefault(T[i]));\n}\n\nexport function applyChannelStyles(\n  selection,\n  {target, tip},\n  {\n    ariaLabel: AL,\n    title: T,\n    fill: F,\n    fillOpacity: FO,\n    stroke: S,\n    strokeOpacity: SO,\n    strokeWidth: SW,\n    opacity: O,\n    href: H\n  }\n) {\n  if (AL) applyAttr(selection, \"aria-label\", (i) => AL[i]);\n  if (F) applyAttr(selection, \"fill\", (i) => F[i]);\n  if (FO) applyAttr(selection, \"fill-opacity\", (i) => FO[i]);\n  if (S) applyAttr(selection, \"stroke\", (i) => S[i]);\n  if (SO) applyAttr(selection, \"stroke-opacity\", (i) => SO[i]);\n  if (SW) applyAttr(selection, \"stroke-width\", (i) => SW[i]);\n  if (O) applyAttr(selection, \"opacity\", (i) => O[i]);\n  if (H) applyHref(selection, (i) => H[i], target);\n  if (!tip) applyTitle(selection, T);\n}\n\nexport function applyGroupedChannelStyles(\n  selection,\n  {target, tip},\n  {\n    ariaLabel: AL,\n    title: T,\n    fill: F,\n    fillOpacity: FO,\n    stroke: S,\n    strokeOpacity: SO,\n    strokeWidth: SW,\n    opacity: O,\n    href: H\n  }\n) {\n  if (AL) applyAttr(selection, \"aria-label\", ([i]) => AL[i]);\n  if (F) applyAttr(selection, \"fill\", ([i]) => F[i]);\n  if (FO) applyAttr(selection, \"fill-opacity\", ([i]) => FO[i]);\n  if (S) applyAttr(selection, \"stroke\", ([i]) => S[i]);\n  if (SO) applyAttr(selection, \"stroke-opacity\", ([i]) => SO[i]);\n  if (SW) applyAttr(selection, \"stroke-width\", ([i]) => SW[i]);\n  if (O) applyAttr(selection, \"opacity\", ([i]) => O[i]);\n  if (H) applyHref(selection, ([i]) => H[i], target);\n  if (!tip) applyTitleGroup(selection, T);\n}\n\nfunction groupAesthetics(\n  {\n    ariaLabel: AL,\n    title: T,\n    fill: F,\n    fillOpacity: FO,\n    stroke: S,\n    strokeOpacity: SO,\n    strokeWidth: SW,\n    opacity: O,\n    href: H\n  },\n  {tip}\n) {\n  return [AL, tip ? undefined : T, F, FO, S, SO, SW, O, H].filter((c) => c !== undefined);\n}\n\nexport function groupZ(I, Z, z) {\n  const G = group(I, (i) => Z[i]);\n  if (z === undefined && G.size > (1 + I.length) >> 1) {\n    warn(\n      `Warning: the implicit z channel has high cardinality. This may occur when the fill or stroke channel is associated with quantitative data rather than ordinal or categorical data. You can suppress this warning by setting the z option explicitly; if this data represents a single series, set z to null.`\n    );\n  }\n  return G.values();\n}\n\nexport function* groupIndex(I, position, mark, channels) {\n  const {z} = mark;\n  const {z: Z} = channels; // group channel\n  const A = groupAesthetics(channels, mark); // aesthetic channels\n  const C = [...position, ...A]; // all channels\n\n  // Group the current index by Z (if any).\n  for (const G of Z ? groupZ(I, Z, z) : [I]) {\n    let Ag; // the A-values (aesthetics) of the current group, if any\n    let Gg; // the current group index (a subset of G, and I), if any\n    out: for (const i of G) {\n      // If any channel has an undefined value for this index, skip it.\n      for (const c of C) {\n        if (!defined(c[i])) {\n          if (Gg) Gg.push(-1);\n          continue out;\n        }\n      }\n\n      // Otherwise, if this is a new group, record the aesthetics for this\n      // group. Yield the current group and start a new one.\n      if (Ag === undefined) {\n        if (Gg) yield Gg;\n        (Ag = A.map((c) => keyof(c[i]))), (Gg = [i]);\n        continue;\n      }\n\n      // Otherwise, add the current index to the current group. Then, if any of\n      // the aesthetics don\u2019t match the current group, yield the current group\n      // and start a new group of the current index.\n      Gg.push(i);\n      for (let j = 0; j < A.length; ++j) {\n        const k = keyof(A[j][i]);\n        if (k !== Ag[j]) {\n          yield Gg;\n          (Ag = A.map((c) => keyof(c[i]))), (Gg = [i]);\n          continue out;\n        }\n      }\n    }\n\n    // Yield the current group, if any.\n    if (Gg) yield Gg;\n  }\n}\n\n// TODO Accept other types of clips (paths, urls, x, y, other marks\u2026)?\n// https://github.com/observablehq/plot/issues/181\nexport function maybeClip(clip) {\n  if (clip === true) clip = \"frame\";\n  else if (clip === false) clip = null;\n  return maybeKeyword(clip, \"clip\", [\"frame\", \"sphere\"]);\n}\n\n// Note: may mutate selection.node!\nfunction applyClip(selection, mark, dimensions, context) {\n  let clipUrl;\n  switch (mark.clip) {\n    case \"frame\": {\n      const {width, height, marginLeft, marginRight, marginTop, marginBottom} = dimensions;\n      const id = getClipId();\n      clipUrl = `url(#${id})`;\n      selection = create(\"svg:g\", context)\n        .call((g) =>\n          g\n            .append(\"svg:clipPath\")\n            .attr(\"id\", id)\n            .append(\"rect\")\n            .attr(\"x\", marginLeft)\n            .attr(\"y\", marginTop)\n            .attr(\"width\", width - marginRight - marginLeft)\n            .attr(\"height\", height - marginTop - marginBottom)\n        )\n        .each(function () {\n          this.appendChild(selection.node());\n          selection.node = () => this; // Note: mutation!\n        });\n      break;\n    }\n    case \"sphere\": {\n      const {projection} = context;\n      if (!projection) throw new Error(`the \"sphere\" clip option requires a projection`);\n      const id = getClipId();\n      clipUrl = `url(#${id})`;\n      selection\n        .append(\"clipPath\")\n        .attr(\"id\", id)\n        .append(\"path\")\n        .attr(\"d\", geoPath(projection)({type: \"Sphere\"}));\n      break;\n    }\n  }\n  // Here we\u2019re careful to apply the ARIA attributes to the outer G element when\n  // clipping is applied, and to apply the ARIA attributes before any other\n  // attributes (for readability).\n  applyAttr(selection, \"aria-label\", mark.ariaLabel);\n  applyAttr(selection, \"aria-description\", mark.ariaDescription);\n  applyAttr(selection, \"aria-hidden\", mark.ariaHidden);\n  applyAttr(selection, \"clip-path\", clipUrl);\n}\n\n// Note: may mutate selection.node!\nexport function applyIndirectStyles(selection, mark, dimensions, context) {\n  applyClip(selection, mark, dimensions, context);\n  applyAttr(selection, \"fill\", mark.fill);\n  applyAttr(selection, \"fill-opacity\", mark.fillOpacity);\n  applyAttr(selection, \"stroke\", mark.stroke);\n  applyAttr(selection, \"stroke-width\", mark.strokeWidth);\n  applyAttr(selection, \"stroke-opacity\", mark.strokeOpacity);\n  applyAttr(selection, \"stroke-linejoin\", mark.strokeLinejoin);\n  applyAttr(selection, \"stroke-linecap\", mark.strokeLinecap);\n  applyAttr(selection, \"stroke-miterlimit\", mark.strokeMiterlimit);\n  applyAttr(selection, \"stroke-dasharray\", mark.strokeDasharray);\n  applyAttr(selection, \"stroke-dashoffset\", mark.strokeDashoffset);\n  applyAttr(selection, \"shape-rendering\", mark.shapeRendering);\n  applyAttr(selection, \"filter\", mark.imageFilter);\n  applyAttr(selection, \"paint-order\", mark.paintOrder);\n  const {pointerEvents = context.pointerSticky === false ? \"none\" : undefined} = mark;\n  applyAttr(selection, \"pointer-events\", pointerEvents);\n}\n\nexport function applyDirectStyles(selection, mark) {\n  applyStyle(selection, \"mix-blend-mode\", mark.mixBlendMode);\n  applyAttr(selection, \"opacity\", mark.opacity);\n}\n\nfunction applyHref(selection, href, target) {\n  selection.each(function (i) {\n    const h = href(i);\n    if (h != null) {\n      const a = this.ownerDocument.createElementNS(namespaces.svg, \"a\");\n      a.setAttribute(\"fill\", \"inherit\");\n      a.setAttributeNS(namespaces.xlink, \"href\", h);\n      if (target != null) a.setAttribute(\"target\", target);\n      this.parentNode.insertBefore(a, this).appendChild(this);\n    }\n  });\n}\n\nexport function applyAttr(selection, name, value) {\n  if (value != null) selection.attr(name, value);\n}\n\nexport function applyStyle(selection, name, value) {\n  if (value != null) selection.style(name, value);\n}\n\nexport function applyTransform(selection, mark, {x, y}, tx = offset, ty = offset) {\n  tx += mark.dx;\n  ty += mark.dy;\n  if (x?.bandwidth) tx += x.bandwidth() / 2;\n  if (y?.bandwidth) ty += y.bandwidth() / 2;\n  if (tx || ty) selection.attr(\"transform\", `translate(${tx},${ty})`);\n}\n\nexport function impliedString(value, impliedValue) {\n  if ((value = string(value)) !== impliedValue) return value;\n}\n\nexport function impliedNumber(value, impliedValue) {\n  if ((value = number(value)) !== impliedValue) return value;\n}\n\n// https://www.w3.org/TR/CSS21/grammar.html\nconst validClassName =\n  /^-?([_a-z]|[\\240-\\377]|\\\\[0-9a-f]{1,6}(\\r\\n|[ \\t\\r\\n\\f])?|\\\\[^\\r\\n\\f0-9a-f])([_a-z0-9-]|[\\240-\\377]|\\\\[0-9a-f]{1,6}(\\r\\n|[ \\t\\r\\n\\f])?|\\\\[^\\r\\n\\f0-9a-f])*$/i;\n\nexport function maybeClassName(name) {\n  // The default should be changed whenever the default styles are changed, so\n  // as to avoid conflict when multiple versions of Plot are on the page.\n  if (name === undefined) return \"plot-d6a7b5\";\n  name = `${name}`;\n  if (!validClassName.test(name)) throw new Error(`invalid class name: ${name}`);\n  return name;\n}\n\nexport function applyInlineStyles(selection, style) {\n  if (typeof style === \"string\") {\n    selection.property(\"style\", style);\n  } else if (style != null) {\n    for (const element of selection) {\n      Object.assign(element.style, style);\n    }\n  }\n}\n\nexport function applyFrameAnchor({frameAnchor}, {width, height, marginTop, marginRight, marginBottom, marginLeft}) {\n  return [\n    /left$/.test(frameAnchor)\n      ? marginLeft\n      : /right$/.test(frameAnchor)\n      ? width - marginRight\n      : (marginLeft + width - marginRight) / 2,\n    /^top/.test(frameAnchor)\n      ? marginTop\n      : /^bottom/.test(frameAnchor)\n      ? height - marginBottom\n      : (marginTop + height - marginBottom) / 2\n  ];\n}\n", "import {extent} from \"d3\";\nimport {projectionAspectRatio} from \"./projection.js\";\nimport {isOrdinalScale} from \"./scales.js\";\nimport {offset} from \"./style.js\";\n\nexport function createDimensions(scales, marks, options = {}) {\n  // Compute the default margins: the maximum of the marks\u2019 margins. While not\n  // always used, they may be needed to compute the default height of the plot.\n  let marginTopDefault = 0.5 - offset,\n    marginRightDefault = 0.5 + offset,\n    marginBottomDefault = 0.5 + offset,\n    marginLeftDefault = 0.5 - offset;\n\n  for (const {marginTop, marginRight, marginBottom, marginLeft} of marks) {\n    if (marginTop > marginTopDefault) marginTopDefault = marginTop;\n    if (marginRight > marginRightDefault) marginRightDefault = marginRight;\n    if (marginBottom > marginBottomDefault) marginBottomDefault = marginBottom;\n    if (marginLeft > marginLeftDefault) marginLeftDefault = marginLeft;\n  }\n\n  // Compute the actual margins. The order of precedence is: the side-specific\n  // margin options, then the global margin option, then the defaults.\n  let {\n    margin,\n    marginTop = margin !== undefined ? margin : marginTopDefault,\n    marginRight = margin !== undefined ? margin : marginRightDefault,\n    marginBottom = margin !== undefined ? margin : marginBottomDefault,\n    marginLeft = margin !== undefined ? margin : marginLeftDefault\n  } = options;\n\n  // Coerce the margin options to numbers.\n  marginTop = +marginTop;\n  marginRight = +marginRight;\n  marginBottom = +marginBottom;\n  marginLeft = +marginLeft;\n\n  // Compute the outer dimensions of the plot. If the top and bottom margins are\n  // specified explicitly, adjust the automatic height accordingly.\n  let {\n    width = 640,\n    height = autoHeight(scales, options, {\n      width,\n      marginTopDefault,\n      marginRightDefault,\n      marginBottomDefault,\n      marginLeftDefault\n    }) + Math.max(0, marginTop - marginTopDefault + marginBottom - marginBottomDefault)\n  } = options;\n\n  // Coerce the width and height.\n  width = +width;\n  height = +height;\n\n  const dimensions = {\n    width,\n    height,\n    marginTop,\n    marginRight,\n    marginBottom,\n    marginLeft\n  };\n\n  // Compute the facet margins.\n  if (scales.fx || scales.fy) {\n    let {\n      margin: facetMargin,\n      marginTop: facetMarginTop = facetMargin !== undefined ? facetMargin : marginTop,\n      marginRight: facetMarginRight = facetMargin !== undefined ? facetMargin : marginRight,\n      marginBottom: facetMarginBottom = facetMargin !== undefined ? facetMargin : marginBottom,\n      marginLeft: facetMarginLeft = facetMargin !== undefined ? facetMargin : marginLeft\n    } = options.facet ?? {};\n\n    // Coerce the facet margin options to numbers.\n    facetMarginTop = +facetMarginTop;\n    facetMarginRight = +facetMarginRight;\n    facetMarginBottom = +facetMarginBottom;\n    facetMarginLeft = +facetMarginLeft;\n\n    dimensions.facet = {\n      marginTop: facetMarginTop,\n      marginRight: facetMarginRight,\n      marginBottom: facetMarginBottom,\n      marginLeft: facetMarginLeft\n    };\n  }\n\n  return dimensions;\n}\n\nfunction autoHeight(\n  {x, y, fy, fx},\n  {projection, aspectRatio},\n  {width, marginTopDefault, marginRightDefault, marginBottomDefault, marginLeftDefault}\n) {\n  const nfy = fy ? fy.scale.domain().length : 1;\n\n  // If a projection is specified, use its natural aspect ratio (if known).\n  const ar = projectionAspectRatio(projection);\n  if (ar) {\n    const nfx = fx ? fx.scale.domain().length : 1;\n    const far = ((1.1 * nfy - 0.1) / (1.1 * nfx - 0.1)) * ar; // 0.1 is default facet padding\n    const lar = Math.max(0.1, Math.min(10, far)); // clamp the aspect ratio to a \u201Creasonable\u201D value\n    return Math.round((width - marginLeftDefault - marginRightDefault) * lar + marginTopDefault + marginBottomDefault);\n  }\n\n  const ny = y ? (isOrdinalScale(y) ? y.scale.domain().length : Math.max(7, 17 / nfy)) : 1;\n\n  // If a desired aspect ratio is given, compute a default height to match.\n  if (aspectRatio != null) {\n    aspectRatio = +aspectRatio;\n    if (!(isFinite(aspectRatio) && aspectRatio > 0)) throw new Error(`invalid aspectRatio: ${aspectRatio}`);\n    const ratio = aspectRatioLength(\"y\", y) / (aspectRatioLength(\"x\", x) * aspectRatio);\n    const fxb = fx ? fx.scale.bandwidth() : 1;\n    const fyb = fy ? fy.scale.bandwidth() : 1;\n    const w = fxb * (width - marginLeftDefault - marginRightDefault) - x.insetLeft - x.insetRight;\n    return (ratio * w + y.insetTop + y.insetBottom) / fyb + marginTopDefault + marginBottomDefault;\n  }\n\n  return !!(y || fy) * Math.max(1, Math.min(60, ny * nfy)) * 20 + !!fx * 30 + 60;\n}\n\nfunction aspectRatioLength(k, scale) {\n  if (!scale) throw new Error(`aspectRatio requires ${k} scale`);\n  const {type, domain} = scale;\n  let transform;\n  switch (type) {\n    case \"linear\":\n    case \"utc\":\n    case \"time\":\n      transform = Number;\n      break;\n    case \"pow\": {\n      const exponent = scale.scale.exponent();\n      transform = (x) => Math.pow(x, exponent);\n      break;\n    }\n    case \"log\":\n      transform = Math.log;\n      break;\n    case \"point\":\n    case \"band\":\n      return domain.length;\n    default:\n      throw new Error(`unsupported ${k} scale for aspectRatio: ${type}`);\n  }\n  const [min, max] = extent(domain);\n  return Math.abs(transform(max) - transform(min));\n}\n", "import {InternMap, cross, rollup, sum} from \"d3\";\nimport {keyof, map, range} from \"./options.js\";\nimport {createScales} from \"./scales.js\";\n\n// Returns an array of {x?, y?, i} objects representing the facet domain.\nexport function createFacets(channelsByScale, options) {\n  const {fx, fy} = createScales(channelsByScale, options);\n  const fxDomain = fx?.scale.domain();\n  const fyDomain = fy?.scale.domain();\n  return fxDomain && fyDomain\n    ? cross(fxDomain, fyDomain).map(([x, y], i) => ({x, y, i}))\n    : fxDomain\n    ? fxDomain.map((x, i) => ({x, i}))\n    : fyDomain\n    ? fyDomain.map((y, i) => ({y, i}))\n    : undefined;\n}\n\nexport function recreateFacets(facets, {x: X, y: Y}) {\n  X &&= facetIndex(X);\n  Y &&= facetIndex(Y);\n  return facets\n    .filter(\n      X && Y // remove any facets no longer present in the domain\n        ? (f) => X.has(f.x) && Y.has(f.y)\n        : X\n        ? (f) => X.has(f.x)\n        : (f) => Y.has(f.y)\n    )\n    .sort(\n      X && Y // reorder facets to match the new scale domains\n        ? (a, b) => X.get(a.x) - X.get(b.x) || Y.get(a.y) - Y.get(b.y)\n        : X\n        ? (a, b) => X.get(a.x) - X.get(b.x)\n        : (a, b) => Y.get(a.y) - Y.get(b.y)\n    );\n}\n\n// Returns a (possibly nested) Map of [[key1, index1], [key2, index2], \u2026]\n// representing the data indexes associated with each facet.\nexport function facetGroups(data, {fx, fy}) {\n  const I = range(data);\n  const FX = fx?.value;\n  const FY = fy?.value;\n  return fx && fy\n    ? rollup(\n        I,\n        (G) => ((G.fx = FX[G[0]]), (G.fy = FY[G[0]]), G),\n        (i) => FX[i],\n        (i) => FY[i]\n      )\n    : fx\n    ? rollup(\n        I,\n        (G) => ((G.fx = FX[G[0]]), G),\n        (i) => FX[i]\n      )\n    : rollup(\n        I,\n        (G) => ((G.fy = FY[G[0]]), G),\n        (i) => FY[i]\n      );\n}\n\nexport function facetTranslator(fx, fy, {marginTop, marginLeft}) {\n  return fx && fy\n    ? ({x, y}) => `translate(${fx(x) - marginLeft},${fy(y) - marginTop})`\n    : fx\n    ? ({x}) => `translate(${fx(x) - marginLeft},0)`\n    : ({y}) => `translate(0,${fy(y) - marginTop})`;\n}\n\n// Returns an index that for each facet lists all the elements present in other\n// facets in the original index. TODO Memoize to avoid repeated work?\nexport function facetExclude(index) {\n  const ex = [];\n  const e = new Uint32Array(sum(index, (d) => d.length));\n  for (const i of index) {\n    let n = 0;\n    for (const j of index) {\n      if (i === j) continue;\n      e.set(j, n);\n      n += j.length;\n    }\n    ex.push(e.slice(0, n));\n  }\n  return ex;\n}\n\nconst facetAnchors = new Map([\n  [\"top\", facetAnchorTop],\n  [\"right\", facetAnchorRight],\n  [\"bottom\", facetAnchorBottom],\n  [\"left\", facetAnchorLeft],\n  [\"top-left\", and(facetAnchorTop, facetAnchorLeft)],\n  [\"top-right\", and(facetAnchorTop, facetAnchorRight)],\n  [\"bottom-left\", and(facetAnchorBottom, facetAnchorLeft)],\n  [\"bottom-right\", and(facetAnchorBottom, facetAnchorRight)],\n  [\"top-empty\", facetAnchorTopEmpty],\n  [\"right-empty\", facetAnchorRightEmpty],\n  [\"bottom-empty\", facetAnchorBottomEmpty],\n  [\"left-empty\", facetAnchorLeftEmpty],\n  [\"empty\", facetAnchorEmpty]\n]);\n\nexport function maybeFacetAnchor(facetAnchor) {\n  if (facetAnchor == null) return null;\n  const anchor = facetAnchors.get(`${facetAnchor}`.toLowerCase());\n  if (anchor) return anchor;\n  throw new Error(`invalid facet anchor: ${facetAnchor}`);\n}\n\nconst indexCache = new WeakMap();\n\nfunction facetIndex(V) {\n  let I = indexCache.get(V);\n  if (!I) indexCache.set(V, (I = new InternMap(map(V, (v, i) => [v, i]))));\n  return I;\n}\n\n// Like V.indexOf(v), but with the same semantics as InternMap.\nfunction facetIndexOf(V, v) {\n  return facetIndex(V).get(v);\n}\n\n// Like facets.find, but with the same semantics as InternMap.\nfunction facetFind(facets, x, y) {\n  x = keyof(x);\n  y = keyof(y);\n  return facets.find((f) => Object.is(keyof(f.x), x) && Object.is(keyof(f.y), y));\n}\n\nfunction facetEmpty(facets, x, y) {\n  return facetFind(facets, x, y)?.empty;\n}\n\nfunction facetAnchorTop(facets, {y: Y}, {y}) {\n  return Y ? facetIndexOf(Y, y) === 0 : true;\n}\n\nfunction facetAnchorBottom(facets, {y: Y}, {y}) {\n  return Y ? facetIndexOf(Y, y) === Y.length - 1 : true;\n}\n\nfunction facetAnchorLeft(facets, {x: X}, {x}) {\n  return X ? facetIndexOf(X, x) === 0 : true;\n}\n\nfunction facetAnchorRight(facets, {x: X}, {x}) {\n  return X ? facetIndexOf(X, x) === X.length - 1 : true;\n}\n\nfunction facetAnchorTopEmpty(facets, {y: Y}, {x, y, empty}) {\n  if (empty) return false;\n  if (!Y) return;\n  const i = facetIndexOf(Y, y);\n  if (i > 0) return facetEmpty(facets, x, Y[i - 1]);\n}\n\nfunction facetAnchorBottomEmpty(facets, {y: Y}, {x, y, empty}) {\n  if (empty) return false;\n  if (!Y) return;\n  const i = facetIndexOf(Y, y);\n  if (i < Y.length - 1) return facetEmpty(facets, x, Y[i + 1]);\n}\n\nfunction facetAnchorLeftEmpty(facets, {x: X}, {x, y, empty}) {\n  if (empty) return false;\n  if (!X) return;\n  const i = facetIndexOf(X, x);\n  if (i > 0) return facetEmpty(facets, X[i - 1], y);\n}\n\nfunction facetAnchorRightEmpty(facets, {x: X}, {x, y, empty}) {\n  if (empty) return false;\n  if (!X) return;\n  const i = facetIndexOf(X, x);\n  if (i < X.length - 1) return facetEmpty(facets, X[i + 1], y);\n}\n\nfunction facetAnchorEmpty(facets, channels, {empty}) {\n  return empty;\n}\n\nfunction and(a, b) {\n  return function () {\n    return a.apply(null, arguments) && b.apply(null, arguments);\n  };\n}\n\n// Facet filter, by mark; for now only the \"eq\" filter is provided.\nexport function facetFilter(facets, {channels: {fx, fy}, groups}) {\n  return fx && fy\n    ? facets.map(({x, y}) => groups.get(x)?.get(y) ?? [])\n    : fx\n    ? facets.map(({x}) => groups.get(x) ?? [])\n    : facets.map(({y}) => groups.get(y) ?? []);\n}\n", "import {channelDomain, createChannels, valueObject} from \"./channel.js\";\nimport {defined} from \"./defined.js\";\nimport {maybeFacetAnchor} from \"./facet.js\";\nimport {maybeKeyword, maybeNamed, maybeValue} from \"./options.js\";\nimport {arrayify, isDomainSort, isOptions, keyword, range, singleton} from \"./options.js\";\nimport {project} from \"./projection.js\";\nimport {maybeClip, styles} from \"./style.js\";\nimport {basic, initializer} from \"./transforms/basic.js\";\n\nexport class Mark {\n  constructor(data, channels = {}, options = {}, defaults) {\n    const {\n      facet = \"auto\",\n      facetAnchor,\n      fx,\n      fy,\n      sort,\n      dx = 0,\n      dy = 0,\n      margin = 0,\n      marginTop = margin,\n      marginRight = margin,\n      marginBottom = margin,\n      marginLeft = margin,\n      clip,\n      channels: extraChannels,\n      tip,\n      render\n    } = options;\n    this.data = data;\n    this.sort = isDomainSort(sort) ? sort : null;\n    this.initializer = initializer(options).initializer;\n    this.transform = this.initializer ? options.transform : basic(options).transform;\n    if (facet === null || facet === false) {\n      this.facet = null;\n    } else {\n      this.facet = keyword(facet === true ? \"include\" : facet, \"facet\", [\"auto\", \"include\", \"exclude\", \"super\"]);\n      this.fx = data === singleton && typeof fx === \"string\" ? [fx] : fx;\n      this.fy = data === singleton && typeof fy === \"string\" ? [fy] : fy;\n    }\n    this.facetAnchor = maybeFacetAnchor(facetAnchor);\n    channels = maybeNamed(channels);\n    if (extraChannels !== undefined) channels = {...maybeChannels(extraChannels), ...channels};\n    if (defaults !== undefined) channels = {...styles(this, options, defaults), ...channels};\n    this.channels = Object.fromEntries(\n      Object.entries(channels)\n        .map(([name, channel]) => {\n          if (isOptions(channel.value)) {\n            // apply scale overrides\n            const {value, scale = channel.scale} = channel.value;\n            channel = {...channel, scale, value};\n          }\n          if (data === singleton && typeof channel.value === \"string\") {\n            // convert field names to singleton values for decoration marks (e.g., frame)\n            const {value} = channel;\n            channel = {...channel, value: [value]};\n          }\n          return [name, channel];\n        })\n        .filter(([name, {value, optional}]) => {\n          if (value != null) return true;\n          if (optional) return false;\n          throw new Error(`missing channel value: ${name}`);\n        })\n    );\n    this.dx = +dx;\n    this.dy = +dy;\n    this.marginTop = +marginTop;\n    this.marginRight = +marginRight;\n    this.marginBottom = +marginBottom;\n    this.marginLeft = +marginLeft;\n    this.clip = maybeClip(clip);\n    this.tip = maybeTip(tip);\n    // Super-faceting currently disallow position channels; in the future, we\n    // could allow position to be specified in fx and fy in addition to (or\n    // instead of) x and y.\n    if (this.facet === \"super\") {\n      if (fx || fy) throw new Error(`super-faceting cannot use fx or fy`);\n      for (const name in this.channels) {\n        const {scale} = channels[name];\n        if (scale !== \"x\" && scale !== \"y\") continue;\n        throw new Error(`super-faceting cannot use x or y`);\n      }\n    }\n    if (render != null) {\n      this.render = composeRender(render, this.render);\n    }\n  }\n  initialize(facets, facetChannels, plotOptions) {\n    let data = arrayify(this.data);\n    if (facets === undefined && data != null) facets = [range(data)];\n    const originalFacets = facets;\n    if (this.transform != null) ({facets, data} = this.transform(data, facets, plotOptions)), (data = arrayify(data));\n    if (facets !== undefined) facets.original = originalFacets; // needed to read facetChannels\n    const channels = createChannels(this.channels, data);\n    if (this.sort != null) channelDomain(data, facets, channels, facetChannels, this.sort); // mutates facetChannels!\n    return {data, facets, channels};\n  }\n  filter(index, channels, values) {\n    for (const name in channels) {\n      const {filter = defined} = channels[name];\n      if (filter !== null) {\n        const value = values[name];\n        index = index.filter((i) => filter(value[i]));\n      }\n    }\n    return index;\n  }\n  // If there is a projection, and there are paired x and y channels associated\n  // with the x and y scale respectively (and not already in screen coordinates\n  // as with an initializer), then apply the projection, replacing the x and y\n  // values. Note that the x and y scales themselves don\u2019t exist if there is a\n  // projection, but whether the channels are associated with scales still\n  // determines whether the projection should apply; think of the projection as\n  // a combination xy-scale.\n  project(channels, values, context) {\n    for (const cx in channels) {\n      if (channels[cx].scale === \"x\" && /^x|x$/.test(cx)) {\n        const cy = cx.replace(/^x|x$/, \"y\");\n        if (cy in channels && channels[cy].scale === \"y\") {\n          project(cx, cy, values, context.projection);\n        }\n      }\n    }\n  }\n  scale(channels, scales, context) {\n    const values = valueObject(channels, scales);\n    if (context.projection) this.project(channels, values, context);\n    return values;\n  }\n}\n\nexport function marks(...marks) {\n  marks.plot = Mark.prototype.plot; // Note: depends on side-effect in plot!\n  return marks;\n}\n\nexport function composeRender(r1, r2) {\n  if (r1 == null) return r2 === null ? undefined : r2;\n  if (r2 == null) return r1 === null ? undefined : r1;\n  if (typeof r1 !== \"function\") throw new TypeError(`invalid render transform: ${r1}`);\n  if (typeof r2 !== \"function\") throw new TypeError(`invalid render transform: ${r2}`);\n  return function (i, s, v, d, c, next) {\n    return r1.call(this, i, s, v, d, c, (i, s, v, d, c) => {\n      return r2.call(this, i, s, v, d, c, next); // preserve this\n    });\n  };\n}\n\nfunction maybeChannels(channels) {\n  return Object.fromEntries(\n    Object.entries(maybeNamed(channels)).map(([name, channel]) => {\n      channel = maybeValue(channel);\n      if (channel.filter === undefined && channel.scale == null) channel = {...channel, filter: null};\n      return [name, channel];\n    })\n  );\n}\n\nfunction maybeTip(tip) {\n  return tip === true ? \"xy\" : tip === false ? null : maybeKeyword(tip, \"tip\", [\"x\", \"y\", \"xy\"]);\n}\n\nexport function withTip(options, tip) {\n  return options?.tip === true ? {...options, tip} : options;\n}\n", "import {pointer as pointof} from \"d3\";\nimport {composeRender} from \"../mark.js\";\nimport {applyFrameAnchor} from \"../style.js\";\n\nconst states = new WeakMap();\n\nfunction pointerK(kx, ky, {x, y, px, py, maxRadius = 40, channels, render, ...options} = {}) {\n  maxRadius = +maxRadius;\n  // When px or py is used, register an extra channel that the pointer\n  // interaction can use to control which point is focused; this allows pointing\n  // to function independently of where the downstream mark (e.g., a tip) is\n  // displayed. Also default x or y to null to disable maybeTuple etc.\n  if (px != null) (x ??= null), (channels = {...channels, px: {value: px, scale: \"x\"}});\n  if (py != null) (y ??= null), (channels = {...channels, py: {value: py, scale: \"y\"}});\n  return {\n    x,\n    y,\n    channels,\n    ...options,\n    // Unlike other composed transforms, the render transform must be the\n    // outermost render function because it will re-render dynamically in\n    // response to pointer events.\n    render: composeRender(function (index, scales, values, dimensions, context, next) {\n      context = {...context, pointerSticky: false};\n      const svg = context.ownerSVGElement;\n      const {data} = context.getMarkState(this);\n\n      // Isolate state per-pointer, per-plot; if the pointer is reused by\n      // multiple marks, they will share the same state (e.g., sticky modality).\n      let state = states.get(svg);\n      if (!state) states.set(svg, (state = {sticky: false, roots: [], renders: []}));\n\n      // This serves as a unique identifier of the rendered mark per-plot; it is\n      // used to record the currently-rendered elements (state.roots) so that we\n      // can tell when a rendered element is clicked on.\n      let renderIndex = state.renders.push(render) - 1;\n\n      // For faceting, we want to compute the local coordinates of each point,\n      // which means subtracting out the facet translation, if any. (It\u2019s\n      // tempting to do this using the local coordinates in SVG, but that\u2019s\n      // complicated by mark-specific transforms such as dx and dy.) Also, since\n      // band scales return the upper bound of the band, we have to offset by\n      // half the bandwidth.\n      const {x, y, fx, fy} = scales;\n      let tx = fx ? fx(index.fx) - dimensions.marginLeft : 0;\n      let ty = fy ? fy(index.fy) - dimensions.marginTop : 0;\n      if (x?.bandwidth) tx += x.bandwidth() / 2;\n      if (y?.bandwidth) ty += y.bandwidth() / 2;\n\n      // For faceting, we also need to record the closest point per facet per\n      // mark (!), since each facet has its own pointer event listeners; we only\n      // want the closest point across facets to be visible.\n      const faceted = index.fi != null;\n      let facetState;\n      if (faceted) {\n        let facetStates = state.facetStates;\n        if (!facetStates) state.facetStates = facetStates = new Map();\n        facetState = facetStates.get(this);\n        if (!facetState) facetStates.set(this, (facetState = new Map()));\n      }\n\n      // The order of precedence for the pointer position is: px & py; the\n      // middle of x1 & y1 and x2 & y2; or x1 & y1 (e.g., area); or lastly x &\n      // y. If a dimension is unspecified, the frame anchor is used.\n      const [cx, cy] = applyFrameAnchor(this, dimensions);\n      const {px: PX, py: PY} = values;\n      const px = PX ? (i) => PX[i] : anchorX(values, cx);\n      const py = PY ? (i) => PY[i] : anchorY(values, cy);\n\n      let i; // currently focused index\n      let g; // currently rendered mark\n      let s; // currently rendered stickiness\n      let f; // current animation frame\n\n      // When faceting, if more than one pointer would be visible, only show\n      // this one if it is the closest. We defer rendering using an animation\n      // frame to allow all pointer events to be received before deciding which\n      // mark to render; although when hiding, we render immediately.\n      function update(ii, ri) {\n        if (faceted) {\n          if (f) f = cancelAnimationFrame(f);\n          if (ii == null) facetState.delete(index.fi);\n          else {\n            facetState.set(index.fi, ri);\n            f = requestAnimationFrame(() => {\n              f = null;\n              for (const r of facetState.values()) {\n                if (r < ri) {\n                  ii = null;\n                  break;\n                }\n              }\n              render(ii);\n            });\n            return;\n          }\n        }\n        render(ii);\n      }\n\n      function render(ii) {\n        if (i === ii && s === state.sticky) return; // the tooltip hasn\u2019t moved\n        i = ii;\n        s = context.pointerSticky = state.sticky;\n        const I = i == null ? [] : [i];\n        if (faceted) (I.fx = index.fx), (I.fy = index.fy), (I.fi = index.fi);\n        const r = next(I, scales, values, dimensions, context);\n        if (g) {\n          // When faceting, preserve swapped mark and facet transforms; also\n          // remove ARIA attributes since these are promoted to the parent. This\n          // is perhaps brittle in that it depends on how Plot renders facets,\n          // but it produces a cleaner and more accessible SVG structure.\n          if (faceted) {\n            const p = g.parentNode;\n            const ft = g.getAttribute(\"transform\");\n            const mt = r.getAttribute(\"transform\");\n            ft ? r.setAttribute(\"transform\", ft) : r.removeAttribute(\"transform\");\n            mt ? p.setAttribute(\"transform\", mt) : p.removeAttribute(\"transform\");\n            r.removeAttribute(\"aria-label\");\n            r.removeAttribute(\"aria-description\");\n            r.removeAttribute(\"aria-hidden\");\n          }\n          g.replaceWith(r);\n        }\n        state.roots[renderIndex] = g = r;\n        context.dispatchValue(i == null ? null : data[i]);\n        return r;\n      }\n\n      function pointermove(event) {\n        if (state.sticky || (event.pointerType === \"mouse\" && event.buttons === 1)) return; // dragging\n        let [xp, yp] = pointof(event);\n        (xp -= tx), (yp -= ty); // correct for facets and band scales\n        let ii = null;\n        let ri = maxRadius * maxRadius;\n        for (const j of index) {\n          const dx = kx * (px(j) - xp);\n          const dy = ky * (py(j) - yp);\n          const rj = dx * dx + dy * dy;\n          if (rj <= ri) (ii = j), (ri = rj);\n        }\n        update(ii, ri);\n      }\n\n      function pointerdown(event) {\n        if (event.pointerType !== \"mouse\") return;\n        if (i == null) return; // not pointing\n        if (state.sticky && state.roots.some((r) => r?.contains(event.target))) return; // stay sticky\n        if (state.sticky) (state.sticky = false), state.renders.forEach((r) => r(null)); // clear all pointers\n        else (state.sticky = true), render(i);\n        event.stopImmediatePropagation(); // suppress other pointers\n      }\n\n      function pointerleave(event) {\n        if (event.pointerType !== \"mouse\") return;\n        if (!state.sticky) update(null);\n      }\n\n      // We listen to the svg element; listening to the window instead would let\n      // us receive pointer events from farther away, but would also make it\n      // hard to know when to remove the listeners. (Using a mutation observer\n      // to watch the entire document is likely too expensive.)\n      svg.addEventListener(\"pointerenter\", pointermove);\n      svg.addEventListener(\"pointermove\", pointermove);\n      svg.addEventListener(\"pointerdown\", pointerdown);\n      svg.addEventListener(\"pointerleave\", pointerleave);\n\n      return render(null);\n    }, render)\n  };\n}\n\nexport function pointer(options) {\n  return pointerK(1, 1, options);\n}\n\nexport function pointerX(options) {\n  return pointerK(1, 0.01, options);\n}\n\nexport function pointerY(options) {\n  return pointerK(0.01, 1, options);\n}\n\nexport function anchorX({x1: X1, x2: X2, x: X = X1}, cx) {\n  return X1 && X2 ? (i) => (X1[i] + X2[i]) / 2 : X ? (i) => X[i] : () => cx;\n}\n\nexport function anchorY({y1: Y1, y2: Y2, y: Y = Y1}, cy) {\n  return Y1 && Y2 ? (i) => (Y1[i] + Y2[i]) / 2 : Y ? (i) => Y[i] : () => cy;\n}\n", "import {isOrdinalScale} from \"./scales.js\";\n\nexport function inferFontVariant(scale) {\n  return isOrdinalScale(scale) && scale.interval === undefined ? undefined : \"tabular-nums\";\n}\n", "import {quantize, interpolateNumber, piecewise, format, scaleBand, scaleLinear, axisBottom} from \"d3\";\nimport {inferFontVariant} from \"../axes.js\";\nimport {createContext, create} from \"../context.js\";\nimport {map, maybeNumberChannel} from \"../options.js\";\nimport {interpolatePiecewise} from \"../scales/quantitative.js\";\nimport {applyInlineStyles, impliedString, maybeClassName} from \"../style.js\";\n\nexport function legendRamp(color, options) {\n  let {\n    label = color.label,\n    tickSize = 6,\n    width = 240,\n    height = 44 + tickSize,\n    marginTop = 18,\n    marginRight = 0,\n    marginBottom = 16 + tickSize,\n    marginLeft = 0,\n    style,\n    ticks = (width - marginLeft - marginRight) / 64,\n    tickFormat,\n    fontVariant = inferFontVariant(color),\n    round = true,\n    opacity,\n    className\n  } = options;\n  const context = createContext(options);\n  className = maybeClassName(className);\n  opacity = maybeNumberChannel(opacity)[1];\n  if (tickFormat === null) tickFormat = () => null;\n\n  const svg = create(\"svg\", context)\n    .attr(\"class\", `${className}-ramp`)\n    .attr(\"font-family\", \"system-ui, sans-serif\")\n    .attr(\"font-size\", 10)\n    .attr(\"width\", width)\n    .attr(\"height\", height)\n    .attr(\"viewBox\", `0 0 ${width} ${height}`)\n    .call((svg) =>\n      // Warning: if you edit this, change defaultClassName.\n      svg.append(\"style\").text(\n        `.${className}-ramp {\n  display: block;\n  background: white;\n  height: auto;\n  height: intrinsic;\n  max-width: 100%;\n  overflow: visible;\n}\n.${className}-ramp text {\n  white-space: pre;\n}`\n      )\n    )\n    .call(applyInlineStyles, style);\n\n  let tickAdjust = (g) => g.selectAll(\".tick line\").attr(\"y1\", marginTop + marginBottom - height);\n\n  let x;\n\n  // Some D3 scales use scale.interpolate, some scale.interpolator, and some\n  // scale.round; this normalizes the API so it works with all scale types.\n  const applyRange = round ? (x, range) => x.rangeRound(range) : (x, range) => x.range(range);\n\n  const {type, domain, range, interpolate, scale, pivot} = color;\n\n  // Continuous\n  if (interpolate) {\n    // Often interpolate is a \u201Cfixed\u201D interpolator on the [0, 1] interval, as\n    // with a built-in color scheme, but sometimes it is a function that takes\n    // two arguments and is used in conjunction with the range.\n    const interpolator =\n      range === undefined\n        ? interpolate\n        : piecewise(interpolate.length === 1 ? interpolatePiecewise(interpolate) : interpolate, range);\n\n    // Construct a D3 scale of the same type, but with a range that evenly\n    // divides the horizontal extent of the legend. (In the common case, the\n    // domain.length is two, and so the range is simply the extent.) For a\n    // diverging scale, we need an extra point in the range for the pivot such\n    // that the pivot is always drawn in the middle.\n    x = applyRange(\n      scale.copy(),\n      quantize(\n        interpolateNumber(marginLeft, width - marginRight),\n        Math.min(domain.length + (pivot !== undefined), range === undefined ? Infinity : range.length)\n      )\n    );\n\n    // Construct a 256\u00D71 canvas, filling each pixel using the interpolator.\n    const n = 256;\n    const canvas = context.document.createElement(\"canvas\");\n    canvas.width = n;\n    canvas.height = 1;\n    const context2 = canvas.getContext(\"2d\");\n    for (let i = 0, j = n - 1; i < n; ++i) {\n      context2.fillStyle = interpolator(i / j);\n      context2.fillRect(i, 0, 1, 1);\n    }\n\n    svg\n      .append(\"image\")\n      .attr(\"opacity\", opacity)\n      .attr(\"x\", marginLeft)\n      .attr(\"y\", marginTop)\n      .attr(\"width\", width - marginLeft - marginRight)\n      .attr(\"height\", height - marginTop - marginBottom)\n      .attr(\"preserveAspectRatio\", \"none\")\n      .attr(\"xlink:href\", canvas.toDataURL());\n  }\n\n  // Threshold\n  else if (type === \"threshold\") {\n    const thresholds = domain;\n\n    const thresholdFormat =\n      tickFormat === undefined ? (d) => d : typeof tickFormat === \"string\" ? format(tickFormat) : tickFormat;\n\n    // Construct a linear scale with evenly-spaced ticks for each of the\n    // thresholds; the domain extends one beyond the threshold extent.\n    x = applyRange(scaleLinear().domain([-1, range.length - 1]), [marginLeft, width - marginRight]);\n\n    svg\n      .append(\"g\")\n      .attr(\"fill-opacity\", opacity)\n      .selectAll()\n      .data(range)\n      .enter()\n      .append(\"rect\")\n      .attr(\"x\", (d, i) => x(i - 1))\n      .attr(\"y\", marginTop)\n      .attr(\"width\", (d, i) => x(i) - x(i - 1))\n      .attr(\"height\", height - marginTop - marginBottom)\n      .attr(\"fill\", (d) => d);\n\n    ticks = map(thresholds, (_, i) => i);\n    tickFormat = (i) => thresholdFormat(thresholds[i], i);\n  }\n\n  // Ordinal (hopefully!)\n  else {\n    x = applyRange(scaleBand().domain(domain), [marginLeft, width - marginRight]);\n\n    svg\n      .append(\"g\")\n      .attr(\"fill-opacity\", opacity)\n      .selectAll()\n      .data(domain)\n      .enter()\n      .append(\"rect\")\n      .attr(\"x\", x)\n      .attr(\"y\", marginTop)\n      .attr(\"width\", Math.max(0, x.bandwidth() - 1))\n      .attr(\"height\", height - marginTop - marginBottom)\n      .attr(\"fill\", scale);\n\n    tickAdjust = () => {};\n  }\n\n  svg\n    .append(\"g\")\n    .attr(\"transform\", `translate(0,${height - marginBottom})`)\n    .call(\n      axisBottom(x)\n        .ticks(Array.isArray(ticks) ? null : ticks, typeof tickFormat === \"string\" ? tickFormat : undefined)\n        .tickFormat(typeof tickFormat === \"function\" ? tickFormat : undefined)\n        .tickSize(tickSize)\n        .tickValues(Array.isArray(ticks) ? ticks : null)\n    )\n    .attr(\"font-size\", null)\n    .attr(\"font-family\", null)\n    .attr(\"font-variant\", impliedString(fontVariant, \"normal\"))\n    .call(tickAdjust)\n    .call((g) => g.select(\".domain\").remove());\n\n  if (label !== undefined) {\n    svg\n      .append(\"text\")\n      .attr(\"x\", marginLeft)\n      .attr(\"y\", marginTop - 6)\n      .attr(\"fill\", \"currentColor\") // TODO move to stylesheet?\n      .attr(\"font-weight\", \"bold\")\n      .text(label);\n  }\n\n  return svg.node();\n}\n", "export const radians = Math.PI / 180;\n", "import {create} from \"./context.js\";\n\nexport function markers(mark, {marker, markerStart = marker, markerMid = marker, markerEnd = marker} = {}) {\n  mark.markerStart = maybeMarker(markerStart);\n  mark.markerMid = maybeMarker(markerMid);\n  mark.markerEnd = maybeMarker(markerEnd);\n}\n\nfunction maybeMarker(marker) {\n  if (marker == null || marker === false) return null;\n  if (marker === true) return markerCircleFill;\n  if (typeof marker === \"function\") return marker;\n  switch (`${marker}`.toLowerCase()) {\n    case \"none\":\n      return null;\n    case \"arrow\":\n      return markerArrow(\"auto\");\n    case \"arrow-reverse\":\n      return markerArrow(\"auto-start-reverse\");\n    case \"dot\":\n      return markerDot;\n    case \"circle\":\n    case \"circle-fill\":\n      return markerCircleFill;\n    case \"circle-stroke\":\n      return markerCircleStroke;\n  }\n  throw new Error(`invalid marker: ${marker}`);\n}\n\nfunction markerArrow(orient) {\n  return (color, context) =>\n    create(\"svg:marker\", context)\n      .attr(\"viewBox\", \"-5 -5 10 10\")\n      .attr(\"markerWidth\", 6.67)\n      .attr(\"markerHeight\", 6.67)\n      .attr(\"orient\", orient)\n      .attr(\"fill\", \"none\")\n      .attr(\"stroke\", color)\n      .attr(\"stroke-width\", 1.5)\n      .attr(\"stroke-linecap\", \"round\")\n      .attr(\"stroke-linejoin\", \"round\")\n      .call((marker) => marker.append(\"path\").attr(\"d\", \"M-1.5,-3l3,3l-3,3\"))\n      .node();\n}\n\nfunction markerDot(color, context) {\n  return create(\"svg:marker\", context)\n    .attr(\"viewBox\", \"-5 -5 10 10\")\n    .attr(\"markerWidth\", 6.67)\n    .attr(\"markerHeight\", 6.67)\n    .attr(\"fill\", color)\n    .attr(\"stroke\", \"none\")\n    .call((marker) => marker.append(\"circle\").attr(\"r\", 2.5))\n    .node();\n}\n\nfunction markerCircleFill(color, context) {\n  return create(\"svg:marker\", context)\n    .attr(\"viewBox\", \"-5 -5 10 10\")\n    .attr(\"markerWidth\", 6.67)\n    .attr(\"markerHeight\", 6.67)\n    .attr(\"fill\", color)\n    .attr(\"stroke\", \"white\")\n    .attr(\"stroke-width\", 1.5)\n    .call((marker) => marker.append(\"circle\").attr(\"r\", 3))\n    .node();\n}\n\nfunction markerCircleStroke(color, context) {\n  return create(\"svg:marker\", context)\n    .attr(\"viewBox\", \"-5 -5 10 10\")\n    .attr(\"markerWidth\", 6.67)\n    .attr(\"markerHeight\", 6.67)\n    .attr(\"fill\", \"white\")\n    .attr(\"stroke\", color)\n    .attr(\"stroke-width\", 1.5)\n    .call((marker) => marker.append(\"circle\").attr(\"r\", 3))\n    .node();\n}\n\nlet nextMarkerId = 0;\n\nexport function applyMarkers(path, mark, {stroke: S}, context) {\n  return applyMarkersColor(path, mark, S && ((i) => S[i]), context);\n}\n\nexport function applyGroupedMarkers(path, mark, {stroke: S}, context) {\n  return applyMarkersColor(path, mark, S && (([i]) => S[i]), context);\n}\n\nfunction applyMarkersColor(path, {markerStart, markerMid, markerEnd, stroke}, strokeof = () => stroke, context) {\n  const iriByMarkerColor = new Map();\n\n  function applyMarker(marker) {\n    return function (i) {\n      const color = strokeof(i);\n      let iriByColor = iriByMarkerColor.get(marker);\n      if (!iriByColor) iriByMarkerColor.set(marker, (iriByColor = new Map()));\n      let iri = iriByColor.get(color);\n      if (!iri) {\n        const node = this.parentNode.insertBefore(marker(color, context), this);\n        const id = `plot-marker-${++nextMarkerId}`;\n        node.setAttribute(\"id\", id);\n        iriByColor.set(color, (iri = `url(#${id})`));\n      }\n      return iri;\n    };\n  }\n\n  if (markerStart) path.attr(\"marker-start\", applyMarker(markerStart));\n  if (markerMid) path.attr(\"marker-mid\", applyMarker(markerMid));\n  if (markerEnd) path.attr(\"marker-end\", applyMarker(markerEnd));\n}\n", "import {offset} from \"../style.js\";\n\nexport function maybeInsetX({inset, insetLeft, insetRight, ...options} = {}) {\n  [insetLeft, insetRight] = maybeInset(inset, insetLeft, insetRight);\n  return {inset, insetLeft, insetRight, ...options};\n}\n\nexport function maybeInsetY({inset, insetTop, insetBottom, ...options} = {}) {\n  [insetTop, insetBottom] = maybeInset(inset, insetTop, insetBottom);\n  return {inset, insetTop, insetBottom, ...options};\n}\n\nfunction maybeInset(inset, inset1, inset2) {\n  return inset === undefined && inset1 === undefined && inset2 === undefined\n    ? offset\n      ? [1, 0]\n      : [0.5, 0.5]\n    : [inset1, inset2];\n}\n", "import {isTemporal, labelof, map, maybeInterval, maybeValue, valueof} from \"../options.js\";\nimport {maybeInsetX, maybeInsetY} from \"./inset.js\";\n\n// The interval may be specified either as x: {value, interval} or as {x,\n// interval}. The former can be used to specify separate intervals for x and y,\n// for example with Plot.rect.\nfunction maybeIntervalValue(value, {interval}) {\n  value = {...maybeValue(value)};\n  value.interval = maybeInterval(value.interval === undefined ? interval : value.interval);\n  return value;\n}\n\nfunction maybeIntervalK(k, maybeInsetK, options, trivial) {\n  const {[k]: v, [`${k}1`]: v1, [`${k}2`]: v2} = options;\n  const {value, interval} = maybeIntervalValue(v, options);\n  if (value == null || (interval == null && !trivial)) return options;\n  const label = labelof(v);\n  if (interval == null) {\n    let V;\n    const kv = {transform: (data) => V || (V = valueof(data, value)), label};\n    return {\n      ...options,\n      [k]: undefined,\n      [`${k}1`]: v1 === undefined ? kv : v1,\n      [`${k}2`]: v2 === undefined ? kv : v2\n    };\n  }\n  let D1, V1;\n  function transform(data) {\n    if (V1 !== undefined && data === D1) return V1; // memoize\n    return (V1 = map(valueof((D1 = data), value), (v) => interval.floor(v)));\n  }\n  return maybeInsetK({\n    ...options,\n    [k]: undefined,\n    [`${k}1`]: v1 === undefined ? {transform, label} : v1,\n    [`${k}2`]: v2 === undefined ? {transform: (data) => transform(data).map((v) => interval.offset(v)), label} : v2\n  });\n}\n\nfunction maybeIntervalMidK(k, maybeInsetK, options) {\n  const {[k]: v} = options;\n  const {value, interval} = maybeIntervalValue(v, options);\n  if (value == null || interval == null) return options;\n  return maybeInsetK({\n    ...options,\n    [k]: {\n      label: labelof(v),\n      transform: (data) => {\n        const V1 = map(valueof(data, value), (v) => interval.floor(v));\n        const V2 = V1.map((v) => interval.offset(v));\n        return V1.map(\n          isTemporal(V1)\n            ? (v1, v2) =>\n                v1 == null || isNaN((v1 = +v1)) || ((v2 = V2[v2]), v2 == null) || isNaN((v2 = +v2))\n                  ? undefined\n                  : new Date((v1 + v2) / 2)\n            : (v1, v2) => (v1 == null || ((v2 = V2[v2]), v2 == null) ? NaN : (+v1 + +v2) / 2)\n        );\n      }\n    }\n  });\n}\n\nexport function maybeTrivialIntervalX(options = {}) {\n  return maybeIntervalK(\"x\", maybeInsetX, options, true);\n}\n\nexport function maybeTrivialIntervalY(options = {}) {\n  return maybeIntervalK(\"y\", maybeInsetY, options, true);\n}\n\nexport function maybeIntervalX(options = {}) {\n  return maybeIntervalK(\"x\", maybeInsetX, options);\n}\n\nexport function maybeIntervalY(options = {}) {\n  return maybeIntervalK(\"y\", maybeInsetY, options);\n}\n\nexport function maybeIntervalMidX(options = {}) {\n  return maybeIntervalMidK(\"x\", maybeInsetX, options);\n}\n\nexport function maybeIntervalMidY(options = {}) {\n  return maybeIntervalMidK(\"y\", maybeInsetY, options);\n}\n", "import {create} from \"../context.js\";\nimport {Mark, withTip} from \"../mark.js\";\nimport {applyMarkers, markers} from \"../marker.js\";\nimport {identity, number} from \"../options.js\";\nimport {isCollapsed} from \"../scales.js\";\nimport {applyChannelStyles, applyDirectStyles, applyIndirectStyles, applyTransform, offset} from \"../style.js\";\nimport {maybeIntervalX, maybeIntervalY} from \"../transforms/interval.js\";\n\nconst defaults = {\n  ariaLabel: \"rule\",\n  fill: null,\n  stroke: \"currentColor\"\n};\n\nexport class RuleX extends Mark {\n  constructor(data, options = {}) {\n    const {x, y1, y2, inset = 0, insetTop = inset, insetBottom = inset} = options;\n    super(\n      data,\n      {\n        x: {value: x, scale: \"x\", optional: true},\n        y1: {value: y1, scale: \"y\", optional: true},\n        y2: {value: y2, scale: \"y\", optional: true}\n      },\n      withTip(options, \"x\"),\n      defaults\n    );\n    this.insetTop = number(insetTop);\n    this.insetBottom = number(insetBottom);\n    markers(this, options);\n  }\n  render(index, scales, channels, dimensions, context) {\n    const {x, y} = scales;\n    const {x: X, y1: Y1, y2: Y2} = channels;\n    const {width, height, marginTop, marginRight, marginLeft, marginBottom} = dimensions;\n    const {insetTop, insetBottom} = this;\n    return create(\"svg:g\", context)\n      .call(applyIndirectStyles, this, dimensions, context)\n      .call(applyTransform, this, {x: X && x}, offset, 0)\n      .call((g) =>\n        g\n          .selectAll()\n          .data(index)\n          .enter()\n          .append(\"line\")\n          .call(applyDirectStyles, this)\n          .attr(\"x1\", X ? (i) => X[i] : (marginLeft + width - marginRight) / 2)\n          .attr(\"x2\", X ? (i) => X[i] : (marginLeft + width - marginRight) / 2)\n          .attr(\"y1\", Y1 && !isCollapsed(y) ? (i) => Y1[i] + insetTop : marginTop + insetTop)\n          .attr(\n            \"y2\",\n            Y2 && !isCollapsed(y)\n              ? y.bandwidth\n                ? (i) => Y2[i] + y.bandwidth() - insetBottom\n                : (i) => Y2[i] - insetBottom\n              : height - marginBottom - insetBottom\n          )\n          .call(applyChannelStyles, this, channels)\n          .call(applyMarkers, this, channels, context)\n      )\n      .node();\n  }\n}\n\nexport class RuleY extends Mark {\n  constructor(data, options = {}) {\n    const {x1, x2, y, inset = 0, insetRight = inset, insetLeft = inset} = options;\n    super(\n      data,\n      {\n        y: {value: y, scale: \"y\", optional: true},\n        x1: {value: x1, scale: \"x\", optional: true},\n        x2: {value: x2, scale: \"x\", optional: true}\n      },\n      withTip(options, \"y\"),\n      defaults\n    );\n    this.insetRight = number(insetRight);\n    this.insetLeft = number(insetLeft);\n    markers(this, options);\n  }\n  render(index, scales, channels, dimensions, context) {\n    const {x, y} = scales;\n    const {y: Y, x1: X1, x2: X2} = channels;\n    const {width, height, marginTop, marginRight, marginLeft, marginBottom} = dimensions;\n    const {insetLeft, insetRight} = this;\n    return create(\"svg:g\", context)\n      .call(applyIndirectStyles, this, dimensions, context)\n      .call(applyTransform, this, {y: Y && y}, 0, offset)\n      .call((g) =>\n        g\n          .selectAll()\n          .data(index)\n          .enter()\n          .append(\"line\")\n          .call(applyDirectStyles, this)\n          .attr(\"x1\", X1 && !isCollapsed(x) ? (i) => X1[i] + insetLeft : marginLeft + insetLeft)\n          .attr(\n            \"x2\",\n            X2 && !isCollapsed(x)\n              ? x.bandwidth\n                ? (i) => X2[i] + x.bandwidth() - insetRight\n                : (i) => X2[i] - insetRight\n              : width - marginRight - insetRight\n          )\n          .attr(\"y1\", Y ? (i) => Y[i] : (marginTop + height - marginBottom) / 2)\n          .attr(\"y2\", Y ? (i) => Y[i] : (marginTop + height - marginBottom) / 2)\n          .call(applyChannelStyles, this, channels)\n          .call(applyMarkers, this, channels, context)\n      )\n      .node();\n  }\n}\n\nexport function ruleX(data, options) {\n  let {x = identity, y, y1, y2, ...rest} = maybeIntervalY(options);\n  [y1, y2] = maybeOptionalZero(y, y1, y2);\n  return new RuleX(data, {...rest, x, y1, y2});\n}\n\nexport function ruleY(data, options) {\n  let {y = identity, x, x1, x2, ...rest} = maybeIntervalX(options);\n  [x1, x2] = maybeOptionalZero(x, x1, x2);\n  return new RuleY(data, {...rest, y, x1, x2});\n}\n\n// For marks specified either as [0, x] or [x1, x2], or nothing.\nfunction maybeOptionalZero(x, x1, x2) {\n  if (x == null) {\n    if (x1 === undefined) {\n      if (x2 !== undefined) return [0, x2];\n    } else {\n      if (x2 === undefined) return [0, x1];\n    }\n  } else if (x1 === undefined) {\n    return x2 === undefined ? [0, x] : [x, x2];\n  } else if (x2 === undefined) {\n    return [x, x1];\n  }\n  return [x1, x2];\n}\n", "export function template(strings, ...parts) {\n  let n = parts.length;\n\n  // If any of the interpolated parameters are strings rather than functions,\n  // bake them into the template to optimize performance during render.\n  for (let j = 0, copy = true; j < n; ++j) {\n    if (typeof parts[j] !== \"function\") {\n      if (copy) {\n        strings = strings.slice(); // copy before mutate\n        copy = false;\n      }\n      strings.splice(j, 2, strings[j] + parts[j] + strings[j + 1]);\n      parts.splice(j, 1);\n      --j, --n;\n    }\n  }\n\n  return (i) => {\n    let s = strings[0];\n    for (let j = 0; j < n; ++j) {\n      s += parts[j](i) + strings[j + 1];\n    }\n    return s;\n  };\n}\n", "import {namespaces} from \"d3\";\nimport {create} from \"../context.js\";\nimport {nonempty} from \"../defined.js\";\nimport {formatDefault} from \"../format.js\";\nimport {Mark} from \"../mark.js\";\nimport {\n  indexOf,\n  identity,\n  string,\n  maybeNumberChannel,\n  maybeTuple,\n  numberChannel,\n  isNumeric,\n  isTemporal,\n  keyword,\n  maybeFrameAnchor,\n  isTextual,\n  isIterable\n} from \"../options.js\";\nimport {\n  applyChannelStyles,\n  applyDirectStyles,\n  applyIndirectStyles,\n  applyAttr,\n  applyTransform,\n  impliedString,\n  applyFrameAnchor\n} from \"../style.js\";\nimport {template} from \"../template.js\";\nimport {maybeIntervalMidX, maybeIntervalMidY} from \"../transforms/interval.js\";\n\nconst defaults = {\n  ariaLabel: \"text\",\n  strokeLinejoin: \"round\",\n  strokeWidth: 3,\n  paintOrder: \"stroke\"\n};\n\nconst softHyphen = \"\\u00ad\";\n\nexport class Text extends Mark {\n  constructor(data, options = {}) {\n    const {\n      x,\n      y,\n      text = isIterable(data) && isTextual(data) ? identity : indexOf,\n      frameAnchor,\n      textAnchor = /right$/i.test(frameAnchor) ? \"end\" : /left$/i.test(frameAnchor) ? \"start\" : \"middle\",\n      lineAnchor = /^top/i.test(frameAnchor) ? \"top\" : /^bottom/i.test(frameAnchor) ? \"bottom\" : \"middle\",\n      lineHeight = 1,\n      lineWidth = Infinity,\n      textOverflow,\n      monospace,\n      fontFamily = monospace ? \"ui-monospace, monospace\" : undefined,\n      fontSize,\n      fontStyle,\n      fontVariant,\n      fontWeight,\n      rotate\n    } = options;\n    const [vrotate, crotate] = maybeNumberChannel(rotate, 0);\n    const [vfontSize, cfontSize] = maybeFontSizeChannel(fontSize);\n    super(\n      data,\n      {\n        x: {value: x, scale: \"x\", optional: true},\n        y: {value: y, scale: \"y\", optional: true},\n        fontSize: {value: vfontSize, optional: true},\n        rotate: {value: numberChannel(vrotate), optional: true},\n        text: {value: text, filter: nonempty, optional: true}\n      },\n      options,\n      defaults\n    );\n    this.rotate = crotate;\n    this.textAnchor = impliedString(textAnchor, \"middle\");\n    this.lineAnchor = keyword(lineAnchor, \"lineAnchor\", [\"top\", \"middle\", \"bottom\"]);\n    this.lineHeight = +lineHeight;\n    this.lineWidth = +lineWidth;\n    this.textOverflow = maybeTextOverflow(textOverflow);\n    this.monospace = !!monospace;\n    this.fontFamily = string(fontFamily);\n    this.fontSize = cfontSize;\n    this.fontStyle = string(fontStyle);\n    this.fontVariant = string(fontVariant);\n    this.fontWeight = string(fontWeight);\n    this.frameAnchor = maybeFrameAnchor(frameAnchor);\n    if (!(this.lineWidth >= 0)) throw new Error(`invalid lineWidth: ${lineWidth}`);\n    this.splitLines = splitter(this);\n    this.clipLine = clipper(this);\n  }\n  render(index, scales, channels, dimensions, context) {\n    const {x, y} = scales;\n    const {x: X, y: Y, rotate: R, text: T, title: TL, fontSize: FS} = channels;\n    const {rotate} = this;\n    const [cx, cy] = applyFrameAnchor(this, dimensions);\n    return create(\"svg:g\", context)\n      .call(applyIndirectStyles, this, dimensions, context)\n      .call(applyIndirectTextStyles, this, T, dimensions)\n      .call(applyTransform, this, {x: X && x, y: Y && y})\n      .call((g) =>\n        g\n          .selectAll()\n          .data(index)\n          .enter()\n          .append(\"text\")\n          .call(applyDirectStyles, this)\n          .call(applyMultilineText, this, T, TL)\n          .attr(\n            \"transform\",\n            template`translate(${X ? (i) => X[i] : cx},${Y ? (i) => Y[i] : cy})${\n              R ? (i) => ` rotate(${R[i]})` : rotate ? ` rotate(${rotate})` : ``\n            }`\n          )\n          .call(applyAttr, \"font-size\", FS && ((i) => FS[i]))\n          .call(applyChannelStyles, this, channels)\n      )\n      .node();\n  }\n}\n\nexport function maybeTextOverflow(textOverflow) {\n  return textOverflow == null\n    ? null\n    : keyword(textOverflow, \"textOverflow\", [\n        \"clip\", // shorthand for clip-end\n        \"ellipsis\", // \u2026 ellipsis-end\n        \"clip-start\",\n        \"clip-end\",\n        \"ellipsis-start\",\n        \"ellipsis-middle\",\n        \"ellipsis-end\"\n      ]).replace(/^(clip|ellipsis)$/, \"$1-end\");\n}\n\nfunction applyMultilineText(selection, mark, T, TL) {\n  if (!T) return;\n  const {lineAnchor, lineHeight, textOverflow, splitLines, clipLine} = mark;\n  selection.each(function (i) {\n    const lines = splitLines(formatDefault(T[i]) ?? \"\").map(clipLine);\n    const n = lines.length;\n    const y = lineAnchor === \"top\" ? 0.71 : lineAnchor === \"bottom\" ? 1 - n : (164 - n * 100) / 200;\n    if (n > 1) {\n      let m = 0;\n      for (let i = 0; i < n; ++i) {\n        ++m;\n        if (!lines[i]) continue;\n        const tspan = this.ownerDocument.createElementNS(namespaces.svg, \"tspan\");\n        tspan.setAttribute(\"x\", 0);\n        if (i === m - 1) tspan.setAttribute(\"y\", `${(y + i) * lineHeight}em`);\n        else tspan.setAttribute(\"dy\", `${m * lineHeight}em`);\n        tspan.textContent = lines[i];\n        this.appendChild(tspan);\n        m = 0;\n      }\n    } else {\n      if (y) this.setAttribute(\"y\", `${y * lineHeight}em`);\n      this.textContent = lines[0];\n    }\n    if (textOverflow && !TL && lines[0] !== T[i]) {\n      const title = this.ownerDocument.createElementNS(namespaces.svg, \"title\");\n      title.textContent = T[i];\n      this.appendChild(title);\n    }\n  });\n}\n\nexport function text(data, {x, y, ...options} = {}) {\n  if (options.frameAnchor === undefined) [x, y] = maybeTuple(x, y);\n  return new Text(data, {...options, x, y});\n}\n\nexport function textX(data, {x = identity, ...options} = {}) {\n  return new Text(data, maybeIntervalMidY({...options, x}));\n}\n\nexport function textY(data, {y = identity, ...options} = {}) {\n  return new Text(data, maybeIntervalMidX({...options, y}));\n}\n\nexport function applyIndirectTextStyles(selection, mark, T) {\n  applyAttr(selection, \"text-anchor\", mark.textAnchor);\n  applyAttr(selection, \"font-family\", mark.fontFamily);\n  applyAttr(selection, \"font-size\", mark.fontSize);\n  applyAttr(selection, \"font-style\", mark.fontStyle);\n  applyAttr(selection, \"font-variant\", mark.fontVariant === undefined ? inferFontVariant(T) : mark.fontVariant);\n  applyAttr(selection, \"font-weight\", mark.fontWeight);\n}\n\nfunction inferFontVariant(T) {\n  return T && (isNumeric(T) || isTemporal(T)) ? \"tabular-nums\" : undefined;\n}\n\n// https://developer.mozilla.org/en-US/docs/Web/CSS/font-size\nconst fontSizes = new Set([\n  // global keywords\n  \"inherit\",\n  \"initial\",\n  \"revert\",\n  \"unset\",\n  // absolute keywords\n  \"xx-small\",\n  \"x-small\",\n  \"small\",\n  \"medium\",\n  \"large\",\n  \"x-large\",\n  \"xx-large\",\n  \"xxx-large\",\n  // relative keywords\n  \"larger\",\n  \"smaller\"\n]);\n\n// The font size may be expressed as a constant in the following forms:\n// - number in pixels\n// - string keyword: see above\n// - string <length>: e.g., \"12px\"\n// - string <percentage>: e.g., \"80%\"\n// Anything else is assumed to be a channel definition.\nfunction maybeFontSizeChannel(fontSize) {\n  if (fontSize == null || typeof fontSize === \"number\") return [undefined, fontSize];\n  if (typeof fontSize !== \"string\") return [fontSize, undefined];\n  fontSize = fontSize.trim().toLowerCase();\n  return fontSizes.has(fontSize) || /^[+-]?\\d*\\.?\\d+(e[+-]?\\d+)?(\\w*|%)$/.test(fontSize)\n    ? [undefined, fontSize]\n    : [fontSize, undefined];\n}\n\n// This is a greedy algorithm for line wrapping. It would be better to use the\n// Knuth\u2013Plass line breaking algorithm (but that would be much more complex).\n// https://en.wikipedia.org/wiki/Line_wrap_and_word_wrap\nfunction lineWrap(input, maxWidth, widthof) {\n  const lines = [];\n  let lineStart,\n    lineEnd = 0;\n  for (const [wordStart, wordEnd, required] of lineBreaks(input)) {\n    // Record the start of a line. This isn\u2019t the same as the previous line\u2019s\n    // end because we often skip spaces between lines.\n    if (lineStart === undefined) lineStart = wordStart;\n\n    // If the current line is not empty, and if adding the current word would\n    // make the line longer than the allowed width, then break the line at the\n    // previous word end.\n    if (lineEnd > lineStart && widthof(input, lineStart, wordEnd) > maxWidth) {\n      lines.push(input.slice(lineStart, lineEnd) + (input[lineEnd - 1] === softHyphen ? \"-\" : \"\"));\n      lineStart = wordStart;\n    }\n\n    // If this is a required break (a newline), emit the line and reset.\n    if (required) {\n      lines.push(input.slice(lineStart, wordEnd));\n      lineStart = undefined;\n      continue;\n    }\n\n    // Extend the current line to include the new word.\n    lineEnd = wordEnd;\n  }\n  return lines;\n}\n\n// This is a rudimentary (and U.S.-centric) algorithm for finding opportunities\n// to break lines between words. A better and far more comprehensive approach\n// would be to use the official Unicode Line Breaking Algorithm.\n// https://unicode.org/reports/tr14/\nfunction* lineBreaks(input) {\n  let i = 0,\n    j = 0;\n  const n = input.length;\n  while (j < n) {\n    let k = 1;\n    switch (input[j]) {\n      case softHyphen:\n      case \"-\": // hyphen\n        ++j;\n        yield [i, j, false];\n        i = j;\n        break;\n      case \" \":\n        yield [i, j, false];\n        while (input[++j] === \" \"); // skip multiple spaces\n        i = j;\n        break;\n      case \"\\r\":\n        if (input[j + 1] === \"\\n\") ++k; // falls through\n      case \"\\n\":\n        yield [i, j, true];\n        j += k;\n        i = j;\n        break;\n      default:\n        ++j;\n        break;\n    }\n  }\n  yield [i, j, true];\n}\n\n// Computed as round(measureText(text).width * 10) at 10px system-ui. For\n// characters that are not represented in this map, we\u2019d ideally want to use a\n// weighted average of what we expect to see. But since we don\u2019t really know\n// what that is, using \u201Ce\u201D seems reasonable.\nconst defaultWidthMap = {\n  a: 56,\n  b: 63,\n  c: 57,\n  d: 63,\n  e: 58,\n  f: 37,\n  g: 62,\n  h: 60,\n  i: 26,\n  j: 26,\n  k: 55,\n  l: 26,\n  m: 88,\n  n: 60,\n  o: 60,\n  p: 62,\n  q: 62,\n  r: 39,\n  s: 54,\n  t: 38,\n  u: 60,\n  v: 55,\n  w: 79,\n  x: 54,\n  y: 55,\n  z: 55,\n  A: 69,\n  B: 67,\n  C: 73,\n  D: 74,\n  E: 61,\n  F: 58,\n  G: 76,\n  H: 75,\n  I: 28,\n  J: 55,\n  K: 67,\n  L: 58,\n  M: 89,\n  N: 75,\n  O: 78,\n  P: 65,\n  Q: 78,\n  R: 67,\n  S: 65,\n  T: 65,\n  U: 75,\n  V: 69,\n  W: 98,\n  X: 69,\n  Y: 67,\n  Z: 67,\n  0: 64,\n  1: 48,\n  2: 62,\n  3: 64,\n  4: 66,\n  5: 63,\n  6: 65,\n  7: 58,\n  8: 65,\n  9: 65,\n  \" \": 29,\n  \"!\": 32,\n  '\"': 49,\n  \"'\": 31,\n  \"(\": 39,\n  \")\": 39,\n  \",\": 31,\n  \"-\": 48,\n  \".\": 31,\n  \"/\": 32,\n  \":\": 31,\n  \";\": 31,\n  \"?\": 52,\n  \"\u2018\": 31,\n  \"\u2019\": 31,\n  \"\u201C\": 47,\n  \"\u201D\": 47,\n  \"\u2026\": 82\n};\n\n// This is a rudimentary (and U.S.-centric) algorithm for measuring the width of\n// a string based on a technique of Gregor Aisch; it assumes that individual\n// characters are laid out independently and does not implement the Unicode\n// grapheme cluster breaking algorithm. It does understand code points, though,\n// and so treats things like emoji as having the width of a lowercase e (and\n// should be equivalent to using for-of to iterate over code points, while also\n// being fast). TODO Optimize this by noting that we often re-measure characters\n// that were previously measured?\n// http://www.unicode.org/reports/tr29/#Grapheme_Cluster_Boundaries\n// https://exploringjs.com/impatient-js/ch_strings.html#atoms-of-text\nexport function defaultWidth(text, start = 0, end = text.length) {\n  let sum = 0;\n  for (let i = start; i < end; i = readCharacter(text, i)) {\n    sum += defaultWidthMap[text[i]] ?? (isPictographic(text, i) ? 120 : defaultWidthMap.e);\n  }\n  return sum;\n}\n\n// Even for monospaced text, we can\u2019t assume that the number of UTF-16 code\n// points (i.e., the length of a string) corresponds to the number of visible\n// characters; we still have to count graphemes. And note that pictographic\n// characters such as emojis are typically not monospaced!\nexport function monospaceWidth(text, start = 0, end = text.length) {\n  let sum = 0;\n  for (let i = start; i < end; i = readCharacter(text, i)) {\n    sum += isPictographic(text, i) ? 200 : 100;\n  }\n  return sum;\n}\n\nexport function splitter({monospace, lineWidth, textOverflow}) {\n  if (textOverflow != null || lineWidth == Infinity) return (text) => text.split(/\\r\\n?|\\n/g);\n  const widthof = monospace ? monospaceWidth : defaultWidth;\n  const maxWidth = lineWidth * 100;\n  return (text) => lineWrap(text, maxWidth, widthof);\n}\n\nexport function clipper({monospace, lineWidth, textOverflow}) {\n  if (textOverflow == null || lineWidth == Infinity) return (text) => text;\n  const widthof = monospace ? monospaceWidth : defaultWidth;\n  const maxWidth = lineWidth * 100;\n  switch (textOverflow) {\n    case \"clip-start\":\n      return (text) => clipStart(text, maxWidth, widthof, \"\");\n    case \"clip-end\":\n      return (text) => clipEnd(text, maxWidth, widthof, \"\");\n    case \"ellipsis-start\":\n      return (text) => clipStart(text, maxWidth, widthof, ellipsis);\n    case \"ellipsis-middle\":\n      return (text) => clipMiddle(text, maxWidth, widthof, ellipsis);\n    case \"ellipsis-end\":\n      return (text) => clipEnd(text, maxWidth, widthof, ellipsis);\n  }\n}\n\nexport const ellipsis = \"\u2026\";\n\n// Cuts the given text to the given width, using the specified widthof function;\n// the returned [index, error] guarantees text.slice(0, index) fits within the\n// specified width with the given error. If the text fits naturally within the\n// given width, returns [-1, 0]. If the text needs cutting, the given inset\n// specifies how much space (in the same units as width and widthof) to reserve\n// for a possible ellipsis character.\nexport function cut(text, width, widthof, inset) {\n  const I = []; // indexes of read character boundaries\n  let w = 0; // current line width\n  for (let i = 0, j = 0, n = text.length; i < n; i = j) {\n    j = readCharacter(text, i); // read the next character\n    const l = widthof(text, i, j); // current character width\n    if (w + l > width) {\n      w += inset;\n      while (w > width && i > 0) (j = i), (i = I.pop()), (w -= widthof(text, i, j)); // remove excess\n      return [i, width - w];\n    }\n    w += l;\n    I.push(i);\n  }\n  return [-1, 0];\n}\n\nexport function clipEnd(text, width, widthof, ellipsis) {\n  text = text.trim(); // ignore leading and trailing whitespace\n  const e = widthof(ellipsis);\n  const [i] = cut(text, width, widthof, e);\n  return i < 0 ? text : text.slice(0, i).trimEnd() + ellipsis;\n}\n\nexport function clipMiddle(text, width, widthof, ellipsis) {\n  text = text.trim(); // ignore leading and trailing whitespace\n  const w = widthof(text);\n  if (w <= width) return text;\n  const e = widthof(ellipsis) / 2;\n  const [i, ei] = cut(text, width / 2, widthof, e);\n  const [j] = cut(text, w - width / 2 - ei + e, widthof, -e); // TODO read spaces?\n  return j < 0 ? ellipsis : text.slice(0, i).trimEnd() + ellipsis + text.slice(readCharacter(text, j)).trimStart();\n}\n\nexport function clipStart(text, width, widthof, ellipsis) {\n  text = text.trim(); // ignore leading and trailing whitespace\n  const w = widthof(text);\n  if (w <= width) return text;\n  const e = widthof(ellipsis);\n  const [j] = cut(text, w - width + e, widthof, -e); // TODO read spaces?\n  return j < 0 ? ellipsis : ellipsis + text.slice(readCharacter(text, j)).trimStart();\n}\n\nconst reCombiner = /[\\p{Combining_Mark}\\p{Emoji_Modifier}]+/uy;\nconst rePictographic = /\\p{Extended_Pictographic}/uy;\n\n// Reads a single \u201Ccharacter\u201D element from the given text starting at the given\n// index, returning the index after the read character. Ideally, this implements\n// the Unicode text segmentation algorithm and understands grapheme cluster\n// boundaries, etc., but in practice this is only smart enough to detect UTF-16\n// surrogate pairs, combining marks, and zero-width joiner (zwj) sequences such\n// as emoji skin color modifiers. https://unicode.org/reports/tr29/\nexport function readCharacter(text, i) {\n  i += isSurrogatePair(text, i) ? 2 : 1;\n  if (isCombiner(text, i)) i = reCombiner.lastIndex;\n  if (isZeroWidthJoiner(text, i)) return readCharacter(text, i + 1);\n  return i;\n}\n\n// We avoid more expensive regex tests involving Unicode property classes by\n// first checking for the common case of 7-bit ASCII characters.\nfunction isAscii(text, i) {\n  return text.charCodeAt(i) < 0x80;\n}\n\nfunction isSurrogatePair(text, i) {\n  const hi = text.charCodeAt(i);\n  if (hi >= 0xd800 && hi < 0xdc00) {\n    const lo = text.charCodeAt(i + 1);\n    return lo >= 0xdc00 && lo < 0xe000;\n  }\n  return false;\n}\n\nfunction isZeroWidthJoiner(text, i) {\n  return text.charCodeAt(i) === 0x200d;\n}\n\nfunction isCombiner(text, i) {\n  return isAscii(text, i) ? false : ((reCombiner.lastIndex = i), reCombiner.test(text));\n}\n\nfunction isPictographic(text, i) {\n  return isAscii(text, i) ? false : ((rePictographic.lastIndex = i), rePictographic.test(text));\n}\n", "import {pathRound as path} from \"d3\";\nimport {create} from \"../context.js\";\nimport {Mark} from \"../mark.js\";\nimport {maybeFrameAnchor, maybeNumberChannel, maybeTuple, keyword, identity} from \"../options.js\";\nimport {\n  applyChannelStyles,\n  applyDirectStyles,\n  applyFrameAnchor,\n  applyIndirectStyles,\n  applyTransform\n} from \"../style.js\";\nimport {template} from \"../template.js\";\n\nconst defaults = {\n  ariaLabel: \"vector\",\n  fill: \"none\",\n  stroke: \"currentColor\",\n  strokeWidth: 1.5,\n  strokeLinejoin: \"round\",\n  strokeLinecap: \"round\"\n};\n\nconst defaultRadius = 3.5;\n\n// The size of the arrowhead is proportional to its length, but we still allow\n// the relative size of the head to be controlled via the mark\u2019s width option;\n// doubling the default radius will produce an arrowhead that is twice as big.\n// That said, we\u2019ll probably want a arrow with a fixed head size, too.\nconst wingRatio = defaultRadius * 5;\n\nconst shapeArrow = {\n  draw(context, l, r) {\n    const wing = (l * r) / wingRatio;\n    context.moveTo(0, 0);\n    context.lineTo(0, -l);\n    context.moveTo(-wing, wing - l);\n    context.lineTo(0, -l);\n    context.lineTo(wing, wing - l);\n  }\n};\n\nconst shapeSpike = {\n  draw(context, l, r) {\n    context.moveTo(-r, 0);\n    context.lineTo(0, -l);\n    context.lineTo(r, 0);\n  }\n};\n\nconst shapes = new Map([\n  [\"arrow\", shapeArrow],\n  [\"spike\", shapeSpike]\n]);\n\nfunction isShapeObject(value) {\n  return value && typeof value.draw === \"function\";\n}\n\nfunction maybeShape(shape) {\n  if (isShapeObject(shape)) return shape;\n  const value = shapes.get(`${shape}`.toLowerCase());\n  if (value) return value;\n  throw new Error(`invalid shape: ${shape}`);\n}\n\nexport class Vector extends Mark {\n  constructor(data, options = {}) {\n    const {x, y, r = defaultRadius, length, rotate, shape = shapeArrow, anchor = \"middle\", frameAnchor} = options;\n    const [vl, cl] = maybeNumberChannel(length, 12);\n    const [vr, cr] = maybeNumberChannel(rotate, 0);\n    super(\n      data,\n      {\n        x: {value: x, scale: \"x\", optional: true},\n        y: {value: y, scale: \"y\", optional: true},\n        length: {value: vl, scale: \"length\", optional: true},\n        rotate: {value: vr, optional: true}\n      },\n      options,\n      defaults\n    );\n    this.r = +r;\n    this.length = cl;\n    this.rotate = cr;\n    this.shape = maybeShape(shape);\n    this.anchor = keyword(anchor, \"anchor\", [\"start\", \"middle\", \"end\"]);\n    this.frameAnchor = maybeFrameAnchor(frameAnchor);\n  }\n  render(index, scales, channels, dimensions, context) {\n    const {x, y} = scales;\n    const {x: X, y: Y, length: L, rotate: A} = channels;\n    const {length, rotate, anchor, shape, r} = this;\n    const [cx, cy] = applyFrameAnchor(this, dimensions);\n    return create(\"svg:g\", context)\n      .call(applyIndirectStyles, this, dimensions, context)\n      .call(applyTransform, this, {x: X && x, y: Y && y})\n      .call((g) =>\n        g\n          .selectAll()\n          .data(index)\n          .enter()\n          .append(\"path\")\n          .call(applyDirectStyles, this)\n          .attr(\n            \"transform\",\n            template`translate(${X ? (i) => X[i] : cx},${Y ? (i) => Y[i] : cy})${\n              A ? (i) => ` rotate(${A[i]})` : rotate ? ` rotate(${rotate})` : ``\n            }${\n              anchor === \"start\"\n                ? ``\n                : anchor === \"end\"\n                ? L\n                  ? (i) => ` translate(0,${L[i]})`\n                  : ` translate(0,${length})`\n                : L\n                ? (i) => ` translate(0,${L[i] / 2})`\n                : ` translate(0,${length / 2})`\n            }`\n          )\n          .attr(\n            \"d\",\n            L\n              ? (i) => {\n                  const p = path();\n                  shape.draw(p, L[i], r);\n                  return p;\n                }\n              : (() => {\n                  const p = path();\n                  shape.draw(p, length, r);\n                  return p;\n                })()\n          )\n          .call(applyChannelStyles, this, channels)\n      )\n      .node();\n  }\n}\n\nexport function vector(data, options = {}) {\n  let {x, y, ...rest} = options;\n  if (options.frameAnchor === undefined) [x, y] = maybeTuple(x, y);\n  return new Vector(data, {...rest, x, y});\n}\n\nexport function vectorX(data, options = {}) {\n  const {x = identity, ...rest} = options;\n  return new Vector(data, {...rest, x});\n}\n\nexport function vectorY(data, options = {}) {\n  const {y = identity, ...rest} = options;\n  return new Vector(data, {...rest, y});\n}\n\nexport function spike(data, options = {}) {\n  const {\n    shape = shapeSpike,\n    stroke = defaults.stroke,\n    strokeWidth = 1,\n    fill = stroke,\n    fillOpacity = 0.3,\n    anchor = \"start\",\n    ...rest\n  } = options;\n  return vector(data, {...rest, shape, stroke, strokeWidth, fill, fillOpacity, anchor});\n}\n", "import {extent, format, timeFormat, utcFormat} from \"d3\";\nimport {formatDefault} from \"../format.js\";\nimport {marks} from \"../mark.js\";\nimport {radians} from \"../math.js\";\nimport {arrayify, constant, identity, keyword, number, range, valueof} from \"../options.js\";\nimport {isIterable, isNoneish, isTemporal, orderof} from \"../options.js\";\nimport {maybeColorChannel, maybeNumberChannel, maybeRangeInterval} from \"../options.js\";\nimport {isTemporalScale} from \"../scales.js\";\nimport {offset} from \"../style.js\";\nimport {formatTimeTicks, isTimeYear, isUtcYear} from \"../time.js\";\nimport {initializer} from \"../transforms/basic.js\";\nimport {ruleX, ruleY} from \"./rule.js\";\nimport {text, textX, textY} from \"./text.js\";\nimport {vectorX, vectorY} from \"./vector.js\";\n\nfunction maybeData(data, options) {\n  if (arguments.length < 2 && !isIterable(data)) (options = data), (data = null);\n  if (options === undefined) options = {};\n  return [data, options];\n}\n\nfunction maybeAnchor({anchor} = {}, anchors) {\n  return anchor === undefined ? anchors[0] : keyword(anchor, \"anchor\", anchors);\n}\n\nfunction anchorY(options) {\n  return maybeAnchor(options, [\"left\", \"right\"]);\n}\n\nfunction anchorFy(options) {\n  return maybeAnchor(options, [\"right\", \"left\"]);\n}\n\nfunction anchorX(options) {\n  return maybeAnchor(options, [\"bottom\", \"top\"]);\n}\n\nfunction anchorFx(options) {\n  return maybeAnchor(options, [\"top\", \"bottom\"]);\n}\n\nexport function axisY() {\n  const [data, options] = maybeData(...arguments);\n  return axisKy(\"y\", anchorY(options), data, options);\n}\n\nexport function axisFy() {\n  const [data, options] = maybeData(...arguments);\n  return axisKy(\"fy\", anchorFy(options), data, options);\n}\n\nexport function axisX() {\n  const [data, options] = maybeData(...arguments);\n  return axisKx(\"x\", anchorX(options), data, options);\n}\n\nexport function axisFx() {\n  const [data, options] = maybeData(...arguments);\n  return axisKx(\"fx\", anchorFx(options), data, options);\n}\n\nfunction axisKy(\n  k,\n  anchor,\n  data,\n  {\n    color = \"currentColor\",\n    opacity = 1,\n    stroke = color,\n    strokeOpacity = opacity,\n    strokeWidth = 1,\n    fill = color,\n    fillOpacity = opacity,\n    textAnchor,\n    textStroke,\n    textStrokeOpacity,\n    textStrokeWidth,\n    tickSize = k === \"y\" ? 6 : 0,\n    tickPadding,\n    tickRotate,\n    x,\n    margin,\n    marginTop = margin === undefined ? 20 : margin,\n    marginRight = margin === undefined ? (anchor === \"right\" ? 40 : 0) : margin,\n    marginBottom = margin === undefined ? 20 : margin,\n    marginLeft = margin === undefined ? (anchor === \"left\" ? 40 : 0) : margin,\n    label,\n    labelAnchor,\n    labelArrow,\n    labelOffset,\n    ...options\n  }\n) {\n  tickSize = number(tickSize);\n  tickPadding = number(tickPadding);\n  tickRotate = number(tickRotate);\n  if (labelAnchor !== undefined) labelAnchor = keyword(labelAnchor, \"labelAnchor\", [\"center\", \"top\", \"bottom\"]);\n  labelArrow = maybeLabelArrow(labelArrow);\n  return marks(\n    tickSize && !isNoneish(stroke)\n      ? axisTickKy(k, anchor, data, {\n          stroke,\n          strokeOpacity,\n          strokeWidth,\n          tickSize,\n          tickPadding,\n          tickRotate,\n          x,\n          ...options\n        })\n      : null,\n    !isNoneish(fill)\n      ? axisTextKy(k, anchor, data, {\n          fill,\n          fillOpacity,\n          stroke: textStroke,\n          strokeOpacity: textStrokeOpacity,\n          strokeWidth: textStrokeWidth,\n          textAnchor,\n          tickSize,\n          tickPadding,\n          tickRotate,\n          x,\n          marginTop,\n          marginRight,\n          marginBottom,\n          marginLeft,\n          ...options\n        })\n      : null,\n    !isNoneish(fill) && label !== null\n      ? text(\n          [],\n          labelOptions({fill, fillOpacity, ...options}, function (data, facets, channels, scales, dimensions) {\n            const scale = scales[k];\n            const {marginTop, marginRight, marginBottom, marginLeft} = (k === \"y\" && dimensions.inset) || dimensions;\n            const cla = labelAnchor ?? (scale.bandwidth ? \"center\" : \"top\");\n            const clo = labelOffset ?? (anchor === \"right\" ? marginRight : marginLeft) - 3;\n            if (cla === \"center\") {\n              this.textAnchor = undefined; // middle\n              this.lineAnchor = anchor === \"right\" ? \"bottom\" : \"top\";\n              this.frameAnchor = anchor;\n              this.rotate = -90;\n            } else {\n              this.textAnchor = anchor === \"right\" ? \"end\" : \"start\";\n              this.lineAnchor = cla;\n              this.frameAnchor = `${cla}-${anchor}`;\n              this.rotate = 0;\n            }\n            this.dy = cla === \"top\" ? 3 - marginTop : cla === \"bottom\" ? marginBottom - 3 : 0;\n            this.dx = anchor === \"right\" ? clo : -clo;\n            this.ariaLabel = `${k}-axis label`;\n            return {\n              facets: [[0]],\n              channels: {text: {value: [formatAxisLabel(k, scale, {anchor, label, labelAnchor: cla, labelArrow})]}}\n            };\n          })\n        )\n      : null\n  );\n}\n\nfunction axisKx(\n  k,\n  anchor,\n  data,\n  {\n    color = \"currentColor\",\n    opacity = 1,\n    stroke = color,\n    strokeOpacity = opacity,\n    strokeWidth = 1,\n    fill = color,\n    fillOpacity = opacity,\n    textAnchor,\n    textStroke,\n    textStrokeOpacity,\n    textStrokeWidth,\n    tickSize = k === \"x\" ? 6 : 0,\n    tickPadding,\n    tickRotate,\n    y,\n    margin,\n    marginTop = margin === undefined ? (anchor === \"top\" ? 30 : 0) : margin,\n    marginRight = margin === undefined ? 20 : margin,\n    marginBottom = margin === undefined ? (anchor === \"bottom\" ? 30 : 0) : margin,\n    marginLeft = margin === undefined ? 20 : margin,\n    label,\n    labelAnchor,\n    labelArrow,\n    labelOffset,\n    ...options\n  }\n) {\n  tickSize = number(tickSize);\n  tickPadding = number(tickPadding);\n  tickRotate = number(tickRotate);\n  if (labelAnchor !== undefined) labelAnchor = keyword(labelAnchor, \"labelAnchor\", [\"center\", \"left\", \"right\"]);\n  labelArrow = maybeLabelArrow(labelArrow);\n  return marks(\n    tickSize && !isNoneish(stroke)\n      ? axisTickKx(k, anchor, data, {\n          stroke,\n          strokeOpacity,\n          strokeWidth,\n          tickSize,\n          tickPadding,\n          tickRotate,\n          y,\n          ...options\n        })\n      : null,\n    !isNoneish(fill)\n      ? axisTextKx(k, anchor, data, {\n          fill,\n          fillOpacity,\n          stroke: textStroke,\n          strokeOpacity: textStrokeOpacity,\n          strokeWidth: textStrokeWidth,\n          textAnchor,\n          tickSize,\n          tickPadding,\n          tickRotate,\n          y,\n          marginTop,\n          marginRight,\n          marginBottom,\n          marginLeft,\n          ...options\n        })\n      : null,\n    !isNoneish(fill) && label !== null\n      ? text(\n          [],\n          labelOptions({fill, fillOpacity, ...options}, function (data, facets, channels, scales, dimensions) {\n            const scale = scales[k];\n            const {marginTop, marginRight, marginBottom, marginLeft} = (k === \"x\" && dimensions.inset) || dimensions;\n            const cla = labelAnchor ?? (scale.bandwidth ? \"center\" : \"right\");\n            const clo = labelOffset ?? (anchor === \"top\" ? marginTop : marginBottom) - 3;\n            if (cla === \"center\") {\n              this.frameAnchor = anchor;\n              this.textAnchor = undefined; // middle\n            } else {\n              this.frameAnchor = `${anchor}-${cla}`;\n              this.textAnchor = cla === \"right\" ? \"end\" : \"start\";\n            }\n            this.lineAnchor = anchor;\n            this.dy = anchor === \"top\" ? -clo : clo;\n            this.dx = cla === \"right\" ? marginRight - 3 : cla === \"left\" ? 3 - marginLeft : 0;\n            this.ariaLabel = `${k}-axis label`;\n            return {\n              facets: [[0]],\n              channels: {text: {value: [formatAxisLabel(k, scale, {anchor, label, labelAnchor: cla, labelArrow})]}}\n            };\n          })\n        )\n      : null\n  );\n}\n\nfunction axisTickKy(\n  k,\n  anchor,\n  data,\n  {\n    strokeWidth = 1,\n    strokeLinecap = null,\n    strokeLinejoin = null,\n    facetAnchor = anchor + (k === \"y\" ? \"-empty\" : \"\"),\n    frameAnchor = anchor,\n    tickSize,\n    inset = 0,\n    insetLeft = inset,\n    insetRight = inset,\n    dx = 0,\n    y = k === \"y\" ? undefined : null,\n    ...options\n  }\n) {\n  return axisMark(vectorY, k, `${k}-axis tick`, data, {\n    strokeWidth,\n    strokeLinecap,\n    strokeLinejoin,\n    facetAnchor,\n    frameAnchor,\n    y,\n    ...options,\n    dx: anchor === \"left\" ? +dx - offset + +insetLeft : +dx + offset - insetRight,\n    anchor: \"start\",\n    length: tickSize,\n    shape: anchor === \"left\" ? shapeTickLeft : shapeTickRight\n  });\n}\n\nfunction axisTickKx(\n  k,\n  anchor,\n  data,\n  {\n    strokeWidth = 1,\n    strokeLinecap = null,\n    strokeLinejoin = null,\n    facetAnchor = anchor + (k === \"x\" ? \"-empty\" : \"\"),\n    frameAnchor = anchor,\n    tickSize,\n    inset = 0,\n    insetTop = inset,\n    insetBottom = inset,\n    dy = 0,\n    x = k === \"x\" ? undefined : null,\n    ...options\n  }\n) {\n  return axisMark(vectorX, k, `${k}-axis tick`, data, {\n    strokeWidth,\n    strokeLinejoin,\n    strokeLinecap,\n    facetAnchor,\n    frameAnchor,\n    x,\n    ...options,\n    dy: anchor === \"bottom\" ? +dy - offset - insetBottom : +dy + offset + +insetTop,\n    anchor: \"start\",\n    length: tickSize,\n    shape: anchor === \"bottom\" ? shapeTickBottom : shapeTickTop\n  });\n}\n\nfunction axisTextKy(\n  k,\n  anchor,\n  data,\n  {\n    facetAnchor = anchor + (k === \"y\" ? \"-empty\" : \"\"),\n    frameAnchor = anchor,\n    tickSize,\n    tickRotate = 0,\n    tickPadding = Math.max(3, 9 - tickSize) + (Math.abs(tickRotate) > 60 ? 4 * Math.cos(tickRotate * radians) : 0),\n    tickFormat,\n    text = typeof tickFormat === \"function\" ? tickFormat : undefined,\n    textAnchor = Math.abs(tickRotate) > 60 ? \"middle\" : anchor === \"left\" ? \"end\" : \"start\",\n    lineAnchor = tickRotate > 60 ? \"top\" : tickRotate < -60 ? \"bottom\" : \"middle\",\n    fontVariant,\n    inset = 0,\n    insetLeft = inset,\n    insetRight = inset,\n    dx = 0,\n    y = k === \"y\" ? undefined : null,\n    ...options\n  }\n) {\n  return axisMark(\n    textY,\n    k,\n    `${k}-axis tick label`,\n    data,\n    {\n      facetAnchor,\n      frameAnchor,\n      text: text === undefined ? null : text,\n      textAnchor,\n      lineAnchor,\n      fontVariant,\n      rotate: tickRotate,\n      y,\n      ...options,\n      dx: anchor === \"left\" ? +dx - tickSize - tickPadding + +insetLeft : +dx + +tickSize + +tickPadding - insetRight\n    },\n    function (scale, data, ticks, channels) {\n      if (fontVariant === undefined) this.fontVariant = inferFontVariant(scale);\n      if (text === undefined) channels.text = inferTextChannel(scale, data, ticks, tickFormat, anchor);\n    }\n  );\n}\n\nfunction axisTextKx(\n  k,\n  anchor,\n  data,\n  {\n    facetAnchor = anchor + (k === \"x\" ? \"-empty\" : \"\"),\n    frameAnchor = anchor,\n    tickSize,\n    tickRotate = 0,\n    tickPadding = Math.max(3, 9 - tickSize) + (Math.abs(tickRotate) >= 10 ? 4 * Math.cos(tickRotate * radians) : 0),\n    tickFormat,\n    text = typeof tickFormat === \"function\" ? tickFormat : undefined,\n    textAnchor = Math.abs(tickRotate) >= 10 ? ((tickRotate < 0) ^ (anchor === \"bottom\") ? \"start\" : \"end\") : \"middle\",\n    lineAnchor = Math.abs(tickRotate) >= 10 ? \"middle\" : anchor === \"bottom\" ? \"top\" : \"bottom\",\n    fontVariant,\n    inset = 0,\n    insetTop = inset,\n    insetBottom = inset,\n    dy = 0,\n    x = k === \"x\" ? undefined : null,\n    ...options\n  }\n) {\n  return axisMark(\n    textX,\n    k,\n    `${k}-axis tick label`,\n    data,\n    {\n      facetAnchor,\n      frameAnchor,\n      text: text === undefined ? null : text,\n      textAnchor,\n      lineAnchor,\n      fontVariant,\n      rotate: tickRotate,\n      x,\n      ...options,\n      dy: anchor === \"bottom\" ? +dy + +tickSize + +tickPadding - insetBottom : +dy - tickSize - tickPadding + +insetTop\n    },\n    function (scale, data, ticks, channels) {\n      if (fontVariant === undefined) this.fontVariant = inferFontVariant(scale);\n      if (text === undefined) channels.text = inferTextChannel(scale, data, ticks, tickFormat, anchor);\n    }\n  );\n}\n\nexport function gridY() {\n  const [data, options] = maybeData(...arguments);\n  return gridKy(\"y\", anchorY(options), data, options);\n}\n\nexport function gridFy() {\n  const [data, options] = maybeData(...arguments);\n  return gridKy(\"fy\", anchorFy(options), data, options);\n}\n\nexport function gridX() {\n  const [data, options] = maybeData(...arguments);\n  return gridKx(\"x\", anchorX(options), data, options);\n}\n\nexport function gridFx() {\n  const [data, options] = maybeData(...arguments);\n  return gridKx(\"fx\", anchorFx(options), data, options);\n}\n\nfunction gridKy(\n  k,\n  anchor,\n  data,\n  {\n    y = k === \"y\" ? undefined : null,\n    x = null,\n    x1 = anchor === \"left\" ? x : null,\n    x2 = anchor === \"right\" ? x : null,\n    ...options\n  }\n) {\n  return axisMark(ruleY, k, `${k}-grid`, data, {y, x1, x2, ...gridDefaults(options)});\n}\n\nfunction gridKx(\n  k,\n  anchor,\n  data,\n  {\n    x = k === \"x\" ? undefined : null,\n    y = null,\n    y1 = anchor === \"top\" ? y : null,\n    y2 = anchor === \"bottom\" ? y : null,\n    ...options\n  }\n) {\n  return axisMark(ruleX, k, `${k}-grid`, data, {x, y1, y2, ...gridDefaults(options)});\n}\n\nfunction gridDefaults({\n  color = \"currentColor\",\n  opacity = 0.1,\n  stroke = color,\n  strokeOpacity = opacity,\n  strokeWidth = 1,\n  ...options\n}) {\n  return {stroke, strokeOpacity, strokeWidth, ...options};\n}\n\nfunction labelOptions(\n  {fill, fillOpacity, fontFamily, fontSize, fontStyle, fontWeight, monospace, pointerEvents, shapeRendering},\n  initializer\n) {\n  // Only propagate these options if constant.\n  [, fill] = maybeColorChannel(fill);\n  [, fillOpacity] = maybeNumberChannel(fillOpacity);\n  return {\n    facet: \"super\",\n    x: null,\n    y: null,\n    fill,\n    fillOpacity,\n    fontFamily,\n    fontSize,\n    fontStyle,\n    fontWeight,\n    monospace,\n    pointerEvents,\n    shapeRendering,\n    initializer\n  };\n}\n\nfunction axisMark(mark, k, ariaLabel, data, options, initialize) {\n  let channels;\n\n  function axisInitializer(data, facets, _channels, scales, dimensions, context) {\n    const initializeFacets = data == null && (k === \"fx\" || k === \"fy\");\n    const {[k]: scale} = scales;\n    if (!scale) throw new Error(`missing scale: ${k}`);\n    let {ticks, tickSpacing, interval} = options;\n    if (isTemporalScale(scale) && typeof ticks === \"string\") (interval = ticks), (ticks = undefined);\n    if (data == null) {\n      if (isIterable(ticks)) {\n        data = arrayify(ticks);\n      } else if (scale.ticks) {\n        if (ticks !== undefined) {\n          data = scale.ticks(ticks);\n        } else {\n          interval = maybeRangeInterval(interval === undefined ? scale.interval : interval, scale.type);\n          if (interval !== undefined) {\n            // For time scales, we could pass the interval directly to\n            // scale.ticks because it\u2019s supported by d3.utcTicks; but\n            // quantitative scales and d3.ticks do not support numeric\n            // intervals for scale.ticks, so we compute them here.\n            const [min, max] = extent(scale.domain());\n            data = interval.range(min, interval.offset(interval.floor(max))); // inclusive max\n          } else {\n            const [min, max] = extent(scale.range());\n            ticks = (max - min) / (tickSpacing === undefined ? (k === \"x\" ? 80 : 35) : tickSpacing);\n            data = scale.ticks(ticks);\n          }\n        }\n      } else {\n        data = scale.domain();\n      }\n      if (k === \"y\" || k === \"x\") {\n        facets = [range(data)];\n      } else {\n        channels[k] = {scale: k, value: identity};\n      }\n    }\n    initialize?.call(this, scale, data, ticks, channels);\n    const initializedChannels = Object.fromEntries(\n      Object.entries(channels).map(([name, channel]) => {\n        return [name, {...channel, value: valueof(data, channel.value)}];\n      })\n    );\n    if (initializeFacets) facets = context.filterFacets(data, initializedChannels);\n    return {data, facets, channels: initializedChannels};\n  }\n\n  // Apply any basic initializers after the axis initializer computes the ticks.\n  const basicInitializer = initializer(options).initializer;\n  const m = mark(data, initializer({...options, initializer: axisInitializer}, basicInitializer));\n  if (data == null) {\n    channels = m.channels;\n    m.channels = {};\n  } else {\n    channels = {};\n  }\n  m.ariaLabel = ariaLabel;\n  return m;\n}\n\nfunction inferTextChannel(scale, data, ticks, tickFormat, anchor) {\n  return {value: inferTickFormat(scale, data, ticks, tickFormat, anchor)};\n}\n\n// D3\u2019s ordinal scales simply use toString by default, but if the ordinal scale\n// domain (or ticks) are numbers or dates (say because we\u2019re applying a time\n// interval to the ordinal scale), we want Plot\u2019s default formatter.\nexport function inferTickFormat(scale, data, ticks, tickFormat, anchor) {\n  return tickFormat === undefined && isTemporalScale(scale)\n    ? formatTimeTicks(scale, data, ticks, anchor)\n    : scale.tickFormat\n    ? scale.tickFormat(isIterable(ticks) ? null : ticks, tickFormat)\n    : tickFormat === undefined\n    ? isUtcYear(scale.interval)\n      ? utcFormat(\"%Y\")\n      : isTimeYear(scale.interval)\n      ? timeFormat(\"%Y\")\n      : formatDefault\n    : typeof tickFormat === \"string\"\n    ? (isTemporal(scale.domain()) ? utcFormat : format)(tickFormat)\n    : constant(tickFormat);\n}\n\nconst shapeTickBottom = {\n  draw(context, l) {\n    context.moveTo(0, 0);\n    context.lineTo(0, l);\n  }\n};\n\nconst shapeTickTop = {\n  draw(context, l) {\n    context.moveTo(0, 0);\n    context.lineTo(0, -l);\n  }\n};\n\nconst shapeTickLeft = {\n  draw(context, l) {\n    context.moveTo(0, 0);\n    context.lineTo(-l, 0);\n  }\n};\n\nconst shapeTickRight = {\n  draw(context, l) {\n    context.moveTo(0, 0);\n    context.lineTo(l, 0);\n  }\n};\n\n// TODO Unify this with the other inferFontVariant; here we only have a scale\n// function rather than a scale descriptor.\nfunction inferFontVariant(scale) {\n  return scale.bandwidth && !scale.interval ? undefined : \"tabular-nums\";\n}\n\n// Determines whether the scale points in the \u201Cpositive\u201D (right or down) or\n// \u201Cnegative\u201D (left or up) direction; if the scale order cannot be determined,\n// returns NaN; used to assign an appropriate label arrow.\nfunction inferScaleOrder(scale) {\n  return Math.sign(orderof(scale.domain())) * Math.sign(orderof(scale.range()));\n}\n\n// Takes the scale label, and if this is not an ordinal scale and the label was\n// inferred from an associated channel, adds an orientation-appropriate arrow.\nfunction formatAxisLabel(k, scale, {anchor, label = scale.label, labelAnchor, labelArrow} = {}) {\n  if (label == null || (label.inferred && isTemporalish(scale) && /^(date|time|year)$/i.test(label))) return;\n  label = String(label); // coerce to a string after checking if inferred\n  if (labelArrow === \"auto\") labelArrow = (!scale.bandwidth || scale.interval) && !/[\u2191\u2193\u2192\u2190]/.test(label);\n  if (!labelArrow) return label;\n  if (labelArrow === true) {\n    const order = inferScaleOrder(scale);\n    if (order)\n      labelArrow =\n        /x$/.test(k) || labelAnchor === \"center\"\n          ? /x$/.test(k) === order < 0\n            ? \"left\"\n            : \"right\"\n          : order < 0\n          ? \"up\"\n          : \"down\";\n  }\n  switch (labelArrow) {\n    case \"left\":\n      return `\u2190 ${label}`;\n    case \"right\":\n      return `${label} \u2192`;\n    case \"up\":\n      return anchor === \"right\" ? `${label} \u2191` : `\u2191 ${label}`;\n    case \"down\":\n      return anchor === \"right\" ? `${label} \u2193` : `\u2193 ${label}`;\n  }\n  return label;\n}\n\nfunction maybeLabelArrow(labelArrow = \"auto\") {\n  return isNoneish(labelArrow)\n    ? false\n    : typeof labelArrow === \"boolean\"\n    ? labelArrow\n    : keyword(labelArrow, \"labelArrow\", [\"auto\", \"up\", \"right\", \"down\", \"left\"]);\n}\n\nfunction isTemporalish(scale) {\n  return isTemporalScale(scale) || scale.interval != null;\n}\n", "import {pathRound as path} from \"d3\";\nimport {inferFontVariant} from \"../axes.js\";\nimport {create, createContext} from \"../context.js\";\nimport {isNoneish, maybeColorChannel, maybeNumberChannel} from \"../options.js\";\nimport {isOrdinalScale, isThresholdScale} from \"../scales.js\";\nimport {applyInlineStyles, impliedString, maybeClassName} from \"../style.js\";\nimport {inferTickFormat} from \"../marks/axis.js\";\n\nfunction maybeScale(scale, key) {\n  if (key == null) return key;\n  const s = scale(key);\n  if (!s) throw new Error(`scale not found: ${key}`);\n  return s;\n}\n\nexport function legendSwatches(color, {opacity, ...options} = {}) {\n  if (!isOrdinalScale(color) && !isThresholdScale(color))\n    throw new Error(`swatches legend requires ordinal or threshold color scale (not ${color.type})`);\n  return legendItems(color, options, (selection, scale, width, height) =>\n    selection\n      .append(\"svg\")\n      .attr(\"width\", width)\n      .attr(\"height\", height)\n      .attr(\"fill\", scale.scale)\n      .attr(\"fill-opacity\", maybeNumberChannel(opacity)[1])\n      .append(\"rect\")\n      .attr(\"width\", \"100%\")\n      .attr(\"height\", \"100%\")\n  );\n}\n\nexport function legendSymbols(\n  symbol,\n  {\n    fill = symbol.hint?.fill !== undefined ? symbol.hint.fill : \"none\",\n    fillOpacity = 1,\n    stroke = symbol.hint?.stroke !== undefined ? symbol.hint.stroke : isNoneish(fill) ? \"currentColor\" : \"none\",\n    strokeOpacity = 1,\n    strokeWidth = 1.5,\n    r = 4.5,\n    ...options\n  } = {},\n  scale\n) {\n  const [vf, cf] = maybeColorChannel(fill);\n  const [vs, cs] = maybeColorChannel(stroke);\n  const sf = maybeScale(scale, vf);\n  const ss = maybeScale(scale, vs);\n  const size = r * r * Math.PI;\n  fillOpacity = maybeNumberChannel(fillOpacity)[1];\n  strokeOpacity = maybeNumberChannel(strokeOpacity)[1];\n  strokeWidth = maybeNumberChannel(strokeWidth)[1];\n  return legendItems(symbol, options, (selection, scale, width, height) =>\n    selection\n      .append(\"svg\")\n      .attr(\"viewBox\", \"-8 -8 16 16\")\n      .attr(\"width\", width)\n      .attr(\"height\", height)\n      .attr(\"fill\", vf === \"color\" ? (d) => sf.scale(d) : cf)\n      .attr(\"fill-opacity\", fillOpacity)\n      .attr(\"stroke\", vs === \"color\" ? (d) => ss.scale(d) : cs)\n      .attr(\"stroke-opacity\", strokeOpacity)\n      .attr(\"stroke-width\", strokeWidth)\n      .append(\"path\")\n      .attr(\"d\", (d) => {\n        const p = path();\n        symbol.scale(d).draw(p, size);\n        return p;\n      })\n  );\n}\n\nfunction legendItems(scale, options = {}, swatch) {\n  let {\n    columns,\n    tickFormat,\n    fontVariant = inferFontVariant(scale),\n    // TODO label,\n    swatchSize = 15,\n    swatchWidth = swatchSize,\n    swatchHeight = swatchSize,\n    marginLeft = 0,\n    className,\n    style,\n    width\n  } = options;\n  const context = createContext(options);\n  className = maybeClassName(className);\n  if (typeof tickFormat !== \"function\") tickFormat = inferTickFormat(scale.scale, scale.domain, undefined, tickFormat);\n\n  const swatches = create(\"div\", context).attr(\n    \"class\",\n    `${className}-swatches ${className}-swatches-${columns != null ? \"columns\" : \"wrap\"}`\n  );\n\n  let extraStyle;\n\n  if (columns != null) {\n    extraStyle = `.${className}-swatches-columns .${className}-swatch {\n  display: flex;\n  align-items: center;\n  break-inside: avoid;\n  padding-bottom: 1px;\n}\n.${className}-swatches-columns .${className}-swatch::before {\n  flex-shrink: 0;\n}\n.${className}-swatches-columns .${className}-swatch-label {\n  white-space: nowrap;\n  overflow: hidden;\n  text-overflow: ellipsis;\n}`;\n\n    swatches\n      .style(\"columns\", columns)\n      .selectAll()\n      .data(scale.domain)\n      .enter()\n      .append(\"div\")\n      .attr(\"class\", `${className}-swatch`)\n      .call(swatch, scale, swatchWidth, swatchHeight)\n      .call((item) =>\n        item.append(\"div\").attr(\"class\", `${className}-swatch-label`).attr(\"title\", tickFormat).text(tickFormat)\n      );\n  } else {\n    extraStyle = `.${className}-swatches-wrap {\n  display: flex;\n  align-items: center;\n  min-height: 33px;\n  flex-wrap: wrap;\n}\n.${className}-swatches-wrap .${className}-swatch {\n  display: inline-flex;\n  align-items: center;\n  margin-right: 1em;\n}`;\n\n    swatches\n      .selectAll()\n      .data(scale.domain)\n      .enter()\n      .append(\"span\")\n      .attr(\"class\", `${className}-swatch`)\n      .call(swatch, scale, swatchWidth, swatchHeight)\n      .append(function () {\n        return this.ownerDocument.createTextNode(tickFormat.apply(this, arguments));\n      });\n  }\n\n  return swatches\n    .call((div) =>\n      div.insert(\"style\", \"*\").text(\n        `.${className}-swatches {\n  font-family: system-ui, sans-serif;\n  font-size: 10px;\n  margin-bottom: 0.5em;\n}\n.${className}-swatch > svg {\n  margin-right: 0.5em;\n  overflow: visible;\n}\n${extraStyle}`\n      )\n    )\n    .style(\"margin-left\", marginLeft ? `${+marginLeft}px` : null)\n    .style(\"width\", width === undefined ? null : `${+width}px`)\n    .style(\"font-variant\", impliedString(fontVariant, \"normal\"))\n    .call(applyInlineStyles, style)\n    .node();\n}\n", "import {rgb} from \"d3\";\nimport {createContext} from \"./context.js\";\nimport {legendRamp} from \"./legends/ramp.js\";\nimport {legendSwatches, legendSymbols} from \"./legends/swatches.js\";\nimport {inherit, isScaleOptions} from \"./options.js\";\nimport {normalizeScale} from \"./scales.js\";\n\nconst legendRegistry = new Map([\n  [\"symbol\", legendSymbols],\n  [\"color\", legendColor],\n  [\"opacity\", legendOpacity]\n]);\n\nexport function legend(options = {}) {\n  for (const [key, value] of legendRegistry) {\n    const scale = options[key];\n    if (isScaleOptions(scale)) {\n      // e.g., ignore {color: \"red\"}\n      const context = createContext(options);\n      let hint;\n      // For symbol legends, pass a hint to the symbol scale.\n      if (key === \"symbol\") {\n        const {fill, stroke = fill === undefined && isScaleOptions(options.color) ? \"color\" : undefined} = options;\n        hint = {fill, stroke};\n      }\n      return value(normalizeScale(key, scale, hint), legendOptions(context, scale, options), (key) =>\n        isScaleOptions(options[key]) ? normalizeScale(key, options[key]) : null\n      );\n    }\n  }\n  throw new Error(\"unknown legend type; no scale found\");\n}\n\nexport function exposeLegends(scales, context, defaults = {}) {\n  return (key, options) => {\n    if (!legendRegistry.has(key)) throw new Error(`unknown legend type: ${key}`);\n    if (!(key in scales)) return;\n    return legendRegistry.get(key)(scales[key], legendOptions(context, defaults[key], options), (key) => scales[key]);\n  };\n}\n\nfunction legendOptions({className, ...context}, {label, ticks, tickFormat} = {}, options) {\n  return inherit(options, {className, ...context}, {label, ticks, tickFormat});\n}\n\nfunction legendColor(color, {legend = true, ...options}) {\n  if (legend === true) legend = color.type === \"ordinal\" ? \"swatches\" : \"ramp\";\n  if (color.domain === undefined) return;\n  switch (`${legend}`.toLowerCase()) {\n    case \"swatches\":\n      return legendSwatches(color, options);\n    case \"ramp\":\n      return legendRamp(color, options);\n    default:\n      throw new Error(`unknown legend type: ${legend}`);\n  }\n}\n\nfunction legendOpacity({type, interpolate, ...scale}, {legend = true, color = rgb(0, 0, 0), ...options}) {\n  if (!interpolate) throw new Error(`${type} opacity scales are not supported`);\n  if (legend === true) legend = \"ramp\";\n  if (`${legend}`.toLowerCase() !== \"ramp\") throw new Error(`${legend} opacity legends are not supported`);\n  return legendColor({type, ...scale, interpolate: interpolateOpacity(color)}, {legend, ...options});\n}\n\nfunction interpolateOpacity(color) {\n  const {r, g, b} = rgb(color) || rgb(0, 0, 0); // treat invalid color as black\n  return (t) => `rgba(${r},${g},${b},${t})`;\n}\n\nexport function createLegends(scales, context, options) {\n  const legends = [];\n  for (const [key, value] of legendRegistry) {\n    const o = options[key];\n    if (o?.legend && key in scales) {\n      const legend = value(scales[key], legendOptions(context, scales[key], o), (key) => scales[key]);\n      if (legend != null) legends.push(legend);\n    }\n  }\n  return legends;\n}\n", "import {create} from \"../context.js\";\nimport {Mark} from \"../mark.js\";\nimport {maybeKeyword, number, singleton} from \"../options.js\";\nimport {applyChannelStyles, applyDirectStyles, applyIndirectStyles, applyTransform} from \"../style.js\";\n\nconst defaults = {\n  ariaLabel: \"frame\",\n  fill: \"none\",\n  stroke: \"currentColor\"\n};\n\nconst lineDefaults = {\n  ariaLabel: \"frame\",\n  fill: null,\n  stroke: \"currentColor\",\n  strokeLinecap: \"square\"\n};\n\nexport class Frame extends Mark {\n  constructor(options = {}) {\n    const {\n      anchor = null,\n      inset = 0,\n      insetTop = inset,\n      insetRight = inset,\n      insetBottom = inset,\n      insetLeft = inset,\n      rx,\n      ry\n    } = options;\n    super(singleton, undefined, options, anchor == null ? defaults : lineDefaults);\n    this.anchor = maybeKeyword(anchor, \"anchor\", [\"top\", \"right\", \"bottom\", \"left\"]);\n    this.insetTop = number(insetTop);\n    this.insetRight = number(insetRight);\n    this.insetBottom = number(insetBottom);\n    this.insetLeft = number(insetLeft);\n    this.rx = number(rx);\n    this.ry = number(ry);\n  }\n  render(index, scales, channels, dimensions, context) {\n    const {marginTop, marginRight, marginBottom, marginLeft, width, height} = dimensions;\n    const {anchor, insetTop, insetRight, insetBottom, insetLeft, rx, ry} = this;\n    const x1 = marginLeft + insetLeft;\n    const x2 = width - marginRight - insetRight;\n    const y1 = marginTop + insetTop;\n    const y2 = height - marginBottom - insetBottom;\n    return create(anchor ? \"svg:line\" : \"svg:rect\", context)\n      .datum(0)\n      .call(applyIndirectStyles, this, dimensions, context)\n      .call(applyDirectStyles, this)\n      .call(applyChannelStyles, this, channels)\n      .call(applyTransform, this, {})\n      .call(\n        anchor === \"left\"\n          ? (line) => line.attr(\"x1\", x1).attr(\"x2\", x1).attr(\"y1\", y1).attr(\"y2\", y2)\n          : anchor === \"right\"\n          ? (line) => line.attr(\"x1\", x2).attr(\"x2\", x2).attr(\"y1\", y1).attr(\"y2\", y2)\n          : anchor === \"top\"\n          ? (line) => line.attr(\"x1\", x1).attr(\"x2\", x2).attr(\"y1\", y1).attr(\"y2\", y1)\n          : anchor === \"bottom\"\n          ? (line) => line.attr(\"x1\", x1).attr(\"x2\", x2).attr(\"y1\", y2).attr(\"y2\", y2)\n          : (rect) =>\n              rect\n                .attr(\"x\", x1)\n                .attr(\"y\", y1)\n                .attr(\"width\", x2 - x1)\n                .attr(\"height\", y2 - y1)\n                .attr(\"rx\", rx)\n                .attr(\"ry\", ry)\n      )\n      .node();\n  }\n}\n\nexport function frame(options) {\n  return new Frame(options);\n}\n", "import {select} from \"d3\";\nimport {getSource} from \"../channel.js\";\nimport {create} from \"../context.js\";\nimport {defined} from \"../defined.js\";\nimport {formatDefault} from \"../format.js\";\nimport {anchorX, anchorY} from \"../interactions/pointer.js\";\nimport {Mark} from \"../mark.js\";\nimport {maybeAnchor, maybeFrameAnchor, maybeTuple, number, string} from \"../options.js\";\nimport {applyDirectStyles, applyFrameAnchor, applyIndirectStyles, applyTransform, impliedString} from \"../style.js\";\nimport {identity, isIterable, isTextual} from \"../options.js\";\nimport {inferTickFormat} from \"./axis.js\";\nimport {applyIndirectTextStyles, defaultWidth, ellipsis, monospaceWidth} from \"./text.js\";\nimport {cut, clipper, splitter, maybeTextOverflow} from \"./text.js\";\n\nconst defaults = {\n  ariaLabel: \"tip\",\n  fill: \"white\",\n  stroke: \"currentColor\"\n};\n\n// These channels are not displayed in the tip; TODO allow customization.\nconst ignoreChannels = new Set([\"geometry\", \"href\", \"src\", \"ariaLabel\"]);\n\nexport class Tip extends Mark {\n  constructor(data, options = {}) {\n    if (options.tip) options = {...options, tip: false};\n    if (options.title === undefined && isIterable(data) && isTextual(data)) options = {...options, title: identity};\n    const {\n      x,\n      y,\n      x1,\n      x2,\n      y1,\n      y2,\n      anchor,\n      monospace,\n      fontFamily = monospace ? \"ui-monospace, monospace\" : undefined,\n      fontSize,\n      fontStyle,\n      fontVariant,\n      fontWeight,\n      lineHeight = 1,\n      lineWidth = 20,\n      frameAnchor,\n      textAnchor = \"start\",\n      textOverflow,\n      textPadding = 8,\n      title,\n      pointerSize = 12,\n      pathFilter = \"drop-shadow(0 3px 4px rgba(0,0,0,0.2))\"\n    } = options;\n    super(\n      data,\n      {\n        x: {value: x1 != null && x2 != null ? null : x, scale: \"x\", optional: true}, // ignore midpoint\n        y: {value: y1 != null && y2 != null ? null : y, scale: \"y\", optional: true}, // ignore midpoint\n        x1: {value: x1, scale: \"x\", optional: x2 == null},\n        y1: {value: y1, scale: \"y\", optional: y2 == null},\n        x2: {value: x2, scale: \"x\", optional: x1 == null},\n        y2: {value: y2, scale: \"y\", optional: y1 == null},\n        title: {value: title, optional: true} // filter: defined\n      },\n      options,\n      defaults\n    );\n    this.anchor = maybeAnchor(anchor, \"anchor\");\n    this.previousAnchor = this.anchor ?? \"top-left\";\n    this.frameAnchor = maybeFrameAnchor(frameAnchor);\n    this.textAnchor = impliedString(textAnchor, \"middle\");\n    this.textPadding = +textPadding;\n    this.pointerSize = +pointerSize;\n    this.pathFilter = string(pathFilter);\n    this.lineHeight = +lineHeight;\n    this.lineWidth = +lineWidth;\n    this.textOverflow = maybeTextOverflow(textOverflow);\n    this.monospace = !!monospace;\n    this.fontFamily = string(fontFamily);\n    this.fontSize = number(fontSize);\n    this.fontStyle = string(fontStyle);\n    this.fontVariant = string(fontVariant);\n    this.fontWeight = string(fontWeight);\n    for (const key in defaults) if (key in this.channels) this[key] = defaults[key]; // apply default even if channel\n    this.splitLines = splitter(this);\n    this.clipLine = clipper(this);\n  }\n  render(index, scales, values, dimensions, context) {\n    const mark = this;\n    const {x, y, fx, fy} = scales;\n    const {ownerSVGElement: svg, document} = context;\n    const {anchor, monospace, lineHeight, lineWidth} = this;\n    const {textPadding: r, pointerSize: m, pathFilter} = this;\n    const {marginTop, marginLeft} = dimensions;\n    const sources = getSources(values);\n\n    // The anchor position is the middle of x1 & y1 and x2 & y2, if available,\n    // or x & y; the former is considered more specific because it\u2019s how we\n    // disable the implicit stack and interval transforms. If any dimension is\n    // unspecified, we fallback to the frame anchor. We also need to know the\n    // facet offsets to detect when the tip would draw outside the plot, and\n    // thus we need to change the orientation.\n    const {x1: X1, y1: Y1, x2: X2, y2: Y2, x: X = X1 ?? X2, y: Y = Y1 ?? Y2} = values;\n    const ox = fx ? fx(index.fx) - marginLeft : 0;\n    const oy = fy ? fy(index.fy) - marginTop : 0;\n\n    // The order of precedence for the anchor position is: the middle of x1 & y1\n    // and x2 & y2; or x1 & y1 (e.g., area); or lastly x & y. If a dimension is\n    // unspecified, the frame anchor is used.\n    const [cx, cy] = applyFrameAnchor(this, dimensions);\n    const px = anchorX(values, cx);\n    const py = anchorY(values, cy);\n\n    // Resolve the text metric implementation. We may need an ellipsis for text\n    // truncation, so we optimistically compute the ellipsis width.\n    const widthof = monospace ? monospaceWidth : defaultWidth;\n    const ee = widthof(ellipsis);\n\n    // We borrow the scale\u2019s tick format for facet channels; this is safe for\n    // ordinal scales (but not continuous scales where the display value may\n    // need higher precision), and generally better than the default format.\n    const formatFx = fx && inferTickFormat(fx);\n    const formatFy = fy && inferTickFormat(fy);\n\n    function* format(sources, i) {\n      if (\"title\" in sources) {\n        const text = sources.title.value[i];\n        for (const line of mark.splitLines(formatDefault(text))) {\n          yield {name: \"\", value: mark.clipLine(line)};\n        }\n        return;\n      }\n      for (const key in sources) {\n        if (key === \"x1\" && \"x2\" in sources) continue;\n        if (key === \"y1\" && \"y2\" in sources) continue;\n        const channel = sources[key];\n        const value = channel.value[i];\n        if (!defined(value) && channel.scale == null) continue;\n        if (key === \"x2\" && \"x1\" in sources) {\n          yield {name: formatLabel(scales, channel, \"x\"), value: formatPair(sources.x1, channel, i)};\n        } else if (key === \"y2\" && \"y1\" in sources) {\n          yield {name: formatLabel(scales, channel, \"y\"), value: formatPair(sources.y1, channel, i)};\n        } else {\n          const scale = channel.scale;\n          const line = {name: formatLabel(scales, channel, key), value: formatDefault(value)};\n          if (scale === \"color\" || scale === \"opacity\") line[scale] = values[key][i];\n          yield line;\n        }\n      }\n      if (index.fi != null && fx) yield {name: String(fx.label ?? \"fx\"), value: formatFx(index.fx)};\n      if (index.fi != null && fy) yield {name: String(fy.label ?? \"fy\"), value: formatFy(index.fy)};\n    }\n\n    // We don\u2019t call applyChannelStyles because we only use the channels to\n    // derive the content of the tip, not its aesthetics.\n    const g = create(\"svg:g\", context)\n      .call(applyIndirectStyles, this, dimensions, context)\n      .call(applyIndirectTextStyles, this)\n      .call(applyTransform, this, {x: X && x, y: Y && y})\n      .call((g) =>\n        g\n          .selectAll()\n          .data(index)\n          .enter()\n          .append(\"g\")\n          .attr(\"transform\", (i) => `translate(${Math.round(px(i))},${Math.round(py(i))})`) // crisp edges\n          .call(applyDirectStyles, this)\n          .call((g) => g.append(\"path\").attr(\"filter\", pathFilter))\n          .call((g) =>\n            g.append(\"text\").each(function (i) {\n              const that = select(this);\n              // prevent style inheritance (from path)\n              this.setAttribute(\"fill\", \"currentColor\");\n              this.setAttribute(\"fill-opacity\", 1);\n              this.setAttribute(\"stroke\", \"none\");\n              // iteratively render each channel value\n              const names = new Set();\n              for (const line of format(sources, i)) {\n                const name = line.name;\n                if (name && names.has(name)) continue;\n                else names.add(name);\n                renderLine(that, line);\n              }\n            })\n          )\n      );\n\n    // Renders a single line (a name-value pair) to the tip, truncating the text\n    // as needed, and adding a title if the text is truncated. Note that this is\n    // just the initial layout of the text; in postrender we will compute the\n    // exact text metrics and translate the text as needed once we know the\n    // tip\u2019s orientation (anchor).\n    function renderLine(selection, {name, value, color, opacity}) {\n      const swatch = color != null || opacity != null;\n      let title;\n      let w = lineWidth * 100;\n      const [j] = cut(name, w, widthof, ee);\n      if (j >= 0) {\n        // name is truncated\n        name = name.slice(0, j).trimEnd() + ellipsis;\n        title = value.trim();\n        value = \"\";\n      } else {\n        if (name || (!value && !swatch)) value = \" \" + value;\n        const [k] = cut(value, w - widthof(name), widthof, ee);\n        if (k >= 0) {\n          // value is truncated\n          value = value.slice(0, k).trimEnd() + ellipsis;\n          title = value.trim();\n        }\n      }\n      const line = selection.append(\"tspan\").attr(\"x\", 0).attr(\"dy\", `${lineHeight}em`).text(\"\\u200b\"); // zwsp for double-click\n      if (name) line.append(\"tspan\").attr(\"font-weight\", \"bold\").text(name);\n      if (value) line.append(() => document.createTextNode(value));\n      if (swatch) line.append(\"tspan\").text(\" \u25A0\").attr(\"fill\", color).attr(\"fill-opacity\", opacity).style(\"user-select\", \"none\"); // prettier-ignore\n      if (title) line.append(\"title\").text(title);\n    }\n\n    // Only after the plot is attached to the page can we compute the exact text\n    // metrics needed to determine the tip size and orientation (anchor).\n    function postrender() {\n      const {width, height} = dimensions.facet ?? dimensions;\n      g.selectChildren().each(function (i) {\n        let {x: tx, width: w, height: h} = this.getBBox();\n        (w = Math.round(w)), (h = Math.round(h)); // crisp edges\n        let a = anchor; // use the specified anchor, if any\n        if (a === undefined) {\n          a = mark.previousAnchor; // favor the previous anchor, if it fits\n          const x = px(i) + ox;\n          const y = py(i) + oy;\n          const fitLeft = x + w + r * 2 < width;\n          const fitRight = x - w - r * 2 > 0;\n          const fitTop = y + h + m + r * 2 + 7 < height;\n          const fitBottom = y - h - m - r * 2 > 0;\n          const ax = (/-left$/.test(a) ? fitLeft || !fitRight : fitLeft && !fitRight) ? \"left\" : \"right\";\n          const ay = (/^top-/.test(a) ? fitTop || !fitBottom : fitTop && !fitBottom) ? \"top\" : \"bottom\";\n          a = mark.previousAnchor = `${ay}-${ax}`;\n        }\n        const path = this.firstChild; // note: assumes exactly two children!\n        const text = this.lastChild; // note: assumes exactly two children!\n        path.setAttribute(\"d\", getPath(a, m, r, w, h));\n        if (tx) for (const t of text.childNodes) t.setAttribute(\"x\", -tx);\n        text.setAttribute(\"y\", `${+getLineOffset(a, text.childNodes.length, lineHeight).toFixed(6)}em`);\n        text.setAttribute(\"transform\", `translate(${getTextTranslate(a, m, r, w, h)})`);\n      });\n    }\n\n    // Wait until the plot is inserted into the page so that we can use getBBox\n    // to compute the exact text dimensions. If the SVG is already connected, as\n    // when the pointer interaction triggers the re-render, use a faster\n    // microtask instead of an animation frame; if this SSR (e.g., JSDOM), skip\n    // this step. Perhaps this could be done synchronously; getting the\n    // dimensions of the SVG is easy, and although accurate text metrics are\n    // hard, we could use approximate heuristics.\n    if (svg.isConnected) Promise.resolve().then(postrender);\n    else if (typeof requestAnimationFrame !== \"undefined\") requestAnimationFrame(postrender);\n\n    return g.node();\n  }\n}\n\nexport function tip(data, {x, y, ...options} = {}) {\n  if (options.frameAnchor === undefined) [x, y] = maybeTuple(x, y);\n  return new Tip(data, {...options, x, y});\n}\n\nfunction getLineOffset(anchor, length, lineHeight) {\n  return /^top(?:-|$)/.test(anchor)\n    ? 0.94 - lineHeight\n    : /^bottom(?:-|$)/\n    ? -0.29 - length * lineHeight\n    : (length / 2) * lineHeight;\n}\n\nfunction getTextTranslate(anchor, m, r, width, height) {\n  switch (anchor) {\n    case \"middle\":\n      return [-width / 2, height / 2];\n    case \"top-left\":\n      return [r, m + r];\n    case \"top\":\n      return [-width / 2, m / 2 + r];\n    case \"top-right\":\n      return [-width - r, m + r];\n    case \"right\":\n      return [-m / 2 - width - r, height / 2];\n    case \"bottom-left\":\n      return [r, -m - r];\n    case \"bottom\":\n      return [-width / 2, -m / 2 - r];\n    case \"bottom-right\":\n      return [-width - r, -m - r];\n    case \"left\":\n      return [r + m / 2, height / 2];\n  }\n}\n\nfunction getPath(anchor, m, r, width, height) {\n  const w = width + r * 2;\n  const h = height + r * 2;\n  switch (anchor) {\n    case \"middle\":\n      return `M${-w / 2},${-h / 2}h${w}v${h}h${-w}z`;\n    case \"top-left\":\n      return `M0,0l${m},${m}h${w - m}v${h}h${-w}z`;\n    case \"top\":\n      return `M0,0l${m / 2},${m / 2}h${(w - m) / 2}v${h}h${-w}v${-h}h${(w - m) / 2}z`;\n    case \"top-right\":\n      return `M0,0l${-m},${m}h${m - w}v${h}h${w}z`;\n    case \"right\":\n      return `M0,0l${-m / 2},${-m / 2}v${m / 2 - h / 2}h${-w}v${h}h${w}v${m / 2 - h / 2}z`;\n    case \"bottom-left\":\n      return `M0,0l${m},${-m}h${w - m}v${-h}h${-w}z`;\n    case \"bottom\":\n      return `M0,0l${m / 2},${-m / 2}h${(w - m) / 2}v${-h}h${-w}v${h}h${(w - m) / 2}z`;\n    case \"bottom-right\":\n      return `M0,0l${-m},${-m}h${m - w}v${-h}h${w}z`;\n    case \"left\":\n      return `M0,0l${m / 2},${-m / 2}v${m / 2 - h / 2}h${w}v${h}h${-w}v${m / 2 - h / 2}z`;\n  }\n}\n\nfunction getSources({channels}) {\n  const sources = {};\n  for (const key in channels) {\n    if (ignoreChannels.has(key)) continue;\n    const source = getSource(channels, key);\n    if (source) sources[key] = source;\n  }\n  return sources;\n}\n\nfunction formatPair(c1, c2, i) {\n  return c2.hint?.length // e.g., stackY\u2019s y1 and y2\n    ? `${formatDefault(c2.value[i] - c1.value[i])}`\n    : `${formatDefault(c1.value[i])}\u2013${formatDefault(c2.value[i])}`;\n}\n\nfunction formatLabel(scales, c, defaultLabel) {\n  return String(scales[c.scale]?.label ?? c?.label ?? defaultLabel);\n}\n", "import {creator, select} from \"d3\";\nimport {createChannel, inferChannelScale} from \"./channel.js\";\nimport {createContext} from \"./context.js\";\nimport {createDimensions} from \"./dimensions.js\";\nimport {createFacets, recreateFacets, facetExclude, facetGroups, facetTranslator, facetFilter} from \"./facet.js\";\nimport {pointer, pointerX, pointerY} from \"./interactions/pointer.js\";\nimport {createLegends, exposeLegends} from \"./legends.js\";\nimport {Mark} from \"./mark.js\";\nimport {axisFx, axisFy, axisX, axisY, gridFx, gridFy, gridX, gridY} from \"./marks/axis.js\";\nimport {frame} from \"./marks/frame.js\";\nimport {tip} from \"./marks/tip.js\";\nimport {isColor, isIterable, isNone, isScaleOptions} from \"./options.js\";\nimport {arrayify, map, yes, maybeIntervalTransform, subarray} from \"./options.js\";\nimport {createProjection, getGeometryChannels, hasProjection} from \"./projection.js\";\nimport {createScales, createScaleFunctions, autoScaleRange, exposeScales} from \"./scales.js\";\nimport {innerDimensions, outerDimensions} from \"./scales.js\";\nimport {position, registry as scaleRegistry} from \"./scales/index.js\";\nimport {applyInlineStyles, maybeClassName} from \"./style.js\";\nimport {initializer} from \"./transforms/basic.js\";\nimport {consumeWarnings, warn} from \"./warnings.js\";\n\nexport function plot(options = {}) {\n  const {facet, style, caption, ariaLabel, ariaDescription} = options;\n\n  // className for inline styles\n  const className = maybeClassName(options.className);\n\n  // Flatten any nested marks.\n  const marks = options.marks === undefined ? [] : flatMarks(options.marks);\n\n  // Add implicit tips.\n  marks.push(...inferTips(marks));\n\n  // Compute the top-level facet state. This has roughly the same structure as\n  // mark-specific facet state, except there isn\u2019t a facetsIndex, and there\u2019s a\n  // data and dataLength so we can warn the user if a different data of the same\n  // length is used in a mark.\n  const topFacetState = maybeTopFacet(facet, options);\n\n  // Construct a map from (faceted) Mark instance to facet state, including:\n  // channels - an {fx?, fy?} object to add to the fx and fy scale\n  // groups - a possibly-nested map from facet values to indexes in the data array\n  // facetsIndex - a sparse nested array of indices corresponding to the valid facets\n  const facetStateByMark = new Map();\n  for (const mark of marks) {\n    const facetState = maybeMarkFacet(mark, topFacetState, options);\n    if (facetState) facetStateByMark.set(mark, facetState);\n  }\n\n  // Compute a Map from scale name to an array of associated channels.\n  const channelsByScale = new Map();\n  if (topFacetState) addScaleChannels(channelsByScale, [topFacetState], options);\n  addScaleChannels(channelsByScale, facetStateByMark, options);\n\n  // Add implicit axis marks. Because this happens after faceting (because it\n  // depends on whether faceting is present), we must initialize the facet state\n  // of any implicit axes, too.\n  const axes = flatMarks(inferAxes(marks, channelsByScale, options));\n  for (const mark of axes) {\n    const facetState = maybeMarkFacet(mark, topFacetState, options);\n    if (facetState) facetStateByMark.set(mark, facetState);\n  }\n  marks.unshift(...axes);\n\n  // All the possible facets are given by the domains of the fx or fy scales, or\n  // the cross-product of these domains if we facet by both x and y. We sort\n  // them in order to apply the facet filters afterwards.\n  let facets = createFacets(channelsByScale, options);\n\n  if (facets !== undefined) {\n    const topFacetsIndex = topFacetState ? facetFilter(facets, topFacetState) : undefined;\n\n    // Compute a facet index for each mark, parallel to the facets array. For\n    // mark-level facets, compute an index for that mark\u2019s data and options.\n    // Otherwise, use the top-level facet index.\n    for (const mark of marks) {\n      if (mark.facet === null || mark.facet === \"super\") continue;\n      const facetState = facetStateByMark.get(mark);\n      if (facetState === undefined) continue;\n      facetState.facetsIndex = mark.fx != null || mark.fy != null ? facetFilter(facets, facetState) : topFacetsIndex;\n    }\n\n    // The cross product of the domains of fx and fy can include fx-fy\n    // combinations for which no mark has an instance associated with that\n    // combination, and therefore we don\u2019t want to render this facet (not even\n    // the frame). The same can occur if you specify the domain of fx and fy\n    // explicitly, but there is no mark instance associated with some values in\n    // the domain. Expunge empty facets, and clear the corresponding elements\n    // from the nested index in each mark.\n    const nonEmpty = new Set();\n    for (const {facetsIndex} of facetStateByMark.values()) {\n      facetsIndex?.forEach((index, i) => {\n        if (index?.length > 0) {\n          nonEmpty.add(i);\n        }\n      });\n    }\n\n    // If all the facets are empty (as when none of the marks are actually\n    // faceted), none of them are empty.\n    facets.forEach(\n      0 < nonEmpty.size && nonEmpty.size < facets.length\n        ? (f, i) => (f.empty = !nonEmpty.has(i))\n        : (f) => (f.empty = false)\n    );\n\n    // For any mark using the \u201Cexclude\u201D facet mode, invert the index.\n    for (const mark of marks) {\n      if (mark.facet === \"exclude\") {\n        const facetState = facetStateByMark.get(mark);\n        if (facetState !== undefined) facetState.facetsIndex = facetExclude(facetState.facetsIndex);\n      }\n    }\n  }\n\n  // If a scale is explicitly declared in options, initialize its associated\n  // channels to the empty array; this will guarantee that a corresponding scale\n  // will be created later (even if there are no other channels). Ignore facet\n  // scale declarations, which are handled above.\n  for (const key of scaleRegistry.keys()) {\n    if (isScaleOptions(options[key]) && key !== \"fx\" && key !== \"fy\") {\n      channelsByScale.set(key, []);\n    }\n  }\n\n  // A Map from Mark instance to its render state, including:\n  // index - the data index e.g. [0, 1, 2, 3, \u2026]\n  // channels - an array of materialized channels e.g. [[\"x\", {value}], \u2026]\n  // faceted - a boolean indicating whether this mark is faceted\n  // values - an object of scaled values e.g. {x: [40, 32, \u2026], \u2026}\n  const stateByMark = new Map();\n\n  // Initialize the marks\u2019 state.\n  for (const mark of marks) {\n    if (stateByMark.has(mark)) throw new Error(\"duplicate mark; each mark must be unique\");\n    const {facetsIndex, channels: facetChannels} = facetStateByMark.get(mark) ?? {};\n    const {data, facets, channels} = mark.initialize(facetsIndex, facetChannels, options);\n    applyScaleTransforms(channels, options);\n    stateByMark.set(mark, {data, facets, channels});\n  }\n\n  // Initalize the scales and dimensions.\n  const scaleDescriptors = createScales(addScaleChannels(channelsByScale, stateByMark, options), options);\n  const scales = createScaleFunctions(scaleDescriptors);\n  const dimensions = createDimensions(scaleDescriptors, marks, options);\n\n  autoScaleRange(scaleDescriptors, dimensions);\n\n  const {fx, fy} = scales;\n  const subdimensions = fx || fy ? innerDimensions(scaleDescriptors, dimensions) : dimensions;\n  const superdimensions = fx || fy ? actualDimensions(scales, dimensions) : dimensions;\n\n  // Initialize the context.\n  const context = createContext(options);\n  const document = context.document;\n  const svg = creator(\"svg\").call(document.documentElement);\n  let figure = svg; // replaced with the figure element, if any\n  context.ownerSVGElement = svg;\n  context.className = className;\n  context.projection = createProjection(options, subdimensions);\n\n  // Allows e.g. the axis mark to determine faceting lazily.\n  context.filterFacets = (data, channels) => {\n    return facetFilter(facets, {channels, groups: facetGroups(data, channels)});\n  };\n\n  // Allows e.g. the tip mark to reference channels and data on other marks.\n  context.getMarkState = (mark) => {\n    const state = stateByMark.get(mark);\n    const facetState = facetStateByMark.get(mark);\n    return {...state, channels: {...state.channels, ...facetState?.channels}};\n  };\n\n  // Allows e.g. the pointer transform to support viewof.\n  context.dispatchValue = (value) => {\n    if (figure.value === value) return;\n    figure.value = value;\n    figure.dispatchEvent(new Event(\"input\", {bubbles: true}));\n  };\n\n  // Reinitialize; for deriving channels dependent on other channels.\n  const newByScale = new Set();\n  for (const [mark, state] of stateByMark) {\n    if (mark.initializer != null) {\n      const dimensions = mark.facet === \"super\" ? superdimensions : subdimensions;\n      const update = mark.initializer(state.data, state.facets, state.channels, scales, dimensions, context);\n      if (update.data !== undefined) {\n        state.data = update.data;\n      }\n      if (update.facets !== undefined) {\n        state.facets = update.facets;\n      }\n      if (update.channels !== undefined) {\n        const {fx, fy, ...channels} = update.channels; // separate facet channels\n        inferChannelScales(channels);\n        Object.assign(state.channels, channels);\n        for (const channel of Object.values(channels)) {\n          const {scale} = channel;\n          // Initializers aren\u2019t allowed to redefine position scales as this\n          // would introduce a circular dependency; so simply scale these\n          // channels as-is rather than creating new scales, and assume that\n          // they already have the scale\u2019s transform applied, if any (e.g., when\n          // generating ticks for the axis mark).\n          if (scale != null && scaleRegistry.get(scale) !== position) {\n            applyScaleTransform(channel, options);\n            newByScale.add(scale);\n          }\n        }\n        // If the initializer returns new mark-level facet channels, we must\n        // record that the mark is now faceted. Note: we aren\u2019t actually\n        // populating the facet state, but subsequently we won\u2019t need it.\n        if (fx != null || fy != null) facetStateByMark.set(mark, true);\n      }\n    }\n  }\n\n  // Reconstruct scales if new scaled channels were created during\n  // reinitialization. Preserve existing scale labels, if any.\n  if (newByScale.size) {\n    const newChannelsByScale = new Map();\n    addScaleChannels(newChannelsByScale, stateByMark, options, (key) => newByScale.has(key));\n    addScaleChannels(channelsByScale, stateByMark, options, (key) => newByScale.has(key));\n    const newScaleDescriptors = inheritScaleLabels(createScales(newChannelsByScale, options), scaleDescriptors);\n    const newScales = createScaleFunctions(newScaleDescriptors);\n    Object.assign(scaleDescriptors, newScaleDescriptors);\n    Object.assign(scales, newScales);\n  }\n\n  // Sort and filter the facets to match the fx and fy domains; this is needed\n  // because the facets were constructed prior to the fx and fy scales.\n  let facetDomains, facetTranslate;\n  if (facets !== undefined) {\n    facetDomains = {x: fx?.domain(), y: fy?.domain()};\n    facets = recreateFacets(facets, facetDomains);\n    facetTranslate = facetTranslator(fx, fy, dimensions);\n  }\n\n  // Compute value objects, applying scales and projection as needed.\n  for (const [mark, state] of stateByMark) {\n    state.values = mark.scale(state.channels, scales, context);\n  }\n\n  const {width, height} = dimensions;\n\n  select(svg)\n    .attr(\"class\", className)\n    .attr(\"fill\", \"currentColor\")\n    .attr(\"font-family\", \"system-ui, sans-serif\")\n    .attr(\"font-size\", 10)\n    .attr(\"text-anchor\", \"middle\")\n    .attr(\"width\", width)\n    .attr(\"height\", height)\n    .attr(\"viewBox\", `0 0 ${width} ${height}`)\n    .attr(\"aria-label\", ariaLabel)\n    .attr(\"aria-description\", ariaDescription)\n    .call((svg) =>\n      // Warning: if you edit this, change defaultClassName.\n      svg.append(\"style\").text(\n        `.${className} {\n  display: block;\n  background: white;\n  height: auto;\n  height: intrinsic;\n  max-width: 100%;\n}\n.${className} text,\n.${className} tspan {\n  white-space: pre;\n}`\n      )\n    )\n    .call(applyInlineStyles, style);\n\n  // Render marks.\n  for (const mark of marks) {\n    const {channels, values, facets: indexes} = stateByMark.get(mark);\n\n    // Render a non-faceted mark.\n    if (facets === undefined || mark.facet === \"super\") {\n      let index = null;\n      if (indexes) {\n        index = indexes[0];\n        index = mark.filter(index, channels, values);\n        if (index.length === 0) continue;\n      }\n      const node = mark.render(index, scales, values, superdimensions, context);\n      if (node == null) continue;\n      svg.appendChild(node);\n    }\n\n    // Render a faceted mark.\n    else {\n      let g;\n      for (const f of facets) {\n        if (!(mark.facetAnchor?.(facets, facetDomains, f) ?? !f.empty)) continue;\n        let index = null;\n        if (indexes) {\n          const faceted = facetStateByMark.has(mark);\n          index = indexes[faceted ? f.i : 0];\n          index = mark.filter(index, channels, values);\n          if (index.length === 0) continue;\n          if (!faceted && index === indexes[0]) index = subarray(index); // copy before assigning fx, fy, fi\n          (index.fx = f.x), (index.fy = f.y), (index.fi = f.i);\n        }\n        const node = mark.render(index, scales, values, subdimensions, context);\n        if (node == null) continue;\n        // Lazily construct the shared group (to drop empty marks).\n        (g ??= select(svg).append(\"g\")).append(() => node).datum(f);\n        // Promote ARIA attributes and mark transform to avoid repetition on\n        // each facet; this assumes that these attributes are consistent across\n        // facets, but that should be the case!\n        for (const name of [\"aria-label\", \"aria-description\", \"aria-hidden\", \"transform\"]) {\n          if (node.hasAttribute(name)) {\n            g.attr(name, node.getAttribute(name));\n            node.removeAttribute(name);\n          }\n        }\n      }\n      g?.selectChildren().attr(\"transform\", facetTranslate);\n    }\n  }\n\n  // Wrap the plot in a figure with a caption, if desired.\n  const legends = createLegends(scaleDescriptors, context, options);\n  if (caption != null || legends.length > 0) {\n    figure = document.createElement(\"figure\");\n    figure.style.maxWidth = \"initial\";\n    for (const legend of legends) figure.appendChild(legend);\n    figure.appendChild(svg);\n    if (caption != null) {\n      const figcaption = document.createElement(\"figcaption\");\n      figcaption.appendChild(caption?.ownerDocument ? caption : document.createTextNode(caption));\n      figure.appendChild(figcaption);\n    }\n  }\n\n  figure.scale = exposeScales(scaleDescriptors);\n  figure.legend = exposeLegends(scaleDescriptors, context, options);\n\n  const w = consumeWarnings();\n  if (w > 0) {\n    select(svg)\n      .append(\"text\")\n      .attr(\"x\", width)\n      .attr(\"y\", 20)\n      .attr(\"dy\", \"-1em\")\n      .attr(\"text-anchor\", \"end\")\n      .attr(\"font-family\", \"initial\") // fix emoji rendering in Chrome\n      .text(\"\\u26a0\\ufe0f\") // emoji variation selector\n      .append(\"title\")\n      .text(`${w.toLocaleString(\"en-US\")} warning${w === 1 ? \"\" : \"s\"}. Please check the console.`);\n  }\n\n  return figure;\n}\n\nfunction plotThis({marks = [], ...options} = {}) {\n  return plot({...options, marks: [...marks, this]});\n}\n\n// Note: This side-effect avoids a circular dependency.\nMark.prototype.plot = plotThis;\n\nfunction flatMarks(marks) {\n  return marks\n    .flat(Infinity)\n    .filter((mark) => mark != null)\n    .map(markify);\n}\n\nfunction markify(mark) {\n  return typeof mark.render === \"function\" ? mark : new Render(mark);\n}\n\nclass Render extends Mark {\n  constructor(render) {\n    if (typeof render !== \"function\") throw new TypeError(\"invalid mark; missing render function\");\n    super();\n    this.render = render;\n  }\n  render() {}\n}\n\n// Note: mutates channel.value to apply the scale transform, if any.\nfunction applyScaleTransforms(channels, options) {\n  for (const name in channels) applyScaleTransform(channels[name], options);\n  return channels;\n}\n\n// Note: mutates channel.value to apply the scale transform, if any. Also sets\n// channel.transform to false to prevent duplicate transform application.\nfunction applyScaleTransform(channel, options) {\n  const {scale, transform: t = true} = channel;\n  if (scale == null || !t) return;\n  const {\n    type,\n    percent,\n    interval,\n    transform = percent ? (x) => x * 100 : maybeIntervalTransform(interval, type)\n  } = options[scale] ?? {};\n  if (transform == null) return;\n  channel.value = map(channel.value, transform);\n  channel.transform = false;\n}\n\n// An initializer may generate channels without knowing how the downstream mark\n// will use them. Marks are typically responsible associated scales with\n// channels, but here we assume common behavior across marks.\nfunction inferChannelScales(channels) {\n  for (const name in channels) {\n    inferChannelScale(name, channels[name]);\n  }\n}\n\nfunction addScaleChannels(channelsByScale, stateByMark, options, filter = yes) {\n  for (const {channels} of stateByMark.values()) {\n    for (const name in channels) {\n      const channel = channels[name];\n      const {scale} = channel;\n      if (scale != null && filter(scale)) {\n        // Geo marks affect the default x and y domains if there is no\n        // projection. Skip this (as an optimization) when a projection is\n        // specified, or when the domains for x and y are specified.\n        if (scale === \"projection\") {\n          if (!hasProjection(options)) {\n            const gx = options.x?.domain === undefined;\n            const gy = options.y?.domain === undefined;\n            if (gx || gy) {\n              const [x, y] = getGeometryChannels(channel);\n              if (gx) addScaleChannel(channelsByScale, \"x\", x);\n              if (gy) addScaleChannel(channelsByScale, \"y\", y);\n            }\n          }\n        } else {\n          addScaleChannel(channelsByScale, scale, channel);\n        }\n      }\n    }\n  }\n  return channelsByScale;\n}\n\nfunction addScaleChannel(channelsByScale, scale, channel) {\n  const scaleChannels = channelsByScale.get(scale);\n  if (scaleChannels !== undefined) scaleChannels.push(channel);\n  else channelsByScale.set(scale, [channel]);\n}\n\n// Returns the facet groups, and possibly fx and fy channels, associated with\n// the top-level facet option {data, x, y}.\nfunction maybeTopFacet(facet, options) {\n  if (facet == null) return;\n  const {x, y} = facet;\n  if (x == null && y == null) return;\n  const data = arrayify(facet.data);\n  if (data == null) throw new Error(\"missing facet data\");\n  const channels = {};\n  if (x != null) channels.fx = createChannel(data, {value: x, scale: \"fx\"});\n  if (y != null) channels.fy = createChannel(data, {value: y, scale: \"fy\"});\n  applyScaleTransforms(channels, options);\n  const groups = facetGroups(data, channels);\n  return {channels, groups, data: facet.data};\n}\n\n// Returns the facet groups, and possibly fx and fy channels, associated with a\n// mark, either through top-level faceting or mark-level facet options {fx, fy}.\nfunction maybeMarkFacet(mark, topFacetState, options) {\n  if (mark.facet === null || mark.facet === \"super\") return;\n\n  // This mark defines a mark-level facet. TODO There\u2019s some code duplication\n  // here with maybeTopFacet that we could reduce.\n  const {fx, fy} = mark;\n  if (fx != null || fy != null) {\n    const data = arrayify(mark.data ?? fx ?? fy);\n    if (data === undefined) throw new Error(`missing facet data in ${mark.ariaLabel}`);\n    if (data === null) return; // ignore channel definitions if no data is provided TODO this right?\n    const channels = {};\n    if (fx != null) channels.fx = createChannel(data, {value: fx, scale: \"fx\"});\n    if (fy != null) channels.fy = createChannel(data, {value: fy, scale: \"fy\"});\n    applyScaleTransforms(channels, options);\n    return {channels, groups: facetGroups(data, channels)};\n  }\n\n  // This mark links to a top-level facet, if present.\n  if (topFacetState === undefined) return;\n\n  // TODO Can we link the top-level facet channels here?\n  const {channels, groups, data} = topFacetState;\n  if (mark.facet !== \"auto\" || mark.data === data) return {channels, groups};\n\n  // Warn for the common pitfall of wanting to facet mapped data with the\n  // top-level facet option.\n  if (\n    data.length > 0 &&\n    (groups.size > 1 || (groups.size === 1 && channels.fx && channels.fy && [...groups][0][1].size > 1)) &&\n    arrayify(mark.data)?.length === data.length\n  ) {\n    warn(\n      `Warning: the ${mark.ariaLabel} mark appears to use faceted data, but isn\u2019t faceted. The mark data has the same length as the facet data and the mark facet option is \"auto\", but the mark data and facet data are distinct. If this mark should be faceted, set the mark facet option to true; otherwise, suppress this warning by setting the mark facet option to false.`\n    );\n  }\n}\n\nfunction derive(mark, options = {}) {\n  return initializer({...options, x: null, y: null}, (data, facets, channels, scales, dimensions, context) => {\n    return context.getMarkState(mark);\n  });\n}\n\nfunction inferTips(marks) {\n  const tips = [];\n  for (const mark of marks) {\n    const t = mark.tip;\n    if (t) {\n      const p = t === \"x\" ? pointerX : t === \"y\" ? pointerY : pointer;\n      const options = p(derive(mark)); // TODO tip options?\n      options.title = null; // prevent implicit title for primitive data\n      tips.push(tip(mark.data, options));\n    }\n  }\n  return tips;\n}\n\nfunction inferAxes(marks, channelsByScale, options) {\n  let {\n    projection,\n    x = {},\n    y = {},\n    fx = {},\n    fy = {},\n    axis,\n    grid,\n    facet = {},\n    facet: {axis: facetAxis = axis, grid: facetGrid} = facet,\n    x: {axis: xAxis = axis, grid: xGrid = xAxis === null ? null : grid} = x,\n    y: {axis: yAxis = axis, grid: yGrid = yAxis === null ? null : grid} = y,\n    fx: {axis: fxAxis = facetAxis, grid: fxGrid = fxAxis === null ? null : facetGrid} = fx,\n    fy: {axis: fyAxis = facetAxis, grid: fyGrid = fyAxis === null ? null : facetGrid} = fy\n  } = options;\n\n  // Disable axes if the corresponding scale is not present.\n  if (projection || (!isScaleOptions(x) && !hasPositionChannel(\"x\", marks))) xAxis = xGrid = null;\n  if (projection || (!isScaleOptions(y) && !hasPositionChannel(\"y\", marks))) yAxis = yGrid = null;\n  if (!channelsByScale.has(\"fx\")) fxAxis = fxGrid = null;\n  if (!channelsByScale.has(\"fy\")) fyAxis = fyGrid = null;\n\n  // Resolve the default implicit axes by checking for explicit ones.\n  if (xAxis === undefined) xAxis = !hasAxis(marks, \"x\");\n  if (yAxis === undefined) yAxis = !hasAxis(marks, \"y\");\n  if (fxAxis === undefined) fxAxis = !hasAxis(marks, \"fx\");\n  if (fyAxis === undefined) fyAxis = !hasAxis(marks, \"fy\");\n\n  // Resolve the default orientation of axes.\n  if (xAxis === true) xAxis = \"bottom\";\n  if (yAxis === true) yAxis = \"left\";\n  if (fxAxis === true) fxAxis = xAxis === \"top\" || xAxis === null ? \"bottom\" : \"top\";\n  if (fyAxis === true) fyAxis = yAxis === \"right\" || yAxis === null ? \"left\" : \"right\";\n\n  const axes = [];\n  maybeGrid(axes, fyGrid, gridFy, fy);\n  maybeAxis(axes, fyAxis, axisFy, \"right\", \"left\", facet, fy);\n  maybeGrid(axes, fxGrid, gridFx, fx);\n  maybeAxis(axes, fxAxis, axisFx, \"top\", \"bottom\", facet, fx);\n  maybeGrid(axes, yGrid, gridY, y);\n  maybeAxis(axes, yAxis, axisY, \"left\", \"right\", options, y);\n  maybeGrid(axes, xGrid, gridX, x);\n  maybeAxis(axes, xAxis, axisX, \"bottom\", \"top\", options, x);\n  return axes;\n}\n\nfunction maybeAxis(axes, axis, axisType, primary, secondary, defaults, options) {\n  if (!axis) return;\n  const both = isBoth(axis);\n  options = axisOptions(both ? primary : axis, defaults, options);\n  const {line} = options;\n  if ((axisType === axisY || axisType === axisX) && line && !isNone(line)) axes.push(frame(lineOptions(options)));\n  axes.push(axisType(options));\n  if (both) axes.push(axisType({...options, anchor: secondary, label: null}));\n}\n\nfunction maybeGrid(axes, grid, gridType, options) {\n  if (!grid || isNone(grid)) return;\n  axes.push(gridType(gridOptions(grid, options)));\n}\n\nfunction isBoth(value) {\n  return /^\\s*both\\s*$/i.test(value);\n}\n\nfunction axisOptions(\n  anchor,\n  defaults,\n  {\n    line = defaults.line,\n    ticks,\n    tickSize,\n    tickSpacing,\n    tickPadding,\n    tickFormat,\n    tickRotate,\n    fontVariant,\n    ariaLabel,\n    ariaDescription,\n    label = defaults.label,\n    labelAnchor,\n    labelArrow = defaults.labelArrow,\n    labelOffset\n  }\n) {\n  return {\n    anchor,\n    line,\n    ticks,\n    tickSize,\n    tickSpacing,\n    tickPadding,\n    tickFormat,\n    tickRotate,\n    fontVariant,\n    ariaLabel,\n    ariaDescription,\n    label,\n    labelAnchor,\n    labelArrow,\n    labelOffset\n  };\n}\n\nfunction lineOptions(options) {\n  const {anchor, line} = options;\n  return {anchor, facetAnchor: anchor + \"-empty\", stroke: line === true ? undefined : line};\n}\n\nfunction gridOptions(\n  grid,\n  {\n    stroke = isColor(grid) ? grid : undefined,\n    ticks = isGridTicks(grid) ? grid : undefined,\n    tickSpacing,\n    ariaLabel,\n    ariaDescription\n  }\n) {\n  return {\n    stroke,\n    ticks,\n    tickSpacing,\n    ariaLabel,\n    ariaDescription\n  };\n}\n\nfunction isGridTicks(grid) {\n  switch (typeof grid) {\n    case \"number\":\n      return true;\n    case \"string\":\n      return !isColor(grid);\n  }\n  return isIterable(grid) || typeof grid?.range === \"function\";\n}\n\n// Is there an explicit axis already present? TODO We probably want a more\n// explicit test than looking for the ARIA label, but it does afford some\n// flexibility in axis implementation which is nice.\nfunction hasAxis(marks, k) {\n  const prefix = `${k}-axis `;\n  return marks.some((m) => m.ariaLabel?.startsWith(prefix));\n}\n\nfunction hasPositionChannel(k, marks) {\n  for (const mark of marks) {\n    for (const key in mark.channels) {\n      const {scale} = mark.channels[key];\n      if (scale === k || scale === \"projection\") {\n        return true;\n      }\n    }\n  }\n  return false;\n}\n\nfunction inheritScaleLabels(newScales, scales) {\n  for (const key in newScales) {\n    const newScale = newScales[key];\n    const scale = scales[key];\n    if (newScale.label === undefined && scale) {\n      newScale.label = scale.label;\n    }\n  }\n  return newScales;\n}\n\n// This differs from the other outerDimensions in that it accounts for rounding\n// and outer padding in the fact scales; we want the frame to align exactly with\n// the actual range, not the desired range.\nfunction actualDimensions({fx, fy}, dimensions) {\n  const {marginTop, marginRight, marginBottom, marginLeft, width, height} = outerDimensions(dimensions);\n  const fxr = fx && outerRange(fx);\n  const fyr = fy && outerRange(fy);\n  return {\n    marginTop: fy ? fyr[0] : marginTop,\n    marginRight: fx ? width - fxr[1] : marginRight,\n    marginBottom: fy ? height - fyr[1] : marginBottom,\n    marginLeft: fx ? fxr[0] : marginLeft,\n    // Some marks, namely the x- and y-axis labels, want to know what the\n    // desired (rather than actual) margins are for positioning.\n    inset: {\n      marginTop: dimensions.marginTop,\n      marginRight: dimensions.marginRight,\n      marginBottom: dimensions.marginBottom,\n      marginLeft: dimensions.marginLeft\n    },\n    width,\n    height\n  };\n}\n\nfunction outerRange(scale) {\n  const domain = scale.domain();\n  let x1 = scale(domain[0]);\n  let x2 = scale(domain[domain.length - 1]);\n  if (x2 < x1) [x1, x2] = [x2, x1];\n  return [x1, x2 + scale.bandwidth()];\n}\n", "import {\n  bisect,\n  extent,\n  thresholdFreedmanDiaconis,\n  thresholdScott,\n  thresholdSturges,\n  tickIncrement,\n  ticks,\n  utcTickInterval\n} from \"d3\";\nimport {withTip} from \"../mark.js\";\nimport {\n  coerceDate,\n  coerceNumbers,\n  identity,\n  isIterable,\n  isTemporal,\n  labelof,\n  map,\n  maybeApplyInterval,\n  maybeColorChannel,\n  maybeColumn,\n  maybeRangeInterval,\n  maybeTuple,\n  maybeValue,\n  mid,\n  valueof\n} from \"../options.js\";\nimport {maybeUtcInterval} from \"../time.js\";\nimport {basic} from \"./basic.js\";\nimport {\n  hasOutput,\n  maybeEvaluator,\n  maybeGroup,\n  maybeOutput,\n  maybeOutputs,\n  maybeReduce,\n  maybeSort,\n  maybeSubgroup,\n  reduceCount,\n  reduceFirst,\n  reduceIdentity\n} from \"./group.js\";\nimport {maybeInsetX, maybeInsetY} from \"./inset.js\";\n\n// Group on {z, fill, stroke}, then optionally on y, then bin x.\nexport function binX(outputs = {y: \"count\"}, options = {}) {\n  [outputs, options] = mergeOptions(outputs, options);\n  const {x, y} = options;\n  return binn(maybeBinValue(x, options, identity), null, null, y, outputs, maybeInsetX(options));\n}\n\n// Group on {z, fill, stroke}, then optionally on x, then bin y.\nexport function binY(outputs = {x: \"count\"}, options = {}) {\n  [outputs, options] = mergeOptions(outputs, options);\n  const {x, y} = options;\n  return binn(null, maybeBinValue(y, options, identity), x, null, outputs, maybeInsetY(options));\n}\n\n// Group on {z, fill, stroke}, then bin on x and y.\nexport function bin(outputs = {fill: \"count\"}, options = {}) {\n  [outputs, options] = mergeOptions(outputs, options);\n  const {x, y} = maybeBinValueTuple(options);\n  return binn(x, y, null, null, outputs, maybeInsetX(maybeInsetY(options)));\n}\n\nfunction maybeDenseInterval(bin, k, options = {}) {\n  return options?.interval == null\n    ? options\n    : bin({[k]: options?.reduce === undefined ? reduceFirst : options.reduce, filter: null}, options);\n}\n\nexport function maybeDenseIntervalX(options = {}) {\n  return maybeDenseInterval(binX, \"y\", withTip(options, \"x\"));\n}\n\nexport function maybeDenseIntervalY(options = {}) {\n  return maybeDenseInterval(binY, \"x\", withTip(options, \"y\"));\n}\n\nfunction binn(\n  bx, // optionally bin on x (exclusive with gx)\n  by, // optionally bin on y (exclusive with gy)\n  gx, // optionally group on x (exclusive with bx and gy)\n  gy, // optionally group on y (exclusive with by and gx)\n  {\n    data: reduceData = reduceIdentity, // TODO avoid materializing when unused?\n    filter = reduceCount, // return only non-empty bins by default\n    sort,\n    reverse,\n    ...outputs // output channel definitions\n  } = {},\n  inputs = {} // input channels and options\n) {\n  bx = maybeBin(bx);\n  by = maybeBin(by);\n\n  // Compute the outputs.\n  outputs = maybeBinOutputs(outputs, inputs);\n  reduceData = maybeBinReduce(reduceData, identity);\n  sort = sort == null ? undefined : maybeBinOutput(\"sort\", sort, inputs);\n  filter = filter == null ? undefined : maybeBinEvaluator(\"filter\", filter, inputs);\n\n  // Don\u2019t group on a channel if an output requires it as an input!\n  if (gx != null && hasOutput(outputs, \"x\", \"x1\", \"x2\")) gx = null;\n  if (gy != null && hasOutput(outputs, \"y\", \"y1\", \"y2\")) gy = null;\n\n  // Produce x1, x2, y1, and y2 output channels as appropriate (when binning).\n  const [BX1, setBX1] = maybeColumn(bx);\n  const [BX2, setBX2] = maybeColumn(bx);\n  const [BY1, setBY1] = maybeColumn(by);\n  const [BY2, setBY2] = maybeColumn(by);\n\n  // Produce x or y output channels as appropriate (when grouping).\n  const [k, gk] = gx != null ? [gx, \"x\"] : gy != null ? [gy, \"y\"] : [];\n  const [GK, setGK] = maybeColumn(k);\n\n  // Greedily materialize the z, fill, and stroke channels (if channels and not\n  // constants) so that we can reference them for subdividing groups without\n  // computing them more than once. We also want to consume options that should\n  // only apply to this transform rather than passing them through to the next.\n  const {\n    x,\n    y,\n    z,\n    fill,\n    stroke,\n    x1,\n    x2, // consumed if x is an output\n    y1,\n    y2, // consumed if y is an output\n    domain,\n    cumulative,\n    thresholds,\n    interval,\n    ...options\n  } = inputs;\n  const [GZ, setGZ] = maybeColumn(z);\n  const [vfill] = maybeColorChannel(fill);\n  const [vstroke] = maybeColorChannel(stroke);\n  const [GF, setGF] = maybeColumn(vfill);\n  const [GS, setGS] = maybeColumn(vstroke);\n\n  return {\n    ...(\"z\" in inputs && {z: GZ || z}),\n    ...(\"fill\" in inputs && {fill: GF || fill}),\n    ...(\"stroke\" in inputs && {stroke: GS || stroke}),\n    ...basic(options, (data, facets, plotOptions) => {\n      const K = maybeApplyInterval(valueof(data, k), plotOptions?.[gk]);\n      const Z = valueof(data, z);\n      const F = valueof(data, vfill);\n      const S = valueof(data, vstroke);\n      const G = maybeSubgroup(outputs, {z: Z, fill: F, stroke: S});\n      const groupFacets = [];\n      const groupData = [];\n      const GK = K && setGK([]);\n      const GZ = Z && setGZ([]);\n      const GF = F && setGF([]);\n      const GS = S && setGS([]);\n      const BX1 = bx && setBX1([]);\n      const BX2 = bx && setBX2([]);\n      const BY1 = by && setBY1([]);\n      const BY2 = by && setBY2([]);\n      const bin = bing(bx?.(data), by?.(data));\n      let i = 0;\n      for (const o of outputs) o.initialize(data);\n      if (sort) sort.initialize(data);\n      if (filter) filter.initialize(data);\n      for (const facet of facets) {\n        const groupFacet = [];\n        for (const o of outputs) o.scope(\"facet\", facet);\n        if (sort) sort.scope(\"facet\", facet);\n        if (filter) filter.scope(\"facet\", facet);\n        for (const [f, I] of maybeGroup(facet, G)) {\n          for (const [k, g] of maybeGroup(I, K)) {\n            for (const [b, extent] of bin(g)) {\n              if (filter && !filter.reduce(b, extent)) continue;\n              groupFacet.push(i++);\n              groupData.push(reduceData.reduceIndex(b, data, extent));\n              if (K) GK.push(k);\n              if (Z) GZ.push(G === Z ? f : Z[b[0]]);\n              if (F) GF.push(G === F ? f : F[b[0]]);\n              if (S) GS.push(G === S ? f : S[b[0]]);\n              if (BX1) BX1.push(extent.x1), BX2.push(extent.x2);\n              if (BY1) BY1.push(extent.y1), BY2.push(extent.y2);\n              for (const o of outputs) o.reduce(b, extent);\n              if (sort) sort.reduce(b);\n            }\n          }\n        }\n        groupFacets.push(groupFacet);\n      }\n      maybeSort(groupFacets, sort, reverse);\n      return {data: groupData, facets: groupFacets};\n    }),\n    ...(!hasOutput(outputs, \"x\") && (BX1 ? {x1: BX1, x2: BX2, x: mid(BX1, BX2)} : {x, x1, x2})),\n    ...(!hasOutput(outputs, \"y\") && (BY1 ? {y1: BY1, y2: BY2, y: mid(BY1, BY2)} : {y, y1, y2})),\n    ...(GK && {[gk]: GK}),\n    ...Object.fromEntries(outputs.map(({name, output}) => [name, output]))\n  };\n}\n\n// Allow bin options to be specified as part of outputs; merge them into options.\nfunction mergeOptions({cumulative, domain, thresholds, interval, ...outputs}, options) {\n  return [outputs, {cumulative, domain, thresholds, interval, ...options}];\n}\n\nfunction maybeBinValue(value, {cumulative, domain, thresholds, interval}, defaultValue) {\n  value = {...maybeValue(value)};\n  if (value.domain === undefined) value.domain = domain;\n  if (value.cumulative === undefined) value.cumulative = cumulative;\n  if (value.thresholds === undefined) value.thresholds = thresholds;\n  if (value.interval === undefined) value.interval = interval;\n  if (value.value === undefined) value.value = defaultValue;\n  value.thresholds = maybeThresholds(value.thresholds, value.interval);\n  return value;\n}\n\nfunction maybeBinValueTuple(options) {\n  let {x, y} = options;\n  x = maybeBinValue(x, options);\n  y = maybeBinValue(y, options);\n  [x.value, y.value] = maybeTuple(x.value, y.value);\n  return {x, y};\n}\n\nfunction maybeBin(options) {\n  if (options == null) return;\n  const {value, cumulative, domain = extent, thresholds} = options;\n  const bin = (data) => {\n    let V = valueof(data, value);\n    let T; // bin thresholds\n    if (isTemporal(V) || isTimeThresholds(thresholds)) {\n      V = map(V, coerceDate, Float64Array); // like coerceDates, but faster\n      let [min, max] = typeof domain === \"function\" ? domain(V) : domain;\n      let t = typeof thresholds === \"function\" && !isInterval(thresholds) ? thresholds(V, min, max) : thresholds;\n      if (typeof t === \"number\") t = utcTickInterval(min, max, t);\n      if (isInterval(t)) {\n        if (domain === extent) {\n          min = t.floor(min);\n          max = t.offset(t.floor(max));\n        }\n        t = t.range(min, t.offset(max));\n      }\n      T = t;\n    } else {\n      V = coerceNumbers(V);\n      let [min, max] = typeof domain === \"function\" ? domain(V) : domain;\n      let t = typeof thresholds === \"function\" && !isInterval(thresholds) ? thresholds(V, min, max) : thresholds;\n      if (typeof t === \"number\") {\n        // This differs from d3.ticks with regard to exclusive bounds: we want a\n        // first threshold less than or equal to the minimum, and a last\n        // threshold (strictly) greater than the maximum.\n        if (domain === extent) {\n          let step = tickIncrement(min, max, t);\n          if (isFinite(step)) {\n            if (step > 0) {\n              let r0 = Math.round(min / step);\n              let r1 = Math.round(max / step);\n              if (!(r0 * step <= min)) --r0;\n              if (!(r1 * step > max)) ++r1;\n              let n = r1 - r0 + 1;\n              t = new Float64Array(n);\n              for (let i = 0; i < n; ++i) t[i] = (r0 + i) * step;\n            } else if (step < 0) {\n              step = -step;\n              let r0 = Math.round(min * step);\n              let r1 = Math.round(max * step);\n              if (!(r0 / step <= min)) --r0;\n              if (!(r1 / step > max)) ++r1;\n              let n = r1 - r0 + 1;\n              t = new Float64Array(n);\n              for (let i = 0; i < n; ++i) t[i] = (r0 + i) / step;\n            } else {\n              t = [min];\n            }\n          } else {\n            t = [min];\n          }\n        } else {\n          t = ticks(min, max, t);\n        }\n      } else if (isInterval(t)) {\n        if (domain === extent) {\n          min = t.floor(min);\n          max = t.offset(t.floor(max));\n        }\n        t = t.range(min, t.offset(max));\n      }\n      T = t;\n    }\n    const E = [];\n    if (T.length === 1) E.push([T[0], T[0]]); // collapsed domain\n    else for (let i = 1; i < T.length; ++i) E.push([T[i - 1], T[i]]);\n    E.bin = (cumulative < 0 ? bin1cn : cumulative > 0 ? bin1cp : bin1)(E, T, V);\n    return E;\n  };\n  bin.label = labelof(value);\n  return bin;\n}\n\nexport function maybeThresholds(thresholds, interval, defaultThresholds = thresholdAuto) {\n  if (thresholds === undefined) {\n    return interval === undefined ? defaultThresholds : maybeRangeInterval(interval);\n  }\n  if (typeof thresholds === \"string\") {\n    switch (thresholds.toLowerCase()) {\n      case \"freedman-diaconis\":\n        return thresholdFreedmanDiaconis;\n      case \"scott\":\n        return thresholdScott;\n      case \"sturges\":\n        return thresholdSturges;\n      case \"auto\":\n        return thresholdAuto;\n    }\n    return maybeUtcInterval(thresholds);\n  }\n  return thresholds; // pass array, count, or function to bin.thresholds\n}\n\nfunction maybeBinOutputs(outputs, inputs) {\n  return maybeOutputs(outputs, inputs, maybeBinOutput);\n}\n\nfunction maybeBinOutput(name, reduce, inputs) {\n  return maybeOutput(name, reduce, inputs, maybeBinEvaluator);\n}\n\nfunction maybeBinEvaluator(name, reduce, inputs) {\n  return maybeEvaluator(name, reduce, inputs, maybeBinReduce);\n}\n\nfunction maybeBinReduce(reduce, value) {\n  return maybeReduce(reduce, value, maybeBinReduceFallback);\n}\n\nfunction maybeBinReduceFallback(reduce) {\n  switch (`${reduce}`.toLowerCase()) {\n    case \"x\":\n      return reduceX;\n    case \"x1\":\n      return reduceX1;\n    case \"x2\":\n      return reduceX2;\n    case \"y\":\n      return reduceY;\n    case \"y1\":\n      return reduceY1;\n    case \"y2\":\n      return reduceY2;\n  }\n  throw new Error(`invalid bin reduce: ${reduce}`);\n}\n\nfunction thresholdAuto(values, min, max) {\n  return Math.min(200, thresholdScott(values, min, max));\n}\n\nfunction isTimeThresholds(t) {\n  return isTimeInterval(t) || (isIterable(t) && isTemporal(t));\n}\n\nfunction isTimeInterval(t) {\n  return isInterval(t) && typeof t === \"function\" && t() instanceof Date;\n}\n\nfunction isInterval(t) {\n  return typeof t?.range === \"function\";\n}\n\nfunction bing(EX, EY) {\n  return EX && EY\n    ? function* (I) {\n        const X = EX.bin(I); // first bin on x\n        for (const [ix, [x1, x2]] of EX.entries()) {\n          const Y = EY.bin(X[ix]); // then bin on y\n          for (const [iy, [y1, y2]] of EY.entries()) {\n            yield [Y[iy], {x1, y1, x2, y2}];\n          }\n        }\n      }\n    : EX\n    ? function* (I) {\n        const X = EX.bin(I);\n        for (const [i, [x1, x2]] of EX.entries()) {\n          yield [X[i], {x1, x2}];\n        }\n      }\n    : function* (I) {\n        const Y = EY.bin(I);\n        for (const [i, [y1, y2]] of EY.entries()) {\n          yield [Y[i], {y1, y2}];\n        }\n      };\n}\n\n// non-cumulative distribution\nfunction bin1(E, T, V) {\n  T = coerceNumbers(T); // for faster bisection\n  return (I) => {\n    const B = E.map(() => []);\n    for (const i of I) B[bisect(T, V[i]) - 1]?.push(i); // TODO quantization?\n    return B;\n  };\n}\n\n// cumulative distribution\nfunction bin1cp(E, T, V) {\n  const bin = bin1(E, T, V);\n  return (I) => {\n    const B = bin(I);\n    for (let i = 1, n = B.length; i < n; ++i) {\n      const C = B[i - 1];\n      const b = B[i];\n      for (const j of C) b.push(j);\n    }\n    return B;\n  };\n}\n\n// complementary cumulative distribution\nfunction bin1cn(E, T, V) {\n  const bin = bin1(E, T, V);\n  return (I) => {\n    const B = bin(I);\n    for (let i = B.length - 2; i >= 0; --i) {\n      const C = B[i + 1];\n      const b = B[i];\n      for (const j of C) b.push(j);\n    }\n    return B;\n  };\n}\n\nfunction mid1(x1, x2) {\n  const m = (+x1 + +x2) / 2;\n  return x1 instanceof Date ? new Date(m) : m;\n}\n\nconst reduceX = {\n  reduceIndex(I, X, {x1, x2}) {\n    return mid1(x1, x2);\n  }\n};\n\nconst reduceY = {\n  reduceIndex(I, X, {y1, y2}) {\n    return mid1(y1, y2);\n  }\n};\n\nconst reduceX1 = {\n  reduceIndex(I, X, {x1}) {\n    return x1;\n  }\n};\n\nconst reduceX2 = {\n  reduceIndex(I, X, {x2}) {\n    return x2;\n  }\n};\n\nconst reduceY1 = {\n  reduceIndex(I, X, {y1}) {\n    return y1;\n  }\n};\n\nconst reduceY2 = {\n  reduceIndex(I, X, {y2}) {\n    return y2;\n  }\n};\n", "import {hasX, hasY, identity} from \"../options.js\";\n\nexport function maybeIdentityX(options = {}) {\n  return hasX(options) ? options : {...options, x: identity};\n}\n\nexport function maybeIdentityY(options = {}) {\n  return hasY(options) ? options : {...options, y: identity};\n}\n", "import {InternMap, cumsum, greatest, group, groupSort, max, min, rollup, sum} from \"d3\";\nimport {ascendingDefined, descendingDefined} from \"../defined.js\";\nimport {withTip} from \"../mark.js\";\nimport {maybeApplyInterval, maybeColumn, maybeZ, maybeZero} from \"../options.js\";\nimport {column, field, mid, one, range, valueof} from \"../options.js\";\nimport {basic} from \"./basic.js\";\n\nexport function stackX(stackOptions = {}, options = {}) {\n  if (arguments.length === 1) [stackOptions, options] = mergeOptions(stackOptions);\n  const {y1, y = y1, x, ...rest} = options; // note: consumes x!\n  const [transform, Y, x1, x2] = stack(y, x, \"y\", \"x\", stackOptions, rest);\n  return {...transform, y1, y: Y, x1, x2, x: mid(x1, x2)};\n}\n\nexport function stackX1(stackOptions = {}, options = {}) {\n  if (arguments.length === 1) [stackOptions, options] = mergeOptions(stackOptions);\n  const {y1, y = y1, x} = options;\n  const [transform, Y, X] = stack(y, x, \"y\", \"x\", stackOptions, options);\n  return {...transform, y1, y: Y, x: X};\n}\n\nexport function stackX2(stackOptions = {}, options = {}) {\n  if (arguments.length === 1) [stackOptions, options] = mergeOptions(stackOptions);\n  const {y1, y = y1, x} = options;\n  const [transform, Y, , X] = stack(y, x, \"y\", \"x\", stackOptions, options);\n  return {...transform, y1, y: Y, x: X};\n}\n\nexport function stackY(stackOptions = {}, options = {}) {\n  if (arguments.length === 1) [stackOptions, options] = mergeOptions(stackOptions);\n  const {x1, x = x1, y, ...rest} = options; // note: consumes y!\n  const [transform, X, y1, y2] = stack(x, y, \"x\", \"y\", stackOptions, rest);\n  return {...transform, x1, x: X, y1, y2, y: mid(y1, y2)};\n}\n\nexport function stackY1(stackOptions = {}, options = {}) {\n  if (arguments.length === 1) [stackOptions, options] = mergeOptions(stackOptions);\n  const {x1, x = x1, y} = options;\n  const [transform, X, Y] = stack(x, y, \"x\", \"y\", stackOptions, options);\n  return {...transform, x1, x: X, y: Y};\n}\n\nexport function stackY2(stackOptions = {}, options = {}) {\n  if (arguments.length === 1) [stackOptions, options] = mergeOptions(stackOptions);\n  const {x1, x = x1, y} = options;\n  const [transform, X, , Y] = stack(x, y, \"x\", \"y\", stackOptions, options);\n  return {...transform, x1, x: X, y: Y};\n}\n\nexport function maybeStackX({x, x1, x2, ...options} = {}) {\n  options = withTip(options, \"y\");\n  if (x1 === undefined && x2 === undefined) return stackX({x, ...options});\n  [x1, x2] = maybeZero(x, x1, x2);\n  return {...options, x1, x2};\n}\n\nexport function maybeStackY({y, y1, y2, ...options} = {}) {\n  options = withTip(options, \"x\");\n  if (y1 === undefined && y2 === undefined) return stackY({y, ...options});\n  [y1, y2] = maybeZero(y, y1, y2);\n  return {...options, y1, y2};\n}\n\n// The reverse option is ambiguous: it is both a stack option and a basic\n// transform. If only one options object is specified, we interpret it as a\n// stack option, and therefore must remove it from the propagated options.\nfunction mergeOptions(options) {\n  const {offset, order, reverse, ...rest} = options;\n  return [{offset, order, reverse}, rest];\n}\n\n// This is a hint to the tooltip mark that the y1 and y2 channels (for stackY,\n// or conversely x1 and x2 for stackX) represent a stacked length, and that the\n// tooltip should therefore show y2-y1 instead of an extent.\nconst lengthy = {length: true};\n\nfunction stack(x, y = one, kx, ky, {offset, order, reverse}, options) {\n  const z = maybeZ(options);\n  const [X, setX] = maybeColumn(x);\n  const [Y1, setY1] = column(y);\n  const [Y2, setY2] = column(y);\n  Y1.hint = Y2.hint = lengthy;\n  offset = maybeOffset(offset);\n  order = maybeOrder(order, offset, ky);\n  return [\n    basic(options, (data, facets, plotOptions) => {\n      const X = x == null ? undefined : setX(maybeApplyInterval(valueof(data, x), plotOptions?.[kx]));\n      const Y = valueof(data, y, Float64Array);\n      const Z = valueof(data, z);\n      const compare = order && order(data, X, Y, Z);\n      const n = data.length;\n      const Y1 = setY1(new Float64Array(n));\n      const Y2 = setY2(new Float64Array(n));\n      const facetstacks = [];\n      for (const facet of facets) {\n        const stacks = X ? Array.from(group(facet, (i) => X[i]).values()) : [facet];\n        if (compare) for (const stack of stacks) stack.sort(compare);\n        for (const stack of stacks) {\n          let yn = 0;\n          let yp = 0;\n          if (reverse) stack.reverse();\n          for (const i of stack) {\n            const y = Y[i];\n            if (y < 0) yn = Y2[i] = (Y1[i] = yn) + y;\n            else if (y > 0) yp = Y2[i] = (Y1[i] = yp) + y;\n            else Y2[i] = Y1[i] = yp; // NaN or zero\n          }\n        }\n        facetstacks.push(stacks);\n      }\n      if (offset) offset(facetstacks, Y1, Y2, Z);\n      return {data, facets};\n    }),\n    X,\n    Y1,\n    Y2\n  ];\n}\n\nfunction maybeOffset(offset) {\n  if (offset == null) return;\n  if (typeof offset === \"function\") return offset;\n  switch (`${offset}`.toLowerCase()) {\n    case \"expand\":\n    case \"normalize\":\n      return offsetExpand;\n    case \"center\":\n    case \"silhouette\":\n      return offsetCenter;\n    case \"wiggle\":\n      return offsetWiggle;\n  }\n  throw new Error(`unknown offset: ${offset}`);\n}\n\n// Given a single stack, returns the minimum and maximum values from the given\n// Y2 column. Note that this relies on Y2 always being the outer column for\n// diverging values.\nfunction extent(stack, Y2) {\n  let min = 0,\n    max = 0;\n  for (const i of stack) {\n    const y = Y2[i];\n    if (y < min) min = y;\n    if (y > max) max = y;\n  }\n  return [min, max];\n}\n\nfunction offsetExpand(facetstacks, Y1, Y2) {\n  for (const stacks of facetstacks) {\n    for (const stack of stacks) {\n      const [yn, yp] = extent(stack, Y2);\n      for (const i of stack) {\n        const m = 1 / (yp - yn || 1);\n        Y1[i] = m * (Y1[i] - yn);\n        Y2[i] = m * (Y2[i] - yn);\n      }\n    }\n  }\n}\n\nfunction offsetCenter(facetstacks, Y1, Y2) {\n  for (const stacks of facetstacks) {\n    for (const stack of stacks) {\n      const [yn, yp] = extent(stack, Y2);\n      for (const i of stack) {\n        const m = (yp + yn) / 2;\n        Y1[i] -= m;\n        Y2[i] -= m;\n      }\n    }\n    offsetZero(stacks, Y1, Y2);\n  }\n  offsetCenterFacets(facetstacks, Y1, Y2);\n}\n\nfunction offsetWiggle(facetstacks, Y1, Y2, Z) {\n  for (const stacks of facetstacks) {\n    const prev = new InternMap();\n    let y = 0;\n    for (const stack of stacks) {\n      let j = -1;\n      const Fi = stack.map((i) => Math.abs(Y2[i] - Y1[i]));\n      const Df = stack.map((i) => {\n        j = Z ? Z[i] : ++j;\n        const value = Y2[i] - Y1[i];\n        const diff = prev.has(j) ? value - prev.get(j) : 0;\n        prev.set(j, value);\n        return diff;\n      });\n      const Cf1 = [0, ...cumsum(Df)];\n      for (const i of stack) {\n        Y1[i] += y;\n        Y2[i] += y;\n      }\n      const s1 = sum(Fi);\n      if (s1) y -= sum(Fi, (d, i) => (Df[i] / 2 + Cf1[i]) * d) / s1;\n    }\n    offsetZero(stacks, Y1, Y2);\n  }\n  offsetCenterFacets(facetstacks, Y1, Y2);\n}\n\nfunction offsetZero(stacks, Y1, Y2) {\n  const m = min(stacks, (stack) => min(stack, (i) => Y1[i]));\n  for (const stack of stacks) {\n    for (const i of stack) {\n      Y1[i] -= m;\n      Y2[i] -= m;\n    }\n  }\n}\n\nfunction offsetCenterFacets(facetstacks, Y1, Y2) {\n  const n = facetstacks.length;\n  if (n === 1) return;\n  const facets = facetstacks.map((stacks) => stacks.flat());\n  const m = facets.map((I) => (min(I, (i) => Y1[i]) + max(I, (i) => Y2[i])) / 2);\n  const m0 = min(m);\n  for (let j = 0; j < n; j++) {\n    const p = m0 - m[j];\n    for (const i of facets[j]) {\n      Y1[i] += p;\n      Y2[i] += p;\n    }\n  }\n}\n\nfunction maybeOrder(order, offset, ky) {\n  if (order === undefined && offset === offsetWiggle) return orderInsideOut(ascendingDefined);\n  if (order == null) return;\n  if (typeof order === \"string\") {\n    const negate = order.startsWith(\"-\");\n    const compare = negate ? descendingDefined : ascendingDefined;\n    switch ((negate ? order.slice(1) : order).toLowerCase()) {\n      case \"value\":\n      case ky:\n        return orderY(compare);\n      case \"z\":\n        return orderZ(compare);\n      case \"sum\":\n        return orderSum(compare);\n      case \"appearance\":\n        return orderAppearance(compare);\n      case \"inside-out\":\n        return orderInsideOut(compare);\n    }\n    return orderAccessor(field(order));\n  }\n  if (typeof order === \"function\") return (order.length === 1 ? orderAccessor : orderComparator)(order);\n  if (Array.isArray(order)) return orderGiven(order);\n  throw new Error(`invalid order: ${order}`);\n}\n\n// by value\nfunction orderY(compare) {\n  return (data, X, Y) => (i, j) => compare(Y[i], Y[j]);\n}\n\n// by location\nfunction orderZ(compare) {\n  return (data, X, Y, Z) => (i, j) => compare(Z[i], Z[j]);\n}\n\n// by sum of value (a.k.a. \u201Cascending\u201D)\nfunction orderSum(compare) {\n  return orderZDomain(compare, (data, X, Y, Z) =>\n    groupSort(\n      range(data),\n      (I) => sum(I, (i) => Y[i]),\n      (i) => Z[i]\n    )\n  );\n}\n\n// by x = argmax of value\nfunction orderAppearance(compare) {\n  return orderZDomain(compare, (data, X, Y, Z) =>\n    groupSort(\n      range(data),\n      (I) => X[greatest(I, (i) => Y[i])],\n      (i) => Z[i]\n    )\n  );\n}\n\n// by x = argmax of value, but rearranged inside-out by alternating series\n// according to the sign of a running divergence of sums\nfunction orderInsideOut(compare) {\n  return orderZDomain(compare, (data, X, Y, Z) => {\n    const I = range(data);\n    const K = groupSort(\n      I,\n      (I) => X[greatest(I, (i) => Y[i])],\n      (i) => Z[i]\n    );\n    const sums = rollup(\n      I,\n      (I) => sum(I, (i) => Y[i]),\n      (i) => Z[i]\n    );\n    const Kp = [],\n      Kn = [];\n    let s = 0;\n    for (const k of K) {\n      if (s < 0) {\n        s += sums.get(k);\n        Kp.push(k);\n      } else {\n        s -= sums.get(k);\n        Kn.push(k);\n      }\n    }\n    return Kn.reverse().concat(Kp);\n  });\n}\n\nfunction orderAccessor(f) {\n  return (data) => {\n    const O = valueof(data, f);\n    return (i, j) => ascendingDefined(O[i], O[j]);\n  };\n}\n\nfunction orderComparator(f) {\n  return (data) => (i, j) => f(data[i], data[j]);\n}\n\nfunction orderGiven(domain) {\n  return orderZDomain(ascendingDefined, () => domain);\n}\n\n// Given an ordering (domain) of distinct values in z that can be derived from\n// the data, returns a comparator that can be used to sort stacks. Note that\n// this is a series order: it will be consistent across stacks.\nfunction orderZDomain(compare, domain) {\n  return (data, X, Y, Z) => {\n    if (!Z) throw new Error(\"missing channel: z\");\n    const map = new InternMap(domain(data, X, Y, Z).map((d, i) => [d, i]));\n    return (i, j) => compare(map.get(Z[i]), map.get(Z[j]));\n  };\n}\n", "import {create} from \"../context.js\";\nimport {Mark} from \"../mark.js\";\nimport {hasXY, identity, indexOf, number} from \"../options.js\";\nimport {isCollapsed} from \"../scales.js\";\nimport {applyAttr, applyChannelStyles, applyDirectStyles, applyIndirectStyles, applyTransform} from \"../style.js\";\nimport {impliedString} from \"../style.js\";\nimport {maybeIdentityX, maybeIdentityY} from \"../transforms/identity.js\";\nimport {maybeIntervalX, maybeIntervalY} from \"../transforms/interval.js\";\nimport {maybeStackX, maybeStackY} from \"../transforms/stack.js\";\n\nexport class AbstractBar extends Mark {\n  constructor(data, channels, options = {}, defaults) {\n    super(data, channels, options, defaults);\n    const {inset = 0, insetTop = inset, insetRight = inset, insetBottom = inset, insetLeft = inset, rx, ry} = options;\n    this.insetTop = number(insetTop);\n    this.insetRight = number(insetRight);\n    this.insetBottom = number(insetBottom);\n    this.insetLeft = number(insetLeft);\n    this.rx = impliedString(rx, \"auto\"); // number or percentage\n    this.ry = impliedString(ry, \"auto\");\n  }\n  render(index, scales, channels, dimensions, context) {\n    const {rx, ry} = this;\n    return create(\"svg:g\", context)\n      .call(applyIndirectStyles, this, dimensions, context)\n      .call(this._transform, this, scales)\n      .call((g) =>\n        g\n          .selectAll()\n          .data(index)\n          .enter()\n          .append(\"rect\")\n          .call(applyDirectStyles, this)\n          .attr(\"x\", this._x(scales, channels, dimensions))\n          .attr(\"width\", this._width(scales, channels, dimensions))\n          .attr(\"y\", this._y(scales, channels, dimensions))\n          .attr(\"height\", this._height(scales, channels, dimensions))\n          .call(applyAttr, \"rx\", rx)\n          .call(applyAttr, \"ry\", ry)\n          .call(applyChannelStyles, this, channels)\n      )\n      .node();\n  }\n  _x(scales, {x: X}, {marginLeft}) {\n    const {insetLeft} = this;\n    return X ? (i) => X[i] + insetLeft : marginLeft + insetLeft;\n  }\n  _y(scales, {y: Y}, {marginTop}) {\n    const {insetTop} = this;\n    return Y ? (i) => Y[i] + insetTop : marginTop + insetTop;\n  }\n  _width({x}, {x: X}, {marginRight, marginLeft, width}) {\n    const {insetLeft, insetRight} = this;\n    const bandwidth = X && x ? x.bandwidth() : width - marginRight - marginLeft;\n    return Math.max(0, bandwidth - insetLeft - insetRight);\n  }\n  _height({y}, {y: Y}, {marginTop, marginBottom, height}) {\n    const {insetTop, insetBottom} = this;\n    const bandwidth = Y && y ? y.bandwidth() : height - marginTop - marginBottom;\n    return Math.max(0, bandwidth - insetTop - insetBottom);\n  }\n}\n\nconst defaults = {\n  ariaLabel: \"bar\"\n};\n\nexport class BarX extends AbstractBar {\n  constructor(data, options = {}) {\n    const {x1, x2, y} = options;\n    super(\n      data,\n      {\n        x1: {value: x1, scale: \"x\"},\n        x2: {value: x2, scale: \"x\"},\n        y: {value: y, scale: \"y\", type: \"band\", optional: true}\n      },\n      options,\n      defaults\n    );\n  }\n  _transform(selection, mark, {x}) {\n    selection.call(applyTransform, mark, {x}, 0, 0);\n  }\n  _x({x}, {x1: X1, x2: X2}, {marginLeft}) {\n    const {insetLeft} = this;\n    return isCollapsed(x) ? marginLeft + insetLeft : (i) => Math.min(X1[i], X2[i]) + insetLeft;\n  }\n  _width({x}, {x1: X1, x2: X2}, {marginRight, marginLeft, width}) {\n    const {insetLeft, insetRight} = this;\n    return isCollapsed(x)\n      ? width - marginRight - marginLeft - insetLeft - insetRight\n      : (i) => Math.max(0, Math.abs(X2[i] - X1[i]) - insetLeft - insetRight);\n  }\n}\n\nexport class BarY extends AbstractBar {\n  constructor(data, options = {}) {\n    const {x, y1, y2} = options;\n    super(\n      data,\n      {\n        y1: {value: y1, scale: \"y\"},\n        y2: {value: y2, scale: \"y\"},\n        x: {value: x, scale: \"x\", type: \"band\", optional: true}\n      },\n      options,\n      defaults\n    );\n  }\n  _transform(selection, mark, {y}) {\n    selection.call(applyTransform, mark, {y}, 0, 0);\n  }\n  _y({y}, {y1: Y1, y2: Y2}, {marginTop}) {\n    const {insetTop} = this;\n    return isCollapsed(y) ? marginTop + insetTop : (i) => Math.min(Y1[i], Y2[i]) + insetTop;\n  }\n  _height({y}, {y1: Y1, y2: Y2}, {marginTop, marginBottom, height}) {\n    const {insetTop, insetBottom} = this;\n    return isCollapsed(y)\n      ? height - marginTop - marginBottom - insetTop - insetBottom\n      : (i) => Math.max(0, Math.abs(Y2[i] - Y1[i]) - insetTop - insetBottom);\n  }\n}\n\nexport function barX(data, options = {}) {\n  if (!hasXY(options)) options = {...options, y: indexOf, x2: identity};\n  return new BarX(data, maybeStackX(maybeIntervalX(maybeIdentityX(options))));\n}\n\nexport function barY(data, options = {}) {\n  if (!hasXY(options)) options = {...options, x: indexOf, y2: identity};\n  return new BarY(data, maybeStackY(maybeIntervalY(maybeIdentityY(options))));\n}\n", "/**\n * @license\n * Copyright 2023 The Go Authors. All rights reserved.\n * Use of this source code is governed by a BSD-style\n * license that can be found in the LICENSE file.\n */\n\ninterface Page {\n  Charts: ChartData | null;\n}\n\ninterface ChartData {\n  Programs: Program[] | null;\n}\n\ninterface Program {\n  ID: string;\n  Name: string;\n  Charts: Chart[] | null;\n}\n\ninterface Chart {\n  ID: string;\n  Name: string;\n  Type: string;\n  Data: Datum[] | null;\n}\n\ninterface Datum {\n  Key: string;\n  Value: number;\n}\n\ndeclare const Page: Page;\n\nimport * as d3 from \"d3\";\nimport * as Plot from \"@observablehq/plot\";\n\nfor (const program of Page.Charts?.Programs || []) {\n  for (const counter of program?.Charts || []) {\n    switch (counter.Type) {\n      case \"partition\":\n        document\n          .querySelector(`[data-chart-id=\"${counter.ID}\"]`)\n          ?.append(partition(counter));\n\n        break;\n      case \"histogram\":\n        document\n          .querySelector(`[data-chart-id=\"${counter.ID}\"]`)\n          ?.append(histogram(counter));\n\n        break;\n      default:\n        console.error(\"unknown chart type\");\n        break;\n    }\n  }\n}\n\nfunction partition({ Data, Name }: Chart) {\n  Data ??= [];\n\n  const max = Data.map((d) => d.Value).reduce((a, b) => Math.max(a, b), 0);\n\n  return Plot.plot({\n    color: {\n      type: \"ordinal\",\n      scheme: \"Spectral\",\n    },\n    nice: true,\n    x: {\n      label: Name,\n      labelOffset: Number.MAX_SAFE_INTEGER,\n      tickRotate: 45,\n      domain: Data.map((d) => d.Key),\n    },\n    y: {\n      label: \"Count\",\n      domain: [0, max + 1], // adjust domain to prevent rendering issues, especially with all-zero data.\n    },\n    width: 1024,\n    style: \"overflow:visible;background:transparent;margin-bottom:3rem;\",\n    marks: [\n      Plot.barY(Data, {\n        tip: true,\n        fill: (d) => (isNaN(Number(d.Key)) ? d.Key : Number(d.Key)),\n        x: (d) => d.Key,\n        y: (d) => d.Value,\n      }),\n      Plot.frame(),\n    ],\n  });\n}\n\nfunction histogram({ Data }: Chart) {\n  Data ??= [];\n  const n = 3; // number of facet columns\n  const fixKey = (k: string) => (isNaN(Number(k)) ? k : Number(k));\n  const keys = Array.from(d3.union(Data.map((d) => fixKey(d.Key))));\n  const index = new Map(keys.map((key, i) => [key, i]));\n  const fx = (key: string | number) => (index.get(key) ?? 0) % n;\n  const fy = (key: string | number) => Math.floor((index.get(key) ?? 0) / n);\n\n  return Plot.plot({\n    marginLeft: 60,\n    width: 1024,\n    grid: true,\n    nice: true,\n    x: {\n      label: \"Distribution\",\n    },\n    color: {\n      type: \"ordinal\",\n      legend: true,\n      scheme: \"Spectral\",\n      label: \"Counter\",\n    },\n    y: {\n      insetTop: 16,\n      domain: [0, 1],\n    },\n    fx: {\n      ticks: [],\n    },\n    fy: {\n      ticks: [],\n    },\n    style: \"background:transparent;\",\n    marks: [\n      Plot.barY(\n        Data,\n        Plot.binX(\n          { y: \"proportion-facet\", x: \"x1\", interval: 0.1, cumulative: 1 },\n          {\n            tip: true,\n            fill: (d: Datum) => fixKey(d.Key),\n            x: (d: Datum) => d.Value,\n            fx: (d: Datum) => fx(fixKey(d.Key)),\n            fy: (d: Datum) => fy(fixKey(d.Key)),\n          }\n        )\n      ),\n      Plot.text(keys, {\n        frameAnchor: \"top\",\n        dy: 3,\n        fx,\n        fy,\n      }),\n      Plot.axisX({ anchor: \"bottom\", tickSpacing: 35 }),\n      Plot.axisX({ anchor: \"top\", tickSpacing: 35 }),\n      Plot.frame(),\n    ],\n  });\n}\n\nexport {};\n"],
-  "mappings": ";mBAAe,SAARA,GAA2BC,EAAGC,EAAG,CACtC,OAAOD,GAAK,MAAQC,GAAK,KAAO,IAAMD,EAAIC,EAAI,GAAKD,EAAIC,EAAI,EAAID,GAAKC,EAAI,EAAI,GAC9E,CCFe,SAARC,GAA4BC,EAAGC,EAAG,CACvC,OAAOD,GAAK,MAAQC,GAAK,KAAO,IAC5BA,EAAID,EAAI,GACRC,EAAID,EAAI,EACRC,GAAKD,EAAI,EACT,GACN,CCHe,SAARE,GAA0BC,EAAG,CAClC,IAAIC,EAAUC,EAAUC,EAOpBH,EAAE,SAAW,GACfC,EAAWG,GACXF,EAAW,CAACG,EAAGC,IAAMF,GAAUJ,EAAEK,CAAC,EAAGC,CAAC,EACtCH,EAAQ,CAACE,EAAGC,IAAMN,EAAEK,CAAC,EAAIC,IAEzBL,EAAWD,IAAMI,IAAaJ,IAAMO,GAAaP,EAAIQ,GACrDN,EAAWF,EACXG,EAAQH,GAGV,SAASS,EAAKC,EAAGJ,EAAGK,EAAK,EAAGC,EAAKF,EAAE,OAAQ,CACzC,GAAIC,EAAKC,EAAI,CACX,GAAIX,EAASK,EAAGA,CAAC,IAAM,EAAG,OAAOM,EACjC,EAAG,CACD,IAAMC,EAAOF,EAAKC,IAAQ,EACtBV,EAASQ,EAAEG,C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EACA,MAAO,0BACP,MAAO,CACAC,GACHP,EACKmB,GACH,CAAE,EAAG,mBAAoB,EAAG,KAAM,SAAU,GAAK,WAAY,CAAE,EAC/D,CACE,IAAK,GACL,KAAOhB,GAAaO,EAAOP,EAAE,GAAG,EAChC,EAAIA,GAAaA,EAAE,MACnB,GAAKA,GAAac,EAAGP,EAAOP,EAAE,GAAG,CAAC,EAClC,GAAKA,GAAae,EAAGR,EAAOP,EAAE,GAAG,CAAC,CACpC,CACF,CACF,EACKiB,GAAKR,EAAM,CACd,YAAa,MACb,GAAI,EACJ,GAAAK,EACA,GAAAC,CACF,CAAC,EACIG,GAAM,CAAE,OAAQ,SAAU,YAAa,EAAG,CAAC,EAC3CA,GAAM,CAAE,OAAQ,MAAO,YAAa,EAAG,CAAC,EACxCb,GAAM,CACb,CACF,CAAC,CACH",
-  "names": ["ascending", "a", "b", "descending", "a", "b", "bisector", "f", "compare1", "compare2", "delta", "ascending", "d", "x", "descending", "zero", "left", "a", "lo", "hi", "mid", "right", "center", "i", "number", "x", "numbers", "values", "valueof", "value", "index", "ascendingBisect", "bisector", "ascending", "bisectRight", "bisectLeft", "bisectCenter", "number", "bisect_default", "count", "values", "valueof", "value", "index", "length", "array", "empty", "arrayify", "values", "reducer", "reduce", "cross", "lengths", "j", "index", "product", "i", "cumsum", "values", "valueof", "sum", "index", "v", "variance", "values", "valueof", "count", "delta", "mean", "sum", "value", "index", "deviation", "values", "valueof", "v", "variance", "extent", "values", "valueof", "min", "max", "value", "index", "Adder", "x", "p", "i", "j", "y", "hi", "lo", "InternMap", "entries", "key", "keyof", "value", "intern_get", "intern_set", "intern_delete", "InternSet", "values", "_intern", "_key", "identity", "x", "group", "values", "keys", "nest", "identity", "rollup", "values", "reduce", "keys", "nest", "identity", "rollups", "nest", "values", "map", "reduce", "keys", "regroup", "i", "groups", "InternMap", "keyof", "index", "value", "key", "group", "permute", "source", "keys", "key", "sort", "values", "F", "f", "index", "d", "i", "j", "c", "ascendingDefined", "permute", "compareDefined", "compare", "ascending", "a", "b", "x", "groupSort", "values", "reduce", "key", "sort", "rollup", "ak", "av", "bk", "bv", "ascending", "group", "e10", "e5", "e2", "tickSpec", "start", "stop", "count", "step", "power", "error", "factor", "i1", "i2", "inc", "ticks", "reverse", "n", "i", "tickIncrement", "tickStep", "thresholdSturges", "values", "count", "max", "values", "valueof", "value", "index", "maxIndex", "values", "valueof", "max", "index", "value", "min", "values", "valueof", "value", "index", "minIndex", "values", "valueof", "min", "index", "value", "quickselect", "array", "k", "left", "right", "compare", "ascendingDefined", "compareDefined", "n", "m", "z", "s", "sd", "newLeft", "newRight", "t", "i", "j", "swap", "greatest", "values", "compare", "ascending", "max", "defined", "maxValue", "element", "value", "quantile", "values", "p", "valueof", "numbers", "n", "min", "max", "i", "i0", "value0", "quickselect", "value1", "quantileSorted", "number", "thresholdFreedmanDiaconis", "values", "min", "max", "c", "count", "d", "quantile", "thresholdScott", "values", "min", "max", "c", "count", "d", "deviation", "mean", "values", "valueof", "count", "sum", "value", "index", "median", "values", "valueof", "quantile", "flatten", "arrays", "array", "merge", "mode", "values", "valueof", "counts", "InternMap", "value", "index", "modeValue", "modeCount", "count", "pairs", "values", "pairof", "pair", "previous", "first", "value", "a", "b", "range", "start", "stop", "step", "n", "i", "sum", "values", "valueof", "value", "index", "reverse", "values", "union", "others", "set", "InternSet", "other", "o", "identity_default", "x", "top", "right", "bottom", "left", "epsilon", "translateX", "x", "translateY", "y", "number", "scale", "d", "center", "offset", "entering", "axis", "orient", "tickArguments", "tickValues", "tickFormat", "tickSizeInner", "tickSizeOuter", "tickPadding", "k", "transform", "context", "values", "format", "identity_default", "spacing", "range", "range0", "range1", "position", "selection", "path", "tick", "tickExit", "tickEnter", "line", "text", "p", "_", "axisBottom", "scale", "axis", "bottom", "noop", "dispatch", "i", "n", "_", "t", "Dispatch", "parseTypenames", "typenames", "types", "name", "typename", "callback", "T", "get", "set", "copy", "type", "that", "args", "c", "dispatch_default", "xhtml", "namespaces_default", "namespace_default", "name", "prefix", "i", "namespaces_default", "creatorInherit", "name", "document", "uri", "xhtml", "creatorFixed", "fullname", "creator_default", "namespace_default", "none", "selector_default", "selector", "select_default", "select", "selector_default", "groups", "m", "subgroups", "j", "group", "n", "subgroup", "node", "subnode", "i", "Selection", "array", "x", "empty", "selectorAll_default", "selector", "arrayAll", "select", "array", "selectAll_default", "selectorAll_default", "groups", "m", "subgroups", "parents", "j", "group", "n", "node", "i", "Selection", "matcher_default", "selector", "childMatcher", "node", "find", "childFind", "match", "childFirst", "selectChild_default", "childMatcher", "filter", "children", "childrenFilter", "match", "selectChildren_default", "childMatcher", "filter_default", "match", "matcher_default", "groups", "m", "subgroups", "j", "group", "n", "subgroup", "node", "i", "Selection", "sparse_default", "update", "enter_default", "Selection", "sparse_default", "EnterNode", "parent", "datum", "child", "next", "selector", "constant_default", "x", "bindIndex", "parent", "group", "enter", "update", "exit", "data", "i", "node", "groupLength", "dataLength", "EnterNode", "bindKey", "key", "nodeByKeyValue", "keyValues", "keyValue", "datum", "data_default", "value", "bind", "parents", "groups", "constant_default", "m", "j", "arraylike", "enterGroup", "updateGroup", "exitGroup", "i0", "i1", "previous", "next", "Selection", "exit_default", "Selection", "sparse_default", "join_default", "onenter", "onupdate", "onexit", "enter", "update", "exit", "merge_default", "context", "selection", "groups0", "groups1", "m0", "m1", "m", "merges", "j", "group0", "group1", "n", "merge", "node", "i", "Selection", "order_default", "groups", "j", "m", "group", "i", "next", "node", "sort_default", "compare", "ascending", "compareNode", "a", "b", "groups", "m", "sortgroups", "j", "group", "n", "sortgroup", "node", "i", "Selection", "call_default", "callback", "nodes_default", "node_default", "groups", "j", "m", "group", "i", "n", "node", "size_default", "size", "node", "empty_default", "each_default", "callback", "groups", "j", "m", "group", "n", "node", "attrRemove", "name", "attrRemoveNS", "fullname", "attrConstant", "value", "attrConstantNS", "attrFunction", "v", "attrFunctionNS", "attr_default", "namespace_default", "node", "window_default", "node", "styleRemove", "name", "styleConstant", "value", "priority", "styleFunction", "v", "style_default", "styleValue", "node", "window_default", "propertyRemove", "name", "propertyConstant", "value", "propertyFunction", "v", "property_default", "classArray", "string", "classList", "node", "ClassList", "name", "i", "classedAdd", "names", "list", "n", "classedRemove", "classedTrue", "classedFalse", "classedFunction", "value", "classed_default", "textRemove", "textConstant", "value", "textFunction", "v", "text_default", "htmlRemove", "htmlConstant", "value", "htmlFunction", "v", "html_default", "raise", "raise_default", "lower", "lower_default", "append_default", "name", "create", "creator_default", "constantNull", "insert_default", "name", "before", "create", "creator_default", "select", "selector_default", "remove", "parent", "remove_default", "selection_cloneShallow", "clone", "parent", "selection_cloneDeep", "clone_default", "deep", "datum_default", "value", "contextListener", "listener", "event", "parseTypenames", "typenames", "t", "name", "i", "onRemove", "typename", "on", "j", "m", "o", "onAdd", "value", "options", "on_default", "n", "dispatchEvent", "node", "type", "params", "window", "window_default", "event", "dispatchConstant", "dispatchFunction", "dispatch_default", "iterator_default", "groups", "j", "m", "group", "i", "n", "node", "root", "Selection", "groups", "parents", "selection", "selection_selection", "select_default", "selectAll_default", "selectChild_default", "selectChildren_default", "filter_default", "data_default", "enter_default", "exit_default", "join_default", "merge_default", "order_default", "sort_default", "call_default", "nodes_default", "node_default", "size_default", "empty_default", "each_default", "attr_default", "style_default", "property_default", "classed_default", "text_default", "html_default", "raise_default", "lower_default", "append_default", "insert_default", "remove_default", "clone_default", "datum_default", "on_default", "dispatch_default", "iterator_default", "selection_default", "select_default", "selector", "Selection", "root", "sourceEvent_default", "event", "sourceEvent", "pointer_default", "event", "node", "sourceEvent_default", "svg", "point", "rect", "define_default", "constructor", "factory", "prototype", "extend", "parent", "definition", "key", "Color", "darker", "brighter", "reI", "reN", "reP", "reHex", "reRgbInteger", "reRgbPercent", "reRgbaInteger", "reRgbaPercent", "reHslPercent", "reHslaPercent", "named", "define_default", "color", "channels", "color_formatHex", "color_formatHex8", "color_formatHsl", "color_formatRgb", "hslConvert", "format", "m", "l", "rgbn", "Rgb", "rgba", "hsla", "n", "r", "g", "b", "a", "rgbConvert", "o", "rgb", "opacity", "extend", "k", "clampi", "clampa", "rgb_formatHex", "rgb_formatHex8", "rgb_formatRgb", "hex", "value", "h", "s", "Hsl", "min", "max", "hsl", "m2", "m1", "hsl2rgb", "clamph", "clampt", "radians", "degrees", "K", "Xn", "Yn", "Zn", "t0", "t1", "t2", "t3", "labConvert", "o", "Lab", "Hcl", "hcl2lab", "Rgb", "rgbConvert", "r", "rgb2lrgb", "g", "b", "y", "xyz2lab", "x", "z", "lab", "l", "a", "b", "opacity", "labConvert", "Lab", "define_default", "extend", "Color", "k", "K", "y", "x", "z", "Xn", "lab2xyz", "Yn", "Zn", "Rgb", "lrgb2rgb", "xyz2lab", "t3", "t2", "t0", "t1", "rgb2lrgb", "hclConvert", "o", "Hcl", "h", "degrees", "hcl", "h", "c", "l", "opacity", "hclConvert", "Hcl", "hcl2lab", "o", "Lab", "radians", "define_default", "extend", "Color", "k", "K", "A", "B", "C", "D", "E", "ED", "EB", "BC_DA", "cubehelixConvert", "o", "Cubehelix", "Rgb", "rgbConvert", "r", "g", "b", "l", "bl", "k", "s", "h", "degrees", "cubehelix", "opacity", "define_default", "extend", "Color", "brighter", "darker", "radians", "a", "cosh", "sinh", "basis", "t1", "v0", "v1", "v2", "v3", "t2", "t3", "basis_default", "values", "n", "t", "i", "basisClosed_default", "values", "n", "t", "i", "v0", "v1", "v2", "v3", "basis", "constant_default", "x", "linear", "a", "d", "t", "exponential", "b", "y", "hue", "constant_default", "gamma", "nogamma", "rgb_default", "rgbGamma", "y", "color", "gamma", "rgb", "start", "end", "r", "g", "b", "opacity", "nogamma", "t", "rgbSpline", "spline", "colors", "i", "rgbBasis", "basis_default", "rgbBasisClosed", "basisClosed_default", "numberArray_default", "a", "b", "c", "i", "t", "isNumberArray", "x", "genericArray", "a", "b", "nb", "na", "x", "c", "i", "value_default", "t", "date_default", "a", "b", "d", "t", "number_default", "a", "b", "t", "object_default", "a", "b", "i", "c", "k", "value_default", "t", "reA", "reB", "zero", "b", "one", "t", "string_default", "a", "bi", "am", "bm", "bs", "i", "s", "q", "number_default", "o", "value_default", "a", "b", "t", "c", "constant_default", "number_default", "color", "rgb_default", "string_default", "date_default", "isNumberArray", "numberArray_default", "genericArray", "object_default", "round_default", "a", "b", "t", "degrees", "identity", "decompose_default", "a", "b", "c", "d", "e", "f", "scaleX", "scaleY", "skewX", "svgNode", "parseCss", "value", "m", "identity", "decompose_default", "parseSvg", "interpolateTransform", "parse", "pxComma", "pxParen", "degParen", "pop", "s", "translate", "xa", "ya", "xb", "yb", "q", "i", "number_default", "rotate", "a", "b", "skewX", "scale", "t", "n", "o", "interpolateTransformCss", "parseCss", "interpolateTransformSvg", "parseSvg", "hsl", "hue", "start", "end", "h", "s", "nogamma", "l", "opacity", "t", "hsl_default", "hslLong", "lab", "start", "end", "l", "nogamma", "a", "b", "opacity", "t", "hcl", "hue", "start", "end", "h", "c", "nogamma", "l", "opacity", "t", "hcl_default", "hclLong", "cubehelix", "hue", "cubehelixGamma", "y", "start", "end", "h", "s", "nogamma", "l", "opacity", "t", "cubehelix_default", "cubehelixLong", "piecewise", "interpolate", "values", "value_default", "i", "n", "v", "I", "t", "quantize_default", "interpolator", "n", "samples", "i", "frame", "timeout", "interval", "pokeDelay", "taskHead", "taskTail", "clockLast", "clockNow", "clockSkew", "clock", "setFrame", "f", "now", "clearNow", "Timer", "timer", "callback", "delay", "time", "sleep", "t", "timerFlush", "wake", "nap", "poke", "t0", "t1", "t2", "timeout_default", "callback", "delay", "time", "t", "Timer", "elapsed", "emptyOn", "dispatch_default", "emptyTween", "CREATED", "SCHEDULED", "STARTING", "STARTED", "RUNNING", "ENDING", "ENDED", "schedule_default", "node", "name", "id", "index", "group", "timing", "schedules", "create", "init", "schedule", "get", "set", "self", "tween", "timer", "elapsed", "start", "i", "j", "n", "o", "stop", "timeout_default", "tick", "t", "interrupt_default", "node", "name", "schedules", "schedule", "active", "empty", "i", "STARTING", "ENDING", "ENDED", "interrupt_default", "name", "tweenRemove", "id", "name", "tween0", "tween1", "schedule", "set", "tween", "i", "n", "tweenFunction", "value", "t", "tween_default", "get", "tweenValue", "transition", "node", "interpolate_default", "a", "b", "c", "number_default", "color", "rgb_default", "string_default", "attrRemove", "name", "attrRemoveNS", "fullname", "attrConstant", "interpolate", "value1", "string00", "string1", "interpolate0", "string0", "attrConstantNS", "attrFunction", "value", "string10", "attrFunctionNS", "attr_default", "namespace_default", "i", "interpolateTransformSvg", "interpolate_default", "tweenValue", "attrInterpolate", "name", "i", "t", "attrInterpolateNS", "fullname", "attrTweenNS", "value", "t0", "i0", "tween", "attrTween", "attrTween_default", "key", "namespace_default", "delayFunction", "id", "value", "init", "delayConstant", "delay_default", "get", "durationFunction", "id", "value", "set", "durationConstant", "duration_default", "get", "easeConstant", "id", "value", "set", "ease_default", "get", "easeVarying", "id", "value", "v", "set", "easeVarying_default", "filter_default", "match", "matcher_default", "groups", "m", "subgroups", "j", "group", "n", "subgroup", "node", "i", "Transition", "merge_default", "transition", "groups0", "groups1", "m0", "m1", "m", "merges", "j", "group0", "group1", "n", "merge", "node", "i", "Transition", "start", "name", "t", "i", "onFunction", "id", "listener", "on0", "on1", "sit", "init", "set", "schedule", "on", "on_default", "get", "removeFunction", "id", "parent", "i", "remove_default", "select_default", "select", "name", "id", "selector_default", "groups", "m", "subgroups", "j", "group", "n", "subgroup", "node", "subnode", "i", "schedule_default", "get", "Transition", "selectAll_default", "select", "name", "id", "selectorAll_default", "groups", "m", "subgroups", "parents", "j", "group", "n", "node", "i", "children", "child", "inherit", "get", "k", "l", "schedule_default", "Transition", "Selection", "selection_default", "styleNull", "name", "interpolate", "string00", "string10", "interpolate0", "string0", "styleValue", "string1", "styleRemove", "styleConstant", "value1", "styleFunction", "value", "styleMaybeRemove", "id", "on0", "on1", "listener0", "key", "event", "remove", "schedule", "set", "on", "listener", "style_default", "priority", "i", "interpolateTransformCss", "interpolate_default", "tweenValue", "styleInterpolate", "name", "i", "priority", "t", "styleTween", "value", "i0", "tween", "styleTween_default", "key", "textConstant", "value", "textFunction", "value1", "text_default", "tweenValue", "textInterpolate", "i", "t", "textTween", "value", "t0", "i0", "tween", "textTween_default", "key", "transition_default", "name", "id0", "id1", "newId", "groups", "m", "j", "group", "n", "node", "i", "inherit", "get", "schedule_default", "Transition", "end_default", "on0", "on1", "that", "id", "size", "resolve", "reject", "cancel", "end", "schedule", "set", "on", "id", "Transition", "groups", "parents", "name", "transition", "selection_default", "newId", "selection_prototype", "select_default", "selectAll_default", "filter_default", "merge_default", "transition_default", "on_default", "attr_default", "attrTween_default", "style_default", "styleTween_default", "text_default", "textTween_default", "remove_default", "tween_default", "delay_default", "duration_default", "ease_default", "easeVarying_default", "end_default", "cubicInOut", "defaultTiming", "cubicInOut", "inherit", "node", "id", "timing", "transition_default", "name", "Transition", "newId", "now", "groups", "m", "j", "group", "n", "i", "schedule_default", "selection_default", "interrupt_default", "transition_default", "abs", "max", "min", "number1", "e", "number2", "X", "type", "x", "xy", "Y", "y", "XY", "type", "pi", "tau", "epsilon", "tauEpsilon", "append", "strings", "i", "appendRound", "digits", "d", "k", "n", "Path", "x", "y", "x1", "y1", "x2", "y2", "r", "x0", "y0", "x21", "y21", "x01", "y01", "l01_2", "x20", "y20", "l21_2", "l20_2", "l21", "l01", "l", "t01", "t21", "a0", "a1", "ccw", "dx", "dy", "cw", "da", "w", "h", "path", "pathRound", "formatDecimal_default", "x", "formatDecimalParts", "p", "i", "coefficient", "exponent_default", "x", "formatDecimalParts", "formatGroup_default", "grouping", "thousands", "value", "width", "i", "t", "j", "g", "length", "formatNumerals_default", "numerals", "value", "i", "re", "formatSpecifier", "specifier", "match", "FormatSpecifier", "formatTrim_default", "s", "out", "n", "i", "i0", "i1", "prefixExponent", "formatPrefixAuto_default", "x", "p", "d", "formatDecimalParts", "coefficient", "exponent", "n", "formatRounded_default", "x", "p", "d", "formatDecimalParts", "coefficient", "exponent", "formatTypes_default", "x", "p", "formatDecimal_default", "formatRounded_default", "formatPrefixAuto_default", "identity_default", "x", "map", "prefixes", "locale_default", "locale", "group", "identity_default", "formatGroup_default", "currencyPrefix", "currencySuffix", "decimal", "numerals", "formatNumerals_default", "percent", "minus", "nan", "newFormat", "specifier", "formatSpecifier", "fill", "align", "sign", "symbol", "zero", "width", "comma", "precision", "trim", "type", "formatTypes_default", "prefix", "suffix", "formatType", "maybeSuffix", "format", "value", "valuePrefix", "valueSuffix", "i", "n", "c", "valueNegative", "formatTrim_default", "prefixExponent", "length", "padding", "formatPrefix", "f", "e", "exponent_default", "k", "locale", "format", "formatPrefix", "defaultLocale", "definition", "locale_default", "precisionFixed_default", "step", "exponent_default", "precisionPrefix_default", "step", "value", "exponent_default", "precisionRound_default", "step", "max", "exponent_default", "epsilon", "epsilon2", "pi", "halfPi", "quarterPi", "tau", "degrees", "radians", "abs", "atan", "atan2", "cos", "exp", "log", "pow", "sin", "sign", "x", "sqrt", "tan", "acos", "pi", "asin", "halfPi", "noop", "streamGeometry", "geometry", "stream", "streamGeometryType", "streamObjectType", "object", "features", "i", "n", "coordinates", "streamLine", "streamPolygon", "geometries", "closed", "coordinate", "stream_default", "spherical", "cartesian", "atan2", "asin", "lambda", "phi", "cosPhi", "cos", "sin", "cartesianDot", "a", "b", "cartesianCross", "cartesianAddInPlace", "cartesianScale", "vector", "k", "cartesianNormalizeInPlace", "d", "l", "sqrt", "compose_default", "a", "b", "compose", "x", "y", "rotationIdentity", "lambda", "phi", "abs", "pi", "tau", "rotateRadians", "deltaLambda", "deltaPhi", "deltaGamma", "compose_default", "rotationLambda", "rotationPhiGamma", "forwardRotationLambda", "rotation", "cosDeltaPhi", "cos", "sinDeltaPhi", "sin", "cosDeltaGamma", "sinDeltaGamma", "cosPhi", "x", "y", "z", "k", "atan2", "asin", "rotation_default", "rotate", "radians", "forward", "coordinates", "degrees", "circleStream", "stream", "radius", "delta", "direction", "t0", "t1", "cosRadius", "cos", "sinRadius", "sin", "step", "tau", "circleRadius", "point", "t", "spherical", "cartesian", "cartesianNormalizeInPlace", "acos", "epsilon", "buffer_default", "lines", "line", "x", "y", "m", "noop", "result", "pointEqual_default", "a", "b", "abs", "epsilon", "Intersection", "point", "points", "other", "entry", "rejoin_default", "segments", "compareIntersection", "startInside", "interpolate", "stream", "subject", "clip", "i", "n", "segment", "p0", "p1", "pointEqual_default", "epsilon", "link", "start", "current", "isSubject", "array", "a", "b", "longitude", "point", "abs", "pi", "sign", "tau", "polygonContains_default", "polygon", "lambda", "phi", "sinPhi", "sin", "normal", "cos", "angle", "winding", "sum", "Adder", "halfPi", "epsilon", "i", "n", "m", "ring", "point0", "lambda0", "phi0", "quarterPi", "sinPhi0", "cosPhi0", "j", "lambda1", "sinPhi1", "cosPhi1", "point1", "phi1", "delta", "absDelta", "antimeridian", "k", "atan2", "arc", "cartesianCross", "cartesian", "cartesianNormalizeInPlace", "intersection", "phiArc", "asin", "epsilon2", "clip_default", "pointVisible", "clipLine", "interpolate", "start", "sink", "line", "ringBuffer", "buffer_default", "ringSink", "polygonStarted", "polygon", "segments", "ring", "clip", "point", "lineStart", "lineEnd", "pointRing", "ringStart", "ringEnd", "merge", "startInside", "polygonContains_default", "rejoin_default", "compareIntersection", "lambda", "phi", "pointLine", "clean", "ringSegments", "i", "n", "m", "segment", "validSegment", "a", "b", "halfPi", "epsilon", "antimeridian_default", "clip_default", "clipAntimeridianLine", "clipAntimeridianInterpolate", "pi", "halfPi", "stream", "lambda0", "phi0", "sign0", "clean", "lambda1", "phi1", "sign1", "delta", "abs", "epsilon", "clipAntimeridianIntersect", "cosPhi0", "cosPhi1", "sinLambda0Lambda1", "sin", "atan", "cos", "from", "to", "direction", "phi", "lambda", "circle_default", "radius", "cr", "cos", "delta", "radians", "smallRadius", "notHemisphere", "abs", "epsilon", "interpolate", "from", "to", "direction", "stream", "circleStream", "visible", "lambda", "phi", "clipLine", "point0", "c0", "v0", "v00", "clean", "point1", "point2", "v", "c", "code", "pi", "intersect", "pointEqual_default", "t", "a", "b", "two", "pa", "cartesian", "pb", "n1", "n2", "cartesianCross", "n2n2", "cartesianDot", "n1n2", "determinant", "c1", "c2", "n1xn2", "A", "cartesianScale", "B", "cartesianAddInPlace", "u", "w", "uu", "t2", "sqrt", "q", "spherical", "lambda0", "lambda1", "phi0", "phi1", "z", "polar", "meridian", "q1", "r", "clip_default", "line_default", "a", "b", "x0", "y0", "x1", "y1", "ax", "ay", "bx", "by", "t0", "t1", "dx", "dy", "r", "clipMax", "clipMin", "clipRectangle", "x0", "y0", "x1", "y1", "visible", "x", "y", "interpolate", "from", "to", "direction", "stream", "a", "a1", "corner", "comparePoint", "p", "abs", "epsilon", "compareIntersection", "b", "ca", "cb", "activeStream", "bufferStream", "buffer_default", "segments", "polygon", "ring", "x__", "y__", "v__", "x_", "y_", "v_", "first", "clean", "clipStream", "point", "lineStart", "lineEnd", "polygonStart", "polygonEnd", "polygonInside", "winding", "i", "n", "j", "m", "a0", "b0", "b1", "startInside", "cleanInside", "merge", "rejoin_default", "linePoint", "v", "line_default", "identity_default", "x", "areaSum", "Adder", "areaRingSum", "x00", "y00", "x0", "y0", "areaStream", "noop", "areaRingStart", "areaRingEnd", "abs", "area", "areaPointFirst", "x", "y", "areaPoint", "area_default", "x0", "y0", "x1", "y1", "boundsStream", "boundsPoint", "noop", "bounds", "x", "y", "bounds_default", "X0", "Y0", "Z0", "X1", "Y1", "Z1", "X2", "Y2", "Z2", "x00", "y00", "x0", "y0", "centroidStream", "centroidPoint", "centroidLineStart", "centroidLineEnd", "centroidRingStart", "centroidRingEnd", "centroid", "x", "y", "centroidPointFirstLine", "centroidPointLine", "dx", "dy", "z", "sqrt", "centroidPointFirstRing", "centroidPointRing", "centroid_default", "PathContext", "context", "_", "x", "y", "tau", "noop", "lengthSum", "Adder", "lengthRing", "x00", "y00", "x0", "y0", "lengthStream", "noop", "lengthPointFirst", "lengthPoint", "length", "x", "y", "sqrt", "measure_default", "cacheDigits", "cacheAppend", "cacheRadius", "cacheCircle", "PathString", "digits", "append", "appendRound", "_", "x", "y", "s", "result", "strings", "i", "j", "d", "k", "path_default", "projection", "context", "digits", "pointRadius", "projectionStream", "contextStream", "path", "object", "stream_default", "area_default", "measure_default", "bounds_default", "centroid_default", "_", "identity_default", "PathString", "PathContext", "d", "transform_default", "methods", "transformer", "stream", "s", "TransformStream", "key", "x", "y", "fit", "projection", "fitBounds", "object", "clip", "stream_default", "bounds_default", "fitExtent", "extent", "b", "w", "h", "k", "x", "y", "fitSize", "size", "fitWidth", "width", "fitHeight", "height", "maxDepth", "cosMinDistance", "cos", "radians", "resample_default", "project", "delta2", "resample", "resampleNone", "transformer", "x", "y", "resampleLineTo", "x0", "y0", "lambda0", "a0", "b0", "c0", "x1", "y1", "lambda1", "a1", "b1", "c1", "depth", "stream", "dx", "dy", "d2", "a", "b", "c", "m", "sqrt", "phi2", "asin", "lambda2", "abs", "epsilon", "atan2", "p", "x2", "y2", "dx2", "dy2", "dz", "lambda00", "x00", "y00", "a00", "b00", "c00", "resampleStream", "point", "lineStart", "lineEnd", "ringStart", "linePoint", "lambda", "phi", "cartesian", "ringPoint", "ringEnd", "transformRadians", "transformer", "x", "y", "radians", "transformRotate", "rotate", "scaleTranslate", "k", "dx", "dy", "sx", "sy", "transform", "scaleTranslateRotate", "alpha", "cosAlpha", "cos", "sinAlpha", "sin", "a", "b", "ai", "bi", "ci", "fi", "projection", "project", "projectionMutator", "projectAt", "lambda", "phi", "deltaLambda", "deltaPhi", "deltaGamma", "theta", "preclip", "antimeridian_default", "x0", "y0", "x1", "y1", "postclip", "identity_default", "delta2", "projectResample", "projectTransform", "projectRotateTransform", "cache", "cacheStream", "point", "invert", "degrees", "stream", "_", "reset", "circle_default", "clipRectangle", "recenter", "resample_default", "sqrt", "extent", "object", "fitExtent", "size", "fitSize", "width", "fitWidth", "height", "fitHeight", "center", "rotateRadians", "compose_default", "conicProjection", "projectAt", "phi0", "phi1", "pi", "m", "projectionMutator", "p", "_", "radians", "degrees", "cylindricalEqualAreaRaw", "phi0", "cosPhi0", "cos", "forward", "lambda", "phi", "sin", "x", "y", "asin", "conicEqualAreaRaw", "y0", "y1", "sy0", "sin", "n", "abs", "epsilon", "cylindricalEqualAreaRaw", "c", "r0", "sqrt", "project", "x", "y", "r", "cos", "r0y", "l", "atan2", "sign", "pi", "asin", "conicEqualArea_default", "conicProjection", "albers_default", "conicEqualArea_default", "multiplex", "streams", "n", "x", "y", "i", "albersUsa_default", "cache", "cacheStream", "lower48", "albers_default", "lower48Point", "alaska", "conicEqualArea_default", "alaskaPoint", "hawaii", "hawaiiPoint", "point", "pointStream", "albersUsa", "coordinates", "k", "t", "stream", "_", "reset", "epsilon", "extent", "object", "fitExtent", "size", "fitSize", "width", "fitWidth", "height", "fitHeight", "azimuthalRaw", "scale", "x", "y", "cx", "cos", "cy", "k", "sin", "azimuthalInvert", "angle", "z", "sqrt", "c", "sc", "cc", "atan2", "asin", "azimuthalEqualAreaRaw", "azimuthalRaw", "cxcy", "sqrt", "azimuthalInvert", "z", "asin", "azimuthalEqualArea_default", "projection", "azimuthalEquidistantRaw", "azimuthalRaw", "c", "acos", "sin", "azimuthalInvert", "z", "azimuthalEquidistant_default", "projection", "mercatorRaw", "lambda", "phi", "log", "tan", "halfPi", "x", "y", "atan", "exp", "mercator_default", "mercatorProjection", "tau", "project", "m", "projection", "center", "scale", "translate", "clipExtent", "x0", "y0", "x1", "y1", "_", "reclip", "k", "pi", "t", "rotation_default", "tany", "y", "tan", "halfPi", "conicConformalRaw", "y0", "y1", "cy0", "cos", "n", "sin", "log", "f", "pow", "mercatorRaw", "project", "x", "epsilon", "r", "fy", "sign", "sqrt", "l", "atan2", "abs", "pi", "atan", "conicConformal_default", "conicProjection", "equirectangularRaw", "lambda", "phi", "equirectangular_default", "projection", "conicEquidistantRaw", "y0", "y1", "cy0", "cos", "n", "sin", "g", "abs", "epsilon", "equirectangularRaw", "project", "x", "y", "gy", "nx", "l", "atan2", "sign", "pi", "sqrt", "conicEquidistant_default", "conicProjection", "A1", "A2", "A3", "A4", "M", "sqrt", "iterations", "equalEarthRaw", "lambda", "phi", "l", "asin", "sin", "l2", "l6", "cos", "x", "y", "delta", "fy", "fpy", "abs", "epsilon2", "equalEarth_default", "projection", "gnomonicRaw", "x", "y", "cy", "cos", "k", "sin", "azimuthalInvert", "atan", "gnomonic_default", "projection", "orthographicRaw", "x", "y", "cos", "sin", "azimuthalInvert", "asin", "orthographic_default", "projection", "epsilon", "stereographicRaw", "x", "y", "cy", "cos", "k", "sin", "azimuthalInvert", "z", "atan", "stereographic_default", "projection", "transverseMercatorRaw", "lambda", "phi", "log", "tan", "halfPi", "x", "y", "atan", "exp", "transverseMercator_default", "m", "mercatorProjection", "center", "rotate", "_", "initRange", "domain", "range", "initInterpolator", "interpolator", "implicit", "ordinal", "index", "InternMap", "domain", "range", "unknown", "scale", "d", "i", "_", "value", "initRange", "band", "scale", "ordinal", "domain", "ordinalRange", "r0", "r1", "step", "bandwidth", "round", "paddingInner", "paddingOuter", "align", "rescale", "n", "reverse", "start", "stop", "values", "range", "i", "_", "initRange", "pointish", "copy", "point", "constants", "x", "number", "x", "unit", "identity", "x", "normalize", "a", "b", "constants", "clamper", "t", "bimap", "domain", "range", "interpolate", "d0", "d1", "r0", "r1", "polymap", "j", "d", "r", "i", "bisect_default", "copy", "source", "target", "transformer", "value_default", "transform", "untransform", "unknown", "clamp", "piecewise", "output", "input", "rescale", "n", "scale", "y", "number_default", "_", "number", "round_default", "u", "continuous", "tickFormat", "start", "stop", "count", "specifier", "step", "tickStep", "precision", "formatSpecifier", "value", "precisionPrefix_default", "formatPrefix", "precisionRound_default", "precisionFixed_default", "format", "linearish", "scale", "domain", "count", "d", "ticks", "specifier", "tickFormat", "i0", "i1", "start", "stop", "prestep", "step", "maxIter", "tickIncrement", "linear", "continuous", "copy", "initRange", "identity", "domain", "unknown", "scale", "x", "_", "number", "linearish", "nice", "domain", "interval", "i0", "i1", "x0", "x1", "t", "transformLog", "x", "transformExp", "transformLogn", "transformExpn", "pow10", "powp", "base", "logp", "reflect", "f", "k", "loggish", "transform", "scale", "domain", "logs", "pows", "rescale", "_", "count", "d", "u", "v", "r", "i", "j", "t", "n", "z", "ticks", "specifier", "formatSpecifier", "format", "nice", "log", "transformer", "copy", "initRange", "transformSymlog", "c", "x", "transformSymexp", "symlogish", "transform", "scale", "_", "linearish", "symlog", "transformer", "copy", "initRange", "transformPow", "exponent", "x", "transformSqrt", "transformSquare", "powish", "transform", "scale", "identity", "rescale", "_", "linearish", "pow", "transformer", "copy", "initRange", "quantile", "domain", "range", "thresholds", "unknown", "rescale", "i", "n", "quantileSorted", "scale", "x", "bisect_default", "y", "_", "d", "ascending", "initRange", "threshold", "domain", "range", "unknown", "n", "scale", "x", "bisect_default", "_", "y", "i", "initRange", "t0", "t1", "timeInterval", "floori", "offseti", "count", "field", "interval", "date", "d0", "d1", "step", "start", "stop", "range", "previous", "test", "end", "d", "millisecond", "timeInterval", "date", "step", "start", "end", "k", "milliseconds", "second", "timeInterval", "date", "step", "start", "end", "seconds", "timeMinute", "timeInterval", "date", "step", "start", "end", "timeMinutes", "utcMinute", "utcMinutes", "timeHour", "timeInterval", "date", "step", "start", "end", "timeHours", "utcHour", "utcHours", "timeDay", "timeInterval", "date", "step", "start", "end", "timeDays", "utcDay", "utcDays", "unixDay", "unixDays", "timeWeekday", "i", "timeInterval", "date", "step", "start", "end", "timeSunday", "timeMonday", "timeTuesday", "timeWednesday", "timeThursday", "timeFriday", "timeSaturday", "timeSundays", "timeMondays", "timeTuesdays", "timeWednesdays", "timeThursdays", "timeFridays", "timeSaturdays", "utcWeekday", "utcSunday", "utcMonday", "utcTuesday", "utcWednesday", "utcThursday", "utcFriday", "utcSaturday", "utcSundays", "utcMondays", "utcTuesdays", "utcWednesdays", "utcThursdays", "utcFridays", "utcSaturdays", "timeMonth", "timeInterval", "date", "step", "start", "end", "timeMonths", "utcMonth", "utcMonths", "timeYear", "timeInterval", "date", "step", "start", "end", "k", "timeYears", "utcYear", "utcYears", "ticker", "year", "month", "week", "day", "hour", "minute", "tickIntervals", "second", "ticks", "start", "stop", "count", "reverse", "interval", "tickInterval", "target", "i", "bisector", "step", "tickStep", "millisecond", "t", "utcTicks", "utcTickInterval", "utcYear", "utcMonth", "utcSunday", "unixDay", "utcHour", "utcMinute", "timeTicks", "timeTickInterval", "timeYear", "timeMonth", "timeSunday", "timeDay", "timeHour", "timeMinute", "localDate", "d", "date", "utcDate", "newDate", "y", "m", "formatLocale", "locale", "locale_dateTime", "locale_date", "locale_time", "locale_periods", "locale_weekdays", "locale_shortWeekdays", "locale_months", "locale_shortMonths", "periodRe", "formatRe", "periodLookup", "formatLookup", "weekdayRe", "weekdayLookup", "shortWeekdayRe", "shortWeekdayLookup", "monthRe", "monthLookup", "shortMonthRe", "shortMonthLookup", "formats", "formatShortWeekday", "formatWeekday", "formatShortMonth", "formatMonth", "formatDayOfMonth", "formatMicroseconds", "formatYearISO", "formatFullYearISO", "formatHour24", "formatHour12", "formatDayOfYear", "formatMilliseconds", "formatMonthNumber", "formatMinutes", "formatPeriod", "formatQuarter", "formatUnixTimestamp", "formatUnixTimestampSeconds", "formatSeconds", "formatWeekdayNumberMonday", "formatWeekNumberSunday", "formatWeekNumberISO", "formatWeekdayNumberSunday", "formatWeekNumberMonday", "formatYear", "formatFullYear", "formatZone", "formatLiteralPercent", "utcFormats", "formatUTCShortWeekday", "formatUTCWeekday", "formatUTCShortMonth", "formatUTCMonth", "formatUTCDayOfMonth", "formatUTCMicroseconds", "formatUTCYearISO", "formatUTCFullYearISO", "formatUTCHour24", "formatUTCHour12", "formatUTCDayOfYear", "formatUTCMilliseconds", "formatUTCMonthNumber", "formatUTCMinutes", "formatUTCPeriod", "formatUTCQuarter", "formatUTCSeconds", "formatUTCWeekdayNumberMonday", "formatUTCWeekNumberSunday", "formatUTCWeekNumberISO", "formatUTCWeekdayNumberSunday", "formatUTCWeekNumberMonday", "formatUTCYear", "formatUTCFullYear", "formatUTCZone", "parses", "parseShortWeekday", "parseWeekday", "parseShortMonth", "parseMonth", "parseLocaleDateTime", "parseDayOfMonth", "parseMicroseconds", "parseYear", "parseFullYear", "parseHour24", "parseDayOfYear", "parseMilliseconds", "parseMonthNumber", "parseMinutes", "parsePeriod", "parseQuarter", "parseUnixTimestamp", "parseUnixTimestampSeconds", "parseSeconds", "parseWeekdayNumberMonday", "parseWeekNumberSunday", "parseWeekNumberISO", "parseWeekdayNumberSunday", "parseWeekNumberMonday", "parseLocaleDate", "parseLocaleTime", "parseZone", "parseLiteralPercent", "newFormat", "specifier", "string", "i", "j", "n", "c", "pad", "format", "pads", "newParse", "Z", "parseSpecifier", "week", "day", "utcMonday", "utcDay", "timeMonday", "timeDay", "parse", "f", "p", "numberRe", "percentRe", "requoteRe", "value", "fill", "width", "sign", "length", "requote", "s", "names", "name", "timeYear", "timeSunday", "dISO", "timeThursday", "z", "utcYear", "dow", "utcSunday", "UTCdISO", "utcThursday", "locale", "timeFormat", "timeParse", "utcFormat", "utcParse", "defaultLocale", "definition", "formatLocale", "date", "number", "calendar", "ticks", "tickInterval", "year", "month", "week", "day", "hour", "minute", "second", "format", "scale", "continuous", "invert", "domain", "formatMillisecond", "formatSecond", "formatMinute", "formatHour", "formatDay", "formatWeek", "formatMonth", "formatYear", "tickFormat", "y", "_", "interval", "d", "count", "specifier", "nice", "copy", "time", "initRange", "timeTicks", "timeTickInterval", "timeYear", "timeMonth", "timeSunday", "timeDay", "timeHour", "timeMinute", "timeFormat", "utcTime", "initRange", "calendar", "utcTicks", "utcTickInterval", "utcYear", "utcMonth", "utcSunday", "utcDay", "utcHour", "utcMinute", "second", "utcFormat", "copy", "source", "target", "transformer", "x0", "x1", "x2", "s", "t0", "t1", "t2", "k10", "k21", "interpolator", "identity", "transform", "clamp", "unknown", "scale", "x", "_", "range", "interpolate", "r0", "r1", "r2", "piecewise", "value_default", "round_default", "t", "diverging", "linearish", "copy", "initInterpolator", "divergingLog", "loggish", "divergingSymlog", "symlogish", "divergingPow", "powish", "colors_default", "specifier", "n", "colors", "i", "category10_default", "colors_default", "Accent_default", "colors_default", "Dark2_default", "colors_default", "Paired_default", "colors_default", "Pastel1_default", "colors_default", "Pastel2_default", "colors_default", "Set1_default", "colors_default", "Set2_default", "colors_default", "Set3_default", "colors_default", "Tableau10_default", "colors_default", "ramp_default", "scheme", "rgbBasis", "scheme", "colors_default", "BrBG_default", "ramp_default", "scheme", "colors_default", "PRGn_default", "ramp_default", "scheme", "colors_default", "PiYG_default", "ramp_default", "scheme", "colors_default", "PuOr_default", "ramp_default", "scheme", "colors_default", "RdBu_default", "ramp_default", "scheme", "colors_default", "RdGy_default", "ramp_default", "scheme", "colors_default", "RdYlBu_default", "ramp_default", "scheme", "colors_default", "RdYlGn_default", "ramp_default", "scheme", "colors_default", "Spectral_default", "ramp_default", "scheme", "colors_default", "BuGn_default", "ramp_default", "scheme", "colors_default", "BuPu_default", "ramp_default", "scheme", "colors_default", "GnBu_default", "ramp_default", "scheme", "colors_default", "OrRd_default", "ramp_default", "scheme", "colors_default", "PuBuGn_default", "ramp_default", "scheme", "colors_default", "PuBu_default", "ramp_default", "scheme", "colors_default", "PuRd_default", "ramp_default", "scheme", "colors_default", "RdPu_default", "ramp_default", "scheme", "colors_default", "YlGnBu_default", "ramp_default", "scheme", "colors_default", "YlGn_default", "ramp_default", "scheme", "colors_default", "YlOrBr_default", "ramp_default", "scheme", "colors_default", "YlOrRd_default", "ramp_default", "scheme", "colors_default", "Blues_default", "ramp_default", "scheme", "colors_default", "Greens_default", "ramp_default", "scheme", "colors_default", "Greys_default", "ramp_default", "scheme", "colors_default", "Purples_default", "ramp_default", "scheme", "colors_default", "Reds_default", "ramp_default", "scheme", "colors_default", "Oranges_default", "ramp_default", "cividis_default", "cubehelix_default", "cubehelixLong", "cubehelix", "warm", "cubehelixLong", "cubehelix", "cool", "c", "rainbow_default", "ts", "c", "rgb", "pi_1_3", "pi_2_3", "sinebow_default", "x", "turbo_default", "ramp", "range", "n", "t", "viridis_default", "colors_default", "magma", "inferno", "plasma", "cos", "min", "sin", "sqrt", "pi", "halfPi", "tau", "sqrt3", "sqrt", "asterisk_default", "context", "size", "r", "min", "t", "u", "circle_default", "context", "size", "r", "sqrt", "pi", "tau", "cross_default", "context", "size", "r", "sqrt", "tan30", "sqrt", "tan30_2", "diamond_default", "context", "size", "y", "x", "diamond2_default", "context", "size", "r", "sqrt", "plus_default", "context", "size", "r", "sqrt", "min", "square_default", "context", "size", "w", "sqrt", "x", "square2_default", "context", "size", "r", "sqrt", "ka", "kr", "sin", "pi", "kx", "tau", "ky", "cos", "star_default", "context", "size", "r", "sqrt", "x", "y", "c", "s", "sqrt3", "sqrt", "triangle_default", "context", "size", "y", "sqrt3", "sqrt", "triangle2_default", "context", "size", "s", "t", "u", "c", "s", "sqrt", "k", "a", "wye_default", "context", "size", "r", "x0", "y0", "x1", "y1", "x2", "y2", "times_default", "context", "size", "r", "sqrt", "min", "symbolsFill", "circle_default", "cross_default", "diamond_default", "square_default", "star_default", "triangle_default", "wye_default", "symbolsStroke", "plus_default", "times_default", "triangle2_default", "asterisk_default", "square2_default", "diamond2_default", "Transform", "k", "x", "y", "point", "location", "identity", "transform", "node", "defined", "x", "ascendingDefined", "a", "b", "ascending", "descendingDefined", "descending", "nonempty", "finite", "positive", "negative", "format", "date", "fallback", "hours", "minutes", "seconds", "milliseconds", "formatYear", "pad", "year", "value", "width", "re", "parse", "string", "fallback", "durationSecond", "durationMinute", "durationHour", "durationDay", "durationWeek", "durationMonth", "durationYear", "formats", "timeIntervals", "second", "timeMinute", "timeHour", "timeDay", "timeSunday", "timeMonth", "timeYear", "timeMonday", "timeTuesday", "timeWednesday", "timeThursday", "timeFriday", "timeSaturday", "utcIntervals", "utcMinute", "utcHour", "unixDay", "utcSunday", "utcMonth", "utcYear", "utcMonday", "utcTuesday", "utcWednesday", "utcThursday", "utcFriday", "utcSaturday", "parseInterval", "input", "intervals", "name", "period", "match", "interval", "maybeTimeInterval", "maybeUtcInterval", "isUtcYear", "i", "date", "isTimeYear", "formatTimeTicks", "scale", "data", "ticks", "anchor", "format", "timeFormat", "utcFormat", "template", "f1", "f2", "getTimeTicksInterval", "formatConditional", "medianStep", "median", "pairs", "a", "b", "bisector", "step", "start", "stop", "extent", "count", "format1", "format2", "x", "X", "j", "orderof", "TypedArray", "objectToString", "valueof", "data", "value", "type", "valueType", "maybeTypedMap", "field", "map", "constant", "maybeTypedArrayify", "f", "floater", "arrayify", "coerceNumber", "d", "i", "singleton", "name", "indexOf", "range", "identity", "one", "yes", "string", "x", "number", "first", "x", "second", "constant", "x", "percentile", "reduce", "p", "I", "f", "quantile", "coerceNumbers", "values", "TypedArray", "map", "coerceNumber", "coerceDates", "coerceDate", "parse", "maybeColorChannel", "value", "defaultValue", "isColor", "maybeNumberChannel", "maybeKeyword", "input", "name", "allowed", "keyword", "i", "arrayify", "data", "type", "slice", "hasX", "x1", "x2", "hasY", "y", "y1", "y2", "hasXY", "options", "isObject", "option", "objectToString", "isScaleOptions", "isOptions", "isDomainSort", "sort", "maybeZero", "x3", "identity", "maybeTuple", "first", "second", "maybeZ", "z", "fill", "stroke", "range", "n", "r", "take", "values", "index", "map", "i", "subarray", "I", "i", "j", "keyof", "value", "maybeInput", "key", "options", "column", "source", "labelof", "v", "maybeColumn", "defaultValue", "mid", "x1", "x2", "data", "X1", "X2", "isTemporal", "map", "_", "maybeApplyInterval", "V", "scale", "t", "maybeIntervalTransform", "interval", "type", "maybeInterval", "defined", "d", "lo", "hi", "range", "x", "maybeTimeInterval", "maybeUtcInterval", "maybeRangeInterval", "maybeNiceInterval", "maybeValue", "isOptions", "numberChannel", "valueof", "isIterable", "value", "isTextual", "values", "isOrdinal", "type", "isTemporal", "isTemporalString", "parse", "isNumericString", "isNumeric", "isEvery", "is", "every", "isColor", "color", "isOpacity", "isNoneish", "isNone", "isRound", "maybeAnchor", "name", "maybeKeyword", "maybeFrameAnchor", "orderof", "first", "last", "descending", "inherit", "options", "rest", "o", "defaults", "key", "named", "things", "names", "thing", "maybeNamed", "position", "color", "radius", "length", "opacity", "symbol", "projection", "registry", "sqrt3", "sqrt4_3", "symbolHexagon", "context", "size", "rx", "ry", "hy", "symbols", "asterisk_default", "circle_default", "cross_default", "diamond_default", "diamond2_default", "plus_default", "square_default", "square2_default", "star_default", "times_default", "triangle_default", "triangle2_default", "wye_default", "isSymbolObject", "value", "isSymbol", "maybeSymbol", "symbol", "basic", "f1", "s1", "r1", "t1", "i1", "options", "transform", "filterTransform", "isDomainSort", "composeTransform", "sortTransform", "reverseTransform", "initializer", "composeInitializer", "t2", "data", "facets", "plotOptions", "arrayify", "i2", "channels", "args", "c1", "d1", "c2", "d2", "f2", "filterTransform", "value", "data", "facets", "V", "valueof", "I", "reverseTransform", "data", "facets", "I", "sortTransform", "value", "sortData", "sortValue", "compare", "data", "facets", "compareData", "i", "j", "I", "channel", "order", "maybeValue", "negate", "descendingDefined", "ascendingDefined", "channels", "V", "valueof", "compareValue", "hasOutput", "outputs", "names", "name", "maybeOutputs", "inputs", "asOutput", "maybeOutput", "entries", "reduceTitle", "reduceFirst", "reduce", "nullOutput", "asEvaluator", "maybeEvaluator", "scale", "isObject", "evaluator", "output", "setOutput", "column", "O", "data", "scope", "I", "extent", "asReduce", "maybeReduce", "input", "maybeInput", "reducer", "V", "context", "labelof", "reduceCount", "valueof", "range", "maybeGroup", "X", "sort", "group", "i", "first", "value", "fallback", "invalidReduce", "reduceReduce", "reduceFunction", "reduceAccessor", "percentile", "reduceLast", "reduceIdentity", "reduceDistinct", "reduceSum", "reduceProportion", "deviation", "min", "minIndex", "max", "maxIndex", "reduceMaybeTemporalAccessor", "mean", "median", "variance", "mode", "maybeSubgroup", "maybeSort", "facets", "reverse", "S", "compare", "j", "ascendingDefined", "f", "take", "x", "isTemporal", "groups", "rollup", "second", "top", "bottom", "sum", "key", "s", "InternSet", "basis", "createChannel", "data", "scale", "type", "value", "filter", "hint", "name", "inferChannelScale", "valueof", "labelof", "createChannels", "channels", "channel", "valueObject", "scales", "values", "scaleName", "map", "isEvery", "isColor", "isOpacity", "isSymbol", "maybeSymbol", "registry", "channelDomain", "facets", "facetChannels", "options", "defaultOrder", "defaultReverse", "defaultReduce", "defaultLimit", "x", "y", "order", "reverse", "reduce", "limit", "maybeValue", "negate", "descendingGroup", "ascendingGroup", "maybeOrder", "X", "reindexFacetChannel", "findScaleChannel", "XV", "lo", "hi", "isIterable", "domain", "InternSet", "YV", "difference", "reducer", "maybeReduce", "rollups", "range", "I", "i", "first", "originalFacets", "V1", "V2", "vi", "j", "k1", "k2", "X1", "X2", "x2", "alias", "ak", "av", "bk", "bv", "ascendingDefined", "descendingDefined", "getSource", "key", "createContext", "options", "document", "create", "name", "select_default", "creator_default", "warnings", "consumeWarnings", "w", "warn", "message", "pi", "tau", "defaultAspectRatio", "createProjection", "projection", "globalInset", "insetTop", "insetRight", "insetBottom", "insetLeft", "dimensions", "options", "domain", "clip", "isObject", "inset", "namedProjection", "width", "height", "marginLeft", "marginRight", "marginTop", "marginBottom", "dx", "dy", "maybePostClip", "tx", "ty", "transform", "x0", "y0", "x1", "y1", "path_default", "k", "transform_default", "x", "y", "warn", "identity", "s", "scaleProjection", "albersUsa_default", "conicProjection", "albers_default", "azimuthalEqualArea_default", "azimuthalEquidistant_default", "conicConformal_default", "conicEqualArea_default", "conicEquidistant_default", "equalEarth_default", "equirectangular_default", "gnomonic_default", "reflectY", "mercator_default", "orthographic_default", "stereographic_default", "transverseMercator_default", "x2", "y2", "clipRectangle", "kx", "ky", "rotate", "precision", "type", "aspectRatio", "parallels", "constant", "stream", "project", "cx", "cy", "values", "n", "X", "Y", "i", "hasProjection", "projectionAspectRatio", "getGeometryChannels", "channel", "X", "Y", "x", "y", "sink", "object", "stream_default", "categoricalSchemes", "Accent_default", "category10_default", "Dark2_default", "Paired_default", "Pastel1_default", "Pastel2_default", "Set1_default", "Set2_default", "Set3_default", "Tableau10_default", "isCategoricalScheme", "scheme", "ordinalSchemes", "scheme11", "BrBG_default", "PRGn_default", "PiYG_default", "PuOr_default", "RdBu_default", "RdGy_default", "RdYlBu_default", "RdYlGn_default", "Spectral_default", "scheme11r", "scheme9", "Blues_default", "Greens_default", "Greys_default", "Oranges_default", "Purples_default", "Reds_default", "schemei", "turbo_default", "viridis_default", "magma", "inferno", "plasma", "cividis_default", "cubehelix_default", "warm", "cool", "BuGn_default", "BuPu_default", "GnBu_default", "OrRd_default", "PuBu_default", "PuBuGn_default", "PuRd_default", "RdPu_default", "YlGn_default", "YlGnBu_default", "YlOrBr_default", "YlOrRd_default", "schemeicyclical", "rainbow_default", "sinebow_default", "interpolate", "quantize_default", "t", "n", "ordinalScheme", "s", "ordinalRange", "length", "maybeBooleanRange", "domain", "range", "f", "value", "quantitativeSchemes", "quantitativeScheme", "divergingSchemes", "isDivergingScheme", "flip", "i", "t", "unit", "interpolators", "number_default", "rgb_default", "hsl_default", "hcl_default", "lab", "maybeInterpolator", "interpolate", "createScaleQ", "key", "scale", "channels", "type", "nice", "clamp", "zero", "domain", "inferAutoDomain", "unknown", "round", "scheme", "interval", "range", "registry", "radius", "inferRadialRange", "length", "inferLengthRange", "opacity", "color", "quantitativeScheme", "round_default", "reverse", "maybeRangeInterval", "n", "arrayify", "m", "piecewise", "_", "constant", "interpolatePiecewise", "min", "max", "extent", "slice", "orderof", "maybeNice", "maybeNiceInterval", "createScaleLinear", "options", "linear", "createScaleSqrt", "createScalePow", "exponent", "pow", "createScaleLog", "base", "inferLogDomain", "log", "createScaleSymlog", "symlog", "createScaleQuantile", "quantiles", "inferQuantileDomain", "quantize_default", "ordinalRange", "quantile", "createScaleThreshold", "createScaleQuantize", "thresholds", "ticks", "x", "sign", "isOrdered", "threshold", "d", "s", "descending", "createScaleIdentity", "identity", "inferDomain", "f", "finite", "value", "inferZeroDomain", "hint", "h25", "positive", "k", "r", "h50", "median", "v", "negative", "j", "createScaleD", "key", "scale", "transform", "channels", "type", "nice", "clamp", "domain", "inferDomain", "unknown", "pivot", "scheme", "range", "symmetric", "interpolate", "registry", "color", "rgb_default", "quantitativeScheme", "number_default", "reverse", "arrayify", "min", "max", "warn", "descending", "maybeInterpolator", "interpolatePiecewise", "piecewise", "flip", "mid", "mindelta", "maxdelta", "createScaleDiverging", "options", "diverging", "transformIdentity", "createScaleDivergingSqrt", "createScaleDivergingPow", "exponent", "divergingPow", "transformPow", "createScaleDivergingLog", "base", "negative", "positive", "divergingLog", "transformLog", "createScaleDivergingSymlog", "constant", "divergingSymlog", "transformSymlog", "x", "transformSqrt", "createScaleT", "key", "scale", "channels", "options", "createScaleQ", "createScaleTime", "time", "createScaleUtc", "utcTime", "ordinalImplicit", "createScaleO", "key", "scale", "channels", "type", "interval", "domain", "range", "reverse", "hint", "maybeRangeInterval", "inferDomain", "createScaleOrdinal", "scheme", "unknown", "options", "registry", "symbol", "inferSymbolHint", "inferSymbolRange", "map", "maybeSymbol", "color", "maybeBooleanRange", "interpolate", "quantitativeScheme", "t0", "d", "n", "quantize_default", "t", "ordinalScheme", "implicit", "ordinal", "createScalePoint", "align", "padding", "maybeRound", "point", "createScaleBand", "paddingInner", "paddingOuter", "band", "round", "values", "InternSet", "value", "v", "min", "max", "extent", "position", "sort", "ascendingDefined", "inferHint", "candidate", "isNoneish", "symbolsStroke", "symbolsFill", "createScales", "channelsByScale", "globalLabel", "globalInset", "globalInsetTop", "globalInsetRight", "globalInsetBottom", "globalInsetLeft", "round", "nice", "clamp", "zero", "align", "padding", "projection", "facetLabel", "options", "scales", "key", "channels", "scaleOptions", "scale", "createScale", "registry", "position", "label", "percent", "transform", "inset", "insetTop", "insetRight", "insetBottom", "insetLeft", "inferScaleLabel", "createScaleFunctions", "name", "type", "interval", "autoScaleRange", "dimensions", "x", "y", "fx", "fy", "superdimensions", "outerDimensions", "autoScaleRangeX", "autoScaleRangeY", "subdimensions", "innerDimensions", "l", "isOrdinalScale", "marginTop", "marginRight", "marginBottom", "marginLeft", "width", "height", "facetMarginTop", "facetMarginRight", "facetMarginBottom", "facetMarginLeft", "left", "right", "piecewiseRange", "autoScaleRound", "top", "bottom", "isBandScale", "roundError", "n", "start", "stop", "paddingInner", "paddingOuter", "m", "step", "length", "isThresholdScale", "end", "_", "createScale", "key", "channels", "options", "type", "inferScaleType", "isOrdinalScale", "values", "value", "isTemporal", "warn", "formatScaleType", "isTemporalString", "isNumericString", "coerceType", "coerceNumbers", "registry", "position", "symbol", "coerceSymbols", "coerceDates", "createScaleDiverging", "createScaleDivergingSqrt", "createScaleDivergingPow", "createScaleDivergingLog", "createScaleDivergingSymlog", "ordinalImplicit", "createScaleOrdinal", "createScaleLinear", "createScaleSqrt", "createScaleThreshold", "createScaleQuantile", "createScaleQuantize", "createScalePow", "createScaleLog", "createScaleSymlog", "createScaleUtc", "createScaleTime", "createScalePoint", "createScaleBand", "createScaleIdentity", "typeProjection", "domain", "range", "scheme", "pivot", "projection", "t", "kind", "radius", "opacity", "length", "asOrdinalType", "isOrdinal", "color", "isDivergingScheme", "isCategoricalScheme", "isTemporalScale", "isThresholdScale", "isBandScale", "isCollapsed", "scale", "domain", "value", "i", "n", "coerceType", "channels", "options", "coerceValues", "c", "coerceSymbols", "values", "map", "maybeSymbol", "exposeScales", "scaleDescriptors", "key", "registry", "exposeScale", "scale", "type", "domain", "range", "interpolate", "interval", "transform", "percent", "pivot", "d", "unknown", "slice", "t", "memoize1", "compute", "cacheValue", "cacheKeys", "keys", "k", "numberFormat", "memoize1", "locale", "monthFormat", "month", "weekdayFormat", "weekday", "formatNumber", "format", "i", "formatIsoDate", "date", "format", "formatAuto", "locale", "number", "formatNumber", "v", "string", "formatDefault", "offset", "nextClipId", "getClipId", "styles", "mark", "title", "href", "variaLabel", "ariaDescription", "ariaHidden", "target", "fill", "fillOpacity", "stroke", "strokeWidth", "strokeOpacity", "strokeLinejoin", "strokeLinecap", "strokeMiterlimit", "strokeDasharray", "strokeDashoffset", "opacity", "mixBlendMode", "imageFilter", "paintOrder", "pointerEvents", "shapeRendering", "channels", "cariaLabel", "defaultFill", "defaultFillOpacity", "defaultStroke", "defaultStrokeOpacity", "defaultStrokeWidth", "defaultStrokeLinecap", "defaultStrokeLinejoin", "defaultStrokeMiterlimit", "defaultPaintOrder", "isNoneish", "vfill", "cfill", "maybeColorChannel", "vfillOpacity", "cfillOpacity", "maybeNumberChannel", "vstroke", "cstroke", "vstrokeOpacity", "cstrokeOpacity", "vopacity", "copacity", "isNone", "isRound", "vstrokeWidth", "cstrokeWidth", "impliedString", "impliedNumber", "string", "applyTitle", "selection", "L", "i", "nonempty", "applyText", "applyText", "selection", "T", "i", "formatDefault", "applyChannelStyles", "selection", "target", "tip", "AL", "T", "F", "FO", "S", "SO", "SW", "O", "H", "applyAttr", "i", "applyHref", "applyTitle", "maybeClip", "clip", "maybeKeyword", "applyClip", "selection", "mark", "dimensions", "context", "clipUrl", "width", "height", "marginLeft", "marginRight", "marginTop", "marginBottom", "id", "getClipId", "create", "g", "projection", "path_default", "applyAttr", "applyIndirectStyles", "pointerEvents", "applyDirectStyles", "applyStyle", "applyHref", "href", "target", "i", "h", "a", "namespaces_default", "name", "value", "applyTransform", "x", "y", "tx", "offset", "ty", "impliedString", "impliedValue", "string", "impliedNumber", "number", "validClassName", "maybeClassName", "applyInlineStyles", "style", "element", "applyFrameAnchor", "frameAnchor", "createDimensions", "scales", "marks", "options", "marginTopDefault", "offset", "marginRightDefault", "marginBottomDefault", "marginLeftDefault", "marginTop", "marginRight", "marginBottom", "marginLeft", "margin", "width", "height", "autoHeight", "dimensions", "facetMargin", "facetMarginTop", "facetMarginRight", "facetMarginBottom", "facetMarginLeft", "x", "y", "fy", "fx", "projection", "aspectRatio", "nfy", "ar", "projectionAspectRatio", "nfx", "far", "lar", "ny", "isOrdinalScale", "ratio", "aspectRatioLength", "fxb", "fyb", "w", "k", "scale", "type", "domain", "transform", "exponent", "min", "max", "extent", "createFacets", "channelsByScale", "options", "fx", "fy", "createScales", "fxDomain", "fyDomain", "cross", "x", "y", "i", "recreateFacets", "facets", "X", "Y", "facetIndex", "f", "a", "b", "facetGroups", "data", "I", "range", "FX", "FY", "rollup", "G", "facetTranslator", "marginTop", "marginLeft", "facetExclude", "index", "ex", "e", "sum", "d", "n", "j", "facetAnchors", "facetAnchorTop", "facetAnchorRight", "facetAnchorBottom", "facetAnchorLeft", "and", "facetAnchorTopEmpty", "facetAnchorRightEmpty", "facetAnchorBottomEmpty", "facetAnchorLeftEmpty", "facetAnchorEmpty", "maybeFacetAnchor", "facetAnchor", "anchor", "indexCache", "V", "InternMap", "map", "v", "facetIndexOf", "facetFind", "keyof", "facetEmpty", "empty", "channels", "facetFilter", "groups", "Mark", "data", "channels", "options", "defaults", "facet", "facetAnchor", "fx", "fy", "sort", "dx", "dy", "margin", "marginTop", "marginRight", "marginBottom", "marginLeft", "clip", "extraChannels", "tip", "render", "isDomainSort", "initializer", "basic", "keyword", "singleton", "maybeFacetAnchor", "maybeNamed", "maybeChannels", "styles", "name", "channel", "isOptions", "value", "scale", "optional", "maybeClip", "maybeTip", "composeRender", "facets", "facetChannels", "plotOptions", "arrayify", "range", "originalFacets", "createChannels", "channelDomain", "index", "values", "filter", "defined", "i", "context", "cx", "cy", "project", "scales", "valueObject", "marks", "r1", "r2", "s", "v", "d", "c", "next", "maybeValue", "maybeKeyword", "withTip", "states", "pointerK", "kx", "ky", "x", "y", "px", "py", "maxRadius", "channels", "render", "options", "composeRender", "index", "scales", "values", "dimensions", "context", "next", "svg", "data", "state", "renderIndex", "fx", "fy", "tx", "ty", "faceted", "facetState", "facetStates", "cx", "cy", "applyFrameAnchor", "PX", "PY", "i", "anchorX", "anchorY", "g", "s", "f", "update", "ii", "ri", "r", "I", "p", "ft", "mt", "pointermove", "event", "xp", "yp", "pointer_default", "j", "dx", "dy", "rj", "pointerdown", "pointerleave", "pointer", "pointerX", "pointerY", "X1", "X2", "X", "Y1", "Y2", "Y", "inferFontVariant", "scale", "isOrdinalScale", "legendRamp", "color", "options", "label", "tickSize", "width", "height", "marginTop", "marginRight", "marginBottom", "marginLeft", "style", "ticks", "tickFormat", "fontVariant", "inferFontVariant", "round", "opacity", "className", "context", "createContext", "maybeClassName", "maybeNumberChannel", "svg", "create", "applyInlineStyles", "tickAdjust", "g", "x", "applyRange", "range", "type", "domain", "interpolate", "scale", "pivot", "interpolator", "piecewise", "interpolatePiecewise", "quantize_default", "number_default", "n", "canvas", "context2", "i", "j", "thresholds", "thresholdFormat", "d", "format", "linear", "map", "_", "band", "axisBottom", "impliedString", "radians", "markers", "mark", "marker", "markerStart", "markerMid", "markerEnd", "maybeMarker", "markerCircleFill", "markerArrow", "markerDot", "markerCircleStroke", "orient", "color", "context", "create", "nextMarkerId", "applyMarkers", "path", "S", "applyMarkersColor", "i", "applyMarkersColor", "path", "markerStart", "markerMid", "markerEnd", "stroke", "strokeof", "context", "iriByMarkerColor", "applyMarker", "marker", "i", "color", "iriByColor", "iri", "node", "id", "nextMarkerId", "maybeInsetX", "inset", "insetLeft", "insetRight", "options", "maybeInset", "maybeInsetY", "insetTop", "insetBottom", "inset1", "inset2", "offset", "maybeIntervalValue", "value", "interval", "maybeValue", "maybeInterval", "maybeIntervalK", "k", "maybeInsetK", "options", "trivial", "v", "v1", "v2", "label", "labelof", "V", "kv", "data", "valueof", "D1", "V1", "transform", "map", "maybeIntervalMidK", "V2", "isTemporal", "maybeIntervalX", "options", "maybeIntervalK", "maybeInsetX", "maybeIntervalY", "maybeInsetY", "maybeIntervalMidX", "maybeIntervalMidK", "maybeIntervalMidY", "defaults", "RuleX", "Mark", "data", "options", "x", "y1", "y2", "inset", "insetTop", "insetBottom", "withTip", "number", "markers", "index", "scales", "channels", "dimensions", "context", "y", "X", "Y1", "Y2", "width", "height", "marginTop", "marginRight", "marginLeft", "marginBottom", "create", "applyIndirectStyles", "applyTransform", "offset", "g", "applyDirectStyles", "i", "isCollapsed", "applyChannelStyles", "applyMarkers", "RuleY", "x1", "x2", "insetRight", "insetLeft", "Y", "X1", "X2", "ruleX", "identity", "rest", "maybeIntervalY", "maybeOptionalZero", "ruleY", "maybeIntervalX", "template", "strings", "parts", "j", "copy", "i", "s", "defaults", "softHyphen", "Text", "Mark", "data", "options", "x", "y", "text", "isIterable", "isTextual", "identity", "indexOf", "frameAnchor", "textAnchor", "lineAnchor", "lineHeight", "lineWidth", "textOverflow", "monospace", "fontFamily", "fontSize", "fontStyle", "fontVariant", "fontWeight", "rotate", "vrotate", "crotate", "maybeNumberChannel", "vfontSize", "cfontSize", "maybeFontSizeChannel", "numberChannel", "nonempty", "impliedString", "keyword", "maybeTextOverflow", "string", "maybeFrameAnchor", "splitter", "clipper", "index", "scales", "channels", "dimensions", "context", "X", "Y", "R", "T", "TL", "FS", "cx", "cy", "applyFrameAnchor", "create", "applyIndirectStyles", "applyIndirectTextStyles", "applyTransform", "g", "applyDirectStyles", "applyMultilineText", "template", "i", "applyAttr", "applyChannelStyles", "selection", "mark", "splitLines", "clipLine", "lines", "formatDefault", "n", "m", "tspan", "namespaces_default", "title", "maybeTuple", "textX", "maybeIntervalMidY", "textY", "maybeIntervalMidX", "inferFontVariant", "isNumeric", "isTemporal", "fontSizes", "lineWrap", "input", "maxWidth", "widthof", "lineStart", "lineEnd", "wordStart", "wordEnd", "required", "lineBreaks", "j", "k", "defaultWidthMap", "defaultWidth", "start", "end", "sum", "readCharacter", "isPictographic", "monospaceWidth", "clipStart", "clipEnd", "ellipsis", "clipMiddle", "cut", "width", "inset", "I", "w", "l", "e", "ei", "reCombiner", "rePictographic", "isSurrogatePair", "isCombiner", "isZeroWidthJoiner", "isAscii", "hi", "lo", "defaults", "defaultRadius", "wingRatio", "shapeArrow", "context", "l", "r", "wing", "shapeSpike", "shapes", "isShapeObject", "value", "maybeShape", "shape", "Vector", "Mark", "data", "options", "x", "y", "length", "rotate", "anchor", "frameAnchor", "vl", "cl", "maybeNumberChannel", "vr", "cr", "keyword", "maybeFrameAnchor", "index", "scales", "channels", "dimensions", "X", "Y", "L", "A", "cx", "cy", "applyFrameAnchor", "create", "applyIndirectStyles", "applyTransform", "g", "applyDirectStyles", "template", "i", "p", "pathRound", "applyChannelStyles", "vectorX", "data", "options", "x", "identity", "rest", "Vector", "vectorY", "y", "maybeData", "data", "options", "isIterable", "maybeAnchor", "anchor", "anchors", "keyword", "anchorY", "anchorFy", "anchorX", "anchorFx", "axisY", "axisKy", "axisFy", "axisX", "axisKx", "axisFx", "k", "color", "opacity", "stroke", "strokeOpacity", "strokeWidth", "fill", "fillOpacity", "textAnchor", "textStroke", "textStrokeOpacity", "textStrokeWidth", "tickSize", "tickPadding", "tickRotate", "x", "margin", "marginTop", "marginRight", "marginBottom", "marginLeft", "label", "labelAnchor", "labelArrow", "labelOffset", "number", "maybeLabelArrow", "marks", "isNoneish", "axisTickKy", "axisTextKy", "text", "labelOptions", "facets", "channels", "scales", "dimensions", "scale", "cla", "clo", "formatAxisLabel", "y", "axisTickKx", "axisTextKx", "strokeLinecap", "strokeLinejoin", "facetAnchor", "frameAnchor", "inset", "insetLeft", "insetRight", "dx", "axisMark", "vectorY", "offset", "shapeTickLeft", "shapeTickRight", "insetTop", "insetBottom", "dy", "vectorX", "shapeTickBottom", "shapeTickTop", "radians", "tickFormat", "lineAnchor", "fontVariant", "textY", "ticks", "inferFontVariant", "inferTextChannel", "textX", "gridY", "gridKy", "gridFy", "gridX", "gridKx", "gridFx", "x1", "x2", "ruleY", "gridDefaults", "y1", "y2", "ruleX", "fontFamily", "fontSize", "fontStyle", "fontWeight", "monospace", "pointerEvents", "shapeRendering", "initializer", "maybeColorChannel", "maybeNumberChannel", "mark", "ariaLabel", "initialize", "axisInitializer", "_channels", "context", "initializeFacets", "tickSpacing", "interval", "isTemporalScale", "arrayify", "maybeRangeInterval", "min", "max", "extent", "range", "identity", "initializedChannels", "name", "channel", "valueof", "basicInitializer", "m", "inferTickFormat", "formatTimeTicks", "isUtcYear", "utcFormat", "isTimeYear", "timeFormat", "formatDefault", "isTemporal", "format", "constant", "l", "inferScaleOrder", "orderof", "isTemporalish", "order", "maybeScale", "scale", "key", "s", "legendSwatches", "color", "opacity", "options", "isOrdinalScale", "isThresholdScale", "legendItems", "selection", "width", "height", "maybeNumberChannel", "legendSymbols", "symbol", "fill", "fillOpacity", "stroke", "isNoneish", "strokeOpacity", "strokeWidth", "r", "vf", "cf", "maybeColorChannel", "vs", "cs", "sf", "ss", "size", "d", "p", "pathRound", "swatch", "columns", "tickFormat", "fontVariant", "inferFontVariant", "swatchSize", "swatchWidth", "swatchHeight", "marginLeft", "className", "style", "context", "createContext", "maybeClassName", "inferTickFormat", "swatches", "create", "extraStyle", "item", "div", "impliedString", "applyInlineStyles", "legendRegistry", "legendSymbols", "legendColor", "legendOpacity", "exposeLegends", "scales", "context", "defaults", "key", "options", "legendRegistry", "legendOptions", "className", "label", "ticks", "tickFormat", "inherit", "legendColor", "color", "legend", "legendSwatches", "legendRamp", "legendOpacity", "type", "interpolate", "scale", "rgb", "interpolateOpacity", "r", "g", "b", "t", "createLegends", "legends", "value", "o", "defaults", "lineDefaults", "Frame", "Mark", "options", "anchor", "inset", "insetTop", "insetRight", "insetBottom", "insetLeft", "rx", "ry", "singleton", "maybeKeyword", "number", "index", "scales", "channels", "dimensions", "context", "marginTop", "marginRight", "marginBottom", "marginLeft", "width", "height", "x1", "x2", "y1", "y2", "create", "applyIndirectStyles", "applyDirectStyles", "applyChannelStyles", "applyTransform", "line", "rect", "frame", "defaults", "ignoreChannels", "Tip", "Mark", "data", "options", "isIterable", "isTextual", "identity", "x", "y", "x1", "x2", "y1", "y2", "anchor", "monospace", "fontFamily", "fontSize", "fontStyle", "fontVariant", "fontWeight", "lineHeight", "lineWidth", "frameAnchor", "textAnchor", "textOverflow", "textPadding", "title", "pointerSize", "pathFilter", "maybeAnchor", "maybeFrameAnchor", "impliedString", "string", "maybeTextOverflow", "number", "key", "splitter", "clipper", "index", "scales", "values", "dimensions", "context", "mark", "fx", "fy", "svg", "document", "r", "m", "marginTop", "marginLeft", "sources", "getSources", "X1", "Y1", "X2", "Y2", "X", "Y", "ox", "oy", "cx", "cy", "applyFrameAnchor", "px", "anchorX", "py", "anchorY", "widthof", "monospaceWidth", "defaultWidth", "ee", "ellipsis", "formatFx", "inferTickFormat", "formatFy", "format", "i", "text", "line", "formatDefault", "channel", "value", "defined", "formatLabel", "formatPair", "scale", "g", "create", "applyIndirectStyles", "applyIndirectTextStyles", "applyTransform", "applyDirectStyles", "that", "select_default", "names", "name", "renderLine", "selection", "color", "opacity", "swatch", "w", "j", "cut", "k", "postrender", "width", "height", "tx", "h", "a", "fitLeft", "fitRight", "fitTop", "fitBottom", "ax", "ay", "path", "getPath", "t", "getLineOffset", "getTextTranslate", "tip", "maybeTuple", "length", "channels", "source", "getSource", "c1", "c2", "c", "defaultLabel", "plot", "options", "facet", "style", "caption", "ariaLabel", "ariaDescription", "className", "maybeClassName", "marks", "flatMarks", "inferTips", "topFacetState", "maybeTopFacet", "facetStateByMark", "mark", "facetState", "maybeMarkFacet", "channelsByScale", "addScaleChannels", "axes", "inferAxes", "facets", "createFacets", "topFacetsIndex", "facetFilter", "nonEmpty", "facetsIndex", "index", "i", "f", "facetExclude", "key", "registry", "isScaleOptions", "stateByMark", "facetChannels", "data", "channels", "applyScaleTransforms", "scaleDescriptors", "createScales", "scales", "createScaleFunctions", "dimensions", "createDimensions", "autoScaleRange", "fx", "fy", "subdimensions", "innerDimensions", "superdimensions", "actualDimensions", "context", "createContext", "document", "svg", "creator_default", "figure", "createProjection", "facetGroups", "state", "value", "newByScale", "update", "inferChannelScales", "channel", "scale", "position", "applyScaleTransform", "newChannelsByScale", "newScaleDescriptors", "inheritScaleLabels", "newScales", "facetDomains", "facetTranslate", "recreateFacets", "facetTranslator", "width", "height", "select_default", "applyInlineStyles", "values", "indexes", "node", "g", "faceted", "subarray", "name", "legends", "createLegends", "legend", "figcaption", "exposeScales", "exposeLegends", "w", "consumeWarnings", "plotThis", "Mark", "markify", "Render", "render", "t", "type", "percent", "interval", "transform", "x", "maybeIntervalTransform", "map", "inferChannelScale", "filter", "yes", "hasProjection", "gx", "gy", "y", "getGeometryChannels", "addScaleChannel", "scaleChannels", "arrayify", "createChannel", "groups", "warn", "derive", "initializer", "tips", "pointerX", "pointerY", "pointer", "tip", "projection", "axis", "grid", "facetAxis", "facetGrid", "xAxis", "xGrid", "yAxis", "yGrid", "fxAxis", "fxGrid", "fyAxis", "fyGrid", "hasPositionChannel", "hasAxis", "maybeGrid", "gridFy", "maybeAxis", "axisFy", "gridFx", "axisFx", "gridY", "axisY", "gridX", "axisX", "axisType", "primary", "secondary", "defaults", "both", "isBoth", "axisOptions", "line", "isNone", "frame", "lineOptions", "gridType", "gridOptions", "anchor", "ticks", "tickSize", "tickSpacing", "tickPadding", "tickFormat", "tickRotate", "fontVariant", "label", "labelAnchor", "labelArrow", "labelOffset", "stroke", "isColor", "isGridTicks", "isIterable", "k", "prefix", "m", "newScale", "marginTop", "marginRight", "marginBottom", "marginLeft", "outerDimensions", "fxr", "outerRange", "fyr", "domain", "x1", "x2", "binX", "outputs", "options", "mergeOptions", "x", "y", "binn", "maybeBinValue", "identity", "maybeInsetX", "binn", "bx", "by", "gx", "gy", "reduceData", "reduceIdentity", "filter", "reduceCount", "sort", "reverse", "outputs", "inputs", "maybeBin", "maybeBinOutputs", "maybeBinReduce", "identity", "maybeBinOutput", "maybeBinEvaluator", "hasOutput", "BX1", "setBX1", "maybeColumn", "BX2", "setBX2", "BY1", "setBY1", "BY2", "setBY2", "k", "gk", "GK", "setGK", "x", "y", "z", "fill", "stroke", "x1", "x2", "y1", "y2", "domain", "cumulative", "thresholds", "interval", "options", "GZ", "setGZ", "vfill", "maybeColorChannel", "vstroke", "GF", "setGF", "GS", "setGS", "basic", "data", "facets", "plotOptions", "K", "maybeApplyInterval", "valueof", "Z", "F", "S", "G", "maybeSubgroup", "groupFacets", "groupData", "bin", "bing", "i", "o", "facet", "groupFacet", "f", "I", "maybeGroup", "g", "b", "extent", "maybeSort", "mid", "name", "output", "mergeOptions", "maybeBinValue", "value", "defaultValue", "maybeValue", "maybeThresholds", "maybeBin", "options", "value", "cumulative", "domain", "extent", "thresholds", "bin", "data", "V", "valueof", "T", "isTemporal", "isTimeThresholds", "map", "coerceDate", "min", "max", "t", "isInterval", "utcTickInterval", "coerceNumbers", "step", "tickIncrement", "r0", "r1", "n", "i", "ticks", "E", "bin1cn", "bin1cp", "bin1", "labelof", "maybeThresholds", "interval", "defaultThresholds", "thresholdAuto", "maybeRangeInterval", "thresholdFreedmanDiaconis", "thresholdScott", "thresholdSturges", "maybeUtcInterval", "maybeBinOutputs", "outputs", "inputs", "maybeOutputs", "maybeBinOutput", "name", "reduce", "maybeOutput", "maybeBinEvaluator", "maybeEvaluator", "maybeBinReduce", "maybeReduce", "maybeBinReduceFallback", "reduceX", "reduceX1", "reduceX2", "reduceY", "reduceY1", "reduceY2", "values", "isTimeInterval", "isIterable", "bing", "EX", "EY", "I", "X", "ix", "x1", "x2", "Y", "iy", "y1", "y2", "B", "bisect_default", "C", "b", "j", "mid1", "m", "maybeIdentityY", "options", "hasY", "identity", "stackY", "stackOptions", "options", "mergeOptions", "x1", "x", "y", "rest", "transform", "X", "y1", "y2", "stack", "mid", "maybeStackY", "y", "y1", "y2", "options", "withTip", "stackY", "maybeZero", "mergeOptions", "offset", "order", "reverse", "rest", "lengthy", "stack", "x", "one", "kx", "ky", "z", "maybeZ", "X", "setX", "maybeColumn", "Y1", "setY1", "column", "Y2", "setY2", "maybeOffset", "maybeOrder", "basic", "data", "facets", "plotOptions", "maybeApplyInterval", "valueof", "Y", "Z", "compare", "n", "facetstacks", "facet", "stacks", "group", "i", "yn", "yp", "offsetExpand", "offsetCenter", "offsetWiggle", "extent", "min", "max", "m", "offsetZero", "offsetCenterFacets", "prev", "InternMap", "j", "Fi", "Df", "value", "diff", "Cf1", "cumsum", "s1", "sum", "d", "I", "m0", "p", "orderInsideOut", "ascendingDefined", "negate", "descendingDefined", "orderY", "orderZ", "orderSum", "orderAppearance", "orderAccessor", "field", "orderComparator", "orderGiven", "orderZDomain", "groupSort", "range", "greatest", "K", "sums", "rollup", "Kp", "Kn", "k", "f", "O", "domain", "map", "AbstractBar", "Mark", "data", "channels", "options", "defaults", "inset", "insetTop", "insetRight", "insetBottom", "insetLeft", "rx", "ry", "number", "impliedString", "index", "scales", "dimensions", "context", "create", "applyIndirectStyles", "g", "applyDirectStyles", "applyAttr", "applyChannelStyles", "X", "marginLeft", "Y", "marginTop", "x", "marginRight", "width", "bandwidth", "y", "marginBottom", "height", "BarY", "AbstractBar", "data", "options", "x", "y1", "y2", "defaults", "selection", "mark", "y", "applyTransform", "Y1", "Y2", "marginTop", "insetTop", "isCollapsed", "i", "marginBottom", "height", "insetBottom", "barY", "data", "options", "hasXY", "indexOf", "identity", "BarY", "maybeStackY", "maybeIntervalY", "maybeIdentityY", "program", "counter", "partition", "histogram", "Data", "Name", "max", "d", "a", "b", "plot", "barY", "frame", "n", "fixKey", "k", "keys", "union", "index", "key", "i", "fx", "fy", "binX", "text", "axisX"]
+  "sources": ["../../../../node_modules/d3-array/src/ascending.js", "../../../../node_modules/d3-array/src/descending.js", "../../../../node_modules/d3-array/src/bisector.js", "../../../../node_modules/d3-array/src/number.js", "../../../../node_modules/d3-array/src/bisect.js", "../../../../node_modules/d3-array/src/count.js", "../../../../node_modules/d3-array/src/cross.js", "../../../../node_modules/d3-array/src/cumsum.js", "../../../../node_modules/d3-array/src/variance.js", "../../../../node_modules/d3-array/src/deviation.js", "../../../../node_modules/d3-array/src/extent.js", "../../../../node_modules/d3-array/src/fsum.js", "../../../../node_modules/internmap/src/index.js", "../../../../node_modules/d3-array/src/identity.js", "../../../../node_modules/d3-array/src/group.js", "../../../../node_modules/d3-array/src/permute.js", "../../../../node_modules/d3-array/src/sort.js", "../../../../node_modules/d3-array/src/groupSort.js", "../../../../node_modules/d3-array/src/ticks.js", "../../../../node_modules/d3-array/src/threshold/sturges.js", "../../../../node_modules/d3-array/src/max.js", "../../../../node_modules/d3-array/src/maxIndex.js", "../../../../node_modules/d3-array/src/min.js", "../../../../node_modules/d3-array/src/minIndex.js", "../../../../node_modules/d3-array/src/quickselect.js", "../../../../node_modules/d3-array/src/greatest.js", "../../../../node_modules/d3-array/src/quantile.js", "../../../../node_modules/d3-array/src/threshold/freedmanDiaconis.js", "../../../../node_modules/d3-array/src/threshold/scott.js", "../../../../node_modules/d3-array/src/mean.js", "../../../../node_modules/d3-array/src/median.js", "../../../../node_modules/d3-array/src/merge.js", "../../../../node_modules/d3-array/src/mode.js", "../../../../node_modules/d3-array/src/pairs.js", "../../../../node_modules/d3-array/src/range.js", "../../../../node_modules/d3-array/src/sum.js", "../../../../node_modules/d3-array/src/reverse.js", "../../../../node_modules/d3-array/src/union.js", "../../../../node_modules/d3-axis/src/identity.js", "../../../../node_modules/d3-axis/src/axis.js", "../../../../node_modules/d3-dispatch/src/dispatch.js", "../../../../node_modules/d3-selection/src/namespaces.js", "../../../../node_modules/d3-selection/src/namespace.js", "../../../../node_modules/d3-selection/src/creator.js", "../../../../node_modules/d3-selection/src/selector.js", "../../../../node_modules/d3-selection/src/selection/select.js", "../../../../node_modules/d3-selection/src/array.js", "../../../../node_modules/d3-selection/src/selectorAll.js", "../../../../node_modules/d3-selection/src/selection/selectAll.js", "../../../../node_modules/d3-selection/src/matcher.js", "../../../../node_modules/d3-selection/src/selection/selectChild.js", "../../../../node_modules/d3-selection/src/selection/selectChildren.js", "../../../../node_modules/d3-selection/src/selection/filter.js", "../../../../node_modules/d3-selection/src/selection/sparse.js", "../../../../node_modules/d3-selection/src/selection/enter.js", "../../../../node_modules/d3-selection/src/constant.js", "../../../../node_modules/d3-selection/src/selection/data.js", "../../../../node_modules/d3-selection/src/selection/exit.js", "../../../../node_modules/d3-selection/src/selection/join.js", "../../../../node_modules/d3-selection/src/selection/merge.js", "../../../../node_modules/d3-selection/src/selection/order.js", "../../../../node_modules/d3-selection/src/selection/sort.js", "../../../../node_modules/d3-selection/src/selection/call.js", "../../../../node_modules/d3-selection/src/selection/nodes.js", "../../../../node_modules/d3-selection/src/selection/node.js", "../../../../node_modules/d3-selection/src/selection/size.js", "../../../../node_modules/d3-selection/src/selection/empty.js", "../../../../node_modules/d3-selection/src/selection/each.js", "../../../../node_modules/d3-selection/src/selection/attr.js", "../../../../node_modules/d3-selection/src/window.js", "../../../../node_modules/d3-selection/src/selection/style.js", "../../../../node_modules/d3-selection/src/selection/property.js", "../../../../node_modules/d3-selection/src/selection/classed.js", "../../../../node_modules/d3-selection/src/selection/text.js", "../../../../node_modules/d3-selection/src/selection/html.js", "../../../../node_modules/d3-selection/src/selection/raise.js", "../../../../node_modules/d3-selection/src/selection/lower.js", "../../../../node_modules/d3-selection/src/selection/append.js", "../../../../node_modules/d3-selection/src/selection/insert.js", "../../../../node_modules/d3-selection/src/selection/remove.js", "../../../../node_modules/d3-selection/src/selection/clone.js", "../../../../node_modules/d3-selection/src/selection/datum.js", "../../../../node_modules/d3-selection/src/selection/on.js", "../../../../node_modules/d3-selection/src/selection/dispatch.js", "../../../../node_modules/d3-selection/src/selection/iterator.js", "../../../../node_modules/d3-selection/src/selection/index.js", "../../../../node_modules/d3-selection/src/select.js", "../../../../node_modules/d3-selection/src/sourceEvent.js", "../../../../node_modules/d3-selection/src/pointer.js", "../../../../node_modules/d3-color/src/define.js", "../../../../node_modules/d3-color/src/color.js", "../../../../node_modules/d3-color/src/math.js", "../../../../node_modules/d3-color/src/lab.js", "../../../../node_modules/d3-color/src/cubehelix.js", "../../../../node_modules/d3-interpolate/src/basis.js", "../../../../node_modules/d3-interpolate/src/basisClosed.js", "../../../../node_modules/d3-interpolate/src/constant.js", "../../../../node_modules/d3-interpolate/src/color.js", "../../../../node_modules/d3-interpolate/src/rgb.js", "../../../../node_modules/d3-interpolate/src/numberArray.js", "../../../../node_modules/d3-interpolate/src/array.js", "../../../../node_modules/d3-interpolate/src/date.js", "../../../../node_modules/d3-interpolate/src/number.js", "../../../../node_modules/d3-interpolate/src/object.js", "../../../../node_modules/d3-interpolate/src/string.js", "../../../../node_modules/d3-interpolate/src/value.js", "../../../../node_modules/d3-interpolate/src/round.js", "../../../../node_modules/d3-interpolate/src/transform/decompose.js", "../../../../node_modules/d3-interpolate/src/transform/parse.js", "../../../../node_modules/d3-interpolate/src/transform/index.js", "../../../../node_modules/d3-interpolate/src/hsl.js", "../../../../node_modules/d3-interpolate/src/lab.js", "../../../../node_modules/d3-interpolate/src/hcl.js", "../../../../node_modules/d3-interpolate/src/cubehelix.js", "../../../../node_modules/d3-interpolate/src/piecewise.js", "../../../../node_modules/d3-interpolate/src/quantize.js", "../../../../node_modules/d3-timer/src/timer.js", "../../../../node_modules/d3-timer/src/timeout.js", "../../../../node_modules/d3-transition/src/transition/schedule.js", "../../../../node_modules/d3-transition/src/interrupt.js", "../../../../node_modules/d3-transition/src/selection/interrupt.js", "../../../../node_modules/d3-transition/src/transition/tween.js", "../../../../node_modules/d3-transition/src/transition/interpolate.js", "../../../../node_modules/d3-transition/src/transition/attr.js", "../../../../node_modules/d3-transition/src/transition/attrTween.js", "../../../../node_modules/d3-transition/src/transition/delay.js", "../../../../node_modules/d3-transition/src/transition/duration.js", "../../../../node_modules/d3-transition/src/transition/ease.js", "../../../../node_modules/d3-transition/src/transition/easeVarying.js", "../../../../node_modules/d3-transition/src/transition/filter.js", "../../../../node_modules/d3-transition/src/transition/merge.js", "../../../../node_modules/d3-transition/src/transition/on.js", "../../../../node_modules/d3-transition/src/transition/remove.js", "../../../../node_modules/d3-transition/src/transition/select.js", "../../../../node_modules/d3-transition/src/transition/selectAll.js", "../../../../node_modules/d3-transition/src/transition/selection.js", "../../../../node_modules/d3-transition/src/transition/style.js", "../../../../node_modules/d3-transition/src/transition/styleTween.js", "../../../../node_modules/d3-transition/src/transition/text.js", "../../../../node_modules/d3-transition/src/transition/textTween.js", "../../../../node_modules/d3-transition/src/transition/transition.js", "../../../../node_modules/d3-transition/src/transition/end.js", "../../../../node_modules/d3-transition/src/transition/index.js", "../../../../node_modules/d3-ease/src/cubic.js", "../../../../node_modules/d3-transition/src/selection/transition.js", "../../../../node_modules/d3-transition/src/selection/index.js", "../../../../node_modules/d3-brush/src/brush.js", "../../../../node_modules/d3-path/src/path.js", "../../../../node_modules/d3-format/src/formatDecimal.js", "../../../../node_modules/d3-format/src/exponent.js", "../../../../node_modules/d3-format/src/formatGroup.js", "../../../../node_modules/d3-format/src/formatNumerals.js", "../../../../node_modules/d3-format/src/formatSpecifier.js", "../../../../node_modules/d3-format/src/formatTrim.js", "../../../../node_modules/d3-format/src/formatPrefixAuto.js", "../../../../node_modules/d3-format/src/formatRounded.js", "../../../../node_modules/d3-format/src/formatTypes.js", "../../../../node_modules/d3-format/src/identity.js", "../../../../node_modules/d3-format/src/locale.js", "../../../../node_modules/d3-format/src/defaultLocale.js", "../../../../node_modules/d3-format/src/precisionFixed.js", "../../../../node_modules/d3-format/src/precisionPrefix.js", "../../../../node_modules/d3-format/src/precisionRound.js", "../../../../node_modules/d3-geo/src/math.js", "../../../../node_modules/d3-geo/src/noop.js", "../../../../node_modules/d3-geo/src/stream.js", "../../../../node_modules/d3-geo/src/cartesian.js", "../../../../node_modules/d3-geo/src/compose.js", "../../../../node_modules/d3-geo/src/rotation.js", "../../../../node_modules/d3-geo/src/circle.js", "../../../../node_modules/d3-geo/src/clip/buffer.js", "../../../../node_modules/d3-geo/src/pointEqual.js", "../../../../node_modules/d3-geo/src/clip/rejoin.js", "../../../../node_modules/d3-geo/src/polygonContains.js", "../../../../node_modules/d3-geo/src/clip/index.js", "../../../../node_modules/d3-geo/src/clip/antimeridian.js", "../../../../node_modules/d3-geo/src/clip/circle.js", "../../../../node_modules/d3-geo/src/clip/line.js", "../../../../node_modules/d3-geo/src/clip/rectangle.js", "../../../../node_modules/d3-geo/src/identity.js", "../../../../node_modules/d3-geo/src/path/area.js", "../../../../node_modules/d3-geo/src/path/bounds.js", "../../../../node_modules/d3-geo/src/path/centroid.js", "../../../../node_modules/d3-geo/src/path/context.js", "../../../../node_modules/d3-geo/src/path/measure.js", "../../../../node_modules/d3-geo/src/path/string.js", "../../../../node_modules/d3-geo/src/path/index.js", "../../../../node_modules/d3-geo/src/transform.js", "../../../../node_modules/d3-geo/src/projection/fit.js", "../../../../node_modules/d3-geo/src/projection/resample.js", "../../../../node_modules/d3-geo/src/projection/index.js", "../../../../node_modules/d3-geo/src/projection/conic.js", "../../../../node_modules/d3-geo/src/projection/cylindricalEqualArea.js", "../../../../node_modules/d3-geo/src/projection/conicEqualArea.js", "../../../../node_modules/d3-geo/src/projection/albers.js", "../../../../node_modules/d3-geo/src/projection/albersUsa.js", "../../../../node_modules/d3-geo/src/projection/azimuthal.js", "../../../../node_modules/d3-geo/src/projection/azimuthalEqualArea.js", "../../../../node_modules/d3-geo/src/projection/azimuthalEquidistant.js", "../../../../node_modules/d3-geo/src/projection/mercator.js", "../../../../node_modules/d3-geo/src/projection/conicConformal.js", "../../../../node_modules/d3-geo/src/projection/equirectangular.js", "../../../../node_modules/d3-geo/src/projection/conicEquidistant.js", "../../../../node_modules/d3-geo/src/projection/equalEarth.js", "../../../../node_modules/d3-geo/src/projection/gnomonic.js", "../../../../node_modules/d3-geo/src/projection/orthographic.js", "../../../../node_modules/d3-geo/src/projection/stereographic.js", "../../../../node_modules/d3-geo/src/projection/transverseMercator.js", "../../../../node_modules/d3-scale/src/init.js", "../../../../node_modules/d3-scale/src/ordinal.js", "../../../../node_modules/d3-scale/src/band.js", "../../../../node_modules/d3-scale/src/constant.js", "../../../../node_modules/d3-scale/src/number.js", "../../../../node_modules/d3-scale/src/continuous.js", "../../../../node_modules/d3-scale/src/tickFormat.js", "../../../../node_modules/d3-scale/src/linear.js", "../../../../node_modules/d3-scale/src/identity.js", "../../../../node_modules/d3-scale/src/nice.js", "../../../../node_modules/d3-scale/src/log.js", "../../../../node_modules/d3-scale/src/symlog.js", "../../../../node_modules/d3-scale/src/pow.js", "../../../../node_modules/d3-scale/src/quantile.js", "../../../../node_modules/d3-scale/src/threshold.js", "../../../../node_modules/d3-time/src/interval.js", "../../../../node_modules/d3-time/src/millisecond.js", "../../../../node_modules/d3-time/src/second.js", "../../../../node_modules/d3-time/src/minute.js", "../../../../node_modules/d3-time/src/hour.js", "../../../../node_modules/d3-time/src/day.js", "../../../../node_modules/d3-time/src/week.js", "../../../../node_modules/d3-time/src/month.js", "../../../../node_modules/d3-time/src/year.js", "../../../../node_modules/d3-time/src/ticks.js", "../../../../node_modules/d3-time-format/src/locale.js", "../../../../node_modules/d3-time-format/src/defaultLocale.js", "../../../../node_modules/d3-scale/src/time.js", "../../../../node_modules/d3-scale/src/utcTime.js", "../../../../node_modules/d3-scale/src/sequential.js", "../../../../node_modules/d3-scale/src/diverging.js", "../../../../node_modules/d3-scale-chromatic/src/colors.js", "../../../../node_modules/d3-scale-chromatic/src/categorical/category10.js", "../../../../node_modules/d3-scale-chromatic/src/categorical/Accent.js", "../../../../node_modules/d3-scale-chromatic/src/categorical/Dark2.js", "../../../../node_modules/d3-scale-chromatic/src/categorical/Paired.js", "../../../../node_modules/d3-scale-chromatic/src/categorical/Pastel1.js", "../../../../node_modules/d3-scale-chromatic/src/categorical/Pastel2.js", "../../../../node_modules/d3-scale-chromatic/src/categorical/Set1.js", "../../../../node_modules/d3-scale-chromatic/src/categorical/Set2.js", "../../../../node_modules/d3-scale-chromatic/src/categorical/Set3.js", "../../../../node_modules/d3-scale-chromatic/src/categorical/Tableau10.js", "../../../../node_modules/d3-scale-chromatic/src/ramp.js", "../../../../node_modules/d3-scale-chromatic/src/diverging/BrBG.js", "../../../../node_modules/d3-scale-chromatic/src/diverging/PRGn.js", "../../../../node_modules/d3-scale-chromatic/src/diverging/PiYG.js", "../../../../node_modules/d3-scale-chromatic/src/diverging/PuOr.js", "../../../../node_modules/d3-scale-chromatic/src/diverging/RdBu.js", "../../../../node_modules/d3-scale-chromatic/src/diverging/RdGy.js", "../../../../node_modules/d3-scale-chromatic/src/diverging/RdYlBu.js", "../../../../node_modules/d3-scale-chromatic/src/diverging/RdYlGn.js", "../../../../node_modules/d3-scale-chromatic/src/diverging/Spectral.js", "../../../../node_modules/d3-scale-chromatic/src/sequential-multi/BuGn.js", "../../../../node_modules/d3-scale-chromatic/src/sequential-multi/BuPu.js", "../../../../node_modules/d3-scale-chromatic/src/sequential-multi/GnBu.js", "../../../../node_modules/d3-scale-chromatic/src/sequential-multi/OrRd.js", "../../../../node_modules/d3-scale-chromatic/src/sequential-multi/PuBuGn.js", "../../../../node_modules/d3-scale-chromatic/src/sequential-multi/PuBu.js", "../../../../node_modules/d3-scale-chromatic/src/sequential-multi/PuRd.js", "../../../../node_modules/d3-scale-chromatic/src/sequential-multi/RdPu.js", "../../../../node_modules/d3-scale-chromatic/src/sequential-multi/YlGnBu.js", "../../../../node_modules/d3-scale-chromatic/src/sequential-multi/YlGn.js", "../../../../node_modules/d3-scale-chromatic/src/sequential-multi/YlOrBr.js", "../../../../node_modules/d3-scale-chromatic/src/sequential-multi/YlOrRd.js", "../../../../node_modules/d3-scale-chromatic/src/sequential-single/Blues.js", "../../../../node_modules/d3-scale-chromatic/src/sequential-single/Greens.js", "../../../../node_modules/d3-scale-chromatic/src/sequential-single/Greys.js", "../../../../node_modules/d3-scale-chromatic/src/sequential-single/Purples.js", "../../../../node_modules/d3-scale-chromatic/src/sequential-single/Reds.js", "../../../../node_modules/d3-scale-chromatic/src/sequential-single/Oranges.js", "../../../../node_modules/d3-scale-chromatic/src/sequential-multi/cividis.js", "../../../../node_modules/d3-scale-chromatic/src/sequential-multi/cubehelix.js", "../../../../node_modules/d3-scale-chromatic/src/sequential-multi/rainbow.js", "../../../../node_modules/d3-scale-chromatic/src/sequential-multi/sinebow.js", "../../../../node_modules/d3-scale-chromatic/src/sequential-multi/turbo.js", "../../../../node_modules/d3-scale-chromatic/src/sequential-multi/viridis.js", "../../../../node_modules/d3-shape/src/math.js", "../../../../node_modules/d3-shape/src/symbol/asterisk.js", "../../../../node_modules/d3-shape/src/symbol/circle.js", "../../../../node_modules/d3-shape/src/symbol/cross.js", "../../../../node_modules/d3-shape/src/symbol/diamond.js", "../../../../node_modules/d3-shape/src/symbol/diamond2.js", "../../../../node_modules/d3-shape/src/symbol/plus.js", "../../../../node_modules/d3-shape/src/symbol/square.js", "../../../../node_modules/d3-shape/src/symbol/square2.js", "../../../../node_modules/d3-shape/src/symbol/star.js", "../../../../node_modules/d3-shape/src/symbol/triangle.js", "../../../../node_modules/d3-shape/src/symbol/triangle2.js", "../../../../node_modules/d3-shape/src/symbol/wye.js", "../../../../node_modules/d3-shape/src/symbol/times.js", "../../../../node_modules/d3-shape/src/symbol.js", "../../../../node_modules/d3-zoom/src/transform.js", "../../../../node_modules/@observablehq/plot/src/defined.js", "../../../../node_modules/isoformat/src/format.js", "../../../../node_modules/isoformat/src/parse.js", "../../../../node_modules/@observablehq/plot/src/time.js", "../../../../node_modules/@observablehq/plot/src/options.js", "../../../../node_modules/@observablehq/plot/src/scales/index.js", "../../../../node_modules/@observablehq/plot/src/symbol.js", "../../../../node_modules/@observablehq/plot/src/transforms/basic.js", "../../../../node_modules/@observablehq/plot/src/transforms/group.js", "../../../../node_modules/@observablehq/plot/src/channel.js", "../../../../node_modules/@observablehq/plot/src/context.js", "../../../../node_modules/@observablehq/plot/src/warnings.js", "../../../../node_modules/@observablehq/plot/src/projection.js", "../../../../node_modules/@observablehq/plot/src/scales/schemes.js", "../../../../node_modules/@observablehq/plot/src/scales/quantitative.js", "../../../../node_modules/@observablehq/plot/src/scales/diverging.js", "../../../../node_modules/@observablehq/plot/src/scales/temporal.js", "../../../../node_modules/@observablehq/plot/src/scales/ordinal.js", "../../../../node_modules/@observablehq/plot/src/scales.js", "../../../../node_modules/@observablehq/plot/src/memoize.js", "../../../../node_modules/@observablehq/plot/src/format.js", "../../../../node_modules/@observablehq/plot/src/style.js", "../../../../node_modules/@observablehq/plot/src/dimensions.js", "../../../../node_modules/@observablehq/plot/src/facet.js", "../../../../node_modules/@observablehq/plot/src/mark.js", "../../../../node_modules/@observablehq/plot/src/interactions/pointer.js", "../../../../node_modules/@observablehq/plot/src/axes.js", "../../../../node_modules/@observablehq/plot/src/legends/ramp.js", "../../../../node_modules/@observablehq/plot/src/math.js", "../../../../node_modules/@observablehq/plot/src/marker.js", "../../../../node_modules/@observablehq/plot/src/transforms/inset.js", "../../../../node_modules/@observablehq/plot/src/transforms/interval.js", "../../../../node_modules/@observablehq/plot/src/marks/rule.js", "../../../../node_modules/@observablehq/plot/src/template.js", "../../../../node_modules/@observablehq/plot/src/marks/text.js", "../../../../node_modules/@observablehq/plot/src/marks/vector.js", "../../../../node_modules/@observablehq/plot/src/marks/axis.js", "../../../../node_modules/@observablehq/plot/src/legends/swatches.js", "../../../../node_modules/@observablehq/plot/src/legends.js", "../../../../node_modules/@observablehq/plot/src/marks/frame.js", "../../../../node_modules/@observablehq/plot/src/marks/tip.js", "../../../../node_modules/@observablehq/plot/src/plot.js", "../../../../node_modules/@observablehq/plot/src/transforms/bin.js", "../../../../node_modules/@observablehq/plot/src/transforms/identity.js", "../../../../node_modules/@observablehq/plot/src/transforms/stack.js", "../../../../node_modules/@observablehq/plot/src/marks/bar.js", "../../shared/treenav.ts", "../charts.ts"],
+  "sourcesContent": ["export default function ascending(a, b) {\n  return a == null || b == null ? NaN : a < b ? -1 : a > b ? 1 : a >= b ? 0 : NaN;\n}\n", "export default function descending(a, b) {\n  return a == null || b == null ? NaN\n    : b < a ? -1\n    : b > a ? 1\n    : b >= a ? 0\n    : NaN;\n}\n", "import ascending from \"./ascending.js\";\nimport descending from \"./descending.js\";\n\nexport default function bisector(f) {\n  let compare1, compare2, delta;\n\n  // If an accessor is specified, promote it to a comparator. In this case we\n  // can test whether the search value is (self-) comparable. We can\u2019t do this\n  // for a comparator (except for specific, known comparators) because we can\u2019t\n  // tell if the comparator is symmetric, and an asymmetric comparator can\u2019t be\n  // used to test whether a single value is comparable.\n  if (f.length !== 2) {\n    compare1 = ascending;\n    compare2 = (d, x) => ascending(f(d), x);\n    delta = (d, x) => f(d) - x;\n  } else {\n    compare1 = f === ascending || f === descending ? f : zero;\n    compare2 = f;\n    delta = f;\n  }\n\n  function left(a, x, lo = 0, hi = a.length) {\n    if (lo < hi) {\n      if (compare1(x, x) !== 0) return hi;\n      do {\n        const mid = (lo + hi) >>> 1;\n        if (compare2(a[mid], x) < 0) lo = mid + 1;\n        else hi = mid;\n      } while (lo < hi);\n    }\n    return lo;\n  }\n\n  function right(a, x, lo = 0, hi = a.length) {\n    if (lo < hi) {\n      if (compare1(x, x) !== 0) return hi;\n      do {\n        const mid = (lo + hi) >>> 1;\n        if (compare2(a[mid], x) <= 0) lo = mid + 1;\n        else hi = mid;\n      } while (lo < hi);\n    }\n    return lo;\n  }\n\n  function center(a, x, lo = 0, hi = a.length) {\n    const i = left(a, x, lo, hi - 1);\n    return i > lo && delta(a[i - 1], x) > -delta(a[i], x) ? i - 1 : i;\n  }\n\n  return {left, center, right};\n}\n\nfunction zero() {\n  return 0;\n}\n", "export default function number(x) {\n  return x === null ? NaN : +x;\n}\n\nexport function* numbers(values, valueof) {\n  if (valueof === undefined) {\n    for (let value of values) {\n      if (value != null && (value = +value) >= value) {\n        yield value;\n      }\n    }\n  } else {\n    let index = -1;\n    for (let value of values) {\n      if ((value = valueof(value, ++index, values)) != null && (value = +value) >= value) {\n        yield value;\n      }\n    }\n  }\n}\n", "import ascending from \"./ascending.js\";\nimport bisector from \"./bisector.js\";\nimport number from \"./number.js\";\n\nconst ascendingBisect = bisector(ascending);\nexport const bisectRight = ascendingBisect.right;\nexport const bisectLeft = ascendingBisect.left;\nexport const bisectCenter = bisector(number).center;\nexport default bisectRight;\n", "export default function count(values, valueof) {\n  let count = 0;\n  if (valueof === undefined) {\n    for (let value of values) {\n      if (value != null && (value = +value) >= value) {\n        ++count;\n      }\n    }\n  } else {\n    let index = -1;\n    for (let value of values) {\n      if ((value = valueof(value, ++index, values)) != null && (value = +value) >= value) {\n        ++count;\n      }\n    }\n  }\n  return count;\n}\n", "function length(array) {\n  return array.length | 0;\n}\n\nfunction empty(length) {\n  return !(length > 0);\n}\n\nfunction arrayify(values) {\n  return typeof values !== \"object\" || \"length\" in values ? values : Array.from(values);\n}\n\nfunction reducer(reduce) {\n  return values => reduce(...values);\n}\n\nexport default function cross(...values) {\n  const reduce = typeof values[values.length - 1] === \"function\" && reducer(values.pop());\n  values = values.map(arrayify);\n  const lengths = values.map(length);\n  const j = values.length - 1;\n  const index = new Array(j + 1).fill(0);\n  const product = [];\n  if (j < 0 || lengths.some(empty)) return product;\n  while (true) {\n    product.push(index.map((j, i) => values[i][j]));\n    let i = j;\n    while (++index[i] === lengths[i]) {\n      if (i === 0) return reduce ? product.map(reduce) : product;\n      index[i--] = 0;\n    }\n  }\n}\n", "export default function cumsum(values, valueof) {\n  var sum = 0, index = 0;\n  return Float64Array.from(values, valueof === undefined\n    ? v => (sum += +v || 0)\n    : v => (sum += +valueof(v, index++, values) || 0));\n}", "export default function variance(values, valueof) {\n  let count = 0;\n  let delta;\n  let mean = 0;\n  let sum = 0;\n  if (valueof === undefined) {\n    for (let value of values) {\n      if (value != null && (value = +value) >= value) {\n        delta = value - mean;\n        mean += delta / ++count;\n        sum += delta * (value - mean);\n      }\n    }\n  } else {\n    let index = -1;\n    for (let value of values) {\n      if ((value = valueof(value, ++index, values)) != null && (value = +value) >= value) {\n        delta = value - mean;\n        mean += delta / ++count;\n        sum += delta * (value - mean);\n      }\n    }\n  }\n  if (count > 1) return sum / (count - 1);\n}\n", "import variance from \"./variance.js\";\n\nexport default function deviation(values, valueof) {\n  const v = variance(values, valueof);\n  return v ? Math.sqrt(v) : v;\n}\n", "export default function extent(values, valueof) {\n  let min;\n  let max;\n  if (valueof === undefined) {\n    for (const value of values) {\n      if (value != null) {\n        if (min === undefined) {\n          if (value >= value) min = max = value;\n        } else {\n          if (min > value) min = value;\n          if (max < value) max = value;\n        }\n      }\n    }\n  } else {\n    let index = -1;\n    for (let value of values) {\n      if ((value = valueof(value, ++index, values)) != null) {\n        if (min === undefined) {\n          if (value >= value) min = max = value;\n        } else {\n          if (min > value) min = value;\n          if (max < value) max = value;\n        }\n      }\n    }\n  }\n  return [min, max];\n}\n", "// https://github.com/python/cpython/blob/a74eea238f5baba15797e2e8b570d153bc8690a7/Modules/mathmodule.c#L1423\nexport class Adder {\n  constructor() {\n    this._partials = new Float64Array(32);\n    this._n = 0;\n  }\n  add(x) {\n    const p = this._partials;\n    let i = 0;\n    for (let j = 0; j < this._n && j < 32; j++) {\n      const y = p[j],\n        hi = x + y,\n        lo = Math.abs(x) < Math.abs(y) ? x - (hi - y) : y - (hi - x);\n      if (lo) p[i++] = lo;\n      x = hi;\n    }\n    p[i] = x;\n    this._n = i + 1;\n    return this;\n  }\n  valueOf() {\n    const p = this._partials;\n    let n = this._n, x, y, lo, hi = 0;\n    if (n > 0) {\n      hi = p[--n];\n      while (n > 0) {\n        x = hi;\n        y = p[--n];\n        hi = x + y;\n        lo = y - (hi - x);\n        if (lo) break;\n      }\n      if (n > 0 && ((lo < 0 && p[n - 1] < 0) || (lo > 0 && p[n - 1] > 0))) {\n        y = lo * 2;\n        x = hi + y;\n        if (y == x - hi) hi = x;\n      }\n    }\n    return hi;\n  }\n}\n\nexport function fsum(values, valueof) {\n  const adder = new Adder();\n  if (valueof === undefined) {\n    for (let value of values) {\n      if (value = +value) {\n        adder.add(value);\n      }\n    }\n  } else {\n    let index = -1;\n    for (let value of values) {\n      if (value = +valueof(value, ++index, values)) {\n        adder.add(value);\n      }\n    }\n  }\n  return +adder;\n}\n\nexport function fcumsum(values, valueof) {\n  const adder = new Adder();\n  let index = -1;\n  return Float64Array.from(values, valueof === undefined\n      ? v => adder.add(+v || 0)\n      : v => adder.add(+valueof(v, ++index, values) || 0)\n  );\n}\n", "export class InternMap extends Map {\n  constructor(entries, key = keyof) {\n    super();\n    Object.defineProperties(this, {_intern: {value: new Map()}, _key: {value: key}});\n    if (entries != null) for (const [key, value] of entries) this.set(key, value);\n  }\n  get(key) {\n    return super.get(intern_get(this, key));\n  }\n  has(key) {\n    return super.has(intern_get(this, key));\n  }\n  set(key, value) {\n    return super.set(intern_set(this, key), value);\n  }\n  delete(key) {\n    return super.delete(intern_delete(this, key));\n  }\n}\n\nexport class InternSet extends Set {\n  constructor(values, key = keyof) {\n    super();\n    Object.defineProperties(this, {_intern: {value: new Map()}, _key: {value: key}});\n    if (values != null) for (const value of values) this.add(value);\n  }\n  has(value) {\n    return super.has(intern_get(this, value));\n  }\n  add(value) {\n    return super.add(intern_set(this, value));\n  }\n  delete(value) {\n    return super.delete(intern_delete(this, value));\n  }\n}\n\nfunction intern_get({_intern, _key}, value) {\n  const key = _key(value);\n  return _intern.has(key) ? _intern.get(key) : value;\n}\n\nfunction intern_set({_intern, _key}, value) {\n  const key = _key(value);\n  if (_intern.has(key)) return _intern.get(key);\n  _intern.set(key, value);\n  return value;\n}\n\nfunction intern_delete({_intern, _key}, value) {\n  const key = _key(value);\n  if (_intern.has(key)) {\n    value = _intern.get(key);\n    _intern.delete(key);\n  }\n  return value;\n}\n\nfunction keyof(value) {\n  return value !== null && typeof value === \"object\" ? value.valueOf() : value;\n}\n", "export default function identity(x) {\n  return x;\n}\n", "import {InternMap} from \"internmap\";\nimport identity from \"./identity.js\";\n\nexport default function group(values, ...keys) {\n  return nest(values, identity, identity, keys);\n}\n\nexport function groups(values, ...keys) {\n  return nest(values, Array.from, identity, keys);\n}\n\nfunction flatten(groups, keys) {\n  for (let i = 1, n = keys.length; i < n; ++i) {\n    groups = groups.flatMap(g => g.pop().map(([key, value]) => [...g, key, value]));\n  }\n  return groups;\n}\n\nexport function flatGroup(values, ...keys) {\n  return flatten(groups(values, ...keys), keys);\n}\n\nexport function flatRollup(values, reduce, ...keys) {\n  return flatten(rollups(values, reduce, ...keys), keys);\n}\n\nexport function rollup(values, reduce, ...keys) {\n  return nest(values, identity, reduce, keys);\n}\n\nexport function rollups(values, reduce, ...keys) {\n  return nest(values, Array.from, reduce, keys);\n}\n\nexport function index(values, ...keys) {\n  return nest(values, identity, unique, keys);\n}\n\nexport function indexes(values, ...keys) {\n  return nest(values, Array.from, unique, keys);\n}\n\nfunction unique(values) {\n  if (values.length !== 1) throw new Error(\"duplicate key\");\n  return values[0];\n}\n\nfunction nest(values, map, reduce, keys) {\n  return (function regroup(values, i) {\n    if (i >= keys.length) return reduce(values);\n    const groups = new InternMap();\n    const keyof = keys[i++];\n    let index = -1;\n    for (const value of values) {\n      const key = keyof(value, ++index, values);\n      const group = groups.get(key);\n      if (group) group.push(value);\n      else groups.set(key, [value]);\n    }\n    for (const [key, values] of groups) {\n      groups.set(key, regroup(values, i));\n    }\n    return map(groups);\n  })(values, 0);\n}\n", "export default function permute(source, keys) {\n  return Array.from(keys, key => source[key]);\n}\n", "import ascending from \"./ascending.js\";\nimport permute from \"./permute.js\";\n\nexport default function sort(values, ...F) {\n  if (typeof values[Symbol.iterator] !== \"function\") throw new TypeError(\"values is not iterable\");\n  values = Array.from(values);\n  let [f] = F;\n  if ((f && f.length !== 2) || F.length > 1) {\n    const index = Uint32Array.from(values, (d, i) => i);\n    if (F.length > 1) {\n      F = F.map(f => values.map(f));\n      index.sort((i, j) => {\n        for (const f of F) {\n          const c = ascendingDefined(f[i], f[j]);\n          if (c) return c;\n        }\n      });\n    } else {\n      f = values.map(f);\n      index.sort((i, j) => ascendingDefined(f[i], f[j]));\n    }\n    return permute(values, index);\n  }\n  return values.sort(compareDefined(f));\n}\n\nexport function compareDefined(compare = ascending) {\n  if (compare === ascending) return ascendingDefined;\n  if (typeof compare !== \"function\") throw new TypeError(\"compare is not a function\");\n  return (a, b) => {\n    const x = compare(a, b);\n    if (x || x === 0) return x;\n    return (compare(b, b) === 0) - (compare(a, a) === 0);\n  };\n}\n\nexport function ascendingDefined(a, b) {\n  return (a == null || !(a >= a)) - (b == null || !(b >= b)) || (a < b ? -1 : a > b ? 1 : 0);\n}\n", "import ascending from \"./ascending.js\";\nimport group, {rollup} from \"./group.js\";\nimport sort from \"./sort.js\";\n\nexport default function groupSort(values, reduce, key) {\n  return (reduce.length !== 2\n    ? sort(rollup(values, reduce, key), (([ak, av], [bk, bv]) => ascending(av, bv) || ascending(ak, bk)))\n    : sort(group(values, key), (([ak, av], [bk, bv]) => reduce(av, bv) || ascending(ak, bk))))\n    .map(([key]) => key);\n}\n", "const e10 = Math.sqrt(50),\n    e5 = Math.sqrt(10),\n    e2 = Math.sqrt(2);\n\nfunction tickSpec(start, stop, count) {\n  const step = (stop - start) / Math.max(0, count),\n      power = Math.floor(Math.log10(step)),\n      error = step / Math.pow(10, power),\n      factor = error >= e10 ? 10 : error >= e5 ? 5 : error >= e2 ? 2 : 1;\n  let i1, i2, inc;\n  if (power < 0) {\n    inc = Math.pow(10, -power) / factor;\n    i1 = Math.round(start * inc);\n    i2 = Math.round(stop * inc);\n    if (i1 / inc < start) ++i1;\n    if (i2 / inc > stop) --i2;\n    inc = -inc;\n  } else {\n    inc = Math.pow(10, power) * factor;\n    i1 = Math.round(start / inc);\n    i2 = Math.round(stop / inc);\n    if (i1 * inc < start) ++i1;\n    if (i2 * inc > stop) --i2;\n  }\n  if (i2 < i1 && 0.5 <= count && count < 2) return tickSpec(start, stop, count * 2);\n  return [i1, i2, inc];\n}\n\nexport default function ticks(start, stop, count) {\n  stop = +stop, start = +start, count = +count;\n  if (!(count > 0)) return [];\n  if (start === stop) return [start];\n  const reverse = stop < start, [i1, i2, inc] = reverse ? tickSpec(stop, start, count) : tickSpec(start, stop, count);\n  if (!(i2 >= i1)) return [];\n  const n = i2 - i1 + 1, ticks = new Array(n);\n  if (reverse) {\n    if (inc < 0) for (let i = 0; i < n; ++i) ticks[i] = (i2 - i) / -inc;\n    else for (let i = 0; i < n; ++i) ticks[i] = (i2 - i) * inc;\n  } else {\n    if (inc < 0) for (let i = 0; i < n; ++i) ticks[i] = (i1 + i) / -inc;\n    else for (let i = 0; i < n; ++i) ticks[i] = (i1 + i) * inc;\n  }\n  return ticks;\n}\n\nexport function tickIncrement(start, stop, count) {\n  stop = +stop, start = +start, count = +count;\n  return tickSpec(start, stop, count)[2];\n}\n\nexport function tickStep(start, stop, count) {\n  stop = +stop, start = +start, count = +count;\n  const reverse = stop < start, inc = reverse ? tickIncrement(stop, start, count) : tickIncrement(start, stop, count);\n  return (reverse ? -1 : 1) * (inc < 0 ? 1 / -inc : inc);\n}\n", "import count from \"../count.js\";\n\nexport default function thresholdSturges(values) {\n  return Math.max(1, Math.ceil(Math.log(count(values)) / Math.LN2) + 1);\n}\n", "export default function max(values, valueof) {\n  let max;\n  if (valueof === undefined) {\n    for (const value of values) {\n      if (value != null\n          && (max < value || (max === undefined && value >= value))) {\n        max = value;\n      }\n    }\n  } else {\n    let index = -1;\n    for (let value of values) {\n      if ((value = valueof(value, ++index, values)) != null\n          && (max < value || (max === undefined && value >= value))) {\n        max = value;\n      }\n    }\n  }\n  return max;\n}\n", "export default function maxIndex(values, valueof) {\n  let max;\n  let maxIndex = -1;\n  let index = -1;\n  if (valueof === undefined) {\n    for (const value of values) {\n      ++index;\n      if (value != null\n          && (max < value || (max === undefined && value >= value))) {\n        max = value, maxIndex = index;\n      }\n    }\n  } else {\n    for (let value of values) {\n      if ((value = valueof(value, ++index, values)) != null\n          && (max < value || (max === undefined && value >= value))) {\n        max = value, maxIndex = index;\n      }\n    }\n  }\n  return maxIndex;\n}\n", "export default function min(values, valueof) {\n  let min;\n  if (valueof === undefined) {\n    for (const value of values) {\n      if (value != null\n          && (min > value || (min === undefined && value >= value))) {\n        min = value;\n      }\n    }\n  } else {\n    let index = -1;\n    for (let value of values) {\n      if ((value = valueof(value, ++index, values)) != null\n          && (min > value || (min === undefined && value >= value))) {\n        min = value;\n      }\n    }\n  }\n  return min;\n}\n", "export default function minIndex(values, valueof) {\n  let min;\n  let minIndex = -1;\n  let index = -1;\n  if (valueof === undefined) {\n    for (const value of values) {\n      ++index;\n      if (value != null\n          && (min > value || (min === undefined && value >= value))) {\n        min = value, minIndex = index;\n      }\n    }\n  } else {\n    for (let value of values) {\n      if ((value = valueof(value, ++index, values)) != null\n          && (min > value || (min === undefined && value >= value))) {\n        min = value, minIndex = index;\n      }\n    }\n  }\n  return minIndex;\n}\n", "import {ascendingDefined, compareDefined} from \"./sort.js\";\n\n// Based on https://github.com/mourner/quickselect\n// ISC license, Copyright 2018 Vladimir Agafonkin.\nexport default function quickselect(array, k, left = 0, right = Infinity, compare) {\n  k = Math.floor(k);\n  left = Math.floor(Math.max(0, left));\n  right = Math.floor(Math.min(array.length - 1, right));\n\n  if (!(left <= k && k <= right)) return array;\n\n  compare = compare === undefined ? ascendingDefined : compareDefined(compare);\n\n  while (right > left) {\n    if (right - left > 600) {\n      const n = right - left + 1;\n      const m = k - left + 1;\n      const z = Math.log(n);\n      const s = 0.5 * Math.exp(2 * z / 3);\n      const sd = 0.5 * Math.sqrt(z * s * (n - s) / n) * (m - n / 2 < 0 ? -1 : 1);\n      const newLeft = Math.max(left, Math.floor(k - m * s / n + sd));\n      const newRight = Math.min(right, Math.floor(k + (n - m) * s / n + sd));\n      quickselect(array, k, newLeft, newRight, compare);\n    }\n\n    const t = array[k];\n    let i = left;\n    let j = right;\n\n    swap(array, left, k);\n    if (compare(array[right], t) > 0) swap(array, left, right);\n\n    while (i < j) {\n      swap(array, i, j), ++i, --j;\n      while (compare(array[i], t) < 0) ++i;\n      while (compare(array[j], t) > 0) --j;\n    }\n\n    if (compare(array[left], t) === 0) swap(array, left, j);\n    else ++j, swap(array, j, right);\n\n    if (j <= k) left = j + 1;\n    if (k <= j) right = j - 1;\n  }\n\n  return array;\n}\n\nfunction swap(array, i, j) {\n  const t = array[i];\n  array[i] = array[j];\n  array[j] = t;\n}\n", "import ascending from \"./ascending.js\";\n\nexport default function greatest(values, compare = ascending) {\n  let max;\n  let defined = false;\n  if (compare.length === 1) {\n    let maxValue;\n    for (const element of values) {\n      const value = compare(element);\n      if (defined\n          ? ascending(value, maxValue) > 0\n          : ascending(value, value) === 0) {\n        max = element;\n        maxValue = value;\n        defined = true;\n      }\n    }\n  } else {\n    for (const value of values) {\n      if (defined\n          ? compare(value, max) > 0\n          : compare(value, value) === 0) {\n        max = value;\n        defined = true;\n      }\n    }\n  }\n  return max;\n}\n", "import max from \"./max.js\";\nimport maxIndex from \"./maxIndex.js\";\nimport min from \"./min.js\";\nimport minIndex from \"./minIndex.js\";\nimport quickselect from \"./quickselect.js\";\nimport number, {numbers} from \"./number.js\";\nimport {ascendingDefined} from \"./sort.js\";\nimport greatest from \"./greatest.js\";\n\nexport default function quantile(values, p, valueof) {\n  values = Float64Array.from(numbers(values, valueof));\n  if (!(n = values.length) || isNaN(p = +p)) return;\n  if (p <= 0 || n < 2) return min(values);\n  if (p >= 1) return max(values);\n  var n,\n      i = (n - 1) * p,\n      i0 = Math.floor(i),\n      value0 = max(quickselect(values, i0).subarray(0, i0 + 1)),\n      value1 = min(values.subarray(i0 + 1));\n  return value0 + (value1 - value0) * (i - i0);\n}\n\nexport function quantileSorted(values, p, valueof = number) {\n  if (!(n = values.length) || isNaN(p = +p)) return;\n  if (p <= 0 || n < 2) return +valueof(values[0], 0, values);\n  if (p >= 1) return +valueof(values[n - 1], n - 1, values);\n  var n,\n      i = (n - 1) * p,\n      i0 = Math.floor(i),\n      value0 = +valueof(values[i0], i0, values),\n      value1 = +valueof(values[i0 + 1], i0 + 1, values);\n  return value0 + (value1 - value0) * (i - i0);\n}\n\nexport function quantileIndex(values, p, valueof) {\n  values = Float64Array.from(numbers(values, valueof));\n  if (!(n = values.length) || isNaN(p = +p)) return;\n  if (p <= 0 || n < 2) return minIndex(values);\n  if (p >= 1) return maxIndex(values);\n  var n,\n      i = Math.floor((n - 1) * p),\n      order = (i, j) => ascendingDefined(values[i], values[j]),\n      index = quickselect(Uint32Array.from(values, (_, i) => i), i, 0, n - 1, order);\n  return greatest(index.subarray(0, i + 1), i => values[i]);\n}\n", "import count from \"../count.js\";\nimport quantile from \"../quantile.js\";\n\nexport default function thresholdFreedmanDiaconis(values, min, max) {\n  const c = count(values), d = quantile(values, 0.75) - quantile(values, 0.25);\n  return c && d ? Math.ceil((max - min) / (2 * d * Math.pow(c, -1 / 3))) : 1;\n}\n", "import count from \"../count.js\";\nimport deviation from \"../deviation.js\";\n\nexport default function thresholdScott(values, min, max) {\n  const c = count(values), d = deviation(values);\n  return c && d ? Math.ceil((max - min) * Math.cbrt(c) / (3.49 * d)) : 1;\n}\n", "export default function mean(values, valueof) {\n  let count = 0;\n  let sum = 0;\n  if (valueof === undefined) {\n    for (let value of values) {\n      if (value != null && (value = +value) >= value) {\n        ++count, sum += value;\n      }\n    }\n  } else {\n    let index = -1;\n    for (let value of values) {\n      if ((value = valueof(value, ++index, values)) != null && (value = +value) >= value) {\n        ++count, sum += value;\n      }\n    }\n  }\n  if (count) return sum / count;\n}\n", "import quantile, {quantileIndex} from \"./quantile.js\";\n\nexport default function median(values, valueof) {\n  return quantile(values, 0.5, valueof);\n}\n\nexport function medianIndex(values, valueof) {\n  return quantileIndex(values, 0.5, valueof);\n}\n", "function* flatten(arrays) {\n  for (const array of arrays) {\n    yield* array;\n  }\n}\n\nexport default function merge(arrays) {\n  return Array.from(flatten(arrays));\n}\n", "import {InternMap} from \"internmap\";\n\nexport default function mode(values, valueof) {\n  const counts = new InternMap();\n  if (valueof === undefined) {\n    for (let value of values) {\n      if (value != null && value >= value) {\n        counts.set(value, (counts.get(value) || 0) + 1);\n      }\n    }\n  } else {\n    let index = -1;\n    for (let value of values) {\n      if ((value = valueof(value, ++index, values)) != null && value >= value) {\n        counts.set(value, (counts.get(value) || 0) + 1);\n      }\n    }\n  }\n  let modeValue;\n  let modeCount = 0;\n  for (const [value, count] of counts) {\n    if (count > modeCount) {\n      modeCount = count;\n      modeValue = value;\n    }\n  }\n  return modeValue;\n}\n", "export default function pairs(values, pairof = pair) {\n  const pairs = [];\n  let previous;\n  let first = false;\n  for (const value of values) {\n    if (first) pairs.push(pairof(previous, value));\n    previous = value;\n    first = true;\n  }\n  return pairs;\n}\n\nexport function pair(a, b) {\n  return [a, b];\n}\n", "export default function range(start, stop, step) {\n  start = +start, stop = +stop, step = (n = arguments.length) < 2 ? (stop = start, start = 0, 1) : n < 3 ? 1 : +step;\n\n  var i = -1,\n      n = Math.max(0, Math.ceil((stop - start) / step)) | 0,\n      range = new Array(n);\n\n  while (++i < n) {\n    range[i] = start + i * step;\n  }\n\n  return range;\n}\n", "export default function sum(values, valueof) {\n  let sum = 0;\n  if (valueof === undefined) {\n    for (let value of values) {\n      if (value = +value) {\n        sum += value;\n      }\n    }\n  } else {\n    let index = -1;\n    for (let value of values) {\n      if (value = +valueof(value, ++index, values)) {\n        sum += value;\n      }\n    }\n  }\n  return sum;\n}\n", "export default function reverse(values) {\n  if (typeof values[Symbol.iterator] !== \"function\") throw new TypeError(\"values is not iterable\");\n  return Array.from(values).reverse();\n}\n", "import {InternSet} from \"internmap\";\n\nexport default function union(...others) {\n  const set = new InternSet();\n  for (const other of others) {\n    for (const o of other) {\n      set.add(o);\n    }\n  }\n  return set;\n}\n", "export default function(x) {\n  return x;\n}\n", "import identity from \"./identity.js\";\n\nvar top = 1,\n    right = 2,\n    bottom = 3,\n    left = 4,\n    epsilon = 1e-6;\n\nfunction translateX(x) {\n  return \"translate(\" + x + \",0)\";\n}\n\nfunction translateY(y) {\n  return \"translate(0,\" + y + \")\";\n}\n\nfunction number(scale) {\n  return d => +scale(d);\n}\n\nfunction center(scale, offset) {\n  offset = Math.max(0, scale.bandwidth() - offset * 2) / 2;\n  if (scale.round()) offset = Math.round(offset);\n  return d => +scale(d) + offset;\n}\n\nfunction entering() {\n  return !this.__axis;\n}\n\nfunction axis(orient, scale) {\n  var tickArguments = [],\n      tickValues = null,\n      tickFormat = null,\n      tickSizeInner = 6,\n      tickSizeOuter = 6,\n      tickPadding = 3,\n      offset = typeof window !== \"undefined\" && window.devicePixelRatio > 1 ? 0 : 0.5,\n      k = orient === top || orient === left ? -1 : 1,\n      x = orient === left || orient === right ? \"x\" : \"y\",\n      transform = orient === top || orient === bottom ? translateX : translateY;\n\n  function axis(context) {\n    var values = tickValues == null ? (scale.ticks ? scale.ticks.apply(scale, tickArguments) : scale.domain()) : tickValues,\n        format = tickFormat == null ? (scale.tickFormat ? scale.tickFormat.apply(scale, tickArguments) : identity) : tickFormat,\n        spacing = Math.max(tickSizeInner, 0) + tickPadding,\n        range = scale.range(),\n        range0 = +range[0] + offset,\n        range1 = +range[range.length - 1] + offset,\n        position = (scale.bandwidth ? center : number)(scale.copy(), offset),\n        selection = context.selection ? context.selection() : context,\n        path = selection.selectAll(\".domain\").data([null]),\n        tick = selection.selectAll(\".tick\").data(values, scale).order(),\n        tickExit = tick.exit(),\n        tickEnter = tick.enter().append(\"g\").attr(\"class\", \"tick\"),\n        line = tick.select(\"line\"),\n        text = tick.select(\"text\");\n\n    path = path.merge(path.enter().insert(\"path\", \".tick\")\n        .attr(\"class\", \"domain\")\n        .attr(\"stroke\", \"currentColor\"));\n\n    tick = tick.merge(tickEnter);\n\n    line = line.merge(tickEnter.append(\"line\")\n        .attr(\"stroke\", \"currentColor\")\n        .attr(x + \"2\", k * tickSizeInner));\n\n    text = text.merge(tickEnter.append(\"text\")\n        .attr(\"fill\", \"currentColor\")\n        .attr(x, k * spacing)\n        .attr(\"dy\", orient === top ? \"0em\" : orient === bottom ? \"0.71em\" : \"0.32em\"));\n\n    if (context !== selection) {\n      path = path.transition(context);\n      tick = tick.transition(context);\n      line = line.transition(context);\n      text = text.transition(context);\n\n      tickExit = tickExit.transition(context)\n          .attr(\"opacity\", epsilon)\n          .attr(\"transform\", function(d) { return isFinite(d = position(d)) ? transform(d + offset) : this.getAttribute(\"transform\"); });\n\n      tickEnter\n          .attr(\"opacity\", epsilon)\n          .attr(\"transform\", function(d) { var p = this.parentNode.__axis; return transform((p && isFinite(p = p(d)) ? p : position(d)) + offset); });\n    }\n\n    tickExit.remove();\n\n    path\n        .attr(\"d\", orient === left || orient === right\n            ? (tickSizeOuter ? \"M\" + k * tickSizeOuter + \",\" + range0 + \"H\" + offset + \"V\" + range1 + \"H\" + k * tickSizeOuter : \"M\" + offset + \",\" + range0 + \"V\" + range1)\n            : (tickSizeOuter ? \"M\" + range0 + \",\" + k * tickSizeOuter + \"V\" + offset + \"H\" + range1 + \"V\" + k * tickSizeOuter : \"M\" + range0 + \",\" + offset + \"H\" + range1));\n\n    tick\n        .attr(\"opacity\", 1)\n        .attr(\"transform\", function(d) { return transform(position(d) + offset); });\n\n    line\n        .attr(x + \"2\", k * tickSizeInner);\n\n    text\n        .attr(x, k * spacing)\n        .text(format);\n\n    selection.filter(entering)\n        .attr(\"fill\", \"none\")\n        .attr(\"font-size\", 10)\n        .attr(\"font-family\", \"sans-serif\")\n        .attr(\"text-anchor\", orient === right ? \"start\" : orient === left ? \"end\" : \"middle\");\n\n    selection\n        .each(function() { this.__axis = position; });\n  }\n\n  axis.scale = function(_) {\n    return arguments.length ? (scale = _, axis) : scale;\n  };\n\n  axis.ticks = function() {\n    return tickArguments = Array.from(arguments), axis;\n  };\n\n  axis.tickArguments = function(_) {\n    return arguments.length ? (tickArguments = _ == null ? [] : Array.from(_), axis) : tickArguments.slice();\n  };\n\n  axis.tickValues = function(_) {\n    return arguments.length ? (tickValues = _ == null ? null : Array.from(_), axis) : tickValues && tickValues.slice();\n  };\n\n  axis.tickFormat = function(_) {\n    return arguments.length ? (tickFormat = _, axis) : tickFormat;\n  };\n\n  axis.tickSize = function(_) {\n    return arguments.length ? (tickSizeInner = tickSizeOuter = +_, axis) : tickSizeInner;\n  };\n\n  axis.tickSizeInner = function(_) {\n    return arguments.length ? (tickSizeInner = +_, axis) : tickSizeInner;\n  };\n\n  axis.tickSizeOuter = function(_) {\n    return arguments.length ? (tickSizeOuter = +_, axis) : tickSizeOuter;\n  };\n\n  axis.tickPadding = function(_) {\n    return arguments.length ? (tickPadding = +_, axis) : tickPadding;\n  };\n\n  axis.offset = function(_) {\n    return arguments.length ? (offset = +_, axis) : offset;\n  };\n\n  return axis;\n}\n\nexport function axisTop(scale) {\n  return axis(top, scale);\n}\n\nexport function axisRight(scale) {\n  return axis(right, scale);\n}\n\nexport function axisBottom(scale) {\n  return axis(bottom, scale);\n}\n\nexport function axisLeft(scale) {\n  return axis(left, scale);\n}\n", "var noop = {value: () => {}};\n\nfunction dispatch() {\n  for (var i = 0, n = arguments.length, _ = {}, t; i < n; ++i) {\n    if (!(t = arguments[i] + \"\") || (t in _) || /[\\s.]/.test(t)) throw new Error(\"illegal type: \" + t);\n    _[t] = [];\n  }\n  return new Dispatch(_);\n}\n\nfunction Dispatch(_) {\n  this._ = _;\n}\n\nfunction parseTypenames(typenames, types) {\n  return typenames.trim().split(/^|\\s+/).map(function(t) {\n    var name = \"\", i = t.indexOf(\".\");\n    if (i >= 0) name = t.slice(i + 1), t = t.slice(0, i);\n    if (t && !types.hasOwnProperty(t)) throw new Error(\"unknown type: \" + t);\n    return {type: t, name: name};\n  });\n}\n\nDispatch.prototype = dispatch.prototype = {\n  constructor: Dispatch,\n  on: function(typename, callback) {\n    var _ = this._,\n        T = parseTypenames(typename + \"\", _),\n        t,\n        i = -1,\n        n = T.length;\n\n    // If no callback was specified, return the callback of the given type and name.\n    if (arguments.length < 2) {\n      while (++i < n) if ((t = (typename = T[i]).type) && (t = get(_[t], typename.name))) return t;\n      return;\n    }\n\n    // If a type was specified, set the callback for the given type and name.\n    // Otherwise, if a null callback was specified, remove callbacks of the given name.\n    if (callback != null && typeof callback !== \"function\") throw new Error(\"invalid callback: \" + callback);\n    while (++i < n) {\n      if (t = (typename = T[i]).type) _[t] = set(_[t], typename.name, callback);\n      else if (callback == null) for (t in _) _[t] = set(_[t], typename.name, null);\n    }\n\n    return this;\n  },\n  copy: function() {\n    var copy = {}, _ = this._;\n    for (var t in _) copy[t] = _[t].slice();\n    return new Dispatch(copy);\n  },\n  call: function(type, that) {\n    if ((n = arguments.length - 2) > 0) for (var args = new Array(n), i = 0, n, t; i < n; ++i) args[i] = arguments[i + 2];\n    if (!this._.hasOwnProperty(type)) throw new Error(\"unknown type: \" + type);\n    for (t = this._[type], i = 0, n = t.length; i < n; ++i) t[i].value.apply(that, args);\n  },\n  apply: function(type, that, args) {\n    if (!this._.hasOwnProperty(type)) throw new Error(\"unknown type: \" + type);\n    for (var t = this._[type], i = 0, n = t.length; i < n; ++i) t[i].value.apply(that, args);\n  }\n};\n\nfunction get(type, name) {\n  for (var i = 0, n = type.length, c; i < n; ++i) {\n    if ((c = type[i]).name === name) {\n      return c.value;\n    }\n  }\n}\n\nfunction set(type, name, callback) {\n  for (var i = 0, n = type.length; i < n; ++i) {\n    if (type[i].name === name) {\n      type[i] = noop, type = type.slice(0, i).concat(type.slice(i + 1));\n      break;\n    }\n  }\n  if (callback != null) type.push({name: name, value: callback});\n  return type;\n}\n\nexport default dispatch;\n", "export var xhtml = \"http://www.w3.org/1999/xhtml\";\n\nexport default {\n  svg: \"http://www.w3.org/2000/svg\",\n  xhtml: xhtml,\n  xlink: \"http://www.w3.org/1999/xlink\",\n  xml: \"http://www.w3.org/XML/1998/namespace\",\n  xmlns: \"http://www.w3.org/2000/xmlns/\"\n};\n", "import namespaces from \"./namespaces.js\";\n\nexport default function(name) {\n  var prefix = name += \"\", i = prefix.indexOf(\":\");\n  if (i >= 0 && (prefix = name.slice(0, i)) !== \"xmlns\") name = name.slice(i + 1);\n  return namespaces.hasOwnProperty(prefix) ? {space: namespaces[prefix], local: name} : name; // eslint-disable-line no-prototype-builtins\n}\n", "import namespace from \"./namespace.js\";\nimport {xhtml} from \"./namespaces.js\";\n\nfunction creatorInherit(name) {\n  return function() {\n    var document = this.ownerDocument,\n        uri = this.namespaceURI;\n    return uri === xhtml && document.documentElement.namespaceURI === xhtml\n        ? document.createElement(name)\n        : document.createElementNS(uri, name);\n  };\n}\n\nfunction creatorFixed(fullname) {\n  return function() {\n    return this.ownerDocument.createElementNS(fullname.space, fullname.local);\n  };\n}\n\nexport default function(name) {\n  var fullname = namespace(name);\n  return (fullname.local\n      ? creatorFixed\n      : creatorInherit)(fullname);\n}\n", "function none() {}\n\nexport default function(selector) {\n  return selector == null ? none : function() {\n    return this.querySelector(selector);\n  };\n}\n", "import {Selection} from \"./index.js\";\nimport selector from \"../selector.js\";\n\nexport default function(select) {\n  if (typeof select !== \"function\") select = selector(select);\n\n  for (var groups = this._groups, m = groups.length, subgroups = new Array(m), j = 0; j < m; ++j) {\n    for (var group = groups[j], n = group.length, subgroup = subgroups[j] = new Array(n), node, subnode, i = 0; i < n; ++i) {\n      if ((node = group[i]) && (subnode = select.call(node, node.__data__, i, group))) {\n        if (\"__data__\" in node) subnode.__data__ = node.__data__;\n        subgroup[i] = subnode;\n      }\n    }\n  }\n\n  return new Selection(subgroups, this._parents);\n}\n", "// Given something array like (or null), returns something that is strictly an\n// array. This is used to ensure that array-like objects passed to d3.selectAll\n// or selection.selectAll are converted into proper arrays when creating a\n// selection; we don\u2019t ever want to create a selection backed by a live\n// HTMLCollection or NodeList. However, note that selection.selectAll will use a\n// static NodeList as a group, since it safely derived from querySelectorAll.\nexport default function array(x) {\n  return x == null ? [] : Array.isArray(x) ? x : Array.from(x);\n}\n", "function empty() {\n  return [];\n}\n\nexport default function(selector) {\n  return selector == null ? empty : function() {\n    return this.querySelectorAll(selector);\n  };\n}\n", "import {Selection} from \"./index.js\";\nimport array from \"../array.js\";\nimport selectorAll from \"../selectorAll.js\";\n\nfunction arrayAll(select) {\n  return function() {\n    return array(select.apply(this, arguments));\n  };\n}\n\nexport default function(select) {\n  if (typeof select === \"function\") select = arrayAll(select);\n  else select = selectorAll(select);\n\n  for (var groups = this._groups, m = groups.length, subgroups = [], parents = [], j = 0; j < m; ++j) {\n    for (var group = groups[j], n = group.length, node, i = 0; i < n; ++i) {\n      if (node = group[i]) {\n        subgroups.push(select.call(node, node.__data__, i, group));\n        parents.push(node);\n      }\n    }\n  }\n\n  return new Selection(subgroups, parents);\n}\n", "export default function(selector) {\n  return function() {\n    return this.matches(selector);\n  };\n}\n\nexport function childMatcher(selector) {\n  return function(node) {\n    return node.matches(selector);\n  };\n}\n\n", "import {childMatcher} from \"../matcher.js\";\n\nvar find = Array.prototype.find;\n\nfunction childFind(match) {\n  return function() {\n    return find.call(this.children, match);\n  };\n}\n\nfunction childFirst() {\n  return this.firstElementChild;\n}\n\nexport default function(match) {\n  return this.select(match == null ? childFirst\n      : childFind(typeof match === \"function\" ? match : childMatcher(match)));\n}\n", "import {childMatcher} from \"../matcher.js\";\n\nvar filter = Array.prototype.filter;\n\nfunction children() {\n  return Array.from(this.children);\n}\n\nfunction childrenFilter(match) {\n  return function() {\n    return filter.call(this.children, match);\n  };\n}\n\nexport default function(match) {\n  return this.selectAll(match == null ? children\n      : childrenFilter(typeof match === \"function\" ? match : childMatcher(match)));\n}\n", "import {Selection} from \"./index.js\";\nimport matcher from \"../matcher.js\";\n\nexport default function(match) {\n  if (typeof match !== \"function\") match = matcher(match);\n\n  for (var groups = this._groups, m = groups.length, subgroups = new Array(m), j = 0; j < m; ++j) {\n    for (var group = groups[j], n = group.length, subgroup = subgroups[j] = [], node, i = 0; i < n; ++i) {\n      if ((node = group[i]) && match.call(node, node.__data__, i, group)) {\n        subgroup.push(node);\n      }\n    }\n  }\n\n  return new Selection(subgroups, this._parents);\n}\n", "export default function(update) {\n  return new Array(update.length);\n}\n", "import sparse from \"./sparse.js\";\nimport {Selection} from \"./index.js\";\n\nexport default function() {\n  return new Selection(this._enter || this._groups.map(sparse), this._parents);\n}\n\nexport function EnterNode(parent, datum) {\n  this.ownerDocument = parent.ownerDocument;\n  this.namespaceURI = parent.namespaceURI;\n  this._next = null;\n  this._parent = parent;\n  this.__data__ = datum;\n}\n\nEnterNode.prototype = {\n  constructor: EnterNode,\n  appendChild: function(child) { return this._parent.insertBefore(child, this._next); },\n  insertBefore: function(child, next) { return this._parent.insertBefore(child, next); },\n  querySelector: function(selector) { return this._parent.querySelector(selector); },\n  querySelectorAll: function(selector) { return this._parent.querySelectorAll(selector); }\n};\n", "export default function(x) {\n  return function() {\n    return x;\n  };\n}\n", "import {Selection} from \"./index.js\";\nimport {EnterNode} from \"./enter.js\";\nimport constant from \"../constant.js\";\n\nfunction bindIndex(parent, group, enter, update, exit, data) {\n  var i = 0,\n      node,\n      groupLength = group.length,\n      dataLength = data.length;\n\n  // Put any non-null nodes that fit into update.\n  // Put any null nodes into enter.\n  // Put any remaining data into enter.\n  for (; i < dataLength; ++i) {\n    if (node = group[i]) {\n      node.__data__ = data[i];\n      update[i] = node;\n    } else {\n      enter[i] = new EnterNode(parent, data[i]);\n    }\n  }\n\n  // Put any non-null nodes that don\u2019t fit into exit.\n  for (; i < groupLength; ++i) {\n    if (node = group[i]) {\n      exit[i] = node;\n    }\n  }\n}\n\nfunction bindKey(parent, group, enter, update, exit, data, key) {\n  var i,\n      node,\n      nodeByKeyValue = new Map,\n      groupLength = group.length,\n      dataLength = data.length,\n      keyValues = new Array(groupLength),\n      keyValue;\n\n  // Compute the key for each node.\n  // If multiple nodes have the same key, the duplicates are added to exit.\n  for (i = 0; i < groupLength; ++i) {\n    if (node = group[i]) {\n      keyValues[i] = keyValue = key.call(node, node.__data__, i, group) + \"\";\n      if (nodeByKeyValue.has(keyValue)) {\n        exit[i] = node;\n      } else {\n        nodeByKeyValue.set(keyValue, node);\n      }\n    }\n  }\n\n  // Compute the key for each datum.\n  // If there a node associated with this key, join and add it to update.\n  // If there is not (or the key is a duplicate), add it to enter.\n  for (i = 0; i < dataLength; ++i) {\n    keyValue = key.call(parent, data[i], i, data) + \"\";\n    if (node = nodeByKeyValue.get(keyValue)) {\n      update[i] = node;\n      node.__data__ = data[i];\n      nodeByKeyValue.delete(keyValue);\n    } else {\n      enter[i] = new EnterNode(parent, data[i]);\n    }\n  }\n\n  // Add any remaining nodes that were not bound to data to exit.\n  for (i = 0; i < groupLength; ++i) {\n    if ((node = group[i]) && (nodeByKeyValue.get(keyValues[i]) === node)) {\n      exit[i] = node;\n    }\n  }\n}\n\nfunction datum(node) {\n  return node.__data__;\n}\n\nexport default function(value, key) {\n  if (!arguments.length) return Array.from(this, datum);\n\n  var bind = key ? bindKey : bindIndex,\n      parents = this._parents,\n      groups = this._groups;\n\n  if (typeof value !== \"function\") value = constant(value);\n\n  for (var m = groups.length, update = new Array(m), enter = new Array(m), exit = new Array(m), j = 0; j < m; ++j) {\n    var parent = parents[j],\n        group = groups[j],\n        groupLength = group.length,\n        data = arraylike(value.call(parent, parent && parent.__data__, j, parents)),\n        dataLength = data.length,\n        enterGroup = enter[j] = new Array(dataLength),\n        updateGroup = update[j] = new Array(dataLength),\n        exitGroup = exit[j] = new Array(groupLength);\n\n    bind(parent, group, enterGroup, updateGroup, exitGroup, data, key);\n\n    // Now connect the enter nodes to their following update node, such that\n    // appendChild can insert the materialized enter node before this node,\n    // rather than at the end of the parent node.\n    for (var i0 = 0, i1 = 0, previous, next; i0 < dataLength; ++i0) {\n      if (previous = enterGroup[i0]) {\n        if (i0 >= i1) i1 = i0 + 1;\n        while (!(next = updateGroup[i1]) && ++i1 < dataLength);\n        previous._next = next || null;\n      }\n    }\n  }\n\n  update = new Selection(update, parents);\n  update._enter = enter;\n  update._exit = exit;\n  return update;\n}\n\n// Given some data, this returns an array-like view of it: an object that\n// exposes a length property and allows numeric indexing. Note that unlike\n// selectAll, this isn\u2019t worried about \u201Clive\u201D collections because the resulting\n// array will only be used briefly while data is being bound. (It is possible to\n// cause the data to change while iterating by using a key function, but please\n// don\u2019t; we\u2019d rather avoid a gratuitous copy.)\nfunction arraylike(data) {\n  return typeof data === \"object\" && \"length\" in data\n    ? data // Array, TypedArray, NodeList, array-like\n    : Array.from(data); // Map, Set, iterable, string, or anything else\n}\n", "import sparse from \"./sparse.js\";\nimport {Selection} from \"./index.js\";\n\nexport default function() {\n  return new Selection(this._exit || this._groups.map(sparse), this._parents);\n}\n", "export default function(onenter, onupdate, onexit) {\n  var enter = this.enter(), update = this, exit = this.exit();\n  if (typeof onenter === \"function\") {\n    enter = onenter(enter);\n    if (enter) enter = enter.selection();\n  } else {\n    enter = enter.append(onenter + \"\");\n  }\n  if (onupdate != null) {\n    update = onupdate(update);\n    if (update) update = update.selection();\n  }\n  if (onexit == null) exit.remove(); else onexit(exit);\n  return enter && update ? enter.merge(update).order() : update;\n}\n", "import {Selection} from \"./index.js\";\n\nexport default function(context) {\n  var selection = context.selection ? context.selection() : context;\n\n  for (var groups0 = this._groups, groups1 = selection._groups, m0 = groups0.length, m1 = groups1.length, m = Math.min(m0, m1), merges = new Array(m0), j = 0; j < m; ++j) {\n    for (var group0 = groups0[j], group1 = groups1[j], n = group0.length, merge = merges[j] = new Array(n), node, i = 0; i < n; ++i) {\n      if (node = group0[i] || group1[i]) {\n        merge[i] = node;\n      }\n    }\n  }\n\n  for (; j < m0; ++j) {\n    merges[j] = groups0[j];\n  }\n\n  return new Selection(merges, this._parents);\n}\n", "export default function() {\n\n  for (var groups = this._groups, j = -1, m = groups.length; ++j < m;) {\n    for (var group = groups[j], i = group.length - 1, next = group[i], node; --i >= 0;) {\n      if (node = group[i]) {\n        if (next && node.compareDocumentPosition(next) ^ 4) next.parentNode.insertBefore(node, next);\n        next = node;\n      }\n    }\n  }\n\n  return this;\n}\n", "import {Selection} from \"./index.js\";\n\nexport default function(compare) {\n  if (!compare) compare = ascending;\n\n  function compareNode(a, b) {\n    return a && b ? compare(a.__data__, b.__data__) : !a - !b;\n  }\n\n  for (var groups = this._groups, m = groups.length, sortgroups = new Array(m), j = 0; j < m; ++j) {\n    for (var group = groups[j], n = group.length, sortgroup = sortgroups[j] = new Array(n), node, i = 0; i < n; ++i) {\n      if (node = group[i]) {\n        sortgroup[i] = node;\n      }\n    }\n    sortgroup.sort(compareNode);\n  }\n\n  return new Selection(sortgroups, this._parents).order();\n}\n\nfunction ascending(a, b) {\n  return a < b ? -1 : a > b ? 1 : a >= b ? 0 : NaN;\n}\n", "export default function() {\n  var callback = arguments[0];\n  arguments[0] = this;\n  callback.apply(null, arguments);\n  return this;\n}\n", "export default function() {\n  return Array.from(this);\n}\n", "export default function() {\n\n  for (var groups = this._groups, j = 0, m = groups.length; j < m; ++j) {\n    for (var group = groups[j], i = 0, n = group.length; i < n; ++i) {\n      var node = group[i];\n      if (node) return node;\n    }\n  }\n\n  return null;\n}\n", "export default function() {\n  let size = 0;\n  for (const node of this) ++size; // eslint-disable-line no-unused-vars\n  return size;\n}\n", "export default function() {\n  return !this.node();\n}\n", "export default function(callback) {\n\n  for (var groups = this._groups, j = 0, m = groups.length; j < m; ++j) {\n    for (var group = groups[j], i = 0, n = group.length, node; i < n; ++i) {\n      if (node = group[i]) callback.call(node, node.__data__, i, group);\n    }\n  }\n\n  return this;\n}\n", "import namespace from \"../namespace.js\";\n\nfunction attrRemove(name) {\n  return function() {\n    this.removeAttribute(name);\n  };\n}\n\nfunction attrRemoveNS(fullname) {\n  return function() {\n    this.removeAttributeNS(fullname.space, fullname.local);\n  };\n}\n\nfunction attrConstant(name, value) {\n  return function() {\n    this.setAttribute(name, value);\n  };\n}\n\nfunction attrConstantNS(fullname, value) {\n  return function() {\n    this.setAttributeNS(fullname.space, fullname.local, value);\n  };\n}\n\nfunction attrFunction(name, value) {\n  return function() {\n    var v = value.apply(this, arguments);\n    if (v == null) this.removeAttribute(name);\n    else this.setAttribute(name, v);\n  };\n}\n\nfunction attrFunctionNS(fullname, value) {\n  return function() {\n    var v = value.apply(this, arguments);\n    if (v == null) this.removeAttributeNS(fullname.space, fullname.local);\n    else this.setAttributeNS(fullname.space, fullname.local, v);\n  };\n}\n\nexport default function(name, value) {\n  var fullname = namespace(name);\n\n  if (arguments.length < 2) {\n    var node = this.node();\n    return fullname.local\n        ? node.getAttributeNS(fullname.space, fullname.local)\n        : node.getAttribute(fullname);\n  }\n\n  return this.each((value == null\n      ? (fullname.local ? attrRemoveNS : attrRemove) : (typeof value === \"function\"\n      ? (fullname.local ? attrFunctionNS : attrFunction)\n      : (fullname.local ? attrConstantNS : attrConstant)))(fullname, value));\n}\n", "export default function(node) {\n  return (node.ownerDocument && node.ownerDocument.defaultView) // node is a Node\n      || (node.document && node) // node is a Window\n      || node.defaultView; // node is a Document\n}\n", "import defaultView from \"../window.js\";\n\nfunction styleRemove(name) {\n  return function() {\n    this.style.removeProperty(name);\n  };\n}\n\nfunction styleConstant(name, value, priority) {\n  return function() {\n    this.style.setProperty(name, value, priority);\n  };\n}\n\nfunction styleFunction(name, value, priority) {\n  return function() {\n    var v = value.apply(this, arguments);\n    if (v == null) this.style.removeProperty(name);\n    else this.style.setProperty(name, v, priority);\n  };\n}\n\nexport default function(name, value, priority) {\n  return arguments.length > 1\n      ? this.each((value == null\n            ? styleRemove : typeof value === \"function\"\n            ? styleFunction\n            : styleConstant)(name, value, priority == null ? \"\" : priority))\n      : styleValue(this.node(), name);\n}\n\nexport function styleValue(node, name) {\n  return node.style.getPropertyValue(name)\n      || defaultView(node).getComputedStyle(node, null).getPropertyValue(name);\n}\n", "function propertyRemove(name) {\n  return function() {\n    delete this[name];\n  };\n}\n\nfunction propertyConstant(name, value) {\n  return function() {\n    this[name] = value;\n  };\n}\n\nfunction propertyFunction(name, value) {\n  return function() {\n    var v = value.apply(this, arguments);\n    if (v == null) delete this[name];\n    else this[name] = v;\n  };\n}\n\nexport default function(name, value) {\n  return arguments.length > 1\n      ? this.each((value == null\n          ? propertyRemove : typeof value === \"function\"\n          ? propertyFunction\n          : propertyConstant)(name, value))\n      : this.node()[name];\n}\n", "function classArray(string) {\n  return string.trim().split(/^|\\s+/);\n}\n\nfunction classList(node) {\n  return node.classList || new ClassList(node);\n}\n\nfunction ClassList(node) {\n  this._node = node;\n  this._names = classArray(node.getAttribute(\"class\") || \"\");\n}\n\nClassList.prototype = {\n  add: function(name) {\n    var i = this._names.indexOf(name);\n    if (i < 0) {\n      this._names.push(name);\n      this._node.setAttribute(\"class\", this._names.join(\" \"));\n    }\n  },\n  remove: function(name) {\n    var i = this._names.indexOf(name);\n    if (i >= 0) {\n      this._names.splice(i, 1);\n      this._node.setAttribute(\"class\", this._names.join(\" \"));\n    }\n  },\n  contains: function(name) {\n    return this._names.indexOf(name) >= 0;\n  }\n};\n\nfunction classedAdd(node, names) {\n  var list = classList(node), i = -1, n = names.length;\n  while (++i < n) list.add(names[i]);\n}\n\nfunction classedRemove(node, names) {\n  var list = classList(node), i = -1, n = names.length;\n  while (++i < n) list.remove(names[i]);\n}\n\nfunction classedTrue(names) {\n  return function() {\n    classedAdd(this, names);\n  };\n}\n\nfunction classedFalse(names) {\n  return function() {\n    classedRemove(this, names);\n  };\n}\n\nfunction classedFunction(names, value) {\n  return function() {\n    (value.apply(this, arguments) ? classedAdd : classedRemove)(this, names);\n  };\n}\n\nexport default function(name, value) {\n  var names = classArray(name + \"\");\n\n  if (arguments.length < 2) {\n    var list = classList(this.node()), i = -1, n = names.length;\n    while (++i < n) if (!list.contains(names[i])) return false;\n    return true;\n  }\n\n  return this.each((typeof value === \"function\"\n      ? classedFunction : value\n      ? classedTrue\n      : classedFalse)(names, value));\n}\n", "function textRemove() {\n  this.textContent = \"\";\n}\n\nfunction textConstant(value) {\n  return function() {\n    this.textContent = value;\n  };\n}\n\nfunction textFunction(value) {\n  return function() {\n    var v = value.apply(this, arguments);\n    this.textContent = v == null ? \"\" : v;\n  };\n}\n\nexport default function(value) {\n  return arguments.length\n      ? this.each(value == null\n          ? textRemove : (typeof value === \"function\"\n          ? textFunction\n          : textConstant)(value))\n      : this.node().textContent;\n}\n", "function htmlRemove() {\n  this.innerHTML = \"\";\n}\n\nfunction htmlConstant(value) {\n  return function() {\n    this.innerHTML = value;\n  };\n}\n\nfunction htmlFunction(value) {\n  return function() {\n    var v = value.apply(this, arguments);\n    this.innerHTML = v == null ? \"\" : v;\n  };\n}\n\nexport default function(value) {\n  return arguments.length\n      ? this.each(value == null\n          ? htmlRemove : (typeof value === \"function\"\n          ? htmlFunction\n          : htmlConstant)(value))\n      : this.node().innerHTML;\n}\n", "function raise() {\n  if (this.nextSibling) this.parentNode.appendChild(this);\n}\n\nexport default function() {\n  return this.each(raise);\n}\n", "function lower() {\n  if (this.previousSibling) this.parentNode.insertBefore(this, this.parentNode.firstChild);\n}\n\nexport default function() {\n  return this.each(lower);\n}\n", "import creator from \"../creator.js\";\n\nexport default function(name) {\n  var create = typeof name === \"function\" ? name : creator(name);\n  return this.select(function() {\n    return this.appendChild(create.apply(this, arguments));\n  });\n}\n", "import creator from \"../creator.js\";\nimport selector from \"../selector.js\";\n\nfunction constantNull() {\n  return null;\n}\n\nexport default function(name, before) {\n  var create = typeof name === \"function\" ? name : creator(name),\n      select = before == null ? constantNull : typeof before === \"function\" ? before : selector(before);\n  return this.select(function() {\n    return this.insertBefore(create.apply(this, arguments), select.apply(this, arguments) || null);\n  });\n}\n", "function remove() {\n  var parent = this.parentNode;\n  if (parent) parent.removeChild(this);\n}\n\nexport default function() {\n  return this.each(remove);\n}\n", "function selection_cloneShallow() {\n  var clone = this.cloneNode(false), parent = this.parentNode;\n  return parent ? parent.insertBefore(clone, this.nextSibling) : clone;\n}\n\nfunction selection_cloneDeep() {\n  var clone = this.cloneNode(true), parent = this.parentNode;\n  return parent ? parent.insertBefore(clone, this.nextSibling) : clone;\n}\n\nexport default function(deep) {\n  return this.select(deep ? selection_cloneDeep : selection_cloneShallow);\n}\n", "export default function(value) {\n  return arguments.length\n      ? this.property(\"__data__\", value)\n      : this.node().__data__;\n}\n", "function contextListener(listener) {\n  return function(event) {\n    listener.call(this, event, this.__data__);\n  };\n}\n\nfunction parseTypenames(typenames) {\n  return typenames.trim().split(/^|\\s+/).map(function(t) {\n    var name = \"\", i = t.indexOf(\".\");\n    if (i >= 0) name = t.slice(i + 1), t = t.slice(0, i);\n    return {type: t, name: name};\n  });\n}\n\nfunction onRemove(typename) {\n  return function() {\n    var on = this.__on;\n    if (!on) return;\n    for (var j = 0, i = -1, m = on.length, o; j < m; ++j) {\n      if (o = on[j], (!typename.type || o.type === typename.type) && o.name === typename.name) {\n        this.removeEventListener(o.type, o.listener, o.options);\n      } else {\n        on[++i] = o;\n      }\n    }\n    if (++i) on.length = i;\n    else delete this.__on;\n  };\n}\n\nfunction onAdd(typename, value, options) {\n  return function() {\n    var on = this.__on, o, listener = contextListener(value);\n    if (on) for (var j = 0, m = on.length; j < m; ++j) {\n      if ((o = on[j]).type === typename.type && o.name === typename.name) {\n        this.removeEventListener(o.type, o.listener, o.options);\n        this.addEventListener(o.type, o.listener = listener, o.options = options);\n        o.value = value;\n        return;\n      }\n    }\n    this.addEventListener(typename.type, listener, options);\n    o = {type: typename.type, name: typename.name, value: value, listener: listener, options: options};\n    if (!on) this.__on = [o];\n    else on.push(o);\n  };\n}\n\nexport default function(typename, value, options) {\n  var typenames = parseTypenames(typename + \"\"), i, n = typenames.length, t;\n\n  if (arguments.length < 2) {\n    var on = this.node().__on;\n    if (on) for (var j = 0, m = on.length, o; j < m; ++j) {\n      for (i = 0, o = on[j]; i < n; ++i) {\n        if ((t = typenames[i]).type === o.type && t.name === o.name) {\n          return o.value;\n        }\n      }\n    }\n    return;\n  }\n\n  on = value ? onAdd : onRemove;\n  for (i = 0; i < n; ++i) this.each(on(typenames[i], value, options));\n  return this;\n}\n", "import defaultView from \"../window.js\";\n\nfunction dispatchEvent(node, type, params) {\n  var window = defaultView(node),\n      event = window.CustomEvent;\n\n  if (typeof event === \"function\") {\n    event = new event(type, params);\n  } else {\n    event = window.document.createEvent(\"Event\");\n    if (params) event.initEvent(type, params.bubbles, params.cancelable), event.detail = params.detail;\n    else event.initEvent(type, false, false);\n  }\n\n  node.dispatchEvent(event);\n}\n\nfunction dispatchConstant(type, params) {\n  return function() {\n    return dispatchEvent(this, type, params);\n  };\n}\n\nfunction dispatchFunction(type, params) {\n  return function() {\n    return dispatchEvent(this, type, params.apply(this, arguments));\n  };\n}\n\nexport default function(type, params) {\n  return this.each((typeof params === \"function\"\n      ? dispatchFunction\n      : dispatchConstant)(type, params));\n}\n", "export default function*() {\n  for (var groups = this._groups, j = 0, m = groups.length; j < m; ++j) {\n    for (var group = groups[j], i = 0, n = group.length, node; i < n; ++i) {\n      if (node = group[i]) yield node;\n    }\n  }\n}\n", "import selection_select from \"./select.js\";\nimport selection_selectAll from \"./selectAll.js\";\nimport selection_selectChild from \"./selectChild.js\";\nimport selection_selectChildren from \"./selectChildren.js\";\nimport selection_filter from \"./filter.js\";\nimport selection_data from \"./data.js\";\nimport selection_enter from \"./enter.js\";\nimport selection_exit from \"./exit.js\";\nimport selection_join from \"./join.js\";\nimport selection_merge from \"./merge.js\";\nimport selection_order from \"./order.js\";\nimport selection_sort from \"./sort.js\";\nimport selection_call from \"./call.js\";\nimport selection_nodes from \"./nodes.js\";\nimport selection_node from \"./node.js\";\nimport selection_size from \"./size.js\";\nimport selection_empty from \"./empty.js\";\nimport selection_each from \"./each.js\";\nimport selection_attr from \"./attr.js\";\nimport selection_style from \"./style.js\";\nimport selection_property from \"./property.js\";\nimport selection_classed from \"./classed.js\";\nimport selection_text from \"./text.js\";\nimport selection_html from \"./html.js\";\nimport selection_raise from \"./raise.js\";\nimport selection_lower from \"./lower.js\";\nimport selection_append from \"./append.js\";\nimport selection_insert from \"./insert.js\";\nimport selection_remove from \"./remove.js\";\nimport selection_clone from \"./clone.js\";\nimport selection_datum from \"./datum.js\";\nimport selection_on from \"./on.js\";\nimport selection_dispatch from \"./dispatch.js\";\nimport selection_iterator from \"./iterator.js\";\n\nexport var root = [null];\n\nexport function Selection(groups, parents) {\n  this._groups = groups;\n  this._parents = parents;\n}\n\nfunction selection() {\n  return new Selection([[document.documentElement]], root);\n}\n\nfunction selection_selection() {\n  return this;\n}\n\nSelection.prototype = selection.prototype = {\n  constructor: Selection,\n  select: selection_select,\n  selectAll: selection_selectAll,\n  selectChild: selection_selectChild,\n  selectChildren: selection_selectChildren,\n  filter: selection_filter,\n  data: selection_data,\n  enter: selection_enter,\n  exit: selection_exit,\n  join: selection_join,\n  merge: selection_merge,\n  selection: selection_selection,\n  order: selection_order,\n  sort: selection_sort,\n  call: selection_call,\n  nodes: selection_nodes,\n  node: selection_node,\n  size: selection_size,\n  empty: selection_empty,\n  each: selection_each,\n  attr: selection_attr,\n  style: selection_style,\n  property: selection_property,\n  classed: selection_classed,\n  text: selection_text,\n  html: selection_html,\n  raise: selection_raise,\n  lower: selection_lower,\n  append: selection_append,\n  insert: selection_insert,\n  remove: selection_remove,\n  clone: selection_clone,\n  datum: selection_datum,\n  on: selection_on,\n  dispatch: selection_dispatch,\n  [Symbol.iterator]: selection_iterator\n};\n\nexport default selection;\n", "import {Selection, root} from \"./selection/index.js\";\n\nexport default function(selector) {\n  return typeof selector === \"string\"\n      ? new Selection([[document.querySelector(selector)]], [document.documentElement])\n      : new Selection([[selector]], root);\n}\n", "export default function(event) {\n  let sourceEvent;\n  while (sourceEvent = event.sourceEvent) event = sourceEvent;\n  return event;\n}\n", "import sourceEvent from \"./sourceEvent.js\";\n\nexport default function(event, node) {\n  event = sourceEvent(event);\n  if (node === undefined) node = event.currentTarget;\n  if (node) {\n    var svg = node.ownerSVGElement || node;\n    if (svg.createSVGPoint) {\n      var point = svg.createSVGPoint();\n      point.x = event.clientX, point.y = event.clientY;\n      point = point.matrixTransform(node.getScreenCTM().inverse());\n      return [point.x, point.y];\n    }\n    if (node.getBoundingClientRect) {\n      var rect = node.getBoundingClientRect();\n      return [event.clientX - rect.left - node.clientLeft, event.clientY - rect.top - node.clientTop];\n    }\n  }\n  return [event.pageX, event.pageY];\n}\n", "export default function(constructor, factory, prototype) {\n  constructor.prototype = factory.prototype = prototype;\n  prototype.constructor = constructor;\n}\n\nexport function extend(parent, definition) {\n  var prototype = Object.create(parent.prototype);\n  for (var key in definition) prototype[key] = definition[key];\n  return prototype;\n}\n", "import define, {extend} from \"./define.js\";\n\nexport function Color() {}\n\nexport var darker = 0.7;\nexport var brighter = 1 / darker;\n\nvar reI = \"\\\\s*([+-]?\\\\d+)\\\\s*\",\n    reN = \"\\\\s*([+-]?(?:\\\\d*\\\\.)?\\\\d+(?:[eE][+-]?\\\\d+)?)\\\\s*\",\n    reP = \"\\\\s*([+-]?(?:\\\\d*\\\\.)?\\\\d+(?:[eE][+-]?\\\\d+)?)%\\\\s*\",\n    reHex = /^#([0-9a-f]{3,8})$/,\n    reRgbInteger = new RegExp(`^rgb\\\\(${reI},${reI},${reI}\\\\)$`),\n    reRgbPercent = new RegExp(`^rgb\\\\(${reP},${reP},${reP}\\\\)$`),\n    reRgbaInteger = new RegExp(`^rgba\\\\(${reI},${reI},${reI},${reN}\\\\)$`),\n    reRgbaPercent = new RegExp(`^rgba\\\\(${reP},${reP},${reP},${reN}\\\\)$`),\n    reHslPercent = new RegExp(`^hsl\\\\(${reN},${reP},${reP}\\\\)$`),\n    reHslaPercent = new RegExp(`^hsla\\\\(${reN},${reP},${reP},${reN}\\\\)$`);\n\nvar named = {\n  aliceblue: 0xf0f8ff,\n  antiquewhite: 0xfaebd7,\n  aqua: 0x00ffff,\n  aquamarine: 0x7fffd4,\n  azure: 0xf0ffff,\n  beige: 0xf5f5dc,\n  bisque: 0xffe4c4,\n  black: 0x000000,\n  blanchedalmond: 0xffebcd,\n  blue: 0x0000ff,\n  blueviolet: 0x8a2be2,\n  brown: 0xa52a2a,\n  burlywood: 0xdeb887,\n  cadetblue: 0x5f9ea0,\n  chartreuse: 0x7fff00,\n  chocolate: 0xd2691e,\n  coral: 0xff7f50,\n  cornflowerblue: 0x6495ed,\n  cornsilk: 0xfff8dc,\n  crimson: 0xdc143c,\n  cyan: 0x00ffff,\n  darkblue: 0x00008b,\n  darkcyan: 0x008b8b,\n  darkgoldenrod: 0xb8860b,\n  darkgray: 0xa9a9a9,\n  darkgreen: 0x006400,\n  darkgrey: 0xa9a9a9,\n  darkkhaki: 0xbdb76b,\n  darkmagenta: 0x8b008b,\n  darkolivegreen: 0x556b2f,\n  darkorange: 0xff8c00,\n  darkorchid: 0x9932cc,\n  darkred: 0x8b0000,\n  darksalmon: 0xe9967a,\n  darkseagreen: 0x8fbc8f,\n  darkslateblue: 0x483d8b,\n  darkslategray: 0x2f4f4f,\n  darkslategrey: 0x2f4f4f,\n  darkturquoise: 0x00ced1,\n  darkviolet: 0x9400d3,\n  deeppink: 0xff1493,\n  deepskyblue: 0x00bfff,\n  dimgray: 0x696969,\n  dimgrey: 0x696969,\n  dodgerblue: 0x1e90ff,\n  firebrick: 0xb22222,\n  floralwhite: 0xfffaf0,\n  forestgreen: 0x228b22,\n  fuchsia: 0xff00ff,\n  gainsboro: 0xdcdcdc,\n  ghostwhite: 0xf8f8ff,\n  gold: 0xffd700,\n  goldenrod: 0xdaa520,\n  gray: 0x808080,\n  green: 0x008000,\n  greenyellow: 0xadff2f,\n  grey: 0x808080,\n  honeydew: 0xf0fff0,\n  hotpink: 0xff69b4,\n  indianred: 0xcd5c5c,\n  indigo: 0x4b0082,\n  ivory: 0xfffff0,\n  khaki: 0xf0e68c,\n  lavender: 0xe6e6fa,\n  lavenderblush: 0xfff0f5,\n  lawngreen: 0x7cfc00,\n  lemonchiffon: 0xfffacd,\n  lightblue: 0xadd8e6,\n  lightcoral: 0xf08080,\n  lightcyan: 0xe0ffff,\n  lightgoldenrodyellow: 0xfafad2,\n  lightgray: 0xd3d3d3,\n  lightgreen: 0x90ee90,\n  lightgrey: 0xd3d3d3,\n  lightpink: 0xffb6c1,\n  lightsalmon: 0xffa07a,\n  lightseagreen: 0x20b2aa,\n  lightskyblue: 0x87cefa,\n  lightslategray: 0x778899,\n  lightslategrey: 0x778899,\n  lightsteelblue: 0xb0c4de,\n  lightyellow: 0xffffe0,\n  lime: 0x00ff00,\n  limegreen: 0x32cd32,\n  linen: 0xfaf0e6,\n  magenta: 0xff00ff,\n  maroon: 0x800000,\n  mediumaquamarine: 0x66cdaa,\n  mediumblue: 0x0000cd,\n  mediumorchid: 0xba55d3,\n  mediumpurple: 0x9370db,\n  mediumseagreen: 0x3cb371,\n  mediumslateblue: 0x7b68ee,\n  mediumspringgreen: 0x00fa9a,\n  mediumturquoise: 0x48d1cc,\n  mediumvioletred: 0xc71585,\n  midnightblue: 0x191970,\n  mintcream: 0xf5fffa,\n  mistyrose: 0xffe4e1,\n  moccasin: 0xffe4b5,\n  navajowhite: 0xffdead,\n  navy: 0x000080,\n  oldlace: 0xfdf5e6,\n  olive: 0x808000,\n  olivedrab: 0x6b8e23,\n  orange: 0xffa500,\n  orangered: 0xff4500,\n  orchid: 0xda70d6,\n  palegoldenrod: 0xeee8aa,\n  palegreen: 0x98fb98,\n  paleturquoise: 0xafeeee,\n  palevioletred: 0xdb7093,\n  papayawhip: 0xffefd5,\n  peachpuff: 0xffdab9,\n  peru: 0xcd853f,\n  pink: 0xffc0cb,\n  plum: 0xdda0dd,\n  powderblue: 0xb0e0e6,\n  purple: 0x800080,\n  rebeccapurple: 0x663399,\n  red: 0xff0000,\n  rosybrown: 0xbc8f8f,\n  royalblue: 0x4169e1,\n  saddlebrown: 0x8b4513,\n  salmon: 0xfa8072,\n  sandybrown: 0xf4a460,\n  seagreen: 0x2e8b57,\n  seashell: 0xfff5ee,\n  sienna: 0xa0522d,\n  silver: 0xc0c0c0,\n  skyblue: 0x87ceeb,\n  slateblue: 0x6a5acd,\n  slategray: 0x708090,\n  slategrey: 0x708090,\n  snow: 0xfffafa,\n  springgreen: 0x00ff7f,\n  steelblue: 0x4682b4,\n  tan: 0xd2b48c,\n  teal: 0x008080,\n  thistle: 0xd8bfd8,\n  tomato: 0xff6347,\n  turquoise: 0x40e0d0,\n  violet: 0xee82ee,\n  wheat: 0xf5deb3,\n  white: 0xffffff,\n  whitesmoke: 0xf5f5f5,\n  yellow: 0xffff00,\n  yellowgreen: 0x9acd32\n};\n\ndefine(Color, color, {\n  copy(channels) {\n    return Object.assign(new this.constructor, this, channels);\n  },\n  displayable() {\n    return this.rgb().displayable();\n  },\n  hex: color_formatHex, // Deprecated! Use color.formatHex.\n  formatHex: color_formatHex,\n  formatHex8: color_formatHex8,\n  formatHsl: color_formatHsl,\n  formatRgb: color_formatRgb,\n  toString: color_formatRgb\n});\n\nfunction color_formatHex() {\n  return this.rgb().formatHex();\n}\n\nfunction color_formatHex8() {\n  return this.rgb().formatHex8();\n}\n\nfunction color_formatHsl() {\n  return hslConvert(this).formatHsl();\n}\n\nfunction color_formatRgb() {\n  return this.rgb().formatRgb();\n}\n\nexport default function color(format) {\n  var m, l;\n  format = (format + \"\").trim().toLowerCase();\n  return (m = reHex.exec(format)) ? (l = m[1].length, m = parseInt(m[1], 16), l === 6 ? rgbn(m) // #ff0000\n      : l === 3 ? new Rgb((m >> 8 & 0xf) | (m >> 4 & 0xf0), (m >> 4 & 0xf) | (m & 0xf0), ((m & 0xf) << 4) | (m & 0xf), 1) // #f00\n      : l === 8 ? rgba(m >> 24 & 0xff, m >> 16 & 0xff, m >> 8 & 0xff, (m & 0xff) / 0xff) // #ff000000\n      : l === 4 ? rgba((m >> 12 & 0xf) | (m >> 8 & 0xf0), (m >> 8 & 0xf) | (m >> 4 & 0xf0), (m >> 4 & 0xf) | (m & 0xf0), (((m & 0xf) << 4) | (m & 0xf)) / 0xff) // #f000\n      : null) // invalid hex\n      : (m = reRgbInteger.exec(format)) ? new Rgb(m[1], m[2], m[3], 1) // rgb(255, 0, 0)\n      : (m = reRgbPercent.exec(format)) ? new Rgb(m[1] * 255 / 100, m[2] * 255 / 100, m[3] * 255 / 100, 1) // rgb(100%, 0%, 0%)\n      : (m = reRgbaInteger.exec(format)) ? rgba(m[1], m[2], m[3], m[4]) // rgba(255, 0, 0, 1)\n      : (m = reRgbaPercent.exec(format)) ? rgba(m[1] * 255 / 100, m[2] * 255 / 100, m[3] * 255 / 100, m[4]) // rgb(100%, 0%, 0%, 1)\n      : (m = reHslPercent.exec(format)) ? hsla(m[1], m[2] / 100, m[3] / 100, 1) // hsl(120, 50%, 50%)\n      : (m = reHslaPercent.exec(format)) ? hsla(m[1], m[2] / 100, m[3] / 100, m[4]) // hsla(120, 50%, 50%, 1)\n      : named.hasOwnProperty(format) ? rgbn(named[format]) // eslint-disable-line no-prototype-builtins\n      : format === \"transparent\" ? new Rgb(NaN, NaN, NaN, 0)\n      : null;\n}\n\nfunction rgbn(n) {\n  return new Rgb(n >> 16 & 0xff, n >> 8 & 0xff, n & 0xff, 1);\n}\n\nfunction rgba(r, g, b, a) {\n  if (a <= 0) r = g = b = NaN;\n  return new Rgb(r, g, b, a);\n}\n\nexport function rgbConvert(o) {\n  if (!(o instanceof Color)) o = color(o);\n  if (!o) return new Rgb;\n  o = o.rgb();\n  return new Rgb(o.r, o.g, o.b, o.opacity);\n}\n\nexport function rgb(r, g, b, opacity) {\n  return arguments.length === 1 ? rgbConvert(r) : new Rgb(r, g, b, opacity == null ? 1 : opacity);\n}\n\nexport function Rgb(r, g, b, opacity) {\n  this.r = +r;\n  this.g = +g;\n  this.b = +b;\n  this.opacity = +opacity;\n}\n\ndefine(Rgb, rgb, extend(Color, {\n  brighter(k) {\n    k = k == null ? brighter : Math.pow(brighter, k);\n    return new Rgb(this.r * k, this.g * k, this.b * k, this.opacity);\n  },\n  darker(k) {\n    k = k == null ? darker : Math.pow(darker, k);\n    return new Rgb(this.r * k, this.g * k, this.b * k, this.opacity);\n  },\n  rgb() {\n    return this;\n  },\n  clamp() {\n    return new Rgb(clampi(this.r), clampi(this.g), clampi(this.b), clampa(this.opacity));\n  },\n  displayable() {\n    return (-0.5 <= this.r && this.r < 255.5)\n        && (-0.5 <= this.g && this.g < 255.5)\n        && (-0.5 <= this.b && this.b < 255.5)\n        && (0 <= this.opacity && this.opacity <= 1);\n  },\n  hex: rgb_formatHex, // Deprecated! Use color.formatHex.\n  formatHex: rgb_formatHex,\n  formatHex8: rgb_formatHex8,\n  formatRgb: rgb_formatRgb,\n  toString: rgb_formatRgb\n}));\n\nfunction rgb_formatHex() {\n  return `#${hex(this.r)}${hex(this.g)}${hex(this.b)}`;\n}\n\nfunction rgb_formatHex8() {\n  return `#${hex(this.r)}${hex(this.g)}${hex(this.b)}${hex((isNaN(this.opacity) ? 1 : this.opacity) * 255)}`;\n}\n\nfunction rgb_formatRgb() {\n  const a = clampa(this.opacity);\n  return `${a === 1 ? \"rgb(\" : \"rgba(\"}${clampi(this.r)}, ${clampi(this.g)}, ${clampi(this.b)}${a === 1 ? \")\" : `, ${a})`}`;\n}\n\nfunction clampa(opacity) {\n  return isNaN(opacity) ? 1 : Math.max(0, Math.min(1, opacity));\n}\n\nfunction clampi(value) {\n  return Math.max(0, Math.min(255, Math.round(value) || 0));\n}\n\nfunction hex(value) {\n  value = clampi(value);\n  return (value < 16 ? \"0\" : \"\") + value.toString(16);\n}\n\nfunction hsla(h, s, l, a) {\n  if (a <= 0) h = s = l = NaN;\n  else if (l <= 0 || l >= 1) h = s = NaN;\n  else if (s <= 0) h = NaN;\n  return new Hsl(h, s, l, a);\n}\n\nexport function hslConvert(o) {\n  if (o instanceof Hsl) return new Hsl(o.h, o.s, o.l, o.opacity);\n  if (!(o instanceof Color)) o = color(o);\n  if (!o) return new Hsl;\n  if (o instanceof Hsl) return o;\n  o = o.rgb();\n  var r = o.r / 255,\n      g = o.g / 255,\n      b = o.b / 255,\n      min = Math.min(r, g, b),\n      max = Math.max(r, g, b),\n      h = NaN,\n      s = max - min,\n      l = (max + min) / 2;\n  if (s) {\n    if (r === max) h = (g - b) / s + (g < b) * 6;\n    else if (g === max) h = (b - r) / s + 2;\n    else h = (r - g) / s + 4;\n    s /= l < 0.5 ? max + min : 2 - max - min;\n    h *= 60;\n  } else {\n    s = l > 0 && l < 1 ? 0 : h;\n  }\n  return new Hsl(h, s, l, o.opacity);\n}\n\nexport function hsl(h, s, l, opacity) {\n  return arguments.length === 1 ? hslConvert(h) : new Hsl(h, s, l, opacity == null ? 1 : opacity);\n}\n\nfunction Hsl(h, s, l, opacity) {\n  this.h = +h;\n  this.s = +s;\n  this.l = +l;\n  this.opacity = +opacity;\n}\n\ndefine(Hsl, hsl, extend(Color, {\n  brighter(k) {\n    k = k == null ? brighter : Math.pow(brighter, k);\n    return new Hsl(this.h, this.s, this.l * k, this.opacity);\n  },\n  darker(k) {\n    k = k == null ? darker : Math.pow(darker, k);\n    return new Hsl(this.h, this.s, this.l * k, this.opacity);\n  },\n  rgb() {\n    var h = this.h % 360 + (this.h < 0) * 360,\n        s = isNaN(h) || isNaN(this.s) ? 0 : this.s,\n        l = this.l,\n        m2 = l + (l < 0.5 ? l : 1 - l) * s,\n        m1 = 2 * l - m2;\n    return new Rgb(\n      hsl2rgb(h >= 240 ? h - 240 : h + 120, m1, m2),\n      hsl2rgb(h, m1, m2),\n      hsl2rgb(h < 120 ? h + 240 : h - 120, m1, m2),\n      this.opacity\n    );\n  },\n  clamp() {\n    return new Hsl(clamph(this.h), clampt(this.s), clampt(this.l), clampa(this.opacity));\n  },\n  displayable() {\n    return (0 <= this.s && this.s <= 1 || isNaN(this.s))\n        && (0 <= this.l && this.l <= 1)\n        && (0 <= this.opacity && this.opacity <= 1);\n  },\n  formatHsl() {\n    const a = clampa(this.opacity);\n    return `${a === 1 ? \"hsl(\" : \"hsla(\"}${clamph(this.h)}, ${clampt(this.s) * 100}%, ${clampt(this.l) * 100}%${a === 1 ? \")\" : `, ${a})`}`;\n  }\n}));\n\nfunction clamph(value) {\n  value = (value || 0) % 360;\n  return value < 0 ? value + 360 : value;\n}\n\nfunction clampt(value) {\n  return Math.max(0, Math.min(1, value || 0));\n}\n\n/* From FvD 13.37, CSS Color Module Level 3 */\nfunction hsl2rgb(h, m1, m2) {\n  return (h < 60 ? m1 + (m2 - m1) * h / 60\n      : h < 180 ? m2\n      : h < 240 ? m1 + (m2 - m1) * (240 - h) / 60\n      : m1) * 255;\n}\n", "export const radians = Math.PI / 180;\nexport const degrees = 180 / Math.PI;\n", "import define, {extend} from \"./define.js\";\nimport {Color, rgbConvert, Rgb} from \"./color.js\";\nimport {degrees, radians} from \"./math.js\";\n\n// https://observablehq.com/@mbostock/lab-and-rgb\nconst K = 18,\n    Xn = 0.96422,\n    Yn = 1,\n    Zn = 0.82521,\n    t0 = 4 / 29,\n    t1 = 6 / 29,\n    t2 = 3 * t1 * t1,\n    t3 = t1 * t1 * t1;\n\nfunction labConvert(o) {\n  if (o instanceof Lab) return new Lab(o.l, o.a, o.b, o.opacity);\n  if (o instanceof Hcl) return hcl2lab(o);\n  if (!(o instanceof Rgb)) o = rgbConvert(o);\n  var r = rgb2lrgb(o.r),\n      g = rgb2lrgb(o.g),\n      b = rgb2lrgb(o.b),\n      y = xyz2lab((0.2225045 * r + 0.7168786 * g + 0.0606169 * b) / Yn), x, z;\n  if (r === g && g === b) x = z = y; else {\n    x = xyz2lab((0.4360747 * r + 0.3850649 * g + 0.1430804 * b) / Xn);\n    z = xyz2lab((0.0139322 * r + 0.0971045 * g + 0.7141733 * b) / Zn);\n  }\n  return new Lab(116 * y - 16, 500 * (x - y), 200 * (y - z), o.opacity);\n}\n\nexport function gray(l, opacity) {\n  return new Lab(l, 0, 0, opacity == null ? 1 : opacity);\n}\n\nexport default function lab(l, a, b, opacity) {\n  return arguments.length === 1 ? labConvert(l) : new Lab(l, a, b, opacity == null ? 1 : opacity);\n}\n\nexport function Lab(l, a, b, opacity) {\n  this.l = +l;\n  this.a = +a;\n  this.b = +b;\n  this.opacity = +opacity;\n}\n\ndefine(Lab, lab, extend(Color, {\n  brighter(k) {\n    return new Lab(this.l + K * (k == null ? 1 : k), this.a, this.b, this.opacity);\n  },\n  darker(k) {\n    return new Lab(this.l - K * (k == null ? 1 : k), this.a, this.b, this.opacity);\n  },\n  rgb() {\n    var y = (this.l + 16) / 116,\n        x = isNaN(this.a) ? y : y + this.a / 500,\n        z = isNaN(this.b) ? y : y - this.b / 200;\n    x = Xn * lab2xyz(x);\n    y = Yn * lab2xyz(y);\n    z = Zn * lab2xyz(z);\n    return new Rgb(\n      lrgb2rgb( 3.1338561 * x - 1.6168667 * y - 0.4906146 * z),\n      lrgb2rgb(-0.9787684 * x + 1.9161415 * y + 0.0334540 * z),\n      lrgb2rgb( 0.0719453 * x - 0.2289914 * y + 1.4052427 * z),\n      this.opacity\n    );\n  }\n}));\n\nfunction xyz2lab(t) {\n  return t > t3 ? Math.pow(t, 1 / 3) : t / t2 + t0;\n}\n\nfunction lab2xyz(t) {\n  return t > t1 ? t * t * t : t2 * (t - t0);\n}\n\nfunction lrgb2rgb(x) {\n  return 255 * (x <= 0.0031308 ? 12.92 * x : 1.055 * Math.pow(x, 1 / 2.4) - 0.055);\n}\n\nfunction rgb2lrgb(x) {\n  return (x /= 255) <= 0.04045 ? x / 12.92 : Math.pow((x + 0.055) / 1.055, 2.4);\n}\n\nfunction hclConvert(o) {\n  if (o instanceof Hcl) return new Hcl(o.h, o.c, o.l, o.opacity);\n  if (!(o instanceof Lab)) o = labConvert(o);\n  if (o.a === 0 && o.b === 0) return new Hcl(NaN, 0 < o.l && o.l < 100 ? 0 : NaN, o.l, o.opacity);\n  var h = Math.atan2(o.b, o.a) * degrees;\n  return new Hcl(h < 0 ? h + 360 : h, Math.sqrt(o.a * o.a + o.b * o.b), o.l, o.opacity);\n}\n\nexport function lch(l, c, h, opacity) {\n  return arguments.length === 1 ? hclConvert(l) : new Hcl(h, c, l, opacity == null ? 1 : opacity);\n}\n\nexport function hcl(h, c, l, opacity) {\n  return arguments.length === 1 ? hclConvert(h) : new Hcl(h, c, l, opacity == null ? 1 : opacity);\n}\n\nexport function Hcl(h, c, l, opacity) {\n  this.h = +h;\n  this.c = +c;\n  this.l = +l;\n  this.opacity = +opacity;\n}\n\nfunction hcl2lab(o) {\n  if (isNaN(o.h)) return new Lab(o.l, 0, 0, o.opacity);\n  var h = o.h * radians;\n  return new Lab(o.l, Math.cos(h) * o.c, Math.sin(h) * o.c, o.opacity);\n}\n\ndefine(Hcl, hcl, extend(Color, {\n  brighter(k) {\n    return new Hcl(this.h, this.c, this.l + K * (k == null ? 1 : k), this.opacity);\n  },\n  darker(k) {\n    return new Hcl(this.h, this.c, this.l - K * (k == null ? 1 : k), this.opacity);\n  },\n  rgb() {\n    return hcl2lab(this).rgb();\n  }\n}));\n", "import define, {extend} from \"./define.js\";\nimport {Color, rgbConvert, Rgb, darker, brighter} from \"./color.js\";\nimport {degrees, radians} from \"./math.js\";\n\nvar A = -0.14861,\n    B = +1.78277,\n    C = -0.29227,\n    D = -0.90649,\n    E = +1.97294,\n    ED = E * D,\n    EB = E * B,\n    BC_DA = B * C - D * A;\n\nfunction cubehelixConvert(o) {\n  if (o instanceof Cubehelix) return new Cubehelix(o.h, o.s, o.l, o.opacity);\n  if (!(o instanceof Rgb)) o = rgbConvert(o);\n  var r = o.r / 255,\n      g = o.g / 255,\n      b = o.b / 255,\n      l = (BC_DA * b + ED * r - EB * g) / (BC_DA + ED - EB),\n      bl = b - l,\n      k = (E * (g - l) - C * bl) / D,\n      s = Math.sqrt(k * k + bl * bl) / (E * l * (1 - l)), // NaN if l=0 or l=1\n      h = s ? Math.atan2(k, bl) * degrees - 120 : NaN;\n  return new Cubehelix(h < 0 ? h + 360 : h, s, l, o.opacity);\n}\n\nexport default function cubehelix(h, s, l, opacity) {\n  return arguments.length === 1 ? cubehelixConvert(h) : new Cubehelix(h, s, l, opacity == null ? 1 : opacity);\n}\n\nexport function Cubehelix(h, s, l, opacity) {\n  this.h = +h;\n  this.s = +s;\n  this.l = +l;\n  this.opacity = +opacity;\n}\n\ndefine(Cubehelix, cubehelix, extend(Color, {\n  brighter(k) {\n    k = k == null ? brighter : Math.pow(brighter, k);\n    return new Cubehelix(this.h, this.s, this.l * k, this.opacity);\n  },\n  darker(k) {\n    k = k == null ? darker : Math.pow(darker, k);\n    return new Cubehelix(this.h, this.s, this.l * k, this.opacity);\n  },\n  rgb() {\n    var h = isNaN(this.h) ? 0 : (this.h + 120) * radians,\n        l = +this.l,\n        a = isNaN(this.s) ? 0 : this.s * l * (1 - l),\n        cosh = Math.cos(h),\n        sinh = Math.sin(h);\n    return new Rgb(\n      255 * (l + a * (A * cosh + B * sinh)),\n      255 * (l + a * (C * cosh + D * sinh)),\n      255 * (l + a * (E * cosh)),\n      this.opacity\n    );\n  }\n}));\n", "export function basis(t1, v0, v1, v2, v3) {\n  var t2 = t1 * t1, t3 = t2 * t1;\n  return ((1 - 3 * t1 + 3 * t2 - t3) * v0\n      + (4 - 6 * t2 + 3 * t3) * v1\n      + (1 + 3 * t1 + 3 * t2 - 3 * t3) * v2\n      + t3 * v3) / 6;\n}\n\nexport default function(values) {\n  var n = values.length - 1;\n  return function(t) {\n    var i = t <= 0 ? (t = 0) : t >= 1 ? (t = 1, n - 1) : Math.floor(t * n),\n        v1 = values[i],\n        v2 = values[i + 1],\n        v0 = i > 0 ? values[i - 1] : 2 * v1 - v2,\n        v3 = i < n - 1 ? values[i + 2] : 2 * v2 - v1;\n    return basis((t - i / n) * n, v0, v1, v2, v3);\n  };\n}\n", "import {basis} from \"./basis.js\";\n\nexport default function(values) {\n  var n = values.length;\n  return function(t) {\n    var i = Math.floor(((t %= 1) < 0 ? ++t : t) * n),\n        v0 = values[(i + n - 1) % n],\n        v1 = values[i % n],\n        v2 = values[(i + 1) % n],\n        v3 = values[(i + 2) % n];\n    return basis((t - i / n) * n, v0, v1, v2, v3);\n  };\n}\n", "export default x => () => x;\n", "import constant from \"./constant.js\";\n\nfunction linear(a, d) {\n  return function(t) {\n    return a + t * d;\n  };\n}\n\nfunction exponential(a, b, y) {\n  return a = Math.pow(a, y), b = Math.pow(b, y) - a, y = 1 / y, function(t) {\n    return Math.pow(a + t * b, y);\n  };\n}\n\nexport function hue(a, b) {\n  var d = b - a;\n  return d ? linear(a, d > 180 || d < -180 ? d - 360 * Math.round(d / 360) : d) : constant(isNaN(a) ? b : a);\n}\n\nexport function gamma(y) {\n  return (y = +y) === 1 ? nogamma : function(a, b) {\n    return b - a ? exponential(a, b, y) : constant(isNaN(a) ? b : a);\n  };\n}\n\nexport default function nogamma(a, b) {\n  var d = b - a;\n  return d ? linear(a, d) : constant(isNaN(a) ? b : a);\n}\n", "import {rgb as colorRgb} from \"d3-color\";\nimport basis from \"./basis.js\";\nimport basisClosed from \"./basisClosed.js\";\nimport nogamma, {gamma} from \"./color.js\";\n\nexport default (function rgbGamma(y) {\n  var color = gamma(y);\n\n  function rgb(start, end) {\n    var r = color((start = colorRgb(start)).r, (end = colorRgb(end)).r),\n        g = color(start.g, end.g),\n        b = color(start.b, end.b),\n        opacity = nogamma(start.opacity, end.opacity);\n    return function(t) {\n      start.r = r(t);\n      start.g = g(t);\n      start.b = b(t);\n      start.opacity = opacity(t);\n      return start + \"\";\n    };\n  }\n\n  rgb.gamma = rgbGamma;\n\n  return rgb;\n})(1);\n\nfunction rgbSpline(spline) {\n  return function(colors) {\n    var n = colors.length,\n        r = new Array(n),\n        g = new Array(n),\n        b = new Array(n),\n        i, color;\n    for (i = 0; i < n; ++i) {\n      color = colorRgb(colors[i]);\n      r[i] = color.r || 0;\n      g[i] = color.g || 0;\n      b[i] = color.b || 0;\n    }\n    r = spline(r);\n    g = spline(g);\n    b = spline(b);\n    color.opacity = 1;\n    return function(t) {\n      color.r = r(t);\n      color.g = g(t);\n      color.b = b(t);\n      return color + \"\";\n    };\n  };\n}\n\nexport var rgbBasis = rgbSpline(basis);\nexport var rgbBasisClosed = rgbSpline(basisClosed);\n", "export default function(a, b) {\n  if (!b) b = [];\n  var n = a ? Math.min(b.length, a.length) : 0,\n      c = b.slice(),\n      i;\n  return function(t) {\n    for (i = 0; i < n; ++i) c[i] = a[i] * (1 - t) + b[i] * t;\n    return c;\n  };\n}\n\nexport function isNumberArray(x) {\n  return ArrayBuffer.isView(x) && !(x instanceof DataView);\n}\n", "import value from \"./value.js\";\nimport numberArray, {isNumberArray} from \"./numberArray.js\";\n\nexport default function(a, b) {\n  return (isNumberArray(b) ? numberArray : genericArray)(a, b);\n}\n\nexport function genericArray(a, b) {\n  var nb = b ? b.length : 0,\n      na = a ? Math.min(nb, a.length) : 0,\n      x = new Array(na),\n      c = new Array(nb),\n      i;\n\n  for (i = 0; i < na; ++i) x[i] = value(a[i], b[i]);\n  for (; i < nb; ++i) c[i] = b[i];\n\n  return function(t) {\n    for (i = 0; i < na; ++i) c[i] = x[i](t);\n    return c;\n  };\n}\n", "export default function(a, b) {\n  var d = new Date;\n  return a = +a, b = +b, function(t) {\n    return d.setTime(a * (1 - t) + b * t), d;\n  };\n}\n", "export default function(a, b) {\n  return a = +a, b = +b, function(t) {\n    return a * (1 - t) + b * t;\n  };\n}\n", "import value from \"./value.js\";\n\nexport default function(a, b) {\n  var i = {},\n      c = {},\n      k;\n\n  if (a === null || typeof a !== \"object\") a = {};\n  if (b === null || typeof b !== \"object\") b = {};\n\n  for (k in b) {\n    if (k in a) {\n      i[k] = value(a[k], b[k]);\n    } else {\n      c[k] = b[k];\n    }\n  }\n\n  return function(t) {\n    for (k in i) c[k] = i[k](t);\n    return c;\n  };\n}\n", "import number from \"./number.js\";\n\nvar reA = /[-+]?(?:\\d+\\.?\\d*|\\.?\\d+)(?:[eE][-+]?\\d+)?/g,\n    reB = new RegExp(reA.source, \"g\");\n\nfunction zero(b) {\n  return function() {\n    return b;\n  };\n}\n\nfunction one(b) {\n  return function(t) {\n    return b(t) + \"\";\n  };\n}\n\nexport default function(a, b) {\n  var bi = reA.lastIndex = reB.lastIndex = 0, // scan index for next number in b\n      am, // current match in a\n      bm, // current match in b\n      bs, // string preceding current number in b, if any\n      i = -1, // index in s\n      s = [], // string constants and placeholders\n      q = []; // number interpolators\n\n  // Coerce inputs to strings.\n  a = a + \"\", b = b + \"\";\n\n  // Interpolate pairs of numbers in a & b.\n  while ((am = reA.exec(a))\n      && (bm = reB.exec(b))) {\n    if ((bs = bm.index) > bi) { // a string precedes the next number in b\n      bs = b.slice(bi, bs);\n      if (s[i]) s[i] += bs; // coalesce with previous string\n      else s[++i] = bs;\n    }\n    if ((am = am[0]) === (bm = bm[0])) { // numbers in a & b match\n      if (s[i]) s[i] += bm; // coalesce with previous string\n      else s[++i] = bm;\n    } else { // interpolate non-matching numbers\n      s[++i] = null;\n      q.push({i: i, x: number(am, bm)});\n    }\n    bi = reB.lastIndex;\n  }\n\n  // Add remains of b.\n  if (bi < b.length) {\n    bs = b.slice(bi);\n    if (s[i]) s[i] += bs; // coalesce with previous string\n    else s[++i] = bs;\n  }\n\n  // Special optimization for only a single match.\n  // Otherwise, interpolate each of the numbers and rejoin the string.\n  return s.length < 2 ? (q[0]\n      ? one(q[0].x)\n      : zero(b))\n      : (b = q.length, function(t) {\n          for (var i = 0, o; i < b; ++i) s[(o = q[i]).i] = o.x(t);\n          return s.join(\"\");\n        });\n}\n", "import {color} from \"d3-color\";\nimport rgb from \"./rgb.js\";\nimport {genericArray} from \"./array.js\";\nimport date from \"./date.js\";\nimport number from \"./number.js\";\nimport object from \"./object.js\";\nimport string from \"./string.js\";\nimport constant from \"./constant.js\";\nimport numberArray, {isNumberArray} from \"./numberArray.js\";\n\nexport default function(a, b) {\n  var t = typeof b, c;\n  return b == null || t === \"boolean\" ? constant(b)\n      : (t === \"number\" ? number\n      : t === \"string\" ? ((c = color(b)) ? (b = c, rgb) : string)\n      : b instanceof color ? rgb\n      : b instanceof Date ? date\n      : isNumberArray(b) ? numberArray\n      : Array.isArray(b) ? genericArray\n      : typeof b.valueOf !== \"function\" && typeof b.toString !== \"function\" || isNaN(b) ? object\n      : number)(a, b);\n}\n", "export default function(a, b) {\n  return a = +a, b = +b, function(t) {\n    return Math.round(a * (1 - t) + b * t);\n  };\n}\n", "var degrees = 180 / Math.PI;\n\nexport var identity = {\n  translateX: 0,\n  translateY: 0,\n  rotate: 0,\n  skewX: 0,\n  scaleX: 1,\n  scaleY: 1\n};\n\nexport default function(a, b, c, d, e, f) {\n  var scaleX, scaleY, skewX;\n  if (scaleX = Math.sqrt(a * a + b * b)) a /= scaleX, b /= scaleX;\n  if (skewX = a * c + b * d) c -= a * skewX, d -= b * skewX;\n  if (scaleY = Math.sqrt(c * c + d * d)) c /= scaleY, d /= scaleY, skewX /= scaleY;\n  if (a * d < b * c) a = -a, b = -b, skewX = -skewX, scaleX = -scaleX;\n  return {\n    translateX: e,\n    translateY: f,\n    rotate: Math.atan2(b, a) * degrees,\n    skewX: Math.atan(skewX) * degrees,\n    scaleX: scaleX,\n    scaleY: scaleY\n  };\n}\n", "import decompose, {identity} from \"./decompose.js\";\n\nvar svgNode;\n\n/* eslint-disable no-undef */\nexport function parseCss(value) {\n  const m = new (typeof DOMMatrix === \"function\" ? DOMMatrix : WebKitCSSMatrix)(value + \"\");\n  return m.isIdentity ? identity : decompose(m.a, m.b, m.c, m.d, m.e, m.f);\n}\n\nexport function parseSvg(value) {\n  if (value == null) return identity;\n  if (!svgNode) svgNode = document.createElementNS(\"http://www.w3.org/2000/svg\", \"g\");\n  svgNode.setAttribute(\"transform\", value);\n  if (!(value = svgNode.transform.baseVal.consolidate())) return identity;\n  value = value.matrix;\n  return decompose(value.a, value.b, value.c, value.d, value.e, value.f);\n}\n", "import number from \"../number.js\";\nimport {parseCss, parseSvg} from \"./parse.js\";\n\nfunction interpolateTransform(parse, pxComma, pxParen, degParen) {\n\n  function pop(s) {\n    return s.length ? s.pop() + \" \" : \"\";\n  }\n\n  function translate(xa, ya, xb, yb, s, q) {\n    if (xa !== xb || ya !== yb) {\n      var i = s.push(\"translate(\", null, pxComma, null, pxParen);\n      q.push({i: i - 4, x: number(xa, xb)}, {i: i - 2, x: number(ya, yb)});\n    } else if (xb || yb) {\n      s.push(\"translate(\" + xb + pxComma + yb + pxParen);\n    }\n  }\n\n  function rotate(a, b, s, q) {\n    if (a !== b) {\n      if (a - b > 180) b += 360; else if (b - a > 180) a += 360; // shortest path\n      q.push({i: s.push(pop(s) + \"rotate(\", null, degParen) - 2, x: number(a, b)});\n    } else if (b) {\n      s.push(pop(s) + \"rotate(\" + b + degParen);\n    }\n  }\n\n  function skewX(a, b, s, q) {\n    if (a !== b) {\n      q.push({i: s.push(pop(s) + \"skewX(\", null, degParen) - 2, x: number(a, b)});\n    } else if (b) {\n      s.push(pop(s) + \"skewX(\" + b + degParen);\n    }\n  }\n\n  function scale(xa, ya, xb, yb, s, q) {\n    if (xa !== xb || ya !== yb) {\n      var i = s.push(pop(s) + \"scale(\", null, \",\", null, \")\");\n      q.push({i: i - 4, x: number(xa, xb)}, {i: i - 2, x: number(ya, yb)});\n    } else if (xb !== 1 || yb !== 1) {\n      s.push(pop(s) + \"scale(\" + xb + \",\" + yb + \")\");\n    }\n  }\n\n  return function(a, b) {\n    var s = [], // string constants and placeholders\n        q = []; // number interpolators\n    a = parse(a), b = parse(b);\n    translate(a.translateX, a.translateY, b.translateX, b.translateY, s, q);\n    rotate(a.rotate, b.rotate, s, q);\n    skewX(a.skewX, b.skewX, s, q);\n    scale(a.scaleX, a.scaleY, b.scaleX, b.scaleY, s, q);\n    a = b = null; // gc\n    return function(t) {\n      var i = -1, n = q.length, o;\n      while (++i < n) s[(o = q[i]).i] = o.x(t);\n      return s.join(\"\");\n    };\n  };\n}\n\nexport var interpolateTransformCss = interpolateTransform(parseCss, \"px, \", \"px)\", \"deg)\");\nexport var interpolateTransformSvg = interpolateTransform(parseSvg, \", \", \")\", \")\");\n", "import {hsl as colorHsl} from \"d3-color\";\nimport color, {hue} from \"./color.js\";\n\nfunction hsl(hue) {\n  return function(start, end) {\n    var h = hue((start = colorHsl(start)).h, (end = colorHsl(end)).h),\n        s = color(start.s, end.s),\n        l = color(start.l, end.l),\n        opacity = color(start.opacity, end.opacity);\n    return function(t) {\n      start.h = h(t);\n      start.s = s(t);\n      start.l = l(t);\n      start.opacity = opacity(t);\n      return start + \"\";\n    };\n  }\n}\n\nexport default hsl(hue);\nexport var hslLong = hsl(color);\n", "import {lab as colorLab} from \"d3-color\";\nimport color from \"./color.js\";\n\nexport default function lab(start, end) {\n  var l = color((start = colorLab(start)).l, (end = colorLab(end)).l),\n      a = color(start.a, end.a),\n      b = color(start.b, end.b),\n      opacity = color(start.opacity, end.opacity);\n  return function(t) {\n    start.l = l(t);\n    start.a = a(t);\n    start.b = b(t);\n    start.opacity = opacity(t);\n    return start + \"\";\n  };\n}\n", "import {hcl as colorHcl} from \"d3-color\";\nimport color, {hue} from \"./color.js\";\n\nfunction hcl(hue) {\n  return function(start, end) {\n    var h = hue((start = colorHcl(start)).h, (end = colorHcl(end)).h),\n        c = color(start.c, end.c),\n        l = color(start.l, end.l),\n        opacity = color(start.opacity, end.opacity);\n    return function(t) {\n      start.h = h(t);\n      start.c = c(t);\n      start.l = l(t);\n      start.opacity = opacity(t);\n      return start + \"\";\n    };\n  }\n}\n\nexport default hcl(hue);\nexport var hclLong = hcl(color);\n", "import {cubehelix as colorCubehelix} from \"d3-color\";\nimport color, {hue} from \"./color.js\";\n\nfunction cubehelix(hue) {\n  return (function cubehelixGamma(y) {\n    y = +y;\n\n    function cubehelix(start, end) {\n      var h = hue((start = colorCubehelix(start)).h, (end = colorCubehelix(end)).h),\n          s = color(start.s, end.s),\n          l = color(start.l, end.l),\n          opacity = color(start.opacity, end.opacity);\n      return function(t) {\n        start.h = h(t);\n        start.s = s(t);\n        start.l = l(Math.pow(t, y));\n        start.opacity = opacity(t);\n        return start + \"\";\n      };\n    }\n\n    cubehelix.gamma = cubehelixGamma;\n\n    return cubehelix;\n  })(1);\n}\n\nexport default cubehelix(hue);\nexport var cubehelixLong = cubehelix(color);\n", "import {default as value} from \"./value.js\";\n\nexport default function piecewise(interpolate, values) {\n  if (values === undefined) values = interpolate, interpolate = value;\n  var i = 0, n = values.length - 1, v = values[0], I = new Array(n < 0 ? 0 : n);\n  while (i < n) I[i] = interpolate(v, v = values[++i]);\n  return function(t) {\n    var i = Math.max(0, Math.min(n - 1, Math.floor(t *= n)));\n    return I[i](t - i);\n  };\n}\n", "export default function(interpolator, n) {\n  var samples = new Array(n);\n  for (var i = 0; i < n; ++i) samples[i] = interpolator(i / (n - 1));\n  return samples;\n}\n", "var frame = 0, // is an animation frame pending?\n    timeout = 0, // is a timeout pending?\n    interval = 0, // are any timers active?\n    pokeDelay = 1000, // how frequently we check for clock skew\n    taskHead,\n    taskTail,\n    clockLast = 0,\n    clockNow = 0,\n    clockSkew = 0,\n    clock = typeof performance === \"object\" && performance.now ? performance : Date,\n    setFrame = typeof window === \"object\" && window.requestAnimationFrame ? window.requestAnimationFrame.bind(window) : function(f) { setTimeout(f, 17); };\n\nexport function now() {\n  return clockNow || (setFrame(clearNow), clockNow = clock.now() + clockSkew);\n}\n\nfunction clearNow() {\n  clockNow = 0;\n}\n\nexport function Timer() {\n  this._call =\n  this._time =\n  this._next = null;\n}\n\nTimer.prototype = timer.prototype = {\n  constructor: Timer,\n  restart: function(callback, delay, time) {\n    if (typeof callback !== \"function\") throw new TypeError(\"callback is not a function\");\n    time = (time == null ? now() : +time) + (delay == null ? 0 : +delay);\n    if (!this._next && taskTail !== this) {\n      if (taskTail) taskTail._next = this;\n      else taskHead = this;\n      taskTail = this;\n    }\n    this._call = callback;\n    this._time = time;\n    sleep();\n  },\n  stop: function() {\n    if (this._call) {\n      this._call = null;\n      this._time = Infinity;\n      sleep();\n    }\n  }\n};\n\nexport function timer(callback, delay, time) {\n  var t = new Timer;\n  t.restart(callback, delay, time);\n  return t;\n}\n\nexport function timerFlush() {\n  now(); // Get the current time, if not already set.\n  ++frame; // Pretend we\u2019ve set an alarm, if we haven\u2019t already.\n  var t = taskHead, e;\n  while (t) {\n    if ((e = clockNow - t._time) >= 0) t._call.call(undefined, e);\n    t = t._next;\n  }\n  --frame;\n}\n\nfunction wake() {\n  clockNow = (clockLast = clock.now()) + clockSkew;\n  frame = timeout = 0;\n  try {\n    timerFlush();\n  } finally {\n    frame = 0;\n    nap();\n    clockNow = 0;\n  }\n}\n\nfunction poke() {\n  var now = clock.now(), delay = now - clockLast;\n  if (delay > pokeDelay) clockSkew -= delay, clockLast = now;\n}\n\nfunction nap() {\n  var t0, t1 = taskHead, t2, time = Infinity;\n  while (t1) {\n    if (t1._call) {\n      if (time > t1._time) time = t1._time;\n      t0 = t1, t1 = t1._next;\n    } else {\n      t2 = t1._next, t1._next = null;\n      t1 = t0 ? t0._next = t2 : taskHead = t2;\n    }\n  }\n  taskTail = t0;\n  sleep(time);\n}\n\nfunction sleep(time) {\n  if (frame) return; // Soonest alarm already set, or will be.\n  if (timeout) timeout = clearTimeout(timeout);\n  var delay = time - clockNow; // Strictly less than if we recomputed clockNow.\n  if (delay > 24) {\n    if (time < Infinity) timeout = setTimeout(wake, time - clock.now() - clockSkew);\n    if (interval) interval = clearInterval(interval);\n  } else {\n    if (!interval) clockLast = clock.now(), interval = setInterval(poke, pokeDelay);\n    frame = 1, setFrame(wake);\n  }\n}\n", "import {Timer} from \"./timer.js\";\n\nexport default function(callback, delay, time) {\n  var t = new Timer;\n  delay = delay == null ? 0 : +delay;\n  t.restart(elapsed => {\n    t.stop();\n    callback(elapsed + delay);\n  }, delay, time);\n  return t;\n}\n", "import {dispatch} from \"d3-dispatch\";\nimport {timer, timeout} from \"d3-timer\";\n\nvar emptyOn = dispatch(\"start\", \"end\", \"cancel\", \"interrupt\");\nvar emptyTween = [];\n\nexport var CREATED = 0;\nexport var SCHEDULED = 1;\nexport var STARTING = 2;\nexport var STARTED = 3;\nexport var RUNNING = 4;\nexport var ENDING = 5;\nexport var ENDED = 6;\n\nexport default function(node, name, id, index, group, timing) {\n  var schedules = node.__transition;\n  if (!schedules) node.__transition = {};\n  else if (id in schedules) return;\n  create(node, id, {\n    name: name,\n    index: index, // For context during callback.\n    group: group, // For context during callback.\n    on: emptyOn,\n    tween: emptyTween,\n    time: timing.time,\n    delay: timing.delay,\n    duration: timing.duration,\n    ease: timing.ease,\n    timer: null,\n    state: CREATED\n  });\n}\n\nexport function init(node, id) {\n  var schedule = get(node, id);\n  if (schedule.state > CREATED) throw new Error(\"too late; already scheduled\");\n  return schedule;\n}\n\nexport function set(node, id) {\n  var schedule = get(node, id);\n  if (schedule.state > STARTED) throw new Error(\"too late; already running\");\n  return schedule;\n}\n\nexport function get(node, id) {\n  var schedule = node.__transition;\n  if (!schedule || !(schedule = schedule[id])) throw new Error(\"transition not found\");\n  return schedule;\n}\n\nfunction create(node, id, self) {\n  var schedules = node.__transition,\n      tween;\n\n  // Initialize the self timer when the transition is created.\n  // Note the actual delay is not known until the first callback!\n  schedules[id] = self;\n  self.timer = timer(schedule, 0, self.time);\n\n  function schedule(elapsed) {\n    self.state = SCHEDULED;\n    self.timer.restart(start, self.delay, self.time);\n\n    // If the elapsed delay is less than our first sleep, start immediately.\n    if (self.delay <= elapsed) start(elapsed - self.delay);\n  }\n\n  function start(elapsed) {\n    var i, j, n, o;\n\n    // If the state is not SCHEDULED, then we previously errored on start.\n    if (self.state !== SCHEDULED) return stop();\n\n    for (i in schedules) {\n      o = schedules[i];\n      if (o.name !== self.name) continue;\n\n      // While this element already has a starting transition during this frame,\n      // defer starting an interrupting transition until that transition has a\n      // chance to tick (and possibly end); see d3/d3-transition#54!\n      if (o.state === STARTED) return timeout(start);\n\n      // Interrupt the active transition, if any.\n      if (o.state === RUNNING) {\n        o.state = ENDED;\n        o.timer.stop();\n        o.on.call(\"interrupt\", node, node.__data__, o.index, o.group);\n        delete schedules[i];\n      }\n\n      // Cancel any pre-empted transitions.\n      else if (+i < id) {\n        o.state = ENDED;\n        o.timer.stop();\n        o.on.call(\"cancel\", node, node.__data__, o.index, o.group);\n        delete schedules[i];\n      }\n    }\n\n    // Defer the first tick to end of the current frame; see d3/d3#1576.\n    // Note the transition may be canceled after start and before the first tick!\n    // Note this must be scheduled before the start event; see d3/d3-transition#16!\n    // Assuming this is successful, subsequent callbacks go straight to tick.\n    timeout(function() {\n      if (self.state === STARTED) {\n        self.state = RUNNING;\n        self.timer.restart(tick, self.delay, self.time);\n        tick(elapsed);\n      }\n    });\n\n    // Dispatch the start event.\n    // Note this must be done before the tween are initialized.\n    self.state = STARTING;\n    self.on.call(\"start\", node, node.__data__, self.index, self.group);\n    if (self.state !== STARTING) return; // interrupted\n    self.state = STARTED;\n\n    // Initialize the tween, deleting null tween.\n    tween = new Array(n = self.tween.length);\n    for (i = 0, j = -1; i < n; ++i) {\n      if (o = self.tween[i].value.call(node, node.__data__, self.index, self.group)) {\n        tween[++j] = o;\n      }\n    }\n    tween.length = j + 1;\n  }\n\n  function tick(elapsed) {\n    var t = elapsed < self.duration ? self.ease.call(null, elapsed / self.duration) : (self.timer.restart(stop), self.state = ENDING, 1),\n        i = -1,\n        n = tween.length;\n\n    while (++i < n) {\n      tween[i].call(node, t);\n    }\n\n    // Dispatch the end event.\n    if (self.state === ENDING) {\n      self.on.call(\"end\", node, node.__data__, self.index, self.group);\n      stop();\n    }\n  }\n\n  function stop() {\n    self.state = ENDED;\n    self.timer.stop();\n    delete schedules[id];\n    for (var i in schedules) return; // eslint-disable-line no-unused-vars\n    delete node.__transition;\n  }\n}\n", "import {STARTING, ENDING, ENDED} from \"./transition/schedule.js\";\n\nexport default function(node, name) {\n  var schedules = node.__transition,\n      schedule,\n      active,\n      empty = true,\n      i;\n\n  if (!schedules) return;\n\n  name = name == null ? null : name + \"\";\n\n  for (i in schedules) {\n    if ((schedule = schedules[i]).name !== name) { empty = false; continue; }\n    active = schedule.state > STARTING && schedule.state < ENDING;\n    schedule.state = ENDED;\n    schedule.timer.stop();\n    schedule.on.call(active ? \"interrupt\" : \"cancel\", node, node.__data__, schedule.index, schedule.group);\n    delete schedules[i];\n  }\n\n  if (empty) delete node.__transition;\n}\n", "import interrupt from \"../interrupt.js\";\n\nexport default function(name) {\n  return this.each(function() {\n    interrupt(this, name);\n  });\n}\n", "import {get, set} from \"./schedule.js\";\n\nfunction tweenRemove(id, name) {\n  var tween0, tween1;\n  return function() {\n    var schedule = set(this, id),\n        tween = schedule.tween;\n\n    // If this node shared tween with the previous node,\n    // just assign the updated shared tween and we\u2019re done!\n    // Otherwise, copy-on-write.\n    if (tween !== tween0) {\n      tween1 = tween0 = tween;\n      for (var i = 0, n = tween1.length; i < n; ++i) {\n        if (tween1[i].name === name) {\n          tween1 = tween1.slice();\n          tween1.splice(i, 1);\n          break;\n        }\n      }\n    }\n\n    schedule.tween = tween1;\n  };\n}\n\nfunction tweenFunction(id, name, value) {\n  var tween0, tween1;\n  if (typeof value !== \"function\") throw new Error;\n  return function() {\n    var schedule = set(this, id),\n        tween = schedule.tween;\n\n    // If this node shared tween with the previous node,\n    // just assign the updated shared tween and we\u2019re done!\n    // Otherwise, copy-on-write.\n    if (tween !== tween0) {\n      tween1 = (tween0 = tween).slice();\n      for (var t = {name: name, value: value}, i = 0, n = tween1.length; i < n; ++i) {\n        if (tween1[i].name === name) {\n          tween1[i] = t;\n          break;\n        }\n      }\n      if (i === n) tween1.push(t);\n    }\n\n    schedule.tween = tween1;\n  };\n}\n\nexport default function(name, value) {\n  var id = this._id;\n\n  name += \"\";\n\n  if (arguments.length < 2) {\n    var tween = get(this.node(), id).tween;\n    for (var i = 0, n = tween.length, t; i < n; ++i) {\n      if ((t = tween[i]).name === name) {\n        return t.value;\n      }\n    }\n    return null;\n  }\n\n  return this.each((value == null ? tweenRemove : tweenFunction)(id, name, value));\n}\n\nexport function tweenValue(transition, name, value) {\n  var id = transition._id;\n\n  transition.each(function() {\n    var schedule = set(this, id);\n    (schedule.value || (schedule.value = {}))[name] = value.apply(this, arguments);\n  });\n\n  return function(node) {\n    return get(node, id).value[name];\n  };\n}\n", "import {color} from \"d3-color\";\nimport {interpolateNumber, interpolateRgb, interpolateString} from \"d3-interpolate\";\n\nexport default function(a, b) {\n  var c;\n  return (typeof b === \"number\" ? interpolateNumber\n      : b instanceof color ? interpolateRgb\n      : (c = color(b)) ? (b = c, interpolateRgb)\n      : interpolateString)(a, b);\n}\n", "import {interpolateTransformSvg as interpolateTransform} from \"d3-interpolate\";\nimport {namespace} from \"d3-selection\";\nimport {tweenValue} from \"./tween.js\";\nimport interpolate from \"./interpolate.js\";\n\nfunction attrRemove(name) {\n  return function() {\n    this.removeAttribute(name);\n  };\n}\n\nfunction attrRemoveNS(fullname) {\n  return function() {\n    this.removeAttributeNS(fullname.space, fullname.local);\n  };\n}\n\nfunction attrConstant(name, interpolate, value1) {\n  var string00,\n      string1 = value1 + \"\",\n      interpolate0;\n  return function() {\n    var string0 = this.getAttribute(name);\n    return string0 === string1 ? null\n        : string0 === string00 ? interpolate0\n        : interpolate0 = interpolate(string00 = string0, value1);\n  };\n}\n\nfunction attrConstantNS(fullname, interpolate, value1) {\n  var string00,\n      string1 = value1 + \"\",\n      interpolate0;\n  return function() {\n    var string0 = this.getAttributeNS(fullname.space, fullname.local);\n    return string0 === string1 ? null\n        : string0 === string00 ? interpolate0\n        : interpolate0 = interpolate(string00 = string0, value1);\n  };\n}\n\nfunction attrFunction(name, interpolate, value) {\n  var string00,\n      string10,\n      interpolate0;\n  return function() {\n    var string0, value1 = value(this), string1;\n    if (value1 == null) return void this.removeAttribute(name);\n    string0 = this.getAttribute(name);\n    string1 = value1 + \"\";\n    return string0 === string1 ? null\n        : string0 === string00 && string1 === string10 ? interpolate0\n        : (string10 = string1, interpolate0 = interpolate(string00 = string0, value1));\n  };\n}\n\nfunction attrFunctionNS(fullname, interpolate, value) {\n  var string00,\n      string10,\n      interpolate0;\n  return function() {\n    var string0, value1 = value(this), string1;\n    if (value1 == null) return void this.removeAttributeNS(fullname.space, fullname.local);\n    string0 = this.getAttributeNS(fullname.space, fullname.local);\n    string1 = value1 + \"\";\n    return string0 === string1 ? null\n        : string0 === string00 && string1 === string10 ? interpolate0\n        : (string10 = string1, interpolate0 = interpolate(string00 = string0, value1));\n  };\n}\n\nexport default function(name, value) {\n  var fullname = namespace(name), i = fullname === \"transform\" ? interpolateTransform : interpolate;\n  return this.attrTween(name, typeof value === \"function\"\n      ? (fullname.local ? attrFunctionNS : attrFunction)(fullname, i, tweenValue(this, \"attr.\" + name, value))\n      : value == null ? (fullname.local ? attrRemoveNS : attrRemove)(fullname)\n      : (fullname.local ? attrConstantNS : attrConstant)(fullname, i, value));\n}\n", "import {namespace} from \"d3-selection\";\n\nfunction attrInterpolate(name, i) {\n  return function(t) {\n    this.setAttribute(name, i.call(this, t));\n  };\n}\n\nfunction attrInterpolateNS(fullname, i) {\n  return function(t) {\n    this.setAttributeNS(fullname.space, fullname.local, i.call(this, t));\n  };\n}\n\nfunction attrTweenNS(fullname, value) {\n  var t0, i0;\n  function tween() {\n    var i = value.apply(this, arguments);\n    if (i !== i0) t0 = (i0 = i) && attrInterpolateNS(fullname, i);\n    return t0;\n  }\n  tween._value = value;\n  return tween;\n}\n\nfunction attrTween(name, value) {\n  var t0, i0;\n  function tween() {\n    var i = value.apply(this, arguments);\n    if (i !== i0) t0 = (i0 = i) && attrInterpolate(name, i);\n    return t0;\n  }\n  tween._value = value;\n  return tween;\n}\n\nexport default function(name, value) {\n  var key = \"attr.\" + name;\n  if (arguments.length < 2) return (key = this.tween(key)) && key._value;\n  if (value == null) return this.tween(key, null);\n  if (typeof value !== \"function\") throw new Error;\n  var fullname = namespace(name);\n  return this.tween(key, (fullname.local ? attrTweenNS : attrTween)(fullname, value));\n}\n", "import {get, init} from \"./schedule.js\";\n\nfunction delayFunction(id, value) {\n  return function() {\n    init(this, id).delay = +value.apply(this, arguments);\n  };\n}\n\nfunction delayConstant(id, value) {\n  return value = +value, function() {\n    init(this, id).delay = value;\n  };\n}\n\nexport default function(value) {\n  var id = this._id;\n\n  return arguments.length\n      ? this.each((typeof value === \"function\"\n          ? delayFunction\n          : delayConstant)(id, value))\n      : get(this.node(), id).delay;\n}\n", "import {get, set} from \"./schedule.js\";\n\nfunction durationFunction(id, value) {\n  return function() {\n    set(this, id).duration = +value.apply(this, arguments);\n  };\n}\n\nfunction durationConstant(id, value) {\n  return value = +value, function() {\n    set(this, id).duration = value;\n  };\n}\n\nexport default function(value) {\n  var id = this._id;\n\n  return arguments.length\n      ? this.each((typeof value === \"function\"\n          ? durationFunction\n          : durationConstant)(id, value))\n      : get(this.node(), id).duration;\n}\n", "import {get, set} from \"./schedule.js\";\n\nfunction easeConstant(id, value) {\n  if (typeof value !== \"function\") throw new Error;\n  return function() {\n    set(this, id).ease = value;\n  };\n}\n\nexport default function(value) {\n  var id = this._id;\n\n  return arguments.length\n      ? this.each(easeConstant(id, value))\n      : get(this.node(), id).ease;\n}\n", "import {set} from \"./schedule.js\";\n\nfunction easeVarying(id, value) {\n  return function() {\n    var v = value.apply(this, arguments);\n    if (typeof v !== \"function\") throw new Error;\n    set(this, id).ease = v;\n  };\n}\n\nexport default function(value) {\n  if (typeof value !== \"function\") throw new Error;\n  return this.each(easeVarying(this._id, value));\n}\n", "import {matcher} from \"d3-selection\";\nimport {Transition} from \"./index.js\";\n\nexport default function(match) {\n  if (typeof match !== \"function\") match = matcher(match);\n\n  for (var groups = this._groups, m = groups.length, subgroups = new Array(m), j = 0; j < m; ++j) {\n    for (var group = groups[j], n = group.length, subgroup = subgroups[j] = [], node, i = 0; i < n; ++i) {\n      if ((node = group[i]) && match.call(node, node.__data__, i, group)) {\n        subgroup.push(node);\n      }\n    }\n  }\n\n  return new Transition(subgroups, this._parents, this._name, this._id);\n}\n", "import {Transition} from \"./index.js\";\n\nexport default function(transition) {\n  if (transition._id !== this._id) throw new Error;\n\n  for (var groups0 = this._groups, groups1 = transition._groups, m0 = groups0.length, m1 = groups1.length, m = Math.min(m0, m1), merges = new Array(m0), j = 0; j < m; ++j) {\n    for (var group0 = groups0[j], group1 = groups1[j], n = group0.length, merge = merges[j] = new Array(n), node, i = 0; i < n; ++i) {\n      if (node = group0[i] || group1[i]) {\n        merge[i] = node;\n      }\n    }\n  }\n\n  for (; j < m0; ++j) {\n    merges[j] = groups0[j];\n  }\n\n  return new Transition(merges, this._parents, this._name, this._id);\n}\n", "import {get, set, init} from \"./schedule.js\";\n\nfunction start(name) {\n  return (name + \"\").trim().split(/^|\\s+/).every(function(t) {\n    var i = t.indexOf(\".\");\n    if (i >= 0) t = t.slice(0, i);\n    return !t || t === \"start\";\n  });\n}\n\nfunction onFunction(id, name, listener) {\n  var on0, on1, sit = start(name) ? init : set;\n  return function() {\n    var schedule = sit(this, id),\n        on = schedule.on;\n\n    // If this node shared a dispatch with the previous node,\n    // just assign the updated shared dispatch and we\u2019re done!\n    // Otherwise, copy-on-write.\n    if (on !== on0) (on1 = (on0 = on).copy()).on(name, listener);\n\n    schedule.on = on1;\n  };\n}\n\nexport default function(name, listener) {\n  var id = this._id;\n\n  return arguments.length < 2\n      ? get(this.node(), id).on.on(name)\n      : this.each(onFunction(id, name, listener));\n}\n", "function removeFunction(id) {\n  return function() {\n    var parent = this.parentNode;\n    for (var i in this.__transition) if (+i !== id) return;\n    if (parent) parent.removeChild(this);\n  };\n}\n\nexport default function() {\n  return this.on(\"end.remove\", removeFunction(this._id));\n}\n", "import {selector} from \"d3-selection\";\nimport {Transition} from \"./index.js\";\nimport schedule, {get} from \"./schedule.js\";\n\nexport default function(select) {\n  var name = this._name,\n      id = this._id;\n\n  if (typeof select !== \"function\") select = selector(select);\n\n  for (var groups = this._groups, m = groups.length, subgroups = new Array(m), j = 0; j < m; ++j) {\n    for (var group = groups[j], n = group.length, subgroup = subgroups[j] = new Array(n), node, subnode, i = 0; i < n; ++i) {\n      if ((node = group[i]) && (subnode = select.call(node, node.__data__, i, group))) {\n        if (\"__data__\" in node) subnode.__data__ = node.__data__;\n        subgroup[i] = subnode;\n        schedule(subgroup[i], name, id, i, subgroup, get(node, id));\n      }\n    }\n  }\n\n  return new Transition(subgroups, this._parents, name, id);\n}\n", "import {selectorAll} from \"d3-selection\";\nimport {Transition} from \"./index.js\";\nimport schedule, {get} from \"./schedule.js\";\n\nexport default function(select) {\n  var name = this._name,\n      id = this._id;\n\n  if (typeof select !== \"function\") select = selectorAll(select);\n\n  for (var groups = this._groups, m = groups.length, subgroups = [], parents = [], j = 0; j < m; ++j) {\n    for (var group = groups[j], n = group.length, node, i = 0; i < n; ++i) {\n      if (node = group[i]) {\n        for (var children = select.call(node, node.__data__, i, group), child, inherit = get(node, id), k = 0, l = children.length; k < l; ++k) {\n          if (child = children[k]) {\n            schedule(child, name, id, k, children, inherit);\n          }\n        }\n        subgroups.push(children);\n        parents.push(node);\n      }\n    }\n  }\n\n  return new Transition(subgroups, parents, name, id);\n}\n", "import {selection} from \"d3-selection\";\n\nvar Selection = selection.prototype.constructor;\n\nexport default function() {\n  return new Selection(this._groups, this._parents);\n}\n", "import {interpolateTransformCss as interpolateTransform} from \"d3-interpolate\";\nimport {style} from \"d3-selection\";\nimport {set} from \"./schedule.js\";\nimport {tweenValue} from \"./tween.js\";\nimport interpolate from \"./interpolate.js\";\n\nfunction styleNull(name, interpolate) {\n  var string00,\n      string10,\n      interpolate0;\n  return function() {\n    var string0 = style(this, name),\n        string1 = (this.style.removeProperty(name), style(this, name));\n    return string0 === string1 ? null\n        : string0 === string00 && string1 === string10 ? interpolate0\n        : interpolate0 = interpolate(string00 = string0, string10 = string1);\n  };\n}\n\nfunction styleRemove(name) {\n  return function() {\n    this.style.removeProperty(name);\n  };\n}\n\nfunction styleConstant(name, interpolate, value1) {\n  var string00,\n      string1 = value1 + \"\",\n      interpolate0;\n  return function() {\n    var string0 = style(this, name);\n    return string0 === string1 ? null\n        : string0 === string00 ? interpolate0\n        : interpolate0 = interpolate(string00 = string0, value1);\n  };\n}\n\nfunction styleFunction(name, interpolate, value) {\n  var string00,\n      string10,\n      interpolate0;\n  return function() {\n    var string0 = style(this, name),\n        value1 = value(this),\n        string1 = value1 + \"\";\n    if (value1 == null) string1 = value1 = (this.style.removeProperty(name), style(this, name));\n    return string0 === string1 ? null\n        : string0 === string00 && string1 === string10 ? interpolate0\n        : (string10 = string1, interpolate0 = interpolate(string00 = string0, value1));\n  };\n}\n\nfunction styleMaybeRemove(id, name) {\n  var on0, on1, listener0, key = \"style.\" + name, event = \"end.\" + key, remove;\n  return function() {\n    var schedule = set(this, id),\n        on = schedule.on,\n        listener = schedule.value[key] == null ? remove || (remove = styleRemove(name)) : undefined;\n\n    // If this node shared a dispatch with the previous node,\n    // just assign the updated shared dispatch and we\u2019re done!\n    // Otherwise, copy-on-write.\n    if (on !== on0 || listener0 !== listener) (on1 = (on0 = on).copy()).on(event, listener0 = listener);\n\n    schedule.on = on1;\n  };\n}\n\nexport default function(name, value, priority) {\n  var i = (name += \"\") === \"transform\" ? interpolateTransform : interpolate;\n  return value == null ? this\n      .styleTween(name, styleNull(name, i))\n      .on(\"end.style.\" + name, styleRemove(name))\n    : typeof value === \"function\" ? this\n      .styleTween(name, styleFunction(name, i, tweenValue(this, \"style.\" + name, value)))\n      .each(styleMaybeRemove(this._id, name))\n    : this\n      .styleTween(name, styleConstant(name, i, value), priority)\n      .on(\"end.style.\" + name, null);\n}\n", "function styleInterpolate(name, i, priority) {\n  return function(t) {\n    this.style.setProperty(name, i.call(this, t), priority);\n  };\n}\n\nfunction styleTween(name, value, priority) {\n  var t, i0;\n  function tween() {\n    var i = value.apply(this, arguments);\n    if (i !== i0) t = (i0 = i) && styleInterpolate(name, i, priority);\n    return t;\n  }\n  tween._value = value;\n  return tween;\n}\n\nexport default function(name, value, priority) {\n  var key = \"style.\" + (name += \"\");\n  if (arguments.length < 2) return (key = this.tween(key)) && key._value;\n  if (value == null) return this.tween(key, null);\n  if (typeof value !== \"function\") throw new Error;\n  return this.tween(key, styleTween(name, value, priority == null ? \"\" : priority));\n}\n", "import {tweenValue} from \"./tween.js\";\n\nfunction textConstant(value) {\n  return function() {\n    this.textContent = value;\n  };\n}\n\nfunction textFunction(value) {\n  return function() {\n    var value1 = value(this);\n    this.textContent = value1 == null ? \"\" : value1;\n  };\n}\n\nexport default function(value) {\n  return this.tween(\"text\", typeof value === \"function\"\n      ? textFunction(tweenValue(this, \"text\", value))\n      : textConstant(value == null ? \"\" : value + \"\"));\n}\n", "function textInterpolate(i) {\n  return function(t) {\n    this.textContent = i.call(this, t);\n  };\n}\n\nfunction textTween(value) {\n  var t0, i0;\n  function tween() {\n    var i = value.apply(this, arguments);\n    if (i !== i0) t0 = (i0 = i) && textInterpolate(i);\n    return t0;\n  }\n  tween._value = value;\n  return tween;\n}\n\nexport default function(value) {\n  var key = \"text\";\n  if (arguments.length < 1) return (key = this.tween(key)) && key._value;\n  if (value == null) return this.tween(key, null);\n  if (typeof value !== \"function\") throw new Error;\n  return this.tween(key, textTween(value));\n}\n", "import {Transition, newId} from \"./index.js\";\nimport schedule, {get} from \"./schedule.js\";\n\nexport default function() {\n  var name = this._name,\n      id0 = this._id,\n      id1 = newId();\n\n  for (var groups = this._groups, m = groups.length, j = 0; j < m; ++j) {\n    for (var group = groups[j], n = group.length, node, i = 0; i < n; ++i) {\n      if (node = group[i]) {\n        var inherit = get(node, id0);\n        schedule(node, name, id1, i, group, {\n          time: inherit.time + inherit.delay + inherit.duration,\n          delay: 0,\n          duration: inherit.duration,\n          ease: inherit.ease\n        });\n      }\n    }\n  }\n\n  return new Transition(groups, this._parents, name, id1);\n}\n", "import {set} from \"./schedule.js\";\n\nexport default function() {\n  var on0, on1, that = this, id = that._id, size = that.size();\n  return new Promise(function(resolve, reject) {\n    var cancel = {value: reject},\n        end = {value: function() { if (--size === 0) resolve(); }};\n\n    that.each(function() {\n      var schedule = set(this, id),\n          on = schedule.on;\n\n      // If this node shared a dispatch with the previous node,\n      // just assign the updated shared dispatch and we\u2019re done!\n      // Otherwise, copy-on-write.\n      if (on !== on0) {\n        on1 = (on0 = on).copy();\n        on1._.cancel.push(cancel);\n        on1._.interrupt.push(cancel);\n        on1._.end.push(end);\n      }\n\n      schedule.on = on1;\n    });\n\n    // The selection was empty, resolve end immediately\n    if (size === 0) resolve();\n  });\n}\n", "import {selection} from \"d3-selection\";\nimport transition_attr from \"./attr.js\";\nimport transition_attrTween from \"./attrTween.js\";\nimport transition_delay from \"./delay.js\";\nimport transition_duration from \"./duration.js\";\nimport transition_ease from \"./ease.js\";\nimport transition_easeVarying from \"./easeVarying.js\";\nimport transition_filter from \"./filter.js\";\nimport transition_merge from \"./merge.js\";\nimport transition_on from \"./on.js\";\nimport transition_remove from \"./remove.js\";\nimport transition_select from \"./select.js\";\nimport transition_selectAll from \"./selectAll.js\";\nimport transition_selection from \"./selection.js\";\nimport transition_style from \"./style.js\";\nimport transition_styleTween from \"./styleTween.js\";\nimport transition_text from \"./text.js\";\nimport transition_textTween from \"./textTween.js\";\nimport transition_transition from \"./transition.js\";\nimport transition_tween from \"./tween.js\";\nimport transition_end from \"./end.js\";\n\nvar id = 0;\n\nexport function Transition(groups, parents, name, id) {\n  this._groups = groups;\n  this._parents = parents;\n  this._name = name;\n  this._id = id;\n}\n\nexport default function transition(name) {\n  return selection().transition(name);\n}\n\nexport function newId() {\n  return ++id;\n}\n\nvar selection_prototype = selection.prototype;\n\nTransition.prototype = transition.prototype = {\n  constructor: Transition,\n  select: transition_select,\n  selectAll: transition_selectAll,\n  selectChild: selection_prototype.selectChild,\n  selectChildren: selection_prototype.selectChildren,\n  filter: transition_filter,\n  merge: transition_merge,\n  selection: transition_selection,\n  transition: transition_transition,\n  call: selection_prototype.call,\n  nodes: selection_prototype.nodes,\n  node: selection_prototype.node,\n  size: selection_prototype.size,\n  empty: selection_prototype.empty,\n  each: selection_prototype.each,\n  on: transition_on,\n  attr: transition_attr,\n  attrTween: transition_attrTween,\n  style: transition_style,\n  styleTween: transition_styleTween,\n  text: transition_text,\n  textTween: transition_textTween,\n  remove: transition_remove,\n  tween: transition_tween,\n  delay: transition_delay,\n  duration: transition_duration,\n  ease: transition_ease,\n  easeVarying: transition_easeVarying,\n  end: transition_end,\n  [Symbol.iterator]: selection_prototype[Symbol.iterator]\n};\n", "export function cubicIn(t) {\n  return t * t * t;\n}\n\nexport function cubicOut(t) {\n  return --t * t * t + 1;\n}\n\nexport function cubicInOut(t) {\n  return ((t *= 2) <= 1 ? t * t * t : (t -= 2) * t * t + 2) / 2;\n}\n", "import {Transition, newId} from \"../transition/index.js\";\nimport schedule from \"../transition/schedule.js\";\nimport {easeCubicInOut} from \"d3-ease\";\nimport {now} from \"d3-timer\";\n\nvar defaultTiming = {\n  time: null, // Set on use.\n  delay: 0,\n  duration: 250,\n  ease: easeCubicInOut\n};\n\nfunction inherit(node, id) {\n  var timing;\n  while (!(timing = node.__transition) || !(timing = timing[id])) {\n    if (!(node = node.parentNode)) {\n      throw new Error(`transition ${id} not found`);\n    }\n  }\n  return timing;\n}\n\nexport default function(name) {\n  var id,\n      timing;\n\n  if (name instanceof Transition) {\n    id = name._id, name = name._name;\n  } else {\n    id = newId(), (timing = defaultTiming).time = now(), name = name == null ? null : name + \"\";\n  }\n\n  for (var groups = this._groups, m = groups.length, j = 0; j < m; ++j) {\n    for (var group = groups[j], n = group.length, node, i = 0; i < n; ++i) {\n      if (node = group[i]) {\n        schedule(node, name, id, i, group, timing || inherit(node, id));\n      }\n    }\n  }\n\n  return new Transition(groups, this._parents, name, id);\n}\n", "import {selection} from \"d3-selection\";\nimport selection_interrupt from \"./interrupt.js\";\nimport selection_transition from \"./transition.js\";\n\nselection.prototype.interrupt = selection_interrupt;\nselection.prototype.transition = selection_transition;\n", "import {dispatch} from \"d3-dispatch\";\nimport {dragDisable, dragEnable} from \"d3-drag\";\nimport {interpolate} from \"d3-interpolate\";\nimport {pointer, select} from \"d3-selection\";\nimport {interrupt} from \"d3-transition\";\nimport constant from \"./constant.js\";\nimport BrushEvent from \"./event.js\";\nimport noevent, {nopropagation} from \"./noevent.js\";\n\nvar MODE_DRAG = {name: \"drag\"},\n    MODE_SPACE = {name: \"space\"},\n    MODE_HANDLE = {name: \"handle\"},\n    MODE_CENTER = {name: \"center\"};\n\nconst {abs, max, min} = Math;\n\nfunction number1(e) {\n  return [+e[0], +e[1]];\n}\n\nfunction number2(e) {\n  return [number1(e[0]), number1(e[1])];\n}\n\nvar X = {\n  name: \"x\",\n  handles: [\"w\", \"e\"].map(type),\n  input: function(x, e) { return x == null ? null : [[+x[0], e[0][1]], [+x[1], e[1][1]]]; },\n  output: function(xy) { return xy && [xy[0][0], xy[1][0]]; }\n};\n\nvar Y = {\n  name: \"y\",\n  handles: [\"n\", \"s\"].map(type),\n  input: function(y, e) { return y == null ? null : [[e[0][0], +y[0]], [e[1][0], +y[1]]]; },\n  output: function(xy) { return xy && [xy[0][1], xy[1][1]]; }\n};\n\nvar XY = {\n  name: \"xy\",\n  handles: [\"n\", \"w\", \"e\", \"s\", \"nw\", \"ne\", \"sw\", \"se\"].map(type),\n  input: function(xy) { return xy == null ? null : number2(xy); },\n  output: function(xy) { return xy; }\n};\n\nvar cursors = {\n  overlay: \"crosshair\",\n  selection: \"move\",\n  n: \"ns-resize\",\n  e: \"ew-resize\",\n  s: \"ns-resize\",\n  w: \"ew-resize\",\n  nw: \"nwse-resize\",\n  ne: \"nesw-resize\",\n  se: \"nwse-resize\",\n  sw: \"nesw-resize\"\n};\n\nvar flipX = {\n  e: \"w\",\n  w: \"e\",\n  nw: \"ne\",\n  ne: \"nw\",\n  se: \"sw\",\n  sw: \"se\"\n};\n\nvar flipY = {\n  n: \"s\",\n  s: \"n\",\n  nw: \"sw\",\n  ne: \"se\",\n  se: \"ne\",\n  sw: \"nw\"\n};\n\nvar signsX = {\n  overlay: +1,\n  selection: +1,\n  n: null,\n  e: +1,\n  s: null,\n  w: -1,\n  nw: -1,\n  ne: +1,\n  se: +1,\n  sw: -1\n};\n\nvar signsY = {\n  overlay: +1,\n  selection: +1,\n  n: -1,\n  e: null,\n  s: +1,\n  w: null,\n  nw: -1,\n  ne: -1,\n  se: +1,\n  sw: +1\n};\n\nfunction type(t) {\n  return {type: t};\n}\n\n// Ignore right-click, since that should open the context menu.\nfunction defaultFilter(event) {\n  return !event.ctrlKey && !event.button;\n}\n\nfunction defaultExtent() {\n  var svg = this.ownerSVGElement || this;\n  if (svg.hasAttribute(\"viewBox\")) {\n    svg = svg.viewBox.baseVal;\n    return [[svg.x, svg.y], [svg.x + svg.width, svg.y + svg.height]];\n  }\n  return [[0, 0], [svg.width.baseVal.value, svg.height.baseVal.value]];\n}\n\nfunction defaultTouchable() {\n  return navigator.maxTouchPoints || (\"ontouchstart\" in this);\n}\n\n// Like d3.local, but with the name \u201C__brush\u201D rather than auto-generated.\nfunction local(node) {\n  while (!node.__brush) if (!(node = node.parentNode)) return;\n  return node.__brush;\n}\n\nfunction empty(extent) {\n  return extent[0][0] === extent[1][0]\n      || extent[0][1] === extent[1][1];\n}\n\nexport function brushSelection(node) {\n  var state = node.__brush;\n  return state ? state.dim.output(state.selection) : null;\n}\n\nexport function brushX() {\n  return brush(X);\n}\n\nexport function brushY() {\n  return brush(Y);\n}\n\nexport default function() {\n  return brush(XY);\n}\n\nfunction brush(dim) {\n  var extent = defaultExtent,\n      filter = defaultFilter,\n      touchable = defaultTouchable,\n      keys = true,\n      listeners = dispatch(\"start\", \"brush\", \"end\"),\n      handleSize = 6,\n      touchending;\n\n  function brush(group) {\n    var overlay = group\n        .property(\"__brush\", initialize)\n      .selectAll(\".overlay\")\n      .data([type(\"overlay\")]);\n\n    overlay.enter().append(\"rect\")\n        .attr(\"class\", \"overlay\")\n        .attr(\"pointer-events\", \"all\")\n        .attr(\"cursor\", cursors.overlay)\n      .merge(overlay)\n        .each(function() {\n          var extent = local(this).extent;\n          select(this)\n              .attr(\"x\", extent[0][0])\n              .attr(\"y\", extent[0][1])\n              .attr(\"width\", extent[1][0] - extent[0][0])\n              .attr(\"height\", extent[1][1] - extent[0][1]);\n        });\n\n    group.selectAll(\".selection\")\n      .data([type(\"selection\")])\n      .enter().append(\"rect\")\n        .attr(\"class\", \"selection\")\n        .attr(\"cursor\", cursors.selection)\n        .attr(\"fill\", \"#777\")\n        .attr(\"fill-opacity\", 0.3)\n        .attr(\"stroke\", \"#fff\")\n        .attr(\"shape-rendering\", \"crispEdges\");\n\n    var handle = group.selectAll(\".handle\")\n      .data(dim.handles, function(d) { return d.type; });\n\n    handle.exit().remove();\n\n    handle.enter().append(\"rect\")\n        .attr(\"class\", function(d) { return \"handle handle--\" + d.type; })\n        .attr(\"cursor\", function(d) { return cursors[d.type]; });\n\n    group\n        .each(redraw)\n        .attr(\"fill\", \"none\")\n        .attr(\"pointer-events\", \"all\")\n        .on(\"mousedown.brush\", started)\n      .filter(touchable)\n        .on(\"touchstart.brush\", started)\n        .on(\"touchmove.brush\", touchmoved)\n        .on(\"touchend.brush touchcancel.brush\", touchended)\n        .style(\"touch-action\", \"none\")\n        .style(\"-webkit-tap-highlight-color\", \"rgba(0,0,0,0)\");\n  }\n\n  brush.move = function(group, selection, event) {\n    if (group.tween) {\n      group\n          .on(\"start.brush\", function(event) { emitter(this, arguments).beforestart().start(event); })\n          .on(\"interrupt.brush end.brush\", function(event) { emitter(this, arguments).end(event); })\n          .tween(\"brush\", function() {\n            var that = this,\n                state = that.__brush,\n                emit = emitter(that, arguments),\n                selection0 = state.selection,\n                selection1 = dim.input(typeof selection === \"function\" ? selection.apply(this, arguments) : selection, state.extent),\n                i = interpolate(selection0, selection1);\n\n            function tween(t) {\n              state.selection = t === 1 && selection1 === null ? null : i(t);\n              redraw.call(that);\n              emit.brush();\n            }\n\n            return selection0 !== null && selection1 !== null ? tween : tween(1);\n          });\n    } else {\n      group\n          .each(function() {\n            var that = this,\n                args = arguments,\n                state = that.__brush,\n                selection1 = dim.input(typeof selection === \"function\" ? selection.apply(that, args) : selection, state.extent),\n                emit = emitter(that, args).beforestart();\n\n            interrupt(that);\n            state.selection = selection1 === null ? null : selection1;\n            redraw.call(that);\n            emit.start(event).brush(event).end(event);\n          });\n    }\n  };\n\n  brush.clear = function(group, event) {\n    brush.move(group, null, event);\n  };\n\n  function redraw() {\n    var group = select(this),\n        selection = local(this).selection;\n\n    if (selection) {\n      group.selectAll(\".selection\")\n          .style(\"display\", null)\n          .attr(\"x\", selection[0][0])\n          .attr(\"y\", selection[0][1])\n          .attr(\"width\", selection[1][0] - selection[0][0])\n          .attr(\"height\", selection[1][1] - selection[0][1]);\n\n      group.selectAll(\".handle\")\n          .style(\"display\", null)\n          .attr(\"x\", function(d) { return d.type[d.type.length - 1] === \"e\" ? selection[1][0] - handleSize / 2 : selection[0][0] - handleSize / 2; })\n          .attr(\"y\", function(d) { return d.type[0] === \"s\" ? selection[1][1] - handleSize / 2 : selection[0][1] - handleSize / 2; })\n          .attr(\"width\", function(d) { return d.type === \"n\" || d.type === \"s\" ? selection[1][0] - selection[0][0] + handleSize : handleSize; })\n          .attr(\"height\", function(d) { return d.type === \"e\" || d.type === \"w\" ? selection[1][1] - selection[0][1] + handleSize : handleSize; });\n    }\n\n    else {\n      group.selectAll(\".selection,.handle\")\n          .style(\"display\", \"none\")\n          .attr(\"x\", null)\n          .attr(\"y\", null)\n          .attr(\"width\", null)\n          .attr(\"height\", null);\n    }\n  }\n\n  function emitter(that, args, clean) {\n    var emit = that.__brush.emitter;\n    return emit && (!clean || !emit.clean) ? emit : new Emitter(that, args, clean);\n  }\n\n  function Emitter(that, args, clean) {\n    this.that = that;\n    this.args = args;\n    this.state = that.__brush;\n    this.active = 0;\n    this.clean = clean;\n  }\n\n  Emitter.prototype = {\n    beforestart: function() {\n      if (++this.active === 1) this.state.emitter = this, this.starting = true;\n      return this;\n    },\n    start: function(event, mode) {\n      if (this.starting) this.starting = false, this.emit(\"start\", event, mode);\n      else this.emit(\"brush\", event);\n      return this;\n    },\n    brush: function(event, mode) {\n      this.emit(\"brush\", event, mode);\n      return this;\n    },\n    end: function(event, mode) {\n      if (--this.active === 0) delete this.state.emitter, this.emit(\"end\", event, mode);\n      return this;\n    },\n    emit: function(type, event, mode) {\n      var d = select(this.that).datum();\n      listeners.call(\n        type,\n        this.that,\n        new BrushEvent(type, {\n          sourceEvent: event,\n          target: brush,\n          selection: dim.output(this.state.selection),\n          mode,\n          dispatch: listeners\n        }),\n        d\n      );\n    }\n  };\n\n  function started(event) {\n    if (touchending && !event.touches) return;\n    if (!filter.apply(this, arguments)) return;\n\n    var that = this,\n        type = event.target.__data__.type,\n        mode = (keys && event.metaKey ? type = \"overlay\" : type) === \"selection\" ? MODE_DRAG : (keys && event.altKey ? MODE_CENTER : MODE_HANDLE),\n        signX = dim === Y ? null : signsX[type],\n        signY = dim === X ? null : signsY[type],\n        state = local(that),\n        extent = state.extent,\n        selection = state.selection,\n        W = extent[0][0], w0, w1,\n        N = extent[0][1], n0, n1,\n        E = extent[1][0], e0, e1,\n        S = extent[1][1], s0, s1,\n        dx = 0,\n        dy = 0,\n        moving,\n        shifting = signX && signY && keys && event.shiftKey,\n        lockX,\n        lockY,\n        points = Array.from(event.touches || [event], t => {\n          const i = t.identifier;\n          t = pointer(t, that);\n          t.point0 = t.slice();\n          t.identifier = i;\n          return t;\n        });\n\n    interrupt(that);\n    var emit = emitter(that, arguments, true).beforestart();\n\n    if (type === \"overlay\") {\n      if (selection) moving = true;\n      const pts = [points[0], points[1] || points[0]];\n      state.selection = selection = [[\n          w0 = dim === Y ? W : min(pts[0][0], pts[1][0]),\n          n0 = dim === X ? N : min(pts[0][1], pts[1][1])\n        ], [\n          e0 = dim === Y ? E : max(pts[0][0], pts[1][0]),\n          s0 = dim === X ? S : max(pts[0][1], pts[1][1])\n        ]];\n      if (points.length > 1) move(event);\n    } else {\n      w0 = selection[0][0];\n      n0 = selection[0][1];\n      e0 = selection[1][0];\n      s0 = selection[1][1];\n    }\n\n    w1 = w0;\n    n1 = n0;\n    e1 = e0;\n    s1 = s0;\n\n    var group = select(that)\n        .attr(\"pointer-events\", \"none\");\n\n    var overlay = group.selectAll(\".overlay\")\n        .attr(\"cursor\", cursors[type]);\n\n    if (event.touches) {\n      emit.moved = moved;\n      emit.ended = ended;\n    } else {\n      var view = select(event.view)\n          .on(\"mousemove.brush\", moved, true)\n          .on(\"mouseup.brush\", ended, true);\n      if (keys) view\n          .on(\"keydown.brush\", keydowned, true)\n          .on(\"keyup.brush\", keyupped, true)\n\n      dragDisable(event.view);\n    }\n\n    redraw.call(that);\n    emit.start(event, mode.name);\n\n    function moved(event) {\n      for (const p of event.changedTouches || [event]) {\n        for (const d of points)\n          if (d.identifier === p.identifier) d.cur = pointer(p, that);\n      }\n      if (shifting && !lockX && !lockY && points.length === 1) {\n        const point = points[0];\n        if (abs(point.cur[0] - point[0]) > abs(point.cur[1] - point[1]))\n          lockY = true;\n        else\n          lockX = true;\n      }\n      for (const point of points)\n        if (point.cur) point[0] = point.cur[0], point[1] = point.cur[1];\n      moving = true;\n      noevent(event);\n      move(event);\n    }\n\n    function move(event) {\n      const point = points[0], point0 = point.point0;\n      var t;\n\n      dx = point[0] - point0[0];\n      dy = point[1] - point0[1];\n\n      switch (mode) {\n        case MODE_SPACE:\n        case MODE_DRAG: {\n          if (signX) dx = max(W - w0, min(E - e0, dx)), w1 = w0 + dx, e1 = e0 + dx;\n          if (signY) dy = max(N - n0, min(S - s0, dy)), n1 = n0 + dy, s1 = s0 + dy;\n          break;\n        }\n        case MODE_HANDLE: {\n          if (points[1]) {\n            if (signX) w1 = max(W, min(E, points[0][0])), e1 = max(W, min(E, points[1][0])), signX = 1;\n            if (signY) n1 = max(N, min(S, points[0][1])), s1 = max(N, min(S, points[1][1])), signY = 1;\n          } else {\n            if (signX < 0) dx = max(W - w0, min(E - w0, dx)), w1 = w0 + dx, e1 = e0;\n            else if (signX > 0) dx = max(W - e0, min(E - e0, dx)), w1 = w0, e1 = e0 + dx;\n            if (signY < 0) dy = max(N - n0, min(S - n0, dy)), n1 = n0 + dy, s1 = s0;\n            else if (signY > 0) dy = max(N - s0, min(S - s0, dy)), n1 = n0, s1 = s0 + dy;\n          }\n          break;\n        }\n        case MODE_CENTER: {\n          if (signX) w1 = max(W, min(E, w0 - dx * signX)), e1 = max(W, min(E, e0 + dx * signX));\n          if (signY) n1 = max(N, min(S, n0 - dy * signY)), s1 = max(N, min(S, s0 + dy * signY));\n          break;\n        }\n      }\n\n      if (e1 < w1) {\n        signX *= -1;\n        t = w0, w0 = e0, e0 = t;\n        t = w1, w1 = e1, e1 = t;\n        if (type in flipX) overlay.attr(\"cursor\", cursors[type = flipX[type]]);\n      }\n\n      if (s1 < n1) {\n        signY *= -1;\n        t = n0, n0 = s0, s0 = t;\n        t = n1, n1 = s1, s1 = t;\n        if (type in flipY) overlay.attr(\"cursor\", cursors[type = flipY[type]]);\n      }\n\n      if (state.selection) selection = state.selection; // May be set by brush.move!\n      if (lockX) w1 = selection[0][0], e1 = selection[1][0];\n      if (lockY) n1 = selection[0][1], s1 = selection[1][1];\n\n      if (selection[0][0] !== w1\n          || selection[0][1] !== n1\n          || selection[1][0] !== e1\n          || selection[1][1] !== s1) {\n        state.selection = [[w1, n1], [e1, s1]];\n        redraw.call(that);\n        emit.brush(event, mode.name);\n      }\n    }\n\n    function ended(event) {\n      nopropagation(event);\n      if (event.touches) {\n        if (event.touches.length) return;\n        if (touchending) clearTimeout(touchending);\n        touchending = setTimeout(function() { touchending = null; }, 500); // Ghost clicks are delayed!\n      } else {\n        dragEnable(event.view, moving);\n        view.on(\"keydown.brush keyup.brush mousemove.brush mouseup.brush\", null);\n      }\n      group.attr(\"pointer-events\", \"all\");\n      overlay.attr(\"cursor\", cursors.overlay);\n      if (state.selection) selection = state.selection; // May be set by brush.move (on start)!\n      if (empty(selection)) state.selection = null, redraw.call(that);\n      emit.end(event, mode.name);\n    }\n\n    function keydowned(event) {\n      switch (event.keyCode) {\n        case 16: { // SHIFT\n          shifting = signX && signY;\n          break;\n        }\n        case 18: { // ALT\n          if (mode === MODE_HANDLE) {\n            if (signX) e0 = e1 - dx * signX, w0 = w1 + dx * signX;\n            if (signY) s0 = s1 - dy * signY, n0 = n1 + dy * signY;\n            mode = MODE_CENTER;\n            move(event);\n          }\n          break;\n        }\n        case 32: { // SPACE; takes priority over ALT\n          if (mode === MODE_HANDLE || mode === MODE_CENTER) {\n            if (signX < 0) e0 = e1 - dx; else if (signX > 0) w0 = w1 - dx;\n            if (signY < 0) s0 = s1 - dy; else if (signY > 0) n0 = n1 - dy;\n            mode = MODE_SPACE;\n            overlay.attr(\"cursor\", cursors.selection);\n            move(event);\n          }\n          break;\n        }\n        default: return;\n      }\n      noevent(event);\n    }\n\n    function keyupped(event) {\n      switch (event.keyCode) {\n        case 16: { // SHIFT\n          if (shifting) {\n            lockX = lockY = shifting = false;\n            move(event);\n          }\n          break;\n        }\n        case 18: { // ALT\n          if (mode === MODE_CENTER) {\n            if (signX < 0) e0 = e1; else if (signX > 0) w0 = w1;\n            if (signY < 0) s0 = s1; else if (signY > 0) n0 = n1;\n            mode = MODE_HANDLE;\n            move(event);\n          }\n          break;\n        }\n        case 32: { // SPACE\n          if (mode === MODE_SPACE) {\n            if (event.altKey) {\n              if (signX) e0 = e1 - dx * signX, w0 = w1 + dx * signX;\n              if (signY) s0 = s1 - dy * signY, n0 = n1 + dy * signY;\n              mode = MODE_CENTER;\n            } else {\n              if (signX < 0) e0 = e1; else if (signX > 0) w0 = w1;\n              if (signY < 0) s0 = s1; else if (signY > 0) n0 = n1;\n              mode = MODE_HANDLE;\n            }\n            overlay.attr(\"cursor\", cursors[type]);\n            move(event);\n          }\n          break;\n        }\n        default: return;\n      }\n      noevent(event);\n    }\n  }\n\n  function touchmoved(event) {\n    emitter(this, arguments).moved(event);\n  }\n\n  function touchended(event) {\n    emitter(this, arguments).ended(event);\n  }\n\n  function initialize() {\n    var state = this.__brush || {selection: null};\n    state.extent = number2(extent.apply(this, arguments));\n    state.dim = dim;\n    return state;\n  }\n\n  brush.extent = function(_) {\n    return arguments.length ? (extent = typeof _ === \"function\" ? _ : constant(number2(_)), brush) : extent;\n  };\n\n  brush.filter = function(_) {\n    return arguments.length ? (filter = typeof _ === \"function\" ? _ : constant(!!_), brush) : filter;\n  };\n\n  brush.touchable = function(_) {\n    return arguments.length ? (touchable = typeof _ === \"function\" ? _ : constant(!!_), brush) : touchable;\n  };\n\n  brush.handleSize = function(_) {\n    return arguments.length ? (handleSize = +_, brush) : handleSize;\n  };\n\n  brush.keyModifiers = function(_) {\n    return arguments.length ? (keys = !!_, brush) : keys;\n  };\n\n  brush.on = function() {\n    var value = listeners.on.apply(listeners, arguments);\n    return value === listeners ? brush : value;\n  };\n\n  return brush;\n}\n", "const pi = Math.PI,\n    tau = 2 * pi,\n    epsilon = 1e-6,\n    tauEpsilon = tau - epsilon;\n\nfunction append(strings) {\n  this._ += strings[0];\n  for (let i = 1, n = strings.length; i < n; ++i) {\n    this._ += arguments[i] + strings[i];\n  }\n}\n\nfunction appendRound(digits) {\n  let d = Math.floor(digits);\n  if (!(d >= 0)) throw new Error(`invalid digits: ${digits}`);\n  if (d > 15) return append;\n  const k = 10 ** d;\n  return function(strings) {\n    this._ += strings[0];\n    for (let i = 1, n = strings.length; i < n; ++i) {\n      this._ += Math.round(arguments[i] * k) / k + strings[i];\n    }\n  };\n}\n\nexport class Path {\n  constructor(digits) {\n    this._x0 = this._y0 = // start of current subpath\n    this._x1 = this._y1 = null; // end of current subpath\n    this._ = \"\";\n    this._append = digits == null ? append : appendRound(digits);\n  }\n  moveTo(x, y) {\n    this._append`M${this._x0 = this._x1 = +x},${this._y0 = this._y1 = +y}`;\n  }\n  closePath() {\n    if (this._x1 !== null) {\n      this._x1 = this._x0, this._y1 = this._y0;\n      this._append`Z`;\n    }\n  }\n  lineTo(x, y) {\n    this._append`L${this._x1 = +x},${this._y1 = +y}`;\n  }\n  quadraticCurveTo(x1, y1, x, y) {\n    this._append`Q${+x1},${+y1},${this._x1 = +x},${this._y1 = +y}`;\n  }\n  bezierCurveTo(x1, y1, x2, y2, x, y) {\n    this._append`C${+x1},${+y1},${+x2},${+y2},${this._x1 = +x},${this._y1 = +y}`;\n  }\n  arcTo(x1, y1, x2, y2, r) {\n    x1 = +x1, y1 = +y1, x2 = +x2, y2 = +y2, r = +r;\n\n    // Is the radius negative? Error.\n    if (r < 0) throw new Error(`negative radius: ${r}`);\n\n    let x0 = this._x1,\n        y0 = this._y1,\n        x21 = x2 - x1,\n        y21 = y2 - y1,\n        x01 = x0 - x1,\n        y01 = y0 - y1,\n        l01_2 = x01 * x01 + y01 * y01;\n\n    // Is this path empty? Move to (x1,y1).\n    if (this._x1 === null) {\n      this._append`M${this._x1 = x1},${this._y1 = y1}`;\n    }\n\n    // Or, is (x1,y1) coincident with (x0,y0)? Do nothing.\n    else if (!(l01_2 > epsilon));\n\n    // Or, are (x0,y0), (x1,y1) and (x2,y2) collinear?\n    // Equivalently, is (x1,y1) coincident with (x2,y2)?\n    // Or, is the radius zero? Line to (x1,y1).\n    else if (!(Math.abs(y01 * x21 - y21 * x01) > epsilon) || !r) {\n      this._append`L${this._x1 = x1},${this._y1 = y1}`;\n    }\n\n    // Otherwise, draw an arc!\n    else {\n      let x20 = x2 - x0,\n          y20 = y2 - y0,\n          l21_2 = x21 * x21 + y21 * y21,\n          l20_2 = x20 * x20 + y20 * y20,\n          l21 = Math.sqrt(l21_2),\n          l01 = Math.sqrt(l01_2),\n          l = r * Math.tan((pi - Math.acos((l21_2 + l01_2 - l20_2) / (2 * l21 * l01))) / 2),\n          t01 = l / l01,\n          t21 = l / l21;\n\n      // If the start tangent is not coincident with (x0,y0), line to.\n      if (Math.abs(t01 - 1) > epsilon) {\n        this._append`L${x1 + t01 * x01},${y1 + t01 * y01}`;\n      }\n\n      this._append`A${r},${r},0,0,${+(y01 * x20 > x01 * y20)},${this._x1 = x1 + t21 * x21},${this._y1 = y1 + t21 * y21}`;\n    }\n  }\n  arc(x, y, r, a0, a1, ccw) {\n    x = +x, y = +y, r = +r, ccw = !!ccw;\n\n    // Is the radius negative? Error.\n    if (r < 0) throw new Error(`negative radius: ${r}`);\n\n    let dx = r * Math.cos(a0),\n        dy = r * Math.sin(a0),\n        x0 = x + dx,\n        y0 = y + dy,\n        cw = 1 ^ ccw,\n        da = ccw ? a0 - a1 : a1 - a0;\n\n    // Is this path empty? Move to (x0,y0).\n    if (this._x1 === null) {\n      this._append`M${x0},${y0}`;\n    }\n\n    // Or, is (x0,y0) not coincident with the previous point? Line to (x0,y0).\n    else if (Math.abs(this._x1 - x0) > epsilon || Math.abs(this._y1 - y0) > epsilon) {\n      this._append`L${x0},${y0}`;\n    }\n\n    // Is this arc empty? We\u2019re done.\n    if (!r) return;\n\n    // Does the angle go the wrong way? Flip the direction.\n    if (da < 0) da = da % tau + tau;\n\n    // Is this a complete circle? Draw two arcs to complete the circle.\n    if (da > tauEpsilon) {\n      this._append`A${r},${r},0,1,${cw},${x - dx},${y - dy}A${r},${r},0,1,${cw},${this._x1 = x0},${this._y1 = y0}`;\n    }\n\n    // Is this arc non-empty? Draw an arc!\n    else if (da > epsilon) {\n      this._append`A${r},${r},0,${+(da >= pi)},${cw},${this._x1 = x + r * Math.cos(a1)},${this._y1 = y + r * Math.sin(a1)}`;\n    }\n  }\n  rect(x, y, w, h) {\n    this._append`M${this._x0 = this._x1 = +x},${this._y0 = this._y1 = +y}h${w = +w}v${+h}h${-w}Z`;\n  }\n  toString() {\n    return this._;\n  }\n}\n\nexport function path() {\n  return new Path;\n}\n\n// Allow instanceof d3.path\npath.prototype = Path.prototype;\n\nexport function pathRound(digits = 3) {\n  return new Path(+digits);\n}\n", "export default function(x) {\n  return Math.abs(x = Math.round(x)) >= 1e21\n      ? x.toLocaleString(\"en\").replace(/,/g, \"\")\n      : x.toString(10);\n}\n\n// Computes the decimal coefficient and exponent of the specified number x with\n// significant digits p, where x is positive and p is in [1, 21] or undefined.\n// For example, formatDecimalParts(1.23) returns [\"123\", 0].\nexport function formatDecimalParts(x, p) {\n  if ((i = (x = p ? x.toExponential(p - 1) : x.toExponential()).indexOf(\"e\")) < 0) return null; // NaN, \u00B1Infinity\n  var i, coefficient = x.slice(0, i);\n\n  // The string returned by toExponential either has the form \\d\\.\\d+e[-+]\\d+\n  // (e.g., 1.2e+3) or the form \\de[-+]\\d+ (e.g., 1e+3).\n  return [\n    coefficient.length > 1 ? coefficient[0] + coefficient.slice(2) : coefficient,\n    +x.slice(i + 1)\n  ];\n}\n", "import {formatDecimalParts} from \"./formatDecimal.js\";\n\nexport default function(x) {\n  return x = formatDecimalParts(Math.abs(x)), x ? x[1] : NaN;\n}\n", "export default function(grouping, thousands) {\n  return function(value, width) {\n    var i = value.length,\n        t = [],\n        j = 0,\n        g = grouping[0],\n        length = 0;\n\n    while (i > 0 && g > 0) {\n      if (length + g + 1 > width) g = Math.max(1, width - length);\n      t.push(value.substring(i -= g, i + g));\n      if ((length += g + 1) > width) break;\n      g = grouping[j = (j + 1) % grouping.length];\n    }\n\n    return t.reverse().join(thousands);\n  };\n}\n", "export default function(numerals) {\n  return function(value) {\n    return value.replace(/[0-9]/g, function(i) {\n      return numerals[+i];\n    });\n  };\n}\n", "// [[fill]align][sign][symbol][0][width][,][.precision][~][type]\nvar re = /^(?:(.)?([<>=^]))?([+\\-( ])?([$#])?(0)?(\\d+)?(,)?(\\.\\d+)?(~)?([a-z%])?$/i;\n\nexport default function formatSpecifier(specifier) {\n  if (!(match = re.exec(specifier))) throw new Error(\"invalid format: \" + specifier);\n  var match;\n  return new FormatSpecifier({\n    fill: match[1],\n    align: match[2],\n    sign: match[3],\n    symbol: match[4],\n    zero: match[5],\n    width: match[6],\n    comma: match[7],\n    precision: match[8] && match[8].slice(1),\n    trim: match[9],\n    type: match[10]\n  });\n}\n\nformatSpecifier.prototype = FormatSpecifier.prototype; // instanceof\n\nexport function FormatSpecifier(specifier) {\n  this.fill = specifier.fill === undefined ? \" \" : specifier.fill + \"\";\n  this.align = specifier.align === undefined ? \">\" : specifier.align + \"\";\n  this.sign = specifier.sign === undefined ? \"-\" : specifier.sign + \"\";\n  this.symbol = specifier.symbol === undefined ? \"\" : specifier.symbol + \"\";\n  this.zero = !!specifier.zero;\n  this.width = specifier.width === undefined ? undefined : +specifier.width;\n  this.comma = !!specifier.comma;\n  this.precision = specifier.precision === undefined ? undefined : +specifier.precision;\n  this.trim = !!specifier.trim;\n  this.type = specifier.type === undefined ? \"\" : specifier.type + \"\";\n}\n\nFormatSpecifier.prototype.toString = function() {\n  return this.fill\n      + this.align\n      + this.sign\n      + this.symbol\n      + (this.zero ? \"0\" : \"\")\n      + (this.width === undefined ? \"\" : Math.max(1, this.width | 0))\n      + (this.comma ? \",\" : \"\")\n      + (this.precision === undefined ? \"\" : \".\" + Math.max(0, this.precision | 0))\n      + (this.trim ? \"~\" : \"\")\n      + this.type;\n};\n", "// Trims insignificant zeros, e.g., replaces 1.2000k with 1.2k.\nexport default function(s) {\n  out: for (var n = s.length, i = 1, i0 = -1, i1; i < n; ++i) {\n    switch (s[i]) {\n      case \".\": i0 = i1 = i; break;\n      case \"0\": if (i0 === 0) i0 = i; i1 = i; break;\n      default: if (!+s[i]) break out; if (i0 > 0) i0 = 0; break;\n    }\n  }\n  return i0 > 0 ? s.slice(0, i0) + s.slice(i1 + 1) : s;\n}\n", "import {formatDecimalParts} from \"./formatDecimal.js\";\n\nexport var prefixExponent;\n\nexport default function(x, p) {\n  var d = formatDecimalParts(x, p);\n  if (!d) return x + \"\";\n  var coefficient = d[0],\n      exponent = d[1],\n      i = exponent - (prefixExponent = Math.max(-8, Math.min(8, Math.floor(exponent / 3))) * 3) + 1,\n      n = coefficient.length;\n  return i === n ? coefficient\n      : i > n ? coefficient + new Array(i - n + 1).join(\"0\")\n      : i > 0 ? coefficient.slice(0, i) + \".\" + coefficient.slice(i)\n      : \"0.\" + new Array(1 - i).join(\"0\") + formatDecimalParts(x, Math.max(0, p + i - 1))[0]; // less than 1y!\n}\n", "import {formatDecimalParts} from \"./formatDecimal.js\";\n\nexport default function(x, p) {\n  var d = formatDecimalParts(x, p);\n  if (!d) return x + \"\";\n  var coefficient = d[0],\n      exponent = d[1];\n  return exponent < 0 ? \"0.\" + new Array(-exponent).join(\"0\") + coefficient\n      : coefficient.length > exponent + 1 ? coefficient.slice(0, exponent + 1) + \".\" + coefficient.slice(exponent + 1)\n      : coefficient + new Array(exponent - coefficient.length + 2).join(\"0\");\n}\n", "import formatDecimal from \"./formatDecimal.js\";\nimport formatPrefixAuto from \"./formatPrefixAuto.js\";\nimport formatRounded from \"./formatRounded.js\";\n\nexport default {\n  \"%\": (x, p) => (x * 100).toFixed(p),\n  \"b\": (x) => Math.round(x).toString(2),\n  \"c\": (x) => x + \"\",\n  \"d\": formatDecimal,\n  \"e\": (x, p) => x.toExponential(p),\n  \"f\": (x, p) => x.toFixed(p),\n  \"g\": (x, p) => x.toPrecision(p),\n  \"o\": (x) => Math.round(x).toString(8),\n  \"p\": (x, p) => formatRounded(x * 100, p),\n  \"r\": formatRounded,\n  \"s\": formatPrefixAuto,\n  \"X\": (x) => Math.round(x).toString(16).toUpperCase(),\n  \"x\": (x) => Math.round(x).toString(16)\n};\n", "export default function(x) {\n  return x;\n}\n", "import exponent from \"./exponent.js\";\nimport formatGroup from \"./formatGroup.js\";\nimport formatNumerals from \"./formatNumerals.js\";\nimport formatSpecifier from \"./formatSpecifier.js\";\nimport formatTrim from \"./formatTrim.js\";\nimport formatTypes from \"./formatTypes.js\";\nimport {prefixExponent} from \"./formatPrefixAuto.js\";\nimport identity from \"./identity.js\";\n\nvar map = Array.prototype.map,\n    prefixes = [\"y\",\"z\",\"a\",\"f\",\"p\",\"n\",\"\u00B5\",\"m\",\"\",\"k\",\"M\",\"G\",\"T\",\"P\",\"E\",\"Z\",\"Y\"];\n\nexport default function(locale) {\n  var group = locale.grouping === undefined || locale.thousands === undefined ? identity : formatGroup(map.call(locale.grouping, Number), locale.thousands + \"\"),\n      currencyPrefix = locale.currency === undefined ? \"\" : locale.currency[0] + \"\",\n      currencySuffix = locale.currency === undefined ? \"\" : locale.currency[1] + \"\",\n      decimal = locale.decimal === undefined ? \".\" : locale.decimal + \"\",\n      numerals = locale.numerals === undefined ? identity : formatNumerals(map.call(locale.numerals, String)),\n      percent = locale.percent === undefined ? \"%\" : locale.percent + \"\",\n      minus = locale.minus === undefined ? \"\u2212\" : locale.minus + \"\",\n      nan = locale.nan === undefined ? \"NaN\" : locale.nan + \"\";\n\n  function newFormat(specifier) {\n    specifier = formatSpecifier(specifier);\n\n    var fill = specifier.fill,\n        align = specifier.align,\n        sign = specifier.sign,\n        symbol = specifier.symbol,\n        zero = specifier.zero,\n        width = specifier.width,\n        comma = specifier.comma,\n        precision = specifier.precision,\n        trim = specifier.trim,\n        type = specifier.type;\n\n    // The \"n\" type is an alias for \",g\".\n    if (type === \"n\") comma = true, type = \"g\";\n\n    // The \"\" type, and any invalid type, is an alias for \".12~g\".\n    else if (!formatTypes[type]) precision === undefined && (precision = 12), trim = true, type = \"g\";\n\n    // If zero fill is specified, padding goes after sign and before digits.\n    if (zero || (fill === \"0\" && align === \"=\")) zero = true, fill = \"0\", align = \"=\";\n\n    // Compute the prefix and suffix.\n    // For SI-prefix, the suffix is lazily computed.\n    var prefix = symbol === \"$\" ? currencyPrefix : symbol === \"#\" && /[boxX]/.test(type) ? \"0\" + type.toLowerCase() : \"\",\n        suffix = symbol === \"$\" ? currencySuffix : /[%p]/.test(type) ? percent : \"\";\n\n    // What format function should we use?\n    // Is this an integer type?\n    // Can this type generate exponential notation?\n    var formatType = formatTypes[type],\n        maybeSuffix = /[defgprs%]/.test(type);\n\n    // Set the default precision if not specified,\n    // or clamp the specified precision to the supported range.\n    // For significant precision, it must be in [1, 21].\n    // For fixed precision, it must be in [0, 20].\n    precision = precision === undefined ? 6\n        : /[gprs]/.test(type) ? Math.max(1, Math.min(21, precision))\n        : Math.max(0, Math.min(20, precision));\n\n    function format(value) {\n      var valuePrefix = prefix,\n          valueSuffix = suffix,\n          i, n, c;\n\n      if (type === \"c\") {\n        valueSuffix = formatType(value) + valueSuffix;\n        value = \"\";\n      } else {\n        value = +value;\n\n        // Determine the sign. -0 is not less than 0, but 1 / -0 is!\n        var valueNegative = value < 0 || 1 / value < 0;\n\n        // Perform the initial formatting.\n        value = isNaN(value) ? nan : formatType(Math.abs(value), precision);\n\n        // Trim insignificant zeros.\n        if (trim) value = formatTrim(value);\n\n        // If a negative value rounds to zero after formatting, and no explicit positive sign is requested, hide the sign.\n        if (valueNegative && +value === 0 && sign !== \"+\") valueNegative = false;\n\n        // Compute the prefix and suffix.\n        valuePrefix = (valueNegative ? (sign === \"(\" ? sign : minus) : sign === \"-\" || sign === \"(\" ? \"\" : sign) + valuePrefix;\n        valueSuffix = (type === \"s\" ? prefixes[8 + prefixExponent / 3] : \"\") + valueSuffix + (valueNegative && sign === \"(\" ? \")\" : \"\");\n\n        // Break the formatted value into the integer \u201Cvalue\u201D part that can be\n        // grouped, and fractional or exponential \u201Csuffix\u201D part that is not.\n        if (maybeSuffix) {\n          i = -1, n = value.length;\n          while (++i < n) {\n            if (c = value.charCodeAt(i), 48 > c || c > 57) {\n              valueSuffix = (c === 46 ? decimal + value.slice(i + 1) : value.slice(i)) + valueSuffix;\n              value = value.slice(0, i);\n              break;\n            }\n          }\n        }\n      }\n\n      // If the fill character is not \"0\", grouping is applied before padding.\n      if (comma && !zero) value = group(value, Infinity);\n\n      // Compute the padding.\n      var length = valuePrefix.length + value.length + valueSuffix.length,\n          padding = length < width ? new Array(width - length + 1).join(fill) : \"\";\n\n      // If the fill character is \"0\", grouping is applied after padding.\n      if (comma && zero) value = group(padding + value, padding.length ? width - valueSuffix.length : Infinity), padding = \"\";\n\n      // Reconstruct the final output based on the desired alignment.\n      switch (align) {\n        case \"<\": value = valuePrefix + value + valueSuffix + padding; break;\n        case \"=\": value = valuePrefix + padding + value + valueSuffix; break;\n        case \"^\": value = padding.slice(0, length = padding.length >> 1) + valuePrefix + value + valueSuffix + padding.slice(length); break;\n        default: value = padding + valuePrefix + value + valueSuffix; break;\n      }\n\n      return numerals(value);\n    }\n\n    format.toString = function() {\n      return specifier + \"\";\n    };\n\n    return format;\n  }\n\n  function formatPrefix(specifier, value) {\n    var f = newFormat((specifier = formatSpecifier(specifier), specifier.type = \"f\", specifier)),\n        e = Math.max(-8, Math.min(8, Math.floor(exponent(value) / 3))) * 3,\n        k = Math.pow(10, -e),\n        prefix = prefixes[8 + e / 3];\n    return function(value) {\n      return f(k * value) + prefix;\n    };\n  }\n\n  return {\n    format: newFormat,\n    formatPrefix: formatPrefix\n  };\n}\n", "import formatLocale from \"./locale.js\";\n\nvar locale;\nexport var format;\nexport var formatPrefix;\n\ndefaultLocale({\n  thousands: \",\",\n  grouping: [3],\n  currency: [\"$\", \"\"]\n});\n\nexport default function defaultLocale(definition) {\n  locale = formatLocale(definition);\n  format = locale.format;\n  formatPrefix = locale.formatPrefix;\n  return locale;\n}\n", "import exponent from \"./exponent.js\";\n\nexport default function(step) {\n  return Math.max(0, -exponent(Math.abs(step)));\n}\n", "import exponent from \"./exponent.js\";\n\nexport default function(step, value) {\n  return Math.max(0, Math.max(-8, Math.min(8, Math.floor(exponent(value) / 3))) * 3 - exponent(Math.abs(step)));\n}\n", "import exponent from \"./exponent.js\";\n\nexport default function(step, max) {\n  step = Math.abs(step), max = Math.abs(max) - step;\n  return Math.max(0, exponent(max) - exponent(step)) + 1;\n}\n", "export var epsilon = 1e-6;\nexport var epsilon2 = 1e-12;\nexport var pi = Math.PI;\nexport var halfPi = pi / 2;\nexport var quarterPi = pi / 4;\nexport var tau = pi * 2;\n\nexport var degrees = 180 / pi;\nexport var radians = pi / 180;\n\nexport var abs = Math.abs;\nexport var atan = Math.atan;\nexport var atan2 = Math.atan2;\nexport var cos = Math.cos;\nexport var ceil = Math.ceil;\nexport var exp = Math.exp;\nexport var floor = Math.floor;\nexport var hypot = Math.hypot;\nexport var log = Math.log;\nexport var pow = Math.pow;\nexport var sin = Math.sin;\nexport var sign = Math.sign || function(x) { return x > 0 ? 1 : x < 0 ? -1 : 0; };\nexport var sqrt = Math.sqrt;\nexport var tan = Math.tan;\n\nexport function acos(x) {\n  return x > 1 ? 0 : x < -1 ? pi : Math.acos(x);\n}\n\nexport function asin(x) {\n  return x > 1 ? halfPi : x < -1 ? -halfPi : Math.asin(x);\n}\n\nexport function haversin(x) {\n  return (x = sin(x / 2)) * x;\n}\n", "export default function noop() {}\n", "function streamGeometry(geometry, stream) {\n  if (geometry && streamGeometryType.hasOwnProperty(geometry.type)) {\n    streamGeometryType[geometry.type](geometry, stream);\n  }\n}\n\nvar streamObjectType = {\n  Feature: function(object, stream) {\n    streamGeometry(object.geometry, stream);\n  },\n  FeatureCollection: function(object, stream) {\n    var features = object.features, i = -1, n = features.length;\n    while (++i < n) streamGeometry(features[i].geometry, stream);\n  }\n};\n\nvar streamGeometryType = {\n  Sphere: function(object, stream) {\n    stream.sphere();\n  },\n  Point: function(object, stream) {\n    object = object.coordinates;\n    stream.point(object[0], object[1], object[2]);\n  },\n  MultiPoint: function(object, stream) {\n    var coordinates = object.coordinates, i = -1, n = coordinates.length;\n    while (++i < n) object = coordinates[i], stream.point(object[0], object[1], object[2]);\n  },\n  LineString: function(object, stream) {\n    streamLine(object.coordinates, stream, 0);\n  },\n  MultiLineString: function(object, stream) {\n    var coordinates = object.coordinates, i = -1, n = coordinates.length;\n    while (++i < n) streamLine(coordinates[i], stream, 0);\n  },\n  Polygon: function(object, stream) {\n    streamPolygon(object.coordinates, stream);\n  },\n  MultiPolygon: function(object, stream) {\n    var coordinates = object.coordinates, i = -1, n = coordinates.length;\n    while (++i < n) streamPolygon(coordinates[i], stream);\n  },\n  GeometryCollection: function(object, stream) {\n    var geometries = object.geometries, i = -1, n = geometries.length;\n    while (++i < n) streamGeometry(geometries[i], stream);\n  }\n};\n\nfunction streamLine(coordinates, stream, closed) {\n  var i = -1, n = coordinates.length - closed, coordinate;\n  stream.lineStart();\n  while (++i < n) coordinate = coordinates[i], stream.point(coordinate[0], coordinate[1], coordinate[2]);\n  stream.lineEnd();\n}\n\nfunction streamPolygon(coordinates, stream) {\n  var i = -1, n = coordinates.length;\n  stream.polygonStart();\n  while (++i < n) streamLine(coordinates[i], stream, 1);\n  stream.polygonEnd();\n}\n\nexport default function(object, stream) {\n  if (object && streamObjectType.hasOwnProperty(object.type)) {\n    streamObjectType[object.type](object, stream);\n  } else {\n    streamGeometry(object, stream);\n  }\n}\n", "import {asin, atan2, cos, sin, sqrt} from \"./math.js\";\n\nexport function spherical(cartesian) {\n  return [atan2(cartesian[1], cartesian[0]), asin(cartesian[2])];\n}\n\nexport function cartesian(spherical) {\n  var lambda = spherical[0], phi = spherical[1], cosPhi = cos(phi);\n  return [cosPhi * cos(lambda), cosPhi * sin(lambda), sin(phi)];\n}\n\nexport function cartesianDot(a, b) {\n  return a[0] * b[0] + a[1] * b[1] + a[2] * b[2];\n}\n\nexport function cartesianCross(a, b) {\n  return [a[1] * b[2] - a[2] * b[1], a[2] * b[0] - a[0] * b[2], a[0] * b[1] - a[1] * b[0]];\n}\n\n// TODO return a\nexport function cartesianAddInPlace(a, b) {\n  a[0] += b[0], a[1] += b[1], a[2] += b[2];\n}\n\nexport function cartesianScale(vector, k) {\n  return [vector[0] * k, vector[1] * k, vector[2] * k];\n}\n\n// TODO return d\nexport function cartesianNormalizeInPlace(d) {\n  var l = sqrt(d[0] * d[0] + d[1] * d[1] + d[2] * d[2]);\n  d[0] /= l, d[1] /= l, d[2] /= l;\n}\n", "export default function(a, b) {\n\n  function compose(x, y) {\n    return x = a(x, y), b(x[0], x[1]);\n  }\n\n  if (a.invert && b.invert) compose.invert = function(x, y) {\n    return x = b.invert(x, y), x && a.invert(x[0], x[1]);\n  };\n\n  return compose;\n}\n", "import compose from \"./compose.js\";\nimport {abs, asin, atan2, cos, degrees, pi, radians, sin, tau} from \"./math.js\";\n\nfunction rotationIdentity(lambda, phi) {\n  if (abs(lambda) > pi) lambda -= Math.round(lambda / tau) * tau;\n  return [lambda, phi];\n}\n\nrotationIdentity.invert = rotationIdentity;\n\nexport function rotateRadians(deltaLambda, deltaPhi, deltaGamma) {\n  return (deltaLambda %= tau) ? (deltaPhi || deltaGamma ? compose(rotationLambda(deltaLambda), rotationPhiGamma(deltaPhi, deltaGamma))\n    : rotationLambda(deltaLambda))\n    : (deltaPhi || deltaGamma ? rotationPhiGamma(deltaPhi, deltaGamma)\n    : rotationIdentity);\n}\n\nfunction forwardRotationLambda(deltaLambda) {\n  return function(lambda, phi) {\n    lambda += deltaLambda;\n    if (abs(lambda) > pi) lambda -= Math.round(lambda / tau) * tau;\n    return [lambda, phi];\n  };\n}\n\nfunction rotationLambda(deltaLambda) {\n  var rotation = forwardRotationLambda(deltaLambda);\n  rotation.invert = forwardRotationLambda(-deltaLambda);\n  return rotation;\n}\n\nfunction rotationPhiGamma(deltaPhi, deltaGamma) {\n  var cosDeltaPhi = cos(deltaPhi),\n      sinDeltaPhi = sin(deltaPhi),\n      cosDeltaGamma = cos(deltaGamma),\n      sinDeltaGamma = sin(deltaGamma);\n\n  function rotation(lambda, phi) {\n    var cosPhi = cos(phi),\n        x = cos(lambda) * cosPhi,\n        y = sin(lambda) * cosPhi,\n        z = sin(phi),\n        k = z * cosDeltaPhi + x * sinDeltaPhi;\n    return [\n      atan2(y * cosDeltaGamma - k * sinDeltaGamma, x * cosDeltaPhi - z * sinDeltaPhi),\n      asin(k * cosDeltaGamma + y * sinDeltaGamma)\n    ];\n  }\n\n  rotation.invert = function(lambda, phi) {\n    var cosPhi = cos(phi),\n        x = cos(lambda) * cosPhi,\n        y = sin(lambda) * cosPhi,\n        z = sin(phi),\n        k = z * cosDeltaGamma - y * sinDeltaGamma;\n    return [\n      atan2(y * cosDeltaGamma + z * sinDeltaGamma, x * cosDeltaPhi + k * sinDeltaPhi),\n      asin(k * cosDeltaPhi - x * sinDeltaPhi)\n    ];\n  };\n\n  return rotation;\n}\n\nexport default function(rotate) {\n  rotate = rotateRadians(rotate[0] * radians, rotate[1] * radians, rotate.length > 2 ? rotate[2] * radians : 0);\n\n  function forward(coordinates) {\n    coordinates = rotate(coordinates[0] * radians, coordinates[1] * radians);\n    return coordinates[0] *= degrees, coordinates[1] *= degrees, coordinates;\n  }\n\n  forward.invert = function(coordinates) {\n    coordinates = rotate.invert(coordinates[0] * radians, coordinates[1] * radians);\n    return coordinates[0] *= degrees, coordinates[1] *= degrees, coordinates;\n  };\n\n  return forward;\n}\n", "import {cartesian, cartesianNormalizeInPlace, spherical} from \"./cartesian.js\";\nimport constant from \"./constant.js\";\nimport {acos, cos, degrees, epsilon, radians, sin, tau} from \"./math.js\";\nimport {rotateRadians} from \"./rotation.js\";\n\n// Generates a circle centered at [0\u00B0, 0\u00B0], with a given radius and precision.\nexport function circleStream(stream, radius, delta, direction, t0, t1) {\n  if (!delta) return;\n  var cosRadius = cos(radius),\n      sinRadius = sin(radius),\n      step = direction * delta;\n  if (t0 == null) {\n    t0 = radius + direction * tau;\n    t1 = radius - step / 2;\n  } else {\n    t0 = circleRadius(cosRadius, t0);\n    t1 = circleRadius(cosRadius, t1);\n    if (direction > 0 ? t0 < t1 : t0 > t1) t0 += direction * tau;\n  }\n  for (var point, t = t0; direction > 0 ? t > t1 : t < t1; t -= step) {\n    point = spherical([cosRadius, -sinRadius * cos(t), -sinRadius * sin(t)]);\n    stream.point(point[0], point[1]);\n  }\n}\n\n// Returns the signed angle of a cartesian point relative to [cosRadius, 0, 0].\nfunction circleRadius(cosRadius, point) {\n  point = cartesian(point), point[0] -= cosRadius;\n  cartesianNormalizeInPlace(point);\n  var radius = acos(-point[1]);\n  return ((-point[2] < 0 ? -radius : radius) + tau - epsilon) % tau;\n}\n\nexport default function() {\n  var center = constant([0, 0]),\n      radius = constant(90),\n      precision = constant(6),\n      ring,\n      rotate,\n      stream = {point: point};\n\n  function point(x, y) {\n    ring.push(x = rotate(x, y));\n    x[0] *= degrees, x[1] *= degrees;\n  }\n\n  function circle() {\n    var c = center.apply(this, arguments),\n        r = radius.apply(this, arguments) * radians,\n        p = precision.apply(this, arguments) * radians;\n    ring = [];\n    rotate = rotateRadians(-c[0] * radians, -c[1] * radians, 0).invert;\n    circleStream(stream, r, p, 1);\n    c = {type: \"Polygon\", coordinates: [ring]};\n    ring = rotate = null;\n    return c;\n  }\n\n  circle.center = function(_) {\n    return arguments.length ? (center = typeof _ === \"function\" ? _ : constant([+_[0], +_[1]]), circle) : center;\n  };\n\n  circle.radius = function(_) {\n    return arguments.length ? (radius = typeof _ === \"function\" ? _ : constant(+_), circle) : radius;\n  };\n\n  circle.precision = function(_) {\n    return arguments.length ? (precision = typeof _ === \"function\" ? _ : constant(+_), circle) : precision;\n  };\n\n  return circle;\n}\n", "import noop from \"../noop.js\";\n\nexport default function() {\n  var lines = [],\n      line;\n  return {\n    point: function(x, y, m) {\n      line.push([x, y, m]);\n    },\n    lineStart: function() {\n      lines.push(line = []);\n    },\n    lineEnd: noop,\n    rejoin: function() {\n      if (lines.length > 1) lines.push(lines.pop().concat(lines.shift()));\n    },\n    result: function() {\n      var result = lines;\n      lines = [];\n      line = null;\n      return result;\n    }\n  };\n}\n", "import {abs, epsilon} from \"./math.js\";\n\nexport default function(a, b) {\n  return abs(a[0] - b[0]) < epsilon && abs(a[1] - b[1]) < epsilon;\n}\n", "import pointEqual from \"../pointEqual.js\";\nimport {epsilon} from \"../math.js\";\n\nfunction Intersection(point, points, other, entry) {\n  this.x = point;\n  this.z = points;\n  this.o = other; // another intersection\n  this.e = entry; // is an entry?\n  this.v = false; // visited\n  this.n = this.p = null; // next & previous\n}\n\n// A generalized polygon clipping algorithm: given a polygon that has been cut\n// into its visible line segments, and rejoins the segments by interpolating\n// along the clip edge.\nexport default function(segments, compareIntersection, startInside, interpolate, stream) {\n  var subject = [],\n      clip = [],\n      i,\n      n;\n\n  segments.forEach(function(segment) {\n    if ((n = segment.length - 1) <= 0) return;\n    var n, p0 = segment[0], p1 = segment[n], x;\n\n    if (pointEqual(p0, p1)) {\n      if (!p0[2] && !p1[2]) {\n        stream.lineStart();\n        for (i = 0; i < n; ++i) stream.point((p0 = segment[i])[0], p0[1]);\n        stream.lineEnd();\n        return;\n      }\n      // handle degenerate cases by moving the point\n      p1[0] += 2 * epsilon;\n    }\n\n    subject.push(x = new Intersection(p0, segment, null, true));\n    clip.push(x.o = new Intersection(p0, null, x, false));\n    subject.push(x = new Intersection(p1, segment, null, false));\n    clip.push(x.o = new Intersection(p1, null, x, true));\n  });\n\n  if (!subject.length) return;\n\n  clip.sort(compareIntersection);\n  link(subject);\n  link(clip);\n\n  for (i = 0, n = clip.length; i < n; ++i) {\n    clip[i].e = startInside = !startInside;\n  }\n\n  var start = subject[0],\n      points,\n      point;\n\n  while (1) {\n    // Find first unvisited intersection.\n    var current = start,\n        isSubject = true;\n    while (current.v) if ((current = current.n) === start) return;\n    points = current.z;\n    stream.lineStart();\n    do {\n      current.v = current.o.v = true;\n      if (current.e) {\n        if (isSubject) {\n          for (i = 0, n = points.length; i < n; ++i) stream.point((point = points[i])[0], point[1]);\n        } else {\n          interpolate(current.x, current.n.x, 1, stream);\n        }\n        current = current.n;\n      } else {\n        if (isSubject) {\n          points = current.p.z;\n          for (i = points.length - 1; i >= 0; --i) stream.point((point = points[i])[0], point[1]);\n        } else {\n          interpolate(current.x, current.p.x, -1, stream);\n        }\n        current = current.p;\n      }\n      current = current.o;\n      points = current.z;\n      isSubject = !isSubject;\n    } while (!current.v);\n    stream.lineEnd();\n  }\n}\n\nfunction link(array) {\n  if (!(n = array.length)) return;\n  var n,\n      i = 0,\n      a = array[0],\n      b;\n  while (++i < n) {\n    a.n = b = array[i];\n    b.p = a;\n    a = b;\n  }\n  a.n = b = array[0];\n  b.p = a;\n}\n", "import {Adder} from \"d3-array\";\nimport {cartesian, cartesianCross, cartesianNormalizeInPlace} from \"./cartesian.js\";\nimport {abs, asin, atan2, cos, epsilon, epsilon2, halfPi, pi, quarterPi, sign, sin, tau} from \"./math.js\";\n\nfunction longitude(point) {\n  return abs(point[0]) <= pi ? point[0] : sign(point[0]) * ((abs(point[0]) + pi) % tau - pi);\n}\n\nexport default function(polygon, point) {\n  var lambda = longitude(point),\n      phi = point[1],\n      sinPhi = sin(phi),\n      normal = [sin(lambda), -cos(lambda), 0],\n      angle = 0,\n      winding = 0;\n\n  var sum = new Adder();\n\n  if (sinPhi === 1) phi = halfPi + epsilon;\n  else if (sinPhi === -1) phi = -halfPi - epsilon;\n\n  for (var i = 0, n = polygon.length; i < n; ++i) {\n    if (!(m = (ring = polygon[i]).length)) continue;\n    var ring,\n        m,\n        point0 = ring[m - 1],\n        lambda0 = longitude(point0),\n        phi0 = point0[1] / 2 + quarterPi,\n        sinPhi0 = sin(phi0),\n        cosPhi0 = cos(phi0);\n\n    for (var j = 0; j < m; ++j, lambda0 = lambda1, sinPhi0 = sinPhi1, cosPhi0 = cosPhi1, point0 = point1) {\n      var point1 = ring[j],\n          lambda1 = longitude(point1),\n          phi1 = point1[1] / 2 + quarterPi,\n          sinPhi1 = sin(phi1),\n          cosPhi1 = cos(phi1),\n          delta = lambda1 - lambda0,\n          sign = delta >= 0 ? 1 : -1,\n          absDelta = sign * delta,\n          antimeridian = absDelta > pi,\n          k = sinPhi0 * sinPhi1;\n\n      sum.add(atan2(k * sign * sin(absDelta), cosPhi0 * cosPhi1 + k * cos(absDelta)));\n      angle += antimeridian ? delta + sign * tau : delta;\n\n      // Are the longitudes either side of the point\u2019s meridian (lambda),\n      // and are the latitudes smaller than the parallel (phi)?\n      if (antimeridian ^ lambda0 >= lambda ^ lambda1 >= lambda) {\n        var arc = cartesianCross(cartesian(point0), cartesian(point1));\n        cartesianNormalizeInPlace(arc);\n        var intersection = cartesianCross(normal, arc);\n        cartesianNormalizeInPlace(intersection);\n        var phiArc = (antimeridian ^ delta >= 0 ? -1 : 1) * asin(intersection[2]);\n        if (phi > phiArc || phi === phiArc && (arc[0] || arc[1])) {\n          winding += antimeridian ^ delta >= 0 ? 1 : -1;\n        }\n      }\n    }\n  }\n\n  // First, determine whether the South pole is inside or outside:\n  //\n  // It is inside if:\n  // * the polygon winds around it in a clockwise direction.\n  // * the polygon does not (cumulatively) wind around it, but has a negative\n  //   (counter-clockwise) area.\n  //\n  // Second, count the (signed) number of times a segment crosses a lambda\n  // from the point to the South pole.  If it is zero, then the point is the\n  // same side as the South pole.\n\n  return (angle < -epsilon || angle < epsilon && sum < -epsilon2) ^ (winding & 1);\n}\n", "import clipBuffer from \"./buffer.js\";\nimport clipRejoin from \"./rejoin.js\";\nimport {epsilon, halfPi} from \"../math.js\";\nimport polygonContains from \"../polygonContains.js\";\nimport {merge} from \"d3-array\";\n\nexport default function(pointVisible, clipLine, interpolate, start) {\n  return function(sink) {\n    var line = clipLine(sink),\n        ringBuffer = clipBuffer(),\n        ringSink = clipLine(ringBuffer),\n        polygonStarted = false,\n        polygon,\n        segments,\n        ring;\n\n    var clip = {\n      point: point,\n      lineStart: lineStart,\n      lineEnd: lineEnd,\n      polygonStart: function() {\n        clip.point = pointRing;\n        clip.lineStart = ringStart;\n        clip.lineEnd = ringEnd;\n        segments = [];\n        polygon = [];\n      },\n      polygonEnd: function() {\n        clip.point = point;\n        clip.lineStart = lineStart;\n        clip.lineEnd = lineEnd;\n        segments = merge(segments);\n        var startInside = polygonContains(polygon, start);\n        if (segments.length) {\n          if (!polygonStarted) sink.polygonStart(), polygonStarted = true;\n          clipRejoin(segments, compareIntersection, startInside, interpolate, sink);\n        } else if (startInside) {\n          if (!polygonStarted) sink.polygonStart(), polygonStarted = true;\n          sink.lineStart();\n          interpolate(null, null, 1, sink);\n          sink.lineEnd();\n        }\n        if (polygonStarted) sink.polygonEnd(), polygonStarted = false;\n        segments = polygon = null;\n      },\n      sphere: function() {\n        sink.polygonStart();\n        sink.lineStart();\n        interpolate(null, null, 1, sink);\n        sink.lineEnd();\n        sink.polygonEnd();\n      }\n    };\n\n    function point(lambda, phi) {\n      if (pointVisible(lambda, phi)) sink.point(lambda, phi);\n    }\n\n    function pointLine(lambda, phi) {\n      line.point(lambda, phi);\n    }\n\n    function lineStart() {\n      clip.point = pointLine;\n      line.lineStart();\n    }\n\n    function lineEnd() {\n      clip.point = point;\n      line.lineEnd();\n    }\n\n    function pointRing(lambda, phi) {\n      ring.push([lambda, phi]);\n      ringSink.point(lambda, phi);\n    }\n\n    function ringStart() {\n      ringSink.lineStart();\n      ring = [];\n    }\n\n    function ringEnd() {\n      pointRing(ring[0][0], ring[0][1]);\n      ringSink.lineEnd();\n\n      var clean = ringSink.clean(),\n          ringSegments = ringBuffer.result(),\n          i, n = ringSegments.length, m,\n          segment,\n          point;\n\n      ring.pop();\n      polygon.push(ring);\n      ring = null;\n\n      if (!n) return;\n\n      // No intersections.\n      if (clean & 1) {\n        segment = ringSegments[0];\n        if ((m = segment.length - 1) > 0) {\n          if (!polygonStarted) sink.polygonStart(), polygonStarted = true;\n          sink.lineStart();\n          for (i = 0; i < m; ++i) sink.point((point = segment[i])[0], point[1]);\n          sink.lineEnd();\n        }\n        return;\n      }\n\n      // Rejoin connected segments.\n      // TODO reuse ringBuffer.rejoin()?\n      if (n > 1 && clean & 2) ringSegments.push(ringSegments.pop().concat(ringSegments.shift()));\n\n      segments.push(ringSegments.filter(validSegment));\n    }\n\n    return clip;\n  };\n}\n\nfunction validSegment(segment) {\n  return segment.length > 1;\n}\n\n// Intersections are sorted along the clip edge. For both antimeridian cutting\n// and circle clipping, the same comparison is used.\nfunction compareIntersection(a, b) {\n  return ((a = a.x)[0] < 0 ? a[1] - halfPi - epsilon : halfPi - a[1])\n       - ((b = b.x)[0] < 0 ? b[1] - halfPi - epsilon : halfPi - b[1]);\n}\n", "import clip from \"./index.js\";\nimport {abs, atan, cos, epsilon, halfPi, pi, sin} from \"../math.js\";\n\nexport default clip(\n  function() { return true; },\n  clipAntimeridianLine,\n  clipAntimeridianInterpolate,\n  [-pi, -halfPi]\n);\n\n// Takes a line and cuts into visible segments. Return values: 0 - there were\n// intersections or the line was empty; 1 - no intersections; 2 - there were\n// intersections, and the first and last segments should be rejoined.\nfunction clipAntimeridianLine(stream) {\n  var lambda0 = NaN,\n      phi0 = NaN,\n      sign0 = NaN,\n      clean; // no intersections\n\n  return {\n    lineStart: function() {\n      stream.lineStart();\n      clean = 1;\n    },\n    point: function(lambda1, phi1) {\n      var sign1 = lambda1 > 0 ? pi : -pi,\n          delta = abs(lambda1 - lambda0);\n      if (abs(delta - pi) < epsilon) { // line crosses a pole\n        stream.point(lambda0, phi0 = (phi0 + phi1) / 2 > 0 ? halfPi : -halfPi);\n        stream.point(sign0, phi0);\n        stream.lineEnd();\n        stream.lineStart();\n        stream.point(sign1, phi0);\n        stream.point(lambda1, phi0);\n        clean = 0;\n      } else if (sign0 !== sign1 && delta >= pi) { // line crosses antimeridian\n        if (abs(lambda0 - sign0) < epsilon) lambda0 -= sign0 * epsilon; // handle degeneracies\n        if (abs(lambda1 - sign1) < epsilon) lambda1 -= sign1 * epsilon;\n        phi0 = clipAntimeridianIntersect(lambda0, phi0, lambda1, phi1);\n        stream.point(sign0, phi0);\n        stream.lineEnd();\n        stream.lineStart();\n        stream.point(sign1, phi0);\n        clean = 0;\n      }\n      stream.point(lambda0 = lambda1, phi0 = phi1);\n      sign0 = sign1;\n    },\n    lineEnd: function() {\n      stream.lineEnd();\n      lambda0 = phi0 = NaN;\n    },\n    clean: function() {\n      return 2 - clean; // if intersections, rejoin first and last segments\n    }\n  };\n}\n\nfunction clipAntimeridianIntersect(lambda0, phi0, lambda1, phi1) {\n  var cosPhi0,\n      cosPhi1,\n      sinLambda0Lambda1 = sin(lambda0 - lambda1);\n  return abs(sinLambda0Lambda1) > epsilon\n      ? atan((sin(phi0) * (cosPhi1 = cos(phi1)) * sin(lambda1)\n          - sin(phi1) * (cosPhi0 = cos(phi0)) * sin(lambda0))\n          / (cosPhi0 * cosPhi1 * sinLambda0Lambda1))\n      : (phi0 + phi1) / 2;\n}\n\nfunction clipAntimeridianInterpolate(from, to, direction, stream) {\n  var phi;\n  if (from == null) {\n    phi = direction * halfPi;\n    stream.point(-pi, phi);\n    stream.point(0, phi);\n    stream.point(pi, phi);\n    stream.point(pi, 0);\n    stream.point(pi, -phi);\n    stream.point(0, -phi);\n    stream.point(-pi, -phi);\n    stream.point(-pi, 0);\n    stream.point(-pi, phi);\n  } else if (abs(from[0] - to[0]) > epsilon) {\n    var lambda = from[0] < to[0] ? pi : -pi;\n    phi = direction * lambda / 2;\n    stream.point(-lambda, phi);\n    stream.point(0, phi);\n    stream.point(lambda, phi);\n  } else {\n    stream.point(to[0], to[1]);\n  }\n}\n", "import {cartesian, cartesianAddInPlace, cartesianCross, cartesianDot, cartesianScale, spherical} from \"../cartesian.js\";\nimport {circleStream} from \"../circle.js\";\nimport {abs, cos, epsilon, pi, radians, sqrt} from \"../math.js\";\nimport pointEqual from \"../pointEqual.js\";\nimport clip from \"./index.js\";\n\nexport default function(radius) {\n  var cr = cos(radius),\n      delta = 6 * radians,\n      smallRadius = cr > 0,\n      notHemisphere = abs(cr) > epsilon; // TODO optimise for this common case\n\n  function interpolate(from, to, direction, stream) {\n    circleStream(stream, radius, delta, direction, from, to);\n  }\n\n  function visible(lambda, phi) {\n    return cos(lambda) * cos(phi) > cr;\n  }\n\n  // Takes a line and cuts into visible segments. Return values used for polygon\n  // clipping: 0 - there were intersections or the line was empty; 1 - no\n  // intersections 2 - there were intersections, and the first and last segments\n  // should be rejoined.\n  function clipLine(stream) {\n    var point0, // previous point\n        c0, // code for previous point\n        v0, // visibility of previous point\n        v00, // visibility of first point\n        clean; // no intersections\n    return {\n      lineStart: function() {\n        v00 = v0 = false;\n        clean = 1;\n      },\n      point: function(lambda, phi) {\n        var point1 = [lambda, phi],\n            point2,\n            v = visible(lambda, phi),\n            c = smallRadius\n              ? v ? 0 : code(lambda, phi)\n              : v ? code(lambda + (lambda < 0 ? pi : -pi), phi) : 0;\n        if (!point0 && (v00 = v0 = v)) stream.lineStart();\n        if (v !== v0) {\n          point2 = intersect(point0, point1);\n          if (!point2 || pointEqual(point0, point2) || pointEqual(point1, point2))\n            point1[2] = 1;\n        }\n        if (v !== v0) {\n          clean = 0;\n          if (v) {\n            // outside going in\n            stream.lineStart();\n            point2 = intersect(point1, point0);\n            stream.point(point2[0], point2[1]);\n          } else {\n            // inside going out\n            point2 = intersect(point0, point1);\n            stream.point(point2[0], point2[1], 2);\n            stream.lineEnd();\n          }\n          point0 = point2;\n        } else if (notHemisphere && point0 && smallRadius ^ v) {\n          var t;\n          // If the codes for two points are different, or are both zero,\n          // and there this segment intersects with the small circle.\n          if (!(c & c0) && (t = intersect(point1, point0, true))) {\n            clean = 0;\n            if (smallRadius) {\n              stream.lineStart();\n              stream.point(t[0][0], t[0][1]);\n              stream.point(t[1][0], t[1][1]);\n              stream.lineEnd();\n            } else {\n              stream.point(t[1][0], t[1][1]);\n              stream.lineEnd();\n              stream.lineStart();\n              stream.point(t[0][0], t[0][1], 3);\n            }\n          }\n        }\n        if (v && (!point0 || !pointEqual(point0, point1))) {\n          stream.point(point1[0], point1[1]);\n        }\n        point0 = point1, v0 = v, c0 = c;\n      },\n      lineEnd: function() {\n        if (v0) stream.lineEnd();\n        point0 = null;\n      },\n      // Rejoin first and last segments if there were intersections and the first\n      // and last points were visible.\n      clean: function() {\n        return clean | ((v00 && v0) << 1);\n      }\n    };\n  }\n\n  // Intersects the great circle between a and b with the clip circle.\n  function intersect(a, b, two) {\n    var pa = cartesian(a),\n        pb = cartesian(b);\n\n    // We have two planes, n1.p = d1 and n2.p = d2.\n    // Find intersection line p(t) = c1 n1 + c2 n2 + t (n1 \u2A2F n2).\n    var n1 = [1, 0, 0], // normal\n        n2 = cartesianCross(pa, pb),\n        n2n2 = cartesianDot(n2, n2),\n        n1n2 = n2[0], // cartesianDot(n1, n2),\n        determinant = n2n2 - n1n2 * n1n2;\n\n    // Two polar points.\n    if (!determinant) return !two && a;\n\n    var c1 =  cr * n2n2 / determinant,\n        c2 = -cr * n1n2 / determinant,\n        n1xn2 = cartesianCross(n1, n2),\n        A = cartesianScale(n1, c1),\n        B = cartesianScale(n2, c2);\n    cartesianAddInPlace(A, B);\n\n    // Solve |p(t)|^2 = 1.\n    var u = n1xn2,\n        w = cartesianDot(A, u),\n        uu = cartesianDot(u, u),\n        t2 = w * w - uu * (cartesianDot(A, A) - 1);\n\n    if (t2 < 0) return;\n\n    var t = sqrt(t2),\n        q = cartesianScale(u, (-w - t) / uu);\n    cartesianAddInPlace(q, A);\n    q = spherical(q);\n\n    if (!two) return q;\n\n    // Two intersection points.\n    var lambda0 = a[0],\n        lambda1 = b[0],\n        phi0 = a[1],\n        phi1 = b[1],\n        z;\n\n    if (lambda1 < lambda0) z = lambda0, lambda0 = lambda1, lambda1 = z;\n\n    var delta = lambda1 - lambda0,\n        polar = abs(delta - pi) < epsilon,\n        meridian = polar || delta < epsilon;\n\n    if (!polar && phi1 < phi0) z = phi0, phi0 = phi1, phi1 = z;\n\n    // Check that the first point is between a and b.\n    if (meridian\n        ? polar\n          ? phi0 + phi1 > 0 ^ q[1] < (abs(q[0] - lambda0) < epsilon ? phi0 : phi1)\n          : phi0 <= q[1] && q[1] <= phi1\n        : delta > pi ^ (lambda0 <= q[0] && q[0] <= lambda1)) {\n      var q1 = cartesianScale(u, (-w + t) / uu);\n      cartesianAddInPlace(q1, A);\n      return [q, spherical(q1)];\n    }\n  }\n\n  // Generates a 4-bit vector representing the location of a point relative to\n  // the small circle's bounding box.\n  function code(lambda, phi) {\n    var r = smallRadius ? radius : pi - radius,\n        code = 0;\n    if (lambda < -r) code |= 1; // left\n    else if (lambda > r) code |= 2; // right\n    if (phi < -r) code |= 4; // below\n    else if (phi > r) code |= 8; // above\n    return code;\n  }\n\n  return clip(visible, clipLine, interpolate, smallRadius ? [0, -radius] : [-pi, radius - pi]);\n}\n", "export default function(a, b, x0, y0, x1, y1) {\n  var ax = a[0],\n      ay = a[1],\n      bx = b[0],\n      by = b[1],\n      t0 = 0,\n      t1 = 1,\n      dx = bx - ax,\n      dy = by - ay,\n      r;\n\n  r = x0 - ax;\n  if (!dx && r > 0) return;\n  r /= dx;\n  if (dx < 0) {\n    if (r < t0) return;\n    if (r < t1) t1 = r;\n  } else if (dx > 0) {\n    if (r > t1) return;\n    if (r > t0) t0 = r;\n  }\n\n  r = x1 - ax;\n  if (!dx && r < 0) return;\n  r /= dx;\n  if (dx < 0) {\n    if (r > t1) return;\n    if (r > t0) t0 = r;\n  } else if (dx > 0) {\n    if (r < t0) return;\n    if (r < t1) t1 = r;\n  }\n\n  r = y0 - ay;\n  if (!dy && r > 0) return;\n  r /= dy;\n  if (dy < 0) {\n    if (r < t0) return;\n    if (r < t1) t1 = r;\n  } else if (dy > 0) {\n    if (r > t1) return;\n    if (r > t0) t0 = r;\n  }\n\n  r = y1 - ay;\n  if (!dy && r < 0) return;\n  r /= dy;\n  if (dy < 0) {\n    if (r > t1) return;\n    if (r > t0) t0 = r;\n  } else if (dy > 0) {\n    if (r < t0) return;\n    if (r < t1) t1 = r;\n  }\n\n  if (t0 > 0) a[0] = ax + t0 * dx, a[1] = ay + t0 * dy;\n  if (t1 < 1) b[0] = ax + t1 * dx, b[1] = ay + t1 * dy;\n  return true;\n}\n", "import {abs, epsilon} from \"../math.js\";\nimport clipBuffer from \"./buffer.js\";\nimport clipLine from \"./line.js\";\nimport clipRejoin from \"./rejoin.js\";\nimport {merge} from \"d3-array\";\n\nvar clipMax = 1e9, clipMin = -clipMax;\n\n// TODO Use d3-polygon\u2019s polygonContains here for the ring check?\n// TODO Eliminate duplicate buffering in clipBuffer and polygon.push?\n\nexport default function clipRectangle(x0, y0, x1, y1) {\n\n  function visible(x, y) {\n    return x0 <= x && x <= x1 && y0 <= y && y <= y1;\n  }\n\n  function interpolate(from, to, direction, stream) {\n    var a = 0, a1 = 0;\n    if (from == null\n        || (a = corner(from, direction)) !== (a1 = corner(to, direction))\n        || comparePoint(from, to) < 0 ^ direction > 0) {\n      do stream.point(a === 0 || a === 3 ? x0 : x1, a > 1 ? y1 : y0);\n      while ((a = (a + direction + 4) % 4) !== a1);\n    } else {\n      stream.point(to[0], to[1]);\n    }\n  }\n\n  function corner(p, direction) {\n    return abs(p[0] - x0) < epsilon ? direction > 0 ? 0 : 3\n        : abs(p[0] - x1) < epsilon ? direction > 0 ? 2 : 1\n        : abs(p[1] - y0) < epsilon ? direction > 0 ? 1 : 0\n        : direction > 0 ? 3 : 2; // abs(p[1] - y1) < epsilon\n  }\n\n  function compareIntersection(a, b) {\n    return comparePoint(a.x, b.x);\n  }\n\n  function comparePoint(a, b) {\n    var ca = corner(a, 1),\n        cb = corner(b, 1);\n    return ca !== cb ? ca - cb\n        : ca === 0 ? b[1] - a[1]\n        : ca === 1 ? a[0] - b[0]\n        : ca === 2 ? a[1] - b[1]\n        : b[0] - a[0];\n  }\n\n  return function(stream) {\n    var activeStream = stream,\n        bufferStream = clipBuffer(),\n        segments,\n        polygon,\n        ring,\n        x__, y__, v__, // first point\n        x_, y_, v_, // previous point\n        first,\n        clean;\n\n    var clipStream = {\n      point: point,\n      lineStart: lineStart,\n      lineEnd: lineEnd,\n      polygonStart: polygonStart,\n      polygonEnd: polygonEnd\n    };\n\n    function point(x, y) {\n      if (visible(x, y)) activeStream.point(x, y);\n    }\n\n    function polygonInside() {\n      var winding = 0;\n\n      for (var i = 0, n = polygon.length; i < n; ++i) {\n        for (var ring = polygon[i], j = 1, m = ring.length, point = ring[0], a0, a1, b0 = point[0], b1 = point[1]; j < m; ++j) {\n          a0 = b0, a1 = b1, point = ring[j], b0 = point[0], b1 = point[1];\n          if (a1 <= y1) { if (b1 > y1 && (b0 - a0) * (y1 - a1) > (b1 - a1) * (x0 - a0)) ++winding; }\n          else { if (b1 <= y1 && (b0 - a0) * (y1 - a1) < (b1 - a1) * (x0 - a0)) --winding; }\n        }\n      }\n\n      return winding;\n    }\n\n    // Buffer geometry within a polygon and then clip it en masse.\n    function polygonStart() {\n      activeStream = bufferStream, segments = [], polygon = [], clean = true;\n    }\n\n    function polygonEnd() {\n      var startInside = polygonInside(),\n          cleanInside = clean && startInside,\n          visible = (segments = merge(segments)).length;\n      if (cleanInside || visible) {\n        stream.polygonStart();\n        if (cleanInside) {\n          stream.lineStart();\n          interpolate(null, null, 1, stream);\n          stream.lineEnd();\n        }\n        if (visible) {\n          clipRejoin(segments, compareIntersection, startInside, interpolate, stream);\n        }\n        stream.polygonEnd();\n      }\n      activeStream = stream, segments = polygon = ring = null;\n    }\n\n    function lineStart() {\n      clipStream.point = linePoint;\n      if (polygon) polygon.push(ring = []);\n      first = true;\n      v_ = false;\n      x_ = y_ = NaN;\n    }\n\n    // TODO rather than special-case polygons, simply handle them separately.\n    // Ideally, coincident intersection points should be jittered to avoid\n    // clipping issues.\n    function lineEnd() {\n      if (segments) {\n        linePoint(x__, y__);\n        if (v__ && v_) bufferStream.rejoin();\n        segments.push(bufferStream.result());\n      }\n      clipStream.point = point;\n      if (v_) activeStream.lineEnd();\n    }\n\n    function linePoint(x, y) {\n      var v = visible(x, y);\n      if (polygon) ring.push([x, y]);\n      if (first) {\n        x__ = x, y__ = y, v__ = v;\n        first = false;\n        if (v) {\n          activeStream.lineStart();\n          activeStream.point(x, y);\n        }\n      } else {\n        if (v && v_) activeStream.point(x, y);\n        else {\n          var a = [x_ = Math.max(clipMin, Math.min(clipMax, x_)), y_ = Math.max(clipMin, Math.min(clipMax, y_))],\n              b = [x = Math.max(clipMin, Math.min(clipMax, x)), y = Math.max(clipMin, Math.min(clipMax, y))];\n          if (clipLine(a, b, x0, y0, x1, y1)) {\n            if (!v_) {\n              activeStream.lineStart();\n              activeStream.point(a[0], a[1]);\n            }\n            activeStream.point(b[0], b[1]);\n            if (!v) activeStream.lineEnd();\n            clean = false;\n          } else if (v) {\n            activeStream.lineStart();\n            activeStream.point(x, y);\n            clean = false;\n          }\n        }\n      }\n      x_ = x, y_ = y, v_ = v;\n    }\n\n    return clipStream;\n  };\n}\n", "export default x => x;\n", "import {Adder} from \"d3-array\";\nimport {abs} from \"../math.js\";\nimport noop from \"../noop.js\";\n\nvar areaSum = new Adder(),\n    areaRingSum = new Adder(),\n    x00,\n    y00,\n    x0,\n    y0;\n\nvar areaStream = {\n  point: noop,\n  lineStart: noop,\n  lineEnd: noop,\n  polygonStart: function() {\n    areaStream.lineStart = areaRingStart;\n    areaStream.lineEnd = areaRingEnd;\n  },\n  polygonEnd: function() {\n    areaStream.lineStart = areaStream.lineEnd = areaStream.point = noop;\n    areaSum.add(abs(areaRingSum));\n    areaRingSum = new Adder();\n  },\n  result: function() {\n    var area = areaSum / 2;\n    areaSum = new Adder();\n    return area;\n  }\n};\n\nfunction areaRingStart() {\n  areaStream.point = areaPointFirst;\n}\n\nfunction areaPointFirst(x, y) {\n  areaStream.point = areaPoint;\n  x00 = x0 = x, y00 = y0 = y;\n}\n\nfunction areaPoint(x, y) {\n  areaRingSum.add(y0 * x - x0 * y);\n  x0 = x, y0 = y;\n}\n\nfunction areaRingEnd() {\n  areaPoint(x00, y00);\n}\n\nexport default areaStream;\n", "import noop from \"../noop.js\";\n\nvar x0 = Infinity,\n    y0 = x0,\n    x1 = -x0,\n    y1 = x1;\n\nvar boundsStream = {\n  point: boundsPoint,\n  lineStart: noop,\n  lineEnd: noop,\n  polygonStart: noop,\n  polygonEnd: noop,\n  result: function() {\n    var bounds = [[x0, y0], [x1, y1]];\n    x1 = y1 = -(y0 = x0 = Infinity);\n    return bounds;\n  }\n};\n\nfunction boundsPoint(x, y) {\n  if (x < x0) x0 = x;\n  if (x > x1) x1 = x;\n  if (y < y0) y0 = y;\n  if (y > y1) y1 = y;\n}\n\nexport default boundsStream;\n", "import {sqrt} from \"../math.js\";\n\n// TODO Enforce positive area for exterior, negative area for interior?\n\nvar X0 = 0,\n    Y0 = 0,\n    Z0 = 0,\n    X1 = 0,\n    Y1 = 0,\n    Z1 = 0,\n    X2 = 0,\n    Y2 = 0,\n    Z2 = 0,\n    x00,\n    y00,\n    x0,\n    y0;\n\nvar centroidStream = {\n  point: centroidPoint,\n  lineStart: centroidLineStart,\n  lineEnd: centroidLineEnd,\n  polygonStart: function() {\n    centroidStream.lineStart = centroidRingStart;\n    centroidStream.lineEnd = centroidRingEnd;\n  },\n  polygonEnd: function() {\n    centroidStream.point = centroidPoint;\n    centroidStream.lineStart = centroidLineStart;\n    centroidStream.lineEnd = centroidLineEnd;\n  },\n  result: function() {\n    var centroid = Z2 ? [X2 / Z2, Y2 / Z2]\n        : Z1 ? [X1 / Z1, Y1 / Z1]\n        : Z0 ? [X0 / Z0, Y0 / Z0]\n        : [NaN, NaN];\n    X0 = Y0 = Z0 =\n    X1 = Y1 = Z1 =\n    X2 = Y2 = Z2 = 0;\n    return centroid;\n  }\n};\n\nfunction centroidPoint(x, y) {\n  X0 += x;\n  Y0 += y;\n  ++Z0;\n}\n\nfunction centroidLineStart() {\n  centroidStream.point = centroidPointFirstLine;\n}\n\nfunction centroidPointFirstLine(x, y) {\n  centroidStream.point = centroidPointLine;\n  centroidPoint(x0 = x, y0 = y);\n}\n\nfunction centroidPointLine(x, y) {\n  var dx = x - x0, dy = y - y0, z = sqrt(dx * dx + dy * dy);\n  X1 += z * (x0 + x) / 2;\n  Y1 += z * (y0 + y) / 2;\n  Z1 += z;\n  centroidPoint(x0 = x, y0 = y);\n}\n\nfunction centroidLineEnd() {\n  centroidStream.point = centroidPoint;\n}\n\nfunction centroidRingStart() {\n  centroidStream.point = centroidPointFirstRing;\n}\n\nfunction centroidRingEnd() {\n  centroidPointRing(x00, y00);\n}\n\nfunction centroidPointFirstRing(x, y) {\n  centroidStream.point = centroidPointRing;\n  centroidPoint(x00 = x0 = x, y00 = y0 = y);\n}\n\nfunction centroidPointRing(x, y) {\n  var dx = x - x0,\n      dy = y - y0,\n      z = sqrt(dx * dx + dy * dy);\n\n  X1 += z * (x0 + x) / 2;\n  Y1 += z * (y0 + y) / 2;\n  Z1 += z;\n\n  z = y0 * x - x0 * y;\n  X2 += z * (x0 + x);\n  Y2 += z * (y0 + y);\n  Z2 += z * 3;\n  centroidPoint(x0 = x, y0 = y);\n}\n\nexport default centroidStream;\n", "import {tau} from \"../math.js\";\nimport noop from \"../noop.js\";\n\nexport default function PathContext(context) {\n  this._context = context;\n}\n\nPathContext.prototype = {\n  _radius: 4.5,\n  pointRadius: function(_) {\n    return this._radius = _, this;\n  },\n  polygonStart: function() {\n    this._line = 0;\n  },\n  polygonEnd: function() {\n    this._line = NaN;\n  },\n  lineStart: function() {\n    this._point = 0;\n  },\n  lineEnd: function() {\n    if (this._line === 0) this._context.closePath();\n    this._point = NaN;\n  },\n  point: function(x, y) {\n    switch (this._point) {\n      case 0: {\n        this._context.moveTo(x, y);\n        this._point = 1;\n        break;\n      }\n      case 1: {\n        this._context.lineTo(x, y);\n        break;\n      }\n      default: {\n        this._context.moveTo(x + this._radius, y);\n        this._context.arc(x, y, this._radius, 0, tau);\n        break;\n      }\n    }\n  },\n  result: noop\n};\n", "import {Adder} from \"d3-array\";\nimport {sqrt} from \"../math.js\";\nimport noop from \"../noop.js\";\n\nvar lengthSum = new Adder(),\n    lengthRing,\n    x00,\n    y00,\n    x0,\n    y0;\n\nvar lengthStream = {\n  point: noop,\n  lineStart: function() {\n    lengthStream.point = lengthPointFirst;\n  },\n  lineEnd: function() {\n    if (lengthRing) lengthPoint(x00, y00);\n    lengthStream.point = noop;\n  },\n  polygonStart: function() {\n    lengthRing = true;\n  },\n  polygonEnd: function() {\n    lengthRing = null;\n  },\n  result: function() {\n    var length = +lengthSum;\n    lengthSum = new Adder();\n    return length;\n  }\n};\n\nfunction lengthPointFirst(x, y) {\n  lengthStream.point = lengthPoint;\n  x00 = x0 = x, y00 = y0 = y;\n}\n\nfunction lengthPoint(x, y) {\n  x0 -= x, y0 -= y;\n  lengthSum.add(sqrt(x0 * x0 + y0 * y0));\n  x0 = x, y0 = y;\n}\n\nexport default lengthStream;\n", "// Simple caching for constant-radius points.\nlet cacheDigits, cacheAppend, cacheRadius, cacheCircle;\n\nexport default class PathString {\n  constructor(digits) {\n    this._append = digits == null ? append : appendRound(digits);\n    this._radius = 4.5;\n    this._ = \"\";\n  }\n  pointRadius(_) {\n    this._radius = +_;\n    return this;\n  }\n  polygonStart() {\n    this._line = 0;\n  }\n  polygonEnd() {\n    this._line = NaN;\n  }\n  lineStart() {\n    this._point = 0;\n  }\n  lineEnd() {\n    if (this._line === 0) this._ += \"Z\";\n    this._point = NaN;\n  }\n  point(x, y) {\n    switch (this._point) {\n      case 0: {\n        this._append`M${x},${y}`;\n        this._point = 1;\n        break;\n      }\n      case 1: {\n        this._append`L${x},${y}`;\n        break;\n      }\n      default: {\n        this._append`M${x},${y}`;\n        if (this._radius !== cacheRadius || this._append !== cacheAppend) {\n          const r = this._radius;\n          const s = this._;\n          this._ = \"\"; // stash the old string so we can cache the circle path fragment\n          this._append`m0,${r}a${r},${r} 0 1,1 0,${-2 * r}a${r},${r} 0 1,1 0,${2 * r}z`;\n          cacheRadius = r;\n          cacheAppend = this._append;\n          cacheCircle = this._;\n          this._ = s;\n        }\n        this._ += cacheCircle;\n        break;\n      }\n    }\n  }\n  result() {\n    const result = this._;\n    this._ = \"\";\n    return result.length ? result : null;\n  }\n}\n\nfunction append(strings) {\n  let i = 1;\n  this._ += strings[0];\n  for (const j = strings.length; i < j; ++i) {\n    this._ += arguments[i] + strings[i];\n  }\n}\n\nfunction appendRound(digits) {\n  const d = Math.floor(digits);\n  if (!(d >= 0)) throw new RangeError(`invalid digits: ${digits}`);\n  if (d > 15) return append;\n  if (d !== cacheDigits) {\n    const k = 10 ** d;\n    cacheDigits = d;\n    cacheAppend = function append(strings) {\n      let i = 1;\n      this._ += strings[0];\n      for (const j = strings.length; i < j; ++i) {\n        this._ += Math.round(arguments[i] * k) / k + strings[i];\n      }\n    };\n  }\n  return cacheAppend;\n}\n", "import identity from \"../identity.js\";\nimport stream from \"../stream.js\";\nimport pathArea from \"./area.js\";\nimport pathBounds from \"./bounds.js\";\nimport pathCentroid from \"./centroid.js\";\nimport PathContext from \"./context.js\";\nimport pathMeasure from \"./measure.js\";\nimport PathString from \"./string.js\";\n\nexport default function(projection, context) {\n  let digits = 3,\n      pointRadius = 4.5,\n      projectionStream,\n      contextStream;\n\n  function path(object) {\n    if (object) {\n      if (typeof pointRadius === \"function\") contextStream.pointRadius(+pointRadius.apply(this, arguments));\n      stream(object, projectionStream(contextStream));\n    }\n    return contextStream.result();\n  }\n\n  path.area = function(object) {\n    stream(object, projectionStream(pathArea));\n    return pathArea.result();\n  };\n\n  path.measure = function(object) {\n    stream(object, projectionStream(pathMeasure));\n    return pathMeasure.result();\n  };\n\n  path.bounds = function(object) {\n    stream(object, projectionStream(pathBounds));\n    return pathBounds.result();\n  };\n\n  path.centroid = function(object) {\n    stream(object, projectionStream(pathCentroid));\n    return pathCentroid.result();\n  };\n\n  path.projection = function(_) {\n    if (!arguments.length) return projection;\n    projectionStream = _ == null ? (projection = null, identity) : (projection = _).stream;\n    return path;\n  };\n\n  path.context = function(_) {\n    if (!arguments.length) return context;\n    contextStream = _ == null ? (context = null, new PathString(digits)) : new PathContext(context = _);\n    if (typeof pointRadius !== \"function\") contextStream.pointRadius(pointRadius);\n    return path;\n  };\n\n  path.pointRadius = function(_) {\n    if (!arguments.length) return pointRadius;\n    pointRadius = typeof _ === \"function\" ? _ : (contextStream.pointRadius(+_), +_);\n    return path;\n  };\n\n  path.digits = function(_) {\n    if (!arguments.length) return digits;\n    if (_ == null) digits = null;\n    else {\n      const d = Math.floor(_);\n      if (!(d >= 0)) throw new RangeError(`invalid digits: ${_}`);\n      digits = d;\n    }\n    if (context === null) contextStream = new PathString(digits);\n    return path;\n  };\n\n  return path.projection(projection).digits(digits).context(context);\n}\n", "export default function(methods) {\n  return {\n    stream: transformer(methods)\n  };\n}\n\nexport function transformer(methods) {\n  return function(stream) {\n    var s = new TransformStream;\n    for (var key in methods) s[key] = methods[key];\n    s.stream = stream;\n    return s;\n  };\n}\n\nfunction TransformStream() {}\n\nTransformStream.prototype = {\n  constructor: TransformStream,\n  point: function(x, y) { this.stream.point(x, y); },\n  sphere: function() { this.stream.sphere(); },\n  lineStart: function() { this.stream.lineStart(); },\n  lineEnd: function() { this.stream.lineEnd(); },\n  polygonStart: function() { this.stream.polygonStart(); },\n  polygonEnd: function() { this.stream.polygonEnd(); }\n};\n", "import {default as geoStream} from \"../stream.js\";\nimport boundsStream from \"../path/bounds.js\";\n\nfunction fit(projection, fitBounds, object) {\n  var clip = projection.clipExtent && projection.clipExtent();\n  projection.scale(150).translate([0, 0]);\n  if (clip != null) projection.clipExtent(null);\n  geoStream(object, projection.stream(boundsStream));\n  fitBounds(boundsStream.result());\n  if (clip != null) projection.clipExtent(clip);\n  return projection;\n}\n\nexport function fitExtent(projection, extent, object) {\n  return fit(projection, function(b) {\n    var w = extent[1][0] - extent[0][0],\n        h = extent[1][1] - extent[0][1],\n        k = Math.min(w / (b[1][0] - b[0][0]), h / (b[1][1] - b[0][1])),\n        x = +extent[0][0] + (w - k * (b[1][0] + b[0][0])) / 2,\n        y = +extent[0][1] + (h - k * (b[1][1] + b[0][1])) / 2;\n    projection.scale(150 * k).translate([x, y]);\n  }, object);\n}\n\nexport function fitSize(projection, size, object) {\n  return fitExtent(projection, [[0, 0], size], object);\n}\n\nexport function fitWidth(projection, width, object) {\n  return fit(projection, function(b) {\n    var w = +width,\n        k = w / (b[1][0] - b[0][0]),\n        x = (w - k * (b[1][0] + b[0][0])) / 2,\n        y = -k * b[0][1];\n    projection.scale(150 * k).translate([x, y]);\n  }, object);\n}\n\nexport function fitHeight(projection, height, object) {\n  return fit(projection, function(b) {\n    var h = +height,\n        k = h / (b[1][1] - b[0][1]),\n        x = -k * b[0][0],\n        y = (h - k * (b[1][1] + b[0][1])) / 2;\n    projection.scale(150 * k).translate([x, y]);\n  }, object);\n}\n", "import {cartesian} from \"../cartesian.js\";\nimport {abs, asin, atan2, cos, epsilon, radians, sqrt} from \"../math.js\";\nimport {transformer} from \"../transform.js\";\n\nvar maxDepth = 16, // maximum depth of subdivision\n    cosMinDistance = cos(30 * radians); // cos(minimum angular distance)\n\nexport default function(project, delta2) {\n  return +delta2 ? resample(project, delta2) : resampleNone(project);\n}\n\nfunction resampleNone(project) {\n  return transformer({\n    point: function(x, y) {\n      x = project(x, y);\n      this.stream.point(x[0], x[1]);\n    }\n  });\n}\n\nfunction resample(project, delta2) {\n\n  function resampleLineTo(x0, y0, lambda0, a0, b0, c0, x1, y1, lambda1, a1, b1, c1, depth, stream) {\n    var dx = x1 - x0,\n        dy = y1 - y0,\n        d2 = dx * dx + dy * dy;\n    if (d2 > 4 * delta2 && depth--) {\n      var a = a0 + a1,\n          b = b0 + b1,\n          c = c0 + c1,\n          m = sqrt(a * a + b * b + c * c),\n          phi2 = asin(c /= m),\n          lambda2 = abs(abs(c) - 1) < epsilon || abs(lambda0 - lambda1) < epsilon ? (lambda0 + lambda1) / 2 : atan2(b, a),\n          p = project(lambda2, phi2),\n          x2 = p[0],\n          y2 = p[1],\n          dx2 = x2 - x0,\n          dy2 = y2 - y0,\n          dz = dy * dx2 - dx * dy2;\n      if (dz * dz / d2 > delta2 // perpendicular projected distance\n          || abs((dx * dx2 + dy * dy2) / d2 - 0.5) > 0.3 // midpoint close to an end\n          || a0 * a1 + b0 * b1 + c0 * c1 < cosMinDistance) { // angular distance\n        resampleLineTo(x0, y0, lambda0, a0, b0, c0, x2, y2, lambda2, a /= m, b /= m, c, depth, stream);\n        stream.point(x2, y2);\n        resampleLineTo(x2, y2, lambda2, a, b, c, x1, y1, lambda1, a1, b1, c1, depth, stream);\n      }\n    }\n  }\n  return function(stream) {\n    var lambda00, x00, y00, a00, b00, c00, // first point\n        lambda0, x0, y0, a0, b0, c0; // previous point\n\n    var resampleStream = {\n      point: point,\n      lineStart: lineStart,\n      lineEnd: lineEnd,\n      polygonStart: function() { stream.polygonStart(); resampleStream.lineStart = ringStart; },\n      polygonEnd: function() { stream.polygonEnd(); resampleStream.lineStart = lineStart; }\n    };\n\n    function point(x, y) {\n      x = project(x, y);\n      stream.point(x[0], x[1]);\n    }\n\n    function lineStart() {\n      x0 = NaN;\n      resampleStream.point = linePoint;\n      stream.lineStart();\n    }\n\n    function linePoint(lambda, phi) {\n      var c = cartesian([lambda, phi]), p = project(lambda, phi);\n      resampleLineTo(x0, y0, lambda0, a0, b0, c0, x0 = p[0], y0 = p[1], lambda0 = lambda, a0 = c[0], b0 = c[1], c0 = c[2], maxDepth, stream);\n      stream.point(x0, y0);\n    }\n\n    function lineEnd() {\n      resampleStream.point = point;\n      stream.lineEnd();\n    }\n\n    function ringStart() {\n      lineStart();\n      resampleStream.point = ringPoint;\n      resampleStream.lineEnd = ringEnd;\n    }\n\n    function ringPoint(lambda, phi) {\n      linePoint(lambda00 = lambda, phi), x00 = x0, y00 = y0, a00 = a0, b00 = b0, c00 = c0;\n      resampleStream.point = linePoint;\n    }\n\n    function ringEnd() {\n      resampleLineTo(x0, y0, lambda0, a0, b0, c0, x00, y00, lambda00, a00, b00, c00, maxDepth, stream);\n      resampleStream.lineEnd = lineEnd;\n      lineEnd();\n    }\n\n    return resampleStream;\n  };\n}\n", "import clipAntimeridian from \"../clip/antimeridian.js\";\nimport clipCircle from \"../clip/circle.js\";\nimport clipRectangle from \"../clip/rectangle.js\";\nimport compose from \"../compose.js\";\nimport identity from \"../identity.js\";\nimport {cos, degrees, radians, sin, sqrt} from \"../math.js\";\nimport {rotateRadians} from \"../rotation.js\";\nimport {transformer} from \"../transform.js\";\nimport {fitExtent, fitSize, fitWidth, fitHeight} from \"./fit.js\";\nimport resample from \"./resample.js\";\n\nvar transformRadians = transformer({\n  point: function(x, y) {\n    this.stream.point(x * radians, y * radians);\n  }\n});\n\nfunction transformRotate(rotate) {\n  return transformer({\n    point: function(x, y) {\n      var r = rotate(x, y);\n      return this.stream.point(r[0], r[1]);\n    }\n  });\n}\n\nfunction scaleTranslate(k, dx, dy, sx, sy) {\n  function transform(x, y) {\n    x *= sx; y *= sy;\n    return [dx + k * x, dy - k * y];\n  }\n  transform.invert = function(x, y) {\n    return [(x - dx) / k * sx, (dy - y) / k * sy];\n  };\n  return transform;\n}\n\nfunction scaleTranslateRotate(k, dx, dy, sx, sy, alpha) {\n  if (!alpha) return scaleTranslate(k, dx, dy, sx, sy);\n  var cosAlpha = cos(alpha),\n      sinAlpha = sin(alpha),\n      a = cosAlpha * k,\n      b = sinAlpha * k,\n      ai = cosAlpha / k,\n      bi = sinAlpha / k,\n      ci = (sinAlpha * dy - cosAlpha * dx) / k,\n      fi = (sinAlpha * dx + cosAlpha * dy) / k;\n  function transform(x, y) {\n    x *= sx; y *= sy;\n    return [a * x - b * y + dx, dy - b * x - a * y];\n  }\n  transform.invert = function(x, y) {\n    return [sx * (ai * x - bi * y + ci), sy * (fi - bi * x - ai * y)];\n  };\n  return transform;\n}\n\nexport default function projection(project) {\n  return projectionMutator(function() { return project; })();\n}\n\nexport function projectionMutator(projectAt) {\n  var project,\n      k = 150, // scale\n      x = 480, y = 250, // translate\n      lambda = 0, phi = 0, // center\n      deltaLambda = 0, deltaPhi = 0, deltaGamma = 0, rotate, // pre-rotate\n      alpha = 0, // post-rotate angle\n      sx = 1, // reflectX\n      sy = 1, // reflectX\n      theta = null, preclip = clipAntimeridian, // pre-clip angle\n      x0 = null, y0, x1, y1, postclip = identity, // post-clip extent\n      delta2 = 0.5, // precision\n      projectResample,\n      projectTransform,\n      projectRotateTransform,\n      cache,\n      cacheStream;\n\n  function projection(point) {\n    return projectRotateTransform(point[0] * radians, point[1] * radians);\n  }\n\n  function invert(point) {\n    point = projectRotateTransform.invert(point[0], point[1]);\n    return point && [point[0] * degrees, point[1] * degrees];\n  }\n\n  projection.stream = function(stream) {\n    return cache && cacheStream === stream ? cache : cache = transformRadians(transformRotate(rotate)(preclip(projectResample(postclip(cacheStream = stream)))));\n  };\n\n  projection.preclip = function(_) {\n    return arguments.length ? (preclip = _, theta = undefined, reset()) : preclip;\n  };\n\n  projection.postclip = function(_) {\n    return arguments.length ? (postclip = _, x0 = y0 = x1 = y1 = null, reset()) : postclip;\n  };\n\n  projection.clipAngle = function(_) {\n    return arguments.length ? (preclip = +_ ? clipCircle(theta = _ * radians) : (theta = null, clipAntimeridian), reset()) : theta * degrees;\n  };\n\n  projection.clipExtent = function(_) {\n    return arguments.length ? (postclip = _ == null ? (x0 = y0 = x1 = y1 = null, identity) : clipRectangle(x0 = +_[0][0], y0 = +_[0][1], x1 = +_[1][0], y1 = +_[1][1]), reset()) : x0 == null ? null : [[x0, y0], [x1, y1]];\n  };\n\n  projection.scale = function(_) {\n    return arguments.length ? (k = +_, recenter()) : k;\n  };\n\n  projection.translate = function(_) {\n    return arguments.length ? (x = +_[0], y = +_[1], recenter()) : [x, y];\n  };\n\n  projection.center = function(_) {\n    return arguments.length ? (lambda = _[0] % 360 * radians, phi = _[1] % 360 * radians, recenter()) : [lambda * degrees, phi * degrees];\n  };\n\n  projection.rotate = function(_) {\n    return arguments.length ? (deltaLambda = _[0] % 360 * radians, deltaPhi = _[1] % 360 * radians, deltaGamma = _.length > 2 ? _[2] % 360 * radians : 0, recenter()) : [deltaLambda * degrees, deltaPhi * degrees, deltaGamma * degrees];\n  };\n\n  projection.angle = function(_) {\n    return arguments.length ? (alpha = _ % 360 * radians, recenter()) : alpha * degrees;\n  };\n\n  projection.reflectX = function(_) {\n    return arguments.length ? (sx = _ ? -1 : 1, recenter()) : sx < 0;\n  };\n\n  projection.reflectY = function(_) {\n    return arguments.length ? (sy = _ ? -1 : 1, recenter()) : sy < 0;\n  };\n\n  projection.precision = function(_) {\n    return arguments.length ? (projectResample = resample(projectTransform, delta2 = _ * _), reset()) : sqrt(delta2);\n  };\n\n  projection.fitExtent = function(extent, object) {\n    return fitExtent(projection, extent, object);\n  };\n\n  projection.fitSize = function(size, object) {\n    return fitSize(projection, size, object);\n  };\n\n  projection.fitWidth = function(width, object) {\n    return fitWidth(projection, width, object);\n  };\n\n  projection.fitHeight = function(height, object) {\n    return fitHeight(projection, height, object);\n  };\n\n  function recenter() {\n    var center = scaleTranslateRotate(k, 0, 0, sx, sy, alpha).apply(null, project(lambda, phi)),\n        transform = scaleTranslateRotate(k, x - center[0], y - center[1], sx, sy, alpha);\n    rotate = rotateRadians(deltaLambda, deltaPhi, deltaGamma);\n    projectTransform = compose(project, transform);\n    projectRotateTransform = compose(rotate, projectTransform);\n    projectResample = resample(projectTransform, delta2);\n    return reset();\n  }\n\n  function reset() {\n    cache = cacheStream = null;\n    return projection;\n  }\n\n  return function() {\n    project = projectAt.apply(this, arguments);\n    projection.invert = project.invert && invert;\n    return recenter();\n  };\n}\n", "import {degrees, pi, radians} from \"../math.js\";\nimport {projectionMutator} from \"./index.js\";\n\nexport function conicProjection(projectAt) {\n  var phi0 = 0,\n      phi1 = pi / 3,\n      m = projectionMutator(projectAt),\n      p = m(phi0, phi1);\n\n  p.parallels = function(_) {\n    return arguments.length ? m(phi0 = _[0] * radians, phi1 = _[1] * radians) : [phi0 * degrees, phi1 * degrees];\n  };\n\n  return p;\n}\n", "import {asin, cos, sin} from \"../math.js\";\n\nexport function cylindricalEqualAreaRaw(phi0) {\n  var cosPhi0 = cos(phi0);\n\n  function forward(lambda, phi) {\n    return [lambda * cosPhi0, sin(phi) / cosPhi0];\n  }\n\n  forward.invert = function(x, y) {\n    return [x / cosPhi0, asin(y * cosPhi0)];\n  };\n\n  return forward;\n}\n", "import {abs, asin, atan2, cos, epsilon, pi, sign, sin, sqrt} from \"../math.js\";\nimport {conicProjection} from \"./conic.js\";\nimport {cylindricalEqualAreaRaw} from \"./cylindricalEqualArea.js\";\n\nexport function conicEqualAreaRaw(y0, y1) {\n  var sy0 = sin(y0), n = (sy0 + sin(y1)) / 2;\n\n  // Are the parallels symmetrical around the Equator?\n  if (abs(n) < epsilon) return cylindricalEqualAreaRaw(y0);\n\n  var c = 1 + sy0 * (2 * n - sy0), r0 = sqrt(c) / n;\n\n  function project(x, y) {\n    var r = sqrt(c - 2 * n * sin(y)) / n;\n    return [r * sin(x *= n), r0 - r * cos(x)];\n  }\n\n  project.invert = function(x, y) {\n    var r0y = r0 - y,\n        l = atan2(x, abs(r0y)) * sign(r0y);\n    if (r0y * n < 0)\n      l -= pi * sign(x) * sign(r0y);\n    return [l / n, asin((c - (x * x + r0y * r0y) * n * n) / (2 * n))];\n  };\n\n  return project;\n}\n\nexport default function() {\n  return conicProjection(conicEqualAreaRaw)\n      .scale(155.424)\n      .center([0, 33.6442]);\n}\n", "import conicEqualArea from \"./conicEqualArea.js\";\n\nexport default function() {\n  return conicEqualArea()\n      .parallels([29.5, 45.5])\n      .scale(1070)\n      .translate([480, 250])\n      .rotate([96, 0])\n      .center([-0.6, 38.7]);\n}\n", "import {epsilon} from \"../math.js\";\nimport albers from \"./albers.js\";\nimport conicEqualArea from \"./conicEqualArea.js\";\nimport {fitExtent, fitSize, fitWidth, fitHeight} from \"./fit.js\";\n\n// The projections must have mutually exclusive clip regions on the sphere,\n// as this will avoid emitting interleaving lines and polygons.\nfunction multiplex(streams) {\n  var n = streams.length;\n  return {\n    point: function(x, y) { var i = -1; while (++i < n) streams[i].point(x, y); },\n    sphere: function() { var i = -1; while (++i < n) streams[i].sphere(); },\n    lineStart: function() { var i = -1; while (++i < n) streams[i].lineStart(); },\n    lineEnd: function() { var i = -1; while (++i < n) streams[i].lineEnd(); },\n    polygonStart: function() { var i = -1; while (++i < n) streams[i].polygonStart(); },\n    polygonEnd: function() { var i = -1; while (++i < n) streams[i].polygonEnd(); }\n  };\n}\n\n// A composite projection for the United States, configured by default for\n// 960\u00D7500. The projection also works quite well at 960\u00D7600 if you change the\n// scale to 1285 and adjust the translate accordingly. The set of standard\n// parallels for each region comes from USGS, which is published here:\n// http://egsc.usgs.gov/isb/pubs/MapProjections/projections.html#albers\nexport default function() {\n  var cache,\n      cacheStream,\n      lower48 = albers(), lower48Point,\n      alaska = conicEqualArea().rotate([154, 0]).center([-2, 58.5]).parallels([55, 65]), alaskaPoint, // EPSG:3338\n      hawaii = conicEqualArea().rotate([157, 0]).center([-3, 19.9]).parallels([8, 18]), hawaiiPoint, // ESRI:102007\n      point, pointStream = {point: function(x, y) { point = [x, y]; }};\n\n  function albersUsa(coordinates) {\n    var x = coordinates[0], y = coordinates[1];\n    return point = null,\n        (lower48Point.point(x, y), point)\n        || (alaskaPoint.point(x, y), point)\n        || (hawaiiPoint.point(x, y), point);\n  }\n\n  albersUsa.invert = function(coordinates) {\n    var k = lower48.scale(),\n        t = lower48.translate(),\n        x = (coordinates[0] - t[0]) / k,\n        y = (coordinates[1] - t[1]) / k;\n    return (y >= 0.120 && y < 0.234 && x >= -0.425 && x < -0.214 ? alaska\n        : y >= 0.166 && y < 0.234 && x >= -0.214 && x < -0.115 ? hawaii\n        : lower48).invert(coordinates);\n  };\n\n  albersUsa.stream = function(stream) {\n    return cache && cacheStream === stream ? cache : cache = multiplex([lower48.stream(cacheStream = stream), alaska.stream(stream), hawaii.stream(stream)]);\n  };\n\n  albersUsa.precision = function(_) {\n    if (!arguments.length) return lower48.precision();\n    lower48.precision(_), alaska.precision(_), hawaii.precision(_);\n    return reset();\n  };\n\n  albersUsa.scale = function(_) {\n    if (!arguments.length) return lower48.scale();\n    lower48.scale(_), alaska.scale(_ * 0.35), hawaii.scale(_);\n    return albersUsa.translate(lower48.translate());\n  };\n\n  albersUsa.translate = function(_) {\n    if (!arguments.length) return lower48.translate();\n    var k = lower48.scale(), x = +_[0], y = +_[1];\n\n    lower48Point = lower48\n        .translate(_)\n        .clipExtent([[x - 0.455 * k, y - 0.238 * k], [x + 0.455 * k, y + 0.238 * k]])\n        .stream(pointStream);\n\n    alaskaPoint = alaska\n        .translate([x - 0.307 * k, y + 0.201 * k])\n        .clipExtent([[x - 0.425 * k + epsilon, y + 0.120 * k + epsilon], [x - 0.214 * k - epsilon, y + 0.234 * k - epsilon]])\n        .stream(pointStream);\n\n    hawaiiPoint = hawaii\n        .translate([x - 0.205 * k, y + 0.212 * k])\n        .clipExtent([[x - 0.214 * k + epsilon, y + 0.166 * k + epsilon], [x - 0.115 * k - epsilon, y + 0.234 * k - epsilon]])\n        .stream(pointStream);\n\n    return reset();\n  };\n\n  albersUsa.fitExtent = function(extent, object) {\n    return fitExtent(albersUsa, extent, object);\n  };\n\n  albersUsa.fitSize = function(size, object) {\n    return fitSize(albersUsa, size, object);\n  };\n\n  albersUsa.fitWidth = function(width, object) {\n    return fitWidth(albersUsa, width, object);\n  };\n\n  albersUsa.fitHeight = function(height, object) {\n    return fitHeight(albersUsa, height, object);\n  };\n\n  function reset() {\n    cache = cacheStream = null;\n    return albersUsa;\n  }\n\n  return albersUsa.scale(1070);\n}\n", "import {asin, atan2, cos, sin, sqrt} from \"../math.js\";\n\nexport function azimuthalRaw(scale) {\n  return function(x, y) {\n    var cx = cos(x),\n        cy = cos(y),\n        k = scale(cx * cy);\n        if (k === Infinity) return [2, 0];\n    return [\n      k * cy * sin(x),\n      k * sin(y)\n    ];\n  }\n}\n\nexport function azimuthalInvert(angle) {\n  return function(x, y) {\n    var z = sqrt(x * x + y * y),\n        c = angle(z),\n        sc = sin(c),\n        cc = cos(c);\n    return [\n      atan2(x * sc, z * cc),\n      asin(z && y * sc / z)\n    ];\n  }\n}\n", "import {asin, sqrt} from \"../math.js\";\nimport {azimuthalRaw, azimuthalInvert} from \"./azimuthal.js\";\nimport projection from \"./index.js\";\n\nexport var azimuthalEqualAreaRaw = azimuthalRaw(function(cxcy) {\n  return sqrt(2 / (1 + cxcy));\n});\n\nazimuthalEqualAreaRaw.invert = azimuthalInvert(function(z) {\n  return 2 * asin(z / 2);\n});\n\nexport default function() {\n  return projection(azimuthalEqualAreaRaw)\n      .scale(124.75)\n      .clipAngle(180 - 1e-3);\n}\n", "import {acos, sin} from \"../math.js\";\nimport {azimuthalRaw, azimuthalInvert} from \"./azimuthal.js\";\nimport projection from \"./index.js\";\n\nexport var azimuthalEquidistantRaw = azimuthalRaw(function(c) {\n  return (c = acos(c)) && c / sin(c);\n});\n\nazimuthalEquidistantRaw.invert = azimuthalInvert(function(z) {\n  return z;\n});\n\nexport default function() {\n  return projection(azimuthalEquidistantRaw)\n      .scale(79.4188)\n      .clipAngle(180 - 1e-3);\n}\n", "import {atan, exp, halfPi, log, pi, tan, tau} from \"../math.js\";\nimport rotation from \"../rotation.js\";\nimport projection from \"./index.js\";\n\nexport function mercatorRaw(lambda, phi) {\n  return [lambda, log(tan((halfPi + phi) / 2))];\n}\n\nmercatorRaw.invert = function(x, y) {\n  return [x, 2 * atan(exp(y)) - halfPi];\n};\n\nexport default function() {\n  return mercatorProjection(mercatorRaw)\n      .scale(961 / tau);\n}\n\nexport function mercatorProjection(project) {\n  var m = projection(project),\n      center = m.center,\n      scale = m.scale,\n      translate = m.translate,\n      clipExtent = m.clipExtent,\n      x0 = null, y0, x1, y1; // clip extent\n\n  m.scale = function(_) {\n    return arguments.length ? (scale(_), reclip()) : scale();\n  };\n\n  m.translate = function(_) {\n    return arguments.length ? (translate(_), reclip()) : translate();\n  };\n\n  m.center = function(_) {\n    return arguments.length ? (center(_), reclip()) : center();\n  };\n\n  m.clipExtent = function(_) {\n    return arguments.length ? ((_ == null ? x0 = y0 = x1 = y1 = null : (x0 = +_[0][0], y0 = +_[0][1], x1 = +_[1][0], y1 = +_[1][1])), reclip()) : x0 == null ? null : [[x0, y0], [x1, y1]];\n  };\n\n  function reclip() {\n    var k = pi * scale(),\n        t = m(rotation(m.rotate()).invert([0, 0]));\n    return clipExtent(x0 == null\n        ? [[t[0] - k, t[1] - k], [t[0] + k, t[1] + k]] : project === mercatorRaw\n        ? [[Math.max(t[0] - k, x0), y0], [Math.min(t[0] + k, x1), y1]]\n        : [[x0, Math.max(t[1] - k, y0)], [x1, Math.min(t[1] + k, y1)]]);\n  }\n\n  return reclip();\n}\n", "import {abs, atan, atan2, cos, epsilon, halfPi, log, pi, pow, sign, sin, sqrt, tan} from \"../math.js\";\nimport {conicProjection} from \"./conic.js\";\nimport {mercatorRaw} from \"./mercator.js\";\n\nfunction tany(y) {\n  return tan((halfPi + y) / 2);\n}\n\nexport function conicConformalRaw(y0, y1) {\n  var cy0 = cos(y0),\n      n = y0 === y1 ? sin(y0) : log(cy0 / cos(y1)) / log(tany(y1) / tany(y0)),\n      f = cy0 * pow(tany(y0), n) / n;\n\n  if (!n) return mercatorRaw;\n\n  function project(x, y) {\n    if (f > 0) { if (y < -halfPi + epsilon) y = -halfPi + epsilon; }\n    else { if (y > halfPi - epsilon) y = halfPi - epsilon; }\n    var r = f / pow(tany(y), n);\n    return [r * sin(n * x), f - r * cos(n * x)];\n  }\n\n  project.invert = function(x, y) {\n    var fy = f - y, r = sign(n) * sqrt(x * x + fy * fy),\n      l = atan2(x, abs(fy)) * sign(fy);\n    if (fy * n < 0)\n      l -= pi * sign(x) * sign(fy);\n    return [l / n, 2 * atan(pow(f / r, 1 / n)) - halfPi];\n  };\n\n  return project;\n}\n\nexport default function() {\n  return conicProjection(conicConformalRaw)\n      .scale(109.5)\n      .parallels([30, 30]);\n}\n", "import projection from \"./index.js\";\n\nexport function equirectangularRaw(lambda, phi) {\n  return [lambda, phi];\n}\n\nequirectangularRaw.invert = equirectangularRaw;\n\nexport default function() {\n  return projection(equirectangularRaw)\n      .scale(152.63);\n}\n", "import {abs, atan2, cos, epsilon, pi, sign, sin, sqrt} from \"../math.js\";\nimport {conicProjection} from \"./conic.js\";\nimport {equirectangularRaw} from \"./equirectangular.js\";\n\nexport function conicEquidistantRaw(y0, y1) {\n  var cy0 = cos(y0),\n      n = y0 === y1 ? sin(y0) : (cy0 - cos(y1)) / (y1 - y0),\n      g = cy0 / n + y0;\n\n  if (abs(n) < epsilon) return equirectangularRaw;\n\n  function project(x, y) {\n    var gy = g - y, nx = n * x;\n    return [gy * sin(nx), g - gy * cos(nx)];\n  }\n\n  project.invert = function(x, y) {\n    var gy = g - y,\n        l = atan2(x, abs(gy)) * sign(gy);\n    if (gy * n < 0)\n      l -= pi * sign(x) * sign(gy);\n    return [l / n, g - sign(n) * sqrt(x * x + gy * gy)];\n  };\n\n  return project;\n}\n\nexport default function() {\n  return conicProjection(conicEquidistantRaw)\n      .scale(131.154)\n      .center([0, 13.9389]);\n}\n", "import projection from \"./index.js\";\nimport {abs, asin, cos, epsilon2, sin, sqrt} from \"../math.js\";\n\nvar A1 = 1.340264,\n    A2 = -0.081106,\n    A3 = 0.000893,\n    A4 = 0.003796,\n    M = sqrt(3) / 2,\n    iterations = 12;\n\nexport function equalEarthRaw(lambda, phi) {\n  var l = asin(M * sin(phi)), l2 = l * l, l6 = l2 * l2 * l2;\n  return [\n    lambda * cos(l) / (M * (A1 + 3 * A2 * l2 + l6 * (7 * A3 + 9 * A4 * l2))),\n    l * (A1 + A2 * l2 + l6 * (A3 + A4 * l2))\n  ];\n}\n\nequalEarthRaw.invert = function(x, y) {\n  var l = y, l2 = l * l, l6 = l2 * l2 * l2;\n  for (var i = 0, delta, fy, fpy; i < iterations; ++i) {\n    fy = l * (A1 + A2 * l2 + l6 * (A3 + A4 * l2)) - y;\n    fpy = A1 + 3 * A2 * l2 + l6 * (7 * A3 + 9 * A4 * l2);\n    l -= delta = fy / fpy, l2 = l * l, l6 = l2 * l2 * l2;\n    if (abs(delta) < epsilon2) break;\n  }\n  return [\n    M * x * (A1 + 3 * A2 * l2 + l6 * (7 * A3 + 9 * A4 * l2)) / cos(l),\n    asin(sin(l) / M)\n  ];\n};\n\nexport default function() {\n  return projection(equalEarthRaw)\n      .scale(177.158);\n}\n", "import {atan, cos, sin} from \"../math.js\";\nimport {azimuthalInvert} from \"./azimuthal.js\";\nimport projection from \"./index.js\";\n\nexport function gnomonicRaw(x, y) {\n  var cy = cos(y), k = cos(x) * cy;\n  return [cy * sin(x) / k, sin(y) / k];\n}\n\ngnomonicRaw.invert = azimuthalInvert(atan);\n\nexport default function() {\n  return projection(gnomonicRaw)\n      .scale(144.049)\n      .clipAngle(60);\n}\n", "import {asin, cos, epsilon, sin} from \"../math.js\";\nimport {azimuthalInvert} from \"./azimuthal.js\";\nimport projection from \"./index.js\";\n\nexport function orthographicRaw(x, y) {\n  return [cos(y) * sin(x), sin(y)];\n}\n\northographicRaw.invert = azimuthalInvert(asin);\n\nexport default function() {\n  return projection(orthographicRaw)\n      .scale(249.5)\n      .clipAngle(90 + epsilon);\n}\n", "import {atan, cos, sin} from \"../math.js\";\nimport {azimuthalInvert} from \"./azimuthal.js\";\nimport projection from \"./index.js\";\n\nexport function stereographicRaw(x, y) {\n  var cy = cos(y), k = 1 + cos(x) * cy;\n  return [cy * sin(x) / k, sin(y) / k];\n}\n\nstereographicRaw.invert = azimuthalInvert(function(z) {\n  return 2 * atan(z);\n});\n\nexport default function() {\n  return projection(stereographicRaw)\n      .scale(250)\n      .clipAngle(142);\n}\n", "import {atan, exp, halfPi, log, tan} from \"../math.js\";\nimport {mercatorProjection} from \"./mercator.js\";\n\nexport function transverseMercatorRaw(lambda, phi) {\n  return [log(tan((halfPi + phi) / 2)), -lambda];\n}\n\ntransverseMercatorRaw.invert = function(x, y) {\n  return [-y, 2 * atan(exp(x)) - halfPi];\n};\n\nexport default function() {\n  var m = mercatorProjection(transverseMercatorRaw),\n      center = m.center,\n      rotate = m.rotate;\n\n  m.center = function(_) {\n    return arguments.length ? center([-_[1], _[0]]) : (_ = center(), [_[1], -_[0]]);\n  };\n\n  m.rotate = function(_) {\n    return arguments.length ? rotate([_[0], _[1], _.length > 2 ? _[2] + 90 : 90]) : (_ = rotate(), [_[0], _[1], _[2] - 90]);\n  };\n\n  return rotate([0, 0, 90])\n      .scale(159.155);\n}\n", "export function initRange(domain, range) {\n  switch (arguments.length) {\n    case 0: break;\n    case 1: this.range(domain); break;\n    default: this.range(range).domain(domain); break;\n  }\n  return this;\n}\n\nexport function initInterpolator(domain, interpolator) {\n  switch (arguments.length) {\n    case 0: break;\n    case 1: {\n      if (typeof domain === \"function\") this.interpolator(domain);\n      else this.range(domain);\n      break;\n    }\n    default: {\n      this.domain(domain);\n      if (typeof interpolator === \"function\") this.interpolator(interpolator);\n      else this.range(interpolator);\n      break;\n    }\n  }\n  return this;\n}\n", "import {InternMap} from \"d3-array\";\nimport {initRange} from \"./init.js\";\n\nexport const implicit = Symbol(\"implicit\");\n\nexport default function ordinal() {\n  var index = new InternMap(),\n      domain = [],\n      range = [],\n      unknown = implicit;\n\n  function scale(d) {\n    let i = index.get(d);\n    if (i === undefined) {\n      if (unknown !== implicit) return unknown;\n      index.set(d, i = domain.push(d) - 1);\n    }\n    return range[i % range.length];\n  }\n\n  scale.domain = function(_) {\n    if (!arguments.length) return domain.slice();\n    domain = [], index = new InternMap();\n    for (const value of _) {\n      if (index.has(value)) continue;\n      index.set(value, domain.push(value) - 1);\n    }\n    return scale;\n  };\n\n  scale.range = function(_) {\n    return arguments.length ? (range = Array.from(_), scale) : range.slice();\n  };\n\n  scale.unknown = function(_) {\n    return arguments.length ? (unknown = _, scale) : unknown;\n  };\n\n  scale.copy = function() {\n    return ordinal(domain, range).unknown(unknown);\n  };\n\n  initRange.apply(scale, arguments);\n\n  return scale;\n}\n", "import {range as sequence} from \"d3-array\";\nimport {initRange} from \"./init.js\";\nimport ordinal from \"./ordinal.js\";\n\nexport default function band() {\n  var scale = ordinal().unknown(undefined),\n      domain = scale.domain,\n      ordinalRange = scale.range,\n      r0 = 0,\n      r1 = 1,\n      step,\n      bandwidth,\n      round = false,\n      paddingInner = 0,\n      paddingOuter = 0,\n      align = 0.5;\n\n  delete scale.unknown;\n\n  function rescale() {\n    var n = domain().length,\n        reverse = r1 < r0,\n        start = reverse ? r1 : r0,\n        stop = reverse ? r0 : r1;\n    step = (stop - start) / Math.max(1, n - paddingInner + paddingOuter * 2);\n    if (round) step = Math.floor(step);\n    start += (stop - start - step * (n - paddingInner)) * align;\n    bandwidth = step * (1 - paddingInner);\n    if (round) start = Math.round(start), bandwidth = Math.round(bandwidth);\n    var values = sequence(n).map(function(i) { return start + step * i; });\n    return ordinalRange(reverse ? values.reverse() : values);\n  }\n\n  scale.domain = function(_) {\n    return arguments.length ? (domain(_), rescale()) : domain();\n  };\n\n  scale.range = function(_) {\n    return arguments.length ? ([r0, r1] = _, r0 = +r0, r1 = +r1, rescale()) : [r0, r1];\n  };\n\n  scale.rangeRound = function(_) {\n    return [r0, r1] = _, r0 = +r0, r1 = +r1, round = true, rescale();\n  };\n\n  scale.bandwidth = function() {\n    return bandwidth;\n  };\n\n  scale.step = function() {\n    return step;\n  };\n\n  scale.round = function(_) {\n    return arguments.length ? (round = !!_, rescale()) : round;\n  };\n\n  scale.padding = function(_) {\n    return arguments.length ? (paddingInner = Math.min(1, paddingOuter = +_), rescale()) : paddingInner;\n  };\n\n  scale.paddingInner = function(_) {\n    return arguments.length ? (paddingInner = Math.min(1, _), rescale()) : paddingInner;\n  };\n\n  scale.paddingOuter = function(_) {\n    return arguments.length ? (paddingOuter = +_, rescale()) : paddingOuter;\n  };\n\n  scale.align = function(_) {\n    return arguments.length ? (align = Math.max(0, Math.min(1, _)), rescale()) : align;\n  };\n\n  scale.copy = function() {\n    return band(domain(), [r0, r1])\n        .round(round)\n        .paddingInner(paddingInner)\n        .paddingOuter(paddingOuter)\n        .align(align);\n  };\n\n  return initRange.apply(rescale(), arguments);\n}\n\nfunction pointish(scale) {\n  var copy = scale.copy;\n\n  scale.padding = scale.paddingOuter;\n  delete scale.paddingInner;\n  delete scale.paddingOuter;\n\n  scale.copy = function() {\n    return pointish(copy());\n  };\n\n  return scale;\n}\n\nexport function point() {\n  return pointish(band.apply(null, arguments).paddingInner(1));\n}\n", "export default function constants(x) {\n  return function() {\n    return x;\n  };\n}\n", "export default function number(x) {\n  return +x;\n}\n", "import {bisect} from \"d3-array\";\nimport {interpolate as interpolateValue, interpolateNumber, interpolateRound} from \"d3-interpolate\";\nimport constant from \"./constant.js\";\nimport number from \"./number.js\";\n\nvar unit = [0, 1];\n\nexport function identity(x) {\n  return x;\n}\n\nfunction normalize(a, b) {\n  return (b -= (a = +a))\n      ? function(x) { return (x - a) / b; }\n      : constant(isNaN(b) ? NaN : 0.5);\n}\n\nfunction clamper(a, b) {\n  var t;\n  if (a > b) t = a, a = b, b = t;\n  return function(x) { return Math.max(a, Math.min(b, x)); };\n}\n\n// normalize(a, b)(x) takes a domain value x in [a,b] and returns the corresponding parameter t in [0,1].\n// interpolate(a, b)(t) takes a parameter t in [0,1] and returns the corresponding range value x in [a,b].\nfunction bimap(domain, range, interpolate) {\n  var d0 = domain[0], d1 = domain[1], r0 = range[0], r1 = range[1];\n  if (d1 < d0) d0 = normalize(d1, d0), r0 = interpolate(r1, r0);\n  else d0 = normalize(d0, d1), r0 = interpolate(r0, r1);\n  return function(x) { return r0(d0(x)); };\n}\n\nfunction polymap(domain, range, interpolate) {\n  var j = Math.min(domain.length, range.length) - 1,\n      d = new Array(j),\n      r = new Array(j),\n      i = -1;\n\n  // Reverse descending domains.\n  if (domain[j] < domain[0]) {\n    domain = domain.slice().reverse();\n    range = range.slice().reverse();\n  }\n\n  while (++i < j) {\n    d[i] = normalize(domain[i], domain[i + 1]);\n    r[i] = interpolate(range[i], range[i + 1]);\n  }\n\n  return function(x) {\n    var i = bisect(domain, x, 1, j) - 1;\n    return r[i](d[i](x));\n  };\n}\n\nexport function copy(source, target) {\n  return target\n      .domain(source.domain())\n      .range(source.range())\n      .interpolate(source.interpolate())\n      .clamp(source.clamp())\n      .unknown(source.unknown());\n}\n\nexport function transformer() {\n  var domain = unit,\n      range = unit,\n      interpolate = interpolateValue,\n      transform,\n      untransform,\n      unknown,\n      clamp = identity,\n      piecewise,\n      output,\n      input;\n\n  function rescale() {\n    var n = Math.min(domain.length, range.length);\n    if (clamp !== identity) clamp = clamper(domain[0], domain[n - 1]);\n    piecewise = n > 2 ? polymap : bimap;\n    output = input = null;\n    return scale;\n  }\n\n  function scale(x) {\n    return x == null || isNaN(x = +x) ? unknown : (output || (output = piecewise(domain.map(transform), range, interpolate)))(transform(clamp(x)));\n  }\n\n  scale.invert = function(y) {\n    return clamp(untransform((input || (input = piecewise(range, domain.map(transform), interpolateNumber)))(y)));\n  };\n\n  scale.domain = function(_) {\n    return arguments.length ? (domain = Array.from(_, number), rescale()) : domain.slice();\n  };\n\n  scale.range = function(_) {\n    return arguments.length ? (range = Array.from(_), rescale()) : range.slice();\n  };\n\n  scale.rangeRound = function(_) {\n    return range = Array.from(_), interpolate = interpolateRound, rescale();\n  };\n\n  scale.clamp = function(_) {\n    return arguments.length ? (clamp = _ ? true : identity, rescale()) : clamp !== identity;\n  };\n\n  scale.interpolate = function(_) {\n    return arguments.length ? (interpolate = _, rescale()) : interpolate;\n  };\n\n  scale.unknown = function(_) {\n    return arguments.length ? (unknown = _, scale) : unknown;\n  };\n\n  return function(t, u) {\n    transform = t, untransform = u;\n    return rescale();\n  };\n}\n\nexport default function continuous() {\n  return transformer()(identity, identity);\n}\n", "import {tickStep} from \"d3-array\";\nimport {format, formatPrefix, formatSpecifier, precisionFixed, precisionPrefix, precisionRound} from \"d3-format\";\n\nexport default function tickFormat(start, stop, count, specifier) {\n  var step = tickStep(start, stop, count),\n      precision;\n  specifier = formatSpecifier(specifier == null ? \",f\" : specifier);\n  switch (specifier.type) {\n    case \"s\": {\n      var value = Math.max(Math.abs(start), Math.abs(stop));\n      if (specifier.precision == null && !isNaN(precision = precisionPrefix(step, value))) specifier.precision = precision;\n      return formatPrefix(specifier, value);\n    }\n    case \"\":\n    case \"e\":\n    case \"g\":\n    case \"p\":\n    case \"r\": {\n      if (specifier.precision == null && !isNaN(precision = precisionRound(step, Math.max(Math.abs(start), Math.abs(stop))))) specifier.precision = precision - (specifier.type === \"e\");\n      break;\n    }\n    case \"f\":\n    case \"%\": {\n      if (specifier.precision == null && !isNaN(precision = precisionFixed(step))) specifier.precision = precision - (specifier.type === \"%\") * 2;\n      break;\n    }\n  }\n  return format(specifier);\n}\n", "import {ticks, tickIncrement} from \"d3-array\";\nimport continuous, {copy} from \"./continuous.js\";\nimport {initRange} from \"./init.js\";\nimport tickFormat from \"./tickFormat.js\";\n\nexport function linearish(scale) {\n  var domain = scale.domain;\n\n  scale.ticks = function(count) {\n    var d = domain();\n    return ticks(d[0], d[d.length - 1], count == null ? 10 : count);\n  };\n\n  scale.tickFormat = function(count, specifier) {\n    var d = domain();\n    return tickFormat(d[0], d[d.length - 1], count == null ? 10 : count, specifier);\n  };\n\n  scale.nice = function(count) {\n    if (count == null) count = 10;\n\n    var d = domain();\n    var i0 = 0;\n    var i1 = d.length - 1;\n    var start = d[i0];\n    var stop = d[i1];\n    var prestep;\n    var step;\n    var maxIter = 10;\n\n    if (stop < start) {\n      step = start, start = stop, stop = step;\n      step = i0, i0 = i1, i1 = step;\n    }\n    \n    while (maxIter-- > 0) {\n      step = tickIncrement(start, stop, count);\n      if (step === prestep) {\n        d[i0] = start\n        d[i1] = stop\n        return domain(d);\n      } else if (step > 0) {\n        start = Math.floor(start / step) * step;\n        stop = Math.ceil(stop / step) * step;\n      } else if (step < 0) {\n        start = Math.ceil(start * step) / step;\n        stop = Math.floor(stop * step) / step;\n      } else {\n        break;\n      }\n      prestep = step;\n    }\n\n    return scale;\n  };\n\n  return scale;\n}\n\nexport default function linear() {\n  var scale = continuous();\n\n  scale.copy = function() {\n    return copy(scale, linear());\n  };\n\n  initRange.apply(scale, arguments);\n\n  return linearish(scale);\n}\n", "import {linearish} from \"./linear.js\";\nimport number from \"./number.js\";\n\nexport default function identity(domain) {\n  var unknown;\n\n  function scale(x) {\n    return x == null || isNaN(x = +x) ? unknown : x;\n  }\n\n  scale.invert = scale;\n\n  scale.domain = scale.range = function(_) {\n    return arguments.length ? (domain = Array.from(_, number), scale) : domain.slice();\n  };\n\n  scale.unknown = function(_) {\n    return arguments.length ? (unknown = _, scale) : unknown;\n  };\n\n  scale.copy = function() {\n    return identity(domain).unknown(unknown);\n  };\n\n  domain = arguments.length ? Array.from(domain, number) : [0, 1];\n\n  return linearish(scale);\n}\n", "export default function nice(domain, interval) {\n  domain = domain.slice();\n\n  var i0 = 0,\n      i1 = domain.length - 1,\n      x0 = domain[i0],\n      x1 = domain[i1],\n      t;\n\n  if (x1 < x0) {\n    t = i0, i0 = i1, i1 = t;\n    t = x0, x0 = x1, x1 = t;\n  }\n\n  domain[i0] = interval.floor(x0);\n  domain[i1] = interval.ceil(x1);\n  return domain;\n}\n", "import {ticks} from \"d3-array\";\nimport {format, formatSpecifier} from \"d3-format\";\nimport nice from \"./nice.js\";\nimport {copy, transformer} from \"./continuous.js\";\nimport {initRange} from \"./init.js\";\n\nfunction transformLog(x) {\n  return Math.log(x);\n}\n\nfunction transformExp(x) {\n  return Math.exp(x);\n}\n\nfunction transformLogn(x) {\n  return -Math.log(-x);\n}\n\nfunction transformExpn(x) {\n  return -Math.exp(-x);\n}\n\nfunction pow10(x) {\n  return isFinite(x) ? +(\"1e\" + x) : x < 0 ? 0 : x;\n}\n\nfunction powp(base) {\n  return base === 10 ? pow10\n      : base === Math.E ? Math.exp\n      : x => Math.pow(base, x);\n}\n\nfunction logp(base) {\n  return base === Math.E ? Math.log\n      : base === 10 && Math.log10\n      || base === 2 && Math.log2\n      || (base = Math.log(base), x => Math.log(x) / base);\n}\n\nfunction reflect(f) {\n  return (x, k) => -f(-x, k);\n}\n\nexport function loggish(transform) {\n  const scale = transform(transformLog, transformExp);\n  const domain = scale.domain;\n  let base = 10;\n  let logs;\n  let pows;\n\n  function rescale() {\n    logs = logp(base), pows = powp(base);\n    if (domain()[0] < 0) {\n      logs = reflect(logs), pows = reflect(pows);\n      transform(transformLogn, transformExpn);\n    } else {\n      transform(transformLog, transformExp);\n    }\n    return scale;\n  }\n\n  scale.base = function(_) {\n    return arguments.length ? (base = +_, rescale()) : base;\n  };\n\n  scale.domain = function(_) {\n    return arguments.length ? (domain(_), rescale()) : domain();\n  };\n\n  scale.ticks = count => {\n    const d = domain();\n    let u = d[0];\n    let v = d[d.length - 1];\n    const r = v < u;\n\n    if (r) ([u, v] = [v, u]);\n\n    let i = logs(u);\n    let j = logs(v);\n    let k;\n    let t;\n    const n = count == null ? 10 : +count;\n    let z = [];\n\n    if (!(base % 1) && j - i < n) {\n      i = Math.floor(i), j = Math.ceil(j);\n      if (u > 0) for (; i <= j; ++i) {\n        for (k = 1; k < base; ++k) {\n          t = i < 0 ? k / pows(-i) : k * pows(i);\n          if (t < u) continue;\n          if (t > v) break;\n          z.push(t);\n        }\n      } else for (; i <= j; ++i) {\n        for (k = base - 1; k >= 1; --k) {\n          t = i > 0 ? k / pows(-i) : k * pows(i);\n          if (t < u) continue;\n          if (t > v) break;\n          z.push(t);\n        }\n      }\n      if (z.length * 2 < n) z = ticks(u, v, n);\n    } else {\n      z = ticks(i, j, Math.min(j - i, n)).map(pows);\n    }\n    return r ? z.reverse() : z;\n  };\n\n  scale.tickFormat = (count, specifier) => {\n    if (count == null) count = 10;\n    if (specifier == null) specifier = base === 10 ? \"s\" : \",\";\n    if (typeof specifier !== \"function\") {\n      if (!(base % 1) && (specifier = formatSpecifier(specifier)).precision == null) specifier.trim = true;\n      specifier = format(specifier);\n    }\n    if (count === Infinity) return specifier;\n    const k = Math.max(1, base * count / scale.ticks().length); // TODO fast estimate?\n    return d => {\n      let i = d / pows(Math.round(logs(d)));\n      if (i * base < base - 0.5) i *= base;\n      return i <= k ? specifier(d) : \"\";\n    };\n  };\n\n  scale.nice = () => {\n    return domain(nice(domain(), {\n      floor: x => pows(Math.floor(logs(x))),\n      ceil: x => pows(Math.ceil(logs(x)))\n    }));\n  };\n\n  return scale;\n}\n\nexport default function log() {\n  const scale = loggish(transformer()).domain([1, 10]);\n  scale.copy = () => copy(scale, log()).base(scale.base());\n  initRange.apply(scale, arguments);\n  return scale;\n}\n", "import {linearish} from \"./linear.js\";\nimport {copy, transformer} from \"./continuous.js\";\nimport {initRange} from \"./init.js\";\n\nfunction transformSymlog(c) {\n  return function(x) {\n    return Math.sign(x) * Math.log1p(Math.abs(x / c));\n  };\n}\n\nfunction transformSymexp(c) {\n  return function(x) {\n    return Math.sign(x) * Math.expm1(Math.abs(x)) * c;\n  };\n}\n\nexport function symlogish(transform) {\n  var c = 1, scale = transform(transformSymlog(c), transformSymexp(c));\n\n  scale.constant = function(_) {\n    return arguments.length ? transform(transformSymlog(c = +_), transformSymexp(c)) : c;\n  };\n\n  return linearish(scale);\n}\n\nexport default function symlog() {\n  var scale = symlogish(transformer());\n\n  scale.copy = function() {\n    return copy(scale, symlog()).constant(scale.constant());\n  };\n\n  return initRange.apply(scale, arguments);\n}\n", "import {linearish} from \"./linear.js\";\nimport {copy, identity, transformer} from \"./continuous.js\";\nimport {initRange} from \"./init.js\";\n\nfunction transformPow(exponent) {\n  return function(x) {\n    return x < 0 ? -Math.pow(-x, exponent) : Math.pow(x, exponent);\n  };\n}\n\nfunction transformSqrt(x) {\n  return x < 0 ? -Math.sqrt(-x) : Math.sqrt(x);\n}\n\nfunction transformSquare(x) {\n  return x < 0 ? -x * x : x * x;\n}\n\nexport function powish(transform) {\n  var scale = transform(identity, identity),\n      exponent = 1;\n\n  function rescale() {\n    return exponent === 1 ? transform(identity, identity)\n        : exponent === 0.5 ? transform(transformSqrt, transformSquare)\n        : transform(transformPow(exponent), transformPow(1 / exponent));\n  }\n\n  scale.exponent = function(_) {\n    return arguments.length ? (exponent = +_, rescale()) : exponent;\n  };\n\n  return linearish(scale);\n}\n\nexport default function pow() {\n  var scale = powish(transformer());\n\n  scale.copy = function() {\n    return copy(scale, pow()).exponent(scale.exponent());\n  };\n\n  initRange.apply(scale, arguments);\n\n  return scale;\n}\n\nexport function sqrt() {\n  return pow.apply(null, arguments).exponent(0.5);\n}\n", "import {ascending, bisect, quantileSorted as threshold} from \"d3-array\";\nimport {initRange} from \"./init.js\";\n\nexport default function quantile() {\n  var domain = [],\n      range = [],\n      thresholds = [],\n      unknown;\n\n  function rescale() {\n    var i = 0, n = Math.max(1, range.length);\n    thresholds = new Array(n - 1);\n    while (++i < n) thresholds[i - 1] = threshold(domain, i / n);\n    return scale;\n  }\n\n  function scale(x) {\n    return x == null || isNaN(x = +x) ? unknown : range[bisect(thresholds, x)];\n  }\n\n  scale.invertExtent = function(y) {\n    var i = range.indexOf(y);\n    return i < 0 ? [NaN, NaN] : [\n      i > 0 ? thresholds[i - 1] : domain[0],\n      i < thresholds.length ? thresholds[i] : domain[domain.length - 1]\n    ];\n  };\n\n  scale.domain = function(_) {\n    if (!arguments.length) return domain.slice();\n    domain = [];\n    for (let d of _) if (d != null && !isNaN(d = +d)) domain.push(d);\n    domain.sort(ascending);\n    return rescale();\n  };\n\n  scale.range = function(_) {\n    return arguments.length ? (range = Array.from(_), rescale()) : range.slice();\n  };\n\n  scale.unknown = function(_) {\n    return arguments.length ? (unknown = _, scale) : unknown;\n  };\n\n  scale.quantiles = function() {\n    return thresholds.slice();\n  };\n\n  scale.copy = function() {\n    return quantile()\n        .domain(domain)\n        .range(range)\n        .unknown(unknown);\n  };\n\n  return initRange.apply(scale, arguments);\n}\n", "import {bisect} from \"d3-array\";\nimport {initRange} from \"./init.js\";\n\nexport default function threshold() {\n  var domain = [0.5],\n      range = [0, 1],\n      unknown,\n      n = 1;\n\n  function scale(x) {\n    return x != null && x <= x ? range[bisect(domain, x, 0, n)] : unknown;\n  }\n\n  scale.domain = function(_) {\n    return arguments.length ? (domain = Array.from(_), n = Math.min(domain.length, range.length - 1), scale) : domain.slice();\n  };\n\n  scale.range = function(_) {\n    return arguments.length ? (range = Array.from(_), n = Math.min(domain.length, range.length - 1), scale) : range.slice();\n  };\n\n  scale.invertExtent = function(y) {\n    var i = range.indexOf(y);\n    return [domain[i - 1], domain[i]];\n  };\n\n  scale.unknown = function(_) {\n    return arguments.length ? (unknown = _, scale) : unknown;\n  };\n\n  scale.copy = function() {\n    return threshold()\n        .domain(domain)\n        .range(range)\n        .unknown(unknown);\n  };\n\n  return initRange.apply(scale, arguments);\n}\n", "const t0 = new Date, t1 = new Date;\n\nexport function timeInterval(floori, offseti, count, field) {\n\n  function interval(date) {\n    return floori(date = arguments.length === 0 ? new Date : new Date(+date)), date;\n  }\n\n  interval.floor = (date) => {\n    return floori(date = new Date(+date)), date;\n  };\n\n  interval.ceil = (date) => {\n    return floori(date = new Date(date - 1)), offseti(date, 1), floori(date), date;\n  };\n\n  interval.round = (date) => {\n    const d0 = interval(date), d1 = interval.ceil(date);\n    return date - d0 < d1 - date ? d0 : d1;\n  };\n\n  interval.offset = (date, step) => {\n    return offseti(date = new Date(+date), step == null ? 1 : Math.floor(step)), date;\n  };\n\n  interval.range = (start, stop, step) => {\n    const range = [];\n    start = interval.ceil(start);\n    step = step == null ? 1 : Math.floor(step);\n    if (!(start < stop) || !(step > 0)) return range; // also handles Invalid Date\n    let previous;\n    do range.push(previous = new Date(+start)), offseti(start, step), floori(start);\n    while (previous < start && start < stop);\n    return range;\n  };\n\n  interval.filter = (test) => {\n    return timeInterval((date) => {\n      if (date >= date) while (floori(date), !test(date)) date.setTime(date - 1);\n    }, (date, step) => {\n      if (date >= date) {\n        if (step < 0) while (++step <= 0) {\n          while (offseti(date, -1), !test(date)) {} // eslint-disable-line no-empty\n        } else while (--step >= 0) {\n          while (offseti(date, +1), !test(date)) {} // eslint-disable-line no-empty\n        }\n      }\n    });\n  };\n\n  if (count) {\n    interval.count = (start, end) => {\n      t0.setTime(+start), t1.setTime(+end);\n      floori(t0), floori(t1);\n      return Math.floor(count(t0, t1));\n    };\n\n    interval.every = (step) => {\n      step = Math.floor(step);\n      return !isFinite(step) || !(step > 0) ? null\n          : !(step > 1) ? interval\n          : interval.filter(field\n              ? (d) => field(d) % step === 0\n              : (d) => interval.count(0, d) % step === 0);\n    };\n  }\n\n  return interval;\n}\n", "import {timeInterval} from \"./interval.js\";\n\nexport const millisecond = timeInterval(() => {\n  // noop\n}, (date, step) => {\n  date.setTime(+date + step);\n}, (start, end) => {\n  return end - start;\n});\n\n// An optimized implementation for this simple case.\nmillisecond.every = (k) => {\n  k = Math.floor(k);\n  if (!isFinite(k) || !(k > 0)) return null;\n  if (!(k > 1)) return millisecond;\n  return timeInterval((date) => {\n    date.setTime(Math.floor(date / k) * k);\n  }, (date, step) => {\n    date.setTime(+date + step * k);\n  }, (start, end) => {\n    return (end - start) / k;\n  });\n};\n\nexport const milliseconds = millisecond.range;\n", "import {timeInterval} from \"./interval.js\";\nimport {durationSecond} from \"./duration.js\";\n\nexport const second = timeInterval((date) => {\n  date.setTime(date - date.getMilliseconds());\n}, (date, step) => {\n  date.setTime(+date + step * durationSecond);\n}, (start, end) => {\n  return (end - start) / durationSecond;\n}, (date) => {\n  return date.getUTCSeconds();\n});\n\nexport const seconds = second.range;\n", "import {timeInterval} from \"./interval.js\";\nimport {durationMinute, durationSecond} from \"./duration.js\";\n\nexport const timeMinute = timeInterval((date) => {\n  date.setTime(date - date.getMilliseconds() - date.getSeconds() * durationSecond);\n}, (date, step) => {\n  date.setTime(+date + step * durationMinute);\n}, (start, end) => {\n  return (end - start) / durationMinute;\n}, (date) => {\n  return date.getMinutes();\n});\n\nexport const timeMinutes = timeMinute.range;\n\nexport const utcMinute = timeInterval((date) => {\n  date.setUTCSeconds(0, 0);\n}, (date, step) => {\n  date.setTime(+date + step * durationMinute);\n}, (start, end) => {\n  return (end - start) / durationMinute;\n}, (date) => {\n  return date.getUTCMinutes();\n});\n\nexport const utcMinutes = utcMinute.range;\n", "import {timeInterval} from \"./interval.js\";\nimport {durationHour, durationMinute, durationSecond} from \"./duration.js\";\n\nexport const timeHour = timeInterval((date) => {\n  date.setTime(date - date.getMilliseconds() - date.getSeconds() * durationSecond - date.getMinutes() * durationMinute);\n}, (date, step) => {\n  date.setTime(+date + step * durationHour);\n}, (start, end) => {\n  return (end - start) / durationHour;\n}, (date) => {\n  return date.getHours();\n});\n\nexport const timeHours = timeHour.range;\n\nexport const utcHour = timeInterval((date) => {\n  date.setUTCMinutes(0, 0, 0);\n}, (date, step) => {\n  date.setTime(+date + step * durationHour);\n}, (start, end) => {\n  return (end - start) / durationHour;\n}, (date) => {\n  return date.getUTCHours();\n});\n\nexport const utcHours = utcHour.range;\n", "import {timeInterval} from \"./interval.js\";\nimport {durationDay, durationMinute} from \"./duration.js\";\n\nexport const timeDay = timeInterval(\n  date => date.setHours(0, 0, 0, 0),\n  (date, step) => date.setDate(date.getDate() + step),\n  (start, end) => (end - start - (end.getTimezoneOffset() - start.getTimezoneOffset()) * durationMinute) / durationDay,\n  date => date.getDate() - 1\n);\n\nexport const timeDays = timeDay.range;\n\nexport const utcDay = timeInterval((date) => {\n  date.setUTCHours(0, 0, 0, 0);\n}, (date, step) => {\n  date.setUTCDate(date.getUTCDate() + step);\n}, (start, end) => {\n  return (end - start) / durationDay;\n}, (date) => {\n  return date.getUTCDate() - 1;\n});\n\nexport const utcDays = utcDay.range;\n\nexport const unixDay = timeInterval((date) => {\n  date.setUTCHours(0, 0, 0, 0);\n}, (date, step) => {\n  date.setUTCDate(date.getUTCDate() + step);\n}, (start, end) => {\n  return (end - start) / durationDay;\n}, (date) => {\n  return Math.floor(date / durationDay);\n});\n\nexport const unixDays = unixDay.range;\n", "import {timeInterval} from \"./interval.js\";\nimport {durationMinute, durationWeek} from \"./duration.js\";\n\nfunction timeWeekday(i) {\n  return timeInterval((date) => {\n    date.setDate(date.getDate() - (date.getDay() + 7 - i) % 7);\n    date.setHours(0, 0, 0, 0);\n  }, (date, step) => {\n    date.setDate(date.getDate() + step * 7);\n  }, (start, end) => {\n    return (end - start - (end.getTimezoneOffset() - start.getTimezoneOffset()) * durationMinute) / durationWeek;\n  });\n}\n\nexport const timeSunday = timeWeekday(0);\nexport const timeMonday = timeWeekday(1);\nexport const timeTuesday = timeWeekday(2);\nexport const timeWednesday = timeWeekday(3);\nexport const timeThursday = timeWeekday(4);\nexport const timeFriday = timeWeekday(5);\nexport const timeSaturday = timeWeekday(6);\n\nexport const timeSundays = timeSunday.range;\nexport const timeMondays = timeMonday.range;\nexport const timeTuesdays = timeTuesday.range;\nexport const timeWednesdays = timeWednesday.range;\nexport const timeThursdays = timeThursday.range;\nexport const timeFridays = timeFriday.range;\nexport const timeSaturdays = timeSaturday.range;\n\nfunction utcWeekday(i) {\n  return timeInterval((date) => {\n    date.setUTCDate(date.getUTCDate() - (date.getUTCDay() + 7 - i) % 7);\n    date.setUTCHours(0, 0, 0, 0);\n  }, (date, step) => {\n    date.setUTCDate(date.getUTCDate() + step * 7);\n  }, (start, end) => {\n    return (end - start) / durationWeek;\n  });\n}\n\nexport const utcSunday = utcWeekday(0);\nexport const utcMonday = utcWeekday(1);\nexport const utcTuesday = utcWeekday(2);\nexport const utcWednesday = utcWeekday(3);\nexport const utcThursday = utcWeekday(4);\nexport const utcFriday = utcWeekday(5);\nexport const utcSaturday = utcWeekday(6);\n\nexport const utcSundays = utcSunday.range;\nexport const utcMondays = utcMonday.range;\nexport const utcTuesdays = utcTuesday.range;\nexport const utcWednesdays = utcWednesday.range;\nexport const utcThursdays = utcThursday.range;\nexport const utcFridays = utcFriday.range;\nexport const utcSaturdays = utcSaturday.range;\n", "import {timeInterval} from \"./interval.js\";\n\nexport const timeMonth = timeInterval((date) => {\n  date.setDate(1);\n  date.setHours(0, 0, 0, 0);\n}, (date, step) => {\n  date.setMonth(date.getMonth() + step);\n}, (start, end) => {\n  return end.getMonth() - start.getMonth() + (end.getFullYear() - start.getFullYear()) * 12;\n}, (date) => {\n  return date.getMonth();\n});\n\nexport const timeMonths = timeMonth.range;\n\nexport const utcMonth = timeInterval((date) => {\n  date.setUTCDate(1);\n  date.setUTCHours(0, 0, 0, 0);\n}, (date, step) => {\n  date.setUTCMonth(date.getUTCMonth() + step);\n}, (start, end) => {\n  return end.getUTCMonth() - start.getUTCMonth() + (end.getUTCFullYear() - start.getUTCFullYear()) * 12;\n}, (date) => {\n  return date.getUTCMonth();\n});\n\nexport const utcMonths = utcMonth.range;\n", "import {timeInterval} from \"./interval.js\";\n\nexport const timeYear = timeInterval((date) => {\n  date.setMonth(0, 1);\n  date.setHours(0, 0, 0, 0);\n}, (date, step) => {\n  date.setFullYear(date.getFullYear() + step);\n}, (start, end) => {\n  return end.getFullYear() - start.getFullYear();\n}, (date) => {\n  return date.getFullYear();\n});\n\n// An optimized implementation for this simple case.\ntimeYear.every = (k) => {\n  return !isFinite(k = Math.floor(k)) || !(k > 0) ? null : timeInterval((date) => {\n    date.setFullYear(Math.floor(date.getFullYear() / k) * k);\n    date.setMonth(0, 1);\n    date.setHours(0, 0, 0, 0);\n  }, (date, step) => {\n    date.setFullYear(date.getFullYear() + step * k);\n  });\n};\n\nexport const timeYears = timeYear.range;\n\nexport const utcYear = timeInterval((date) => {\n  date.setUTCMonth(0, 1);\n  date.setUTCHours(0, 0, 0, 0);\n}, (date, step) => {\n  date.setUTCFullYear(date.getUTCFullYear() + step);\n}, (start, end) => {\n  return end.getUTCFullYear() - start.getUTCFullYear();\n}, (date) => {\n  return date.getUTCFullYear();\n});\n\n// An optimized implementation for this simple case.\nutcYear.every = (k) => {\n  return !isFinite(k = Math.floor(k)) || !(k > 0) ? null : timeInterval((date) => {\n    date.setUTCFullYear(Math.floor(date.getUTCFullYear() / k) * k);\n    date.setUTCMonth(0, 1);\n    date.setUTCHours(0, 0, 0, 0);\n  }, (date, step) => {\n    date.setUTCFullYear(date.getUTCFullYear() + step * k);\n  });\n};\n\nexport const utcYears = utcYear.range;\n", "import {bisector, tickStep} from \"d3-array\";\nimport {durationDay, durationHour, durationMinute, durationMonth, durationSecond, durationWeek, durationYear} from \"./duration.js\";\nimport {millisecond} from \"./millisecond.js\";\nimport {second} from \"./second.js\";\nimport {timeMinute, utcMinute} from \"./minute.js\";\nimport {timeHour, utcHour} from \"./hour.js\";\nimport {timeDay, unixDay} from \"./day.js\";\nimport {timeSunday, utcSunday} from \"./week.js\";\nimport {timeMonth, utcMonth} from \"./month.js\";\nimport {timeYear, utcYear} from \"./year.js\";\n\nfunction ticker(year, month, week, day, hour, minute) {\n\n  const tickIntervals = [\n    [second,  1,      durationSecond],\n    [second,  5,  5 * durationSecond],\n    [second, 15, 15 * durationSecond],\n    [second, 30, 30 * durationSecond],\n    [minute,  1,      durationMinute],\n    [minute,  5,  5 * durationMinute],\n    [minute, 15, 15 * durationMinute],\n    [minute, 30, 30 * durationMinute],\n    [  hour,  1,      durationHour  ],\n    [  hour,  3,  3 * durationHour  ],\n    [  hour,  6,  6 * durationHour  ],\n    [  hour, 12, 12 * durationHour  ],\n    [   day,  1,      durationDay   ],\n    [   day,  2,  2 * durationDay   ],\n    [  week,  1,      durationWeek  ],\n    [ month,  1,      durationMonth ],\n    [ month,  3,  3 * durationMonth ],\n    [  year,  1,      durationYear  ]\n  ];\n\n  function ticks(start, stop, count) {\n    const reverse = stop < start;\n    if (reverse) [start, stop] = [stop, start];\n    const interval = count && typeof count.range === \"function\" ? count : tickInterval(start, stop, count);\n    const ticks = interval ? interval.range(start, +stop + 1) : []; // inclusive stop\n    return reverse ? ticks.reverse() : ticks;\n  }\n\n  function tickInterval(start, stop, count) {\n    const target = Math.abs(stop - start) / count;\n    const i = bisector(([,, step]) => step).right(tickIntervals, target);\n    if (i === tickIntervals.length) return year.every(tickStep(start / durationYear, stop / durationYear, count));\n    if (i === 0) return millisecond.every(Math.max(tickStep(start, stop, count), 1));\n    const [t, step] = tickIntervals[target / tickIntervals[i - 1][2] < tickIntervals[i][2] / target ? i - 1 : i];\n    return t.every(step);\n  }\n\n  return [ticks, tickInterval];\n}\n\nconst [utcTicks, utcTickInterval] = ticker(utcYear, utcMonth, utcSunday, unixDay, utcHour, utcMinute);\nconst [timeTicks, timeTickInterval] = ticker(timeYear, timeMonth, timeSunday, timeDay, timeHour, timeMinute);\n\nexport {utcTicks, utcTickInterval, timeTicks, timeTickInterval};\n", "import {\n  timeDay,\n  timeSunday,\n  timeMonday,\n  timeThursday,\n  timeYear,\n  utcDay,\n  utcSunday,\n  utcMonday,\n  utcThursday,\n  utcYear\n} from \"d3-time\";\n\nfunction localDate(d) {\n  if (0 <= d.y && d.y < 100) {\n    var date = new Date(-1, d.m, d.d, d.H, d.M, d.S, d.L);\n    date.setFullYear(d.y);\n    return date;\n  }\n  return new Date(d.y, d.m, d.d, d.H, d.M, d.S, d.L);\n}\n\nfunction utcDate(d) {\n  if (0 <= d.y && d.y < 100) {\n    var date = new Date(Date.UTC(-1, d.m, d.d, d.H, d.M, d.S, d.L));\n    date.setUTCFullYear(d.y);\n    return date;\n  }\n  return new Date(Date.UTC(d.y, d.m, d.d, d.H, d.M, d.S, d.L));\n}\n\nfunction newDate(y, m, d) {\n  return {y: y, m: m, d: d, H: 0, M: 0, S: 0, L: 0};\n}\n\nexport default function formatLocale(locale) {\n  var locale_dateTime = locale.dateTime,\n      locale_date = locale.date,\n      locale_time = locale.time,\n      locale_periods = locale.periods,\n      locale_weekdays = locale.days,\n      locale_shortWeekdays = locale.shortDays,\n      locale_months = locale.months,\n      locale_shortMonths = locale.shortMonths;\n\n  var periodRe = formatRe(locale_periods),\n      periodLookup = formatLookup(locale_periods),\n      weekdayRe = formatRe(locale_weekdays),\n      weekdayLookup = formatLookup(locale_weekdays),\n      shortWeekdayRe = formatRe(locale_shortWeekdays),\n      shortWeekdayLookup = formatLookup(locale_shortWeekdays),\n      monthRe = formatRe(locale_months),\n      monthLookup = formatLookup(locale_months),\n      shortMonthRe = formatRe(locale_shortMonths),\n      shortMonthLookup = formatLookup(locale_shortMonths);\n\n  var formats = {\n    \"a\": formatShortWeekday,\n    \"A\": formatWeekday,\n    \"b\": formatShortMonth,\n    \"B\": formatMonth,\n    \"c\": null,\n    \"d\": formatDayOfMonth,\n    \"e\": formatDayOfMonth,\n    \"f\": formatMicroseconds,\n    \"g\": formatYearISO,\n    \"G\": formatFullYearISO,\n    \"H\": formatHour24,\n    \"I\": formatHour12,\n    \"j\": formatDayOfYear,\n    \"L\": formatMilliseconds,\n    \"m\": formatMonthNumber,\n    \"M\": formatMinutes,\n    \"p\": formatPeriod,\n    \"q\": formatQuarter,\n    \"Q\": formatUnixTimestamp,\n    \"s\": formatUnixTimestampSeconds,\n    \"S\": formatSeconds,\n    \"u\": formatWeekdayNumberMonday,\n    \"U\": formatWeekNumberSunday,\n    \"V\": formatWeekNumberISO,\n    \"w\": formatWeekdayNumberSunday,\n    \"W\": formatWeekNumberMonday,\n    \"x\": null,\n    \"X\": null,\n    \"y\": formatYear,\n    \"Y\": formatFullYear,\n    \"Z\": formatZone,\n    \"%\": formatLiteralPercent\n  };\n\n  var utcFormats = {\n    \"a\": formatUTCShortWeekday,\n    \"A\": formatUTCWeekday,\n    \"b\": formatUTCShortMonth,\n    \"B\": formatUTCMonth,\n    \"c\": null,\n    \"d\": formatUTCDayOfMonth,\n    \"e\": formatUTCDayOfMonth,\n    \"f\": formatUTCMicroseconds,\n    \"g\": formatUTCYearISO,\n    \"G\": formatUTCFullYearISO,\n    \"H\": formatUTCHour24,\n    \"I\": formatUTCHour12,\n    \"j\": formatUTCDayOfYear,\n    \"L\": formatUTCMilliseconds,\n    \"m\": formatUTCMonthNumber,\n    \"M\": formatUTCMinutes,\n    \"p\": formatUTCPeriod,\n    \"q\": formatUTCQuarter,\n    \"Q\": formatUnixTimestamp,\n    \"s\": formatUnixTimestampSeconds,\n    \"S\": formatUTCSeconds,\n    \"u\": formatUTCWeekdayNumberMonday,\n    \"U\": formatUTCWeekNumberSunday,\n    \"V\": formatUTCWeekNumberISO,\n    \"w\": formatUTCWeekdayNumberSunday,\n    \"W\": formatUTCWeekNumberMonday,\n    \"x\": null,\n    \"X\": null,\n    \"y\": formatUTCYear,\n    \"Y\": formatUTCFullYear,\n    \"Z\": formatUTCZone,\n    \"%\": formatLiteralPercent\n  };\n\n  var parses = {\n    \"a\": parseShortWeekday,\n    \"A\": parseWeekday,\n    \"b\": parseShortMonth,\n    \"B\": parseMonth,\n    \"c\": parseLocaleDateTime,\n    \"d\": parseDayOfMonth,\n    \"e\": parseDayOfMonth,\n    \"f\": parseMicroseconds,\n    \"g\": parseYear,\n    \"G\": parseFullYear,\n    \"H\": parseHour24,\n    \"I\": parseHour24,\n    \"j\": parseDayOfYear,\n    \"L\": parseMilliseconds,\n    \"m\": parseMonthNumber,\n    \"M\": parseMinutes,\n    \"p\": parsePeriod,\n    \"q\": parseQuarter,\n    \"Q\": parseUnixTimestamp,\n    \"s\": parseUnixTimestampSeconds,\n    \"S\": parseSeconds,\n    \"u\": parseWeekdayNumberMonday,\n    \"U\": parseWeekNumberSunday,\n    \"V\": parseWeekNumberISO,\n    \"w\": parseWeekdayNumberSunday,\n    \"W\": parseWeekNumberMonday,\n    \"x\": parseLocaleDate,\n    \"X\": parseLocaleTime,\n    \"y\": parseYear,\n    \"Y\": parseFullYear,\n    \"Z\": parseZone,\n    \"%\": parseLiteralPercent\n  };\n\n  // These recursive directive definitions must be deferred.\n  formats.x = newFormat(locale_date, formats);\n  formats.X = newFormat(locale_time, formats);\n  formats.c = newFormat(locale_dateTime, formats);\n  utcFormats.x = newFormat(locale_date, utcFormats);\n  utcFormats.X = newFormat(locale_time, utcFormats);\n  utcFormats.c = newFormat(locale_dateTime, utcFormats);\n\n  function newFormat(specifier, formats) {\n    return function(date) {\n      var string = [],\n          i = -1,\n          j = 0,\n          n = specifier.length,\n          c,\n          pad,\n          format;\n\n      if (!(date instanceof Date)) date = new Date(+date);\n\n      while (++i < n) {\n        if (specifier.charCodeAt(i) === 37) {\n          string.push(specifier.slice(j, i));\n          if ((pad = pads[c = specifier.charAt(++i)]) != null) c = specifier.charAt(++i);\n          else pad = c === \"e\" ? \" \" : \"0\";\n          if (format = formats[c]) c = format(date, pad);\n          string.push(c);\n          j = i + 1;\n        }\n      }\n\n      string.push(specifier.slice(j, i));\n      return string.join(\"\");\n    };\n  }\n\n  function newParse(specifier, Z) {\n    return function(string) {\n      var d = newDate(1900, undefined, 1),\n          i = parseSpecifier(d, specifier, string += \"\", 0),\n          week, day;\n      if (i != string.length) return null;\n\n      // If a UNIX timestamp is specified, return it.\n      if (\"Q\" in d) return new Date(d.Q);\n      if (\"s\" in d) return new Date(d.s * 1000 + (\"L\" in d ? d.L : 0));\n\n      // If this is utcParse, never use the local timezone.\n      if (Z && !(\"Z\" in d)) d.Z = 0;\n\n      // The am-pm flag is 0 for AM, and 1 for PM.\n      if (\"p\" in d) d.H = d.H % 12 + d.p * 12;\n\n      // If the month was not specified, inherit from the quarter.\n      if (d.m === undefined) d.m = \"q\" in d ? d.q : 0;\n\n      // Convert day-of-week and week-of-year to day-of-year.\n      if (\"V\" in d) {\n        if (d.V < 1 || d.V > 53) return null;\n        if (!(\"w\" in d)) d.w = 1;\n        if (\"Z\" in d) {\n          week = utcDate(newDate(d.y, 0, 1)), day = week.getUTCDay();\n          week = day > 4 || day === 0 ? utcMonday.ceil(week) : utcMonday(week);\n          week = utcDay.offset(week, (d.V - 1) * 7);\n          d.y = week.getUTCFullYear();\n          d.m = week.getUTCMonth();\n          d.d = week.getUTCDate() + (d.w + 6) % 7;\n        } else {\n          week = localDate(newDate(d.y, 0, 1)), day = week.getDay();\n          week = day > 4 || day === 0 ? timeMonday.ceil(week) : timeMonday(week);\n          week = timeDay.offset(week, (d.V - 1) * 7);\n          d.y = week.getFullYear();\n          d.m = week.getMonth();\n          d.d = week.getDate() + (d.w + 6) % 7;\n        }\n      } else if (\"W\" in d || \"U\" in d) {\n        if (!(\"w\" in d)) d.w = \"u\" in d ? d.u % 7 : \"W\" in d ? 1 : 0;\n        day = \"Z\" in d ? utcDate(newDate(d.y, 0, 1)).getUTCDay() : localDate(newDate(d.y, 0, 1)).getDay();\n        d.m = 0;\n        d.d = \"W\" in d ? (d.w + 6) % 7 + d.W * 7 - (day + 5) % 7 : d.w + d.U * 7 - (day + 6) % 7;\n      }\n\n      // If a time zone is specified, all fields are interpreted as UTC and then\n      // offset according to the specified time zone.\n      if (\"Z\" in d) {\n        d.H += d.Z / 100 | 0;\n        d.M += d.Z % 100;\n        return utcDate(d);\n      }\n\n      // Otherwise, all fields are in local time.\n      return localDate(d);\n    };\n  }\n\n  function parseSpecifier(d, specifier, string, j) {\n    var i = 0,\n        n = specifier.length,\n        m = string.length,\n        c,\n        parse;\n\n    while (i < n) {\n      if (j >= m) return -1;\n      c = specifier.charCodeAt(i++);\n      if (c === 37) {\n        c = specifier.charAt(i++);\n        parse = parses[c in pads ? specifier.charAt(i++) : c];\n        if (!parse || ((j = parse(d, string, j)) < 0)) return -1;\n      } else if (c != string.charCodeAt(j++)) {\n        return -1;\n      }\n    }\n\n    return j;\n  }\n\n  function parsePeriod(d, string, i) {\n    var n = periodRe.exec(string.slice(i));\n    return n ? (d.p = periodLookup.get(n[0].toLowerCase()), i + n[0].length) : -1;\n  }\n\n  function parseShortWeekday(d, string, i) {\n    var n = shortWeekdayRe.exec(string.slice(i));\n    return n ? (d.w = shortWeekdayLookup.get(n[0].toLowerCase()), i + n[0].length) : -1;\n  }\n\n  function parseWeekday(d, string, i) {\n    var n = weekdayRe.exec(string.slice(i));\n    return n ? (d.w = weekdayLookup.get(n[0].toLowerCase()), i + n[0].length) : -1;\n  }\n\n  function parseShortMonth(d, string, i) {\n    var n = shortMonthRe.exec(string.slice(i));\n    return n ? (d.m = shortMonthLookup.get(n[0].toLowerCase()), i + n[0].length) : -1;\n  }\n\n  function parseMonth(d, string, i) {\n    var n = monthRe.exec(string.slice(i));\n    return n ? (d.m = monthLookup.get(n[0].toLowerCase()), i + n[0].length) : -1;\n  }\n\n  function parseLocaleDateTime(d, string, i) {\n    return parseSpecifier(d, locale_dateTime, string, i);\n  }\n\n  function parseLocaleDate(d, string, i) {\n    return parseSpecifier(d, locale_date, string, i);\n  }\n\n  function parseLocaleTime(d, string, i) {\n    return parseSpecifier(d, locale_time, string, i);\n  }\n\n  function formatShortWeekday(d) {\n    return locale_shortWeekdays[d.getDay()];\n  }\n\n  function formatWeekday(d) {\n    return locale_weekdays[d.getDay()];\n  }\n\n  function formatShortMonth(d) {\n    return locale_shortMonths[d.getMonth()];\n  }\n\n  function formatMonth(d) {\n    return locale_months[d.getMonth()];\n  }\n\n  function formatPeriod(d) {\n    return locale_periods[+(d.getHours() >= 12)];\n  }\n\n  function formatQuarter(d) {\n    return 1 + ~~(d.getMonth() / 3);\n  }\n\n  function formatUTCShortWeekday(d) {\n    return locale_shortWeekdays[d.getUTCDay()];\n  }\n\n  function formatUTCWeekday(d) {\n    return locale_weekdays[d.getUTCDay()];\n  }\n\n  function formatUTCShortMonth(d) {\n    return locale_shortMonths[d.getUTCMonth()];\n  }\n\n  function formatUTCMonth(d) {\n    return locale_months[d.getUTCMonth()];\n  }\n\n  function formatUTCPeriod(d) {\n    return locale_periods[+(d.getUTCHours() >= 12)];\n  }\n\n  function formatUTCQuarter(d) {\n    return 1 + ~~(d.getUTCMonth() / 3);\n  }\n\n  return {\n    format: function(specifier) {\n      var f = newFormat(specifier += \"\", formats);\n      f.toString = function() { return specifier; };\n      return f;\n    },\n    parse: function(specifier) {\n      var p = newParse(specifier += \"\", false);\n      p.toString = function() { return specifier; };\n      return p;\n    },\n    utcFormat: function(specifier) {\n      var f = newFormat(specifier += \"\", utcFormats);\n      f.toString = function() { return specifier; };\n      return f;\n    },\n    utcParse: function(specifier) {\n      var p = newParse(specifier += \"\", true);\n      p.toString = function() { return specifier; };\n      return p;\n    }\n  };\n}\n\nvar pads = {\"-\": \"\", \"_\": \" \", \"0\": \"0\"},\n    numberRe = /^\\s*\\d+/, // note: ignores next directive\n    percentRe = /^%/,\n    requoteRe = /[\\\\^$*+?|[\\]().{}]/g;\n\nfunction pad(value, fill, width) {\n  var sign = value < 0 ? \"-\" : \"\",\n      string = (sign ? -value : value) + \"\",\n      length = string.length;\n  return sign + (length < width ? new Array(width - length + 1).join(fill) + string : string);\n}\n\nfunction requote(s) {\n  return s.replace(requoteRe, \"\\\\$&\");\n}\n\nfunction formatRe(names) {\n  return new RegExp(\"^(?:\" + names.map(requote).join(\"|\") + \")\", \"i\");\n}\n\nfunction formatLookup(names) {\n  return new Map(names.map((name, i) => [name.toLowerCase(), i]));\n}\n\nfunction parseWeekdayNumberSunday(d, string, i) {\n  var n = numberRe.exec(string.slice(i, i + 1));\n  return n ? (d.w = +n[0], i + n[0].length) : -1;\n}\n\nfunction parseWeekdayNumberMonday(d, string, i) {\n  var n = numberRe.exec(string.slice(i, i + 1));\n  return n ? (d.u = +n[0], i + n[0].length) : -1;\n}\n\nfunction parseWeekNumberSunday(d, string, i) {\n  var n = numberRe.exec(string.slice(i, i + 2));\n  return n ? (d.U = +n[0], i + n[0].length) : -1;\n}\n\nfunction parseWeekNumberISO(d, string, i) {\n  var n = numberRe.exec(string.slice(i, i + 2));\n  return n ? (d.V = +n[0], i + n[0].length) : -1;\n}\n\nfunction parseWeekNumberMonday(d, string, i) {\n  var n = numberRe.exec(string.slice(i, i + 2));\n  return n ? (d.W = +n[0], i + n[0].length) : -1;\n}\n\nfunction parseFullYear(d, string, i) {\n  var n = numberRe.exec(string.slice(i, i + 4));\n  return n ? (d.y = +n[0], i + n[0].length) : -1;\n}\n\nfunction parseYear(d, string, i) {\n  var n = numberRe.exec(string.slice(i, i + 2));\n  return n ? (d.y = +n[0] + (+n[0] > 68 ? 1900 : 2000), i + n[0].length) : -1;\n}\n\nfunction parseZone(d, string, i) {\n  var n = /^(Z)|([+-]\\d\\d)(?::?(\\d\\d))?/.exec(string.slice(i, i + 6));\n  return n ? (d.Z = n[1] ? 0 : -(n[2] + (n[3] || \"00\")), i + n[0].length) : -1;\n}\n\nfunction parseQuarter(d, string, i) {\n  var n = numberRe.exec(string.slice(i, i + 1));\n  return n ? (d.q = n[0] * 3 - 3, i + n[0].length) : -1;\n}\n\nfunction parseMonthNumber(d, string, i) {\n  var n = numberRe.exec(string.slice(i, i + 2));\n  return n ? (d.m = n[0] - 1, i + n[0].length) : -1;\n}\n\nfunction parseDayOfMonth(d, string, i) {\n  var n = numberRe.exec(string.slice(i, i + 2));\n  return n ? (d.d = +n[0], i + n[0].length) : -1;\n}\n\nfunction parseDayOfYear(d, string, i) {\n  var n = numberRe.exec(string.slice(i, i + 3));\n  return n ? (d.m = 0, d.d = +n[0], i + n[0].length) : -1;\n}\n\nfunction parseHour24(d, string, i) {\n  var n = numberRe.exec(string.slice(i, i + 2));\n  return n ? (d.H = +n[0], i + n[0].length) : -1;\n}\n\nfunction parseMinutes(d, string, i) {\n  var n = numberRe.exec(string.slice(i, i + 2));\n  return n ? (d.M = +n[0], i + n[0].length) : -1;\n}\n\nfunction parseSeconds(d, string, i) {\n  var n = numberRe.exec(string.slice(i, i + 2));\n  return n ? (d.S = +n[0], i + n[0].length) : -1;\n}\n\nfunction parseMilliseconds(d, string, i) {\n  var n = numberRe.exec(string.slice(i, i + 3));\n  return n ? (d.L = +n[0], i + n[0].length) : -1;\n}\n\nfunction parseMicroseconds(d, string, i) {\n  var n = numberRe.exec(string.slice(i, i + 6));\n  return n ? (d.L = Math.floor(n[0] / 1000), i + n[0].length) : -1;\n}\n\nfunction parseLiteralPercent(d, string, i) {\n  var n = percentRe.exec(string.slice(i, i + 1));\n  return n ? i + n[0].length : -1;\n}\n\nfunction parseUnixTimestamp(d, string, i) {\n  var n = numberRe.exec(string.slice(i));\n  return n ? (d.Q = +n[0], i + n[0].length) : -1;\n}\n\nfunction parseUnixTimestampSeconds(d, string, i) {\n  var n = numberRe.exec(string.slice(i));\n  return n ? (d.s = +n[0], i + n[0].length) : -1;\n}\n\nfunction formatDayOfMonth(d, p) {\n  return pad(d.getDate(), p, 2);\n}\n\nfunction formatHour24(d, p) {\n  return pad(d.getHours(), p, 2);\n}\n\nfunction formatHour12(d, p) {\n  return pad(d.getHours() % 12 || 12, p, 2);\n}\n\nfunction formatDayOfYear(d, p) {\n  return pad(1 + timeDay.count(timeYear(d), d), p, 3);\n}\n\nfunction formatMilliseconds(d, p) {\n  return pad(d.getMilliseconds(), p, 3);\n}\n\nfunction formatMicroseconds(d, p) {\n  return formatMilliseconds(d, p) + \"000\";\n}\n\nfunction formatMonthNumber(d, p) {\n  return pad(d.getMonth() + 1, p, 2);\n}\n\nfunction formatMinutes(d, p) {\n  return pad(d.getMinutes(), p, 2);\n}\n\nfunction formatSeconds(d, p) {\n  return pad(d.getSeconds(), p, 2);\n}\n\nfunction formatWeekdayNumberMonday(d) {\n  var day = d.getDay();\n  return day === 0 ? 7 : day;\n}\n\nfunction formatWeekNumberSunday(d, p) {\n  return pad(timeSunday.count(timeYear(d) - 1, d), p, 2);\n}\n\nfunction dISO(d) {\n  var day = d.getDay();\n  return (day >= 4 || day === 0) ? timeThursday(d) : timeThursday.ceil(d);\n}\n\nfunction formatWeekNumberISO(d, p) {\n  d = dISO(d);\n  return pad(timeThursday.count(timeYear(d), d) + (timeYear(d).getDay() === 4), p, 2);\n}\n\nfunction formatWeekdayNumberSunday(d) {\n  return d.getDay();\n}\n\nfunction formatWeekNumberMonday(d, p) {\n  return pad(timeMonday.count(timeYear(d) - 1, d), p, 2);\n}\n\nfunction formatYear(d, p) {\n  return pad(d.getFullYear() % 100, p, 2);\n}\n\nfunction formatYearISO(d, p) {\n  d = dISO(d);\n  return pad(d.getFullYear() % 100, p, 2);\n}\n\nfunction formatFullYear(d, p) {\n  return pad(d.getFullYear() % 10000, p, 4);\n}\n\nfunction formatFullYearISO(d, p) {\n  var day = d.getDay();\n  d = (day >= 4 || day === 0) ? timeThursday(d) : timeThursday.ceil(d);\n  return pad(d.getFullYear() % 10000, p, 4);\n}\n\nfunction formatZone(d) {\n  var z = d.getTimezoneOffset();\n  return (z > 0 ? \"-\" : (z *= -1, \"+\"))\n      + pad(z / 60 | 0, \"0\", 2)\n      + pad(z % 60, \"0\", 2);\n}\n\nfunction formatUTCDayOfMonth(d, p) {\n  return pad(d.getUTCDate(), p, 2);\n}\n\nfunction formatUTCHour24(d, p) {\n  return pad(d.getUTCHours(), p, 2);\n}\n\nfunction formatUTCHour12(d, p) {\n  return pad(d.getUTCHours() % 12 || 12, p, 2);\n}\n\nfunction formatUTCDayOfYear(d, p) {\n  return pad(1 + utcDay.count(utcYear(d), d), p, 3);\n}\n\nfunction formatUTCMilliseconds(d, p) {\n  return pad(d.getUTCMilliseconds(), p, 3);\n}\n\nfunction formatUTCMicroseconds(d, p) {\n  return formatUTCMilliseconds(d, p) + \"000\";\n}\n\nfunction formatUTCMonthNumber(d, p) {\n  return pad(d.getUTCMonth() + 1, p, 2);\n}\n\nfunction formatUTCMinutes(d, p) {\n  return pad(d.getUTCMinutes(), p, 2);\n}\n\nfunction formatUTCSeconds(d, p) {\n  return pad(d.getUTCSeconds(), p, 2);\n}\n\nfunction formatUTCWeekdayNumberMonday(d) {\n  var dow = d.getUTCDay();\n  return dow === 0 ? 7 : dow;\n}\n\nfunction formatUTCWeekNumberSunday(d, p) {\n  return pad(utcSunday.count(utcYear(d) - 1, d), p, 2);\n}\n\nfunction UTCdISO(d) {\n  var day = d.getUTCDay();\n  return (day >= 4 || day === 0) ? utcThursday(d) : utcThursday.ceil(d);\n}\n\nfunction formatUTCWeekNumberISO(d, p) {\n  d = UTCdISO(d);\n  return pad(utcThursday.count(utcYear(d), d) + (utcYear(d).getUTCDay() === 4), p, 2);\n}\n\nfunction formatUTCWeekdayNumberSunday(d) {\n  return d.getUTCDay();\n}\n\nfunction formatUTCWeekNumberMonday(d, p) {\n  return pad(utcMonday.count(utcYear(d) - 1, d), p, 2);\n}\n\nfunction formatUTCYear(d, p) {\n  return pad(d.getUTCFullYear() % 100, p, 2);\n}\n\nfunction formatUTCYearISO(d, p) {\n  d = UTCdISO(d);\n  return pad(d.getUTCFullYear() % 100, p, 2);\n}\n\nfunction formatUTCFullYear(d, p) {\n  return pad(d.getUTCFullYear() % 10000, p, 4);\n}\n\nfunction formatUTCFullYearISO(d, p) {\n  var day = d.getUTCDay();\n  d = (day >= 4 || day === 0) ? utcThursday(d) : utcThursday.ceil(d);\n  return pad(d.getUTCFullYear() % 10000, p, 4);\n}\n\nfunction formatUTCZone() {\n  return \"+0000\";\n}\n\nfunction formatLiteralPercent() {\n  return \"%\";\n}\n\nfunction formatUnixTimestamp(d) {\n  return +d;\n}\n\nfunction formatUnixTimestampSeconds(d) {\n  return Math.floor(+d / 1000);\n}\n", "import formatLocale from \"./locale.js\";\n\nvar locale;\nexport var timeFormat;\nexport var timeParse;\nexport var utcFormat;\nexport var utcParse;\n\ndefaultLocale({\n  dateTime: \"%x, %X\",\n  date: \"%-m/%-d/%Y\",\n  time: \"%-I:%M:%S %p\",\n  periods: [\"AM\", \"PM\"],\n  days: [\"Sunday\", \"Monday\", \"Tuesday\", \"Wednesday\", \"Thursday\", \"Friday\", \"Saturday\"],\n  shortDays: [\"Sun\", \"Mon\", \"Tue\", \"Wed\", \"Thu\", \"Fri\", \"Sat\"],\n  months: [\"January\", \"February\", \"March\", \"April\", \"May\", \"June\", \"July\", \"August\", \"September\", \"October\", \"November\", \"December\"],\n  shortMonths: [\"Jan\", \"Feb\", \"Mar\", \"Apr\", \"May\", \"Jun\", \"Jul\", \"Aug\", \"Sep\", \"Oct\", \"Nov\", \"Dec\"]\n});\n\nexport default function defaultLocale(definition) {\n  locale = formatLocale(definition);\n  timeFormat = locale.format;\n  timeParse = locale.parse;\n  utcFormat = locale.utcFormat;\n  utcParse = locale.utcParse;\n  return locale;\n}\n", "import {timeYear, timeMonth, timeWeek, timeDay, timeHour, timeMinute, timeSecond, timeTicks, timeTickInterval} from \"d3-time\";\nimport {timeFormat} from \"d3-time-format\";\nimport continuous, {copy} from \"./continuous.js\";\nimport {initRange} from \"./init.js\";\nimport nice from \"./nice.js\";\n\nfunction date(t) {\n  return new Date(t);\n}\n\nfunction number(t) {\n  return t instanceof Date ? +t : +new Date(+t);\n}\n\nexport function calendar(ticks, tickInterval, year, month, week, day, hour, minute, second, format) {\n  var scale = continuous(),\n      invert = scale.invert,\n      domain = scale.domain;\n\n  var formatMillisecond = format(\".%L\"),\n      formatSecond = format(\":%S\"),\n      formatMinute = format(\"%I:%M\"),\n      formatHour = format(\"%I %p\"),\n      formatDay = format(\"%a %d\"),\n      formatWeek = format(\"%b %d\"),\n      formatMonth = format(\"%B\"),\n      formatYear = format(\"%Y\");\n\n  function tickFormat(date) {\n    return (second(date) < date ? formatMillisecond\n        : minute(date) < date ? formatSecond\n        : hour(date) < date ? formatMinute\n        : day(date) < date ? formatHour\n        : month(date) < date ? (week(date) < date ? formatDay : formatWeek)\n        : year(date) < date ? formatMonth\n        : formatYear)(date);\n  }\n\n  scale.invert = function(y) {\n    return new Date(invert(y));\n  };\n\n  scale.domain = function(_) {\n    return arguments.length ? domain(Array.from(_, number)) : domain().map(date);\n  };\n\n  scale.ticks = function(interval) {\n    var d = domain();\n    return ticks(d[0], d[d.length - 1], interval == null ? 10 : interval);\n  };\n\n  scale.tickFormat = function(count, specifier) {\n    return specifier == null ? tickFormat : format(specifier);\n  };\n\n  scale.nice = function(interval) {\n    var d = domain();\n    if (!interval || typeof interval.range !== \"function\") interval = tickInterval(d[0], d[d.length - 1], interval == null ? 10 : interval);\n    return interval ? domain(nice(d, interval)) : scale;\n  };\n\n  scale.copy = function() {\n    return copy(scale, calendar(ticks, tickInterval, year, month, week, day, hour, minute, second, format));\n  };\n\n  return scale;\n}\n\nexport default function time() {\n  return initRange.apply(calendar(timeTicks, timeTickInterval, timeYear, timeMonth, timeWeek, timeDay, timeHour, timeMinute, timeSecond, timeFormat).domain([new Date(2000, 0, 1), new Date(2000, 0, 2)]), arguments);\n}\n", "import {utcYear, utcMonth, utcWeek, utcDay, utcHour, utcMinute, utcSecond, utcTicks, utcTickInterval} from \"d3-time\";\nimport {utcFormat} from \"d3-time-format\";\nimport {calendar} from \"./time.js\";\nimport {initRange} from \"./init.js\";\n\nexport default function utcTime() {\n  return initRange.apply(calendar(utcTicks, utcTickInterval, utcYear, utcMonth, utcWeek, utcDay, utcHour, utcMinute, utcSecond, utcFormat).domain([Date.UTC(2000, 0, 1), Date.UTC(2000, 0, 2)]), arguments);\n}\n", "import {interpolate, interpolateRound} from \"d3-interpolate\";\nimport {identity} from \"./continuous.js\";\nimport {initInterpolator} from \"./init.js\";\nimport {linearish} from \"./linear.js\";\nimport {loggish} from \"./log.js\";\nimport {symlogish} from \"./symlog.js\";\nimport {powish} from \"./pow.js\";\n\nfunction transformer() {\n  var x0 = 0,\n      x1 = 1,\n      t0,\n      t1,\n      k10,\n      transform,\n      interpolator = identity,\n      clamp = false,\n      unknown;\n\n  function scale(x) {\n    return x == null || isNaN(x = +x) ? unknown : interpolator(k10 === 0 ? 0.5 : (x = (transform(x) - t0) * k10, clamp ? Math.max(0, Math.min(1, x)) : x));\n  }\n\n  scale.domain = function(_) {\n    return arguments.length ? ([x0, x1] = _, t0 = transform(x0 = +x0), t1 = transform(x1 = +x1), k10 = t0 === t1 ? 0 : 1 / (t1 - t0), scale) : [x0, x1];\n  };\n\n  scale.clamp = function(_) {\n    return arguments.length ? (clamp = !!_, scale) : clamp;\n  };\n\n  scale.interpolator = function(_) {\n    return arguments.length ? (interpolator = _, scale) : interpolator;\n  };\n\n  function range(interpolate) {\n    return function(_) {\n      var r0, r1;\n      return arguments.length ? ([r0, r1] = _, interpolator = interpolate(r0, r1), scale) : [interpolator(0), interpolator(1)];\n    };\n  }\n\n  scale.range = range(interpolate);\n\n  scale.rangeRound = range(interpolateRound);\n\n  scale.unknown = function(_) {\n    return arguments.length ? (unknown = _, scale) : unknown;\n  };\n\n  return function(t) {\n    transform = t, t0 = t(x0), t1 = t(x1), k10 = t0 === t1 ? 0 : 1 / (t1 - t0);\n    return scale;\n  };\n}\n\nexport function copy(source, target) {\n  return target\n      .domain(source.domain())\n      .interpolator(source.interpolator())\n      .clamp(source.clamp())\n      .unknown(source.unknown());\n}\n\nexport default function sequential() {\n  var scale = linearish(transformer()(identity));\n\n  scale.copy = function() {\n    return copy(scale, sequential());\n  };\n\n  return initInterpolator.apply(scale, arguments);\n}\n\nexport function sequentialLog() {\n  var scale = loggish(transformer()).domain([1, 10]);\n\n  scale.copy = function() {\n    return copy(scale, sequentialLog()).base(scale.base());\n  };\n\n  return initInterpolator.apply(scale, arguments);\n}\n\nexport function sequentialSymlog() {\n  var scale = symlogish(transformer());\n\n  scale.copy = function() {\n    return copy(scale, sequentialSymlog()).constant(scale.constant());\n  };\n\n  return initInterpolator.apply(scale, arguments);\n}\n\nexport function sequentialPow() {\n  var scale = powish(transformer());\n\n  scale.copy = function() {\n    return copy(scale, sequentialPow()).exponent(scale.exponent());\n  };\n\n  return initInterpolator.apply(scale, arguments);\n}\n\nexport function sequentialSqrt() {\n  return sequentialPow.apply(null, arguments).exponent(0.5);\n}\n", "import {interpolate, interpolateRound, piecewise} from \"d3-interpolate\";\nimport {identity} from \"./continuous.js\";\nimport {initInterpolator} from \"./init.js\";\nimport {linearish} from \"./linear.js\";\nimport {loggish} from \"./log.js\";\nimport {copy} from \"./sequential.js\";\nimport {symlogish} from \"./symlog.js\";\nimport {powish} from \"./pow.js\";\n\nfunction transformer() {\n  var x0 = 0,\n      x1 = 0.5,\n      x2 = 1,\n      s = 1,\n      t0,\n      t1,\n      t2,\n      k10,\n      k21,\n      interpolator = identity,\n      transform,\n      clamp = false,\n      unknown;\n\n  function scale(x) {\n    return isNaN(x = +x) ? unknown : (x = 0.5 + ((x = +transform(x)) - t1) * (s * x < s * t1 ? k10 : k21), interpolator(clamp ? Math.max(0, Math.min(1, x)) : x));\n  }\n\n  scale.domain = function(_) {\n    return arguments.length ? ([x0, x1, x2] = _, t0 = transform(x0 = +x0), t1 = transform(x1 = +x1), t2 = transform(x2 = +x2), k10 = t0 === t1 ? 0 : 0.5 / (t1 - t0), k21 = t1 === t2 ? 0 : 0.5 / (t2 - t1), s = t1 < t0 ? -1 : 1, scale) : [x0, x1, x2];\n  };\n\n  scale.clamp = function(_) {\n    return arguments.length ? (clamp = !!_, scale) : clamp;\n  };\n\n  scale.interpolator = function(_) {\n    return arguments.length ? (interpolator = _, scale) : interpolator;\n  };\n\n  function range(interpolate) {\n    return function(_) {\n      var r0, r1, r2;\n      return arguments.length ? ([r0, r1, r2] = _, interpolator = piecewise(interpolate, [r0, r1, r2]), scale) : [interpolator(0), interpolator(0.5), interpolator(1)];\n    };\n  }\n\n  scale.range = range(interpolate);\n\n  scale.rangeRound = range(interpolateRound);\n\n  scale.unknown = function(_) {\n    return arguments.length ? (unknown = _, scale) : unknown;\n  };\n\n  return function(t) {\n    transform = t, t0 = t(x0), t1 = t(x1), t2 = t(x2), k10 = t0 === t1 ? 0 : 0.5 / (t1 - t0), k21 = t1 === t2 ? 0 : 0.5 / (t2 - t1), s = t1 < t0 ? -1 : 1;\n    return scale;\n  };\n}\n\nexport default function diverging() {\n  var scale = linearish(transformer()(identity));\n\n  scale.copy = function() {\n    return copy(scale, diverging());\n  };\n\n  return initInterpolator.apply(scale, arguments);\n}\n\nexport function divergingLog() {\n  var scale = loggish(transformer()).domain([0.1, 1, 10]);\n\n  scale.copy = function() {\n    return copy(scale, divergingLog()).base(scale.base());\n  };\n\n  return initInterpolator.apply(scale, arguments);\n}\n\nexport function divergingSymlog() {\n  var scale = symlogish(transformer());\n\n  scale.copy = function() {\n    return copy(scale, divergingSymlog()).constant(scale.constant());\n  };\n\n  return initInterpolator.apply(scale, arguments);\n}\n\nexport function divergingPow() {\n  var scale = powish(transformer());\n\n  scale.copy = function() {\n    return copy(scale, divergingPow()).exponent(scale.exponent());\n  };\n\n  return initInterpolator.apply(scale, arguments);\n}\n\nexport function divergingSqrt() {\n  return divergingPow.apply(null, arguments).exponent(0.5);\n}\n", "export default function(specifier) {\n  var n = specifier.length / 6 | 0, colors = new Array(n), i = 0;\n  while (i < n) colors[i] = \"#\" + specifier.slice(i * 6, ++i * 6);\n  return colors;\n}\n", "import colors from \"../colors.js\";\n\nexport default colors(\"1f77b4ff7f0e2ca02cd627289467bd8c564be377c27f7f7fbcbd2217becf\");\n", "import colors from \"../colors.js\";\n\nexport default colors(\"7fc97fbeaed4fdc086ffff99386cb0f0027fbf5b17666666\");\n", "import colors from \"../colors.js\";\n\nexport default colors(\"1b9e77d95f027570b3e7298a66a61ee6ab02a6761d666666\");\n", "import colors from \"../colors.js\";\n\nexport default colors(\"a6cee31f78b4b2df8a33a02cfb9a99e31a1cfdbf6fff7f00cab2d66a3d9affff99b15928\");\n", "import colors from \"../colors.js\";\n\nexport default colors(\"fbb4aeb3cde3ccebc5decbe4fed9a6ffffcce5d8bdfddaecf2f2f2\");\n", "import colors from \"../colors.js\";\n\nexport default colors(\"b3e2cdfdcdaccbd5e8f4cae4e6f5c9fff2aef1e2cccccccc\");\n", "import colors from \"../colors.js\";\n\nexport default colors(\"e41a1c377eb84daf4a984ea3ff7f00ffff33a65628f781bf999999\");\n", "import colors from \"../colors.js\";\n\nexport default colors(\"66c2a5fc8d628da0cbe78ac3a6d854ffd92fe5c494b3b3b3\");\n", "import colors from \"../colors.js\";\n\nexport default colors(\"8dd3c7ffffb3bebadafb807280b1d3fdb462b3de69fccde5d9d9d9bc80bdccebc5ffed6f\");\n", "import colors from \"../colors.js\";\n\nexport default colors(\"4e79a7f28e2ce1575976b7b259a14fedc949af7aa1ff9da79c755fbab0ab\");\n", "import {interpolateRgbBasis} from \"d3-interpolate\";\n\nexport default scheme => interpolateRgbBasis(scheme[scheme.length - 1]);\n", "import colors from \"../colors.js\";\nimport ramp from \"../ramp.js\";\n\nexport var scheme = new Array(3).concat(\n  \"d8b365f5f5f55ab4ac\",\n  \"a6611adfc27d80cdc1018571\",\n  \"a6611adfc27df5f5f580cdc1018571\",\n  \"8c510ad8b365f6e8c3c7eae55ab4ac01665e\",\n  \"8c510ad8b365f6e8c3f5f5f5c7eae55ab4ac01665e\",\n  \"8c510abf812ddfc27df6e8c3c7eae580cdc135978f01665e\",\n  \"8c510abf812ddfc27df6e8c3f5f5f5c7eae580cdc135978f01665e\",\n  \"5430058c510abf812ddfc27df6e8c3c7eae580cdc135978f01665e003c30\",\n  \"5430058c510abf812ddfc27df6e8c3f5f5f5c7eae580cdc135978f01665e003c30\"\n).map(colors);\n\nexport default ramp(scheme);\n", "import colors from \"../colors.js\";\nimport ramp from \"../ramp.js\";\n\nexport var scheme = new Array(3).concat(\n  \"af8dc3f7f7f77fbf7b\",\n  \"7b3294c2a5cfa6dba0008837\",\n  \"7b3294c2a5cff7f7f7a6dba0008837\",\n  \"762a83af8dc3e7d4e8d9f0d37fbf7b1b7837\",\n  \"762a83af8dc3e7d4e8f7f7f7d9f0d37fbf7b1b7837\",\n  \"762a839970abc2a5cfe7d4e8d9f0d3a6dba05aae611b7837\",\n  \"762a839970abc2a5cfe7d4e8f7f7f7d9f0d3a6dba05aae611b7837\",\n  \"40004b762a839970abc2a5cfe7d4e8d9f0d3a6dba05aae611b783700441b\",\n  \"40004b762a839970abc2a5cfe7d4e8f7f7f7d9f0d3a6dba05aae611b783700441b\"\n).map(colors);\n\nexport default ramp(scheme);\n", "import colors from \"../colors.js\";\nimport ramp from \"../ramp.js\";\n\nexport var scheme = new Array(3).concat(\n  \"e9a3c9f7f7f7a1d76a\",\n  \"d01c8bf1b6dab8e1864dac26\",\n  \"d01c8bf1b6daf7f7f7b8e1864dac26\",\n  \"c51b7de9a3c9fde0efe6f5d0a1d76a4d9221\",\n  \"c51b7de9a3c9fde0eff7f7f7e6f5d0a1d76a4d9221\",\n  \"c51b7dde77aef1b6dafde0efe6f5d0b8e1867fbc414d9221\",\n  \"c51b7dde77aef1b6dafde0eff7f7f7e6f5d0b8e1867fbc414d9221\",\n  \"8e0152c51b7dde77aef1b6dafde0efe6f5d0b8e1867fbc414d9221276419\",\n  \"8e0152c51b7dde77aef1b6dafde0eff7f7f7e6f5d0b8e1867fbc414d9221276419\"\n).map(colors);\n\nexport default ramp(scheme);\n", "import colors from \"../colors.js\";\nimport ramp from \"../ramp.js\";\n\nexport var scheme = new Array(3).concat(\n  \"998ec3f7f7f7f1a340\",\n  \"5e3c99b2abd2fdb863e66101\",\n  \"5e3c99b2abd2f7f7f7fdb863e66101\",\n  \"542788998ec3d8daebfee0b6f1a340b35806\",\n  \"542788998ec3d8daebf7f7f7fee0b6f1a340b35806\",\n  \"5427888073acb2abd2d8daebfee0b6fdb863e08214b35806\",\n  \"5427888073acb2abd2d8daebf7f7f7fee0b6fdb863e08214b35806\",\n  \"2d004b5427888073acb2abd2d8daebfee0b6fdb863e08214b358067f3b08\",\n  \"2d004b5427888073acb2abd2d8daebf7f7f7fee0b6fdb863e08214b358067f3b08\"\n).map(colors);\n\nexport default ramp(scheme);\n", "import colors from \"../colors.js\";\nimport ramp from \"../ramp.js\";\n\nexport var scheme = new Array(3).concat(\n  \"ef8a62f7f7f767a9cf\",\n  \"ca0020f4a58292c5de0571b0\",\n  \"ca0020f4a582f7f7f792c5de0571b0\",\n  \"b2182bef8a62fddbc7d1e5f067a9cf2166ac\",\n  \"b2182bef8a62fddbc7f7f7f7d1e5f067a9cf2166ac\",\n  \"b2182bd6604df4a582fddbc7d1e5f092c5de4393c32166ac\",\n  \"b2182bd6604df4a582fddbc7f7f7f7d1e5f092c5de4393c32166ac\",\n  \"67001fb2182bd6604df4a582fddbc7d1e5f092c5de4393c32166ac053061\",\n  \"67001fb2182bd6604df4a582fddbc7f7f7f7d1e5f092c5de4393c32166ac053061\"\n).map(colors);\n\nexport default ramp(scheme);\n", "import colors from \"../colors.js\";\nimport ramp from \"../ramp.js\";\n\nexport var scheme = new Array(3).concat(\n  \"ef8a62ffffff999999\",\n  \"ca0020f4a582bababa404040\",\n  \"ca0020f4a582ffffffbababa404040\",\n  \"b2182bef8a62fddbc7e0e0e09999994d4d4d\",\n  \"b2182bef8a62fddbc7ffffffe0e0e09999994d4d4d\",\n  \"b2182bd6604df4a582fddbc7e0e0e0bababa8787874d4d4d\",\n  \"b2182bd6604df4a582fddbc7ffffffe0e0e0bababa8787874d4d4d\",\n  \"67001fb2182bd6604df4a582fddbc7e0e0e0bababa8787874d4d4d1a1a1a\",\n  \"67001fb2182bd6604df4a582fddbc7ffffffe0e0e0bababa8787874d4d4d1a1a1a\"\n).map(colors);\n\nexport default ramp(scheme);\n", "import colors from \"../colors.js\";\nimport ramp from \"../ramp.js\";\n\nexport var scheme = new Array(3).concat(\n  \"fc8d59ffffbf91bfdb\",\n  \"d7191cfdae61abd9e92c7bb6\",\n  \"d7191cfdae61ffffbfabd9e92c7bb6\",\n  \"d73027fc8d59fee090e0f3f891bfdb4575b4\",\n  \"d73027fc8d59fee090ffffbfe0f3f891bfdb4575b4\",\n  \"d73027f46d43fdae61fee090e0f3f8abd9e974add14575b4\",\n  \"d73027f46d43fdae61fee090ffffbfe0f3f8abd9e974add14575b4\",\n  \"a50026d73027f46d43fdae61fee090e0f3f8abd9e974add14575b4313695\",\n  \"a50026d73027f46d43fdae61fee090ffffbfe0f3f8abd9e974add14575b4313695\"\n).map(colors);\n\nexport default ramp(scheme);\n", "import colors from \"../colors.js\";\nimport ramp from \"../ramp.js\";\n\nexport var scheme = new Array(3).concat(\n  \"fc8d59ffffbf91cf60\",\n  \"d7191cfdae61a6d96a1a9641\",\n  \"d7191cfdae61ffffbfa6d96a1a9641\",\n  \"d73027fc8d59fee08bd9ef8b91cf601a9850\",\n  \"d73027fc8d59fee08bffffbfd9ef8b91cf601a9850\",\n  \"d73027f46d43fdae61fee08bd9ef8ba6d96a66bd631a9850\",\n  \"d73027f46d43fdae61fee08bffffbfd9ef8ba6d96a66bd631a9850\",\n  \"a50026d73027f46d43fdae61fee08bd9ef8ba6d96a66bd631a9850006837\",\n  \"a50026d73027f46d43fdae61fee08bffffbfd9ef8ba6d96a66bd631a9850006837\"\n).map(colors);\n\nexport default ramp(scheme);\n", "import colors from \"../colors.js\";\nimport ramp from \"../ramp.js\";\n\nexport var scheme = new Array(3).concat(\n  \"fc8d59ffffbf99d594\",\n  \"d7191cfdae61abdda42b83ba\",\n  \"d7191cfdae61ffffbfabdda42b83ba\",\n  \"d53e4ffc8d59fee08be6f59899d5943288bd\",\n  \"d53e4ffc8d59fee08bffffbfe6f59899d5943288bd\",\n  \"d53e4ff46d43fdae61fee08be6f598abdda466c2a53288bd\",\n  \"d53e4ff46d43fdae61fee08bffffbfe6f598abdda466c2a53288bd\",\n  \"9e0142d53e4ff46d43fdae61fee08be6f598abdda466c2a53288bd5e4fa2\",\n  \"9e0142d53e4ff46d43fdae61fee08bffffbfe6f598abdda466c2a53288bd5e4fa2\"\n).map(colors);\n\nexport default ramp(scheme);\n", "import colors from \"../colors.js\";\nimport ramp from \"../ramp.js\";\n\nexport var scheme = new Array(3).concat(\n  \"e5f5f999d8c92ca25f\",\n  \"edf8fbb2e2e266c2a4238b45\",\n  \"edf8fbb2e2e266c2a42ca25f006d2c\",\n  \"edf8fbccece699d8c966c2a42ca25f006d2c\",\n  \"edf8fbccece699d8c966c2a441ae76238b45005824\",\n  \"f7fcfde5f5f9ccece699d8c966c2a441ae76238b45005824\",\n  \"f7fcfde5f5f9ccece699d8c966c2a441ae76238b45006d2c00441b\"\n).map(colors);\n\nexport default ramp(scheme);\n", "import colors from \"../colors.js\";\nimport ramp from \"../ramp.js\";\n\nexport var scheme = new Array(3).concat(\n  \"e0ecf49ebcda8856a7\",\n  \"edf8fbb3cde38c96c688419d\",\n  \"edf8fbb3cde38c96c68856a7810f7c\",\n  \"edf8fbbfd3e69ebcda8c96c68856a7810f7c\",\n  \"edf8fbbfd3e69ebcda8c96c68c6bb188419d6e016b\",\n  \"f7fcfde0ecf4bfd3e69ebcda8c96c68c6bb188419d6e016b\",\n  \"f7fcfde0ecf4bfd3e69ebcda8c96c68c6bb188419d810f7c4d004b\"\n).map(colors);\n\nexport default ramp(scheme);\n", "import colors from \"../colors.js\";\nimport ramp from \"../ramp.js\";\n\nexport var scheme = new Array(3).concat(\n  \"e0f3dba8ddb543a2ca\",\n  \"f0f9e8bae4bc7bccc42b8cbe\",\n  \"f0f9e8bae4bc7bccc443a2ca0868ac\",\n  \"f0f9e8ccebc5a8ddb57bccc443a2ca0868ac\",\n  \"f0f9e8ccebc5a8ddb57bccc44eb3d32b8cbe08589e\",\n  \"f7fcf0e0f3dbccebc5a8ddb57bccc44eb3d32b8cbe08589e\",\n  \"f7fcf0e0f3dbccebc5a8ddb57bccc44eb3d32b8cbe0868ac084081\"\n).map(colors);\n\nexport default ramp(scheme);\n", "import colors from \"../colors.js\";\nimport ramp from \"../ramp.js\";\n\nexport var scheme = new Array(3).concat(\n  \"fee8c8fdbb84e34a33\",\n  \"fef0d9fdcc8afc8d59d7301f\",\n  \"fef0d9fdcc8afc8d59e34a33b30000\",\n  \"fef0d9fdd49efdbb84fc8d59e34a33b30000\",\n  \"fef0d9fdd49efdbb84fc8d59ef6548d7301f990000\",\n  \"fff7ecfee8c8fdd49efdbb84fc8d59ef6548d7301f990000\",\n  \"fff7ecfee8c8fdd49efdbb84fc8d59ef6548d7301fb300007f0000\"\n).map(colors);\n\nexport default ramp(scheme);\n", "import colors from \"../colors.js\";\nimport ramp from \"../ramp.js\";\n\nexport var scheme = new Array(3).concat(\n  \"ece2f0a6bddb1c9099\",\n  \"f6eff7bdc9e167a9cf02818a\",\n  \"f6eff7bdc9e167a9cf1c9099016c59\",\n  \"f6eff7d0d1e6a6bddb67a9cf1c9099016c59\",\n  \"f6eff7d0d1e6a6bddb67a9cf3690c002818a016450\",\n  \"fff7fbece2f0d0d1e6a6bddb67a9cf3690c002818a016450\",\n  \"fff7fbece2f0d0d1e6a6bddb67a9cf3690c002818a016c59014636\"\n).map(colors);\n\nexport default ramp(scheme);\n", "import colors from \"../colors.js\";\nimport ramp from \"../ramp.js\";\n\nexport var scheme = new Array(3).concat(\n  \"ece7f2a6bddb2b8cbe\",\n  \"f1eef6bdc9e174a9cf0570b0\",\n  \"f1eef6bdc9e174a9cf2b8cbe045a8d\",\n  \"f1eef6d0d1e6a6bddb74a9cf2b8cbe045a8d\",\n  \"f1eef6d0d1e6a6bddb74a9cf3690c00570b0034e7b\",\n  \"fff7fbece7f2d0d1e6a6bddb74a9cf3690c00570b0034e7b\",\n  \"fff7fbece7f2d0d1e6a6bddb74a9cf3690c00570b0045a8d023858\"\n).map(colors);\n\nexport default ramp(scheme);\n", "import colors from \"../colors.js\";\nimport ramp from \"../ramp.js\";\n\nexport var scheme = new Array(3).concat(\n  \"e7e1efc994c7dd1c77\",\n  \"f1eef6d7b5d8df65b0ce1256\",\n  \"f1eef6d7b5d8df65b0dd1c77980043\",\n  \"f1eef6d4b9dac994c7df65b0dd1c77980043\",\n  \"f1eef6d4b9dac994c7df65b0e7298ace125691003f\",\n  \"f7f4f9e7e1efd4b9dac994c7df65b0e7298ace125691003f\",\n  \"f7f4f9e7e1efd4b9dac994c7df65b0e7298ace125698004367001f\"\n).map(colors);\n\nexport default ramp(scheme);\n", "import colors from \"../colors.js\";\nimport ramp from \"../ramp.js\";\n\nexport var scheme = new Array(3).concat(\n  \"fde0ddfa9fb5c51b8a\",\n  \"feebe2fbb4b9f768a1ae017e\",\n  \"feebe2fbb4b9f768a1c51b8a7a0177\",\n  \"feebe2fcc5c0fa9fb5f768a1c51b8a7a0177\",\n  \"feebe2fcc5c0fa9fb5f768a1dd3497ae017e7a0177\",\n  \"fff7f3fde0ddfcc5c0fa9fb5f768a1dd3497ae017e7a0177\",\n  \"fff7f3fde0ddfcc5c0fa9fb5f768a1dd3497ae017e7a017749006a\"\n).map(colors);\n\nexport default ramp(scheme);\n", "import colors from \"../colors.js\";\nimport ramp from \"../ramp.js\";\n\nexport var scheme = new Array(3).concat(\n  \"edf8b17fcdbb2c7fb8\",\n  \"ffffcca1dab441b6c4225ea8\",\n  \"ffffcca1dab441b6c42c7fb8253494\",\n  \"ffffccc7e9b47fcdbb41b6c42c7fb8253494\",\n  \"ffffccc7e9b47fcdbb41b6c41d91c0225ea80c2c84\",\n  \"ffffd9edf8b1c7e9b47fcdbb41b6c41d91c0225ea80c2c84\",\n  \"ffffd9edf8b1c7e9b47fcdbb41b6c41d91c0225ea8253494081d58\"\n).map(colors);\n\nexport default ramp(scheme);\n", "import colors from \"../colors.js\";\nimport ramp from \"../ramp.js\";\n\nexport var scheme = new Array(3).concat(\n  \"f7fcb9addd8e31a354\",\n  \"ffffccc2e69978c679238443\",\n  \"ffffccc2e69978c67931a354006837\",\n  \"ffffccd9f0a3addd8e78c67931a354006837\",\n  \"ffffccd9f0a3addd8e78c67941ab5d238443005a32\",\n  \"ffffe5f7fcb9d9f0a3addd8e78c67941ab5d238443005a32\",\n  \"ffffe5f7fcb9d9f0a3addd8e78c67941ab5d238443006837004529\"\n).map(colors);\n\nexport default ramp(scheme);\n", "import colors from \"../colors.js\";\nimport ramp from \"../ramp.js\";\n\nexport var scheme = new Array(3).concat(\n  \"fff7bcfec44fd95f0e\",\n  \"ffffd4fed98efe9929cc4c02\",\n  \"ffffd4fed98efe9929d95f0e993404\",\n  \"ffffd4fee391fec44ffe9929d95f0e993404\",\n  \"ffffd4fee391fec44ffe9929ec7014cc4c028c2d04\",\n  \"ffffe5fff7bcfee391fec44ffe9929ec7014cc4c028c2d04\",\n  \"ffffe5fff7bcfee391fec44ffe9929ec7014cc4c02993404662506\"\n).map(colors);\n\nexport default ramp(scheme);\n", "import colors from \"../colors.js\";\nimport ramp from \"../ramp.js\";\n\nexport var scheme = new Array(3).concat(\n  \"ffeda0feb24cf03b20\",\n  \"ffffb2fecc5cfd8d3ce31a1c\",\n  \"ffffb2fecc5cfd8d3cf03b20bd0026\",\n  \"ffffb2fed976feb24cfd8d3cf03b20bd0026\",\n  \"ffffb2fed976feb24cfd8d3cfc4e2ae31a1cb10026\",\n  \"ffffccffeda0fed976feb24cfd8d3cfc4e2ae31a1cb10026\",\n  \"ffffccffeda0fed976feb24cfd8d3cfc4e2ae31a1cbd0026800026\"\n).map(colors);\n\nexport default ramp(scheme);\n", "import colors from \"../colors.js\";\nimport ramp from \"../ramp.js\";\n\nexport var scheme = new Array(3).concat(\n  \"deebf79ecae13182bd\",\n  \"eff3ffbdd7e76baed62171b5\",\n  \"eff3ffbdd7e76baed63182bd08519c\",\n  \"eff3ffc6dbef9ecae16baed63182bd08519c\",\n  \"eff3ffc6dbef9ecae16baed64292c62171b5084594\",\n  \"f7fbffdeebf7c6dbef9ecae16baed64292c62171b5084594\",\n  \"f7fbffdeebf7c6dbef9ecae16baed64292c62171b508519c08306b\"\n).map(colors);\n\nexport default ramp(scheme);\n", "import colors from \"../colors.js\";\nimport ramp from \"../ramp.js\";\n\nexport var scheme = new Array(3).concat(\n  \"e5f5e0a1d99b31a354\",\n  \"edf8e9bae4b374c476238b45\",\n  \"edf8e9bae4b374c47631a354006d2c\",\n  \"edf8e9c7e9c0a1d99b74c47631a354006d2c\",\n  \"edf8e9c7e9c0a1d99b74c47641ab5d238b45005a32\",\n  \"f7fcf5e5f5e0c7e9c0a1d99b74c47641ab5d238b45005a32\",\n  \"f7fcf5e5f5e0c7e9c0a1d99b74c47641ab5d238b45006d2c00441b\"\n).map(colors);\n\nexport default ramp(scheme);\n", "import colors from \"../colors.js\";\nimport ramp from \"../ramp.js\";\n\nexport var scheme = new Array(3).concat(\n  \"f0f0f0bdbdbd636363\",\n  \"f7f7f7cccccc969696525252\",\n  \"f7f7f7cccccc969696636363252525\",\n  \"f7f7f7d9d9d9bdbdbd969696636363252525\",\n  \"f7f7f7d9d9d9bdbdbd969696737373525252252525\",\n  \"fffffff0f0f0d9d9d9bdbdbd969696737373525252252525\",\n  \"fffffff0f0f0d9d9d9bdbdbd969696737373525252252525000000\"\n).map(colors);\n\nexport default ramp(scheme);\n", "import colors from \"../colors.js\";\nimport ramp from \"../ramp.js\";\n\nexport var scheme = new Array(3).concat(\n  \"efedf5bcbddc756bb1\",\n  \"f2f0f7cbc9e29e9ac86a51a3\",\n  \"f2f0f7cbc9e29e9ac8756bb154278f\",\n  \"f2f0f7dadaebbcbddc9e9ac8756bb154278f\",\n  \"f2f0f7dadaebbcbddc9e9ac8807dba6a51a34a1486\",\n  \"fcfbfdefedf5dadaebbcbddc9e9ac8807dba6a51a34a1486\",\n  \"fcfbfdefedf5dadaebbcbddc9e9ac8807dba6a51a354278f3f007d\"\n).map(colors);\n\nexport default ramp(scheme);\n", "import colors from \"../colors.js\";\nimport ramp from \"../ramp.js\";\n\nexport var scheme = new Array(3).concat(\n  \"fee0d2fc9272de2d26\",\n  \"fee5d9fcae91fb6a4acb181d\",\n  \"fee5d9fcae91fb6a4ade2d26a50f15\",\n  \"fee5d9fcbba1fc9272fb6a4ade2d26a50f15\",\n  \"fee5d9fcbba1fc9272fb6a4aef3b2ccb181d99000d\",\n  \"fff5f0fee0d2fcbba1fc9272fb6a4aef3b2ccb181d99000d\",\n  \"fff5f0fee0d2fcbba1fc9272fb6a4aef3b2ccb181da50f1567000d\"\n).map(colors);\n\nexport default ramp(scheme);\n", "import colors from \"../colors.js\";\nimport ramp from \"../ramp.js\";\n\nexport var scheme = new Array(3).concat(\n  \"fee6cefdae6be6550d\",\n  \"feeddefdbe85fd8d3cd94701\",\n  \"feeddefdbe85fd8d3ce6550da63603\",\n  \"feeddefdd0a2fdae6bfd8d3ce6550da63603\",\n  \"feeddefdd0a2fdae6bfd8d3cf16913d948018c2d04\",\n  \"fff5ebfee6cefdd0a2fdae6bfd8d3cf16913d948018c2d04\",\n  \"fff5ebfee6cefdd0a2fdae6bfd8d3cf16913d94801a636037f2704\"\n).map(colors);\n\nexport default ramp(scheme);\n", "export default function(t) {\n  t = Math.max(0, Math.min(1, t));\n  return \"rgb(\"\n      + Math.max(0, Math.min(255, Math.round(-4.54 - t * (35.34 - t * (2381.73 - t * (6402.7 - t * (7024.72 - t * 2710.57))))))) + \", \"\n      + Math.max(0, Math.min(255, Math.round(32.49 + t * (170.73 + t * (52.82 - t * (131.46 - t * (176.58 - t * 67.37))))))) + \", \"\n      + Math.max(0, Math.min(255, Math.round(81.24 + t * (442.36 - t * (2482.43 - t * (6167.24 - t * (6614.94 - t * 2475.67)))))))\n      + \")\";\n}\n", "import {cubehelix} from \"d3-color\";\nimport {interpolateCubehelixLong} from \"d3-interpolate\";\n\nexport default interpolateCubehelixLong(cubehelix(300, 0.5, 0.0), cubehelix(-240, 0.5, 1.0));\n", "import {cubehelix} from \"d3-color\";\nimport {interpolateCubehelixLong} from \"d3-interpolate\";\n\nexport var warm = interpolateCubehelixLong(cubehelix(-100, 0.75, 0.35), cubehelix(80, 1.50, 0.8));\n\nexport var cool = interpolateCubehelixLong(cubehelix(260, 0.75, 0.35), cubehelix(80, 1.50, 0.8));\n\nvar c = cubehelix();\n\nexport default function(t) {\n  if (t < 0 || t > 1) t -= Math.floor(t);\n  var ts = Math.abs(t - 0.5);\n  c.h = 360 * t - 100;\n  c.s = 1.5 - 1.5 * ts;\n  c.l = 0.8 - 0.9 * ts;\n  return c + \"\";\n}\n", "import {rgb} from \"d3-color\";\n\nvar c = rgb(),\n    pi_1_3 = Math.PI / 3,\n    pi_2_3 = Math.PI * 2 / 3;\n\nexport default function(t) {\n  var x;\n  t = (0.5 - t) * Math.PI;\n  c.r = 255 * (x = Math.sin(t)) * x;\n  c.g = 255 * (x = Math.sin(t + pi_1_3)) * x;\n  c.b = 255 * (x = Math.sin(t + pi_2_3)) * x;\n  return c + \"\";\n}\n", "export default function(t) {\n  t = Math.max(0, Math.min(1, t));\n  return \"rgb(\"\n      + Math.max(0, Math.min(255, Math.round(34.61 + t * (1172.33 - t * (10793.56 - t * (33300.12 - t * (38394.49 - t * 14825.05))))))) + \", \"\n      + Math.max(0, Math.min(255, Math.round(23.31 + t * (557.33 + t * (1225.33 - t * (3574.96 - t * (1073.77 + t * 707.56))))))) + \", \"\n      + Math.max(0, Math.min(255, Math.round(27.2 + t * (3211.1 - t * (15327.97 - t * (27814 - t * (22569.18 - t * 6838.66)))))))\n      + \")\";\n}\n", "import colors from \"../colors.js\";\n\nfunction ramp(range) {\n  var n = range.length;\n  return function(t) {\n    return range[Math.max(0, Math.min(n - 1, Math.floor(t * n)))];\n  };\n}\n\nexport default ramp(colors(\"44015444025645045745055946075a46085c460a5d460b5e470d60470e6147106347116447136548146748166848176948186a481a6c481b6d481c6e481d6f481f70482071482173482374482475482576482677482878482979472a7a472c7a472d7b472e7c472f7d46307e46327e46337f463480453581453781453882443983443a83443b84433d84433e85423f854240864241864142874144874045884046883f47883f48893e49893e4a893e4c8a3d4d8a3d4e8a3c4f8a3c508b3b518b3b528b3a538b3a548c39558c39568c38588c38598c375a8c375b8d365c8d365d8d355e8d355f8d34608d34618d33628d33638d32648e32658e31668e31678e31688e30698e306a8e2f6b8e2f6c8e2e6d8e2e6e8e2e6f8e2d708e2d718e2c718e2c728e2c738e2b748e2b758e2a768e2a778e2a788e29798e297a8e297b8e287c8e287d8e277e8e277f8e27808e26818e26828e26828e25838e25848e25858e24868e24878e23888e23898e238a8d228b8d228c8d228d8d218e8d218f8d21908d21918c20928c20928c20938c1f948c1f958b1f968b1f978b1f988b1f998a1f9a8a1e9b8a1e9c891e9d891f9e891f9f881fa0881fa1881fa1871fa28720a38620a48621a58521a68522a78522a88423a98324aa8325ab8225ac8226ad8127ad8128ae8029af7f2ab07f2cb17e2db27d2eb37c2fb47c31b57b32b67a34b67935b77937b87838b9773aba763bbb753dbc743fbc7340bd7242be7144bf7046c06f48c16e4ac16d4cc26c4ec36b50c46a52c56954c56856c66758c7655ac8645cc8635ec96260ca6063cb5f65cb5e67cc5c69cd5b6ccd5a6ece5870cf5773d05675d05477d1537ad1517cd2507fd34e81d34d84d44b86d54989d5488bd6468ed64590d74393d74195d84098d83e9bd93c9dd93ba0da39a2da37a5db36a8db34aadc32addc30b0dd2fb2dd2db5de2bb8de29bade28bddf26c0df25c2df23c5e021c8e020cae11fcde11dd0e11cd2e21bd5e21ad8e219dae319dde318dfe318e2e418e5e419e7e419eae51aece51befe51cf1e51df4e61ef6e620f8e621fbe723fde725\"));\n\nexport var magma = ramp(colors(\"00000401000501010601010802010902020b02020d03030f03031204041405041606051806051a07061c08071e0907200a08220b09240c09260d0a290e0b2b100b2d110c2f120d31130d34140e36150e38160f3b180f3d19103f1a10421c10441d11471e114920114b21114e22115024125325125527125829115a2a115c2c115f2d11612f116331116533106734106936106b38106c390f6e3b0f703d0f713f0f72400f74420f75440f764510774710784910784a10794c117a4e117b4f127b51127c52137c54137d56147d57157e59157e5a167e5c167f5d177f5f187f601880621980641a80651a80671b80681c816a1c816b1d816d1d816e1e81701f81721f817320817521817621817822817922827b23827c23827e24828025828125818326818426818627818827818928818b29818c29818e2a81902a81912b81932b80942c80962c80982d80992d809b2e7f9c2e7f9e2f7fa02f7fa1307ea3307ea5317ea6317da8327daa337dab337cad347cae347bb0357bb2357bb3367ab5367ab73779b83779ba3878bc3978bd3977bf3a77c03a76c23b75c43c75c53c74c73d73c83e73ca3e72cc3f71cd4071cf4070d0416fd2426fd3436ed5446dd6456cd8456cd9466bdb476adc4869de4968df4a68e04c67e24d66e34e65e44f64e55064e75263e85362e95462ea5661eb5760ec5860ed5a5fee5b5eef5d5ef05f5ef1605df2625df2645cf3655cf4675cf4695cf56b5cf66c5cf66e5cf7705cf7725cf8745cf8765cf9785df9795df97b5dfa7d5efa7f5efa815ffb835ffb8560fb8761fc8961fc8a62fc8c63fc8e64fc9065fd9266fd9467fd9668fd9869fd9a6afd9b6bfe9d6cfe9f6dfea16efea36ffea571fea772fea973feaa74feac76feae77feb078feb27afeb47bfeb67cfeb77efeb97ffebb81febd82febf84fec185fec287fec488fec68afec88cfeca8dfecc8ffecd90fecf92fed194fed395fed597fed799fed89afdda9cfddc9efddea0fde0a1fde2a3fde3a5fde5a7fde7a9fde9aafdebacfcecaefceeb0fcf0b2fcf2b4fcf4b6fcf6b8fcf7b9fcf9bbfcfbbdfcfdbf\"));\n\nexport var inferno = ramp(colors(\"00000401000501010601010802010a02020c02020e03021004031204031405041706041907051b08051d09061f0a07220b07240c08260d08290e092b10092d110a30120a32140b34150b37160b39180c3c190c3e1b0c411c0c431e0c451f0c48210c4a230c4c240c4f260c51280b53290b552b0b572d0b592f0a5b310a5c320a5e340a5f3609613809623909633b09643d09653e0966400a67420a68440a68450a69470b6a490b6a4a0c6b4c0c6b4d0d6c4f0d6c510e6c520e6d540f6d550f6d57106e59106e5a116e5c126e5d126e5f136e61136e62146e64156e65156e67166e69166e6a176e6c186e6d186e6f196e71196e721a6e741a6e751b6e771c6d781c6d7a1d6d7c1d6d7d1e6d7f1e6c801f6c82206c84206b85216b87216b88226a8a226a8c23698d23698f24699025689225689326679526679727669827669a28659b29649d29649f2a63a02a63a22b62a32c61a52c60a62d60a82e5fa92e5eab2f5ead305dae305cb0315bb1325ab3325ab43359b63458b73557b93556ba3655bc3754bd3853bf3952c03a51c13a50c33b4fc43c4ec63d4dc73e4cc83f4bca404acb4149cc4248ce4347cf4446d04545d24644d34743d44842d54a41d74b3fd84c3ed94d3dda4e3cdb503bdd513ade5238df5337e05536e15635e25734e35933e45a31e55c30e65d2fe75e2ee8602de9612bea632aeb6429eb6628ec6726ed6925ee6a24ef6c23ef6e21f06f20f1711ff1731df2741cf3761bf37819f47918f57b17f57d15f67e14f68013f78212f78410f8850ff8870ef8890cf98b0bf98c0af98e09fa9008fa9207fa9407fb9606fb9706fb9906fb9b06fb9d07fc9f07fca108fca309fca50afca60cfca80dfcaa0ffcac11fcae12fcb014fcb216fcb418fbb61afbb81dfbba1ffbbc21fbbe23fac026fac228fac42afac62df9c72ff9c932f9cb35f8cd37f8cf3af7d13df7d340f6d543f6d746f5d949f5db4cf4dd4ff4df53f4e156f3e35af3e55df2e661f2e865f2ea69f1ec6df1ed71f1ef75f1f179f2f27df2f482f3f586f3f68af4f88ef5f992f6fa96f8fb9af9fc9dfafda1fcffa4\"));\n\nexport var plasma = ramp(colors(\"0d088710078813078916078a19068c1b068d1d068e20068f2206902406912605912805922a05932c05942e05952f059631059733059735049837049938049a3a049a3c049b3e049c3f049c41049d43039e44039e46039f48039f4903a04b03a14c02a14e02a25002a25102a35302a35502a45601a45801a45901a55b01a55c01a65e01a66001a66100a76300a76400a76600a76700a86900a86a00a86c00a86e00a86f00a87100a87201a87401a87501a87701a87801a87a02a87b02a87d03a87e03a88004a88104a78305a78405a78606a68707a68808a68a09a58b0aa58d0ba58e0ca48f0da4910ea3920fa39410a29511a19613a19814a099159f9a169f9c179e9d189d9e199da01a9ca11b9ba21d9aa31e9aa51f99a62098a72197a82296aa2395ab2494ac2694ad2793ae2892b02991b12a90b22b8fb32c8eb42e8db52f8cb6308bb7318ab83289ba3388bb3488bc3587bd3786be3885bf3984c03a83c13b82c23c81c33d80c43e7fc5407ec6417dc7427cc8437bc9447aca457acb4679cc4778cc4977cd4a76ce4b75cf4c74d04d73d14e72d24f71d35171d45270d5536fd5546ed6556dd7566cd8576bd9586ada5a6ada5b69db5c68dc5d67dd5e66de5f65de6164df6263e06363e16462e26561e26660e3685fe4695ee56a5de56b5de66c5ce76e5be76f5ae87059e97158e97257ea7457eb7556eb7655ec7754ed7953ed7a52ee7b51ef7c51ef7e50f07f4ff0804ef1814df1834cf2844bf3854bf3874af48849f48948f58b47f58c46f68d45f68f44f79044f79143f79342f89441f89540f9973ff9983ef99a3efa9b3dfa9c3cfa9e3bfb9f3afba139fba238fca338fca537fca636fca835fca934fdab33fdac33fdae32fdaf31fdb130fdb22ffdb42ffdb52efeb72dfeb82cfeba2cfebb2bfebd2afebe2afec029fdc229fdc328fdc527fdc627fdc827fdca26fdcb26fccd25fcce25fcd025fcd225fbd324fbd524fbd724fad824fada24f9dc24f9dd25f8df25f8e125f7e225f7e425f6e626f6e826f5e926f5eb27f4ed27f3ee27f3f027f2f227f1f426f1f525f0f724f0f921\"));\n", "export const abs = Math.abs;\nexport const atan2 = Math.atan2;\nexport const cos = Math.cos;\nexport const max = Math.max;\nexport const min = Math.min;\nexport const sin = Math.sin;\nexport const sqrt = Math.sqrt;\n\nexport const epsilon = 1e-12;\nexport const pi = Math.PI;\nexport const halfPi = pi / 2;\nexport const tau = 2 * pi;\n\nexport function acos(x) {\n  return x > 1 ? 0 : x < -1 ? pi : Math.acos(x);\n}\n\nexport function asin(x) {\n  return x >= 1 ? halfPi : x <= -1 ? -halfPi : Math.asin(x);\n}\n", "import {min, sqrt} from \"../math.js\";\n\nconst sqrt3 = sqrt(3);\n\nexport default {\n  draw(context, size) {\n    const r = sqrt(size + min(size / 28, 0.75)) * 0.59436;\n    const t = r / 2;\n    const u = t * sqrt3;\n    context.moveTo(0, r);\n    context.lineTo(0, -r);\n    context.moveTo(-u, -t);\n    context.lineTo(u, t);\n    context.moveTo(-u, t);\n    context.lineTo(u, -t);\n  }\n};\n", "import {pi, sqrt, tau} from \"../math.js\";\n\nexport default {\n  draw(context, size) {\n    const r = sqrt(size / pi);\n    context.moveTo(r, 0);\n    context.arc(0, 0, r, 0, tau);\n  }\n};\n", "import {sqrt} from \"../math.js\";\n\nexport default {\n  draw(context, size) {\n    const r = sqrt(size / 5) / 2;\n    context.moveTo(-3 * r, -r);\n    context.lineTo(-r, -r);\n    context.lineTo(-r, -3 * r);\n    context.lineTo(r, -3 * r);\n    context.lineTo(r, -r);\n    context.lineTo(3 * r, -r);\n    context.lineTo(3 * r, r);\n    context.lineTo(r, r);\n    context.lineTo(r, 3 * r);\n    context.lineTo(-r, 3 * r);\n    context.lineTo(-r, r);\n    context.lineTo(-3 * r, r);\n    context.closePath();\n  }\n};\n", "import {sqrt} from \"../math.js\";\n\nconst tan30 = sqrt(1 / 3);\nconst tan30_2 = tan30 * 2;\n\nexport default {\n  draw(context, size) {\n    const y = sqrt(size / tan30_2);\n    const x = y * tan30;\n    context.moveTo(0, -y);\n    context.lineTo(x, 0);\n    context.lineTo(0, y);\n    context.lineTo(-x, 0);\n    context.closePath();\n  }\n};\n", "import {sqrt} from \"../math.js\";\n\nexport default {\n  draw(context, size) {\n    const r = sqrt(size) * 0.62625;\n    context.moveTo(0, -r);\n    context.lineTo(r, 0);\n    context.lineTo(0, r);\n    context.lineTo(-r, 0);\n    context.closePath();\n  }\n};\n", "import {min, sqrt} from \"../math.js\";\n\nexport default {\n  draw(context, size) {\n    const r = sqrt(size - min(size / 7, 2)) * 0.87559;\n    context.moveTo(-r, 0);\n    context.lineTo(r, 0);\n    context.moveTo(0, r);\n    context.lineTo(0, -r);\n  }\n};\n", "import {sqrt} from \"../math.js\";\n\nexport default {\n  draw(context, size) {\n    const w = sqrt(size);\n    const x = -w / 2;\n    context.rect(x, x, w, w);\n  }\n};\n", "import {sqrt} from \"../math.js\";\n\nexport default {\n  draw(context, size) {\n    const r = sqrt(size) * 0.4431;\n    context.moveTo(r, r);\n    context.lineTo(r, -r);\n    context.lineTo(-r, -r);\n    context.lineTo(-r, r);\n    context.closePath();\n  }\n};\n", "import {sin, cos, sqrt, pi, tau} from \"../math.js\";\n\nconst ka = 0.89081309152928522810;\nconst kr = sin(pi / 10) / sin(7 * pi / 10);\nconst kx = sin(tau / 10) * kr;\nconst ky = -cos(tau / 10) * kr;\n\nexport default {\n  draw(context, size) {\n    const r = sqrt(size * ka);\n    const x = kx * r;\n    const y = ky * r;\n    context.moveTo(0, -r);\n    context.lineTo(x, y);\n    for (let i = 1; i < 5; ++i) {\n      const a = tau * i / 5;\n      const c = cos(a);\n      const s = sin(a);\n      context.lineTo(s * r, -c * r);\n      context.lineTo(c * x - s * y, s * x + c * y);\n    }\n    context.closePath();\n  }\n};\n", "import {sqrt} from \"../math.js\";\n\nconst sqrt3 = sqrt(3);\n\nexport default {\n  draw(context, size) {\n    const y = -sqrt(size / (sqrt3 * 3));\n    context.moveTo(0, y * 2);\n    context.lineTo(-sqrt3 * y, -y);\n    context.lineTo(sqrt3 * y, -y);\n    context.closePath();\n  }\n};\n", "import {sqrt} from \"../math.js\";\n\nconst sqrt3 = sqrt(3);\n\nexport default {\n  draw(context, size) {\n    const s = sqrt(size) * 0.6824;\n    const t = s  / 2;\n    const u = (s * sqrt3) / 2; // cos(Math.PI / 6)\n    context.moveTo(0, -s);\n    context.lineTo(u, t);\n    context.lineTo(-u, t);\n    context.closePath();\n  }\n};\n", "import {sqrt} from \"../math.js\";\n\nconst c = -0.5;\nconst s = sqrt(3) / 2;\nconst k = 1 / sqrt(12);\nconst a = (k / 2 + 1) * 3;\n\nexport default {\n  draw(context, size) {\n    const r = sqrt(size / a);\n    const x0 = r / 2, y0 = r * k;\n    const x1 = x0, y1 = r * k + r;\n    const x2 = -x1, y2 = y1;\n    context.moveTo(x0, y0);\n    context.lineTo(x1, y1);\n    context.lineTo(x2, y2);\n    context.lineTo(c * x0 - s * y0, s * x0 + c * y0);\n    context.lineTo(c * x1 - s * y1, s * x1 + c * y1);\n    context.lineTo(c * x2 - s * y2, s * x2 + c * y2);\n    context.lineTo(c * x0 + s * y0, c * y0 - s * x0);\n    context.lineTo(c * x1 + s * y1, c * y1 - s * x1);\n    context.lineTo(c * x2 + s * y2, c * y2 - s * x2);\n    context.closePath();\n  }\n};\n", "import {min, sqrt} from \"../math.js\";\n\nexport default {\n  draw(context, size) {\n    const r = sqrt(size - min(size / 6, 1.7)) * 0.6189;\n    context.moveTo(-r, -r);\n    context.lineTo(r, r);\n    context.moveTo(-r, r);\n    context.lineTo(r, -r);\n  }\n};\n", "import constant from \"./constant.js\";\nimport {withPath} from \"./path.js\";\nimport asterisk from \"./symbol/asterisk.js\";\nimport circle from \"./symbol/circle.js\";\nimport cross from \"./symbol/cross.js\";\nimport diamond from \"./symbol/diamond.js\";\nimport diamond2 from \"./symbol/diamond2.js\";\nimport plus from \"./symbol/plus.js\";\nimport square from \"./symbol/square.js\";\nimport square2 from \"./symbol/square2.js\";\nimport star from \"./symbol/star.js\";\nimport triangle from \"./symbol/triangle.js\";\nimport triangle2 from \"./symbol/triangle2.js\";\nimport wye from \"./symbol/wye.js\";\nimport times from \"./symbol/times.js\";\n\n// These symbols are designed to be filled.\nexport const symbolsFill = [\n  circle,\n  cross,\n  diamond,\n  square,\n  star,\n  triangle,\n  wye\n];\n\n// These symbols are designed to be stroked (with a width of 1.5px and round caps).\nexport const symbolsStroke = [\n  circle,\n  plus,\n  times,\n  triangle2,\n  asterisk,\n  square2,\n  diamond2\n];\n\nexport default function Symbol(type, size) {\n  let context = null,\n      path = withPath(symbol);\n\n  type = typeof type === \"function\" ? type : constant(type || circle);\n  size = typeof size === \"function\" ? size : constant(size === undefined ? 64 : +size);\n\n  function symbol() {\n    let buffer;\n    if (!context) context = buffer = path();\n    type.apply(this, arguments).draw(context, +size.apply(this, arguments));\n    if (buffer) return context = null, buffer + \"\" || null;\n  }\n\n  symbol.type = function(_) {\n    return arguments.length ? (type = typeof _ === \"function\" ? _ : constant(_), symbol) : type;\n  };\n\n  symbol.size = function(_) {\n    return arguments.length ? (size = typeof _ === \"function\" ? _ : constant(+_), symbol) : size;\n  };\n\n  symbol.context = function(_) {\n    return arguments.length ? (context = _ == null ? null : _, symbol) : context;\n  };\n\n  return symbol;\n}\n", "export function Transform(k, x, y) {\n  this.k = k;\n  this.x = x;\n  this.y = y;\n}\n\nTransform.prototype = {\n  constructor: Transform,\n  scale: function(k) {\n    return k === 1 ? this : new Transform(this.k * k, this.x, this.y);\n  },\n  translate: function(x, y) {\n    return x === 0 & y === 0 ? this : new Transform(this.k, this.x + this.k * x, this.y + this.k * y);\n  },\n  apply: function(point) {\n    return [point[0] * this.k + this.x, point[1] * this.k + this.y];\n  },\n  applyX: function(x) {\n    return x * this.k + this.x;\n  },\n  applyY: function(y) {\n    return y * this.k + this.y;\n  },\n  invert: function(location) {\n    return [(location[0] - this.x) / this.k, (location[1] - this.y) / this.k];\n  },\n  invertX: function(x) {\n    return (x - this.x) / this.k;\n  },\n  invertY: function(y) {\n    return (y - this.y) / this.k;\n  },\n  rescaleX: function(x) {\n    return x.copy().domain(x.range().map(this.invertX, this).map(x.invert, x));\n  },\n  rescaleY: function(y) {\n    return y.copy().domain(y.range().map(this.invertY, this).map(y.invert, y));\n  },\n  toString: function() {\n    return \"translate(\" + this.x + \",\" + this.y + \") scale(\" + this.k + \")\";\n  }\n};\n\nexport var identity = new Transform(1, 0, 0);\n\ntransform.prototype = Transform.prototype;\n\nexport default function transform(node) {\n  while (!node.__zoom) if (!(node = node.parentNode)) return identity;\n  return node.__zoom;\n}\n", "import {ascending, descending} from \"d3\";\n\nexport function defined(x) {\n  return x != null && !Number.isNaN(x);\n}\n\nexport function ascendingDefined(a, b) {\n  return +defined(b) - +defined(a) || ascending(a, b);\n}\n\nexport function descendingDefined(a, b) {\n  return +defined(b) - +defined(a) || descending(a, b);\n}\n\nexport function nonempty(x) {\n  return x != null && `${x}` !== \"\";\n}\n\nexport function finite(x) {\n  return isFinite(x) ? x : NaN;\n}\n\nexport function positive(x) {\n  return x > 0 && isFinite(x) ? x : NaN;\n}\n\nexport function negative(x) {\n  return x < 0 && isFinite(x) ? x : NaN;\n}\n", "export default function format(date, fallback) {\n  if (!(date instanceof Date)) date = new Date(+date);\n  if (isNaN(date)) return typeof fallback === \"function\" ? fallback(date) : fallback;\n  const hours = date.getUTCHours();\n  const minutes = date.getUTCMinutes();\n  const seconds = date.getUTCSeconds();\n  const milliseconds = date.getUTCMilliseconds();\n  return `${formatYear(date.getUTCFullYear(), 4)}-${pad(date.getUTCMonth() + 1, 2)}-${pad(date.getUTCDate(), 2)}${\n    hours || minutes || seconds || milliseconds ? `T${pad(hours, 2)}:${pad(minutes, 2)}${\n      seconds || milliseconds ? `:${pad(seconds, 2)}${\n        milliseconds ? `.${pad(milliseconds, 3)}` : ``\n      }` : ``\n    }Z` : ``\n  }`;\n}\n\nfunction formatYear(year) {\n  return year < 0 ? `-${pad(-year, 6)}`\n    : year > 9999 ? `+${pad(year, 6)}`\n    : pad(year, 4);\n}\n\nfunction pad(value, width) {\n  return `${value}`.padStart(width, \"0\");\n}\n", "const re = /^(?:[-+]\\d{2})?\\d{4}(?:-\\d{2}(?:-\\d{2})?)?(?:T\\d{2}:\\d{2}(?::\\d{2}(?:\\.\\d{3})?)?(?:Z|[-+]\\d{2}:?\\d{2})?)?$/;\n\nexport default function parse(string, fallback) {\n  if (!re.test(string += \"\")) return typeof fallback === \"function\" ? fallback(string) : fallback;\n  return new Date(string);\n}\n", "import {bisector, extent, median, pairs, timeFormat, utcFormat} from \"d3\";\nimport {utcSecond, utcMinute, utcHour, unixDay, utcWeek, utcMonth, utcYear} from \"d3\";\nimport {utcMonday, utcTuesday, utcWednesday, utcThursday, utcFriday, utcSaturday, utcSunday} from \"d3\";\nimport {timeSecond, timeMinute, timeHour, timeDay, timeWeek, timeMonth, timeYear} from \"d3\";\nimport {timeMonday, timeTuesday, timeWednesday, timeThursday, timeFriday, timeSaturday, timeSunday} from \"d3\";\nimport {orderof} from \"./options.js\";\n\nconst durationSecond = 1000;\nconst durationMinute = durationSecond * 60;\nconst durationHour = durationMinute * 60;\nconst durationDay = durationHour * 24;\nconst durationWeek = durationDay * 7;\nconst durationMonth = durationDay * 30;\nconst durationYear = durationDay * 365;\n\n// See https://github.com/d3/d3-time/blob/9e8dc940f38f78d7588aad68a54a25b1f0c2d97b/src/ticks.js#L14-L33\nconst formats = [\n  [\"millisecond\", 0.5 * durationSecond],\n  [\"second\", durationSecond],\n  [\"second\", 30 * durationSecond],\n  [\"minute\", durationMinute],\n  [\"minute\", 30 * durationMinute],\n  [\"hour\", durationHour],\n  [\"hour\", 12 * durationHour],\n  [\"day\", durationDay],\n  [\"day\", 2 * durationDay],\n  [\"week\", durationWeek],\n  [\"month\", durationMonth],\n  [\"month\", 3 * durationMonth],\n  [\"year\", durationYear]\n];\n\nconst timeIntervals = new Map([\n  [\"second\", timeSecond],\n  [\"minute\", timeMinute],\n  [\"hour\", timeHour],\n  [\"day\", timeDay], // TODO local time equivalent of unixDay?\n  [\"week\", timeWeek],\n  [\"month\", timeMonth],\n  [\"year\", timeYear],\n  [\"monday\", timeMonday],\n  [\"tuesday\", timeTuesday],\n  [\"wednesday\", timeWednesday],\n  [\"thursday\", timeThursday],\n  [\"friday\", timeFriday],\n  [\"saturday\", timeSaturday],\n  [\"sunday\", timeSunday]\n]);\n\nconst utcIntervals = new Map([\n  [\"second\", utcSecond],\n  [\"minute\", utcMinute],\n  [\"hour\", utcHour],\n  [\"day\", unixDay],\n  [\"week\", utcWeek],\n  [\"month\", utcMonth],\n  [\"year\", utcYear],\n  [\"monday\", utcMonday],\n  [\"tuesday\", utcTuesday],\n  [\"wednesday\", utcWednesday],\n  [\"thursday\", utcThursday],\n  [\"friday\", utcFriday],\n  [\"saturday\", utcSaturday],\n  [\"sunday\", utcSunday]\n]);\n\nfunction parseInterval(input, intervals) {\n  let name = `${input}`.toLowerCase();\n  if (name.endsWith(\"s\")) name = name.slice(0, -1); // drop plural\n  let period = 1;\n  const match = /^(?:(\\d+)\\s+)/.exec(name);\n  if (match) {\n    name = name.slice(match[0].length);\n    period = +match[1];\n  }\n  switch (name) {\n    case \"quarter\":\n      name = \"month\";\n      period *= 3;\n      break;\n    case \"half\":\n      name = \"month\";\n      period *= 6;\n      break;\n  }\n  let interval = intervals.get(name);\n  if (!interval) throw new Error(`unknown interval: ${input}`);\n  if (!(period > 1)) return interval;\n  if (!interval.every) throw new Error(`non-periodic interval: ${name}`);\n  return interval.every(period);\n}\n\nexport function maybeTimeInterval(interval) {\n  return parseInterval(interval, timeIntervals);\n}\n\nexport function maybeUtcInterval(interval) {\n  return parseInterval(interval, utcIntervals);\n}\n\nexport function isUtcYear(i) {\n  if (!i) return false;\n  const date = i.floor(new Date(Date.UTC(2000, 11, 31)));\n  return utcYear(date) >= date; // coercing equality\n}\n\nexport function isTimeYear(i) {\n  if (!i) return false;\n  const date = i.floor(new Date(2000, 11, 31));\n  return timeYear(date) >= date; // coercing equality\n}\n\nexport function formatTimeTicks(scale, data, ticks, anchor) {\n  const format = scale.type === \"time\" ? timeFormat : utcFormat;\n  const template =\n    anchor === \"left\" || anchor === \"right\"\n      ? (f1, f2) => `\\n${f1}\\n${f2}` // extra newline to keep f1 centered\n      : anchor === \"top\"\n      ? (f1, f2) => `${f2}\\n${f1}`\n      : (f1, f2) => `${f1}\\n${f2}`;\n  switch (getTimeTicksInterval(scale, data, ticks)) {\n    case \"millisecond\":\n      return formatConditional(format(\".%L\"), format(\":%M:%S\"), template);\n    case \"second\":\n      return formatConditional(format(\":%S\"), format(\"%-I:%M\"), template);\n    case \"minute\":\n      return formatConditional(format(\"%-I:%M\"), format(\"%p\"), template);\n    case \"hour\":\n      return formatConditional(format(\"%-I %p\"), format(\"%b %-d\"), template);\n    case \"day\":\n      return formatConditional(format(\"%-d\"), format(\"%b\"), template);\n    case \"week\":\n      return formatConditional(format(\"%-d\"), format(\"%b\"), template);\n    case \"month\":\n      return formatConditional(format(\"%b\"), format(\"%Y\"), template);\n    case \"year\":\n      return format(\"%Y\");\n  }\n  throw new Error(\"unable to format time ticks\");\n}\n\n// Compute the median difference between adjacent ticks, ignoring repeated\n// ticks; this implies an effective time interval, assuming that ticks are\n// regularly spaced; choose the largest format less than this interval so that\n// the ticks show the field that is changing. If the ticks are not available,\n// fallback to an approximation based on the desired number of ticks.\nfunction getTimeTicksInterval(scale, data, ticks) {\n  const medianStep = median(pairs(data, (a, b) => Math.abs(b - a) || NaN));\n  if (medianStep > 0) return formats[bisector(([, step]) => step).right(formats, medianStep, 1, formats.length) - 1][0];\n  const [start, stop] = extent(scale.domain());\n  const count = typeof ticks === \"number\" ? ticks : 10;\n  const step = Math.abs(stop - start) / count;\n  return formats[bisector(([, step]) => Math.log(step)).center(formats, Math.log(step))][0];\n}\n\nfunction formatConditional(format1, format2, template) {\n  return (x, i, X) => {\n    const f1 = format1(x, i); // always shown\n    const f2 = format2(x, i); // only shown if different\n    const j = i - orderof(X); // detect reversed domains\n    return i !== j && X[j] !== undefined && f2 === format2(X[j], j) ? f1 : template(f1, f2);\n  };\n}\n", "import {color, descending, quantile, range as rangei} from \"d3\";\nimport {parse as isoParse} from \"isoformat\";\nimport {defined} from \"./defined.js\";\nimport {maybeTimeInterval, maybeUtcInterval} from \"./time.js\";\n\n// https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/TypedArray\nexport const TypedArray = Object.getPrototypeOf(Uint8Array);\nconst objectToString = Object.prototype.toString;\n\nexport function valueof(data, value, type) {\n  const valueType = typeof value;\n  return valueType === \"string\"\n    ? maybeTypedMap(data, field(value), type)\n    : valueType === \"function\"\n    ? maybeTypedMap(data, value, type)\n    : valueType === \"number\" || value instanceof Date || valueType === \"boolean\"\n    ? map(data, constant(value), type)\n    : typeof value?.transform === \"function\"\n    ? maybeTypedArrayify(value.transform(data), type)\n    : maybeTypedArrayify(value, type);\n}\n\nfunction maybeTypedMap(data, f, type) {\n  return map(data, type?.prototype instanceof TypedArray ? floater(f) : f, type);\n}\n\nfunction maybeTypedArrayify(data, type) {\n  return type === undefined\n    ? arrayify(data) // preserve undefined type\n    : data instanceof type\n    ? data\n    : type.prototype instanceof TypedArray && !(data instanceof TypedArray)\n    ? type.from(data, coerceNumber)\n    : type.from(data);\n}\n\nfunction floater(f) {\n  return (d, i) => coerceNumber(f(d, i));\n}\n\nexport const singleton = [null]; // for data-less decoration marks, e.g. frame\nexport const field = (name) => (d) => d[name];\nexport const indexOf = {transform: range};\nexport const identity = {transform: (d) => d};\nexport const zero = () => 0;\nexport const one = () => 1;\nexport const yes = () => true;\nexport const string = (x) => (x == null ? x : `${x}`);\nexport const number = (x) => (x == null ? x : +x);\nexport const boolean = (x) => (x == null ? x : !!x);\nexport const first = (x) => (x ? x[0] : undefined);\nexport const second = (x) => (x ? x[1] : undefined);\nexport const third = (x) => (x ? x[2] : undefined);\nexport const constant = (x) => () => x;\n\n// Converts a string like \u201Cp25\u201D into a function that takes an index I and an\n// accessor function f, returning the corresponding percentile value.\nexport function percentile(reduce) {\n  const p = +`${reduce}`.slice(1) / 100;\n  return (I, f) => quantile(I, p, f);\n}\n\n// If the values are specified as a typed array, no coercion is required.\nexport function coerceNumbers(values) {\n  return values instanceof TypedArray ? values : map(values, coerceNumber, Float64Array);\n}\n\n// Unlike Mark\u2019s number, here we want to convert null and undefined to NaN since\n// the result will be stored in a Float64Array and we don\u2019t want null to be\n// coerced to zero. We use Number instead of unary + to allow BigInt coercion.\nfunction coerceNumber(x) {\n  return x == null ? NaN : Number(x);\n}\n\nexport function coerceDates(values) {\n  return map(values, coerceDate);\n}\n\n// When coercing strings to dates, we only want to allow the ISO 8601 format\n// since the built-in string parsing of the Date constructor varies across\n// browsers. (In the future, this could be made more liberal if desired, though\n// it is still generally preferable to do date parsing yourself explicitly,\n// rather than rely on Plot.) Any non-string values are coerced to number first\n// and treated as milliseconds since UNIX epoch.\nexport function coerceDate(x) {\n  return x instanceof Date && !isNaN(x)\n    ? x\n    : typeof x === \"string\"\n    ? isoParse(x)\n    : x == null || isNaN((x = +x))\n    ? undefined\n    : new Date(x);\n}\n\n// Some channels may allow a string constant to be specified; to differentiate\n// string constants (e.g., \"red\") from named fields (e.g., \"date\"), this\n// function tests whether the given value is a CSS color string and returns a\n// tuple [channel, constant] where one of the two is undefined, and the other is\n// the given value. If you wish to reference a named field that is also a valid\n// CSS color, use an accessor (d => d.red) instead.\nexport function maybeColorChannel(value, defaultValue) {\n  if (value === undefined) value = defaultValue;\n  return value === null ? [undefined, \"none\"] : isColor(value) ? [undefined, value] : [value, undefined];\n}\n\n// Similar to maybeColorChannel, this tests whether the given value is a number\n// indicating a constant, and otherwise assumes that it\u2019s a channel value.\nexport function maybeNumberChannel(value, defaultValue) {\n  if (value === undefined) value = defaultValue;\n  return value === null || typeof value === \"number\" ? [undefined, value] : [value, undefined];\n}\n\n// Validates the specified optional string against the allowed list of keywords.\nexport function maybeKeyword(input, name, allowed) {\n  if (input != null) return keyword(input, name, allowed);\n}\n\n// Validates the specified required string against the allowed list of keywords.\nexport function keyword(input, name, allowed) {\n  const i = `${input}`.toLowerCase();\n  if (!allowed.includes(i)) throw new Error(`invalid ${name}: ${input}`);\n  return i;\n}\n\n// Promotes the specified data to an array as needed.\nexport function arrayify(data) {\n  return data == null || data instanceof Array || data instanceof TypedArray ? data : Array.from(data);\n}\n\n// An optimization of type.from(values, f): if the given values are already an\n// instanceof the desired array type, the faster values.map method is used.\nexport function map(values, f, type = Array) {\n  return values == null ? values : values instanceof type ? values.map(f) : type.from(values, f);\n}\n\n// An optimization of type.from(values): if the given values are already an\n// instanceof the desired array type, the faster values.slice method is used.\nexport function slice(values, type = Array) {\n  return values instanceof type ? values.slice() : type.from(values);\n}\n\n// Returns true if any of x, x1, or x2 is not (strictly) undefined.\nexport function hasX({x, x1, x2}) {\n  return x !== undefined || x1 !== undefined || x2 !== undefined;\n}\n\n// Returns true if any of y, y1, or y2 is not (strictly) undefined.\nexport function hasY({y, y1, y2}) {\n  return y !== undefined || y1 !== undefined || y2 !== undefined;\n}\n\n// Returns true if has x or y, or if interval is not (strictly) undefined.\nexport function hasXY(options) {\n  return hasX(options) || hasY(options) || options.interval !== undefined;\n}\n\n// Disambiguates an options object (e.g., {y: \"x2\"}) from a primitive value.\nexport function isObject(option) {\n  return option?.toString === objectToString;\n}\n\n// Disambiguates a scale options object (e.g., {color: {type: \"linear\"}}) from\n// some other option (e.g., {color: \"red\"}). When creating standalone legends,\n// this is used to test whether a scale is defined; this should be consistent\n// with inferScaleType when there are no channels associated with the scale, and\n// if this returns true, then normalizeScale must return non-null.\nexport function isScaleOptions(option) {\n  return isObject(option) && (option.type !== undefined || option.domain !== undefined);\n}\n\n// Disambiguates an options object (e.g., {y: \"x2\"}) from a channel value\n// definition expressed as a channel transform (e.g., {transform: \u2026}).\nexport function isOptions(option) {\n  return isObject(option) && typeof option.transform !== \"function\";\n}\n\n// Disambiguates a sort transform (e.g., {sort: \"date\"}) from a channel domain\n// sort definition (e.g., {sort: {y: \"x\"}}).\nexport function isDomainSort(sort) {\n  return isOptions(sort) && sort.value === undefined && sort.channel === undefined;\n}\n\n// For marks specified either as [0, x] or [x1, x2], such as areas and bars.\nexport function maybeZero(x, x1, x2, x3 = identity) {\n  if (x1 === undefined && x2 === undefined) {\n    // {x} or {}\n    (x1 = 0), (x2 = x === undefined ? x3 : x);\n  } else if (x1 === undefined) {\n    // {x, x2} or {x2}\n    x1 = x === undefined ? 0 : x;\n  } else if (x2 === undefined) {\n    // {x, x1} or {x1}\n    x2 = x === undefined ? 0 : x;\n  }\n  return [x1, x2];\n}\n\n// For marks that have x and y channels (e.g., cell, dot, line, text).\nexport function maybeTuple(x, y) {\n  return x === undefined && y === undefined ? [first, second] : [x, y];\n}\n\n// A helper for extracting the z channel, if it is variable. Used by transforms\n// that require series, such as moving average and normalize.\nexport function maybeZ({z, fill, stroke} = {}) {\n  if (z === undefined) [z] = maybeColorChannel(fill);\n  if (z === undefined) [z] = maybeColorChannel(stroke);\n  return z;\n}\n\n// Returns a Uint32Array with elements [0, 1, 2, \u2026 data.length - 1].\nexport function range(data) {\n  const n = data.length;\n  const r = new Uint32Array(n);\n  for (let i = 0; i < n; ++i) r[i] = i;\n  return r;\n}\n\n// Returns a filtered range of data given the test function.\nexport function where(data, test) {\n  return range(data).filter((i) => test(data[i], i, data));\n}\n\n// Returns an array [values[index[0]], values[index[1]], \u2026].\nexport function take(values, index) {\n  return map(index, (i) => values[i]);\n}\n\n// If f does not take exactly one argument, wraps it in a function that uses take.\nexport function taker(f) {\n  return f.length === 1 ? (index, values) => f(take(values, index)) : f;\n}\n\n// Uses subarray if available, and otherwise slice.\nexport function subarray(I, i, j) {\n  return I.subarray ? I.subarray(i, j) : I.slice(i, j);\n}\n\n// Based on InternMap (d3.group).\nexport function keyof(value) {\n  return value !== null && typeof value === \"object\" ? value.valueOf() : value;\n}\n\nexport function maybeInput(key, options) {\n  if (options[key] !== undefined) return options[key];\n  switch (key) {\n    case \"x1\":\n    case \"x2\":\n      key = \"x\";\n      break;\n    case \"y1\":\n    case \"y2\":\n      key = \"y\";\n      break;\n  }\n  return options[key];\n}\n\nexport function column(source) {\n  // Defines a column whose values are lazily populated by calling the returned\n  // setter. If the given source is labeled, the label is propagated to the\n  // returned column definition.\n  let value;\n  return [\n    {\n      transform: () => value,\n      label: labelof(source)\n    },\n    (v) => (value = v)\n  ];\n}\n\n// Like column, but allows the source to be null.\nexport function maybeColumn(source) {\n  return source == null ? [source] : column(source);\n}\n\nexport function labelof(value, defaultValue) {\n  return typeof value === \"string\" ? value : value && value.label !== undefined ? value.label : defaultValue;\n}\n\n// Assuming that both x1 and x2 and lazy columns (per above), this derives a new\n// a column that\u2019s the average of the two, and which inherits the column label\n// (if any). Both input columns are assumed to be quantitative. If either column\n// is temporal, the returned column is also temporal.\nexport function mid(x1, x2) {\n  return {\n    transform(data) {\n      const X1 = x1.transform(data);\n      const X2 = x2.transform(data);\n      return isTemporal(X1) || isTemporal(X2)\n        ? map(X1, (_, i) => new Date((+X1[i] + +X2[i]) / 2))\n        : map(X1, (_, i) => (+X1[i] + +X2[i]) / 2, Float64Array);\n    },\n    label: x1.label\n  };\n}\n\n// If the scale options declare an interval, applies it to the values V.\nexport function maybeApplyInterval(V, scale) {\n  const t = maybeIntervalTransform(scale?.interval, scale?.type);\n  return t ? map(V, t) : V;\n}\n\n// Returns the equivalent scale transform for the specified interval option.\nexport function maybeIntervalTransform(interval, type) {\n  const i = maybeInterval(interval, type);\n  return i && ((v) => (defined(v) ? i.floor(v) : v));\n}\n\n// If interval is not nullish, converts interval shorthand such as a number (for\n// multiples) or a time interval name (such as \u201Cday\u201D) to a {floor, offset,\n// range} object similar to a D3 time interval.\nexport function maybeInterval(interval, type) {\n  if (interval == null) return;\n  if (typeof interval === \"number\") {\n    if (0 < interval && interval < 1 && Number.isInteger(1 / interval)) interval = -1 / interval;\n    const n = Math.abs(interval);\n    return interval < 0\n      ? {\n          floor: (d) => Math.floor(d * n) / n,\n          offset: (d) => (d * n + 1) / n, // note: no optional step for simplicity\n          range: (lo, hi) => rangei(Math.ceil(lo * n), hi * n).map((x) => x / n)\n        }\n      : {\n          floor: (d) => Math.floor(d / n) * n,\n          offset: (d) => d + n, // note: no optional step for simplicity\n          range: (lo, hi) => rangei(Math.ceil(lo / n), hi / n).map((x) => x * n)\n        };\n  }\n  if (typeof interval === \"string\") return (type === \"time\" ? maybeTimeInterval : maybeUtcInterval)(interval);\n  if (typeof interval.floor !== \"function\") throw new Error(\"invalid interval; missing floor method\");\n  if (typeof interval.offset !== \"function\") throw new Error(\"invalid interval; missing offset method\");\n  return interval;\n}\n\n// Like maybeInterval, but requires a range method too.\nexport function maybeRangeInterval(interval, type) {\n  interval = maybeInterval(interval, type);\n  if (interval && typeof interval.range !== \"function\") throw new Error(\"invalid interval: missing range method\");\n  return interval;\n}\n\n// Like maybeRangeInterval, but requires a ceil method too.\nexport function maybeNiceInterval(interval, type) {\n  interval = maybeRangeInterval(interval, type);\n  if (interval && typeof interval.ceil !== \"function\") throw new Error(\"invalid interval: missing ceil method\");\n  return interval;\n}\n\n// This distinguishes between per-dimension options and a standalone value.\nexport function maybeValue(value) {\n  return value === undefined || isOptions(value) ? value : {value};\n}\n\n// Coerces the given channel values (if any) to numbers. This is useful when\n// values will be interpolated into other code, such as an SVG transform, and\n// where we don\u2019t wish to allow unexpected behavior for weird input.\nexport function numberChannel(source) {\n  return source == null\n    ? null\n    : {\n        transform: (data) => valueof(data, source, Float64Array),\n        label: labelof(source)\n      };\n}\n\nexport function isTuples(data) {\n  if (!isIterable(data)) return false;\n  for (const d of data) {\n    if (d == null) continue;\n    return typeof d === \"object\" && \"0\" in d && \"1\" in d;\n  }\n}\n\nexport function isIterable(value) {\n  return value && typeof value[Symbol.iterator] === \"function\";\n}\n\nexport function isTextual(values) {\n  for (const value of values) {\n    if (value == null) continue;\n    return typeof value !== \"object\" || value instanceof Date;\n  }\n}\n\nexport function isOrdinal(values) {\n  for (const value of values) {\n    if (value == null) continue;\n    const type = typeof value;\n    return type === \"string\" || type === \"boolean\";\n  }\n}\n\nexport function isTemporal(values) {\n  for (const value of values) {\n    if (value == null) continue;\n    return value instanceof Date;\n  }\n}\n\n// Are these strings that might represent dates? This is stricter than ISO 8601\n// because we want to ignore false positives on numbers; for example, the string\n// \"1192\" is more likely to represent a number than a date even though it is\n// valid ISO 8601 representing 1192-01-01.\nexport function isTemporalString(values) {\n  for (const value of values) {\n    if (value == null) continue;\n    return typeof value === \"string\" && isNaN(value) && isoParse(value);\n  }\n}\n\n// Are these strings that might represent numbers? This is stricter than\n// coercion because we want to ignore false positives on e.g. empty strings.\nexport function isNumericString(values) {\n  for (const value of values) {\n    if (value == null) continue;\n    if (typeof value !== \"string\") return false;\n    if (!value.trim()) continue;\n    return !isNaN(value);\n  }\n}\n\nexport function isNumeric(values) {\n  for (const value of values) {\n    if (value == null) continue;\n    return typeof value === \"number\";\n  }\n}\n\n// Returns true if every non-null value in the specified iterable of values\n// passes the specified predicate, and there is at least one non-null value;\n// returns false if at least one non-null value does not pass the specified\n// predicate; otherwise returns undefined (as if all values are null).\nexport function isEvery(values, is) {\n  let every;\n  for (const value of values) {\n    if (value == null) continue;\n    if (!is(value)) return false;\n    every = true;\n  }\n  return every;\n}\n\n// Mostly relies on d3-color, with a few extra color keywords. Currently this\n// strictly requires that the value be a string; we might want to apply string\n// coercion here, though note that d3-color instances would need to support\n// valueOf to work correctly with InternMap.\n// https://www.w3.org/TR/SVG11/painting.html#SpecifyingPaint\nexport function isColor(value) {\n  if (typeof value !== \"string\") return false;\n  value = value.toLowerCase().trim();\n  return (\n    value === \"none\" ||\n    value === \"currentcolor\" ||\n    (value.startsWith(\"url(\") && value.endsWith(\")\")) || // <funciri>, e.g. pattern or gradient\n    (value.startsWith(\"var(\") && value.endsWith(\")\")) || // CSS variable\n    color(value) !== null\n  );\n}\n\nexport function isOpacity(value) {\n  return typeof value === \"number\" && ((0 <= value && value <= 1) || isNaN(value));\n}\n\nexport function isNoneish(value) {\n  return value == null || isNone(value);\n}\n\nexport function isNone(value) {\n  return /^\\s*none\\s*$/i.test(value);\n}\n\nexport function isRound(value) {\n  return /^\\s*round\\s*$/i.test(value);\n}\n\nexport function maybeAnchor(value, name) {\n  return maybeKeyword(value, name, [\n    \"middle\",\n    \"top-left\",\n    \"top\",\n    \"top-right\",\n    \"right\",\n    \"bottom-right\",\n    \"bottom\",\n    \"bottom-left\",\n    \"left\"\n  ]);\n}\n\nexport function maybeFrameAnchor(value = \"middle\") {\n  return maybeAnchor(value, \"frameAnchor\");\n}\n\n// Like a sort comparator, returns a positive value if the given array of values\n// is in ascending order, a negative value if the values are in descending\n// order. Assumes monotonicity; only tests the first and last values.\nexport function orderof(values) {\n  if (values == null) return;\n  const first = values[0];\n  const last = values[values.length - 1];\n  return descending(first, last);\n}\n\n// Unlike {...defaults, ...options}, this ensures that any undefined (but\n// present) properties in options inherit the given default value.\nexport function inherit(options = {}, ...rest) {\n  let o = options;\n  for (const defaults of rest) {\n    for (const key in defaults) {\n      if (o[key] === undefined) {\n        const value = defaults[key];\n        if (o === options) o = {...o, [key]: value};\n        else o[key] = value;\n      }\n    }\n  }\n  return o;\n}\n\n// Given an iterable of named things (objects with a name property), returns a\n// corresponding object with properties associated with the given name.\nexport function named(things) {\n  console.warn(\"named iterables are deprecated; please use an object instead\");\n  const names = new Set();\n  return Object.fromEntries(\n    Array.from(things, (thing) => {\n      const {name} = thing;\n      if (name == null) throw new Error(\"missing name\");\n      const key = `${name}`;\n      if (key === \"__proto__\") throw new Error(`illegal name: ${key}`);\n      if (names.has(key)) throw new Error(`duplicate name: ${key}`);\n      names.add(key);\n      return [name, thing];\n    })\n  );\n}\n\nexport function maybeNamed(things) {\n  return isIterable(things) ? named(things) : things;\n}\n", "// Positional scales have associated axes, and for ordinal data, a point or band\n// scale is used instead of an ordinal scale.\nexport const position = Symbol(\"position\");\n\n// Color scales default to the turbo interpolator for quantitative data, and to\n// the Tableau10 scheme for ordinal data. Color scales may also have an\n// associated legend.\nexport const color = Symbol(\"color\");\n\n// Radius scales default to the sqrt type, have a default range of [0, 3], and a\n// default domain from 0 to the median first quartile of associated channels.\nexport const radius = Symbol(\"radius\");\n\n// Length scales default to the linear type, have a default range of [0, 12],\n// and a default domain from 0 to the median median of associated channels.\nexport const length = Symbol(\"length\");\n\n// Opacity scales have a default range of [0, 1], and a default domain from 0 to\n// the maximum value of associated channels.\nexport const opacity = Symbol(\"opacity\");\n\n// Symbol scales have a default range of categorical symbols.\nexport const symbol = Symbol(\"symbol\");\n\n// There isn\u2019t really a projection scale; this represents x and y for geometry.\nexport const projection = Symbol(\"projection\");\n\n// TODO Rather than hard-coding the list of known scale names, collect the names\n// and categories for each plot specification, so that custom marks can register\n// custom scales.\nexport const registry = new Map([\n  [\"x\", position],\n  [\"y\", position],\n  [\"fx\", position],\n  [\"fy\", position],\n  [\"r\", radius],\n  [\"color\", color],\n  [\"opacity\", opacity],\n  [\"symbol\", symbol],\n  [\"length\", length],\n  [\"projection\", projection]\n]);\n", "import {symbolAsterisk, symbolDiamond2, symbolPlus, symbolSquare2, symbolTriangle2, symbolTimes} from \"d3\";\nimport {symbolCircle, symbolCross, symbolDiamond, symbolSquare, symbolStar, symbolTriangle, symbolWye} from \"d3\";\n\nexport const sqrt3 = Math.sqrt(3);\nexport const sqrt4_3 = 2 / sqrt3;\n\nconst symbolHexagon = {\n  draw(context, size) {\n    const rx = Math.sqrt(size / Math.PI),\n      ry = rx * sqrt4_3,\n      hy = ry / 2;\n    context.moveTo(0, ry);\n    context.lineTo(rx, hy);\n    context.lineTo(rx, -hy);\n    context.lineTo(0, -ry);\n    context.lineTo(-rx, -hy);\n    context.lineTo(-rx, hy);\n    context.closePath();\n  }\n};\n\nconst symbols = new Map([\n  [\"asterisk\", symbolAsterisk],\n  [\"circle\", symbolCircle],\n  [\"cross\", symbolCross],\n  [\"diamond\", symbolDiamond],\n  [\"diamond2\", symbolDiamond2],\n  [\"hexagon\", symbolHexagon],\n  [\"plus\", symbolPlus],\n  [\"square\", symbolSquare],\n  [\"square2\", symbolSquare2],\n  [\"star\", symbolStar],\n  [\"times\", symbolTimes],\n  [\"triangle\", symbolTriangle],\n  [\"triangle2\", symbolTriangle2],\n  [\"wye\", symbolWye]\n]);\n\nfunction isSymbolObject(value) {\n  return value && typeof value.draw === \"function\";\n}\n\nexport function isSymbol(value) {\n  if (isSymbolObject(value)) return true;\n  if (typeof value !== \"string\") return false;\n  return symbols.has(value.toLowerCase());\n}\n\nexport function maybeSymbol(symbol) {\n  if (symbol == null || isSymbolObject(symbol)) return symbol;\n  const value = symbols.get(`${symbol}`.toLowerCase());\n  if (value) return value;\n  throw new Error(`invalid symbol: ${symbol}`);\n}\n\nexport function maybeSymbolChannel(symbol) {\n  if (symbol == null || isSymbolObject(symbol)) return [undefined, symbol];\n  if (typeof symbol === \"string\") {\n    const value = symbols.get(`${symbol}`.toLowerCase());\n    if (value) return [undefined, value];\n  }\n  return [symbol, undefined];\n}\n", "import {randomLcg} from \"d3\";\nimport {ascendingDefined, descendingDefined} from \"../defined.js\";\nimport {arrayify, isDomainSort, isOptions, maybeValue, valueof} from \"../options.js\";\n\nexport function basic({filter: f1, sort: s1, reverse: r1, transform: t1, initializer: i1, ...options} = {}, transform) {\n  // If both t1 and t2 are defined, returns a composite transform that first\n  // applies t1 and then applies t2.\n  if (t1 === undefined) {\n    // explicit transform overrides filter, sort, and reverse\n    if (f1 != null) t1 = filterTransform(f1);\n    if (s1 != null && !isDomainSort(s1)) t1 = composeTransform(t1, sortTransform(s1));\n    if (r1) t1 = composeTransform(t1, reverseTransform);\n  }\n  if (transform != null && i1 != null) throw new Error(\"transforms cannot be applied after initializers\");\n  return {\n    ...options,\n    ...((s1 === null || isDomainSort(s1)) && {sort: s1}),\n    transform: composeTransform(t1, transform)\n  };\n}\n\nexport function initializer({filter: f1, sort: s1, reverse: r1, initializer: i1, ...options} = {}, initializer) {\n  // If both i1 and i2 are defined, returns a composite initializer that first\n  // applies i1 and then applies i2.\n  if (i1 === undefined) {\n    // explicit initializer overrides filter, sort, and reverse\n    if (f1 != null) i1 = filterTransform(f1);\n    if (s1 != null && !isDomainSort(s1)) i1 = composeInitializer(i1, sortTransform(s1));\n    if (r1) i1 = composeInitializer(i1, reverseTransform);\n  }\n  return {\n    ...options,\n    ...((s1 === null || isDomainSort(s1)) && {sort: s1}),\n    initializer: composeInitializer(i1, initializer)\n  };\n}\n\nfunction composeTransform(t1, t2) {\n  if (t1 == null) return t2 === null ? undefined : t2;\n  if (t2 == null) return t1 === null ? undefined : t1;\n  return function (data, facets, plotOptions) {\n    ({data, facets} = t1.call(this, data, facets, plotOptions));\n    return t2.call(this, arrayify(data), facets, plotOptions);\n  };\n}\n\nfunction composeInitializer(i1, i2) {\n  if (i1 == null) return i2 === null ? undefined : i2;\n  if (i2 == null) return i1 === null ? undefined : i1;\n  return function (data, facets, channels, ...args) {\n    let c1, d1, f1, c2, d2, f2;\n    ({data: d1 = data, facets: f1 = facets, channels: c1} = i1.call(this, data, facets, channels, ...args));\n    ({data: d2 = d1, facets: f2 = f1, channels: c2} = i2.call(this, d1, f1, {...channels, ...c1}, ...args));\n    return {data: d2, facets: f2, channels: {...c1, ...c2}};\n  };\n}\n\nfunction apply(options, t) {\n  return (options.initializer != null ? initializer : basic)(options, t);\n}\n\nexport function filter(test, options) {\n  return apply(options, filterTransform(test));\n}\n\nfunction filterTransform(value) {\n  return (data, facets) => {\n    const V = valueof(data, value);\n    return {data, facets: facets.map((I) => I.filter((i) => V[i]))};\n  };\n}\n\nexport function reverse({sort, ...options} = {}) {\n  return {\n    ...apply(options, reverseTransform),\n    sort: isDomainSort(sort) ? sort : null\n  };\n}\n\nfunction reverseTransform(data, facets) {\n  return {data, facets: facets.map((I) => I.slice().reverse())};\n}\n\nexport function shuffle({seed, sort, ...options} = {}) {\n  return {\n    ...apply(options, sortValue(seed == null ? Math.random : randomLcg(seed))),\n    sort: isDomainSort(sort) ? sort : null\n  };\n}\n\nexport function sort(order, {sort, ...options} = {}) {\n  return {\n    ...(isOptions(order) && order.channel !== undefined ? initializer : apply)(options, sortTransform(order)),\n    sort: isDomainSort(sort) ? sort : null\n  };\n}\n\nfunction sortTransform(value) {\n  return (typeof value === \"function\" && value.length !== 1 ? sortData : sortValue)(value);\n}\n\nfunction sortData(compare) {\n  return (data, facets) => {\n    const compareData = (i, j) => compare(data[i], data[j]);\n    return {data, facets: facets.map((I) => I.slice().sort(compareData))};\n  };\n}\n\nfunction sortValue(value) {\n  let channel, order;\n  ({channel, value, order} = {...maybeValue(value)});\n  const negate = channel?.startsWith(\"-\");\n  if (negate) channel = channel.slice(1);\n  if (order === undefined) order = negate ? descendingDefined : ascendingDefined;\n  if (typeof order !== \"function\") {\n    switch (`${order}`.toLowerCase()) {\n      case \"ascending\":\n        order = ascendingDefined;\n        break;\n      case \"descending\":\n        order = descendingDefined;\n        break;\n      default:\n        throw new Error(`invalid order: ${order}`);\n    }\n  }\n  return (data, facets, channels) => {\n    let V;\n    if (channel === undefined) {\n      V = valueof(data, value);\n    } else {\n      if (channels === undefined) throw new Error(\"channel sort requires an initializer\");\n      V = channels[channel];\n      if (!V) return {}; // ignore missing channel\n      V = V.value;\n    }\n    const compareValue = (i, j) => order(V[i], V[j]);\n    return {data, facets: facets.map((I) => I.slice().sort(compareValue))};\n  };\n}\n", "import {\n  InternSet,\n  deviation,\n  group as grouper,\n  max,\n  maxIndex,\n  mean,\n  median,\n  min,\n  minIndex,\n  mode,\n  rollup,\n  sort,\n  sum,\n  variance\n} from \"d3\";\nimport {ascendingDefined} from \"../defined.js\";\nimport {\n  column,\n  first,\n  identity,\n  isObject,\n  isTemporal,\n  labelof,\n  maybeApplyInterval,\n  maybeColorChannel,\n  maybeColumn,\n  maybeInput,\n  maybeTuple,\n  percentile,\n  range,\n  second,\n  take,\n  valueof\n} from \"../options.js\";\nimport {basic} from \"./basic.js\";\n\n// Group on {z, fill, stroke}.\nexport function groupZ(outputs, options) {\n  return groupn(null, null, outputs, options);\n}\n\n// Group on {z, fill, stroke}, then on x.\nexport function groupX(outputs = {y: \"count\"}, options = {}) {\n  const {x = identity} = options;\n  if (x == null) throw new Error(\"missing channel: x\");\n  return groupn(x, null, outputs, options);\n}\n\n// Group on {z, fill, stroke}, then on y.\nexport function groupY(outputs = {x: \"count\"}, options = {}) {\n  const {y = identity} = options;\n  if (y == null) throw new Error(\"missing channel: y\");\n  return groupn(null, y, outputs, options);\n}\n\n// Group on {z, fill, stroke}, then on x and y.\nexport function group(outputs = {fill: \"count\"}, options = {}) {\n  let {x, y} = options;\n  [x, y] = maybeTuple(x, y);\n  if (x == null) throw new Error(\"missing channel: x\");\n  if (y == null) throw new Error(\"missing channel: y\");\n  return groupn(x, y, outputs, options);\n}\n\nfunction groupn(\n  x, // optionally group on x\n  y, // optionally group on y\n  {\n    data: reduceData = reduceIdentity,\n    filter,\n    sort,\n    reverse,\n    ...outputs // output channel definitions\n  } = {},\n  inputs = {} // input channels and options\n) {\n  // Compute the outputs.\n  outputs = maybeOutputs(outputs, inputs);\n  reduceData = maybeReduce(reduceData, identity);\n  sort = sort == null ? undefined : maybeOutput(\"sort\", sort, inputs);\n  filter = filter == null ? undefined : maybeEvaluator(\"filter\", filter, inputs);\n\n  // Produce x and y output channels as appropriate.\n  const [GX, setGX] = maybeColumn(x);\n  const [GY, setGY] = maybeColumn(y);\n\n  // Greedily materialize the z, fill, and stroke channels (if channels and not\n  // constants) so that we can reference them for subdividing groups without\n  // computing them more than once.\n  const {\n    z,\n    fill,\n    stroke,\n    x1,\n    x2, // consumed if x is an output\n    y1,\n    y2, // consumed if y is an output\n    ...options\n  } = inputs;\n  const [GZ, setGZ] = maybeColumn(z);\n  const [vfill] = maybeColorChannel(fill);\n  const [vstroke] = maybeColorChannel(stroke);\n  const [GF, setGF] = maybeColumn(vfill);\n  const [GS, setGS] = maybeColumn(vstroke);\n\n  return {\n    ...(\"z\" in inputs && {z: GZ || z}),\n    ...(\"fill\" in inputs && {fill: GF || fill}),\n    ...(\"stroke\" in inputs && {stroke: GS || stroke}),\n    ...basic(options, (data, facets, plotOptions) => {\n      const X = maybeApplyInterval(valueof(data, x), plotOptions?.x);\n      const Y = maybeApplyInterval(valueof(data, y), plotOptions?.y);\n      const Z = valueof(data, z);\n      const F = valueof(data, vfill);\n      const S = valueof(data, vstroke);\n      const G = maybeSubgroup(outputs, {z: Z, fill: F, stroke: S});\n      const groupFacets = [];\n      const groupData = [];\n      const GX = X && setGX([]);\n      const GY = Y && setGY([]);\n      const GZ = Z && setGZ([]);\n      const GF = F && setGF([]);\n      const GS = S && setGS([]);\n      let i = 0;\n      for (const o of outputs) o.initialize(data);\n      if (sort) sort.initialize(data);\n      if (filter) filter.initialize(data);\n      for (const facet of facets) {\n        const groupFacet = [];\n        for (const o of outputs) o.scope(\"facet\", facet);\n        if (sort) sort.scope(\"facet\", facet);\n        if (filter) filter.scope(\"facet\", facet);\n        for (const [f, I] of maybeGroup(facet, G)) {\n          for (const [y, gg] of maybeGroup(I, Y)) {\n            for (const [x, g] of maybeGroup(gg, X)) {\n              if (filter && !filter.reduce(g)) continue;\n              groupFacet.push(i++);\n              groupData.push(reduceData.reduceIndex(g, data));\n              if (X) GX.push(x);\n              if (Y) GY.push(y);\n              if (Z) GZ.push(G === Z ? f : Z[g[0]]);\n              if (F) GF.push(G === F ? f : F[g[0]]);\n              if (S) GS.push(G === S ? f : S[g[0]]);\n              for (const o of outputs) o.reduce(g);\n              if (sort) sort.reduce(g);\n            }\n          }\n        }\n        groupFacets.push(groupFacet);\n      }\n      maybeSort(groupFacets, sort, reverse);\n      return {data: groupData, facets: groupFacets};\n    }),\n    ...(!hasOutput(outputs, \"x\") && (GX ? {x: GX} : {x1, x2})),\n    ...(!hasOutput(outputs, \"y\") && (GY ? {y: GY} : {y1, y2})),\n    ...Object.fromEntries(outputs.map(({name, output}) => [name, output]))\n  };\n}\n\nexport function hasOutput(outputs, ...names) {\n  for (const {name} of outputs) {\n    if (names.includes(name)) {\n      return true;\n    }\n  }\n  return false;\n}\n\nexport function maybeOutputs(outputs, inputs, asOutput = maybeOutput) {\n  const entries = Object.entries(outputs);\n  // Propagate standard mark channels by default.\n  if (inputs.title != null && outputs.title === undefined) entries.push([\"title\", reduceTitle]);\n  if (inputs.href != null && outputs.href === undefined) entries.push([\"href\", reduceFirst]);\n  return entries\n    .filter(([, reduce]) => reduce !== undefined)\n    .map(([name, reduce]) => (reduce === null ? nullOutput(name) : asOutput(name, reduce, inputs)));\n}\n\nexport function maybeOutput(name, reduce, inputs, asEvaluator = maybeEvaluator) {\n  let scale; // optional per-channel scale override\n  if (isObject(reduce) && \"reduce\" in reduce) (scale = reduce.scale), (reduce = reduce.reduce); // N.B. array.reduce\n  const evaluator = asEvaluator(name, reduce, inputs);\n  const [output, setOutput] = column(evaluator.label);\n  let O;\n  return {\n    name,\n    output: scale === undefined ? output : {value: output, scale},\n    initialize(data) {\n      evaluator.initialize(data);\n      O = setOutput([]);\n    },\n    scope(scope, I) {\n      evaluator.scope(scope, I);\n    },\n    reduce(I, extent) {\n      O.push(evaluator.reduce(I, extent));\n    }\n  };\n}\n\nfunction nullOutput(name) {\n  return {name, initialize() {}, scope() {}, reduce() {}};\n}\n\nexport function maybeEvaluator(name, reduce, inputs, asReduce = maybeReduce) {\n  const input = maybeInput(name, inputs);\n  const reducer = asReduce(reduce, input);\n  let V, context;\n  return {\n    label: labelof(reducer === reduceCount ? null : input, reducer.label),\n    initialize(data) {\n      V = input === undefined ? data : valueof(data, input);\n      if (reducer.scope === \"data\") {\n        context = reducer.reduceIndex(range(data), V);\n      }\n    },\n    scope(scope, I) {\n      if (reducer.scope === scope) {\n        context = reducer.reduceIndex(I, V);\n      }\n    },\n    reduce(I, extent) {\n      return reducer.scope == null ? reducer.reduceIndex(I, V, extent) : reducer.reduceIndex(I, V, context, extent);\n    }\n  };\n}\n\nexport function maybeGroup(I, X) {\n  return X\n    ? sort(\n        grouper(I, (i) => X[i]),\n        first\n      )\n    : [[, I]];\n}\n\nexport function maybeReduce(reduce, value, fallback = invalidReduce) {\n  if (reduce == null) return fallback(reduce);\n  if (typeof reduce.reduceIndex === \"function\") return reduce;\n  if (typeof reduce.reduce === \"function\" && isObject(reduce)) return reduceReduce(reduce); // N.B. array.reduce\n  if (typeof reduce === \"function\") return reduceFunction(reduce);\n  if (/^p\\d{2}$/i.test(reduce)) return reduceAccessor(percentile(reduce));\n  switch (`${reduce}`.toLowerCase()) {\n    case \"first\":\n      return reduceFirst;\n    case \"last\":\n      return reduceLast;\n    case \"identity\":\n      return reduceIdentity;\n    case \"count\":\n      return reduceCount;\n    case \"distinct\":\n      return reduceDistinct;\n    case \"sum\":\n      return value == null ? reduceCount : reduceSum;\n    case \"proportion\":\n      return reduceProportion(value, \"data\");\n    case \"proportion-facet\":\n      return reduceProportion(value, \"facet\");\n    case \"deviation\":\n      return reduceAccessor(deviation);\n    case \"min\":\n      return reduceAccessor(min);\n    case \"min-index\":\n      return reduceAccessor(minIndex);\n    case \"max\":\n      return reduceAccessor(max);\n    case \"max-index\":\n      return reduceAccessor(maxIndex);\n    case \"mean\":\n      return reduceMaybeTemporalAccessor(mean);\n    case \"median\":\n      return reduceMaybeTemporalAccessor(median);\n    case \"variance\":\n      return reduceAccessor(variance);\n    case \"mode\":\n      return reduceAccessor(mode);\n  }\n  return fallback(reduce);\n}\n\nfunction invalidReduce(reduce) {\n  throw new Error(`invalid reduce: ${reduce}`);\n}\n\nexport function maybeSubgroup(outputs, inputs) {\n  for (const name in inputs) {\n    const value = inputs[name];\n    if (value !== undefined && !outputs.some((o) => o.name === name)) {\n      return value;\n    }\n  }\n}\n\nexport function maybeSort(facets, sort, reverse) {\n  if (sort) {\n    const S = sort.output.transform();\n    const compare = (i, j) => ascendingDefined(S[i], S[j]);\n    facets.forEach((f) => f.sort(compare));\n  }\n  if (reverse) {\n    facets.forEach((f) => f.reverse());\n  }\n}\n\nfunction reduceReduce(reduce) {\n  console.warn(\"deprecated reduce interface; implement reduceIndex instead.\");\n  return {...reduce, reduceIndex: reduce.reduce.bind(reduce)};\n}\n\nfunction reduceFunction(f) {\n  return {\n    reduceIndex(I, X, extent) {\n      return f(take(X, I), extent);\n    }\n  };\n}\n\nfunction reduceAccessor(f) {\n  return {\n    reduceIndex(I, X) {\n      return f(I, (i) => X[i]);\n    }\n  };\n}\n\nfunction reduceMaybeTemporalAccessor(f) {\n  return {\n    reduceIndex(I, X) {\n      const x = f(I, (i) => X[i]);\n      return isTemporal(X) ? new Date(x) : x;\n    }\n  };\n}\n\nexport const reduceIdentity = {\n  reduceIndex(I, X) {\n    return take(X, I);\n  }\n};\n\nexport const reduceFirst = {\n  reduceIndex(I, X) {\n    return X[I[0]];\n  }\n};\n\nconst reduceTitle = {\n  reduceIndex(I, X) {\n    const n = 5;\n    const groups = sort(\n      rollup(\n        I,\n        (V) => V.length,\n        (i) => X[i]\n      ),\n      second\n    );\n    const top = groups.slice(-n).reverse();\n    if (top.length < groups.length) {\n      const bottom = groups.slice(0, 1 - n);\n      top[n - 1] = [`\u2026 ${bottom.length.toLocaleString(\"en-US\")} more`, sum(bottom, second)];\n    }\n    return top.map(([key, value]) => `${key} (${value.toLocaleString(\"en-US\")})`).join(\"\\n\");\n  }\n};\n\nconst reduceLast = {\n  reduceIndex(I, X) {\n    return X[I[I.length - 1]];\n  }\n};\n\nexport const reduceCount = {\n  label: \"Frequency\",\n  reduceIndex(I) {\n    return I.length;\n  }\n};\n\nconst reduceDistinct = {\n  label: \"Distinct\",\n  reduceIndex(I, X) {\n    const s = new InternSet();\n    for (const i of I) s.add(X[i]);\n    return s.size;\n  }\n};\n\nconst reduceSum = reduceAccessor(sum);\n\nfunction reduceProportion(value, scope) {\n  return value == null\n    ? {scope, label: \"Frequency\", reduceIndex: (I, V, basis = 1) => I.length / basis}\n    : {scope, reduceIndex: (I, V, basis = 1) => sum(I, (i) => V[i]) / basis};\n}\n", "import {InternSet, rollups} from \"d3\";\nimport {ascendingDefined, descendingDefined} from \"./defined.js\";\nimport {first, isColor, isEvery, isIterable, isOpacity, labelof, map, maybeValue, range, valueof} from \"./options.js\";\nimport {registry} from \"./scales/index.js\";\nimport {isSymbol, maybeSymbol} from \"./symbol.js\";\nimport {maybeReduce} from \"./transforms/group.js\";\n\nexport function createChannel(data, {scale, type, value, filter, hint}, name) {\n  if (hint === undefined && typeof value?.transform === \"function\") hint = value.hint;\n  return inferChannelScale(name, {\n    scale,\n    type,\n    value: valueof(data, value),\n    label: labelof(value),\n    filter,\n    hint\n  });\n}\n\nexport function createChannels(channels, data) {\n  return Object.fromEntries(\n    Object.entries(channels).map(([name, channel]) => [name, createChannel(data, channel, name)])\n  );\n}\n\n// TODO Use Float64Array for scales with numeric ranges, e.g. position?\nexport function valueObject(channels, scales) {\n  const values = Object.fromEntries(\n    Object.entries(channels).map(([name, {scale: scaleName, value}]) => {\n      const scale = scaleName == null ? null : scales[scaleName];\n      return [name, scale == null ? value : map(value, scale)];\n    })\n  );\n  values.channels = channels; // expose channel state for advanced usage\n  return values;\n}\n\n// If the channel uses the \"auto\" scale (or equivalently true), infer the scale\n// from the channel name and the provided values. For color and symbol channels,\n// no scale is applied if the values are literal; however for symbols, we must\n// promote symbol names (e.g., \"plus\") to symbol implementations (symbolPlus).\n// Note: mutates channel!\nexport function inferChannelScale(name, channel) {\n  const {scale, value} = channel;\n  if (scale === true || scale === \"auto\") {\n    switch (name) {\n      case \"fill\":\n      case \"stroke\":\n      case \"color\":\n        channel.scale = scale !== true && isEvery(value, isColor) ? null : \"color\";\n        break;\n      case \"fillOpacity\":\n      case \"strokeOpacity\":\n      case \"opacity\":\n        channel.scale = scale !== true && isEvery(value, isOpacity) ? null : \"opacity\";\n        break;\n      case \"symbol\":\n        if (scale !== true && isEvery(value, isSymbol)) {\n          channel.scale = null;\n          channel.value = map(value, maybeSymbol);\n        } else {\n          channel.scale = \"symbol\";\n        }\n        break;\n      default:\n        channel.scale = registry.has(name) ? name : null;\n        break;\n    }\n  } else if (scale === false) {\n    channel.scale = null;\n  } else if (scale != null && !registry.has(scale)) {\n    throw new Error(`unknown scale: ${scale}`);\n  }\n  return channel;\n}\n\n// Note: mutates channel.domain! This is set to a function so that it is lazily\n// computed; i.e., if the scale\u2019s domain is set explicitly, that takes priority\n// over the sort option, and we don\u2019t need to do additional work.\nexport function channelDomain(data, facets, channels, facetChannels, options) {\n  const {order: defaultOrder, reverse: defaultReverse, reduce: defaultReduce = true, limit: defaultLimit} = options;\n  for (const x in options) {\n    if (!registry.has(x)) continue; // ignore unknown scale keys (including generic options)\n    let {value: y, order = defaultOrder, reverse = defaultReverse, reduce = defaultReduce, limit = defaultLimit} = maybeValue(options[x]); // prettier-ignore\n    const negate = y?.startsWith(\"-\");\n    if (negate) y = y.slice(1);\n    order = order === undefined ? negate !== (y === \"width\" || y === \"height\") ? descendingGroup : ascendingGroup : maybeOrder(order); // prettier-ignore\n    if (reduce == null || reduce === false) continue; // disabled reducer\n    const X = x === \"fx\" || x === \"fy\" ? reindexFacetChannel(facets, facetChannels[x]) : findScaleChannel(channels, x);\n    if (!X) throw new Error(`missing channel for scale: ${x}`);\n    const XV = X.value;\n    const [lo = 0, hi = Infinity] = isIterable(limit) ? limit : limit < 0 ? [limit] : [0, limit];\n    if (y == null) {\n      X.domain = () => {\n        let domain = Array.from(new InternSet(XV)); // remove any duplicates\n        if (reverse) domain = domain.reverse();\n        if (lo !== 0 || hi !== Infinity) domain = domain.slice(lo, hi);\n        return domain;\n      };\n    } else {\n      const YV =\n        y === \"data\"\n          ? data\n          : y === \"height\"\n          ? difference(channels, \"y1\", \"y2\")\n          : y === \"width\"\n          ? difference(channels, \"x1\", \"x2\")\n          : values(channels, y, y === \"y\" ? \"y2\" : y === \"x\" ? \"x2\" : undefined);\n      const reducer = maybeReduce(reduce === true ? \"max\" : reduce, YV);\n      X.domain = () => {\n        let domain = rollups(\n          range(XV),\n          (I) => reducer.reduceIndex(I, YV),\n          (i) => XV[i]\n        );\n        if (order) domain.sort(order);\n        if (reverse) domain.reverse();\n        if (lo !== 0 || hi !== Infinity) domain = domain.slice(lo, hi);\n        return domain.map(first);\n      };\n    }\n  }\n}\n\nfunction findScaleChannel(channels, scale) {\n  for (const name in channels) {\n    const channel = channels[name];\n    if (channel.scale === scale) return channel;\n  }\n}\n\n// Facet channels are not affected by transforms; so, to compute the domain of a\n// facet scale, we must first re-index the facet channel according to the\n// transformed mark index. Note: mutates channel, but that should be safe here?\nfunction reindexFacetChannel(facets, channel) {\n  const originalFacets = facets.original;\n  if (originalFacets === facets) return channel; // not transformed\n  const V1 = channel.value;\n  const V2 = (channel.value = []); // mutates channel!\n  for (let i = 0; i < originalFacets.length; ++i) {\n    const vi = V1[originalFacets[i][0]];\n    for (const j of facets[i]) V2[j] = vi;\n  }\n  return channel;\n}\n\nfunction difference(channels, k1, k2) {\n  const X1 = values(channels, k1);\n  const X2 = values(channels, k2);\n  return map(X2, (x2, i) => Math.abs(x2 - X1[i]), Float64Array);\n}\n\nfunction values(channels, name, alias) {\n  let channel = channels[name];\n  if (!channel && alias !== undefined) channel = channels[alias];\n  if (channel) return channel.value;\n  throw new Error(`missing channel: ${name}`);\n}\n\nfunction maybeOrder(order) {\n  if (order == null || typeof order === \"function\") return order;\n  switch (`${order}`.toLowerCase()) {\n    case \"ascending\":\n      return ascendingGroup;\n    case \"descending\":\n      return descendingGroup;\n  }\n  throw new Error(`invalid order: ${order}`);\n}\n\nfunction ascendingGroup([ak, av], [bk, bv]) {\n  return ascendingDefined(av, bv) || ascendingDefined(ak, bk);\n}\n\nfunction descendingGroup([ak, av], [bk, bv]) {\n  return descendingDefined(av, bv) || ascendingDefined(ak, bk);\n}\n\nexport function getSource(channels, key) {\n  let channel = channels[key];\n  if (!channel) return;\n  while (channel.source) channel = channel.source;\n  return channel.source === null ? null : channel;\n}\n", "import {creator, select} from \"d3\";\n\nexport function createContext(options = {}) {\n  const {document = typeof window !== \"undefined\" ? window.document : undefined} = options;\n  return {document};\n}\n\nexport function create(name, {document}) {\n  return select(creator(name).call(document.documentElement));\n}\n", "let warnings = 0;\n\nexport function consumeWarnings() {\n  const w = warnings;\n  warnings = 0;\n  return w;\n}\n\nexport function warn(message) {\n  console.warn(message);\n  ++warnings;\n}\n", "import {\n  geoAlbers,\n  geoAlbersUsa,\n  geoAzimuthalEqualArea,\n  geoAzimuthalEquidistant,\n  geoClipRectangle,\n  geoConicConformal,\n  geoConicEqualArea,\n  geoConicEquidistant,\n  geoEqualEarth,\n  geoEquirectangular,\n  geoGnomonic,\n  geoMercator,\n  geoOrthographic,\n  geoPath,\n  geoStereographic,\n  geoStream,\n  geoTransform,\n  geoTransverseMercator\n} from \"d3\";\nimport {valueObject} from \"./channel.js\";\nimport {coerceNumbers, constant, isObject} from \"./options.js\";\nimport {warn} from \"./warnings.js\";\n\nconst pi = Math.PI;\nconst tau = 2 * pi;\nconst defaultAspectRatio = 0.618;\n\nexport function createProjection(\n  {\n    projection,\n    inset: globalInset = 0,\n    insetTop = globalInset,\n    insetRight = globalInset,\n    insetBottom = globalInset,\n    insetLeft = globalInset\n  } = {},\n  dimensions\n) {\n  if (projection == null) return;\n  if (typeof projection.stream === \"function\") return projection; // d3 projection\n  let options;\n  let domain;\n  let clip = \"frame\";\n\n  // If the projection was specified as an object with additional options,\n  // extract those. The order of precedence for insetTop (and other insets) is:\n  // projection.insetTop, projection.inset, (global) insetTop, (global) inset.\n  // Any other options on this object will be passed through to the initializer.\n  if (isObject(projection)) {\n    let inset;\n    ({\n      type: projection,\n      domain,\n      inset,\n      insetTop = inset !== undefined ? inset : insetTop,\n      insetRight = inset !== undefined ? inset : insetRight,\n      insetBottom = inset !== undefined ? inset : insetBottom,\n      insetLeft = inset !== undefined ? inset : insetLeft,\n      clip = clip,\n      ...options\n    } = projection);\n    if (projection == null) return;\n  }\n\n  // For named projections, retrieve the corresponding projection initializer.\n  if (typeof projection !== \"function\") ({type: projection} = namedProjection(projection));\n\n  // Compute the frame dimensions and invoke the projection initializer.\n  const {width, height, marginLeft, marginRight, marginTop, marginBottom} = dimensions;\n  const dx = width - marginLeft - marginRight - insetLeft - insetRight;\n  const dy = height - marginTop - marginBottom - insetTop - insetBottom;\n  projection = projection?.({width: dx, height: dy, clip, ...options});\n\n  // The projection initializer might decide to not use a projection.\n  if (projection == null) return;\n  clip = maybePostClip(clip, marginLeft, marginTop, width - marginRight, height - marginBottom);\n\n  // Translate the origin to the top-left corner, respecting margins and insets.\n  let tx = marginLeft + insetLeft;\n  let ty = marginTop + insetTop;\n  let transform;\n\n  // If a domain is specified, fit the projection to the frame.\n  if (domain != null) {\n    const [[x0, y0], [x1, y1]] = geoPath(projection).bounds(domain);\n    const k = Math.min(dx / (x1 - x0), dy / (y1 - y0));\n    if (k > 0) {\n      tx -= (k * (x0 + x1) - dx) / 2;\n      ty -= (k * (y0 + y1) - dy) / 2;\n      transform = geoTransform({\n        point(x, y) {\n          this.stream.point(x * k + tx, y * k + ty);\n        }\n      });\n    } else {\n      warn(`Warning: the projection could not be fit to the specified domain; using the default scale.`);\n    }\n  }\n\n  transform ??=\n    tx === 0 && ty === 0\n      ? identity()\n      : geoTransform({\n          point(x, y) {\n            this.stream.point(x + tx, y + ty);\n          }\n        });\n\n  return {stream: (s) => projection.stream(transform.stream(clip(s)))};\n}\n\nfunction namedProjection(projection) {\n  switch (`${projection}`.toLowerCase()) {\n    case \"albers-usa\":\n      return scaleProjection(geoAlbersUsa, 0.7463, 0.4673);\n    case \"albers\":\n      return conicProjection(geoAlbers, 0.7463, 0.4673);\n    case \"azimuthal-equal-area\":\n      return scaleProjection(geoAzimuthalEqualArea, 4, 4);\n    case \"azimuthal-equidistant\":\n      return scaleProjection(geoAzimuthalEquidistant, tau, tau);\n    case \"conic-conformal\":\n      return conicProjection(geoConicConformal, tau, tau);\n    case \"conic-equal-area\":\n      return conicProjection(geoConicEqualArea, 6.1702, 2.9781);\n    case \"conic-equidistant\":\n      return conicProjection(geoConicEquidistant, 7.312, 3.6282);\n    case \"equal-earth\":\n      return scaleProjection(geoEqualEarth, 5.4133, 2.6347);\n    case \"equirectangular\":\n      return scaleProjection(geoEquirectangular, tau, pi);\n    case \"gnomonic\":\n      return scaleProjection(geoGnomonic, 3.4641, 3.4641);\n    case \"identity\":\n      return {type: identity};\n    case \"reflect-y\":\n      return {type: reflectY};\n    case \"mercator\":\n      return scaleProjection(geoMercator, tau, tau);\n    case \"orthographic\":\n      return scaleProjection(geoOrthographic, 2, 2);\n    case \"stereographic\":\n      return scaleProjection(geoStereographic, 2, 2);\n    case \"transverse-mercator\":\n      return scaleProjection(geoTransverseMercator, tau, tau);\n    default:\n      throw new Error(`unknown projection type: ${projection}`);\n  }\n}\n\nfunction maybePostClip(clip, x1, y1, x2, y2) {\n  if (clip === false || clip == null || typeof clip === \"number\") return (s) => s;\n  if (clip === true) clip = \"frame\";\n  switch (`${clip}`.toLowerCase()) {\n    case \"frame\":\n      return geoClipRectangle(x1, y1, x2, y2);\n    default:\n      throw new Error(`unknown projection clip type: ${clip}`);\n  }\n}\n\nfunction scaleProjection(createProjection, kx, ky) {\n  return {\n    type: ({width, height, rotate, precision = 0.15, clip}) => {\n      const projection = createProjection();\n      if (precision != null) projection.precision?.(precision);\n      if (rotate != null) projection.rotate?.(rotate);\n      if (typeof clip === \"number\") projection.clipAngle?.(clip);\n      projection.scale(Math.min(width / kx, height / ky));\n      projection.translate([width / 2, height / 2]);\n      return projection;\n    },\n    aspectRatio: ky / kx\n  };\n}\n\nfunction conicProjection(createProjection, kx, ky) {\n  const {type, aspectRatio} = scaleProjection(createProjection, kx, ky);\n  return {\n    type: (options) => {\n      const {parallels, domain, width, height} = options;\n      const projection = type(options);\n      if (parallels != null) {\n        projection.parallels(parallels);\n        if (domain === undefined) {\n          projection.fitSize([width, height], {type: \"Sphere\"});\n        }\n      }\n      return projection;\n    },\n    aspectRatio\n  };\n}\n\nconst identity = constant({stream: (stream) => stream});\n\nconst reflectY = constant(\n  geoTransform({\n    point(x, y) {\n      this.stream.point(x, -y);\n    }\n  })\n);\n\n// Applies a point-wise projection to the given paired x and y channels.\n// Note: mutates values!\nexport function project(cx, cy, values, projection) {\n  const x = values[cx];\n  const y = values[cy];\n  const n = x.length;\n  const X = (values[cx] = new Float64Array(n).fill(NaN));\n  const Y = (values[cy] = new Float64Array(n).fill(NaN));\n  let i;\n  const stream = projection.stream({\n    point(x, y) {\n      X[i] = x;\n      Y[i] = y;\n    }\n  });\n  for (i = 0; i < n; ++i) {\n    stream.point(x[i], y[i]);\n  }\n}\n\n// Returns true if a projection was specified. This should match the logic of\n// createProjection above, and is called before we construct the projection.\n// (Though note that we ignore the edge case where the projection initializer\n// may return null.)\nexport function hasProjection({projection} = {}) {\n  if (projection == null) return false;\n  if (typeof projection.stream === \"function\") return true;\n  if (isObject(projection)) projection = projection.type;\n  return projection != null;\n}\n\n// When a named projection is specified, we can use its natural aspect ratio to\n// determine a good value for the projection\u2019s height based on the desired\n// width. When we don\u2019t have a way to know, the golden ratio is our best guess.\n// Due to a circular dependency (we need to know the height before we can\n// construct the projection), we have to test the raw projection option rather\n// than the materialized projection; therefore we must be extremely careful that\n// the logic of this function exactly matches createProjection above!\nexport function projectionAspectRatio(projection) {\n  if (typeof projection?.stream === \"function\") return defaultAspectRatio;\n  if (isObject(projection)) projection = projection.type;\n  if (projection == null) return;\n  if (typeof projection !== \"function\") {\n    const {aspectRatio} = namedProjection(projection);\n    if (aspectRatio) return aspectRatio;\n  }\n  return defaultAspectRatio;\n}\n\n// Extract the (possibly) scaled values for the x and y channels, and apply the\n// projection if any.\nexport function applyPosition(channels, scales, {projection}) {\n  const {x, y} = channels;\n  let position = {};\n  if (x) position.x = x;\n  if (y) position.y = y;\n  position = valueObject(position, scales);\n  if (projection && x?.scale === \"x\" && y?.scale === \"y\") project(\"x\", \"y\", position, projection);\n  if (x) position.x = coerceNumbers(position.x);\n  if (y) position.y = coerceNumbers(position.y);\n  return position;\n}\n\nexport function getGeometryChannels(channel) {\n  const X = [];\n  const Y = [];\n  const x = {scale: \"x\", value: X};\n  const y = {scale: \"y\", value: Y};\n  const sink = {\n    point(x, y) {\n      X.push(x);\n      Y.push(y);\n    },\n    lineStart() {},\n    lineEnd() {},\n    polygonStart() {},\n    polygonEnd() {},\n    sphere() {}\n  };\n  for (const object of channel.value) geoStream(object, sink);\n  return [x, y];\n}\n", "import {\n  interpolateBlues,\n  interpolateBrBG,\n  interpolateBuGn,\n  interpolateBuPu,\n  interpolateGnBu,\n  interpolateGreens,\n  interpolateGreys,\n  interpolateOranges,\n  interpolateOrRd,\n  interpolatePiYG,\n  interpolatePRGn,\n  interpolatePuBu,\n  interpolatePuBuGn,\n  interpolatePuOr,\n  interpolatePuRd,\n  interpolatePurples,\n  interpolateRdBu,\n  interpolateRdGy,\n  interpolateRdPu,\n  interpolateRdYlBu,\n  interpolateRdYlGn,\n  interpolateReds,\n  interpolateSpectral,\n  interpolateYlGn,\n  interpolateYlGnBu,\n  interpolateYlOrBr,\n  interpolateYlOrRd,\n  interpolateTurbo,\n  interpolateViridis,\n  interpolateMagma,\n  interpolateInferno,\n  interpolatePlasma,\n  interpolateCividis,\n  interpolateCubehelixDefault,\n  interpolateWarm,\n  interpolateCool,\n  interpolateRainbow,\n  interpolateSinebow,\n  quantize,\n  schemeAccent,\n  schemeBlues,\n  schemeBrBG,\n  schemeBuGn,\n  schemeBuPu,\n  schemeCategory10,\n  schemeDark2,\n  schemeGnBu,\n  schemeGreens,\n  schemeGreys,\n  schemeOranges,\n  schemeOrRd,\n  schemePaired,\n  schemePastel1,\n  schemePastel2,\n  schemePiYG,\n  schemePRGn,\n  schemePuBu,\n  schemePuBuGn,\n  schemePuOr,\n  schemePuRd,\n  schemePurples,\n  schemeRdBu,\n  schemeRdGy,\n  schemeRdPu,\n  schemeRdYlBu,\n  schemeRdYlGn,\n  schemeReds,\n  schemeSet1,\n  schemeSet2,\n  schemeSet3,\n  schemeSpectral,\n  schemeTableau10,\n  schemeYlGn,\n  schemeYlGnBu,\n  schemeYlOrBr,\n  schemeYlOrRd\n} from \"d3\";\n\nconst categoricalSchemes = new Map([\n  [\"accent\", schemeAccent],\n  [\"category10\", schemeCategory10],\n  [\"dark2\", schemeDark2],\n  [\"paired\", schemePaired],\n  [\"pastel1\", schemePastel1],\n  [\"pastel2\", schemePastel2],\n  [\"set1\", schemeSet1],\n  [\"set2\", schemeSet2],\n  [\"set3\", schemeSet3],\n  [\"tableau10\", schemeTableau10]\n]);\n\nexport function isCategoricalScheme(scheme) {\n  return scheme != null && categoricalSchemes.has(`${scheme}`.toLowerCase());\n}\n\nconst ordinalSchemes = new Map([\n  ...categoricalSchemes,\n\n  // diverging\n  [\"brbg\", scheme11(schemeBrBG, interpolateBrBG)],\n  [\"prgn\", scheme11(schemePRGn, interpolatePRGn)],\n  [\"piyg\", scheme11(schemePiYG, interpolatePiYG)],\n  [\"puor\", scheme11(schemePuOr, interpolatePuOr)],\n  [\"rdbu\", scheme11(schemeRdBu, interpolateRdBu)],\n  [\"rdgy\", scheme11(schemeRdGy, interpolateRdGy)],\n  [\"rdylbu\", scheme11(schemeRdYlBu, interpolateRdYlBu)],\n  [\"rdylgn\", scheme11(schemeRdYlGn, interpolateRdYlGn)],\n  [\"spectral\", scheme11(schemeSpectral, interpolateSpectral)],\n\n  // reversed diverging (for temperature data)\n  [\"burd\", scheme11r(schemeRdBu, interpolateRdBu)],\n  [\"buylrd\", scheme11r(schemeRdYlBu, interpolateRdYlBu)],\n\n  // sequential (single-hue)\n  [\"blues\", scheme9(schemeBlues, interpolateBlues)],\n  [\"greens\", scheme9(schemeGreens, interpolateGreens)],\n  [\"greys\", scheme9(schemeGreys, interpolateGreys)],\n  [\"oranges\", scheme9(schemeOranges, interpolateOranges)],\n  [\"purples\", scheme9(schemePurples, interpolatePurples)],\n  [\"reds\", scheme9(schemeReds, interpolateReds)],\n\n  // sequential (multi-hue)\n  [\"turbo\", schemei(interpolateTurbo)],\n  [\"viridis\", schemei(interpolateViridis)],\n  [\"magma\", schemei(interpolateMagma)],\n  [\"inferno\", schemei(interpolateInferno)],\n  [\"plasma\", schemei(interpolatePlasma)],\n  [\"cividis\", schemei(interpolateCividis)],\n  [\"cubehelix\", schemei(interpolateCubehelixDefault)],\n  [\"warm\", schemei(interpolateWarm)],\n  [\"cool\", schemei(interpolateCool)],\n  [\"bugn\", scheme9(schemeBuGn, interpolateBuGn)],\n  [\"bupu\", scheme9(schemeBuPu, interpolateBuPu)],\n  [\"gnbu\", scheme9(schemeGnBu, interpolateGnBu)],\n  [\"orrd\", scheme9(schemeOrRd, interpolateOrRd)],\n  [\"pubu\", scheme9(schemePuBu, interpolatePuBu)],\n  [\"pubugn\", scheme9(schemePuBuGn, interpolatePuBuGn)],\n  [\"purd\", scheme9(schemePuRd, interpolatePuRd)],\n  [\"rdpu\", scheme9(schemeRdPu, interpolateRdPu)],\n  [\"ylgn\", scheme9(schemeYlGn, interpolateYlGn)],\n  [\"ylgnbu\", scheme9(schemeYlGnBu, interpolateYlGnBu)],\n  [\"ylorbr\", scheme9(schemeYlOrBr, interpolateYlOrBr)],\n  [\"ylorrd\", scheme9(schemeYlOrRd, interpolateYlOrRd)],\n\n  // cyclical\n  [\"rainbow\", schemeicyclical(interpolateRainbow)],\n  [\"sinebow\", schemeicyclical(interpolateSinebow)]\n]);\n\nfunction scheme9(scheme, interpolate) {\n  return ({length: n}) => {\n    if (n === 1) return [scheme[3][1]]; // favor midpoint\n    if (n === 2) return [scheme[3][1], scheme[3][2]]; // favor darker\n    n = Math.max(3, Math.floor(n));\n    return n > 9 ? quantize(interpolate, n) : scheme[n];\n  };\n}\n\nfunction scheme11(scheme, interpolate) {\n  return ({length: n}) => {\n    if (n === 2) return [scheme[3][0], scheme[3][2]]; // favor diverging extrema\n    n = Math.max(3, Math.floor(n));\n    return n > 11 ? quantize(interpolate, n) : scheme[n];\n  };\n}\n\nfunction scheme11r(scheme, interpolate) {\n  return ({length: n}) => {\n    if (n === 2) return [scheme[3][2], scheme[3][0]]; // favor diverging extrema\n    n = Math.max(3, Math.floor(n));\n    return n > 11 ? quantize((t) => interpolate(1 - t), n) : scheme[n].slice().reverse();\n  };\n}\n\nfunction schemei(interpolate) {\n  return ({length: n}) => quantize(interpolate, Math.max(2, Math.floor(n)));\n}\n\nfunction schemeicyclical(interpolate) {\n  return ({length: n}) => quantize(interpolate, Math.floor(n) + 1).slice(0, -1);\n}\n\nexport function ordinalScheme(scheme) {\n  const s = `${scheme}`.toLowerCase();\n  if (!ordinalSchemes.has(s)) throw new Error(`unknown ordinal scheme: ${s}`);\n  return ordinalSchemes.get(s);\n}\n\nexport function ordinalRange(scheme, length) {\n  const s = ordinalScheme(scheme);\n  const r = typeof s === \"function\" ? s({length}) : s;\n  return r.length !== length ? r.slice(0, length) : r;\n}\n\n// If the specified domain contains only booleans (ignoring null and undefined),\n// returns a corresponding range where false is mapped to the low color and true\n// is mapped to the high color of the specified scheme.\nexport function maybeBooleanRange(domain, scheme = \"greys\") {\n  const range = new Set();\n  const [f, t] = ordinalRange(scheme, 2);\n  for (const value of domain) {\n    if (value == null) continue;\n    if (value === true) range.add(t);\n    else if (value === false) range.add(f);\n    else return;\n  }\n  return [...range];\n}\n\nconst quantitativeSchemes = new Map([\n  // diverging\n  [\"brbg\", interpolateBrBG],\n  [\"prgn\", interpolatePRGn],\n  [\"piyg\", interpolatePiYG],\n  [\"puor\", interpolatePuOr],\n  [\"rdbu\", interpolateRdBu],\n  [\"rdgy\", interpolateRdGy],\n  [\"rdylbu\", interpolateRdYlBu],\n  [\"rdylgn\", interpolateRdYlGn],\n  [\"spectral\", interpolateSpectral],\n\n  // reversed diverging (for temperature data)\n  [\"burd\", (t) => interpolateRdBu(1 - t)],\n  [\"buylrd\", (t) => interpolateRdYlBu(1 - t)],\n\n  // sequential (single-hue)\n  [\"blues\", interpolateBlues],\n  [\"greens\", interpolateGreens],\n  [\"greys\", interpolateGreys],\n  [\"purples\", interpolatePurples],\n  [\"reds\", interpolateReds],\n  [\"oranges\", interpolateOranges],\n\n  // sequential (multi-hue)\n  [\"turbo\", interpolateTurbo],\n  [\"viridis\", interpolateViridis],\n  [\"magma\", interpolateMagma],\n  [\"inferno\", interpolateInferno],\n  [\"plasma\", interpolatePlasma],\n  [\"cividis\", interpolateCividis],\n  [\"cubehelix\", interpolateCubehelixDefault],\n  [\"warm\", interpolateWarm],\n  [\"cool\", interpolateCool],\n  [\"bugn\", interpolateBuGn],\n  [\"bupu\", interpolateBuPu],\n  [\"gnbu\", interpolateGnBu],\n  [\"orrd\", interpolateOrRd],\n  [\"pubugn\", interpolatePuBuGn],\n  [\"pubu\", interpolatePuBu],\n  [\"purd\", interpolatePuRd],\n  [\"rdpu\", interpolateRdPu],\n  [\"ylgnbu\", interpolateYlGnBu],\n  [\"ylgn\", interpolateYlGn],\n  [\"ylorbr\", interpolateYlOrBr],\n  [\"ylorrd\", interpolateYlOrRd],\n\n  // cyclical\n  [\"rainbow\", interpolateRainbow],\n  [\"sinebow\", interpolateSinebow]\n]);\n\nexport function quantitativeScheme(scheme) {\n  const s = `${scheme}`.toLowerCase();\n  if (!quantitativeSchemes.has(s)) throw new Error(`unknown quantitative scheme: ${s}`);\n  return quantitativeSchemes.get(s);\n}\n\nconst divergingSchemes = new Set([\n  \"brbg\",\n  \"prgn\",\n  \"piyg\",\n  \"puor\",\n  \"rdbu\",\n  \"rdgy\",\n  \"rdylbu\",\n  \"rdylgn\",\n  \"spectral\",\n  \"burd\",\n  \"buylrd\"\n]);\n\nexport function isDivergingScheme(scheme) {\n  return scheme != null && divergingSchemes.has(`${scheme}`.toLowerCase());\n}\n", "import {\n  descending,\n  extent,\n  interpolateHcl,\n  interpolateHsl,\n  interpolateLab,\n  interpolateNumber,\n  interpolateRgb,\n  interpolateRound,\n  max,\n  median,\n  min,\n  piecewise,\n  quantile,\n  quantize,\n  reverse as reverseof,\n  scaleIdentity,\n  scaleLinear,\n  scaleLog,\n  scalePow,\n  scaleQuantile,\n  scaleSymlog,\n  scaleThreshold,\n  ticks\n} from \"d3\";\nimport {finite, negative, positive} from \"../defined.js\";\nimport {arrayify, constant, maybeNiceInterval, maybeRangeInterval, orderof, slice} from \"../options.js\";\nimport {color, length, opacity, radius, registry} from \"./index.js\";\nimport {ordinalRange, quantitativeScheme} from \"./schemes.js\";\n\nexport const flip = (i) => (t) => i(1 - t);\nconst unit = [0, 1];\n\nconst interpolators = new Map([\n  // numbers\n  [\"number\", interpolateNumber],\n\n  // color spaces\n  [\"rgb\", interpolateRgb],\n  [\"hsl\", interpolateHsl],\n  [\"hcl\", interpolateHcl],\n  [\"lab\", interpolateLab]\n]);\n\nexport function maybeInterpolator(interpolate) {\n  const i = `${interpolate}`.toLowerCase();\n  if (!interpolators.has(i)) throw new Error(`unknown interpolator: ${i}`);\n  return interpolators.get(i);\n}\n\nexport function createScaleQ(\n  key,\n  scale,\n  channels,\n  {\n    type,\n    nice,\n    clamp,\n    zero,\n    domain = inferAutoDomain(key, channels),\n    unknown,\n    round,\n    scheme,\n    interval,\n    range = registry.get(key) === radius\n      ? inferRadialRange(channels, domain)\n      : registry.get(key) === length\n      ? inferLengthRange(channels, domain)\n      : registry.get(key) === opacity\n      ? unit\n      : undefined,\n    interpolate = registry.get(key) === color\n      ? scheme == null && range !== undefined\n        ? interpolateRgb\n        : quantitativeScheme(scheme !== undefined ? scheme : type === \"cyclical\" ? \"rainbow\" : \"turbo\")\n      : round\n      ? interpolateRound\n      : interpolateNumber,\n    reverse\n  }\n) {\n  interval = maybeRangeInterval(interval, type);\n  if (type === \"cyclical\" || type === \"sequential\") type = \"linear\"; // shorthand for color schemes\n  if (typeof interpolate !== \"function\") interpolate = maybeInterpolator(interpolate); // named interpolator\n  reverse = !!reverse;\n\n  // If an explicit range is specified, and it has a different length than the\n  // domain, then redistribute the range using a piecewise interpolator.\n  if (range !== undefined) {\n    const n = (domain = arrayify(domain)).length;\n    const m = (range = arrayify(range)).length;\n    if (n !== m) {\n      if (interpolate.length === 1) throw new Error(\"invalid piecewise interpolator\"); // e.g., turbo\n      interpolate = piecewise(interpolate, range);\n      range = undefined;\n    }\n  }\n\n  // Disambiguate between a two-argument interpolator that is used in\n  // conjunction with the range, and a one-argument \u201Cfixed\u201D interpolator on the\n  // [0, 1] interval as with the RdBu color scheme.\n  if (interpolate.length === 1) {\n    if (reverse) {\n      interpolate = flip(interpolate);\n      reverse = false;\n    }\n    if (range === undefined) {\n      range = Float64Array.from(domain, (_, i) => i / (domain.length - 1));\n      if (range.length === 2) range = unit; // optimize common case of [0, 1]\n    }\n    scale.interpolate((range === unit ? constant : interpolatePiecewise)(interpolate));\n  } else {\n    scale.interpolate(interpolate);\n  }\n\n  // If a zero option is specified, we assume that the domain is numeric, and we\n  // want to ensure that the domain crosses zero. However, note that the domain\n  // may be reversed (descending) so we shouldn\u2019t assume that the first value is\n  // smaller than the last; and also it\u2019s possible that the domain has more than\n  // two values for a \u201Cpoly\u201D scale. And lastly be careful not to mutate input!\n  if (zero) {\n    const [min, max] = extent(domain);\n    if (min > 0 || max < 0) {\n      domain = slice(domain);\n      if (orderof(domain) !== Math.sign(min)) domain[domain.length - 1] = 0; // [2, 1] or [-2, -1]\n      else domain[0] = 0; // [1, 2] or [-1, -2]\n    }\n  }\n\n  if (reverse) domain = reverseof(domain);\n  scale.domain(domain).unknown(unknown);\n  if (nice) scale.nice(maybeNice(nice, type)), (domain = scale.domain());\n  if (range !== undefined) scale.range(range);\n  if (clamp) scale.clamp(clamp);\n  return {type, domain, range, scale, interpolate, interval};\n}\n\nfunction maybeNice(nice, type) {\n  return nice === true ? undefined : typeof nice === \"number\" ? nice : maybeNiceInterval(nice, type);\n}\n\nexport function createScaleLinear(key, channels, options) {\n  return createScaleQ(key, scaleLinear(), channels, options);\n}\n\nexport function createScaleSqrt(key, channels, options) {\n  return createScalePow(key, channels, {...options, exponent: 0.5});\n}\n\nexport function createScalePow(key, channels, {exponent = 1, ...options}) {\n  return createScaleQ(key, scalePow().exponent(exponent), channels, {...options, type: \"pow\"});\n}\n\nexport function createScaleLog(key, channels, {base = 10, domain = inferLogDomain(channels), ...options}) {\n  return createScaleQ(key, scaleLog().base(base), channels, {...options, domain});\n}\n\nexport function createScaleSymlog(key, channels, {constant = 1, ...options}) {\n  return createScaleQ(key, scaleSymlog().constant(constant), channels, options);\n}\n\nexport function createScaleQuantile(\n  key,\n  channels,\n  {\n    range,\n    quantiles = range === undefined ? 5 : (range = [...range]).length, // deprecated; use n instead\n    n = quantiles,\n    scheme = \"rdylbu\",\n    domain = inferQuantileDomain(channels),\n    unknown,\n    interpolate,\n    reverse\n  }\n) {\n  if (range === undefined) {\n    range =\n      interpolate !== undefined\n        ? quantize(interpolate, n)\n        : registry.get(key) === color\n        ? ordinalRange(scheme, n)\n        : undefined;\n  }\n  if (domain.length > 0) {\n    domain = scaleQuantile(domain, range === undefined ? {length: n} : range).quantiles();\n  }\n  return createScaleThreshold(key, channels, {domain, range, reverse, unknown});\n}\n\nexport function createScaleQuantize(\n  key,\n  channels,\n  {\n    range,\n    n = range === undefined ? 5 : (range = [...range]).length,\n    scheme = \"rdylbu\",\n    domain = inferAutoDomain(key, channels),\n    unknown,\n    interpolate,\n    reverse\n  }\n) {\n  const [min, max] = extent(domain);\n  let thresholds;\n  if (range === undefined) {\n    thresholds = ticks(min, max, n); // approximate number of nice, round thresholds\n    if (thresholds[0] <= min) thresholds.splice(0, 1); // drop exact lower bound\n    if (thresholds[thresholds.length - 1] >= max) thresholds.pop(); // drop exact upper bound\n    n = thresholds.length + 1;\n    range =\n      interpolate !== undefined\n        ? quantize(interpolate, n)\n        : registry.get(key) === color\n        ? ordinalRange(scheme, n)\n        : undefined;\n  } else {\n    thresholds = quantize(interpolateNumber(min, max), n + 1).slice(1, -1); // exactly n - 1 thresholds to match range\n    if (min instanceof Date) thresholds = thresholds.map((x) => new Date(x)); // preserve date types\n  }\n  if (orderof(arrayify(domain)) < 0) thresholds.reverse(); // preserve descending domain\n  return createScaleThreshold(key, channels, {domain: thresholds, range, reverse, unknown});\n}\n\nexport function createScaleThreshold(\n  key,\n  channels,\n  {\n    domain = [0], // explicit thresholds in ascending order\n    unknown,\n    scheme = \"rdylbu\",\n    interpolate,\n    range = interpolate !== undefined\n      ? quantize(interpolate, domain.length + 1)\n      : registry.get(key) === color\n      ? ordinalRange(scheme, domain.length + 1)\n      : undefined,\n    reverse\n  }\n) {\n  domain = arrayify(domain);\n  const sign = orderof(domain); // preserve descending domain\n  if (!isNaN(sign) && !isOrdered(domain, sign)) throw new Error(`the ${key} scale has a non-monotonic domain`);\n  if (reverse) range = reverseof(range); // domain ascending, so reverse range\n  return {\n    type: \"threshold\",\n    scale: scaleThreshold(sign < 0 ? reverseof(domain) : domain, range === undefined ? [] : range).unknown(unknown),\n    domain,\n    range\n  };\n}\n\nfunction isOrdered(domain, sign) {\n  for (let i = 1, n = domain.length, d = domain[0]; i < n; ++i) {\n    const s = descending(d, (d = domain[i]));\n    if (s !== 0 && s !== sign) return false;\n  }\n  return true;\n}\n\nexport function createScaleIdentity() {\n  return {type: \"identity\", scale: scaleIdentity()};\n}\n\nexport function inferDomain(channels, f = finite) {\n  return channels.length\n    ? [\n        min(channels, ({value}) => (value === undefined ? value : min(value, f))),\n        max(channels, ({value}) => (value === undefined ? value : max(value, f)))\n      ]\n    : [0, 1];\n}\n\nfunction inferAutoDomain(key, channels) {\n  const type = registry.get(key);\n  return (type === radius || type === opacity || type === length ? inferZeroDomain : inferDomain)(channels);\n}\n\nfunction inferZeroDomain(channels) {\n  return [0, channels.length ? max(channels, ({value}) => (value === undefined ? value : max(value, finite))) : 1];\n}\n\n// We don\u2019t want the upper bound of the radial domain to be zero, as this would\n// be degenerate, so we ignore nonpositive values. We also don\u2019t want the\n// maximum default radius to exceed 30px.\nfunction inferRadialRange(channels, domain) {\n  const hint = channels.find(({radius}) => radius !== undefined);\n  if (hint !== undefined) return [0, hint.radius]; // a natural maximum radius, e.g. hexbins\n  const h25 = quantile(channels, 0.5, ({value}) => (value === undefined ? NaN : quantile(value, 0.25, positive)));\n  const range = domain.map((d) => 3 * Math.sqrt(d / h25));\n  const k = 30 / max(range);\n  return k < 1 ? range.map((r) => r * k) : range;\n}\n\n// We want a length scale\u2019s domain to go from zero to a positive value, and to\n// treat negative lengths if any as inverted vectors of equivalent magnitude. We\n// also don\u2019t want the maximum default length to exceed 60px.\nfunction inferLengthRange(channels, domain) {\n  const h50 = median(channels, ({value}) => (value === undefined ? NaN : median(value, Math.abs)));\n  const range = domain.map((d) => (12 * d) / h50);\n  const k = 60 / max(range);\n  return k < 1 ? range.map((r) => r * k) : range;\n}\n\nfunction inferLogDomain(channels) {\n  for (const {value} of channels) {\n    if (value !== undefined) {\n      for (let v of value) {\n        if (v > 0) return inferDomain(channels, positive);\n        if (v < 0) return inferDomain(channels, negative);\n      }\n    }\n  }\n  return [1, 10];\n}\n\nfunction inferQuantileDomain(channels) {\n  const domain = [];\n  for (const {value} of channels) {\n    if (value === undefined) continue;\n    for (const v of value) domain.push(v);\n  }\n  return domain;\n}\n\nexport function interpolatePiecewise(interpolate) {\n  return (i, j) => (t) => interpolate(i + t * (j - i));\n}\n", "import {\n  descending,\n  interpolateNumber,\n  interpolateRgb,\n  piecewise,\n  scaleDiverging,\n  scaleDivergingLog,\n  scaleDivergingPow,\n  scaleDivergingSymlog\n} from \"d3\";\nimport {negative, positive} from \"../defined.js\";\nimport {arrayify} from \"../options.js\";\nimport {warn} from \"../warnings.js\";\nimport {color, registry} from \"./index.js\";\nimport {flip, inferDomain, interpolatePiecewise, maybeInterpolator} from \"./quantitative.js\";\nimport {quantitativeScheme} from \"./schemes.js\";\n\nfunction createScaleD(\n  key,\n  scale,\n  transform,\n  channels,\n  {\n    type,\n    nice,\n    clamp,\n    domain = inferDomain(channels),\n    unknown,\n    pivot = 0,\n    scheme,\n    range,\n    symmetric = true,\n    interpolate = registry.get(key) === color\n      ? scheme == null && range !== undefined\n        ? interpolateRgb\n        : quantitativeScheme(scheme !== undefined ? scheme : \"rdbu\")\n      : interpolateNumber,\n    reverse\n  }\n) {\n  pivot = +pivot;\n  domain = arrayify(domain);\n  let [min, max] = domain;\n  if (domain.length > 2) warn(`Warning: the diverging ${key} scale domain contains extra elements.`);\n\n  if (descending(min, max) < 0) ([min, max] = [max, min]), (reverse = !reverse);\n  min = Math.min(min, pivot);\n  max = Math.max(max, pivot);\n\n  // Sometimes interpolate is a named interpolator, such as \"lab\" for Lab color\n  // space. Other times interpolate is a function that takes two arguments and\n  // is used in conjunction with the range. And other times the interpolate\n  // function is a \u201Cfixed\u201D interpolator on the [0, 1] interval, as when a\n  // color scheme such as interpolateRdBu is used.\n  if (typeof interpolate !== \"function\") {\n    interpolate = maybeInterpolator(interpolate);\n  }\n\n  // If an explicit range is specified, promote it to a piecewise interpolator.\n  if (range !== undefined) {\n    interpolate =\n      interpolate.length === 1 ? interpolatePiecewise(interpolate)(...range) : piecewise(interpolate, range);\n  }\n\n  // Reverse before normalization.\n  if (reverse) interpolate = flip(interpolate);\n\n  // Normalize the interpolator for symmetric difference around the pivot.\n  if (symmetric) {\n    const mid = transform.apply(pivot);\n    const mindelta = mid - transform.apply(min);\n    const maxdelta = transform.apply(max) - mid;\n    if (mindelta < maxdelta) min = transform.invert(mid - maxdelta);\n    else if (mindelta > maxdelta) max = transform.invert(mid + mindelta);\n  }\n\n  scale.domain([min, pivot, max]).unknown(unknown).interpolator(interpolate);\n  if (clamp) scale.clamp(clamp);\n  if (nice) scale.nice(nice);\n  return {type, domain: [min, max], pivot, interpolate, scale};\n}\n\nexport function createScaleDiverging(key, channels, options) {\n  return createScaleD(key, scaleDiverging(), transformIdentity, channels, options);\n}\n\nexport function createScaleDivergingSqrt(key, channels, options) {\n  return createScaleDivergingPow(key, channels, {...options, exponent: 0.5});\n}\n\nexport function createScaleDivergingPow(key, channels, {exponent = 1, ...options}) {\n  return createScaleD(key, scaleDivergingPow().exponent((exponent = +exponent)), transformPow(exponent), channels, {\n    ...options,\n    type: \"diverging-pow\"\n  });\n}\n\nexport function createScaleDivergingLog(\n  key,\n  channels,\n  {base = 10, pivot = 1, domain = inferDomain(channels, pivot < 0 ? negative : positive), ...options}\n) {\n  return createScaleD(key, scaleDivergingLog().base((base = +base)), transformLog, channels, {\n    domain,\n    pivot,\n    ...options\n  });\n}\n\nexport function createScaleDivergingSymlog(key, channels, {constant = 1, ...options}) {\n  return createScaleD(\n    key,\n    scaleDivergingSymlog().constant((constant = +constant)),\n    transformSymlog(constant),\n    channels,\n    options\n  );\n}\n\nconst transformIdentity = {\n  apply(x) {\n    return x;\n  },\n  invert(x) {\n    return x;\n  }\n};\n\nconst transformLog = {\n  apply: Math.log,\n  invert: Math.exp\n};\n\nconst transformSqrt = {\n  apply(x) {\n    return Math.sign(x) * Math.sqrt(Math.abs(x));\n  },\n  invert(x) {\n    return Math.sign(x) * (x * x);\n  }\n};\n\nfunction transformPow(exponent) {\n  return exponent === 0.5\n    ? transformSqrt\n    : {\n        apply(x) {\n          return Math.sign(x) * Math.pow(Math.abs(x), exponent);\n        },\n        invert(x) {\n          return Math.sign(x) * Math.pow(Math.abs(x), 1 / exponent);\n        }\n      };\n}\n\nfunction transformSymlog(constant) {\n  return {\n    apply(x) {\n      return Math.sign(x) * Math.log1p(Math.abs(x / constant));\n    },\n    invert(x) {\n      return Math.sign(x) * Math.expm1(Math.abs(x)) * constant;\n    }\n  };\n}\n", "import {scaleTime, scaleUtc} from \"d3\";\nimport {createScaleQ} from \"./quantitative.js\";\n\nfunction createScaleT(key, scale, channels, options) {\n  return createScaleQ(key, scale, channels, options);\n}\n\nexport function createScaleTime(key, channels, options) {\n  return createScaleT(key, scaleTime(), channels, options);\n}\n\nexport function createScaleUtc(key, channels, options) {\n  return createScaleT(key, scaleUtc(), channels, options);\n}\n", "import {InternSet, extent, quantize, reverse as reverseof, sort, symbolsFill, symbolsStroke} from \"d3\";\nimport {scaleBand, scaleOrdinal, scalePoint, scaleImplicit} from \"d3\";\nimport {ascendingDefined} from \"../defined.js\";\nimport {isNoneish, map, maybeRangeInterval} from \"../options.js\";\nimport {maybeSymbol} from \"../symbol.js\";\nimport {registry, color, position, symbol} from \"./index.js\";\nimport {maybeBooleanRange, ordinalScheme, quantitativeScheme} from \"./schemes.js\";\n\n// This denotes an implicitly ordinal color scale: the scale type was not set,\n// but the associated values are strings or booleans. If the associated defined\n// values are entirely boolean, the range will default to greys. You can opt out\n// of this by setting the type explicitly.\nexport const ordinalImplicit = Symbol(\"ordinal\");\n\nfunction createScaleO(key, scale, channels, {type, interval, domain, range, reverse, hint}) {\n  interval = maybeRangeInterval(interval, type);\n  if (domain === undefined) domain = inferDomain(channels, interval, key);\n  if (type === \"categorical\" || type === ordinalImplicit) type = \"ordinal\"; // shorthand for color schemes\n  if (reverse) domain = reverseof(domain);\n  scale.domain(domain);\n  if (range !== undefined) {\n    // If the range is specified as a function, pass it the domain.\n    if (typeof range === \"function\") range = range(domain);\n    scale.range(range);\n  }\n  return {type, domain, range, scale, hint, interval};\n}\n\nexport function createScaleOrdinal(key, channels, {type, interval, domain, range, scheme, unknown, ...options}) {\n  interval = maybeRangeInterval(interval, type);\n  if (domain === undefined) domain = inferDomain(channels, interval, key);\n  let hint;\n  if (registry.get(key) === symbol) {\n    hint = inferSymbolHint(channels);\n    range = range === undefined ? inferSymbolRange(hint) : map(range, maybeSymbol);\n  } else if (registry.get(key) === color) {\n    if (range === undefined && (type === \"ordinal\" || type === ordinalImplicit)) {\n      range = maybeBooleanRange(domain, scheme);\n      if (range !== undefined) scheme = undefined; // Don\u2019t re-apply scheme.\n    }\n    if (scheme === undefined && range === undefined) {\n      scheme = type === \"ordinal\" ? \"turbo\" : \"tableau10\";\n    }\n    if (scheme !== undefined) {\n      if (range !== undefined) {\n        const interpolate = quantitativeScheme(scheme);\n        const t0 = range[0],\n          d = range[1] - range[0];\n        range = ({length: n}) => quantize((t) => interpolate(t0 + d * t), n);\n      } else {\n        range = ordinalScheme(scheme);\n      }\n    }\n  }\n  if (unknown === scaleImplicit) {\n    throw new Error(`implicit unknown on ${key} scale is not supported`);\n  }\n  return createScaleO(key, scaleOrdinal().unknown(unknown), channels, {...options, type, domain, range, hint});\n}\n\nexport function createScalePoint(key, channels, {align = 0.5, padding = 0.5, ...options}) {\n  return maybeRound(scalePoint().align(align).padding(padding), channels, options, key);\n}\n\nexport function createScaleBand(\n  key,\n  channels,\n  {\n    align = 0.5,\n    padding = 0.1,\n    paddingInner = padding,\n    paddingOuter = key === \"fx\" || key === \"fy\" ? 0 : padding,\n    ...options\n  }\n) {\n  return maybeRound(\n    scaleBand().align(align).paddingInner(paddingInner).paddingOuter(paddingOuter),\n    channels,\n    options,\n    key\n  );\n}\n\nfunction maybeRound(scale, channels, options, key) {\n  let {round} = options;\n  if (round !== undefined) scale.round((round = !!round));\n  scale = createScaleO(key, scale, channels, options);\n  scale.round = round; // preserve for autoScaleRound\n  return scale;\n}\n\nfunction inferDomain(channels, interval, key) {\n  const values = new InternSet();\n  for (const {value, domain} of channels) {\n    if (domain !== undefined) return domain(); // see channelDomain\n    if (value === undefined) continue;\n    for (const v of value) values.add(v);\n  }\n  if (interval !== undefined) {\n    const [min, max] = extent(values).map(interval.floor, interval);\n    return interval.range(min, interval.offset(max));\n  }\n  if (values.size > 10e3 && registry.get(key) === position) {\n    throw new Error(`implicit ordinal domain of ${key} scale has more than 10,000 values`);\n  }\n  return sort(values, ascendingDefined);\n}\n\n// If all channels provide a consistent hint, propagate it to the scale.\nfunction inferHint(channels, key) {\n  let value;\n  for (const {hint} of channels) {\n    const candidate = hint?.[key];\n    if (candidate === undefined) continue; // no hint here\n    if (value === undefined) value = candidate;\n    // first hint\n    else if (value !== candidate) return; // inconsistent hint\n  }\n  return value;\n}\n\nfunction inferSymbolHint(channels) {\n  return {\n    fill: inferHint(channels, \"fill\"),\n    stroke: inferHint(channels, \"stroke\")\n  };\n}\n\nfunction inferSymbolRange(hint) {\n  return isNoneish(hint.fill) ? symbolsStroke : symbolsFill;\n}\n", "import {\n  isOrdinal,\n  isTemporal,\n  isTemporalString,\n  isNumericString,\n  isScaleOptions,\n  map,\n  slice,\n  coerceNumbers,\n  coerceDates\n} from \"./options.js\";\nimport {registry, color, position, radius, opacity, symbol, length} from \"./scales/index.js\";\nimport {\n  createScaleLinear,\n  createScaleSqrt,\n  createScalePow,\n  createScaleLog,\n  createScaleSymlog,\n  createScaleQuantile,\n  createScaleQuantize,\n  createScaleThreshold,\n  createScaleIdentity\n} from \"./scales/quantitative.js\";\nimport {\n  createScaleDiverging,\n  createScaleDivergingSqrt,\n  createScaleDivergingPow,\n  createScaleDivergingLog,\n  createScaleDivergingSymlog\n} from \"./scales/diverging.js\";\nimport {isCategoricalScheme, isDivergingScheme} from \"./scales/schemes.js\";\nimport {createScaleTime, createScaleUtc} from \"./scales/temporal.js\";\nimport {createScaleOrdinal, createScalePoint, createScaleBand, ordinalImplicit} from \"./scales/ordinal.js\";\nimport {maybeSymbol} from \"./symbol.js\";\nimport {warn} from \"./warnings.js\";\n\nexport function createScales(\n  channelsByScale,\n  {\n    label: globalLabel,\n    inset: globalInset = 0,\n    insetTop: globalInsetTop = globalInset,\n    insetRight: globalInsetRight = globalInset,\n    insetBottom: globalInsetBottom = globalInset,\n    insetLeft: globalInsetLeft = globalInset,\n    round,\n    nice,\n    clamp,\n    zero,\n    align,\n    padding,\n    projection,\n    facet: {label: facetLabel = globalLabel} = {},\n    ...options\n  } = {}\n) {\n  const scales = {};\n  for (const [key, channels] of channelsByScale) {\n    const scaleOptions = options[key];\n    const scale = createScale(key, channels, {\n      round: registry.get(key) === position ? round : undefined, // only for position\n      nice,\n      clamp,\n      zero,\n      align,\n      padding,\n      projection,\n      ...scaleOptions\n    });\n    if (scale) {\n      // populate generic scale options (percent, transform, insets)\n      let {\n        label = key === \"fx\" || key === \"fy\" ? facetLabel : globalLabel,\n        percent,\n        transform,\n        inset,\n        insetTop = inset !== undefined ? inset : key === \"y\" ? globalInsetTop : 0, // not fy\n        insetRight = inset !== undefined ? inset : key === \"x\" ? globalInsetRight : 0, // not fx\n        insetBottom = inset !== undefined ? inset : key === \"y\" ? globalInsetBottom : 0, // not fy\n        insetLeft = inset !== undefined ? inset : key === \"x\" ? globalInsetLeft : 0 // not fx\n      } = scaleOptions || {};\n      if (transform == null) transform = undefined;\n      else if (typeof transform !== \"function\") throw new Error(\"invalid scale transform; not a function\");\n      scale.percent = !!percent;\n      scale.label = label === undefined ? inferScaleLabel(channels, scale) : label;\n      scale.transform = transform;\n      if (key === \"x\" || key === \"fx\") {\n        scale.insetLeft = +insetLeft;\n        scale.insetRight = +insetRight;\n      } else if (key === \"y\" || key === \"fy\") {\n        scale.insetTop = +insetTop;\n        scale.insetBottom = +insetBottom;\n      }\n      scales[key] = scale;\n    }\n  }\n  return scales;\n}\n\nexport function createScaleFunctions(scales) {\n  return Object.fromEntries(\n    Object.entries(scales)\n      .filter(([, {scale}]) => scale) // drop identity scales\n      .map(([name, {scale, type, interval, label}]) => {\n        scale.type = type; // for axis\n        if (interval != null) scale.interval = interval; // for axis\n        if (label != null) scale.label = label; // for axis\n        return [name, scale];\n      })\n  );\n}\n\n// Mutates scale.range!\nexport function autoScaleRange(scales, dimensions) {\n  const {x, y, fx, fy} = scales;\n  const superdimensions = fx || fy ? outerDimensions(dimensions) : dimensions;\n  if (fx) autoScaleRangeX(fx, superdimensions);\n  if (fy) autoScaleRangeY(fy, superdimensions);\n  const subdimensions = fx || fy ? innerDimensions(scales, dimensions) : dimensions;\n  if (x) autoScaleRangeX(x, subdimensions);\n  if (y) autoScaleRangeY(y, subdimensions);\n}\n\n// Channels can have labels; if all the channels for a given scale are\n// consistently labeled (i.e., have the same value if not undefined), and the\n// corresponding scale doesn\u2019t already have an explicit label, then the\n// channels\u2019 label is promoted to the scale. This inferred label should have an\n// orientation-appropriate arrow added when used as an axis, but we don\u2019t want\n// to add the arrow when the label is set explicitly as an option; so, the\n// inferred label is distinguished as an object with an \u201Cinferred\u201D property.\nfunction inferScaleLabel(channels = [], scale) {\n  let label;\n  for (const {label: l} of channels) {\n    if (l === undefined) continue;\n    if (label === undefined) label = l;\n    else if (label !== l) return;\n  }\n  if (label === undefined) return;\n  if (!isOrdinalScale(scale) && scale.percent) label = `${label} (%)`;\n  return {inferred: true, toString: () => label};\n}\n\n// Returns the dimensions of the outer frame; this is subdivided into facets\n// with the margins of each facet collapsing into the outer margins.\nexport function outerDimensions(dimensions) {\n  const {\n    marginTop,\n    marginRight,\n    marginBottom,\n    marginLeft,\n    width,\n    height,\n    facet: {\n      marginTop: facetMarginTop,\n      marginRight: facetMarginRight,\n      marginBottom: facetMarginBottom,\n      marginLeft: facetMarginLeft\n    }\n  } = dimensions;\n  return {\n    marginTop: Math.max(marginTop, facetMarginTop),\n    marginRight: Math.max(marginRight, facetMarginRight),\n    marginBottom: Math.max(marginBottom, facetMarginBottom),\n    marginLeft: Math.max(marginLeft, facetMarginLeft),\n    width,\n    height\n  };\n}\n\n// Returns the dimensions of each facet.\nexport function innerDimensions({fx, fy}, dimensions) {\n  const {marginTop, marginRight, marginBottom, marginLeft, width, height} = outerDimensions(dimensions);\n  return {\n    marginTop,\n    marginRight,\n    marginBottom,\n    marginLeft,\n    width: fx ? fx.scale.bandwidth() + marginLeft + marginRight : width,\n    height: fy ? fy.scale.bandwidth() + marginTop + marginBottom : height,\n    facet: {width, height}\n  };\n}\n\nfunction autoScaleRangeX(scale, dimensions) {\n  if (scale.range === undefined) {\n    const {insetLeft, insetRight} = scale;\n    const {width, marginLeft = 0, marginRight = 0} = dimensions;\n    const left = marginLeft + insetLeft;\n    const right = width - marginRight - insetRight;\n    scale.range = [left, Math.max(left, right)];\n    if (!isOrdinalScale(scale)) scale.range = piecewiseRange(scale);\n    scale.scale.range(scale.range);\n  }\n  autoScaleRound(scale);\n}\n\nfunction autoScaleRangeY(scale, dimensions) {\n  if (scale.range === undefined) {\n    const {insetTop, insetBottom} = scale;\n    const {height, marginTop = 0, marginBottom = 0} = dimensions;\n    const top = marginTop + insetTop;\n    const bottom = height - marginBottom - insetBottom;\n    scale.range = [Math.max(top, bottom), top];\n    if (!isOrdinalScale(scale)) scale.range = piecewiseRange(scale);\n    else scale.range.reverse();\n    scale.scale.range(scale.range);\n  }\n  autoScaleRound(scale);\n}\n\nfunction autoScaleRound(scale) {\n  if (scale.round === undefined && isBandScale(scale) && roundError(scale) <= 30) {\n    scale.scale.round(true);\n  }\n}\n\n// If we were to turn on rounding for this band or point scale, how much wasted\n// space would it introduce (on both ends of the range)? This must match\n// d3.scaleBand\u2019s rounding behavior:\n// https://github.com/d3/d3-scale/blob/83555bd759c7314420bd4240642beda5e258db9e/src/band.js#L20-L32\nfunction roundError({scale}) {\n  const n = scale.domain().length;\n  const [start, stop] = scale.range();\n  const paddingInner = scale.paddingInner ? scale.paddingInner() : 1;\n  const paddingOuter = scale.paddingOuter ? scale.paddingOuter() : scale.padding();\n  const m = n - paddingInner;\n  const step = Math.abs(stop - start) / Math.max(1, m + paddingOuter * 2);\n  return (step - Math.floor(step)) * m;\n}\n\nfunction piecewiseRange(scale) {\n  const length = scale.scale.domain().length + isThresholdScale(scale);\n  if (!(length > 2)) return scale.range;\n  const [start, end] = scale.range;\n  return Array.from({length}, (_, i) => start + (i / (length - 1)) * (end - start));\n}\n\nexport function normalizeScale(key, scale, hint) {\n  return createScale(key, hint === undefined ? undefined : [{hint}], {...scale});\n}\n\nfunction createScale(key, channels = [], options = {}) {\n  const type = inferScaleType(key, channels, options);\n\n  // Warn for common misuses of implicit ordinal scales. We disable this test if\n  // you specify a scale interval or if you set the domain or range explicitly,\n  // since setting the domain or range (typically with a cardinality of more than\n  // two) is another indication that you intended for the scale to be ordinal; we\n  // also disable it for facet scales since these are always band scales.\n  if (\n    options.type === undefined &&\n    options.domain === undefined &&\n    options.range === undefined &&\n    options.interval == null &&\n    key !== \"fx\" &&\n    key !== \"fy\" &&\n    isOrdinalScale({type})\n  ) {\n    const values = channels.map(({value}) => value).filter((value) => value !== undefined);\n    if (values.some(isTemporal))\n      warn(\n        `Warning: some data associated with the ${key} scale are dates. Dates are typically associated with a \"utc\" or \"time\" scale rather than a \"${formatScaleType(\n          type\n        )}\" scale. If you are using a bar mark, you probably want a rect mark with the interval option instead; if you are using a group transform, you probably want a bin transform instead. If you want to treat this data as ordinal, you can specify the interval of the ${key} scale (e.g., d3.utcDay), or you can suppress this warning by setting the type of the ${key} scale to \"${formatScaleType(\n          type\n        )}\".`\n      );\n    else if (values.some(isTemporalString))\n      warn(\n        `Warning: some data associated with the ${key} scale are strings that appear to be dates (e.g., YYYY-MM-DD). If these strings represent dates, you should parse them to Date objects. Dates are typically associated with a \"utc\" or \"time\" scale rather than a \"${formatScaleType(\n          type\n        )}\" scale. If you are using a bar mark, you probably want a rect mark with the interval option instead; if you are using a group transform, you probably want a bin transform instead. If you want to treat this data as ordinal, you can suppress this warning by setting the type of the ${key} scale to \"${formatScaleType(\n          type\n        )}\".`\n      );\n    else if (values.some(isNumericString))\n      warn(\n        `Warning: some data associated with the ${key} scale are strings that appear to be numbers. If these strings represent numbers, you should parse or coerce them to numbers. Numbers are typically associated with a \"linear\" scale rather than a \"${formatScaleType(\n          type\n        )}\" scale. If you want to treat this data as ordinal, you can specify the interval of the ${key} scale (e.g., 1 for integers), or you can suppress this warning by setting the type of the ${key} scale to \"${formatScaleType(\n          type\n        )}\".`\n      );\n  }\n\n  options.type = type; // Mutates input!\n\n  // Once the scale type is known, coerce the associated channel values and any\n  // explicitly-specified domain to the expected type.\n  switch (type) {\n    case \"diverging\":\n    case \"diverging-sqrt\":\n    case \"diverging-pow\":\n    case \"diverging-log\":\n    case \"diverging-symlog\":\n    case \"cyclical\":\n    case \"sequential\":\n    case \"linear\":\n    case \"sqrt\":\n    case \"threshold\":\n    case \"quantile\":\n    case \"pow\":\n    case \"log\":\n    case \"symlog\":\n      options = coerceType(channels, options, coerceNumbers);\n      break;\n    case \"identity\":\n      switch (registry.get(key)) {\n        case position:\n          options = coerceType(channels, options, coerceNumbers);\n          break;\n        case symbol:\n          options = coerceType(channels, options, coerceSymbols);\n          break;\n      }\n      break;\n    case \"utc\":\n    case \"time\":\n      options = coerceType(channels, options, coerceDates);\n      break;\n  }\n\n  switch (type) {\n    case \"diverging\":\n      return createScaleDiverging(key, channels, options);\n    case \"diverging-sqrt\":\n      return createScaleDivergingSqrt(key, channels, options);\n    case \"diverging-pow\":\n      return createScaleDivergingPow(key, channels, options);\n    case \"diverging-log\":\n      return createScaleDivergingLog(key, channels, options);\n    case \"diverging-symlog\":\n      return createScaleDivergingSymlog(key, channels, options);\n    case \"categorical\":\n    case \"ordinal\":\n    case ordinalImplicit:\n      return createScaleOrdinal(key, channels, options);\n    case \"cyclical\":\n    case \"sequential\":\n    case \"linear\":\n      return createScaleLinear(key, channels, options);\n    case \"sqrt\":\n      return createScaleSqrt(key, channels, options);\n    case \"threshold\":\n      return createScaleThreshold(key, channels, options);\n    case \"quantile\":\n      return createScaleQuantile(key, channels, options);\n    case \"quantize\":\n      return createScaleQuantize(key, channels, options);\n    case \"pow\":\n      return createScalePow(key, channels, options);\n    case \"log\":\n      return createScaleLog(key, channels, options);\n    case \"symlog\":\n      return createScaleSymlog(key, channels, options);\n    case \"utc\":\n      return createScaleUtc(key, channels, options);\n    case \"time\":\n      return createScaleTime(key, channels, options);\n    case \"point\":\n      return createScalePoint(key, channels, options);\n    case \"band\":\n      return createScaleBand(key, channels, options);\n    case \"identity\":\n      return registry.get(key) === position ? createScaleIdentity() : {type: \"identity\"};\n    case undefined:\n      return;\n    default:\n      throw new Error(`unknown scale type: ${type}`);\n  }\n}\n\nfunction formatScaleType(type) {\n  return typeof type === \"symbol\" ? type.description : type;\n}\n\n// A special type symbol when the x and y scales are replaced with a projection.\nconst typeProjection = {toString: () => \"projection\"};\n\nfunction inferScaleType(key, channels, {type, domain, range, scheme, pivot, projection}) {\n  // The facet scales are always band scales; this cannot be changed.\n  if (key === \"fx\" || key === \"fy\") return \"band\";\n\n  // If a projection is specified, the x- and y-scales are disabled; these\n  // channels will be projected rather than scaled. (But still check that none\n  // of the associated channels are incompatible with a projection.)\n  if ((key === \"x\" || key === \"y\") && projection != null) type = typeProjection;\n\n  // If a channel dictates a scale type, make sure that it is consistent with\n  // the user-specified scale type (if any) and all other channels. For example,\n  // barY requires x to be a band scale and disallows any other scale type.\n  for (const {type: t} of channels) {\n    if (t === undefined) continue;\n    else if (type === undefined) type = t;\n    else if (type !== t) throw new Error(`scale incompatible with channel: ${type} !== ${t}`);\n  }\n\n  // If the scale, a channel, or user specified a (consistent) type, return it.\n  if (type === typeProjection) return;\n  if (type !== undefined) return type;\n\n  // If there\u2019s no data (and no type) associated with this scale, don\u2019t create a scale.\n  if (domain === undefined && !channels.some(({value}) => value !== undefined)) return;\n\n  // Some scales have default types.\n  const kind = registry.get(key);\n  if (kind === radius) return \"sqrt\";\n  if (kind === opacity || kind === length) return \"linear\";\n  if (kind === symbol) return \"ordinal\";\n\n  // If the domain or range has more than two values, assume it\u2019s ordinal. You\n  // can still use a \u201Cpiecewise\u201D (or \u201Cpolylinear\u201D) scale, but you must set the\n  // type explicitly.\n  if ((domain || range || []).length > 2) return asOrdinalType(kind);\n\n  // Otherwise, infer the scale type from the data! Prefer the domain, if\n  // present, over channels. (The domain and channels should be consistently\n  // typed, and the domain is more explicit and typically much smaller.) We only\n  // check the first defined value for expedience and simplicity; we expect\n  // that the types are consistent.\n  if (domain !== undefined) {\n    if (isOrdinal(domain)) return asOrdinalType(kind);\n    if (isTemporal(domain)) return \"utc\";\n  } else {\n    const values = channels.map(({value}) => value).filter((value) => value !== undefined);\n    if (values.some(isOrdinal)) return asOrdinalType(kind);\n    if (values.some(isTemporal)) return \"utc\";\n  }\n\n  // For color scales, take a hint from the color scheme and pivot option.\n  if (kind === color) {\n    if (pivot != null || isDivergingScheme(scheme)) return \"diverging\";\n    if (isCategoricalScheme(scheme)) return \"categorical\";\n  }\n\n  return \"linear\";\n}\n\n// Positional scales default to a point scale instead of an ordinal scale.\nfunction asOrdinalType(kind) {\n  switch (kind) {\n    case position:\n      return \"point\";\n    case color:\n      return ordinalImplicit;\n    default:\n      return \"ordinal\";\n  }\n}\n\nexport function isTemporalScale({type}) {\n  return type === \"time\" || type === \"utc\";\n}\n\nexport function isOrdinalScale({type}) {\n  return type === \"ordinal\" || type === \"point\" || type === \"band\" || type === ordinalImplicit;\n}\n\nexport function isThresholdScale({type}) {\n  return type === \"threshold\";\n}\n\nfunction isBandScale({type}) {\n  return type === \"point\" || type === \"band\";\n}\n\nexport function isDivergingScale({type}) {\n  return /^diverging($|-)/.test(type);\n}\n\n// Certain marks have special behavior if a scale is collapsed, i.e. if the\n// domain is degenerate and represents only a single value such as [3, 3]; for\n// example, a rect will span the full extent of the chart along a collapsed\n// dimension (whereas a dot will simply be drawn in the center).\nexport function isCollapsed(scale) {\n  if (scale === undefined) return true; // treat missing scale as collapsed\n  const domain = scale.domain();\n  const value = scale(domain[0]);\n  for (let i = 1, n = domain.length; i < n; ++i) {\n    if (scale(domain[i]) - value) {\n      return false;\n    }\n  }\n  return true;\n}\n\n// Mutates channel.value!\nfunction coerceType(channels, {domain, ...options}, coerceValues) {\n  for (const c of channels) {\n    if (c.value !== undefined) {\n      c.value = coerceValues(c.value);\n    }\n  }\n  return {\n    domain: domain === undefined ? domain : coerceValues(domain),\n    ...options\n  };\n}\n\nfunction coerceSymbols(values) {\n  return map(values, maybeSymbol);\n}\n\nexport function scale(options = {}) {\n  let scale;\n  for (const key in options) {\n    if (!registry.has(key)) continue; // ignore unknown properties\n    if (!isScaleOptions(options[key])) continue; // e.g., ignore {color: \"red\"}\n    if (scale !== undefined) throw new Error(\"ambiguous scale definition; multiple scales found\");\n    scale = exposeScale(normalizeScale(key, options[key]));\n  }\n  if (scale === undefined) throw new Error(\"invalid scale definition; no scale found\");\n  return scale;\n}\n\nexport function exposeScales(scaleDescriptors) {\n  return (key) => {\n    if (!registry.has((key = `${key}`))) throw new Error(`unknown scale: ${key}`);\n    return key in scaleDescriptors ? exposeScale(scaleDescriptors[key]) : undefined;\n  };\n}\n\n// Note: axis- and legend-related properties (such as label, ticks and\n// tickFormat) are not included here as they do not affect the scale\u2019s behavior.\nfunction exposeScale({scale, type, domain, range, interpolate, interval, transform, percent, pivot}) {\n  if (type === \"identity\") return {type: \"identity\", apply: (d) => d, invert: (d) => d};\n  const unknown = scale.unknown ? scale.unknown() : undefined;\n  return {\n    type,\n    domain: slice(domain), // defensive copy\n    ...(range !== undefined && {range: slice(range)}), // defensive copy\n    ...(transform !== undefined && {transform}),\n    ...(percent && {percent}), // only exposed if truthy\n    ...(unknown !== undefined && {unknown}),\n    ...(interval !== undefined && {interval}),\n\n    // quantitative\n    ...(interpolate !== undefined && {interpolate}),\n    ...(scale.clamp && {clamp: scale.clamp()}),\n\n    // diverging (always asymmetric; we never want to apply the symmetric transform twice)\n    ...(pivot !== undefined && {pivot, symmetric: false}),\n\n    // log, diverging-log\n    ...(scale.base && {base: scale.base()}),\n\n    // pow, diverging-pow\n    ...(scale.exponent && {exponent: scale.exponent()}),\n\n    // symlog, diverging-symlog\n    ...(scale.constant && {constant: scale.constant()}),\n\n    // band, point\n    ...(scale.align && {align: scale.align(), round: scale.round()}),\n    ...(scale.padding &&\n      (scale.paddingInner\n        ? {paddingInner: scale.paddingInner(), paddingOuter: scale.paddingOuter()}\n        : {padding: scale.padding()})),\n    ...(scale.bandwidth && {bandwidth: scale.bandwidth(), step: scale.step()}),\n\n    // utilities\n    apply: (t) => scale(t),\n    ...(scale.invert && {invert: (t) => scale.invert(t)})\n  };\n}\n", "export function memoize1(compute) {\n  let cacheValue, cacheKeys;\n  return (...keys) => {\n    if (cacheKeys?.length !== keys.length || cacheKeys.some((k, i) => k !== keys[i])) {\n      cacheKeys = keys;\n      cacheValue = compute(...keys);\n    }\n    return cacheValue;\n  };\n}\n", "import {format as isoFormat} from \"isoformat\";\nimport {string} from \"./options.js\";\nimport {memoize1} from \"./memoize.js\";\n\nconst numberFormat = memoize1((locale) => {\n  return new Intl.NumberFormat(locale);\n});\n\nconst monthFormat = memoize1((locale, month) => {\n  return new Intl.DateTimeFormat(locale, {timeZone: \"UTC\", ...(month && {month})});\n});\n\nconst weekdayFormat = memoize1((locale, weekday) => {\n  return new Intl.DateTimeFormat(locale, {timeZone: \"UTC\", ...(weekday && {weekday})});\n});\n\nexport function formatNumber(locale = \"en-US\") {\n  const format = numberFormat(locale);\n  return (i) => (i != null && !isNaN(i) ? format.format(i) : undefined);\n}\n\nexport function formatMonth(locale = \"en-US\", format = \"short\") {\n  const fmt = monthFormat(locale, format);\n  return (i) => (i != null && !isNaN((i = +new Date(Date.UTC(2000, +i)))) ? fmt.format(i) : undefined);\n}\n\nexport function formatWeekday(locale = \"en-US\", format = \"short\") {\n  const fmt = weekdayFormat(locale, format);\n  return (i) => (i != null && !isNaN((i = +new Date(Date.UTC(2001, 0, +i)))) ? fmt.format(i) : undefined);\n}\n\nexport function formatIsoDate(date) {\n  return isoFormat(date, \"Invalid Date\");\n}\n\nexport function formatAuto(locale = \"en-US\") {\n  const number = formatNumber(locale);\n  return (v) => (v instanceof Date ? formatIsoDate : typeof v === \"number\" ? number : string)(v);\n}\n\n// TODO When Plot supports a top-level locale option, this should be removed\n// because it lacks context to know which locale to use; formatAuto should be\n// used instead whenever possible.\nexport const formatDefault = formatAuto();\n", "import {geoPath, group, namespaces} from \"d3\";\nimport {create} from \"./context.js\";\nimport {defined, nonempty} from \"./defined.js\";\nimport {formatDefault} from \"./format.js\";\nimport {\n  string,\n  number,\n  maybeColorChannel,\n  maybeNumberChannel,\n  maybeKeyword,\n  isNoneish,\n  isNone,\n  isRound,\n  keyof\n} from \"./options.js\";\nimport {warn} from \"./warnings.js\";\n\nexport const offset = (typeof window !== \"undefined\" ? window.devicePixelRatio > 1 : typeof it === \"undefined\") ? 0 : 0.5; // prettier-ignore\n\nlet nextClipId = 0;\n\nfunction getClipId() {\n  return `plot-clip-${++nextClipId}`;\n}\n\nexport function styles(\n  mark,\n  {\n    title,\n    href,\n    ariaLabel: variaLabel,\n    ariaDescription,\n    ariaHidden,\n    target,\n    fill,\n    fillOpacity,\n    stroke,\n    strokeWidth,\n    strokeOpacity,\n    strokeLinejoin,\n    strokeLinecap,\n    strokeMiterlimit,\n    strokeDasharray,\n    strokeDashoffset,\n    opacity,\n    mixBlendMode,\n    imageFilter,\n    paintOrder,\n    pointerEvents,\n    shapeRendering,\n    channels\n  },\n  {\n    ariaLabel: cariaLabel,\n    fill: defaultFill = \"currentColor\",\n    fillOpacity: defaultFillOpacity,\n    stroke: defaultStroke = \"none\",\n    strokeOpacity: defaultStrokeOpacity,\n    strokeWidth: defaultStrokeWidth,\n    strokeLinecap: defaultStrokeLinecap,\n    strokeLinejoin: defaultStrokeLinejoin,\n    strokeMiterlimit: defaultStrokeMiterlimit,\n    paintOrder: defaultPaintOrder\n  }\n) {\n  // Some marks don\u2019t support fill (e.g., tick and rule).\n  if (defaultFill === null) {\n    fill = null;\n    fillOpacity = null;\n  }\n\n  // Some marks don\u2019t support stroke (e.g., image).\n  if (defaultStroke === null) {\n    stroke = null;\n    strokeOpacity = null;\n  }\n\n  // Some marks default to fill with no stroke, while others default to stroke\n  // with no fill. For example, bar and area default to fill, while dot and line\n  // default to stroke. For marks that fill by default, the default fill only\n  // applies if the stroke is (constant) none; if you set a stroke, then the\n  // default fill becomes none. Similarly for marks that stroke by stroke, the\n  // default stroke only applies if the fill is (constant) none.\n  if (isNoneish(defaultFill)) {\n    if (!isNoneish(defaultStroke) && (!isNoneish(fill) || channels?.fill)) defaultStroke = \"none\";\n  } else {\n    if (isNoneish(defaultStroke) && (!isNoneish(stroke) || channels?.stroke)) defaultFill = \"none\";\n  }\n\n  const [vfill, cfill] = maybeColorChannel(fill, defaultFill);\n  const [vfillOpacity, cfillOpacity] = maybeNumberChannel(fillOpacity, defaultFillOpacity);\n  const [vstroke, cstroke] = maybeColorChannel(stroke, defaultStroke);\n  const [vstrokeOpacity, cstrokeOpacity] = maybeNumberChannel(strokeOpacity, defaultStrokeOpacity);\n  const [vopacity, copacity] = maybeNumberChannel(opacity);\n\n  // For styles that have no effect if there is no stroke, only apply the\n  // defaults if the stroke is not the constant none. (If stroke is a channel,\n  // then cstroke will be undefined, but there\u2019s still a stroke; hence we don\u2019t\n  // use isNoneish here.)\n  if (!isNone(cstroke)) {\n    if (strokeWidth === undefined) strokeWidth = defaultStrokeWidth;\n    if (strokeLinecap === undefined) strokeLinecap = defaultStrokeLinecap;\n    if (strokeLinejoin === undefined) strokeLinejoin = defaultStrokeLinejoin;\n\n    // The default stroke miterlimit need not be applied if the current stroke\n    // is the constant round; this only has effect on miter joins.\n    if (strokeMiterlimit === undefined && !isRound(strokeLinejoin)) strokeMiterlimit = defaultStrokeMiterlimit;\n\n    // The paint order only takes effect if there is both a fill and a stroke\n    // (at least if we ignore markers, which no built-in marks currently use).\n    if (!isNone(cfill) && paintOrder === undefined) paintOrder = defaultPaintOrder;\n  }\n\n  const [vstrokeWidth, cstrokeWidth] = maybeNumberChannel(strokeWidth);\n\n  // Some marks don\u2019t support fill (e.g., tick and rule).\n  if (defaultFill !== null) {\n    mark.fill = impliedString(cfill, \"currentColor\");\n    mark.fillOpacity = impliedNumber(cfillOpacity, 1);\n  }\n\n  // Some marks don\u2019t support stroke (e.g., image).\n  if (defaultStroke !== null) {\n    mark.stroke = impliedString(cstroke, \"none\");\n    mark.strokeWidth = impliedNumber(cstrokeWidth, 1);\n    mark.strokeOpacity = impliedNumber(cstrokeOpacity, 1);\n    mark.strokeLinejoin = impliedString(strokeLinejoin, \"miter\");\n    mark.strokeLinecap = impliedString(strokeLinecap, \"butt\");\n    mark.strokeMiterlimit = impliedNumber(strokeMiterlimit, 4);\n    mark.strokeDasharray = impliedString(strokeDasharray, \"none\");\n    mark.strokeDashoffset = impliedString(strokeDashoffset, \"0\");\n  }\n\n  mark.target = string(target);\n  mark.ariaLabel = string(cariaLabel);\n  mark.ariaDescription = string(ariaDescription);\n  mark.ariaHidden = string(ariaHidden);\n  mark.opacity = impliedNumber(copacity, 1);\n  mark.mixBlendMode = impliedString(mixBlendMode, \"normal\");\n  mark.imageFilter = impliedString(imageFilter, \"none\");\n  mark.paintOrder = impliedString(paintOrder, \"normal\");\n  mark.pointerEvents = impliedString(pointerEvents, \"auto\");\n  mark.shapeRendering = impliedString(shapeRendering, \"auto\");\n\n  return {\n    title: {value: title, optional: true, filter: null},\n    href: {value: href, optional: true, filter: null},\n    ariaLabel: {value: variaLabel, optional: true, filter: null},\n    fill: {value: vfill, scale: \"auto\", optional: true},\n    fillOpacity: {value: vfillOpacity, scale: \"auto\", optional: true},\n    stroke: {value: vstroke, scale: \"auto\", optional: true},\n    strokeOpacity: {value: vstrokeOpacity, scale: \"auto\", optional: true},\n    strokeWidth: {value: vstrokeWidth, optional: true},\n    opacity: {value: vopacity, scale: \"auto\", optional: true}\n  };\n}\n\n// Applies the specified titles via selection.call.\nexport function applyTitle(selection, L) {\n  if (L)\n    selection\n      .filter((i) => nonempty(L[i]))\n      .append(\"title\")\n      .call(applyText, L);\n}\n\n// Like applyTitle, but for grouped data (lines, areas).\nexport function applyTitleGroup(selection, L) {\n  if (L)\n    selection\n      .filter(([i]) => nonempty(L[i]))\n      .append(\"title\")\n      .call(applyTextGroup, L);\n}\n\nexport function applyText(selection, T) {\n  if (T) selection.text((i) => formatDefault(T[i]));\n}\n\nexport function applyTextGroup(selection, T) {\n  if (T) selection.text(([i]) => formatDefault(T[i]));\n}\n\nexport function applyChannelStyles(\n  selection,\n  {target, tip},\n  {\n    ariaLabel: AL,\n    title: T,\n    fill: F,\n    fillOpacity: FO,\n    stroke: S,\n    strokeOpacity: SO,\n    strokeWidth: SW,\n    opacity: O,\n    href: H\n  }\n) {\n  if (AL) applyAttr(selection, \"aria-label\", (i) => AL[i]);\n  if (F) applyAttr(selection, \"fill\", (i) => F[i]);\n  if (FO) applyAttr(selection, \"fill-opacity\", (i) => FO[i]);\n  if (S) applyAttr(selection, \"stroke\", (i) => S[i]);\n  if (SO) applyAttr(selection, \"stroke-opacity\", (i) => SO[i]);\n  if (SW) applyAttr(selection, \"stroke-width\", (i) => SW[i]);\n  if (O) applyAttr(selection, \"opacity\", (i) => O[i]);\n  if (H) applyHref(selection, (i) => H[i], target);\n  if (!tip) applyTitle(selection, T);\n}\n\nexport function applyGroupedChannelStyles(\n  selection,\n  {target, tip},\n  {\n    ariaLabel: AL,\n    title: T,\n    fill: F,\n    fillOpacity: FO,\n    stroke: S,\n    strokeOpacity: SO,\n    strokeWidth: SW,\n    opacity: O,\n    href: H\n  }\n) {\n  if (AL) applyAttr(selection, \"aria-label\", ([i]) => AL[i]);\n  if (F) applyAttr(selection, \"fill\", ([i]) => F[i]);\n  if (FO) applyAttr(selection, \"fill-opacity\", ([i]) => FO[i]);\n  if (S) applyAttr(selection, \"stroke\", ([i]) => S[i]);\n  if (SO) applyAttr(selection, \"stroke-opacity\", ([i]) => SO[i]);\n  if (SW) applyAttr(selection, \"stroke-width\", ([i]) => SW[i]);\n  if (O) applyAttr(selection, \"opacity\", ([i]) => O[i]);\n  if (H) applyHref(selection, ([i]) => H[i], target);\n  if (!tip) applyTitleGroup(selection, T);\n}\n\nfunction groupAesthetics(\n  {\n    ariaLabel: AL,\n    title: T,\n    fill: F,\n    fillOpacity: FO,\n    stroke: S,\n    strokeOpacity: SO,\n    strokeWidth: SW,\n    opacity: O,\n    href: H\n  },\n  {tip}\n) {\n  return [AL, tip ? undefined : T, F, FO, S, SO, SW, O, H].filter((c) => c !== undefined);\n}\n\nexport function groupZ(I, Z, z) {\n  const G = group(I, (i) => Z[i]);\n  if (z === undefined && G.size > (1 + I.length) >> 1) {\n    warn(\n      `Warning: the implicit z channel has high cardinality. This may occur when the fill or stroke channel is associated with quantitative data rather than ordinal or categorical data. You can suppress this warning by setting the z option explicitly; if this data represents a single series, set z to null.`\n    );\n  }\n  return G.values();\n}\n\nexport function* groupIndex(I, position, mark, channels) {\n  const {z} = mark;\n  const {z: Z} = channels; // group channel\n  const A = groupAesthetics(channels, mark); // aesthetic channels\n  const C = [...position, ...A]; // all channels\n\n  // Group the current index by Z (if any).\n  for (const G of Z ? groupZ(I, Z, z) : [I]) {\n    let Ag; // the A-values (aesthetics) of the current group, if any\n    let Gg; // the current group index (a subset of G, and I), if any\n    out: for (const i of G) {\n      // If any channel has an undefined value for this index, skip it.\n      for (const c of C) {\n        if (!defined(c[i])) {\n          if (Gg) Gg.push(-1);\n          continue out;\n        }\n      }\n\n      // Otherwise, if this is a new group, record the aesthetics for this\n      // group. Yield the current group and start a new one.\n      if (Ag === undefined) {\n        if (Gg) yield Gg;\n        (Ag = A.map((c) => keyof(c[i]))), (Gg = [i]);\n        continue;\n      }\n\n      // Otherwise, add the current index to the current group. Then, if any of\n      // the aesthetics don\u2019t match the current group, yield the current group\n      // and start a new group of the current index.\n      Gg.push(i);\n      for (let j = 0; j < A.length; ++j) {\n        const k = keyof(A[j][i]);\n        if (k !== Ag[j]) {\n          yield Gg;\n          (Ag = A.map((c) => keyof(c[i]))), (Gg = [i]);\n          continue out;\n        }\n      }\n    }\n\n    // Yield the current group, if any.\n    if (Gg) yield Gg;\n  }\n}\n\n// TODO Accept other types of clips (paths, urls, x, y, other marks\u2026)?\n// https://github.com/observablehq/plot/issues/181\nexport function maybeClip(clip) {\n  if (clip === true) clip = \"frame\";\n  else if (clip === false) clip = null;\n  return maybeKeyword(clip, \"clip\", [\"frame\", \"sphere\"]);\n}\n\n// Note: may mutate selection.node!\nfunction applyClip(selection, mark, dimensions, context) {\n  let clipUrl;\n  switch (mark.clip) {\n    case \"frame\": {\n      const {width, height, marginLeft, marginRight, marginTop, marginBottom} = dimensions;\n      const id = getClipId();\n      clipUrl = `url(#${id})`;\n      selection = create(\"svg:g\", context)\n        .call((g) =>\n          g\n            .append(\"svg:clipPath\")\n            .attr(\"id\", id)\n            .append(\"rect\")\n            .attr(\"x\", marginLeft)\n            .attr(\"y\", marginTop)\n            .attr(\"width\", width - marginRight - marginLeft)\n            .attr(\"height\", height - marginTop - marginBottom)\n        )\n        .each(function () {\n          this.appendChild(selection.node());\n          selection.node = () => this; // Note: mutation!\n        });\n      break;\n    }\n    case \"sphere\": {\n      const {projection} = context;\n      if (!projection) throw new Error(`the \"sphere\" clip option requires a projection`);\n      const id = getClipId();\n      clipUrl = `url(#${id})`;\n      selection\n        .append(\"clipPath\")\n        .attr(\"id\", id)\n        .append(\"path\")\n        .attr(\"d\", geoPath(projection)({type: \"Sphere\"}));\n      break;\n    }\n  }\n  // Here we\u2019re careful to apply the ARIA attributes to the outer G element when\n  // clipping is applied, and to apply the ARIA attributes before any other\n  // attributes (for readability).\n  applyAttr(selection, \"aria-label\", mark.ariaLabel);\n  applyAttr(selection, \"aria-description\", mark.ariaDescription);\n  applyAttr(selection, \"aria-hidden\", mark.ariaHidden);\n  applyAttr(selection, \"clip-path\", clipUrl);\n}\n\n// Note: may mutate selection.node!\nexport function applyIndirectStyles(selection, mark, dimensions, context) {\n  applyClip(selection, mark, dimensions, context);\n  applyAttr(selection, \"fill\", mark.fill);\n  applyAttr(selection, \"fill-opacity\", mark.fillOpacity);\n  applyAttr(selection, \"stroke\", mark.stroke);\n  applyAttr(selection, \"stroke-width\", mark.strokeWidth);\n  applyAttr(selection, \"stroke-opacity\", mark.strokeOpacity);\n  applyAttr(selection, \"stroke-linejoin\", mark.strokeLinejoin);\n  applyAttr(selection, \"stroke-linecap\", mark.strokeLinecap);\n  applyAttr(selection, \"stroke-miterlimit\", mark.strokeMiterlimit);\n  applyAttr(selection, \"stroke-dasharray\", mark.strokeDasharray);\n  applyAttr(selection, \"stroke-dashoffset\", mark.strokeDashoffset);\n  applyAttr(selection, \"shape-rendering\", mark.shapeRendering);\n  applyAttr(selection, \"filter\", mark.imageFilter);\n  applyAttr(selection, \"paint-order\", mark.paintOrder);\n  const {pointerEvents = context.pointerSticky === false ? \"none\" : undefined} = mark;\n  applyAttr(selection, \"pointer-events\", pointerEvents);\n}\n\nexport function applyDirectStyles(selection, mark) {\n  applyStyle(selection, \"mix-blend-mode\", mark.mixBlendMode);\n  applyAttr(selection, \"opacity\", mark.opacity);\n}\n\nfunction applyHref(selection, href, target) {\n  selection.each(function (i) {\n    const h = href(i);\n    if (h != null) {\n      const a = this.ownerDocument.createElementNS(namespaces.svg, \"a\");\n      a.setAttribute(\"fill\", \"inherit\");\n      a.setAttributeNS(namespaces.xlink, \"href\", h);\n      if (target != null) a.setAttribute(\"target\", target);\n      this.parentNode.insertBefore(a, this).appendChild(this);\n    }\n  });\n}\n\nexport function applyAttr(selection, name, value) {\n  if (value != null) selection.attr(name, value);\n}\n\nexport function applyStyle(selection, name, value) {\n  if (value != null) selection.style(name, value);\n}\n\nexport function applyTransform(selection, mark, {x, y}, tx = offset, ty = offset) {\n  tx += mark.dx;\n  ty += mark.dy;\n  if (x?.bandwidth) tx += x.bandwidth() / 2;\n  if (y?.bandwidth) ty += y.bandwidth() / 2;\n  if (tx || ty) selection.attr(\"transform\", `translate(${tx},${ty})`);\n}\n\nexport function impliedString(value, impliedValue) {\n  if ((value = string(value)) !== impliedValue) return value;\n}\n\nexport function impliedNumber(value, impliedValue) {\n  if ((value = number(value)) !== impliedValue) return value;\n}\n\n// https://www.w3.org/TR/CSS21/grammar.html\nconst validClassName =\n  /^-?([_a-z]|[\\240-\\377]|\\\\[0-9a-f]{1,6}(\\r\\n|[ \\t\\r\\n\\f])?|\\\\[^\\r\\n\\f0-9a-f])([_a-z0-9-]|[\\240-\\377]|\\\\[0-9a-f]{1,6}(\\r\\n|[ \\t\\r\\n\\f])?|\\\\[^\\r\\n\\f0-9a-f])*$/i;\n\nexport function maybeClassName(name) {\n  // The default should be changed whenever the default styles are changed, so\n  // as to avoid conflict when multiple versions of Plot are on the page.\n  if (name === undefined) return \"plot-d6a7b5\";\n  name = `${name}`;\n  if (!validClassName.test(name)) throw new Error(`invalid class name: ${name}`);\n  return name;\n}\n\nexport function applyInlineStyles(selection, style) {\n  if (typeof style === \"string\") {\n    selection.property(\"style\", style);\n  } else if (style != null) {\n    for (const element of selection) {\n      Object.assign(element.style, style);\n    }\n  }\n}\n\nexport function applyFrameAnchor({frameAnchor}, {width, height, marginTop, marginRight, marginBottom, marginLeft}) {\n  return [\n    /left$/.test(frameAnchor)\n      ? marginLeft\n      : /right$/.test(frameAnchor)\n      ? width - marginRight\n      : (marginLeft + width - marginRight) / 2,\n    /^top/.test(frameAnchor)\n      ? marginTop\n      : /^bottom/.test(frameAnchor)\n      ? height - marginBottom\n      : (marginTop + height - marginBottom) / 2\n  ];\n}\n", "import {extent} from \"d3\";\nimport {projectionAspectRatio} from \"./projection.js\";\nimport {isOrdinalScale} from \"./scales.js\";\nimport {offset} from \"./style.js\";\n\nexport function createDimensions(scales, marks, options = {}) {\n  // Compute the default margins: the maximum of the marks\u2019 margins. While not\n  // always used, they may be needed to compute the default height of the plot.\n  let marginTopDefault = 0.5 - offset,\n    marginRightDefault = 0.5 + offset,\n    marginBottomDefault = 0.5 + offset,\n    marginLeftDefault = 0.5 - offset;\n\n  for (const {marginTop, marginRight, marginBottom, marginLeft} of marks) {\n    if (marginTop > marginTopDefault) marginTopDefault = marginTop;\n    if (marginRight > marginRightDefault) marginRightDefault = marginRight;\n    if (marginBottom > marginBottomDefault) marginBottomDefault = marginBottom;\n    if (marginLeft > marginLeftDefault) marginLeftDefault = marginLeft;\n  }\n\n  // Compute the actual margins. The order of precedence is: the side-specific\n  // margin options, then the global margin option, then the defaults.\n  let {\n    margin,\n    marginTop = margin !== undefined ? margin : marginTopDefault,\n    marginRight = margin !== undefined ? margin : marginRightDefault,\n    marginBottom = margin !== undefined ? margin : marginBottomDefault,\n    marginLeft = margin !== undefined ? margin : marginLeftDefault\n  } = options;\n\n  // Coerce the margin options to numbers.\n  marginTop = +marginTop;\n  marginRight = +marginRight;\n  marginBottom = +marginBottom;\n  marginLeft = +marginLeft;\n\n  // Compute the outer dimensions of the plot. If the top and bottom margins are\n  // specified explicitly, adjust the automatic height accordingly.\n  let {\n    width = 640,\n    height = autoHeight(scales, options, {\n      width,\n      marginTopDefault,\n      marginRightDefault,\n      marginBottomDefault,\n      marginLeftDefault\n    }) + Math.max(0, marginTop - marginTopDefault + marginBottom - marginBottomDefault)\n  } = options;\n\n  // Coerce the width and height.\n  width = +width;\n  height = +height;\n\n  const dimensions = {\n    width,\n    height,\n    marginTop,\n    marginRight,\n    marginBottom,\n    marginLeft\n  };\n\n  // Compute the facet margins.\n  if (scales.fx || scales.fy) {\n    let {\n      margin: facetMargin,\n      marginTop: facetMarginTop = facetMargin !== undefined ? facetMargin : marginTop,\n      marginRight: facetMarginRight = facetMargin !== undefined ? facetMargin : marginRight,\n      marginBottom: facetMarginBottom = facetMargin !== undefined ? facetMargin : marginBottom,\n      marginLeft: facetMarginLeft = facetMargin !== undefined ? facetMargin : marginLeft\n    } = options.facet ?? {};\n\n    // Coerce the facet margin options to numbers.\n    facetMarginTop = +facetMarginTop;\n    facetMarginRight = +facetMarginRight;\n    facetMarginBottom = +facetMarginBottom;\n    facetMarginLeft = +facetMarginLeft;\n\n    dimensions.facet = {\n      marginTop: facetMarginTop,\n      marginRight: facetMarginRight,\n      marginBottom: facetMarginBottom,\n      marginLeft: facetMarginLeft\n    };\n  }\n\n  return dimensions;\n}\n\nfunction autoHeight(\n  {x, y, fy, fx},\n  {projection, aspectRatio},\n  {width, marginTopDefault, marginRightDefault, marginBottomDefault, marginLeftDefault}\n) {\n  const nfy = fy ? fy.scale.domain().length : 1;\n\n  // If a projection is specified, use its natural aspect ratio (if known).\n  const ar = projectionAspectRatio(projection);\n  if (ar) {\n    const nfx = fx ? fx.scale.domain().length : 1;\n    const far = ((1.1 * nfy - 0.1) / (1.1 * nfx - 0.1)) * ar; // 0.1 is default facet padding\n    const lar = Math.max(0.1, Math.min(10, far)); // clamp the aspect ratio to a \u201Creasonable\u201D value\n    return Math.round((width - marginLeftDefault - marginRightDefault) * lar + marginTopDefault + marginBottomDefault);\n  }\n\n  const ny = y ? (isOrdinalScale(y) ? y.scale.domain().length : Math.max(7, 17 / nfy)) : 1;\n\n  // If a desired aspect ratio is given, compute a default height to match.\n  if (aspectRatio != null) {\n    aspectRatio = +aspectRatio;\n    if (!(isFinite(aspectRatio) && aspectRatio > 0)) throw new Error(`invalid aspectRatio: ${aspectRatio}`);\n    const ratio = aspectRatioLength(\"y\", y) / (aspectRatioLength(\"x\", x) * aspectRatio);\n    const fxb = fx ? fx.scale.bandwidth() : 1;\n    const fyb = fy ? fy.scale.bandwidth() : 1;\n    const w = fxb * (width - marginLeftDefault - marginRightDefault) - x.insetLeft - x.insetRight;\n    return (ratio * w + y.insetTop + y.insetBottom) / fyb + marginTopDefault + marginBottomDefault;\n  }\n\n  return !!(y || fy) * Math.max(1, Math.min(60, ny * nfy)) * 20 + !!fx * 30 + 60;\n}\n\nfunction aspectRatioLength(k, scale) {\n  if (!scale) throw new Error(`aspectRatio requires ${k} scale`);\n  const {type, domain} = scale;\n  let transform;\n  switch (type) {\n    case \"linear\":\n    case \"utc\":\n    case \"time\":\n      transform = Number;\n      break;\n    case \"pow\": {\n      const exponent = scale.scale.exponent();\n      transform = (x) => Math.pow(x, exponent);\n      break;\n    }\n    case \"log\":\n      transform = Math.log;\n      break;\n    case \"point\":\n    case \"band\":\n      return domain.length;\n    default:\n      throw new Error(`unsupported ${k} scale for aspectRatio: ${type}`);\n  }\n  const [min, max] = extent(domain);\n  return Math.abs(transform(max) - transform(min));\n}\n", "import {InternMap, cross, rollup, sum} from \"d3\";\nimport {keyof, map, range} from \"./options.js\";\nimport {createScales} from \"./scales.js\";\n\n// Returns an array of {x?, y?, i} objects representing the facet domain.\nexport function createFacets(channelsByScale, options) {\n  const {fx, fy} = createScales(channelsByScale, options);\n  const fxDomain = fx?.scale.domain();\n  const fyDomain = fy?.scale.domain();\n  return fxDomain && fyDomain\n    ? cross(fxDomain, fyDomain).map(([x, y], i) => ({x, y, i}))\n    : fxDomain\n    ? fxDomain.map((x, i) => ({x, i}))\n    : fyDomain\n    ? fyDomain.map((y, i) => ({y, i}))\n    : undefined;\n}\n\nexport function recreateFacets(facets, {x: X, y: Y}) {\n  X &&= facetIndex(X);\n  Y &&= facetIndex(Y);\n  return facets\n    .filter(\n      X && Y // remove any facets no longer present in the domain\n        ? (f) => X.has(f.x) && Y.has(f.y)\n        : X\n        ? (f) => X.has(f.x)\n        : (f) => Y.has(f.y)\n    )\n    .sort(\n      X && Y // reorder facets to match the new scale domains\n        ? (a, b) => X.get(a.x) - X.get(b.x) || Y.get(a.y) - Y.get(b.y)\n        : X\n        ? (a, b) => X.get(a.x) - X.get(b.x)\n        : (a, b) => Y.get(a.y) - Y.get(b.y)\n    );\n}\n\n// Returns a (possibly nested) Map of [[key1, index1], [key2, index2], \u2026]\n// representing the data indexes associated with each facet.\nexport function facetGroups(data, {fx, fy}) {\n  const I = range(data);\n  const FX = fx?.value;\n  const FY = fy?.value;\n  return fx && fy\n    ? rollup(\n        I,\n        (G) => ((G.fx = FX[G[0]]), (G.fy = FY[G[0]]), G),\n        (i) => FX[i],\n        (i) => FY[i]\n      )\n    : fx\n    ? rollup(\n        I,\n        (G) => ((G.fx = FX[G[0]]), G),\n        (i) => FX[i]\n      )\n    : rollup(\n        I,\n        (G) => ((G.fy = FY[G[0]]), G),\n        (i) => FY[i]\n      );\n}\n\nexport function facetTranslator(fx, fy, {marginTop, marginLeft}) {\n  return fx && fy\n    ? ({x, y}) => `translate(${fx(x) - marginLeft},${fy(y) - marginTop})`\n    : fx\n    ? ({x}) => `translate(${fx(x) - marginLeft},0)`\n    : ({y}) => `translate(0,${fy(y) - marginTop})`;\n}\n\n// Returns an index that for each facet lists all the elements present in other\n// facets in the original index. TODO Memoize to avoid repeated work?\nexport function facetExclude(index) {\n  const ex = [];\n  const e = new Uint32Array(sum(index, (d) => d.length));\n  for (const i of index) {\n    let n = 0;\n    for (const j of index) {\n      if (i === j) continue;\n      e.set(j, n);\n      n += j.length;\n    }\n    ex.push(e.slice(0, n));\n  }\n  return ex;\n}\n\nconst facetAnchors = new Map([\n  [\"top\", facetAnchorTop],\n  [\"right\", facetAnchorRight],\n  [\"bottom\", facetAnchorBottom],\n  [\"left\", facetAnchorLeft],\n  [\"top-left\", and(facetAnchorTop, facetAnchorLeft)],\n  [\"top-right\", and(facetAnchorTop, facetAnchorRight)],\n  [\"bottom-left\", and(facetAnchorBottom, facetAnchorLeft)],\n  [\"bottom-right\", and(facetAnchorBottom, facetAnchorRight)],\n  [\"top-empty\", facetAnchorTopEmpty],\n  [\"right-empty\", facetAnchorRightEmpty],\n  [\"bottom-empty\", facetAnchorBottomEmpty],\n  [\"left-empty\", facetAnchorLeftEmpty],\n  [\"empty\", facetAnchorEmpty]\n]);\n\nexport function maybeFacetAnchor(facetAnchor) {\n  if (facetAnchor == null) return null;\n  const anchor = facetAnchors.get(`${facetAnchor}`.toLowerCase());\n  if (anchor) return anchor;\n  throw new Error(`invalid facet anchor: ${facetAnchor}`);\n}\n\nconst indexCache = new WeakMap();\n\nfunction facetIndex(V) {\n  let I = indexCache.get(V);\n  if (!I) indexCache.set(V, (I = new InternMap(map(V, (v, i) => [v, i]))));\n  return I;\n}\n\n// Like V.indexOf(v), but with the same semantics as InternMap.\nfunction facetIndexOf(V, v) {\n  return facetIndex(V).get(v);\n}\n\n// Like facets.find, but with the same semantics as InternMap.\nfunction facetFind(facets, x, y) {\n  x = keyof(x);\n  y = keyof(y);\n  return facets.find((f) => Object.is(keyof(f.x), x) && Object.is(keyof(f.y), y));\n}\n\nfunction facetEmpty(facets, x, y) {\n  return facetFind(facets, x, y)?.empty;\n}\n\nfunction facetAnchorTop(facets, {y: Y}, {y}) {\n  return Y ? facetIndexOf(Y, y) === 0 : true;\n}\n\nfunction facetAnchorBottom(facets, {y: Y}, {y}) {\n  return Y ? facetIndexOf(Y, y) === Y.length - 1 : true;\n}\n\nfunction facetAnchorLeft(facets, {x: X}, {x}) {\n  return X ? facetIndexOf(X, x) === 0 : true;\n}\n\nfunction facetAnchorRight(facets, {x: X}, {x}) {\n  return X ? facetIndexOf(X, x) === X.length - 1 : true;\n}\n\nfunction facetAnchorTopEmpty(facets, {y: Y}, {x, y, empty}) {\n  if (empty) return false;\n  if (!Y) return;\n  const i = facetIndexOf(Y, y);\n  if (i > 0) return facetEmpty(facets, x, Y[i - 1]);\n}\n\nfunction facetAnchorBottomEmpty(facets, {y: Y}, {x, y, empty}) {\n  if (empty) return false;\n  if (!Y) return;\n  const i = facetIndexOf(Y, y);\n  if (i < Y.length - 1) return facetEmpty(facets, x, Y[i + 1]);\n}\n\nfunction facetAnchorLeftEmpty(facets, {x: X}, {x, y, empty}) {\n  if (empty) return false;\n  if (!X) return;\n  const i = facetIndexOf(X, x);\n  if (i > 0) return facetEmpty(facets, X[i - 1], y);\n}\n\nfunction facetAnchorRightEmpty(facets, {x: X}, {x, y, empty}) {\n  if (empty) return false;\n  if (!X) return;\n  const i = facetIndexOf(X, x);\n  if (i < X.length - 1) return facetEmpty(facets, X[i + 1], y);\n}\n\nfunction facetAnchorEmpty(facets, channels, {empty}) {\n  return empty;\n}\n\nfunction and(a, b) {\n  return function () {\n    return a.apply(null, arguments) && b.apply(null, arguments);\n  };\n}\n\n// Facet filter, by mark; for now only the \"eq\" filter is provided.\nexport function facetFilter(facets, {channels: {fx, fy}, groups}) {\n  return fx && fy\n    ? facets.map(({x, y}) => groups.get(x)?.get(y) ?? [])\n    : fx\n    ? facets.map(({x}) => groups.get(x) ?? [])\n    : facets.map(({y}) => groups.get(y) ?? []);\n}\n", "import {channelDomain, createChannels, valueObject} from \"./channel.js\";\nimport {defined} from \"./defined.js\";\nimport {maybeFacetAnchor} from \"./facet.js\";\nimport {maybeKeyword, maybeNamed, maybeValue} from \"./options.js\";\nimport {arrayify, isDomainSort, isOptions, keyword, range, singleton} from \"./options.js\";\nimport {project} from \"./projection.js\";\nimport {maybeClip, styles} from \"./style.js\";\nimport {basic, initializer} from \"./transforms/basic.js\";\n\nexport class Mark {\n  constructor(data, channels = {}, options = {}, defaults) {\n    const {\n      facet = \"auto\",\n      facetAnchor,\n      fx,\n      fy,\n      sort,\n      dx = 0,\n      dy = 0,\n      margin = 0,\n      marginTop = margin,\n      marginRight = margin,\n      marginBottom = margin,\n      marginLeft = margin,\n      clip,\n      channels: extraChannels,\n      tip,\n      render\n    } = options;\n    this.data = data;\n    this.sort = isDomainSort(sort) ? sort : null;\n    this.initializer = initializer(options).initializer;\n    this.transform = this.initializer ? options.transform : basic(options).transform;\n    if (facet === null || facet === false) {\n      this.facet = null;\n    } else {\n      this.facet = keyword(facet === true ? \"include\" : facet, \"facet\", [\"auto\", \"include\", \"exclude\", \"super\"]);\n      this.fx = data === singleton && typeof fx === \"string\" ? [fx] : fx;\n      this.fy = data === singleton && typeof fy === \"string\" ? [fy] : fy;\n    }\n    this.facetAnchor = maybeFacetAnchor(facetAnchor);\n    channels = maybeNamed(channels);\n    if (extraChannels !== undefined) channels = {...maybeChannels(extraChannels), ...channels};\n    if (defaults !== undefined) channels = {...styles(this, options, defaults), ...channels};\n    this.channels = Object.fromEntries(\n      Object.entries(channels)\n        .map(([name, channel]) => {\n          if (isOptions(channel.value)) {\n            // apply scale overrides\n            const {value, scale = channel.scale} = channel.value;\n            channel = {...channel, scale, value};\n          }\n          if (data === singleton && typeof channel.value === \"string\") {\n            // convert field names to singleton values for decoration marks (e.g., frame)\n            const {value} = channel;\n            channel = {...channel, value: [value]};\n          }\n          return [name, channel];\n        })\n        .filter(([name, {value, optional}]) => {\n          if (value != null) return true;\n          if (optional) return false;\n          throw new Error(`missing channel value: ${name}`);\n        })\n    );\n    this.dx = +dx;\n    this.dy = +dy;\n    this.marginTop = +marginTop;\n    this.marginRight = +marginRight;\n    this.marginBottom = +marginBottom;\n    this.marginLeft = +marginLeft;\n    this.clip = maybeClip(clip);\n    this.tip = maybeTip(tip);\n    // Super-faceting currently disallow position channels; in the future, we\n    // could allow position to be specified in fx and fy in addition to (or\n    // instead of) x and y.\n    if (this.facet === \"super\") {\n      if (fx || fy) throw new Error(`super-faceting cannot use fx or fy`);\n      for (const name in this.channels) {\n        const {scale} = channels[name];\n        if (scale !== \"x\" && scale !== \"y\") continue;\n        throw new Error(`super-faceting cannot use x or y`);\n      }\n    }\n    if (render != null) {\n      this.render = composeRender(render, this.render);\n    }\n  }\n  initialize(facets, facetChannels, plotOptions) {\n    let data = arrayify(this.data);\n    if (facets === undefined && data != null) facets = [range(data)];\n    const originalFacets = facets;\n    if (this.transform != null) ({facets, data} = this.transform(data, facets, plotOptions)), (data = arrayify(data));\n    if (facets !== undefined) facets.original = originalFacets; // needed to read facetChannels\n    const channels = createChannels(this.channels, data);\n    if (this.sort != null) channelDomain(data, facets, channels, facetChannels, this.sort); // mutates facetChannels!\n    return {data, facets, channels};\n  }\n  filter(index, channels, values) {\n    for (const name in channels) {\n      const {filter = defined} = channels[name];\n      if (filter !== null) {\n        const value = values[name];\n        index = index.filter((i) => filter(value[i]));\n      }\n    }\n    return index;\n  }\n  // If there is a projection, and there are paired x and y channels associated\n  // with the x and y scale respectively (and not already in screen coordinates\n  // as with an initializer), then apply the projection, replacing the x and y\n  // values. Note that the x and y scales themselves don\u2019t exist if there is a\n  // projection, but whether the channels are associated with scales still\n  // determines whether the projection should apply; think of the projection as\n  // a combination xy-scale.\n  project(channels, values, context) {\n    for (const cx in channels) {\n      if (channels[cx].scale === \"x\" && /^x|x$/.test(cx)) {\n        const cy = cx.replace(/^x|x$/, \"y\");\n        if (cy in channels && channels[cy].scale === \"y\") {\n          project(cx, cy, values, context.projection);\n        }\n      }\n    }\n  }\n  scale(channels, scales, context) {\n    const values = valueObject(channels, scales);\n    if (context.projection) this.project(channels, values, context);\n    return values;\n  }\n}\n\nexport function marks(...marks) {\n  marks.plot = Mark.prototype.plot; // Note: depends on side-effect in plot!\n  return marks;\n}\n\nexport function composeRender(r1, r2) {\n  if (r1 == null) return r2 === null ? undefined : r2;\n  if (r2 == null) return r1 === null ? undefined : r1;\n  if (typeof r1 !== \"function\") throw new TypeError(`invalid render transform: ${r1}`);\n  if (typeof r2 !== \"function\") throw new TypeError(`invalid render transform: ${r2}`);\n  return function (i, s, v, d, c, next) {\n    return r1.call(this, i, s, v, d, c, (i, s, v, d, c) => {\n      return r2.call(this, i, s, v, d, c, next); // preserve this\n    });\n  };\n}\n\nfunction maybeChannels(channels) {\n  return Object.fromEntries(\n    Object.entries(maybeNamed(channels)).map(([name, channel]) => {\n      channel = maybeValue(channel);\n      if (channel.filter === undefined && channel.scale == null) channel = {...channel, filter: null};\n      return [name, channel];\n    })\n  );\n}\n\nfunction maybeTip(tip) {\n  return tip === true ? \"xy\" : tip === false ? null : maybeKeyword(tip, \"tip\", [\"x\", \"y\", \"xy\"]);\n}\n\nexport function withTip(options, tip) {\n  return options?.tip === true ? {...options, tip} : options;\n}\n", "import {pointer as pointof} from \"d3\";\nimport {composeRender} from \"../mark.js\";\nimport {applyFrameAnchor} from \"../style.js\";\n\nconst states = new WeakMap();\n\nfunction pointerK(kx, ky, {x, y, px, py, maxRadius = 40, channels, render, ...options} = {}) {\n  maxRadius = +maxRadius;\n  // When px or py is used, register an extra channel that the pointer\n  // interaction can use to control which point is focused; this allows pointing\n  // to function independently of where the downstream mark (e.g., a tip) is\n  // displayed. Also default x or y to null to disable maybeTuple etc.\n  if (px != null) (x ??= null), (channels = {...channels, px: {value: px, scale: \"x\"}});\n  if (py != null) (y ??= null), (channels = {...channels, py: {value: py, scale: \"y\"}});\n  return {\n    x,\n    y,\n    channels,\n    ...options,\n    // Unlike other composed transforms, the render transform must be the\n    // outermost render function because it will re-render dynamically in\n    // response to pointer events.\n    render: composeRender(function (index, scales, values, dimensions, context, next) {\n      context = {...context, pointerSticky: false};\n      const svg = context.ownerSVGElement;\n      const {data} = context.getMarkState(this);\n\n      // Isolate state per-pointer, per-plot; if the pointer is reused by\n      // multiple marks, they will share the same state (e.g., sticky modality).\n      let state = states.get(svg);\n      if (!state) states.set(svg, (state = {sticky: false, roots: [], renders: []}));\n\n      // This serves as a unique identifier of the rendered mark per-plot; it is\n      // used to record the currently-rendered elements (state.roots) so that we\n      // can tell when a rendered element is clicked on.\n      let renderIndex = state.renders.push(render) - 1;\n\n      // For faceting, we want to compute the local coordinates of each point,\n      // which means subtracting out the facet translation, if any. (It\u2019s\n      // tempting to do this using the local coordinates in SVG, but that\u2019s\n      // complicated by mark-specific transforms such as dx and dy.) Also, since\n      // band scales return the upper bound of the band, we have to offset by\n      // half the bandwidth.\n      const {x, y, fx, fy} = scales;\n      let tx = fx ? fx(index.fx) - dimensions.marginLeft : 0;\n      let ty = fy ? fy(index.fy) - dimensions.marginTop : 0;\n      if (x?.bandwidth) tx += x.bandwidth() / 2;\n      if (y?.bandwidth) ty += y.bandwidth() / 2;\n\n      // For faceting, we also need to record the closest point per facet per\n      // mark (!), since each facet has its own pointer event listeners; we only\n      // want the closest point across facets to be visible.\n      const faceted = index.fi != null;\n      let facetState;\n      if (faceted) {\n        let facetStates = state.facetStates;\n        if (!facetStates) state.facetStates = facetStates = new Map();\n        facetState = facetStates.get(this);\n        if (!facetState) facetStates.set(this, (facetState = new Map()));\n      }\n\n      // The order of precedence for the pointer position is: px & py; the\n      // middle of x1 & y1 and x2 & y2; or x1 & y1 (e.g., area); or lastly x &\n      // y. If a dimension is unspecified, the frame anchor is used.\n      const [cx, cy] = applyFrameAnchor(this, dimensions);\n      const {px: PX, py: PY} = values;\n      const px = PX ? (i) => PX[i] : anchorX(values, cx);\n      const py = PY ? (i) => PY[i] : anchorY(values, cy);\n\n      let i; // currently focused index\n      let g; // currently rendered mark\n      let s; // currently rendered stickiness\n      let f; // current animation frame\n\n      // When faceting, if more than one pointer would be visible, only show\n      // this one if it is the closest. We defer rendering using an animation\n      // frame to allow all pointer events to be received before deciding which\n      // mark to render; although when hiding, we render immediately.\n      function update(ii, ri) {\n        if (faceted) {\n          if (f) f = cancelAnimationFrame(f);\n          if (ii == null) facetState.delete(index.fi);\n          else {\n            facetState.set(index.fi, ri);\n            f = requestAnimationFrame(() => {\n              f = null;\n              for (const r of facetState.values()) {\n                if (r < ri) {\n                  ii = null;\n                  break;\n                }\n              }\n              render(ii);\n            });\n            return;\n          }\n        }\n        render(ii);\n      }\n\n      function render(ii) {\n        if (i === ii && s === state.sticky) return; // the tooltip hasn\u2019t moved\n        i = ii;\n        s = context.pointerSticky = state.sticky;\n        const I = i == null ? [] : [i];\n        if (faceted) (I.fx = index.fx), (I.fy = index.fy), (I.fi = index.fi);\n        const r = next(I, scales, values, dimensions, context);\n        if (g) {\n          // When faceting, preserve swapped mark and facet transforms; also\n          // remove ARIA attributes since these are promoted to the parent. This\n          // is perhaps brittle in that it depends on how Plot renders facets,\n          // but it produces a cleaner and more accessible SVG structure.\n          if (faceted) {\n            const p = g.parentNode;\n            const ft = g.getAttribute(\"transform\");\n            const mt = r.getAttribute(\"transform\");\n            ft ? r.setAttribute(\"transform\", ft) : r.removeAttribute(\"transform\");\n            mt ? p.setAttribute(\"transform\", mt) : p.removeAttribute(\"transform\");\n            r.removeAttribute(\"aria-label\");\n            r.removeAttribute(\"aria-description\");\n            r.removeAttribute(\"aria-hidden\");\n          }\n          g.replaceWith(r);\n        }\n        state.roots[renderIndex] = g = r;\n        context.dispatchValue(i == null ? null : data[i]);\n        return r;\n      }\n\n      function pointermove(event) {\n        if (state.sticky || (event.pointerType === \"mouse\" && event.buttons === 1)) return; // dragging\n        let [xp, yp] = pointof(event);\n        (xp -= tx), (yp -= ty); // correct for facets and band scales\n        let ii = null;\n        let ri = maxRadius * maxRadius;\n        for (const j of index) {\n          const dx = kx * (px(j) - xp);\n          const dy = ky * (py(j) - yp);\n          const rj = dx * dx + dy * dy;\n          if (rj <= ri) (ii = j), (ri = rj);\n        }\n        update(ii, ri);\n      }\n\n      function pointerdown(event) {\n        if (event.pointerType !== \"mouse\") return;\n        if (i == null) return; // not pointing\n        if (state.sticky && state.roots.some((r) => r?.contains(event.target))) return; // stay sticky\n        if (state.sticky) (state.sticky = false), state.renders.forEach((r) => r(null)); // clear all pointers\n        else (state.sticky = true), render(i);\n        event.stopImmediatePropagation(); // suppress other pointers\n      }\n\n      function pointerleave(event) {\n        if (event.pointerType !== \"mouse\") return;\n        if (!state.sticky) update(null);\n      }\n\n      // We listen to the svg element; listening to the window instead would let\n      // us receive pointer events from farther away, but would also make it\n      // hard to know when to remove the listeners. (Using a mutation observer\n      // to watch the entire document is likely too expensive.)\n      svg.addEventListener(\"pointerenter\", pointermove);\n      svg.addEventListener(\"pointermove\", pointermove);\n      svg.addEventListener(\"pointerdown\", pointerdown);\n      svg.addEventListener(\"pointerleave\", pointerleave);\n\n      return render(null);\n    }, render)\n  };\n}\n\nexport function pointer(options) {\n  return pointerK(1, 1, options);\n}\n\nexport function pointerX(options) {\n  return pointerK(1, 0.01, options);\n}\n\nexport function pointerY(options) {\n  return pointerK(0.01, 1, options);\n}\n\nexport function anchorX({x1: X1, x2: X2, x: X = X1}, cx) {\n  return X1 && X2 ? (i) => (X1[i] + X2[i]) / 2 : X ? (i) => X[i] : () => cx;\n}\n\nexport function anchorY({y1: Y1, y2: Y2, y: Y = Y1}, cy) {\n  return Y1 && Y2 ? (i) => (Y1[i] + Y2[i]) / 2 : Y ? (i) => Y[i] : () => cy;\n}\n", "import {isOrdinalScale} from \"./scales.js\";\n\nexport function inferFontVariant(scale) {\n  return isOrdinalScale(scale) && scale.interval === undefined ? undefined : \"tabular-nums\";\n}\n", "import {quantize, interpolateNumber, piecewise, format, scaleBand, scaleLinear, axisBottom} from \"d3\";\nimport {inferFontVariant} from \"../axes.js\";\nimport {createContext, create} from \"../context.js\";\nimport {map, maybeNumberChannel} from \"../options.js\";\nimport {interpolatePiecewise} from \"../scales/quantitative.js\";\nimport {applyInlineStyles, impliedString, maybeClassName} from \"../style.js\";\n\nexport function legendRamp(color, options) {\n  let {\n    label = color.label,\n    tickSize = 6,\n    width = 240,\n    height = 44 + tickSize,\n    marginTop = 18,\n    marginRight = 0,\n    marginBottom = 16 + tickSize,\n    marginLeft = 0,\n    style,\n    ticks = (width - marginLeft - marginRight) / 64,\n    tickFormat,\n    fontVariant = inferFontVariant(color),\n    round = true,\n    opacity,\n    className\n  } = options;\n  const context = createContext(options);\n  className = maybeClassName(className);\n  opacity = maybeNumberChannel(opacity)[1];\n  if (tickFormat === null) tickFormat = () => null;\n\n  const svg = create(\"svg\", context)\n    .attr(\"class\", `${className}-ramp`)\n    .attr(\"font-family\", \"system-ui, sans-serif\")\n    .attr(\"font-size\", 10)\n    .attr(\"width\", width)\n    .attr(\"height\", height)\n    .attr(\"viewBox\", `0 0 ${width} ${height}`)\n    .call((svg) =>\n      // Warning: if you edit this, change defaultClassName.\n      svg.append(\"style\").text(\n        `.${className}-ramp {\n  display: block;\n  background: white;\n  height: auto;\n  height: intrinsic;\n  max-width: 100%;\n  overflow: visible;\n}\n.${className}-ramp text {\n  white-space: pre;\n}`\n      )\n    )\n    .call(applyInlineStyles, style);\n\n  let tickAdjust = (g) => g.selectAll(\".tick line\").attr(\"y1\", marginTop + marginBottom - height);\n\n  let x;\n\n  // Some D3 scales use scale.interpolate, some scale.interpolator, and some\n  // scale.round; this normalizes the API so it works with all scale types.\n  const applyRange = round ? (x, range) => x.rangeRound(range) : (x, range) => x.range(range);\n\n  const {type, domain, range, interpolate, scale, pivot} = color;\n\n  // Continuous\n  if (interpolate) {\n    // Often interpolate is a \u201Cfixed\u201D interpolator on the [0, 1] interval, as\n    // with a built-in color scheme, but sometimes it is a function that takes\n    // two arguments and is used in conjunction with the range.\n    const interpolator =\n      range === undefined\n        ? interpolate\n        : piecewise(interpolate.length === 1 ? interpolatePiecewise(interpolate) : interpolate, range);\n\n    // Construct a D3 scale of the same type, but with a range that evenly\n    // divides the horizontal extent of the legend. (In the common case, the\n    // domain.length is two, and so the range is simply the extent.) For a\n    // diverging scale, we need an extra point in the range for the pivot such\n    // that the pivot is always drawn in the middle.\n    x = applyRange(\n      scale.copy(),\n      quantize(\n        interpolateNumber(marginLeft, width - marginRight),\n        Math.min(domain.length + (pivot !== undefined), range === undefined ? Infinity : range.length)\n      )\n    );\n\n    // Construct a 256\u00D71 canvas, filling each pixel using the interpolator.\n    const n = 256;\n    const canvas = context.document.createElement(\"canvas\");\n    canvas.width = n;\n    canvas.height = 1;\n    const context2 = canvas.getContext(\"2d\");\n    for (let i = 0, j = n - 1; i < n; ++i) {\n      context2.fillStyle = interpolator(i / j);\n      context2.fillRect(i, 0, 1, 1);\n    }\n\n    svg\n      .append(\"image\")\n      .attr(\"opacity\", opacity)\n      .attr(\"x\", marginLeft)\n      .attr(\"y\", marginTop)\n      .attr(\"width\", width - marginLeft - marginRight)\n      .attr(\"height\", height - marginTop - marginBottom)\n      .attr(\"preserveAspectRatio\", \"none\")\n      .attr(\"xlink:href\", canvas.toDataURL());\n  }\n\n  // Threshold\n  else if (type === \"threshold\") {\n    const thresholds = domain;\n\n    const thresholdFormat =\n      tickFormat === undefined ? (d) => d : typeof tickFormat === \"string\" ? format(tickFormat) : tickFormat;\n\n    // Construct a linear scale with evenly-spaced ticks for each of the\n    // thresholds; the domain extends one beyond the threshold extent.\n    x = applyRange(scaleLinear().domain([-1, range.length - 1]), [marginLeft, width - marginRight]);\n\n    svg\n      .append(\"g\")\n      .attr(\"fill-opacity\", opacity)\n      .selectAll()\n      .data(range)\n      .enter()\n      .append(\"rect\")\n      .attr(\"x\", (d, i) => x(i - 1))\n      .attr(\"y\", marginTop)\n      .attr(\"width\", (d, i) => x(i) - x(i - 1))\n      .attr(\"height\", height - marginTop - marginBottom)\n      .attr(\"fill\", (d) => d);\n\n    ticks = map(thresholds, (_, i) => i);\n    tickFormat = (i) => thresholdFormat(thresholds[i], i);\n  }\n\n  // Ordinal (hopefully!)\n  else {\n    x = applyRange(scaleBand().domain(domain), [marginLeft, width - marginRight]);\n\n    svg\n      .append(\"g\")\n      .attr(\"fill-opacity\", opacity)\n      .selectAll()\n      .data(domain)\n      .enter()\n      .append(\"rect\")\n      .attr(\"x\", x)\n      .attr(\"y\", marginTop)\n      .attr(\"width\", Math.max(0, x.bandwidth() - 1))\n      .attr(\"height\", height - marginTop - marginBottom)\n      .attr(\"fill\", scale);\n\n    tickAdjust = () => {};\n  }\n\n  svg\n    .append(\"g\")\n    .attr(\"transform\", `translate(0,${height - marginBottom})`)\n    .call(\n      axisBottom(x)\n        .ticks(Array.isArray(ticks) ? null : ticks, typeof tickFormat === \"string\" ? tickFormat : undefined)\n        .tickFormat(typeof tickFormat === \"function\" ? tickFormat : undefined)\n        .tickSize(tickSize)\n        .tickValues(Array.isArray(ticks) ? ticks : null)\n    )\n    .attr(\"font-size\", null)\n    .attr(\"font-family\", null)\n    .attr(\"font-variant\", impliedString(fontVariant, \"normal\"))\n    .call(tickAdjust)\n    .call((g) => g.select(\".domain\").remove());\n\n  if (label !== undefined) {\n    svg\n      .append(\"text\")\n      .attr(\"x\", marginLeft)\n      .attr(\"y\", marginTop - 6)\n      .attr(\"fill\", \"currentColor\") // TODO move to stylesheet?\n      .attr(\"font-weight\", \"bold\")\n      .text(label);\n  }\n\n  return svg.node();\n}\n", "export const radians = Math.PI / 180;\n", "import {create} from \"./context.js\";\n\nexport function markers(mark, {marker, markerStart = marker, markerMid = marker, markerEnd = marker} = {}) {\n  mark.markerStart = maybeMarker(markerStart);\n  mark.markerMid = maybeMarker(markerMid);\n  mark.markerEnd = maybeMarker(markerEnd);\n}\n\nfunction maybeMarker(marker) {\n  if (marker == null || marker === false) return null;\n  if (marker === true) return markerCircleFill;\n  if (typeof marker === \"function\") return marker;\n  switch (`${marker}`.toLowerCase()) {\n    case \"none\":\n      return null;\n    case \"arrow\":\n      return markerArrow(\"auto\");\n    case \"arrow-reverse\":\n      return markerArrow(\"auto-start-reverse\");\n    case \"dot\":\n      return markerDot;\n    case \"circle\":\n    case \"circle-fill\":\n      return markerCircleFill;\n    case \"circle-stroke\":\n      return markerCircleStroke;\n  }\n  throw new Error(`invalid marker: ${marker}`);\n}\n\nfunction markerArrow(orient) {\n  return (color, context) =>\n    create(\"svg:marker\", context)\n      .attr(\"viewBox\", \"-5 -5 10 10\")\n      .attr(\"markerWidth\", 6.67)\n      .attr(\"markerHeight\", 6.67)\n      .attr(\"orient\", orient)\n      .attr(\"fill\", \"none\")\n      .attr(\"stroke\", color)\n      .attr(\"stroke-width\", 1.5)\n      .attr(\"stroke-linecap\", \"round\")\n      .attr(\"stroke-linejoin\", \"round\")\n      .call((marker) => marker.append(\"path\").attr(\"d\", \"M-1.5,-3l3,3l-3,3\"))\n      .node();\n}\n\nfunction markerDot(color, context) {\n  return create(\"svg:marker\", context)\n    .attr(\"viewBox\", \"-5 -5 10 10\")\n    .attr(\"markerWidth\", 6.67)\n    .attr(\"markerHeight\", 6.67)\n    .attr(\"fill\", color)\n    .attr(\"stroke\", \"none\")\n    .call((marker) => marker.append(\"circle\").attr(\"r\", 2.5))\n    .node();\n}\n\nfunction markerCircleFill(color, context) {\n  return create(\"svg:marker\", context)\n    .attr(\"viewBox\", \"-5 -5 10 10\")\n    .attr(\"markerWidth\", 6.67)\n    .attr(\"markerHeight\", 6.67)\n    .attr(\"fill\", color)\n    .attr(\"stroke\", \"white\")\n    .attr(\"stroke-width\", 1.5)\n    .call((marker) => marker.append(\"circle\").attr(\"r\", 3))\n    .node();\n}\n\nfunction markerCircleStroke(color, context) {\n  return create(\"svg:marker\", context)\n    .attr(\"viewBox\", \"-5 -5 10 10\")\n    .attr(\"markerWidth\", 6.67)\n    .attr(\"markerHeight\", 6.67)\n    .attr(\"fill\", \"white\")\n    .attr(\"stroke\", color)\n    .attr(\"stroke-width\", 1.5)\n    .call((marker) => marker.append(\"circle\").attr(\"r\", 3))\n    .node();\n}\n\nlet nextMarkerId = 0;\n\nexport function applyMarkers(path, mark, {stroke: S}, context) {\n  return applyMarkersColor(path, mark, S && ((i) => S[i]), context);\n}\n\nexport function applyGroupedMarkers(path, mark, {stroke: S}, context) {\n  return applyMarkersColor(path, mark, S && (([i]) => S[i]), context);\n}\n\nfunction applyMarkersColor(path, {markerStart, markerMid, markerEnd, stroke}, strokeof = () => stroke, context) {\n  const iriByMarkerColor = new Map();\n\n  function applyMarker(marker) {\n    return function (i) {\n      const color = strokeof(i);\n      let iriByColor = iriByMarkerColor.get(marker);\n      if (!iriByColor) iriByMarkerColor.set(marker, (iriByColor = new Map()));\n      let iri = iriByColor.get(color);\n      if (!iri) {\n        const node = this.parentNode.insertBefore(marker(color, context), this);\n        const id = `plot-marker-${++nextMarkerId}`;\n        node.setAttribute(\"id\", id);\n        iriByColor.set(color, (iri = `url(#${id})`));\n      }\n      return iri;\n    };\n  }\n\n  if (markerStart) path.attr(\"marker-start\", applyMarker(markerStart));\n  if (markerMid) path.attr(\"marker-mid\", applyMarker(markerMid));\n  if (markerEnd) path.attr(\"marker-end\", applyMarker(markerEnd));\n}\n", "import {offset} from \"../style.js\";\n\nexport function maybeInsetX({inset, insetLeft, insetRight, ...options} = {}) {\n  [insetLeft, insetRight] = maybeInset(inset, insetLeft, insetRight);\n  return {inset, insetLeft, insetRight, ...options};\n}\n\nexport function maybeInsetY({inset, insetTop, insetBottom, ...options} = {}) {\n  [insetTop, insetBottom] = maybeInset(inset, insetTop, insetBottom);\n  return {inset, insetTop, insetBottom, ...options};\n}\n\nfunction maybeInset(inset, inset1, inset2) {\n  return inset === undefined && inset1 === undefined && inset2 === undefined\n    ? offset\n      ? [1, 0]\n      : [0.5, 0.5]\n    : [inset1, inset2];\n}\n", "import {isTemporal, labelof, map, maybeInterval, maybeValue, valueof} from \"../options.js\";\nimport {maybeInsetX, maybeInsetY} from \"./inset.js\";\n\n// The interval may be specified either as x: {value, interval} or as {x,\n// interval}. The former can be used to specify separate intervals for x and y,\n// for example with Plot.rect.\nfunction maybeIntervalValue(value, {interval}) {\n  value = {...maybeValue(value)};\n  value.interval = maybeInterval(value.interval === undefined ? interval : value.interval);\n  return value;\n}\n\nfunction maybeIntervalK(k, maybeInsetK, options, trivial) {\n  const {[k]: v, [`${k}1`]: v1, [`${k}2`]: v2} = options;\n  const {value, interval} = maybeIntervalValue(v, options);\n  if (value == null || (interval == null && !trivial)) return options;\n  const label = labelof(v);\n  if (interval == null) {\n    let V;\n    const kv = {transform: (data) => V || (V = valueof(data, value)), label};\n    return {\n      ...options,\n      [k]: undefined,\n      [`${k}1`]: v1 === undefined ? kv : v1,\n      [`${k}2`]: v2 === undefined ? kv : v2\n    };\n  }\n  let D1, V1;\n  function transform(data) {\n    if (V1 !== undefined && data === D1) return V1; // memoize\n    return (V1 = map(valueof((D1 = data), value), (v) => interval.floor(v)));\n  }\n  return maybeInsetK({\n    ...options,\n    [k]: undefined,\n    [`${k}1`]: v1 === undefined ? {transform, label} : v1,\n    [`${k}2`]: v2 === undefined ? {transform: (data) => transform(data).map((v) => interval.offset(v)), label} : v2\n  });\n}\n\nfunction maybeIntervalMidK(k, maybeInsetK, options) {\n  const {[k]: v} = options;\n  const {value, interval} = maybeIntervalValue(v, options);\n  if (value == null || interval == null) return options;\n  return maybeInsetK({\n    ...options,\n    [k]: {\n      label: labelof(v),\n      transform: (data) => {\n        const V1 = map(valueof(data, value), (v) => interval.floor(v));\n        const V2 = V1.map((v) => interval.offset(v));\n        return V1.map(\n          isTemporal(V1)\n            ? (v1, v2) =>\n                v1 == null || isNaN((v1 = +v1)) || ((v2 = V2[v2]), v2 == null) || isNaN((v2 = +v2))\n                  ? undefined\n                  : new Date((v1 + v2) / 2)\n            : (v1, v2) => (v1 == null || ((v2 = V2[v2]), v2 == null) ? NaN : (+v1 + +v2) / 2)\n        );\n      }\n    }\n  });\n}\n\nexport function maybeTrivialIntervalX(options = {}) {\n  return maybeIntervalK(\"x\", maybeInsetX, options, true);\n}\n\nexport function maybeTrivialIntervalY(options = {}) {\n  return maybeIntervalK(\"y\", maybeInsetY, options, true);\n}\n\nexport function maybeIntervalX(options = {}) {\n  return maybeIntervalK(\"x\", maybeInsetX, options);\n}\n\nexport function maybeIntervalY(options = {}) {\n  return maybeIntervalK(\"y\", maybeInsetY, options);\n}\n\nexport function maybeIntervalMidX(options = {}) {\n  return maybeIntervalMidK(\"x\", maybeInsetX, options);\n}\n\nexport function maybeIntervalMidY(options = {}) {\n  return maybeIntervalMidK(\"y\", maybeInsetY, options);\n}\n", "import {create} from \"../context.js\";\nimport {Mark, withTip} from \"../mark.js\";\nimport {applyMarkers, markers} from \"../marker.js\";\nimport {identity, number} from \"../options.js\";\nimport {isCollapsed} from \"../scales.js\";\nimport {applyChannelStyles, applyDirectStyles, applyIndirectStyles, applyTransform, offset} from \"../style.js\";\nimport {maybeIntervalX, maybeIntervalY} from \"../transforms/interval.js\";\n\nconst defaults = {\n  ariaLabel: \"rule\",\n  fill: null,\n  stroke: \"currentColor\"\n};\n\nexport class RuleX extends Mark {\n  constructor(data, options = {}) {\n    const {x, y1, y2, inset = 0, insetTop = inset, insetBottom = inset} = options;\n    super(\n      data,\n      {\n        x: {value: x, scale: \"x\", optional: true},\n        y1: {value: y1, scale: \"y\", optional: true},\n        y2: {value: y2, scale: \"y\", optional: true}\n      },\n      withTip(options, \"x\"),\n      defaults\n    );\n    this.insetTop = number(insetTop);\n    this.insetBottom = number(insetBottom);\n    markers(this, options);\n  }\n  render(index, scales, channels, dimensions, context) {\n    const {x, y} = scales;\n    const {x: X, y1: Y1, y2: Y2} = channels;\n    const {width, height, marginTop, marginRight, marginLeft, marginBottom} = dimensions;\n    const {insetTop, insetBottom} = this;\n    return create(\"svg:g\", context)\n      .call(applyIndirectStyles, this, dimensions, context)\n      .call(applyTransform, this, {x: X && x}, offset, 0)\n      .call((g) =>\n        g\n          .selectAll()\n          .data(index)\n          .enter()\n          .append(\"line\")\n          .call(applyDirectStyles, this)\n          .attr(\"x1\", X ? (i) => X[i] : (marginLeft + width - marginRight) / 2)\n          .attr(\"x2\", X ? (i) => X[i] : (marginLeft + width - marginRight) / 2)\n          .attr(\"y1\", Y1 && !isCollapsed(y) ? (i) => Y1[i] + insetTop : marginTop + insetTop)\n          .attr(\n            \"y2\",\n            Y2 && !isCollapsed(y)\n              ? y.bandwidth\n                ? (i) => Y2[i] + y.bandwidth() - insetBottom\n                : (i) => Y2[i] - insetBottom\n              : height - marginBottom - insetBottom\n          )\n          .call(applyChannelStyles, this, channels)\n          .call(applyMarkers, this, channels, context)\n      )\n      .node();\n  }\n}\n\nexport class RuleY extends Mark {\n  constructor(data, options = {}) {\n    const {x1, x2, y, inset = 0, insetRight = inset, insetLeft = inset} = options;\n    super(\n      data,\n      {\n        y: {value: y, scale: \"y\", optional: true},\n        x1: {value: x1, scale: \"x\", optional: true},\n        x2: {value: x2, scale: \"x\", optional: true}\n      },\n      withTip(options, \"y\"),\n      defaults\n    );\n    this.insetRight = number(insetRight);\n    this.insetLeft = number(insetLeft);\n    markers(this, options);\n  }\n  render(index, scales, channels, dimensions, context) {\n    const {x, y} = scales;\n    const {y: Y, x1: X1, x2: X2} = channels;\n    const {width, height, marginTop, marginRight, marginLeft, marginBottom} = dimensions;\n    const {insetLeft, insetRight} = this;\n    return create(\"svg:g\", context)\n      .call(applyIndirectStyles, this, dimensions, context)\n      .call(applyTransform, this, {y: Y && y}, 0, offset)\n      .call((g) =>\n        g\n          .selectAll()\n          .data(index)\n          .enter()\n          .append(\"line\")\n          .call(applyDirectStyles, this)\n          .attr(\"x1\", X1 && !isCollapsed(x) ? (i) => X1[i] + insetLeft : marginLeft + insetLeft)\n          .attr(\n            \"x2\",\n            X2 && !isCollapsed(x)\n              ? x.bandwidth\n                ? (i) => X2[i] + x.bandwidth() - insetRight\n                : (i) => X2[i] - insetRight\n              : width - marginRight - insetRight\n          )\n          .attr(\"y1\", Y ? (i) => Y[i] : (marginTop + height - marginBottom) / 2)\n          .attr(\"y2\", Y ? (i) => Y[i] : (marginTop + height - marginBottom) / 2)\n          .call(applyChannelStyles, this, channels)\n          .call(applyMarkers, this, channels, context)\n      )\n      .node();\n  }\n}\n\nexport function ruleX(data, options) {\n  let {x = identity, y, y1, y2, ...rest} = maybeIntervalY(options);\n  [y1, y2] = maybeOptionalZero(y, y1, y2);\n  return new RuleX(data, {...rest, x, y1, y2});\n}\n\nexport function ruleY(data, options) {\n  let {y = identity, x, x1, x2, ...rest} = maybeIntervalX(options);\n  [x1, x2] = maybeOptionalZero(x, x1, x2);\n  return new RuleY(data, {...rest, y, x1, x2});\n}\n\n// For marks specified either as [0, x] or [x1, x2], or nothing.\nfunction maybeOptionalZero(x, x1, x2) {\n  if (x == null) {\n    if (x1 === undefined) {\n      if (x2 !== undefined) return [0, x2];\n    } else {\n      if (x2 === undefined) return [0, x1];\n    }\n  } else if (x1 === undefined) {\n    return x2 === undefined ? [0, x] : [x, x2];\n  } else if (x2 === undefined) {\n    return [x, x1];\n  }\n  return [x1, x2];\n}\n", "export function template(strings, ...parts) {\n  let n = parts.length;\n\n  // If any of the interpolated parameters are strings rather than functions,\n  // bake them into the template to optimize performance during render.\n  for (let j = 0, copy = true; j < n; ++j) {\n    if (typeof parts[j] !== \"function\") {\n      if (copy) {\n        strings = strings.slice(); // copy before mutate\n        copy = false;\n      }\n      strings.splice(j, 2, strings[j] + parts[j] + strings[j + 1]);\n      parts.splice(j, 1);\n      --j, --n;\n    }\n  }\n\n  return (i) => {\n    let s = strings[0];\n    for (let j = 0; j < n; ++j) {\n      s += parts[j](i) + strings[j + 1];\n    }\n    return s;\n  };\n}\n", "import {namespaces} from \"d3\";\nimport {create} from \"../context.js\";\nimport {nonempty} from \"../defined.js\";\nimport {formatDefault} from \"../format.js\";\nimport {Mark} from \"../mark.js\";\nimport {\n  indexOf,\n  identity,\n  string,\n  maybeNumberChannel,\n  maybeTuple,\n  numberChannel,\n  isNumeric,\n  isTemporal,\n  keyword,\n  maybeFrameAnchor,\n  isTextual,\n  isIterable\n} from \"../options.js\";\nimport {\n  applyChannelStyles,\n  applyDirectStyles,\n  applyIndirectStyles,\n  applyAttr,\n  applyTransform,\n  impliedString,\n  applyFrameAnchor\n} from \"../style.js\";\nimport {template} from \"../template.js\";\nimport {maybeIntervalMidX, maybeIntervalMidY} from \"../transforms/interval.js\";\n\nconst defaults = {\n  ariaLabel: \"text\",\n  strokeLinejoin: \"round\",\n  strokeWidth: 3,\n  paintOrder: \"stroke\"\n};\n\nconst softHyphen = \"\\u00ad\";\n\nexport class Text extends Mark {\n  constructor(data, options = {}) {\n    const {\n      x,\n      y,\n      text = isIterable(data) && isTextual(data) ? identity : indexOf,\n      frameAnchor,\n      textAnchor = /right$/i.test(frameAnchor) ? \"end\" : /left$/i.test(frameAnchor) ? \"start\" : \"middle\",\n      lineAnchor = /^top/i.test(frameAnchor) ? \"top\" : /^bottom/i.test(frameAnchor) ? \"bottom\" : \"middle\",\n      lineHeight = 1,\n      lineWidth = Infinity,\n      textOverflow,\n      monospace,\n      fontFamily = monospace ? \"ui-monospace, monospace\" : undefined,\n      fontSize,\n      fontStyle,\n      fontVariant,\n      fontWeight,\n      rotate\n    } = options;\n    const [vrotate, crotate] = maybeNumberChannel(rotate, 0);\n    const [vfontSize, cfontSize] = maybeFontSizeChannel(fontSize);\n    super(\n      data,\n      {\n        x: {value: x, scale: \"x\", optional: true},\n        y: {value: y, scale: \"y\", optional: true},\n        fontSize: {value: vfontSize, optional: true},\n        rotate: {value: numberChannel(vrotate), optional: true},\n        text: {value: text, filter: nonempty, optional: true}\n      },\n      options,\n      defaults\n    );\n    this.rotate = crotate;\n    this.textAnchor = impliedString(textAnchor, \"middle\");\n    this.lineAnchor = keyword(lineAnchor, \"lineAnchor\", [\"top\", \"middle\", \"bottom\"]);\n    this.lineHeight = +lineHeight;\n    this.lineWidth = +lineWidth;\n    this.textOverflow = maybeTextOverflow(textOverflow);\n    this.monospace = !!monospace;\n    this.fontFamily = string(fontFamily);\n    this.fontSize = cfontSize;\n    this.fontStyle = string(fontStyle);\n    this.fontVariant = string(fontVariant);\n    this.fontWeight = string(fontWeight);\n    this.frameAnchor = maybeFrameAnchor(frameAnchor);\n    if (!(this.lineWidth >= 0)) throw new Error(`invalid lineWidth: ${lineWidth}`);\n    this.splitLines = splitter(this);\n    this.clipLine = clipper(this);\n  }\n  render(index, scales, channels, dimensions, context) {\n    const {x, y} = scales;\n    const {x: X, y: Y, rotate: R, text: T, title: TL, fontSize: FS} = channels;\n    const {rotate} = this;\n    const [cx, cy] = applyFrameAnchor(this, dimensions);\n    return create(\"svg:g\", context)\n      .call(applyIndirectStyles, this, dimensions, context)\n      .call(applyIndirectTextStyles, this, T, dimensions)\n      .call(applyTransform, this, {x: X && x, y: Y && y})\n      .call((g) =>\n        g\n          .selectAll()\n          .data(index)\n          .enter()\n          .append(\"text\")\n          .call(applyDirectStyles, this)\n          .call(applyMultilineText, this, T, TL)\n          .attr(\n            \"transform\",\n            template`translate(${X ? (i) => X[i] : cx},${Y ? (i) => Y[i] : cy})${\n              R ? (i) => ` rotate(${R[i]})` : rotate ? ` rotate(${rotate})` : ``\n            }`\n          )\n          .call(applyAttr, \"font-size\", FS && ((i) => FS[i]))\n          .call(applyChannelStyles, this, channels)\n      )\n      .node();\n  }\n}\n\nexport function maybeTextOverflow(textOverflow) {\n  return textOverflow == null\n    ? null\n    : keyword(textOverflow, \"textOverflow\", [\n        \"clip\", // shorthand for clip-end\n        \"ellipsis\", // \u2026 ellipsis-end\n        \"clip-start\",\n        \"clip-end\",\n        \"ellipsis-start\",\n        \"ellipsis-middle\",\n        \"ellipsis-end\"\n      ]).replace(/^(clip|ellipsis)$/, \"$1-end\");\n}\n\nfunction applyMultilineText(selection, mark, T, TL) {\n  if (!T) return;\n  const {lineAnchor, lineHeight, textOverflow, splitLines, clipLine} = mark;\n  selection.each(function (i) {\n    const lines = splitLines(formatDefault(T[i]) ?? \"\").map(clipLine);\n    const n = lines.length;\n    const y = lineAnchor === \"top\" ? 0.71 : lineAnchor === \"bottom\" ? 1 - n : (164 - n * 100) / 200;\n    if (n > 1) {\n      let m = 0;\n      for (let i = 0; i < n; ++i) {\n        ++m;\n        if (!lines[i]) continue;\n        const tspan = this.ownerDocument.createElementNS(namespaces.svg, \"tspan\");\n        tspan.setAttribute(\"x\", 0);\n        if (i === m - 1) tspan.setAttribute(\"y\", `${(y + i) * lineHeight}em`);\n        else tspan.setAttribute(\"dy\", `${m * lineHeight}em`);\n        tspan.textContent = lines[i];\n        this.appendChild(tspan);\n        m = 0;\n      }\n    } else {\n      if (y) this.setAttribute(\"y\", `${y * lineHeight}em`);\n      this.textContent = lines[0];\n    }\n    if (textOverflow && !TL && lines[0] !== T[i]) {\n      const title = this.ownerDocument.createElementNS(namespaces.svg, \"title\");\n      title.textContent = T[i];\n      this.appendChild(title);\n    }\n  });\n}\n\nexport function text(data, {x, y, ...options} = {}) {\n  if (options.frameAnchor === undefined) [x, y] = maybeTuple(x, y);\n  return new Text(data, {...options, x, y});\n}\n\nexport function textX(data, {x = identity, ...options} = {}) {\n  return new Text(data, maybeIntervalMidY({...options, x}));\n}\n\nexport function textY(data, {y = identity, ...options} = {}) {\n  return new Text(data, maybeIntervalMidX({...options, y}));\n}\n\nexport function applyIndirectTextStyles(selection, mark, T) {\n  applyAttr(selection, \"text-anchor\", mark.textAnchor);\n  applyAttr(selection, \"font-family\", mark.fontFamily);\n  applyAttr(selection, \"font-size\", mark.fontSize);\n  applyAttr(selection, \"font-style\", mark.fontStyle);\n  applyAttr(selection, \"font-variant\", mark.fontVariant === undefined ? inferFontVariant(T) : mark.fontVariant);\n  applyAttr(selection, \"font-weight\", mark.fontWeight);\n}\n\nfunction inferFontVariant(T) {\n  return T && (isNumeric(T) || isTemporal(T)) ? \"tabular-nums\" : undefined;\n}\n\n// https://developer.mozilla.org/en-US/docs/Web/CSS/font-size\nconst fontSizes = new Set([\n  // global keywords\n  \"inherit\",\n  \"initial\",\n  \"revert\",\n  \"unset\",\n  // absolute keywords\n  \"xx-small\",\n  \"x-small\",\n  \"small\",\n  \"medium\",\n  \"large\",\n  \"x-large\",\n  \"xx-large\",\n  \"xxx-large\",\n  // relative keywords\n  \"larger\",\n  \"smaller\"\n]);\n\n// The font size may be expressed as a constant in the following forms:\n// - number in pixels\n// - string keyword: see above\n// - string <length>: e.g., \"12px\"\n// - string <percentage>: e.g., \"80%\"\n// Anything else is assumed to be a channel definition.\nfunction maybeFontSizeChannel(fontSize) {\n  if (fontSize == null || typeof fontSize === \"number\") return [undefined, fontSize];\n  if (typeof fontSize !== \"string\") return [fontSize, undefined];\n  fontSize = fontSize.trim().toLowerCase();\n  return fontSizes.has(fontSize) || /^[+-]?\\d*\\.?\\d+(e[+-]?\\d+)?(\\w*|%)$/.test(fontSize)\n    ? [undefined, fontSize]\n    : [fontSize, undefined];\n}\n\n// This is a greedy algorithm for line wrapping. It would be better to use the\n// Knuth\u2013Plass line breaking algorithm (but that would be much more complex).\n// https://en.wikipedia.org/wiki/Line_wrap_and_word_wrap\nfunction lineWrap(input, maxWidth, widthof) {\n  const lines = [];\n  let lineStart,\n    lineEnd = 0;\n  for (const [wordStart, wordEnd, required] of lineBreaks(input)) {\n    // Record the start of a line. This isn\u2019t the same as the previous line\u2019s\n    // end because we often skip spaces between lines.\n    if (lineStart === undefined) lineStart = wordStart;\n\n    // If the current line is not empty, and if adding the current word would\n    // make the line longer than the allowed width, then break the line at the\n    // previous word end.\n    if (lineEnd > lineStart && widthof(input, lineStart, wordEnd) > maxWidth) {\n      lines.push(input.slice(lineStart, lineEnd) + (input[lineEnd - 1] === softHyphen ? \"-\" : \"\"));\n      lineStart = wordStart;\n    }\n\n    // If this is a required break (a newline), emit the line and reset.\n    if (required) {\n      lines.push(input.slice(lineStart, wordEnd));\n      lineStart = undefined;\n      continue;\n    }\n\n    // Extend the current line to include the new word.\n    lineEnd = wordEnd;\n  }\n  return lines;\n}\n\n// This is a rudimentary (and U.S.-centric) algorithm for finding opportunities\n// to break lines between words. A better and far more comprehensive approach\n// would be to use the official Unicode Line Breaking Algorithm.\n// https://unicode.org/reports/tr14/\nfunction* lineBreaks(input) {\n  let i = 0,\n    j = 0;\n  const n = input.length;\n  while (j < n) {\n    let k = 1;\n    switch (input[j]) {\n      case softHyphen:\n      case \"-\": // hyphen\n        ++j;\n        yield [i, j, false];\n        i = j;\n        break;\n      case \" \":\n        yield [i, j, false];\n        while (input[++j] === \" \"); // skip multiple spaces\n        i = j;\n        break;\n      case \"\\r\":\n        if (input[j + 1] === \"\\n\") ++k; // falls through\n      case \"\\n\":\n        yield [i, j, true];\n        j += k;\n        i = j;\n        break;\n      default:\n        ++j;\n        break;\n    }\n  }\n  yield [i, j, true];\n}\n\n// Computed as round(measureText(text).width * 10) at 10px system-ui. For\n// characters that are not represented in this map, we\u2019d ideally want to use a\n// weighted average of what we expect to see. But since we don\u2019t really know\n// what that is, using \u201Ce\u201D seems reasonable.\nconst defaultWidthMap = {\n  a: 56,\n  b: 63,\n  c: 57,\n  d: 63,\n  e: 58,\n  f: 37,\n  g: 62,\n  h: 60,\n  i: 26,\n  j: 26,\n  k: 55,\n  l: 26,\n  m: 88,\n  n: 60,\n  o: 60,\n  p: 62,\n  q: 62,\n  r: 39,\n  s: 54,\n  t: 38,\n  u: 60,\n  v: 55,\n  w: 79,\n  x: 54,\n  y: 55,\n  z: 55,\n  A: 69,\n  B: 67,\n  C: 73,\n  D: 74,\n  E: 61,\n  F: 58,\n  G: 76,\n  H: 75,\n  I: 28,\n  J: 55,\n  K: 67,\n  L: 58,\n  M: 89,\n  N: 75,\n  O: 78,\n  P: 65,\n  Q: 78,\n  R: 67,\n  S: 65,\n  T: 65,\n  U: 75,\n  V: 69,\n  W: 98,\n  X: 69,\n  Y: 67,\n  Z: 67,\n  0: 64,\n  1: 48,\n  2: 62,\n  3: 64,\n  4: 66,\n  5: 63,\n  6: 65,\n  7: 58,\n  8: 65,\n  9: 65,\n  \" \": 29,\n  \"!\": 32,\n  '\"': 49,\n  \"'\": 31,\n  \"(\": 39,\n  \")\": 39,\n  \",\": 31,\n  \"-\": 48,\n  \".\": 31,\n  \"/\": 32,\n  \":\": 31,\n  \";\": 31,\n  \"?\": 52,\n  \"\u2018\": 31,\n  \"\u2019\": 31,\n  \"\u201C\": 47,\n  \"\u201D\": 47,\n  \"\u2026\": 82\n};\n\n// This is a rudimentary (and U.S.-centric) algorithm for measuring the width of\n// a string based on a technique of Gregor Aisch; it assumes that individual\n// characters are laid out independently and does not implement the Unicode\n// grapheme cluster breaking algorithm. It does understand code points, though,\n// and so treats things like emoji as having the width of a lowercase e (and\n// should be equivalent to using for-of to iterate over code points, while also\n// being fast). TODO Optimize this by noting that we often re-measure characters\n// that were previously measured?\n// http://www.unicode.org/reports/tr29/#Grapheme_Cluster_Boundaries\n// https://exploringjs.com/impatient-js/ch_strings.html#atoms-of-text\nexport function defaultWidth(text, start = 0, end = text.length) {\n  let sum = 0;\n  for (let i = start; i < end; i = readCharacter(text, i)) {\n    sum += defaultWidthMap[text[i]] ?? (isPictographic(text, i) ? 120 : defaultWidthMap.e);\n  }\n  return sum;\n}\n\n// Even for monospaced text, we can\u2019t assume that the number of UTF-16 code\n// points (i.e., the length of a string) corresponds to the number of visible\n// characters; we still have to count graphemes. And note that pictographic\n// characters such as emojis are typically not monospaced!\nexport function monospaceWidth(text, start = 0, end = text.length) {\n  let sum = 0;\n  for (let i = start; i < end; i = readCharacter(text, i)) {\n    sum += isPictographic(text, i) ? 200 : 100;\n  }\n  return sum;\n}\n\nexport function splitter({monospace, lineWidth, textOverflow}) {\n  if (textOverflow != null || lineWidth == Infinity) return (text) => text.split(/\\r\\n?|\\n/g);\n  const widthof = monospace ? monospaceWidth : defaultWidth;\n  const maxWidth = lineWidth * 100;\n  return (text) => lineWrap(text, maxWidth, widthof);\n}\n\nexport function clipper({monospace, lineWidth, textOverflow}) {\n  if (textOverflow == null || lineWidth == Infinity) return (text) => text;\n  const widthof = monospace ? monospaceWidth : defaultWidth;\n  const maxWidth = lineWidth * 100;\n  switch (textOverflow) {\n    case \"clip-start\":\n      return (text) => clipStart(text, maxWidth, widthof, \"\");\n    case \"clip-end\":\n      return (text) => clipEnd(text, maxWidth, widthof, \"\");\n    case \"ellipsis-start\":\n      return (text) => clipStart(text, maxWidth, widthof, ellipsis);\n    case \"ellipsis-middle\":\n      return (text) => clipMiddle(text, maxWidth, widthof, ellipsis);\n    case \"ellipsis-end\":\n      return (text) => clipEnd(text, maxWidth, widthof, ellipsis);\n  }\n}\n\nexport const ellipsis = \"\u2026\";\n\n// Cuts the given text to the given width, using the specified widthof function;\n// the returned [index, error] guarantees text.slice(0, index) fits within the\n// specified width with the given error. If the text fits naturally within the\n// given width, returns [-1, 0]. If the text needs cutting, the given inset\n// specifies how much space (in the same units as width and widthof) to reserve\n// for a possible ellipsis character.\nexport function cut(text, width, widthof, inset) {\n  const I = []; // indexes of read character boundaries\n  let w = 0; // current line width\n  for (let i = 0, j = 0, n = text.length; i < n; i = j) {\n    j = readCharacter(text, i); // read the next character\n    const l = widthof(text, i, j); // current character width\n    if (w + l > width) {\n      w += inset;\n      while (w > width && i > 0) (j = i), (i = I.pop()), (w -= widthof(text, i, j)); // remove excess\n      return [i, width - w];\n    }\n    w += l;\n    I.push(i);\n  }\n  return [-1, 0];\n}\n\nexport function clipEnd(text, width, widthof, ellipsis) {\n  text = text.trim(); // ignore leading and trailing whitespace\n  const e = widthof(ellipsis);\n  const [i] = cut(text, width, widthof, e);\n  return i < 0 ? text : text.slice(0, i).trimEnd() + ellipsis;\n}\n\nexport function clipMiddle(text, width, widthof, ellipsis) {\n  text = text.trim(); // ignore leading and trailing whitespace\n  const w = widthof(text);\n  if (w <= width) return text;\n  const e = widthof(ellipsis) / 2;\n  const [i, ei] = cut(text, width / 2, widthof, e);\n  const [j] = cut(text, w - width / 2 - ei + e, widthof, -e); // TODO read spaces?\n  return j < 0 ? ellipsis : text.slice(0, i).trimEnd() + ellipsis + text.slice(readCharacter(text, j)).trimStart();\n}\n\nexport function clipStart(text, width, widthof, ellipsis) {\n  text = text.trim(); // ignore leading and trailing whitespace\n  const w = widthof(text);\n  if (w <= width) return text;\n  const e = widthof(ellipsis);\n  const [j] = cut(text, w - width + e, widthof, -e); // TODO read spaces?\n  return j < 0 ? ellipsis : ellipsis + text.slice(readCharacter(text, j)).trimStart();\n}\n\nconst reCombiner = /[\\p{Combining_Mark}\\p{Emoji_Modifier}]+/uy;\nconst rePictographic = /\\p{Extended_Pictographic}/uy;\n\n// Reads a single \u201Ccharacter\u201D element from the given text starting at the given\n// index, returning the index after the read character. Ideally, this implements\n// the Unicode text segmentation algorithm and understands grapheme cluster\n// boundaries, etc., but in practice this is only smart enough to detect UTF-16\n// surrogate pairs, combining marks, and zero-width joiner (zwj) sequences such\n// as emoji skin color modifiers. https://unicode.org/reports/tr29/\nexport function readCharacter(text, i) {\n  i += isSurrogatePair(text, i) ? 2 : 1;\n  if (isCombiner(text, i)) i = reCombiner.lastIndex;\n  if (isZeroWidthJoiner(text, i)) return readCharacter(text, i + 1);\n  return i;\n}\n\n// We avoid more expensive regex tests involving Unicode property classes by\n// first checking for the common case of 7-bit ASCII characters.\nfunction isAscii(text, i) {\n  return text.charCodeAt(i) < 0x80;\n}\n\nfunction isSurrogatePair(text, i) {\n  const hi = text.charCodeAt(i);\n  if (hi >= 0xd800 && hi < 0xdc00) {\n    const lo = text.charCodeAt(i + 1);\n    return lo >= 0xdc00 && lo < 0xe000;\n  }\n  return false;\n}\n\nfunction isZeroWidthJoiner(text, i) {\n  return text.charCodeAt(i) === 0x200d;\n}\n\nfunction isCombiner(text, i) {\n  return isAscii(text, i) ? false : ((reCombiner.lastIndex = i), reCombiner.test(text));\n}\n\nfunction isPictographic(text, i) {\n  return isAscii(text, i) ? false : ((rePictographic.lastIndex = i), rePictographic.test(text));\n}\n", "import {pathRound as path} from \"d3\";\nimport {create} from \"../context.js\";\nimport {Mark} from \"../mark.js\";\nimport {maybeFrameAnchor, maybeNumberChannel, maybeTuple, keyword, identity} from \"../options.js\";\nimport {\n  applyChannelStyles,\n  applyDirectStyles,\n  applyFrameAnchor,\n  applyIndirectStyles,\n  applyTransform\n} from \"../style.js\";\nimport {template} from \"../template.js\";\n\nconst defaults = {\n  ariaLabel: \"vector\",\n  fill: \"none\",\n  stroke: \"currentColor\",\n  strokeWidth: 1.5,\n  strokeLinejoin: \"round\",\n  strokeLinecap: \"round\"\n};\n\nconst defaultRadius = 3.5;\n\n// The size of the arrowhead is proportional to its length, but we still allow\n// the relative size of the head to be controlled via the mark\u2019s width option;\n// doubling the default radius will produce an arrowhead that is twice as big.\n// That said, we\u2019ll probably want a arrow with a fixed head size, too.\nconst wingRatio = defaultRadius * 5;\n\nconst shapeArrow = {\n  draw(context, l, r) {\n    const wing = (l * r) / wingRatio;\n    context.moveTo(0, 0);\n    context.lineTo(0, -l);\n    context.moveTo(-wing, wing - l);\n    context.lineTo(0, -l);\n    context.lineTo(wing, wing - l);\n  }\n};\n\nconst shapeSpike = {\n  draw(context, l, r) {\n    context.moveTo(-r, 0);\n    context.lineTo(0, -l);\n    context.lineTo(r, 0);\n  }\n};\n\nconst shapes = new Map([\n  [\"arrow\", shapeArrow],\n  [\"spike\", shapeSpike]\n]);\n\nfunction isShapeObject(value) {\n  return value && typeof value.draw === \"function\";\n}\n\nfunction maybeShape(shape) {\n  if (isShapeObject(shape)) return shape;\n  const value = shapes.get(`${shape}`.toLowerCase());\n  if (value) return value;\n  throw new Error(`invalid shape: ${shape}`);\n}\n\nexport class Vector extends Mark {\n  constructor(data, options = {}) {\n    const {x, y, r = defaultRadius, length, rotate, shape = shapeArrow, anchor = \"middle\", frameAnchor} = options;\n    const [vl, cl] = maybeNumberChannel(length, 12);\n    const [vr, cr] = maybeNumberChannel(rotate, 0);\n    super(\n      data,\n      {\n        x: {value: x, scale: \"x\", optional: true},\n        y: {value: y, scale: \"y\", optional: true},\n        length: {value: vl, scale: \"length\", optional: true},\n        rotate: {value: vr, optional: true}\n      },\n      options,\n      defaults\n    );\n    this.r = +r;\n    this.length = cl;\n    this.rotate = cr;\n    this.shape = maybeShape(shape);\n    this.anchor = keyword(anchor, \"anchor\", [\"start\", \"middle\", \"end\"]);\n    this.frameAnchor = maybeFrameAnchor(frameAnchor);\n  }\n  render(index, scales, channels, dimensions, context) {\n    const {x, y} = scales;\n    const {x: X, y: Y, length: L, rotate: A} = channels;\n    const {length, rotate, anchor, shape, r} = this;\n    const [cx, cy] = applyFrameAnchor(this, dimensions);\n    return create(\"svg:g\", context)\n      .call(applyIndirectStyles, this, dimensions, context)\n      .call(applyTransform, this, {x: X && x, y: Y && y})\n      .call((g) =>\n        g\n          .selectAll()\n          .data(index)\n          .enter()\n          .append(\"path\")\n          .call(applyDirectStyles, this)\n          .attr(\n            \"transform\",\n            template`translate(${X ? (i) => X[i] : cx},${Y ? (i) => Y[i] : cy})${\n              A ? (i) => ` rotate(${A[i]})` : rotate ? ` rotate(${rotate})` : ``\n            }${\n              anchor === \"start\"\n                ? ``\n                : anchor === \"end\"\n                ? L\n                  ? (i) => ` translate(0,${L[i]})`\n                  : ` translate(0,${length})`\n                : L\n                ? (i) => ` translate(0,${L[i] / 2})`\n                : ` translate(0,${length / 2})`\n            }`\n          )\n          .attr(\n            \"d\",\n            L\n              ? (i) => {\n                  const p = path();\n                  shape.draw(p, L[i], r);\n                  return p;\n                }\n              : (() => {\n                  const p = path();\n                  shape.draw(p, length, r);\n                  return p;\n                })()\n          )\n          .call(applyChannelStyles, this, channels)\n      )\n      .node();\n  }\n}\n\nexport function vector(data, options = {}) {\n  let {x, y, ...rest} = options;\n  if (options.frameAnchor === undefined) [x, y] = maybeTuple(x, y);\n  return new Vector(data, {...rest, x, y});\n}\n\nexport function vectorX(data, options = {}) {\n  const {x = identity, ...rest} = options;\n  return new Vector(data, {...rest, x});\n}\n\nexport function vectorY(data, options = {}) {\n  const {y = identity, ...rest} = options;\n  return new Vector(data, {...rest, y});\n}\n\nexport function spike(data, options = {}) {\n  const {\n    shape = shapeSpike,\n    stroke = defaults.stroke,\n    strokeWidth = 1,\n    fill = stroke,\n    fillOpacity = 0.3,\n    anchor = \"start\",\n    ...rest\n  } = options;\n  return vector(data, {...rest, shape, stroke, strokeWidth, fill, fillOpacity, anchor});\n}\n", "import {extent, format, timeFormat, utcFormat} from \"d3\";\nimport {formatDefault} from \"../format.js\";\nimport {marks} from \"../mark.js\";\nimport {radians} from \"../math.js\";\nimport {arrayify, constant, identity, keyword, number, range, valueof} from \"../options.js\";\nimport {isIterable, isNoneish, isTemporal, orderof} from \"../options.js\";\nimport {maybeColorChannel, maybeNumberChannel, maybeRangeInterval} from \"../options.js\";\nimport {isTemporalScale} from \"../scales.js\";\nimport {offset} from \"../style.js\";\nimport {formatTimeTicks, isTimeYear, isUtcYear} from \"../time.js\";\nimport {initializer} from \"../transforms/basic.js\";\nimport {ruleX, ruleY} from \"./rule.js\";\nimport {text, textX, textY} from \"./text.js\";\nimport {vectorX, vectorY} from \"./vector.js\";\n\nfunction maybeData(data, options) {\n  if (arguments.length < 2 && !isIterable(data)) (options = data), (data = null);\n  if (options === undefined) options = {};\n  return [data, options];\n}\n\nfunction maybeAnchor({anchor} = {}, anchors) {\n  return anchor === undefined ? anchors[0] : keyword(anchor, \"anchor\", anchors);\n}\n\nfunction anchorY(options) {\n  return maybeAnchor(options, [\"left\", \"right\"]);\n}\n\nfunction anchorFy(options) {\n  return maybeAnchor(options, [\"right\", \"left\"]);\n}\n\nfunction anchorX(options) {\n  return maybeAnchor(options, [\"bottom\", \"top\"]);\n}\n\nfunction anchorFx(options) {\n  return maybeAnchor(options, [\"top\", \"bottom\"]);\n}\n\nexport function axisY() {\n  const [data, options] = maybeData(...arguments);\n  return axisKy(\"y\", anchorY(options), data, options);\n}\n\nexport function axisFy() {\n  const [data, options] = maybeData(...arguments);\n  return axisKy(\"fy\", anchorFy(options), data, options);\n}\n\nexport function axisX() {\n  const [data, options] = maybeData(...arguments);\n  return axisKx(\"x\", anchorX(options), data, options);\n}\n\nexport function axisFx() {\n  const [data, options] = maybeData(...arguments);\n  return axisKx(\"fx\", anchorFx(options), data, options);\n}\n\nfunction axisKy(\n  k,\n  anchor,\n  data,\n  {\n    color = \"currentColor\",\n    opacity = 1,\n    stroke = color,\n    strokeOpacity = opacity,\n    strokeWidth = 1,\n    fill = color,\n    fillOpacity = opacity,\n    textAnchor,\n    textStroke,\n    textStrokeOpacity,\n    textStrokeWidth,\n    tickSize = k === \"y\" ? 6 : 0,\n    tickPadding,\n    tickRotate,\n    x,\n    margin,\n    marginTop = margin === undefined ? 20 : margin,\n    marginRight = margin === undefined ? (anchor === \"right\" ? 40 : 0) : margin,\n    marginBottom = margin === undefined ? 20 : margin,\n    marginLeft = margin === undefined ? (anchor === \"left\" ? 40 : 0) : margin,\n    label,\n    labelAnchor,\n    labelArrow,\n    labelOffset,\n    ...options\n  }\n) {\n  tickSize = number(tickSize);\n  tickPadding = number(tickPadding);\n  tickRotate = number(tickRotate);\n  if (labelAnchor !== undefined) labelAnchor = keyword(labelAnchor, \"labelAnchor\", [\"center\", \"top\", \"bottom\"]);\n  labelArrow = maybeLabelArrow(labelArrow);\n  return marks(\n    tickSize && !isNoneish(stroke)\n      ? axisTickKy(k, anchor, data, {\n          stroke,\n          strokeOpacity,\n          strokeWidth,\n          tickSize,\n          tickPadding,\n          tickRotate,\n          x,\n          ...options\n        })\n      : null,\n    !isNoneish(fill)\n      ? axisTextKy(k, anchor, data, {\n          fill,\n          fillOpacity,\n          stroke: textStroke,\n          strokeOpacity: textStrokeOpacity,\n          strokeWidth: textStrokeWidth,\n          textAnchor,\n          tickSize,\n          tickPadding,\n          tickRotate,\n          x,\n          marginTop,\n          marginRight,\n          marginBottom,\n          marginLeft,\n          ...options\n        })\n      : null,\n    !isNoneish(fill) && label !== null\n      ? text(\n          [],\n          labelOptions({fill, fillOpacity, ...options}, function (data, facets, channels, scales, dimensions) {\n            const scale = scales[k];\n            const {marginTop, marginRight, marginBottom, marginLeft} = (k === \"y\" && dimensions.inset) || dimensions;\n            const cla = labelAnchor ?? (scale.bandwidth ? \"center\" : \"top\");\n            const clo = labelOffset ?? (anchor === \"right\" ? marginRight : marginLeft) - 3;\n            if (cla === \"center\") {\n              this.textAnchor = undefined; // middle\n              this.lineAnchor = anchor === \"right\" ? \"bottom\" : \"top\";\n              this.frameAnchor = anchor;\n              this.rotate = -90;\n            } else {\n              this.textAnchor = anchor === \"right\" ? \"end\" : \"start\";\n              this.lineAnchor = cla;\n              this.frameAnchor = `${cla}-${anchor}`;\n              this.rotate = 0;\n            }\n            this.dy = cla === \"top\" ? 3 - marginTop : cla === \"bottom\" ? marginBottom - 3 : 0;\n            this.dx = anchor === \"right\" ? clo : -clo;\n            this.ariaLabel = `${k}-axis label`;\n            return {\n              facets: [[0]],\n              channels: {text: {value: [formatAxisLabel(k, scale, {anchor, label, labelAnchor: cla, labelArrow})]}}\n            };\n          })\n        )\n      : null\n  );\n}\n\nfunction axisKx(\n  k,\n  anchor,\n  data,\n  {\n    color = \"currentColor\",\n    opacity = 1,\n    stroke = color,\n    strokeOpacity = opacity,\n    strokeWidth = 1,\n    fill = color,\n    fillOpacity = opacity,\n    textAnchor,\n    textStroke,\n    textStrokeOpacity,\n    textStrokeWidth,\n    tickSize = k === \"x\" ? 6 : 0,\n    tickPadding,\n    tickRotate,\n    y,\n    margin,\n    marginTop = margin === undefined ? (anchor === \"top\" ? 30 : 0) : margin,\n    marginRight = margin === undefined ? 20 : margin,\n    marginBottom = margin === undefined ? (anchor === \"bottom\" ? 30 : 0) : margin,\n    marginLeft = margin === undefined ? 20 : margin,\n    label,\n    labelAnchor,\n    labelArrow,\n    labelOffset,\n    ...options\n  }\n) {\n  tickSize = number(tickSize);\n  tickPadding = number(tickPadding);\n  tickRotate = number(tickRotate);\n  if (labelAnchor !== undefined) labelAnchor = keyword(labelAnchor, \"labelAnchor\", [\"center\", \"left\", \"right\"]);\n  labelArrow = maybeLabelArrow(labelArrow);\n  return marks(\n    tickSize && !isNoneish(stroke)\n      ? axisTickKx(k, anchor, data, {\n          stroke,\n          strokeOpacity,\n          strokeWidth,\n          tickSize,\n          tickPadding,\n          tickRotate,\n          y,\n          ...options\n        })\n      : null,\n    !isNoneish(fill)\n      ? axisTextKx(k, anchor, data, {\n          fill,\n          fillOpacity,\n          stroke: textStroke,\n          strokeOpacity: textStrokeOpacity,\n          strokeWidth: textStrokeWidth,\n          textAnchor,\n          tickSize,\n          tickPadding,\n          tickRotate,\n          y,\n          marginTop,\n          marginRight,\n          marginBottom,\n          marginLeft,\n          ...options\n        })\n      : null,\n    !isNoneish(fill) && label !== null\n      ? text(\n          [],\n          labelOptions({fill, fillOpacity, ...options}, function (data, facets, channels, scales, dimensions) {\n            const scale = scales[k];\n            const {marginTop, marginRight, marginBottom, marginLeft} = (k === \"x\" && dimensions.inset) || dimensions;\n            const cla = labelAnchor ?? (scale.bandwidth ? \"center\" : \"right\");\n            const clo = labelOffset ?? (anchor === \"top\" ? marginTop : marginBottom) - 3;\n            if (cla === \"center\") {\n              this.frameAnchor = anchor;\n              this.textAnchor = undefined; // middle\n            } else {\n              this.frameAnchor = `${anchor}-${cla}`;\n              this.textAnchor = cla === \"right\" ? \"end\" : \"start\";\n            }\n            this.lineAnchor = anchor;\n            this.dy = anchor === \"top\" ? -clo : clo;\n            this.dx = cla === \"right\" ? marginRight - 3 : cla === \"left\" ? 3 - marginLeft : 0;\n            this.ariaLabel = `${k}-axis label`;\n            return {\n              facets: [[0]],\n              channels: {text: {value: [formatAxisLabel(k, scale, {anchor, label, labelAnchor: cla, labelArrow})]}}\n            };\n          })\n        )\n      : null\n  );\n}\n\nfunction axisTickKy(\n  k,\n  anchor,\n  data,\n  {\n    strokeWidth = 1,\n    strokeLinecap = null,\n    strokeLinejoin = null,\n    facetAnchor = anchor + (k === \"y\" ? \"-empty\" : \"\"),\n    frameAnchor = anchor,\n    tickSize,\n    inset = 0,\n    insetLeft = inset,\n    insetRight = inset,\n    dx = 0,\n    y = k === \"y\" ? undefined : null,\n    ...options\n  }\n) {\n  return axisMark(vectorY, k, `${k}-axis tick`, data, {\n    strokeWidth,\n    strokeLinecap,\n    strokeLinejoin,\n    facetAnchor,\n    frameAnchor,\n    y,\n    ...options,\n    dx: anchor === \"left\" ? +dx - offset + +insetLeft : +dx + offset - insetRight,\n    anchor: \"start\",\n    length: tickSize,\n    shape: anchor === \"left\" ? shapeTickLeft : shapeTickRight\n  });\n}\n\nfunction axisTickKx(\n  k,\n  anchor,\n  data,\n  {\n    strokeWidth = 1,\n    strokeLinecap = null,\n    strokeLinejoin = null,\n    facetAnchor = anchor + (k === \"x\" ? \"-empty\" : \"\"),\n    frameAnchor = anchor,\n    tickSize,\n    inset = 0,\n    insetTop = inset,\n    insetBottom = inset,\n    dy = 0,\n    x = k === \"x\" ? undefined : null,\n    ...options\n  }\n) {\n  return axisMark(vectorX, k, `${k}-axis tick`, data, {\n    strokeWidth,\n    strokeLinejoin,\n    strokeLinecap,\n    facetAnchor,\n    frameAnchor,\n    x,\n    ...options,\n    dy: anchor === \"bottom\" ? +dy - offset - insetBottom : +dy + offset + +insetTop,\n    anchor: \"start\",\n    length: tickSize,\n    shape: anchor === \"bottom\" ? shapeTickBottom : shapeTickTop\n  });\n}\n\nfunction axisTextKy(\n  k,\n  anchor,\n  data,\n  {\n    facetAnchor = anchor + (k === \"y\" ? \"-empty\" : \"\"),\n    frameAnchor = anchor,\n    tickSize,\n    tickRotate = 0,\n    tickPadding = Math.max(3, 9 - tickSize) + (Math.abs(tickRotate) > 60 ? 4 * Math.cos(tickRotate * radians) : 0),\n    tickFormat,\n    text = typeof tickFormat === \"function\" ? tickFormat : undefined,\n    textAnchor = Math.abs(tickRotate) > 60 ? \"middle\" : anchor === \"left\" ? \"end\" : \"start\",\n    lineAnchor = tickRotate > 60 ? \"top\" : tickRotate < -60 ? \"bottom\" : \"middle\",\n    fontVariant,\n    inset = 0,\n    insetLeft = inset,\n    insetRight = inset,\n    dx = 0,\n    y = k === \"y\" ? undefined : null,\n    ...options\n  }\n) {\n  return axisMark(\n    textY,\n    k,\n    `${k}-axis tick label`,\n    data,\n    {\n      facetAnchor,\n      frameAnchor,\n      text: text === undefined ? null : text,\n      textAnchor,\n      lineAnchor,\n      fontVariant,\n      rotate: tickRotate,\n      y,\n      ...options,\n      dx: anchor === \"left\" ? +dx - tickSize - tickPadding + +insetLeft : +dx + +tickSize + +tickPadding - insetRight\n    },\n    function (scale, data, ticks, channels) {\n      if (fontVariant === undefined) this.fontVariant = inferFontVariant(scale);\n      if (text === undefined) channels.text = inferTextChannel(scale, data, ticks, tickFormat, anchor);\n    }\n  );\n}\n\nfunction axisTextKx(\n  k,\n  anchor,\n  data,\n  {\n    facetAnchor = anchor + (k === \"x\" ? \"-empty\" : \"\"),\n    frameAnchor = anchor,\n    tickSize,\n    tickRotate = 0,\n    tickPadding = Math.max(3, 9 - tickSize) + (Math.abs(tickRotate) >= 10 ? 4 * Math.cos(tickRotate * radians) : 0),\n    tickFormat,\n    text = typeof tickFormat === \"function\" ? tickFormat : undefined,\n    textAnchor = Math.abs(tickRotate) >= 10 ? ((tickRotate < 0) ^ (anchor === \"bottom\") ? \"start\" : \"end\") : \"middle\",\n    lineAnchor = Math.abs(tickRotate) >= 10 ? \"middle\" : anchor === \"bottom\" ? \"top\" : \"bottom\",\n    fontVariant,\n    inset = 0,\n    insetTop = inset,\n    insetBottom = inset,\n    dy = 0,\n    x = k === \"x\" ? undefined : null,\n    ...options\n  }\n) {\n  return axisMark(\n    textX,\n    k,\n    `${k}-axis tick label`,\n    data,\n    {\n      facetAnchor,\n      frameAnchor,\n      text: text === undefined ? null : text,\n      textAnchor,\n      lineAnchor,\n      fontVariant,\n      rotate: tickRotate,\n      x,\n      ...options,\n      dy: anchor === \"bottom\" ? +dy + +tickSize + +tickPadding - insetBottom : +dy - tickSize - tickPadding + +insetTop\n    },\n    function (scale, data, ticks, channels) {\n      if (fontVariant === undefined) this.fontVariant = inferFontVariant(scale);\n      if (text === undefined) channels.text = inferTextChannel(scale, data, ticks, tickFormat, anchor);\n    }\n  );\n}\n\nexport function gridY() {\n  const [data, options] = maybeData(...arguments);\n  return gridKy(\"y\", anchorY(options), data, options);\n}\n\nexport function gridFy() {\n  const [data, options] = maybeData(...arguments);\n  return gridKy(\"fy\", anchorFy(options), data, options);\n}\n\nexport function gridX() {\n  const [data, options] = maybeData(...arguments);\n  return gridKx(\"x\", anchorX(options), data, options);\n}\n\nexport function gridFx() {\n  const [data, options] = maybeData(...arguments);\n  return gridKx(\"fx\", anchorFx(options), data, options);\n}\n\nfunction gridKy(\n  k,\n  anchor,\n  data,\n  {\n    y = k === \"y\" ? undefined : null,\n    x = null,\n    x1 = anchor === \"left\" ? x : null,\n    x2 = anchor === \"right\" ? x : null,\n    ...options\n  }\n) {\n  return axisMark(ruleY, k, `${k}-grid`, data, {y, x1, x2, ...gridDefaults(options)});\n}\n\nfunction gridKx(\n  k,\n  anchor,\n  data,\n  {\n    x = k === \"x\" ? undefined : null,\n    y = null,\n    y1 = anchor === \"top\" ? y : null,\n    y2 = anchor === \"bottom\" ? y : null,\n    ...options\n  }\n) {\n  return axisMark(ruleX, k, `${k}-grid`, data, {x, y1, y2, ...gridDefaults(options)});\n}\n\nfunction gridDefaults({\n  color = \"currentColor\",\n  opacity = 0.1,\n  stroke = color,\n  strokeOpacity = opacity,\n  strokeWidth = 1,\n  ...options\n}) {\n  return {stroke, strokeOpacity, strokeWidth, ...options};\n}\n\nfunction labelOptions(\n  {fill, fillOpacity, fontFamily, fontSize, fontStyle, fontWeight, monospace, pointerEvents, shapeRendering},\n  initializer\n) {\n  // Only propagate these options if constant.\n  [, fill] = maybeColorChannel(fill);\n  [, fillOpacity] = maybeNumberChannel(fillOpacity);\n  return {\n    facet: \"super\",\n    x: null,\n    y: null,\n    fill,\n    fillOpacity,\n    fontFamily,\n    fontSize,\n    fontStyle,\n    fontWeight,\n    monospace,\n    pointerEvents,\n    shapeRendering,\n    initializer\n  };\n}\n\nfunction axisMark(mark, k, ariaLabel, data, options, initialize) {\n  let channels;\n\n  function axisInitializer(data, facets, _channels, scales, dimensions, context) {\n    const initializeFacets = data == null && (k === \"fx\" || k === \"fy\");\n    const {[k]: scale} = scales;\n    if (!scale) throw new Error(`missing scale: ${k}`);\n    let {ticks, tickSpacing, interval} = options;\n    if (isTemporalScale(scale) && typeof ticks === \"string\") (interval = ticks), (ticks = undefined);\n    if (data == null) {\n      if (isIterable(ticks)) {\n        data = arrayify(ticks);\n      } else if (scale.ticks) {\n        if (ticks !== undefined) {\n          data = scale.ticks(ticks);\n        } else {\n          interval = maybeRangeInterval(interval === undefined ? scale.interval : interval, scale.type);\n          if (interval !== undefined) {\n            // For time scales, we could pass the interval directly to\n            // scale.ticks because it\u2019s supported by d3.utcTicks; but\n            // quantitative scales and d3.ticks do not support numeric\n            // intervals for scale.ticks, so we compute them here.\n            const [min, max] = extent(scale.domain());\n            data = interval.range(min, interval.offset(interval.floor(max))); // inclusive max\n          } else {\n            const [min, max] = extent(scale.range());\n            ticks = (max - min) / (tickSpacing === undefined ? (k === \"x\" ? 80 : 35) : tickSpacing);\n            data = scale.ticks(ticks);\n          }\n        }\n      } else {\n        data = scale.domain();\n      }\n      if (k === \"y\" || k === \"x\") {\n        facets = [range(data)];\n      } else {\n        channels[k] = {scale: k, value: identity};\n      }\n    }\n    initialize?.call(this, scale, data, ticks, channels);\n    const initializedChannels = Object.fromEntries(\n      Object.entries(channels).map(([name, channel]) => {\n        return [name, {...channel, value: valueof(data, channel.value)}];\n      })\n    );\n    if (initializeFacets) facets = context.filterFacets(data, initializedChannels);\n    return {data, facets, channels: initializedChannels};\n  }\n\n  // Apply any basic initializers after the axis initializer computes the ticks.\n  const basicInitializer = initializer(options).initializer;\n  const m = mark(data, initializer({...options, initializer: axisInitializer}, basicInitializer));\n  if (data == null) {\n    channels = m.channels;\n    m.channels = {};\n  } else {\n    channels = {};\n  }\n  m.ariaLabel = ariaLabel;\n  return m;\n}\n\nfunction inferTextChannel(scale, data, ticks, tickFormat, anchor) {\n  return {value: inferTickFormat(scale, data, ticks, tickFormat, anchor)};\n}\n\n// D3\u2019s ordinal scales simply use toString by default, but if the ordinal scale\n// domain (or ticks) are numbers or dates (say because we\u2019re applying a time\n// interval to the ordinal scale), we want Plot\u2019s default formatter.\nexport function inferTickFormat(scale, data, ticks, tickFormat, anchor) {\n  return tickFormat === undefined && isTemporalScale(scale)\n    ? formatTimeTicks(scale, data, ticks, anchor)\n    : scale.tickFormat\n    ? scale.tickFormat(isIterable(ticks) ? null : ticks, tickFormat)\n    : tickFormat === undefined\n    ? isUtcYear(scale.interval)\n      ? utcFormat(\"%Y\")\n      : isTimeYear(scale.interval)\n      ? timeFormat(\"%Y\")\n      : formatDefault\n    : typeof tickFormat === \"string\"\n    ? (isTemporal(scale.domain()) ? utcFormat : format)(tickFormat)\n    : constant(tickFormat);\n}\n\nconst shapeTickBottom = {\n  draw(context, l) {\n    context.moveTo(0, 0);\n    context.lineTo(0, l);\n  }\n};\n\nconst shapeTickTop = {\n  draw(context, l) {\n    context.moveTo(0, 0);\n    context.lineTo(0, -l);\n  }\n};\n\nconst shapeTickLeft = {\n  draw(context, l) {\n    context.moveTo(0, 0);\n    context.lineTo(-l, 0);\n  }\n};\n\nconst shapeTickRight = {\n  draw(context, l) {\n    context.moveTo(0, 0);\n    context.lineTo(l, 0);\n  }\n};\n\n// TODO Unify this with the other inferFontVariant; here we only have a scale\n// function rather than a scale descriptor.\nfunction inferFontVariant(scale) {\n  return scale.bandwidth && !scale.interval ? undefined : \"tabular-nums\";\n}\n\n// Determines whether the scale points in the \u201Cpositive\u201D (right or down) or\n// \u201Cnegative\u201D (left or up) direction; if the scale order cannot be determined,\n// returns NaN; used to assign an appropriate label arrow.\nfunction inferScaleOrder(scale) {\n  return Math.sign(orderof(scale.domain())) * Math.sign(orderof(scale.range()));\n}\n\n// Takes the scale label, and if this is not an ordinal scale and the label was\n// inferred from an associated channel, adds an orientation-appropriate arrow.\nfunction formatAxisLabel(k, scale, {anchor, label = scale.label, labelAnchor, labelArrow} = {}) {\n  if (label == null || (label.inferred && isTemporalish(scale) && /^(date|time|year)$/i.test(label))) return;\n  label = String(label); // coerce to a string after checking if inferred\n  if (labelArrow === \"auto\") labelArrow = (!scale.bandwidth || scale.interval) && !/[\u2191\u2193\u2192\u2190]/.test(label);\n  if (!labelArrow) return label;\n  if (labelArrow === true) {\n    const order = inferScaleOrder(scale);\n    if (order)\n      labelArrow =\n        /x$/.test(k) || labelAnchor === \"center\"\n          ? /x$/.test(k) === order < 0\n            ? \"left\"\n            : \"right\"\n          : order < 0\n          ? \"up\"\n          : \"down\";\n  }\n  switch (labelArrow) {\n    case \"left\":\n      return `\u2190 ${label}`;\n    case \"right\":\n      return `${label} \u2192`;\n    case \"up\":\n      return anchor === \"right\" ? `${label} \u2191` : `\u2191 ${label}`;\n    case \"down\":\n      return anchor === \"right\" ? `${label} \u2193` : `\u2193 ${label}`;\n  }\n  return label;\n}\n\nfunction maybeLabelArrow(labelArrow = \"auto\") {\n  return isNoneish(labelArrow)\n    ? false\n    : typeof labelArrow === \"boolean\"\n    ? labelArrow\n    : keyword(labelArrow, \"labelArrow\", [\"auto\", \"up\", \"right\", \"down\", \"left\"]);\n}\n\nfunction isTemporalish(scale) {\n  return isTemporalScale(scale) || scale.interval != null;\n}\n", "import {pathRound as path} from \"d3\";\nimport {inferFontVariant} from \"../axes.js\";\nimport {create, createContext} from \"../context.js\";\nimport {isNoneish, maybeColorChannel, maybeNumberChannel} from \"../options.js\";\nimport {isOrdinalScale, isThresholdScale} from \"../scales.js\";\nimport {applyInlineStyles, impliedString, maybeClassName} from \"../style.js\";\nimport {inferTickFormat} from \"../marks/axis.js\";\n\nfunction maybeScale(scale, key) {\n  if (key == null) return key;\n  const s = scale(key);\n  if (!s) throw new Error(`scale not found: ${key}`);\n  return s;\n}\n\nexport function legendSwatches(color, {opacity, ...options} = {}) {\n  if (!isOrdinalScale(color) && !isThresholdScale(color))\n    throw new Error(`swatches legend requires ordinal or threshold color scale (not ${color.type})`);\n  return legendItems(color, options, (selection, scale, width, height) =>\n    selection\n      .append(\"svg\")\n      .attr(\"width\", width)\n      .attr(\"height\", height)\n      .attr(\"fill\", scale.scale)\n      .attr(\"fill-opacity\", maybeNumberChannel(opacity)[1])\n      .append(\"rect\")\n      .attr(\"width\", \"100%\")\n      .attr(\"height\", \"100%\")\n  );\n}\n\nexport function legendSymbols(\n  symbol,\n  {\n    fill = symbol.hint?.fill !== undefined ? symbol.hint.fill : \"none\",\n    fillOpacity = 1,\n    stroke = symbol.hint?.stroke !== undefined ? symbol.hint.stroke : isNoneish(fill) ? \"currentColor\" : \"none\",\n    strokeOpacity = 1,\n    strokeWidth = 1.5,\n    r = 4.5,\n    ...options\n  } = {},\n  scale\n) {\n  const [vf, cf] = maybeColorChannel(fill);\n  const [vs, cs] = maybeColorChannel(stroke);\n  const sf = maybeScale(scale, vf);\n  const ss = maybeScale(scale, vs);\n  const size = r * r * Math.PI;\n  fillOpacity = maybeNumberChannel(fillOpacity)[1];\n  strokeOpacity = maybeNumberChannel(strokeOpacity)[1];\n  strokeWidth = maybeNumberChannel(strokeWidth)[1];\n  return legendItems(symbol, options, (selection, scale, width, height) =>\n    selection\n      .append(\"svg\")\n      .attr(\"viewBox\", \"-8 -8 16 16\")\n      .attr(\"width\", width)\n      .attr(\"height\", height)\n      .attr(\"fill\", vf === \"color\" ? (d) => sf.scale(d) : cf)\n      .attr(\"fill-opacity\", fillOpacity)\n      .attr(\"stroke\", vs === \"color\" ? (d) => ss.scale(d) : cs)\n      .attr(\"stroke-opacity\", strokeOpacity)\n      .attr(\"stroke-width\", strokeWidth)\n      .append(\"path\")\n      .attr(\"d\", (d) => {\n        const p = path();\n        symbol.scale(d).draw(p, size);\n        return p;\n      })\n  );\n}\n\nfunction legendItems(scale, options = {}, swatch) {\n  let {\n    columns,\n    tickFormat,\n    fontVariant = inferFontVariant(scale),\n    // TODO label,\n    swatchSize = 15,\n    swatchWidth = swatchSize,\n    swatchHeight = swatchSize,\n    marginLeft = 0,\n    className,\n    style,\n    width\n  } = options;\n  const context = createContext(options);\n  className = maybeClassName(className);\n  if (typeof tickFormat !== \"function\") tickFormat = inferTickFormat(scale.scale, scale.domain, undefined, tickFormat);\n\n  const swatches = create(\"div\", context).attr(\n    \"class\",\n    `${className}-swatches ${className}-swatches-${columns != null ? \"columns\" : \"wrap\"}`\n  );\n\n  let extraStyle;\n\n  if (columns != null) {\n    extraStyle = `.${className}-swatches-columns .${className}-swatch {\n  display: flex;\n  align-items: center;\n  break-inside: avoid;\n  padding-bottom: 1px;\n}\n.${className}-swatches-columns .${className}-swatch::before {\n  flex-shrink: 0;\n}\n.${className}-swatches-columns .${className}-swatch-label {\n  white-space: nowrap;\n  overflow: hidden;\n  text-overflow: ellipsis;\n}`;\n\n    swatches\n      .style(\"columns\", columns)\n      .selectAll()\n      .data(scale.domain)\n      .enter()\n      .append(\"div\")\n      .attr(\"class\", `${className}-swatch`)\n      .call(swatch, scale, swatchWidth, swatchHeight)\n      .call((item) =>\n        item.append(\"div\").attr(\"class\", `${className}-swatch-label`).attr(\"title\", tickFormat).text(tickFormat)\n      );\n  } else {\n    extraStyle = `.${className}-swatches-wrap {\n  display: flex;\n  align-items: center;\n  min-height: 33px;\n  flex-wrap: wrap;\n}\n.${className}-swatches-wrap .${className}-swatch {\n  display: inline-flex;\n  align-items: center;\n  margin-right: 1em;\n}`;\n\n    swatches\n      .selectAll()\n      .data(scale.domain)\n      .enter()\n      .append(\"span\")\n      .attr(\"class\", `${className}-swatch`)\n      .call(swatch, scale, swatchWidth, swatchHeight)\n      .append(function () {\n        return this.ownerDocument.createTextNode(tickFormat.apply(this, arguments));\n      });\n  }\n\n  return swatches\n    .call((div) =>\n      div.insert(\"style\", \"*\").text(\n        `.${className}-swatches {\n  font-family: system-ui, sans-serif;\n  font-size: 10px;\n  margin-bottom: 0.5em;\n}\n.${className}-swatch > svg {\n  margin-right: 0.5em;\n  overflow: visible;\n}\n${extraStyle}`\n      )\n    )\n    .style(\"margin-left\", marginLeft ? `${+marginLeft}px` : null)\n    .style(\"width\", width === undefined ? null : `${+width}px`)\n    .style(\"font-variant\", impliedString(fontVariant, \"normal\"))\n    .call(applyInlineStyles, style)\n    .node();\n}\n", "import {rgb} from \"d3\";\nimport {createContext} from \"./context.js\";\nimport {legendRamp} from \"./legends/ramp.js\";\nimport {legendSwatches, legendSymbols} from \"./legends/swatches.js\";\nimport {inherit, isScaleOptions} from \"./options.js\";\nimport {normalizeScale} from \"./scales.js\";\n\nconst legendRegistry = new Map([\n  [\"symbol\", legendSymbols],\n  [\"color\", legendColor],\n  [\"opacity\", legendOpacity]\n]);\n\nexport function legend(options = {}) {\n  for (const [key, value] of legendRegistry) {\n    const scale = options[key];\n    if (isScaleOptions(scale)) {\n      // e.g., ignore {color: \"red\"}\n      const context = createContext(options);\n      let hint;\n      // For symbol legends, pass a hint to the symbol scale.\n      if (key === \"symbol\") {\n        const {fill, stroke = fill === undefined && isScaleOptions(options.color) ? \"color\" : undefined} = options;\n        hint = {fill, stroke};\n      }\n      return value(normalizeScale(key, scale, hint), legendOptions(context, scale, options), (key) =>\n        isScaleOptions(options[key]) ? normalizeScale(key, options[key]) : null\n      );\n    }\n  }\n  throw new Error(\"unknown legend type; no scale found\");\n}\n\nexport function exposeLegends(scales, context, defaults = {}) {\n  return (key, options) => {\n    if (!legendRegistry.has(key)) throw new Error(`unknown legend type: ${key}`);\n    if (!(key in scales)) return;\n    return legendRegistry.get(key)(scales[key], legendOptions(context, defaults[key], options), (key) => scales[key]);\n  };\n}\n\nfunction legendOptions({className, ...context}, {label, ticks, tickFormat} = {}, options) {\n  return inherit(options, {className, ...context}, {label, ticks, tickFormat});\n}\n\nfunction legendColor(color, {legend = true, ...options}) {\n  if (legend === true) legend = color.type === \"ordinal\" ? \"swatches\" : \"ramp\";\n  if (color.domain === undefined) return;\n  switch (`${legend}`.toLowerCase()) {\n    case \"swatches\":\n      return legendSwatches(color, options);\n    case \"ramp\":\n      return legendRamp(color, options);\n    default:\n      throw new Error(`unknown legend type: ${legend}`);\n  }\n}\n\nfunction legendOpacity({type, interpolate, ...scale}, {legend = true, color = rgb(0, 0, 0), ...options}) {\n  if (!interpolate) throw new Error(`${type} opacity scales are not supported`);\n  if (legend === true) legend = \"ramp\";\n  if (`${legend}`.toLowerCase() !== \"ramp\") throw new Error(`${legend} opacity legends are not supported`);\n  return legendColor({type, ...scale, interpolate: interpolateOpacity(color)}, {legend, ...options});\n}\n\nfunction interpolateOpacity(color) {\n  const {r, g, b} = rgb(color) || rgb(0, 0, 0); // treat invalid color as black\n  return (t) => `rgba(${r},${g},${b},${t})`;\n}\n\nexport function createLegends(scales, context, options) {\n  const legends = [];\n  for (const [key, value] of legendRegistry) {\n    const o = options[key];\n    if (o?.legend && key in scales) {\n      const legend = value(scales[key], legendOptions(context, scales[key], o), (key) => scales[key]);\n      if (legend != null) legends.push(legend);\n    }\n  }\n  return legends;\n}\n", "import {create} from \"../context.js\";\nimport {Mark} from \"../mark.js\";\nimport {maybeKeyword, number, singleton} from \"../options.js\";\nimport {applyChannelStyles, applyDirectStyles, applyIndirectStyles, applyTransform} from \"../style.js\";\n\nconst defaults = {\n  ariaLabel: \"frame\",\n  fill: \"none\",\n  stroke: \"currentColor\"\n};\n\nconst lineDefaults = {\n  ariaLabel: \"frame\",\n  fill: null,\n  stroke: \"currentColor\",\n  strokeLinecap: \"square\"\n};\n\nexport class Frame extends Mark {\n  constructor(options = {}) {\n    const {\n      anchor = null,\n      inset = 0,\n      insetTop = inset,\n      insetRight = inset,\n      insetBottom = inset,\n      insetLeft = inset,\n      rx,\n      ry\n    } = options;\n    super(singleton, undefined, options, anchor == null ? defaults : lineDefaults);\n    this.anchor = maybeKeyword(anchor, \"anchor\", [\"top\", \"right\", \"bottom\", \"left\"]);\n    this.insetTop = number(insetTop);\n    this.insetRight = number(insetRight);\n    this.insetBottom = number(insetBottom);\n    this.insetLeft = number(insetLeft);\n    this.rx = number(rx);\n    this.ry = number(ry);\n  }\n  render(index, scales, channels, dimensions, context) {\n    const {marginTop, marginRight, marginBottom, marginLeft, width, height} = dimensions;\n    const {anchor, insetTop, insetRight, insetBottom, insetLeft, rx, ry} = this;\n    const x1 = marginLeft + insetLeft;\n    const x2 = width - marginRight - insetRight;\n    const y1 = marginTop + insetTop;\n    const y2 = height - marginBottom - insetBottom;\n    return create(anchor ? \"svg:line\" : \"svg:rect\", context)\n      .datum(0)\n      .call(applyIndirectStyles, this, dimensions, context)\n      .call(applyDirectStyles, this)\n      .call(applyChannelStyles, this, channels)\n      .call(applyTransform, this, {})\n      .call(\n        anchor === \"left\"\n          ? (line) => line.attr(\"x1\", x1).attr(\"x2\", x1).attr(\"y1\", y1).attr(\"y2\", y2)\n          : anchor === \"right\"\n          ? (line) => line.attr(\"x1\", x2).attr(\"x2\", x2).attr(\"y1\", y1).attr(\"y2\", y2)\n          : anchor === \"top\"\n          ? (line) => line.attr(\"x1\", x1).attr(\"x2\", x2).attr(\"y1\", y1).attr(\"y2\", y1)\n          : anchor === \"bottom\"\n          ? (line) => line.attr(\"x1\", x1).attr(\"x2\", x2).attr(\"y1\", y2).attr(\"y2\", y2)\n          : (rect) =>\n              rect\n                .attr(\"x\", x1)\n                .attr(\"y\", y1)\n                .attr(\"width\", x2 - x1)\n                .attr(\"height\", y2 - y1)\n                .attr(\"rx\", rx)\n                .attr(\"ry\", ry)\n      )\n      .node();\n  }\n}\n\nexport function frame(options) {\n  return new Frame(options);\n}\n", "import {select} from \"d3\";\nimport {getSource} from \"../channel.js\";\nimport {create} from \"../context.js\";\nimport {defined} from \"../defined.js\";\nimport {formatDefault} from \"../format.js\";\nimport {anchorX, anchorY} from \"../interactions/pointer.js\";\nimport {Mark} from \"../mark.js\";\nimport {maybeAnchor, maybeFrameAnchor, maybeTuple, number, string} from \"../options.js\";\nimport {applyDirectStyles, applyFrameAnchor, applyIndirectStyles, applyTransform, impliedString} from \"../style.js\";\nimport {identity, isIterable, isTextual} from \"../options.js\";\nimport {inferTickFormat} from \"./axis.js\";\nimport {applyIndirectTextStyles, defaultWidth, ellipsis, monospaceWidth} from \"./text.js\";\nimport {cut, clipper, splitter, maybeTextOverflow} from \"./text.js\";\n\nconst defaults = {\n  ariaLabel: \"tip\",\n  fill: \"white\",\n  stroke: \"currentColor\"\n};\n\n// These channels are not displayed in the tip; TODO allow customization.\nconst ignoreChannels = new Set([\"geometry\", \"href\", \"src\", \"ariaLabel\"]);\n\nexport class Tip extends Mark {\n  constructor(data, options = {}) {\n    if (options.tip) options = {...options, tip: false};\n    if (options.title === undefined && isIterable(data) && isTextual(data)) options = {...options, title: identity};\n    const {\n      x,\n      y,\n      x1,\n      x2,\n      y1,\n      y2,\n      anchor,\n      monospace,\n      fontFamily = monospace ? \"ui-monospace, monospace\" : undefined,\n      fontSize,\n      fontStyle,\n      fontVariant,\n      fontWeight,\n      lineHeight = 1,\n      lineWidth = 20,\n      frameAnchor,\n      textAnchor = \"start\",\n      textOverflow,\n      textPadding = 8,\n      title,\n      pointerSize = 12,\n      pathFilter = \"drop-shadow(0 3px 4px rgba(0,0,0,0.2))\"\n    } = options;\n    super(\n      data,\n      {\n        x: {value: x1 != null && x2 != null ? null : x, scale: \"x\", optional: true}, // ignore midpoint\n        y: {value: y1 != null && y2 != null ? null : y, scale: \"y\", optional: true}, // ignore midpoint\n        x1: {value: x1, scale: \"x\", optional: x2 == null},\n        y1: {value: y1, scale: \"y\", optional: y2 == null},\n        x2: {value: x2, scale: \"x\", optional: x1 == null},\n        y2: {value: y2, scale: \"y\", optional: y1 == null},\n        title: {value: title, optional: true} // filter: defined\n      },\n      options,\n      defaults\n    );\n    this.anchor = maybeAnchor(anchor, \"anchor\");\n    this.previousAnchor = this.anchor ?? \"top-left\";\n    this.frameAnchor = maybeFrameAnchor(frameAnchor);\n    this.textAnchor = impliedString(textAnchor, \"middle\");\n    this.textPadding = +textPadding;\n    this.pointerSize = +pointerSize;\n    this.pathFilter = string(pathFilter);\n    this.lineHeight = +lineHeight;\n    this.lineWidth = +lineWidth;\n    this.textOverflow = maybeTextOverflow(textOverflow);\n    this.monospace = !!monospace;\n    this.fontFamily = string(fontFamily);\n    this.fontSize = number(fontSize);\n    this.fontStyle = string(fontStyle);\n    this.fontVariant = string(fontVariant);\n    this.fontWeight = string(fontWeight);\n    for (const key in defaults) if (key in this.channels) this[key] = defaults[key]; // apply default even if channel\n    this.splitLines = splitter(this);\n    this.clipLine = clipper(this);\n  }\n  render(index, scales, values, dimensions, context) {\n    const mark = this;\n    const {x, y, fx, fy} = scales;\n    const {ownerSVGElement: svg, document} = context;\n    const {anchor, monospace, lineHeight, lineWidth} = this;\n    const {textPadding: r, pointerSize: m, pathFilter} = this;\n    const {marginTop, marginLeft} = dimensions;\n    const sources = getSources(values);\n\n    // The anchor position is the middle of x1 & y1 and x2 & y2, if available,\n    // or x & y; the former is considered more specific because it\u2019s how we\n    // disable the implicit stack and interval transforms. If any dimension is\n    // unspecified, we fallback to the frame anchor. We also need to know the\n    // facet offsets to detect when the tip would draw outside the plot, and\n    // thus we need to change the orientation.\n    const {x1: X1, y1: Y1, x2: X2, y2: Y2, x: X = X1 ?? X2, y: Y = Y1 ?? Y2} = values;\n    const ox = fx ? fx(index.fx) - marginLeft : 0;\n    const oy = fy ? fy(index.fy) - marginTop : 0;\n\n    // The order of precedence for the anchor position is: the middle of x1 & y1\n    // and x2 & y2; or x1 & y1 (e.g., area); or lastly x & y. If a dimension is\n    // unspecified, the frame anchor is used.\n    const [cx, cy] = applyFrameAnchor(this, dimensions);\n    const px = anchorX(values, cx);\n    const py = anchorY(values, cy);\n\n    // Resolve the text metric implementation. We may need an ellipsis for text\n    // truncation, so we optimistically compute the ellipsis width.\n    const widthof = monospace ? monospaceWidth : defaultWidth;\n    const ee = widthof(ellipsis);\n\n    // We borrow the scale\u2019s tick format for facet channels; this is safe for\n    // ordinal scales (but not continuous scales where the display value may\n    // need higher precision), and generally better than the default format.\n    const formatFx = fx && inferTickFormat(fx);\n    const formatFy = fy && inferTickFormat(fy);\n\n    function* format(sources, i) {\n      if (\"title\" in sources) {\n        const text = sources.title.value[i];\n        for (const line of mark.splitLines(formatDefault(text))) {\n          yield {name: \"\", value: mark.clipLine(line)};\n        }\n        return;\n      }\n      for (const key in sources) {\n        if (key === \"x1\" && \"x2\" in sources) continue;\n        if (key === \"y1\" && \"y2\" in sources) continue;\n        const channel = sources[key];\n        const value = channel.value[i];\n        if (!defined(value) && channel.scale == null) continue;\n        if (key === \"x2\" && \"x1\" in sources) {\n          yield {name: formatLabel(scales, channel, \"x\"), value: formatPair(sources.x1, channel, i)};\n        } else if (key === \"y2\" && \"y1\" in sources) {\n          yield {name: formatLabel(scales, channel, \"y\"), value: formatPair(sources.y1, channel, i)};\n        } else {\n          const scale = channel.scale;\n          const line = {name: formatLabel(scales, channel, key), value: formatDefault(value)};\n          if (scale === \"color\" || scale === \"opacity\") line[scale] = values[key][i];\n          yield line;\n        }\n      }\n      if (index.fi != null && fx) yield {name: String(fx.label ?? \"fx\"), value: formatFx(index.fx)};\n      if (index.fi != null && fy) yield {name: String(fy.label ?? \"fy\"), value: formatFy(index.fy)};\n    }\n\n    // We don\u2019t call applyChannelStyles because we only use the channels to\n    // derive the content of the tip, not its aesthetics.\n    const g = create(\"svg:g\", context)\n      .call(applyIndirectStyles, this, dimensions, context)\n      .call(applyIndirectTextStyles, this)\n      .call(applyTransform, this, {x: X && x, y: Y && y})\n      .call((g) =>\n        g\n          .selectAll()\n          .data(index)\n          .enter()\n          .append(\"g\")\n          .attr(\"transform\", (i) => `translate(${Math.round(px(i))},${Math.round(py(i))})`) // crisp edges\n          .call(applyDirectStyles, this)\n          .call((g) => g.append(\"path\").attr(\"filter\", pathFilter))\n          .call((g) =>\n            g.append(\"text\").each(function (i) {\n              const that = select(this);\n              // prevent style inheritance (from path)\n              this.setAttribute(\"fill\", \"currentColor\");\n              this.setAttribute(\"fill-opacity\", 1);\n              this.setAttribute(\"stroke\", \"none\");\n              // iteratively render each channel value\n              const names = new Set();\n              for (const line of format(sources, i)) {\n                const name = line.name;\n                if (name && names.has(name)) continue;\n                else names.add(name);\n                renderLine(that, line);\n              }\n            })\n          )\n      );\n\n    // Renders a single line (a name-value pair) to the tip, truncating the text\n    // as needed, and adding a title if the text is truncated. Note that this is\n    // just the initial layout of the text; in postrender we will compute the\n    // exact text metrics and translate the text as needed once we know the\n    // tip\u2019s orientation (anchor).\n    function renderLine(selection, {name, value, color, opacity}) {\n      const swatch = color != null || opacity != null;\n      let title;\n      let w = lineWidth * 100;\n      const [j] = cut(name, w, widthof, ee);\n      if (j >= 0) {\n        // name is truncated\n        name = name.slice(0, j).trimEnd() + ellipsis;\n        title = value.trim();\n        value = \"\";\n      } else {\n        if (name || (!value && !swatch)) value = \" \" + value;\n        const [k] = cut(value, w - widthof(name), widthof, ee);\n        if (k >= 0) {\n          // value is truncated\n          value = value.slice(0, k).trimEnd() + ellipsis;\n          title = value.trim();\n        }\n      }\n      const line = selection.append(\"tspan\").attr(\"x\", 0).attr(\"dy\", `${lineHeight}em`).text(\"\\u200b\"); // zwsp for double-click\n      if (name) line.append(\"tspan\").attr(\"font-weight\", \"bold\").text(name);\n      if (value) line.append(() => document.createTextNode(value));\n      if (swatch) line.append(\"tspan\").text(\" \u25A0\").attr(\"fill\", color).attr(\"fill-opacity\", opacity).style(\"user-select\", \"none\"); // prettier-ignore\n      if (title) line.append(\"title\").text(title);\n    }\n\n    // Only after the plot is attached to the page can we compute the exact text\n    // metrics needed to determine the tip size and orientation (anchor).\n    function postrender() {\n      const {width, height} = dimensions.facet ?? dimensions;\n      g.selectChildren().each(function (i) {\n        let {x: tx, width: w, height: h} = this.getBBox();\n        (w = Math.round(w)), (h = Math.round(h)); // crisp edges\n        let a = anchor; // use the specified anchor, if any\n        if (a === undefined) {\n          a = mark.previousAnchor; // favor the previous anchor, if it fits\n          const x = px(i) + ox;\n          const y = py(i) + oy;\n          const fitLeft = x + w + r * 2 < width;\n          const fitRight = x - w - r * 2 > 0;\n          const fitTop = y + h + m + r * 2 + 7 < height;\n          const fitBottom = y - h - m - r * 2 > 0;\n          const ax = (/-left$/.test(a) ? fitLeft || !fitRight : fitLeft && !fitRight) ? \"left\" : \"right\";\n          const ay = (/^top-/.test(a) ? fitTop || !fitBottom : fitTop && !fitBottom) ? \"top\" : \"bottom\";\n          a = mark.previousAnchor = `${ay}-${ax}`;\n        }\n        const path = this.firstChild; // note: assumes exactly two children!\n        const text = this.lastChild; // note: assumes exactly two children!\n        path.setAttribute(\"d\", getPath(a, m, r, w, h));\n        if (tx) for (const t of text.childNodes) t.setAttribute(\"x\", -tx);\n        text.setAttribute(\"y\", `${+getLineOffset(a, text.childNodes.length, lineHeight).toFixed(6)}em`);\n        text.setAttribute(\"transform\", `translate(${getTextTranslate(a, m, r, w, h)})`);\n      });\n    }\n\n    // Wait until the plot is inserted into the page so that we can use getBBox\n    // to compute the exact text dimensions. If the SVG is already connected, as\n    // when the pointer interaction triggers the re-render, use a faster\n    // microtask instead of an animation frame; if this SSR (e.g., JSDOM), skip\n    // this step. Perhaps this could be done synchronously; getting the\n    // dimensions of the SVG is easy, and although accurate text metrics are\n    // hard, we could use approximate heuristics.\n    if (svg.isConnected) Promise.resolve().then(postrender);\n    else if (typeof requestAnimationFrame !== \"undefined\") requestAnimationFrame(postrender);\n\n    return g.node();\n  }\n}\n\nexport function tip(data, {x, y, ...options} = {}) {\n  if (options.frameAnchor === undefined) [x, y] = maybeTuple(x, y);\n  return new Tip(data, {...options, x, y});\n}\n\nfunction getLineOffset(anchor, length, lineHeight) {\n  return /^top(?:-|$)/.test(anchor)\n    ? 0.94 - lineHeight\n    : /^bottom(?:-|$)/\n    ? -0.29 - length * lineHeight\n    : (length / 2) * lineHeight;\n}\n\nfunction getTextTranslate(anchor, m, r, width, height) {\n  switch (anchor) {\n    case \"middle\":\n      return [-width / 2, height / 2];\n    case \"top-left\":\n      return [r, m + r];\n    case \"top\":\n      return [-width / 2, m / 2 + r];\n    case \"top-right\":\n      return [-width - r, m + r];\n    case \"right\":\n      return [-m / 2 - width - r, height / 2];\n    case \"bottom-left\":\n      return [r, -m - r];\n    case \"bottom\":\n      return [-width / 2, -m / 2 - r];\n    case \"bottom-right\":\n      return [-width - r, -m - r];\n    case \"left\":\n      return [r + m / 2, height / 2];\n  }\n}\n\nfunction getPath(anchor, m, r, width, height) {\n  const w = width + r * 2;\n  const h = height + r * 2;\n  switch (anchor) {\n    case \"middle\":\n      return `M${-w / 2},${-h / 2}h${w}v${h}h${-w}z`;\n    case \"top-left\":\n      return `M0,0l${m},${m}h${w - m}v${h}h${-w}z`;\n    case \"top\":\n      return `M0,0l${m / 2},${m / 2}h${(w - m) / 2}v${h}h${-w}v${-h}h${(w - m) / 2}z`;\n    case \"top-right\":\n      return `M0,0l${-m},${m}h${m - w}v${h}h${w}z`;\n    case \"right\":\n      return `M0,0l${-m / 2},${-m / 2}v${m / 2 - h / 2}h${-w}v${h}h${w}v${m / 2 - h / 2}z`;\n    case \"bottom-left\":\n      return `M0,0l${m},${-m}h${w - m}v${-h}h${-w}z`;\n    case \"bottom\":\n      return `M0,0l${m / 2},${-m / 2}h${(w - m) / 2}v${-h}h${-w}v${h}h${(w - m) / 2}z`;\n    case \"bottom-right\":\n      return `M0,0l${-m},${-m}h${m - w}v${-h}h${w}z`;\n    case \"left\":\n      return `M0,0l${m / 2},${-m / 2}v${m / 2 - h / 2}h${w}v${h}h${-w}v${m / 2 - h / 2}z`;\n  }\n}\n\nfunction getSources({channels}) {\n  const sources = {};\n  for (const key in channels) {\n    if (ignoreChannels.has(key)) continue;\n    const source = getSource(channels, key);\n    if (source) sources[key] = source;\n  }\n  return sources;\n}\n\nfunction formatPair(c1, c2, i) {\n  return c2.hint?.length // e.g., stackY\u2019s y1 and y2\n    ? `${formatDefault(c2.value[i] - c1.value[i])}`\n    : `${formatDefault(c1.value[i])}\u2013${formatDefault(c2.value[i])}`;\n}\n\nfunction formatLabel(scales, c, defaultLabel) {\n  return String(scales[c.scale]?.label ?? c?.label ?? defaultLabel);\n}\n", "import {creator, select} from \"d3\";\nimport {createChannel, inferChannelScale} from \"./channel.js\";\nimport {createContext} from \"./context.js\";\nimport {createDimensions} from \"./dimensions.js\";\nimport {createFacets, recreateFacets, facetExclude, facetGroups, facetTranslator, facetFilter} from \"./facet.js\";\nimport {pointer, pointerX, pointerY} from \"./interactions/pointer.js\";\nimport {createLegends, exposeLegends} from \"./legends.js\";\nimport {Mark} from \"./mark.js\";\nimport {axisFx, axisFy, axisX, axisY, gridFx, gridFy, gridX, gridY} from \"./marks/axis.js\";\nimport {frame} from \"./marks/frame.js\";\nimport {tip} from \"./marks/tip.js\";\nimport {isColor, isIterable, isNone, isScaleOptions} from \"./options.js\";\nimport {arrayify, map, yes, maybeIntervalTransform, subarray} from \"./options.js\";\nimport {createProjection, getGeometryChannels, hasProjection} from \"./projection.js\";\nimport {createScales, createScaleFunctions, autoScaleRange, exposeScales} from \"./scales.js\";\nimport {innerDimensions, outerDimensions} from \"./scales.js\";\nimport {position, registry as scaleRegistry} from \"./scales/index.js\";\nimport {applyInlineStyles, maybeClassName} from \"./style.js\";\nimport {initializer} from \"./transforms/basic.js\";\nimport {consumeWarnings, warn} from \"./warnings.js\";\n\nexport function plot(options = {}) {\n  const {facet, style, caption, ariaLabel, ariaDescription} = options;\n\n  // className for inline styles\n  const className = maybeClassName(options.className);\n\n  // Flatten any nested marks.\n  const marks = options.marks === undefined ? [] : flatMarks(options.marks);\n\n  // Add implicit tips.\n  marks.push(...inferTips(marks));\n\n  // Compute the top-level facet state. This has roughly the same structure as\n  // mark-specific facet state, except there isn\u2019t a facetsIndex, and there\u2019s a\n  // data and dataLength so we can warn the user if a different data of the same\n  // length is used in a mark.\n  const topFacetState = maybeTopFacet(facet, options);\n\n  // Construct a map from (faceted) Mark instance to facet state, including:\n  // channels - an {fx?, fy?} object to add to the fx and fy scale\n  // groups - a possibly-nested map from facet values to indexes in the data array\n  // facetsIndex - a sparse nested array of indices corresponding to the valid facets\n  const facetStateByMark = new Map();\n  for (const mark of marks) {\n    const facetState = maybeMarkFacet(mark, topFacetState, options);\n    if (facetState) facetStateByMark.set(mark, facetState);\n  }\n\n  // Compute a Map from scale name to an array of associated channels.\n  const channelsByScale = new Map();\n  if (topFacetState) addScaleChannels(channelsByScale, [topFacetState], options);\n  addScaleChannels(channelsByScale, facetStateByMark, options);\n\n  // Add implicit axis marks. Because this happens after faceting (because it\n  // depends on whether faceting is present), we must initialize the facet state\n  // of any implicit axes, too.\n  const axes = flatMarks(inferAxes(marks, channelsByScale, options));\n  for (const mark of axes) {\n    const facetState = maybeMarkFacet(mark, topFacetState, options);\n    if (facetState) facetStateByMark.set(mark, facetState);\n  }\n  marks.unshift(...axes);\n\n  // All the possible facets are given by the domains of the fx or fy scales, or\n  // the cross-product of these domains if we facet by both x and y. We sort\n  // them in order to apply the facet filters afterwards.\n  let facets = createFacets(channelsByScale, options);\n\n  if (facets !== undefined) {\n    const topFacetsIndex = topFacetState ? facetFilter(facets, topFacetState) : undefined;\n\n    // Compute a facet index for each mark, parallel to the facets array. For\n    // mark-level facets, compute an index for that mark\u2019s data and options.\n    // Otherwise, use the top-level facet index.\n    for (const mark of marks) {\n      if (mark.facet === null || mark.facet === \"super\") continue;\n      const facetState = facetStateByMark.get(mark);\n      if (facetState === undefined) continue;\n      facetState.facetsIndex = mark.fx != null || mark.fy != null ? facetFilter(facets, facetState) : topFacetsIndex;\n    }\n\n    // The cross product of the domains of fx and fy can include fx-fy\n    // combinations for which no mark has an instance associated with that\n    // combination, and therefore we don\u2019t want to render this facet (not even\n    // the frame). The same can occur if you specify the domain of fx and fy\n    // explicitly, but there is no mark instance associated with some values in\n    // the domain. Expunge empty facets, and clear the corresponding elements\n    // from the nested index in each mark.\n    const nonEmpty = new Set();\n    for (const {facetsIndex} of facetStateByMark.values()) {\n      facetsIndex?.forEach((index, i) => {\n        if (index?.length > 0) {\n          nonEmpty.add(i);\n        }\n      });\n    }\n\n    // If all the facets are empty (as when none of the marks are actually\n    // faceted), none of them are empty.\n    facets.forEach(\n      0 < nonEmpty.size && nonEmpty.size < facets.length\n        ? (f, i) => (f.empty = !nonEmpty.has(i))\n        : (f) => (f.empty = false)\n    );\n\n    // For any mark using the \u201Cexclude\u201D facet mode, invert the index.\n    for (const mark of marks) {\n      if (mark.facet === \"exclude\") {\n        const facetState = facetStateByMark.get(mark);\n        if (facetState !== undefined) facetState.facetsIndex = facetExclude(facetState.facetsIndex);\n      }\n    }\n  }\n\n  // If a scale is explicitly declared in options, initialize its associated\n  // channels to the empty array; this will guarantee that a corresponding scale\n  // will be created later (even if there are no other channels). Ignore facet\n  // scale declarations, which are handled above.\n  for (const key of scaleRegistry.keys()) {\n    if (isScaleOptions(options[key]) && key !== \"fx\" && key !== \"fy\") {\n      channelsByScale.set(key, []);\n    }\n  }\n\n  // A Map from Mark instance to its render state, including:\n  // index - the data index e.g. [0, 1, 2, 3, \u2026]\n  // channels - an array of materialized channels e.g. [[\"x\", {value}], \u2026]\n  // faceted - a boolean indicating whether this mark is faceted\n  // values - an object of scaled values e.g. {x: [40, 32, \u2026], \u2026}\n  const stateByMark = new Map();\n\n  // Initialize the marks\u2019 state.\n  for (const mark of marks) {\n    if (stateByMark.has(mark)) throw new Error(\"duplicate mark; each mark must be unique\");\n    const {facetsIndex, channels: facetChannels} = facetStateByMark.get(mark) ?? {};\n    const {data, facets, channels} = mark.initialize(facetsIndex, facetChannels, options);\n    applyScaleTransforms(channels, options);\n    stateByMark.set(mark, {data, facets, channels});\n  }\n\n  // Initalize the scales and dimensions.\n  const scaleDescriptors = createScales(addScaleChannels(channelsByScale, stateByMark, options), options);\n  const scales = createScaleFunctions(scaleDescriptors);\n  const dimensions = createDimensions(scaleDescriptors, marks, options);\n\n  autoScaleRange(scaleDescriptors, dimensions);\n\n  const {fx, fy} = scales;\n  const subdimensions = fx || fy ? innerDimensions(scaleDescriptors, dimensions) : dimensions;\n  const superdimensions = fx || fy ? actualDimensions(scales, dimensions) : dimensions;\n\n  // Initialize the context.\n  const context = createContext(options);\n  const document = context.document;\n  const svg = creator(\"svg\").call(document.documentElement);\n  let figure = svg; // replaced with the figure element, if any\n  context.ownerSVGElement = svg;\n  context.className = className;\n  context.projection = createProjection(options, subdimensions);\n\n  // Allows e.g. the axis mark to determine faceting lazily.\n  context.filterFacets = (data, channels) => {\n    return facetFilter(facets, {channels, groups: facetGroups(data, channels)});\n  };\n\n  // Allows e.g. the tip mark to reference channels and data on other marks.\n  context.getMarkState = (mark) => {\n    const state = stateByMark.get(mark);\n    const facetState = facetStateByMark.get(mark);\n    return {...state, channels: {...state.channels, ...facetState?.channels}};\n  };\n\n  // Allows e.g. the pointer transform to support viewof.\n  context.dispatchValue = (value) => {\n    if (figure.value === value) return;\n    figure.value = value;\n    figure.dispatchEvent(new Event(\"input\", {bubbles: true}));\n  };\n\n  // Reinitialize; for deriving channels dependent on other channels.\n  const newByScale = new Set();\n  for (const [mark, state] of stateByMark) {\n    if (mark.initializer != null) {\n      const dimensions = mark.facet === \"super\" ? superdimensions : subdimensions;\n      const update = mark.initializer(state.data, state.facets, state.channels, scales, dimensions, context);\n      if (update.data !== undefined) {\n        state.data = update.data;\n      }\n      if (update.facets !== undefined) {\n        state.facets = update.facets;\n      }\n      if (update.channels !== undefined) {\n        const {fx, fy, ...channels} = update.channels; // separate facet channels\n        inferChannelScales(channels);\n        Object.assign(state.channels, channels);\n        for (const channel of Object.values(channels)) {\n          const {scale} = channel;\n          // Initializers aren\u2019t allowed to redefine position scales as this\n          // would introduce a circular dependency; so simply scale these\n          // channels as-is rather than creating new scales, and assume that\n          // they already have the scale\u2019s transform applied, if any (e.g., when\n          // generating ticks for the axis mark).\n          if (scale != null && scaleRegistry.get(scale) !== position) {\n            applyScaleTransform(channel, options);\n            newByScale.add(scale);\n          }\n        }\n        // If the initializer returns new mark-level facet channels, we must\n        // record that the mark is now faceted. Note: we aren\u2019t actually\n        // populating the facet state, but subsequently we won\u2019t need it.\n        if (fx != null || fy != null) facetStateByMark.set(mark, true);\n      }\n    }\n  }\n\n  // Reconstruct scales if new scaled channels were created during\n  // reinitialization. Preserve existing scale labels, if any.\n  if (newByScale.size) {\n    const newChannelsByScale = new Map();\n    addScaleChannels(newChannelsByScale, stateByMark, options, (key) => newByScale.has(key));\n    addScaleChannels(channelsByScale, stateByMark, options, (key) => newByScale.has(key));\n    const newScaleDescriptors = inheritScaleLabels(createScales(newChannelsByScale, options), scaleDescriptors);\n    const newScales = createScaleFunctions(newScaleDescriptors);\n    Object.assign(scaleDescriptors, newScaleDescriptors);\n    Object.assign(scales, newScales);\n  }\n\n  // Sort and filter the facets to match the fx and fy domains; this is needed\n  // because the facets were constructed prior to the fx and fy scales.\n  let facetDomains, facetTranslate;\n  if (facets !== undefined) {\n    facetDomains = {x: fx?.domain(), y: fy?.domain()};\n    facets = recreateFacets(facets, facetDomains);\n    facetTranslate = facetTranslator(fx, fy, dimensions);\n  }\n\n  // Compute value objects, applying scales and projection as needed.\n  for (const [mark, state] of stateByMark) {\n    state.values = mark.scale(state.channels, scales, context);\n  }\n\n  const {width, height} = dimensions;\n\n  select(svg)\n    .attr(\"class\", className)\n    .attr(\"fill\", \"currentColor\")\n    .attr(\"font-family\", \"system-ui, sans-serif\")\n    .attr(\"font-size\", 10)\n    .attr(\"text-anchor\", \"middle\")\n    .attr(\"width\", width)\n    .attr(\"height\", height)\n    .attr(\"viewBox\", `0 0 ${width} ${height}`)\n    .attr(\"aria-label\", ariaLabel)\n    .attr(\"aria-description\", ariaDescription)\n    .call((svg) =>\n      // Warning: if you edit this, change defaultClassName.\n      svg.append(\"style\").text(\n        `.${className} {\n  display: block;\n  background: white;\n  height: auto;\n  height: intrinsic;\n  max-width: 100%;\n}\n.${className} text,\n.${className} tspan {\n  white-space: pre;\n}`\n      )\n    )\n    .call(applyInlineStyles, style);\n\n  // Render marks.\n  for (const mark of marks) {\n    const {channels, values, facets: indexes} = stateByMark.get(mark);\n\n    // Render a non-faceted mark.\n    if (facets === undefined || mark.facet === \"super\") {\n      let index = null;\n      if (indexes) {\n        index = indexes[0];\n        index = mark.filter(index, channels, values);\n        if (index.length === 0) continue;\n      }\n      const node = mark.render(index, scales, values, superdimensions, context);\n      if (node == null) continue;\n      svg.appendChild(node);\n    }\n\n    // Render a faceted mark.\n    else {\n      let g;\n      for (const f of facets) {\n        if (!(mark.facetAnchor?.(facets, facetDomains, f) ?? !f.empty)) continue;\n        let index = null;\n        if (indexes) {\n          const faceted = facetStateByMark.has(mark);\n          index = indexes[faceted ? f.i : 0];\n          index = mark.filter(index, channels, values);\n          if (index.length === 0) continue;\n          if (!faceted && index === indexes[0]) index = subarray(index); // copy before assigning fx, fy, fi\n          (index.fx = f.x), (index.fy = f.y), (index.fi = f.i);\n        }\n        const node = mark.render(index, scales, values, subdimensions, context);\n        if (node == null) continue;\n        // Lazily construct the shared group (to drop empty marks).\n        (g ??= select(svg).append(\"g\")).append(() => node).datum(f);\n        // Promote ARIA attributes and mark transform to avoid repetition on\n        // each facet; this assumes that these attributes are consistent across\n        // facets, but that should be the case!\n        for (const name of [\"aria-label\", \"aria-description\", \"aria-hidden\", \"transform\"]) {\n          if (node.hasAttribute(name)) {\n            g.attr(name, node.getAttribute(name));\n            node.removeAttribute(name);\n          }\n        }\n      }\n      g?.selectChildren().attr(\"transform\", facetTranslate);\n    }\n  }\n\n  // Wrap the plot in a figure with a caption, if desired.\n  const legends = createLegends(scaleDescriptors, context, options);\n  if (caption != null || legends.length > 0) {\n    figure = document.createElement(\"figure\");\n    figure.style.maxWidth = \"initial\";\n    for (const legend of legends) figure.appendChild(legend);\n    figure.appendChild(svg);\n    if (caption != null) {\n      const figcaption = document.createElement(\"figcaption\");\n      figcaption.appendChild(caption?.ownerDocument ? caption : document.createTextNode(caption));\n      figure.appendChild(figcaption);\n    }\n  }\n\n  figure.scale = exposeScales(scaleDescriptors);\n  figure.legend = exposeLegends(scaleDescriptors, context, options);\n\n  const w = consumeWarnings();\n  if (w > 0) {\n    select(svg)\n      .append(\"text\")\n      .attr(\"x\", width)\n      .attr(\"y\", 20)\n      .attr(\"dy\", \"-1em\")\n      .attr(\"text-anchor\", \"end\")\n      .attr(\"font-family\", \"initial\") // fix emoji rendering in Chrome\n      .text(\"\\u26a0\\ufe0f\") // emoji variation selector\n      .append(\"title\")\n      .text(`${w.toLocaleString(\"en-US\")} warning${w === 1 ? \"\" : \"s\"}. Please check the console.`);\n  }\n\n  return figure;\n}\n\nfunction plotThis({marks = [], ...options} = {}) {\n  return plot({...options, marks: [...marks, this]});\n}\n\n// Note: This side-effect avoids a circular dependency.\nMark.prototype.plot = plotThis;\n\nfunction flatMarks(marks) {\n  return marks\n    .flat(Infinity)\n    .filter((mark) => mark != null)\n    .map(markify);\n}\n\nfunction markify(mark) {\n  return typeof mark.render === \"function\" ? mark : new Render(mark);\n}\n\nclass Render extends Mark {\n  constructor(render) {\n    if (typeof render !== \"function\") throw new TypeError(\"invalid mark; missing render function\");\n    super();\n    this.render = render;\n  }\n  render() {}\n}\n\n// Note: mutates channel.value to apply the scale transform, if any.\nfunction applyScaleTransforms(channels, options) {\n  for (const name in channels) applyScaleTransform(channels[name], options);\n  return channels;\n}\n\n// Note: mutates channel.value to apply the scale transform, if any. Also sets\n// channel.transform to false to prevent duplicate transform application.\nfunction applyScaleTransform(channel, options) {\n  const {scale, transform: t = true} = channel;\n  if (scale == null || !t) return;\n  const {\n    type,\n    percent,\n    interval,\n    transform = percent ? (x) => x * 100 : maybeIntervalTransform(interval, type)\n  } = options[scale] ?? {};\n  if (transform == null) return;\n  channel.value = map(channel.value, transform);\n  channel.transform = false;\n}\n\n// An initializer may generate channels without knowing how the downstream mark\n// will use them. Marks are typically responsible associated scales with\n// channels, but here we assume common behavior across marks.\nfunction inferChannelScales(channels) {\n  for (const name in channels) {\n    inferChannelScale(name, channels[name]);\n  }\n}\n\nfunction addScaleChannels(channelsByScale, stateByMark, options, filter = yes) {\n  for (const {channels} of stateByMark.values()) {\n    for (const name in channels) {\n      const channel = channels[name];\n      const {scale} = channel;\n      if (scale != null && filter(scale)) {\n        // Geo marks affect the default x and y domains if there is no\n        // projection. Skip this (as an optimization) when a projection is\n        // specified, or when the domains for x and y are specified.\n        if (scale === \"projection\") {\n          if (!hasProjection(options)) {\n            const gx = options.x?.domain === undefined;\n            const gy = options.y?.domain === undefined;\n            if (gx || gy) {\n              const [x, y] = getGeometryChannels(channel);\n              if (gx) addScaleChannel(channelsByScale, \"x\", x);\n              if (gy) addScaleChannel(channelsByScale, \"y\", y);\n            }\n          }\n        } else {\n          addScaleChannel(channelsByScale, scale, channel);\n        }\n      }\n    }\n  }\n  return channelsByScale;\n}\n\nfunction addScaleChannel(channelsByScale, scale, channel) {\n  const scaleChannels = channelsByScale.get(scale);\n  if (scaleChannels !== undefined) scaleChannels.push(channel);\n  else channelsByScale.set(scale, [channel]);\n}\n\n// Returns the facet groups, and possibly fx and fy channels, associated with\n// the top-level facet option {data, x, y}.\nfunction maybeTopFacet(facet, options) {\n  if (facet == null) return;\n  const {x, y} = facet;\n  if (x == null && y == null) return;\n  const data = arrayify(facet.data);\n  if (data == null) throw new Error(\"missing facet data\");\n  const channels = {};\n  if (x != null) channels.fx = createChannel(data, {value: x, scale: \"fx\"});\n  if (y != null) channels.fy = createChannel(data, {value: y, scale: \"fy\"});\n  applyScaleTransforms(channels, options);\n  const groups = facetGroups(data, channels);\n  return {channels, groups, data: facet.data};\n}\n\n// Returns the facet groups, and possibly fx and fy channels, associated with a\n// mark, either through top-level faceting or mark-level facet options {fx, fy}.\nfunction maybeMarkFacet(mark, topFacetState, options) {\n  if (mark.facet === null || mark.facet === \"super\") return;\n\n  // This mark defines a mark-level facet. TODO There\u2019s some code duplication\n  // here with maybeTopFacet that we could reduce.\n  const {fx, fy} = mark;\n  if (fx != null || fy != null) {\n    const data = arrayify(mark.data ?? fx ?? fy);\n    if (data === undefined) throw new Error(`missing facet data in ${mark.ariaLabel}`);\n    if (data === null) return; // ignore channel definitions if no data is provided TODO this right?\n    const channels = {};\n    if (fx != null) channels.fx = createChannel(data, {value: fx, scale: \"fx\"});\n    if (fy != null) channels.fy = createChannel(data, {value: fy, scale: \"fy\"});\n    applyScaleTransforms(channels, options);\n    return {channels, groups: facetGroups(data, channels)};\n  }\n\n  // This mark links to a top-level facet, if present.\n  if (topFacetState === undefined) return;\n\n  // TODO Can we link the top-level facet channels here?\n  const {channels, groups, data} = topFacetState;\n  if (mark.facet !== \"auto\" || mark.data === data) return {channels, groups};\n\n  // Warn for the common pitfall of wanting to facet mapped data with the\n  // top-level facet option.\n  if (\n    data.length > 0 &&\n    (groups.size > 1 || (groups.size === 1 && channels.fx && channels.fy && [...groups][0][1].size > 1)) &&\n    arrayify(mark.data)?.length === data.length\n  ) {\n    warn(\n      `Warning: the ${mark.ariaLabel} mark appears to use faceted data, but isn\u2019t faceted. The mark data has the same length as the facet data and the mark facet option is \"auto\", but the mark data and facet data are distinct. If this mark should be faceted, set the mark facet option to true; otherwise, suppress this warning by setting the mark facet option to false.`\n    );\n  }\n}\n\nfunction derive(mark, options = {}) {\n  return initializer({...options, x: null, y: null}, (data, facets, channels, scales, dimensions, context) => {\n    return context.getMarkState(mark);\n  });\n}\n\nfunction inferTips(marks) {\n  const tips = [];\n  for (const mark of marks) {\n    const t = mark.tip;\n    if (t) {\n      const p = t === \"x\" ? pointerX : t === \"y\" ? pointerY : pointer;\n      const options = p(derive(mark)); // TODO tip options?\n      options.title = null; // prevent implicit title for primitive data\n      tips.push(tip(mark.data, options));\n    }\n  }\n  return tips;\n}\n\nfunction inferAxes(marks, channelsByScale, options) {\n  let {\n    projection,\n    x = {},\n    y = {},\n    fx = {},\n    fy = {},\n    axis,\n    grid,\n    facet = {},\n    facet: {axis: facetAxis = axis, grid: facetGrid} = facet,\n    x: {axis: xAxis = axis, grid: xGrid = xAxis === null ? null : grid} = x,\n    y: {axis: yAxis = axis, grid: yGrid = yAxis === null ? null : grid} = y,\n    fx: {axis: fxAxis = facetAxis, grid: fxGrid = fxAxis === null ? null : facetGrid} = fx,\n    fy: {axis: fyAxis = facetAxis, grid: fyGrid = fyAxis === null ? null : facetGrid} = fy\n  } = options;\n\n  // Disable axes if the corresponding scale is not present.\n  if (projection || (!isScaleOptions(x) && !hasPositionChannel(\"x\", marks))) xAxis = xGrid = null;\n  if (projection || (!isScaleOptions(y) && !hasPositionChannel(\"y\", marks))) yAxis = yGrid = null;\n  if (!channelsByScale.has(\"fx\")) fxAxis = fxGrid = null;\n  if (!channelsByScale.has(\"fy\")) fyAxis = fyGrid = null;\n\n  // Resolve the default implicit axes by checking for explicit ones.\n  if (xAxis === undefined) xAxis = !hasAxis(marks, \"x\");\n  if (yAxis === undefined) yAxis = !hasAxis(marks, \"y\");\n  if (fxAxis === undefined) fxAxis = !hasAxis(marks, \"fx\");\n  if (fyAxis === undefined) fyAxis = !hasAxis(marks, \"fy\");\n\n  // Resolve the default orientation of axes.\n  if (xAxis === true) xAxis = \"bottom\";\n  if (yAxis === true) yAxis = \"left\";\n  if (fxAxis === true) fxAxis = xAxis === \"top\" || xAxis === null ? \"bottom\" : \"top\";\n  if (fyAxis === true) fyAxis = yAxis === \"right\" || yAxis === null ? \"left\" : \"right\";\n\n  const axes = [];\n  maybeGrid(axes, fyGrid, gridFy, fy);\n  maybeAxis(axes, fyAxis, axisFy, \"right\", \"left\", facet, fy);\n  maybeGrid(axes, fxGrid, gridFx, fx);\n  maybeAxis(axes, fxAxis, axisFx, \"top\", \"bottom\", facet, fx);\n  maybeGrid(axes, yGrid, gridY, y);\n  maybeAxis(axes, yAxis, axisY, \"left\", \"right\", options, y);\n  maybeGrid(axes, xGrid, gridX, x);\n  maybeAxis(axes, xAxis, axisX, \"bottom\", \"top\", options, x);\n  return axes;\n}\n\nfunction maybeAxis(axes, axis, axisType, primary, secondary, defaults, options) {\n  if (!axis) return;\n  const both = isBoth(axis);\n  options = axisOptions(both ? primary : axis, defaults, options);\n  const {line} = options;\n  if ((axisType === axisY || axisType === axisX) && line && !isNone(line)) axes.push(frame(lineOptions(options)));\n  axes.push(axisType(options));\n  if (both) axes.push(axisType({...options, anchor: secondary, label: null}));\n}\n\nfunction maybeGrid(axes, grid, gridType, options) {\n  if (!grid || isNone(grid)) return;\n  axes.push(gridType(gridOptions(grid, options)));\n}\n\nfunction isBoth(value) {\n  return /^\\s*both\\s*$/i.test(value);\n}\n\nfunction axisOptions(\n  anchor,\n  defaults,\n  {\n    line = defaults.line,\n    ticks,\n    tickSize,\n    tickSpacing,\n    tickPadding,\n    tickFormat,\n    tickRotate,\n    fontVariant,\n    ariaLabel,\n    ariaDescription,\n    label = defaults.label,\n    labelAnchor,\n    labelArrow = defaults.labelArrow,\n    labelOffset\n  }\n) {\n  return {\n    anchor,\n    line,\n    ticks,\n    tickSize,\n    tickSpacing,\n    tickPadding,\n    tickFormat,\n    tickRotate,\n    fontVariant,\n    ariaLabel,\n    ariaDescription,\n    label,\n    labelAnchor,\n    labelArrow,\n    labelOffset\n  };\n}\n\nfunction lineOptions(options) {\n  const {anchor, line} = options;\n  return {anchor, facetAnchor: anchor + \"-empty\", stroke: line === true ? undefined : line};\n}\n\nfunction gridOptions(\n  grid,\n  {\n    stroke = isColor(grid) ? grid : undefined,\n    ticks = isGridTicks(grid) ? grid : undefined,\n    tickSpacing,\n    ariaLabel,\n    ariaDescription\n  }\n) {\n  return {\n    stroke,\n    ticks,\n    tickSpacing,\n    ariaLabel,\n    ariaDescription\n  };\n}\n\nfunction isGridTicks(grid) {\n  switch (typeof grid) {\n    case \"number\":\n      return true;\n    case \"string\":\n      return !isColor(grid);\n  }\n  return isIterable(grid) || typeof grid?.range === \"function\";\n}\n\n// Is there an explicit axis already present? TODO We probably want a more\n// explicit test than looking for the ARIA label, but it does afford some\n// flexibility in axis implementation which is nice.\nfunction hasAxis(marks, k) {\n  const prefix = `${k}-axis `;\n  return marks.some((m) => m.ariaLabel?.startsWith(prefix));\n}\n\nfunction hasPositionChannel(k, marks) {\n  for (const mark of marks) {\n    for (const key in mark.channels) {\n      const {scale} = mark.channels[key];\n      if (scale === k || scale === \"projection\") {\n        return true;\n      }\n    }\n  }\n  return false;\n}\n\nfunction inheritScaleLabels(newScales, scales) {\n  for (const key in newScales) {\n    const newScale = newScales[key];\n    const scale = scales[key];\n    if (newScale.label === undefined && scale) {\n      newScale.label = scale.label;\n    }\n  }\n  return newScales;\n}\n\n// This differs from the other outerDimensions in that it accounts for rounding\n// and outer padding in the fact scales; we want the frame to align exactly with\n// the actual range, not the desired range.\nfunction actualDimensions({fx, fy}, dimensions) {\n  const {marginTop, marginRight, marginBottom, marginLeft, width, height} = outerDimensions(dimensions);\n  const fxr = fx && outerRange(fx);\n  const fyr = fy && outerRange(fy);\n  return {\n    marginTop: fy ? fyr[0] : marginTop,\n    marginRight: fx ? width - fxr[1] : marginRight,\n    marginBottom: fy ? height - fyr[1] : marginBottom,\n    marginLeft: fx ? fxr[0] : marginLeft,\n    // Some marks, namely the x- and y-axis labels, want to know what the\n    // desired (rather than actual) margins are for positioning.\n    inset: {\n      marginTop: dimensions.marginTop,\n      marginRight: dimensions.marginRight,\n      marginBottom: dimensions.marginBottom,\n      marginLeft: dimensions.marginLeft\n    },\n    width,\n    height\n  };\n}\n\nfunction outerRange(scale) {\n  const domain = scale.domain();\n  let x1 = scale(domain[0]);\n  let x2 = scale(domain[domain.length - 1]);\n  if (x2 < x1) [x1, x2] = [x2, x1];\n  return [x1, x2 + scale.bandwidth()];\n}\n", "import {\n  bisect,\n  extent,\n  thresholdFreedmanDiaconis,\n  thresholdScott,\n  thresholdSturges,\n  tickIncrement,\n  ticks,\n  utcTickInterval\n} from \"d3\";\nimport {withTip} from \"../mark.js\";\nimport {\n  coerceDate,\n  coerceNumbers,\n  identity,\n  isIterable,\n  isTemporal,\n  labelof,\n  map,\n  maybeApplyInterval,\n  maybeColorChannel,\n  maybeColumn,\n  maybeRangeInterval,\n  maybeTuple,\n  maybeValue,\n  mid,\n  valueof\n} from \"../options.js\";\nimport {maybeUtcInterval} from \"../time.js\";\nimport {basic} from \"./basic.js\";\nimport {\n  hasOutput,\n  maybeEvaluator,\n  maybeGroup,\n  maybeOutput,\n  maybeOutputs,\n  maybeReduce,\n  maybeSort,\n  maybeSubgroup,\n  reduceCount,\n  reduceFirst,\n  reduceIdentity\n} from \"./group.js\";\nimport {maybeInsetX, maybeInsetY} from \"./inset.js\";\n\n// Group on {z, fill, stroke}, then optionally on y, then bin x.\nexport function binX(outputs = {y: \"count\"}, options = {}) {\n  [outputs, options] = mergeOptions(outputs, options);\n  const {x, y} = options;\n  return binn(maybeBinValue(x, options, identity), null, null, y, outputs, maybeInsetX(options));\n}\n\n// Group on {z, fill, stroke}, then optionally on x, then bin y.\nexport function binY(outputs = {x: \"count\"}, options = {}) {\n  [outputs, options] = mergeOptions(outputs, options);\n  const {x, y} = options;\n  return binn(null, maybeBinValue(y, options, identity), x, null, outputs, maybeInsetY(options));\n}\n\n// Group on {z, fill, stroke}, then bin on x and y.\nexport function bin(outputs = {fill: \"count\"}, options = {}) {\n  [outputs, options] = mergeOptions(outputs, options);\n  const {x, y} = maybeBinValueTuple(options);\n  return binn(x, y, null, null, outputs, maybeInsetX(maybeInsetY(options)));\n}\n\nfunction maybeDenseInterval(bin, k, options = {}) {\n  return options?.interval == null\n    ? options\n    : bin({[k]: options?.reduce === undefined ? reduceFirst : options.reduce, filter: null}, options);\n}\n\nexport function maybeDenseIntervalX(options = {}) {\n  return maybeDenseInterval(binX, \"y\", withTip(options, \"x\"));\n}\n\nexport function maybeDenseIntervalY(options = {}) {\n  return maybeDenseInterval(binY, \"x\", withTip(options, \"y\"));\n}\n\nfunction binn(\n  bx, // optionally bin on x (exclusive with gx)\n  by, // optionally bin on y (exclusive with gy)\n  gx, // optionally group on x (exclusive with bx and gy)\n  gy, // optionally group on y (exclusive with by and gx)\n  {\n    data: reduceData = reduceIdentity, // TODO avoid materializing when unused?\n    filter = reduceCount, // return only non-empty bins by default\n    sort,\n    reverse,\n    ...outputs // output channel definitions\n  } = {},\n  inputs = {} // input channels and options\n) {\n  bx = maybeBin(bx);\n  by = maybeBin(by);\n\n  // Compute the outputs.\n  outputs = maybeBinOutputs(outputs, inputs);\n  reduceData = maybeBinReduce(reduceData, identity);\n  sort = sort == null ? undefined : maybeBinOutput(\"sort\", sort, inputs);\n  filter = filter == null ? undefined : maybeBinEvaluator(\"filter\", filter, inputs);\n\n  // Don\u2019t group on a channel if an output requires it as an input!\n  if (gx != null && hasOutput(outputs, \"x\", \"x1\", \"x2\")) gx = null;\n  if (gy != null && hasOutput(outputs, \"y\", \"y1\", \"y2\")) gy = null;\n\n  // Produce x1, x2, y1, and y2 output channels as appropriate (when binning).\n  const [BX1, setBX1] = maybeColumn(bx);\n  const [BX2, setBX2] = maybeColumn(bx);\n  const [BY1, setBY1] = maybeColumn(by);\n  const [BY2, setBY2] = maybeColumn(by);\n\n  // Produce x or y output channels as appropriate (when grouping).\n  const [k, gk] = gx != null ? [gx, \"x\"] : gy != null ? [gy, \"y\"] : [];\n  const [GK, setGK] = maybeColumn(k);\n\n  // Greedily materialize the z, fill, and stroke channels (if channels and not\n  // constants) so that we can reference them for subdividing groups without\n  // computing them more than once. We also want to consume options that should\n  // only apply to this transform rather than passing them through to the next.\n  const {\n    x,\n    y,\n    z,\n    fill,\n    stroke,\n    x1,\n    x2, // consumed if x is an output\n    y1,\n    y2, // consumed if y is an output\n    domain,\n    cumulative,\n    thresholds,\n    interval,\n    ...options\n  } = inputs;\n  const [GZ, setGZ] = maybeColumn(z);\n  const [vfill] = maybeColorChannel(fill);\n  const [vstroke] = maybeColorChannel(stroke);\n  const [GF, setGF] = maybeColumn(vfill);\n  const [GS, setGS] = maybeColumn(vstroke);\n\n  return {\n    ...(\"z\" in inputs && {z: GZ || z}),\n    ...(\"fill\" in inputs && {fill: GF || fill}),\n    ...(\"stroke\" in inputs && {stroke: GS || stroke}),\n    ...basic(options, (data, facets, plotOptions) => {\n      const K = maybeApplyInterval(valueof(data, k), plotOptions?.[gk]);\n      const Z = valueof(data, z);\n      const F = valueof(data, vfill);\n      const S = valueof(data, vstroke);\n      const G = maybeSubgroup(outputs, {z: Z, fill: F, stroke: S});\n      const groupFacets = [];\n      const groupData = [];\n      const GK = K && setGK([]);\n      const GZ = Z && setGZ([]);\n      const GF = F && setGF([]);\n      const GS = S && setGS([]);\n      const BX1 = bx && setBX1([]);\n      const BX2 = bx && setBX2([]);\n      const BY1 = by && setBY1([]);\n      const BY2 = by && setBY2([]);\n      const bin = bing(bx?.(data), by?.(data));\n      let i = 0;\n      for (const o of outputs) o.initialize(data);\n      if (sort) sort.initialize(data);\n      if (filter) filter.initialize(data);\n      for (const facet of facets) {\n        const groupFacet = [];\n        for (const o of outputs) o.scope(\"facet\", facet);\n        if (sort) sort.scope(\"facet\", facet);\n        if (filter) filter.scope(\"facet\", facet);\n        for (const [f, I] of maybeGroup(facet, G)) {\n          for (const [k, g] of maybeGroup(I, K)) {\n            for (const [b, extent] of bin(g)) {\n              if (filter && !filter.reduce(b, extent)) continue;\n              groupFacet.push(i++);\n              groupData.push(reduceData.reduceIndex(b, data, extent));\n              if (K) GK.push(k);\n              if (Z) GZ.push(G === Z ? f : Z[b[0]]);\n              if (F) GF.push(G === F ? f : F[b[0]]);\n              if (S) GS.push(G === S ? f : S[b[0]]);\n              if (BX1) BX1.push(extent.x1), BX2.push(extent.x2);\n              if (BY1) BY1.push(extent.y1), BY2.push(extent.y2);\n              for (const o of outputs) o.reduce(b, extent);\n              if (sort) sort.reduce(b);\n            }\n          }\n        }\n        groupFacets.push(groupFacet);\n      }\n      maybeSort(groupFacets, sort, reverse);\n      return {data: groupData, facets: groupFacets};\n    }),\n    ...(!hasOutput(outputs, \"x\") && (BX1 ? {x1: BX1, x2: BX2, x: mid(BX1, BX2)} : {x, x1, x2})),\n    ...(!hasOutput(outputs, \"y\") && (BY1 ? {y1: BY1, y2: BY2, y: mid(BY1, BY2)} : {y, y1, y2})),\n    ...(GK && {[gk]: GK}),\n    ...Object.fromEntries(outputs.map(({name, output}) => [name, output]))\n  };\n}\n\n// Allow bin options to be specified as part of outputs; merge them into options.\nfunction mergeOptions({cumulative, domain, thresholds, interval, ...outputs}, options) {\n  return [outputs, {cumulative, domain, thresholds, interval, ...options}];\n}\n\nfunction maybeBinValue(value, {cumulative, domain, thresholds, interval}, defaultValue) {\n  value = {...maybeValue(value)};\n  if (value.domain === undefined) value.domain = domain;\n  if (value.cumulative === undefined) value.cumulative = cumulative;\n  if (value.thresholds === undefined) value.thresholds = thresholds;\n  if (value.interval === undefined) value.interval = interval;\n  if (value.value === undefined) value.value = defaultValue;\n  value.thresholds = maybeThresholds(value.thresholds, value.interval);\n  return value;\n}\n\nfunction maybeBinValueTuple(options) {\n  let {x, y} = options;\n  x = maybeBinValue(x, options);\n  y = maybeBinValue(y, options);\n  [x.value, y.value] = maybeTuple(x.value, y.value);\n  return {x, y};\n}\n\nfunction maybeBin(options) {\n  if (options == null) return;\n  const {value, cumulative, domain = extent, thresholds} = options;\n  const bin = (data) => {\n    let V = valueof(data, value);\n    let T; // bin thresholds\n    if (isTemporal(V) || isTimeThresholds(thresholds)) {\n      V = map(V, coerceDate, Float64Array); // like coerceDates, but faster\n      let [min, max] = typeof domain === \"function\" ? domain(V) : domain;\n      let t = typeof thresholds === \"function\" && !isInterval(thresholds) ? thresholds(V, min, max) : thresholds;\n      if (typeof t === \"number\") t = utcTickInterval(min, max, t);\n      if (isInterval(t)) {\n        if (domain === extent) {\n          min = t.floor(min);\n          max = t.offset(t.floor(max));\n        }\n        t = t.range(min, t.offset(max));\n      }\n      T = t;\n    } else {\n      V = coerceNumbers(V);\n      let [min, max] = typeof domain === \"function\" ? domain(V) : domain;\n      let t = typeof thresholds === \"function\" && !isInterval(thresholds) ? thresholds(V, min, max) : thresholds;\n      if (typeof t === \"number\") {\n        // This differs from d3.ticks with regard to exclusive bounds: we want a\n        // first threshold less than or equal to the minimum, and a last\n        // threshold (strictly) greater than the maximum.\n        if (domain === extent) {\n          let step = tickIncrement(min, max, t);\n          if (isFinite(step)) {\n            if (step > 0) {\n              let r0 = Math.round(min / step);\n              let r1 = Math.round(max / step);\n              if (!(r0 * step <= min)) --r0;\n              if (!(r1 * step > max)) ++r1;\n              let n = r1 - r0 + 1;\n              t = new Float64Array(n);\n              for (let i = 0; i < n; ++i) t[i] = (r0 + i) * step;\n            } else if (step < 0) {\n              step = -step;\n              let r0 = Math.round(min * step);\n              let r1 = Math.round(max * step);\n              if (!(r0 / step <= min)) --r0;\n              if (!(r1 / step > max)) ++r1;\n              let n = r1 - r0 + 1;\n              t = new Float64Array(n);\n              for (let i = 0; i < n; ++i) t[i] = (r0 + i) / step;\n            } else {\n              t = [min];\n            }\n          } else {\n            t = [min];\n          }\n        } else {\n          t = ticks(min, max, t);\n        }\n      } else if (isInterval(t)) {\n        if (domain === extent) {\n          min = t.floor(min);\n          max = t.offset(t.floor(max));\n        }\n        t = t.range(min, t.offset(max));\n      }\n      T = t;\n    }\n    const E = [];\n    if (T.length === 1) E.push([T[0], T[0]]); // collapsed domain\n    else for (let i = 1; i < T.length; ++i) E.push([T[i - 1], T[i]]);\n    E.bin = (cumulative < 0 ? bin1cn : cumulative > 0 ? bin1cp : bin1)(E, T, V);\n    return E;\n  };\n  bin.label = labelof(value);\n  return bin;\n}\n\nexport function maybeThresholds(thresholds, interval, defaultThresholds = thresholdAuto) {\n  if (thresholds === undefined) {\n    return interval === undefined ? defaultThresholds : maybeRangeInterval(interval);\n  }\n  if (typeof thresholds === \"string\") {\n    switch (thresholds.toLowerCase()) {\n      case \"freedman-diaconis\":\n        return thresholdFreedmanDiaconis;\n      case \"scott\":\n        return thresholdScott;\n      case \"sturges\":\n        return thresholdSturges;\n      case \"auto\":\n        return thresholdAuto;\n    }\n    return maybeUtcInterval(thresholds);\n  }\n  return thresholds; // pass array, count, or function to bin.thresholds\n}\n\nfunction maybeBinOutputs(outputs, inputs) {\n  return maybeOutputs(outputs, inputs, maybeBinOutput);\n}\n\nfunction maybeBinOutput(name, reduce, inputs) {\n  return maybeOutput(name, reduce, inputs, maybeBinEvaluator);\n}\n\nfunction maybeBinEvaluator(name, reduce, inputs) {\n  return maybeEvaluator(name, reduce, inputs, maybeBinReduce);\n}\n\nfunction maybeBinReduce(reduce, value) {\n  return maybeReduce(reduce, value, maybeBinReduceFallback);\n}\n\nfunction maybeBinReduceFallback(reduce) {\n  switch (`${reduce}`.toLowerCase()) {\n    case \"x\":\n      return reduceX;\n    case \"x1\":\n      return reduceX1;\n    case \"x2\":\n      return reduceX2;\n    case \"y\":\n      return reduceY;\n    case \"y1\":\n      return reduceY1;\n    case \"y2\":\n      return reduceY2;\n  }\n  throw new Error(`invalid bin reduce: ${reduce}`);\n}\n\nfunction thresholdAuto(values, min, max) {\n  return Math.min(200, thresholdScott(values, min, max));\n}\n\nfunction isTimeThresholds(t) {\n  return isTimeInterval(t) || (isIterable(t) && isTemporal(t));\n}\n\nfunction isTimeInterval(t) {\n  return isInterval(t) && typeof t === \"function\" && t() instanceof Date;\n}\n\nfunction isInterval(t) {\n  return typeof t?.range === \"function\";\n}\n\nfunction bing(EX, EY) {\n  return EX && EY\n    ? function* (I) {\n        const X = EX.bin(I); // first bin on x\n        for (const [ix, [x1, x2]] of EX.entries()) {\n          const Y = EY.bin(X[ix]); // then bin on y\n          for (const [iy, [y1, y2]] of EY.entries()) {\n            yield [Y[iy], {x1, y1, x2, y2}];\n          }\n        }\n      }\n    : EX\n    ? function* (I) {\n        const X = EX.bin(I);\n        for (const [i, [x1, x2]] of EX.entries()) {\n          yield [X[i], {x1, x2}];\n        }\n      }\n    : function* (I) {\n        const Y = EY.bin(I);\n        for (const [i, [y1, y2]] of EY.entries()) {\n          yield [Y[i], {y1, y2}];\n        }\n      };\n}\n\n// non-cumulative distribution\nfunction bin1(E, T, V) {\n  T = coerceNumbers(T); // for faster bisection\n  return (I) => {\n    const B = E.map(() => []);\n    for (const i of I) B[bisect(T, V[i]) - 1]?.push(i); // TODO quantization?\n    return B;\n  };\n}\n\n// cumulative distribution\nfunction bin1cp(E, T, V) {\n  const bin = bin1(E, T, V);\n  return (I) => {\n    const B = bin(I);\n    for (let i = 1, n = B.length; i < n; ++i) {\n      const C = B[i - 1];\n      const b = B[i];\n      for (const j of C) b.push(j);\n    }\n    return B;\n  };\n}\n\n// complementary cumulative distribution\nfunction bin1cn(E, T, V) {\n  const bin = bin1(E, T, V);\n  return (I) => {\n    const B = bin(I);\n    for (let i = B.length - 2; i >= 0; --i) {\n      const C = B[i + 1];\n      const b = B[i];\n      for (const j of C) b.push(j);\n    }\n    return B;\n  };\n}\n\nfunction mid1(x1, x2) {\n  const m = (+x1 + +x2) / 2;\n  return x1 instanceof Date ? new Date(m) : m;\n}\n\nconst reduceX = {\n  reduceIndex(I, X, {x1, x2}) {\n    return mid1(x1, x2);\n  }\n};\n\nconst reduceY = {\n  reduceIndex(I, X, {y1, y2}) {\n    return mid1(y1, y2);\n  }\n};\n\nconst reduceX1 = {\n  reduceIndex(I, X, {x1}) {\n    return x1;\n  }\n};\n\nconst reduceX2 = {\n  reduceIndex(I, X, {x2}) {\n    return x2;\n  }\n};\n\nconst reduceY1 = {\n  reduceIndex(I, X, {y1}) {\n    return y1;\n  }\n};\n\nconst reduceY2 = {\n  reduceIndex(I, X, {y2}) {\n    return y2;\n  }\n};\n", "import {hasX, hasY, identity} from \"../options.js\";\n\nexport function maybeIdentityX(options = {}) {\n  return hasX(options) ? options : {...options, x: identity};\n}\n\nexport function maybeIdentityY(options = {}) {\n  return hasY(options) ? options : {...options, y: identity};\n}\n", "import {InternMap, cumsum, greatest, group, groupSort, max, min, rollup, sum} from \"d3\";\nimport {ascendingDefined, descendingDefined} from \"../defined.js\";\nimport {withTip} from \"../mark.js\";\nimport {maybeApplyInterval, maybeColumn, maybeZ, maybeZero} from \"../options.js\";\nimport {column, field, mid, one, range, valueof} from \"../options.js\";\nimport {basic} from \"./basic.js\";\n\nexport function stackX(stackOptions = {}, options = {}) {\n  if (arguments.length === 1) [stackOptions, options] = mergeOptions(stackOptions);\n  const {y1, y = y1, x, ...rest} = options; // note: consumes x!\n  const [transform, Y, x1, x2] = stack(y, x, \"y\", \"x\", stackOptions, rest);\n  return {...transform, y1, y: Y, x1, x2, x: mid(x1, x2)};\n}\n\nexport function stackX1(stackOptions = {}, options = {}) {\n  if (arguments.length === 1) [stackOptions, options] = mergeOptions(stackOptions);\n  const {y1, y = y1, x} = options;\n  const [transform, Y, X] = stack(y, x, \"y\", \"x\", stackOptions, options);\n  return {...transform, y1, y: Y, x: X};\n}\n\nexport function stackX2(stackOptions = {}, options = {}) {\n  if (arguments.length === 1) [stackOptions, options] = mergeOptions(stackOptions);\n  const {y1, y = y1, x} = options;\n  const [transform, Y, , X] = stack(y, x, \"y\", \"x\", stackOptions, options);\n  return {...transform, y1, y: Y, x: X};\n}\n\nexport function stackY(stackOptions = {}, options = {}) {\n  if (arguments.length === 1) [stackOptions, options] = mergeOptions(stackOptions);\n  const {x1, x = x1, y, ...rest} = options; // note: consumes y!\n  const [transform, X, y1, y2] = stack(x, y, \"x\", \"y\", stackOptions, rest);\n  return {...transform, x1, x: X, y1, y2, y: mid(y1, y2)};\n}\n\nexport function stackY1(stackOptions = {}, options = {}) {\n  if (arguments.length === 1) [stackOptions, options] = mergeOptions(stackOptions);\n  const {x1, x = x1, y} = options;\n  const [transform, X, Y] = stack(x, y, \"x\", \"y\", stackOptions, options);\n  return {...transform, x1, x: X, y: Y};\n}\n\nexport function stackY2(stackOptions = {}, options = {}) {\n  if (arguments.length === 1) [stackOptions, options] = mergeOptions(stackOptions);\n  const {x1, x = x1, y} = options;\n  const [transform, X, , Y] = stack(x, y, \"x\", \"y\", stackOptions, options);\n  return {...transform, x1, x: X, y: Y};\n}\n\nexport function maybeStackX({x, x1, x2, ...options} = {}) {\n  options = withTip(options, \"y\");\n  if (x1 === undefined && x2 === undefined) return stackX({x, ...options});\n  [x1, x2] = maybeZero(x, x1, x2);\n  return {...options, x1, x2};\n}\n\nexport function maybeStackY({y, y1, y2, ...options} = {}) {\n  options = withTip(options, \"x\");\n  if (y1 === undefined && y2 === undefined) return stackY({y, ...options});\n  [y1, y2] = maybeZero(y, y1, y2);\n  return {...options, y1, y2};\n}\n\n// The reverse option is ambiguous: it is both a stack option and a basic\n// transform. If only one options object is specified, we interpret it as a\n// stack option, and therefore must remove it from the propagated options.\nfunction mergeOptions(options) {\n  const {offset, order, reverse, ...rest} = options;\n  return [{offset, order, reverse}, rest];\n}\n\n// This is a hint to the tooltip mark that the y1 and y2 channels (for stackY,\n// or conversely x1 and x2 for stackX) represent a stacked length, and that the\n// tooltip should therefore show y2-y1 instead of an extent.\nconst lengthy = {length: true};\n\nfunction stack(x, y = one, kx, ky, {offset, order, reverse}, options) {\n  const z = maybeZ(options);\n  const [X, setX] = maybeColumn(x);\n  const [Y1, setY1] = column(y);\n  const [Y2, setY2] = column(y);\n  Y1.hint = Y2.hint = lengthy;\n  offset = maybeOffset(offset);\n  order = maybeOrder(order, offset, ky);\n  return [\n    basic(options, (data, facets, plotOptions) => {\n      const X = x == null ? undefined : setX(maybeApplyInterval(valueof(data, x), plotOptions?.[kx]));\n      const Y = valueof(data, y, Float64Array);\n      const Z = valueof(data, z);\n      const compare = order && order(data, X, Y, Z);\n      const n = data.length;\n      const Y1 = setY1(new Float64Array(n));\n      const Y2 = setY2(new Float64Array(n));\n      const facetstacks = [];\n      for (const facet of facets) {\n        const stacks = X ? Array.from(group(facet, (i) => X[i]).values()) : [facet];\n        if (compare) for (const stack of stacks) stack.sort(compare);\n        for (const stack of stacks) {\n          let yn = 0;\n          let yp = 0;\n          if (reverse) stack.reverse();\n          for (const i of stack) {\n            const y = Y[i];\n            if (y < 0) yn = Y2[i] = (Y1[i] = yn) + y;\n            else if (y > 0) yp = Y2[i] = (Y1[i] = yp) + y;\n            else Y2[i] = Y1[i] = yp; // NaN or zero\n          }\n        }\n        facetstacks.push(stacks);\n      }\n      if (offset) offset(facetstacks, Y1, Y2, Z);\n      return {data, facets};\n    }),\n    X,\n    Y1,\n    Y2\n  ];\n}\n\nfunction maybeOffset(offset) {\n  if (offset == null) return;\n  if (typeof offset === \"function\") return offset;\n  switch (`${offset}`.toLowerCase()) {\n    case \"expand\":\n    case \"normalize\":\n      return offsetExpand;\n    case \"center\":\n    case \"silhouette\":\n      return offsetCenter;\n    case \"wiggle\":\n      return offsetWiggle;\n  }\n  throw new Error(`unknown offset: ${offset}`);\n}\n\n// Given a single stack, returns the minimum and maximum values from the given\n// Y2 column. Note that this relies on Y2 always being the outer column for\n// diverging values.\nfunction extent(stack, Y2) {\n  let min = 0,\n    max = 0;\n  for (const i of stack) {\n    const y = Y2[i];\n    if (y < min) min = y;\n    if (y > max) max = y;\n  }\n  return [min, max];\n}\n\nfunction offsetExpand(facetstacks, Y1, Y2) {\n  for (const stacks of facetstacks) {\n    for (const stack of stacks) {\n      const [yn, yp] = extent(stack, Y2);\n      for (const i of stack) {\n        const m = 1 / (yp - yn || 1);\n        Y1[i] = m * (Y1[i] - yn);\n        Y2[i] = m * (Y2[i] - yn);\n      }\n    }\n  }\n}\n\nfunction offsetCenter(facetstacks, Y1, Y2) {\n  for (const stacks of facetstacks) {\n    for (const stack of stacks) {\n      const [yn, yp] = extent(stack, Y2);\n      for (const i of stack) {\n        const m = (yp + yn) / 2;\n        Y1[i] -= m;\n        Y2[i] -= m;\n      }\n    }\n    offsetZero(stacks, Y1, Y2);\n  }\n  offsetCenterFacets(facetstacks, Y1, Y2);\n}\n\nfunction offsetWiggle(facetstacks, Y1, Y2, Z) {\n  for (const stacks of facetstacks) {\n    const prev = new InternMap();\n    let y = 0;\n    for (const stack of stacks) {\n      let j = -1;\n      const Fi = stack.map((i) => Math.abs(Y2[i] - Y1[i]));\n      const Df = stack.map((i) => {\n        j = Z ? Z[i] : ++j;\n        const value = Y2[i] - Y1[i];\n        const diff = prev.has(j) ? value - prev.get(j) : 0;\n        prev.set(j, value);\n        return diff;\n      });\n      const Cf1 = [0, ...cumsum(Df)];\n      for (const i of stack) {\n        Y1[i] += y;\n        Y2[i] += y;\n      }\n      const s1 = sum(Fi);\n      if (s1) y -= sum(Fi, (d, i) => (Df[i] / 2 + Cf1[i]) * d) / s1;\n    }\n    offsetZero(stacks, Y1, Y2);\n  }\n  offsetCenterFacets(facetstacks, Y1, Y2);\n}\n\nfunction offsetZero(stacks, Y1, Y2) {\n  const m = min(stacks, (stack) => min(stack, (i) => Y1[i]));\n  for (const stack of stacks) {\n    for (const i of stack) {\n      Y1[i] -= m;\n      Y2[i] -= m;\n    }\n  }\n}\n\nfunction offsetCenterFacets(facetstacks, Y1, Y2) {\n  const n = facetstacks.length;\n  if (n === 1) return;\n  const facets = facetstacks.map((stacks) => stacks.flat());\n  const m = facets.map((I) => (min(I, (i) => Y1[i]) + max(I, (i) => Y2[i])) / 2);\n  const m0 = min(m);\n  for (let j = 0; j < n; j++) {\n    const p = m0 - m[j];\n    for (const i of facets[j]) {\n      Y1[i] += p;\n      Y2[i] += p;\n    }\n  }\n}\n\nfunction maybeOrder(order, offset, ky) {\n  if (order === undefined && offset === offsetWiggle) return orderInsideOut(ascendingDefined);\n  if (order == null) return;\n  if (typeof order === \"string\") {\n    const negate = order.startsWith(\"-\");\n    const compare = negate ? descendingDefined : ascendingDefined;\n    switch ((negate ? order.slice(1) : order).toLowerCase()) {\n      case \"value\":\n      case ky:\n        return orderY(compare);\n      case \"z\":\n        return orderZ(compare);\n      case \"sum\":\n        return orderSum(compare);\n      case \"appearance\":\n        return orderAppearance(compare);\n      case \"inside-out\":\n        return orderInsideOut(compare);\n    }\n    return orderAccessor(field(order));\n  }\n  if (typeof order === \"function\") return (order.length === 1 ? orderAccessor : orderComparator)(order);\n  if (Array.isArray(order)) return orderGiven(order);\n  throw new Error(`invalid order: ${order}`);\n}\n\n// by value\nfunction orderY(compare) {\n  return (data, X, Y) => (i, j) => compare(Y[i], Y[j]);\n}\n\n// by location\nfunction orderZ(compare) {\n  return (data, X, Y, Z) => (i, j) => compare(Z[i], Z[j]);\n}\n\n// by sum of value (a.k.a. \u201Cascending\u201D)\nfunction orderSum(compare) {\n  return orderZDomain(compare, (data, X, Y, Z) =>\n    groupSort(\n      range(data),\n      (I) => sum(I, (i) => Y[i]),\n      (i) => Z[i]\n    )\n  );\n}\n\n// by x = argmax of value\nfunction orderAppearance(compare) {\n  return orderZDomain(compare, (data, X, Y, Z) =>\n    groupSort(\n      range(data),\n      (I) => X[greatest(I, (i) => Y[i])],\n      (i) => Z[i]\n    )\n  );\n}\n\n// by x = argmax of value, but rearranged inside-out by alternating series\n// according to the sign of a running divergence of sums\nfunction orderInsideOut(compare) {\n  return orderZDomain(compare, (data, X, Y, Z) => {\n    const I = range(data);\n    const K = groupSort(\n      I,\n      (I) => X[greatest(I, (i) => Y[i])],\n      (i) => Z[i]\n    );\n    const sums = rollup(\n      I,\n      (I) => sum(I, (i) => Y[i]),\n      (i) => Z[i]\n    );\n    const Kp = [],\n      Kn = [];\n    let s = 0;\n    for (const k of K) {\n      if (s < 0) {\n        s += sums.get(k);\n        Kp.push(k);\n      } else {\n        s -= sums.get(k);\n        Kn.push(k);\n      }\n    }\n    return Kn.reverse().concat(Kp);\n  });\n}\n\nfunction orderAccessor(f) {\n  return (data) => {\n    const O = valueof(data, f);\n    return (i, j) => ascendingDefined(O[i], O[j]);\n  };\n}\n\nfunction orderComparator(f) {\n  return (data) => (i, j) => f(data[i], data[j]);\n}\n\nfunction orderGiven(domain) {\n  return orderZDomain(ascendingDefined, () => domain);\n}\n\n// Given an ordering (domain) of distinct values in z that can be derived from\n// the data, returns a comparator that can be used to sort stacks. Note that\n// this is a series order: it will be consistent across stacks.\nfunction orderZDomain(compare, domain) {\n  return (data, X, Y, Z) => {\n    if (!Z) throw new Error(\"missing channel: z\");\n    const map = new InternMap(domain(data, X, Y, Z).map((d, i) => [d, i]));\n    return (i, j) => compare(map.get(Z[i]), map.get(Z[j]));\n  };\n}\n", "import {create} from \"../context.js\";\nimport {Mark} from \"../mark.js\";\nimport {hasXY, identity, indexOf, number} from \"../options.js\";\nimport {isCollapsed} from \"../scales.js\";\nimport {applyAttr, applyChannelStyles, applyDirectStyles, applyIndirectStyles, applyTransform} from \"../style.js\";\nimport {impliedString} from \"../style.js\";\nimport {maybeIdentityX, maybeIdentityY} from \"../transforms/identity.js\";\nimport {maybeIntervalX, maybeIntervalY} from \"../transforms/interval.js\";\nimport {maybeStackX, maybeStackY} from \"../transforms/stack.js\";\n\nexport class AbstractBar extends Mark {\n  constructor(data, channels, options = {}, defaults) {\n    super(data, channels, options, defaults);\n    const {inset = 0, insetTop = inset, insetRight = inset, insetBottom = inset, insetLeft = inset, rx, ry} = options;\n    this.insetTop = number(insetTop);\n    this.insetRight = number(insetRight);\n    this.insetBottom = number(insetBottom);\n    this.insetLeft = number(insetLeft);\n    this.rx = impliedString(rx, \"auto\"); // number or percentage\n    this.ry = impliedString(ry, \"auto\");\n  }\n  render(index, scales, channels, dimensions, context) {\n    const {rx, ry} = this;\n    return create(\"svg:g\", context)\n      .call(applyIndirectStyles, this, dimensions, context)\n      .call(this._transform, this, scales)\n      .call((g) =>\n        g\n          .selectAll()\n          .data(index)\n          .enter()\n          .append(\"rect\")\n          .call(applyDirectStyles, this)\n          .attr(\"x\", this._x(scales, channels, dimensions))\n          .attr(\"width\", this._width(scales, channels, dimensions))\n          .attr(\"y\", this._y(scales, channels, dimensions))\n          .attr(\"height\", this._height(scales, channels, dimensions))\n          .call(applyAttr, \"rx\", rx)\n          .call(applyAttr, \"ry\", ry)\n          .call(applyChannelStyles, this, channels)\n      )\n      .node();\n  }\n  _x(scales, {x: X}, {marginLeft}) {\n    const {insetLeft} = this;\n    return X ? (i) => X[i] + insetLeft : marginLeft + insetLeft;\n  }\n  _y(scales, {y: Y}, {marginTop}) {\n    const {insetTop} = this;\n    return Y ? (i) => Y[i] + insetTop : marginTop + insetTop;\n  }\n  _width({x}, {x: X}, {marginRight, marginLeft, width}) {\n    const {insetLeft, insetRight} = this;\n    const bandwidth = X && x ? x.bandwidth() : width - marginRight - marginLeft;\n    return Math.max(0, bandwidth - insetLeft - insetRight);\n  }\n  _height({y}, {y: Y}, {marginTop, marginBottom, height}) {\n    const {insetTop, insetBottom} = this;\n    const bandwidth = Y && y ? y.bandwidth() : height - marginTop - marginBottom;\n    return Math.max(0, bandwidth - insetTop - insetBottom);\n  }\n}\n\nconst defaults = {\n  ariaLabel: \"bar\"\n};\n\nexport class BarX extends AbstractBar {\n  constructor(data, options = {}) {\n    const {x1, x2, y} = options;\n    super(\n      data,\n      {\n        x1: {value: x1, scale: \"x\"},\n        x2: {value: x2, scale: \"x\"},\n        y: {value: y, scale: \"y\", type: \"band\", optional: true}\n      },\n      options,\n      defaults\n    );\n  }\n  _transform(selection, mark, {x}) {\n    selection.call(applyTransform, mark, {x}, 0, 0);\n  }\n  _x({x}, {x1: X1, x2: X2}, {marginLeft}) {\n    const {insetLeft} = this;\n    return isCollapsed(x) ? marginLeft + insetLeft : (i) => Math.min(X1[i], X2[i]) + insetLeft;\n  }\n  _width({x}, {x1: X1, x2: X2}, {marginRight, marginLeft, width}) {\n    const {insetLeft, insetRight} = this;\n    return isCollapsed(x)\n      ? width - marginRight - marginLeft - insetLeft - insetRight\n      : (i) => Math.max(0, Math.abs(X2[i] - X1[i]) - insetLeft - insetRight);\n  }\n}\n\nexport class BarY extends AbstractBar {\n  constructor(data, options = {}) {\n    const {x, y1, y2} = options;\n    super(\n      data,\n      {\n        y1: {value: y1, scale: \"y\"},\n        y2: {value: y2, scale: \"y\"},\n        x: {value: x, scale: \"x\", type: \"band\", optional: true}\n      },\n      options,\n      defaults\n    );\n  }\n  _transform(selection, mark, {y}) {\n    selection.call(applyTransform, mark, {y}, 0, 0);\n  }\n  _y({y}, {y1: Y1, y2: Y2}, {marginTop}) {\n    const {insetTop} = this;\n    return isCollapsed(y) ? marginTop + insetTop : (i) => Math.min(Y1[i], Y2[i]) + insetTop;\n  }\n  _height({y}, {y1: Y1, y2: Y2}, {marginTop, marginBottom, height}) {\n    const {insetTop, insetBottom} = this;\n    return isCollapsed(y)\n      ? height - marginTop - marginBottom - insetTop - insetBottom\n      : (i) => Math.max(0, Math.abs(Y2[i] - Y1[i]) - insetTop - insetBottom);\n  }\n}\n\nexport function barX(data, options = {}) {\n  if (!hasXY(options)) options = {...options, y: indexOf, x2: identity};\n  return new BarX(data, maybeStackX(maybeIntervalX(maybeIdentityX(options))));\n}\n\nexport function barY(data, options = {}) {\n  if (!hasXY(options)) options = {...options, x: indexOf, y2: identity};\n  return new BarY(data, maybeStackY(maybeIntervalY(maybeIdentityY(options))));\n}\n", "/**\n * @license\n * Copyright 2024 The Go Authors. All rights reserved.\n * Use of this source code is governed by a BSD-style\n * license that can be found in the LICENSE file.\n */\n\n/**\n * A treeNavController adds dynamic expansion and selection of index list\n * elements based on scroll position.\n *\n * Use it as follows:\n *  - Add the .js-Tree class to a parent element of your index and content.\n *  - Add the .js-Tree-item class to <li> elements of your index.\n *  - Add the .js-Tree-heading class to <hN> heading elements of your content.\n *\n * Then, when you scroll content, the 'aria-selected' and 'aria-expanded'\n * attributes of your tree items will be set according to the current content\n * scroll position. The included treenav.css implements styling to expand and\n * highlight index elements according to these attributes.\n */\nexport function treeNavController(el: HTMLElement) {\n  const headings = el.querySelectorAll<HTMLHeadingElement>(\".js-Tree-heading\");\n  const callback = () => {\n    // Collect heading elements above the scroll position.\n    let above: HTMLHeadingElement[] = [];\n    for (const h of headings) {\n      const rect = h.getBoundingClientRect();\n      if (rect.height && rect.top < 80) {\n        above.unshift(h);\n      }\n    }\n    // Highlight the first heading even if we're not yet scrolled below it.\n    if (above.length == 0 && headings[0] instanceof HTMLHeadingElement) {\n      above = [headings[0]];\n    }\n    // Collect the set of heading levels we're immediately below, at most one\n    // per heading level, by decresing level.\n    // e.g. [<h3 element>, <h2 element>, <h1 element>]\n    let threshold = Infinity;\n    const active: HTMLHeadingElement[] = [];\n    for (const h of above) {\n      const level = Number(h.tagName[1]);\n      if (level < threshold) {\n        threshold = level;\n        active.push(h);\n      }\n    }\n    // Update aria-selected and aria-expanded for all items, per the current\n    // position.\n    const navItems = el.querySelectorAll<HTMLElement>(\".js-Tree-item\");\n    for (const item of navItems) {\n      const headingId = item.dataset[\"headingId\"];\n      let selected = false,\n        expanded = false;\n      for (const h of active) {\n        if (h.id === headingId) {\n          if (h === active[0]) {\n            selected = true;\n          } else {\n            expanded = true;\n          }\n          break;\n        }\n      }\n      item.setAttribute(\"aria-selected\", selected ? \"true\" : \"false\");\n      item.setAttribute(\"aria-expanded\", expanded ? \"true\" : \"false\");\n    }\n  };\n\n  // Update on changes to viewport intersection, defensively debouncing to\n  // guard against performance issues.\n  const observer = new IntersectionObserver(debounce(callback, 20));\n  for (const h of headings) {\n    observer.observe(h);\n  }\n}\n\nexport function debounce<T extends (...args: unknown[]) => unknown>(\n  callback: T,\n  wait: number\n) {\n  let timeout: number;\n  return (...args: unknown[]) => {\n    clearTimeout(timeout);\n    timeout = setTimeout(() => callback(...args), wait);\n  };\n}\n", "/**\n * @license\n * Copyright 2023 The Go Authors. All rights reserved.\n * Use of this source code is governed by a BSD-style\n * license that can be found in the LICENSE file.\n */\n\ninterface Page {\n  Charts: ChartData | null;\n}\n\ninterface ChartData {\n  Programs: Program[] | null;\n}\n\ninterface Program {\n  ID: string;\n  Name: string;\n  Charts: Chart[] | null;\n}\n\ninterface Chart {\n  ID: string;\n  Name: string;\n  Type: string;\n  Data: Datum[] | null;\n}\n\ninterface Datum {\n  Key: string;\n  Value: number;\n}\n\ndeclare const Page: Page;\n\nimport * as d3 from \"d3\";\nimport * as Plot from \"@observablehq/plot\";\nimport { treeNavController } from \"../shared/treenav\";\n\nfor (const program of Page.Charts?.Programs || []) {\n  for (const counter of program?.Charts || []) {\n    switch (counter.Type) {\n      case \"partition\":\n        document\n          .querySelector(`[data-chart-id=\"${counter.ID}\"]`)\n          ?.append(partition(counter));\n\n        break;\n      case \"histogram\":\n        document\n          .querySelector(`[data-chart-id=\"${counter.ID}\"]`)\n          ?.append(histogram(counter));\n\n        break;\n      default:\n        console.error(\"unknown chart type\");\n        break;\n    }\n  }\n}\n\nfor (const el of document.querySelectorAll<HTMLElement>(\".js-Tree\")) {\n  treeNavController(el);\n}\n\nfunction partition({ Data, Name }: Chart) {\n  Data ??= [];\n\n  const max = Data.map((d) => d.Value).reduce((a, b) => Math.max(a, b), 0);\n\n  return Plot.plot({\n    color: {\n      type: \"ordinal\",\n      scheme: \"Spectral\",\n    },\n    nice: true,\n    x: {\n      label: Name,\n      labelOffset: Number.MAX_SAFE_INTEGER,\n      tickRotate: 45,\n      domain: Data.map((d) => d.Key),\n    },\n    y: {\n      label: \"Count\",\n      domain: [0, max + 1], // adjust domain to prevent rendering issues, especially with all-zero data.\n    },\n    width: 1024,\n    style: \"overflow:visible;background:transparent;margin-bottom:3rem;\",\n    marks: [\n      Plot.barY(Data, {\n        tip: true,\n        fill: (d) => (isNaN(Number(d.Key)) ? d.Key : Number(d.Key)),\n        x: (d) => d.Key,\n        y: (d) => d.Value,\n      }),\n      Plot.frame(),\n    ],\n  });\n}\n\nfunction histogram({ Data }: Chart) {\n  Data ??= [];\n  const n = 3; // number of facet columns\n  const fixKey = (k: string) => (isNaN(Number(k)) ? k : Number(k));\n  const keys = Array.from(d3.union(Data.map((d) => fixKey(d.Key))));\n  const index = new Map(keys.map((key, i) => [key, i]));\n  const fx = (key: string | number) => (index.get(key) ?? 0) % n;\n  const fy = (key: string | number) => Math.floor((index.get(key) ?? 0) / n);\n\n  return Plot.plot({\n    marginLeft: 60,\n    width: 1024,\n    grid: true,\n    nice: true,\n    x: {\n      label: \"Distribution\",\n    },\n    color: {\n      type: \"ordinal\",\n      legend: true,\n      scheme: \"Spectral\",\n      label: \"Counter\",\n    },\n    y: {\n      insetTop: 16,\n      domain: [0, 1],\n    },\n    fx: {\n      ticks: [],\n    },\n    fy: {\n      ticks: [],\n    },\n    style: \"background:transparent;\",\n    marks: [\n      Plot.barY(\n        Data,\n        Plot.binX(\n          { y: \"proportion-facet\", x: \"x1\", interval: 0.1, cumulative: 1 },\n          {\n            tip: true,\n            fill: (d: Datum) => fixKey(d.Key),\n            x: (d: Datum) => d.Value,\n            fx: (d: Datum) => fx(fixKey(d.Key)),\n            fy: (d: Datum) => fy(fixKey(d.Key)),\n          }\n        )\n      ),\n      Plot.text(keys, {\n        frameAnchor: \"top\",\n        dy: 3,\n        fx,\n        fy,\n      }),\n      Plot.axisX({ anchor: \"bottom\", tickSpacing: 35 }),\n      Plot.axisX({ anchor: \"top\", tickSpacing: 35 }),\n      Plot.frame(),\n    ],\n  });\n}\n\nexport {};\n"],
+  "mappings": ";mBAAe,SAARA,GAA2BC,EAAGC,EAAG,CACtC,OAAOD,GAAK,MAAQC,GAAK,KAAO,IAAMD,EAAIC,EAAI,GAAKD,EAAIC,EAAI,EAAID,GAAKC,EAAI,EAAI,GAC9E,CCFe,SAARC,GAA4BC,EAAGC,EAAG,CACvC,OAAOD,GAAK,MAAQC,GAAK,KAAO,IAC5BA,EAAID,EAAI,GACRC,EAAID,EAAI,EACRC,GAAKD,EAAI,EACT,GACN,CCHe,SAARE,GAA0BC,EAAG,CAClC,IAAIC,EAAUC,EAAUC,EAOpBH,EAAE,SAAW,GACfC,EAAWG,GACXF,EAAW,CAACG,EAAGC,IAAMF,GAAUJ,EAAEK,CAAC,EAAGC,CAAC,EACtCH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,EAEzE,OAAYH,GAAK,CACf,WAAY,GACZ,MAAO,KACP,KAAM,GACN,KAAM,GACN,EAAG,CACD,MAAO,cACT,EACA,MAAO,CACL,KAAM,UACN,OAAQ,GACR,OAAQ,WACR,MAAO,SACT,EACA,EAAG,CACD,SAAU,GACV,OAAQ,CAAC,EAAG,CAAC,CACf,EACA,GAAI,CACF,MAAO,CAAC,CACV,EACA,GAAI,CACF,MAAO,CAAC,CACV,EACA,MAAO,0BACP,MAAO,CACAC,GACHP,EACKmB,GACH,CAAE,EAAG,mBAAoB,EAAG,KAAM,SAAU,GAAK,WAAY,CAAE,EAC/D,CACE,IAAK,GACL,KAAOhB,GAAaO,EAAOP,EAAE,GAAG,EAChC,EAAIA,GAAaA,EAAE,MACnB,GAAKA,GAAac,EAAGP,EAAOP,EAAE,GAAG,CAAC,EAClC,GAAKA,GAAae,EAAGR,EAAOP,EAAE,GAAG,CAAC,CACpC,CACF,CACF,EACKiB,GAAKR,EAAM,CACd,YAAa,MACb,GAAI,EACJ,GAAAK,EACA,GAAAC,CACF,CAAC,EACIG,GAAM,CAAE,OAAQ,SAAU,YAAa,EAAG,CAAC,EAC3CA,GAAM,CAAE,OAAQ,MAAO,YAAa,EAAG,CAAC,EACxCb,GAAM,CACb,CACF,CAAC,CACH",
+  "names": ["ascending", "a", "b", "descending", "a", "b", "bisector", "f", "compare1", "compare2", "delta", "ascending", "d", "x", "descending", "zero", "left", "a", "lo", "hi", "mid", "right", "center", "i", "number", "x", "numbers", "values", "valueof", "value", "index", "ascendingBisect", "bisector", "ascending", "bisectRight", "bisectLeft", "bisectCenter", "number", "bisect_default", "count", "values", "valueof", "value", "index", "length", "array", "empty", "arrayify", "values", "reducer", "reduce", "cross", "lengths", "j", "index", "product", "i", "cumsum", "values", "valueof", "sum", "index", "v", "variance", "values", "valueof", "count", "delta", "mean", "sum", "value", "index", "deviation", "values", "valueof", "v", "variance", "extent", "values", "valueof", "min", "max", "value", "index", "Adder", "x", "p", "i", "j", "y", "hi", "lo", "InternMap", "entries", "key", "keyof", "value", "intern_get", "intern_set", "intern_delete", "InternSet", "values", "_intern", "_key", "identity", "x", "group", "values", "keys", "nest", "identity", "rollup", "values", "reduce", "keys", "nest", "identity", "rollups", "nest", "values", "map", "reduce", "keys", "regroup", "i", "groups", "InternMap", "keyof", "index", "value", "key", "group", "permute", "source", "keys", "key", "sort", "values", "F", "f", "index", "d", "i", "j", "c", "ascendingDefined", "permute", "compareDefined", "compare", "ascending", "a", "b", "x", "groupSort", "values", "reduce", "key", "sort", "rollup", "ak", "av", "bk", "bv", "ascending", "group", "e10", "e5", "e2", "tickSpec", "start", "stop", "count", "step", "power", "error", "factor", "i1", "i2", "inc", "ticks", "reverse", "n", "i", "tickIncrement", "tickStep", "thresholdSturges", "values", "count", "max", "values", "valueof", "value", "index", "maxIndex", "values", "valueof", "max", "index", "value", "min", "values", "valueof", "value", "index", "minIndex", "values", "valueof", "min", "index", "value", "quickselect", "array", "k", "left", "right", "compare", "ascendingDefined", "compareDefined", "n", "m", "z", "s", "sd", "newLeft", "newRight", "t", "i", "j", "swap", "greatest", "values", "compare", "ascending", "max", "defined", "maxValue", "element", "value", "quantile", "values", "p", "valueof", "numbers", "n", "min", "max", "i", "i0", "value0", "quickselect", "value1", "quantileSorted", "number", "thresholdFreedmanDiaconis", "values", "min", "max", "c", "count", "d", "quantile", "thresholdScott", "values", "min", "max", "c", "count", "d", "deviation", "mean", "values", "valueof", "count", "sum", "value", "index", "median", "values", "valueof", "quantile", "flatten", "arrays", "array", "merge", "mode", "values", "valueof", "counts", "InternMap", "value", "index", "modeValue", "modeCount", "count", "pairs", "values", "pairof", "pair", "previous", "first", "value", "a", "b", "range", "start", "stop", "step", "n", "i", "sum", "values", "valueof", "value", "index", "reverse", "values", "union", "others", "set", "InternSet", "other", "o", "identity_default", "x", "top", "right", "bottom", "left", "epsilon", "translateX", "x", "translateY", "y", "number", "scale", "d", "center", "offset", "entering", "axis", "orient", "tickArguments", "tickValues", "tickFormat", "tickSizeInner", "tickSizeOuter", "tickPadding", "k", "transform", "context", "values", "format", "identity_default", "spacing", "range", "range0", "range1", "position", "selection", "path", "tick", "tickExit", "tickEnter", "line", "text", "p", "_", "axisBottom", "scale", "axis", "bottom", "noop", "dispatch", "i", "n", "_", "t", "Dispatch", "parseTypenames", "typenames", "types", "name", "typename", "callback", "T", "get", "set", "copy", "type", "that", "args", "c", "dispatch_default", "xhtml", "namespaces_default", "namespace_default", "name", "prefix", "i", "namespaces_default", "creatorInherit", "name", "document", "uri", "xhtml", "creatorFixed", "fullname", "creator_default", "namespace_default", "none", "selector_default", "selector", "select_default", "select", "selector_default", "groups", "m", "subgroups", "j", "group", "n", "subgroup", "node", "subnode", "i", "Selection", "array", "x", "empty", "selectorAll_default", "selector", "arrayAll", "select", "array", "selectAll_default", "selectorAll_default", "groups", "m", "subgroups", "parents", "j", "group", "n", "node", "i", "Selection", "matcher_default", "selector", "childMatcher", "node", "find", "childFind", "match", "childFirst", "selectChild_default", "childMatcher", "filter", "children", "childrenFilter", "match", "selectChildren_default", "childMatcher", "filter_default", "match", "matcher_default", "groups", "m", "subgroups", "j", "group", "n", "subgroup", "node", "i", "Selection", "sparse_default", "update", "enter_default", "Selection", "sparse_default", "EnterNode", "parent", "datum", "child", "next", "selector", "constant_default", "x", "bindIndex", "parent", "group", "enter", "update", "exit", "data", "i", "node", "groupLength", "dataLength", "EnterNode", "bindKey", "key", "nodeByKeyValue", "keyValues", "keyValue", "datum", "data_default", "value", "bind", "parents", "groups", "constant_default", "m", "j", "arraylike", "enterGroup", "updateGroup", "exitGroup", "i0", "i1", "previous", "next", "Selection", "exit_default", "Selection", "sparse_default", "join_default", "onenter", "onupdate", "onexit", "enter", "update", "exit", "merge_default", "context", "selection", "groups0", "groups1", "m0", "m1", "m", "merges", "j", "group0", "group1", "n", "merge", "node", "i", "Selection", "order_default", "groups", "j", "m", "group", "i", "next", "node", "sort_default", "compare", "ascending", "compareNode", "a", "b", "groups", "m", "sortgroups", "j", "group", "n", "sortgroup", "node", "i", "Selection", "call_default", "callback", "nodes_default", "node_default", "groups", "j", "m", "group", "i", "n", "node", "size_default", "size", "node", "empty_default", "each_default", "callback", "groups", "j", "m", "group", "n", "node", "attrRemove", "name", "attrRemoveNS", "fullname", "attrConstant", "value", "attrConstantNS", "attrFunction", "v", "attrFunctionNS", "attr_default", "namespace_default", "node", "window_default", "node", "styleRemove", "name", "styleConstant", "value", "priority", "styleFunction", "v", "style_default", "styleValue", "node", "window_default", "propertyRemove", "name", "propertyConstant", "value", "propertyFunction", "v", "property_default", "classArray", "string", "classList", "node", "ClassList", "name", "i", "classedAdd", "names", "list", "n", "classedRemove", "classedTrue", "classedFalse", "classedFunction", "value", "classed_default", "textRemove", "textConstant", "value", "textFunction", "v", "text_default", "htmlRemove", "htmlConstant", "value", "htmlFunction", "v", "html_default", "raise", "raise_default", "lower", "lower_default", "append_default", "name", "create", "creator_default", "constantNull", "insert_default", "name", "before", "create", "creator_default", "select", "selector_default", "remove", "parent", "remove_default", "selection_cloneShallow", "clone", "parent", "selection_cloneDeep", "clone_default", "deep", "datum_default", "value", "contextListener", "listener", "event", "parseTypenames", "typenames", "t", "name", "i", "onRemove", "typename", "on", "j", "m", "o", "onAdd", "value", "options", "on_default", "n", "dispatchEvent", "node", "type", "params", "window", "window_default", "event", "dispatchConstant", "dispatchFunction", "dispatch_default", "iterator_default", "groups", "j", "m", "group", "i", "n", "node", "root", "Selection", "groups", "parents", "selection", "selection_selection", "select_default", "selectAll_default", "selectChild_default", "selectChildren_default", "filter_default", "data_default", "enter_default", "exit_default", "join_default", "merge_default", "order_default", "sort_default", "call_default", "nodes_default", "node_default", "size_default", "empty_default", "each_default", "attr_default", "style_default", "property_default", "classed_default", "text_default", "html_default", "raise_default", "lower_default", "append_default", "insert_default", "remove_default", "clone_default", "datum_default", "on_default", "dispatch_default", "iterator_default", "selection_default", "select_default", "selector", "Selection", "root", "sourceEvent_default", "event", "sourceEvent", "pointer_default", "event", "node", "sourceEvent_default", "svg", "point", "rect", "define_default", "constructor", "factory", "prototype", "extend", "parent", "definition", "key", "Color", "darker", "brighter", "reI", "reN", "reP", "reHex", "reRgbInteger", "reRgbPercent", "reRgbaInteger", "reRgbaPercent", "reHslPercent", "reHslaPercent", "named", "define_default", "color", "channels", "color_formatHex", "color_formatHex8", "color_formatHsl", "color_formatRgb", "hslConvert", "format", "m", "l", "rgbn", "Rgb", "rgba", "hsla", "n", "r", "g", "b", "a", "rgbConvert", "o", "rgb", "opacity", "extend", "k", "clampi", "clampa", "rgb_formatHex", "rgb_formatHex8", "rgb_formatRgb", "hex", "value", "h", "s", "Hsl", "min", "max", "hsl", "m2", "m1", "hsl2rgb", "clamph", "clampt", "radians", "degrees", "K", "Xn", "Yn", "Zn", "t0", "t1", "t2", "t3", "labConvert", "o", "Lab", "Hcl", "hcl2lab", "Rgb", "rgbConvert", "r", "rgb2lrgb", "g", "b", "y", "xyz2lab", "x", "z", "lab", "l", "a", "b", "opacity", "labConvert", "Lab", "define_default", "extend", "Color", "k", "K", "y", "x", "z", "Xn", "lab2xyz", "Yn", "Zn", "Rgb", "lrgb2rgb", "xyz2lab", "t3", "t2", "t0", "t1", "rgb2lrgb", "hclConvert", "o", "Hcl", "h", "degrees", "hcl", "h", "c", "l", "opacity", "hclConvert", "Hcl", "hcl2lab", "o", "Lab", "radians", "define_default", "extend", "Color", "k", "K", "A", "B", "C", "D", "E", "ED", "EB", "BC_DA", "cubehelixConvert", "o", "Cubehelix", "Rgb", "rgbConvert", "r", "g", "b", "l", "bl", "k", "s", "h", "degrees", "cubehelix", "opacity", "define_default", "extend", "Color", "brighter", "darker", "radians", "a", "cosh", "sinh", "basis", "t1", "v0", "v1", "v2", "v3", "t2", "t3", "basis_default", "values", "n", "t", "i", "basisClosed_default", "values", "n", "t", "i", "v0", "v1", "v2", "v3", "basis", "constant_default", "x", "linear", "a", "d", "t", "exponential", "b", "y", "hue", "constant_default", "gamma", "nogamma", "rgb_default", "rgbGamma", "y", "color", "gamma", "rgb", "start", "end", "r", "g", "b", "opacity", "nogamma", "t", "rgbSpline", "spline", "colors", "i", "rgbBasis", "basis_default", "rgbBasisClosed", "basisClosed_default", "numberArray_default", "a", "b", "c", "i", "t", "isNumberArray", "x", "genericArray", "a", "b", "nb", "na", "x", "c", "i", "value_default", "t", "date_default", "a", "b", "d", "t", "number_default", "a", "b", "t", "object_default", "a", "b", "i", "c", "k", "value_default", "t", "reA", "reB", "zero", "b", "one", "t", "string_default", "a", "bi", "am", "bm", "bs", "i", "s", "q", "number_default", "o", "value_default", "a", "b", "t", "c", "constant_default", "number_default", "color", "rgb_default", "string_default", "date_default", "isNumberArray", "numberArray_default", "genericArray", "object_default", "round_default", "a", "b", "t", "degrees", "identity", "decompose_default", "a", "b", "c", "d", "e", "f", "scaleX", "scaleY", "skewX", "svgNode", "parseCss", "value", "m", "identity", "decompose_default", "parseSvg", "interpolateTransform", "parse", "pxComma", "pxParen", "degParen", "pop", "s", "translate", "xa", "ya", "xb", "yb", "q", "i", "number_default", "rotate", "a", "b", "skewX", "scale", "t", "n", "o", "interpolateTransformCss", "parseCss", "interpolateTransformSvg", "parseSvg", "hsl", "hue", "start", "end", "h", "s", "nogamma", "l", "opacity", "t", "hsl_default", "hslLong", "lab", "start", "end", "l", "nogamma", "a", "b", "opacity", "t", "hcl", "hue", "start", "end", "h", "c", "nogamma", "l", "opacity", "t", "hcl_default", "hclLong", "cubehelix", "hue", "cubehelixGamma", "y", "start", "end", "h", "s", "nogamma", "l", "opacity", "t", "cubehelix_default", "cubehelixLong", "piecewise", "interpolate", "values", "value_default", "i", "n", "v", "I", "t", "quantize_default", "interpolator", "n", "samples", "i", "frame", "timeout", "interval", "pokeDelay", "taskHead", "taskTail", "clockLast", "clockNow", "clockSkew", "clock", "setFrame", "f", "now", "clearNow", "Timer", "timer", "callback", "delay", "time", "sleep", "t", "timerFlush", "wake", "nap", "poke", "t0", "t1", "t2", "timeout_default", "callback", "delay", "time", "t", "Timer", "elapsed", "emptyOn", "dispatch_default", "emptyTween", "CREATED", "SCHEDULED", "STARTING", "STARTED", "RUNNING", "ENDING", "ENDED", "schedule_default", "node", "name", "id", "index", "group", "timing", "schedules", "create", "init", "schedule", "get", "set", "self", "tween", "timer", "elapsed", "start", "i", "j", "n", "o", "stop", "timeout_default", "tick", "t", "interrupt_default", "node", "name", "schedules", "schedule", "active", "empty", "i", "STARTING", "ENDING", "ENDED", "interrupt_default", "name", "tweenRemove", "id", "name", "tween0", "tween1", "schedule", "set", "tween", "i", "n", "tweenFunction", "value", "t", "tween_default", "get", "tweenValue", "transition", "node", "interpolate_default", "a", "b", "c", "number_default", "color", "rgb_default", "string_default", "attrRemove", "name", "attrRemoveNS", "fullname", "attrConstant", "interpolate", "value1", "string00", "string1", "interpolate0", "string0", "attrConstantNS", "attrFunction", "value", "string10", "attrFunctionNS", "attr_default", "namespace_default", "i", "interpolateTransformSvg", "interpolate_default", "tweenValue", "attrInterpolate", "name", "i", "t", "attrInterpolateNS", "fullname", "attrTweenNS", "value", "t0", "i0", "tween", "attrTween", "attrTween_default", "key", "namespace_default", "delayFunction", "id", "value", "init", "delayConstant", "delay_default", "get", "durationFunction", "id", "value", "set", "durationConstant", "duration_default", "get", "easeConstant", "id", "value", "set", "ease_default", "get", "easeVarying", "id", "value", "v", "set", "easeVarying_default", "filter_default", "match", "matcher_default", "groups", "m", "subgroups", "j", "group", "n", "subgroup", "node", "i", "Transition", "merge_default", "transition", "groups0", "groups1", "m0", "m1", "m", "merges", "j", "group0", "group1", "n", "merge", "node", "i", "Transition", "start", "name", "t", "i", "onFunction", "id", "listener", "on0", "on1", "sit", "init", "set", "schedule", "on", "on_default", "get", "removeFunction", "id", "parent", "i", "remove_default", "select_default", "select", "name", "id", "selector_default", "groups", "m", "subgroups", "j", "group", "n", "subgroup", "node", "subnode", "i", "schedule_default", "get", "Transition", "selectAll_default", "select", "name", "id", "selectorAll_default", "groups", "m", "subgroups", "parents", "j", "group", "n", "node", "i", "children", "child", "inherit", "get", "k", "l", "schedule_default", "Transition", "Selection", "selection_default", "styleNull", "name", "interpolate", "string00", "string10", "interpolate0", "string0", "styleValue", "string1", "styleRemove", "styleConstant", "value1", "styleFunction", "value", "styleMaybeRemove", "id", "on0", "on1", "listener0", "key", "event", "remove", "schedule", "set", "on", "listener", "style_default", "priority", "i", "interpolateTransformCss", "interpolate_default", "tweenValue", "styleInterpolate", "name", "i", "priority", "t", "styleTween", "value", "i0", "tween", "styleTween_default", "key", "textConstant", "value", "textFunction", "value1", "text_default", "tweenValue", "textInterpolate", "i", "t", "textTween", "value", "t0", "i0", "tween", "textTween_default", "key", "transition_default", "name", "id0", "id1", "newId", "groups", "m", "j", "group", "n", "node", "i", "inherit", "get", "schedule_default", "Transition", "end_default", "on0", "on1", "that", "id", "size", "resolve", "reject", "cancel", "end", "schedule", "set", "on", "id", "Transition", "groups", "parents", "name", "transition", "selection_default", "newId", "selection_prototype", "select_default", "selectAll_default", "filter_default", "merge_default", "transition_default", "on_default", "attr_default", "attrTween_default", "style_default", "styleTween_default", "text_default", "textTween_default", "remove_default", "tween_default", "delay_default", "duration_default", "ease_default", "easeVarying_default", "end_default", "cubicInOut", "defaultTiming", "cubicInOut", "inherit", "node", "id", "timing", "transition_default", "name", "Transition", "newId", "now", "groups", "m", "j", "group", "n", "i", "schedule_default", "selection_default", "interrupt_default", "transition_default", "abs", "max", "min", "number1", "e", "number2", "X", "type", "x", "xy", "Y", "y", "XY", "type", "pi", "tau", "epsilon", "tauEpsilon", "append", "strings", "i", "appendRound", "digits", "d", "k", "n", "Path", "x", "y", "x1", "y1", "x2", "y2", "r", "x0", "y0", "x21", "y21", "x01", "y01", "l01_2", "x20", "y20", "l21_2", "l20_2", "l21", "l01", "l", "t01", "t21", "a0", "a1", "ccw", "dx", "dy", "cw", "da", "w", "h", "path", "pathRound", "formatDecimal_default", "x", "formatDecimalParts", "p", "i", "coefficient", "exponent_default", "x", "formatDecimalParts", "formatGroup_default", "grouping", "thousands", "value", "width", "i", "t", "j", "g", "length", "formatNumerals_default", "numerals", "value", "i", "re", "formatSpecifier", "specifier", "match", "FormatSpecifier", "formatTrim_default", "s", "out", "n", "i", "i0", "i1", "prefixExponent", "formatPrefixAuto_default", "x", "p", "d", "formatDecimalParts", "coefficient", "exponent", "n", "formatRounded_default", "x", "p", "d", "formatDecimalParts", "coefficient", "exponent", "formatTypes_default", "x", "p", "formatDecimal_default", "formatRounded_default", "formatPrefixAuto_default", "identity_default", "x", "map", "prefixes", "locale_default", "locale", "group", "identity_default", "formatGroup_default", "currencyPrefix", "currencySuffix", "decimal", "numerals", "formatNumerals_default", "percent", "minus", "nan", "newFormat", "specifier", "formatSpecifier", "fill", "align", "sign", "symbol", "zero", "width", "comma", "precision", "trim", "type", "formatTypes_default", "prefix", "suffix", "formatType", "maybeSuffix", "format", "value", "valuePrefix", "valueSuffix", "i", "n", "c", "valueNegative", "formatTrim_default", "prefixExponent", "length", "padding", "formatPrefix", "f", "e", "exponent_default", "k", "locale", "format", "formatPrefix", "defaultLocale", "definition", "locale_default", "precisionFixed_default", "step", "exponent_default", "precisionPrefix_default", "step", "value", "exponent_default", "precisionRound_default", "step", "max", "exponent_default", "epsilon", "epsilon2", "pi", "halfPi", "quarterPi", "tau", "degrees", "radians", "abs", "atan", "atan2", "cos", "exp", "log", "pow", "sin", "sign", "x", "sqrt", "tan", "acos", "pi", "asin", "halfPi", "noop", "streamGeometry", "geometry", "stream", "streamGeometryType", "streamObjectType", "object", "features", "i", "n", "coordinates", "streamLine", "streamPolygon", "geometries", "closed", "coordinate", "stream_default", "spherical", "cartesian", "atan2", "asin", "lambda", "phi", "cosPhi", "cos", "sin", "cartesianDot", "a", "b", "cartesianCross", "cartesianAddInPlace", "cartesianScale", "vector", "k", "cartesianNormalizeInPlace", "d", "l", "sqrt", "compose_default", "a", "b", "compose", "x", "y", "rotationIdentity", "lambda", "phi", "abs", "pi", "tau", "rotateRadians", "deltaLambda", "deltaPhi", "deltaGamma", "compose_default", "rotationLambda", "rotationPhiGamma", "forwardRotationLambda", "rotation", "cosDeltaPhi", "cos", "sinDeltaPhi", "sin", "cosDeltaGamma", "sinDeltaGamma", "cosPhi", "x", "y", "z", "k", "atan2", "asin", "rotation_default", "rotate", "radians", "forward", "coordinates", "degrees", "circleStream", "stream", "radius", "delta", "direction", "t0", "t1", "cosRadius", "cos", "sinRadius", "sin", "step", "tau", "circleRadius", "point", "t", "spherical", "cartesian", "cartesianNormalizeInPlace", "acos", "epsilon", "buffer_default", "lines", "line", "x", "y", "m", "noop", "result", "pointEqual_default", "a", "b", "abs", "epsilon", "Intersection", "point", "points", "other", "entry", "rejoin_default", "segments", "compareIntersection", "startInside", "interpolate", "stream", "subject", "clip", "i", "n", "segment", "p0", "p1", "pointEqual_default", "epsilon", "link", "start", "current", "isSubject", "array", "a", "b", "longitude", "point", "abs", "pi", "sign", "tau", "polygonContains_default", "polygon", "lambda", "phi", "sinPhi", "sin", "normal", "cos", "angle", "winding", "sum", "Adder", "halfPi", "epsilon", "i", "n", "m", "ring", "point0", "lambda0", "phi0", "quarterPi", "sinPhi0", "cosPhi0", "j", "lambda1", "sinPhi1", "cosPhi1", "point1", "phi1", "delta", "absDelta", "antimeridian", "k", "atan2", "arc", "cartesianCross", "cartesian", "cartesianNormalizeInPlace", "intersection", "phiArc", "asin", "epsilon2", "clip_default", "pointVisible", "clipLine", "interpolate", "start", "sink", "line", "ringBuffer", "buffer_default", "ringSink", "polygonStarted", "polygon", "segments", "ring", "clip", "point", "lineStart", "lineEnd", "pointRing", "ringStart", "ringEnd", "merge", "startInside", "polygonContains_default", "rejoin_default", "compareIntersection", "lambda", "phi", "pointLine", "clean", "ringSegments", "i", "n", "m", "segment", "validSegment", "a", "b", "halfPi", "epsilon", "antimeridian_default", "clip_default", "clipAntimeridianLine", "clipAntimeridianInterpolate", "pi", "halfPi", "stream", "lambda0", "phi0", "sign0", "clean", "lambda1", "phi1", "sign1", "delta", "abs", "epsilon", "clipAntimeridianIntersect", "cosPhi0", "cosPhi1", "sinLambda0Lambda1", "sin", "atan", "cos", "from", "to", "direction", "phi", "lambda", "circle_default", "radius", "cr", "cos", "delta", "radians", "smallRadius", "notHemisphere", "abs", "epsilon", "interpolate", "from", "to", "direction", "stream", "circleStream", "visible", "lambda", "phi", "clipLine", "point0", "c0", "v0", "v00", "clean", "point1", "point2", "v", "c", "code", "pi", "intersect", "pointEqual_default", "t", "a", "b", "two", "pa", "cartesian", "pb", "n1", "n2", "cartesianCross", "n2n2", "cartesianDot", "n1n2", "determinant", "c1", "c2", "n1xn2", "A", "cartesianScale", "B", "cartesianAddInPlace", "u", "w", "uu", "t2", "sqrt", "q", "spherical", "lambda0", "lambda1", "phi0", "phi1", "z", "polar", "meridian", "q1", "r", "clip_default", "line_default", "a", "b", "x0", "y0", "x1", "y1", "ax", "ay", "bx", "by", "t0", "t1", "dx", "dy", "r", "clipMax", "clipMin", "clipRectangle", "x0", "y0", "x1", "y1", "visible", "x", "y", "interpolate", "from", "to", "direction", "stream", "a", "a1", "corner", "comparePoint", "p", "abs", "epsilon", "compareIntersection", "b", "ca", "cb", "activeStream", "bufferStream", "buffer_default", "segments", "polygon", "ring", "x__", "y__", "v__", "x_", "y_", "v_", "first", "clean", "clipStream", "point", "lineStart", "lineEnd", "polygonStart", "polygonEnd", "polygonInside", "winding", "i", "n", "j", "m", "a0", "b0", "b1", "startInside", "cleanInside", "merge", "rejoin_default", "linePoint", "v", "line_default", "identity_default", "x", "areaSum", "Adder", "areaRingSum", "x00", "y00", "x0", "y0", "areaStream", "noop", "areaRingStart", "areaRingEnd", "abs", "area", "areaPointFirst", "x", "y", "areaPoint", "area_default", "x0", "y0", "x1", "y1", "boundsStream", "boundsPoint", "noop", "bounds", "x", "y", "bounds_default", "X0", "Y0", "Z0", "X1", "Y1", "Z1", "X2", "Y2", "Z2", "x00", "y00", "x0", "y0", "centroidStream", "centroidPoint", "centroidLineStart", "centroidLineEnd", "centroidRingStart", "centroidRingEnd", "centroid", "x", "y", "centroidPointFirstLine", "centroidPointLine", "dx", "dy", "z", "sqrt", "centroidPointFirstRing", "centroidPointRing", "centroid_default", "PathContext", "context", "_", "x", "y", "tau", "noop", "lengthSum", "Adder", "lengthRing", "x00", "y00", "x0", "y0", "lengthStream", "noop", "lengthPointFirst", "lengthPoint", "length", "x", "y", "sqrt", "measure_default", "cacheDigits", "cacheAppend", "cacheRadius", "cacheCircle", "PathString", "digits", "append", "appendRound", "_", "x", "y", "s", "result", "strings", "i", "j", "d", "k", "path_default", "projection", "context", "digits", "pointRadius", "projectionStream", "contextStream", "path", "object", "stream_default", "area_default", "measure_default", "bounds_default", "centroid_default", "_", "identity_default", "PathString", "PathContext", "d", "transform_default", "methods", "transformer", "stream", "s", "TransformStream", "key", "x", "y", "fit", "projection", "fitBounds", "object", "clip", "stream_default", "bounds_default", "fitExtent", "extent", "b", "w", "h", "k", "x", "y", "fitSize", "size", "fitWidth", "width", "fitHeight", "height", "maxDepth", "cosMinDistance", "cos", "radians", "resample_default", "project", "delta2", "resample", "resampleNone", "transformer", "x", "y", "resampleLineTo", "x0", "y0", "lambda0", "a0", "b0", "c0", "x1", "y1", "lambda1", "a1", "b1", "c1", "depth", "stream", "dx", "dy", "d2", "a", "b", "c", "m", "sqrt", "phi2", "asin", "lambda2", "abs", "epsilon", "atan2", "p", "x2", "y2", "dx2", "dy2", "dz", "lambda00", "x00", "y00", "a00", "b00", "c00", "resampleStream", "point", "lineStart", "lineEnd", "ringStart", "linePoint", "lambda", "phi", "cartesian", "ringPoint", "ringEnd", "transformRadians", "transformer", "x", "y", "radians", "transformRotate", "rotate", "scaleTranslate", "k", "dx", "dy", "sx", "sy", "transform", "scaleTranslateRotate", "alpha", "cosAlpha", "cos", "sinAlpha", "sin", "a", "b", "ai", "bi", "ci", "fi", "projection", "project", "projectionMutator", "projectAt", "lambda", "phi", "deltaLambda", "deltaPhi", "deltaGamma", "theta", "preclip", "antimeridian_default", "x0", "y0", "x1", "y1", "postclip", "identity_default", "delta2", "projectResample", "projectTransform", "projectRotateTransform", "cache", "cacheStream", "point", "invert", "degrees", "stream", "_", "reset", "circle_default", "clipRectangle", "recenter", "resample_default", "sqrt", "extent", "object", "fitExtent", "size", "fitSize", "width", "fitWidth", "height", "fitHeight", "center", "rotateRadians", "compose_default", "conicProjection", "projectAt", "phi0", "phi1", "pi", "m", "projectionMutator", "p", "_", "radians", "degrees", "cylindricalEqualAreaRaw", "phi0", "cosPhi0", "cos", "forward", "lambda", "phi", "sin", "x", "y", "asin", "conicEqualAreaRaw", "y0", "y1", "sy0", "sin", "n", "abs", "epsilon", "cylindricalEqualAreaRaw", "c", "r0", "sqrt", "project", "x", "y", "r", "cos", "r0y", "l", "atan2", "sign", "pi", "asin", "conicEqualArea_default", "conicProjection", "albers_default", "conicEqualArea_default", "multiplex", "streams", "n", "x", "y", "i", "albersUsa_default", "cache", "cacheStream", "lower48", "albers_default", "lower48Point", "alaska", "conicEqualArea_default", "alaskaPoint", "hawaii", "hawaiiPoint", "point", "pointStream", "albersUsa", "coordinates", "k", "t", "stream", "_", "reset", "epsilon", "extent", "object", "fitExtent", "size", "fitSize", "width", "fitWidth", "height", "fitHeight", "azimuthalRaw", "scale", "x", "y", "cx", "cos", "cy", "k", "sin", "azimuthalInvert", "angle", "z", "sqrt", "c", "sc", "cc", "atan2", "asin", "azimuthalEqualAreaRaw", "azimuthalRaw", "cxcy", "sqrt", "azimuthalInvert", "z", "asin", "azimuthalEqualArea_default", "projection", "azimuthalEquidistantRaw", "azimuthalRaw", "c", "acos", "sin", "azimuthalInvert", "z", "azimuthalEquidistant_default", "projection", "mercatorRaw", "lambda", "phi", "log", "tan", "halfPi", "x", "y", "atan", "exp", "mercator_default", "mercatorProjection", "tau", "project", "m", "projection", "center", "scale", "translate", "clipExtent", "x0", "y0", "x1", "y1", "_", "reclip", "k", "pi", "t", "rotation_default", "tany", "y", "tan", "halfPi", "conicConformalRaw", "y0", "y1", "cy0", "cos", "n", "sin", "log", "f", "pow", "mercatorRaw", "project", "x", "epsilon", "r", "fy", "sign", "sqrt", "l", "atan2", "abs", "pi", "atan", "conicConformal_default", "conicProjection", "equirectangularRaw", "lambda", "phi", "equirectangular_default", "projection", "conicEquidistantRaw", "y0", "y1", "cy0", "cos", "n", "sin", "g", "abs", "epsilon", "equirectangularRaw", "project", "x", "y", "gy", "nx", "l", "atan2", "sign", "pi", "sqrt", "conicEquidistant_default", "conicProjection", "A1", "A2", "A3", "A4", "M", "sqrt", "iterations", "equalEarthRaw", "lambda", "phi", "l", "asin", "sin", "l2", "l6", "cos", "x", "y", "delta", "fy", "fpy", "abs", "epsilon2", "equalEarth_default", "projection", "gnomonicRaw", "x", "y", "cy", "cos", "k", "sin", "azimuthalInvert", "atan", "gnomonic_default", "projection", "orthographicRaw", "x", "y", "cos", "sin", "azimuthalInvert", "asin", "orthographic_default", "projection", "epsilon", "stereographicRaw", "x", "y", "cy", "cos", "k", "sin", "azimuthalInvert", "z", "atan", "stereographic_default", "projection", "transverseMercatorRaw", "lambda", "phi", "log", "tan", "halfPi", "x", "y", "atan", "exp", "transverseMercator_default", "m", "mercatorProjection", "center", "rotate", "_", "initRange", "domain", "range", "initInterpolator", "interpolator", "implicit", "ordinal", "index", "InternMap", "domain", "range", "unknown", "scale", "d", "i", "_", "value", "initRange", "band", "scale", "ordinal", "domain", "ordinalRange", "r0", "r1", "step", "bandwidth", "round", "paddingInner", "paddingOuter", "align", "rescale", "n", "reverse", "start", "stop", "values", "range", "i", "_", "initRange", "pointish", "copy", "point", "constants", "x", "number", "x", "unit", "identity", "x", "normalize", "a", "b", "constants", "clamper", "t", "bimap", "domain", "range", "interpolate", "d0", "d1", "r0", "r1", "polymap", "j", "d", "r", "i", "bisect_default", "copy", "source", "target", "transformer", "value_default", "transform", "untransform", "unknown", "clamp", "piecewise", "output", "input", "rescale", "n", "scale", "y", "number_default", "_", "number", "round_default", "u", "continuous", "tickFormat", "start", "stop", "count", "specifier", "step", "tickStep", "precision", "formatSpecifier", "value", "precisionPrefix_default", "formatPrefix", "precisionRound_default", "precisionFixed_default", "format", "linearish", "scale", "domain", "count", "d", "ticks", "specifier", "tickFormat", "i0", "i1", "start", "stop", "prestep", "step", "maxIter", "tickIncrement", "linear", "continuous", "copy", "initRange", "identity", "domain", "unknown", "scale", "x", "_", "number", "linearish", "nice", "domain", "interval", "i0", "i1", "x0", "x1", "t", "transformLog", "x", "transformExp", "transformLogn", "transformExpn", "pow10", "powp", "base", "logp", "reflect", "f", "k", "loggish", "transform", "scale", "domain", "logs", "pows", "rescale", "_", "count", "d", "u", "v", "r", "i", "j", "t", "n", "z", "ticks", "specifier", "formatSpecifier", "format", "nice", "log", "transformer", "copy", "initRange", "transformSymlog", "c", "x", "transformSymexp", "symlogish", "transform", "scale", "_", "linearish", "symlog", "transformer", "copy", "initRange", "transformPow", "exponent", "x", "transformSqrt", "transformSquare", "powish", "transform", "scale", "identity", "rescale", "_", "linearish", "pow", "transformer", "copy", "initRange", "quantile", "domain", "range", "thresholds", "unknown", "rescale", "i", "n", "quantileSorted", "scale", "x", "bisect_default", "y", "_", "d", "ascending", "initRange", "threshold", "domain", "range", "unknown", "n", "scale", "x", "bisect_default", "_", "y", "i", "initRange", "t0", "t1", "timeInterval", "floori", "offseti", "count", "field", "interval", "date", "d0", "d1", "step", "start", "stop", "range", "previous", "test", "end", "d", "millisecond", "timeInterval", "date", "step", "start", "end", "k", "milliseconds", "second", "timeInterval", "date", "step", "start", "end", "seconds", "timeMinute", "timeInterval", "date", "step", "start", "end", "timeMinutes", "utcMinute", "utcMinutes", "timeHour", "timeInterval", "date", "step", "start", "end", "timeHours", "utcHour", "utcHours", "timeDay", "timeInterval", "date", "step", "start", "end", "timeDays", "utcDay", "utcDays", "unixDay", "unixDays", "timeWeekday", "i", "timeInterval", "date", "step", "start", "end", "timeSunday", "timeMonday", "timeTuesday", "timeWednesday", "timeThursday", "timeFriday", "timeSaturday", "timeSundays", "timeMondays", "timeTuesdays", "timeWednesdays", "timeThursdays", "timeFridays", "timeSaturdays", "utcWeekday", "utcSunday", "utcMonday", "utcTuesday", "utcWednesday", "utcThursday", "utcFriday", "utcSaturday", "utcSundays", "utcMondays", "utcTuesdays", "utcWednesdays", "utcThursdays", "utcFridays", "utcSaturdays", "timeMonth", "timeInterval", "date", "step", "start", "end", "timeMonths", "utcMonth", "utcMonths", "timeYear", "timeInterval", "date", "step", "start", "end", "k", "timeYears", "utcYear", "utcYears", "ticker", "year", "month", "week", "day", "hour", "minute", "tickIntervals", "second", "ticks", "start", "stop", "count", "reverse", "interval", "tickInterval", "target", "i", "bisector", "step", "tickStep", "millisecond", "t", "utcTicks", "utcTickInterval", "utcYear", "utcMonth", "utcSunday", "unixDay", "utcHour", "utcMinute", "timeTicks", "timeTickInterval", "timeYear", "timeMonth", "timeSunday", "timeDay", "timeHour", "timeMinute", "localDate", "d", "date", "utcDate", "newDate", "y", "m", "formatLocale", "locale", "locale_dateTime", "locale_date", "locale_time", "locale_periods", "locale_weekdays", "locale_shortWeekdays", "locale_months", "locale_shortMonths", "periodRe", "formatRe", "periodLookup", "formatLookup", "weekdayRe", "weekdayLookup", "shortWeekdayRe", "shortWeekdayLookup", "monthRe", "monthLookup", "shortMonthRe", "shortMonthLookup", "formats", "formatShortWeekday", "formatWeekday", "formatShortMonth", "formatMonth", "formatDayOfMonth", "formatMicroseconds", "formatYearISO", "formatFullYearISO", "formatHour24", "formatHour12", "formatDayOfYear", "formatMilliseconds", "formatMonthNumber", "formatMinutes", "formatPeriod", "formatQuarter", "formatUnixTimestamp", "formatUnixTimestampSeconds", "formatSeconds", "formatWeekdayNumberMonday", "formatWeekNumberSunday", "formatWeekNumberISO", "formatWeekdayNumberSunday", "formatWeekNumberMonday", "formatYear", "formatFullYear", "formatZone", "formatLiteralPercent", "utcFormats", "formatUTCShortWeekday", "formatUTCWeekday", "formatUTCShortMonth", "formatUTCMonth", "formatUTCDayOfMonth", "formatUTCMicroseconds", "formatUTCYearISO", "formatUTCFullYearISO", "formatUTCHour24", "formatUTCHour12", "formatUTCDayOfYear", "formatUTCMilliseconds", "formatUTCMonthNumber", "formatUTCMinutes", "formatUTCPeriod", "formatUTCQuarter", "formatUTCSeconds", "formatUTCWeekdayNumberMonday", "formatUTCWeekNumberSunday", "formatUTCWeekNumberISO", "formatUTCWeekdayNumberSunday", "formatUTCWeekNumberMonday", "formatUTCYear", "formatUTCFullYear", "formatUTCZone", "parses", "parseShortWeekday", "parseWeekday", "parseShortMonth", "parseMonth", "parseLocaleDateTime", "parseDayOfMonth", "parseMicroseconds", "parseYear", "parseFullYear", "parseHour24", "parseDayOfYear", "parseMilliseconds", "parseMonthNumber", "parseMinutes", "parsePeriod", "parseQuarter", "parseUnixTimestamp", "parseUnixTimestampSeconds", "parseSeconds", "parseWeekdayNumberMonday", "parseWeekNumberSunday", "parseWeekNumberISO", "parseWeekdayNumberSunday", "parseWeekNumberMonday", "parseLocaleDate", "parseLocaleTime", "parseZone", "parseLiteralPercent", "newFormat", "specifier", "string", "i", "j", "n", "c", "pad", "format", "pads", "newParse", "Z", "parseSpecifier", "week", "day", "utcMonday", "utcDay", "timeMonday", "timeDay", "parse", "f", "p", "numberRe", "percentRe", "requoteRe", "value", "fill", "width", "sign", "length", "requote", "s", "names", "name", "timeYear", "timeSunday", "dISO", "timeThursday", "z", "utcYear", "dow", "utcSunday", "UTCdISO", "utcThursday", "locale", "timeFormat", "timeParse", "utcFormat", "utcParse", "defaultLocale", "definition", "formatLocale", "date", "number", "calendar", "ticks", "tickInterval", "year", "month", "week", "day", "hour", "minute", "second", "format", "scale", "continuous", "invert", "domain", "formatMillisecond", "formatSecond", "formatMinute", "formatHour", "formatDay", "formatWeek", "formatMonth", "formatYear", "tickFormat", "y", "_", "interval", "d", "count", "specifier", "nice", "copy", "time", "initRange", "timeTicks", "timeTickInterval", "timeYear", "timeMonth", "timeSunday", "timeDay", "timeHour", "timeMinute", "timeFormat", "utcTime", "initRange", "calendar", "utcTicks", "utcTickInterval", "utcYear", "utcMonth", "utcSunday", "utcDay", "utcHour", "utcMinute", "second", "utcFormat", "copy", "source", "target", "transformer", "x0", "x1", "x2", "s", "t0", "t1", "t2", "k10", "k21", "interpolator", "identity", "transform", "clamp", "unknown", "scale", "x", "_", "range", "interpolate", "r0", "r1", "r2", "piecewise", "value_default", "round_default", "t", "diverging", "linearish", "copy", "initInterpolator", "divergingLog", "loggish", "divergingSymlog", "symlogish", "divergingPow", "powish", "colors_default", "specifier", "n", "colors", "i", "category10_default", "colors_default", "Accent_default", "colors_default", "Dark2_default", "colors_default", "Paired_default", "colors_default", "Pastel1_default", "colors_default", "Pastel2_default", "colors_default", "Set1_default", "colors_default", "Set2_default", "colors_default", "Set3_default", "colors_default", "Tableau10_default", "colors_default", "ramp_default", "scheme", "rgbBasis", "scheme", "colors_default", "BrBG_default", "ramp_default", "scheme", "colors_default", "PRGn_default", "ramp_default", "scheme", "colors_default", "PiYG_default", "ramp_default", "scheme", "colors_default", "PuOr_default", "ramp_default", "scheme", "colors_default", "RdBu_default", "ramp_default", "scheme", "colors_default", "RdGy_default", "ramp_default", "scheme", "colors_default", "RdYlBu_default", "ramp_default", "scheme", "colors_default", "RdYlGn_default", "ramp_default", "scheme", "colors_default", "Spectral_default", "ramp_default", "scheme", "colors_default", "BuGn_default", "ramp_default", "scheme", "colors_default", "BuPu_default", "ramp_default", "scheme", "colors_default", "GnBu_default", "ramp_default", "scheme", "colors_default", "OrRd_default", "ramp_default", "scheme", "colors_default", "PuBuGn_default", "ramp_default", "scheme", "colors_default", "PuBu_default", "ramp_default", "scheme", "colors_default", "PuRd_default", "ramp_default", "scheme", "colors_default", "RdPu_default", "ramp_default", "scheme", "colors_default", "YlGnBu_default", "ramp_default", "scheme", "colors_default", "YlGn_default", "ramp_default", "scheme", "colors_default", "YlOrBr_default", "ramp_default", "scheme", "colors_default", "YlOrRd_default", "ramp_default", "scheme", "colors_default", "Blues_default", "ramp_default", "scheme", "colors_default", "Greens_default", "ramp_default", "scheme", "colors_default", "Greys_default", "ramp_default", "scheme", "colors_default", "Purples_default", "ramp_default", "scheme", "colors_default", "Reds_default", "ramp_default", "scheme", "colors_default", "Oranges_default", "ramp_default", "cividis_default", "cubehelix_default", "cubehelixLong", "cubehelix", "warm", "cubehelixLong", "cubehelix", "cool", "c", "rainbow_default", "ts", "c", "rgb", "pi_1_3", "pi_2_3", "sinebow_default", "x", "turbo_default", "ramp", "range", "n", "t", "viridis_default", "colors_default", "magma", "inferno", "plasma", "cos", "min", "sin", "sqrt", "pi", "halfPi", "tau", "sqrt3", "sqrt", "asterisk_default", "context", "size", "r", "min", "t", "u", "circle_default", "context", "size", "r", "sqrt", "pi", "tau", "cross_default", "context", "size", "r", "sqrt", "tan30", "sqrt", "tan30_2", "diamond_default", "context", "size", "y", "x", "diamond2_default", "context", "size", "r", "sqrt", "plus_default", "context", "size", "r", "sqrt", "min", "square_default", "context", "size", "w", "sqrt", "x", "square2_default", "context", "size", "r", "sqrt", "ka", "kr", "sin", "pi", "kx", "tau", "ky", "cos", "star_default", "context", "size", "r", "sqrt", "x", "y", "c", "s", "sqrt3", "sqrt", "triangle_default", "context", "size", "y", "sqrt3", "sqrt", "triangle2_default", "context", "size", "s", "t", "u", "c", "s", "sqrt", "k", "a", "wye_default", "context", "size", "r", "x0", "y0", "x1", "y1", "x2", "y2", "times_default", "context", "size", "r", "sqrt", "min", "symbolsFill", "circle_default", "cross_default", "diamond_default", "square_default", "star_default", "triangle_default", "wye_default", "symbolsStroke", "plus_default", "times_default", "triangle2_default", "asterisk_default", "square2_default", "diamond2_default", "Transform", "k", "x", "y", "point", "location", "identity", "transform", "node", "defined", "x", "ascendingDefined", "a", "b", "ascending", "descendingDefined", "descending", "nonempty", "finite", "positive", "negative", "format", "date", "fallback", "hours", "minutes", "seconds", "milliseconds", "formatYear", "pad", "year", "value", "width", "re", "parse", "string", "fallback", "durationSecond", "durationMinute", "durationHour", "durationDay", "durationWeek", "durationMonth", "durationYear", "formats", "timeIntervals", "second", "timeMinute", "timeHour", "timeDay", "timeSunday", "timeMonth", "timeYear", "timeMonday", "timeTuesday", "timeWednesday", "timeThursday", "timeFriday", "timeSaturday", "utcIntervals", "utcMinute", "utcHour", "unixDay", "utcSunday", "utcMonth", "utcYear", "utcMonday", "utcTuesday", "utcWednesday", "utcThursday", "utcFriday", "utcSaturday", "parseInterval", "input", "intervals", "name", "period", "match", "interval", "maybeTimeInterval", "maybeUtcInterval", "isUtcYear", "i", "date", "isTimeYear", "formatTimeTicks", "scale", "data", "ticks", "anchor", "format", "timeFormat", "utcFormat", "template", "f1", "f2", "getTimeTicksInterval", "formatConditional", "medianStep", "median", "pairs", "a", "b", "bisector", "step", "start", "stop", "extent", "count", "format1", "format2", "x", "X", "j", "orderof", "TypedArray", "objectToString", "valueof", "data", "value", "type", "valueType", "maybeTypedMap", "field", "map", "constant", "maybeTypedArrayify", "f", "floater", "arrayify", "coerceNumber", "d", "i", "singleton", "name", "indexOf", "range", "identity", "one", "yes", "string", "x", "number", "first", "x", "second", "constant", "x", "percentile", "reduce", "p", "I", "f", "quantile", "coerceNumbers", "values", "TypedArray", "map", "coerceNumber", "coerceDates", "coerceDate", "parse", "maybeColorChannel", "value", "defaultValue", "isColor", "maybeNumberChannel", "maybeKeyword", "input", "name", "allowed", "keyword", "i", "arrayify", "data", "type", "slice", "hasX", "x1", "x2", "hasY", "y", "y1", "y2", "hasXY", "options", "isObject", "option", "objectToString", "isScaleOptions", "isOptions", "isDomainSort", "sort", "maybeZero", "x3", "identity", "maybeTuple", "first", "second", "maybeZ", "z", "fill", "stroke", "range", "n", "r", "take", "values", "index", "map", "i", "subarray", "I", "i", "j", "keyof", "value", "maybeInput", "key", "options", "column", "source", "labelof", "v", "maybeColumn", "defaultValue", "mid", "x1", "x2", "data", "X1", "X2", "isTemporal", "map", "_", "maybeApplyInterval", "V", "scale", "t", "maybeIntervalTransform", "interval", "type", "maybeInterval", "defined", "d", "lo", "hi", "range", "x", "maybeTimeInterval", "maybeUtcInterval", "maybeRangeInterval", "maybeNiceInterval", "maybeValue", "isOptions", "numberChannel", "valueof", "isIterable", "value", "isTextual", "values", "isOrdinal", "type", "isTemporal", "isTemporalString", "parse", "isNumericString", "isNumeric", "isEvery", "is", "every", "isColor", "color", "isOpacity", "isNoneish", "isNone", "isRound", "maybeAnchor", "name", "maybeKeyword", "maybeFrameAnchor", "orderof", "first", "last", "descending", "inherit", "options", "rest", "o", "defaults", "key", "named", "things", "names", "thing", "maybeNamed", "position", "color", "radius", "length", "opacity", "symbol", "projection", "registry", "sqrt3", "sqrt4_3", "symbolHexagon", "context", "size", "rx", "ry", "hy", "symbols", "asterisk_default", "circle_default", "cross_default", "diamond_default", "diamond2_default", "plus_default", "square_default", "square2_default", "star_default", "times_default", "triangle_default", "triangle2_default", "wye_default", "isSymbolObject", "value", "isSymbol", "maybeSymbol", "symbol", "basic", "f1", "s1", "r1", "t1", "i1", "options", "transform", "filterTransform", "isDomainSort", "composeTransform", "sortTransform", "reverseTransform", "initializer", "composeInitializer", "t2", "data", "facets", "plotOptions", "arrayify", "i2", "channels", "args", "c1", "d1", "c2", "d2", "f2", "filterTransform", "value", "data", "facets", "V", "valueof", "I", "reverseTransform", "data", "facets", "I", "sortTransform", "value", "sortData", "sortValue", "compare", "data", "facets", "compareData", "i", "j", "I", "channel", "order", "maybeValue", "negate", "descendingDefined", "ascendingDefined", "channels", "V", "valueof", "compareValue", "hasOutput", "outputs", "names", "name", "maybeOutputs", "inputs", "asOutput", "maybeOutput", "entries", "reduceTitle", "reduceFirst", "reduce", "nullOutput", "asEvaluator", "maybeEvaluator", "scale", "isObject", "evaluator", "output", "setOutput", "column", "O", "data", "scope", "I", "extent", "asReduce", "maybeReduce", "input", "maybeInput", "reducer", "V", "context", "labelof", "reduceCount", "valueof", "range", "maybeGroup", "X", "sort", "group", "i", "first", "value", "fallback", "invalidReduce", "reduceReduce", "reduceFunction", "reduceAccessor", "percentile", "reduceLast", "reduceIdentity", "reduceDistinct", "reduceSum", "reduceProportion", "deviation", "min", "minIndex", "max", "maxIndex", "reduceMaybeTemporalAccessor", "mean", "median", "variance", "mode", "maybeSubgroup", "maybeSort", "facets", "reverse", "S", "compare", "j", "ascendingDefined", "f", "take", "x", "isTemporal", "groups", "rollup", "second", "top", "bottom", "sum", "key", "s", "InternSet", "basis", "createChannel", "data", "scale", "type", "value", "filter", "hint", "name", "inferChannelScale", "valueof", "labelof", "createChannels", "channels", "channel", "valueObject", "scales", "values", "scaleName", "map", "isEvery", "isColor", "isOpacity", "isSymbol", "maybeSymbol", "registry", "channelDomain", "facets", "facetChannels", "options", "defaultOrder", "defaultReverse", "defaultReduce", "defaultLimit", "x", "y", "order", "reverse", "reduce", "limit", "maybeValue", "negate", "descendingGroup", "ascendingGroup", "maybeOrder", "X", "reindexFacetChannel", "findScaleChannel", "XV", "lo", "hi", "isIterable", "domain", "InternSet", "YV", "difference", "reducer", "maybeReduce", "rollups", "range", "I", "i", "first", "originalFacets", "V1", "V2", "vi", "j", "k1", "k2", "X1", "X2", "x2", "alias", "ak", "av", "bk", "bv", "ascendingDefined", "descendingDefined", "getSource", "key", "createContext", "options", "document", "create", "name", "select_default", "creator_default", "warnings", "consumeWarnings", "w", "warn", "message", "pi", "tau", "defaultAspectRatio", "createProjection", "projection", "globalInset", "insetTop", "insetRight", "insetBottom", "insetLeft", "dimensions", "options", "domain", "clip", "isObject", "inset", "namedProjection", "width", "height", "marginLeft", "marginRight", "marginTop", "marginBottom", "dx", "dy", "maybePostClip", "tx", "ty", "transform", "x0", "y0", "x1", "y1", "path_default", "k", "transform_default", "x", "y", "warn", "identity", "s", "scaleProjection", "albersUsa_default", "conicProjection", "albers_default", "azimuthalEqualArea_default", "azimuthalEquidistant_default", "conicConformal_default", "conicEqualArea_default", "conicEquidistant_default", "equalEarth_default", "equirectangular_default", "gnomonic_default", "reflectY", "mercator_default", "orthographic_default", "stereographic_default", "transverseMercator_default", "x2", "y2", "clipRectangle", "kx", "ky", "rotate", "precision", "type", "aspectRatio", "parallels", "constant", "stream", "project", "cx", "cy", "values", "n", "X", "Y", "i", "hasProjection", "projectionAspectRatio", "getGeometryChannels", "channel", "X", "Y", "x", "y", "sink", "object", "stream_default", "categoricalSchemes", "Accent_default", "category10_default", "Dark2_default", "Paired_default", "Pastel1_default", "Pastel2_default", "Set1_default", "Set2_default", "Set3_default", "Tableau10_default", "isCategoricalScheme", "scheme", "ordinalSchemes", "scheme11", "BrBG_default", "PRGn_default", "PiYG_default", "PuOr_default", "RdBu_default", "RdGy_default", "RdYlBu_default", "RdYlGn_default", "Spectral_default", "scheme11r", "scheme9", "Blues_default", "Greens_default", "Greys_default", "Oranges_default", "Purples_default", "Reds_default", "schemei", "turbo_default", "viridis_default", "magma", "inferno", "plasma", "cividis_default", "cubehelix_default", "warm", "cool", "BuGn_default", "BuPu_default", "GnBu_default", "OrRd_default", "PuBu_default", "PuBuGn_default", "PuRd_default", "RdPu_default", "YlGn_default", "YlGnBu_default", "YlOrBr_default", "YlOrRd_default", "schemeicyclical", "rainbow_default", "sinebow_default", "interpolate", "quantize_default", "t", "n", "ordinalScheme", "s", "ordinalRange", "length", "maybeBooleanRange", "domain", "range", "f", "value", "quantitativeSchemes", "quantitativeScheme", "divergingSchemes", "isDivergingScheme", "flip", "i", "t", "unit", "interpolators", "number_default", "rgb_default", "hsl_default", "hcl_default", "lab", "maybeInterpolator", "interpolate", "createScaleQ", "key", "scale", "channels", "type", "nice", "clamp", "zero", "domain", "inferAutoDomain", "unknown", "round", "scheme", "interval", "range", "registry", "radius", "inferRadialRange", "length", "inferLengthRange", "opacity", "color", "quantitativeScheme", "round_default", "reverse", "maybeRangeInterval", "n", "arrayify", "m", "piecewise", "_", "constant", "interpolatePiecewise", "min", "max", "extent", "slice", "orderof", "maybeNice", "maybeNiceInterval", "createScaleLinear", "options", "linear", "createScaleSqrt", "createScalePow", "exponent", "pow", "createScaleLog", "base", "inferLogDomain", "log", "createScaleSymlog", "symlog", "createScaleQuantile", "quantiles", "inferQuantileDomain", "quantize_default", "ordinalRange", "quantile", "createScaleThreshold", "createScaleQuantize", "thresholds", "ticks", "x", "sign", "isOrdered", "threshold", "d", "s", "descending", "createScaleIdentity", "identity", "inferDomain", "f", "finite", "value", "inferZeroDomain", "hint", "h25", "positive", "k", "r", "h50", "median", "v", "negative", "j", "createScaleD", "key", "scale", "transform", "channels", "type", "nice", "clamp", "domain", "inferDomain", "unknown", "pivot", "scheme", "range", "symmetric", "interpolate", "registry", "color", "rgb_default", "quantitativeScheme", "number_default", "reverse", "arrayify", "min", "max", "warn", "descending", "maybeInterpolator", "interpolatePiecewise", "piecewise", "flip", "mid", "mindelta", "maxdelta", "createScaleDiverging", "options", "diverging", "transformIdentity", "createScaleDivergingSqrt", "createScaleDivergingPow", "exponent", "divergingPow", "transformPow", "createScaleDivergingLog", "base", "negative", "positive", "divergingLog", "transformLog", "createScaleDivergingSymlog", "constant", "divergingSymlog", "transformSymlog", "x", "transformSqrt", "createScaleT", "key", "scale", "channels", "options", "createScaleQ", "createScaleTime", "time", "createScaleUtc", "utcTime", "ordinalImplicit", "createScaleO", "key", "scale", "channels", "type", "interval", "domain", "range", "reverse", "hint", "maybeRangeInterval", "inferDomain", "createScaleOrdinal", "scheme", "unknown", "options", "registry", "symbol", "inferSymbolHint", "inferSymbolRange", "map", "maybeSymbol", "color", "maybeBooleanRange", "interpolate", "quantitativeScheme", "t0", "d", "n", "quantize_default", "t", "ordinalScheme", "implicit", "ordinal", "createScalePoint", "align", "padding", "maybeRound", "point", "createScaleBand", "paddingInner", "paddingOuter", "band", "round", "values", "InternSet", "value", "v", "min", "max", "extent", "position", "sort", "ascendingDefined", "inferHint", "candidate", "isNoneish", "symbolsStroke", "symbolsFill", "createScales", "channelsByScale", "globalLabel", "globalInset", "globalInsetTop", "globalInsetRight", "globalInsetBottom", "globalInsetLeft", "round", "nice", "clamp", "zero", "align", "padding", "projection", "facetLabel", "options", "scales", "key", "channels", "scaleOptions", "scale", "createScale", "registry", "position", "label", "percent", "transform", "inset", "insetTop", "insetRight", "insetBottom", "insetLeft", "inferScaleLabel", "createScaleFunctions", "name", "type", "interval", "autoScaleRange", "dimensions", "x", "y", "fx", "fy", "superdimensions", "outerDimensions", "autoScaleRangeX", "autoScaleRangeY", "subdimensions", "innerDimensions", "l", "isOrdinalScale", "marginTop", "marginRight", "marginBottom", "marginLeft", "width", "height", "facetMarginTop", "facetMarginRight", "facetMarginBottom", "facetMarginLeft", "left", "right", "piecewiseRange", "autoScaleRound", "top", "bottom", "isBandScale", "roundError", "n", "start", "stop", "paddingInner", "paddingOuter", "m", "step", "length", "isThresholdScale", "end", "_", "createScale", "key", "channels", "options", "type", "inferScaleType", "isOrdinalScale", "values", "value", "isTemporal", "warn", "formatScaleType", "isTemporalString", "isNumericString", "coerceType", "coerceNumbers", "registry", "position", "symbol", "coerceSymbols", "coerceDates", "createScaleDiverging", "createScaleDivergingSqrt", "createScaleDivergingPow", "createScaleDivergingLog", "createScaleDivergingSymlog", "ordinalImplicit", "createScaleOrdinal", "createScaleLinear", "createScaleSqrt", "createScaleThreshold", "createScaleQuantile", "createScaleQuantize", "createScalePow", "createScaleLog", "createScaleSymlog", "createScaleUtc", "createScaleTime", "createScalePoint", "createScaleBand", "createScaleIdentity", "typeProjection", "domain", "range", "scheme", "pivot", "projection", "t", "kind", "radius", "opacity", "length", "asOrdinalType", "isOrdinal", "color", "isDivergingScheme", "isCategoricalScheme", "isTemporalScale", "isThresholdScale", "isBandScale", "isCollapsed", "scale", "domain", "value", "i", "n", "coerceType", "channels", "options", "coerceValues", "c", "coerceSymbols", "values", "map", "maybeSymbol", "exposeScales", "scaleDescriptors", "key", "registry", "exposeScale", "scale", "type", "domain", "range", "interpolate", "interval", "transform", "percent", "pivot", "d", "unknown", "slice", "t", "memoize1", "compute", "cacheValue", "cacheKeys", "keys", "k", "numberFormat", "memoize1", "locale", "monthFormat", "month", "weekdayFormat", "weekday", "formatNumber", "format", "i", "formatIsoDate", "date", "format", "formatAuto", "locale", "number", "formatNumber", "v", "string", "formatDefault", "offset", "nextClipId", "getClipId", "styles", "mark", "title", "href", "variaLabel", "ariaDescription", "ariaHidden", "target", "fill", "fillOpacity", "stroke", "strokeWidth", "strokeOpacity", "strokeLinejoin", "strokeLinecap", "strokeMiterlimit", "strokeDasharray", "strokeDashoffset", "opacity", "mixBlendMode", "imageFilter", "paintOrder", "pointerEvents", "shapeRendering", "channels", "cariaLabel", "defaultFill", "defaultFillOpacity", "defaultStroke", "defaultStrokeOpacity", "defaultStrokeWidth", "defaultStrokeLinecap", "defaultStrokeLinejoin", "defaultStrokeMiterlimit", "defaultPaintOrder", "isNoneish", "vfill", "cfill", "maybeColorChannel", "vfillOpacity", "cfillOpacity", "maybeNumberChannel", "vstroke", "cstroke", "vstrokeOpacity", "cstrokeOpacity", "vopacity", "copacity", "isNone", "isRound", "vstrokeWidth", "cstrokeWidth", "impliedString", "impliedNumber", "string", "applyTitle", "selection", "L", "i", "nonempty", "applyText", "applyText", "selection", "T", "i", "formatDefault", "applyChannelStyles", "selection", "target", "tip", "AL", "T", "F", "FO", "S", "SO", "SW", "O", "H", "applyAttr", "i", "applyHref", "applyTitle", "maybeClip", "clip", "maybeKeyword", "applyClip", "selection", "mark", "dimensions", "context", "clipUrl", "width", "height", "marginLeft", "marginRight", "marginTop", "marginBottom", "id", "getClipId", "create", "g", "projection", "path_default", "applyAttr", "applyIndirectStyles", "pointerEvents", "applyDirectStyles", "applyStyle", "applyHref", "href", "target", "i", "h", "a", "namespaces_default", "name", "value", "applyTransform", "x", "y", "tx", "offset", "ty", "impliedString", "impliedValue", "string", "impliedNumber", "number", "validClassName", "maybeClassName", "applyInlineStyles", "style", "element", "applyFrameAnchor", "frameAnchor", "createDimensions", "scales", "marks", "options", "marginTopDefault", "offset", "marginRightDefault", "marginBottomDefault", "marginLeftDefault", "marginTop", "marginRight", "marginBottom", "marginLeft", "margin", "width", "height", "autoHeight", "dimensions", "facetMargin", "facetMarginTop", "facetMarginRight", "facetMarginBottom", "facetMarginLeft", "x", "y", "fy", "fx", "projection", "aspectRatio", "nfy", "ar", "projectionAspectRatio", "nfx", "far", "lar", "ny", "isOrdinalScale", "ratio", "aspectRatioLength", "fxb", "fyb", "w", "k", "scale", "type", "domain", "transform", "exponent", "min", "max", "extent", "createFacets", "channelsByScale", "options", "fx", "fy", "createScales", "fxDomain", "fyDomain", "cross", "x", "y", "i", "recreateFacets", "facets", "X", "Y", "facetIndex", "f", "a", "b", "facetGroups", "data", "I", "range", "FX", "FY", "rollup", "G", "facetTranslator", "marginTop", "marginLeft", "facetExclude", "index", "ex", "e", "sum", "d", "n", "j", "facetAnchors", "facetAnchorTop", "facetAnchorRight", "facetAnchorBottom", "facetAnchorLeft", "and", "facetAnchorTopEmpty", "facetAnchorRightEmpty", "facetAnchorBottomEmpty", "facetAnchorLeftEmpty", "facetAnchorEmpty", "maybeFacetAnchor", "facetAnchor", "anchor", "indexCache", "V", "InternMap", "map", "v", "facetIndexOf", "facetFind", "keyof", "facetEmpty", "empty", "channels", "facetFilter", "groups", "Mark", "data", "channels", "options", "defaults", "facet", "facetAnchor", "fx", "fy", "sort", "dx", "dy", "margin", "marginTop", "marginRight", "marginBottom", "marginLeft", "clip", "extraChannels", "tip", "render", "isDomainSort", "initializer", "basic", "keyword", "singleton", "maybeFacetAnchor", "maybeNamed", "maybeChannels", "styles", "name", "channel", "isOptions", "value", "scale", "optional", "maybeClip", "maybeTip", "composeRender", "facets", "facetChannels", "plotOptions", "arrayify", "range", "originalFacets", "createChannels", "channelDomain", "index", "values", "filter", "defined", "i", "context", "cx", "cy", "project", "scales", "valueObject", "marks", "r1", "r2", "s", "v", "d", "c", "next", "maybeValue", "maybeKeyword", "withTip", "states", "pointerK", "kx", "ky", "x", "y", "px", "py", "maxRadius", "channels", "render", "options", "composeRender", "index", "scales", "values", "dimensions", "context", "next", "svg", "data", "state", "renderIndex", "fx", "fy", "tx", "ty", "faceted", "facetState", "facetStates", "cx", "cy", "applyFrameAnchor", "PX", "PY", "i", "anchorX", "anchorY", "g", "s", "f", "update", "ii", "ri", "r", "I", "p", "ft", "mt", "pointermove", "event", "xp", "yp", "pointer_default", "j", "dx", "dy", "rj", "pointerdown", "pointerleave", "pointer", "pointerX", "pointerY", "X1", "X2", "X", "Y1", "Y2", "Y", "inferFontVariant", "scale", "isOrdinalScale", "legendRamp", "color", "options", "label", "tickSize", "width", "height", "marginTop", "marginRight", "marginBottom", "marginLeft", "style", "ticks", "tickFormat", "fontVariant", "inferFontVariant", "round", "opacity", "className", "context", "createContext", "maybeClassName", "maybeNumberChannel", "svg", "create", "applyInlineStyles", "tickAdjust", "g", "x", "applyRange", "range", "type", "domain", "interpolate", "scale", "pivot", "interpolator", "piecewise", "interpolatePiecewise", "quantize_default", "number_default", "n", "canvas", "context2", "i", "j", "thresholds", "thresholdFormat", "d", "format", "linear", "map", "_", "band", "axisBottom", "impliedString", "radians", "markers", "mark", "marker", "markerStart", "markerMid", "markerEnd", "maybeMarker", "markerCircleFill", "markerArrow", "markerDot", "markerCircleStroke", "orient", "color", "context", "create", "nextMarkerId", "applyMarkers", "path", "S", "applyMarkersColor", "i", "applyMarkersColor", "path", "markerStart", "markerMid", "markerEnd", "stroke", "strokeof", "context", "iriByMarkerColor", "applyMarker", "marker", "i", "color", "iriByColor", "iri", "node", "id", "nextMarkerId", "maybeInsetX", "inset", "insetLeft", "insetRight", "options", "maybeInset", "maybeInsetY", "insetTop", "insetBottom", "inset1", "inset2", "offset", "maybeIntervalValue", "value", "interval", "maybeValue", "maybeInterval", "maybeIntervalK", "k", "maybeInsetK", "options", "trivial", "v", "v1", "v2", "label", "labelof", "V", "kv", "data", "valueof", "D1", "V1", "transform", "map", "maybeIntervalMidK", "V2", "isTemporal", "maybeIntervalX", "options", "maybeIntervalK", "maybeInsetX", "maybeIntervalY", "maybeInsetY", "maybeIntervalMidX", "maybeIntervalMidK", "maybeIntervalMidY", "defaults", "RuleX", "Mark", "data", "options", "x", "y1", "y2", "inset", "insetTop", "insetBottom", "withTip", "number", "markers", "index", "scales", "channels", "dimensions", "context", "y", "X", "Y1", "Y2", "width", "height", "marginTop", "marginRight", "marginLeft", "marginBottom", "create", "applyIndirectStyles", "applyTransform", "offset", "g", "applyDirectStyles", "i", "isCollapsed", "applyChannelStyles", "applyMarkers", "RuleY", "x1", "x2", "insetRight", "insetLeft", "Y", "X1", "X2", "ruleX", "identity", "rest", "maybeIntervalY", "maybeOptionalZero", "ruleY", "maybeIntervalX", "template", "strings", "parts", "j", "copy", "i", "s", "defaults", "softHyphen", "Text", "Mark", "data", "options", "x", "y", "text", "isIterable", "isTextual", "identity", "indexOf", "frameAnchor", "textAnchor", "lineAnchor", "lineHeight", "lineWidth", "textOverflow", "monospace", "fontFamily", "fontSize", "fontStyle", "fontVariant", "fontWeight", "rotate", "vrotate", "crotate", "maybeNumberChannel", "vfontSize", "cfontSize", "maybeFontSizeChannel", "numberChannel", "nonempty", "impliedString", "keyword", "maybeTextOverflow", "string", "maybeFrameAnchor", "splitter", "clipper", "index", "scales", "channels", "dimensions", "context", "X", "Y", "R", "T", "TL", "FS", "cx", "cy", "applyFrameAnchor", "create", "applyIndirectStyles", "applyIndirectTextStyles", "applyTransform", "g", "applyDirectStyles", "applyMultilineText", "template", "i", "applyAttr", "applyChannelStyles", "selection", "mark", "splitLines", "clipLine", "lines", "formatDefault", "n", "m", "tspan", "namespaces_default", "title", "maybeTuple", "textX", "maybeIntervalMidY", "textY", "maybeIntervalMidX", "inferFontVariant", "isNumeric", "isTemporal", "fontSizes", "lineWrap", "input", "maxWidth", "widthof", "lineStart", "lineEnd", "wordStart", "wordEnd", "required", "lineBreaks", "j", "k", "defaultWidthMap", "defaultWidth", "start", "end", "sum", "readCharacter", "isPictographic", "monospaceWidth", "clipStart", "clipEnd", "ellipsis", "clipMiddle", "cut", "width", "inset", "I", "w", "l", "e", "ei", "reCombiner", "rePictographic", "isSurrogatePair", "isCombiner", "isZeroWidthJoiner", "isAscii", "hi", "lo", "defaults", "defaultRadius", "wingRatio", "shapeArrow", "context", "l", "r", "wing", "shapeSpike", "shapes", "isShapeObject", "value", "maybeShape", "shape", "Vector", "Mark", "data", "options", "x", "y", "length", "rotate", "anchor", "frameAnchor", "vl", "cl", "maybeNumberChannel", "vr", "cr", "keyword", "maybeFrameAnchor", "index", "scales", "channels", "dimensions", "X", "Y", "L", "A", "cx", "cy", "applyFrameAnchor", "create", "applyIndirectStyles", "applyTransform", "g", "applyDirectStyles", "template", "i", "p", "pathRound", "applyChannelStyles", "vectorX", "data", "options", "x", "identity", "rest", "Vector", "vectorY", "y", "maybeData", "data", "options", "isIterable", "maybeAnchor", "anchor", "anchors", "keyword", "anchorY", "anchorFy", "anchorX", "anchorFx", "axisY", "axisKy", "axisFy", "axisX", "axisKx", "axisFx", "k", "color", "opacity", "stroke", "strokeOpacity", "strokeWidth", "fill", "fillOpacity", "textAnchor", "textStroke", "textStrokeOpacity", "textStrokeWidth", "tickSize", "tickPadding", "tickRotate", "x", "margin", "marginTop", "marginRight", "marginBottom", "marginLeft", "label", "labelAnchor", "labelArrow", "labelOffset", "number", "maybeLabelArrow", "marks", "isNoneish", "axisTickKy", "axisTextKy", "text", "labelOptions", "facets", "channels", "scales", "dimensions", "scale", "cla", "clo", "formatAxisLabel", "y", "axisTickKx", "axisTextKx", "strokeLinecap", "strokeLinejoin", "facetAnchor", "frameAnchor", "inset", "insetLeft", "insetRight", "dx", "axisMark", "vectorY", "offset", "shapeTickLeft", "shapeTickRight", "insetTop", "insetBottom", "dy", "vectorX", "shapeTickBottom", "shapeTickTop", "radians", "tickFormat", "lineAnchor", "fontVariant", "textY", "ticks", "inferFontVariant", "inferTextChannel", "textX", "gridY", "gridKy", "gridFy", "gridX", "gridKx", "gridFx", "x1", "x2", "ruleY", "gridDefaults", "y1", "y2", "ruleX", "fontFamily", "fontSize", "fontStyle", "fontWeight", "monospace", "pointerEvents", "shapeRendering", "initializer", "maybeColorChannel", "maybeNumberChannel", "mark", "ariaLabel", "initialize", "axisInitializer", "_channels", "context", "initializeFacets", "tickSpacing", "interval", "isTemporalScale", "arrayify", "maybeRangeInterval", "min", "max", "extent", "range", "identity", "initializedChannels", "name", "channel", "valueof", "basicInitializer", "m", "inferTickFormat", "formatTimeTicks", "isUtcYear", "utcFormat", "isTimeYear", "timeFormat", "formatDefault", "isTemporal", "format", "constant", "l", "inferScaleOrder", "orderof", "isTemporalish", "order", "maybeScale", "scale", "key", "s", "legendSwatches", "color", "opacity", "options", "isOrdinalScale", "isThresholdScale", "legendItems", "selection", "width", "height", "maybeNumberChannel", "legendSymbols", "symbol", "fill", "fillOpacity", "stroke", "isNoneish", "strokeOpacity", "strokeWidth", "r", "vf", "cf", "maybeColorChannel", "vs", "cs", "sf", "ss", "size", "d", "p", "pathRound", "swatch", "columns", "tickFormat", "fontVariant", "inferFontVariant", "swatchSize", "swatchWidth", "swatchHeight", "marginLeft", "className", "style", "context", "createContext", "maybeClassName", "inferTickFormat", "swatches", "create", "extraStyle", "item", "div", "impliedString", "applyInlineStyles", "legendRegistry", "legendSymbols", "legendColor", "legendOpacity", "exposeLegends", "scales", "context", "defaults", "key", "options", "legendRegistry", "legendOptions", "className", "label", "ticks", "tickFormat", "inherit", "legendColor", "color", "legend", "legendSwatches", "legendRamp", "legendOpacity", "type", "interpolate", "scale", "rgb", "interpolateOpacity", "r", "g", "b", "t", "createLegends", "legends", "value", "o", "defaults", "lineDefaults", "Frame", "Mark", "options", "anchor", "inset", "insetTop", "insetRight", "insetBottom", "insetLeft", "rx", "ry", "singleton", "maybeKeyword", "number", "index", "scales", "channels", "dimensions", "context", "marginTop", "marginRight", "marginBottom", "marginLeft", "width", "height", "x1", "x2", "y1", "y2", "create", "applyIndirectStyles", "applyDirectStyles", "applyChannelStyles", "applyTransform", "line", "rect", "frame", "defaults", "ignoreChannels", "Tip", "Mark", "data", "options", "isIterable", "isTextual", "identity", "x", "y", "x1", "x2", "y1", "y2", "anchor", "monospace", "fontFamily", "fontSize", "fontStyle", "fontVariant", "fontWeight", "lineHeight", "lineWidth", "frameAnchor", "textAnchor", "textOverflow", "textPadding", "title", "pointerSize", "pathFilter", "maybeAnchor", "maybeFrameAnchor", "impliedString", "string", "maybeTextOverflow", "number", "key", "splitter", "clipper", "index", "scales", "values", "dimensions", "context", "mark", "fx", "fy", "svg", "document", "r", "m", "marginTop", "marginLeft", "sources", "getSources", "X1", "Y1", "X2", "Y2", "X", "Y", "ox", "oy", "cx", "cy", "applyFrameAnchor", "px", "anchorX", "py", "anchorY", "widthof", "monospaceWidth", "defaultWidth", "ee", "ellipsis", "formatFx", "inferTickFormat", "formatFy", "format", "i", "text", "line", "formatDefault", "channel", "value", "defined", "formatLabel", "formatPair", "scale", "g", "create", "applyIndirectStyles", "applyIndirectTextStyles", "applyTransform", "applyDirectStyles", "that", "select_default", "names", "name", "renderLine", "selection", "color", "opacity", "swatch", "w", "j", "cut", "k", "postrender", "width", "height", "tx", "h", "a", "fitLeft", "fitRight", "fitTop", "fitBottom", "ax", "ay", "path", "getPath", "t", "getLineOffset", "getTextTranslate", "tip", "maybeTuple", "length", "channels", "source", "getSource", "c1", "c2", "c", "defaultLabel", "plot", "options", "facet", "style", "caption", "ariaLabel", "ariaDescription", "className", "maybeClassName", "marks", "flatMarks", "inferTips", "topFacetState", "maybeTopFacet", "facetStateByMark", "mark", "facetState", "maybeMarkFacet", "channelsByScale", "addScaleChannels", "axes", "inferAxes", "facets", "createFacets", "topFacetsIndex", "facetFilter", "nonEmpty", "facetsIndex", "index", "i", "f", "facetExclude", "key", "registry", "isScaleOptions", "stateByMark", "facetChannels", "data", "channels", "applyScaleTransforms", "scaleDescriptors", "createScales", "scales", "createScaleFunctions", "dimensions", "createDimensions", "autoScaleRange", "fx", "fy", "subdimensions", "innerDimensions", "superdimensions", "actualDimensions", "context", "createContext", "document", "svg", "creator_default", "figure", "createProjection", "facetGroups", "state", "value", "newByScale", "update", "inferChannelScales", "channel", "scale", "position", "applyScaleTransform", "newChannelsByScale", "newScaleDescriptors", "inheritScaleLabels", "newScales", "facetDomains", "facetTranslate", "recreateFacets", "facetTranslator", "width", "height", "select_default", "applyInlineStyles", "values", "indexes", "node", "g", "faceted", "subarray", "name", "legends", "createLegends", "legend", "figcaption", "exposeScales", "exposeLegends", "w", "consumeWarnings", "plotThis", "Mark", "markify", "Render", "render", "t", "type", "percent", "interval", "transform", "x", "maybeIntervalTransform", "map", "inferChannelScale", "filter", "yes", "hasProjection", "gx", "gy", "y", "getGeometryChannels", "addScaleChannel", "scaleChannels", "arrayify", "createChannel", "groups", "warn", "derive", "initializer", "tips", "pointerX", "pointerY", "pointer", "tip", "projection", "axis", "grid", "facetAxis", "facetGrid", "xAxis", "xGrid", "yAxis", "yGrid", "fxAxis", "fxGrid", "fyAxis", "fyGrid", "hasPositionChannel", "hasAxis", "maybeGrid", "gridFy", "maybeAxis", "axisFy", "gridFx", "axisFx", "gridY", "axisY", "gridX", "axisX", "axisType", "primary", "secondary", "defaults", "both", "isBoth", "axisOptions", "line", "isNone", "frame", "lineOptions", "gridType", "gridOptions", "anchor", "ticks", "tickSize", "tickSpacing", "tickPadding", "tickFormat", "tickRotate", "fontVariant", "label", "labelAnchor", "labelArrow", "labelOffset", "stroke", "isColor", "isGridTicks", "isIterable", "k", "prefix", "m", "newScale", "marginTop", "marginRight", "marginBottom", "marginLeft", "outerDimensions", "fxr", "outerRange", "fyr", "domain", "x1", "x2", "binX", "outputs", "options", "mergeOptions", "x", "y", "binn", "maybeBinValue", "identity", "maybeInsetX", "binn", "bx", "by", "gx", "gy", "reduceData", "reduceIdentity", "filter", "reduceCount", "sort", "reverse", "outputs", "inputs", "maybeBin", "maybeBinOutputs", "maybeBinReduce", "identity", "maybeBinOutput", "maybeBinEvaluator", "hasOutput", "BX1", "setBX1", "maybeColumn", "BX2", "setBX2", "BY1", "setBY1", "BY2", "setBY2", "k", "gk", "GK", "setGK", "x", "y", "z", "fill", "stroke", "x1", "x2", "y1", "y2", "domain", "cumulative", "thresholds", "interval", "options", "GZ", "setGZ", "vfill", "maybeColorChannel", "vstroke", "GF", "setGF", "GS", "setGS", "basic", "data", "facets", "plotOptions", "K", "maybeApplyInterval", "valueof", "Z", "F", "S", "G", "maybeSubgroup", "groupFacets", "groupData", "bin", "bing", "i", "o", "facet", "groupFacet", "f", "I", "maybeGroup", "g", "b", "extent", "maybeSort", "mid", "name", "output", "mergeOptions", "maybeBinValue", "value", "defaultValue", "maybeValue", "maybeThresholds", "maybeBin", "options", "value", "cumulative", "domain", "extent", "thresholds", "bin", "data", "V", "valueof", "T", "isTemporal", "isTimeThresholds", "map", "coerceDate", "min", "max", "t", "isInterval", "utcTickInterval", "coerceNumbers", "step", "tickIncrement", "r0", "r1", "n", "i", "ticks", "E", "bin1cn", "bin1cp", "bin1", "labelof", "maybeThresholds", "interval", "defaultThresholds", "thresholdAuto", "maybeRangeInterval", "thresholdFreedmanDiaconis", "thresholdScott", "thresholdSturges", "maybeUtcInterval", "maybeBinOutputs", "outputs", "inputs", "maybeOutputs", "maybeBinOutput", "name", "reduce", "maybeOutput", "maybeBinEvaluator", "maybeEvaluator", "maybeBinReduce", "maybeReduce", "maybeBinReduceFallback", "reduceX", "reduceX1", "reduceX2", "reduceY", "reduceY1", "reduceY2", "values", "isTimeInterval", "isIterable", "bing", "EX", "EY", "I", "X", "ix", "x1", "x2", "Y", "iy", "y1", "y2", "B", "bisect_default", "C", "b", "j", "mid1", "m", "maybeIdentityY", "options", "hasY", "identity", "stackY", "stackOptions", "options", "mergeOptions", "x1", "x", "y", "rest", "transform", "X", "y1", "y2", "stack", "mid", "maybeStackY", "y", "y1", "y2", "options", "withTip", "stackY", "maybeZero", "mergeOptions", "offset", "order", "reverse", "rest", "lengthy", "stack", "x", "one", "kx", "ky", "z", "maybeZ", "X", "setX", "maybeColumn", "Y1", "setY1", "column", "Y2", "setY2", "maybeOffset", "maybeOrder", "basic", "data", "facets", "plotOptions", "maybeApplyInterval", "valueof", "Y", "Z", "compare", "n", "facetstacks", "facet", "stacks", "group", "i", "yn", "yp", "offsetExpand", "offsetCenter", "offsetWiggle", "extent", "min", "max", "m", "offsetZero", "offsetCenterFacets", "prev", "InternMap", "j", "Fi", "Df", "value", "diff", "Cf1", "cumsum", "s1", "sum", "d", "I", "m0", "p", "orderInsideOut", "ascendingDefined", "negate", "descendingDefined", "orderY", "orderZ", "orderSum", "orderAppearance", "orderAccessor", "field", "orderComparator", "orderGiven", "orderZDomain", "groupSort", "range", "greatest", "K", "sums", "rollup", "Kp", "Kn", "k", "f", "O", "domain", "map", "AbstractBar", "Mark", "data", "channels", "options", "defaults", "inset", "insetTop", "insetRight", "insetBottom", "insetLeft", "rx", "ry", "number", "impliedString", "index", "scales", "dimensions", "context", "create", "applyIndirectStyles", "g", "applyDirectStyles", "applyAttr", "applyChannelStyles", "X", "marginLeft", "Y", "marginTop", "x", "marginRight", "width", "bandwidth", "y", "marginBottom", "height", "BarY", "AbstractBar", "data", "options", "x", "y1", "y2", "defaults", "selection", "mark", "y", "applyTransform", "Y1", "Y2", "marginTop", "insetTop", "isCollapsed", "i", "marginBottom", "height", "insetBottom", "barY", "data", "options", "hasXY", "indexOf", "identity", "BarY", "maybeStackY", "maybeIntervalY", "maybeIdentityY", "treeNavController", "el", "headings", "callback", "above", "h", "rect", "threshold", "active", "level", "navItems", "item", "headingId", "selected", "expanded", "observer", "debounce", "wait", "timeout", "args", "program", "counter", "partition", "histogram", "el", "treeNavController", "Data", "Name", "max", "d", "a", "b", "plot", "barY", "frame", "n", "fixKey", "k", "keys", "union", "index", "key", "i", "fx", "fy", "binX", "text", "axisX"]
 }
diff --git a/internal/content/telemetrygodev/static/index.min.css b/internal/content/telemetrygodev/static/index.min.css
new file mode 100644
index 0000000..faebbec
--- /dev/null
+++ b/internal/content/telemetrygodev/static/index.min.css
@@ -0,0 +1,8 @@
+/* Code generated by esbuild. DO NOT EDIT. */
+.js-Tree ul{list-style:none;padding-left:0}.js-Tree-item ul{display:none}.js-Tree-item{overflow:hidden;text-overflow:ellipsis;padding:.125rem 0}.js-Tree-item[aria-expanded=true] ul{display:block}.js-Tree-item .js-Tree-item{position:relative;padding-left:1.25rem}.js-Tree-item .js-Tree-item[aria-selected=true]:before{background-color:var(--color-brand-primary);border-radius:50%;content:"";display:block;height:.3125rem;left:.4688rem;position:absolute;top:.75rem;width:.3125rem}.js-Tree-item>a{color:var(--color-text-subtle);font-size:.875rem}.js-Tree-item[aria-selected=true]>a{color:var(--color-text)}svg g[aria-label=tip] g{fill:var(--color-background)}.Chartbrowser-view{display:flex;flex-direction:row}.Chartbrowser-index{flex:1 1;padding-right:2rem}.Chartbrowser-heading{font-weight:700;font-size:1.25rem;margin:0 0 .5rem}.Chartbrowser-index-sticky{position:sticky;top:1rem;width:10rem}.Chartbrowser-index-sticky>ul{position:sticky;top:1rem;margin-top:0}.Chartbrowser-link{color:var(--color-text-subtle);font-size:.875rem;line-height:1.5rem}.Chartbrowser-program{font-weight:400;margin:0 0 1rem;color:var(--color-text-subtle)}.Chartbrowser-program:not(:first-of-type){margin-top:2rem}.Chartbrowser-chart{background-color:var(--color-background-accented);border:1px solid transparent;margin-bottom:1rem;padding:.875rem;box-shadow:0 1px 2px #3c40434d,0 1px 3px 1px #3c404326}.Chartbrowser-chart-name{text-align:center;margin:0}p{max-width:none}.Charts{margin-top:1rem}.Centered{display:flex;justify-content:center}.Charts-heading{margin:2rem;display:flex;flex-direction:column;align-items:center}.Charts-heading h2{margin:0}.Charts-heading ul{margin:.5rem 0 0;list-style:none;display:inline-flex;padding:0}.Charts-heading li{list-style:none;display:inline-flex}.Charts-heading li:not(:last-child):after{content:"|";display:block;height:1rem;margin:0 .8125rem;width:1rem;text-align:center}
+/*!
+ * Copyright 2024 The Go Authors. All rights reserved.
+ * Use of this source code is governed by a BSD-style
+ * license that can be found in the LICENSE file.
+ */
+/*# sourceMappingURL=index.min.css.map */
diff --git a/internal/content/telemetrygodev/static/index.min.css.map b/internal/content/telemetrygodev/static/index.min.css.map
new file mode 100644
index 0000000..170830f
--- /dev/null
+++ b/internal/content/telemetrygodev/static/index.min.css.map
@@ -0,0 +1,7 @@
+{
+  "version": 3,
+  "sources": ["../../shared/treenav.css", "../../shared/chartbrowser.css", "../index.css"],
+  "sourcesContent": ["/*!\n * Copyright 2024 The Go Authors. All rights reserved.\n * Use of this source code is governed by a BSD-style\n * license that can be found in the LICENSE file.\n */\n\n.js-Tree ul {\n  list-style: none;\n  padding-left: 0;\n}\n\n.js-Tree-item ul {\n  display: none;\n}\n\n.js-Tree-item {\n  overflow: hidden;\n  text-overflow: ellipsis;\n  padding: 0.125rem 0 0.125rem 0;\n}\n\n.js-Tree-item[aria-expanded='true'] ul {\n  display: block;\n}\n\n.js-Tree-item .js-Tree-item {\n  position: relative;\n  padding-left: 1.25rem;\n}\n\n.js-Tree-item .js-Tree-item[aria-selected='true']:before {\n  background-color: var(--color-brand-primary);\n  border-radius: 50%;\n  content: \"\";\n  display: block;\n  height: .3125rem;\n  left: .4688rem;\n  position: absolute;\n  top: .75rem;\n  width: .3125rem;\n}\n\n.js-Tree-item>a {\n  color: var(--color-text-subtle);\n  font-size: .875rem;\n}\n\n.js-Tree-item[aria-selected='true']>a {\n  color: var(--color-text);\n}\n\n", "/*!\n * Copyright 2024 The Go Authors. All rights reserved.\n * Use of this source code is governed by a BSD-style\n * license that can be found in the LICENSE file.\n */\n\n@import url(\"../shared/treenav.css\");\n\n/* Fix tooltip background for dark theme */\nsvg g[aria-label=\"tip\"] g {\n  fill: var(--color-background);\n}\n\n.Chartbrowser-view {\n  display: flex;\n  flex-direction: row;\n}\n.Chartbrowser-index {\n  flex: 1 1;\n  padding-right: 2rem;\n}\n.Chartbrowser-heading {\n  font-weight: bold;\n  font-size: 1.25rem;\n  margin: 0 0 0.5rem 0;\n}\n.Chartbrowser-index-sticky {\n  position: sticky;\n  top: 1rem;\n  width: 10rem;\n}\n.Chartbrowser-index-sticky > ul {\n  position: sticky;\n  top: 1rem;\n  margin-top: 0;\n}\n.Chartbrowser-link {\n  color: var(--color-text-subtle);\n  font-size: .875rem;\n  line-height: 1.5rem;\n}\n.Chartbrowser-program {\n  font-weight: normal;\n  margin: 0 0 1rem 0;\n  color: var(--color-text-subtle);\n}\n.Chartbrowser-program:not(:first-of-type) {\n  margin-top: 2rem;\n}\n.Chartbrowser-chart {\n  background-color: var(--color-background-accented);\n  border: 1px solid transparent;\n  margin-bottom: 1rem;\n  padding: 0.875rem;\n  box-shadow: 0 1px 2px 0 rgba(60, 64, 67, .3), 0 1px 3px 1px rgba(60, 64, 67, .15);\n}\n.Chartbrowser-chart-name {\n  text-align: center;\n  margin: 0;\n}\n", "/*!\n * Copyright 2024 The Go Authors. All rights reserved.\n * Use of this source code is governed by a BSD-style\n * license that can be found in the LICENSE file.\n */\n\n@import url(\"../shared/chartbrowser.css\");\n\np {\n  /* Reset from _typography.css */\n  max-width: none;\n}\n\n.Charts {\n  margin-top: 1rem;\n}\n.Centered {\n  display: flex;\n  justify-content: center;\n}\n.Charts-heading {\n  margin: 2rem;\n  display: flex;\n  flex-direction: column;\n  align-items: center;\n}\n.Charts-heading h2 {\n  margin: 0;\n}\n.Charts-heading ul {\n  margin: 0.5rem 0 0 0;\n  list-style: none;\n  display: inline-flex;\n  padding: 0;\n}\n.Charts-heading li {\n  list-style: none;\n  display: inline-flex;\n}\n.Charts-heading li:not(:last-child):after {\n  content: '|';\n  display: block;\n  height: 1rem;\n  margin: 0 0.8125rem;\n  width: 1rem;\n  text-align: center;\n}\n"],
+  "mappings": ";AAMA,YACE,gBACA,eAGF,iBACE,aAGF,cACE,gBACA,uBAjBF,kBAqBA,qCACE,cAGF,4BACE,kBACA,qBAGF,uDACE,4CA/BF,kBAiCE,WACA,cACA,gBACA,cACA,kBACA,WACA,eAGF,gBACE,+BACA,kBAGF,oCACE,wBCvCF,wBACE,6BAGF,mBACE,aACA,mBAEF,oBACE,SACA,mBAEF,sBACE,gBACA,kBAvBF,iBA0BA,2BACE,gBACA,SACA,YAEF,8BACE,gBACA,SACA,aAEF,mBACE,+BACA,kBACA,mBAEF,sBACE,gBA1CF,gBA4CE,+BAEF,0CACE,gBAEF,oBACE,kDACA,6BACA,mBApDF,gBAsDE,uDAEF,yBACE,kBAzDF,SCQA,EAEE,eAGF,QACE,gBAEF,UACE,aACA,uBAEF,gBApBA,YAsBE,aACA,sBACA,mBAEF,mBA1BA,SA6BA,mBA7BA,iBA+BE,gBACA,oBAhCF,UAmCA,mBACE,gBACA,oBAEF,0CACE,YACA,cACA,YA1CF,kBA4CE,WACA",
+  "names": []
+}