From 06c859f881be52dbc32df82b1100a1e41d50203a Mon Sep 17 00:00:00 2001 From: CJ Yetman Date: Tue, 9 Jan 2024 12:59:26 +0100 Subject: [PATCH] Update d3 v5 to use 5.16.0 --- DESCRIPTION | 2 +- NEWS.md | 4 + R/version.R | 2 +- inst/www/d3/5.16.0/API.md | 1363 ++++++++++++++++++++++ inst/www/d3/{5.9.2 => 5.16.0}/CHANGES.md | 24 +- inst/www/d3/{5.9.2 => 5.16.0}/LICENSE | 0 inst/www/d3/{5.9.2 => 5.16.0}/README.md | 6 +- inst/www/d3/5.16.0/d3.min.js | 2 + inst/www/d3/5.9.2/API.md | 1346 --------------------- inst/www/d3/5.9.2/d3.min.js | 2 - 10 files changed, 1387 insertions(+), 1364 deletions(-) create mode 100644 inst/www/d3/5.16.0/API.md rename inst/www/d3/{5.9.2 => 5.16.0}/CHANGES.md (98%) rename inst/www/d3/{5.9.2 => 5.16.0}/LICENSE (100%) rename inst/www/d3/{5.9.2 => 5.16.0}/README.md (93%) create mode 100644 inst/www/d3/5.16.0/d3.min.js delete mode 100644 inst/www/d3/5.9.2/API.md delete mode 100644 inst/www/d3/5.9.2/d3.min.js diff --git a/DESCRIPTION b/DESCRIPTION index d2a4b12..b040fb7 100644 --- a/DESCRIPTION +++ b/DESCRIPTION @@ -1,7 +1,7 @@ Package: r2d3 Type: Package Title: Interface to 'D3' Visualizations -Version: 0.2.5 +Version: 0.2.5.9000 Authors@R: c( person("Nick", "Strayer", email = "nick.strayer@rstudio.com", role = c("aut", "cre")), person("Javier", "Luraschi", email = "jluraschi@gmail.com", role = c("aut")), diff --git a/NEWS.md b/NEWS.md index 867c2b9..049d888 100644 --- a/NEWS.md +++ b/NEWS.md @@ -1,3 +1,7 @@ +# r2d3 (development version) + + - Update D3 v5 from 5.9.2 to 5.16.0 (@cjyetman). + # r2d3 0.2.5 - Support for D3 v6 (@dkjoluju, #85). diff --git a/R/version.R b/R/version.R index eac3d54..993e326 100644 --- a/R/version.R +++ b/R/version.R @@ -2,7 +2,7 @@ version_complete <- function(minor) { versions <- list( "6" = "6.2.0", - "5" = "5.9.2", + "5" = "5.16.0", "4" = "4.13.0", "3" = "3.5.17" ) diff --git a/inst/www/d3/5.16.0/API.md b/inst/www/d3/5.16.0/API.md new file mode 100644 index 0000000..7a2e6ed --- /dev/null +++ b/inst/www/d3/5.16.0/API.md @@ -0,0 +1,1363 @@ +# D3 API Reference + +D3 is a [collection of modules](https://github.com/d3) that are designed to work together; you can use the modules independently, or you can use them together as part of the default build. The source and documentation for each module is available in its repository. Follow the links below to learn more. For changes between major versions, see [CHANGES](https://github.com/d3/d3/blob/master/CHANGES.md); see also the [release notes](https://github.com/d3/d3/releases) and the [3.x reference](https://github.com/d3/d3-3.x-api-reference/blob/master/API-Reference.md). + +* [Arrays](#arrays-d3-array) ([Statistics](#statistics), [Search](#search), [Transformations](#transformations), [Histograms](#histograms)) +* [Axes](#axes-d3-axis) +* [Brushes](#brushes-d3-brush) +* [Chords](#chords-d3-chord) +* [Collections](#collections-d3-collection) ([Objects](#objects), [Maps](#maps), [Sets](#sets), [Nests](#nests)) +* [Colors](#colors-d3-color) +* [Color Schemes](#color-schemes-d3-scale-chromatic) +* [Contours](#contours-d3-contour) +* [Dispatches](#dispatches-d3-dispatch) +* [Dragging](#dragging-d3-drag) +* [Delimiter-Separated Values](#delimiter-separated-values-d3-dsv) +* [Easings](#easings-d3-ease) +* [Fetches](#fetches-d3-fetch) +* [Forces](#forces-d3-force) +* [Number Formats](#number-formats-d3-format) +* [Geographies](#geographies-d3-geo) ([Paths](#paths), [Projections](#projections), [Spherical Math](#spherical-math), [Spherical Shapes](#spherical-shapes), [Streams](#streams), [Transforms](#transforms)) +* [Hierarchies](#hierarchies-d3-hierarchy) +* [Interpolators](#interpolators-d3-interpolate) +* [Paths](#paths-d3-path) +* [Polygons](#polygons-d3-polygon) +* [Quadtrees](#quadtrees-d3-quadtree) +* [Random Numbers](#random-numbers-d3-random) +* [Scales](#scales-d3-scale) ([Continuous](#continuous-scales), [Sequential](#sequential-scales), [Diverging](#diverging-scales), [Quantize](#quantize-scales), [Ordinal](#ordinal-scales)) +* [Selections](#selections-d3-selection) ([Selecting](#selecting-elements), [Modifying](#modifying-elements), [Data](#joining-data), [Events](#handling-events), [Control](#control-flow), [Local Variables](#local-variables), [Namespaces](#namespaces)) +* [Shapes](#shapes-d3-shape) ([Arcs](#arcs), [Pies](#pies), [Lines](#lines), [Areas](#areas), [Curves](#curves), [Links](#links), [Symbols](#symbols), [Stacks](#stacks)) +* [Time Formats](#time-formats-d3-time-format) +* [Time Intervals](#time-intervals-d3-time) +* [Timers](#timers-d3-timer) +* [Transitions](#transitions-d3-transition) +* [Voronoi Diagrams](#voronoi-diagrams-d3-voronoi) +* [Zooming](#zooming-d3-zoom) + +D3 uses [semantic versioning](http://semver.org/). The current version is exposed as d3.version. + +## [Arrays (d3-array)](https://github.com/d3/d3-array/tree/v1.2.4) + +Array manipulation, ordering, searching, summarizing, etc. + +### [Statistics](https://github.com/d3/d3-array/blob/v1.2.4/README.md#statistics) + +Methods for computing basic summary statistics. + +* [d3.min](https://github.com/d3/d3-array/blob/v1.2.4/README.md#min) - compute the minimum value in an array. +* [d3.max](https://github.com/d3/d3-array/blob/v1.2.4/README.md#max) - compute the maximum value in an array. +* [d3.extent](https://github.com/d3/d3-array/blob/v1.2.4/README.md#extent) - compute the minimum and maximum value in an array. +* [d3.sum](https://github.com/d3/d3-array/blob/v1.2.4/README.md#sum) - compute the sum of an array of numbers. +* [d3.mean](https://github.com/d3/d3-array/blob/v1.2.4/README.md#mean) - compute the arithmetic mean of an array of numbers. +* [d3.median](https://github.com/d3/d3-array/blob/v1.2.4/README.md#median) - compute the median of an array of numbers (the 0.5-quantile). +* [d3.quantile](https://github.com/d3/d3-array/blob/v1.2.4/README.md#quantile) - compute a quantile for a sorted array of numbers. +* [d3.variance](https://github.com/d3/d3-array/blob/v1.2.4/README.md#variance) - compute the variance of an array of numbers. +* [d3.deviation](https://github.com/d3/d3-array/blob/v1.2.4/README.md#deviation) - compute the standard deviation of an array of numbers. + +### [Search](https://github.com/d3/d3-array/blob/v1.2.4/README.md#search) + +Methods for searching arrays for a specific element. + +* [d3.scan](https://github.com/d3/d3-array/blob/v1.2.4/README.md#scan) - linear search for an element using a comparator. +* [d3.bisect](https://github.com/d3/d3-array/blob/v1.2.4/README.md#bisect) - binary search for a value in a sorted array. +* [d3.bisectRight](https://github.com/d3/d3-array/blob/v1.2.4/README.md#bisectRight) - binary search for a value in a sorted array. +* [d3.bisectLeft](https://github.com/d3/d3-array/blob/v1.2.4/README.md#bisectLeft) - binary search for a value in a sorted array. +* [d3.bisector](https://github.com/d3/d3-array/blob/v1.2.4/README.md#bisector) - bisect using an accessor or comparator. +* [*bisector*.left](https://github.com/d3/d3-array/blob/v1.2.4/README.md#bisector_left) - bisectLeft, with the given comparator. +* [*bisector*.right](https://github.com/d3/d3-array/blob/v1.2.4/README.md#bisector_right) - bisectRight, with the given comparator. +* [d3.ascending](https://github.com/d3/d3-array/blob/v1.2.4/README.md#ascending) - compute the natural order of two values. +* [d3.descending](https://github.com/d3/d3-array/blob/v1.2.4/README.md#descending) - compute the natural order of two values. + +### [Transformations](https://github.com/d3/d3-array/blob/v1.2.4/README.md#transformations) + +Methods for transforming arrays and for generating new arrays. + +* [d3.cross](https://github.com/d3/d3-array/blob/v1.2.4/README.md#cross) - compute the Cartesian product of two arrays. +* [d3.merge](https://github.com/d3/d3-array/blob/v1.2.4/README.md#merge) - merge multiple arrays into one array. +* [d3.pairs](https://github.com/d3/d3-array/blob/v1.2.4/README.md#pairs) - create an array of adjacent pairs of elements. +* [d3.permute](https://github.com/d3/d3-array/blob/v1.2.4/README.md#permute) - reorder an array of elements according to an array of indexes. +* [d3.shuffle](https://github.com/d3/d3-array/blob/v1.2.4/README.md#shuffle) - randomize the order of an array. +* [d3.ticks](https://github.com/d3/d3-array/blob/v1.2.4/README.md#ticks) - generate representative values from a numeric interval. +* [d3.tickIncrement](https://github.com/d3/d3-array/blob/v1.2.4/README.md#tickIncrement) - generate representative values from a numeric interval. +* [d3.tickStep](https://github.com/d3/d3-array/blob/v1.2.4/README.md#tickStep) - generate representative values from a numeric interval. +* [d3.range](https://github.com/d3/d3-array/blob/v1.2.4/README.md#range) - generate a range of numeric values. +* [d3.transpose](https://github.com/d3/d3-array/blob/v1.2.4/README.md#transpose) - transpose an array of arrays. +* [d3.zip](https://github.com/d3/d3-array/blob/v1.2.4/README.md#zip) - transpose a variable number of arrays. + +### [Histograms](https://github.com/d3/d3-array/blob/v1.2.4/README.md#histograms) + +Bin discrete samples into continuous, non-overlapping intervals. + +* [d3.histogram](https://github.com/d3/d3-array/blob/v1.2.4/README.md#histogram) - create a new histogram generator. +* [*histogram*](https://github.com/d3/d3-array/blob/v1.2.4/README.md#_histogram) - compute the histogram for the given array of samples. +* [*histogram*.value](https://github.com/d3/d3-array/blob/v1.2.4/README.md#histogram_value) - specify a value accessor for each sample. +* [*histogram*.domain](https://github.com/d3/d3-array/blob/v1.2.4/README.md#histogram_domain) - specify the interval of observable values. +* [*histogram*.thresholds](https://github.com/d3/d3-array/blob/v1.2.4/README.md#histogram_thresholds) - specify how values are divided into bins. +* [d3.thresholdFreedmanDiaconis](https://github.com/d3/d3-array/blob/v1.2.4/README.md#thresholdFreedmanDiaconis) - the Freedman–Diaconis binning rule. +* [d3.thresholdScott](https://github.com/d3/d3-array/blob/v1.2.4/README.md#thresholdScott) - Scott’s normal reference binning rule. +* [d3.thresholdSturges](https://github.com/d3/d3-array/blob/v1.2.4/README.md#thresholdSturges) - Sturges’ binning formula. + +## [Axes (d3-axis)](https://github.com/d3/d3-axis/tree/v1.0.12) + +Human-readable reference marks for scales. + +* [d3.axisTop](https://github.com/d3/d3-axis/blob/v1.0.12/README.md#axisTop) - create a new top-oriented axis generator. +* [d3.axisRight](https://github.com/d3/d3-axis/blob/v1.0.12/README.md#axisRight) - create a new right-oriented axis generator. +* [d3.axisBottom](https://github.com/d3/d3-axis/blob/v1.0.12/README.md#axisBottom) - create a new bottom-oriented axis generator. +* [d3.axisLeft](https://github.com/d3/d3-axis/blob/v1.0.12/README.md#axisLeft) - create a new left-oriented axis generator. +* [*axis*](https://github.com/d3/d3-axis/blob/v1.0.12/README.md#_axis) - generate an axis for the given selection. +* [*axis*.scale](https://github.com/d3/d3-axis/blob/v1.0.12/README.md#axis_scale) - set the scale. +* [*axis*.ticks](https://github.com/d3/d3-axis/blob/v1.0.12/README.md#axis_ticks) - customize how ticks are generated and formatted. +* [*axis*.tickArguments](https://github.com/d3/d3-axis/blob/v1.0.12/README.md#axis_tickArguments) - customize how ticks are generated and formatted. +* [*axis*.tickValues](https://github.com/d3/d3-axis/blob/v1.0.12/README.md#axis_tickValues) - set the tick values explicitly. +* [*axis*.tickFormat](https://github.com/d3/d3-axis/blob/v1.0.12/README.md#axis_tickFormat) - set the tick format explicitly. +* [*axis*.tickSize](https://github.com/d3/d3-axis/blob/v1.0.12/README.md#axis_tickSize) - set the size of the ticks. +* [*axis*.tickSizeInner](https://github.com/d3/d3-axis/blob/v1.0.12/README.md#axis_tickSizeInner) - set the size of inner ticks. +* [*axis*.tickSizeOuter](https://github.com/d3/d3-axis/blob/v1.0.12/README.md#axis_tickSizeOuter) - set the size of outer (extent) ticks. +* [*axis*.tickPadding](https://github.com/d3/d3-axis/blob/v1.0.12/README.md#axis_tickPadding) - set the padding between ticks and labels. + +## [Brushes (d3-brush)](https://github.com/d3/d3-brush/tree/v1.1.5) + +Select a one- or two-dimensional region using the mouse or touch. + +* [d3.brush](https://github.com/d3/d3-brush/blob/v1.1.5/README.md#brush) - create a new two-dimensional brush. +* [d3.brushX](https://github.com/d3/d3-brush/blob/v1.1.5/README.md#brushX) - create a brush along the *x*-dimension. +* [d3.brushY](https://github.com/d3/d3-brush/blob/v1.1.5/README.md#brushY) - create a brush along the *y*-dimension. +* [*brush*](https://github.com/d3/d3-brush/blob/v1.1.5/README.md#_brush) - apply the brush to a selection. +* [*brush*.move](https://github.com/d3/d3-brush/blob/v1.1.5/README.md#brush_move) - move the brush selection. +* [*brush*.clear](https://github.com/d3/d3-brush/blob/v1.1.5/README.md#brush_clear) - clear the brush selection. +* [*brush*.extent](https://github.com/d3/d3-brush/blob/v1.1.5/README.md#brush_extent) - define the brushable region. +* [*brush*.filter](https://github.com/d3/d3-brush/blob/v1.1.5/README.md#brush_filter) - control which input events initiate brushing. +* [*brush*.handleSize](https://github.com/d3/d3-brush/blob/v1.1.5/README.md#brush_handleSize) - set the size of the brush handles. +* [*brush*.touchable](https://github.com/d3/d3-brush/blob/v1.1.5/README.md#brush_touchable) - set the touch support detector. +* [*brush*.keyModifiers](https://github.com/d3/d3-brush/blob/v1.1.5/README.md#brush_keyModifiers) - enable or disable key interaction. +* [*brush*.on](https://github.com/d3/d3-brush/blob/v1.1.5/README.md#brush_on) - listen for brush events. +* [d3.brushSelection](https://github.com/d3/d3-brush/blob/v1.1.5/README.md#brushSelection) - get the brush selection for a given node. + +## [Chords (d3-chord)](https://github.com/d3/d3-chord/tree/v1.0.6) + +* [d3.chord](https://github.com/d3/d3-chord/blob/v1.0.6/README.md#chord) - create a new chord layout. +* [*chord*](https://github.com/d3/d3-chord/blob/v1.0.6/README.md#_chord) - compute the layout for the given matrix. +* [*chord*.padAngle](https://github.com/d3/d3-chord/blob/v1.0.6/README.md#chord_padAngle) - set the padding between adjacent groups. +* [*chord*.sortGroups](https://github.com/d3/d3-chord/blob/v1.0.6/README.md#chord_sortGroups) - define the group order. +* [*chord*.sortSubgroups](https://github.com/d3/d3-chord/blob/v1.0.6/README.md#chord_sortSubgroups) - define the source and target order within groups. +* [*chord*.sortChords](https://github.com/d3/d3-chord/blob/v1.0.6/README.md#chord_sortChords) - define the chord order across groups. +* [d3.ribbon](https://github.com/d3/d3-chord/blob/v1.0.6/README.md#ribbon) - create a ribbon shape generator. +* [*ribbon*](https://github.com/d3/d3-chord/blob/v1.0.6/README.md#_ribbon) - generate a ribbon shape. +* [*ribbon*.source](https://github.com/d3/d3-chord/blob/v1.0.6/README.md#ribbon_source) - set the source accessor. +* [*ribbon*.target](https://github.com/d3/d3-chord/blob/v1.0.6/README.md#ribbon_target) - set the target accessor. +* [*ribbon*.radius](https://github.com/d3/d3-chord/blob/v1.0.6/README.md#ribbon_radius) - set the ribbon source or target radius. +* [*ribbon*.startAngle](https://github.com/d3/d3-chord/blob/v1.0.6/README.md#ribbon_startAngle) - set the ribbon source or target start angle. +* [*ribbon*.endAngle](https://github.com/d3/d3-chord/blob/v1.0.6/README.md#ribbon_endAngle) - set the ribbon source or target end angle. +* [*ribbon*.context](https://github.com/d3/d3-chord/blob/v1.0.6/README.md#ribbon_context) - set the render context. + +## [Collections (d3-collection)](https://github.com/d3/d3-collection/tree/v1.0.7) + +Handy data structures for elements keyed by string. + +### [Objects](https://github.com/d3/d3-collection/blob/v1.0.7/README.md#objects) + +Methods for converting associative arrays (objects) to arrays. + +* [d3.keys](https://github.com/d3/d3-collection/blob/v1.0.7/README.md#keys) - list the keys of an associative array. +* [d3.values](https://github.com/d3/d3-collection/blob/v1.0.7/README.md#values) - list the values of an associated array. +* [d3.entries](https://github.com/d3/d3-collection/blob/v1.0.7/README.md#entries) - list the key-value entries of an associative array. + +### [Maps](https://github.com/d3/d3-collection/blob/v1.0.7/README.md#maps) + +Like ES6 Map, but with string keys and a few other differences. + +* [d3.map](https://github.com/d3/d3-collection/blob/v1.0.7/README.md#map) - create a new, empty map. +* [*map*.has](https://github.com/d3/d3-collection/blob/v1.0.7/README.md#map_has) - returns true if the map contains the given key. +* [*map*.get](https://github.com/d3/d3-collection/blob/v1.0.7/README.md#map_get) - get the value for the given key. +* [*map*.set](https://github.com/d3/d3-collection/blob/v1.0.7/README.md#map_set) - set the value for the given key. +* [*map*.remove](https://github.com/d3/d3-collection/blob/v1.0.7/README.md#map_remove) - remove the entry for given key. +* [*map*.clear](https://github.com/d3/d3-collection/blob/v1.0.7/README.md#map_clear) - remove all entries. +* [*map*.keys](https://github.com/d3/d3-collection/blob/v1.0.7/README.md#map_keys) - get the array of keys. +* [*map*.values](https://github.com/d3/d3-collection/blob/v1.0.7/README.md#map_values) - get the array of values. +* [*map*.entries](https://github.com/d3/d3-collection/blob/v1.0.7/README.md#map_entries) - get the array of entries (key-values objects). +* [*map*.each](https://github.com/d3/d3-collection/blob/v1.0.7/README.md#map_each) - call a function for each entry. +* [*map*.empty](https://github.com/d3/d3-collection/blob/v1.0.7/README.md#map_empty) - returns false if the map has at least one entry. +* [*map*.size](https://github.com/d3/d3-collection/blob/v1.0.7/README.md#map_size) - compute the number of entries. + +### [Sets](https://github.com/d3/d3-collection/blob/v1.0.7/README.md#sets) + +Like ES6 Set, but with string keys and a few other differences. + +* [d3.set](https://github.com/d3/d3-collection/blob/v1.0.7/README.md#set) - create a new, empty set. +* [*set*.has](https://github.com/d3/d3-collection/blob/v1.0.7/README.md#set_has) - returns true if the set contains the given value. +* [*set*.add](https://github.com/d3/d3-collection/blob/v1.0.7/README.md#set_add) - add the given value. +* [*set*.remove](https://github.com/d3/d3-collection/blob/v1.0.7/README.md#set_remove) - remove the given value. +* [*set*.clear](https://github.com/d3/d3-collection/blob/v1.0.7/README.md#set_clear) - remove all values. +* [*set*.values](https://github.com/d3/d3-collection/blob/v1.0.7/README.md#set_values) - get the array of values. +* [*set*.each](https://github.com/d3/d3-collection/blob/v1.0.7/README.md#set_each) - call a function for each value. +* [*set*.empty](https://github.com/d3/d3-collection/blob/v1.0.7/README.md#set_empty) - returns true if the set has at least one value. +* [*set*.size](https://github.com/d3/d3-collection/blob/v1.0.7/README.md#set_size) - compute the number of values. + +### [Nests](https://github.com/d3/d3-collection/blob/v1.0.7/README.md#nests) + +Group data into arbitrary hierarchies. + +* [d3.nest](https://github.com/d3/d3-collection/blob/v1.0.7/README.md#nest) - create a new nest generator. +* [*nest*.key](https://github.com/d3/d3-collection/blob/v1.0.7/README.md#nest_key) - add a level to the nest hierarchy. +* [*nest*.sortKeys](https://github.com/d3/d3-collection/blob/v1.0.7/README.md#nest_sortKeys) - sort the current nest level by key. +* [*nest*.sortValues](https://github.com/d3/d3-collection/blob/v1.0.7/README.md#nest_sortValues) - sort the leaf nest level by value. +* [*nest*.rollup](https://github.com/d3/d3-collection/blob/v1.0.7/README.md#nest_rollup) - specify a rollup function for leaf values. +* [*nest*.map](https://github.com/d3/d3-collection/blob/v1.0.7/README.md#nest_map) - generate the nest, returning a map. +* [*nest*.object](https://github.com/d3/d3-collection/blob/v1.0.7/README.md#nest_object) - generate the nest, returning an associative array. +* [*nest*.entries](https://github.com/d3/d3-collection/blob/v1.0.7/README.md#nest_entries) - generate the nest, returning an array of key-values tuples. + +## [Colors (d3-color)](https://github.com/d3/d3-color/tree/v1.4.1) + +Color manipulation and color space conversion. + +* [d3.color](https://github.com/d3/d3-color/blob/v1.4.1/README.md#color) - parse the given CSS color specifier. +* [*color*.copy](https://github.com/d3/d3-color/blob/v1.4.1/README.md#color_copy) - return a copy of this color. +* [*color*.rgb](https://github.com/d3/d3-color/blob/v1.4.1/README.md#color_rgb) - compute the RGB equivalent of this color. +* [*color*.brighter](https://github.com/d3/d3-color/blob/v1.4.1/README.md#color_brighter) - create a brighter copy of this color. +* [*color*.darker](https://github.com/d3/d3-color/blob/v1.4.1/README.md#color_darker) - create a darker copy of this color. +* [*color*.displayable](https://github.com/d3/d3-color/blob/v1.4.1/README.md#color_displayable) - returns true if the color is displayable on standard hardware. +* [*color*.formatHex](https://github.com/d3/d3-color/blob/v1.4.1/README.md#color_formatHex) - returns the hexadecimal RGB string representation of this color. +* [*color*.formatHsl](https://github.com/d3/d3-color/blob/v1.4.1/README.md#color_formatHsl) - returns the RGB string representation of this color. +* [*color*.formatRgb](https://github.com/d3/d3-color/blob/v1.4.1/README.md#color_formatRgb) - returns the HSL string representation of this color. +* [*color*.toString](https://github.com/d3/d3-color/blob/v1.4.1/README.md#color_toString) - returns the RGB string representation of this color. +* [d3.rgb](https://github.com/d3/d3-color/blob/v1.4.1/README.md#rgb) - create a new RGB color. +* [d3.hsl](https://github.com/d3/d3-color/blob/v1.4.1/README.md#hsl) - create a new HSL color. +* [d3.lab](https://github.com/d3/d3-color/blob/v1.4.1/README.md#lab) - create a new Lab color. +* [d3.hcl](https://github.com/d3/d3-color/blob/v1.4.1/README.md#hcl) - create a new HCL color. +* [d3.lch](https://github.com/d3/d3-color/blob/v1.4.1/README.md#lch) - create a new HCL color. +* [d3.gray](https://github.com/d3/d3-color/blob/v1.4.1/README.md#gray) - create a new Lab gray. +* [d3.cubehelix](https://github.com/d3/d3-color/blob/v1.4.1/README.md#cubehelix) - create a new Cubehelix color. + +## [Color Schemes (d3-scale-chromatic)](https://github.com/d3/d3-scale-chromatic/tree/v1.5.0) + +Color ramps and palettes for quantitative, ordinal and categorical scales. + +### Categorical + +* [d3.schemeCategory10](https://github.com/d3/d3-scale-chromatic/blob/v1.5.0/README.md#schemeCategory10) - +* [d3.schemeAccent](https://github.com/d3/d3-scale-chromatic/blob/v1.5.0/README.md#schemeAccent) - +* [d3.schemeDark2](https://github.com/d3/d3-scale-chromatic/blob/v1.5.0/README.md#schemeDark2) - +* [d3.schemePaired](https://github.com/d3/d3-scale-chromatic/blob/v1.5.0/README.md#schemePaired) - +* [d3.schemePastel1](https://github.com/d3/d3-scale-chromatic/blob/v1.5.0/README.md#schemePastel1) - +* [d3.schemePastel2](https://github.com/d3/d3-scale-chromatic/blob/v1.5.0/README.md#schemePastel2) - +* [d3.schemeSet1](https://github.com/d3/d3-scale-chromatic/blob/v1.5.0/README.md#schemeSet1) - +* [d3.schemeSet2](https://github.com/d3/d3-scale-chromatic/blob/v1.5.0/README.md#schemeSet2) - +* [d3.schemeSet3](https://github.com/d3/d3-scale-chromatic/blob/v1.5.0/README.md#schemeSet3) - +* [d3.schemeTableau10](https://github.com/d3/d3-scale-chromatic/blob/v1.5.0/README.md#schemeTableau10) - + +### Diverging + +* [d3.interpolateBrBG](https://github.com/d3/d3-scale-chromatic/blob/v1.5.0/README.md#interpolateBrBG) - +* [d3.interpolatePiYG](https://github.com/d3/d3-scale-chromatic/blob/v1.5.0/README.md#interpolatePiYG) - +* [d3.interpolatePRGn](https://github.com/d3/d3-scale-chromatic/blob/v1.5.0/README.md#interpolatePRGn) - +* [d3.interpolatePuOr](https://github.com/d3/d3-scale-chromatic/blob/v1.5.0/README.md#interpolatePuOr) - +* [d3.interpolateRdBu](https://github.com/d3/d3-scale-chromatic/blob/v1.5.0/README.md#interpolateRdBu) - +* [d3.interpolateRdGy](https://github.com/d3/d3-scale-chromatic/blob/v1.5.0/README.md#interpolateRdGy) - +* [d3.interpolateRdYlBu](https://github.com/d3/d3-scale-chromatic/blob/v1.5.0/README.md#interpolateRdYlBu) - +* [d3.interpolateRdYlGn](https://github.com/d3/d3-scale-chromatic/blob/v1.5.0/README.md#interpolateRdYlGn) - +* [d3.interpolateSpectral](https://github.com/d3/d3-scale-chromatic/blob/v1.5.0/README.md#interpolateSpectral) - +* [d3.schemeBrBG](https://github.com/d3/d3-scale-chromatic/blob/v1.5.0/README.md#schemeBrBG) - +* [d3.schemePiYG](https://github.com/d3/d3-scale-chromatic/blob/v1.5.0/README.md#schemePiYG) - +* [d3.schemePRGn](https://github.com/d3/d3-scale-chromatic/blob/v1.5.0/README.md#schemePRGn) - +* [d3.schemePuOr](https://github.com/d3/d3-scale-chromatic/blob/v1.5.0/README.md#schemePuOr) - +* [d3.schemeRdBu](https://github.com/d3/d3-scale-chromatic/blob/v1.5.0/README.md#schemeRdBu) - +* [d3.schemeRdGy](https://github.com/d3/d3-scale-chromatic/blob/v1.5.0/README.md#schemeRdGy) - +* [d3.schemeRdYlBu](https://github.com/d3/d3-scale-chromatic/blob/v1.5.0/README.md#schemeRdYlBu) - +* [d3.schemeRdYlGn](https://github.com/d3/d3-scale-chromatic/blob/v1.5.0/README.md#schemeRdYlGn) - +* [d3.schemeSpectral](https://github.com/d3/d3-scale-chromatic/blob/v1.5.0/README.md#schemeSpectral) - + +### Sequential (Single Hue) + +* [d3.interpolateBlues](https://github.com/d3/d3-scale-chromatic/blob/v1.5.0/README.md#interpolateBlues) - +* [d3.interpolateGreens](https://github.com/d3/d3-scale-chromatic/blob/v1.5.0/README.md#interpolateGreens) - +* [d3.interpolateGreys](https://github.com/d3/d3-scale-chromatic/blob/v1.5.0/README.md#interpolateGreys) - +* [d3.interpolateOranges](https://github.com/d3/d3-scale-chromatic/blob/v1.5.0/README.md#interpolateOranges) - +* [d3.interpolatePurples](https://github.com/d3/d3-scale-chromatic/blob/v1.5.0/README.md#interpolatePurples) - +* [d3.interpolateReds](https://github.com/d3/d3-scale-chromatic/blob/v1.5.0/README.md#interpolateReds) - +* [d3.schemeBlues](https://github.com/d3/d3-scale-chromatic/blob/v1.5.0/README.md#schemeBlues) - +* [d3.schemeGreens](https://github.com/d3/d3-scale-chromatic/blob/v1.5.0/README.md#schemeGreens) - +* [d3.schemeGreys](https://github.com/d3/d3-scale-chromatic/blob/v1.5.0/README.md#schemeGreys) - +* [d3.schemeOranges](https://github.com/d3/d3-scale-chromatic/blob/v1.5.0/README.md#schemeOranges) - +* [d3.schemePurples](https://github.com/d3/d3-scale-chromatic/blob/v1.5.0/README.md#schemePurples) - +* [d3.schemeReds](https://github.com/d3/d3-scale-chromatic/blob/v1.5.0/README.md#schemeReds) - + +### Sequential (Multi-Hue) + +* [d3.interpolateBuGn](https://github.com/d3/d3-scale-chromatic/blob/v1.5.0/README.md#interpolateBuGn) - +* [d3.interpolateBuPu](https://github.com/d3/d3-scale-chromatic/blob/v1.5.0/README.md#interpolateBuPu) - +* [d3.interpolateCividis](https://github.com/d3/d3-scale-chromatic/blob/v1.5.0/README.md#interpolateCividis) - +* [d3.interpolateCool](https://github.com/d3/d3-scale-chromatic/blob/v1.5.0/README.md#interpolateCool) - +* [d3.interpolateCubehelixDefault](https://github.com/d3/d3-scale-chromatic/blob/v1.5.0/README.md#interpolateCubehelixDefault) - +* [d3.interpolateGnBu](https://github.com/d3/d3-scale-chromatic/blob/v1.5.0/README.md#interpolateGnBu) - +* [d3.interpolateInferno](https://github.com/d3/d3-scale-chromatic/blob/v1.5.0/README.md#interpolateInferno) - +* [d3.interpolateMagma](https://github.com/d3/d3-scale-chromatic/blob/v1.5.0/README.md#interpolateMagma) - +* [d3.interpolateOrRd](https://github.com/d3/d3-scale-chromatic/blob/v1.5.0/README.md#interpolateOrRd) - +* [d3.interpolatePlasma](https://github.com/d3/d3-scale-chromatic/blob/v1.5.0/README.md#interpolatePlasma) - +* [d3.interpolatePuBu](https://github.com/d3/d3-scale-chromatic/blob/v1.5.0/README.md#interpolatePuBu) - +* [d3.interpolatePuBuGn](https://github.com/d3/d3-scale-chromatic/blob/v1.5.0/README.md#interpolatePuBuGn) - +* [d3.interpolatePuRd](https://github.com/d3/d3-scale-chromatic/blob/v1.5.0/README.md#interpolatePuRd) - +* [d3.interpolateRdPu](https://github.com/d3/d3-scale-chromatic/blob/v1.5.0/README.md#interpolateRdPu) - +* [d3.interpolateTurbo](https://github.com/d3/d3-scale-chromatic/blob/v1.5.0/README.md#interpolateTurbo) - +* [d3.interpolateViridis](https://github.com/d3/d3-scale-chromatic/blob/v1.5.0/README.md#interpolateViridis) - +* [d3.interpolateWarm](https://github.com/d3/d3-scale-chromatic/blob/v1.5.0/README.md#interpolateWarm) - +* [d3.interpolateYlGn](https://github.com/d3/d3-scale-chromatic/blob/v1.5.0/README.md#interpolateYlGn) - +* [d3.interpolateYlGnBu](https://github.com/d3/d3-scale-chromatic/blob/v1.5.0/README.md#interpolateYlGnBu) - +* [d3.interpolateYlOrBr](https://github.com/d3/d3-scale-chromatic/blob/v1.5.0/README.md#interpolateYlOrBr) - +* [d3.interpolateYlOrRd](https://github.com/d3/d3-scale-chromatic/blob/v1.5.0/README.md#interpolateYlOrRd) - +* [d3.schemeBuGn](https://github.com/d3/d3-scale-chromatic/blob/v1.5.0/README.md#schemeBuGn) - +* [d3.schemeBuPu](https://github.com/d3/d3-scale-chromatic/blob/v1.5.0/README.md#schemeBuPu) - +* [d3.schemeGnBu](https://github.com/d3/d3-scale-chromatic/blob/v1.5.0/README.md#schemeGnBu) - +* [d3.schemeOrRd](https://github.com/d3/d3-scale-chromatic/blob/v1.5.0/README.md#schemeOrRd) - +* [d3.schemePuBu](https://github.com/d3/d3-scale-chromatic/blob/v1.5.0/README.md#schemePuBu) - +* [d3.schemePuBuGn](https://github.com/d3/d3-scale-chromatic/blob/v1.5.0/README.md#schemePuBuGn) - +* [d3.schemePuRd](https://github.com/d3/d3-scale-chromatic/blob/v1.5.0/README.md#schemePuRd) - +* [d3.schemeRdPu](https://github.com/d3/d3-scale-chromatic/blob/v1.5.0/README.md#schemeRdPu) - +* [d3.schemeYlGn](https://github.com/d3/d3-scale-chromatic/blob/v1.5.0/README.md#schemeYlGn) - +* [d3.schemeYlGnBu](https://github.com/d3/d3-scale-chromatic/blob/v1.5.0/README.md#schemeYlGnBu) - +* [d3.schemeYlOrBr](https://github.com/d3/d3-scale-chromatic/blob/v1.5.0/README.md#schemeYlOrBr) - +* [d3.schemeYlOrRd](https://github.com/d3/d3-scale-chromatic/blob/v1.5.0/README.md#schemeYlOrRd) - + +### Cyclical + +* [d3.interpolateRainbow](https://github.com/d3/d3-scale-chromatic/blob/v1.5.0/README.md#interpolateRainbow) - the “less-angry” rainbow +* [d3.interpolateSinebow](https://github.com/d3/d3-scale-chromatic/blob/v1.5.0/README.md#interpolateSinebow) - the “sinebow” smooth rainbow + +## [Contours (d3-contour)](https://github.com/d3/d3-contour/tree/v1.3.2) + +Compute contour polygons using marching squares. + +* [d3.contours](https://github.com/d3/d3-contour/blob/v1.3.2/README.md#contours) - create a new contour generator. +* [contours](https://github.com/d3/d3-contour/blob/v1.3.2/README.md#_contours) - compute the contours for a given grid of values. +* [contours.contour](https://github.com/d3/d3-contour/blob/v1.3.2/README.md#contours_contour) - +* [contours.size](https://github.com/d3/d3-contour/blob/v1.3.2/README.md#contours_size) - +* [contours.smooth](https://github.com/d3/d3-contour/blob/v1.3.2/README.md#contours_smooth) - +* [contours.thresholds](https://github.com/d3/d3-contour/blob/v1.3.2/README.md#contours_thresholds) - +* [d3.contourDensity](https://github.com/d3/d3-contour/blob/v1.3.2/README.md#contourDensity) - create a new density estimator. +* [density](https://github.com/d3/d3-contour/blob/v1.3.2/README.md#_density) - estimate the density of a given array of samples. +* [density.x](https://github.com/d3/d3-contour/blob/v1.3.2/README.md#density_x) - +* [density.y](https://github.com/d3/d3-contour/blob/v1.3.2/README.md#density_y) - +* [density.size](https://github.com/d3/d3-contour#density_size) - +* [density.cellSize](https://github.com/d3/d3-contour/blob/v1.3.2/README.md#density_cellSize) - +* [density.thresholds](https://github.com/d3/d3-contour/blob/v1.3.2/README.md#density_thresholds) - +* [density.bandwidth](https://github.com/d3/d3-contour/blob/v1.3.2/README.md#density_bandwidth) - +* [density.weight](https://github.com/d3/d3-contour/blob/v1.3.2/README.md#density_weight) - + +## [Dispatches (d3-dispatch)](https://github.com/d3/d3-dispatch/tree/v1.0.6) + +Separate concerns using named callbacks. + +* [d3.dispatch](https://github.com/d3/d3-dispatch/blob/v1.0.6/README.md#dispatch) - create a custom event dispatcher. +* [*dispatch*.on](https://github.com/d3/d3-dispatch/blob/v1.0.6/README.md#dispatch_on) - register or unregister an event listener. +* [*dispatch*.copy](https://github.com/d3/d3-dispatch/blob/v1.0.6/README.md#dispatch_copy) - create a copy of a dispatcher. +* [*dispatch*.*call*](https://github.com/d3/d3-dispatch/blob/v1.0.6/README.md#dispatch_call) - dispatch an event to registered listeners. +* [*dispatch*.*apply*](https://github.com/d3/d3-dispatch/blob/v1.0.6/README.md#dispatch_apply) - dispatch an event to registered listeners. + +## [Dragging (d3-drag)](https://github.com/d3/d3-drag/tree/v1.2.5) + +Drag and drop SVG, HTML or Canvas using mouse or touch input. + +* [d3.drag](https://github.com/d3/d3-drag/blob/v1.2.5/README.md#drag) - create a drag behavior. +* [*drag*](https://github.com/d3/d3-drag/blob/v1.2.5/README.md#_drag) - apply the drag behavior to a selection. +* [*drag*.container](https://github.com/d3/d3-drag/blob/v1.2.5/README.md#drag_container) - set the coordinate system. +* [*drag*.filter](https://github.com/d3/d3-drag/blob/v1.2.5/README.md#drag_filter) - ignore some initiating input events. +* [*drag*.touchable](https://github.com/d3/d3-drag/blob/v1.2.5/README.md#drag_touchable) - set the touch support detector. +* [*drag*.subject](https://github.com/d3/d3-drag/blob/v1.2.5/README.md#drag_subject) - set the thing being dragged. +* [*drag*.clickDistance](https://github.com/d3/d3-drag/blob/v1.2.5/README.md#drag_clickDistance) - set the click distance threshold. +* [*drag*.on](https://github.com/d3/d3-drag/blob/v1.2.5/README.md#drag_on) - listen for drag events. +* [*event*.on](https://github.com/d3/d3-drag/blob/v1.2.5/README.md#event_on) - listen for drag events on the current gesture. +* [d3.dragDisable](https://github.com/d3/d3-drag/blob/v1.2.5/README.md#dragDisable) - prevent native drag-and-drop and text selection. +* [d3.dragEnable](https://github.com/d3/d3-drag/blob/v1.2.5/README.md#dragEnable) - enable native drag-and-drop and text selection. + +## [Delimiter-Separated Values (d3-dsv)](https://github.com/d3/d3-dsv/tree/v1.2.0) + +Parse and format delimiter-separated values, most commonly CSV and TSV. + +* [d3.dsvFormat](https://github.com/d3/d3-dsv/blob/v1.2.0/README.md#dsvFormat) - create a new parser and formatter for the given delimiter. +* [*dsv*.parse](https://github.com/d3/d3-dsv/blob/v1.2.0/README.md#dsv_parse) - parse the given string, returning an array of objects. +* [*dsv*.parseRows](https://github.com/d3/d3-dsv/blob/v1.2.0/README.md#dsv_parseRows) - parse the given string, returning an array of rows. +* [*dsv*.format](https://github.com/d3/d3-dsv/blob/v1.2.0/README.md#dsv_format) - format the given array of objects. +* [*dsv*.formatBody](https://github.com/d3/d3-dsv/blob/v1.2.0/README.md#dsv_formatBody) - format the given array of objects. +* [*dsv*.formatRows](https://github.com/d3/d3-dsv/blob/v1.2.0/README.md#dsv_formatRows) - format the given array of rows. +* [*dsv*.formatRow](https://github.com/d3/d3-dsv/blob/v1.2.0/README.md#dsv_formatRow) - format the given row. +* [*dsv*.formatValue](https://github.com/d3/d3-dsv/blob/v1.2.0/README.md#dsv_formatValue) - format the given value. +* [d3.autoType](https://github.com/d3/d3-dsv/blob/v1.2.0/README.md#autoType) - automatically infer value types for the given object. +* [d3.csvParse](https://github.com/d3/d3-dsv/blob/v1.2.0/README.md#csvParse) - parse the given CSV string, returning an array of objects. +* [d3.csvParseRows](https://github.com/d3/d3-dsv/blob/v1.2.0/README.md#csvParseRows) - parse the given CSV string, returning an array of rows. +* [d3.csvFormat](https://github.com/d3/d3-dsv/blob/v1.2.0/README.md#csvFormat) - format the given array of objects as CSV. +* [d3.csvFormatBody](https://github.com/d3/d3-dsv/blob/v1.2.0/README.md#csvFormatBody) - format the given array of objects as CSV. +* [d3.csvFormatRows](https://github.com/d3/d3-dsv/blob/v1.2.0/README.md#csvFormatRows) - format the given array of rows as CSV. +* [d3.csvFormatRow](https://github.com/d3/d3-dsv/blob/v1.2.0/README.md#csvFormatRow) - format the given row as CSV. +* [d3.csvFormatValue](https://github.com/d3/d3-dsv/blob/v1.2.0/README.md#csvFormatValue) - format the given value as CSV. +* [d3.tsvParse](https://github.com/d3/d3-dsv/blob/v1.2.0/README.md#tsvParse) - parse the given TSV string, returning an array of objects. +* [d3.tsvParseRows](https://github.com/d3/d3-dsv/blob/v1.2.0/README.md#tsvParseRows) - parse the given TSV string, returning an array of rows. +* [d3.tsvFormat](https://github.com/d3/d3-dsv/blob/v1.2.0/README.md#tsvFormat) - format the given array of objects as TSV. +* [d3.tsvFormatBody](https://github.com/d3/d3-dsv/blob/v1.2.0/README.md#tsvFormatBody) - format the given array of objects as TSV. +* [d3.tsvFormatRows](https://github.com/d3/d3-dsv/blob/v1.2.0/README.md#tsvFormatRows) - format the given array of rows as TSV. +* [d3.tsvFormatRow](https://github.com/d3/d3-dsv/blob/v1.2.0/README.md#tsvFormatRow) - format the given row as TSV. +* [d3.tsvFormatValue](https://github.com/d3/d3-dsv/blob/v1.2.0/README.md#tsvFormatValue) - format the given value as TSV. + +## [Easings (d3-ease)](https://github.com/d3/d3-ease/tree/v1.0.6) + +Easing functions for smooth animation. + +* [*ease*](https://github.com/d3/d3-ease/blob/v1.0.6/README.md#_ease) - ease the given normalized time. +* [d3.easeLinear](https://github.com/d3/d3-ease/blob/v1.0.6/README.md#easeLinear) - linear easing; the identity function. +* [d3.easePolyIn](https://github.com/d3/d3-ease/blob/v1.0.6/README.md#easePolyIn) - polynomial easing; raises time to the given power. +* [d3.easePolyOut](https://github.com/d3/d3-ease/blob/v1.0.6/README.md#easePolyOut) - reverse polynomial easing. +* [d3.easePolyInOut](https://github.com/d3/d3-ease/blob/v1.0.6/README.md#easePolyInOut) - symmetric polynomial easing. +* [*poly*.exponent](https://github.com/d3/d3-ease/blob/v1.0.6/README.md#poly_exponent) - specify the polynomial exponent. +* [d3.easeQuad](https://github.com/d3/d3-ease/blob/v1.0.6/README.md#easeQuad) - an alias for easeQuadInOut. +* [d3.easeQuadIn](https://github.com/d3/d3-ease/blob/v1.0.6/README.md#easeQuadIn) - quadratic easing; squares time. +* [d3.easeQuadOut](https://github.com/d3/d3-ease/blob/v1.0.6/README.md#easeQuadOut) - reverse quadratic easing. +* [d3.easeQuadInOut](https://github.com/d3/d3-ease/blob/v1.0.6/README.md#easeQuadInOut) - symmetric quadratic easing. +* [d3.easeCubic](https://github.com/d3/d3-ease/blob/v1.0.6/README.md#easeCubic) - an alias for easeCubicInOut. +* [d3.easeCubicIn](https://github.com/d3/d3-ease/blob/v1.0.6/README.md#easeCubicIn) - cubic easing; cubes time. +* [d3.easeCubicOut](https://github.com/d3/d3-ease/blob/v1.0.6/README.md#easeCubicOut) - reverse cubic easing. +* [d3.easeCubicInOut](https://github.com/d3/d3-ease/blob/v1.0.6/README.md#easeCubicInOut) - symmetric cubic easing. +* [d3.easeSin](https://github.com/d3/d3-ease/blob/v1.0.6/README.md#easeSin) - an alias for easeSinInOut. +* [d3.easeSinIn](https://github.com/d3/d3-ease/blob/v1.0.6/README.md#easeSinIn) - sinusoidal easing. +* [d3.easeSinOut](https://github.com/d3/d3-ease/blob/v1.0.6/README.md#easeSinOut) - reverse sinusoidal easing. +* [d3.easeSinInOut](https://github.com/d3/d3-ease/blob/v1.0.6/README.md#easeSinInOut) - symmetric sinusoidal easing. +* [d3.easeExp](https://github.com/d3/d3-ease/blob/v1.0.6/README.md#easeExp) - an alias for easeExpInOut. +* [d3.easeExpIn](https://github.com/d3/d3-ease/blob/v1.0.6/README.md#easeExpIn) - exponential easing. +* [d3.easeExpOut](https://github.com/d3/d3-ease/blob/v1.0.6/README.md#easeExpOut) - reverse exponential easing. +* [d3.easeExpInOut](https://github.com/d3/d3-ease/blob/v1.0.6/README.md#easeExpInOut) - symmetric exponential easing. +* [d3.easeCircle](https://github.com/d3/d3-ease/blob/v1.0.6/README.md#easeCircle) - an alias for easeCircleInOut. +* [d3.easeCircleIn](https://github.com/d3/d3-ease/blob/v1.0.6/README.md#easeCircleIn) - circular easing. +* [d3.easeCircleOut](https://github.com/d3/d3-ease/blob/v1.0.6/README.md#easeCircleOut) - reverse circular easing. +* [d3.easeCircleInOut](https://github.com/d3/d3-ease/blob/v1.0.6/README.md#easeCircleInOut) - symmetric circular easing. +* [d3.easeElastic](https://github.com/d3/d3-ease/blob/v1.0.6/README.md#easeElastic) - an alias for easeElasticOut. +* [d3.easeElasticIn](https://github.com/d3/d3-ease/blob/v1.0.6/README.md#easeElasticIn) - elastic easing, like a rubber band. +* [d3.easeElasticOut](https://github.com/d3/d3-ease/blob/v1.0.6/README.md#easeElasticOut) - reverse elastic easing. +* [d3.easeElasticInOut](https://github.com/d3/d3-ease/blob/v1.0.6/README.md#easeElasticInOut) - symmetric elastic easing. +* [*elastic*.amplitude](https://github.com/d3/d3-ease/blob/v1.0.6/README.md#elastic_amplitude) - specify the elastic amplitude. +* [*elastic*.period](https://github.com/d3/d3-ease/blob/v1.0.6/README.md#elastic_period) - specify the elastic period. +* [d3.easeBack](https://github.com/d3/d3-ease/blob/v1.0.6/README.md#easeBack) - an alias for easeBackInOut. +* [d3.easeBackIn](https://github.com/d3/d3-ease/blob/v1.0.6/README.md#easeBackIn) - anticipatory easing, like a dancer bending his knees before jumping. +* [d3.easeBackOut](https://github.com/d3/d3-ease/blob/v1.0.6/README.md#easeBackOut) - reverse anticipatory easing. +* [d3.easeBackInOut](https://github.com/d3/d3-ease/blob/v1.0.6/README.md#easeBackInOut) - symmetric anticipatory easing. +* [*back*.overshoot](https://github.com/d3/d3-ease/blob/v1.0.6/README.md#back_overshoot) - specify the amount of overshoot. +* [d3.easeBounce](https://github.com/d3/d3-ease/blob/v1.0.6/README.md#easeBounce) - an alias for easeBounceOut. +* [d3.easeBounceIn](https://github.com/d3/d3-ease/blob/v1.0.6/README.md#easeBounceIn) - bounce easing, like a rubber ball. +* [d3.easeBounceOut](https://github.com/d3/d3-ease/blob/v1.0.6/README.md#easeBounceOut) - reverse bounce easing. +* [d3.easeBounceInOut](https://github.com/d3/d3-ease/blob/v1.0.6/README.md#easeBounceInOut) - symmetric bounce easing. + +## [Fetches (d3-fetch)](https://github.com/d3/d3-fetch/tree/v1.1.2) + +Convenience methods on top of the Fetch API. + +* [d3.blob](https://github.com/d3/d3-fetch/blob/v1.1.2/README.md#blob) - get a file as a blob. +* [d3.buffer](https://github.com/d3/d3-fetch/blob/v1.1.2/README.md#buffer) - get a file as an array buffer. +* [d3.csv](https://github.com/d3/d3-fetch/blob/v1.1.2/README.md#csv) - get a comma-separated values (CSV) file. +* [d3.dsv](https://github.com/d3/d3-fetch/blob/v1.1.2/README.md#dsv) - get a delimiter-separated values (CSV) file. +* [d3.image](https://github.com/d3/d3-fetch/blob/v1.1.2/README.md#image) - get an image. +* [d3.json](https://github.com/d3/d3-fetch/blob/v1.1.2/README.md#json) - get a JSON file. +* [d3.text](https://github.com/d3/d3-fetch/blob/v1.1.2/README.md#text) - get a plain text file. +* [d3.tsv](https://github.com/d3/d3-fetch/blob/v1.1.2/README.md#tsv) - get a tab-separated values (TSV) file. + +## [Forces (d3-force)](https://github.com/d3/d3-force/tree/v1.2.1) + +Force-directed graph layout using velocity Verlet integration. + +* [d3.forceSimulation](https://github.com/d3/d3-force/blob/v1.2.1/README.md#forceSimulation) - create a new force simulation. +* [*simulation*.restart](https://github.com/d3/d3-force/blob/v1.2.1/README.md#simulation_restart) - reheat and restart the simulation’s timer. +* [*simulation*.stop](https://github.com/d3/d3-force/blob/v1.2.1/README.md#simulation_stop) - stop the simulation’s timer. +* [*simulation*.tick](https://github.com/d3/d3-force/blob/v1.2.1/README.md#simulation_tick) - advance the simulation one step. +* [*simulation*.nodes](https://github.com/d3/d3-force/blob/v1.2.1/README.md#simulation_nodes) - set the simulation’s nodes. +* [*simulation*.alpha](https://github.com/d3/d3-force/blob/v1.2.1/README.md#simulation_alpha) - set the current alpha. +* [*simulation*.alphaMin](https://github.com/d3/d3-force/blob/v1.2.1/README.md#simulation_alphaMin) - set the minimum alpha threshold. +* [*simulation*.alphaDecay](https://github.com/d3/d3-force/blob/v1.2.1/README.md#simulation_alphaDecay) - set the alpha exponential decay rate. +* [*simulation*.alphaTarget](https://github.com/d3/d3-force/blob/v1.2.1/README.md#simulation_alphaTarget) - set the target alpha. +* [*simulation*.velocityDecay](https://github.com/d3/d3-force/blob/v1.2.1/README.md#simulation_velocityDecay) - set the velocity decay rate. +* [*simulation*.force](https://github.com/d3/d3-force/blob/v1.2.1/README.md#simulation_force) - add or remove a force. +* [*simulation*.find](https://github.com/d3/d3-force/blob/v1.2.1/README.md#simulation_find) - find the closest node to the given position. +* [*simulation*.on](https://github.com/d3/d3-force/blob/v1.2.1/README.md#simulation_on) - add or remove an event listener. +* [*force*](https://github.com/d3/d3-force/blob/v1.2.1/README.md#_force) - apply the force. +* [*force*.initialize](https://github.com/d3/d3-force/blob/v1.2.1/README.md#force_initialize) - initialize the force with the given nodes. +* [d3.forceCenter](https://github.com/d3/d3-force/blob/v1.2.1/README.md#forceCenter) - create a centering force. +* [*center*.x](https://github.com/d3/d3-force/blob/v1.2.1/README.md#center_x) - set the center *x*-coordinate. +* [*center*.y](https://github.com/d3/d3-force/blob/v1.2.1/README.md#center_y) - set the center *y*-coordinate. +* [d3.forceCollide](https://github.com/d3/d3-force/blob/v1.2.1/README.md#forceCollide) - create a circle collision force. +* [*collide*.radius](https://github.com/d3/d3-force/blob/v1.2.1/README.md#collide_radius) - set the circle radius. +* [*collide*.strength](https://github.com/d3/d3-force/blob/v1.2.1/README.md#collide_strength) - set the collision resolution strength. +* [*collide*.iterations](https://github.com/d3/d3-force/blob/v1.2.1/README.md#collide_iterations) - set the number of iterations. +* [d3.forceLink](https://github.com/d3/d3-force/blob/v1.2.1/README.md#forceLink) - create a link force. +* [*link*.links](https://github.com/d3/d3-force/blob/v1.2.1/README.md#link_links) - set the array of links. +* [*link*.id](https://github.com/d3/d3-force/blob/v1.2.1/README.md#link_id) - link nodes by numeric index or string identifier. +* [*link*.distance](https://github.com/d3/d3-force/blob/v1.2.1/README.md#link_distance) - set the link distance. +* [*link*.strength](https://github.com/d3/d3-force/blob/v1.2.1/README.md#link_strength) - set the link strength. +* [*link*.iterations](https://github.com/d3/d3-force/blob/v1.2.1/README.md#link_iterations) - set the number of iterations. +* [d3.forceManyBody](https://github.com/d3/d3-force/blob/v1.2.1/README.md#forceManyBody) - create a many-body force. +* [*manyBody*.strength](https://github.com/d3/d3-force/blob/v1.2.1/README.md#manyBody_strength) - set the force strength. +* [*manyBody*.theta](https://github.com/d3/d3-force/blob/v1.2.1/README.md#manyBody_theta) - set the Barnes–Hut approximation accuracy. +* [*manyBody*.distanceMin](https://github.com/d3/d3-force/blob/v1.2.1/README.md#manyBody_distanceMin) - limit the force when nodes are close. +* [*manyBody*.distanceMax](https://github.com/d3/d3-force/blob/v1.2.1/README.md#manyBody_distanceMax) - limit the force when nodes are far. +* [d3.forceX](https://github.com/d3/d3-force/blob/v1.2.1/README.md#forceX) - create an *x*-positioning force. +* [*x*.strength](https://github.com/d3/d3-force/blob/v1.2.1/README.md#x_strength) - set the force strength. +* [*x*.x](https://github.com/d3/d3-force/blob/v1.2.1/README.md#x_x) - set the target *x*-coordinate. +* [d3.forceY](https://github.com/d3/d3-force/blob/v1.2.1/README.md#forceY) - create an *y*-positioning force. +* [*y*.strength](https://github.com/d3/d3-force/blob/v1.2.1/README.md#y_strength) - set the force strength. +* [*y*.y](https://github.com/d3/d3-force/blob/v1.2.1/README.md#y_y) - set the target *y*-coordinate. +* [d3.forceRadial](https://github.com/d3/d3-force/blob/v1.2.1/README.md#forceRadial) - create a radial positioning force. +* [*radial*.strength](https://github.com/d3/d3-force/blob/v1.2.1/README.md#radial_strength) - set the force strength. +* [*radial*.radius](https://github.com/d3/d3-force/blob/v1.2.1/README.md#radial_radius) - set the target radius. +* [*radial*.x](https://github.com/d3/d3-force/blob/v1.2.1/README.md#radial_x) - set the target center *x*-coordinate. +* [*radial*.y](https://github.com/d3/d3-force/blob/v1.2.1/README.md#radial_y) - set the target center *y*-coordinate. + +## [Number Formats (d3-format)](https://github.com/d3/d3-format/tree/v1.4.4) + +Format numbers for human consumption. + +* [d3.format](https://github.com/d3/d3-format/blob/v1.4.4/README.md#format) - alias for *locale*.format on the default locale. +* [d3.formatPrefix](https://github.com/d3/d3-format/blob/v1.4.4/README.md#formatPrefix) - alias for *locale*.formatPrefix on the default locale. +* [d3.formatSpecifier](https://github.com/d3/d3-format/blob/v1.4.4/README.md#formatSpecifier) - parse a number format specifier. +* [d3.formatLocale](https://github.com/d3/d3-format/blob/v1.4.4/README.md#formatLocale) - define a custom locale. +* [d3.formatDefaultLocale](https://github.com/d3/d3-format/blob/v1.4.4/README.md#formatDefaultLocale) - define the default locale. +* [*locale*.format](https://github.com/d3/d3-format/blob/v1.4.4/README.md#locale_format) - create a number format. +* [*locale*.formatPrefix](https://github.com/d3/d3-format/blob/v1.4.4/README.md#locale_formatPrefix) - create a SI-prefix number format. +* [d3.precisionFixed](https://github.com/d3/d3-format/blob/v1.4.4/README.md#precisionFixed) - compute decimal precision for fixed-point notation. +* [d3.precisionPrefix](https://github.com/d3/d3-format/blob/v1.4.4/README.md#precisionPrefix) - compute decimal precision for SI-prefix notation. +* [d3.precisionRound](https://github.com/d3/d3-format/blob/v1.4.4/README.md#precisionRound) - compute significant digits for rounded notation. + +## [Geographies (d3-geo)](https://github.com/d3/d3-geo/tree/v1.12.0) + +Geographic projections, shapes and math. + +### [Paths](https://github.com/d3/d3-geo/blob/v1.12.0/README.md#paths) + +* [d3.geoPath](https://github.com/d3/d3-geo/blob/v1.12.0/README.md#geoPath) - create a new geographic path generator. +* [*path*](https://github.com/d3/d3-geo/blob/v1.12.0/README.md#_path) - project and render the specified feature. +* [*path*.area](https://github.com/d3/d3-geo/blob/v1.12.0/README.md#path_area) - compute the projected planar area of a given feature. +* [*path*.bounds](https://github.com/d3/d3-geo/blob/v1.12.0/README.md#path_bounds) - compute the projected planar bounding box of a given feature. +* [*path*.centroid](https://github.com/d3/d3-geo/blob/v1.12.0/README.md#path_centroid) - compute the projected planar centroid of a given feature. +* [*path*.measure](https://github.com/d3/d3-geo/blob/v1.12.0/README.md#path_measure) - compute the projected planar length of a given feature. +* [*path*.projection](https://github.com/d3/d3-geo/blob/v1.12.0/README.md#path_projection) - set the geographic projection. +* [*path*.context](https://github.com/d3/d3-geo/blob/v1.12.0/README.md#path_context) - set the render context. +* [*path*.pointRadius](https://github.com/d3/d3-geo/blob/v1.12.0/README.md#path_pointRadius) - set the radius to display point features. + +### [Projections](https://github.com/d3/d3-geo/blob/v1.12.0/README.md#projections) + +* [*projection*](https://github.com/d3/d3-geo/blob/v1.12.0/README.md#_projection) - project the specified point from the sphere to the plane. +* [*projection*.invert](https://github.com/d3/d3-geo/blob/v1.12.0/README.md#projection_invert) - unproject the specified point from the plane to the sphere. +* [*projection*.stream](https://github.com/d3/d3-geo/blob/v1.12.0/README.md#projection_stream) - wrap the specified stream to project geometry. +* [*projection*.clipAngle](https://github.com/d3/d3-geo/blob/v1.12.0/README.md#projection_clipAngle) - set the radius of the clip circle. +* [*projection*.clipExtent](https://github.com/d3/d3-geo/blob/v1.12.0/README.md#projection_clipExtent) - set the viewport clip extent, in pixels. +* [*projection*.angle](https://github.com/d3/d3-geo/blob/v1.12.0/README.md#projection_angle) - set the post-projection rotation. +* [*projection*.reflectX](https://github.com/d3/d3-geo/blob/v1.12.0/README.md#projection_reflectX) - reflect the *x*-dimension. +* [*projection*.reflectY](https://github.com/d3/d3-geo/blob/v1.12.0/README.md#projection_reflectY) - reflect the *y*-dimension. +* [*projection*.scale](https://github.com/d3/d3-geo/blob/v1.12.0/README.md#projection_scale) - set the scale factor. +* [*projection*.translate](https://github.com/d3/d3-geo/blob/v1.12.0/README.md#projection_translate) - set the translation offset. +* [*projection*.fitExtent](https://github.com/d3/d3-geo/blob/v1.12.0/README.md#projection_fitExtent) - set the scale and translate to fit a GeoJSON object. +* [*projection*.fitSize](https://github.com/d3/d3-geo/blob/v1.12.0/README.md#projection_fitSize) - set the scale and translate to fit a GeoJSON object. +* [*projection*.fitWidth](https://github.com/d3/d3-geo/blob/v1.12.0/README.md#projection_fitWidth) - set the scale and translate to fit a GeoJSON object. +* [*projection*.fitHeight](https://github.com/d3/d3-geo/blob/v1.12.0/README.md#projection_fitHeight) - set the scale and translate to fit a GeoJSON object. +* [*projection*.center](https://github.com/d3/d3-geo/blob/v1.12.0/README.md#projection_center) - set the center point. +* [*projection*.rotate](https://github.com/d3/d3-geo/blob/v1.12.0/README.md#projection_rotate) - set the three-axis spherical rotation angles. +* [*projection*.precision](https://github.com/d3/d3-geo/blob/v1.12.0/README.md#projection_precision) - set the precision threshold for adaptive sampling. +* [*projection*.preclip](https://github.com/d3/d3-geo/blob/v1.12.0/README.md#projection.preclip) - set the spherical clipping stream transform. +* [*projection*.postclip](https://github.com/d3/d3-geo/blob/v1.12.0/README.md#projection.postclip) - set the planar clipping stream transform. +* [d3.geoClipAntimeridian](https://github.com/d3/d3-geo/blob/v1.12.0/README.md#geoClipAntimeridian) - cuts spherical geometries that cross the antimeridian. +* [d3.geoClipCircle](https://github.com/d3/d3-geo/blob/v1.12.0/README.md#geoClipCircle) - clips spherical geometries to a small circle. +* [d3.geoClipRectangle](https://github.com/d3/d3-geo/blob/v1.12.0/README.md#geoClipRectangle) - clips planar geometries to a rectangular viewport. +* [d3.geoAlbers](https://github.com/d3/d3-geo/blob/v1.12.0/README.md#geoAlbers) - the Albers equal-area conic projection. +* [d3.geoAlbersUsa](https://github.com/d3/d3-geo/blob/v1.12.0/README.md#geoAlbersUsa) - a composite Albers projection for the United States. +* [d3.geoAzimuthalEqualArea](https://github.com/d3/d3-geo/blob/v1.12.0/README.md#geoAzimuthalEqualArea) - the azimuthal equal-area projection. +* [d3.geoAzimuthalEquidistant](https://github.com/d3/d3-geo/blob/v1.12.0/README.md#geoAzimuthalEquidistant) - the azimuthal equidistant projection. +* [d3.geoConicConformal](https://github.com/d3/d3-geo/blob/v1.12.0/README.md#geoConicConformal) - the conic conformal projection. +* [d3.geoConicEqualArea](https://github.com/d3/d3-geo/blob/v1.12.0/README.md#geoConicEqualArea) - the conic equal-area (Albers) projection. +* [d3.geoConicEquidistant](https://github.com/d3/d3-geo/blob/v1.12.0/README.md#geoConicEquidistant) - the conic equidistant projection. +* [*conic*.parallels](https://github.com/d3/d3-geo/blob/v1.12.0/README.md#conic_parallels) - set the two standard parallels. +* [d3.geoEqualEarth](https://github.com/d3/d3-geo/blob/v1.12.0/README.md#geoEqualEarth) - the Equal Earth projection. +* [d3.geoEquirectangular](https://github.com/d3/d3-geo/blob/v1.12.0/README.md#geoEquirectangular) - the equirectangular (plate carreé) projection. +* [d3.geoGnomonic](https://github.com/d3/d3-geo/blob/v1.12.0/README.md#geoGnomonic) - the gnomonic projection. +* [d3.geoMercator](https://github.com/d3/d3-geo/blob/v1.12.0/README.md#geoMercator) - the spherical Mercator projection. +* [d3.geoOrthographic](https://github.com/d3/d3-geo/blob/v1.12.0/README.md#geoOrthographic) - the azimuthal orthographic projection. +* [d3.geoStereographic](https://github.com/d3/d3-geo/blob/v1.12.0/README.md#geoStereographic) - the azimuthal stereographic projection. +* [d3.geoTransverseMercator](https://github.com/d3/d3-geo/blob/v1.12.0/README.md#geoTransverseMercator) - the transverse spherical Mercator projection. +* [*project*](https://github.com/d3/d3-geo/blob/v1.12.0/README.md#_project) - project the specified point from the sphere to the plane. +* [*project*.invert](https://github.com/d3/d3-geo/blob/v1.12.0/README.md#project_invert) - unproject the specified point from the plane to the sphere. +* [d3.geoProjection](https://github.com/d3/d3-geo/blob/v1.12.0/README.md#geoProjection) - create a custom projection. +* [d3.geoProjectionMutator](https://github.com/d3/d3-geo/blob/v1.12.0/README.md#geoProjectionMutator) - create a custom configurable projection. +* [d3.geoAzimuthalEqualAreaRaw](https://github.com/d3/d3-geo/blob/v1.12.0/README.md#geoAzimuthalEqualAreaRaw) - the raw azimuthal equal-area projection. +* [d3.geoAzimuthalEquidistantRaw](https://github.com/d3/d3-geo/blob/v1.12.0/README.md#geoAzimuthalEquidistantRaw) - the raw azimuthal equidistant projection. +* [d3.geoConicConformalRaw](https://github.com/d3/d3-geo/blob/v1.12.0/README.md#geoConicConformalRaw) - the raw conic conformal projection. +* [d3.geoConicEqualAreaRaw](https://github.com/d3/d3-geo/blob/v1.12.0/README.md#geoConicEqualAreaRaw) - the raw conic equal-area (Albers) projection. +* [d3.geoConicEquidistantRaw](https://github.com/d3/d3-geo/blob/v1.12.0/README.md#geoConicEquidistantRaw) - the raw conic equidistant projection. +* [d3.geoEquirectangularRaw](https://github.com/d3/d3-geo/blob/v1.12.0/README.md#geoEquirectangularRaw) - the raw equirectangular (plate carreé) projection. +* [d3.geoGnomonicRaw](https://github.com/d3/d3-geo/blob/v1.12.0/README.md#geoGnomonicRaw) - the raw gnomonic projection. +* [d3.geoMercatorRaw](https://github.com/d3/d3-geo/blob/v1.12.0/README.md#geoMercatorRaw) - the raw Mercator projection. +* [d3.geoOrthographicRaw](https://github.com/d3/d3-geo/blob/v1.12.0/README.md#geoOrthographicRaw) - the raw azimuthal orthographic projection. +* [d3.geoStereographicRaw](https://github.com/d3/d3-geo/blob/v1.12.0/README.md#geoStereographicRaw) - the raw azimuthal stereographic projection. +* [d3.geoTransverseMercatorRaw](https://github.com/d3/d3-geo/blob/v1.12.0/README.md#geoTransverseMercatorRaw) - the raw transverse spherical Mercator projection. + +### [Spherical Math](https://github.com/d3/d3-geo/blob/v1.12.0/README.md#spherical-math) + +* [d3.geoArea](https://github.com/d3/d3-geo/blob/v1.12.0/README.md#geoArea) - compute the spherical area of a given feature. +* [d3.geoBounds](https://github.com/d3/d3-geo/blob/v1.12.0/README.md#geoBounds) - compute the latitude-longitude bounding box for a given feature. +* [d3.geoCentroid](https://github.com/d3/d3-geo/blob/v1.12.0/README.md#geoCentroid) - compute the spherical centroid of a given feature. +* [d3.geoContains](https://github.com/d3/d3-geo/blob/v1.12.0/README.md#geoContains) - test whether a point is inside a given feature. +* [d3.geoDistance](https://github.com/d3/d3-geo/blob/v1.12.0/README.md#geoDistance) - compute the great-arc distance between two points. +* [d3.geoLength](https://github.com/d3/d3-geo/blob/v1.12.0/README.md#geoLength) - compute the length of a line string or the perimeter of a polygon. +* [d3.geoInterpolate](https://github.com/d3/d3-geo/blob/v1.12.0/README.md#geoInterpolate) - interpolate between two points along a great arc. +* [d3.geoRotation](https://github.com/d3/d3-geo/blob/v1.12.0/README.md#geoRotation) - create a rotation function for the specified angles. +* [*rotation*](https://github.com/d3/d3-geo/blob/v1.12.0/README.md#_rotation) - rotate the given point around the sphere. +* [*rotation*.invert](https://github.com/d3/d3-geo/blob/v1.12.0/README.md#rotation_invert) - unrotate the given point around the sphere. + +### [Spherical Shapes](https://github.com/d3/d3-geo/blob/v1.12.0/README.md#spherical-shapes) + +* [d3.geoCircle](https://github.com/d3/d3-geo/blob/v1.12.0/README.md#geoCircle) - create a circle generator. +* [*circle*](https://github.com/d3/d3-geo/blob/v1.12.0/README.md#_circle) - generate a piecewise circle as a Polygon. +* [*circle*.center](https://github.com/d3/d3-geo/blob/v1.12.0/README.md#circle_center) - specify the circle center in latitude and longitude. +* [*circle*.radius](https://github.com/d3/d3-geo/blob/v1.12.0/README.md#circle_radius) - specify the angular radius in degrees. +* [*circle*.precision](https://github.com/d3/d3-geo/blob/v1.12.0/README.md#circle_precision) - specify the precision of the piecewise circle. +* [d3.geoGraticule](https://github.com/d3/d3-geo/blob/v1.12.0/README.md#geoGraticule) - create a graticule generator. +* [*graticule*](https://github.com/d3/d3-geo/blob/v1.12.0/README.md#_graticule) - generate a MultiLineString of meridians and parallels. +* [*graticule*.lines](https://github.com/d3/d3-geo/blob/v1.12.0/README.md#graticule_lines) - generate an array of LineStrings of meridians and parallels. +* [*graticule*.outline](https://github.com/d3/d3-geo/blob/v1.12.0/README.md#graticule_outline) - generate a Polygon of the graticule’s extent. +* [*graticule*.extent](https://github.com/d3/d3-geo/blob/v1.12.0/README.md#graticule_extent) - get or set the major & minor extents. +* [*graticule*.extentMajor](https://github.com/d3/d3-geo/blob/v1.12.0/README.md#graticule_extentMajor) - get or set the major extent. +* [*graticule*.extentMinor](https://github.com/d3/d3-geo/blob/v1.12.0/README.md#graticule_extentMinor) - get or set the minor extent. +* [*graticule*.step](https://github.com/d3/d3-geo/blob/v1.12.0/README.md#graticule_step) - get or set the major & minor step intervals. +* [*graticule*.stepMajor](https://github.com/d3/d3-geo/blob/v1.12.0/README.md#graticule_stepMajor) - get or set the major step intervals. +* [*graticule*.stepMinor](https://github.com/d3/d3-geo/blob/v1.12.0/README.md#graticule_stepMinor) - get or set the minor step intervals. +* [*graticule*.precision](https://github.com/d3/d3-geo/blob/v1.12.0/README.md#graticule_precision) - get or set the latitudinal precision. +* [d3.geoGraticule10](https://github.com/d3/d3-geo/blob/v1.12.0/README.md#geoGraticule10) - generate the default 10° global graticule. + +### [Streams](https://github.com/d3/d3-geo/blob/v1.12.0/README.md#streams) + +* [d3.geoStream](https://github.com/d3/d3-geo/blob/v1.12.0/README.md#geoStream) - convert a GeoJSON object to a geometry stream. +* [*stream*.point](https://github.com/d3/d3-geo/blob/v1.12.0/README.md#stream_point) - indicates a point with the specified coordinates. +* [*stream*.lineStart](https://github.com/d3/d3-geo/blob/v1.12.0/README.md#stream_lineStart) - indicates the start of a line or ring. +* [*stream*.lineEnd](https://github.com/d3/d3-geo/blob/v1.12.0/README.md#stream_lineEnd) - indicates the end of a line or ring. +* [*stream*.polygonStart](https://github.com/d3/d3-geo/blob/v1.12.0/README.md#stream_polygonStart) - indicates the start of a polygon. +* [*stream*.polygonEnd](https://github.com/d3/d3-geo/blob/v1.12.0/README.md#stream_polygonEnd) - indicates the end of a polygon. +* [*stream*.sphere](https://github.com/d3/d3-geo/blob/v1.12.0/README.md#stream_sphere) - indicates the sphere. + +### [Transforms](https://github.com/d3/d3-geo/blob/v1.12.0/README.md#transforms) + +* [d3.geoIdentity](https://github.com/d3/d3-geo/blob/v1.12.0/README.md#geoIdentity) - scale, translate or clip planar geometry. +* [d3.geoTransform](https://github.com/d3/d3-geo/blob/v1.12.0/README.md#geoTransform) - define a custom geometry transform. + +## [Hierarchies (d3-hierarchy)](https://github.com/d3/d3-hierarchy/tree/v1.1.9) + +Layout algorithms for visualizing hierarchical data. + +* [d3.hierarchy](https://github.com/d3/d3-hierarchy/blob/v1.1.9/README.md#hierarchy) - constructs a root node from hierarchical data. +* [*node*.ancestors](https://github.com/d3/d3-hierarchy/blob/v1.1.9/README.md#node_ancestors) - generate an array of ancestors. +* [*node*.descendants](https://github.com/d3/d3-hierarchy/blob/v1.1.9/README.md#node_descendants) - generate an array of descendants. +* [*node*.leaves](https://github.com/d3/d3-hierarchy/blob/v1.1.9/README.md#node_leaves) - generate an array of leaves. +* [*node*.path](https://github.com/d3/d3-hierarchy/blob/v1.1.9/README.md#node_path) - generate the shortest path to another node. +* [*node*.links](https://github.com/d3/d3-hierarchy/blob/v1.1.9/README.md#node_links) - generate an array of links. +* [*node*.sum](https://github.com/d3/d3-hierarchy/blob/v1.1.9/README.md#node_sum) - evaluate and aggregate quantitative values. +* [*node*.sort](https://github.com/d3/d3-hierarchy/blob/v1.1.9/README.md#node_sort) - sort all descendant siblings. +* [*node*.count](https://github.com/d3/d3-hierarchy/blob/v1.1.9/README.md#node_count) - count the number of leaves. +* [*node*.each](https://github.com/d3/d3-hierarchy/blob/v1.1.9/README.md#node_each) - breadth-first traversal. +* [*node*.eachAfter](https://github.com/d3/d3-hierarchy/blob/v1.1.9/README.md#node_eachAfter) - post-order traversal. +* [*node*.eachBefore](https://github.com/d3/d3-hierarchy/blob/v1.1.9/README.md#node_eachBefore) - pre-order traversal. +* [*node*.copy](https://github.com/d3/d3-hierarchy/blob/v1.1.9/README.md#node_copy) - copy a hierarchy. +* [d3.stratify](https://github.com/d3/d3-hierarchy/blob/v1.1.9/README.md#stratify) - create a new stratify operator. +* [*stratify*](https://github.com/d3/d3-hierarchy/blob/v1.1.9/README.md#_stratify) - construct a root node from tabular data. +* [*stratify*.id](https://github.com/d3/d3-hierarchy/blob/v1.1.9/README.md#stratify_id) - set the node id accessor. +* [*stratify*.parentId](https://github.com/d3/d3-hierarchy/blob/v1.1.9/README.md#stratify_parentId) - set the parent node id accessor. +* [d3.cluster](https://github.com/d3/d3-hierarchy/blob/v1.1.9/README.md#cluster) - create a new cluster (dendrogram) layout. +* [*cluster*](https://github.com/d3/d3-hierarchy/blob/v1.1.9/README.md#_cluster) - layout the specified hierarchy in a dendrogram. +* [*cluster*.size](https://github.com/d3/d3-hierarchy/blob/v1.1.9/README.md#cluster_size) - set the layout size. +* [*cluster*.nodeSize](https://github.com/d3/d3-hierarchy/blob/v1.1.9/README.md#cluster_nodeSize) - set the node size. +* [*cluster*.separation](https://github.com/d3/d3-hierarchy/blob/v1.1.9/README.md#cluster_separation) - set the separation between leaves. +* [d3.tree](https://github.com/d3/d3-hierarchy/blob/v1.1.9/README.md#tree) - create a new tidy tree layout. +* [*tree*](https://github.com/d3/d3-hierarchy/blob/v1.1.9/README.md#_tree) - layout the specified hierarchy in a tidy tree. +* [*tree*.size](https://github.com/d3/d3-hierarchy/blob/v1.1.9/README.md#tree_size) - set the layout size. +* [*tree*.nodeSize](https://github.com/d3/d3-hierarchy/blob/v1.1.9/README.md#tree_nodeSize) - set the node size. +* [*tree*.separation](https://github.com/d3/d3-hierarchy/blob/v1.1.9/README.md#tree_separation) - set the separation between nodes. +* [d3.treemap](https://github.com/d3/d3-hierarchy/blob/v1.1.9/README.md#treemap) - create a new treemap layout. +* [*treemap*](https://github.com/d3/d3-hierarchy/blob/v1.1.9/README.md#_treemap) - layout the specified hierarchy as a treemap. +* [*treemap*.tile](https://github.com/d3/d3-hierarchy/blob/v1.1.9/README.md#treemap_tile) - set the tiling method. +* [*treemap*.size](https://github.com/d3/d3-hierarchy/blob/v1.1.9/README.md#treemap_size) - set the layout size. +* [*treemap*.round](https://github.com/d3/d3-hierarchy/blob/v1.1.9/README.md#treemap_round) - set whether the output coordinates are rounded. +* [*treemap*.padding](https://github.com/d3/d3-hierarchy/blob/v1.1.9/README.md#treemap_padding) - set the padding. +* [*treemap*.paddingInner](https://github.com/d3/d3-hierarchy/blob/v1.1.9/README.md#treemap_paddingInner) - set the padding between siblings. +* [*treemap*.paddingOuter](https://github.com/d3/d3-hierarchy/blob/v1.1.9/README.md#treemap_paddingOuter) - set the padding between parent and children. +* [*treemap*.paddingTop](https://github.com/d3/d3-hierarchy/blob/v1.1.9/README.md#treemap_paddingTop) - set the padding between the parent’s top edge and children. +* [*treemap*.paddingRight](https://github.com/d3/d3-hierarchy/blob/v1.1.9/README.md#treemap_paddingRight) - set the padding between the parent’s right edge and children. +* [*treemap*.paddingBottom](https://github.com/d3/d3-hierarchy/blob/v1.1.9/README.md#treemap_paddingBottom) - set the padding between the parent’s bottom edge and children. +* [*treemap*.paddingLeft](https://github.com/d3/d3-hierarchy/blob/v1.1.9/README.md#treemap_paddingLeft) - set the padding between the parent’s left edge and children. +* [d3.treemapBinary](https://github.com/d3/d3-hierarchy/blob/v1.1.9/README.md#treemapBinary) - tile using a balanced binary tree. +* [d3.treemapDice](https://github.com/d3/d3-hierarchy/blob/v1.1.9/README.md#treemapDice) - tile into a horizontal row. +* [d3.treemapSlice](https://github.com/d3/d3-hierarchy/blob/v1.1.9/README.md#treemapSlice) - tile into a vertical column. +* [d3.treemapSliceDice](https://github.com/d3/d3-hierarchy/blob/v1.1.9/README.md#treemapSliceDice) - alternate between slicing and dicing. +* [d3.treemapSquarify](https://github.com/d3/d3-hierarchy/blob/v1.1.9/README.md#treemapSquarify) - tile using squarified rows per Bruls *et. al.* +* [d3.treemapResquarify](https://github.com/d3/d3-hierarchy/blob/v1.1.9/README.md#treemapResquarify) - like d3.treemapSquarify, but performs stable updates. +* [*squarify*.ratio](https://github.com/d3/d3-hierarchy/blob/v1.1.9/README.md#squarify_ratio) - set the desired rectangle aspect ratio. +* [d3.partition](https://github.com/d3/d3-hierarchy/blob/v1.1.9/README.md#partition) - create a new partition (icicle or sunburst) layout. +* [*partition*](https://github.com/d3/d3-hierarchy/blob/v1.1.9/README.md#_partition) - layout the specified hierarchy as a partition diagram. +* [*partition*.size](https://github.com/d3/d3-hierarchy/blob/v1.1.9/README.md#partition_size) - set the layout size. +* [*partition*.round](https://github.com/d3/d3-hierarchy/blob/v1.1.9/README.md#partition_round) - set whether the output coordinates are rounded. +* [*partition*.padding](https://github.com/d3/d3-hierarchy/blob/v1.1.9/README.md#partition_padding) - set the padding. +* [d3.pack](https://github.com/d3/d3-hierarchy/blob/v1.1.9/README.md#pack) - create a new circle-packing layout. +* [*pack*](https://github.com/d3/d3-hierarchy/blob/v1.1.9/README.md#_pack) - layout the specified hierarchy using circle-packing. +* [*pack*.radius](https://github.com/d3/d3-hierarchy/blob/v1.1.9/README.md#pack_radius) - set the radius accessor. +* [*pack*.size](https://github.com/d3/d3-hierarchy/blob/v1.1.9/README.md#pack_size) - set the layout size. +* [*pack*.padding](https://github.com/d3/d3-hierarchy/blob/v1.1.9/README.md#pack_padding) - set the padding. +* [d3.packSiblings](https://github.com/d3/d3-hierarchy/blob/v1.1.9/README.md#packSiblings) - pack the specified array of circles. +* [d3.packEnclose](https://github.com/d3/d3-hierarchy/blob/v1.1.9/README.md#packEnclose) - enclose the specified array of circles. + +## [Interpolators (d3-interpolate)](https://github.com/d3/d3-interpolate/tree/v1.4.0) + +Interpolate numbers, colors, strings, arrays, objects, whatever! + +* [d3.interpolate](https://github.com/d3/d3-interpolate/blob/v1.4.0/README.md#interpolate) - interpolate arbitrary values. +* [d3.interpolateArray](https://github.com/d3/d3-interpolate/blob/v1.4.0/README.md#interpolateArray) - interpolate arrays of arbitrary values. +* [d3.interpolateDate](https://github.com/d3/d3-interpolate/blob/v1.4.0/README.md#interpolateDate) - interpolate dates. +* [d3.interpolateNumber](https://github.com/d3/d3-interpolate/blob/v1.4.0/README.md#interpolateNumber) - interpolate numbers. +* [d3.interpolateNumberArray](https://github.com/d3/d3-interpolate/blob/v1.4.0/README.md#interpolateNumberArray) - interpolate arrays of numbers. +* [d3.interpolateObject](https://github.com/d3/d3-interpolate/blob/v1.4.0/README.md#interpolateObject) - interpolate arbitrary objects. +* [d3.interpolateRound](https://github.com/d3/d3-interpolate/blob/v1.4.0/README.md#interpolateRound) - interpolate integers. +* [d3.interpolateString](https://github.com/d3/d3-interpolate/blob/v1.4.0/README.md#interpolateString) - interpolate strings with embedded numbers. +* [d3.interpolateTransformCss](https://github.com/d3/d3-interpolate/blob/v1.4.0/README.md#interpolateTransformCss) - interpolate 2D CSS transforms. +* [d3.interpolateTransformSvg](https://github.com/d3/d3-interpolate/blob/v1.4.0/README.md#interpolateTransformSvg) - interpolate 2D SVG transforms. +* [d3.interpolateZoom](https://github.com/d3/d3-interpolate/blob/v1.4.0/README.md#interpolateZoom) - zoom and pan between two views. +* [d3.interpolateRgb](https://github.com/d3/d3-interpolate/blob/v1.4.0/README.md#interpolateRgb) - interpolate RGB colors. +* [d3.interpolateRgbBasis](https://github.com/d3/d3-interpolate/blob/v1.4.0/README.md#interpolateRgbBasis) - generate a B-spline through a set of colors. +* [d3.interpolateRgbBasisClosed](https://github.com/d3/d3-interpolate/blob/v1.4.0/README.md#interpolateRgbBasisClosed) - generate a closed B-spline through a set of colors. +* [d3.interpolateHsl](https://github.com/d3/d3-interpolate/blob/v1.4.0/README.md#interpolateHsl) - interpolate HSL colors. +* [d3.interpolateHslLong](https://github.com/d3/d3-interpolate/blob/v1.4.0/README.md#interpolateHslLong) - interpolate HSL colors, the long way. +* [d3.interpolateLab](https://github.com/d3/d3-interpolate/blob/v1.4.0/README.md#interpolateLab) - interpolate Lab colors. +* [d3.interpolateHcl](https://github.com/d3/d3-interpolate/blob/v1.4.0/README.md#interpolateHcl) - interpolate HCL colors. +* [d3.interpolateHclLong](https://github.com/d3/d3-interpolate/blob/v1.4.0/README.md#interpolateHclLong) - interpolate HCL colors, the long way. +* [d3.interpolateCubehelix](https://github.com/d3/d3-interpolate/blob/v1.4.0/README.md#interpolateCubehelix) - interpolate Cubehelix colors. +* [d3.interpolateCubehelixLong](https://github.com/d3/d3-interpolate/blob/v1.4.0/README.md#interpolateCubehelixLong) - interpolate Cubehelix colors, the long way. +* [*interpolate*.gamma](https://github.com/d3/d3-interpolate/blob/v1.4.0/README.md#interpolate_gamma) - apply gamma correction during interpolation. +* [d3.interpolateHue](https://github.com/d3/d3-interpolate/blob/v1.4.0/README.md#interpolateHue) - interpolate a hue angle. +* [d3.interpolateDiscrete](https://github.com/d3/d3-interpolate/blob/v1.4.0/README.md#interpolateDiscrete) - generate a discrete interpolator from a set of values. +* [d3.interpolateBasis](https://github.com/d3/d3-interpolate/blob/v1.4.0/README.md#interpolateBasis) - generate a B-spline through a set of values. +* [d3.interpolateBasisClosed](https://github.com/d3/d3-interpolate/blob/v1.4.0/README.md#interpolateBasisClosed) - generate a closed B-spline through a set of values. +* [d3.piecewise](https://github.com/d3/d3-interpolate/blob/v1.4.0/README.md#piecewise) - generate a piecewise linear interpolator from a set of values. +* [d3.quantize](https://github.com/d3/d3-interpolate/blob/v1.4.0/README.md#quantize) - generate uniformly-spaced samples from an interpolator. + +## [Paths (d3-path)](https://github.com/d3/d3-path/tree/v1.0.9) + +Serialize Canvas path commands to SVG. + +* [d3.path](https://github.com/d3/d3-path/blob/v1.0.9/README.md#path) - create a new path serializer. +* [*path*.moveTo](https://github.com/d3/d3-path/blob/v1.0.9/README.md#path_moveTo) - move to the given point. +* [*path*.closePath](https://github.com/d3/d3-path/blob/v1.0.9/README.md#path_closePath) - close the current subpath. +* [*path*.lineTo](https://github.com/d3/d3-path/blob/v1.0.9/README.md#path_lineTo) - draw a straight line segment. +* [*path*.quadraticCurveTo](https://github.com/d3/d3-path/blob/v1.0.9/README.md#path_quadraticCurveTo) - draw a quadratic Bézier segment. +* [*path*.bezierCurveTo](https://github.com/d3/d3-path/blob/v1.0.9/README.md#path_bezierCurveTo) - draw a cubic Bézier segment. +* [*path*.arcTo](https://github.com/d3/d3-path/blob/v1.0.9/README.md#path_arcTo) - draw a circular arc segment. +* [*path*.arc](https://github.com/d3/d3-path/blob/v1.0.9/README.md#path_arc) - draw a circular arc segment. +* [*path*.rect](https://github.com/d3/d3-path/blob/v1.0.9/README.md#path_rect) - draw a rectangle. +* [*path*.toString](https://github.com/d3/d3-path/blob/v1.0.9/README.md#path_toString) - serialize to an SVG path data string. + +## [Polygons (d3-polygon)](https://github.com/d3/d3-polygon/tree/v1.0.6) + +Geometric operations for two-dimensional polygons. + +* [d3.polygonArea](https://github.com/d3/d3-polygon/blob/v1.0.6/README.md#polygonArea) - compute the area of the given polygon. +* [d3.polygonCentroid](https://github.com/d3/d3-polygon/blob/v1.0.6/README.md#polygonCentroid) - compute the centroid of the given polygon. +* [d3.polygonHull](https://github.com/d3/d3-polygon/blob/v1.0.6/README.md#polygonHull) - compute the convex hull of the given points. +* [d3.polygonContains](https://github.com/d3/d3-polygon/blob/v1.0.6/README.md#polygonContains) - test whether a point is inside a polygon. +* [d3.polygonLength](https://github.com/d3/d3-polygon/blob/v1.0.6/README.md#polygonLength) - compute the length of the given polygon’s perimeter. + +## [Quadtrees (d3-quadtree)](https://github.com/d3/d3-quadtree/tree/v1.0.7) + +Two-dimensional recursive spatial subdivision. + +* [d3.quadtree](https://github.com/d3/d3-quadtree/blob/v1.0.7/README.md#quadtree) - create a new, empty quadtree. +* [*quadtree*.x](https://github.com/d3/d3-quadtree/blob/v1.0.7/README.md#quadtree_x) - set the *x* accessor. +* [*quadtree*.y](https://github.com/d3/d3-quadtree/blob/v1.0.7/README.md#quadtree_y) - set the *y* accessor. +* [*quadtree*.add](https://github.com/d3/d3-quadtree/blob/v1.0.7/README.md#quadtree_add) - add a datum to a quadtree. +* [*quadtree*.addAll](https://github.com/d3/d3-quadtree/blob/v1.0.7/README.md#quadtree_addAll) - add an array of data to a quadtree. +* [*quadtree*.remove](https://github.com/d3/d3-quadtree/blob/v1.0.7/README.md#quadtree_remove) - remove a datum from a quadtree. +* [*quadtree*.removeAll](https://github.com/d3/d3-quadtree/blob/v1.0.7/README.md#quadtree_removeAll) - remove an array of data from a quadtree. +* [*quadtree*.copy](https://github.com/d3/d3-quadtree/blob/v1.0.7/README.md#quadtree_copy) - create a copy of a quadtree. +* [*quadtree*.root](https://github.com/d3/d3-quadtree/blob/v1.0.7/README.md#quadtree_root) - get the quadtree’s root node. +* [*quadtree*.data](https://github.com/d3/d3-quadtree/blob/v1.0.7/README.md#quadtree_data) - retrieve all data from the quadtree. +* [*quadtree*.size](https://github.com/d3/d3-quadtree/blob/v1.0.7/README.md#quadtree_size) - count the number of data in the quadtree. +* [*quadtree*.find](https://github.com/d3/d3-quadtree/blob/v1.0.7/README.md#quadtree_find) - quickly find the closest datum in a quadtree. +* [*quadtree*.visit](https://github.com/d3/d3-quadtree/blob/v1.0.7/README.md#quadtree_visit) - selectively visit nodes in a quadtree. +* [*quadtree*.visitAfter](https://github.com/d3/d3-quadtree/blob/v1.0.7/README.md#quadtree_visitAfter) - visit all nodes in a quadtree. +* [*quadtree*.cover](https://github.com/d3/d3-quadtree/blob/v1.0.7/README.md#quadtree_cover) - extend the quadtree to cover a point. +* [*quadtree*.extent](https://github.com/d3/d3-quadtree/blob/v1.0.7/README.md#quadtree_extent) - extend the quadtree to cover an extent. + +## [Random Numbers (d3-random)](https://github.com/d3/d3-random/tree/v1.1.2) + +Generate random numbers from various distributions. + +* [d3.randomUniform](https://github.com/d3/d3-random/blob/v1.1.2/README.md#randomUniform) - from a uniform distribution. +* [d3.randomNormal](https://github.com/d3/d3-random/blob/v1.1.2/README.md#randomNormal) - from a normal distribution. +* [d3.randomLogNormal](https://github.com/d3/d3-random/blob/v1.1.2/README.md#randomLogNormal) - from a log-normal distribution. +* [d3.randomBates](https://github.com/d3/d3-random/blob/v1.1.2/README.md#randomBates) - from a Bates distribution. +* [d3.randomIrwinHall](https://github.com/d3/d3-random/blob/v1.1.2/README.md#randomIrwinHall) - from an Irwin–Hall distribution. +* [d3.randomExponential](https://github.com/d3/d3-random/blob/v1.1.2/README.md#randomExponential) - from an exponential distribution. +* [*random*.source](https://github.com/d3/d3-random/blob/v1.1.2/README.md#random_source) - set the source of randomness. + +## [Scales (d3-scale)](https://github.com/d3/d3-scale/tree/v2.2.2) + +Encodings that map abstract data to visual representation. + +### [Continuous Scales](https://github.com/d3/d3-scale/blob/v2.2.2/README.md#continuous-scales) + +Map a continuous, quantitative domain to a continuous range. + +* [*continuous*](https://github.com/d3/d3-scale/blob/v2.2.2/README.md#_continuous) - compute the range value corresponding to a given domain value. +* [*continuous*.invert](https://github.com/d3/d3-scale/blob/v2.2.2/README.md#continuous_invert) - compute the domain value corresponding to a given range value. +* [*continuous*.domain](https://github.com/d3/d3-scale/blob/v2.2.2/README.md#continuous_domain) - set the input domain. +* [*continuous*.range](https://github.com/d3/d3-scale/blob/v2.2.2/README.md#continuous_range) - set the output range. +* [*continuous*.rangeRound](https://github.com/d3/d3-scale/blob/v2.2.2/README.md#continuous_rangeRound) - set the output range and enable rounding. +* [*continuous*.clamp](https://github.com/d3/d3-scale/blob/v2.2.2/README.md#continuous_clamp) - enable clamping to the domain or range. +* [*continuous*.interpolate](https://github.com/d3/d3-scale/blob/v2.2.2/README.md#continuous_interpolate) - set the output interpolator. +* [*continuous*.unknown](https://github.com/d3/d3-scale/blob/v2.2.2/README.md#continuous_unknown) - set the output value for unknown inputs. +* [*continuous*.ticks](https://github.com/d3/d3-scale/blob/v2.2.2/README.md#continuous_ticks) - compute representative values from the domain. +* [*continuous*.tickFormat](https://github.com/d3/d3-scale/blob/v2.2.2/README.md#continuous_tickFormat) - format ticks for human consumption. +* [*continuous*.nice](https://github.com/d3/d3-scale/blob/v2.2.2/README.md#continuous_nice) - extend the domain to nice round numbers. +* [*continuous*.copy](https://github.com/d3/d3-scale/blob/v2.2.2/README.md#continuous_copy) - create a copy of this scale. +* [d3.scaleLinear](https://github.com/d3/d3-scale/blob/v2.2.2/README.md#scaleLinear) - create a quantitative linear scale. +* [d3.scalePow](https://github.com/d3/d3-scale/blob/v2.2.2/README.md#scalePow) - create a quantitative power scale. +* [*pow*](https://github.com/d3/d3-scale/blob/v2.2.2/README.md#_pow) - compute the range value corresponding to a given domain value. +* [*pow*.invert](https://github.com/d3/d3-scale/blob/v2.2.2/README.md#pow_invert) - compute the domain value corresponding to a given range value. +* [*pow*.exponent](https://github.com/d3/d3-scale/blob/v2.2.2/README.md#pow_exponent) - set the power exponent. +* [*pow*.domain](https://github.com/d3/d3-scale/blob/v2.2.2/README.md#pow_domain) - set the input domain. +* [*pow*.range](https://github.com/d3/d3-scale/blob/v2.2.2/README.md#pow_range) - set the output range. +* [*pow*.rangeRound](https://github.com/d3/d3-scale/blob/v2.2.2/README.md#pow_rangeRound) - set the output range and enable rounding. +* [*pow*.clamp](https://github.com/d3/d3-scale/blob/v2.2.2/README.md#pow_clamp) - enable clamping to the domain or range. +* [*pow*.interpolate](https://github.com/d3/d3-scale/blob/v2.2.2/README.md#pow_interpolate) - set the output interpolator. +* [*pow*.ticks](https://github.com/d3/d3-scale/blob/v2.2.2/README.md#pow_ticks) - compute representative values from the domain. +* [*pow*.tickFormat](https://github.com/d3/d3-scale/blob/v2.2.2/README.md#pow_tickFormat) - format ticks for human consumption. +* [*pow*.nice](https://github.com/d3/d3-scale/blob/v2.2.2/README.md#pow_nice) - extend the domain to nice round numbers. +* [*pow*.copy](https://github.com/d3/d3-scale/blob/v2.2.2/README.md#pow_copy) - create a copy of this scale. +* [d3.scaleSqrt](https://github.com/d3/d3-scale/blob/v2.2.2/README.md#scaleSqrt) - create a quantitative power scale with exponent 0.5. +* [d3.scaleLog](https://github.com/d3/d3-scale/blob/v2.2.2/README.md#scaleLog) - create a quantitative logarithmic scale. +* [*log*](https://github.com/d3/d3-scale/blob/v2.2.2/README.md#_log) - compute the range value corresponding to a given domain value. +* [*log*.invert](https://github.com/d3/d3-scale/blob/v2.2.2/README.md#log_invert) - compute the domain value corresponding to a given range value. +* [*log*.base](https://github.com/d3/d3-scale/blob/v2.2.2/README.md#log_base) - set the logarithm base. +* [*log*.domain](https://github.com/d3/d3-scale/blob/v2.2.2/README.md#log_domain) - set the input domain. +* [*log*.range](https://github.com/d3/d3-scale/blob/v2.2.2/README.md#log_range) - set the output range. +* [*log*.rangeRound](https://github.com/d3/d3-scale/blob/v2.2.2/README.md#log_rangeRound) - set the output range and enable rounding. +* [*log*.clamp](https://github.com/d3/d3-scale/blob/v2.2.2/README.md#log_clamp) - enable clamping to the domain or range. +* [*log*.interpolate](https://github.com/d3/d3-scale/blob/v2.2.2/README.md#log_interpolate) - set the output interpolator. +* [*log*.ticks](https://github.com/d3/d3-scale/blob/v2.2.2/README.md#log_ticks) - compute representative values from the domain. +* [*log*.tickFormat](https://github.com/d3/d3-scale/blob/v2.2.2/README.md#log_tickFormat) - format ticks for human consumption. +* [*log*.nice](https://github.com/d3/d3-scale/blob/v2.2.2/README.md#log_nice) - extend the domain to nice round numbers. +* [*log*.copy](https://github.com/d3/d3-scale/blob/v2.2.2/README.md#log_copy) - create a copy of this scale. +* [d3.scaleSymlog](https://github.com/d3/d3-scale/blob/v2.2.2/README.md#scaleSymlog) - create a symmetric logarithmic scale. +* [d3.scaleIdentity](https://github.com/d3/d3-scale/blob/v2.2.2/README.md#identity) - create a quantitative identity scale. +* [d3.scaleTime](https://github.com/d3/d3-scale/blob/v2.2.2/README.md#scaleTime) - create a linear scale for time. +* [*time*](https://github.com/d3/d3-scale/blob/v2.2.2/README.md#_time) - compute the range value corresponding to a given domain value. +* [*time*.invert](https://github.com/d3/d3-scale/blob/v2.2.2/README.md#time_invert) - compute the domain value corresponding to a given range value. +* [*time*.domain](https://github.com/d3/d3-scale/blob/v2.2.2/README.md#time_domain) - set the input domain. +* [*time*.range](https://github.com/d3/d3-scale/blob/v2.2.2/README.md#time_range) - set the output range. +* [*time*.rangeRound](https://github.com/d3/d3-scale/blob/v2.2.2/README.md#time_rangeRound) - set the output range and enable rounding. +* [*time*.clamp](https://github.com/d3/d3-scale/blob/v2.2.2/README.md#time_clamp) - enable clamping to the domain or range. +* [*time*.interpolate](https://github.com/d3/d3-scale/blob/v2.2.2/README.md#time_interpolate) - set the output interpolator. +* [*time*.ticks](https://github.com/d3/d3-scale/blob/v2.2.2/README.md#time_ticks) - compute representative values from the domain. +* [*time*.tickFormat](https://github.com/d3/d3-scale/blob/v2.2.2/README.md#time_tickFormat) - format ticks for human consumption. +* [*time*.nice](https://github.com/d3/d3-scale/blob/v2.2.2/README.md#time_nice) - extend the domain to nice round times. +* [*time*.copy](https://github.com/d3/d3-scale/blob/v2.2.2/README.md#time_copy) - create a copy of this scale. +* [d3.scaleUtc](https://github.com/d3/d3-scale/blob/v2.2.2/README.md#scaleUtc) - create a linear scale for UTC. +* [d3.tickFormat](https://github.com/d3/d3-scale/blob/v2.2.2/README.md#tickFormat) - format ticks for human consumption. + +### [Sequential Scales](https://github.com/d3/d3-scale/blob/v2.2.2/README.md#sequential-scales) + +Map a continuous, quantitative domain to a continuous, fixed interpolator. + +* [d3.scaleSequential](https://github.com/d3/d3-scale/blob/v2.2.2/README.md#scaleSequential) - create a sequential scale. +* [*sequential*.interpolator](https://github.com/d3/d3-scale/blob/v2.2.2/README.md#sequential_interpolator) - set the scale’s output interpolator. +* [d3.scaleSequentialLog](https://github.com/d3/d3-scale/blob/v2.2.2/README.md#scaleSequentialLog) - +* [d3.scaleSequentialPow](https://github.com/d3/d3-scale/blob/v2.2.2/README.md#scaleSequentialPow) - +* [d3.scaleSequentialSqrt](https://github.com/d3/d3-scale/blob/v2.2.2/README.md#scaleSequentialSqrt) - +* [d3.scaleSequentialSymlog](https://github.com/d3/d3-scale/blob/v2.2.2/README.md#scaleSequentialSymlog) - +* [d3.scaleSequentialQuantile](https://github.com/d3/d3-scale/blob/v2.2.2/README.md#scaleSequentialQuantile) - + +### [Diverging Scales](https://github.com/d3/d3-scale/blob/v2.2.2/README.md#diverging-scales) + +Map a continuous, quantitative domain to a continuous, fixed interpolator. + +* [d3.scaleDiverging](https://github.com/d3/d3-scale/blob/v2.2.2/README.md#scaleDiverging) - create a diverging scale. +* [*diverging*.interpolator](https://github.com/d3/d3-scale/blob/v2.2.2/README.md#diverging_interpolator) - set the scale’s output interpolator. +* [d3.scaleDivergingLog](https://github.com/d3/d3-scale/blob/v2.2.2/README.md#scaleDivergingLog) - +* [d3.scaleDivergingPow](https://github.com/d3/d3-scale/blob/v2.2.2/README.md#scaleDivergingPow) - +* [d3.scaleDivergingSqrt](https://github.com/d3/d3-scale/blob/v2.2.2/README.md#scaleDivergingSqrt) - +* [d3.scaleDivergingSymlog](https://github.com/d3/d3-scale/blob/v2.2.2/README.md#scaleDivergingSymlog) - + +### [Quantize Scales](https://github.com/d3/d3-scale/blob/v2.2.2/README.md#quantize-scales) + +Map a continuous, quantitative domain to a discrete range. + +* [d3.scaleQuantize](https://github.com/d3/d3-scale/blob/v2.2.2/README.md#scaleQuantize) - create a uniform quantizing linear scale. +* [*quantize*](https://github.com/d3/d3-scale/blob/v2.2.2/README.md#_quantize) - compute the range value corresponding to a given domain value. +* [*quantize*.invertExtent](https://github.com/d3/d3-scale/blob/v2.2.2/README.md#quantize_invertExtent) - compute the domain values corresponding to a given range value. +* [*quantize*.domain](https://github.com/d3/d3-scale/blob/v2.2.2/README.md#quantize_domain) - set the input domain. +* [*quantize*.range](https://github.com/d3/d3-scale/blob/v2.2.2/README.md#quantize_range) - set the output range. +* [*quantize*.nice](https://github.com/d3/d3-scale/blob/v2.2.2/README.md#quantize_nice) - extend the domain to nice round numbers. +* [*quantize*.ticks](https://github.com/d3/d3-scale/blob/v2.2.2/README.md#quantize_ticks) - compute representative values from the domain. +* [*quantize*.tickFormat](https://github.com/d3/d3-scale/blob/v2.2.2/README.md#quantize_tickFormat) - format ticks for human consumption. +* [*quantize*.copy](https://github.com/d3/d3-scale/blob/v2.2.2/README.md#quantize_copy) - create a copy of this scale. +* [d3.scaleQuantile](https://github.com/d3/d3-scale/blob/v2.2.2/README.md#scaleQuantile) - create a quantile quantizing linear scale. +* [*quantile*](https://github.com/d3/d3-scale/blob/v2.2.2/README.md#_quantile) - compute the range value corresponding to a given domain value. +* [*quantile*.invertExtent](https://github.com/d3/d3-scale/blob/v2.2.2/README.md#quantile_invertExtent) - compute the domain values corresponding to a given range value. +* [*quantile*.domain](https://github.com/d3/d3-scale/blob/v2.2.2/README.md#quantile_domain) - set the input domain. +* [*quantile*.range](https://github.com/d3/d3-scale/blob/v2.2.2/README.md#quantile_range) - set the output range. +* [*quantile*.quantiles](https://github.com/d3/d3-scale/blob/v2.2.2/README.md#quantile_quantiles) - get the quantile thresholds. +* [*quantile*.copy](https://github.com/d3/d3-scale/blob/v2.2.2/README.md#quantile_copy) - create a copy of this scale. +* [d3.scaleThreshold](https://github.com/d3/d3-scale/blob/v2.2.2/README.md#scaleThreshold) - create an arbitrary quantizing linear scale. +* [*threshold*](https://github.com/d3/d3-scale/blob/v2.2.2/README.md#_threshold) - compute the range value corresponding to a given domain value. +* [*threshold*.invertExtent](https://github.com/d3/d3-scale/blob/v2.2.2/README.md#threshold_invertExtent) - compute the domain values corresponding to a given range value. +* [*threshold*.domain](https://github.com/d3/d3-scale/blob/v2.2.2/README.md#threshold_domain) - set the input domain. +* [*threshold*.range](https://github.com/d3/d3-scale/blob/v2.2.2/README.md#threshold_range) - set the output range. +* [*threshold*.copy](https://github.com/d3/d3-scale/blob/v2.2.2/README.md#threshold_copy) - create a copy of this scale. + +### [Ordinal Scales](https://github.com/d3/d3-scale/blob/v2.2.2/README.md#ordinal-scales) + +Map a discrete domain to a discrete range. + +* [d3.scaleOrdinal](https://github.com/d3/d3-scale/blob/v2.2.2/README.md#scaleOrdinal) - create an ordinal scale. +* [*ordinal*](https://github.com/d3/d3-scale/blob/v2.2.2/README.md#_ordinal) - compute the range value corresponding to a given domain value. +* [*ordinal*.domain](https://github.com/d3/d3-scale/blob/v2.2.2/README.md#ordinal_domain) - set the input domain. +* [*ordinal*.range](https://github.com/d3/d3-scale/blob/v2.2.2/README.md#ordinal_range) - set the output range. +* [*ordinal*.unknown](https://github.com/d3/d3-scale/blob/v2.2.2/README.md#ordinal_unknown) - set the output value for unknown inputs. +* [*ordinal*.copy](https://github.com/d3/d3-scale/blob/v2.2.2/README.md#ordinal_copy) - create a copy of this scale. +* [d3.scaleImplicit](https://github.com/d3/d3-scale/blob/v2.2.2/README.md#scaleImplicit) - a special unknown value for implicit domains. +* [d3.scaleBand](https://github.com/d3/d3-scale/blob/v2.2.2/README.md#scaleBand) - create an ordinal band scale. +* [*band*](https://github.com/d3/d3-scale/blob/v2.2.2/README.md#_band) - compute the band start corresponding to a given domain value. +* [*band*.domain](https://github.com/d3/d3-scale/blob/v2.2.2/README.md#band_domain) - set the input domain. +* [*band*.range](https://github.com/d3/d3-scale/blob/v2.2.2/README.md#band_range) - set the output range. +* [*band*.rangeRound](https://github.com/d3/d3-scale/blob/v2.2.2/README.md#band_rangeRound) - set the output range and enable rounding. +* [*band*.round](https://github.com/d3/d3-scale/blob/v2.2.2/README.md#band_round) - enable rounding. +* [*band*.paddingInner](https://github.com/d3/d3-scale/blob/v2.2.2/README.md#band_paddingInner) - set padding between bands. +* [*band*.paddingOuter](https://github.com/d3/d3-scale/blob/v2.2.2/README.md#band_paddingOuter) - set padding outside the first and last bands. +* [*band*.padding](https://github.com/d3/d3-scale/blob/v2.2.2/README.md#band_padding) - set padding outside and between bands. +* [*band*.align](https://github.com/d3/d3-scale/blob/v2.2.2/README.md#band_align) - set band alignment, if there is extra space. +* [*band*.bandwidth](https://github.com/d3/d3-scale/blob/v2.2.2/README.md#band_bandwidth) - get the width of each band. +* [*band*.step](https://github.com/d3/d3-scale/blob/v2.2.2/README.md#band_step) - get the distance between the starts of adjacent bands. +* [*band*.copy](https://github.com/d3/d3-scale/blob/v2.2.2/README.md#band_copy) - create a copy of this scale. +* [d3.scalePoint](https://github.com/d3/d3-scale/blob/v2.2.2/README.md#scalePoint) - create an ordinal point scale. +* [*point*](https://github.com/d3/d3-scale/blob/v2.2.2/README.md#_point) - compute the point corresponding to a given domain value. +* [*point*.domain](https://github.com/d3/d3-scale/blob/v2.2.2/README.md#point_domain) - set the input domain. +* [*point*.range](https://github.com/d3/d3-scale/blob/v2.2.2/README.md#point_range) - set the output range. +* [*point*.rangeRound](https://github.com/d3/d3-scale/blob/v2.2.2/README.md#point_rangeRound) - set the output range and enable rounding. +* [*point*.round](https://github.com/d3/d3-scale/blob/v2.2.2/README.md#point_round) - enable rounding. +* [*point*.padding](https://github.com/d3/d3-scale/blob/v2.2.2/README.md#point_padding) - set padding outside the first and last point. +* [*point*.align](https://github.com/d3/d3-scale/blob/v2.2.2/README.md#point_align) - set point alignment, if there is extra space. +* [*point*.bandwidth](https://github.com/d3/d3-scale/blob/v2.2.2/README.md#point_bandwidth) - returns zero. +* [*point*.step](https://github.com/d3/d3-scale/blob/v2.2.2/README.md#point_step) - get the distance between the starts of adjacent points. +* [*point*.copy](https://github.com/d3/d3-scale/blob/v2.2.2/README.md#point_copy) - create a copy of this scale. + +## [Selections (d3-selection)](https://github.com/d3/d3-selection/tree/v1.4.1) + +Transform the DOM by selecting elements and joining to data. + +### [Selecting Elements](https://github.com/d3/d3-selection/blob/v1.4.1/README.md#selecting-elements) + +* [d3.selection](https://github.com/d3/d3-selection/blob/v1.4.1/README.md#selection) - select the root document element. +* [d3.select](https://github.com/d3/d3-selection/blob/v1.4.1/README.md#select) - select an element from the document. +* [d3.selectAll](https://github.com/d3/d3-selection/blob/v1.4.1/README.md#selectAll) - select multiple elements from the document. +* [*selection*.select](https://github.com/d3/d3-selection/blob/v1.4.1/README.md#selection_select) - select a descendant element for each selected element. +* [*selection*.selectAll](https://github.com/d3/d3-selection/blob/v1.4.1/README.md#selection_selectAll) - select multiple descendants for each selected element. +* [*selection*.filter](https://github.com/d3/d3-selection/blob/v1.4.1/README.md#selection_filter) - filter elements based on data. +* [*selection*.merge](https://github.com/d3/d3-selection/blob/v1.4.1/README.md#selection_merge) - merge this selection with another. +* [d3.matcher](https://github.com/d3/d3-selection/blob/v1.4.1/README.md#matcher) - test whether an element matches a selector. +* [d3.selector](https://github.com/d3/d3-selection/blob/v1.4.1/README.md#selector) - select an element. +* [d3.selectorAll](https://github.com/d3/d3-selection/blob/v1.4.1/README.md#selectorAll) - select elements. +* [d3.window](https://github.com/d3/d3-selection/blob/v1.4.1/README.md#window) - get a node’s owner window. +* [d3.style](https://github.com/d3/d3-selection/blob/v1.4.1/README.md#style) - get a node’s current style value. + +### [Modifying Elements](https://github.com/d3/d3-selection/blob/v1.4.1/README.md#modifying-elements) + +* [*selection*.attr](https://github.com/d3/d3-selection/blob/v1.4.1/README.md#selection_attr) - get or set an attribute. +* [*selection*.classed](https://github.com/d3/d3-selection/blob/v1.4.1/README.md#selection_classed) - get, add or remove CSS classes. +* [*selection*.style](https://github.com/d3/d3-selection/blob/v1.4.1/README.md#selection_style) - get or set a style property. +* [*selection*.property](https://github.com/d3/d3-selection/blob/v1.4.1/README.md#selection_property) - get or set a (raw) property. +* [*selection*.text](https://github.com/d3/d3-selection/blob/v1.4.1/README.md#selection_text) - get or set the text content. +* [*selection*.html](https://github.com/d3/d3-selection/blob/v1.4.1/README.md#selection_html) - get or set the inner HTML. +* [*selection*.append](https://github.com/d3/d3-selection/blob/v1.4.1/README.md#selection_append) - create, append and select new elements. +* [*selection*.insert](https://github.com/d3/d3-selection/blob/v1.4.1/README.md#selection_insert) - create, insert and select new elements. +* [*selection*.remove](https://github.com/d3/d3-selection/blob/v1.4.1/README.md#selection_remove) - remove elements from the document. +* [*selection*.clone](https://github.com/d3/d3-selection/blob/v1.4.1/README.md#selection_clone) - insert clones of selected elements. +* [*selection*.sort](https://github.com/d3/d3-selection/blob/v1.4.1/README.md#selection_sort) - sort elements in the document based on data. +* [*selection*.order](https://github.com/d3/d3-selection/blob/v1.4.1/README.md#selection_order) - reorders elements in the document to match the selection. +* [*selection*.raise](https://github.com/d3/d3-selection/blob/v1.4.1/README.md#selection_raise) - reorders each element as the last child of its parent. +* [*selection*.lower](https://github.com/d3/d3-selection/blob/v1.4.1/README.md#selection_lower) - reorders each element as the first child of its parent. +* [d3.create](https://github.com/d3/d3-selection/blob/v1.4.1/README.md#create) - create and select a detached element. +* [d3.creator](https://github.com/d3/d3-selection/blob/v1.4.1/README.md#creator) - create an element by name. + +### [Joining Data](https://github.com/d3/d3-selection/blob/v1.4.1/README.md#joining-data) + +* [*selection*.data](https://github.com/d3/d3-selection/blob/v1.4.1/README.md#selection_data) - bind elements to data. +* [*selection*.join](https://github.com/d3/d3-selection/blob/v1.4.1/README.md#selection_join) - enter, update or exit elements based on data. +* [*selection*.enter](https://github.com/d3/d3-selection/blob/v1.4.1/README.md#selection_enter) - get the enter selection (data missing elements). +* [*selection*.exit](https://github.com/d3/d3-selection/blob/v1.4.1/README.md#selection_exit) - get the exit selection (elements missing data). +* [*selection*.datum](https://github.com/d3/d3-selection/blob/v1.4.1/README.md#selection_datum) - get or set element data (without joining). + +### [Handling Events](https://github.com/d3/d3-selection/blob/v1.4.1/README.md#handling-events) + +* [*selection*.on](https://github.com/d3/d3-selection/blob/v1.4.1/README.md#selection_on) - add or remove event listeners. +* [*selection*.dispatch](https://github.com/d3/d3-selection/blob/v1.4.1/README.md#selection_dispatch) - dispatch a custom event. +* [d3.event](https://github.com/d3/d3-selection/blob/v1.4.1/README.md#event) - the current user event, during interaction. +* [d3.customEvent](https://github.com/d3/d3-selection/blob/v1.4.1/README.md#customEvent) - temporarily define a custom event. +* [d3.mouse](https://github.com/d3/d3-selection/blob/v1.4.1/README.md#mouse) - get the mouse position relative to a given container. +* [d3.touch](https://github.com/d3/d3-selection/blob/v1.4.1/README.md#touch) - get a touch position relative to a given container. +* [d3.touches](https://github.com/d3/d3-selection/blob/v1.4.1/README.md#touches) - get the touch positions relative to a given container. +* [d3.clientPoint](https://github.com/d3/d3-selection/blob/v1.4.1/README.md#clientPoint) - get a position relative to a given container. + +### [Control Flow](https://github.com/d3/d3-selection/blob/v1.4.1/README.md#control-flow) + +* [*selection*.each](https://github.com/d3/d3-selection/blob/v1.4.1/README.md#selection_each) - call a function for each element. +* [*selection*.call](https://github.com/d3/d3-selection/blob/v1.4.1/README.md#selection_call) - call a function with this selection. +* [*selection*.empty](https://github.com/d3/d3-selection/blob/v1.4.1/README.md#selection_empty) - returns true if this selection is empty. +* [*selection*.nodes](https://github.com/d3/d3-selection/blob/v1.4.1/README.md#selection_nodes) - returns an array of all selected elements. +* [*selection*.node](https://github.com/d3/d3-selection/blob/v1.4.1/README.md#selection_node) - returns the first (non-null) element. +* [*selection*.size](https://github.com/d3/d3-selection/blob/v1.4.1/README.md#selection_size) - returns the count of elements. + +### [Local Variables](https://github.com/d3/d3-selection/blob/v1.4.1/README.md#local-variables) + +* [d3.local](https://github.com/d3/d3-selection/blob/v1.4.1/README.md#local) - declares a new local variable. +* [*local*.set](https://github.com/d3/d3-selection/blob/v1.4.1/README.md#local_set) - set a local variable’s value. +* [*local*.get](https://github.com/d3/d3-selection/blob/v1.4.1/README.md#local_get) - get a local variable’s value. +* [*local*.remove](https://github.com/d3/d3-selection/blob/v1.4.1/README.md#local_remove) - delete a local variable. +* [*local*.toString](https://github.com/d3/d3-selection/blob/v1.4.1/README.md#local_toString) - get the property identifier of a local variable. + +### [Namespaces](https://github.com/d3/d3-selection/blob/v1.4.1/README.md#namespaces) + +* [d3.namespace](https://github.com/d3/d3-selection/blob/v1.4.1/README.md#namespace) - qualify a prefixed XML name, such as “xlink:href”. +* [d3.namespaces](https://github.com/d3/d3-selection/blob/v1.4.1/README.md#namespaces) - the built-in XML namespaces. + +## [Shapes (d3-shape)](https://github.com/d3/d3-shape/tree/v1.3.7) + +Graphical primitives for visualization. + +### [Arcs](https://github.com/d3/d3-shape/blob/v1.3.7/README.md#arcs) + +Circular or annular sectors, as in a pie or donut chart. + +* [d3.arc](https://github.com/d3/d3-shape/blob/v1.3.7/README.md#arc) - create a new arc generator. +* [*arc*](https://github.com/d3/d3-shape/blob/v1.3.7/README.md#_arc) - generate an arc for the given datum. +* [*arc*.centroid](https://github.com/d3/d3-shape/blob/v1.3.7/README.md#arc_centroid) - compute an arc’s midpoint. +* [*arc*.innerRadius](https://github.com/d3/d3-shape/blob/v1.3.7/README.md#arc_innerRadius) - set the inner radius. +* [*arc*.outerRadius](https://github.com/d3/d3-shape/blob/v1.3.7/README.md#arc_outerRadius) - set the outer radius. +* [*arc*.cornerRadius](https://github.com/d3/d3-shape/blob/v1.3.7/README.md#arc_cornerRadius) - set the corner radius, for rounded corners. +* [*arc*.startAngle](https://github.com/d3/d3-shape/blob/v1.3.7/README.md#arc_startAngle) - set the start angle. +* [*arc*.endAngle](https://github.com/d3/d3-shape/blob/v1.3.7/README.md#arc_endAngle) - set the end angle. +* [*arc*.padAngle](https://github.com/d3/d3-shape/blob/v1.3.7/README.md#arc_padAngle) - set the angle between adjacent arcs, for padded arcs. +* [*arc*.padRadius](https://github.com/d3/d3-shape/blob/v1.3.7/README.md#arc_padRadius) - set the radius at which to linearize padding. +* [*arc*.context](https://github.com/d3/d3-shape/blob/v1.3.7/README.md#arc_context) - set the rendering context. + +### [Pies](https://github.com/d3/d3-shape/blob/v1.3.7/README.md#pies) + +Compute the necessary angles to represent a tabular dataset as a pie or donut chart. + +* [d3.pie](https://github.com/d3/d3-shape/blob/v1.3.7/README.md#pie) - create a new pie generator. +* [*pie*](https://github.com/d3/d3-shape/blob/v1.3.7/README.md#_pie) - compute the arc angles for the given dataset. +* [*pie*.value](https://github.com/d3/d3-shape/blob/v1.3.7/README.md#pie_value) - set the value accessor. +* [*pie*.sort](https://github.com/d3/d3-shape/blob/v1.3.7/README.md#pie_sort) - set the sort order comparator. +* [*pie*.sortValues](https://github.com/d3/d3-shape/blob/v1.3.7/README.md#pie_sortValues) - set the sort order comparator. +* [*pie*.startAngle](https://github.com/d3/d3-shape/blob/v1.3.7/README.md#pie_startAngle) - set the overall start angle. +* [*pie*.endAngle](https://github.com/d3/d3-shape/blob/v1.3.7/README.md#pie_endAngle) - set the overall end angle. +* [*pie*.padAngle](https://github.com/d3/d3-shape/blob/v1.3.7/README.md#pie_padAngle) - set the pad angle between adjacent arcs. + +### [Lines](https://github.com/d3/d3-shape/blob/v1.3.7/README.md#lines) + +A spline or polyline, as in a line chart. + +* [d3.line](https://github.com/d3/d3-shape/blob/v1.3.7/README.md#line) - create a new line generator. +* [*line*](https://github.com/d3/d3-shape/blob/v1.3.7/README.md#_line) - generate a line for the given dataset. +* [*line*.x](https://github.com/d3/d3-shape/blob/v1.3.7/README.md#line_x) - set the *x* accessor. +* [*line*.y](https://github.com/d3/d3-shape/blob/v1.3.7/README.md#line_y) - set the *y* accessor. +* [*line*.defined](https://github.com/d3/d3-shape/blob/v1.3.7/README.md#line_defined) - set the defined accessor. +* [*line*.curve](https://github.com/d3/d3-shape/blob/v1.3.7/README.md#line_curve) - set the curve interpolator. +* [*line*.context](https://github.com/d3/d3-shape/blob/v1.3.7/README.md#line_context) - set the rendering context. +* [d3.lineRadial](https://github.com/d3/d3-shape/blob/v1.3.7/README.md#lineRadial) - create a new radial line generator. +* [*lineRadial*](https://github.com/d3/d3-shape/blob/v1.3.7/README.md#_lineRadial) - generate a line for the given dataset. +* [*lineRadial*.angle](https://github.com/d3/d3-shape/blob/v1.3.7/README.md#lineRadial_angle) - set the angle accessor. +* [*lineRadial*.radius](https://github.com/d3/d3-shape/blob/v1.3.7/README.md#lineRadial_radius) - set the radius accessor. +* [*lineRadial*.defined](https://github.com/d3/d3-shape/blob/v1.3.7/README.md#lineRadial_defined) - set the defined accessor. +* [*lineRadial*.curve](https://github.com/d3/d3-shape/blob/v1.3.7/README.md#lineRadial_curve) - set the curve interpolator. +* [*lineRadial*.context](https://github.com/d3/d3-shape/blob/v1.3.7/README.md#lineRadial_context) - set the rendering context. + +### [Areas](https://github.com/d3/d3-shape/blob/v1.3.7/README.md#areas) + +An area, defined by a bounding topline and baseline, as in an area chart. + +* [d3.area](https://github.com/d3/d3-shape/blob/v1.3.7/README.md#area) - create a new area generator. +* [*area*](https://github.com/d3/d3-shape/blob/v1.3.7/README.md#_area) - generate an area for the given dataset. +* [*area*.x](https://github.com/d3/d3-shape/blob/v1.3.7/README.md#area_x) - set the *x0* and *x1* accessors. +* [*area*.x0](https://github.com/d3/d3-shape/blob/v1.3.7/README.md#area_x0) - set the baseline *x* accessor. +* [*area*.x1](https://github.com/d3/d3-shape/blob/v1.3.7/README.md#area_x1) - set the topline *x* accessor. +* [*area*.y](https://github.com/d3/d3-shape/blob/v1.3.7/README.md#area_y) - set the *y0* and *y1* accessors. +* [*area*.y0](https://github.com/d3/d3-shape/blob/v1.3.7/README.md#area_y0) - set the baseline *y* accessor. +* [*area*.y1](https://github.com/d3/d3-shape/blob/v1.3.7/README.md#area_y1) - set the topline *y* accessor. +* [*area*.defined](https://github.com/d3/d3-shape/blob/v1.3.7/README.md#area_defined) - set the defined accessor. +* [*area*.curve](https://github.com/d3/d3-shape/blob/v1.3.7/README.md#area_curve) - set the curve interpolator. +* [*area*.context](https://github.com/d3/d3-shape/blob/v1.3.7/README.md#area_context) - set the rendering context. +* [*area*.lineX0](https://github.com/d3/d3-shape/blob/v1.3.7/README.md#area_lineX0) - derive a line for the left edge of an area. +* [*area*.lineX1](https://github.com/d3/d3-shape/blob/v1.3.7/README.md#area_lineX1) - derive a line for the right edge of an area. +* [*area*.lineY0](https://github.com/d3/d3-shape/blob/v1.3.7/README.md#area_lineY0) - derive a line for the top edge of an area. +* [*area*.lineY1](https://github.com/d3/d3-shape/blob/v1.3.7/README.md#area_lineY1) - derive a line for the bottom edge of an area. +* [d3.radialArea](https://github.com/d3/d3-shape/blob/v1.3.7/README.md#radialArea) - create a new radial area generator. +* [*radialArea*](https://github.com/d3/d3-shape/blob/v1.3.7/README.md#_radialArea) - generate an area for the given dataset. +* [*radialArea*.angle](https://github.com/d3/d3-shape/blob/v1.3.7/README.md#radialArea_angle) - set the start and end angle accessors. +* [*radialArea*.startAngle](https://github.com/d3/d3-shape/blob/v1.3.7/README.md#radialArea_startAngle) - set the start angle accessor. +* [*radialArea*.endAngle](https://github.com/d3/d3-shape/blob/v1.3.7/README.md#radialArea_endAngle) - set the end angle accessor. +* [*radialArea*.radius](https://github.com/d3/d3-shape/blob/v1.3.7/README.md#radialArea_radius) - set the inner and outer radius accessors. +* [*radialArea*.innerRadius](https://github.com/d3/d3-shape/blob/v1.3.7/README.md#radialArea_innerRadius) - set the inner radius accessor. +* [*radialArea*.outerRadius](https://github.com/d3/d3-shape/blob/v1.3.7/README.md#radialArea_outerRadius) - set the outer radius accessor. +* [*radialArea*.defined](https://github.com/d3/d3-shape/blob/v1.3.7/README.md#radialArea_defined) - set the defined accessor. +* [*radialArea*.curve](https://github.com/d3/d3-shape/blob/v1.3.7/README.md#radialArea_curve) - set the curve interpolator. +* [*radialArea*.context](https://github.com/d3/d3-shape/blob/v1.3.7/README.md#radialArea_context) - set the rendering context. +* [*radialArea*.lineStartAngle](https://github.com/d3/d3-shape/blob/v1.3.7/README.md#area_lineStartAngle) - derive a line for the start edge of an area. +* [*radialArea*.lineEndAngle](https://github.com/d3/d3-shape/blob/v1.3.7/README.md#area_lineEndAngle) - derive a line for the end edge of an area. +* [*radialArea*.lineInnerRadius](https://github.com/d3/d3-shape/blob/v1.3.7/README.md#area_lineInnerRadius) - derive a line for the inner edge of an area. +* [*radialArea*.lineOuterRadius](https://github.com/d3/d3-shape/blob/v1.3.7/README.md#area_lineOuterRadius) - derive a line for the outer edge of an area. + +### [Curves](https://github.com/d3/d3-shape/blob/v1.3.7/README.md#curves) + +Interpolate between points to produce a continuous shape. + +* [d3.curveBasis](https://github.com/d3/d3-shape/blob/v1.3.7/README.md#curveBasis) - a cubic basis spline, repeating the end points. +* [d3.curveBasisClosed](https://github.com/d3/d3-shape/blob/v1.3.7/README.md#curveBasisClosed) - a closed cubic basis spline. +* [d3.curveBasisOpen](https://github.com/d3/d3-shape/blob/v1.3.7/README.md#curveBasisOpen) - a cubic basis spline. +* [d3.curveBundle](https://github.com/d3/d3-shape/blob/v1.3.7/README.md#curveBundle) - a straightened cubic basis spline. +* [*bundle*.beta](https://github.com/d3/d3-shape/blob/v1.3.7/README.md#bundle_beta) - set the bundle tension *beta*. +* [d3.curveCardinal](https://github.com/d3/d3-shape/blob/v1.3.7/README.md#curveCardinal) - a cubic cardinal spline, with one-sided difference at each end. +* [d3.curveCardinalClosed](https://github.com/d3/d3-shape/blob/v1.3.7/README.md#curveCardinalClosed) - a closed cubic cardinal spline. +* [d3.curveCardinalOpen](https://github.com/d3/d3-shape/blob/v1.3.7/README.md#curveCardinalOpen) - a cubic cardinal spline. +* [*cardinal*.tension](https://github.com/d3/d3-shape/blob/v1.3.7/README.md#cardinal_tension) - set the cardinal spline tension. +* [d3.curveCatmullRom](https://github.com/d3/d3-shape/blob/v1.3.7/README.md#curveCatmullRom) - a cubic Catmull–Rom spline, with one-sided difference at each end. +* [d3.curveCatmullRomClosed](https://github.com/d3/d3-shape/blob/v1.3.7/README.md#curveCatmullRomClosed) - a closed cubic Catmull–Rom spline. +* [d3.curveCatmullRomOpen](https://github.com/d3/d3-shape/blob/v1.3.7/README.md#curveCatmullRomOpen) - a cubic Catmull–Rom spline. +* [*catmullRom*.alpha](https://github.com/d3/d3-shape/blob/v1.3.7/README.md#catmullRom_alpha) - set the Catmull–Rom parameter *alpha*. +* [d3.curveLinear](https://github.com/d3/d3-shape/blob/v1.3.7/README.md#curveLinear) - a polyline. +* [d3.curveLinearClosed](https://github.com/d3/d3-shape/blob/v1.3.7/README.md#curveLinearClosed) - a closed polyline. +* [d3.curveMonotoneX](https://github.com/d3/d3-shape/blob/v1.3.7/README.md#curveMonotoneX) - a cubic spline that, given monotonicity in *x*, preserves it in *y*. +* [d3.curveMonotoneY](https://github.com/d3/d3-shape/blob/v1.3.7/README.md#curveMonotoneY) - a cubic spline that, given monotonicity in *y*, preserves it in *x*. +* [d3.curveNatural](https://github.com/d3/d3-shape/blob/v1.3.7/README.md#curveNatural) - a natural cubic spline. +* [d3.curveStep](https://github.com/d3/d3-shape/blob/v1.3.7/README.md#curveStep) - a piecewise constant function. +* [d3.curveStepAfter](https://github.com/d3/d3-shape/blob/v1.3.7/README.md#curveStepAfter) - a piecewise constant function. +* [d3.curveStepBefore](https://github.com/d3/d3-shape/blob/v1.3.7/README.md#curveStepBefore) - a piecewise constant function. +* [*curve*.areaStart](https://github.com/d3/d3-shape/blob/v1.3.7/README.md#curve_areaStart) - start a new area segment. +* [*curve*.areaEnd](https://github.com/d3/d3-shape/blob/v1.3.7/README.md#curve_areaEnd) - end the current area segment. +* [*curve*.lineStart](https://github.com/d3/d3-shape/blob/v1.3.7/README.md#curve_lineStart) - start a new line segment. +* [*curve*.lineEnd](https://github.com/d3/d3-shape/blob/v1.3.7/README.md#curve_lineEnd) - end the current line segment. +* [*curve*.point](https://github.com/d3/d3-shape/blob/v1.3.7/README.md#curve_point) - add a point to the current line segment. + +### [Links](https://github.com/d3/d3-shape/blob/v1.3.7/README.md#links) + +A smooth cubic Bézier curve from a source to a target. + +* [d3.linkVertical](https://github.com/d3/d3-shape/blob/v1.3.7/README.md#linkVertical) - create a new vertical link generator. +* [d3.linkHorizontal](https://github.com/d3/d3-shape/blob/v1.3.7/README.md#linkHorizontal) - create a new horizontal link generator. +* [*link*](https://github.com/d3/d3-shape/blob/v1.3.7/README.md#_link) - generate a link. +* [*link*.source](https://github.com/d3/d3-shape/blob/v1.3.7/README.md#link_source) - set the source accessor. +* [*link*.target](https://github.com/d3/d3-shape/blob/v1.3.7/README.md#link_target) - set the target accessor. +* [*link*.x](https://github.com/d3/d3-shape/blob/v1.3.7/README.md#link_x) - set the point *x*-accessor. +* [*link*.y](https://github.com/d3/d3-shape/blob/v1.3.7/README.md#link_y) - set the point *y*-accessor. +* [*link*.context](https://github.com/d3/d3-shape/blob/v1.3.7/README.md#link_context) - set the rendering context. +* [d3.linkRadial](https://github.com/d3/d3-shape/blob/v1.3.7/README.md#linkRadial) - create a new radial link generator. +* [*radialLink*.angle](https://github.com/d3/d3-shape/blob/v1.3.7/README.md#radialLink_angle) - set the point *angle* accessor. +* [*radialLink*.radius](https://github.com/d3/d3-shape/blob/v1.3.7/README.md#radialLink_radius) - set the point *radius* accessor. + +### [Symbols](https://github.com/d3/d3-shape/blob/v1.3.7/README.md#symbols) + +A categorical shape encoding, as in a scatterplot. + +* [d3.symbol](https://github.com/d3/d3-shape/blob/v1.3.7/README.md#symbol) - create a new symbol generator. +* [*symbol*](https://github.com/d3/d3-shape/blob/v1.3.7/README.md#_symbol) - generate a symbol for the given datum. +* [*symbol*.type](https://github.com/d3/d3-shape/blob/v1.3.7/README.md#symbol_type) - set the symbol type. +* [*symbol*.size](https://github.com/d3/d3-shape/blob/v1.3.7/README.md#symbol_size) - set the size of the symbol in square pixels. +* [*symbol*.context](https://github.com/d3/d3-shape/blob/v1.3.7/README.md#symbol_context) - set the rendering context. +* [d3.symbols](https://github.com/d3/d3-shape/blob/v1.3.7/README.md#symbols) - the array of built-in symbol types. +* [d3.symbolCircle](https://github.com/d3/d3-shape/blob/v1.3.7/README.md#symbolCircle) - a circle. +* [d3.symbolCross](https://github.com/d3/d3-shape/blob/v1.3.7/README.md#symbolCross) - a Greek cross with arms of equal length. +* [d3.symbolDiamond](https://github.com/d3/d3-shape/blob/v1.3.7/README.md#symbolDiamond) - a rhombus. +* [d3.symbolSquare](https://github.com/d3/d3-shape/blob/v1.3.7/README.md#symbolSquare) - a square. +* [d3.symbolStar](https://github.com/d3/d3-shape/blob/v1.3.7/README.md#symbolStar) - a pentagonal star (pentagram). +* [d3.symbolTriangle](https://github.com/d3/d3-shape/blob/v1.3.7/README.md#symbolTriangle) - an up-pointing triangle. +* [d3.symbolWye](https://github.com/d3/d3-shape/blob/v1.3.7/README.md#symbolWye) - a Y shape. +* [d3.pointRadial](https://github.com/d3/d3-shape/blob/v1.3.7/README.md#pointRadial) - +* [*symbolType*.draw](https://github.com/d3/d3-shape/blob/v1.3.7/README.md#symbolType_draw) - draw this symbol to the given context. + +### [Stacks](https://github.com/d3/d3-shape/blob/v1.3.7/README.md#stacks) + +Stack shapes, placing one adjacent to another, as in a stacked bar chart. + +* [d3.stack](https://github.com/d3/d3-shape/blob/v1.3.7/README.md#stack) - create a new stack generator. +* [*stack*](https://github.com/d3/d3-shape/blob/v1.3.7/README.md#_stack) - generate a stack for the given dataset. +* [*stack*.keys](https://github.com/d3/d3-shape/blob/v1.3.7/README.md#stack_keys) - set the keys accessor. +* [*stack*.value](https://github.com/d3/d3-shape/blob/v1.3.7/README.md#stack_value) - set the value accessor. +* [*stack*.order](https://github.com/d3/d3-shape/blob/v1.3.7/README.md#stack_order) - set the order accessor. +* [*stack*.offset](https://github.com/d3/d3-shape/blob/v1.3.7/README.md#stack_offset) - set the offset accessor. +* [d3.stackOrderAppearance](https://github.com/d3/d3-shape/blob/v1.3.7/README.md#stackOrderAppearance) - put the earliest series on bottom. +* [d3.stackOrderAscending](https://github.com/d3/d3-shape/blob/v1.3.7/README.md#stackOrderAscending) - put the smallest series on bottom. +* [d3.stackOrderDescending](https://github.com/d3/d3-shape/blob/v1.3.7/README.md#stackOrderDescending) - put the largest series on bottom. +* [d3.stackOrderInsideOut](https://github.com/d3/d3-shape/blob/v1.3.7/README.md#stackOrderInsideOut) - put earlier series in the middle. +* [d3.stackOrderNone](https://github.com/d3/d3-shape/blob/v1.3.7/README.md#stackOrderNone) - use the given series order. +* [d3.stackOrderReverse](https://github.com/d3/d3-shape/blob/v1.3.7/README.md#stackOrderReverse) - use the reverse of the given series order. +* [d3.stackOffsetExpand](https://github.com/d3/d3-shape/blob/v1.3.7/README.md#stackOffsetExpand) - normalize the baseline to zero and topline to one. +* [d3.stackOffsetDiverging](https://github.com/d3/d3-shape/blob/v1.3.7/README.md#stackOffsetDiverging) - positive above zero; negative below zero. +* [d3.stackOffsetNone](https://github.com/d3/d3-shape/blob/v1.3.7/README.md#stackOffsetNone) - apply a zero baseline. +* [d3.stackOffsetSilhouette](https://github.com/d3/d3-shape/blob/v1.3.7/README.md#stackOffsetSilhouette) - center the streamgraph around zero. +* [d3.stackOffsetWiggle](https://github.com/d3/d3-shape/blob/v1.3.7/README.md#stackOffsetWiggle) - minimize streamgraph wiggling. + +## [Time Formats (d3-time-format)](https://github.com/d3/d3-time-format/tree/v2.2.3) + +Parse and format times, inspired by strptime and strftime. + +* [d3.timeFormat](https://github.com/d3/d3-time-format/blob/v2.2.3/README.md#timeFormat) - alias for *locale*.format on the default locale. +* [d3.timeParse](https://github.com/d3/d3-time-format/blob/v2.2.3/README.md#timeParse) - alias for *locale*.parse on the default locale. +* [d3.utcFormat](https://github.com/d3/d3-time-format/blob/v2.2.3/README.md#utcFormat) - alias for *locale*.utcFormat on the default locale. +* [d3.utcParse](https://github.com/d3/d3-time-format/blob/v2.2.3/README.md#utcParse) - alias for *locale*.utcParse on the default locale. +* [d3.isoFormat](https://github.com/d3/d3-time-format/blob/v2.2.3/README.md#isoFormat) - an ISO 8601 UTC formatter. +* [d3.isoParse](https://github.com/d3/d3-time-format/blob/v2.2.3/README.md#isoParse) - an ISO 8601 UTC parser. +* [d3.timeFormatLocale](https://github.com/d3/d3-time-format/blob/v2.2.3/README.md#timeFormatLocale) - define a custom locale. +* [d3.timeFormatDefaultLocale](https://github.com/d3/d3-time-format/blob/v2.2.3/README.md#timeFormatDefaultLocale) - define the default locale. +* [*locale*.format](https://github.com/d3/d3-time-format/blob/v2.2.3/README.md#locale_format) - create a time formatter. +* [*locale*.parse](https://github.com/d3/d3-time-format/blob/v2.2.3/README.md#locale_parse) - create a time parser. +* [*locale*.utcFormat](https://github.com/d3/d3-time-format/blob/v2.2.3/README.md#locale_utcFormat) - create a UTC formatter. +* [*locale*.utcParse](https://github.com/d3/d3-time-format/blob/v2.2.3/README.md#locale_utcParse) - create a UTC parser. + +## [Time Intervals (d3-time)](https://github.com/d3/d3-time/tree/v1.1.0) + +A calculator for humanity’s peculiar conventions of time. + +* [d3.timeInterval](https://github.com/d3/d3-time/blob/v1.1.0/README.md#timeInterval) - implement a new custom time interval. +* [*interval*](https://github.com/d3/d3-time/blob/v1.1.0/README.md#_interval) - alias for *interval*.floor. +* [*interval*.floor](https://github.com/d3/d3-time/blob/v1.1.0/README.md#interval_floor) - round down to the nearest boundary. +* [*interval*.round](https://github.com/d3/d3-time/blob/v1.1.0/README.md#interval_round) - round to the nearest boundary. +* [*interval*.ceil](https://github.com/d3/d3-time/blob/v1.1.0/README.md#interval_ceil) - round up to the nearest boundary. +* [*interval*.offset](https://github.com/d3/d3-time/blob/v1.1.0/README.md#interval_offset) - offset a date by some number of intervals. +* [*interval*.range](https://github.com/d3/d3-time/blob/v1.1.0/README.md#interval_range) - generate a range of dates at interval boundaries. +* [*interval*.filter](https://github.com/d3/d3-time/blob/v1.1.0/README.md#interval_filter) - create a filtered subset of this interval. +* [*interval*.every](https://github.com/d3/d3-time/blob/v1.1.0/README.md#interval_every) - create a filtered subset of this interval. +* [*interval*.count](https://github.com/d3/d3-time/blob/v1.1.0/README.md#interval_count) - count interval boundaries between two dates. +* [d3.timeMillisecond](https://github.com/d3/d3-time/blob/v1.1.0/README.md#timeMillisecond), [d3.utcMillisecond](https://github.com/d3/d3-time/blob/v1.1.0/README.md#timeMillisecond) - the millisecond interval. +* [d3.timeMilliseconds](https://github.com/d3/d3-time/blob/v1.1.0/README.md#timeMillisecond), [d3.utcMilliseconds](https://github.com/d3/d3-time/blob/v1.1.0/README.md#timeMillisecond) - aliases for millisecond.range. +* [d3.timeSecond](https://github.com/d3/d3-time/blob/v1.1.0/README.md#timeSecond), [d3.utcSecond](https://github.com/d3/d3-time/blob/v1.1.0/README.md#timeSecond) - the second interval. +* [d3.timeSeconds](https://github.com/d3/d3-time/blob/v1.1.0/README.md#timeSecond), [d3.utcSeconds](https://github.com/d3/d3-time/blob/v1.1.0/README.md#timeSecond) - aliases for second.range. +* [d3.timeMinute](https://github.com/d3/d3-time/blob/v1.1.0/README.md#timeMinute), [d3.utcMinute](https://github.com/d3/d3-time/blob/v1.1.0/README.md#timeMinute) - the minute interval. +* [d3.timeMinutes](https://github.com/d3/d3-time/blob/v1.1.0/README.md#timeMinute), [d3.utcMinutes](https://github.com/d3/d3-time/blob/v1.1.0/README.md#timeMinute) - aliases for minute.range. +* [d3.timeHour](https://github.com/d3/d3-time/blob/v1.1.0/README.md#timeHour), [d3.utcHour](https://github.com/d3/d3-time/blob/v1.1.0/README.md#timeHour) - the hour interval. +* [d3.timeHours](https://github.com/d3/d3-time/blob/v1.1.0/README.md#timeHour), [d3.utcHours](https://github.com/d3/d3-time/blob/v1.1.0/README.md#timeHour) - aliases for hour.range. +* [d3.timeDay](https://github.com/d3/d3-time/blob/v1.1.0/README.md#timeDay), [d3.utcDay](https://github.com/d3/d3-time/blob/v1.1.0/README.md#timeDay) - the day interval. +* [d3.timeDays](https://github.com/d3/d3-time/blob/v1.1.0/README.md#timeDay), [d3.utcDays](https://github.com/d3/d3-time/blob/v1.1.0/README.md#timeDay) - aliases for day.range. +* [d3.timeWeek](https://github.com/d3/d3-time/blob/v1.1.0/README.md#timeWeek), [d3.utcWeek](https://github.com/d3/d3-time/blob/v1.1.0/README.md#timeWeek) - aliases for sunday. +* [d3.timeWeeks](https://github.com/d3/d3-time/blob/v1.1.0/README.md#timeWeek), [d3.utcWeeks](https://github.com/d3/d3-time/blob/v1.1.0/README.md#timeWeek) - aliases for week.range. +* [d3.timeSunday](https://github.com/d3/d3-time/blob/v1.1.0/README.md#timeSunday), [d3.utcSunday](https://github.com/d3/d3-time/blob/v1.1.0/README.md#timeSunday) - the week interval, starting on Sunday. +* [d3.timeSundays](https://github.com/d3/d3-time/blob/v1.1.0/README.md#timeSunday), [d3.utcSundays](https://github.com/d3/d3-time/blob/v1.1.0/README.md#timeSunday) - aliases for sunday.range. +* [d3.timeMonday](https://github.com/d3/d3-time/blob/v1.1.0/README.md#timeMonday), [d3.utcMonday](https://github.com/d3/d3-time/blob/v1.1.0/README.md#timeMonday) - the week interval, starting on Monday. +* [d3.timeMondays](https://github.com/d3/d3-time/blob/v1.1.0/README.md#timeMonday), [d3.utcMondays](https://github.com/d3/d3-time/blob/v1.1.0/README.md#timeMonday) - aliases for monday.range. +* [d3.timeTuesday](https://github.com/d3/d3-time/blob/v1.1.0/README.md#timeTuesday), [d3.utcTuesday](https://github.com/d3/d3-time/blob/v1.1.0/README.md#timeTuesday) - the week interval, starting on Tuesday. +* [d3.timeTuesdays](https://github.com/d3/d3-time/blob/v1.1.0/README.md#timeTuesday), [d3.utcTuesdays](https://github.com/d3/d3-time/blob/v1.1.0/README.md#timeTuesday) - aliases for tuesday.range. +* [d3.timeWednesday](https://github.com/d3/d3-time/blob/v1.1.0/README.md#timeWednesday), [d3.utcWednesday](https://github.com/d3/d3-time/blob/v1.1.0/README.md#timeWednesday) - the week interval, starting on Wednesday. +* [d3.timeWednesdays](https://github.com/d3/d3-time/blob/v1.1.0/README.md#timeWednesday), [d3.utcWednesdays](https://github.com/d3/d3-time/blob/v1.1.0/README.md#timeWednesday) - aliases for wednesday.range. +* [d3.timeThursday](https://github.com/d3/d3-time/blob/v1.1.0/README.md#timeThursday), [d3.utcThursday](https://github.com/d3/d3-time/blob/v1.1.0/README.md#timeThursday) - the week interval, starting on Thursday. +* [d3.timeThursdays](https://github.com/d3/d3-time/blob/v1.1.0/README.md#timeThursday), [d3.utcThursdays](https://github.com/d3/d3-time/blob/v1.1.0/README.md#timeThursday) - aliases for thursday.range. +* [d3.timeFriday](https://github.com/d3/d3-time/blob/v1.1.0/README.md#timeFriday), [d3.utcFriday](https://github.com/d3/d3-time/blob/v1.1.0/README.md#timeFriday) - the week interval, starting on Friday. +* [d3.timeFridays](https://github.com/d3/d3-time/blob/v1.1.0/README.md#timeFriday), [d3.utcFridays](https://github.com/d3/d3-time/blob/v1.1.0/README.md#timeFriday) - aliases for friday.range. +* [d3.timeSaturday](https://github.com/d3/d3-time/blob/v1.1.0/README.md#timeSaturday), [d3.utcSaturday](https://github.com/d3/d3-time/blob/v1.1.0/README.md#timeSaturday) - the week interval, starting on Saturday. +* [d3.timeSaturdays](https://github.com/d3/d3-time/blob/v1.1.0/README.md#timeSaturday), [d3.utcSaturdays](https://github.com/d3/d3-time/blob/v1.1.0/README.md#timeSaturday) - aliases for saturday.range. +* [d3.timeMonth](https://github.com/d3/d3-time/blob/v1.1.0/README.md#timeMonth), [d3.utcMonth](https://github.com/d3/d3-time/blob/v1.1.0/README.md#timeMonth) - the month interval. +* [d3.timeMonths](https://github.com/d3/d3-time/blob/v1.1.0/README.md#timeMonth), [d3.utcMonths](https://github.com/d3/d3-time/blob/v1.1.0/README.md#timeMonth) - aliases for month.range. +* [d3.timeYear](https://github.com/d3/d3-time/blob/v1.1.0/README.md#timeYear), [d3.utcYear](https://github.com/d3/d3-time/blob/v1.1.0/README.md#timeYear) - the year interval. +* [d3.timeYears](https://github.com/d3/d3-time/blob/v1.1.0/README.md#timeYear), [d3.utcYears](https://github.com/d3/d3-time/blob/v1.1.0/README.md#timeYear) - aliases for year.range. + +## [Timers (d3-timer)](https://github.com/d3/d3-timer/tree/v1.0.10) + +An efficient queue for managing thousands of concurrent animations. + +* [d3.now](https://github.com/d3/d3-timer/blob/v1.0.10/README.md#now) - get the current high-resolution time. +* [d3.timer](https://github.com/d3/d3-timer/blob/v1.0.10/README.md#timer) - schedule a new timer. +* [*timer*.restart](https://github.com/d3/d3-timer/blob/v1.0.10/README.md#timer_restart) - reset the timer’s start time and callback. +* [*timer*.stop](https://github.com/d3/d3-timer/blob/v1.0.10/README.md#timer_stop) - stop the timer. +* [d3.timerFlush](https://github.com/d3/d3-timer/blob/v1.0.10/README.md#timerFlush) - immediately execute any eligible timers. +* [d3.timeout](https://github.com/d3/d3-timer/blob/v1.0.10/README.md#timeout) - schedule a timer that stops on its first callback. +* [d3.interval](https://github.com/d3/d3-timer/blob/v1.0.10/README.md#interval) - schedule a timer that is called with a configurable period. + +## [Transitions (d3-transition)](https://github.com/d3/d3-transition/tree/v1.3.2) + +Animated transitions for [selections](#selections). + +* [*selection*.transition](https://github.com/d3/d3-transition/blob/v1.3.2/README.md#selection_transition) - schedule a transition for the selected elements. +* [*selection*.interrupt](https://github.com/d3/d3-transition/blob/v1.3.2/README.md#selection_interrupt) - interrupt and cancel transitions on the selected elements. +* [d3.transition](https://github.com/d3/d3-transition/blob/v1.3.2/README.md#transition) - schedule a transition on the root document element. +* [*transition*.select](https://github.com/d3/d3-transition/blob/v1.3.2/README.md#transition_select) - schedule a transition on the selected elements. +* [*transition*.selectAll](https://github.com/d3/d3-transition/blob/v1.3.2/README.md#transition_selectAll) - schedule a transition on the selected elements. +* [*transition*.filter](https://github.com/d3/d3-transition/blob/v1.3.2/README.md#transition_filter) - filter elements based on data. +* [*transition*.merge](https://github.com/d3/d3-transition/blob/v1.3.2/README.md#transition_merge) - merge this transition with another. +* [*transition*.selection](https://github.com/d3/d3-transition/blob/v1.3.2/README.md#transition_selection) - returns a selection for this transition. +* [*transition*.transition](https://github.com/d3/d3-transition/blob/v1.3.2/README.md#transition_transition) - schedule a new transition following this one. +* [*transition*.call](https://github.com/d3/d3-transition/blob/v1.3.2/README.md#transition_call) - call a function with this transition. +* [*transition*.nodes](https://github.com/d3/d3-transition/blob/v1.3.2/README.md#transition_nodes) - returns an array of all selected elements. +* [*transition*.node](https://github.com/d3/d3-transition/blob/v1.3.2/README.md#transition_node) - returns the first (non-null) element. +* [*transition*.size](https://github.com/d3/d3-transition/blob/v1.3.2/README.md#transition_size) - returns the count of elements. +* [*transition*.empty](https://github.com/d3/d3-transition/blob/v1.3.2/README.md#transition_empty) - returns true if this transition is empty. +* [*transition*.each](https://github.com/d3/d3-transition/blob/v1.3.2/README.md#transition_each) - call a function for each element. +* [*transition*.on](https://github.com/d3/d3-transition/blob/v1.3.2/README.md#transition_on) - add or remove transition event listeners. +* [*transition*.end](https://github.com/d3/d3-transition/blob/v1.3.2/README.md#transition_on) - await the end of a transition. +* [*transition*.attr](https://github.com/d3/d3-transition/blob/v1.3.2/README.md#transition_attr) - tween the given attribute using the default interpolator. +* [*transition*.attrTween](https://github.com/d3/d3-transition/blob/v1.3.2/README.md#transition_attrTween) - tween the given attribute using a custom interpolator. +* [*transition*.style](https://github.com/d3/d3-transition/blob/v1.3.2/README.md#transition_style) - tween the given style property using the default interpolator. +* [*transition*.styleTween](https://github.com/d3/d3-transition/blob/v1.3.2/README.md#transition_styleTween) - tween the given style property using a custom interpolator. +* [*transition*.text](https://github.com/d3/d3-transition/blob/v1.3.2/README.md#transition_text) - set the text content when the transition starts. +* [*transition*.textTween](https://github.com/d3/d3-transition/blob/v1.3.2/README.md#transition_textTween) - tween the text using a custom interpolator. +* [*transition*.remove](https://github.com/d3/d3-transition/blob/v1.3.2/README.md#transition_remove) - remove the selected elements when the transition ends. +* [*transition*.tween](https://github.com/d3/d3-transition/blob/v1.3.2/README.md#transition_tween) - run custom code during the transition. +* [*transition*.delay](https://github.com/d3/d3-transition/blob/v1.3.2/README.md#transition_delay) - specify per-element delay in milliseconds. +* [*transition*.duration](https://github.com/d3/d3-transition/blob/v1.3.2/README.md#transition_duration) - specify per-element duration in milliseconds. +* [*transition*.ease](https://github.com/d3/d3-transition/blob/v1.3.2/README.md#transition_ease) - specify the easing function. +* [d3.active](https://github.com/d3/d3-transition/blob/v1.3.2/README.md#active) - select the active transition for a given node. +* [d3.interrupt](https://github.com/d3/d3-transition/blob/v1.3.2/README.md#interrupt) - interrupt the active transition for a given node. + +## [Voronoi Diagrams (d3-voronoi)](https://github.com/d3/d3-voronoi/tree/v1.1.4) + +Compute the Voronoi diagram of a given set of points. + +* [d3.voronoi](https://github.com/d3/d3-voronoi/blob/v1.1.4/README.md#voronoi) - create a new Voronoi generator. +* [*voronoi*](https://github.com/d3/d3-voronoi/blob/v1.1.4/README.md#_voronoi) - generate a new Voronoi diagram for the given points. +* [*voronoi*.polygons](https://github.com/d3/d3-voronoi/blob/v1.1.4/README.md#voronoi_polygons) - compute the Voronoi polygons for the given points. +* [*voronoi*.triangles](https://github.com/d3/d3-voronoi/blob/v1.1.4/README.md#voronoi_triangles) - compute the Delaunay triangles for the given points. +* [*voronoi*.links](https://github.com/d3/d3-voronoi/blob/v1.1.4/README.md#voronoi_links) - compute the Delaunay links for the given points. +* [*voronoi*.x](https://github.com/d3/d3-voronoi/blob/v1.1.4/README.md#voronoi_x) - set the *x* accessor. +* [*voronoi*.y](https://github.com/d3/d3-voronoi/blob/v1.1.4/README.md#voronoi_y) - set the *y* accessor. +* [*voronoi*.extent](https://github.com/d3/d3-voronoi/blob/v1.1.4/README.md#voronoi_extent) - set the observed extent of points. +* [*voronoi*.size](https://github.com/d3/d3-voronoi/blob/v1.1.4/README.md#voronoi_size) - set the observed extent of points. +* [*diagram*.polygons](https://github.com/d3/d3-voronoi/blob/v1.1.4/README.md#diagram_polygons) - compute the polygons for this Voronoi diagram. +* [*diagram*.triangles](https://github.com/d3/d3-voronoi/blob/v1.1.4/README.md#diagram_triangles) - compute the triangles for this Voronoi diagram. +* [*diagram*.links](https://github.com/d3/d3-voronoi/blob/v1.1.4/README.md#diagram_links) - compute the links for this Voronoi diagram. +* [*diagram*.find](https://github.com/d3/d3-voronoi/blob/v1.1.4/README.md#diagram_find) - find the closest point in this Voronoi diagram. + +## [Zooming (d3-zoom)](https://github.com/d3/d3-zoom/tree/v1.8.3) + +Pan and zoom SVG, HTML or Canvas using mouse or touch input. + +* [d3.zoom](https://github.com/d3/d3-zoom/blob/v1.8.3/README.md#zoom) - create a zoom behavior. +* [*zoom*](https://github.com/d3/d3-zoom/blob/v1.8.3/README.md#_zoom) - apply the zoom behavior to the selected elements. +* [*zoom*.transform](https://github.com/d3/d3-zoom/blob/v1.8.3/README.md#zoom_transform) - change the transform for the selected elements. +* [*zoom*.translateTo](https://github.com/d3/d3-zoom/blob/v1.8.3/README.md#zoom_translateTo) - translate the transform for the selected elements. +* [*zoom*.translateBy](https://github.com/d3/d3-zoom/blob/v1.8.3/README.md#zoom_translateBy) - translate the transform for the selected elements. +* [*zoom*.scaleBy](https://github.com/d3/d3-zoom/blob/v1.8.3/README.md#zoom_scaleBy) - scale the transform for the selected elements. +* [*zoom*.scaleTo](https://github.com/d3/d3-zoom/blob/v1.8.3/README.md#zoom_scaleTo) - scale the transform for the selected elements. +* [*zoom*.filter](https://github.com/d3/d3-zoom/blob/v1.8.3/README.md#zoom_filter) - control which input events initiate zooming. +* [*zoom*.touchable](https://github.com/d3/d3-zoom/blob/v1.8.3/README.md#zoom_touchable) - set the touch support detector. +* [*zoom*.wheelDelta](https://github.com/d3/d3-zoom/blob/v1.8.3/README.md#zoom_wheelDelta) - override scaling for wheel events. +* [*zoom*.clickDistance](https://github.com/d3/d3-zoom/blob/v1.8.3/README.md#zoom_clickDistance) - set the click distance threshold. +* [*zoom*.extent](https://github.com/d3/d3-zoom/blob/v1.8.3/README.md#zoom_extent) - set the extent of the viewport. +* [*zoom*.scaleExtent](https://github.com/d3/d3-zoom/blob/v1.8.3/README.md#zoom_scaleExtent) - set the allowed scale range. +* [*zoom*.translateExtent](https://github.com/d3/d3-zoom/blob/v1.8.3/README.md#zoom_translateExtent) - set the extent of the zoomable world. +* [*zoom*.constrain](https://github.com/d3/d3-zoom/blob/v1.8.3/README.md#zoom_constrain) - override the transform constraint logic. +* [*zoom*.duration](https://github.com/d3/d3-zoom/blob/v1.8.3/README.md#zoom_duration) - set the duration of zoom transitions. +* [*zoom*.interpolate](https://github.com/d3/d3-zoom/blob/v1.8.3/README.md#zoom_interpolate) - control the interpolation of zoom transitions. +* [*zoom*.on](https://github.com/d3/d3-zoom/blob/v1.8.3/README.md#zoom_on) - listen for zoom events. +* [d3.zoomTransform](https://github.com/d3/d3-zoom/blob/v1.8.3/README.md#zoomTransform) - get the zoom transform for a given element. +* [*transform*.scale](https://github.com/d3/d3-zoom/blob/v1.8.3/README.md#transform_scale) - scale a transform by the specified amount. +* [*transform*.translate](https://github.com/d3/d3-zoom/blob/v1.8.3/README.md#transform_translate) - translate a transform by the specified amount. +* [*transform*.apply](https://github.com/d3/d3-zoom/blob/v1.8.3/README.md#transform_apply) - apply the transform to the given point. +* [*transform*.applyX](https://github.com/d3/d3-zoom/blob/v1.8.3/README.md#transform_applyX) - apply the transform to the given *x*-coordinate. +* [*transform*.applyY](https://github.com/d3/d3-zoom/blob/v1.8.3/README.md#transform_applyY) - apply the transform to the given *y*-coordinate. +* [*transform*.invert](https://github.com/d3/d3-zoom/blob/v1.8.3/README.md#transform_invert) - unapply the transform to the given point. +* [*transform*.invertX](https://github.com/d3/d3-zoom/blob/v1.8.3/README.md#transform_invertX) - unapply the transform to the given *x*-coordinate. +* [*transform*.invertY](https://github.com/d3/d3-zoom/blob/v1.8.3/README.md#transform_invertY) - unapply the transform to the given *y*-coordinate. +* [*transform*.rescaleX](https://github.com/d3/d3-zoom/blob/v1.8.3/README.md#transform_rescaleX) - apply the transform to an *x*-scale’s domain. +* [*transform*.rescaleY](https://github.com/d3/d3-zoom/blob/v1.8.3/README.md#transform_rescaleY) - apply the transform to a *y*-scale’s domain. +* [*transform*.toString](https://github.com/d3/d3-zoom/blob/v1.8.3/README.md#transform_toString) - format the transform as an SVG transform string. +* [d3.zoomIdentity](https://github.com/d3/d3-zoom/blob/v1.8.3/README.md#zoomIdentity) - the identity transform. diff --git a/inst/www/d3/5.9.2/CHANGES.md b/inst/www/d3/5.16.0/CHANGES.md similarity index 98% rename from inst/www/d3/5.9.2/CHANGES.md rename to inst/www/d3/5.16.0/CHANGES.md index dc85e51..64c7595 100644 --- a/inst/www/d3/5.9.2/CHANGES.md +++ b/inst/www/d3/5.16.0/CHANGES.md @@ -2,9 +2,11 @@ [Released March 22, 2018.](https://github.com/d3/d3/releases/tag/v5.0.0) +*This document covers only major changes. For minor and patch changes, please see the [release notes](https://github.com/d3/d3/releases).* + D3 5.0 introduces only a few non-backwards-compatible changes. -D3 now uses [Promises](https://developer.mozilla.org/docs/Web/JavaScript/Guide/Using_promises) instead of asynchronous callbacks to load data. Promises simplify the structure of asynchronous code, especially in modern browsers that support [async and await](https://javascript.info/async-await). (See this [introduction to promises](https://beta.observablehq.com/@mbostock/introduction-to-promises) on [Observable](https://beta.observablehq.com).) For example, to load a CSV file in v4, you might say: +D3 now uses [Promises](https://developer.mozilla.org/docs/Web/JavaScript/Guide/Using_promises) instead of asynchronous callbacks to load data. Promises simplify the structure of asynchronous code, especially in modern browsers that support [async and await](https://javascript.info/async-await). (See this [introduction to promises](https://observablehq.com/@observablehq/introduction-to-promises) on [Observable](https://observablehq.com).) For example, to load a CSV file in v4, you might say: ```js d3.csv("file.csv", function(error, data) { @@ -28,11 +30,11 @@ const data = await d3.csv("file.csv"); console.log(data); ``` -With the adoption of promises, D3 now uses the [Fetch API](https://fetch.spec.whatwg.org/) instead of [XMLHttpRequest](https://developer.mozilla.org/docs/Web/API/XMLHttpRequest): the [d3-request](https://github.com/d3/d3-request) module has been replaced by [d3-fetch](https://github.com/d3/d3-fetch). Fetch supports many powerful new features, such as [streaming responses](https://beta.observablehq.com/@mbostock/streaming-shapefiles). D3 5.0 also deprecates and removes the [d3-queue](https://github.com/d3/d3-queue) module. Use [Promise.all](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Promise/all) to run a batch of asynchronous tasks in parallel, or a helper library such as [p-queue](https://github.com/sindresorhus/p-queue) to [control concurrency](https://beta.observablehq.com/@mbostock/hello-p-queue). +With the adoption of promises, D3 now uses the [Fetch API](https://fetch.spec.whatwg.org/) instead of [XMLHttpRequest](https://developer.mozilla.org/docs/Web/API/XMLHttpRequest): the [d3-request](https://github.com/d3/d3-request) module has been replaced by [d3-fetch](https://github.com/d3/d3-fetch). Fetch supports many powerful new features, such as [streaming responses](https://observablehq.com/@mbostock/streaming-shapefiles). D3 5.0 also deprecates and removes the [d3-queue](https://github.com/d3/d3-queue) module. Use [Promise.all](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Promise/all) to run a batch of asynchronous tasks in parallel, or a helper library such as [p-queue](https://github.com/sindresorhus/p-queue) to [control concurrency](https://observablehq.com/@mbostock/hello-p-queue). D3 no longer provides the d3.schemeCategory20* categorical color schemes. These twenty-color schemes were flawed because their grouped design could falsely imply relationships in the data: a shared hue can imply that the encoded data are part of a group (a super-category), while relative lightness can imply order. Instead, D3 now includes [d3-scale-chromatic](https://github.com/d3/d3-scale-chromatic), which implements excellent schemes from ColorBrewer, including [categorical](https://github.com/d3/d3-scale-chromatic/blob/master/README.md#categorical), [diverging](https://github.com/d3/d3-scale-chromatic/blob/master/README.md#diverging), [sequential single-hue](https://github.com/d3/d3-scale-chromatic/blob/master/README.md#sequential-single-hue) and [sequential multi-hue](https://github.com/d3/d3-scale-chromatic/blob/master/README.md#sequential-multi-hue) schemes. These schemes are available in both discrete and continuous variants. -D3 now provides implementations of [marching squares](https://beta.observablehq.com/@mbostock/d3-contour-plot) and [density estimation](https://beta.observablehq.com/@mbostock/d3-density-contours) via [d3-contour](https://github.com/d3/d3-contour)! There are two new [d3-selection](https://github.com/d3/d3-selection) methods: [*selection*.clone](https://github.com/d3/d3-selection/blob/master/README.md#selection_clone) for inserting clones of the selected nodes, and [d3.create](https://github.com/d3/d3-selection/blob/master/README.md#create) for creating detached elements. [Geographic projections](https://github.com/d3/d3-geo) now support [*projection*.angle](https://github.com/d3/d3-geo/blob/master/README.md#projection_angle), which has enabled several fantastic new [polyhedral projections](https://github.com/d3/d3-geo-polygon) by Philippe Rivière. +D3 now provides implementations of [marching squares](https://observablehq.com/@d3/contours) and [density estimation](https://observablehq.com/@d3/density-contours) via [d3-contour](https://github.com/d3/d3-contour)! There are two new [d3-selection](https://github.com/d3/d3-selection) methods: [*selection*.clone](https://github.com/d3/d3-selection/blob/master/README.md#selection_clone) for inserting clones of the selected nodes, and [d3.create](https://github.com/d3/d3-selection/blob/master/README.md#create) for creating detached elements. [Geographic projections](https://github.com/d3/d3-geo) now support [*projection*.angle](https://github.com/d3/d3-geo/blob/master/README.md#projection_angle), which has enabled several fantastic new [polyhedral projections](https://github.com/d3/d3-geo-polygon) by Philippe Rivière. Lastly, D3’s [package.json](https://github.com/d3/d3/blob/master/package.json) no longer pins exact versions of the dependent D3 modules. This fixes an issue with [duplicate installs](https://github.com/d3/d3/issues/3256) of D3 modules. @@ -857,17 +859,17 @@ var color = d3.scaleOrdinal(d3.schemeCategory10); [Sequential scales](https://github.com/d3/d3-scale/blob/master/README.md#scaleSequential), are a new class of scales with a fixed output [interpolator](https://github.com/d3/d3-scale/blob/master/README.md#sequential_interpolator) instead of a [range](https://github.com/d3/d3-scale/blob/master/README.md#continuous_range). Typically these scales are used to implement continuous sequential or diverging color schemes. Inspired by Matplotlib’s new [perceptually-motived colormaps](https://bids.github.io/colormap/), 4.0 now features [viridis](https://github.com/d3/d3-scale/blob/master/README.md#interpolateViridis), [inferno](https://github.com/d3/d3-scale/blob/master/README.md#interpolateInferno), [magma](https://github.com/d3/d3-scale/blob/master/README.md#interpolateMagma), [plasma](https://github.com/d3/d3-scale/blob/master/README.md#interpolatePlasma) interpolators for use with sequential scales. Using [d3.quantize](https://github.com/d3/d3-interpolate/blob/master/README.md#quantize), these interpolators can also be applied to [quantile](https://github.com/d3/d3-scale/blob/master/README.md#quantile-scales), [quantize](https://github.com/d3/d3-scale/blob/master/README.md#quantize-scales) and [threshold](https://github.com/d3/d3-scale/blob/master/README.md#threshold-scales) scales. -[viridis](https://github.com/d3/d3-scale/blob/master/README.md#interpolateViridis) -[inferno](https://github.com/d3/d3-scale/blob/master/README.md#interpolateInferno) -[magma](https://github.com/d3/d3-scale/blob/master/README.md#interpolateMagma) -[plasma](https://github.com/d3/d3-scale/blob/master/README.md#interpolatePlasma) +[viridis](https://github.com/d3/d3-scale/blob/master/README.md#interpolateViridis) +[inferno](https://github.com/d3/d3-scale/blob/master/README.md#interpolateInferno) +[magma](https://github.com/d3/d3-scale/blob/master/README.md#interpolateMagma) +[plasma](https://github.com/d3/d3-scale/blob/master/README.md#interpolatePlasma) 4.0 also ships new Cubehelix schemes, including [Dave Green’s default](https://github.com/d3/d3-scale/blob/master/README.md#interpolateCubehelixDefault) and a [cyclical rainbow](https://github.com/d3/d3-scale/blob/master/README.md#interpolateRainbow) inspired by [Matteo Niccoli](https://mycarta.wordpress.com/2013/02/21/perceptual-rainbow-palette-the-method/): -[cubehelix](https://github.com/d3/d3-scale/blob/master/README.md#interpolateCubehelixDefault) -[rainbow](https://github.com/d3/d3-scale/blob/master/README.md#interpolateRainbow) -[warm](https://github.com/d3/d3-scale/blob/master/README.md#interpolateWarm) -[cool](https://github.com/d3/d3-scale/blob/master/README.md#interpolateCool) +[cubehelix](https://github.com/d3/d3-scale/blob/master/README.md#interpolateCubehelixDefault) +[rainbow](https://github.com/d3/d3-scale/blob/master/README.md#interpolateRainbow) +[warm](https://github.com/d3/d3-scale/blob/master/README.md#interpolateWarm) +[cool](https://github.com/d3/d3-scale/blob/master/README.md#interpolateCool) For even more sequential and categorical color schemes, see [d3-scale-chromatic](https://github.com/d3/d3-scale-chromatic). diff --git a/inst/www/d3/5.9.2/LICENSE b/inst/www/d3/5.16.0/LICENSE similarity index 100% rename from inst/www/d3/5.9.2/LICENSE rename to inst/www/d3/5.16.0/LICENSE diff --git a/inst/www/d3/5.9.2/README.md b/inst/www/d3/5.16.0/README.md similarity index 93% rename from inst/www/d3/5.9.2/README.md rename to inst/www/d3/5.16.0/README.md index 696df69..4fa9c4a 100644 --- a/inst/www/d3/5.9.2/README.md +++ b/inst/www/d3/5.16.0/README.md @@ -6,10 +6,10 @@ ## Resources +* [Introduction](https://observablehq.com/@d3/learn-d3) * [API Reference](https://github.com/d3/d3/blob/master/API.md) -* [Release Notes](https://github.com/d3/d3/releases) -* [Gallery](https://github.com/d3/d3/wiki/Gallery) -* [Examples](https://bl.ocks.org/mbostock) +* [Releases](https://github.com/d3/d3/releases) +* [Examples](https://observablehq.com/@d3/gallery) * [Wiki](https://github.com/d3/d3/wiki) ## Installing diff --git a/inst/www/d3/5.16.0/d3.min.js b/inst/www/d3/5.16.0/d3.min.js new file mode 100644 index 0000000..05cee73 --- /dev/null +++ b/inst/www/d3/5.16.0/d3.min.js @@ -0,0 +1,2 @@ +// https://d3js.org v5.16.0 Copyright 2020 Mike Bostock +!function(t,n){"object"==typeof exports&&"undefined"!=typeof module?n(exports):"function"==typeof define&&define.amd?define(["exports"],n):n(t.d3v5=t.d3v5||{})}(this,function(t){"use strict";function n(t,n){return tn?1:t>=n?0:NaN}function e(t){var e;return 1===t.length&&(e=t,t=function(t,r){return n(e(t),r)}),{left:function(n,e,r,i){for(null==r&&(r=0),null==i&&(i=n.length);r>>1;t(n[o],e)<0?r=o+1:i=o}return r},right:function(n,e,r,i){for(null==r&&(r=0),null==i&&(i=n.length);r>>1;t(n[o],e)>0?i=o:r=o+1}return r}}}var r=e(n),i=r.right,o=r.left;function a(t,n){return[t,n]}function u(t){return null===t?NaN:+t}function c(t,n){var e,r,i=t.length,o=0,a=-1,c=0,f=0;if(null==n)for(;++a1)return f/(o-1)}function f(t,n){var e=c(t,n);return e?Math.sqrt(e):e}function s(t,n){var e,r,i,o=t.length,a=-1;if(null==n){for(;++a=e)for(r=i=e;++ae&&(r=e),i=e)for(r=i=e;++ae&&(r=e),i0)return[t];if((r=n0)for(t=Math.ceil(t/a),n=Math.floor(n/a),o=new Array(i=Math.ceil(n-t+1));++u=0?(o>=y?10:o>=_?5:o>=b?2:1)*Math.pow(10,i):-Math.pow(10,-i)/(o>=y?10:o>=_?5:o>=b?2:1)}function w(t,n,e){var r=Math.abs(n-t)/Math.max(0,e),i=Math.pow(10,Math.floor(Math.log(r)/Math.LN10)),o=r/i;return o>=y?i*=10:o>=_?i*=5:o>=b&&(i*=2),n=1)return+e(t[r-1],r-1,t);var r,i=(r-1)*n,o=Math.floor(i),a=+e(t[o],o,t);return a+(+e(t[o+1],o+1,t)-a)*(i-o)}}function T(t,n){var e,r,i=t.length,o=-1;if(null==n){for(;++o=e)for(r=e;++or&&(r=e)}else for(;++o=e)for(r=e;++or&&(r=e);return r}function A(t){for(var n,e,r,i=t.length,o=-1,a=0;++o=0;)for(n=(r=t[i]).length;--n>=0;)e[--a]=r[n];return e}function S(t,n){var e,r,i=t.length,o=-1;if(null==n){for(;++o=e)for(r=e;++oe&&(r=e)}else for(;++o=e)for(r=e;++oe&&(r=e);return r}function k(t){if(!(i=t.length))return[];for(var n=-1,e=S(t,E),r=new Array(e);++n=0&&(e=t.slice(r+1),t=t.slice(0,r)),t&&!n.hasOwnProperty(t))throw new Error("unknown type: "+t);return{type:t,name:e}})}function X(t,n){for(var e,r=0,i=t.length;r0)for(var e,r,i=new Array(e),o=0;o=0&&"xmlns"!==(n=t.slice(0,e))&&(t=t.slice(e+1)),$.hasOwnProperty(n)?{space:$[n],local:t}:t}function Z(t){var n=W(t);return(n.local?function(t){return function(){return this.ownerDocument.createElementNS(t.space,t.local)}}:function(t){return function(){var n=this.ownerDocument,e=this.namespaceURI;return e===G&&n.documentElement.namespaceURI===G?n.createElement(t):n.createElementNS(e,t)}})(n)}function Q(){}function K(t){return null==t?Q:function(){return this.querySelector(t)}}function J(){return[]}function tt(t){return null==t?J:function(){return this.querySelectorAll(t)}}function nt(t){return function(){return this.matches(t)}}function et(t){return new Array(t.length)}function rt(t,n){this.ownerDocument=t.ownerDocument,this.namespaceURI=t.namespaceURI,this._next=null,this._parent=t,this.__data__=n}rt.prototype={constructor:rt,appendChild:function(t){return this._parent.insertBefore(t,this._next)},insertBefore:function(t,n){return this._parent.insertBefore(t,n)},querySelector:function(t){return this._parent.querySelector(t)},querySelectorAll:function(t){return this._parent.querySelectorAll(t)}};var it="$";function ot(t,n,e,r,i,o){for(var a,u=0,c=n.length,f=o.length;un?1:t>=n?0:NaN}function ct(t){return t.ownerDocument&&t.ownerDocument.defaultView||t.document&&t||t.defaultView}function ft(t,n){return t.style.getPropertyValue(n)||ct(t).getComputedStyle(t,null).getPropertyValue(n)}function st(t){return t.trim().split(/^|\s+/)}function lt(t){return t.classList||new ht(t)}function ht(t){this._node=t,this._names=st(t.getAttribute("class")||"")}function dt(t,n){for(var e=lt(t),r=-1,i=n.length;++r=0&&(this._names.splice(n,1),this._node.setAttribute("class",this._names.join(" ")))},contains:function(t){return this._names.indexOf(t)>=0}};var Mt={};(t.event=null,"undefined"!=typeof document)&&("onmouseenter"in document.documentElement||(Mt={mouseenter:"mouseover",mouseleave:"mouseout"}));function Nt(t,n,e){return t=Tt(t,n,e),function(n){var e=n.relatedTarget;e&&(e===this||8&e.compareDocumentPosition(this))||t.call(this,n)}}function Tt(n,e,r){return function(i){var o=t.event;t.event=i;try{n.call(this,this.__data__,e,r)}finally{t.event=o}}}function At(t){return function(){var n=this.__on;if(n){for(var e,r=0,i=-1,o=n.length;r=m&&(m=b+1);!(_=g[m])&&++m=0;)(r=i[o])&&(a&&4^r.compareDocumentPosition(a)&&a.parentNode.insertBefore(r,a),a=r);return this},sort:function(t){function n(n,e){return n&&e?t(n.__data__,e.__data__):!n-!e}t||(t=ut);for(var e=this._groups,r=e.length,i=new Array(r),o=0;o1?this.each((null==n?function(t){return function(){this.style.removeProperty(t)}}:"function"==typeof n?function(t,n,e){return function(){var r=n.apply(this,arguments);null==r?this.style.removeProperty(t):this.style.setProperty(t,r,e)}}:function(t,n,e){return function(){this.style.setProperty(t,n,e)}})(t,n,null==e?"":e)):ft(this.node(),t)},property:function(t,n){return arguments.length>1?this.each((null==n?function(t){return function(){delete this[t]}}:"function"==typeof n?function(t,n){return function(){var e=n.apply(this,arguments);null==e?delete this[t]:this[t]=e}}:function(t,n){return function(){this[t]=n}})(t,n)):this.node()[t]},classed:function(t,n){var e=st(t+"");if(arguments.length<2){for(var r=lt(this.node()),i=-1,o=e.length;++i=0&&(n=t.slice(e+1),t=t.slice(0,e)),{type:t,name:n}})}(t+""),a=o.length;if(!(arguments.length<2)){for(u=n?St:At,null==e&&(e=!1),r=0;r>8&15|n>>4&240,n>>4&15|240&n,(15&n)<<4|15&n,1):8===e?gn(n>>24&255,n>>16&255,n>>8&255,(255&n)/255):4===e?gn(n>>12&15|n>>8&240,n>>8&15|n>>4&240,n>>4&15|240&n,((15&n)<<4|15&n)/255):null):(n=on.exec(t))?new bn(n[1],n[2],n[3],1):(n=an.exec(t))?new bn(255*n[1]/100,255*n[2]/100,255*n[3]/100,1):(n=un.exec(t))?gn(n[1],n[2],n[3],n[4]):(n=cn.exec(t))?gn(255*n[1]/100,255*n[2]/100,255*n[3]/100,n[4]):(n=fn.exec(t))?Mn(n[1],n[2]/100,n[3]/100,1):(n=sn.exec(t))?Mn(n[1],n[2]/100,n[3]/100,n[4]):ln.hasOwnProperty(t)?vn(ln[t]):"transparent"===t?new bn(NaN,NaN,NaN,0):null}function vn(t){return new bn(t>>16&255,t>>8&255,255&t,1)}function gn(t,n,e,r){return r<=0&&(t=n=e=NaN),new bn(t,n,e,r)}function yn(t){return t instanceof Jt||(t=pn(t)),t?new bn((t=t.rgb()).r,t.g,t.b,t.opacity):new bn}function _n(t,n,e,r){return 1===arguments.length?yn(t):new bn(t,n,e,null==r?1:r)}function bn(t,n,e,r){this.r=+t,this.g=+n,this.b=+e,this.opacity=+r}function mn(){return"#"+wn(this.r)+wn(this.g)+wn(this.b)}function xn(){var t=this.opacity;return(1===(t=isNaN(t)?1:Math.max(0,Math.min(1,t)))?"rgb(":"rgba(")+Math.max(0,Math.min(255,Math.round(this.r)||0))+", "+Math.max(0,Math.min(255,Math.round(this.g)||0))+", "+Math.max(0,Math.min(255,Math.round(this.b)||0))+(1===t?")":", "+t+")")}function wn(t){return((t=Math.max(0,Math.min(255,Math.round(t)||0)))<16?"0":"")+t.toString(16)}function Mn(t,n,e,r){return r<=0?t=n=e=NaN:e<=0||e>=1?t=n=NaN:n<=0&&(t=NaN),new An(t,n,e,r)}function Nn(t){if(t instanceof An)return new An(t.h,t.s,t.l,t.opacity);if(t instanceof Jt||(t=pn(t)),!t)return new An;if(t instanceof An)return t;var n=(t=t.rgb()).r/255,e=t.g/255,r=t.b/255,i=Math.min(n,e,r),o=Math.max(n,e,r),a=NaN,u=o-i,c=(o+i)/2;return u?(a=n===o?(e-r)/u+6*(e0&&c<1?0:a,new An(a,u,c,t.opacity)}function Tn(t,n,e,r){return 1===arguments.length?Nn(t):new An(t,n,e,null==r?1:r)}function An(t,n,e,r){this.h=+t,this.s=+n,this.l=+e,this.opacity=+r}function Sn(t,n,e){return 255*(t<60?n+(e-n)*t/60:t<180?e:t<240?n+(e-n)*(240-t)/60:n)}Qt(Jt,pn,{copy:function(t){return Object.assign(new this.constructor,this,t)},displayable:function(){return this.rgb().displayable()},hex:hn,formatHex:hn,formatHsl:function(){return Nn(this).formatHsl()},formatRgb:dn,toString:dn}),Qt(bn,_n,Kt(Jt,{brighter:function(t){return t=null==t?1/.7:Math.pow(1/.7,t),new bn(this.r*t,this.g*t,this.b*t,this.opacity)},darker:function(t){return t=null==t?.7:Math.pow(.7,t),new bn(this.r*t,this.g*t,this.b*t,this.opacity)},rgb:function(){return this},displayable:function(){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:mn,formatHex:mn,formatRgb:xn,toString:xn})),Qt(An,Tn,Kt(Jt,{brighter:function(t){return t=null==t?1/.7:Math.pow(1/.7,t),new An(this.h,this.s,this.l*t,this.opacity)},darker:function(t){return t=null==t?.7:Math.pow(.7,t),new An(this.h,this.s,this.l*t,this.opacity)},rgb:function(){var t=this.h%360+360*(this.h<0),n=isNaN(t)||isNaN(this.s)?0:this.s,e=this.l,r=e+(e<.5?e:1-e)*n,i=2*e-r;return new bn(Sn(t>=240?t-240:t+120,i,r),Sn(t,i,r),Sn(t<120?t+240:t-120,i,r),this.opacity)},displayable:function(){return(0<=this.s&&this.s<=1||isNaN(this.s))&&0<=this.l&&this.l<=1&&0<=this.opacity&&this.opacity<=1},formatHsl:function(){var t=this.opacity;return(1===(t=isNaN(t)?1:Math.max(0,Math.min(1,t)))?"hsl(":"hsla(")+(this.h||0)+", "+100*(this.s||0)+"%, "+100*(this.l||0)+"%"+(1===t?")":", "+t+")")}}));var kn=Math.PI/180,En=180/Math.PI,Cn=.96422,Pn=1,zn=.82521,Rn=4/29,Dn=6/29,qn=3*Dn*Dn,Ln=Dn*Dn*Dn;function Un(t){if(t instanceof Bn)return new Bn(t.l,t.a,t.b,t.opacity);if(t instanceof Vn)return Gn(t);t instanceof bn||(t=yn(t));var n,e,r=Hn(t.r),i=Hn(t.g),o=Hn(t.b),a=Fn((.2225045*r+.7168786*i+.0606169*o)/Pn);return r===i&&i===o?n=e=a:(n=Fn((.4360747*r+.3850649*i+.1430804*o)/Cn),e=Fn((.0139322*r+.0971045*i+.7141733*o)/zn)),new Bn(116*a-16,500*(n-a),200*(a-e),t.opacity)}function On(t,n,e,r){return 1===arguments.length?Un(t):new Bn(t,n,e,null==r?1:r)}function Bn(t,n,e,r){this.l=+t,this.a=+n,this.b=+e,this.opacity=+r}function Fn(t){return t>Ln?Math.pow(t,1/3):t/qn+Rn}function Yn(t){return t>Dn?t*t*t:qn*(t-Rn)}function In(t){return 255*(t<=.0031308?12.92*t:1.055*Math.pow(t,1/2.4)-.055)}function Hn(t){return(t/=255)<=.04045?t/12.92:Math.pow((t+.055)/1.055,2.4)}function jn(t){if(t instanceof Vn)return new Vn(t.h,t.c,t.l,t.opacity);if(t instanceof Bn||(t=Un(t)),0===t.a&&0===t.b)return new Vn(NaN,0=1?(e=1,n-1):Math.floor(e*n),i=t[r],o=t[r+1],a=r>0?t[r-1]:2*i-o,u=r180||e<-180?e-360*Math.round(e/360):e):ue(isNaN(t)?n:t)}function se(t){return 1==(t=+t)?le:function(n,e){return e-n?function(t,n,e){return t=Math.pow(t,e),n=Math.pow(n,e)-t,e=1/e,function(r){return Math.pow(t+r*n,e)}}(n,e,t):ue(isNaN(n)?e:n)}}function le(t,n){var e=n-t;return e?ce(t,e):ue(isNaN(t)?n:t)}Qt(re,ee,Kt(Jt,{brighter:function(t){return t=null==t?1/.7:Math.pow(1/.7,t),new re(this.h,this.s,this.l*t,this.opacity)},darker:function(t){return t=null==t?.7:Math.pow(.7,t),new re(this.h,this.s,this.l*t,this.opacity)},rgb:function(){var t=isNaN(this.h)?0:(this.h+120)*kn,n=+this.l,e=isNaN(this.s)?0:this.s*n*(1-n),r=Math.cos(t),i=Math.sin(t);return new bn(255*(n+e*($n*r+Wn*i)),255*(n+e*(Zn*r+Qn*i)),255*(n+e*(Kn*r)),this.opacity)}}));var he=function t(n){var e=se(n);function r(t,n){var r=e((t=_n(t)).r,(n=_n(n)).r),i=e(t.g,n.g),o=e(t.b,n.b),a=le(t.opacity,n.opacity);return function(n){return t.r=r(n),t.g=i(n),t.b=o(n),t.opacity=a(n),t+""}}return r.gamma=t,r}(1);function de(t){return function(n){var e,r,i=n.length,o=new Array(i),a=new Array(i),u=new Array(i);for(e=0;eo&&(i=n.slice(o,i),u[a]?u[a]+=i:u[++a]=i),(e=e[0])===(r=r[0])?u[a]?u[a]+=r:u[++a]=r:(u[++a]=null,c.push({i:a,x:me(e,r)})),o=Me.lastIndex;return o180?n+=360:n-t>180&&(t+=360),o.push({i:e.push(i(e)+"rotate(",null,r)-2,x:me(t,n)})):n&&e.push(i(e)+"rotate("+n+r)}(o.rotate,a.rotate,u,c),function(t,n,e,o){t!==n?o.push({i:e.push(i(e)+"skewX(",null,r)-2,x:me(t,n)}):n&&e.push(i(e)+"skewX("+n+r)}(o.skewX,a.skewX,u,c),function(t,n,e,r,o,a){if(t!==e||n!==r){var u=o.push(i(o)+"scale(",null,",",null,")");a.push({i:u-4,x:me(t,e)},{i:u-2,x:me(n,r)})}else 1===e&&1===r||o.push(i(o)+"scale("+e+","+r+")")}(o.scaleX,o.scaleY,a.scaleX,a.scaleY,u,c),o=a=null,function(t){for(var n,e=-1,r=c.length;++e=0&&n._call.call(null,t),n=n._next;--tr}function pr(){or=(ir=ur.now())+ar,tr=nr=0;try{dr()}finally{tr=0,function(){var t,n,e=Ke,r=1/0;for(;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:Ke=n);Je=t,gr(r)}(),or=0}}function vr(){var t=ur.now(),n=t-ir;n>rr&&(ar-=n,ir=t)}function gr(t){tr||(nr&&(nr=clearTimeout(nr)),t-or>24?(t<1/0&&(nr=setTimeout(pr,t-ur.now()-ar)),er&&(er=clearInterval(er))):(er||(ir=ur.now(),er=setInterval(vr,rr)),tr=1,cr(pr)))}function yr(t,n,e){var r=new lr;return n=null==n?0:+n,r.restart(function(e){r.stop(),t(e+n)},n,e),r}lr.prototype=hr.prototype={constructor:lr,restart:function(t,n,e){if("function"!=typeof t)throw new TypeError("callback is not a function");e=(null==e?fr():+e)+(null==n?0:+n),this._next||Je===this||(Je?Je._next=this:Ke=this,Je=this),this._call=t,this._time=e,gr()},stop:function(){this._call&&(this._call=null,this._time=1/0,gr())}};var _r=I("start","end","cancel","interrupt"),br=[],mr=0,xr=1,wr=2,Mr=3,Nr=4,Tr=5,Ar=6;function Sr(t,n,e,r,i,o){var a=t.__transition;if(a){if(e in a)return}else t.__transition={};!function(t,n,e){var r,i=t.__transition;function o(c){var f,s,l,h;if(e.state!==xr)return u();for(f in i)if((h=i[f]).name===e.name){if(h.state===Mr)return yr(o);h.state===Nr?(h.state=Ar,h.timer.stop(),h.on.call("interrupt",t,t.__data__,h.index,h.group),delete i[f]):+fmr)throw new Error("too late; already scheduled");return e}function Er(t,n){var e=Cr(t,n);if(e.state>Mr)throw new Error("too late; already running");return e}function Cr(t,n){var e=t.__transition;if(!e||!(e=e[n]))throw new Error("transition not found");return e}function Pr(t,n){var e,r,i,o=t.__transition,a=!0;if(o){for(i in n=null==n?null:n+"",o)(e=o[i]).name===n?(r=e.state>wr&&e.state=0&&(t=t.slice(0,n)),!t||"start"===t})}(n)?kr:Er;return function(){var a=o(this,t),u=a.on;u!==r&&(i=(r=u).copy()).on(n,e),a.on=i}}(e,t,n))},attr:function(t,n){var e=W(t),r="transform"===e?Le:Rr;return this.attrTween(t,"function"==typeof n?(e.local?function(t,n,e){var r,i,o;return function(){var a,u,c=e(this);if(null!=c)return(a=this.getAttributeNS(t.space,t.local))===(u=c+"")?null:a===r&&u===i?o:(i=u,o=n(r=a,c));this.removeAttributeNS(t.space,t.local)}}:function(t,n,e){var r,i,o;return function(){var a,u,c=e(this);if(null!=c)return(a=this.getAttribute(t))===(u=c+"")?null:a===r&&u===i?o:(i=u,o=n(r=a,c));this.removeAttribute(t)}})(e,r,zr(this,"attr."+t,n)):null==n?(e.local?function(t){return function(){this.removeAttributeNS(t.space,t.local)}}:function(t){return function(){this.removeAttribute(t)}})(e):(e.local?function(t,n,e){var r,i,o=e+"";return function(){var a=this.getAttributeNS(t.space,t.local);return a===o?null:a===r?i:i=n(r=a,e)}}:function(t,n,e){var r,i,o=e+"";return function(){var a=this.getAttribute(t);return a===o?null:a===r?i:i=n(r=a,e)}})(e,r,n))},attrTween:function(t,n){var e="attr."+t;if(arguments.length<2)return(e=this.tween(e))&&e._value;if(null==n)return this.tween(e,null);if("function"!=typeof n)throw new Error;var r=W(t);return this.tween(e,(r.local?function(t,n){var e,r;function i(){var i=n.apply(this,arguments);return i!==r&&(e=(r=i)&&function(t,n){return function(e){this.setAttributeNS(t.space,t.local,n.call(this,e))}}(t,i)),e}return i._value=n,i}:function(t,n){var e,r;function i(){var i=n.apply(this,arguments);return i!==r&&(e=(r=i)&&function(t,n){return function(e){this.setAttribute(t,n.call(this,e))}}(t,i)),e}return i._value=n,i})(r,n))},style:function(t,n,e){var r="transform"==(t+="")?qe:Rr;return null==n?this.styleTween(t,function(t,n){var e,r,i;return function(){var o=ft(this,t),a=(this.style.removeProperty(t),ft(this,t));return o===a?null:o===e&&a===r?i:i=n(e=o,r=a)}}(t,r)).on("end.style."+t,qr(t)):"function"==typeof n?this.styleTween(t,function(t,n,e){var r,i,o;return function(){var a=ft(this,t),u=e(this),c=u+"";return null==u&&(this.style.removeProperty(t),c=u=ft(this,t)),a===c?null:a===r&&c===i?o:(i=c,o=n(r=a,u))}}(t,r,zr(this,"style."+t,n))).each(function(t,n){var e,r,i,o,a="style."+n,u="end."+a;return function(){var c=Er(this,t),f=c.on,s=null==c.value[a]?o||(o=qr(n)):void 0;f===e&&i===s||(r=(e=f).copy()).on(u,i=s),c.on=r}}(this._id,t)):this.styleTween(t,function(t,n,e){var r,i,o=e+"";return function(){var a=ft(this,t);return a===o?null:a===r?i:i=n(r=a,e)}}(t,r,n),e).on("end.style."+t,null)},styleTween:function(t,n,e){var r="style."+(t+="");if(arguments.length<2)return(r=this.tween(r))&&r._value;if(null==n)return this.tween(r,null);if("function"!=typeof n)throw new Error;return this.tween(r,function(t,n,e){var r,i;function o(){var o=n.apply(this,arguments);return o!==i&&(r=(i=o)&&function(t,n,e){return function(r){this.style.setProperty(t,n.call(this,r),e)}}(t,o,e)),r}return o._value=n,o}(t,n,null==e?"":e))},text:function(t){return this.tween("text","function"==typeof t?function(t){return function(){var n=t(this);this.textContent=null==n?"":n}}(zr(this,"text",t)):function(t){return function(){this.textContent=t}}(null==t?"":t+""))},textTween:function(t){var n="text";if(arguments.length<1)return(n=this.tween(n))&&n._value;if(null==t)return this.tween(n,null);if("function"!=typeof t)throw new Error;return this.tween(n,function(t){var n,e;function r(){var r=t.apply(this,arguments);return r!==e&&(n=(e=r)&&function(t){return function(n){this.textContent=t.call(this,n)}}(r)),n}return r._value=t,r}(t))},remove:function(){return this.on("end.remove",function(t){return function(){var n=this.parentNode;for(var e in this.__transition)if(+e!==t)return;n&&n.removeChild(this)}}(this._id))},tween:function(t,n){var e=this._id;if(t+="",arguments.length<2){for(var r,i=Cr(this.node(),e).tween,o=0,a=i.length;o0&&(r=o-P),M<0?d=p-z:M>0&&(u=c-z),x=Mi,B.attr("cursor",Pi.selection),I());break;default:return}xi()},!0).on("keyup.brush",function(){switch(t.event.keyCode){case 16:R&&(g=y=R=!1,I());break;case 18:x===Ti&&(w<0?f=h:w>0&&(r=o),M<0?d=p:M>0&&(u=c),x=Ni,I());break;case 32:x===Mi&&(t.event.altKey?(w&&(f=h-P*w,r=o+P*w),M&&(d=p-z*M,u=c+z*M),x=Ti):(w<0?f=h:w>0&&(r=o),M<0?d=p:M>0&&(u=c),x=Ni),B.attr("cursor",Pi[m]),I());break;default:return}xi()},!0),Ht(t.event.view)}mi(),Pr(b),s.call(b),U.start()}function Y(){var t=D(b);!R||g||y||(Math.abs(t[0]-L[0])>Math.abs(t[1]-L[1])?y=!0:g=!0),L=t,v=!0,xi(),I()}function I(){var t;switch(P=L[0]-q[0],z=L[1]-q[1],x){case Mi:case wi:w&&(P=Math.max(S-r,Math.min(E-f,P)),o=r+P,h=f+P),M&&(z=Math.max(k-u,Math.min(C-d,z)),c=u+z,p=d+z);break;case Ni:w<0?(P=Math.max(S-r,Math.min(E-r,P)),o=r+P,h=f):w>0&&(P=Math.max(S-f,Math.min(E-f,P)),o=r,h=f+P),M<0?(z=Math.max(k-u,Math.min(C-u,z)),c=u+z,p=d):M>0&&(z=Math.max(k-d,Math.min(C-d,z)),c=u,p=d+z);break;case Ti:w&&(o=Math.max(S,Math.min(E,r-P*w)),h=Math.max(S,Math.min(E,f+P*w))),M&&(c=Math.max(k,Math.min(C,u-z*M)),p=Math.max(k,Math.min(C,d+z*M)))}h1e-6)if(Math.abs(s*u-c*f)>1e-6&&i){var h=e-o,d=r-a,p=u*u+c*c,v=h*h+d*d,g=Math.sqrt(p),y=Math.sqrt(l),_=i*Math.tan((Qi-Math.acos((p+l-v)/(2*g*y)))/2),b=_/y,m=_/g;Math.abs(b-1)>1e-6&&(this._+="L"+(t+b*f)+","+(n+b*s)),this._+="A"+i+","+i+",0,0,"+ +(s*h>f*d)+","+(this._x1=t+m*u)+","+(this._y1=n+m*c)}else this._+="L"+(this._x1=t)+","+(this._y1=n);else;},arc:function(t,n,e,r,i,o){t=+t,n=+n,o=!!o;var a=(e=+e)*Math.cos(r),u=e*Math.sin(r),c=t+a,f=n+u,s=1^o,l=o?r-i:i-r;if(e<0)throw new Error("negative radius: "+e);null===this._x1?this._+="M"+c+","+f:(Math.abs(this._x1-c)>1e-6||Math.abs(this._y1-f)>1e-6)&&(this._+="L"+c+","+f),e&&(l<0&&(l=l%Ki+Ki),l>Ji?this._+="A"+e+","+e+",0,1,"+s+","+(t-a)+","+(n-u)+"A"+e+","+e+",0,1,"+s+","+(this._x1=c)+","+(this._y1=f):l>1e-6&&(this._+="A"+e+","+e+",0,"+ +(l>=Qi)+","+s+","+(this._x1=t+e*Math.cos(i))+","+(this._y1=n+e*Math.sin(i))))},rect:function(t,n,e,r){this._+="M"+(this._x0=this._x1=+t)+","+(this._y0=this._y1=+n)+"h"+ +e+"v"+ +r+"h"+-e+"Z"},toString:function(){return this._}};function uo(){}function co(t,n){var e=new uo;if(t instanceof uo)t.each(function(t,n){e.set(n,t)});else if(Array.isArray(t)){var r,i=-1,o=t.length;if(null==n)for(;++ir!=d>r&&e<(h-f)*(r-s)/(d-s)+f&&(i=-i)}return i}function wo(t,n,e){var r,i,o,a;return function(t,n,e){return(n[0]-t[0])*(e[1]-t[1])==(e[0]-t[0])*(n[1]-t[1])}(t,n,e)&&(i=t[r=+(t[0]===n[0])],o=e[r],a=n[r],i<=o&&o<=a||a<=o&&o<=i)}function Mo(){}var No=[[],[[[1,1.5],[.5,1]]],[[[1.5,1],[1,1.5]]],[[[1.5,1],[.5,1]]],[[[1,.5],[1.5,1]]],[[[1,1.5],[.5,1]],[[1,.5],[1.5,1]]],[[[1,.5],[1,1.5]]],[[[1,.5],[.5,1]]],[[[.5,1],[1,.5]]],[[[1,1.5],[1,.5]]],[[[.5,1],[1,.5]],[[1.5,1],[1,1.5]]],[[[1.5,1],[1,.5]]],[[[.5,1],[1.5,1]]],[[[1,1.5],[1.5,1]]],[[[.5,1],[1,1.5]]],[]];function To(){var t=1,n=1,e=M,r=u;function i(t){var n=e(t);if(Array.isArray(n))n=n.slice().sort(_o);else{var r=s(t),i=r[0],a=r[1];n=w(i,a,n),n=g(Math.floor(i/n)*n,Math.floor(a/n)*n,n)}return n.map(function(n){return o(t,n)})}function o(e,i){var o=[],u=[];return function(e,r,i){var o,u,c,f,s,l,h=new Array,d=new Array;o=u=-1,f=e[0]>=r,No[f<<1].forEach(p);for(;++o=r,No[c|f<<1].forEach(p);No[f<<0].forEach(p);for(;++u=r,s=e[u*t]>=r,No[f<<1|s<<2].forEach(p);++o=r,l=s,s=e[u*t+o+1]>=r,No[c|f<<1|s<<2|l<<3].forEach(p);No[f|s<<3].forEach(p)}o=-1,s=e[u*t]>=r,No[s<<2].forEach(p);for(;++o=r,No[s<<2|l<<3].forEach(p);function p(t){var n,e,r=[t[0][0]+o,t[0][1]+u],c=[t[1][0]+o,t[1][1]+u],f=a(r),s=a(c);(n=d[f])?(e=h[s])?(delete d[n.end],delete h[e.start],n===e?(n.ring.push(c),i(n.ring)):h[n.start]=d[e.end]={start:n.start,end:e.end,ring:n.ring.concat(e.ring)}):(delete d[n.end],n.ring.push(c),d[n.end=s]=n):(n=h[s])?(e=d[f])?(delete h[n.start],delete d[e.end],n===e?(n.ring.push(c),i(n.ring)):h[e.start]=d[n.end]={start:e.start,end:n.end,ring:e.ring.concat(n.ring)}):(delete h[n.start],n.ring.unshift(r),h[n.start=f]=n):h[f]=d[s]={start:f,end:s,ring:[r,c]}}No[s<<3].forEach(p)}(e,i,function(t){r(t,e,i),function(t){for(var n=0,e=t.length,r=t[e-1][1]*t[0][0]-t[e-1][0]*t[0][1];++n0?o.push([t]):u.push(t)}),u.forEach(function(t){for(var n,e=0,r=o.length;e0&&a0&&u0&&o>0))throw new Error("invalid size");return t=r,n=o,i},i.thresholds=function(t){return arguments.length?(e="function"==typeof t?t:Array.isArray(t)?bo(yo.call(t)):bo(t),i):e},i.smooth=function(t){return arguments.length?(r=t?u:Mo,i):r===u},i}function Ao(t,n,e){for(var r=t.width,i=t.height,o=1+(e<<1),a=0;a=e&&(u>=o&&(c-=t.data[u-o+a*r]),n.data[u-e+a*r]=c/Math.min(u+1,r-1+o-u,o))}function So(t,n,e){for(var r=t.width,i=t.height,o=1+(e<<1),a=0;a=e&&(u>=o&&(c-=t.data[a+(u-o)*r]),n.data[a+(u-e)*r]=c/Math.min(u+1,i-1+o-u,o))}function ko(t){return t[0]}function Eo(t){return t[1]}function Co(){return 1}var Po={},zo={},Ro=34,Do=10,qo=13;function Lo(t){return new Function("d","return {"+t.map(function(t,n){return JSON.stringify(t)+": d["+n+'] || ""'}).join(",")+"}")}function Uo(t){var n=Object.create(null),e=[];return t.forEach(function(t){for(var r in t)r in n||e.push(n[r]=r)}),e}function Oo(t,n){var e=t+"",r=e.length;return r9999?"+"+Oo(t,6):Oo(t,4)}(t.getUTCFullYear())+"-"+Oo(t.getUTCMonth()+1,2)+"-"+Oo(t.getUTCDate(),2)+(i?"T"+Oo(n,2)+":"+Oo(e,2)+":"+Oo(r,2)+"."+Oo(i,3)+"Z":r?"T"+Oo(n,2)+":"+Oo(e,2)+":"+Oo(r,2)+"Z":e||n?"T"+Oo(n,2)+":"+Oo(e,2)+"Z":"")}function Fo(t){var n=new RegExp('["'+t+"\n\r]"),e=t.charCodeAt(0);function r(t,n){var r,i=[],o=t.length,a=0,u=0,c=o<=0,f=!1;function s(){if(c)return zo;if(f)return f=!1,Po;var n,r,i=a;if(t.charCodeAt(i)===Ro){for(;a++=o?c=!0:(r=t.charCodeAt(a++))===Do?f=!0:r===qo&&(f=!0,t.charCodeAt(a)===Do&&++a),t.slice(i+1,n-1).replace(/""/g,'"')}for(;a=(o=(v+y)/2))?v=o:y=o,(s=e>=(a=(g+_)/2))?g=a:_=a,i=d,!(d=d[l=s<<1|f]))return i[l]=p,t;if(u=+t._x.call(null,d.data),c=+t._y.call(null,d.data),n===u&&e===c)return p.next=d,i?i[l]=p:t._root=p,t;do{i=i?i[l]=new Array(4):t._root=new Array(4),(f=n>=(o=(v+y)/2))?v=o:y=o,(s=e>=(a=(g+_)/2))?g=a:_=a}while((l=s<<1|f)==(h=(c>=a)<<1|u>=o));return i[h]=d,i[l]=p,t}function ba(t,n,e,r,i){this.node=t,this.x0=n,this.y0=e,this.x1=r,this.y1=i}function ma(t){return t[0]}function xa(t){return t[1]}function wa(t,n,e){var r=new Ma(null==n?ma:n,null==e?xa:e,NaN,NaN,NaN,NaN);return null==t?r:r.addAll(t)}function Ma(t,n,e,r,i,o){this._x=t,this._y=n,this._x0=e,this._y0=r,this._x1=i,this._y1=o,this._root=void 0}function Na(t){for(var n={data:t.data},e=n;t=t.next;)e=e.next={data:t.data};return n}var Ta=wa.prototype=Ma.prototype;function Aa(t){return t.x+t.vx}function Sa(t){return t.y+t.vy}function ka(t){return t.index}function Ea(t,n){var e=t.get(n);if(!e)throw new Error("missing: "+n);return e}function Ca(t){return t.x}function Pa(t){return t.y}Ta.copy=function(){var t,n,e=new Ma(this._x,this._y,this._x0,this._y0,this._x1,this._y1),r=this._root;if(!r)return e;if(!r.length)return e._root=Na(r),e;for(t=[{source:r,target:e._root=new Array(4)}];r=t.pop();)for(var i=0;i<4;++i)(n=r.source[i])&&(n.length?t.push({source:n,target:r.target[i]=new Array(4)}):r.target[i]=Na(n));return e},Ta.add=function(t){var n=+this._x.call(null,t),e=+this._y.call(null,t);return _a(this.cover(n,e),n,e,t)},Ta.addAll=function(t){var n,e,r,i,o=t.length,a=new Array(o),u=new Array(o),c=1/0,f=1/0,s=-1/0,l=-1/0;for(e=0;es&&(s=r),il&&(l=i));if(c>s||f>l)return this;for(this.cover(c,f).cover(s,l),e=0;et||t>=i||r>n||n>=o;)switch(u=(nh||(o=c.y0)>d||(a=c.x1)=y)<<1|t>=g)&&(c=p[p.length-1],p[p.length-1]=p[p.length-1-f],p[p.length-1-f]=c)}else{var _=t-+this._x.call(null,v.data),b=n-+this._y.call(null,v.data),m=_*_+b*b;if(m=(u=(p+g)/2))?p=u:g=u,(s=a>=(c=(v+y)/2))?v=c:y=c,n=d,!(d=d[l=s<<1|f]))return this;if(!d.length)break;(n[l+1&3]||n[l+2&3]||n[l+3&3])&&(e=n,h=l)}for(;d.data!==t;)if(r=d,!(d=d.next))return this;return(i=d.next)&&delete d.next,r?(i?r.next=i:delete r.next,this):n?(i?n[l]=i:delete n[l],(d=n[0]||n[1]||n[2]||n[3])&&d===(n[3]||n[2]||n[1]||n[0])&&!d.length&&(e?e[h]=d:this._root=d),this):(this._root=i,this)},Ta.removeAll=function(t){for(var n=0,e=t.length;n1?r[0]+r.slice(2):r,+t.slice(e+1)]}function qa(t){return(t=Da(Math.abs(t)))?t[1]:NaN}var La,Ua=/^(?:(.)?([<>=^]))?([+\-( ])?([$#])?(0)?(\d+)?(,)?(\.\d+)?(~)?([a-z%])?$/i;function Oa(t){if(!(n=Ua.exec(t)))throw new Error("invalid format: "+t);var n;return new Ba({fill:n[1],align:n[2],sign:n[3],symbol:n[4],zero:n[5],width:n[6],comma:n[7],precision:n[8]&&n[8].slice(1),trim:n[9],type:n[10]})}function Ba(t){this.fill=void 0===t.fill?" ":t.fill+"",this.align=void 0===t.align?">":t.align+"",this.sign=void 0===t.sign?"-":t.sign+"",this.symbol=void 0===t.symbol?"":t.symbol+"",this.zero=!!t.zero,this.width=void 0===t.width?void 0:+t.width,this.comma=!!t.comma,this.precision=void 0===t.precision?void 0:+t.precision,this.trim=!!t.trim,this.type=void 0===t.type?"":t.type+""}function Fa(t,n){var e=Da(t,n);if(!e)return t+"";var r=e[0],i=e[1];return i<0?"0."+new Array(-i).join("0")+r:r.length>i+1?r.slice(0,i+1)+"."+r.slice(i+1):r+new Array(i-r.length+2).join("0")}Oa.prototype=Ba.prototype,Ba.prototype.toString=function(){return this.fill+this.align+this.sign+this.symbol+(this.zero?"0":"")+(void 0===this.width?"":Math.max(1,0|this.width))+(this.comma?",":"")+(void 0===this.precision?"":"."+Math.max(0,0|this.precision))+(this.trim?"~":"")+this.type};var Ya={"%":function(t,n){return(100*t).toFixed(n)},b:function(t){return Math.round(t).toString(2)},c:function(t){return t+""},d:function(t){return Math.round(t).toString(10)},e:function(t,n){return t.toExponential(n)},f:function(t,n){return t.toFixed(n)},g:function(t,n){return t.toPrecision(n)},o:function(t){return Math.round(t).toString(8)},p:function(t,n){return Fa(100*t,n)},r:Fa,s:function(t,n){var e=Da(t,n);if(!e)return t+"";var r=e[0],i=e[1],o=i-(La=3*Math.max(-8,Math.min(8,Math.floor(i/3))))+1,a=r.length;return o===a?r:o>a?r+new Array(o-a+1).join("0"):o>0?r.slice(0,o)+"."+r.slice(o):"0."+new Array(1-o).join("0")+Da(t,Math.max(0,n+o-1))[0]},X:function(t){return Math.round(t).toString(16).toUpperCase()},x:function(t){return Math.round(t).toString(16)}};function Ia(t){return t}var Ha,ja=Array.prototype.map,Xa=["y","z","a","f","p","n","µ","m","","k","M","G","T","P","E","Z","Y"];function Va(t){var n,e,r=void 0===t.grouping||void 0===t.thousands?Ia:(n=ja.call(t.grouping,Number),e=t.thousands+"",function(t,r){for(var i=t.length,o=[],a=0,u=n[0],c=0;i>0&&u>0&&(c+u+1>r&&(u=Math.max(1,r-c)),o.push(t.substring(i-=u,i+u)),!((c+=u+1)>r));)u=n[a=(a+1)%n.length];return o.reverse().join(e)}),i=void 0===t.currency?"":t.currency[0]+"",o=void 0===t.currency?"":t.currency[1]+"",a=void 0===t.decimal?".":t.decimal+"",u=void 0===t.numerals?Ia:function(t){return function(n){return n.replace(/[0-9]/g,function(n){return t[+n]})}}(ja.call(t.numerals,String)),c=void 0===t.percent?"%":t.percent+"",f=void 0===t.minus?"-":t.minus+"",s=void 0===t.nan?"NaN":t.nan+"";function l(t){var n=(t=Oa(t)).fill,e=t.align,l=t.sign,h=t.symbol,d=t.zero,p=t.width,v=t.comma,g=t.precision,y=t.trim,_=t.type;"n"===_?(v=!0,_="g"):Ya[_]||(void 0===g&&(g=12),y=!0,_="g"),(d||"0"===n&&"="===e)&&(d=!0,n="0",e="=");var b="$"===h?i:"#"===h&&/[boxX]/.test(_)?"0"+_.toLowerCase():"",m="$"===h?o:/[%p]/.test(_)?c:"",x=Ya[_],w=/[defgprs%]/.test(_);function M(t){var i,o,c,h=b,M=m;if("c"===_)M=x(t)+M,t="";else{var N=(t=+t)<0||1/t<0;if(t=isNaN(t)?s:x(Math.abs(t),g),y&&(t=function(t){t:for(var n,e=t.length,r=1,i=-1;r0&&(i=0)}return i>0?t.slice(0,i)+t.slice(n+1):t}(t)),N&&0==+t&&"+"!==l&&(N=!1),h=(N?"("===l?l:f:"-"===l||"("===l?"":l)+h,M=("s"===_?Xa[8+La/3]:"")+M+(N&&"("===l?")":""),w)for(i=-1,o=t.length;++i(c=t.charCodeAt(i))||c>57){M=(46===c?a+t.slice(i+1):t.slice(i))+M,t=t.slice(0,i);break}}v&&!d&&(t=r(t,1/0));var T=h.length+t.length+M.length,A=T>1)+h+t+M+A.slice(T);break;default:t=A+h+t+M}return u(t)}return g=void 0===g?6:/[gprs]/.test(_)?Math.max(1,Math.min(21,g)):Math.max(0,Math.min(20,g)),M.toString=function(){return t+""},M}return{format:l,formatPrefix:function(t,n){var e=l(((t=Oa(t)).type="f",t)),r=3*Math.max(-8,Math.min(8,Math.floor(qa(n)/3))),i=Math.pow(10,-r),o=Xa[8+r/3];return function(t){return e(i*t)+o}}}}function Ga(n){return Ha=Va(n),t.format=Ha.format,t.formatPrefix=Ha.formatPrefix,Ha}function $a(t){return Math.max(0,-qa(Math.abs(t)))}function Wa(t,n){return Math.max(0,3*Math.max(-8,Math.min(8,Math.floor(qa(n)/3)))-qa(Math.abs(t)))}function Za(t,n){return t=Math.abs(t),n=Math.abs(n)-t,Math.max(0,qa(n)-qa(t))+1}function Qa(){return new Ka}function Ka(){this.reset()}Ga({decimal:".",thousands:",",grouping:[3],currency:["$",""],minus:"-"}),Ka.prototype={constructor:Ka,reset:function(){this.s=this.t=0},add:function(t){tu(Ja,t,this.t),tu(this,Ja.s,this.s),this.s?this.t+=Ja.t:this.s=Ja.t},valueOf:function(){return this.s}};var Ja=new Ka;function tu(t,n,e){var r=t.s=n+e,i=r-n,o=r-i;t.t=n-o+(e-i)}var nu=1e-6,eu=1e-12,ru=Math.PI,iu=ru/2,ou=ru/4,au=2*ru,uu=180/ru,cu=ru/180,fu=Math.abs,su=Math.atan,lu=Math.atan2,hu=Math.cos,du=Math.ceil,pu=Math.exp,vu=Math.log,gu=Math.pow,yu=Math.sin,_u=Math.sign||function(t){return t>0?1:t<0?-1:0},bu=Math.sqrt,mu=Math.tan;function xu(t){return t>1?0:t<-1?ru:Math.acos(t)}function wu(t){return t>1?iu:t<-1?-iu:Math.asin(t)}function Mu(t){return(t=yu(t/2))*t}function Nu(){}function Tu(t,n){t&&Su.hasOwnProperty(t.type)&&Su[t.type](t,n)}var Au={Feature:function(t,n){Tu(t.geometry,n)},FeatureCollection:function(t,n){for(var e=t.features,r=-1,i=e.length;++r=0?1:-1,i=r*e,o=hu(n=(n*=cu)/2+ou),a=yu(n),u=qu*a,c=Du*o+u*hu(i),f=u*r*yu(i);Lu.add(lu(f,c)),Ru=t,Du=o,qu=a}function Hu(t){return[lu(t[1],t[0]),wu(t[2])]}function ju(t){var n=t[0],e=t[1],r=hu(e);return[r*hu(n),r*yu(n),yu(e)]}function Xu(t,n){return t[0]*n[0]+t[1]*n[1]+t[2]*n[2]}function Vu(t,n){return[t[1]*n[2]-t[2]*n[1],t[2]*n[0]-t[0]*n[2],t[0]*n[1]-t[1]*n[0]]}function Gu(t,n){t[0]+=n[0],t[1]+=n[1],t[2]+=n[2]}function $u(t,n){return[t[0]*n,t[1]*n,t[2]*n]}function Wu(t){var n=bu(t[0]*t[0]+t[1]*t[1]+t[2]*t[2]);t[0]/=n,t[1]/=n,t[2]/=n}var Zu,Qu,Ku,Ju,tc,nc,ec,rc,ic,oc,ac,uc,cc,fc,sc,lc,hc,dc,pc,vc,gc,yc,_c,bc,mc,xc,wc=Qa(),Mc={point:Nc,lineStart:Ac,lineEnd:Sc,polygonStart:function(){Mc.point=kc,Mc.lineStart=Ec,Mc.lineEnd=Cc,wc.reset(),Ou.polygonStart()},polygonEnd:function(){Ou.polygonEnd(),Mc.point=Nc,Mc.lineStart=Ac,Mc.lineEnd=Sc,Lu<0?(Zu=-(Ku=180),Qu=-(Ju=90)):wc>nu?Ju=90:wc<-nu&&(Qu=-90),oc[0]=Zu,oc[1]=Ku},sphere:function(){Zu=-(Ku=180),Qu=-(Ju=90)}};function Nc(t,n){ic.push(oc=[Zu=t,Ku=t]),nJu&&(Ju=n)}function Tc(t,n){var e=ju([t*cu,n*cu]);if(rc){var r=Vu(rc,e),i=Vu([r[1],-r[0],0],r);Wu(i),i=Hu(i);var o,a=t-tc,u=a>0?1:-1,c=i[0]*uu*u,f=fu(a)>180;f^(u*tcJu&&(Ju=o):f^(u*tc<(c=(c+360)%360-180)&&cJu&&(Ju=n)),f?tPc(Zu,Ku)&&(Ku=t):Pc(t,Ku)>Pc(Zu,Ku)&&(Zu=t):Ku>=Zu?(tKu&&(Ku=t)):t>tc?Pc(Zu,t)>Pc(Zu,Ku)&&(Ku=t):Pc(t,Ku)>Pc(Zu,Ku)&&(Zu=t)}else ic.push(oc=[Zu=t,Ku=t]);nJu&&(Ju=n),rc=e,tc=t}function Ac(){Mc.point=Tc}function Sc(){oc[0]=Zu,oc[1]=Ku,Mc.point=Nc,rc=null}function kc(t,n){if(rc){var e=t-tc;wc.add(fu(e)>180?e+(e>0?360:-360):e)}else nc=t,ec=n;Ou.point(t,n),Tc(t,n)}function Ec(){Ou.lineStart()}function Cc(){kc(nc,ec),Ou.lineEnd(),fu(wc)>nu&&(Zu=-(Ku=180)),oc[0]=Zu,oc[1]=Ku,rc=null}function Pc(t,n){return(n-=t)<0?n+360:n}function zc(t,n){return t[0]-n[0]}function Rc(t,n){return t[0]<=t[1]?t[0]<=n&&n<=t[1]:nru?t+Math.round(-t/au)*au:t,n]}function $c(t,n,e){return(t%=au)?n||e?Vc(Zc(t),Qc(n,e)):Zc(t):n||e?Qc(n,e):Gc}function Wc(t){return function(n,e){return[(n+=t)>ru?n-au:n<-ru?n+au:n,e]}}function Zc(t){var n=Wc(t);return n.invert=Wc(-t),n}function Qc(t,n){var e=hu(t),r=yu(t),i=hu(n),o=yu(n);function a(t,n){var a=hu(n),u=hu(t)*a,c=yu(t)*a,f=yu(n),s=f*e+u*r;return[lu(c*i-s*o,u*e-f*r),wu(s*i+c*o)]}return a.invert=function(t,n){var a=hu(n),u=hu(t)*a,c=yu(t)*a,f=yu(n),s=f*i-c*o;return[lu(c*i+f*o,u*e+s*r),wu(s*e-u*r)]},a}function Kc(t){function n(n){return(n=t(n[0]*cu,n[1]*cu))[0]*=uu,n[1]*=uu,n}return t=$c(t[0]*cu,t[1]*cu,t.length>2?t[2]*cu:0),n.invert=function(n){return(n=t.invert(n[0]*cu,n[1]*cu))[0]*=uu,n[1]*=uu,n},n}function Jc(t,n,e,r,i,o){if(e){var a=hu(n),u=yu(n),c=r*e;null==i?(i=n+r*au,o=n-c/2):(i=tf(a,i),o=tf(a,o),(r>0?io)&&(i+=r*au));for(var f,s=i;r>0?s>o:s1&&n.push(n.pop().concat(n.shift()))},result:function(){var e=n;return n=[],t=null,e}}}function ef(t,n){return fu(t[0]-n[0])=0;--o)i.point((s=f[o])[0],s[1]);else r(h.x,h.p.x,-1,i);h=h.p}f=(h=h.o).z,d=!d}while(!h.v);i.lineEnd()}}}function af(t){if(n=t.length){for(var n,e,r=0,i=t[0];++r=0?1:-1,T=N*M,A=T>ru,S=v*x;if(uf.add(lu(S*N*yu(T),g*w+S*hu(T))),a+=A?M+N*au:M,A^d>=e^b>=e){var k=Vu(ju(h),ju(_));Wu(k);var E=Vu(o,k);Wu(E);var C=(A^M>=0?-1:1)*wu(E[2]);(r>C||r===C&&(k[0]||k[1]))&&(u+=A^M>=0?1:-1)}}return(a<-nu||a0){for(l||(i.polygonStart(),l=!0),i.lineStart(),t=0;t1&&2&c&&h.push(h.pop().concat(h.shift())),a.push(h.filter(lf))}return h}}function lf(t){return t.length>1}function hf(t,n){return((t=t.x)[0]<0?t[1]-iu-nu:iu-t[1])-((n=n.x)[0]<0?n[1]-iu-nu:iu-n[1])}var df=sf(function(){return!0},function(t){var n,e=NaN,r=NaN,i=NaN;return{lineStart:function(){t.lineStart(),n=1},point:function(o,a){var u=o>0?ru:-ru,c=fu(o-e);fu(c-ru)0?iu:-iu),t.point(i,r),t.lineEnd(),t.lineStart(),t.point(u,r),t.point(o,r),n=0):i!==u&&c>=ru&&(fu(e-i)nu?su((yu(n)*(o=hu(r))*yu(e)-yu(r)*(i=hu(n))*yu(t))/(i*o*a)):(n+r)/2}(e,r,o,a),t.point(i,r),t.lineEnd(),t.lineStart(),t.point(u,r),n=0),t.point(e=o,r=a),i=u},lineEnd:function(){t.lineEnd(),e=r=NaN},clean:function(){return 2-n}}},function(t,n,e,r){var i;if(null==t)i=e*iu,r.point(-ru,i),r.point(0,i),r.point(ru,i),r.point(ru,0),r.point(ru,-i),r.point(0,-i),r.point(-ru,-i),r.point(-ru,0),r.point(-ru,i);else if(fu(t[0]-n[0])>nu){var o=t[0]0,i=fu(n)>nu;function o(t,e){return hu(t)*hu(e)>n}function a(t,e,r){var i=[1,0,0],o=Vu(ju(t),ju(e)),a=Xu(o,o),u=o[0],c=a-u*u;if(!c)return!r&&t;var f=n*a/c,s=-n*u/c,l=Vu(i,o),h=$u(i,f);Gu(h,$u(o,s));var d=l,p=Xu(h,d),v=Xu(d,d),g=p*p-v*(Xu(h,h)-1);if(!(g<0)){var y=bu(g),_=$u(d,(-p-y)/v);if(Gu(_,h),_=Hu(_),!r)return _;var b,m=t[0],x=e[0],w=t[1],M=e[1];x0^_[1]<(fu(_[0]-m)ru^(m<=_[0]&&_[0]<=x)){var A=$u(d,(-p+y)/v);return Gu(A,h),[_,Hu(A)]}}}function u(n,e){var i=r?t:ru-t,o=0;return n<-i?o|=1:n>i&&(o|=2),e<-i?o|=4:e>i&&(o|=8),o}return sf(o,function(t){var n,e,c,f,s;return{lineStart:function(){f=c=!1,s=1},point:function(l,h){var d,p=[l,h],v=o(l,h),g=r?v?0:u(l,h):v?u(l+(l<0?ru:-ru),h):0;if(!n&&(f=c=v)&&t.lineStart(),v!==c&&(!(d=a(n,p))||ef(n,d)||ef(p,d))&&(p[0]+=nu,p[1]+=nu,v=o(p[0],p[1])),v!==c)s=0,v?(t.lineStart(),d=a(p,n),t.point(d[0],d[1])):(d=a(n,p),t.point(d[0],d[1]),t.lineEnd()),n=d;else if(i&&n&&r^v){var y;g&e||!(y=a(p,n,!0))||(s=0,r?(t.lineStart(),t.point(y[0][0],y[0][1]),t.point(y[1][0],y[1][1]),t.lineEnd()):(t.point(y[1][0],y[1][1]),t.lineEnd(),t.lineStart(),t.point(y[0][0],y[0][1])))}!v||n&&ef(n,p)||t.point(p[0],p[1]),n=p,c=v,e=g},lineEnd:function(){c&&t.lineEnd(),n=null},clean:function(){return s|(f&&c)<<1}}},function(n,r,i,o){Jc(o,t,e,i,n,r)},r?[0,-t]:[-ru,t-ru])}var vf=1e9,gf=-vf;function yf(t,n,e,r){function i(i,o){return t<=i&&i<=e&&n<=o&&o<=r}function o(i,o,u,f){var s=0,l=0;if(null==i||(s=a(i,u))!==(l=a(o,u))||c(i,o)<0^u>0)do{f.point(0===s||3===s?t:e,s>1?r:n)}while((s=(s+u+4)%4)!==l);else f.point(o[0],o[1])}function a(r,i){return fu(r[0]-t)0?0:3:fu(r[0]-e)0?2:1:fu(r[1]-n)0?1:0:i>0?3:2}function u(t,n){return c(t.x,n.x)}function c(t,n){var e=a(t,1),r=a(n,1);return e!==r?e-r:0===e?n[1]-t[1]:1===e?t[0]-n[0]:2===e?t[1]-n[1]:n[0]-t[0]}return function(a){var c,f,s,l,h,d,p,v,g,y,_,b=a,m=nf(),x={point:w,lineStart:function(){x.point=M,f&&f.push(s=[]);y=!0,g=!1,p=v=NaN},lineEnd:function(){c&&(M(l,h),d&&g&&m.rejoin(),c.push(m.result()));x.point=w,g&&b.lineEnd()},polygonStart:function(){b=m,c=[],f=[],_=!0},polygonEnd:function(){var n=function(){for(var n=0,e=0,i=f.length;er&&(h-o)*(r-a)>(d-a)*(t-o)&&++n:d<=r&&(h-o)*(r-a)<(d-a)*(t-o)&&--n;return n}(),e=_&&n,i=(c=A(c)).length;(e||i)&&(a.polygonStart(),e&&(a.lineStart(),o(null,null,1,a),a.lineEnd()),i&&of(c,u,n,o,a),a.polygonEnd());b=a,c=f=s=null}};function w(t,n){i(t,n)&&b.point(t,n)}function M(o,a){var u=i(o,a);if(f&&s.push([o,a]),y)l=o,h=a,d=u,y=!1,u&&(b.lineStart(),b.point(o,a));else if(u&&g)b.point(o,a);else{var c=[p=Math.max(gf,Math.min(vf,p)),v=Math.max(gf,Math.min(vf,v))],m=[o=Math.max(gf,Math.min(vf,o)),a=Math.max(gf,Math.min(vf,a))];!function(t,n,e,r,i,o){var a,u=t[0],c=t[1],f=0,s=1,l=n[0]-u,h=n[1]-c;if(a=e-u,l||!(a>0)){if(a/=l,l<0){if(a0){if(a>s)return;a>f&&(f=a)}if(a=i-u,l||!(a<0)){if(a/=l,l<0){if(a>s)return;a>f&&(f=a)}else if(l>0){if(a0)){if(a/=h,h<0){if(a0){if(a>s)return;a>f&&(f=a)}if(a=o-c,h||!(a<0)){if(a/=h,h<0){if(a>s)return;a>f&&(f=a)}else if(h>0){if(a0&&(t[0]=u+f*l,t[1]=c+f*h),s<1&&(n[0]=u+s*l,n[1]=c+s*h),!0}}}}}(c,m,t,n,e,r)?u&&(b.lineStart(),b.point(o,a),_=!1):(g||(b.lineStart(),b.point(c[0],c[1])),b.point(m[0],m[1]),u||b.lineEnd(),_=!1)}p=o,v=a,g=u}return x}}var _f,bf,mf,xf=Qa(),wf={sphere:Nu,point:Nu,lineStart:function(){wf.point=Nf,wf.lineEnd=Mf},lineEnd:Nu,polygonStart:Nu,polygonEnd:Nu};function Mf(){wf.point=wf.lineEnd=Nu}function Nf(t,n){_f=t*=cu,bf=yu(n*=cu),mf=hu(n),wf.point=Tf}function Tf(t,n){t*=cu;var e=yu(n*=cu),r=hu(n),i=fu(t-_f),o=hu(i),a=r*yu(i),u=mf*e-bf*r*o,c=bf*e+mf*r*o;xf.add(lu(bu(a*a+u*u),c)),_f=t,bf=e,mf=r}function Af(t){return xf.reset(),Cu(t,wf),+xf}var Sf=[null,null],kf={type:"LineString",coordinates:Sf};function Ef(t,n){return Sf[0]=t,Sf[1]=n,Af(kf)}var Cf={Feature:function(t,n){return zf(t.geometry,n)},FeatureCollection:function(t,n){for(var e=t.features,r=-1,i=e.length;++r0&&(i=Ef(t[o],t[o-1]))>0&&e<=i&&r<=i&&(e+r-i)*(1-Math.pow((e-r)/i,2))nu}).map(c)).concat(g(du(o/d)*d,i,d).filter(function(t){return fu(t%v)>nu}).map(f))}return _.lines=function(){return b().map(function(t){return{type:"LineString",coordinates:t}})},_.outline=function(){return{type:"Polygon",coordinates:[s(r).concat(l(a).slice(1),s(e).reverse().slice(1),l(u).reverse().slice(1))]}},_.extent=function(t){return arguments.length?_.extentMajor(t).extentMinor(t):_.extentMinor()},_.extentMajor=function(t){return arguments.length?(r=+t[0][0],e=+t[1][0],u=+t[0][1],a=+t[1][1],r>e&&(t=r,r=e,e=t),u>a&&(t=u,u=a,a=t),_.precision(y)):[[r,u],[e,a]]},_.extentMinor=function(e){return arguments.length?(n=+e[0][0],t=+e[1][0],o=+e[0][1],i=+e[1][1],n>t&&(e=n,n=t,t=e),o>i&&(e=o,o=i,i=e),_.precision(y)):[[n,o],[t,i]]},_.step=function(t){return arguments.length?_.stepMajor(t).stepMinor(t):_.stepMinor()},_.stepMajor=function(t){return arguments.length?(p=+t[0],v=+t[1],_):[p,v]},_.stepMinor=function(t){return arguments.length?(h=+t[0],d=+t[1],_):[h,d]},_.precision=function(h){return arguments.length?(y=+h,c=Of(o,i,90),f=Bf(n,t,y),s=Of(u,a,90),l=Bf(r,e,y),_):y},_.extentMajor([[-180,-90+nu],[180,90-nu]]).extentMinor([[-180,-80-nu],[180,80+nu]])}function Yf(t){return t}var If,Hf,jf,Xf,Vf=Qa(),Gf=Qa(),$f={point:Nu,lineStart:Nu,lineEnd:Nu,polygonStart:function(){$f.lineStart=Wf,$f.lineEnd=Kf},polygonEnd:function(){$f.lineStart=$f.lineEnd=$f.point=Nu,Vf.add(fu(Gf)),Gf.reset()},result:function(){var t=Vf/2;return Vf.reset(),t}};function Wf(){$f.point=Zf}function Zf(t,n){$f.point=Qf,If=jf=t,Hf=Xf=n}function Qf(t,n){Gf.add(Xf*t-jf*n),jf=t,Xf=n}function Kf(){Qf(If,Hf)}var Jf=1/0,ts=Jf,ns=-Jf,es=ns,rs={point:function(t,n){tns&&(ns=t);nes&&(es=n)},lineStart:Nu,lineEnd:Nu,polygonStart:Nu,polygonEnd:Nu,result:function(){var t=[[Jf,ts],[ns,es]];return ns=es=-(ts=Jf=1/0),t}};var is,os,as,us,cs=0,fs=0,ss=0,ls=0,hs=0,ds=0,ps=0,vs=0,gs=0,ys={point:_s,lineStart:bs,lineEnd:ws,polygonStart:function(){ys.lineStart=Ms,ys.lineEnd=Ns},polygonEnd:function(){ys.point=_s,ys.lineStart=bs,ys.lineEnd=ws},result:function(){var t=gs?[ps/gs,vs/gs]:ds?[ls/ds,hs/ds]:ss?[cs/ss,fs/ss]:[NaN,NaN];return cs=fs=ss=ls=hs=ds=ps=vs=gs=0,t}};function _s(t,n){cs+=t,fs+=n,++ss}function bs(){ys.point=ms}function ms(t,n){ys.point=xs,_s(as=t,us=n)}function xs(t,n){var e=t-as,r=n-us,i=bu(e*e+r*r);ls+=i*(as+t)/2,hs+=i*(us+n)/2,ds+=i,_s(as=t,us=n)}function ws(){ys.point=_s}function Ms(){ys.point=Ts}function Ns(){As(is,os)}function Ts(t,n){ys.point=As,_s(is=as=t,os=us=n)}function As(t,n){var e=t-as,r=n-us,i=bu(e*e+r*r);ls+=i*(as+t)/2,hs+=i*(us+n)/2,ds+=i,ps+=(i=us*t-as*n)*(as+t),vs+=i*(us+n),gs+=3*i,_s(as=t,us=n)}function Ss(t){this._context=t}Ss.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(){0===this._line&&this._context.closePath(),this._point=NaN},point:function(t,n){switch(this._point){case 0:this._context.moveTo(t,n),this._point=1;break;case 1:this._context.lineTo(t,n);break;default:this._context.moveTo(t+this._radius,n),this._context.arc(t,n,this._radius,0,au)}},result:Nu};var ks,Es,Cs,Ps,zs,Rs=Qa(),Ds={point:Nu,lineStart:function(){Ds.point=qs},lineEnd:function(){ks&&Ls(Es,Cs),Ds.point=Nu},polygonStart:function(){ks=!0},polygonEnd:function(){ks=null},result:function(){var t=+Rs;return Rs.reset(),t}};function qs(t,n){Ds.point=Ls,Es=Ps=t,Cs=zs=n}function Ls(t,n){Ps-=t,zs-=n,Rs.add(bu(Ps*Ps+zs*zs)),Ps=t,zs=n}function Us(){this._string=[]}function Os(t){return"m0,"+t+"a"+t+","+t+" 0 1,1 0,"+-2*t+"a"+t+","+t+" 0 1,1 0,"+2*t+"z"}function Bs(t){return function(n){var e=new Fs;for(var r in t)e[r]=t[r];return e.stream=n,e}}function Fs(){}function Ys(t,n,e){var r=t.clipExtent&&t.clipExtent();return t.scale(150).translate([0,0]),null!=r&&t.clipExtent(null),Cu(e,t.stream(rs)),n(rs.result()),null!=r&&t.clipExtent(r),t}function Is(t,n,e){return Ys(t,function(e){var r=n[1][0]-n[0][0],i=n[1][1]-n[0][1],o=Math.min(r/(e[1][0]-e[0][0]),i/(e[1][1]-e[0][1])),a=+n[0][0]+(r-o*(e[1][0]+e[0][0]))/2,u=+n[0][1]+(i-o*(e[1][1]+e[0][1]))/2;t.scale(150*o).translate([a,u])},e)}function Hs(t,n,e){return Is(t,[[0,0],n],e)}function js(t,n,e){return Ys(t,function(e){var r=+n,i=r/(e[1][0]-e[0][0]),o=(r-i*(e[1][0]+e[0][0]))/2,a=-i*e[0][1];t.scale(150*i).translate([o,a])},e)}function Xs(t,n,e){return Ys(t,function(e){var r=+n,i=r/(e[1][1]-e[0][1]),o=-i*e[0][0],a=(r-i*(e[1][1]+e[0][1]))/2;t.scale(150*i).translate([o,a])},e)}Us.prototype={_radius:4.5,_circle:Os(4.5),pointRadius:function(t){return(t=+t)!==this._radius&&(this._radius=t,this._circle=null),this},polygonStart:function(){this._line=0},polygonEnd:function(){this._line=NaN},lineStart:function(){this._point=0},lineEnd:function(){0===this._line&&this._string.push("Z"),this._point=NaN},point:function(t,n){switch(this._point){case 0:this._string.push("M",t,",",n),this._point=1;break;case 1:this._string.push("L",t,",",n);break;default:null==this._circle&&(this._circle=Os(this._radius)),this._string.push("M",t,",",n,this._circle)}},result:function(){if(this._string.length){var t=this._string.join("");return this._string=[],t}return null}},Fs.prototype={constructor:Fs,point:function(t,n){this.stream.point(t,n)},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()}};var Vs=16,Gs=hu(30*cu);function $s(t,n){return+n?function(t,n){function e(r,i,o,a,u,c,f,s,l,h,d,p,v,g){var y=f-r,_=s-i,b=y*y+_*_;if(b>4*n&&v--){var m=a+h,x=u+d,w=c+p,M=bu(m*m+x*x+w*w),N=wu(w/=M),T=fu(fu(w)-1)n||fu((y*E+_*C)/b-.5)>.3||a*h+u*d+c*p2?t[2]%360*cu:0,E()):[g*uu,y*uu,_*uu]},S.angle=function(t){return arguments.length?(b=t%360*cu,E()):b*uu},S.reflectX=function(t){return arguments.length?(m=t?-1:1,E()):m<0},S.reflectY=function(t){return arguments.length?(x=t?-1:1,E()):x<0},S.precision=function(t){return arguments.length?(a=$s(u,A=t*t),C()):bu(A)},S.fitExtent=function(t,n){return Is(S,t,n)},S.fitSize=function(t,n){return Hs(S,t,n)},S.fitWidth=function(t,n){return js(S,t,n)},S.fitHeight=function(t,n){return Xs(S,t,n)},function(){return n=t.apply(this,arguments),S.invert=n.invert&&k,E()}}function Js(t){var n=0,e=ru/3,r=Ks(t),i=r(n,e);return i.parallels=function(t){return arguments.length?r(n=t[0]*cu,e=t[1]*cu):[n*uu,e*uu]},i}function tl(t,n){var e=yu(t),r=(e+yu(n))/2;if(fu(r)0?n<-iu+nu&&(n=-iu+nu):n>iu-nu&&(n=iu-nu);var e=i/gu(fl(n),r);return[e*yu(r*t),i-e*hu(r*t)]}return o.invert=function(t,n){var e=i-n,o=_u(r)*bu(t*t+e*e),a=lu(t,fu(e))*_u(e);return e*r<0&&(a-=ru*_u(t)*_u(e)),[a/r,2*su(gu(i/o,1/r))-iu]},o}function ll(t,n){return[t,n]}function hl(t,n){var e=hu(t),r=t===n?yu(t):(e-hu(n))/(n-t),i=e/r+t;if(fu(r)=0;)n+=e[r].value;else n=1;t.value=n}function kl(t,n){var e,r,i,o,a,u=new zl(t),c=+t.value&&(u.value=t.value),f=[u];for(null==n&&(n=El);e=f.pop();)if(c&&(e.value=+e.data.value),(i=n(e.data))&&(a=i.length))for(e.children=new Array(a),o=a-1;o>=0;--o)f.push(r=e.children[o]=new zl(i[o])),r.parent=e,r.depth=e.depth+1;return u.eachBefore(Pl)}function El(t){return t.children}function Cl(t){t.data=t.data.data}function Pl(t){var n=0;do{t.height=n}while((t=t.parent)&&t.height<++n)}function zl(t){this.data=t,this.depth=this.height=0,this.parent=null}_l.invert=function(t,n){for(var e,r=n,i=r*r,o=i*i*i,a=0;a<12&&(o=(i=(r-=e=(r*(dl+pl*i+o*(vl+gl*i))-n)/(dl+3*pl*i+o*(7*vl+9*gl*i)))*r)*i*i,!(fu(e)nu&&--i>0);return[t/(.8707+(o=r*r)*(o*(o*o*o*(.003971-.001529*o)-.013791)-.131979)),r]},xl.invert=il(wu),wl.invert=il(function(t){return 2*su(t)}),Ml.invert=function(t,n){return[-n,2*su(pu(t))-iu]},zl.prototype=kl.prototype={constructor:zl,count:function(){return this.eachAfter(Sl)},each:function(t){var n,e,r,i,o=this,a=[o];do{for(n=a.reverse(),a=[];o=n.pop();)if(t(o),e=o.children)for(r=0,i=e.length;r=0;--e)i.push(n[e]);return this},sum:function(t){return this.eachAfter(function(n){for(var e=+t(n.data)||0,r=n.children,i=r&&r.length;--i>=0;)e+=r[i].value;n.value=e})},sort:function(t){return this.eachBefore(function(n){n.children&&n.children.sort(t)})},path:function(t){for(var n=this,e=function(t,n){if(t===n)return t;var e=t.ancestors(),r=n.ancestors(),i=null;for(t=e.pop(),n=r.pop();t===n;)i=t,t=e.pop(),n=r.pop();return i}(n,t),r=[n];n!==e;)n=n.parent,r.push(n);for(var i=r.length;t!==e;)r.splice(i,0,t),t=t.parent;return r},ancestors:function(){for(var t=this,n=[t];t=t.parent;)n.push(t);return n},descendants:function(){var t=[];return this.each(function(n){t.push(n)}),t},leaves:function(){var t=[];return this.eachBefore(function(n){n.children||t.push(n)}),t},links:function(){var t=this,n=[];return t.each(function(e){e!==t&&n.push({source:e.parent,target:e})}),n},copy:function(){return kl(this).eachBefore(Cl)}};var Rl=Array.prototype.slice;function Dl(t){for(var n,e,r=0,i=(t=function(t){for(var n,e,r=t.length;r;)e=Math.random()*r--|0,n=t[r],t[r]=t[e],t[e]=n;return t}(Rl.call(t))).length,o=[];r0&&e*e>r*r+i*i}function Ol(t,n){for(var e=0;e(a*=a)?(r=(f+a-i)/(2*f),o=Math.sqrt(Math.max(0,a/f-r*r)),e.x=t.x-r*u-o*c,e.y=t.y-r*c+o*u):(r=(f+i-a)/(2*f),o=Math.sqrt(Math.max(0,i/f-r*r)),e.x=n.x+r*u-o*c,e.y=n.y+r*c+o*u)):(e.x=n.x+e.r,e.y=n.y)}function Hl(t,n){var e=t.r+n.r-1e-6,r=n.x-t.x,i=n.y-t.y;return e>0&&e*e>r*r+i*i}function jl(t){var n=t._,e=t.next._,r=n.r+e.r,i=(n.x*e.r+e.x*n.r)/r,o=(n.y*e.r+e.y*n.r)/r;return i*i+o*o}function Xl(t){this._=t,this.next=null,this.previous=null}function Vl(t){if(!(i=t.length))return 0;var n,e,r,i,o,a,u,c,f,s,l;if((n=t[0]).x=0,n.y=0,!(i>1))return n.r;if(e=t[1],n.x=-e.r,e.x=n.r,e.y=0,!(i>2))return n.r+e.r;Il(e,n,r=t[2]),n=new Xl(n),e=new Xl(e),r=new Xl(r),n.next=r.previous=e,e.next=n.previous=r,r.next=e.previous=n;t:for(u=3;uh&&(h=u),g=s*s*v,(d=Math.max(h/g,g/l))>p){s-=u;break}p=d}y.push(a={value:s,dice:c1?n:1)},e}(vh);var _h=function t(n){function e(t,e,r,i,o){if((a=t._squarify)&&a.ratio===n)for(var a,u,c,f,s,l=-1,h=a.length,d=t.value;++l1?n:1)},e}(vh);function bh(t,n,e){return(n[0]-t[0])*(e[1]-t[1])-(n[1]-t[1])*(e[0]-t[0])}function mh(t,n){return t[0]-n[0]||t[1]-n[1]}function xh(t){for(var n=t.length,e=[0,1],r=2,i=2;i1&&bh(t[e[r-2]],t[e[r-1]],t[i])<=0;)--r;e[r++]=i}return e.slice(0,r)}function wh(){return Math.random()}var Mh=function t(n){function e(t,e){return t=null==t?0:+t,e=null==e?1:+e,1===arguments.length?(e=t,t=0):e-=t,function(){return n()*e+t}}return e.source=t,e}(wh),Nh=function t(n){function e(t,e){var r,i;return t=null==t?0:+t,e=null==e?1:+e,function(){var o;if(null!=r)o=r,r=null;else do{r=2*n()-1,o=2*n()-1,i=r*r+o*o}while(!i||i>1);return t+e*o*Math.sqrt(-2*Math.log(i)/i)}}return e.source=t,e}(wh),Th=function t(n){function e(){var t=Nh.source(n).apply(this,arguments);return function(){return Math.exp(t())}}return e.source=t,e}(wh),Ah=function t(n){function e(t){return function(){for(var e=0,r=0;rr&&(n=e,e=r,r=n),function(t){return Math.max(e,Math.min(r,t))}}function Ih(t,n,e){var r=t[0],i=t[1],o=n[0],a=n[1];return i2?Hh:Ih,i=o=null,l}function l(n){return isNaN(n=+n)?e:(i||(i=r(a.map(t),u,c)))(t(f(n)))}return l.invert=function(e){return f(n((o||(o=r(u,a.map(t),me)))(e)))},l.domain=function(t){return arguments.length?(a=zh.call(t,Uh),f===Bh||(f=Yh(a)),s()):a.slice()},l.range=function(t){return arguments.length?(u=Rh.call(t),s()):u.slice()},l.rangeRound=function(t){return u=Rh.call(t),c=Ae,s()},l.clamp=function(t){return arguments.length?(f=t?Yh(a):Bh,l):f!==Bh},l.interpolate=function(t){return arguments.length?(c=t,s()):c},l.unknown=function(t){return arguments.length?(e=t,l):e},function(e,r){return t=e,n=r,s()}}function Vh(t,n){return Xh()(t,n)}function Gh(n,e,r,i){var o,a=w(n,e,r);switch((i=Oa(null==i?",f":i)).type){case"s":var u=Math.max(Math.abs(n),Math.abs(e));return null!=i.precision||isNaN(o=Wa(a,u))||(i.precision=o),t.formatPrefix(i,u);case"":case"e":case"g":case"p":case"r":null!=i.precision||isNaN(o=Za(a,Math.max(Math.abs(n),Math.abs(e))))||(i.precision=o-("e"===i.type));break;case"f":case"%":null!=i.precision||isNaN(o=$a(a))||(i.precision=o-2*("%"===i.type))}return t.format(i)}function $h(t){var n=t.domain;return t.ticks=function(t){var e=n();return m(e[0],e[e.length-1],null==t?10:t)},t.tickFormat=function(t,e){var r=n();return Gh(r[0],r[r.length-1],null==t?10:t,e)},t.nice=function(e){null==e&&(e=10);var r,i=n(),o=0,a=i.length-1,u=i[o],c=i[a];return c0?r=x(u=Math.floor(u/r)*r,c=Math.ceil(c/r)*r,e):r<0&&(r=x(u=Math.ceil(u*r)/r,c=Math.floor(c*r)/r,e)),r>0?(i[o]=Math.floor(u/r)*r,i[a]=Math.ceil(c/r)*r,n(i)):r<0&&(i[o]=Math.ceil(u*r)/r,i[a]=Math.floor(c*r)/r,n(i)),t},t}function Wh(t,n){var e,r=0,i=(t=t.slice()).length-1,o=t[r],a=t[i];return a0){for(;hc)break;v.push(l)}}else for(;h=1;--s)if(!((l=f*s)c)break;v.push(l)}}else v=m(h,d,Math.min(d-h,p)).map(r);return n?v.reverse():v},i.tickFormat=function(n,o){if(null==o&&(o=10===a?".0e":","),"function"!=typeof o&&(o=t.format(o)),n===1/0)return o;null==n&&(n=10);var u=Math.max(1,a*n/i.ticks().length);return function(t){var n=t/r(Math.round(e(t)));return n*a0))return u;do{u.push(a=new Date(+e)),n(e,o),t(e)}while(a=n)for(;t(n),!e(n);)n.setTime(n-1)},function(t,r){if(t>=t)if(r<0)for(;++r<=0;)for(;n(t,-1),!e(t););else for(;--r>=0;)for(;n(t,1),!e(t););})},e&&(i.count=function(n,r){return ld.setTime(+n),hd.setTime(+r),t(ld),t(hd),Math.floor(e(ld,hd))},i.every=function(t){return t=Math.floor(t),isFinite(t)&&t>0?t>1?i.filter(r?function(n){return r(n)%t==0}:function(n){return i.count(0,n)%t==0}):i:null}),i}var pd=dd(function(){},function(t,n){t.setTime(+t+n)},function(t,n){return n-t});pd.every=function(t){return t=Math.floor(t),isFinite(t)&&t>0?t>1?dd(function(n){n.setTime(Math.floor(n/t)*t)},function(n,e){n.setTime(+n+e*t)},function(n,e){return(e-n)/t}):pd:null};var vd=pd.range,gd=6e4,yd=6048e5,_d=dd(function(t){t.setTime(t-t.getMilliseconds())},function(t,n){t.setTime(+t+1e3*n)},function(t,n){return(n-t)/1e3},function(t){return t.getUTCSeconds()}),bd=_d.range,md=dd(function(t){t.setTime(t-t.getMilliseconds()-1e3*t.getSeconds())},function(t,n){t.setTime(+t+n*gd)},function(t,n){return(n-t)/gd},function(t){return t.getMinutes()}),xd=md.range,wd=dd(function(t){t.setTime(t-t.getMilliseconds()-1e3*t.getSeconds()-t.getMinutes()*gd)},function(t,n){t.setTime(+t+36e5*n)},function(t,n){return(n-t)/36e5},function(t){return t.getHours()}),Md=wd.range,Nd=dd(function(t){t.setHours(0,0,0,0)},function(t,n){t.setDate(t.getDate()+n)},function(t,n){return(n-t-(n.getTimezoneOffset()-t.getTimezoneOffset())*gd)/864e5},function(t){return t.getDate()-1}),Td=Nd.range;function Ad(t){return dd(function(n){n.setDate(n.getDate()-(n.getDay()+7-t)%7),n.setHours(0,0,0,0)},function(t,n){t.setDate(t.getDate()+7*n)},function(t,n){return(n-t-(n.getTimezoneOffset()-t.getTimezoneOffset())*gd)/yd})}var Sd=Ad(0),kd=Ad(1),Ed=Ad(2),Cd=Ad(3),Pd=Ad(4),zd=Ad(5),Rd=Ad(6),Dd=Sd.range,qd=kd.range,Ld=Ed.range,Ud=Cd.range,Od=Pd.range,Bd=zd.range,Fd=Rd.range,Yd=dd(function(t){t.setDate(1),t.setHours(0,0,0,0)},function(t,n){t.setMonth(t.getMonth()+n)},function(t,n){return n.getMonth()-t.getMonth()+12*(n.getFullYear()-t.getFullYear())},function(t){return t.getMonth()}),Id=Yd.range,Hd=dd(function(t){t.setMonth(0,1),t.setHours(0,0,0,0)},function(t,n){t.setFullYear(t.getFullYear()+n)},function(t,n){return n.getFullYear()-t.getFullYear()},function(t){return t.getFullYear()});Hd.every=function(t){return isFinite(t=Math.floor(t))&&t>0?dd(function(n){n.setFullYear(Math.floor(n.getFullYear()/t)*t),n.setMonth(0,1),n.setHours(0,0,0,0)},function(n,e){n.setFullYear(n.getFullYear()+e*t)}):null};var jd=Hd.range,Xd=dd(function(t){t.setUTCSeconds(0,0)},function(t,n){t.setTime(+t+n*gd)},function(t,n){return(n-t)/gd},function(t){return t.getUTCMinutes()}),Vd=Xd.range,Gd=dd(function(t){t.setUTCMinutes(0,0,0)},function(t,n){t.setTime(+t+36e5*n)},function(t,n){return(n-t)/36e5},function(t){return t.getUTCHours()}),$d=Gd.range,Wd=dd(function(t){t.setUTCHours(0,0,0,0)},function(t,n){t.setUTCDate(t.getUTCDate()+n)},function(t,n){return(n-t)/864e5},function(t){return t.getUTCDate()-1}),Zd=Wd.range;function Qd(t){return dd(function(n){n.setUTCDate(n.getUTCDate()-(n.getUTCDay()+7-t)%7),n.setUTCHours(0,0,0,0)},function(t,n){t.setUTCDate(t.getUTCDate()+7*n)},function(t,n){return(n-t)/yd})}var Kd=Qd(0),Jd=Qd(1),tp=Qd(2),np=Qd(3),ep=Qd(4),rp=Qd(5),ip=Qd(6),op=Kd.range,ap=Jd.range,up=tp.range,cp=np.range,fp=ep.range,sp=rp.range,lp=ip.range,hp=dd(function(t){t.setUTCDate(1),t.setUTCHours(0,0,0,0)},function(t,n){t.setUTCMonth(t.getUTCMonth()+n)},function(t,n){return n.getUTCMonth()-t.getUTCMonth()+12*(n.getUTCFullYear()-t.getUTCFullYear())},function(t){return t.getUTCMonth()}),dp=hp.range,pp=dd(function(t){t.setUTCMonth(0,1),t.setUTCHours(0,0,0,0)},function(t,n){t.setUTCFullYear(t.getUTCFullYear()+n)},function(t,n){return n.getUTCFullYear()-t.getUTCFullYear()},function(t){return t.getUTCFullYear()});pp.every=function(t){return isFinite(t=Math.floor(t))&&t>0?dd(function(n){n.setUTCFullYear(Math.floor(n.getUTCFullYear()/t)*t),n.setUTCMonth(0,1),n.setUTCHours(0,0,0,0)},function(n,e){n.setUTCFullYear(n.getUTCFullYear()+e*t)}):null};var vp=pp.range;function gp(t){if(0<=t.y&&t.y<100){var n=new Date(-1,t.m,t.d,t.H,t.M,t.S,t.L);return n.setFullYear(t.y),n}return new Date(t.y,t.m,t.d,t.H,t.M,t.S,t.L)}function yp(t){if(0<=t.y&&t.y<100){var n=new Date(Date.UTC(-1,t.m,t.d,t.H,t.M,t.S,t.L));return n.setUTCFullYear(t.y),n}return new Date(Date.UTC(t.y,t.m,t.d,t.H,t.M,t.S,t.L))}function _p(t,n,e){return{y:t,m:n,d:e,H:0,M:0,S:0,L:0}}function bp(t){var n=t.dateTime,e=t.date,r=t.time,i=t.periods,o=t.days,a=t.shortDays,u=t.months,c=t.shortMonths,f=Sp(i),s=kp(i),l=Sp(o),h=kp(o),d=Sp(a),p=kp(a),v=Sp(u),g=kp(u),y=Sp(c),_=kp(c),b={a:function(t){return a[t.getDay()]},A:function(t){return o[t.getDay()]},b:function(t){return c[t.getMonth()]},B:function(t){return u[t.getMonth()]},c:null,d:Wp,e:Wp,f:tv,H:Zp,I:Qp,j:Kp,L:Jp,m:nv,M:ev,p:function(t){return i[+(t.getHours()>=12)]},q:function(t){return 1+~~(t.getMonth()/3)},Q:Cv,s:Pv,S:rv,u:iv,U:ov,V:av,w:uv,W:cv,x:null,X:null,y:fv,Y:sv,Z:lv,"%":Ev},m={a:function(t){return a[t.getUTCDay()]},A:function(t){return o[t.getUTCDay()]},b:function(t){return c[t.getUTCMonth()]},B:function(t){return u[t.getUTCMonth()]},c:null,d:hv,e:hv,f:yv,H:dv,I:pv,j:vv,L:gv,m:_v,M:bv,p:function(t){return i[+(t.getUTCHours()>=12)]},q:function(t){return 1+~~(t.getUTCMonth()/3)},Q:Cv,s:Pv,S:mv,u:xv,U:wv,V:Mv,w:Nv,W:Tv,x:null,X:null,y:Av,Y:Sv,Z:kv,"%":Ev},x={a:function(t,n,e){var r=d.exec(n.slice(e));return r?(t.w=p[r[0].toLowerCase()],e+r[0].length):-1},A:function(t,n,e){var r=l.exec(n.slice(e));return r?(t.w=h[r[0].toLowerCase()],e+r[0].length):-1},b:function(t,n,e){var r=y.exec(n.slice(e));return r?(t.m=_[r[0].toLowerCase()],e+r[0].length):-1},B:function(t,n,e){var r=v.exec(n.slice(e));return r?(t.m=g[r[0].toLowerCase()],e+r[0].length):-1},c:function(t,e,r){return N(t,n,e,r)},d:Bp,e:Bp,f:Xp,H:Yp,I:Yp,j:Fp,L:jp,m:Op,M:Ip,p:function(t,n,e){var r=f.exec(n.slice(e));return r?(t.p=s[r[0].toLowerCase()],e+r[0].length):-1},q:Up,Q:Gp,s:$p,S:Hp,u:Cp,U:Pp,V:zp,w:Ep,W:Rp,x:function(t,n,r){return N(t,e,n,r)},X:function(t,n,e){return N(t,r,n,e)},y:qp,Y:Dp,Z:Lp,"%":Vp};function w(t,n){return function(e){var r,i,o,a=[],u=-1,c=0,f=t.length;for(e instanceof Date||(e=new Date(+e));++u53)return null;"w"in o||(o.w=1),"Z"in o?(i=(r=yp(_p(o.y,0,1))).getUTCDay(),r=i>4||0===i?Jd.ceil(r):Jd(r),r=Wd.offset(r,7*(o.V-1)),o.y=r.getUTCFullYear(),o.m=r.getUTCMonth(),o.d=r.getUTCDate()+(o.w+6)%7):(i=(r=gp(_p(o.y,0,1))).getDay(),r=i>4||0===i?kd.ceil(r):kd(r),r=Nd.offset(r,7*(o.V-1)),o.y=r.getFullYear(),o.m=r.getMonth(),o.d=r.getDate()+(o.w+6)%7)}else("W"in o||"U"in o)&&("w"in o||(o.w="u"in o?o.u%7:"W"in o?1:0),i="Z"in o?yp(_p(o.y,0,1)).getUTCDay():gp(_p(o.y,0,1)).getDay(),o.m=0,o.d="W"in o?(o.w+6)%7+7*o.W-(i+5)%7:o.w+7*o.U-(i+6)%7);return"Z"in o?(o.H+=o.Z/100|0,o.M+=o.Z%100,yp(o)):gp(o)}}function N(t,n,e,r){for(var i,o,a=0,u=n.length,c=e.length;a=c)return-1;if(37===(i=n.charCodeAt(a++))){if(i=n.charAt(a++),!(o=x[i in xp?n.charAt(a++):i])||(r=o(t,e,r))<0)return-1}else if(i!=e.charCodeAt(r++))return-1}return r}return b.x=w(e,b),b.X=w(r,b),b.c=w(n,b),m.x=w(e,m),m.X=w(r,m),m.c=w(n,m),{format:function(t){var n=w(t+="",b);return n.toString=function(){return t},n},parse:function(t){var n=M(t+="",!1);return n.toString=function(){return t},n},utcFormat:function(t){var n=w(t+="",m);return n.toString=function(){return t},n},utcParse:function(t){var n=M(t+="",!0);return n.toString=function(){return t},n}}}var mp,xp={"-":"",_:" ",0:"0"},wp=/^\s*\d+/,Mp=/^%/,Np=/[\\^$*+?|[\]().{}]/g;function Tp(t,n,e){var r=t<0?"-":"",i=(r?-t:t)+"",o=i.length;return r+(o68?1900:2e3),e+r[0].length):-1}function Lp(t,n,e){var r=/^(Z)|([+-]\d\d)(?::?(\d\d))?/.exec(n.slice(e,e+6));return r?(t.Z=r[1]?0:-(r[2]+(r[3]||"00")),e+r[0].length):-1}function Up(t,n,e){var r=wp.exec(n.slice(e,e+1));return r?(t.q=3*r[0]-3,e+r[0].length):-1}function Op(t,n,e){var r=wp.exec(n.slice(e,e+2));return r?(t.m=r[0]-1,e+r[0].length):-1}function Bp(t,n,e){var r=wp.exec(n.slice(e,e+2));return r?(t.d=+r[0],e+r[0].length):-1}function Fp(t,n,e){var r=wp.exec(n.slice(e,e+3));return r?(t.m=0,t.d=+r[0],e+r[0].length):-1}function Yp(t,n,e){var r=wp.exec(n.slice(e,e+2));return r?(t.H=+r[0],e+r[0].length):-1}function Ip(t,n,e){var r=wp.exec(n.slice(e,e+2));return r?(t.M=+r[0],e+r[0].length):-1}function Hp(t,n,e){var r=wp.exec(n.slice(e,e+2));return r?(t.S=+r[0],e+r[0].length):-1}function jp(t,n,e){var r=wp.exec(n.slice(e,e+3));return r?(t.L=+r[0],e+r[0].length):-1}function Xp(t,n,e){var r=wp.exec(n.slice(e,e+6));return r?(t.L=Math.floor(r[0]/1e3),e+r[0].length):-1}function Vp(t,n,e){var r=Mp.exec(n.slice(e,e+1));return r?e+r[0].length:-1}function Gp(t,n,e){var r=wp.exec(n.slice(e));return r?(t.Q=+r[0],e+r[0].length):-1}function $p(t,n,e){var r=wp.exec(n.slice(e));return r?(t.s=+r[0],e+r[0].length):-1}function Wp(t,n){return Tp(t.getDate(),n,2)}function Zp(t,n){return Tp(t.getHours(),n,2)}function Qp(t,n){return Tp(t.getHours()%12||12,n,2)}function Kp(t,n){return Tp(1+Nd.count(Hd(t),t),n,3)}function Jp(t,n){return Tp(t.getMilliseconds(),n,3)}function tv(t,n){return Jp(t,n)+"000"}function nv(t,n){return Tp(t.getMonth()+1,n,2)}function ev(t,n){return Tp(t.getMinutes(),n,2)}function rv(t,n){return Tp(t.getSeconds(),n,2)}function iv(t){var n=t.getDay();return 0===n?7:n}function ov(t,n){return Tp(Sd.count(Hd(t)-1,t),n,2)}function av(t,n){var e=t.getDay();return t=e>=4||0===e?Pd(t):Pd.ceil(t),Tp(Pd.count(Hd(t),t)+(4===Hd(t).getDay()),n,2)}function uv(t){return t.getDay()}function cv(t,n){return Tp(kd.count(Hd(t)-1,t),n,2)}function fv(t,n){return Tp(t.getFullYear()%100,n,2)}function sv(t,n){return Tp(t.getFullYear()%1e4,n,4)}function lv(t){var n=t.getTimezoneOffset();return(n>0?"-":(n*=-1,"+"))+Tp(n/60|0,"0",2)+Tp(n%60,"0",2)}function hv(t,n){return Tp(t.getUTCDate(),n,2)}function dv(t,n){return Tp(t.getUTCHours(),n,2)}function pv(t,n){return Tp(t.getUTCHours()%12||12,n,2)}function vv(t,n){return Tp(1+Wd.count(pp(t),t),n,3)}function gv(t,n){return Tp(t.getUTCMilliseconds(),n,3)}function yv(t,n){return gv(t,n)+"000"}function _v(t,n){return Tp(t.getUTCMonth()+1,n,2)}function bv(t,n){return Tp(t.getUTCMinutes(),n,2)}function mv(t,n){return Tp(t.getUTCSeconds(),n,2)}function xv(t){var n=t.getUTCDay();return 0===n?7:n}function wv(t,n){return Tp(Kd.count(pp(t)-1,t),n,2)}function Mv(t,n){var e=t.getUTCDay();return t=e>=4||0===e?ep(t):ep.ceil(t),Tp(ep.count(pp(t),t)+(4===pp(t).getUTCDay()),n,2)}function Nv(t){return t.getUTCDay()}function Tv(t,n){return Tp(Jd.count(pp(t)-1,t),n,2)}function Av(t,n){return Tp(t.getUTCFullYear()%100,n,2)}function Sv(t,n){return Tp(t.getUTCFullYear()%1e4,n,4)}function kv(){return"+0000"}function Ev(){return"%"}function Cv(t){return+t}function Pv(t){return Math.floor(+t/1e3)}function zv(n){return mp=bp(n),t.timeFormat=mp.format,t.timeParse=mp.parse,t.utcFormat=mp.utcFormat,t.utcParse=mp.utcParse,mp}zv({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"]});var Rv=Date.prototype.toISOString?function(t){return t.toISOString()}:t.utcFormat("%Y-%m-%dT%H:%M:%S.%LZ");var Dv=+new Date("2000-01-01T00:00:00.000Z")?function(t){var n=new Date(t);return isNaN(n)?null:n}:t.utcParse("%Y-%m-%dT%H:%M:%S.%LZ"),qv=1e3,Lv=60*qv,Uv=60*Lv,Ov=24*Uv,Bv=7*Ov,Fv=30*Ov,Yv=365*Ov;function Iv(t){return new Date(t)}function Hv(t){return t instanceof Date?+t:+new Date(+t)}function jv(t,n,r,i,o,a,u,c,f){var s=Vh(Bh,Bh),l=s.invert,h=s.domain,d=f(".%L"),p=f(":%S"),v=f("%I:%M"),g=f("%I %p"),y=f("%a %d"),_=f("%b %d"),b=f("%B"),m=f("%Y"),x=[[u,1,qv],[u,5,5*qv],[u,15,15*qv],[u,30,30*qv],[a,1,Lv],[a,5,5*Lv],[a,15,15*Lv],[a,30,30*Lv],[o,1,Uv],[o,3,3*Uv],[o,6,6*Uv],[o,12,12*Uv],[i,1,Ov],[i,2,2*Ov],[r,1,Bv],[n,1,Fv],[n,3,3*Fv],[t,1,Yv]];function M(e){return(u(e)=1?Cy:t<=-1?-Cy:Math.asin(t)}function Ry(t){return t.innerRadius}function Dy(t){return t.outerRadius}function qy(t){return t.startAngle}function Ly(t){return t.endAngle}function Uy(t){return t&&t.padAngle}function Oy(t,n,e,r,i,o,a){var u=t-e,c=n-r,f=(a?o:-o)/Sy(u*u+c*c),s=f*c,l=-f*u,h=t+s,d=n+l,p=e+s,v=r+l,g=(h+p)/2,y=(d+v)/2,_=p-h,b=v-d,m=_*_+b*b,x=i-o,w=h*v-p*d,M=(b<0?-1:1)*Sy(Ny(0,x*x*m-w*w)),N=(w*b-_*M)/m,T=(-w*_-b*M)/m,A=(w*b+_*M)/m,S=(-w*_+b*M)/m,k=N-g,E=T-y,C=A-g,P=S-y;return k*k+E*E>C*C+P*P&&(N=A,T=S),{cx:N,cy:T,x01:-s,y01:-l,x11:N*(i/x-1),y11:T*(i/x-1)}}function By(t){this._context=t}function Fy(t){return new By(t)}function Yy(t){return t[0]}function Iy(t){return t[1]}function Hy(){var t=Yy,n=Iy,e=my(!0),r=null,i=Fy,o=null;function a(a){var u,c,f,s=a.length,l=!1;for(null==r&&(o=i(f=no())),u=0;u<=s;++u)!(u=s;--l)u.point(g[l],y[l]);u.lineEnd(),u.areaEnd()}v&&(g[f]=+t(h,f,c),y[f]=+e(h,f,c),u.point(n?+n(h,f,c):g[f],r?+r(h,f,c):y[f]))}if(d)return u=null,d+""||null}function f(){return Hy().defined(i).curve(a).context(o)}return c.x=function(e){return arguments.length?(t="function"==typeof e?e:my(+e),n=null,c):t},c.x0=function(n){return arguments.length?(t="function"==typeof n?n:my(+n),c):t},c.x1=function(t){return arguments.length?(n=null==t?null:"function"==typeof t?t:my(+t),c):n},c.y=function(t){return arguments.length?(e="function"==typeof t?t:my(+t),r=null,c):e},c.y0=function(t){return arguments.length?(e="function"==typeof t?t:my(+t),c):e},c.y1=function(t){return arguments.length?(r=null==t?null:"function"==typeof t?t:my(+t),c):r},c.lineX0=c.lineY0=function(){return f().x(t).y(e)},c.lineY1=function(){return f().x(t).y(r)},c.lineX1=function(){return f().x(n).y(e)},c.defined=function(t){return arguments.length?(i="function"==typeof t?t:my(!!t),c):i},c.curve=function(t){return arguments.length?(a=t,null!=o&&(u=a(o)),c):a},c.context=function(t){return arguments.length?(null==t?o=u=null:u=a(o=t),c):o},c}function Xy(t,n){return nt?1:n>=t?0:NaN}function Vy(t){return t}By.prototype={areaStart:function(){this._line=0},areaEnd:function(){this._line=NaN},lineStart:function(){this._point=0},lineEnd:function(){(this._line||0!==this._line&&1===this._point)&&this._context.closePath(),this._line=1-this._line},point:function(t,n){switch(t=+t,n=+n,this._point){case 0:this._point=1,this._line?this._context.lineTo(t,n):this._context.moveTo(t,n);break;case 1:this._point=2;default:this._context.lineTo(t,n)}}};var Gy=Wy(Fy);function $y(t){this._curve=t}function Wy(t){function n(n){return new $y(t(n))}return n._curve=t,n}function Zy(t){var n=t.curve;return t.angle=t.x,delete t.x,t.radius=t.y,delete t.y,t.curve=function(t){return arguments.length?n(Wy(t)):n()._curve},t}function Qy(){return Zy(Hy().curve(Gy))}function Ky(){var t=jy().curve(Gy),n=t.curve,e=t.lineX0,r=t.lineX1,i=t.lineY0,o=t.lineY1;return t.angle=t.x,delete t.x,t.startAngle=t.x0,delete t.x0,t.endAngle=t.x1,delete t.x1,t.radius=t.y,delete t.y,t.innerRadius=t.y0,delete t.y0,t.outerRadius=t.y1,delete t.y1,t.lineStartAngle=function(){return Zy(e())},delete t.lineX0,t.lineEndAngle=function(){return Zy(r())},delete t.lineX1,t.lineInnerRadius=function(){return Zy(i())},delete t.lineY0,t.lineOuterRadius=function(){return Zy(o())},delete t.lineY1,t.curve=function(t){return arguments.length?n(Wy(t)):n()._curve},t}function Jy(t,n){return[(n=+n)*Math.cos(t-=Math.PI/2),n*Math.sin(t)]}$y.prototype={areaStart:function(){this._curve.areaStart()},areaEnd:function(){this._curve.areaEnd()},lineStart:function(){this._curve.lineStart()},lineEnd:function(){this._curve.lineEnd()},point:function(t,n){this._curve.point(n*Math.sin(t),n*-Math.cos(t))}};var t_=Array.prototype.slice;function n_(t){return t.source}function e_(t){return t.target}function r_(t){var n=n_,e=e_,r=Yy,i=Iy,o=null;function a(){var a,u=t_.call(arguments),c=n.apply(this,u),f=e.apply(this,u);if(o||(o=a=no()),t(o,+r.apply(this,(u[0]=c,u)),+i.apply(this,u),+r.apply(this,(u[0]=f,u)),+i.apply(this,u)),a)return o=null,a+""||null}return a.source=function(t){return arguments.length?(n=t,a):n},a.target=function(t){return arguments.length?(e=t,a):e},a.x=function(t){return arguments.length?(r="function"==typeof t?t:my(+t),a):r},a.y=function(t){return arguments.length?(i="function"==typeof t?t:my(+t),a):i},a.context=function(t){return arguments.length?(o=null==t?null:t,a):o},a}function i_(t,n,e,r,i){t.moveTo(n,e),t.bezierCurveTo(n=(n+r)/2,e,n,i,r,i)}function o_(t,n,e,r,i){t.moveTo(n,e),t.bezierCurveTo(n,e=(e+i)/2,r,e,r,i)}function a_(t,n,e,r,i){var o=Jy(n,e),a=Jy(n,e=(e+i)/2),u=Jy(r,e),c=Jy(r,i);t.moveTo(o[0],o[1]),t.bezierCurveTo(a[0],a[1],u[0],u[1],c[0],c[1])}var u_={draw:function(t,n){var e=Math.sqrt(n/Ey);t.moveTo(e,0),t.arc(0,0,e,0,Py)}},c_={draw:function(t,n){var e=Math.sqrt(n/5)/2;t.moveTo(-3*e,-e),t.lineTo(-e,-e),t.lineTo(-e,-3*e),t.lineTo(e,-3*e),t.lineTo(e,-e),t.lineTo(3*e,-e),t.lineTo(3*e,e),t.lineTo(e,e),t.lineTo(e,3*e),t.lineTo(-e,3*e),t.lineTo(-e,e),t.lineTo(-3*e,e),t.closePath()}},f_=Math.sqrt(1/3),s_=2*f_,l_={draw:function(t,n){var e=Math.sqrt(n/s_),r=e*f_;t.moveTo(0,-e),t.lineTo(r,0),t.lineTo(0,e),t.lineTo(-r,0),t.closePath()}},h_=Math.sin(Ey/10)/Math.sin(7*Ey/10),d_=Math.sin(Py/10)*h_,p_=-Math.cos(Py/10)*h_,v_={draw:function(t,n){var e=Math.sqrt(.8908130915292852*n),r=d_*e,i=p_*e;t.moveTo(0,-e),t.lineTo(r,i);for(var o=1;o<5;++o){var a=Py*o/5,u=Math.cos(a),c=Math.sin(a);t.lineTo(c*e,-u*e),t.lineTo(u*r-c*i,c*r+u*i)}t.closePath()}},g_={draw:function(t,n){var e=Math.sqrt(n),r=-e/2;t.rect(r,r,e,e)}},y_=Math.sqrt(3),__={draw:function(t,n){var e=-Math.sqrt(n/(3*y_));t.moveTo(0,2*e),t.lineTo(-y_*e,-e),t.lineTo(y_*e,-e),t.closePath()}},b_=Math.sqrt(3)/2,m_=1/Math.sqrt(12),x_=3*(m_/2+1),w_={draw:function(t,n){var e=Math.sqrt(n/x_),r=e/2,i=e*m_,o=r,a=e*m_+e,u=-o,c=a;t.moveTo(r,i),t.lineTo(o,a),t.lineTo(u,c),t.lineTo(-.5*r-b_*i,b_*r+-.5*i),t.lineTo(-.5*o-b_*a,b_*o+-.5*a),t.lineTo(-.5*u-b_*c,b_*u+-.5*c),t.lineTo(-.5*r+b_*i,-.5*i-b_*r),t.lineTo(-.5*o+b_*a,-.5*a-b_*o),t.lineTo(-.5*u+b_*c,-.5*c-b_*u),t.closePath()}},M_=[u_,c_,l_,g_,v_,__,w_];function N_(){}function T_(t,n,e){t._context.bezierCurveTo((2*t._x0+t._x1)/3,(2*t._y0+t._y1)/3,(t._x0+2*t._x1)/3,(t._y0+2*t._y1)/3,(t._x0+4*t._x1+n)/6,(t._y0+4*t._y1+e)/6)}function A_(t){this._context=t}function S_(t){this._context=t}function k_(t){this._context=t}function E_(t,n){this._basis=new A_(t),this._beta=n}A_.prototype={areaStart:function(){this._line=0},areaEnd:function(){this._line=NaN},lineStart:function(){this._x0=this._x1=this._y0=this._y1=NaN,this._point=0},lineEnd:function(){switch(this._point){case 3:T_(this,this._x1,this._y1);case 2:this._context.lineTo(this._x1,this._y1)}(this._line||0!==this._line&&1===this._point)&&this._context.closePath(),this._line=1-this._line},point:function(t,n){switch(t=+t,n=+n,this._point){case 0:this._point=1,this._line?this._context.lineTo(t,n):this._context.moveTo(t,n);break;case 1:this._point=2;break;case 2:this._point=3,this._context.lineTo((5*this._x0+this._x1)/6,(5*this._y0+this._y1)/6);default:T_(this,t,n)}this._x0=this._x1,this._x1=t,this._y0=this._y1,this._y1=n}},S_.prototype={areaStart:N_,areaEnd:N_,lineStart:function(){this._x0=this._x1=this._x2=this._x3=this._x4=this._y0=this._y1=this._y2=this._y3=this._y4=NaN,this._point=0},lineEnd:function(){switch(this._point){case 1:this._context.moveTo(this._x2,this._y2),this._context.closePath();break;case 2:this._context.moveTo((this._x2+2*this._x3)/3,(this._y2+2*this._y3)/3),this._context.lineTo((this._x3+2*this._x2)/3,(this._y3+2*this._y2)/3),this._context.closePath();break;case 3:this.point(this._x2,this._y2),this.point(this._x3,this._y3),this.point(this._x4,this._y4)}},point:function(t,n){switch(t=+t,n=+n,this._point){case 0:this._point=1,this._x2=t,this._y2=n;break;case 1:this._point=2,this._x3=t,this._y3=n;break;case 2:this._point=3,this._x4=t,this._y4=n,this._context.moveTo((this._x0+4*this._x1+t)/6,(this._y0+4*this._y1+n)/6);break;default:T_(this,t,n)}this._x0=this._x1,this._x1=t,this._y0=this._y1,this._y1=n}},k_.prototype={areaStart:function(){this._line=0},areaEnd:function(){this._line=NaN},lineStart:function(){this._x0=this._x1=this._y0=this._y1=NaN,this._point=0},lineEnd:function(){(this._line||0!==this._line&&3===this._point)&&this._context.closePath(),this._line=1-this._line},point:function(t,n){switch(t=+t,n=+n,this._point){case 0:this._point=1;break;case 1:this._point=2;break;case 2:this._point=3;var e=(this._x0+4*this._x1+t)/6,r=(this._y0+4*this._y1+n)/6;this._line?this._context.lineTo(e,r):this._context.moveTo(e,r);break;case 3:this._point=4;default:T_(this,t,n)}this._x0=this._x1,this._x1=t,this._y0=this._y1,this._y1=n}},E_.prototype={lineStart:function(){this._x=[],this._y=[],this._basis.lineStart()},lineEnd:function(){var t=this._x,n=this._y,e=t.length-1;if(e>0)for(var r,i=t[0],o=n[0],a=t[e]-i,u=n[e]-o,c=-1;++c<=e;)r=c/e,this._basis.point(this._beta*t[c]+(1-this._beta)*(i+r*a),this._beta*n[c]+(1-this._beta)*(o+r*u));this._x=this._y=null,this._basis.lineEnd()},point:function(t,n){this._x.push(+t),this._y.push(+n)}};var C_=function t(n){function e(t){return 1===n?new A_(t):new E_(t,n)}return e.beta=function(n){return t(+n)},e}(.85);function P_(t,n,e){t._context.bezierCurveTo(t._x1+t._k*(t._x2-t._x0),t._y1+t._k*(t._y2-t._y0),t._x2+t._k*(t._x1-n),t._y2+t._k*(t._y1-e),t._x2,t._y2)}function z_(t,n){this._context=t,this._k=(1-n)/6}z_.prototype={areaStart:function(){this._line=0},areaEnd:function(){this._line=NaN},lineStart:function(){this._x0=this._x1=this._x2=this._y0=this._y1=this._y2=NaN,this._point=0},lineEnd:function(){switch(this._point){case 2:this._context.lineTo(this._x2,this._y2);break;case 3:P_(this,this._x1,this._y1)}(this._line||0!==this._line&&1===this._point)&&this._context.closePath(),this._line=1-this._line},point:function(t,n){switch(t=+t,n=+n,this._point){case 0:this._point=1,this._line?this._context.lineTo(t,n):this._context.moveTo(t,n);break;case 1:this._point=2,this._x1=t,this._y1=n;break;case 2:this._point=3;default:P_(this,t,n)}this._x0=this._x1,this._x1=this._x2,this._x2=t,this._y0=this._y1,this._y1=this._y2,this._y2=n}};var R_=function t(n){function e(t){return new z_(t,n)}return e.tension=function(n){return t(+n)},e}(0);function D_(t,n){this._context=t,this._k=(1-n)/6}D_.prototype={areaStart:N_,areaEnd:N_,lineStart:function(){this._x0=this._x1=this._x2=this._x3=this._x4=this._x5=this._y0=this._y1=this._y2=this._y3=this._y4=this._y5=NaN,this._point=0},lineEnd:function(){switch(this._point){case 1:this._context.moveTo(this._x3,this._y3),this._context.closePath();break;case 2:this._context.lineTo(this._x3,this._y3),this._context.closePath();break;case 3:this.point(this._x3,this._y3),this.point(this._x4,this._y4),this.point(this._x5,this._y5)}},point:function(t,n){switch(t=+t,n=+n,this._point){case 0:this._point=1,this._x3=t,this._y3=n;break;case 1:this._point=2,this._context.moveTo(this._x4=t,this._y4=n);break;case 2:this._point=3,this._x5=t,this._y5=n;break;default:P_(this,t,n)}this._x0=this._x1,this._x1=this._x2,this._x2=t,this._y0=this._y1,this._y1=this._y2,this._y2=n}};var q_=function t(n){function e(t){return new D_(t,n)}return e.tension=function(n){return t(+n)},e}(0);function L_(t,n){this._context=t,this._k=(1-n)/6}L_.prototype={areaStart:function(){this._line=0},areaEnd:function(){this._line=NaN},lineStart:function(){this._x0=this._x1=this._x2=this._y0=this._y1=this._y2=NaN,this._point=0},lineEnd:function(){(this._line||0!==this._line&&3===this._point)&&this._context.closePath(),this._line=1-this._line},point:function(t,n){switch(t=+t,n=+n,this._point){case 0:this._point=1;break;case 1:this._point=2;break;case 2:this._point=3,this._line?this._context.lineTo(this._x2,this._y2):this._context.moveTo(this._x2,this._y2);break;case 3:this._point=4;default:P_(this,t,n)}this._x0=this._x1,this._x1=this._x2,this._x2=t,this._y0=this._y1,this._y1=this._y2,this._y2=n}};var U_=function t(n){function e(t){return new L_(t,n)}return e.tension=function(n){return t(+n)},e}(0);function O_(t,n,e){var r=t._x1,i=t._y1,o=t._x2,a=t._y2;if(t._l01_a>ky){var u=2*t._l01_2a+3*t._l01_a*t._l12_a+t._l12_2a,c=3*t._l01_a*(t._l01_a+t._l12_a);r=(r*u-t._x0*t._l12_2a+t._x2*t._l01_2a)/c,i=(i*u-t._y0*t._l12_2a+t._y2*t._l01_2a)/c}if(t._l23_a>ky){var f=2*t._l23_2a+3*t._l23_a*t._l12_a+t._l12_2a,s=3*t._l23_a*(t._l23_a+t._l12_a);o=(o*f+t._x1*t._l23_2a-n*t._l12_2a)/s,a=(a*f+t._y1*t._l23_2a-e*t._l12_2a)/s}t._context.bezierCurveTo(r,i,o,a,t._x2,t._y2)}function B_(t,n){this._context=t,this._alpha=n}B_.prototype={areaStart:function(){this._line=0},areaEnd:function(){this._line=NaN},lineStart:function(){this._x0=this._x1=this._x2=this._y0=this._y1=this._y2=NaN,this._l01_a=this._l12_a=this._l23_a=this._l01_2a=this._l12_2a=this._l23_2a=this._point=0},lineEnd:function(){switch(this._point){case 2:this._context.lineTo(this._x2,this._y2);break;case 3:this.point(this._x2,this._y2)}(this._line||0!==this._line&&1===this._point)&&this._context.closePath(),this._line=1-this._line},point:function(t,n){if(t=+t,n=+n,this._point){var e=this._x2-t,r=this._y2-n;this._l23_a=Math.sqrt(this._l23_2a=Math.pow(e*e+r*r,this._alpha))}switch(this._point){case 0:this._point=1,this._line?this._context.lineTo(t,n):this._context.moveTo(t,n);break;case 1:this._point=2;break;case 2:this._point=3;default:O_(this,t,n)}this._l01_a=this._l12_a,this._l12_a=this._l23_a,this._l01_2a=this._l12_2a,this._l12_2a=this._l23_2a,this._x0=this._x1,this._x1=this._x2,this._x2=t,this._y0=this._y1,this._y1=this._y2,this._y2=n}};var F_=function t(n){function e(t){return n?new B_(t,n):new z_(t,0)}return e.alpha=function(n){return t(+n)},e}(.5);function Y_(t,n){this._context=t,this._alpha=n}Y_.prototype={areaStart:N_,areaEnd:N_,lineStart:function(){this._x0=this._x1=this._x2=this._x3=this._x4=this._x5=this._y0=this._y1=this._y2=this._y3=this._y4=this._y5=NaN,this._l01_a=this._l12_a=this._l23_a=this._l01_2a=this._l12_2a=this._l23_2a=this._point=0},lineEnd:function(){switch(this._point){case 1:this._context.moveTo(this._x3,this._y3),this._context.closePath();break;case 2:this._context.lineTo(this._x3,this._y3),this._context.closePath();break;case 3:this.point(this._x3,this._y3),this.point(this._x4,this._y4),this.point(this._x5,this._y5)}},point:function(t,n){if(t=+t,n=+n,this._point){var e=this._x2-t,r=this._y2-n;this._l23_a=Math.sqrt(this._l23_2a=Math.pow(e*e+r*r,this._alpha))}switch(this._point){case 0:this._point=1,this._x3=t,this._y3=n;break;case 1:this._point=2,this._context.moveTo(this._x4=t,this._y4=n);break;case 2:this._point=3,this._x5=t,this._y5=n;break;default:O_(this,t,n)}this._l01_a=this._l12_a,this._l12_a=this._l23_a,this._l01_2a=this._l12_2a,this._l12_2a=this._l23_2a,this._x0=this._x1,this._x1=this._x2,this._x2=t,this._y0=this._y1,this._y1=this._y2,this._y2=n}};var I_=function t(n){function e(t){return n?new Y_(t,n):new D_(t,0)}return e.alpha=function(n){return t(+n)},e}(.5);function H_(t,n){this._context=t,this._alpha=n}H_.prototype={areaStart:function(){this._line=0},areaEnd:function(){this._line=NaN},lineStart:function(){this._x0=this._x1=this._x2=this._y0=this._y1=this._y2=NaN,this._l01_a=this._l12_a=this._l23_a=this._l01_2a=this._l12_2a=this._l23_2a=this._point=0},lineEnd:function(){(this._line||0!==this._line&&3===this._point)&&this._context.closePath(),this._line=1-this._line},point:function(t,n){if(t=+t,n=+n,this._point){var e=this._x2-t,r=this._y2-n;this._l23_a=Math.sqrt(this._l23_2a=Math.pow(e*e+r*r,this._alpha))}switch(this._point){case 0:this._point=1;break;case 1:this._point=2;break;case 2:this._point=3,this._line?this._context.lineTo(this._x2,this._y2):this._context.moveTo(this._x2,this._y2);break;case 3:this._point=4;default:O_(this,t,n)}this._l01_a=this._l12_a,this._l12_a=this._l23_a,this._l01_2a=this._l12_2a,this._l12_2a=this._l23_2a,this._x0=this._x1,this._x1=this._x2,this._x2=t,this._y0=this._y1,this._y1=this._y2,this._y2=n}};var j_=function t(n){function e(t){return n?new H_(t,n):new L_(t,0)}return e.alpha=function(n){return t(+n)},e}(.5);function X_(t){this._context=t}function V_(t){return t<0?-1:1}function G_(t,n,e){var r=t._x1-t._x0,i=n-t._x1,o=(t._y1-t._y0)/(r||i<0&&-0),a=(e-t._y1)/(i||r<0&&-0),u=(o*i+a*r)/(r+i);return(V_(o)+V_(a))*Math.min(Math.abs(o),Math.abs(a),.5*Math.abs(u))||0}function $_(t,n){var e=t._x1-t._x0;return e?(3*(t._y1-t._y0)/e-n)/2:n}function W_(t,n,e){var r=t._x0,i=t._y0,o=t._x1,a=t._y1,u=(o-r)/3;t._context.bezierCurveTo(r+u,i+u*n,o-u,a-u*e,o,a)}function Z_(t){this._context=t}function Q_(t){this._context=new K_(t)}function K_(t){this._context=t}function J_(t){this._context=t}function tb(t){var n,e,r=t.length-1,i=new Array(r),o=new Array(r),a=new Array(r);for(i[0]=0,o[0]=2,a[0]=t[0]+2*t[1],n=1;n=0;--n)i[n]=(a[n]-i[n+1])/o[n];for(o[r-1]=(t[r]+i[r-1])/2,n=0;n1)for(var e,r,i,o=1,a=t[n[0]],u=a.length;o=0;)e[n]=n;return e}function ib(t,n){return t[n]}function ob(t){var n=t.map(ab);return rb(t).sort(function(t,e){return n[t]-n[e]})}function ab(t){for(var n,e=-1,r=0,i=t.length,o=-1/0;++eo&&(o=n,r=e);return r}function ub(t){var n=t.map(cb);return rb(t).sort(function(t,e){return n[t]-n[e]})}function cb(t){for(var n,e=0,r=-1,i=t.length;++r0)){if(o/=h,h<0){if(o0){if(o>l)return;o>s&&(s=o)}if(o=r-c,h||!(o<0)){if(o/=h,h<0){if(o>l)return;o>s&&(s=o)}else if(h>0){if(o0)){if(o/=d,d<0){if(o0){if(o>l)return;o>s&&(s=o)}if(o=i-f,d||!(o<0)){if(o/=d,d<0){if(o>l)return;o>s&&(s=o)}else if(d>0){if(o0||l<1)||(s>0&&(t[0]=[c+s*h,f+s*d]),l<1&&(t[1]=[c+l*h,f+l*d]),!0)}}}}}function xb(t,n,e,r,i){var o=t[1];if(o)return!0;var a,u,c=t[0],f=t.left,s=t.right,l=f[0],h=f[1],d=s[0],p=s[1],v=(l+d)/2,g=(h+p)/2;if(p===h){if(v=r)return;if(l>d){if(c){if(c[1]>=i)return}else c=[v,e];o=[v,i]}else{if(c){if(c[1]1)if(l>d){if(c){if(c[1]>=i)return}else c=[(e-u)/a,e];o=[(i-u)/a,i]}else{if(c){if(c[1]=r)return}else c=[n,a*n+u];o=[r,a*r+u]}else{if(c){if(c[0]=0&&(this._t=1-this._t,this._line=1-this._line)},point:function(t,n){switch(t=+t,n=+n,this._point){case 0:this._point=1,this._line?this._context.lineTo(t,n):this._context.moveTo(t,n);break;case 1:this._point=2;default:if(this._t<=0)this._context.lineTo(this._x,n),this._context.lineTo(t,n);else{var e=this._x*(1-this._t)+t*this._t;this._context.lineTo(e,this._y),this._context.lineTo(e,n)}}this._x=t,this._y=n}},hb.prototype={constructor:hb,insert:function(t,n){var e,r,i;if(t){if(n.P=t,n.N=t.N,t.N&&(t.N.P=n),t.N=n,t.R){for(t=t.R;t.L;)t=t.L;t.L=n}else t.R=n;e=t}else this._?(t=gb(this._),n.P=null,n.N=t,t.P=t.L=n,e=t):(n.P=n.N=null,this._=n,e=null);for(n.L=n.R=null,n.U=e,n.C=!0,t=n;e&&e.C;)e===(r=e.U).L?(i=r.R)&&i.C?(e.C=i.C=!1,r.C=!0,t=r):(t===e.R&&(pb(this,e),e=(t=e).U),e.C=!1,r.C=!0,vb(this,r)):(i=r.L)&&i.C?(e.C=i.C=!1,r.C=!0,t=r):(t===e.L&&(vb(this,e),e=(t=e).U),e.C=!1,r.C=!0,pb(this,r)),e=t.U;this._.C=!1},remove:function(t){t.N&&(t.N.P=t.P),t.P&&(t.P.N=t.N),t.N=t.P=null;var n,e,r,i=t.U,o=t.L,a=t.R;if(e=o?a?gb(a):o:a,i?i.L===t?i.L=e:i.R=e:this._=e,o&&a?(r=e.C,e.C=t.C,e.L=o,o.U=e,e!==a?(i=e.U,e.U=t.U,t=e.R,i.L=t,e.R=a,a.U=e):(e.U=i,i=e,t=e.R)):(r=t.C,t=e),t&&(t.U=i),!r)if(t&&t.C)t.C=!1;else{do{if(t===this._)break;if(t===i.L){if((n=i.R).C&&(n.C=!1,i.C=!0,pb(this,i),n=i.R),n.L&&n.L.C||n.R&&n.R.C){n.R&&n.R.C||(n.L.C=!1,n.C=!0,vb(this,n),n=i.R),n.C=i.C,i.C=n.R.C=!1,pb(this,i),t=this._;break}}else if((n=i.L).C&&(n.C=!1,i.C=!0,vb(this,i),n=i.L),n.L&&n.L.C||n.R&&n.R.C){n.L&&n.L.C||(n.R.C=!1,n.C=!0,pb(this,n),n=i.L),n.C=i.C,i.C=n.L.C=!1,vb(this,i),t=this._;break}n.C=!0,t=i,i=i.U}while(!t.C);t&&(t.C=!1)}}};var Tb,Ab=[];function Sb(){db(this),this.x=this.y=this.arc=this.site=this.cy=null}function kb(t){var n=t.P,e=t.N;if(n&&e){var r=n.site,i=t.site,o=e.site;if(r!==o){var a=i[0],u=i[1],c=r[0]-a,f=r[1]-u,s=o[0]-a,l=o[1]-u,h=2*(c*l-f*s);if(!(h>=-Hb)){var d=c*c+f*f,p=s*s+l*l,v=(l*d-f*p)/h,g=(c*p-s*d)/h,y=Ab.pop()||new Sb;y.arc=t,y.site=i,y.x=v+a,y.y=(y.cy=g+u)+Math.sqrt(v*v+g*g),t.circle=y;for(var _=null,b=Fb._;b;)if(y.yIb)u=u.L;else{if(!((i=o-Ub(u,a))>Ib)){r>-Ib?(n=u.P,e=u):i>-Ib?(n=u,e=u.N):n=e=u;break}if(!u.R){n=u;break}u=u.R}!function(t){Bb[t.index]={site:t,halfedges:[]}}(t);var c=zb(t);if(Ob.insert(n,c),n||e){if(n===e)return Eb(n),e=zb(n.site),Ob.insert(c,e),c.edge=e.edge=yb(n.site,c.site),kb(n),void kb(e);if(e){Eb(n),Eb(e);var f=n.site,s=f[0],l=f[1],h=t[0]-s,d=t[1]-l,p=e.site,v=p[0]-s,g=p[1]-l,y=2*(h*g-d*v),_=h*h+d*d,b=v*v+g*g,m=[(g*_-d*b)/y+s,(h*b-v*_)/y+l];bb(e.edge,f,p,m),c.edge=yb(f,t,null,m),e.edge=yb(t,p,null,m),kb(n),kb(e)}else c.edge=yb(n.site,c.site)}}function Lb(t,n){var e=t.site,r=e[0],i=e[1],o=i-n;if(!o)return r;var a=t.P;if(!a)return-1/0;var u=(e=a.site)[0],c=e[1],f=c-n;if(!f)return u;var s=u-r,l=1/o-1/f,h=s/f;return l?(-h+Math.sqrt(h*h-2*l*(s*s/(-2*f)-c+f/2+i-o/2)))/l+r:(r+u)/2}function Ub(t,n){var e=t.N;if(e)return Lb(e,n);var r=t.site;return r[1]===n?r[0]:1/0}var Ob,Bb,Fb,Yb,Ib=1e-6,Hb=1e-12;function jb(t,n,e){return(t[0]-e[0])*(n[1]-t[1])-(t[0]-n[0])*(e[1]-t[1])}function Xb(t,n){return n[1]-t[1]||n[0]-t[0]}function Vb(t,n){var e,r,i,o=t.sort(Xb).pop();for(Yb=[],Bb=new Array(t.length),Ob=new hb,Fb=new hb;;)if(i=Tb,o&&(!i||o[1]Ib||Math.abs(i[0][1]-i[1][1])>Ib)||delete Yb[o]}(a,u,c,f),function(t,n,e,r){var i,o,a,u,c,f,s,l,h,d,p,v,g=Bb.length,y=!0;for(i=0;iIb||Math.abs(v-h)>Ib)&&(c.splice(u,0,Yb.push(_b(a,d,Math.abs(p-t)Ib?[t,Math.abs(l-t)Ib?[Math.abs(h-r)Ib?[e,Math.abs(l-e)Ib?[Math.abs(h-n)=u)return null;var c=t-i.site[0],f=n-i.site[1],s=c*c+f*f;do{i=o.cells[r=a],a=null,i.halfedges.forEach(function(e){var r=o.edges[e],u=r.left;if(u!==i.site&&u||(u=r.right)){var c=t-u[0],f=n-u[1],l=c*c+f*f;lr?(r+i)/2:Math.min(0,r)||Math.max(0,i),a>o?(o+a)/2:Math.min(0,o)||Math.max(0,a))}Qb.prototype=Wb.prototype,t.FormatSpecifier=Ba,t.active=function(t,n){var e,r,i=t.__transition;if(i)for(r in n=null==n?null:n+"",i)if((e=i[r]).state>xr&&e.name===n)return new Ur([[t]],yi,n,+r);return null},t.arc=function(){var t=Ry,n=Dy,e=my(0),r=null,i=qy,o=Ly,a=Uy,u=null;function c(){var c,f,s=+t.apply(this,arguments),l=+n.apply(this,arguments),h=i.apply(this,arguments)-Cy,d=o.apply(this,arguments)-Cy,p=xy(d-h),v=d>h;if(u||(u=c=no()),lky)if(p>Py-ky)u.moveTo(l*My(h),l*Ay(h)),u.arc(0,0,l,h,d,!v),s>ky&&(u.moveTo(s*My(d),s*Ay(d)),u.arc(0,0,s,d,h,v));else{var g,y,_=h,b=d,m=h,x=d,w=p,M=p,N=a.apply(this,arguments)/2,T=N>ky&&(r?+r.apply(this,arguments):Sy(s*s+l*l)),A=Ty(xy(l-s)/2,+e.apply(this,arguments)),S=A,k=A;if(T>ky){var E=zy(T/s*Ay(N)),C=zy(T/l*Ay(N));(w-=2*E)>ky?(m+=E*=v?1:-1,x-=E):(w=0,m=x=(h+d)/2),(M-=2*C)>ky?(_+=C*=v?1:-1,b-=C):(M=0,_=b=(h+d)/2)}var P=l*My(_),z=l*Ay(_),R=s*My(x),D=s*Ay(x);if(A>ky){var q,L=l*My(b),U=l*Ay(b),O=s*My(m),B=s*Ay(m);if(p1?0:t<-1?Ey:Math.acos(t)}((F*I+Y*H)/(Sy(F*F+Y*Y)*Sy(I*I+H*H)))/2),X=Sy(q[0]*q[0]+q[1]*q[1]);S=Ty(A,(s-X)/(j-1)),k=Ty(A,(l-X)/(j+1))}}M>ky?k>ky?(g=Oy(O,B,P,z,l,k,v),y=Oy(L,U,R,D,l,k,v),u.moveTo(g.cx+g.x01,g.cy+g.y01),kky&&w>ky?S>ky?(g=Oy(R,D,L,U,s,-S,v),y=Oy(P,z,O,B,s,-S,v),u.lineTo(g.cx+g.x01,g.cy+g.y01),S>a,f=i+2*u>>a,s=bo(20);function l(r){var i=new Float32Array(c*f),l=new Float32Array(c*f);r.forEach(function(r,o,s){var l=+t(r,o,s)+u>>a,h=+n(r,o,s)+u>>a,d=+e(r,o,s);l>=0&&l=0&&h>a),So({width:c,height:f,data:l},{width:c,height:f,data:i},o>>a),Ao({width:c,height:f,data:i},{width:c,height:f,data:l},o>>a),So({width:c,height:f,data:l},{width:c,height:f,data:i},o>>a),Ao({width:c,height:f,data:i},{width:c,height:f,data:l},o>>a),So({width:c,height:f,data:l},{width:c,height:f,data:i},o>>a);var d=s(i);if(!Array.isArray(d)){var p=T(i);d=w(0,p,d),(d=g(0,Math.floor(p/d)*d,d)).shift()}return To().thresholds(d).size([c,f])(i).map(h)}function h(t){return t.value*=Math.pow(2,-2*a),t.coordinates.forEach(d),t}function d(t){t.forEach(p)}function p(t){t.forEach(v)}function v(t){t[0]=t[0]*Math.pow(2,a)-u,t[1]=t[1]*Math.pow(2,a)-u}function y(){return c=r+2*(u=3*o)>>a,f=i+2*u>>a,l}return l.x=function(n){return arguments.length?(t="function"==typeof n?n:bo(+n),l):t},l.y=function(t){return arguments.length?(n="function"==typeof t?t:bo(+t),l):n},l.weight=function(t){return arguments.length?(e="function"==typeof t?t:bo(+t),l):e},l.size=function(t){if(!arguments.length)return[r,i];var n=Math.ceil(t[0]),e=Math.ceil(t[1]);if(!(n>=0||n>=0))throw new Error("invalid size");return r=n,i=e,y()},l.cellSize=function(t){if(!arguments.length)return 1<=1))throw new Error("invalid cell size");return a=Math.floor(Math.log(t)/Math.LN2),y()},l.thresholds=function(t){return arguments.length?(s="function"==typeof t?t:Array.isArray(t)?bo(yo.call(t)):bo(t),l):s},l.bandwidth=function(t){if(!arguments.length)return Math.sqrt(o*(o+1));if(!((t=+t)>=0))throw new Error("invalid bandwidth");return o=Math.round((Math.sqrt(4*t*t+1)-1)/2),y()},l},t.contours=To,t.create=function(t){return Rt(Z(t).call(document.documentElement))},t.creator=Z,t.cross=function(t,n,e){var r,i,o,u,c=t.length,f=n.length,s=new Array(c*f);for(null==e&&(e=a),r=o=0;rt?1:n>=t?0:NaN},t.deviation=f,t.dispatch=I,t.drag=function(){var n,e,r,i,o=Gt,a=$t,u=Wt,c=Zt,f={},s=I("start","drag","end"),l=0,h=0;function d(t){t.on("mousedown.drag",p).filter(c).on("touchstart.drag",y).on("touchmove.drag",_).on("touchend.drag touchcancel.drag",b).style("touch-action","none").style("-webkit-tap-highlight-color","rgba(0,0,0,0)")}function p(){if(!i&&o.apply(this,arguments)){var u=m("mouse",a.apply(this,arguments),Bt,this,arguments);u&&(Rt(t.event.view).on("mousemove.drag",v,!0).on("mouseup.drag",g,!0),Ht(t.event.view),Yt(),r=!1,n=t.event.clientX,e=t.event.clientY,u("start"))}}function v(){if(It(),!r){var i=t.event.clientX-n,o=t.event.clientY-e;r=i*i+o*o>h}f.mouse("drag")}function g(){Rt(t.event.view).on("mousemove.drag mouseup.drag",null),jt(t.event.view,r),It(),f.mouse("end")}function y(){if(o.apply(this,arguments)){var n,e,r=t.event.changedTouches,i=a.apply(this,arguments),u=r.length;for(n=0;nc+d||if+d||ou.index){var p=c-a.x-a.vx,v=f-a.y-a.vy,g=p*p+v*v;gt.r&&(t.r=t[n].r)}function u(){if(n){var r,i,o=n.length;for(e=new Array(o),r=0;r=a)){(t.data!==n||t.next)&&(0===s&&(d+=(s=ya())*s),0===l&&(d+=(l=ya())*l),d1?(null==e?u.remove(t):u.set(t,d(e)),n):u.get(t)},find:function(n,e,r){var i,o,a,u,c,f=0,s=t.length;for(null==r?r=1/0:r*=r,f=0;f1?(f.on(t,e),n):f.on(t)}}},t.forceX=function(t){var n,e,r,i=ga(.1);function o(t){for(var i,o=0,a=n.length;o=.12&&i<.234&&r>=-.425&&r<-.214?u:i>=.166&&i<.234&&r>=-.214&&r<-.115?c:a).invert(t)},s.stream=function(e){return t&&n===e?t:(r=[a.stream(n=e),u.stream(e),c.stream(e)],i=r.length,t={point:function(t,n){for(var e=-1;++ePc(r[0],r[1])&&(r[1]=i[1]),Pc(i[0],r[1])>Pc(r[0],r[1])&&(r[0]=i[0])):o.push(r=i);for(a=-1/0,n=0,r=o[e=o.length-1];n<=e;r=i,++n)i=o[n],(u=Pc(r[1],i[0]))>a&&(a=u,Zu=i[0],Ku=r[1])}return ic=oc=null,Zu===1/0||Qu===1/0?[[NaN,NaN],[NaN,NaN]]:[[Zu,Qu],[Ku,Ju]]},t.geoCentroid=function(t){ac=uc=cc=fc=sc=lc=hc=dc=pc=vc=gc=0,Cu(t,Dc);var n=pc,e=vc,r=gc,i=n*n+e*e+r*r;return i2?t[2]+90:90]):[(t=e())[0],t[1],t[2]-90]},e([0,0,90]).scale(159.155)},t.geoTransverseMercatorRaw=Ml,t.gray=function(t,n){return new Bn(t,0,0,null==n?1:n)},t.hcl=Xn,t.hierarchy=kl,t.histogram=function(){var t=v,n=s,e=M;function r(r){var o,a,u=r.length,c=new Array(u);for(o=0;ol;)h.pop(),--d;var p,v=new Array(d+1);for(o=0;o<=d;++o)(p=v[o]=[]).x0=o>0?h[o-1]:s,p.x1=o1)&&(t-=Math.floor(t));var n=Math.abs(t-.5);return ly.h=360*t-100,ly.s=1.5-1.5*n,ly.l=.8-.9*n,ly+""},t.interpolateRdBu=yg,t.interpolateRdGy=bg,t.interpolateRdPu=Yg,t.interpolateRdYlBu=xg,t.interpolateRdYlGn=Mg,t.interpolateReds=oy,t.interpolateRgb=he,t.interpolateRgbBasis=pe,t.interpolateRgbBasisClosed=ve,t.interpolateRound=Ae,t.interpolateSinebow=function(t){var n;return t=(.5-t)*Math.PI,hy.r=255*(n=Math.sin(t))*n,hy.g=255*(n=Math.sin(t+dy))*n,hy.b=255*(n=Math.sin(t+py))*n,hy+""},t.interpolateSpectral=Tg,t.interpolateString=Ne,t.interpolateTransformCss=qe,t.interpolateTransformSvg=Le,t.interpolateTurbo=function(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-14825.05*t)))))))+", "+Math.max(0,Math.min(255,Math.round(23.31+t*(557.33+t*(1225.33-t*(3574.96-t*(1073.77+707.56*t)))))))+", "+Math.max(0,Math.min(255,Math.round(27.2+t*(3211.1-t*(15327.97-t*(27814-t*(22569.18-6838.66*t)))))))+")"},t.interpolateViridis=gy,t.interpolateWarm=fy,t.interpolateYlGn=Xg,t.interpolateYlGnBu=Hg,t.interpolateYlOrBr=Gg,t.interpolateYlOrRd=Wg,t.interpolateZoom=Ie,t.interrupt=Pr,t.interval=function(t,n,e){var r=new lr,i=n;return null==n?(r.restart(t,n,e),r):(n=+n,e=null==e?fr():+e,r.restart(function o(a){a+=i,r.restart(o,i+=n,e),t(a)},n,e),r)},t.isoFormat=Rv,t.isoParse=Dv,t.json=function(t,n){return fetch(t,n).then(la)},t.keys=function(t){var n=[];for(var e in t)n.push(e);return n},t.lab=On,t.lch=function(t,n,e,r){return 1===arguments.length?jn(t):new Vn(e,n,t,null==r?1:r)},t.line=Hy,t.lineRadial=Qy,t.linkHorizontal=function(){return r_(i_)},t.linkRadial=function(){var t=r_(a_);return t.angle=t.x,delete t.x,t.radius=t.y,delete t.y,t},t.linkVertical=function(){return r_(o_)},t.local=qt,t.map=co,t.matcher=nt,t.max=T,t.mean=function(t,n){var e,r=t.length,i=r,o=-1,a=0;if(null==n)for(;++o=r.length)return null!=t&&e.sort(t),null!=n?n(e):e;for(var c,f,s,l=-1,h=e.length,d=r[i++],p=co(),v=a();++lr.length)return e;var a,u=i[o-1];return null!=n&&o>=r.length?a=e.entries():(a=[],e.each(function(n,e){a.push({key:e,values:t(n,o)})})),null!=u?a.sort(function(t,n){return u(t.key,n.key)}):a}(o(t,0,lo,ho),0)},key:function(t){return r.push(t),e},sortKeys:function(t){return i[r.length-1]=t,e},sortValues:function(n){return t=n,e},rollup:function(t){return n=t,e}}},t.now=fr,t.pack=function(){var t=null,n=1,e=1,r=Wl;function i(i){return i.x=n/2,i.y=e/2,t?i.eachBefore(Kl(t)).eachAfter(Jl(r,.5)).eachBefore(th(1)):i.eachBefore(Kl(Ql)).eachAfter(Jl(Wl,1)).eachAfter(Jl(r,i.r/Math.min(n,e))).eachBefore(th(Math.min(n,e)/(2*i.r))),i}return i.radius=function(n){return arguments.length?(t=Gl(n),i):t},i.size=function(t){return arguments.length?(n=+t[0],e=+t[1],i):[n,e]},i.padding=function(t){return arguments.length?(r="function"==typeof t?t:Zl(+t),i):r},i},t.packEnclose=Dl,t.packSiblings=function(t){return Vl(t),t},t.pairs=function(t,n){null==n&&(n=a);for(var e=0,r=t.length-1,i=t[0],o=new Array(r<0?0:r);e0&&(d+=l);for(null!=n?p.sort(function(t,e){return n(v[t],v[e])}):null!=e&&p.sort(function(t,n){return e(a[t],a[n])}),u=0,f=d?(y-h*b)/d:0;u0?l*f:0)+b,v[c]={data:a[c],index:u,value:l,startAngle:g,endAngle:s,padAngle:_};return v}return a.value=function(n){return arguments.length?(t="function"==typeof n?n:my(+n),a):t},a.sortValues=function(t){return arguments.length?(n=t,e=null,a):n},a.sort=function(t){return arguments.length?(e=t,n=null,a):e},a.startAngle=function(t){return arguments.length?(r="function"==typeof t?t:my(+t),a):r},a.endAngle=function(t){return arguments.length?(i="function"==typeof t?t:my(+t),a):i},a.padAngle=function(t){return arguments.length?(o="function"==typeof t?t:my(+t),a):o},a},t.piecewise=function(t,n){for(var e=0,r=n.length-1,i=n[0],o=new Array(r<0?0:r);eu!=f>u&&a<(c-e)*(u-r)/(f-r)+e&&(s=!s),c=e,f=r;return s},t.polygonHull=function(t){if((e=t.length)<3)return null;var n,e,r=new Array(e),i=new Array(e);for(n=0;n=0;--n)f.push(t[r[o[n]][2]]);for(n=+u;n0?a[n-1]:r[0],n=o?[a[o-1],r]:[a[n-1],a[n]]},c.unknown=function(t){return arguments.length?(n=t,c):c},c.thresholds=function(){return a.slice()},c.copy=function(){return t().domain([e,r]).range(u).unknown(n)},Eh.apply($h(c),arguments)},t.scaleSequential=function t(){var n=$h(Xv()(Bh));return n.copy=function(){return Vv(n,t())},Ch.apply(n,arguments)},t.scaleSequentialLog=function t(){var n=ed(Xv()).domain([1,10]);return n.copy=function(){return Vv(n,t()).base(n.base())},Ch.apply(n,arguments)},t.scaleSequentialPow=Gv,t.scaleSequentialQuantile=function t(){var e=[],r=Bh;function o(t){if(!isNaN(t=+t))return r((i(e,t)-1)/(e.length-1))}return o.domain=function(t){if(!arguments.length)return e.slice();e=[];for(var r,i=0,a=t.length;i0)for(var e,r,i,o,a,u,c=0,f=t[n[0]].length;c0?(r[0]=o,r[1]=o+=i):i<0?(r[1]=a,r[0]=a+=i):(r[0]=0,r[1]=i)},t.stackOffsetExpand=function(t,n){if((r=t.length)>0){for(var e,r,i,o=0,a=t[0].length;o0){for(var e,r=0,i=t[n[0]],o=i.length;r0&&(r=(e=t[n[0]]).length)>0){for(var e,r,i,o=0,a=1;a0)throw new Error("cycle");return o}return e.id=function(n){return arguments.length?(t=$l(n),e):t},e.parentId=function(t){return arguments.length?(n=$l(t),e):n},e},t.style=ft,t.sum=function(t,n){var e,r=t.length,i=-1,o=0;if(null==n)for(;++i=0;--i)u.push(e=n.children[i]=new dh(r[i],i)),e.parent=n;return(a.parent=new dh(null,0)).children=[a],a}(i);if(c.eachAfter(o),c.parent.m=-c.z,c.eachBefore(a),r)i.eachBefore(u);else{var f=i,s=i,l=i;i.eachBefore(function(t){t.xs.x&&(s=t),t.depth>l.depth&&(l=t)});var h=f===s?1:t(f,s)/2,d=h-f.x,p=n/(s.x+h+d),v=e/(l.depth||1);i.eachBefore(function(t){t.x=(t.x+d)*p,t.y=t.depth*v})}return i}function o(n){var e=n.children,r=n.parent.children,i=n.i?r[n.i-1]:null;if(e){!function(t){for(var n,e=0,r=0,i=t.children,o=i.length;--o>=0;)(n=i[o]).z+=e,n.m+=e,e+=n.s+(r+=n.c)}(n);var o=(e[0].z+e[e.length-1].z)/2;i?(n.z=i.z+t(n._,i._),n.m=n.z-o):n.z=o}else i&&(n.z=i.z+t(n._,i._));n.parent.A=function(n,e,r){if(e){for(var i,o=n,a=n,u=e,c=o.parent.children[0],f=o.m,s=a.m,l=u.m,h=c.m;u=sh(u),o=fh(o),u&&o;)c=fh(c),(a=sh(a)).a=n,(i=u.z+l-o.z-f+t(u._,o._))>0&&(lh(hh(u,n,r),n,i),f+=i,s+=i),l+=u.m,f+=o.m,h+=c.m,s+=a.m;u&&!sh(a)&&(a.t=u,a.m+=l-s),o&&!fh(c)&&(c.t=o,c.m+=f-h,r=n)}return r}(n,i,n.parent.A||r[0])}function a(t){t._.x=t.z+t.parent.m,t.m+=t.parent.m}function u(t){t.x*=n,t.y=t.depth*e}return i.separation=function(n){return arguments.length?(t=n,i):t},i.size=function(t){return arguments.length?(r=!1,n=+t[0],e=+t[1],i):r?null:[n,e]},i.nodeSize=function(t){return arguments.length?(r=!0,n=+t[0],e=+t[1],i):r?[n,e]:null},i},t.treemap=function(){var t=yh,n=!1,e=1,r=1,i=[0],o=Wl,a=Wl,u=Wl,c=Wl,f=Wl;function s(t){return t.x0=t.y0=0,t.x1=e,t.y1=r,t.eachBefore(l),i=[0],n&&t.eachBefore(nh),t}function l(n){var e=i[n.depth],r=n.x0+e,s=n.y0+e,l=n.x1-e,h=n.y1-e;l=e-1){var s=u[n];return s.x0=i,s.y0=o,s.x1=a,void(s.y1=c)}for(var l=f[n],h=r/2+l,d=n+1,p=e-1;d>>1;f[v]c-o){var _=(i*y+a*g)/r;t(n,d,g,i,o,_,c),t(d,e,y,_,o,a,c)}else{var b=(o*y+c*g)/r;t(n,d,g,i,o,a,b),t(d,e,y,i,b,a,c)}}(0,c,t.value,n,e,r,i)},t.treemapDice=eh,t.treemapResquarify=_h,t.treemapSlice=ph,t.treemapSliceDice=function(t,n,e,r,i){(1&t.depth?ph:eh)(t,n,e,r,i)},t.treemapSquarify=yh,t.tsv=sa,t.tsvFormat=Ko,t.tsvFormatBody=Jo,t.tsvFormatRow=na,t.tsvFormatRows=ta,t.tsvFormatValue=ea,t.tsvParse=Zo,t.tsvParseRows=Qo,t.utcDay=Wd,t.utcDays=Zd,t.utcFriday=rp,t.utcFridays=sp,t.utcHour=Gd,t.utcHours=$d,t.utcMillisecond=pd,t.utcMilliseconds=vd,t.utcMinute=Xd,t.utcMinutes=Vd,t.utcMonday=Jd,t.utcMondays=ap,t.utcMonth=hp,t.utcMonths=dp,t.utcSaturday=ip,t.utcSaturdays=lp,t.utcSecond=_d,t.utcSeconds=bd,t.utcSunday=Kd,t.utcSundays=op,t.utcThursday=ep,t.utcThursdays=fp,t.utcTuesday=tp,t.utcTuesdays=up,t.utcWednesday=np,t.utcWednesdays=cp,t.utcWeek=Kd,t.utcWeeks=op,t.utcYear=pp,t.utcYears=vp,t.values=function(t){var n=[];for(var e in t)n.push(t[e]);return n},t.variance=c,t.version="5.16.0",t.voronoi=function(){var t=sb,n=lb,e=null;function r(r){return new Vb(r.map(function(e,i){var o=[Math.round(t(e,i,r)/Ib)*Ib,Math.round(n(e,i,r)/Ib)*Ib];return o.index=i,o.data=e,o}),e)}return r.polygons=function(t){return r(t).polygons()},r.links=function(t){return r(t).links()},r.triangles=function(t){return r(t).triangles()},r.x=function(n){return arguments.length?(t="function"==typeof n?n:fb(+n),r):t},r.y=function(t){return arguments.length?(n="function"==typeof t?t:fb(+t),r):n},r.extent=function(t){return arguments.length?(e=null==t?null:[[+t[0][0],+t[0][1]],[+t[1][0],+t[1][1]]],r):e&&[[e[0][0],e[0][1]],[e[1][0],e[1][1]]]},r.size=function(t){return arguments.length?(e=null==t?null:[[0,0],[+t[0],+t[1]]],r):e&&[e[1][0]-e[0][0],e[1][1]-e[0][1]]},r},t.window=ct,t.xml=da,t.zip=function(){return k(arguments)},t.zoom=function(){var n,e,r=tm,i=nm,o=om,a=rm,u=im,c=[0,1/0],f=[[-1/0,-1/0],[1/0,1/0]],s=250,l=Ie,h=I("start","zoom","end"),d=500,p=150,v=0;function g(t){t.property("__zoom",em).on("wheel.zoom",M).on("mousedown.zoom",N).on("dblclick.zoom",T).filter(u).on("touchstart.zoom",A).on("touchmove.zoom",S).on("touchend.zoom touchcancel.zoom",k).style("touch-action","none").style("-webkit-tap-highlight-color","rgba(0,0,0,0)")}function y(t,n){return(n=Math.max(c[0],Math.min(c[1],n)))===t.k?t:new Wb(n,t.x,t.y)}function _(t,n,e){var r=n[0]-e[0]*t.k,i=n[1]-e[1]*t.k;return r===t.x&&i===t.y?t:new Wb(t.k,r,i)}function b(t){return[(+t[0][0]+ +t[1][0])/2,(+t[0][1]+ +t[1][1])/2]}function m(t,n,e){t.on("start.zoom",function(){x(this,arguments).start()}).on("interrupt.zoom end.zoom",function(){x(this,arguments).end()}).tween("zoom",function(){var t=this,r=arguments,o=x(t,r),a=i.apply(t,r),u=null==e?b(a):"function"==typeof e?e.apply(t,r):e,c=Math.max(a[1][0]-a[0][0],a[1][1]-a[0][1]),f=t.__zoom,s="function"==typeof n?n.apply(t,r):n,h=l(f.invert(u).concat(c/f.k),s.invert(u).concat(c/s.k));return function(t){if(1===t)t=s;else{var n=h(t),e=c/n[2];t=new Wb(e,u[0]-n[0]*e,u[1]-n[1]*e)}o.zoom(null,t)}})}function x(t,n,e){return!e&&t.__zooming||new w(t,n)}function w(t,n){this.that=t,this.args=n,this.active=0,this.extent=i.apply(t,n),this.taps=0}function M(){if(r.apply(this,arguments)){var t=x(this,arguments),n=this.__zoom,e=Math.max(c[0],Math.min(c[1],n.k*Math.pow(2,a.apply(this,arguments)))),i=Bt(this);if(t.wheel)t.mouse[0][0]===i[0]&&t.mouse[0][1]===i[1]||(t.mouse[1]=n.invert(t.mouse[0]=i)),clearTimeout(t.wheel);else{if(n.k===e)return;t.mouse=[i,n.invert(i)],Pr(this),t.start()}Jb(),t.wheel=setTimeout(function(){t.wheel=null,t.end()},p),t.zoom("mouse",o(_(y(n,e),t.mouse[0],t.mouse[1]),t.extent,f))}}function N(){if(!e&&r.apply(this,arguments)){var n=x(this,arguments,!0),i=Rt(t.event.view).on("mousemove.zoom",function(){if(Jb(),!n.moved){var e=t.event.clientX-u,r=t.event.clientY-c;n.moved=e*e+r*r>v}n.zoom("mouse",o(_(n.that.__zoom,n.mouse[0]=Bt(n.that),n.mouse[1]),n.extent,f))},!0).on("mouseup.zoom",function(){i.on("mousemove.zoom mouseup.zoom",null),jt(t.event.view,n.moved),Jb(),n.end()},!0),a=Bt(this),u=t.event.clientX,c=t.event.clientY;Ht(t.event.view),Kb(),n.mouse=[a,this.__zoom.invert(a)],Pr(this),n.start()}}function T(){if(r.apply(this,arguments)){var n=this.__zoom,e=Bt(this),a=n.invert(e),u=n.k*(t.event.shiftKey?.5:2),c=o(_(y(n,u),e,a),i.apply(this,arguments),f);Jb(),s>0?Rt(this).transition().duration(s).call(m,c,e):Rt(this).call(g.transform,c)}}function A(){if(r.apply(this,arguments)){var e,i,o,a,u=t.event.touches,c=u.length,f=x(this,arguments,t.event.changedTouches.length===c);for(Kb(),i=0;in?1:t>=n?0:NaN}function e(t){var e;return 1===t.length&&(e=t,t=function(t,r){return n(e(t),r)}),{left:function(n,e,r,i){for(null==r&&(r=0),null==i&&(i=n.length);r>>1;t(n[o],e)<0?r=o+1:i=o}return r},right:function(n,e,r,i){for(null==r&&(r=0),null==i&&(i=n.length);r>>1;t(n[o],e)>0?i=o:r=o+1}return r}}}var r=e(n),i=r.right,o=r.left;function a(t,n){return[t,n]}function u(t){return null===t?NaN:+t}function c(t,n){var e,r,i=t.length,o=0,a=-1,c=0,f=0;if(null==n)for(;++a1)return f/(o-1)}function f(t,n){var e=c(t,n);return e?Math.sqrt(e):e}function s(t,n){var e,r,i,o=t.length,a=-1;if(null==n){for(;++a=e)for(r=i=e;++ae&&(r=e),i=e)for(r=i=e;++ae&&(r=e),i0)return[t];if((r=n0)for(t=Math.ceil(t/a),n=Math.floor(n/a),o=new Array(i=Math.ceil(n-t+1));++u=0?(o>=y?10:o>=_?5:o>=b?2:1)*Math.pow(10,i):-Math.pow(10,-i)/(o>=y?10:o>=_?5:o>=b?2:1)}function w(t,n,e){var r=Math.abs(n-t)/Math.max(0,e),i=Math.pow(10,Math.floor(Math.log(r)/Math.LN10)),o=r/i;return o>=y?i*=10:o>=_?i*=5:o>=b&&(i*=2),n=1)return+e(t[r-1],r-1,t);var r,i=(r-1)*n,o=Math.floor(i),a=+e(t[o],o,t);return a+(+e(t[o+1],o+1,t)-a)*(i-o)}}function A(t,n){var e,r,i=t.length,o=-1;if(null==n){for(;++o=e)for(r=e;++or&&(r=e)}else for(;++o=e)for(r=e;++or&&(r=e);return r}function T(t){for(var n,e,r,i=t.length,o=-1,a=0;++o=0;)for(n=(r=t[i]).length;--n>=0;)e[--a]=r[n];return e}function S(t,n){var e,r,i=t.length,o=-1;if(null==n){for(;++o=e)for(r=e;++oe&&(r=e)}else for(;++o=e)for(r=e;++oe&&(r=e);return r}function k(t){if(!(i=t.length))return[];for(var n=-1,e=S(t,E),r=new Array(e);++n=0&&(n=t.slice(e+1),t=t.slice(0,e)),t&&!r.hasOwnProperty(t))throw new Error("unknown type: "+t);return{type:t,name:n}})),a=-1,u=o.length;if(!(arguments.length<2)){if(null!=n&&"function"!=typeof n)throw new Error("invalid callback: "+n);for(;++a0)for(var e,r,i=new Array(e),o=0;o=0&&"xmlns"!==(n=t.slice(0,e))&&(t=t.slice(e+1)),V.hasOwnProperty(n)?{space:V[n],local:t}:t}function W(t){var n=$(t);return(n.local?function(t){return function(){return this.ownerDocument.createElementNS(t.space,t.local)}}:function(t){return function(){var n=this.ownerDocument,e=this.namespaceURI;return e===G&&n.documentElement.namespaceURI===G?n.createElement(t):n.createElementNS(e,t)}})(n)}function Z(){}function Q(t){return null==t?Z:function(){return this.querySelector(t)}}function J(){return[]}function K(t){return null==t?J:function(){return this.querySelectorAll(t)}}function tt(t){return function(){return this.matches(t)}}function nt(t){return new Array(t.length)}function et(t,n){this.ownerDocument=t.ownerDocument,this.namespaceURI=t.namespaceURI,this._next=null,this._parent=t,this.__data__=n}et.prototype={constructor:et,appendChild:function(t){return this._parent.insertBefore(t,this._next)},insertBefore:function(t,n){return this._parent.insertBefore(t,n)},querySelector:function(t){return this._parent.querySelector(t)},querySelectorAll:function(t){return this._parent.querySelectorAll(t)}};var rt="$";function it(t,n,e,r,i,o){for(var a,u=0,c=n.length,f=o.length;un?1:t>=n?0:NaN}function ut(t){return t.ownerDocument&&t.ownerDocument.defaultView||t.document&&t||t.defaultView}function ct(t,n){return t.style.getPropertyValue(n)||ut(t).getComputedStyle(t,null).getPropertyValue(n)}function ft(t){return t.trim().split(/^|\s+/)}function st(t){return t.classList||new lt(t)}function lt(t){this._node=t,this._names=ft(t.getAttribute("class")||"")}function ht(t,n){for(var e=st(t),r=-1,i=n.length;++r=0&&(this._names.splice(n,1),this._node.setAttribute("class",this._names.join(" ")))},contains:function(t){return this._names.indexOf(t)>=0}};var wt={};(t.event=null,"undefined"!=typeof document)&&("onmouseenter"in document.documentElement||(wt={mouseenter:"mouseover",mouseleave:"mouseout"}));function Mt(t,n,e){return t=Nt(t,n,e),function(n){var e=n.relatedTarget;e&&(e===this||8&e.compareDocumentPosition(this))||t.call(this,n)}}function Nt(n,e,r){return function(i){var o=t.event;t.event=i;try{n.call(this,this.__data__,e,r)}finally{t.event=o}}}function At(t){return function(){var n=this.__on;if(n){for(var e,r=0,i=-1,o=n.length;r=x&&(x=m+1);!(b=y[x])&&++x=0;)(r=i[o])&&(a&&4^r.compareDocumentPosition(a)&&a.parentNode.insertBefore(r,a),a=r);return this},sort:function(t){function n(n,e){return n&&e?t(n.__data__,e.__data__):!n-!e}t||(t=at);for(var e=this._groups,r=e.length,i=new Array(r),o=0;o1?this.each((null==n?function(t){return function(){this.style.removeProperty(t)}}:"function"==typeof n?function(t,n,e){return function(){var r=n.apply(this,arguments);null==r?this.style.removeProperty(t):this.style.setProperty(t,r,e)}}:function(t,n,e){return function(){this.style.setProperty(t,n,e)}})(t,n,null==e?"":e)):ct(this.node(),t)},property:function(t,n){return arguments.length>1?this.each((null==n?function(t){return function(){delete this[t]}}:"function"==typeof n?function(t,n){return function(){var e=n.apply(this,arguments);null==e?delete this[t]:this[t]=e}}:function(t,n){return function(){this[t]=n}})(t,n)):this.node()[t]},classed:function(t,n){var e=ft(t+"");if(arguments.length<2){for(var r=st(this.node()),i=-1,o=e.length;++i=0&&(n=t.slice(e+1),t=t.slice(0,e)),{type:t,name:n}})}(t+""),a=o.length;if(!(arguments.length<2)){for(u=n?Tt:At,null==e&&(e=!1),r=0;r>8&15|n>>4&240,n>>4&15|240&n,(15&n)<<4|15&n,1):(n=rn.exec(t))?dn(parseInt(n[1],16)):(n=on.exec(t))?new yn(n[1],n[2],n[3],1):(n=an.exec(t))?new yn(255*n[1]/100,255*n[2]/100,255*n[3]/100,1):(n=un.exec(t))?pn(n[1],n[2],n[3],n[4]):(n=cn.exec(t))?pn(255*n[1]/100,255*n[2]/100,255*n[3]/100,n[4]):(n=fn.exec(t))?bn(n[1],n[2]/100,n[3]/100,1):(n=sn.exec(t))?bn(n[1],n[2]/100,n[3]/100,n[4]):ln.hasOwnProperty(t)?dn(ln[t]):"transparent"===t?new yn(NaN,NaN,NaN,0):null}function dn(t){return new yn(t>>16&255,t>>8&255,255&t,1)}function pn(t,n,e,r){return r<=0&&(t=n=e=NaN),new yn(t,n,e,r)}function vn(t){return t instanceof Jt||(t=hn(t)),t?new yn((t=t.rgb()).r,t.g,t.b,t.opacity):new yn}function gn(t,n,e,r){return 1===arguments.length?vn(t):new yn(t,n,e,null==r?1:r)}function yn(t,n,e,r){this.r=+t,this.g=+n,this.b=+e,this.opacity=+r}function _n(t){return((t=Math.max(0,Math.min(255,Math.round(t)||0)))<16?"0":"")+t.toString(16)}function bn(t,n,e,r){return r<=0?t=n=e=NaN:e<=0||e>=1?t=n=NaN:n<=0&&(t=NaN),new xn(t,n,e,r)}function mn(t,n,e,r){return 1===arguments.length?function(t){if(t instanceof xn)return new xn(t.h,t.s,t.l,t.opacity);if(t instanceof Jt||(t=hn(t)),!t)return new xn;if(t instanceof xn)return t;var n=(t=t.rgb()).r/255,e=t.g/255,r=t.b/255,i=Math.min(n,e,r),o=Math.max(n,e,r),a=NaN,u=o-i,c=(o+i)/2;return u?(a=n===o?(e-r)/u+6*(e0&&c<1?0:a,new xn(a,u,c,t.opacity)}(t):new xn(t,n,e,null==r?1:r)}function xn(t,n,e,r){this.h=+t,this.s=+n,this.l=+e,this.opacity=+r}function wn(t,n,e){return 255*(t<60?n+(e-n)*t/60:t<180?e:t<240?n+(e-n)*(240-t)/60:n)}Zt(Jt,hn,{displayable:function(){return this.rgb().displayable()},hex:function(){return this.rgb().hex()},toString:function(){return this.rgb()+""}}),Zt(yn,gn,Qt(Jt,{brighter:function(t){return t=null==t?1/.7:Math.pow(1/.7,t),new yn(this.r*t,this.g*t,this.b*t,this.opacity)},darker:function(t){return t=null==t?.7:Math.pow(.7,t),new yn(this.r*t,this.g*t,this.b*t,this.opacity)},rgb:function(){return this},displayable:function(){return 0<=this.r&&this.r<=255&&0<=this.g&&this.g<=255&&0<=this.b&&this.b<=255&&0<=this.opacity&&this.opacity<=1},hex:function(){return"#"+_n(this.r)+_n(this.g)+_n(this.b)},toString:function(){var t=this.opacity;return(1===(t=isNaN(t)?1:Math.max(0,Math.min(1,t)))?"rgb(":"rgba(")+Math.max(0,Math.min(255,Math.round(this.r)||0))+", "+Math.max(0,Math.min(255,Math.round(this.g)||0))+", "+Math.max(0,Math.min(255,Math.round(this.b)||0))+(1===t?")":", "+t+")")}})),Zt(xn,mn,Qt(Jt,{brighter:function(t){return t=null==t?1/.7:Math.pow(1/.7,t),new xn(this.h,this.s,this.l*t,this.opacity)},darker:function(t){return t=null==t?.7:Math.pow(.7,t),new xn(this.h,this.s,this.l*t,this.opacity)},rgb:function(){var t=this.h%360+360*(this.h<0),n=isNaN(t)||isNaN(this.s)?0:this.s,e=this.l,r=e+(e<.5?e:1-e)*n,i=2*e-r;return new yn(wn(t>=240?t-240:t+120,i,r),wn(t,i,r),wn(t<120?t+240:t-120,i,r),this.opacity)},displayable:function(){return(0<=this.s&&this.s<=1||isNaN(this.s))&&0<=this.l&&this.l<=1&&0<=this.opacity&&this.opacity<=1}}));var Mn=Math.PI/180,Nn=180/Math.PI,An=.96422,Tn=1,Sn=.82521,kn=4/29,En=6/29,Cn=3*En*En,Pn=En*En*En;function zn(t){if(t instanceof Dn)return new Dn(t.l,t.a,t.b,t.opacity);if(t instanceof Fn){if(isNaN(t.h))return new Dn(t.l,0,0,t.opacity);var n=t.h*Mn;return new Dn(t.l,Math.cos(n)*t.c,Math.sin(n)*t.c,t.opacity)}t instanceof yn||(t=vn(t));var e,r,i=On(t.r),o=On(t.g),a=On(t.b),u=qn((.2225045*i+.7168786*o+.0606169*a)/Tn);return i===o&&o===a?e=r=u:(e=qn((.4360747*i+.3850649*o+.1430804*a)/An),r=qn((.0139322*i+.0971045*o+.7141733*a)/Sn)),new Dn(116*u-16,500*(e-u),200*(u-r),t.opacity)}function Rn(t,n,e,r){return 1===arguments.length?zn(t):new Dn(t,n,e,null==r?1:r)}function Dn(t,n,e,r){this.l=+t,this.a=+n,this.b=+e,this.opacity=+r}function qn(t){return t>Pn?Math.pow(t,1/3):t/Cn+kn}function Ln(t){return t>En?t*t*t:Cn*(t-kn)}function Un(t){return 255*(t<=.0031308?12.92*t:1.055*Math.pow(t,1/2.4)-.055)}function On(t){return(t/=255)<=.04045?t/12.92:Math.pow((t+.055)/1.055,2.4)}function Bn(t){if(t instanceof Fn)return new Fn(t.h,t.c,t.l,t.opacity);if(t instanceof Dn||(t=zn(t)),0===t.a&&0===t.b)return new Fn(NaN,0,t.l,t.opacity);var n=Math.atan2(t.b,t.a)*Nn;return new Fn(n<0?n+360:n,Math.sqrt(t.a*t.a+t.b*t.b),t.l,t.opacity)}function Yn(t,n,e,r){return 1===arguments.length?Bn(t):new Fn(t,n,e,null==r?1:r)}function Fn(t,n,e,r){this.h=+t,this.c=+n,this.l=+e,this.opacity=+r}Zt(Dn,Rn,Qt(Jt,{brighter:function(t){return new Dn(this.l+18*(null==t?1:t),this.a,this.b,this.opacity)},darker:function(t){return new Dn(this.l-18*(null==t?1:t),this.a,this.b,this.opacity)},rgb:function(){var t=(this.l+16)/116,n=isNaN(this.a)?t:t+this.a/500,e=isNaN(this.b)?t:t-this.b/200;return new yn(Un(3.1338561*(n=An*Ln(n))-1.6168667*(t=Tn*Ln(t))-.4906146*(e=Sn*Ln(e))),Un(-.9787684*n+1.9161415*t+.033454*e),Un(.0719453*n-.2289914*t+1.4052427*e),this.opacity)}})),Zt(Fn,Yn,Qt(Jt,{brighter:function(t){return new Fn(this.h,this.c,this.l+18*(null==t?1:t),this.opacity)},darker:function(t){return new Fn(this.h,this.c,this.l-18*(null==t?1:t),this.opacity)},rgb:function(){return zn(this).rgb()}}));var In=-.14861,jn=1.78277,Hn=-.29227,Xn=-.90649,Gn=1.97294,Vn=Gn*Xn,$n=Gn*jn,Wn=jn*Hn-Xn*In;function Zn(t,n,e,r){return 1===arguments.length?function(t){if(t instanceof Qn)return new Qn(t.h,t.s,t.l,t.opacity);t instanceof yn||(t=vn(t));var n=t.r/255,e=t.g/255,r=t.b/255,i=(Wn*r+Vn*n-$n*e)/(Wn+Vn-$n),o=r-i,a=(Gn*(e-i)-Hn*o)/Xn,u=Math.sqrt(a*a+o*o)/(Gn*i*(1-i)),c=u?Math.atan2(a,o)*Nn-120:NaN;return new Qn(c<0?c+360:c,u,i,t.opacity)}(t):new Qn(t,n,e,null==r?1:r)}function Qn(t,n,e,r){this.h=+t,this.s=+n,this.l=+e,this.opacity=+r}function Jn(t,n,e,r,i){var o=t*t,a=o*t;return((1-3*t+3*o-a)*n+(4-6*o+3*a)*e+(1+3*t+3*o-3*a)*r+a*i)/6}function Kn(t){var n=t.length-1;return function(e){var r=e<=0?e=0:e>=1?(e=1,n-1):Math.floor(e*n),i=t[r],o=t[r+1],a=r>0?t[r-1]:2*i-o,u=r180||e<-180?e-360*Math.round(e/360):e):ne(isNaN(t)?n:t)}function ie(t){return 1==(t=+t)?oe:function(n,e){return e-n?function(t,n,e){return t=Math.pow(t,e),n=Math.pow(n,e)-t,e=1/e,function(r){return Math.pow(t+r*n,e)}}(n,e,t):ne(isNaN(n)?e:n)}}function oe(t,n){var e=n-t;return e?ee(t,e):ne(isNaN(t)?n:t)}Zt(Qn,Zn,Qt(Jt,{brighter:function(t){return t=null==t?1/.7:Math.pow(1/.7,t),new Qn(this.h,this.s,this.l*t,this.opacity)},darker:function(t){return t=null==t?.7:Math.pow(.7,t),new Qn(this.h,this.s,this.l*t,this.opacity)},rgb:function(){var t=isNaN(this.h)?0:(this.h+120)*Mn,n=+this.l,e=isNaN(this.s)?0:this.s*n*(1-n),r=Math.cos(t),i=Math.sin(t);return new yn(255*(n+e*(In*r+jn*i)),255*(n+e*(Hn*r+Xn*i)),255*(n+e*(Gn*r)),this.opacity)}}));var ae=function t(n){var e=ie(n);function r(t,n){var r=e((t=gn(t)).r,(n=gn(n)).r),i=e(t.g,n.g),o=e(t.b,n.b),a=oe(t.opacity,n.opacity);return function(n){return t.r=r(n),t.g=i(n),t.b=o(n),t.opacity=a(n),t+""}}return r.gamma=t,r}(1);function ue(t){return function(n){var e,r,i=n.length,o=new Array(i),a=new Array(i),u=new Array(i);for(e=0;eo&&(i=n.slice(o,i),u[a]?u[a]+=i:u[++a]=i),(e=e[0])===(r=r[0])?u[a]?u[a]+=r:u[++a]=r:(u[++a]=null,c.push({i:a,x:he(e,r)})),o=ve.lastIndex;return o180?n+=360:n-t>180&&(t+=360),o.push({i:e.push(i(e)+"rotate(",null,r)-2,x:he(t,n)})):n&&e.push(i(e)+"rotate("+n+r)}(o.rotate,a.rotate,u,c),function(t,n,e,o){t!==n?o.push({i:e.push(i(e)+"skewX(",null,r)-2,x:he(t,n)}):n&&e.push(i(e)+"skewX("+n+r)}(o.skewX,a.skewX,u,c),function(t,n,e,r,o,a){if(t!==e||n!==r){var u=o.push(i(o)+"scale(",null,",",null,")");a.push({i:u-4,x:he(t,e)},{i:u-2,x:he(n,r)})}else 1===e&&1===r||o.push(i(o)+"scale("+e+","+r+")")}(o.scaleX,o.scaleY,a.scaleX,a.scaleY,u,c),o=a=null,function(t){for(var n,e=-1,r=c.length;++e=0&&n._call.call(null,t),n=n._next;--Ge}function ar(){Qe=(Ze=Ke.now())+Je,Ge=Ve=0;try{or()}finally{Ge=0,function(){var t,n,e=He,r=1/0;for(;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:He=n);Xe=t,cr(r)}(),Qe=0}}function ur(){var t=Ke.now(),n=t-Ze;n>We&&(Je-=n,Ze=t)}function cr(t){Ge||(Ve&&(Ve=clearTimeout(Ve)),t-Qe>24?(t<1/0&&(Ve=setTimeout(ar,t-Ke.now()-Je)),$e&&($e=clearInterval($e))):($e||(Ze=Ke.now(),$e=setInterval(ur,We)),Ge=1,tr(ar)))}function fr(t,n,e){var r=new rr;return n=null==n?0:+n,r.restart(function(e){r.stop(),t(e+n)},n,e),r}rr.prototype=ir.prototype={constructor:rr,restart:function(t,n,e){if("function"!=typeof t)throw new TypeError("callback is not a function");e=(null==e?nr():+e)+(null==n?0:+n),this._next||Xe===this||(Xe?Xe._next=this:He=this,Xe=this),this._call=t,this._time=e,cr()},stop:function(){this._call&&(this._call=null,this._time=1/0,cr())}};var sr=I("start","end","cancel","interrupt"),lr=[],hr=0,dr=1,pr=2,vr=3,gr=4,yr=5,_r=6;function br(t,n,e,r,i,o){var a=t.__transition;if(a){if(e in a)return}else t.__transition={};!function(t,n,e){var r,i=t.__transition;function o(c){var f,s,l,h;if(e.state!==dr)return u();for(f in i)if((h=i[f]).name===e.name){if(h.state===vr)return fr(o);h.state===gr?(h.state=_r,h.timer.stop(),h.on.call("interrupt",t,t.__data__,h.index,h.group),delete i[f]):+fhr)throw new Error("too late; already scheduled");return e}function xr(t,n){var e=wr(t,n);if(e.state>vr)throw new Error("too late; already running");return e}function wr(t,n){var e=t.__transition;if(!e||!(e=e[n]))throw new Error("transition not found");return e}function Mr(t,n){var e,r,i,o=t.__transition,a=!0;if(o){for(i in n=null==n?null:n+"",o)(e=o[i]).name===n?(r=e.state>pr&&e.state=0&&(t=t.slice(0,n)),!t||"start"===t})}(n)?mr:xr;return function(){var a=o(this,t),u=a.on;u!==r&&(i=(r=u).copy()).on(n,e),a.on=i}}(e,t,n))},attr:function(t,n){var e=$(t),r="transform"===e?ke:Ar;return this.attrTween(t,"function"==typeof n?(e.local?function(t,n,e){var r,i,o;return function(){var a,u,c=e(this);if(null!=c)return(a=this.getAttributeNS(t.space,t.local))===(u=c+"")?null:a===r&&u===i?o:(i=u,o=n(r=a,c));this.removeAttributeNS(t.space,t.local)}}:function(t,n,e){var r,i,o;return function(){var a,u,c=e(this);if(null!=c)return(a=this.getAttribute(t))===(u=c+"")?null:a===r&&u===i?o:(i=u,o=n(r=a,c));this.removeAttribute(t)}})(e,r,Nr(this,"attr."+t,n)):null==n?(e.local?function(t){return function(){this.removeAttributeNS(t.space,t.local)}}:function(t){return function(){this.removeAttribute(t)}})(e):(e.local?function(t,n,e){var r,i,o=e+"";return function(){var a=this.getAttributeNS(t.space,t.local);return a===o?null:a===r?i:i=n(r=a,e)}}:function(t,n,e){var r,i,o=e+"";return function(){var a=this.getAttribute(t);return a===o?null:a===r?i:i=n(r=a,e)}})(e,r,n))},attrTween:function(t,n){var e="attr."+t;if(arguments.length<2)return(e=this.tween(e))&&e._value;if(null==n)return this.tween(e,null);if("function"!=typeof n)throw new Error;var r=$(t);return this.tween(e,(r.local?function(t,n){var e,r;function i(){var i=n.apply(this,arguments);return i!==r&&(e=(r=i)&&function(t,n){return function(e){this.setAttributeNS(t.space,t.local,n(e))}}(t,i)),e}return i._value=n,i}:function(t,n){var e,r;function i(){var i=n.apply(this,arguments);return i!==r&&(e=(r=i)&&function(t,n){return function(e){this.setAttribute(t,n(e))}}(t,i)),e}return i._value=n,i})(r,n))},style:function(t,n,e){var r="transform"==(t+="")?Se:Ar;return null==n?this.styleTween(t,function(t,n){var e,r,i;return function(){var o=ct(this,t),a=(this.style.removeProperty(t),ct(this,t));return o===a?null:o===e&&a===r?i:i=n(e=o,r=a)}}(t,r)).on("end.style."+t,Sr(t)):"function"==typeof n?this.styleTween(t,function(t,n,e){var r,i,o;return function(){var a=ct(this,t),u=e(this),c=u+"";return null==u&&(this.style.removeProperty(t),c=u=ct(this,t)),a===c?null:a===r&&c===i?o:(i=c,o=n(r=a,u))}}(t,r,Nr(this,"style."+t,n))).each(function(t,n){var e,r,i,o,a="style."+n,u="end."+a;return function(){var c=xr(this,t),f=c.on,s=null==c.value[a]?o||(o=Sr(n)):void 0;f===e&&i===s||(r=(e=f).copy()).on(u,i=s),c.on=r}}(this._id,t)):this.styleTween(t,function(t,n,e){var r,i,o=e+"";return function(){var a=ct(this,t);return a===o?null:a===r?i:i=n(r=a,e)}}(t,r,n),e).on("end.style."+t,null)},styleTween:function(t,n,e){var r="style."+(t+="");if(arguments.length<2)return(r=this.tween(r))&&r._value;if(null==n)return this.tween(r,null);if("function"!=typeof n)throw new Error;return this.tween(r,function(t,n,e){var r,i;function o(){var o=n.apply(this,arguments);return o!==i&&(r=(i=o)&&function(t,n,e){return function(r){this.style.setProperty(t,n(r),e)}}(t,o,e)),r}return o._value=n,o}(t,n,null==e?"":e))},text:function(t){return this.tween("text","function"==typeof t?function(t){return function(){var n=t(this);this.textContent=null==n?"":n}}(Nr(this,"text",t)):function(t){return function(){this.textContent=t}}(null==t?"":t+""))},remove:function(){return this.on("end.remove",(t=this._id,function(){var n=this.parentNode;for(var e in this.__transition)if(+e!==t)return;n&&n.removeChild(this)}));var t},tween:function(t,n){var e=this._id;if(t+="",arguments.length<2){for(var r,i=wr(this.node(),e).tween,o=0,a=i.length;o0&&(r=o-p),M<0?h=d-v:M>0&&(a=u-v),x=vi,L.attr("cursor",xi.selection),B());break;default:return}di()},!0).on("keyup.brush",function(){switch(t.event.keyCode){case 16:P&&(y=_=P=!1,B());break;case 18:x===yi&&(w<0?s=l:w>0&&(r=o),M<0?h=d:M>0&&(a=u),x=gi,B());break;case 32:x===vi&&(t.event.altKey?(w&&(s=l-p*w,r=o+p*w),M&&(h=d-v*M,a=u+v*M),x=yi):(w<0?s=l:w>0&&(r=o),M<0?h=d:M>0&&(a=u),x=gi),L.attr("cursor",xi[m]),B());break;default:return}di()},!0).on("mousemove.brush",O,!0).on("mouseup.brush",Y,!0);It(t.event.view)}hi(),Mr(b),c.call(b),D.start()}function O(){var t=Ot(b);!P||y||_||(Math.abs(t[0]-R[0])>Math.abs(t[1]-R[1])?_=!0:y=!0),R=t,g=!0,di(),B()}function B(){var t;switch(p=R[0]-z[0],v=R[1]-z[1],x){case vi:case pi:w&&(p=Math.max(S-r,Math.min(E-s,p)),o=r+p,l=s+p),M&&(v=Math.max(k-a,Math.min(C-h,v)),u=a+v,d=h+v);break;case gi:w<0?(p=Math.max(S-r,Math.min(E-r,p)),o=r+p,l=s):w>0&&(p=Math.max(S-s,Math.min(E-s,p)),o=r,l=s+p),M<0?(v=Math.max(k-a,Math.min(C-a,v)),u=a+v,d=h):M>0&&(v=Math.max(k-h,Math.min(C-h,v)),u=a,d=h+v);break;case yi:w&&(o=Math.max(S,Math.min(E,r-p*w)),l=Math.max(S,Math.min(E,s+p*w))),M&&(u=Math.max(k,Math.min(C,a-v*M)),d=Math.max(k,Math.min(C,h+v*M)))}l1e-6)if(Math.abs(s*u-c*f)>1e-6&&i){var h=e-o,d=r-a,p=u*u+c*c,v=h*h+d*d,g=Math.sqrt(p),y=Math.sqrt(l),_=i*Math.tan((Yi-Math.acos((p+l-v)/(2*g*y)))/2),b=_/y,m=_/g;Math.abs(b-1)>1e-6&&(this._+="L"+(t+b*f)+","+(n+b*s)),this._+="A"+i+","+i+",0,0,"+ +(s*h>f*d)+","+(this._x1=t+m*u)+","+(this._y1=n+m*c)}else this._+="L"+(this._x1=t)+","+(this._y1=n);else;},arc:function(t,n,e,r,i,o){t=+t,n=+n;var a=(e=+e)*Math.cos(r),u=e*Math.sin(r),c=t+a,f=n+u,s=1^o,l=o?r-i:i-r;if(e<0)throw new Error("negative radius: "+e);null===this._x1?this._+="M"+c+","+f:(Math.abs(this._x1-c)>1e-6||Math.abs(this._y1-f)>1e-6)&&(this._+="L"+c+","+f),e&&(l<0&&(l=l%Fi+Fi),l>Ii?this._+="A"+e+","+e+",0,1,"+s+","+(t-a)+","+(n-u)+"A"+e+","+e+",0,1,"+s+","+(this._x1=c)+","+(this._y1=f):l>1e-6&&(this._+="A"+e+","+e+",0,"+ +(l>=Yi)+","+s+","+(this._x1=t+e*Math.cos(i))+","+(this._y1=n+e*Math.sin(i))))},rect:function(t,n,e,r){this._+="M"+(this._x0=this._x1=+t)+","+(this._y0=this._y1=+n)+"h"+ +e+"v"+ +r+"h"+-e+"Z"},toString:function(){return this._}};function Zi(){}function Qi(t,n){var e=new Zi;if(t instanceof Zi)t.each(function(t,n){e.set(n,t)});else if(Array.isArray(t)){var r,i=-1,o=t.length;if(null==n)for(;++ir!=d>r&&e<(h-f)*(r-s)/(d-s)+f&&(i=-i)}return i}function so(t,n,e){var r,i,o,a;return function(t,n,e){return(n[0]-t[0])*(e[1]-t[1])==(e[0]-t[0])*(n[1]-t[1])}(t,n,e)&&(i=t[r=+(t[0]===n[0])],o=e[r],a=n[r],i<=o&&o<=a||a<=o&&o<=i)}function lo(){}var ho=[[],[[[1,1.5],[.5,1]]],[[[1.5,1],[1,1.5]]],[[[1.5,1],[.5,1]]],[[[1,.5],[1.5,1]]],[[[1,1.5],[.5,1]],[[1,.5],[1.5,1]]],[[[1,.5],[1,1.5]]],[[[1,.5],[.5,1]]],[[[.5,1],[1,.5]]],[[[1,1.5],[1,.5]]],[[[.5,1],[1,.5]],[[1.5,1],[1,1.5]]],[[[1.5,1],[1,.5]]],[[[.5,1],[1.5,1]]],[[[1,1.5],[1.5,1]]],[[[.5,1],[1,1.5]]],[]];function po(){var t=1,n=1,e=M,r=u;function i(t){var n=e(t);if(Array.isArray(n))n=n.slice().sort(ao);else{var r=s(t),i=r[0],a=r[1];n=w(i,a,n),n=g(Math.floor(i/n)*n,Math.floor(a/n)*n,n)}return n.map(function(n){return o(t,n)})}function o(e,i){var o=[],u=[];return function(e,r,i){var o,u,c,f,s,l,h=new Array,d=new Array;o=u=-1,f=e[0]>=r,ho[f<<1].forEach(p);for(;++o=r,ho[c|f<<1].forEach(p);ho[f<<0].forEach(p);for(;++u=r,s=e[u*t]>=r,ho[f<<1|s<<2].forEach(p);++o=r,l=s,s=e[u*t+o+1]>=r,ho[c|f<<1|s<<2|l<<3].forEach(p);ho[f|s<<3].forEach(p)}o=-1,s=e[u*t]>=r,ho[s<<2].forEach(p);for(;++o=r,ho[s<<2|l<<3].forEach(p);function p(t){var n,e,r=[t[0][0]+o,t[0][1]+u],c=[t[1][0]+o,t[1][1]+u],f=a(r),s=a(c);(n=d[f])?(e=h[s])?(delete d[n.end],delete h[e.start],n===e?(n.ring.push(c),i(n.ring)):h[n.start]=d[e.end]={start:n.start,end:e.end,ring:n.ring.concat(e.ring)}):(delete d[n.end],n.ring.push(c),d[n.end=s]=n):(n=h[s])?(e=d[f])?(delete h[n.start],delete d[e.end],n===e?(n.ring.push(c),i(n.ring)):h[e.start]=d[n.end]={start:e.start,end:n.end,ring:e.ring.concat(n.ring)}):(delete h[n.start],n.ring.unshift(r),h[n.start=f]=n):h[f]=d[s]={start:f,end:s,ring:[r,c]}}ho[s<<3].forEach(p)}(e,i,function(t){r(t,e,i),function(t){for(var n=0,e=t.length,r=t[e-1][1]*t[0][0]-t[e-1][0]*t[0][1];++n0?o.push([t]):u.push(t)}),u.forEach(function(t){for(var n,e=0,r=o.length;e0&&a0&&u0&&o>0))throw new Error("invalid size");return t=r,n=o,i},i.thresholds=function(t){return arguments.length?(e="function"==typeof t?t:Array.isArray(t)?uo(oo.call(t)):uo(t),i):e},i.smooth=function(t){return arguments.length?(r=t?u:lo,i):r===u},i}function vo(t,n,e){for(var r=t.width,i=t.height,o=1+(e<<1),a=0;a=e&&(u>=o&&(c-=t.data[u-o+a*r]),n.data[u-e+a*r]=c/Math.min(u+1,r-1+o-u,o))}function go(t,n,e){for(var r=t.width,i=t.height,o=1+(e<<1),a=0;a=e&&(u>=o&&(c-=t.data[a+(u-o)*r]),n.data[a+(u-e)*r]=c/Math.min(u+1,i-1+o-u,o))}function yo(t){return t[0]}function _o(t){return t[1]}function bo(){return 1}var mo={},xo={},wo=34,Mo=10,No=13;function Ao(t){return new Function("d","return {"+t.map(function(t,n){return JSON.stringify(t)+": d["+n+"]"}).join(",")+"}")}function To(t){var n=Object.create(null),e=[];return t.forEach(function(t){for(var r in t)r in n||e.push(n[r]=r)}),e}function So(t,n){var e=t+"",r=e.length;return r9999?"+"+So(n,6):So(n,4))+"-"+So(t.getUTCMonth()+1,2)+"-"+So(t.getUTCDate(),2)+(o?"T"+So(e,2)+":"+So(r,2)+":"+So(i,2)+"."+So(o,3)+"Z":i?"T"+So(e,2)+":"+So(r,2)+":"+So(i,2)+"Z":r||e?"T"+So(e,2)+":"+So(r,2)+"Z":"")}function Eo(t){var n=new RegExp('["'+t+"\n\r]"),e=t.charCodeAt(0);function r(t,n){var r,i=[],o=t.length,a=0,u=0,c=o<=0,f=!1;function s(){if(c)return xo;if(f)return f=!1,mo;var n,r,i=a;if(t.charCodeAt(i)===wo){for(;a++=o?c=!0:(r=t.charCodeAt(a++))===Mo?f=!0:r===No&&(f=!0,t.charCodeAt(a)===Mo&&++a),t.slice(i+1,n-1).replace(/""/g,'"')}for(;a=(o=(v+y)/2))?v=o:y=o,(s=e>=(a=(g+_)/2))?g=a:_=a,i=d,!(d=d[l=s<<1|f]))return i[l]=p,t;if(u=+t._x.call(null,d.data),c=+t._y.call(null,d.data),n===u&&e===c)return p.next=d,i?i[l]=p:t._root=p,t;do{i=i?i[l]=new Array(4):t._root=new Array(4),(f=n>=(o=(v+y)/2))?v=o:y=o,(s=e>=(a=(g+_)/2))?g=a:_=a}while((l=s<<1|f)==(h=(c>=a)<<1|u>=o));return i[h]=d,i[l]=p,t}function ra(t,n,e,r,i){this.node=t,this.x0=n,this.y0=e,this.x1=r,this.y1=i}function ia(t){return t[0]}function oa(t){return t[1]}function aa(t,n,e){var r=new ua(null==n?ia:n,null==e?oa:e,NaN,NaN,NaN,NaN);return null==t?r:r.addAll(t)}function ua(t,n,e,r,i,o){this._x=t,this._y=n,this._x0=e,this._y0=r,this._x1=i,this._y1=o,this._root=void 0}function ca(t){for(var n={data:t.data},e=n;t=t.next;)e=e.next={data:t.data};return n}var fa=aa.prototype=ua.prototype;function sa(t){return t.x+t.vx}function la(t){return t.y+t.vy}function ha(t){return t.index}function da(t,n){var e=t.get(n);if(!e)throw new Error("missing: "+n);return e}function pa(t){return t.x}function va(t){return t.y}fa.copy=function(){var t,n,e=new ua(this._x,this._y,this._x0,this._y0,this._x1,this._y1),r=this._root;if(!r)return e;if(!r.length)return e._root=ca(r),e;for(t=[{source:r,target:e._root=new Array(4)}];r=t.pop();)for(var i=0;i<4;++i)(n=r.source[i])&&(n.length?t.push({source:n,target:r.target[i]=new Array(4)}):r.target[i]=ca(n));return e},fa.add=function(t){var n=+this._x.call(null,t),e=+this._y.call(null,t);return ea(this.cover(n,e),n,e,t)},fa.addAll=function(t){var n,e,r,i,o=t.length,a=new Array(o),u=new Array(o),c=1/0,f=1/0,s=-1/0,l=-1/0;for(e=0;es&&(s=r),il&&(l=i));if(c>s||f>l)return this;for(this.cover(c,f).cover(s,l),e=0;et||t>=i||r>n||n>=o;)switch(u=(nh||(o=c.y0)>d||(a=c.x1)=y)<<1|t>=g)&&(c=p[p.length-1],p[p.length-1]=p[p.length-1-f],p[p.length-1-f]=c)}else{var _=t-+this._x.call(null,v.data),b=n-+this._y.call(null,v.data),m=_*_+b*b;if(m=(u=(p+g)/2))?p=u:g=u,(s=a>=(c=(v+y)/2))?v=c:y=c,n=d,!(d=d[l=s<<1|f]))return this;if(!d.length)break;(n[l+1&3]||n[l+2&3]||n[l+3&3])&&(e=n,h=l)}for(;d.data!==t;)if(r=d,!(d=d.next))return this;return(i=d.next)&&delete d.next,r?(i?r.next=i:delete r.next,this):n?(i?n[l]=i:delete n[l],(d=n[0]||n[1]||n[2]||n[3])&&d===(n[3]||n[2]||n[1]||n[0])&&!d.length&&(e?e[h]=d:this._root=d),this):(this._root=i,this)},fa.removeAll=function(t){for(var n=0,e=t.length;n1?r[0]+r.slice(2):r,+t.slice(e+1)]}function ba(t){return(t=_a(Math.abs(t)))?t[1]:NaN}var ma,xa=/^(?:(.)?([<>=^]))?([+\-( ])?([$#])?(0)?(\d+)?(,)?(\.\d+)?(~)?([a-z%])?$/i;function wa(t){return new Ma(t)}function Ma(t){if(!(n=xa.exec(t)))throw new Error("invalid format: "+t);var n;this.fill=n[1]||" ",this.align=n[2]||">",this.sign=n[3]||"-",this.symbol=n[4]||"",this.zero=!!n[5],this.width=n[6]&&+n[6],this.comma=!!n[7],this.precision=n[8]&&+n[8].slice(1),this.trim=!!n[9],this.type=n[10]||""}function Na(t,n){var e=_a(t,n);if(!e)return t+"";var r=e[0],i=e[1];return i<0?"0."+new Array(-i).join("0")+r:r.length>i+1?r.slice(0,i+1)+"."+r.slice(i+1):r+new Array(i-r.length+2).join("0")}wa.prototype=Ma.prototype,Ma.prototype.toString=function(){return this.fill+this.align+this.sign+this.symbol+(this.zero?"0":"")+(null==this.width?"":Math.max(1,0|this.width))+(this.comma?",":"")+(null==this.precision?"":"."+Math.max(0,0|this.precision))+(this.trim?"~":"")+this.type};var Aa={"%":function(t,n){return(100*t).toFixed(n)},b:function(t){return Math.round(t).toString(2)},c:function(t){return t+""},d:function(t){return Math.round(t).toString(10)},e:function(t,n){return t.toExponential(n)},f:function(t,n){return t.toFixed(n)},g:function(t,n){return t.toPrecision(n)},o:function(t){return Math.round(t).toString(8)},p:function(t,n){return Na(100*t,n)},r:Na,s:function(t,n){var e=_a(t,n);if(!e)return t+"";var r=e[0],i=e[1],o=i-(ma=3*Math.max(-8,Math.min(8,Math.floor(i/3))))+1,a=r.length;return o===a?r:o>a?r+new Array(o-a+1).join("0"):o>0?r.slice(0,o)+"."+r.slice(o):"0."+new Array(1-o).join("0")+_a(t,Math.max(0,n+o-1))[0]},X:function(t){return Math.round(t).toString(16).toUpperCase()},x:function(t){return Math.round(t).toString(16)}};function Ta(t){return t}var Sa,ka=["y","z","a","f","p","n","µ","m","","k","M","G","T","P","E","Z","Y"];function Ea(t){var n,e,r=t.grouping&&t.thousands?(n=t.grouping,e=t.thousands,function(t,r){for(var i=t.length,o=[],a=0,u=n[0],c=0;i>0&&u>0&&(c+u+1>r&&(u=Math.max(1,r-c)),o.push(t.substring(i-=u,i+u)),!((c+=u+1)>r));)u=n[a=(a+1)%n.length];return o.reverse().join(e)}):Ta,i=t.currency,o=t.decimal,a=t.numerals?function(t){return function(n){return n.replace(/[0-9]/g,function(n){return t[+n]})}}(t.numerals):Ta,u=t.percent||"%";function c(t){var n=(t=wa(t)).fill,e=t.align,c=t.sign,f=t.symbol,s=t.zero,l=t.width,h=t.comma,d=t.precision,p=t.trim,v=t.type;"n"===v?(h=!0,v="g"):Aa[v]||(null==d&&(d=12),p=!0,v="g"),(s||"0"===n&&"="===e)&&(s=!0,n="0",e="=");var g="$"===f?i[0]:"#"===f&&/[boxX]/.test(v)?"0"+v.toLowerCase():"",y="$"===f?i[1]:/[%p]/.test(v)?u:"",_=Aa[v],b=/[defgprs%]/.test(v);function m(t){var i,u,f,m=g,x=y;if("c"===v)x=_(t)+x,t="";else{var w=(t=+t)<0;if(t=_(Math.abs(t),d),p&&(t=function(t){t:for(var n,e=t.length,r=1,i=-1;r0){if(!+t[r])break t;i=0}}return i>0?t.slice(0,i)+t.slice(n+1):t}(t)),w&&0==+t&&(w=!1),m=(w?"("===c?c:"-":"-"===c||"("===c?"":c)+m,x=("s"===v?ka[8+ma/3]:"")+x+(w&&"("===c?")":""),b)for(i=-1,u=t.length;++i(f=t.charCodeAt(i))||f>57){x=(46===f?o+t.slice(i+1):t.slice(i))+x,t=t.slice(0,i);break}}h&&!s&&(t=r(t,1/0));var M=m.length+t.length+x.length,N=M>1)+m+t+x+N.slice(M);break;default:t=N+m+t+x}return a(t)}return d=null==d?6:/[gprs]/.test(v)?Math.max(1,Math.min(21,d)):Math.max(0,Math.min(20,d)),m.toString=function(){return t+""},m}return{format:c,formatPrefix:function(t,n){var e=c(((t=wa(t)).type="f",t)),r=3*Math.max(-8,Math.min(8,Math.floor(ba(n)/3))),i=Math.pow(10,-r),o=ka[8+r/3];return function(t){return e(i*t)+o}}}}function Ca(n){return Sa=Ea(n),t.format=Sa.format,t.formatPrefix=Sa.formatPrefix,Sa}function Pa(t){return Math.max(0,-ba(Math.abs(t)))}function za(t,n){return Math.max(0,3*Math.max(-8,Math.min(8,Math.floor(ba(n)/3)))-ba(Math.abs(t)))}function Ra(t,n){return t=Math.abs(t),n=Math.abs(n)-t,Math.max(0,ba(n)-ba(t))+1}function Da(){return new qa}function qa(){this.reset()}Ca({decimal:".",thousands:",",grouping:[3],currency:["$",""]}),qa.prototype={constructor:qa,reset:function(){this.s=this.t=0},add:function(t){Ua(La,t,this.t),Ua(this,La.s,this.s),this.s?this.t+=La.t:this.s=La.t},valueOf:function(){return this.s}};var La=new qa;function Ua(t,n,e){var r=t.s=n+e,i=r-n,o=r-i;t.t=n-o+(e-i)}var Oa=1e-6,Ba=1e-12,Ya=Math.PI,Fa=Ya/2,Ia=Ya/4,ja=2*Ya,Ha=180/Ya,Xa=Ya/180,Ga=Math.abs,Va=Math.atan,$a=Math.atan2,Wa=Math.cos,Za=Math.ceil,Qa=Math.exp,Ja=Math.log,Ka=Math.pow,tu=Math.sin,nu=Math.sign||function(t){return t>0?1:t<0?-1:0},eu=Math.sqrt,ru=Math.tan;function iu(t){return t>1?0:t<-1?Ya:Math.acos(t)}function ou(t){return t>1?Fa:t<-1?-Fa:Math.asin(t)}function au(t){return(t=tu(t/2))*t}function uu(){}function cu(t,n){t&&su.hasOwnProperty(t.type)&&su[t.type](t,n)}var fu={Feature:function(t,n){cu(t.geometry,n)},FeatureCollection:function(t,n){for(var e=t.features,r=-1,i=e.length;++r=0?1:-1,i=r*e,o=Wa(n=(n*=Xa)/2+Ia),a=tu(n),u=_u*a,c=yu*o+u*Wa(i),f=u*r*tu(i);bu.add($a(f,c)),gu=t,yu=o,_u=a}function Tu(t){return[$a(t[1],t[0]),ou(t[2])]}function Su(t){var n=t[0],e=t[1],r=Wa(e);return[r*Wa(n),r*tu(n),tu(e)]}function ku(t,n){return t[0]*n[0]+t[1]*n[1]+t[2]*n[2]}function Eu(t,n){return[t[1]*n[2]-t[2]*n[1],t[2]*n[0]-t[0]*n[2],t[0]*n[1]-t[1]*n[0]]}function Cu(t,n){t[0]+=n[0],t[1]+=n[1],t[2]+=n[2]}function Pu(t,n){return[t[0]*n,t[1]*n,t[2]*n]}function zu(t){var n=eu(t[0]*t[0]+t[1]*t[1]+t[2]*t[2]);t[0]/=n,t[1]/=n,t[2]/=n}var Ru,Du,qu,Lu,Uu,Ou,Bu,Yu,Fu,Iu,ju,Hu,Xu,Gu,Vu,$u,Wu,Zu,Qu,Ju,Ku,tc,nc,ec,rc,ic,oc=Da(),ac={point:uc,lineStart:fc,lineEnd:sc,polygonStart:function(){ac.point=lc,ac.lineStart=hc,ac.lineEnd=dc,oc.reset(),xu.polygonStart()},polygonEnd:function(){xu.polygonEnd(),ac.point=uc,ac.lineStart=fc,ac.lineEnd=sc,bu<0?(Ru=-(qu=180),Du=-(Lu=90)):oc>Oa?Lu=90:oc<-Oa&&(Du=-90),Iu[0]=Ru,Iu[1]=qu}};function uc(t,n){Fu.push(Iu=[Ru=t,qu=t]),nLu&&(Lu=n)}function cc(t,n){var e=Su([t*Xa,n*Xa]);if(Yu){var r=Eu(Yu,e),i=Eu([r[1],-r[0],0],r);zu(i),i=Tu(i);var o,a=t-Uu,u=a>0?1:-1,c=i[0]*Ha*u,f=Ga(a)>180;f^(u*UuLu&&(Lu=o):f^(u*Uu<(c=(c+360)%360-180)&&cLu&&(Lu=n)),f?tpc(Ru,qu)&&(qu=t):pc(t,qu)>pc(Ru,qu)&&(Ru=t):qu>=Ru?(tqu&&(qu=t)):t>Uu?pc(Ru,t)>pc(Ru,qu)&&(qu=t):pc(t,qu)>pc(Ru,qu)&&(Ru=t)}else Fu.push(Iu=[Ru=t,qu=t]);nLu&&(Lu=n),Yu=e,Uu=t}function fc(){ac.point=cc}function sc(){Iu[0]=Ru,Iu[1]=qu,ac.point=uc,Yu=null}function lc(t,n){if(Yu){var e=t-Uu;oc.add(Ga(e)>180?e+(e>0?360:-360):e)}else Ou=t,Bu=n;xu.point(t,n),cc(t,n)}function hc(){xu.lineStart()}function dc(){lc(Ou,Bu),xu.lineEnd(),Ga(oc)>Oa&&(Ru=-(qu=180)),Iu[0]=Ru,Iu[1]=qu,Yu=null}function pc(t,n){return(n-=t)<0?n+360:n}function vc(t,n){return t[0]-n[0]}function gc(t,n){return t[0]<=t[1]?t[0]<=n&&n<=t[1]:nYa?t+Math.round(-t/ja)*ja:t,n]}function Pc(t,n,e){return(t%=ja)?n||e?Ec(Rc(t),Dc(n,e)):Rc(t):n||e?Dc(n,e):Cc}function zc(t){return function(n,e){return[(n+=t)>Ya?n-ja:n<-Ya?n+ja:n,e]}}function Rc(t){var n=zc(t);return n.invert=zc(-t),n}function Dc(t,n){var e=Wa(t),r=tu(t),i=Wa(n),o=tu(n);function a(t,n){var a=Wa(n),u=Wa(t)*a,c=tu(t)*a,f=tu(n),s=f*e+u*r;return[$a(c*i-s*o,u*e-f*r),ou(s*i+c*o)]}return a.invert=function(t,n){var a=Wa(n),u=Wa(t)*a,c=tu(t)*a,f=tu(n),s=f*i-c*o;return[$a(c*i+f*o,u*e+s*r),ou(s*e-u*r)]},a}function qc(t){function n(n){return(n=t(n[0]*Xa,n[1]*Xa))[0]*=Ha,n[1]*=Ha,n}return t=Pc(t[0]*Xa,t[1]*Xa,t.length>2?t[2]*Xa:0),n.invert=function(n){return(n=t.invert(n[0]*Xa,n[1]*Xa))[0]*=Ha,n[1]*=Ha,n},n}function Lc(t,n,e,r,i,o){if(e){var a=Wa(n),u=tu(n),c=r*e;null==i?(i=n+r*ja,o=n-c/2):(i=Uc(a,i),o=Uc(a,o),(r>0?io)&&(i+=r*ja));for(var f,s=i;r>0?s>o:s1&&n.push(n.pop().concat(n.shift()))},result:function(){var e=n;return n=[],t=null,e}}}function Bc(t,n){return Ga(t[0]-n[0])=0;--o)i.point((s=f[o])[0],s[1]);else r(h.x,h.p.x,-1,i);h=h.p}f=(h=h.o).z,d=!d}while(!h.v);i.lineEnd()}}}function Ic(t){if(n=t.length){for(var n,e,r=0,i=t[0];++r=0?1:-1,A=N*M,T=A>Ya,S=v*x;if(jc.add($a(S*N*tu(A),g*w+S*Wa(A))),a+=T?M+N*ja:M,T^d>=e^b>=e){var k=Eu(Su(h),Su(_));zu(k);var E=Eu(o,k);zu(E);var C=(T^M>=0?-1:1)*ou(E[2]);(r>C||r===C&&(k[0]||k[1]))&&(u+=T^M>=0?1:-1)}}return(a<-Oa||a0){for(l||(i.polygonStart(),l=!0),i.lineStart(),t=0;t1&&2&c&&h.push(h.pop().concat(h.shift())),a.push(h.filter(Gc))}return h}}function Gc(t){return t.length>1}function Vc(t,n){return((t=t.x)[0]<0?t[1]-Fa-Oa:Fa-t[1])-((n=n.x)[0]<0?n[1]-Fa-Oa:Fa-n[1])}var $c=Xc(function(){return!0},function(t){var n,e=NaN,r=NaN,i=NaN;return{lineStart:function(){t.lineStart(),n=1},point:function(o,a){var u=o>0?Ya:-Ya,c=Ga(o-e);Ga(c-Ya)0?Fa:-Fa),t.point(i,r),t.lineEnd(),t.lineStart(),t.point(u,r),t.point(o,r),n=0):i!==u&&c>=Ya&&(Ga(e-i)Oa?Va((tu(n)*(o=Wa(r))*tu(e)-tu(r)*(i=Wa(n))*tu(t))/(i*o*a)):(n+r)/2}(e,r,o,a),t.point(i,r),t.lineEnd(),t.lineStart(),t.point(u,r),n=0),t.point(e=o,r=a),i=u},lineEnd:function(){t.lineEnd(),e=r=NaN},clean:function(){return 2-n}}},function(t,n,e,r){var i;if(null==t)i=e*Fa,r.point(-Ya,i),r.point(0,i),r.point(Ya,i),r.point(Ya,0),r.point(Ya,-i),r.point(0,-i),r.point(-Ya,-i),r.point(-Ya,0),r.point(-Ya,i);else if(Ga(t[0]-n[0])>Oa){var o=t[0]0,i=Ga(n)>Oa;function o(t,e){return Wa(t)*Wa(e)>n}function a(t,e,r){var i=[1,0,0],o=Eu(Su(t),Su(e)),a=ku(o,o),u=o[0],c=a-u*u;if(!c)return!r&&t;var f=n*a/c,s=-n*u/c,l=Eu(i,o),h=Pu(i,f);Cu(h,Pu(o,s));var d=l,p=ku(h,d),v=ku(d,d),g=p*p-v*(ku(h,h)-1);if(!(g<0)){var y=eu(g),_=Pu(d,(-p-y)/v);if(Cu(_,h),_=Tu(_),!r)return _;var b,m=t[0],x=e[0],w=t[1],M=e[1];x0^_[1]<(Ga(_[0]-m)Ya^(m<=_[0]&&_[0]<=x)){var T=Pu(d,(-p+y)/v);return Cu(T,h),[_,Tu(T)]}}}function u(n,e){var i=r?t:Ya-t,o=0;return n<-i?o|=1:n>i&&(o|=2),e<-i?o|=4:e>i&&(o|=8),o}return Xc(o,function(t){var n,e,c,f,s;return{lineStart:function(){f=c=!1,s=1},point:function(l,h){var d,p=[l,h],v=o(l,h),g=r?v?0:u(l,h):v?u(l+(l<0?Ya:-Ya),h):0;if(!n&&(f=c=v)&&t.lineStart(),v!==c&&(!(d=a(n,p))||Bc(n,d)||Bc(p,d))&&(p[0]+=Oa,p[1]+=Oa,v=o(p[0],p[1])),v!==c)s=0,v?(t.lineStart(),d=a(p,n),t.point(d[0],d[1])):(d=a(n,p),t.point(d[0],d[1]),t.lineEnd()),n=d;else if(i&&n&&r^v){var y;g&e||!(y=a(p,n,!0))||(s=0,r?(t.lineStart(),t.point(y[0][0],y[0][1]),t.point(y[1][0],y[1][1]),t.lineEnd()):(t.point(y[1][0],y[1][1]),t.lineEnd(),t.lineStart(),t.point(y[0][0],y[0][1])))}!v||n&&Bc(n,p)||t.point(p[0],p[1]),n=p,c=v,e=g},lineEnd:function(){c&&t.lineEnd(),n=null},clean:function(){return s|(f&&c)<<1}}},function(n,r,i,o){Lc(o,t,e,i,n,r)},r?[0,-t]:[-Ya,t-Ya])}var Zc=1e9,Qc=-Zc;function Jc(t,n,e,r){function i(i,o){return t<=i&&i<=e&&n<=o&&o<=r}function o(i,o,u,f){var s=0,l=0;if(null==i||(s=a(i,u))!==(l=a(o,u))||c(i,o)<0^u>0)do{f.point(0===s||3===s?t:e,s>1?r:n)}while((s=(s+u+4)%4)!==l);else f.point(o[0],o[1])}function a(r,i){return Ga(r[0]-t)0?0:3:Ga(r[0]-e)0?2:1:Ga(r[1]-n)0?1:0:i>0?3:2}function u(t,n){return c(t.x,n.x)}function c(t,n){var e=a(t,1),r=a(n,1);return e!==r?e-r:0===e?n[1]-t[1]:1===e?t[0]-n[0]:2===e?t[1]-n[1]:n[0]-t[0]}return function(a){var c,f,s,l,h,d,p,v,g,y,_,b=a,m=Oc(),x={point:w,lineStart:function(){x.point=M,f&&f.push(s=[]);y=!0,g=!1,p=v=NaN},lineEnd:function(){c&&(M(l,h),d&&g&&m.rejoin(),c.push(m.result()));x.point=w,g&&b.lineEnd()},polygonStart:function(){b=m,c=[],f=[],_=!0},polygonEnd:function(){var n=function(){for(var n=0,e=0,i=f.length;er&&(h-o)*(r-a)>(d-a)*(t-o)&&++n:d<=r&&(h-o)*(r-a)<(d-a)*(t-o)&&--n;return n}(),e=_&&n,i=(c=T(c)).length;(e||i)&&(a.polygonStart(),e&&(a.lineStart(),o(null,null,1,a),a.lineEnd()),i&&Fc(c,u,n,o,a),a.polygonEnd());b=a,c=f=s=null}};function w(t,n){i(t,n)&&b.point(t,n)}function M(o,a){var u=i(o,a);if(f&&s.push([o,a]),y)l=o,h=a,d=u,y=!1,u&&(b.lineStart(),b.point(o,a));else if(u&&g)b.point(o,a);else{var c=[p=Math.max(Qc,Math.min(Zc,p)),v=Math.max(Qc,Math.min(Zc,v))],m=[o=Math.max(Qc,Math.min(Zc,o)),a=Math.max(Qc,Math.min(Zc,a))];!function(t,n,e,r,i,o){var a,u=t[0],c=t[1],f=0,s=1,l=n[0]-u,h=n[1]-c;if(a=e-u,l||!(a>0)){if(a/=l,l<0){if(a0){if(a>s)return;a>f&&(f=a)}if(a=i-u,l||!(a<0)){if(a/=l,l<0){if(a>s)return;a>f&&(f=a)}else if(l>0){if(a0)){if(a/=h,h<0){if(a0){if(a>s)return;a>f&&(f=a)}if(a=o-c,h||!(a<0)){if(a/=h,h<0){if(a>s)return;a>f&&(f=a)}else if(h>0){if(a0&&(t[0]=u+f*l,t[1]=c+f*h),s<1&&(n[0]=u+s*l,n[1]=c+s*h),!0}}}}}(c,m,t,n,e,r)?u&&(b.lineStart(),b.point(o,a),_=!1):(g||(b.lineStart(),b.point(c[0],c[1])),b.point(m[0],m[1]),u||b.lineEnd(),_=!1)}p=o,v=a,g=u}return x}}var Kc,tf,nf,ef=Da(),rf={sphere:uu,point:uu,lineStart:function(){rf.point=af,rf.lineEnd=of},lineEnd:uu,polygonStart:uu,polygonEnd:uu};function of(){rf.point=rf.lineEnd=uu}function af(t,n){Kc=t*=Xa,tf=tu(n*=Xa),nf=Wa(n),rf.point=uf}function uf(t,n){t*=Xa;var e=tu(n*=Xa),r=Wa(n),i=Ga(t-Kc),o=Wa(i),a=r*tu(i),u=nf*e-tf*r*o,c=tf*e+nf*r*o;ef.add($a(eu(a*a+u*u),c)),Kc=t,tf=e,nf=r}function cf(t){return ef.reset(),du(t,rf),+ef}var ff=[null,null],sf={type:"LineString",coordinates:ff};function lf(t,n){return ff[0]=t,ff[1]=n,cf(sf)}var hf={Feature:function(t,n){return pf(t.geometry,n)},FeatureCollection:function(t,n){for(var e=t.features,r=-1,i=e.length;++rOa}).map(c)).concat(g(Za(o/d)*d,i,d).filter(function(t){return Ga(t%v)>Oa}).map(f))}return _.lines=function(){return b().map(function(t){return{type:"LineString",coordinates:t}})},_.outline=function(){return{type:"Polygon",coordinates:[s(r).concat(l(a).slice(1),s(e).reverse().slice(1),l(u).reverse().slice(1))]}},_.extent=function(t){return arguments.length?_.extentMajor(t).extentMinor(t):_.extentMinor()},_.extentMajor=function(t){return arguments.length?(r=+t[0][0],e=+t[1][0],u=+t[0][1],a=+t[1][1],r>e&&(t=r,r=e,e=t),u>a&&(t=u,u=a,a=t),_.precision(y)):[[r,u],[e,a]]},_.extentMinor=function(e){return arguments.length?(n=+e[0][0],t=+e[1][0],o=+e[0][1],i=+e[1][1],n>t&&(e=n,n=t,t=e),o>i&&(e=o,o=i,i=e),_.precision(y)):[[n,o],[t,i]]},_.step=function(t){return arguments.length?_.stepMajor(t).stepMinor(t):_.stepMinor()},_.stepMajor=function(t){return arguments.length?(p=+t[0],v=+t[1],_):[p,v]},_.stepMinor=function(t){return arguments.length?(h=+t[0],d=+t[1],_):[h,d]},_.precision=function(h){return arguments.length?(y=+h,c=mf(o,i,90),f=xf(n,t,y),s=mf(u,a,90),l=xf(r,e,y),_):y},_.extentMajor([[-180,-90+Oa],[180,90-Oa]]).extentMinor([[-180,-80-Oa],[180,80+Oa]])}function Mf(t){return t}var Nf,Af,Tf,Sf,kf=Da(),Ef=Da(),Cf={point:uu,lineStart:uu,lineEnd:uu,polygonStart:function(){Cf.lineStart=Pf,Cf.lineEnd=Df},polygonEnd:function(){Cf.lineStart=Cf.lineEnd=Cf.point=uu,kf.add(Ga(Ef)),Ef.reset()},result:function(){var t=kf/2;return kf.reset(),t}};function Pf(){Cf.point=zf}function zf(t,n){Cf.point=Rf,Nf=Tf=t,Af=Sf=n}function Rf(t,n){Ef.add(Sf*t-Tf*n),Tf=t,Sf=n}function Df(){Rf(Nf,Af)}var qf=1/0,Lf=qf,Uf=-qf,Of=Uf,Bf={point:function(t,n){tUf&&(Uf=t);nOf&&(Of=n)},lineStart:uu,lineEnd:uu,polygonStart:uu,polygonEnd:uu,result:function(){var t=[[qf,Lf],[Uf,Of]];return Uf=Of=-(Lf=qf=1/0),t}};var Yf,Ff,If,jf,Hf=0,Xf=0,Gf=0,Vf=0,$f=0,Wf=0,Zf=0,Qf=0,Jf=0,Kf={point:ts,lineStart:ns,lineEnd:is,polygonStart:function(){Kf.lineStart=os,Kf.lineEnd=as},polygonEnd:function(){Kf.point=ts,Kf.lineStart=ns,Kf.lineEnd=is},result:function(){var t=Jf?[Zf/Jf,Qf/Jf]:Wf?[Vf/Wf,$f/Wf]:Gf?[Hf/Gf,Xf/Gf]:[NaN,NaN];return Hf=Xf=Gf=Vf=$f=Wf=Zf=Qf=Jf=0,t}};function ts(t,n){Hf+=t,Xf+=n,++Gf}function ns(){Kf.point=es}function es(t,n){Kf.point=rs,ts(If=t,jf=n)}function rs(t,n){var e=t-If,r=n-jf,i=eu(e*e+r*r);Vf+=i*(If+t)/2,$f+=i*(jf+n)/2,Wf+=i,ts(If=t,jf=n)}function is(){Kf.point=ts}function os(){Kf.point=us}function as(){cs(Yf,Ff)}function us(t,n){Kf.point=cs,ts(Yf=If=t,Ff=jf=n)}function cs(t,n){var e=t-If,r=n-jf,i=eu(e*e+r*r);Vf+=i*(If+t)/2,$f+=i*(jf+n)/2,Wf+=i,Zf+=(i=jf*t-If*n)*(If+t),Qf+=i*(jf+n),Jf+=3*i,ts(If=t,jf=n)}function fs(t){this._context=t}fs.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(){0===this._line&&this._context.closePath(),this._point=NaN},point:function(t,n){switch(this._point){case 0:this._context.moveTo(t,n),this._point=1;break;case 1:this._context.lineTo(t,n);break;default:this._context.moveTo(t+this._radius,n),this._context.arc(t,n,this._radius,0,ja)}},result:uu};var ss,ls,hs,ds,ps,vs=Da(),gs={point:uu,lineStart:function(){gs.point=ys},lineEnd:function(){ss&&_s(ls,hs),gs.point=uu},polygonStart:function(){ss=!0},polygonEnd:function(){ss=null},result:function(){var t=+vs;return vs.reset(),t}};function ys(t,n){gs.point=_s,ls=ds=t,hs=ps=n}function _s(t,n){ds-=t,ps-=n,vs.add(eu(ds*ds+ps*ps)),ds=t,ps=n}function bs(){this._string=[]}function ms(t){return"m0,"+t+"a"+t+","+t+" 0 1,1 0,"+-2*t+"a"+t+","+t+" 0 1,1 0,"+2*t+"z"}function xs(t){return function(n){var e=new ws;for(var r in t)e[r]=t[r];return e.stream=n,e}}function ws(){}function Ms(t,n,e){var r=t.clipExtent&&t.clipExtent();return t.scale(150).translate([0,0]),null!=r&&t.clipExtent(null),du(e,t.stream(Bf)),n(Bf.result()),null!=r&&t.clipExtent(r),t}function Ns(t,n,e){return Ms(t,function(e){var r=n[1][0]-n[0][0],i=n[1][1]-n[0][1],o=Math.min(r/(e[1][0]-e[0][0]),i/(e[1][1]-e[0][1])),a=+n[0][0]+(r-o*(e[1][0]+e[0][0]))/2,u=+n[0][1]+(i-o*(e[1][1]+e[0][1]))/2;t.scale(150*o).translate([a,u])},e)}function As(t,n,e){return Ns(t,[[0,0],n],e)}function Ts(t,n,e){return Ms(t,function(e){var r=+n,i=r/(e[1][0]-e[0][0]),o=(r-i*(e[1][0]+e[0][0]))/2,a=-i*e[0][1];t.scale(150*i).translate([o,a])},e)}function Ss(t,n,e){return Ms(t,function(e){var r=+n,i=r/(e[1][1]-e[0][1]),o=-i*e[0][0],a=(r-i*(e[1][1]+e[0][1]))/2;t.scale(150*i).translate([o,a])},e)}bs.prototype={_radius:4.5,_circle:ms(4.5),pointRadius:function(t){return(t=+t)!==this._radius&&(this._radius=t,this._circle=null),this},polygonStart:function(){this._line=0},polygonEnd:function(){this._line=NaN},lineStart:function(){this._point=0},lineEnd:function(){0===this._line&&this._string.push("Z"),this._point=NaN},point:function(t,n){switch(this._point){case 0:this._string.push("M",t,",",n),this._point=1;break;case 1:this._string.push("L",t,",",n);break;default:null==this._circle&&(this._circle=ms(this._radius)),this._string.push("M",t,",",n,this._circle)}},result:function(){if(this._string.length){var t=this._string.join("");return this._string=[],t}return null}},ws.prototype={constructor:ws,point:function(t,n){this.stream.point(t,n)},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()}};var ks=16,Es=Wa(30*Xa);function Cs(t,n){return+n?function(t,n){function e(r,i,o,a,u,c,f,s,l,h,d,p,v,g){var y=f-r,_=s-i,b=y*y+_*_;if(b>4*n&&v--){var m=a+h,x=u+d,w=c+p,M=eu(m*m+x*x+w*w),N=ou(w/=M),A=Ga(Ga(w)-1)n||Ga((y*E+_*C)/b-.5)>.3||a*h+u*d+c*p2?t[2]%360*Xa:0,S()):[g*Ha,y*Ha,_*Ha]},A.angle=function(t){return arguments.length?(b=t%360*Xa,S()):b*Ha},A.precision=function(t){return arguments.length?(a=Cs(u,N=t*t),k()):eu(N)},A.fitExtent=function(t,n){return Ns(A,t,n)},A.fitSize=function(t,n){return As(A,t,n)},A.fitWidth=function(t,n){return Ts(A,t,n)},A.fitHeight=function(t,n){return Ss(A,t,n)},function(){return n=t.apply(this,arguments),A.invert=n.invert&&T,S()}}function qs(t){var n=0,e=Ya/3,r=Ds(t),i=r(n,e);return i.parallels=function(t){return arguments.length?r(n=t[0]*Xa,e=t[1]*Xa):[n*Ha,e*Ha]},i}function Ls(t,n){var e=tu(t),r=(e+tu(n))/2;if(Ga(r)0?n<-Fa+Oa&&(n=-Fa+Oa):n>Fa-Oa&&(n=Fa-Oa);var e=i/Ka(Xs(n),r);return[e*tu(r*t),i-e*Wa(r*t)]}return o.invert=function(t,n){var e=i-n,o=nu(r)*eu(t*t+e*e);return[$a(t,Ga(e))/r*nu(e),2*Va(Ka(i/o,1/r))-Fa]},o}function Vs(t,n){return[t,n]}function $s(t,n){var e=Wa(t),r=t===n?tu(t):(e-Wa(n))/(n-t),i=e/r+t;if(Ga(r)=0;)n+=e[r].value;else n=1;t.value=n}function ll(t,n){var e,r,i,o,a,u=new vl(t),c=+t.value&&(u.value=t.value),f=[u];for(null==n&&(n=hl);e=f.pop();)if(c&&(e.value=+e.data.value),(i=n(e.data))&&(a=i.length))for(e.children=new Array(a),o=a-1;o>=0;--o)f.push(r=e.children[o]=new vl(i[o])),r.parent=e,r.depth=e.depth+1;return u.eachBefore(pl)}function hl(t){return t.children}function dl(t){t.data=t.data.data}function pl(t){var n=0;do{t.height=n}while((t=t.parent)&&t.height<++n)}function vl(t){this.data=t,this.depth=this.height=0,this.parent=null}tl.invert=function(t,n){for(var e,r=n,i=r*r,o=i*i*i,a=0;a<12&&(o=(i=(r-=e=(r*(Ws+Zs*i+o*(Qs+Js*i))-n)/(Ws+3*Zs*i+o*(7*Qs+9*Js*i)))*r)*i*i,!(Ga(e)Oa&&--i>0);return[t/(.8707+(o=r*r)*(o*(o*o*o*(.003971-.001529*o)-.013791)-.131979)),r]},il.invert=Ys(ou),ol.invert=Ys(function(t){return 2*Va(t)}),al.invert=function(t,n){return[-n,2*Va(Qa(t))-Fa]},vl.prototype=ll.prototype={constructor:vl,count:function(){return this.eachAfter(sl)},each:function(t){var n,e,r,i,o=this,a=[o];do{for(n=a.reverse(),a=[];o=n.pop();)if(t(o),e=o.children)for(r=0,i=e.length;r=0;--e)i.push(n[e]);return this},sum:function(t){return this.eachAfter(function(n){for(var e=+t(n.data)||0,r=n.children,i=r&&r.length;--i>=0;)e+=r[i].value;n.value=e})},sort:function(t){return this.eachBefore(function(n){n.children&&n.children.sort(t)})},path:function(t){for(var n=this,e=function(t,n){if(t===n)return t;var e=t.ancestors(),r=n.ancestors(),i=null;for(t=e.pop(),n=r.pop();t===n;)i=t,t=e.pop(),n=r.pop();return i}(n,t),r=[n];n!==e;)n=n.parent,r.push(n);for(var i=r.length;t!==e;)r.splice(i,0,t),t=t.parent;return r},ancestors:function(){for(var t=this,n=[t];t=t.parent;)n.push(t);return n},descendants:function(){var t=[];return this.each(function(n){t.push(n)}),t},leaves:function(){var t=[];return this.eachBefore(function(n){n.children||t.push(n)}),t},links:function(){var t=this,n=[];return t.each(function(e){e!==t&&n.push({source:e.parent,target:e})}),n},copy:function(){return ll(this).eachBefore(dl)}};var gl=Array.prototype.slice;function yl(t){for(var n,e,r=0,i=(t=function(t){for(var n,e,r=t.length;r;)e=Math.random()*r--|0,n=t[r],t[r]=t[e],t[e]=n;return t}(gl.call(t))).length,o=[];r0&&e*e>r*r+i*i}function xl(t,n){for(var e=0;e(a*=a)?(r=(f+a-i)/(2*f),o=Math.sqrt(Math.max(0,a/f-r*r)),e.x=t.x-r*u-o*c,e.y=t.y-r*c+o*u):(r=(f+i-a)/(2*f),o=Math.sqrt(Math.max(0,i/f-r*r)),e.x=n.x+r*u-o*c,e.y=n.y+r*c+o*u)):(e.x=n.x+e.r,e.y=n.y)}function Tl(t,n){var e=t.r+n.r-1e-6,r=n.x-t.x,i=n.y-t.y;return e>0&&e*e>r*r+i*i}function Sl(t){var n=t._,e=t.next._,r=n.r+e.r,i=(n.x*e.r+e.x*n.r)/r,o=(n.y*e.r+e.y*n.r)/r;return i*i+o*o}function kl(t){this._=t,this.next=null,this.previous=null}function El(t){if(!(i=t.length))return 0;var n,e,r,i,o,a,u,c,f,s,l;if((n=t[0]).x=0,n.y=0,!(i>1))return n.r;if(e=t[1],n.x=-e.r,e.x=n.r,e.y=0,!(i>2))return n.r+e.r;Al(e,n,r=t[2]),n=new kl(n),e=new kl(e),r=new kl(r),n.next=r.previous=e,e.next=n.previous=r,r.next=e.previous=n;t:for(u=3;uh&&(h=u),g=s*s*v,(d=Math.max(h/g,g/l))>p){s-=u;break}p=d}y.push(a={value:s,dice:c1?n:1)},e}(Ql);var th=function t(n){function e(t,e,r,i,o){if((a=t._squarify)&&a.ratio===n)for(var a,u,c,f,s,l=-1,h=a.length,d=t.value;++l1?n:1)},e}(Ql);function nh(t,n){return t[0]-n[0]||t[1]-n[1]}function eh(t){for(var n,e,r,i=t.length,o=[0,1],a=2,u=2;u1&&(n=t[o[a-2]],e=t[o[a-1]],r=t[u],(e[0]-n[0])*(r[1]-n[1])-(e[1]-n[1])*(r[0]-n[0])<=0);)--a;o[a++]=u}return o.slice(0,a)}function rh(){return Math.random()}var ih=function t(n){function e(t,e){return t=null==t?0:+t,e=null==e?1:+e,1===arguments.length?(e=t,t=0):e-=t,function(){return n()*e+t}}return e.source=t,e}(rh),oh=function t(n){function e(t,e){var r,i;return t=null==t?0:+t,e=null==e?1:+e,function(){var o;if(null!=r)o=r,r=null;else do{r=2*n()-1,o=2*n()-1,i=r*r+o*o}while(!i||i>1);return t+e*o*Math.sqrt(-2*Math.log(i)/i)}}return e.source=t,e}(rh),ah=function t(n){function e(){var t=oh.source(n).apply(this,arguments);return function(){return Math.exp(t())}}return e.source=t,e}(rh),uh=function t(n){function e(t){return function(){for(var e=0,r=0;rr&&(n=e,e=r,r=n),function(t){return Math.max(e,Math.min(r,t))}}function Mh(t,n,e){var r=t[0],i=t[1],o=n[0],a=n[1];return i2?Nh:Mh,i=o=null,l}function l(n){return isNaN(n=+n)?e:(i||(i=r(a.map(t),u,c)))(t(f(n)))}return l.invert=function(e){return f(n((o||(o=r(u,a.map(t),he)))(e)))},l.domain=function(t){return arguments.length?(a=dh.call(t,_h),f===mh||(f=wh(a)),s()):a.slice()},l.range=function(t){return arguments.length?(u=ph.call(t),s()):u.slice()},l.rangeRound=function(t){return u=ph.call(t),c=_e,s()},l.clamp=function(t){return arguments.length?(f=t?wh(a):mh,l):f!==mh},l.interpolate=function(t){return arguments.length?(c=t,s()):c},l.unknown=function(t){return arguments.length?(e=t,l):e},function(e,r){return t=e,n=r,s()}}function Sh(t,n){return Th()(t,n)}function kh(n,e,r,i){var o,a=w(n,e,r);switch((i=wa(null==i?",f":i)).type){case"s":var u=Math.max(Math.abs(n),Math.abs(e));return null!=i.precision||isNaN(o=za(a,u))||(i.precision=o),t.formatPrefix(i,u);case"":case"e":case"g":case"p":case"r":null!=i.precision||isNaN(o=Ra(a,Math.max(Math.abs(n),Math.abs(e))))||(i.precision=o-("e"===i.type));break;case"f":case"%":null!=i.precision||isNaN(o=Pa(a))||(i.precision=o-2*("%"===i.type))}return t.format(i)}function Eh(t){var n=t.domain;return t.ticks=function(t){var e=n();return m(e[0],e[e.length-1],null==t?10:t)},t.tickFormat=function(t,e){var r=n();return kh(r[0],r[r.length-1],null==t?10:t,e)},t.nice=function(e){null==e&&(e=10);var r,i=n(),o=0,a=i.length-1,u=i[o],c=i[a];return c0?r=x(u=Math.floor(u/r)*r,c=Math.ceil(c/r)*r,e):r<0&&(r=x(u=Math.ceil(u*r)/r,c=Math.floor(c*r)/r,e)),r>0?(i[o]=Math.floor(u/r)*r,i[a]=Math.ceil(c/r)*r,n(i)):r<0&&(i[o]=Math.ceil(u*r)/r,i[a]=Math.floor(c*r)/r,n(i)),t},t}function Ch(t,n){var e,r=0,i=(t=t.slice()).length-1,o=t[r],a=t[i];return a0){for(;hc)break;v.push(l)}}else for(;h=1;--s)if(!((l=f*s)c)break;v.push(l)}}else v=m(h,d,Math.min(d-h,p)).map(r);return n?v.reverse():v},i.tickFormat=function(n,o){if(null==o&&(o=10===a?".0e":","),"function"!=typeof o&&(o=t.format(o)),n===1/0)return o;null==n&&(n=10);var u=Math.max(1,a*n/i.ticks().length);return function(t){var n=t/r(Math.round(e(t)));return n*a0))return u;do{u.push(a=new Date(+e)),n(e,o),t(e)}while(a=n)for(;t(n),!e(n);)n.setTime(n-1)},function(t,r){if(t>=t)if(r<0)for(;++r<=0;)for(;n(t,-1),!e(t););else for(;--r>=0;)for(;n(t,1),!e(t););})},e&&(i.count=function(n,r){return Gh.setTime(+n),Vh.setTime(+r),t(Gh),t(Vh),Math.floor(e(Gh,Vh))},i.every=function(t){return t=Math.floor(t),isFinite(t)&&t>0?t>1?i.filter(r?function(n){return r(n)%t==0}:function(n){return i.count(0,n)%t==0}):i:null}),i}var Wh=$h(function(){},function(t,n){t.setTime(+t+n)},function(t,n){return n-t});Wh.every=function(t){return t=Math.floor(t),isFinite(t)&&t>0?t>1?$h(function(n){n.setTime(Math.floor(n/t)*t)},function(n,e){n.setTime(+n+e*t)},function(n,e){return(e-n)/t}):Wh:null};var Zh=Wh.range,Qh=6e4,Jh=6048e5,Kh=$h(function(t){t.setTime(t-t.getMilliseconds())},function(t,n){t.setTime(+t+1e3*n)},function(t,n){return(n-t)/1e3},function(t){return t.getUTCSeconds()}),td=Kh.range,nd=$h(function(t){t.setTime(t-t.getMilliseconds()-1e3*t.getSeconds())},function(t,n){t.setTime(+t+n*Qh)},function(t,n){return(n-t)/Qh},function(t){return t.getMinutes()}),ed=nd.range,rd=$h(function(t){t.setTime(t-t.getMilliseconds()-1e3*t.getSeconds()-t.getMinutes()*Qh)},function(t,n){t.setTime(+t+36e5*n)},function(t,n){return(n-t)/36e5},function(t){return t.getHours()}),id=rd.range,od=$h(function(t){t.setHours(0,0,0,0)},function(t,n){t.setDate(t.getDate()+n)},function(t,n){return(n-t-(n.getTimezoneOffset()-t.getTimezoneOffset())*Qh)/864e5},function(t){return t.getDate()-1}),ad=od.range;function ud(t){return $h(function(n){n.setDate(n.getDate()-(n.getDay()+7-t)%7),n.setHours(0,0,0,0)},function(t,n){t.setDate(t.getDate()+7*n)},function(t,n){return(n-t-(n.getTimezoneOffset()-t.getTimezoneOffset())*Qh)/Jh})}var cd=ud(0),fd=ud(1),sd=ud(2),ld=ud(3),hd=ud(4),dd=ud(5),pd=ud(6),vd=cd.range,gd=fd.range,yd=sd.range,_d=ld.range,bd=hd.range,md=dd.range,xd=pd.range,wd=$h(function(t){t.setDate(1),t.setHours(0,0,0,0)},function(t,n){t.setMonth(t.getMonth()+n)},function(t,n){return n.getMonth()-t.getMonth()+12*(n.getFullYear()-t.getFullYear())},function(t){return t.getMonth()}),Md=wd.range,Nd=$h(function(t){t.setMonth(0,1),t.setHours(0,0,0,0)},function(t,n){t.setFullYear(t.getFullYear()+n)},function(t,n){return n.getFullYear()-t.getFullYear()},function(t){return t.getFullYear()});Nd.every=function(t){return isFinite(t=Math.floor(t))&&t>0?$h(function(n){n.setFullYear(Math.floor(n.getFullYear()/t)*t),n.setMonth(0,1),n.setHours(0,0,0,0)},function(n,e){n.setFullYear(n.getFullYear()+e*t)}):null};var Ad=Nd.range,Td=$h(function(t){t.setUTCSeconds(0,0)},function(t,n){t.setTime(+t+n*Qh)},function(t,n){return(n-t)/Qh},function(t){return t.getUTCMinutes()}),Sd=Td.range,kd=$h(function(t){t.setUTCMinutes(0,0,0)},function(t,n){t.setTime(+t+36e5*n)},function(t,n){return(n-t)/36e5},function(t){return t.getUTCHours()}),Ed=kd.range,Cd=$h(function(t){t.setUTCHours(0,0,0,0)},function(t,n){t.setUTCDate(t.getUTCDate()+n)},function(t,n){return(n-t)/864e5},function(t){return t.getUTCDate()-1}),Pd=Cd.range;function zd(t){return $h(function(n){n.setUTCDate(n.getUTCDate()-(n.getUTCDay()+7-t)%7),n.setUTCHours(0,0,0,0)},function(t,n){t.setUTCDate(t.getUTCDate()+7*n)},function(t,n){return(n-t)/Jh})}var Rd=zd(0),Dd=zd(1),qd=zd(2),Ld=zd(3),Ud=zd(4),Od=zd(5),Bd=zd(6),Yd=Rd.range,Fd=Dd.range,Id=qd.range,jd=Ld.range,Hd=Ud.range,Xd=Od.range,Gd=Bd.range,Vd=$h(function(t){t.setUTCDate(1),t.setUTCHours(0,0,0,0)},function(t,n){t.setUTCMonth(t.getUTCMonth()+n)},function(t,n){return n.getUTCMonth()-t.getUTCMonth()+12*(n.getUTCFullYear()-t.getUTCFullYear())},function(t){return t.getUTCMonth()}),$d=Vd.range,Wd=$h(function(t){t.setUTCMonth(0,1),t.setUTCHours(0,0,0,0)},function(t,n){t.setUTCFullYear(t.getUTCFullYear()+n)},function(t,n){return n.getUTCFullYear()-t.getUTCFullYear()},function(t){return t.getUTCFullYear()});Wd.every=function(t){return isFinite(t=Math.floor(t))&&t>0?$h(function(n){n.setUTCFullYear(Math.floor(n.getUTCFullYear()/t)*t),n.setUTCMonth(0,1),n.setUTCHours(0,0,0,0)},function(n,e){n.setUTCFullYear(n.getUTCFullYear()+e*t)}):null};var Zd=Wd.range;function Qd(t){if(0<=t.y&&t.y<100){var n=new Date(-1,t.m,t.d,t.H,t.M,t.S,t.L);return n.setFullYear(t.y),n}return new Date(t.y,t.m,t.d,t.H,t.M,t.S,t.L)}function Jd(t){if(0<=t.y&&t.y<100){var n=new Date(Date.UTC(-1,t.m,t.d,t.H,t.M,t.S,t.L));return n.setUTCFullYear(t.y),n}return new Date(Date.UTC(t.y,t.m,t.d,t.H,t.M,t.S,t.L))}function Kd(t){return{y:t,m:0,d:1,H:0,M:0,S:0,L:0}}function tp(t){var n=t.dateTime,e=t.date,r=t.time,i=t.periods,o=t.days,a=t.shortDays,u=t.months,c=t.shortMonths,f=cp(i),s=fp(i),l=cp(o),h=fp(o),d=cp(a),p=fp(a),v=cp(u),g=fp(u),y=cp(c),_=fp(c),b={a:function(t){return a[t.getDay()]},A:function(t){return o[t.getDay()]},b:function(t){return c[t.getMonth()]},B:function(t){return u[t.getMonth()]},c:null,d:Ep,e:Ep,f:Dp,H:Cp,I:Pp,j:zp,L:Rp,m:qp,M:Lp,p:function(t){return i[+(t.getHours()>=12)]},Q:sv,s:lv,S:Up,u:Op,U:Bp,V:Yp,w:Fp,W:Ip,x:null,X:null,y:jp,Y:Hp,Z:Xp,"%":fv},m={a:function(t){return a[t.getUTCDay()]},A:function(t){return o[t.getUTCDay()]},b:function(t){return c[t.getUTCMonth()]},B:function(t){return u[t.getUTCMonth()]},c:null,d:Gp,e:Gp,f:Qp,H:Vp,I:$p,j:Wp,L:Zp,m:Jp,M:Kp,p:function(t){return i[+(t.getUTCHours()>=12)]},Q:sv,s:lv,S:tv,u:nv,U:ev,V:rv,w:iv,W:ov,x:null,X:null,y:av,Y:uv,Z:cv,"%":fv},x={a:function(t,n,e){var r=d.exec(n.slice(e));return r?(t.w=p[r[0].toLowerCase()],e+r[0].length):-1},A:function(t,n,e){var r=l.exec(n.slice(e));return r?(t.w=h[r[0].toLowerCase()],e+r[0].length):-1},b:function(t,n,e){var r=y.exec(n.slice(e));return r?(t.m=_[r[0].toLowerCase()],e+r[0].length):-1},B:function(t,n,e){var r=v.exec(n.slice(e));return r?(t.m=g[r[0].toLowerCase()],e+r[0].length):-1},c:function(t,e,r){return N(t,n,e,r)},d:bp,e:bp,f:Ap,H:xp,I:xp,j:mp,L:Np,m:_p,M:wp,p:function(t,n,e){var r=f.exec(n.slice(e));return r?(t.p=s[r[0].toLowerCase()],e+r[0].length):-1},Q:Sp,s:kp,S:Mp,u:lp,U:hp,V:dp,w:sp,W:pp,x:function(t,n,r){return N(t,e,n,r)},X:function(t,n,e){return N(t,r,n,e)},y:gp,Y:vp,Z:yp,"%":Tp};function w(t,n){return function(e){var r,i,o,a=[],u=-1,c=0,f=t.length;for(e instanceof Date||(e=new Date(+e));++u53)return null;"w"in o||(o.w=1),"Z"in o?(i=(r=Jd(Kd(o.y))).getUTCDay(),r=i>4||0===i?Dd.ceil(r):Dd(r),r=Cd.offset(r,7*(o.V-1)),o.y=r.getUTCFullYear(),o.m=r.getUTCMonth(),o.d=r.getUTCDate()+(o.w+6)%7):(i=(r=n(Kd(o.y))).getDay(),r=i>4||0===i?fd.ceil(r):fd(r),r=od.offset(r,7*(o.V-1)),o.y=r.getFullYear(),o.m=r.getMonth(),o.d=r.getDate()+(o.w+6)%7)}else("W"in o||"U"in o)&&("w"in o||(o.w="u"in o?o.u%7:"W"in o?1:0),i="Z"in o?Jd(Kd(o.y)).getUTCDay():n(Kd(o.y)).getDay(),o.m=0,o.d="W"in o?(o.w+6)%7+7*o.W-(i+5)%7:o.w+7*o.U-(i+6)%7);return"Z"in o?(o.H+=o.Z/100|0,o.M+=o.Z%100,Jd(o)):n(o)}}function N(t,n,e,r){for(var i,o,a=0,u=n.length,c=e.length;a=c)return-1;if(37===(i=n.charCodeAt(a++))){if(i=n.charAt(a++),!(o=x[i in ep?n.charAt(a++):i])||(r=o(t,e,r))<0)return-1}else if(i!=e.charCodeAt(r++))return-1}return r}return b.x=w(e,b),b.X=w(r,b),b.c=w(n,b),m.x=w(e,m),m.X=w(r,m),m.c=w(n,m),{format:function(t){var n=w(t+="",b);return n.toString=function(){return t},n},parse:function(t){var n=M(t+="",Qd);return n.toString=function(){return t},n},utcFormat:function(t){var n=w(t+="",m);return n.toString=function(){return t},n},utcParse:function(t){var n=M(t,Jd);return n.toString=function(){return t},n}}}var np,ep={"-":"",_:" ",0:"0"},rp=/^\s*\d+/,ip=/^%/,op=/[\\^$*+?|[\]().{}]/g;function ap(t,n,e){var r=t<0?"-":"",i=(r?-t:t)+"",o=i.length;return r+(o68?1900:2e3),e+r[0].length):-1}function yp(t,n,e){var r=/^(Z)|([+-]\d\d)(?::?(\d\d))?/.exec(n.slice(e,e+6));return r?(t.Z=r[1]?0:-(r[2]+(r[3]||"00")),e+r[0].length):-1}function _p(t,n,e){var r=rp.exec(n.slice(e,e+2));return r?(t.m=r[0]-1,e+r[0].length):-1}function bp(t,n,e){var r=rp.exec(n.slice(e,e+2));return r?(t.d=+r[0],e+r[0].length):-1}function mp(t,n,e){var r=rp.exec(n.slice(e,e+3));return r?(t.m=0,t.d=+r[0],e+r[0].length):-1}function xp(t,n,e){var r=rp.exec(n.slice(e,e+2));return r?(t.H=+r[0],e+r[0].length):-1}function wp(t,n,e){var r=rp.exec(n.slice(e,e+2));return r?(t.M=+r[0],e+r[0].length):-1}function Mp(t,n,e){var r=rp.exec(n.slice(e,e+2));return r?(t.S=+r[0],e+r[0].length):-1}function Np(t,n,e){var r=rp.exec(n.slice(e,e+3));return r?(t.L=+r[0],e+r[0].length):-1}function Ap(t,n,e){var r=rp.exec(n.slice(e,e+6));return r?(t.L=Math.floor(r[0]/1e3),e+r[0].length):-1}function Tp(t,n,e){var r=ip.exec(n.slice(e,e+1));return r?e+r[0].length:-1}function Sp(t,n,e){var r=rp.exec(n.slice(e));return r?(t.Q=+r[0],e+r[0].length):-1}function kp(t,n,e){var r=rp.exec(n.slice(e));return r?(t.Q=1e3*+r[0],e+r[0].length):-1}function Ep(t,n){return ap(t.getDate(),n,2)}function Cp(t,n){return ap(t.getHours(),n,2)}function Pp(t,n){return ap(t.getHours()%12||12,n,2)}function zp(t,n){return ap(1+od.count(Nd(t),t),n,3)}function Rp(t,n){return ap(t.getMilliseconds(),n,3)}function Dp(t,n){return Rp(t,n)+"000"}function qp(t,n){return ap(t.getMonth()+1,n,2)}function Lp(t,n){return ap(t.getMinutes(),n,2)}function Up(t,n){return ap(t.getSeconds(),n,2)}function Op(t){var n=t.getDay();return 0===n?7:n}function Bp(t,n){return ap(cd.count(Nd(t),t),n,2)}function Yp(t,n){var e=t.getDay();return t=e>=4||0===e?hd(t):hd.ceil(t),ap(hd.count(Nd(t),t)+(4===Nd(t).getDay()),n,2)}function Fp(t){return t.getDay()}function Ip(t,n){return ap(fd.count(Nd(t),t),n,2)}function jp(t,n){return ap(t.getFullYear()%100,n,2)}function Hp(t,n){return ap(t.getFullYear()%1e4,n,4)}function Xp(t){var n=t.getTimezoneOffset();return(n>0?"-":(n*=-1,"+"))+ap(n/60|0,"0",2)+ap(n%60,"0",2)}function Gp(t,n){return ap(t.getUTCDate(),n,2)}function Vp(t,n){return ap(t.getUTCHours(),n,2)}function $p(t,n){return ap(t.getUTCHours()%12||12,n,2)}function Wp(t,n){return ap(1+Cd.count(Wd(t),t),n,3)}function Zp(t,n){return ap(t.getUTCMilliseconds(),n,3)}function Qp(t,n){return Zp(t,n)+"000"}function Jp(t,n){return ap(t.getUTCMonth()+1,n,2)}function Kp(t,n){return ap(t.getUTCMinutes(),n,2)}function tv(t,n){return ap(t.getUTCSeconds(),n,2)}function nv(t){var n=t.getUTCDay();return 0===n?7:n}function ev(t,n){return ap(Rd.count(Wd(t),t),n,2)}function rv(t,n){var e=t.getUTCDay();return t=e>=4||0===e?Ud(t):Ud.ceil(t),ap(Ud.count(Wd(t),t)+(4===Wd(t).getUTCDay()),n,2)}function iv(t){return t.getUTCDay()}function ov(t,n){return ap(Dd.count(Wd(t),t),n,2)}function av(t,n){return ap(t.getUTCFullYear()%100,n,2)}function uv(t,n){return ap(t.getUTCFullYear()%1e4,n,4)}function cv(){return"+0000"}function fv(){return"%"}function sv(t){return+t}function lv(t){return Math.floor(+t/1e3)}function hv(n){return np=tp(n),t.timeFormat=np.format,t.timeParse=np.parse,t.utcFormat=np.utcFormat,t.utcParse=np.utcParse,np}hv({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"]});var dv=Date.prototype.toISOString?function(t){return t.toISOString()}:t.utcFormat("%Y-%m-%dT%H:%M:%S.%LZ");var pv=+new Date("2000-01-01T00:00:00.000Z")?function(t){var n=new Date(t);return isNaN(n)?null:n}:t.utcParse("%Y-%m-%dT%H:%M:%S.%LZ"),vv=1e3,gv=60*vv,yv=60*gv,_v=24*yv,bv=7*_v,mv=30*_v,xv=365*_v;function wv(t){return new Date(t)}function Mv(t){return t instanceof Date?+t:+new Date(+t)}function Nv(t,n,r,i,o,a,u,c,f){var s=Sh(mh,mh),l=s.invert,h=s.domain,d=f(".%L"),p=f(":%S"),v=f("%I:%M"),g=f("%I %p"),y=f("%a %d"),_=f("%b %d"),b=f("%B"),m=f("%Y"),x=[[u,1,vv],[u,5,5*vv],[u,15,15*vv],[u,30,30*vv],[a,1,gv],[a,5,5*gv],[a,15,15*gv],[a,30,30*gv],[o,1,yv],[o,3,3*yv],[o,6,6*yv],[o,12,12*yv],[i,1,_v],[i,2,2*_v],[r,1,bv],[n,1,mv],[n,3,3*mv],[t,1,xv]];function M(e){return(u(e)=1?fy:t<=-1?-fy:Math.asin(t)}function hy(t){return t.innerRadius}function dy(t){return t.outerRadius}function py(t){return t.startAngle}function vy(t){return t.endAngle}function gy(t){return t&&t.padAngle}function yy(t,n,e,r,i,o,a){var u=t-e,c=n-r,f=(a?o:-o)/ay(u*u+c*c),s=f*c,l=-f*u,h=t+s,d=n+l,p=e+s,v=r+l,g=(h+p)/2,y=(d+v)/2,_=p-h,b=v-d,m=_*_+b*b,x=i-o,w=h*v-p*d,M=(b<0?-1:1)*ay(ry(0,x*x*m-w*w)),N=(w*b-_*M)/m,A=(-w*_-b*M)/m,T=(w*b+_*M)/m,S=(-w*_+b*M)/m,k=N-g,E=A-y,C=T-g,P=S-y;return k*k+E*E>C*C+P*P&&(N=T,A=S),{cx:N,cy:A,x01:-s,y01:-l,x11:N*(i/x-1),y11:A*(i/x-1)}}function _y(t){this._context=t}function by(t){return new _y(t)}function my(t){return t[0]}function xy(t){return t[1]}function wy(){var t=my,n=xy,e=Kg(!0),r=null,i=by,o=null;function a(a){var u,c,f,s=a.length,l=!1;for(null==r&&(o=i(f=Hi())),u=0;u<=s;++u)!(u=s;--l)u.point(g[l],y[l]);u.lineEnd(),u.areaEnd()}v&&(g[f]=+t(h,f,c),y[f]=+e(h,f,c),u.point(n?+n(h,f,c):g[f],r?+r(h,f,c):y[f]))}if(d)return u=null,d+""||null}function f(){return wy().defined(i).curve(a).context(o)}return c.x=function(e){return arguments.length?(t="function"==typeof e?e:Kg(+e),n=null,c):t},c.x0=function(n){return arguments.length?(t="function"==typeof n?n:Kg(+n),c):t},c.x1=function(t){return arguments.length?(n=null==t?null:"function"==typeof t?t:Kg(+t),c):n},c.y=function(t){return arguments.length?(e="function"==typeof t?t:Kg(+t),r=null,c):e},c.y0=function(t){return arguments.length?(e="function"==typeof t?t:Kg(+t),c):e},c.y1=function(t){return arguments.length?(r=null==t?null:"function"==typeof t?t:Kg(+t),c):r},c.lineX0=c.lineY0=function(){return f().x(t).y(e)},c.lineY1=function(){return f().x(t).y(r)},c.lineX1=function(){return f().x(n).y(e)},c.defined=function(t){return arguments.length?(i="function"==typeof t?t:Kg(!!t),c):i},c.curve=function(t){return arguments.length?(a=t,null!=o&&(u=a(o)),c):a},c.context=function(t){return arguments.length?(null==t?o=u=null:u=a(o=t),c):o},c}function Ny(t,n){return nt?1:n>=t?0:NaN}function Ay(t){return t}_y.prototype={areaStart:function(){this._line=0},areaEnd:function(){this._line=NaN},lineStart:function(){this._point=0},lineEnd:function(){(this._line||0!==this._line&&1===this._point)&&this._context.closePath(),this._line=1-this._line},point:function(t,n){switch(t=+t,n=+n,this._point){case 0:this._point=1,this._line?this._context.lineTo(t,n):this._context.moveTo(t,n);break;case 1:this._point=2;default:this._context.lineTo(t,n)}}};var Ty=ky(by);function Sy(t){this._curve=t}function ky(t){function n(n){return new Sy(t(n))}return n._curve=t,n}function Ey(t){var n=t.curve;return t.angle=t.x,delete t.x,t.radius=t.y,delete t.y,t.curve=function(t){return arguments.length?n(ky(t)):n()._curve},t}function Cy(){return Ey(wy().curve(Ty))}function Py(){var t=My().curve(Ty),n=t.curve,e=t.lineX0,r=t.lineX1,i=t.lineY0,o=t.lineY1;return t.angle=t.x,delete t.x,t.startAngle=t.x0,delete t.x0,t.endAngle=t.x1,delete t.x1,t.radius=t.y,delete t.y,t.innerRadius=t.y0,delete t.y0,t.outerRadius=t.y1,delete t.y1,t.lineStartAngle=function(){return Ey(e())},delete t.lineX0,t.lineEndAngle=function(){return Ey(r())},delete t.lineX1,t.lineInnerRadius=function(){return Ey(i())},delete t.lineY0,t.lineOuterRadius=function(){return Ey(o())},delete t.lineY1,t.curve=function(t){return arguments.length?n(ky(t)):n()._curve},t}function zy(t,n){return[(n=+n)*Math.cos(t-=Math.PI/2),n*Math.sin(t)]}Sy.prototype={areaStart:function(){this._curve.areaStart()},areaEnd:function(){this._curve.areaEnd()},lineStart:function(){this._curve.lineStart()},lineEnd:function(){this._curve.lineEnd()},point:function(t,n){this._curve.point(n*Math.sin(t),n*-Math.cos(t))}};var Ry=Array.prototype.slice;function Dy(t){return t.source}function qy(t){return t.target}function Ly(t){var n=Dy,e=qy,r=my,i=xy,o=null;function a(){var a,u=Ry.call(arguments),c=n.apply(this,u),f=e.apply(this,u);if(o||(o=a=Hi()),t(o,+r.apply(this,(u[0]=c,u)),+i.apply(this,u),+r.apply(this,(u[0]=f,u)),+i.apply(this,u)),a)return o=null,a+""||null}return a.source=function(t){return arguments.length?(n=t,a):n},a.target=function(t){return arguments.length?(e=t,a):e},a.x=function(t){return arguments.length?(r="function"==typeof t?t:Kg(+t),a):r},a.y=function(t){return arguments.length?(i="function"==typeof t?t:Kg(+t),a):i},a.context=function(t){return arguments.length?(o=null==t?null:t,a):o},a}function Uy(t,n,e,r,i){t.moveTo(n,e),t.bezierCurveTo(n=(n+r)/2,e,n,i,r,i)}function Oy(t,n,e,r,i){t.moveTo(n,e),t.bezierCurveTo(n,e=(e+i)/2,r,e,r,i)}function By(t,n,e,r,i){var o=zy(n,e),a=zy(n,e=(e+i)/2),u=zy(r,e),c=zy(r,i);t.moveTo(o[0],o[1]),t.bezierCurveTo(a[0],a[1],u[0],u[1],c[0],c[1])}var Yy={draw:function(t,n){var e=Math.sqrt(n/cy);t.moveTo(e,0),t.arc(0,0,e,0,sy)}},Fy={draw:function(t,n){var e=Math.sqrt(n/5)/2;t.moveTo(-3*e,-e),t.lineTo(-e,-e),t.lineTo(-e,-3*e),t.lineTo(e,-3*e),t.lineTo(e,-e),t.lineTo(3*e,-e),t.lineTo(3*e,e),t.lineTo(e,e),t.lineTo(e,3*e),t.lineTo(-e,3*e),t.lineTo(-e,e),t.lineTo(-3*e,e),t.closePath()}},Iy=Math.sqrt(1/3),jy=2*Iy,Hy={draw:function(t,n){var e=Math.sqrt(n/jy),r=e*Iy;t.moveTo(0,-e),t.lineTo(r,0),t.lineTo(0,e),t.lineTo(-r,0),t.closePath()}},Xy=Math.sin(cy/10)/Math.sin(7*cy/10),Gy=Math.sin(sy/10)*Xy,Vy=-Math.cos(sy/10)*Xy,$y={draw:function(t,n){var e=Math.sqrt(.8908130915292852*n),r=Gy*e,i=Vy*e;t.moveTo(0,-e),t.lineTo(r,i);for(var o=1;o<5;++o){var a=sy*o/5,u=Math.cos(a),c=Math.sin(a);t.lineTo(c*e,-u*e),t.lineTo(u*r-c*i,c*r+u*i)}t.closePath()}},Wy={draw:function(t,n){var e=Math.sqrt(n),r=-e/2;t.rect(r,r,e,e)}},Zy=Math.sqrt(3),Qy={draw:function(t,n){var e=-Math.sqrt(n/(3*Zy));t.moveTo(0,2*e),t.lineTo(-Zy*e,-e),t.lineTo(Zy*e,-e),t.closePath()}},Jy=Math.sqrt(3)/2,Ky=1/Math.sqrt(12),t_=3*(Ky/2+1),n_={draw:function(t,n){var e=Math.sqrt(n/t_),r=e/2,i=e*Ky,o=r,a=e*Ky+e,u=-o,c=a;t.moveTo(r,i),t.lineTo(o,a),t.lineTo(u,c),t.lineTo(-.5*r-Jy*i,Jy*r+-.5*i),t.lineTo(-.5*o-Jy*a,Jy*o+-.5*a),t.lineTo(-.5*u-Jy*c,Jy*u+-.5*c),t.lineTo(-.5*r+Jy*i,-.5*i-Jy*r),t.lineTo(-.5*o+Jy*a,-.5*a-Jy*o),t.lineTo(-.5*u+Jy*c,-.5*c-Jy*u),t.closePath()}},e_=[Yy,Fy,Hy,Wy,$y,Qy,n_];function r_(){}function i_(t,n,e){t._context.bezierCurveTo((2*t._x0+t._x1)/3,(2*t._y0+t._y1)/3,(t._x0+2*t._x1)/3,(t._y0+2*t._y1)/3,(t._x0+4*t._x1+n)/6,(t._y0+4*t._y1+e)/6)}function o_(t){this._context=t}function a_(t){this._context=t}function u_(t){this._context=t}function c_(t,n){this._basis=new o_(t),this._beta=n}o_.prototype={areaStart:function(){this._line=0},areaEnd:function(){this._line=NaN},lineStart:function(){this._x0=this._x1=this._y0=this._y1=NaN,this._point=0},lineEnd:function(){switch(this._point){case 3:i_(this,this._x1,this._y1);case 2:this._context.lineTo(this._x1,this._y1)}(this._line||0!==this._line&&1===this._point)&&this._context.closePath(),this._line=1-this._line},point:function(t,n){switch(t=+t,n=+n,this._point){case 0:this._point=1,this._line?this._context.lineTo(t,n):this._context.moveTo(t,n);break;case 1:this._point=2;break;case 2:this._point=3,this._context.lineTo((5*this._x0+this._x1)/6,(5*this._y0+this._y1)/6);default:i_(this,t,n)}this._x0=this._x1,this._x1=t,this._y0=this._y1,this._y1=n}},a_.prototype={areaStart:r_,areaEnd:r_,lineStart:function(){this._x0=this._x1=this._x2=this._x3=this._x4=this._y0=this._y1=this._y2=this._y3=this._y4=NaN,this._point=0},lineEnd:function(){switch(this._point){case 1:this._context.moveTo(this._x2,this._y2),this._context.closePath();break;case 2:this._context.moveTo((this._x2+2*this._x3)/3,(this._y2+2*this._y3)/3),this._context.lineTo((this._x3+2*this._x2)/3,(this._y3+2*this._y2)/3),this._context.closePath();break;case 3:this.point(this._x2,this._y2),this.point(this._x3,this._y3),this.point(this._x4,this._y4)}},point:function(t,n){switch(t=+t,n=+n,this._point){case 0:this._point=1,this._x2=t,this._y2=n;break;case 1:this._point=2,this._x3=t,this._y3=n;break;case 2:this._point=3,this._x4=t,this._y4=n,this._context.moveTo((this._x0+4*this._x1+t)/6,(this._y0+4*this._y1+n)/6);break;default:i_(this,t,n)}this._x0=this._x1,this._x1=t,this._y0=this._y1,this._y1=n}},u_.prototype={areaStart:function(){this._line=0},areaEnd:function(){this._line=NaN},lineStart:function(){this._x0=this._x1=this._y0=this._y1=NaN,this._point=0},lineEnd:function(){(this._line||0!==this._line&&3===this._point)&&this._context.closePath(),this._line=1-this._line},point:function(t,n){switch(t=+t,n=+n,this._point){case 0:this._point=1;break;case 1:this._point=2;break;case 2:this._point=3;var e=(this._x0+4*this._x1+t)/6,r=(this._y0+4*this._y1+n)/6;this._line?this._context.lineTo(e,r):this._context.moveTo(e,r);break;case 3:this._point=4;default:i_(this,t,n)}this._x0=this._x1,this._x1=t,this._y0=this._y1,this._y1=n}},c_.prototype={lineStart:function(){this._x=[],this._y=[],this._basis.lineStart()},lineEnd:function(){var t=this._x,n=this._y,e=t.length-1;if(e>0)for(var r,i=t[0],o=n[0],a=t[e]-i,u=n[e]-o,c=-1;++c<=e;)r=c/e,this._basis.point(this._beta*t[c]+(1-this._beta)*(i+r*a),this._beta*n[c]+(1-this._beta)*(o+r*u));this._x=this._y=null,this._basis.lineEnd()},point:function(t,n){this._x.push(+t),this._y.push(+n)}};var f_=function t(n){function e(t){return 1===n?new o_(t):new c_(t,n)}return e.beta=function(n){return t(+n)},e}(.85);function s_(t,n,e){t._context.bezierCurveTo(t._x1+t._k*(t._x2-t._x0),t._y1+t._k*(t._y2-t._y0),t._x2+t._k*(t._x1-n),t._y2+t._k*(t._y1-e),t._x2,t._y2)}function l_(t,n){this._context=t,this._k=(1-n)/6}l_.prototype={areaStart:function(){this._line=0},areaEnd:function(){this._line=NaN},lineStart:function(){this._x0=this._x1=this._x2=this._y0=this._y1=this._y2=NaN,this._point=0},lineEnd:function(){switch(this._point){case 2:this._context.lineTo(this._x2,this._y2);break;case 3:s_(this,this._x1,this._y1)}(this._line||0!==this._line&&1===this._point)&&this._context.closePath(),this._line=1-this._line},point:function(t,n){switch(t=+t,n=+n,this._point){case 0:this._point=1,this._line?this._context.lineTo(t,n):this._context.moveTo(t,n);break;case 1:this._point=2,this._x1=t,this._y1=n;break;case 2:this._point=3;default:s_(this,t,n)}this._x0=this._x1,this._x1=this._x2,this._x2=t,this._y0=this._y1,this._y1=this._y2,this._y2=n}};var h_=function t(n){function e(t){return new l_(t,n)}return e.tension=function(n){return t(+n)},e}(0);function d_(t,n){this._context=t,this._k=(1-n)/6}d_.prototype={areaStart:r_,areaEnd:r_,lineStart:function(){this._x0=this._x1=this._x2=this._x3=this._x4=this._x5=this._y0=this._y1=this._y2=this._y3=this._y4=this._y5=NaN,this._point=0},lineEnd:function(){switch(this._point){case 1:this._context.moveTo(this._x3,this._y3),this._context.closePath();break;case 2:this._context.lineTo(this._x3,this._y3),this._context.closePath();break;case 3:this.point(this._x3,this._y3),this.point(this._x4,this._y4),this.point(this._x5,this._y5)}},point:function(t,n){switch(t=+t,n=+n,this._point){case 0:this._point=1,this._x3=t,this._y3=n;break;case 1:this._point=2,this._context.moveTo(this._x4=t,this._y4=n);break;case 2:this._point=3,this._x5=t,this._y5=n;break;default:s_(this,t,n)}this._x0=this._x1,this._x1=this._x2,this._x2=t,this._y0=this._y1,this._y1=this._y2,this._y2=n}};var p_=function t(n){function e(t){return new d_(t,n)}return e.tension=function(n){return t(+n)},e}(0);function v_(t,n){this._context=t,this._k=(1-n)/6}v_.prototype={areaStart:function(){this._line=0},areaEnd:function(){this._line=NaN},lineStart:function(){this._x0=this._x1=this._x2=this._y0=this._y1=this._y2=NaN,this._point=0},lineEnd:function(){(this._line||0!==this._line&&3===this._point)&&this._context.closePath(),this._line=1-this._line},point:function(t,n){switch(t=+t,n=+n,this._point){case 0:this._point=1;break;case 1:this._point=2;break;case 2:this._point=3,this._line?this._context.lineTo(this._x2,this._y2):this._context.moveTo(this._x2,this._y2);break;case 3:this._point=4;default:s_(this,t,n)}this._x0=this._x1,this._x1=this._x2,this._x2=t,this._y0=this._y1,this._y1=this._y2,this._y2=n}};var g_=function t(n){function e(t){return new v_(t,n)}return e.tension=function(n){return t(+n)},e}(0);function y_(t,n,e){var r=t._x1,i=t._y1,o=t._x2,a=t._y2;if(t._l01_a>uy){var u=2*t._l01_2a+3*t._l01_a*t._l12_a+t._l12_2a,c=3*t._l01_a*(t._l01_a+t._l12_a);r=(r*u-t._x0*t._l12_2a+t._x2*t._l01_2a)/c,i=(i*u-t._y0*t._l12_2a+t._y2*t._l01_2a)/c}if(t._l23_a>uy){var f=2*t._l23_2a+3*t._l23_a*t._l12_a+t._l12_2a,s=3*t._l23_a*(t._l23_a+t._l12_a);o=(o*f+t._x1*t._l23_2a-n*t._l12_2a)/s,a=(a*f+t._y1*t._l23_2a-e*t._l12_2a)/s}t._context.bezierCurveTo(r,i,o,a,t._x2,t._y2)}function __(t,n){this._context=t,this._alpha=n}__.prototype={areaStart:function(){this._line=0},areaEnd:function(){this._line=NaN},lineStart:function(){this._x0=this._x1=this._x2=this._y0=this._y1=this._y2=NaN,this._l01_a=this._l12_a=this._l23_a=this._l01_2a=this._l12_2a=this._l23_2a=this._point=0},lineEnd:function(){switch(this._point){case 2:this._context.lineTo(this._x2,this._y2);break;case 3:this.point(this._x2,this._y2)}(this._line||0!==this._line&&1===this._point)&&this._context.closePath(),this._line=1-this._line},point:function(t,n){if(t=+t,n=+n,this._point){var e=this._x2-t,r=this._y2-n;this._l23_a=Math.sqrt(this._l23_2a=Math.pow(e*e+r*r,this._alpha))}switch(this._point){case 0:this._point=1,this._line?this._context.lineTo(t,n):this._context.moveTo(t,n);break;case 1:this._point=2;break;case 2:this._point=3;default:y_(this,t,n)}this._l01_a=this._l12_a,this._l12_a=this._l23_a,this._l01_2a=this._l12_2a,this._l12_2a=this._l23_2a,this._x0=this._x1,this._x1=this._x2,this._x2=t,this._y0=this._y1,this._y1=this._y2,this._y2=n}};var b_=function t(n){function e(t){return n?new __(t,n):new l_(t,0)}return e.alpha=function(n){return t(+n)},e}(.5);function m_(t,n){this._context=t,this._alpha=n}m_.prototype={areaStart:r_,areaEnd:r_,lineStart:function(){this._x0=this._x1=this._x2=this._x3=this._x4=this._x5=this._y0=this._y1=this._y2=this._y3=this._y4=this._y5=NaN,this._l01_a=this._l12_a=this._l23_a=this._l01_2a=this._l12_2a=this._l23_2a=this._point=0},lineEnd:function(){switch(this._point){case 1:this._context.moveTo(this._x3,this._y3),this._context.closePath();break;case 2:this._context.lineTo(this._x3,this._y3),this._context.closePath();break;case 3:this.point(this._x3,this._y3),this.point(this._x4,this._y4),this.point(this._x5,this._y5)}},point:function(t,n){if(t=+t,n=+n,this._point){var e=this._x2-t,r=this._y2-n;this._l23_a=Math.sqrt(this._l23_2a=Math.pow(e*e+r*r,this._alpha))}switch(this._point){case 0:this._point=1,this._x3=t,this._y3=n;break;case 1:this._point=2,this._context.moveTo(this._x4=t,this._y4=n);break;case 2:this._point=3,this._x5=t,this._y5=n;break;default:y_(this,t,n)}this._l01_a=this._l12_a,this._l12_a=this._l23_a,this._l01_2a=this._l12_2a,this._l12_2a=this._l23_2a,this._x0=this._x1,this._x1=this._x2,this._x2=t,this._y0=this._y1,this._y1=this._y2,this._y2=n}};var x_=function t(n){function e(t){return n?new m_(t,n):new d_(t,0)}return e.alpha=function(n){return t(+n)},e}(.5);function w_(t,n){this._context=t,this._alpha=n}w_.prototype={areaStart:function(){this._line=0},areaEnd:function(){this._line=NaN},lineStart:function(){this._x0=this._x1=this._x2=this._y0=this._y1=this._y2=NaN,this._l01_a=this._l12_a=this._l23_a=this._l01_2a=this._l12_2a=this._l23_2a=this._point=0},lineEnd:function(){(this._line||0!==this._line&&3===this._point)&&this._context.closePath(),this._line=1-this._line},point:function(t,n){if(t=+t,n=+n,this._point){var e=this._x2-t,r=this._y2-n;this._l23_a=Math.sqrt(this._l23_2a=Math.pow(e*e+r*r,this._alpha))}switch(this._point){case 0:this._point=1;break;case 1:this._point=2;break;case 2:this._point=3,this._line?this._context.lineTo(this._x2,this._y2):this._context.moveTo(this._x2,this._y2);break;case 3:this._point=4;default:y_(this,t,n)}this._l01_a=this._l12_a,this._l12_a=this._l23_a,this._l01_2a=this._l12_2a,this._l12_2a=this._l23_2a,this._x0=this._x1,this._x1=this._x2,this._x2=t,this._y0=this._y1,this._y1=this._y2,this._y2=n}};var M_=function t(n){function e(t){return n?new w_(t,n):new v_(t,0)}return e.alpha=function(n){return t(+n)},e}(.5);function N_(t){this._context=t}function A_(t){return t<0?-1:1}function T_(t,n,e){var r=t._x1-t._x0,i=n-t._x1,o=(t._y1-t._y0)/(r||i<0&&-0),a=(e-t._y1)/(i||r<0&&-0),u=(o*i+a*r)/(r+i);return(A_(o)+A_(a))*Math.min(Math.abs(o),Math.abs(a),.5*Math.abs(u))||0}function S_(t,n){var e=t._x1-t._x0;return e?(3*(t._y1-t._y0)/e-n)/2:n}function k_(t,n,e){var r=t._x0,i=t._y0,o=t._x1,a=t._y1,u=(o-r)/3;t._context.bezierCurveTo(r+u,i+u*n,o-u,a-u*e,o,a)}function E_(t){this._context=t}function C_(t){this._context=new P_(t)}function P_(t){this._context=t}function z_(t){this._context=t}function R_(t){var n,e,r=t.length-1,i=new Array(r),o=new Array(r),a=new Array(r);for(i[0]=0,o[0]=2,a[0]=t[0]+2*t[1],n=1;n=0;--n)i[n]=(a[n]-i[n+1])/o[n];for(o[r-1]=(t[r]+i[r-1])/2,n=0;n1)for(var e,r,i,o=1,a=t[n[0]],u=a.length;o=0;)e[n]=n;return e}function U_(t,n){return t[n]}function O_(t){var n=t.map(B_);return L_(t).sort(function(t,e){return n[t]-n[e]})}function B_(t){for(var n,e=-1,r=0,i=t.length,o=-1/0;++eo&&(o=n,r=e);return r}function Y_(t){var n=t.map(F_);return L_(t).sort(function(t,e){return n[t]-n[e]})}function F_(t){for(var n,e=0,r=-1,i=t.length;++r0)){if(o/=h,h<0){if(o0){if(o>l)return;o>s&&(s=o)}if(o=r-c,h||!(o<0)){if(o/=h,h<0){if(o>l)return;o>s&&(s=o)}else if(h>0){if(o0)){if(o/=d,d<0){if(o0){if(o>l)return;o>s&&(s=o)}if(o=i-f,d||!(o<0)){if(o/=d,d<0){if(o>l)return;o>s&&(s=o)}else if(d>0){if(o0||l<1)||(s>0&&(t[0]=[c+s*h,f+s*d]),l<1&&(t[1]=[c+l*h,f+l*d]),!0)}}}}}function tb(t,n,e,r,i){var o=t[1];if(o)return!0;var a,u,c=t[0],f=t.left,s=t.right,l=f[0],h=f[1],d=s[0],p=s[1],v=(l+d)/2,g=(h+p)/2;if(p===h){if(v=r)return;if(l>d){if(c){if(c[1]>=i)return}else c=[v,e];o=[v,i]}else{if(c){if(c[1]1)if(l>d){if(c){if(c[1]>=i)return}else c=[(e-u)/a,e];o=[(i-u)/a,i]}else{if(c){if(c[1]=r)return}else c=[n,a*n+u];o=[r,a*r+u]}else{if(c){if(c[0]=0&&(this._t=1-this._t,this._line=1-this._line)},point:function(t,n){switch(t=+t,n=+n,this._point){case 0:this._point=1,this._line?this._context.lineTo(t,n):this._context.moveTo(t,n);break;case 1:this._point=2;default:if(this._t<=0)this._context.lineTo(this._x,n),this._context.lineTo(t,n);else{var e=this._x*(1-this._t)+t*this._t;this._context.lineTo(e,this._y),this._context.lineTo(e,n)}}this._x=t,this._y=n}},X_.prototype={constructor:X_,insert:function(t,n){var e,r,i;if(t){if(n.P=t,n.N=t.N,t.N&&(t.N.P=n),t.N=n,t.R){for(t=t.R;t.L;)t=t.L;t.L=n}else t.R=n;e=t}else this._?(t=W_(this._),n.P=null,n.N=t,t.P=t.L=n,e=t):(n.P=n.N=null,this._=n,e=null);for(n.L=n.R=null,n.U=e,n.C=!0,t=n;e&&e.C;)e===(r=e.U).L?(i=r.R)&&i.C?(e.C=i.C=!1,r.C=!0,t=r):(t===e.R&&(V_(this,e),e=(t=e).U),e.C=!1,r.C=!0,$_(this,r)):(i=r.L)&&i.C?(e.C=i.C=!1,r.C=!0,t=r):(t===e.L&&($_(this,e),e=(t=e).U),e.C=!1,r.C=!0,V_(this,r)),e=t.U;this._.C=!1},remove:function(t){t.N&&(t.N.P=t.P),t.P&&(t.P.N=t.N),t.N=t.P=null;var n,e,r,i=t.U,o=t.L,a=t.R;if(e=o?a?W_(a):o:a,i?i.L===t?i.L=e:i.R=e:this._=e,o&&a?(r=e.C,e.C=t.C,e.L=o,o.U=e,e!==a?(i=e.U,e.U=t.U,t=e.R,i.L=t,e.R=a,a.U=e):(e.U=i,i=e,t=e.R)):(r=t.C,t=e),t&&(t.U=i),!r)if(t&&t.C)t.C=!1;else{do{if(t===this._)break;if(t===i.L){if((n=i.R).C&&(n.C=!1,i.C=!0,V_(this,i),n=i.R),n.L&&n.L.C||n.R&&n.R.C){n.R&&n.R.C||(n.L.C=!1,n.C=!0,$_(this,n),n=i.R),n.C=i.C,i.C=n.R.C=!1,V_(this,i),t=this._;break}}else if((n=i.L).C&&(n.C=!1,i.C=!0,$_(this,i),n=i.L),n.L&&n.L.C||n.R&&n.R.C){n.L&&n.L.C||(n.R.C=!1,n.C=!0,V_(this,n),n=i.L),n.C=i.C,i.C=n.L.C=!1,$_(this,i),t=this._;break}n.C=!0,t=i,i=i.U}while(!t.C);t&&(t.C=!1)}}};var ib,ob=[];function ab(){G_(this),this.x=this.y=this.arc=this.site=this.cy=null}function ub(t){var n=t.P,e=t.N;if(n&&e){var r=n.site,i=t.site,o=e.site;if(r!==o){var a=i[0],u=i[1],c=r[0]-a,f=r[1]-u,s=o[0]-a,l=o[1]-u,h=2*(c*l-f*s);if(!(h>=-wb)){var d=c*c+f*f,p=s*s+l*l,v=(l*d-f*p)/h,g=(c*p-s*d)/h,y=ob.pop()||new ab;y.arc=t,y.site=i,y.x=v+a,y.y=(y.cy=g+u)+Math.sqrt(v*v+g*g),t.circle=y;for(var _=null,b=bb._;b;)if(y.yxb)u=u.L;else{if(!((i=o-gb(u,a))>xb)){r>-xb?(n=u.P,e=u):i>-xb?(n=u,e=u.N):n=e=u;break}if(!u.R){n=u;break}u=u.R}!function(t){_b[t.index]={site:t,halfedges:[]}}(t);var c=lb(t);if(yb.insert(n,c),n||e){if(n===e)return cb(n),e=lb(n.site),yb.insert(c,e),c.edge=e.edge=Z_(n.site,c.site),ub(n),void ub(e);if(e){cb(n),cb(e);var f=n.site,s=f[0],l=f[1],h=t[0]-s,d=t[1]-l,p=e.site,v=p[0]-s,g=p[1]-l,y=2*(h*g-d*v),_=h*h+d*d,b=v*v+g*g,m=[(g*_-d*b)/y+s,(h*b-v*_)/y+l];J_(e.edge,f,p,m),c.edge=Z_(f,t,null,m),e.edge=Z_(t,p,null,m),ub(n),ub(e)}else c.edge=Z_(n.site,c.site)}}function vb(t,n){var e=t.site,r=e[0],i=e[1],o=i-n;if(!o)return r;var a=t.P;if(!a)return-1/0;var u=(e=a.site)[0],c=e[1],f=c-n;if(!f)return u;var s=u-r,l=1/o-1/f,h=s/f;return l?(-h+Math.sqrt(h*h-2*l*(s*s/(-2*f)-c+f/2+i-o/2)))/l+r:(r+u)/2}function gb(t,n){var e=t.N;if(e)return vb(e,n);var r=t.site;return r[1]===n?r[0]:1/0}var yb,_b,bb,mb,xb=1e-6,wb=1e-12;function Mb(t,n){return n[1]-t[1]||n[0]-t[0]}function Nb(t,n){var e,r,i,o=t.sort(Mb).pop();for(mb=[],_b=new Array(t.length),yb=new X_,bb=new X_;;)if(i=ib,o&&(!i||o[1]xb||Math.abs(i[0][1]-i[1][1])>xb)||delete mb[o]}(a,u,c,f),function(t,n,e,r){var i,o,a,u,c,f,s,l,h,d,p,v,g=_b.length,y=!0;for(i=0;ixb||Math.abs(v-h)>xb)&&(c.splice(u,0,mb.push(Q_(a,d,Math.abs(p-t)xb?[t,Math.abs(l-t)xb?[Math.abs(h-r)xb?[e,Math.abs(l-e)xb?[Math.abs(h-n)=u)return null;var c=t-i.site[0],f=n-i.site[1],s=c*c+f*f;do{i=o.cells[r=a],a=null,i.halfedges.forEach(function(e){var r=o.edges[e],u=r.left;if(u!==i.site&&u||(u=r.right)){var c=t-u[0],f=n-u[1],l=c*c+f*f;lr?(r+i)/2:Math.min(0,r)||Math.max(0,i),a>o?(o+a)/2:Math.min(0,o)||Math.max(0,a))}Eb.prototype=Sb.prototype,t.version="5.9.2",t.bisect=i,t.bisectRight=i,t.bisectLeft=o,t.ascending=n,t.bisector=e,t.cross=function(t,n,e){var r,i,o,u,c=t.length,f=n.length,s=new Array(c*f);for(null==e&&(e=a),r=o=0;rt?1:n>=t?0:NaN},t.deviation=f,t.extent=s,t.histogram=function(){var t=v,n=s,e=M;function r(r){var o,a,u=r.length,c=new Array(u);for(o=0;ol;)h.pop(),--d;var p,v=new Array(d+1);for(o=0;o<=d;++o)(p=v[o]=[]).x0=o>0?h[o-1]:s,p.x1=o=r.length)return null!=t&&e.sort(t),null!=n?n(e):e;for(var c,f,s,l=-1,h=e.length,d=r[i++],p=Qi(),v=a();++lr.length)return e;var a,u=i[o-1];return null!=n&&o>=r.length?a=e.entries():(a=[],e.each(function(n,e){a.push({key:e,values:t(n,o)})})),null!=u?a.sort(function(t,n){return u(t.key,n.key)}):a}(o(t,0,to,no),0)},key:function(t){return r.push(t),e},sortKeys:function(t){return i[r.length-1]=t,e},sortValues:function(n){return t=n,e},rollup:function(t){return n=t,e}}},t.set=io,t.map=Qi,t.keys=function(t){var n=[];for(var e in t)n.push(e);return n},t.values=function(t){var n=[];for(var e in t)n.push(t[e]);return n},t.entries=function(t){var n=[];for(var e in t)n.push({key:e,value:t[e]});return n},t.color=hn,t.rgb=gn,t.hsl=mn,t.lab=Rn,t.hcl=Yn,t.lch=function(t,n,e,r){return 1===arguments.length?Bn(t):new Fn(e,n,t,null==r?1:r)},t.gray=function(t,n){return new Dn(t,0,0,null==n?1:n)},t.cubehelix=Zn,t.contours=po,t.contourDensity=function(){var t=yo,n=_o,e=bo,r=960,i=500,o=20,a=2,u=3*o,c=r+2*u>>a,f=i+2*u>>a,s=uo(20);function l(r){var i=new Float32Array(c*f),l=new Float32Array(c*f);r.forEach(function(r,o,s){var l=+t(r,o,s)+u>>a,h=+n(r,o,s)+u>>a,d=+e(r,o,s);l>=0&&l=0&&h>a),go({width:c,height:f,data:l},{width:c,height:f,data:i},o>>a),vo({width:c,height:f,data:i},{width:c,height:f,data:l},o>>a),go({width:c,height:f,data:l},{width:c,height:f,data:i},o>>a),vo({width:c,height:f,data:i},{width:c,height:f,data:l},o>>a),go({width:c,height:f,data:l},{width:c,height:f,data:i},o>>a);var d=s(i);if(!Array.isArray(d)){var p=A(i);d=w(0,p,d),(d=g(0,Math.floor(p/d)*d,d)).shift()}return po().thresholds(d).size([c,f])(i).map(h)}function h(t){return t.value*=Math.pow(2,-2*a),t.coordinates.forEach(d),t}function d(t){t.forEach(p)}function p(t){t.forEach(v)}function v(t){t[0]=t[0]*Math.pow(2,a)-u,t[1]=t[1]*Math.pow(2,a)-u}function y(){return c=r+2*(u=3*o)>>a,f=i+2*u>>a,l}return l.x=function(n){return arguments.length?(t="function"==typeof n?n:uo(+n),l):t},l.y=function(t){return arguments.length?(n="function"==typeof t?t:uo(+t),l):n},l.weight=function(t){return arguments.length?(e="function"==typeof t?t:uo(+t),l):e},l.size=function(t){if(!arguments.length)return[r,i];var n=Math.ceil(t[0]),e=Math.ceil(t[1]);if(!(n>=0||n>=0))throw new Error("invalid size");return r=n,i=e,y()},l.cellSize=function(t){if(!arguments.length)return 1<=1))throw new Error("invalid cell size");return a=Math.floor(Math.log(t)/Math.LN2),y()},l.thresholds=function(t){return arguments.length?(s="function"==typeof t?t:Array.isArray(t)?uo(oo.call(t)):uo(t),l):s},l.bandwidth=function(t){if(!arguments.length)return Math.sqrt(o*(o+1));if(!((t=+t)>=0))throw new Error("invalid bandwidth");return o=Math.round((Math.sqrt(4*t*t+1)-1)/2),y()},l},t.dispatch=I,t.drag=function(){var n,e,r,i,o=Gt,a=Vt,u=$t,c=Wt,f={},s=I("start","drag","end"),l=0,h=0;function d(t){t.on("mousedown.drag",p).filter(c).on("touchstart.drag",y).on("touchmove.drag",_).on("touchend.drag touchcancel.drag",b).style("touch-action","none").style("-webkit-tap-highlight-color","rgba(0,0,0,0)")}function p(){if(!i&&o.apply(this,arguments)){var u=m("mouse",a.apply(this,arguments),Ot,this,arguments);u&&(zt(t.event.view).on("mousemove.drag",v,!0).on("mouseup.drag",g,!0),It(t.event.view),Yt(),r=!1,n=t.event.clientX,e=t.event.clientY,u("start"))}}function v(){if(Ft(),!r){var i=t.event.clientX-n,o=t.event.clientY-e;r=i*i+o*o>h}f.mouse("drag")}function g(){zt(t.event.view).on("mousemove.drag mouseup.drag",null),jt(t.event.view,r),Ft(),f.mouse("end")}function y(){if(o.apply(this,arguments)){var n,e,r=t.event.changedTouches,i=a.apply(this,arguments),u=r.length;for(n=0;nc+d||if+d||ou.index){var p=c-a.x-a.vx,v=f-a.y-a.vy,g=p*p+v*v;gt.r&&(t.r=t[n].r)}function u(){if(n){var r,i,o=n.length;for(e=new Array(o),r=0;r=a)){(t.data!==n||t.next)&&(0===s&&(d+=(s=na())*s),0===l&&(d+=(l=na())*l),d1?(null==e?u.remove(t):u.set(t,d(e)),n):u.get(t)},find:function(n,e,r){var i,o,a,u,c,f=0,s=t.length;for(null==r?r=1/0:r*=r,f=0;f1?(f.on(t,e),n):f.on(t)}}},t.forceX=function(t){var n,e,r,i=ta(.1);function o(t){for(var i,o=0,a=n.length;opc(r[0],r[1])&&(r[1]=i[1]),pc(i[0],r[1])>pc(r[0],r[1])&&(r[0]=i[0])):o.push(r=i);for(a=-1/0,n=0,r=o[e=o.length-1];n<=e;r=i,++n)i=o[n],(u=pc(r[1],i[0]))>a&&(a=u,Ru=i[0],qu=r[1])}return Fu=Iu=null,Ru===1/0||Du===1/0?[[NaN,NaN],[NaN,NaN]]:[[Ru,Du],[qu,Lu]]},t.geoCentroid=function(t){ju=Hu=Xu=Gu=Vu=$u=Wu=Zu=Qu=Ju=Ku=0,du(t,yc);var n=Qu,e=Ju,r=Ku,i=n*n+e*e+r*r;return i=.12&&i<.234&&r>=-.425&&r<-.214?u:i>=.166&&i<.234&&r>=-.214&&r<-.115?c:a).invert(t)},s.stream=function(e){return t&&n===e?t:(r=[a.stream(n=e),u.stream(e),c.stream(e)],i=r.length,t={point:function(t,n){for(var e=-1;++e2?t[2]+90:90]):[(t=e())[0],t[1],t[2]-90]},e([0,0,90]).scale(159.155)},t.geoTransverseMercatorRaw=al,t.geoRotation=qc,t.geoStream=du,t.geoTransform=function(t){return{stream:xs(t)}},t.cluster=function(){var t=ul,n=1,e=1,r=!1;function i(i){var o,a=0;i.eachAfter(function(n){var e=n.children;e?(n.x=function(t){return t.reduce(cl,0)/t.length}(e),n.y=function(t){return 1+t.reduce(fl,0)}(e)):(n.x=o?a+=t(n,o):0,n.y=0,o=n)});var u=function(t){for(var n;n=t.children;)t=n[0];return t}(i),c=function(t){for(var n;n=t.children;)t=n[n.length-1];return t}(i),f=u.x-t(u,c)/2,s=c.x+t(c,u)/2;return i.eachAfter(r?function(t){t.x=(t.x-i.x)*n,t.y=(i.y-t.y)*e}:function(t){t.x=(t.x-f)/(s-f)*n,t.y=(1-(i.y?t.y/i.y:1))*e})}return i.separation=function(n){return arguments.length?(t=n,i):t},i.size=function(t){return arguments.length?(r=!1,n=+t[0],e=+t[1],i):r?null:[n,e]},i.nodeSize=function(t){return arguments.length?(r=!0,n=+t[0],e=+t[1],i):r?[n,e]:null},i},t.hierarchy=ll,t.pack=function(){var t=null,n=1,e=1,r=Pl;function i(i){return i.x=n/2,i.y=e/2,t?i.eachBefore(Dl(t)).eachAfter(ql(r,.5)).eachBefore(Ll(1)):i.eachBefore(Dl(Rl)).eachAfter(ql(Pl,1)).eachAfter(ql(r,i.r/Math.min(n,e))).eachBefore(Ll(Math.min(n,e)/(2*i.r))),i}return i.radius=function(n){return arguments.length?(t=null==(e=n)?null:Cl(e),i):t;var e},i.size=function(t){return arguments.length?(n=+t[0],e=+t[1],i):[n,e]},i.padding=function(t){return arguments.length?(r="function"==typeof t?t:zl(+t),i):r},i},t.packSiblings=function(t){return El(t),t},t.packEnclose=yl,t.partition=function(){var t=1,n=1,e=0,r=!1;function i(i){var o=i.height+1;return i.x0=i.y0=e,i.x1=t,i.y1=n/o,i.eachBefore(function(t,n){return function(r){r.children&&Ol(r,r.x0,t*(r.depth+1)/n,r.x1,t*(r.depth+2)/n);var i=r.x0,o=r.y0,a=r.x1-e,u=r.y1-e;a0)throw new Error("cycle");return o}return e.id=function(n){return arguments.length?(t=Cl(n),e):t},e.parentId=function(t){return arguments.length?(n=Cl(t),e):n},e},t.tree=function(){var t=Hl,n=1,e=1,r=null;function i(i){var c=function(t){for(var n,e,r,i,o,a=new Wl(t,0),u=[a];n=u.pop();)if(r=n._.children)for(n.children=new Array(o=r.length),i=o-1;i>=0;--i)u.push(e=n.children[i]=new Wl(r[i],i)),e.parent=n;return(a.parent=new Wl(null,0)).children=[a],a}(i);if(c.eachAfter(o),c.parent.m=-c.z,c.eachBefore(a),r)i.eachBefore(u);else{var f=i,s=i,l=i;i.eachBefore(function(t){t.xs.x&&(s=t),t.depth>l.depth&&(l=t)});var h=f===s?1:t(f,s)/2,d=h-f.x,p=n/(s.x+h+d),v=e/(l.depth||1);i.eachBefore(function(t){t.x=(t.x+d)*p,t.y=t.depth*v})}return i}function o(n){var e=n.children,r=n.parent.children,i=n.i?r[n.i-1]:null;if(e){!function(t){for(var n,e=0,r=0,i=t.children,o=i.length;--o>=0;)(n=i[o]).z+=e,n.m+=e,e+=n.s+(r+=n.c)}(n);var o=(e[0].z+e[e.length-1].z)/2;i?(n.z=i.z+t(n._,i._),n.m=n.z-o):n.z=o}else i&&(n.z=i.z+t(n._,i._));n.parent.A=function(n,e,r){if(e){for(var i,o=n,a=n,u=e,c=o.parent.children[0],f=o.m,s=a.m,l=u.m,h=c.m;u=Gl(u),o=Xl(o),u&&o;)c=Xl(c),(a=Gl(a)).a=n,(i=u.z+l-o.z-f+t(u._,o._))>0&&(Vl($l(u,n,r),n,i),f+=i,s+=i),l+=u.m,f+=o.m,h+=c.m,s+=a.m;u&&!Gl(a)&&(a.t=u,a.m+=l-s),o&&!Xl(c)&&(c.t=o,c.m+=f-h,r=n)}return r}(n,i,n.parent.A||r[0])}function a(t){t._.x=t.z+t.parent.m,t.m+=t.parent.m}function u(t){t.x*=n,t.y=t.depth*e}return i.separation=function(n){return arguments.length?(t=n,i):t},i.size=function(t){return arguments.length?(r=!1,n=+t[0],e=+t[1],i):r?null:[n,e]},i.nodeSize=function(t){return arguments.length?(r=!0,n=+t[0],e=+t[1],i):r?[n,e]:null},i},t.treemap=function(){var t=Kl,n=!1,e=1,r=1,i=[0],o=Pl,a=Pl,u=Pl,c=Pl,f=Pl;function s(t){return t.x0=t.y0=0,t.x1=e,t.y1=r,t.eachBefore(l),i=[0],n&&t.eachBefore(Ul),t}function l(n){var e=i[n.depth],r=n.x0+e,s=n.y0+e,l=n.x1-e,h=n.y1-e;l=e-1){var s=u[n];return s.x0=i,s.y0=o,s.x1=a,void(s.y1=c)}for(var l=f[n],h=r/2+l,d=n+1,p=e-1;d>>1;f[v]c-o){var _=(i*y+a*g)/r;t(n,d,g,i,o,_,c),t(d,e,y,_,o,a,c)}else{var b=(o*y+c*g)/r;t(n,d,g,i,o,a,b),t(d,e,y,i,b,a,c)}}(0,c,t.value,n,e,r,i)},t.treemapDice=Ol,t.treemapSlice=Zl,t.treemapSliceDice=function(t,n,e,r,i){(1&t.depth?Zl:Ol)(t,n,e,r,i)},t.treemapSquarify=Kl,t.treemapResquarify=th,t.interpolate=ye,t.interpolateArray=se,t.interpolateBasis=Kn,t.interpolateBasisClosed=te,t.interpolateDate=le,t.interpolateDiscrete=function(t){var n=t.length;return function(e){return t[Math.max(0,Math.min(n-1,Math.floor(e*n)))]}},t.interpolateHue=function(t,n){var e=re(+t,+n);return function(t){var n=e(t);return n-360*Math.floor(n/360)}},t.interpolateNumber=he,t.interpolateObject=de,t.interpolateRound=_e,t.interpolateString=ge,t.interpolateTransformCss=Se,t.interpolateTransformSvg=ke,t.interpolateZoom=De,t.interpolateRgb=ae,t.interpolateRgbBasis=ce,t.interpolateRgbBasisClosed=fe,t.interpolateHsl=Le,t.interpolateHslLong=Ue,t.interpolateLab=function(t,n){var e=oe((t=Rn(t)).l,(n=Rn(n)).l),r=oe(t.a,n.a),i=oe(t.b,n.b),o=oe(t.opacity,n.opacity);return function(n){return t.l=e(n),t.a=r(n),t.b=i(n),t.opacity=o(n),t+""}},t.interpolateHcl=Be,t.interpolateHclLong=Ye,t.interpolateCubehelix=Ie,t.interpolateCubehelixLong=je,t.piecewise=function(t,n){for(var e=0,r=n.length-1,i=n[0],o=new Array(r<0?0:r);e=0;--n)f.push(t[r[o[n]][2]]);for(n=+u;nu!=f>u&&a<(c-e)*(u-r)/(f-r)+e&&(s=!s),c=e,f=r;return s},t.polygonLength=function(t){for(var n,e,r=-1,i=t.length,o=t[i-1],a=o[0],u=o[1],c=0;++r0?a[n-1]:r[0],n=o?[a[o-1],r]:[a[n-1],a[n]]},c.unknown=function(t){return arguments.length?(n=t,c):c},c.thresholds=function(){return a.slice()},c.copy=function(){return t().domain([e,r]).range(u).unknown(n)},sh.apply(Eh(c),arguments)},t.scaleThreshold=function t(){var n,e=[.5],r=[0,1],o=1;function a(t){return t<=t?r[i(e,t,0,o)]:n}return a.domain=function(t){return arguments.length?(e=ph.call(t),o=Math.min(e.length,r.length-1),a):e.slice()},a.range=function(t){return arguments.length?(r=ph.call(t),o=Math.min(e.length,r.length-1),a):r.slice()},a.invertExtent=function(t){var n=r.indexOf(t);return[e[n-1],e[n]]},a.unknown=function(t){return arguments.length?(n=t,a):n},a.copy=function(){return t().domain(e).range(r).unknown(n)},sh.apply(a,arguments)},t.scaleTime=function(){return sh.apply(Nv(Nd,wd,cd,od,rd,nd,Kh,Wh,t.timeFormat).domain([new Date(2e3,0,1),new Date(2e3,0,2)]),arguments)},t.scaleUtc=function(){return sh.apply(Nv(Wd,Vd,Rd,Cd,kd,Td,Kh,Wh,t.utcFormat).domain([Date.UTC(2e3,0,1),Date.UTC(2e3,0,2)]),arguments)},t.scaleSequential=function t(){var n=Eh(Av()(mh));return n.copy=function(){return Tv(n,t())},lh.apply(n,arguments)},t.scaleSequentialLog=function t(){var n=Uh(Av()).domain([1,10]);return n.copy=function(){return Tv(n,t()).base(n.base())},lh.apply(n,arguments)},t.scaleSequentialPow=Sv,t.scaleSequentialSqrt=function(){return Sv.apply(null,arguments).exponent(.5)},t.scaleSequentialSymlog=function t(){var n=Yh(Av());return n.copy=function(){return Tv(n,t()).constant(n.constant())},lh.apply(n,arguments)},t.scaleSequentialQuantile=function t(){var e=[],r=mh;function o(t){if(!isNaN(t=+t))return r((i(e,t)-1)/(e.length-1))}return o.domain=function(t){if(!arguments.length)return e.slice();e=[];for(var r,i=0,a=t.length;i1)&&(t-=Math.floor(t));var n=Math.abs(t-.5);return Hg.h=360*t-100,Hg.s=1.5-1.5*n,Hg.l=.8-.9*n,Hg+""},t.interpolateWarm=Ig,t.interpolateCool=jg,t.interpolateSinebow=function(t){var n;return t=(.5-t)*Math.PI,Xg.r=255*(n=Math.sin(t))*n,Xg.g=255*(n=Math.sin(t+Gg))*n,Xg.b=255*(n=Math.sin(t+Vg))*n,Xg+""},t.interpolateViridis=Wg,t.interpolateMagma=Zg,t.interpolateInferno=Qg,t.interpolatePlasma=Jg,t.create=function(t){return zt(W(t).call(document.documentElement))},t.creator=W,t.local=Dt,t.matcher=tt,t.mouse=Ot,t.namespace=$,t.namespaces=V,t.clientPoint=Ut,t.select=zt,t.selectAll=function(t){return"string"==typeof t?new Ct([document.querySelectorAll(t)],[document.documentElement]):new Ct([null==t?[]:t],Et)},t.selection=Pt,t.selector=Q,t.selectorAll=K,t.style=ct,t.touch=Bt,t.touches=function(t,n){null==n&&(n=Lt().touches);for(var e=0,r=n?n.length:0,i=new Array(r);ed;if(u||(u=c=Hi()),huy)if(v>sy-uy)u.moveTo(h*ey(d),h*oy(d)),u.arc(0,0,h,d,p,!g),l>uy&&(u.moveTo(l*ey(p),l*oy(p)),u.arc(0,0,l,p,d,g));else{var y,_,b=d,m=p,x=d,w=p,M=v,N=v,A=a.apply(this,arguments)/2,T=A>uy&&(r?+r.apply(this,arguments):ay(l*l+h*h)),S=iy(ty(h-l)/2,+e.apply(this,arguments)),k=S,E=S;if(T>uy){var C=ly(T/l*oy(A)),P=ly(T/h*oy(A));(M-=2*C)>uy?(x+=C*=g?1:-1,w-=C):(M=0,x=w=(d+p)/2),(N-=2*P)>uy?(b+=P*=g?1:-1,m-=P):(N=0,b=m=(d+p)/2)}var z=h*ey(b),R=h*oy(b),D=l*ey(w),q=l*oy(w);if(S>uy){var L,U=h*ey(m),O=h*oy(m),B=l*ey(x),Y=l*oy(x);if(v1?0:s<-1?cy:Math.acos(s))/2),G=ay(L[0]*L[0]+L[1]*L[1]);k=iy(S,(l-G)/(X-1)),E=iy(S,(h-G)/(X+1))}}N>uy?E>uy?(y=yy(B,Y,z,R,h,E,g),_=yy(U,O,D,q,h,E,g),u.moveTo(y.cx+y.x01,y.cy+y.y01),Euy&&M>uy?k>uy?(y=yy(D,q,U,O,l,-k,g),_=yy(z,R,B,Y,l,-k,g),u.lineTo(y.cx+y.x01,y.cy+y.y01),k0&&(d+=l);for(null!=n?p.sort(function(t,e){return n(v[t],v[e])}):null!=e&&p.sort(function(t,n){return e(a[t],a[n])}),u=0,f=d?(y-h*b)/d:0;u0?l*f:0)+b,v[c]={data:a[c],index:u,value:l,startAngle:g,endAngle:s,padAngle:_};return v}return a.value=function(n){return arguments.length?(t="function"==typeof n?n:Kg(+n),a):t},a.sortValues=function(t){return arguments.length?(n=t,e=null,a):n},a.sort=function(t){return arguments.length?(e=t,n=null,a):e},a.startAngle=function(t){return arguments.length?(r="function"==typeof t?t:Kg(+t),a):r},a.endAngle=function(t){return arguments.length?(i="function"==typeof t?t:Kg(+t),a):i},a.padAngle=function(t){return arguments.length?(o="function"==typeof t?t:Kg(+t),a):o},a},t.areaRadial=Py,t.radialArea=Py,t.lineRadial=Cy,t.radialLine=Cy,t.pointRadial=zy,t.linkHorizontal=function(){return Ly(Uy)},t.linkVertical=function(){return Ly(Oy)},t.linkRadial=function(){var t=Ly(By);return t.angle=t.x,delete t.x,t.radius=t.y,delete t.y,t},t.symbol=function(){var t=Kg(Yy),n=Kg(64),e=null;function r(){var r;if(e||(e=r=Hi()),t.apply(this,arguments).draw(e,+n.apply(this,arguments)),r)return e=null,r+""||null}return r.type=function(n){return arguments.length?(t="function"==typeof n?n:Kg(n),r):t},r.size=function(t){return arguments.length?(n="function"==typeof t?t:Kg(+t),r):n},r.context=function(t){return arguments.length?(e=null==t?null:t,r):e},r},t.symbols=e_,t.symbolCircle=Yy,t.symbolCross=Fy,t.symbolDiamond=Hy,t.symbolSquare=Wy,t.symbolStar=$y,t.symbolTriangle=Qy,t.symbolWye=n_,t.curveBasisClosed=function(t){return new a_(t)},t.curveBasisOpen=function(t){return new u_(t)},t.curveBasis=function(t){return new o_(t)},t.curveBundle=f_,t.curveCardinalClosed=p_,t.curveCardinalOpen=g_,t.curveCardinal=h_,t.curveCatmullRomClosed=x_,t.curveCatmullRomOpen=M_,t.curveCatmullRom=b_,t.curveLinearClosed=function(t){return new N_(t)},t.curveLinear=by,t.curveMonotoneX=function(t){return new E_(t)},t.curveMonotoneY=function(t){return new C_(t)},t.curveNatural=function(t){return new z_(t)},t.curveStep=function(t){return new D_(t,.5)},t.curveStepAfter=function(t){return new D_(t,1)},t.curveStepBefore=function(t){return new D_(t,0)},t.stack=function(){var t=Kg([]),n=L_,e=q_,r=U_;function i(i){var o,a,u=t.apply(this,arguments),c=i.length,f=u.length,s=new Array(f);for(o=0;o0){for(var e,r,i,o=0,a=t[0].length;o1)for(var e,r,i,o,a,u,c=0,f=t[n[0]].length;c=0?(r[0]=o,r[1]=o+=i):i<0?(r[1]=a,r[0]=a+=i):r[0]=o},t.stackOffsetNone=q_,t.stackOffsetSilhouette=function(t,n){if((e=t.length)>0){for(var e,r=0,i=t[n[0]],o=i.length;r0&&(r=(e=t[n[0]]).length)>0){for(var e,r,i,o=0,a=1;adr&&e.name===n)return new Er([[t]],fi,n,+r);return null},t.interrupt=Mr,t.voronoi=function(){var t=j_,n=H_,e=null;function r(r){return new Nb(r.map(function(e,i){var o=[Math.round(t(e,i,r)/xb)*xb,Math.round(n(e,i,r)/xb)*xb];return o.index=i,o.data=e,o}),e)}return r.polygons=function(t){return r(t).polygons()},r.links=function(t){return r(t).links()},r.triangles=function(t){return r(t).triangles()},r.x=function(n){return arguments.length?(t="function"==typeof n?n:I_(+n),r):t},r.y=function(t){return arguments.length?(n="function"==typeof t?t:I_(+t),r):n},r.extent=function(t){return arguments.length?(e=null==t?null:[[+t[0][0],+t[0][1]],[+t[1][0],+t[1][1]]],r):e&&[[e[0][0],e[0][1]],[e[1][0],e[1][1]]]},r.size=function(t){return arguments.length?(e=null==t?null:[[0,0],[+t[0],+t[1]]],r):e&&[e[1][0]-e[0][0],e[1][1]-e[0][1]]},r},t.zoom=function(){var n,e,r=zb,i=Rb,o=Ub,a=qb,u=Lb,c=[0,1/0],f=[[-1/0,-1/0],[1/0,1/0]],s=250,l=De,h=[],d=I("start","zoom","end"),p=500,v=150,g=0;function y(t){t.property("__zoom",Db).on("wheel.zoom",N).on("mousedown.zoom",A).on("dblclick.zoom",T).filter(u).on("touchstart.zoom",S).on("touchmove.zoom",k).on("touchend.zoom touchcancel.zoom",E).style("touch-action","none").style("-webkit-tap-highlight-color","rgba(0,0,0,0)")}function _(t,n){return(n=Math.max(c[0],Math.min(c[1],n)))===t.k?t:new Sb(n,t.x,t.y)}function b(t,n,e){var r=n[0]-e[0]*t.k,i=n[1]-e[1]*t.k;return r===t.x&&i===t.y?t:new Sb(t.k,r,i)}function m(t){return[(+t[0][0]+ +t[1][0])/2,(+t[0][1]+ +t[1][1])/2]}function x(t,n,e){t.on("start.zoom",function(){w(this,arguments).start()}).on("interrupt.zoom end.zoom",function(){w(this,arguments).end()}).tween("zoom",function(){var t=arguments,r=w(this,t),o=i.apply(this,t),a=e||m(o),u=Math.max(o[1][0]-o[0][0],o[1][1]-o[0][1]),c=this.__zoom,f="function"==typeof n?n.apply(this,t):n,s=l(c.invert(a).concat(u/c.k),f.invert(a).concat(u/f.k));return function(t){if(1===t)t=f;else{var n=s(t),e=u/n[2];t=new Sb(e,a[0]-n[0]*e,a[1]-n[1]*e)}r.zoom(null,t)}})}function w(t,n){for(var e,r=0,i=h.length;rg}n.zoom("mouse",o(b(n.that.__zoom,n.mouse[0]=Ot(n.that),n.mouse[1]),n.extent,f))},!0).on("mouseup.zoom",function(){i.on("mousemove.zoom mouseup.zoom",null),jt(t.event.view,n.moved),Pb(),n.end()},!0),a=Ot(this),u=t.event.clientX,c=t.event.clientY;It(t.event.view),Cb(),n.mouse=[a,this.__zoom.invert(a)],Mr(this),n.start()}}function T(){if(r.apply(this,arguments)){var n=this.__zoom,e=Ot(this),a=n.invert(e),u=n.k*(t.event.shiftKey?.5:2),c=o(b(_(n,u),e,a),i.apply(this,arguments),f);Pb(),s>0?zt(this).transition().duration(s).call(x,c,e):zt(this).call(y.transform,c)}}function S(){if(r.apply(this,arguments)){var e,i,o,a,u=w(this,arguments),c=t.event.changedTouches,f=c.length;for(Cb(),i=0;i