@carbon/charts 1.8.0 → 1.9.0-rc.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/CHANGELOG.md +84 -155
- package/README.md +11 -13
- package/dist/_baseEach-603421de.mjs +21 -0
- package/dist/_baseEach-603421de.mjs.map +1 -0
- package/dist/_baseEach-cdac417f.js +2 -0
- package/dist/_baseEach-cdac417f.js.map +1 -0
- package/dist/a11y-7bad4f48.mjs +5 -0
- package/dist/a11y-7bad4f48.mjs.map +1 -0
- package/dist/a11y-c7c9d087.js +2 -0
- package/dist/a11y-c7c9d087.js.map +1 -0
- package/dist/angle-utils-6f166b40.js +2 -0
- package/dist/angle-utils-6f166b40.js.map +1 -0
- package/dist/angle-utils-8b6ce998.mjs +387 -0
- package/dist/angle-utils-8b6ce998.mjs.map +1 -0
- package/dist/axis-chart.d.ts +13 -0
- package/dist/chart.d.ts +18 -0
- package/dist/charts/alluvial.d.ts +10 -0
- package/dist/charts/area-stacked.d.ts +8 -0
- package/dist/charts/area.d.ts +8 -0
- package/dist/charts/bar-grouped.d.ts +8 -0
- package/dist/charts/bar-simple.d.ts +8 -0
- package/dist/charts/bar-stacked.d.ts +8 -0
- package/dist/charts/boxplot.d.ts +10 -0
- package/dist/charts/bubble.d.ts +8 -0
- package/dist/charts/bullet.d.ts +10 -0
- package/dist/charts/choropleth.d.ts +14 -0
- package/dist/charts/circle-pack.d.ts +10 -0
- package/dist/charts/combo.d.ts +9 -0
- package/dist/charts/donut.d.ts +8 -0
- package/dist/charts/gauge.d.ts +10 -0
- package/dist/charts/heatmap.d.ts +14 -0
- package/dist/charts/histogram.d.ts +10 -0
- package/dist/charts/index.d.ts +27 -0
- package/dist/charts/line.d.ts +8 -0
- package/dist/charts/lollipop.d.ts +8 -0
- package/dist/charts/meter.d.ts +10 -0
- package/dist/charts/pie.d.ts +10 -0
- package/dist/charts/radar.d.ts +10 -0
- package/dist/charts/scatter.d.ts +8 -0
- package/dist/charts/tree.d.ts +10 -0
- package/dist/charts/treemap.d.ts +10 -0
- package/dist/charts/wordcloud.d.ts +10 -0
- package/dist/choropleth-4ac6ac20.js +82 -0
- package/dist/choropleth-4ac6ac20.js.map +1 -0
- package/dist/choropleth-f473ea0d.mjs +7997 -0
- package/dist/choropleth-f473ea0d.mjs.map +1 -0
- package/dist/color-scale-utils-5eb3eeaa.mjs +3809 -0
- package/dist/color-scale-utils-5eb3eeaa.mjs.map +1 -0
- package/dist/color-scale-utils-7d463811.js +3 -0
- package/dist/color-scale-utils-7d463811.js.map +1 -0
- package/dist/components/axes/axis.d.ts +24 -0
- package/{build/src → dist}/components/axes/chart-clip.d.ts +3 -3
- package/{components → dist/components}/axes/grid-brush.d.ts +10 -10
- package/{components → dist/components}/axes/grid.d.ts +22 -22
- package/{build/src → dist}/components/axes/hover-axis.d.ts +1 -1
- package/dist/components/axes/index.d.ts +12 -0
- package/{components → dist/components}/axes/ruler-binned.d.ts +7 -7
- package/{components → dist/components}/axes/ruler.d.ts +27 -27
- package/{build/src → dist}/components/axes/toolbar.d.ts +7 -7
- package/{components → dist/components}/axes/two-dimensional-axes.d.ts +16 -16
- package/{components → dist/components}/axes/zero-line.d.ts +7 -7
- package/{components → dist/components}/axes/zoom-bar.d.ts +28 -28
- package/{build/src → dist}/components/component.d.ts +10 -8
- package/dist/components/diagrams/buildPaths.d.ts +40 -0
- package/dist/components/diagrams/index.d.ts +2 -0
- package/{components → dist/components}/essentials/canvas-chart-clip.d.ts +6 -6
- package/{build/src → dist}/components/essentials/color-scale-legend.d.ts +3 -3
- package/{build/src → dist}/components/essentials/geo-projection.d.ts +2 -2
- package/{build/src → dist}/components/essentials/highlights.d.ts +3 -3
- package/dist/components/essentials/index.d.ts +11 -0
- package/{build/src → dist}/components/essentials/legend.d.ts +3 -3
- package/{components → dist/components}/essentials/modal.d.ts +14 -14
- package/{build/src → dist}/components/essentials/threshold.d.ts +5 -5
- package/{components → dist/components}/essentials/title-meter.d.ts +30 -30
- package/{components → dist/components}/essentials/title.d.ts +20 -20
- package/{build/src → dist}/components/essentials/tooltip.d.ts +4 -4
- package/{components → dist/components}/graphs/alluvial.d.ts +14 -14
- package/{components → dist/components}/graphs/area-stacked.d.ts +11 -11
- package/dist/components/graphs/area.d.ts +12 -0
- package/{build/src → dist}/components/graphs/bar-grouped.d.ts +4 -4
- package/{build/src → dist}/components/graphs/bar-simple.d.ts +3 -3
- package/{build/src → dist}/components/graphs/bar-stacked.d.ts +4 -4
- package/{build/src → dist}/components/graphs/bar.d.ts +2 -2
- package/{components → dist/components}/graphs/boxplot.d.ts +9 -9
- package/{build/src → dist}/components/graphs/bubble.d.ts +2 -2
- package/dist/components/graphs/bullet.d.ts +12 -0
- package/{components → dist/components}/graphs/choropleth.d.ts +6 -6
- package/{build/src → dist}/components/graphs/circle-pack.d.ts +3 -3
- package/{build/src → dist}/components/graphs/donut.d.ts +1 -1
- package/{build/src → dist}/components/graphs/gauge.d.ts +2 -2
- package/{build/src → dist}/components/graphs/heatmap.d.ts +4 -4
- package/dist/components/graphs/histogram.d.ts +12 -0
- package/dist/components/graphs/index.d.ts +28 -0
- package/dist/components/graphs/line.d.ts +11 -0
- package/dist/components/graphs/lollipop.d.ts +14 -0
- package/{components → dist/components}/graphs/meter.d.ts +10 -10
- package/{build/src → dist}/components/graphs/pie.d.ts +4 -4
- package/{build/src → dist}/components/graphs/radar.d.ts +6 -6
- package/{build/src → dist}/components/graphs/scatter-stacked.d.ts +2 -2
- package/dist/components/graphs/scatter.d.ts +21 -0
- package/dist/components/graphs/skeleton-lines.d.ts +12 -0
- package/{build/src → dist}/components/graphs/skeleton.d.ts +6 -5
- package/{components → dist/components}/graphs/tree.d.ts +9 -9
- package/dist/components/graphs/treemap.d.ts +11 -0
- package/{build/src → dist}/components/graphs/wordcloud.d.ts +4 -4
- package/dist/components/index.d.ts +6 -0
- package/dist/components/index.js +2 -0
- package/dist/components/index.js.map +1 -0
- package/dist/components/index.mjs +76 -0
- package/dist/components/index.mjs.map +1 -0
- package/dist/components/layout/index.d.ts +2 -0
- package/{components → dist/components}/layout/layout.d.ts +18 -17
- package/dist/components/layout/spacer.d.ts +5 -0
- package/{build/src → dist}/configuration-non-customizable.d.ts +4 -4
- package/{configuration.d.ts → dist/configuration.d.ts} +48 -46
- package/dist/demo/charts/index.d.ts +62 -0
- package/{demo/data → dist/demo/charts}/time-series-axis.d.ts +60 -135
- package/{build/demo/data → dist/demo/charts}/zoom-bar.d.ts +12 -27
- package/dist/demo/index.d.ts +4 -0
- package/dist/demo/index.js +470 -0
- package/dist/demo/index.js.map +1 -0
- package/dist/demo/index.mjs +51786 -0
- package/dist/demo/index.mjs.map +1 -0
- package/{demo → dist/demo}/styles.css +286 -1142
- package/dist/demo/styles.css.map +1 -0
- package/dist/demo/utils/index.d.ts +2 -0
- package/dist/demo/utils/sandbox.d.ts +39 -0
- package/dist/demo/utils/story-widgets.d.ts +7 -0
- package/dist/enums-a96ef472.mjs +89 -0
- package/dist/enums-a96ef472.mjs.map +1 -0
- package/dist/enums-aa2efd99.js +2 -0
- package/dist/enums-aa2efd99.js.map +1 -0
- package/dist/index-822564ed.js +2 -0
- package/dist/index-822564ed.js.map +1 -0
- package/dist/index-a266373c.mjs +749 -0
- package/dist/index-a266373c.mjs.map +1 -0
- package/dist/index-becfb567.mjs +72 -0
- package/dist/index-becfb567.mjs.map +1 -0
- package/dist/index-d865d500.js +2 -0
- package/dist/index-d865d500.js.map +1 -0
- package/dist/index-ec554115.mjs +62 -0
- package/dist/index-ec554115.mjs.map +1 -0
- package/dist/index-f23685eb.js +2 -0
- package/dist/index-f23685eb.js.map +1 -0
- package/dist/index.d.ts +11 -0
- package/dist/index.js +2 -0
- package/dist/index.js.map +1 -0
- package/dist/index.mjs +1121 -0
- package/dist/index.mjs.map +1 -0
- package/{build/src → dist}/interfaces/axis-scales.d.ts +11 -11
- package/{interfaces → dist/interfaces}/charts.d.ts +517 -512
- package/{build/src → dist}/interfaces/components.d.ts +11 -11
- package/dist/interfaces/index.d.ts +11 -0
- package/dist/interfaces/index.js +2 -0
- package/dist/interfaces/index.js.map +1 -0
- package/dist/interfaces/index.mjs +58 -0
- package/dist/interfaces/index.mjs.map +1 -0
- package/{interfaces → dist/interfaces}/layout.d.ts +21 -15
- package/{build/src → dist}/interfaces/model.d.ts +2 -2
- package/dist/interfaces/services.d.ts +20 -0
- package/{build/src → dist}/interfaces/truncation.d.ts +2 -2
- package/{build/src → dist}/model/binned-charts.d.ts +1 -1
- package/{build/src → dist}/model/cartesian-charts.d.ts +2 -2
- package/{model → dist/model}/heatmap.d.ts +57 -52
- package/dist/model/index.d.ts +16 -0
- package/dist/model/index.js +3 -0
- package/dist/model/index.js.map +1 -0
- package/dist/model/index.mjs +1107 -0
- package/dist/model/index.mjs.map +1 -0
- package/{model → dist/model}/meter.d.ts +20 -19
- package/{model → dist/model}/model.d.ts +110 -107
- package/{services → dist/services}/angle-utils.d.ts +15 -16
- package/{services → dist/services}/color-scale-utils.d.ts +2 -2
- package/dist/services/curves.d.ts +24 -0
- package/dist/services/essentials/dom-utils.d.ts +45 -0
- package/dist/services/essentials/events.d.ts +8 -0
- package/dist/services/essentials/files.d.ts +7 -0
- package/{build/src → dist}/services/essentials/gradient-utils.d.ts +2 -2
- package/dist/services/essentials/index.d.ts +5 -0
- package/dist/services/essentials/transitions.d.ts +13 -0
- package/dist/services/index.d.ts +9 -0
- package/dist/services/index.js +2 -0
- package/dist/services/index.js.map +1 -0
- package/dist/services/index.mjs +32 -0
- package/dist/services/index.mjs.map +1 -0
- package/dist/services/scales-cartesian.d.ts +89 -0
- package/dist/services/service.d.ts +11 -0
- package/{services → dist/services}/time-series.d.ts +13 -13
- package/{build/src → dist}/services/zoom.d.ts +2 -2
- package/{styles → dist/styles}/_chart-holder.scss +5 -5
- package/{styles → dist/styles}/color-palatte.scss +66 -66
- package/{styles → dist/styles}/colors.scss +15 -39
- package/{styles → dist/styles}/components/_color-legend.scss +2 -2
- package/{styles → dist/styles}/components/_edge.scss +4 -4
- package/{styles → dist/styles}/components/_grid.scss +2 -2
- package/dist/styles/components/_marker.scss +7 -0
- package/{styles → dist/styles}/components/_meter-title.scss +2 -2
- package/{styles → dist/styles}/components/_tooltip.scss +3 -3
- package/{styles → dist/styles}/components/diagrams/_card-node.scss +3 -3
- package/{styles → dist/styles}/components/diagrams/_edge.scss +5 -5
- package/{styles → dist/styles}/components/diagrams/_shape-node.scss +3 -3
- package/dist/styles/components/diagrams/index.scss +4 -0
- package/{styles → dist/styles}/graphs/_alluvial.scss +2 -2
- package/{styles → dist/styles}/graphs/_bullet.scss +3 -3
- package/{styles → dist/styles}/graphs/_circle-pack.scss +1 -1
- package/{styles → dist/styles}/graphs/_gauge.scss +1 -1
- package/{styles → dist/styles}/graphs/_heatmap.scss +2 -2
- package/{styles → dist/styles}/graphs/_meter.scss +1 -1
- package/{styles → dist/styles}/graphs/_radar.scss +1 -1
- package/{styles → dist/styles}/graphs/_scatter-stacked.scss +1 -1
- package/{styles → dist/styles}/graphs/_tree.scss +2 -3
- package/{styles → dist/styles}/styles.scss +8 -3
- package/{styles → dist/styles}/tokens.scss +97 -106
- package/dist/styles.css +28264 -0
- package/dist/styles.css.map +1 -0
- package/dist/styles.min.css +1 -0
- package/dist/styles.min.css.map +1 -0
- package/{tools.d.ts → dist/tools.d.ts} +144 -144
- package/package.json +136 -101
- package/LICENSE.md +0 -201
- package/axis-chart.d.ts +0 -10
- package/axis-chart.js +0 -169
- package/axis-chart.js.map +0 -1
- package/build/demo/create-codesandbox.d.ts +0 -113
- package/build/demo/data/high-scale.d.ts +0 -1
- package/build/demo/data/index.d.ts +0 -33
- package/build/demo/data/time-series-axis.d.ts +0 -368
- package/build/demo/utils.d.ts +0 -40
- package/build/src/axis-chart.d.ts +0 -10
- package/build/src/chart.d.ts +0 -14
- package/build/src/charts/alluvial.d.ts +0 -8
- package/build/src/charts/area-stacked.d.ts +0 -6
- package/build/src/charts/area.d.ts +0 -6
- package/build/src/charts/bar-grouped.d.ts +0 -6
- package/build/src/charts/bar-simple.d.ts +0 -6
- package/build/src/charts/bar-stacked.d.ts +0 -6
- package/build/src/charts/boxplot.d.ts +0 -8
- package/build/src/charts/bubble.d.ts +0 -6
- package/build/src/charts/bullet.d.ts +0 -8
- package/build/src/charts/choropleth.d.ts +0 -10
- package/build/src/charts/circle-pack.d.ts +0 -8
- package/build/src/charts/combo.d.ts +0 -7
- package/build/src/charts/donut.d.ts +0 -6
- package/build/src/charts/gauge.d.ts +0 -8
- package/build/src/charts/heatmap.d.ts +0 -10
- package/build/src/charts/histogram.d.ts +0 -8
- package/build/src/charts/index.d.ts +0 -25
- package/build/src/charts/line.d.ts +0 -6
- package/build/src/charts/lollipop.d.ts +0 -6
- package/build/src/charts/meter.d.ts +0 -8
- package/build/src/charts/pie.d.ts +0 -8
- package/build/src/charts/radar.d.ts +0 -8
- package/build/src/charts/scatter.d.ts +0 -6
- package/build/src/charts/tree.d.ts +0 -8
- package/build/src/charts/treemap.d.ts +0 -8
- package/build/src/charts/wordcloud.d.ts +0 -8
- package/build/src/components/axes/axis.d.ts +0 -24
- package/build/src/components/axes/grid-brush.d.ts +0 -10
- package/build/src/components/axes/grid.d.ts +0 -22
- package/build/src/components/axes/ruler-binned.d.ts +0 -7
- package/build/src/components/axes/ruler.d.ts +0 -27
- package/build/src/components/axes/two-dimensional-axes.d.ts +0 -16
- package/build/src/components/axes/zero-line.d.ts +0 -7
- package/build/src/components/axes/zoom-bar.d.ts +0 -28
- package/build/src/components/diagrams/buildPaths.d.ts +0 -63
- package/build/src/components/essentials/canvas-chart-clip.d.ts +0 -6
- package/build/src/components/essentials/modal.d.ts +0 -14
- package/build/src/components/essentials/title-meter.d.ts +0 -30
- package/build/src/components/essentials/title.d.ts +0 -20
- package/build/src/components/graphs/alluvial.d.ts +0 -14
- package/build/src/components/graphs/area-stacked.d.ts +0 -11
- package/build/src/components/graphs/area.d.ts +0 -12
- package/build/src/components/graphs/boxplot.d.ts +0 -9
- package/build/src/components/graphs/bullet.d.ts +0 -12
- package/build/src/components/graphs/choropleth.d.ts +0 -6
- package/build/src/components/graphs/histogram.d.ts +0 -12
- package/build/src/components/graphs/line.d.ts +0 -11
- package/build/src/components/graphs/lollipop.d.ts +0 -14
- package/build/src/components/graphs/meter.d.ts +0 -10
- package/build/src/components/graphs/scatter.d.ts +0 -21
- package/build/src/components/graphs/skeleton-lines.d.ts +0 -11
- package/build/src/components/graphs/tree.d.ts +0 -9
- package/build/src/components/graphs/treemap.d.ts +0 -11
- package/build/src/components/index.d.ts +0 -53
- package/build/src/components/layout/layout.d.ts +0 -17
- package/build/src/components/layout/spacer.d.ts +0 -5
- package/build/src/configuration.d.ts +0 -46
- package/build/src/interfaces/charts.d.ts +0 -512
- package/build/src/interfaces/index.d.ts +0 -7
- package/build/src/interfaces/layout.d.ts +0 -15
- package/build/src/model/heatmap.d.ts +0 -52
- package/build/src/model/meter.d.ts +0 -19
- package/build/src/model/model.d.ts +0 -107
- package/build/src/services/angle-utils.d.ts +0 -205
- package/build/src/services/color-scale-utils.d.ts +0 -10
- package/build/src/services/curves.d.ts +0 -25
- package/build/src/services/essentials/dom-utils.d.ts +0 -39
- package/build/src/services/essentials/events.d.ts +0 -8
- package/build/src/services/essentials/files.d.ts +0 -6
- package/build/src/services/essentials/transitions.d.ts +0 -13
- package/build/src/services/index.d.ts +0 -10
- package/build/src/services/scales-cartesian.d.ts +0 -86
- package/build/src/services/service.d.ts +0 -10
- package/build/src/services/time-series.d.ts +0 -787
- package/build/src/tools.d.ts +0 -2427
- package/build/stories/all.stories.d.ts +0 -1
- package/build/stories/tutorials/api.d.ts +0 -4
- package/build/stories/tutorials/color-palette.d.ts +0 -4
- package/build/stories/tutorials/combo-charts.d.ts +0 -4
- package/build/stories/tutorials/dual-axes.d.ts +0 -4
- package/build/stories/tutorials/event-listeners.d.ts +0 -4
- package/build/stories/tutorials/getting-started/angular.d.ts +0 -5
- package/build/stories/tutorials/getting-started/react.d.ts +0 -5
- package/build/stories/tutorials/getting-started/vanilla.d.ts +0 -5
- package/build/stories/tutorials/getting-started/vue.d.ts +0 -5
- package/build/stories/tutorials/index.d.ts +0 -11
- package/build/stories/tutorials/tabular-data-format.d.ts +0 -4
- package/build/stories/tutorials/themes.d.ts +0 -4
- package/build/stories/tutorials.stories.d.ts +0 -1
- package/bundle.js +0 -17
- package/chart.d.ts +0 -14
- package/chart.js +0 -198
- package/chart.js.map +0 -1
- package/charts/alluvial.d.ts +0 -8
- package/charts/alluvial.js +0 -46
- package/charts/alluvial.js.map +0 -1
- package/charts/area-stacked.d.ts +0 -6
- package/charts/area-stacked.js +0 -55
- package/charts/area-stacked.js.map +0 -1
- package/charts/area.d.ts +0 -6
- package/charts/area.js +0 -54
- package/charts/area.js.map +0 -1
- package/charts/bar-grouped.d.ts +0 -6
- package/charts/bar-grouped.js +0 -49
- package/charts/bar-grouped.js.map +0 -1
- package/charts/bar-simple.d.ts +0 -6
- package/charts/bar-simple.js +0 -49
- package/charts/bar-simple.js.map +0 -1
- package/charts/bar-stacked.d.ts +0 -6
- package/charts/bar-stacked.js +0 -50
- package/charts/bar-stacked.js.map +0 -1
- package/charts/boxplot.d.ts +0 -8
- package/charts/boxplot.js +0 -55
- package/charts/boxplot.js.map +0 -1
- package/charts/bubble.d.ts +0 -6
- package/charts/bubble.js +0 -49
- package/charts/bubble.js.map +0 -1
- package/charts/bullet.d.ts +0 -8
- package/charts/bullet.js +0 -50
- package/charts/bullet.js.map +0 -1
- package/charts/choropleth.d.ts +0 -10
- package/charts/choropleth.js +0 -141
- package/charts/choropleth.js.map +0 -1
- package/charts/circle-pack.d.ts +0 -8
- package/charts/circle-pack.js +0 -45
- package/charts/circle-pack.js.map +0 -1
- package/charts/combo.d.ts +0 -7
- package/charts/combo.js +0 -132
- package/charts/combo.js.map +0 -1
- package/charts/donut.d.ts +0 -6
- package/charts/donut.js +0 -46
- package/charts/donut.js.map +0 -1
- package/charts/gauge.d.ts +0 -8
- package/charts/gauge.js +0 -42
- package/charts/gauge.js.map +0 -1
- package/charts/heatmap.d.ts +0 -10
- package/charts/heatmap.js +0 -142
- package/charts/heatmap.js.map +0 -1
- package/charts/histogram.d.ts +0 -8
- package/charts/histogram.js +0 -48
- package/charts/histogram.js.map +0 -1
- package/charts/index.d.ts +0 -25
- package/charts/index.js +0 -26
- package/charts/index.js.map +0 -1
- package/charts/line.d.ts +0 -6
- package/charts/line.js +0 -48
- package/charts/line.js.map +0 -1
- package/charts/lollipop.d.ts +0 -6
- package/charts/lollipop.js +0 -50
- package/charts/lollipop.js.map +0 -1
- package/charts/meter.d.ts +0 -8
- package/charts/meter.js +0 -94
- package/charts/meter.js.map +0 -1
- package/charts/pie.d.ts +0 -8
- package/charts/pie.js +0 -55
- package/charts/pie.js.map +0 -1
- package/charts/radar.d.ts +0 -8
- package/charts/radar.js +0 -44
- package/charts/radar.js.map +0 -1
- package/charts/scatter.d.ts +0 -6
- package/charts/scatter.js +0 -49
- package/charts/scatter.js.map +0 -1
- package/charts/tree.d.ts +0 -8
- package/charts/tree.js +0 -47
- package/charts/tree.js.map +0 -1
- package/charts/treemap.d.ts +0 -8
- package/charts/treemap.js +0 -43
- package/charts/treemap.js.map +0 -1
- package/charts/wordcloud.d.ts +0 -8
- package/charts/wordcloud.js +0 -49
- package/charts/wordcloud.js.map +0 -1
- package/components/axes/axis.d.ts +0 -24
- package/components/axes/axis.js +0 -587
- package/components/axes/axis.js.map +0 -1
- package/components/axes/chart-clip.d.ts +0 -13
- package/components/axes/chart-clip.js +0 -63
- package/components/axes/chart-clip.js.map +0 -1
- package/components/axes/grid-brush.js +0 -170
- package/components/axes/grid-brush.js.map +0 -1
- package/components/axes/grid.js +0 -235
- package/components/axes/grid.js.map +0 -1
- package/components/axes/hover-axis.d.ts +0 -10
- package/components/axes/hover-axis.js +0 -243
- package/components/axes/hover-axis.js.map +0 -1
- package/components/axes/ruler-binned.js +0 -136
- package/components/axes/ruler-binned.js.map +0 -1
- package/components/axes/ruler-stacked.d.ts +0 -4
- package/components/axes/ruler-stacked.js +0 -26
- package/components/axes/ruler-stacked.js.map +0 -1
- package/components/axes/ruler.js +0 -209
- package/components/axes/ruler.js.map +0 -1
- package/components/axes/toolbar.d.ts +0 -40
- package/components/axes/toolbar.js +0 -558
- package/components/axes/toolbar.js.map +0 -1
- package/components/axes/two-dimensional-axes.js +0 -134
- package/components/axes/two-dimensional-axes.js.map +0 -1
- package/components/axes/zero-line.js +0 -76
- package/components/axes/zero-line.js.map +0 -1
- package/components/axes/zoom-bar.js +0 -490
- package/components/axes/zoom-bar.js.map +0 -1
- package/components/component.d.ts +0 -28
- package/components/component.js +0 -102
- package/components/component.js.map +0 -1
- package/components/diagrams/buildPaths.d.ts +0 -39
- package/components/diagrams/buildPaths.js +0 -71
- package/components/diagrams/buildPaths.js.map +0 -1
- package/components/diagrams/markerDefinitions.d.ts +0 -37
- package/components/diagrams/markerDefinitions.js +0 -38
- package/components/diagrams/markerDefinitions.js.map +0 -1
- package/components/essentials/canvas-chart-clip.js +0 -46
- package/components/essentials/canvas-chart-clip.js.map +0 -1
- package/components/essentials/color-scale-legend.d.ts +0 -20
- package/components/essentials/color-scale-legend.js +0 -237
- package/components/essentials/color-scale-legend.js.map +0 -1
- package/components/essentials/geo-projection.d.ts +0 -16
- package/components/essentials/geo-projection.js +0 -160
- package/components/essentials/geo-projection.js.map +0 -1
- package/components/essentials/highlights.d.ts +0 -13
- package/components/essentials/highlights.js +0 -196
- package/components/essentials/highlights.js.map +0 -1
- package/components/essentials/legend.d.ts +0 -11
- package/components/essentials/legend.js +0 -428
- package/components/essentials/legend.js.map +0 -1
- package/components/essentials/modal.js +0 -89
- package/components/essentials/modal.js.map +0 -1
- package/components/essentials/threshold.d.ts +0 -20
- package/components/essentials/threshold.js +0 -306
- package/components/essentials/threshold.js.map +0 -1
- package/components/essentials/title-meter.js +0 -279
- package/components/essentials/title-meter.js.map +0 -1
- package/components/essentials/title.js +0 -138
- package/components/essentials/title.js.map +0 -1
- package/components/essentials/tooltip-axis.d.ts +0 -4
- package/components/essentials/tooltip-axis.js +0 -142
- package/components/essentials/tooltip-axis.js.map +0 -1
- package/components/essentials/tooltip.d.ts +0 -22
- package/components/essentials/tooltip.js +0 -263
- package/components/essentials/tooltip.js.map +0 -1
- package/components/graphs/alluvial.js +0 -535
- package/components/graphs/alluvial.js.map +0 -1
- package/components/graphs/area-stacked.js +0 -131
- package/components/graphs/area-stacked.js.map +0 -1
- package/components/graphs/area.d.ts +0 -12
- package/components/graphs/area.js +0 -260
- package/components/graphs/area.js.map +0 -1
- package/components/graphs/bar-grouped.d.ts +0 -22
- package/components/graphs/bar-grouped.js +0 -312
- package/components/graphs/bar-grouped.js.map +0 -1
- package/components/graphs/bar-simple.d.ts +0 -12
- package/components/graphs/bar-simple.js +0 -218
- package/components/graphs/bar-simple.js.map +0 -1
- package/components/graphs/bar-stacked.d.ts +0 -13
- package/components/graphs/bar-stacked.js +0 -281
- package/components/graphs/bar-stacked.js.map +0 -1
- package/components/graphs/bar.d.ts +0 -5
- package/components/graphs/bar.js +0 -58
- package/components/graphs/bar.js.map +0 -1
- package/components/graphs/boxplot.js +0 -485
- package/components/graphs/boxplot.js.map +0 -1
- package/components/graphs/bubble.d.ts +0 -13
- package/components/graphs/bubble.js +0 -113
- package/components/graphs/bubble.js.map +0 -1
- package/components/graphs/bullet.d.ts +0 -12
- package/components/graphs/bullet.js +0 -395
- package/components/graphs/bullet.js.map +0 -1
- package/components/graphs/choropleth.js +0 -106
- package/components/graphs/choropleth.js.map +0 -1
- package/components/graphs/circle-pack.d.ts +0 -19
- package/components/graphs/circle-pack.js +0 -388
- package/components/graphs/circle-pack.js.map +0 -1
- package/components/graphs/donut.d.ts +0 -9
- package/components/graphs/donut.js +0 -116
- package/components/graphs/donut.js.map +0 -1
- package/components/graphs/gauge.d.ts +0 -27
- package/components/graphs/gauge.js +0 -347
- package/components/graphs/gauge.js.map +0 -1
- package/components/graphs/heatmap.d.ts +0 -25
- package/components/graphs/heatmap.js +0 -388
- package/components/graphs/heatmap.js.map +0 -1
- package/components/graphs/histogram.d.ts +0 -12
- package/components/graphs/histogram.js +0 -220
- package/components/graphs/histogram.js.map +0 -1
- package/components/graphs/line.d.ts +0 -11
- package/components/graphs/line.js +0 -179
- package/components/graphs/line.js.map +0 -1
- package/components/graphs/lollipop.d.ts +0 -14
- package/components/graphs/lollipop.js +0 -164
- package/components/graphs/lollipop.js.map +0 -1
- package/components/graphs/meter.js +0 -284
- package/components/graphs/meter.js.map +0 -1
- package/components/graphs/pie.d.ts +0 -16
- package/components/graphs/pie.js +0 -438
- package/components/graphs/pie.js.map +0 -1
- package/components/graphs/radar.d.ts +0 -25
- package/components/graphs/radar.js +0 -737
- package/components/graphs/radar.js.map +0 -1
- package/components/graphs/scatter-stacked.d.ts +0 -8
- package/components/graphs/scatter-stacked.js +0 -140
- package/components/graphs/scatter-stacked.js.map +0 -1
- package/components/graphs/scatter.d.ts +0 -21
- package/components/graphs/scatter.js +0 -360
- package/components/graphs/scatter.js.map +0 -1
- package/components/graphs/skeleton-lines.d.ts +0 -11
- package/components/graphs/skeleton-lines.js +0 -84
- package/components/graphs/skeleton-lines.js.map +0 -1
- package/components/graphs/skeleton.d.ts +0 -22
- package/components/graphs/skeleton.js +0 -272
- package/components/graphs/skeleton.js.map +0 -1
- package/components/graphs/tree.js +0 -262
- package/components/graphs/tree.js.map +0 -1
- package/components/graphs/treemap.d.ts +0 -11
- package/components/graphs/treemap.js +0 -344
- package/components/graphs/treemap.js.map +0 -1
- package/components/graphs/wordcloud.d.ts +0 -12
- package/components/graphs/wordcloud.js +0 -268
- package/components/graphs/wordcloud.js.map +0 -1
- package/components/index.d.ts +0 -53
- package/components/index.js +0 -59
- package/components/index.js.map +0 -1
- package/components/layout/layout.js +0 -191
- package/components/layout/layout.js.map +0 -1
- package/components/layout/spacer.d.ts +0 -5
- package/components/layout/spacer.js +0 -33
- package/components/layout/spacer.js.map +0 -1
- package/configuration-non-customizable.d.ts +0 -263
- package/configuration-non-customizable.js +0 -276
- package/configuration-non-customizable.js.map +0 -1
- package/configuration.js +0 -552
- package/configuration.js.map +0 -1
- package/demo/create-codesandbox.d.ts +0 -65
- package/demo/create-codesandbox.js +0 -173
- package/demo/create-codesandbox.js.map +0 -1
- package/demo/data/CHART_TYPES.d.ts +0 -128
- package/demo/data/CHART_TYPES.js +0 -128
- package/demo/data/CHART_TYPES.js.map +0 -1
- package/demo/data/alluvial.d.ts +0 -109
- package/demo/data/alluvial.js +0 -328
- package/demo/data/alluvial.js.map +0 -1
- package/demo/data/area.d.ts +0 -224
- package/demo/data/area.js +0 -330
- package/demo/data/area.js.map +0 -1
- package/demo/data/bar.d.ts +0 -681
- package/demo/data/bar.js +0 -915
- package/demo/data/bar.js.map +0 -1
- package/demo/data/boxplot.d.ts +0 -34
- package/demo/data/boxplot.js +0 -48
- package/demo/data/boxplot.js.map +0 -1
- package/demo/data/bubble.d.ts +0 -141
- package/demo/data/bubble.js +0 -182
- package/demo/data/bubble.js.map +0 -1
- package/demo/data/bullet.d.ts +0 -24
- package/demo/data/bullet.js +0 -55
- package/demo/data/bullet.js.map +0 -1
- package/demo/data/bundle.js +0 -1
- package/demo/data/choropleth.d.ts +0 -738
- package/demo/data/choropleth.js +0 -1684
- package/demo/data/choropleth.js.map +0 -1
- package/demo/data/circle-pack.d.ts +0 -91
- package/demo/data/circle-pack.js +0 -224
- package/demo/data/circle-pack.js.map +0 -1
- package/demo/data/combo.d.ts +0 -482
- package/demo/data/combo.js +0 -571
- package/demo/data/combo.js.map +0 -1
- package/demo/data/donut.d.ts +0 -64
- package/demo/data/donut.js +0 -60
- package/demo/data/donut.js.map +0 -1
- package/demo/data/gauge.d.ts +0 -40
- package/demo/data/gauge.js +0 -41
- package/demo/data/gauge.js.map +0 -1
- package/demo/data/heatmap.d.ts +0 -125
- package/demo/data/heatmap.js +0 -1149
- package/demo/data/heatmap.js.map +0 -1
- package/demo/data/high-scale.d.ts +0 -1
- package/demo/data/high-scale.js +0 -5
- package/demo/data/high-scale.js.map +0 -1
- package/demo/data/hightlight.d.ts +0 -40
- package/demo/data/hightlight.js +0 -44
- package/demo/data/hightlight.js.map +0 -1
- package/demo/data/histogram.d.ts +0 -63
- package/demo/data/histogram.js +0 -312
- package/demo/data/histogram.js.map +0 -1
- package/demo/data/index.d.ts +0 -33
- package/demo/data/index.js +0 -1305
- package/demo/data/index.js.map +0 -1
- package/demo/data/line.d.ts +0 -361
- package/demo/data/line.js +0 -480
- package/demo/data/line.js.map +0 -1
- package/demo/data/lollipop.d.ts +0 -39
- package/demo/data/lollipop.js +0 -37
- package/demo/data/lollipop.js.map +0 -1
- package/demo/data/meter.d.ts +0 -95
- package/demo/data/meter.js +0 -114
- package/demo/data/meter.js.map +0 -1
- package/demo/data/pie.d.ts +0 -46
- package/demo/data/pie.js +0 -55
- package/demo/data/pie.js.map +0 -1
- package/demo/data/radar.d.ts +0 -63
- package/demo/data/radar.js +0 -118
- package/demo/data/radar.js.map +0 -1
- package/demo/data/scatter.d.ts +0 -118
- package/demo/data/scatter.js +0 -143
- package/demo/data/scatter.js.map +0 -1
- package/demo/data/step.d.ts +0 -96
- package/demo/data/step.js +0 -27
- package/demo/data/step.js.map +0 -1
- package/demo/data/time-series-axis.js +0 -436
- package/demo/data/time-series-axis.js.map +0 -1
- package/demo/data/toolbar.d.ts +0 -12
- package/demo/data/toolbar.js +0 -67
- package/demo/data/toolbar.js.map +0 -1
- package/demo/data/topojson-110.d.ts +0 -360
- package/demo/data/topojson-110.js +0 -40724
- package/demo/data/topojson-110.js.map +0 -1
- package/demo/data/tree.d.ts +0 -30
- package/demo/data/tree.js +0 -209
- package/demo/data/tree.js.map +0 -1
- package/demo/data/treemap.d.ts +0 -15
- package/demo/data/treemap.js +0 -93
- package/demo/data/treemap.js.map +0 -1
- package/demo/data/wordcloud.d.ts +0 -14
- package/demo/data/wordcloud.js +0 -105
- package/demo/data/wordcloud.js.map +0 -1
- package/demo/data/zoom-bar.d.ts +0 -94
- package/demo/data/zoom-bar.js +0 -187
- package/demo/data/zoom-bar.js.map +0 -1
- package/demo/styles.css.map +0 -1
- package/demo/styles.min.css +0 -1
- package/demo/styles.min.css.map +0 -1
- package/demo/tsconfig.tsbuildinfo +0 -1451
- package/demo/utils.d.ts +0 -24
- package/demo/utils.js +0 -222
- package/demo/utils.js.map +0 -1
- package/index.d.ts +0 -4
- package/index.js +0 -6
- package/index.js.map +0 -1
- package/interfaces/a11y.d.ts +0 -12
- package/interfaces/a11y.js +0 -14
- package/interfaces/a11y.js.map +0 -1
- package/interfaces/axis-scales.d.ts +0 -201
- package/interfaces/axis-scales.js +0 -1
- package/interfaces/axis-scales.js.map +0 -1
- package/interfaces/charts.js +0 -1
- package/interfaces/charts.js.map +0 -1
- package/interfaces/components.d.ts +0 -231
- package/interfaces/components.js +0 -1
- package/interfaces/components.js.map +0 -1
- package/interfaces/enums.d.ts +0 -261
- package/interfaces/enums.js +0 -296
- package/interfaces/enums.js.map +0 -1
- package/interfaces/events.d.ts +0 -239
- package/interfaces/events.js +0 -269
- package/interfaces/events.js.map +0 -1
- package/interfaces/index.d.ts +0 -7
- package/interfaces/index.js +0 -3
- package/interfaces/index.js.map +0 -1
- package/interfaces/layout.js +0 -1
- package/interfaces/layout.js.map +0 -1
- package/interfaces/model.d.ts +0 -35
- package/interfaces/model.js +0 -1
- package/interfaces/model.js.map +0 -1
- package/interfaces/truncation.d.ts +0 -17
- package/interfaces/truncation.js +0 -1
- package/interfaces/truncation.js.map +0 -1
- package/model/alluvial.d.ts +0 -8
- package/model/alluvial.js +0 -47
- package/model/alluvial.js.map +0 -1
- package/model/binned-charts.d.ts +0 -7
- package/model/binned-charts.js +0 -52
- package/model/binned-charts.js.map +0 -1
- package/model/boxplot.d.ts +0 -14
- package/model/boxplot.js +0 -174
- package/model/boxplot.js.map +0 -1
- package/model/bullet.d.ts +0 -14
- package/model/bullet.js +0 -74
- package/model/bullet.js.map +0 -1
- package/model/cartesian-charts.d.ts +0 -24
- package/model/cartesian-charts.js +0 -202
- package/model/cartesian-charts.js.map +0 -1
- package/model/choropleth.d.ts +0 -29
- package/model/choropleth.js +0 -105
- package/model/choropleth.js.map +0 -1
- package/model/circle-pack.d.ts +0 -36
- package/model/circle-pack.js +0 -189
- package/model/circle-pack.js.map +0 -1
- package/model/gauge.d.ts +0 -9
- package/model/gauge.js +0 -51
- package/model/gauge.js.map +0 -1
- package/model/heatmap.js +0 -220
- package/model/heatmap.js.map +0 -1
- package/model/meter.js +0 -118
- package/model/meter.js.map +0 -1
- package/model/model.js +0 -712
- package/model/model.js.map +0 -1
- package/model/pie.d.ts +0 -9
- package/model/pie.js +0 -66
- package/model/pie.js.map +0 -1
- package/model/radar.d.ts +0 -7
- package/model/radar.js +0 -52
- package/model/radar.js.map +0 -1
- package/model/tree.d.ts +0 -14
- package/model/tree.js +0 -56
- package/model/tree.js.map +0 -1
- package/model/treemap.d.ts +0 -8
- package/model/treemap.js +0 -44
- package/model/treemap.js.map +0 -1
- package/model/wordcloud.d.ts +0 -7
- package/model/wordcloud.js +0 -47
- package/model/wordcloud.js.map +0 -1
- package/polyfills.d.ts +0 -0
- package/polyfills.js +0 -29
- package/polyfills.js.map +0 -1
- package/services/angle-utils.js +0 -82
- package/services/angle-utils.js.map +0 -1
- package/services/canvas-zoom.d.ts +0 -11
- package/services/canvas-zoom.js +0 -72
- package/services/canvas-zoom.js.map +0 -1
- package/services/color-scale-utils.js +0 -64
- package/services/color-scale-utils.js.map +0 -1
- package/services/curves.d.ts +0 -25
- package/services/curves.js +0 -77
- package/services/curves.js.map +0 -1
- package/services/essentials/dom-utils.d.ts +0 -39
- package/services/essentials/dom-utils.js +0 -423
- package/services/essentials/dom-utils.js.map +0 -1
- package/services/essentials/events.d.ts +0 -8
- package/services/essentials/events.js +0 -53
- package/services/essentials/events.js.map +0 -1
- package/services/essentials/files.d.ts +0 -6
- package/services/essentials/files.js +0 -60
- package/services/essentials/files.js.map +0 -1
- package/services/essentials/gradient-utils.d.ts +0 -6
- package/services/essentials/gradient-utils.js +0 -85
- package/services/essentials/gradient-utils.js.map +0 -1
- package/services/essentials/transitions.d.ts +0 -13
- package/services/essentials/transitions.js +0 -51
- package/services/essentials/transitions.js.map +0 -1
- package/services/index.d.ts +0 -10
- package/services/index.js +0 -13
- package/services/index.js.map +0 -1
- package/services/scales-cartesian.d.ts +0 -86
- package/services/scales-cartesian.js +0 -656
- package/services/scales-cartesian.js.map +0 -1
- package/services/service.d.ts +0 -10
- package/services/service.js +0 -24
- package/services/service.js.map +0 -1
- package/services/time-series.js +0 -147
- package/services/time-series.js.map +0 -1
- package/services/zoom.d.ts +0 -21
- package/services/zoom.js +0 -217
- package/services/zoom.js.map +0 -1
- package/styles/components/_marker.scss +0 -7
- package/styles/components/diagrams/index.scss +0 -4
- package/styles.css +0 -6325
- package/styles.css.map +0 -1
- package/styles.min.css +0 -1
- package/styles.min.css.map +0 -1
- package/tools.js +0 -348
- package/tools.js.map +0 -1
- package/tsconfig.tsbuildinfo +0 -3816
- /package/{build/src → dist}/components/axes/ruler-stacked.d.ts +0 -0
- /package/{build/src → dist}/components/diagrams/markerDefinitions.d.ts +0 -0
- /package/{build/src → dist}/components/essentials/tooltip-axis.d.ts +0 -0
- /package/{build/demo/data → dist/demo/charts}/alluvial.d.ts +0 -0
- /package/{build/demo/data → dist/demo/charts}/area.d.ts +0 -0
- /package/{build/demo/data → dist/demo/charts}/bar.d.ts +0 -0
- /package/{build/demo/data → dist/demo/charts}/boxplot.d.ts +0 -0
- /package/{build/demo/data → dist/demo/charts}/bubble.d.ts +0 -0
- /package/{build/demo/data → dist/demo/charts}/bullet.d.ts +0 -0
- /package/{build/demo/data/CHART_TYPES.d.ts → dist/demo/charts/chart-types.d.ts} +0 -0
- /package/{build/demo/data → dist/demo/charts}/choropleth.d.ts +0 -0
- /package/{build/demo/data → dist/demo/charts}/circle-pack.d.ts +0 -0
- /package/{build/demo/data → dist/demo/charts}/combo.d.ts +0 -0
- /package/{build/demo/data → dist/demo/charts}/donut.d.ts +0 -0
- /package/{build/demo/data → dist/demo/charts}/gauge.d.ts +0 -0
- /package/{build/demo/data → dist/demo/charts}/heatmap.d.ts +0 -0
- /package/{build/demo/data → dist/demo/charts}/hightlight.d.ts +0 -0
- /package/{build/demo/data → dist/demo/charts}/histogram.d.ts +0 -0
- /package/{build/demo/data → dist/demo/charts}/line.d.ts +0 -0
- /package/{build/demo/data → dist/demo/charts}/lollipop.d.ts +0 -0
- /package/{build/demo/data → dist/demo/charts}/meter.d.ts +0 -0
- /package/{build/demo/data → dist/demo/charts}/pie.d.ts +0 -0
- /package/{build/demo/data → dist/demo/charts}/radar.d.ts +0 -0
- /package/{build/demo/data → dist/demo/charts}/scatter.d.ts +0 -0
- /package/{build/demo/data → dist/demo/charts}/step.d.ts +0 -0
- /package/{build/demo/data → dist/demo/charts}/toolbar.d.ts +0 -0
- /package/{build/demo/data → dist/demo/charts}/topojson-110.d.ts +0 -0
- /package/{build/demo/data → dist/demo/charts}/tree.d.ts +0 -0
- /package/{build/demo/data → dist/demo/charts}/treemap.d.ts +0 -0
- /package/{build/demo/data → dist/demo/charts}/wordcloud.d.ts +0 -0
- /package/{build/src → dist}/interfaces/a11y.d.ts +0 -0
- /package/{build/src → dist}/interfaces/enums.d.ts +0 -0
- /package/{build/src → dist}/interfaces/events.d.ts +0 -0
- /package/{build/src → dist}/model/alluvial.d.ts +0 -0
- /package/{build/src → dist}/model/boxplot.d.ts +0 -0
- /package/{build/src → dist}/model/bullet.d.ts +0 -0
- /package/{build/src → dist}/model/choropleth.d.ts +0 -0
- /package/{build/src → dist}/model/circle-pack.d.ts +0 -0
- /package/{build/src → dist}/model/gauge.d.ts +0 -0
- /package/{build/src → dist}/model/pie.d.ts +0 -0
- /package/{build/src → dist}/model/radar.d.ts +0 -0
- /package/{build/src → dist}/model/tree.d.ts +0 -0
- /package/{build/src → dist}/model/treemap.d.ts +0 -0
- /package/{build/src → dist}/model/wordcloud.d.ts +0 -0
- /package/{build/src → dist}/services/canvas-zoom.d.ts +0 -0
- /package/{styles → dist/styles}/_type.scss +0 -0
- /package/{styles → dist/styles}/components/_axis.scss +0 -0
- /package/{styles → dist/styles}/components/_callouts.scss +0 -0
- /package/{styles → dist/styles}/components/_grid-brush.scss +0 -0
- /package/{styles → dist/styles}/components/_highlights.scss +0 -0
- /package/{styles → dist/styles}/components/_layout.scss +0 -0
- /package/{styles → dist/styles}/components/_legend.scss +0 -0
- /package/{styles → dist/styles}/components/_modal.scss +0 -0
- /package/{styles → dist/styles}/components/_ruler.scss +0 -0
- /package/{styles → dist/styles}/components/_skeleton-lines.scss +0 -0
- /package/{styles → dist/styles}/components/_skeleton.scss +0 -0
- /package/{styles → dist/styles}/components/_threshold.scss +0 -0
- /package/{styles → dist/styles}/components/_title.scss +0 -0
- /package/{styles → dist/styles}/components/_toolbar.scss +0 -0
- /package/{styles → dist/styles}/components/_zero-line.scss +0 -0
- /package/{styles → dist/styles}/components/_zoom-bar.scss +0 -0
- /package/{styles → dist/styles}/components/diagrams/_marker.scss +0 -0
- /package/{styles → dist/styles}/components/index.scss +0 -0
- /package/{styles → dist/styles}/graphs/_area.scss +0 -0
- /package/{styles → dist/styles}/graphs/_bubble.scss +0 -0
- /package/{styles → dist/styles}/graphs/_choropleth.scss +0 -0
- /package/{styles → dist/styles}/graphs/_donut.scss +0 -0
- /package/{styles → dist/styles}/graphs/_line.scss +0 -0
- /package/{styles → dist/styles}/graphs/_lollipop.scss +0 -0
- /package/{styles → dist/styles}/graphs/_pie.scss +0 -0
- /package/{styles → dist/styles}/graphs/_scatter.scss +0 -0
- /package/{styles → dist/styles}/graphs/_treemap.scss +0 -0
- /package/{styles → dist/styles}/graphs/_wordcloud.scss +0 -0
- /package/{styles → dist/styles}/graphs/index.scss +0 -0
package/bundle.js
DELETED
|
@@ -1,17 +0,0 @@
|
|
|
1
|
-
!function(t,e){"object"==typeof exports&&"undefined"!=typeof module?e(exports):"function"==typeof define&&define.amd?define(["exports"],e):e((t=t||self).Charts={})}(this,(function(t){"use strict";
|
|
2
|
-
/*! *****************************************************************************
|
|
3
|
-
Copyright (c) Microsoft Corporation. All rights reserved.
|
|
4
|
-
Licensed under the Apache License, Version 2.0 (the "License"); you may not use
|
|
5
|
-
this file except in compliance with the License. You may obtain a copy of the
|
|
6
|
-
License at http://www.apache.org/licenses/LICENSE-2.0
|
|
7
|
-
|
|
8
|
-
THIS CODE IS PROVIDED ON AN *AS IS* BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
|
|
9
|
-
KIND, EITHER EXPRESS OR IMPLIED, INCLUDING WITHOUT LIMITATION ANY IMPLIED
|
|
10
|
-
WARRANTIES OR CONDITIONS OF TITLE, FITNESS FOR A PARTICULAR PURPOSE,
|
|
11
|
-
MERCHANTABLITY OR NON-INFRINGEMENT.
|
|
12
|
-
|
|
13
|
-
See the Apache Version 2.0 License for specific language governing permissions
|
|
14
|
-
and limitations under the License.
|
|
15
|
-
***************************************************************************** */var e=function(t,n){return(e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var n in e)e.hasOwnProperty(n)&&(t[n]=e[n])})(t,n)};function n(t,n){function r(){this.constructor=t}e(t,n),t.prototype=null===n?Object.create(n):(r.prototype=n.prototype,new r)}var r,i,o,a,s,l,u,c,h,d,f,p,g,v,m,y,b,E,_,x,w,O,T,S,M,C,A,L,D=function(){return(D=Object.assign||function(t){for(var e,n=1,r=arguments.length;n<r;n++)for(var i in e=arguments[n])Object.prototype.hasOwnProperty.call(e,i)&&(t[i]=e[i]);return t}).apply(this,arguments)};function k(t,e){var n={};for(var r in t)Object.prototype.hasOwnProperty.call(t,r)&&e.indexOf(r)<0&&(n[r]=t[r]);if(null!=t&&"function"==typeof Object.getOwnPropertySymbols){var i=0;for(r=Object.getOwnPropertySymbols(t);i<r.length;i++)e.indexOf(r[i])<0&&Object.prototype.propertyIsEnumerable.call(t,r[i])&&(n[r[i]]=t[r[i]])}return n}function R(){for(var t=0,e=0,n=arguments.length;e<n;e++)t+=arguments[e].length;var r=Array(t),i=0;for(e=0;e<n;e++)for(var o=arguments[e],a=0,s=o.length;a<s;a++,i++)r[i]=o[a];return r}!function(t){t.GRAPHICS_DOCUMENT="graphics-document",t.GRAPHICS_OBJECT="graphics-object",t.GRAPHICS_SYMBOL="graphics-symbol",t.GROUP="group",t.DOCUMENT="document",t.CHECKBOX="checkbox",t.BUTTON="button",t.MENU="menu",t.MENU_ITEM="menuitem",t.IMG="img"}(r||(r={})),function(t){t.RENDER_FINISHED="render-finished",t.RESIZE="chart-resize",t.MOUSEOVER="chart-mouseover",t.MOUSEOUT="chart-mouseout"}(i||(i={})),function(t){t.SHOW="show-modal",t.HIDE="hide-modal"}(o||(o={})),function(t){t.UPDATE="model-update"}(a||(a={})),function(t){t.SHOW_OVERFLOW_MENU="show-toolbar-overflow-menu",t.HIDE_OVERFLOW_MENU="hide-toolbar-overflow-menu",t.BUTTON_CLICK="toolbar-button-click"}(s||(s={})),function(t){t.UPDATE="zoom-bar-update",t.SELECTION_START="zoom-bar-selection-start",t.SELECTION_IN_PROGRESS="zoom-bar-selection-in-progress",t.SELECTION_END="zoom-bar-selection-end"}(l||(l={})),function(t){t.CHANGE="zoom-domain-change"}(u||(u={})),function(t){t.CANVAS_ZOOM_IN="canvas-zoom-in",t.CANVAS_ZOOM_OUT="canvas-zoom-out"}(c||(c={})),function(t){t.LABEL_MOUSEOVER="axis-label-mouseover",t.LABEL_MOUSEMOVE="axis-label-mousemove",t.LABEL_CLICK="axis-label-click",t.LABEL_MOUSEOUT="axis-label-mouseout",t.LABEL_FOCUS="axis-label-focus",t.LABEL_BLUR="axis-label-blur",t.RENDER_COMPLETE="axis-render-complete"}(h||(h={})),function(t){t.POINT_MOUSEOVER="scatter-mouseover",t.POINT_MOUSEMOVE="scatter-mousemove",t.POINT_CLICK="scatter-click",t.POINT_MOUSEOUT="scatter-mouseout"}(d||(d={})),function(t){t.WORD_MOUSEOVER="wordcloud-word-mouseover",t.WORD_MOUSEMOVE="wordcloud-word-mousemove",t.WORD_CLICK="wordcloud-word-click",t.WORD_MOUSEOUT="wordcloud-word-mouseout"}(f||(f={})),function(t){t.SLICE_MOUSEOVER="pie-slice-mouseover",t.SLICE_MOUSEMOVE="pie-slice-mousemove",t.SLICE_CLICK="pie-slice-click",t.SLICE_MOUSEOUT="pie-slice-mouseout"}(p||(p={})),function(t){t.ARC_MOUSEOVER="gauge-arc-mouseover",t.ARC_MOUSEMOVE="gauge-arc-mousemove",t.ARC_CLICK="gauge-arc-click",t.ARC_MOUSEOUT="gauge-arc-mouseout"}(g||(g={})),function(t){t.BAR_MOUSEOVER="bar-mouseover",t.BAR_MOUSEMOVE="bar-mousemove",t.BAR_CLICK="bar-click",t.BAR_MOUSEOUT="bar-mouseout"}(v||(v={})),function(t){t.BOX_MOUSEOVER="box-mouseover",t.BOX_MOUSEMOVE="box-mousemove",t.BOX_CLICK="box-click",t.BOX_MOUSEOUT="box-mouseout",t.OUTLIER_MOUSEOVER="outlier-mouseover",t.OUTLIER_MOUSEMOVE="outlier-mousemove",t.OUTLIER_CLICK="outlier-click",t.OUTLIER_MOUSEOUT="outlier-mouseout"}(m||(m={})),function(t){t.SCATTER_MOUSEOVER="scatter-mouseover",t.SCATTER_MOUSEMOVE="scatter-mousemove",t.SCATTER_CLICK="scatter-click",t.SCATTER_MOUSEOUT="scatter-mouseout"}(y||(y={})),function(t){t.POINT_MOUSEOVER="scatter-mouseover",t.POINT_MOUSEMOVE="scatter-mousemove",t.POINT_CLICK="scatter-click",t.POINT_MOUSEOUT="scatter-mouseout"}(b||(b={})),function(t){t.X_AXIS_MOUSEOVER="radar-x-axis-mouseover",t.X_AXIS_MOUSEMOVE="radar-x-axis-mousemove",t.X_AXIS_CLICK="radar-x-axis-click",t.X_AXIS_MOUSEOUT="radar-x-axis-mouseout"}(E||(E={})),function(t){t.NODE_MOUSEOVER="tree-node-mouseover",t.NODE_CLICK="tree-node-click",t.NODE_MOUSEOUT="tree-node-mouseout"}(_||(_={})),function(t){t.LEAF_MOUSEOVER="leaf-mouseover",t.LEAF_MOUSEMOVE="leaf-mousemove",t.LEAF_CLICK="leaf-click",t.LEAF_MOUSEOUT="leaf-mouseout"}(x||(x={})),function(t){t.SHOW="show-tooltip",t.MOVE="move-tooltip",t.HIDE="hide-tooltip"}(w||(w={})),function(t){t.SHOW="show-threshold",t.HIDE="hide-threshold"}(O||(O={})),function(t){t.ITEM_HOVER="legend-item-onhover",t.ITEM_CLICK="legend-item-onclick",t.ITEM_MOUSEOUT="legend-item-onmouseout",t.ITEMS_UPDATE="legend-items-update"}(T||(T={})),function(t){t.CIRCLE_MOUSEOVER="circle-leaf-mouseover",t.CIRCLE_CLICK="circle-leaf-click",t.CIRCLE_MOUSEOUT="circle-leaf-mouseout",t.CIRCLE_MOUSEMOVE="circle-leaf-mousemove"}(S||(S={})),function(t){t.NODE_MOUSEOVER="alluvial-node-mouseover",t.NODE_CLICK="alluvial-node-click",t.NODE_MOUSEOUT="alluvial-node-mouseout",t.NODE_MOUSEMOVE="alluvial-node-mousemove",t.LINE_MOUSEOVER="alluvial-line-mouseover",t.LINE_CLICK="alluvial-line-click",t.LINE_MOUSEOUT="alluvial-line-mouseout",t.LINE_MOUSEMOVE="alluvial-line-mousemove"}(M||(M={})),function(t){t.METER_MOUSEOVER="meter-mouseover",t.METER_CLICK="meter-click",t.METER_MOUSEOUT="meter-mouseout",t.METER_MOUSEMOVE="meter-mousemove"}(C||(C={})),function(t){t.HEATMAP_MOUSEOVER="heatmap-mouseover",t.HEATMAP_CLICK="heatmap-click",t.HEATMAP_MOUSEOUT="heatmap-mouseout",t.HEATMAP_MOUSEMOVE="hetmap-mousemove"}(A||(A={})),function(t){t.CHOROPLETH_MOUSEOVER="choropleth-mouseover",t.CHOROPLETH_CLICK="choropleth-click",t.CHOROPLETH_MOUSEOUT="choropleth-mouseout",t.CHOROPLETH_MOUSEMOVE="choropleth-mousemove"}(L||(L={}));var I,P,N,U,B,V,H,G,z,j,F,W,q,Y,Z,X,$,K,Q,J,tt,et,nt,rt,it,ot,at,st,lt,ut,ct,ht=Object.freeze({__proto__:null,get Chart(){return i},get Modal(){return o},get Model(){return a},get Toolbar(){return s},get ZoomBar(){return l},get ZoomDomain(){return u},get CanvasZoom(){return c},get Axis(){return h},get Area(){return d},get WordCloud(){return f},get Pie(){return p},get Gauge(){return g},get Bar(){return v},get Boxplot(){return m},get Scatter(){return y},get Line(){return b},get Radar(){return E},get Tree(){return _},get Treemap(){return x},get Tooltip(){return w},get Threshold(){return O},get Legend(){return T},get CirclePack(){return S},get Alluvial(){return M},get Meter(){return C},get Heatmap(){return A},get Choropleth(){return L}});!function(t){t.HTML="html",t.SVG="svg"}(I||(I={})),function(t){t.WHITE="white",t.G100="g100",t.G90="g90",t.G10="g10"}(P||(P={})),function(t){t.BACKGROUND="background",t.FILL="fill",t.STROKE="stroke",t.TOOLTIP="tooltip"}(N||(N={})),function(t){t.LEFT="left",t.RIGHT="right",t.TOP="top",t.BOTTOM="bottom"}(U||(U={})),function(t){t.GRAPH_VIEW="graph_view",t.SLIDER_VIEW="slider_view"}(B||(B={})),function(t){t.END_LINE="end_line",t.MID_LINE="mid_line",t.FRONT_LINE="front_line",t.NONE="none"}(V||(V={})),function(t){t.VERTICAL="vertical",t.HORIZONTAL="horizontal"}(H||(H={})),function(t){t.TIME="time",t.LINEAR="linear",t.LOG="log",t.LABELS="labels",t.LABELS_RATIO="labels-ratio"}(G||(G={})),function(t){t.RIGHT="right",t.LEFT="left",t.TOP="top",t.BOTTOM="bottom"}(z||(z={})),function(t){t.LEFT="left",t.CENTER="center",t.RIGHT="right"}(j||(j={})),function(t){t.HORIZONTAL="horizontal",t.VERTICAL="vertical"}(F||(F={})),function(t){t.TREE="tree",t.DENDROGRAM="dendrogram"}(W||(W={})),function(t){t.ROW="row",t.COLUMN="column",t.ROW_REVERSE="row-reverse",t.COLUMN_REVERSE="column-reverse"}(q||(q={})),function(t){t.FIXED="fixed",t.PREFERRED="preferred",t.STRETCH="stretch"}(Y||(Y={})),function(t){t.CENTER="center"}(Z||(Z={})),function(t){t.LEFT="left",t.RIGHT="right"}(X||(X={})),function(t){t.GRID="grid",t.VERT_OR_HORIZ="vertOrHoriz",t.PIE="pie",t.DONUT="donut"}($||($={})),function(t){t.START="start",t.MIDDLE="middle",t.END="end"}(K||(K={})),function(t){t.BASELINE="baseline",t.MIDDLE="middle",t.HANGING="hanging"}(Q||(Q={})),function(t){t.SEMI="semi",t.FULL="full"}(J||(J={})),function(t){t.UP="up",t.DOWN="down"}(tt||(tt={})),function(t){t.SUCCESS="success",t.WARNING="warning",t.DANGER="danger"}(et||(et={})),function(t){t.ALWAYS="always",t.AUTO="auto",t.NEVER="never"}(nt||(nt={})),function(t){t.SCATTER="scatter",t.LINE="line",t.SIMPLE_BAR="simple-bar",t.STACKED_BAR="stacked-bar",t.GROUPED_BAR="grouped-bar",t.AREA="area",t.STACKED_AREA="stacked-area"}(rt||(rt={})),function(t){t.EXPORT_CSV="Export as CSV",t.EXPORT_PNG="Export as PNG",t.EXPORT_JPG="Export as JPG",t.ZOOM_IN="Zoom in",t.ZOOM_OUT="Zoom out",t.RESET_ZOOM="Reset zoom",t.MAKE_FULLSCREEN="Make fullscreen",t.SHOW_AS_DATATABLE="Show as data-table",t.CUSTOM="Custom"}(it||(it={})),function(t){t.LEFT="left",t.RIGHT="right"}(ot||(ot={})),function(t){t.CHECKBOX="checkbox",t.RADIUS="radius",t.AREA="area",t.SIZE="size",t.LINE="line",t.QUARTILE="quartile",t.ZOOM="zoom"}(at||(at={})),function(t){t.LINEAR="linear",t.QUANTIZE="quantize"}(st||(st={})),function(t){t.ON="on",t.AUTO="auto",t.OFF="off"}(lt||(lt={})),function(t){t.DEFAULT="default",t.HOVERABLE="hoverable"}(ut||(ut={})),function(t){t.geoEqualEarth="geoEqualEarth",t.geoAlbers="geoAlbers",t.geoConicEqualArea="geoConicEqualArea",t.geoConicEquidistant="geoConicEquidistant",t.geoEquirectangular="geoEquirectangular",t.geoMercator="geoMercator",t.geoNaturalEarth1="geoNaturalEarth1"}(ct||(ct={}));var dt=Object.freeze({__proto__:null,get Roles(){return r},Events:ht,get RenderTypes(){return I},get ChartTheme(){return P},get ColorClassNameTypes(){return N},get AxisPositions(){return U},get ZoomBarTypes(){return B},get TruncationTypes(){return V},get CartesianOrientations(){return H},get ScaleTypes(){return G},get LegendPositions(){return z},get Alignments(){return j},get LegendOrientations(){return F},get TreeTypes(){return W},get LayoutDirection(){return q},get LayoutGrowth(){return Y},get LayoutAlignItems(){return Z},get CalloutDirections(){return X},get Skeletons(){return $},get TextAnchor(){return K},get DominantBaseline(){return Q},get GaugeTypes(){return J},get ArrowDirections(){return tt},get Statuses(){return et},get TickRotations(){return nt},get ChartTypes(){return rt},get ToolbarControlTypes(){return it},get AxisTitleOrientations(){return ot},get LegendItemType(){return at},get ColorLegendType(){return st},get DividerStatus(){return lt},get AxisFlavor(){return ut},get Projection(){return ct}});const ft=t=>+t;function pt(t){return((t*=2)<=1?t*t*t:(t-=2)*t*t+2)/2}var gt,vt={opacity:{unselected:.05,selected:.4}},mt={ticks:{number:7,rotateIfSmallerThan:30,verticalSpaceRatio:2.5,horizontalSpaceRatio:3.5},ratio:{reference:"value",compareTo:"marker"},paddingRatio:.1,hover:{rectanglePadding:4}},yt={duration:1e3,ease:pt,zoomLevel:3},bt={circles:{fillOpacity:.3,hover:{stroke:"#FFF"}},padding:{mainGroup:4,children:2},hierarchyLevel:2},Et={pairingOptions:{"1-color":4,"2-color":5,"3-color":5,"4-color":3,"5-color":2,"14-color":1}},_t={circle:{radius:4,opacity:{hovered:1,default:.3}},box:{opacity:{hovered:.5,default:.3}},strokeWidth:{default:1,thicker:2}},xt={defaultBins:10},wt={items:{status:{ACTIVE:1,DISABLED:0},horizontalSpace:12,verticalSpace:24,textYOffset:8,spaceAfter:4},checkbox:{radius:6.5},radius:{iconData:[{cx:7,cy:7,r:6.5},{cx:7,cy:10,r:3.5}],fill:null,stroke:"#8c8c8c"},line:{yPosition:6,width:24,strokeWidth:1.4,fill:null,stroke:"#999999"},area:{width:24,height:14,fill:"#6f6f6f",stroke:null},size:{iconData:[{width:23,height:12},{width:13,height:6}],fill:null,stroke:"#8D8D8D"},quartile:{iconData:[{x:0,y:0,width:24,height:13},{x:11,y:4,width:1,height:4}]},zoom:{iconData:[{x:0,y:0,width:12,height:12}],color:"#8D8D8D"},color:{barWidth:300,barHeight:8,axisYTranslation:10}},Ot={opacity:{unselected:.3,selected:1},weight:{selected:2,unselected:1}},Tt={statusBar:{paddingRight:5},status:{indicatorSize:16,paddingLeft:15},total:{paddingLeft:36,paddingRight:24},height:{default:8,proportional:16},dividerWidth:2},St={radiusOffset:-15,innerRadius:2,padAngle:.007,hoverArc:{outerRadiusOffset:3},xOffset:30,yOffset:20,yOffsetCallout:10,callout:{minSliceDegree:5,offsetX:15,offsetY:12,horizontalLineLength:8,textMargin:2}},Mt={opacity:{unselected:.1,selected:.3},xLabelPadding:10,yLabelPadding:8,yTicksNumber:4,minRange:10,xAxisRectHeight:50,dotsRadius:5},Ct={nodeWidth:4,nodeHoveredWidth:8,minNodePadding:24,opacity:{unfocus:.3,default:.8,selected:1}},At={minCellDividerDimension:16,chartPadding:.5},Lt={default:{size:24}},Dt={horizontalOffset:10},kt={default:{duration:300},pie_slice_mouseover:{duration:100},pie_chart_titles:{duration:375},graph_element_mouseover_fill_update:{duration:100},graph_element_mouseout_fill_update:{duration:100}},Rt={height:(gt={},gt[B.GRAPH_VIEW]=32,gt[B.SLIDER_VIEW]=10,gt),spacerHeight:8,handleWidth:5,handleBarWidth:1,handleBarHeight:12},It=[{type:at.RADIUS,name:"Radius"},{type:at.AREA,name:"Poor area"},{type:at.AREA,name:"Satisfactory area"},{type:at.AREA,name:"Great area"},{type:at.QUARTILE,name:"Quartiles"}],Pt="object"==typeof global&&global&&global.Object===Object&&global,Nt="object"==typeof self&&self&&self.Object===Object&&self,Ut=Pt||Nt||Function("return this")(),Bt=Ut.Symbol,Vt=Object.prototype,Ht=Vt.hasOwnProperty,Gt=Vt.toString,zt=Bt?Bt.toStringTag:void 0;var jt=Object.prototype.toString;var Ft=Bt?Bt.toStringTag:void 0;function Wt(t){return null==t?void 0===t?"[object Undefined]":"[object Null]":Ft&&Ft in Object(t)?function(t){var e=Ht.call(t,zt),n=t[zt];try{t[zt]=void 0;var r=!0}catch(t){}var i=Gt.call(t);return r&&(e?t[zt]=n:delete t[zt]),i}(t):function(t){return jt.call(t)}(t)}function qt(t){return null!=t&&"object"==typeof t}function Yt(t){return"symbol"==typeof t||qt(t)&&"[object Symbol]"==Wt(t)}function Zt(t,e){for(var n=-1,r=null==t?0:t.length,i=Array(r);++n<r;)i[n]=e(t[n],n,t);return i}var Xt=Array.isArray,$t=Bt?Bt.prototype:void 0,Kt=$t?$t.toString:void 0;function Qt(t){if("string"==typeof t)return t;if(Xt(t))return Zt(t,Qt)+"";if(Yt(t))return Kt?Kt.call(t):"";var e=t+"";return"0"==e&&1/t==-1/0?"-0":e}var Jt=/\s/;var te=/^\s+/;function ee(t){return t?t.slice(0,function(t){for(var e=t.length;e--&&Jt.test(t.charAt(e)););return e}(t)+1).replace(te,""):t}function ne(t){var e=typeof t;return null!=t&&("object"==e||"function"==e)}var re=/^[-+]0x[0-9a-f]+$/i,ie=/^0b[01]+$/i,oe=/^0o[0-7]+$/i,ae=parseInt;function se(t){if("number"==typeof t)return t;if(Yt(t))return NaN;if(ne(t)){var e="function"==typeof t.valueOf?t.valueOf():t;t=ne(e)?e+"":e}if("string"!=typeof t)return 0===t?t:+t;t=ee(t);var n=ie.test(t);return n||oe.test(t)?ae(t.slice(2),n?2:8):re.test(t)?NaN:+t}function le(t){return t}function ue(t){if(!ne(t))return!1;var e=Wt(t);return"[object Function]"==e||"[object GeneratorFunction]"==e||"[object AsyncFunction]"==e||"[object Proxy]"==e}var ce,he=Ut["__core-js_shared__"],de=(ce=/[^.]+$/.exec(he&&he.keys&&he.keys.IE_PROTO||""))?"Symbol(src)_1."+ce:"";var fe=Function.prototype.toString;function pe(t){if(null!=t){try{return fe.call(t)}catch(t){}try{return t+""}catch(t){}}return""}var ge=/^\[object .+?Constructor\]$/,ve=Function.prototype,me=Object.prototype,ye=ve.toString,be=me.hasOwnProperty,Ee=RegExp("^"+ye.call(be).replace(/[\\^$.*+?()[\]{}|]/g,"\\$&").replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g,"$1.*?")+"$");function _e(t){return!(!ne(t)||(e=t,de&&de in e))&&(ue(t)?Ee:ge).test(pe(t));var e}function xe(t,e){var n=function(t,e){return null==t?void 0:t[e]}(t,e);return _e(n)?n:void 0}var we=xe(Ut,"WeakMap"),Oe=Object.create,Te=function(){function t(){}return function(e){if(!ne(e))return{};if(Oe)return Oe(e);t.prototype=e;var n=new t;return t.prototype=void 0,n}}();function Se(t,e,n){switch(n.length){case 0:return t.call(e);case 1:return t.call(e,n[0]);case 2:return t.call(e,n[0],n[1]);case 3:return t.call(e,n[0],n[1],n[2])}return t.apply(e,n)}function Me(t,e){var n=-1,r=t.length;for(e||(e=Array(r));++n<r;)e[n]=t[n];return e}var Ce=Date.now;function Ae(t){return function(){return t}}var Le=function(){try{var t=xe(Object,"defineProperty");return t({},"",{}),t}catch(t){}}(),De=function(t){var e=0,n=0;return function(){var r=Ce(),i=16-(r-n);if(n=r,i>0){if(++e>=800)return arguments[0]}else e=0;return t.apply(void 0,arguments)}}(Le?function(t,e){return Le(t,"toString",{configurable:!0,enumerable:!1,value:Ae(e),writable:!0})}:le);function ke(t){return t!=t}function Re(t,e){return!!(null==t?0:t.length)&&function(t,e,n){return e==e?function(t,e,n){for(var r=n-1,i=t.length;++r<i;)if(t[r]===e)return r;return-1}(t,e,n):function(t,e,n,r){for(var i=t.length,o=n+(r?1:-1);r?o--:++o<i;)if(e(t[o],o,t))return o;return-1}(t,ke,n)}(t,e,0)>-1}var Ie=/^(?:0|[1-9]\d*)$/;function Pe(t,e){var n=typeof t;return!!(e=null==e?9007199254740991:e)&&("number"==n||"symbol"!=n&&Ie.test(t))&&t>-1&&t%1==0&&t<e}function Ne(t,e,n){"__proto__"==e&&Le?Le(t,e,{configurable:!0,enumerable:!0,value:n,writable:!0}):t[e]=n}function Ue(t,e){return t===e||t!=t&&e!=e}var Be=Object.prototype.hasOwnProperty;function Ve(t,e,n){var r=t[e];Be.call(t,e)&&Ue(r,n)&&(void 0!==n||e in t)||Ne(t,e,n)}function He(t,e,n,r){var i=!n;n||(n={});for(var o=-1,a=e.length;++o<a;){var s=e[o],l=r?r(n[s],t[s],s,n,t):void 0;void 0===l&&(l=t[s]),i?Ne(n,s,l):Ve(n,s,l)}return n}var Ge=Math.max;function ze(t,e){return De(function(t,e,n){return e=Ge(void 0===e?t.length-1:e,0),function(){for(var r=arguments,i=-1,o=Ge(r.length-e,0),a=Array(o);++i<o;)a[i]=r[e+i];i=-1;for(var s=Array(e+1);++i<e;)s[i]=r[i];return s[e]=n(a),Se(t,this,s)}}(t,e,le),t+"")}function je(t){return"number"==typeof t&&t>-1&&t%1==0&&t<=9007199254740991}function Fe(t){return null!=t&&je(t.length)&&!ue(t)}function We(t,e,n){if(!ne(n))return!1;var r=typeof e;return!!("number"==r?Fe(n)&&Pe(e,n.length):"string"==r&&e in n)&&Ue(n[e],t)}var qe=Object.prototype;function Ye(t){var e=t&&t.constructor;return t===("function"==typeof e&&e.prototype||qe)}function Ze(t){return qt(t)&&"[object Arguments]"==Wt(t)}var Xe=Object.prototype,$e=Xe.hasOwnProperty,Ke=Xe.propertyIsEnumerable,Qe=Ze(function(){return arguments}())?Ze:function(t){return qt(t)&&$e.call(t,"callee")&&!Ke.call(t,"callee")};var Je="object"==typeof t&&t&&!t.nodeType&&t,tn=Je&&"object"==typeof module&&module&&!module.nodeType&&module,en=tn&&tn.exports===Je?Ut.Buffer:void 0,nn=(en?en.isBuffer:void 0)||function(){return!1},rn={};function on(t){return function(e){return t(e)}}rn["[object Float32Array]"]=rn["[object Float64Array]"]=rn["[object Int8Array]"]=rn["[object Int16Array]"]=rn["[object Int32Array]"]=rn["[object Uint8Array]"]=rn["[object Uint8ClampedArray]"]=rn["[object Uint16Array]"]=rn["[object Uint32Array]"]=!0,rn["[object Arguments]"]=rn["[object Array]"]=rn["[object ArrayBuffer]"]=rn["[object Boolean]"]=rn["[object DataView]"]=rn["[object Date]"]=rn["[object Error]"]=rn["[object Function]"]=rn["[object Map]"]=rn["[object Number]"]=rn["[object Object]"]=rn["[object RegExp]"]=rn["[object Set]"]=rn["[object String]"]=rn["[object WeakMap]"]=!1;var an="object"==typeof t&&t&&!t.nodeType&&t,sn=an&&"object"==typeof module&&module&&!module.nodeType&&module,ln=sn&&sn.exports===an&&Pt.process,un=function(){try{var t=sn&&sn.require&&sn.require("util").types;return t||ln&&ln.binding&&ln.binding("util")}catch(t){}}(),cn=un&&un.isTypedArray,hn=cn?on(cn):function(t){return qt(t)&&je(t.length)&&!!rn[Wt(t)]},dn=Object.prototype.hasOwnProperty;function fn(t,e){var n=Xt(t),r=!n&&Qe(t),i=!n&&!r&&nn(t),o=!n&&!r&&!i&&hn(t),a=n||r||i||o,s=a?function(t,e){for(var n=-1,r=Array(t);++n<t;)r[n]=e(n);return r}(t.length,String):[],l=s.length;for(var u in t)!e&&!dn.call(t,u)||a&&("length"==u||i&&("offset"==u||"parent"==u)||o&&("buffer"==u||"byteLength"==u||"byteOffset"==u)||Pe(u,l))||s.push(u);return s}function pn(t,e){return function(n){return t(e(n))}}var gn=pn(Object.keys,Object),vn=Object.prototype.hasOwnProperty;function mn(t){if(!Ye(t))return gn(t);var e=[];for(var n in Object(t))vn.call(t,n)&&"constructor"!=n&&e.push(n);return e}function yn(t){return Fe(t)?fn(t):mn(t)}var bn=Object.prototype.hasOwnProperty;function En(t){if(!ne(t))return function(t){var e=[];if(null!=t)for(var n in Object(t))e.push(n);return e}(t);var e=Ye(t),n=[];for(var r in t)("constructor"!=r||!e&&bn.call(t,r))&&n.push(r);return n}function _n(t){return Fe(t)?fn(t,!0):En(t)}var xn=/\.|\[(?:[^[\]]*|(["'])(?:(?!\1)[^\\]|\\.)*?\1)\]/,wn=/^\w*$/;function On(t,e){if(Xt(t))return!1;var n=typeof t;return!("number"!=n&&"symbol"!=n&&"boolean"!=n&&null!=t&&!Yt(t))||(wn.test(t)||!xn.test(t)||null!=e&&t in Object(e))}var Tn=xe(Object,"create");var Sn=Object.prototype.hasOwnProperty;var Mn=Object.prototype.hasOwnProperty;function Cn(t){var e=-1,n=null==t?0:t.length;for(this.clear();++e<n;){var r=t[e];this.set(r[0],r[1])}}function An(t,e){for(var n=t.length;n--;)if(Ue(t[n][0],e))return n;return-1}Cn.prototype.clear=function(){this.__data__=Tn?Tn(null):{},this.size=0},Cn.prototype.delete=function(t){var e=this.has(t)&&delete this.__data__[t];return this.size-=e?1:0,e},Cn.prototype.get=function(t){var e=this.__data__;if(Tn){var n=e[t];return"__lodash_hash_undefined__"===n?void 0:n}return Sn.call(e,t)?e[t]:void 0},Cn.prototype.has=function(t){var e=this.__data__;return Tn?void 0!==e[t]:Mn.call(e,t)},Cn.prototype.set=function(t,e){var n=this.__data__;return this.size+=this.has(t)?0:1,n[t]=Tn&&void 0===e?"__lodash_hash_undefined__":e,this};var Ln=Array.prototype.splice;function Dn(t){var e=-1,n=null==t?0:t.length;for(this.clear();++e<n;){var r=t[e];this.set(r[0],r[1])}}Dn.prototype.clear=function(){this.__data__=[],this.size=0},Dn.prototype.delete=function(t){var e=this.__data__,n=An(e,t);return!(n<0)&&(n==e.length-1?e.pop():Ln.call(e,n,1),--this.size,!0)},Dn.prototype.get=function(t){var e=this.__data__,n=An(e,t);return n<0?void 0:e[n][1]},Dn.prototype.has=function(t){return An(this.__data__,t)>-1},Dn.prototype.set=function(t,e){var n=this.__data__,r=An(n,t);return r<0?(++this.size,n.push([t,e])):n[r][1]=e,this};var kn=xe(Ut,"Map");function Rn(t,e){var n=t.__data__;return function(t){var e=typeof t;return"string"==e||"number"==e||"symbol"==e||"boolean"==e?"__proto__"!==t:null===t}(e)?n["string"==typeof e?"string":"hash"]:n.map}function In(t){var e=-1,n=null==t?0:t.length;for(this.clear();++e<n;){var r=t[e];this.set(r[0],r[1])}}In.prototype.clear=function(){this.size=0,this.__data__={hash:new Cn,map:new(kn||Dn),string:new Cn}},In.prototype.delete=function(t){var e=Rn(this,t).delete(t);return this.size-=e?1:0,e},In.prototype.get=function(t){return Rn(this,t).get(t)},In.prototype.has=function(t){return Rn(this,t).has(t)},In.prototype.set=function(t,e){var n=Rn(this,t),r=n.size;return n.set(t,e),this.size+=n.size==r?0:1,this};function Pn(t,e){if("function"!=typeof t||null!=e&&"function"!=typeof e)throw new TypeError("Expected a function");var n=function(){var r=arguments,i=e?e.apply(this,r):r[0],o=n.cache;if(o.has(i))return o.get(i);var a=t.apply(this,r);return n.cache=o.set(i,a)||o,a};return n.cache=new(Pn.Cache||In),n}Pn.Cache=In;var Nn=/[^.[\]]+|\[(?:(-?\d+(?:\.\d+)?)|(["'])((?:(?!\2)[^\\]|\\.)*?)\2)\]|(?=(?:\.|\[\])(?:\.|\[\]|$))/g,Un=/\\(\\)?/g,Bn=function(t){var e=Pn(t,(function(t){return 500===n.size&&n.clear(),t})),n=e.cache;return e}((function(t){var e=[];return 46===t.charCodeAt(0)&&e.push(""),t.replace(Nn,(function(t,n,r,i){e.push(r?i.replace(Un,"$1"):n||t)})),e}));function Vn(t){return null==t?"":Qt(t)}function Hn(t,e){return Xt(t)?t:On(t,e)?[t]:Bn(Vn(t))}function Gn(t){if("string"==typeof t||Yt(t))return t;var e=t+"";return"0"==e&&1/t==-1/0?"-0":e}function zn(t,e){for(var n=0,r=(e=Hn(e,t)).length;null!=t&&n<r;)t=t[Gn(e[n++])];return n&&n==r?t:void 0}function jn(t,e,n){var r=null==t?void 0:zn(t,e);return void 0===r?n:r}function Fn(t,e){for(var n=-1,r=e.length,i=t.length;++n<r;)t[i+n]=e[n];return t}var Wn=Bt?Bt.isConcatSpreadable:void 0;function qn(t){return Xt(t)||Qe(t)||!!(Wn&&t&&t[Wn])}function Yn(t,e,n,r,i){var o=-1,a=t.length;for(n||(n=qn),i||(i=[]);++o<a;){var s=t[o];e>0&&n(s)?e>1?Yn(s,e-1,n,r,i):Fn(i,s):r||(i[i.length]=s)}return i}function Zn(t){return(null==t?0:t.length)?Yn(t,1):[]}var Xn=pn(Object.getPrototypeOf,Object),$n=Function.prototype,Kn=Object.prototype,Qn=$n.toString,Jn=Kn.hasOwnProperty,tr=Qn.call(Object);function er(t,e,n){var r=t.length;return n=void 0===n?r:n,!e&&n>=r?t:function(t,e,n){var r=-1,i=t.length;e<0&&(e=-e>i?0:i+e),(n=n>i?i:n)<0&&(n+=i),i=e>n?0:n-e>>>0,e>>>=0;for(var o=Array(i);++r<i;)o[r]=t[r+e];return o}(t,e,n)}var nr=RegExp("[\\u200d\\ud800-\\udfff\\u0300-\\u036f\\ufe20-\\ufe2f\\u20d0-\\u20ff\\ufe0e\\ufe0f]");function rr(t){return nr.test(t)}var ir="[\\ud800-\\udfff]",or="[\\u0300-\\u036f\\ufe20-\\ufe2f\\u20d0-\\u20ff]",ar="\\ud83c[\\udffb-\\udfff]",sr="[^\\ud800-\\udfff]",lr="(?:\\ud83c[\\udde6-\\uddff]){2}",ur="[\\ud800-\\udbff][\\udc00-\\udfff]",cr="(?:"+or+"|"+ar+")"+"?",hr="[\\ufe0e\\ufe0f]?"+cr+("(?:\\u200d(?:"+[sr,lr,ur].join("|")+")[\\ufe0e\\ufe0f]?"+cr+")*"),dr="(?:"+[sr+or+"?",or,lr,ur,ir].join("|")+")",fr=RegExp(ar+"(?="+ar+")|"+dr+hr,"g");function pr(t){return rr(t)?function(t){return t.match(fr)||[]}(t):function(t){return t.split("")}(t)}var gr,vr=(gr="toUpperCase",function(t){var e=rr(t=Vn(t))?pr(t):void 0,n=e?e[0]:t.charAt(0),r=e?er(e,1).join(""):t.slice(1);return n[gr]()+r});var mr=function(t){return function(e){return null==t?void 0:t[e]}}({"À":"A","Á":"A","Â":"A","Ã":"A","Ä":"A","Å":"A","à":"a","á":"a","â":"a","ã":"a","ä":"a","å":"a","Ç":"C","ç":"c","Ð":"D","ð":"d","È":"E","É":"E","Ê":"E","Ë":"E","è":"e","é":"e","ê":"e","ë":"e","Ì":"I","Í":"I","Î":"I","Ï":"I","ì":"i","í":"i","î":"i","ï":"i","Ñ":"N","ñ":"n","Ò":"O","Ó":"O","Ô":"O","Õ":"O","Ö":"O","Ø":"O","ò":"o","ó":"o","ô":"o","õ":"o","ö":"o","ø":"o","Ù":"U","Ú":"U","Û":"U","Ü":"U","ù":"u","ú":"u","û":"u","ü":"u","Ý":"Y","ý":"y","ÿ":"y","Æ":"Ae","æ":"ae","Þ":"Th","þ":"th","ß":"ss","Ā":"A","Ă":"A","Ą":"A","ā":"a","ă":"a","ą":"a","Ć":"C","Ĉ":"C","Ċ":"C","Č":"C","ć":"c","ĉ":"c","ċ":"c","č":"c","Ď":"D","Đ":"D","ď":"d","đ":"d","Ē":"E","Ĕ":"E","Ė":"E","Ę":"E","Ě":"E","ē":"e","ĕ":"e","ė":"e","ę":"e","ě":"e","Ĝ":"G","Ğ":"G","Ġ":"G","Ģ":"G","ĝ":"g","ğ":"g","ġ":"g","ģ":"g","Ĥ":"H","Ħ":"H","ĥ":"h","ħ":"h","Ĩ":"I","Ī":"I","Ĭ":"I","Į":"I","İ":"I","ĩ":"i","ī":"i","ĭ":"i","į":"i","ı":"i","Ĵ":"J","ĵ":"j","Ķ":"K","ķ":"k","ĸ":"k","Ĺ":"L","Ļ":"L","Ľ":"L","Ŀ":"L","Ł":"L","ĺ":"l","ļ":"l","ľ":"l","ŀ":"l","ł":"l","Ń":"N","Ņ":"N","Ň":"N","Ŋ":"N","ń":"n","ņ":"n","ň":"n","ŋ":"n","Ō":"O","Ŏ":"O","Ő":"O","ō":"o","ŏ":"o","ő":"o","Ŕ":"R","Ŗ":"R","Ř":"R","ŕ":"r","ŗ":"r","ř":"r","Ś":"S","Ŝ":"S","Ş":"S","Š":"S","ś":"s","ŝ":"s","ş":"s","š":"s","Ţ":"T","Ť":"T","Ŧ":"T","ţ":"t","ť":"t","ŧ":"t","Ũ":"U","Ū":"U","Ŭ":"U","Ů":"U","Ű":"U","Ų":"U","ũ":"u","ū":"u","ŭ":"u","ů":"u","ű":"u","ų":"u","Ŵ":"W","ŵ":"w","Ŷ":"Y","ŷ":"y","Ÿ":"Y","Ź":"Z","Ż":"Z","Ž":"Z","ź":"z","ż":"z","ž":"z","IJ":"IJ","ij":"ij","Œ":"Oe","œ":"oe","ʼn":"'n","ſ":"s"}),yr=/[\xc0-\xd6\xd8-\xf6\xf8-\xff\u0100-\u017f]/g,br=RegExp("[\\u0300-\\u036f\\ufe20-\\ufe2f\\u20d0-\\u20ff]","g");var Er=/[^\x00-\x2f\x3a-\x40\x5b-\x60\x7b-\x7f]+/g;var _r=/[a-z][A-Z]|[A-Z]{2}[a-z]|[0-9][a-zA-Z]|[a-zA-Z][0-9]|[^a-zA-Z0-9 ]/;var xr="\\xac\\xb1\\xd7\\xf7\\x00-\\x2f\\x3a-\\x40\\x5b-\\x60\\x7b-\\xbf\\u2000-\\u206f \\t\\x0b\\f\\xa0\\ufeff\\n\\r\\u2028\\u2029\\u1680\\u180e\\u2000\\u2001\\u2002\\u2003\\u2004\\u2005\\u2006\\u2007\\u2008\\u2009\\u200a\\u202f\\u205f\\u3000",wr="["+xr+"]",Or="\\d+",Tr="[\\u2700-\\u27bf]",Sr="[a-z\\xdf-\\xf6\\xf8-\\xff]",Mr="[^\\ud800-\\udfff"+xr+Or+"\\u2700-\\u27bfa-z\\xdf-\\xf6\\xf8-\\xffA-Z\\xc0-\\xd6\\xd8-\\xde]",Cr="(?:\\ud83c[\\udde6-\\uddff]){2}",Ar="[\\ud800-\\udbff][\\udc00-\\udfff]",Lr="[A-Z\\xc0-\\xd6\\xd8-\\xde]",Dr="(?:"+Sr+"|"+Mr+")",kr="(?:"+Lr+"|"+Mr+")",Rr="(?:[\\u0300-\\u036f\\ufe20-\\ufe2f\\u20d0-\\u20ff]|\\ud83c[\\udffb-\\udfff])?",Ir="[\\ufe0e\\ufe0f]?"+Rr+("(?:\\u200d(?:"+["[^\\ud800-\\udfff]",Cr,Ar].join("|")+")[\\ufe0e\\ufe0f]?"+Rr+")*"),Pr="(?:"+[Tr,Cr,Ar].join("|")+")"+Ir,Nr=RegExp([Lr+"?"+Sr+"+(?:['’](?:d|ll|m|re|s|t|ve))?(?="+[wr,Lr,"$"].join("|")+")",kr+"+(?:['’](?:D|LL|M|RE|S|T|VE))?(?="+[wr,Lr+Dr,"$"].join("|")+")",Lr+"?"+Dr+"+(?:['’](?:d|ll|m|re|s|t|ve))?",Lr+"+(?:['’](?:D|LL|M|RE|S|T|VE))?","\\d*(?:1ST|2ND|3RD|(?![123])\\dTH)(?=\\b|[a-z_])","\\d*(?:1st|2nd|3rd|(?![123])\\dth)(?=\\b|[A-Z_])",Or,Pr].join("|"),"g");function Ur(t,e,n){return t=Vn(t),void 0===(e=n?void 0:e)?function(t){return _r.test(t)}(t)?function(t){return t.match(Nr)||[]}(t):function(t){return t.match(Er)||[]}(t):t.match(e)||[]}var Br=RegExp("['’]","g");function Vr(t){return function(e){return function(t,e,n,r){var i=-1,o=null==t?0:t.length;for(r&&o&&(n=t[++i]);++i<o;)n=e(n,t[i],i,t);return n}(Ur(function(t){return(t=Vn(t))&&t.replace(yr,mr).replace(br,"")}(e).replace(Br,"")),t,"")}}var Hr=Vr((function(t,e,n){return e=e.toLowerCase(),t+(n?vr(Vn(e).toLowerCase()):e)}));function Gr(t,e,n){return void 0===n&&(n=e,e=void 0),void 0!==n&&(n=(n=se(n))==n?n:0),void 0!==e&&(e=(e=se(e))==e?e:0),function(t,e,n){return t==t&&(void 0!==n&&(t=t<=n?t:n),void 0!==e&&(t=t>=e?t:e)),t}(se(t),e,n)}function zr(t){var e=this.__data__=new Dn(t);this.size=e.size}zr.prototype.clear=function(){this.__data__=new Dn,this.size=0},zr.prototype.delete=function(t){var e=this.__data__,n=e.delete(t);return this.size=e.size,n},zr.prototype.get=function(t){return this.__data__.get(t)},zr.prototype.has=function(t){return this.__data__.has(t)},zr.prototype.set=function(t,e){var n=this.__data__;if(n instanceof Dn){var r=n.__data__;if(!kn||r.length<199)return r.push([t,e]),this.size=++n.size,this;n=this.__data__=new In(r)}return n.set(t,e),this.size=n.size,this};var jr="object"==typeof t&&t&&!t.nodeType&&t,Fr=jr&&"object"==typeof module&&module&&!module.nodeType&&module,Wr=Fr&&Fr.exports===jr?Ut.Buffer:void 0,qr=Wr?Wr.allocUnsafe:void 0;function Yr(t,e){if(e)return t.slice();var n=t.length,r=qr?qr(n):new t.constructor(n);return t.copy(r),r}function Zr(){return[]}var Xr=Object.prototype.propertyIsEnumerable,$r=Object.getOwnPropertySymbols,Kr=$r?function(t){return null==t?[]:(t=Object(t),function(t,e){for(var n=-1,r=null==t?0:t.length,i=0,o=[];++n<r;){var a=t[n];e(a,n,t)&&(o[i++]=a)}return o}($r(t),(function(e){return Xr.call(t,e)})))}:Zr;var Qr=Object.getOwnPropertySymbols?function(t){for(var e=[];t;)Fn(e,Kr(t)),t=Xn(t);return e}:Zr;function Jr(t,e,n){var r=e(t);return Xt(t)?r:Fn(r,n(t))}function ti(t){return Jr(t,yn,Kr)}function ei(t){return Jr(t,_n,Qr)}var ni=xe(Ut,"DataView"),ri=xe(Ut,"Promise"),ii=xe(Ut,"Set"),oi=pe(ni),ai=pe(kn),si=pe(ri),li=pe(ii),ui=pe(we),ci=Wt;(ni&&"[object DataView]"!=ci(new ni(new ArrayBuffer(1)))||kn&&"[object Map]"!=ci(new kn)||ri&&"[object Promise]"!=ci(ri.resolve())||ii&&"[object Set]"!=ci(new ii)||we&&"[object WeakMap]"!=ci(new we))&&(ci=function(t){var e=Wt(t),n="[object Object]"==e?t.constructor:void 0,r=n?pe(n):"";if(r)switch(r){case oi:return"[object DataView]";case ai:return"[object Map]";case si:return"[object Promise]";case li:return"[object Set]";case ui:return"[object WeakMap]"}return e});var hi=ci,di=Object.prototype.hasOwnProperty;var fi=Ut.Uint8Array;function pi(t){var e=new t.constructor(t.byteLength);return new fi(e).set(new fi(t)),e}var gi=/\w*$/;var vi=Bt?Bt.prototype:void 0,mi=vi?vi.valueOf:void 0;function yi(t,e){var n=e?pi(t.buffer):t.buffer;return new t.constructor(n,t.byteOffset,t.length)}function bi(t,e,n){var r,i,o,a=t.constructor;switch(e){case"[object ArrayBuffer]":return pi(t);case"[object Boolean]":case"[object Date]":return new a(+t);case"[object DataView]":return function(t,e){var n=e?pi(t.buffer):t.buffer;return new t.constructor(n,t.byteOffset,t.byteLength)}(t,n);case"[object Float32Array]":case"[object Float64Array]":case"[object Int8Array]":case"[object Int16Array]":case"[object Int32Array]":case"[object Uint8Array]":case"[object Uint8ClampedArray]":case"[object Uint16Array]":case"[object Uint32Array]":return yi(t,n);case"[object Map]":return new a;case"[object Number]":case"[object String]":return new a(t);case"[object RegExp]":return(o=new(i=t).constructor(i.source,gi.exec(i))).lastIndex=i.lastIndex,o;case"[object Set]":return new a;case"[object Symbol]":return r=t,mi?Object(mi.call(r)):{}}}function Ei(t){return"function"!=typeof t.constructor||Ye(t)?{}:Te(Xn(t))}var _i=un&&un.isMap,xi=_i?on(_i):function(t){return qt(t)&&"[object Map]"==hi(t)};var wi=un&&un.isSet,Oi=wi?on(wi):function(t){return qt(t)&&"[object Set]"==hi(t)},Ti={};function Si(t,e,n,r,i,o){var a,s=1&e,l=2&e,u=4&e;if(n&&(a=i?n(t,r,i,o):n(t)),void 0!==a)return a;if(!ne(t))return t;var c=Xt(t);if(c){if(a=function(t){var e=t.length,n=new t.constructor(e);return e&&"string"==typeof t[0]&&di.call(t,"index")&&(n.index=t.index,n.input=t.input),n}(t),!s)return Me(t,a)}else{var h=hi(t),d="[object Function]"==h||"[object GeneratorFunction]"==h;if(nn(t))return Yr(t,s);if("[object Object]"==h||"[object Arguments]"==h||d&&!i){if(a=l||d?{}:Ei(t),!s)return l?function(t,e){return He(t,Qr(t),e)}(t,function(t,e){return t&&He(e,_n(e),t)}(a,t)):function(t,e){return He(t,Kr(t),e)}(t,function(t,e){return t&&He(e,yn(e),t)}(a,t))}else{if(!Ti[h])return i?t:{};a=bi(t,h,s)}}o||(o=new zr);var f=o.get(t);if(f)return f;o.set(t,a),Oi(t)?t.forEach((function(r){a.add(Si(r,e,n,r,t,o))})):xi(t)&&t.forEach((function(r,i){a.set(i,Si(r,e,n,i,t,o))}));var p=c?void 0:(u?l?ei:ti:l?_n:yn)(t);return function(t,e){for(var n=-1,r=null==t?0:t.length;++n<r&&!1!==e(t[n],n,t););}(p||t,(function(r,i){p&&(r=t[i=r]),Ve(a,i,Si(r,e,n,i,t,o))})),a}Ti["[object Arguments]"]=Ti["[object Array]"]=Ti["[object ArrayBuffer]"]=Ti["[object DataView]"]=Ti["[object Boolean]"]=Ti["[object Date]"]=Ti["[object Float32Array]"]=Ti["[object Float64Array]"]=Ti["[object Int8Array]"]=Ti["[object Int16Array]"]=Ti["[object Int32Array]"]=Ti["[object Map]"]=Ti["[object Number]"]=Ti["[object Object]"]=Ti["[object RegExp]"]=Ti["[object Set]"]=Ti["[object String]"]=Ti["[object Symbol]"]=Ti["[object Uint8Array]"]=Ti["[object Uint8ClampedArray]"]=Ti["[object Uint16Array]"]=Ti["[object Uint32Array]"]=!0,Ti["[object Error]"]=Ti["[object Function]"]=Ti["[object WeakMap]"]=!1;function Mi(t){var e=-1,n=null==t?0:t.length;for(this.__data__=new In;++e<n;)this.add(t[e])}function Ci(t,e){for(var n=-1,r=null==t?0:t.length;++n<r;)if(e(t[n],n,t))return!0;return!1}function Ai(t,e){return t.has(e)}Mi.prototype.add=Mi.prototype.push=function(t){return this.__data__.set(t,"__lodash_hash_undefined__"),this},Mi.prototype.has=function(t){return this.__data__.has(t)};function Li(t,e,n,r,i,o){var a=1&n,s=t.length,l=e.length;if(s!=l&&!(a&&l>s))return!1;var u=o.get(t),c=o.get(e);if(u&&c)return u==e&&c==t;var h=-1,d=!0,f=2&n?new Mi:void 0;for(o.set(t,e),o.set(e,t);++h<s;){var p=t[h],g=e[h];if(r)var v=a?r(g,p,h,e,t,o):r(p,g,h,t,e,o);if(void 0!==v){if(v)continue;d=!1;break}if(f){if(!Ci(e,(function(t,e){if(!Ai(f,e)&&(p===t||i(p,t,n,r,o)))return f.push(e)}))){d=!1;break}}else if(p!==g&&!i(p,g,n,r,o)){d=!1;break}}return o.delete(t),o.delete(e),d}function Di(t){var e=-1,n=Array(t.size);return t.forEach((function(t,r){n[++e]=[r,t]})),n}function ki(t){var e=-1,n=Array(t.size);return t.forEach((function(t){n[++e]=t})),n}var Ri=Bt?Bt.prototype:void 0,Ii=Ri?Ri.valueOf:void 0;var Pi=Object.prototype.hasOwnProperty;var Ni=Object.prototype.hasOwnProperty;function Ui(t,e,n,r,i,o){var a=Xt(t),s=Xt(e),l=a?"[object Array]":hi(t),u=s?"[object Array]":hi(e),c="[object Object]"==(l="[object Arguments]"==l?"[object Object]":l),h="[object Object]"==(u="[object Arguments]"==u?"[object Object]":u),d=l==u;if(d&&nn(t)){if(!nn(e))return!1;a=!0,c=!1}if(d&&!c)return o||(o=new zr),a||hn(t)?Li(t,e,n,r,i,o):function(t,e,n,r,i,o,a){switch(n){case"[object DataView]":if(t.byteLength!=e.byteLength||t.byteOffset!=e.byteOffset)return!1;t=t.buffer,e=e.buffer;case"[object ArrayBuffer]":return!(t.byteLength!=e.byteLength||!o(new fi(t),new fi(e)));case"[object Boolean]":case"[object Date]":case"[object Number]":return Ue(+t,+e);case"[object Error]":return t.name==e.name&&t.message==e.message;case"[object RegExp]":case"[object String]":return t==e+"";case"[object Map]":var s=Di;case"[object Set]":var l=1&r;if(s||(s=ki),t.size!=e.size&&!l)return!1;var u=a.get(t);if(u)return u==e;r|=2,a.set(t,e);var c=Li(s(t),s(e),r,i,o,a);return a.delete(t),c;case"[object Symbol]":if(Ii)return Ii.call(t)==Ii.call(e)}return!1}(t,e,l,n,r,i,o);if(!(1&n)){var f=c&&Ni.call(t,"__wrapped__"),p=h&&Ni.call(e,"__wrapped__");if(f||p){var g=f?t.value():t,v=p?e.value():e;return o||(o=new zr),i(g,v,n,r,o)}}return!!d&&(o||(o=new zr),function(t,e,n,r,i,o){var a=1&n,s=ti(t),l=s.length;if(l!=ti(e).length&&!a)return!1;for(var u=l;u--;){var c=s[u];if(!(a?c in e:Pi.call(e,c)))return!1}var h=o.get(t),d=o.get(e);if(h&&d)return h==e&&d==t;var f=!0;o.set(t,e),o.set(e,t);for(var p=a;++u<l;){var g=t[c=s[u]],v=e[c];if(r)var m=a?r(v,g,c,e,t,o):r(g,v,c,t,e,o);if(!(void 0===m?g===v||i(g,v,n,r,o):m)){f=!1;break}p||(p="constructor"==c)}if(f&&!p){var y=t.constructor,b=e.constructor;y==b||!("constructor"in t)||!("constructor"in e)||"function"==typeof y&&y instanceof y&&"function"==typeof b&&b instanceof b||(f=!1)}return o.delete(t),o.delete(e),f}(t,e,n,r,i,o))}function Bi(t,e,n,r,i){return t===e||(null==t||null==e||!qt(t)&&!qt(e)?t!=t&&e!=e:Ui(t,e,n,r,Bi,i))}function Vi(t){return t==t&&!ne(t)}function Hi(t,e){return function(n){return null!=n&&(n[t]===e&&(void 0!==e||t in Object(n)))}}function Gi(t){var e=function(t){for(var e=yn(t),n=e.length;n--;){var r=e[n],i=t[r];e[n]=[r,i,Vi(i)]}return e}(t);return 1==e.length&&e[0][2]?Hi(e[0][0],e[0][1]):function(n){return n===t||function(t,e,n,r){var i=n.length,o=i,a=!r;if(null==t)return!o;for(t=Object(t);i--;){var s=n[i];if(a&&s[2]?s[1]!==t[s[0]]:!(s[0]in t))return!1}for(;++i<o;){var l=(s=n[i])[0],u=t[l],c=s[1];if(a&&s[2]){if(void 0===u&&!(l in t))return!1}else{var h=new zr;if(r)var d=r(u,c,l,t,e,h);if(!(void 0===d?Bi(c,u,3,r,h):d))return!1}}return!0}(n,t,e)}}function zi(t,e){return null!=t&&e in Object(t)}function ji(t,e){return null!=t&&function(t,e,n){for(var r=-1,i=(e=Hn(e,t)).length,o=!1;++r<i;){var a=Gn(e[r]);if(!(o=null!=t&&n(t,a)))break;t=t[a]}return o||++r!=i?o:!!(i=null==t?0:t.length)&&je(i)&&Pe(a,i)&&(Xt(t)||Qe(t))}(t,e,zi)}function Fi(t){return On(t)?(e=Gn(t),function(t){return null==t?void 0:t[e]}):function(t){return function(e){return zn(e,t)}}(t);var e}function Wi(t){return"function"==typeof t?t:null==t?le:"object"==typeof t?Xt(t)?function(t,e){return On(t)&&Vi(e)?Hi(Gn(t),e):function(n){var r=jn(n,t);return void 0===r&&r===e?ji(n,t):Bi(e,r,3)}}(t[0],t[1]):Gi(t):Fi(t)}function qi(t,e,n,r){for(var i=-1,o=null==t?0:t.length;++i<o;){var a=t[i];e(r,a,n(a),t)}return r}var Yi,Zi=function(t,e,n){for(var r=-1,i=Object(t),o=n(t),a=o.length;a--;){var s=o[Yi?a:++r];if(!1===e(i[s],s,i))break}return t};var Xi=function(t,e){return function(n,r){if(null==n)return n;if(!Fe(n))return t(n,r);for(var i=n.length,o=e?i:-1,a=Object(n);(e?o--:++o<i)&&!1!==r(a[o],o,a););return n}}((function(t,e){return t&&Zi(t,e,yn)}));function $i(t,e,n,r){return Xi(t,(function(t,i,o){e(r,t,n(t),o)})),r}var Ki=function(){return Ut.Date.now()},Qi=Math.max,Ji=Math.min;function to(t,e,n){var r,i,o,a,s,l,u=0,c=!1,h=!1,d=!0;if("function"!=typeof t)throw new TypeError("Expected a function");function f(e){var n=r,o=i;return r=i=void 0,u=e,a=t.apply(o,n)}function p(t){return u=t,s=setTimeout(v,e),c?f(t):a}function g(t){var n=t-l;return void 0===l||n>=e||n<0||h&&t-u>=o}function v(){var t=Ki();if(g(t))return m(t);s=setTimeout(v,function(t){var n=e-(t-l);return h?Ji(n,o-(t-u)):n}(t))}function m(t){return s=void 0,d&&r?f(t):(r=i=void 0,a)}function y(){var t=Ki(),n=g(t);if(r=arguments,i=this,l=t,n){if(void 0===s)return p(l);if(h)return clearTimeout(s),s=setTimeout(v,e),f(l)}return void 0===s&&(s=setTimeout(v,e)),a}return e=se(e)||0,ne(n)&&(c=!!n.leading,o=(h="maxWait"in n)?Qi(se(n.maxWait)||0,e):o,d="trailing"in n?!!n.trailing:d),y.cancel=function(){void 0!==s&&clearTimeout(s),u=0,r=l=i=s=void 0},y.flush=function(){return void 0===s?a:m(Ki())},y}function eo(t,e,n){(void 0!==n&&!Ue(t[e],n)||void 0===n&&!(e in t))&&Ne(t,e,n)}function no(t){return qt(t)&&Fe(t)}function ro(t,e){if(("constructor"!==e||"function"!=typeof t[e])&&"__proto__"!=e)return t[e]}function io(t,e,n,r,i,o,a){var s=ro(t,n),l=ro(e,n),u=a.get(l);if(u)eo(t,n,u);else{var c=o?o(s,l,n+"",t,e,a):void 0,h=void 0===c;if(h){var d=Xt(l),f=!d&&nn(l),p=!d&&!f&&hn(l);c=l,d||f||p?Xt(s)?c=s:no(s)?c=Me(s):f?(h=!1,c=Yr(l,!0)):p?(h=!1,c=yi(l,!0)):c=[]:function(t){if(!qt(t)||"[object Object]"!=Wt(t))return!1;var e=Xn(t);if(null===e)return!0;var n=Jn.call(e,"constructor")&&e.constructor;return"function"==typeof n&&n instanceof n&&Qn.call(n)==tr}(l)||Qe(l)?(c=s,Qe(s)?c=function(t){return He(t,_n(t))}(s):ne(s)&&!ue(s)||(c=Ei(l))):h=!1}h&&(a.set(l,c),i(c,l,r,o,a),a.delete(l)),eo(t,n,c)}}function oo(t,e,n,r,i){t!==e&&Zi(e,(function(o,a){if(i||(i=new zr),ne(o))io(t,e,a,n,oo,r,i);else{var s=r?r(ro(t,a),o,a+"",t,e,i):void 0;void 0===s&&(s=o),eo(t,a,s)}}),_n)}function ao(t,e,n){for(var r=-1,i=null==t?0:t.length;++r<i;)if(n(e,t[r]))return!0;return!1}function so(t,e){var n=-1,r=Fe(t)?Array(t.length):[];return Xi(t,(function(t,i,o){r[++n]=e(t,i,o)})),r}function lo(t,e){return Yn(function(t,e){return(Xt(t)?Zt:so)(t,Wi(e))}(t,e),1/0)}var uo,co,ho=Object.prototype.hasOwnProperty,fo=(uo=function(t,e,n){ho.call(t,n)?t[n].push(e):Ne(t,n,[e])},function(t,e){var n=Xt(t)?qi:$i,r=co?co():{};return n(t,uo,Wi(e),r)}),po=Object.prototype.hasOwnProperty;function go(t){if(null==t)return!0;if(Fe(t)&&(Xt(t)||"string"==typeof t||"function"==typeof t.splice||nn(t)||hn(t)||Qe(t)))return!t.length;var e=hi(t);if("[object Map]"==e||"[object Set]"==e)return!t.size;if(Ye(t))return!mn(t).length;for(var n in t)if(po.call(t,n))return!1;return!0}function vo(t,e){return Bi(t,e)}var mo,yo=Vr((function(t,e,n){return t+(n?"-":"")+e.toLowerCase()})),bo=(mo=function(t,e,n){oo(t,e,n)},ze((function(t,e){var n=-1,r=e.length,i=r>1?e[r-1]:void 0,o=r>2?e[2]:void 0;for(i=mo.length>3&&"function"==typeof i?(r--,i):void 0,o&&We(e[0],e[1],o)&&(i=r<3?void 0:i,r=1),t=Object(t);++n<r;){var a=e[n];a&&mo(t,a,n,i)}return t})));function Eo(t,e){var n;return Xi(t,(function(t,r,i){return!(n=e(t,r,i))})),!!n}var _o=ii&&1/ki(new ii([,-0]))[1]==1/0?function(t){return new ii(t)}:function(){};function xo(t,e,n){var r=-1,i=Re,o=t.length,a=!0,s=[],l=s;if(n)a=!1,i=ao;else if(o>=200){var u=e?null:_o(t);if(u)return ki(u);a=!1,i=Ai,l=new Mi}else l=e?[]:s;t:for(;++r<o;){var c=t[r],h=e?e(c):c;if(c=n||0!==c?c:0,a&&h==h){for(var d=l.length;d--;)if(l[d]===h)continue t;e&&l.push(h),s.push(c)}else i(l,h,n)||(l!==s&&l.push(h),s.push(c))}return s}var wo=ze((function(t){var e=function(t){var e=null==t?0:t.length;return e?t[e-1]:void 0}(t);return no(e)&&(e=void 0),xo(Yn(t,1,no,!0),Wi(e))}));var Oo="http://www.w3.org/1999/xhtml",To={svg:"http://www.w3.org/2000/svg",xhtml:Oo,xlink:"http://www.w3.org/1999/xlink",xml:"http://www.w3.org/XML/1998/namespace",xmlns:"http://www.w3.org/2000/xmlns/"};function So(t){var e=t+="",n=e.indexOf(":");return n>=0&&"xmlns"!==(e=t.slice(0,n))&&(t=t.slice(n+1)),To.hasOwnProperty(e)?{space:To[e],local:t}:t}function Mo(t){return function(){var e=this.ownerDocument,n=this.namespaceURI;return n===Oo&&e.documentElement.namespaceURI===Oo?e.createElement(t):e.createElementNS(n,t)}}function Co(t){return function(){return this.ownerDocument.createElementNS(t.space,t.local)}}function Ao(t){var e=So(t);return(e.local?Co:Mo)(e)}function Lo(){}function Do(t){return null==t?Lo:function(){return this.querySelector(t)}}function ko(t){return null==t?[]:Array.isArray(t)?t:Array.from(t)}function Ro(){return[]}function Io(t){return null==t?Ro:function(){return this.querySelectorAll(t)}}function Po(t){return function(){return this.matches(t)}}function No(t){return function(e){return e.matches(t)}}var Uo=Array.prototype.find;function Bo(){return this.firstElementChild}var Vo=Array.prototype.filter;function Ho(){return Array.from(this.children)}function Go(t){return new Array(t.length)}function zo(t,e){this.ownerDocument=t.ownerDocument,this.namespaceURI=t.namespaceURI,this._next=null,this._parent=t,this.__data__=e}function jo(t){return function(){return t}}function Fo(t,e,n,r,i,o){for(var a,s=0,l=e.length,u=o.length;s<u;++s)(a=e[s])?(a.__data__=o[s],r[s]=a):n[s]=new zo(t,o[s]);for(;s<l;++s)(a=e[s])&&(i[s]=a)}function Wo(t,e,n,r,i,o,a){var s,l,u,c=new Map,h=e.length,d=o.length,f=new Array(h);for(s=0;s<h;++s)(l=e[s])&&(f[s]=u=a.call(l,l.__data__,s,e)+"",c.has(u)?i[s]=l:c.set(u,l));for(s=0;s<d;++s)u=a.call(t,o[s],s,o)+"",(l=c.get(u))?(r[s]=l,l.__data__=o[s],c.delete(u)):n[s]=new zo(t,o[s]);for(s=0;s<h;++s)(l=e[s])&&c.get(f[s])===l&&(i[s]=l)}function qo(t){return t.__data__}function Yo(t){return"object"==typeof t&&"length"in t?t:Array.from(t)}function Zo(t,e){return t<e?-1:t>e?1:t>=e?0:NaN}function Xo(t){return function(){this.removeAttribute(t)}}function $o(t){return function(){this.removeAttributeNS(t.space,t.local)}}function Ko(t,e){return function(){this.setAttribute(t,e)}}function Qo(t,e){return function(){this.setAttributeNS(t.space,t.local,e)}}function Jo(t,e){return function(){var n=e.apply(this,arguments);null==n?this.removeAttribute(t):this.setAttribute(t,n)}}function ta(t,e){return function(){var n=e.apply(this,arguments);null==n?this.removeAttributeNS(t.space,t.local):this.setAttributeNS(t.space,t.local,n)}}function ea(t){return t.ownerDocument&&t.ownerDocument.defaultView||t.document&&t||t.defaultView}function na(t){return function(){this.style.removeProperty(t)}}function ra(t,e,n){return function(){this.style.setProperty(t,e,n)}}function ia(t,e,n){return function(){var r=e.apply(this,arguments);null==r?this.style.removeProperty(t):this.style.setProperty(t,r,n)}}function oa(t,e){return t.style.getPropertyValue(e)||ea(t).getComputedStyle(t,null).getPropertyValue(e)}function aa(t){return function(){delete this[t]}}function sa(t,e){return function(){this[t]=e}}function la(t,e){return function(){var n=e.apply(this,arguments);null==n?delete this[t]:this[t]=n}}function ua(t){return t.trim().split(/^|\s+/)}function ca(t){return t.classList||new ha(t)}function ha(t){this._node=t,this._names=ua(t.getAttribute("class")||"")}function da(t,e){for(var n=ca(t),r=-1,i=e.length;++r<i;)n.add(e[r])}function fa(t,e){for(var n=ca(t),r=-1,i=e.length;++r<i;)n.remove(e[r])}function pa(t){return function(){da(this,t)}}function ga(t){return function(){fa(this,t)}}function va(t,e){return function(){(e.apply(this,arguments)?da:fa)(this,t)}}function ma(){this.textContent=""}function ya(t){return function(){this.textContent=t}}function ba(t){return function(){var e=t.apply(this,arguments);this.textContent=null==e?"":e}}function Ea(){this.innerHTML=""}function _a(t){return function(){this.innerHTML=t}}function xa(t){return function(){var e=t.apply(this,arguments);this.innerHTML=null==e?"":e}}function wa(){this.nextSibling&&this.parentNode.appendChild(this)}function Oa(){this.previousSibling&&this.parentNode.insertBefore(this,this.parentNode.firstChild)}function Ta(){return null}function Sa(){var t=this.parentNode;t&&t.removeChild(this)}function Ma(){var t=this.cloneNode(!1),e=this.parentNode;return e?e.insertBefore(t,this.nextSibling):t}function Ca(){var t=this.cloneNode(!0),e=this.parentNode;return e?e.insertBefore(t,this.nextSibling):t}function Aa(t){return t.trim().split(/^|\s+/).map((function(t){var e="",n=t.indexOf(".");return n>=0&&(e=t.slice(n+1),t=t.slice(0,n)),{type:t,name:e}}))}function La(t){return function(){var e=this.__on;if(e){for(var n,r=0,i=-1,o=e.length;r<o;++r)n=e[r],t.type&&n.type!==t.type||n.name!==t.name?e[++i]=n:this.removeEventListener(n.type,n.listener,n.options);++i?e.length=i:delete this.__on}}}function Da(t,e,n){return function(){var r,i=this.__on,o=function(t){return function(e){t.call(this,e,this.__data__)}}(e);if(i)for(var a=0,s=i.length;a<s;++a)if((r=i[a]).type===t.type&&r.name===t.name)return this.removeEventListener(r.type,r.listener,r.options),this.addEventListener(r.type,r.listener=o,r.options=n),void(r.value=e);this.addEventListener(t.type,o,n),r={type:t.type,name:t.name,value:e,listener:o,options:n},i?i.push(r):this.__on=[r]}}function ka(t,e,n){var r=ea(t),i=r.CustomEvent;"function"==typeof i?i=new i(e,n):(i=r.document.createEvent("Event"),n?(i.initEvent(e,n.bubbles,n.cancelable),i.detail=n.detail):i.initEvent(e,!1,!1)),t.dispatchEvent(i)}function Ra(t,e){return function(){return ka(this,t,e)}}function Ia(t,e){return function(){return ka(this,t,e.apply(this,arguments))}}zo.prototype={constructor:zo,appendChild:function(t){return this._parent.insertBefore(t,this._next)},insertBefore:function(t,e){return this._parent.insertBefore(t,e)},querySelector:function(t){return this._parent.querySelector(t)},querySelectorAll:function(t){return this._parent.querySelectorAll(t)}},ha.prototype={add:function(t){this._names.indexOf(t)<0&&(this._names.push(t),this._node.setAttribute("class",this._names.join(" ")))},remove:function(t){var e=this._names.indexOf(t);e>=0&&(this._names.splice(e,1),this._node.setAttribute("class",this._names.join(" ")))},contains:function(t){return this._names.indexOf(t)>=0}};var Pa=[null];function Na(t,e){this._groups=t,this._parents=e}function Ua(){return new Na([[document.documentElement]],Pa)}function Ba(t){return"string"==typeof t?new Na([[document.querySelector(t)]],[document.documentElement]):new Na([[t]],Pa)}function Va(t,e){if(t=function(t){let e;for(;e=t.sourceEvent;)t=e;return t}(t),void 0===e&&(e=t.currentTarget),e){var n=e.ownerSVGElement||e;if(n.createSVGPoint){var r=n.createSVGPoint();return r.x=t.clientX,r.y=t.clientY,[(r=r.matrixTransform(e.getScreenCTM().inverse())).x,r.y]}if(e.getBoundingClientRect){var i=e.getBoundingClientRect();return[t.clientX-i.left-e.clientLeft,t.clientY-i.top-e.clientTop]}}return[t.pageX,t.pageY]}Na.prototype=Ua.prototype={constructor:Na,select:function(t){"function"!=typeof t&&(t=Do(t));for(var e=this._groups,n=e.length,r=new Array(n),i=0;i<n;++i)for(var o,a,s=e[i],l=s.length,u=r[i]=new Array(l),c=0;c<l;++c)(o=s[c])&&(a=t.call(o,o.__data__,c,s))&&("__data__"in o&&(a.__data__=o.__data__),u[c]=a);return new Na(r,this._parents)},selectAll:function(t){t="function"==typeof t?function(t){return function(){return ko(t.apply(this,arguments))}}(t):Io(t);for(var e=this._groups,n=e.length,r=[],i=[],o=0;o<n;++o)for(var a,s=e[o],l=s.length,u=0;u<l;++u)(a=s[u])&&(r.push(t.call(a,a.__data__,u,s)),i.push(a));return new Na(r,i)},selectChild:function(t){return this.select(null==t?Bo:function(t){return function(){return Uo.call(this.children,t)}}("function"==typeof t?t:No(t)))},selectChildren:function(t){return this.selectAll(null==t?Ho:function(t){return function(){return Vo.call(this.children,t)}}("function"==typeof t?t:No(t)))},filter:function(t){"function"!=typeof t&&(t=Po(t));for(var e=this._groups,n=e.length,r=new Array(n),i=0;i<n;++i)for(var o,a=e[i],s=a.length,l=r[i]=[],u=0;u<s;++u)(o=a[u])&&t.call(o,o.__data__,u,a)&&l.push(o);return new Na(r,this._parents)},data:function(t,e){if(!arguments.length)return Array.from(this,qo);var n=e?Wo:Fo,r=this._parents,i=this._groups;"function"!=typeof t&&(t=jo(t));for(var o=i.length,a=new Array(o),s=new Array(o),l=new Array(o),u=0;u<o;++u){var c=r[u],h=i[u],d=h.length,f=Yo(t.call(c,c&&c.__data__,u,r)),p=f.length,g=s[u]=new Array(p),v=a[u]=new Array(p),m=l[u]=new Array(d);n(c,h,g,v,m,f,e);for(var y,b,E=0,_=0;E<p;++E)if(y=g[E]){for(E>=_&&(_=E+1);!(b=v[_])&&++_<p;);y._next=b||null}}return(a=new Na(a,r))._enter=s,a._exit=l,a},enter:function(){return new Na(this._enter||this._groups.map(Go),this._parents)},exit:function(){return new Na(this._exit||this._groups.map(Go),this._parents)},join:function(t,e,n){var r=this.enter(),i=this,o=this.exit();return"function"==typeof t?(r=t(r))&&(r=r.selection()):r=r.append(t+""),null!=e&&(i=e(i))&&(i=i.selection()),null==n?o.remove():n(o),r&&i?r.merge(i).order():i},merge:function(t){for(var e=t.selection?t.selection():t,n=this._groups,r=e._groups,i=n.length,o=r.length,a=Math.min(i,o),s=new Array(i),l=0;l<a;++l)for(var u,c=n[l],h=r[l],d=c.length,f=s[l]=new Array(d),p=0;p<d;++p)(u=c[p]||h[p])&&(f[p]=u);for(;l<i;++l)s[l]=n[l];return new Na(s,this._parents)},selection:function(){return this},order:function(){for(var t=this._groups,e=-1,n=t.length;++e<n;)for(var r,i=t[e],o=i.length-1,a=i[o];--o>=0;)(r=i[o])&&(a&&4^r.compareDocumentPosition(a)&&a.parentNode.insertBefore(r,a),a=r);return this},sort:function(t){function e(e,n){return e&&n?t(e.__data__,n.__data__):!e-!n}t||(t=Zo);for(var n=this._groups,r=n.length,i=new Array(r),o=0;o<r;++o){for(var a,s=n[o],l=s.length,u=i[o]=new Array(l),c=0;c<l;++c)(a=s[c])&&(u[c]=a);u.sort(e)}return new Na(i,this._parents).order()},call:function(){var t=arguments[0];return arguments[0]=this,t.apply(null,arguments),this},nodes:function(){return Array.from(this)},node:function(){for(var t=this._groups,e=0,n=t.length;e<n;++e)for(var r=t[e],i=0,o=r.length;i<o;++i){var a=r[i];if(a)return a}return null},size:function(){let t=0;for(const e of this)++t;return t},empty:function(){return!this.node()},each:function(t){for(var e=this._groups,n=0,r=e.length;n<r;++n)for(var i,o=e[n],a=0,s=o.length;a<s;++a)(i=o[a])&&t.call(i,i.__data__,a,o);return this},attr:function(t,e){var n=So(t);if(arguments.length<2){var r=this.node();return n.local?r.getAttributeNS(n.space,n.local):r.getAttribute(n)}return this.each((null==e?n.local?$o:Xo:"function"==typeof e?n.local?ta:Jo:n.local?Qo:Ko)(n,e))},style:function(t,e,n){return arguments.length>1?this.each((null==e?na:"function"==typeof e?ia:ra)(t,e,null==n?"":n)):oa(this.node(),t)},property:function(t,e){return arguments.length>1?this.each((null==e?aa:"function"==typeof e?la:sa)(t,e)):this.node()[t]},classed:function(t,e){var n=ua(t+"");if(arguments.length<2){for(var r=ca(this.node()),i=-1,o=n.length;++i<o;)if(!r.contains(n[i]))return!1;return!0}return this.each(("function"==typeof e?va:e?pa:ga)(n,e))},text:function(t){return arguments.length?this.each(null==t?ma:("function"==typeof t?ba:ya)(t)):this.node().textContent},html:function(t){return arguments.length?this.each(null==t?Ea:("function"==typeof t?xa:_a)(t)):this.node().innerHTML},raise:function(){return this.each(wa)},lower:function(){return this.each(Oa)},append:function(t){var e="function"==typeof t?t:Ao(t);return this.select((function(){return this.appendChild(e.apply(this,arguments))}))},insert:function(t,e){var n="function"==typeof t?t:Ao(t),r=null==e?Ta:"function"==typeof e?e:Do(e);return this.select((function(){return this.insertBefore(n.apply(this,arguments),r.apply(this,arguments)||null)}))},remove:function(){return this.each(Sa)},clone:function(t){return this.select(t?Ca:Ma)},datum:function(t){return arguments.length?this.property("__data__",t):this.node().__data__},on:function(t,e,n){var r,i,o=Aa(t+""),a=o.length;if(!(arguments.length<2)){for(s=e?Da:La,r=0;r<a;++r)this.each(s(o[r],e,n));return this}var s=this.node().__on;if(s)for(var l,u=0,c=s.length;u<c;++u)for(r=0,l=s[u];r<a;++r)if((i=o[r]).type===l.type&&i.name===l.name)return l.value},dispatch:function(t,e){return this.each(("function"==typeof e?Ia:Ra)(t,e))},[Symbol.iterator]:function*(){for(var t=this._groups,e=0,n=t.length;e<n;++e)for(var r,i=t[e],o=0,a=i.length;o<a;++o)(r=i[o])&&(yield r)}};var Ha=function(t){return Si(t,5)},Ga=function(t){return t&&t.length?xo(t):[]};function za(t,e){var n,r,i=Ha(t),o=Object.keys(e.axes||{});for(var a in(null===(r=null===(n=e)||void 0===n?void 0:n.toolbar)||void 0===r?void 0:r.controls)&&delete i.toolbar.controls,0===o.length&&delete i.axes,i.axes)if(o.includes(a)){var s=e.axes[a];(s.primary||s.secondary)&&console.warn("`primary` & `secondary` are no longer needed for axis configurations. Read more here https://carbon-design-system.github.io/carbon-charts/?path=/story/docs-tutorials--tabular-data-format");var l=s.mapsTo;if(null==l){var u=s.scaleType;null==u?s.mapsTo="value":u===G.TIME?s.mapsTo="date":u===G.LABELS&&(s.mapsTo="key")}}else delete i.axes[a];return Ya(i,e),bo(i,e)}function ja(t){if(t){var e=t.getAttribute("transform").match(/translate\([0-9]+\.?[0-9]*,[0-9]+\.?[0-9]*\)/);if(!e)return null;if(e[0]){var n=e[0].replace(/translate\(/,"").replace(/\)/,"").split(",");return{tx:n[0],ty:n[1]}}return null}}function Fa(t){var e=/\(([^)]+)\)/.exec(t)[1].split(",");return{x:parseFloat(e[0]),y:parseFloat(e[1])}}function Wa(t,e,n){void 0===n&&(n="value");var r=t/e.reduce((function(t,e){return t+e[n]}),0)*100;return r%1!=0?parseFloat(r.toFixed(1)):r}function qa(t,e,n){return n>t.length?t:e===V.MID_LINE?t.substr(0,n/2)+"..."+t.substr(-n/2):e===V.FRONT_LINE?"..."+t.substr(-n):e===V.END_LINE?t.substr(0,n)+"...":void 0}function Ya(t,e){var n=Za(t,"legend","additionalItems"),r=Za(e,"legend","additionalItems");if(n&&r){var i=r.map((function(t){return t.type})),o=n.map((function(t){return t.type})),a=It.filter((function(t){return o.includes(t.type)&&!i.includes(t.type)}));t.legend.additionalItems=a,e.legend.additionalItems=wo(a,r,"name")}}var Za=function(t){for(var e=[],n=1;n<arguments.length;n++)e[n-1]=arguments[n];var r=t;if(r){for(var i=0,o=e;i<o.length;i++){var a=o[i];if(null===r[a]||void 0===r[a])return null;r=r[a]}return r}return null},Xa=function(t,e){return e===H.HORIZONTAL?{y0:t.x0,y1:t.x1,x0:t.y0,x1:t.y1}:t},$a=function(t,e){var n=Xa(t,e),r=n.x0,i=n.x1,o=n.y0,a=n.y1;return"M"+r+","+o+"L"+r+","+a+"L"+i+","+a+"L"+i+","+o+"L"+r+","+o};function Ka(t,e,n){return n===H.VERTICAL?[t,e]:[e,t]}var Qa="undefined"!=typeof globalThis?globalThis:"undefined"!=typeof window?window:"undefined"!=typeof global?global:"undefined"!=typeof self?self:{};function Ja(t){return t&&t.__esModule&&Object.prototype.hasOwnProperty.call(t,"default")?t.default:t}function ts(t,e){return t(e={exports:{}},e.exports),e.exports}var es=ts((function(t,e){Object.defineProperty(e,"__esModule",{value:!0}),e.default=function(t,e,r){var i;r=r||{},i="string"==typeof n[t]?n[t]:1===e?n[t].one:n[t].other.replace("{{count}}",e);if(r.addSuffix)return r.comparison>0?"in "+i:i+" ago";return i};var n={lessThanXSeconds:{one:"less than a second",other:"less than {{count}} seconds"},xSeconds:{one:"1 second",other:"{{count}} seconds"},halfAMinute:"half a minute",lessThanXMinutes:{one:"less than a minute",other:"less than {{count}} minutes"},xMinutes:{one:"1 minute",other:"{{count}} minutes"},aboutXHours:{one:"about 1 hour",other:"about {{count}} hours"},xHours:{one:"1 hour",other:"{{count}} hours"},xDays:{one:"1 day",other:"{{count}} days"},aboutXMonths:{one:"about 1 month",other:"about {{count}} months"},xMonths:{one:"1 month",other:"{{count}} months"},aboutXYears:{one:"about 1 year",other:"about {{count}} years"},xYears:{one:"1 year",other:"{{count}} years"},overXYears:{one:"over 1 year",other:"over {{count}} years"},almostXYears:{one:"almost 1 year",other:"almost {{count}} years"}};t.exports=e.default}));Ja(es);var ns=ts((function(t,e){Object.defineProperty(e,"__esModule",{value:!0}),e.default=function(t){return function(e){var n=e||{},r=n.width?String(n.width):t.defaultWidth;return t.formats[r]||t.formats[t.defaultWidth]}},t.exports=e.default}));Ja(ns);var rs=ts((function(t,e){Object.defineProperty(e,"__esModule",{value:!0}),e.default=void 0;var n,r=(n=ns)&&n.__esModule?n:{default:n};var i={date:(0,r.default)({formats:{full:"EEEE, MMMM do, y",long:"MMMM do, y",medium:"MMM d, y",short:"MM/dd/yyyy"},defaultWidth:"full"}),time:(0,r.default)({formats:{full:"h:mm:ss a zzzz",long:"h:mm:ss a z",medium:"h:mm:ss a",short:"h:mm a"},defaultWidth:"full"}),dateTime:(0,r.default)({formats:{full:"{{date}} 'at' {{time}}",long:"{{date}} 'at' {{time}}",medium:"{{date}}, {{time}}",short:"{{date}}, {{time}}"},defaultWidth:"full"})};e.default=i,t.exports=e.default}));Ja(rs);var is=ts((function(t,e){Object.defineProperty(e,"__esModule",{value:!0}),e.default=function(t,e,r,i){return n[t]};var n={lastWeek:"'last' eeee 'at' p",yesterday:"'yesterday at' p",today:"'today at' p",tomorrow:"'tomorrow at' p",nextWeek:"eeee 'at' p",other:"P"};t.exports=e.default}));Ja(is);var os=ts((function(t,e){Object.defineProperty(e,"__esModule",{value:!0}),e.default=function(t){return function(e,n){var r,i=n||{};if("formatting"===(i.context?String(i.context):"standalone")&&t.formattingValues){var o=t.defaultFormattingWidth||t.defaultWidth,a=i.width?String(i.width):o;r=t.formattingValues[a]||t.formattingValues[o]}else{var s=t.defaultWidth,l=i.width?String(i.width):t.defaultWidth;r=t.values[l]||t.values[s]}return r[t.argumentCallback?t.argumentCallback(e):e]}},t.exports=e.default}));Ja(os);var as=ts((function(t,e){Object.defineProperty(e,"__esModule",{value:!0}),e.default=void 0;var n,r=(n=os)&&n.__esModule?n:{default:n};var i={ordinalNumber:function(t,e){var n=Number(t),r=n%100;if(r>20||r<10)switch(r%10){case 1:return n+"st";case 2:return n+"nd";case 3:return n+"rd"}return n+"th"},era:(0,r.default)({values:{narrow:["B","A"],abbreviated:["BC","AD"],wide:["Before Christ","Anno Domini"]},defaultWidth:"wide"}),quarter:(0,r.default)({values:{narrow:["1","2","3","4"],abbreviated:["Q1","Q2","Q3","Q4"],wide:["1st quarter","2nd quarter","3rd quarter","4th quarter"]},defaultWidth:"wide",argumentCallback:function(t){return Number(t)-1}}),month:(0,r.default)({values:{narrow:["J","F","M","A","M","J","J","A","S","O","N","D"],abbreviated:["Jan","Feb","Mar","Apr","May","Jun","Jul","Aug","Sep","Oct","Nov","Dec"],wide:["January","February","March","April","May","June","July","August","September","October","November","December"]},defaultWidth:"wide"}),day:(0,r.default)({values:{narrow:["S","M","T","W","T","F","S"],short:["Su","Mo","Tu","We","Th","Fr","Sa"],abbreviated:["Sun","Mon","Tue","Wed","Thu","Fri","Sat"],wide:["Sunday","Monday","Tuesday","Wednesday","Thursday","Friday","Saturday"]},defaultWidth:"wide"}),dayPeriod:(0,r.default)({values:{narrow:{am:"a",pm:"p",midnight:"mi",noon:"n",morning:"morning",afternoon:"afternoon",evening:"evening",night:"night"},abbreviated:{am:"AM",pm:"PM",midnight:"midnight",noon:"noon",morning:"morning",afternoon:"afternoon",evening:"evening",night:"night"},wide:{am:"a.m.",pm:"p.m.",midnight:"midnight",noon:"noon",morning:"morning",afternoon:"afternoon",evening:"evening",night:"night"}},defaultWidth:"wide",formattingValues:{narrow:{am:"a",pm:"p",midnight:"mi",noon:"n",morning:"in the morning",afternoon:"in the afternoon",evening:"in the evening",night:"at night"},abbreviated:{am:"AM",pm:"PM",midnight:"midnight",noon:"noon",morning:"in the morning",afternoon:"in the afternoon",evening:"in the evening",night:"at night"},wide:{am:"a.m.",pm:"p.m.",midnight:"midnight",noon:"noon",morning:"in the morning",afternoon:"in the afternoon",evening:"in the evening",night:"at night"}},defaultFormattingWidth:"wide"})};e.default=i,t.exports=e.default}));Ja(as);var ss=ts((function(t,e){Object.defineProperty(e,"__esModule",{value:!0}),e.default=function(t){return function(e,n){var r=String(e),i=n||{},o=r.match(t.matchPattern);if(!o)return null;var a=o[0],s=r.match(t.parsePattern);if(!s)return null;var l=t.valueCallback?t.valueCallback(s[0]):s[0];return{value:l=i.valueCallback?i.valueCallback(l):l,rest:r.slice(a.length)}}},t.exports=e.default}));Ja(ss);var ls=ts((function(t,e){Object.defineProperty(e,"__esModule",{value:!0}),e.default=function(t){return function(e,n){var r=String(e),i=n||{},o=i.width,a=o&&t.matchPatterns[o]||t.matchPatterns[t.defaultMatchWidth],s=r.match(a);if(!s)return null;var l,u=s[0],c=o&&t.parsePatterns[o]||t.parsePatterns[t.defaultParseWidth];return l="[object Array]"===Object.prototype.toString.call(c)?function(t,e){for(var n=0;n<t.length;n++)if(e(t[n]))return n}(c,(function(t){return t.test(r)})):function(t,e){for(var n in t)if(t.hasOwnProperty(n)&&e(t[n]))return n}(c,(function(t){return t.test(r)})),l=t.valueCallback?t.valueCallback(l):l,{value:l=i.valueCallback?i.valueCallback(l):l,rest:r.slice(u.length)}}},t.exports=e.default}));Ja(ls);var us=ts((function(t,e){Object.defineProperty(e,"__esModule",{value:!0}),e.default=void 0;var n=i(ss),r=i(ls);function i(t){return t&&t.__esModule?t:{default:t}}var o={ordinalNumber:(0,n.default)({matchPattern:/^(\d+)(th|st|nd|rd)?/i,parsePattern:/\d+/i,valueCallback:function(t){return parseInt(t,10)}}),era:(0,r.default)({matchPatterns:{narrow:/^(b|a)/i,abbreviated:/^(b\.?\s?c\.?|b\.?\s?c\.?\s?e\.?|a\.?\s?d\.?|c\.?\s?e\.?)/i,wide:/^(before christ|before common era|anno domini|common era)/i},defaultMatchWidth:"wide",parsePatterns:{any:[/^b/i,/^(a|c)/i]},defaultParseWidth:"any"}),quarter:(0,r.default)({matchPatterns:{narrow:/^[1234]/i,abbreviated:/^q[1234]/i,wide:/^[1234](th|st|nd|rd)? quarter/i},defaultMatchWidth:"wide",parsePatterns:{any:[/1/i,/2/i,/3/i,/4/i]},defaultParseWidth:"any",valueCallback:function(t){return t+1}}),month:(0,r.default)({matchPatterns:{narrow:/^[jfmasond]/i,abbreviated:/^(jan|feb|mar|apr|may|jun|jul|aug|sep|oct|nov|dec)/i,wide:/^(january|february|march|april|may|june|july|august|september|october|november|december)/i},defaultMatchWidth:"wide",parsePatterns:{narrow:[/^j/i,/^f/i,/^m/i,/^a/i,/^m/i,/^j/i,/^j/i,/^a/i,/^s/i,/^o/i,/^n/i,/^d/i],any:[/^ja/i,/^f/i,/^mar/i,/^ap/i,/^may/i,/^jun/i,/^jul/i,/^au/i,/^s/i,/^o/i,/^n/i,/^d/i]},defaultParseWidth:"any"}),day:(0,r.default)({matchPatterns:{narrow:/^[smtwf]/i,short:/^(su|mo|tu|we|th|fr|sa)/i,abbreviated:/^(sun|mon|tue|wed|thu|fri|sat)/i,wide:/^(sunday|monday|tuesday|wednesday|thursday|friday|saturday)/i},defaultMatchWidth:"wide",parsePatterns:{narrow:[/^s/i,/^m/i,/^t/i,/^w/i,/^t/i,/^f/i,/^s/i],any:[/^su/i,/^m/i,/^tu/i,/^w/i,/^th/i,/^f/i,/^sa/i]},defaultParseWidth:"any"}),dayPeriod:(0,r.default)({matchPatterns:{narrow:/^(a|p|mi|n|(in the|at) (morning|afternoon|evening|night))/i,any:/^([ap]\.?\s?m\.?|midnight|noon|(in the|at) (morning|afternoon|evening|night))/i},defaultMatchWidth:"any",parsePatterns:{any:{am:/^a/i,pm:/^p/i,midnight:/^mi/i,noon:/^no/i,morning:/morning/i,afternoon:/afternoon/i,evening:/evening/i,night:/night/i}},defaultParseWidth:"any"})};e.default=o,t.exports=e.default}));Ja(us);var cs=Ja(ts((function(t,e){Object.defineProperty(e,"__esModule",{value:!0}),e.default=void 0;var n=s(es),r=s(rs),i=s(is),o=s(as),a=s(us);function s(t){return t&&t.__esModule?t:{default:t}}var l={code:"en-US",formatDistance:n.default,formatLong:r.default,formatRelative:i.default,localize:o.default,match:a.default,options:{weekStartsOn:0,firstWeekContainsDate:1}};e.default=l,t.exports=e.default}))),hs={type:V.END_LINE,threshold:16,numCharacter:14},ds={enabled:!0,position:z.BOTTOM,clickable:!0,truncation:hs,alignment:j.LEFT,order:null,additionalItems:[]},fs={x:{enabled:!0,numberOfTicks:15,alignWithAxisTicks:!1},y:{enabled:!0,numberOfTicks:5,alignWithAxisTicks:!1}},ps={enabled:!0},gs={enabled:!0,showTotal:!0,truncation:hs,groupLabel:"Group"},vs={top:{visible:!0,includeZero:!0,truncation:hs},bottom:{visible:!0,includeZero:!0,truncation:hs},left:{visible:!0,includeZero:!0,truncation:hs},right:{visible:!0,includeZero:!0,truncation:hs}},ms={addSpaceOnEdges:1,showDayName:!1,localeObject:cs,timeIntervalFormats:{"15seconds":{primary:"MMM d, pp",secondary:"pp"},minute:{primary:"MMM d, p",secondary:"p"},"30minutes":{primary:"MMM d, p",secondary:"p"},hourly:{primary:"MMM d, hh a",secondary:"hh a"},daily:{primary:"MMM d",secondary:"d"},weekly:{primary:"eee, MMM d",secondary:"eee"},monthly:{primary:"MMM yyyy",secondary:"MMM"},quarterly:{primary:"QQQ ''yy",secondary:"QQQ"},yearly:{primary:"yyyy",secondary:"yyyy"}}},ys="undefined"!=typeof document&&(document.fullscreenEnabled||document.webkitFullscreenEnabled||document.mozFullScreenEnabled||document.msFullscreenEnabled),bs={width:null,height:null,resizable:!0,theme:P.WHITE,tooltip:gs,legend:ds,style:{prefix:"cc"},data:{groupMapsTo:"group",loading:!1,selectedGroups:[]},color:{scale:null,pairing:{numberOfVariants:null,option:1},gradient:{enabled:!1}},toolbar:{enabled:!0,numberOfIcons:3,controls:R([{type:it.SHOW_AS_DATATABLE}],ys?[{type:it.MAKE_FULLSCREEN}]:[],[{type:it.EXPORT_CSV},{type:it.EXPORT_PNG},{type:it.EXPORT_JPG}])}},Es=bo({},bs,{thematic:{projection:ct.geoNaturalEarth1}}),_s=bo({},bs,{axes:vs,timeScale:ms,grid:fs,ruler:ps,zoomBar:{zoomRatio:.4,minZoomRatio:.01,top:{enabled:!1,type:B.GRAPH_VIEW}}}),xs=bo({},_s,{bars:{maxWidth:16,spacingFactor:.25},timeScale:bo(ms,{addSpaceOnEdges:1})}),ws=bo({},xs,{}),Os=bo({},xs,{}),Ts=bo({},xs,{bars:bo({},xs.bars,{dividerSize:1.5})}),Ss=bo({},xs,{}),Ms=bo({},_s,{points:{radius:4,fillOpacity:.3,filled:!0,enabled:!0}}),Cs=Ms,As=bo({},Ms,{points:{radius:3,filled:!1,enabled:!0}}),Ls=bo({},As,{timeScale:bo(ms,{addSpaceOnEdges:0})}),Ds=Ls,ks=bo({},_s,{bubble:{radiusMapsTo:"radius",radiusLabel:"Radius",radiusRange:function(t,e){var n=Math.min(t.width,t.height);return[3*n/400,25*n/400]},fillOpacity:.2,enabled:!0},points:{filled:!0},legend:{additionalItems:[{type:at.RADIUS,name:"Radius"}]}}),Rs=bo({},_s,{bullet:{performanceAreaTitles:["Poor","Satisfactory","Great"]},grid:{x:{enabled:!1},y:{enabled:!1}},legend:{additionalItems:[{type:at.AREA,name:"Poor area"},{type:at.AREA,name:"Satisfactory area"},{type:at.AREA,name:"Great area"},{type:at.QUARTILE,name:"Quartiles"}]}}),Is=bo({},xs,{bars:{dividerSize:1.5},timeScale:bo(ms,{addSpaceOnEdges:0})}),Ps=bo({},bs,{tooltip:bo({},gs,{wordLabel:"Word",valueLabel:"Value"}),wordCloud:{fontSizeMapsTo:"value",fontSizeRange:function(t,e){var n=Math.min(t.width,t.height);return[20*n/400,75*n/400]},wordMapsTo:"word"}}),Ns=bo({},bs,{pie:{labels:{formatter:null,enabled:!0},alignment:j.LEFT,sortFunction:null,valueMapsTo:"value"}}),Us=bo({},bs,{legend:{enabled:!1},gauge:{type:J.SEMI,arcWidth:16,deltaArrow:{size:function(t){return t/8},enabled:!0},showPercentageSymbol:!0,status:null,numberSpacing:10,deltaFontSize:function(t){return t/8},valueFontSize:function(t){return t/2.5},numberFormatter:function(t){return t.toFixed(2)%1!=0?t.toFixed(2).toLocaleString():t.toFixed().toLocaleString()},alignment:j.LEFT}}),Bs=bo({},Ns,{donut:{center:{numberFontSize:function(t){return Math.min(t/100*24,24)+"px"},titleFontSize:function(t){return Math.min(t/100*15,15)+"px"},titleYPosition:function(t){return Math.min(t/80*20,20)},numberFormatter:function(t){return Math.floor(t).toLocaleString()}},alignment:j.LEFT}}),Vs=bo({},bs,{legend:{enabled:!1,clickable:!1},meter:{showLabels:!0,proportional:null,statusBar:{percentageIndicator:{enabled:!0}}}}),Hs={chart:bs,axisChart:_s,thematicChart:Es,simpleBarChart:ws,groupedBarChart:Os,stackedBarChart:Ts,boxplotChart:Ss,bubbleChart:ks,bulletChart:Rs,histogramChart:Is,lineChart:As,areaChart:Ls,stackedAreaChart:Ds,scatterChart:Ms,lollipopChart:Cs,pieChart:Ns,donutChart:Bs,meterChart:Vs,proportionalMeterChart:bo({},Vs,{legend:{enabled:!0}}),radarChart:bo({},bs,{radar:{axes:{angle:"key",value:"value"},alignment:j.LEFT},tooltip:{gridline:{enabled:!0},valueFormatter:function(t){return null!=t?t:"N/A"}}}),gaugeChart:Us,comboChart:bo({},xs,{comboChartTypes:[]}),treeChart:bo({tree:{type:W.TREE}},bs,{}),treemapChart:bo({},bs,{data:bo(bs.data,{groupMapsTo:"name"})}),circlePackChart:bo({},bs,bt,{data:bo(bs.data,{groupMapsTo:"name"})}),wordCloudChart:Ps,alluvialChart:bo({},bs,{alluvial:{data:bo(bs.data,{groupMapsTo:"source"}),nodeAlignment:j.CENTER,nodePadding:24,monochrome:!1,nodes:[]}}),heatmapChart:bo({},bs,{axes:vs,heatmap:{divider:{state:lt.AUTO},colorLegend:{type:"linear"}}}),choroplethChart:bo({},Es,{choropleth:{colorLegend:{type:"linear"}}})},Gs=Object.freeze({__proto__:null,grid:fs,ruler:ps,baseTooltip:gs,timeScale:ms,options:Hs,carbonPrefix:"cds",area:vt,axis:mt,canvasZoomSettings:yt,circlePack:bt,color:Et,boxplot:_t,histogram:xt,legend:wt,lines:Ot,meter:Tt,pie:St,radar:Mt,alluvial:Ct,heatmap:At,spacers:Lt,tooltips:Dt,transitions:kt,toolbar:{buttonSize:32,iconSize:20,height:32,spacerHeight:10,iconPadding:6},zoomBar:Rt,defaultLegendAdditionalItems:It});function zs(t,e){return null==t||null==e?NaN:t<e?-1:t>e?1:t>=e?0:NaN}function js(t,e){return null==t||null==e?NaN:e<t?-1:e>t?1:e>=t?0:NaN}function Fs(t){let e,n,r;function i(t,r,i=0,o=t.length){if(i<o){if(0!==e(r,r))return o;do{const e=i+o>>>1;n(t[e],r)<0?i=e+1:o=e}while(i<o)}return i}return 2!==t.length?(e=zs,n=(e,n)=>zs(t(e),n),r=(e,n)=>t(e)-n):(e=t===zs||t===js?t:Ws,n=t,r=t),{left:i,center:function(t,e,n=0,o=t.length){const a=i(t,e,n,o-1);return a>n&&r(t[a-1],e)>-r(t[a],e)?a-1:a},right:function(t,r,i=0,o=t.length){if(i<o){if(0!==e(r,r))return o;do{const e=i+o>>>1;n(t[e],r)<=0?i=e+1:o=e}while(i<o)}return i}}}function Ws(){return 0}const qs=Fs(zs).right;Fs((function(t){return null===t?NaN:+t})).center;function Ys(t,e){let n,r;if(void 0===e)for(const e of t)null!=e&&(void 0===n?e>=e&&(n=r=e):(n>e&&(n=e),r<e&&(r=e)));else{let i=-1;for(let o of t)null!=(o=e(o,++i,t))&&(void 0===n?o>=o&&(n=r=o):(n>o&&(n=o),r<o&&(r=o)))}return[n,r]}class Zs{constructor(){this._partials=new Float64Array(32),this._n=0}add(t){const e=this._partials;let n=0;for(let r=0;r<this._n&&r<32;r++){const i=e[r],o=t+i,a=Math.abs(t)<Math.abs(i)?t-(o-i):i-(o-t);a&&(e[n++]=a),t=o}return e[n]=t,this._n=n+1,this}valueOf(){const t=this._partials;let e,n,r,i=this._n,o=0;if(i>0){for(o=t[--i];i>0&&(e=o,n=t[--i],o=e+n,r=n-(o-e),!r););i>0&&(r<0&&t[i-1]<0||r>0&&t[i-1]>0)&&(n=2*r,e=o+n,n==e-o&&(o=e))}return o}}class Xs extends Map{constructor(t,e=Ks){if(super(),Object.defineProperties(this,{_intern:{value:new Map},_key:{value:e}}),null!=t)for(const[e,n]of t)this.set(e,n)}get(t){return super.get($s(this,t))}has(t){return super.has($s(this,t))}set(t,e){return super.set(function({_intern:t,_key:e},n){const r=e(n);return t.has(r)?t.get(r):(t.set(r,n),n)}(this,t),e)}delete(t){return super.delete(function({_intern:t,_key:e},n){const r=e(n);t.has(r)&&(n=t.get(r),t.delete(r));return n}(this,t))}}function $s({_intern:t,_key:e},n){const r=e(n);return t.has(r)?t.get(r):n}function Ks(t){return null!==t&&"object"==typeof t?t.valueOf():t}function Qs(t){return t}function Js(t,e){return(null==t||!(t>=t))-(null==e||!(e>=e))||(t<e?-1:t>e?1:0)}var tl=Array.prototype.slice;function el(t){return()=>t}const nl=Math.sqrt(50),rl=Math.sqrt(10),il=Math.sqrt(2);function ol(t,e,n){const r=(e-t)/Math.max(0,n),i=Math.floor(Math.log10(r)),o=r/Math.pow(10,i),a=o>=nl?10:o>=rl?5:o>=il?2:1;let s,l,u;return i<0?(u=Math.pow(10,-i)/a,s=Math.round(t*u),l=Math.round(e*u),s/u<t&&++s,l/u>e&&--l,u=-u):(u=Math.pow(10,i)*a,s=Math.round(t/u),l=Math.round(e/u),s*u<t&&++s,l*u>e&&--l),l<s&&.5<=n&&n<2?ol(t,e,2*n):[s,l,u]}function al(t,e,n){if(!((n=+n)>0))return[];if((t=+t)===(e=+e))return[t];const r=e<t,[i,o,a]=r?ol(e,t,n):ol(t,e,n);if(!(o>=i))return[];const s=o-i+1,l=new Array(s);if(r)if(a<0)for(let t=0;t<s;++t)l[t]=(o-t)/-a;else for(let t=0;t<s;++t)l[t]=(o-t)*a;else if(a<0)for(let t=0;t<s;++t)l[t]=(i+t)/-a;else for(let t=0;t<s;++t)l[t]=(i+t)*a;return l}function sl(t,e,n){return ol(t=+t,e=+e,n=+n)[2]}function ll(t,e,n){n=+n;const r=(e=+e)<(t=+t),i=r?sl(e,t,n):sl(t,e,n);return(r?-1:1)*(i<0?1/-i:i)}function ul(t){return Math.max(1,Math.ceil(Math.log(function(t,e){let n=0;if(void 0===e)for(let e of t)null!=e&&(e=+e)>=e&&++n;else{let r=-1;for(let i of t)null!=(i=e(i,++r,t))&&(i=+i)>=i&&++n}return n}(t))/Math.LN2)+1)}function cl(){var t=Qs,e=Ys,n=ul;function r(r){Array.isArray(r)||(r=Array.from(r));var i,o,a,s=r.length,l=new Array(s);for(i=0;i<s;++i)l[i]=t(r[i],i,r);var u=e(l),c=u[0],h=u[1],d=n(l,c,h);if(!Array.isArray(d)){const t=h,n=+d;if(e===Ys&&([c,h]=function(t,e,n){let r;for(;;){const i=sl(t,e,n);if(i===r||0===i||!isFinite(i))return[t,e];i>0?(t=Math.floor(t/i)*i,e=Math.ceil(e/i)*i):i<0&&(t=Math.ceil(t*i)/i,e=Math.floor(e*i)/i),r=i}}(c,h,n)),(d=al(c,h,n))[0]<=c&&(a=sl(c,h,n)),d[d.length-1]>=h)if(t>=h&&e===Ys){const t=sl(c,h,n);isFinite(t)&&(t>0?h=(Math.floor(h/t)+1)*t:t<0&&(h=(Math.ceil(h*-t)+1)/-t))}else d.pop()}for(var f=d.length,p=0,g=f;d[p]<=c;)++p;for(;d[g-1]>h;)--g;(p||g<f)&&(d=d.slice(p,g),f=g-p);var v,m=new Array(f+1);for(i=0;i<=f;++i)(v=m[i]=[]).x0=i>0?d[i-1]:c,v.x1=i<f?d[i]:h;if(isFinite(a)){if(a>0)for(i=0;i<s;++i)null!=(o=l[i])&&c<=o&&o<=h&&m[Math.min(f,Math.floor((o-c)/a))].push(r[i]);else if(a<0)for(i=0;i<s;++i)if(null!=(o=l[i])&&c<=o&&o<=h){const t=Math.floor((c-o)*a);m[Math.min(f,t+(d[t]<=o))].push(r[i])}}else for(i=0;i<s;++i)null!=(o=l[i])&&c<=o&&o<=h&&m[qs(d,o,0,f)].push(r[i]);return m}return r.value=function(e){return arguments.length?(t="function"==typeof e?e:el(e),r):t},r.domain=function(t){return arguments.length?(e="function"==typeof t?t:el([t[0],t[1]]),r):e},r.thresholds=function(t){return arguments.length?(n="function"==typeof t?t:el(Array.isArray(t)?tl.call(t):t),r):n},r}function hl(t,e){let n;if(void 0===e)for(const e of t)null!=e&&(n<e||void 0===n&&e>=e)&&(n=e);else{let r=-1;for(let i of t)null!=(i=e(i,++r,t))&&(n<i||void 0===n&&i>=i)&&(n=i)}return n}function dl(t,e){let n;if(void 0===e)for(const e of t)null!=e&&(n>e||void 0===n&&e>=e)&&(n=e);else{let r=-1;for(let i of t)null!=(i=e(i,++r,t))&&(n>i||void 0===n&&i>=i)&&(n=i)}return n}function fl(t,e,n=0,r=1/0,i){if(e=Math.floor(e),n=Math.floor(Math.max(0,n)),r=Math.floor(Math.min(t.length-1,r)),!(n<=e&&e<=r))return t;for(i=void 0===i?Js:function(t=zs){if(t===zs)return Js;if("function"!=typeof t)throw new TypeError("compare is not a function");return(e,n)=>{const r=t(e,n);return r||0===r?r:(0===t(n,n))-(0===t(e,e))}}(i);r>n;){if(r-n>600){const o=r-n+1,a=e-n+1,s=Math.log(o),l=.5*Math.exp(2*s/3),u=.5*Math.sqrt(s*l*(o-l)/o)*(a-o/2<0?-1:1);fl(t,e,Math.max(n,Math.floor(e-a*l/o+u)),Math.min(r,Math.floor(e+(o-a)*l/o+u)),i)}const o=t[e];let a=n,s=r;for(pl(t,n,e),i(t[r],o)>0&&pl(t,n,r);a<s;){for(pl(t,a,s),++a,--s;i(t[a],o)<0;)++a;for(;i(t[s],o)>0;)--s}0===i(t[n],o)?pl(t,n,s):(++s,pl(t,s,r)),s<=e&&(n=s+1),e<=s&&(r=s-1)}return t}function pl(t,e,n){const r=t[e];t[e]=t[n],t[n]=r}function gl(t,e,n){if((r=(t=Float64Array.from(function*(t,e){if(void 0===e)for(let e of t)null!=e&&(e=+e)>=e&&(yield e);else{let n=-1;for(let r of t)null!=(r=e(r,++n,t))&&(r=+r)>=r&&(yield r)}}(t,n))).length)&&!isNaN(e=+e)){if(e<=0||r<2)return dl(t);if(e>=1)return hl(t);var r,i=(r-1)*e,o=Math.floor(i),a=hl(fl(t,o).subarray(0,o+1));return a+(dl(t.subarray(o+1))-a)*(i-o)}}function vl(t){return Array.from(function*(t){for(const e of t)yield*e}(t))}function ml(t,e,n){t=+t,e=+e,n=(i=arguments.length)<2?(e=t,t=0,1):i<3?1:+n;for(var r=-1,i=0|Math.max(0,Math.ceil((e-t)/n)),o=new Array(i);++r<i;)o[r]=t+r*n;return o}function yl(t,e){switch(arguments.length){case 0:break;case 1:this.range(t);break;default:this.range(e).domain(t)}return this}const bl=Symbol("implicit");function El(){var t=new Xs,e=[],n=[],r=bl;function i(i){let o=t.get(i);if(void 0===o){if(r!==bl)return r;t.set(i,o=e.push(i)-1)}return n[o%n.length]}return i.domain=function(n){if(!arguments.length)return e.slice();e=[],t=new Xs;for(const r of n)t.has(r)||t.set(r,e.push(r)-1);return i},i.range=function(t){return arguments.length?(n=Array.from(t),i):n.slice()},i.unknown=function(t){return arguments.length?(r=t,i):r},i.copy=function(){return El(e,n).unknown(r)},yl.apply(i,arguments),i}function _l(){var t,e,n=El().unknown(void 0),r=n.domain,i=n.range,o=0,a=1,s=!1,l=0,u=0,c=.5;function h(){var n=r().length,h=a<o,d=h?a:o,f=h?o:a;t=(f-d)/Math.max(1,n-l+2*u),s&&(t=Math.floor(t)),d+=(f-d-t*(n-l))*c,e=t*(1-l),s&&(d=Math.round(d),e=Math.round(e));var p=ml(n).map((function(e){return d+t*e}));return i(h?p.reverse():p)}return delete n.unknown,n.domain=function(t){return arguments.length?(r(t),h()):r()},n.range=function(t){return arguments.length?([o,a]=t,o=+o,a=+a,h()):[o,a]},n.rangeRound=function(t){return[o,a]=t,o=+o,a=+a,s=!0,h()},n.bandwidth=function(){return e},n.step=function(){return t},n.round=function(t){return arguments.length?(s=!!t,h()):s},n.padding=function(t){return arguments.length?(l=Math.min(1,u=+t),h()):l},n.paddingInner=function(t){return arguments.length?(l=Math.min(1,t),h()):l},n.paddingOuter=function(t){return arguments.length?(u=+t,h()):u},n.align=function(t){return arguments.length?(c=Math.max(0,Math.min(1,t)),h()):c},n.copy=function(){return _l(r(),[o,a]).round(s).paddingInner(l).paddingOuter(u).align(c)},yl.apply(h(),arguments)}function xl(t,e,n){t.prototype=e.prototype=n,n.constructor=t}function wl(t,e){var n=Object.create(t.prototype);for(var r in e)n[r]=e[r];return n}function Ol(){}var Tl="\\s*([+-]?\\d+)\\s*",Sl="\\s*([+-]?(?:\\d*\\.)?\\d+(?:[eE][+-]?\\d+)?)\\s*",Ml="\\s*([+-]?(?:\\d*\\.)?\\d+(?:[eE][+-]?\\d+)?)%\\s*",Cl=/^#([0-9a-f]{3,8})$/,Al=new RegExp(`^rgb\\(${Tl},${Tl},${Tl}\\)$`),Ll=new RegExp(`^rgb\\(${Ml},${Ml},${Ml}\\)$`),Dl=new RegExp(`^rgba\\(${Tl},${Tl},${Tl},${Sl}\\)$`),kl=new RegExp(`^rgba\\(${Ml},${Ml},${Ml},${Sl}\\)$`),Rl=new RegExp(`^hsl\\(${Sl},${Ml},${Ml}\\)$`),Il=new RegExp(`^hsla\\(${Sl},${Ml},${Ml},${Sl}\\)$`),Pl={aliceblue:15792383,antiquewhite:16444375,aqua:65535,aquamarine:8388564,azure:15794175,beige:16119260,bisque:16770244,black:0,blanchedalmond:16772045,blue:255,blueviolet:9055202,brown:10824234,burlywood:14596231,cadetblue:6266528,chartreuse:8388352,chocolate:13789470,coral:16744272,cornflowerblue:6591981,cornsilk:16775388,crimson:14423100,cyan:65535,darkblue:139,darkcyan:35723,darkgoldenrod:12092939,darkgray:11119017,darkgreen:25600,darkgrey:11119017,darkkhaki:12433259,darkmagenta:9109643,darkolivegreen:5597999,darkorange:16747520,darkorchid:10040012,darkred:9109504,darksalmon:15308410,darkseagreen:9419919,darkslateblue:4734347,darkslategray:3100495,darkslategrey:3100495,darkturquoise:52945,darkviolet:9699539,deeppink:16716947,deepskyblue:49151,dimgray:6908265,dimgrey:6908265,dodgerblue:2003199,firebrick:11674146,floralwhite:16775920,forestgreen:2263842,fuchsia:16711935,gainsboro:14474460,ghostwhite:16316671,gold:16766720,goldenrod:14329120,gray:8421504,green:32768,greenyellow:11403055,grey:8421504,honeydew:15794160,hotpink:16738740,indianred:13458524,indigo:4915330,ivory:16777200,khaki:15787660,lavender:15132410,lavenderblush:16773365,lawngreen:8190976,lemonchiffon:16775885,lightblue:11393254,lightcoral:15761536,lightcyan:14745599,lightgoldenrodyellow:16448210,lightgray:13882323,lightgreen:9498256,lightgrey:13882323,lightpink:16758465,lightsalmon:16752762,lightseagreen:2142890,lightskyblue:8900346,lightslategray:7833753,lightslategrey:7833753,lightsteelblue:11584734,lightyellow:16777184,lime:65280,limegreen:3329330,linen:16445670,magenta:16711935,maroon:8388608,mediumaquamarine:6737322,mediumblue:205,mediumorchid:12211667,mediumpurple:9662683,mediumseagreen:3978097,mediumslateblue:8087790,mediumspringgreen:64154,mediumturquoise:4772300,mediumvioletred:13047173,midnightblue:1644912,mintcream:16121850,mistyrose:16770273,moccasin:16770229,navajowhite:16768685,navy:128,oldlace:16643558,olive:8421376,olivedrab:7048739,orange:16753920,orangered:16729344,orchid:14315734,palegoldenrod:15657130,palegreen:10025880,paleturquoise:11529966,palevioletred:14381203,papayawhip:16773077,peachpuff:16767673,peru:13468991,pink:16761035,plum:14524637,powderblue:11591910,purple:8388736,rebeccapurple:6697881,red:16711680,rosybrown:12357519,royalblue:4286945,saddlebrown:9127187,salmon:16416882,sandybrown:16032864,seagreen:3050327,seashell:16774638,sienna:10506797,silver:12632256,skyblue:8900331,slateblue:6970061,slategray:7372944,slategrey:7372944,snow:16775930,springgreen:65407,steelblue:4620980,tan:13808780,teal:32896,thistle:14204888,tomato:16737095,turquoise:4251856,violet:15631086,wheat:16113331,white:16777215,whitesmoke:16119285,yellow:16776960,yellowgreen:10145074};function Nl(){return this.rgb().formatHex()}function Ul(){return this.rgb().formatRgb()}function Bl(t){var e,n;return t=(t+"").trim().toLowerCase(),(e=Cl.exec(t))?(n=e[1].length,e=parseInt(e[1],16),6===n?Vl(e):3===n?new jl(e>>8&15|e>>4&240,e>>4&15|240&e,(15&e)<<4|15&e,1):8===n?Hl(e>>24&255,e>>16&255,e>>8&255,(255&e)/255):4===n?Hl(e>>12&15|e>>8&240,e>>8&15|e>>4&240,e>>4&15|240&e,((15&e)<<4|15&e)/255):null):(e=Al.exec(t))?new jl(e[1],e[2],e[3],1):(e=Ll.exec(t))?new jl(255*e[1]/100,255*e[2]/100,255*e[3]/100,1):(e=Dl.exec(t))?Hl(e[1],e[2],e[3],e[4]):(e=kl.exec(t))?Hl(255*e[1]/100,255*e[2]/100,255*e[3]/100,e[4]):(e=Rl.exec(t))?Xl(e[1],e[2]/100,e[3]/100,1):(e=Il.exec(t))?Xl(e[1],e[2]/100,e[3]/100,e[4]):Pl.hasOwnProperty(t)?Vl(Pl[t]):"transparent"===t?new jl(NaN,NaN,NaN,0):null}function Vl(t){return new jl(t>>16&255,t>>8&255,255&t,1)}function Hl(t,e,n,r){return r<=0&&(t=e=n=NaN),new jl(t,e,n,r)}function Gl(t){return t instanceof Ol||(t=Bl(t)),t?new jl((t=t.rgb()).r,t.g,t.b,t.opacity):new jl}function zl(t,e,n,r){return 1===arguments.length?Gl(t):new jl(t,e,n,null==r?1:r)}function jl(t,e,n,r){this.r=+t,this.g=+e,this.b=+n,this.opacity=+r}function Fl(){return`#${Zl(this.r)}${Zl(this.g)}${Zl(this.b)}`}function Wl(){const t=ql(this.opacity);return`${1===t?"rgb(":"rgba("}${Yl(this.r)}, ${Yl(this.g)}, ${Yl(this.b)}${1===t?")":`, ${t})`}`}function ql(t){return isNaN(t)?1:Math.max(0,Math.min(1,t))}function Yl(t){return Math.max(0,Math.min(255,Math.round(t)||0))}function Zl(t){return((t=Yl(t))<16?"0":"")+t.toString(16)}function Xl(t,e,n,r){return r<=0?t=e=n=NaN:n<=0||n>=1?t=e=NaN:e<=0&&(t=NaN),new Ql(t,e,n,r)}function $l(t){if(t instanceof Ql)return new Ql(t.h,t.s,t.l,t.opacity);if(t instanceof Ol||(t=Bl(t)),!t)return new Ql;if(t instanceof Ql)return t;var e=(t=t.rgb()).r/255,n=t.g/255,r=t.b/255,i=Math.min(e,n,r),o=Math.max(e,n,r),a=NaN,s=o-i,l=(o+i)/2;return s?(a=e===o?(n-r)/s+6*(n<r):n===o?(r-e)/s+2:(e-n)/s+4,s/=l<.5?o+i:2-o-i,a*=60):s=l>0&&l<1?0:a,new Ql(a,s,l,t.opacity)}function Kl(t,e,n,r){return 1===arguments.length?$l(t):new Ql(t,e,n,null==r?1:r)}function Ql(t,e,n,r){this.h=+t,this.s=+e,this.l=+n,this.opacity=+r}function Jl(t){return(t=(t||0)%360)<0?t+360:t}function tu(t){return Math.max(0,Math.min(1,t||0))}function eu(t,e,n){return 255*(t<60?e+(n-e)*t/60:t<180?n:t<240?e+(n-e)*(240-t)/60:e)}xl(Ol,Bl,{copy(t){return Object.assign(new this.constructor,this,t)},displayable(){return this.rgb().displayable()},hex:Nl,formatHex:Nl,formatHex8:function(){return this.rgb().formatHex8()},formatHsl:function(){return $l(this).formatHsl()},formatRgb:Ul,toString:Ul}),xl(jl,zl,wl(Ol,{brighter(t){return t=null==t?1/.7:Math.pow(1/.7,t),new jl(this.r*t,this.g*t,this.b*t,this.opacity)},darker(t){return t=null==t?.7:Math.pow(.7,t),new jl(this.r*t,this.g*t,this.b*t,this.opacity)},rgb(){return this},clamp(){return new jl(Yl(this.r),Yl(this.g),Yl(this.b),ql(this.opacity))},displayable(){return-.5<=this.r&&this.r<255.5&&-.5<=this.g&&this.g<255.5&&-.5<=this.b&&this.b<255.5&&0<=this.opacity&&this.opacity<=1},hex:Fl,formatHex:Fl,formatHex8:function(){return`#${Zl(this.r)}${Zl(this.g)}${Zl(this.b)}${Zl(255*(isNaN(this.opacity)?1:this.opacity))}`},formatRgb:Wl,toString:Wl})),xl(Ql,Kl,wl(Ol,{brighter(t){return t=null==t?1/.7:Math.pow(1/.7,t),new Ql(this.h,this.s,this.l*t,this.opacity)},darker(t){return t=null==t?.7:Math.pow(.7,t),new Ql(this.h,this.s,this.l*t,this.opacity)},rgb(){var t=this.h%360+360*(this.h<0),e=isNaN(t)||isNaN(this.s)?0:this.s,n=this.l,r=n+(n<.5?n:1-n)*e,i=2*n-r;return new jl(eu(t>=240?t-240:t+120,i,r),eu(t,i,r),eu(t<120?t+240:t-120,i,r),this.opacity)},clamp(){return new Ql(Jl(this.h),tu(this.s),tu(this.l),ql(this.opacity))},displayable(){return(0<=this.s&&this.s<=1||isNaN(this.s))&&0<=this.l&&this.l<=1&&0<=this.opacity&&this.opacity<=1},formatHsl(){const t=ql(this.opacity);return`${1===t?"hsl(":"hsla("}${Jl(this.h)}, ${100*tu(this.s)}%, ${100*tu(this.l)}%${1===t?")":`, ${t})`}`}}));var nu=t=>()=>t;function ru(t){return 1==(t=+t)?iu:function(e,n){return n-e?function(t,e,n){return t=Math.pow(t,n),e=Math.pow(e,n)-t,n=1/n,function(r){return Math.pow(t+r*e,n)}}(e,n,t):nu(isNaN(e)?n:e)}}function iu(t,e){var n=e-t;return n?function(t,e){return function(n){return t+n*e}}(t,n):nu(isNaN(t)?e:t)}var ou=function t(e){var n=ru(e);function r(t,e){var r=n((t=zl(t)).r,(e=zl(e)).r),i=n(t.g,e.g),o=n(t.b,e.b),a=iu(t.opacity,e.opacity);return function(e){return t.r=r(e),t.g=i(e),t.b=o(e),t.opacity=a(e),t+""}}return r.gamma=t,r}(1);function au(t,e){e||(e=[]);var n,r=t?Math.min(e.length,t.length):0,i=e.slice();return function(o){for(n=0;n<r;++n)i[n]=t[n]*(1-o)+e[n]*o;return i}}function su(t,e){var n,r=e?e.length:0,i=t?Math.min(r,t.length):0,o=new Array(i),a=new Array(r);for(n=0;n<i;++n)o[n]=pu(t[n],e[n]);for(;n<r;++n)a[n]=e[n];return function(t){for(n=0;n<i;++n)a[n]=o[n](t);return a}}function lu(t,e){var n=new Date;return t=+t,e=+e,function(r){return n.setTime(t*(1-r)+e*r),n}}function uu(t,e){return t=+t,e=+e,function(n){return t*(1-n)+e*n}}function cu(t,e){var n,r={},i={};for(n in null!==t&&"object"==typeof t||(t={}),null!==e&&"object"==typeof e||(e={}),e)n in t?r[n]=pu(t[n],e[n]):i[n]=e[n];return function(t){for(n in r)i[n]=r[n](t);return i}}var hu=/[-+]?(?:\d+\.?\d*|\.?\d+)(?:[eE][-+]?\d+)?/g,du=new RegExp(hu.source,"g");function fu(t,e){var n,r,i,o=hu.lastIndex=du.lastIndex=0,a=-1,s=[],l=[];for(t+="",e+="";(n=hu.exec(t))&&(r=du.exec(e));)(i=r.index)>o&&(i=e.slice(o,i),s[a]?s[a]+=i:s[++a]=i),(n=n[0])===(r=r[0])?s[a]?s[a]+=r:s[++a]=r:(s[++a]=null,l.push({i:a,x:uu(n,r)})),o=du.lastIndex;return o<e.length&&(i=e.slice(o),s[a]?s[a]+=i:s[++a]=i),s.length<2?l[0]?function(t){return function(e){return t(e)+""}}(l[0].x):function(t){return function(){return t}}(e):(e=l.length,function(t){for(var n,r=0;r<e;++r)s[(n=l[r]).i]=n.x(t);return s.join("")})}function pu(t,e){var n,r=typeof e;return null==e||"boolean"===r?nu(e):("number"===r?uu:"string"===r?(n=Bl(e))?(e=n,ou):fu:e instanceof Bl?ou:e instanceof Date?lu:function(t){return ArrayBuffer.isView(t)&&!(t instanceof DataView)}(e)?au:Array.isArray(e)?su:"function"!=typeof e.valueOf&&"function"!=typeof e.toString||isNaN(e)?cu:uu)(t,e)}function gu(t,e){return t=+t,e=+e,function(n){return Math.round(t*(1-n)+e*n)}}var vu,mu=180/Math.PI,yu={translateX:0,translateY:0,rotate:0,skewX:0,scaleX:1,scaleY:1};function bu(t,e,n,r,i,o){var a,s,l;return(a=Math.sqrt(t*t+e*e))&&(t/=a,e/=a),(l=t*n+e*r)&&(n-=t*l,r-=e*l),(s=Math.sqrt(n*n+r*r))&&(n/=s,r/=s,l/=s),t*r<e*n&&(t=-t,e=-e,l=-l,a=-a),{translateX:i,translateY:o,rotate:Math.atan2(e,t)*mu,skewX:Math.atan(l)*mu,scaleX:a,scaleY:s}}function Eu(t,e,n,r){function i(t){return t.length?t.pop()+" ":""}return function(o,a){var s=[],l=[];return o=t(o),a=t(a),function(t,r,i,o,a,s){if(t!==i||r!==o){var l=a.push("translate(",null,e,null,n);s.push({i:l-4,x:uu(t,i)},{i:l-2,x:uu(r,o)})}else(i||o)&&a.push("translate("+i+e+o+n)}(o.translateX,o.translateY,a.translateX,a.translateY,s,l),function(t,e,n,o){t!==e?(t-e>180?e+=360:e-t>180&&(t+=360),o.push({i:n.push(i(n)+"rotate(",null,r)-2,x:uu(t,e)})):e&&n.push(i(n)+"rotate("+e+r)}(o.rotate,a.rotate,s,l),function(t,e,n,o){t!==e?o.push({i:n.push(i(n)+"skewX(",null,r)-2,x:uu(t,e)}):e&&n.push(i(n)+"skewX("+e+r)}(o.skewX,a.skewX,s,l),function(t,e,n,r,o,a){if(t!==n||e!==r){var s=o.push(i(o)+"scale(",null,",",null,")");a.push({i:s-4,x:uu(t,n)},{i:s-2,x:uu(e,r)})}else 1===n&&1===r||o.push(i(o)+"scale("+n+","+r+")")}(o.scaleX,o.scaleY,a.scaleX,a.scaleY,s,l),o=a=null,function(t){for(var e,n=-1,r=l.length;++n<r;)s[(e=l[n]).i]=e.x(t);return s.join("")}}}var _u=Eu((function(t){const e=new("function"==typeof DOMMatrix?DOMMatrix:WebKitCSSMatrix)(t+"");return e.isIdentity?yu:bu(e.a,e.b,e.c,e.d,e.e,e.f)}),"px, ","px)","deg)"),xu=Eu((function(t){return null==t?yu:(vu||(vu=document.createElementNS("http://www.w3.org/2000/svg","g")),vu.setAttribute("transform",t),(t=vu.transform.baseVal.consolidate())?bu((t=t.matrix).a,t.b,t.c,t.d,t.e,t.f):yu)}),", ",")",")");function wu(t){return+t}var Ou=[0,1];function Tu(t){return t}function Su(t,e){return(e-=t=+t)?function(n){return(n-t)/e}:function(t){return function(){return t}}(isNaN(e)?NaN:.5)}function Mu(t,e,n){var r=t[0],i=t[1],o=e[0],a=e[1];return i<r?(r=Su(i,r),o=n(a,o)):(r=Su(r,i),o=n(o,a)),function(t){return o(r(t))}}function Cu(t,e,n){var r=Math.min(t.length,e.length)-1,i=new Array(r),o=new Array(r),a=-1;for(t[r]<t[0]&&(t=t.slice().reverse(),e=e.slice().reverse());++a<r;)i[a]=Su(t[a],t[a+1]),o[a]=n(e[a],e[a+1]);return function(e){var n=qs(t,e,1,r)-1;return o[n](i[n](e))}}function Au(t,e){return e.domain(t.domain()).range(t.range()).interpolate(t.interpolate()).clamp(t.clamp()).unknown(t.unknown())}function Lu(){var t,e,n,r,i,o,a=Ou,s=Ou,l=pu,u=Tu;function c(){var t=Math.min(a.length,s.length);return u!==Tu&&(u=function(t,e){var n;return t>e&&(n=t,t=e,e=n),function(n){return Math.max(t,Math.min(e,n))}}(a[0],a[t-1])),r=t>2?Cu:Mu,i=o=null,h}function h(e){return null==e||isNaN(e=+e)?n:(i||(i=r(a.map(t),s,l)))(t(u(e)))}return h.invert=function(n){return u(e((o||(o=r(s,a.map(t),uu)))(n)))},h.domain=function(t){return arguments.length?(a=Array.from(t,wu),c()):a.slice()},h.range=function(t){return arguments.length?(s=Array.from(t),c()):s.slice()},h.rangeRound=function(t){return s=Array.from(t),l=gu,c()},h.clamp=function(t){return arguments.length?(u=!!t||Tu,c()):u!==Tu},h.interpolate=function(t){return arguments.length?(l=t,c()):l},h.unknown=function(t){return arguments.length?(n=t,h):n},function(n,r){return t=n,e=r,c()}}function Du(){return Lu()(Tu,Tu)}function ku(t,e){if((n=(t=e?t.toExponential(e-1):t.toExponential()).indexOf("e"))<0)return null;var n,r=t.slice(0,n);return[r.length>1?r[0]+r.slice(2):r,+t.slice(n+1)]}function Ru(t){return(t=ku(Math.abs(t)))?t[1]:NaN}var Iu,Pu=/^(?:(.)?([<>=^]))?([+\-( ])?([$#])?(0)?(\d+)?(,)?(\.\d+)?(~)?([a-z%])?$/i;function Nu(t){if(!(e=Pu.exec(t)))throw new Error("invalid format: "+t);var e;return new Uu({fill:e[1],align:e[2],sign:e[3],symbol:e[4],zero:e[5],width:e[6],comma:e[7],precision:e[8]&&e[8].slice(1),trim:e[9],type:e[10]})}function Uu(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 Bu(t,e){var n=ku(t,e);if(!n)return t+"";var r=n[0],i=n[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")}Nu.prototype=Uu.prototype,Uu.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 Vu={"%":(t,e)=>(100*t).toFixed(e),b:t=>Math.round(t).toString(2),c:t=>t+"",d:function(t){return Math.abs(t=Math.round(t))>=1e21?t.toLocaleString("en").replace(/,/g,""):t.toString(10)},e:(t,e)=>t.toExponential(e),f:(t,e)=>t.toFixed(e),g:(t,e)=>t.toPrecision(e),o:t=>Math.round(t).toString(8),p:(t,e)=>Bu(100*t,e),r:Bu,s:function(t,e){var n=ku(t,e);if(!n)return t+"";var r=n[0],i=n[1],o=i-(Iu=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")+ku(t,Math.max(0,e+o-1))[0]},X:t=>Math.round(t).toString(16).toUpperCase(),x:t=>Math.round(t).toString(16)};function Hu(t){return t}var Gu,zu,ju,Fu=Array.prototype.map,Wu=["y","z","a","f","p","n","µ","m","","k","M","G","T","P","E","Z","Y"];function qu(t){var e,n,r=void 0===t.grouping||void 0===t.thousands?Hu:(e=Fu.call(t.grouping,Number),n=t.thousands+"",function(t,r){for(var i=t.length,o=[],a=0,s=e[0],l=0;i>0&&s>0&&(l+s+1>r&&(s=Math.max(1,r-l)),o.push(t.substring(i-=s,i+s)),!((l+=s+1)>r));)s=e[a=(a+1)%e.length];return o.reverse().join(n)}),i=void 0===t.currency?"":t.currency[0]+"",o=void 0===t.currency?"":t.currency[1]+"",a=void 0===t.decimal?".":t.decimal+"",s=void 0===t.numerals?Hu:function(t){return function(e){return e.replace(/[0-9]/g,(function(e){return t[+e]}))}}(Fu.call(t.numerals,String)),l=void 0===t.percent?"%":t.percent+"",u=void 0===t.minus?"−":t.minus+"",c=void 0===t.nan?"NaN":t.nan+"";function h(t){var e=(t=Nu(t)).fill,n=t.align,h=t.sign,d=t.symbol,f=t.zero,p=t.width,g=t.comma,v=t.precision,m=t.trim,y=t.type;"n"===y?(g=!0,y="g"):Vu[y]||(void 0===v&&(v=12),m=!0,y="g"),(f||"0"===e&&"="===n)&&(f=!0,e="0",n="=");var b="$"===d?i:"#"===d&&/[boxX]/.test(y)?"0"+y.toLowerCase():"",E="$"===d?o:/[%p]/.test(y)?l:"",_=Vu[y],x=/[defgprs%]/.test(y);function w(t){var i,o,l,d=b,w=E;if("c"===y)w=_(t)+w,t="";else{var O=(t=+t)<0||1/t<0;if(t=isNaN(t)?c:_(Math.abs(t),v),m&&(t=function(t){t:for(var e,n=t.length,r=1,i=-1;r<n;++r)switch(t[r]){case".":i=e=r;break;case"0":0===i&&(i=r),e=r;break;default:if(!+t[r])break t;i>0&&(i=0)}return i>0?t.slice(0,i)+t.slice(e+1):t}(t)),O&&0==+t&&"+"!==h&&(O=!1),d=(O?"("===h?h:u:"-"===h||"("===h?"":h)+d,w=("s"===y?Wu[8+Iu/3]:"")+w+(O&&"("===h?")":""),x)for(i=-1,o=t.length;++i<o;)if(48>(l=t.charCodeAt(i))||l>57){w=(46===l?a+t.slice(i+1):t.slice(i))+w,t=t.slice(0,i);break}}g&&!f&&(t=r(t,1/0));var T=d.length+t.length+w.length,S=T<p?new Array(p-T+1).join(e):"";switch(g&&f&&(t=r(S+t,S.length?p-w.length:1/0),S=""),n){case"<":t=d+t+w+S;break;case"=":t=d+S+t+w;break;case"^":t=S.slice(0,T=S.length>>1)+d+t+w+S.slice(T);break;default:t=S+d+t+w}return s(t)}return v=void 0===v?6:/[gprs]/.test(y)?Math.max(1,Math.min(21,v)):Math.max(0,Math.min(20,v)),w.toString=function(){return t+""},w}return{format:h,formatPrefix:function(t,e){var n=h(((t=Nu(t)).type="f",t)),r=3*Math.max(-8,Math.min(8,Math.floor(Ru(e)/3))),i=Math.pow(10,-r),o=Wu[8+r/3];return function(t){return n(i*t)+o}}}}function Yu(t,e,n,r){var i,o=ll(t,e,n);switch((r=Nu(null==r?",f":r)).type){case"s":var a=Math.max(Math.abs(t),Math.abs(e));return null!=r.precision||isNaN(i=function(t,e){return Math.max(0,3*Math.max(-8,Math.min(8,Math.floor(Ru(e)/3)))-Ru(Math.abs(t)))}(o,a))||(r.precision=i),ju(r,a);case"":case"e":case"g":case"p":case"r":null!=r.precision||isNaN(i=function(t,e){return t=Math.abs(t),e=Math.abs(e)-t,Math.max(0,Ru(e)-Ru(t))+1}(o,Math.max(Math.abs(t),Math.abs(e))))||(r.precision=i-("e"===r.type));break;case"f":case"%":null!=r.precision||isNaN(i=function(t){return Math.max(0,-Ru(Math.abs(t)))}(o))||(r.precision=i-2*("%"===r.type))}return zu(r)}function Zu(t){var e=t.domain;return t.ticks=function(t){var n=e();return al(n[0],n[n.length-1],null==t?10:t)},t.tickFormat=function(t,n){var r=e();return Yu(r[0],r[r.length-1],null==t?10:t,n)},t.nice=function(n){null==n&&(n=10);var r,i,o=e(),a=0,s=o.length-1,l=o[a],u=o[s],c=10;for(u<l&&(i=l,l=u,u=i,i=a,a=s,s=i);c-- >0;){if((i=sl(l,u,n))===r)return o[a]=l,o[s]=u,e(o);if(i>0)l=Math.floor(l/i)*i,u=Math.ceil(u/i)*i;else{if(!(i<0))break;l=Math.ceil(l*i)/i,u=Math.floor(u*i)/i}r=i}return t},t}function Xu(){var t=Du();return t.copy=function(){return Au(t,Xu())},yl.apply(t,arguments),Zu(t)}function $u(t,e){var n,r=0,i=(t=t.slice()).length-1,o=t[r],a=t[i];return a<o&&(n=r,r=i,i=n,n=o,o=a,a=n),t[r]=e.floor(o),t[i]=e.ceil(a),t}function Ku(t){return Math.log(t)}function Qu(t){return Math.exp(t)}function Ju(t){return-Math.log(-t)}function tc(t){return-Math.exp(-t)}function ec(t){return isFinite(t)?+("1e"+t):t<0?0:t}function nc(t){return(e,n)=>-t(-e,n)}function rc(t){const e=t(Ku,Qu),n=e.domain;let r,i,o=10;function a(){return r=function(t){return t===Math.E?Math.log:10===t&&Math.log10||2===t&&Math.log2||(t=Math.log(t),e=>Math.log(e)/t)}(o),i=function(t){return 10===t?ec:t===Math.E?Math.exp:e=>Math.pow(t,e)}(o),n()[0]<0?(r=nc(r),i=nc(i),t(Ju,tc)):t(Ku,Qu),e}return e.base=function(t){return arguments.length?(o=+t,a()):o},e.domain=function(t){return arguments.length?(n(t),a()):n()},e.ticks=t=>{const e=n();let a=e[0],s=e[e.length-1];const l=s<a;l&&([a,s]=[s,a]);let u,c,h=r(a),d=r(s);const f=null==t?10:+t;let p=[];if(!(o%1)&&d-h<f){if(h=Math.floor(h),d=Math.ceil(d),a>0){for(;h<=d;++h)for(u=1;u<o;++u)if(c=h<0?u/i(-h):u*i(h),!(c<a)){if(c>s)break;p.push(c)}}else for(;h<=d;++h)for(u=o-1;u>=1;--u)if(c=h>0?u/i(-h):u*i(h),!(c<a)){if(c>s)break;p.push(c)}2*p.length<f&&(p=al(a,s,f))}else p=al(h,d,Math.min(d-h,f)).map(i);return l?p.reverse():p},e.tickFormat=(t,n)=>{if(null==t&&(t=10),null==n&&(n=10===o?"s":","),"function"!=typeof n&&(o%1||null!=(n=Nu(n)).precision||(n.trim=!0),n=zu(n)),t===1/0)return n;const a=Math.max(1,o*t/e.ticks().length);return t=>{let e=t/i(Math.round(r(t)));return e*o<o-.5&&(e*=o),e<=a?n(t):""}},e.nice=()=>n($u(n(),{floor:t=>i(Math.floor(r(t))),ceil:t=>i(Math.ceil(r(t)))})),e}Gu=qu({thousands:",",grouping:[3],currency:["$",""]}),zu=Gu.format,ju=Gu.formatPrefix;const ic=new Date,oc=new Date;function ac(t,e,n,r){function i(e){return t(e=0===arguments.length?new Date:new Date(+e)),e}return i.floor=e=>(t(e=new Date(+e)),e),i.ceil=n=>(t(n=new Date(n-1)),e(n,1),t(n),n),i.round=t=>{const e=i(t),n=i.ceil(t);return t-e<n-t?e:n},i.offset=(t,n)=>(e(t=new Date(+t),null==n?1:Math.floor(n)),t),i.range=(n,r,o)=>{const a=[];if(n=i.ceil(n),o=null==o?1:Math.floor(o),!(n<r&&o>0))return a;let s;do{a.push(s=new Date(+n)),e(n,o),t(n)}while(s<n&&n<r);return a},i.filter=n=>ac(e=>{if(e>=e)for(;t(e),!n(e);)e.setTime(e-1)},(t,r)=>{if(t>=t)if(r<0)for(;++r<=0;)for(;e(t,-1),!n(t););else for(;--r>=0;)for(;e(t,1),!n(t););}),n&&(i.count=(e,r)=>(ic.setTime(+e),oc.setTime(+r),t(ic),t(oc),Math.floor(n(ic,oc))),i.every=t=>(t=Math.floor(t),isFinite(t)&&t>0?t>1?i.filter(r?e=>r(e)%t==0:e=>i.count(0,e)%t==0):i:null)),i}const sc=ac(()=>{},(t,e)=>{t.setTime(+t+e)},(t,e)=>e-t);sc.every=t=>(t=Math.floor(t),isFinite(t)&&t>0?t>1?ac(e=>{e.setTime(Math.floor(e/t)*t)},(e,n)=>{e.setTime(+e+n*t)},(e,n)=>(n-e)/t):sc:null);const lc=ac(t=>{t.setTime(t-t.getMilliseconds())},(t,e)=>{t.setTime(+t+1e3*e)},(t,e)=>(e-t)/1e3,t=>t.getUTCSeconds()),uc=ac(t=>{t.setTime(t-t.getMilliseconds()-1e3*t.getSeconds())},(t,e)=>{t.setTime(+t+6e4*e)},(t,e)=>(e-t)/6e4,t=>t.getMinutes()),cc=(ac(t=>{t.setUTCSeconds(0,0)},(t,e)=>{t.setTime(+t+6e4*e)},(t,e)=>(e-t)/6e4,t=>t.getUTCMinutes()),ac(t=>{t.setTime(t-t.getMilliseconds()-1e3*t.getSeconds()-6e4*t.getMinutes())},(t,e)=>{t.setTime(+t+36e5*e)},(t,e)=>(e-t)/36e5,t=>t.getHours())),hc=(ac(t=>{t.setUTCMinutes(0,0,0)},(t,e)=>{t.setTime(+t+36e5*e)},(t,e)=>(e-t)/36e5,t=>t.getUTCHours()),ac(t=>t.setHours(0,0,0,0),(t,e)=>t.setDate(t.getDate()+e),(t,e)=>(e-t-6e4*(e.getTimezoneOffset()-t.getTimezoneOffset()))/864e5,t=>t.getDate()-1)),dc=ac(t=>{t.setUTCHours(0,0,0,0)},(t,e)=>{t.setUTCDate(t.getUTCDate()+e)},(t,e)=>(e-t)/864e5,t=>t.getUTCDate()-1);ac(t=>{t.setUTCHours(0,0,0,0)},(t,e)=>{t.setUTCDate(t.getUTCDate()+e)},(t,e)=>(e-t)/864e5,t=>Math.floor(t/864e5));function fc(t){return ac(e=>{e.setDate(e.getDate()-(e.getDay()+7-t)%7),e.setHours(0,0,0,0)},(t,e)=>{t.setDate(t.getDate()+7*e)},(t,e)=>(e-t-6e4*(e.getTimezoneOffset()-t.getTimezoneOffset()))/6048e5)}const pc=fc(0),gc=fc(1),vc=(fc(2),fc(3),fc(4));fc(5),fc(6);function mc(t){return ac(e=>{e.setUTCDate(e.getUTCDate()-(e.getUTCDay()+7-t)%7),e.setUTCHours(0,0,0,0)},(t,e)=>{t.setUTCDate(t.getUTCDate()+7*e)},(t,e)=>(e-t)/6048e5)}const yc=mc(0),bc=mc(1),Ec=(mc(2),mc(3),mc(4)),_c=(mc(5),mc(6),ac(t=>{t.setDate(1),t.setHours(0,0,0,0)},(t,e)=>{t.setMonth(t.getMonth()+e)},(t,e)=>e.getMonth()-t.getMonth()+12*(e.getFullYear()-t.getFullYear()),t=>t.getMonth())),xc=(ac(t=>{t.setUTCDate(1),t.setUTCHours(0,0,0,0)},(t,e)=>{t.setUTCMonth(t.getUTCMonth()+e)},(t,e)=>e.getUTCMonth()-t.getUTCMonth()+12*(e.getUTCFullYear()-t.getUTCFullYear()),t=>t.getUTCMonth()),ac(t=>{t.setMonth(0,1),t.setHours(0,0,0,0)},(t,e)=>{t.setFullYear(t.getFullYear()+e)},(t,e)=>e.getFullYear()-t.getFullYear(),t=>t.getFullYear()));xc.every=t=>isFinite(t=Math.floor(t))&&t>0?ac(e=>{e.setFullYear(Math.floor(e.getFullYear()/t)*t),e.setMonth(0,1),e.setHours(0,0,0,0)},(e,n)=>{e.setFullYear(e.getFullYear()+n*t)}):null;const wc=ac(t=>{t.setUTCMonth(0,1),t.setUTCHours(0,0,0,0)},(t,e)=>{t.setUTCFullYear(t.getUTCFullYear()+e)},(t,e)=>e.getUTCFullYear()-t.getUTCFullYear(),t=>t.getUTCFullYear());wc.every=t=>isFinite(t=Math.floor(t))&&t>0?ac(e=>{e.setUTCFullYear(Math.floor(e.getUTCFullYear()/t)*t),e.setUTCMonth(0,1),e.setUTCHours(0,0,0,0)},(e,n)=>{e.setUTCFullYear(e.getUTCFullYear()+n*t)}):null;const[Oc,Tc]=function(t,e,n,r,i,o){const a=[[lc,1,1e3],[lc,5,5e3],[lc,15,15e3],[lc,30,3e4],[o,1,6e4],[o,5,3e5],[o,15,9e5],[o,30,18e5],[i,1,36e5],[i,3,108e5],[i,6,216e5],[i,12,432e5],[r,1,864e5],[r,2,1728e5],[n,1,6048e5],[e,1,2592e6],[e,3,7776e6],[t,1,31536e6]];function s(e,n,r){const i=Math.abs(n-e)/r,o=Fs(([,,t])=>t).right(a,i);if(o===a.length)return t.every(ll(e/31536e6,n/31536e6,r));if(0===o)return sc.every(Math.max(ll(e,n,r),1));const[s,l]=a[i/a[o-1][2]<a[o][2]/i?o-1:o];return s.every(l)}return[function(t,e,n){const r=e<t;r&&([t,e]=[e,t]);const i=n&&"function"==typeof n.range?n:s(t,e,n),o=i?i.range(t,+e+1):[];return r?o.reverse():o},s]}(xc,_c,pc,hc,cc,uc);function Sc(t){if(0<=t.y&&t.y<100){var e=new Date(-1,t.m,t.d,t.H,t.M,t.S,t.L);return e.setFullYear(t.y),e}return new Date(t.y,t.m,t.d,t.H,t.M,t.S,t.L)}function Mc(t){if(0<=t.y&&t.y<100){var e=new Date(Date.UTC(-1,t.m,t.d,t.H,t.M,t.S,t.L));return e.setUTCFullYear(t.y),e}return new Date(Date.UTC(t.y,t.m,t.d,t.H,t.M,t.S,t.L))}function Cc(t,e,n){return{y:t,m:e,d:n,H:0,M:0,S:0,L:0}}var Ac,Lc,Dc={"-":"",_:" ",0:"0"},kc=/^\s*\d+/,Rc=/^%/,Ic=/[\\^$*+?|[\]().{}]/g;function Pc(t,e,n){var r=t<0?"-":"",i=(r?-t:t)+"",o=i.length;return r+(o<n?new Array(n-o+1).join(e)+i:i)}function Nc(t){return t.replace(Ic,"\\$&")}function Uc(t){return new RegExp("^(?:"+t.map(Nc).join("|")+")","i")}function Bc(t){return new Map(t.map((t,e)=>[t.toLowerCase(),e]))}function Vc(t,e,n){var r=kc.exec(e.slice(n,n+1));return r?(t.w=+r[0],n+r[0].length):-1}function Hc(t,e,n){var r=kc.exec(e.slice(n,n+1));return r?(t.u=+r[0],n+r[0].length):-1}function Gc(t,e,n){var r=kc.exec(e.slice(n,n+2));return r?(t.U=+r[0],n+r[0].length):-1}function zc(t,e,n){var r=kc.exec(e.slice(n,n+2));return r?(t.V=+r[0],n+r[0].length):-1}function jc(t,e,n){var r=kc.exec(e.slice(n,n+2));return r?(t.W=+r[0],n+r[0].length):-1}function Fc(t,e,n){var r=kc.exec(e.slice(n,n+4));return r?(t.y=+r[0],n+r[0].length):-1}function Wc(t,e,n){var r=kc.exec(e.slice(n,n+2));return r?(t.y=+r[0]+(+r[0]>68?1900:2e3),n+r[0].length):-1}function qc(t,e,n){var r=/^(Z)|([+-]\d\d)(?::?(\d\d))?/.exec(e.slice(n,n+6));return r?(t.Z=r[1]?0:-(r[2]+(r[3]||"00")),n+r[0].length):-1}function Yc(t,e,n){var r=kc.exec(e.slice(n,n+1));return r?(t.q=3*r[0]-3,n+r[0].length):-1}function Zc(t,e,n){var r=kc.exec(e.slice(n,n+2));return r?(t.m=r[0]-1,n+r[0].length):-1}function Xc(t,e,n){var r=kc.exec(e.slice(n,n+2));return r?(t.d=+r[0],n+r[0].length):-1}function $c(t,e,n){var r=kc.exec(e.slice(n,n+3));return r?(t.m=0,t.d=+r[0],n+r[0].length):-1}function Kc(t,e,n){var r=kc.exec(e.slice(n,n+2));return r?(t.H=+r[0],n+r[0].length):-1}function Qc(t,e,n){var r=kc.exec(e.slice(n,n+2));return r?(t.M=+r[0],n+r[0].length):-1}function Jc(t,e,n){var r=kc.exec(e.slice(n,n+2));return r?(t.S=+r[0],n+r[0].length):-1}function th(t,e,n){var r=kc.exec(e.slice(n,n+3));return r?(t.L=+r[0],n+r[0].length):-1}function eh(t,e,n){var r=kc.exec(e.slice(n,n+6));return r?(t.L=Math.floor(r[0]/1e3),n+r[0].length):-1}function nh(t,e,n){var r=Rc.exec(e.slice(n,n+1));return r?n+r[0].length:-1}function rh(t,e,n){var r=kc.exec(e.slice(n));return r?(t.Q=+r[0],n+r[0].length):-1}function ih(t,e,n){var r=kc.exec(e.slice(n));return r?(t.s=+r[0],n+r[0].length):-1}function oh(t,e){return Pc(t.getDate(),e,2)}function ah(t,e){return Pc(t.getHours(),e,2)}function sh(t,e){return Pc(t.getHours()%12||12,e,2)}function lh(t,e){return Pc(1+hc.count(xc(t),t),e,3)}function uh(t,e){return Pc(t.getMilliseconds(),e,3)}function ch(t,e){return uh(t,e)+"000"}function hh(t,e){return Pc(t.getMonth()+1,e,2)}function dh(t,e){return Pc(t.getMinutes(),e,2)}function fh(t,e){return Pc(t.getSeconds(),e,2)}function ph(t){var e=t.getDay();return 0===e?7:e}function gh(t,e){return Pc(pc.count(xc(t)-1,t),e,2)}function vh(t){var e=t.getDay();return e>=4||0===e?vc(t):vc.ceil(t)}function mh(t,e){return t=vh(t),Pc(vc.count(xc(t),t)+(4===xc(t).getDay()),e,2)}function yh(t){return t.getDay()}function bh(t,e){return Pc(gc.count(xc(t)-1,t),e,2)}function Eh(t,e){return Pc(t.getFullYear()%100,e,2)}function _h(t,e){return Pc((t=vh(t)).getFullYear()%100,e,2)}function xh(t,e){return Pc(t.getFullYear()%1e4,e,4)}function wh(t,e){var n=t.getDay();return Pc((t=n>=4||0===n?vc(t):vc.ceil(t)).getFullYear()%1e4,e,4)}function Oh(t){var e=t.getTimezoneOffset();return(e>0?"-":(e*=-1,"+"))+Pc(e/60|0,"0",2)+Pc(e%60,"0",2)}function Th(t,e){return Pc(t.getUTCDate(),e,2)}function Sh(t,e){return Pc(t.getUTCHours(),e,2)}function Mh(t,e){return Pc(t.getUTCHours()%12||12,e,2)}function Ch(t,e){return Pc(1+dc.count(wc(t),t),e,3)}function Ah(t,e){return Pc(t.getUTCMilliseconds(),e,3)}function Lh(t,e){return Ah(t,e)+"000"}function Dh(t,e){return Pc(t.getUTCMonth()+1,e,2)}function kh(t,e){return Pc(t.getUTCMinutes(),e,2)}function Rh(t,e){return Pc(t.getUTCSeconds(),e,2)}function Ih(t){var e=t.getUTCDay();return 0===e?7:e}function Ph(t,e){return Pc(yc.count(wc(t)-1,t),e,2)}function Nh(t){var e=t.getUTCDay();return e>=4||0===e?Ec(t):Ec.ceil(t)}function Uh(t,e){return t=Nh(t),Pc(Ec.count(wc(t),t)+(4===wc(t).getUTCDay()),e,2)}function Bh(t){return t.getUTCDay()}function Vh(t,e){return Pc(bc.count(wc(t)-1,t),e,2)}function Hh(t,e){return Pc(t.getUTCFullYear()%100,e,2)}function Gh(t,e){return Pc((t=Nh(t)).getUTCFullYear()%100,e,2)}function zh(t,e){return Pc(t.getUTCFullYear()%1e4,e,4)}function jh(t,e){var n=t.getUTCDay();return Pc((t=n>=4||0===n?Ec(t):Ec.ceil(t)).getUTCFullYear()%1e4,e,4)}function Fh(){return"+0000"}function Wh(){return"%"}function qh(t){return+t}function Yh(t){return Math.floor(+t/1e3)}function Zh(t){return new Date(t)}function Xh(t){return t instanceof Date?+t:+new Date(+t)}function $h(t,e,n,r,i,o,a,s,l,u){var c=Du(),h=c.invert,d=c.domain,f=u(".%L"),p=u(":%S"),g=u("%I:%M"),v=u("%I %p"),m=u("%a %d"),y=u("%b %d"),b=u("%B"),E=u("%Y");function _(t){return(l(t)<t?f:s(t)<t?p:a(t)<t?g:o(t)<t?v:r(t)<t?i(t)<t?m:y:n(t)<t?b:E)(t)}return c.invert=function(t){return new Date(h(t))},c.domain=function(t){return arguments.length?d(Array.from(t,Xh)):d().map(Zh)},c.ticks=function(e){var n=d();return t(n[0],n[n.length-1],null==e?10:e)},c.tickFormat=function(t,e){return null==e?_:u(e)},c.nice=function(t){var n=d();return t&&"function"==typeof t.range||(t=e(n[0],n[n.length-1],null==t?10:t)),t?d($u(n,t)):c},c.copy=function(){return Au(c,$h(t,e,n,r,i,o,a,s,l,u))},c}function Kh(){return yl.apply($h(Oc,Tc,xc,_c,pc,hc,cc,uc,lc,Lc).domain([new Date(2e3,0,1),new Date(2e3,0,2)]),arguments)}function Qh(t){return function(){return t}}!function(t){Ac=function(t){var e=t.dateTime,n=t.date,r=t.time,i=t.periods,o=t.days,a=t.shortDays,s=t.months,l=t.shortMonths,u=Uc(i),c=Bc(i),h=Uc(o),d=Bc(o),f=Uc(a),p=Bc(a),g=Uc(s),v=Bc(s),m=Uc(l),y=Bc(l),b={a:function(t){return a[t.getDay()]},A:function(t){return o[t.getDay()]},b:function(t){return l[t.getMonth()]},B:function(t){return s[t.getMonth()]},c:null,d:oh,e:oh,f:ch,g:_h,G:wh,H:ah,I:sh,j:lh,L:uh,m:hh,M:dh,p:function(t){return i[+(t.getHours()>=12)]},q:function(t){return 1+~~(t.getMonth()/3)},Q:qh,s:Yh,S:fh,u:ph,U:gh,V:mh,w:yh,W:bh,x:null,X:null,y:Eh,Y:xh,Z:Oh,"%":Wh},E={a:function(t){return a[t.getUTCDay()]},A:function(t){return o[t.getUTCDay()]},b:function(t){return l[t.getUTCMonth()]},B:function(t){return s[t.getUTCMonth()]},c:null,d:Th,e:Th,f:Lh,g:Gh,G:jh,H:Sh,I:Mh,j:Ch,L:Ah,m:Dh,M:kh,p:function(t){return i[+(t.getUTCHours()>=12)]},q:function(t){return 1+~~(t.getUTCMonth()/3)},Q:qh,s:Yh,S:Rh,u:Ih,U:Ph,V:Uh,w:Bh,W:Vh,x:null,X:null,y:Hh,Y:zh,Z:Fh,"%":Wh},_={a:function(t,e,n){var r=f.exec(e.slice(n));return r?(t.w=p.get(r[0].toLowerCase()),n+r[0].length):-1},A:function(t,e,n){var r=h.exec(e.slice(n));return r?(t.w=d.get(r[0].toLowerCase()),n+r[0].length):-1},b:function(t,e,n){var r=m.exec(e.slice(n));return r?(t.m=y.get(r[0].toLowerCase()),n+r[0].length):-1},B:function(t,e,n){var r=g.exec(e.slice(n));return r?(t.m=v.get(r[0].toLowerCase()),n+r[0].length):-1},c:function(t,n,r){return O(t,e,n,r)},d:Xc,e:Xc,f:eh,g:Wc,G:Fc,H:Kc,I:Kc,j:$c,L:th,m:Zc,M:Qc,p:function(t,e,n){var r=u.exec(e.slice(n));return r?(t.p=c.get(r[0].toLowerCase()),n+r[0].length):-1},q:Yc,Q:rh,s:ih,S:Jc,u:Hc,U:Gc,V:zc,w:Vc,W:jc,x:function(t,e,r){return O(t,n,e,r)},X:function(t,e,n){return O(t,r,e,n)},y:Wc,Y:Fc,Z:qc,"%":nh};function x(t,e){return function(n){var r,i,o,a=[],s=-1,l=0,u=t.length;for(n instanceof Date||(n=new Date(+n));++s<u;)37===t.charCodeAt(s)&&(a.push(t.slice(l,s)),null!=(i=Dc[r=t.charAt(++s)])?r=t.charAt(++s):i="e"===r?" ":"0",(o=e[r])&&(r=o(n,i)),a.push(r),l=s+1);return a.push(t.slice(l,s)),a.join("")}}function w(t,e){return function(n){var r,i,o=Cc(1900,void 0,1);if(O(o,t,n+="",0)!=n.length)return null;if("Q"in o)return new Date(o.Q);if("s"in o)return new Date(1e3*o.s+("L"in o?o.L:0));if(e&&!("Z"in o)&&(o.Z=0),"p"in o&&(o.H=o.H%12+12*o.p),void 0===o.m&&(o.m="q"in o?o.q:0),"V"in o){if(o.V<1||o.V>53)return null;"w"in o||(o.w=1),"Z"in o?(i=(r=Mc(Cc(o.y,0,1))).getUTCDay(),r=i>4||0===i?bc.ceil(r):bc(r),r=dc.offset(r,7*(o.V-1)),o.y=r.getUTCFullYear(),o.m=r.getUTCMonth(),o.d=r.getUTCDate()+(o.w+6)%7):(i=(r=Sc(Cc(o.y,0,1))).getDay(),r=i>4||0===i?gc.ceil(r):gc(r),r=hc.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?Mc(Cc(o.y,0,1)).getUTCDay():Sc(Cc(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,Mc(o)):Sc(o)}}function O(t,e,n,r){for(var i,o,a=0,s=e.length,l=n.length;a<s;){if(r>=l)return-1;if(37===(i=e.charCodeAt(a++))){if(i=e.charAt(a++),!(o=_[i in Dc?e.charAt(a++):i])||(r=o(t,n,r))<0)return-1}else if(i!=n.charCodeAt(r++))return-1}return r}return b.x=x(n,b),b.X=x(r,b),b.c=x(e,b),E.x=x(n,E),E.X=x(r,E),E.c=x(e,E),{format:function(t){var e=x(t+="",b);return e.toString=function(){return t},e},parse:function(t){var e=w(t+="",!1);return e.toString=function(){return t},e},utcFormat:function(t){var e=x(t+="",E);return e.toString=function(){return t},e},utcParse:function(t){var e=w(t+="",!0);return e.toString=function(){return t},e}}}(t),Lc=Ac.format,Ac.parse,Ac.utcFormat,Ac.utcParse}({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"]});const Jh=Math.abs,td=Math.atan2,ed=Math.cos,nd=Math.max,rd=Math.min,id=Math.sin,od=Math.sqrt,ad=Math.PI,sd=ad/2,ld=2*ad;function ud(t){return t>1?0:t<-1?ad:Math.acos(t)}function cd(t){return t>=1?sd:t<=-1?-sd:Math.asin(t)}const hd=Math.PI,dd=2*hd,fd=dd-1e-6;function pd(t){this._+=t[0];for(let e=1,n=t.length;e<n;++e)this._+=arguments[e]+t[e]}class gd{constructor(t){this._x0=this._y0=this._x1=this._y1=null,this._="",this._append=null==t?pd:function(t){let e=Math.floor(t);if(!(e>=0))throw new Error("invalid digits: "+t);if(e>15)return pd;const n=10**e;return function(t){this._+=t[0];for(let e=1,r=t.length;e<r;++e)this._+=Math.round(arguments[e]*n)/n+t[e]}}(t)}moveTo(t,e){this._append`M${this._x0=this._x1=+t},${this._y0=this._y1=+e}`}closePath(){null!==this._x1&&(this._x1=this._x0,this._y1=this._y0,this._append`Z`)}lineTo(t,e){this._append`L${this._x1=+t},${this._y1=+e}`}quadraticCurveTo(t,e,n,r){this._append`Q${+t},${+e},${this._x1=+n},${this._y1=+r}`}bezierCurveTo(t,e,n,r,i,o){this._append`C${+t},${+e},${+n},${+r},${this._x1=+i},${this._y1=+o}`}arcTo(t,e,n,r,i){if(t=+t,e=+e,n=+n,r=+r,(i=+i)<0)throw new Error("negative radius: "+i);let o=this._x1,a=this._y1,s=n-t,l=r-e,u=o-t,c=a-e,h=u*u+c*c;if(null===this._x1)this._append`M${this._x1=t},${this._y1=e}`;else if(h>1e-6)if(Math.abs(c*s-l*u)>1e-6&&i){let d=n-o,f=r-a,p=s*s+l*l,g=d*d+f*f,v=Math.sqrt(p),m=Math.sqrt(h),y=i*Math.tan((hd-Math.acos((p+h-g)/(2*v*m)))/2),b=y/m,E=y/v;Math.abs(b-1)>1e-6&&this._append`L${t+b*u},${e+b*c}`,this._append`A${i},${i},0,0,${+(c*d>u*f)},${this._x1=t+E*s},${this._y1=e+E*l}`}else this._append`L${this._x1=t},${this._y1=e}`;else;}arc(t,e,n,r,i,o){if(t=+t,e=+e,o=!!o,(n=+n)<0)throw new Error("negative radius: "+n);let a=n*Math.cos(r),s=n*Math.sin(r),l=t+a,u=e+s,c=1^o,h=o?r-i:i-r;null===this._x1?this._append`M${l},${u}`:(Math.abs(this._x1-l)>1e-6||Math.abs(this._y1-u)>1e-6)&&this._append`L${l},${u}`,n&&(h<0&&(h=h%dd+dd),h>fd?this._append`A${n},${n},0,1,${c},${t-a},${e-s}A${n},${n},0,1,${c},${this._x1=l},${this._y1=u}`:h>1e-6&&this._append`A${n},${n},0,${+(h>=hd)},${c},${this._x1=t+n*Math.cos(i)},${this._y1=e+n*Math.sin(i)}`)}rect(t,e,n,r){this._append`M${this._x0=this._x1=+t},${this._y0=this._y1=+e}h${n=+n}v${+r}h${-n}Z`}toString(){return this._}}function vd(t){let e=3;return t.digits=function(n){if(!arguments.length)return e;if(null==n)e=null;else{const t=Math.floor(n);if(!(t>=0))throw new RangeError("invalid digits: "+n);e=t}return t},()=>new gd(e)}function md(t){return t.innerRadius}function yd(t){return t.outerRadius}function bd(t){return t.startAngle}function Ed(t){return t.endAngle}function _d(t){return t&&t.padAngle}function xd(t,e,n,r,i,o,a,s){var l=n-t,u=r-e,c=a-i,h=s-o,d=h*l-c*u;if(!(d*d<1e-12))return[t+(d=(c*(e-o)-h*(t-i))/d)*l,e+d*u]}function wd(t,e,n,r,i,o,a){var s=t-n,l=e-r,u=(a?o:-o)/od(s*s+l*l),c=u*l,h=-u*s,d=t+c,f=e+h,p=n+c,g=r+h,v=(d+p)/2,m=(f+g)/2,y=p-d,b=g-f,E=y*y+b*b,_=i-o,x=d*g-p*f,w=(b<0?-1:1)*od(nd(0,_*_*E-x*x)),O=(x*b-y*w)/E,T=(-x*y-b*w)/E,S=(x*b+y*w)/E,M=(-x*y+b*w)/E,C=O-v,A=T-m,L=S-v,D=M-m;return C*C+A*A>L*L+D*D&&(O=S,T=M),{cx:O,cy:T,x01:-c,y01:-h,x11:O*(i/_-1),y11:T*(i/_-1)}}function Od(){var t=md,e=yd,n=Qh(0),r=null,i=bd,o=Ed,a=_d,s=null,l=vd(u);function u(){var u,c,h=+t.apply(this,arguments),d=+e.apply(this,arguments),f=i.apply(this,arguments)-sd,p=o.apply(this,arguments)-sd,g=Jh(p-f),v=p>f;if(s||(s=u=l()),d<h&&(c=d,d=h,h=c),d>1e-12)if(g>ld-1e-12)s.moveTo(d*ed(f),d*id(f)),s.arc(0,0,d,f,p,!v),h>1e-12&&(s.moveTo(h*ed(p),h*id(p)),s.arc(0,0,h,p,f,v));else{var m,y,b=f,E=p,_=f,x=p,w=g,O=g,T=a.apply(this,arguments)/2,S=T>1e-12&&(r?+r.apply(this,arguments):od(h*h+d*d)),M=rd(Jh(d-h)/2,+n.apply(this,arguments)),C=M,A=M;if(S>1e-12){var L=cd(S/h*id(T)),D=cd(S/d*id(T));(w-=2*L)>1e-12?(_+=L*=v?1:-1,x-=L):(w=0,_=x=(f+p)/2),(O-=2*D)>1e-12?(b+=D*=v?1:-1,E-=D):(O=0,b=E=(f+p)/2)}var k=d*ed(b),R=d*id(b),I=h*ed(x),P=h*id(x);if(M>1e-12){var N,U=d*ed(E),B=d*id(E),V=h*ed(_),H=h*id(_);if(g<ad)if(N=xd(k,R,V,H,U,B,I,P)){var G=k-N[0],z=R-N[1],j=U-N[0],F=B-N[1],W=1/id(ud((G*j+z*F)/(od(G*G+z*z)*od(j*j+F*F)))/2),q=od(N[0]*N[0]+N[1]*N[1]);C=rd(M,(h-q)/(W-1)),A=rd(M,(d-q)/(W+1))}else C=A=0}O>1e-12?A>1e-12?(m=wd(V,H,k,R,d,A,v),y=wd(U,B,I,P,d,A,v),s.moveTo(m.cx+m.x01,m.cy+m.y01),A<M?s.arc(m.cx,m.cy,A,td(m.y01,m.x01),td(y.y01,y.x01),!v):(s.arc(m.cx,m.cy,A,td(m.y01,m.x01),td(m.y11,m.x11),!v),s.arc(0,0,d,td(m.cy+m.y11,m.cx+m.x11),td(y.cy+y.y11,y.cx+y.x11),!v),s.arc(y.cx,y.cy,A,td(y.y11,y.x11),td(y.y01,y.x01),!v))):(s.moveTo(k,R),s.arc(0,0,d,b,E,!v)):s.moveTo(k,R),h>1e-12&&w>1e-12?C>1e-12?(m=wd(I,P,U,B,h,-C,v),y=wd(k,R,V,H,h,-C,v),s.lineTo(m.cx+m.x01,m.cy+m.y01),C<M?s.arc(m.cx,m.cy,C,td(m.y01,m.x01),td(y.y01,y.x01),!v):(s.arc(m.cx,m.cy,C,td(m.y01,m.x01),td(m.y11,m.x11),!v),s.arc(0,0,h,td(m.cy+m.y11,m.cx+m.x11),td(y.cy+y.y11,y.cx+y.x11),v),s.arc(y.cx,y.cy,C,td(y.y11,y.x11),td(y.y01,y.x01),!v))):s.arc(0,0,h,x,_,v):s.lineTo(I,P)}else s.moveTo(0,0);if(s.closePath(),u)return s=null,u+""||null}return u.centroid=function(){var n=(+t.apply(this,arguments)+ +e.apply(this,arguments))/2,r=(+i.apply(this,arguments)+ +o.apply(this,arguments))/2-ad/2;return[ed(r)*n,id(r)*n]},u.innerRadius=function(e){return arguments.length?(t="function"==typeof e?e:Qh(+e),u):t},u.outerRadius=function(t){return arguments.length?(e="function"==typeof t?t:Qh(+t),u):e},u.cornerRadius=function(t){return arguments.length?(n="function"==typeof t?t:Qh(+t),u):n},u.padRadius=function(t){return arguments.length?(r=null==t?null:"function"==typeof t?t:Qh(+t),u):r},u.startAngle=function(t){return arguments.length?(i="function"==typeof t?t:Qh(+t),u):i},u.endAngle=function(t){return arguments.length?(o="function"==typeof t?t:Qh(+t),u):o},u.padAngle=function(t){return arguments.length?(a="function"==typeof t?t:Qh(+t),u):a},u.context=function(t){return arguments.length?(s=null==t?null:t,u):s},u}var Td=Array.prototype.slice;function Sd(t){return"object"==typeof t&&"length"in t?t:Array.from(t)}function Md(t){this._context=t}function Cd(t){return new Md(t)}function Ad(t){return t[0]}function Ld(t){return t[1]}function Dd(t,e){var n=Qh(!0),r=null,i=Cd,o=null,a=vd(s);function s(s){var l,u,c,h=(s=Sd(s)).length,d=!1;for(null==r&&(o=i(c=a())),l=0;l<=h;++l)!(l<h&&n(u=s[l],l,s))===d&&((d=!d)?o.lineStart():o.lineEnd()),d&&o.point(+t(u,l,s),+e(u,l,s));if(c)return o=null,c+""||null}return t="function"==typeof t?t:void 0===t?Ad:Qh(t),e="function"==typeof e?e:void 0===e?Ld:Qh(e),s.x=function(e){return arguments.length?(t="function"==typeof e?e:Qh(+e),s):t},s.y=function(t){return arguments.length?(e="function"==typeof t?t:Qh(+t),s):e},s.defined=function(t){return arguments.length?(n="function"==typeof t?t:Qh(!!t),s):n},s.curve=function(t){return arguments.length?(i=t,null!=r&&(o=i(r)),s):i},s.context=function(t){return arguments.length?(null==t?r=o=null:o=i(r=t),s):r},s}function kd(t,e,n){var r=null,i=Qh(!0),o=null,a=Cd,s=null,l=vd(u);function u(u){var c,h,d,f,p,g=(u=Sd(u)).length,v=!1,m=new Array(g),y=new Array(g);for(null==o&&(s=a(p=l())),c=0;c<=g;++c){if(!(c<g&&i(f=u[c],c,u))===v)if(v=!v)h=c,s.areaStart(),s.lineStart();else{for(s.lineEnd(),s.lineStart(),d=c-1;d>=h;--d)s.point(m[d],y[d]);s.lineEnd(),s.areaEnd()}v&&(m[c]=+t(f,c,u),y[c]=+e(f,c,u),s.point(r?+r(f,c,u):m[c],n?+n(f,c,u):y[c]))}if(p)return s=null,p+""||null}function c(){return Dd().defined(i).curve(a).context(o)}return t="function"==typeof t?t:void 0===t?Ad:Qh(+t),e="function"==typeof e?e:Qh(void 0===e?0:+e),n="function"==typeof n?n:void 0===n?Ld:Qh(+n),u.x=function(e){return arguments.length?(t="function"==typeof e?e:Qh(+e),r=null,u):t},u.x0=function(e){return arguments.length?(t="function"==typeof e?e:Qh(+e),u):t},u.x1=function(t){return arguments.length?(r=null==t?null:"function"==typeof t?t:Qh(+t),u):r},u.y=function(t){return arguments.length?(e="function"==typeof t?t:Qh(+t),n=null,u):e},u.y0=function(t){return arguments.length?(e="function"==typeof t?t:Qh(+t),u):e},u.y1=function(t){return arguments.length?(n=null==t?null:"function"==typeof t?t:Qh(+t),u):n},u.lineX0=u.lineY0=function(){return c().x(t).y(e)},u.lineY1=function(){return c().x(t).y(n)},u.lineX1=function(){return c().x(r).y(e)},u.defined=function(t){return arguments.length?(i="function"==typeof t?t:Qh(!!t),u):i},u.curve=function(t){return arguments.length?(a=t,null!=o&&(s=a(o)),u):a},u.context=function(t){return arguments.length?(null==t?o=s=null:s=a(o=t),u):o},u}function Rd(t,e){return e<t?-1:e>t?1:e>=t?0:NaN}function Id(t){return t}Md.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,e){switch(t=+t,e=+e,this._point){case 0:this._point=1,this._line?this._context.lineTo(t,e):this._context.moveTo(t,e);break;case 1:this._point=2;default:this._context.lineTo(t,e)}}};var Pd=Ud(Cd);function Nd(t){this._curve=t}function Ud(t){function e(e){return new Nd(t(e))}return e._curve=t,e}function Bd(){return function(t){var e=t.curve;return t.angle=t.x,delete t.x,t.radius=t.y,delete t.y,t.curve=function(t){return arguments.length?e(Ud(t)):e()._curve},t}(Dd().curve(Pd))}Nd.prototype={areaStart:function(){this._curve.areaStart()},areaEnd:function(){this._curve.areaEnd()},lineStart:function(){this._curve.lineStart()},lineEnd:function(){this._curve.lineEnd()},point:function(t,e){this._curve.point(e*Math.sin(t),e*-Math.cos(t))}};class Vd{constructor(t,e){this._context=t,this._x=e}areaStart(){this._line=0}areaEnd(){this._line=NaN}lineStart(){this._point=0}lineEnd(){(this._line||0!==this._line&&1===this._point)&&this._context.closePath(),this._line=1-this._line}point(t,e){switch(t=+t,e=+e,this._point){case 0:this._point=1,this._line?this._context.lineTo(t,e):this._context.moveTo(t,e);break;case 1:this._point=2;default:this._x?this._context.bezierCurveTo(this._x0=(this._x0+t)/2,this._y0,this._x0,e,t,e):this._context.bezierCurveTo(this._x0,this._y0=(this._y0+e)/2,t,this._y0,t,e)}this._x0=t,this._y0=e}}function Hd(t){return new Vd(t,!0)}function Gd(t){return t.source}function zd(t){return t.target}function jd(){return function(t){let e=Gd,n=zd,r=Ad,i=Ld,o=null,a=null,s=vd(l);function l(){let l;const u=Td.call(arguments),c=e.apply(this,u),h=n.apply(this,u);if(null==o&&(a=t(l=s())),a.lineStart(),u[0]=c,a.point(+r.apply(this,u),+i.apply(this,u)),u[0]=h,a.point(+r.apply(this,u),+i.apply(this,u)),a.lineEnd(),l)return a=null,l+""||null}return l.source=function(t){return arguments.length?(e=t,l):e},l.target=function(t){return arguments.length?(n=t,l):n},l.x=function(t){return arguments.length?(r="function"==typeof t?t:Qh(+t),l):r},l.y=function(t){return arguments.length?(i="function"==typeof t?t:Qh(+t),l):i},l.context=function(e){return arguments.length?(null==e?o=a=null:a=t(o=e),l):o},l}(Hd)}function Fd(){}function Wd(t,e,n){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+e)/6,(t._y0+4*t._y1+n)/6)}function qd(t){this._context=t}function Yd(t){return new qd(t)}function Zd(t){this._context=t}function Xd(t){return new Zd(t)}function $d(t){this._context=t}function Kd(t){return new $d(t)}function Qd(t,e){this._basis=new qd(t),this._beta=e}qd.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:Wd(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,e){switch(t=+t,e=+e,this._point){case 0:this._point=1,this._line?this._context.lineTo(t,e):this._context.moveTo(t,e);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:Wd(this,t,e)}this._x0=this._x1,this._x1=t,this._y0=this._y1,this._y1=e}},Zd.prototype={areaStart:Fd,areaEnd:Fd,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,e){switch(t=+t,e=+e,this._point){case 0:this._point=1,this._x2=t,this._y2=e;break;case 1:this._point=2,this._x3=t,this._y3=e;break;case 2:this._point=3,this._x4=t,this._y4=e,this._context.moveTo((this._x0+4*this._x1+t)/6,(this._y0+4*this._y1+e)/6);break;default:Wd(this,t,e)}this._x0=this._x1,this._x1=t,this._y0=this._y1,this._y1=e}},$d.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,e){switch(t=+t,e=+e,this._point){case 0:this._point=1;break;case 1:this._point=2;break;case 2:this._point=3;var n=(this._x0+4*this._x1+t)/6,r=(this._y0+4*this._y1+e)/6;this._line?this._context.lineTo(n,r):this._context.moveTo(n,r);break;case 3:this._point=4;default:Wd(this,t,e)}this._x0=this._x1,this._x1=t,this._y0=this._y1,this._y1=e}},Qd.prototype={lineStart:function(){this._x=[],this._y=[],this._basis.lineStart()},lineEnd:function(){var t=this._x,e=this._y,n=t.length-1;if(n>0)for(var r,i=t[0],o=e[0],a=t[n]-i,s=e[n]-o,l=-1;++l<=n;)r=l/n,this._basis.point(this._beta*t[l]+(1-this._beta)*(i+r*a),this._beta*e[l]+(1-this._beta)*(o+r*s));this._x=this._y=null,this._basis.lineEnd()},point:function(t,e){this._x.push(+t),this._y.push(+e)}};var Jd=function t(e){function n(t){return 1===e?new qd(t):new Qd(t,e)}return n.beta=function(e){return t(+e)},n}(.85);function tf(t,e,n){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-e),t._y2+t._k*(t._y1-n),t._x2,t._y2)}function ef(t,e){this._context=t,this._k=(1-e)/6}ef.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:tf(this,this._x1,this._y1)}(this._line||0!==this._line&&1===this._point)&&this._context.closePath(),this._line=1-this._line},point:function(t,e){switch(t=+t,e=+e,this._point){case 0:this._point=1,this._line?this._context.lineTo(t,e):this._context.moveTo(t,e);break;case 1:this._point=2,this._x1=t,this._y1=e;break;case 2:this._point=3;default:tf(this,t,e)}this._x0=this._x1,this._x1=this._x2,this._x2=t,this._y0=this._y1,this._y1=this._y2,this._y2=e}};var nf=function t(e){function n(t){return new ef(t,e)}return n.tension=function(e){return t(+e)},n}(0);function rf(t,e){this._context=t,this._k=(1-e)/6}rf.prototype={areaStart:Fd,areaEnd:Fd,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,e){switch(t=+t,e=+e,this._point){case 0:this._point=1,this._x3=t,this._y3=e;break;case 1:this._point=2,this._context.moveTo(this._x4=t,this._y4=e);break;case 2:this._point=3,this._x5=t,this._y5=e;break;default:tf(this,t,e)}this._x0=this._x1,this._x1=this._x2,this._x2=t,this._y0=this._y1,this._y1=this._y2,this._y2=e}};var of=function t(e){function n(t){return new rf(t,e)}return n.tension=function(e){return t(+e)},n}(0);function af(t,e){this._context=t,this._k=(1-e)/6}af.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,e){switch(t=+t,e=+e,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:tf(this,t,e)}this._x0=this._x1,this._x1=this._x2,this._x2=t,this._y0=this._y1,this._y1=this._y2,this._y2=e}};var sf=function t(e){function n(t){return new af(t,e)}return n.tension=function(e){return t(+e)},n}(0);function lf(t,e,n){var r=t._x1,i=t._y1,o=t._x2,a=t._y2;if(t._l01_a>1e-12){var s=2*t._l01_2a+3*t._l01_a*t._l12_a+t._l12_2a,l=3*t._l01_a*(t._l01_a+t._l12_a);r=(r*s-t._x0*t._l12_2a+t._x2*t._l01_2a)/l,i=(i*s-t._y0*t._l12_2a+t._y2*t._l01_2a)/l}if(t._l23_a>1e-12){var u=2*t._l23_2a+3*t._l23_a*t._l12_a+t._l12_2a,c=3*t._l23_a*(t._l23_a+t._l12_a);o=(o*u+t._x1*t._l23_2a-e*t._l12_2a)/c,a=(a*u+t._y1*t._l23_2a-n*t._l12_2a)/c}t._context.bezierCurveTo(r,i,o,a,t._x2,t._y2)}function uf(t,e){this._context=t,this._alpha=e}uf.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,e){if(t=+t,e=+e,this._point){var n=this._x2-t,r=this._y2-e;this._l23_a=Math.sqrt(this._l23_2a=Math.pow(n*n+r*r,this._alpha))}switch(this._point){case 0:this._point=1,this._line?this._context.lineTo(t,e):this._context.moveTo(t,e);break;case 1:this._point=2;break;case 2:this._point=3;default:lf(this,t,e)}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=e}};var cf=function t(e){function n(t){return e?new uf(t,e):new ef(t,0)}return n.alpha=function(e){return t(+e)},n}(.5);function hf(t,e){this._context=t,this._alpha=e}hf.prototype={areaStart:Fd,areaEnd:Fd,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,e){if(t=+t,e=+e,this._point){var n=this._x2-t,r=this._y2-e;this._l23_a=Math.sqrt(this._l23_2a=Math.pow(n*n+r*r,this._alpha))}switch(this._point){case 0:this._point=1,this._x3=t,this._y3=e;break;case 1:this._point=2,this._context.moveTo(this._x4=t,this._y4=e);break;case 2:this._point=3,this._x5=t,this._y5=e;break;default:lf(this,t,e)}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=e}};var df=function t(e){function n(t){return e?new hf(t,e):new rf(t,0)}return n.alpha=function(e){return t(+e)},n}(.5);function ff(t,e){this._context=t,this._alpha=e}ff.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,e){if(t=+t,e=+e,this._point){var n=this._x2-t,r=this._y2-e;this._l23_a=Math.sqrt(this._l23_2a=Math.pow(n*n+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:lf(this,t,e)}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=e}};var pf=function t(e){function n(t){return e?new ff(t,e):new af(t,0)}return n.alpha=function(e){return t(+e)},n}(.5);function gf(t){this._context=t}function vf(t){return new gf(t)}function mf(t){return t<0?-1:1}function yf(t,e,n){var r=t._x1-t._x0,i=e-t._x1,o=(t._y1-t._y0)/(r||i<0&&-0),a=(n-t._y1)/(i||r<0&&-0),s=(o*i+a*r)/(r+i);return(mf(o)+mf(a))*Math.min(Math.abs(o),Math.abs(a),.5*Math.abs(s))||0}function bf(t,e){var n=t._x1-t._x0;return n?(3*(t._y1-t._y0)/n-e)/2:e}function Ef(t,e,n){var r=t._x0,i=t._y0,o=t._x1,a=t._y1,s=(o-r)/3;t._context.bezierCurveTo(r+s,i+s*e,o-s,a-s*n,o,a)}function _f(t){this._context=t}function xf(t){this._context=new wf(t)}function wf(t){this._context=t}function Of(t){return new _f(t)}function Tf(t){return new xf(t)}function Sf(t){this._context=t}function Mf(t){var e,n,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],e=1;e<r-1;++e)i[e]=1,o[e]=4,a[e]=4*t[e]+2*t[e+1];for(i[r-1]=2,o[r-1]=7,a[r-1]=8*t[r-1]+t[r],e=1;e<r;++e)n=i[e]/o[e-1],o[e]-=n,a[e]-=n*a[e-1];for(i[r-1]=a[r-1]/o[r-1],e=r-2;e>=0;--e)i[e]=(a[e]-i[e+1])/o[e];for(o[r-1]=(t[r]+i[r-1])/2,e=0;e<r-1;++e)o[e]=2*t[e+1]-i[e+1];return[i,o]}function Cf(t){return new Sf(t)}function Af(t,e){this._context=t,this._t=e}function Lf(t){return new Af(t,.5)}function Df(t){return new Af(t,0)}function kf(t){return new Af(t,1)}function Rf(t,e){if((i=t.length)>1)for(var n,r,i,o=1,a=t[e[0]],s=a.length;o<i;++o)for(r=a,a=t[e[o]],n=0;n<s;++n)a[n][1]+=a[n][0]=isNaN(r[n][1])?r[n][0]:r[n][1]}function If(t){for(var e=t.length,n=new Array(e);--e>=0;)n[e]=e;return n}function Pf(t,e){return t[e]}function Nf(t){const e=[];return e.key=t,e}function Uf(){var t=Qh([]),e=If,n=Rf,r=Pf;function i(i){var o,a,s=Array.from(t.apply(this,arguments),Nf),l=s.length,u=-1;for(const t of i)for(o=0,++u;o<l;++o)(s[o][u]=[0,+r(t,s[o].key,u,i)]).data=t;for(o=0,a=Sd(e(s));o<l;++o)s[a[o]].index=o;return n(s,a),s}return i.keys=function(e){return arguments.length?(t="function"==typeof e?e:Qh(Array.from(e)),i):t},i.value=function(t){return arguments.length?(r="function"==typeof t?t:Qh(+t),i):r},i.order=function(t){return arguments.length?(e=null==t?If:"function"==typeof t?t:Qh(Array.from(t)),i):e},i.offset=function(t){return arguments.length?(n=null==t?Rf:t,i):n},i}function Bf(t,e){if((s=t.length)>0)for(var n,r,i,o,a,s,l=0,u=t[e[0]].length;l<u;++l)for(o=a=0,n=0;n<s;++n)(i=(r=t[e[n]][l])[1]-r[0])>0?(r[0]=o,r[1]=o+=i):i<0?(r[1]=a,r[0]=a+=i):(r[0]=0,r[1]=i)}function Vf(t){if(arguments.length<1)throw new TypeError("1 argument required, but only "+arguments.length+" present");var e=Object.prototype.toString.call(t);return t instanceof Date||"object"==typeof t&&"[object Date]"===e?new Date(t.getTime()):"number"==typeof t||"[object Number]"===e?new Date(t):("string"!=typeof t&&"[object String]"!==e||"undefined"==typeof console||(console.warn("Starting with v2.0.0-beta.1 date-fns doesn't accept strings as arguments. Please use `parseISO` to parse strings. See: https://git.io/fjule"),console.warn((new Error).stack)),new Date(NaN))}function Hf(t){if(null===t||!0===t||!1===t)return NaN;var e=Number(t);return isNaN(e)?e:e<0?Math.ceil(e):Math.floor(e)}function Gf(t,e){if(arguments.length<2)throw new TypeError("2 arguments required, but only "+arguments.length+" present");var n=Vf(t),r=Hf(e);return n.setDate(n.getDate()+r),n}function zf(t,e){if(arguments.length<2)throw new TypeError("2 arguments required, but only "+arguments.length+" present");var n=Vf(t).getTime(),r=Hf(e);return new Date(n+r)}gf.prototype={areaStart:Fd,areaEnd:Fd,lineStart:function(){this._point=0},lineEnd:function(){this._point&&this._context.closePath()},point:function(t,e){t=+t,e=+e,this._point?this._context.lineTo(t,e):(this._point=1,this._context.moveTo(t,e))}},_f.prototype={areaStart:function(){this._line=0},areaEnd:function(){this._line=NaN},lineStart:function(){this._x0=this._x1=this._y0=this._y1=this._t0=NaN,this._point=0},lineEnd:function(){switch(this._point){case 2:this._context.lineTo(this._x1,this._y1);break;case 3:Ef(this,this._t0,bf(this,this._t0))}(this._line||0!==this._line&&1===this._point)&&this._context.closePath(),this._line=1-this._line},point:function(t,e){var n=NaN;if(e=+e,(t=+t)!==this._x1||e!==this._y1){switch(this._point){case 0:this._point=1,this._line?this._context.lineTo(t,e):this._context.moveTo(t,e);break;case 1:this._point=2;break;case 2:this._point=3,Ef(this,bf(this,n=yf(this,t,e)),n);break;default:Ef(this,this._t0,n=yf(this,t,e))}this._x0=this._x1,this._x1=t,this._y0=this._y1,this._y1=e,this._t0=n}}},(xf.prototype=Object.create(_f.prototype)).point=function(t,e){_f.prototype.point.call(this,e,t)},wf.prototype={moveTo:function(t,e){this._context.moveTo(e,t)},closePath:function(){this._context.closePath()},lineTo:function(t,e){this._context.lineTo(e,t)},bezierCurveTo:function(t,e,n,r,i,o){this._context.bezierCurveTo(e,t,r,n,o,i)}},Sf.prototype={areaStart:function(){this._line=0},areaEnd:function(){this._line=NaN},lineStart:function(){this._x=[],this._y=[]},lineEnd:function(){var t=this._x,e=this._y,n=t.length;if(n)if(this._line?this._context.lineTo(t[0],e[0]):this._context.moveTo(t[0],e[0]),2===n)this._context.lineTo(t[1],e[1]);else for(var r=Mf(t),i=Mf(e),o=0,a=1;a<n;++o,++a)this._context.bezierCurveTo(r[0][o],i[0][o],r[1][o],i[1][o],t[a],e[a]);(this._line||0!==this._line&&1===n)&&this._context.closePath(),this._line=1-this._line,this._x=this._y=null},point:function(t,e){this._x.push(+t),this._y.push(+e)}},Af.prototype={areaStart:function(){this._line=0},areaEnd:function(){this._line=NaN},lineStart:function(){this._x=this._y=NaN,this._point=0},lineEnd:function(){0<this._t&&this._t<1&&2===this._point&&this._context.lineTo(this._x,this._y),(this._line||0!==this._line&&1===this._point)&&this._context.closePath(),this._line>=0&&(this._t=1-this._t,this._line=1-this._line)},point:function(t,e){switch(t=+t,e=+e,this._point){case 0:this._point=1,this._line?this._context.lineTo(t,e):this._context.moveTo(t,e);break;case 1:this._point=2;default:if(this._t<=0)this._context.lineTo(this._x,e),this._context.lineTo(t,e);else{var n=this._x*(1-this._t)+t*this._t;this._context.lineTo(n,this._y),this._context.lineTo(n,e)}}this._x=t,this._y=e}};function jf(t,e){if(arguments.length<2)throw new TypeError("2 arguments required, but only "+arguments.length+" present");var n=Hf(e);return zf(t,36e5*n)}function Ff(t){var e=new Date(t.getTime()),n=Math.ceil(e.getTimezoneOffset());return e.setSeconds(0,0),6e4*n+e.getTime()%6e4}function Wf(t){if(arguments.length<1)throw new TypeError("1 argument required, but only "+arguments.length+" present");var e=Vf(t);return e.setHours(0,0,0,0),e}function qf(t,e){if(arguments.length<2)throw new TypeError("2 arguments required, but only "+arguments.length+" present");var n=Wf(t),r=Wf(e),i=n.getTime()-Ff(n),o=r.getTime()-Ff(r);return Math.round((i-o)/864e5)}function Yf(t,e){if(arguments.length<2)throw new TypeError("2 arguments required, but only "+arguments.length+" present");var n=Hf(e);return zf(t,6e4*n)}function Zf(t){if(arguments.length<1)throw new TypeError("1 argument required, but only "+arguments.length+" present");var e=Vf(t),n=e.getFullYear(),r=e.getMonth(),i=new Date(0);return i.setFullYear(n,r+1,0),i.setHours(0,0,0,0),i.getDate()}function Xf(t,e){if(arguments.length<2)throw new TypeError("2 arguments required, but only "+arguments.length+" present");var n=Vf(t),r=Hf(e),i=n.getMonth()+r,o=new Date(0);o.setFullYear(n.getFullYear(),i,1),o.setHours(0,0,0,0);var a=Zf(o);return n.setMonth(i,Math.min(a,n.getDate())),n}function $f(t,e){if(arguments.length<2)throw new TypeError("2 arguments required, but only "+arguments.length+" present");var n=Hf(e);return zf(t,1e3*n)}function Kf(t,e){if(arguments.length<2)throw new TypeError("2 arguments required, but only "+arguments.length+" present");var n=Hf(e);return Xf(t,12*n)}function Qf(t,e){if(arguments.length<2)throw new TypeError("2 arguments required, but only "+arguments.length+" present");var n=Vf(t),r=Vf(e),i=n.getTime()-r.getTime();return i<0?-1:i>0?1:i}function Jf(t){if(arguments.length<1)throw new TypeError("1 argument required, but only "+arguments.length+" present");var e=Vf(t);return!isNaN(e)}function tp(t,e){if(arguments.length<2)throw new TypeError("2 arguments required, but only "+arguments.length+" present");var n=Vf(t),r=Vf(e),i=n.getFullYear()-r.getFullYear(),o=n.getMonth()-r.getMonth();return 12*i+o}function ep(t,e){if(arguments.length<2)throw new TypeError("2 arguments required, but only "+arguments.length+" present");var n=Vf(t),r=Vf(e);return n.getFullYear()-r.getFullYear()}function np(t,e){if(arguments.length<2)throw new TypeError("2 arguments required, but only "+arguments.length+" present");var n=Vf(t),r=Vf(e);return n.getTime()-r.getTime()}function rp(t,e){if(arguments.length<2)throw new TypeError("2 arguments required, but only "+arguments.length+" present");var n=np(t,e)/6e4;return n>0?Math.floor(n):Math.ceil(n)}function ip(t,e){if(arguments.length<2)throw new TypeError("2 arguments required, but only "+arguments.length+" present");var n=np(t,e)/1e3;return n>0?Math.floor(n):Math.ceil(n)}var op={lessThanXSeconds:{one:"less than a second",other:"less than {{count}} seconds"},xSeconds:{one:"1 second",other:"{{count}} seconds"},halfAMinute:"half a minute",lessThanXMinutes:{one:"less than a minute",other:"less than {{count}} minutes"},xMinutes:{one:"1 minute",other:"{{count}} minutes"},aboutXHours:{one:"about 1 hour",other:"about {{count}} hours"},xHours:{one:"1 hour",other:"{{count}} hours"},xDays:{one:"1 day",other:"{{count}} days"},aboutXMonths:{one:"about 1 month",other:"about {{count}} months"},xMonths:{one:"1 month",other:"{{count}} months"},aboutXYears:{one:"about 1 year",other:"about {{count}} years"},xYears:{one:"1 year",other:"{{count}} years"},overXYears:{one:"over 1 year",other:"over {{count}} years"},almostXYears:{one:"almost 1 year",other:"almost {{count}} years"}};function ap(t){return function(e){var n=e||{},r=n.width?String(n.width):t.defaultWidth;return t.formats[r]||t.formats[t.defaultWidth]}}var sp={date:ap({formats:{full:"EEEE, MMMM do, y",long:"MMMM do, y",medium:"MMM d, y",short:"MM/dd/yyyy"},defaultWidth:"full"}),time:ap({formats:{full:"h:mm:ss a zzzz",long:"h:mm:ss a z",medium:"h:mm:ss a",short:"h:mm a"},defaultWidth:"full"}),dateTime:ap({formats:{full:"{{date}} 'at' {{time}}",long:"{{date}} 'at' {{time}}",medium:"{{date}}, {{time}}",short:"{{date}}, {{time}}"},defaultWidth:"full"})},lp={lastWeek:"'last' eeee 'at' p",yesterday:"'yesterday at' p",today:"'today at' p",tomorrow:"'tomorrow at' p",nextWeek:"eeee 'at' p",other:"P"};function up(t){return function(e,n){var r,i=n||{};if("formatting"===(i.context?String(i.context):"standalone")&&t.formattingValues){var o=t.defaultFormattingWidth||t.defaultWidth,a=i.width?String(i.width):o;r=t.formattingValues[a]||t.formattingValues[o]}else{var s=t.defaultWidth,l=i.width?String(i.width):t.defaultWidth;r=t.values[l]||t.values[s]}return r[t.argumentCallback?t.argumentCallback(e):e]}}function cp(t){return function(e,n){var r=String(e),i=n||{},o=i.width,a=o&&t.matchPatterns[o]||t.matchPatterns[t.defaultMatchWidth],s=r.match(a);if(!s)return null;var l,u=s[0],c=o&&t.parsePatterns[o]||t.parsePatterns[t.defaultParseWidth];return l="[object Array]"===Object.prototype.toString.call(c)?function(t,e){for(var n=0;n<t.length;n++)if(e(t[n]))return n}(c,(function(t){return t.test(r)})):function(t,e){for(var n in t)if(t.hasOwnProperty(n)&&e(t[n]))return n}(c,(function(t){return t.test(r)})),l=t.valueCallback?t.valueCallback(l):l,{value:l=i.valueCallback?i.valueCallback(l):l,rest:r.slice(u.length)}}}var hp,dp={code:"en-US",formatDistance:function(t,e,n){var r;return n=n||{},r="string"==typeof op[t]?op[t]:1===e?op[t].one:op[t].other.replace("{{count}}",e),n.addSuffix?n.comparison>0?"in "+r:r+" ago":r},formatLong:sp,formatRelative:function(t,e,n,r){return lp[t]},localize:{ordinalNumber:function(t,e){var n=Number(t),r=n%100;if(r>20||r<10)switch(r%10){case 1:return n+"st";case 2:return n+"nd";case 3:return n+"rd"}return n+"th"},era:up({values:{narrow:["B","A"],abbreviated:["BC","AD"],wide:["Before Christ","Anno Domini"]},defaultWidth:"wide"}),quarter:up({values:{narrow:["1","2","3","4"],abbreviated:["Q1","Q2","Q3","Q4"],wide:["1st quarter","2nd quarter","3rd quarter","4th quarter"]},defaultWidth:"wide",argumentCallback:function(t){return Number(t)-1}}),month:up({values:{narrow:["J","F","M","A","M","J","J","A","S","O","N","D"],abbreviated:["Jan","Feb","Mar","Apr","May","Jun","Jul","Aug","Sep","Oct","Nov","Dec"],wide:["January","February","March","April","May","June","July","August","September","October","November","December"]},defaultWidth:"wide"}),day:up({values:{narrow:["S","M","T","W","T","F","S"],short:["Su","Mo","Tu","We","Th","Fr","Sa"],abbreviated:["Sun","Mon","Tue","Wed","Thu","Fri","Sat"],wide:["Sunday","Monday","Tuesday","Wednesday","Thursday","Friday","Saturday"]},defaultWidth:"wide"}),dayPeriod:up({values:{narrow:{am:"a",pm:"p",midnight:"mi",noon:"n",morning:"morning",afternoon:"afternoon",evening:"evening",night:"night"},abbreviated:{am:"AM",pm:"PM",midnight:"midnight",noon:"noon",morning:"morning",afternoon:"afternoon",evening:"evening",night:"night"},wide:{am:"a.m.",pm:"p.m.",midnight:"midnight",noon:"noon",morning:"morning",afternoon:"afternoon",evening:"evening",night:"night"}},defaultWidth:"wide",formattingValues:{narrow:{am:"a",pm:"p",midnight:"mi",noon:"n",morning:"in the morning",afternoon:"in the afternoon",evening:"in the evening",night:"at night"},abbreviated:{am:"AM",pm:"PM",midnight:"midnight",noon:"noon",morning:"in the morning",afternoon:"in the afternoon",evening:"in the evening",night:"at night"},wide:{am:"a.m.",pm:"p.m.",midnight:"midnight",noon:"noon",morning:"in the morning",afternoon:"in the afternoon",evening:"in the evening",night:"at night"}},defaultFormattingWidth:"wide"})},match:{ordinalNumber:(hp={matchPattern:/^(\d+)(th|st|nd|rd)?/i,parsePattern:/\d+/i,valueCallback:function(t){return parseInt(t,10)}},function(t,e){var n=String(t),r=e||{},i=n.match(hp.matchPattern);if(!i)return null;var o=i[0],a=n.match(hp.parsePattern);if(!a)return null;var s=hp.valueCallback?hp.valueCallback(a[0]):a[0];return{value:s=r.valueCallback?r.valueCallback(s):s,rest:n.slice(o.length)}}),era:cp({matchPatterns:{narrow:/^(b|a)/i,abbreviated:/^(b\.?\s?c\.?|b\.?\s?c\.?\s?e\.?|a\.?\s?d\.?|c\.?\s?e\.?)/i,wide:/^(before christ|before common era|anno domini|common era)/i},defaultMatchWidth:"wide",parsePatterns:{any:[/^b/i,/^(a|c)/i]},defaultParseWidth:"any"}),quarter:cp({matchPatterns:{narrow:/^[1234]/i,abbreviated:/^q[1234]/i,wide:/^[1234](th|st|nd|rd)? quarter/i},defaultMatchWidth:"wide",parsePatterns:{any:[/1/i,/2/i,/3/i,/4/i]},defaultParseWidth:"any",valueCallback:function(t){return t+1}}),month:cp({matchPatterns:{narrow:/^[jfmasond]/i,abbreviated:/^(jan|feb|mar|apr|may|jun|jul|aug|sep|oct|nov|dec)/i,wide:/^(january|february|march|april|may|june|july|august|september|october|november|december)/i},defaultMatchWidth:"wide",parsePatterns:{narrow:[/^j/i,/^f/i,/^m/i,/^a/i,/^m/i,/^j/i,/^j/i,/^a/i,/^s/i,/^o/i,/^n/i,/^d/i],any:[/^ja/i,/^f/i,/^mar/i,/^ap/i,/^may/i,/^jun/i,/^jul/i,/^au/i,/^s/i,/^o/i,/^n/i,/^d/i]},defaultParseWidth:"any"}),day:cp({matchPatterns:{narrow:/^[smtwf]/i,short:/^(su|mo|tu|we|th|fr|sa)/i,abbreviated:/^(sun|mon|tue|wed|thu|fri|sat)/i,wide:/^(sunday|monday|tuesday|wednesday|thursday|friday|saturday)/i},defaultMatchWidth:"wide",parsePatterns:{narrow:[/^s/i,/^m/i,/^t/i,/^w/i,/^t/i,/^f/i,/^s/i],any:[/^su/i,/^m/i,/^tu/i,/^w/i,/^th/i,/^f/i,/^sa/i]},defaultParseWidth:"any"}),dayPeriod:cp({matchPatterns:{narrow:/^(a|p|mi|n|(in the|at) (morning|afternoon|evening|night))/i,any:/^([ap]\.?\s?m\.?|midnight|noon|(in the|at) (morning|afternoon|evening|night))/i},defaultMatchWidth:"any",parsePatterns:{any:{am:/^a/i,pm:/^p/i,midnight:/^mi/i,noon:/^no/i,morning:/morning/i,afternoon:/afternoon/i,evening:/evening/i,night:/night/i}},defaultParseWidth:"any"})},options:{weekStartsOn:0,firstWeekContainsDate:1}};function fp(t,e){if(arguments.length<2)throw new TypeError("2 arguments required, but only "+arguments.length+" present");var n=Hf(e);return zf(t,-n)}function pp(t,e){for(var n=t<0?"-":"",r=Math.abs(t).toString();r.length<e;)r="0"+r;return n+r}var gp=function(t,e){var n=t.getUTCFullYear(),r=n>0?n:1-n;return pp("yy"===e?r%100:r,e.length)},vp=function(t,e){var n=t.getUTCMonth();return"M"===e?String(n+1):pp(n+1,2)},mp=function(t,e){return pp(t.getUTCDate(),e.length)},yp=function(t,e){return pp(t.getUTCHours()%12||12,e.length)},bp=function(t,e){return pp(t.getUTCHours(),e.length)},Ep=function(t,e){return pp(t.getUTCMinutes(),e.length)},_p=function(t,e){return pp(t.getUTCSeconds(),e.length)},xp=function(t,e){var n=e.length,r=t.getUTCMilliseconds();return pp(Math.floor(r*Math.pow(10,n-3)),e.length)};function wp(t){if(arguments.length<1)throw new TypeError("1 argument required, but only "+arguments.length+" present");var e=1,n=Vf(t),r=n.getUTCDay(),i=(r<e?7:0)+r-e;return n.setUTCDate(n.getUTCDate()-i),n.setUTCHours(0,0,0,0),n}function Op(t){if(arguments.length<1)throw new TypeError("1 argument required, but only "+arguments.length+" present");var e=Vf(t),n=e.getUTCFullYear(),r=new Date(0);r.setUTCFullYear(n+1,0,4),r.setUTCHours(0,0,0,0);var i=wp(r),o=new Date(0);o.setUTCFullYear(n,0,4),o.setUTCHours(0,0,0,0);var a=wp(o);return e.getTime()>=i.getTime()?n+1:e.getTime()>=a.getTime()?n:n-1}function Tp(t){if(arguments.length<1)throw new TypeError("1 argument required, but only "+arguments.length+" present");var e=Op(t),n=new Date(0);n.setUTCFullYear(e,0,4),n.setUTCHours(0,0,0,0);var r=wp(n);return r}function Sp(t,e){if(arguments.length<1)throw new TypeError("1 argument required, but only "+arguments.length+" present");var n=e||{},r=n.locale,i=r&&r.options&&r.options.weekStartsOn,o=null==i?0:Hf(i),a=null==n.weekStartsOn?o:Hf(n.weekStartsOn);if(!(a>=0&&a<=6))throw new RangeError("weekStartsOn must be between 0 and 6 inclusively");var s=Vf(t),l=s.getUTCDay(),u=(l<a?7:0)+l-a;return s.setUTCDate(s.getUTCDate()-u),s.setUTCHours(0,0,0,0),s}function Mp(t,e){if(arguments.length<1)throw new TypeError("1 argument required, but only "+arguments.length+" present");var n=Vf(t,e),r=n.getUTCFullYear(),i=e||{},o=i.locale,a=o&&o.options&&o.options.firstWeekContainsDate,s=null==a?1:Hf(a),l=null==i.firstWeekContainsDate?s:Hf(i.firstWeekContainsDate);if(!(l>=1&&l<=7))throw new RangeError("firstWeekContainsDate must be between 1 and 7 inclusively");var u=new Date(0);u.setUTCFullYear(r+1,0,l),u.setUTCHours(0,0,0,0);var c=Sp(u,e),h=new Date(0);h.setUTCFullYear(r,0,l),h.setUTCHours(0,0,0,0);var d=Sp(h,e);return n.getTime()>=c.getTime()?r+1:n.getTime()>=d.getTime()?r:r-1}function Cp(t,e){if(arguments.length<1)throw new TypeError("1 argument required, but only "+arguments.length+" present");var n=e||{},r=n.locale,i=r&&r.options&&r.options.firstWeekContainsDate,o=null==i?1:Hf(i),a=null==n.firstWeekContainsDate?o:Hf(n.firstWeekContainsDate),s=Mp(t,e),l=new Date(0);l.setUTCFullYear(s,0,a),l.setUTCHours(0,0,0,0);var u=Sp(l,e);return u}var Ap="midnight",Lp="noon",Dp="morning",kp="afternoon",Rp="evening",Ip="night",Pp={G:function(t,e,n){var r=t.getUTCFullYear()>0?1:0;switch(e){case"G":case"GG":case"GGG":return n.era(r,{width:"abbreviated"});case"GGGGG":return n.era(r,{width:"narrow"});case"GGGG":default:return n.era(r,{width:"wide"})}},y:function(t,e,n){if("yo"===e){var r=t.getUTCFullYear(),i=r>0?r:1-r;return n.ordinalNumber(i,{unit:"year"})}return gp(t,e)},Y:function(t,e,n,r){var i=Mp(t,r),o=i>0?i:1-i;return"YY"===e?pp(o%100,2):"Yo"===e?n.ordinalNumber(o,{unit:"year"}):pp(o,e.length)},R:function(t,e){return pp(Op(t),e.length)},u:function(t,e){return pp(t.getUTCFullYear(),e.length)},Q:function(t,e,n){var r=Math.ceil((t.getUTCMonth()+1)/3);switch(e){case"Q":return String(r);case"QQ":return pp(r,2);case"Qo":return n.ordinalNumber(r,{unit:"quarter"});case"QQQ":return n.quarter(r,{width:"abbreviated",context:"formatting"});case"QQQQQ":return n.quarter(r,{width:"narrow",context:"formatting"});case"QQQQ":default:return n.quarter(r,{width:"wide",context:"formatting"})}},q:function(t,e,n){var r=Math.ceil((t.getUTCMonth()+1)/3);switch(e){case"q":return String(r);case"qq":return pp(r,2);case"qo":return n.ordinalNumber(r,{unit:"quarter"});case"qqq":return n.quarter(r,{width:"abbreviated",context:"standalone"});case"qqqqq":return n.quarter(r,{width:"narrow",context:"standalone"});case"qqqq":default:return n.quarter(r,{width:"wide",context:"standalone"})}},M:function(t,e,n){var r=t.getUTCMonth();switch(e){case"M":case"MM":return vp(t,e);case"Mo":return n.ordinalNumber(r+1,{unit:"month"});case"MMM":return n.month(r,{width:"abbreviated",context:"formatting"});case"MMMMM":return n.month(r,{width:"narrow",context:"formatting"});case"MMMM":default:return n.month(r,{width:"wide",context:"formatting"})}},L:function(t,e,n){var r=t.getUTCMonth();switch(e){case"L":return String(r+1);case"LL":return pp(r+1,2);case"Lo":return n.ordinalNumber(r+1,{unit:"month"});case"LLL":return n.month(r,{width:"abbreviated",context:"standalone"});case"LLLLL":return n.month(r,{width:"narrow",context:"standalone"});case"LLLL":default:return n.month(r,{width:"wide",context:"standalone"})}},w:function(t,e,n,r){var i=function(t,e){if(arguments.length<1)throw new TypeError("1 argument required, but only "+arguments.length+" present");var n=Vf(t),r=Sp(n,e).getTime()-Cp(n,e).getTime();return Math.round(r/6048e5)+1}(t,r);return"wo"===e?n.ordinalNumber(i,{unit:"week"}):pp(i,e.length)},I:function(t,e,n){var r=function(t){if(arguments.length<1)throw new TypeError("1 argument required, but only "+arguments.length+" present");var e=Vf(t),n=wp(e).getTime()-Tp(e).getTime();return Math.round(n/6048e5)+1}(t);return"Io"===e?n.ordinalNumber(r,{unit:"week"}):pp(r,e.length)},d:function(t,e,n){return"do"===e?n.ordinalNumber(t.getUTCDate(),{unit:"date"}):mp(t,e)},D:function(t,e,n){var r=function(t){if(arguments.length<1)throw new TypeError("1 argument required, but only "+arguments.length+" present");var e=Vf(t),n=e.getTime();e.setUTCMonth(0,1),e.setUTCHours(0,0,0,0);var r=e.getTime(),i=n-r;return Math.floor(i/864e5)+1}(t);return"Do"===e?n.ordinalNumber(r,{unit:"dayOfYear"}):pp(r,e.length)},E:function(t,e,n){var r=t.getUTCDay();switch(e){case"E":case"EE":case"EEE":return n.day(r,{width:"abbreviated",context:"formatting"});case"EEEEE":return n.day(r,{width:"narrow",context:"formatting"});case"EEEEEE":return n.day(r,{width:"short",context:"formatting"});case"EEEE":default:return n.day(r,{width:"wide",context:"formatting"})}},e:function(t,e,n,r){var i=t.getUTCDay(),o=(i-r.weekStartsOn+8)%7||7;switch(e){case"e":return String(o);case"ee":return pp(o,2);case"eo":return n.ordinalNumber(o,{unit:"day"});case"eee":return n.day(i,{width:"abbreviated",context:"formatting"});case"eeeee":return n.day(i,{width:"narrow",context:"formatting"});case"eeeeee":return n.day(i,{width:"short",context:"formatting"});case"eeee":default:return n.day(i,{width:"wide",context:"formatting"})}},c:function(t,e,n,r){var i=t.getUTCDay(),o=(i-r.weekStartsOn+8)%7||7;switch(e){case"c":return String(o);case"cc":return pp(o,e.length);case"co":return n.ordinalNumber(o,{unit:"day"});case"ccc":return n.day(i,{width:"abbreviated",context:"standalone"});case"ccccc":return n.day(i,{width:"narrow",context:"standalone"});case"cccccc":return n.day(i,{width:"short",context:"standalone"});case"cccc":default:return n.day(i,{width:"wide",context:"standalone"})}},i:function(t,e,n){var r=t.getUTCDay(),i=0===r?7:r;switch(e){case"i":return String(i);case"ii":return pp(i,e.length);case"io":return n.ordinalNumber(i,{unit:"day"});case"iii":return n.day(r,{width:"abbreviated",context:"formatting"});case"iiiii":return n.day(r,{width:"narrow",context:"formatting"});case"iiiiii":return n.day(r,{width:"short",context:"formatting"});case"iiii":default:return n.day(r,{width:"wide",context:"formatting"})}},a:function(t,e,n){var r=t.getUTCHours()/12>=1?"pm":"am";switch(e){case"a":case"aa":case"aaa":return n.dayPeriod(r,{width:"abbreviated",context:"formatting"});case"aaaaa":return n.dayPeriod(r,{width:"narrow",context:"formatting"});case"aaaa":default:return n.dayPeriod(r,{width:"wide",context:"formatting"})}},b:function(t,e,n){var r,i=t.getUTCHours();switch(r=12===i?Lp:0===i?Ap:i/12>=1?"pm":"am",e){case"b":case"bb":case"bbb":return n.dayPeriod(r,{width:"abbreviated",context:"formatting"});case"bbbbb":return n.dayPeriod(r,{width:"narrow",context:"formatting"});case"bbbb":default:return n.dayPeriod(r,{width:"wide",context:"formatting"})}},B:function(t,e,n){var r,i=t.getUTCHours();switch(r=i>=17?Rp:i>=12?kp:i>=4?Dp:Ip,e){case"B":case"BB":case"BBB":return n.dayPeriod(r,{width:"abbreviated",context:"formatting"});case"BBBBB":return n.dayPeriod(r,{width:"narrow",context:"formatting"});case"BBBB":default:return n.dayPeriod(r,{width:"wide",context:"formatting"})}},h:function(t,e,n){if("ho"===e){var r=t.getUTCHours()%12;return 0===r&&(r=12),n.ordinalNumber(r,{unit:"hour"})}return yp(t,e)},H:function(t,e,n){return"Ho"===e?n.ordinalNumber(t.getUTCHours(),{unit:"hour"}):bp(t,e)},K:function(t,e,n){var r=t.getUTCHours()%12;return"Ko"===e?n.ordinalNumber(r,{unit:"hour"}):pp(r,e.length)},k:function(t,e,n){var r=t.getUTCHours();return 0===r&&(r=24),"ko"===e?n.ordinalNumber(r,{unit:"hour"}):pp(r,e.length)},m:function(t,e,n){return"mo"===e?n.ordinalNumber(t.getUTCMinutes(),{unit:"minute"}):Ep(t,e)},s:function(t,e,n){return"so"===e?n.ordinalNumber(t.getUTCSeconds(),{unit:"second"}):_p(t,e)},S:function(t,e){return xp(t,e)},X:function(t,e,n,r){var i=(r._originalDate||t).getTimezoneOffset();if(0===i)return"Z";switch(e){case"X":return Up(i);case"XXXX":case"XX":return Bp(i);case"XXXXX":case"XXX":default:return Bp(i,":")}},x:function(t,e,n,r){var i=(r._originalDate||t).getTimezoneOffset();switch(e){case"x":return Up(i);case"xxxx":case"xx":return Bp(i);case"xxxxx":case"xxx":default:return Bp(i,":")}},O:function(t,e,n,r){var i=(r._originalDate||t).getTimezoneOffset();switch(e){case"O":case"OO":case"OOO":return"GMT"+Np(i,":");case"OOOO":default:return"GMT"+Bp(i,":")}},z:function(t,e,n,r){var i=(r._originalDate||t).getTimezoneOffset();switch(e){case"z":case"zz":case"zzz":return"GMT"+Np(i,":");case"zzzz":default:return"GMT"+Bp(i,":")}},t:function(t,e,n,r){var i=r._originalDate||t;return pp(Math.floor(i.getTime()/1e3),e.length)},T:function(t,e,n,r){return pp((r._originalDate||t).getTime(),e.length)}};function Np(t,e){var n=t>0?"-":"+",r=Math.abs(t),i=Math.floor(r/60),o=r%60;if(0===o)return n+String(i);var a=e||"";return n+String(i)+a+pp(o,2)}function Up(t,e){return t%60==0?(t>0?"-":"+")+pp(Math.abs(t)/60,2):Bp(t,e)}function Bp(t,e){var n=e||"",r=t>0?"-":"+",i=Math.abs(t);return r+pp(Math.floor(i/60),2)+n+pp(i%60,2)}function Vp(t,e){switch(t){case"P":return e.date({width:"short"});case"PP":return e.date({width:"medium"});case"PPP":return e.date({width:"long"});case"PPPP":default:return e.date({width:"full"})}}function Hp(t,e){switch(t){case"p":return e.time({width:"short"});case"pp":return e.time({width:"medium"});case"ppp":return e.time({width:"long"});case"pppp":default:return e.time({width:"full"})}}var Gp={p:Hp,P:function(t,e){var n,r=t.match(/(P+)(p+)?/),i=r[1],o=r[2];if(!o)return Vp(t,e);switch(i){case"P":n=e.dateTime({width:"short"});break;case"PP":n=e.dateTime({width:"medium"});break;case"PPP":n=e.dateTime({width:"long"});break;case"PPPP":default:n=e.dateTime({width:"full"})}return n.replace("{{date}}",Vp(i,e)).replace("{{time}}",Hp(o,e))}},zp=["D","DD"],jp=["YY","YYYY"];function Fp(t){return-1!==zp.indexOf(t)}function Wp(t){return-1!==jp.indexOf(t)}function qp(t){if("YYYY"===t)throw new RangeError("Use `yyyy` instead of `YYYY` for formatting years; see: https://git.io/fxCyr");if("YY"===t)throw new RangeError("Use `yy` instead of `YY` for formatting years; see: https://git.io/fxCyr");if("D"===t)throw new RangeError("Use `d` instead of `D` for formatting days of the month; see: https://git.io/fxCyr");if("DD"===t)throw new RangeError("Use `dd` instead of `DD` for formatting days of the month; see: https://git.io/fxCyr")}var Yp=/[yYQqMLwIdDecihHKkms]o|(\w)\1*|''|'(''|[^'])+('|$)|./g,Zp=/P+p+|P+|p+|''|'(''|[^'])+('|$)|./g,Xp=/^'([^]*?)'?$/,$p=/''/g,Kp=/[a-zA-Z]/;function Qp(t,e,n){if(arguments.length<2)throw new TypeError("2 arguments required, but only "+arguments.length+" present");var r=String(e),i=n||{},o=i.locale||dp,a=o.options&&o.options.firstWeekContainsDate,s=null==a?1:Hf(a),l=null==i.firstWeekContainsDate?s:Hf(i.firstWeekContainsDate);if(!(l>=1&&l<=7))throw new RangeError("firstWeekContainsDate must be between 1 and 7 inclusively");var u=o.options&&o.options.weekStartsOn,c=null==u?0:Hf(u),h=null==i.weekStartsOn?c:Hf(i.weekStartsOn);if(!(h>=0&&h<=6))throw new RangeError("weekStartsOn must be between 0 and 6 inclusively");if(!o.localize)throw new RangeError("locale must contain localize property");if(!o.formatLong)throw new RangeError("locale must contain formatLong property");var d=Vf(t);if(!Jf(d))throw new RangeError("Invalid time value");var f=Ff(d),p=fp(d,f),g={firstWeekContainsDate:l,weekStartsOn:h,locale:o,_originalDate:d},v=r.match(Zp).map((function(t){var e=t[0];return"p"===e||"P"===e?(0,Gp[e])(t,o.formatLong,g):t})).join("").match(Yp).map((function(t){if("''"===t)return"'";var e=t[0];if("'"===e)return Jp(t);var n=Pp[e];if(n)return!i.useAdditionalWeekYearTokens&&Wp(t)&&qp(t),!i.useAdditionalDayOfYearTokens&&Fp(t)&&qp(t),n(p,t,o.localize,g);if(e.match(Kp))throw new RangeError("Format string contains an unescaped latin alphabet character `"+e+"`");return t})).join("");return v}function Jp(t){return t.match(Xp)[1].replace($p,"'")}function tg(t,e){if(arguments.length<2)throw new TypeError("2 arguments required, but only "+arguments.length+" present");var n=Hf(e);return Gf(t,-n)}function eg(t,e){if(arguments.length<2)throw new TypeError("2 arguments required, but only "+arguments.length+" present");var n=Hf(e);return jf(t,-n)}function ng(t,e){if(arguments.length<2)throw new TypeError("2 arguments required, but only "+arguments.length+" present");var n=Hf(e);return Yf(t,-n)}function rg(t,e){if(arguments.length<2)throw new TypeError("2 arguments required, but only "+arguments.length+" present");var n=Hf(e);return Xf(t,-n)}function ig(t,e){if(arguments.length<2)throw new TypeError("2 arguments required, but only "+arguments.length+" present");var n=Hf(e);return $f(t,-n)}function og(t,e){if(arguments.length<2)throw new TypeError("2 arguments required, but only "+arguments.length+" present");var n=Hf(e);return Kf(t,-n)}var ag=[["15seconds",15e3],["minute",6e4],["30minutes",18e5],["hourly",36e5],["daily",864e5],["monthly",2592e6],["quarterly",7776e6],["yearly",31104e6]];function sg(t,e,n,r,i){var o=0===e,a=2===Number(Qp(new Date(t),"c")),s=1===Number(Qp(new Date(t),"q")),l=0!==e?n[e-1]:null;switch(r){case"15seconds":case"minute":case"30minutes":case"hourly":return o||hg(t)||dg(t,l)||fg(t);case"daily":return i?o||a||fg(t):o||dg(t,l)||fg(t);case"monthly":return o||fg(t);case"quarterly":return o||s;case"yearly":return!1;default:throw new Error(r+" is not a valid time interval.")}}function lg(t,e,n,r,i){var o=i.showDayName,a="daily"===r&&o?"weekly":r,s=new Date(t),l=Za(i,"timeIntervalFormats")[a],u=Za(l,"primary"),c=Za(l,"secondary"),h=sg(t,e,n,r,o)?u:c;return"15seconds"===r&&0!==s.getMilliseconds()&&(h=h.replace("pp","h:mm:ss.SSS a")),Qp(s,h,{locale:i.localeObject})}function ug(t){var e=new Date(t);return{M:e.getMonth()+1,d:e.getDate(),H:e.getHours(),m:e.getMinutes(),s:e.getSeconds()}}function cg(t){return 1===t.length?"15seconds":function(t){var e=ag.reduce((function(e,n,r){n[0];var i=n[1],o=ag[e][1];return Math.abs(o-t)<Math.abs(i-t)?e:r}),0);return ag[e][0]}(dl(function(t){if(t)return t.slice(1).map((function(e,n){return e-t[n]}))}(t)))}function hg(t){var e=ug(t),n=e.s,r=e.m;return 0===e.H&&0===r&&0===n}function dg(t,e){return ug(t).M!==ug(e).M}function fg(t){var e=ug(t),n=e.M,r=e.d,i=e.s,o=e.m,a=e.H;return 1===n&&1===r&&0===a&&0===o&&0===i}function pg(t){return void 0===t?"":t.toISOString()}var gg=function(){function t(t){this.state={options:{}},this.colorScale={},this.colorClassNames={},this.services=t}return t.prototype.getAllDataFromDomain=function(t){if(!this.getData())return null;var e=this.getOptions(),n=this.getData(),r=this.getDataGroups(),i=Za(e,"data").groupMapsTo,o=Za(e,"axes");return t&&(n=n.filter((function(e){return t.includes(e[i])}))),o&&Object.keys(o).forEach((function(t){var e=o[t].mapsTo,r=o[t].scaleType;if(r!==G.LINEAR&&r!==G.LOG||(n=n.map((function(t){var n;return D(D({},t),((n={})[e]=null===t[e]?t[e]:Number(t[e]),n))}))),e&&o[t].domain)if(r===G.LABELS)n=n.filter((function(n){return o[t].domain.includes(n[e])}));else{var i=o[t].domain,a=i[0],s=i[1];n=n.filter((function(t){return!(e in t)||t[e]>=a&&t[e]<=s}))}})),n.filter((function(t){return r.find((function(e){return e.name===t[i]}))}))},t.prototype.getDisplayData=function(t){if(!this.get("data"))return null;var e=wt.items.status.ACTIVE,n=this.getDataGroups(t),r=this.getOptions().data.groupMapsTo;return this.getAllDataFromDomain(t).filter((function(t){return n.find((function(n){return n.name===t[r]&&n.status===e}))}))},t.prototype.getData=function(){return this.get("data")},t.prototype.isDataEmpty=function(){return!this.getData().length},t.prototype.setData=function(t){var e=this.sanitize(Ha(t)),n=this.generateDataGroups(e);return this.set({data:e,dataGroups:n}),e},t.prototype.getDataGroups=function(t){return Za(this.getOptions(),"data","loading")?[]:t?this.get("dataGroups").filter((function(e){return t.includes(e.name)})):this.get("dataGroups")},t.prototype.getActiveDataGroups=function(t){var e=wt.items.status.ACTIVE;return this.getDataGroups(t).filter((function(t){return t.status===e}))},t.prototype.getDataGroupNames=function(t){return this.getDataGroups(t).map((function(t){return t.name}))},t.prototype.getActiveDataGroupNames=function(t){return this.getActiveDataGroups(t).map((function(t){return t.name}))},t.prototype.aggregateBinDataByGroup=function(t){return fo(t,"group")},t.prototype.getBinConfigurations=function(){var t=this,e=this.getDisplayData(),n=this.getOptions(),r=this.services.cartesianScales.getMainXAxisPosition(),i=this.services.cartesianScales.getDomainIdentifier(),o=n.axes[r],a=n.data.groupMapsTo,s=o.bins,l=void 0===s?xt.defaultBins:s,u=Array.isArray(l),c=cl().value((function(t){return t[i]})).thresholds(l)(e);if(u)c[c.length-1].x1=l[l.length-1];else{var h=c[0].x1-c[0].x0;c[c.length-1].x1=+c[c.length-1].x0+h}var d=u?[l[0],l[l.length-1]]:[c[0].x0,c[c.length-1].x1],f=Array.from(new Set(e.map((function(t){return t[a]})))),p=[];return c.forEach((function(e){var n=e.x0+"-"+e.x1,r=t.aggregateBinDataByGroup(e);f.forEach((function(t){p.push({group:t,key:n,value:r[t]||0,bin:e.x0})}))})),{bins:c,binsDomain:d}},t.prototype.getBinnedStackedData=function(){var t=this.getOptions().data.groupMapsTo,e=this.getActiveDataGroupNames(),n=this.getBinConfigurations().bins,r=this.getDataValuesGroupedByKeys({bins:n});return Uf().keys(e)(r).map((function(n,r){return Object.keys(n).filter((function(t){return!isNaN(t)})).map((function(i){var o=n[i];return o[t]=e[r],o}))}))},t.prototype.getGroupedData=function(t){var e=this.getDisplayData(t),n={},r=this.getOptions().data.groupMapsTo;return e.map((function(t){var e=t[r];null!==n[e]&&void 0!==n[e]?n[e].push(t):n[e]=[t]})),Object.keys(n).map((function(t){return{name:t,data:n[t]}}))},t.prototype.getStackKeys=function(t){var e,n=this,r=void 0===t?{bins:null,groups:null}:t,i=r.bins,o=void 0===i?null:i,a=r.groups,s=void 0===a?null:a,l=this.getOptions(),u=this.getDisplayData(s);e=o?o.map((function(t){return t.x0+"-"+t.x1})):Ga(u.map((function(t){var e=n.services.cartesianScales.getDomainIdentifier(t);return t[e]instanceof Date?pg(t[e]):t[e]&&"function"==typeof t[e].toString?t[e].toString():t[e]})));var c=this.services.cartesianScales.domainAxisPosition,h=l.axes[c].scaleType;return h===G.TIME?e.sort((function(t,e){return new Date(t)-new Date(e)})):h!==G.LOG&&h!==G.LINEAR||e.sort((function(t,e){return t-e})),e},t.prototype.getDataValuesGroupedByKeys=function(t){var e=this,n=t.bins,r=void 0===n?null:n,i=t.groups,o=void 0===i?null:i,a=this.getOptions().data.groupMapsTo,s=this.getDisplayData(o),l=this.getDataGroupNames(),u=this.getStackKeys({bins:r,groups:o});return r?u.map((function(t){var e=t.split("-"),n=e[0],i=e[1],o={x0:n,x1:i},s=r.find((function(t){return t.x0.toString()===n.toString()}));return l.forEach((function(t){o[t]=s.filter((function(e){return e[a]===t})).length})),o})):u.map((function(t){var n={sharedStackKey:t};return l.forEach((function(r){var i=s.find((function(n){var i=e.services.cartesianScales.getDomainIdentifier(n);return n[a]===r&&n.hasOwnProperty(i)&&(n[i]instanceof Date?pg(n[i])===t:n[i].toString()===t)})),o=e.services.cartesianScales.getRangeIdentifier(n);n[r]=i?i[o]:null})),n}))},t.prototype.getStackedData=function(t){var e=t.percentage,n=void 0!==e&&e,r=t.groups,i=void 0===r?null:r,o=t.divergent,a=void 0!==o&&o,s=this.getOptions().data.groupMapsTo,l=this.getActiveDataGroupNames(i),u=this.getDataValuesGroupedByKeys({groups:i});if(n){var c=function(t){for(var e=-1,n=null==t?0:t.length,r={};++e<n;){var i=t[e];r[i[0]]=i[1]}return r}(u.map((function(t){return[t.sharedStackKey,0]})));u.forEach((function(t){l.forEach((function(e){c[t.sharedStackKey]+=t[e]}))})),u.forEach((function(t){l.forEach((function(e){c[t.sharedStackKey]?t[e]=t[e]/c[t.sharedStackKey]*100:t[e]=0}))}))}return(a?Uf().offset(Bf):Uf()).keys(l)(u).map((function(t,e){return Object.keys(t).filter((function(t){return!isNaN(t)})).map((function(n){var r=t[n];return r[s]=l[e],r}))}))},t.prototype.getOptions=function(){return this.state.options},t.prototype.set=function(t,e){this.state=Object.assign({},this.state,t);var n=Object.assign({skipUpdate:!1,animate:!0},e);n.skipUpdate||this.update(n.animate)},t.prototype.get=function(t){return t?this.state[t]:this.state},t.prototype.setOptions=function(t){var e=this.getOptions();Ya(e,t),this.set({options:bo(e,t)})},t.prototype.update=function(t){void 0===t&&(t=!0),this.getDisplayData()&&(this.updateAllDataGroups(),this.setCustomColorScale(),this.setColorClassNames(),this.services.events.dispatchEvent(ht.Model.UPDATE,{animate:t}))},t.prototype.toggleDataLabel=function(t){var e=wt.items.status,n=e.ACTIVE,r=e.DISABLED,i=this.getDataGroups(),o=i.some((function(t){return t.status===r})),a=i.filter((function(t){return t.status===n}));if(o)if(1===a.length&&a[0].name===t)i.forEach((function(t,e){i[e].status=n}));else{var s=i.findIndex((function(e){return e.name===t}));i[s].status=i[s].status===r?n:r}else i.forEach((function(e,o){i[o].status=e.name===t?n:r}));var l=i.filter((function(t){return t.status===n})),u=this.getOptions(),c=i.some((function(t){return t.status===r}));u.data.selectedGroups=c?l.map((function(t){return t.name})):[],this.services.events.dispatchEvent(ht.Legend.ITEMS_UPDATE,{dataGroups:i}),this.set({dataGroups:i})},t.prototype.getIsFilled=function(t,e,n,r){var i=this.getOptions();return i.getIsFilled?i.getIsFilled(t,e,n,r):r},t.prototype.getFillColor=function(t,e,n){var r=this.getOptions(),i=Za(this.colorScale,t);return r.getFillColor?r.getFillColor(t,e,n,i):i},t.prototype.getStrokeColor=function(t,e,n){var r=this.getOptions(),i=Za(this.colorScale,t);return r.getStrokeColor?r.getStrokeColor(t,e,n,i):i},t.prototype.isUserProvidedColorScaleValid=function(){var t=Za(this.getOptions(),"color","scale"),e=this.getDataGroups();return null!=t&&0!=Object.keys(t).length&&e.some((function(e){return Object.keys(t).includes(e.name)}))},t.prototype.getColorClassName=function(t){var e=this.colorClassNames(t.dataGroupName),n=t.originalClassName;return t.classNameTypes.forEach((function(r){return n=t.originalClassName?n+" "+r+"-"+e:r+"-"+e})),n},t.prototype.getStatus=function(){return null},t.prototype.getAllDataGroupsNames=function(){return this.allDataGroups},t.prototype.transformToTabularData=function(t){console.warn("We've updated the charting data format to be tabular by default. The current format you're using is deprecated and will be removed in v1.0, read more here https://carbon-design-system.github.io/carbon-charts/?path=/story/docs-tutorials--tabular-data-format");var e=[],n=t.datasets,r=t.labels;return n.forEach((function(t){t.data.forEach((function(n,i){var o,a=Za(t,"label");if(null===a){var s=Za(r,i);o=s||"Ungrouped"}else o=a;var l={group:o,key:r[i]};isNaN(n)?(l.value=n.value,l.date=n.date):l.value=n,e.push(l)}))})),e},t.prototype.getTabularDataArray=function(){return[]},t.prototype.exportToCSV=function(){var t=this.getTabularDataArray().map((function(t){return t.map((function(t){return'"'+("–"===t?"–":t)+'"'}))})),e="",n="";t.forEach((function(r,i){n=r.join(","),e+=i<t.length?n+"\n":n}));var r=this.getOptions(),i="myChart",o=Za(r,"fileDownload","fileName");"function"==typeof o&&(i=o("csv")),this.services.files.downloadCSV(e,i+".csv")},t.prototype.getTabularData=function(t){return Array.isArray(t)?t:this.transformToTabularData(t)},t.prototype.sanitize=function(t){return t=this.getTabularData(t)},t.prototype.updateAllDataGroups=function(){var t=this;this.allDataGroups?this.getDataGroupNames().forEach((function(e){-1===t.allDataGroups.indexOf(e)&&t.allDataGroups.push(e)})):this.allDataGroups=this.getDataGroupNames()},t.prototype.generateDataGroups=function(t){var e=this.getOptions().data.groupMapsTo,n=wt.items.status,r=n.ACTIVE,i=n.DISABLED,o=this.getOptions(),a=Ga(t.map((function(t){return t[e]})));o.data.selectedGroups.length&&(o.data.selectedGroups.every((function(t){return a.includes(t)}))||(o.data.selectedGroups=[]));var s=function(t){return!o.data.selectedGroups.length||o.data.selectedGroups.includes(t)?r:i};return a.map((function(t){return{name:t,status:s(t)}}))},t.prototype.setCustomColorScale=function(){var t=this;if(this.isUserProvidedColorScaleValid()){var e=this.getOptions(),n=Za(e,"color","scale");Object.keys(n).forEach((function(e){t.allDataGroups.includes(e)||console.warn('"'+e+'" does not exist in data groups.')})),this.allDataGroups.filter((function(t){return n[t]})).forEach((function(e){return t.colorScale[e]=n[e]}))}},t.prototype.setColorClassNames=function(){var t=Za(this.getOptions(),"color","pairing"),e=Za(t,"numberOfVariants");(!e||e<this.allDataGroups.length)&&(e=this.allDataGroups.length);var n=Za(t,"option"),r=e>5?14:e;n=n<=Et.pairingOptions[r+"-color"]?n:1;var i=this.allDataGroups.map((function(t,e){return r+"-"+n+"-"+(e%14+1)}));this.colorClassNames=El().range(i).domain(this.allDataGroups)},t}(),vg=function(){function t(t,e){this.model=t,this.services=e,this.init()}return t.prototype.init=function(){},t.prototype.update=function(){},t.prototype.setModel=function(t){this.model=t},t.prototype.setServices=function(t){this.services=t},t}(),mg=function(){if("undefined"!=typeof Map)return Map;function t(t,e){var n=-1;return t.some((function(t,r){return t[0]===e&&(n=r,!0)})),n}return function(){function e(){this.__entries__=[]}var n={size:{configurable:!0}};return n.size.get=function(){return this.__entries__.length},e.prototype.get=function(e){var n=t(this.__entries__,e),r=this.__entries__[n];return r&&r[1]},e.prototype.set=function(e,n){var r=t(this.__entries__,e);~r?this.__entries__[r][1]=n:this.__entries__.push([e,n])},e.prototype.delete=function(e){var n=this.__entries__,r=t(n,e);~r&&n.splice(r,1)},e.prototype.has=function(e){return!!~t(this.__entries__,e)},e.prototype.clear=function(){this.__entries__.splice(0)},e.prototype.forEach=function(t,e){void 0===e&&(e=null);for(var n=0,r=this.__entries__;n<r.length;n+=1){var i=r[n];t.call(e,i[1],i[0])}},Object.defineProperties(e.prototype,n),e}()}(),yg="undefined"!=typeof window&&"undefined"!=typeof document&&window.document===document,bg="undefined"!=typeof global&&global.Math===Math?global:"undefined"!=typeof self&&self.Math===Math?self:"undefined"!=typeof window&&window.Math===Math?window:Function("return this")(),Eg="function"==typeof requestAnimationFrame?requestAnimationFrame.bind(bg):function(t){return setTimeout((function(){return t(Date.now())}),1e3/60)},_g=["top","right","bottom","left","width","height","size","weight"],xg="undefined"!=typeof MutationObserver,wg=function(){this.connected_=!1,this.mutationEventsAdded_=!1,this.mutationsObserver_=null,this.observers_=[],this.onTransitionEnd_=this.onTransitionEnd_.bind(this),this.refresh=function(t,e){var n=!1,r=!1,i=0;function o(){n&&(n=!1,t()),r&&s()}function a(){Eg(o)}function s(){var t=Date.now();if(n){if(t-i<2)return;r=!0}else n=!0,r=!1,setTimeout(a,e);i=t}return s}(this.refresh.bind(this),20)};wg.prototype.addObserver=function(t){~this.observers_.indexOf(t)||this.observers_.push(t),this.connected_||this.connect_()},wg.prototype.removeObserver=function(t){var e=this.observers_,n=e.indexOf(t);~n&&e.splice(n,1),!e.length&&this.connected_&&this.disconnect_()},wg.prototype.refresh=function(){this.updateObservers_()&&this.refresh()},wg.prototype.updateObservers_=function(){var t=this.observers_.filter((function(t){return t.gatherActive(),t.hasActive()}));return t.forEach((function(t){return t.broadcastActive()})),t.length>0},wg.prototype.connect_=function(){yg&&!this.connected_&&(document.addEventListener("transitionend",this.onTransitionEnd_),window.addEventListener("resize",this.refresh),xg?(this.mutationsObserver_=new MutationObserver(this.refresh),this.mutationsObserver_.observe(document,{attributes:!0,childList:!0,characterData:!0,subtree:!0})):(document.addEventListener("DOMSubtreeModified",this.refresh),this.mutationEventsAdded_=!0),this.connected_=!0)},wg.prototype.disconnect_=function(){yg&&this.connected_&&(document.removeEventListener("transitionend",this.onTransitionEnd_),window.removeEventListener("resize",this.refresh),this.mutationsObserver_&&this.mutationsObserver_.disconnect(),this.mutationEventsAdded_&&document.removeEventListener("DOMSubtreeModified",this.refresh),this.mutationsObserver_=null,this.mutationEventsAdded_=!1,this.connected_=!1)},wg.prototype.onTransitionEnd_=function(t){var e=t.propertyName;void 0===e&&(e=""),_g.some((function(t){return!!~e.indexOf(t)}))&&this.refresh()},wg.getInstance=function(){return this.instance_||(this.instance_=new wg),this.instance_},wg.instance_=null;var Og=function(t,e){for(var n=0,r=Object.keys(e);n<r.length;n+=1){var i=r[n];Object.defineProperty(t,i,{value:e[i],enumerable:!1,writable:!1,configurable:!0})}return t},Tg=function(t){return t&&t.ownerDocument&&t.ownerDocument.defaultView||bg},Sg=kg(0,0,0,0);function Mg(t){return parseFloat(t)||0}function Cg(t){for(var e=[],n=arguments.length-1;n-- >0;)e[n]=arguments[n+1];return e.reduce((function(e,n){return e+Mg(t["border-"+n+"-width"])}),0)}function Ag(t){var e=t.clientWidth,n=t.clientHeight;if(!e&&!n)return Sg;var r=Tg(t).getComputedStyle(t),i=function(t){for(var e={},n=0,r=["top","right","bottom","left"];n<r.length;n+=1){var i=r[n],o=t["padding-"+i];e[i]=Mg(o)}return e}(r),o=i.left+i.right,a=i.top+i.bottom,s=Mg(r.width),l=Mg(r.height);if("border-box"===r.boxSizing&&(Math.round(s+o)!==e&&(s-=Cg(r,"left","right")+o),Math.round(l+a)!==n&&(l-=Cg(r,"top","bottom")+a)),!function(t){return t===Tg(t).document.documentElement}(t)){var u=Math.round(s+o)-e,c=Math.round(l+a)-n;1!==Math.abs(u)&&(s-=u),1!==Math.abs(c)&&(l-=c)}return kg(i.left,i.top,s,l)}var Lg="undefined"!=typeof SVGGraphicsElement?function(t){return t instanceof Tg(t).SVGGraphicsElement}:function(t){return t instanceof Tg(t).SVGElement&&"function"==typeof t.getBBox};function Dg(t){return yg?Lg(t)?function(t){var e=t.getBBox();return kg(0,0,e.width,e.height)}(t):Ag(t):Sg}function kg(t,e,n,r){return{x:t,y:e,width:n,height:r}}var Rg=function(t){this.broadcastWidth=0,this.broadcastHeight=0,this.contentRect_=kg(0,0,0,0),this.target=t};Rg.prototype.isActive=function(){var t=Dg(this.target);return this.contentRect_=t,t.width!==this.broadcastWidth||t.height!==this.broadcastHeight},Rg.prototype.broadcastRect=function(){var t=this.contentRect_;return this.broadcastWidth=t.width,this.broadcastHeight=t.height,t};var Ig=function(t,e){var n=function(t){var e=t.x,n=t.y,r=t.width,i=t.height,o="undefined"!=typeof DOMRectReadOnly?DOMRectReadOnly:Object,a=Object.create(o.prototype);return Og(a,{x:e,y:n,width:r,height:i,top:n,right:e+r,bottom:i+n,left:e}),a}(e);Og(this,{target:t,contentRect:n})},Pg=function(t,e,n){if(this.activeObservations_=[],this.observations_=new mg,"function"!=typeof t)throw new TypeError("The callback provided as parameter 1 is not a function.");this.callback_=t,this.controller_=e,this.callbackCtx_=n};Pg.prototype.observe=function(t){if(!arguments.length)throw new TypeError("1 argument required, but only 0 present.");if("undefined"!=typeof Element&&Element instanceof Object){if(!(t instanceof Tg(t).Element))throw new TypeError('parameter 1 is not of type "Element".');var e=this.observations_;e.has(t)||(e.set(t,new Rg(t)),this.controller_.addObserver(this),this.controller_.refresh())}},Pg.prototype.unobserve=function(t){if(!arguments.length)throw new TypeError("1 argument required, but only 0 present.");if("undefined"!=typeof Element&&Element instanceof Object){if(!(t instanceof Tg(t).Element))throw new TypeError('parameter 1 is not of type "Element".');var e=this.observations_;e.has(t)&&(e.delete(t),e.size||this.controller_.removeObserver(this))}},Pg.prototype.disconnect=function(){this.clearActive(),this.observations_.clear(),this.controller_.removeObserver(this)},Pg.prototype.gatherActive=function(){var t=this;this.clearActive(),this.observations_.forEach((function(e){e.isActive()&&t.activeObservations_.push(e)}))},Pg.prototype.broadcastActive=function(){if(this.hasActive()){var t=this.callbackCtx_,e=this.activeObservations_.map((function(t){return new Ig(t.target,t.broadcastRect())}));this.callback_.call(t,e,t),this.clearActive()}},Pg.prototype.clearActive=function(){this.activeObservations_.splice(0)},Pg.prototype.hasActive=function(){return this.activeObservations_.length>0};var Ng="undefined"!=typeof WeakMap?new WeakMap:new mg,Ug=function(t){if(!(this instanceof Ug))throw new TypeError("Cannot call a class as a function.");if(!arguments.length)throw new TypeError("1 argument required, but only 0 present.");var e=wg.getInstance(),n=new Pg(t,e,this);Ng.set(this,n)};["observe","unobserve","disconnect"].forEach((function(t){Ug.prototype[t]=function(){return(e=Ng.get(this))[t].apply(e,arguments);var e}}));var Bg=void 0!==bg.ResizeObserver?bg.ResizeObserver:Ug,Vg=ts((function(t,e){
|
|
16
|
-
/*! dom-to-image-more 26-04-2023 */
|
|
17
|
-
!function(e){const n=function(){let t=0;return{escape:function(t){return t.replace(/([.*+?^${}()|[]\/\\])/g,"\\$1")},isDataUrl:function(t){return-1!==t.search(/^(data:)/)},canvasToBlob:function(t){return t.toBlob?new Promise((function(e){t.toBlob(e)})):function(t){return new Promise((function(e){var n=m(t.toDataURL().split(",")[1]),r=n.length,i=new Uint8Array(r);for(let t=0;t<r;t++)i[t]=n.charCodeAt(t);e(new Blob([i],{type:"image/png"}))}))}(t)},resolveUrl:function(t,e){var n=document.implementation.createHTMLDocument(),r=n.createElement("base"),i=(n.head.appendChild(r),n.createElement("a"));return n.body.appendChild(i),r.href=e,i.href=t,i.href},getAndEncode:function(t){let e=p.impl.urlCache.find((function(e){return e.url===t}));return e||(e={url:t,promise:null},p.impl.urlCache.push(e)),null===e.promise&&(p.impl.options.cacheBust&&(t+=(/\?/.test(t)?"&":"?")+(new Date).getTime()),e.promise=new Promise((function(e){const n=p.impl.options.httpTimeout,r=new XMLHttpRequest;let i;var o;function a(t){console.error(t),e("")}r.onreadystatechange=function(){if(4===r.readyState)if(200!==r.status)i?e(i):a(`cannot fetch resource: ${t}, status: `+r.status);else{const t=new FileReader;t.onloadend=function(){e(t.result)},t.readAsDataURL(r.response)}},r.ontimeout=function(){i?e(i):a(`timeout of ${n}ms occured while fetching resource: `+t)},r.responseType="blob",r.timeout=n,p.impl.options.useCredentials&&(r.withCredentials=!0),r.open("GET",t,!0),r.send(),p.impl.options.imagePlaceholder&&(o=p.impl.options.imagePlaceholder.split(/,/))&&o[1]&&(i=o[1])}))),e.promise},uid:function(){return"u"+("0000"+(Math.random()*Math.pow(36,4)<<0).toString(36)).slice(-4)+t++},delay:function(t){return function(e){return new Promise((function(n){setTimeout((function(){n(e)}),t)}))}},asArray:function(t){var e=[],n=t.length;for(let r=0;r<n;r++)e.push(t[r]);return e},escapeXhtml:function(t){return t.replace(/%/g,"%25").replace(/#/g,"%23").replace(/\n/g,"%0A")},makeImage:function(t){return"data:,"!==t?new Promise((function(e,n){const r=new Image;p.impl.options.useCredentials&&(r.crossOrigin="use-credentials"),r.onload=function(){window&&window.requestAnimationFrame?window.requestAnimationFrame((function(){e(r)})):e(r)},r.onerror=n,r.src=t})):Promise.resolve()},width:function(t){var e=a(t,"width");if(!isNaN(e))return e;e=a(t,"border-left-width");var n=a(t,"border-right-width");return t.scrollWidth+e+n},height:function(t){var e=a(t,"height");if(!isNaN(e))return e;e=a(t,"border-top-width");var n=a(t,"border-bottom-width");return t.scrollHeight+e+n},getWindow:n,isElement:o,isElementHostForOpenShadowRoot:function(t){return o(t)&&null!==t.shadowRoot},isShadowRoot:r,isInShadowRoot:i,isHTMLElement:function(t){return t instanceof n(t).HTMLElement},isHTMLCanvasElement:function(t){return t instanceof n(t).HTMLCanvasElement},isHTMLInputElement:function(t){return t instanceof n(t).HTMLInputElement},isHTMLImageElement:function(t){return t instanceof n(t).HTMLImageElement},isHTMLLinkElement:function(t){return t instanceof n(t).HTMLLinkElement},isHTMLScriptElement:function(t){return t instanceof n(t).HTMLScriptElement},isHTMLStyleElement:function(t){return t instanceof n(t).HTMLStyleElement},isHTMLTextAreaElement:function(t){return t instanceof n(t).HTMLTextAreaElement},isShadowSlotElement:function(t){return i(t)&&t instanceof n(t).HTMLSlotElement},isSVGElement:function(t){return t instanceof n(t).SVGElement},isSVGRectElement:function(t){return t instanceof n(t).SVGRectElement},isDimensionMissing:function(t){return isNaN(t)||t<=0}};function n(t){return((t=t?t.ownerDocument:void 0)?t.defaultView:void 0)||e||window}function r(t){return t instanceof n(t).ShadowRoot}function i(t){return null!==t&&Object.prototype.hasOwnProperty.call(t,"getRootNode")&&r(t.getRootNode())}function o(t){return t instanceof n(t).Element}function a(t,e){if(t.nodeType===g){let n=v(t).getPropertyValue(e);if("px"===n.slice(-2))return n=n.slice(0,-2),parseFloat(n)}return NaN}}(),r=function(){const t=/url\(['"]?([^'"]+?)['"]?\)/g;return{inlineAll:function(t,n,o){return e(t)?Promise.resolve(t).then(r).then((function(e){let r=Promise.resolve(t);return e.forEach((function(t){r=r.then((function(e){return i(e,t,n,o)}))})),r})):Promise.resolve(t)},shouldProcess:e,impl:{readUrls:r,inline:i}};function e(e){return-1!==e.search(t)}function r(e){for(var r,i=[];null!==(r=t.exec(e));)i.push(r[1]);return i.filter((function(t){return!n.isDataUrl(t)}))}function i(t,e,r,i){return Promise.resolve(e).then((function(t){return r?n.resolveUrl(t,r):t})).then(i||n.getAndEncode).then((function(r){return t.replace((i=e,new RegExp(`(url\\(['"]?)(${n.escape(i)})(['"]?\\))`,"g")),`$1${r}$3`);var i}))}}(),i={resolveAll:function(){return o().then((function(t){return Promise.all(t.map((function(t){return t.resolve()})))})).then((function(t){return t.join("\n")}))},impl:{readAll:o}};function o(){return Promise.resolve(n.asArray(document.styleSheets)).then((function(t){const e=[];return t.forEach((function(t){if(Object.prototype.hasOwnProperty.call(Object.getPrototypeOf(t),"cssRules"))try{n.asArray(t.cssRules||[]).forEach(e.push.bind(e))}catch(e){console.error("domtoimage: Error while reading CSS rules from "+t.href,e.toString())}})),e})).then((function(t){return t.filter((function(t){return t.type===CSSRule.FONT_FACE_RULE})).filter((function(t){return r.shouldProcess(t.style.getPropertyValue("src"))}))})).then((function(e){return e.map(t)}));function t(t){return{resolve:function(){var e=(t.parentStyleSheet||{}).href;return r.inlineAll(t.cssText,e)},src:function(){return t.style.getPropertyValue("src")}}}}const a={inlineAll:function t(e){return n.isElement(e)?function(t){const e=["background","background-image"].map((function(e){const n=t.style.getPropertyValue(e),i=t.style.getPropertyPriority(e);return n?r.inlineAll(n).then((function(n){t.style.setProperty(e,n,i)})):Promise.resolve()}));return Promise.all(e).then((function(){return t}))}(e).then((function(){return n.isHTMLImageElement(e)?s(e).inline():Promise.all(n.asArray(e.childNodes).map((function(e){return t(e)})))})):Promise.resolve(e)},impl:{newImage:s}};function s(t){return{inline:function(e){return n.isDataUrl(t.src)?Promise.resolve():Promise.resolve(t.src).then(e||n.getAndEncode).then((function(e){return new Promise((function(n){t.onload=n,t.onerror=n,t.src=e}))}))}}}const l=!0,u=void 0,c=!1,h=!1,d=3e4,f="strict",p={toSvg:y,toPng:function(t,e){return b(t,e).then((function(t){return t.toDataURL()}))},toJpeg:function(t,e){return b(t,e).then((function(t){return t.toDataURL("image/jpeg",(e?e.quality:void 0)||1)}))},toBlob:function(t,e){return b(t,e).then(n.canvasToBlob)},toPixelData:function(t,e){return b(t,e).then((function(e){return e.getContext("2d").getImageData(0,0,n.width(t),n.height(t)).data}))},toCanvas:b,impl:{fontFaces:i,images:a,util:n,inliner:r,urlCache:[],options:{}}},g=(t.exports=p,("undefined"!=typeof Node?Node.ELEMENT_NODE:void 0)||1),v=(void 0!==e?e.getComputedStyle:void 0)||("undefined"!=typeof window?window.getComputedStyle:void 0)||globalThis.getComputedStyle,m=(void 0!==e?e.atob:void 0)||("undefined"!=typeof window?window.atob:void 0)||globalThis.atob;function y(t,e){p.impl.util.getWindow(t);var r=e=e||{};void 0===r.copyDefaultStyles?p.impl.options.copyDefaultStyles=l:p.impl.options.copyDefaultStyles=r.copyDefaultStyles,void 0===r.imagePlaceholder?p.impl.options.imagePlaceholder=u:p.impl.options.imagePlaceholder=r.imagePlaceholder,void 0===r.cacheBust?p.impl.options.cacheBust=c:p.impl.options.cacheBust=r.cacheBust,void 0===r.useCredentials?p.impl.options.useCredentials=h:p.impl.options.useCredentials=r.useCredentials,void 0===r.httpTimeout?p.impl.options.httpTimeout=d:p.impl.options.httpTimeout=r.httpTimeout,void 0===r.styleCaching?p.impl.options.styleCaching=f:p.impl.options.styleCaching=r.styleCaching;let i=[];return Promise.resolve(t).then((function(t){if(t.nodeType===g)return t;var e=t,n=t.parentNode,r=document.createElement("span");return n.replaceChild(r,e),r.append(t),i.push({parent:n,child:e,wrapper:r}),r})).then((function(t){return function t(e,r,i,o){const a=r.filter;return e===E||n.isHTMLScriptElement(e)||n.isHTMLStyleElement(e)||n.isHTMLLinkElement(e)||null!==i&&a&&!a(e)?Promise.resolve():Promise.resolve(e).then((function(t){return n.isHTMLCanvasElement(t)?n.makeImage(t.toDataURL()):t.cloneNode(!1)})).then((function(i){return function(e,i){const o=function(t){return n.isShadowSlotElement(t)?t.assignedNodes():t.childNodes}(i);let a=Promise.resolve();if(0!==o.length){const s=v(function(t){return n.isShadowRoot(t)?t.host:t}(i));n.asArray(o).forEach((function(n){a=a.then((function(){return t(n,r,s).then((function(t){t&&e.appendChild(t)}))}))}))}return a.then((function(){return e}))}(i,function(t){return n.isElementHostForOpenShadowRoot(t)?t.shadowRoot:t}(e))})).then((function(t){return function(t,e){return!n.isElement(t)||n.isShadowSlotElement(e)?Promise.resolve(t):Promise.resolve().then((function(){!function(t,e){const n=v(t);n.cssText?(e.style.cssText=n.cssText,function(t,e){e.font=t.font,e.fontFamily=t.fontFamily,e.fontFeatureSettings=t.fontFeatureSettings,e.fontKerning=t.fontKerning,e.fontSize=t.fontSize,e.fontStretch=t.fontStretch,e.fontStyle=t.fontStyle,e.fontVariant=t.fontVariant,e.fontVariantCaps=t.fontVariantCaps,e.fontVariantEastAsian=t.fontVariantEastAsian,e.fontVariantLigatures=t.fontVariantLigatures,e.fontVariantNumeric=t.fontVariantNumeric,e.fontVariationSettings=t.fontVariationSettings,e.fontWeight=t.fontWeight}(n,e.style)):(w(r,t,n,i,e),null===i&&(["inset-block","inset-block-start","inset-block-end"].forEach(t=>e.style.removeProperty(t)),["left","right","top","bottom"].forEach(t=>{e.style.getPropertyValue(t)&&e.style.setProperty(t,"0px")})))}(e,t)})).then((function(){const r=n.uid();[":before",":after"].forEach((function(i){!function(i){const o=v(e,i),a=o.getPropertyValue("content");if(""!==a&&"none"!==a){const e=t.getAttribute("class")||"",s=(t.setAttribute("class",e+" "+r),document.createElement("style"));s.appendChild(function(){const t=`.${r}:`+i,e=(o.cssText?function(){return`${o.cssText} content: ${a};`}:function(){return n.asArray(o).map((function(t){const e=o.getPropertyValue(t),n=o.getPropertyPriority(t)?" !important":"";return t+": "+e+n})).join("; ")+";"})();return document.createTextNode(t+`{${e}}`)}()),t.appendChild(s)}}(i)}))})).then((function(){n.isHTMLTextAreaElement(e)&&(t.innerHTML=e.value),n.isHTMLInputElement(e)&&t.setAttribute("value",e.value)})).then((function(){n.isSVGElement(t)&&(t.setAttribute("xmlns","http://www.w3.org/2000/svg"),n.isSVGRectElement(t))&&["width","height"].forEach((function(e){const n=t.getAttribute(e);n&&t.style.setProperty(e,n)}))})).then((function(){return t}))}(t,e)}))}(t,e,null)})).then(_).then(x).then((function(t){e.bgcolor&&(t.style.backgroundColor=e.bgcolor),e.width&&(t.style.width=e.width+"px"),e.height&&(t.style.height=e.height+"px"),e.style&&Object.keys(e.style).forEach((function(n){t.style[n]=e.style[n]}));let n=null;return"function"==typeof e.onclone&&(n=e.onclone(t)),Promise.resolve(n).then((function(){return t}))})).then((function(t){let r=e.width||n.width(t),i=e.height||n.height(t);return Promise.resolve(t).then((function(t){return t.setAttribute("xmlns","http://www.w3.org/1999/xhtml"),(new XMLSerializer).serializeToString(t)})).then(n.escapeXhtml).then((function(t){var e=(n.isDimensionMissing(r)?' width="100%"':` width="${r}"`)+(n.isDimensionMissing(i)?' height="100%"':` height="${i}"`);return`<svg xmlns="http://www.w3.org/2000/svg"${(n.isDimensionMissing(r)?"":` width="${r}"`)+(n.isDimensionMissing(i)?"":` height="${i}"`)}><foreignObject${e}>${t}</foreignObject></svg>`})).then((function(t){return"data:image/svg+xml;charset=utf-8,"+t}))})).then((function(t){for(;0<i.length;){var e=i.pop();e.parent.replaceChild(e.child,e.wrapper)}return t})).then((function(t){return p.impl.urlCache=[],E&&(document.body.removeChild(E),E=null),O&&clearTimeout(O),O=setTimeout(()=>{O=null,T={}},2e4),t}))}function b(t,e){return y(t,e=e||{}).then(n.makeImage).then((function(r){var i="number"!=typeof e.scale?1:e.scale,o=function(t,r){let i=e.width||n.width(t),o=e.height||n.height(t);return n.isDimensionMissing(i)&&(i=n.isDimensionMissing(o)?300:2*o),n.isDimensionMissing(o)&&(o=i/2),(t=document.createElement("canvas")).width=i*r,t.height=o*r,e.bgcolor&&((r=t.getContext("2d")).fillStyle=e.bgcolor,r.fillRect(0,0,t.width,t.height)),t}(t,i),a=o.getContext("2d");return a.msImageSmoothingEnabled=!1,a.imageSmoothingEnabled=!1,r&&(a.scale(i,i),a.drawImage(r,0,0)),o}))}let E=null;function _(t){return i.resolveAll().then((function(e){var n;return""!==e&&(n=document.createElement("style"),t.appendChild(n),n.appendChild(document.createTextNode(e))),t}))}function x(t){return a.inlineAll(t).then((function(){return t}))}function w(t,e,r,i,o){const a=p.impl.options.copyDefaultStyles?function(t,e){var r=function(e){return("relaxed"!==t.styleCaching?e:e.filter((t,e,n)=>0===e||e===n.length-1)).join(">")}(e=function(t){var e=[];do{if(t.nodeType===g){var n=t.tagName;if(e.push(n),S.includes(n))break}}while(t=t.parentNode);return e}(e));if(T[r])return T[r];e=function(t,e){let n=t.body;do{var r=e.pop();r=t.createElement(r);n.appendChild(r),n=r}while(0<e.length);return n.textContent="",n}((i=function(){if(E)return E.contentWindow;var t=document.characterSet||"UTF-8",e=(e=document.doctype)?(`<!DOCTYPE ${r(e.name)} ${r(e.publicId)} `+r(e.systemId)).trim()+">":"";return(E=document.createElement("iframe")).id="domtoimage-sandbox-"+n.uid(),E.style.visibility="hidden",E.style.position="fixed",document.body.appendChild(E),function(t,e,n,r){try{return t.contentWindow.document.write(e+`<html><head><meta charset='${n}'><title>${r}</title></head><body></body></html>`),t.contentWindow}catch(t){}var i=document.createElement("meta");i.setAttribute("charset",n);try{var o=document.implementation.createHTMLDocument(r),a=(o.head.appendChild(i),e+o.documentElement.outerHTML);return t.setAttribute("srcdoc",a),t.contentWindow}catch(t){}return t.contentDocument.head.appendChild(i),t.contentDocument.title=r,t.contentWindow}(E,e,t,"domtoimage-sandbox");function r(t){var e;return t?((e=document.createElement("div")).innerText=t,e.innerHTML):""}}()).document,e);var i=function(t,e){const r={},i=t.getComputedStyle(e);return n.asArray(i).forEach((function(t){r[t]="width"===t||"height"===t?"auto":i.getPropertyValue(t)})),r}(i,e);return function(t){do{var e=t.parentElement;null!==e&&e.removeChild(t),t=e}while(t&&"BODY"!==t.tagName)}(e),T[r]=i}(t,e):{},s=o.style;n.asArray(r).forEach((function(t){var e,n=r.getPropertyValue(t),o=a[t],l=i?i.getPropertyValue(t):void 0;(n!==o||i&&n!==l)&&(o=r.getPropertyPriority(t),l=s,n=n,o=o,e=0<=["background-clip"].indexOf(t=t),o?(l.setProperty(t,n,o),e&&l.setProperty("-webkit-"+t,n,o)):(l.setProperty(t,n),e&&l.setProperty("-webkit-"+t,n)))}))}let O=null,T={};const S=["ADDRESS","ARTICLE","ASIDE","BLOCKQUOTE","DETAILS","DIALOG","DD","DIV","DL","DT","FIELDSET","FIGCAPTION","FIGURE","FOOTER","FORM","H1","H2","H3","H4","H5","H6","HEADER","HGROUP","HR","LI","MAIN","NAV","OL","P","PRE","SECTION","SVG","TABLE","UL","math","svg","BODY","HEAD","HTML"]}(Qa)})),Hg=function(t){function e(e,n){return t.call(this,e,n)||this}return n(e,t),e.getHTMLElementSize=function(t){return{width:t.clientWidth,height:t.clientHeight}},e.getSVGElementSize=function(t,e){void 0===e&&(e={useAttrs:!1,useClientDimensions:!1,useBBox:!1,useBoundingRect:!1}),t.attr||(t=Ba(t));var n,r,i,o,a={width:0,height:0},s=function(t){t&&Object.keys(a).forEach((function(e){if(t[e]){var n=t[e],r=parseFloat(n);n&&r>a[e]&&-1===(""+n).indexOf("%")&&(a[e]=r)}}))},l={width:t.attr("width"),height:t.attr("height")};try{r={width:(n=t.node().getBBox()).width,height:n.height}}catch(t){}try{o={width:(i=t.node().getBoundingClientRect()).width,height:i.height}}catch(t){}var u={width:t.node().clientWidth,height:t.node().clientHeight};if(e){if(e.useAttrs&&(s(l),a.width>0&&a.height>0))return a;if(e.useClientDimensions&&(s(u),a.width>0&&a.height>0))return u;if(e.useBBox&&(s(r),a.width>0&&a.height>0))return r;if(e.useBoundingRect&&(s(o),a.width>0&&a.height>0))return o}try{s({width:Za(t.node(),"width","baseVal","value"),height:Za(t.node(),"height","baseVal","value")})}catch(t){s(u),s(r),s(l)}return a},e.appendOrSelect=function(t,e){var n=t.select(""+e);if(n.empty()){var r=e.split("#"),i=void 0,o=void 0;return 2===r.length?(i=r[0],o=(r=r[1].split("."))[0]):i=(r=e.split("."))[0],t.append(i).attr("id",o).attr("class",r.slice(1).join(" "))}return n},e.prototype.init=function(){this.styleHolderElement(),this.initializeID(),this.addMainContainer(),this.verifyCSSStylesBeingApplied(),this.model.getOptions().resizable&&this.addResizeListener(),this.addHolderListeners(),this.handleFullscreenChange()},e.prototype.getChartID=function(){return this.chartID},e.prototype.generateElementIDString=function(t){return"chart-"+this.chartID+"-"+t},e.prototype.initializeID=function(){this.chartID=Math.floor(281474976710656*(1+Math.random())).toString(16)},e.prototype.addMainContainer=function(){var t=this.model.getOptions(),e=Za(t,"style","prefix"),n=Ba(this.getHolder()).append("div").classed("cds--"+e+"--chart-wrapper",!0).attr("id","chart-"+this.getChartID()).style("height","100%").style("width","100%");n.append("g").attr("class","DONT_STYLE_ME_css_styles_verifier"),this.mainContainer=n.node()},e.prototype.update=function(){this.styleHolderElement()},e.prototype.styleHolderElement=function(){var t=this.getHolder(),e=this.model.getOptions(),n=e.width,r=e.height,i=e.theme;n!==this.width&&(t.style.width=n,this.width=n),r!==this.height&&(t.style.height=r,this.height=r),Ba(this.getHolder()).classed("cds--chart-holder",!0).attr("data-carbon-theme",i)},e.prototype.getHolder=function(){return this.model.get("holder")},e.prototype.exportToJPG=function(){var t=this,e=this.model.getOptions(),n=this.getHolder(),r=Ba(n);r.classed("filled",!0),Vg.toJpeg(this.getMainContainer(),{bgcolor:"undefined"!=typeof window?window.getComputedStyle(n).getPropertyValue("background-color"):void 0,quality:1,filter:function(t){return!t.classList||!t.classList.contains("cds--cc--toolbar")}}).then((function(n){var i="myChart",o=Za(e,"fileDownload","fileName");"function"==typeof o&&(i=o("jpg")),t.services.files.downloadImage(n,i+".jpg"),r.classed("filled",!1)}))},e.prototype.exportToPNG=function(){var t=this,e=this.model.getOptions(),n=this.getHolder(),r=Ba(n);r.classed("filled",!0),Vg.toPng(this.getMainContainer(),{bgcolor:"undefined"!=typeof window?window.getComputedStyle(n).getPropertyValue("background-color"):void 0,quality:1,filter:function(t){return!t.classList||!t.classList.contains("cds--cc--toolbar")}}).then((function(n){var i="myChart",o=Za(e,"fileDownload","fileName");"function"==typeof o&&(i=o("png")),t.services.files.downloadImage(n,i+".png"),r.classed("filled",!1)})).catch((function(t){console.error("oops, something went wrong!",t)}))},e.prototype.toggleFullscreen=function(){var t=this.getHolder();Ba(t).classed("fullscreen")&&(document.fullscreenElement||document.webkitFullscreenElement||document.mozFullScreenElement||document.msFullscreenElement)?document.exitFullscreen?document.exitFullscreen():document.webkitExitFullscreen?document.webkitExitFullscreen():document.mozCancelFullScreen?document.mozCancelFullScreen():document.msExitFullscreen&&document.msExitFullscreen():t.requestFullscreen?t.requestFullscreen():t.webkitRequestFullscreen?t.webkitRequestFullscreen():t.mozRequestFullScreen?t.mozRequestFullScreen():t.msRequestFullscreen&&t.msRequestFullscreen()},e.prototype.handleFullscreenChange=function(){var t=this;document.addEventListener("fullscreenchange",(function(){var e=Ba(t.getHolder()),n=e.classed("fullscreen");e.classed("fullscreen",!n)}))},e.prototype.verifyCSSStylesBeingApplied=function(){var t=this;setTimeout((function(){var e=Ba(t.mainContainer).select("g.DONT_STYLE_ME_css_styles_verifier").node(),n=getComputedStyle(e);"hidden"===n.getPropertyValue("overflow")&&"0"===n.getPropertyValue("opacity")||console.error("Missing CSS styles for Carbon Charts. Please read the Carbon Charts getting started guide.")}))},e.prototype.setSVGMaxHeight=function(){if(!this.model.getOptions().height){var t=e.getSVGElementSize(Ba(this.mainContainer),{useBBox:!0}).height,n=Ba(this.mainContainer).attr("class"),r=Ba(this.mainContainer).selectAll("."+n+" > svg"),i=0;r.nodes().forEach((function(t){i+=Number(e.getSVGElementSize(Ba(t),{useBBox:!0}).height)})),i<=t?Ba(this.mainContainer).attr("height",i):Ba(this.mainContainer).attr("height","100%")}},e.prototype.getMainContainer=function(){return this.mainContainer},e.prototype.addHolderListeners=function(){var t=this,e=this.getHolder();e&&Ba(e).on("mouseover",(function(){t.services.events.dispatchEvent(ht.Chart.MOUSEOVER)})).on("mouseout",(function(){t.services.events.dispatchEvent(ht.Chart.MOUSEOUT)}))},e.prototype.addResizeListener=function(){var t=this,e=this.getHolder();if(e){var n=e.clientWidth,r=e.clientHeight,i=to((function(i,o){e&&(Math.abs(n-e.clientWidth)>1||Math.abs(r-e.clientHeight)>1)&&(n=e.clientWidth,r=e.clientHeight,t.services.events.dispatchEvent(ht.Chart.RESIZE))}),12.5);new Bg(i).observe(e)}},e}(vg),Gg=function(t){function e(){return null!==t&&t.apply(this,arguments)||this}return n(e,t),e.prototype.init=function(){this.documentFragment=document.createDocumentFragment()},e.prototype.addEventListener=function(t,e){this.documentFragment.addEventListener(t,e)},e.prototype.removeEventListener=function(t,e){this.documentFragment.removeEventListener(t,e)},e.prototype.dispatchEvent=function(t,e){var n;e?n=new CustomEvent(t,{detail:e}):(n=document.createEvent("Event")).initEvent(t,!1,!0),this.documentFragment.dispatchEvent(n)},e}(vg),zg=function(t){function e(e,n){return t.call(this,e,n)||this}return n(e,t),e.prototype.downloadCSV=function(t,e){var n=document.createElement("a");if(navigator.msSaveBlob)navigator.msSaveBlob(new Blob([t],{type:"text/csv;encoding:utf-8"}),e);else if(URL&&"download"in n){var r=URL.createObjectURL(new Blob([t],{type:"text/csv;encoding:utf-8"}));n.href=r,n.setAttribute("download",e),document.body.appendChild(n),n.click(),document.body.removeChild(n),URL.revokeObjectURL(r)}else location.href="data:application/octet-stream,"+encodeURIComponent(t)},e.prototype.downloadImage=function(t,e){var n=document.createElement("a");n.download=e,n.href=t,document.body.appendChild(n),n.click(),document.body.removeChild(n)},e}(vg),jg=function(t){function e(){var e=null!==t&&t.apply(this,arguments)||this;return e.pendingTransitions={},e}return n(e,t),e.prototype.init=function(){var t=this;this.services.events.addEventListener(ht.Model.UPDATE,(function(){t.pendingTransitions={}}))},e.prototype.setupTransition=function(t){var e=this,n=t.transition,r=t.name,i=t.animate;return this.pendingTransitions[n._id]=n,n.on("end interrupt cancel",(function(){delete e.pendingTransitions[n._id]})),!1===this.model.getOptions().animations||!1===i?n.duration(0):n.duration(Za(kt,r,"duration")||kt.default.duration)},e.prototype.getPendingTransitions=function(){return this.pendingTransitions},e}(vg),Fg=function(t){function e(){return null!==t&&t.apply(this,arguments)||this}return n(e,t),e.appendOrUpdateLinearGradient=function(t){var e=t.svg.select("defs linearGradient#"+t.id);e.empty()&&(e=t.svg.append("defs").append("linearGradient").attr("id",t.id).attr("x1",t.x1).attr("x2",t.x2).attr("y1",t.y1).attr("y2",t.y2)),e.selectAll("stop").remove(),e.selectAll("stop").data(t.stops).enter().append("stop").attr("offset",(function(t){return t.offset})).style("stop-color",(function(t){return t.color})).style("stop-opacity",(function(t){return t.opacity}))},e.getOffsetRatio=function(t){return(100*Math.abs(t[1])/Math.abs(t[0]-t[1])).toFixed(2)+"%"},e.getStops=function(t,n){var r=[{offset:"0%",color:n,opacity:"0.6"},{offset:"80%",color:n,opacity:"0"}];return t[0]<0&&t[1]>0&&(r=[{offset:"0%",color:n,opacity:"0.6"},{offset:e.getOffsetRatio(t),color:n,opacity:"0"},{offset:"100%",color:n,opacity:"0.6"}]),r},e}(vg),Wg=function(t){function e(){var e=null!==t&&t.apply(this,arguments)||this;return e.scaleTypes={top:null,right:null,bottom:null,left:null},e.scales={top:null,right:null,bottom:null,left:null},e}return n(e,t),e.prototype.getDomainAxisPosition=function(t){var e,n=(void 0===t?{}:t).datum,r=void 0===n?null:n;if(this.dualAxes&&r){var i=this.model.getOptions(),o=i.data.groupMapsTo,a=Za(i,"axes",this.secondaryDomainAxisPosition),s=r[o];if((null===(e=a)||void 0===e?void 0:e.correspondingDatasets)&&a.correspondingDatasets.includes(s))return this.secondaryDomainAxisPosition}return this.domainAxisPosition},e.prototype.getRangeAxisPosition=function(t){var e,n=void 0===t?{}:t,r=n.datum,i=void 0===r?null:r,o=n.groups,a=void 0===o?null:o;if(this.dualAxes){var s=this.model.getOptions(),l=s.data.groupMapsTo,u=Za(s,"axes",this.secondaryRangeAxisPosition),c=void 0;if(null!==i?c=i[l]:a&&a.length>0&&(c=a[0]),(null===(e=u)||void 0===e?void 0:e.correspondingDatasets)&&u.correspondingDatasets.includes(c))return this.secondaryRangeAxisPosition}return this.rangeAxisPosition},e.prototype.getAxisOptions=function(t){return Za(this.model.getOptions(),"axes",t)},e.prototype.getDomainAxisOptions=function(){var t=this.getDomainAxisPosition();return this.getAxisOptions(t)},e.prototype.getRangeAxisOptions=function(){var t=this.getRangeAxisPosition();return this.getAxisOptions(t)},e.prototype.getScaleLabel=function(t){var e=this.getAxisOptions(t).title;return e||(t===U.BOTTOM||t===U.TOP?"x-value":"y-value")},e.prototype.getDomainLabel=function(){return this.getScaleLabel(this.getDomainAxisPosition())},e.prototype.getRangeLabel=function(){return this.getScaleLabel(this.getRangeAxisPosition())},e.prototype.update=function(t){var e=this;this.determineAxisDuality(),this.findDomainAndRangeAxes(),this.determineOrientation(),Object.keys(U).map((function(t){return U[t]})).forEach((function(t){e.scales[t]=e.createScale(t)}))},e.prototype.findDomainAndRangeAxes=function(){var t=this.findVerticalAxesPositions(),e=this.findHorizontalAxesPositions(),n=this.findDomainAndRangeAxesPositions(t,e);this.domainAxisPosition=n.primaryDomainAxisPosition,this.rangeAxisPosition=n.primaryRangeAxisPosition,this.isDualAxes()&&(this.secondaryDomainAxisPosition=n.secondaryDomainAxisPosition,this.secondaryRangeAxisPosition=n.secondaryRangeAxisPosition)},e.prototype.determineOrientation=function(){this.rangeAxisPosition!==U.LEFT&&this.rangeAxisPosition!==U.RIGHT||this.domainAxisPosition!==U.BOTTOM&&this.domainAxisPosition!==U.TOP?this.orientation=H.HORIZONTAL:this.orientation=H.VERTICAL},e.prototype.isDualAxes=function(){return this.dualAxes},e.prototype.determineAxisDuality=function(){var t,e,n,r,i=this.model.getOptions(),o=Za(i,"axes");((null===(t=o[U.LEFT])||void 0===t?void 0:t.correspondingDatasets)&&o[U.RIGHT]||(null===(e=o[U.RIGHT])||void 0===e?void 0:e.correspondingDatasets)&&o[U.LEFT]||(null===(n=o[U.TOP])||void 0===n?void 0:n.correspondingDatasets)&&o[U.BOTTOM]||(null===(r=o[U.BOTTOM])||void 0===r?void 0:r.correspondingDatasets)&&o[U.TOP])&&(this.dualAxes=!0)},e.prototype.getCustomDomainValuesByposition=function(t){var e=Za(this.model.getOptions(),"axes",t,"domain");if(e&&!Array.isArray(e))throw new Error("Domain in "+t+" axis is not a valid array");if(Array.isArray(e)&&(this.scaleTypes[t]===G.LINEAR||this.scaleTypes[t]===G.TIME)&&2!==e.length)throw new Error("There can only be 2 elements in domain for scale type: "+this.scaleTypes[t]);return e},e.prototype.getOrientation=function(){return this.orientation},e.prototype.getScaleByPosition=function(t){return this.scales[t]},e.prototype.getScaleTypeByPosition=function(t){return this.scaleTypes[t]},e.prototype.getDomainAxisScaleType=function(){var t=this.getDomainAxisPosition();return this.getScaleTypeByPosition(t)},e.prototype.getRangeAxisScaleType=function(){var t=this.getRangeAxisPosition();return this.getScaleTypeByPosition(t)},e.prototype.getDomainScale=function(){return this.scales[this.domainAxisPosition]},e.prototype.getRangeScale=function(){return this.scales[this.rangeAxisPosition]},e.prototype.getMainXAxisPosition=function(){var t=[U.BOTTOM,U.TOP];return[this.domainAxisPosition,this.rangeAxisPosition].find((function(e){return t.indexOf(e)>-1}))},e.prototype.getMainYAxisPosition=function(){var t=[U.LEFT,U.RIGHT];return[this.domainAxisPosition,this.rangeAxisPosition].find((function(e){return t.indexOf(e)>-1}))},e.prototype.getMainXScale=function(){return this.scales[this.getMainXAxisPosition()]},e.prototype.getMainYScale=function(){return this.scales[this.getMainYAxisPosition()]},e.prototype.getValueFromScale=function(t,e,n,r,i){var o,a=this.model.getOptions(),s=Za(a,"axes")[n].mapsTo,l=null!==Za(r,s)?r[s]:r;switch(e){case G.LABELS:o=t(l)+t.step()/2;break;case G.TIME:o=t(new Date(l));break;default:o=t(l)}return o},e.prototype.getBoundedScaledValues=function(t,e){var n=this.model.getOptions().bounds,r=this.getRangeAxisPosition({datum:t}),i=this.scales[r],o=this.model.getOptions(),a=Za(o,"axes")[r].mapsTo,s=void 0!==t[a]?t[a]:t;return[i(null!==Za(t,n.upperBoundMapsTo)?t[n.upperBoundMapsTo]:s),i(null!==Za(t,n.lowerBoundMapsTo)?t[n.lowerBoundMapsTo]:s)]},e.prototype.getValueThroughAxisPosition=function(t,e,n){var r=this.scaleTypes[t],i=this.scales[t];return this.getValueFromScale(i,r,t,e,n)},e.prototype.getDomainValue=function(t,e){var n=this.getDomainAxisPosition({datum:t});return this.getValueThroughAxisPosition(n,t,e)},e.prototype.getRangeValue=function(t,e){var n=this.getRangeAxisPosition({datum:t});return this.getValueThroughAxisPosition(n,t,e)},e.prototype.getMainXScaleType=function(){return this.getScaleTypeByPosition(this.getMainXAxisPosition())},e.prototype.getMainYScaleType=function(){return this.getScaleTypeByPosition(this.getMainYAxisPosition())},e.prototype.getDomainIdentifier=function(t){var e=this.model.getOptions();return Za(e,"axes",this.getDomainAxisPosition({datum:t}),"mapsTo")},e.prototype.getRangeIdentifier=function(t){var e=this.model.getOptions();return Za(e,"axes",this.getRangeAxisPosition({datum:t}),"mapsTo")},e.prototype.extendsDomain=function(t,e){var n=this.model.getOptions(),r=Za(n,"axes",t);return r.scaleType===G.TIME?function(t,e){var n=new Date(t[0]),r=new Date(t[1]);if(function(t,e){if(arguments.length<2)throw new TypeError("2 arguments required, but only "+arguments.length+" present");var n=Vf(t),r=Vf(e),i=Qf(n,r),o=Math.abs(ep(n,r));n.setFullYear(n.getFullYear()-i*o);var a=Qf(n,r)===-i,s=i*(o-a);return 0===s?0:s}(r,n)>1)return[og(n,e),Kf(r,e)];if(function(t,e){if(arguments.length<2)throw new TypeError("2 arguments required, but only "+arguments.length+" present");var n=Vf(t),r=Vf(e),i=Qf(n,r),o=Math.abs(tp(n,r));n.setMonth(n.getMonth()-i*o);var a=Qf(n,r)===-i,s=i*(o-a);return 0===s?0:s}(r,n)>1)return[rg(n,e),Xf(r,e)];if(function(t,e){if(arguments.length<2)throw new TypeError("2 arguments required, but only "+arguments.length+" present");var n=Vf(t),r=Vf(e),i=Qf(n,r),o=Math.abs(qf(n,r));n.setDate(n.getDate()-i*o);var a=Qf(n,r)===-i,s=i*(o-a);return 0===s?0:s}(r,n)>1)return[tg(n,e),Gf(r,e)];if(function(t,e){if(arguments.length<2)throw new TypeError("2 arguments required, but only "+arguments.length+" present");var n=np(t,e)/36e5;return n>0?Math.floor(n):Math.ceil(n)}(r,n)>1)return[eg(n,e),jf(r,e)];if(rp(r,n)>30)return[ng(n,30*e),Yf(r,30*e)];if(rp(r,n)>1)return[ng(n,e),Yf(r,e)];if(ip(r,n)>15)return[ig(n,15*e),$f(r,15*e)];if(ip(r,n)>1)return[ig(n,e),$f(r,e)];return[n,r]}(e,Za(n,"timeScale","addSpaceOnEdges")):function(t,e,n){var r=t[0],i=t[1],o=(i-r)*e,a=i<=0&&i+o>0?0:i+o,s=r>=0&&r-o<0?0:r-o;if(n===G.LOG&&s<=0){if(r<=0)throw Error("Data must have values greater than 0 if log scale type is used.");s=r}return[s,a]}(e,mt.paddingRatio,r.scaleType)},e.prototype.findVerticalAxesPositions=function(){var t=this.model.getOptions(),e=Za(t,"axes"),n=this.isDualAxes();return null===Za(e,U.LEFT)&&null!==Za(e,U.RIGHT)||!0===Za(e,U.RIGHT,"main")||n&&Za(e,U.LEFT,"correspondingDatasets")?{primary:U.RIGHT,secondary:U.LEFT}:{primary:U.LEFT,secondary:U.RIGHT}},e.prototype.findHorizontalAxesPositions=function(){var t=this.model.getOptions(),e=Za(t,"axes"),n=this.isDualAxes();return null===Za(e,U.BOTTOM)&&null!==Za(e,U.TOP)||!0===Za(e,U.TOP,"main")||n&&Za(e,U.BOTTOM,"correspondingDatasets")?{primary:U.TOP,secondary:U.BOTTOM}:{primary:U.BOTTOM,secondary:U.TOP}},e.prototype.findDomainAndRangeAxesPositions=function(t,e){var n=this.model.getOptions(),r=Za(n,"axes",t.primary),i=Za(n,"axes",e.primary),o=r.scaleType||G.LINEAR,a=i.scaleType||G.LINEAR,s={primaryDomainAxisPosition:null,secondaryDomainAxisPosition:null,primaryRangeAxisPosition:null,secondaryRangeAxisPosition:null};return s.primaryDomainAxisPosition=e.primary,s.primaryRangeAxisPosition=t.primary,s.secondaryDomainAxisPosition=e.secondary,s.secondaryRangeAxisPosition=t.secondary,(a!==G.LABELS&&a!==G.TIME&&o===G.LABELS||o===G.TIME)&&(s.primaryDomainAxisPosition=t.primary,s.primaryRangeAxisPosition=e.primary,s.secondaryDomainAxisPosition=t.secondary,s.secondaryRangeAxisPosition=e.secondary),s},e.prototype.getScaleDomain=function(t){var e=this.model.getOptions(),n=Za(e,"axes",t),r=Za(e,"bounds"),i=n.includeZero,o=Za(n,"scaleType")||G.LINEAR;if(this.model.isDataEmpty())return[];if(n.binned)return[0,hl(a=this.model.getBinConfigurations().bins,(function(t){return t.length}))];if(n.limitDomainToBins){var a=this.model.getBinConfigurations().bins,s=this.model.getStackKeys({bins:a});return[s[0].split("-")[0],s[s.length-1].split("-")[1]]}var l,u,c=this.model.getDisplayData(),h=n.extendLinearDomainBy,d=n.mapsTo,f=n.percentage,p=n.thresholds,g=mt.ratio,v=g.reference,m=g.compareTo;if(n.domain)return o===G.LABELS?n.domain:(o===G.TIME&&(n.domain=n.domain.map((function(t){return void 0===t.getTime?new Date(t):t}))),this.extendsDomain(t,n.domain));if(f)return[0,100];if(n&&o===G.LABELS)return Ga(c.map((function(t){return t[d]})));var y=this.model.getDataGroupNames();if(o===G.LABELS_RATIO)return c.map((function(t){return t[v]+"/"+t[m]}));if(o===G.TIME)u=c.map((function(t){return+new Date(t[d])}));else if(r&&e.axes)u=[],c.forEach((function(t){u.push(t[d]),t[r.upperBoundMapsTo]&&u.push(t[r.upperBoundMapsTo]),t[r.lowerBoundMapsTo]&&u.push(t[r.lowerBoundMapsTo])}));else if(!0===n.stacked&&y&&t===this.getRangeAxisPosition()){var b=e.data.groupMapsTo,E=this.model.getDataValuesGroupedByKeys({groups:y}),_=c.filter((function(t){return!y.includes(t[b])})),x=[];E.forEach((function(t){t.sharedStackKey;var e=k(t,["sharedStackKey"]),n=0,r=0;Object.values(e).forEach((function(t){isNaN(t)||(t<0?r+=t:n+=t)})),x.push([r,n])})),u=R(Zn(x),_.map((function(t){return t[d]})))}else u=[],c.forEach((function(t){var e=t[d];Array.isArray(e)&&2===e.length?(u.push(e[0]),u.push(e[1])):(h&&u.push(Math.max(t[d],t[h])),u.push(e))}));return o!==G.TIME&&o!==G.LOG&&i&&u.push(0),p&&p.length>0&&p.forEach((function(t){var e=Za(t,"value");null!==e&&u.push(e)})),l=Ys(u),l=this.extendsDomain(t,l)},e.prototype.createScale=function(t){var e=this.model.getOptions(),n=Za(e,"axes",t);if(!n)return null;var r,i=Za(n,"scaleType")||G.LINEAR;return this.scaleTypes[t]=i,(r=i===G.TIME?Kh():i===G.LOG?function t(){const e=rc(Lu()).domain([1,10]);return e.copy=()=>Au(e,t()).base(e.base()),yl.apply(e,arguments),e}().base(n.base||10):i===G.LABELS||i===G.LABELS_RATIO?_l():Xu()).domain(this.getScaleDomain(t)),r},e.prototype.getHighestDomainThreshold=function(){var t=Za(this.model.getOptions(),"axes"),e=this.getDomainAxisPosition(),n=t[e].thresholds;if(!Array.isArray(n)||Array.isArray(n)&&!n.length)return null;var r=this.getDomainScale(),i=n.sort((function(t,e){return e.value-t.value}))[0];return this.getScaleTypeByPosition(e)!==G.TIME||"string"!=typeof i.value&&void 0!==i.value.getTime||(i.value=new Date(i.value)),{threshold:i,scaleValue:r(i.value)}},e.prototype.getHighestRangeThreshold=function(){var t=Za(this.model.getOptions(),"axes")[this.getRangeAxisPosition()].thresholds;if(!Array.isArray(t)||Array.isArray(t)&&!t.length)return null;var e=this.getRangeScale(),n=t.sort((function(t,e){return e.value-t.value}))[0];return{threshold:n,scaleValue:e(n.value)}},e}(vg);var qg=function(t){function e(){var e=null!==t&&t.apply(this,arguments)||this;return e.curveTypes={curveLinear:Cd,curveLinearClosed:vf,curveBasis:Yd,curveBasisClosed:Xd,curveBasisOpen:Kd,curveBundle:Jd,curveCardinal:nf,curveCardinalClosed:of,curveCardinalOpen:sf,curveCatmullRom:cf,curveCatmullRomClosed:df,curveCatmullRomOpen:pf,curveMonotoneX:Of,curveMonotoneY:Tf,curveNatural:Cf,curveStep:Lf,curveStepAfter:kf,curveStepBefore:Df},e}return n(e,t),e.prototype.getD3Curve=function(){var t="curveLinear",e=this.model.getOptions().curve;if(e&&(t="string"==typeof e?e:e.name),this.curveTypes[t]){var n=this.curveTypes[t];return e&&Object.keys(e).forEach((function(t){n[t]&&(n=n[t](e[t]))})),n}return console.warn("The curve type '"+t+"' is invalid, using 'curveLinear' instead"),this.curveTypes.curveLinear},e}(vg),Yg=function(t){function e(){return null!==t&&t.apply(this,arguments)||this}return n(e,t),e.prototype.isZoomBarEnabled=function(){if(!this.services.cartesianScales)return!1;if(!Za(this.model.getOptions(),"zoomBar","top","enabled"))return!1;this.services.cartesianScales.findDomainAndRangeAxes();var t=this.services.cartesianScales.getMainXAxisPosition(),e=Za(this.model.getOptions(),"axes",t,"scaleType");return t===U.BOTTOM&&e===G.TIME},e.prototype.getZoomBarData=function(){var t=this.model.getZoomBarData();return t&&t.length>1?t:this.model.getDisplayData()},e.prototype.getDefaultZoomBarDomain=function(t){var e=t||this.services.zoom.getZoomBarData(),n=this.services.cartesianScales,r=n.getMainXAxisPosition(),i=n.getDomainIdentifier(),o=Za(this.model.getOptions(),"axes",r,"domain");return Array.isArray(o)&&2===o.length?o:n.extendsDomain(r,Ys(e,(function(t){return t[i]})))},e.prototype.handleDomainChange=function(t,e){void 0===e&&(e={dispatchEvent:!0}),this.model.set({zoomDomain:t},{animate:!1}),e.dispatchEvent&&this.services.events.dispatchEvent(ht.ZoomDomain.CHANGE,{newDomain:t})},e.prototype.getZoomRatio=function(){return Za(this.model.getOptions(),"zoomBar","zoomRatio")},e.prototype.filterDataForRangeAxis=function(t,e){var n=this.model.get("zoomDomain"),r=Object.assign({stacked:!1},e),i=Za(this.model.getOptions(),"zoomBar","updateRangeAxis");if(this.isZoomBarEnabled()&&i&&n){var o=r.stacked?"sharedStackKey":this.services.cartesianScales.getDomainIdentifier(),a=t.filter((function(t){return new Date(t[o])>=n[0]&&new Date(t[o])<=n[1]}));if(a.length>0)return a}return t},e.prototype.zoomIn=function(t){void 0===t&&(t=this.getZoomRatio());var e=this.model.get("zoomDomain"),n=Rt.handleWidth,r=this.services.cartesianScales.getMainXScale().copy();r.domain(this.getDefaultZoomBarDomain());var i=r(e[0]),o=r(e[1]);if(!(o-i<n+1)){var a=r.range(),s=o-i,l=Math.min((a[1]-a[0])/2*(t/2),s/2),u=i+l,c=o-l;u>=c&&(u=i+s/2-n/2,c=o-s/2+n/2);var h=[r.invert(u),r.invert(c)];e[0].valueOf()===h[0].valueOf()&&e[1].valueOf()===h[1].valueOf()||this.handleDomainChange(h)}},e.prototype.zoomOut=function(t){void 0===t&&(t=this.getZoomRatio());var e=this.model.get("zoomDomain"),n=this.services.cartesianScales.getMainXScale().copy();n.domain(this.getDefaultZoomBarDomain());var r=n(e[0]),i=n(e[1]),o=n.range(),a=(o[1]-o[0])/2*(t/2),s=Math.max(r-a,o[0]),l=Math.min(i+a,o[1]),u=[n.invert(s),n.invert(l)];e[0].valueOf()===u[0].valueOf()&&e[1].valueOf()===u[1].valueOf()||this.handleDomainChange(u)},e.prototype.resetZoomDomain=function(){var t=this.model.get("zoomDomain"),e=this.getDefaultZoomBarDomain();t[0].valueOf()===e[0].valueOf()&&t[1].valueOf()===e[1].valueOf()||this.handleDomainChange(e)},e.prototype.isMinZoomDomain=function(){var t=this.model.get("zoomDomain"),e=this.getDefaultZoomBarDomain();return!(!t||!e)&&(t[1].valueOf()-t[0].valueOf())/(e[1].valueOf()-e[0].valueOf())<Za(this.model.getOptions(),"zoomBar","minZoomRatio")},e.prototype.isMaxZoomDomain=function(){var t=this.model.get("zoomDomain"),e=this.getDefaultZoomBarDomain();return!(!t||!e||t[0].valueOf()!==e[0].valueOf()||t[1].valueOf()!==e[1].valueOf())},e.prototype.isEmptyState=function(){return 0===this.getZoomBarData().length},e.prototype.isZoomBarLoading=function(t){return Za(this.model.getOptions(),"zoomBar",t,"loading")},e.prototype.isZoomBarLocked=function(t){return Za(this.model.getOptions(),"zoomBar",t,"locked")},e}(vg),Zg=function(t){function e(){return null!==t&&t.apply(this,arguments)||this}return n(e,t),e.prototype.zoomIn=function(t,e,n){var r,i,o,a=n||yt;t&&(r=t.x,i=t.y,o=2);var s=Hg.getSVGElementSize(this.services.domUtils.getHolder(),{useClientDimensions:!0}),l=s.width,u=s.height;e.transition().duration(a.duration).ease(a.ease).attr("transform","translate("+l/2+", "+u/2+") scale("+o+") translate("+-r+","+-i+")"),this.services.events.dispatchEvent(ht.CanvasZoom.CANVAS_ZOOM_IN,{element:Ba(t)})},e.prototype.zoomOut=function(t,e){var n=e||yt;t.transition().duration(n.duration).ease(n.ease).attr("transform",""),this.services.events.dispatchEvent(ht.CanvasZoom.CANVAS_ZOOM_OUT)},e}(vg);function Xg(t){var e=Ys(t,(function(t){return t.value})),n=Xu().domain(e).nice().domain();if(n[0]>0)n[0]=0;else if(0===n[0]&&0===n[1])return[0,1];return n[0]<0&&n[1]>0&&(Math.abs(n[0])>n[1]?n[1]=Math.abs(n[0]):n[0]=-n[1]),n}function $g(t,e){var n=Za(e,"gradient","colors"),r=!go(n),i=Za(e,"pairing","option"),o=Xg(t),a=o[0]<0&&o[1]>0?"diverge":"mono";(i<1&&i>4&&"mono"===a||i<1&&i>2&&"diverge"===a)&&(i=1);var s=r?n:[];if(!r)for(var l="diverge"===a?17:11,u=1;u<l+1;u++)s.push("fill-"+a+"-"+i+"-"+u);return function t(){var e,n=0,r=1,i=1,o=[.5],a=[0,1];function s(t){return null!=t&&t<=t?a[qs(o,t,0,i)]:e}function l(){var t=-1;for(o=new Array(i);++t<i;)o[t]=((t+1)*r-(t-i)*n)/(i+1);return s}return s.domain=function(t){return arguments.length?([n,r]=t,n=+n,r=+r,l()):[n,r]},s.range=function(t){return arguments.length?(i=(a=Array.from(t)).length-1,l()):a.slice()},s.invertExtent=function(t){var e=a.indexOf(t);return e<0?[NaN,NaN]:e<1?[n,o[0]]:e>=i?[o[i-1],r]:[o[e-1],o[e]]},s.unknown=function(t){return arguments.length?(e=t,s):s},s.thresholds=function(){return o.slice()},s.copy=function(){return t().domain([n,r]).range(a).unknown(e)},yl.apply(Zu(s),arguments)}().domain(o).range(s)}var Kg=function(){function t(t,e,n){if(this.renderType=I.HTML,this.configs={},this.model=t,this.services=e,n&&(this.configs=n,this.configs.id)){var r=Za(this.model.getOptions(),"style","prefix");this.id=r+"--"+this.configs.id}this.parent||this.setParent(Ba(this.services.domUtils.getMainContainer()))}return t.prototype.init=function(){},t.prototype.render=function(t){console.error("render() method is not implemented")},t.prototype.destroy=function(){},t.prototype.setModel=function(t){this.model=t},t.prototype.setServices=function(t){this.services=t},t.prototype.setParent=function(t){var e=this.parent;if(this.parent=t,(!e||e.node()!==t.node())&&this.type){var n=Za(this.model.getOptions(),"style","prefix");this.parent.classed("cds--"+n+"--"+this.type,!0),e&&e.classed("cds--"+n+"--"+this.type,!1)}},t.prototype.getParent=function(){return this.parent},t.prototype.getComponentContainer=function(t){if(void 0===t&&(t={withinChartClip:!1}),this.type){var e=Za(this.model.getOptions(),"style","prefix"),n=this.id?"#"+this.id:"",r=Hg.appendOrSelect(this.parent,(this.renderType===I.SVG?"svg":"div")+n+".cds--"+e+"--"+this.type);if(t.withinChartClip){var i=this.model.get("chartClipId");if(i){var o=Ba("#"+i).select("rect");0!==o.size()&&parseFloat(o.attr("height"))>0&&r.attr("clip-path","url(#"+i+")")}}return r.attr("width","100%").attr("height","100%")}return this.parent},t.prototype.getOptions=function(){return this.configs.options?bo({},this.model.getOptions(),this.configs.options):this.model.getOptions()},t}(),Qg=function(t){function e(){var e=null!==t&&t.apply(this,arguments)||this;return e.type="legend",e.renderType=I.HTML,e}return n(e,t),e.prototype.render=function(){var t=this,e=this.getOptions(),n=Za(e,"legend"),i=Za(n,"alignment"),o=Za(e,"legend","orientation"),a=this.model.getDataGroups(),s=wt.items.status.DISABLED,l=a.some((function(t){return t.status===s})),u=Za(n,"order"),c=this.getComponentContainer().classed("center-aligned",i===j.CENTER).classed("right-aligned",i===j.RIGHT).classed(o,!0).classed("has-deactivated-items",l).attr("role",r.GROUP).attr("aria-label","Data groups").attr("data-name","legend-items");u&&(a=this.sortDataGroups(a,u));var h=c.selectAll("div.legend-item").data(a,(function(t){return t.name})),d=h.enter().append("div").attr("class","legend-item");d.merge(c.selectAll("div.legend-item")).classed("active",(function(t,e){return t.status===wt.items.status.ACTIVE}));var f=Za(this.getOptions(),"legend","clickable");c.classed("clickable",f&&a.length>1);var p=wt.checkbox.radius,g=d.append("div").classed("checkbox",!0),v=g.merge(h.select("div.checkbox")).attr("role",r.CHECKBOX).attr("tabindex",f?0:-1).attr("aria-labelledby",(function(e,n){return t.services.domUtils.generateElementIDString("legend-datagroup-"+n+"-title")})).attr("aria-checked",(function(t){return t.status===wt.items.status.ACTIVE})).attr("width",2*p).attr("height",2*p).attr("class",(function(e,n){return t.model.getColorClassName({classNameTypes:[N.BACKGROUND],dataGroupName:e.name,originalClassName:"checkbox"})})).style("background",(function(e){return e.status===wt.items.status.ACTIVE?t.model.getFillColor(e.name)||t.model.getStrokeColor(e.name):null})).classed("active",(function(t,e){return t.status===wt.items.status.ACTIVE})),m=(g.append("svg").attr("focusable",!1).attr("preserveAspectRatio","xMidYMid meet").attr("xmlns","http://www.w3.org/2000/svg").attr("width","11").attr("height","11").attr("viewBox","0 0 31 28").attr("aria-hidden",!0).style("will-change","transform").append("path").attr("d","M13 21.2l-7.1-7.1-1.4 1.4 7.1 7.1L13 24 27.1 9.9l-1.4-1.5z"),d.append("p").merge(h.select("p")),Za(e,"legend","additionalItems"));if(m&&a.length){var y=this,b=c.selectAll("div.additional-item").data(m);b.exit().remove();var E,_=b.enter().append("div").merge(b).classed("legend-item",!0).classed("additional",!0).attr("aria-labelledby",(function(e,n){return t.services.domUtils.generateElementIDString("legend-datagroup-"+(v.size()+n)+"-title")}));_.selectAll("*").remove();var x=1;_.append("svg").classed("icon",!0).each((function(t,e){var n=Ba(this);E&&E==t.type?x++:(E=t.type,x=1),y.addAdditionalItem(n,t,x)}));_.append("p").merge(_.select("p"));this.truncateLegendText()}h.exit().on("mouseover",null).on("click",null).on("mouseout",null).remove(),f&&d.size()>1&&this.addEventListeners()},e.prototype.sortDataGroups=function(t,e){if(t.sort((function(t,n){return e.indexOf(t.name)-e.indexOf(n.name)})),e.length<t.length){var n=t.length-e.length;return t.slice(n).concat(t.slice(0,n))}return t},e.prototype.addAdditionalItem=function(t,e,n){var i=wt.area,o=i.width,a=i.height;if(e.type===at.RADIUS?t.style("width",a+"px").style("height",a+"px"):t.style("width",o+"px").style("height",a+"px"),e.type===at.RADIUS){var s=wt.radius,l=s.iconData,u=s.fill,c=s.stroke;t.attr("fill","none").selectAll("circle").data(l).enter().append("circle").classed("radius",!0).attr("role",r.IMG).attr("aria-label","radius").attr("cx",(function(t){return t.cx})).attr("cy",(function(t){return t.cy})).attr("r",(function(t){return t.r})).style("fill",e.fill?e.fill:u).style("stroke",e.stroke?e.stroke:c)}else if(e.type===at.LINE){var h=wt.line;t.select("line.line").empty()&&t.append("line").classed("line-"+n,!0).attr("role",r.IMG).attr("aria-label","line").attr("x1",0).attr("y1",h.yPosition).attr("x2",o).attr("y2",h.yPosition).style("stroke",e.stroke?e.stroke:h.stroke).style("stroke-width",h.strokeWidth)}else if(e.type===at.AREA)t.select("rect.area").empty()&&t.append("rect").classed("area-"+n,!0).attr("role",r.IMG).attr("aria-label","area").attr("width",o).attr("height",a).style("fill",n>3&&!e.fill?wt.area.fill:e.fill).style("stroke",e.stroke);else if(e.type===at.SIZE){var d=wt.size;l=d.iconData,u=d.fill,c=d.stroke;t.attr("fill","none").attr("role",r.IMG).attr("aria-label","size").selectAll("rect").data(l).enter().append("rect").classed("size",!0).attr("width",(function(t){return t.width})).attr("height",(function(t){return t.height})).attr("y",(function(t){return 0})).style("fill",e.fill?e.fill:u).style("stroke",e.stroke?e.stroke:c).style("stroke-width",1)}else if(e.type===at.QUARTILE){l=wt.quartile.iconData;t.selectAll("rect").attr("role",r.IMG).attr("aria-label","quartile").data(l).enter().append("rect").attr("class",(function(t,e){return"quartile-"+(0===e?"wrapper":"line")})).attr("x",(function(t){return t.x})).attr("y",(function(t){return t.y})).attr("width",(function(t){return t.width})).attr("height",(function(t){return t.height}))}else if(e.type===at.ZOOM){var f=Za(Gs,"legend","zoom"),p=(l=f.iconData,f.color),g=t.attr("role",r.IMG).attr("aria-label","zoom").selectAll("g.icon").data(l).enter();g.append("g").attr("x",(function(t){return t.x})).attr("y",(function(t){return t.y})).attr("width",(function(t){return t.width})).attr("height",(function(t){return t.height})).append("polygon").attr("points","7.7 4.82 5.78 4.82 5.78 2.89 4.82 2.89 4.82 4.82 2.89 4.82 2.89 5.78 4.82 5.78 4.82 7.7 5.78 7.7 5.78 5.78 7.7 5.78 7.7 4.82").attr("fill",(function(t){return e.color?e.color:p})),g.append("path").attr("d","M9.36,8.67A5.22,5.22,0,0,0,10.59,5.3,5.3,5.3,0,1,0,5.3,10.59,5.22,5.22,0,0,0,8.67,9.36L12.32,13l.68-.68Zm-4.06,1A4.34,4.34,0,1,1,9.63,5.3,4.33,4.33,0,0,1,5.3,9.63Z").attr("fill",(function(t){return e.color?e.color:p}))}},e.prototype.truncateLegendText=function(){var t=this.getComponentContainer(),e=Za(this.getOptions(),"legend","truncation"),n=Za(e,"type"),r=Za(e,"threshold"),i=Za(e,"numCharacter"),o=t.selectAll("div.legend-item p");o.attr("id",(function(t,e){return(this.parentNode.querySelector("div.checkbox")||this.parentNode).getAttribute("aria-labelledby")})),n!==V.NONE?o.html((function(t){return t.name.length>r?qa(t.name,n,i):t.name})):o.html((function(t){return t.name}))},e.prototype.addEventListeners=function(){var t=this,e=this.getComponentContainer(),n=this.getOptions(),r=Za(n,"legend"),i=Za(r,"truncation");e.selectAll("div.legend-item").on("mouseover",(function(e){t.services.events.dispatchEvent(ht.Legend.ITEM_HOVER,{hoveredElement:Ba(this)});var n=Ba(this);n.select("div.checkbox").classed("hovered",!0);var r=n.datum();r.name.length>i.threshold&&i.type!==V.NONE&&t.services.events.dispatchEvent(ht.Tooltip.SHOW,{event:e,hoveredElement:n,content:r.name})})).on("mousemove",(function(e){Ba(this).datum().name.length>i.threshold&&i.type!==V.NONE&&t.services.events.dispatchEvent(ht.Tooltip.MOVE,{event:e})})).on("click",(function(){t.services.events.dispatchEvent(ht.Legend.ITEM_CLICK,{clickedElement:Ba(this)});var e=Ba(this).datum();t.model.toggleDataLabel(e.name)})).on("mouseout",(function(){var e=Ba(this);e.select("div.checkbox").classed("hovered",!1),e.datum().name.length>i.threshold&&i.type!==V.NONE&&t.services.events.dispatchEvent(ht.Tooltip.HIDE),t.services.events.dispatchEvent(ht.Legend.ITEM_MOUSEOUT,{hoveredElement:e})})),e.selectAll("div.legend-item div.checkbox").on("keyup",(function(e){e.key&&"Tab"===e.key&&t.services.events.dispatchEvent(ht.Legend.ITEM_HOVER,{hoveredElement:Ba(this)})})),e.selectAll("div.legend-item div.checkbox").on("keydown",(function(e,n){e.key&&" "===e.key?(e.preventDefault(),t.model.toggleDataLabel(n.name)):e.key&&"Tab"===e.key&&t.services.events.dispatchEvent(ht.Legend.ITEM_MOUSEOUT,{hoveredElement:Ba(this)})})),e.selectAll("g.additional-item").on("mouseover",(function(e){var n=Ba(this),r=n.datum();r.name.length>i.threshold&&t.services.events.dispatchEvent(ht.Tooltip.SHOW,{event:e,hoveredElement:n,content:r.name})}))},e}(Kg);function Jg(t){return t}function tv(t){return"translate("+t+",0)"}function ev(t){return"translate(0,"+t+")"}function nv(t){return e=>+t(e)}function rv(t,e){return e=Math.max(0,t.bandwidth()-2*e)/2,t.round()&&(e=Math.round(e)),n=>+t(n)+e}function iv(){return!this.__axis}function ov(t,e){var n=[],r=null,i=null,o=6,a=6,s=3,l="undefined"!=typeof window&&window.devicePixelRatio>1?0:.5,u=1===t||4===t?-1:1,c=4===t||2===t?"x":"y",h=1===t||3===t?tv:ev;function d(d){var f=null==r?e.ticks?e.ticks.apply(e,n):e.domain():r,p=null==i?e.tickFormat?e.tickFormat.apply(e,n):Jg:i,g=Math.max(o,0)+s,v=e.range(),m=+v[0]+l,y=+v[v.length-1]+l,b=(e.bandwidth?rv:nv)(e.copy(),l),E=d.selection?d.selection():d,_=E.selectAll(".domain").data([null]),x=E.selectAll(".tick").data(f,e).order(),w=x.exit(),O=x.enter().append("g").attr("class","tick"),T=x.select("line"),S=x.select("text");_=_.merge(_.enter().insert("path",".tick").attr("class","domain").attr("stroke","currentColor")),x=x.merge(O),T=T.merge(O.append("line").attr("stroke","currentColor").attr(c+"2",u*o)),S=S.merge(O.append("text").attr("fill","currentColor").attr(c,u*g).attr("dy",1===t?"0em":3===t?"0.71em":"0.32em")),d!==E&&(_=_.transition(d),x=x.transition(d),T=T.transition(d),S=S.transition(d),w=w.transition(d).attr("opacity",1e-6).attr("transform",(function(t){return isFinite(t=b(t))?h(t+l):this.getAttribute("transform")})),O.attr("opacity",1e-6).attr("transform",(function(t){var e=this.parentNode.__axis;return h((e&&isFinite(e=e(t))?e:b(t))+l)}))),w.remove(),_.attr("d",4===t||2===t?a?"M"+u*a+","+m+"H"+l+"V"+y+"H"+u*a:"M"+l+","+m+"V"+y:a?"M"+m+","+u*a+"V"+l+"H"+y+"V"+u*a:"M"+m+","+l+"H"+y),x.attr("opacity",1).attr("transform",(function(t){return h(b(t)+l)})),T.attr(c+"2",u*o),S.attr(c,u*g).text(p),E.filter(iv).attr("fill","none").attr("font-size",10).attr("font-family","sans-serif").attr("text-anchor",2===t?"start":4===t?"end":"middle"),E.each((function(){this.__axis=b}))}return d.scale=function(t){return arguments.length?(e=t,d):e},d.ticks=function(){return n=Array.from(arguments),d},d.tickArguments=function(t){return arguments.length?(n=null==t?[]:Array.from(t),d):n.slice()},d.tickValues=function(t){return arguments.length?(r=null==t?null:Array.from(t),d):r&&r.slice()},d.tickFormat=function(t){return arguments.length?(i=t,d):i},d.tickSize=function(t){return arguments.length?(o=a=+t,d):o},d.tickSizeInner=function(t){return arguments.length?(o=+t,d):o},d.tickSizeOuter=function(t){return arguments.length?(a=+t,d):a},d.tickPadding=function(t){return arguments.length?(s=+t,d):s},d.offset=function(t){return arguments.length?(l=+t,d):l},d}function av(t){return ov(1,t)}function sv(t){return ov(2,t)}function lv(t){return ov(3,t)}function uv(t){return ov(4,t)}var cv=function(t){function e(e,n,r){var i=t.call(this,e,n,r)||this;return i.type="color-legend",i.renderType=I.SVG,i.gradient_id="gradient-id-"+Math.floor(99999999999*Math.random()),i.handleAxisCompleteEvent=function(t){var e=i.getComponentContainer(),n=Hg.getSVGElementSize(e,{useAttrs:!0}).width,r=Za(i.getOptions(),"data","loading");if(n>wt.color.barWidth&&!r){var o=Za(i.getOptions(),"heatmap","colorLegend","title"),a=i.services.cartesianScales.getMainXScale().range();if(a[0]>1&&(e.select("g.legend").attr("transform","translate("+a[0]+", 0)"),o)){var s=Hg.getSVGElementSize(e.select("g.legend-title").select("text"),{useBBox:!0}).width,l=a[0]-s-9;l>1?e.select("g.legend-title").attr("transform","translate("+l+", 0)"):(e.select("g.legend").attr("transform","translate("+a[0]+", 16)"),e.select("g.legend-title").attr("transform","translate("+a[0]+", 0)"))}}else e.select("g.legend-title").attr("transform","translate(0, 0)")},i.chartType=r.chartType,i}return n(e,t),e.prototype.init=function(){"heatmap"===this.chartType&&this.services.events.addEventListener(ht.Axis.RENDER_COMPLETE,this.handleAxisCompleteEvent)},e.prototype.render=function(t){var e=this.getOptions(),n=this.getComponentContainer(),r=Hg.getSVGElementSize(n,{useAttrs:!0}).width,i=Za(e,"color","gradient","colors"),o=Za(e,this.chartType,"colorLegend","type"),a=Za(e,"color","pairing","option"),s=Za(e,"heatmap","colorLegend","title");if(Za(this.getOptions(),"data","loading"))n.html("");else{var l=!go(i),u=Xg(this.model.getDisplayData()),c=!(r<=wt.color.barWidth),h=c?wt.color.barWidth:r,d=Hg.appendOrSelect(n,"g.legend"),f=Hg.appendOrSelect(d,"g.legend-axis");if(s){var p=Hg.appendOrSelect(n,"g.legend-title");Hg.appendOrSelect(p,"text").text(s).attr("dy","0.7em"),d.attr("transform","translate(0, 16)")}var g=u[0]<0&&u[1]>0?"diverge":"mono";(a<1&&a>4&&"mono"===g||a<1&&a>2&&"diverge"===g)&&(a=1);var v=[],m="diverge"===g?17:11;if(l)v=i;else for(var y=1;y<m+1;y++)v.push(o===st.LINEAR?"stop-color-"+g+"-"+a+"-"+y:"fill-"+g+"-"+a+"-"+y);var b=function(t,e){for(var n=new Array(e),r=0;r<e;++r)n[r]=t(r/(e-1));return n}(uu(u[0],u[1]),3),E=Xu().domain(u).range([0,h]),_=lv(E).tickSize(0).tickValues(b);switch(o){case st.LINEAR:this.drawLinear(v,d,h);break;case st.QUANTIZE:var x=this.drawQuantize(v,g,l,d,h);E.range([x,h]);break;default:throw Error("Entered color legend type is not supported.")}f.attr("transform","translate(0,"+wt.color.axisYTranslation+")").call(_),f.select(".domain").remove(),f.select("g.tick:last-of-type text").style("text-anchor",c?"middle":"end"),f.select("g.tick:first-of-type text").style("text-anchor",c&&"choropleth"!==this.chartType?"middle":"start")}},e.prototype.drawLinear=function(t,e,n){var r=100/(t.length-1);Hg.appendOrSelect(e,"linearGradient").attr("id",this.gradient_id+"-legend").selectAll("stop").data(t).enter().append("stop").attr("offset",(function(t,e){return e*r+"%"})).attr("class",(function(e,n){return t[n]})).attr("stop-color",(function(t){return t})),Hg.appendOrSelect(e,"rect").attr("width",n).attr("height",wt.color.barHeight).style("fill","url(#"+this.gradient_id+"-legend)")},e.prototype.drawQuantize=function(t,e,n,r,i){n||"diverge"!==e||t.splice(t.length/2,1);var o=_l().domain(t).range([0,i]);return Hg.appendOrSelect(r,"g.quantized-rect").selectAll("rect").data(o.domain()).join("rect").attr("x",(function(t){return o(t)})).attr("y",0).attr("width",Math.max(0,o.bandwidth()-1)).attr("height",wt.color.barHeight).attr("class",(function(t){return t})).attr("fill",(function(t){return t})),"mono"===(!n&&e)?o.bandwidth()-1:0},e.prototype.destroy=function(){"heatmap"===this.chartType&&this.services.events.removeEventListener(ht.Axis.RENDER_COMPLETE,this.handleAxisCompleteEvent)},e}(Qg),hv={prefix:"bx",selectorTabbable:"\n a[href], area[href], input:not([disabled]):not([tabindex='-1']),\n button:not([disabled]):not([tabindex='-1']),select:not([disabled]):not([tabindex='-1']),\n textarea:not([disabled]):not([tabindex='-1']),\n iframe, object, embed, *[tabindex]:not([tabindex='-1']), *[contenteditable=true]\n ",selectorFocusable:"\n a[href], area[href], input:not([disabled]),\n button:not([disabled]),select:not([disabled]),\n textarea:not([disabled]),\n iframe, object, embed, *[tabindex], *[contenteditable=true]\n "};function dv(t,e){for(var n=0;n<e.length;n++){var r=e[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(t,r.key,r)}}function fv(t,e,n){return e&&dv(t.prototype,e),n&&dv(t,n),Object.defineProperty(t,"prototype",{writable:!1}),t}function pv(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}function gv(t){return function(t){if(Array.isArray(t))return vv(t)}(t)||function(t){if("undefined"!=typeof Symbol&&null!=t[Symbol.iterator]||null!=t["@@iterator"])return Array.from(t)}(t)||function(t,e){if(!t)return;if("string"==typeof t)return vv(t,e);var n=Object.prototype.toString.call(t).slice(8,-1);"Object"===n&&t.constructor&&(n=t.constructor.name);if("Map"===n||"Set"===n)return Array.from(t);if("Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n))return vv(t,e)}(t)||function(){throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function vv(t,e){(null==e||e>t.length)&&(e=t.length);for(var n=0,r=new Array(e);n<e;n++)r[n]=t[n];return r}function mv(t){return t.reduce((function(t,e){return Array.isArray(e)?t.push.apply(t,gv(mv(e))):t.push(e),t}),[])}function yv(t){return(yv="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t})(t)}function bv(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}function Ev(t,e){for(var n=0;n<e.length;n++){var r=e[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(t,r.key,r)}}function _v(t,e){return(_v=Object.setPrototypeOf||function(t,e){return t.__proto__=e,t})(t,e)}function xv(t){var e=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(t){return!1}}();return function(){var n,r=Tv(t);if(e){var i=Tv(this).constructor;n=Reflect.construct(r,arguments,i)}else n=r.apply(this,arguments);return wv(this,n)}}function wv(t,e){if(e&&("object"===yv(e)||"function"==typeof e))return e;if(void 0!==e)throw new TypeError("Derived constructors may only return object or undefined");return Ov(t)}function Ov(t){if(void 0===t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return t}function Tv(t){return(Tv=Object.setPrototypeOf?Object.getPrototypeOf:function(t){return t.__proto__||Object.getPrototypeOf(t)})(t)}function Sv(t){return(Sv="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t})(t)}function Mv(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}function Cv(t,e){for(var n=0;n<e.length;n++){var r=e[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(t,r.key,r)}}function Av(){return(Av="undefined"!=typeof Reflect&&Reflect.get?Reflect.get:function(t,e,n){var r=Lv(t,e);if(r){var i=Object.getOwnPropertyDescriptor(r,e);return i.get?i.get.call(arguments.length<3?t:n):i.value}}).apply(this,arguments)}function Lv(t,e){for(;!Object.prototype.hasOwnProperty.call(t,e)&&null!==(t=Iv(t)););return t}function Dv(t,e){return(Dv=Object.setPrototypeOf||function(t,e){return t.__proto__=e,t})(t,e)}function kv(t){var e=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(t){return!1}}();return function(){var n,r=Iv(t);if(e){var i=Iv(this).constructor;n=Reflect.construct(r,arguments,i)}else n=r.apply(this,arguments);return Rv(this,n)}}function Rv(t,e){if(e&&("object"===Sv(e)||"function"==typeof e))return e;if(void 0!==e)throw new TypeError("Derived constructors may only return object or undefined");return function(t){if(void 0===t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return t}(t)}function Iv(t){return(Iv=Object.setPrototypeOf?Object.getPrototypeOf:function(t){return t.__proto__||Object.getPrototypeOf(t)})(t)}function Pv(t){for(var e=arguments.length,n=new Array(e>1?e-1:0),r=1;r<e;r++)n[r-1]=arguments[r];return t.addEventListener.apply(t,n),{release:function(){return t.removeEventListener.apply(t,n),null}}}function Nv(t){return(Nv="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t})(t)}function Uv(t){return function(t){if(Array.isArray(t))return Bv(t)}(t)||function(t){if("undefined"!=typeof Symbol&&null!=t[Symbol.iterator]||null!=t["@@iterator"])return Array.from(t)}(t)||function(t,e){if(!t)return;if("string"==typeof t)return Bv(t,e);var n=Object.prototype.toString.call(t).slice(8,-1);"Object"===n&&t.constructor&&(n=t.constructor.name);if("Map"===n||"Set"===n)return Array.from(t);if("Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n))return Bv(t,e)}(t)||function(){throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function Bv(t,e){(null==e||e>t.length)&&(e=t.length);for(var n=0,r=new Array(e);n<e;n++)r[n]=t[n];return r}function Vv(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}function Hv(t,e){for(var n=0;n<e.length;n++){var r=e[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(t,r.key,r)}}function Gv(t,e){return(Gv=Object.setPrototypeOf||function(t,e){return t.__proto__=e,t})(t,e)}function zv(t){var e=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(t){return!1}}();return function(){var n,r=Fv(t);if(e){var i=Fv(this).constructor;n=Reflect.construct(r,arguments,i)}else n=r.apply(this,arguments);return jv(this,n)}}function jv(t,e){if(e&&("object"===Nv(e)||"function"==typeof e))return e;if(void 0!==e)throw new TypeError("Derived constructors may only return object or undefined");return function(t){if(void 0===t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return t}(t)}function Fv(t){return(Fv=Object.setPrototypeOf?Object.getPrototypeOf:function(t){return t.__proto__||Object.getPrototypeOf(t)})(t)}function Wv(t,e){var n=t.target,r=t.currentTarget;if("function"==typeof n.matches){if(n.matches(e))return n;if(n.matches("".concat(e," *"))){var i=n.closest(e);if((r.nodeType===Node.DOCUMENT_NODE?r.documentElement:r).contains(i))return i}}}function qv(t){if(!t||"function"==typeof t)return{launchingElement:null,launchingEvent:null};var e=t.delegateTarget||t.currentTarget||t,n=t.currentTarget&&t;if(e&&!e.nodeType)throw new TypeError("DOM Node should be given for launching element.");if(n&&!n.type)throw new TypeError("DOM event should be given for launching event.");return{launchingElement:e,launchingEvent:n}}function Yv(t){return(Yv="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t})(t)}function Zv(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}function Xv(t,e){for(var n=0;n<e.length;n++){var r=e[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(t,r.key,r)}}function $v(t,e){return($v=Object.setPrototypeOf||function(t,e){return t.__proto__=e,t})(t,e)}function Kv(t){var e=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(t){return!1}}();return function(){var n,r=Jv(t);if(e){var i=Jv(this).constructor;n=Reflect.construct(r,arguments,i)}else n=r.apply(this,arguments);return Qv(this,n)}}function Qv(t,e){if(e&&("object"===Yv(e)||"function"==typeof e))return e;if(void 0!==e)throw new TypeError("Derived constructors may only return object or undefined");return function(t){if(void 0===t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return t}(t)}function Jv(t){return(Jv=Object.setPrototypeOf?Object.getPrototypeOf:function(t){return t.__proto__||Object.getPrototypeOf(t)})(t)}function tm(t){return(tm="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t})(t)}function em(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}function nm(t,e){for(var n=0;n<e.length;n++){var r=e[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(t,r.key,r)}}function rm(t,e){return(rm=Object.setPrototypeOf||function(t,e){return t.__proto__=e,t})(t,e)}function im(t){var e=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(t){return!1}}();return function(){var n,r=am(t);if(e){var i=am(this).constructor;n=Reflect.construct(r,arguments,i)}else n=r.apply(this,arguments);return om(this,n)}}function om(t,e){if(e&&("object"===tm(e)||"function"==typeof e))return e;if(void 0!==e)throw new TypeError("Derived constructors may only return object or undefined");return function(t){if(void 0===t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return t}(t)}function am(t){return(am=Object.setPrototypeOf?Object.getPrototypeOf:function(t){return t.__proto__||Object.getPrototypeOf(t)})(t)}function sm(t){return(sm="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t})(t)}function lm(t,e){for(var n=0;n<e.length;n++){var r=e[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(t,r.key,r)}}function um(t,e){return(um=Object.setPrototypeOf||function(t,e){return t.__proto__=e,t})(t,e)}function cm(t){var e=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(t){return!1}}();return function(){var n,r=dm(t);if(e){var i=dm(this).constructor;n=Reflect.construct(r,arguments,i)}else n=r.apply(this,arguments);return hm(this,n)}}function hm(t,e){if(e&&("object"===sm(e)||"function"==typeof e))return e;if(void 0!==e)throw new TypeError("Derived constructors may only return object or undefined");return function(t){if(void 0===t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return t}(t)}function dm(t){return(dm=Object.setPrototypeOf?Object.getPrototypeOf:function(t){return t.__proto__||Object.getPrototypeOf(t)})(t)}var fm,pm,gm=function(t){!function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function");t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,writable:!0,configurable:!0}}),Object.defineProperty(t,"prototype",{writable:!1}),e&&um(t,e)}(o,t);var e,n,r,i=cm(o);function o(t,e){var n;return function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,o),(n=i.call(this,t,e))._handleFocusinListener=void 0,n._handleKeydownListener=void 0,n._handleFocusin=function(t){var e=n.element.querySelector(n.options.selectorModalContainer)||n.element;n.element.classList.contains(n.options.classVisible)&&!e.contains(t.target)&&n.options.selectorsFloatingMenus.every((function(e){return!Wv(t,e)}))&&n.element.querySelector(hv.selectorTabbable).focus()},n._hookCloseActions(),n}return e=o,r=[{key:"options",get:function(){var t=hv.prefix;return{selectorInit:"[data-modal]",selectorModalClose:"[data-modal-close]",selectorPrimaryFocus:"[data-modal-primary-focus]",selectorsFloatingMenus:[".".concat(t,"--overflow-menu-options"),".".concat(t,"--tooltip"),".flatpickr-calendar"],selectorModalContainer:".".concat(t,"--modal-container"),classVisible:"is-visible",classBody:"".concat(t,"--body--with-modal-open"),attribInitTarget:"data-modal-target",initEventNames:["click"],eventBeforeShown:"modal-beingshown",eventAfterShown:"modal-shown",eventBeforeHidden:"modal-beinghidden",eventAfterHidden:"modal-hidden"}}}],(n=[{key:"createdByLauncher",value:function(t){this.show(t)}},{key:"shouldStateBeChanged",value:function(t){return"shown"===t?!this.element.classList.contains(this.options.classVisible):this.element.classList.contains(this.options.classVisible)}},{key:"_changeState",value:function(t,e,n){var r,i=this;if(this._handleFocusinListener&&(this._handleFocusinListener=this.unmanage(this._handleFocusinListener).release()),"shown"===t){var o="onfocusin"in this.element.ownerDocument.defaultView,a=o?"focusin":"focus";this._handleFocusinListener=this.manage(Pv(this.element.ownerDocument,a,this._handleFocusin,!o))}"hidden"===t?(this.element.classList.toggle(this.options.classVisible,!1),this.element.ownerDocument.body.classList.toggle(this.options.classBody,!1),(this.options.selectorFocusOnClose||this.previouslyFocusedNode)&&(this.element.ownerDocument.querySelector(this.options.selectorFocusOnClose)||this.previouslyFocusedNode).focus()):"shown"===t&&(this.element.classList.toggle(this.options.classVisible,!0),this.element.ownerDocument.body.classList.toggle(this.options.classBody,!0)),r=this.manage(Pv(this.element,"transitionend",(function(){r&&(r=i.unmanage(r).release()),"shown"===t&&i.element.offsetWidth>0&&i.element.offsetHeight>0&&(i.previouslyFocusedNode=i.element.ownerDocument.activeElement,(i.element.querySelector(i.options.selectorPrimaryFocus)||i.element.querySelector(hv.selectorTabbable)).focus()),n()})))}},{key:"_hookCloseActions",value:function(){var t=this;this.manage(Pv(this.element,"click",(function(e){var n=Wv(e,t.options.selectorModalClose);n&&(e.delegateTarget=n),(n||e.target===t.element)&&t.hide(e)}))),this._handleKeydownListener&&(this._handleKeydownListener=this.unmanage(this._handleKeydownListener).release()),this._handleKeydownListener=this.manage(Pv(this.element.ownerDocument.body,"keydown",(function(e){27===e.which&&t.shouldStateBeChanged("hidden")&&(e.stopPropagation(),t.hide(e))})))}}])&&lm(e.prototype,n),r&&lm(e,r),Object.defineProperty(e,"prototype",{writable:!1}),o.components=new WeakMap,o}(function(){for(var t=arguments.length,e=new Array(t),n=0;n<t;n++)e[n]=arguments[n];return mv(e).reduce((function(t,e){return e(t)}),function(){return fv((function t(){pv(this,t)}))}())}((function(t){return function(t){!function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function");t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,writable:!0,configurable:!0}}),Object.defineProperty(t,"prototype",{writable:!1}),e&&_v(t,e)}(o,t);var e,n,r,i=xv(o);function o(t){var e,n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};if(bv(this,o),(e=i.call(this,t,n)).children=[],!t||t.nodeType!==Node.ELEMENT_NODE)throw new TypeError("DOM element should be given to initialize this widget.");return e.element=t,e.options=Object.assign(Object.create(e.constructor.options),n),e.constructor.components.set(e.element,Ov(e)),e}return e=o,r=[{key:"create",value:function(t,e){return this.components.get(t)||new this(t,e)}}],(n=[{key:"release",value:function(){for(var t=this.children.pop();t;t=this.children.pop())t.release();return this.constructor.components.delete(this.element),null}}])&&Ev(e.prototype,n),r&&Ev(e,r),Object.defineProperty(e,"prototype",{writable:!1}),o}(t)}),(function(t){return function(t){!function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function");t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,writable:!0,configurable:!0}}),Object.defineProperty(t,"prototype",{writable:!1}),e&&rm(t,e)}(o,t);var e,n,r,i=im(o);function o(){return em(this,o),i.apply(this,arguments)}return e=o,r=[{key:"init",value:function(){var t=this,e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:document,n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},r=Object.assign(Object.create(this.options),n);if(!e||e.nodeType!==Node.ELEMENT_NODE&&e.nodeType!==Node.DOCUMENT_NODE)throw new TypeError("DOM document or DOM element should be given to search for and initialize this widget.");if(e.nodeType!==Node.ELEMENT_NODE||!e.matches(r.selectorInit)){var i=r.initEventNames.map((function(i){return Pv(e,i,(function(e){var i=Wv(e,"[".concat(r.attribInitTarget,"]"));if(i){e.delegateTarget=i;var o=i.ownerDocument.querySelectorAll(i.getAttribute(r.attribInitTarget));if(o.length>1)throw new Error("Target widget must be unique.");if(1===o.length){"A"===i.tagName&&e.preventDefault();var a=t.create(o[0],n);"function"==typeof a.createdByLauncher&&a.createdByLauncher(e)}}}))}));return{release:function(){for(var t=i.pop();t;t=i.pop())t.release()}}}return this.create(e,n),""}}],(n=null)&&nm(e.prototype,n),r&&nm(e,r),Object.defineProperty(e,"prototype",{writable:!1}),o.forLazyInit=!0,o}(t)}),[function(t){return function(t){!function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function");t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,writable:!0,configurable:!0}}),Object.defineProperty(t,"prototype",{writable:!1}),e&&Gv(t,e)}(o,t);var e,n,r,i=zv(o);function o(){return Vv(this,o),i.apply(this,arguments)}return e=o,(n=[{key:"_changeState",value:function(){throw new Error("_changeState() should be overridden to perform actual change in state.")}},{key:"changeState",value:function(){for(var t=this,e=arguments.length,n=new Array(e),r=0;r<e;r++)n[r]=arguments[r];var i="string"==typeof n[0]?n.shift():void 0,o=Object(n[0])===n[0]&&"function"!=typeof n[0]?n.shift():void 0,a="function"==typeof n[0]?n.shift():void 0;if("function"!=typeof this.shouldStateBeChanged||this.shouldStateBeChanged(i,o)){var s={group:o&&o.group,state:i},l=[s.group,i].filter(Boolean).join("-").split("-").map((function(t){return t[0].toUpperCase()+t.substr(1)})).join(""),u=new CustomEvent(this.options["eventBefore".concat(l)],{bubbles:!0,cancelable:!0,detail:o}),c=o&&o.delegatorNode||this.element,h=!c.dispatchEvent(u);if(h){if(a){var d=new Error("Changing state (".concat(JSON.stringify(s),") has been canceled."));d.canceled=!0,a(d)}}else{var f=[i,o].filter(Boolean);this._changeState.apply(this,Uv(f).concat([function(){c.dispatchEvent(new CustomEvent(t.options["eventAfter".concat(l)],{bubbles:!0,cancelable:!0,detail:o})),a&&a()}]))}}else a&&a(null,!0)}}])&&Hv(e.prototype,n),r&&Hv(e,r),Object.defineProperty(e,"prototype",{writable:!1}),o}(t)},function(t){return function(t){!function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function");t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,writable:!0,configurable:!0}}),Object.defineProperty(t,"prototype",{writable:!1}),e&&$v(t,e)}(o,t);var e,n,r,i=Kv(o);function o(){return Zv(this,o),i.apply(this,arguments)}return e=o,(n=[{key:"show",value:function(t,e){t&&"function"!=typeof t||(e=t),this.changeState("shown",qv(t),e)}},{key:"hide",value:function(t,e){t&&"function"!=typeof t||(e=t),this.changeState("hidden",qv(t),e)}}])&&Xv(e.prototype,n),r&&Xv(e,r),Object.defineProperty(e,"prototype",{writable:!1}),o}(t)}],(function(t){return function(t){!function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function");t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,writable:!0,configurable:!0}}),Object.defineProperty(t,"prototype",{writable:!1}),e&&Dv(t,e)}(o,t);var e,n,r,i=kv(o);function o(){var t;Mv(this,o);for(var e=arguments.length,n=new Array(e),r=0;r<e;r++)n[r]=arguments[r];return(t=i.call.apply(i,[this].concat(n))).handles=new Set,t}return e=o,(n=[{key:"manage",value:function(t){return this.handles.add(t),t}},{key:"unmanage",value:function(t){return this.handles.delete(t),t}},{key:"release",value:function(){var t=this;return this.handles.forEach((function(e){e.release(),t.handles.delete(e)})),Av(Iv(o.prototype),"release",this).call(this)}}])&&Cv(e.prototype,n),r&&Cv(e,r),Object.defineProperty(e,"prototype",{writable:!1}),o}(t)}))),vm=function(t){function e(e,n,r){var i=t.call(this,e,n,r)||this;return i.type="modal",i.isEventListenerAdded=!1,i.handleShowModal=function(){i.modal.html(i.getModalHTML()),i.modal.select("div.cds--modal-footer button.cds--btn").on("click",(function(){return i.model.exportToCSV()})),gm.create(i.modal.node()).show()},i.init(),i}return n(e,t),e.prototype.addEventListeners=function(){this.services.events.addEventListener(ht.Modal.SHOW,this.handleShowModal)},e.prototype.removeEventListeners=function(){this.services.events.removeEventListener(ht.Modal.SHOW,this.handleShowModal)},e.prototype.getModalHTML=function(){var t=this.model.getOptions(),e=Za(t,"style","prefix"),n=this.model.getTabularDataArray();return'\n\t\t<div class="cds--modal-container cds--modal-container">\n\t\t\t<div class="cds--modal-header cds--modal-header">\n\t\t\t\t<p class="cds--modal-header__label cds--type-delta cds--modal-header__label cds--type-delta" id="modal-title">Tabular representation</p>\n\n\t\t\t\t<p class="cds--modal-header__heading cds--type-beta cds--modal-header__heading cds--type-beta" id="modal-description">'+t.title+'</p>\n\n\t\t\t\t<button class="cds--modal-close cds--modal-close" type="button" data-modal-close aria-label="close modal" data-modal-primary-focus>\n\t\t\t\t\t<svg focusable="false" preserveAspectRatio="xMidYMid meet" xmlns="http://www.w3.org/2000/svg" fill="currentColor" aria-label="Close" width="20" height="20" viewBox="0 0 32 32" role="img" class="cds--modal-close__icon cds--modal-close__icon">\n\t\t\t\t\t\t<path d="M24 9.4L22.6 8 16 14.6 9.4 8 8 9.4 14.6 16 8 22.6 9.4 24 16 17.4 22.6 24 24 22.6 17.4 16 24 9.4z"></path>\n\t\t\t\t\t</svg>\n\t\t\t\t</button>\n\t\t\t</div>\n\n\t\t\t<div class="cds--modal-content cds--modal-content">\n\t\t\t\t<table class="cds--data-table cds--data-table--no-border cds--data-table cds--data-table--no-border">\n\t\t\t\t\t<thead>\n\t\t\t\t\t\t<tr>\n\t\t\t\t\t\t\t'+jn(n,0).map((function(t){return'<th scope="col">\n\t\t\t\t\t\t\t\t<div class="cds--table-header-label cds--table-header-label">'+t+"</div>\n\t\t\t\t\t\t\t</th>"})).join("")+"\n\t\t\t\t\t\t</tr>\n\t\t\t\t\t</thead>\n\n\t\t\t\t\t<tbody>"+n.slice(1).map((function(t){return"\n\t\t\t\t\t\t\t<tr>\n\t\t\t\t\t\t\t\t"+t.map((function(t){return"<td>"+t+"</td>"})).join("")+"\n\t\t\t\t\t\t\t</tr>"})).join("")+'\n\t\t\t\t\t</tbody>\n\t\t\t\t</table>\n\t\t\t</div>\n\n\t\t\t<div class="cds--modal-footer cds--modal-footer">\n\t\t\t <div class="cds--'+e+'-modal-footer-spacer"></div>\n\t\t\t <button class="cds--btn cds--btn--primary cds--btn cds--btn--primary" type="button" data-modal-primary-focus>Download as CSV</button>\n\t\t\t</div>\n\t\t</div>'},e.prototype.render=function(){var t=this.model.getOptions();if(!this.isEventListenerAdded){var e=Ba(this.services.domUtils.getHolder()),n=Za(t,"style","prefix");this.modal=Hg.appendOrSelect(e,"div.cds--"+n+"--modal"),this.addEventListeners(),this.isEventListenerAdded=!0,this.modal.attr("data-modal",!0).attr("class","cds--modal cds--modal").attr("role","dialog").attr("aria-modal",!0).attr("aria-labelledby","modal-title").attr("aria-describedby","modal-description").attr("tabindex",-1)}},e.prototype.destroy=function(){this.removeEventListeners(),this.isEventListenerAdded=!1},e}(Kg);!function(t){t.LEFT="left",t.RIGHT="right",t.TOP="top",t.BOTTOM="bottom"}(pm||(pm={}));var mm=((fm={})[pm.LEFT]=function(t,e,n){return{top:t.top-Math.round(e.offsetHeight/2)+Math.round(n.height/2),left:Math.round(t.left-e.offsetWidth)}},fm[pm.RIGHT]=function(t,e,n){return{top:t.top-Math.round(e.offsetHeight/2)+Math.round(n.height/2),left:Math.round(t.left+n.width)}},fm[pm.TOP]=function(t,e,n){return{top:Math.round(t.top-e.offsetHeight),left:t.left-Math.round(e.offsetWidth/2)+Math.round(n.width/2)}},fm[pm.BOTTOM]=function(t,e,n){return{top:Math.round(t.top+n.height),left:t.left-Math.round(e.offsetWidth/2)+Math.round(n.width/2)}},fm),ym="undefined"!=typeof window?window:{innerHeight:0,scrollY:0,innerWidth:0,scrollX:0},bm=function(){function t(t){void 0===t&&(t={}),this.positions=mm,this.positions=Object.assign({},mm,t)}return t.prototype.getRelativeOffset=function(t){for(var e={left:t.offsetLeft,top:t.offsetTop};t.offsetParent&&"static"===getComputedStyle(t.offsetParent).position;)e.left+=t.offsetLeft,e.top+=t.offsetTop,t=t.offsetParent;return e},t.prototype.getAbsoluteOffset=function(t){for(var e=t,n={top:0,left:0};e.offsetParent;){var r=getComputedStyle(e.offsetParent);"static"===r.position&&r.marginLeft&&r.marginTop&&(parseInt(r.marginTop,10)&&(n.top+=parseInt(r.marginTop,10)),parseInt(r.marginLeft,10)&&(n.left+=parseInt(r.marginLeft,10))),e=e.offsetParent}var i=t.getBoundingClientRect(),o=document.body.getBoundingClientRect();return{top:i.top-o.top+n.top,left:i.left-o.left+n.left}},t.prototype.findRelative=function(t,e,n){var r=this.getRelativeOffset(t),i=t.getBoundingClientRect();return this.calculatePosition(r,i,e,n)},t.prototype.findAbsolute=function(t,e,n){var r=this.getAbsoluteOffset(t),i=t.getBoundingClientRect();return this.calculatePosition(r,i,e,n)},t.prototype.findPosition=function(t,e,n,r){void 0===r&&(r=this.getAbsoluteOffset.bind(this));var i=r(t),o=t.getBoundingClientRect();return this.calculatePosition(i,o,e,n)},t.prototype.findPositionAt=function(t,e,n){return this.calculatePosition(t,{top:0,left:0,height:0,width:0},e,n)},t.prototype.getPlacementBox=function(t,e){var n=t.offsetHeight+e.top,r=t.offsetWidth+e.left;return{top:e.top,bottom:n,left:e.left,right:r}},t.prototype.addOffset=function(t,e,n){return void 0===e&&(e=0),void 0===n&&(n=0),Object.assign({},t,{top:t.top+e,left:t.left+n})},t.prototype.setElement=function(t,e){t.style.top=e.top+"px",t.style.left=e.left+"px"},t.prototype.findBestPlacement=function(t,e,n,r,i){var o=this;void 0===r&&(r=this.defaultContainerFunction.bind(this)),void 0===i&&(i=this.findPosition.bind(this));var a=n.map((function(n){var a=i(t,e,n),s=o.getPlacementBox(e,a),l=0,u=0,c=r();s.top<c.top?l=c.top-s.top:s.bottom>c.height&&(l=s.bottom-c.height),s.left<c.left?u=c.left-s.left:s.right>c.width&&(u=s.right-c.width),l&&!u?u=1:u&&!l&&(l=1);var h=e.offsetHeight*e.offsetWidth;return{placement:n,weight:(h-l*u)/h}}));return a.sort((function(t,e){return e.weight-t.weight})),a[0].placement},t.prototype.findBestPlacementAt=function(t,e,n,r){var i=this;void 0===r&&(r=this.defaultContainerFunction.bind(this));return this.findBestPlacement(null,e,n,r,(function(e,n,r){return i.findPositionAt(t,n,r)}))},t.prototype.defaultContainerFunction=function(){return{top:0,left:0,height:ym.innerHeight,width:ym.innerWidth}},t.prototype.calculatePosition=function(t,e,n,r){return this.positions[r]?this.positions[r](t,n,e):(console.error("No function found for placement, defaulting to 0,0"),{left:0,top:0})},t}(),Em=(new bm,function(t){function e(e,n){var r=t.call(this,e,n)||this;return r.type="threshold",r.renderType=I.SVG,r.positionService=new bm,r}return n(e,t),e.prototype.render=function(t){var e=this;void 0===t&&(t=!1);var n=Za(this.getOptions(),"axes"),r=[];Object.keys(n).forEach((function(t){var e,i;if(Object.values(U).includes(t)){var o=n[t];o.thresholds&&o.thresholds.length>0&&r.push({axisPosition:t,thresholds:o.thresholds,correspondingDatasets:null===(e=o)||void 0===e?void 0:e.correspondingDatasets,mapsTo:null===(i=o)||void 0===i?void 0:i.mapsTo})}}));var i=this.getComponentContainer({withinChartClip:!0}).selectAll("g.axis-thresholds").data(r,(function(t){return t.axisPosition}));i.exit().attr("opacity",0).remove();var o=i.enter().append("g").merge(i);o.attr("class",(function(t){return"axis-thresholds "+t.axisPosition}));var a=o.selectAll("g.threshold-group").data((function(t){return t.thresholds.map((function(n){return n.axisPosition=t.axisPosition,n.datum=e.constructDatumObj(t,n),n}))}));a.exit().attr("opacity",0).remove();var s=a.enter().append("g");s.append("line").attr("class","threshold-line"),s.append("rect").attr("class","threshold-hoverable-area"),s.merge(a).attr("class","threshold-group");var l=this;o.each((function(e){var n=e.axisPosition,r=l.services.cartesianScales.getScaleByPosition(n),i=l.services.cartesianScales.getScaleTypeByPosition(n),o=null,a=null;n===U.LEFT||n===U.RIGHT?(a=r,o=l.services.cartesianScales.getMainXScale()):(o=r,a=l.services.cartesianScales.getMainYScale());var s=i===G.LABELS,u=o.range(),c=u[0],h=u[1],d=a.range(),f=d[0],p=d[1],g=l.services.cartesianScales,v=Ka((function(t){return g.getDomainValue(t)}),(function(t){return g.getRangeValue(t)}),g.getOrientation()),m=v[0],y=v[1],b=Ba(this);n===U.TOP||n===U.BOTTOM?(b.selectAll("line.threshold-line").transition().call((function(e){return l.services.transitions.setupTransition({transition:e,name:"threshold-line-update",animate:t})})).attr("y1",p).attr("y2",f).attr("x1",(function(t){var e=t.datum;return m(e)+(s?r.step()/2:0)})).attr("x2",(function(t){var e=t.datum;return m(e)+(s?r.step()/2:0)})).style("stroke",(function(t){return t.fillColor})),b.selectAll("rect.threshold-hoverable-area").attr("x",0).attr("y",(function(t){var e=t.datum;return-m(e)})).attr("width",Math.abs(f-p)).classed("rotate",!0)):(b.selectAll("line.threshold-line").transition().call((function(e){return l.services.transitions.setupTransition({transition:e,name:"threshold-line-update",animate:t})})).attr("x1",c).attr("x2",h).attr("y1",(function(t){var e=t.datum;return y(e)+(s?r.step()/2:0)})).attr("y2",(function(t){var e=t.datum;return y(e)+(s?r.step()/2:0)})).style("stroke",(function(t){return t.fillColor})),b.selectAll("rect.threshold-hoverable-area").attr("x",c).attr("y",(function(t){var e=t.datum;return y(e)})).attr("width",Math.abs(h-c)).classed("rotate",!1))})),this.services.events.addEventListener(ht.Threshold.SHOW,(function(t){e.setThresholdLabelPosition(t.detail),e.label.classed("hidden",!1)})),this.services.events.addEventListener(ht.Threshold.HIDE,(function(t){e.label.classed("hidden",!0)})),this.appendThresholdLabel(),this.addEventListeners()},e.prototype.getFormattedValue=function(t){var e=t.value,n=t.axisPosition,r=this.getOptions();if(this.services.cartesianScales.getScaleTypeByPosition(n)===G.TIME){var i=[U.LEFT,U.RIGHT].includes(n),o=this.services.cartesianScales.getMainXScale(),a=this.services.cartesianScales.getMainYScale(),s=i?a:o,l=Za(r,"timeScale"),u=cg(s.ticks());return lg(e,0,s.ticks(),u,l)}return e.toLocaleString("en")},e.prototype.appendThresholdLabel=function(){var t=Ba(this.services.domUtils.getHolder()),e=Za(this.getOptions(),"style","prefix");this.label=Hg.appendOrSelect(t,"div.cds--"+e+"--threshold--label").classed("hidden",!0)},e.prototype.setThresholdLabelPosition=function(t){var e=t.event,n=t.datum,r=this.services.domUtils.getHolder(),i=Va(e,r),o=n.valueFormatter?n.valueFormatter(n.value):this.getFormattedValue(n);this.label.html((n.label||"Threshold")+": "+o).style("background-color",n.fillColor);var a=this.label.node(),s=this.positionService.findBestPlacementAt({left:i[0],top:i[1]},a,[pm.RIGHT,pm.LEFT,pm.TOP,pm.BOTTOM],(function(){return{top:void 0,left:void 0,width:r.offsetWidth,height:r.offsetHeight}})),l=this.positionService.findPositionAt({left:i[0],top:i[1]},a,s);this.positionService.setElement(a,l)},e.prototype.constructDatumObj=function(t,e){var n={};return t.correspondingDatasets&&(n.group=Za(t,"correspondingDatasets",0)),n[t.mapsTo]=e.value,n},e.prototype.addEventListeners=function(){var t=this;this.getComponentContainer({withinChartClip:!0}).selectAll("rect.threshold-hoverable-area").on("mouseover mousemove",(function(e){Ba(this.parentNode).select("line.threshold-line").classed("active",!0),t.services.events.dispatchEvent(ht.Threshold.SHOW,{event:e,hoveredElement:Ba(this),datum:Ba(this).datum()})})).on("mouseout",(function(e){Ba(this.parentNode).select("line.threshold-line").classed("active",!1),t.services.events.dispatchEvent(ht.Threshold.HIDE,{event:e,hoveredElement:Ba(this),datum:Ba(this).datum()})}))},e}(Kg)),_m=function(t){function e(){var e=null!==t&&t.apply(this,arguments)||this;return e.type="title",e.renderType=I.HTML,e}return n(e,t),e.prototype.render=function(){var t=this.getComponentContainer(),e=Za(this.getOptions(),"title"),n=t.selectAll("p.title").data([e]);if(n.enter().append("p").classed("title",!0).attr("role","heading").attr("aria-level",2).merge(n).html((function(t){return t})),n.node()&&n.node().offsetWidth<n.node().scrollWidth){var r=this;n.on("mouseover",(function(t){r.services.events.dispatchEvent(ht.Tooltip.SHOW,{event:t,hoveredElement:n,content:n.text()})})).on("mousemove",(function(t){r.services.events.dispatchEvent(ht.Tooltip.MOVE,{event:t})})).on("mouseout",(function(){r.services.events.dispatchEvent(ht.Tooltip.HIDE)}))}n.exit().remove()},e.prototype.truncateTitle=function(t,e){if(!(e<=0)){var n=t.text();if(t.node().getComputedTextLength()>e){t.append("tspan").text("...");var r=Hg.appendOrSelect(t,"tspan").node().getComputedTextLength(),i=t.text(),o=this.getSubstringIndex(t.node(),0,i.length-1,e-r);t.html(i.substring(0,o-1)).append("tspan").text("...");var a=this;t.on("mouseover",(function(e){a.services.events.dispatchEvent(ht.Tooltip.SHOW,{event:e,hoveredElement:t,content:n})})).on("mousemove",(function(t){a.services.events.dispatchEvent(ht.Tooltip.MOVE,{event:t})})).on("mouseout",(function(){a.services.events.dispatchEvent(ht.Tooltip.HIDE)}))}}},e.prototype.getMaxTitleWidth=function(){return Hg.getSVGElementSize(this.parent.node(),{useAttrs:!0}).width},e.prototype.getSubstringIndex=function(t,e,n,r){var i=Math.floor((n+e)/2);return t.getSubStringLength(0,i)>r?this.getSubstringIndex(t,e,i,r):t.getSubStringLength(0,i)<r?t.getSubStringLength(0,i+1)>r?i:this.getSubstringIndex(t,i,n,r):i},e}(Kg),xm=function(t){function e(){var e=null!==t&&t.apply(this,arguments)||this;return e.type="meter-title",e.renderType=I.SVG,e}return n(e,t),e.prototype.render=function(){var t=Za(this.model.getDisplayData(),0),e=this.getOptions(),n=this.getComponentContainer(),r=e.data.groupMapsTo;if(Za(e,"meter","proportional"))this.displayTotal(),this.displayBreakdownTitle();else{var i=n.selectAll("text.meter-title").data([t[r]]);i.enter().append("text").classed("meter-title",!0).merge(i).attr("x",0).attr("y","1em").text((function(t){return t})),i.exit().remove(),this.appendPercentage()}this.displayStatus();var o=this.getMaxTitleWidth(),a=Hg.appendOrSelect(n,"text.meter-title");o>0&&a.node().getComputedTextLength()>o&&this.truncateTitle(a,o)},e.prototype.displayBreakdownTitle=function(){var t,e=this.getComponentContainer(),n=this.getOptions(),r=this.model.getMaximumDomain(this.model.getDisplayData()),i=Za(n,"meter","proportional","total"),o=Za(n,"meter","proportional","unit")?Za(n,"meter","proportional","unit"):"";if(r===i)t=null;else{var a=null!==i?i-r:r,s=Za(n,"meter","proportional","breakdownFormatter");t=null!==s?s({datasetsTotal:r,total:i}):r+" "+o+" used ("+a+" "+o+" available)"}var l=e.selectAll("text.proportional-meter-title").data([t]);l.enter().append("text").classed("proportional-meter-title",!0).merge(l).attr("x",0).attr("y","1em").text((function(t){return t})),l.exit().remove();var u=this.getMaxTitleWidth(),c=Hg.appendOrSelect(e,"text.proportional-meter-title");u>0&&c.node().getComputedTextLength()>u&&this.truncateTitle(c,u)},e.prototype.displayTotal=function(){var t=this.getComponentContainer(),e=this.getOptions(),n=Za(e,"meter","proportional","total"),r=n?Za(e,"meter","proportional","total"):this.model.getMaximumDomain(this.model.getDisplayData()),i=Za(e,"meter","proportional","unit")?Za(e,"meter","proportional","unit"):"",o=Za(e,"meter","proportional","totalFormatter"),a=null!==o?o(r):n+" "+i+" total",s=Hg.getHTMLElementSize(this.services.domUtils.getMainContainer()),l=s.width?s.width:this.parent.node().getAttribute("width"),u=t.selectAll("text.proportional-meter-total").data([a]);u.enter().append("text").classed("proportional-meter-total",!0).merge(u).attr("x",this.model.getStatus()&&"string"!=typeof l?l-Tt.total.paddingRight:l).attr("y","1em").attr("text-anchor","end").text((function(t){return t})),u.exit().remove()},e.prototype.displayStatus=function(){var t=this.getComponentContainer(),e=Hg.getHTMLElementSize(this.services.domUtils.getMainContainer()),n=e.width?e.width:0,r=this.model.getStatus(),i=Tt.status.indicatorSize/2,o=Hg.appendOrSelect(t,"g.status-indicator").attr("class",null!==r?"status-indicator status--"+r:"").attr("transform","translate("+(n-i)+", 0)"),a=r?[r]:[],s=o.selectAll("circle.status").data(a);s.enter().append("circle").merge(s).attr("class","status").attr("r",i).attr("cx",0).attr("cy","calc(1em / 2)");var l=o.selectAll("path.innerFill").data(a);l.enter().append("path").merge(l).attr("d",this.getStatusIconPathString(r)).attr("transform","translate(-"+i+", 0)").attr("class","innerFill"),l.exit().remove(),s.exit().remove()},e.prototype.appendPercentage=function(){var t=Za(this.model.getDisplayData(),0,"value"),e=this.getComponentContainer(),n=Hg.appendOrSelect(e,"text.meter-title"),r=!0===Za(this.getOptions(),"meter","statusBar","percentageIndicator","enabled")?[t]:[],i=e.selectAll("text.percent-value").data(r),o=Tt.statusBar.paddingRight;i.enter().append("text").classed("percent-value",!0).merge(i).text((function(t){return t+"%"})).attr("x",+n.attr("x")+n.node().getComputedTextLength()+o).attr("y",n.attr("y")),i.exit().remove()},e.prototype.truncateTitle=function(e,n){t.prototype.truncateTitle.call(this,e,n);var r=Hg.appendOrSelect(this.parent,"tspan"),i=Tt.statusBar.paddingRight,o=Math.ceil(r.node().getComputedTextLength());Hg.appendOrSelect(this.parent,"text.percent-value").attr("x",+e.attr("x")+e.node().getComputedTextLength()+o+i)},e.prototype.getMaxTitleWidth=function(){var t=Hg.getHTMLElementSize(this.services.domUtils.getMainContainer()),e=Za(this.getOptions(),"meter","proportional"),n=t.width?t.width:this.parent.node().getAttribute("width");if(null!==e){var r=Hg.appendOrSelect(this.parent,"text.proportional-meter-total").node();return n-Hg.getSVGElementSize(r,{useBBox:!0}).width-Tt.total.paddingLeft}var i=Hg.appendOrSelect(this.parent,"text.percent-value"),o=Tt.statusBar.paddingRight,a=i.node().getComputedTextLength(),s=Hg.appendOrSelect(this.parent,"g.status-indicator").node();return n-a-o-(Hg.getSVGElementSize(s,{useBBox:!0}).width+Tt.status.paddingLeft)},e.prototype.getStatusIconPathString=function(t){switch(t){case et.SUCCESS:return"M6.875 11.3125 3.75 8.1875 4.74375 7.25 6.875 9.34375 11.50625 4.75 12.5 5.7375 Z";case et.DANGER:return"M10.7 11.5 4.5 5.3 5.3 4.5 11.5 10.7 Z";case et.WARNING:return"M7.9375,11.125 C7.41973305,11.125 7,11.544733 7,12.0625 C7,12.580267 7.41973305,13 7.9375,13 C8.45526695,13 8.875,12.580267 8.875,12.0625 C8.875,11.544733 8.45526695,11.125 7.9375,11.125 M7.3125, 3 8.5625, 3 8.5625, 9.875 7.3125, 9.875, 7.3125, 3 Z"}},e}(_m),wm=function(t){function e(e,n,r){var i=t.call(this,e,n,r)||this;return i.type="tooltip",i.renderType=I.HTML,i.isEventListenerAdded=!1,i.positionService=new bm,i.handleShowTooltip=function(t){var e,n=t.detail.data||t.detail.items,r=i.formatItems(i.getItems(t));e=t.detail.content?'<div class="title-tooltip"><p>'+t.detail.content+"</p></div>":i.getTooltipHTML(r);var o=Hg.appendOrSelect(i.tooltip,"div.content-box");if(Za(i.getOptions(),"tooltip","customHTML"))if(t.detail.content){var a='<div class="title-tooltip"><p>'+t.detail.content+"</p></div>";o.html(a)}else o.html(i.model.getOptions().tooltip.customHTML(n,e));else o.html(e);o.selectAll(".datapoint-tooltip").each((function(t,e){var n=r[e];r[e]&&r[e].color&&Ba(this).select(".tooltip-color").attr("class","tooltip-color").style("background-color",n.color)})),i.positionTooltip(t),i.tooltip.classed("hidden",!1).attr("aria-hidden",!1)},i.handleHideTooltip=function(){i.tooltip.classed("hidden",!0).attr("aria-hidden",!0)},i.init(),i}return n(e,t),e.prototype.addTooltipEventListener=function(){var t=this;this.services.events.addEventListener(ht.Tooltip.MOVE,(function(e){!1===t.tooltip.classed("hidden")&&t.positionTooltip(e)})),this.services.events.addEventListener(ht.Tooltip.SHOW,this.handleShowTooltip),this.services.events.addEventListener(ht.Tooltip.HIDE,this.handleHideTooltip),this.services.events.addEventListener(ht.Chart.MOUSEOUT,this.handleHideTooltip)},e.prototype.removeTooltipEventListener=function(){this.services.events.removeEventListener(ht.Tooltip.MOVE,null),this.services.events.removeEventListener(ht.Tooltip.SHOW,this.handleShowTooltip),this.services.events.removeEventListener(ht.Tooltip.HIDE,this.handleHideTooltip),this.services.events.removeEventListener(ht.Chart.MOUSEOUT,this.handleHideTooltip)},e.prototype.getItems=function(t){return t.detail.items?t.detail.items:[]},e.prototype.formatItems=function(t){var e=this,n=this.getOptions(),r=Za(n,"tooltip","truncation","type"),i=Za(n,"tooltip","truncation","threshold"),o=Za(n,"tooltip","truncation","numCharacter");return r!==V.NONE?t.map((function(t){var n=t.labelIcon?12:0;return t.value=t.value?e.valueFormatter(t.value,t.label):t.value,t.label&&t.label.length+n>i&&(t.label=qa(t.label,r,o)),t.value&&t.value.length>i&&(t.value=qa(t.value,r,o)),t})):t},e.prototype.getTooltipHTML=function(t){return'<ul class="multi-tooltip">'+t.map((function(t){return'<li>\n\t\t\t\t\t<div class="datapoint-tooltip'+(t.bold?" bold":"")+'">\n\t\t\t\t\t\t'+(t.class||t.color?'<div class="tooltip-color '+t.class+'"></div>':"")+'\n\t\t\t\t\t\t<div class="label">\n\t\t\t\t\t\t<p>'+(t.label||"")+"</p>\n\t\t\t\t\t\t"+(t.labelIcon?'<span class="label-icon"/>'+t.labelIcon+"</span>":"")+"\n\t\t\t\t\t\t</div>\n\t\t\t\t\t\t"+(void 0===t.value||null===t.value?"":'<p class="value"/>'+t.value+"</p>")+"\n\t\t\t\t\t</div>\n\t\t\t\t</li>"})).join("")+"</ul>"},e.prototype.valueFormatter=function(t,e){var n=this.getOptions(),r=Za(n,"tooltip","valueFormatter");if(r)return r(t,e);if("function"==typeof t.getTime)return Qp(t,"MMM d, yyyy");try{if("string"==typeof t&&/\d{4}-\d{2}-\d{2}T\d{2}:\d{2}:\d{2}.\d{3}Z/.test(t))return Qp(Date.parse(t),"MMM d, yyyy")}catch(t){}return t.toLocaleString()},e.prototype.render=function(){var t=this.getOptions(),e=Za(t,"tooltip","enabled");if(e){var n=Ba(this.services.domUtils.getHolder()),r=Za(t,"style","prefix");this.tooltip=Hg.appendOrSelect(n,"div.cds--"+r+"--tooltip"),this.tooltip.style("max-width",null).attr("role","tooltip"),this.isEventListenerAdded||(this.addTooltipEventListener(),this.isEventListenerAdded=!0),this.tooltip.classed("hidden",!0)}else!e&&this.isEventListenerAdded&&(this.removeTooltipEventListener(),this.isEventListenerAdded=!1)},e.prototype.positionTooltip=function(t){var e,n=this.services.domUtils.getHolder(),r=this.tooltip.node(),i=this.getOptions(),o=Za(i,"zoomBar","top","enabled"),a=Za(t,"detail","mousePosition");if(a){var s=Za(i,"zoomBar","top","type"),l=Rt.height[s];o&&(a[1]+=l+Rt.spacerHeight)}else a=Va(Za(t,"detail","event"),n);var u,c=n.offsetWidth,h=n.offsetHeight;u=a[0]/c>.9?pm.LEFT:a[0]/c<.1?pm.RIGHT:this.positionService.findBestPlacementAt({left:a[0],top:a[1]},r,[pm.RIGHT,pm.LEFT,pm.TOP,pm.BOTTOM],(function(){return{top:void 0,left:void 0,width:c,height:h}}));var d=Dt.horizontalOffset;u===pm.LEFT&&(d*=-1),e=this.positionService.findPositionAt({left:a[0]+d,top:a[1]},r,u),this.positionService.setElement(r,e)},e}(Kg),Om=function(t){function e(){return null!==t&&t.apply(this,arguments)||this}return n(e,t),e.prototype.getItems=function(t){var e=this;if(t.detail.items)return t.detail.items;var n=t.detail.data;if(!Array.isArray(n)||!n.length||!n[0])return[];var r,i=this.getOptions(),o=this.services.cartesianScales,a=o.getDomainIdentifier(),s=o.isDualAxes(),l=i.data.groupMapsTo,u=o.getDomainLabel(),c=o.getRangeLabel(),h=n[0][a];if(1===n.length){var d=n[0],f=o.getRangeIdentifier(d);if(s){var p=o.getRangeAxisPosition({datum:d,groups:[d[l]]});c=o.getScaleLabel(p)}var g=d[f];r=R([{label:u,value:h}],Array.isArray(g)&&2===g.length?[{label:"Start",value:g[0]},{label:"End",value:g[1]}]:[{label:c,value:d[f]}]),t.detail.additionalItems&&t.detail.additionalItems.forEach((function(t){return r.push({label:t.label,value:t.value})})),r.push({label:i.tooltip.groupLabel,value:d[l],color:this.model.getFillColor(d[l]),class:this.model.getColorClassName({classNameTypes:[N.TOOLTIP],dataGroupName:d[l]})})}else if(n.length>1&&(r=(r=[{label:u,value:h}]).concat(n.map((function(t){var n=t[o.getRangeIdentifier(t)];return{label:t[l],value:Array.isArray(n)&&2===n.length?n[0]+" - "+n[1]:n,color:e.model.getFillColor(t[l]),class:e.model.getColorClassName({classNameTypes:[N.TOOLTIP],dataGroupName:t[l]})}})).sort((function(t,e){return e.value-t.value}))),!s&&!0===Za(i,"tooltip","showTotal"))){var v=o.getRangeIdentifier();r.push({label:jn(i,"tooltip.totalLabel")||"Total",value:n.reduce((function(t,e){return t+e[v]}),0),bold:!0})}return r},e}(wm),Tm=function(t){function e(e,n,r){var i=t.call(this,e,n,r)||this;return i.type="chart-clip",i.renderType=I.SVG,i.chartClipId="chart-clip-id-"+Math.floor(99999999999*Math.random()),i.init(),i}return n(e,t),e.prototype.init=function(){this.model.set({chartClipId:this.chartClipId},{skipUpdate:!0})},e.prototype.render=function(t){this.createClipPath()},e.prototype.createClipPath=function(){var t=this.parent,e=this.services.cartesianScales,n=e.getMainXScale(),r=e.getMainYScale(),i=n.range(),o=i[0],a=i[1],s=r.range(),l=s[0],u=s[1];this.chartClipPath=Hg.appendOrSelect(t,"clipPath."+this.type).attr("id",this.chartClipId);var c=Hg.appendOrSelect(this.chartClipPath,"rect."+this.type);a-o>0&&c.attr("x",o).attr("y",u).attr("width",a-o).attr("height",l-u),this.chartClipPath.merge(c).lower()},e}(Kg),Sm=function(t){function e(){var e=null!==t&&t.apply(this,arguments)||this;return e.type="canvas-chart-clip",e.chartClipId="canvas-chart-clip-id-"+Math.floor(99999999999*Math.random()),e}return n(e,t),e.prototype.createClipPath=function(){var t=this.parent,e=Hg.getSVGElementSize(this.parent,{useAttrs:!0}),n=e.width,r=e.height;this.chartClipPath=Hg.appendOrSelect(t,"clipPath."+this.type).attr("id",this.chartClipId);var i=Hg.appendOrSelect(this.chartClipPath,"rect."+this.type);i.attr("x",0).attr("y",0).attr("width",n).attr("height",r),this.chartClipPath.merge(i).lower()},e}(Tm),Mm=function(t){function e(e,n){var r=t.call(this,e,n)||this;return r.type="highlight",r.renderType=I.SVG,r.positionService=new bm,r.highlightStrokeWidth=1,r}return n(e,t),e.prototype.render=function(t){void 0===t&&(t=!1);var e=Za(this.getOptions(),"axes"),n=[];Object.keys(e).forEach((function(t){if(Object.values(U).includes(t)){var r=e[t];r.highlights&&r.highlights.data.length>0&&n.push({axisPosition:t,highlightStartMapsTo:r.highlights.highlightStartMapsTo,highlightEndMapsTo:r.highlights.highlightEndMapsTo,labelMapsTo:r.highlights.labelMapsTo,highlight:r.highlights.data,color:r.highlights.color})}}));var r=this.getComponentContainer({withinChartClip:!0}).selectAll("g.axis-highlight").data(n,(function(t){return t.axisPosition}));r.exit().attr("opacity",0).remove();var i=r.enter().append("g").merge(r);i.attr("class",(function(t){return"axis-highlight "+t.axisPosition}));var o=i.selectAll("g.highlight-group").data((function(t){return t.highlight.map((function(e){return e.axisPosition=t.axisPosition,e.highlightStartMapsTo=t.highlightStartMapsTo,e.labelMapsTo=t.labelMapsTo,e.color=t.color,e.highlightEndMapsTo=t.highlightEndMapsTo,e}))}));o.exit().attr("opacity",0).remove();var a=o.enter().append("g");a.append("rect").attr("class","highlight-bar"),a.append("line").attr("class","highlight-line"),a.merge(o).attr("class","highlight-group");var s=this;i.each((function(e){var n=e.axisPosition,r=s.services.cartesianScales.getMainXScale(),i=s.services.cartesianScales.getMainYScale(),o=r.range(),a=o[0],l=o[1],u=i.range(),c=u[0],h=u[1],d=s.services.cartesianScales,f=Ka((function(t){return d.getDomainValue(t)}),(function(t){return d.getRangeValue(t)}),d.getOrientation()),p=f[0],g=f[1],v=Ba(this);n===U.TOP||n===U.BOTTOM?v.selectAll("rect.highlight-bar").transition().call((function(e){return s.services.transitions.setupTransition({transition:e,name:"highlight-bar-update",animate:t})})).attr("y",Math.max(h+s.highlightStrokeWidth,0)).attr("height",Math.max(c-2*s.highlightStrokeWidth,0)).attr("x",(function(t){var e=t.highlightStartMapsTo,n=k(t,["highlightStartMapsTo"]);return p(n[e])})).attr("width",(function(t){var e=t.highlightStartMapsTo,n=t.highlightEndMapsTo,r=k(t,["highlightStartMapsTo","highlightEndMapsTo"]);return Math.max(p(r[n])-p(r[e]),0)})).style("stroke",(function(t){var e=t.color,n=t.labelMapsTo,r=k(t,["color","labelMapsTo"]);return e&&e.scale[r[n]]?e.scale[r[n]]:null})).style("stroke-dasharray","2, 2").attr("stroke-width",s.highlightStrokeWidth+"px").style("fill-opacity",.1).style("fill",(function(t){var e=t.color,n=t.labelMapsTo,r=k(t,["color","labelMapsTo"]);return e&&e.scale[r[n]]?e.scale[r[n]]:null})):v.selectAll("rect.highlight-bar").transition().call((function(e){return s.services.transitions.setupTransition({transition:e,name:"highlight-bar-update",animate:t})})).attr("x",a).attr("width",Math.max(l-a,0)).attr("y",(function(t){var e=t.highlightEndMapsTo,n=k(t,["highlightEndMapsTo"]);return g(n[e])})).attr("height",(function(t){var e=t.highlightStartMapsTo,n=t.highlightEndMapsTo,r=k(t,["highlightStartMapsTo","highlightEndMapsTo"]);return Math.max(g(r[e])-g(r[n]),0)})).style("stroke",(function(t){var e=t.color,n=t.labelMapsTo,r=k(t,["color","labelMapsTo"]);return e&&e.scale[r[n]]?e.scale[r[n]]:null})).style("stroke-dasharray","2, 2").attr("stroke-width",s.highlightStrokeWidth+"px").style("fill-opacity",.1).style("fill",(function(t){var e=t.color,n=t.labelMapsTo,r=k(t,["color","labelMapsTo"]);return e&&e.scale[r[n]]?e.scale[r[n]]:null}))}))},e}(Kg),Cm={value:()=>{}};function Am(){for(var t,e=0,n=arguments.length,r={};e<n;++e){if(!(t=arguments[e]+"")||t in r||/[\s.]/.test(t))throw new Error("illegal type: "+t);r[t]=[]}return new Lm(r)}function Lm(t){this._=t}function Dm(t,e){return t.trim().split(/^|\s+/).map((function(t){var n="",r=t.indexOf(".");if(r>=0&&(n=t.slice(r+1),t=t.slice(0,r)),t&&!e.hasOwnProperty(t))throw new Error("unknown type: "+t);return{type:t,name:n}}))}function km(t,e){for(var n,r=0,i=t.length;r<i;++r)if((n=t[r]).name===e)return n.value}function Rm(t,e,n){for(var r=0,i=t.length;r<i;++r)if(t[r].name===e){t[r]=Cm,t=t.slice(0,r).concat(t.slice(r+1));break}return null!=n&&t.push({name:e,value:n}),t}Lm.prototype=Am.prototype={constructor:Lm,on:function(t,e){var n,r=this._,i=Dm(t+"",r),o=-1,a=i.length;if(!(arguments.length<2)){if(null!=e&&"function"!=typeof e)throw new Error("invalid callback: "+e);for(;++o<a;)if(n=(t=i[o]).type)r[n]=Rm(r[n],t.name,e);else if(null==e)for(n in r)r[n]=Rm(r[n],t.name,null);return this}for(;++o<a;)if((n=(t=i[o]).type)&&(n=km(r[n],t.name)))return n},copy:function(){var t={},e=this._;for(var n in e)t[n]=e[n].slice();return new Lm(t)},call:function(t,e){if((n=arguments.length-2)>0)for(var n,r,i=new Array(n),o=0;o<n;++o)i[o]=arguments[o+2];if(!this._.hasOwnProperty(t))throw new Error("unknown type: "+t);for(o=0,n=(r=this._[t]).length;o<n;++o)r[o].value.apply(e,i)},apply:function(t,e,n){if(!this._.hasOwnProperty(t))throw new Error("unknown type: "+t);for(var r=this._[t],i=0,o=r.length;i<o;++i)r[i].value.apply(e,n)}};const Im={capture:!0,passive:!1};function Pm(t){t.preventDefault(),t.stopImmediatePropagation()}function Nm(t){var e=t.document.documentElement,n=Ba(t).on("dragstart.drag",Pm,Im);"onselectstart"in e?n.on("selectstart.drag",Pm,Im):(e.__noselect=e.style.MozUserSelect,e.style.MozUserSelect="none")}function Um(t,e){var n=t.document.documentElement,r=Ba(t).on("dragstart.drag",null);e&&(r.on("click.drag",Pm,Im),setTimeout((function(){r.on("click.drag",null)}),0)),"onselectstart"in n?r.on("selectstart.drag",null):(n.style.MozUserSelect=n.__noselect,delete n.__noselect)}var Bm,Vm,Hm=0,Gm=0,zm=0,jm=0,Fm=0,Wm=0,qm="object"==typeof performance&&performance.now?performance:Date,Ym="object"==typeof window&&window.requestAnimationFrame?window.requestAnimationFrame.bind(window):function(t){setTimeout(t,17)};function Zm(){return Fm||(Ym(Xm),Fm=qm.now()+Wm)}function Xm(){Fm=0}function $m(){this._call=this._time=this._next=null}function Km(t,e,n){var r=new $m;return r.restart(t,e,n),r}function Qm(){Fm=(jm=qm.now())+Wm,Hm=Gm=0;try{!function(){Zm(),++Hm;for(var t,e=Bm;e;)(t=Fm-e._time)>=0&&e._call.call(void 0,t),e=e._next;--Hm}()}finally{Hm=0,function(){var t,e,n=Bm,r=1/0;for(;n;)n._call?(r>n._time&&(r=n._time),t=n,n=n._next):(e=n._next,n._next=null,n=t?t._next=e:Bm=e);Vm=t,ty(r)}(),Fm=0}}function Jm(){var t=qm.now(),e=t-jm;e>1e3&&(Wm-=e,jm=t)}function ty(t){Hm||(Gm&&(Gm=clearTimeout(Gm)),t-Fm>24?(t<1/0&&(Gm=setTimeout(Qm,t-qm.now()-Wm)),zm&&(zm=clearInterval(zm))):(zm||(jm=qm.now(),zm=setInterval(Jm,1e3)),Hm=1,Ym(Qm)))}function ey(t,e,n){var r=new $m;return e=null==e?0:+e,r.restart(n=>{r.stop(),t(n+e)},e,n),r}$m.prototype=Km.prototype={constructor:$m,restart:function(t,e,n){if("function"!=typeof t)throw new TypeError("callback is not a function");n=(null==n?Zm():+n)+(null==e?0:+e),this._next||Vm===this||(Vm?Vm._next=this:Bm=this,Vm=this),this._call=t,this._time=n,ty()},stop:function(){this._call&&(this._call=null,this._time=1/0,ty())}};var ny=Am("start","end","cancel","interrupt"),ry=[];function iy(t,e,n,r,i,o){var a=t.__transition;if(a){if(n in a)return}else t.__transition={};!function(t,e,n){var r,i=t.__transition;function o(l){var u,c,h,d;if(1!==n.state)return s();for(u in i)if((d=i[u]).name===n.name){if(3===d.state)return ey(o);4===d.state?(d.state=6,d.timer.stop(),d.on.call("interrupt",t,t.__data__,d.index,d.group),delete i[u]):+u<e&&(d.state=6,d.timer.stop(),d.on.call("cancel",t,t.__data__,d.index,d.group),delete i[u])}if(ey((function(){3===n.state&&(n.state=4,n.timer.restart(a,n.delay,n.time),a(l))})),n.state=2,n.on.call("start",t,t.__data__,n.index,n.group),2===n.state){for(n.state=3,r=new Array(h=n.tween.length),u=0,c=-1;u<h;++u)(d=n.tween[u].value.call(t,t.__data__,n.index,n.group))&&(r[++c]=d);r.length=c+1}}function a(e){for(var i=e<n.duration?n.ease.call(null,e/n.duration):(n.timer.restart(s),n.state=5,1),o=-1,a=r.length;++o<a;)r[o].call(t,i);5===n.state&&(n.on.call("end",t,t.__data__,n.index,n.group),s())}function s(){for(var r in n.state=6,n.timer.stop(),delete i[e],i)return;delete t.__transition}i[e]=n,n.timer=Km((function(t){n.state=1,n.timer.restart(o,n.delay,n.time),n.delay<=t&&o(t-n.delay)}),0,n.time)}(t,n,{name:e,index:r,group:i,on:ny,tween:ry,time:o.time,delay:o.delay,duration:o.duration,ease:o.ease,timer:null,state:0})}function oy(t,e){var n=sy(t,e);if(n.state>0)throw new Error("too late; already scheduled");return n}function ay(t,e){var n=sy(t,e);if(n.state>3)throw new Error("too late; already running");return n}function sy(t,e){var n=t.__transition;if(!n||!(n=n[e]))throw new Error("transition not found");return n}function ly(t,e){var n,r,i,o=t.__transition,a=!0;if(o){for(i in e=null==e?null:e+"",o)(n=o[i]).name===e?(r=n.state>2&&n.state<5,n.state=6,n.timer.stop(),n.on.call(r?"interrupt":"cancel",t,t.__data__,n.index,n.group),delete o[i]):a=!1;a&&delete t.__transition}}function uy(t,e){var n,r;return function(){var i=ay(this,t),o=i.tween;if(o!==n)for(var a=0,s=(r=n=o).length;a<s;++a)if(r[a].name===e){(r=r.slice()).splice(a,1);break}i.tween=r}}function cy(t,e,n){var r,i;if("function"!=typeof n)throw new Error;return function(){var o=ay(this,t),a=o.tween;if(a!==r){i=(r=a).slice();for(var s={name:e,value:n},l=0,u=i.length;l<u;++l)if(i[l].name===e){i[l]=s;break}l===u&&i.push(s)}o.tween=i}}function hy(t,e,n){var r=t._id;return t.each((function(){var t=ay(this,r);(t.value||(t.value={}))[e]=n.apply(this,arguments)})),function(t){return sy(t,r).value[e]}}function dy(t,e){var n;return("number"==typeof e?uu:e instanceof Bl?ou:(n=Bl(e))?(e=n,ou):fu)(t,e)}function fy(t){return function(){this.removeAttribute(t)}}function py(t){return function(){this.removeAttributeNS(t.space,t.local)}}function gy(t,e,n){var r,i,o=n+"";return function(){var a=this.getAttribute(t);return a===o?null:a===r?i:i=e(r=a,n)}}function vy(t,e,n){var r,i,o=n+"";return function(){var a=this.getAttributeNS(t.space,t.local);return a===o?null:a===r?i:i=e(r=a,n)}}function my(t,e,n){var r,i,o;return function(){var a,s,l=n(this);if(null!=l)return(a=this.getAttribute(t))===(s=l+"")?null:a===r&&s===i?o:(i=s,o=e(r=a,l));this.removeAttribute(t)}}function yy(t,e,n){var r,i,o;return function(){var a,s,l=n(this);if(null!=l)return(a=this.getAttributeNS(t.space,t.local))===(s=l+"")?null:a===r&&s===i?o:(i=s,o=e(r=a,l));this.removeAttributeNS(t.space,t.local)}}function by(t,e){return function(n){this.setAttribute(t,e.call(this,n))}}function Ey(t,e){return function(n){this.setAttributeNS(t.space,t.local,e.call(this,n))}}function _y(t,e){var n,r;function i(){var i=e.apply(this,arguments);return i!==r&&(n=(r=i)&&Ey(t,i)),n}return i._value=e,i}function xy(t,e){var n,r;function i(){var i=e.apply(this,arguments);return i!==r&&(n=(r=i)&&by(t,i)),n}return i._value=e,i}function wy(t,e){return function(){oy(this,t).delay=+e.apply(this,arguments)}}function Oy(t,e){return e=+e,function(){oy(this,t).delay=e}}function Ty(t,e){return function(){ay(this,t).duration=+e.apply(this,arguments)}}function Sy(t,e){return e=+e,function(){ay(this,t).duration=e}}function My(t,e){if("function"!=typeof e)throw new Error;return function(){ay(this,t).ease=e}}function Cy(t,e,n){var r,i,o=function(t){return(t+"").trim().split(/^|\s+/).every((function(t){var e=t.indexOf(".");return e>=0&&(t=t.slice(0,e)),!t||"start"===t}))}(e)?oy:ay;return function(){var a=o(this,t),s=a.on;s!==r&&(i=(r=s).copy()).on(e,n),a.on=i}}var Ay=Ua.prototype.constructor;function Ly(t){return function(){this.style.removeProperty(t)}}function Dy(t,e,n){return function(r){this.style.setProperty(t,e.call(this,r),n)}}function ky(t,e,n){var r,i;function o(){var o=e.apply(this,arguments);return o!==i&&(r=(i=o)&&Dy(t,o,n)),r}return o._value=e,o}function Ry(t){return function(e){this.textContent=t.call(this,e)}}function Iy(t){var e,n;function r(){var r=t.apply(this,arguments);return r!==n&&(e=(n=r)&&Ry(r)),e}return r._value=t,r}var Py=0;function Ny(t,e,n,r){this._groups=t,this._parents=e,this._name=n,this._id=r}function Uy(){return++Py}var By=Ua.prototype;Ny.prototype=function(t){return Ua().transition(t)}.prototype={constructor:Ny,select:function(t){var e=this._name,n=this._id;"function"!=typeof t&&(t=Do(t));for(var r=this._groups,i=r.length,o=new Array(i),a=0;a<i;++a)for(var s,l,u=r[a],c=u.length,h=o[a]=new Array(c),d=0;d<c;++d)(s=u[d])&&(l=t.call(s,s.__data__,d,u))&&("__data__"in s&&(l.__data__=s.__data__),h[d]=l,iy(h[d],e,n,d,h,sy(s,n)));return new Ny(o,this._parents,e,n)},selectAll:function(t){var e=this._name,n=this._id;"function"!=typeof t&&(t=Io(t));for(var r=this._groups,i=r.length,o=[],a=[],s=0;s<i;++s)for(var l,u=r[s],c=u.length,h=0;h<c;++h)if(l=u[h]){for(var d,f=t.call(l,l.__data__,h,u),p=sy(l,n),g=0,v=f.length;g<v;++g)(d=f[g])&&iy(d,e,n,g,f,p);o.push(f),a.push(l)}return new Ny(o,a,e,n)},selectChild:By.selectChild,selectChildren:By.selectChildren,filter:function(t){"function"!=typeof t&&(t=Po(t));for(var e=this._groups,n=e.length,r=new Array(n),i=0;i<n;++i)for(var o,a=e[i],s=a.length,l=r[i]=[],u=0;u<s;++u)(o=a[u])&&t.call(o,o.__data__,u,a)&&l.push(o);return new Ny(r,this._parents,this._name,this._id)},merge:function(t){if(t._id!==this._id)throw new Error;for(var e=this._groups,n=t._groups,r=e.length,i=n.length,o=Math.min(r,i),a=new Array(r),s=0;s<o;++s)for(var l,u=e[s],c=n[s],h=u.length,d=a[s]=new Array(h),f=0;f<h;++f)(l=u[f]||c[f])&&(d[f]=l);for(;s<r;++s)a[s]=e[s];return new Ny(a,this._parents,this._name,this._id)},selection:function(){return new Ay(this._groups,this._parents)},transition:function(){for(var t=this._name,e=this._id,n=Uy(),r=this._groups,i=r.length,o=0;o<i;++o)for(var a,s=r[o],l=s.length,u=0;u<l;++u)if(a=s[u]){var c=sy(a,e);iy(a,t,n,u,s,{time:c.time+c.delay+c.duration,delay:0,duration:c.duration,ease:c.ease})}return new Ny(r,this._parents,t,n)},call:By.call,nodes:By.nodes,node:By.node,size:By.size,empty:By.empty,each:By.each,on:function(t,e){var n=this._id;return arguments.length<2?sy(this.node(),n).on.on(t):this.each(Cy(n,t,e))},attr:function(t,e){var n=So(t),r="transform"===n?xu:dy;return this.attrTween(t,"function"==typeof e?(n.local?yy:my)(n,r,hy(this,"attr."+t,e)):null==e?(n.local?py:fy)(n):(n.local?vy:gy)(n,r,e))},attrTween:function(t,e){var n="attr."+t;if(arguments.length<2)return(n=this.tween(n))&&n._value;if(null==e)return this.tween(n,null);if("function"!=typeof e)throw new Error;var r=So(t);return this.tween(n,(r.local?_y:xy)(r,e))},style:function(t,e,n){var r="transform"==(t+="")?_u:dy;return null==e?this.styleTween(t,function(t,e){var n,r,i;return function(){var o=oa(this,t),a=(this.style.removeProperty(t),oa(this,t));return o===a?null:o===n&&a===r?i:i=e(n=o,r=a)}}(t,r)).on("end.style."+t,Ly(t)):"function"==typeof e?this.styleTween(t,function(t,e,n){var r,i,o;return function(){var a=oa(this,t),s=n(this),l=s+"";return null==s&&(this.style.removeProperty(t),l=s=oa(this,t)),a===l?null:a===r&&l===i?o:(i=l,o=e(r=a,s))}}(t,r,hy(this,"style."+t,e))).each(function(t,e){var n,r,i,o,a="style."+e,s="end."+a;return function(){var l=ay(this,t),u=l.on,c=null==l.value[a]?o||(o=Ly(e)):void 0;u===n&&i===c||(r=(n=u).copy()).on(s,i=c),l.on=r}}(this._id,t)):this.styleTween(t,function(t,e,n){var r,i,o=n+"";return function(){var a=oa(this,t);return a===o?null:a===r?i:i=e(r=a,n)}}(t,r,e),n).on("end.style."+t,null)},styleTween:function(t,e,n){var r="style."+(t+="");if(arguments.length<2)return(r=this.tween(r))&&r._value;if(null==e)return this.tween(r,null);if("function"!=typeof e)throw new Error;return this.tween(r,ky(t,e,null==n?"":n))},text:function(t){return this.tween("text","function"==typeof t?function(t){return function(){var e=t(this);this.textContent=null==e?"":e}}(hy(this,"text",t)):function(t){return function(){this.textContent=t}}(null==t?"":t+""))},textTween:function(t){var e="text";if(arguments.length<1)return(e=this.tween(e))&&e._value;if(null==t)return this.tween(e,null);if("function"!=typeof t)throw new Error;return this.tween(e,Iy(t))},remove:function(){return this.on("end.remove",function(t){return function(){var e=this.parentNode;for(var n in this.__transition)if(+n!==t)return;e&&e.removeChild(this)}}(this._id))},tween:function(t,e){var n=this._id;if(t+="",arguments.length<2){for(var r,i=sy(this.node(),n).tween,o=0,a=i.length;o<a;++o)if((r=i[o]).name===t)return r.value;return null}return this.each((null==e?uy:cy)(n,t,e))},delay:function(t){var e=this._id;return arguments.length?this.each(("function"==typeof t?wy:Oy)(e,t)):sy(this.node(),e).delay},duration:function(t){var e=this._id;return arguments.length?this.each(("function"==typeof t?Ty:Sy)(e,t)):sy(this.node(),e).duration},ease:function(t){var e=this._id;return arguments.length?this.each(My(e,t)):sy(this.node(),e).ease},easeVarying:function(t){if("function"!=typeof t)throw new Error;return this.each(function(t,e){return function(){var n=e.apply(this,arguments);if("function"!=typeof n)throw new Error;ay(this,t).ease=n}}(this._id,t))},end:function(){var t,e,n=this,r=n._id,i=n.size();return new Promise((function(o,a){var s={value:a},l={value:function(){0==--i&&o()}};n.each((function(){var n=ay(this,r),i=n.on;i!==t&&((e=(t=i).copy())._.cancel.push(s),e._.interrupt.push(s),e._.end.push(l)),n.on=e})),0===i&&o()}))},[Symbol.iterator]:By[Symbol.iterator]};var Vy={time:null,delay:0,duration:250,ease:pt};function Hy(t,e){for(var n;!(n=t.__transition)||!(n=n[e]);)if(!(t=t.parentNode))throw new Error(`transition ${e} not found`);return n}Ua.prototype.interrupt=function(t){return this.each((function(){ly(this,t)}))},Ua.prototype.transition=function(t){var e,n;t instanceof Ny?(e=t._id,t=t._name):(e=Uy(),(n=Vy).time=Zm(),t=null==t?null:t+"");for(var r=this._groups,i=r.length,o=0;o<i;++o)for(var a,s=r[o],l=s.length,u=0;u<l;++u)(a=s[u])&&iy(a,t,e,u,s,n||Hy(a,e));return new Ny(r,this._parents,t,e)};var Gy=t=>()=>t;function zy(t,{sourceEvent:e,target:n,selection:r,mode:i,dispatch:o}){Object.defineProperties(this,{type:{value:t,enumerable:!0,configurable:!0},sourceEvent:{value:e,enumerable:!0,configurable:!0},target:{value:n,enumerable:!0,configurable:!0},selection:{value:r,enumerable:!0,configurable:!0},mode:{value:i,enumerable:!0,configurable:!0},_:{value:o}})}function jy(t){t.stopImmediatePropagation()}function Fy(t){t.preventDefault(),t.stopImmediatePropagation()}var Wy={name:"drag"},qy={name:"space"},Yy={name:"handle"},Zy={name:"center"};const{abs:Xy,max:$y,min:Ky}=Math;function Qy(t){return[+t[0],+t[1]]}function Jy(t){return[Qy(t[0]),Qy(t[1])]}var tb={name:"x",handles:["w","e"].map(sb),input:function(t,e){return null==t?null:[[+t[0],e[0][1]],[+t[1],e[1][1]]]},output:function(t){return t&&[t[0][0],t[1][0]]}},eb={name:"y",handles:["n","s"].map(sb),input:function(t,e){return null==t?null:[[e[0][0],+t[0]],[e[1][0],+t[1]]]},output:function(t){return t&&[t[0][1],t[1][1]]}},nb={overlay:"crosshair",selection:"move",n:"ns-resize",e:"ew-resize",s:"ns-resize",w:"ew-resize",nw:"nwse-resize",ne:"nesw-resize",se:"nwse-resize",sw:"nesw-resize"},rb={e:"w",w:"e",nw:"ne",ne:"nw",se:"sw",sw:"se"},ib={n:"s",s:"n",nw:"sw",ne:"se",se:"ne",sw:"nw"},ob={overlay:1,selection:1,n:null,e:1,s:null,w:-1,nw:-1,ne:1,se:1,sw:-1},ab={overlay:1,selection:1,n:-1,e:null,s:1,w:null,nw:-1,ne:-1,se:1,sw:1};function sb(t){return{type:t}}function lb(t){return!t.ctrlKey&&!t.button}function ub(){var t=this.ownerSVGElement||this;return t.hasAttribute("viewBox")?[[(t=t.viewBox.baseVal).x,t.y],[t.x+t.width,t.y+t.height]]:[[0,0],[t.width.baseVal.value,t.height.baseVal.value]]}function cb(){return navigator.maxTouchPoints||"ontouchstart"in this}function hb(t){for(;!t.__brush;)if(!(t=t.parentNode))return;return t.__brush}function db(t){return t[0][0]===t[1][0]||t[0][1]===t[1][1]}function fb(){return function(t){var e,n=ub,r=lb,i=cb,o=!0,a=Am("start","brush","end"),s=6;function l(e){var n=e.property("__brush",g).selectAll(".overlay").data([sb("overlay")]);n.enter().append("rect").attr("class","overlay").attr("pointer-events","all").attr("cursor",nb.overlay).merge(n).each((function(){var t=hb(this).extent;Ba(this).attr("x",t[0][0]).attr("y",t[0][1]).attr("width",t[1][0]-t[0][0]).attr("height",t[1][1]-t[0][1])})),e.selectAll(".selection").data([sb("selection")]).enter().append("rect").attr("class","selection").attr("cursor",nb.selection).attr("fill","#777").attr("fill-opacity",.3).attr("stroke","#fff").attr("shape-rendering","crispEdges");var r=e.selectAll(".handle").data(t.handles,(function(t){return t.type}));r.exit().remove(),r.enter().append("rect").attr("class",(function(t){return"handle handle--"+t.type})).attr("cursor",(function(t){return nb[t.type]})),e.each(u).attr("fill","none").attr("pointer-events","all").on("mousedown.brush",d).filter(i).on("touchstart.brush",d).on("touchmove.brush",f).on("touchend.brush touchcancel.brush",p).style("touch-action","none").style("-webkit-tap-highlight-color","rgba(0,0,0,0)")}function u(){var t=Ba(this),e=hb(this).selection;e?(t.selectAll(".selection").style("display",null).attr("x",e[0][0]).attr("y",e[0][1]).attr("width",e[1][0]-e[0][0]).attr("height",e[1][1]-e[0][1]),t.selectAll(".handle").style("display",null).attr("x",(function(t){return"e"===t.type[t.type.length-1]?e[1][0]-s/2:e[0][0]-s/2})).attr("y",(function(t){return"s"===t.type[0]?e[1][1]-s/2:e[0][1]-s/2})).attr("width",(function(t){return"n"===t.type||"s"===t.type?e[1][0]-e[0][0]+s:s})).attr("height",(function(t){return"e"===t.type||"w"===t.type?e[1][1]-e[0][1]+s:s}))):t.selectAll(".selection,.handle").style("display","none").attr("x",null).attr("y",null).attr("width",null).attr("height",null)}function c(t,e,n){var r=t.__brush.emitter;return!r||n&&r.clean?new h(t,e,n):r}function h(t,e,n){this.that=t,this.args=e,this.state=t.__brush,this.active=0,this.clean=n}function d(n){if((!e||n.touches)&&r.apply(this,arguments)){var i,a,s,l,h,d,f,p,g,v,m,y=this,b=n.target.__data__.type,E="selection"===(o&&n.metaKey?b="overlay":b)?Wy:o&&n.altKey?Zy:Yy,_=t===eb?null:ob[b],x=t===tb?null:ab[b],w=hb(y),O=w.extent,T=w.selection,S=O[0][0],M=O[0][1],C=O[1][0],A=O[1][1],L=0,D=0,k=_&&x&&o&&n.shiftKey,R=Array.from(n.touches||[n],t=>{const e=t.identifier;return(t=Va(t,y)).point0=t.slice(),t.identifier=e,t});ly(y);var I=c(y,arguments,!0).beforestart();if("overlay"===b){T&&(g=!0);const e=[R[0],R[1]||R[0]];w.selection=T=[[i=t===eb?S:Ky(e[0][0],e[1][0]),s=t===tb?M:Ky(e[0][1],e[1][1])],[h=t===eb?C:$y(e[0][0],e[1][0]),f=t===tb?A:$y(e[0][1],e[1][1])]],R.length>1&&V(n)}else i=T[0][0],s=T[0][1],h=T[1][0],f=T[1][1];a=i,l=s,d=h,p=f;var P=Ba(y).attr("pointer-events","none"),N=P.selectAll(".overlay").attr("cursor",nb[b]);if(n.touches)I.moved=B,I.ended=H;else{var U=Ba(n.view).on("mousemove.brush",B,!0).on("mouseup.brush",H,!0);o&&U.on("keydown.brush",G,!0).on("keyup.brush",z,!0),Nm(n.view)}u.call(y),I.start(n,E.name)}function B(t){for(const e of t.changedTouches||[t])for(const t of R)t.identifier===e.identifier&&(t.cur=Va(e,y));if(k&&!v&&!m&&1===R.length){const t=R[0];Xy(t.cur[0]-t[0])>Xy(t.cur[1]-t[1])?m=!0:v=!0}for(const t of R)t.cur&&(t[0]=t.cur[0],t[1]=t.cur[1]);g=!0,Fy(t),V(t)}function V(t){const e=R[0],n=e.point0;var r;switch(L=e[0]-n[0],D=e[1]-n[1],E){case qy:case Wy:_&&(L=$y(S-i,Ky(C-h,L)),a=i+L,d=h+L),x&&(D=$y(M-s,Ky(A-f,D)),l=s+D,p=f+D);break;case Yy:R[1]?(_&&(a=$y(S,Ky(C,R[0][0])),d=$y(S,Ky(C,R[1][0])),_=1),x&&(l=$y(M,Ky(A,R[0][1])),p=$y(M,Ky(A,R[1][1])),x=1)):(_<0?(L=$y(S-i,Ky(C-i,L)),a=i+L,d=h):_>0&&(L=$y(S-h,Ky(C-h,L)),a=i,d=h+L),x<0?(D=$y(M-s,Ky(A-s,D)),l=s+D,p=f):x>0&&(D=$y(M-f,Ky(A-f,D)),l=s,p=f+D));break;case Zy:_&&(a=$y(S,Ky(C,i-L*_)),d=$y(S,Ky(C,h+L*_))),x&&(l=$y(M,Ky(A,s-D*x)),p=$y(M,Ky(A,f+D*x)))}d<a&&(_*=-1,r=i,i=h,h=r,r=a,a=d,d=r,b in rb&&N.attr("cursor",nb[b=rb[b]])),p<l&&(x*=-1,r=s,s=f,f=r,r=l,l=p,p=r,b in ib&&N.attr("cursor",nb[b=ib[b]])),w.selection&&(T=w.selection),v&&(a=T[0][0],d=T[1][0]),m&&(l=T[0][1],p=T[1][1]),T[0][0]===a&&T[0][1]===l&&T[1][0]===d&&T[1][1]===p||(w.selection=[[a,l],[d,p]],u.call(y),I.brush(t,E.name))}function H(t){if(jy(t),t.touches){if(t.touches.length)return;e&&clearTimeout(e),e=setTimeout((function(){e=null}),500)}else Um(t.view,g),U.on("keydown.brush keyup.brush mousemove.brush mouseup.brush",null);P.attr("pointer-events","all"),N.attr("cursor",nb.overlay),w.selection&&(T=w.selection),db(T)&&(w.selection=null,u.call(y)),I.end(t,E.name)}function G(t){switch(t.keyCode){case 16:k=_&&x;break;case 18:E===Yy&&(_&&(h=d-L*_,i=a+L*_),x&&(f=p-D*x,s=l+D*x),E=Zy,V(t));break;case 32:E!==Yy&&E!==Zy||(_<0?h=d-L:_>0&&(i=a-L),x<0?f=p-D:x>0&&(s=l-D),E=qy,N.attr("cursor",nb.selection),V(t));break;default:return}Fy(t)}function z(t){switch(t.keyCode){case 16:k&&(v=m=k=!1,V(t));break;case 18:E===Zy&&(_<0?h=d:_>0&&(i=a),x<0?f=p:x>0&&(s=l),E=Yy,V(t));break;case 32:E===qy&&(t.altKey?(_&&(h=d-L*_,i=a+L*_),x&&(f=p-D*x,s=l+D*x),E=Zy):(_<0?h=d:_>0&&(i=a),x<0?f=p:x>0&&(s=l),E=Yy),N.attr("cursor",nb[b]),V(t));break;default:return}Fy(t)}}function f(t){c(this,arguments).moved(t)}function p(t){c(this,arguments).ended(t)}function g(){var e=this.__brush||{selection:null};return e.extent=Jy(n.apply(this,arguments)),e.dim=t,e}return l.move=function(e,n,r){e.tween?e.on("start.brush",(function(t){c(this,arguments).beforestart().start(t)})).on("interrupt.brush end.brush",(function(t){c(this,arguments).end(t)})).tween("brush",(function(){var e=this,r=e.__brush,i=c(e,arguments),o=r.selection,a=t.input("function"==typeof n?n.apply(this,arguments):n,r.extent),s=pu(o,a);function l(t){r.selection=1===t&&null===a?null:s(t),u.call(e),i.brush()}return null!==o&&null!==a?l:l(1)})):e.each((function(){var e=this,i=arguments,o=e.__brush,a=t.input("function"==typeof n?n.apply(e,i):n,o.extent),s=c(e,i).beforestart();ly(e),o.selection=null===a?null:a,u.call(e),s.start(r).brush(r).end(r)}))},l.clear=function(t,e){l.move(t,null,e)},h.prototype={beforestart:function(){return 1==++this.active&&(this.state.emitter=this,this.starting=!0),this},start:function(t,e){return this.starting?(this.starting=!1,this.emit("start",t,e)):this.emit("brush",t),this},brush:function(t,e){return this.emit("brush",t,e),this},end:function(t,e){return 0==--this.active&&(delete this.state.emitter,this.emit("end",t,e)),this},emit:function(e,n,r){var i=Ba(this.that).datum();a.call(e,this.that,new zy(e,{sourceEvent:n,target:l,selection:t.output(this.state.selection),mode:r,dispatch:a}),i)}},l.extent=function(t){return arguments.length?(n="function"==typeof t?t:Gy(Jy(t)),l):n},l.filter=function(t){return arguments.length?(r="function"==typeof t?t:Gy(!!t),l):r},l.touchable=function(t){return arguments.length?(i="function"==typeof t?t:Gy(!!t),l):i},l.handleSize=function(t){return arguments.length?(s=+t,l):s},l.keyModifiers=function(t){return arguments.length?(o=!!t,l):o},l.on=function(){var t=a.on.apply(a,arguments);return t===a?l:t},l}(tb)}var pb=Math.PI,gb=pb/2,vb=pb/4,mb=2*pb,yb=180/pb,bb=pb/180,Eb=Math.abs,_b=Math.atan,xb=Math.atan2,wb=Math.cos,Ob=Math.exp,Tb=Math.log,Sb=Math.sin,Mb=Math.sign||function(t){return t>0?1:t<0?-1:0},Cb=Math.sqrt,Ab=Math.tan;function Lb(t){return t>1?gb:t<-1?-gb:Math.asin(t)}function Db(){}function kb(t,e){t&&Ib.hasOwnProperty(t.type)&&Ib[t.type](t,e)}var Rb={Feature:function(t,e){kb(t.geometry,e)},FeatureCollection:function(t,e){for(var n=t.features,r=-1,i=n.length;++r<i;)kb(n[r].geometry,e)}},Ib={Sphere:function(t,e){e.sphere()},Point:function(t,e){t=t.coordinates,e.point(t[0],t[1],t[2])},MultiPoint:function(t,e){for(var n=t.coordinates,r=-1,i=n.length;++r<i;)t=n[r],e.point(t[0],t[1],t[2])},LineString:function(t,e){Pb(t.coordinates,e,0)},MultiLineString:function(t,e){for(var n=t.coordinates,r=-1,i=n.length;++r<i;)Pb(n[r],e,0)},Polygon:function(t,e){Nb(t.coordinates,e)},MultiPolygon:function(t,e){for(var n=t.coordinates,r=-1,i=n.length;++r<i;)Nb(n[r],e)},GeometryCollection:function(t,e){for(var n=t.geometries,r=-1,i=n.length;++r<i;)kb(n[r],e)}};function Pb(t,e,n){var r,i=-1,o=t.length-n;for(e.lineStart();++i<o;)r=t[i],e.point(r[0],r[1],r[2]);e.lineEnd()}function Nb(t,e){var n=-1,r=t.length;for(e.polygonStart();++n<r;)Pb(t[n],e,1);e.polygonEnd()}function Ub(t,e){t&&Rb.hasOwnProperty(t.type)?Rb[t.type](t,e):kb(t,e)}function Bb(t){return[xb(t[1],t[0]),Lb(t[2])]}function Vb(t){var e=t[0],n=t[1],r=wb(n);return[r*wb(e),r*Sb(e),Sb(n)]}function Hb(t,e){return t[0]*e[0]+t[1]*e[1]+t[2]*e[2]}function Gb(t,e){return[t[1]*e[2]-t[2]*e[1],t[2]*e[0]-t[0]*e[2],t[0]*e[1]-t[1]*e[0]]}function zb(t,e){t[0]+=e[0],t[1]+=e[1],t[2]+=e[2]}function jb(t,e){return[t[0]*e,t[1]*e,t[2]*e]}function Fb(t){var e=Cb(t[0]*t[0]+t[1]*t[1]+t[2]*t[2]);t[0]/=e,t[1]/=e,t[2]/=e}function Wb(t,e){function n(n,r){return n=t(n,r),e(n[0],n[1])}return t.invert&&e.invert&&(n.invert=function(n,r){return(n=e.invert(n,r))&&t.invert(n[0],n[1])}),n}function qb(t,e){return Eb(t)>pb&&(t-=Math.round(t/mb)*mb),[t,e]}function Yb(t,e,n){return(t%=mb)?e||n?Wb(Xb(t),$b(e,n)):Xb(t):e||n?$b(e,n):qb}function Zb(t){return function(e,n){return Eb(e+=t)>pb&&(e-=Math.round(e/mb)*mb),[e,n]}}function Xb(t){var e=Zb(t);return e.invert=Zb(-t),e}function $b(t,e){var n=wb(t),r=Sb(t),i=wb(e),o=Sb(e);function a(t,e){var a=wb(e),s=wb(t)*a,l=Sb(t)*a,u=Sb(e),c=u*n+s*r;return[xb(l*i-c*o,s*n-u*r),Lb(c*i+l*o)]}return a.invert=function(t,e){var a=wb(e),s=wb(t)*a,l=Sb(t)*a,u=Sb(e),c=u*i-l*o;return[xb(l*i+u*o,s*n+c*r),Lb(c*n-s*r)]},a}function Kb(t,e){(e=Vb(e))[0]-=t,Fb(e);var n=function(t){return t>1?0:t<-1?pb:Math.acos(t)}(-e[1]);return((-e[2]<0?-n:n)+mb-1e-6)%mb}function Qb(){var t,e=[];return{point:function(e,n,r){t.push([e,n,r])},lineStart:function(){e.push(t=[])},lineEnd:Db,rejoin:function(){e.length>1&&e.push(e.pop().concat(e.shift()))},result:function(){var n=e;return e=[],t=null,n}}}function Jb(t,e){return Eb(t[0]-e[0])<1e-6&&Eb(t[1]-e[1])<1e-6}function tE(t,e,n,r){this.x=t,this.z=e,this.o=n,this.e=r,this.v=!1,this.n=this.p=null}function eE(t,e,n,r,i){var o,a,s=[],l=[];if(t.forEach((function(t){if(!((e=t.length-1)<=0)){var e,n,r=t[0],a=t[e];if(Jb(r,a)){if(!r[2]&&!a[2]){for(i.lineStart(),o=0;o<e;++o)i.point((r=t[o])[0],r[1]);return void i.lineEnd()}a[0]+=2e-6}s.push(n=new tE(r,t,null,!0)),l.push(n.o=new tE(r,null,n,!1)),s.push(n=new tE(a,t,null,!1)),l.push(n.o=new tE(a,null,n,!0))}})),s.length){for(l.sort(e),nE(s),nE(l),o=0,a=l.length;o<a;++o)l[o].e=n=!n;for(var u,c,h=s[0];;){for(var d=h,f=!0;d.v;)if((d=d.n)===h)return;u=d.z,i.lineStart();do{if(d.v=d.o.v=!0,d.e){if(f)for(o=0,a=u.length;o<a;++o)i.point((c=u[o])[0],c[1]);else r(d.x,d.n.x,1,i);d=d.n}else{if(f)for(u=d.p.z,o=u.length-1;o>=0;--o)i.point((c=u[o])[0],c[1]);else r(d.x,d.p.x,-1,i);d=d.p}u=(d=d.o).z,f=!f}while(!d.v);i.lineEnd()}}}function nE(t){if(e=t.length){for(var e,n,r=0,i=t[0];++r<e;)i.n=n=t[r],n.p=i,i=n;i.n=n=t[0],n.p=i}}function rE(t){return Eb(t[0])<=pb?t[0]:Mb(t[0])*((Eb(t[0])+pb)%mb-pb)}function iE(t,e,n,r){return function(i){var o,a,s,l=e(i),u=Qb(),c=e(u),h=!1,d={point:f,lineStart:g,lineEnd:v,polygonStart:function(){d.point=m,d.lineStart=y,d.lineEnd=b,a=[],o=[]},polygonEnd:function(){d.point=f,d.lineStart=g,d.lineEnd=v,a=vl(a);var t=function(t,e){var n=rE(e),r=e[1],i=Sb(r),o=[Sb(n),-wb(n),0],a=0,s=0,l=new Zs;1===i?r=gb+1e-6:-1===i&&(r=-gb-1e-6);for(var u=0,c=t.length;u<c;++u)if(d=(h=t[u]).length)for(var h,d,f=h[d-1],p=rE(f),g=f[1]/2+vb,v=Sb(g),m=wb(g),y=0;y<d;++y,p=E,v=x,m=w,f=b){var b=h[y],E=rE(b),_=b[1]/2+vb,x=Sb(_),w=wb(_),O=E-p,T=O>=0?1:-1,S=T*O,M=S>pb,C=v*x;if(l.add(xb(C*T*Sb(S),m*w+C*wb(S))),a+=M?O+T*mb:O,M^p>=n^E>=n){var A=Gb(Vb(f),Vb(b));Fb(A);var L=Gb(o,A);Fb(L);var D=(M^O>=0?-1:1)*Lb(L[2]);(r>D||r===D&&(A[0]||A[1]))&&(s+=M^O>=0?1:-1)}}return(a<-1e-6||a<1e-6&&l<-1e-12)^1&s}(o,r);a.length?(h||(i.polygonStart(),h=!0),eE(a,aE,t,n,i)):t&&(h||(i.polygonStart(),h=!0),i.lineStart(),n(null,null,1,i),i.lineEnd()),h&&(i.polygonEnd(),h=!1),a=o=null},sphere:function(){i.polygonStart(),i.lineStart(),n(null,null,1,i),i.lineEnd(),i.polygonEnd()}};function f(e,n){t(e,n)&&i.point(e,n)}function p(t,e){l.point(t,e)}function g(){d.point=p,l.lineStart()}function v(){d.point=f,l.lineEnd()}function m(t,e){s.push([t,e]),c.point(t,e)}function y(){c.lineStart(),s=[]}function b(){m(s[0][0],s[0][1]),c.lineEnd();var t,e,n,r,l=c.clean(),d=u.result(),f=d.length;if(s.pop(),o.push(s),s=null,f)if(1&l){if((e=(n=d[0]).length-1)>0){for(h||(i.polygonStart(),h=!0),i.lineStart(),t=0;t<e;++t)i.point((r=n[t])[0],r[1]);i.lineEnd()}}else f>1&&2&l&&d.push(d.pop().concat(d.shift())),a.push(d.filter(oE))}return d}}function oE(t){return t.length>1}function aE(t,e){return((t=t.x)[0]<0?t[1]-gb-1e-6:gb-t[1])-((e=e.x)[0]<0?e[1]-gb-1e-6:gb-e[1])}qb.invert=qb;var sE=iE((function(){return!0}),(function(t){var e,n=NaN,r=NaN,i=NaN;return{lineStart:function(){t.lineStart(),e=1},point:function(o,a){var s=o>0?pb:-pb,l=Eb(o-n);Eb(l-pb)<1e-6?(t.point(n,r=(r+a)/2>0?gb:-gb),t.point(i,r),t.lineEnd(),t.lineStart(),t.point(s,r),t.point(o,r),e=0):i!==s&&l>=pb&&(Eb(n-i)<1e-6&&(n-=1e-6*i),Eb(o-s)<1e-6&&(o-=1e-6*s),r=function(t,e,n,r){var i,o,a=Sb(t-n);return Eb(a)>1e-6?_b((Sb(e)*(o=wb(r))*Sb(n)-Sb(r)*(i=wb(e))*Sb(t))/(i*o*a)):(e+r)/2}(n,r,o,a),t.point(i,r),t.lineEnd(),t.lineStart(),t.point(s,r),e=0),t.point(n=o,r=a),i=s},lineEnd:function(){t.lineEnd(),n=r=NaN},clean:function(){return 2-e}}}),(function(t,e,n,r){var i;if(null==t)i=n*gb,r.point(-pb,i),r.point(0,i),r.point(pb,i),r.point(pb,0),r.point(pb,-i),r.point(0,-i),r.point(-pb,-i),r.point(-pb,0),r.point(-pb,i);else if(Eb(t[0]-e[0])>1e-6){var o=t[0]<e[0]?pb:-pb;i=n*o/2,r.point(-o,i),r.point(0,i),r.point(o,i)}else r.point(e[0],e[1])}),[-pb,-gb]);function lE(t){var e=wb(t),n=6*bb,r=e>0,i=Eb(e)>1e-6;function o(t,n){return wb(t)*wb(n)>e}function a(t,n,r){var i=[1,0,0],o=Gb(Vb(t),Vb(n)),a=Hb(o,o),s=o[0],l=a-s*s;if(!l)return!r&&t;var u=e*a/l,c=-e*s/l,h=Gb(i,o),d=jb(i,u);zb(d,jb(o,c));var f=h,p=Hb(d,f),g=Hb(f,f),v=p*p-g*(Hb(d,d)-1);if(!(v<0)){var m=Cb(v),y=jb(f,(-p-m)/g);if(zb(y,d),y=Bb(y),!r)return y;var b,E=t[0],_=n[0],x=t[1],w=n[1];_<E&&(b=E,E=_,_=b);var O=_-E,T=Eb(O-pb)<1e-6;if(!T&&w<x&&(b=x,x=w,w=b),T||O<1e-6?T?x+w>0^y[1]<(Eb(y[0]-E)<1e-6?x:w):x<=y[1]&&y[1]<=w:O>pb^(E<=y[0]&&y[0]<=_)){var S=jb(f,(-p+m)/g);return zb(S,d),[y,Bb(S)]}}}function s(e,n){var i=r?t:pb-t,o=0;return e<-i?o|=1:e>i&&(o|=2),n<-i?o|=4:n>i&&(o|=8),o}return iE(o,(function(t){var e,n,l,u,c;return{lineStart:function(){u=l=!1,c=1},point:function(h,d){var f,p=[h,d],g=o(h,d),v=r?g?0:s(h,d):g?s(h+(h<0?pb:-pb),d):0;if(!e&&(u=l=g)&&t.lineStart(),g!==l&&(!(f=a(e,p))||Jb(e,f)||Jb(p,f))&&(p[2]=1),g!==l)c=0,g?(t.lineStart(),f=a(p,e),t.point(f[0],f[1])):(f=a(e,p),t.point(f[0],f[1],2),t.lineEnd()),e=f;else if(i&&e&&r^g){var m;v&n||!(m=a(p,e,!0))||(c=0,r?(t.lineStart(),t.point(m[0][0],m[0][1]),t.point(m[1][0],m[1][1]),t.lineEnd()):(t.point(m[1][0],m[1][1]),t.lineEnd(),t.lineStart(),t.point(m[0][0],m[0][1],3)))}!g||e&&Jb(e,p)||t.point(p[0],p[1]),e=p,l=g,n=v},lineEnd:function(){l&&t.lineEnd(),e=null},clean:function(){return c|(u&&l)<<1}}}),(function(e,r,i,o){!function(t,e,n,r,i,o){if(n){var a=wb(e),s=Sb(e),l=r*n;null==i?(i=e+r*mb,o=e-l/2):(i=Kb(a,i),o=Kb(a,o),(r>0?i<o:i>o)&&(i+=r*mb));for(var u,c=i;r>0?c>o:c<o;c-=l)u=Bb([a,-s*wb(c),-s*Sb(c)]),t.point(u[0],u[1])}}(o,t,n,i,e,r)}),r?[0,-t]:[-pb,t-pb])}function uE(t,e,n,r){function i(i,o){return t<=i&&i<=n&&e<=o&&o<=r}function o(i,o,s,u){var c=0,h=0;if(null==i||(c=a(i,s))!==(h=a(o,s))||l(i,o)<0^s>0)do{u.point(0===c||3===c?t:n,c>1?r:e)}while((c=(c+s+4)%4)!==h);else u.point(o[0],o[1])}function a(r,i){return Eb(r[0]-t)<1e-6?i>0?0:3:Eb(r[0]-n)<1e-6?i>0?2:1:Eb(r[1]-e)<1e-6?i>0?1:0:i>0?3:2}function s(t,e){return l(t.x,e.x)}function l(t,e){var n=a(t,1),r=a(e,1);return n!==r?n-r:0===n?e[1]-t[1]:1===n?t[0]-e[0]:2===n?t[1]-e[1]:e[0]-t[0]}return function(a){var l,u,c,h,d,f,p,g,v,m,y,b=a,E=Qb(),_={point:x,lineStart:function(){_.point=w,u&&u.push(c=[]);m=!0,v=!1,p=g=NaN},lineEnd:function(){l&&(w(h,d),f&&v&&E.rejoin(),l.push(E.result()));_.point=x,v&&b.lineEnd()},polygonStart:function(){b=E,l=[],u=[],y=!0},polygonEnd:function(){var e=function(){for(var e=0,n=0,i=u.length;n<i;++n)for(var o,a,s=u[n],l=1,c=s.length,h=s[0],d=h[0],f=h[1];l<c;++l)o=d,a=f,h=s[l],d=h[0],f=h[1],a<=r?f>r&&(d-o)*(r-a)>(f-a)*(t-o)&&++e:f<=r&&(d-o)*(r-a)<(f-a)*(t-o)&&--e;return e}(),n=y&&e,i=(l=vl(l)).length;(n||i)&&(a.polygonStart(),n&&(a.lineStart(),o(null,null,1,a),a.lineEnd()),i&&eE(l,s,e,o,a),a.polygonEnd());b=a,l=u=c=null}};function x(t,e){i(t,e)&&b.point(t,e)}function w(o,a){var s=i(o,a);if(u&&c.push([o,a]),m)h=o,d=a,f=s,m=!1,s&&(b.lineStart(),b.point(o,a));else if(s&&v)b.point(o,a);else{var l=[p=Math.max(-1e9,Math.min(1e9,p)),g=Math.max(-1e9,Math.min(1e9,g))],E=[o=Math.max(-1e9,Math.min(1e9,o)),a=Math.max(-1e9,Math.min(1e9,a))];!function(t,e,n,r,i,o){var a,s=t[0],l=t[1],u=0,c=1,h=e[0]-s,d=e[1]-l;if(a=n-s,h||!(a>0)){if(a/=h,h<0){if(a<u)return;a<c&&(c=a)}else if(h>0){if(a>c)return;a>u&&(u=a)}if(a=i-s,h||!(a<0)){if(a/=h,h<0){if(a>c)return;a>u&&(u=a)}else if(h>0){if(a<u)return;a<c&&(c=a)}if(a=r-l,d||!(a>0)){if(a/=d,d<0){if(a<u)return;a<c&&(c=a)}else if(d>0){if(a>c)return;a>u&&(u=a)}if(a=o-l,d||!(a<0)){if(a/=d,d<0){if(a>c)return;a>u&&(u=a)}else if(d>0){if(a<u)return;a<c&&(c=a)}return u>0&&(t[0]=s+u*h,t[1]=l+u*d),c<1&&(e[0]=s+c*h,e[1]=l+c*d),!0}}}}}(l,E,t,e,n,r)?s&&(b.lineStart(),b.point(o,a),y=!1):(v||(b.lineStart(),b.point(l[0],l[1])),b.point(E[0],E[1]),s||b.lineEnd(),y=!1)}p=o,g=a,v=s}return _}}var cE,hE,dE,fE,pE=t=>t,gE=new Zs,vE=new Zs,mE={point:Db,lineStart:Db,lineEnd:Db,polygonStart:function(){mE.lineStart=yE,mE.lineEnd=_E},polygonEnd:function(){mE.lineStart=mE.lineEnd=mE.point=Db,gE.add(Eb(vE)),vE=new Zs},result:function(){var t=gE/2;return gE=new Zs,t}};function yE(){mE.point=bE}function bE(t,e){mE.point=EE,cE=dE=t,hE=fE=e}function EE(t,e){vE.add(fE*t-dE*e),dE=t,fE=e}function _E(){EE(cE,hE)}var xE=1/0,wE=xE,OE=-xE,TE=OE,SE={point:function(t,e){t<xE&&(xE=t);t>OE&&(OE=t);e<wE&&(wE=e);e>TE&&(TE=e)},lineStart:Db,lineEnd:Db,polygonStart:Db,polygonEnd:Db,result:function(){var t=[[xE,wE],[OE,TE]];return OE=TE=-(wE=xE=1/0),t}};var ME,CE,AE,LE,DE=0,kE=0,RE=0,IE=0,PE=0,NE=0,UE=0,BE=0,VE=0,HE={point:GE,lineStart:zE,lineEnd:WE,polygonStart:function(){HE.lineStart=qE,HE.lineEnd=YE},polygonEnd:function(){HE.point=GE,HE.lineStart=zE,HE.lineEnd=WE},result:function(){var t=VE?[UE/VE,BE/VE]:NE?[IE/NE,PE/NE]:RE?[DE/RE,kE/RE]:[NaN,NaN];return DE=kE=RE=IE=PE=NE=UE=BE=VE=0,t}};function GE(t,e){DE+=t,kE+=e,++RE}function zE(){HE.point=jE}function jE(t,e){HE.point=FE,GE(AE=t,LE=e)}function FE(t,e){var n=t-AE,r=e-LE,i=Cb(n*n+r*r);IE+=i*(AE+t)/2,PE+=i*(LE+e)/2,NE+=i,GE(AE=t,LE=e)}function WE(){HE.point=GE}function qE(){HE.point=ZE}function YE(){XE(ME,CE)}function ZE(t,e){HE.point=XE,GE(ME=AE=t,CE=LE=e)}function XE(t,e){var n=t-AE,r=e-LE,i=Cb(n*n+r*r);IE+=i*(AE+t)/2,PE+=i*(LE+e)/2,NE+=i,UE+=(i=LE*t-AE*e)*(AE+t),BE+=i*(LE+e),VE+=3*i,GE(AE=t,LE=e)}function $E(t){this._context=t}$E.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,e){switch(this._point){case 0:this._context.moveTo(t,e),this._point=1;break;case 1:this._context.lineTo(t,e);break;default:this._context.moveTo(t+this._radius,e),this._context.arc(t,e,this._radius,0,mb)}},result:Db};var KE,QE,JE,t_,e_,n_=new Zs,r_={point:Db,lineStart:function(){r_.point=i_},lineEnd:function(){KE&&o_(QE,JE),r_.point=Db},polygonStart:function(){KE=!0},polygonEnd:function(){KE=null},result:function(){var t=+n_;return n_=new Zs,t}};function i_(t,e){r_.point=o_,QE=t_=t,JE=e_=e}function o_(t,e){t_-=t,e_-=e,n_.add(Cb(t_*t_+e_*e_)),t_=t,e_=e}let a_,s_,l_,u_;class c_{constructor(t){this._append=null==t?h_:function(t){const e=Math.floor(t);if(!(e>=0))throw new RangeError("invalid digits: "+t);if(e>15)return h_;if(e!==a_){const t=10**e;a_=e,s_=function(e){let n=1;this._+=e[0];for(const r=e.length;n<r;++n)this._+=Math.round(arguments[n]*t)/t+e[n]}}return s_}(t),this._radius=4.5,this._=""}pointRadius(t){return this._radius=+t,this}polygonStart(){this._line=0}polygonEnd(){this._line=NaN}lineStart(){this._point=0}lineEnd(){0===this._line&&(this._+="Z"),this._point=NaN}point(t,e){switch(this._point){case 0:this._append`M${t},${e}`,this._point=1;break;case 1:this._append`L${t},${e}`;break;default:if(this._append`M${t},${e}`,this._radius!==l_||this._append!==s_){const t=this._radius,e=this._;this._="",this._append`m0,${t}a${t},${t} 0 1,1 0,${-2*t}a${t},${t} 0 1,1 0,${2*t}z`,l_=t,s_=this._append,u_=this._,this._=e}this._+=u_}}result(){const t=this._;return this._="",t.length?t:null}}function h_(t){let e=1;this._+=t[0];for(const n=t.length;e<n;++e)this._+=arguments[e]+t[e]}function d_(t){return function(e){var n=new f_;for(var r in t)n[r]=t[r];return n.stream=e,n}}function f_(){}function p_(t,e,n){var r=t.clipExtent&&t.clipExtent();return t.scale(150).translate([0,0]),null!=r&&t.clipExtent(null),Ub(n,t.stream(SE)),e(SE.result()),null!=r&&t.clipExtent(r),t}function g_(t,e,n){return p_(t,(function(n){var r=e[1][0]-e[0][0],i=e[1][1]-e[0][1],o=Math.min(r/(n[1][0]-n[0][0]),i/(n[1][1]-n[0][1])),a=+e[0][0]+(r-o*(n[1][0]+n[0][0]))/2,s=+e[0][1]+(i-o*(n[1][1]+n[0][1]))/2;t.scale(150*o).translate([a,s])}),n)}f_.prototype={constructor:f_,point:function(t,e){this.stream.point(t,e)},sphere:function(){this.stream.sphere()},lineStart:function(){this.stream.lineStart()},lineEnd:function(){this.stream.lineEnd()},polygonStart:function(){this.stream.polygonStart()},polygonEnd:function(){this.stream.polygonEnd()}};var v_=wb(30*bb);function m_(t,e){return+e?function(t,e){function n(r,i,o,a,s,l,u,c,h,d,f,p,g,v){var m=u-r,y=c-i,b=m*m+y*y;if(b>4*e&&g--){var E=a+d,_=s+f,x=l+p,w=Cb(E*E+_*_+x*x),O=Lb(x/=w),T=Eb(Eb(x)-1)<1e-6||Eb(o-h)<1e-6?(o+h)/2:xb(_,E),S=t(T,O),M=S[0],C=S[1],A=M-r,L=C-i,D=y*A-m*L;(D*D/b>e||Eb((m*A+y*L)/b-.5)>.3||a*d+s*f+l*p<v_)&&(n(r,i,o,a,s,l,M,C,T,E/=w,_/=w,x,g,v),v.point(M,C),n(M,C,T,E,_,x,u,c,h,d,f,p,g,v))}}return function(e){var r,i,o,a,s,l,u,c,h,d,f,p,g={point:v,lineStart:m,lineEnd:b,polygonStart:function(){e.polygonStart(),g.lineStart=E},polygonEnd:function(){e.polygonEnd(),g.lineStart=m}};function v(n,r){n=t(n,r),e.point(n[0],n[1])}function m(){c=NaN,g.point=y,e.lineStart()}function y(r,i){var o=Vb([r,i]),a=t(r,i);n(c,h,u,d,f,p,c=a[0],h=a[1],u=r,d=o[0],f=o[1],p=o[2],16,e),e.point(c,h)}function b(){g.point=v,e.lineEnd()}function E(){m(),g.point=_,g.lineEnd=x}function _(t,e){y(r=t,e),i=c,o=h,a=d,s=f,l=p,g.point=y}function x(){n(c,h,u,d,f,p,i,o,r,a,s,l,16,e),g.lineEnd=b,b()}return g}}(t,e):function(t){return d_({point:function(e,n){e=t(e,n),this.stream.point(e[0],e[1])}})}(t)}var y_=d_({point:function(t,e){this.stream.point(t*bb,e*bb)}});function b_(t,e,n,r,i,o){if(!o)return function(t,e,n,r,i){function o(o,a){return[e+t*(o*=r),n-t*(a*=i)]}return o.invert=function(o,a){return[(o-e)/t*r,(n-a)/t*i]},o}(t,e,n,r,i);var a=wb(o),s=Sb(o),l=a*t,u=s*t,c=a/t,h=s/t,d=(s*n-a*e)/t,f=(s*e+a*n)/t;function p(t,o){return[l*(t*=r)-u*(o*=i)+e,n-u*t-l*o]}return p.invert=function(t,e){return[r*(c*t-h*e+d),i*(f-h*t-c*e)]},p}function E_(t){return __((function(){return t}))()}function __(t){var e,n,r,i,o,a,s,l,u,c,h=150,d=480,f=250,p=0,g=0,v=0,m=0,y=0,b=0,E=1,_=1,x=null,w=sE,O=null,T=pE,S=.5;function M(t){return l(t[0]*bb,t[1]*bb)}function C(t){return(t=l.invert(t[0],t[1]))&&[t[0]*yb,t[1]*yb]}function A(){var t=b_(h,0,0,E,_,b).apply(null,e(p,g)),r=b_(h,d-t[0],f-t[1],E,_,b);return n=Yb(v,m,y),s=Wb(e,r),l=Wb(n,s),a=m_(s,S),L()}function L(){return u=c=null,M}return M.stream=function(t){return u&&c===t?u:u=y_(function(t){return d_({point:function(e,n){var r=t(e,n);return this.stream.point(r[0],r[1])}})}(n)(w(a(T(c=t)))))},M.preclip=function(t){return arguments.length?(w=t,x=void 0,L()):w},M.postclip=function(t){return arguments.length?(T=t,O=r=i=o=null,L()):T},M.clipAngle=function(t){return arguments.length?(w=+t?lE(x=t*bb):(x=null,sE),L()):x*yb},M.clipExtent=function(t){return arguments.length?(T=null==t?(O=r=i=o=null,pE):uE(O=+t[0][0],r=+t[0][1],i=+t[1][0],o=+t[1][1]),L()):null==O?null:[[O,r],[i,o]]},M.scale=function(t){return arguments.length?(h=+t,A()):h},M.translate=function(t){return arguments.length?(d=+t[0],f=+t[1],A()):[d,f]},M.center=function(t){return arguments.length?(p=t[0]%360*bb,g=t[1]%360*bb,A()):[p*yb,g*yb]},M.rotate=function(t){return arguments.length?(v=t[0]%360*bb,m=t[1]%360*bb,y=t.length>2?t[2]%360*bb:0,A()):[v*yb,m*yb,y*yb]},M.angle=function(t){return arguments.length?(b=t%360*bb,A()):b*yb},M.reflectX=function(t){return arguments.length?(E=t?-1:1,A()):E<0},M.reflectY=function(t){return arguments.length?(_=t?-1:1,A()):_<0},M.precision=function(t){return arguments.length?(a=m_(s,S=t*t),L()):Cb(S)},M.fitExtent=function(t,e){return g_(M,t,e)},M.fitSize=function(t,e){return function(t,e,n){return g_(t,[[0,0],e],n)}(M,t,e)},M.fitWidth=function(t,e){return function(t,e,n){return p_(t,(function(n){var r=+e,i=r/(n[1][0]-n[0][0]),o=(r-i*(n[1][0]+n[0][0]))/2,a=-i*n[0][1];t.scale(150*i).translate([o,a])}),n)}(M,t,e)},M.fitHeight=function(t,e){return function(t,e,n){return p_(t,(function(n){var r=+e,i=r/(n[1][1]-n[0][1]),o=-i*n[0][0],a=(r-i*(n[1][1]+n[0][1]))/2;t.scale(150*i).translate([o,a])}),n)}(M,t,e)},function(){return e=t.apply(this,arguments),M.invert=e.invert&&C,A()}}function x_(t){var e=0,n=pb/3,r=__(t),i=r(e,n);return i.parallels=function(t){return arguments.length?r(e=t[0]*bb,n=t[1]*bb):[e*yb,n*yb]},i}function w_(t,e){var n=Sb(t),r=(n+Sb(e))/2;if(Eb(r)<1e-6)return function(t){var e=wb(t);function n(t,n){return[t*e,Sb(n)/e]}return n.invert=function(t,n){return[t/e,Lb(n*e)]},n}(t);var i=1+n*(2*r-n),o=Cb(i)/r;function a(t,e){var n=Cb(i-2*r*Sb(e))/r;return[n*Sb(t*=r),o-n*wb(t)]}return a.invert=function(t,e){var n=o-e,a=xb(t,Eb(n))*Mb(n);return n*r<0&&(a-=pb*Mb(t)*Mb(n)),[a/r,Lb((i-(t*t+n*n)*r*r)/(2*r))]},a}function O_(){return x_(w_).scale(155.424).center([0,33.6442])}function T_(t,e){return[t,Tb(Ab((gb+e)/2))]}function S_(){return function(t){var e,n,r,i=E_(t),o=i.center,a=i.scale,s=i.translate,l=i.clipExtent,u=null;function c(){var o=pb*a(),s=i(function(t){function e(e){return(e=t(e[0]*bb,e[1]*bb))[0]*=yb,e[1]*=yb,e}return t=Yb(t[0]*bb,t[1]*bb,t.length>2?t[2]*bb:0),e.invert=function(e){return(e=t.invert(e[0]*bb,e[1]*bb))[0]*=yb,e[1]*=yb,e},e}(i.rotate()).invert([0,0]));return l(null==u?[[s[0]-o,s[1]-o],[s[0]+o,s[1]+o]]:t===T_?[[Math.max(s[0]-o,u),e],[Math.min(s[0]+o,n),r]]:[[u,Math.max(s[1]-o,e)],[n,Math.min(s[1]+o,r)]])}return i.scale=function(t){return arguments.length?(a(t),c()):a()},i.translate=function(t){return arguments.length?(s(t),c()):s()},i.center=function(t){return arguments.length?(o(t),c()):o()},i.clipExtent=function(t){return arguments.length?(null==t?u=e=n=r=null:(u=+t[0][0],e=+t[0][1],n=+t[1][0],r=+t[1][1]),c()):null==u?null:[[u,e],[n,r]]},c()}(T_).scale(961/mb)}function M_(t,e){return[t,e]}function C_(){return E_(M_).scale(152.63)}function A_(t,e){var n=wb(t),r=t===e?Sb(t):(n-wb(e))/(e-t),i=n/r+t;if(Eb(r)<1e-6)return M_;function o(t,e){var n=i-e,o=r*t;return[n*Sb(o),i-n*wb(o)]}return o.invert=function(t,e){var n=i-e,o=xb(t,Eb(n))*Mb(n);return n*r<0&&(o-=pb*Mb(t)*Mb(n)),[o/r,i-Mb(r)*Cb(t*t+n*n)]},o}T_.invert=function(t,e){return[t,2*_b(Ob(e))-gb]},M_.invert=M_;var L_=1.340264,D_=-.081106,k_=893e-6,R_=.003796,I_=Cb(3)/2;function P_(t,e){var n=Lb(I_*Sb(e)),r=n*n,i=r*r*r;return[t*wb(n)/(I_*(L_+3*D_*r+i*(7*k_+9*R_*r))),n*(L_+D_*r+i*(k_+R_*r))]}function N_(){return E_(P_).scale(177.158)}function U_(t,e){var n=e*e,r=n*n;return[t*(.8707-.131979*n+r*(r*(.003971*n-.001529*r)-.013791)),e*(1.007226+n*(.015085+r*(.028874*n-.044475-.005916*r)))]}function B_(){return E_(U_).scale(175.295)}function V_(t,e){return t.parent===e.parent?1:2}function H_(t,e){return t+e.x}function G_(t,e){return Math.max(t,e.y)}function z_(){var t=V_,e=1,n=1,r=!1;function i(i){var o,a=0;i.eachAfter((function(e){var n=e.children;n?(e.x=function(t){return t.reduce(H_,0)/t.length}(n),e.y=function(t){return 1+t.reduce(G_,0)}(n)):(e.x=o?a+=t(e,o):0,e.y=0,o=e)}));var s=function(t){for(var e;e=t.children;)t=e[0];return t}(i),l=function(t){for(var e;e=t.children;)t=e[e.length-1];return t}(i),u=s.x-t(s,l)/2,c=l.x+t(l,s)/2;return i.eachAfter(r?function(t){t.x=(t.x-i.x)*e,t.y=(i.y-t.y)*n}:function(t){t.x=(t.x-u)/(c-u)*e,t.y=(1-(i.y?t.y/i.y:1))*n})}return i.separation=function(e){return arguments.length?(t=e,i):t},i.size=function(t){return arguments.length?(r=!1,e=+t[0],n=+t[1],i):r?null:[e,n]},i.nodeSize=function(t){return arguments.length?(r=!0,e=+t[0],n=+t[1],i):r?[e,n]:null},i}function j_(t){var e=0,n=t.children,r=n&&n.length;if(r)for(;--r>=0;)e+=n[r].value;else e=1;t.value=e}function F_(t,e){t instanceof Map?(t=[void 0,t],void 0===e&&(e=q_)):void 0===e&&(e=W_);for(var n,r,i,o,a,s=new X_(t),l=[s];n=l.pop();)if((i=e(n.data))&&(a=(i=Array.from(i)).length))for(n.children=i,o=a-1;o>=0;--o)l.push(r=i[o]=new X_(i[o])),r.parent=n,r.depth=n.depth+1;return s.eachBefore(Z_)}function W_(t){return t.children}function q_(t){return Array.isArray(t)?t[1]:null}function Y_(t){void 0!==t.data.value&&(t.value=t.data.value),t.data=t.data.data}function Z_(t){var e=0;do{t.height=e}while((t=t.parent)&&t.height<++e)}function X_(t){this.data=t,this.depth=this.height=0,this.parent=null}function $_(t){return null==t?null:K_(t)}function K_(t){if("function"!=typeof t)throw new Error;return t}function Q_(){return 0}function J_(t){return function(){return t}}P_.invert=function(t,e){for(var n,r=e,i=r*r,o=i*i*i,a=0;a<12&&(o=(i=(r-=n=(r*(L_+D_*i+o*(k_+R_*i))-e)/(L_+3*D_*i+o*(7*k_+9*R_*i)))*r)*i*i,!(Eb(n)<1e-12));++a);return[I_*t*(L_+3*D_*i+o*(7*k_+9*R_*i))/wb(r),Lb(Sb(r)/I_)]},U_.invert=function(t,e){var n,r=e,i=25;do{var o=r*r,a=o*o;r-=n=(r*(1.007226+o*(.015085+a*(.028874*o-.044475-.005916*a)))-e)/(1.007226+o*(.045255+a*(.259866*o-.311325-.005916*11*a)))}while(Eb(n)>1e-6&&--i>0);return[t/(.8707+(o=r*r)*(o*(o*o*o*(.003971-.001529*o)-.013791)-.131979)),r]},X_.prototype=F_.prototype={constructor:X_,count:function(){return this.eachAfter(j_)},each:function(t,e){let n=-1;for(const r of this)t.call(e,r,++n,this);return this},eachAfter:function(t,e){for(var n,r,i,o=this,a=[o],s=[],l=-1;o=a.pop();)if(s.push(o),n=o.children)for(r=0,i=n.length;r<i;++r)a.push(n[r]);for(;o=s.pop();)t.call(e,o,++l,this);return this},eachBefore:function(t,e){for(var n,r,i=this,o=[i],a=-1;i=o.pop();)if(t.call(e,i,++a,this),n=i.children)for(r=n.length-1;r>=0;--r)o.push(n[r]);return this},find:function(t,e){let n=-1;for(const r of this)if(t.call(e,r,++n,this))return r},sum:function(t){return this.eachAfter((function(e){for(var n=+t(e.data)||0,r=e.children,i=r&&r.length;--i>=0;)n+=r[i].value;e.value=n}))},sort:function(t){return this.eachBefore((function(e){e.children&&e.children.sort(t)}))},path:function(t){for(var e=this,n=function(t,e){if(t===e)return t;var n=t.ancestors(),r=e.ancestors(),i=null;t=n.pop(),e=r.pop();for(;t===e;)i=t,t=n.pop(),e=r.pop();return i}(e,t),r=[e];e!==n;)e=e.parent,r.push(e);for(var i=r.length;t!==n;)r.splice(i,0,t),t=t.parent;return r},ancestors:function(){for(var t=this,e=[t];t=t.parent;)e.push(t);return e},descendants:function(){return Array.from(this)},leaves:function(){var t=[];return this.eachBefore((function(e){e.children||t.push(e)})),t},links:function(){var t=this,e=[];return t.each((function(n){n!==t&&e.push({source:n.parent,target:n})})),e},copy:function(){return F_(this).eachBefore(Y_)},[Symbol.iterator]:function*(){var t,e,n,r,i=this,o=[i];do{for(t=o.reverse(),o=[];i=t.pop();)if(yield i,e=i.children)for(n=0,r=e.length;n<r;++n)o.push(e[n])}while(o.length)}};const tx=4294967296;function ex(t,e){var n,r;if(ix(e,t))return[e];for(n=0;n<t.length;++n)if(nx(e,t[n])&&ix(ax(t[n],e),t))return[t[n],e];for(n=0;n<t.length-1;++n)for(r=n+1;r<t.length;++r)if(nx(ax(t[n],t[r]),e)&&nx(ax(t[n],e),t[r])&&nx(ax(t[r],e),t[n])&&ix(sx(t[n],t[r],e),t))return[t[n],t[r],e];throw new Error}function nx(t,e){var n=t.r-e.r,r=e.x-t.x,i=e.y-t.y;return n<0||n*n<r*r+i*i}function rx(t,e){var n=t.r-e.r+1e-9*Math.max(t.r,e.r,1),r=e.x-t.x,i=e.y-t.y;return n>0&&n*n>r*r+i*i}function ix(t,e){for(var n=0;n<e.length;++n)if(!rx(t,e[n]))return!1;return!0}function ox(t){switch(t.length){case 1:return function(t){return{x:t.x,y:t.y,r:t.r}}(t[0]);case 2:return ax(t[0],t[1]);case 3:return sx(t[0],t[1],t[2])}}function ax(t,e){var n=t.x,r=t.y,i=t.r,o=e.x,a=e.y,s=e.r,l=o-n,u=a-r,c=s-i,h=Math.sqrt(l*l+u*u);return{x:(n+o+l/h*c)/2,y:(r+a+u/h*c)/2,r:(h+i+s)/2}}function sx(t,e,n){var r=t.x,i=t.y,o=t.r,a=e.x,s=e.y,l=e.r,u=n.x,c=n.y,h=n.r,d=r-a,f=r-u,p=i-s,g=i-c,v=l-o,m=h-o,y=r*r+i*i-o*o,b=y-a*a-s*s+l*l,E=y-u*u-c*c+h*h,_=f*p-d*g,x=(p*E-g*b)/(2*_)-r,w=(g*v-p*m)/_,O=(f*b-d*E)/(2*_)-i,T=(d*m-f*v)/_,S=w*w+T*T-1,M=2*(o+x*w+O*T),C=x*x+O*O-o*o,A=-(Math.abs(S)>1e-6?(M+Math.sqrt(M*M-4*S*C))/(2*S):C/M);return{x:r+x+w*A,y:i+O+T*A,r:A}}function lx(t,e,n){var r,i,o,a,s=t.x-e.x,l=t.y-e.y,u=s*s+l*l;u?(i=e.r+n.r,i*=i,a=t.r+n.r,i>(a*=a)?(r=(u+a-i)/(2*u),o=Math.sqrt(Math.max(0,a/u-r*r)),n.x=t.x-r*s-o*l,n.y=t.y-r*l+o*s):(r=(u+i-a)/(2*u),o=Math.sqrt(Math.max(0,i/u-r*r)),n.x=e.x+r*s-o*l,n.y=e.y+r*l+o*s)):(n.x=e.x+n.r,n.y=e.y)}function ux(t,e){var n=t.r+e.r-1e-6,r=e.x-t.x,i=e.y-t.y;return n>0&&n*n>r*r+i*i}function cx(t){var e=t._,n=t.next._,r=e.r+n.r,i=(e.x*n.r+n.x*e.r)/r,o=(e.y*n.r+n.y*e.r)/r;return i*i+o*o}function hx(t){this._=t,this.next=null,this.previous=null}function dx(t,e){if(!(o=(t=function(t){return"object"==typeof t&&"length"in t?t:Array.from(t)}(t)).length))return 0;var n,r,i,o,a,s,l,u,c,h,d;if((n=t[0]).x=0,n.y=0,!(o>1))return n.r;if(r=t[1],n.x=-r.r,r.x=n.r,r.y=0,!(o>2))return n.r+r.r;lx(r,n,i=t[2]),n=new hx(n),r=new hx(r),i=new hx(i),n.next=i.previous=r,r.next=n.previous=i,i.next=r.previous=n;t:for(l=3;l<o;++l){lx(n._,r._,i=t[l]),i=new hx(i),u=r.next,c=n.previous,h=r._.r,d=n._.r;do{if(h<=d){if(ux(u._,i._)){r=u,n.next=r,r.previous=n,--l;continue t}h+=u._.r,u=u.next}else{if(ux(c._,i._)){(n=c).next=r,r.previous=n,--l;continue t}d+=c._.r,c=c.previous}}while(u!==c.next);for(i.previous=n,i.next=r,n.next=r.previous=r=i,a=cx(n);(i=i.next)!==r;)(s=cx(i))<a&&(n=i,a=s);r=n.next}for(n=[r._],i=r;(i=i.next)!==r;)n.push(i._);for(i=function(t,e){for(var n,r,i=0,o=(t=function(t,e){let n,r,i=t.length;for(;i;)r=e()*i--|0,n=t[i],t[i]=t[r],t[r]=n;return t}(Array.from(t),e)).length,a=[];i<o;)n=t[i],r&&rx(r,n)?++i:(r=ox(a=ex(a,n)),i=0);return r}(n,e),l=0;l<o;++l)(n=t[l]).x-=i.x,n.y-=i.y;return i.r}function fx(t){return Math.sqrt(t.value)}function px(){var t=null,e=1,n=1,r=Q_;function i(i){const o=function(){let t=1;return()=>(t=(1664525*t+1013904223)%tx)/tx}();return i.x=e/2,i.y=n/2,t?i.eachBefore(gx(t)).eachAfter(vx(r,.5,o)).eachBefore(mx(1)):i.eachBefore(gx(fx)).eachAfter(vx(Q_,1,o)).eachAfter(vx(r,i.r/Math.min(e,n),o)).eachBefore(mx(Math.min(e,n)/(2*i.r))),i}return i.radius=function(e){return arguments.length?(t=$_(e),i):t},i.size=function(t){return arguments.length?(e=+t[0],n=+t[1],i):[e,n]},i.padding=function(t){return arguments.length?(r="function"==typeof t?t:J_(+t),i):r},i}function gx(t){return function(e){e.children||(e.r=Math.max(0,+t(e)||0))}}function vx(t,e,n){return function(r){if(i=r.children){var i,o,a,s=i.length,l=t(r)*e||0;if(l)for(o=0;o<s;++o)i[o].r+=l;if(a=dx(i,n),l)for(o=0;o<s;++o)i[o].r-=l;r.r=a+l}}}function mx(t){return function(e){var n=e.parent;e.r*=t,n&&(e.x=n.x+t*e.x,e.y=n.y+t*e.y)}}function yx(t){t.x0=Math.round(t.x0),t.y0=Math.round(t.y0),t.x1=Math.round(t.x1),t.y1=Math.round(t.y1)}function bx(t,e,n,r,i){for(var o,a=t.children,s=-1,l=a.length,u=t.value&&(r-e)/t.value;++s<l;)(o=a[s]).y0=n,o.y1=i,o.x0=e,o.x1=e+=o.value*u}function Ex(t,e){return t.parent===e.parent?1:2}function _x(t){var e=t.children;return e?e[0]:t.t}function xx(t){var e=t.children;return e?e[e.length-1]:t.t}function wx(t,e,n){var r=n/(e.i-t.i);e.c-=r,e.s+=n,t.c+=r,e.z+=n,e.m+=n}function Ox(t,e,n){return t.a.parent===e.parent?t.a:n}function Tx(t,e){this._=t,this.parent=null,this.children=null,this.A=null,this.a=this,this.z=0,this.m=0,this.c=0,this.s=0,this.t=null,this.i=e}function Sx(){var t=Ex,e=1,n=1,r=null;function i(i){var l=function(t){for(var e,n,r,i,o,a=new Tx(t,0),s=[a];e=s.pop();)if(r=e._.children)for(e.children=new Array(o=r.length),i=o-1;i>=0;--i)s.push(n=e.children[i]=new Tx(r[i],i)),n.parent=e;return(a.parent=new Tx(null,0)).children=[a],a}(i);if(l.eachAfter(o),l.parent.m=-l.z,l.eachBefore(a),r)i.eachBefore(s);else{var u=i,c=i,h=i;i.eachBefore((function(t){t.x<u.x&&(u=t),t.x>c.x&&(c=t),t.depth>h.depth&&(h=t)}));var d=u===c?1:t(u,c)/2,f=d-u.x,p=e/(c.x+d+f),g=n/(h.depth||1);i.eachBefore((function(t){t.x=(t.x+f)*p,t.y=t.depth*g}))}return i}function o(e){var n=e.children,r=e.parent.children,i=e.i?r[e.i-1]:null;if(n){!function(t){for(var e,n=0,r=0,i=t.children,o=i.length;--o>=0;)(e=i[o]).z+=n,e.m+=n,n+=e.s+(r+=e.c)}(e);var o=(n[0].z+n[n.length-1].z)/2;i?(e.z=i.z+t(e._,i._),e.m=e.z-o):e.z=o}else i&&(e.z=i.z+t(e._,i._));e.parent.A=function(e,n,r){if(n){for(var i,o=e,a=e,s=n,l=o.parent.children[0],u=o.m,c=a.m,h=s.m,d=l.m;s=xx(s),o=_x(o),s&&o;)l=_x(l),(a=xx(a)).a=e,(i=s.z+h-o.z-u+t(s._,o._))>0&&(wx(Ox(s,e,r),e,i),u+=i,c+=i),h+=s.m,u+=o.m,d+=l.m,c+=a.m;s&&!xx(a)&&(a.t=s,a.m+=h-c),o&&!_x(l)&&(l.t=o,l.m+=u-d,r=e)}return r}(e,i,e.parent.A||r[0])}function a(t){t._.x=t.z+t.parent.m,t.m+=t.parent.m}function s(t){t.x*=e,t.y=t.depth*n}return i.separation=function(e){return arguments.length?(t=e,i):t},i.size=function(t){return arguments.length?(r=!1,e=+t[0],n=+t[1],i):r?null:[e,n]},i.nodeSize=function(t){return arguments.length?(r=!0,e=+t[0],n=+t[1],i):r?[e,n]:null},i}function Mx(t,e,n,r,i){for(var o,a=t.children,s=-1,l=a.length,u=t.value&&(i-n)/t.value;++s<l;)(o=a[s]).x0=e,o.x1=r,o.y0=n,o.y1=n+=o.value*u}Tx.prototype=Object.create(X_.prototype);var Cx=function t(e){function n(t,n,r,i,o){!function(t,e,n,r,i,o){for(var a,s,l,u,c,h,d,f,p,g,v,m=[],y=e.children,b=0,E=0,_=y.length,x=e.value;b<_;){l=i-n,u=o-r;do{c=y[E++].value}while(!c&&E<_);for(h=d=c,v=c*c*(g=Math.max(u/l,l/u)/(x*t)),p=Math.max(d/v,v/h);E<_;++E){if(c+=s=y[E].value,s<h&&(h=s),s>d&&(d=s),v=c*c*g,(f=Math.max(d/v,v/h))>p){c-=s;break}p=f}m.push(a={value:c,dice:l<u,children:y.slice(b,E)}),a.dice?bx(a,n,r,i,x?r+=u*c/x:o):Mx(a,n,r,x?n+=l*c/x:i,o),x-=c,b=E}}(e,t,n,r,i,o)}return n.ratio=function(e){return t((e=+e)>1?e:1)},n}((1+Math.sqrt(5))/2);function Ax(t){return t}function Lx(t,e){var n=e.id,r=e.bbox,i=null==e.properties?{}:e.properties,o=Dx(t,e);return null==n&&null==r?{type:"Feature",properties:i,geometry:o}:null==r?{type:"Feature",id:n,properties:i,geometry:o}:{type:"Feature",id:n,bbox:r,properties:i,geometry:o}}function Dx(t,e){var n=function(t){if(null==t)return Ax;var e,n,r=t.scale[0],i=t.scale[1],o=t.translate[0],a=t.translate[1];return function(t,s){s||(e=n=0);var l=2,u=t.length,c=new Array(u);for(c[0]=(e+=t[0])*r+o,c[1]=(n+=t[1])*i+a;l<u;)c[l]=t[l],++l;return c}}(t.transform),r=t.arcs;function i(t,e){e.length&&e.pop();for(var i=r[t<0?~t:t],o=0,a=i.length;o<a;++o)e.push(n(i[o],o));t<0&&function(t,e){for(var n,r=t.length,i=r-e;i<--r;)n=t[i],t[i++]=t[r],t[r]=n}(e,a)}function o(t){return n(t)}function a(t){for(var e=[],n=0,r=t.length;n<r;++n)i(t[n],e);return e.length<2&&e.push(e[0]),e}function s(t){for(var e=a(t);e.length<4;)e.push(e[0]);return e}function l(t){return t.map(s)}return function t(e){var n,r=e.type;switch(r){case"GeometryCollection":return{type:r,geometries:e.geometries.map(t)};case"Point":n=o(e.coordinates);break;case"MultiPoint":n=e.coordinates.map(o);break;case"LineString":n=a(e.arcs);break;case"MultiLineString":n=e.arcs.map(a);break;case"Polygon":n=l(e.arcs);break;case"MultiPolygon":n=e.arcs.map(l);break;default:return null}return{type:r,coordinates:n}}(e)}function kx(t,e){var n={},r={},i={},o=[],a=-1;function s(t,e){for(var r in t){var i=t[r];delete e[i.start],delete i.start,delete i.end,i.forEach((function(t){n[t<0?~t:t]=1})),o.push(i)}}return e.forEach((function(n,r){var i,o=t.arcs[n<0?~n:n];o.length<3&&!o[1][0]&&!o[1][1]&&(i=e[++a],e[a]=n,e[r]=i)})),e.forEach((function(e){var n,o,a=function(e){var n,r=t.arcs[e<0?~e:e],i=r[0];t.transform?(n=[0,0],r.forEach((function(t){n[0]+=t[0],n[1]+=t[1]}))):n=r[r.length-1];return e<0?[n,i]:[i,n]}(e),s=a[0],l=a[1];if(n=i[s])if(delete i[n.end],n.push(e),n.end=l,o=r[l]){delete r[o.start];var u=o===n?n:n.concat(o);r[u.start=n.start]=i[u.end=o.end]=u}else r[n.start]=i[n.end]=n;else if(n=r[l])if(delete r[n.start],n.unshift(e),n.start=s,o=i[s]){delete i[o.end];var c=o===n?n:o.concat(n);r[c.start=o.start]=i[c.end=n.end]=c}else r[n.start]=i[n.end]=n;else r[(n=[e]).start=s]=i[n.end=l]=n})),s(i,r),s(r,i),e.forEach((function(t){n[t<0?~t:t]||o.push([t])})),o}function Rx(t,e){var n={},r=[],i=[];function o(t){t.forEach((function(e){e.forEach((function(e){(n[e=e<0?~e:e]||(n[e]=[])).push(t)}))})),r.push(t)}function a(e){return function(t){for(var e,n=-1,r=t.length,i=t[r-1],o=0;++n<r;)e=i,i=t[n],o+=e[0]*i[1]-e[1]*i[0];return Math.abs(o)}(Dx(t,{type:"Polygon",arcs:[e]}).coordinates[0])}return e.forEach((function t(e){switch(e.type){case"GeometryCollection":e.geometries.forEach(t);break;case"Polygon":o(e.arcs);break;case"MultiPolygon":e.arcs.forEach(o)}})),r.forEach((function(t){if(!t._){var e=[],r=[t];for(t._=1,i.push(e);t=r.pop();)e.push(t),t.forEach((function(t){t.forEach((function(t){n[t<0?~t:t].forEach((function(t){t._||(t._=1,r.push(t))}))}))}))}})),r.forEach((function(t){delete t._})),{type:"MultiPolygon",arcs:i.map((function(e){var r,i=[];if(e.forEach((function(t){t.forEach((function(t){t.forEach((function(t){n[t<0?~t:t].length<2&&i.push(t)}))}))})),(r=(i=kx(t,i)).length)>1)for(var o,s,l=1,u=a(i[0]);l<r;++l)(o=a(i[l]))>u&&(s=i[0],i[0]=i[l],i[l]=s,u=o);return i})).filter((function(t){return t.length>0}))}}var Ix=function(t){function e(){var e=null!==t&&t.apply(this,arguments)||this;return e.type="geo",e.renderType=I.SVG,e}return n(e,t),e.prototype.render=function(){var t=this.getComponentContainer({withinChartClip:!0}),e=Hg.getSVGElementSize(t,{useAttrs:!0}),n=e.width,r=e.height;if(!(n<1||r<1)){var i=this.getProjection(),o=Za(this.getOptions(),"geoData"),a=this.model.getCombinedData(),s={},l={};Object.keys(a).forEach((function(t){"number"==typeof a[t].value?s[t]=a[t]:l[t]=a[t]}));var u,c,h=function(t){return Dx(t,Rx.apply(this,arguments))}(o,Object.values(l)),d=(u=o,"string"==typeof(c={type:"GeometryCollection",geometries:Object.values(s)})&&(c=u.objects[c]),"GeometryCollection"===c.type?{type:"FeatureCollection",features:c.geometries.map((function(t){return Lx(u,t)}))}:Lx(u,c)),f=i.fitSize([n,r],d),p=function(t,e){let n,r,i=3,o=4.5;function a(t){return t&&("function"==typeof o&&r.pointRadius(+o.apply(this,arguments)),Ub(t,n(r))),r.result()}return a.area=function(t){return Ub(t,n(mE)),mE.result()},a.measure=function(t){return Ub(t,n(r_)),r_.result()},a.bounds=function(t){return Ub(t,n(SE)),SE.result()},a.centroid=function(t){return Ub(t,n(HE)),HE.result()},a.projection=function(e){return arguments.length?(n=null==e?(t=null,pE):(t=e).stream,a):t},a.context=function(t){return arguments.length?(r=null==t?(e=null,new c_(i)):new $E(e=t),"function"!=typeof o&&r.pointRadius(o),a):e},a.pointRadius=function(t){return arguments.length?(o="function"==typeof t?t:(r.pointRadius(+t),+t),a):o},a.digits=function(t){if(!arguments.length)return i;if(null==t)i=null;else{const e=Math.floor(t);if(!(e>=0))throw new RangeError("invalid digits: "+t);i=e}return null===e&&(r=new c_(i)),a},a.projection(t).digits(i).context(e)}().projection(f);Hg.appendOrSelect(t,"g.geo").selectAll("path").data(d.features).join("path").attr("d",p);var g=this.services.domUtils.generateElementIDString("geo-pattern-stripes"),v=Hg.appendOrSelect(t,"defs");Hg.appendOrSelect(v,"pattern").attr("id",g).attr("width",5).attr("height",10).attr("patternUnits","userSpaceOnUse").attr("patternTransform","rotate(45)").append("path").classed("pattern-fill",!0).attr("d",Dd()([[0,0],[0,10]]));var m=Hg.appendOrSelect(t,"g.missing-data");Hg.appendOrSelect(m,"path").datum(h).attr("d",p).style("fill","url(#"+g+")")}},e.prototype.getProjection=function(){var t=null;switch(Za(this.getOptions(),"thematic","projection")){case ct.geoEqualEarth:t=N_();break;case ct.geoAlbers:t=O_().parallels([29.5,45.5]).scale(1070).translate([480,250]).rotate([96,0]).center([-.6,38.7]);break;case ct.geoConicEqualArea:t=O_();break;case ct.geoConicEquidistant:t=x_(A_).scale(131.154).center([0,13.9389]);break;case ct.geoEquirectangular:t=C_();break;case ct.geoMercator:t=S_();break;case ct.geoNaturalEarth1:t=B_();break;default:throw new Error("Projection is not supported.")}return t},e}(Kg),Px=function(t){function e(){var e=null!==t&&t.apply(this,arguments)||this;return e.type="area",e.renderType=I.SVG,e.gradient_id="gradient-id-"+Math.floor(99999999999*Math.random()),e.handleLegendOnHover=function(t){var n=t.detail.hoveredElement;e.parent.selectAll("path.area").transition("legend-hover-area").call((function(t){return e.services.transitions.setupTransition({transition:t,name:"legend-hover-area"})})).attr("opacity",(function(t){return t.name!==n.datum().name?vt.opacity.unselected:vt.opacity.selected}))},e.handleLegendMouseOut=function(t){e.parent.selectAll("path.area").transition("legend-mouseout-area").call((function(t){return e.services.transitions.setupTransition({transition:t,name:"legend-mouseout-area"})})).attr("opacity",vt.opacity.selected)},e}return n(e,t),e.prototype.init=function(){var t=this.services.events;t.addEventListener(ht.Legend.ITEM_HOVER,this.handleLegendOnHover),t.addEventListener(ht.Legend.ITEM_MOUSEOUT,this.handleLegendMouseOut)},e.prototype.render=function(t){var e=this;void 0===t&&(t=!0);var n=this.getComponentContainer({withinChartClip:!0}),r=this.getOptions(),i=[0,0],o=this.services.cartesianScales,a=o.getOrientation(),s=kd().curve(this.services.curves.getD3Curve()).defined((function(t,e){var n=t[o.getRangeIdentifier()];return null!=n})),l=this.model.getGroupedData(this.configs.groups),u=Za(r,"bounds"),c=u&&l&&1===l.length;!c&&u&&console.warn("Bounds can only be shown when having 1 single datagroup, you've supplied "+l.length);var h=0,d=function(t,e){!1===Za(r,"axes",t,"includeZero")&&e[0]>0&&e[1]>0&&(h=e[0])},f=function(t,e){return c?o.getBoundedScaledValues(t,e)[0]:o.getRangeValue(h)},p=function(t,e){return c?o.getBoundedScaledValues(t,e)[1]:o.getRangeValue(t,e)};a===H.VERTICAL?(i=o.getMainYScale().domain(),d(o.getMainYAxisPosition(),i),s.x((function(t,e){return o.getDomainValue(t,e)})).y0((function(t,e){return f(t,e)})).y1((function(t,e){return p(t,e)}))):(i=o.getMainXScale().domain(),d(o.getMainXAxisPosition(),i),s.x0((function(t,e){return f(t,e)})).x1((function(t,e){return p(t,e)})).y((function(t,e){return o.getDomainValue(t,e)})));var g=Za(r,"color","gradient","enabled"),v=l&&1===l.length&&g;l.length>1&&g&&console.error("Gradients can only be enabled when having 1 single dataset");var m=n.selectAll("path.area").data(l,(function(t){return t.name})),y=Ba(this.services.domUtils.getMainContainer());if(m.exit().attr("opacity",0).remove(),l.length){if(v){var b=y.select("path."+this.model.getColorClassName({classNameTypes:[N.STROKE],dataGroupName:l[0].name})).node(),E=void 0;if(b)E=getComputedStyle(b,null).getPropertyValue("stroke");else{var _=Za(this.model.getOptions(),"color","scale");if(null!==_)E=_[Object.keys(_)[0]]}Fg.appendOrUpdateLinearGradient({svg:this.parent,id:this.services.domUtils.generateElementIDString(l[0].name.replace(" ","")+"_"+this.gradient_id),x1:"0%",x2:"0%",y1:"0%",y2:"100%",stops:Fg.getStops(i,E)})}else this.parent.selectAll("defs linearGradient").empty()||this.parent.selectAll("defs linearGradient").each((function(){this.parentNode.remove()}));var x=this,w=m.enter().append("path");v?w.merge(m).style("fill",(function(t){return"url(#"+e.services.domUtils.generateElementIDString(t.name.replace(" ","")+"_"+e.gradient_id)+")"})).attr("class","area").attr("class",(function(t){return e.model.getColorClassName({classNameTypes:[N.FILL],dataGroupName:t.name,originalClassName:"area"})})).attr("d",(function(t){var e=t.data;return s(e)})):(w.attr("opacity",0).merge(m).attr("class","area").attr("class",(function(t){return e.model.getColorClassName({classNameTypes:[N.FILL,N.STROKE],dataGroupName:t.name,originalClassName:"area"})})).style("fill",(function(t){return x.model.getFillColor(t.name)})).transition().call((function(n){return e.services.transitions.setupTransition({transition:n,name:"area-update-enter",animate:t})})).attr("opacity",c?1:vt.opacity.selected).attr("d",(function(t){var e=t.data;return s(e)})),c&&w.attr("fill-opacity",vt.opacity.selected).style("stroke",(function(t){return x.model.getStrokeColor(t.name)})).style("stroke-dasharray","2, 2").attr("stroke-width","0.7px"))}},e.prototype.destroy=function(){var t=this.services.events;t.removeEventListener(ht.Legend.ITEM_HOVER,this.handleLegendOnHover),t.removeEventListener(ht.Legend.ITEM_MOUSEOUT,this.handleLegendMouseOut)},e}(Kg),Nx=function(t){function e(){var e=null!==t&&t.apply(this,arguments)||this;return e.type="area-stacked",e.renderType=I.SVG,e.handleLegendOnHover=function(t){var n=t.detail.hoveredElement,r=e.getOptions().data.groupMapsTo;e.parent.selectAll("path.area").transition("legend-hover-area").call((function(t){return e.services.transitions.setupTransition({transition:t,name:"legend-hover-area"})})).attr("opacity",(function(t){return Za(t,0,r)!==n.datum().name?vt.opacity.unselected:vt.opacity.selected}))},e.handleLegendMouseOut=function(){e.parent.selectAll("path.area").transition("legend-mouseout-area").call((function(t){return e.services.transitions.setupTransition({transition:t,name:"legend-mouseout-area"})})).attr("opacity",vt.opacity.selected)},e}return n(e,t),e.prototype.init=function(){var t=this.services.events;t.addEventListener(ht.Legend.ITEM_HOVER,this.handleLegendOnHover),t.addEventListener(ht.Legend.ITEM_MOUSEOUT,this.handleLegendMouseOut)},e.prototype.render=function(t){var e=this;void 0===t&&(t=!0);var n=this.getComponentContainer({withinChartClip:!0}),i=this,o=this.getOptions(),a=o.data.groupMapsTo,s=Object.keys(o.axes).some((function(t){return o.axes[t].percentage})),l=this.model.getStackedData({percentage:s,groups:this.configs.groups}),u=Za(l,0,0),c=this.services.cartesianScales.getDomainAxisPosition({firstDatum:u}),h=this.services.cartesianScales.getRangeAxisPosition({firstDatum:u}),d=this.services.cartesianScales.getScaleByPosition(h),f=n.selectAll("path.area").data(l,(function(t){return Za(t,0,a)}));this.areaGenerator=kd().x((function(t,n){return e.services.cartesianScales.getValueThroughAxisPosition(c,t.data.sharedStackKey,n)})).y0((function(t){return d(t[0])})).y1((function(t){return d(t[1])})).curve(this.services.curves.getD3Curve()),f.exit().attr("opacity",0).remove(),f.enter().append("path").attr("opacity",0).merge(f).data(l,(function(t){return Za(t,0,a)})).attr("class","area").attr("class",(function(t){return e.model.getColorClassName({classNameTypes:[N.FILL],dataGroupName:Za(t,0,a),originalClassName:"area"})})).style("fill",(function(t){return i.model.getFillColor(Za(t,0,a))})).attr("role",r.GRAPHICS_SYMBOL).attr("aria-roledescription","area").attr("aria-label",(function(t){return Za(t,0,a)})).transition().call((function(n){return e.services.transitions.setupTransition({transition:n,name:"area-update-enter",animate:t})})).attr("opacity",vt.opacity.selected).attr("d",this.areaGenerator)},e}(Kg),Ux=function(t){function e(){return null!==t&&t.apply(this,arguments)||this}return n(e,t),e.prototype.getBarWidth=function(t){var e=this.getOptions();if(e.bars.width)return e.bars.width;var n=this.model.getDisplayData().length,r=this.services.cartesianScales.getMainXScale(),i=Hg.getSVGElementSize(this.parent,{useAttrs:!0}).width;if(!r.step){var o=Za(e,"bars","spacingFactor");return Math.min(e.bars.maxWidth,i*o/n)}return Math.min(e.bars.maxWidth,r.step()/2)},e.prototype.isOutsideZoomedDomain=function(t,e){if(this.model.getDisplayData().length<=1)return!1;var n=this.model.get("zoomDomain");if(void 0!==n){var r=this.services.cartesianScales.getDomainScale();return t<r(n[0])||e>r(n[1])}return!1},e}(Kg),Bx=function(t){function e(){var e=null!==t&&t.apply(this,arguments)||this;return e.type="simple-bar",e.renderType=I.SVG,e.handleLegendOnHover=function(t){var n=t.detail.hoveredElement,r=e.getOptions().data.groupMapsTo;e.parent.selectAll("path.bar").transition("legend-hover-simple-bar").call((function(t){return e.services.transitions.setupTransition({transition:t,name:"legend-hover-simple-bar"})})).attr("opacity",(function(t){return t[r]!==n.datum().name?.3:1}))},e.handleLegendMouseOut=function(t){e.parent.selectAll("path.bar").transition("legend-mouseout-simple-bar").call((function(t){return e.services.transitions.setupTransition({transition:t,name:"legend-mouseout-simple-bar"})})).attr("opacity",1)},e}return n(e,t),e.prototype.init=function(){var t=this.services.events;t.addEventListener(ht.Legend.ITEM_HOVER,this.handleLegendOnHover),t.addEventListener(ht.Legend.ITEM_MOUSEOUT,this.handleLegendMouseOut)},e.prototype.render=function(t){var e=this,n=this.getOptions().data.groupMapsTo,i=this.getComponentContainer({withinChartClip:!0}),o=this.model.getDisplayData(this.configs.groups),a=this.services.cartesianScales.getOrientation(),s=i.selectAll("path.bar").data(o,(function(t){return t[n]}));s.exit().attr("opacity",0).remove(),s.enter().append("path").attr("opacity",0).merge(s).classed("bar",!0).attr("width",this.getBarWidth.bind(this)).transition().call((function(n){return e.services.transitions.setupTransition({transition:n,name:"bar-update-enter",animate:t})})).attr("class",(function(t){return e.model.getColorClassName({classNameTypes:[N.FILL],dataGroupName:t[n],originalClassName:"bar"})})).style("fill",(function(t){return e.model.getFillColor(t[n])})).attr("d",(function(t,n){var r,i,o=e.services.cartesianScales.getRangeIdentifier(),s=e.getBarWidth(),l=t[o],u=e.services.cartesianScales.getDomainValue(t,n)-s/2,c=u+s;if(Array.isArray(l)&&2===l.length)r=e.services.cartesianScales.getRangeValue(l[0]),i=e.services.cartesianScales.getRangeValue(l[1],n);else{var h=e.services.cartesianScales.getRangeScale().domain()[0];r=e.services.cartesianScales.getRangeValue(Math.max(0,h)),i=e.services.cartesianScales.getRangeValue(t,n)}var d=Math.abs(i-r);if(0!==d&&d<2&&(i=l>0&&a===H.VERTICAL||l<0&&a===H.HORIZONTAL?r-2:r+2),!e.isOutsideZoomedDomain(u,c))return $a({x0:u,x1:c,y0:r,y1:i},a)})).attr("opacity",1).attr("role",r.GRAPHICS_SYMBOL).attr("aria-roledescription","bar").attr("aria-label",(function(t){return t.value})),this.addEventListeners()},e.prototype.addEventListeners=function(){var t=this;this.parent.selectAll("path.bar").on("mouseover",(function(e,n){var r=Ba(this);r.classed("hovered",!0),t.services.events.dispatchEvent(ht.Bar.BAR_MOUSEOVER,{event:e,element:r,datum:n}),t.services.events.dispatchEvent(ht.Tooltip.SHOW,{event:e,hoveredElement:r,data:[n]})})).on("mousemove",(function(e,n){t.services.events.dispatchEvent(ht.Bar.BAR_MOUSEMOVE,{event:e,element:Ba(this),datum:n}),t.services.events.dispatchEvent(ht.Tooltip.MOVE,{event:e})})).on("click",(function(e,n){t.services.events.dispatchEvent(ht.Bar.BAR_CLICK,{event:e,element:Ba(this),datum:n})})).on("mouseout",(function(e,n){var r=Ba(this);r.classed("hovered",!1),t.services.events.dispatchEvent(ht.Bar.BAR_MOUSEOUT,{event:e,element:r,datum:n}),t.services.events.dispatchEvent(ht.Tooltip.HIDE,{hoveredElement:r})}))},e.prototype.destroy=function(){this.parent.selectAll("path.bar").on("mouseover",null).on("mousemove",null).on("mouseout",null);var t=this.services.events;t.removeEventListener(ht.Legend.ITEM_HOVER,this.handleLegendOnHover),t.removeEventListener(ht.Legend.ITEM_MOUSEOUT,this.handleLegendMouseOut)},e}(Ux),Vx=function(t){function e(){var e=null!==t&&t.apply(this,arguments)||this;return e.type="grouped-bar",e.renderType=I.SVG,e.padding=5,e.defaultStepFactor=70,e.handleLegendOnHover=function(t){var n=t.detail.hoveredElement,r=e.getOptions().data.groupMapsTo;e.parent.selectAll("path.bar").transition("legend-hover-bar").call((function(t){return e.services.transitions.setupTransition({transition:t,name:"legend-hover-bar"})})).attr("opacity",(function(t){return t[r]!==n.datum().name?.3:1}))},e.handleLegendMouseOut=function(t){e.parent.selectAll("path.bar").transition("legend-mouseout-bar").call((function(t){return e.services.transitions.setupTransition({transition:t,name:"legend-mouseout-bar"})})).attr("opacity",1)},e}return n(e,t),e.prototype.init=function(){var t=this.services.events;t.addEventListener(ht.Legend.ITEM_HOVER,this.handleLegendOnHover),t.addEventListener(ht.Legend.ITEM_MOUSEOUT,this.handleLegendMouseOut)},e.prototype.render=function(t){var e=this,n=this.model.getDisplayData(this.configs.groups),i=this.getOptions().data.groupMapsTo;this.setGroupScale();var o=this.getComponentContainer({withinChartClip:!0}),a=Ga(n.map((function(t){var n=e.services.cartesianScales.getDomainIdentifier(t);return t[n]&&"function"==typeof t[n].toString?t[n].toString():t[n]}))),s=o.selectAll("g.bars").data(a,(function(t){return t}));s.exit().attr("opacity",0).remove();var l=s.enter().append("g").classed("bars",!0).attr("role",r.GROUP).attr("data-name","bars").merge(s);l.transition().call((function(n){return e.services.transitions.setupTransition({transition:n,name:"bar-group-update-enter",animate:t})})).attr("transform",(function(t,n){var r=e.services.cartesianScales.getDomainValue(t,n)-e.getGroupWidth()/2;return e.services.cartesianScales.getOrientation()===H.VERTICAL?"translate("+r+", 0)":"translate(0, "+r+")"}));var u=l.selectAll("path.bar").data((function(t){return e.getDataCorrespondingToLabel(t)}),(function(t){return t[i]}));u.exit().attr("opacity",0).remove(),u.enter().append("path").attr("opacity",0).merge(u).classed("bar",!0).transition().call((function(n){return e.services.transitions.setupTransition({transition:n,name:"bar-update-enter",animate:t})})).attr("class",(function(t){return e.model.getColorClassName({classNameTypes:[N.FILL],dataGroupName:t[i],originalClassName:"bar"})})).style("fill",(function(t){return e.model.getFillColor(t[i])})).attr("d",(function(t,n){var r=e.groupScale(t[i]),o=e.getBarWidth(),a=r,s=r+o,l=e.services.cartesianScales.getRangeAxisPosition({datum:t}),u=e.services.cartesianScales.getValueThroughAxisPosition(l,0),c=e.services.cartesianScales.getRangeValue(t),h=e.services.cartesianScales.getDomainValue(t,n)-o/2,d=h+o;if(!e.isOutsideZoomedDomain(h,d))return $a({x0:a,x1:s,y0:u,y1:c},e.services.cartesianScales.getOrientation())})).attr("opacity",1).attr("role",r.GRAPHICS_SYMBOL).attr("aria-roledescription","bar").attr("aria-label",(function(t){return t.value})),this.addEventListeners()},e.prototype.addEventListeners=function(){var t=this;this.parent.selectAll("path.bar").on("mouseover",(function(e,n){var r=Ba(this);r.classed("hovered",!0),t.services.events.dispatchEvent(ht.Bar.BAR_MOUSEOVER,{event:e,element:r,datum:n}),t.services.events.dispatchEvent(ht.Tooltip.SHOW,{event:e,hoveredElement:r,data:[n]})})).on("mousemove",(function(e,n){var r=Ba(this);t.services.events.dispatchEvent(ht.Bar.BAR_MOUSEMOVE,{event:e,element:r,datum:n}),t.services.events.dispatchEvent(ht.Tooltip.MOVE,{event:e})})).on("click",(function(e,n){t.services.events.dispatchEvent(ht.Bar.BAR_CLICK,{event:e,element:Ba(this),datum:n})})).on("mouseout",(function(e,n){var r=Ba(this);r.classed("hovered",!1),t.services.events.dispatchEvent(ht.Bar.BAR_MOUSEOUT,{event:e,element:r,datum:n}),t.services.events.dispatchEvent(ht.Tooltip.HIDE,{hoveredElement:r})}))},e.prototype.destroy=function(){this.parent.selectAll("path.bar").on("mouseover",null).on("mousemove",null).on("mouseout",null);var t=this.services.events;t.removeEventListener(ht.Legend.ITEM_HOVER,this.handleLegendOnHover),t.removeEventListener(ht.Legend.ITEM_MOUSEOUT,this.handleLegendMouseOut)},e.prototype.getDataCorrespondingToLabel=function(t){var e=this;return this.model.getDisplayData(this.configs.groups).filter((function(n){return n[e.services.cartesianScales.getDomainIdentifier(n)].toString()===t}))},e.prototype.getGroupWidth=function(){var t=this.model.getGroupedData(this.configs.groups),e=this.getTotalGroupPadding();return this.getBarWidth()*t.length+e},e.prototype.getDomainScaleStep=function(){var t=this.services.cartesianScales.getDomainScale(),e=this.model.getGroupedData(this.configs.groups),n=this.defaultStepFactor;if("function"==typeof t.step)n=t.step();else if(e.length>0){var r=e.find((function(t){var e;return(null===(e=t.data)||void 0===e?void 0:e.length)>1}));if(r){var i=this.services.cartesianScales.getDomainIdentifier(r.data[0]);n=Math.abs(t(r.data[1][i])-t(r.data[0][i]))}}return n},e.prototype.getTotalGroupPadding=function(){var t=this.model.getGroupedData(this.configs.groups);return 1===t.length?0:Math.min(5,this.getDomainScaleStep()/this.defaultStepFactor*5)*(t.length-1)},e.prototype.getBarWidth=function(){var t=this.getOptions(),e=Za(t,"bars","width"),n=Za(t,"bars","maxWidth");if(null!==e&&(null===n||e<=n))return e;var r=this.model.getGroupedData(this.configs.groups).length,i=this.getTotalGroupPadding();return Math.min(n,(this.getDomainScaleStep()-i)/r)},e.prototype.setGroupScale=function(){var t=this.model.getActiveDataGroupNames(this.configs.groups);this.groupScale=_l().domain(t).rangeRound([0,this.getGroupWidth()])},e}(Ux),Hx=function(t){function e(){var e=null!==t&&t.apply(this,arguments)||this;return e.type="stacked-bar",e.renderType=I.SVG,e.handleLegendOnHover=function(t){var n=t.detail.hoveredElement,r=e.model.getOptions().data.groupMapsTo;e.parent.selectAll("path.bar").transition("legend-hover-bar").call((function(t){return e.services.transitions.setupTransition({transition:t,name:"legend-hover-bar"})})).attr("opacity",(function(t){return t[r]!==n.datum().name?.3:1}))},e.handleLegendMouseOut=function(t){e.parent.selectAll("path.bar").transition("legend-mouseout-bar").call((function(t){return e.services.transitions.setupTransition({transition:t,name:"legend-mouseout-bar"})})).attr("opacity",1)},e}return n(e,t),e.prototype.init=function(){var t=this.services.events;t.addEventListener(ht.Legend.ITEM_HOVER,this.handleLegendOnHover),t.addEventListener(ht.Legend.ITEM_MOUSEOUT,this.handleLegendMouseOut)},e.prototype.render=function(t){var e=this,n=this.getComponentContainer({withinChartClip:!0}),i=this.getOptions(),o=i.data.groupMapsTo,a=this.model.getStackedData({groups:this.configs.groups,divergent:!0}),s=this.model.getActiveDataGroupNames(),l=n.selectAll("g.bars").data(a,(function(t){return Za(t,0,o)}));l.exit().attr("opacity",0).remove(),l.enter().append("g").classed("bars",!0).attr("role",r.GROUP).attr("data-name","bars");var u=n.selectAll("g.bars").selectAll("path.bar").data((function(t){return t}),(function(t){return t.data.sharedStackKey}));u.exit().remove(),u.enter().append("path").merge(u).classed("bar",!0).transition().call((function(n){return e.services.transitions.setupTransition({transition:n,name:"bar-update-enter",animate:t})})).attr("class",(function(t){return e.model.getColorClassName({classNameTypes:[N.FILL],dataGroupName:t[o],originalClassName:"bar"})})).style("fill",(function(t){return e.model.getFillColor(t[o])})).attr("d",(function(t,n){var r=t.data.sharedStackKey,o=e.getBarWidth(),a=e.services.cartesianScales.getDomainValue(r,n)-o/2,l=a+o,u=e.services.cartesianScales.getRangeValue(t[0],n),c=e.services.cartesianScales.getRangeValue(t[1],n);if(!e.isOutsideZoomedDomain(a,l)){if(Math.abs(c-u)>0&&Math.abs(c-u)>i.bars.dividerSize){var h=t[0]<0&&t[1]<=0;h&&s.length>1?e.services.cartesianScales.getOrientation()===H.VERTICAL?c+=0===t[1]?2:1:c-=1:h||(e.services.cartesianScales.getOrientation()===H.VERTICAL?c+=1:c-=1)}return $a({x0:a,x1:l,y0:u,y1:c},e.services.cartesianScales.getOrientation())}})).attr("opacity",1).attr("role",r.GRAPHICS_SYMBOL).attr("aria-roledescription","bar").attr("aria-label",(function(t){return t[1]-t[0]})),this.addEventListeners()},e.prototype.addEventListeners=function(){var t=this.getOptions().data.groupMapsTo,e=this;this.parent.selectAll("path.bar").on("mouseover",(function(n,r){var i,o=Ba(this);o.classed("hovered",!0),e.services.events.dispatchEvent(ht.Bar.BAR_MOUSEOVER,{event:n,element:o,datum:r});var a=e.model.getDisplayData(e.configs.groups).find((function(n){var i=e.services.cartesianScales.getDomainIdentifier(n);return n[e.services.cartesianScales.getRangeIdentifier(n)]===r.data[r[t]]&&n[i].toString()===r.data.sharedStackKey&&n[t]===r[t]}));if(void 0===a){var s=e.services.cartesianScales.getDomainIdentifier(),l=e.services.cartesianScales.getRangeIdentifier();(i={})[s]=r.data.sharedStackKey,i[l]=r.data[r[t]],i[t]=r[t],a=i}e.services.events.dispatchEvent(ht.Tooltip.SHOW,{event:n,hoveredElement:o,data:[a]})})).on("mousemove",(function(t,n){var r=Ba(this);e.services.events.dispatchEvent(ht.Bar.BAR_MOUSEMOVE,{event:t,element:r,datum:n}),e.services.events.dispatchEvent(ht.Tooltip.MOVE,{event:t})})).on("click",(function(t,n){e.services.events.dispatchEvent(ht.Bar.BAR_CLICK,{event:t,element:Ba(this),datum:n})})).on("mouseout",(function(t,n){var r=Ba(this);r.classed("hovered",!1),e.services.events.dispatchEvent(ht.Bar.BAR_MOUSEOUT,{event:t,element:r,datum:n}),e.services.events.dispatchEvent(ht.Tooltip.HIDE,{hoveredElement:r})}))},e.prototype.getBarWidth=function(){var t=this.getOptions();if(Za(t,"bars","width"))return t.bars.width;var e=this.services.cartesianScales.getMainXScale(),n=Hg.getSVGElementSize(this.parent,{useAttrs:!0}).width,r=this.model.getStackKeys().length,i=Za(t,"bars","spacingFactor");return e.step?Math.min(t.bars.maxWidth,e.step()/2):Math.min(t.bars.maxWidth,n*i/r)},e.prototype.destroy=function(){this.parent.selectAll("path.bar").on("mouseover",null).on("mousemove",null).on("mouseout",null);var t=this.services.events;t.removeEventListener(ht.Legend.ITEM_HOVER,this.handleLegendOnHover),t.removeEventListener(ht.Legend.ITEM_MOUSEOUT,this.handleLegendMouseOut)},e}(Ux),Gx=function(t){function e(){var e=null!==t&&t.apply(this,arguments)||this;return e.type="boxplot",e.renderType=I.SVG,e}return n(e,t),e.prototype.render=function(t){var e=this,n=this.getComponentContainer({withinChartClip:!0}),i=this.getOptions().data.groupMapsTo,o=this.model.getDataGroupNames(),a=this.services.cartesianScales.getMainXScale(),s=this.services.cartesianScales.getMainYScale(),l=a.range(),u=l[0],c=l[1],h=s.range(),d=c-u,f=h[0]-h[1];if(0!==d){var p=this.services.cartesianScales,g=p.getOrientation(),v=g===H.VERTICAL,m=Ka((function(t,n){return e.services.cartesianScales.getDomainValue(t,n)}),(function(t,n){return e.services.cartesianScales.getRangeValue(t,n)}),g),y=m[0],b=m[1],E=Math.floor((v?d:f)/o.length),_=Math.min(E/2,16),x=this.model.getBoxplotData(),w=n.selectAll(".box-group").data(x);w.exit().remove();var O=w.enter().append("g").attr("class","box-group"),T=w.merge(O);O.append("path").merge(w.select("path.vertical-line.start")).attr("class",(function(){return e.model.getColorClassName({classNameTypes:[N.STROKE],originalClassName:"vertical-line start"})})).attr("stroke-width",_t.strokeWidth.default).attr("fill","none").transition().call((function(n){return e.services.transitions.setupTransition({transition:n,name:"boxplot-update-verticalstartline",animate:t})})).attr("d",(function(t){var e=p.getDomainValue(t[i]),n=e,r=p.getRangeValue(t.whiskers.min),o=p.getRangeValue(t.quartiles.q_25);return $a({x0:e,x1:n,y0:r,y1:o},g)})),O.append("path").merge(w.select("path.vertical-line.end")).attr("class",(function(){return e.model.getColorClassName({classNameTypes:[N.STROKE],originalClassName:"vertical-line end"})})).attr("stroke-width",_t.strokeWidth.default).attr("fill","none").transition().call((function(n){return e.services.transitions.setupTransition({transition:n,name:"boxplot-update-verticalendline",animate:t})})).attr("d",(function(t){var e=p.getDomainValue(t[i]),n=e,r=p.getRangeValue(t.whiskers.max),o=p.getRangeValue(t.quartiles.q_75);return $a({x0:e,x1:n,y0:r,y1:o},g)})),O.append("path").merge(w.select("path.box")).attr("class",(function(){return e.model.getColorClassName({classNameTypes:[N.FILL,N.STROKE],originalClassName:"box"})})).attr("fill-opacity",_t.box.opacity.default).attr("stroke-width",_t.strokeWidth.default).attr("role",r.GRAPHICS_SYMBOL).attr("aria-roledescription","box").attr("aria-label",(function(t){return t[i]})).transition().call((function(n){return e.services.transitions.setupTransition({transition:n,name:"boxplot-update-quartiles",animate:t})})).attr("d",(function(t){var e=p.getDomainValue(t[i])-_/2,n=e+_,r=p.getRangeValue(Math[v?"max":"min"](t.quartiles.q_75,t.quartiles.q_25)),o=r+Math.abs(p.getRangeValue(t.quartiles.q_75)-p.getRangeValue(t.quartiles.q_25));return $a({x0:e,x1:n,y0:r,y1:o},g)})),O.append("path").merge(w.select("path.highlight-area")).attr("class","highlight-area").attr("opacity",0).attr("d",(function(t){var e=p.getDomainValue(t[i])-_/2,n=e+_,r=p.getRangeValue(t.whiskers.min),o=p.getRangeValue(t.whiskers.max);return $a({x0:e,x1:n,y0:r,y1:o},g)})),O.append("path").merge(w.select("path.whisker.start")).attr("class",(function(){return e.model.getColorClassName({classNameTypes:[N.STROKE],originalClassName:"whisker start"})})).attr("stroke-width",_t.strokeWidth.thicker).attr("fill","none").transition().call((function(n){return e.services.transitions.setupTransition({transition:n,name:"boxplot-update-startingwhisker",animate:t})})).attr("d",(function(t){var e=p.getDomainValue(t[i])-_/4,n=e+_/2,r=p.getRangeValue(t.whiskers.min),o=p.getRangeValue(t.whiskers.min);return $a({x0:e,x1:n,y0:r,y1:o},g)})),O.append("path").merge(w.select("path.median")).attr("fill","none").attr("class",(function(){return e.model.getColorClassName({classNameTypes:[N.STROKE],originalClassName:"median"})})).attr("stroke-width",2).transition().call((function(n){return e.services.transitions.setupTransition({transition:n,name:"boxplot-update-median",animate:t})})).attr("d",(function(t){var e=p.getDomainValue(t[i])-_/2,n=e+_,r=p.getRangeValue(t.quartiles.q_50);return $a({x0:e,x1:n,y0:r,y1:r},g)})),O.append("path").merge(w.select("path.whisker.end")).attr("class",(function(){return e.model.getColorClassName({classNameTypes:[N.STROKE],originalClassName:"whisker end"})})).attr("stroke-width",_t.strokeWidth.thicker).attr("fill","none").transition().call((function(n){return e.services.transitions.setupTransition({transition:n,name:"boxplot-update-endingwhisker",animate:t})})).attr("d",(function(t){var e=p.getDomainValue(t[i])-_/4,n=e+_/2,r=p.getRangeValue(t.whiskers.max),o=p.getRangeValue(t.whiskers.max);return $a({x0:e,x1:n,y0:r,y1:o},g)}));var S=T.selectAll("circle.outlier").data((function(t){return t.outliers.map((function(e){var n;return(n={min:t.whiskers.min,max:t.whiskers.max})[i]=t[i],n.value=e,n}))}));S.exit().remove();var M=S.enter().append("circle");S.merge(M).attr("r",_t.circle.radius).attr("class",(function(){return e.model.getColorClassName({classNameTypes:[N.FILL,N.STROKE],originalClassName:"outlier"})})).attr("fill-opacity",_t.circle.opacity.default).attr("cx",y).transition().call((function(n){return e.services.transitions.setupTransition({transition:n,name:"boxplot-update-circles",animate:t})})).attr("cy",b),this.addBoxEventListeners(),this.addCircleEventListeners()}},e.prototype.addBoxEventListeners=function(){var t=this,e=this.getOptions(),n=e.data.groupMapsTo;this.parent.selectAll("path.highlight-area").on("mouseover",(function(r,i){var o=Ba(this);Ba(this.parentNode).select("path.box").classed("hovered",!0).attr("fill-opacity",_t.box.opacity.hovered),t.services.events.dispatchEvent(ht.Tooltip.SHOW,{event:r,hoveredElement:o,items:[{label:e.tooltip.groupLabel,value:i[n],class:t.model.getColorClassName({classNameTypes:[N.TOOLTIP]})},{label:"Minimum",value:i.whiskers.min},{label:"Q1",value:i.quartiles.q_25},{label:"Median",value:i.quartiles.q_50},{label:"Q3",value:i.quartiles.q_75},{label:"Maximum",value:i.whiskers.max},{label:"IQR",value:i.quartiles.q_75-i.quartiles.q_25}]}),t.services.events.dispatchEvent(ht.Boxplot.BOX_MOUSEOVER,{event:r,element:o,datum:i})})).on("mousemove",(function(e,n){var r=Ba(this);t.services.events.dispatchEvent(ht.Boxplot.BOX_MOUSEMOVE,{event:e,element:r,datum:n}),t.services.events.dispatchEvent(ht.Tooltip.MOVE,{event:e})})).on("click",(function(e,n){t.services.events.dispatchEvent(ht.Boxplot.BOX_CLICK,{event:e,element:Ba(this),datum:n})})).on("mouseout",(function(e,n){var r=Ba(this);Ba(this.parentNode).select("path.box").classed("hovered",!1).attr("fill-opacity",_t.box.opacity.default),t.services.events.dispatchEvent(ht.Boxplot.BOX_MOUSEOUT,{event:e,element:r,datum:n}),t.services.events.dispatchEvent(ht.Tooltip.HIDE,{hoveredElement:r})}))},e.prototype.addCircleEventListeners=function(){var t=this,e=this.getOptions(),n=e.data.groupMapsTo,r=this.services.cartesianScales.getRangeIdentifier();this.parent.selectAll("circle").on("mouseover",(function(i,o){var a=Ba(this);a.classed("hovered",!0).attr("fill-opacity",_t.circle.opacity.hovered).classed("unfilled",!1),t.services.events.dispatchEvent(ht.Tooltip.SHOW,{event:i,hoveredElement:a,items:[{label:e.tooltip.groupLabel,value:o[n],class:t.model.getColorClassName({classNameTypes:[N.TOOLTIP]})},{label:"Outlier",value:o[r]}]}),t.services.events.dispatchEvent(ht.Boxplot.OUTLIER_MOUSEOVER,{event:i,element:a,datum:o})})).on("mousemove",(function(e,n){var r=Ba(this);t.services.events.dispatchEvent(ht.Boxplot.OUTLIER_MOUSEMOVE,{event:e,element:r,datum:n}),t.services.events.dispatchEvent(ht.Tooltip.MOVE,{event:e})})).on("click",(function(e,n){t.services.events.dispatchEvent(ht.Boxplot.OUTLIER_CLICK,{event:e,element:Ba(this),datum:n})})).on("mouseout",(function(e,n){var r=Ba(this);r.classed("hovered",!1).attr("fill-opacity",_t.circle.opacity.default),t.services.events.dispatchEvent(ht.Boxplot.OUTLIER_MOUSEOUT,{event:e,element:r,datum:n}),t.services.events.dispatchEvent(ht.Tooltip.HIDE,{hoveredElement:r})}))},e}(Kg),zx=function(t){function e(){var e=null!==t&&t.apply(this,arguments)||this;return e.type="scatter",e.renderType=I.SVG,e.handleChartHolderOnHover=function(t){e.parent.selectAll("circle.dot").transition("chart-holder-hover-scatter").call((function(t){return e.services.transitions.setupTransition({transition:t,name:"chart-holder-hover-scatter"})})).attr("opacity",1)},e.handleChartHolderOnMouseOut=function(t){e.parent.selectAll("circle.dot").transition("chart-holder-mouseout-scatter").call((function(t){return e.services.transitions.setupTransition({transition:t,name:"chart-holder-mouseout-scatter"})})).attr("opacity",0)},e.handleLegendOnHover=function(t){var n=t.detail.hoveredElement,r=e.getOptions().data.groupMapsTo;e.parent.selectAll("circle.dot").transition("legend-hover-scatter").call((function(t){return e.services.transitions.setupTransition({transition:t,name:"legend-hover-scatter"})})).attr("opacity",(function(t){return t[r]!==n.datum().name?.3:1}))},e.handleLegendMouseOut=function(t){e.parent.selectAll("circle.dot").transition("legend-mouseout-scatter").call((function(t){return e.services.transitions.setupTransition({transition:t,name:"legend-mouseout-scatter"})})).attr("opacity",1)},e}return n(e,t),e.prototype.init=function(){var t=this.services.events;t.addEventListener(ht.Legend.ITEM_HOVER,this.handleLegendOnHover),t.addEventListener(ht.Legend.ITEM_MOUSEOUT,this.handleLegendMouseOut),this.configs.fadeInOnChartHolderMouseover&&(t.addEventListener(ht.Chart.MOUSEOVER,this.handleChartHolderOnHover),t.addEventListener(ht.Chart.MOUSEOUT,this.handleChartHolderOnMouseOut))},e.prototype.filterBasedOnZoomDomain=function(t){var e=this.services.cartesianScales.getDomainIdentifier(t),n=this.model.get("zoomDomain");return void 0!==n?t.filter((function(t){return t[e].getTime()>=n[0].getTime()&&t[e].getTime()<=n[1].getTime()})):t},e.prototype.getScatterData=function(){var t,e=this,n=this.getOptions();if(this.configs.stacked){var r=Object.keys(n.axes).some((function(t){return n.axes[t].percentage}));t=this.model.getStackedData({groups:this.configs.groups,percentage:r})}else t=this.model.getDisplayData(this.configs.groups).filter((function(t){var n=e.services.cartesianScales.getRangeIdentifier(t);return void 0!==t[n]&&null!==t[n]}));return this.filterBasedOnZoomDomain(t)},e.prototype.render=function(t){if(Za(this.getOptions(),"points","enabled")||Za(this.getOptions(),"bubble","enabled")){var e=this.getComponentContainer({withinChartClip:!0}),n=this.getOptions().data.groupMapsTo,r=this.services.cartesianScales.getDomainIdentifier(),i=e.selectAll("circle.dot").data(this.getScatterData(),(function(t){return t[n]+"-"+t[r]}));i.exit().attr("opacity",0).remove();var o=i.enter().append("circle").classed("dot",!0).attr("opacity",0).merge(i);this.styleCircles(o,t),this.addEventListeners()}},e.prototype.isDatapointThresholdAnomaly=function(t,e){var n=this;if(!this.configs.handleThresholds)return!1;var r=this.services.cartesianScales.getOrientation(),i=Ka(this.services.cartesianScales.getHighestDomainThreshold(),this.services.cartesianScales.getHighestRangeThreshold(),r),o=i[0],a=i[1],s=Ka((function(t,e){return n.services.cartesianScales.getDomainValue(t,e)}),(function(t,e){return n.services.cartesianScales.getRangeValue(t,e)}),r),l=s[0],u=s[1],c=l(t,e),h=u(t,e);return a&&o?h<=a.scaleValue&&c>=o.scaleValue:a?h<=a.scaleValue:o?c>=o.scaleValue:void 0},e.prototype.styleCircles=function(t,e){var n=this,i=this.getOptions(),o=i.points,a=o.filled,s=o.fillOpacity,l=this.services,u=l.cartesianScales,c=(l.transitions,i.data.groupMapsTo),h=Ka((function(t,e){return u.getDomainValue(t,e)}),(function(t,e){return u.getRangeValue(t,e)}),u.getOrientation()),d=h[0],f=h[1],p=this.configs.fadeInOnChartHolderMouseover;t.raise().classed("dot",!0).attr("class",(function(t){var e=u.getDomainIdentifier(t),r=n.model.getIsFilled(t[c],t[e],t,a)?[N.FILL,N.STROKE]:[N.STROKE];return n.model.getColorClassName({classNameTypes:r,dataGroupName:t[c],originalClassName:"dot"})})).classed("threshold-anomaly",(function(t,e){return n.isDatapointThresholdAnomaly(t,e)})).classed("filled",(function(t){var e=u.getDomainIdentifier(t);return n.model.getIsFilled(t[c],t[e],t,a)})).classed("unfilled",(function(t){var e=u.getDomainIdentifier(t);return!n.model.getIsFilled(t[c],t[e],t,a)})).transition().call((function(t){return n.services.transitions.setupTransition({transition:t,name:"scatter-update-enter",animate:e})})).attr("cx",d).attr("cy",f).attr("r",i.points.radius).style("fill",(function(t){var e=u.getDomainIdentifier(t);if(n.model.getIsFilled(t[c],t[e],t,a))return n.model.getFillColor(t[c],t[e],t)})).style("stroke",(function(t){var e=u.getDomainIdentifier(t);return n.model.getStrokeColor(t[c],t[e],t)})).attr("fill-opacity",a?s:1).attr("opacity",p?0:1).attr("role",r.GRAPHICS_SYMBOL).attr("aria-roledescription","point").attr("aria-label",(function(t){return t[u.getRangeIdentifier(t)]})),this.addEventListeners()},e.prototype.getTooltipAdditionalItems=function(t){return null},e.prototype.addEventListeners=function(){var t=this,e=t.getOptions().data.groupMapsTo;this.parent.selectAll("circle").on("mouseover",(function(n,r){var i=Ba(this);i.classed("hovered",!0).attr("class",(function(n){return t.model.getColorClassName({classNameTypes:[N.FILL],dataGroupName:n[e],originalClassName:i.attr("class")})})).style("fill",(function(n){var r=t.services.cartesianScales.getDomainIdentifier(n);return t.model.getFillColor(n[e],n[r],n)})).classed("unfilled",!1),t.services.events.dispatchEvent(ht.Tooltip.SHOW,{event:n,hoveredElement:i,data:[r],additionalItems:t.getTooltipAdditionalItems(r)}),t.services.events.dispatchEvent(ht.Scatter.SCATTER_MOUSEOVER,{event:n,element:i,datum:r})})).on("mousemove",(function(e,n){var r=Ba(this);t.services.events.dispatchEvent(ht.Scatter.SCATTER_MOUSEMOVE,{event:e,element:r,datum:n}),t.services.events.dispatchEvent(ht.Tooltip.MOVE,{event:e})})).on("click",(function(e,n){t.services.events.dispatchEvent(ht.Scatter.SCATTER_CLICK,{event:e,element:Ba(this),datum:n})})).on("mouseout",(function(n,r){var i=Ba(this);if(i.classed("hovered",!1),!t.configs.filled){var o=t.getOptions().points.filled,a=t.services.cartesianScales.getDomainIdentifier(r),s=t.model.getIsFilled(r[e],r[a],r,o);i.classed("unfilled",!s).style("fill",(function(n){return s||o?t.model.getFillColor(n[e],n[a],n):null}))}t.services.events.dispatchEvent(ht.Scatter.SCATTER_MOUSEOUT,{event:n,element:i,datum:r}),t.services.events.dispatchEvent(ht.Tooltip.HIDE,{hoveredElement:i})}))},e.prototype.destroy=function(){this.parent.selectAll("circle").on("mousemove",null).on("mouseout",null);var t=this.services.events;t.removeEventListener(ht.Legend.ITEM_HOVER,this.handleLegendOnHover),t.removeEventListener(ht.Legend.ITEM_MOUSEOUT,this.handleLegendMouseOut),t.removeEventListener(ht.Chart.MOUSEOVER,this.handleChartHolderOnHover),t.removeEventListener(ht.Chart.MOUSEOUT,this.handleChartHolderOnMouseOut)},e}(Kg),jx=function(t){function e(){var e=null!==t&&t.apply(this,arguments)||this;return e.type="bubble",e.renderType=I.SVG,e}return n(e,t),e.prototype.getRadiusScale=function(t){var e=this.getOptions(),n=e.bubble.radiusMapsTo,r=t.data(),i=r.map((function(t){return t[n]})).filter((function(t){return t})),o=Hg.getHTMLElementSize(this.services.domUtils.getMainContainer()),a=i.length>0,s=a?Ys(i):[1,1];return Xu().domain(s).range(a?e.bubble.radiusRange(o,r):[4,4])},e.prototype.styleCircles=function(t,e){var n=this,i=this.getOptions(),o=i.bubble.radiusMapsTo,a=this.getRadiusScale(t),s=i.data.groupMapsTo,l=this.services.cartesianScales,u=Ka((function(t,e){return l.getDomainValue(t,e)}),(function(t,e){return l.getRangeValue(t,e)}),l.getOrientation()),c=u[0],h=u[1];t.raise().classed("dot",!0).attr("role",r.GRAPHICS_SYMBOL).attr("aria-label",(function(t){return t[l.getRangeIdentifier(t)]})).transition().call((function(t){return n.services.transitions.setupTransition({transition:t,name:"bubble-update-enter",animate:e})})).attr("cx",c).attr("cy",h).attr("r",(function(t){return a(t[o]||1)})).attr("class",(function(t){return n.model.getColorClassName({classNameTypes:[N.FILL,N.STROKE],dataGroupName:t[s],originalClassName:"dot"})})).style("fill",(function(t){var e=n.services.cartesianScales.getDomainIdentifier(t);return n.model.getFillColor(t[s],t[e],t)})).style("stroke",(function(t){var e=n.services.cartesianScales.getDomainIdentifier(t);return n.model.getStrokeColor(t[s],t[e],t)})).attr("fill-opacity",i.bubble.fillOpacity).attr("opacity",1)},e.prototype.getTooltipAdditionalItems=function(t){var e=Za(this.getOptions(),"bubble");return[{label:Za(e,"radiusLabel"),value:t[Za(e,"radiusMapsTo")]}]},e}(zx),Fx=function(t){function e(){var e=null!==t&&t.apply(this,arguments)||this;return e.type="bullet",e.renderType=I.SVG,e.handleLegendOnHover=function(t){var n=t.detail.hoveredElement,r=e.getOptions().data.groupMapsTo;e.parent.selectAll("path.bar").transition("legend-hover-simple-bar").call((function(t){return e.services.transitions.setupTransition({transition:t,name:"legend-hover-simple-bar"})})).attr("opacity",(function(t){return t[r]!==n.datum().name?.3:1}))},e.handleLegendMouseOut=function(t){e.parent.selectAll("path.bar").transition("legend-mouseout-simple-bar").call((function(t){return e.services.transitions.setupTransition({transition:t,name:"legend-mouseout-simple-bar"})})).attr("opacity",1)},e}return n(e,t),e.prototype.init=function(){var t=this.services.events;t.addEventListener(ht.Legend.ITEM_HOVER,this.handleLegendOnHover),t.addEventListener(ht.Legend.ITEM_MOUSEOUT,this.handleLegendMouseOut)},e.prototype.render=function(t){var e,n=this,i=this.getOptions().data.groupMapsTo,o=this.getComponentContainer({withinChartClip:!0}),a=this.model.getDisplayData(this.configs.groups),s=this.services.cartesianScales.getRangeScale(),l=this.services.cartesianScales.getRangeIdentifier(),u=s.range(),c=u[0],h=u[1],d=s.domain(),f=(d[0],d[1]);!function(){var e=[];a.forEach((function(t){t.ranges?t.ranges.forEach((function(n,r){null!=n&&n<f&&e.push({datum:t,value:n,order:r+1})})):e.push({datum:t,order:1})}));var r=Hg.appendOrSelect(o,"g.range-boxes").selectAll("path.range-box").data(e,(function(t){return t[i]+"-"+t.order}));r.exit().attr("opacity",0).remove(),r.enter().append("path").attr("opacity",0).merge(r).attr("class",(function(t){return"range-box order-"+t.order})).transition().call((function(e){return n.services.transitions.setupTransition({transition:e,name:"bullet-range-box-update-enter",animate:t})})).attr("d",(function(t,e){var r,i,o,a;return 1===t.order?(i=(r=n.services.cartesianScales.getDomainValue(t.datum,e)-8)+16,o=h-2,a=c+1):(i=(r=n.services.cartesianScales.getDomainValue(t.datum,e)-8)+16,o=n.services.cartesianScales.getRangeValue(t.value,e),a=h),$a({x0:r,x1:i,y0:o,y1:a},n.services.cartesianScales.getOrientation())})).attr("opacity",1)}(),(e=Hg.appendOrSelect(o,"g.bars").selectAll("path.bar").data(a,(function(t){return t[i]}))).exit().attr("opacity",0).remove(),e.enter().append("path").attr("opacity",0).merge(e).classed("bar",!0).transition().call((function(e){return n.services.transitions.setupTransition({transition:e,name:"bullet-bar-update-enter",animate:t})})).attr("class",(function(t){return n.model.getColorClassName({classNameTypes:[N.FILL],dataGroupName:t[i],originalClassName:"bar"})})).style("fill",(function(t){return n.model.getFillColor(t[i])})).attr("d",(function(t,e){var r=n.services.cartesianScales.getDomainValue(t,e)-4,i=r+8,o=n.services.cartesianScales.getRangeValue(0)+1,a=n.services.cartesianScales.getRangeValue(t,e);return $a({x0:r,x1:i,y0:o,y1:a},n.services.cartesianScales.getOrientation())})).attr("opacity",1).attr("role",r.GRAPHICS_SYMBOL).attr("aria-roledescription","bar").attr("aria-label",(function(t){return t.value})),function(){var e=Hg.appendOrSelect(o,"g.markers").selectAll("path.marker").data(a.filter((function(t){return null!==Za(t,"marker")})),(function(t){return t[i]}));e.exit().attr("opacity",0).remove(),e.enter().append("path").attr("opacity",0).merge(e).classed("marker",!0).transition().call((function(e){return n.services.transitions.setupTransition({transition:e,name:"bullet-marker-update-enter",animate:t})})).attr("d",(function(t,e){var r=n.services.cartesianScales.getDomainValue(t,e)-12,i=r+24,o=n.services.cartesianScales.getRangeValue(t.marker,e);return $a({x0:r,x1:i,y0:o,y1:o},n.services.cartesianScales.getOrientation())})).attr("opacity",1)}(),function(){var e=[];a.filter((function(t){return null!==Za(t,"marker")})).forEach((function(t){var n=t.marker,r=t[l];e=e.concat([{datum:t,value:.25*n,barValue:r},{datum:t,value:.5*n,barValue:r},{datum:t,value:.75*n,barValue:r}])}));var r=Hg.appendOrSelect(o,"g.quartiles").selectAll("path.quartile").data(e,(function(t){return t[i]}));r.exit().attr("opacity",0).remove(),r.enter().append("path").attr("opacity",0).merge(r).attr("class",(function(t){return"quartile "+(t.value<=t.barValue?"over-bar":"")})).transition().call((function(e){return n.services.transitions.setupTransition({transition:e,name:"bullet-quartile-update-enter",animate:t})})).attr("d",(function(t,e){var r=t.datum,i=t.value,o=4;r.ranges&&-1!==r.ranges.indexOf(i)&&(o=8);var a=n.services.cartesianScales.getDomainValue(r,e)-o/2,s=a+o,l=n.services.cartesianScales.getRangeValue(i,e);return $a({x0:a,x1:s,y0:l,y1:l},n.services.cartesianScales.getOrientation())})).attr("opacity",1)}(),this.addEventListeners()},e.prototype.addEventListeners=function(){var t=this,e=this.getOptions(),n=e.data.groupMapsTo,r=this.services.cartesianScales.getRangeIdentifier();this.parent.selectAll("path.bar").on("mouseover",(function(i,o){var a=Ba(this);a.classed("hovered",!0),t.services.events.dispatchEvent(ht.Bar.BAR_MOUSEOVER,{event:i,element:a,datum:o});var s=Za(e,"bullet","performanceAreaTitles"),l=t.model.getMatchingRangeIndexForDatapoint(o);t.services.events.dispatchEvent(ht.Tooltip.SHOW,{event:i,hoveredElement:a,items:[{label:e.tooltip.groupLabel||"Group",value:o[n],class:t.model.getColorClassName({classNameTypes:[N.TOOLTIP],dataGroupName:o[n]})},{label:"Value",value:o[r]},{label:"Target",value:o.marker},{label:"Percentage",value:Math.floor(o[r]/o.marker*100)+"%"},{label:"Performance",value:s[l]}]})})).on("mousemove",(function(e,n){t.services.events.dispatchEvent(ht.Bar.BAR_MOUSEMOVE,{event:e,element:Ba(this),datum:n}),t.services.events.dispatchEvent(ht.Tooltip.MOVE,{event:e})})).on("click",(function(e,n){t.services.events.dispatchEvent(ht.Bar.BAR_CLICK,{event:e,element:Ba(this),datum:n})})).on("mouseout",(function(e,n){var r=Ba(this);r.classed("hovered",!1),t.services.events.dispatchEvent(ht.Bar.BAR_MOUSEOUT,{event:e,element:r,datum:n}),t.services.events.dispatchEvent(ht.Tooltip.HIDE,{hoveredElement:r})}))},e.prototype.destroy=function(){this.parent.selectAll("path.bar").on("mouseover",null).on("mousemove",null).on("mouseout",null);var t=this.services.events;t.removeEventListener(ht.Legend.ITEM_HOVER,this.handleLegendOnHover),t.removeEventListener(ht.Legend.ITEM_MOUSEOUT,this.handleLegendMouseOut)},e}(Kg),Wx=function(t){function e(){var e=null!==t&&t.apply(this,arguments)||this;return e.type="histogram",e.renderType=I.SVG,e.handleLegendOnHover=function(t){var n=t.detail.hoveredElement,r=e.getOptions().data.groupMapsTo;e.parent.selectAll("path.bar").transition("legend-hover-bar").call((function(t){return e.services.transitions.setupTransition({transition:t,name:"legend-hover-bar"})})).attr("opacity",(function(t){return t[r]!==n.datum().name?.3:1}))},e.handleLegendMouseOut=function(t){e.parent.selectAll("path.bar").transition("legend-mouseout-bar").call((function(t){return e.services.transitions.setupTransition({transition:t,name:"legend-mouseout-bar"})})).attr("opacity",1)},e}return n(e,t),e.prototype.init=function(){var t=this.services.events;t.addEventListener(ht.Legend.ITEM_HOVER,this.handleLegendOnHover),t.addEventListener(ht.Legend.ITEM_MOUSEOUT,this.handleLegendMouseOut)},e.prototype.render=function(t){var e=this,n=this.getComponentContainer(),i=this.model.getOptions(),o=i.groupIdentifier,a=i.data.groupMapsTo,s=this.model.getBinnedStackedData(),l=this.services.cartesianScales.getMainXScale(),u=n.selectAll("g.bars").data(s,(function(t){return jn(t,"0."+a)}));u.exit().attr("opacity",0).remove(),u.enter().append("g").classed("bars",!0).attr("role",r.GROUP);var c=n.selectAll("g.bars").selectAll("path.bar").data((function(t){return t}));c.exit().remove(),c.enter().append("path").merge(c).classed("bar",!0).attr(o,(function(t,e){return e})).transition().call((function(n){return e.services.transitions.setupTransition({transition:n,name:"histogram-bar-update-enter",animate:t})})).attr("class",(function(t){return e.model.getColorClassName({classNameTypes:[N.FILL],dataGroupName:t[a],originalClassName:"bar"})})).style("fill",(function(t){return e.model.getFillColor(t[a])})).attr("d",(function(t,n){var r=jn(t,"data");if(r){var o=l(r.x1)-l(r.x0)-1,a=e.services.cartesianScales.getDomainValue(r.x0,n),s=a+o,u=e.services.cartesianScales.getRangeValue(t[0],n),c=e.services.cartesianScales.getRangeValue(t[1],n);return Math.abs(c-u)>0&&Math.abs(c-u)>i.bars.dividerSize&&(e.services.cartesianScales.getOrientation()===H.VERTICAL?c+=1:c-=1),$a({x0:a,x1:s,y0:u,y1:c},e.services.cartesianScales.getOrientation())}})).attr("opacity",1).attr("role",r.GRAPHICS_SYMBOL).attr("aria-roledescription","bar").attr("aria-label",(function(t){return Za(t,"data",t[a])})),this.addEventListeners()},e.prototype.addEventListeners=function(){var t=this.model.getOptions(),e=t.data.groupMapsTo,n=this;this.parent.selectAll("path.bar").on("mouseover",(function(r,i){var o=Ba(this);o.classed("hovered",!0);var a=parseFloat(jn(i,"data.x0")),s=parseFloat(jn(i,"data.x1")),l=n.services.cartesianScales.getRangeAxisPosition(),u=n.services.cartesianScales.getScaleLabel(l);n.services.events.dispatchEvent(ht.Tooltip.SHOW,{event:r,hoveredElement:o,items:[{label:jn(t,"bins.rangeLabel")||"Range",value:a+" – "+s},{label:t.tooltip.groupLabel||"Group",value:i[e],class:n.model.getColorClassName({classNameTypes:[N.TOOLTIP],dataGroupName:i[e]})},{label:u,value:jn(i,"data."+i[e])}]})})).on("mousemove",(function(t,e){n.services.events.dispatchEvent(ht.Tooltip.MOVE,{event:t})})).on("mouseout",(function(t,e){Ba(this).classed("hovered",!1),n.services.events.dispatchEvent(ht.Tooltip.HIDE)}))},e.prototype.destroy=function(){this.parent.selectAll("path.bar").on("mouseover",null).on("mousemove",null).on("mouseout",null);var t=this.services.events;t.removeEventListener(ht.Legend.ITEM_HOVER,this.handleLegendOnHover),t.removeEventListener(ht.Legend.ITEM_MOUSEOUT,this.handleLegendMouseOut)},e}(Kg),qx=function(t){function e(){var e=null!==t&&t.apply(this,arguments)||this;return e.type="line",e.renderType=I.SVG,e.handleLegendOnHover=function(t){var n=t.detail.hoveredElement;e.parent.selectAll("path.line").transition("legend-hover-line").call((function(t){return e.services.transitions.setupTransition({transition:t,name:"legend-hover-line"})})).attr("opacity",(function(t){return t.name!==n.datum().name?Ot.opacity.unselected:Ot.opacity.selected}))},e.handleLegendMouseOut=function(t){e.parent.selectAll("path.line").transition("legend-mouseout-line").call((function(t){return e.services.transitions.setupTransition({transition:t,name:"legend-mouseout-line"})})).attr("opacity",Ot.opacity.selected)},e}return n(e,t),e.prototype.init=function(){var t=this.services.events;t.addEventListener(ht.Legend.ITEM_HOVER,this.handleLegendOnHover),t.addEventListener(ht.Legend.ITEM_MOUSEOUT,this.handleLegendMouseOut)},e.prototype.render=function(t){var e=this;void 0===t&&(t=!0);var n=this.getComponentContainer({withinChartClip:!0}),i=this.services,o=i.cartesianScales,a=i.curves,s=Ka((function(t,e){return o.getDomainValue(t,e)}),(function(t,e){return o.getRangeValue(t,e)}),o.getOrientation()),l=s[0],u=s[1],c=this.getOptions(),h=Dd().x(l).y(u).curve(a.getD3Curve()).defined((function(t,e){var n=t[o.getRangeIdentifier(t)];return null!=n})),d=[];if(this.configs.stacked){var f=Object.keys(c.axes).some((function(t){return c.axes[t].percentage})),p=c.data.groupMapsTo;d=this.model.getStackedData({groups:this.configs.groups,percentage:f}).map((function(t){var n,r,i,o,a=e.services.cartesianScales.getDomainIdentifier(t),s=e.services.cartesianScales.getRangeIdentifier(t);return{name:Za(t,0,p),data:t.map((function(t){var e;return(e={})[a]=t.data.sharedStackKey,e[p]=t[p],e[s]=t[1],e})),hidden:(n=t,r=function(t){return t[0]!==t[1]},o=Xt(n)?Ci:Eo,i&&We(n,r,i)&&(r=void 0),!o(n,Wi(r)))}}))}else d=this.model.getGroupedData(this.configs.groups);var g=n.selectAll("path.line").data(d,(function(t){return t.name}));g.exit().attr("opacity",0).remove(),g.enter().append("path").classed("line",!0).attr("opacity",0).merge(g).data(d,(function(t){return t.name})).attr("class",(function(t){return e.model.getColorClassName({classNameTypes:[N.STROKE],dataGroupName:t.name,originalClassName:"line"})})).style("stroke",(function(t){return e.model.getStrokeColor(t.name)})).attr("role",r.GRAPHICS_SYMBOL).attr("aria-roledescription","line").attr("aria-label",(function(t){return t.data.map((function(t){return t[e.services.cartesianScales.getRangeIdentifier(t)]})).join(",")})).transition().call((function(n){return e.services.transitions.setupTransition({transition:n,name:"line-update-enter",animate:t})})).attr("opacity",(function(t){return t.hidden?0:1})).attr("d",(function(t){var e=t.data;return h(e)}))},e.prototype.destroy=function(){var t=this.services.events;t.removeEventListener(ht.Legend.ITEM_HOVER,this.handleLegendOnHover),t.removeEventListener(ht.Legend.ITEM_MOUSEOUT,this.handleLegendMouseOut)},e}(Kg),Yx=function(t){function e(){var e=null!==t&&t.apply(this,arguments)||this;return e.type="lollipop",e.renderType=I.SVG,e.handleScatterOnHover=function(t){var n=t.detail,r=e.getOptions().data.groupMapsTo;e.parent.selectAll("line.line").attr("stroke-width",(function(t){return t[r]!==n.datum[r]?Ot.weight.unselected:Ot.weight.selected}))},e.handleScatterOnMouseOut=function(t){e.parent.selectAll("line.line").attr("stroke-width",Ot.weight.unselected)},e.handleLegendOnHover=function(t){var n=t.detail.hoveredElement,r=e.getOptions().data.groupMapsTo;e.parent.selectAll("line.line").transition("legend-hover-line").call((function(t){return e.services.transitions.setupTransition({transition:t,name:"legend-hover-line"})})).attr("opacity",(function(t){return t[r]!==n.datum().name?Ot.opacity.unselected:Ot.opacity.selected}))},e.handleLegendMouseOut=function(t){e.parent.selectAll("line.line").transition("legend-mouseout-line").call((function(t){return e.services.transitions.setupTransition({transition:t,name:"legend-mouseout-line"})})).attr("opacity",Ot.opacity.selected)},e}return n(e,t),e.prototype.init=function(){var t=this.services.events;t.addEventListener(ht.Legend.ITEM_HOVER,this.handleLegendOnHover),t.addEventListener(ht.Legend.ITEM_MOUSEOUT,this.handleLegendMouseOut)},e.prototype.render=function(t){var e=this,n=this.getComponentContainer({withinChartClip:!0}),r=this.model.getOptions(),i=r.data.groupMapsTo,o=this.services.cartesianScales,a=o.getMainXScale(),s=o.getMainYScale(),l=o.getDomainIdentifier(),u=o.getOrientation(),c=Ka((function(t,e){return o.getDomainValue(t,e)}),(function(t,e){return o.getRangeValue(t,e)}),u),h=c[0],d=c[1],f=n.selectAll("line.line").data(this.getScatterData(),(function(t){return t[i]+"-"+t[l]}));f.exit().attr("opacity",0).remove();var p=f.enter().append("line").attr("opacity",0).merge(f).classed("line",!0).attr("class",(function(t){return e.model.getColorClassName({classNameTypes:[N.STROKE],dataGroupName:t[i],originalClassName:"line"})})).transition().call((function(n){return e.services.transitions.setupTransition({transition:n,name:"lollipop-line-update-enter",animate:t})})).style("stroke",(function(t){return e.model.getFillColor(t[i],t[l],t)})).attr("opacity",1);u===H.HORIZONTAL?p.attr("y1",d).attr("y2",d).attr("x1",a.range()[0]).attr("x2",(function(t,e){return h(t,e)-r.points.radius})):p.attr("x1",h).attr("x2",h).attr("y1",s.range()[0]).attr("y2",(function(t,e){return d(t,e)+r.points.radius})),this.addScatterPointEventListeners()},e.prototype.addScatterPointEventListeners=function(){this.services.events.addEventListener(ht.Scatter.SCATTER_MOUSEOVER,this.handleScatterOnHover),this.services.events.addEventListener(ht.Scatter.SCATTER_MOUSEOUT,this.handleScatterOnMouseOut)},e.prototype.destroy=function(){var t=this.services.events;t.removeEventListener(ht.Legend.ITEM_HOVER,this.handleLegendOnHover),t.removeEventListener(ht.Legend.ITEM_MOUSEOUT,this.handleLegendMouseOut),t.removeEventListener(ht.Scatter.SCATTER_MOUSEOVER,this.handleScatterOnHover),t.removeEventListener(ht.Scatter.SCATTER_MOUSEOUT,this.handleScatterOnMouseOut)},e}(zx),Zx=function(t){function e(){var e=null!==t&&t.apply(this,arguments)||this;return e.type="scatter-stacked",e.renderType=I.SVG,e}return n(e,t),e.prototype.render=function(t){var e=this;if(Za(this.getOptions(),"points","enabled")){var n=this.getComponentContainer({withinChartClip:!0}),i=this.getOptions(),o=i.data.groupMapsTo,a=Object.keys(i.axes).some((function(t){return i.axes[t].percentage})),s=this.model.getStackedData({groups:this.configs.groups,percentage:a}),l=n.selectAll("g.dots").data(s,(function(t){return Za(t,0,o)}));l.exit().attr("opacity",0).remove();var u=l.enter().append("g").classed("dots",!0).attr("role",r.GROUP).merge(l).selectAll("circle.dot").data((function(t){return t}));u.exit().attr("opacity",0).remove();var c=u.enter().append("circle").classed("dot",!0).attr("opacity",0).merge(u).datum((function(t){var n,r=t[o],i=e.services.cartesianScales.getDomainIdentifier(t),a=e.services.cartesianScales.getRangeIdentifier(t);return(n={})[o]=r,n[i]=t.data.sharedStackKey,n[a]=t[1],n}));this.styleCircles(c,t),this.addEventListeners()}},e.prototype.getTooltipData=function(t,e){var n=this,r=this.getOptions(),i=r.data.groupMapsTo,o=Object.keys(r.axes).some((function(t){return r.axes[t].percentage})),a=this.model.getStackedData({groups:this.configs.groups,percentage:o}),s=[];return a.forEach((function(r,a){r.forEach((function(r,l){var u,c=r[i],h=r.data.sharedStackKey,d=r.data[c],f=r[1],p=n.services.cartesianScales.getDomainIdentifier(r),g=n.services.cartesianScales.getRangeIdentifier(r);null!=d&&t===n.services.cartesianScales.getDomainValue(h)&&e===n.services.cartesianScales.getRangeValue(f)&&(o&&(d=n.model.getStackedData({groups:n.configs.groups})[a][l].data[c]),null!==d&&s.push(((u={})[i]=c,u[p]=h,u[g]=d,u)))}))})),this.model.getDisplayData(this.configs.groups).filter((function(t){var e=n.services.cartesianScales.getDomainIdentifier(t),r=n.services.cartesianScales.getRangeIdentifier(t);return void 0!==s.find((function(n){return n[i]==t[i]&&n[e]==t[e]&&n[r]==t[r]}))}))},e}(zx);function Xx(t,e){var n=this,r=pu(this._current,t);return function(t){return n._current=r(t),e(n._current)}}var $x=function(t){function e(){var e=null!==t&&t.apply(this,arguments)||this;return e.type="pie",e.renderType=I.SVG,e.handleLegendOnHover=function(t){var n=t.detail.hoveredElement,r=e.getOptions().data.groupMapsTo;e.parent.selectAll("path.slice").transition("legend-hover-bar").call((function(t){return e.services.transitions.setupTransition({transition:t,name:"legend-hover-bar"})})).attr("opacity",(function(t){return t.data[r]!==n.datum().name?.3:1}))},e.handleLegendMouseOut=function(t){e.parent.selectAll("path.slice").transition("legend-mouseout-bar").call((function(t){return e.services.transitions.setupTransition({transition:t,name:"legend-mouseout-bar"})})).attr("opacity",1)},e}return n(e,t),e.prototype.init=function(){var t=this.services.events;t.addEventListener(ht.Legend.ITEM_HOVER,this.handleLegendOnHover),t.addEventListener(ht.Legend.ITEM_MOUSEOUT,this.handleLegendMouseOut)},e.prototype.getInnerRadius=function(){return St.innerRadius},e.prototype.render=function(t){var e=this;void 0===t&&(t=!0);var n=this,i=this.getComponentContainer(),o=this.getOptions(),a=o.data.groupMapsTo,s=o.pie.valueMapsTo,l=this.model.getDisplayData().filter((function(t){return t[s]>0})),u=this.computeRadius();this.arc=Od().innerRadius(this.getInnerRadius()).outerRadius(u),this.hoverArc=Od().innerRadius(this.getInnerRadius()).outerRadius(u+St.hoverArc.outerRadiusOffset);var c=function(){var t=Id,e=Rd,n=null,r=Qh(0),i=Qh(ld),o=Qh(0);function a(a){var s,l,u,c,h,d=(a=Sd(a)).length,f=0,p=new Array(d),g=new Array(d),v=+r.apply(this,arguments),m=Math.min(ld,Math.max(-ld,i.apply(this,arguments)-v)),y=Math.min(Math.abs(m)/d,o.apply(this,arguments)),b=y*(m<0?-1:1);for(s=0;s<d;++s)(h=g[p[s]=s]=+t(a[s],s,a))>0&&(f+=h);for(null!=e?p.sort((function(t,n){return e(g[t],g[n])})):null!=n&&p.sort((function(t,e){return n(a[t],a[e])})),s=0,u=f?(m-d*b)/f:0;s<d;++s,v=c)l=p[s],c=v+((h=g[l])>0?h*u:0)+b,g[l]={data:a[l],index:s,value:h,startAngle:v,endAngle:c,padAngle:y};return g}return a.value=function(e){return arguments.length?(t="function"==typeof e?e:Qh(+e),a):t},a.sortValues=function(t){return arguments.length?(e=t,n=null,a):e},a.sort=function(t){return arguments.length?(n=t,e=null,a):n},a.startAngle=function(t){return arguments.length?(r="function"==typeof t?t:Qh(+t),a):r},a.endAngle=function(t){return arguments.length?(i="function"==typeof t?t:Qh(+t),a):i},a.padAngle=function(t){return arguments.length?(o="function"==typeof t?t:Qh(+t),a):o},a}().value((function(t){return t[s]})).sort(Za(o,"pie","sortFunction")).padAngle(St.padAngle)(l),h=Hg.appendOrSelect(i,"g.slices").attr("role",r.GROUP).attr("data-name","slices").selectAll("path.slice").data(c,(function(t){return t.data[a]}));h.exit().attr("opacity",0).remove(),h.enter().append("path").classed("slice",!0).attr("opacity",0).merge(h).attr("class",(function(t){return e.model.getColorClassName({classNameTypes:[N.FILL],dataGroupName:t.data[a],originalClassName:"slice"})})).style("fill",(function(t){return n.model.getFillColor(t.data[a])})).attr("d",this.arc).transition().call((function(n){return e.services.transitions.setupTransition({transition:n,name:"pie_slice_enter_update",animate:t})})).attr("opacity",1).attr("role",r.GRAPHICS_SYMBOL).attr("aria-roledescription","slice").attr("aria-label",(function(t){return t[s]+", "+Wa(t.data[s],l,s)+"%"})).attrTween("d",(function(t){return Xx.bind(this)(t,n.arc)}));var d=o.pie.labels.enabled,f=d?c.filter((function(t){return t.data[s]>0})):[],p=Hg.appendOrSelect(i,"g.labels").attr("role",r.GROUP).attr("data-name","labels").selectAll("text.pie-label").data(f,(function(t){return t.data[a]}));p.exit().attr("opacity",0).remove();var g=p.enter().append("text").classed("pie-label",!0),v=[];g.merge(p).style("text-anchor","middle").text((function(t){return o.pie.labels.formatter?o.pie.labels.formatter(t):Wa(t.data[s],l,s)+"%"})).datum((function(t){var e=u+7,n=(t.endAngle-t.startAngle)/2+t.startAngle,r=n/Math.PI*180,i=this.getComputedTextLength();return t.textOffsetX=i/2,t.textOffsetY=r>90&&r<270?10:0,t.xPosition=(t.textOffsetX+e)*Math.sin(n),t.yPosition=(t.textOffsetY+e)*-Math.cos(n),t})).attr("transform",(function(t,e){var n=f.length,r=(t.endAngle-t.startAngle)*(180/Math.PI);if(e>=n-2&&r<St.callout.minSliceDegree){var i=void 0,o=void 0;return t.index===n-1?(i=t.xPosition+St.callout.offsetX+St.callout.textMargin+t.textOffsetX,o=t.yPosition-St.callout.offsetY,t.direction=X.RIGHT,v.push(t)):(i=t.xPosition-St.callout.offsetX-t.textOffsetX-St.callout.textMargin,o=t.yPosition-St.callout.offsetY,t.direction=X.LEFT,v.push(t)),"translate("+i+", "+o+")"}return"translate("+t.xPosition+", "+t.yPosition+")"})),this.renderCallouts(v);var m=Za(o,"donut")?"donut":"pie",y=Za(o,m,"alignment"),b=Hg.getSVGElementSize(this.getParent(),{useAttrs:!0}).width,E=d?St.yOffset:0,_=u+(d?St.xOffset:0);y===j.CENTER?_=b/2:y===j.RIGHT&&(_=b-u-St.xOffset);var x=u+E;v.length>0&&(x+=St.yOffsetCallout),i.attr("x",_+7).attr("y",x),this.addEventListeners()},e.prototype.renderCallouts=function(t){var e=Hg.appendOrSelect(this.getComponentContainer(),"g.callouts").attr("role",r.GROUP).attr("data-name","callouts"),n=e.selectAll("g.callout").data(t);n.exit().remove();var i=n.enter().append("g").classed("callout",!0).attr("role",r.GROUP).attr("aria-roledescription","label callout");i.merge(n).datum((function(t){var e=t.xPosition,n=t.yPosition;return t.direction===X.RIGHT?(t.startPos={x:e,y:n+t.textOffsetY},t.endPos={x:e+St.callout.offsetX,y:n-St.callout.offsetY+t.textOffsetY},t.intersectPointX=t.endPos.x-St.callout.horizontalLineLength):(t.startPos={x:e,y:n+t.textOffsetY},t.endPos={x:e-St.callout.offsetX,y:n-St.callout.offsetY+t.textOffsetY},t.intersectPointX=t.endPos.x+St.callout.horizontalLineLength),t})),i.append("line").classed("vertical-line",!0).merge(e.selectAll("line.vertical-line")).datum((function(t){return Ba(this.parentNode).datum()})).style("stroke-width","1px").attr("x1",(function(t){return t.startPos.x})).attr("y1",(function(t){return t.startPos.y})).attr("x2",(function(t){return t.intersectPointX})).attr("y2",(function(t){return t.endPos.y})),i.append("line").classed("horizontal-line",!0).merge(e.selectAll("line.horizontal-line")).datum((function(t){return Ba(this.parentNode).datum()})).style("stroke-width","1px").attr("x1",(function(t){return t.intersectPointX})).attr("y1",(function(t){return t.endPos.y})).attr("x2",(function(t){return t.endPos.x})).attr("y2",(function(t){return t.endPos.y}))},e.prototype.addEventListeners=function(){var t=this;this.parent.selectAll("path.slice").on("mouseover",(function(e,n){var r=Ba(this);r.classed("hovered",!0).transition("pie_slice_mouseover").call((function(e){return t.services.transitions.setupTransition({transition:e,name:"pie_slice_mouseover"})})).attr("d",t.hoverArc),t.services.events.dispatchEvent(ht.Pie.SLICE_MOUSEOVER,{event:e,element:Ba(this),datum:n});var i=t.getOptions().data.groupMapsTo,o=t.getOptions().pie.valueMapsTo;t.services.events.dispatchEvent(ht.Tooltip.SHOW,{event:e,hoveredElement:r,items:[{label:n.data[i],value:n.data[o]}]})})).on("mousemove",(function(e,n){var r=Ba(this);t.services.events.dispatchEvent(ht.Pie.SLICE_MOUSEMOVE,{event:e,element:r,datum:n}),t.services.events.dispatchEvent(ht.Tooltip.MOVE,{event:e})})).on("click",(function(e,n){t.services.events.dispatchEvent(ht.Pie.SLICE_CLICK,{event:e,element:Ba(this),datum:n})})).on("mouseout",(function(e,n){var r=Ba(this);r.classed("hovered",!1).transition("pie_slice_mouseout").call((function(e){return t.services.transitions.setupTransition({transition:e,name:"pie_slice_mouseout"})})).attr("d",t.arc),t.services.events.dispatchEvent(ht.Pie.SLICE_MOUSEOUT,{event:e,element:r,datum:n}),t.services.events.dispatchEvent(ht.Tooltip.HIDE,{hoveredElement:r})}))},e.prototype.computeRadius=function(){var t=Hg.getSVGElementSize(this.parent,{useAttrs:!0}),e=t.width,n=t.height,r=this.getOptions(),i=Math.min(e,n)/2;return r.pie.labels.enabled?i+St.radiusOffset:i},e}(Kg),Kx=function(t){function e(){var e=null!==t&&t.apply(this,arguments)||this;return e.type="gauge",e.renderType=I.SVG,e}return n(e,t),e.prototype.getValue=function(){var t,e;return null!=(e=null===(t=this.model.getData().find((function(t){return"value"===t.group})))||void 0===t?void 0:t.value)?e:null},e.prototype.getValueRatio=function(){return Gr(this.getValue(),0,100)/100},e.prototype.getDelta=function(){var t,e;return null!=(e=null===(t=this.model.getData().find((function(t){return"delta"===t.group})))||void 0===t?void 0:t.value)?e:null},e.prototype.getArcRatio=function(){var t=this.getOptions();return Za(t,"gauge","type")===J.FULL?1:.5},e.prototype.getArcSize=function(){return this.getArcRatio()*Math.PI*2},e.prototype.getStartAngle=function(){var t=this.getArcSize();return t===2*Math.PI?0:-t/2},e.prototype.getArrow=function(t){var e=this.getOptions();switch(Za(e,"gauge","deltaArrow","direction")){case tt.UP:return"4,10 8,6 12,10";case tt.DOWN:return"12,6 8,10 4,6";default:return t>0?"4,10 8,6 12,10":"12,6 8,10 4,6"}},e.prototype.render=function(t){var e=this,n=this.getComponentContainer().attr("width","100%").attr("height","100%"),i=this.getOptions(),o=this.getValue(),a=this.getValueRatio(),s=this.getArcSize(),l=this.getStartAngle(),u=l+a*s,c=l+s,h=this.computeRadius(),d=this.getInnerRadius();this.backgroundArc=Od().innerRadius(d).outerRadius(h).startAngle(u).endAngle(c),this.arc=Od().innerRadius(d).outerRadius(h).startAngle(l).endAngle(u),Hg.appendOrSelect(n,"path.arc-background").attr("d",this.backgroundArc);var f=n.selectAll("path.arc-foreground").data([o]);f.enter().append("path").merge(f).attr("class",this.model.getColorClassName({classNameTypes:[N.FILL],dataGroupName:"value",originalClassName:"arc-foreground"})).style("fill",(function(t){return Za(e.getOptions(),"color","scale","value")})).attr("d",this.arc).attr("role",r.GRAPHICS_SYMBOL).attr("aria-roledescription","value").attr("aria-label",(function(t){return t})),this.drawValueNumber(),this.drawDelta(),f.exit().remove();var p=Za(i,"gauge","alignment"),g=Hg.getSVGElementSize(this.getParent(),{useAttrs:!0}).width,v=h;p===j.CENTER?v=g/2:p===j.RIGHT&&(v=g-h),n.attr("x",v).attr("y",h),this.addEventListeners()},e.prototype.drawValueNumber=function(){var t=this.getComponentContainer(),e=this.getOptions(),n=Za(e,"gauge","type"),r=this.getValue(),i=this.getDelta(),o=this.computeRadius(),a=Za(e,"gauge","valueFontSize"),s=Za(e,"gauge","deltaFontSize"),l=Za(e,"gauge","numberSpacing"),u=Za(e,"gauge","showPercentageSymbol"),c=0;n!==J.FULL||i?n===J.SEMI&&i&&(c=-(s(o)+l)):c=s(o);var h=Hg.appendOrSelect(t,"g.gauge-numbers").attr("transform","translate(0, "+c+")"),d=a(o),f=Hg.appendOrSelect(h,"g.gauge-value-number"),p=Za(e,"gauge","numberFormatter"),g=f.selectAll("text.gauge-value-number").data([r]);g.enter().append("text").attr("class","gauge-value-number").merge(g).style("font-size",d+"px").attr("text-anchor","middle").text((function(t){return p(t)}));var v=Hg.getSVGElementSize(Hg.appendOrSelect(t,"text.gauge-value-number"),{useBBox:!0}).width,m=d/2,y=u?"%":"",b=Hg.appendOrSelect(f,"text.gauge-value-symbol").style("font-size",m+"px").attr("x",v/2).text(y),E=Hg.getSVGElementSize(b,{useBBox:!0}),_=E.width,x=E.height;b.attr("y","-"+x/2+"px"),f.attr("transform","translate(-"+_/2+", 0)")},e.prototype.drawDelta=function(){var t=this,e=this.getComponentContainer(),n=this.getOptions(),r=this.getDelta();if(r){var i=this.computeRadius(),o=r?Za(n,"gauge","deltaFontSize"):function(){return 0},a=r?Za(n,"gauge","numberFormatter"):function(){return null},s=Za(n,"gauge","deltaArrow","size"),l=Za(n,"gauge","numberSpacing"),u=Za(n,"gauge","showPercentageSymbol"),c=Hg.appendOrSelect(e,"g.gauge-numbers"),h=(v=Hg.appendOrSelect(c,"g.gauge-delta").attr("transform","translate(0, "+(o(i)+l)+")"),Hg.appendOrSelect(v,"text.gauge-delta-number")),d=u?"%":"";h.data(null===r?[]:[r]),h.enter().append("text").classed("gauge-delta-number",!0).merge(h).attr("text-anchor","middle").style("font-size",o(i)+"px").text((function(t){return""+a(t)+d}));var f=Hg.getSVGElementSize(Hg.appendOrSelect(e,".gauge-delta-number"),{useBBox:!0}).width,p=Za(n,"gauge","deltaArrow","enabled"),g=v.selectAll("svg.gauge-delta-arrow").data(null!==r&&p?[r]:[]);g.enter().append("svg").merge(g).attr("class","gauge-delta-arrow").attr("x",-s(i)-f/2).attr("y",-s(i)/2-.35*o(i)).attr("width",s(i)).attr("height",s(i)).attr("viewBox","0 0 16 16").each((function(){var e=Ba(this);Hg.appendOrSelect(e,"rect.gauge-delta-arrow-backdrop").attr("width","16").attr("height","16").attr("fill","none");var i=Za(n,"gauge","status");Hg.appendOrSelect(e,"polygon.gauge-delta-arrow").attr("class",null!==i?"gauge-delta-arrow status--"+i:"").attr("points",t.getArrow(r))})),g.exit().remove(),h.exit().remove()}else{var v;(v=e.select("g.gauge-delta")).empty()||v.remove()}},e.prototype.getInnerRadius=function(){return this.computeRadius()-Za(this.getOptions(),"gauge","arcWidth")},e.prototype.addEventListeners=function(){var t=this;this.parent.selectAll("path.arc-foreground").on("mouseover",(function(e,n){t.services.events.dispatchEvent(ht.Gauge.ARC_MOUSEOVER,{event:e,element:Ba(this),datum:n})})).on("mousemove",(function(e,n){var r=Ba(this);t.services.events.dispatchEvent(ht.Gauge.ARC_MOUSEMOVE,{event:e,element:r,datum:n})})).on("click",(function(e,n){t.services.events.dispatchEvent(ht.Gauge.ARC_CLICK,{event:e,element:Ba(this),datum:n})})).on("mouseout",(function(e,n){var r=Ba(this);t.services.events.dispatchEvent(ht.Gauge.ARC_MOUSEOUT,{event:e,element:r,datum:n})}))},e.prototype.computeRadius=function(){var t=this.getOptions(),e=Za(t,"gauge","type"),n=Hg.getSVGElementSize(this.parent,{useAttrs:!0}),r=n.width,i=n.height;return e===J.SEMI?Math.min(r/2,i):Math.min(r/2,i/2)},e}(Kg),Qx=function(t){function e(){var e=null!==t&&t.apply(this,arguments)||this;return e.type="donut",e.renderType=I.SVG,e}return n(e,t),e.prototype.render=function(e){var n=this;void 0===e&&(e=!0),t.prototype.render.call(this,e);var r=this;if(this.model.isDataEmpty())this.getComponentContainer().select("g.center").remove();else{var i=Hg.appendOrSelect(this.getComponentContainer(),"g.center"),o=this.getOptions(),a=this.computeRadius(),s=Za(o,"donut","center","label");Hg.appendOrSelect(i,"text.donut-figure").attr("text-anchor","middle").style("dominant-baseline",(function(){return null===s||""===s?"central":"initial"})).style("font-size",(function(){return o.donut.center.numberFontSize(a)})).transition().call((function(t){return n.services.transitions.setupTransition({transition:t,name:"donut-figure-enter-update",animate:e})})).tween("text",(function(){return r.centerNumberTween(Ba(this))})),null!==s&&""!==s&&Hg.appendOrSelect(i,"text.donut-title").attr("text-anchor","middle").style("font-size",(function(){return o.donut.center.titleFontSize(a)})).attr("y",o.donut.center.titleYPosition(a)).text(s)}},e.prototype.getInnerRadius=function(){return this.computeRadius()*(3/4)},e.prototype.centerNumberTween=function(t){var e=this.getOptions(),n=Za(e,"donut","center","number");null===n&&(n=this.model.getDisplayData().reduce((function(t,n){return t+n[e.pie.valueMapsTo]}),0));var r=parseInt(t.text().replace(/[, ]+/g,""),10)||0,i=(r%1==0&&n%1==0?gu:uu)(r,n);return function(n){var r=e.donut.center.numberFormatter;t.text(r(i(n)))}},e}($x),Jx=function(t){function e(){var e=null!==t&&t.apply(this,arguments)||this;return e.type="skeleton",e}return n(e,t),e.prototype.render=function(){var t=Za(this.getOptions(),"data","loading");t?this.renderSkeleton(t):this.removeSkeleton()},e.prototype.renderSkeleton=function(t){if(this.configs.skeleton===$.GRID)this.renderGridSkeleton(t);else if(this.configs.skeleton===$.VERT_OR_HORIZ)this.renderVertOrHorizSkeleton(t);else if(this.configs.skeleton===$.PIE)this.renderPieSkeleton(t);else{if(this.configs.skeleton!==$.DONUT)throw new Error('"'+this.configs.skeleton+'" is not a valid Skeleton type.');this.renderDonutSkeleton(t)}},e.prototype.renderGridSkeleton=function(t){this.setScales(),this.drawBackdrop(t),this.drawXGrid(t),this.drawYGrid(t),t&&this.setShimmerEffect("shimmer-lines")},e.prototype.renderVertOrHorizSkeleton=function(t){var e=this.services.cartesianScales.getOrientation();this.setScales(),this.drawBackdrop(t),e===H.VERTICAL&&this.drawYGrid(t),e===H.HORIZONTAL&&this.drawXGrid(t),this.setShimmerEffect("shimmer-lines")},e.prototype.renderPieSkeleton=function(t){var e=this.computeOuterRadius();this.drawRing(e,0,t),t&&this.setShimmerEffect("shimmer-areas")},e.prototype.renderDonutSkeleton=function(t){var e=this.computeOuterRadius(),n=this.computeInnerRadius();this.drawRing(e,n,t),t&&this.setShimmerEffect("shimmer-areas")},e.prototype.setScales=function(){var t=this.services.cartesianScales.getMainXScale().range(),e=this.services.cartesianScales.getMainYScale().range();this.xScale=Xu().domain([0,1]).range(t),this.yScale=Xu().domain([0,1]).range(e)},e.prototype.drawBackdrop=function(t){var e=this.parent,n=Hg.getSVGElementSize(e,{useAttrs:!0}),r=n.width,i=n.height;this.backdrop=Hg.appendOrSelect(e,"svg.chart-skeleton.DAII").attr("width",r).attr("height",i);var o=Hg.appendOrSelect(this.backdrop,"rect.chart-skeleton-backdrop");o.attr("width","100%").attr("height","100%");var a=this.xScale.range(),s=a[0],l=(a[1],this.yScale.range()),u=(l[0],l[1]);this.backdrop.merge(o).attr("x",s).attr("y",u),o.classed("shimmer-effect-lines",t).classed("empty-state-lines",!t).style("stroke",t?"url(#"+this.services.domUtils.generateElementIDString("shimmer-lines")+")":null)},e.prototype.drawXGrid=function(t){var e=this.backdrop.attr("width"),n=Za(this.getOptions(),"grid","x","numberOfTicks"),r=this.xScale.ticks(n).map((function(t){return t*e})),i=Hg.appendOrSelect(this.backdrop,"g.x.skeleton"),o=i.selectAll("line").data(r);o.enter().append("line").merge(o).attr("x1",(function(t){return t})).attr("x2",(function(t){return t})).attr("y1",0).attr("y2","100%"),i.selectAll("line").classed("shimmer-effect-lines",t).classed("empty-state-lines",!t).style("stroke",t?"url(#"+this.services.domUtils.generateElementIDString("shimmer-lines")+")":null)},e.prototype.drawYGrid=function(t){var e=this.backdrop.attr("height"),n=this.backdrop.attr("width"),r=Za(this.getOptions(),"grid","y","numberOfTicks"),i=this.xScale.ticks(r).map((function(t){return t*e})),o=Hg.appendOrSelect(this.backdrop,"g.y.skeleton"),a=o.selectAll("line").data(i);a.enter().append("line").merge(a).attr("x1",0).attr("x2",n).attr("y1",(function(t){return t})).attr("y2",(function(t){return t})),o.selectAll("line").classed("shimmer-effect-lines",t).classed("empty-state-lines",!t).style("stroke",t?"url(#"+this.services.domUtils.generateElementIDString("shimmer-lines")+")":null)},e.prototype.drawRing=function(t,e,n){void 0===n&&(n=!0);var r=this.parent,i=Hg.getSVGElementSize(r,{useAttrs:!0}),o=i.width,a=i.height,s=Hg.appendOrSelect(r,"svg.chart-skeleton").attr("width",o).attr("height",a),l=0===e?"pie":"donut",u=Za(this.getOptions(),l,"alignment");Hg.appendOrSelect(s,"rect.chart-skeleton-area-container").attr("width",o).attr("height",a).attr("fill","none");var c=Od().innerRadius(e).outerRadius(t).startAngle(0).endAngle(2*Math.PI),h=t+Math.abs(St.radiusOffset),d=t+(Math.min(o,a)-2*t)/2,f=Hg.appendOrSelect(s,"path").attr("class","skeleton-area-shape").attr("transform","translate("+h+", "+d+")").attr("d",c).classed("shimmer-effect-areas",n).classed("empty-state-areas",!n).style("fill",n?"url(#"+this.services.domUtils.generateElementIDString("shimmer-areas")+")":null),p=t+St.xOffset;u===j.CENTER?p=o/2:u===j.RIGHT&&(p=o-t-St.xOffset);var g=t+St.yOffset;f.attr("transform","translate("+p+", "+g+")")},e.prototype.computeOuterRadius=function(){var t=Hg.getSVGElementSize(this.parent,{useAttrs:!0}),e=t.width,n=t.height;return Math.min(e,n)/2+St.radiusOffset},e.prototype.computeInnerRadius=function(){return this.computeOuterRadius()*(3/4)},e.prototype.setShimmerEffect=function(t){var e=this.parent.select(".chart-skeleton"),n=Hg.getSVGElementSize(this.parent,{useAttrs:!0}).width,r=n,i=Hg.appendOrSelect(e,"defs").lower(),o=Hg.appendOrSelect(i,"linearGradient").attr("id",this.services.domUtils.generateElementIDString(t)).attr("class",t).attr("x1",0-3*.2*n).attr("x2",r).attr("y1",0).attr("y2",0).attr("gradientUnits","userSpaceOnUse").attr("gradientTransform","translate(0, 0)");o.html('\n\t\t\t<stop class="stop-bg-shimmer" offset="0"></stop>\n\t\t\t<stop class="stop-shimmer" offset="0.2"></stop>\n\t\t\t<stop class="stop-bg-shimmer" offset="0.4"></stop>\n\t\t'),function t(){o.attr("gradientTransform","translate("+(0-3*.2*n)+", 0)").transition().duration(2e3).delay(1e3).ease(ft).attr("gradientTransform","translate("+(r+3*.2*n)+", 0)").on("end",t)}()},e.prototype.removeSkeleton=function(){this.parent.select(".chart-skeleton").remove()},e}(Kg),tw=function(t){function e(){var e=null!==t&&t.apply(this,arguments)||this;return e.type="skeleton-lines",e}return n(e,t),e.prototype.render=function(){var e=Za(this.getOptions(),"data","loading"),n=!(Za(this.getOptions(),"grid","x","enabled")||Za(this.getOptions(),"grid","y","enabled")||Za(this.getOptions(),"axes","bottom","visible")||Za(this.getOptions(),"axes","left","visible"));e&&!n?t.prototype.renderGridSkeleton.call(this,e):e&&n?this.renderSparklineSkeleton(e):this.removeSkeleton()},e.prototype.renderSparklineSkeleton=function(t){this.setScales(),this.drawBackdrop(t),this.drawSparkline(t),this.updateBackdropStyle(),t&&this.setShimmerEffect("shimmer-lines")},e.prototype.drawSparkline=function(t){var e=this.backdrop.attr("width"),n=Hg.appendOrSelect(this.backdrop,"g.y.skeleton"),r=n.selectAll("line").data([100]);r.enter().append("line").merge(r).attr("x1",0).attr("x2",e).attr("y1",(function(t){return t})).attr("y2",(function(t){return t})),n.selectAll("line").classed("shimmer-effect-lines",t).classed("empty-state-lines",!t).style("stroke",t?"url(#"+this.services.domUtils.generateElementIDString("shimmer-lines")+")":null)},e.prototype.updateBackdropStyle=function(){var t=this.parent;this.backdrop=Hg.appendOrSelect(t,"svg.chart-skeleton.DAII"),Hg.appendOrSelect(this.backdrop,"rect.chart-skeleton-backdrop").classed("shimmer-effect-lines",!1).classed("shimmer-effect-sparkline",!0).style("stroke",null)},e}(Jx),ew=function(t){function e(){var e=null!==t&&t.apply(this,arguments)||this;return e.type="tree",e.renderType=I.SVG,e}return n(e,t),e.prototype.getLongestLabel=function(t){var e=this,n="";return t.forEach((function(t){var r=t.children?e.getLongestLabel(t.children):"";(r.length>n.length||t.name.length>n.length)&&(n=r.length>t.name.length?r:t.name)})),n},e.prototype.getMockLabelWidth=function(t,e){var n=t.append("text").attr("dy","0.31em").attr("x",0).attr("text-anchor","end").text(e),r=Hg.getSVGElementSize(n.node(),{useBBox:!0}).width;return n.remove(),r},e.prototype.render=function(t){var e=this,n=this.getComponentContainer();n.html("");var r=Hg.getSVGElementSize(this.parent,{useAttrs:!0}),i=r.width,o=r.height;if(!(i<1||o<1)){var a=this.model.getOptions(),s=this.model.getDisplayData(),l=Za(a,"tree","rootTitle")||"Tree",u=this.getMockLabelWidth(n,l),c=this.getLongestLabel(s),h=this.getMockLabelWidth(n,c),d=0,f=u>0?u+6:24,p=F_({name:l,children:s}),g=i/6,v=function(t){var r=p.descendants().reverse(),o=p.links(),a=p,s=p;p.eachBefore((function(t){t.x<a.x&&(a=t),t.x>s.x&&(s=t)}));var l=s.x-a.x,u=n.transition().call((function(t){return e.services.transitions.setupTransition({transition:t,name:"tree-update-viewbox",animate:!0})})).attr("viewBox",[-f,a.x,i,l]),c=x.selectAll("g").data(r,(function(t){return t.id})),h=e,d=c.enter().append("g").attr("transform",(function(){return"translate("+t.y0+","+t.x0+")"})).attr("class",(function(t){return 0!==t.depth&&t.children&&t.children.length>0?"clickable":null})).on("mouseover",(function(t,e){h.services.events.dispatchEvent(ht.Tree.NODE_MOUSEOVER,{event:t,element:Ba(this),datum:e})})).on("click",(function(t,e){0!==e.depth&&(e.children=e.children?null:e._children,v(e)),h.services.events.dispatchEvent(ht.Tree.NODE_CLICK,{event:t,element:Ba(this),datum:e})})).on("mouseout",(function(t,e){h.services.events.dispatchEvent(ht.Tree.NODE_MOUSEOUT,{event:t,element:Ba(this),datum:e})}));d.append("circle").attr("r",2.5).attr("class",(function(t){return t._children?"parent":"child"})).attr("stroke-width",10),d.append("text").attr("dy","0.31em").attr("x",(function(t){return t._children?-6:6})).attr("text-anchor",(function(t){return t._children?"end":"start"})).text((function(t){return t.data.name})).clone(!0).attr("class","text-stroke").lower(),c.merge(d).transition(u).attr("transform",(function(t){return"translate("+t.y+","+t.x+")"})).attr("fill-opacity",1).attr("stroke-opacity",1),c.exit().transition(u).remove().attr("transform",(function(){return"translate("+t.y+","+t.x+")"})).attr("fill-opacity",0).attr("stroke-opacity",0);var g=_.selectAll("path").data(o,(function(t){return t.target.id})),m=g.enter().append("path").attr("d",(function(e){var n={x:t.x0,y:t.y0};return E({source:n,target:n})}));g.merge(m).transition(u).attr("d",E),g.exit().transition(u).remove().attr("d",(function(){var e={x:t.x,y:t.y};return E({source:e,target:e})})),p.eachBefore((function(t){t.x0=t.x,t.y0=t.y}))},m=p.descendants(),y=m[m.length-1].depth,b=Za(a,"tree","type")===W.DENDROGRAM?z_().size([o,i-h-6*y-u]):Sx().nodeSize([10,g]).size([o,i-h-6*y-u]),E=jd().x((function(t){return t.y})).y((function(t){return t.x}));p.x0=g/2,p.y0=0,p.descendants().forEach((function(t,e){t.id=e,t._children=t.children})),b(p),n.attr("viewBox",[-f,-d,i,10]).style("user-select","none");var _=n.append("g").attr("class","links"),x=n.append("g").attr("class","nodes");v(p)}},e}(Kg),nw={black:{100:"#000000"},blue:{10:"#edf5ff",20:"#d0e2ff",30:"#a6c8ff",40:"#78a9ff",50:"#4589ff",60:"#0f62fe",70:"#0043ce",80:"#002d9c",90:"#001d6c",100:"#001141"},coolGray:{10:"#f2f4f8",20:"#dde1e6",30:"#c1c7cd",40:"#a2a9b0",50:"#878d96",60:"#697077",70:"#4d5358",80:"#343a3f",90:"#21272a",100:"#121619"},cyan:{10:"#e5f6ff",20:"#bae6ff",30:"#82cfff",40:"#33b1ff",50:"#1192e8",60:"#0072c3",70:"#00539a",80:"#003a6d",90:"#012749",100:"#061727"},gray:{10:"#f4f4f4",20:"#e0e0e0",30:"#c6c6c6",40:"#a8a8a8",50:"#8d8d8d",60:"#6f6f6f",70:"#525252",80:"#393939",90:"#262626",100:"#161616"},green:{10:"#defbe6",20:"#a7f0ba",30:"#6fdc8c",40:"#42be65",50:"#24a148",60:"#198038",70:"#0e6027",80:"#044317",90:"#022d0d",100:"#071908"},magenta:{10:"#fff0f7",20:"#ffd6e8",30:"#ffafd2",40:"#ff7eb6",50:"#ee5396",60:"#d02670",70:"#9f1853",80:"#740937",90:"#510224",100:"#2a0a18"},orange:{10:"#fff2e8",20:"#ffd9be",30:"#ffb784",40:"#ff832b",50:"#eb6200",60:"#ba4e00",70:"#8a3800",80:"#5e2900",90:"#3e1a00",100:"#231000"},purple:{10:"#f6f2ff",20:"#e8daff",30:"#d4bbff",40:"#be95ff",50:"#a56eff",60:"#8a3ffc",70:"#6929c4",80:"#491d8b",90:"#31135e",100:"#1c0f30"},red:{10:"#fff1f1",20:"#ffd7d9",30:"#ffb3b8",40:"#ff8389",50:"#fa4d56",60:"#da1e28",70:"#a2191f",80:"#750e13",90:"#520408",100:"#2d0709"},teal:{10:"#d9fbfb",20:"#9ef0f0",30:"#3ddbd9",40:"#08bdba",50:"#009d9a",60:"#007d79",70:"#005d5d",80:"#004144",90:"#022b30",100:"#081a1c"},warmGray:{10:"#f7f3f2",20:"#e5e0df",30:"#cac5c4",40:"#ada8a8",50:"#8f8b8b",60:"#726e6e",70:"#565151",80:"#3c3838",90:"#272525",100:"#171414"},white:{0:"#ffffff"},yellow:{10:"#fcf4d6",20:"#fddc69",30:"#f1c21b",40:"#d2a106",50:"#b28600",60:"#8e6a00",70:"#684e00",80:"#483700",90:"#302400",100:"#1c1500"}},rw=function(){var t,e=Ba(this.parentNode).select("rect.leaf"),n=Bl(getComputedStyle(e.node(),null).getPropertyValue("fill"));if(n&&(t=function(t){if(!t)return null;for(var e=0,n=Object.keys(nw);e<n.length;e++)for(var r=n[e],i=nw[r],o=0,a=Object.keys(i);o<a.length;o++){var s=a[o];if(i[s]===t)return s}return null}(n?n.hex():null)),null==t){var r=Kl(n).l;t=Math.abs(100*r-100)}return t>50?"white":"black"},iw=0,ow=function(t){function e(){var e=null!==t&&t.apply(this,arguments)||this;return e.type="treemap",e.renderType=I.SVG,e.handleLegendOnHover=function(t){var n=t.detail.hoveredElement;e.parent.selectAll("g[data-name='leaf']").transition("legend-hover-treemap").call((function(t){return e.services.transitions.setupTransition({transition:t,name:"legend-hover-treemap"})})).attr("opacity",(function(t){return t.parent.data.name===n.datum().name?1:.3}))},e.handleLegendMouseOut=function(t){e.parent.selectAll("g[data-name='leaf']").transition("legend-mouseout-treemap").call((function(t){return e.services.transitions.setupTransition({transition:t,name:"legend-mouseout-treemap"})})).attr("opacity",1)},e}return n(e,t),e.prototype.init=function(){var t=this.services.events;t.addEventListener(ht.Legend.ITEM_HOVER,this.handleLegendOnHover),t.addEventListener(ht.Legend.ITEM_MOUSEOUT,this.handleLegendMouseOut)},e.prototype.render=function(t){var e=this;void 0===t&&(t=!0);var n=this.getComponentContainer(),r=(this.model.getData(),this.model.getDisplayData()),i=this.model.getOptions(),o=Za(window,"location"),a=Hg.getSVGElementSize(n,{useAttrs:!0}),s=a.width,l=a.height,u=F_({name:i.title||"Treemap",children:r}).sum((function(t){return t.value})).sort((function(t,e){return e.value-t.value})),c=function(){var t=Cx,e=!1,n=1,r=1,i=[0],o=Q_,a=Q_,s=Q_,l=Q_,u=Q_;function c(t){return t.x0=t.y0=0,t.x1=n,t.y1=r,t.eachBefore(h),i=[0],e&&t.eachBefore(yx),t}function h(e){var n=i[e.depth],r=e.x0+n,c=e.y0+n,h=e.x1-n,d=e.y1-n;h<r&&(r=h=(r+h)/2),d<c&&(c=d=(c+d)/2),e.x0=r,e.y0=c,e.x1=h,e.y1=d,e.children&&(n=i[e.depth+1]=o(e)/2,r+=u(e)-n,c+=a(e)-n,(h-=s(e)-n)<r&&(r=h=(r+h)/2),(d-=l(e)-n)<c&&(c=d=(c+d)/2),t(e,r,c,h,d))}return c.round=function(t){return arguments.length?(e=!!t,c):e},c.size=function(t){return arguments.length?(n=+t[0],r=+t[1],c):[n,r]},c.tile=function(e){return arguments.length?(t=K_(e),c):t},c.padding=function(t){return arguments.length?c.paddingInner(t).paddingOuter(t):c.paddingInner()},c.paddingInner=function(t){return arguments.length?(o="function"==typeof t?t:J_(+t),c):o},c.paddingOuter=function(t){return arguments.length?c.paddingTop(t).paddingRight(t).paddingBottom(t).paddingLeft(t):c.paddingTop()},c.paddingTop=function(t){return arguments.length?(a="function"==typeof t?t:J_(+t),c):a},c.paddingRight=function(t){return arguments.length?(s="function"==typeof t?t:J_(+t),c):s},c.paddingBottom=function(t){return arguments.length?(l="function"==typeof t?t:J_(+t),c):l},c.paddingLeft=function(t){return arguments.length?(u="function"==typeof t?t:J_(+t),c):u},c}().size([s,l]).paddingInner(1).paddingOuter(0).round(!0)(u),h=(this.services.transitions,n.selectAll("g[data-name='leaf']").data(c.leaves(),(function(t){return t.data.name})));h.exit().attr("opacity",0).remove();var d=h.enter().append("g").attr("data-name","leaf").attr("data-uid",(function(){return iw++})).merge(h);d.attr("data-name","leaf").transition().call((function(n){return e.services.transitions.setupTransition({transition:n,name:"treemap-group-update",animate:t})})).attr("transform",(function(t){return"translate("+t.x0+","+t.y0+")"}));var f=d.selectAll("rect.leaf").data((function(t){return[t]}));f.exit().attr("width",0).attr("height",0).remove(),f.enter().append("rect").classed("leaf",!0).merge(f).attr("width",0).attr("height",0).attr("id",(function(){var t=Ba(this.parentNode).attr("data-uid");return i.style.prefix+"-leaf-"+t})).attr("class",(function(t){for(;t.depth>1;)t=t.parent;return e.model.getColorClassName({classNameTypes:[N.FILL],dataGroupName:t.data.name,originalClassName:"leaf"})})).transition().call((function(n){return e.services.transitions.setupTransition({transition:n,name:"treemap-leaf-update-enter",animate:t})})).attr("width",(function(t){return t.x1-t.x0})).attr("height",(function(t){return t.y1-t.y0})).style("fill",(function(t){for(;t.depth>1;)t=t.parent;return e.model.getFillColor(t.data.name)})),d.selectAll("clipPath").data((function(t){return!0!==t.data.showLabel?[]:[1]}),(function(t){return t})).join((function(t){t.append("clipPath").attr("id",(function(){var t=Ba(this.parentNode).attr("data-uid");return i.style.prefix+"-clip-"+t})).append("use").attr("xlink:href",(function(){var t=Ba(this.parentNode.parentNode).attr("data-uid"),e=i.style.prefix+"-leaf-"+t;return new URL("#"+e,o)+""}))}),(function(t){return null}),(function(t){return t.remove()})),d.selectAll("text").data((function(t){if(!0!==t.data.showLabel)return[];for(var n=t;n.depth>1;)n=n.parent;var r=Kl(e.model.getFillColor(n.data.name));return[{text:t.data.name,color:r.l<.5?"white":"black"}]}),(function(t){return t})).join((function(t){var e=t.append("text").text((function(t){return t.text})).style("fill",rw).attr("x",7).attr("y",18);o&&e.attr("clip-path",(function(){var t=Ba(this.parentNode).attr("data-uid"),e=i.style.prefix+"-clip-"+t;return"url("+new URL("#"+e,o)+")"}))}),(function(t){return t.text((function(t){return t.text})).style("fill",rw)}),(function(t){return t.remove()})),this.addEventListeners()},e.prototype.addEventListeners=function(){var t=this;this.parent.selectAll("rect.leaf").on("mouseover",(function(e,n){for(var r=Ba(this),i=getComputedStyle(this,null).getPropertyValue("fill"),o=n;o.depth>1;)o=o.parent;r.transition("graph_element_mouseover_fill_update").call((function(e){return t.services.transitions.setupTransition({transition:e,name:"graph_element_mouseover_fill_update"})})).style("fill",(function(e){var n=t.model.getFillColor(e.parent.data.name);return n&&(i=n),Bl(i).darker(.7).toString()})),t.services.events.dispatchEvent(ht.Tooltip.SHOW,{event:e,hoveredElement:r,items:[{color:i,label:o.data.name,bold:!0},{label:n.data.name,value:n.data.value}]}),t.services.events.dispatchEvent(ht.Treemap.LEAF_MOUSEOVER,{event:e,element:r,datum:n})})).on("mousemove",(function(e,n){var r=Ba(this);t.services.events.dispatchEvent(ht.Treemap.LEAF_MOUSEMOVE,{event:e,element:r,datum:n}),t.services.events.dispatchEvent(ht.Tooltip.MOVE,{event:e})})).on("click",(function(e,n){t.services.events.dispatchEvent(ht.Treemap.LEAF_CLICK,{event:e,element:Ba(this),datum:n})})).on("mouseout",(function(e,n){var r=Ba(this);r.classed("hovered",!1);for(var i=n;i.depth>1;)i=i.parent;r.transition().call((function(e){return t.services.transitions.setupTransition({transition:e,name:"graph_element_mouseout_fill_update"})})).style("fill",(function(e){return t.model.getFillColor(e.parent.data.name)})),t.services.events.dispatchEvent(ht.Treemap.LEAF_MOUSEOUT,{event:e,element:r,datum:n}),t.services.events.dispatchEvent(ht.Tooltip.HIDE,{hoveredElement:r})}))},e}(Kg);function aw(t){var e=function(t,e){return(t%e+e)%e}(lw(t),360);return sw(e,[0,10])||sw(e,[350,0])?{textAnchor:K.START,dominantBaseline:Q.MIDDLE}:sw(e,[10,80])?{textAnchor:K.START,dominantBaseline:Q.HANGING}:sw(e,[80,100])?{textAnchor:K.MIDDLE,dominantBaseline:Q.HANGING}:sw(e,[100,170])?{textAnchor:K.END,dominantBaseline:Q.HANGING}:sw(e,[170,190])?{textAnchor:K.END,dominantBaseline:Q.MIDDLE}:sw(e,[190,260])?{textAnchor:K.END,dominantBaseline:Q.BASELINE}:sw(e,[260,280])?{textAnchor:K.MIDDLE,dominantBaseline:Q.BASELINE}:{textAnchor:K.START,dominantBaseline:Q.BASELINE}}function sw(t,e){var n=e[0],r=e[1];return t>=n&&t<=r}function lw(t){return t*(180/Math.PI)}function uw(t,e,n){void 0===n&&(n={x:0,y:0});var r=e*Math.cos(t)+n.x,i=e*Math.sin(t)+n.y;return{x:isNaN(r)?0:r,y:isNaN(i)?0:i}}var cw=function(t){function e(){var e=null!==t&&t.apply(this,arguments)||this;return e.type="radar",e.renderType=I.SVG,e.getLabelDimensions=function(t){var n=Hg.appendOrSelect(e.getComponentContainer(),"g.tmp-tick"),r=Hg.appendOrSelect(n,"text").text(t),i=Hg.getSVGElementSize(r.node(),{useBBox:!0}),o=i.width,a=i.height;return n.remove(),{width:o,height:a}},e.normalizeFlatData=function(t){var n=e.getOptions(),r=Za(n,"radar","axes"),i=r.angle,o=r.value,a=Za(n,"data","groupMapsTo"),s=lo(e.uniqueKeys.map((function(t){return e.uniqueGroups.map((function(e){var n;return(n={})[i]=t,n[a]=e,n[o]=null,n}))})));return bo(s,t)},e.normalizeGroupedData=function(t){var n=e.getOptions(),r=Za(n,"radar","axes"),i=r.angle,o=r.value,a=Za(n,"data","groupMapsTo");return t.map((function(t){var n=t.name,r=t.data,s=e.uniqueKeys.map((function(t){var e;return(e={})[a]=n,e[i]=t,e[o]=null,e}));return{name:n,data:bo(s,r)}}))},e.handleLegendOnHover=function(t){var n=t.detail.hoveredElement;e.parent.selectAll("g.blobs path").transition("legend-hover-blob").call((function(t){return e.services.transitions.setupTransition({transition:t,name:"legend-hover-blob"})})).style("fill-opacity",(function(t){return t.name!==n.datum().name?Mt.opacity.unselected:Mt.opacity.selected})).style("stroke-opacity",(function(t){return t.name!==n.datum().name?Mt.opacity.unselected:1}))},e.handleLegendMouseOut=function(t){e.parent.selectAll("g.blobs path").transition("legend-mouseout-blob").call((function(t){return e.services.transitions.setupTransition({transition:t,name:"legend-mouseout-blob"})})).style("fill-opacity",Mt.opacity.selected).style("stroke-opacity",1)},e}return n(e,t),e.prototype.init=function(){var t=this.services.events;t.addEventListener(ht.Legend.ITEM_HOVER,this.handleLegendOnHover),t.addEventListener(ht.Legend.ITEM_MOUSEOUT,this.handleLegendMouseOut)},e.prototype.render=function(t){var e=this;void 0===t&&(t=!0);var n=this.getComponentContainer(),i=Hg.getSVGElementSize(n,{useAttrs:!0}),o=i.width,a=i.height,s=this.model.getData(),l=this.model.getGroupedData(),u=this.getOptions(),c=Za(u,"data","groupMapsTo"),h=Za(u,"radar","axes","value"),d=Za(u,"radar","axes"),f=d.angle,p=d.value,g=Mt.xLabelPadding,v=Mt.yLabelPadding,m=Mt.yTicksNumber,y=Mt.minRange,b=Mt.xAxisRectHeight;this.uniqueKeys=Array.from(new Set(s.map((function(t){return t[f]})))),this.uniqueGroups=Array.from(new Set(s.map((function(t){return t[c]})))),this.fullDataNormalized=this.normalizeFlatData(s),this.groupedDataNormalized=this.normalizeGroupedData(l);var E=2*(this.getLabelDimensions(this.uniqueKeys[0]).height+v),_=(Math.min(o,a)-E)/2;if(!(_<=0)){var x=_l().domain(this.fullDataNormalized.map((function(t){return t[f]}))).range([0,2*Math.PI].map((function(t){return t-Math.PI/2}))),w=dl(this.fullDataNormalized.map((function(t){return t[p]}))),O=Xu().domain([w>=0?0:w,hl(this.fullDataNormalized.map((function(t){return t[p]})))]).range([y,_]).nice(m),T=O.ticks(m),S=function(t){return e.model.getFillColor(t)},M=Bd().angle((function(t){return x(t[f])+Math.PI/2})).radius((function(t){return O(t[p])})).curve(vf),C={x:hl(this.uniqueKeys.map((function(t){return e.getLabelDimensions(t).width+function(t,e){return e*Math.sin(t-Math.PI/2)}(x(t),_)})))+g,y:a/2},A=Hg.appendOrSelect(n,"g.y-axes").attr("role",r.GROUP).selectAll("path").data(T,(function(t){return t})),L=function(t){return e.uniqueKeys.map((function(e){var n;return(n={})[f]=e,n[p]=t,n}))};A.join((function(n){return n.append("path").attr("opacity",0).attr("transform","translate("+C.x+", "+C.y+")").attr("fill","none").call((function(n){return n.transition().call((function(n){return e.services.transitions.setupTransition({transition:n,name:"radar_y_axes_enter",animate:t})})).attr("opacity",1).attr("d",(function(t){return M(L(t))}))}))}),(function(n){return n.call((function(n){return n.transition().call((function(n){return e.services.transitions.setupTransition({transition:n,name:"radar_y_axes_update",animate:t})})).attr("opacity",1).attr("transform","translate("+C.x+", "+C.y+")").attr("d",(function(t){return M(L(t))}))}))}),(function(n){return n.call((function(n){return n.transition().call((function(n){return e.services.transitions.setupTransition({transition:n,name:"radar_y_axes_exit",animate:t})})).attr("d",(function(t){return M(L(t))})).attr("opacity",0).remove()}))})),Hg.appendOrSelect(n,"g.x-axes").attr("role",r.GROUP).selectAll("line").data(this.uniqueKeys,(function(t){return t})).join((function(n){return n.append("line").attr("opacity",0).attr("class",(function(t){return"x-axis-"+yo(t)})).attr("stroke-dasharray","0").attr("x1",(function(t){return uw(x(t),0,C).x})).attr("y1",(function(t){return uw(x(t),0,C).y})).attr("x2",(function(t){return uw(x(t),0,C).x})).attr("y2",(function(t){return uw(x(t),0,C).y})).call((function(n){return n.transition().call((function(n){return e.services.transitions.setupTransition({transition:n,name:"radar_x_axes_enter",animate:t})})).attr("opacity",1).attr("x1",(function(t){return uw(x(t),O.range()[0],C).x})).attr("y1",(function(t){return uw(x(t),O.range()[0],C).y})).attr("x2",(function(t){return uw(x(t),O.range()[1],C).x})).attr("y2",(function(t){return uw(x(t),O.range()[1],C).y}))}))}),(function(n){return n.call((function(n){return n.transition().call((function(n){return e.services.transitions.setupTransition({transition:n,name:"radar_x_axes_update",animate:t})})).attr("opacity",1).attr("x1",(function(t){return uw(x(t),O.range()[0],C).x})).attr("y1",(function(t){return uw(x(t),O.range()[0],C).y})).attr("x2",(function(t){return uw(x(t),O.range()[1],C).x})).attr("y2",(function(t){return uw(x(t),O.range()[1],C).y}))}))}),(function(n){return n.call((function(n){return n.transition().call((function(n){return e.services.transitions.setupTransition({transition:n,name:"radar_x_axes_exit",animate:t})})).attr("opacity",0).remove()}))})),Hg.appendOrSelect(n,"g.x-labels").attr("role",r.GROUP).selectAll("text").data(this.uniqueKeys).join((function(n){return n.append("text").text((function(t){return t})).attr("opacity",0).attr("x",(function(t){return uw(x(t),O.range()[1]+g,C).x})).attr("y",(function(t){return uw(x(t),O.range()[1]+g,C).y})).style("text-anchor",(function(t){return aw(x(t)).textAnchor})).style("dominant-baseline",(function(t){return aw(x(t)).dominantBaseline})).call((function(n){return n.transition().call((function(n){return e.services.transitions.setupTransition({transition:n,name:"radar_x_labels_enter",animate:t})})).attr("opacity",1)}))}),(function(r){return r.call((function(r){return r.transition().call((function(n){return e.services.transitions.setupTransition({transition:n,name:"radar_x_labels_update",animate:t})})).attr("opacity",1).attr("x",(function(t){return uw(x(t),O.range()[1]+g,C).x})).attr("y",(function(t){return uw(x(t),O.range()[1]+g,C).y})).end().finally((function(){var t=Za(u,"radar","alignment"),r=e.getAlignmentXOffset(t,n,e.getParent());n.attr("x",r)}))}))}),(function(n){return n.call((function(n){return n.transition().call((function(n){return e.services.transitions.setupTransition({transition:n,name:"radar_x_labels_exit",animate:t})})).attr("opacity",0).remove()}))})),Hg.appendOrSelect(n,"g.blobs").attr("role",r.GROUP).selectAll("path").data(this.groupedDataNormalized,(function(t){return t.name})).join((function(n){return n.append("path").attr("class",(function(t){return e.model.getColorClassName({classNameTypes:[N.FILL,N.STROKE],dataGroupName:t.name,originalClassName:"blob"})})).attr("role",r.GRAPHICS_SYMBOL).attr("aria-label",(function(t){return t.name})).attr("opacity",0).attr("transform",t?function(){return"translate("+C.x+", "+C.y+") scale("+(1+.35*Math.random())+")"}:"translate("+C.x+", "+C.y+")").style("fill",(function(t){return S(t.name)})).style("fill-opacity",Mt.opacity.selected).style("stroke",(function(t){return S(t.name)})).call((function(n){var r=n.transition().call((function(n){return e.services.transitions.setupTransition({transition:n,name:"radar_blobs_enter",animate:t})}));t&&r.delay((function(){return 30*Math.random()})).attr("transform","translate("+C.x+", "+C.y+")"),r.attr("opacity",1).attr("d",(function(t){return M(t.data)}))}))}),(function(n){n.attr("class",(function(t){return e.model.getColorClassName({classNameTypes:[N.FILL,N.STROKE],dataGroupName:t.name,originalClassName:"blob"})})).style("fill",(function(t){return S(t.name)})).style("stroke",(function(t){return S(t.name)})),n.call((function(n){return n.transition().call((function(n){return e.services.transitions.setupTransition({transition:n,name:"radar_blobs_update",animate:t})})).attr("opacity",1).attr("transform","translate("+C.x+", "+C.y+")").attr("d",(function(t){return M(t.data)}))}))}),(function(n){return n.call((function(n){var r=n.transition().call((function(n){return e.services.transitions.setupTransition({transition:n,name:"radar_blobs_exit",animate:t})}));t&&r.delay((function(){return 30*Math.random()})).attr("transform",(function(){return"translate("+C.x+", "+C.y+") scale("+(1+.35*Math.random())+")"})),r.attr("opacity",0).remove()}))})),Hg.appendOrSelect(n,"g.dots").attr("role",r.GROUP).selectAll("circle").data(this.fullDataNormalized.filter((function(t){return null!==Za(t,p)}))).join((function(t){return t.append("circle").attr("role",r.GRAPHICS_SYMBOL).attr("aria-label",(function(t){return t[h]}))}),(function(t){return t}),(function(t){return t.remove()})).attr("class",(function(t){return e.model.getColorClassName({classNameTypes:[N.FILL],dataGroupName:t[c],originalClassName:yo(t[f])})})).attr("cx",(function(t){return uw(x(t[f]),O(t[p]),C).x})).attr("cy",(function(t){return uw(x(t[f]),O(t[p]),C).y})).attr("r",0).attr("opacity",0).style("fill",(function(t){return S(t[c])})),Hg.appendOrSelect(n,"g.x-axes-rect").attr("role",r.GROUP).selectAll("rect").data(this.uniqueKeys).join((function(t){return t.append("rect")}),(function(t){return t}),(function(t){return t.remove()})).attr("x",C.x).attr("y",C.y-b/2).attr("width",O.range()[1]).attr("height",b).style("fill","red").style("fill-opacity",0).attr("transform",(function(t){return"rotate("+lw(x(t))+", "+C.x+", "+C.y+")"})),Hg.appendOrSelect(n,"g.y-labels").attr("role",r.GROUP).selectAll("text").data(Ys(T)).join((function(n){return n.append("text").attr("opacity",0).text((function(t){return t})).attr("x",(function(t){return uw(-Math.PI/2,O(t),C).x+v})).attr("y",(function(t){return uw(-Math.PI/2,O(t),C).y})).style("text-anchor","start").style("dominant-baseline","middle").call((function(n){return n.transition().call((function(n){return e.services.transitions.setupTransition({transition:n,name:"radar_y_labels_enter",animate:t})})).attr("opacity",1)}))}),(function(n){return n.call((function(n){return n.transition().call((function(n){return e.services.transitions.setupTransition({transition:n,name:"radar_y_labels_update",animate:t})})).text((function(t){return t})).attr("opacity",1).attr("x",(function(t){return uw(-Math.PI/2,O(t),C).x+v})).attr("y",(function(t){return uw(-Math.PI/2,O(t),C).y}))}))}),(function(n){return n.call((function(n){return n.transition().call((function(n){return e.services.transitions.setupTransition({transition:n,name:"radar_y_labels_exit",animate:t})})).attr("opacity",0).remove()}))})),this.addEventListeners()}},e.prototype.getAlignmentXOffset=function(t,e,n){var r=Hg.getSVGElementSize(e,{useBBox:!0}),i=Hg.getSVGElementSize(n,{useAttrs:!0}).width,o=0;return t===j.CENTER?o=Math.floor((i-r.width)/2):t===j.RIGHT&&(o=i-r.width),o},e.prototype.destroy=function(){this.parent.selectAll(".x-axes-rect > rect").on("mouseover",null).on("mousemove",null).on("mouseout",null);var t=this.services.events;t.removeEventListener(ht.Legend.ITEM_HOVER,this.handleLegendOnHover),t.removeEventListener(ht.Legend.ITEM_MOUSEOUT,this.handleLegendMouseOut)},e.prototype.addEventListeners=function(){var t=this,e=Za(this.getOptions(),"radar").axes.angle;this.parent.selectAll(".x-axes-rect > rect").on("mouseover",(function(n,r){var i=Ba(this);t.services.events.dispatchEvent(ht.Radar.X_AXIS_MOUSEOVER,{event:n,element:i,datum:r});var o=t.parent.select(".x-axes .x-axis-"+yo(r)),a=t.parent.selectAll(".dots circle."+yo(r)),s=t.model.getActiveDataGroupNames(),l=t.getOptions(),u=l.data.groupMapsTo,c=Za(l,"radar","axes","value");o.classed("hovered",!0).attr("stroke-dasharray","4 4"),a.classed("hovered",!0).attr("opacity",(function(t){return-1!==s.indexOf(t[u])?1:0})).attr("r",Mt.dotsRadius);var h=t.fullDataNormalized.filter((function(t){return t[e]===r&&-1!==s.indexOf(t[u])}));t.services.events.dispatchEvent(ht.Tooltip.SHOW,{event:n,hoveredElement:i,items:h.filter((function(t){return"number"==typeof t[c]})).map((function(e){return{label:e[u],value:e[c],color:t.model.getFillColor(e[u]),class:t.model.getColorClassName({classNameTypes:[N.TOOLTIP],dataGroupName:e[u]})}}))})})).on("mousemove",(function(e,n){var r=Ba(this);t.services.events.dispatchEvent(ht.Radar.X_AXIS_MOUSEMOVE,{event:e,element:r,datum:n}),t.services.events.dispatchEvent(ht.Tooltip.MOVE,{event:e})})).on("click",(function(e,n){t.services.events.dispatchEvent(ht.Radar.X_AXIS_CLICK,{event:e,element:Ba(this),datum:n})})).on("mouseout",(function(e,n){var r=Ba(this),i=t.parent.select(".x-axes .x-axis-"+yo(n)),o=t.parent.selectAll(".dots circle."+yo(n));i.classed("hovered",!1).attr("stroke-dasharray","0"),o.classed("hovered",!1).attr("opacity",0).attr("r",0),t.services.events.dispatchEvent(ht.Radar.X_AXIS_MOUSEOUT,{event:e,element:r,datum:n}),t.services.events.dispatchEvent(ht.Tooltip.HIDE)}))},e}(Kg),hw=function(t){function e(){var e=null!==t&&t.apply(this,arguments)||this;return e.type="circle-pack",e.renderType=I.SVG,e.handleLegendOnHover=function(t){var n=t.detail.hoveredElement;e.parent.selectAll("circle.node").transition("legend-hover-circlepack").call((function(t){return e.services.transitions.setupTransition({transition:t,name:"legend-hover-circlepack"})})).attr("opacity",(function(t){return t.data.dataGroupName===n.datum().name?1:bt.circles.fillOpacity}))},e.handleLegendMouseOut=function(t){e.parent.selectAll("circle.node").transition("legend-mouseout-circlepack").call((function(t){return e.services.transitions.setupTransition({transition:t,name:"legend-mouseout-circlepack"})})).attr("opacity",1)},e}return n(e,t),e.prototype.render=function(t){var e=this,n=this.getComponentContainer({withinChartClip:!0}),r=Hg.getSVGElementSize(this.parent,{useAttrs:!0}),i=r.width,o=r.height;if(!(i<1||o<1)){var a=this.model.getDisplayData(),s=this.model.hasParentNode(),l=this.model.getHierarchyLevel(),u=this.getOptions(),c=Za(u,"canvasZoom","enabled");s&&Za(a,0,"children")&&(a=Za(a,0,"children"));var h=F_({children:a}).sum((function(t){return t.value})).sort((function(t,e){return e.value-t.value})),d=px().size([i,o]).padding((function(t){return t.depth>=1?bt.padding.children+3:bt.padding.mainGroup+3}))(h).descendants().splice(1).filter((function(t){return t.depth<=l})),f=n.selectAll("circle.node").data(d);f.exit().attr("width",0).attr("height",0).remove();var p=f.enter().append("circle").classed("node",!0);p.merge(f).attr("class",(function(t){var n=c&&3===l?e.getZoomClass(t):"";return e.model.getColorClassName({classNameTypes:[N.FILL,N.STROKE],dataGroupName:t.data.dataGroupName,originalClassName:t.children?"node "+n:"node node-leaf "+n})})).style("fill",(function(t){return e.model.getFillColor(t.data.dataGroupName)})).style("stroke",(function(t){return e.model.getFillColor(t.data.dataGroupName)})).attr("cx",(function(t){return t.x})).attr("cy",(function(t){return t.y})).transition("circlepack-leaf-update-enter").call((function(t){return e.services.transitions.setupTransition({transition:t,name:"circlepack-leaf-update-enter"})})).attr("r",(function(t){return t.r})).attr("opacity",1).attr("fill-opacity",bt.circles.fillOpacity),!0===c&&this.focal&&(this.services.canvasZoom.zoomIn(this.focal,p,yt),this.setBackgroundListeners()),s||this.addLegendListeners(),this.addEventListeners()}},e.prototype.unhighlightChildren=function(t){var e=this,n=t.map((function(t){return t.data}));this.parent.selectAll("circle.node").filter((function(t){return n.some((function(e){return e===t.data}))&&t.depth>1})).style("stroke",(function(t){return e.model.getFillColor(t.data.dataGroupName)}))},e.prototype.highlightChildren=function(t){var e=t.map((function(t){return t.data}));this.parent.selectAll("circle.node").filter((function(t){return e.some((function(e){return e===t.data}))&&t.depth>1})).style("stroke",bt.circles.hover.stroke)},e.prototype.getZoomClass=function(t){return 3===this.model.getHierarchyLevel()&&this.focal&&(t.data===this.focal.data||this.focal.children.some((function(e){return e.data===t.data})))?"focal":"non-focal"},e.prototype.addLegendListeners=function(){var t=this.services.events;t.addEventListener(ht.Legend.ITEM_HOVER,this.handleLegendOnHover),t.addEventListener(ht.Legend.ITEM_MOUSEOUT,this.handleLegendMouseOut)},e.prototype.removeBackgroundListeners=function(){Ba(this.services.domUtils.getMainContainer()).on("click",(function(){return null}))},e.prototype.setBackgroundListeners=function(){var t=Ba(this.services.domUtils.getMainContainer()),e=this,n=this.parent.selectAll("circle.node"),r=Za(Gs,"canvasZoomSettings");t.on("click",(function(){e.focal=null,e.model.updateHierarchyLevel(2),t.classed("zoomed-in",!1),e.services.canvasZoom.zoomOut(n,r)}))},e.prototype.getZoomIcon=function(){return'\n\t\t<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 10 10">\n\t\t\t<polygon points="5.93 3.71 4.45 3.71 4.45 2.23 3.71 2.23 3.71 3.71 2.23 3.71 2.23 4.45 3.71 4.45 3.71 5.93 4.45 5.93 4.45 4.45 5.93 4.45 5.93 3.71"/>\n\t\t\t<path d="M7.2,6.67a4,4,0,0,0,1-2.59A4.08,4.08,0,1,0,4.07,8.15h0a4,4,0,0,0,2.59-1L9.48,10,10,9.48Zm-3.12.77A3.34,3.34,0,1,1,7.41,4.08,3.34,3.34,0,0,1,4.08,7.44Z"/>\n\t\t</svg>'},e.prototype.addEventListeners=function(){var t=this;this.parent.selectAll("circle.node").on("mouseover",(function(e,n){var r=Ba(this);r.classed("hovered",!0);var i=t.model.getHierarchyLevel(),o=i>2&&!r.classed("focal"),a=Za(t.model.getOptions(),"canvasZoom","enabled"),s=!1;if(!o){var l=[],u=[],c=null;if(n.children)n.depth>1&&a&&(s=!0,r.classed("clickable",!0)),l=n.children.map((function(e){if(null!==e)return"number"==typeof e.data.value?{label:e.data.name,value:e.data.value}:{label:e.data.name,labelIcon:a&&i<=2?t.getZoomIcon():null,value:e.value}})),u=[{label:jn(t.model.getOptions(),"tooltip.totalLabel")||"Total",value:n.value,bold:!0}],t.highlightChildren(n.children);else c=n.value;var h=getComputedStyle(this,null).getPropertyValue("fill");t.services.events.dispatchEvent(ht.Tooltip.SHOW,{event:e,hoveredElement:r,items:R([{color:h,label:n.data.name,labelIcon:s&&a&&i<=2?t.getZoomIcon():null,value:c}],l,u)})}t.services.events.dispatchEvent(ht.CirclePack.CIRCLE_MOUSEOVER,{event:e,element:r,datum:n})})).on("mousemove",(function(e,n){var r=Ba(this);t.services.events.dispatchEvent(ht.CirclePack.CIRCLE_MOUSEMOVE,{event:e,element:r,datum:n}),t.services.events.dispatchEvent(ht.Tooltip.MOVE,{event:e})})).on("mouseout",(function(e,n){var r=Ba(this);r.classed("hovered",!1),n.children&&t.unhighlightChildren(n.children),t.services.events.dispatchEvent(ht.CirclePack.CIRCLE_MOUSEOUT,{event:e,element:r,datum:n}),t.services.events.dispatchEvent(ht.Tooltip.HIDE,{hoveredElement:r})})).on("click",(function(e,n){var r=Ba(this),i=r.classed("non-focal"),o=Za(t.model.getOptions(),"canvasZoom","enabled");if(o&&t.model.getHierarchyLevel()>2){var a=t.parent.selectAll("circle.node");Ba(t.services.domUtils.getMainContainer()).classed("zoomed-in",!1),t.focal=null,t.model.updateHierarchyLevel(2),t.services.canvasZoom.zoomOut(a,yt)}else if(2===n.depth&&n.children&&!i&&o){a=t.parent.selectAll("circle.node");Ba(t.services.domUtils.getMainContainer()).classed("zoomed-in",!0),t.focal=n,t.model.updateHierarchyLevel(3),t.services.canvasZoom.zoomIn(n,a,yt),e.stopPropagation()}t.services.events.dispatchEvent(ht.CirclePack.CIRCLE_CLICK,{event:e,element:r,datum:n})}))},e.prototype.destroy=function(){this.parent.selectAll("circle.node").on("mouseover",null).on("mousemove",null).on("mouseout",null).on("click",null);var t=this.services.events;t.removeEventListener(ht.Legend.ITEM_HOVER,this.handleLegendOnHover),t.removeEventListener(ht.Legend.ITEM_MOUSEOUT,this.handleLegendMouseOut),this.removeBackgroundListeners()},e}(Kg),dw={value:function(){}};function fw(){for(var t,e=0,n=arguments.length,r={};e<n;++e){if(!(t=arguments[e]+"")||t in r||/[\s.]/.test(t))throw new Error("illegal type: "+t);r[t]=[]}return new pw(r)}function pw(t){this._=t}function gw(t,e){return t.trim().split(/^|\s+/).map((function(t){var n="",r=t.indexOf(".");if(r>=0&&(n=t.slice(r+1),t=t.slice(0,r)),t&&!e.hasOwnProperty(t))throw new Error("unknown type: "+t);return{type:t,name:n}}))}function vw(t,e){for(var n,r=0,i=t.length;r<i;++r)if((n=t[r]).name===e)return n.value}function mw(t,e,n){for(var r=0,i=t.length;r<i;++r)if(t[r].name===e){t[r]=dw,t=t.slice(0,r).concat(t.slice(r+1));break}return null!=n&&t.push({name:e,value:n}),t}pw.prototype=fw.prototype={constructor:pw,on:function(t,e){var n,r=this._,i=gw(t+"",r),o=-1,a=i.length;if(!(arguments.length<2)){if(null!=e&&"function"!=typeof e)throw new Error("invalid callback: "+e);for(;++o<a;)if(n=(t=i[o]).type)r[n]=mw(r[n],t.name,e);else if(null==e)for(n in r)r[n]=mw(r[n],t.name,null);return this}for(;++o<a;)if((n=(t=i[o]).type)&&(n=vw(r[n],t.name)))return n},copy:function(){var t={},e=this._;for(var n in e)t[n]=e[n].slice();return new pw(t)},call:function(t,e){if((n=arguments.length-2)>0)for(var n,r,i=new Array(n),o=0;o<n;++o)i[o]=arguments[o+2];if(!this._.hasOwnProperty(t))throw new Error("unknown type: "+t);for(o=0,n=(r=this._[t]).length;o<n;++o)r[o].value.apply(e,i)},apply:function(t,e,n){if(!this._.hasOwnProperty(t))throw new Error("unknown type: "+t);for(var r=this._[t],i=0,o=r.length;i<o;++i)r[i].value.apply(e,n)}};var yw=Object.freeze({__proto__:null,dispatch:fw}).dispatch,bw=Math.PI/180,Ew=function(){var t=[256,256],e=_w,n=xw,r=Ow,i=ww,o=ww,a=Tw,s=Sw,l=Dw,u=[],c=1/0,h=yw("word","end"),d=null,f=Math.random,p={},g=kw;function v(e,n,r){t[0],t[1];for(var i,o,a,s=n.x,u=n.y,c=Math.sqrt(t[0]*t[0]+t[1]*t[1]),h=l(t),d=f()<.5?1:-1,p=-d;(i=h(p+=d))&&(o=~~i[0],a=~~i[1],!(Math.min(Math.abs(o),Math.abs(a))>=c));)if(n.x=s+o,n.y=u+a,!(n.x+n.x0<0||n.y+n.y0<0||n.x+n.x1>t[0]||n.y+n.y1>t[1])&&(!r||!Cw(n,e,t[0]))&&(!r||Lw(n,r))){for(var g,v=n.sprite,m=n.width>>5,y=t[0]>>5,b=n.x-(m<<4),E=127&b,_=32-E,x=n.y1-n.y0,w=(n.y+n.y0)*y+(b>>5),O=0;O<x;O++){g=0;for(var T=0;T<=m;T++)e[w+T]|=g<<_|(T<m?(g=v[O*m+T])>>>E:0);w+=y}return delete n.sprite,!0}return!1}return p.canvas=function(t){return arguments.length?(g=Rw(t),p):g},p.start=function(){var l=function(t){t.width=t.height=1;var e=Math.sqrt(t.getContext("2d").getImageData(0,0,1,1).data.length>>2);t.width=2048/e,t.height=2048/e;var n=t.getContext("2d");return n.fillStyle=n.strokeStyle="red",n.textAlign="center",{context:n,ratio:e}}(g()),m=function(t){var e=[],n=-1;for(;++n<t;)e[n]=0;return e}((t[0]>>5)*t[1]),y=null,b=u.length,E=-1,_=[],x=u.map((function(t,l){return t.text=e.call(this,t,l),t.font=n.call(this,t,l),t.style=i.call(this,t,l),t.weight=o.call(this,t,l),t.rotate=a.call(this,t,l),t.size=~~r.call(this,t,l),t.padding=s.call(this,t,l),t})).sort((function(t,e){return e.size-t.size}));return d&&clearInterval(d),d=setInterval(w,0),w(),p;function w(){for(var e=Date.now();Date.now()-e<c&&++E<b&&d;){var n=x[E];n.x=t[0]*(f()+.5)>>1,n.y=t[1]*(f()+.5)>>1,Mw(l,n,x,E),n.hasText&&v(m,n,y)&&(_.push(n),h.call("word",p,n),y?Aw(y,n):y=[{x:n.x+n.x0,y:n.y+n.y0},{x:n.x+n.x1,y:n.y+n.y1}],n.x-=t[0]>>1,n.y-=t[1]>>1)}E>=b&&(p.stop(),h.call("end",p,_,y))}},p.stop=function(){return d&&(clearInterval(d),d=null),p},p.timeInterval=function(t){return arguments.length?(c=null==t?1/0:t,p):c},p.words=function(t){return arguments.length?(u=t,p):u},p.size=function(e){return arguments.length?(t=[+e[0],+e[1]],p):t},p.font=function(t){return arguments.length?(n=Rw(t),p):n},p.fontStyle=function(t){return arguments.length?(i=Rw(t),p):i},p.fontWeight=function(t){return arguments.length?(o=Rw(t),p):o},p.rotate=function(t){return arguments.length?(a=Rw(t),p):a},p.text=function(t){return arguments.length?(e=Rw(t),p):e},p.spiral=function(t){return arguments.length?(l=Iw[t]||t,p):l},p.fontSize=function(t){return arguments.length?(r=Rw(t),p):r},p.padding=function(t){return arguments.length?(s=Rw(t),p):s},p.random=function(t){return arguments.length?(f=t,p):f},p.on=function(){var t=h.on.apply(h,arguments);return t===h?p:t},p};function _w(t){return t.text}function xw(){return"serif"}function ww(){return"normal"}function Ow(t){return Math.sqrt(t.value)}function Tw(){return 30*(~~(6*Math.random())-3)}function Sw(){return 1}function Mw(t,e,n,r){if(!e.sprite){var i=t.context,o=t.ratio;i.clearRect(0,0,2048/o,2048/o);var a=0,s=0,l=0,u=n.length;for(--r;++r<u;){e=n[r],i.save(),i.font=e.style+" "+e.weight+" "+~~((e.size+1)/o)+"px "+e.font;var c=i.measureText(e.text+"m").width*o,h=e.size<<1;if(e.rotate){var d=Math.sin(e.rotate*bw),f=Math.cos(e.rotate*bw),p=c*f,g=c*d,v=h*f,m=h*d;c=Math.max(Math.abs(p+m),Math.abs(p-m))+31>>5<<5,h=~~Math.max(Math.abs(g+v),Math.abs(g-v))}else c=c+31>>5<<5;if(h>l&&(l=h),a+c>=2048&&(a=0,s+=l,l=0),s+h>=2048)break;i.translate((a+(c>>1))/o,(s+(h>>1))/o),e.rotate&&i.rotate(e.rotate*bw),i.fillText(e.text,0,0),e.padding&&(i.lineWidth=2*e.padding,i.strokeText(e.text,0,0)),i.restore(),e.width=c,e.height=h,e.xoff=a,e.yoff=s,e.x1=c>>1,e.y1=h>>1,e.x0=-e.x1,e.y0=-e.y1,e.hasText=!0,a+=c}for(var y=i.getImageData(0,0,2048/o,2048/o).data,b=[];--r>=0;)if((e=n[r]).hasText){for(var E=(c=e.width)>>5,_=(h=e.y1-e.y0,0);_<h*E;_++)b[_]=0;if(null==(a=e.xoff))return;s=e.yoff;for(var x=0,w=-1,O=0;O<h;O++){for(_=0;_<c;_++){var T=E*O+(_>>5),S=y[2048*(s+O)+(a+_)<<2]?1<<31-_%32:0;b[T]|=S,x|=S}x?w=O:(e.y0++,h--,O--,s++)}e.y1=e.y0+w,e.sprite=b.slice(0,(e.y1-e.y0)*E)}}}function Cw(t,e,n){n>>=5;for(var r,i=t.sprite,o=t.width>>5,a=t.x-(o<<4),s=127&a,l=32-s,u=t.y1-t.y0,c=(t.y+t.y0)*n+(a>>5),h=0;h<u;h++){r=0;for(var d=0;d<=o;d++)if((r<<l|(d<o?(r=i[h*o+d])>>>s:0))&e[c+d])return!0;c+=n}return!1}function Aw(t,e){var n=t[0],r=t[1];e.x+e.x0<n.x&&(n.x=e.x+e.x0),e.y+e.y0<n.y&&(n.y=e.y+e.y0),e.x+e.x1>r.x&&(r.x=e.x+e.x1),e.y+e.y1>r.y&&(r.y=e.y+e.y1)}function Lw(t,e){return t.x+t.x1>e[0].x&&t.x+t.x0<e[1].x&&t.y+t.y1>e[0].y&&t.y+t.y0<e[1].y}function Dw(t){var e=t[0]/t[1];return function(t){return[e*(t*=.1)*Math.cos(t),t*Math.sin(t)]}}function kw(){return document.createElement("canvas")}function Rw(t){return"function"==typeof t?t:function(){return t}}var Iw={archimedean:Dw,rectangular:function(t){var e=4*t[0]/t[1],n=0,r=0;return function(t){var i=t<0?-1:1;switch(Math.sqrt(1+4*i*t)-i&3){case 0:n+=e;break;case 1:r+=4;break;case 2:n-=e;break;default:r-=4}return[n,r]}}},Pw=function(t){function e(){var e=null!==t&&t.apply(this,arguments)||this;return e.type="wordcloud",e.renderType=I.SVG,e.handleLegendOnHover=function(t){var n=t.detail.hoveredElement,r=e.getOptions().data.groupMapsTo;e.parent.selectAll("text.word").transition("legend-hover-wordcloud").call((function(t){return e.services.transitions.setupTransition({transition:t,name:"legend-hover-wordcloud"})})).attr("opacity",(function(t){return t[r]!==n.datum().name?.3:1}))},e.handleLegendMouseOut=function(t){e.parent.selectAll("text.word").transition("legend-mouseout-wordcloud").call((function(t){return e.services.transitions.setupTransition({transition:t,name:"legend-mouseout-wordcloud"})})).attr("opacity",1)},e}return n(e,t),e.prototype.init=function(){var t=this.services.events;t.addEventListener(ht.Legend.ITEM_HOVER,this.handleLegendOnHover),t.addEventListener(ht.Legend.ITEM_MOUSEOUT,this.handleLegendMouseOut)},e.prototype.render=function(t){void 0===t&&(t=!0);var e=this,n=this.getComponentContainer().attr("width","100%").attr("height","100%"),r=this.model.getDisplayData(),i=this.getFontSizeScale(r),o=this.getOptions(),a=o.wordCloud,s=a.fontSizeMapsTo,l=a.wordMapsTo,u=o.data.groupMapsTo,c=Hg.getSVGElementSize(n,{useAttrs:!0}),h=c.width,d=c.height;if(0!==h&&0!==d){var f=Ew().size([h,d]).words(r.map((function(t){var e,n=t[s];if("number"!=typeof t[s])throw Error("Badly formatted WordCloud data. `value` should only be an integer or float");return(e={})[u]=t[u],e.text=t[l],e.size=n,e.value=n,e}))).padding(5).rotate(0).fontSize((function(t){return i(t.size)})).on("end",(function(r){var i=Hg.appendOrSelect(n,"g.words");i.attr("transform","translate("+f.size()[0]/2+", "+f.size()[1]/2+")");var o=i.selectAll("text").data(r,(function(t){return t[u]+"-"+t.text}));o.exit().attr("opacity",0).remove(),o.enter().append("text").attr("opacity",0).merge(o).style("font-size",(function(t){return t.size+"px"})).text((function(t){return t.text})).attr("class",(function(t){return e.model.getColorClassName({classNameTypes:[N.FILL],dataGroupName:t[u],originalClassName:"word "+(t.size>32?"light":"")})})).style("fill",(function(t){return e.model.getFillColor(t[u],t.text,t)})).attr("text-anchor","middle").transition().call((function(n){return e.services.transitions.setupTransition({transition:n,name:"wordcloud-text-update-enter",animate:t})})).attr("transform",(function(t){return"translate("+t.x+", "+t.y+")"})).attr("opacity",1)}));f.start(),this.addEventListeners()}},e.prototype.getFontSizeScale=function(t){var e=this.getOptions(),n=e.wordCloud.fontSizeMapsTo,r=t.map((function(t){return t[n]})).filter((function(t){return t})),i=Hg.getHTMLElementSize(this.services.domUtils.getMainContainer()),o=r.length>0,a=o?Ys(r):[1,1];return Xu().domain(a).range(o?e.wordCloud.fontSizeRange(i,t):[4,4])},e.prototype.addEventListeners=function(){var t=this.getOptions(),e=t.data.groupMapsTo,n=this,r=to((function(t){var e=n.parent.selectAll("text.word").transition("wordcloud-word-mouse-highlight").call((function(t){return n.services.transitions.setupTransition({transition:t,name:"wordcloud-word-mouse-highlight"})}));null===t?e.attr("opacity",1):e.attr("opacity",(function(){return t===this?1:.3}))}),6);this.parent.selectAll("text.word").on("mouseover",(function(i,o){r(this),n.services.events.dispatchEvent(ht.WordCloud.WORD_MOUSEOVER,{event:i,element:Ba(this),datum:o}),n.services.events.dispatchEvent(ht.Tooltip.SHOW,{event:i,hoveredElement:this,items:[{label:t.tooltip.wordLabel,value:o.text},{label:t.tooltip.valueLabel,value:o.value},{label:t.tooltip.groupLabel,value:o[e],class:n.model.getColorClassName({classNameTypes:[N.TOOLTIP],dataGroupName:o[e]})}]})})).on("mousemove",(function(t,e){var r=Ba(this);n.services.events.dispatchEvent(ht.WordCloud.WORD_MOUSEMOVE,{element:r,datum:e}),n.services.events.dispatchEvent(ht.Tooltip.MOVE,{event:t})})).on("click",(function(t,e){n.services.events.dispatchEvent(ht.WordCloud.WORD_CLICK,{event:t,element:Ba(this),datum:e})})).on("mouseout",(function(t,e){var i=Ba(this);r(null),n.services.events.dispatchEvent(ht.WordCloud.WORD_MOUSEOUT,{event:t,element:i,datum:e}),n.services.events.dispatchEvent(ht.Tooltip.HIDE,{hoveredElement:i})}))},e}(Kg);function Nw(t,e){let n;if(void 0===e)for(const e of t)null!=e&&(n<e||void 0===n&&e>=e)&&(n=e);else{let r=-1;for(let i of t)null!=(i=e(i,++r,t))&&(n<i||void 0===n&&i>=i)&&(n=i)}return n}function Uw(t,e){let n=0;if(void 0===e)for(let e of t)(e=+e)&&(n+=e);else{let r=-1;for(let i of t)(i=+e(i,++r,t))&&(n+=i)}return n}function Bw(t){return t.depth}function Vw(t,e){return e-1-t.height}function Hw(t,e){return t.sourceLinks.length?t.depth:e-1}function Gw(t){return function(){return t}}function zw(t,e){return Fw(t.source,e.source)||t.index-e.index}function jw(t,e){return Fw(t.target,e.target)||t.index-e.index}function Fw(t,e){return t.y0-e.y0}function Ww(t){return t.value}function qw(t){return t.index}function Yw(t){return t.nodes}function Zw(t){return t.links}function Xw(t,e){const n=t.get(e);if(!n)throw new Error("missing: "+e);return n}function $w({nodes:t}){for(const e of t){let t=e.y0,n=t;for(const n of e.sourceLinks)n.y0=t+n.width/2,t+=n.width;for(const t of e.targetLinks)t.y1=n+t.width/2,n+=t.width}}function Kw(){let t,e,n,r=0,i=0,o=1,a=1,s=24,l=8,u=qw,c=Hw,h=Yw,d=Zw,f=6;function p(){const t={nodes:h.apply(null,arguments),links:d.apply(null,arguments)};return g(t),v(t),m(t),y(t),b(t),$w(t),t}function g({nodes:t,links:e}){for(const[e,n]of t.entries())n.index=e,n.sourceLinks=[],n.targetLinks=[];const r=new Map(t.map((e,n)=>[u(e,n,t),e]));for(const[t,n]of e.entries()){n.index=t;let{source:e,target:i}=n;"object"!=typeof e&&(e=n.source=Xw(r,e)),"object"!=typeof i&&(i=n.target=Xw(r,i)),e.sourceLinks.push(n),i.targetLinks.push(n)}if(null!=n)for(const{sourceLinks:e,targetLinks:r}of t)e.sort(n),r.sort(n)}function v({nodes:t}){for(const e of t)e.value=void 0===e.fixedValue?Math.max(Uw(e.sourceLinks,Ww),Uw(e.targetLinks,Ww)):e.fixedValue}function m({nodes:t}){const e=t.length;let n=new Set(t),r=new Set,i=0;for(;n.size;){for(const t of n){t.depth=i;for(const{target:e}of t.sourceLinks)r.add(e)}if(++i>e)throw new Error("circular link");n=r,r=new Set}}function y({nodes:t}){const e=t.length;let n=new Set(t),r=new Set,i=0;for(;n.size;){for(const t of n){t.height=i;for(const{source:e}of t.targetLinks)r.add(e)}if(++i>e)throw new Error("circular link");n=r,r=new Set}}function b(n){const u=function({nodes:t}){const n=Nw(t,t=>t.depth)+1,i=(o-r-s)/(n-1),a=new Array(n);for(const e of t){const t=Math.max(0,Math.min(n-1,Math.floor(c.call(null,e,n))));e.layer=t,e.x0=r+t*i,e.x1=e.x0+s,a[t]?a[t].push(e):a[t]=[e]}if(e)for(const t of a)t.sort(e);return a}(n);t=Math.min(l,(a-i)/(Nw(u,t=>t.length)-1)),function(e){const n=function(t,e){let n;if(void 0===e)for(const e of t)null!=e&&(n>e||void 0===n&&e>=e)&&(n=e);else{let r=-1;for(let i of t)null!=(i=e(i,++r,t))&&(n>i||void 0===n&&i>=i)&&(n=i)}return n}(e,e=>(a-i-(e.length-1)*t)/Uw(e,Ww));for(const r of e){let e=i;for(const i of r){i.y0=e,i.y1=e+i.value*n,e=i.y1+t;for(const t of i.sourceLinks)t.width=t.value*n}e=(a-e+t)/(r.length+1);for(let t=0;t<r.length;++t){const n=r[t];n.y0+=e*(t+1),n.y1+=e*(t+1)}S(r)}}(u);for(let t=0;t<f;++t){const e=Math.pow(.99,t),n=Math.max(1-e,(t+1)/f);_(u,e,n),E(u,e,n)}}function E(t,n,r){for(let i=1,o=t.length;i<o;++i){const o=t[i];for(const t of o){let e=0,r=0;for(const{source:n,value:i}of t.targetLinks){let o=i*(t.layer-n.layer);e+=M(n,t)*o,r+=o}if(!(r>0))continue;let i=(e/r-t.y0)*n;t.y0+=i,t.y1+=i,T(t)}void 0===e&&o.sort(Fw),x(o,r)}}function _(t,n,r){for(let i=t.length-2;i>=0;--i){const o=t[i];for(const t of o){let e=0,r=0;for(const{target:n,value:i}of t.sourceLinks){let o=i*(n.layer-t.layer);e+=C(t,n)*o,r+=o}if(!(r>0))continue;let i=(e/r-t.y0)*n;t.y0+=i,t.y1+=i,T(t)}void 0===e&&o.sort(Fw),x(o,r)}}function x(e,n){const r=e.length>>1,o=e[r];O(e,o.y0-t,r-1,n),w(e,o.y1+t,r+1,n),O(e,a,e.length-1,n),w(e,i,0,n)}function w(e,n,r,i){for(;r<e.length;++r){const o=e[r],a=(n-o.y0)*i;a>1e-6&&(o.y0+=a,o.y1+=a),n=o.y1+t}}function O(e,n,r,i){for(;r>=0;--r){const o=e[r],a=(o.y1-n)*i;a>1e-6&&(o.y0-=a,o.y1-=a),n=o.y0-t}}function T({sourceLinks:t,targetLinks:e}){if(void 0===n){for(const{source:{sourceLinks:t}}of e)t.sort(jw);for(const{target:{targetLinks:e}}of t)e.sort(zw)}}function S(t){if(void 0===n)for(const{sourceLinks:e,targetLinks:n}of t)e.sort(jw),n.sort(zw)}function M(e,n){let r=e.y0-(e.sourceLinks.length-1)*t/2;for(const{target:i,width:o}of e.sourceLinks){if(i===n)break;r+=o+t}for(const{source:t,width:i}of n.targetLinks){if(t===e)break;r-=i}return r}function C(e,n){let r=n.y0-(n.targetLinks.length-1)*t/2;for(const{source:i,width:o}of n.targetLinks){if(i===e)break;r+=o+t}for(const{target:t,width:i}of e.sourceLinks){if(t===n)break;r-=i}return r}return p.update=function(t){return $w(t),t},p.nodeId=function(t){return arguments.length?(u="function"==typeof t?t:Gw(t),p):u},p.nodeAlign=function(t){return arguments.length?(c="function"==typeof t?t:Gw(t),p):c},p.nodeSort=function(t){return arguments.length?(e=t,p):e},p.nodeWidth=function(t){return arguments.length?(s=+t,p):s},p.nodePadding=function(e){return arguments.length?(l=t=+e,p):l},p.nodes=function(t){return arguments.length?(h="function"==typeof t?t:Gw(t),p):h},p.links=function(t){return arguments.length?(d="function"==typeof t?t:Gw(t),p):d},p.linkSort=function(t){return arguments.length?(n=t,p):n},p.size=function(t){return arguments.length?(r=i=0,o=+t[0],a=+t[1],p):[o-r,a-i]},p.extent=function(t){return arguments.length?(r=+t[0][0],o=+t[1][0],i=+t[0][1],a=+t[1][1],p):[[r,i],[o,a]]},p.iterations=function(t){return arguments.length?(f=+t,p):f},p}var Qw=Math.PI,Jw=2*Qw,tO=Jw-1e-6;function eO(){this._x0=this._y0=this._x1=this._y1=null,this._=""}function nO(){return new eO}function rO(t){return function(){return t}}function iO(t){return t[0]}function oO(t){return t[1]}eO.prototype=nO.prototype={constructor:eO,moveTo:function(t,e){this._+="M"+(this._x0=this._x1=+t)+","+(this._y0=this._y1=+e)},closePath:function(){null!==this._x1&&(this._x1=this._x0,this._y1=this._y0,this._+="Z")},lineTo:function(t,e){this._+="L"+(this._x1=+t)+","+(this._y1=+e)},quadraticCurveTo:function(t,e,n,r){this._+="Q"+ +t+","+ +e+","+(this._x1=+n)+","+(this._y1=+r)},bezierCurveTo:function(t,e,n,r,i,o){this._+="C"+ +t+","+ +e+","+ +n+","+ +r+","+(this._x1=+i)+","+(this._y1=+o)},arcTo:function(t,e,n,r,i){t=+t,e=+e,n=+n,r=+r,i=+i;var o=this._x1,a=this._y1,s=n-t,l=r-e,u=o-t,c=a-e,h=u*u+c*c;if(i<0)throw new Error("negative radius: "+i);if(null===this._x1)this._+="M"+(this._x1=t)+","+(this._y1=e);else if(h>1e-6)if(Math.abs(c*s-l*u)>1e-6&&i){var d=n-o,f=r-a,p=s*s+l*l,g=d*d+f*f,v=Math.sqrt(p),m=Math.sqrt(h),y=i*Math.tan((Qw-Math.acos((p+h-g)/(2*v*m)))/2),b=y/m,E=y/v;Math.abs(b-1)>1e-6&&(this._+="L"+(t+b*u)+","+(e+b*c)),this._+="A"+i+","+i+",0,0,"+ +(c*d>u*f)+","+(this._x1=t+E*s)+","+(this._y1=e+E*l)}else this._+="L"+(this._x1=t)+","+(this._y1=e);else;},arc:function(t,e,n,r,i,o){t=+t,e=+e,o=!!o;var a=(n=+n)*Math.cos(r),s=n*Math.sin(r),l=t+a,u=e+s,c=1^o,h=o?r-i:i-r;if(n<0)throw new Error("negative radius: "+n);null===this._x1?this._+="M"+l+","+u:(Math.abs(this._x1-l)>1e-6||Math.abs(this._y1-u)>1e-6)&&(this._+="L"+l+","+u),n&&(h<0&&(h=h%Jw+Jw),h>tO?this._+="A"+n+","+n+",0,1,"+c+","+(t-a)+","+(e-s)+"A"+n+","+n+",0,1,"+c+","+(this._x1=l)+","+(this._y1=u):h>1e-6&&(this._+="A"+n+","+n+",0,"+ +(h>=Qw)+","+c+","+(this._x1=t+n*Math.cos(i))+","+(this._y1=e+n*Math.sin(i))))},rect:function(t,e,n,r){this._+="M"+(this._x0=this._x1=+t)+","+(this._y0=this._y1=+e)+"h"+ +n+"v"+ +r+"h"+-n+"Z"},toString:function(){return this._}};var aO=Array.prototype.slice;function sO(t){return t.source}function lO(t){return t.target}function uO(t,e,n,r,i){t.moveTo(e,n),t.bezierCurveTo(e=(e+r)/2,n,e,i,r,i)}function cO(){return function(t){var e=sO,n=lO,r=iO,i=oO,o=null;function a(){var a,s=aO.call(arguments),l=e.apply(this,s),u=n.apply(this,s);if(o||(o=a=nO()),t(o,+r.apply(this,(s[0]=l,s)),+i.apply(this,s),+r.apply(this,(s[0]=u,s)),+i.apply(this,s)),a)return o=null,a+""||null}return a.source=function(t){return arguments.length?(e=t,a):e},a.target=function(t){return arguments.length?(n=t,a):n},a.x=function(t){return arguments.length?(r="function"==typeof t?t:rO(+t),a):r},a.y=function(t){return arguments.length?(i="function"==typeof t?t:rO(+t),a):i},a.context=function(t){return arguments.length?(o=null==t?null:t,a):o},a}(uO)}function hO(t){return[t.source.x1,t.y0]}function dO(t){return[t.target.x0,t.y1]}var fO=function(t){function e(){var e=null!==t&&t.apply(this,arguments)||this;return e.type="alluvial",e.renderType=I.SVG,e.gradient_id="gradient-id-"+Math.floor(99999999999*Math.random()),e}return n(e,t),e.prototype.render=function(t){var e=this,n=this.getComponentContainer({withinChartClip:!0});n.html("");var r=Hg.getSVGElementSize(n,{useAttrs:!0}),i=r.width,o=r.height;if(!(i<1||o<1)){var a=this.model.getOptions(),s=this.model.getDisplayData(),l=Za(this.getOptions(),"color","gradient","enabled"),u=Ct.minNodePadding;a.alluvial.nodePadding>Ct.minNodePadding&&(u=a.alluvial.nodePadding);var c=Za(a,"alluvial","nodeAlignment"),h=Hw;c===j.LEFT?h=Bw:c===j.RIGHT&&(h=Vw);var d=Kw().nodeId((function(t){return t.name})).nodeWidth(Ct.nodeWidth).nodePadding(u).nodeAlign(h).extent([[2,30],[i-2,o]]);this.graph=d({nodes:a.alluvial.nodes.map((function(t){return Object.assign({},t)})),links:s.map((function(t){return Object.assign({},t)}))}),this.graph.nodes=this.graph.nodes.filter((function(t){return 0!==t.value}));var f={};this.graph.nodes.forEach((function(t){var e,n=t.x0;t.category&&(f[n]=null===(e=t)||void 0===e?void 0:e.category)})),n.append("g").classed("header-arrows",!0).selectAll("g").data(Object.keys(f)).join("g").attr("transform",(function(t){return"translate("+t+", 0)"})).append("text").attr("id",(function(t,n){return e.services.domUtils.generateElementIDString("alluvial-category-"+n)})).style("font-size","14px").text((function(t){return f[t]?f[t]:""})).attr("y",20).attr("x",(function(t,n){var r=e.services.domUtils.generateElementIDString("alluvial-category-"+n),i=Hg.getSVGElementSize(Ba("text#"+r),{useBBox:!0}).width,o=0;return t+o>=i&&(o=4-i),o}));var p=n.append("g").attr("fill","none").selectAll("g").data(this.graph.links);if(p.exit().remove(),l){var g=Za(this.getOptions(),"color","scale");g&&p.enter().append("linearGradient").attr("id",(function(t){return e.gradient_id+"-link-"+t.index})).attr("gradientUnits","userSpaceOnUse").call((function(t){return t.append("stop").attr("offset","0%").attr("stop-color",(function(t){return g[t.source.name]}))})).call((function(t){return t.append("stop").attr("offset","100%").attr("stop-color",(function(t){return g[t.target.name]}))})),p.exit().remove()}p.enter().append("path").classed("link",!0).attr("d",cO().source(hO).target(dO)).attr("id",(function(t){return e.services.domUtils.generateElementIDString("alluvial-line-"+t.index)})).attr("class",(function(t){return a.alluvial.monochrome?e.model.getColorClassName({classNameTypes:[N.STROKE],dataGroupName:0,originalClassName:"link"}):e.model.getColorClassName({classNameTypes:[N.STROKE],dataGroupName:t.source.index,originalClassName:"link"})})).style("stroke",(function(t){return l?"url(#"+e.gradient_id+"-link-"+t.index+")":e.model.getFillColor(t.source.name)})).attr("stroke-width",(function(t){return Math.max(1,t.width)})).style("stroke-opacity",Ct.opacity.default).attr("aria-label",(function(t){return t.source.name+" → "+t.target.name+" ("+t.value+(a.alluvial.units?" "+a.alluvial.units:"")+")"}));var v=n.append("g").selectAll("g").data(this.graph.nodes).enter().append("g").attr("id",(function(t){return e.services.domUtils.generateElementIDString("alluvial-node-"+t.index)})).classed("node-group",!0).attr("transform",(function(t){return"translate("+t.x0+", "+t.y0+")"}));v.append("rect").classed("node",!0).attr("height",(function(t){return t.y1-t.y0})).attr("width",(function(t){return t.x1-t.x0})).attr("fill","black");var m=v.append("g").attr("id",(function(t){return e.services.domUtils.generateElementIDString("alluvial-node-title-"+t.index)}));m.append("text").attr("id",(function(t){return e.services.domUtils.generateElementIDString("alluvial-node-text-"+t.index)})).attr("class","node-text").style("font-size","12px").attr("text-anchor","start").attr("fill","white").attr("x",4).attr("dy",13).text((function(t){return t.name+" ("+t.value+")"})).attr("aria-label",(function(t){return t.name+" ("+t.value+")"})),m.append("rect").classed("node-text-bg",!0).attr("width",(function(t,n){var r=e.services.domUtils.generateElementIDString("alluvial-node-text-"+n);return Hg.getSVGElementSize(Ba("text#"+r),{useBBox:!0}).width+8})).attr("height",18).attr("stroke-width",2).lower(),m.attr("transform",(function(t,n){var r=e.services.domUtils.generateElementIDString("alluvial-node-text-"+n),i=Hg.getSVGElementSize(Ba("text#"+r),{useBBox:!0}).width,o=(t.y1-t.y0)/2-9,a=t.x1-t.x0;return t.x1>=i?a-=i+16:a+=4,"translate("+a+", "+o+")"})),this.addLineEventListener(),this.addNodeEventListener()}},e.prototype.addLineEventListener=function(){var t=this.getOptions(),e=this,n=to((function(t,n){void 0===n&&(n="mouseover");var r=e.parent.selectAll("path.link").transition().call((function(t){return e.services.transitions.setupTransition({transition:t,name:"alluvial-links-mouse-highlight"})}));"mouseout"===n?(Ba(t).lower(),r.style("stroke-opacity",Ct.opacity.default)):r.style("stroke-opacity",(function(){return t===this?(Ba(this).raise(),Ct.opacity.selected):Ct.opacity.unfocus}))}),33);this.parent.selectAll("path.link").on("mouseover",(function(r,i){var o=Ba(this);n(this,"mouseover"),o.classed("link-hovered",!0);var a=getComputedStyle(this).getPropertyValue("stroke");e.services.events.dispatchEvent(ht.Alluvial.LINE_MOUSEOVER,{event:r,element:o,datum:i}),e.services.events.dispatchEvent(ht.Tooltip.SHOW,{event:r,hoveredElement:o,items:[{label:i.target.name,value:i.value+(t.alluvial.units?" "+t.alluvial.units:""),color:a,labelIcon:e.getRightArrowIcon()}]})})).on("mousemove",(function(t,n){e.services.events.dispatchEvent(ht.Alluvial.LINE_MOUSEMOVE,{event:t,element:Ba(this),datum:n}),e.services.events.dispatchEvent(ht.Tooltip.MOVE,{event:t})})).on("click",(function(t,n){e.services.events.dispatchEvent(ht.Alluvial.LINE_CLICK,{event:t,element:Ba(this),datum:n})})).on("mouseout",(function(t,r){var i=Ba(this);n(this,"mouseout"),i.classed("link-hovered",!1),e.services.events.dispatchEvent(ht.Alluvial.LINE_MOUSEOUT,{event:t,element:i,datum:r}),e.services.events.dispatchEvent(ht.Tooltip.HIDE,{event:t,hoveredElement:i})}))},e.prototype.addNodeEventListener=function(){var t=this,e=this,n=to((function(n,r){(void 0===n&&(n=[]),void 0===r&&(r="mouseover"),"mouseout"!==r&&0!==n.length)?e.parent.selectAll("path.link").transition().call((function(e){return t.services.transitions.setupTransition({transition:e,name:"alluvial-link-mouse-highlight"})})).style("stroke-opacity",(function(t){return n.some((function(e){return e===t.index}))?(Ba(this).classed("link-hovered",!0).raise(),Ct.opacity.selected):Ct.opacity.unfocus})):e.parent.selectAll("path.link").classed("link-hovered",!1).data(t.graph.links,(function(t){return t.index})).order().style("stroke-opacity",Ct.opacity.default)}),66);e.parent.selectAll(".node-group").on("mouseover",(function(t,r){var i=Ba(this),o=[];if(e.traverse({link:"sourceLinks",node:"target"},r,o),e.traverse({link:"targetLinks",node:"source"},r,o),o.length){var a=Fa(i.attr("transform"));if(i.attr("transform","translate("+(a.x-2)+", "+a.y+")"),i.classed("node-hovered",!0).selectAll("rect.node").attr("width",8),r.x0-2==0){var s=e.services.domUtils.generateElementIDString("alluvial-node-title-"+r.index),l=e.parent.select("g#"+s),u=Fa(l.attr("transform"));l.attr("transform","translate("+(u.x+4)+","+u.y+")")}var c=e.services.domUtils.generateElementIDString("alluvial-node-text-"+r.index);e.parent.select("text#"+c).style("font-weight","bold"),n(o,"mouseover"),e.services.events.dispatchEvent(ht.Alluvial.NODE_MOUSEOVER,{event:t,element:i,datum:r})}})).on("mousemove",(function(t,n){e.services.events.dispatchEvent(ht.Alluvial.NODE_MOUSEMOVE,{event:t,element:Ba(this),datum:n}),e.services.events.dispatchEvent(ht.Tooltip.MOVE,{event:t})})).on("click",(function(t,n){e.services.events.dispatchEvent(ht.Alluvial.NODE_CLICK,{event:t,element:Ba(this),datum:n})})).on("mouseout",(function(t,r){var i=Ba(this),o=Fa(i.attr("transform"));if(i.classed("node-hovered",!1).attr("transform","translate("+(o.x+2)+", "+o.y+")").select("rect.node").attr("width",Ct.nodeWidth),r.x0-2==0){var a=e.services.domUtils.generateElementIDString("alluvial-node-title-"+r.index),s=e.parent.select("g#"+a),l=Fa(s.attr("transform"));s.attr("transform","translate("+(l.x-4)+","+l.y+")")}var u=e.services.domUtils.generateElementIDString("alluvial-node-text-"+r.index);e.parent.select("text#"+u).style("font-weight","normal"),n([],"mouseout"),e.services.events.dispatchEvent(ht.Alluvial.NODE_MOUSEOUT,{event:t,element:i,datum:r}),e.services.events.dispatchEvent(ht.Tooltip.HIDE,{hoveredElement:i})}))},e.prototype.traverse=function(t,e,n){var r=this;void 0===n&&(n=[]),e[t.link].map((function(e){return n.push(e.index),e[t.node]})).forEach((function(e){return r.traverse(t,e,n)}))},e.prototype.getRightArrowIcon=function(){return'\n\t\t<svg xmlns="http://www.w3.org/2000/svg" class="arrow-right" width="32" height="32" viewBox="0 0 32 32">\n\t\t\t<polygon points="18 6 16.57 7.393 24.15 15 4 15 4 17 24.15 17 16.57 24.573 18 26 28 16 18 6"/>\n\t\t\t<rect width="32" height="32"/>\n\t\t</svg>'},e.prototype.destroy=function(){this.parent.selectAll("path.line,.node-group").on("mouseover",null).on("mousemove",null).on("click",null).on("mouseout",null)},e}(Kg),pO=function(t){function e(){var e=null!==t&&t.apply(this,arguments)||this;return e.type="heatmap",e.renderType=I.SVG,e.matrix={},e.xBandwidth=0,e.yBandwidth=0,e.translationUnits={x:0,y:0},e.handleAxisOnHover=function(t){var n=t.detail,r=n.datum,i=e.model.getUniqueRanges(),o=e.model.getUniqueDomain(),a=e.services.cartesianScales.getDomainLabel(),s=e.services.cartesianScales.getRangeLabel(),l=e.services.cartesianScales.getMainXScale(),u=e.services.cartesianScales.getMainYScale(),c="",h=null,d=null,f=null;void 0!==e.matrix[r]?(c=a,i.forEach((function(t){if("number"==typeof e.matrix[r][t].value){var n=e.matrix[r][t].value;if(null===h)return h=n,d=n,void(f=n);h+=n,d=n<d?n:d,f=n>f?n:f}}))):(c=s,o.forEach((function(t){if("number"==typeof e.matrix[t][r].value){var n=e.matrix[t][r].value;if(null===h)return h=n,d=n,void(f=n);h+=n,d=n<d?n:d,f=n>f?n:f}}))),void 0!==l(r)?e.parent.select("g.multi-cell.column-highlight").classed("highlighter-hidden",!1).attr("transform","translate("+l(r)+", "+dl(u.range())+")"):void 0!==u(r)&&e.parent.select("g.multi-cell.row-highlight").classed("highlighter-hidden",!1).attr("transform","translate("+dl(l.range())+","+u(r)+")"),e.services.events.dispatchEvent(ht.Tooltip.SHOW,{event:n.event,hoveredElement:Ba(t.detail.element),items:[{label:c,value:r,bold:!0},{label:"Min",value:null!==d?d:"-"},{label:"Max",value:null!==f?f:"-"},{label:"Average",value:null!==h?h/o.length:"-"}]})},e.handleAxisMouseOut=function(t){e.parent.selectAll("g.multi-cell").classed("highlighter-hidden",!0),e.services.events.dispatchEvent(ht.Tooltip.HIDE,{event:t})},e}return n(e,t),e.prototype.init=function(){var t=this.services.events;t.addEventListener(ht.Axis.LABEL_MOUSEOVER,this.handleAxisOnHover),t.addEventListener(ht.Axis.LABEL_MOUSEOUT,this.handleAxisMouseOut),t.addEventListener(ht.Axis.LABEL_FOCUS,this.handleAxisOnHover),t.addEventListener(ht.Axis.LABEL_BLUR,this.handleAxisMouseOut)},e.prototype.render=function(t){var e=this,n=this.getComponentContainer({withinChartClip:!0});n.lower();var r=this.services.cartesianScales;if(this.matrix=this.model.getMatrix(),n.html(""),!Za(this.getOptions(),"data","loading")){var i=r.getMainXScale(),o=r.getMainYScale(),a=r.getDomainIdentifier(),s=r.getRangeIdentifier(),l=this.model.getUniqueDomain(),u=this.model.getUniqueRanges(),c=this.model.getMatrixAsArray(),h=i.range(),d=o.range();this.xBandwidth=Math.abs((h[1]-h[0])/l.length),this.yBandwidth=Math.abs((d[1]-d[0])/u.length);var f=this.services.domUtils.generateElementIDString("heatmap-pattern-stripes");n.append("defs").append("pattern").attr("id",f).attr("width",3).attr("height",3).attr("patternUnits","userSpaceOnUse").attr("patternTransform","rotate(45)").append("rect").classed("pattern-fill",!0).attr("width",.5).attr("height",8);var p=n.selectAll().data(c).enter().append("g").attr("class",(function(t){return"heat-"+t.index})).classed("cell",!0).attr("transform",(function(t){return"translate("+i(t[a])+", "+o(t[s])+")"})).append("rect").attr("class",(function(t){return e.model.getColorClassName({value:t.value,originalClassName:"heat-"+t.index})})).classed("heat",!0).classed("null-state",(function(t){return-1===t.index||null===t.value})).attr("width",this.xBandwidth).attr("height",this.yBandwidth).style("fill",(function(t){return-1===t.index||null===t.value?"url(#"+f+")":e.model.getFillColor(Number(t.value))})).attr("aria-label",(function(t){return t.value}));this.createOuterBox("g.cell-highlight",this.xBandwidth,this.yBandwidth),this.createOuterBox("g.multi-cell.column-highlight",this.xBandwidth,Math.abs(d[1]-d[0])),this.createOuterBox("g.multi-cell.row-highlight",Math.abs(h[1]-h[0]),this.yBandwidth),this.determineDividerStatus()&&(p.style("stroke-width","1px"),this.parent.select("g.cell-highlight").classed("cell-2",!0)),this.addEventListener()}},e.prototype.createOuterBox=function(t,e,n){var r=Hg.appendOrSelect(this.parent,t).classed("shadows",!0).classed("highlighter-hidden",!0);Hg.appendOrSelect(r,"line.top").attr("x1",-1).attr("x2",e+1),Hg.appendOrSelect(r,"line.left").attr("x1",0).attr("y1",-1).attr("x2",0).attr("y2",n+1),Hg.appendOrSelect(r,"line.down").attr("x1",-1).attr("x2",e+1).attr("y1",n).attr("y2",n),Hg.appendOrSelect(r,"line.right").attr("x1",e).attr("x2",e).attr("y1",-1).attr("y2",n+1)},e.prototype.determineDividerStatus=function(){var t=Za(this.getOptions(),"heatmap","divider","state");return t!==lt.OFF&&(t===lt.AUTO&&At.minCellDividerDimension<=this.xBandwidth&&At.minCellDividerDimension<=this.yBandwidth||t===lt.ON)},e.prototype.addEventListener=function(){var t=this,e=this.services.cartesianScales,n=jn(this.getOptions(),"tooltip.totalLabel"),r=e.getDomainIdentifier(),i=e.getRangeIdentifier(),o=e.getDomainLabel(),a=e.getRangeLabel();this.parent.selectAll("g.cell").on("mouseover",(function(e,s){var l=Ba(this),u=l.select("rect.heat");if(!u.classed("null-state")){var c=Fa(l.attr("transform"));t.parent.select("g.cell-highlight").attr("transform","translate("+(c.x+t.translationUnits.x)+", "+(c.y+t.translationUnits.y)+")").classed("highlighter-hidden",!1),t.services.events.dispatchEvent(ht.Heatmap.HEATMAP_MOUSEOVER,{event:e,element:u,datum:s}),t.services.events.dispatchEvent(ht.Tooltip.SHOW,{event:e,items:[{label:o,value:s[r]},{label:a,value:s[i]},{label:n||"Total",value:s.value,color:u.style("fill")}]})}})).on("mousemove",(function(e,n){t.services.events.dispatchEvent(ht.Heatmap.HEATMAP_MOUSEMOVE,{event:e,element:Ba(this),datum:n}),t.services.events.dispatchEvent(ht.Tooltip.MOVE,{event:e})})).on("click",(function(e,n){t.services.events.dispatchEvent(ht.Heatmap.HEATMAP_CLICK,{event:e,element:Ba(this),datum:n})})).on("mouseout",(function(e,n){var r=Ba(this).select("rect.heat"),i=r.classed("null-state");t.parent.select("g.cell-highlight").classed("highlighter-hidden",!0),i||(t.services.events.dispatchEvent(ht.Heatmap.HEATMAP_MOUSEOUT,{event:e,element:r,datum:n}),t.services.events.dispatchEvent(ht.Tooltip.HIDE,{event:e,hoveredElement:r}))}))},e.prototype.destroy=function(){this.parent.selectAll("rect.heat").on("mouseover",null).on("mousemove",null).on("click",null).on("mouseout",null);var t=this.services.events;t.removeEventListener(ht.Legend.ITEM_HOVER,this.handleAxisOnHover),t.removeEventListener(ht.Legend.ITEM_MOUSEOUT,this.handleAxisMouseOut)},e}(Kg),gO=function(t){function e(){var e=null!==t&&t.apply(this,arguments)||this;return e.type="choropleth",e}return n(e,t),e.prototype.render=function(e){var n=this;t.prototype.render.call(this);var r=this.model.getCombinedData();this.getComponentContainer({withinChartClip:!0}).select("g.geo").selectAll("path").classed("border",!0).attr("class",(function(t){return n.model.getColorClassName({value:r[t.properties.NAME].value,originalClassName:"border"})})),this.addCountryAreaEventListener()},e.prototype.addCountryAreaEventListener=function(){var t=this,e=this.model.getCombinedData();this.parent.selectAll("path.border").on("mouseover",(function(n,r){var i=Ba(this);t.services.events.dispatchEvent(ht.Choropleth.CHOROPLETH_MOUSEOVER,{event:n,element:i,datum:e[r.properties.NAME]}),t.services.events.dispatchEvent(ht.Tooltip.SHOW,{event:n,hoveredElement:i,items:[{label:r.properties.NAME,value:e[r.properties.NAME].value}]})})).on("mousemove",(function(n,r){t.services.events.dispatchEvent(ht.Choropleth.CHOROPLETH_MOUSEMOVE,{event:n,element:Ba(this),datum:e[r.properties.NAME]}),t.services.events.dispatchEvent(ht.Tooltip.MOVE,{event:n})})).on("click",(function(n,r){t.services.events.dispatchEvent(ht.Choropleth.CHOROPLETH_CLICK,{event:n,element:Ba(this),datum:e[r.properties.NAME]})})).on("mouseout",(function(n,r){var i=Ba(this);t.services.events.dispatchEvent(ht.Choropleth.CHOROPLETH_MOUSEOUT,{event:n,element:i,datum:e[r.properties.NAME]}),t.services.events.dispatchEvent(ht.Tooltip.HIDE,{event:n,hoveredElement:i})}))},e}(Ix),vO=function(t){function e(){var e=null!==t&&t.apply(this,arguments)||this;return e.type="spacer",e}return n(e,t),e.prototype.render=function(){this.getComponentContainer().style("width",(this.configs.size||Lt.default.size)+"px").style("height",(this.configs.size||Lt.default.size)+"px").attr("opacity",0)},e}(Kg),mO=function(t){function e(n,r,i,o){var a=t.call(this,n,r,o)||this;return a.type="layout",a.configs=o,a.children=i,a._instanceID=e.instanceID++,a.init(),a}return n(e,t),e.prototype.init=function(){this.children.forEach((function(t){t.components.forEach((function(t){t.init()}))}))},e.prototype.getPreferedAndFixedSizeSum=function(){var t=this.parent,e=0;return t.selectAll("div.layout-child-"+this._instanceID).filter((function(t){var e=Za(t,"growth");return e===Y.PREFERRED||e===Y.FIXED})).each((function(t){e+=t.size})),e},e.prototype.getNumOfStretchChildren=function(){return this.parent.selectAll("div.layout-child-"+this._instanceID).filter((function(t){return Za(t,"growth")===Y.STRETCH})).size()},e.prototype.render=function(t){var e=this;void 0===t&&(t=!0);var n=this.parent,r=Hg.getHTMLElementSize(n.node()),i=r.width,o=r.height,a=this.configs.direction===q.ROW||this.configs.direction===q.ROW_REVERSE,s=Za(this.model.getOptions(),"style","prefix"),l=n.classed("cds--"+s+"--layout-row",this.configs.direction===q.ROW).classed("cds--"+s+"--layout-row-reverse",this.configs.direction===q.ROW_REVERSE).classed("cds--"+s+"--layout-column",this.configs.direction===q.COLUMN).classed("cds--"+s+"--layout-column-reverse",this.configs.direction===q.COLUMN_REVERSE).classed("cds--"+s+"--layout-alignitems-center",this.configs.alignItems===Z.CENTER).selectAll("div.layout-child-"+this._instanceID).data(this.children,(function(t){return t.id}));l.enter().append("div").merge(n.selectAll("div.layout-child-"+this._instanceID)).attr("class",(function(t){return"layout-child layout-child-"+e._instanceID+" "+t.id})).each((function(e){var n=this;e.components.forEach((function(r){var i=Ba(n),o=Za(e,"renderType")===I.SVG;r.setParent(o?Hg.appendOrSelect(i,"svg.layout-svg-wrapper").attr("width","100%").attr("height","100%"):i);var a=Za(e,"growth");a!==Y.PREFERRED&&a!==Y.FIXED||r.render(t)}))})),n.selectAll("div.layout-child-"+this._instanceID).style("height",null).style("width",null).each((function(t){var e=Za(t,"growth"),n=Za(t,"renderType")===I.SVG?Hg.getSVGElementSize(Ba(this).select("svg.layout-svg-wrapper"),{useBBox:!0}):Hg.getHTMLElementSize(this);if(e===Y.PREFERRED){var r=a?n.width:n.height,s=a?i:o;t.size=r/s*100}})),l.exit().remove(),this.children.filter((function(t){return Za(t,"growth")===Y.STRETCH})).forEach((function(t,n){t.size=(100-+e.getPreferedAndFixedSizeSum())/+e.getNumOfStretchChildren()}));var u=n.selectAll("div.layout-child-"+this._instanceID).data(this.children,(function(t){return t.id}));a?u.style("width",(function(t){return t.size/100*i+"px"})).style("height","100%"):u.style("height",(function(t){return t.size/100*o+"px"})).style("width","100%"),u.each((function(e,n){e.components.forEach((function(n){Za(e,"growth")===Y.STRETCH&&n.render(t)}))}))},e.prototype.setModel=function(e){t.prototype.setModel.call(this,e),this.children.forEach((function(t){t.components.forEach((function(t){return t.setModel(e)}))}))},e.prototype.setServices=function(e){t.prototype.setServices.call(this,e),this.children.forEach((function(t){t.components.forEach((function(t){return t.setServices(e)}))}))},e.prototype.destroy=function(){this.children.forEach((function(t){t.components.forEach((function(t){return t.destroy()}))}))},e.instanceID=Math.floor(99999999999*Math.random()),e}(Kg),yO=function(t){function e(e,n,r){var i,o=t.call(this,e,n,r)||this;return o.type="axes",o.renderType=I.SVG,o.truncation=((i={})[U.LEFT]=!1,i[U.RIGHT]=!1,i[U.TOP]=!1,i[U.BOTTOM]=!1,i),r&&(o.configs=r),o.margins=o.configs.margins,o}return n(e,t),e.prototype.render=function(t){var e=this;void 0===t&&(t=!0);var n,i,o=this.configs.position,a=this.getOptions(),s=Za(a,"axes",o,"visible"),l=this.getComponentContainer(),u=Hg.getSVGElementSize(l,{useAttrs:!0}),c=u.width,h=u.height,d=Hg.appendOrSelect(l,"g.axis."+o);o===U.BOTTOM||o===U.TOP?(n=this.configs.axes[U.LEFT]?this.margins.left:0,i=this.configs.axes[U.RIGHT]?c-this.margins.right:c):(n=h-this.margins.bottom,i=this.margins.top);var f,p=this.services.cartesianScales.getScaleByPosition(o);switch(this.scaleType===G.LABELS||this.scaleType===G.LABELS_RATIO?p.rangeRound([n,i]):p.range([n,i]),o){case U.LEFT:f=uv;break;case U.BOTTOM:f=lv;break;case U.RIGHT:f=sv;break;case U.TOP:f=av}d.attr("aria-label",o+" axis");var g=!d.select("g.ticks").empty(),v=Hg.appendOrSelect(d,"g.ticks");g||(v.attr("role",r.GRAPHICS_OBJECT+" "+r.GROUP),v.attr("aria-label",o+" ticks"));var m=Hg.appendOrSelect(d,"g.ticks.invisible").style("opacity","0").style("pointer-events","none").attr("aria-hidden",!0).attr("aria-label","invisible "+o+" ticks"),y=Za(a,"axes",o),b=this.scaleType===G.TIME||y.scaleType===G.TIME,E=o===U.LEFT||o===U.RIGHT,_=this.model.get("zoomDomain");if(_&&b&&!E&&p.domain(_),s){var x=Za(y,"scaleType"),w=Za(a,"data","loading"),O=Za(y,"ticks","number"),T=Za(y,"ticks","values"),S=Za(y,"truncation","type"),M=Za(y,"truncation","threshold"),C=Za(y,"truncation","numCharacter"),A=null!==O,L=Za(a,"timeScale"),D=Hg.appendOrSelect(m,"g.tick"),k=Hg.appendOrSelect(D,"text").text("0"),R=Hg.getSVGElementSize(k.node(),{useBBox:!0}).height;D.remove();var I,P=this.scaleType||y.scaleType||G.LINEAR,N=f(p).tickSizeOuter(0);if(p.ticks){var B=void 0;if(A?B=O:(B=mt.ticks.number,E&&(B=this.getNumberOfFittingTicks(h,R,mt.ticks.verticalSpaceRatio))),1===p.ticks().length&&0===p.ticks()[0]&&(B=0),N.ticks(B),b)if(p.ticks(B).length){var H=Za(a,"timeScale","addSpaceOnEdges"),z=Za(a,"axes",o,"domain"),j=void 0,F=p.copy();H&&!z&&F.nice(B),j=F.ticks(B),H&&j.length>2&&!z&&(j.splice(j.length-1,1),j.splice(0,1)),N.tickValues(j)}else N.tickValues([])}var W=Za(y,"ticks","formatter");if(b){var q=cg(N.tickValues());I=null===W?function(t,e){return lg(t,e,N.tickValues(),q,L)}:function(t,e){var n=lg(t,e,N.tickValues(),q,L);return W(t,e,n)}}else null===W?P===G.LINEAR&&(I=function(t){return t.toLocaleString()}):I=W;N.tickFormat(I);var Y,Z=this.services.cartesianScales.getScaleByPosition(o).domain(),X=Z[0],$=Z[1];if(T){if(b)T.forEach((function(t,e){void 0===t.getTime&&(T[e]=new Date(t))})),Y=T.filter((function(t){var e=t.getTime();return e>=new Date(X).getTime()&&e<=new Date($).getTime()}));else if(x===G.LABELS){var K=this.services.cartesianScales.getScaleByPosition(o).domain();Y=T.filter((function(t){return K.includes(t)}))}else Y=T.filter((function(t){return t>=X&&t<=$}));N.tickValues(Y)}switch(o){case U.LEFT:v.attr("transform","translate("+this.margins.left+", 0)");break;case U.BOTTOM:v.attr("transform","translate(0, "+(h-this.margins.bottom)+")");break;case U.RIGHT:v.attr("transform","translate("+(c-this.margins.right)+", 0)");break;case U.TOP:v.attr("transform","translate(0, "+this.margins.top+")")}var Q=this.model.isDataEmpty();if(y.title){var J=Hg.appendOrSelect(d,"text.axis-title").html(Q||w?"":y.title),tt=Za(y,"titleOrientation");switch(o){case U.LEFT:tt===ot.RIGHT?J.attr("transform","rotate(90)").attr("y",0).attr("x",p.range()[0]/2).attr("dy","-0.5em").style("text-anchor","middle"):J.attr("transform","rotate(-90)").attr("y",0).attr("x",-p.range()[0]/2).attr("dy","0.75em").style("text-anchor","middle");break;case U.BOTTOM:J.attr("transform","translate("+(this.margins.left/2+p.range()[1]/2)+", "+(h+4)+")").style("text-anchor","middle");break;case U.RIGHT:tt===ot.LEFT?J.attr("transform","rotate(-90)").attr("y",c).attr("x",-p.range()[0]/2).style("text-anchor","middle"):J.attr("transform","rotate(90)").attr("y",-c).attr("x",p.range()[0]/2).attr("dy","0.75em").style("text-anchor","middle");break;case U.TOP:var et=Hg.getSVGElementSize(J,{useBBox:!0}).height;J.attr("transform","translate("+(this.margins.left/2+p.range()[1]/2)+", "+et/2+")").style("text-anchor","middle")}}if(b){var rt=cg(N.tickValues()),it=L.showDayName,at=v;t&&(v=v.transition().call((function(n){return e.services.transitions.setupTransition({transition:n,name:"axis-update",animate:t})}))),v=v.call(N),at.selectAll(".tick").data(N.tickValues(),p).order().select("text").style("font-weight",(function(t,e){return sg(t,e,N.tickValues(),rt,it)?"bold":"normal"}))}else v=t&&g?v.transition().call((function(n){return e.services.transitions.setupTransition({transition:n,name:"axis-update",animate:t})})).call(N):v.call(N);if(m.call(N),o===U.BOTTOM||o===U.TOP){var st=!1,lt=Za(y,"ticks","rotation");if(lt===nt.ALWAYS)st=!0;else if(lt===nt.NEVER)st=!1;else if(!lt||lt===nt.AUTO)if(p.step){var ut=m.selectAll("g.tick text").nodes();st=ut.some((function(t){return Hg.getSVGElementSize(t,{useBBox:!0}).width>=p.step()}))}else{st=!1;var ct,ht=m.append("text").text("A"),dt=Hg.getSVGElementSize(ht.node(),{useBBox:!0}).width;m.selectAll("g.tick").each((function(){var t=Ba(this),e=parseFloat(Za(ja(this),"tx"));null!==e&&ct+t.text().length*dt*.8>=e&&(st=!0),ct=e})),ht.remove()}st?(A||(N.ticks(this.getNumberOfFittingTicks(c,R,mt.ticks.horizontalSpaceRatio)),m.call(N),v.call(N)),d.selectAll("g.ticks g.tick text").attr("transform","rotate(-45)").attr("text-anchor",o===U.TOP?"start":"end")):d.selectAll("g.ticks g.tick text").attr("transform",null).attr("text-anchor",null)}if(w?d.attr("opacity",0):d.attr("opacity",1),v.selectAll("g.tick").attr("aria-label",(function(t){return t})),m.selectAll("g.tick").attr("aria-label",(function(t){return t})),S!==V.NONE&&x===G.LABELS&&!T){var ft=this.services.cartesianScales.getScaleDomain(o);if(ft.length>0){var pt=l.select("g.axis."+o+" g.ticks g.tick").html();d.selectAll("g.ticks g.tick").html(pt);var gt=this;d.selectAll("g.tick text").data(ft).text((function(t){return t.length>M?(gt.truncation[o]=!0,qa(t,S,C)):t})),this.getInvisibleAxisRef().selectAll("g.tick text").data(ft).text((function(t){return t.length>M?qa(t,S,C):t})),d.selectAll("g.ticks").html(this.getInvisibleAxisRef().html()),d.selectAll("g.tick text").data(ft)}}this.addEventListeners()}else v.attr("aria-hidden",!0)},e.prototype.addEventListeners=function(){var t=this.getComponentContainer(),e=this.configs.position,n=Hg.appendOrSelect(t,"g.axis."+e),r=this.getOptions(),i=Za(r,"axes",e),o=Za(i,"scaleType"),a=Za(i,"truncation","threshold"),s=this;n.selectAll("g.tick text").on("mouseover",(function(t,e){s.services.events.dispatchEvent(ht.Axis.LABEL_MOUSEOVER,{event:t,element:Ba(this),datum:e}),o===G.LABELS&&e.length>a&&s.services.events.dispatchEvent(ht.Tooltip.SHOW,{event:t,hoveredElement:Ba(this),content:e})})).on("mousemove",(function(t,e){s.services.events.dispatchEvent(ht.Axis.LABEL_MOUSEMOVE,{event:t,element:Ba(this),datum:e}),o===G.LABELS&&e.length>a&&s.services.events.dispatchEvent(ht.Tooltip.MOVE,{event:t})})).on("click",(function(t,e){s.services.events.dispatchEvent(ht.Axis.LABEL_CLICK,{event:t,element:Ba(this),datum:e})})).on("mouseout",(function(t,e){s.services.events.dispatchEvent(ht.Axis.LABEL_MOUSEOUT,{event:t,element:Ba(this),datum:e}),o===G.LABELS&&s.services.events.dispatchEvent(ht.Tooltip.HIDE)}))},e.prototype.getInvisibleAxisRef=function(){var t=this.configs.position;return this.getComponentContainer().select("g.axis."+t+" g.ticks.invisible")},e.prototype.getTitleRef=function(){var t=this.configs.position;return this.getComponentContainer().select("g.axis."+t+" text.axis-title")},e.prototype.getNumberOfFittingTicks=function(t,e,n){return Gr(Math.floor(t/(e*n)),2,mt.ticks.number)},e.prototype.destroy=function(){var t=this.getComponentContainer(),e=this.configs.position;Hg.appendOrSelect(t,"g.axis."+e).selectAll("g.tick text").on("mouseover",null).on("mousemove",null).on("mouseout",null)},e}(Kg),bO=function(t){function e(e,n,r){return t.call(this,e,n,r)||this}return n(e,t),e.prototype.render=function(e){void 0===e&&(e=!0),t.prototype.render.call(this,e),t.prototype.destroy.call(this);var n=this.configs.position,r=this.getComponentContainer(),i=Hg.appendOrSelect(r,"g.axis."+n),o=this;i.selectAll("g.tick").each((function(t,e){var r=Ba(this);r.classed("tick-hover",!0).attr("tabindex",0===e?0:-1);var i=r.select("text"),a=Hg.getSVGElementSize(i,{useBBox:!0}),s=a.width,l=a.height,u=Hg.appendOrSelect(r,"rect.axis-holder"),c=0,h=0;switch(n){case U.LEFT:c=-s+Number(i.attr("x")),h=-l/2;break;case U.RIGHT:c=Math.abs(Number(i.attr("x"))),h=-l/2;break;case U.TOP:c=-s/2,h=-l+Number(i.attr("y"))/2,o.truncation[n]&&(c=0,u.attr("transform","rotate(-45)"));break;case U.BOTTOM:c=-s/2,h=l/2-2,o.truncation[n]&&(c=-s,u.attr("transform","rotate(-45)"))}u.attr("x",c-mt.hover.rectanglePadding).attr("y",h).attr("width",s+2*mt.hover.rectanglePadding).attr("height",l).lower()})),this.addEventListeners()},e.prototype.addEventListeners=function(){var t=this.getComponentContainer(),e=this.configs.position,n=Hg.appendOrSelect(t,"g.axis."+e),r=this.getOptions(),i=Za(r,"axes",e),o=Za(i,"scaleType"),a=Za(i,"truncation","threshold"),s=this;n.selectAll("g.tick.tick-hover").on("mouseover",(function(t){var e=Ba(this).select("text"),n=e.datum();s.services.events.dispatchEvent(ht.Axis.LABEL_MOUSEOVER,{event:t,element:e,datum:n}),o===G.LABELS&&n.length>a&&s.services.events.dispatchEvent(ht.Tooltip.SHOW,{event:t,element:e,datum:n})})).on("mousemove",(function(t){var e=Ba(this).select("text"),n=e.datum();s.services.events.dispatchEvent(ht.Axis.LABEL_MOUSEMOVE,{event:t,element:e,datum:n}),s.services.events.dispatchEvent(ht.Tooltip.MOVE,{event:t})})).on("click",(function(t){s.services.events.dispatchEvent(ht.Axis.LABEL_CLICK,{event:t,element:Ba(this).select("text"),datum:Ba(this).select("text").datum()})})).on("mouseout",(function(t){s.services.events.dispatchEvent(ht.Axis.LABEL_MOUSEOUT,{event:t,element:Ba(this).select("text"),datum:Ba(this).select("text").datum()}),o===G.LABELS&&s.services.events.dispatchEvent(ht.Tooltip.HIDE)})).on("focus",(function(t){var e={clientX:0,clientY:0};if(t.target){t.target.focus();var n=t.target.getBoundingClientRect();e.clientX=n.x,e.clientY=n.y}s.services.events.dispatchEvent(ht.Axis.LABEL_FOCUS,{event:D(D({},t),e),element:Ba(this),datum:Ba(this).select("text").datum()})})).on("blur",(function(t){s.services.events.dispatchEvent(ht.Axis.LABEL_BLUR,{event:t,element:Ba(this),datum:Ba(this).select("text").datum()})})).on("keydown",(function(t){t.key&&"Escape"===t.key&&(s.services.events.dispatchEvent(ht.Tooltip.HIDE),s.services.events.dispatchEvent(ht.Axis.LABEL_BLUR,{event:t,element:Ba(this),datum:Ba(this).select("text").datum()})),e===U.LEFT||e===U.RIGHT?t.key&&"ArrowUp"===t.key?s.goNext(this,t):t.key&&"ArrowDown"===t.key&&s.goPrevious(this,t):t.key&&"ArrowLeft"===t.key?s.goPrevious(this,t):t.key&&"ArrowRight"===t.key&&s.goNext(this,t)}))},e.prototype.goNext=function(t,e){t.nextElementSibling&&"path"!==t.nextElementSibling.tagName&&t.nextElementSibling.dispatchEvent(new Event("focus")),e.preventDefault()},e.prototype.goPrevious=function(t,e){t.previousElementSibling&&"path"!==t.previousElementSibling.tagName&&t.previousElementSibling.dispatchEvent(new Event("focus")),e.preventDefault()},e.prototype.destroy=function(){var t=this.getComponentContainer(),e=this.configs.position;Hg.appendOrSelect(t,"g.axis."+e).selectAll("g.tick.tick-hover").on("mouseover",null).on("mousemove",null).on("mouseout",null).on("focus",null).on("blur",null)},e}(yO),EO=function(t){function e(){var e=null!==t&&t.apply(this,arguments)||this;return e.type="2D-axes",e.renderType=I.SVG,e.children={},e.thresholds=[],e.margins={top:0,right:0,bottom:0,left:0},e}return n(e,t),e.prototype.render=function(t){var e=this;void 0===t&&(t=!1);var n={},r=Object.keys(U),i=Za(this.getOptions(),"axes");r.forEach((function(t){i[U[t]]&&(n[U[t]]=!0)})),this.configs.axes=n,r.forEach((function(t){var n=U[t];if(e.configs.axes[n]&&!e.children[n]){var r={position:n,axes:e.configs.axes,margins:e.margins},i=e.model.axisFlavor===ut.DEFAULT?new yO(e.model,e.services,r):new bO(e.model,e.services,r);i.setModel(e.model),i.setServices(e.services),i.setParent(e.parent),e.children[n]=i}})),Object.keys(this.children).forEach((function(n){e.children[n].render(t)}));var o={};Object.keys(this.children).forEach((function(t){var n,r=e.children[t],i=r.configs.position,a=r.getInvisibleAxisRef(),s=Hg.getSVGElementSize(a,{useBBox:!0}),l=s.width,u=s.height;switch(r.getTitleRef().empty()?n=0:(n=Hg.getSVGElementSize(r.getTitleRef(),{useBBox:!0}).height,i!==U.LEFT&&i!==U.RIGHT||(n+=5)),i){case U.TOP:o.top=u+n;break;case U.BOTTOM:o.bottom=u+n;break;case U.LEFT:o.left=l+n;break;case U.RIGHT:o.right=l+n}})),this.services.events.dispatchEvent(ht.Axis.RENDER_COMPLETE),Object.keys(o).some((function(t){return e.margins[t]!==o[t]}))&&(this.margins=Object.assign(this.margins,o),this.model.set({axesMargins:this.margins},{skipUpdate:!0}),this.services.events.dispatchEvent(ht.ZoomBar.UPDATE),Object.keys(this.children).forEach((function(t){e.children[t].margins=e.margins})),this.render(!0))},e}(Kg),_O=function(t){function e(){var e=null!==t&&t.apply(this,arguments)||this;return e.type="grid-brush",e.renderType=I.SVG,e.selectionSelector="rect.selection",e.frontSelectionSelector="rect.frontSelection",e}return n(e,t),e.prototype.render=function(t){var n=this,r=this.parent,i=this.getComponentContainer(),o=Hg.appendOrSelect(r,"svg.chart-grid-backdrop"),a=Hg.appendOrSelect(o,"g."+this.type),s=Hg.appendOrSelect(a,this.selectionSelector),l=Hg.getSVGElementSize(o,{useAttrs:!0}),u=l.width,c=l.height,h=this.services.cartesianScales,d=h.getMainXScaleType(),f=h.getMainXScale(),p=f.range(),g=p[0];p[1];i.attr("transform","translate("+g+",0)");var v=Hg.appendOrSelect(i,this.frontSelectionSelector);if(f&&d===G.TIME){var m=this.model.get("zoomDomain");void 0===m&&(m=this.services.zoom.getDefaultZoomBarDomain())&&this.model.set({zoomDomain:m},{animate:!1});var y,b=function(t,e){var r=Kh().range([0,u]).domain(m),i=[r.invert(t),r.invert(e)];i[0].valueOf()===i[1].valueOf()&&(i=n.services.zoom.getDefaultZoomBarDomain()),m[0].valueOf()===i[0].valueOf()&&m[1].valueOf()===i[1].valueOf()||n.services.zoom.handleDomainChange(i)};0!=c&&0!=u&&(y=fb().extent([[0,0],[u-1,c]]).on("start brush end",(function(t){var n=t.selection;null!==n&&n[0]!==n[1]&&(v.attr("x",parseFloat(s.attr("x"))+parseFloat(o.attr("x"))).attr("y",s.attr("y")).attr("width",s.attr("width")).attr("height",s.attr("height")).style("cursor","pointer").style("display",null),function(t){for(var n=t[1]-t[0],r="0,"+n.toString(),i=Math.floor(c/e.DASH_LENGTH),o=i*e.DASH_LENGTH,a=0;a<i;a++)r+=","+e.DASH_LENGTH;r+=","+(c-o),i%2==1&&(r+=",0"),r+=","+n.toString(),r+=","+c.toString(),v.attr("stroke-dasharray",r)}(n))})).on("end.brushed",(function(t){var e=t.selection;null!==e&&(b(e[0],e[1]),a.call(y.move,null),v.style("display","none"))})),a.call(y));var E=this.services.zoom.getZoomRatio();o.on("click",(function(t){if(t.shiftKey){var e=this.services.domUtils.getHolder(),n=Va(a.node(),e)[0],r=n-u*E/2;r<0&&(r=0);var i=n+u*E/2;i>u&&(i=u),b(r,i)}}))}},e.DASH_LENGTH=4,e}(Kg),xO=function(t){function e(){var e=null!==t&&t.apply(this,arguments)||this;return e.type="grid",e.renderType=I.SVG,e}return n(e,t),e.prototype.render=function(t){void 0===t&&(t=!0);var e=Za(this.getOptions(),"grid","x","enabled"),n=Za(this.getOptions(),"grid","y","enabled");this.drawBackdrop(e,n),(e||n)&&(e&&(Hg.appendOrSelect(this.backdrop,"g.x.grid"),this.drawXGrid(t)),n&&(Hg.appendOrSelect(this.backdrop,"g.y.grid"),this.drawYGrid(t)))},e.prototype.drawXGrid=function(t){var e=this,n=this.parent,r=this.backdrop.attr("height"),i=lv(this.services.cartesianScales.getMainXScale()).tickSizeInner(-r).tickSizeOuter(0);if(Za(this.getOptions(),"grid","x","alignWithAxisTicks")){var o=this.services.cartesianScales.getDomainAxisPosition(),a=Za(this.getOptions(),"axes",o,"ticks","values");a&&i.tickValues(a)}else{var s=Za(this.getOptions(),"grid","x","numberOfTicks");i.ticks(s)}var l=n.select(".x.grid").attr("transform","translate("+-this.backdrop.attr("x")+", "+r+")");t?l.transition().call((function(n){return e.services.transitions.setupTransition({transition:n,name:"grid-update",animate:t})})).call(i):l.call(i),this.cleanGrid(l)},e.prototype.drawYGrid=function(t){var e=this,n=this.parent,r=this.backdrop.attr("width"),i=uv(this.services.cartesianScales.getMainYScale()).tickSizeInner(-r).tickSizeOuter(0);if(Za(this.getOptions(),"grid","y","alignWithAxisTicks")){var o=this.services.cartesianScales.getRangeAxisPosition(),a=Za(this.getOptions(),"axes",o,"ticks","values");a&&i.tickValues(a)}else{var s=Za(this.getOptions(),"grid","y","numberOfTicks");i.ticks(s)}var l=n.select(".y.grid").attr("transform","translate(0, "+-this.backdrop.attr("y")+")");t?l.transition().call((function(n){return e.services.transitions.setupTransition({transition:n,name:"grid-update",animate:t})})).call(i):l.call(i),this.cleanGrid(l)},e.prototype.getGridlineThreshold=function(t){var e,n=this.parent,r=n.selectAll(".x.grid .tick").nodes().sort((function(t,e){return Number(ja(t).tx)-Number(ja(e).tx)})),i=-1;if(r.length){r.forEach((function(e,n){t[0]>=+ja(e).tx&&i++})),e=i+1<r.length?i+1:r.length;var o,a=r[i],s=r[e];if(a)if(s)o=+ja(s).tx-+ja(a).tx;else{var l=n.select("rect.chart-grid-backdrop").node();o=Hg.getSVGElementSize(l).width-+ja(a).tx}else o=+ja(s).tx;return o*this.getOptions().tooltip.gridline.threshold}},e.prototype.getActiveGridline=function(t){var e=Za(this.getOptions,"tooltip","gridline","threshold"),n=e||this.getGridlineThreshold(t);return this.parent.selectAll(".x.grid .tick").filter((function(){var e=ja(this),r=Number(e.tx)-n,i=Number(e.tx)+n;return r<=t[0]&&t[0]<=i}))},e.prototype.drawBackdrop=function(t,e){var n=this.parent,r=this.services.cartesianScales.getMainXScale(),i=this.services.cartesianScales.getMainYScale(),o=r.range(),a=o[0],s=o[1],l=i.range(),u=l[0],c=l[1];this.backdrop=Hg.appendOrSelect(n,"svg.chart-grid-backdrop");var h=Hg.appendOrSelect(this.backdrop,t||e?"rect.chart-grid-backdrop.stroked":"rect.chart-grid-backdrop");this.backdrop.merge(h).attr("x",a).attr("y",c).attr("width",Math.abs(s-a)).attr("height",Math.abs(u-c)).lower(),h.attr("width","100%").attr("height","100%")},e.prototype.cleanGrid=function(t){t.selectAll("text").remove(),t.select(".domain").remove()},e}(Kg);var wO,OO=function(t){function e(){var e=null!==t&&t.apply(this,arguments)||this;return e.type="ruler",e.renderType=I.SVG,e.isXGridEnabled=Za(e.getOptions(),"grid","x","enabled"),e.isYGridEnabled=Za(e.getOptions(),"grid","y","enabled"),e.isEventListenerAdded=!1,e}return n(e,t),e.prototype.render=function(){var t=Za(this.getOptions(),"ruler","enabled");this.drawBackdrop(),t&&!this.isEventListenerAdded?this.addBackdropEventListeners():!t&&this.isEventListenerAdded&&this.removeBackdropEventListeners()},e.prototype.removeBackdropEventListeners=function(){this.isEventListenerAdded=!1,this.backdrop.on("mousemove mouseover mouseout",null)},e.prototype.formatTooltipData=function(t){return t},e.prototype.showRuler=function(t,e){var n=this,r=e[0],i=e[1],o=this.parent,a=this.services.cartesianScales.getOrientation(),s=this.model.getDisplayData(),l=this.services.cartesianScales.getRangeScale().range(),u=l[0],c=l[1],h=a===H.HORIZONTAL?i:r,d=Hg.appendOrSelect(o,"g.ruler").attr("aria-label","ruler"),f=Hg.appendOrSelect(d,"line.ruler-line"),p=o.selectAll("[role=graphics-symbol]"),g=s.map((function(t){return{domainValue:n.services.cartesianScales.getDomainValue(t),originalData:t}})).filter((function(t){return function(t,e){return t>e-5&&t<e+5}(t.domainValue,h)}));if(this.pointsWithinLine&&g.length===this.pointsWithinLine.length&&g.map((function(t){return t.domainValue})).join()===this.pointsWithinLine.map((function(t){return t.domainValue})).join())return this.pointsWithinLine=g,this.services.events.dispatchEvent(ht.Tooltip.MOVE,{mousePosition:[r,i]});this.pointsWithinLine=g;var v=this.pointsWithinLine.reduce((function(t,e){if(0===t.length)return t.push(e),t;var n=t[0].domainValue,r=Math.abs(h-e.domainValue),i=Math.abs(h-n);return r>i||(r<i?t=[e]:t.push(e)),t}),[]);if(v.length>0){var m=v.map((function(t){return t.originalData})).filter((function(t){var e=t[n.services.cartesianScales.getRangeIdentifier(t)];return null!=e})),y=v.map((function(t){return t.domainValue})),b=p.filter((function(t){var e=n.services.cartesianScales.getDomainValue(t);return y.includes(e)}));this.elementsToHighlight&&this.elementsToHighlight.size()>0&&!vo(this.elementsToHighlight,b)&&this.hideRuler(),b.dispatch("mouseover"),this.elementsToHighlight=b,this.services.events.dispatchEvent(ht.Tooltip.SHOW,{mousePosition:[r,i],hoveredElement:f,data:this.formatTooltipData(m)}),d.attr("opacity",1);var E=v[0];"horizontal"===a?f.attr("x1",c).attr("x2",u).attr("y1",E.domainValue).attr("y2",E.domainValue):f.attr("y1",c).attr("y2",u).attr("x1",E.domainValue).attr("x2",E.domainValue)}else this.hideRuler()},e.prototype.hideRuler=function(){var t=this.parent,e=Hg.appendOrSelect(t,"g.ruler");t.selectAll("[role=graphics-symbol]").dispatch("mouseout"),this.services.events.dispatchEvent(ht.Tooltip.HIDE),e.attr("opacity",0)},e.prototype.addBackdropEventListeners=function(){this.isEventListenerAdded=!0;var t=this,e=this.services.domUtils.getHolder(),n=this.model.getDisplayData(),r=function(e){var n=Va(e,t.parent.node());t.showRuler(e,n)};n.length>100&&(r=function(t,e,n){var r=null;return function(){var i=this,o=arguments;i.mousePosition=Va(o[0],n),clearTimeout(r),r=setTimeout((function(){t.apply(i,o)}),e)}}((function(e){var n=this.mousePosition;t.showRuler(e,n)}),n.length%50*12.5,e));this.backdrop.on("mousemove mouseover",r).on("mouseout",this.hideRuler.bind(this))},e.prototype.drawBackdrop=function(){var t=this.parent;this.backdrop=Hg.appendOrSelect(t,"svg.chart-grid-backdrop")},e}(Kg),TO=function(t){function e(){var e=null!==t&&t.apply(this,arguments)||this;return e.type="ruler-binned",e.renderType=I.SVG,e}return n(e,t),e.prototype.showRuler=function(t,e){var n=this,r=e[0],i=e[1],o=this.parent,a=this.model.getOptions(),s=this.services.cartesianScales.getOrientation(),l=this.services.cartesianScales.getRangeScale().range(),u=l[0],c=l[1],h=this.services.cartesianScales.getDomainScale(),d=h.invert(s===H.VERTICAL?r:i),f=Hg.appendOrSelect(o,"g.ruler").attr("aria-label","ruler"),p=Hg.appendOrSelect(f,"line.ruler-line"),g=o.selectAll("[role=graphics-symbol]").filter((function(t){if(parseFloat(jn(t,"data.x0"))<=d&&parseFloat(jn(t,"data.x1"))>=d)return!0}));if(g.size()>0){this.elementsToHighlight&&this.elementsToHighlight.size()>0&&!vo(this.elementsToHighlight,g)&&this.hideRuler(),g.dispatch("mouseover"),this.elementsToHighlight=g;var v=Ba(g.nodes()[0]).datum(),m=parseFloat(jn(v,"data.x0")),y=parseFloat(jn(v,"data.x1")),b=this.model.getActiveDataGroupNames(),E=b.reverse().map((function(t){return{label:t,value:jn(v,"data."+t),class:n.model.getColorClassName({classNameTypes:[N.TOOLTIP],dataGroupName:t})}})).filter((function(t){return 0!==t.value}));if(E.length>0){this.services.events.dispatchEvent(ht.Tooltip.SHOW,{mousePosition:[r,i],hoveredElement:p,items:R([{label:jn(a,"bins.rangeLabel")||"Range",value:m+" – "+y}],E,!0===Za(a,"tooltip","showTotal")?[{label:jn(a,"tooltip.totalLabel")||"Total",value:b.reduce((function(t,e){return t+parseFloat(jn(v,"data."+e))}),0)}]:[])}),f.attr("opacity",1);var _=h((m+y)/2);"horizontal"===s?p.attr("x1",c).attr("x2",u).attr("y1",_).attr("y2",_):p.attr("y1",c).attr("y2",u).attr("x1",_).attr("x2",_)}else this.hideRuler()}else this.hideRuler()},e}(OO),SO=function(t){function e(){return null!==t&&t.apply(this,arguments)||this}return n(e,t),e.prototype.formatTooltipData=function(t){return t.reverse()},e}(OO),MO=function(t){function e(){var e=null!==t&&t.apply(this,arguments)||this;return e.type="toolbar",e.renderType=I.HTML,e}return n(e,t),e.prototype.init=function(){var t=this,e=function(){return t.updateOverflowMenu(!1)};this.services.events.addEventListener(ht.Toolbar.SHOW_OVERFLOW_MENU,(function(){t.renderOverflowMenu(),document.body.addEventListener("click",e)})),this.services.events.addEventListener(ht.Toolbar.HIDE_OVERFLOW_MENU,(function(){document.body.removeEventListener("click",e)}))},e.prototype.render=function(t){var e=this,n=this.getComponentContainer().attr("role","toolbar").attr("aria-label","chart-"+this.services.domUtils.getChartID()+" toolbar");if(Za(this.getOptions(),"data","loading"))n.html(""),this.overflowMenu=null;else{this.overflowMenu||(this.overflowMenu=n.append("div").attr("class","cds--overflow-menu-options cds--overflow-menu--flip cds--overflow-menu-options cds--overflow-menu--flip").attr("tabindex",-1).html("<ul role='menu'></ul>"));var r=this.getControlConfigs(),i=r.buttonList;r.overflowMenuItemList&&i.push(this.getOverflowButtonConfig());var o=n.selectAll("div.toolbar-control").data(i,(function(t){return t.id}));o.exit().remove();var a=o.enter().append("div").attr("class","toolbar-control cds--overflow-menu cds--overflow-menu").attr("role","button"),s=this;a.merge(o).classed("disabled",(function(t){return t.shouldBeDisabled()})).attr("aria-disabled",(function(t){return t.shouldBeDisabled()})).attr("aria-label",(function(t){return t.title})).html((function(t){return'\n\t\t\t<button\n\t\t\t\tclass="cds--overflow-menu__trigger cds--overflow-menu__trigger"\n\t\t\t\taria-haspopup="true" aria-expanded="false" id="'+e.services.domUtils.generateElementIDString("control-"+t.id)+'" aria-label="'+t.title+'">\n\t\t\t\t<svg focusable="false" preserveAspectRatio="xMidYMid meet" xmlns="http://www.w3.org/2000/svg" class="cds--overflow-menu__icon cds--overflow-menu__icon" viewBox="0 0 32 32" aria-hidden="true">\n\t\t\t\t\t'+t.iconSVG.content+"\n\t\t\t\t</svg>\n\t\t\t</button>"})).each((function(t,e){var n=this;Ba(this).select("svg").style("will-change","transform").style("width",void 0!==t.iconSVG.width?t.iconSVG.width:"20px").style("height",void 0!==t.iconSVG.height?t.iconSVG.height:"20px"),Ba(this).select("button").on("click",(function(e){t.shouldBeDisabled()||s.triggerFunctionAndEvent(t,e,n)})).on("keydown",(function(r){r.key&&"Enter"===r.key||" "===r.key?(r.preventDefault(),s.triggerFunctionAndEvent(t,r,n)):r.key&&"ArrowLeft"===r.key?s.focusOnPreviousEnabledToolbarItem(e):r.key&&"ArrowRight"===r.key&&s.focusOnNextEnabledToolbarItem(e)}))}));this.overflowButton=this.getComponentContainer().select("button.cds--overflow-menu__trigger#"+this.services.domUtils.generateElementIDString("control-toolbar-overflow-menu"))}},e.prototype.renderOverflowMenu=function(){var t=this,e=this.getControlConfigs().overflowMenuItemList,n=this.overflowMenu.select("ul").selectAll("li.cds--overflow-menu-options__option").data(e,(function(t){return Za(t,"id")}));n.exit().remove();var r=n.enter().append("li").attr("id",(function(e){return t.services.domUtils.generateElementIDString("control-"+e.id)})).attr("class","cds--overflow-menu-options__option cds--overflow-menu-options__option").attr("role","menuitem").attr("tabindex",1);r.append("button").attr("class","cds--overflow-menu-options__btn cds--overflow-menu-options__btn"),r.merge(n).classed("cds--overflow-menu-options__option--disabled",(function(t){return t.shouldBeDisabled()})).classed("cds--overflow-menu-options__option--disabled",(function(t){return t.shouldBeDisabled()})).attr("aria-disabled",(function(t){return t.shouldBeDisabled()})).selectAll("button").text((function(t){return t.text}))},e.prototype.isOverflowMenuOpen=function(){return this.overflowMenu.classed("is-open")},e.prototype.updateOverflowMenu=function(t){this.overflowMenu&&(this.overflowMenu.classed("is-open",t),this.overflowButton&&(this.overflowButton.attr("aria-expanded",t),Ba(this.overflowButton.node().parentNode).classed("cds--overflow-menu--open",t).classed("cds--overflow-menu--open",t)),t?this.services.events.dispatchEvent(ht.Toolbar.SHOW_OVERFLOW_MENU):this.services.events.dispatchEvent(ht.Toolbar.HIDE_OVERFLOW_MENU))},e.prototype.focusOnPreviousEnabledToolbarItem=function(t){for(var e=this.getToolbarButtonItems(),n=e.length,r=t-1;r>=0;r--){if(!e[r].shouldBeDisabled()){n=r;break}}if(n<e.length){var i=Ba("button#"+this.services.domUtils.generateElementIDString("control-"+e[n].id)).node();"focus"in i&&i.focus()}},e.prototype.focusOnNextEnabledToolbarItem=function(t){for(var e=this.getToolbarButtonItems(),n=-1,r=t+1;r<e.length;r++){if(!e[r].shouldBeDisabled()){n=r;break}}if(n>-1){var i=Ba("button#"+this.services.domUtils.generateElementIDString("control-"+e[n].id)).node();"focus"in i&&i.focus()}},e.prototype.focusOnPreviousEnabledMenuItem=function(t){for(var e=this.getOverflowMenuItems(),n=e.length,r=t-1;r>=0;r--){if(!e[r].shouldBeDisabled()){n=r;break}}if(n<e.length){var i=Ba("#"+this.services.domUtils.generateElementIDString("control-"+e[n].id)+" button").node();"focus"in i&&i.focus()}},e.prototype.focusOnNextEnabledMenuItem=function(t){for(var e=this.getOverflowMenuItems(),n=-1,r=t+1;r<e.length;r++){if(!e[r].shouldBeDisabled()){n=r;break}}if(n>-1){var i=Ba("#"+this.services.domUtils.generateElementIDString("control-"+e[n].id)+" button").node();"focus"in i&&i.focus()}},e.prototype.toggleOverflowMenu=function(t){var e=this;if(this.isOverflowMenuOpen())this.updateOverflowMenu(!1);else{this.updateOverflowMenu(!0);var n=this;this.getOverflowMenuItems().forEach((function(r,i){var o=Ba("#"+e.services.domUtils.generateElementIDString("control-"+r.id));null!==o&&(o.on("click",(function(){n.triggerFunctionAndEvent(r,t,o.node()),n.updateOverflowMenu(!1)})),o.on("keydown",(function(e){e&&"Enter"===e.key?n.triggerFunctionAndEvent(r,t,o.node()):e&&"ArrowUp"===e.key?n.focusOnPreviousEnabledMenuItem(i):e&&"ArrowDown"===e.key?n.focusOnNextEnabledMenuItem(i):e&&"Escape"===e.key&&n.updateOverflowMenu(!1),e.preventDefault()})))})),n.focusOnNextEnabledMenuItem(-1)}t&&t.stopImmediatePropagation()},e.prototype.triggerFunctionAndEvent=function(t,e,n){"function"==typeof t.shouldBeDisabled&&t.shouldBeDisabled()||("function"==typeof t.clickFunction&&t.clickFunction(e),this.services.events.dispatchEvent(ht.Toolbar.BUTTON_CLICK,{control:t,event:e,element:n}))},e.prototype.getControlConfigs=function(){var t=this,n=Za(this.getOptions(),"toolbar","numberOfIcons")-1,r=Za(this.getOptions(),"toolbar","controls"),i=[],o=[],a=[];return r.forEach((function(r){var s=null;r.type===it.CUSTOM?(null===Za(r,"id")&&(r.id="toolbar-button-"+e.buttonID++),null===Za(r,"shouldBeDisabled")&&(r.shouldBeDisabled=function(){return!1}),s=r):s=t.getControlConfigByType(r.type),s&&(s.text=r.text?r.text:r.type,-1!==s.id.indexOf("toolbar-export")?i.push(s):o.length<n?null===Za(s,"iconSVG","content")?a.push(s):o.push(s):a.push(s))})),a.push.apply(a,i),a.length?{buttonList:o,overflowMenuItemList:a}:{buttonList:o}},e.prototype.getToolbarButtonItems=function(){var t=this.getControlConfigs(),e=t.buttonList;return t.overflowMenuItemList&&e.push(this.getOverflowButtonConfig()),e||[]},e.prototype.getOverflowMenuItems=function(){var t=this.getControlConfigs().overflowMenuItemList;return t||[]},e.prototype.getOverflowButtonConfig=function(){var t=this;return{id:"toolbar-overflow-menu",title:"More options",shouldBeDisabled:function(){return!1},iconSVG:{content:'<circle cx="16" cy="8" r="2"></circle>\n\t\t\t\t<circle cx="16" cy="16" r="2"></circle>\n\t\t\t\t<circle cx="16" cy="24" r="2"></circle>'},clickFunction:function(e){return t.toggleOverflowMenu(e)}}},e.prototype.getControlConfigByType=function(t){var e,n=this,r=this.services.zoom&&this.services.zoom.isZoomBarEnabled()&&!this.services.zoom.isEmptyState(),i=this.model.getDisplayData();switch(t){case it.ZOOM_IN:r&&(e={id:"toolbar-zoomIn",title:"Zoom in",shouldBeDisabled:function(){return n.services.zoom.isMinZoomDomain()},iconSVG:{content:this.getControlIconByType(t)},clickFunction:function(){return n.services.zoom.zoomIn()}});break;case it.ZOOM_OUT:r&&(e={id:"toolbar-zoomOut",title:"Zoom out",shouldBeDisabled:function(){return n.services.zoom.isMaxZoomDomain()},iconSVG:{content:this.getControlIconByType(t)},clickFunction:function(){return n.services.zoom.zoomOut()}});break;case it.RESET_ZOOM:r&&(e={id:"toolbar-resetZoom",title:"Reset zoom",shouldBeDisabled:function(){return n.services.zoom.isMaxZoomDomain()},iconSVG:{content:this.getControlIconByType(t)},clickFunction:function(){return n.services.zoom.resetZoomDomain()}});break;case it.MAKE_FULLSCREEN:e={id:"toolbar-makefullscreen",iconSVG:{content:this.getControlIconByType(t),width:"15px",height:"15px"},title:"Make fullscreen",shouldBeDisabled:function(){return!1},clickFunction:function(){n.services.domUtils.toggleFullscreen()}};break;case it.SHOW_AS_DATATABLE:e={id:"toolbar-showasdatatable",iconSVG:{content:this.getControlIconByType(t)},title:"Show as table",shouldBeDisabled:function(){return 0===i.length},clickFunction:function(){return n.services.events.dispatchEvent(ht.Modal.SHOW)}};break;case it.EXPORT_CSV:e={id:"toolbar-export-CSV",title:"Export as CSV",shouldBeDisabled:function(){return!1},iconSVG:{content:this.getControlIconByType(t)},clickFunction:function(){return n.model.exportToCSV()}};break;case it.EXPORT_PNG:e={id:"toolbar-export-PNG",title:"Export as PNG",shouldBeDisabled:function(){return!1},iconSVG:{content:this.getControlIconByType(t)},clickFunction:function(){return n.services.domUtils.exportToPNG()}};break;case it.EXPORT_JPG:e={id:"toolbar-export-JPG",title:"Export as JPG",shouldBeDisabled:function(){return!1},iconSVG:{content:this.getControlIconByType(t)},clickFunction:function(){return n.services.domUtils.exportToJPG()}};break;default:throw Error("Not supported toolbar control type: "+t)}return e},e.prototype.getControlIconByType=function(t){switch(t){case it.ZOOM_IN:return'<polygon points="19 13 15 13 15 9 13 9 13 13 9 13 9 15 13 15 13 19 15 19 15 15 19 15 19 13"/>\n\t\t\t\t\t\t<path d="M22.45,21A10.87,10.87,0,0,0,25,14,11,11,0,1,0,14,25a10.87,10.87,0,0,0,7-2.55L28.59,30,30,28.59ZM14,23a9,9,0,1,1,9-9A9,9,0,0,1,14,23Z"/>';case it.ZOOM_OUT:return'<rect x="9" y="13" width="10" height="2"/>\n\t\t\t\t\t\t<path d="M22.45,21A10.87,10.87,0,0,0,25,14,11,11,0,1,0,14,25a10.87,10.87,0,0,0,7-2.55L28.59,30,30,28.59ZM14,23a9,9,0,1,1,9-9A9,9,0,0,1,14,23Z"/>';case it.RESET_ZOOM:return'<path d="M22.4478,21A10.855,10.855,0,0,0,25,14,10.99,10.99,0,0,0,6,6.4658V2H4v8h8V8H7.332a8.9768,8.9768,0,1,1-2.1,8H3.1912A11.0118,11.0118,0,0,0,14,25a10.855,10.855,0,0,0,7-2.5522L28.5859,30,30,28.5859Z"/>';case it.MAKE_FULLSCREEN:return'<polygon points="21 2 21 4 26.59 4 17 13.58 18.41 15 28 5.41 28 11 30 11 30 2 21 2"/><polygon points="15 18.42 13.59 17 4 26.59 4 21 2 21 2 30 11 30 11 28 5.41 28 15 18.42"/>';case it.SHOW_AS_DATATABLE:return'<rect x="4" y="6" width="18" height="2"/><rect x="4" y="12" width="18" height="2"/><rect x="4" y="18" width="18" height="2"/><rect x="4" y="24" width="18" height="2"/><rect x="26" y="6" width="2" height="2"/><rect x="26" y="12" width="2" height="2"/><rect x="26" y="18" width="2" height="2"/><rect x="26" y="24" width="2" height="2"/>';case it.EXPORT_CSV:case it.EXPORT_JPG:case it.EXPORT_PNG:return'<path d="M22.4478,21A10.855,10.855,0,0,0,25,14,10.99,10.99,0,0,0,6,6.4658V2H4v8h8V8H7.332a8.9768,8.9768,0,1,1-2.1,8H3.1912A11.0118,11.0118,0,0,0,14,25a10.855,10.855,0,0,0,7-2.5522L28.5859,30,30,28.5859Z"/>';default:throw Error("Not supported toolbar control type: "+t)}},e.buttonID=0,e}(Kg),CO=function(t){function e(){var e=null!==t&&t.apply(this,arguments)||this;return e.type="zero-line",e.renderType=I.SVG,e}return n(e,t),e.prototype.render=function(t){var e=this,n=this.services.cartesianScales.getRangeAxisPosition({groups:this.configs.groups}),r=this.services.cartesianScales.getScaleByPosition(n),i=r.domain(),o=i[0],a=i[1],s=o>0&&a<0||o<0&&a>0,l=this.getComponentContainer();if(s){var u=this.services.cartesianScales.getDomainScale().range(),c=u[0],h=u[1],d=+r(0)+.5;d||(d=r.range()[0]);var f=Xa({x0:c,x1:h,y0:d,y1:d},this.services.cartesianScales.getOrientation());Hg.appendOrSelect(l,"line.domain").transition().call((function(n){return e.services.transitions.setupTransition({transition:n,name:"zero-line-update",animate:t})})).attr("y1",f.y0).attr("y2",f.y1).attr("x1",f.x0).attr("x2",f.x1)}else l.selectAll("line.domain").remove()},e}(Kg),AO=function(t){function e(){var e=null!==t&&t.apply(this,arguments)||this;return e.type="zoom-bar",e.renderType=I.SVG,e.MIN_SELECTION_DIFF=9e-10,e.brushSelector="g.zoom-bar-brush",e.clipId="zoomBarClip-"+Math.floor(99999999999*Math.random()),e.brush=fb(),e.highlightStrokeWidth=1,e}return n(e,t),e.prototype.init=function(){this.services.events.addEventListener(ht.ZoomBar.UPDATE,this.render.bind(this));var t=Za(this.getOptions(),"zoomBar",U.TOP,"data");this.model.setZoomBarData(t)},e.prototype.render=function(t){var e=this,n=this.getComponentContainer(),r=this.services.zoom.isZoomBarLoading(U.TOP),i=this.services.zoom.isZoomBarLocked(U.TOP),o=Za(this.getOptions(),"zoomBar",U.TOP,"type"),a=Za(this.getOptions(),"axes",U.BOTTOM,"highlights"),s=Rt.height[o],l=Hg.getSVGElementSize(this.parent,{useAttrs:!0}).width;if(0!==l){var u=0,c=this.model.get("axesMargins");c&&c.left&&(u=c.left);var h=Hg.appendOrSelect(n,"svg.zoom-container").attr("width","100%").attr("height",s).attr("opacity",1);Hg.appendOrSelect(n,"rect.zoom-spacer").attr("x",0).attr("y",s).attr("width","100%").attr("height",Rt.spacerHeight).attr("opacity",1).attr("fill","none");if(o===B.GRAPH_VIEW?Hg.appendOrSelect(h,"rect.zoom-bg").attr("x",u).attr("y",0).attr("width",l-u).attr("height","100%").classed("zoom-bg-skeleton",r).style("stroke",r?"url(#"+this.services.domUtils.generateElementIDString("shimmer-lines")+")":null):o===B.SLIDER_VIEW&&Hg.appendOrSelect(h,"rect.zoom-slider-bg").attr("x",u).attr("y",s/2-1).attr("width",l-u).attr("height",2).classed("zoom-slider-bg-skeleton",r).style("stroke",r?"url(#"+this.services.domUtils.generateElementIDString("shimmer-lines")+")":null),r)this.renderSkeleton(h,u,l);else{var d=this.services.cartesianScales,f=d.getMainXScale(),p=d.getMainYScale(),g=d.getMainXScaleType();if(f&&g===G.TIME){var v=this.services.zoom.getZoomBarData();if(go(v)||1===v.length)return;this.xScale=f.copy(),this.yScale=p.copy();var m=this.services.zoom.getDefaultZoomBarDomain(v);v=this.compensateDataForDefaultDomain(v,m);var y=this.model.get("initialZoomDomain"),b=Za(this.getOptions(),"zoomBar",U.TOP,"initialZoomDomain");b&&b[0]&&b[1]&&(b[0]=new Date(b[0]),b[1]=new Date(b[1])),!b||y&&y[0].valueOf()===b[0].valueOf()&&y[1].valueOf()===b[1].valueOf()?null===b&&null!==y&&this.model.set({initialZoomDomain:null,zoomDomain:bo([],m)},{skipUpdate:!0}):this.model.set({initialZoomDomain:bo([],b),zoomDomain:b?bo([],b):m},{skipUpdate:!0}),this.xScale.range([u,l]).domain(m),this.maxSelectionRange=this.xScale.range(),this.yScale.range([0,s-6]).domain(Ys(v,(function(t){return t.value})));var E=this.model.get("zoomDomain");if(o===B.GRAPH_VIEW&&(this.renderZoomBarArea(h,"path.zoom-graph-area-unselected",v,null),this.updateClipPath(n,this.clipId,0,0,0,0),this.renderZoomBarArea(h,"path.zoom-graph-area",v,this.clipId),this.renderZoomBarBaseline(h,u,l),a)){var _=a.highlightStartMapsTo,x=a.highlightEndMapsTo,w=a.color,O=a.labelMapsTo;a.data.forEach((function(t,n){Hg.appendOrSelect(h,"rect.highlight-"+n).attr("height",s-2*e.highlightStrokeWidth).attr("y",e.highlightStrokeWidth).attr("x",e.xScale(t[_])).attr("width",e.xScale(t[x])-e.xScale(t[_])).style("fill",w&&w.scale[t[O]]?w.scale[t[O]]:null).style("fill-opacity",.1).style("stroke",w&&w.scale[t[O]]?w.scale[t[O]]:null).style("stroke-dasharray","2, 2").attr("stroke-width","1px")}))}this.addBrushEventListener(E,u,l);var T=Hg.appendOrSelect(n,this.brushSelector).call(this.brush);if(void 0===E);else if(E[0].valueOf()===E[1].valueOf())T.call(this.brush.move,this.xScale.range()),this.updateBrushHandle(this.getComponentContainer(),this.xScale.range(),this.xScale.domain());else{var S=E.map((function(t){return e.xScale(t)}));S[1]-S[0]<this.MIN_SELECTION_DIFF||(T.call(this.brush.move,S),this.updateBrushHandle(this.getComponentContainer(),S,E))}i&&(this.brush.filter((function(){return!1})),T.selectAll("rect").attr("cursor","auto"))}}}},e.prototype.addBrushEventListener=function(t,e,n){var r=this,i=Za(this.getOptions(),"zoomBar",U.TOP,"type"),o=Rt.height[i];this.brush.extent([[e,0],[n,o]]).on("start brush end",null).on("start brush end",(function(e){var n=e.selection;null===n?r.handleBrushedEvent(e,t,r.xScale,r.xScale.range()):n[0]===n[1]||r.handleBrushedEvent(e,t,r.xScale,n)}))},e.prototype.handleBrushedEvent=function(t,e,n,r){var i=[n.invert(r[0]),n.invert(r[1])];if(this.updateBrushHandle(this.getComponentContainer(),r,i),null!=t.sourceEvent&&("mousemove"===t.sourceEvent.type||"mouseup"===t.sourceEvent.type||"mousedown"===t.sourceEvent.type||"touchstart"===t.sourceEvent.type||"touchmove"===t.sourceEvent.type||"touchend"===t.sourceEvent.type)){void 0!==e&&e[0]===i[0]&&e[1]===i[1]||this.services.zoom.handleDomainChange(i,{dispatchEvent:!1});var o=void 0;"start"===t.type?o=ht.ZoomBar.SELECTION_START:"brush"===t.type?o=ht.ZoomBar.SELECTION_IN_PROGRESS:"end"===t.type&&(o=ht.ZoomBar.SELECTION_END,this.services.events.dispatchEvent(ht.ZoomDomain.CHANGE,{newDomain:i})),this.services.events.dispatchEvent(o,{selection:r,newDomain:i})}},e.prototype.updateBrushHandle=function(t,e,n){var r=this,i=Rt.handleWidth,o=Za(this.getOptions(),"zoomBar",U.TOP,"type"),a=Rt.height[o],s=-i/2,l=Rt.handleBarWidth,u=o===B.GRAPH_VIEW?Rt.handleBarHeight:6,c=-l/2,h=(a-u)/2;t.select(this.brushSelector).selectAll("rect.handle").data([{type:"w"},{type:"e"}]).attr("x",(function(t){return"w"===t.type?Math.max(e[0]+s,r.maxSelectionRange[0]):"e"===t.type?Math.min(e[1]+s,r.maxSelectionRange[1]-i):void 0})).attr("y",0).attr("width",i).attr("height",a).attr("cursor","ew-resize").style("display",null);var d=t.select(this.brushSelector).selectAll("rect.handle-bar").data([{type:"w"},{type:"e"}]);d.enter().append("rect").attr("class",(function(t){return"handle-bar handle-bar--"+t.type})),d.attr("x",(function(t){return"w"===t.type?Math.max(e[0]+c,r.maxSelectionRange[0]-s+c):"e"===t.type?Math.min(e[1]+c,r.maxSelectionRange[1]+s+c):void 0})).attr("y",h).attr("width",l).attr("height",u).attr("cursor","ew-resize"),o===B.SLIDER_VIEW&&this.updateSliderSelectedArea(e),this.updateClipPath(t,this.clipId,e[0],0,e[1]-e[0],a)},e.prototype.updateSliderSelectedArea=function(t){var e=Za(this.getOptions(),"zoomBar",U.TOP,"type"),n=Rt.height[e],r=(Hg.getSVGElementSize(this.parent,{useAttrs:!0}).width,this.model.get("axesMargins"));r&&r.left&&r.left;var i=this.getComponentContainer().select("svg.zoom-container");Hg.appendOrSelect(i,"rect.zoom-slider-selected-area").attr("x",t[0]).attr("y",n/2-1).attr("width",t[1]-t[0]).attr("height",2)},e.prototype.renderZoomBarArea=function(t,e,n,r){var i=this.services.cartesianScales,o=i.getMainXAxisPosition(),a=i.getMainYAxisPosition(),s=i.getMainXScaleType(),l=i.getMainYScaleType(),u=function(t,e,n){return function(r,o){return i.getValueFromScale(t,e,n,r,o)}},c=u(this.xScale,s,o),h=u(this.yScale,l,a),d=Za(this.getOptions(),"zoomBar",U.TOP,"type"),f=Rt.height[d],p=kd().x((function(t,e){return c(t,e)})).y0(f).y1((function(t,e){return f-h(t,e)})),g=Hg.appendOrSelect(t,e).datum(n).attr("d",p);r&&g.attr("clip-path","url(#"+r+")")},e.prototype.updateClipPath=function(t,e,n,r,i,o){var a=Hg.appendOrSelect(t,"clipPath").attr("id",e);Hg.appendOrSelect(a,"rect").attr("x",n).attr("y",r).attr("width",i).attr("height",o)},e.prototype.compensateDataForDefaultDomain=function(t,e){if(t&&!(t.length<2)){var n,r=Ha(t),i=this.services.cartesianScales.getDomainIdentifier(),o=this.services.cartesianScales.getRangeIdentifier();if(Number(e[0])<Number(r[0][i]))(n={})[i]=e[0],n[o]=0,r.unshift(n);if(Number(e[1])>Number(r[r.length-1][i]))(n={})[i]=e[1],n[o]=0,r.push(n);return r}},e.prototype.renderZoomBarBaseline=function(t,e,n,r){void 0===r&&(r=!1);var i=Za(this.model.getOptions(),"zoomBar",U.TOP,"type"),o=Rt.height[i],a=Dd()([[e,o],[n,o]]);Hg.appendOrSelect(t,"path.zoom-bg-baseline").attr("d",a).classed("zoom-bg-baseline-skeleton",r).style("stroke",r?"url(#"+this.services.domUtils.generateElementIDString("shimmer-lines")+")":null)},e.prototype.renderSkeleton=function(t,e,n){this.renderZoomBarArea(t,"path.zoom-graph-area-unselected",[],null),this.renderZoomBarArea(t,"path.zoom-graph-area",[],this.clipId),this.brush.on("start brush end",null),Hg.appendOrSelect(this.getComponentContainer(),this.brushSelector).html(null),Za(this.getOptions(),"zoomBar",U.TOP,"type")===B.GRAPH_VIEW&&this.renderZoomBarBaseline(t,e,n,!0)},e.prototype.destroy=function(){this.brush.on("start brush end",null),this.services.events.removeEventListener(ht.ZoomBar.UPDATE,this.render.bind(this))},e}(Kg),LO=function(){function t(t,e){this.services={domUtils:Hg,files:zg,events:Gg,gradientUtils:Fg,transitions:jg,canvasZoom:Zg},this.model=new gg(this.services)}return t.prototype.init=function(t,e){var n=this;this.model.set({holder:t},{skipUpdate:!0}),Object.keys(this.services).forEach((function(t){var e=n.services[t];n.services[t]=new e(n.model,n.services)})),this.services.events.addEventListener(ht.Model.UPDATE,(function(t){var e=!!Za(t,"detail","animate");n.update(e)})),this.model.setData(e.data),this.services.events.addEventListener(ht.Chart.RESIZE,(function(){n.update(!1)})),this.components=this.getComponents(),this.update()},t.prototype.getComponents=function(){return console.error("getComponents() method is not implemented"),null},t.prototype.update=function(t){var e=this;if(void 0===t&&(t=!0),this.components){Object.keys(this.services).forEach((function(t){e.services[t].update()})),this.components.forEach((function(e){return e.render(t)}));var n=this.services.transitions.getPendingTransitions(),r=Object.keys(n).map((function(t){return n[t].end().catch((function(t){return t}))}));Promise.all(r).then((function(){return e.services.events.dispatchEvent(ht.Chart.RENDER_FINISHED)}))}},t.prototype.destroy=function(){this.components.forEach((function(t){return t.destroy()})),this.services.domUtils.getHolder().remove(),this.model.set({destroyed:!0},{skipUpdate:!0})},t.prototype.getChartComponents=function(t,e){var n=this.model.getOptions(),r=Za(n,"toolbar","enabled"),i={id:"legend",components:[new Qg(this.model,this.services)],growth:Y.PREFERRED},o=Za(n,"canvasZoom","enabled");o&&!0===o&&t.push(new Sm(this.model,this.services));var a=!!this.model.getOptions().title,s={id:"title",components:[new _m(this.model,this.services)],growth:Y.STRETCH},l={id:"toolbar",components:[new MO(this.model,this.services)],growth:Y.PREFERRED},u={id:"header",components:[new mO(this.model,this.services,R([s],r?[l]:[]),{direction:q.ROW,alignItems:Z.CENTER})],growth:Y.PREFERRED},c={id:"graph-frame",components:t,growth:Y.STRETCH,renderType:Za(e,"graphFrameRenderType")||I.SVG},h=!0!==Za(e,"excludeLegend")&&!1!==n.legend.enabled,d=q.COLUMN;if(h){var f=Za(n,"legend","position");"left"===f?(d=q.ROW,n.legend.orientation||(n.legend.orientation=F.VERTICAL)):"right"===f?(d=q.ROW_REVERSE,n.legend.orientation||(n.legend.orientation=F.VERTICAL)):"bottom"===f&&(d=q.COLUMN_REVERSE)}var p={id:"spacer",components:[new vO(this.model,this.services)],growth:Y.PREFERRED},g={id:"full-frame",components:[new mO(this.model,this.services,R(h?[i]:[],h?[p]:[],[c]),{direction:d})],growth:Y.STRETCH},v=[];if(a||r){v.push(u);var m={id:"spacer",components:[new vO(this.model,this.services,r?{size:15}:void 0)],growth:Y.PREFERRED};v.push(m)}return v.push(g),[new wm(this.model,this.services),new vm(this.model,this.services),new mO(this.model,this.services,v,{direction:q.COLUMN})]},t}(),DO=function(t){function e(e){var n=t.call(this,e)||this;return n.axisFlavor=ut.DEFAULT,n}return n(e,t),e.prototype.assignRangeAndDomains=function(){var t=this.services.cartesianScales,e=this.getOptions(),n=t.isDualAxes(),r={primaryDomain:t.domainAxisPosition,primaryRange:t.rangeAxisPosition,secondaryDomain:null,secondaryRange:null};return n&&(r.secondaryDomain=t.secondaryDomainAxisPosition,r.secondaryRange=t.secondaryRangeAxisPosition),Object.keys(r).forEach((function(n){var i=r[n];t.scales[i]?r[n]={position:i,label:t.getScaleLabel(i),identifier:Za(e,"axes",i,"mapsTo")}:r[n]=null})),r},e.prototype.getTabularDataArray=function(){var t,e=this.getDisplayData(),n=this.getOptions().data.groupMapsTo,r=this.services.cartesianScales,i=this.assignRangeAndDomains(),o=i.primaryDomain,a=i.primaryRange,s=i.secondaryDomain,l=i.secondaryRange;return r.getDomainAxisScaleType()===G.TIME&&(t=function(t){return Qp(t,"MMM d, yyyy")}),R([R(["Group",o.label,a.label],s?[s.label]:[],l?[l.label]:[])],e.map((function(e){return R([e[n],null===e[o.identifier]?"–":t?t(e[o.identifier]):e[o.identifier],null===e[a.identifier]||isNaN(e[a.identifier])?"–":e[a.identifier].toLocaleString()],s?[null===e[s.identifier]?"–":e[s.identifier]]:[],l?[null===e[l.identifier]||isNaN(e[l.identifier])?"–":e[l.identifier]]:[])})))},e.prototype.setData=function(e){var n;if(e&&(n=t.prototype.setData.call(this,e),Za(this.getOptions(),"zoomBar",U.TOP,"enabled"))){var r=Za(this.getOptions(),"zoomBar",U.TOP,"data");this.setZoomBarData(r)}return n},e.prototype.setZoomBarData=function(t){var e=t?this.sanitize(Ha(t)):this.getDisplayData(),n=e,r=this.services.cartesianScales;if(e&&r.domainAxisPosition&&r.rangeAxisPosition){var i=r.getDomainIdentifier(),o=r.getRangeIdentifier(),a=e.map((function(t){return t[i].getTime()}));n=(a=Ga(a).sort()).map((function(t){var n=0,r={};return e.forEach((function(e){e[i].getTime()===t&&(n+=e[o])})),r[i]=new Date(t),r[o]=n,r}))}this.set({zoomBarData:n})},e.prototype.getZoomBarData=function(){return this.get("zoomBarData")},e.prototype.sanitizeDateValues=function(t){var e=this.getOptions();if(!e.axes)return t;var n=[];return Object.keys(U).forEach((function(t){var r=U[t],i=e.axes[r];if(i&&i.scaleType===G.TIME){var o=i.mapsTo;null===o&&void 0===o||n.push(o)}})),n.length>0&&t.forEach((function(t){n.forEach((function(e){null===Za(t,e,"getTime")&&(t[e]=new Date(t[e]))}))})),t},e.prototype.sanitize=function(e){return e=t.prototype.sanitize.call(this,e),e=this.sanitizeDateValues(e)},e}(gg),kO=function(t){function e(e,n){var r=t.call(this,e,n)||this;return r.services=Object.assign(r.services,{cartesianScales:Wg,curves:qg,zoom:Yg}),r.model=new DO(r.services),r}return n(e,t),e.prototype.getAxisChartComponents=function(t,e){var n=this.model.getOptions(),r=Za(n,"zoomBar",U.TOP,"enabled"),i=Za(n,"toolbar","enabled");this.services.cartesianScales.determineAxisDuality(),this.services.cartesianScales.findDomainAndRangeAxes(),this.services.cartesianScales.determineOrientation();var o=this.services.cartesianScales.getMainXAxisPosition(),a=Za(n,"axes",o,"scaleType"),s=r&&o===U.BOTTOM&&a===G.TIME,l=this.services.zoom.isZoomBarLocked(U.TOP),u=!!this.model.getOptions().title,c={id:"title",components:[new _m(this.model,this.services)],growth:Y.STRETCH},h={id:"toolbar",components:[new MO(this.model,this.services)],growth:Y.PREFERRED},d={id:"header",components:[new mO(this.model,this.services,R([c],i?[h]:[]),{direction:q.ROW,alignItems:Z.CENTER})],growth:Y.PREFERRED},f={id:"legend",components:[new Qg(this.model,this.services)],growth:Y.PREFERRED};s&&!l&&t.push(new Tm(this.model,this.services),new _O(this.model,this.services)),t.push(new Em(this.model,this.services)),t.push(new Mm(this.model,this.services));var p={id:"graph-frame",components:t,growth:Y.STRETCH,renderType:I.SVG},g=!1!==Za(e,"legend","enabled")&&!1!==this.model.getOptions().legend.enabled,v=q.COLUMN;if(g){var m=Za(this.model.getOptions(),"legend","position");m===z.LEFT?(v=q.ROW,this.model.getOptions().legend.orientation||(this.model.getOptions().legend.orientation=F.VERTICAL)):m===z.RIGHT?(v=q.ROW_REVERSE,this.model.getOptions().legend.orientation||(this.model.getOptions().legend.orientation=F.VERTICAL)):m===z.BOTTOM&&(v=q.COLUMN_REVERSE)}var y={id:"spacer",components:[new vO(this.model,this.services)],growth:Y.PREFERRED},b={id:"full-frame",components:[new mO(this.model,this.services,R(g?[f]:[],g?[y]:[],[p]),{direction:v})],growth:Y.STRETCH},E={id:"zoom-bar",components:[new AO(this.model,this.services)],growth:Y.PREFERRED,renderType:I.SVG},_=[];if(u||i){_.push(d);var x={id:"spacer",components:[new vO(this.model,this.services,i?{size:15}:void 0)],growth:Y.PREFERRED};_.push(x)}return s&&_.push(E),_.push(b),[new Om(this.model,this.services),new vm(this.model,this.services),new mO(this.model,this.services,_,{direction:q.COLUMN})]},e}(LO),RO=function(t){function e(e,n){var r=t.call(this,e,n)||this;return r.model.setOptions(za(Ha(Hs.areaChart),n.options)),r.init(e,n),r}return n(e,t),e.prototype.getComponents=function(){var t=[new EO(this.model,this.services),new xO(this.model,this.services),new OO(this.model,this.services),new qx(this.model,this.services),new Px(this.model,this.services),new zx(this.model,this.services,{fadeInOnChartHolderMouseover:!0,handleThresholds:!0}),new Jx(this.model,this.services,{skeleton:$.GRID})];return this.getAxisChartComponents(t)},e}(kO),IO=function(t){function e(e,n){var r=t.call(this,e,n)||this;return r.model.setOptions(za(Hs.stackedAreaChart,n.options)),r.init(e,n),r}return n(e,t),e.prototype.getComponents=function(){var t=[new EO(this.model,this.services),new xO(this.model,this.services),new SO(this.model,this.services),new Nx(this.model,this.services),new qx(this.model,this.services,{stacked:!0}),new Zx(this.model,this.services,{fadeInOnChartHolderMouseover:!0,handleThresholds:!0,stacked:!0}),new Jx(this.model,this.services,{skeleton:$.GRID})];return this.getAxisChartComponents(t)},e}(kO),PO=function(t){function e(e,n){var r=t.call(this,e,n)||this;return r.model.setOptions(za(Hs.simpleBarChart,n.options)),r.init(e,n),r}return n(e,t),e.prototype.getComponents=function(){var t=[new EO(this.model,this.services),new xO(this.model,this.services),new Bx(this.model,this.services),new CO(this.model,this.services),new Jx(this.model,this.services,{skeleton:$.VERT_OR_HORIZ})];return this.getAxisChartComponents(t)},e}(kO),NO=function(t){function e(e,n){var r=t.call(this,e,n)||this;return r.model.setOptions(za(Hs.groupedBarChart,n.options)),r.init(e,n),r}return n(e,t),e.prototype.getComponents=function(){var t=[new EO(this.model,this.services),new xO(this.model,this.services),new Vx(this.model,this.services),new CO(this.model,this.services),new Jx(this.model,this.services,{skeleton:$.VERT_OR_HORIZ})];return this.getAxisChartComponents(t)},e}(kO),UO=function(t){function e(e,n){var r=t.call(this,e,n)||this;return r.model.setOptions(za(Hs.stackedBarChart,n.options)),r.init(e,n),r}return n(e,t),e.prototype.getComponents=function(){var t=[new EO(this.model,this.services),new xO(this.model,this.services),new SO(this.model,this.services),new Hx(this.model,this.services),new Jx(this.model,this.services,{skeleton:$.VERT_OR_HORIZ}),new CO(this.model,this.services)];return this.getAxisChartComponents(t)},e}(kO),BO=function(t){function e(e){return t.call(this,e)||this}return n(e,t),e.prototype.getBoxQuartiles=function(t){return{q_25:gl(t,.25),q_50:gl(t,.5),q_75:gl(t,.75)}},e.prototype.getBoxplotData=function(){for(var t=this.getOptions().data.groupMapsTo,e=this.getGroupedData(),n=[],r=function(e,r){for(var o,a=i.services.cartesianScales.getRangeIdentifier(),s=r.map((function(t){return t[a]})).sort(zs),l=((o={})[t]=e,o.counts=s,o.quartiles=i.getBoxQuartiles(s),o.outliers=null,o.whiskers=null,o),u=l.quartiles.q_25,c=l.quartiles.q_75,h=1.5*(c-u),d=u-h,f=c+h,p=[],g=[],v=0,m=s;v<m.length;v++){var y=m[v];y<d||y>f?p.push(y):g.push(y)}l.outliers=p;var b=dl(g),E=hl(g);l.whiskers={min:b||dl([l.quartiles.q_25,l.quartiles.q_50,l.quartiles.q_75]),max:E||hl([l.quartiles.q_25,l.quartiles.q_50,l.quartiles.q_75])},n.push(l)},i=this,o=0,a=e;o<a.length;o++){var s=a[o];r(s.name,s.data)}return n},e.prototype.getTabularDataArray=function(){var t=this.getOptions().data.groupMapsTo;return R([["Group","Minimum","Q1","Median","Q3","Maximum","IQR","Outlier(s)"]],this.getBoxplotData().map((function(e){var n=Za(e,"outliers");return null!==n&&0!==n.length||(n=["–"]),[e[t],null!==Za(e,"whiskers","min")?Za(e,"whiskers","min").toLocaleString():"–",null!==Za(e,"quartiles","q_25")?Za(e,"quartiles","q_25").toLocaleString():"–",null!==Za(e,"quartiles","q_50")?Za(e,"quartiles","q_50").toLocaleString():"–",null!==Za(e,"quartiles","q_75")?Za(e,"quartiles","q_75").toLocaleString():"–",null!==Za(e,"whiskers","max")?Za(e,"whiskers","max").toLocaleString():"–",null!==Za(e,"quartiles","q_75")&&null!==Za(e,"quartiles","q_25")?(Za(e,"quartiles","q_75")-Za(e,"quartiles","q_25")).toLocaleString():"–",n.map((function(t){return t.toLocaleString()})).join(",")]})))},e.prototype.setColorClassNames=function(){var t=Za(this.getOptions(),"color","pairing"),e=Za(t,"option");e=e<=Et.pairingOptions["1-color"]?e:1;var n=this.allDataGroups.map((function(t,n){return"1-"+e+"-1"}));this.colorClassNames=El().range(n).domain(this.allDataGroups)},e}(DO),VO=function(t){function e(e,n){var r=t.call(this,e,n)||this;return r.model=new BO(r.services),r.model.setOptions(za(Hs.boxplotChart,n.options)),r.init(e,n),r}return n(e,t),e.prototype.getComponents=function(){var t=[new EO(this.model,this.services),new xO(this.model,this.services),new Gx(this.model,this.services),new CO(this.model,this.services),new Jx(this.model,this.services,{skeleton:$.VERT_OR_HORIZ})];return this.getAxisChartComponents(t,{legend:{enabled:!1}})},e}(kO),HO=function(t){function e(e,n){var r=t.call(this,e,n)||this;return r.model.setOptions(za(Hs.bubbleChart,n.options)),r.init(e,n),r}return n(e,t),e.prototype.getComponents=function(){var t=[new EO(this.model,this.services),new xO(this.model,this.services),new OO(this.model,this.services),new jx(this.model,this.services),new Jx(this.model,this.services,{skeleton:$.GRID})];return this.getAxisChartComponents(t)},e}(kO),GO=function(t){function e(e){return t.call(this,e)||this}return n(e,t),e.prototype.getMatchingRangeIndexForDatapoint=function(t){for(var e=t.ranges.length-1;e>0;e--){var n=t.ranges[e];if(t.value>=n)return e}return 0},e.prototype.getTabularDataArray=function(){var t=this,e=this.getDisplayData(),n=this.getOptions(),r=n.data.groupMapsTo,i=this.services.cartesianScales.getRangeIdentifier(),o=Za(n,"bullet","performanceAreaTitles");return R([["Title","Group","Value","Target","Percentage","Performance"]],e.map((function(e){return[e.title,e[r],null===e.value?"–":e.value,null===Za(e,"marker")?"–":e.marker,null===Za(e,"marker")?"–":Math.floor(e[i]/e.marker*100)+"%",o[t.getMatchingRangeIndexForDatapoint(e)]]})))},e}(DO),zO=function(t){function e(e,n){var r=t.call(this,e,n)||this;return r.model=new GO(r.services),r.model.setOptions(za(Hs.bulletChart,n.options)),r.init(e,n),r}return n(e,t),e.prototype.getComponents=function(){var t=[new EO(this.model,this.services),new xO(this.model,this.services),new Fx(this.model,this.services),new Jx(this.model,this.services,{skeleton:$.GRID})];return this.getAxisChartComponents(t)},e}(kO),jO=function(t){function e(){return null!==t&&t.apply(this,arguments)||this}return n(e,t),e.prototype.getTabularDataArray=function(){var t=this.getOptions(),e=t.data.groupMapsTo,n=this.getBinnedStackedData();return R([R([jn(t,"bins.rangeLabel")||"Range"],n.map((function(t){return jn(t,"0."+e)})))],jn(n,0).map((function(t,r){return R([jn(t,"data.x0")+" – "+jn(t,"data.x1")],n.map((function(t){return jn(t[r],"data."+jn(t[r],e))})))})))},e}(DO),FO=function(t){function e(e,n){var r=t.call(this,e,n)||this;return r.model=new jO(r.services),r.model.setOptions(za(Hs.histogramChart,n.options)),r.init(e,n),r.update(),r}return n(e,t),e.prototype.getComponents=function(){var t=[new EO(this.model,this.services),new xO(this.model,this.services),new TO(this.model,this.services),new Wx(this.model,this.services)];return this.getAxisChartComponents(t)},e}(kO),WO=function(t){function e(e,n){var r=t.call(this,e,n)||this;return r.model.setOptions(za(Hs.lineChart,n.options)),r.init(e,n),r}return n(e,t),e.prototype.getComponents=function(){var t=[new EO(this.model,this.services),new xO(this.model,this.services),new OO(this.model,this.services),new qx(this.model,this.services),new zx(this.model,this.services,{handleThresholds:!0}),new tw(this.model,this.services),new CO(this.model,this.services)];return this.getAxisChartComponents(t)},e}(kO),qO=function(t){function e(e,n){var r=t.call(this,e,n)||this;return r.model.setOptions(za(Hs.lollipopChart,n.options)),r.init(e,n),r}return n(e,t),e.prototype.getComponents=function(){var t=[new EO(this.model,this.services),new xO(this.model,this.services),new OO(this.model,this.services),new Yx(this.model,this.services),new zx(this.model,this.services),new Jx(this.model,this.services,{skeleton:$.GRID})];return this.getAxisChartComponents(t)},e}(kO),YO=function(t){function e(e,n){var r=t.call(this,e,n)||this;return r.model.setOptions(za(Hs.scatterChart,n.options)),r.init(e,n),r}return n(e,t),e.prototype.getComponents=function(){var t=[new EO(this.model,this.services),new xO(this.model,this.services),new OO(this.model,this.services),new zx(this.model,this.services),new Jx(this.model,this.services,{skeleton:$.GRID})];return this.getAxisChartComponents(t)},e}(kO),ZO=function(t){function e(e){return t.call(this,e)||this}return n(e,t),e.prototype.getTabularData=function(e){var n=t.prototype.getTabularData.call(this,e);return e!==n&&n.forEach((function(t){t.key&&t.key!==t.group&&(t.group=t.key)})),n},e.prototype.getTabularDataArray=function(){var t=this.getDisplayData(),e=this.getOptions().data.groupMapsTo;return R([["Group","Value"]],t.map((function(t){return[t[e],null===t.value?"–":t.value.toLocaleString()]})))},e.prototype.sanitize=function(t){return this.getTabularData(t).sort((function(t,e){return e.value-t.value}))},e}(gg),XO=function(t){function e(e,n,r){void 0===r&&(r=!1);var i=t.call(this,e,n)||this;return i.model=new ZO(i.services),r||(i.model.setOptions(za(Hs.pieChart,n.options)),i.init(e,n)),i}return n(e,t),e.prototype.getComponents=function(){var t=[new $x(this.model,this.services),new Jx(this.model,this.services,{skeleton:$.PIE})];return this.getChartComponents(t)},e}(LO),$O=function(t){function e(e,n){var r=t.call(this,e,n,!0)||this;return r.model.setOptions(za(Hs.donutChart,n.options)),r.init(e,n),r}return n(e,t),e.prototype.getComponents=function(){var t=[new Qx(this.model,this.services),new Jx(this.model,this.services,{skeleton:$.DONUT})];return this.getChartComponents(t)},e}(XO),KO=function(t){function e(e){return t.call(this,e)||this}return n(e,t),e.prototype.getMaximumDomain=function(t){return t.reduce((function(t,e){return t+e.value}),0)},e.prototype.getFillColor=function(e){var n=this.getOptions(),r=Za(n,"color","scale"),i=this.getStatus();return r||!i?t.prototype.getFillColor.call(this,e):null},e.prototype.getStatus=function(){var t=this.getOptions(),e=Za(this.getDisplayData()),n=(e?e.reduce((function(t,e){return{value:t.value+e.value}})):0).value,r=Za(t,"meter","proportional")?n:n>100?100:n,i=Za(t,"meter","status","ranges");if(i){var o=i.filter((function(t){return t.range[0]<=r&&r<=t.range[1]}));if(o.length>0)return o[0].status}return null},e.prototype.getTabularDataArray=function(){var t,e=this.getDisplayData(),n=this.getOptions(),r=n.data.groupMapsTo,i=this.getStatus(),o=Za(n,"meter","proportional"),a=[];if(null===o){t=100;var s=e[0];a=[R(["Group","Value"],i?["Status"]:[]),R([s[r],s.value],i?[i]:[])]}else{var l=Za(o,"total");t=l||this.getMaximumDomain(e),a=R([["Group","Value","Percentage of total"]],e.map((function(e){return[e[r],e.value,(e.value/t*100).toFixed(2)+" %"]})))}return a},e}(gg),QO=function(t){function e(){var e=null!==t&&t.apply(this,arguments)||this;return e.type="meter",e.renderType=I.SVG,e}return n(e,t),e.prototype.getStackedBounds=function(t,e){var n=0;return t.map((function(t,r){return 0!==r?(n+=e(t.value),D(D({},t),{width:Math.abs(e(t.value)-Tt.dividerWidth),x:n-e(t.value)})):(n=e(t.value),D(D({},t),{width:Math.abs(e(t.value)-Tt.dividerWidth),x:0}))}))},e.prototype.render=function(t){var e=this;void 0===t&&(t=!0);var n,i=this,o=this.getComponentContainer(),a=this.getOptions(),s=Za(a,"meter","proportional"),l=this.model.getDisplayData(),u=this.model.getStatus(),c=Hg.getSVGElementSize(o,{useAttrs:!0}).width,h=a.data.groupMapsTo;if(null===Za(a,"meter","proportional"))n=100;else{var d=Za(a,"meter","proportional","total");n=d||this.model.getMaximumDomain(this.model.getDisplayData())}var f=Xu().domain([0,n]).range([0,c]),p=this.getStackedBounds(l,f),g=Za(a,"meter","height");Hg.appendOrSelect(o,"rect.container").attr("x",0).attr("y",0).attr("width",c).attr("height",g||(s?Tt.height.proportional:Tt.height.default)),Hg.appendOrSelect(o,"line.rangeIndicator").attr("x1",c).attr("x2",c).attr("y1",0).attr("y2",g||(s?Tt.height.proportional:Tt.height.default));var v=o.selectAll("rect.value").data(p),m=null==u||i.model.isUserProvidedColorScaleValid()||s?"value":"value status--"+u;v.enter().append("rect").classed("value",!0).merge(v).attr("x",(function(t){return t.x})).attr("y",0).attr("height",(function(){var t=Za(a,"meter","height");return t||(s?Tt.height.proportional:Tt.height.default)})).attr("class",(function(t){return e.model.getColorClassName({classNameTypes:[N.FILL],dataGroupName:t[h],originalClassName:m})})).transition().call((function(n){return e.services.transitions.setupTransition({transition:n,name:"meter-bar-update",animate:t})})).attr("width",(function(t,e){return t.value>n?f(n):t.width})).style("fill",(function(t){return i.model.getFillColor(t[h])})).attr("role",r.GRAPHICS_SYMBOL).attr("aria-roledescription","value").attr("aria-label",(function(t){return t.value})),v.exit().remove();var y=Za(a,"meter","peak"),b=y;null!==y&&(y>n?b=n:y<l[0].value&&(b=l[0].value>n?n:l[0].value));var E=o.selectAll("line.peak").data(null==b?[]:[b]);E.enter().append("line").classed("peak",!0).merge(E).attr("y1",0).attr("y2",(function(){var t=Za(a,"meter","height");return t||(s?Tt.height.proportional:Tt.height.default)})).transition().call((function(n){return e.services.transitions.setupTransition({transition:n,name:"peak-line-update",animate:t})})).attr("x1",(function(t){return f(t)})).attr("x2",(function(t){return f(t)})).attr("role",r.GRAPHICS_SYMBOL).attr("aria-roledescription","peak").attr("aria-label",(function(t){return t})),E.exit().remove(),this.services.domUtils.setSVGMaxHeight(),this.addEventListeners()},e.prototype.addEventListeners=function(){var t=this.getOptions(),e=t.data.groupMapsTo,n=this,r=Za(t,"meter","proportional");this.parent.selectAll("rect.value").on("mouseover",(function(t,i){var o=Ba(this);n.services.events.dispatchEvent(ht.Meter.METER_MOUSEOVER,{event:t,element:o,datum:i}),r&&(o.classed("hovered",!0),n.services.events.dispatchEvent(ht.Tooltip.SHOW,{event:t,hoveredElement:o,items:[{label:i[e],value:i.value}]}))})).on("mousemove",(function(t,e){var i=Ba(this);n.services.events.dispatchEvent(ht.Meter.METER_MOUSEMOVE,{event:t,element:i,datum:e}),r&&n.services.events.dispatchEvent(ht.Tooltip.MOVE,{event:t})})).on("click",(function(t,e){n.services.events.dispatchEvent(ht.Meter.METER_CLICK,{event:t,element:Ba(this),datum:e})})).on("mouseout",(function(t,e){var i=Ba(this);n.services.events.dispatchEvent(ht.Meter.METER_MOUSEOUT,{event:t,element:i,datum:e}),r&&(i.classed("hovered",!1),n.services.events.dispatchEvent(ht.Tooltip.HIDE,{hoveredElement:i}))}))},e.prototype.destroy=function(){this.parent.selectAll("rect.value").on("mouseover",null).on("mousemove",null).on("mouseout",null).on("click",null)},e}(Kg),JO=function(t){function e(e,n){var r=t.call(this,e,n)||this;r.model=new KO(r.services);var i=n.options.meter.proportional?bo(Ha(Hs.proportionalMeterChart),n.options):bo(Ha(Hs.meterChart),n.options);return r.model.setOptions(i),r.init(e,n),r}return n(e,t),e.prototype.getComponents=function(){var t=R(Za(this.model.getOptions(),"meter","showLabels")?[{id:"meter-title",components:[new xm(this.model,this.services)],growth:Y.STRETCH,renderType:I.SVG},{id:"spacer",components:[new vO(this.model,this.services,{size:8})],growth:Y.STRETCH}]:[],[{id:"meter-graph",components:[new QO(this.model,this.services)],growth:Y.STRETCH,renderType:I.SVG}]),e=[new mO(this.model,this.services,t,{direction:q.COLUMN})];return this.getChartComponents(e,{graphFrameRenderType:I.HTML})},e}(LO),tT=function(t){function e(e){return t.call(this,e)||this}return n(e,t),e.prototype.getTabularDataArray=function(){var t=this.getOptions(),e=this.getGroupedData(),n=Za(t,"radar","axes"),r=n.angle,i=n.value,o=Za(e,"0","data").map((function(t){return t[r]}));return R([R(["Group"],o)],e.map((function(t){return R([t.name],o.map((function(e,n){return null!==Za(t,"data",n,i)?Za(t,"data",n,i).toLocaleString():"–"})))})))},e}(DO),eT=function(t){function e(e,n){var r=t.call(this,e,n)||this;return r.model=new tT(r.services),r.model.setOptions(za(Hs.radarChart,n.options)),r.init(e,n),r}return n(e,t),e.prototype.getComponents=function(){var t=[new cw(this.model,this.services)];return this.getChartComponents(t)},e}(LO),nT=function(t){function e(e){return t.call(this,e)||this}return n(e,t),e.prototype.getDataGroups=function(){return t.prototype.getDataGroups.call(this).filter((function(t){return"delta"!==t.name}))},e.prototype.getTabularDataArray=function(){var t=this.getDisplayData(),e=this.getOptions().data.groupMapsTo;return R([["Group","Value"]],t.map((function(t){return[t[e],null===t.value?"–":t.value.toLocaleString()]})))},e}(gg),rT=function(t){function e(e,n){var r=t.call(this,e,n)||this;return r.model=new nT(r.services),r.model.setOptions(za(Hs.gaugeChart,n.options)),r.init(e,n),r}return n(e,t),e.prototype.getComponents=function(){var t=[new Kx(this.model,this.services)];return this.getChartComponents(t)},e}(LO),iT=((wO={})[rt.LINE]=[qx,zx],wO[rt.SCATTER]=[zx],wO[rt.AREA]=[Px,qx,zx],wO[rt.STACKED_AREA]=[Nx,qx,Zx,SO],wO[rt.SIMPLE_BAR]=[Bx],wO[rt.GROUPED_BAR]=[Vx,CO],wO[rt.STACKED_BAR]=[Hx,SO],wO),oT=function(t){function e(e,n){var r=t.call(this,e,n)||this,i=za(Hs.comboChart,n.options);return n.options.comboChartTypes||(console.error("No comboChartTypes defined for the Combo Chart!"),i.comboChartTypes=[{type:rt.LINE,correspondingDatasets:[]}]),r.model.setOptions(i),r.init(e,n),r}return n(e,t),e.prototype.getGraphComponents=function(){var t=this,e=this.model.getOptions().comboChartTypes,n=0;return Zn(e.map((function(e){var r,i,o=e.type;return"string"==typeof e.type?Object.keys(iT).includes(e.type)?(r=bo({},Hs[Hr(e.type)+"Chart"],t.model.getOptions(),e.options),e.type===rt.STACKED_AREA&&(i=!0),iT[e.type].map((function(o,a){return new o(t.model,t.services,{groups:e.correspondingDatasets,id:n++,options:r,stacked:i})}))):(console.error('Invalid chart type "'+e.type+'" specified for combo chart. Please refer to the ComboChart tutorial for more guidance.'),null):(r=bo({},t.model.getOptions(),e.options),new o(t.model,t.services,{groups:e.correspondingDatasets,id:n++,options:r}))})).filter((function(t){return null!==t})))},e.prototype.getComponents=function(){var t=this.model.getOptions().comboChartTypes.some((function(t){return t.type===rt.STACKED_BAR||t.type===rt.STACKED_AREA})),e=R([new EO(this.model,this.services),new xO(this.model,this.services),new Jx(this.model,this.services,{skeleton:$.GRID})],t?[]:[new OO(this.model,this.services)],this.getGraphComponents());return this.getAxisChartComponents(e)},e}(kO),aT=function(t){function e(e){return t.call(this,e)||this}return n(e,t),e.prototype.getTabularDataArray=function(){var t=this,e=this.getDisplayData(),n=[["Child","Parent"]];return e.forEach((function(e){t.getChildrenDatums(e,n),n.push([e.name,"–"])})),n},e.prototype.getChildrenDatums=function(t,e){var n=this;void 0===e&&(e=[]),t.children&&t.children.length>0&&t.children.forEach((function(r){n.getChildrenDatums(r,e),e.push([r.name,t.name])}))},e}(gg),sT=function(t){function e(e,n){var r=t.call(this,e,n)||this;return r.model=new aT(r.services),r.model.setOptions(za(Hs.treeChart,n.options)),r.init(e,n),r}return n(e,t),e.prototype.getComponents=function(){var t=[new ew(this.model,this.services)];return this.getChartComponents(t,{excludeLegend:!0})},e}(LO),lT=function(t){function e(e){return t.call(this,e)||this}return n(e,t),e.prototype.getTabularDataArray=function(){var t=this.getDisplayData(),e=[["Child","Group","Value"]];return t.forEach((function(t){Array.isArray(t.children)?t.children.forEach((function(n){e.push([n.name,t.name,n.value])})):null!==Za(t.name)&&Za(t.value)&&e.push(["–",t.name,t.value])})),e},e}(gg),uT=function(t){function e(e,n){var r=t.call(this,e,n)||this;return r.model=new lT(r.services),r.model.setOptions(za(Hs.treemapChart,n.options)),r.init(e,n),r}return n(e,t),e.prototype.getComponents=function(){var t=[new ow(this.model,this.services)];return this.getChartComponents(t)},e}(LO),cT=function(t){function e(e){var n=t.call(this,e)||this;return n.parentNode=!1,n.set({depth:2},{skipUpdate:!0}),n}return n(e,t),e.prototype.setData=function(e){t.prototype.setData.call(this,e),this.setDataGroups(),1===e.length&&(this.parentNode=!0),this.setZoom()},e.prototype.setOptions=function(t){var e=this.getOptions(),n=bo({},t,this.getZoomOptions(t));Ya(e,n);var r=this.getHierarchyLevel(),i=Za(e,"circlePack","hierarchyLevel");this.set({options:bo(e,n),depth:i&&i<4?i:r})},e.prototype.getZoomOptions=function(t){if(!this.getDisplayData())return{};var e=this.getDisplayData(),n=t||this.getOptions(),r=1===e.length&&Za(e,0,"children")?Za(e,0,"children"):e,i=this.getHierarchyLevel();return r.some((function(t){if(t.children&&t.children.some((function(t){return t.children})))return i=3,!1})),!0===Za(n,"canvasZoom","enabled")&&i>2?{legend:{additionalItems:[{type:at.ZOOM,name:"Click to zoom"}]}}:null},e.prototype.setZoom=function(t){this.setOptions(this.getZoomOptions(t))},e.prototype.updateHierarchyLevel=function(t){this.set({depth:t})},e.prototype.getHierarchyLevel=function(){return this.get("depth")},e.prototype.hasParentNode=function(){return this.parentNode},e.prototype.setDataGroups=function(){var t=this,e=this.getData(),n=this.getOptions().data.groupMapsTo,r=e.map((function(e){var r=e[n];return t.setChildrenDataGroup(e,r)}));this.set({data:r},{skipUpdate:!0})},e.prototype.setChildrenDataGroup=function(t,e){var n=this;return t.children?D(D({},t),{dataGroupName:e,children:t.children.map((function(t,r){return n.setChildrenDataGroup(t,e)}))}):D(D({},t),{dataGroupName:e})},e.prototype.getTabularDataArray=function(){var t=this,e=this.getDisplayData(),n=[["Child","Parent","Value"]];return e.forEach((function(e){var r=e.value?e.value:0;e.children&&(r+=t.getChildrenDatums(e.children,e.name,n,0)),n.push(["–",e.name,r])})),n},e.prototype.getChildrenDatums=function(t,e,n,r){var i=this;void 0===n&&(n=[]),void 0===r&&(r=0);var o=e;return t.forEach((function(t){var e=t.name,a=0;if(t.children)t.children.length>0&&("number"==typeof t.value&&(r+=t.value),a+=i.getChildrenDatums(t.children,e,n,a),n.push([e,o,a]),r+=a);else{var s=0;"number"==typeof t.value&&(s=t.value,r+=t.value),n.push([t.name,o,s])}})),r},e}(gg),hT=function(t){function e(e,n){var r=t.call(this,e,n)||this;return r.model=new cT(r.services),r.model.setOptions(za(Hs.circlePackChart,n.options)),r.init(e,n),r}return n(e,t),e.prototype.getComponents=function(){var t=[new hw(this.model,this.services)];return this.getChartComponents(t)},e}(LO),dT=function(t){function e(e){return t.call(this,e)||this}return n(e,t),e.prototype.getTabularDataArray=function(){var t=this.getDisplayData(),e=this.getOptions(),n=e.wordCloud,r=n.fontSizeMapsTo,i=n.wordMapsTo,o=e.data.groupMapsTo;return R([[e.tooltip.wordLabel,"Group",e.tooltip.valueLabel]],t.map((function(t){return[t[i],t[o],t[r]]})))},e}(gg),fT=function(t){function e(e,n){var r=t.call(this,e,n)||this;return r.model=new dT(r.services),r.model.setOptions(za(Hs.wordCloudChart,n.options)),r.init(e,n),r}return n(e,t),e.prototype.getComponents=function(){var t=[new Pw(this.model,this.services),new Jx(this.model,this.services,{skeleton:$.PIE})];return this.getChartComponents(t)},e}(LO),pT=function(t){function e(e){return t.call(this,e)||this}return n(e,t),e.prototype.getTabularDataArray=function(){var t=this.getDisplayData();return t.sort((function(t,e){return t.source.localeCompare(e.source)})),R([["Source","Target","Value"]],t.map((function(t){return[t.source,t.target,t.value]})))},e}(DO),gT=function(t){function e(e,n){var r=t.call(this,e,n)||this;return r.model=new pT(r.services),r.model.setOptions(za(Hs.alluvialChart,n.options)),r.init(e,n),r}return n(e,t),e.prototype.getComponents=function(){var t=[new fO(this.model,this.services)];return this.getChartComponents(t,{excludeLegend:!0})},e}(LO),vT=function(t){function e(e){var n=t.call(this,e)||this;n.axisFlavor=ut.HOVERABLE,n._colorScale=void 0,n._domains=[],n._ranges=[],n._matrix={};var r=Za(n.getOptions(),"axes");if(Za(r,"left","scaleType")&&Za(r,"left","scaleType")!==G.LABELS||Za(r,"right","scaleType")&&Za(r,"right","scaleType")!==G.LABELS||Za(r,"top","scaleType")&&Za(r,"top","scaleType")!==G.LABELS||Za(r,"bottom","scaleType")&&Za(r,"bottom","scaleType")!==G.LABELS)throw Error("Heatmap only supports label scaletypes.");return n}return n(e,t),e.prototype.getFillColor=function(t){return this._colorScale(t)},e.prototype.getUniqueDomain=function(){if(go(this._domains)){var t=this.getDisplayData(),e=this.services.cartesianScales,n=e.getDomainIdentifier(),r=e.getMainXAxisPosition(),i=e.getCustomDomainValuesByposition(r);if(i)return i;this._domains=Array.from(new Set(t.map((function(t){return t[n]}))))}return this._domains},e.prototype.getUniqueRanges=function(){if(go(this._ranges)){var t=this.getDisplayData(),e=this.services.cartesianScales,n=e.getRangeIdentifier(),r=e.getMainYAxisPosition(),i=e.getCustomDomainValuesByposition(r);if(i)return i;this._ranges=Array.from(new Set(t.map((function(t){return t[n]}))))}return this._ranges},e.prototype.getMatrix=function(){var t=this;if(go(this._matrix)){var e=this.getUniqueDomain(),n=this.getUniqueRanges(),r=this.services.cartesianScales.getDomainIdentifier(),i=this.services.cartesianScales.getRangeIdentifier(),o={};n.forEach((function(t){o[t]={value:null,index:-1}})),e.forEach((function(e){t._matrix[e]=Ha(o)})),this.getDisplayData().forEach((function(e,n){t._matrix[e[r]][e[i]]={value:e.value,index:n}}))}return this._matrix},e.prototype.setData=function(t){var e=this.sanitize(Ha(t)),n=this.generateDataGroups(e);return this.set({data:e,dataGroups:n}),this._domains=[],this._ranges=[],this._matrix={},e},e.prototype.getMatrixAsArray=function(){var t=this;go(this._matrix)&&this.getMatrix();var e=this.getUniqueDomain(),n=this.getUniqueRanges(),r=this.services.cartesianScales.getDomainIdentifier(),i=this.services.cartesianScales.getRangeIdentifier(),o=[];return e.forEach((function(e){n.forEach((function(n){var a={value:t._matrix[e][n].value,index:t._matrix[e][n].index};a[r]=e,a[i]=n,o.push(a)}))})),o},e.prototype.getTabularDataArray=function(){var t=this.getDisplayData(),e=this.assignRangeAndDomains(),n=e.primaryDomain,r=e.primaryRange;return R([[n.label,r.label,"Value"]],t.map((function(t){return[null===t[n.identifier]?"–":t[n.identifier],null===t[r.identifier]?"–":t[r.identifier].toLocaleString(),t.value]})))},e.prototype.getColorClassName=function(t){return t.originalClassName+" "+this._colorScale(t.value)},e.prototype.setColorClassNames=function(){var t=Za(this.getOptions(),"color");this._colorScale=$g(this.getDisplayData(),t)},e}(DO),mT=function(t){function e(e,n){var r=t.call(this,e,n)||this;return r.model=new vT(r.services),r.model.setOptions(za(Hs.heatmapChart,n.options)),r.init(e,n),r}return n(e,t),e.prototype.getAxisChartComponents=function(t,e){var n=this.model.getOptions(),r=Za(n,"toolbar","enabled");this.services.cartesianScales.determineAxisDuality(),this.services.cartesianScales.findDomainAndRangeAxes(),this.services.cartesianScales.determineOrientation();var i=!!this.model.getOptions().title,o={id:"title",components:[new _m(this.model,this.services)],growth:Y.STRETCH},a={id:"toolbar",components:[new MO(this.model,this.services)],growth:Y.PREFERRED},s={id:"header",components:[new mO(this.model,this.services,R([o],r?[a]:[]),{direction:q.ROW,alignItems:Z.CENTER})],growth:Y.PREFERRED},l={id:"legend",components:[new cv(this.model,this.services,{chartType:"heatmap"})],growth:Y.PREFERRED,renderType:I.SVG},u={id:"graph-frame",components:t,growth:Y.STRETCH,renderType:I.SVG},c=!1!==Za(e,"legend","enabled")&&!1!==this.model.getOptions().legend.enabled,h=q.COLUMN_REVERSE,d={id:"spacer",components:[new vO(this.model,this.services,{size:15})],growth:Y.PREFERRED},f={id:"full-frame",components:[new mO(this.model,this.services,R(c?[l]:[],c?[d]:[],[u]),{direction:h})],growth:Y.STRETCH},p=[];if(i||r){p.push(s);var g={id:"spacer",components:[new vO(this.model,this.services,r?{size:15}:void 0)],growth:Y.PREFERRED};p.push(g)}return p.push(f),[new Om(this.model,this.services),new vm(this.model,this.services),new mO(this.model,this.services,p,{direction:q.COLUMN})]},e.prototype.getComponents=function(){var t=[new EO(this.model,this.services),new pO(this.model,this.services)];return this.getAxisChartComponents(t)},e}(kO),yT=function(t){function e(e){var n=t.call(this,e)||this;return n._colorScale=void 0,n._matrix={},n}return n(e,t),e.prototype.getFillColor=function(t){return this._colorScale(t)},e.prototype.getCombinedData=function(){var t=this;if(go(this._matrix)){var e=this.getOptions(),n=this.getDisplayData();go(n)||go(e.geoData.objects.countries)||(e.geoData.objects.countries.geometries.forEach((function(e){t._matrix[e.properties.NAME]=e})),n.forEach((function(e){t._matrix[e.name]?t._matrix[e.name].value=e.value||null:console.warn("Data point "+e+" is missing geographical data.")})))}return this._matrix},e.prototype.getTabularDataArray=function(){return R([["Country ID","Country Name","Value"]],this.getDisplayData().map((function(t){return[null===t.id?"–":t.id,t.name,t.value]})))},e.prototype.getColorClassName=function(t){return t.originalClassName+" "+this._colorScale(t.value)},e.prototype.setColorClassNames=function(){var t=Za(this.getOptions(),"color");this._colorScale=$g(this.getDisplayData(),t)},e}(gg),bT=function(t){function e(e,n){var r=t.call(this,e,n)||this;return r.model=new yT(r.services),r.model.setOptions(za(Hs.choroplethChart,n.options)),r.init(e,n),r}return n(e,t),e.prototype.getChartComponents=function(t,e){var n=this.model.getOptions(),r=Za(n,"toolbar","enabled"),i=!!this.model.getOptions().title,o={id:"title",components:[new _m(this.model,this.services)],growth:Y.STRETCH},a={id:"toolbar",components:[new MO(this.model,this.services)],growth:Y.PREFERRED},s={id:"header",components:[new mO(this.model,this.services,R([o],r?[a]:[]),{direction:q.ROW,alignItems:Z.CENTER})],growth:Y.PREFERRED},l={id:"legend",components:[new cv(this.model,this.services,{chartType:"choropleth"})],growth:Y.PREFERRED,renderType:I.SVG},u={id:"graph-frame",components:t,growth:Y.STRETCH,renderType:I.SVG},c=!1!==Za(e,"legend","enabled")&&!1!==this.model.getOptions().legend.enabled,h=q.COLUMN_REVERSE,d={id:"spacer",components:[new vO(this.model,this.services,{size:15})],growth:Y.PREFERRED},f={id:"full-frame",components:[new mO(this.model,this.services,R(c?[l]:[],c?[d]:[],[u]),{direction:h})],growth:Y.STRETCH},p=[];if(i||r){p.push(s);var g={id:"spacer",components:[new vO(this.model,this.services,r?{size:15}:void 0)],growth:Y.PREFERRED};p.push(g)}return p.push(f),[new wm(this.model,this.services),new vm(this.model,this.services),new mO(this.model,this.services,p,{direction:q.COLUMN})]},e.prototype.getComponents=function(){var t=[new gO(this.model,this.services)];return this.getChartComponents(t)},e}(LO);t.AlluvialChart=gT,t.AreaChart=RO,t.BoxplotChart=VO,t.BubbleChart=HO,t.BulletChart=zO,t.CirclePackChart=hT,t.ComboChart=oT,t.DonutChart=$O,t.EXPERIMENTAL_ChoroplethChart=bT,t.GaugeChart=rT,t.GroupedBarChart=NO,t.HeatmapChart=mT,t.HistogramChart=FO,t.LineChart=WO,t.LollipopChart=qO,t.MeterChart=JO,t.PieChart=XO,t.RadarChart=eT,t.ScatterChart=YO,t.SimpleBarChart=PO,t.StackedAreaChart=IO,t.StackedBarChart=UO,t.TreeChart=sT,t.TreemapChart=uT,t.WordCloudChart=fT,t.configurations=Gs,t.interfaces=dt,Object.defineProperty(t,"__esModule",{value:!0})}));
|